From 1bf2c0f641d87ebe9c2fce323af3521dfbbb8112 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sat, 17 May 2014 08:19:25 -0600 Subject: [PATCH 001/103] first commit --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..e69de29b From 9dba2fccf3b18e0339d3506c732c2b8223c8a452 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sat, 17 May 2014 08:27:07 -0600 Subject: [PATCH 002/103] Project 1 WolfSSL --- Makefile | 14 +++++++++++ server-udp | Bin 0 -> 7754 bytes server-udp.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 Makefile create mode 100755 server-udp create mode 100644 server-udp.c diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..cd005e38 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +all: server-udp + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket + +server-udp: server-udp.c + $(CC) -o server-udp server-udp.c $(LIBS) + +.PHONY: clean + +clean: + -rm -f *.o server-udp diff --git a/server-udp b/server-udp new file mode 100755 index 0000000000000000000000000000000000000000..f0142d498503d48818f347d4c38e41a865ed893d GIT binary patch literal 7754 zcmeHMeQ;FO6~CKoaK#WJMvH>_ipvNsECC{eiqnK-!-pF{NYD<-W3&5`x3bxd``#jP zpe2SVYgi|3rBkP0){g#VTRVya7CX=&(T;zhbsVPcR2{Xmv9v=gBDQGy``!C4JXV}e z|L5+Uz4v#|x#ymH?ztcDy>CZjt${#5=u{ypg+znFPy;FtUamL|!Vs5=S>ie|O-w)) zc?~-t12WKnRE4@As1no;+}*!NtdAvVtY}m_@T){gnk+fks8sc z1;l>IuRvA@ejRwE5-^E;_Cc~CZ=-Kg3ouFZ)_mY5V-tmlJrWF&!r+lK{|@j0zmTXO z-HWy0`|Uf8IuhG+eDl(&&UxwN+;l3F-x_hUkp+s!w&X8c)q#IC4(gl=V%s_peMkP3 zw|{=^hWroTf46nZFPCke@~h;|lYim3Ye3W?ePsv(MOpWY+uu9LvOh(9U<%5s%kYh5 z_@**^pAQ=-FY#gOGt2PGGTdB-?<&JzEyHum@HJ(aVY0gr4AEDY3j_fCoS=Uf33J72 z({YojjG1?=q;Rr{&6X={H=9Yze@8gIxm3pO61`R~m(2;s&84l3=&^bn2zI72Ns+S> zTe@=D9^qJ-q?;9{N&Qe8&$(t#Je5IBcTYCs)tF*gY{k-Mb3vpY_EdPkb0u99zHzA3G>9t+yHCW6w&=QP>9Y z6B2VY_AKIIi8(5pE*;w;F-K=FChnD(qqG}|H%ZLV+RKU8NX${&Yls^q=ICvP-dMfF z^n$&K*Z`jY_l<>j2i`xirhTp5i`cRS{_a?Bi-)kUWFc^}YuNuAnjRkU<9)Y7-Q4B) z8#q1T{=mpSC>HSLsgA-21IMS12E*iyAANPC_ySq`2&Md?(-no^9s2P4z|q%F=K~`z z%7$;~hJ}`JP&a<#)se!f;sLo_cict=B7cR{A1ZBwiASnf7kKp}SoX781QYtdUK?`N zSwqNyA!B`LGCbzsziW6H+;w-Z?>~M9-48{phuT6fa+~=rtr?A;U{+{5UWk@PqX#*u zqfx0CrcrDZR(d%jKos^Qp|-G>GgJD`=O{)G-$usdA{TS9Y8c)v1jD5dJ{uqR)Q@d~ z2B~yEJ1BM>E7XOlnC*~SU?d zPT4eMwcf5m^p8XN!-a-$p&j1Us*8-9()S>Eo~ciHrrzQ+buSjp7<(*M{Tgi5Wl&nH z`ixQ4F|4QkYak`(w3t6w-2O`O$2M4n!R7cLiXMg!3U@0TCNq&Gmvxx0p_in{HmJv}o%L1>-f9oml|DfuZ|-iB9oKMe%SdE187twYpuo*~S|^G&PwfrRg0s;|ZLy#@XZ5E03>=ZJr^P!hY5%m! zTMgtK%bTB$k1s*~JeY7GsYMYMKR5y**gqmKi333zJ2HJtP+_5gEiypY>fr}o{9ymG}3_S}X=3z(Tk$iF> z7{ZlVxHu)RM$YHaX~=my;gzNunEMv-$Dfa9pTYAcpUnCC6_ zc%Dj%2$3CkY!ONJWuQ;xZccGL8_xqKcsVOgc~$65yCRaxr10-rTk#K@Q($G2aW^g^ zmTh+B;yspWC(%+P)xwPDa`8UZLYMDNKn%*`J*fmb&O#ynBC;2yvD0xxB$4gu!5OUG z|37oaEMtYSCf~~dFrIWGkLd;w9x0`qe18Il0j!g}l>^KNX}Mj9ah~DwF763xxfbA4 zh)?#*wegInk86a9a->xtt`Ev_&AbM=6DV^Hp(tgzcGiQqZYak!b^rygEuARK#3xy< z56W?Ew4%{S%PudLPdSaPtDhW9QWq-eb;sFpItz{do$(@j6@N0b>1MvVz%W)0w zhMeumaX-;=yHTdC?1y{INyy!RvQCs^dKjeT46HW;jCaWJ5`9A1?}D_P;64V!a#{&^ zlw0X<+K3oP3{#%`WW8Fw=6+qpan6 zaXasY-0%hD_~6MqJlvt)|KT-{)GUGxCXnGJU1ZL=)u|T`EJxAt zwW#3xI@*AyGUomI8nNL_^i^nm5dA{pe#A=e&9i)OtFY>s`-{R#A@>o5l?S+AD6Cc^ z_XUMHqiX#t%pFUubA_dtJYyB+%2j8t!U$3%u1|%zLkYoksIYu!$NL_Qc~ek#1;uA1 ztM#KWf(41|L}7YP2(AZ(IV&pe73RsW?idQI9h-5iuv)qL46pQV7K}^9$7C@v{*Wr= z%>r?F7Efihj3?%mf;XIVsS-CF|GWjoKgT&@-G2Z(2U|3HtqLeBMz4EPFBM9#YyG36ge&N~-zKul3DiU^QsPq}?BqyCKN&j6zQ55RtV z*-j_6e;YveFQESfu=ZyF{`?eJ_fLK`JM{b)fInvd^SvP>bqefV;4{cT-74UEjE9jr zrDBpu0&D*pc=InWaNsd&l~!S@A&TnKIf0C#dgZ$-R#H6DgPj`muSypW%wx{Ho)KS!<2um4D%z4?vMWX z(8p){AhsaAA57tmC6RL-H{aD2N#OIq%I39ZY{j~E(-cW7XLY9>+(S*b$4sQN8Oy=T zlP^@6W-@Dbr?Z{$w27|{Ime9Ww+dYEdefF`B_oS&y15>jFCb*{qN%QpCa!|HKA|p} z$$U>wADZ}($@}SfqK=ir?RIWH*((iiUE9Du|s=1AvO!E3Mj=pxidoW{m;pI%H$-inoO{Rzh}z>h$Vze0Th^4Gw< z=ej8S$OE2}HSKsNN&Ct^Gs%xg=W8naW^@52Jwe~euTFlx`WWS}!Mwudo_D)?P5XYh z2={-lN`915@8A5b| literal 0 HcmV?d00001 diff --git a/server-udp.c b/server-udp.c new file mode 100644 index 00000000..d16e1301 --- /dev/null +++ b/server-udp.c @@ -0,0 +1,70 @@ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include + + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ + +int +main(int argc, char** argv) +{ +/* CREATE THE SOCKET */ + + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int sockfd; /* Initialize our socket */ + socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ + +/* create a UDP/IP socket */ + + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + { + perror("cannot create socket"); + return 0; + } + +/* printf("created socket descriptor = %d\n", sockfd); */ + +/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + + servaddr.sin_family = AF_INET; + /* host-to-network-long conversion (htonl) */ + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + /* host-to-network-short conversion (htons) */ + servaddr.sin_port = htons(SERV_PORT); + + + if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } + +/* loop, listen for client, print received, reply to client, close socket */ + for(;;) { + printf("waiting for client message on port %d\n", SERV_PORT); + recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); + printf("heard %d bytes\n", recvlen); + if (recvlen > 0) { + buf[recvlen] = 0; + printf("I heard this: \"%s\"\n", buf); + } + else + printf("lost the connection to client\n"); + sprintf(buf, "Message #%d received\n", msgnum++); + printf("reply sent \"%s\"\n", buf); + if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) + perror("sendto"); + /* continues to loop, use "Ctrl+C" to terminate listening */ + + } +} From a803f812d2c8ce8fecd067c341d208201b45fffa Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sat, 17 May 2014 08:34:20 -0600 Subject: [PATCH 003/103] Project 1 WolfSSL --- server-udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-udp.c b/server-udp.c index d16e1301..74aeac56 100644 --- a/server-udp.c +++ b/server-udp.c @@ -49,7 +49,7 @@ main(int argc, char** argv) return 0; } -/* loop, listen for client, print received, reply to client, close socket */ +/* loop, listen for client, print received, reply to client */ for(;;) { printf("waiting for client message on port %d\n", SERV_PORT); recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); From 17a287efb5c92ed3559459147dad0908d2ee88c7 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sat, 17 May 2014 17:48:12 -0600 Subject: [PATCH 004/103] p1 v1.0 --- project1/Makefile | 14 +++++++++ project1/README.md | 0 project1/server-udp | Bin 0 -> 7754 bytes project1/server-udp.c | 70 ++++++++++++++++++++++++++++++++++++++++++ project1/tags | 7 +++++ 5 files changed, 91 insertions(+) create mode 100644 project1/Makefile create mode 100644 project1/README.md create mode 100755 project1/server-udp create mode 100644 project1/server-udp.c create mode 100644 project1/tags diff --git a/project1/Makefile b/project1/Makefile new file mode 100644 index 00000000..cd005e38 --- /dev/null +++ b/project1/Makefile @@ -0,0 +1,14 @@ +all: server-udp + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket + +server-udp: server-udp.c + $(CC) -o server-udp server-udp.c $(LIBS) + +.PHONY: clean + +clean: + -rm -f *.o server-udp diff --git a/project1/README.md b/project1/README.md new file mode 100644 index 00000000..e69de29b diff --git a/project1/server-udp b/project1/server-udp new file mode 100755 index 0000000000000000000000000000000000000000..f0142d498503d48818f347d4c38e41a865ed893d GIT binary patch literal 7754 zcmeHMeQ;FO6~CKoaK#WJMvH>_ipvNsECC{eiqnK-!-pF{NYD<-W3&5`x3bxd``#jP zpe2SVYgi|3rBkP0){g#VTRVya7CX=&(T;zhbsVPcR2{Xmv9v=gBDQGy``!C4JXV}e z|L5+Uz4v#|x#ymH?ztcDy>CZjt${#5=u{ypg+znFPy;FtUamL|!Vs5=S>ie|O-w)) zc?~-t12WKnRE4@As1no;+}*!NtdAvVtY}m_@T){gnk+fks8sc z1;l>IuRvA@ejRwE5-^E;_Cc~CZ=-Kg3ouFZ)_mY5V-tmlJrWF&!r+lK{|@j0zmTXO z-HWy0`|Uf8IuhG+eDl(&&UxwN+;l3F-x_hUkp+s!w&X8c)q#IC4(gl=V%s_peMkP3 zw|{=^hWroTf46nZFPCke@~h;|lYim3Ye3W?ePsv(MOpWY+uu9LvOh(9U<%5s%kYh5 z_@**^pAQ=-FY#gOGt2PGGTdB-?<&JzEyHum@HJ(aVY0gr4AEDY3j_fCoS=Uf33J72 z({YojjG1?=q;Rr{&6X={H=9Yze@8gIxm3pO61`R~m(2;s&84l3=&^bn2zI72Ns+S> zTe@=D9^qJ-q?;9{N&Qe8&$(t#Je5IBcTYCs)tF*gY{k-Mb3vpY_EdPkb0u99zHzA3G>9t+yHCW6w&=QP>9Y z6B2VY_AKIIi8(5pE*;w;F-K=FChnD(qqG}|H%ZLV+RKU8NX${&Yls^q=ICvP-dMfF z^n$&K*Z`jY_l<>j2i`xirhTp5i`cRS{_a?Bi-)kUWFc^}YuNuAnjRkU<9)Y7-Q4B) z8#q1T{=mpSC>HSLsgA-21IMS12E*iyAANPC_ySq`2&Md?(-no^9s2P4z|q%F=K~`z z%7$;~hJ}`JP&a<#)se!f;sLo_cict=B7cR{A1ZBwiASnf7kKp}SoX781QYtdUK?`N zSwqNyA!B`LGCbzsziW6H+;w-Z?>~M9-48{phuT6fa+~=rtr?A;U{+{5UWk@PqX#*u zqfx0CrcrDZR(d%jKos^Qp|-G>GgJD`=O{)G-$usdA{TS9Y8c)v1jD5dJ{uqR)Q@d~ z2B~yEJ1BM>E7XOlnC*~SU?d zPT4eMwcf5m^p8XN!-a-$p&j1Us*8-9()S>Eo~ciHrrzQ+buSjp7<(*M{Tgi5Wl&nH z`ixQ4F|4QkYak`(w3t6w-2O`O$2M4n!R7cLiXMg!3U@0TCNq&Gmvxx0p_in{HmJv}o%L1>-f9oml|DfuZ|-iB9oKMe%SdE187twYpuo*~S|^G&PwfrRg0s;|ZLy#@XZ5E03>=ZJr^P!hY5%m! zTMgtK%bTB$k1s*~JeY7GsYMYMKR5y**gqmKi333zJ2HJtP+_5gEiypY>fr}o{9ymG}3_S}X=3z(Tk$iF> z7{ZlVxHu)RM$YHaX~=my;gzNunEMv-$Dfa9pTYAcpUnCC6_ zc%Dj%2$3CkY!ONJWuQ;xZccGL8_xqKcsVOgc~$65yCRaxr10-rTk#K@Q($G2aW^g^ zmTh+B;yspWC(%+P)xwPDa`8UZLYMDNKn%*`J*fmb&O#ynBC;2yvD0xxB$4gu!5OUG z|37oaEMtYSCf~~dFrIWGkLd;w9x0`qe18Il0j!g}l>^KNX}Mj9ah~DwF763xxfbA4 zh)?#*wegInk86a9a->xtt`Ev_&AbM=6DV^Hp(tgzcGiQqZYak!b^rygEuARK#3xy< z56W?Ew4%{S%PudLPdSaPtDhW9QWq-eb;sFpItz{do$(@j6@N0b>1MvVz%W)0w zhMeumaX-;=yHTdC?1y{INyy!RvQCs^dKjeT46HW;jCaWJ5`9A1?}D_P;64V!a#{&^ zlw0X<+K3oP3{#%`WW8Fw=6+qpan6 zaXasY-0%hD_~6MqJlvt)|KT-{)GUGxCXnGJU1ZL=)u|T`EJxAt zwW#3xI@*AyGUomI8nNL_^i^nm5dA{pe#A=e&9i)OtFY>s`-{R#A@>o5l?S+AD6Cc^ z_XUMHqiX#t%pFUubA_dtJYyB+%2j8t!U$3%u1|%zLkYoksIYu!$NL_Qc~ek#1;uA1 ztM#KWf(41|L}7YP2(AZ(IV&pe73RsW?idQI9h-5iuv)qL46pQV7K}^9$7C@v{*Wr= z%>r?F7Efihj3?%mf;XIVsS-CF|GWjoKgT&@-G2Z(2U|3HtqLeBMz4EPFBM9#YyG36ge&N~-zKul3DiU^QsPq}?BqyCKN&j6zQ55RtV z*-j_6e;YveFQESfu=ZyF{`?eJ_fLK`JM{b)fInvd^SvP>bqefV;4{cT-74UEjE9jr zrDBpu0&D*pc=InWaNsd&l~!S@A&TnKIf0C#dgZ$-R#H6DgPj`muSypW%wx{Ho)KS!<2um4D%z4?vMWX z(8p){AhsaAA57tmC6RL-H{aD2N#OIq%I39ZY{j~E(-cW7XLY9>+(S*b$4sQN8Oy=T zlP^@6W-@Dbr?Z{$w27|{Ime9Ww+dYEdefF`B_oS&y15>jFCb*{qN%QpCa!|HKA|p} z$$U>wADZ}($@}SfqK=ir?RIWH*((iiUE9Du|s=1AvO!E3Mj=pxidoW{m;pI%H$-inoO{Rzh}z>h$Vze0Th^4Gw< z=ej8S$OE2}HSKsNN&Ct^Gs%xg=W8naW^@52Jwe~euTFlx`WWS}!Mwudo_D)?P5XYh z2={-lN`915@8A5b| literal 0 HcmV?d00001 diff --git a/project1/server-udp.c b/project1/server-udp.c new file mode 100644 index 00000000..74aeac56 --- /dev/null +++ b/project1/server-udp.c @@ -0,0 +1,70 @@ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include + + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ + +int +main(int argc, char** argv) +{ +/* CREATE THE SOCKET */ + + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int sockfd; /* Initialize our socket */ + socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ + +/* create a UDP/IP socket */ + + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + { + perror("cannot create socket"); + return 0; + } + +/* printf("created socket descriptor = %d\n", sockfd); */ + +/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + + servaddr.sin_family = AF_INET; + /* host-to-network-long conversion (htonl) */ + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + /* host-to-network-short conversion (htons) */ + servaddr.sin_port = htons(SERV_PORT); + + + if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } + +/* loop, listen for client, print received, reply to client */ + for(;;) { + printf("waiting for client message on port %d\n", SERV_PORT); + recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); + printf("heard %d bytes\n", recvlen); + if (recvlen > 0) { + buf[recvlen] = 0; + printf("I heard this: \"%s\"\n", buf); + } + else + printf("lost the connection to client\n"); + sprintf(buf, "Message #%d received\n", msgnum++); + printf("reply sent \"%s\"\n", buf); + if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) + perror("sendto"); + /* continues to loop, use "Ctrl+C" to terminate listening */ + + } +} diff --git a/project1/tags b/project1/tags new file mode 100644 index 00000000..70c8a768 --- /dev/null +++ b/project1/tags @@ -0,0 +1,7 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +main server-udp.c /^main(void)$/;" f From dbb4ab051bc4ab76b76ac82af0c6027ccf4a1743 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 19 May 2014 09:58:58 -0600 Subject: [PATCH 005/103] p1 v1.1 --- project1/Makefile | 7 ++++- project1/server-dtls | Bin 0 -> 7755 bytes project1/server-dtls.c | 69 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100755 project1/server-dtls create mode 100644 project1/server-dtls.c diff --git a/project1/Makefile b/project1/Makefile index cd005e38..a4c27b37 100644 --- a/project1/Makefile +++ b/project1/Makefile @@ -1,4 +1,6 @@ all: server-udp +all: server-dtls + #if you are on a sunOS (System V) machine, you'll need to uncomment #the next line. @@ -8,7 +10,10 @@ all: server-udp server-udp: server-udp.c $(CC) -o server-udp server-udp.c $(LIBS) +server-dtls: server-dtls.c + $(CC) -o server-dtls server-dtls.c $(LIBS) + .PHONY: clean clean: - -rm -f *.o server-udp + -rm -f *.o server-udp server-dtls diff --git a/project1/server-dtls b/project1/server-dtls new file mode 100755 index 0000000000000000000000000000000000000000..0f572e79f72d793cb78037c26714ed55e6309481 GIT binary patch literal 7755 zcmeHMeQ;FO6~CKoaK#WJM2kY}D=Z_lW(g1(RGcOx8$R3sLV|Ww9-G~lyp_%Fy6-I# z2Q4uKd4|>WgHD}kt+u0o*%>>EgNhw!DAA72pmi9=c1En)*;G2ksz@!8{(kqq2agq} z)Bm|UXYc*pbMCq4-h1xn`$06;76=4{7b--hkZ3R%YDDJ#%N3_lXyQ^aM|?|67ZZ?0 zUgI{%fHV{!RUt13sswcack~BCq^ZCp@{lbFkq{^==`y52EH7#mKQvj0&@Y1_QWFZb zf>>4+le}FnA=7e=GQaUkTKY z>cv{{{q~(g9*O1IzIo|X*SvJHKAp-GwnVIKWP#$bEcwe;b>d&OgF2^yShfztz9YZ= z?w223^2WNyN1ilrhS*n^3pfD!Il=y2B=i-l zb<0ksGJ3%>lETU+HW{`s?QAA3|1DwV@~Mp7EpkRapUn%)&Zmux=rwvR2zI41Ns%`a zo4fPbUSS!Tq@5MIPW@0D&)a%$Je5ICPj5Ek=ICNsY{k+ReLF^w@AJ%cgiG{$h8Fyl*vn8P?E z#C41>6{3ML{JW7cI&CrIYK$La)Vyxsc&M}x74?r)&Jbc~;Pm+T_~3rKs*yI zF(U2a-}v=Glp3EM!oS3`X{E{J*fA6vpG|8`^2QEJOsh@0`q+MnX}w7oAA43}w!+ki zpOBcXG3O8uOUzc8?9#Dq60>#YV&a^{Y^B*myisDd)?7}!Mq;+wTtnO>F5=!|4rz)J^ANcz~MT)el9hhuT9gahdrYtr?A;VC1wPccP`y=zb3B zXjCeOX%riUm2ONA5YFx-)H-`OGNm7$K{9&qW-=xhIhl)9!{}Wn7%qMI<@mU(erzK& zNTn~bf@0@Ur!GvzEQdJ6Txal3DlXnm#ivlXdo+5qLck14l_sF77kj=7x#(YzCsV}^ z%BCUf>Fsu+?+g_VI*nnc1HJ31F4AvGKZf9WratAGdZW+OJ(x6Otg%@2Td-A?L20e3 zGe%WMF`r&s11UMC#lrsL{jU~(VS?ohF30~+^dS1cxl`FdLD+)%3G=sxYaKgW=j?8! zbderhdJO7{laA7y=)R%oKBqcN?0592lTiWJ!j^%%9Yy%j@mb%g6mpQDgFcHAF}RZC$N-RuD{ z#@4_&hN36>57Ngs=y%-Zo4~`Jx6L14zpgYJjp-lx>`E+u$7c+s!wtpfs%g%fU!ai# zAtdJ>I&h|9@T7gMn#V(};l<8%9EcE-jU15ipS(=LfziMXpBLU8I5^{u4f$Y(~pv^R_lSIZ>EKJfB2L>*})&Yob`8sT|u(SvP7kXInET zigebpHQO|_L^hK#5_Sp-?5wMGqG)&3&Vm-~jYev-0mXSEm+sTBMcS?wcekYd(<^V% z5VI|B|9gCV3F7C``5O^)M1PK$KF1KaZ>xJ7*L>YKi^AUtz1vYS9L=!_#4%{8IHisqW?hbmiYYIg*iYw8B7R@F3AEU&3+ z9;vBqK2%fPJX#ZK{zFZWi^x{cHk9RxbunD*fr~wGu?M^!I6N2(Jqse{W=GlX26XU4P7;J(Sb*}eyHrbqlbFplElVG!>xT!*dz zF>sv}IJt2>GC^D$dENd7Xcy{bdOKp?wP+ac(2TK!Ws}IqlA5KRClI#*Bl&*^-k-ff zi?#Wj`OIOrGuZwyzg-BN+h3k1L zDI!E>+%iQZ*_VMn72A2macw*g=-}mzH04zym$pSDl}X{>Hn!j&HmAVKCgXNoL=02! z&c}NV-AtmShg1nYp3leoR0%JAcLHKi9`8*hP;nLt@fVS`D2-i~B_fGzZ!h*>ulxUJ zOrNE%(AVU<3;_Mf3*<4(0^v$2<>dPb7#gq_B@0E@#J$gtkSC{MzG+|_Bf|~s6UzPw}@#GmE-J#z9@XX`sptzU*Bhp|=Ij+IgUn6$}GOU;Scmb~c8o57%&#|DK zd{=~A$<0F~>*e@<0P^(l-RATK^wGvKpB&eC4nPy~yg(V!zd)Y8Cdf5Gj`etfG7P6c z%%^?4?JtL%$3xcH^p{9eUjs7{D3@1B`A;5+dkb}W;U&mTAj1t_k}=2D3prd^4x{34 zB7^UBv;jq>&-?W?VZph~m*MGy=vM;QBWAiU&+^??VO2BN7loBVt|JPo9^iVRu$qlr z7Zm1*s`;-lS1dKp6_#Rhk5!m6SM9wD!$}c1KNaQ*B?RZ8!t&CN_Z|=Pq@d0Uice2g z^G9Jg3j*hf!t6OAI3E<|s3^Zzm^;5ZV<@avZ2GanYUX--c%^%?pkFFJ28)6Ihfpa` z7VyKfcp9^%KQXQpJmH)Rl{n$}$1Ny69%qZa`U6-wSfa^oe}$MNBEUHxZU*+wRpj3W zEMKb-2T-~jG3PHL;HjdBm}fC!%0GsfXD;G^n4%tv2oPvbxqXL_f7LBuzcY|x)yu~nCmnk^w)?-%jADuhMzCPe7W)JqrN}+_!@Nn z6}Z)H&*c@<#6N-kZ|rA$^0cqkw-^xD6T`kZBDVkLGJbm*)`4SgeYF_>B>C=mv-~Dt z?l63rM$7lI>fxY_JA0PSn zEMJ8s$XgGl@WhhH+m>DE?v5nzd0=JBT0OR6U5BoVq>(pzQWnmky4|ZM(%Fn*;ql}v zS-PIg>OJXfS3Irbt3%$>0hO+`gg(Qa+CS zNFwxQvDHhPWBTg0wsp}Cy`y<)EJ}6qJ4(VTNQ?2UrlVay*F7EWE$p0*cvsqh?3Trg zB0Yw!=MuVY7BZV6U0Vdtz3QurP+xJHn$CTD(G7VlR=T}!IDP?s1+x4Z>JyMZ2mO1l zin6af;8|JSjAxRxuk1UM{EBqGrm~Ml7htj{*mv@?lb^4?M)`9vu;_BPce``Cc`v#M z7XUX)ew9)WaQ;&AyO%#hU%6Rd>-t_xI&N9;MfZc4UraqW`g3$0!{fOH$IbKL^G8j# F=D%8vw&MT* literal 0 HcmV?d00001 diff --git a/project1/server-dtls.c b/project1/server-dtls.c new file mode 100644 index 00000000..775af47e --- /dev/null +++ b/project1/server-dtls.c @@ -0,0 +1,69 @@ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include + + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ + +int +main(int argc, char** argv) +{ +/* CREATE THE SOCKET */ + + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int sockfd; /* Initialize our socket */ + socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ + +/* create a UDP/IP socket */ + + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + { + perror("cannot create socket"); + return 0; + } + +/* printf("created socket descriptor = %d\n", sockfd); */ + +/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + + servaddr.sin_family = AF_INET; + /* host-to-network-long conversion (htonl) */ + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + /* host-to-network-short conversion (htons) */ + servaddr.sin_port = htons(SERV_PORT); + + + if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } + +/* loop, listen for client, print received, reply to client */ + for(;;) { + printf("waiting for client message on port %d\n", SERV_PORT); + recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); + printf("heard %d bytes\n", recvlen); + if (recvlen > 0) { + buf[recvlen] = 0; + printf("I heard this: \"%s\"\n", buf); + } + else + printf("lost the connection to client\n"); + sprintf(buf, "Message #%d received\n", msgnum++); + printf("reply sent \"%s\"\n", buf); + if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) + perror("sendto"); + /* continues to loop, use "Ctrl+C" to terminate listening */ + } +} From 2f926f0c9b47960e58eba852b56f089d0ce74397 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 19 May 2014 17:42:03 -0600 Subject: [PATCH 006/103] P1 v1.2 --- project1/Makefile | 4 +- project1/certs/ca-cert.pem | 87 + project1/certs/server-cert.pem | 158 + project1/certs/server-key.pem | 27 + project1/cyassl-3.0.0/AUTHORS | 0 project1/cyassl-3.0.0/COPYING | 339 + project1/cyassl-3.0.0/ChangeLog | 0 .../IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s | 338 + .../IDE/MDK-ARM/LPC43xx/time-LCP43xx.c | 166 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c | 261 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c | 28 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h | 39 + .../MDK-ARM/CyaSSL/config-BARE-METAL.h | 291 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h | 329 + .../MDK-ARM/CyaSSL/config-RTX-TCP-FS.h | 351 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h | 46 + .../MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c | 249 + .../MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h | 103 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c | 172 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c | 595 + .../IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c | 53 + .../IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini | 22 + .../IDE/MDK-ARM/MDK-ARM/config/File_Config.c | 401 + .../IDE/MDK-ARM/MDK-ARM/config/Net_Config.c | 892 + .../IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c | 139 + .../IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c | 205 + .../IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini | 36 + .../MDK-ARM/config/startup_stm32f2xx.s | 419 + .../MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt | 1757 + .../MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj | 3510 ++ .../MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt | 1656 + .../MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj | 3964 +++ .../STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c | 299 + .../IDE/MDK5-ARM/Docs/CyaSSL-License.txt | 292 + .../Docs/CyaSSLManual-TableofContents.htm | 1 + .../CyaSSLManual-wolfCryptUsageReference.htm | 1 + .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c | 28 + .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h | 39 + .../MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c | 247 + .../MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h | 106 + .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c | 52 + .../Projects/CryptBenchmark/Abstract.txt | 15 + .../CryptBenchmark/CryptBenchmark.uvoptx | 1094 + .../CryptBenchmark/CryptBenchmark.uvprojx | 917 + .../CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../CryptBenchmark/RTE/RTE_Components.h | 19 + .../Projects/CryptBenchmark/STM32_SWO.ini | 36 + .../Projects/CryptBenchmark/benchmark.c | 1106 + .../MDK5-ARM/Projects/CryptBenchmark/main.c | 71 + .../MDK5-ARM/Projects/CryptTest/Abstract.txt | 16 + .../Projects/CryptTest/CryptTest.uvoptx | 1094 + .../Projects/CryptTest/CryptTest.uvprojx | 919 + .../CryptTest/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../CryptTest/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../Projects/CryptTest/RTE/RTE_Components.h | 19 + .../MDK5-ARM/Projects/CryptTest/STM32_SWO.ini | 36 + .../IDE/MDK5-ARM/Projects/CryptTest/main.c | 71 + .../IDE/MDK5-ARM/Projects/CryptTest/test.c | 3712 +++ .../Projects/CyaSSL-Full/Abstract.txt | 89 + .../Projects/CyaSSL-Full/CyaSSL-Full.uvoptx | 1530 + .../Projects/CyaSSL-Full/CyaSSL-Full.uvprojx | 1122 + .../CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../CyaSSL-Full/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../CyaSSL-Full/RTE/Network/Net_Config.c | 153 + .../CyaSSL-Full/RTE/Network/Net_Config_BSD.h | 36 + .../RTE/Network/Net_Config_DNS_Client.h | 20 + .../RTE/Network/Net_Config_ETH_0.h | 222 + .../CyaSSL-Full/RTE/Network/Net_Config_TCP.h | 61 + .../CyaSSL-Full/RTE/Network/Net_Config_UDP.h | 20 + .../CyaSSL-Full/RTE/Network/Net_Debug.c | 125 + .../Projects/CyaSSL-Full/RTE/RTE_Components.h | 28 + .../Projects/CyaSSL-Full/STM32_SWO.ini | 36 + .../MDK5-ARM/Projects/CyaSSL-Full/benchmark.c | 1064 + .../MDK5-ARM/Projects/CyaSSL-Full/cert_data.c | 28 + .../MDK5-ARM/Projects/CyaSSL-Full/client.c | 756 + .../Projects/CyaSSL-Full/echoclient.c | 287 + .../Projects/CyaSSL-Full/echoserver.c | 370 + .../IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c | 94 + .../MDK5-ARM/Projects/CyaSSL-Full/server.c | 561 + .../IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c | 661 + .../IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c | 3393 ++ .../MDK5-ARM/Projects/EchoClient/Abstract.txt | 22 + .../Projects/EchoClient/EchoClient.uvoptx | 1422 + .../Projects/EchoClient/EchoClient.uvprojx | 1106 + .../EchoClient/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../EchoClient/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../EchoClient/RTE/Network/Net_Config.c | 153 + .../EchoClient/RTE/Network/Net_Config_BSD.h | 36 + .../RTE/Network/Net_Config_DNS_Client.h | 20 + .../EchoClient/RTE/Network/Net_Config_ETH_0.h | 222 + .../EchoClient/RTE/Network/Net_Config_TCP.h | 61 + .../EchoClient/RTE/Network/Net_Config_UDP.h | 20 + .../EchoClient/RTE/Network/Net_Debug.c | 125 + .../Projects/EchoClient/RTE/RTE_Components.h | 28 + .../Projects/EchoClient/STM32_SWO.ini | 36 + .../MDK5-ARM/Projects/EchoClient/echoclient.c | 287 + .../IDE/MDK5-ARM/Projects/EchoClient/main.c | 101 + .../MDK5-ARM/Projects/EchoServer/Abstract.txt | 24 + .../Projects/EchoServer/EchoServer.uvoptx | 1406 + .../Projects/EchoServer/EchoServer.uvprojx | 1101 + .../EchoServer/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../EchoServer/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../EchoServer/RTE/Network/Net_Config.c | 153 + .../EchoServer/RTE/Network/Net_Config_BSD.h | 36 + .../RTE/Network/Net_Config_DNS_Client.h | 20 + .../EchoServer/RTE/Network/Net_Config_ETH_0.h | 222 + .../EchoServer/RTE/Network/Net_Config_TCP.h | 61 + .../EchoServer/RTE/Network/Net_Config_UDP.h | 20 + .../EchoServer/RTE/Network/Net_Debug.c | 125 + .../Projects/EchoServer/RTE/RTE_Components.h | 28 + .../Projects/EchoServer/STM32_SWO.ini | 36 + .../MDK5-ARM/Projects/EchoServer/echoserver.c | 370 + .../IDE/MDK5-ARM/Projects/EchoServer/main.c | 99 + .../Projects/SimpleClient/Abstract.txt | 22 + .../SimpleClient/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../SimpleClient/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../SimpleClient/RTE/Network/Net_Config.c | 153 + .../SimpleClient/RTE/Network/Net_Config_BSD.h | 36 + .../RTE/Network/Net_Config_DNS_Client.h | 20 + .../RTE/Network/Net_Config_ETH_0.h | 222 + .../SimpleClient/RTE/Network/Net_Config_TCP.h | 61 + .../SimpleClient/RTE/Network/Net_Config_UDP.h | 20 + .../SimpleClient/RTE/Network/Net_Debug.c | 125 + .../SimpleClient/RTE/RTE_Components.h | 28 + .../Projects/SimpleClient/STM32_SWO.ini | 36 + .../Projects/SimpleClient/SimpleClient.uvoptx | 1422 + .../MDK5-ARM/Projects/SimpleClient/client.c | 758 + .../IDE/MDK5-ARM/Projects/SimpleClient/main.c | 115 + .../SimpleClient/simpleClient.uvprojx | 1106 + .../Projects/SimpleServer/Abstract.txt | 23 + .../SimpleServer/RTE/CMSIS/RTX_Conf_CM.c | 276 + .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 ++ .../Device/STM32F207IG/startup_stm32f2xx.s | 419 + .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 + .../SimpleServer/RTE/File_System/FS_Config.c | 72 + .../RTE/File_System/FS_Config_MC_0.h | 57 + .../SimpleServer/RTE/Network/Net_Config.c | 153 + .../SimpleServer/RTE/Network/Net_Config_BSD.h | 36 + .../RTE/Network/Net_Config_DNS_Client.h | 20 + .../RTE/Network/Net_Config_ETH_0.h | 222 + .../SimpleServer/RTE/Network/Net_Config_TCP.h | 61 + .../SimpleServer/RTE/Network/Net_Config_UDP.h | 20 + .../SimpleServer/RTE/Network/Net_Debug.c | 125 + .../SimpleServer/RTE/RTE_Components.h | 28 + .../Projects/SimpleServer/STM32_SWO.ini | 36 + .../Projects/SimpleServer/SimpleServer.uvoptx | 1406 + .../SimpleServer/SimpleServer.uvprojx | 1101 + .../IDE/MDK5-ARM/Projects/SimpleServer/main.c | 104 + .../MDK5-ARM/Projects/SimpleServer/server.c | 560 + .../STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c | 299 + .../IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc | 281 + project1/cyassl-3.0.0/Makefile | 3049 ++ project1/cyassl-3.0.0/Makefile.am | 142 + project1/cyassl-3.0.0/Makefile.in | 3049 ++ project1/cyassl-3.0.0/NEWS | 0 project1/cyassl-3.0.0/README | 996 + project1/cyassl-3.0.0/aclocal.m4 | 1195 + project1/cyassl-3.0.0/aminclude.am | 5 + project1/cyassl-3.0.0/autom4te.cache/output.0 | 27349 ++++++++++++++++ project1/cyassl-3.0.0/autom4te.cache/requests | 80 + project1/cyassl-3.0.0/autom4te.cache/traces.0 | 1332 + project1/cyassl-3.0.0/build-aux/compile | 347 + project1/cyassl-3.0.0/build-aux/config.guess | 1568 + project1/cyassl-3.0.0/build-aux/config.sub | 1793 + project1/cyassl-3.0.0/build-aux/depcomp | 791 + project1/cyassl-3.0.0/build-aux/install-sh | 527 + project1/cyassl-3.0.0/build-aux/ltmain.sh | 9655 ++++++ project1/cyassl-3.0.0/build-aux/missing | 215 + project1/cyassl-3.0.0/build-aux/test-driver | 139 + .../cyassl-3.0.0/certs/1024/client-cert.der | Bin 0 -> 752 bytes .../cyassl-3.0.0/certs/1024/client-cert.pem | 59 + .../cyassl-3.0.0/certs/1024/client-key.der | Bin 0 -> 608 bytes .../cyassl-3.0.0/certs/1024/client-key.pem | 15 + project1/cyassl-3.0.0/certs/1024/dh1024.der | Bin 0 -> 138 bytes project1/cyassl-3.0.0/certs/1024/dh1024.pem | 17 + project1/cyassl-3.0.0/certs/1024/dsa1024.der | Bin 0 -> 448 bytes project1/cyassl-3.0.0/certs/1024/dsa1024.pem | 12 + project1/cyassl-3.0.0/certs/1024/include.am | 17 + project1/cyassl-3.0.0/certs/1024/rsa1024.der | Bin 0 -> 609 bytes project1/cyassl-3.0.0/certs/ca-cert.pem | 87 + project1/cyassl-3.0.0/certs/ca-key.der | Bin 0 -> 1192 bytes project1/cyassl-3.0.0/certs/ca-key.pem | 27 + project1/cyassl-3.0.0/certs/client-cert.der | Bin 0 -> 1180 bytes project1/cyassl-3.0.0/certs/client-cert.pem | 87 + .../cyassl-3.0.0/certs/client-ecc-cert.pem | 54 + project1/cyassl-3.0.0/certs/client-key.der | Bin 0 -> 1192 bytes project1/cyassl-3.0.0/certs/client-key.pem | 27 + project1/cyassl-3.0.0/certs/client-keyEnc.pem | 12 + project1/cyassl-3.0.0/certs/crl/cliCrl.pem | 41 + project1/cyassl-3.0.0/certs/crl/crl.pem | 39 + project1/cyassl-3.0.0/certs/crl/crl.revoked | 41 + project1/cyassl-3.0.0/certs/crl/eccCliCRL.pem | 26 + project1/cyassl-3.0.0/certs/crl/eccSrvCRL.pem | 26 + project1/cyassl-3.0.0/certs/crl/include.am | 14 + project1/cyassl-3.0.0/certs/dh2048.der | Bin 0 -> 268 bytes project1/cyassl-3.0.0/certs/dh2048.pem | 29 + project1/cyassl-3.0.0/certs/dsa2048.der | Bin 0 -> 835 bytes .../cyassl-3.0.0/certs/ecc-client-key.pem | 9 + project1/cyassl-3.0.0/certs/ecc-key.der | Bin 0 -> 121 bytes project1/cyassl-3.0.0/certs/ecc-key.pem | 9 + project1/cyassl-3.0.0/certs/ecc-keyPkcs8.pem | 5 + project1/cyassl-3.0.0/certs/include.am | 40 + project1/cyassl-3.0.0/certs/ntru-cert.pem | 28 + project1/cyassl-3.0.0/certs/ntru-key.raw | Bin 0 -> 607 bytes project1/cyassl-3.0.0/certs/rsa2048.der | Bin 0 -> 1191 bytes project1/cyassl-3.0.0/certs/server-cert.pem | 158 + .../cyassl-3.0.0/certs/server-ecc-rsa.pem | 54 + project1/cyassl-3.0.0/certs/server-ecc.pem | 55 + project1/cyassl-3.0.0/certs/server-key.pem | 27 + project1/cyassl-3.0.0/certs/server-keyEnc.pem | 30 + .../cyassl-3.0.0/certs/server-keyPkcs8.pem | 28 + .../cyassl-3.0.0/certs/server-keyPkcs8Enc.pem | 29 + .../certs/server-keyPkcs8Enc12.pem | 29 + .../certs/server-keyPkcs8Enc2.pem | 30 + project1/cyassl-3.0.0/certs/taoCert.txt | 173 + project1/cyassl-3.0.0/config.h | 176 + project1/cyassl-3.0.0/config.in | 175 + project1/cyassl-3.0.0/config.log | 2438 ++ project1/cyassl-3.0.0/config.status | 2415 ++ project1/cyassl-3.0.0/configure | 27349 ++++++++++++++++ project1/cyassl-3.0.0/configure.ac | 1782 + .../ctaocrypt/benchmark/.deps/.dirstamp | 0 .../ctaocrypt/benchmark/.deps/benchmark.Po | 194 + .../ctaocrypt/benchmark/.dirstamp | 0 .../ctaocrypt/benchmark/.libs/benchmark | Bin 0 -> 17091 bytes .../ctaocrypt/benchmark/benchmark | 228 + .../ctaocrypt/benchmark/benchmark.c | 1222 + .../ctaocrypt/benchmark/benchmark.o | Bin 0 -> 10084 bytes .../ctaocrypt/benchmark/benchmark.sln | 20 + .../ctaocrypt/benchmark/benchmark.vcproj | 195 + .../ctaocrypt/benchmark/include.am | 10 + .../ctaocrypt/src/.deps/.dirstamp | 0 .../src/.deps/src_libcyassl_la-aes.Plo | 117 + .../src/.deps/src_libcyassl_la-arc4.Plo | 107 + .../src/.deps/src_libcyassl_la-asn.Plo | 173 + .../src/.deps/src_libcyassl_la-blake2b.Plo | 1 + .../src/.deps/src_libcyassl_la-camellia.Plo | 1 + .../src/.deps/src_libcyassl_la-coding.Plo | 112 + .../src/.deps/src_libcyassl_la-compress.Plo | 1 + .../src/.deps/src_libcyassl_la-des3.Plo | 114 + .../src/.deps/src_libcyassl_la-dh.Plo | 162 + .../src/.deps/src_libcyassl_la-dsa.Plo | 1 + .../src/.deps/src_libcyassl_la-ecc.Plo | 169 + .../src/.deps/src_libcyassl_la-error.Plo | 107 + .../src/.deps/src_libcyassl_la-fips.Plo | 1 + .../src/.deps/src_libcyassl_la-fips_test.Plo | 1 + .../src/.deps/src_libcyassl_la-hc128.Plo | 1 + .../src/.deps/src_libcyassl_la-hmac.Plo | 116 + .../src/.deps/src_libcyassl_la-integer.Plo | 128 + .../src/.deps/src_libcyassl_la-logging.Plo | 110 + .../src/.deps/src_libcyassl_la-md2.Plo | 1 + .../src/.deps/src_libcyassl_la-md4.Plo | 1 + .../src/.deps/src_libcyassl_la-md5.Plo | 111 + .../src/.deps/src_libcyassl_la-memory.Plo | 109 + .../src/.deps/src_libcyassl_la-misc.Plo | 1 + .../src/.deps/src_libcyassl_la-pkcs7.Plo | 1 + .../src/.deps/src_libcyassl_la-port.Plo | 107 + .../src/.deps/src_libcyassl_la-pwdbased.Plo | 148 + .../src/.deps/src_libcyassl_la-rabbit.Plo | 1 + .../src/.deps/src_libcyassl_la-random.Plo | 136 + .../src/.deps/src_libcyassl_la-ripemd.Plo | 1 + .../src/.deps/src_libcyassl_la-rsa.Plo | 141 + .../src/.deps/src_libcyassl_la-sha.Plo | 111 + .../src/.deps/src_libcyassl_la-sha256.Plo | 114 + .../src/.deps/src_libcyassl_la-sha512.Plo | 1 + .../src/.deps/src_libcyassl_la-tfm.Plo | 1 + project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp | 0 .../src/.libs/src_libcyassl_la-aes.o | Bin 0 -> 16548 bytes .../src/.libs/src_libcyassl_la-arc4.o | Bin 0 -> 1228 bytes .../src/.libs/src_libcyassl_la-asn.o | Bin 0 -> 21760 bytes .../src/.libs/src_libcyassl_la-coding.o | Bin 0 -> 1640 bytes .../src/.libs/src_libcyassl_la-des3.o | Bin 0 -> 6292 bytes .../ctaocrypt/src/.libs/src_libcyassl_la-dh.o | Bin 0 -> 2456 bytes .../src/.libs/src_libcyassl_la-error.o | Bin 0 -> 9992 bytes .../src/.libs/src_libcyassl_la-hmac.o | Bin 0 -> 2680 bytes .../src/.libs/src_libcyassl_la-integer.o | Bin 0 -> 24188 bytes .../src/.libs/src_libcyassl_la-logging.o | Bin 0 -> 822 bytes .../src/.libs/src_libcyassl_la-md5.o | Bin 0 -> 3048 bytes .../src/.libs/src_libcyassl_la-memory.o | Bin 0 -> 1348 bytes .../src/.libs/src_libcyassl_la-port.o | Bin 0 -> 1280 bytes .../src/.libs/src_libcyassl_la-random.o | Bin 0 -> 1924 bytes .../src/.libs/src_libcyassl_la-rsa.o | Bin 0 -> 4128 bytes .../src/.libs/src_libcyassl_la-sha.o | Bin 0 -> 5448 bytes .../src/.libs/src_libcyassl_la-sha256.o | Bin 0 -> 3352 bytes project1/cyassl-3.0.0/ctaocrypt/src/aes.c | 3496 ++ project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s | 814 + project1/cyassl-3.0.0/ctaocrypt/src/arc4.c | 179 + project1/cyassl-3.0.0/ctaocrypt/src/asm.c | 1406 + project1/cyassl-3.0.0/ctaocrypt/src/asn.c | 6981 ++++ project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c | 433 + .../cyassl-3.0.0/ctaocrypt/src/camellia.c | 1621 + project1/cyassl-3.0.0/ctaocrypt/src/coding.c | 399 + .../cyassl-3.0.0/ctaocrypt/src/compress.c | 169 + project1/cyassl-3.0.0/ctaocrypt/src/des3.c | 1422 + project1/cyassl-3.0.0/ctaocrypt/src/dh.c | 178 + project1/cyassl-3.0.0/ctaocrypt/src/dsa.c | 226 + project1/cyassl-3.0.0/ctaocrypt/src/ecc.c | 4140 +++ project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c | 1 + project1/cyassl-3.0.0/ctaocrypt/src/error.c | 365 + project1/cyassl-3.0.0/ctaocrypt/src/fips.c | 0 .../cyassl-3.0.0/ctaocrypt/src/fips_test.c | 0 .../ctaocrypt/src/fp_mont_small.i | 3860 +++ .../ctaocrypt/src/fp_mul_comba_12.i | 130 + .../ctaocrypt/src/fp_mul_comba_17.i | 170 + .../ctaocrypt/src/fp_mul_comba_20.i | 193 + .../ctaocrypt/src/fp_mul_comba_24.i | 226 + .../ctaocrypt/src/fp_mul_comba_28.i | 258 + .../ctaocrypt/src/fp_mul_comba_3.i | 58 + .../ctaocrypt/src/fp_mul_comba_32.i | 304 + .../ctaocrypt/src/fp_mul_comba_4.i | 66 + .../ctaocrypt/src/fp_mul_comba_48.i | 418 + .../ctaocrypt/src/fp_mul_comba_6.i | 82 + .../ctaocrypt/src/fp_mul_comba_64.i | 546 + .../ctaocrypt/src/fp_mul_comba_7.i | 90 + .../ctaocrypt/src/fp_mul_comba_8.i | 98 + .../ctaocrypt/src/fp_mul_comba_9.i | 106 + .../ctaocrypt/src/fp_mul_comba_small_set.i | 1250 + .../ctaocrypt/src/fp_sqr_comba_12.i | 159 + .../ctaocrypt/src/fp_sqr_comba_17.i | 210 + .../ctaocrypt/src/fp_sqr_comba_20.i | 240 + .../ctaocrypt/src/fp_sqr_comba_24.i | 280 + .../ctaocrypt/src/fp_sqr_comba_28.i | 320 + .../ctaocrypt/src/fp_sqr_comba_3.i | 70 + .../ctaocrypt/src/fp_sqr_comba_32.i | 360 + .../ctaocrypt/src/fp_sqr_comba_4.i | 80 + .../ctaocrypt/src/fp_sqr_comba_48.i | 520 + .../ctaocrypt/src/fp_sqr_comba_6.i | 100 + .../ctaocrypt/src/fp_sqr_comba_64.i | 680 + .../ctaocrypt/src/fp_sqr_comba_7.i | 110 + .../ctaocrypt/src/fp_sqr_comba_8.i | 120 + .../ctaocrypt/src/fp_sqr_comba_9.i | 130 + .../ctaocrypt/src/fp_sqr_comba_small_set.i | 1540 + project1/cyassl-3.0.0/ctaocrypt/src/hc128.c | 399 + project1/cyassl-3.0.0/ctaocrypt/src/hmac.c | 820 + .../cyassl-3.0.0/ctaocrypt/src/include.am | 39 + project1/cyassl-3.0.0/ctaocrypt/src/integer.c | 4488 +++ project1/cyassl-3.0.0/ctaocrypt/src/logging.c | 162 + project1/cyassl-3.0.0/ctaocrypt/src/md2.c | 131 + project1/cyassl-3.0.0/ctaocrypt/src/md4.c | 219 + project1/cyassl-3.0.0/ctaocrypt/src/md5.c | 364 + project1/cyassl-3.0.0/ctaocrypt/src/memory.c | 183 + project1/cyassl-3.0.0/ctaocrypt/src/misc.c | 170 + project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c | 1391 + project1/cyassl-3.0.0/ctaocrypt/src/port.c | 436 + .../cyassl-3.0.0/ctaocrypt/src/pwdbased.c | 474 + project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c | 310 + project1/cyassl-3.0.0/ctaocrypt/src/random.c | 845 + project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c | 354 + project1/cyassl-3.0.0/ctaocrypt/src/rsa.c | 834 + project1/cyassl-3.0.0/ctaocrypt/src/sha.c | 395 + project1/cyassl-3.0.0/ctaocrypt/src/sha256.c | 287 + project1/cyassl-3.0.0/ctaocrypt/src/sha512.c | 475 + .../ctaocrypt/src/src_libcyassl_la-aes.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-arc4.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-asn.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-coding.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-des3.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-dh.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-error.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-hmac.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-integer.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-logging.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-md5.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-memory.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-port.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-random.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-rsa.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-sha.lo | 12 + .../ctaocrypt/src/src_libcyassl_la-sha256.lo | 12 + project1/cyassl-3.0.0/ctaocrypt/src/tfm.c | 2514 ++ .../ctaocrypt/test/.deps/.dirstamp | 0 .../cyassl-3.0.0/ctaocrypt/test/.deps/test.Po | 202 + .../.deps/testsuite_testsuite_test-test.Po | 202 + .../cyassl-3.0.0/ctaocrypt/test/.dirstamp | 0 .../ctaocrypt/test/.libs/testctaocrypt | Bin 0 -> 22418 bytes .../cyassl-3.0.0/ctaocrypt/test/include.am | 11 + project1/cyassl-3.0.0/ctaocrypt/test/test.c | 4758 +++ project1/cyassl-3.0.0/ctaocrypt/test/test.h | 33 + project1/cyassl-3.0.0/ctaocrypt/test/test.o | Bin 0 -> 15008 bytes project1/cyassl-3.0.0/ctaocrypt/test/test.sln | 20 + .../cyassl-3.0.0/ctaocrypt/test/test.vcproj | 195 + .../cyassl-3.0.0/ctaocrypt/test/testctaocrypt | 228 + .../test/testsuite_testsuite_test-test.o | Bin 0 -> 14932 bytes project1/cyassl-3.0.0/cyassl-config | 117 + .../cyassl-ios.xcodeproj/project.pbxproj | 383 + .../cyassl-iphone.xcodeproj/project.pbxproj | 379 + project1/cyassl-3.0.0/cyassl-ntru.sln | 65 + project1/cyassl-3.0.0/cyassl-ntru.vcproj | 313 + project1/cyassl-3.0.0/cyassl.sln | 74 + project1/cyassl-3.0.0/cyassl.vcproj | 306 + project1/cyassl-3.0.0/cyassl/callbacks.h | 80 + project1/cyassl-3.0.0/cyassl/certs_test.h | 800 + project1/cyassl-3.0.0/cyassl/crl.h | 51 + project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h | 180 + project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h | 68 + project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h | 704 + .../cyassl/ctaocrypt/asn_public.h | 177 + .../cyassl/ctaocrypt/blake2-impl.h | 154 + .../cyassl/ctaocrypt/blake2-int.h | 183 + .../cyassl-3.0.0/cyassl/ctaocrypt/blake2.h | 60 + .../cyassl-3.0.0/cyassl/ctaocrypt/camellia.h | 96 + .../cyassl-3.0.0/cyassl/ctaocrypt/coding.h | 58 + .../cyassl-3.0.0/cyassl/ctaocrypt/compress.h | 52 + project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h | 137 + project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h | 67 + project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h | 67 + project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h | 182 + .../cyassl/ctaocrypt/error-crypt.h | 141 + .../cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h | 43 + .../cyassl-3.0.0/cyassl/ctaocrypt/hc128.h | 60 + project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h | 199 + .../cyassl-3.0.0/cyassl/ctaocrypt/include.am | 45 + .../cyassl-3.0.0/cyassl/ctaocrypt/integer.h | 317 + .../cyassl-3.0.0/cyassl/ctaocrypt/logging.h | 70 + project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h | 64 + project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h | 65 + project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h | 72 + .../cyassl-3.0.0/cyassl/ctaocrypt/memory.h | 55 + project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h | 72 + .../cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h | 1018 + .../cyassl/ctaocrypt/mpi_superclass.h | 95 + .../cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h | 123 + project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h | 194 + .../cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h | 53 + .../cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h | 65 + .../cyassl-3.0.0/cyassl/ctaocrypt/random.h | 119 + .../cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h | 64 + project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h | 142 + .../cyassl-3.0.0/cyassl/ctaocrypt/settings.h | 667 + project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h | 91 + .../cyassl-3.0.0/cyassl/ctaocrypt/sha256.h | 90 + .../cyassl-3.0.0/cyassl/ctaocrypt/sha512.h | 118 + project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h | 694 + .../cyassl-3.0.0/cyassl/ctaocrypt/types.h | 328 + .../cyassl/ctaocrypt/visibility.h | 69 + project1/cyassl-3.0.0/cyassl/error-ssl.h | 149 + project1/cyassl-3.0.0/cyassl/include.am | 25 + project1/cyassl-3.0.0/cyassl/internal.h | 2143 ++ project1/cyassl-3.0.0/cyassl/ocsp.h | 52 + project1/cyassl-3.0.0/cyassl/openssl/asn1.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/bio.h | 23 + project1/cyassl-3.0.0/cyassl/openssl/bn.h | 115 + project1/cyassl-3.0.0/cyassl/openssl/conf.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/crypto.h | 26 + project1/cyassl-3.0.0/cyassl/openssl/des.h | 87 + project1/cyassl-3.0.0/cyassl/openssl/dh.h | 52 + project1/cyassl-3.0.0/cyassl/openssl/dsa.h | 53 + project1/cyassl-3.0.0/cyassl/openssl/ec.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/engine.h | 5 + project1/cyassl-3.0.0/cyassl/openssl/err.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/evp.h | 241 + project1/cyassl-3.0.0/cyassl/openssl/hmac.h | 81 + .../cyassl-3.0.0/cyassl/openssl/include.am | 36 + project1/cyassl-3.0.0/cyassl/openssl/lhash.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/md4.h | 1 + project1/cyassl-3.0.0/cyassl/openssl/md5.h | 39 + project1/cyassl-3.0.0/cyassl/openssl/ocsp.h | 1 + .../cyassl-3.0.0/cyassl/openssl/opensslconf.h | 8 + .../cyassl-3.0.0/cyassl/openssl/opensslv.h | 12 + .../cyassl-3.0.0/cyassl/openssl/ossl_typ.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/pem.h | 41 + project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/rand.h | 4 + project1/cyassl-3.0.0/cyassl/openssl/ripemd.h | 37 + project1/cyassl-3.0.0/cyassl/openssl/rsa.h | 75 + project1/cyassl-3.0.0/cyassl/openssl/sha.h | 125 + project1/cyassl-3.0.0/cyassl/openssl/ssl.h | 380 + project1/cyassl-3.0.0/cyassl/openssl/stack.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/ui.h | 2 + project1/cyassl-3.0.0/cyassl/openssl/x509.h | 3 + project1/cyassl-3.0.0/cyassl/openssl/x509v3.h | 2 + project1/cyassl-3.0.0/cyassl/options.h | 53 + project1/cyassl-3.0.0/cyassl/options.h.in | 34 + project1/cyassl-3.0.0/cyassl/sniffer.h | 74 + project1/cyassl-3.0.0/cyassl/sniffer_error.h | 110 + project1/cyassl-3.0.0/cyassl/sniffer_error.rc | 88 + project1/cyassl-3.0.0/cyassl/ssl.h | 1304 + project1/cyassl-3.0.0/cyassl/test.h | 1730 + project1/cyassl-3.0.0/cyassl/version.h | 35 + project1/cyassl-3.0.0/cyassl/version.h.in | 35 + project1/cyassl-3.0.0/doc/README.txt | 3 + project1/cyassl-3.0.0/doc/include.am | 5 + .../examples/client/.deps/.dirstamp | 0 .../examples/client/.deps/client.Po | 268 + .../client/.deps/tests_unit_test-client.Po | 269 + .../.deps/testsuite_testsuite_test-client.Po | 269 + .../cyassl-3.0.0/examples/client/.dirstamp | 0 .../cyassl-3.0.0/examples/client/.libs/client | Bin 0 -> 23479 bytes project1/cyassl-3.0.0/examples/client/client | 228 + .../examples/client/client-ntru.vcproj | 199 + .../cyassl-3.0.0/examples/client/client.c | 851 + .../cyassl-3.0.0/examples/client/client.h | 25 + .../cyassl-3.0.0/examples/client/client.o | Bin 0 -> 18448 bytes .../cyassl-3.0.0/examples/client/client.sln | 20 + .../examples/client/client.vcproj | 197 + .../cyassl-3.0.0/examples/client/include.am | 16 + .../examples/client/tests_unit_test-client.o | Bin 0 -> 16512 bytes .../client/testsuite_testsuite_test-client.o | Bin 0 -> 16512 bytes .../examples/echoclient/.deps/.dirstamp | 0 .../examples/echoclient/.deps/echoclient.Po | 272 + .../testsuite_testsuite_test-echoclient.Po | 272 + .../examples/echoclient/.dirstamp | 0 .../examples/echoclient/.libs/echoclient | Bin 0 -> 12910 bytes .../examples/echoclient/echoclient | 228 + .../echoclient/echoclient-ntru.vcproj | 199 + .../examples/echoclient/echoclient.c | 274 + .../examples/echoclient/echoclient.h | 23 + .../examples/echoclient/echoclient.o | Bin 0 -> 4976 bytes .../examples/echoclient/echoclient.sln | 20 + .../examples/echoclient/echoclient.vcproj | 197 + .../examples/echoclient/include.am | 19 + .../testsuite_testsuite_test-echoclient.o | Bin 0 -> 3872 bytes .../examples/echoserver/.deps/.dirstamp | 0 .../examples/echoserver/.deps/echoserver.Po | 270 + .../testsuite_testsuite_test-echoserver.Po | 270 + .../examples/echoserver/.dirstamp | 0 .../examples/echoserver/.libs/echoserver | Bin 0 -> 13134 bytes .../examples/echoserver/echoserver | 228 + .../echoserver/echoserver-ntru.vcproj | 199 + .../examples/echoserver/echoserver.c | 360 + .../examples/echoserver/echoserver.h | 24 + .../examples/echoserver/echoserver.o | Bin 0 -> 6876 bytes .../examples/echoserver/echoserver.sln | 20 + .../examples/echoserver/echoserver.vcproj | 197 + .../examples/echoserver/include.am | 18 + .../testsuite_testsuite_test-echoserver.o | Bin 0 -> 5868 bytes .../examples/server/.deps/.dirstamp | 0 .../examples/server/.deps/server.Po | 271 + .../server/.deps/tests_unit_test-server.Po | 271 + .../.deps/testsuite_testsuite_test-server.Po | 271 + .../cyassl-3.0.0/examples/server/.dirstamp | 0 .../cyassl-3.0.0/examples/server/.libs/server | Bin 0 -> 23201 bytes .../cyassl-3.0.0/examples/server/include.am | 19 + project1/cyassl-3.0.0/examples/server/server | 228 + .../examples/server/server-ntru.vcproj | 199 + .../cyassl-3.0.0/examples/server/server.c | 602 + .../cyassl-3.0.0/examples/server/server.h | 24 + .../cyassl-3.0.0/examples/server/server.o | Bin 0 -> 14940 bytes .../cyassl-3.0.0/examples/server/server.sln | 20 + .../examples/server/server.vcproj | 197 + .../examples/server/tests_unit_test-server.o | Bin 0 -> 13432 bytes .../server/testsuite_testsuite_test-server.o | Bin 0 -> 13432 bytes project1/cyassl-3.0.0/gencertbuf.pl | 110 + project1/cyassl-3.0.0/input | 87 + project1/cyassl-3.0.0/lib/dummy | 2 + project1/cyassl-3.0.0/libtool | 10240 ++++++ project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 | 29 + project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 | 55 + project1/cyassl-3.0.0/m4/ax_am_macros.m4 | 44 + .../m4/ax_append_compile_flags.m4 | 65 + project1/cyassl-3.0.0/m4/ax_append_flag.m4 | 69 + project1/cyassl-3.0.0/m4/ax_append_to_file.m4 | 27 + .../cyassl-3.0.0/m4/ax_check_compile_flag.m4 | 72 + .../cyassl-3.0.0/m4/ax_check_link_flag.m4 | 71 + project1/cyassl-3.0.0/m4/ax_count_cpus.m4 | 57 + .../m4/ax_create_generic_config.m4 | 195 + project1/cyassl-3.0.0/m4/ax_debug.m4 | 61 + project1/cyassl-3.0.0/m4/ax_file_escapes.m4 | 30 + .../m4/ax_harden_compiler_flags.m4 | 238 + project1/cyassl-3.0.0/m4/ax_print_to_file.m4 | 27 + project1/cyassl-3.0.0/m4/ax_pthread.m4 | 320 + project1/cyassl-3.0.0/m4/ax_tls.m4 | 92 + project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 | 75 + project1/cyassl-3.0.0/m4/hexversion.m4 | 6 + project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 | 25 + project1/cyassl-3.0.0/m4/libtool.m4 | 7982 +++++ project1/cyassl-3.0.0/m4/ltoptions.m4 | 384 + project1/cyassl-3.0.0/m4/ltsugar.m4 | 123 + project1/cyassl-3.0.0/m4/ltversion.m4 | 23 + project1/cyassl-3.0.0/m4/lt~obsolete.m4 | 98 + project1/cyassl-3.0.0/m4/visibility.m4 | 77 + .../cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 | 37 + project1/cyassl-3.0.0/mcapi/.deps/crypto.Po | 1 + .../cyassl-3.0.0/mcapi/.deps/mcapi_test.Po | 1 + project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h | 28 + project1/cyassl-3.0.0/mcapi/README | 79 + project1/cyassl-3.0.0/mcapi/crypto.c | 703 + project1/cyassl-3.0.0/mcapi/crypto.h | 268 + .../mcapi/ctaocrypt_mcapi.X/Makefile | 108 + .../nbproject/configurations.xml | 175 + .../ctaocrypt_mcapi.X/nbproject/include.am | 11 + .../ctaocrypt_mcapi.X/nbproject/project.xml | 18 + .../mcapi/ctaocrypt_test.X/Makefile | 108 + .../nbproject/configurations.xml | 192 + .../ctaocrypt_test.X/nbproject/include.am | 11 + .../ctaocrypt_test.X/nbproject/project.xml | 18 + project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile | 108 + .../cyassl.X/nbproject/configurations.xml | 192 + .../mcapi/cyassl.X/nbproject/include.am | 11 + .../mcapi/cyassl.X/nbproject/project.xml | 15 + project1/cyassl-3.0.0/mcapi/include.am | 19 + project1/cyassl-3.0.0/mcapi/mcapi_test.c | 1482 + project1/cyassl-3.0.0/mcapi/zlib.X/Makefile | 108 + .../mcapi/zlib.X/nbproject/configurations.xml | 157 + .../mcapi/zlib.X/nbproject/include.am | 11 + .../mcapi/zlib.X/nbproject/project.xml | 15 + project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h | 28 + project1/cyassl-3.0.0/mplabx/README | 55 + project1/cyassl-3.0.0/mplabx/benchmark_main.c | 133 + .../mplabx/ctaocrypt_benchmark.X/Makefile | 108 + .../nbproject/configurations.xml | 193 + .../nbproject/include.am | 11 + .../nbproject/project.xml | 17 + .../mplabx/ctaocrypt_test.X/Makefile | 108 + .../nbproject/configurations.xml | 194 + .../ctaocrypt_test.X/nbproject/include.am | 11 + .../ctaocrypt_test.X/nbproject/project.xml | 17 + .../cyassl-3.0.0/mplabx/cyassl.X/Makefile | 108 + .../cyassl.X/nbproject/configurations.xml | 208 + .../mplabx/cyassl.X/nbproject/include.am | 11 + .../mplabx/cyassl.X/nbproject/project.xml | 15 + project1/cyassl-3.0.0/mplabx/include.am | 10 + project1/cyassl-3.0.0/mplabx/test_main.c | 77 + project1/cyassl-3.0.0/mqx/README | 37 + .../cyassl-3.0.0/mqx/ctaocrypt_test/.cproject | 2542 ++ .../cyassl-3.0.0/mqx/ctaocrypt_test/.project | 98 + .../ctaocrypt_test/ReferencedRSESystems.xml | 144 + .../mqx/ctaocrypt_test/Sources/include.am | 15 + .../mqx/ctaocrypt_test/Sources/main.c | 103 + .../mqx/ctaocrypt_test/Sources/main.h | 21 + ...lash_SramData_Debug_PnE_U-MultiLink.launch | 162 + ...sh_SramData_Release_PnE_U-MultiLink.launch | 158 + project1/cyassl-3.0.0/mqx/cyassl/.cproject | 2579 ++ project1/cyassl-3.0.0/mqx/cyassl/.project | 103 + project1/cyassl-3.0.0/mqx/cyassl/include.am | 11 + .../cyassl-3.0.0/mqx/cyassl_client/.cproject | 2585 ++ .../cyassl-3.0.0/mqx/cyassl_client/.project | 80 + .../cyassl_client/ReferencedRSESystems.xml | 144 + .../mqx/cyassl_client/Sources/include.am | 15 + .../mqx/cyassl_client/Sources/main.c | 239 + .../mqx/cyassl_client/Sources/main.h | 61 + ...lash_SramData_Debug_PnE_U-MultiLink.launch | 162 + ...sh_SramData_Release_PnE_U-MultiLink.launch | 164 + project1/cyassl-3.0.0/mqx/util_lib/.cproject | 2538 ++ project1/cyassl-3.0.0/mqx/util_lib/.project | 76 + .../mqx/util_lib/Sources/include.am | 12 + .../cyassl-3.0.0/mqx/util_lib/Sources/util.c | 178 + .../cyassl-3.0.0/mqx/util_lib/Sources/util.h | 14 + project1/cyassl-3.0.0/quit | 2 + project1/cyassl-3.0.0/rpm/include.am | 37 + project1/cyassl-3.0.0/rpm/spec | 166 + project1/cyassl-3.0.0/rpm/spec.in | 166 + project1/cyassl-3.0.0/src/.deps/.dirstamp | 0 .../src/.deps/src_libcyassl_la-crl.Plo | 255 + .../src/.deps/src_libcyassl_la-internal.Plo | 211 + .../src/.deps/src_libcyassl_la-io.Plo | 325 + .../src/.deps/src_libcyassl_la-keys.Plo | 211 + .../src/.deps/src_libcyassl_la-ocsp.Plo | 227 + .../src/.deps/src_libcyassl_la-sniffer.Plo | 277 + .../src/.deps/src_libcyassl_la-ssl.Plo | 240 + .../src/.deps/src_libcyassl_la-tls.Plo | 211 + project1/cyassl-3.0.0/src/.dirstamp | 0 project1/cyassl-3.0.0/src/.libs/libcyassl.la | 1 + project1/cyassl-3.0.0/src/.libs/libcyassl.lai | 41 + project1/cyassl-3.0.0/src/.libs/libcyassl.so | 1 + .../cyassl-3.0.0/src/.libs/libcyassl.so.5 | 1 + .../cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 | Bin 0 -> 179656 bytes .../src/.libs/src_libcyassl_la-internal.o | Bin 0 -> 51424 bytes .../src/.libs/src_libcyassl_la-io.o | Bin 0 -> 3336 bytes .../src/.libs/src_libcyassl_la-keys.o | Bin 0 -> 4968 bytes .../src/.libs/src_libcyassl_la-ssl.o | Bin 0 -> 34088 bytes .../src/.libs/src_libcyassl_la-tls.o | Bin 0 -> 6116 bytes project1/cyassl-3.0.0/src/crl.c | 600 + project1/cyassl-3.0.0/src/include.am | 147 + project1/cyassl-3.0.0/src/internal.c | 11300 +++++++ project1/cyassl-3.0.0/src/io.c | 1050 + project1/cyassl-3.0.0/src/keys.c | 2012 ++ project1/cyassl-3.0.0/src/libcyassl.la | 41 + project1/cyassl-3.0.0/src/ocsp.c | 269 + project1/cyassl-3.0.0/src/sniffer.c | 2567 ++ .../src/src_libcyassl_la-internal.lo | 12 + .../cyassl-3.0.0/src/src_libcyassl_la-io.lo | 12 + .../cyassl-3.0.0/src/src_libcyassl_la-keys.lo | 12 + .../cyassl-3.0.0/src/src_libcyassl_la-ssl.lo | 12 + .../cyassl-3.0.0/src/src_libcyassl_la-tls.lo | 12 + project1/cyassl-3.0.0/src/ssl.c | 11553 +++++++ project1/cyassl-3.0.0/src/tls.c | 1973 ++ .../cyassl-3.0.0/sslSniffer/sslSniffer.vcproj | 206 + .../sslSnifferTest/.deps/snifftest.Po | 1 + .../sslSniffer/sslSnifferTest/include.am | 13 + .../sslSniffer/sslSnifferTest/snifftest.c | 301 + .../sslSnifferTest/sslSniffTest.vcproj | 199 + project1/cyassl-3.0.0/stamp-h | 1 + project1/cyassl-3.0.0/stamp-h.in | 0 project1/cyassl-3.0.0/stamp-h1 | 1 + project1/cyassl-3.0.0/support/cyassl.pc | 10 + project1/cyassl-3.0.0/support/cyassl.pc.in | 10 + project1/cyassl-3.0.0/support/include.am | 10 + project1/cyassl-3.0.0/swig/PythonBuild.sh | 9 + project1/cyassl-3.0.0/swig/README | 44 + project1/cyassl-3.0.0/swig/cyassl.i | 63 + project1/cyassl-3.0.0/swig/cyassl_adds.c | 234 + project1/cyassl-3.0.0/swig/include.am | 12 + .../cyassl-3.0.0/swig/python_cyassl.vcproj | 225 + project1/cyassl-3.0.0/swig/rsasign.py | 35 + project1/cyassl-3.0.0/swig/runme.py | 40 + project1/cyassl-3.0.0/tags | 17768 ++++++++++ project1/cyassl-3.0.0/tests/.deps/.dirstamp | 0 .../tests/.deps/tests_unit_test-api.Po | 270 + .../tests/.deps/tests_unit_test-hash.Po | 285 + .../tests/.deps/tests_unit_test-suites.Po | 273 + .../tests/.deps/tests_unit_test-unit.Po | 269 + project1/cyassl-3.0.0/tests/.dirstamp | 0 project1/cyassl-3.0.0/tests/.libs/unit.test | Bin 0 -> 52399 bytes project1/cyassl-3.0.0/tests/api.c | 1303 + project1/cyassl-3.0.0/tests/hash.c | 837 + project1/cyassl-3.0.0/tests/include.am | 23 + project1/cyassl-3.0.0/tests/suites.c | 451 + project1/cyassl-3.0.0/tests/test-dtls.conf | 782 + project1/cyassl-3.0.0/tests/test.conf | 1664 + .../cyassl-3.0.0/tests/tests_unit_test-api.o | Bin 0 -> 19712 bytes .../cyassl-3.0.0/tests/tests_unit_test-hash.o | Bin 0 -> 7408 bytes .../tests/tests_unit_test-suites.o | Bin 0 -> 7408 bytes .../cyassl-3.0.0/tests/tests_unit_test-unit.o | Bin 0 -> 3432 bytes project1/cyassl-3.0.0/tests/unit.c | 132 + project1/cyassl-3.0.0/tests/unit.h | 64 + project1/cyassl-3.0.0/tests/unit.test | 228 + .../cyassl-3.0.0/testsuite/.deps/.dirstamp | 0 .../testsuite_testsuite_test-testsuite.Po | 283 + project1/cyassl-3.0.0/testsuite/.dirstamp | 0 .../testsuite/.libs/lt-testsuite.test | Bin 0 -> 53262 bytes .../testsuite/.libs/testsuite.test | Bin 0 -> 53262 bytes project1/cyassl-3.0.0/testsuite/include.am | 25 + .../testsuite/testsuite-ntru.vcproj | 219 + project1/cyassl-3.0.0/testsuite/testsuite.c | 380 + project1/cyassl-3.0.0/testsuite/testsuite.sln | 20 + .../cyassl-3.0.0/testsuite/testsuite.test | 228 + .../cyassl-3.0.0/testsuite/testsuite.vcproj | 217 + .../testsuite_testsuite_test-testsuite.o | Bin 0 -> 5852 bytes project1/cyassl-3.0.0/valgrind-error.sh | 22 + project1/server-dtls | Bin 7755 -> 12351 bytes project1/server-dtls.c | 145 +- 758 files changed, 356783 insertions(+), 50 deletions(-) create mode 100644 project1/certs/ca-cert.pem create mode 100644 project1/certs/server-cert.pem create mode 100644 project1/certs/server-key.pem create mode 100644 project1/cyassl-3.0.0/AUTHORS create mode 100644 project1/cyassl-3.0.0/COPYING create mode 100644 project1/cyassl-3.0.0/ChangeLog create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj create mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c create mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc create mode 100644 project1/cyassl-3.0.0/Makefile create mode 100644 project1/cyassl-3.0.0/Makefile.am create mode 100644 project1/cyassl-3.0.0/Makefile.in create mode 100644 project1/cyassl-3.0.0/NEWS create mode 100644 project1/cyassl-3.0.0/README create mode 100644 project1/cyassl-3.0.0/aclocal.m4 create mode 100644 project1/cyassl-3.0.0/aminclude.am create mode 100644 project1/cyassl-3.0.0/autom4te.cache/output.0 create mode 100644 project1/cyassl-3.0.0/autom4te.cache/requests create mode 100644 project1/cyassl-3.0.0/autom4te.cache/traces.0 create mode 100755 project1/cyassl-3.0.0/build-aux/compile create mode 100755 project1/cyassl-3.0.0/build-aux/config.guess create mode 100755 project1/cyassl-3.0.0/build-aux/config.sub create mode 100755 project1/cyassl-3.0.0/build-aux/depcomp create mode 100755 project1/cyassl-3.0.0/build-aux/install-sh create mode 100644 project1/cyassl-3.0.0/build-aux/ltmain.sh create mode 100755 project1/cyassl-3.0.0/build-aux/missing create mode 100755 project1/cyassl-3.0.0/build-aux/test-driver create mode 100644 project1/cyassl-3.0.0/certs/1024/client-cert.der create mode 100644 project1/cyassl-3.0.0/certs/1024/client-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/1024/client-key.der create mode 100644 project1/cyassl-3.0.0/certs/1024/client-key.pem create mode 100644 project1/cyassl-3.0.0/certs/1024/dh1024.der create mode 100644 project1/cyassl-3.0.0/certs/1024/dh1024.pem create mode 100644 project1/cyassl-3.0.0/certs/1024/dsa1024.der create mode 100644 project1/cyassl-3.0.0/certs/1024/dsa1024.pem create mode 100644 project1/cyassl-3.0.0/certs/1024/include.am create mode 100644 project1/cyassl-3.0.0/certs/1024/rsa1024.der create mode 100644 project1/cyassl-3.0.0/certs/ca-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/ca-key.der create mode 100644 project1/cyassl-3.0.0/certs/ca-key.pem create mode 100644 project1/cyassl-3.0.0/certs/client-cert.der create mode 100644 project1/cyassl-3.0.0/certs/client-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/client-ecc-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/client-key.der create mode 100644 project1/cyassl-3.0.0/certs/client-key.pem create mode 100644 project1/cyassl-3.0.0/certs/client-keyEnc.pem create mode 100644 project1/cyassl-3.0.0/certs/crl/cliCrl.pem create mode 100644 project1/cyassl-3.0.0/certs/crl/crl.pem create mode 100644 project1/cyassl-3.0.0/certs/crl/crl.revoked create mode 100644 project1/cyassl-3.0.0/certs/crl/eccCliCRL.pem create mode 100644 project1/cyassl-3.0.0/certs/crl/eccSrvCRL.pem create mode 100644 project1/cyassl-3.0.0/certs/crl/include.am create mode 100644 project1/cyassl-3.0.0/certs/dh2048.der create mode 100644 project1/cyassl-3.0.0/certs/dh2048.pem create mode 100644 project1/cyassl-3.0.0/certs/dsa2048.der create mode 100644 project1/cyassl-3.0.0/certs/ecc-client-key.pem create mode 100644 project1/cyassl-3.0.0/certs/ecc-key.der create mode 100644 project1/cyassl-3.0.0/certs/ecc-key.pem create mode 100644 project1/cyassl-3.0.0/certs/ecc-keyPkcs8.pem create mode 100644 project1/cyassl-3.0.0/certs/include.am create mode 100644 project1/cyassl-3.0.0/certs/ntru-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/ntru-key.raw create mode 100644 project1/cyassl-3.0.0/certs/rsa2048.der create mode 100644 project1/cyassl-3.0.0/certs/server-cert.pem create mode 100644 project1/cyassl-3.0.0/certs/server-ecc-rsa.pem create mode 100644 project1/cyassl-3.0.0/certs/server-ecc.pem create mode 100644 project1/cyassl-3.0.0/certs/server-key.pem create mode 100644 project1/cyassl-3.0.0/certs/server-keyEnc.pem create mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8.pem create mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem create mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem create mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem create mode 100644 project1/cyassl-3.0.0/certs/taoCert.txt create mode 100644 project1/cyassl-3.0.0/config.h create mode 100644 project1/cyassl-3.0.0/config.in create mode 100644 project1/cyassl-3.0.0/config.log create mode 100755 project1/cyassl-3.0.0/config.status create mode 100755 project1/cyassl-3.0.0/configure create mode 100644 project1/cyassl-3.0.0/configure.ac create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp create mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark create mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o create mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.sln create mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.vcproj create mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-coding.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-integer.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-logging.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/aes.c create mode 100755 project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/arc4.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/asm.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/asn.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/camellia.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/coding.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/compress.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/des3.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/dh.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/dsa.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ecc.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/error.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fips.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/hc128.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/hmac.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/include.am create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/integer.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/logging.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md2.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md4.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md5.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/memory.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/misc.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/port.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/pwdbased.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/random.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/rsa.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha256.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha512.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo create mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/tfm.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp create mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/include.am create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.c create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.h create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.o create mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/test.sln create mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj create mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt create mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o create mode 100644 project1/cyassl-3.0.0/cyassl-config create mode 100644 project1/cyassl-3.0.0/cyassl-ios.xcodeproj/project.pbxproj create mode 100644 project1/cyassl-3.0.0/cyassl-iphone.xcodeproj/project.pbxproj create mode 100755 project1/cyassl-3.0.0/cyassl-ntru.sln create mode 100755 project1/cyassl-3.0.0/cyassl-ntru.vcproj create mode 100755 project1/cyassl-3.0.0/cyassl.sln create mode 100755 project1/cyassl-3.0.0/cyassl.vcproj create mode 100644 project1/cyassl-3.0.0/cyassl/callbacks.h create mode 100644 project1/cyassl-3.0.0/cyassl/certs_test.h create mode 100644 project1/cyassl-3.0.0/cyassl/crl.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h create mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h create mode 100644 project1/cyassl-3.0.0/cyassl/error-ssl.h create mode 100644 project1/cyassl-3.0.0/cyassl/include.am create mode 100644 project1/cyassl-3.0.0/cyassl/internal.h create mode 100644 project1/cyassl-3.0.0/cyassl/ocsp.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/asn1.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/bio.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/bn.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/conf.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/crypto.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/des.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/dh.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/dsa.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ec.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/engine.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/err.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/evp.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/hmac.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/include.am create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/lhash.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/md4.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/md5.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ocsp.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/opensslv.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/pem.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/rand.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ripemd.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/rsa.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/sha.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ssl.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/stack.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ui.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/x509.h create mode 100644 project1/cyassl-3.0.0/cyassl/openssl/x509v3.h create mode 100644 project1/cyassl-3.0.0/cyassl/options.h create mode 100644 project1/cyassl-3.0.0/cyassl/options.h.in create mode 100644 project1/cyassl-3.0.0/cyassl/sniffer.h create mode 100644 project1/cyassl-3.0.0/cyassl/sniffer_error.h create mode 100644 project1/cyassl-3.0.0/cyassl/sniffer_error.rc create mode 100644 project1/cyassl-3.0.0/cyassl/ssl.h create mode 100644 project1/cyassl-3.0.0/cyassl/test.h create mode 100644 project1/cyassl-3.0.0/cyassl/version.h create mode 100644 project1/cyassl-3.0.0/cyassl/version.h.in create mode 100644 project1/cyassl-3.0.0/doc/README.txt create mode 100644 project1/cyassl-3.0.0/doc/include.am create mode 100644 project1/cyassl-3.0.0/examples/client/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/examples/client/.deps/client.Po create mode 100644 project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po create mode 100644 project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po create mode 100644 project1/cyassl-3.0.0/examples/client/.dirstamp create mode 100755 project1/cyassl-3.0.0/examples/client/.libs/client create mode 100755 project1/cyassl-3.0.0/examples/client/client create mode 100755 project1/cyassl-3.0.0/examples/client/client-ntru.vcproj create mode 100644 project1/cyassl-3.0.0/examples/client/client.c create mode 100644 project1/cyassl-3.0.0/examples/client/client.h create mode 100644 project1/cyassl-3.0.0/examples/client/client.o create mode 100755 project1/cyassl-3.0.0/examples/client/client.sln create mode 100755 project1/cyassl-3.0.0/examples/client/client.vcproj create mode 100644 project1/cyassl-3.0.0/examples/client/include.am create mode 100644 project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o create mode 100644 project1/cyassl-3.0.0/examples/client/testsuite_testsuite_test-client.o create mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/echoclient.Po create mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/testsuite_testsuite_test-echoclient.Po create mode 100644 project1/cyassl-3.0.0/examples/echoclient/.dirstamp create mode 100755 project1/cyassl-3.0.0/examples/echoclient/.libs/echoclient create mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient create mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj create mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.c create mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.h create mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.o create mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient.sln create mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj create mode 100644 project1/cyassl-3.0.0/examples/echoclient/include.am create mode 100644 project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o create mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po create mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po create mode 100644 project1/cyassl-3.0.0/examples/echoserver/.dirstamp create mode 100755 project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver create mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver create mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj create mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.c create mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.h create mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.o create mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver.sln create mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj create mode 100644 project1/cyassl-3.0.0/examples/echoserver/include.am create mode 100644 project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o create mode 100644 project1/cyassl-3.0.0/examples/server/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/examples/server/.deps/server.Po create mode 100644 project1/cyassl-3.0.0/examples/server/.deps/tests_unit_test-server.Po create mode 100644 project1/cyassl-3.0.0/examples/server/.deps/testsuite_testsuite_test-server.Po create mode 100644 project1/cyassl-3.0.0/examples/server/.dirstamp create mode 100755 project1/cyassl-3.0.0/examples/server/.libs/server create mode 100644 project1/cyassl-3.0.0/examples/server/include.am create mode 100755 project1/cyassl-3.0.0/examples/server/server create mode 100755 project1/cyassl-3.0.0/examples/server/server-ntru.vcproj create mode 100644 project1/cyassl-3.0.0/examples/server/server.c create mode 100644 project1/cyassl-3.0.0/examples/server/server.h create mode 100644 project1/cyassl-3.0.0/examples/server/server.o create mode 100755 project1/cyassl-3.0.0/examples/server/server.sln create mode 100755 project1/cyassl-3.0.0/examples/server/server.vcproj create mode 100644 project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o create mode 100644 project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o create mode 100755 project1/cyassl-3.0.0/gencertbuf.pl create mode 100644 project1/cyassl-3.0.0/input create mode 100644 project1/cyassl-3.0.0/lib/dummy create mode 100755 project1/cyassl-3.0.0/libtool create mode 100644 project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_am_macros.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_append_flag.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_append_to_file.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_count_cpus.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_debug.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_file_escapes.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_print_to_file.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_pthread.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_tls.m4 create mode 100644 project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 create mode 100644 project1/cyassl-3.0.0/m4/hexversion.m4 create mode 100644 project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 create mode 100644 project1/cyassl-3.0.0/m4/libtool.m4 create mode 100644 project1/cyassl-3.0.0/m4/ltoptions.m4 create mode 100644 project1/cyassl-3.0.0/m4/ltsugar.m4 create mode 100644 project1/cyassl-3.0.0/m4/ltversion.m4 create mode 100644 project1/cyassl-3.0.0/m4/lt~obsolete.m4 create mode 100644 project1/cyassl-3.0.0/m4/visibility.m4 create mode 100644 project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 create mode 100644 project1/cyassl-3.0.0/mcapi/.deps/crypto.Po create mode 100644 project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po create mode 100644 project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h create mode 100644 project1/cyassl-3.0.0/mcapi/README create mode 100644 project1/cyassl-3.0.0/mcapi/crypto.c create mode 100644 project1/cyassl-3.0.0/mcapi/crypto.h create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile create mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mcapi/include.am create mode 100644 project1/cyassl-3.0.0/mcapi/mcapi_test.c create mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/Makefile create mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h create mode 100644 project1/cyassl-3.0.0/mplabx/README create mode 100644 project1/cyassl-3.0.0/mplabx/benchmark_main.c create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile create mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml create mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am create mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml create mode 100644 project1/cyassl-3.0.0/mplabx/include.am create mode 100644 project1/cyassl-3.0.0/mplabx/test_main.c create mode 100644 project1/cyassl-3.0.0/mqx/README create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch create mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch create mode 100644 project1/cyassl-3.0.0/mqx/cyassl/.cproject create mode 100644 project1/cyassl-3.0.0/mqx/cyassl/.project create mode 100644 project1/cyassl-3.0.0/mqx/cyassl/include.am create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/.cproject create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/.project create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch create mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch create mode 100644 project1/cyassl-3.0.0/mqx/util_lib/.cproject create mode 100644 project1/cyassl-3.0.0/mqx/util_lib/.project create mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am create mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c create mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h create mode 100644 project1/cyassl-3.0.0/quit create mode 100644 project1/cyassl-3.0.0/rpm/include.am create mode 100644 project1/cyassl-3.0.0/rpm/spec create mode 100644 project1/cyassl-3.0.0/rpm/spec.in create mode 100644 project1/cyassl-3.0.0/src/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo create mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo create mode 100644 project1/cyassl-3.0.0/src/.dirstamp create mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.la create mode 100644 project1/cyassl-3.0.0/src/.libs/libcyassl.lai create mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.so create mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 create mode 100755 project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 create mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-internal.o create mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-io.o create mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o create mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-ssl.o create mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-tls.o create mode 100644 project1/cyassl-3.0.0/src/crl.c create mode 100644 project1/cyassl-3.0.0/src/include.am create mode 100644 project1/cyassl-3.0.0/src/internal.c create mode 100644 project1/cyassl-3.0.0/src/io.c create mode 100644 project1/cyassl-3.0.0/src/keys.c create mode 100644 project1/cyassl-3.0.0/src/libcyassl.la create mode 100644 project1/cyassl-3.0.0/src/ocsp.c create mode 100644 project1/cyassl-3.0.0/src/sniffer.c create mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo create mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo create mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo create mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo create mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo create mode 100644 project1/cyassl-3.0.0/src/ssl.c create mode 100644 project1/cyassl-3.0.0/src/tls.c create mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj create mode 100644 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po create mode 100644 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am create mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c create mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj create mode 100644 project1/cyassl-3.0.0/stamp-h create mode 100644 project1/cyassl-3.0.0/stamp-h.in create mode 100644 project1/cyassl-3.0.0/stamp-h1 create mode 100644 project1/cyassl-3.0.0/support/cyassl.pc create mode 100644 project1/cyassl-3.0.0/support/cyassl.pc.in create mode 100644 project1/cyassl-3.0.0/support/include.am create mode 100755 project1/cyassl-3.0.0/swig/PythonBuild.sh create mode 100644 project1/cyassl-3.0.0/swig/README create mode 100644 project1/cyassl-3.0.0/swig/cyassl.i create mode 100644 project1/cyassl-3.0.0/swig/cyassl_adds.c create mode 100644 project1/cyassl-3.0.0/swig/include.am create mode 100755 project1/cyassl-3.0.0/swig/python_cyassl.vcproj create mode 100644 project1/cyassl-3.0.0/swig/rsasign.py create mode 100644 project1/cyassl-3.0.0/swig/runme.py create mode 100644 project1/cyassl-3.0.0/tags create mode 100644 project1/cyassl-3.0.0/tests/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po create mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po create mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po create mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po create mode 100644 project1/cyassl-3.0.0/tests/.dirstamp create mode 100755 project1/cyassl-3.0.0/tests/.libs/unit.test create mode 100644 project1/cyassl-3.0.0/tests/api.c create mode 100644 project1/cyassl-3.0.0/tests/hash.c create mode 100644 project1/cyassl-3.0.0/tests/include.am create mode 100644 project1/cyassl-3.0.0/tests/suites.c create mode 100644 project1/cyassl-3.0.0/tests/test-dtls.conf create mode 100644 project1/cyassl-3.0.0/tests/test.conf create mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-api.o create mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-hash.o create mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-suites.o create mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-unit.o create mode 100644 project1/cyassl-3.0.0/tests/unit.c create mode 100644 project1/cyassl-3.0.0/tests/unit.h create mode 100755 project1/cyassl-3.0.0/tests/unit.test create mode 100644 project1/cyassl-3.0.0/testsuite/.deps/.dirstamp create mode 100644 project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po create mode 100644 project1/cyassl-3.0.0/testsuite/.dirstamp create mode 100755 project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test create mode 100755 project1/cyassl-3.0.0/testsuite/.libs/testsuite.test create mode 100644 project1/cyassl-3.0.0/testsuite/include.am create mode 100755 project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj create mode 100644 project1/cyassl-3.0.0/testsuite/testsuite.c create mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.sln create mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.test create mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.vcproj create mode 100644 project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o create mode 100755 project1/cyassl-3.0.0/valgrind-error.sh diff --git a/project1/Makefile b/project1/Makefile index a4c27b37..af303313 100644 --- a/project1/Makefile +++ b/project1/Makefile @@ -8,10 +8,10 @@ all: server-dtls #LIBS=-lsocket server-udp: server-udp.c - $(CC) -o server-udp server-udp.c $(LIBS) + $(CC) -o server-udp server-udp.c $(LIBS) server-dtls: server-dtls.c - $(CC) -o server-dtls server-dtls.c $(LIBS) + $(CC) -o server-dtls server-dtls.c $(LIBS) -lcyassl .PHONY: clean diff --git a/project1/certs/ca-cert.pem b/project1/certs/ca-cert.pem new file mode 100644 index 00000000..b2dc6ae6 --- /dev/null +++ b/project1/certs/ca-cert.pem @@ -0,0 +1,87 @@ +-----BEGIN CERTIFICATE----- +MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD +VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G +A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 +dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx +MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q +8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k +EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A +dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ +mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ +CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O +BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd +P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u +dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV +BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG +9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 +PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH +Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr +G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m +ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi +rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== +-----END CERTIFICATE----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + e9:d0:a7:5f:79:25:f4:3c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:18:15 2011 GMT + Not After : Jul 20 18:18:15 2014 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: + f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: + de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: + 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: + 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: + 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: + a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: + a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: + 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: + 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: + 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: + 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: + de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: + cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: + b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: + 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: + ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: + 36:79 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + X509v3 Authority Key Identifier: + keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com + serial:E9:D0:A7:5F:79:25:F4:3C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: + 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: + e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: + f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: + af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: + 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: + 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: + 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: + 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: + 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: + 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: + 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: + f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: + b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: + 5a:1f:7f:ca diff --git a/project1/certs/server-cert.pem b/project1/certs/server-cert.pem new file mode 100644 index 00000000..8381265e --- /dev/null +++ b/project1/certs/server-cert.pem @@ -0,0 +1,158 @@ +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 2 (0x2) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:27:13 2011 GMT + Not After : Jul 20 18:27:13 2014 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=yaSSL, OU=Support, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27: + 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6: + f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75: + f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab: + 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e: + 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25: + 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c: + 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6: + 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc: + 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8: + dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3: + e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9: + 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0: + c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77: + ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4: + b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22: + a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f: + ad:d7 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 71:4e:d3:62:df:cc:4c:f7:cd:b7:6e:52:0b:6c:6e:e0:bd:c2: + 2d:07:d7:c0:b0:6e:43:1e:35:bc:30:01:50:f0:ff:99:23:6c: + 18:1a:41:b6:11:d6:d4:19:61:fd:e4:77:97:1c:39:e1:57:ab: + c5:15:63:77:11:36:5e:74:e2:24:0b:1f:41:78:ad:b7:81:e7: + b4:40:66:80:f0:4b:91:a0:6d:a8:6e:3d:53:d9:8b:ce:2a:e1: + 0b:45:65:87:a1:96:ae:ee:3e:88:d5:12:1f:78:17:ae:2c:c5: + 73:44:d8:dc:f4:af:d8:cc:ae:4c:e1:0c:be:55:a4:99:f7:6e: + 96:c0:c8:45:87:bf:dc:51:57:ff:9e:73:37:6a:18:9c:c3:f9: + 22:7a:f4:b0:52:bd:fc:21:30:f8:c5:ff:1e:87:7d:ad:a2:5a: + 35:f5:22:a8:b4:0a:76:38:e6:76:b0:98:af:1b:ec:8a:0a:43: + 74:d2:85:34:37:84:07:e1:f6:23:b2:29:de:a6:b6:b7:4c:57: + 7e:96:06:cb:a9:16:25:29:3a:03:2d:55:7d:a6:8c:a4:f7:9e: + 81:c9:95:b6:7c:c1:4a:ce:94:66:0c:ca:88:eb:d2:09:f5:5b: + 19:58:82:df:27:fd:67:95:78:b7:02:06:d5:a7:61:bd:ef:3a: + fc:b2:61:cd +-----BEGIN CERTIFICATE----- +MIIDkDCCAngCAQIwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTExMDI0MTgyNzEzWhcN +MTQwNzIwMTgyNzEzWjCBijELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB01vbnRhbmEx +EDAOBgNVBAcTB0JvemVtYW4xDjAMBgNVBAoTBXlhU1NMMRAwDgYDVQQLEwdTdXBw +b3J0MRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZv +QHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCVCOFX +QfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hnf/5cnFF194rKB+c1L4/h +vXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/XGQ0lT+FjY1GLC2Q/rUO4 +pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bMQLRpo0YzaYduxLsXpvPo +3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq0KGWSrzh1Bpbx6DAwWN4 +D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ6dgIvDMgs1gip6rrxOHm +YYPF0pbf2dBPrdcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAcU7TYt/MTPfNt25S +C2xu4L3CLQfXwLBuQx41vDABUPD/mSNsGBpBthHW1Blh/eR3lxw54VerxRVjdxE2 +XnTiJAsfQXitt4HntEBmgPBLkaBtqG49U9mLzirhC0Vlh6GWru4+iNUSH3gXrizF +c0TY3PSv2MyuTOEMvlWkmfdulsDIRYe/3FFX/55zN2oYnMP5Inr0sFK9/CEw+MX/ +Hod9raJaNfUiqLQKdjjmdrCYrxvsigpDdNKFNDeEB+H2I7Ip3qa2t0xXfpYGy6kW +JSk6Ay1VfaaMpPeegcmVtnzBSs6UZgzKiOvSCfVbGViC3yf9Z5V4twIG1adhve86 +/LJhzQ== +-----END CERTIFICATE----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + e9:d0:a7:5f:79:25:f4:3c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:18:15 2011 GMT + Not After : Jul 20 18:18:15 2014 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: + f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: + de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: + 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: + 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: + 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: + a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: + a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: + 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: + 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: + 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: + 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: + de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: + cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: + b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: + 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: + ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: + 36:79 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + X509v3 Authority Key Identifier: + keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com + serial:E9:D0:A7:5F:79:25:F4:3C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: + 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: + e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: + f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: + af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: + 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: + 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: + 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: + 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: + 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: + 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: + 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: + f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: + b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: + 5a:1f:7f:ca +-----BEGIN CERTIFICATE----- +MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD +VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G +A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 +dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx +MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q +8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k +EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A +dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ +mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ +CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O +BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd +P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u +dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV +BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG +9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 +PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH +Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr +G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m +ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi +rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== +-----END CERTIFICATE----- diff --git a/project1/certs/server-key.pem b/project1/certs/server-key.pem new file mode 100644 index 00000000..d1627f4d --- /dev/null +++ b/project1/certs/server-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7 +qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf +P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj +xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk +wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC +Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv +n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd +x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y +oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz +0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB +QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD +LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8 +ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8 +yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT +3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N +zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB +hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv +VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB +qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf +H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza +1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ +c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe +9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY +dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n +WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA= +-----END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/AUTHORS b/project1/cyassl-3.0.0/AUTHORS new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/COPYING b/project1/cyassl-3.0.0/COPYING new file mode 100644 index 00000000..d159169d --- /dev/null +++ b/project1/cyassl-3.0.0/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program 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. + + This program 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-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/project1/cyassl-3.0.0/ChangeLog b/project1/cyassl-3.0.0/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s new file mode 100644 index 00000000..6fdb7ab7 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s @@ -0,0 +1,338 @@ +;/*********************************************************************** +; * $Id: startup_LPC43xx.s 6473 2011-02-16 17:40:54Z nxp27266 $ +; * +; * Project: LPC43xx CMSIS Package +; * +; * Description: Cortex-M3 Core Device Startup File for the NXP LPC43xx +; * Device Series. +; * +; * Copyright(C) 2011, NXP Semiconductor +; * All rights reserved. +; * +; * modified by KEIL +; *********************************************************************** +; * Software that is described herein is for illustrative purposes only +; * which provides customers with programming information regarding the +; * products. This software is supplied "AS IS" without any warranties. +; * NXP Semiconductors assumes no responsibility or liability for the +; * use of the software, conveys no license or title under any patent, +; * copyright, or mask work right to the product. NXP Semiconductors +; * reserves the right to make changes in the software without +; * notification. NXP Semiconductors also make no representation or +; * warranty that such application will be suitable for the specified +; * use without further testing or modification. +; **********************************************************************/ + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00003000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x0000a000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + +Sign_Value EQU 0x5A5A5A5A + +__Vectors DCD __initial_sp ; 0 Top of Stack + DCD Reset_Handler ; 1 Reset Handler + DCD NMI_Handler ; 2 NMI Handler + DCD HardFault_Handler ; 3 Hard Fault Handler + DCD MemManage_Handler ; 4 MPU Fault Handler + DCD BusFault_Handler ; 5 Bus Fault Handler + DCD UsageFault_Handler ; 6 Usage Fault Handler + DCD Sign_Value ; 7 Reserved + DCD 0 ; 8 Reserved + DCD 0 ; 9 Reserved + DCD 0 ; 10 Reserved + DCD SVC_Handler ; 11 SVCall Handler + DCD DebugMon_Handler ; 12 Debug Monitor Handler + DCD 0 ; 13 Reserved + DCD PendSV_Handler ; 14 PendSV Handler + DCD SysTick_Handler ; 15 SysTick Handler + + ; External Interrupts + DCD DAC_IRQHandler ; 16 D/A Converter + DCD M0CORE_IRQHandler ; 17 M0 Core + DCD DMA_IRQHandler ; 18 General Purpose DMA + DCD EZH_IRQHandler ; 19 EZH/EDM + DCD FLASH_EEPROM_IRQHandler ; 20 Reserved for Typhoon + DCD ETH_IRQHandler ; 21 Ethernet + DCD SDIO_IRQHandler ; 22 SD/MMC + DCD LCD_IRQHandler ; 23 LCD + DCD USB0_IRQHandler ; 24 USB0 + DCD USB1_IRQHandler ; 25 USB1 + DCD SCT_IRQHandler ; 26 State Configurable Timer + DCD RIT_IRQHandler ; 27 Repetitive Interrupt Timer + DCD TIMER0_IRQHandler ; 28 Timer0 + DCD TIMER1_IRQHandler ; 29 Timer1 + DCD TIMER2_IRQHandler ; 30 Timer2 + DCD TIMER3_IRQHandler ; 31 Timer3 + DCD MCPWM_IRQHandler ; 32 Motor Control PWM + DCD ADC0_IRQHandler ; 33 A/D Converter 0 + DCD I2C0_IRQHandler ; 34 I2C0 + DCD I2C1_IRQHandler ; 35 I2C1 + DCD SPI_IRQHandler ; 36 SPI + DCD ADC1_IRQHandler ; 37 A/D Converter 1 + DCD SSP0_IRQHandler ; 38 SSP0 + DCD SSP1_IRQHandler ; 39 SSP1 + DCD UART0_IRQHandler ; 40 UART0 + DCD UART1_IRQHandler ; 41 UART1 + DCD UART2_IRQHandler ; 42 UART2 + DCD UART3_IRQHandler ; 43 UART3 + DCD I2S0_IRQHandler ; 44 I2S0 + DCD I2S1_IRQHandler ; 45 I2S1 + DCD SPIFI_IRQHandler ; 46 SPI Flash Interface + DCD SGPIO_IRQHandler ; 47 SGPIO + DCD GPIO0_IRQHandler ; 48 GPIO0 + DCD GPIO1_IRQHandler ; 49 GPIO1 + DCD GPIO2_IRQHandler ; 50 GPIO2 + DCD GPIO3_IRQHandler ; 51 GPIO3 + DCD GPIO4_IRQHandler ; 52 GPIO4 + DCD GPIO5_IRQHandler ; 53 GPIO5 + DCD GPIO6_IRQHandler ; 54 GPIO6 + DCD GPIO7_IRQHandler ; 55 GPIO7 + DCD GINT0_IRQHandler ; 56 GINT0 + DCD GINT1_IRQHandler ; 57 GINT1 + DCD EVRT_IRQHandler ; 58 Event Router + DCD CAN1_IRQHandler ; 59 C_CAN1 + DCD 0 ; 60 Reserved + DCD VADC_IRQHandler ; 61 VADC + DCD ATIMER_IRQHandler ; 62 ATIMER + DCD RTC_IRQHandler ; 63 RTC + DCD 0 ; 64 Reserved + DCD WDT_IRQHandler ; 65 WDT + DCD M0s_IRQHandler ; 66 M0s + DCD CAN0_IRQHandler ; 67 C_CAN0 + DCD QEI_IRQHandler ; 68 QEI + + +;CRP address at offset 0x2FC relative to the BOOT Bank address + IF :LNOT::DEF:NO_CRP + SPACE (0x2FC - (. - __Vectors)) +; EXPORT CRP_Key +CRP_Key DCD 0xFFFFFFFF +; 0xFFFFFFFF => CRP Disabled +; 0x12345678 => CRP Level 1 +; 0x87654321 => CRP Level 2 +; 0x43218765 => CRP Level 3 (ARE YOU SURE?) +; 0x4E697370 => NO ISP (ARE YOU SURE?) + ENDIF + + AREA |.text|, CODE, READONLY + +; Reset Handler + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT DAC_IRQHandler [WEAK] + EXPORT M0CORE_IRQHandler [WEAK] + EXPORT DMA_IRQHandler [WEAK] + EXPORT EZH_IRQHandler [WEAK] + EXPORT FLASH_EEPROM_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT LCD_IRQHandler [WEAK] + EXPORT USB0_IRQHandler [WEAK] + EXPORT USB1_IRQHandler [WEAK] + EXPORT SCT_IRQHandler [WEAK] + EXPORT RIT_IRQHandler [WEAK] + EXPORT TIMER0_IRQHandler [WEAK] + EXPORT TIMER1_IRQHandler [WEAK] + EXPORT TIMER2_IRQHandler [WEAK] + EXPORT TIMER3_IRQHandler [WEAK] + EXPORT MCPWM_IRQHandler [WEAK] + EXPORT ADC0_IRQHandler [WEAK] + EXPORT I2C0_IRQHandler [WEAK] + EXPORT I2C1_IRQHandler [WEAK] + EXPORT SPI_IRQHandler [WEAK] + EXPORT ADC1_IRQHandler [WEAK] + EXPORT SSP0_IRQHandler [WEAK] + EXPORT SSP1_IRQHandler [WEAK] + EXPORT UART0_IRQHandler [WEAK] + EXPORT UART1_IRQHandler [WEAK] + EXPORT UART2_IRQHandler [WEAK] + EXPORT UART3_IRQHandler [WEAK] + EXPORT I2S0_IRQHandler [WEAK] + EXPORT I2S1_IRQHandler [WEAK] + EXPORT SPIFI_IRQHandler [WEAK] + EXPORT SGPIO_IRQHandler [WEAK] + EXPORT GPIO0_IRQHandler [WEAK] + EXPORT GPIO1_IRQHandler [WEAK] + EXPORT GPIO2_IRQHandler [WEAK] + EXPORT GPIO3_IRQHandler [WEAK] + EXPORT GPIO4_IRQHandler [WEAK] + EXPORT GPIO5_IRQHandler [WEAK] + EXPORT GPIO6_IRQHandler [WEAK] + EXPORT GPIO7_IRQHandler [WEAK] + EXPORT GINT0_IRQHandler [WEAK] + EXPORT GINT1_IRQHandler [WEAK] + EXPORT EVRT_IRQHandler [WEAK] + EXPORT CAN1_IRQHandler [WEAK] + EXPORT VADC_IRQHandler [WEAK] + EXPORT ATIMER_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT WDT_IRQHandler [WEAK] + EXPORT M0s_IRQHandler [WEAK] + EXPORT CAN0_IRQHandler [WEAK] + EXPORT QEI_IRQHandler [WEAK] + +DAC_IRQHandler +M0CORE_IRQHandler +DMA_IRQHandler +EZH_IRQHandler +FLASH_EEPROM_IRQHandler +ETH_IRQHandler +SDIO_IRQHandler +LCD_IRQHandler +USB0_IRQHandler +USB1_IRQHandler +SCT_IRQHandler +RIT_IRQHandler +TIMER0_IRQHandler +TIMER1_IRQHandler +TIMER2_IRQHandler +TIMER3_IRQHandler +MCPWM_IRQHandler +ADC0_IRQHandler +I2C0_IRQHandler +I2C1_IRQHandler +SPI_IRQHandler +ADC1_IRQHandler +SSP0_IRQHandler +SSP1_IRQHandler +UART0_IRQHandler +UART1_IRQHandler +UART2_IRQHandler +UART3_IRQHandler +I2S0_IRQHandler +I2S1_IRQHandler +SPIFI_IRQHandler +SGPIO_IRQHandler +GPIO0_IRQHandler +GPIO1_IRQHandler +GPIO2_IRQHandler +GPIO3_IRQHandler +GPIO4_IRQHandler +GPIO5_IRQHandler +GPIO6_IRQHandler +GPIO7_IRQHandler +GINT0_IRQHandler +GINT1_IRQHandler +EVRT_IRQHandler +CAN1_IRQHandler +VADC_IRQHandler +ATIMER_IRQHandler +RTC_IRQHandler +WDT_IRQHandler +M0s_IRQHandler +CAN0_IRQHandler +QEI_IRQHandler + + B . + + ENDP + + ALIGN + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + + END diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c new file mode 100644 index 00000000..4b1a5aba --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c @@ -0,0 +1,166 @@ +/* time.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + + +/*----------------------------------------------------------------------------- + * initialize RTC + *----------------------------------------------------------------------------*/ +#include +#include "lpc43xx_rtc.h" +#include "lpc43xx_cgu.h" + +static void init_RTC() +{ + /* Enable GPIO register interface clock */ + LPC_CCU1->CLK_M4_GPIO_CFG |= 1; + while (!(LPC_CCU1->CLK_M4_GPIO_STAT & 1)) ; + + /* RTC Block section ------------------------------------------------------ */ + /* Init RTC module */ + RTC_Init(LPC_RTC); + + /* Set ALARM time for second */ + RTC_SetAlarmTime (LPC_RTC, RTC_TIMETYPE_SECOND, 30); + + /* Set the AMR for 30s match alarm interrupt */ + RTC_AlarmIntConfig (LPC_RTC, RTC_TIMETYPE_SECOND, ENABLE); + + /* Set the CIIR for minute counter interrupt*/ + RTC_CntIncrIntConfig (LPC_RTC, RTC_TIMETYPE_MINUTE, ENABLE); + + /* Enable rtc (starts increase the tick counter and second counter register) */ + RTC_Cmd(LPC_RTC, ENABLE); + +} + +/*----------------------------------------------------------------------------- + * initialize TIM + *----------------------------------------------------------------------------*/ + +#include "lpc43xx_timer.h" + +static void init_TIM() +{ + TIM_TIMERCFG_Type TIM_ConfigStruct; + /* Initialize timer 0, prescale count time of 1uS */ + TIM_ConfigStruct.PrescaleOption = TIM_PRESCALE_TICKVAL; + TIM_ConfigStruct.PrescaleValue = 204; /* 204MHz */ + /* Set configuration for Tim_config and Tim_MatchConfig */ + TIM_Init(LPC_TIMER2, TIM_TIMER_MODE,&TIM_ConfigStruct); + TIM_ResetCounter(LPC_TIMER2); + /* To start timer 2 */ + TIM_Cmd(LPC_TIMER2,ENABLE); +} + +double current_time() +{ + return (double)LPC_TIMER2->TC/1000000.0; +} + + +void init_time(void) { + init_RTC() ; + init_TIM() ; +} + +#include + +struct tm *Cyassl_MDK_gmtime(const time_t *c) +{ + static struct tm date ; + + RTC_TIME_Type RTCFullTime; + RTC_GetFullTime (LPC_RTC, &RTCFullTime); + + date.tm_year = RTCFullTime.YEAR + 100 ; + date.tm_mon = RTCFullTime.MONTH - 1 ; + date.tm_mday = RTCFullTime.DOM ; + date.tm_hour = RTCFullTime.HOUR ; + date.tm_min = RTCFullTime.MIN ; + date.tm_sec = RTCFullTime.SEC ; + + #if defined(DEBUG_CYASSL) + { + extern void CYASSL_MSG(char *msg) ; + char msg[100] ; + sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n", + RTCFullTime.YEAR+2000, RTCFullTime.MONTH, RTCFullTime.DOM, + RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ; + CYASSL_MSG(msg) ; + } + #endif + + return(&date) ; +} + +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + +#include + +void time_main(void *args) +{ + char * datetime ; + int year ; + RTC_TIME_Type RTCFullTime; + + if( args == NULL || ((func_args *)args)->argc == 1) { + RTC_GetFullTime (LPC_RTC, &RTCFullTime); + printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", + RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000, + RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 'd' ) { + + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d/%d/%d", + (int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ; + RTCFullTime.YEAR = year - 2000 ; + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH); + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR); + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM); + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 't' ) { + RTC_GetFullTime (LPC_RTC, &RTCFullTime); + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d:%d:%d", + (int *)&RTCFullTime.HOUR, + (int *)&RTCFullTime.MIN, + (int *)&RTCFullTime.SEC + ) ; + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC); + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN); + RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR); + } else printf("Invalid argument\n") ; +} + + + + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c new file mode 100644 index 00000000..bb59c8ce --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c @@ -0,0 +1,261 @@ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include +#include +#include +#include + + +#include + +#pragma import(__use_no_semihosting_swi) + +/* The following macro definitions may be used to translate this file: + + STDIO - use standard Input/Output device + (default is NOT used) + */ + +/* Standard IO device handles. */ +#define STDIN 0x8001 +#define STDOUT 0x8002 +#define STDERR 0x8003 + +/* Standard IO device name defines. */ +const char __stdin_name[] = "STDIN"; +const char __stdout_name[] = "STDOUT"; +const char __stderr_name[] = "STDERR"; + +struct __FILE { int handle; /* Add whatever you need here */ }; + +#ifdef STDIO +extern int SER_GetChar (void); +extern int SER_PutChar (int ch); + +/*----------------------------------------------------------------------------- + Write character to the Serial Port + *----------------------------------------------------------------------------*/ +int sendchar (int c) +{ + if (c == '\n') { + SER_PutChar ('\r'); + } + SER_PutChar (c); + return (c); +} + + +/*----------------------------------------------------------------------------- + Read character from the Serial Port + *----------------------------------------------------------------------------*/ +int getkey (void) +{ + int ch = SER_GetChar(); + + if (ch < 0) { + return 0; + } + return ch; +} +#endif + +/*--------------------------- _ttywrch ---------------------------------------*/ + +void _ttywrch (int ch) +{ +#ifdef STDIO + sendchar (ch); +#endif +} + +/*--------------------------- _sys_open --------------------------------------*/ +#ifndef NO_FILESYSTEM +static int KEIL_FS_open(const char *name, int openmode) +{ + int i ; int ret ; + #define PATHSIZE 100 + char path[PATHSIZE] ; char *p ; + + if(strlen(name) > PATHSIZE)return(-1) ; + + for(i = 0; i<= strlen(name); i++) { + if(name[i] == '/')path[i] = '\\' ; + else path[i] = name[i] ; + } + if(path[0] == '.' && path[1] == '\\') p = path + 2 ; + else p = path ; + + ret = __sys_open (p, openmode) ; + + return(ret) ; +} +#endif + +FILEHANDLE _sys_open (const char *name, int openmode) +{ + /* Register standard Input Output devices. */ + if (strcmp(name, "STDIN") == 0) { + return (STDIN); + } + if (strcmp(name, "STDOUT") == 0) { + return (STDOUT); + } + if (strcmp(name, "STDERR") == 0) { + return (STDERR); + } + #ifndef NO_FILESYSTEM + return (KEIL_FS_open(name, openmode)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_close -------------------------------------*/ + +int _sys_close (FILEHANDLE fh) +{ + if (fh > 0x8000) { + return (0); + } + #ifndef NO_FILESYSTEM + return (__sys_close (fh)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_write -------------------------------------*/ + +int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode) +{ +#ifdef STDIO + if (fh == STDOUT) { + /* Standard Output device. */ + for ( ; len; len--) { + sendchar (*buf++); + } + return (0); + } +#endif + if (fh > 0x8000) { + return (-1); + } + #ifndef NO_FILESYSTEM + return (__sys_write (fh, buf, len)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_read --------------------------------------*/ + +int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode) +{ +#ifdef STDIO + if (fh == STDIN) { + /* Standard Input device. */ + int sz ; + while((buf[0] = getkey()) == 0) ; + ; + for (sz = 0 ; sz <= len ; sz ++ ) { + if(buf[sz] == 0) break ; + else sz++ ; + buf[sz] = getkey (); + } + return (sz); + } +#endif + if (fh > 0x8000) { + return (-1); + } + #ifndef NO_FILESYSTEM + return (__sys_read (fh, buf, len)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_istty -------------------------------------*/ + +int _sys_istty (FILEHANDLE fh) +{ + if (fh > 0x8000) { + return (1); + } + return (0); +} + +/*--------------------------- _sys_seek --------------------------------------*/ + +int _sys_seek (FILEHANDLE fh, long pos) +{ + if (fh > 0x8000) { + return (-1); + } + #ifndef NO_FILESYSTEM + return (__sys_seek (fh, pos)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_ensure ------------------------------------*/ + +int _sys_ensure (FILEHANDLE fh) +{ + if (fh > 0x8000) { + return (-1); + } + #ifndef NO_FILESYSTEM + return (__sys_ensure (fh)); + #else + return(0) ; + #endif +} + +/*--------------------------- _sys_flen --------------------------------------*/ + +long _sys_flen (FILEHANDLE fh) +{ + if (fh > 0x8000) { + return (0); + } + #ifndef NO_FILESYSTEM + return (__sys_flen (fh)); + #else + return(0) ; + #endif +} + + +/*--------------------------- _sys_tmpnam ------------------------------------*/ + +int _sys_tmpnam (char *name, int sig, unsigned maxlen) +{ + return (1); +} + +/*--------------------------- _sys_command_string ----------------------------*/ + +char *_sys_command_string (char *cmd, int len) +{ + return (cmd); +} + +/*--------------------------- _sys_exit --------------------------------------*/ + +void _sys_exit (int return_code) +{ +#ifdef CYASSL_MDK_SHELL + return ; +#else + /* Endless loop. */ + while (1); +#endif + +} + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c new file mode 100644 index 00000000..d29fbf3b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c @@ -0,0 +1,28 @@ +/* certs_test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* Define initial data for cert buffers */ +#include + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h new file mode 100644 index 00000000..6629ee05 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h @@ -0,0 +1,39 @@ +#ifndef CYASSL_CERT_DATA_H +#define CYASSL_CERT_DATA_H + +#ifdef USE_CERT_BUFFERS_1024 +extern const unsigned char client_key_der_1024[] ; +extern int sizeof_client_key_der_1024 ; +/* ./certs/1024/client-cert.der, 1024-bit */ +extern const unsigned char client_cert_der_1024[] ; +extern int sizeof_client_cert_der_1024 ; +/* ./certs/1024/dh1024.der, 1024-bit */ +extern const unsigned char dh_key_der_1024[] ; +extern int sizeof_dh_key_der_1024 ; +/* ./certs/1024/dsa1024.der, 1024-bit */ +extern const unsigned char dsa_key_der_1024[] ; +extern int sizeof_dsa_key_der_1024 ; +/* ./certs/1024/rsa1024.der, 1024-bit */ +extern const unsigned char rsa_key_der_1024[] ; +extern int sizeof_rsa_key_der_1024 ; + +#elif defined(USE_CERT_BUFFERS_2048) +/* ./certs/client-key.der, 2048-bit */ +extern const unsigned char client_key_der_2048[] ; +extern int sizeof_client_key_der_2048 ; +/* ./certs/client-cert.der, 2048-bit */ +extern const unsigned char client_cert_der_2048[] ; +extern int sizeof_client_cert_der_2048 ; +/* ./certs/dh2048.der, 2048-bit */ +extern const unsigned char dh_key_der_2048[] ; +extern int sizeof_dh_key_der_2048 ; +/* ./certs/dsa2048.der, 2048-bit */ +extern const unsigned char dsa_key_der_2048[] ; +extern int sizeof_dsa_key_der_2048; +/* ./certs/rsa2048.der, 2048-bit */ +extern const unsigned char rsa_key_der_2048[] ; +extern int sizeof_rsa_key_der_2048 ; +#endif + +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h new file mode 100644 index 00000000..8bd713cd --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h @@ -0,0 +1,291 @@ +/* config-BEREFOOT.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/**** CyaSSL for KEIL-RL Configuration ****/ + +#define __CORTEX_M3__ +#define CYASSL_MDK_ARM +#define NO_WRITEV +#define NO_CYASSL_DIR +#define NO_MAIN_DRIVER + +#define CYASSL_DER_LOAD +#define HAVE_NULL_CIPHER + +#define SINGLE_THREADED +#define NO_FILESYSTEM +#define NO_TLS + +#define NO_ECHOSERVER +#define NO_ECHOCLIENT +#define NO_SIMPLE_SERVER +#define NO_SIMPLE_CLIENT + +// <<< Use Configuration Wizard in Context Menu >>> + +// Build Target: KEIL-BAREFOOT +// Single Threaded, No File System, No TCP-net +// +// Command Shell +#define MDK_CONF_SHELL 1 +#if MDK_CONF_SHELL == 1 +#define CYASSL_MDK_SHELL +#endif +// +// CyaSSL Apps +// Crypt/Cipher +// Cert Storage <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) +#define MDK_CONF_CERT_BUFF 1 +#if MDK_CONF_CERT_BUFF == 1 +#define USE_CERT_BUFFERS_1024 +#elif MDK_CONF_CERT_BUFF == 2 +#define USE_CERT_BUFFERS_2048 +#endif + +// Crypt/Cipher Test Suite +#define MDK_CONF_CTaoCryptTest 1 +#if MDK_CONF_CTaoCryptTest == 0 +#define NO_CRYPT_TEST +#endif +// +// Crypt/Cipher Benchmark +#define MDK_CONF_CTaoCryptBenchmark 1 +#if MDK_CONF_CTaoCryptBenchmark == 0 +#define NO_CRYPT_BENCHMARK +#define BENCH_EMBEDDED +#endif +// +// + +// STM32 Hardware Crypt +// STM32F2 Hardware RNG +#define MDK_CONF_STM32F2_RNG 0 +#if MDK_CONF_STM32F2_RNG == 1 +#define STM32F2_RNG +#else +#define NO_DEV_RANDOM +#endif +// +// STM32F2 Hardware Crypt +#define MDK_CONF_STM32F2_CRYPTO 0 +#if MDK_CONF_STM32F2_CRYPTO == 1 +#define STM32F2_CRYPTO +#endif +// + +// + + +// CTaoCrypt Library + +// MD5, SHA, SHA-256, AES, RC4, ASN, RSA +// +// MD2 +#define MDK_CONF_MD2 0 +#if MDK_CONF_MD2 == 1 +#define CYASSL_MD2 +#endif +// +// MD4 +#define MDK_CONF_MD4 1 +#if MDK_CONF_MD4 == 0 +#define NO_MD4 +#endif +// +// SHA-384 +// This has to be with SHA512 +#define MDK_CONF_SHA384 0 +#if MDK_CONF_SHA384 == 1 +#define CYASSL_SHA384 +#endif +// +// SHA-512 +#define MDK_CONF_SHA512 0 +#if MDK_CONF_SHA512 == 1 +#define CYASSL_SHA512 +#endif +// +// RIPEMD +#define MDK_CONF_RIPEMD 0 +#if MDK_CONF_RIPEMD == 1 +#define CYASSL_RIPEMD +#endif +// +// HMAC +#define MDK_CONF_HMAC 1 +#if MDK_CONF_HMAC == 0 +#define NO_HMAC +#endif +// +// HC128 +#define MDK_CONF_HC128 0 +#if MDK_CONF_HC128 == 1 +#define HAVE_HC128 +#endif +// +// RABBIT +#define MDK_CONF_RABBIT 1 +#if MDK_CONF_RABBI == 0 +#define NO_RABBIT +#endif +// + +// AEAD +#define MDK_CONF_AEAD 0 +#if MDK_CONF_AEAD == 1 +#define HAVE_AEAD +#endif +// +// DES3 +#define MDK_CONF_DES3 1 +#if MDK_CONF_DES3 == 0 +#define NO_DES3 +#endif +// +// CAMELLIA +#define MDK_CONF_CAMELLIA 0 +#if MDK_CONF_CAMELLIA == 1 +#define HAVE_CAMELLIA +#endif +// + +// DH +// need this for CYASSL_SERVER, OPENSSL_EXTRA +#define MDK_CONF_DH 1 +#if MDK_CONF_DH == 0 +#define NO_DH +#endif +// +// DSA +#define MDK_CONF_DSA 1 +#if MDK_CONF_DSA == 0 +#define NO_DSA +#endif +// +// PWDBASED +#define MDK_CONF_PWDBASED 1 +#if MDK_CONF_PWDBASED == 0 +#define NO_PWDBASED +#endif +// + +// ECC +#define MDK_CONF_ECC 0 +#if MDK_CONF_ECC == 1 +#define HAVE_ECC +#endif +// +// PSK +#define MDK_CONF_PSK 1 +#if MDK_CONF_PSK == 0 +#define NO_PSK +#endif +// +// AESCCM (Turn off Hardware Crypt) +#define MDK_CONF_AESCCM 0 +#if MDK_CONF_AESCCM == 1 +#define HAVE_AESCCM +#endif +// +// AESGCM (Turn off Hardware Crypt) +#define MDK_CONF_AESGCM 0 +#if MDK_CONF_AESGCM == 1 +#define HAVE_AESGCM +#define BUILD_AESGCM +#endif +// +// NTRU (need License, "crypto_ntru.h") +#define MDK_CONF_NTRU 0 +#if MDK_CONF_NTRU == 1 +#define HAVE_NTRU +#endif +// +// + +// Others + +// Inline +#define MDK_CONF_INLINE 0 +#if MDK_CONF_INLINE == 0 +#define NO_INLINE +#endif +// +// Debug +// Debug Message +#define MDK_CONF_DebugMessage 0 +#if MDK_CONF_DebugMessage == 1 +#define DEBUG_CYASSL +#endif +// +// Check malloc +#define MDK_CONF_CheckMalloc 1 +#if MDK_CONF_CheckMalloc == 1 +#define CYASSL_MALLOC_CHECK +#endif +// + + +// +// ErrNo.h +#define MDK_CONF_ErrNo 0 +#if MDK_CONF_ErrNo == 1 +#define HAVE_ERRNO +#endif +// +// zlib (need "zlib.h") +#define MDK_CONF_LIBZ 0 +#if MDK_CONF_LIBZ == 1 +#define HAVE_LIBZ +#endif +// +// CAVIUM (need CAVIUM headers) +#define MDK_CONF_CAVIUM 0 +#if MDK_CONF_CAVIUM == 1 +#define HAVE_CAVIUM +#endif +// + +// Error Strings +#define MDK_CONF_ErrorStrings 1 +#if MDK_CONF_ErrorStrings == 0 +#define NO_ERROR_STRINGS +#endif +// + +// Small Stack +#define MDK_CONF_SmallStack 1 +#if MDK_CONF_SmallStack == 0 +#define NO_CYASSL_SMALL_STACK +#endif +// +// Use Fast Math +#define MDK_CONF_FASTMATH 0 +#if MDK_CONF_FASTMATH == 1 +#define USE_FAST_MATH +#endif +// + + +// + +// +// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h new file mode 100644 index 00000000..c05fba66 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h @@ -0,0 +1,329 @@ +/* config-FS.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/**** CyaSSL for KEIL-RL Configuration ****/ + +#define __CORTEX_M3__ +#define CYASSL_KEIL_RL +#define NO_WRITEV +#define NO_CYASSL_DIR +#define NO_MAIN_DRIVER + + +#define CYASSL_DER_LOAD +#define HAVE_NULL_CIPHER + +#define SINGLE_THREADED + +#define NO_ECHOSERVER +#define NO_ECHOCLIENT +#define NO_SIMPLE_SERVER +#define NO_SIMPLE_CLIENT + +// <<< Use Configuration Wizard in Context Menu >>> + +// Build Target: KEIL-FS +// Single Threaded, With File System, No TCP-net +// +// Command Shell +#define MDK_CONF_SHELL 1 +#if MDK_CONF_SHELL == 1 +#define CYASSL_MDK_SHELL +#endif +// +// CyaSSL Apps +// Crypt/Cipher +// Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) +#define MDK_CONF_CERT_BUFF 0 +#if MDK_CONF_CERT_BUFF== 1 +#define USE_CERT_BUFFERS_1024 +#elif MDK_CONF_CERT_BUFF == 2 +#define USE_CERT_BUFFERS_2048 +#endif + +// Crypt/Cipher Test Suite +#define MDK_CONF_CTaoCryptTest 1 +#if MDK_CONF_CTaoCryptTest == 0 +#define NO_CRYPT_TEST +#endif +// +// Crypt/Cipher Benchmark +#define MDK_CONF_CTaoCryptBenchmark 1 +#if MDK_CONF_CTaoCryptBenchmark == 0 +#define NO_CRYPT_BENCHMARK +#endif +// +// + +// STM32 Hardware Crypt +// STM32F2 Hardware RNG +#define MDK_CONF_STM32F2_RNG 0 +#if MDK_CONF_STM32F2_RNG == 1 +#define STM32F2_RNG +#else +#define NO_DEV_RANDOM +#endif +// +// STM32F2 Hardware Crypt +#define MDK_CONF_STM32F2_CRYPTO 0 +#if MDK_CONF_STM32F2_CRYPTO == 1 +#define STM32F2_CRYPTO +#endif +// + +// + +// CyaSSL Library +// SSL (Included by default) +// + +// TLS +#define MDK_CONF_TLS 1 +#if MDK_CONF_TLS == 0 +#define NO_TLS +#endif +// + +// CertGen +#define MDK_CONF_CERT_GEN 0 +#if MDK_CONF_CERT_GEN == 1 +#define CYASSL_CERT_GEN +#endif +// +// KeyGen +#define MDK_CONF_KEY_GEN 0 +#if MDK_CONF_KEY_GEN == 1 +#define CYASSL_KEY_GEN +#endif +// +// CRL +#define MDK_CONF_DER_LOAD 0 +#if MDK_CONF_DER_LOAD == 1 +#define CYASSL_DER_LOAD +#endif +// +// OpenSSL Extra +#define MDK_CONF_OPENSSL_EXTRA 0 +#if MDK_CONF_OPENSSL_EXTRA == 1 +#define OPENSSL_EXTRA +#endif +// +// CRL Monitor, OCSP (not supported with KEIL) +// + +// + +// CTaoCrypt Library + +// MD5, SHA, SHA-256, AES, RC4, ASN, RSA +// + +// MD2 +#define MDK_CONF_MD2 0 +#if MDK_CONF_MD2 == 1 +#define CYASSL_MD2 +#endif +// +// MD4 +#define MDK_CONF_MD4 1 +#if MDK_CONF_MD4 == 0 +#define NO_MD4 +#endif +// +// SHA-384 +// This has to be with SHA512 +#define MDK_CONF_SHA384 0 +#if MDK_CONF_SHA384 == 1 +#define CYASSL_SHA384 +#endif +// +// SHA-512 +#define MDK_CONF_SHA512 0 +#if MDK_CONF_SHA512 == 1 +#define CYASSL_SHA512 +#endif +// +// RIPEMD +#define MDK_CONF_RIPEMD 0 +#if MDK_CONF_RIPEMD == 1 +#define CYASSL_RIPEMD +#endif +// +// HMAC +#define MDK_CONF_HMAC 1 +#if MDK_CONF_HMAC == 0 +#define NO_HMAC +#endif +// +// HC128 +#define MDK_CONF_HC128 0 +#if MDK_CONF_HC128 == 1 +#define HAVE_HC128 +#endif +// +// RABBIT +#define MDK_CONF_RABBIT 1 +#if MDK_CONF_RABBI == 0 +#define NO_RABBIT +#endif +// + +// AEAD +#define MDK_CONF_AEAD 0 +#if MDK_CONF_AEAD == 1 +#define HAVE_AEAD +#endif +// +// DES3 +#define MDK_CONF_DES3 1 +#if MDK_CONF_DES3 == 0 +#define NO_DES3 +#endif +// +// CAMELLIA +#define MDK_CONF_CAMELLIA 0 +#if MDK_CONF_CAMELLIA == 1 +#define HAVE_CAMELLIA +#endif +// + +// DH +// need this for CYASSL_SERVER, OPENSSL_EXTRA +#define MDK_CONF_DH 1 +#if MDK_CONF_DH == 0 +#define NO_DH +#endif +// +// DSA +#define MDK_CONF_DSA 1 +#if MDK_CONF_DSA == 0 +#define NO_DSA +#endif +// +// PWDBASED +#define MDK_CONF_PWDBASED 1 +#if MDK_CONF_PWDBASED == 0 +#define NO_PWDBASED +#endif +// + +// ECC +#define MDK_CONF_ECC 0 +#if MDK_CONF_ECC == 1 +#define HAVE_ECC +#endif +// +// PSK +#define MDK_CONF_PSK 1 +#if MDK_CONF_PSK == 0 +#define NO_PSK +#endif +// +// AESCCM (Turn off Hardware Crypt) +#define MDK_CONF_AESCCM 0 +#if MDK_CONF_AESCCM == 1 +#define HAVE_AESCCM +#endif +// +// AESGCM (Turn off Hardware Crypt) +#define MDK_CONF_AESGCM 0 +#if MDK_CONF_AESGCM == 1 +#define HAVE_AESGCM +#define BUILD_AESGCM +#endif +// +// NTRU (need License, "crypto_ntru.h") +#define MDK_CONF_NTRU 0 +#if MDK_CONF_NTRU == 1 +#define HAVE_NTRU +#endif +// +// + +// Others + +// Inline +#define MDK_CONF_INLINE 0 +#if MDK_CONF_INLINE == 0 +#define NO_INLINE +#endif +// +// Debug +// Debug Message +#define MDK_CONF_DebugMessage 0 +#if MDK_CONF_DebugMessage == 1 +#define DEBUG_CYASSL +#endif +// +// Check malloc +#define MDK_CONF_CheckMalloc 1 +#if MDK_CONF_CheckMalloc == 1 +#define CYASSL_MALLOC_CHECK +#endif +// + + +// +// ErrNo.h +#define MDK_CONF_ErrNo 0 +#if MDK_CONF_ErrNo == 1 +#define HAVE_ERRNO +#endif +// +// zlib (need "zlib.h") +#define MDK_CONF_LIBZ 0 +#if MDK_CONF_LIBZ == 1 +#define HAVE_LIBZ +#endif +// +// CAVIUM (need CAVIUM headers) +#define MDK_CONF_CAVIUM 0 +#if MDK_CONF_CAVIUM == 1 +#define HAVE_CAVIUM +#endif +// + +// Error Strings +#define MDK_CONF_ErrorStrings 1 +#if MDK_CONF_ErrorStrings == 0 +#define NO_ERROR_STRINGS +#endif +// + +// Small Stack +#define MDK_CONF_SmallStack 1 +#if MDK_CONF_SmallStack == 0 +#define NO_CYASSL_SMALL_STACK +#endif +// +// Use Fast Math +#define MDK_CONF_FASTMATH 0 +#if MDK_CONF_FASTMATH == 1 +#define USE_FAST_MATH +#endif +// + + +// + +// +// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h new file mode 100644 index 00000000..106e7718 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h @@ -0,0 +1,351 @@ +/* config-RTX-TCP-FS.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/**** CyaSSL for KEIL-RL Configuration ****/ + +#define __CORTEX_M3__ +#define CYASSL_MDK_ARM +#define NO_WRITEV +#define NO_CYASSL_DIR +#define NO_MAIN_DRIVER + + +#define CYASSL_DER_LOAD +#define HAVE_NULL_CIPHER + +#define HAVE_KEIL_RTX +#define CYASSL_KEIL_TCP_NET + + +// <<< Use Configuration Wizard in Context Menu >>> +// Build Target: KEIL-RTX-TCP-FS +// RTOS, File System and TCP-net +// +// Command Shell +#define MDK_CONF_SHELL 1 +#if MDK_CONF_SHELL == 1 +#define CYASSL_MDK_SHELL +#endif +// +// CyaSSL Apps +// Crypt/Cipher +// Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) +#define MDK_CONF_CERT_BUFF 0 +#if MDK_CONF_CERT_BUFF== 1 +#define USE_CERT_BUFFERS_1024 +#elif MDK_CONF_CERT_BUFF == 2 +#define USE_CERT_BUFFERS_2048 +#endif + +// Crypt/Cipher Test Suite +#define MDK_CONF_CTaoCryptTest 1 +#if MDK_CONF_CTaoCryptTest == 0 +#define NO_CRYPT_TEST +#endif +// +// Crypt/Cipher Benchmark +#define MDK_CONF_CTaoCryptBenchmark 1 +#if MDK_CONF_CTaoCryptBenchmark == 0 +#define NO_CRYPT_BENCHMARK +#define BENCH_EMBEDDED +#endif +// +// +// SSL/TLS Server/Client +// echoServer +#define MDK_CONF_echoServer 1 +#if MDK_CONF_echoServer == 0 +#define NO_ECHOSERVER +#endif +// +// echoClient +#define MDK_CONF_echoClient 1 +#if MDK_CONF_echoClient == 0 +#define NO_ECHOCLIENT +#endif +// +// SimpleServer +#define MDK_CONF_simpleServer 1 +#if MDK_CONF_simpleServer == 0 +#define NO_SIMPLE_SERVER +#endif +// +// SimpleCliet +#define MDK_CONF_simpleClient 1 +#if MDK_CONF_simpleClient == 0 +#define NO_SIMPLE_CLIENT +#endif +// +// +// +// STM32 Hardware Crypt +// STM32F2 Hardware RNG +#define MDK_CONF_STM32F2_RNG 0 +#if MDK_CONF_STM32F2_RNG == 1 +#define STM32F2_RNG +#else +#define NO_DEV_RANDOM +#endif +// +// STM32F2 Hardware Crypt +#define MDK_CONF_STM32F2_CRYPTO 0 +#if MDK_CONF_STM32F2_CRYPTO == 1 +#define STM32F2_CRYPTO +#endif +// + +// + +// CyaSSL Library +// SSL (Included by default) +// + +// TLS +#define MDK_CONF_TLS 1 +#if MDK_CONF_TLS == 0 +#define NO_TLS +#endif +// + +// CertGen +#define MDK_CONF_CERT_GEN 0 +#if MDK_CONF_CERT_GEN == 1 +#define CYASSL_CERT_GEN +#endif +// +// KeyGen +#define MDK_CONF_KEY_GEN 0 +#if MDK_CONF_KEY_GEN == 1 +#define CYASSL_KEY_GEN +#endif +// +// CRL +#define MDK_CONF_DER_LOAD 0 +#if MDK_CONF_DER_LOAD == 1 +#define CYASSL_DER_LOAD +#endif +// +// OpenSSL Extra +#define MDK_CONF_OPENSSL_EXTRA 1 +#if MDK_CONF_OPENSSL_EXTRA == 1 +#define OPENSSL_EXTRA +#endif +// +// CRL Monitor, OCSP (not supported with KEIL) +// + +// + +// CTaoCrypt Library + +// MD5, SHA, SHA-256, AES, RC4, ASN, RSA +// +// MD2 +#define MDK_CONF_MD2 0 +#if MDK_CONF_MD2 == 1 +#define CYASSL_MD2 +#endif +// +// MD4 +#define MDK_CONF_MD4 1 +#if MDK_CONF_MD4 == 0 +#define NO_MD4 +#endif +// +// SHA-384 +// This has to be with SHA512 +#define MDK_CONF_SHA384 0 +#if MDK_CONF_SHA384 == 1 +#define CYASSL_SHA384 +#endif +// +// SHA-512 +#define MDK_CONF_SHA512 0 +#if MDK_CONF_SHA512 == 1 +#define CYASSL_SHA512 +#endif +// +// RIPEMD +#define MDK_CONF_RIPEMD 1 +#if MDK_CONF_RIPEMD == 1 +#define CYASSL_RIPEMD +#endif +// +// HMAC +#define MDK_CONF_HMAC 1 +#if MDK_CONF_HMAC == 0 +#define NO_HMAC +#endif +// +// HC128 +#define MDK_CONF_HC128 0 +#if MDK_CONF_HC128 == 1 +#define HAVE_HC128 +#endif +// +// RABBIT +#define MDK_CONF_RABBIT 1 +#if MDK_CONF_RABBI == 0 +#define NO_RABBIT +#endif +// + +// AEAD +#define MDK_CONF_AEAD 0 +#if MDK_CONF_AEAD == 1 +#define HAVE_AEAD +#endif +// +// DES3 +#define MDK_CONF_DES3 1 +#if MDK_CONF_DES3 == 0 +#define NO_DES3 +#endif +// +// CAMELLIA +#define MDK_CONF_CAMELLIA 0 +#if MDK_CONF_CAMELLIA == 1 +#define HAVE_CAMELLIA +#endif +// + +// DH +// need this for CYASSL_SERVER, OPENSSL_EXTRA +#define MDK_CONF_DH 1 +#if MDK_CONF_DH == 0 +#define NO_DH +#endif +// +// DSA +#define MDK_CONF_DSA 1 +#if MDK_CONF_DSA == 0 +#define NO_DSA +#endif +// +// PWDBASED +#define MDK_CONF_PWDBASED 1 +#if MDK_CONF_PWDBASED == 0 +#define NO_PWDBASED +#endif +// + +// ECC +#define MDK_CONF_ECC 1 +#if MDK_CONF_ECC == 1 +#define HAVE_ECC +#endif +// +// PSK +#define MDK_CONF_PSK 1 +#if MDK_CONF_PSK == 0 +#define NO_PSK +#endif +// +// AESCCM (Turn off Hardware Crypt) +#define MDK_CONF_AESCCM 0 +#if MDK_CONF_AESCCM == 1 +#define HAVE_AESCCM +#endif +// +// AESGCM (Turn off Hardware Crypt) +#define MDK_CONF_AESGCM 0 +#if MDK_CONF_AESGCM == 1 +#define HAVE_AESGCM +#define BUILD_AESGCM +#endif +// +// NTRU (need License, "crypto_ntru.h") +#define MDK_CONF_NTRU 0 +#if MDK_CONF_NTRU == 1 +#define HAVE_NTRU +#endif +// +// + +// Others + +// Inline +#define MDK_CONF_INLINE 0 +#if MDK_CONF_INLINE == 0 +#define NO_INLINE +#endif +// +// Debug +// Debug Message +#define MDK_CONF_DEBUG_MSG 0 +#if MDK_CONF_DEBUG_MSG == 1 +#define DEBUG_CYASSL +#endif +// +// Check malloc +#define MDK_CONF_CHECK_MALLOC 1 +#if MDK_CONF_CHECK_MALLOC == 1 +#define CYASSL_MALLOC_CHECK +#endif +// + + +// +// ErrNo.h +#define MDK_CONF_ERR_NO 0 +#if MDK_CONF_ERR_NO == 1 +#define HAVE_ERRNO +#endif +// +// zlib (need "zlib.h") +#define MDK_CONF_LIBZ 0 +#if MDK_CONF_LIBZ == 1 +#define HAVE_LIBZ +#endif +// +// CAVIUM (need CAVIUM headers) +#define MDK_CONF_CAVIUM 0 +#if MDK_CONF_CAVIUM == 1 +#define HAVE_CAVIUM +#endif +// + +// Error Strings +#define MDK_CONF_ErrorStrings 1 +#if MDK_CONF_ErrorStrings == 0 +#define NO_ERROR_STRINGS +#endif +// + +// Small Stack +#define MDK_CONF_SMALL_STACK 1 +#if MDK_CONF_SMALL_STACK == 0 +#define NO_CYASSL_SMALL_STACK +#endif +// +// Use Fast Math +#define MDK_CONF_FASTMATH 0 +#if MDK_CONF_FASTMATH == 1 +#define USE_FAST_MATH +#endif +// + + +// + +// +// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h new file mode 100644 index 00000000..4d89d8fc --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h @@ -0,0 +1,46 @@ +/* config.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/**** CyaSSL for KEIL-RL Configuration ****/ + +#define __CORTEX_M3__ +#define CYASSL_MDK_ARM +#define NO_WRITEV +#define NO_CYASSL_DIR + +/* for Retarget.c */ +#define STDIO +#define BENCH_EMBEDDED + +#define CYASSL_DER_LOAD +#define HAVE_NULL_CIPHER + +#if defined(MDK_CONF_RTX_TCP_FS) +#include "config-RTX-TCP-FS.h" +#elif defined(MDK_CONF_TCP_FS) +#include "config-TCP-FS.h" +#elif defined(MDK_CONF_FS) +#include "config-FS.h" +#elif defined(MDK_CONF_BARE_METAL) +#include "config-BARE-METAL.h" +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c new file mode 100644 index 00000000..b8e3d59a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c @@ -0,0 +1,249 @@ +/* cyassl_MDK_ARM.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/***************************************************************************************/ +/** This file is for defining functions for specific to KEIL-RL. **/ +/***************************************************************************************/ +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#if defined (CYASSL_MDK5) + #include "cmsis_os.h" + #if defined(CYASSL_KEIL_TCP_NET) + #include "rl_net.h" + #endif +#else + #include +#endif + +#include "cyassl_MDK_ARM.h" + +#include +#include + +#if defined (CYASSL_CMSIS_RTOS) + #define os_dly_wait(t) osDelay(10*t) +#endif + + +/** KEIL-RL TCPnet ****/ +/** TCPnet BSD socket does not have following functions. **/ + +#if defined(CYASSL_KEIL_TCP_NET) +char *inet_ntoa(struct in_addr in) +{ + #define NAMESIZE 16 + static char name[NAMESIZE] ; + sprintf(name, "%d.%d.%d.%d", (in.s_addr>>24)&0xff, (in.s_addr>>16)&0xff, (in.s_addr>>8)&0xff, in.s_addr&0xff) ; + return name ; +} + +unsigned long inet_addr(const char *cp) +{ + unsigned int a[4] ; unsigned long ret ; + sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) ; + ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ; + return(ret) ; +} + + +/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/ +int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) +{ + int ret = 0 ; + #if defined(CYASSL_KEIL_TCP_NET) + + SOCKADDR_IN addr ; + + addr = *(SOCKADDR_IN *)sa ; + + do { + #undef connect /* Go to KEIL TCPnet connect */ + ret = connect(sd, (SOCKADDR *)&addr, sizeof(addr)) ; + os_dly_wait(50); + } while(ret == SCK_EWOULDBLOCK) ; + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Connect return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; +} + + +int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) +{ + int ret = 0 ; + + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef accept /* Go to KEIL TCPnet accept */ + ret = accept(sd, addr, addrlen) ; + if(ret != SCK_EWOULDBLOCK) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Accept return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; + +} + +int Cyassl_recv(int sd, void *buf, size_t len, int flags) +{ + int ret = 0; + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef recv /* Go to KEIL TCPnet recv */ + ret = recv(sd, buf, len, flags) ; + if((ret != SCK_EWOULDBLOCK) &&( ret != SCK_ETIMEOUT)) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Recv return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; +} + +int Cyassl_send(int sd, const void *buf, size_t len, int flags) +{ + int ret = 0 ; + + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef send /* Go to KEIL TCPnet send */ + ret = send(sd, buf, len, flags) ; + if(ret != SCK_EWOULDBLOCK) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Send return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + +#endif /* CYASSL_KEIL_TCP_NET */ + return(ret) ; + +} + +#endif /* CYASSL_KEIL_TCP_NET */ + +#if defined(CYASSL_KEIL_TCP_NET) +void Cyassl_sleep(int t) +{ + #if defined(HAVE_KEIL_RTX) + os_dly_wait(t/1000+1) ; + #endif +} + +int Cyassl_tcp_select(int sd, int timeout) +{ + + return 0 ; + +} +#endif + +extern int strlen(const char *s) ; + +FILE * CyaSSL_fopen(const char *name, const char *openmode) +{ + int i ; FILE * ret ; + #define PATHSIZE 100 + char path[PATHSIZE] ; char *p ; + + if(strlen(name) > PATHSIZE)return(NULL) ; + + for(i = 0; i<= strlen(name); i++) { + if(name[i] == '/')path[i] = '\\' ; + else path[i] = name[i] ; + } + if(path[0] == '.' && path[1] == '\\') p = path + 2 ; + else p = path ; + + ret = fopen (p, openmode) ; + + return(ret) ; +} + +#if defined (CYASSL_MDK5) +#define getkey getchar +#define sendchar putchar +#else +extern int getkey(void) ; +extern int sendchar(int c) ; +#endif + +char * Cyassl_fgets ( char * str, int num, FILE * f ) +{ + int i ; + + for(i = 0 ; i< num ; i++) { + while((str[i] = getkey()) == 0) { + #if defined (HAVE_KEIL_RTX) + #if !defined(CYASSL_CMSIS_RTOS) + os_tsk_pass (); + #else + osThreadYield (); + #endif + #endif + } + if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') { + sendchar('\n') ; + str[i++] = '\n' ; + str[i] = '\0' ; + break ; + } else if(str[i] == '\010') { /* BS */ + if(i) { /* erace one char */ + sendchar('\010') ; sendchar(' ') ; sendchar('\010') ; + i = (i>0 ? (i-2) : -1 ) ; + continue ; + } + } else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */ + str[i] = '\0' ; + return(0) ; + } + sendchar(str[i]) ; + } + return(str) ; +} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h new file mode 100644 index 00000000..b2616433 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h @@ -0,0 +1,103 @@ +/* cyassl_KEIL_RL.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/******************************************************************************/ +/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/ +/******************************************************************************/ +#ifndef CYASSL_KEIL_RL_H +#define CYASSL_KEIL_RL_H + + + +#include + +/* Go to STDIN */ +#define fgets(buff, sz, fd) Cyassl_fgets(buff, sz, fd) +extern char * Cyassl_fgets ( char * str, int num, FILE * f ) ; + +#define SOCKET_T int + +/*** #include ***/ +#define NUMBITSPERBYTE 8 +#define FD_SETSIZE 10 + +typedef long fd_mask; +#define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ + +typedef struct fd_set { + fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; +} fd_set; + +/*** #include ***/ +struct timeval { + long tv_sec; /* seconds */ + long tv_usec; /* microseconds */ +}; + + +/*** #include **/ +/* + int select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, const struct timeval *timeout); + void FD_CLR(int fd, fd_set *set); + int FD_ISSET(int fd, fd_set *set); + void FD_SET(int fd, fd_set *set); + void FD_ZERO(fd_set *set); +*/ +typedef int socklen_t ; + +/* for avoiding conflict with KEIL-TCPnet BSD socket */ +/* Bodies are in cyassl_KEIL_RL.c */ +#define connect Cyassl_connect +#define accept Cyassl_accept +#define recv Cyassl_recv +#define send Cyassl_send +#define sleep Cyassl_sleep + +/* for avoiding conflicting with KEIL-TCPnet TCP socket */ +/* Bodies are in test.h */ +#define tcp_connect Cyassl_tcp_connect +#define tcp_socket Cyassl_tcp_soket +#define tcp_listen Cyassl_tcp_listen +#define tcp_select Cyassl_tcp_select + +extern int Cyassl_connect(int sd, const struct sockaddr * sa, int sz) ; +extern int Cyassl_accept(int sd, struct sockaddr *addr, socklen_t *addrlen); +extern int Cyassl_recv(int sd, void *buf, size_t len, int flags); +extern int Cyassl_send(int sd, const void *buf, size_t len, int flags); +extern void Cyassl_sleep(int sec) ; +extern int Cyassl_tcp_select(int sd, int timeout) ; + +/** KEIL-RL TCPnet ****/ +/* TCPnet BSD socket does not have following functions. */ +extern char *inet_ntoa(struct in_addr in); +extern unsigned long inet_addr(const char *cp); +extern int setsockopt(int sockfd, int level, int optname, + const void *optval, socklen_t optlen); +extern int select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, const struct timeval *timeout); + +/* CyaSSL MDK-ARM time functions */ +#include +struct tm *Cyassl_MDK_gmtime(const time_t *c) ; +extern double current_time(void) ; + +#endif /* CYASSL_KEIL_RL_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c new file mode 100644 index 00000000..635267e3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c @@ -0,0 +1,172 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include +#include +#include "cyassl_MDK_ARM.h" + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +#if !defined(NO_FILESYSTEM) +static void init_card (void) +{ + U32 retv; + + while ((retv = finit (NULL)) != 0) { /* Wait until the Card is ready */ + if (retv == 1) { + printf ("\nSD/MMC Init Failed"); + printf ("\nInsert Memory card and press key...\n"); + } else { + printf ("\nSD/MMC Card is Unformatted"); + } + } +} +#endif + + +/*----------------------------------------------------------------------------- + * TCP/IP tasks + *----------------------------------------------------------------------------*/ +#ifdef CYASSL_KEIL_TCP_NET +__task void tcp_tick (void) +{ + + CYASSL_MSG("Time tick started.") ; + #if defined (HAVE_KEIL_RTX) + os_itv_set (10); + #endif + + while (1) { + #if defined (HAVE_KEIL_RTX) + os_itv_wait (); + #endif + /* Timer tick every 100 ms */ + timer_tick (); + } +} + +__task void tcp_poll (void) +{ + CYASSL_MSG("TCP polling started.\n") ; + while (1) { + main_TcpNet (); + #if defined (HAVE_KEIL_RTX) + os_tsk_pass (); + #endif + } +} +#endif + +#if defined(HAVE_KEIL_RTX) && defined(CYASSL_MDK_SHELL) +#define SHELL_STACKSIZE 1000 +static unsigned char Shell_stack[SHELL_STACKSIZE] ; +#endif + + +#if defined(CYASSL_MDK_SHELL) +extern void shell_main(void) ; +#endif + +extern void time_main(int) ; +extern void benchmark_test(void) ; +extern void SER_Init(void) ; + +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ + +/*** This is the parent task entry ***/ +void main_task (void) +{ + #ifdef CYASSL_KEIL_TCP_NET + init_TcpNet (); + + os_tsk_create (tcp_tick, 2); + os_tsk_create (tcp_poll, 1); + #endif + + #ifdef CYASSL_MDK_SHELL + #ifdef HAVE_KEIL_RTX + os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ; + #else + shell_main() ; + #endif + #else + + /************************************/ + /*** USER APPLICATION HERE ***/ + /************************************/ + printf("USER LOGIC STARTED\n") ; + + #endif + + #ifdef HAVE_KEIL_RTX + CYASSL_MSG("Terminating tcp_main\n") ; + os_tsk_delete_self (); + #endif + +} + + + int myoptind = 0; + char* myoptarg = NULL; + +#if defined(DEBUG_CYASSL) + extern void CyaSSL_Debugging_ON(void) ; +#endif + + +/*** main entry ***/ +extern void init_time(void) ; +extern void SystemInit(void); + +int main() { + + SystemInit(); + SER_Init() ; + #if !defined(NO_FILESYSTEM) + init_card () ; /* initializing SD card */ + #endif + + init_time() ; + + #if defined(DEBUG_CYASSL) + printf("Turning ON Debug message\n") ; + CyaSSL_Debugging_ON() ; + #endif + + #ifdef HAVE_KEIL_RTX + os_sys_init (main_task) ; + #else + main_task() ; + #endif + + return 0 ; /* There should be no return here */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c new file mode 100644 index 00000000..7b76c1d2 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c @@ -0,0 +1,595 @@ +/*shell.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + /*** tiny Shell for CyaSSL apps ***/ + + #ifdef HAVE_CONFIG_H + #include +#endif + +#include "cyassl/internal.h" +#undef RNG +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + #include + #include + #include "cyassl_MDK_ARM.h" +#endif + +#ifdef CYASSL_KEIL_NET +#include "cyassl/test.h" +#else +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; +#endif + +#ifdef NO_ECHOCLIENT +#define echoclient_test command_not_found +#endif +#ifdef NO_ECHOSERVER +#define echoserver_test command_not_found +#endif +#ifdef NO_SIMPLE_CLIENT +#define client_test command_not_found +#endif +#ifdef NO_SIMPLE_SERVER +#define server_test command_not_found +#endif +#ifdef NO_CRYPT_BENCHMARK +#define benchmark_test command_not_found +#endif +#ifdef NO_CRYPT_TEST +#define ctaocrypt_test command_not_found +#endif + +#ifndef CYASSL_KEIL_NET +#define ipaddr_comm command_not_found +#endif + +#if !defined(HAVE_KEIL_RTX) +#define stack_comm command_not_found +#endif + + +#if !defined(DEBUG_CYASSL) +#define dbg_comm command_not_found +#endif + + +void command_not_found(void *argv) { + printf("Command not found\n") ; +} + +extern void echoclient_test(void *args) ; +extern void echoserver_test(void *args) ; +extern void benchmark_test(void *args) ; +extern void ctaocrypt_test(void *args) ; +extern void client_test(void *args) ; +extern void server_test(void *args) ; +extern void kill_task(void *args) ; +extern void time_main(void *args) ; +extern void ipaddr_comm(void *args) ; +extern void stack_comm(void *args) ; +extern void for_command(void *args) ; +extern void dbg_comm(void *arg) ; +extern void help_comm(void *arg) ; + +#if !defined(NO_CRYPT_TEST) + +#ifndef NO_MD5 +extern void md5_test(void *arg) ; +#endif +#ifdef CYASSL_MD2 +extern void md2_test(void *arg) ; +#endif +#ifndef NO_MD4 +extern void md4_test(void *arg) ; +#endif + +extern void sha_test(void *arg) ; + +#ifndef NO_SHA256 +extern void sha256_test(void *arg) ; +#endif +#ifdef CYASSL_SHA384 +extern void sha384_test(void *arg) ; +#endif + +#ifdef CYASSL_SHA512 +extern void sha512_test(void *arg) ; +#endif + +#ifdef CYASSL_RIPEMD +extern void ripemd_test(void *arg) ; +#endif +#ifndef NO_HMAC + #ifndef NO_MD5 +extern void hmac_md5_test(void *arg) ; + #endif +extern void hmac_sha_test(void *arg) ; + + #ifndef NO_SHA256 +extern void hmac_sha256_test(void *arg) ; + #endif + + #ifdef CYASSL_SHA384 +extern void hmac_sha384_test(void *arg) ; + #endif +#endif +#ifndef NO_RC4 +extern void arc4_test(void *arg) ; +#endif + +#ifndef NO_HC128 +extern void hc128_test(void *arg) ; +#endif + +#ifndef NO_RABBIT +extern void rabbit_test(void *arg) ; +#endif + +#ifndef NO_DES3 +extern void des_test(void *arg) ; +extern void des3_test(void *arg) ; +#endif + +#ifndef NO_AES +extern void aes_test(void *arg) ; +#ifdef HAVE_AESGCM +extern void aesgcm_test(void *arg) ; +#endif + +#ifdef HAVE_AESCCM +extern void aesccm_test(void *arg) ; +#endif +#endif + +#ifdef HAVE_CAMELLIA +extern void camellia_test(void *arg) ; +#endif +extern void random_test(void *arg) ; + +#ifndef NO_RSA +extern void rsa_test(void *arg) ; +#endif + +#ifndef NO_DH +extern void dh_test(void *arg) ; +#endif + +#ifndef NO_DSA +extern void dsa_test(void *arg) ; +#endif + +#ifndef NO_PWDBASED +extern void pwdbased_test(void *arg) ; +#endif + +#ifdef HAVE_ECC +extern void openssl_test(void *arg) ; +#endif + +#ifdef HAVE_ECC +extern void ecc_test(void *arg) ; +#endif + +#endif /* NO_CRYPT_TEST */ + +static struct { + const char *command ; + void (*func)(void *args) ; +} commandTable[] = { + "echoclient", echoclient_test, + "echoserver", echoserver_test, + "benchmark", benchmark_test, + "test", ctaocrypt_test, + "client", client_test, + "server", server_test, + "time", time_main, /* get/set RTC: [-d yy/mm/dd] [-t hh:mm:ss]*/ + "ipaddr", ipaddr_comm, /* TBD */ + "stack", stack_comm, /* On/Off check stack size */ + "for", for_command, /* iterate next command X times */ + "debug", dbg_comm, /* On/Off debug message */ + "help", help_comm, /* Breif description about the commands */ + + /** short name **/ + "ec", echoclient_test, + "es", echoserver_test, + "bm", benchmark_test, + "te", ctaocrypt_test, + "cl", client_test, + "sv", server_test, + "ip", ipaddr_comm, + "st", stack_comm, + "dbg", dbg_comm, + "?", help_comm, + +/*** test suites ****/ +#if !defined(NO_CRYPT_TEST) +#ifndef NO_MD5 + "md5", md5_test, +#endif +#ifdef CYASSL_MD2 + "md2", md2_test, +#endif +#ifndef NO_MD4 + "md4", md4_test, +#endif + "sha", sha_test, +#ifndef NO_SHA256 + "sha256", sha256_test, +#endif +#ifdef CYASSL_SHA384 + "sha384", sha384_test, +#endif +#ifdef CYASSL_SHA512 + "sha512", sha512_test, +#endif +#ifdef CYASSL_RIPEMD + "ripemd", ripemd_test, +#endif +#ifndef NO_HMAC + #ifndef NO_MD5 + "hmac_md5", hmac_md5_test, + #endif + "hmac_sha", hmac_sha_test, + #ifndef NO_SHA256 + "hmac_sha256", hmac_sha256_test, + #endif + #ifdef CYASSL_SHA384 + "hmac_sha384", hmac_sha384_test, + #endif +#endif +#ifndef NO_RC4 + "arc4", arc4_test, +#endif +#ifndef NO_HC128 + "hc128", hc128_test, +#endif +#ifndef NO_RABBIT + "rabbit", rabbit_test, +#endif +#ifndef NO_DES3 + "des", des_test, + "des3", des3_test, +#endif +#ifndef NO_AES + "aes", aes_test, + #ifdef HAVE_AESGCM + "aesgcm", aesgcm_test, + #endif + #ifdef HAVE_AESCCM + "aesccm", aesccm_test, + #endif +#endif + +#ifdef HAVE_CAMELLIA + "camellia", camellia_test, +#endif + "random", random_test, +#ifndef NO_RSA + "rsa", rsa_test, +#endif +#ifndef NO_DH + "dh", dh_test, +#endif +#ifndef NO_DSA + "dsa", dsa_test, +#endif +#ifndef NO_PWDBASED + "pwdbased", pwdbased_test, +#endif +#ifdef OPENSSL_EXTRA + "openssl", openssl_test, +#endif +#ifdef HAVE_ECC + "ecc", ecc_test, +#endif + +#endif /* NO_CRYPT_TEST */ + + "", NULL +} ; + +enum jobtype { FORGROUND, BACKGROUND } ; + +#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n') + +/******* Get Command Line *****************************/ +static int getline(char * line, int sz, func_args *args, int*bf_flg) +{ + char * ret ; + int i ; + + #define MAXARGS 10 + #define MAXARGLEN 30 + static char *argv[MAXARGS] ; + args->argv = argv ; + + putchar('>') ; + fflush(stdout) ; + ret = fgets(line, sz, stdin) ; + #define SHELL_ERROR_FGETS -102 + if(ret != line) return(SHELL_ERROR_FGETS) ; + + if(line[strlen(line)-2] == '&') { + (*bf_flg) = BACKGROUND ; + line[strlen(line)-2] = '\n' ; + } else { + (*bf_flg) = FORGROUND ; + } + args->argc = 0 ; + for(i=0; iargv[args->argc] = &(line[i]) ; + while(!IF_DELIMITER(line[i])) i++ ; + args->argc++ ; + if(line[i] == '\n') { + line[i] = '\0' ; + break ; + } else { + line[i] = '\0' ; + } + } + return i ; +} + +static int BackGround = 0 ; /* 1: background job is running */ + +/************* Embedded Shell Commands **********************************/ +#define IP_SIZE 16 + +#ifdef CYASSL_KEIL_NET +static void ipaddr_comm(void *args) +{ + if(((func_args *)args)->argc == 1) { + printf("IP addr: %s, port %d\n", yasslIP, yasslPort) ; + } else { + if(BackGround != 0) { + printf("Cannot change IP addr while background server is running\n") ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-'&& + ((func_args *)args)->argv[1][1] == 'a' ) { +/* strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */ + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 'p' ) { +/* yasslPort = atoi(((func_args *)args)->argv[2]) ; */ + } else printf("Invalid argument\n") ; + } +} + +#endif + + + +#if defined(HAVE_KEIL_RTX) +static int stack_ck = 0 ; + +static void stack_comm(void *args) +{ + if(stack_ck) { + printf("Stack Check: Off\n") ; + stack_ck = 0 ; + } else { + printf("Stack Check: On\n") ; + stack_ck = 1 ; + } +} + +#define FILL_PATTERN 0xa596695a +void stack_fill(char * stack, int size) +{ + int i ; + + if(stack_ck == 0)return ; + for(i=1; iargc == 1) { + printf("For %d times\n", for_iteration) ; + } else if( args == NULL || ((func_args *)args)->argc == 2) { + for_iteration = atoi(((func_args *)args)->argv[1]) ; + } else printf("Invalid argument\n") ; +} + + +#if defined(DEBUG_CYASSL) + +static int CyasslDebug = 1 ; + +static void dbg_comm(void *args) +{ + if(CyasslDebug == 1) { + CyasslDebug = 0 ; + printf("Turning OFF Debug message\n") ; + CyaSSL_Debugging_OFF() ; + } else { + CyasslDebug = 1 ; + printf("Turning ON Debug message\n") ; + CyaSSL_Debugging_ON() ; + } +} +#endif + +static void help_comm(void *args) +{ + +} + + + +#define BG_JOB_STACK_SIZE 12000 +#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \ + defined(HAVE_KEIL_RTX) +static char bg_job_stack[BG_JOB_STACK_SIZE] ; +#endif + +#define COMMAND_STACK_SIZE 12000 +#if defined(HAVE_KEIL_RTX) +static char command_stack[COMMAND_STACK_SIZE] ; +#endif + + +#ifdef HAVE_KEIL_RTX +static CyaSSL_Mutex command_mutex ; +#endif + +/*********** Invoke Forground Command *********************/ +static void command_invoke(void *args) +{ + void (*func)(void * ) ; + int i,iteration ; + + func = (void(*)(void *))((func_args *)args)->argv[0] ; + #ifdef HAVE_KEIL_RTX + LockMutex((CyaSSL_Mutex *)&command_mutex) ; + #endif + iteration = for_iteration ; + for(i=0; i< iteration; i++) { + if(iteration > 1) printf("--- Start for %d ---->\n", i) ; + #if defined(HAVE_KEIL_RTX) + stack_fill(command_stack, COMMAND_STACK_SIZE) ; + #endif + + func(args) ; /* invoke command */ + + #if defined(HAVE_KEIL_RTX) + stack_check(command_stack, COMMAND_STACK_SIZE) ; + #endif + } + if(iteration > 1) + for_iteration = 1 ; + #ifdef HAVE_KEIL_RTX + UnLockMutex((CyaSSL_Mutex *)&command_mutex) ; + os_tsk_delete_self() ; + #endif +} + +#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \ + defined(HAVE_KEIL_RTX) +/******* Invoke Background Job *******************************/ +static void bg_job_invoke(void *args) +{ + void (*func)(void * ) ; + BackGround = 1 ; + stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ; + func = (void(*)(void *))((func_args *)args)->argv[0] ; + func(args) ; /* invoke command */ + stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ; + #ifdef CYASSL_KEIL_NET + init_TcpNet (); + #endif + BackGround = 0 ; + os_tsk_delete_self() ; ; +} +#endif + +#define LINESIZE 100 +static char line[LINESIZE] ; + + +/********* SHEULL MAIN LOOP ***********************************/ +void shell_main(void) { + int i ; + func_args args ; + int bf_flg ; + + i = BackGround ; + /* Dummy for avoiding warning: BackGround is defined but not used. */ + + + #if defined(HAVE_KEIL_RTX) + InitMutex(&command_mutex) ; +#endif + time_main(NULL) ; + printf("Starting Shell\n") ; + while(1) { + if(getline(line, LINESIZE, &args, &bf_flg) > 0) { + for(i=0; commandTable[i].func != NULL; i++) { + if(strcmp(commandTable[i].command, args.argv[0]) == 0) { + args.argv[0] = (char *) commandTable[i].func ; + if(bf_flg == FORGROUND) { + #ifdef HAVE_KEIL_RTX + UnLockMutex((CyaSSL_Mutex *)&command_mutex) ; + os_tsk_create_user_ex( (void(*)(void *))&command_invoke, 7, + command_stack, COMMAND_STACK_SIZE, &args) ; + #else + command_invoke(&args) ; + #endif + #ifdef HAVE_KEIL_RTX + LockMutex((CyaSSL_Mutex *)&command_mutex) ; + #endif + } else { + #if (!defined(NO_SIMPLE_SERVER) && \ + !defined(NO_ECHOSERVER)) && \ + defined(HAVE_KEIL_RTX) + if(BackGround != 0) { + printf("Multiple background servers not supported.\n") ; + } else { + printf("\"%s\" is running with the background mode.\n", + commandTable[i].command) ; + os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, + 6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ; + } + #else + printf("Invalid Command: no background job\n") ; + #endif + } + break ; + } + } + if(commandTable[i].func == NULL) + printf("Command not found\n") ; + } + } +} + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c new file mode 100644 index 00000000..47f0b201 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c @@ -0,0 +1,53 @@ +/* ssl-dummy.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include +#include +#include + +Signer* GetCA(void* vp, byte* hash) +{ + Signer*s ; + return s ; +} + +int CyaSSL_dtls(CYASSL* ssl) +{ + return ssl->options.dtls; +} + +int CyaSSL_get_using_nonblock(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_get_using_nonblock"); + CYASSL_LEAVE("CyaSSL_get_using_nonblock", ssl->options.usingNonblock); + return ssl->options.usingNonblock; +} + +Signer* GetCAByName(void* vp, byte* hash) +{ + Signer * ca ; + return(ca) ; +} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini new file mode 100644 index 00000000..5f72e110 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini @@ -0,0 +1,22 @@ +/******************************************************************************/ +/* Dbg_Flash.ini Initialization File for Debugging from Internal */ +/* Flash for NXP LPC18xx/LPC43xx */ +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2005-2012 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + +FUNC void Per_Reset (void) { + // Reset peripherals: LCD, USB0, USB1, DMA, SDIO, ETHERNET + _WDWORD(0x40053100, 0x005F0000); // Issue reset + _sleep_(1); +} + +Per_Reset(); // Reset some peripherals + +KILL BUTTON * // Kill all buttons +DEFINE BUTTON "Reset Peripherals", "Per_Reset()" // Create peripheral reset button + diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c new file mode 100644 index 00000000..9a162ba8 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c @@ -0,0 +1,401 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - FlashFS + *---------------------------------------------------------------------------- + * Name: FILE_CONFIG.C + * Purpose: Configuration of RL FlashFS by user + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * This code is part of the RealView Run-Time Library. + * Copyright (c) 2004-2013 KEIL - An ARM Company. All rights reserved. + *---------------------------------------------------------------------------*/ + +#include + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// File System +// ============== +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define N_FILES 6 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACNT 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CADR 0x60000000 + +// +// CPU Clock Frequency [Hz]<0-1000000000> +// Define the CPU Clock frequency used for +// flash programming and erasing. +#define CPU_CLK 180000000 + +// +// Flash Drive +// ============== +// Enable Embedded Flash Drive [F:] +#define FL0_EN 0 + +// Base address <0x0-0xFFFFF000:0x1000> +// Define the target device Base address +// Default: 0x80000000 +#define FL0_BADR 0x80000000 + +// Device Size <0x4000-0xFFFFF000:0x4000> +// Define the size of Flash device in bytes +// Default: 0x100000 (1MB) +#define FL0_SIZE 0x0200000 + +// Content of Erased Memory <0=>0x00 <0xFF=>0xFF +// Define the initial value for erased Flash data +// Default: 0xFF +#define FL0_INITV 0xFF + +// Device Description file +// Specify a file name with a relative path +// Default: FS_FlashDev.h +#define FL0_HFILE "FS_FlashDev.h" + +// Default Drive [F:] +// Used when Drive letter not specified +#define FL0_DEF 1 + +// +// SPI Flash Drive +// ================== +// Enable SPI Flash Drive [S:] +#define SF0_EN 0 + +// Device Size <0x10000-0xFFFFF000:0x8000> +// Define the size of SPI Flash device in bytes +// Default: 0x100000 (1MB) +#define SF0_SIZE 0x0200000 + +// Content of Erased Memory <0=>0x00 <0xFF=>0xFF +// Define the initial value for erased Flash data +// Default: 0xFF +#define SF0_INITV 0xFF + +// Device Description file +// Specify a file name with a relative path +// Default: FS_SPI_FlashDev.h +#define SF0_HFILE "FS_SPI_FlashDev.h" + +// Default Drive [S:] +// Used when Drive letter not specified +#define SF0_DEF 0 + +// +// RAM Drive +// ============ +// Enable Embedded RAM Drive [R:] +#define RAM0_EN 0 + +// Device Size <0x4000-0xFFFFF000:0x4000> +// Define the size of RAM device in bytes +// Default: 0x40000 +#define RAM0_SIZE 0x004000 + +// Number of Sectors <8=>8 <16=>16 <32=>32 <64=>64 <128=>128 +// Define number of virtual sectors for RAM device +// Default: 32 +#define RAM0_NSECT 64 + +// Relocate Device Buffer +// Locate RAM Device Buffer at a specific address. +// If not enabled, the linker selects base address. +#define RAM0_RELOC 1 + +// Base address <0x0-0xFFFFF000:0x1000> +// Define the target device Base address. +// Default: 0x81000000 +#define RAM0_BADR 0x81010000 + +// +// Default Drive [R:] +// Used when Drive letter not specified +#define RAM0_DEF 0 + +// +// Memory Card Drive 0 +// ====================== +// Enable Memory Card Drive [M0:] +#define MC0_EN 1 + +// Bus Mode <0=>SD-Native <1=>SPI +// Define Memory Card bus interface mode. +// SD-Native mode needs MCI peripheral. +// SPI mode uses SD Card in SPI mode. +#define MC0_SPI 0 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define MC0_CASZ 4 + +// Relocate Cache Buffer +// Locate Cache Buffer at a specific address. +// Some devices like NXP LPC23xx require a Cache buffer +// for DMA transfer located at specific address. +#define MC0_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +// For LPC23xx/24xx devices this is USB RAM +// starting at 0x7FD00000. +#define MC0_CADR 0x7FD00000 + +// +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define MC0_FSJ 0 + +// Default Drive [M0:] +// Used when Drive letter not specified +#define MC0_DEF 1 + +// +// Memory Card Drive 1 +// ====================== +// Enable Memory Card Drive [M1:] +#define MC1_EN 0 + +// Bus Mode <0=>SD-Native <1=>SPI +// Define Memory Card bus interface mode. +// SD-Native mode needs MCI peripheral. +// SPI mode uses SD Card in SPI mode. +#define MC1_SPI 1 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define MC1_CASZ 0 + +// Relocate Cache Buffer +// Locate Cache Buffer at a specific address. +// Some devices like NXP LPC23xx require a Cache buffer +// for DMA transfer located at specific address. +#define MC1_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +// For LPC23xx/24xx devices this is USB RAM +// starting at 0x7FD00000. +#define MC1_CADR 0x7FD00000 + +// +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define MC1_FSJ 0 + +// Default Drive [M1:] +// Used when Drive letter not specified +#define MC1_DEF 0 + +// +// USB Flash Drive 0 +// ==================== +// Enable USB Flash Drive [U0:] +#define USB0_EN 0 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define USB0_CASZ 8 + +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define USB0_FSJ 0 + +// Default Drive [U0:] +// Used when Drive letter not specified +#define USB0_DEF 0 + +// +// USB Flash Drive 1 +// ==================== +// Enable USB Flash Drive [U1:] +#define USB1_EN 0 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define USB1_CASZ 8 + +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define USB1_FSJ 0 + +// Default Drive [U1:] +// Used when Drive letter not specified +#define USB1_DEF 0 + +// +// NAND Flash Drive 0 +// =================== +// Enable NAND Flash Drive [N0:] +#define NAND0_EN 0 + +// Page size <528=> 512 + 16 bytes +// <2112=>2048 + 64 bytes +// <4224=>4096 + 128 bytes +// <8448=>8192 + 256 bytes +// Define program Page size in bytes (User + Spare area). +#define NAND0_PGSZ 2112 + +// Block Size <8=>8 pages <16=>16 pages <32=>32 pages +// <64=>64 pages <128=>128 pages <256=>256 pages +// Define number of pages in a block. +#define NAND0_PGCNT 64 + +// Device Size [blocks] <512-32768> +// Define number of blocks in NAND Flash device. +#define NAND0_BLCNT 4096 + +// Page Caching <0=>OFF <1=>1 page <2=>2 pages <4=>4 pages +// <8=>8 pages <16=>16 pages <32=>32 pages +// Define number of cached Pages. +// Default: 4 pages +#define NAND0_CAPG 2 + +// Block Indexing <0=>OFF <1=>1 block <2=>2 blocks <4=>4 blocks +// <8=>8 blocks <16=>16 blocks <32=>32 blocks +// <64=>64 blocks <128=>128 blocks <256=>256 blocks +// Define number of indexed Flash Blocks. +// Increase this number for better performance. +// Default: 16 blocks +#define NAND0_CABL 16 + +// Software ECC <0=>None <1=>Hamming (SLC) +// Enable software ECC calculation only, +// if not supported by hardware. +#define NAND0_SWECC 1 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define NAND0_CASZ 4 + +// Relocate Cache Buffers +// Use this option to locate Cache buffers +// at specific address in RAM or SDRAM. +#define NAND0_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define base address for Cache Buffers. +#define NAND0_CADR 0x80000000 + +// +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define NAND0_FSJ 0 + +// Default Drive [N0:] +// Used when Drive letter not specified +#define NAND0_DEF 0 + +// +// NAND Flash Drive 1 +// =================== +// Enable NAND Flash Drive [N1:] +#define NAND1_EN 0 + +// Page size <528=> 512 + 16 bytes +// <2112=>2048 + 64 bytes +// <4224=>4096 + 128 bytes +// <8448=>8192 + 256 bytes +// Define program Page size in bytes (User + Spare area). +#define NAND1_PGSZ 2112 + +// Block Size <8=>8 pages <16=>16 pages <32=>32 pages +// <64=>64 pages <128=>128 pages <256=>256 pages +// Define number of pages in a block. +#define NAND1_PGCNT 32 + +// Device Size [blocks] <512-32768> +// Define number of blocks in NAND Flash device. +#define NAND1_BLCNT 512 + +// Page Caching <0=>OFF <1=>1 page <2=>2 pages <4=>4 pages +// <8=>8 pages <16=>16 pages <32=>32 pages +// Define number of cached Pages. +// Default: 4 pages +#define NAND1_CAPG 4 + +// Block Indexing <0=>OFF <1=>1 block <2=>2 blocks <4=>4 blocks +// <8=>8 blocks <16=>16 blocks <32=>32 blocks +// <64=>64 blocks <128=>128 blocks <256=>256 blocks +// Define number of indexed Flash Blocks. +// Increase this number for better performance. +// Default: 16 blocks +#define NAND1_CABL 16 + +// Software ECC <0=>None <1=>Hamming (SLC) +// Enable software ECC calculation only, +// if not supported by hardware. +#define NAND1_SWECC 0 + +// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Define System Cache buffer size for file IO. +// Increase this number for faster r/w access. +// Default: 4 kB +#define NAND1_CASZ 4 + +// Relocate Cache Buffers +// Use this option to locate Cache buffers +// at specific address in RAM or SDRAM. +#define NAND1_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define base address for Cache Buffers. +#define NAND1_CADR 0x80000000 + +// +// FAT Journal +// Enable FAT Journal in order to guarantee +// fail-safe FAT file system operation. +#define NAND1_FSJ 0 + +// Default Drive [N1:] +// Used when Drive letter not specified +#define NAND1_DEF 0 + +// + +//------------- <<< end of configuration section >>> ----------------------- + +#ifndef __NO_FILE_LIB_C +#include +#endif + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c new file mode 100644 index 00000000..dc092230 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c @@ -0,0 +1,892 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - TCPnet + *---------------------------------------------------------------------------- + * Name: NET_CONFIG.C + * Purpose: Configuration of RL TCPnet by user. + * Rev.: V4.60 + *---------------------------------------------------------------------------- + * This code is part of the RealView Run-Time Library. + * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. + *---------------------------------------------------------------------------*/ + +#include + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// System Definitions +// ===================== +// Global TCPnet System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "mcb2300" +#define LHOST_NAME "mcb2300" + +// Memory Pool size <1500-64000:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// TCPnet packets are allocated from this memory pool. +// Default: 8000 bytes +#define MEM_SIZE 4000 + +// Tick Timer interval <10=> 10 ms <20=> 20 ms <25=> 25 ms +// <40=> 40 ms <50=> 50 ms <100=> 100 ms +// <200=> 200 ms +// System Tick Timer interval for software timers +// Default: 100 ms +#define TICK_INTERVAL 10 + +// +// Ethernet Network Interface +// ============================= +// Enable or disable Ethernet Network Interface +#define ETH_ENABLE 1 + +// MAC Address +// ============== +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x00 +#define _MAC1 0x30 + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define _MAC2 0x06 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define _MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0x00 +#define _MAC4 0x00 + +// Address byte 5 <0x00-0xff> +// Default: 0x00 +#define _MAC5 0x00 + +// Address byte 6 <0x00-0xff> +// Default: 0x01 +#define _MAC6 0x01 + +// +// IP Address +// ============= +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define _IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define _IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define _IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define _IP4 100 + +// +// Subnet mask +// ============== +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define _MSK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define _MSK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define _MSK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define _MSK4 0 + +// +// Default Gateway +// ================== +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define _GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define _GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define _GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define _GW4 254 + +// +// Primary DNS Server +// ===================== +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _pDNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _pDNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _pDNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define _pDNS4 129 + +// +// Secondary DNS Server +// ======================= +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _sDNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _sDNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _sDNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define _sDNS4 130 + +// +// ARP Definitions +// ================== +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ARP_TABSIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ARP_TIMEOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ARP_MAXRETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ARP_RESEND 10 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ARP_NOTIFY 1 + +// +// IGMP Group Management +// ======================== +// Enable or disable Internet Group Management Protocol +#define IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define IGMP_TABSIZE 5 + +// +// NetBIOS Name Service +// ======================= +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define NBNS_ENABLE 0 + +// Dynamic Host Configuration +// ============================= +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define DHCP_ENABLE 1 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define DHCP_BOOTF 1 + +// +// + +// PPP Network Interface +// ======================== +// Enable or disable PPP Network Interface +#define PPP_ENABLE 0 + +// IP Address +// ============= +// Local Static IP Address +// Address byte 1 <0-255> +// Default: 192 +#define _IP1P 192 + +// Address byte 2 <0-255> +// Default: 168 +#define _IP2P 168 + +// Address byte 3 <0-255> +// Default: 125 +#define _IP3P 125 + +// Address byte 4 <0-255> +// Default: 1 +#define _IP4P 1 + +// +// Subnet mask +// ============== +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define _MSK1P 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define _MSK2P 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define _MSK3P 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define _MSK4P 0 + +// +// Primary DNS Server +// ===================== +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _pDNS1P 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _pDNS2P 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _pDNS3P 2 + +// Address byte 4 <0-255> +// Default: 129 +#define _pDNS4P 129 + +// +// Secondary DNS Server +// ======================= +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _sDNS1P 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _sDNS2P 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _sDNS3P 2 + +// Address byte 4 <0-255> +// Default: 130 +#define _sDNS4P 130 + +// +// Logon Authentication +// ======================= +// Enable or disable user authentication +#define PPP_AUTHEN 1 + +// Unsecured password (PAP) +// Allow or use Password Authentication Protocol. +#define PPP_PAPEN 1 + +// Secured password (CHAP-MD5) +// Request or use Challenge Handshake Authentication +// Protocol with MD5 digest algorithm. +#define PPP_CHAPEN 1 + +// +// Obtain Client IP address automatically +// ========================================= +// This option only applies when PPP Dial-up is used to dial +// to remote PPP Server. If checked, network connection +// dynamically obtains an IP address from remote PPP Server. +#define PPP_GETIP 1 + +// Use Default Gateway on remote Network +// ======================================== +// This option only applies when both Ethernet and PPP Dial-up +// are used. If checked, data that cannot be sent to local LAN +// is forwarded to Dial-up network instead. +#define PPP_DEFGW 1 + +// Async Control Character Map <0x0-0xffffffff> +// A bit-map of control characters 0-31, which are +// transmitted escaped as a 2 byte sequence. +// For XON/XOFF set this value to: 0x000A 0000 +// Default: 0x00000000 +#define PPP_ACCM 0x00000000 + +// LCP Echo Interval in seconds <0-3600> +// If no frames are received within this interval, PPP sends an +// Echo Request and expects an Echo Response from the peer. +// If the response is not received, the link is terminated. +// A value of 0 disables the LCP Echo test. +// Default: 30 +#define PPP_ECHOTOUT 30 + +// Number of Retries <0-20> +// How many times PPP will try to retransmit data +// before giving up. Increase this value for links +// with low baud rates or high latency. +// Default: 3 +#define PPP_MAXRETRY 3 + +// Retry Timeout in seconds <1-10> +// If no response received within this time frame, +// PPP module will try to resend the data again. +// Default: 2 +#define PPP_RETRYTOUT 2 + +// +// SLIP Network Interface +// ======================== +// Enable or disable SLIP Network Interface +#define SLIP_ENABLE 0 + +// IP Address +// ============= +// Local Static IP Address +// Address byte 1 <0-255> +// Default: 192 +#define _IP1S 192 + +// Address byte 2 <0-255> +// Default: 168 +#define _IP2S 168 + +// Address byte 3 <0-255> +// Default: 225 +#define _IP3S 225 + +// Address byte 4 <0-255> +// Default: 1 +#define _IP4S 1 + +// +// Subnet mask +// ============== +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define _MSK1S 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define _MSK2S 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define _MSK3S 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define _MSK4S 0 + +// +// Primary DNS Server +// ===================== +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _pDNS1S 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _pDNS2S 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _pDNS3S 2 + +// Address byte 4 <0-255> +// Default: 129 +#define _pDNS4S 129 + +// +// Secondary DNS Server +// ======================= +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define _sDNS1S 194 + +// Address byte 2 <0-255> +// Default: 25 +#define _sDNS2S 25 + +// Address byte 3 <0-255> +// Default: 2 +#define _sDNS3S 2 + +// Address byte 4 <0-255> +// Default: 130 +#define _sDNS4S 130 + +// +// Use Default Gateway on remote Network +// ======================================== +// This option only applies when both Ethernet and SLIP Dial-up +// are used. If checked, data that cannot be sent to local LAN +// is forwarded to Dial-up network instead. +#define SLIP_DEFGW 1 + +// +// UDP Sockets +// ============== +// Enable or disable UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-20> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUMSOCKS 20 + +// +// TCP Sockets +// ============== +// Enable or disable TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUMSOCKS 10 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAXRETRY 20 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRYTOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFTOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAXSEGSZ 1460 + +/* TCP fixed timeouts */ +#define TCP_INIT_RETRY_TOUT 1 /* TCP initial Retransmit period in sec. */ +#define TCP_SYN_RETRY_TOUT 2 /* TCP SYN frame retransmit period in sec. */ +#define TCP_CONRETRY 7 /* Number of retries to establish a conn. */ + +// +// HTTP Server +// ============== +// Enable or disable HTTP Server +#define HTTP_ENABLE 0 + +// Number of HTTP Sessions <1-10> +// Number of simultaneously active HTTP Sessions. +// Default: 3 +#define HTTP_NUMSESS 3 + +// Port Number <1-65535> +// Listening port number. +// Default: 80 +#define HTTP_PORTNUM 80 + +// Server-Id header +// This value is optional. If specified, it overrides +// the default HTTP Server header from the library. +// Default: "" +#define HTTP_SRVID "" + +// Enable User Authentication +// When enabled, the user will have to authenticate +// himself by username and password before accessing +// any page on this Embedded WEB server. +#define HTTP_ENAUTH 1 + +// Authentication Realm +// Default: "Embedded WEB Server" +#define HTTP_AUTHREALM "Embedded WEB Server" + +// Authentication Username +// Default: "admin" +#define HTTP_AUTHUSER "admin" + +// Authentication Password +// Default: "" +#define HTTP_AUTHPASSW "" + +// +// +// Telnet Server +// ================ +// Enable or disable Telnet Server +#define TNET_ENABLE 0 + +// Number of Telnet Connections <1-10> +// Number of simultaneously active Telnet Connections. +// Default: 1 +#define TNET_NUMSESS 1 + +// Port Number <1-65535> +// Listening port number. +// Default: 23 +#define TNET_PORTNUM 23 + +// Idle Connection Timeout in seconds <0-3600> +// When timeout expires, the connection is closed. +// A value of 0 disables disconnection on timeout. +// Default: 120 +#define TNET_IDLETOUT 120 + +// Disable Echo +// When disabled, the server will not echo +// characters it receives. +// Default: Not disabled +#define TNET_NOECHO 0 + +// Enable User Authentication +// When enabled, the user will have to authenticate +// himself by username and password before access +// to the system is allowed. +#define TNET_ENAUTH 1 + +// Authentication Username +// Default: "admin" +#define TNET_AUTHUSER "admin" + +// Authentication Password +// Default: "" +#define TNET_AUTHPASSW "" + +// +// +// TFTP Server +// ============== +// Enable or disable TFTP Server +#define TFTP_ENABLE 0 + +// Number of TFTP Sessions <1-10> +// Number of simultaneously active TFTP Sessions +// Default: 1 +#define TFTP_NUMSESS 1 + +// Port Number <1-65535> +// Listening port number. +// Default: 69 +#define TFTP_PORTNUM 69 + +// Enable Firewall Support +// Use the same Port Number to receive +// requests and send answers to clients. +// Default: Not Enabled +#define TFTP_ENFWALL 0 + +// Inactive Session Timeout in seconds <5-120> +// When timeout expires TFTP Session is closed. +// Default: 15 +#define TFTP_DEFTOUT 15 + +// Number of Retries <1-10> +// How many times TFTP Server will try to +// retransmit the data before giving up. +// Default: 4 +#define TFTP_MAXRETRY 4 + +// +// TFTP Client +// ============== +// Enable or disable TFTP Client +#define TFTPC_ENABLE 0 + +// Block Size <128=>128 <256=>256 <512=>512 +// <1024=>1024 <1428=>1428 +// Size of transfer block in bytes. +// Default: 512 +#define TFTPC_BLOCKSZ 512 + +// Number of Retries <1-10> +// How many times TFTP Client will try to +// retransmit the data before giving up. +// Default: 4 +#define TFTPC_MAXRETRY 4 + +// Retry Timeout <2=>200 ms <5=>500 ms <10=>1 sec +// <20=>2 sec <50=>5 sec <100=>10 sec +// If data frame not acknowledged within this time frame, +// TFTP Client will try to resend the data again. +// Default: 500 ms +#define TFTPC_RETRYTO 5 + +// +// FTP Server +// ============== +// Enable or disable FTP Server +#define FTP_ENABLE 0 + +// Number of FTP Sessions <1-10> +// Number of simultaneously active FTP Sessions +// Default: 1 +#define FTP_NUMSESS 1 + +// Port Number <1-65535> +// Listening port number. +// Default: 21 +#define FTP_PORTNUM 21 + +// Welcome Message +// This value is optional. If specified, +// it overrides the default welcome message. +// Default: "" +#define FTP_WELMSG "" + +// Idle Session Timeout in seconds <0-3600> +// When timeout expires, the connection is closed. +// A value of 0 disables disconnection on timeout. +// Default: 120 +#define FTP_IDLETOUT 120 + +// Enable User Authentication +// When enabled, the user will have to authenticate +// himself by username and password before access +// to the system is allowed. +#define FTP_ENAUTH 1 + +// Authentication Username +// Default: "admin" +#define FTP_AUTHUSER "admin" + +// Authentication Password +// Default: "" +#define FTP_AUTHPASSW "" + +// +// +// FTP Client +// ============= +// Enable or disable FTP Client +#define FTPC_ENABLE 0 + +// Response Timeout in seconds <1-120> +// This is a time for FTP Client to wait for a response from +// the Server. If timeout expires, Client aborts operation. +// Default: 10 +#define FTPC_DEFTOUT 10 + +// Passive mode (PASV) +// The client initiates a data connection to the server. +// Default: Not passive (Active) +#define FTPC_PASVMODE 0 + +// +// DNS Client +// ============= +// Enable or disable DNS Client +#define DNS_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_TABSIZE 20 + +// +// SMTP Client +// ============== +// Enable or disable SMTP Client +#define SMTP_ENABLE 0 + +// Response Timeout in seconds <5-120> +// This is a time for SMTP Client to wait for a response from +// SMTP Server. If timeout expires, Client aborts operation. +// Default: 20 +#define SMTP_DEFTOUT 20 + +// +// SNMP Agent +// ============= +// Enable or disable SNMP Agent +#define SNMP_ENABLE 0 + +// Community Name +// Defines where an SNMP message is destined for. +// Default: "public" +#define SNMP_COMMUNITY "public" + +// Port Number <1-65535> +// Listening port number. +// Default: 161 +#define SNMP_PORTNUM 161 + +// Trap Port Number <1-65535> +// Port number for Trap operations. +// Default: 162 +#define SNMP_TRAPPORT 162 + +// Trap Server +// ============== +// Trap Server IP Address +// Address byte 1 <0-255> +// Default: 192 +#define SNMP_TRAPIP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define SNMP_TRAPIP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define SNMP_TRAPIP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define SNMP_TRAPIP4 100 + +// +// +// BSD Socket Interface +// ======================= +// Enable or disable Berkeley Socket Programming Interface +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUMSOCKS 10 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SRVSOCKS 2 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RCVTOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_GETHOSTEN 1 + +// +//------------- <<< end of configuration section >>> ----------------------- + +/*---------------------------------------------------------------------------- + * Fatal Error Handler + *---------------------------------------------------------------------------*/ + +void sys_error (ERROR_CODE code) { + /* This function is called when a fatal error is encountered. The normal */ + /* program execution is not possible anymore. Add your crytical error .*/ + /* handler code here. */ + + switch (code) { + case ERR_MEM_ALLOC: + /* Out of memory. */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block. */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer is Corrupted. */ + /* More data written than the size of allocated mem block. */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered. */ + /* RTX multithread protection malfunctioning, not implemented */ + /* or interrupt disable is not functioning correctly. */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets. */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets. */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state. */ + break; + } + + /* End-less loop */ + while (1); +} + +/*---------------------------------------------------------------------------- + * TCPnet Config Functions + *---------------------------------------------------------------------------*/ + +#define __NET_CONFIG__ + +#include + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c new file mode 100644 index 00000000..f7a5c9af --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - TCPnet + *---------------------------------------------------------------------------- + * Name: NET_DEBUG.C + * Purpose: Debug Module + * Rev.: V4.60 + *---------------------------------------------------------------------------- + * This code is part of the RealView Run-Time Library. + * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. + *---------------------------------------------------------------------------*/ + +#include + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- + +// Print Time Stamp +// =================== +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// =========================== +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 1 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 1 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 2 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 2 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 2 + +// +// Application Debug Definitions +// ================================ +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTPC 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TNET 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTPC 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP 1 + +// + +//------------- <<< end of configuration section >>> ----------------------- + + +/*--------------------------- init_debug ------------------------------------*/ + +void init_debug (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} + + +/*---------------------------------------------------------------------------- + * TCPnet Debug Functions + *---------------------------------------------------------------------------*/ + +#define __NET_DEBUG__ + +#include + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c new file mode 100644 index 00000000..a0389204 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c @@ -0,0 +1,205 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_CONFIG.C + * Purpose: Configuration of RTX Kernel for Cortex-M + * Rev.: V4.60 + *---------------------------------------------------------------------------- + * This code is part of the RealView Run-Time Library. + * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. + *---------------------------------------------------------------------------*/ + +#include + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Task Configuration +// ===================== +// +// Number of concurrent running tasks <0-250> +// Define max. number of tasks that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 6 +#endif + +// Number of tasks with user-provided stack <0-250> +// Define the number of tasks that will use a bigger stack. +// The memory space for the stack is provided by the user. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 2 +#endif + +// Task stack size [bytes] <20-4096:8><#/4> +// Set the stack size for tasks which is assigned by the system. +// Default: 512 +#ifndef OS_STKSIZE + #define OS_STKSIZE 499 +#endif + +// Check for the stack overflow +// =============================== +// Include the stack checking code for a stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Run in privileged mode +// ========================= +// Run all Tasks in privileged mode. +// Default: Unprivileged +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// +// Tick Timer Configuration +// ============================= +// Hardware timer <0=> Core SysTick <1=> Peripheral Timer +// Define the on-chip timer used as a time-base for RTX. +// Default: Core SysTick +#ifndef OS_TIMER + #define OS_TIMER 0 +#endif + +// Timer clock value [Hz] <1-1000000000> +// Set the timer clock value for selected timer. +// Default: 6000000 (6MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 120000000 +#endif + +// Timer tick value [us] <1-1000000> +// Set the timer tick value for selected timer. +// Default: 10000 (10ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// Round-Robin Task switching +// ============================= +// Enable Round-Robin Task switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Define how long a task will execute before a task switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// Number of user timers <0-250> +// Define max. number of user timers that will run at the same time. +// Default: 0 (User timers disabled) +#ifndef OS_TIMERCNT + #define OS_TIMERCNT 1 +#endif + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the iterrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((U32)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +__task void os_idle_demon (void) { + /* The idle demon is a system task, running when no other task is ready */ + /* to run. The 'os_xxx' function calls are not allowed from this task. */ + + for (;;) { + /* HERE: include optional user code to be executed when no task runs.*/ + } +} + +/*--------------------------- os_tick_init ----------------------------------*/ + +#if (OS_TIMER != 0) +int os_tick_init (void) { + /* Initialize hardware timer as system tick timer. */ + /* ... */ + return (-1); /* Return IRQ number of timer (0..239) */ +} +#endif + +/*--------------------------- os_tick_irqack --------------------------------*/ + +#if (OS_TIMER != 0) +void os_tick_irqack (void) { + /* Acknowledge timer interrupt. */ + /* ... */ +} +#endif + +/*--------------------------- os_tmr_call -----------------------------------*/ + +void os_tmr_call (U16 info) { + /* This function is called when the user timer has expired. Parameter */ + /* 'info' holds the value, defined when the timer was created. */ + + /* HERE: include optional user code to be executed on timeout. */ +} + + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (U32 err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini new file mode 100644 index 00000000..c6512217 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2005-2009 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s new file mode 100644 index 00000000..c31ce199 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00001000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00009000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt new file mode 100644 index 00000000..4814980e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt @@ -0,0 +1,1757 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + MDK-RTX-TCP-FS + 0x4 + ARM-ADS + + 12000000 + + 1 + 0 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Lst\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 8 + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O974 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 + + + + + + 1 + 0 + 0x10005960 + + + + + 0 + Reset Peripherals + Per_Reset() + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + MDK-FS + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Lst\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 8 + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O974 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 + + + + + + 1 + 0 + 0x10005960 + + + + + 0 + Reset Peripherals + Per_Reset() + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + MDK-BARE-METAL + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Lst\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 8 + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O975 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC120000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP9 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 + + + + + + 1 + 0 + 0x10005960 + + + + + 0 + Reset Peripherals + Per_Reset() + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + CyaSSL Apps + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\echoclient\echoclient.c + echoclient.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\echoserver\echoserver.c + echoserver.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\test\test.c + test.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\benchmark\benchmark.c + benchmark.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\client\client.c + client.c + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\server\server.c + server.c + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\shell.c + shell.c + 0 + 0 + + + 1 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\main.c + main.c + 0 + 0 + + + 1 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\cert_data.c + cert_data.c + 0 + 0 + + + + + LPC43xx + 1 + 0 + 0 + 0 + + 2 + 10 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\Drivers\source\lpc43xx_rtc.c + lpc43xx_rtc.c + 0 + 0 + + + 2 + 11 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\Drivers\source\lpc43xx_timer.c + lpc43xx_timer.c + 0 + 0 + + + 2 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\Drivers\source\lpc43xx_cgu.c + lpc43xx_cgu.c + 0 + 0 + + + 2 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\Drivers\source\lpc43xx_scu.c + lpc43xx_scu.c + 0 + 0 + + + + + MDK-ARM + 1 + 0 + 0 + 0 + + 3 + 14 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + FS_CM3.lib + 0 + 0 + + + 3 + 15 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + RTX_CM3.lib + 0 + 0 + + + 3 + 16 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + TCPD_CM3.lib + 0 + 0 + + + 3 + 17 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + TCP_CM3.lib + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c + Serial.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c + ETH_LPC43xx.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c + SDIO_LPC43xx.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c + system_LPC43xx.c + 0 + 0 + + + + + CyaSSL Library + 0 + 0 + 0 + 0 + + 4 + 22 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\crl.c + crl.c + 0 + 0 + + + 4 + 23 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\internal.c + internal.c + 0 + 0 + + + 4 + 24 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\io.c + io.c + 0 + 0 + + + 4 + 25 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\keys.c + keys.c + 0 + 0 + + + 4 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\ocsp.c + ocsp.c + 0 + 0 + + + 4 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\sniffer.c + sniffer.c + 0 + 0 + + + 4 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\ssl.c + ssl.c + 0 + 0 + + + 4 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\tls.c + tls.c + 0 + 0 + + + 4 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + ssl-dummy.c + 0 + 0 + + + + + Crypt/Cipher Library + 1 + 0 + 0 + 0 + + 5 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\aes.c + aes.c + 0 + 0 + + + 5 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\arc4.c + arc4.c + 0 + 0 + + + 5 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\asm.c + asm.c + 0 + 0 + + + 5 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\asn.c + asn.c + 0 + 0 + + + 5 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\camellia.c + camellia.c + 0 + 0 + + + 5 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\coding.c + coding.c + 0 + 0 + + + 5 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\des3.c + des3.c + 0 + 0 + + + 5 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\dh.c + dh.c + 0 + 0 + + + 5 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\dsa.c + dsa.c + 0 + 0 + + + 5 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ecc.c + ecc.c + 0 + 0 + + + 5 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 0 + 0 + + + 5 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\error.c + error.c + 0 + 0 + + + 5 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\hc128.c + hc128.c + 0 + 0 + + + 5 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\hmac.c + hmac.c + 0 + 0 + + + 5 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\integer.c + integer.c + 0 + 0 + + + 5 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\logging.c + logging.c + 0 + 0 + + + 5 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md2.c + md2.c + 0 + 0 + + + 5 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md4.c + md4.c + 0 + 0 + + + 5 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md5.c + md5.c + 0 + 0 + + + 5 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\memory.c + memory.c + 0 + 0 + + + 5 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\misc.c + misc.c + 0 + 0 + + + 5 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\pwdbased.c + pwdbased.c + 0 + 0 + + + 5 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\rabbit.c + rabbit.c + 0 + 0 + + + 5 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\random.c + random.c + 0 + 0 + + + 5 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ripemd.c + ripemd.c + 0 + 0 + + + 5 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\rsa.c + rsa.c + 0 + 0 + + + 5 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha.c + sha.c + 0 + 0 + + + 5 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha256.c + sha256.c + 0 + 0 + + + 5 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha512.c + sha512.c + 0 + 0 + + + 5 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\tfm.c + tfm.c + 0 + 0 + + + 5 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\port.c + port.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 6 + 62 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\File_Config.c + File_Config.c + 0 + 0 + + + 6 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\Net_Config.c + Net_Config.c + 0 + 0 + + + 6 + 64 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config.h + config.h + 0 + 0 + + + 6 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\RTX_Conf_CM.c + RTX_Conf_CM.c + 0 + 0 + + + 6 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\Net_Debug.c + Net_Debug.c + 0 + 0 + + + 6 + 67 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config-FS.h + config-FS.h + 0 + 0 + + + 6 + 68 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + config-RTX-TCP-FS.h + 0 + 0 + + + 6 + 69 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + config-BARE-METAL.h + 0 + 0 + + + 6 + 70 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\startup_LPC43xx.s + startup_LPC43xx.s + 0 + 0 + + + + + CyaSSL-MDK + 1 + 0 + 0 + 0 + + 7 + 71 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 0 + 0 + + + 7 + 72 + 1 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\Retarget.c + Retarget.c + 0 + 0 + + + 7 + 73 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\LPC43xx\time-LCP43xx.c + time-LCP43xx.c + 0 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj new file mode 100644 index 00000000..eefd970e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj @@ -0,0 +1,3510 @@ + + + + 1.1 + +
### uVision Project, (C) Keil Software
+ + + + MDK-RTX-TCP-FS + 0x4 + ARM-ADS + + + LPC4357 + NXP (founded by Philips) + IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 + + "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") + UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) + 6414 + LPC43xx.H + + + + + + + + + + SFD\NXP\LPC43xx\LPC43xx.SFR + 0 + + + + NXP\LPC43xx\ + NXP\LPC43xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-RTX-TCP-FS\ + LCP43xx-MDK-RTX-TCP-FS + 1 + 0 + 0 + 1 + 1 + .\Lst\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 1 + 0 + $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 1 + 0 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 8 + 0 + 0 + 0 + 3 + 3 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 1 + 0x1a000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x1a000000 + 0x80000 + + + 1 + 0x1b000000 + 0x80000 + + + 0 + 0x10080000 + 0xa000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 0 + 0x20000000 + 0x10000 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_RTX_TCP_FS + + ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include + + + + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + + + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + server.c + 1 + ..\..\..\examples\server\server.c + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + LPC43xx + + + lpc43xx_rtc.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_rtc.c + + + lpc43xx_timer.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_timer.c + + + lpc43xx_cgu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_cgu.c + + + lpc43xx_scu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_scu.c + + + + + MDK-ARM + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + Serial.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c + + + ETH_LPC43xx.c + 1 + C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c + + + SDIO_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c + + + system_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + internal.c + 1 + ..\..\..\src\internal.c + + + io.c + 1 + ..\..\..\src\io.c + + + keys.c + 1 + ..\..\..\src\keys.c + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + tls.c + 1 + ..\..\..\src\tls.c + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_LPC43xx.s + 2 + ..\LPC43xx\startup_LPC43xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-LCP43xx.c + 1 + ..\LPC43xx\time-LCP43xx.c + + + + + + + MDK-FS + 0x4 + ARM-ADS + + + LPC4357 + NXP (founded by Philips) + IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 + + "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") + UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) + 6414 + LPC43xx.H + + + + + + + + + + SFD\NXP\LPC43xx\LPC43xx.SFR + 0 + + + + NXP\LPC43xx\ + NXP\LPC43xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-FS\ + LCP43xx-MDK-FS + 1 + 0 + 0 + 1 + 1 + .\Lst\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 1 + 0 + $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 8 + 0 + 0 + 0 + 3 + 3 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 1 + 0x1a000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x1a000000 + 0x80000 + + + 1 + 0x1b000000 + 0x80000 + + + 0 + 0x10080000 + 0xa000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 0 + 0x20000000 + 0x10000 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_FS + + ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include + + + + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + + + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + server.c + 1 + ..\..\..\examples\server\server.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + LPC43xx + + + lpc43xx_rtc.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_rtc.c + + + lpc43xx_timer.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_timer.c + + + lpc43xx_cgu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_cgu.c + + + lpc43xx_scu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_scu.c + + + + + MDK-ARM + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + Serial.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c + + + ETH_LPC43xx.c + 1 + C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + SDIO_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c + + + system_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + internal.c + 1 + ..\..\..\src\internal.c + + + io.c + 1 + ..\..\..\src\io.c + + + keys.c + 1 + ..\..\..\src\keys.c + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + tls.c + 1 + ..\..\..\src\tls.c + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_LPC43xx.s + 2 + ..\LPC43xx\startup_LPC43xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-LCP43xx.c + 1 + ..\LPC43xx\time-LCP43xx.c + + + + + + + MDK-BARE-METAL + 0x4 + ARM-ADS + + + LPC4357 + NXP (founded by Philips) + IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 + + "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") + UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) + 6414 + LPC43xx.H + + + + + + + + + + SFD\NXP\LPC43xx\LPC43xx.SFR + 0 + + + + NXP\LPC43xx\ + NXP\LPC43xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-BARE-METAL\ + LCP43xx-MDK-BARE-METAL + 1 + 0 + 0 + 1 + 1 + .\Lst\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 1 + 0 + $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\Dbg_Flash.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 8 + 0 + 0 + 0 + 3 + 3 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 1 + 0x1a000000 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x1a000000 + 0x80000 + + + 1 + 0x1b000000 + 0x80000 + + + 0 + 0x10080000 + 0xa000 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x8000 + + + 0 + 0x20000000 + 0x10000 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_BARE_METAL + + ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include + + + + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + + + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + server.c + 1 + ..\..\..\examples\server\server.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + LPC43xx + + + lpc43xx_rtc.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_rtc.c + + + lpc43xx_timer.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_timer.c + + + lpc43xx_cgu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_cgu.c + + + lpc43xx_scu.c + 1 + ..\LPC43xx\Drivers\source\lpc43xx_scu.c + + + + + MDK-ARM + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + Serial.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c + + + ETH_LPC43xx.c + 1 + C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + SDIO_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + system_LPC43xx.c + 1 + C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + internal.c + 1 + ..\..\..\src\internal.c + + + io.c + 1 + ..\..\..\src\io.c + + + keys.c + 1 + ..\..\..\src\keys.c + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + tls.c + 1 + ..\..\..\src\tls.c + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_LPC43xx.s + 2 + ..\LPC43xx\startup_LPC43xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-LCP43xx.c + 1 + ..\LPC43xx\time-LCP43xx.c + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt new file mode 100644 index 00000000..ddc1a500 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt @@ -0,0 +1,1656 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + MDK-RTX-TCP-FS + 0x4 + ARM-ADS + + 25000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Flash\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 255 + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 + + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + + + + + + + + MDK-FS + 0x4 + ARM-ADS + + 25000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Flash\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 + + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + MDK-BARE-METAL + 0x4 + ARM-ADS + + 25000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Flash\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 255 + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 9 + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 + + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + CyaSSL Apps + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\echoclient\echoclient.c + echoclient.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\echoserver\echoserver.c + echoserver.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 5 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\test\test.c + test.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 21 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\benchmark\benchmark.c + benchmark.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\client\client.c + client.c + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\examples\server\server.c + server.c + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\shell.c + shell.c + 0 + 0 + + + 1 + 8 + 1 + 0 + 0 + 0 + 0 + 106 + 149 + 0 + ..\MDK-ARM\CyaSSL\main.c + main.c + 0 + 0 + + + 1 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\cert_data.c + cert_data.c + 0 + 0 + + + + + STM32F2xx_StdPeriph_Lib + 1 + 0 + 0 + 0 + + + + MDK-ARM + 1 + 0 + 0 + 0 + + 3 + 10 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c + Serial.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c + SDIO_STM32F2xx.c + 0 + 0 + + + 3 + 12 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + FS_CM3.lib + 0 + 0 + + + 3 + 13 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + RTX_CM3.lib + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c + ETH_STM32F2xx.c + 0 + 0 + + + 3 + 15 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + TCPD_CM3.lib + 0 + 0 + + + 3 + 16 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + TCP_CM3.lib + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c + system_stm32f2xx.c + 0 + 0 + + + + + CyaSSL Library + 1 + 0 + 0 + 0 + + 4 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\crl.c + crl.c + 0 + 0 + + + 4 + 19 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\internal.c + internal.c + 0 + 0 + + + 4 + 20 + 1 + 0 + 0 + 23 + 0 + 0 + 0 + 0 + ..\..\..\src\io.c + io.c + 0 + 0 + + + 4 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\keys.c + keys.c + 0 + 0 + + + 4 + 22 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\ocsp.c + ocsp.c + 0 + 0 + + + 4 + 23 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\sniffer.c + sniffer.c + 0 + 0 + + + 4 + 24 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\ssl.c + ssl.c + 0 + 0 + + + 4 + 25 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\src\tls.c + tls.c + 0 + 0 + + + 4 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + ssl-dummy.c + 0 + 0 + + + + + Crypt/Cipher Library + 1 + 0 + 0 + 0 + + 5 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\aes.c + aes.c + 0 + 0 + + + 5 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\arc4.c + arc4.c + 0 + 0 + + + 5 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\asm.c + asm.c + 0 + 0 + + + 5 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\asn.c + asn.c + 0 + 0 + + + 5 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\camellia.c + camellia.c + 0 + 0 + + + 5 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\coding.c + coding.c + 0 + 0 + + + 5 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\des3.c + des3.c + 0 + 0 + + + 5 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\dh.c + dh.c + 0 + 0 + + + 5 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\dsa.c + dsa.c + 0 + 0 + + + 5 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ecc.c + ecc.c + 0 + 0 + + + 5 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 0 + 0 + + + 5 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\error.c + error.c + 0 + 0 + + + 5 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\hc128.c + hc128.c + 0 + 0 + + + 5 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\hmac.c + hmac.c + 0 + 0 + + + 5 + 41 + 1 + 0 + 0 + 19 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\integer.c + integer.c + 0 + 0 + + + 5 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\logging.c + logging.c + 0 + 0 + + + 5 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md2.c + md2.c + 0 + 0 + + + 5 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md4.c + md4.c + 0 + 0 + + + 5 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\md5.c + md5.c + 0 + 0 + + + 5 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\memory.c + memory.c + 0 + 0 + + + 5 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\misc.c + misc.c + 0 + 0 + + + 5 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\port.c + port.c + 0 + 0 + + + 5 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\pwdbased.c + pwdbased.c + 0 + 0 + + + 5 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\rabbit.c + rabbit.c + 0 + 0 + + + 5 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\random.c + random.c + 0 + 0 + + + 5 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\ripemd.c + ripemd.c + 0 + 0 + + + 5 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\rsa.c + rsa.c + 0 + 0 + + + 5 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha.c + sha.c + 0 + 0 + + + 5 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha256.c + sha256.c + 0 + 0 + + + 5 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\sha512.c + sha512.c + 0 + 0 + + + 5 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\ctaocrypt\src\tfm.c + tfm.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 6 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\File_Config.c + File_Config.c + 0 + 0 + + + 6 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\Net_Config.c + Net_Config.c + 0 + 0 + + + 6 + 60 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config.h + config.h + 0 + 0 + + + 6 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\RTX_Conf_CM.c + RTX_Conf_CM.c + 0 + 0 + + + 6 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\config\Net_Debug.c + Net_Debug.c + 0 + 0 + + + 6 + 63 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + ..\MDK-ARM\CyaSSL\config-FS.h + config-FS.h + 0 + 0 + + + 6 + 64 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + config-RTX-TCP-FS.h + 0 + 0 + + + 6 + 65 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + config-BARE-METAL.h + 0 + 0 + + + 6 + 66 + 2 + 0 + 0 + 0 + 0 + 152 + 169 + 0 + ..\MDK-ARM\config\startup_stm32f2xx.s + startup_stm32f2xx.s + 0 + 0 + + + + + CyaSSL-MDK + 1 + 0 + 0 + 0 + + 7 + 67 + 1 + 0 + 0 + 0 + 0 + 182 + 222 + 0 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 0 + 0 + + + 7 + 68 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + ..\MDK-ARM\CyaSSL\Retarget.c + Retarget.c + 0 + 0 + + + 7 + 69 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 0 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj new file mode 100644 index 00000000..833dc0d1 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj @@ -0,0 +1,3964 @@ + + + + 1.1 + +
### uVision Project, (C) Keil Software
+ + + + MDK-RTX-TCP-FS + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") + + "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") + UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) + 5124 + stm32f2xx.h + + + + + + + + + + SFD\ST\STM32F2xx\STM32F20x.sfr + 0 + + + + ST\STM32F2xx\ + ST\STM32F2xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-RTX-TCP-FS\ + STM32F2xx-MDK-RTX-TCP-FS + 1 + 0 + 0 + 1 + 1 + .\Flash\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 1 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM __RTX MDK_CONF_RTX_TCP_FS + + ..\MDK-ARM\CyaSSL;C:..\STM32F2xx_StdPeriph_Lib\inc;..\..\..\ + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + server.c + 1 + ..\..\..\examples\server\server.c + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + STM32F2xx_StdPeriph_Lib + + + MDK-ARM + + + Serial.c + 1 + c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c + + + SDIO_STM32F2xx.c + 1 + c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + ETH_STM32F2xx.c + 1 + c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + system_stm32f2xx.c + 1 + C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + internal.c + 1 + ..\..\..\src\internal.c + + + io.c + 1 + ..\..\..\src\io.c + + + keys.c + 1 + ..\..\..\src\keys.c + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + tls.c + 1 + ..\..\..\src\tls.c + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_stm32f2xx.s + 2 + ..\MDK-ARM\config\startup_stm32f2xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-STM32F2xx.c + 1 + ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + + + + + MDK-FS + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") + + "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") + UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) + 5124 + stm32f2xx.h + + + + + + + + + + SFD\ST\STM32F2xx\STM32F20x.sfr + 0 + + + + ST\STM32F2xx\ + ST\STM32F2xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-FS\ + STM32F2xx-MDK-FS + 1 + 0 + 0 + 1 + 1 + .\Flash\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM MDK_CONF_FS + + ..\MDK-ARM\CyaSSL;..\MDK-ARM\inc;..\STM32F2xx_StdPeriph_Lib\inc;..\POSIX\..\..\..\ + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + server.c + 1 + ..\..\..\examples\server\server.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + STM32F2xx_StdPeriph_Lib + + + MDK-ARM + + + Serial.c + 1 + c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c + + + SDIO_STM32F2xx.c + 1 + c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + ETH_STM32F2xx.c + 1 + c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + system_stm32f2xx.c + 1 + C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + internal.c + 1 + ..\..\..\src\internal.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + io.c + 1 + ..\..\..\src\io.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + keys.c + 1 + ..\..\..\src\keys.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + tls.c + 1 + ..\..\..\src\tls.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_stm32f2xx.s + 2 + ..\MDK-ARM\config\startup_stm32f2xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-STM32F2xx.c + 1 + ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + + + + + MDK-BARE-METAL + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") + + "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") + UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) + 5124 + stm32f2xx.h + + + + + + + + + + SFD\ST\STM32F2xx\STM32F20x.sfr + 0 + + + + ST\STM32F2xx\ + ST\STM32F2xx\ + + 0 + 0 + 0 + 0 + 1 + + .\MDK-BARE-METAL\ + STM32F2xx-MDK-BARE-METAL + 1 + 0 + 0 + 1 + 1 + .\Flash\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + -MPU + DARMSTM.DLL + -pSTM32F207IG + SARMCM3.DLL + -MPU + TARMSTM.DLL + -pSTM32F207IG + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + + 0 + 9 + + + + + + + + + + + + + ..\MDK-ARM\config\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM MDK_CONF_BARE_METAL + + ..\MDK-ARM\CyaSSL;..\MDK-ARM\inc;..\STM32F2xx_StdPeriph_Lib\inc;..\POSIX;..\..\..\ + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + CyaSSL Apps + + + echoclient.c + 1 + ..\..\..\examples\echoclient\echoclient.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + echoserver.c + 1 + ..\..\..\examples\echoserver\echoserver.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + test.c + 1 + ..\..\..\ctaocrypt\test\test.c + + + benchmark.c + 1 + ..\..\..\ctaocrypt\benchmark\benchmark.c + + + client.c + 1 + ..\..\..\examples\client\client.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + server.c + 1 + ..\..\..\examples\server\server.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + shell.c + 1 + ..\MDK-ARM\CyaSSL\shell.c + + + main.c + 1 + ..\MDK-ARM\CyaSSL\main.c + + + cert_data.c + 1 + ..\MDK-ARM\CyaSSL\cert_data.c + + + + + STM32F2xx_StdPeriph_Lib + + + MDK-ARM + + + Serial.c + 1 + c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c + + + SDIO_STM32F2xx.c + 1 + c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + FS_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\FS_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + RTX_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + ETH_STM32F2xx.c + 1 + c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + TCPD_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + TCP_CM3.lib + 4 + c:\Keil\ARM\RV31\LIB\TCP_CM3.lib + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + + + system_stm32f2xx.c + 1 + C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c + + + + + CyaSSL Library + + + crl.c + 1 + ..\..\..\src\crl.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + internal.c + 1 + ..\..\..\src\internal.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + io.c + 1 + ..\..\..\src\io.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + keys.c + 1 + ..\..\..\src\keys.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ocsp.c + 1 + ..\..\..\src\ocsp.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + sniffer.c + 1 + ..\..\..\src\sniffer.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ssl.c + 1 + ..\..\..\src\ssl.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + tls.c + 1 + ..\..\..\src\tls.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + ssl-dummy.c + 1 + ..\MDK-ARM\CyaSSL\ssl-dummy.c + + + + + Crypt/Cipher Library + + + aes.c + 1 + ..\..\..\ctaocrypt\src\aes.c + + + arc4.c + 1 + ..\..\..\ctaocrypt\src\arc4.c + + + asm.c + 1 + ..\..\..\ctaocrypt\src\asm.c + + + asn.c + 1 + ..\..\..\ctaocrypt\src\asn.c + + + camellia.c + 1 + ..\..\..\ctaocrypt\src\camellia.c + + + coding.c + 1 + ..\..\..\ctaocrypt\src\coding.c + + + des3.c + 1 + ..\..\..\ctaocrypt\src\des3.c + + + dh.c + 1 + ..\..\..\ctaocrypt\src\dh.c + + + dsa.c + 1 + ..\..\..\ctaocrypt\src\dsa.c + + + ecc.c + 1 + ..\..\..\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + ..\..\..\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + ..\..\..\ctaocrypt\src\error.c + + + hc128.c + 1 + ..\..\..\ctaocrypt\src\hc128.c + + + hmac.c + 1 + ..\..\..\ctaocrypt\src\hmac.c + + + integer.c + 1 + ..\..\..\ctaocrypt\src\integer.c + + + logging.c + 1 + ..\..\..\ctaocrypt\src\logging.c + + + md2.c + 1 + ..\..\..\ctaocrypt\src\md2.c + + + md4.c + 1 + ..\..\..\ctaocrypt\src\md4.c + + + md5.c + 1 + ..\..\..\ctaocrypt\src\md5.c + + + memory.c + 1 + ..\..\..\ctaocrypt\src\memory.c + + + misc.c + 1 + ..\..\..\ctaocrypt\src\misc.c + + + port.c + 1 + ..\..\..\ctaocrypt\src\port.c + + + pwdbased.c + 1 + ..\..\..\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + ..\..\..\ctaocrypt\src\rabbit.c + + + random.c + 1 + ..\..\..\ctaocrypt\src\random.c + + + ripemd.c + 1 + ..\..\..\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + ..\..\..\ctaocrypt\src\rsa.c + + + sha.c + 1 + ..\..\..\ctaocrypt\src\sha.c + + + sha256.c + 1 + ..\..\..\ctaocrypt\src\sha256.c + + + sha512.c + 1 + ..\..\..\ctaocrypt\src\sha512.c + + + tfm.c + 1 + ..\..\..\ctaocrypt\src\tfm.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + + + Configuration + + + File_Config.c + 1 + ..\MDK-ARM\config\File_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Config.c + 1 + ..\MDK-ARM\config\Net_Config.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config.h + 5 + ..\MDK-ARM\CyaSSL\config.h + + + RTX_Conf_CM.c + 1 + ..\MDK-ARM\config\RTX_Conf_CM.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + Net_Debug.c + 1 + ..\MDK-ARM\config\Net_Debug.c + + + 2 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + + + + + + + + + + + + config-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-FS.h + + + config-RTX-TCP-FS.h + 5 + ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h + + + config-BARE-METAL.h + 5 + ..\MDK-ARM\CyaSSL\config-BARE-METAL.h + + + startup_stm32f2xx.s + 2 + ..\MDK-ARM\config\startup_stm32f2xx.s + + + + + CyaSSL-MDK + + + cyassl_MDK_ARM.c + 1 + ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + Retarget.c + 1 + ..\MDK-ARM\CyaSSL\Retarget.c + + + time-STM32F2xx.c + 1 + ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c new file mode 100644 index 00000000..e2912d19 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c @@ -0,0 +1,299 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include "time.h" + +#define PERIPH_BASE ((uint32_t)0x40000000) +/*----------------------------------------------------------------------------- + * initialize RTC + *----------------------------------------------------------------------------*/ +#include "stm32f2xx.h" + +#define assert_param(a) + +#define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F) +#define SYNCHRO_TIMEOUT ((uint32_t) 0x00008000) +#define Bcd2ToByte(v) \ + ((((uint8_t)(v & (uint8_t)0xF0) >> (uint8_t)0x4) * 10) + (v & (uint8_t)0x0F)) +#define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F) +#define RTC_TR_MNT ((uint32_t)0x00007000) +#define RTC_TR_MNU ((uint32_t)0x00000F00) + +#define PWR_OFFSET (PWR_BASE - PERIPH_BASE) +#define CR_OFFSET (PWR_OFFSET + 0x00) +#define DBP_BitNumber 0x08 +#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4)) +#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF) +#define INITMODE_TIMEOUT ((uint32_t) 0x00010000) + +static void init_RTC() +{ + __IO uint32_t initcounter = 0x00 ; + uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */ + ((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ; + + /* Allow access to RTC */ + *(__IO uint32_t *) CR_DBP_BB = ENABLE ; + /* RCC_LSEConfig(RCC_LSE_ON) */ + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); + /* Reset LSEBYP bit */ + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01); + /* Wait till LSE is ready */ + while((RCC->BDCR << 0x2) == 0x0) { } + /* Select the RTC clock source: RCC_RTCCLKSource_LSE */ + ((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100; + + /* Enable the RTC Clock */ + *(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE; + + *(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE; + RTC->ISR = (uint32_t) RTC_INIT_MASK; + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + + RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); /* Clear RTC CR FMT Bit */ + /* Set RTC_CR register */ + RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */ + + /* Configure the RTC PRER */ + RTC->PRER = 0x7f ; + RTC->PRER |= (uint32_t)(0xff << 16); + + /* Exit Initialization mode */ + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + /* Enable the write protection for RTC registers */ + RTC->WPR = 0xFF; +} + +/*----------------------------------------------------------------------------- + * initialize TIM + *----------------------------------------------------------------------------*/ +#define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001) + +static void init_TIM() +{ + uint16_t tmpcr1 = 0; + + ((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ; + + tmpcr1 = TIM2->CR1 ; + tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) )); + /* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */ + tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */ + TIM2->CR1= tmpcr1 ; + + TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */ + TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */ + TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */ + + *(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ; + /* TIM_Cmd(TIM2, ENABLE) ; */ +} + +void init_time(void) { + init_RTC() ; + init_TIM() ; +} + +static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s) +{ + uint32_t tmpreg = 0; + tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); + *h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16)); + *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8)); + *s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU))); +} + +static uint32_t ByteToBcd2(uint8_t Value) +{ + uint8_t bcdhigh = 0; + while (Value >= 10) { + bcdhigh++; + Value -= 10; + } + return ((uint8_t)(bcdhigh << 4) | Value); +} + +static void SetTime(uint8_t h, uint8_t m, uint8_t s) +{ + __IO uint32_t synchrocounter = 0; + uint32_t synchrostatus = 0x00; + __IO uint32_t initcounter = 0; + uint32_t initstatus = 0x00; + uint32_t tmpreg ; + + tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ; + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + RTC->ISR = (uint32_t)RTC_INIT_MASK; + + /* Wait till RTC is in INIT state and if Time out is reached exit */ + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + + RTC->ISR &= (uint32_t)RTC_RSF_MASK; + /* Wait the registers to be synchronised */ + do { + synchrostatus = RTC->ISR & RTC_ISR_RSF; + synchrocounter++; + } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); + + RTC->WPR = 0xFF; +} + +static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d) +{ + uint32_t tmpreg = 0; + tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK); + *y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16)); + *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8)); + *d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU))); +} + +static void SetDate(uint8_t y, uint8_t m, uint8_t d) +{ + __IO uint32_t synchrocounter = 0; + uint32_t synchrostatus = 0x00; + __IO uint32_t initcounter = 0; + uint32_t initstatus = 0x00; + uint32_t tmpreg = 0 ; + + tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ; + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + RTC->ISR = (uint32_t)RTC_INIT_MASK; + + /* Wait till RTC is in INIT state and if Time out is reached exit */ + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + + RTC->ISR &= (uint32_t)RTC_RSF_MASK; + /* Wait the registers to be synchronised */ + do { + synchrostatus = RTC->ISR & RTC_ISR_RSF; + synchrocounter++; + } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); + + RTC->WPR = 0xFF; +} + + +#include +void CYASSL_MSG(const char *msg) ; + +struct tm *Cyassl_MDK_gmtime(const time_t *c) +{ + uint8_t h, m, s ; + uint8_t y, mo, d ; + static struct tm date ; + + GetTime(&h, &m, &s) ; + GetDate(&y, &mo, &d) ; + + date.tm_year = y + 100 ; + date.tm_mon = mo - 1 ; + date.tm_mday = d ; + date.tm_hour = h ; + date.tm_min = m ; + date.tm_sec = s ; + + #if defined(DEBUG_CYASSL) + { + char msg[100] ; + sprintf(msg, + "Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n", + d, mo, y+2000, h, m, s) ; + CYASSL_MSG(msg) ; + } + #endif + + return(&date) ; +} + +double current_time() +{ + return ((double)TIM2->CNT/1000000.0) ; +} + +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + +void time_main(void *args) +{ + char * datetime ; + uint8_t h, m, s ; + uint8_t y, mo, d ; + + if( args == NULL || ((func_args *)args)->argc == 1) { + GetTime(&h, &m, &s) ; + GetDate(&y, &mo, &d) ; + printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", + mo, d, y+2000, h, m, s) ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 'd' ) { + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ; + SetDate(y-2000, mo, d) ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 't' ) { + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d:%d:%d", + (int *)&h, (int *)&m, (int *)&s) ; + SetTime(h, m, s) ; + } else printf("Invalid argument\n") ; +} + + +/******************************************************************* + time() +********************************************************************/ +time_t time(time_t * t) { return 0 ; } diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt new file mode 100644 index 00000000..3a01f342 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt @@ -0,0 +1,292 @@ +LICENSE AGREEMENT + +The wolfSSL source code is subject to the U.S. Export Administration +Regulations and other U.S. law, and may not be exported or re-exported to +certain countries (currently Afghanistan, Cuba, Iran, Iraq, Libya, North +Korea, Sudan and Syria) or to persons or entities prohibited from receiving +U.S. exports (including Denied Parties, entities on the Bureau of Export +Administration Entity List, and Specially Designated Nationals). + +--- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm new file mode 100644 index 00000000..2f90e297 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm new file mode 100644 index 00000000..d860715f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm @@ -0,0 +1 @@ + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c new file mode 100644 index 00000000..d29fbf3b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c @@ -0,0 +1,28 @@ +/* certs_test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* Define initial data for cert buffers */ +#include + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h new file mode 100644 index 00000000..6629ee05 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h @@ -0,0 +1,39 @@ +#ifndef CYASSL_CERT_DATA_H +#define CYASSL_CERT_DATA_H + +#ifdef USE_CERT_BUFFERS_1024 +extern const unsigned char client_key_der_1024[] ; +extern int sizeof_client_key_der_1024 ; +/* ./certs/1024/client-cert.der, 1024-bit */ +extern const unsigned char client_cert_der_1024[] ; +extern int sizeof_client_cert_der_1024 ; +/* ./certs/1024/dh1024.der, 1024-bit */ +extern const unsigned char dh_key_der_1024[] ; +extern int sizeof_dh_key_der_1024 ; +/* ./certs/1024/dsa1024.der, 1024-bit */ +extern const unsigned char dsa_key_der_1024[] ; +extern int sizeof_dsa_key_der_1024 ; +/* ./certs/1024/rsa1024.der, 1024-bit */ +extern const unsigned char rsa_key_der_1024[] ; +extern int sizeof_rsa_key_der_1024 ; + +#elif defined(USE_CERT_BUFFERS_2048) +/* ./certs/client-key.der, 2048-bit */ +extern const unsigned char client_key_der_2048[] ; +extern int sizeof_client_key_der_2048 ; +/* ./certs/client-cert.der, 2048-bit */ +extern const unsigned char client_cert_der_2048[] ; +extern int sizeof_client_cert_der_2048 ; +/* ./certs/dh2048.der, 2048-bit */ +extern const unsigned char dh_key_der_2048[] ; +extern int sizeof_dh_key_der_2048 ; +/* ./certs/dsa2048.der, 2048-bit */ +extern const unsigned char dsa_key_der_2048[] ; +extern int sizeof_dsa_key_der_2048; +/* ./certs/rsa2048.der, 2048-bit */ +extern const unsigned char rsa_key_der_2048[] ; +extern int sizeof_rsa_key_der_2048 ; +#endif + +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c new file mode 100644 index 00000000..cca8ad61 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c @@ -0,0 +1,247 @@ +/* cyassl_KEIL_RL.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/***************************************************************************************/ +/** This file is for defining functions for specific to KEIL-RL. **/ +/***************************************************************************************/ +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#if defined (CYASSL_MDK5) + #include "cmsis_os.h" + #if defined(CYASSL_KEIL_TCP_NET) + #include "rl_net.h" + #endif +#else + #include +#endif + +#include "cyassl_MDK_ARM.h" + +#include +#include + +#if defined (CYASSL_CMSIS_RTOS) + #define os_dly_wait(t) osDelay(10*t) +#endif + + +/** KEIL-RL TCPnet ****/ +/** TCPnet BSD socket does not have following functions. **/ + +#if defined(CYASSL_KEIL_TCP_NET) +char *inet_ntoa(struct in_addr in) +{ + #define NAMESIZE 16 + static char name[NAMESIZE] ; + sprintf(name, "%d.%d.%d.%d", (in.s_addr>>24)&0xff, (in.s_addr>>16)&0xff, (in.s_addr>>8)&0xff, in.s_addr&0xff) ; + return name ; +} + +unsigned long inet_addr(const char *cp) +{ + unsigned int a[4] ; unsigned long ret ; + sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) ; + ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ; + return(ret) ; +} + + +/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/ +int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) +{ + int ret = 0 ; + #if defined(CYASSL_KEIL_TCP_NET) + + SOCKADDR_IN addr ; + + addr = *(SOCKADDR_IN *)sa ; + + do { + #undef connect /* Go to KEIL TCPnet connect */ + ret = connect(sd, (SOCKADDR *)&addr, sizeof(addr)) ; + os_dly_wait(50); + } while(ret == SCK_EWOULDBLOCK) ; + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Connect return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; +} + + +int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) +{ + int ret = 0 ; + + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef accept /* Go to KEIL TCPnet accept */ + ret = accept(sd, addr, addrlen) ; + if(ret != SCK_EWOULDBLOCK) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Accept return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; + +} + +int Cyassl_recv(int sd, void *buf, size_t len, int flags) +{ + int ret = 0; + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef recv /* Go to KEIL TCPnet recv */ + ret = recv(sd, buf, len, flags) ; + if((ret != SCK_EWOULDBLOCK) &&( ret != SCK_ETIMEOUT)) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Recv return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + + #endif /* CYASSL_KEIL_TCP_NET */ + return(ret ) ; +} + +int Cyassl_send(int sd, const void *buf, size_t len, int flags) +{ + int ret = 0 ; + + #if defined(CYASSL_KEIL_TCP_NET) + while(1) { + #undef send /* Go to KEIL TCPnet send */ + ret = send(sd, buf, len, flags) ; + if(ret != SCK_EWOULDBLOCK) break ; + os_dly_wait(1); + } + #ifdef DEBUG_CYASSL + { + char msg[50] ; + sprintf(msg, "BSD Send return code: %d\n", ret) ; + CYASSL_MSG(msg) ; + } + #endif + +#endif /* CYASSL_KEIL_TCP_NET */ + return(ret) ; + +} + +#endif /* CYASSL_KEIL_TCP_NET */ + +#if defined(CYASSL_KEIL_TCP_NET) +void Cyassl_sleep(int t) +{ + #if defined(HAVE_KEIL_RTX) + os_dly_wait(t/1000+1) ; + #endif +} + +int Cyassl_tcp_select(int sd, int timeout) +{ + + return 0 ; + +} +#endif + +extern int strlen(const char *s) ; + +FILE * CyaSSL_fopen(const char *name, const char *openmode) +{ + int i ; FILE * ret ; + #define PATHSIZE 100 + char path[PATHSIZE] ; char *p ; + + if(strlen(name) > PATHSIZE)return(NULL) ; + + for(i = 0; i<= strlen(name); i++) { + if(name[i] == '/')path[i] = '\\' ; + else path[i] = name[i] ; + } + if(path[0] == '.' && path[1] == '\\') p = path + 2 ; + else p = path ; + + ret = fopen (p, openmode) ; + + return(ret) ; +} + +#if defined (CYASSL_MDK5) +#define getkey getchar +#define sendchar putchar +#else +extern int getkey(void) ; +extern int sendchar(int c) ; +#endif + +char * Cyassl_fgets ( char * str, int num, FILE * f ) +{ + int i ; + + for(i = 0 ; i< num ; i++) { + while((str[i] = getkey()) == 0) { + #if defined (HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS) + os_tsk_pass (); + #else + osThreadYield (); + #endif + } + if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') { + sendchar('\n') ; + str[i++] = '\n' ; + str[i] = '\0' ; + break ; + } else if(str[i] == '\010') { /* BS */ + if(i) { /* erace one char */ + sendchar('\010') ; sendchar(' ') ; sendchar('\010') ; + i = (i>0 ? (i-2) : -1 ) ; + continue ; + } + } else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */ + str[i] = '\0' ; + return(0) ; + } + sendchar(str[i]) ; + } + return(str) ; +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h new file mode 100644 index 00000000..e99e9b8b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h @@ -0,0 +1,106 @@ +/* cyassl_KEIL_RL.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/******************************************************************************/ +/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/ +/******************************************************************************/ +#ifndef CYASSL_KEIL_RL_H +#define CYASSL_KEIL_RL_H + + + +#include + +/* Go to STDIN */ +#define fgets(buff, sz, fd) Cyassl_fgets(buff, sz, fd) +extern char * Cyassl_fgets ( char * str, int num, FILE * f ) ; + +#define SOCKET_T int + +/*** #include ***/ +#define NUMBITSPERBYTE 8 +#define FD_SETSIZE 10 + +typedef long fd_mask; +#define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ + +typedef struct fd_set { + fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; +} fd_set; + +/*** #include ***/ +struct timeval { + long tv_sec; /* seconds */ + long tv_usec; /* microseconds */ +}; + + +#if defined(CYASSL_KEIL_TCP_NET) + + +#if defined(CYASSL_MDK5) +#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK +#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT +#include "rl_net.h" +#endif + +typedef int socklen_t ; + +/* for avoiding conflict with KEIL-TCPnet BSD socket */ +/* Bodies are in cyassl_KEIL_RL.c */ +#define connect Cyassl_connect +#define accept Cyassl_accept +#define recv Cyassl_recv +#define send Cyassl_send +#define sleep Cyassl_sleep + +/* for avoiding conflicting with KEIL-TCPnet TCP socket */ +/* Bodies are in test.h */ +#define tcp_connect Cyassl_tcp_connect +#define tcp_socket Cyassl_tcp_soket +#define tcp_listen Cyassl_tcp_listen +#define tcp_select Cyassl_tcp_select + +extern int Cyassl_connect(int sd, const struct sockaddr * sa, int sz) ; +extern int Cyassl_accept(int sd, struct sockaddr *addr, socklen_t *addrlen); +extern int Cyassl_recv(int sd, void *buf, size_t len, int flags); +extern int Cyassl_send(int sd, const void *buf, size_t len, int flags); +extern void Cyassl_sleep(int sec) ; +extern int Cyassl_tcp_select(int sd, int timeout) ; + +/** KEIL-RL TCPnet ****/ +/* TCPnet BSD socket does not have following functions. */ +extern char *inet_ntoa(struct in_addr in); +extern unsigned long inet_addr(const char *cp); +extern int setsockopt(int sockfd, int level, int optname, + const void *optval, socklen_t optlen); +extern int select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, const struct timeval *timeout); + +#endif /* CYASSL_KEIL_TCP_NET */ + + +/* CyaSSL MDK-ARM time functions */ +#include +struct tm *Cyassl_MDK_gmtime(const time_t *c) ; +extern double current_time(void) ; + +#endif /* CYASSL_KEIL_RL_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c new file mode 100644 index 00000000..47f4a6cd --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c @@ -0,0 +1,52 @@ +/* ssl-dummy.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +Signer* GetCA(void* vp, byte* hash) +{ + return NULL ; +} + +int CyaSSL_dtls(CYASSL* ssl) +{ + return NULL ; +} + +int CyaSSL_get_using_nonblock(CYASSL* ssl) +{ + return NULL ; +} + +Signer* GetCAByName(void* vp, byte* hash) +{ + return NULL ; +} + +int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) +{ + return NULL ; +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt new file mode 100644 index 00000000..e19c5640 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt @@ -0,0 +1,15 @@ +This program is a simple benchmark of wolfCrypt library. + +In order to run this benchmark, copy +{PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. + +For benchmark configuration, refer config-Crypt.h. + +For the hardware crypt on config-Crypt.h, download +STSW-STM32062: STM32F2xx standard peripherals library at +http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to + {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib + +Support +------- +Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx new file mode 100644 index 00000000..88827158 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx @@ -0,0 +1,1094 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + CryptBenchmark + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + 0x20000408 + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 32 + 0 + 0 + 0 + 0 + .\benchmark.c + benchmark.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 4 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 5 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 6 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 9 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 10 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 11 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 13 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 15 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 8 + 16 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 8 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 8 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c + ssl-dummy.c + 1 + 0 + + + 8 + 19 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 8 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 8 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 8 + 22 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 8 + 23 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 8 + 24 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 8 + 25 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 8 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 8 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 8 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 8 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 8 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 8 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 8 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 8 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 8 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 8 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 8 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 8 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 8 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 8 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 8 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 8 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 8 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 8 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c + port.c + 1 + 0 + + + 8 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 8 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 8 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 8 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 8 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 8 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 8 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 8 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 8 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx new file mode 100644 index 00000000..1c54758b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx @@ -0,0 +1,917 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + CryptBenchmark + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + CryptBenchmark + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_Benchmark CYASSL_STM32F2xx + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + benchmark.c + 1 + .\benchmark.c + + + + + Configuration + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::wolfSSL + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + ssl-dummy.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c + + + port.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + RTE\Network\Net_Debug.c + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-FS.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..af8fdc4d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 6 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 50 +#endif + +// Main Thread stack size [bytes] <64-10000:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 1500 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 0 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-4096:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 0 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-4096:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..2648e44d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 0 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +//
+#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +//
+#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..eae6859d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00002000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00009000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h new file mode 100644 index 00000000..aa51462a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h @@ -0,0 +1,19 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'CryptBenchmark' + * Target: 'CryptBenchmark' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c new file mode 100644 index 00000000..50351faf --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c @@ -0,0 +1,1106 @@ +/* benchmark.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* CTaoCrypt benchmark */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif + +#if defined(CYASSL_MDK_ARM) + extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; + #define fopen CyaSSL_fopen +#endif + +#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) + /* include test cert and key buffers for use with NO_FILESYSTEM */ + #if defined(CYASSL_MDK_ARM) + #include "cert_data.h" /* use certs_test.c for initial data, + so other commands can share the data. */ + #else + #include + #endif +#endif + + +#ifdef HAVE_BLAKE2 + #include + void bench_blake2(void); +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +void bench_des(void); +void bench_arc4(void); +void bench_hc128(void); +void bench_rabbit(void); +void bench_aes(int); +void bench_aesgcm(void); +void bench_aesccm(void); +void bench_camellia(void); + +void bench_md5(void); +void bench_sha(void); +void bench_sha256(void); +void bench_sha512(void); +void bench_ripemd(void); + +void bench_rsa(void); +void bench_rsaKeyGen(void); +void bench_dh(void); +#ifdef HAVE_ECC +void bench_eccKeyGen(void); +void bench_eccKeyAgree(void); +#endif + +double current_time(int); + + +#ifdef HAVE_CAVIUM + +static int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif + + +/* so embedded projects can pull in tests on their own */ +#if !defined(NO_MAIN_DRIVER) + +int main(int argc, char** argv) + +{ + (void)argc; + (void)argv; +#else +int benchmark_test(void *args) +{ +#endif + + #ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) { + printf("Cavium OpenNitroxDevice failed\n"); + exit(-1); + } +#endif /* HAVE_CAVIUM */ +#ifndef NO_AES + bench_aes(0); + bench_aes(1); +#endif +#ifdef HAVE_AESGCM + bench_aesgcm(); +#endif +#ifdef HAVE_AESCCM + bench_aesccm(); +#endif +#ifdef HAVE_CAMELLIA + bench_camellia(); +#endif +#ifndef NO_RC4 + bench_arc4(); +#endif +#ifdef HAVE_HC128 + bench_hc128(); +#endif +#ifndef NO_RABBIT + bench_rabbit(); +#endif +#ifndef NO_DES3 + bench_des(); +#endif + + printf("\n"); + +#ifndef NO_MD5 + bench_md5(); +#endif +#ifndef NO_SHA + bench_sha(); +#endif +#ifndef NO_SHA256 + bench_sha256(); +#endif +#ifdef CYASSL_SHA512 + bench_sha512(); +#endif +#ifdef CYASSL_RIPEMD + bench_ripemd(); +#endif +#ifdef HAVE_BLAKE2 + bench_blake2(); +#endif + + printf("\n"); + +#ifndef NO_RSA + bench_rsa(); +#endif + +#ifndef NO_DH + bench_dh(); +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) + bench_rsaKeyGen(); +#endif + +#ifdef HAVE_ECC + bench_eccKeyGen(); + bench_eccKeyAgree(); +#endif + + return 0; +} + + +#ifdef BENCH_EMBEDDED +const int numBlocks = 25; /* how many kB/megs to test (en/de)cryption */ +const char blockType[] = "kB"; /* used in printf output */ +const int times = 1; /* public key iterations */ +#else +const int numBlocks = 5; +const char blockType[] = "megs"; +const int times = 100; +#endif + +const byte key[] = +{ + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, + 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, + 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 +}; + +const byte iv[] = +{ + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 + +}; + + +/* use kB instead of mB for embedded benchmarking */ +#ifdef BENCH_EMBEDDED +byte plain [1024]; +byte cipher[1024]; +#else +byte plain [1024*1024]; +byte cipher[1024*1024]; +#endif + + +#ifndef NO_AES +void bench_aes(int show) +{ + Aes enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("aes init cavium failed\n"); +#endif + + AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + if (show) + printf("AES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + AesFreeCavium(&enc); +#endif +} +#endif + + +byte additional[13]; +byte tag[16]; + + +#ifdef HAVE_AESGCM +void bench_aesgcm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesGcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-GCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_AESCCM +void bench_aesccm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesCcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-CCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_CAMELLIA +void bench_camellia(void) +{ + Camellia cam; + double start, total, persec; + int i; + + CamelliaSetKey(&cam, key, 16, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("Camellia %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifndef NO_DES3 +void bench_des(void) +{ + Des3 enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("des3 init cavium failed\n"); +#endif + Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("3DES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Des3_FreeCavium(&enc); +#endif +} +#endif + + +#ifndef NO_RC4 +void bench_arc4(void) +{ + Arc4 enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("arc4 init cavium failed\n"); +#endif + + Arc4SetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Arc4Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("ARC4 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Arc4FreeCavium(&enc); +#endif +} +#endif + + +#ifdef HAVE_HC128 +void bench_hc128(void) +{ + HC128 enc; + double start, total, persec; + int i; + + Hc128_SetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Hc128_Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("HC128 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* HAVE_HC128 */ + + +#ifndef NO_RABBIT +void bench_rabbit(void) +{ + Rabbit enc; + double start, total, persec; + int i; + + RabbitSetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RabbitProcess(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RABBIT %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_RABBIT */ + + +#ifndef NO_MD5 +void bench_md5(void) +{ + Md5 hash; + byte digest[MD5_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitMd5(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Md5Update(&hash, plain, sizeof(plain)); + + Md5Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("MD5 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_MD5 */ + + +#ifndef NO_SHA +void bench_sha(void) +{ + Sha hash; + byte digest[SHA_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + ShaUpdate(&hash, plain, sizeof(plain)); + + ShaFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_SHA */ + + +#ifndef NO_SHA256 +void bench_sha256(void) +{ + Sha256 hash; + byte digest[SHA256_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha256(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Sha256Update(&hash, plain, sizeof(plain)); + + Sha256Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-256 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_SHA512 +void bench_sha512(void) +{ + Sha512 hash; + byte digest[SHA512_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha512(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Sha512Update(&hash, plain, sizeof(plain)); + + Sha512Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-512 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_RIPEMD +void bench_ripemd(void) +{ + RipeMd hash; + byte digest[RIPEMD_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitRipeMd(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RipeMdUpdate(&hash, plain, sizeof(plain)); + + RipeMdFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RIPEMD %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_BLAKE2 +void bench_blake2(void) +{ + Blake2b b2b; + byte digest[64]; + double start, total, persec; + int i; + + InitBlake2b(&b2b, 64); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Blake2bUpdate(&b2b, plain, sizeof(plain)); + + Blake2bFinal(&b2b, digest, 64); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("BLAKE2b %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#if !defined(NO_RSA) || !defined(NO_DH) \ + || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) +RNG rng; +#endif + +#ifndef NO_RSA + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certRSAname = "certs/rsa2048.der" ; +void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certRSAname = "certs/rsa2048.der" ; +#endif + +void bench_rsa(void) +{ + int i; + int ret; + byte tmp[3072]; + size_t bytes; + word32 idx = 0; + + byte message[] = "Everyone gets Friday off."; + byte enc[512]; /* for up to 4096 bit */ + const int len = (int)strlen((char*)message); + double start, total, each, milliEach; + + RsaKey rsaKey; + int rsaKeySz = 2048; /* used in printf */ + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); + bytes = sizeof_rsa_key_der_1024; + rsaKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); + bytes = sizeof_rsa_key_der_2048; +#else + FILE* file = fopen(certRSAname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); + return; + } + + bytes = fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + +#ifdef HAVE_CAVIUM + if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) + printf("RSA init cavium failed\n"); +#endif + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + InitRsaKey(&rsaKey, 0); + ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); + + start = current_time(1); + + for (i = 0; i < times; i++) + ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d encryption took %6.2f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, times); + + if (ret < 0) { + printf("Rsa Public Encrypt failed\n"); + return; + } + + start = current_time(1); + + for (i = 0; i < times; i++) { + byte out[512]; /* for up to 4096 bit */ + RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); + } + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d decryption took %6.2f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, times); + + FreeRsaKey(&rsaKey); +#ifdef HAVE_CAVIUM + RsaFreeCavium(&rsaKey); +#endif +} +#endif + + +#ifndef NO_DH + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certDHname = "certs/dh2048.der" ; +void set_Bench_DH_File(char * cert) { certDHname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certDHname = "certs/dh2048.der" ; +#endif + +void bench_dh(void) +{ + int i, ret; + byte tmp[1024]; + size_t bytes; + word32 idx = 0, pubSz, privSz, pubSz2, privSz2, agreeSz; + + byte pub[256]; /* for 2048 bit */ + byte priv[256]; /* for 2048 bit */ + byte pub2[256]; /* for 2048 bit */ + byte priv2[256]; /* for 2048 bit */ + byte agree[256]; /* for 2048 bit */ + + double start, total, each, milliEach; + DhKey dhKey; + int dhKeySz = 2048; /* used in printf */ + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); + bytes = sizeof_dh_key_der_1024; + dhKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); + bytes = sizeof_dh_key_der_2048; +#else + FILE* file = fopen(certDHname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); + return; + } + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + bytes = fread(tmp, 1, sizeof(tmp), file); +#endif /* USE_CERT_BUFFERS */ + + + InitDhKey(&dhKey); + bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); + if (bytes != 0) { + printf("dhekydecode failed, can't benchmark\n"); + #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); + #endif + return; + } + + start = current_time(1); + + for (i = 0; i < times; i++) + DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key generation %6.2f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, times); + + DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); + start = current_time(1); + + for (i = 0; i < times; i++) + DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key agreement %6.2f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, times); + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); +#endif + FreeDhKey(&dhKey); +} +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) +void bench_rsaKeyGen(void) +{ + RsaKey genKey; + double start, total, each, milliEach; + int i; + const int genTimes = 5; + + /* 1024 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 1024, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("RSA 1024 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); + + /* 2048 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 2048, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("RSA 2048 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} +#endif /* CYASSL_KEY_GEN */ + +#ifdef HAVE_ECC +void bench_eccKeyGen(void) +{ + ecc_key genKey; + double start, total, each, milliEach; + int i, ret; + const int genTimes = 5; + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + ecc_make_key(&rng, 32, &genKey); + ecc_free(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("ECC 256 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} + + +void bench_eccKeyAgree(void) +{ + ecc_key genKey, genKey2; + double start, total, each, milliEach; + int i, ret; + const int agreeTimes = 5; + byte shared[1024]; + byte sig[1024]; + byte digest[32]; + word32 x; + + ecc_init(&genKey); + ecc_init(&genKey2); + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + + ret = ecc_make_key(&rng, 32, &genKey); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + ret = ecc_make_key(&rng, 32, &genKey2); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(shared); + ret = ecc_shared_secret(&genKey, &genKey2, shared, &x); + if (ret != 0) { + printf("ecc_shared_secret failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DHE key agreement %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + /* make dummy digest */ + for (i = 0; i < (int)sizeof(digest); i++) + digest[i] = i; + + + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(sig); + ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); + if (ret != 0) { + printf("ecc_sign_hash failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DSA sign time %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + int verify = 0; + ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &genKey); + if (ret != 0) { + printf("ecc_verify_hash failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DSA verify time %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + ecc_free(&genKey2); + ecc_free(&genKey); +} +#endif /* HAVE_ECC */ + + +#ifdef _WIN32 + + #define WIN32_LEAN_AND_MEAN + #include + + double current_time(int reset) + { + (void)reset; + + static int init = 0; + static LARGE_INTEGER freq; + + LARGE_INTEGER count; + + if (!init) { + QueryPerformanceFrequency(&freq); + init = 1; + } + + QueryPerformanceCounter(&count); + + return (double)count.QuadPart / freq.QuadPart; + } + +#elif defined MICROCHIP_PIC32 + + #include + + double current_time(int reset) + { + /* NOTE: core timer tick rate = 40 Mhz, 1 tick = 25 ns */ + + unsigned int ns; + + /* should we reset our timer back to zero? Helps prevent timer + rollover */ + + if (reset) { + WriteCoreTimer(0); + } + + /* get timer in ns */ + ns = ReadCoreTimer() * 25; + + /* return seconds as a double */ + return ( ns / 1000000000.0 ); + } + +#elif defined CYASSL_MDK_ARM + extern double current_time(int reset) ; +#else + + #include + + double current_time(int reset) + { + (void) reset; + + struct timeval tv; + gettimeofday(&tv, 0); + + return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; + } + +#endif /* _WIN32 */ + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c new file mode 100644 index 00000000..2786027b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c @@ -0,0 +1,71 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include "cmsis_os.h" +#include "rl_fs.h" + +#include + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +static void init_filesystem (void) { + int32_t retv; + + retv = finit ("M0:"); + if (retv == 0) { + retv = fmount ("M0:"); + if (retv == 0) { + printf ("Drive M0 ready!\n"); + } + else { + printf ("Drive M0 mount failed!\n"); + } + } + else { + printf ("Drive M0 initialization failed!\n"); + } +} +extern void benchmark_test(void * arg) ; +extern void init_time(void) ; + +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ + +int main() +{ + void * arg = NULL ; + + init_time() ; + init_filesystem (); + printf("=== Start: Crypt Benchmark ===\n") ; + benchmark_test(arg) ; + printf("=== End: Crypt Benchmark ===\n") ; + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt new file mode 100644 index 00000000..5d4a8312 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt @@ -0,0 +1,16 @@ +This program is a simple test suite of wolfCrypt library. + +In order to run this test suite, copy +{PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. + +For test configuration, refer config-Crypt.h. + +For the hardware crypt on config-Crypt.h, download +STSW-STM32062: STM32F2xx standard peripherals library at +http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to + {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib + + + Support +------- +Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx new file mode 100644 index 00000000..a7474ba7 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx @@ -0,0 +1,1094 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + CryptTest + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + tmp + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\test.c + test.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 4 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 5 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 6 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 9 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 10 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 11 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 13 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 15 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 8 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 8 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c + ssl-dummy.c + 1 + 0 + + + 8 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 8 + 19 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 8 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 8 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 8 + 22 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 8 + 23 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 8 + 24 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 8 + 25 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 8 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 8 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 8 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 8 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 8 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 8 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 8 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 8 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 8 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 8 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 8 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 8 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 8 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 8 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 8 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 8 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 8 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 8 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 8 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 8 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 8 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 8 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 8 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 8 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 8 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 8 + 51 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 8 + 52 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config.h + config.h + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx new file mode 100644 index 00000000..6db3f16f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx @@ -0,0 +1,919 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + CryptTest + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + CryptTest + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_CryptTest CYASSL_STM32F2xx __DBG_ITM + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + test.c + 1 + .\test.c + + + + + Configuration + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::wolfSSL + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + ssl-dummy.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config.h + 5 + RTE\wolfSSL\config.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + RTE\Network\Net_Debug.c + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-FS.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..31dd53c7 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 6 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 50 +#endif + +// Main Thread stack size [bytes] <64-10000:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 2000 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 0 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-4096:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 0 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-4096:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..2648e44d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 0 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..c31ce199 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00001000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00009000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h new file mode 100644 index 00000000..4d1a6372 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h @@ -0,0 +1,19 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'CryptTest' + * Target: 'CryptTest' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c new file mode 100644 index 00000000..8684553c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c @@ -0,0 +1,71 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include "cmsis_os.h" +#include "rl_fs.h" + +#include + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +static void init_filesystem (void) { + int32_t retv; + + retv = finit ("M0:"); + if (retv == 0) { + retv = fmount ("M0:"); + if (retv == 0) { + printf ("Drive M0 ready!\n"); + } + else { + printf ("Drive M0 mount failed!\n"); + } + } + else { + printf ("Drive M0 initialization failed!\n"); + } +} +extern void ctaocrypt_test(void * arg) ; +extern void init_time(void) ; + +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ + +int main() +{ + void * arg = NULL ; + + init_time() ; + init_filesystem (); + printf("=== Start: Crypt test ===\n") ; + ctaocrypt_test(arg) ; + printf("=== End: Crypt test ===\n") ; + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c new file mode 100644 index 00000000..44d043b3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c @@ -0,0 +1,3712 @@ +/* test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_CRYPT_TEST + +#ifdef CYASSL_TEST_CERT + #include +#else + #include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_ECC + #include +#endif +#ifdef HAVE_BLAKE2 + #include +#endif +#ifdef HAVE_LIBZ + #include +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +#ifdef OPENSSL_EXTRA + #include + #include + #include + #include +#endif + + +#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) + /* include test cert and key buffers for use with NO_FILESYSTEM */ + #if defined(CYASSL_MDK_ARM) + #include "cert_data.h" + /* use certs_test.c for initial data, so other + commands can share the data. */ + #else + #include + #endif +#endif + +#if defined(CYASSL_MDK_ARM) + #include + #include + extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; + #define fopen CyaSSL_fopen +#endif + +#ifdef HAVE_NTRU + #include "crypto_ntru.h" +#endif +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif + +#ifdef FREESCALE_MQX + #include + #include + #include +#else + #include +#endif + + +#ifdef THREADX + /* since just testing, use THREADX log printf instead */ + int dc_log_printf(char*, ...); + #undef printf + #define printf dc_log_printf +#endif + +#include "ctaocrypt/test/test.h" + + +typedef struct testVector { + const char* input; + const char* output; + size_t inLen; + size_t outLen; +} testVector; + +int md2_test(void); +int md5_test(void); +int md4_test(void); +int sha_test(void); +int sha256_test(void); +int sha512_test(void); +int sha384_test(void); +int hmac_md5_test(void); +int hmac_sha_test(void); +int hmac_sha256_test(void); +int hmac_sha384_test(void); +int hmac_sha512_test(void); +int hmac_blake2b_test(void); +int hkdf_test(void); +int arc4_test(void); +int hc128_test(void); +int rabbit_test(void); +int des_test(void); +int des3_test(void); +int aes_test(void); +int aesgcm_test(void); +int gmac_test(void); +int aesccm_test(void); +int camellia_test(void); +int rsa_test(void); +int dh_test(void); +int dsa_test(void); +int random_test(void); +int pwdbased_test(void); +int ripemd_test(void); +int openssl_test(void); /* test mini api */ +int pbkdf1_test(void); +int pkcs12_test(void); +int pbkdf2_test(void); +#ifdef HAVE_ECC + int ecc_test(void); +#endif +#ifdef HAVE_BLAKE2 + int blake2b_test(void); +#endif +#ifdef HAVE_LIBZ + int compress_test(void); +#endif + + + +static void err_sys(const char* msg, int es) +{ + printf("%s error = %d\n", msg, es); + #if !defined(THREADX) && !defined(CYASSL_MDK_ARM) + if (msg) + exit(es); + #endif + return; +} + +/* func_args from test.h, so don't have to pull in other junk */ +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + + + +void ctaocrypt_test(void* args) +{ + int ret = 0; + + ((func_args*)args)->return_code = -1; /* error state */ + +#if !defined(NO_BIG_INT) + if (CheckCtcSettings() != 1) + err_sys("Build vs runtime math mismatch\n", -1234); + +#ifdef USE_FAST_MATH + if (CheckFastMathSettings() != 1) + err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235); +#endif /* USE_FAST_MATH */ +#endif /* !NO_BIG_INT */ + + +#ifndef NO_MD5 + if ( (ret = md5_test()) != 0) + err_sys("MD5 test failed!\n", ret); + else + printf( "MD5 test passed!\n"); +#endif + +#ifdef CYASSL_MD2 + if ( (ret = md2_test()) != 0) + err_sys("MD2 test failed!\n", ret); + else + printf( "MD2 test passed!\n"); +#endif + +#ifndef NO_MD4 + if ( (ret = md4_test()) != 0) + err_sys("MD4 test failed!\n", ret); + else + printf( "MD4 test passed!\n"); +#endif + +#ifndef NO_SHA + if ( (ret = sha_test()) != 0) + err_sys("SHA test failed!\n", ret); + else + printf( "SHA test passed!\n"); +#endif + +#ifndef NO_SHA256 + if ( (ret = sha256_test()) != 0) + err_sys("SHA-256 test failed!\n", ret); + else + printf( "SHA-256 test passed!\n"); +#endif + +#ifdef CYASSL_SHA384 + if ( (ret = sha384_test()) != 0) + err_sys("SHA-384 test failed!\n", ret); + else + printf( "SHA-384 test passed!\n"); +#endif + +#ifdef CYASSL_SHA512 + if ( (ret = sha512_test()) != 0) + err_sys("SHA-512 test failed!\n", ret); + else + printf( "SHA-512 test passed!\n"); +#endif + +#ifdef CYASSL_RIPEMD + if ( (ret = ripemd_test()) != 0) + err_sys("RIPEMD test failed!\n", ret); + else + printf( "RIPEMD test passed!\n"); +#endif + +#ifdef HAVE_BLAKE2 + if ( (ret = blake2b_test()) != 0) + err_sys("BLAKE2b test failed!\n", ret); + else + printf( "BLAKE2b test passed!\n"); +#endif + +#ifndef NO_HMAC + #ifndef NO_MD5 + if ( (ret = hmac_md5_test()) != 0) + err_sys("HMAC-MD5 test failed!\n", ret); + else + printf( "HMAC-MD5 test passed!\n"); + #endif + + #ifndef NO_SHA + if ( (ret = hmac_sha_test()) != 0) + err_sys("HMAC-SHA test failed!\n", ret); + else + printf( "HMAC-SHA test passed!\n"); + #endif + + #ifndef NO_SHA256 + if ( (ret = hmac_sha256_test()) != 0) + err_sys("HMAC-SHA256 test failed!\n", ret); + else + printf( "HMAC-SHA256 test passed!\n"); + #endif + + #ifdef CYASSL_SHA384 + if ( (ret = hmac_sha384_test()) != 0) + err_sys("HMAC-SHA384 test failed!\n", ret); + else + printf( "HMAC-SHA384 test passed!\n"); + #endif + + #ifdef CYASSL_SHA512 + if ( (ret = hmac_sha512_test()) != 0) + err_sys("HMAC-SHA512 test failed!\n", ret); + else + printf( "HMAC-SHA512 test passed!\n"); + #endif + + #ifdef HAVE_BLAKE2 + if ( (ret = hmac_blake2b_test()) != 0) + err_sys("HMAC-BLAKE2 test failed!\n", ret); + else + printf( "HMAC-BLAKE2 test passed!\n"); + #endif + + #ifdef HAVE_HKDF + if ( (ret = hkdf_test()) != 0) + err_sys("HMAC-KDF test failed!\n", ret); + else + printf( "HMAC-KDF test passed!\n"); + #endif + +#endif + +#ifdef HAVE_AESGCM + if ( (ret = gmac_test()) != 0) + err_sys("GMAC test passed!\n", ret); + else + printf( "GMAC test passed!\n"); +#endif + +#ifndef NO_RC4 + if ( (ret = arc4_test()) != 0) + err_sys("ARC4 test failed!\n", ret); + else + printf( "ARC4 test passed!\n"); +#endif + +#ifndef NO_HC128 + if ( (ret = hc128_test()) != 0) + err_sys("HC-128 test failed!\n", ret); + else + printf( "HC-128 test passed!\n"); +#endif + +#ifndef NO_RABBIT + if ( (ret = rabbit_test()) != 0) + err_sys("Rabbit test failed!\n", ret); + else + printf( "Rabbit test passed!\n"); +#endif + +#ifndef NO_DES3 + if ( (ret = des_test()) != 0) + err_sys("DES test failed!\n", ret); + else + printf( "DES test passed!\n"); +#endif + +#ifndef NO_DES3 + if ( (ret = des3_test()) != 0) + err_sys("DES3 test failed!\n", ret); + else + printf( "DES3 test passed!\n"); +#endif + +#ifndef NO_AES + if ( (ret = aes_test()) != 0) + err_sys("AES test failed!\n", ret); + else + printf( "AES test passed!\n"); + +#ifdef HAVE_AESGCM + if ( (ret = aesgcm_test()) != 0) + err_sys("AES-GCM test failed!\n", ret); + else + printf( "AES-GCM test passed!\n"); +#endif + +#ifdef HAVE_AESCCM + if ( (ret = aesccm_test()) != 0) + err_sys("AES-CCM test failed!\n", ret); + else + printf( "AES-CCM test passed!\n"); +#endif +#endif + +#ifdef HAVE_CAMELLIA + if ( (ret = camellia_test()) != 0) + err_sys("CAMELLIA test failed!\n", ret); + else + printf( "CAMELLIA test passed!\n"); +#endif + + if ( (ret = random_test()) != 0) + err_sys("RANDOM test failed!\n", ret); + else + printf( "RANDOM test passed!\n"); + +#ifndef NO_RSA + if ( (ret = rsa_test()) != 0) + err_sys("RSA test failed!\n", ret); + else + printf( "RSA test passed!\n"); +#endif + +#ifndef NO_DH + if ( (ret = dh_test()) != 0) + err_sys("DH test failed!\n", ret); + else + printf( "DH test passed!\n"); +#endif + +#ifndef NO_DSA + if ( (ret = dsa_test()) != 0) + err_sys("DSA test failed!\n", ret); + else + printf( "DSA test passed!\n"); +#endif + +#ifndef NO_PWDBASED + if ( (ret = pwdbased_test()) != 0) + err_sys("PWDBASED test failed!\n", ret); + else + printf( "PWDBASED test passed!\n"); +#endif + +#ifdef OPENSSL_EXTRA + if ( (ret = openssl_test()) != 0) + err_sys("OPENSSL test failed!\n", ret); + else + printf( "OPENSSL test passed!\n"); +#endif + +#ifdef HAVE_ECC + if ( (ret = ecc_test()) != 0) + err_sys("ECC test failed!\n", ret); + else + printf( "ECC test passed!\n"); +#endif + +#ifdef HAVE_LIBZ + if ( (ret = compress_test()) != 0) + err_sys("COMPRESS test failed!\n", ret); + else + printf( "COMPRESS test passed!\n"); +#endif + + ((func_args*)args)->return_code = ret; +} + + +#ifndef NO_MAIN_DRIVER + +#ifdef HAVE_CAVIUM + +static int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif /* HAVE_CAVIUM */ + + /* so overall tests can pull in test function */ + + int main(int argc, char** argv) + { + + func_args args; + + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed", -1236); +#endif /* HAVE_CAVIUM */ + + args.argc = argc; + args.argv = argv; + + ctaocrypt_test(&args); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + + return args.return_code; + } + +#endif /* NO_MAIN_DRIVER */ + + +#ifdef CYASSL_MD2 +int md2_test() +{ + Md2 md2; + byte hash[MD2_DIGEST_SIZE]; + + testVector a, b, c, d, e, f, g; + testVector test_md2[7]; + int times = sizeof(test_md2) / sizeof(testVector), i; + + a.input = ""; + a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69" + "\x27\x73"; + a.inLen = strlen(a.input); + a.outLen = MD2_DIGEST_SIZE; + + b.input = "a"; + b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0" + "\xb5\xd1"; + b.inLen = strlen(b.input); + b.outLen = MD2_DIGEST_SIZE; + + c.input = "abc"; + c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde" + "\xd6\xbb"; + c.inLen = strlen(c.input); + c.outLen = MD2_DIGEST_SIZE; + + d.input = "message digest"; + d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe" + "\x06\xb0"; + d.inLen = strlen(d.input); + d.outLen = MD2_DIGEST_SIZE; + + e.input = "abcdefghijklmnopqrstuvwxyz"; + e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47" + "\x94\x0b"; + e.inLen = strlen(e.input); + e.outLen = MD2_DIGEST_SIZE; + + f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03" + "\x38\xcd"; + f.inLen = strlen(f.input); + f.outLen = MD2_DIGEST_SIZE; + + g.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3" + "\xef\xd8"; + g.inLen = strlen(g.input); + g.outLen = MD2_DIGEST_SIZE; + + test_md2[0] = a; + test_md2[1] = b; + test_md2[2] = c; + test_md2[3] = d; + test_md2[4] = e; + test_md2[5] = f; + test_md2[6] = g; + + InitMd2(&md2); + + for (i = 0; i < times; ++i) { + Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen); + Md2Final(&md2, hash); + + if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0) + return -155 - i; + } + + return 0; +} +#endif + +#ifndef NO_MD5 +int md5_test(void) +{ + Md5 md5; + byte hash[MD5_DIGEST_SIZE]; + + testVector a, b, c, d, e; + testVector test_md5[5]; + int times = sizeof(test_md5) / sizeof(testVector), i; + + a.input = "abc"; + a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" + "\x72"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + b.input = "message digest"; + b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" + "\xd0"; + b.inLen = strlen(b.input); + b.outLen = MD5_DIGEST_SIZE; + + c.input = "abcdefghijklmnopqrstuvwxyz"; + c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" + "\x3b"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" + "\x9f"; + d.inLen = strlen(d.input); + d.outLen = MD5_DIGEST_SIZE; + + e.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" + "\x7a"; + e.inLen = strlen(e.input); + e.outLen = MD5_DIGEST_SIZE; + + test_md5[0] = a; + test_md5[1] = b; + test_md5[2] = c; + test_md5[3] = d; + test_md5[4] = e; + + InitMd5(&md5); + + for (i = 0; i < times; ++i) { + Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); + Md5Final(&md5, hash); + + if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) + return -5 - i; + } + + return 0; +} +#endif /* NO_MD5 */ + + +#ifndef NO_MD4 + +int md4_test(void) +{ + Md4 md4; + byte hash[MD4_DIGEST_SIZE]; + + testVector a, b, c, d, e, f, g; + testVector test_md4[7]; + int times = sizeof(test_md4) / sizeof(testVector), i; + + a.input = ""; + a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" + "\xc0"; + a.inLen = strlen(a.input); + a.outLen = MD4_DIGEST_SIZE; + + b.input = "a"; + b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" + "\x24"; + b.inLen = strlen(b.input); + b.outLen = MD4_DIGEST_SIZE; + + c.input = "abc"; + c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" + "\x9d"; + c.inLen = strlen(c.input); + c.outLen = MD4_DIGEST_SIZE; + + d.input = "message digest"; + d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" + "\x4b"; + d.inLen = strlen(d.input); + d.outLen = MD4_DIGEST_SIZE; + + e.input = "abcdefghijklmnopqrstuvwxyz"; + e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" + "\xa9"; + e.inLen = strlen(e.input); + e.outLen = MD4_DIGEST_SIZE; + + f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" + "\xe4"; + f.inLen = strlen(f.input); + f.outLen = MD4_DIGEST_SIZE; + + g.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" + "\x36"; + g.inLen = strlen(g.input); + g.outLen = MD4_DIGEST_SIZE; + + test_md4[0] = a; + test_md4[1] = b; + test_md4[2] = c; + test_md4[3] = d; + test_md4[4] = e; + test_md4[5] = f; + test_md4[6] = g; + + InitMd4(&md4); + + for (i = 0; i < times; ++i) { + Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); + Md4Final(&md4, hash); + + if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) + return -205 - i; + } + + return 0; +} + +#endif /* NO_MD4 */ + +#ifndef NO_SHA + +int sha_test(void) +{ + Sha sha; + byte hash[SHA_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_sha[4]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" + "\x6C\x9C\xD0\xD8\x9D"; + a.inLen = strlen(a.input); + a.outLen = SHA_DIGEST_SIZE; + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" + "\xE5\xE5\x46\x70\xF1"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaa"; + c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" + "\x2A\x25\xEC\x64\x4D"; + c.inLen = strlen(c.input); + c.outLen = SHA_DIGEST_SIZE; + + d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaa"; + d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" + "\x53\x99\x5E\x26\xA0"; + d.inLen = strlen(d.input); + d.outLen = SHA_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + test_sha[2] = c; + test_sha[3] = d; + + InitSha(&sha); + + for (i = 0; i < times; ++i) { + ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); + ShaFinal(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} + +#endif /* NO_SHA */ + +#ifdef CYASSL_RIPEMD +int ripemd_test(void) +{ + RipeMd ripemd; + byte hash[RIPEMD_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_ripemd[4]; + int times = sizeof(test_ripemd) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" + "\xb0\x87\xf1\x5a\x0b\xfc"; + a.inLen = strlen(a.input); + a.outLen = RIPEMD_DIGEST_SIZE; + + b.input = "message digest"; + b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" + "\x5f\xfa\x21\x59\x5f\x36"; + b.inLen = strlen(b.input); + b.outLen = RIPEMD_DIGEST_SIZE; + + c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" + "\xf4\x9a\xda\x62\xeb\x2b"; + c.inLen = strlen(c.input); + c.outLen = RIPEMD_DIGEST_SIZE; + + d.input = "12345678901234567890123456789012345678901234567890123456" + "789012345678901234567890"; + d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" + "\x82\xbf\x63\x32\x6b\xfb"; + d.inLen = strlen(d.input); + d.outLen = RIPEMD_DIGEST_SIZE; + + test_ripemd[0] = a; + test_ripemd[1] = b; + test_ripemd[2] = c; + test_ripemd[3] = d; + + InitRipeMd(&ripemd); + + for (i = 0; i < times; ++i) { + RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, + (word32)test_ripemd[i].inLen); + RipeMdFinal(&ripemd, hash); + + if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* CYASSL_RIPEMD */ + + +#ifdef HAVE_BLAKE2 + + +#define BLAKE2_TESTS 3 + +static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] = +{ + { + 0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03, + 0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72, + 0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61, + 0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19, + 0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53, + 0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B, + 0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55, + 0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE + }, + { + 0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95, + 0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7, + 0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44, + 0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C, + 0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB, + 0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4, + 0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48, + 0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B + }, + { + 0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9, + 0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72, + 0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF, + 0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15, + 0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB, + 0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04, + 0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1, + 0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5 + } +}; + + + +int blake2b_test(void) +{ + Blake2b b2b; + byte digest[64]; + byte input[64]; + int i; + + for (i = 0; i < (int)sizeof(input); i++) + input[i] = (byte)i; + + for (i = 0; i < BLAKE2_TESTS; i++) { + InitBlake2b(&b2b, 64); + Blake2bUpdate(&b2b, input, i); + Blake2bFinal(&b2b, digest, 64); + + if (memcmp(digest, blake2b_vec[i], 64) != 0) { + return -300 - i; + } + } + + return 0; +} +#endif /* HAVE_BLAKE2 */ + + +#ifndef NO_SHA256 +int sha256_test(void) +{ + Sha256 sha; + byte hash[SHA256_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" + "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" + "\x15\xAD"; + a.inLen = strlen(a.input); + a.outLen = SHA256_DIGEST_SIZE; + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1"; + b.inLen = strlen(b.input); + b.outLen = SHA256_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + InitSha256(&sha); + + for (i = 0; i < times; ++i) { + Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + Sha256Final(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + + +#ifdef CYASSL_SHA512 +int sha512_test(void) +{ + Sha512 sha; + byte hash[SHA512_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" + "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" + "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" + "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" + "\xa5\x4c\xa4\x9f"; + a.inLen = strlen(a.input); + a.outLen = SHA512_DIGEST_SIZE; + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09"; + b.inLen = strlen(b.input); + b.outLen = SHA512_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + InitSha512(&sha); + + for (i = 0; i < times; ++i) { + Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + Sha512Final(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + + +#ifdef CYASSL_SHA384 +int sha384_test(void) +{ + Sha384 sha; + byte hash[SHA384_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" + "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" + "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" + "\xc8\x25\xa7"; + a.inLen = strlen(a.input); + a.outLen = SHA384_DIGEST_SIZE; + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39"; + b.inLen = strlen(b.input); + b.outLen = SHA384_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + InitSha384(&sha); + + for (i = 0; i < times; ++i) { + Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + Sha384Final(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* CYASSL_SHA384 */ + + +#if !defined(NO_HMAC) && !defined(NO_MD5) +int hmac_md5_test(void) +{ + Hmac hmac; + byte hash[MD5_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" + "\x9d"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" + "\x38"; + b.inLen = strlen(b.input); + b.outLen = MD5_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" + "\xf6"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20009; +#endif + HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif /* NO_HMAC && NO_MD5 */ + +#if !defined(NO_HMAC) && !defined(NO_SHA) +int hmac_sha_test(void) +{ + Hmac hmac; + byte hash[SHA_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" + "\x8e\xf1\x46\xbe\x00"; + a.inLen = strlen(a.input); + a.outLen = SHA_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" + "\x9c\x25\x9a\x7c\x79"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" + "\x4f\x63\xf1\x75\xd3"; + c.inLen = strlen(c.input); + c.outLen = SHA_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20010; +#endif + HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && !defined(NO_SHA256) +int hmac_sha256_test(void) +{ + Hmac hmac; + byte hash[SHA256_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" + "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" + "\xcf\xf7"; + a.inLen = strlen(a.input); + a.outLen = SHA256_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" + "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" + "\x38\x43"; + b.inLen = strlen(b.input); + b.outLen = SHA256_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" + "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" + "\x65\xfe"; + c.inLen = strlen(c.input); + c.outLen = SHA256_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20011; +#endif + HmacSetKey(&hmac, SHA256, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(HAVE_BLAKE2) +int hmac_blake2b_test(void) +{ + Hmac hmac; + byte hash[BLAKE2B_256]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x72\x93\x0d\xdd\xf5\xf7\xe1\x78\x38\x07\x44\x18\x0b\x3f\x51" + "\x37\x25\xb5\x82\xc2\x08\x83\x2f\x1c\x99\xfd\x03\xa0\x16\x75" + "\xac\xfd"; + a.inLen = strlen(a.input); + a.outLen = BLAKE2B_256; + + b.input = "what do ya want for nothing?"; + b.output = "\x3d\x20\x50\x71\x05\xc0\x8c\x0c\x38\x44\x1e\xf7\xf9\xd1\x67" + "\x21\xff\x64\xf5\x94\x00\xcf\xf9\x75\x41\xda\x88\x61\x9d\x7c" + "\xda\x2b"; + b.inLen = strlen(b.input); + b.outLen = BLAKE2B_256; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\xda\xfe\x2a\x24\xfc\xe7\xea\x36\x34\xbe\x41\x92\xc7\x11\xa7" + "\x00\xae\x53\x9c\x11\x9c\x80\x74\x55\x22\x25\x4a\xb9\x55\xd3" + "\x0f\x87"; + c.inLen = strlen(c.input); + c.outLen = BLAKE2B_256; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20011; +#endif + HmacSetKey(&hmac, BLAKE2B_ID, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, BLAKE2B_256) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(CYASSL_SHA384) +int hmac_sha384_test(void) +{ + Hmac hmac; + byte hash[SHA384_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" + "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" + "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" + "\xfa\x9c\xb6"; + a.inLen = strlen(a.input); + a.outLen = SHA384_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" + "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" + "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" + "\xb2\x16\x49"; + b.inLen = strlen(b.input); + b.outLen = SHA384_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" + "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" + "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" + "\xa3\x4f\x27"; + c.inLen = strlen(c.input); + c.outLen = SHA384_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + HmacSetKey(&hmac, SHA384, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(CYASSL_SHA512) +int hmac_sha512_test(void) +{ + Hmac hmac; + byte hash[SHA512_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c" + "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1" + "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae" + "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20" + "\x3a\x12\x68\x54"; + a.inLen = strlen(a.input); + a.outLen = SHA512_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0" + "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25" + "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8" + "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a" + "\x38\xbc\xe7\x37"; + b.inLen = strlen(b.input); + b.outLen = SHA512_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b" + "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27" + "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e" + "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59" + "\xe1\x32\x92\xfb"; + c.inLen = strlen(c.input); + c.outLen = SHA512_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + HmacSetKey(&hmac, SHA512, (byte*)keys[i], (word32)strlen(keys[i])); + HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + HmacFinal(&hmac, hash); + + if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + + +#ifndef NO_RC4 +int arc4_test(void) +{ + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x01\x23\x45\x67\x89\xab\xcd\xef", + "\x01\x23\x45\x67\x89\xab\xcd\xef", + "\x00\x00\x00\x00\x00\x00\x00\x00", + "\xef\x01\x23\x45" + }; + + testVector a, b, c, d; + testVector test_arc4[4]; + + int times = sizeof(test_arc4) / sizeof(testVector), i; + + a.input = "\x01\x23\x45\x67\x89\xab\xcd\xef"; + a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a"; + c.inLen = 8; + c.outLen = 8; + + d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61"; + d.inLen = 10; + d.outLen = 10; + + test_arc4[0] = a; + test_arc4[1] = b; + test_arc4[2] = c; + test_arc4[3] = d; + + for (i = 0; i < times; ++i) { + Arc4 enc; + Arc4 dec; + int keylen = 8; /* strlen with key 0x00 not good */ + if (i == 3) + keylen = 4; + +#ifdef HAVE_CAVIUM + if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20001; + if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20002; +#endif + + Arc4SetKey(&enc, (byte*)keys[i], keylen); + Arc4SetKey(&dec, (byte*)keys[i], keylen); + + Arc4Process(&enc, cipher, (byte*)test_arc4[i].input, + (word32)test_arc4[i].outLen); + Arc4Process(&dec, plain, cipher, (word32)test_arc4[i].outLen); + + if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen)) + return -20 - i; + + if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen)) + return -20 - 5 - i; + +#ifdef HAVE_CAVIUM + Arc4FreeCavium(&enc); + Arc4FreeCavium(&dec); +#endif + } + + return 0; +} +#endif + + +int hc128_test(void) +{ +#ifdef HAVE_HC128 + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD", + "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC" + }; + + const char* ivs[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16", + "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31" + }; + + + testVector a, b, c, d; + testVector test_hc128[4]; + + int times = sizeof(test_hc128) / sizeof(testVector), i; + + a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A"; + c.inLen = 8; + c.outLen = 8; + + d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29"; + d.inLen = 15; + d.outLen = 15; + + test_hc128[0] = a; + test_hc128[1] = b; + test_hc128[2] = c; + test_hc128[3] = d; + + for (i = 0; i < times; ++i) { + HC128 enc; + HC128 dec; + + /* align keys/ivs in plain/cipher buffers */ + memcpy(plain, keys[i], 16); + memcpy(cipher, ivs[i], 16); + + Hc128_SetKey(&enc, plain, cipher); + Hc128_SetKey(&dec, plain, cipher); + + /* align input */ + memcpy(plain, test_hc128[i].input, test_hc128[i].outLen); + Hc128_Process(&enc, cipher, plain, (word32)test_hc128[i].outLen); + Hc128_Process(&dec, plain, cipher, (word32)test_hc128[i].outLen); + + if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen)) + return -120 - i; + + if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen)) + return -120 - 5 - i; + } + +#endif /* HAVE_HC128 */ + return 0; +} + + +#ifndef NO_RABBIT +int rabbit_test(void) +{ + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91" + }; + + const char* ivs[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00", + "\x59\x7E\x26\xC1\x75\xF5\x73\xC3", + 0 + }; + + testVector a, b, c; + testVector test_rabbit[3]; + + int times = sizeof(test_rabbit) / sizeof(testVector), i; + + a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\x04\xCE\xCA\x7A\x1A\x86\x6E\x77"; + c.inLen = 8; + c.outLen = 8; + + test_rabbit[0] = a; + test_rabbit[1] = b; + test_rabbit[2] = c; + + for (i = 0; i < times; ++i) { + Rabbit enc; + Rabbit dec; + byte* iv; + + /* align keys/ivs in plain/cipher buffers */ + memcpy(plain, keys[i], 16); + if (ivs[i]) { + memcpy(cipher, ivs[i], 8); + iv = cipher; + } else + iv = NULL; + RabbitSetKey(&enc, plain, iv); + RabbitSetKey(&dec, plain, iv); + + /* align input */ + memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen); + RabbitProcess(&enc, cipher, plain, (word32)test_rabbit[i].outLen); + RabbitProcess(&dec, plain, cipher, (word32)test_rabbit[i].outLen); + + if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen)) + return -130 - i; + + if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen)) + return -130 - 5 - i; + } + + return 0; +} +#endif /* NO_RABBIT */ + + +#ifndef NO_DES3 +int des_test(void) +{ + const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + Des enc; + Des dec; + + const byte key[] = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef + }; + + const byte iv[] = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef + }; + + const byte verify[] = + { + 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, + 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, + 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b + }; + + + Des_SetKey(&enc, key, iv, DES_ENCRYPTION); + Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); + Des_SetKey(&dec, key, iv, DES_DECRYPTION); + Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); + + if (memcmp(plain, vector, sizeof(plain))) + return -31; + + if (memcmp(cipher, verify, sizeof(cipher))) + return -32; + + return 0; +} +#endif /* NO_DES3 */ + + +#ifndef NO_DES3 +int des3_test(void) +{ + const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + Des3 enc; + Des3 dec; + + const byte key3[] = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, + 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, + 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 + }; + const byte iv3[] = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 + + }; + + const byte verify3[] = + { + 0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e, + 0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98, + 0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0 + }; + + +#ifdef HAVE_CAVIUM + if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20005; + if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20006; +#endif + Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION); + Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION); + Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); + Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); + + if (memcmp(plain, vector, sizeof(plain))) + return -33; + + if (memcmp(cipher, verify3, sizeof(cipher))) + return -34; + +#ifdef HAVE_CAVIUM + Des3_FreeCavium(&enc); + Des3_FreeCavium(&dec); +#endif + return 0; +} +#endif /* NO_DES */ + + +#ifndef NO_AES +int aes_test(void) +{ + Aes enc; + Aes dec; + + const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + const byte verify[] = + { + 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, + 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb + }; + + byte key[] = "0123456789abcdef "; /* align */ + byte iv[] = "1234567890abcdef "; /* align */ + + byte cipher[AES_BLOCK_SIZE * 4]; + byte plain [AES_BLOCK_SIZE * 4]; + +#ifdef HAVE_CAVIUM + if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20003; + if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20004; +#endif + AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); + AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION); + + AesCbcEncrypt(&enc, cipher, msg, AES_BLOCK_SIZE); + AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE); + + if (memcmp(plain, msg, AES_BLOCK_SIZE)) + return -60; + + if (memcmp(cipher, verify, AES_BLOCK_SIZE)) + return -61; + +#ifdef HAVE_CAVIUM + AesFreeCavium(&enc); + AesFreeCavium(&dec); +#endif +#ifdef CYASSL_AES_COUNTER + { + const byte ctrKey[] = + { + 0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6, + 0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c + }; + + const byte ctrIv[] = + { + 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, + 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff + }; + + + const byte ctrPlain[] = + { + 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, + 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, + 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, + 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, + 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11, + 0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef, + 0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17, + 0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10 + }; + + const byte ctrCipher[] = + { + 0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26, + 0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce, + 0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff, + 0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff, + 0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e, + 0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab, + 0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1, + 0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee + }; + + AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + /* Ctr only uses encrypt, even on key setup */ + AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + + AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4); + AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4); + + if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4)) + return -66; + + if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4)) + return -67; + } +#endif /* CYASSL_AES_COUNTER */ + +#if defined(CYASSL_AESNI) && defined(CYASSL_AES_DIRECT) + { + const byte niPlain[] = + { + 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, + 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a + }; + + const byte niCipher[] = + { + 0xf3,0xee,0xd1,0xbd,0xb5,0xd2,0xa0,0x3c, + 0x06,0x4b,0x5a,0x7e,0x3d,0xb1,0x81,0xf8 + }; + + const byte niKey[] = + { + 0x60,0x3d,0xeb,0x10,0x15,0xca,0x71,0xbe, + 0x2b,0x73,0xae,0xf0,0x85,0x7d,0x77,0x81, + 0x1f,0x35,0x2c,0x07,0x3b,0x61,0x08,0xd7, + 0x2d,0x98,0x10,0xa3,0x09,0x14,0xdf,0xf4 + }; + + XMEMSET(cipher, 0, AES_BLOCK_SIZE); + AesSetKey(&enc, niKey, sizeof(niKey), cipher, AES_ENCRYPTION); + AesEncryptDirect(&enc, cipher, niPlain); + if (XMEMCMP(cipher, niCipher, AES_BLOCK_SIZE) != 0) + return -20006; + + XMEMSET(plain, 0, AES_BLOCK_SIZE); + AesSetKey(&dec, niKey, sizeof(niKey), plain, AES_DECRYPTION); + AesDecryptDirect(&dec, plain, niCipher); + if (XMEMCMP(plain, niPlain, AES_BLOCK_SIZE) != 0) + return -20007; + } +#endif /* CYASSL_AESNI && CYASSL_AES_DIRECT */ + + return 0; +} + +#ifdef HAVE_AESGCM +int aesgcm_test(void) +{ + Aes enc; + + /* + * This is Test Case 16 from the document Galois/ + * Counter Mode of Operation (GCM) by McGrew and + * Viega. + */ + const byte k[] = + { + 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, + 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 + }; + + const byte iv[] = + { + 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, + 0xde, 0xca, 0xf8, 0x88 + }; + + const byte p[] = + { + 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + 0xba, 0x63, 0x7b, 0x39 + }; + + const byte a[] = + { + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xab, 0xad, 0xda, 0xd2 + }; + + const byte c[] = + { + 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, + 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, + 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, + 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, + 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, + 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, + 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, + 0xbc, 0xc9, 0xf6, 0x62 + }; + + const byte t[] = + { + 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, + 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b + }; + + byte t2[sizeof(t)]; + byte p2[sizeof(c)]; + byte c2[sizeof(p)]; + + int result; + + memset(t2, 0, sizeof(t2)); + memset(c2, 0, sizeof(c2)); + memset(p2, 0, sizeof(p2)); + + AesGcmSetKey(&enc, k, sizeof(k)); + /* AES-GCM encrypt and decrypt both use AES encrypt internally */ + AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (memcmp(c, c2, sizeof(c2))) + return -68; + if (memcmp(t, t2, sizeof(t2))) + return -69; + + result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result != 0) + return -70; + if (memcmp(p, p2, sizeof(p2))) + return -71; + + return 0; +} + +int gmac_test(void) +{ + Gmac gmac; + + const byte k1[] = + { + 0x89, 0xc9, 0x49, 0xe9, 0xc8, 0x04, 0xaf, 0x01, + 0x4d, 0x56, 0x04, 0xb3, 0x94, 0x59, 0xf2, 0xc8 + }; + const byte iv1[] = + { + 0xd1, 0xb1, 0x04, 0xc8, 0x15, 0xbf, 0x1e, 0x94, + 0xe2, 0x8c, 0x8f, 0x16 + }; + const byte a1[] = + { + 0x82, 0xad, 0xcd, 0x63, 0x8d, 0x3f, 0xa9, 0xd9, + 0xf3, 0xe8, 0x41, 0x00, 0xd6, 0x1e, 0x07, 0x77 + }; + const byte t1[] = + { + 0x88, 0xdb, 0x9d, 0x62, 0x17, 0x2e, 0xd0, 0x43, + 0xaa, 0x10, 0xf1, 0x6d, 0x22, 0x7d, 0xc4, 0x1b + }; + + const byte k2[] = + { + 0x40, 0xf7, 0xec, 0xb2, 0x52, 0x6d, 0xaa, 0xd4, + 0x74, 0x25, 0x1d, 0xf4, 0x88, 0x9e, 0xf6, 0x5b + }; + const byte iv2[] = + { + 0xee, 0x9c, 0x6e, 0x06, 0x15, 0x45, 0x45, 0x03, + 0x1a, 0x60, 0x24, 0xa7 + }; + const byte a2[] = + { + 0x94, 0x81, 0x2c, 0x87, 0x07, 0x4e, 0x15, 0x18, + 0x34, 0xb8, 0x35, 0xaf, 0x1c, 0xa5, 0x7e, 0x56 + }; + const byte t2[] = + { + 0xc6, 0x81, 0x79, 0x8e, 0x3d, 0xda, 0xb0, 0x9f, + 0x8d, 0x83, 0xb0, 0xbb, 0x14, 0xb6, 0x91 + }; + + const byte k3[] = + { + 0xb8, 0xe4, 0x9a, 0x5e, 0x37, 0xf9, 0x98, 0x2b, + 0xb9, 0x6d, 0xd0, 0xc9, 0xb6, 0xab, 0x26, 0xac + }; + const byte iv3[] = + { + 0xe4, 0x4a, 0x42, 0x18, 0x8c, 0xae, 0x94, 0x92, + 0x6a, 0x9c, 0x26, 0xb0 + }; + const byte a3[] = + { + 0x9d, 0xb9, 0x61, 0x68, 0xa6, 0x76, 0x7a, 0x31, + 0xf8, 0x29, 0xe4, 0x72, 0x61, 0x68, 0x3f, 0x8a + }; + const byte t3[] = + { + 0x23, 0xe2, 0x9f, 0x66, 0xe4, 0xc6, 0x52, 0x48 + }; + + byte tag[16]; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k1, sizeof(k1)); + GmacUpdate(&gmac, iv1, sizeof(iv1), a1, sizeof(a1), tag, sizeof(t1)); + if (memcmp(t1, tag, sizeof(t1)) != 0) + return -126; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k2, sizeof(k2)); + GmacUpdate(&gmac, iv2, sizeof(iv2), a2, sizeof(a2), tag, sizeof(t2)); + if (memcmp(t2, tag, sizeof(t2)) != 0) + return -127; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k3, sizeof(k3)); + GmacUpdate(&gmac, iv3, sizeof(iv3), a3, sizeof(a3), tag, sizeof(t3)); + if (memcmp(t3, tag, sizeof(t3)) != 0) + return -128; + + return 0; +} +#endif /* HAVE_AESGCM */ + +#ifdef HAVE_AESCCM +int aesccm_test(void) +{ + Aes enc; + + /* key */ + const byte k[] = + { + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf + }; + + /* nonce */ + const byte iv[] = + { + 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0, + 0xa1, 0xa2, 0xa3, 0xa4, 0xa5 + }; + + /* plaintext */ + const byte p[] = + { + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e + }; + + const byte a[] = + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 + }; + + const byte c[] = + { + 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2, + 0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80, + 0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84 + }; + + const byte t[] = + { + 0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 + }; + + byte t2[sizeof(t)]; + byte p2[sizeof(p)]; + byte c2[sizeof(c)]; + + int result; + + memset(t2, 0, sizeof(t2)); + memset(c2, 0, sizeof(c2)); + memset(p2, 0, sizeof(p2)); + + AesCcmSetKey(&enc, k, sizeof(k)); + /* AES-CCM encrypt and decrypt both use AES encrypt internally */ + AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (memcmp(c, c2, sizeof(c2))) + return -107; + if (memcmp(t, t2, sizeof(t2))) + return -108; + + result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result != 0) + return -109; + if (memcmp(p, p2, sizeof(p2))) + return -110; + + /* Test the authentication failure */ + t2[0]++; /* Corrupt the authentication tag. */ + result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result == 0) + return -111; + + /* Clear c2 to compare against p2. p2 should be set to zero in case of + * authentication fail. */ + memset(c2, 0, sizeof(c2)); + if (memcmp(p2, c2, sizeof(p2))) + return -112; + + return 0; +} +#endif /* HAVE_AESCCM */ + + +#endif /* NO_AES */ + + +#ifdef HAVE_CAMELLIA + +enum { + CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC +}; + +typedef struct { + int type; + const byte* plaintext; + const byte* iv; + const byte* ciphertext; + const byte* key; + word32 keySz; + int errorCode; +} test_vector_t; + +int camellia_test(void) +{ + /* Camellia ECB Test Plaintext */ + static const byte pte[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 + }; + + /* Camellia ECB Test Initialization Vector */ + static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + + /* Test 1: Camellia ECB 128-bit key */ + static const byte k1[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 + }; + static const byte c1[] = + { + 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, + 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 + }; + + /* Test 2: Camellia ECB 192-bit key */ + static const byte k2[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 + }; + static const byte c2[] = + { + 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, + 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 + }; + + /* Test 3: Camellia ECB 256-bit key */ + static const byte k3[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + }; + static const byte c3[] = + { + 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, + 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 + }; + + /* Camellia CBC Test Plaintext */ + static const byte ptc[] = + { + 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, + 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A + }; + + /* Camellia CBC Test Initialization Vector */ + static const byte ivc[] = + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F + }; + + /* Test 4: Camellia-CBC 128-bit key */ + static const byte k4[] = + { + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C + }; + static const byte c4[] = + { + 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, + 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB + }; + + /* Test 5: Camellia-CBC 192-bit key */ + static const byte k5[] = + { + 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, + 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, + 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B + }; + static const byte c5[] = + { + 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, + 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 + }; + + /* Test 6: CBC 256-bit key */ + static const byte k6[] = + { + 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, + 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, + 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, + 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 + }; + static const byte c6[] = + { + 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, + 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA + }; + + byte out[CAMELLIA_BLOCK_SIZE]; + Camellia cam; + int i, testsSz; + const test_vector_t testVectors[] = + { + {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114}, + {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115}, + {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116}, + {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117}, + {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118}, + {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119}, + {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120}, + {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121}, + {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122}, + {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123}, + {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124}, + {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125} + }; + + if ((sizeof(pte) != CAMELLIA_BLOCK_SIZE) || + (sizeof(ptc) != CAMELLIA_BLOCK_SIZE)) + return -113; + + testsSz = sizeof(testVectors)/sizeof(test_vector_t); + for (i = 0; i < testsSz; i++) { + CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz, + testVectors[i].iv); + + switch (testVectors[i].type) { + case CAM_ECB_ENC: + CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext); + if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_ECB_DEC: + CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext); + if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_CBC_ENC: + CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext, + CAMELLIA_BLOCK_SIZE); + if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_CBC_DEC: + CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext, + CAMELLIA_BLOCK_SIZE); + if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + default: + break; + } + } + + /* Setting the IV and checking it was actually set. */ + CamelliaSetIV(&cam, ivc); + if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE)) + return -1; + + /* Setting the IV to NULL should be same as all zeros IV */ + if (CamelliaSetIV(&cam, NULL) != 0 || + XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE)) + return -1; + + /* First parameter should never be null */ + if (CamelliaSetIV(NULL, NULL) == 0) + return -1; + + /* First parameter should never be null, check it fails */ + if (CamelliaSetKey(NULL, k1, sizeof(k1), NULL) == 0) + return -1; + + /* Key should have a size of 16, 24, or 32 */ + if (CamelliaSetKey(&cam, k1, 0, NULL) == 0) + return -1; + + return 0; +} +#endif /* HAVE_CAMELLIA */ + + +int random_test(void) +{ + RNG rng; + byte block[32]; + int ret; + +#ifdef HAVE_CAVIUM + ret = InitRngCavium(&rng, CAVIUM_DEV_ID); + if (ret != 0) return -2007; +#endif + ret = InitRng(&rng); + if (ret != 0) return -39; + + RNG_GenerateBlock(&rng, block, sizeof(block)); + + return 0; +} + + +#ifdef HAVE_NTRU + +byte GetEntropy(ENTROPY_CMD cmd, byte* out); + +byte GetEntropy(ENTROPY_CMD cmd, byte* out) +{ + static RNG rng; + + if (cmd == INIT) { + int ret = InitRng(&rng); + if (ret == 0) + return 1; + else + return 0; + } + + if (out == NULL) + return 0; + + if (cmd == GET_BYTE_OF_ENTROPY) { + RNG_GenerateBlock(&rng, out, 1); + return 1; + } + + if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { + *out = 1; + return 1; + } + + return 0; +} + +#endif /* HAVE_NTRU */ + +#ifndef NO_RSA + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* clientKey = "a:\\certs\\client-key.der"; + static const char* clientCert = "a:\\certs\\client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "a:\\certs\\ca-key.der"; + static const char* caCertFile = "a:\\certs\\ca-cert.pem"; + #endif + #elif defined(CYASSL_MKD_SHELL) + static char* clientKey = "certs/client-key.der"; + static char* clientCert = "certs/client-cert.der"; + void set_clientKey(char *key) { clientKey = key ; } /* set by shell command */ + void set_clientCert(char *cert) { clientCert = cert ; } /* set by shell command */ + #ifdef CYASSL_CERT_GEN + static char* caKeyFile = "certs/ca-key.der"; + static char* caCertFile = "certs/ca-cert.pem"; + void set_caKeyFile (char * key) { caKeyFile = key ; } /* set by shell command */ + void set_caCertFile(char * cert) { caCertFile = cert ; } /* set by shell command */ + #endif + #else + static const char* clientKey = "./certs/client-key.der"; + static const char* clientCert = "./certs/client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "./certs/ca-key.der"; + static const char* caCertFile = "./certs/ca-cert.pem"; + #endif + #endif +#endif + + + +#define FOURK_BUF 4096 + +int rsa_test(void) +{ + byte* tmp; + size_t bytes; + RsaKey key; + RNG rng; + word32 idx = 0; + int ret; + byte in[] = "Everyone gets Friday off."; + word32 inLen = (word32)strlen((char*)in); + byte out[256]; + byte plain[256]; +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + FILE* file, * file2; +#endif +#ifdef CYASSL_TEST_CERT + DecodedCert cert; +#endif + + tmp = (byte*)malloc(FOURK_BUF); + if (tmp == NULL) + return -40; + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024); + bytes = sizeof_client_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048); + bytes = sizeof_client_key_der_2048; +#else + file = fopen(clientKey, "rb"); + + if (!file) + err_sys("can't open ./certs/client-key.der, " + "Please run from CyaSSL home dir", -40); + + bytes = fread(tmp, 1, FOURK_BUF, file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + +#ifdef HAVE_CAVIUM + RsaInitCavium(&key, CAVIUM_DEV_ID); +#endif + InitRsaKey(&key, 0); + ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes); + if (ret != 0) return -41; + + ret = InitRng(&rng); + if (ret != 0) return -42; + + ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng); + if (ret < 0) return -43; + + ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key); + if (ret < 0) return -44; + + if (memcmp(plain, in, inLen)) return -45; + + ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng); + if (ret < 0) return -46; + + memset(plain, 0, sizeof(plain)); + ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key); + if (ret < 0) return -47; + + if (memcmp(plain, in, ret)) return -48; + +#if defined(CYASSL_MDK_ARM) + #define sizeof(s) strlen((char *)(s)) +#endif + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024); + bytes = sizeof_client_cert_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048); + bytes = sizeof_client_cert_der_2048; +#else + file2 = fopen(clientCert, "rb"); + if (!file2) + return -49; + + bytes = fread(tmp, 1, FOURK_BUF, file2); + fclose(file2); +#endif + +#ifdef sizeof + #undef sizeof +#endif + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&cert, tmp, (word32)bytes, 0); + + ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) return -491; + + FreeDecodedCert(&cert); +#else + (void)bytes; +#endif + + +#ifdef CYASSL_KEY_GEN + { + byte* der; + byte* pem; + int derSz = 0; + int pemSz = 0; + RsaKey derIn; + RsaKey genKey; + FILE* keyFile; + FILE* pemFile; + + InitRsaKey(&genKey, 0); + ret = MakeRsaKey(&genKey, 1024, 65537, &rng); + if (ret != 0) + return -301; + + der = (byte*)malloc(FOURK_BUF); + if (der == NULL) + return -307; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) + return -308; + + derSz = RsaKeyToDer(&genKey, der, FOURK_BUF); + if (derSz < 0) + return -302; + + keyFile = fopen("./key.der", "wb"); + if (!keyFile) + return -303; + ret = (int)fwrite(der, derSz, 1, keyFile); + fclose(keyFile); + + pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE); + if (pemSz < 0) + return -304; + + pemFile = fopen("./key.pem", "wb"); + if (!pemFile) + return -305; + ret = (int)fwrite(pem, pemSz, 1, pemFile); + fclose(pemFile); + + InitRsaKey(&derIn, 0); + idx = 0; + ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz); + if (ret != 0) + return -306; + + FreeRsaKey(&derIn); + FreeRsaKey(&genKey); + free(pem); + free(der); + } +#endif /* CYASSL_KEY_GEN */ + + +#ifdef CYASSL_CERT_GEN + /* self signed */ + { + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + int certSz; + int pemSz; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -309; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) + return -310; + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + myCert.isCA = 1; + myCert.sigType = CTC_SHA256wRSA; + + certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); + if (certSz < 0) + return -401; + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) + return -402; + FreeDecodedCert(&decode); +#endif + derFile = fopen("./cert.der", "wb"); + if (!derFile) + return -403; + ret = (int)fwrite(derCert, certSz, 1, derFile); + fclose(derFile); + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) + return -404; + + pemFile = fopen("./cert.pem", "wb"); + if (!pemFile) + return -405; + ret = (int)fwrite(pem, pemSz, 1, pemFile); + fclose(pemFile); + free(pem); + free(derCert); + } + /* CA style */ + { + RsaKey caKey; + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + int certSz; + int pemSz; + size_t bytes3; + word32 idx3 = 0; + FILE* file3 ; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -311; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) + return -312; + + file3 = fopen(caKeyFile, "rb"); + + if (!file3) + return -412; + + bytes3 = fread(tmp, 1, FOURK_BUF, file3); + fclose(file3); + + InitRsaKey(&caKey, 0); + ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); + if (ret != 0) return -413; + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + + ret = SetIssuer(&myCert, caCertFile); + if (ret < 0) + return -405; + + certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, &rng); + if (certSz < 0) + return -407; + + certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, + &caKey, &rng); + if (certSz < 0) + return -408; + + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) + return -409; + FreeDecodedCert(&decode); +#endif + + derFile = fopen("./othercert.der", "wb"); + if (!derFile) + return -410; + ret = (int)fwrite(derCert, certSz, 1, derFile); + fclose(derFile); + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) + return -411; + + pemFile = fopen("./othercert.pem", "wb"); + if (!pemFile) + return -412; + ret = (int)fwrite(pem, pemSz, 1, pemFile); + fclose(pemFile); + free(pem); + free(derCert); + FreeRsaKey(&caKey); + } +#ifdef HAVE_NTRU + { + RsaKey caKey; + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + FILE* caFile; + FILE* ntruPrivFile; + int certSz; + int pemSz; + size_t bytes; + word32 idx = 0; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -311; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) + return -312; + + byte public_key[557]; /* sized for EES401EP2 */ + word16 public_key_len; /* no. of octets in public key */ + byte private_key[607]; /* sized for EES401EP2 */ + word16 private_key_len; /* no. of octets in private key */ + DRBG_HANDLE drbg; + static uint8_t const pers_str[] = { + 'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't' + }; + word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str), + GetEntropy, &drbg); + if (rc != DRBG_OK) + return -450; + + rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, + NULL, &private_key_len, NULL); + if (rc != NTRU_OK) + return -451; + + rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, + public_key, &private_key_len, private_key); + crypto_drbg_uninstantiate(drbg); + + if (rc != NTRU_OK) + return -452; + + caFile = fopen(caKeyFile, "rb"); + + if (!caFile) + return -453; + + bytes = fread(tmp, 1, FOURK_BUF, caFile); + fclose(caFile); + + InitRsaKey(&caKey, 0); + ret = RsaPrivateKeyDecode(tmp, &idx, &caKey, (word32)bytes); + if (ret != 0) return -454; + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + + ret = SetIssuer(&myCert, caCertFile); + if (ret < 0) + return -455; + + certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key, + public_key_len, &rng); + if (certSz < 0) + return -456; + + certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, + &caKey, &rng); + if (certSz < 0) + return -457; + + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) + return -458; + FreeDecodedCert(&decode); +#endif + derFile = fopen("./ntru-cert.der", "wb"); + if (!derFile) + return -459; + ret = fwrite(derCert, certSz, 1, derFile); + fclose(derFile); + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) + return -460; + + pemFile = fopen("./ntru-cert.pem", "wb"); + if (!pemFile) + return -461; + ret = fwrite(pem, pemSz, 1, pemFile); + fclose(pemFile); + + ntruPrivFile = fopen("./ntru-key.raw", "wb"); + if (!ntruPrivFile) + return -462; + ret = fwrite(private_key, private_key_len, 1, ntruPrivFile); + fclose(ntruPrivFile); + free(pem); + free(derCert); + FreeRsaKey(&caKey); + } +#endif /* HAVE_NTRU */ +#endif /* CYASSL_CERT_GEN */ + + FreeRsaKey(&key); +#ifdef HAVE_CAVIUM + RsaFreeCavium(&key); +#endif + free(tmp); + + return 0; +} + +#endif + + +#ifndef NO_DH + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* dhKey = "a:\certs\\dh2048.der"; + #else + static const char* dhKey = "./certs/dh2048.der"; + #endif +#endif + +int dh_test(void) +{ + int ret; + word32 bytes; + word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2; + byte tmp[1024]; + byte priv[256]; + byte pub[256]; + byte priv2[256]; + byte pub2[256]; + byte agree[256]; + byte agree2[256]; + DhKey key; + DhKey key2; + RNG rng; + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); + bytes = sizeof_dh_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); + bytes = sizeof_dh_key_der_2048; +#else + FILE* file = fopen(dhKey, "rb"); + + if (!file) + return -50; + + bytes = (word32) fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + InitDhKey(&key); + InitDhKey(&key2); + ret = DhKeyDecode(tmp, &idx, &key, bytes); + if (ret != 0) + return -51; + + idx = 0; + ret = DhKeyDecode(tmp, &idx, &key2, bytes); + if (ret != 0) + return -52; + + ret = InitRng(&rng); + if (ret != 0) + return -53; + + ret = DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz); + ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2); + if (ret != 0) + return -54; + + ret = DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2); + ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz); + if (ret != 0) + return -55; + + if (memcmp(agree, agree2, agreeSz)) + return -56; + + FreeDhKey(&key); + FreeDhKey(&key2); + + return 0; +} + +#endif /* NO_DH */ + + +#ifndef NO_DSA + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* dsaKey = "a:\\certs\\dsa2048.der"; + #else + static const char* dsaKey = "./certs/dsa2048.der"; + #endif +#endif + +int dsa_test(void) +{ + int ret, answer; + word32 bytes; + word32 idx = 0; + byte tmp[1024]; + DsaKey key; + RNG rng; + Sha sha; + byte hash[SHA_DIGEST_SIZE]; + byte signature[40]; + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024); + bytes = sizeof_dsa_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048); + bytes = sizeof_dsa_key_der_2048; +#else + FILE* file = fopen(dsaKey, "rb"); + + if (!file) + return -60; + + bytes = (word32) fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + InitSha(&sha); + ShaUpdate(&sha, tmp, bytes); + ShaFinal(&sha, hash); + + InitDsaKey(&key); + ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes); + if (ret != 0) return -61; + + ret = InitRng(&rng); + if (ret != 0) return -62; + + ret = DsaSign(hash, signature, &key, &rng); + if (ret != 0) return -63; + + ret = DsaVerify(hash, signature, &key, &answer); + if (ret != 0) return -64; + if (answer != 1) return -65; + + FreeDsaKey(&key); + + return 0; +} + +#endif /* NO_DSA */ + + +#ifdef OPENSSL_EXTRA + +int openssl_test(void) +{ + EVP_MD_CTX md_ctx; + testVector a, b, c, d, e, f; + byte hash[SHA_DIGEST_SIZE*4]; /* max size */ + + (void)e; + (void)f; + + a.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" + "\x7a"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_md5()); + + EVP_DigestUpdate(&md_ctx, a.input, a.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0) + return -71; + + b.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaa"; + b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" + "\x53\x99\x5E\x26\xA0"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha1()); + + EVP_DigestUpdate(&md_ctx, b.input, b.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0) + return -72; + + + d.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1"; + d.inLen = strlen(d.input); + d.outLen = SHA256_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha256()); + + EVP_DigestUpdate(&md_ctx, d.input, d.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0) + return -78; + +#ifdef CYASSL_SHA384 + + e.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39"; + e.inLen = strlen(e.input); + e.outLen = SHA384_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha384()); + + EVP_DigestUpdate(&md_ctx, e.input, e.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0) + return -79; + +#endif /* CYASSL_SHA384 */ + + +#ifdef CYASSL_SHA512 + + f.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09"; + f.inLen = strlen(f.input); + f.outLen = SHA512_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha512()); + + EVP_DigestUpdate(&md_ctx, f.input, f.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0) + return -80; + +#endif /* CYASSL_SHA512 */ + + + if (RAND_bytes(hash, sizeof(hash)) != 1) + return -73; + + c.input = "what do ya want for nothing?"; + c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" + "\x38"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0); + + if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0) + return -74; + + { /* des test */ + const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + const_DES_cblock key = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef + }; + + DES_cblock iv = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef + }; + + DES_key_schedule sched; + + const byte verify[] = + { + 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, + 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, + 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b + }; + + DES_key_sched(&key, &sched); + + DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT); + DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT); + + if (memcmp(plain, vector, sizeof(vector)) != 0) + return -75; + + if (memcmp(cipher, verify, sizeof(verify)) != 0) + return -76; + + /* test changing iv */ + DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT); + DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT); + + if (memcmp(cipher, verify, sizeof(verify)) != 0) + return -77; + + } /* end des test */ + + { /* evp_cipher test */ + EVP_CIPHER_CTX ctx; + + + const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + const byte verify[] = + { + 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, + 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb + }; + + byte key[] = "0123456789abcdef "; /* align */ + byte iv[] = "1234567890abcdef "; /* align */ + + byte cipher[AES_BLOCK_SIZE * 4]; + byte plain [AES_BLOCK_SIZE * 4]; + + EVP_CIPHER_CTX_init(&ctx); + if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0) + return -81; + + if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0) + return -82; + + if (memcmp(cipher, verify, AES_BLOCK_SIZE)) + return -83; + + EVP_CIPHER_CTX_init(&ctx); + if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0) + return -84; + + if (EVP_Cipher(&ctx, plain, cipher, 16) == 0) + return -85; + + if (memcmp(plain, msg, AES_BLOCK_SIZE)) + return -86; + + + } /* end evp_cipher test */ + + return 0; +} + +#endif /* OPENSSL_EXTRA */ + + +#ifndef NO_PWDBASED + +int pkcs12_test(void) +{ + const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67, + 0x00, 0x00 }; + const byte salt[] = { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f }; + + const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65, + 0x00, 0x67, 0x00, 0x00 }; + const byte salt2[] = { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 }; + byte derived[64]; + + const byte verify[] = { + 0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46, + 0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E, + 0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3 + }; + + const byte verify2[] = { + 0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E, + 0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB, + 0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F + }; + + int id = 1; + int kLen = 24; + int iterations = 1; + int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations, + kLen, SHA, id); + + if (ret < 0) + return -103; + + if ( (ret = memcmp(derived, verify, kLen)) != 0) + return -104; + + iterations = 1000; + ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, + kLen, SHA, id); + if (ret < 0) + return -105; + + if ( (ret = memcmp(derived, verify2, 24)) != 0) + return -106; + + return 0; +} + + +int pbkdf2_test(void) +{ + char passwd[] = "password"; + const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; + int iterations = 2048; + int kLen = 24; + byte derived[64]; + + const byte verify[] = { + 0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2, + 0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43 + + }; + + PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, + kLen, SHA); + + if (memcmp(derived, verify, sizeof(verify)) != 0) + return -102; + + return 0; +} + + +int pbkdf1_test(void) +{ + char passwd[] = "password"; + const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; + int iterations = 1000; + int kLen = 16; + byte derived[16]; + + const byte verify[] = { + 0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB, + 0x4A, 0x3D, 0x2A, 0x20 + }; + + PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, + kLen, SHA); + + if (memcmp(derived, verify, sizeof(verify)) != 0) + return -101; + + return 0; +} + + +int pwdbased_test(void) +{ + int ret = pbkdf1_test(); + ret += pbkdf2_test(); + + return ret + pkcs12_test(); +} + +#endif /* NO_PWDBASED */ + +#if defined(HAVE_HKDF) && (!defined(NO_SHA) || !defined(NO_SHA256)) + +int hkdf_test(void) +{ + int ret; + int L = 42; + byte okm1[42]; + byte ikm1[22] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b }; + byte salt1[13] ={ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c }; + byte info1[10] ={ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9 }; + byte res1[42] = { 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, + 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, + 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, + 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, + 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, + 0x49, 0x18 }; + byte res2[42] = { 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, + 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, + 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, + 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, + 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, + 0xf8, 0x96 }; + byte res3[42] = { 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, + 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, + 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, + 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, + 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, + 0x96, 0xc8 }; + byte res4[42] = { 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, + 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, + 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, + 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, + 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, + 0x58, 0x65 }; + + (void)res1; + (void)res2; + (void)res3; + (void)res4; + +#ifndef NO_SHA + ret = HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L); + if (ret != 0) + return -2001; + + if (memcmp(okm1, res1, L) != 0) + return -2002; + + ret = HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L); + if (ret != 0) + return -2003; + + if (memcmp(okm1, res2, L) != 0) + return -2004; +#endif /* NO_SHA */ + +#ifndef NO_SHA256 + ret = HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L); + if (ret != 0) + return -2005; + + if (memcmp(okm1, res3, L) != 0) + return -2006; + + ret = HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L); + if (ret != 0) + return -2007; + + if (memcmp(okm1, res4, L) != 0) + return -2007; +#endif /* NO_SHA256 */ + + return 0; +} + +#endif /* HAVE_HKDF */ + + +#ifdef HAVE_ECC + +int ecc_test(void) +{ + RNG rng; + byte sharedA[1024]; + byte sharedB[1024]; + byte sig[1024]; + byte digest[20]; + byte exportBuf[1024]; + word32 x, y; + int i, verify, ret; + ecc_key userA, userB, pubKey; + + ret = InitRng(&rng); + if (ret != 0) + return -1001; + + ecc_init(&userA); + ecc_init(&userB); + ecc_init(&pubKey); + + ret = ecc_make_key(&rng, 32, &userA); + ret = ecc_make_key(&rng, 32, &userB); + + if (ret != 0) + return -1002; + + x = sizeof(sharedA); + ret = ecc_shared_secret(&userA, &userB, sharedA, &x); + + y = sizeof(sharedB); + ret = ecc_shared_secret(&userB, &userA, sharedB, &y); + + if (ret != 0) + return -1003; + + if (y != x) + return -1004; + + if (memcmp(sharedA, sharedB, x)) + return -1005; + + x = sizeof(exportBuf); + ret = ecc_export_x963(&userA, exportBuf, &x); + if (ret != 0) + return -1006; + + ret = ecc_import_x963(exportBuf, x, &pubKey); + + if (ret != 0) + return -1007; + + y = sizeof(sharedB); + ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y); + + if (ret != 0) + return -1008; + + if (memcmp(sharedA, sharedB, y)) + return -1010; + + /* test DSA sign hash */ + for (i = 0; i < (int)sizeof(digest); i++) + digest[i] = i; + + x = sizeof(sig); + ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA); + + verify = 0; + ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA); + + if (ret != 0) + return -1011; + + if (verify != 1) + return -1012; + + x = sizeof(exportBuf); + ret = ecc_export_private_only(&userA, exportBuf, &x); + if (ret != 0) + return -1013; + + ecc_free(&pubKey); + ecc_free(&userB); + ecc_free(&userA); + + return 0; +} + +#endif /* HAVE_ECC */ + +#ifdef HAVE_LIBZ + +const byte sample_text[] = + "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" + "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" + "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" + "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" + "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" + "small batch meggings kogi dolore food truck bespoke gastropub.\n" + "\n" + "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" + "four loko you probably haven't heard of them high life. Messenger bag\n" + "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" + "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" + "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" + "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" + "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" + "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n" + "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n" + "four loko whatever street art yr farm-to-table.\n" + "\n" + "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n" + "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n" + "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n" + "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n" + "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n" + "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n" + "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n" + "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n" + "locavore.\n" + "\n" + "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n" + "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n" + "cillum pickled velit, YOLO officia you probably haven't heard of them\n" + "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n" + "small batch american apparel. Put a bird on it cosby sweater before they\n" + "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n" + "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n" + "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n" + "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n" + "neutra PBR selvage.\n" + "\n" + "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n" + "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n" + "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n" + "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n" + "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n" + "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n" + "incididunt flannel sustainable helvetica pork belly pug banksy you\n" + "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n" + "mollit magna, sriracha sartorial helvetica.\n" + "\n" + "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n" + "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n" + "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n" + "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n" + "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n" + "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n" + "Veniam sunt food truck leggings, sint vinyl fap.\n" + "\n" + "Hella dolore pork belly, truffaut carles you probably haven't heard of\n" + "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n" + "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n" + "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n" + "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n" + "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n" + "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n" + "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n" + "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n" + "\n" + "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n" + "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n" + "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n" + "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n" + "tousled beard mollit mustache leggings portland next level. Nihil esse\n" + "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n" + "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n" + "bag dolor terry richardson sapiente.\n"; + + +int compress_test(void) +{ + int ret = 0; + word32 dSz = sizeof(sample_text); + word32 cSz = (dSz + (word32)(dSz * 0.001) + 12); + byte *c = NULL; + byte *d = NULL; + + c = calloc(cSz, sizeof(byte)); + d = calloc(dSz, sizeof(byte)); + + if (c == NULL || d == NULL) + ret = -300; + + if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0) + ret = -301; + + if (ret > 0) { + cSz = (word32)ret; + ret = 0; + } + + if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz) + ret = -302; + + if (ret == 0 && memcmp(d, sample_text, dSz)) + ret = -303; + + if (c) free(c); + if (d) free(d); + + return ret; +} + +#endif /* HAVE_LIBZ */ + +#endif /* NO_CRYPT_TEST */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt new file mode 100644 index 00000000..b541cb66 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt @@ -0,0 +1,89 @@ +This program gives wolfCrypt and CyaSSL library demo. + +In order to run the demo, +Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. +For demo configuration, refer config-Crypt.h and config-CyaSSL.h. + +After download and start the execution, you can type in commands through the +Debug(printf) viewer. + +time [-d date][-t time] Set/Get RTC: The time is used for certificate validation. +test wolfCrypt Simple test suite +benchmark wolfCrypt Simple benchmark +server& simple server in background mode +client simple client +echoserver& echo server in background mode +echoclient echo client +server/client -h help for server/client command + + +=== Typical Command Usage Scenario === + +Starting Shell +>time -d 9/23/2013 +>time +Date: 9/23/2013, Time: 00:38:31 +>test +MD5 test passed! +MD4 test passed! +SHA test passed! +... + +>benchmark +AES 25 kB took 0.025 seconds, 0.96 MB/s +ARC4 25 kB took 0.006 seconds, 3.83 MB/s +... + +DH 2048 key agreement 685.93 milliseconds, avg over 1 iterations + +>echoserver& +"echoserver" is running with the background mode. + +>echoclient +ABCDEFG +ABCDEFG +WXYZ +WXYZ +quit +sending server shutdown command: quit! +client sent quit command: shutting down! + +>server& +"server" is running with the background mode. + +>client +peer's cert info: + issuer : /C=... + subject: /C=... + serial number:02 +SSL version is TLSv1.2 +SSL cipher suite is TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 +peer's cert info: + issuer : /C=... + subject: /C=... + serial number:... +SSL version is TLSv1.2 +SSL cipher suite is TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 +Client message: hello cyassl! +Server response: I hear you fa shizzle! + +>client -h 192.168.2.100 -p 443 -g -v 0 +peer's cert info: + issuer : /CN=... + subject: /CN=... + serial number:44:39:... +SSL version is SSLv3 +SSL cipher suite is SSL_RSA_WITH_RC4_128_SHA +SSL connect ok, sending GET... +... +=== + +For the hardware crypt on config-Crypt.h, download +STSW-STM32062: STM32F2xx standard peripherals library at +http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to + {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib + + +Support +------- +Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx new file mode 100644 index 00000000..4084d9ab --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx @@ -0,0 +1,1530 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + CyaSSL-Full + 0x4 + ARM-ADS + + 25000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGUARM + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32F2xx_1024 -FL0100000 -FS08000000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + + + + 0 + 1 + str[i] + + + 1 + 1 + str + + + + + 1 + 3 + 0x20003d9e + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 57 + 80 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 13 + 0 + 0 + 0 + 0 + .\shell.c + shell.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\test.c + test.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\benchmark.c + benchmark.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\client.c + client.c + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + .\echoclient.c + echoclient.c + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\echoserver.c + echoserver.c + 0 + 0 + + + 1 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\server.c + server.c + 0 + 0 + + + 1 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\cert_data.c + cert_data.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 10 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 0 + 0 + + + 2 + 11 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 12 + 5 + 0 + 0 + 10 + 0 + 1 + 32 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 13 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 15 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 17 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 18 + 2 + 0 + 0 + 0 + 0 + 163 + 169 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 19 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + PHY_ST802RT1.c + 1 + 0 + + + 6 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + EMAC_STM32F2xx.c + 1 + 0 + + + 6 + 22 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 23 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 24 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 25 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::Network + 1 + 0 + 0 + 1 + + 8 + 26 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + Net_Dbg_CM3_L.lib + 1 + 0 + + + 8 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config.c + Net_Config.c + 1 + 0 + + + 8 + 28 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_BSD.h + Net_Config_BSD.h + 1 + 0 + + + 8 + 29 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_DNS_Client.h + Net_Config_DNS_Client.h + 1 + 0 + + + 8 + 30 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_ETH_0.h + Net_Config_ETH_0.h + 1 + 0 + + + 8 + 31 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_TCP.h + Net_Config_TCP.h + 1 + 0 + + + 8 + 32 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_UDP.h + Net_Config_UDP.h + 1 + 0 + + + 8 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Debug.c + Net_Debug.c + 1 + 0 + + + + + ::wolfSSL + 1 + 0 + 0 + 1 + + 9 + 34 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 9 + 35 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 1 + 0 + + + 9 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 9 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 9 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 9 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 9 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 9 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 9 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 9 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 9 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 9 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 9 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 9 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 9 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 9 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 9 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 9 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c + port.c + 1 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 9 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 9 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 9 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 9 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 9 + 69 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 9 + 70 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 9 + 71 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\crl.c + crl.c + 1 + 0 + + + 9 + 72 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\internal.c + internal.c + 1 + 0 + + + 9 + 73 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\io.c + io.c + 1 + 0 + + + 9 + 74 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\keys.c + keys.c + 1 + 0 + + + 9 + 75 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ocsp.c + ocsp.c + 1 + 0 + + + 9 + 76 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\sniffer.c + sniffer.c + 1 + 0 + + + 9 + 77 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ssl.c + ssl.c + 1 + 0 + + + 9 + 78 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\tls.c + tls.c + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx new file mode 100644 index 00000000..83d2df29 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx @@ -0,0 +1,1122 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + CyaSSL-Full + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + CyaSSL-Full + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 0 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_CYASSL + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + shell.c + 1 + .\shell.c + + + test.c + 1 + .\test.c + + + benchmark.c + 1 + .\benchmark.c + + + client.c + 1 + .\client.c + + + echoclient.c + 1 + .\echoclient.c + + + echoserver.c + 1 + .\echoserver.c + + + server.c + 1 + .\server.c + + + cert_data.c + 1 + .\cert_data.c + + + + + Configuration + + + config-CyaSSL.h + 5 + .\RTE\wolfSSL\config-CyaSSL.h + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + PHY_ST802RT1.c + 1 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + + + EMAC_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::Network + + + Net_Dbg_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + + + Net_Config.c + 1 + RTE\Network\Net_Config.c + + + Net_Config_BSD.h + 5 + RTE\Network\Net_Config_BSD.h + + + Net_Config_DNS_Client.h + 5 + RTE\Network\Net_Config_DNS_Client.h + + + Net_Config_ETH_0.h + 5 + RTE\Network\Net_Config_ETH_0.h + + + Net_Config_TCP.h + 5 + RTE\Network\Net_Config_TCP.h + + + Net_Config_UDP.h + 5 + RTE\Network\Net_Config_UDP.h + + + Net_Debug.c + 1 + RTE\Network\Net_Debug.c + + + + + ::wolfSSL + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config-CyaSSL.h + 5 + RTE\wolfSSL\config-CyaSSL.h + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c + + + port.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c + + + crl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\crl.c + + + internal.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\internal.c + + + io.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\io.c + + + keys.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\keys.c + + + ocsp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ocsp.c + + + sniffer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\sniffer.c + + + ssl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ssl.c + + + tls.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\tls.c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + + + RTE\Network\Net_Debug.c + + + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config-CyaSSL.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..3ff6766f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 6 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 250 +#endif + +// Main Thread stack size [bytes] <64-4096:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 250 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 2 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 4500 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-64000:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..4a09246f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 1 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..205f9ffb --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00001000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x0000F000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c new file mode 100644 index 00000000..6b9dc8e0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config.c + * Purpose: Network Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Definitions +// Global Network System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "my_host" +#define NET_HOST_NAME "my_host" + +// Memory Pool size <1536-262144:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// Network packets are allocated from this memory pool. +// Default: 12000 bytes +#define NET_MEM_SIZE 3000 + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_Network_Interface_ETH_0 +#include "Net_Config_ETH_0.h" +#endif +#ifdef RTE_Network_Interface_ETH_1 +#include "Net_Config_ETH_1.h" +#endif + +#ifdef RTE_Network_Interface_PPP_0 +#include "Net_Config_PPP_0.h" +#endif +#ifdef RTE_Network_Interface_PPP_1 +#include "Net_Config_PPP_1.h" +#endif + +#ifdef RTE_Network_Interface_SLIP_0 +#include "Net_Config_SLIP_0.h" +#endif +#ifdef RTE_Network_Interface_SLIP_1 +#include "Net_Config_SLIP_1.h" +#endif + +#ifdef RTE_Network_Socket_UDP +#include "Net_Config_UDP.h" +#endif +#ifdef RTE_Network_Socket_TCP +#include "Net_Config_TCP.h" +#endif +#ifdef RTE_Network_Socket_BSD +#include "Net_Config_BSD.h" +#endif + +#ifdef RTE_Network_Web_Server_RO +#include "Net_Config_HTTP_Server.h" +#endif +#ifdef RTE_Network_Web_Server_FS +#include "Net_Config_HTTP_Server.h" +#endif + +#ifdef RTE_Network_Telnet_Server +#include "Net_Config_Telnet_Server.h" +#endif + +#ifdef RTE_Network_TFTP_Server +#include "Net_Config_TFTP_Server.h" +#endif +#ifdef RTE_Network_TFTP_Client +#include "Net_Config_TFTP_Client.h" +#endif + +#ifdef RTE_Network_FTP_Server +#include "Net_Config_FTP_Server.h" +#endif +#ifdef RTE_Network_FTP_Client +#include "Net_Config_FTP_Client.h" +#endif + +#ifdef RTE_Network_DNS_Client +#include "Net_Config_DNS_Client.h" +#endif + +#ifdef RTE_Network_SMTP_Client +#include "Net_Config_SMTP_Client.h" +#endif + +#ifdef RTE_Network_SNMP_Agent +#include "Net_Config_SNMP_Agent.h" +#endif + +#ifdef RTE_Network_SNTP_Client +#include "Net_Config_SNTP_Client.h" +#endif + +#include "net_config.h" + +/** +\addtogroup net_genFunc +@{ +*/ +/** + \fn void net_sys_error (ERROR_CODE error) + \ingroup net_cores + \brief Network system error handler. +*/ +void net_sys_error (ERROR_CODE error) { + /* This function is called when a fatal error is encountered. */ + /* The normal program execution is not possible anymore. */ + + switch (error) { + case ERR_MEM_ALLOC: + /* Out of memory */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer Corrupted */ + /* More data written than the size of allocated mem block */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state */ + break; + } + + /* End-less loop */ + while (1); +} +/** +@} +*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h new file mode 100644 index 00000000..7d515a50 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_BSD.h + * Purpose: Network Configuration BSD Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Berkley (BSD) Sockets +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUM_SOCKS 10 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SERVER_SOCKS 1 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RECEIVE_TOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_HOSTNAME_ENABLE 0 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h new file mode 100644 index 00000000..d30b7180 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Service + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_DNS_Client.h + * Purpose: Network Configuration DNS Client + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// DNS Client +#define DNS_CLIENT_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_CLIENT_TAB_SIZE 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h new file mode 100644 index 00000000..7be57ad6 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h @@ -0,0 +1,222 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Interface + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_ETH_0.h + * Purpose: Network Configuration ETH Interface + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Ethernet Network Interface 0 +#define ETH0_ENABLE 1 + +// Connect to hardware via Driver_ETH# <0-255> +// Select driver control block for MAC and PHY interface +#define ETH0_DRIVER 1 + +// MAC Address +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x1E +#define ETH0_MAC1 0x1E + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define ETH0_MAC2 0x30 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define ETH0_MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0xA2 +#define ETH0_MAC4 0xA2 + +// Address byte 5 <0x00-0xff> +// Default: 0x45 +#define ETH0_MAC5 0x45 + +// Address byte 6 <0x00-0xff> +// Default: 0x5E +#define ETH0_MAC6 0x5E +// + +// IP Address +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define ETH0_IP4 100 +// + +// Subnet mask +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define ETH0_MASK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define ETH0_MASK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define ETH0_MASK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define ETH0_MASK4 0 +// + +// Default Gateway +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define ETH0_GW4 254 +// + +// Primary DNS Server +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_PRI_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_PRI_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_PRI_DNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define ETH0_PRI_DNS4 129 +// + +// Secondary DNS Server +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_SEC_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_SEC_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_SEC_DNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define ETH0_SEC_DNS4 130 +// + +// ARP Definitions +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ETH0_ARP_TAB_SIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ETH0_ARP_CACHE_TOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ETH0_ARP_MAX_RETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ETH0_ARP_RESEND_TOUT 2 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ETH0_ARP_NOTIFY 0 +// + +// IGMP Group Management +// Enable or disable Internet Group Management Protocol +#define ETH0_IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define ETH0_IGMP_TAB_SIZE 5 +// + +// NetBIOS Name Service +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define ETH0_NBNS_ENABLE 1 + +// Dynamic Host Configuration +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define ETH0_DHCP_ENABLE 1 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define ETH0_DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_BOOTFILE 0 + +// NTP Servers +// This value is optional. If enabled, a list of NTP Servers +// (option 42) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_NTP_SERVERS 0 +// + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h new file mode 100644 index 00000000..e659ce92 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_TCP.h + * Purpose: Network Configuration TCP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUM_SOCKS 10 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAX_RETRY 5 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRY_TOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFAULT_TOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAX_SEG_SIZE 1460 + +// Receive Window Size <536-65535> +// Receive Window Size specifies the size of data, +// that the socket is able to buffer in flow-control mode. +// Default: 4380 +#define TCP_RECEIVE_WIN_SIZE 4380 + +// + +// TCP Initial Retransmit period in seconds +#define TCP_INITIAL_RETRY_TOUT 1 + +// TCP SYN frame retransmit period in seconds +#define TCP_SYN_RETRY_TOUT 2 + +// Number of retries to establish a connection +#define TCP_CONNECT_RETRY 7 + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h new file mode 100644 index 00000000..55e7f21b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_UDP.h + * Purpose: Network Configuration UDP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-30> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUM_SOCKS 15 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c new file mode 100644 index 00000000..735089a4 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Debug.c + * Purpose: Network Debug Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Print Time Stamp +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 0 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 0 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 1 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 1 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Time debug messages +#define DBG_SNTP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 1 +// + +// Application Debug Definitions +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP_SERVER 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP_SERVER 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTP_CLIENT 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TELNET_SERVER 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP_SERVER 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTP_CLIENT 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP_CLIENT 1 +// + + +#include "net_debug.h" + + +/** + \fn void net_debug_init (void) + \brief Initialize Network Debug Interface. +*/ +void net_debug_init (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h new file mode 100644 index 00000000..07fef4e5 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h @@ -0,0 +1,28 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'CyaSSL-Full' + * Target: 'CyaSSL-Full' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ +#define RTE_Network_Core /* Network Core */ + #define RTE_Network_Debug /* Network Debug Version */ +#define RTE_Network_DNS_Client /* Network DNS Client */ +#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ +#define RTE_Network_Socket_BSD /* Network Socket BSD */ +#define RTE_Network_Socket_TCP /* Network Socket TCP */ +#define RTE_Network_Socket_UDP /* Network Socket UDP */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c new file mode 100644 index 00000000..5e5b14f0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c @@ -0,0 +1,1064 @@ +/* benchmark.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* CTaoCrypt benchmark */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif +#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) + /* include test cert and key buffers for use with NO_FILESYSTEM */ + #if defined(CYASSL_MDK_ARM) && !defined(SINGLE_THREADED) + #include "cert_data.h" /* use certs_test.c for initial data, + so other commands can share the data. */ + #else + #include + #endif +#endif + +#if defined(CYASSL_MDK_ARM) + #include + extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; + #define fopen CyaSSL_fopen +#endif + +#ifdef HAVE_BLAKE2 + #include + void bench_blake2(void); +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +void bench_des(void); +void bench_arc4(void); +void bench_hc128(void); +void bench_rabbit(void); +void bench_aes(int); +void bench_aesgcm(void); +void bench_aesccm(void); +void bench_camellia(void); + +void bench_md5(void); +void bench_sha(void); +void bench_sha256(void); +void bench_sha512(void); +void bench_ripemd(void); + +void bench_rsa(void); +void bench_rsaKeyGen(void); +void bench_dh(void); +#ifdef HAVE_ECC +void bench_eccKeyGen(void); +void bench_eccKeyAgree(void); +#endif + +double current_time(int); + + +#ifdef HAVE_CAVIUM + +static int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif + + +/* so embedded projects can pull in tests on their own */ +#if !defined(NO_MAIN_DRIVER) + +int main(int argc, char** argv) + +{ + (void)argc; + (void)argv; +#else +int benchmark_test(void *args) +{ +#endif + + #ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) { + printf("Cavium OpenNitroxDevice failed\n"); + exit(-1); + } +#endif /* HAVE_CAVIUM */ +#ifndef NO_AES + bench_aes(0); + bench_aes(1); +#endif +#ifdef HAVE_AESGCM + bench_aesgcm(); +#endif +#ifdef HAVE_AESCCM + bench_aesccm(); +#endif +#ifdef HAVE_CAMELLIA + bench_camellia(); +#endif +#ifndef NO_RC4 + bench_arc4(); +#endif +#ifdef HAVE_HC128 + bench_hc128(); +#endif +#ifndef NO_RABBIT + bench_rabbit(); +#endif +#ifndef NO_DES3 + bench_des(); +#endif + + printf("\n"); + +#ifndef NO_MD5 + bench_md5(); +#endif +#ifndef NO_SHA + bench_sha(); +#endif +#ifndef NO_SHA256 + bench_sha256(); +#endif +#ifdef CYASSL_SHA512 + bench_sha512(); +#endif +#ifdef CYASSL_RIPEMD + bench_ripemd(); +#endif +#ifdef HAVE_BLAKE2 + bench_blake2(); +#endif + + printf("\n"); + +#ifndef NO_RSA + bench_rsa(); +#endif + +#ifndef NO_DH + bench_dh(); +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) + bench_rsaKeyGen(); +#endif + +#ifdef HAVE_ECC + bench_eccKeyGen(); + bench_eccKeyAgree(); +#endif + + return 0; +} + + +#ifdef BENCH_EMBEDDED +const int numBlocks = 25; /* how many kB/megs to test (en/de)cryption */ +const char blockType[] = "kB"; /* used in printf output */ +const int times = 1; /* public key iterations */ +#else +const int numBlocks = 5; +const char blockType[] = "megs"; +const int times = 100; +#endif + +const byte key[] = +{ + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, + 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, + 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 +}; + +const byte iv[] = +{ + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 + +}; + + +/* use kB instead of mB for embedded benchmarking */ +#ifdef BENCH_EMBEDDED +byte plain [1024]; +byte cipher[1024]; +#else +byte plain [1024*1024]; +byte cipher[1024*1024]; +#endif + + +#ifndef NO_AES +void bench_aes(int show) +{ + Aes enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("aes init cavium failed\n"); +#endif + + AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + if (show) + printf("AES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + AesFreeCavium(&enc); +#endif +} +#endif + + +byte additional[13]; +byte tag[16]; + + +#ifdef HAVE_AESGCM +void bench_aesgcm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesGcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-GCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_AESCCM +void bench_aesccm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesCcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-CCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_CAMELLIA +void bench_camellia(void) +{ + Camellia cam; + double start, total, persec; + int i; + + CamelliaSetKey(&cam, key, 16, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("Camellia %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifndef NO_DES3 +void bench_des(void) +{ + Des3 enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("des3 init cavium failed\n"); +#endif + Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("3DES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Des3_FreeCavium(&enc); +#endif +} +#endif + + +#ifndef NO_RC4 +void bench_arc4(void) +{ + Arc4 enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("arc4 init cavium failed\n"); +#endif + + Arc4SetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Arc4Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("ARC4 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Arc4FreeCavium(&enc); +#endif +} +#endif + + +#ifdef HAVE_HC128 +void bench_hc128(void) +{ + HC128 enc; + double start, total, persec; + int i; + + Hc128_SetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Hc128_Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("HC128 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* HAVE_HC128 */ + + +#ifndef NO_RABBIT +void bench_rabbit(void) +{ + Rabbit enc; + double start, total, persec; + int i; + + RabbitSetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RabbitProcess(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RABBIT %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_RABBIT */ + + +#ifndef NO_MD5 +void bench_md5(void) +{ + Md5 hash; + byte digest[MD5_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitMd5(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Md5Update(&hash, plain, sizeof(plain)); + + Md5Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("MD5 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_MD5 */ + + +#ifndef NO_SHA +void bench_sha(void) +{ + Sha hash; + byte digest[SHA_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + ShaUpdate(&hash, plain, sizeof(plain)); + + ShaFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_SHA */ + + +#ifndef NO_SHA256 +void bench_sha256(void) +{ + Sha256 hash; + byte digest[SHA256_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha256(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Sha256Update(&hash, plain, sizeof(plain)); + + Sha256Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-256 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_SHA512 +void bench_sha512(void) +{ + Sha512 hash; + byte digest[SHA512_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitSha512(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Sha512Update(&hash, plain, sizeof(plain)); + + Sha512Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-512 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_RIPEMD +void bench_ripemd(void) +{ + RipeMd hash; + byte digest[RIPEMD_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitRipeMd(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RipeMdUpdate(&hash, plain, sizeof(plain)); + + RipeMdFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RIPEMD %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_BLAKE2 +void bench_blake2(void) +{ + Blake2b b2b; + byte digest[64]; + double start, total, persec; + int i; + + InitBlake2b(&b2b, 64); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Blake2bUpdate(&b2b, plain, sizeof(plain)); + + Blake2bFinal(&b2b, digest, 64); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("BLAKE2b %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#if !defined(NO_RSA) || !defined(NO_DH) \ + || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) +RNG rng; +#endif + +#ifndef NO_RSA + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certRSAname = "certs/rsa2048.der" ; +void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certRSAname = "certs/rsa2048.der" ; +#endif + +void bench_rsa(void) +{ + int i; + int ret; + byte tmp[3072]; + size_t bytes; + word32 idx = 0; + + byte message[] = "Everyone gets Friday off."; + byte enc[512]; /* for up to 4096 bit */ + const int len = (int)strlen((char*)message); + double start, total, each, milliEach; + + RsaKey rsaKey; + int rsaKeySz = 2048; /* used in printf */ + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); + bytes = sizeof_rsa_key_der_1024; + rsaKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); + bytes = sizeof_rsa_key_der_2048; +#else + FILE* file = fopen(certRSAname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); + return; + } + + bytes = fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + +#ifdef HAVE_CAVIUM + if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) + printf("RSA init cavium failed\n"); +#endif + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + InitRsaKey(&rsaKey, 0); + ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); + + start = current_time(1); + + for (i = 0; i < times; i++) + ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d encryption took %6.2f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, times); + + if (ret < 0) { + printf("Rsa Public Encrypt failed\n"); + return; + } + + start = current_time(1); + + for (i = 0; i < times; i++) { + byte out[512]; /* for up to 4096 bit */ + RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); + } + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d decryption took %6.2f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, times); + + FreeRsaKey(&rsaKey); +#ifdef HAVE_CAVIUM + RsaFreeCavium(&rsaKey); +#endif +} +#endif + + +#ifndef NO_DH + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certDHname = "certs/dh2048.der" ; +void set_Bench_DH_File(char * cert) { certDHname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certDHname = "certs/dh2048.der" ; +#endif + +void bench_dh(void) +{ + int i; + byte tmp[1024]; + size_t bytes; + word32 idx = 0, pubSz, privSz, pubSz2, privSz2, agreeSz; + + byte pub[256]; /* for 2048 bit */ + byte priv[256]; /* for 2048 bit */ + byte pub2[256]; /* for 2048 bit */ + byte priv2[256]; /* for 2048 bit */ + byte agree[256]; /* for 2048 bit */ + + double start, total, each, milliEach; + DhKey dhKey; + int dhKeySz = 2048; /* used in printf */ + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); + bytes = sizeof_dh_key_der_1024; + dhKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); + bytes = sizeof_dh_key_der_2048; +#else + FILE* file = fopen(certDHname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); + return; + } + + bytes = fread(tmp, 1, sizeof(tmp), file); +#endif /* USE_CERT_BUFFERS */ + + + InitDhKey(&dhKey); + bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); + if (bytes != 0) { + printf("dhekydecode failed, can't benchmark\n"); + #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); + #endif + return; + } + + start = current_time(1); + + for (i = 0; i < times; i++) + DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key generation %6.2f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, times); + + DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); + start = current_time(1); + + for (i = 0; i < times; i++) + DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); + + total = current_time(0) - start; + each = total / times; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key agreement %6.2f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, times); + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); +#endif + FreeDhKey(&dhKey); +} +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) +void bench_rsaKeyGen(void) +{ + RsaKey genKey; + double start, total, each, milliEach; + int i; + const int genTimes = 5; + + /* 1024 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 1024, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("RSA 1024 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); + + /* 2048 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 2048, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("RSA 2048 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} +#endif /* CYASSL_KEY_GEN */ + +#ifdef HAVE_ECC +void bench_eccKeyGen(void) +{ + ecc_key genKey; + double start, total, each, milliEach; + int i; + const int genTimes = 5; + + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + ecc_make_key(&rng, 32, &genKey); + ecc_free(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("ECC 256 key generation %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} + + +void bench_eccKeyAgree(void) +{ + ecc_key genKey, genKey2; + double start, total, each, milliEach; + int i, ret; + const int agreeTimes = 5; + byte shared[1024]; + byte sig[1024]; + byte digest[32]; + word32 x; + + ecc_init(&genKey); + ecc_init(&genKey2); + + ret = ecc_make_key(&rng, 32, &genKey); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + ret = ecc_make_key(&rng, 32, &genKey2); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(shared); + ecc_shared_secret(&genKey, &genKey2, shared, &x); + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DHE key agreement %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + /* make dummy digest */ + for (i = 0; i < (int)sizeof(digest); i++) + digest[i] = i; + + + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(sig); + ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DSA sign time %6.2f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + ecc_free(&genKey2); + ecc_free(&genKey); +} +#endif /* HAVE_ECC */ + + +#ifdef _WIN32 + + #define WIN32_LEAN_AND_MEAN + #include + + double current_time(int reset) + { + (void)reset; + + static int init = 0; + static LARGE_INTEGER freq; + + LARGE_INTEGER count; + + if (!init) { + QueryPerformanceFrequency(&freq); + init = 1; + } + + QueryPerformanceCounter(&count); + + return (double)count.QuadPart / freq.QuadPart; + } + +#elif defined MICROCHIP_PIC32 + + #include + + double current_time(int reset) + { + /* NOTE: core timer tick rate = 40 Mhz, 1 tick = 25 ns */ + + unsigned int ns; + + /* should we reset our timer back to zero? Helps prevent timer + rollover */ + + if (reset) { + WriteCoreTimer(0); + } + + /* get timer in ns */ + ns = ReadCoreTimer() * 25; + + /* return seconds as a double */ + return ( ns / 1000000000.0 ); + } + +#elif defined CYASSL_MDK_ARM + extern double current_time(int reset) ; +#else + + #include + + double current_time(int reset) + { + (void) reset; + + struct timeval tv; + gettimeofday(&tv, 0); + + return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; + } + +#endif /* _WIN32 */ + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c new file mode 100644 index 00000000..d29fbf3b --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c @@ -0,0 +1,28 @@ +/* certs_test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* Define initial data for cert buffers */ +#include + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c new file mode 100644 index 00000000..e446583e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c @@ -0,0 +1,756 @@ +/* client.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + #define CYASSL_MDK_ARM +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) + /* in case memory tracker wants stats */ + #define CYASSL_TRACK_MEMORY +#endif + +#include + +#ifdef CYASSL_MDK_SHELL +extern void exit_command(void) ; +#define exit(code) exit_command() +#endif + +#include + +#include "examples/client/client.h" + +#define USE_CYASSL_MEMORY + +#ifdef CYASSL_CALLBACKS + int handShakeCB(HandShakeInfo*); + int timeoutCB(TimeoutInfo*); + Timeval timeout; +#endif + + +static void NonBlockingSSL_Connect(CYASSL* ssl) +{ +#ifndef CYASSL_CALLBACKS + int ret = CyaSSL_connect(ssl); +#else + int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); +#endif + int error = CyaSSL_get_error(ssl, 0); + SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); + int select_ret; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... client would read block\n"); + else + printf("... client would write block\n"); + +#ifdef CYASSL_DTLS + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); +#endif + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + #ifndef CYASSL_CALLBACKS + ret = CyaSSL_connect(ssl); + #else + ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); + #endif + error = CyaSSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } +#ifdef CYASSL_DTLS + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } +#endif + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_connect failed"); +} + + +static void Usage(void) +{ + printf("client " LIBCYASSL_VERSION_STRING + " NOTE: All files relative to CyaSSL home dir\n"); + printf("-? Help, print this usage\n"); + printf("-h Host to connect to, default %s\n", yasslIP); + printf("-p Port to connect on, not 0, default %d\n", yasslPort); + printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", + CLIENT_DEFAULT_VERSION); + printf("-l Cipher list\n"); + printf("-c Certificate file, default %s\n", cliCert); + printf("-k Key file, default %s\n", cliKey); + printf("-A Certificate Authority file, default %s\n", caCert); + printf("-b Benchmark connections and print stats\n"); + printf("-s Use pre Shared keys\n"); + printf("-t Track CyaSSL memory use\n"); + printf("-d Disable peer checks\n"); + printf("-g Send server HTTP GET\n"); + printf("-u Use UDP DTLS," + " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); + printf("-m Match domain name in cert\n"); + printf("-N Use Non-blocking sockets\n"); + printf("-r Resume session\n"); + printf("-f Fewer packets/group messages\n"); + printf("-x Disable client cert/key loading\n"); +#ifdef SHOW_SIZES + printf("-z Print structure sizes\n"); +#endif + printf("-S Use Host Name Indication\n"); +} + + +THREAD_RETURN CYASSL_THREAD client_test(void* args) +{ + SOCKET_T sockfd = 0; + + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + CYASSL* ssl = 0; + + CYASSL* sslResume = 0; + CYASSL_SESSION* session = 0; + char resumeMsg[] = "resuming cyassl!"; + int resumeSz = sizeof(resumeMsg); + + char msg[32] = "hello cyassl!"; /* GET may make bigger */ + char reply[80]; + int input; + int msgSz = (int)strlen(msg); + + int port = yasslPort; + char* host = (char*)yasslIP; + char* domain = (char*)"www.yassl.com"; + + int ch; + int version = CLIENT_INVALID_VERSION; + int usePsk = 0; + int sendGET = 0; + int benchmark = 0; + int doDTLS = 0; + int matchName = 0; + int doPeerCheck = 1; + int nonBlocking = 0; + int resumeSession = 0; + int trackMemory = 0; + int useClientCert = 1; + int fewerPackets = 0; + char* cipherList = NULL; + char* verifyCert = (char*)caCert; + char* ourCert = (char*)cliCert; + char* ourKey = (char*)cliKey; + +#ifdef HAVE_SNI + char* sniHostName = NULL; +#endif + + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef NO_RSA + verifyCert = (char*)eccCert; + ourCert = (char*)cliEccCert; + ourKey = (char*)cliEccKey; +#endif + (void)resumeSz; + (void)session; + (void)sslResume; + (void)trackMemory; + + while ((ch = mygetopt(argc, argv, "?gdusmNrtfxh:p:v:l:A:c:k:b:zS:")) != -1){ + switch (ch) { + case '?' : + Usage(); + exit(EXIT_SUCCESS); + + case 'g' : + sendGET = 1; + break; + + case 'd' : + doPeerCheck = 0; + break; + + case 'u' : + doDTLS = 1; + break; + + case 's' : + usePsk = 1; + break; + + case 't' : + #ifdef USE_CYASSL_MEMORY + trackMemory = 1; + #endif + break; + + case 'm' : + matchName = 1; + break; + + case 'x' : + useClientCert = 0; + break; + + case 'f' : + fewerPackets = 1; + break; + + case 'h' : + host = myoptarg; + domain = myoptarg; + break; + + case 'p' : + port = atoi(myoptarg); + #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) + if (port == 0) + err_sys("port number cannot be 0"); + #endif + break; + + case 'v' : + version = atoi(myoptarg); + if (version < 0 || version > 3) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'l' : + cipherList = myoptarg; + break; + + case 'A' : + verifyCert = myoptarg; + break; + + case 'c' : + ourCert = myoptarg; + break; + + case 'k' : + ourKey = myoptarg; + break; + + case 'b' : + benchmark = atoi(myoptarg); + if (benchmark < 0 || benchmark > 1000000) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'N' : + nonBlocking = 1; + break; + + case 'r' : + resumeSession = 1; + break; + + case 'z' : + #ifndef CYASSL_LEANPSK + CyaSSL_GetObjectSize(); + #endif + break; + + case 'S' : + #ifdef HAVE_SNI + sniHostName = myoptarg; + #endif + break; + + default: + Usage(); + exit(MY_EX_USAGE); + } + } + + myoptind = 0; /* reset for test cases */ + + /* sort out DTLS versus TLS versions */ + if (version == CLIENT_INVALID_VERSION) { + if (doDTLS) + version = CLIENT_DTLS_DEFAULT_VERSION; + else + version = CLIENT_DEFAULT_VERSION; + } + else { + if (doDTLS) { + if (version == 3) + version = -2; + else + version = -1; + } + } + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + InitMemoryTracker(); +#endif + + switch (version) { +#ifndef NO_OLD_TLS + case 0: + method = CyaSSLv3_client_method(); + break; + + + #ifndef NO_TLS + case 1: + method = CyaTLSv1_client_method(); + break; + + case 2: + method = CyaTLSv1_1_client_method(); + break; + #endif /* NO_TLS */ + +#endif /* NO_OLD_TLS */ + +#ifndef NO_TLS + case 3: + method = CyaTLSv1_2_client_method(); + break; +#endif + +#ifdef CYASSL_DTLS + case -1: + method = CyaDTLSv1_client_method(); + break; + + case -2: + method = CyaDTLSv1_2_client_method(); + break; +#endif + + default: + err_sys("Bad SSL version"); + break; + } + + if (method == NULL) + err_sys("unable to get method"); + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + err_sys("unable to get ctx"); + + if (cipherList) + if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) + err_sys("client can't set cipher list 1"); + +#ifdef CYASSL_LEANPSK + usePsk = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + usePsk = 1; +#endif + + if (fewerPackets) + CyaSSL_CTX_set_group_messages(ctx); + + if (usePsk) { +#ifndef NO_PSK + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + if (cipherList == NULL) { + const char *defaultCipherList; + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); + } +#endif + useClientCert = 0; + } + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + if (cipherList == NULL) { + /* don't use EDH, can't sniff tmp keys */ + if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { + err_sys("client can't set cipher list 3"); + } + } +#endif + +#ifdef USER_CA_CB + CyaSSL_CTX_SetCACb(ctx, CaCb); +#endif + +#ifdef VERIFY_CALLBACK + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); +#endif +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (useClientCert){ + if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) + err_sys("can't load client cert file, check file and run from" + " CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load client private key file, check file and run " + "from CyaSSL home dir"); + } + + if (!usePsk) { + if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + } +#endif +#if !defined(NO_CERTS) + if (!usePsk && doPeerCheck == 0) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); +#endif + +#ifdef HAVE_CAVIUM + CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); +#endif + +#ifdef HAVE_SNI + if (sniHostName) + if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) + != SSL_SUCCESS) + err_sys("UseSNI failed"); +#endif + + if (benchmark) { + /* time passed in number of connects give average */ + int times = benchmark; + int i = 0; + + double start = current_time(), avg; + + for (i = 0; i < times; i++) { + tcp_connect(&sockfd, host, port, doDTLS); + + ssl = CyaSSL_new(ctx); + CyaSSL_set_fd(ssl, sockfd); + if (CyaSSL_connect(ssl) != SSL_SUCCESS) + err_sys("SSL_connect failed"); + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + CloseSocket(sockfd); + } + avg = current_time() - start; + avg /= times; + avg *= 1000; /* milliseconds */ + printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); + + CyaSSL_CTX_free(ctx); + ((func_args*)args)->return_code = 0; + + exit(EXIT_SUCCESS); + } + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) + err_sys("unable to get SSL object"); + + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(ssl, sockfd); +#ifdef HAVE_CRL + if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) + err_sys("can't enable crl check"); + if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) + err_sys("can't load crl, check crlfile and date validity"); + if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) + err_sys("can't set crl callback"); +#endif + if (matchName && doPeerCheck) + CyaSSL_check_domain_name(ssl, domain); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(ssl); + } + else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { + /* see note at top of README */ + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("err = %d, %s\n", err, + CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_connect failed"); + /* if you're getting an error here */ + } +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + showPeer(ssl); + + if (sendGET) { + printf("SSL connect ok, sending GET...\n"); + msgSz = 28; + strncpy(msg, "GET / HTTP/1.0\r\n\r\n", msgSz); + msg[msgSz] = '\0'; + } + if (CyaSSL_write(ssl, msg, msgSz) != msgSz) + err_sys("SSL_write failed"); + + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server response: %s", reply); + + if (sendGET && (input == (sizeof(reply)-1))) { /* get html */ + while (1) { + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("%s", reply); + if(input < sizeof(reply)-1) + break ; + } + else + break; + } + } + printf("\n"); + } + else if (input < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("CyaSSL_read failed"); + } + +#ifdef CYASSL_CMSIS_RTOS + osDelay(5000) ; +#endif + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + strncpy(msg, "break", 6); + msgSz = (int)strlen(msg); + /* try to send session close */ + CyaSSL_write(ssl, msg, msgSz); + } + session = CyaSSL_get_session(ssl); + sslResume = CyaSSL_new(ctx); + } +#endif + + if (doDTLS == 0) /* don't send alert after "break" command */ + CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ + CyaSSL_free(ssl); + CloseSocket(sockfd); + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + SOCKADDR_IN_T addr; + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(sslResume, sockfd); + CyaSSL_set_session(sslResume, session); + + showPeer(sslResume); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(sslResume, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(sslResume); + } + else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) + err_sys("SSL resume failed"); +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + + if (CyaSSL_session_reused(sslResume)) + printf("reused session id\n"); + else + printf("didn't reuse session id!!!\n"); + + if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) + err_sys("SSL_write failed"); + + if (nonBlocking) { + /* give server a chance to bounce a message back to client */ + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + } + + input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server resume response: %s\n", reply); + } + + /* try to send session break */ + CyaSSL_write(sslResume, msg, msgSz); + + CyaSSL_shutdown(sslResume); + CyaSSL_free(sslResume); + CloseSocket(sockfd); + } +#endif /* NO_SESSION_CACHE */ + + CyaSSL_CTX_free(ctx); + + ((func_args*)args)->return_code = 0; + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + ShowMemoryTracker(); +#endif /* USE_CYASSL_MEMORY */ + + return 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + if (CurrentDir("client") || CurrentDir("build")) + ChangeDirBack(2); + +#ifdef HAVE_STACK_SIZE + StackSizeCheck(&args, client_test); +#else + client_test(&args); +#endif + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + + int myoptind = 0; + char* myoptarg = NULL; + +#endif /* NO_MAIN_DRIVER */ + + + +#ifdef CYASSL_CALLBACKS + + int handShakeCB(HandShakeInfo* info) + { + (void)info; + return 0; + } + + + int timeoutCB(TimeoutInfo* info) + { + (void)info; + return 0; + } + +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c new file mode 100644 index 00000000..3793d6dd --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c @@ -0,0 +1,287 @@ +/* echoclient.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#include "examples/echoclient/echoclient.h" + +void echoclient_test(void* args) +{ + SOCKET_T sockfd = 0; + + FILE* fin = stdin ; + FILE* fout = stdout; + + int inCreated = 0; + int outCreated = 0; + + char msg[1024]; + char reply[1024+1]; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + + int doDTLS = 0; + int doPSK = 0; + int sendSz; + int argc = 0; + char** argv = 0; + int port = yasslPort; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifndef CYASSL_MDK_ARM + argc = ((func_args*)args)->argc; + argv = ((func_args*)args)->argv; +#endif + + if (argc >= 2) { + fin = fopen(argv[1], "r"); + inCreated = 1; + } + if (argc >= 3) { + fout = fopen(argv[2], "w"); + outCreated = 1; + } + + if (!fin) err_sys("can't open input file"); + if (!fout) err_sys("can't open output file"); + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + +#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) + port = ((func_args*)args)->signal->port; +#endif +#if defined (CYASSL_CALLEE_PORT) + port = CYASSL_CALLEE_PORT ; +#endif + +#if defined(CYASSL_DTLS) + method = DTLSv1_client_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_client_method(); +#else + method = SSLv3_client_method(); +#endif + ctx = SSL_CTX_new(method); + +#ifndef NO_FILESYSTEM + #ifndef NO_RSA + if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif + #ifdef HAVE_ECC + if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif +#elif !defined(NO_CERTS) + if (!doPSK) + load_buffer(ctx, caCert, CYASSL_CA); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); +#endif + } + +#ifdef OPENSSL_EXTRA + SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = SSL_new(ctx); + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, yasslIP, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, yasslIP, port, 0); + } + + SSL_set_fd(ssl, sockfd); +#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) + /* let echoserver bind first, TODO: add Windows signal like pthreads does */ + Sleep(100); +#endif + + if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); + + while (fgets(msg, sizeof(msg), fin) != 0) { + + sendSz = (int)strlen(msg); + + if (SSL_write(ssl, msg, sendSz) != sendSz) + err_sys("SSL_write failed"); + + if (strncmp(msg, "quit", 4) == 0) { + fputs("sending server shutdown command: quit!\n", fout); + break; + } + + if (strncmp(msg, "break", 5) == 0) { + fputs("sending server session close: break!\n", fout); + break; + } + + #ifndef CYASSL_MDK_SHELL + while (sendSz) { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + else + break; + } + #else + { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + } + #endif + } + +#ifdef CYASSL_CMSIS_RTOS + osDelay(5000) ; +#endif + + +#ifdef CYASSL_DTLS + strncpy(msg, "break", 6); + sendSz = (int)strlen(msg); + /* try to tell server done */ + SSL_write(ssl, msg, sendSz); +#else + SSL_shutdown(ssl); +#endif + + SSL_free(ssl); + SSL_CTX_free(ctx); + + fflush(fout); + if (inCreated) fclose(fin); + if (outCreated) fclose(fout); + + CloseSocket(sockfd); + ((func_args*)args)->return_code = 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + + if (CurrentDir("echoclient") || CurrentDir("build")) + ChangeDirBack(2); + echoclient_test(&args); + + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + +#endif /* NO_MAIN_DRIVER */ + + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c new file mode 100644 index 00000000..132e4c6d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c @@ -0,0 +1,370 @@ +/* echoserver.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include +#include + +#ifndef NO_MAIN_DRIVER + #define ECHO_OUT +#endif + +#include "examples/echoserver/echoserver.h" + + +#ifdef SESSION_STATS + CYASSL_API void PrintSessionStats(void); +#endif + +#define SVR_COMMAND_SIZE 256 + +static void SignalReady(void* args, int port) +{ +#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) + /* signal ready to tcp_accept */ + func_args* server_args = (func_args*)args; + tcp_ready* ready = server_args->signal; + pthread_mutex_lock(&ready->mutex); + ready->ready = 1; + ready->port = port; + pthread_cond_signal(&ready->cond); + pthread_mutex_unlock(&ready->mutex); +#endif + (void)args; + (void)port; +} + + +THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) +{ + SOCKET_T sockfd = 0; + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + + int doDTLS = 0; + int doPSK = 0; + int outCreated = 0; + int shutDown = 0; + int useAnyAddr = 0; + int port = yasslPort; + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + +#ifdef ECHO_OUT + FILE* fout = stdout; + if (argc >= 2) { + fout = fopen(argv[1], "w"); + outCreated = 1; + } + if (!fout) err_sys("can't open output file"); +#endif + (void)outCreated; + (void)argc; + (void)argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + + #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ + !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_ARM) + port = 0; + #endif + #if defined(USE_ANY_ADDR) + useAnyAddr = 1; + #endif + tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); + +#if defined(CYASSL_DTLS) + method = CyaDTLSv1_server_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_server_method(); +#else + method = CyaSSLv3_server_method(); +#endif + ctx = CyaSSL_CTX_new(method); + /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#ifndef NO_FILESYSTEM + if (doPSK == 0) { + #ifdef HAVE_NTRU + /* ntru */ + if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load ntru cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) + != SSL_SUCCESS) + err_sys("can't load ntru key file, " + "Please run from CyaSSL home dir"); + #elif defined(HAVE_ECC) + /* ecc */ + if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #elif defined(NO_CERTS) + /* do nothing, just don't load cert files */ + #else + /* normal */ + if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #endif + } /* doPSK */ +#elif !defined(NO_CERTS) + if (!doPSK) { + load_buffer(ctx, svrCert, CYASSL_CERT); + load_buffer(ctx, svrKey, CYASSL_KEY); + } +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 2"); +#endif + } + + SignalReady(args, port); + + while (!shutDown) { + CYASSL* ssl = 0; + char command[SVR_COMMAND_SIZE+1]; + int echoSz = 0; + int clientfd; + int firstRead = 1; + int gotFirstG = 0; + +#ifndef CYASSL_DTLS + SOCKADDR_IN_T client; + socklen_t client_len = sizeof(client); + clientfd = accept(sockfd, (struct sockaddr*)&client, + (ACCEPT_THIRD_T)&client_len); +#else + clientfd = udp_read_connect(sockfd); +#endif + if (clientfd == -1) err_sys("tcp accept failed"); + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) err_sys("SSL_new failed"); + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + CyaSSL_set_fd(ssl, clientfd); + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #elif !defined(NO_CERTS) + SetDH(ssl); /* will repick suites with DHE, higher than PSK */ + #endif + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + printf("SSL_accept failed\n"); + CyaSSL_free(ssl); + CloseSocket(clientfd); + continue; + } +#if defined(PEER_INFO) + showPeer(ssl); +#endif + + while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { + + if (firstRead == 1) { + firstRead = 0; /* browser may send 1 byte 'G' to start */ + if (echoSz == 1 && command[0] == 'G') { + gotFirstG = 1; + continue; + } + } + else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { + strncpy(command, "GET", 4); + /* fall through to normal GET */ + } + + if ( strncmp(command, "quit", 4) == 0) { + printf("client sent quit command: shutting down!\n"); + shutDown = 1; + break; + } + if ( strncmp(command, "break", 5) == 0) { + printf("client sent break command: closing session!\n"); + break; + } +#ifdef SESSION_STATS + if ( strncmp(command, "printstats", 10) == 0) { + PrintSessionStats(); + break; + } +#endif + if ( strncmp(command, "GET", 3) == 0) { + char type[] = "HTTP/1.0 200 ok\r\nContent-type:" + " text/html\r\n\r\n"; + char header[] = "\n
\n";
+                char body[]   = "greetings from CyaSSL\n";
+                char footer[] = "\r\n\r\n";
+            
+                strncpy(command, type, sizeof(type));
+                echoSz = sizeof(type) - 1;
+
+                strncpy(&command[echoSz], header, sizeof(header));
+                echoSz += (int)sizeof(header) - 1;
+                strncpy(&command[echoSz], body, sizeof(body));
+                echoSz += (int)sizeof(body) - 1;
+                strncpy(&command[echoSz], footer, sizeof(footer));
+                echoSz += (int)sizeof(footer);
+
+                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                    err_sys("SSL_write failed");
+                break;
+            }
+            command[echoSz] = 0;
+
+            #ifdef ECHO_OUT
+                fputs(command, fout);
+            #endif
+
+            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                err_sys("SSL_write failed");
+        }
+#ifndef CYASSL_DTLS
+        CyaSSL_shutdown(ssl);
+#endif
+        CyaSSL_free(ssl);
+        CloseSocket(clientfd);
+#ifdef CYASSL_DTLS
+        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
+        SignalReady(args, port);
+#endif
+    }
+#ifdef CYASSL_CMSIS_RTOS
+    osDelay(5000) ;
+#endif
+    CloseSocket(sockfd);
+    CyaSSL_CTX_free(ctx);
+
+#ifdef ECHO_OUT
+    if (outCreated)
+        fclose(fout);
+#endif
+
+    ((func_args*)args)->return_code = 0;
+    return 0;
+}
+
+
+/* so overall tests can pull in test function */
+#ifndef NO_MAIN_DRIVER
+
+    int main(int argc, char** argv)
+    {
+        func_args args;
+
+#ifdef HAVE_CAVIUM
+        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
+        if (ret != 0)
+            err_sys("Cavium OpenNitroxDevice failed");
+#endif /* HAVE_CAVIUM */
+
+        StartTCP();
+
+        args.argc = argc;
+        args.argv = argv;
+
+        CyaSSL_Init();
+#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
+        CyaSSL_Debugging_ON();
+#endif
+        if (CurrentDir("echoserver") || CurrentDir("build"))
+            ChangeDirBack(2);
+        echoserver_test(&args);
+        CyaSSL_Cleanup();
+
+#ifdef HAVE_CAVIUM
+        CspShutdown(CAVIUM_DEV_ID);
+#endif
+        return args.return_code;
+    }
+
+        
+#endif /* NO_MAIN_DRIVER */
+
+
+
+
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c
new file mode 100644
index 00000000..f1b84913
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c
@@ -0,0 +1,94 @@
+/* main.c
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+ 
+#ifdef HAVE_CONFIG_H
+    #include 
+#endif
+
+#include 
+#include 
+
+#include "cmsis_os.h"
+#include "rl_fs.h" 
+#include "rl_net.h" 
+#include 
+#include "cyassl_MDK_ARM.h"
+#include 
+
+/*-----------------------------------------------------------------------------
+ *        Initialize a Flash Memory Card
+ *----------------------------------------------------------------------------*/
+static void init_filesystem (void) {
+  int32_t retv;
+
+  retv = finit ("M0:");
+  if (retv == 0) {
+    retv = fmount ("M0:");
+    if (retv == 0) {
+      printf ("Drive M0 ready!\n");
+    }
+    else {
+      printf ("Drive M0 mount failed!\n");
+    }
+  }
+  else {
+    printf ("Drive M0 initialization failed!\n");
+  }
+}
+
+/*-----------------------------------------------------------------------------
+ *        TCP/IP tasks
+ *----------------------------------------------------------------------------*/
+void tcp_poll (void const *arg)
+{
+    CYASSL_MSG("TCP polling started.\n") ;
+    while (1) {
+        net_main ();
+        osDelay(1) ;
+    }
+}
+
+extern void shell_main(void * args) ;
+extern void init_time(void) ;
+
+osThreadDef (tcp_poll, osPriorityHigh, 1, 0) ;
+/*-----------------------------------------------------------------------------
+ *       mian entry 
+ *----------------------------------------------------------------------------*/
+int myoptind = 0;
+char* myoptarg = NULL;
+
+int main() 
+{
+    void *arg = NULL ;
+    init_time() ;
+    init_filesystem ();
+    net_initialize() ;
+    osThreadCreate (osThread (tcp_poll), NULL); 
+    osDelay(10000) ;  /* wait for DHCP */
+    #if defined(DEBUG_CYASSL)
+         printf("Turning ON Debug message\n") ;
+         CyaSSL_Debugging_ON() ;
+    #endif
+
+    shell_main(arg) ;   
+
+}
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c
new file mode 100644
index 00000000..28b6e8c9
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c
@@ -0,0 +1,561 @@
+/* server.c
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+
+#ifdef HAVE_CONFIG_H
+    #include 
+#endif
+
+#include 
+
+#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER)
+    /* in case memory tracker wants stats */
+    #define CYASSL_TRACK_MEMORY
+#endif
+
+#if defined(CYASSL_MDK_ARM)
+    #include 
+    #include 
+    
+    #if defined(CYASSL_MDK5)
+        #include "cmsis_os.h"
+        #include "rl_fs.h" 
+        #include "rl_net.h" 
+    #else
+        #include "rtl.h"
+    #endif
+    
+    #include "cyassl_MDK_ARM.h"
+#endif
+
+#include 
+
+#ifdef CYASSL_MDK_SHELL
+extern void exit_command(void) ;
+#define exit(code) exit_command() 
+#endif
+
+#include 
+
+#include "examples/server/server.h"
+
+
+#ifdef CYASSL_CALLBACKS
+    int srvHandShakeCB(HandShakeInfo*);
+    int srvTimeoutCB(TimeoutInfo*);
+    Timeval srvTo;
+#endif
+
+static void NonBlockingSSL_Accept(SSL* ssl)
+{
+#ifndef CYASSL_CALLBACKS
+    int ret = SSL_accept(ssl);
+#else
+    int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo);
+#endif
+    int error = SSL_get_error(ssl, 0);
+    SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl);
+    int select_ret;
+
+    while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ ||
+                                  error == SSL_ERROR_WANT_WRITE)) {
+        int currTimeout = 1;
+
+        if (error == SSL_ERROR_WANT_READ)
+            printf("... server would read block\n");
+        else
+            printf("... server would write block\n");
+
+#ifdef CYASSL_DTLS
+        currTimeout = CyaSSL_dtls_get_current_timeout(ssl);
+#endif
+        select_ret = tcp_select(sockfd, currTimeout);
+
+        if ((select_ret == TEST_RECV_READY) ||
+                                        (select_ret == TEST_ERROR_READY)) {
+            #ifndef CYASSL_CALLBACKS
+                ret = SSL_accept(ssl);
+            #else
+                ret = CyaSSL_accept_ex(ssl,
+                                    srvHandShakeCB, srvTimeoutCB, srvTo);
+            #endif
+            error = SSL_get_error(ssl, 0);
+        }
+        else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) {
+            error = SSL_ERROR_WANT_READ;
+        }
+#ifdef CYASSL_DTLS
+        else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) &&
+                                            CyaSSL_dtls_got_timeout(ssl) >= 0) {
+            error = SSL_ERROR_WANT_READ;
+        }
+#endif
+        else {
+            error = SSL_FATAL_ERROR;
+        }
+    }
+    if (ret != SSL_SUCCESS)
+        err_sys("SSL_accept failed");
+}
+
+
+static void Usage(void)
+{
+    printf("server "    LIBCYASSL_VERSION_STRING
+           " NOTE: All files relative to CyaSSL home dir\n");
+    printf("-?          Help, print this usage\n");
+    printf("-p     Port to listen on, not 0, default %d\n", yasslPort);
+    printf("-v     SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n",
+                                 SERVER_DEFAULT_VERSION);
+    printf("-l     Cipher list\n");
+    printf("-c    Certificate file,           default %s\n", svrCert);
+    printf("-k    Key file,                   default %s\n", svrKey);
+    printf("-A    Certificate Authority file, default %s\n", cliCert);
+    printf("-d          Disable client cert check\n");
+    printf("-b          Bind to any interface instead of localhost only\n");
+    printf("-s          Use pre Shared keys\n");
+    printf("-t          Track CyaSSL memory use\n");
+    printf("-u          Use UDP DTLS,"
+           " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n");
+    printf("-f          Fewer packets/group messages\n");
+    printf("-N          Use Non-blocking sockets\n");
+    printf("-S     Use Host Name Indication\n");
+}
+
+THREAD_RETURN CYASSL_THREAD server_test(void* args)
+{
+    SOCKET_T sockfd   = 0;
+    SOCKET_T clientfd = 0;
+
+    SSL_METHOD* method = 0;
+    SSL_CTX*    ctx    = 0;
+    SSL*        ssl    = 0;
+
+    char   msg[] = "I hear you fa shizzle!";
+    char   input[80];
+    int    idx;
+    int    ch;
+    int    version = SERVER_DEFAULT_VERSION;
+    int    doCliCertCheck = 1;
+    int    useAnyAddr = 0;
+    int    port = yasslPort;
+    int    usePsk = 0;
+    int    doDTLS = 0;
+    int    useNtruKey   = 0;
+    int    nonBlocking  = 0;
+    int    trackMemory  = 0;
+    int    fewerPackets = 0;
+    char*  cipherList = NULL;
+    char*  verifyCert = (char*)cliCert;
+    char*  ourCert    = (char*)svrCert;
+    char*  ourKey     = (char*)svrKey;
+    int    argc = ((func_args*)args)->argc;
+    char** argv = ((func_args*)args)->argv;
+
+#ifdef HAVE_SNI
+    char*  sniHostName = NULL;
+#endif
+
+    ((func_args*)args)->return_code = -1; /* error state */
+
+#ifdef NO_RSA
+    verifyCert = (char*)cliEccCert;
+    ourCert    = (char*)eccCert;
+    ourKey     = (char*)eccKey;
+#endif
+    (void)trackMemory;
+
+    while ((ch = mygetopt(argc, argv, "?dbstnNufp:v:l:A:c:k:S:")) != -1) {
+        switch (ch) {
+            case '?' :
+                Usage();
+                exit(EXIT_SUCCESS);
+
+            case 'd' :
+                doCliCertCheck = 0;
+                break;
+
+            case 'b' :
+                useAnyAddr = 1;
+                break;
+
+            case 's' :
+                usePsk = 1;
+                break;
+
+            case 't' :
+            #ifdef USE_CYASSL_MEMORY
+                trackMemory = 1;
+            #endif
+                break;
+
+            case 'n' :
+                useNtruKey = 1;
+                break;
+
+            case 'u' :
+                doDTLS  = 1;
+                break;
+
+            case 'f' :
+                fewerPackets = 1;
+                break;
+
+            case 'p' :
+                port = atoi(myoptarg);
+                #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API)
+                    if (port == 0)
+                        err_sys("port number cannot be 0");
+                #endif
+                break;
+
+            case 'v' :
+                version = atoi(myoptarg);
+                if (version < 0 || version > 3) {
+                    Usage();
+                    exit(MY_EX_USAGE);
+                }
+                break;
+
+            case 'l' :
+                cipherList = myoptarg;
+                break;
+
+            case 'A' :
+                verifyCert = myoptarg;
+                break;
+
+            case 'c' :
+                ourCert = myoptarg;
+                break;
+
+            case 'k' :
+                ourKey = myoptarg;
+                break;
+
+            case 'N':
+                nonBlocking = 1;
+                break;
+
+            case 'S' :
+                #ifdef HAVE_SNI
+                    sniHostName = myoptarg;
+                #endif
+                break;
+
+            default:
+                Usage();
+                exit(MY_EX_USAGE);
+        }
+    }
+
+    myoptind = 0;      /* reset for test cases */
+
+    /* sort out DTLS versus TLS versions */
+    if (version == CLIENT_INVALID_VERSION) {
+        if (doDTLS)
+            version = CLIENT_DTLS_DEFAULT_VERSION;
+        else
+            version = CLIENT_DEFAULT_VERSION;
+    }
+    else {
+        if (doDTLS) {
+            if (version == 3)
+                version = -2;
+            else
+                version = -1;
+        }
+    }
+
+#ifdef USE_CYASSL_MEMORY
+    if (trackMemory)
+        InitMemoryTracker(); 
+#endif
+
+    switch (version) {
+#ifndef NO_OLD_TLS
+        case 0:
+            method = SSLv3_server_method();
+            break;
+
+    #ifndef NO_TLS
+        case 1:
+            method = TLSv1_server_method();
+            break;
+
+
+        case 2:
+            method = TLSv1_1_server_method();
+            break;
+
+        #endif
+#endif
+
+#ifndef NO_TLS
+        case 3:
+            method = TLSv1_2_server_method();
+            break;
+#endif
+                
+#ifdef CYASSL_DTLS
+        case -1:
+            method = DTLSv1_server_method();
+            break;
+
+        case -2:
+            method = DTLSv1_2_server_method();
+            break;
+#endif
+
+        default:
+            err_sys("Bad SSL version");
+    }
+
+    if (method == NULL)
+        err_sys("unable to get method");
+
+    ctx = SSL_CTX_new(method);
+    if (ctx == NULL)
+        err_sys("unable to get ctx");
+
+    if (cipherList)
+        if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS)
+            err_sys("server can't set cipher list 1");
+
+#ifdef CYASSL_LEANPSK
+    usePsk = 1;
+#endif
+
+#if defined(NO_RSA) && !defined(HAVE_ECC)
+    usePsk = 1;
+#endif
+
+#ifdef OPENSSL_EXTRA
+    SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
+#endif
+
+    if (fewerPackets)
+        CyaSSL_CTX_set_group_messages(ctx);
+
+#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
+    if (!usePsk) {
+        if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM)
+                                         != SSL_SUCCESS)
+            err_sys("can't load server cert file, check file and run from"
+                    " CyaSSL home dir");
+    }
+#endif
+
+#ifdef HAVE_NTRU
+    if (useNtruKey) {
+        if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey)
+                                               != SSL_SUCCESS)
+            err_sys("can't load ntru key file, "
+                    "Please run from CyaSSL home dir");
+    }
+#endif
+
+#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
+    if (!useNtruKey && !usePsk) {
+        if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM)
+                                         != SSL_SUCCESS)
+            err_sys("can't load server cert file, check file and run from"
+                " CyaSSL home dir");
+    }
+#endif
+
+    if (usePsk) {
+#ifndef NO_PSK
+        SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb);
+        SSL_CTX_use_psk_identity_hint(ctx, "cyassl server");
+        if (cipherList == NULL) {
+            const char *defaultCipherList;
+            #ifdef HAVE_NULL_CIPHER
+                defaultCipherList = "PSK-NULL-SHA256";
+            #else
+                defaultCipherList = "PSK-AES128-CBC-SHA256";
+            #endif
+            if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS)
+                err_sys("server can't set cipher list 2");
+        }
+#endif
+    }
+
+#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
+    /* if not using PSK, verify peer with certs */
+    if (doCliCertCheck && usePsk == 0) {
+        SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER |
+                                SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0);
+        if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS)
+            err_sys("can't load ca file, Please run from CyaSSL home dir");
+    }
+#endif
+
+#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC)
+    /* don't use EDH, can't sniff tmp keys */
+    if (cipherList == NULL) {
+        if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS)
+            err_sys("server can't set cipher list 3");
+    }
+#endif
+
+#ifdef HAVE_SNI
+    if (sniHostName) {
+        if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName,
+                                           XSTRLEN(sniHostName)) != SSL_SUCCESS)
+            err_sys("UseSNI failed");
+        else
+            CyaSSL_CTX_SNI_SetOptions(ctx, CYASSL_SNI_HOST_NAME,
+                                                  CYASSL_SNI_ABORT_ON_MISMATCH);
+    }
+#endif
+
+    ssl = SSL_new(ctx);
+    if (ssl == NULL)
+        err_sys("unable to get SSL");
+    CyaSSL_set_quiet_shutdown(ssl, 1) ;
+#ifdef HAVE_CRL
+    CyaSSL_EnableCRL(ssl, 0);
+    CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR |
+                                                     CYASSL_CRL_START_MON);
+    CyaSSL_SetCRL_Cb(ssl, CRL_CallBack);
+#endif
+        osDelay(5000) ;
+    tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS);
+    if (!doDTLS) 
+        CloseSocket(sockfd);
+
+    SSL_set_fd(ssl, clientfd);
+    if (usePsk == 0) {
+        #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA)
+            CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM);
+        #elif !defined(NO_CERTS)
+            SetDH(ssl);  /* repick suites with DHE, higher priority than PSK */
+        #endif
+    }
+        osDelay(5000) ;
+#ifndef CYASSL_CALLBACKS
+    if (nonBlocking) {
+        CyaSSL_set_using_nonblock(ssl, 1);
+        tcp_set_nonblocking(&clientfd);
+        NonBlockingSSL_Accept(ssl);
+    } else if (SSL_accept(ssl) != SSL_SUCCESS) {
+        int err = SSL_get_error(ssl, 0);
+        char buffer[80];
+        printf("error = %d, %s\n", err, ERR_error_string(err, buffer));
+        err_sys("SSL_accept failed");
+    }
+#else
+    NonBlockingSSL_Accept(ssl);
+#endif
+    showPeer(ssl);
+        osDelay(5000) ;
+    idx = SSL_read(ssl, input, sizeof(input)-1);
+    if (idx > 0) {
+        input[idx] = 0;
+        printf("Client message: %s\n", input);
+
+    }
+    else if (idx < 0) {
+        int readErr = SSL_get_error(ssl, 0);
+        if (readErr != SSL_ERROR_WANT_READ)
+            err_sys("SSL_read failed");
+    }
+
+    if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
+        err_sys("SSL_write failed");
+        
+    SSL_shutdown(ssl);
+    SSL_free(ssl);
+    SSL_CTX_free(ctx);
+    
+    CloseSocket(clientfd);
+    ((func_args*)args)->return_code = 0;
+
+#ifdef USE_CYASSL_MEMORY
+    if (trackMemory)
+        ShowMemoryTracker();
+#endif /* USE_CYASSL_MEMORY */
+
+    return 0;
+}
+
+
+/* so overall tests can pull in test function */
+#ifndef NO_MAIN_DRIVER
+
+    int main(int argc, char** argv)
+    {
+        func_args args;
+
+#ifdef HAVE_CAVIUM
+        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
+        if (ret != 0)
+            err_sys("Cavium OpenNitroxDevice failed");
+#endif /* HAVE_CAVIUM */
+
+        StartTCP();
+
+        args.argc = argc;
+        args.argv = argv;
+
+        CyaSSL_Init();
+#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
+        CyaSSL_Debugging_ON();
+#endif
+        if (CurrentDir("server") || CurrentDir("build"))
+            ChangeDirBack(2);
+   
+#ifdef HAVE_STACK_SIZE
+        StackSizeCheck(&args, server_test);
+#else 
+        server_test(&args);
+#endif
+        CyaSSL_Cleanup();
+
+#ifdef HAVE_CAVIUM
+        CspShutdown(CAVIUM_DEV_ID);
+#endif
+        return args.return_code;
+    }
+
+    int myoptind = 0;
+    char* myoptarg = NULL;
+
+#endif /* NO_MAIN_DRIVER */
+
+
+#ifdef CYASSL_CALLBACKS
+
+    int srvHandShakeCB(HandShakeInfo* info)
+    {
+        (void)info;
+        return 0;
+    }
+
+
+    int srvTimeoutCB(TimeoutInfo* info)
+    {
+        (void)info;
+        return 0;
+    }
+
+#endif
+
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c
new file mode 100644
index 00000000..ff24d7ed
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c
@@ -0,0 +1,661 @@
+/*shell.c
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+ 
+ /*** tiny Shell for CyaSSL apps ***/
+ 
+ #ifdef HAVE_CONFIG_H
+    #include 
+#endif
+
+#include "cyassl/internal.h"
+#undef RNG
+#include 
+
+#if defined(CYASSL_MDK_ARM)
+    #include 
+    #include 
+    #include 
+        #if defined(CYASSL_MDK5)
+            #include "cmsis_os.h"
+        #include "rl_fs.h" 
+    #else
+            #include 
+        #endif
+    #include "cyassl_MDK_ARM.h"
+#endif
+
+#ifdef CYASSL_KEIL_NET
+#include "cyassl/test.h"
+#else
+typedef struct func_args {
+    int    argc;
+    char** argv;
+    int    return_code;
+} func_args;
+#endif
+
+#ifdef NO_ECHOCLIENT
+#define echoclient_test command_not_found
+#endif
+#ifdef NO_ECHOSERVER
+#define echoserver_test command_not_found
+#endif
+#ifdef NO_SIMPLE_CLIENT
+#define client_test command_not_found
+#endif
+#ifdef NO_SIMPLE_SERVER
+#define server_test command_not_found
+#endif
+#ifdef NO_CRYPT_BENCHMARK
+#define benchmark_test command_not_found
+#endif
+#ifdef NO_CRYPT_TEST
+#define ctaocrypt_test command_not_found
+#endif
+
+#ifndef CYASSL_KEIL_NET
+#define ipaddr_comm command_not_found
+#endif
+
+#if !defined(HAVE_KEIL_RTX)
+#define stack_comm command_not_found
+#endif
+
+
+#if !defined(DEBUG_CYASSL)
+#define dbg_comm command_not_found
+#endif
+
+
+void command_not_found(void *argv) {
+        printf("Command not found\n") ;
+}
+
+extern void echoclient_test(void *args) ;
+extern void echoserver_test(void *args) ;
+extern void benchmark_test(void *args) ;
+extern void ctaocrypt_test(void *args) ;
+extern void client_test(void *args) ;
+extern void server_test(void *args) ;
+extern void kill_task(void *args) ;
+extern void time_main(void *args) ;
+extern void ipaddr_comm(void *args) ;
+extern void stack_comm(void *args) ;
+extern void for_command(void *args) ;
+extern void dbg_comm(void *arg) ;
+extern void help_comm(void *arg) ;
+
+#if !defined(NO_CRYPT_TEST)
+
+#ifndef NO_MD5
+extern void md5_test(void *arg) ;
+#endif
+#ifdef CYASSL_MD2
+extern void md2_test(void *arg) ;
+#endif
+#ifndef NO_MD4
+extern void md4_test(void *arg) ;
+#endif
+
+extern void sha_test(void *arg) ;
+
+#ifndef NO_SHA256
+extern void sha256_test(void *arg) ;
+#endif
+#ifdef CYASSL_SHA384
+extern void sha384_test(void *arg) ;
+#endif
+
+#ifdef CYASSL_SHA512
+extern void sha512_test(void *arg) ;
+#endif
+
+#ifdef CYASSL_RIPEMD
+extern void ripemd_test(void *arg) ;
+#endif
+#ifndef NO_HMAC
+    #ifndef NO_MD5
+extern void hmac_md5_test(void *arg) ;
+    #endif
+extern void hmac_sha_test(void *arg) ;
+
+    #ifndef NO_SHA256
+extern void hmac_sha256_test(void *arg) ;
+    #endif
+
+    #ifdef CYASSL_SHA384
+extern void hmac_sha384_test(void *arg) ;
+    #endif
+#endif
+#ifndef NO_RC4
+extern void arc4_test(void *arg) ;
+#endif
+
+#ifndef NO_HC128
+extern void hc128_test(void *arg) ;
+#endif
+
+#ifndef NO_RABBIT
+extern void rabbit_test(void *arg) ;
+#endif
+
+#ifndef NO_DES3
+extern void des_test(void *arg) ;
+extern void des3_test(void *arg) ;
+#endif
+
+#ifndef NO_AES
+extern void aes_test(void *arg) ;
+#ifdef HAVE_AESGCM
+extern void aesgcm_test(void *arg) ;
+#endif
+
+#ifdef HAVE_AESCCM
+extern void aesccm_test(void *arg) ;
+#endif
+#endif
+
+#ifdef HAVE_CAMELLIA
+extern void camellia_test(void *arg) ;
+#endif
+extern void random_test(void *arg) ;
+
+#ifndef NO_RSA
+extern void rsa_test(void *arg) ;
+#endif
+
+#ifndef NO_DH
+extern void dh_test(void *arg) ;
+#endif
+
+#ifndef NO_DSA
+extern void dsa_test(void *arg) ;
+#endif
+    
+#ifndef NO_PWDBASED
+extern void pwdbased_test(void *arg) ;
+#endif
+
+#ifdef OPENSSL_EXTRA
+extern void openssl_test(void *arg) ;
+#endif
+
+#ifdef HAVE_ECC
+extern void ecc_test(void *arg) ;
+#endif
+
+#endif /* NO_CRYPT_TEST */
+
+static struct {
+  const char *command ;
+    void (*func)(void *args) ;
+}   commandTable[] = {
+    "echoclient", echoclient_test,
+    "echoserver", echoserver_test,
+    "benchmark", benchmark_test,
+    "test", ctaocrypt_test,
+    "client", client_test,
+    "server", server_test,
+    "time", time_main,          /* get/set RTC:  [-d mm/dd/yyyy] [-t hh:mm:ss]*/
+    "ipaddr", ipaddr_comm,      /* TBD */
+    "stack", stack_comm,        /* On/Off check stack size */
+    "for", for_command,         /* iterate next command X times */
+    "debug", dbg_comm,          /* On/Off debug message  */
+    "help", help_comm,          /* Breif description about the commands */
+
+    /** short name **/
+    "ec", echoclient_test,
+    "es", echoserver_test,
+    "bm", benchmark_test,
+    "te", ctaocrypt_test,
+    "cl", client_test,
+    "sv", server_test,
+    "ip", ipaddr_comm,
+    "st", stack_comm,
+  "dbg", dbg_comm,
+    "?",    help_comm,
+
+/*** test suites ****/
+#if !defined(NO_CRYPT_TEST)
+#ifndef NO_MD5
+  "md5",  md5_test,
+#endif
+#ifdef CYASSL_MD2
+  "md2",  md2_test,
+#endif
+#ifndef NO_MD4
+  "md4",  md4_test,
+#endif
+  "sha",  sha_test,
+#ifndef NO_SHA256
+  "sha256",  sha256_test,
+#endif
+#ifdef CYASSL_SHA384
+  "sha384",  sha384_test,
+#endif
+#ifdef CYASSL_SHA512
+  "sha512",  sha512_test,
+#endif
+#ifdef CYASSL_RIPEMD
+  "ripemd",  ripemd_test,
+#endif
+#ifndef NO_HMAC
+  #ifndef NO_MD5
+  "hmac_md5",  hmac_md5_test,
+    #endif
+  "hmac_sha",  hmac_sha_test,
+    #ifndef NO_SHA256
+  "hmac_sha256",  hmac_sha256_test,
+    #endif
+    #ifdef CYASSL_SHA384
+  "hmac_sha384",  hmac_sha384_test,
+  #endif
+#endif
+#ifndef NO_RC4
+    "arc4",  arc4_test,
+#endif
+#ifndef NO_HC128
+  "hc128",  hc128_test,
+#endif
+#ifndef NO_RABBIT
+  "rabbit",  rabbit_test,
+#endif
+#ifndef NO_DES3
+  "des",  des_test,
+  "des3",  des3_test,
+#endif  
+#ifndef NO_AES  
+  "aes",  aes_test,
+    #ifdef HAVE_AESGCM
+  "aesgcm",  aesgcm_test,
+    #endif
+    #ifdef HAVE_AESCCM
+  "aesccm",  aesccm_test,
+    #endif
+#endif
+
+#ifdef HAVE_CAMELLIA
+  "camellia",  camellia_test,
+#endif
+  "random",  random_test,
+#ifndef NO_RSA
+  "rsa",  rsa_test,
+#endif
+#ifndef NO_DH
+  "dh",  dh_test,
+#endif
+#ifndef NO_DSA
+    "dsa",  dsa_test,
+#endif 
+#ifndef NO_PWDBASED
+  "pwdbased",  pwdbased_test,
+#endif  
+#ifdef OPENSSL_EXTRA
+  "openssl",  openssl_test,
+#endif
+#ifdef HAVE_ECC
+  "ecc",  ecc_test,
+#endif
+
+#endif /* NO_CRYPT_TEST */
+
+    "",  NULL
+} ;
+
+enum jobtype { FORGROUND, BACKGROUND }  ;
+
+#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n')
+
+static int BackGround = 0 ; /* 1: background job is running */
+
+/*******  Get Command Line *****************************/
+static int getline(char * line, int sz, func_args *args, int*bf_flg) 
+{
+    char * ret ;
+    int i ;
+    
+    #define MAXARGS 10
+    #define MAXARGLEN 30
+    static char *argv[MAXARGS] ;
+    args->argv = argv ;
+    
+    putchar('>') ;
+    fflush(stdout) ;
+    ret = fgets(line, sz, stdin) ;
+    
+    #define SHELL_ERROR_FGETS -102
+    if(ret != line) return(SHELL_ERROR_FGETS) ;
+    
+    if(line[strlen(line)-2] == '&') {
+        (*bf_flg) = BACKGROUND ;
+        line[strlen(line)-2] = '\n' ;
+    } else {
+        (*bf_flg) = FORGROUND ;
+    }
+    args->argc = 0 ;
+    for(i=0; iargv[args->argc] = &(line[i]) ;
+        while(!IF_DELIMITER(line[i])) i++ ;
+        args->argc++ ;
+        if(line[i] == '\n') {
+            line[i]  = '\0' ;
+            break ;
+        } else {
+            line[i]  = '\0' ;
+        }
+    }
+    return i ;
+}
+
+
+/************* Embedded Shell Commands **********************************/
+#define IP_SIZE 16
+
+#ifdef CYASSL_KEIL_NET
+static void ipaddr_comm(void *args) 
+{
+    if(((func_args *)args)->argc == 1) {
+            printf("IP addr: %s, port %d\n", yasslIP, yasslPort) ;
+    } else {
+        if(BackGround != 0) {
+        printf("Cannot change IP addr while background server is running\n") ;
+        } else if(((func_args *)args)->argc == 3 && 
+                  ((func_args *)args)->argv[1][0] == '-'&& 
+                  ((func_args *)args)->argv[1][1] == 'a' ) {
+/*          strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */
+        } else if(((func_args *)args)->argc == 3 && 
+                  ((func_args *)args)->argv[1][0] == '-' && 
+                  ((func_args *)args)->argv[1][1] == 'p' ) {
+/*          yasslPort = atoi(((func_args *)args)->argv[2]) ; */
+        } else printf("Invalid argument\n") ; 
+    }
+}
+
+#endif
+
+
+
+#if defined(HAVE_KEIL_RTX)
+static int stack_ck = 0 ;
+
+void stack_comm(void *args) 
+{
+    if(stack_ck) {
+        printf("Stack Check: Off\n") ;
+        stack_ck = 0 ;
+    } else {
+        printf("Stack Check: On\n") ;
+        stack_ck = 1 ;
+    }
+}
+    
+#define FILL_PATTERN 0xa596695a
+void stack_fill(char * stack, int size)
+{
+    int i ;
+
+    if(stack_ck == 0)return ;
+    for(i=1; iargc == 1) {
+        printf("For %d times\n", for_iteration) ;
+    } else if( args == NULL || ((func_args *)args)->argc == 2) {
+        for_iteration = atoi(((func_args *)args)->argv[1]) ;
+    } else printf("Invalid argument\n") ;
+}
+
+
+#if defined(DEBUG_CYASSL)
+
+static int CyasslDebug = 1 ;
+
+static void dbg_comm(void *args) 
+{
+    if(CyasslDebug == 1) {
+        CyasslDebug = 0 ;
+        printf("Turning OFF Debug message\n") ;
+        CyaSSL_Debugging_OFF() ;
+    } else {
+        CyasslDebug = 1 ;
+        printf("Turning ON Debug message\n") ;
+        CyaSSL_Debugging_ON() ;
+    }
+}
+#endif
+
+static void help_comm(void *args) 
+{
+    static char *commands[] = {
+        "time [-d mm/dd/yyyy][-t hh:mm:ss]  : set/get time, for cert validation",
+        "test", 
+        "benchmark",
+        "echoserver&            : simple echo server in background mode",
+        "echoclient             : simple echo client followed by any input string, or \"quit\", \"break\"",
+        "server&                : simple server in background mode",
+        "client                 : simple client",
+        "client -g -v [0123] -h xxx.xxx.xxx.xxx -p 443  : usage example",
+        "server/client -h        :  help for server/client command",
+        "help",
+        ""  
+    } ;
+
+    int i ;
+    printf("Commands:\n") ;
+    for(i=0; commands[i][0] ; i++)
+        printf("    %s\n", commands[i]) ;
+
+}
+
+
+
+#define BG_JOB_STACK_SIZE 8000
+#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
+                                                   defined(HAVE_KEIL_RTX)
+#if !defined(CYASSL_CMSIS_RTOS)
+static char bg_job_stack[BG_JOB_STACK_SIZE] ;
+#endif
+
+#endif
+
+#define COMMAND_STACK_SIZE 10000
+#if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
+static char command_stack[COMMAND_STACK_SIZE] ;
+#endif
+
+
+#ifdef  HAVE_KEIL_RTX
+static   CyaSSL_Mutex command_mutex ;
+#endif
+
+void exit_command(void) {
+	  printf("Command Aborted\n") ;
+    #ifdef CYASSL_CMSIS_RTOS
+        osThreadTerminate(osThreadGetId()) ;
+    #else
+        os_tsk_delete_self() ;
+    #endif
+}
+
+
+/***********    Invoke Forground Command  *********************/
+static void command_invoke(void const *args) 
+{
+    void (*func)(void const * ) ;
+    int i,iteration ;
+    
+    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
+    #ifdef  HAVE_KEIL_RTX
+    LockMutex((CyaSSL_Mutex *)&command_mutex) ;
+    #endif
+    iteration = for_iteration ;
+    for(i=0; i< iteration; i++) {
+        if(iteration > 1) printf("--- Start for %d ---->\n", i) ;
+        #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
+        stack_fill(command_stack, COMMAND_STACK_SIZE) ;
+        #endif
+                
+        func(args) ;        /* invoke command */
+                
+        #if defined(HAVE_KEIL_RTX)&& !defined(CYASSL_CMSIS_RTOS)
+        stack_check(command_stack, COMMAND_STACK_SIZE) ;
+        #endif
+    }
+
+    if(iteration > 1) 
+    for_iteration = 1 ;
+    osDelay(20000) ;
+    #ifdef HAVE_KEIL_RTX
+        UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
+        #ifdef CYASSL_CMSIS_RTOS
+            osThreadTerminate(osThreadGetId()) ;
+        #else
+            os_tsk_delete_self() ;
+        #endif
+    #endif
+}
+
+#if defined(HAVE_KEIL_RTX)
+/*******  Invoke Background Job   *******************************/
+static void bg_job_invoke(void const *args) 
+{
+    void (*func)(void const * ) ;
+    BackGround = 1 ; 
+    #if defined(HAVE_KEIL_RTX)&& !defined(CYASSL_CMSIS_RTOS)
+    stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
+    #endif
+
+    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
+    func(args) ;        /* invoke command */
+    #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
+    stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
+    #endif
+    
+    osDelay(20000) ;
+    BackGround = 0 ;
+
+    #ifdef CYASSL_CMSIS_RTOS
+        osThreadTerminate(osThreadGetId()) ;
+    #else   
+        os_tsk_delete_self() ; ;
+    #endif
+}
+#endif
+
+#define LINESIZE 100
+static char line[LINESIZE] ;
+
+#if defined(CYASSL_CMSIS_RTOS)
+    osThreadDef (command_invoke, osPriorityAboveNormal , 1, COMMAND_STACK_SIZE) ;
+    osThreadDef (bg_job_invoke, osPriorityNormal , 1 , BG_JOB_STACK_SIZE) ;
+#endif
+/********* SHEULL MAIN LOOP ***********************************/
+void shell_main(void *arg) {
+    int i ; 
+    func_args args ;
+    int bf_flg ;
+   
+    i = BackGround ; 
+        /* Dummy for avoiding warning: BackGround is defined but not used. */
+    
+ #if defined(HAVE_KEIL_RTX)
+    InitMutex(&command_mutex) ;
+#endif
+    time_main(NULL) ;
+    help_comm(NULL) ;
+    
+    printf("Starting Shell\n") ;
+    while(1) {
+        if(getline(line,  LINESIZE, &args, &bf_flg) > 0) {
+        for(i=0; commandTable[i].func != NULL; i++) {
+            if(strcmp(commandTable[i].command, args.argv[0]) == 0) {
+            args.argv[0] = (char *) commandTable[i].func ;
+                if(bf_flg == FORGROUND) {
+                    #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
+                        UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
+                        os_tsk_create_user_ex( (void(*)(void *))&command_invoke, 7,
+                             command_stack, COMMAND_STACK_SIZE, &args) ;
+                                      #else
+                                            #if defined(CYASSL_CMSIS_RTOS)
+                                UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
+                          osThreadCreate (osThread (command_invoke) , &args);   
+                          #else
+                          command_invoke(&args) ;
+                                            #endif
+                    #endif
+                    #ifdef  HAVE_KEIL_RTX
+                    LockMutex((CyaSSL_Mutex *)&command_mutex) ;
+                    #endif
+                } else {
+                    #if (!defined(NO_SIMPLE_SERVER) && \
+                         !defined(NO_ECHOSERVER)) && \
+                         defined(HAVE_KEIL_RTX)
+                    if(BackGround != 0) {
+                        printf("Multiple background servers not supported.\n") ;
+                    } else {
+                        printf("\"%s\" is running with the background mode.\n", 
+                                                     commandTable[i].command) ;
+                        #if  defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
+                             os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, 
+                                   6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
+                        #else
+                                osThreadCreate (osThread (bg_job_invoke),  &args); 
+                                osDelay (500) ;
+                        #endif
+                    }
+                    #else
+                    printf("Invalid Command: no background job\n") ;
+                    #endif
+                }
+                break ;
+            }
+        }
+        if(commandTable[i].func == NULL)
+            printf("Command not found\n") ;
+        }
+    }
+}
+
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c
new file mode 100644
index 00000000..9c0201a6
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c
@@ -0,0 +1,3393 @@
+/* test.c
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+
+#ifdef HAVE_CONFIG_H
+    #include 
+#endif
+
+#include 
+
+#ifndef NO_CRYPT_TEST
+
+#ifdef CYASSL_TEST_CERT
+    #include 
+#else
+    #include 
+#endif
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef HAVE_ECC
+    #include 
+#endif    
+#ifdef HAVE_BLAKE2
+    #include 
+#endif    
+#ifdef HAVE_LIBZ
+    #include 
+#endif
+
+#ifdef _MSC_VER
+    /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */
+    #pragma warning(disable: 4996)
+#endif
+
+#ifdef OPENSSL_EXTRA
+    #include 
+    #include 
+    #include 
+    #include 
+#endif
+
+#if defined(CYASSL_MDK_ARM)
+        #include 
+        #include 
+    extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ;
+    #define fopen CyaSSL_fopen
+#endif
+
+#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048)
+    /* include test cert and key buffers for use with NO_FILESYSTEM */
+    #if defined(CYASSL_MDK_ARM) && !defined(SINGLE_THREADED)
+        #include "cert_data.h" 
+                        /* use certs_test.c for initial data, so other 
+                                               commands can share the data. */
+    #else
+        #include 
+    #endif
+#endif
+
+#ifdef HAVE_NTRU
+    #include "crypto_ntru.h"
+#endif
+#ifdef HAVE_CAVIUM
+    #include "cavium_sysdep.h"
+    #include "cavium_common.h"
+    #include "cavium_ioctl.h"
+#endif
+
+#ifdef FREESCALE_MQX
+    #include 
+    #include 
+#else
+    #include 
+#endif
+
+
+#ifdef THREADX
+    /* since just testing, use THREADX log printf instead */
+    int dc_log_printf(char*, ...);
+        #undef printf
+        #define printf dc_log_printf
+#endif
+
+#include "ctaocrypt/test/test.h"
+
+
+typedef struct testVector {
+    const char*  input;
+    const char*  output; 
+    size_t inLen;
+    size_t outLen;
+} testVector;
+
+int  md2_test(void);
+int  md5_test(void);
+int  md4_test(void);
+int  sha_test(void);
+int  sha256_test(void);
+int  sha512_test(void);
+int  sha384_test(void);
+int  hmac_md5_test(void);
+int  hmac_sha_test(void);
+int  hmac_sha256_test(void);
+int  hmac_sha384_test(void);
+int  hmac_sha512_test(void);
+int  arc4_test(void);
+int  hc128_test(void);
+int  rabbit_test(void);
+int  des_test(void);
+int  des3_test(void);
+int  aes_test(void);
+int  aesgcm_test(void);
+int  aesccm_test(void);
+int  camellia_test(void);
+int  rsa_test(void);
+int  dh_test(void);
+int  dsa_test(void);
+int  random_test(void);
+int  pwdbased_test(void);
+int  ripemd_test(void);
+int  openssl_test(void);   /* test mini api */
+int pbkdf1_test(void);
+int pkcs12_test(void);
+int pbkdf2_test(void);
+#ifdef HAVE_ECC
+    int  ecc_test(void);
+#endif
+#ifdef HAVE_BLAKE2
+    int  blake2b_test(void);
+#endif
+#ifdef HAVE_LIBZ
+    int compress_test(void);
+#endif
+
+
+
+static void err_sys(const char* msg, int es)
+{
+    printf("%s error = %d\n", msg, es);
+    #if !defined(THREADX) && !defined(CYASSL_MDK_ARM)
+    if (msg)
+        exit(es);
+    #endif
+    return;
+}
+
+/* func_args from test.h, so don't have to pull in other junk */
+typedef struct func_args {
+    int    argc;
+    char** argv;
+    int    return_code;
+} func_args;
+
+
+
+void ctaocrypt_test(void* args)
+{
+    int ret = 0;
+
+    ((func_args*)args)->return_code = -1; /* error state */
+
+#if !defined(NO_BIG_INT)
+    if (CheckCtcSettings() != 1)
+        err_sys("Build vs runtime math mismatch\n", -1234);
+
+#ifdef USE_FAST_MATH
+    if (CheckFastMathSettings() != 1)
+        err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235);
+#endif /* USE_FAST_MATH */
+#endif /* !NO_BIG_INT */
+
+
+#ifndef NO_MD5
+    if ( (ret = md5_test()) != 0) 
+        err_sys("MD5      test failed!\n", ret);
+    else
+        printf( "MD5      test passed!\n");
+#endif
+
+#ifdef CYASSL_MD2
+    if ( (ret = md2_test()) != 0) 
+        err_sys("MD2      test failed!\n", ret);
+    else
+        printf( "MD2      test passed!\n");
+#endif
+
+#ifndef NO_MD4
+    if ( (ret = md4_test()) != 0) 
+        err_sys("MD4      test failed!\n", ret);
+    else
+        printf( "MD4      test passed!\n");
+#endif
+
+#ifndef NO_SHA
+    if ( (ret = sha_test()) != 0) 
+        err_sys("SHA      test failed!\n", ret);
+    else
+        printf( "SHA      test passed!\n");
+#endif
+
+#ifndef NO_SHA256
+    if ( (ret = sha256_test()) != 0) 
+        err_sys("SHA-256  test failed!\n", ret);
+    else
+        printf( "SHA-256  test passed!\n");
+#endif
+
+#ifdef CYASSL_SHA384
+    if ( (ret = sha384_test()) != 0) 
+        err_sys("SHA-384  test failed!\n", ret);
+    else
+        printf( "SHA-384  test passed!\n");
+#endif
+
+#ifdef CYASSL_SHA512
+    if ( (ret = sha512_test()) != 0) 
+        err_sys("SHA-512  test failed!\n", ret);
+    else
+        printf( "SHA-512  test passed!\n");
+#endif
+
+#ifdef CYASSL_RIPEMD
+    if ( (ret = ripemd_test()) != 0) 
+        err_sys("RIPEMD   test failed!\n", ret);
+    else
+        printf( "RIPEMD   test passed!\n");
+#endif
+
+#ifdef HAVE_BLAKE2 
+    if ( (ret = blake2b_test()) != 0) 
+        err_sys("BLAKE2b  test failed!\n", ret);
+    else
+        printf( "BLAKE2b  test passed!\n");
+#endif
+
+#ifndef NO_HMAC
+    #ifndef NO_MD5
+        if ( (ret = hmac_md5_test()) != 0) 
+            err_sys("HMAC-MD5 test failed!\n", ret);
+        else
+            printf( "HMAC-MD5 test passed!\n");
+    #endif
+
+    #ifndef NO_SHA
+    if ( (ret = hmac_sha_test()) != 0) 
+        err_sys("HMAC-SHA test failed!\n", ret);
+    else
+        printf( "HMAC-SHA test passed!\n");
+    #endif
+
+    #ifndef NO_SHA256
+        if ( (ret = hmac_sha256_test()) != 0) 
+            err_sys("HMAC-SHA256 test failed!\n", ret);
+        else
+            printf( "HMAC-SHA256 test passed!\n");
+    #endif
+
+    #ifdef CYASSL_SHA384
+        if ( (ret = hmac_sha384_test()) != 0) 
+            err_sys("HMAC-SHA384 test failed!\n", ret);
+        else
+            printf( "HMAC-SHA384 test passed!\n");
+    #endif
+
+    #ifdef CYASSL_SHA512
+        if ( (ret = hmac_sha512_test()) != 0) 
+            err_sys("HMAC-SHA512 test failed!\n", ret);
+        else
+            printf( "HMAC-SHA512 test passed!\n");
+    #endif
+
+#endif
+
+#ifndef NO_RC4
+    if ( (ret = arc4_test()) != 0)
+        err_sys("ARC4     test failed!\n", ret);
+    else
+        printf( "ARC4     test passed!\n");
+#endif
+
+#ifndef HAVE_HC128
+    if ( (ret = hc128_test()) != 0)
+        err_sys("HC-128   test failed!\n", ret);
+    else
+        printf( "HC-128   test passed!\n");
+#endif
+
+#ifndef NO_RABBIT
+    if ( (ret = rabbit_test()) != 0)
+        err_sys("Rabbit   test failed!\n", ret);
+    else
+        printf( "Rabbit   test passed!\n");
+#endif
+
+#ifndef NO_DES3
+    if ( (ret = des_test()) != 0)
+        err_sys("DES      test failed!\n", ret);
+    else
+        printf( "DES      test passed!\n");
+#endif
+
+#ifndef NO_DES3
+    if ( (ret = des3_test()) != 0)
+        err_sys("DES3     test failed!\n", ret);
+    else
+        printf( "DES3     test passed!\n");
+#endif
+
+#ifndef NO_AES
+    if ( (ret = aes_test()) != 0)
+        err_sys("AES      test failed!\n", ret);
+    else
+        printf( "AES      test passed!\n");
+
+#ifdef HAVE_AESGCM
+    if ( (ret = aesgcm_test()) != 0)
+        err_sys("AES-GCM  test failed!\n", ret);
+    else
+        printf( "AES-GCM  test passed!\n");
+#endif
+
+#ifdef HAVE_AESCCM
+    if ( (ret = aesccm_test()) != 0)
+        err_sys("AES-CCM  test failed!\n", ret);
+    else
+        printf( "AES-CCM  test passed!\n");
+#endif
+#endif
+
+#ifdef HAVE_CAMELLIA
+    if ( (ret = camellia_test()) != 0)
+        err_sys("CAMELLIA test failed!\n", ret);
+    else
+        printf( "CAMELLIA test passed!\n");
+#endif
+
+    if ( (ret = random_test()) != 0)
+        err_sys("RANDOM   test failed!\n", ret);
+    else
+        printf( "RANDOM   test passed!\n");
+
+#ifndef NO_RSA
+    if ( (ret = rsa_test()) != 0) 
+        err_sys("RSA      test failed!\n", ret);
+    else
+        printf( "RSA      test passed!\n");
+#endif
+
+#ifndef NO_DH
+    if ( (ret = dh_test()) != 0) 
+        err_sys("DH       test failed!\n", ret);
+    else
+        printf( "DH       test passed!\n");
+#endif
+
+#ifndef NO_DSA
+    if ( (ret = dsa_test()) != 0) 
+        err_sys("DSA      test failed!\n", ret);
+    else
+        printf( "DSA      test passed!\n");
+#endif
+    
+#ifndef NO_PWDBASED
+    if ( (ret = pwdbased_test()) != 0) 
+        err_sys("PWDBASED test failed!\n", ret);
+    else
+        printf( "PWDBASED test passed!\n");
+#endif
+    
+#ifdef OPENSSL_EXTRA
+    if ( (ret = openssl_test()) != 0) 
+        err_sys("OPENSSL  test failed!\n", ret);
+    else
+        printf( "OPENSSL  test passed!\n");
+#endif
+
+#ifdef HAVE_ECC
+    if ( (ret = ecc_test()) != 0) 
+        err_sys("ECC      test failed!\n", ret);
+    else
+        printf( "ECC      test passed!\n");
+#endif
+
+#ifdef HAVE_LIBZ
+    if ( (ret = compress_test()) != 0) 
+        err_sys("COMPRESS test failed!\n", ret);
+    else
+        printf( "COMPRESS test passed!\n");
+#endif
+
+    ((func_args*)args)->return_code = ret;
+}
+
+
+#ifndef NO_MAIN_DRIVER
+
+#ifdef HAVE_CAVIUM
+
+static int OpenNitroxDevice(int dma_mode,int dev_id)
+{
+   Csp1CoreAssignment core_assign;
+   Uint32             device;
+
+   if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID))
+      return -1;
+   if (Csp1GetDevType(&device))
+      return -1;
+   if (device != NPX_DEVICE) {
+      if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT,
+                (Uint32 *)&core_assign)!= 0)
+         return -1;
+   }
+   CspShutdown(CAVIUM_DEV_ID);
+
+   return CspInitialize(dma_mode, dev_id);
+}
+
+#endif /* HAVE_CAVIUM */
+
+    /* so overall tests can pull in test function */
+
+    int main(int argc, char** argv)
+    {
+
+        func_args args;
+
+            
+#ifdef HAVE_CAVIUM
+        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
+        if (ret != 0)
+            err_sys("Cavium OpenNitroxDevice failed", -1236);
+#endif /* HAVE_CAVIUM */
+
+        args.argc = argc;
+        args.argv = argv;
+
+        ctaocrypt_test(&args);
+
+#ifdef HAVE_CAVIUM
+        CspShutdown(CAVIUM_DEV_ID);
+#endif
+                
+        return args.return_code;
+    }
+
+#endif /* NO_MAIN_DRIVER */
+
+
+#ifdef CYASSL_MD2
+int md2_test()
+{
+    Md2  md2;
+    byte hash[MD2_DIGEST_SIZE];
+
+    testVector a, b, c, d, e, f, g;
+    testVector test_md2[7];
+    int times = sizeof(test_md2) / sizeof(testVector), i;
+
+    a.input  = "";
+    a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69"
+               "\x27\x73";
+    a.inLen  = strlen(a.input);
+    a.outLen = MD2_DIGEST_SIZE;
+
+    b.input  = "a";
+    b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0"
+               "\xb5\xd1";
+    b.inLen  = strlen(b.input);
+    b.outLen = MD2_DIGEST_SIZE;
+
+    c.input  = "abc";
+    c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde"
+               "\xd6\xbb";
+    c.inLen  = strlen(c.input);
+    c.outLen = MD2_DIGEST_SIZE;
+
+    d.input  = "message digest";
+    d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe"
+               "\x06\xb0";
+    d.inLen  = strlen(d.input);
+    d.outLen = MD2_DIGEST_SIZE;
+
+    e.input  = "abcdefghijklmnopqrstuvwxyz";
+    e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47"
+               "\x94\x0b";
+    e.inLen  = strlen(e.input);
+    e.outLen = MD2_DIGEST_SIZE;
+
+    f.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
+               "6789";
+    f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03"
+               "\x38\xcd";
+    f.inLen  = strlen(f.input);
+    f.outLen = MD2_DIGEST_SIZE;
+
+    g.input  = "1234567890123456789012345678901234567890123456789012345678"
+               "9012345678901234567890";
+    g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3"
+               "\xef\xd8";
+    g.inLen  = strlen(g.input);
+    g.outLen = MD2_DIGEST_SIZE;
+
+    test_md2[0] = a;
+    test_md2[1] = b;
+    test_md2[2] = c;
+    test_md2[3] = d;
+    test_md2[4] = e;
+    test_md2[5] = f;
+    test_md2[6] = g;
+
+    InitMd2(&md2);
+
+    for (i = 0; i < times; ++i) {
+        Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen);
+        Md2Final(&md2, hash);
+
+        if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0)
+            return -155 - i;
+    }
+
+    return 0;
+}
+#endif 
+
+#ifndef NO_MD5
+int md5_test(void)
+{
+    Md5  md5;
+    byte hash[MD5_DIGEST_SIZE];
+
+    testVector a, b, c, d, e;
+    testVector test_md5[5];
+    int times = sizeof(test_md5) / sizeof(testVector), i;
+
+    a.input  = "abc";
+    a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f"
+               "\x72";
+    a.inLen  = strlen(a.input);
+    a.outLen = MD5_DIGEST_SIZE;
+
+    b.input  = "message digest";
+    b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61"
+               "\xd0";
+    b.inLen  = strlen(b.input);
+    b.outLen = MD5_DIGEST_SIZE;
+
+    c.input  = "abcdefghijklmnopqrstuvwxyz";
+    c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1"
+               "\x3b";
+    c.inLen  = strlen(c.input);
+    c.outLen = MD5_DIGEST_SIZE; 
+
+    d.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
+               "6789";
+    d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d"
+               "\x9f";
+    d.inLen  = strlen(d.input);
+    d.outLen = MD5_DIGEST_SIZE; 
+
+    e.input  = "1234567890123456789012345678901234567890123456789012345678"
+               "9012345678901234567890";
+    e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6"
+               "\x7a";
+    e.inLen  = strlen(e.input);
+    e.outLen = MD5_DIGEST_SIZE; 
+
+    test_md5[0] = a;
+    test_md5[1] = b;
+    test_md5[2] = c;
+    test_md5[3] = d;
+    test_md5[4] = e;
+
+    InitMd5(&md5);
+
+    for (i = 0; i < times; ++i) {
+        Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen);
+        Md5Final(&md5, hash);
+
+        if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0)
+            return -5 - i;
+    }
+
+    return 0;
+}
+#endif /* NO_MD5 */
+
+
+#ifndef NO_MD4
+
+int md4_test(void)
+{
+    Md4  md4;
+    byte hash[MD4_DIGEST_SIZE];
+
+    testVector a, b, c, d, e, f, g;
+    testVector test_md4[7];
+    int times = sizeof(test_md4) / sizeof(testVector), i;
+
+    a.input  = "";
+    a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" 
+               "\xc0";
+    a.inLen  = strlen(a.input);
+    a.outLen = MD4_DIGEST_SIZE;
+
+    b.input  = "a";
+    b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" 
+               "\x24";
+    b.inLen  = strlen(b.input);
+    b.outLen = MD4_DIGEST_SIZE; 
+
+    c.input  = "abc";
+    c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" 
+               "\x9d";
+    c.inLen  = strlen(c.input);
+    c.outLen = MD4_DIGEST_SIZE;
+
+    d.input  = "message digest";
+    d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" 
+               "\x4b";
+    d.inLen  = strlen(d.input);
+    d.outLen = MD4_DIGEST_SIZE;
+
+    e.input  = "abcdefghijklmnopqrstuvwxyz";
+    e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" 
+               "\xa9";
+    e.inLen  = strlen(e.input);
+    e.outLen = MD4_DIGEST_SIZE;
+
+    f.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
+               "6789";
+    f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" 
+               "\xe4";
+    f.inLen  = strlen(f.input);
+    f.outLen = MD4_DIGEST_SIZE;
+
+    g.input  = "1234567890123456789012345678901234567890123456789012345678"
+               "9012345678901234567890";
+    g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" 
+               "\x36";
+    g.inLen  = strlen(g.input);
+    g.outLen = MD4_DIGEST_SIZE;
+
+    test_md4[0] = a;
+    test_md4[1] = b;
+    test_md4[2] = c;
+    test_md4[3] = d;
+    test_md4[4] = e;
+    test_md4[5] = f;
+    test_md4[6] = g;
+
+    InitMd4(&md4);
+
+    for (i = 0; i < times; ++i) {
+        Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen);
+        Md4Final(&md4, hash);
+
+        if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0)
+            return -205 - i;
+    }
+
+    return 0;
+}
+
+#endif /* NO_MD4 */
+
+#ifndef NO_SHA
+
+int sha_test(void)
+{
+    Sha  sha;
+    byte hash[SHA_DIGEST_SIZE];
+
+    testVector a, b, c, d;
+    testVector test_sha[4];
+    int times = sizeof(test_sha) / sizeof(struct testVector), i;
+
+    a.input  = "abc";
+    a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2"
+               "\x6C\x9C\xD0\xD8\x9D";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA_DIGEST_SIZE;
+
+    b.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
+    b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29"
+               "\xE5\xE5\x46\x70\xF1";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA_DIGEST_SIZE;
+
+    c.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+               "aaaaaa";
+    c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44"
+               "\x2A\x25\xEC\x64\x4D";
+    c.inLen  = strlen(c.input);
+    c.outLen = SHA_DIGEST_SIZE; 
+
+    d.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+               "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+               "aaaaaaaaaa";
+    d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7"
+               "\x53\x99\x5E\x26\xA0";
+    d.inLen  = strlen(d.input);
+    d.outLen = SHA_DIGEST_SIZE;
+
+    test_sha[0] = a;
+    test_sha[1] = b;
+    test_sha[2] = c;
+    test_sha[3] = d;
+
+    InitSha(&sha);
+
+    for (i = 0; i < times; ++i) {
+        ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen);
+        ShaFinal(&sha, hash);
+
+        if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0)
+            return -10 - i;
+    }
+
+    return 0;
+}
+
+#endif /* NO_SHA */
+
+#ifdef CYASSL_RIPEMD
+int ripemd_test(void)
+{
+    RipeMd  ripemd;
+    byte hash[RIPEMD_DIGEST_SIZE];
+
+    testVector a, b, c, d;
+    testVector test_ripemd[4];
+    int times = sizeof(test_ripemd) / sizeof(struct testVector), i;
+
+    a.input  = "abc";
+    a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6"
+               "\xb0\x87\xf1\x5a\x0b\xfc";
+    a.inLen  = strlen(a.input);
+    a.outLen = RIPEMD_DIGEST_SIZE;
+
+    b.input  = "message digest";
+    b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8"
+               "\x5f\xfa\x21\x59\x5f\x36";
+    b.inLen  = strlen(b.input);
+    b.outLen = RIPEMD_DIGEST_SIZE;
+
+    c.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; 
+    c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc"
+               "\xf4\x9a\xda\x62\xeb\x2b";
+    c.inLen  = strlen(c.input);
+    c.outLen = RIPEMD_DIGEST_SIZE;
+
+    d.input  = "12345678901234567890123456789012345678901234567890123456"
+               "789012345678901234567890";
+    d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab"
+               "\x82\xbf\x63\x32\x6b\xfb"; 
+    d.inLen  = strlen(d.input);
+    d.outLen = RIPEMD_DIGEST_SIZE;
+
+    test_ripemd[0] = a;
+    test_ripemd[1] = b;
+    test_ripemd[2] = c;
+    test_ripemd[3] = d;
+
+    InitRipeMd(&ripemd);
+
+    for (i = 0; i < times; ++i) {
+        RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input,
+                     (word32)test_ripemd[i].inLen);
+        RipeMdFinal(&ripemd, hash);
+
+        if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0)
+            return -10 - i;
+    }
+
+    return 0;
+}
+#endif /* CYASSL_RIPEMD */
+
+
+#ifdef HAVE_BLAKE2
+
+
+#define BLAKE2_TESTS 3
+
+static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] =
+{
+  {
+    0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03,
+    0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72,
+    0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61,
+    0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19,
+    0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53,
+    0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B,
+    0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55,
+    0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE
+  },
+  {
+    0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95,
+    0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7,
+    0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44,
+    0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C,
+    0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB,
+    0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4,
+    0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48,
+    0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B
+  },
+  {
+    0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9,
+    0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72,
+    0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF,
+    0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15,
+    0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB,
+    0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04,
+    0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1,
+    0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5
+  }
+};
+
+
+
+int blake2b_test(void)
+{
+    Blake2b b2b;
+    byte    digest[64];
+    byte    input[64];
+    int     i;
+
+    for (i = 0; i < (int)sizeof(input); i++)
+        input[i] = (byte)i;
+
+    for (i = 0; i < BLAKE2_TESTS; i++) {
+        InitBlake2b(&b2b, 64);
+        Blake2bUpdate(&b2b, input, i);
+        Blake2bFinal(&b2b, digest, 64);
+
+        if (memcmp(digest, blake2b_vec[i], 64) != 0) {
+            return -300 - i;
+        }
+    }
+
+    return 0;
+}
+#endif /* HAVE_BLAKE2 */
+
+
+#ifndef NO_SHA256
+int sha256_test(void)
+{
+    Sha256 sha;
+    byte   hash[SHA256_DIGEST_SIZE];
+
+    testVector a, b;
+    testVector test_sha[2];
+    int times = sizeof(test_sha) / sizeof(struct testVector), i;
+
+    a.input  = "abc";
+    a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22"
+               "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00"
+               "\x15\xAD";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA256_DIGEST_SIZE;
+
+    b.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
+    b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
+               "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
+               "\x06\xC1";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA256_DIGEST_SIZE;
+
+    test_sha[0] = a;
+    test_sha[1] = b;
+
+    InitSha256(&sha);
+
+    for (i = 0; i < times; ++i) {
+        Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
+        Sha256Final(&sha, hash);
+
+        if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0)
+            return -10 - i;
+    }
+
+    return 0;
+}
+#endif
+
+
+#ifdef CYASSL_SHA512
+int sha512_test(void)
+{
+    Sha512 sha;
+    byte   hash[SHA512_DIGEST_SIZE];
+
+    testVector a, b;
+    testVector test_sha[2];
+    int times = sizeof(test_sha) / sizeof(struct testVector), i;
+
+    a.input  = "abc";
+    a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41"
+               "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55"
+               "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3"
+               "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f"
+               "\xa5\x4c\xa4\x9f";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA512_DIGEST_SIZE;
+
+    b.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
+    b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
+               "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
+               "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
+               "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
+               "\x87\x4b\xe9\x09"; 
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA512_DIGEST_SIZE;
+
+    test_sha[0] = a;
+    test_sha[1] = b;
+
+    InitSha512(&sha);
+
+    for (i = 0; i < times; ++i) {
+        Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
+        Sha512Final(&sha, hash);
+
+        if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0)
+            return -10 - i;
+    }
+
+    return 0;
+}
+#endif
+
+
+#ifdef CYASSL_SHA384
+int sha384_test(void)
+{
+    Sha384 sha;
+    byte   hash[SHA384_DIGEST_SIZE];
+
+    testVector a, b;
+    testVector test_sha[2];
+    int times = sizeof(test_sha) / sizeof(struct testVector), i;
+
+    a.input  = "abc";
+    a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50"
+               "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff"
+               "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34"
+               "\xc8\x25\xa7";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA384_DIGEST_SIZE;
+
+    b.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
+    b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
+               "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
+               "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
+               "\x74\x60\x39";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA384_DIGEST_SIZE; 
+
+    test_sha[0] = a;
+    test_sha[1] = b;
+
+    InitSha384(&sha);
+
+    for (i = 0; i < times; ++i) {
+        Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
+        Sha384Final(&sha, hash);
+
+        if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0)
+            return -10 - i;
+    }
+
+    return 0;
+}
+#endif /* CYASSL_SHA384 */
+
+
+#if !defined(NO_HMAC) && !defined(NO_MD5)
+int hmac_md5_test(void)
+{
+    Hmac hmac;
+    byte hash[MD5_DIGEST_SIZE];
+
+    const char* keys[]=
+    {
+        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+        "Jefe",
+        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
+    };
+
+    testVector a, b, c;
+    testVector test_hmac[3];
+
+    int times = sizeof(test_hmac) / sizeof(testVector), i;
+
+    a.input  = "Hi There";
+    a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc"
+               "\x9d";
+    a.inLen  = strlen(a.input);
+    a.outLen = MD5_DIGEST_SIZE;
+
+    b.input  = "what do ya want for nothing?";
+    b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7"
+               "\x38";
+    b.inLen  = strlen(b.input);
+    b.outLen = MD5_DIGEST_SIZE;
+
+    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD";
+    c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3"
+               "\xf6";
+    c.inLen  = strlen(c.input);
+    c.outLen = MD5_DIGEST_SIZE;
+
+    test_hmac[0] = a;
+    test_hmac[1] = b;
+    test_hmac[2] = c;
+
+    for (i = 0; i < times; ++i) {
+#ifdef HAVE_CAVIUM
+        if (i == 1)
+            continue; /* driver can't handle keys <= bytes */
+        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
+            return -20009; 
+#endif
+        HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i]));
+        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
+                   (word32)test_hmac[i].inLen);
+        HmacFinal(&hmac, hash);
+
+        if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0)
+            return -20 - i;
+#ifdef HAVE_CAVIUM
+        HmacFreeCavium(&hmac);
+#endif
+    }
+
+    return 0;
+}
+#endif /* NO_HMAC && NO_MD5 */
+
+#if !defined(NO_HMAC) && !defined(NO_SHA)
+int hmac_sha_test(void)
+{
+    Hmac hmac;
+    byte hash[SHA_DIGEST_SIZE];
+
+    const char* keys[]=
+    {
+        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+                                                                "\x0b\x0b\x0b",
+        "Jefe",
+        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
+                                                                "\xAA\xAA\xAA"
+    };
+
+    testVector a, b, c;
+    testVector test_hmac[3];
+
+    int times = sizeof(test_hmac) / sizeof(testVector), i;
+
+    a.input  = "Hi There";
+    a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c"
+               "\x8e\xf1\x46\xbe\x00";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA_DIGEST_SIZE;
+
+    b.input  = "what do ya want for nothing?";
+    b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf"
+               "\x9c\x25\x9a\x7c\x79";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA_DIGEST_SIZE;
+
+    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD";
+    c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b"
+               "\x4f\x63\xf1\x75\xd3";
+    c.inLen  = strlen(c.input);
+    c.outLen = SHA_DIGEST_SIZE;
+
+    test_hmac[0] = a;
+    test_hmac[1] = b;
+    test_hmac[2] = c;
+
+    for (i = 0; i < times; ++i) {
+#ifdef HAVE_CAVIUM
+        if (i == 1)
+            continue; /* driver can't handle keys <= bytes */
+        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
+            return -20010; 
+#endif
+        HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i]));
+        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
+                   (word32)test_hmac[i].inLen);
+        HmacFinal(&hmac, hash);
+
+        if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0)
+            return -20 - i;
+#ifdef HAVE_CAVIUM
+        HmacFreeCavium(&hmac);
+#endif
+    }
+
+    return 0;
+}
+#endif
+
+
+#if !defined(NO_HMAC) && !defined(NO_SHA256)
+int hmac_sha256_test(void)
+{
+    Hmac hmac;
+    byte hash[SHA256_DIGEST_SIZE];
+
+    const char* keys[]=
+    {
+        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+                                                                "\x0b\x0b\x0b",
+        "Jefe",
+        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
+                                                                "\xAA\xAA\xAA"
+    };
+
+    testVector a, b, c;
+    testVector test_hmac[3];
+
+    int times = sizeof(test_hmac) / sizeof(testVector), i;
+
+    a.input  = "Hi There";
+    a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1"
+               "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32"
+               "\xcf\xf7";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA256_DIGEST_SIZE;
+
+    b.input  = "what do ya want for nothing?";
+    b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75"
+               "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec"
+               "\x38\x43";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA256_DIGEST_SIZE;
+
+    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD";
+    c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81"
+               "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5"
+               "\x65\xfe";
+    c.inLen  = strlen(c.input);
+    c.outLen = SHA256_DIGEST_SIZE;
+
+    test_hmac[0] = a;
+    test_hmac[1] = b;
+    test_hmac[2] = c;
+
+    for (i = 0; i < times; ++i) {
+#ifdef HAVE_CAVIUM
+        if (i == 1)
+            continue; /* driver can't handle keys <= bytes */
+        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
+            return -20011; 
+#endif
+        HmacSetKey(&hmac, SHA256, (byte*)keys[i], (word32)strlen(keys[i]));
+        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
+                   (word32)test_hmac[i].inLen);
+        HmacFinal(&hmac, hash);
+
+        if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0)
+            return -20 - i;
+#ifdef HAVE_CAVIUM
+        HmacFreeCavium(&hmac);
+#endif
+    }
+
+    return 0;
+}
+#endif
+
+
+#if !defined(NO_HMAC) && defined(CYASSL_SHA384)
+int hmac_sha384_test(void)
+{
+    Hmac hmac;
+    byte hash[SHA384_DIGEST_SIZE];
+
+    const char* keys[]=
+    {
+        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+                                                                "\x0b\x0b\x0b",
+        "Jefe",
+        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
+                                                                "\xAA\xAA\xAA"
+    };
+
+    testVector a, b, c;
+    testVector test_hmac[3];
+
+    int times = sizeof(test_hmac) / sizeof(testVector), i;
+
+    a.input  = "Hi There";
+    a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90"
+               "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb"
+               "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2"
+               "\xfa\x9c\xb6";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA384_DIGEST_SIZE;
+
+    b.input  = "what do ya want for nothing?";
+    b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b"
+               "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22"
+               "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa"
+               "\xb2\x16\x49";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA384_DIGEST_SIZE;
+
+    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD";
+    c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8"
+               "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66"
+               "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01"
+               "\xa3\x4f\x27";
+    c.inLen  = strlen(c.input);
+    c.outLen = SHA384_DIGEST_SIZE;
+
+    test_hmac[0] = a;
+    test_hmac[1] = b;
+    test_hmac[2] = c;
+
+    for (i = 0; i < times; ++i) {
+        HmacSetKey(&hmac, SHA384, (byte*)keys[i], (word32)strlen(keys[i]));
+        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
+                   (word32)test_hmac[i].inLen);
+        HmacFinal(&hmac, hash);
+
+        if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0)
+            return -20 - i;
+    }
+
+    return 0;
+}
+#endif
+
+
+#if !defined(NO_HMAC) && defined(CYASSL_SHA512)
+int hmac_sha512_test(void)
+{
+    Hmac hmac;
+    byte hash[SHA512_DIGEST_SIZE];
+
+    const char* keys[]=
+    {
+        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+                                                                "\x0b\x0b\x0b",
+        "Jefe",
+        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
+                                                                "\xAA\xAA\xAA"
+    };
+
+    testVector a, b, c;
+    testVector test_hmac[3];
+
+    int times = sizeof(test_hmac) / sizeof(testVector), i;
+
+    a.input  = "Hi There";
+    a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c"
+               "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1"
+               "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae"
+               "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20"
+               "\x3a\x12\x68\x54";
+    a.inLen  = strlen(a.input);
+    a.outLen = SHA512_DIGEST_SIZE;
+
+    b.input  = "what do ya want for nothing?";
+    b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0"
+               "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25"
+               "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8"
+               "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a"
+               "\x38\xbc\xe7\x37";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA512_DIGEST_SIZE;
+
+    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+               "\xDD\xDD\xDD\xDD\xDD\xDD";
+    c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b"
+               "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27"
+               "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e"
+               "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59"
+               "\xe1\x32\x92\xfb";
+    c.inLen  = strlen(c.input);
+    c.outLen = SHA512_DIGEST_SIZE;
+
+    test_hmac[0] = a;
+    test_hmac[1] = b;
+    test_hmac[2] = c;
+
+    for (i = 0; i < times; ++i) {
+        HmacSetKey(&hmac, SHA512, (byte*)keys[i], (word32)strlen(keys[i]));
+        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
+                   (word32)test_hmac[i].inLen);
+        HmacFinal(&hmac, hash);
+
+        if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0)
+            return -20 - i;
+    }
+
+    return 0;
+}
+#endif
+
+
+#ifndef NO_RC4
+int arc4_test(void)
+{
+    byte cipher[16];
+    byte plain[16];
+
+    const char* keys[] = 
+    {           
+        "\x01\x23\x45\x67\x89\xab\xcd\xef",
+        "\x01\x23\x45\x67\x89\xab\xcd\xef",
+        "\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\xef\x01\x23\x45"
+    };
+
+    testVector a, b, c, d;
+    testVector test_arc4[4];
+
+    int times = sizeof(test_arc4) / sizeof(testVector), i;
+
+    a.input  = "\x01\x23\x45\x67\x89\xab\xcd\xef";
+    a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96";
+    a.inLen  = 8;
+    a.outLen = 8;
+
+    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79";
+    b.inLen  = 8;
+    b.outLen = 8;
+
+    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a";
+    c.inLen  = 8;
+    c.outLen = 8;
+
+    d.input  = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+    d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61";
+    d.inLen  = 10;
+    d.outLen = 10;
+
+    test_arc4[0] = a;
+    test_arc4[1] = b;
+    test_arc4[2] = c;
+    test_arc4[3] = d;
+
+    for (i = 0; i < times; ++i) {
+        Arc4 enc;
+        Arc4 dec;
+        int  keylen = 8;  /* strlen with key 0x00 not good */
+        if (i == 3)
+            keylen = 4;
+
+#ifdef HAVE_CAVIUM
+        if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0)
+            return -20001; 
+        if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0)
+            return -20002; 
+#endif
+
+        Arc4SetKey(&enc, (byte*)keys[i], keylen);
+        Arc4SetKey(&dec, (byte*)keys[i], keylen);
+
+        Arc4Process(&enc, cipher, (byte*)test_arc4[i].input,
+                    (word32)test_arc4[i].outLen);
+        Arc4Process(&dec, plain,  cipher, (word32)test_arc4[i].outLen);
+
+        if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen))
+            return -20 - i;
+
+        if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen))
+            return -20 - 5 - i;
+
+#ifdef HAVE_CAVIUM
+        Arc4FreeCavium(&enc);
+        Arc4FreeCavium(&dec);
+#endif
+    }
+
+    return 0;
+}
+#endif
+
+
+int hc128_test(void)
+{
+#ifdef HAVE_HC128
+    byte cipher[16];
+    byte plain[16];
+
+    const char* keys[] = 
+    {           
+        "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD",
+        "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC"
+    };
+
+    const char* ivs[] =
+    {
+        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16",
+        "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31"
+    };
+
+
+    testVector a, b, c, d;
+    testVector test_hc128[4];
+
+    int times = sizeof(test_hc128) / sizeof(testVector), i;
+
+    a.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48";
+    a.inLen  = 8;
+    a.outLen = 8;
+
+    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F";
+    b.inLen  = 8;
+    b.outLen = 8;
+
+    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A";
+    c.inLen  = 8;
+    c.outLen = 8;
+
+    d.input  = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+    d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29";
+    d.inLen  = 15;
+    d.outLen = 15;
+
+    test_hc128[0] = a;
+    test_hc128[1] = b;
+    test_hc128[2] = c;
+    test_hc128[3] = d;
+
+    for (i = 0; i < times; ++i) {
+        HC128 enc;
+        HC128 dec;
+
+        /* align keys/ivs in plain/cipher buffers */
+        memcpy(plain,  keys[i], 16); 
+        memcpy(cipher, ivs[i],  16); 
+
+        Hc128_SetKey(&enc, plain, cipher);
+        Hc128_SetKey(&dec, plain, cipher);
+
+        /* align input */
+        memcpy(plain, test_hc128[i].input, test_hc128[i].outLen);
+        Hc128_Process(&enc, cipher, plain,  (word32)test_hc128[i].outLen);
+        Hc128_Process(&dec, plain,  cipher, (word32)test_hc128[i].outLen);
+
+        if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen))
+            return -120 - i;
+
+        if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen))
+            return -120 - 5 - i;
+    }
+
+#endif /* HAVE_HC128 */
+    return 0;
+}
+
+
+#ifndef NO_RABBIT
+int rabbit_test(void)
+{
+    byte cipher[16];
+    byte plain[16];
+
+    const char* keys[] = 
+    {           
+        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91"
+    };
+
+    const char* ivs[] =
+    {
+        "\x00\x00\x00\x00\x00\x00\x00\x00",
+        "\x59\x7E\x26\xC1\x75\xF5\x73\xC3",
+        0
+    };
+
+    testVector a, b, c;
+    testVector test_rabbit[3];
+
+    int times = sizeof(test_rabbit) / sizeof(testVector), i;
+
+    a.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C";
+    a.inLen  = 8;
+    a.outLen = 8;
+
+    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0";
+    b.inLen  = 8;
+    b.outLen = 8;
+
+    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
+    c.output = "\x9C\x51\xE2\x87\x84\xC3\x7F\xE9";
+    c.inLen  = 8;
+    c.outLen = 8;
+
+    test_rabbit[0] = a;
+    test_rabbit[1] = b;
+    test_rabbit[2] = c;
+
+    for (i = 0; i < times; ++i) {
+        Rabbit enc;
+        Rabbit dec;
+        byte*  iv;
+
+        /* align keys/ivs in plain/cipher buffers */
+        memcpy(plain,  keys[i], 16);
+        if (ivs[i]) {
+            memcpy(cipher, ivs[i],   8);
+            iv = cipher;
+        } else
+            iv = NULL;
+        RabbitSetKey(&enc, plain, iv);
+        RabbitSetKey(&dec, plain, iv);
+
+        /* align input */
+        memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen);
+        RabbitProcess(&enc, cipher, plain,  (word32)test_rabbit[i].outLen);
+        RabbitProcess(&dec, plain,  cipher, (word32)test_rabbit[i].outLen);
+
+        if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen))
+            return -130 - i;
+
+        if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen))
+            return -130 - 5 - i;
+    }
+
+    return 0;
+}
+#endif /* NO_RABBIT */
+
+
+#ifndef NO_DES3
+int des_test(void)
+{
+    const byte vector[] = { /* "now is the time for all " w/o trailing 0 */
+        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+    };
+
+    byte plain[24];
+    byte cipher[24];
+
+    Des enc;
+    Des dec;
+
+    const byte key[] = 
+    {
+        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef
+    };
+
+    const byte iv[] = 
+    {
+        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef
+    };
+
+    const byte verify[] = 
+    {
+        0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8,
+        0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73,
+        0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
+    };
+
+
+    Des_SetKey(&enc, key, iv, DES_ENCRYPTION);
+    Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector));
+    Des_SetKey(&dec, key, iv, DES_DECRYPTION);
+    Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher));
+
+    if (memcmp(plain, vector, sizeof(plain)))
+        return -31;
+
+    if (memcmp(cipher, verify, sizeof(cipher)))
+        return -32;
+
+    return 0;
+}
+#endif /* NO_DES3 */
+
+
+#ifndef NO_DES3
+int des3_test(void)
+{
+    const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */
+        0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+    };
+
+    byte plain[24];
+    byte cipher[24];
+
+    Des3 enc;
+    Des3 dec;
+
+    const byte key3[] = 
+    {
+        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
+        0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10,
+        0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67
+    };
+    const byte iv3[] = 
+    {
+        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef,
+        0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+        0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81
+        
+    };
+
+    const byte verify3[] = 
+    {
+        0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e,
+        0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98,
+        0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0
+    };
+
+
+#ifdef HAVE_CAVIUM
+    if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0)
+        return -20005; 
+    if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0)
+        return -20006; 
+#endif
+    Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION);
+    Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION);
+    Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector));
+    Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher));
+
+    if (memcmp(plain, vector, sizeof(plain)))
+        return -33;
+
+    if (memcmp(cipher, verify3, sizeof(cipher)))
+        return -34;
+
+#ifdef HAVE_CAVIUM
+    Des3_FreeCavium(&enc);
+    Des3_FreeCavium(&dec);
+#endif
+    return 0;
+}
+#endif /* NO_DES */
+
+
+#ifndef NO_AES
+int aes_test(void)
+{
+    Aes enc;
+    Aes dec;
+
+    const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */
+        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+    };
+
+    const byte verify[] = 
+    {
+        0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
+        0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
+    };
+
+    byte key[] = "0123456789abcdef   ";  /* align */
+    byte iv[]  = "1234567890abcdef   ";  /* align */
+
+    byte cipher[AES_BLOCK_SIZE * 4];
+    byte plain [AES_BLOCK_SIZE * 4];
+
+#ifdef HAVE_CAVIUM
+        if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0)
+            return -20003; 
+        if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0)
+            return -20004; 
+#endif
+    AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
+    AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION);
+
+    AesCbcEncrypt(&enc, cipher, msg,   AES_BLOCK_SIZE);
+    AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE);
+
+    if (memcmp(plain, msg, AES_BLOCK_SIZE))
+        return -60;
+
+    if (memcmp(cipher, verify, AES_BLOCK_SIZE))
+        return -61;
+
+#ifdef HAVE_CAVIUM
+        AesFreeCavium(&enc);
+        AesFreeCavium(&dec);
+#endif
+#ifdef CYASSL_AES_COUNTER
+    {
+        const byte ctrKey[] = 
+        {
+            0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,
+            0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
+        };
+
+        const byte ctrIv[] =
+        {
+            0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
+            0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
+        };
+
+
+        const byte ctrPlain[] =
+        {
+            0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,
+            0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a,
+            0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c,
+            0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51,
+            0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11,
+            0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef,
+            0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17,
+            0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10
+        };
+
+        const byte ctrCipher[] =
+        {
+            0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26,
+            0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce,
+            0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff,
+            0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff,
+            0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e,
+            0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab,
+            0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1,
+            0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee
+        };
+
+        AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION);
+        /* Ctr only uses encrypt, even on key setup */
+        AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION);
+
+        AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4);
+        AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4);
+
+        if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4))
+            return -66;
+
+        if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4))
+            return -67;
+    }
+#endif /* CYASSL_AES_COUNTER */
+
+    return 0;
+}
+
+#ifdef HAVE_AESGCM
+int aesgcm_test(void)
+{
+    Aes enc;
+
+    /*
+     * This is Test Case 16 from the document Galois/
+     * Counter Mode of Operation (GCM) by McGrew and
+     * Viega.
+     */
+    const byte k[] =
+    {
+        0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
+        0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
+        0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
+        0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08
+    };
+
+    const byte iv[] =
+    {
+        0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
+        0xde, 0xca, 0xf8, 0x88
+    };
+    
+    const byte p[] =
+    {
+        0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
+        0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
+        0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
+        0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
+        0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
+        0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
+        0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
+        0xba, 0x63, 0x7b, 0x39
+    };
+    
+    const byte a[] =
+    {
+        0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
+        0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
+        0xab, 0xad, 0xda, 0xd2
+    };
+    
+    const byte c[] =
+    {
+        0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07,
+        0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d,
+        0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9,
+        0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa,
+        0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d,
+        0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38,
+        0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a,
+        0xbc, 0xc9, 0xf6, 0x62
+    };
+
+    const byte t[] =
+    {
+        0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68,
+        0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b
+    };
+
+    byte t2[sizeof(t)];
+    byte p2[sizeof(c)];
+    byte c2[sizeof(p)];
+
+    int result;
+
+    memset(t2, 0, sizeof(t2));
+    memset(c2, 0, sizeof(c2));
+    memset(p2, 0, sizeof(p2));
+
+    AesGcmSetKey(&enc, k, sizeof(k));
+    /* AES-GCM encrypt and decrypt both use AES encrypt internally */
+    AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv),
+                                                 t2, sizeof(t2), a, sizeof(a));
+    if (memcmp(c, c2, sizeof(c2)))
+        return -68;
+    if (memcmp(t, t2, sizeof(t2)))
+        return -69;
+
+    result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv),
+                                                 t2, sizeof(t2), a, sizeof(a));
+    if (result != 0)
+        return -70;
+    if (memcmp(p, p2, sizeof(p2)))
+        return -71;
+
+    return 0;
+}
+#endif /* HAVE_AESGCM */
+
+#ifdef HAVE_AESCCM
+int aesccm_test(void)
+{
+    Aes enc;
+
+    /* key */
+    const byte k[] =
+    {
+        0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+        0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf
+    };
+
+    /* nonce */
+    const byte iv[] =
+    {
+        0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
+        0xa1, 0xa2, 0xa3, 0xa4, 0xa5
+    };
+
+    /* plaintext */
+    const byte p[] =
+    {
+        0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+        0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e
+    };
+
+    const byte a[] =
+    {
+        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
+    };
+
+    const byte c[] =
+    {
+        0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2,
+        0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80,
+        0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84
+    };
+
+    const byte t[] =
+    {
+        0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 
+    };
+
+    byte t2[sizeof(t)];
+    byte p2[sizeof(p)];
+    byte c2[sizeof(c)];
+
+    int result;
+
+    memset(t2, 0, sizeof(t2));
+    memset(c2, 0, sizeof(c2));
+    memset(p2, 0, sizeof(p2));
+
+    AesCcmSetKey(&enc, k, sizeof(k));
+    /* AES-CCM encrypt and decrypt both use AES encrypt internally */
+    AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv),
+                                                 t2, sizeof(t2), a, sizeof(a));
+    if (memcmp(c, c2, sizeof(c2)))
+        return -107;
+    if (memcmp(t, t2, sizeof(t2)))
+        return -108;
+
+    result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv),
+                                                 t2, sizeof(t2), a, sizeof(a));
+    if (result != 0)
+        return -109;
+    if (memcmp(p, p2, sizeof(p2)))
+        return -110;
+
+    /* Test the authentication failure */
+    t2[0]++; /* Corrupt the authentication tag. */
+    result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv),
+                                                 t2, sizeof(t2), a, sizeof(a));
+    if (result == 0)
+        return -111;
+
+    /* Clear c2 to compare against p2. p2 should be set to zero in case of
+     * authentication fail. */
+    memset(c2, 0, sizeof(c2));
+    if (memcmp(p2, c2, sizeof(p2)))
+        return -112;
+
+    return 0;
+}
+#endif /* HAVE_AESCCM */
+
+
+#endif /* NO_AES */
+
+
+#ifdef HAVE_CAMELLIA
+
+enum {
+    CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC
+};
+
+typedef struct {
+    int type;
+    const byte* plaintext;
+    const byte* iv;
+    const byte* ciphertext;
+    const byte* key;
+    word32 keySz;
+    int errorCode;
+} test_vector_t;
+
+int camellia_test(void)
+{
+    /* Camellia ECB Test Plaintext */
+    static const byte pte[] = 
+    {
+        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10
+    };
+
+    /* Camellia ECB Test Initialization Vector */
+    static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+    /* Test 1: Camellia ECB 128-bit key */
+    static const byte k1[] =
+    {
+        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10
+    };
+    static const byte c1[] =
+    {
+        0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73,
+        0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43
+    };
+
+    /* Test 2: Camellia ECB 192-bit key */
+    static const byte k2[] =
+    {
+        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
+    };
+    static const byte c2[] =
+    {
+        0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8,
+        0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9
+    };
+
+    /* Test 3: Camellia ECB 256-bit key */
+    static const byte k3[] =
+    {
+        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+        0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
+    };
+    static const byte c3[] =
+    {
+        0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c,
+        0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09
+    };
+
+    /* Camellia CBC Test Plaintext */
+    static const byte ptc[] =
+    {
+        0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,
+        0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A 
+    };
+
+    /* Camellia CBC Test Initialization Vector */
+    static const byte ivc[] =
+    {
+        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F 
+    };
+
+    /* Test 4: Camellia-CBC 128-bit key */
+    static const byte k4[] =
+    {
+        0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+        0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C 
+    };
+    static const byte c4[] =
+    {
+        0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0,
+        0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB 
+    };
+
+    /* Test 5: Camellia-CBC 192-bit key */
+    static const byte k5[] =
+    {
+        0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52,
+        0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5,
+        0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B 
+    };
+    static const byte c5[] =
+    {
+        0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2,
+        0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 
+    };
+
+    /* Test 6: CBC 256-bit key */
+    static const byte k6[] =
+    {
+        0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE,
+        0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81,
+        0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7,
+        0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 
+    };
+    static const byte c6[] =
+    {
+        0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A,
+        0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA 
+    };
+
+    byte out[CAMELLIA_BLOCK_SIZE];
+    Camellia cam;
+    int i, testsSz;
+    const test_vector_t testVectors[] =
+    {
+        {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114},
+        {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115},
+        {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116},
+        {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117},
+        {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118},
+        {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119},
+        {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120},
+        {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121},
+        {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122},
+        {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123},
+        {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124},
+        {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125}
+    };
+
+    if ((sizeof(pte) != CAMELLIA_BLOCK_SIZE) ||
+                                          (sizeof(ptc) != CAMELLIA_BLOCK_SIZE))
+        return -113;
+
+    testsSz = sizeof(testVectors)/sizeof(test_vector_t);
+    for (i = 0; i < testsSz; i++) {
+        CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz,
+                                                             testVectors[i].iv);
+
+        switch (testVectors[i].type) {
+            case CAM_ECB_ENC:
+                CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext);
+                if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE))
+                    return testVectors[i].errorCode;
+                break;
+            case CAM_ECB_DEC:
+                CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext);
+                if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE))
+                    return testVectors[i].errorCode;
+                break;
+            case CAM_CBC_ENC:
+                CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext,
+                                                           CAMELLIA_BLOCK_SIZE);
+                if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE))
+                    return testVectors[i].errorCode;
+                break;
+            case CAM_CBC_DEC:
+                CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext,
+                                                           CAMELLIA_BLOCK_SIZE);
+                if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE))
+                    return testVectors[i].errorCode;
+                break;
+            default:
+                break;
+        }
+    }
+
+    /* Setting the IV and checking it was actually set. */
+    CamelliaSetIV(&cam, ivc);
+    if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE))
+        return -1;
+
+    /* Setting the IV to NULL should leave the IV unchanged */
+    if (CamelliaSetIV(&cam, NULL) != 0 ||
+                                    XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE))
+        return -1;
+    
+    /* First parameter should never be null */
+    if (CamelliaSetIV(NULL, NULL) == 0)
+        return -1;
+
+    /* Key should have a size of 16, 24, or 32 */
+    if (CamelliaSetKey(&cam, k1, 0, NULL) == 0)
+        return -1;
+
+    return 0;
+}
+#endif /* HAVE_CAMELLIA */
+
+
+int random_test(void)
+{
+    RNG  rng;
+    byte block[32];
+    int ret;
+
+#ifdef HAVE_CAVIUM
+    ret = InitRngCavium(&rng, CAVIUM_DEV_ID);
+    if (ret != 0) return -2007;
+#endif
+    ret = InitRng(&rng);
+    if (ret != 0) return -39;
+
+    RNG_GenerateBlock(&rng, block, sizeof(block));
+
+    return 0;
+}
+
+
+#ifdef HAVE_NTRU
+
+byte GetEntropy(ENTROPY_CMD cmd, byte* out);
+
+byte GetEntropy(ENTROPY_CMD cmd, byte* out)
+{
+    static RNG rng;
+
+    if (cmd == INIT) {
+        int ret = InitRng(&rng);
+        if (ret == 0)
+            return 1;
+        else
+            return 0;
+    }
+
+    if (out == NULL)
+        return 0;
+
+    if (cmd == GET_BYTE_OF_ENTROPY) {
+        RNG_GenerateBlock(&rng, out, 1);
+        return 1;
+    }
+
+    if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
+        *out = 1;
+        return 1;
+    }
+
+    return 0;
+}
+
+#endif /* HAVE_NTRU */
+
+#ifndef NO_RSA
+
+#ifdef FREESCALE_MQX
+    static const char* clientKey  = "a:\\certs\\client-key.der";
+    static const char* clientCert = "a:\\certs\\client-cert.der";
+    #ifdef CYASSL_CERT_GEN
+        static const char* caKeyFile  = "a:\\certs\\ca-key.der";
+        static const char* caCertFile = "a:\\certs\\ca-cert.pem";
+    #endif
+#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && defined(CYASSL_MKD_SHELL) 
+    static char* clientKey = "certs/client-key.der";
+    static char* clientCert = "certs/client-cert.der";
+    void set_clientKey(char *key) {  clientKey = key ; }      /* set by shell command */
+    void set_clientCert(char *cert) {  clientCert = cert ; }  /* set by shell command */        
+    #ifdef CYASSL_CERT_GEN
+        static char* caKeyFile  = "certs/ca-key.der";
+        static char* caCertFile = "certs/ca-cert.pem";
+        void set_caKeyFile (char * key)  { caKeyFile   = key ; }     /* set by shell command */
+        void set_caCertFile(char * cert) { caCertFile = cert ; }     /* set by shell command */
+    #endif
+#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) 
+    static const char* clientKey  = "./certs/client-key.der";
+    static const char* clientCert = "./certs/client-cert.der";
+    #ifdef CYASSL_CERT_GEN
+        static const char* caKeyFile  = "./certs/ca-key.der";
+        static const char* caCertFile = "./certs/ca-cert.pem";
+    #endif
+#endif
+
+
+
+#define FOURK_BUF 4096
+
+int rsa_test(void)
+{
+    byte*   tmp;
+    size_t bytes;
+    RsaKey key;
+    RNG    rng;
+    word32 idx = 0;
+    int    ret;
+    byte   in[] = "Everyone gets Friday off.";
+    word32 inLen = (word32)strlen((char*)in);
+    byte   out[256];
+    byte   plain[256];
+#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
+    FILE*  file, * file2;
+#endif
+#ifdef CYASSL_TEST_CERT
+    DecodedCert cert;
+#endif
+
+    tmp = (byte*)malloc(FOURK_BUF);
+    if (tmp == NULL)
+        return -40;
+
+#ifdef USE_CERT_BUFFERS_1024
+    XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024);
+    bytes = sizeof_client_key_der_1024;
+#elif defined(USE_CERT_BUFFERS_2048)
+    XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048);
+    bytes = sizeof_client_key_der_2048;
+#else
+    file = fopen(clientKey, "rb");
+
+    if (!file)
+        err_sys("can't open ./certs/client-key.der, "
+                "Please run from CyaSSL home dir", -40);
+
+    bytes = fread(tmp, 1, FOURK_BUF, file);
+    fclose(file);
+#endif /* USE_CERT_BUFFERS */
+ 
+#ifdef HAVE_CAVIUM
+    RsaInitCavium(&key, CAVIUM_DEV_ID);
+#endif 
+    InitRsaKey(&key, 0);  
+    ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes);
+    if (ret != 0) return -41;
+
+    ret = InitRng(&rng);
+    if (ret != 0) return -42;
+
+    ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng);
+    if (ret < 0) return -43;
+
+    ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key);
+    if (ret < 0) return -44;
+
+    if (memcmp(plain, in, inLen)) return -45;
+
+    ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng);
+    if (ret < 0) return -46;
+
+    memset(plain, 0, sizeof(plain));
+    ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key);
+    if (ret < 0) return -47;
+
+    if (memcmp(plain, in, ret)) return -48;
+
+#if defined(CYASSL_MDK_ARM)
+    #define sizeof(s) strlen((char *)(s))
+#endif
+
+#ifdef USE_CERT_BUFFERS_1024
+    XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024);
+    bytes = sizeof_client_cert_der_1024;
+#elif defined(USE_CERT_BUFFERS_2048)
+    XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048);
+    bytes = sizeof_client_cert_der_2048;
+#else
+    file2 = fopen(clientCert, "rb");
+    if (!file2)
+        return -49;
+
+    bytes = fread(tmp, 1, FOURK_BUF, file2);
+    fclose(file2);
+#endif
+
+#ifdef sizeof
+        #undef sizeof
+#endif      
+
+#ifdef CYASSL_TEST_CERT
+    InitDecodedCert(&cert, tmp, (word32)bytes, 0);
+
+    ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0);
+    if (ret != 0) return -491;
+
+    FreeDecodedCert(&cert);
+#else
+    (void)bytes;
+#endif
+
+
+#ifdef CYASSL_KEY_GEN
+    {
+        byte*  der;
+        byte*  pem;
+        int    derSz = 0;
+        int    pemSz = 0;
+        RsaKey derIn;
+        RsaKey genKey;
+        FILE* keyFile;
+        FILE* pemFile;
+
+        InitRsaKey(&genKey, 0);
+        ret = MakeRsaKey(&genKey, 1024, 65537, &rng);
+        if (ret != 0)
+            return -301;
+
+        der = (byte*)malloc(FOURK_BUF);
+        if (der == NULL)
+            return -307;
+        pem = (byte*)malloc(FOURK_BUF);
+        if (pem == NULL)
+            return -308;
+
+        derSz = RsaKeyToDer(&genKey, der, FOURK_BUF);
+        if (derSz < 0)
+            return -302;
+
+        keyFile = fopen("./key.der", "wb");
+        if (!keyFile)
+            return -303;
+        ret = (int)fwrite(der, derSz, 1, keyFile);
+        fclose(keyFile);
+
+        pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE);
+        if (pemSz < 0)
+            return -304;
+
+        pemFile = fopen("./key.pem", "wb");
+        if (!pemFile) 
+            return -305;
+        ret = (int)fwrite(pem, pemSz, 1, pemFile);
+        fclose(pemFile);
+
+        InitRsaKey(&derIn, 0);
+        idx = 0;
+        ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz);
+        if (ret != 0)
+            return -306;
+
+        FreeRsaKey(&derIn);
+        FreeRsaKey(&genKey);
+        free(pem);
+        free(der);
+    }
+#endif /* CYASSL_KEY_GEN */
+
+
+#ifdef CYASSL_CERT_GEN
+    /* self signed */
+    {
+        Cert        myCert;
+        byte*       derCert;
+        byte*       pem;
+        FILE*       derFile;
+        FILE*       pemFile;
+        int         certSz;
+        int         pemSz;
+#ifdef CYASSL_TEST_CERT
+        DecodedCert decode;
+#endif
+
+        derCert = (byte*)malloc(FOURK_BUF);
+        if (derCert == NULL)
+            return -309;
+        pem = (byte*)malloc(FOURK_BUF);
+        if (pem == NULL)
+            return -310;
+
+        InitCert(&myCert);
+
+        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
+        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
+        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
+        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
+        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
+        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
+        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
+        myCert.isCA    = 1;
+        myCert.sigType = CTC_SHA256wRSA;
+
+        certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); 
+        if (certSz < 0)
+            return -401;
+
+#ifdef CYASSL_TEST_CERT
+        InitDecodedCert(&decode, derCert, certSz, 0);
+        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
+        if (ret != 0)
+            return -402;
+        FreeDecodedCert(&decode);
+#endif
+        derFile = fopen("./cert.der", "wb");
+        if (!derFile)
+            return -403;
+        ret = (int)fwrite(derCert, certSz, 1, derFile);
+        fclose(derFile);
+
+        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
+        if (pemSz < 0)
+            return -404;
+
+        pemFile = fopen("./cert.pem", "wb");
+        if (!pemFile)
+            return -405;
+        ret = (int)fwrite(pem, pemSz, 1, pemFile);
+        fclose(pemFile);
+        free(pem);
+        free(derCert);
+    }
+    /* CA style */
+    {
+        RsaKey      caKey;
+        Cert        myCert;
+        byte*       derCert;
+        byte*       pem;
+        FILE*       derFile;
+        FILE*       pemFile;
+        int         certSz;
+        int         pemSz;
+        size_t      bytes3;
+        word32      idx3 = 0;
+              FILE* file3 ;
+#ifdef CYASSL_TEST_CERT
+        DecodedCert decode;
+#endif
+
+        derCert = (byte*)malloc(FOURK_BUF);
+        if (derCert == NULL)
+            return -311;
+        pem = (byte*)malloc(FOURK_BUF);
+        if (pem == NULL)
+            return -312;
+
+        file3 = fopen(caKeyFile, "rb");
+
+        if (!file3)
+            return -412;
+
+        bytes3 = fread(tmp, 1, FOURK_BUF, file3);
+        fclose(file3);
+  
+        InitRsaKey(&caKey, 0);  
+        ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3);
+        if (ret != 0) return -413;
+
+        InitCert(&myCert);
+
+        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
+        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
+        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
+        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
+        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
+        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
+        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
+
+        ret = SetIssuer(&myCert, caCertFile);
+        if (ret < 0)
+            return -405;
+
+        certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, &rng); 
+        if (certSz < 0)
+            return -407;
+
+        certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF,
+                          &caKey, &rng);
+        if (certSz < 0)
+            return -408;
+
+
+#ifdef CYASSL_TEST_CERT
+        InitDecodedCert(&decode, derCert, certSz, 0);
+        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
+        if (ret != 0)
+            return -409;
+        FreeDecodedCert(&decode);
+#endif
+
+        derFile = fopen("./othercert.der", "wb");
+        if (!derFile)
+            return -410;
+        ret = (int)fwrite(derCert, certSz, 1, derFile);
+        fclose(derFile);
+
+        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
+        if (pemSz < 0)
+            return -411;
+
+        pemFile = fopen("./othercert.pem", "wb");
+        if (!pemFile)
+            return -412;
+        ret = (int)fwrite(pem, pemSz, 1, pemFile);
+        fclose(pemFile);
+        free(pem);
+        free(derCert);
+        FreeRsaKey(&caKey);
+    }
+#ifdef HAVE_NTRU
+    {
+        RsaKey      caKey;
+        Cert        myCert;
+        byte*       derCert;
+        byte*       pem;
+        FILE*       derFile;
+        FILE*       pemFile;
+        FILE*       caFile;
+        FILE*       ntruPrivFile;
+        int         certSz;
+        int         pemSz;
+        size_t      bytes;
+        word32      idx = 0;
+#ifdef CYASSL_TEST_CERT
+        DecodedCert decode;
+#endif
+        derCert = (byte*)malloc(FOURK_BUF);
+        if (derCert == NULL)
+            return -311;
+        pem = (byte*)malloc(FOURK_BUF);
+        if (pem == NULL)
+            return -312;
+
+        byte   public_key[557];          /* sized for EES401EP2 */
+        word16 public_key_len;           /* no. of octets in public key */
+        byte   private_key[607];         /* sized for EES401EP2 */
+        word16 private_key_len;          /* no. of octets in private key */
+        DRBG_HANDLE drbg;
+        static uint8_t const pers_str[] = {
+                'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't'
+        };
+        word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str),
+                                            GetEntropy, &drbg);
+        if (rc != DRBG_OK)
+            return -450;
+
+        rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len,
+                                        NULL, &private_key_len, NULL);
+        if (rc != NTRU_OK)
+            return -451;
+
+        rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len,
+                                     public_key, &private_key_len, private_key);
+        crypto_drbg_uninstantiate(drbg);
+
+        if (rc != NTRU_OK)
+            return -452;
+
+        caFile = fopen(caKeyFile, "rb");
+
+        if (!caFile)
+            return -453;
+
+        bytes = fread(tmp, 1, FOURK_BUF, caFile);
+        fclose(caFile);
+  
+        InitRsaKey(&caKey, 0);  
+        ret = RsaPrivateKeyDecode(tmp, &idx, &caKey, (word32)bytes);
+        if (ret != 0) return -454;
+
+        InitCert(&myCert);
+
+        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
+        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
+        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
+        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
+        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
+        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
+        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
+
+        ret = SetIssuer(&myCert, caCertFile);
+        if (ret < 0)
+            return -455;
+
+        certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key,
+                              public_key_len, &rng); 
+        if (certSz < 0)
+            return -456;
+
+        certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF,
+                          &caKey, &rng);
+        if (certSz < 0)
+            return -457;
+
+
+#ifdef CYASSL_TEST_CERT
+        InitDecodedCert(&decode, derCert, certSz, 0);
+        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
+        if (ret != 0)
+            return -458;
+        FreeDecodedCert(&decode);
+#endif
+        derFile = fopen("./ntru-cert.der", "wb");
+        if (!derFile)
+            return -459;
+        ret = fwrite(derCert, certSz, 1, derFile);
+        fclose(derFile);
+
+        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
+        if (pemSz < 0)
+            return -460;
+
+        pemFile = fopen("./ntru-cert.pem", "wb");
+        if (!pemFile)
+            return -461;
+        ret = fwrite(pem, pemSz, 1, pemFile);
+        fclose(pemFile);
+
+        ntruPrivFile = fopen("./ntru-key.raw", "wb");
+        if (!ntruPrivFile)
+            return -462;
+        ret = fwrite(private_key, private_key_len, 1, ntruPrivFile);
+        fclose(ntruPrivFile);
+        free(pem);
+        free(derCert);
+        FreeRsaKey(&caKey);
+    }
+#endif /* HAVE_NTRU */
+#endif /* CYASSL_CERT_GEN */
+
+    FreeRsaKey(&key);
+#ifdef HAVE_CAVIUM
+    RsaFreeCavium(&key);
+#endif 
+    free(tmp);
+
+    return 0;
+}
+
+#endif
+
+
+#ifndef NO_DH
+
+#ifdef FREESCALE_MQX
+    static const char* dhKey = "a:\certs\\dh2048.der";
+#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
+    static const char* dhKey = "./certs/dh2048.der";
+#endif
+
+int dh_test(void)
+{
+    int    ret;
+    word32 bytes;
+    word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2;
+    byte   tmp[1024];
+    byte   priv[256];
+    byte   pub[256];
+    byte   priv2[256];
+    byte   pub2[256];
+    byte   agree[256];
+    byte   agree2[256];
+    DhKey  key;
+    DhKey  key2;
+    RNG    rng;
+    
+        
+#ifdef USE_CERT_BUFFERS_1024
+    XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024);
+    bytes = sizeof_dh_key_der_1024;
+#elif defined(USE_CERT_BUFFERS_2048)
+    XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048);
+    bytes = sizeof_dh_key_der_2048;
+#else
+    FILE*  file = fopen(dhKey, "rb");
+
+    if (!file)
+        return -50;
+
+    bytes = (word32) fread(tmp, 1, sizeof(tmp), file);
+    fclose(file);
+#endif /* USE_CERT_BUFFERS */
+
+    InitDhKey(&key);  
+    InitDhKey(&key2);  
+    ret = DhKeyDecode(tmp, &idx, &key, bytes);
+    if (ret != 0)
+        return -51;
+
+    idx = 0;
+    ret = DhKeyDecode(tmp, &idx, &key2, bytes);
+    if (ret != 0)
+        return -52;
+
+    ret = InitRng(&rng);
+    if (ret != 0)
+        return -53;
+    
+    ret =  DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz);
+    ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2);
+    if (ret != 0)
+        return -54;
+
+    ret =  DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2);
+    ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz);
+    if (ret != 0)
+        return -55;
+
+    if (memcmp(agree, agree2, agreeSz))
+        return -56;
+
+    FreeDhKey(&key);
+    FreeDhKey(&key2);
+
+    return 0;
+}
+
+#endif /* NO_DH */
+
+
+#ifndef NO_DSA
+
+#ifdef FREESCALE_MQX
+    static const char* dsaKey = "a:\\certs\\dsa2048.der";
+#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
+    static const char* dsaKey = "./certs/dsa2048.der";
+#endif
+
+int dsa_test(void)
+{
+    int    ret, answer;
+    word32 bytes;
+    word32 idx = 0;
+    byte   tmp[1024];
+    DsaKey key;
+    RNG    rng;
+    Sha    sha;
+    byte   hash[SHA_DIGEST_SIZE];
+    byte   signature[40];
+
+        
+#ifdef USE_CERT_BUFFERS_1024
+    XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024);
+    bytes = sizeof_dsa_key_der_1024;
+#elif defined(USE_CERT_BUFFERS_2048)
+    XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048);
+    bytes = sizeof_dsa_key_der_2048;
+#else
+    FILE*  file = fopen(dsaKey, "rb");
+
+    if (!file)
+        return -60;
+
+    bytes = (word32) fread(tmp, 1, sizeof(tmp), file);
+    fclose(file);
+#endif /* USE_CERT_BUFFERS */
+  
+    InitSha(&sha);
+    ShaUpdate(&sha, tmp, bytes);
+    ShaFinal(&sha, hash);
+
+    InitDsaKey(&key);
+    ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes);
+    if (ret != 0) return -61;
+
+    ret = InitRng(&rng);
+    if (ret != 0) return -62;
+
+    ret = DsaSign(hash, signature, &key, &rng);
+    if (ret != 0) return -63;
+
+    ret = DsaVerify(hash, signature, &key, &answer);
+    if (ret != 0) return -64;
+    if (answer != 1) return -65;
+    
+    FreeDsaKey(&key);
+    
+    return 0;
+}
+
+#endif /* NO_DSA */
+
+
+#ifdef OPENSSL_EXTRA
+
+int openssl_test(void)
+{
+    EVP_MD_CTX md_ctx;
+    testVector a, b, c, d, e, f;
+    byte       hash[SHA_DIGEST_SIZE*4];  /* max size */
+
+    (void)e;
+    (void)f;
+
+    a.input  = "1234567890123456789012345678901234567890123456789012345678"
+               "9012345678901234567890";
+    a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6"
+               "\x7a";
+    a.inLen  = strlen(a.input);
+    a.outLen = MD5_DIGEST_SIZE;
+
+    EVP_MD_CTX_init(&md_ctx);
+    EVP_DigestInit(&md_ctx, EVP_md5());
+
+    EVP_DigestUpdate(&md_ctx, a.input, a.inLen);
+    EVP_DigestFinal(&md_ctx, hash, 0);
+
+    if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0)
+        return -71;
+
+    b.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+               "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+               "aaaaaaaaaa";
+    b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7"
+               "\x53\x99\x5E\x26\xA0";
+    b.inLen  = strlen(b.input);
+    b.outLen = SHA_DIGEST_SIZE;
+
+    EVP_MD_CTX_init(&md_ctx);
+    EVP_DigestInit(&md_ctx, EVP_sha1());
+
+    EVP_DigestUpdate(&md_ctx, b.input, b.inLen);
+    EVP_DigestFinal(&md_ctx, hash, 0);
+
+    if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0)
+        return -72;
+
+
+    d.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
+    d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
+               "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
+               "\x06\xC1";
+    d.inLen  = strlen(d.input);
+    d.outLen = SHA256_DIGEST_SIZE;
+
+    EVP_MD_CTX_init(&md_ctx);
+    EVP_DigestInit(&md_ctx, EVP_sha256());
+
+    EVP_DigestUpdate(&md_ctx, d.input, d.inLen);
+    EVP_DigestFinal(&md_ctx, hash, 0);
+
+    if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0)
+        return -78;
+
+#ifdef CYASSL_SHA384
+
+    e.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
+    e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
+               "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
+               "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
+               "\x74\x60\x39";    
+    e.inLen  = strlen(e.input);
+    e.outLen = SHA384_DIGEST_SIZE;
+
+    EVP_MD_CTX_init(&md_ctx);
+    EVP_DigestInit(&md_ctx, EVP_sha384());
+
+    EVP_DigestUpdate(&md_ctx, e.input, e.inLen);
+    EVP_DigestFinal(&md_ctx, hash, 0);
+
+    if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0)
+        return -79;
+
+#endif /* CYASSL_SHA384 */
+
+
+#ifdef CYASSL_SHA512
+
+    f.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
+    f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
+               "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
+               "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
+               "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
+               "\x87\x4b\xe9\x09"; 
+    f.inLen  = strlen(f.input);
+    f.outLen = SHA512_DIGEST_SIZE; 
+
+    EVP_MD_CTX_init(&md_ctx);
+    EVP_DigestInit(&md_ctx, EVP_sha512());
+
+    EVP_DigestUpdate(&md_ctx, f.input, f.inLen);
+    EVP_DigestFinal(&md_ctx, hash, 0);
+
+    if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0)
+        return -80;
+
+#endif /* CYASSL_SHA512 */
+
+
+    if (RAND_bytes(hash, sizeof(hash)) != 1)
+        return -73;
+            
+    c.input  = "what do ya want for nothing?";
+    c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7"
+               "\x38";
+    c.inLen  = strlen(c.input);
+    c.outLen = MD5_DIGEST_SIZE;
+
+    HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0);
+
+    if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0)
+        return -74;
+
+    { /* des test */
+    const byte vector[] = { /* "now is the time for all " w/o trailing 0 */
+        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+    };
+
+    byte plain[24];
+    byte cipher[24];
+
+    const_DES_cblock key = 
+    {
+        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef
+    };
+
+    DES_cblock iv = 
+    {
+        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef
+    };
+
+    DES_key_schedule sched;
+
+    const byte verify[] = 
+    {
+        0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8,
+        0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73,
+        0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
+    };
+
+    DES_key_sched(&key, &sched);
+
+    DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT);
+    DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT);
+
+    if (memcmp(plain, vector, sizeof(vector)) != 0)
+        return -75;
+
+    if (memcmp(cipher, verify, sizeof(verify)) != 0)
+        return -76;
+
+        /* test changing iv */
+    DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT);
+    DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT);
+
+    if (memcmp(cipher, verify, sizeof(verify)) != 0)
+        return -77;
+
+    }  /* end des test */
+
+    {  /* evp_cipher test */
+        EVP_CIPHER_CTX ctx;
+
+
+        const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */
+            0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+            0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+            0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+        };
+
+        const byte verify[] = 
+        {
+            0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
+            0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
+        };
+
+        byte key[] = "0123456789abcdef   ";  /* align */
+        byte iv[]  = "1234567890abcdef   ";  /* align */
+
+        byte cipher[AES_BLOCK_SIZE * 4];
+        byte plain [AES_BLOCK_SIZE * 4];
+
+        EVP_CIPHER_CTX_init(&ctx);
+        if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0)
+            return -81;
+
+        if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0)
+            return -82;
+
+        if (memcmp(cipher, verify, AES_BLOCK_SIZE))
+            return -83;
+
+        EVP_CIPHER_CTX_init(&ctx);
+        if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0)
+            return -84;
+
+        if (EVP_Cipher(&ctx, plain, cipher, 16) == 0)
+            return -85;
+
+        if (memcmp(plain, msg, AES_BLOCK_SIZE))
+            return -86;
+
+
+    }  /* end evp_cipher test */
+
+    return 0;
+}
+
+#endif /* OPENSSL_EXTRA */
+
+
+#ifndef NO_PWDBASED
+
+int pkcs12_test(void)
+{
+    const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67,
+                            0x00, 0x00 }; 
+    const byte salt[] =   { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f };
+
+    const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65,
+                             0x00, 0x67, 0x00, 0x00 }; 
+    const byte salt2[] =   { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 };
+    byte  derived[64];
+
+    const byte verify[] = {
+        0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46,
+        0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E,
+        0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3
+    };
+
+    const byte verify2[] = {
+        0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E,
+        0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB,
+        0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F
+    };
+
+    int id         =  1;
+    int kLen       = 24;
+    int iterations =  1;
+    int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations,
+                           kLen, SHA, id);
+
+    if (ret < 0)
+        return -103;
+
+    if ( (ret = memcmp(derived, verify, kLen)) != 0)
+        return -104;
+
+    iterations = 1000;
+    ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, 
+                       kLen, SHA, id);
+    if (ret < 0)
+        return -105;
+
+    if ( (ret = memcmp(derived, verify2, 24)) != 0)
+        return -106;
+
+    return 0;
+}
+
+
+int pbkdf2_test(void)
+{
+    char passwd[] = "password";
+    const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 };
+    int   iterations = 2048;
+    int   kLen = 24;
+    byte  derived[64];
+
+    const byte verify[] = {
+        0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2,
+        0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43
+
+    };
+
+    PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations,
+           kLen, SHA);
+
+    if (memcmp(derived, verify, sizeof(verify)) != 0)
+        return -102;
+
+    return 0;
+}
+
+
+int pbkdf1_test(void)
+{
+    char passwd[] = "password";
+    const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 };
+    int   iterations = 1000;
+    int   kLen = 16;
+    byte  derived[16];
+
+    const byte verify[] = {
+        0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB,
+        0x4A, 0x3D, 0x2A, 0x20
+    };
+
+    PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations,
+           kLen, SHA);
+
+    if (memcmp(derived, verify, sizeof(verify)) != 0)
+        return -101;
+
+    return 0;
+}
+
+
+int pwdbased_test(void)
+{
+   int ret =  pbkdf1_test();
+   ret += pbkdf2_test();
+
+   return ret + pkcs12_test();
+}
+
+#endif /* NO_PWDBASED */
+
+
+#ifdef HAVE_ECC
+
+int ecc_test(void)
+{
+    RNG     rng;
+    byte    sharedA[1024];
+    byte    sharedB[1024];
+    byte    sig[1024];
+    byte    digest[20];
+    byte    exportBuf[1024];
+    word32  x, y;
+    int     i, verify, ret;
+    ecc_key userA, userB, pubKey;
+
+    ret = InitRng(&rng);
+    if (ret != 0)
+        return -1001;
+
+    ecc_init(&userA);
+    ecc_init(&userB);
+    ecc_init(&pubKey);
+
+    ret = ecc_make_key(&rng, 32, &userA);
+    ret = ecc_make_key(&rng, 32, &userB);
+
+    if (ret != 0)
+        return -1002;
+
+    x = sizeof(sharedA);
+    ret = ecc_shared_secret(&userA, &userB, sharedA, &x);
+   
+    y = sizeof(sharedB);
+    ret = ecc_shared_secret(&userB, &userA, sharedB, &y);
+    
+    if (ret != 0)
+        return -1003;
+
+    if (y != x)
+        return -1004;
+
+    if (memcmp(sharedA, sharedB, x))
+        return -1005;
+
+    x = sizeof(exportBuf);
+    ret = ecc_export_x963(&userA, exportBuf, &x);
+    if (ret != 0)
+        return -1006;
+
+    ret = ecc_import_x963(exportBuf, x, &pubKey);
+
+    if (ret != 0) 
+        return -1007;
+
+    y = sizeof(sharedB);
+    ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y);
+   
+    if (ret != 0)
+        return -1008;
+
+    if (memcmp(sharedA, sharedB, y))
+        return -1010;
+
+    /* test DSA sign hash */
+    for (i = 0; i < (int)sizeof(digest); i++)
+        digest[i] = i;
+
+    x = sizeof(sig);
+    ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA);
+    
+    verify = 0;
+    ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA);
+
+    if (ret != 0)
+        return -1011;
+
+    if (verify != 1)
+        return -1012;
+
+    ecc_free(&pubKey);
+    ecc_free(&userB);
+    ecc_free(&userA);
+
+    return 0;
+}
+
+#endif /* HAVE_ECC */
+
+#ifdef HAVE_LIBZ
+
+const byte sample_text[] =
+    "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n"
+    "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n"
+    "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n"
+    "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n"
+    "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n"
+    "small batch meggings kogi dolore food truck bespoke gastropub.\n"
+    "\n"
+    "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n"
+    "four loko you probably haven't heard of them high life. Messenger bag\n"
+    "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n"
+    "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n"
+    "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n"
+    "food truck next level, tousled irony non semiotics PBR ethical anim cred\n"
+    "readymade. Mumblecore brunch lomo odd future, portland organic terry\n"
+    "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n"
+    "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n"
+    "four loko whatever street art yr farm-to-table.\n"
+    "\n"
+    "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n"
+    "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n"
+    "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n"
+    "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n"
+    "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n"
+    "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n"
+    "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n"
+    "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n"
+    "locavore.\n"
+    "\n"
+    "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n"
+    "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n"
+    "cillum pickled velit, YOLO officia you probably haven't heard of them\n"
+    "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n"
+    "small batch american apparel. Put a bird on it cosby sweater before they\n"
+    "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n"
+    "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n"
+    "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n"
+    "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n"
+    "neutra PBR selvage.\n"
+    "\n"
+    "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n"
+    "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n"
+    "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n"
+    "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n"
+    "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n"
+    "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n"
+    "incididunt flannel sustainable helvetica pork belly pug banksy you\n"
+    "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n"
+    "mollit magna, sriracha sartorial helvetica.\n"
+    "\n"
+    "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n"
+    "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n"
+    "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n"
+    "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n"
+    "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n"
+    "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n"
+    "Veniam sunt food truck leggings, sint vinyl fap.\n"
+    "\n"
+    "Hella dolore pork belly, truffaut carles you probably haven't heard of\n"
+    "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n"
+    "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n"
+    "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n"
+    "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n"
+    "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n"
+    "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n"
+    "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n"
+    "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n"
+    "\n"
+    "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n"
+    "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n"
+    "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n"
+    "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n"
+    "tousled beard mollit mustache leggings portland next level. Nihil esse\n"
+    "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n"
+    "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n"
+    "bag dolor terry richardson sapiente.\n";
+
+
+int compress_test(void)
+{
+    int ret = 0;
+    word32 dSz = sizeof(sample_text);
+    word32 cSz = (dSz + (word32)(dSz * 0.001) + 12);
+    byte *c = NULL;
+    byte *d = NULL;
+
+    c = calloc(cSz, sizeof(byte));
+    d = calloc(dSz, sizeof(byte));
+
+    if (c == NULL || d == NULL)
+        ret = -300;
+
+    if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0)
+        ret = -301;
+
+    if (ret > 0) {
+        cSz = (word32)ret;
+        ret = 0;
+    }
+
+    if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz)
+        ret = -302;
+
+    if (ret == 0 && memcmp(d, sample_text, dSz))
+        ret = -303;
+    
+    if (c) free(c);
+    if (d) free(d);
+
+    return ret;
+}
+
+#endif /* HAVE_LIBZ */
+
+#endif /* NO_CRYPT_TEST */
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt
new file mode 100644
index 00000000..2656e403
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt
@@ -0,0 +1,22 @@
+This program is echo client with CyaSSL/wolfCrypt library.
+
+In order to run this program, 
+Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory.
+Set config-EchoClient.h configuration file for the Callee IP or Port number.
+
+For further configuration, refer config-Crypt.h and config-CyaSSL.h.
+
+When testing this client, it is recommended to test against one of the standard 
+CyaSSL example applications running on a desktop machine.  The standard CyaSSL 
+example applications are located in the CyaSSL root directory under the 
+/examples directory.
+
+For the hardware crypt on config-Crypt.h, download 
+STSW-STM32062: STM32F2xx standard peripherals library at 
+http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to 
+ {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
+
+
+Support
+-------
+Please send questions or comments to support@wolfssl.com
\ No newline at end of file
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx
new file mode 100644
index 00000000..7e61facf
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx
@@ -0,0 +1,1422 @@
+
+
+
+  1.0
+
+  
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + EchoClient + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + ((func_args*)args)->signal->port + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 28 + 0 + 0 + 0 + 0 + .\echoclient.c + echoclient.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 24 + 0 + 0 + 0 + 0 + .\config-EchoClient.h + config-EchoClient.h + 0 + 0 + + + 2 + 4 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 0 + 0 + + + 2 + 5 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Dcumentation + 1 + 0 + 0 + 0 + + 3 + 6 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 7 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 10 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 11 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 12 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + PHY_ST802RT1.c + 1 + 0 + + + 6 + 15 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + EMAC_STM32F2xx.c + 1 + 0 + + + 6 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 17 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 19 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::Network + 0 + 0 + 0 + 1 + + 8 + 20 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + Net_Dbg_CM3_L.lib + 1 + 0 + + + 8 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config.c + Net_Config.c + 1 + 0 + + + 8 + 22 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_BSD.h + Net_Config_BSD.h + 1 + 0 + + + 8 + 23 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_DNS_Client.h + Net_Config_DNS_Client.h + 1 + 0 + + + 8 + 24 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_ETH_0.h + Net_Config_ETH_0.h + 1 + 0 + + + 8 + 25 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_TCP.h + Net_Config_TCP.h + 1 + 0 + + + 8 + 26 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_UDP.h + Net_Config_UDP.h + 1 + 0 + + + 8 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Debug.c + Net_Debug.c + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 9 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 9 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 9 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 9 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 9 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 9 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 9 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 9 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 9 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 9 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 9 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 9 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 9 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 9 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 9 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 9 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 9 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 9 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 9 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 9 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 9 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 9 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 9 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 9 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + crl.c + 1 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + internal.c + 1 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + io.c + 1 + 0 + + + 9 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + keys.c + 1 + 0 + + + 9 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + ocsp.c + 1 + 0 + + + 9 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + sniffer.c + 1 + 0 + + + 9 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + ssl.c + 1 + 0 + + + 9 + 69 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + tls.c + 1 + 0 + + + 9 + 70 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 9 + 71 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 1 + 0 + + + 9 + 72 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config.h + config.h + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx new file mode 100644 index 00000000..7b4076c6 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx @@ -0,0 +1,1106 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + EchoClient + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + EchoClient + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_EchoClient CYASSL_STM32F2xx + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + echoclient.c + 1 + .\echoclient.c + + + + + Configuration + + + config-EchoClient.h + 5 + .\config-EchoClient.h + + + config-CyaSSL.h + 5 + .\RTE\wolfSSL\config-CyaSSL.h + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Dcumentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + PHY_ST802RT1.c + 1 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + + + EMAC_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::Network + + + Net_Dbg_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + + + Net_Config.c + 1 + RTE\Network\Net_Config.c + + + Net_Config_BSD.h + 5 + RTE\Network\Net_Config_BSD.h + + + Net_Config_DNS_Client.h + 5 + RTE\Network\Net_Config_DNS_Client.h + + + Net_Config_ETH_0.h + 5 + RTE\Network\Net_Config_ETH_0.h + + + Net_Config_TCP.h + 5 + RTE\Network\Net_Config_TCP.h + + + Net_Config_UDP.h + 5 + RTE\Network\Net_Config_UDP.h + + + Net_Debug.c + 1 + RTE\Network\Net_Debug.c + + + + + ::wolfSSL + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + + + crl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + + + internal.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + + + io.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + + + keys.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + + + ocsp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + + + sniffer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + + + ssl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + + + tls.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config-CyaSSL.h + 5 + RTE\wolfSSL\config-CyaSSL.h + + + config.h + 5 + RTE\wolfSSL\config.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + + + RTE\Network\Net_Debug.c + + + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-CyaSSL.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config-CyaSSL.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..54b3e0bf --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 5 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 250 +#endif + +// Main Thread stack size [bytes] <64-20000:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 2000 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 2 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 2500 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-64000:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..4a09246f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 1 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..d398143e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00007000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c new file mode 100644 index 00000000..6b9dc8e0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config.c + * Purpose: Network Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Definitions +// Global Network System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "my_host" +#define NET_HOST_NAME "my_host" + +// Memory Pool size <1536-262144:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// Network packets are allocated from this memory pool. +// Default: 12000 bytes +#define NET_MEM_SIZE 3000 + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_Network_Interface_ETH_0 +#include "Net_Config_ETH_0.h" +#endif +#ifdef RTE_Network_Interface_ETH_1 +#include "Net_Config_ETH_1.h" +#endif + +#ifdef RTE_Network_Interface_PPP_0 +#include "Net_Config_PPP_0.h" +#endif +#ifdef RTE_Network_Interface_PPP_1 +#include "Net_Config_PPP_1.h" +#endif + +#ifdef RTE_Network_Interface_SLIP_0 +#include "Net_Config_SLIP_0.h" +#endif +#ifdef RTE_Network_Interface_SLIP_1 +#include "Net_Config_SLIP_1.h" +#endif + +#ifdef RTE_Network_Socket_UDP +#include "Net_Config_UDP.h" +#endif +#ifdef RTE_Network_Socket_TCP +#include "Net_Config_TCP.h" +#endif +#ifdef RTE_Network_Socket_BSD +#include "Net_Config_BSD.h" +#endif + +#ifdef RTE_Network_Web_Server_RO +#include "Net_Config_HTTP_Server.h" +#endif +#ifdef RTE_Network_Web_Server_FS +#include "Net_Config_HTTP_Server.h" +#endif + +#ifdef RTE_Network_Telnet_Server +#include "Net_Config_Telnet_Server.h" +#endif + +#ifdef RTE_Network_TFTP_Server +#include "Net_Config_TFTP_Server.h" +#endif +#ifdef RTE_Network_TFTP_Client +#include "Net_Config_TFTP_Client.h" +#endif + +#ifdef RTE_Network_FTP_Server +#include "Net_Config_FTP_Server.h" +#endif +#ifdef RTE_Network_FTP_Client +#include "Net_Config_FTP_Client.h" +#endif + +#ifdef RTE_Network_DNS_Client +#include "Net_Config_DNS_Client.h" +#endif + +#ifdef RTE_Network_SMTP_Client +#include "Net_Config_SMTP_Client.h" +#endif + +#ifdef RTE_Network_SNMP_Agent +#include "Net_Config_SNMP_Agent.h" +#endif + +#ifdef RTE_Network_SNTP_Client +#include "Net_Config_SNTP_Client.h" +#endif + +#include "net_config.h" + +/** +\addtogroup net_genFunc +@{ +*/ +/** + \fn void net_sys_error (ERROR_CODE error) + \ingroup net_cores + \brief Network system error handler. +*/ +void net_sys_error (ERROR_CODE error) { + /* This function is called when a fatal error is encountered. */ + /* The normal program execution is not possible anymore. */ + + switch (error) { + case ERR_MEM_ALLOC: + /* Out of memory */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer Corrupted */ + /* More data written than the size of allocated mem block */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state */ + break; + } + + /* End-less loop */ + while (1); +} +/** +@} +*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h new file mode 100644 index 00000000..d7e6a614 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_BSD.h + * Purpose: Network Configuration BSD Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Berkley (BSD) Sockets +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUM_SOCKS 7 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SERVER_SOCKS 1 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RECEIVE_TOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_HOSTNAME_ENABLE 0 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h new file mode 100644 index 00000000..d30b7180 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Service + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_DNS_Client.h + * Purpose: Network Configuration DNS Client + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// DNS Client +#define DNS_CLIENT_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_CLIENT_TAB_SIZE 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h new file mode 100644 index 00000000..7be57ad6 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h @@ -0,0 +1,222 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Interface + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_ETH_0.h + * Purpose: Network Configuration ETH Interface + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Ethernet Network Interface 0 +#define ETH0_ENABLE 1 + +// Connect to hardware via Driver_ETH# <0-255> +// Select driver control block for MAC and PHY interface +#define ETH0_DRIVER 1 + +// MAC Address +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x1E +#define ETH0_MAC1 0x1E + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define ETH0_MAC2 0x30 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define ETH0_MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0xA2 +#define ETH0_MAC4 0xA2 + +// Address byte 5 <0x00-0xff> +// Default: 0x45 +#define ETH0_MAC5 0x45 + +// Address byte 6 <0x00-0xff> +// Default: 0x5E +#define ETH0_MAC6 0x5E +// + +// IP Address +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define ETH0_IP4 100 +// + +// Subnet mask +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define ETH0_MASK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define ETH0_MASK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define ETH0_MASK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define ETH0_MASK4 0 +// + +// Default Gateway +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define ETH0_GW4 254 +// + +// Primary DNS Server +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_PRI_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_PRI_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_PRI_DNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define ETH0_PRI_DNS4 129 +// + +// Secondary DNS Server +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_SEC_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_SEC_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_SEC_DNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define ETH0_SEC_DNS4 130 +// + +// ARP Definitions +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ETH0_ARP_TAB_SIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ETH0_ARP_CACHE_TOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ETH0_ARP_MAX_RETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ETH0_ARP_RESEND_TOUT 2 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ETH0_ARP_NOTIFY 0 +// + +// IGMP Group Management +// Enable or disable Internet Group Management Protocol +#define ETH0_IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define ETH0_IGMP_TAB_SIZE 5 +// + +// NetBIOS Name Service +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define ETH0_NBNS_ENABLE 1 + +// Dynamic Host Configuration +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define ETH0_DHCP_ENABLE 1 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define ETH0_DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_BOOTFILE 0 + +// NTP Servers +// This value is optional. If enabled, a list of NTP Servers +// (option 42) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_NTP_SERVERS 0 +// + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h new file mode 100644 index 00000000..e659ce92 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_TCP.h + * Purpose: Network Configuration TCP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUM_SOCKS 10 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAX_RETRY 5 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRY_TOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFAULT_TOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAX_SEG_SIZE 1460 + +// Receive Window Size <536-65535> +// Receive Window Size specifies the size of data, +// that the socket is able to buffer in flow-control mode. +// Default: 4380 +#define TCP_RECEIVE_WIN_SIZE 4380 + +// + +// TCP Initial Retransmit period in seconds +#define TCP_INITIAL_RETRY_TOUT 1 + +// TCP SYN frame retransmit period in seconds +#define TCP_SYN_RETRY_TOUT 2 + +// Number of retries to establish a connection +#define TCP_CONNECT_RETRY 7 + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h new file mode 100644 index 00000000..b7995c22 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_UDP.h + * Purpose: Network Configuration UDP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-20> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUM_SOCKS 10 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c new file mode 100644 index 00000000..735089a4 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Debug.c + * Purpose: Network Debug Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Print Time Stamp +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 0 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 0 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 1 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 1 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Time debug messages +#define DBG_SNTP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 1 +// + +// Application Debug Definitions +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP_SERVER 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP_SERVER 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTP_CLIENT 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TELNET_SERVER 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP_SERVER 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTP_CLIENT 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP_CLIENT 1 +// + + +#include "net_debug.h" + + +/** + \fn void net_debug_init (void) + \brief Initialize Network Debug Interface. +*/ +void net_debug_init (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h new file mode 100644 index 00000000..631a7714 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h @@ -0,0 +1,28 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'EchoClient' + * Target: 'EchoClient' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ +#define RTE_Network_Core /* Network Core */ + #define RTE_Network_Debug /* Network Debug Version */ +#define RTE_Network_DNS_Client /* Network DNS Client */ +#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ +#define RTE_Network_Socket_BSD /* Network Socket BSD */ +#define RTE_Network_Socket_TCP /* Network Socket TCP */ +#define RTE_Network_Socket_UDP /* Network Socket UDP */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c new file mode 100644 index 00000000..3793d6dd --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c @@ -0,0 +1,287 @@ +/* echoclient.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#include "examples/echoclient/echoclient.h" + +void echoclient_test(void* args) +{ + SOCKET_T sockfd = 0; + + FILE* fin = stdin ; + FILE* fout = stdout; + + int inCreated = 0; + int outCreated = 0; + + char msg[1024]; + char reply[1024+1]; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + + int doDTLS = 0; + int doPSK = 0; + int sendSz; + int argc = 0; + char** argv = 0; + int port = yasslPort; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifndef CYASSL_MDK_ARM + argc = ((func_args*)args)->argc; + argv = ((func_args*)args)->argv; +#endif + + if (argc >= 2) { + fin = fopen(argv[1], "r"); + inCreated = 1; + } + if (argc >= 3) { + fout = fopen(argv[2], "w"); + outCreated = 1; + } + + if (!fin) err_sys("can't open input file"); + if (!fout) err_sys("can't open output file"); + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + +#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) + port = ((func_args*)args)->signal->port; +#endif +#if defined (CYASSL_CALLEE_PORT) + port = CYASSL_CALLEE_PORT ; +#endif + +#if defined(CYASSL_DTLS) + method = DTLSv1_client_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_client_method(); +#else + method = SSLv3_client_method(); +#endif + ctx = SSL_CTX_new(method); + +#ifndef NO_FILESYSTEM + #ifndef NO_RSA + if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif + #ifdef HAVE_ECC + if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif +#elif !defined(NO_CERTS) + if (!doPSK) + load_buffer(ctx, caCert, CYASSL_CA); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); +#endif + } + +#ifdef OPENSSL_EXTRA + SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = SSL_new(ctx); + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, yasslIP, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, yasslIP, port, 0); + } + + SSL_set_fd(ssl, sockfd); +#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) + /* let echoserver bind first, TODO: add Windows signal like pthreads does */ + Sleep(100); +#endif + + if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); + + while (fgets(msg, sizeof(msg), fin) != 0) { + + sendSz = (int)strlen(msg); + + if (SSL_write(ssl, msg, sendSz) != sendSz) + err_sys("SSL_write failed"); + + if (strncmp(msg, "quit", 4) == 0) { + fputs("sending server shutdown command: quit!\n", fout); + break; + } + + if (strncmp(msg, "break", 5) == 0) { + fputs("sending server session close: break!\n", fout); + break; + } + + #ifndef CYASSL_MDK_SHELL + while (sendSz) { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + else + break; + } + #else + { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + } + #endif + } + +#ifdef CYASSL_CMSIS_RTOS + osDelay(5000) ; +#endif + + +#ifdef CYASSL_DTLS + strncpy(msg, "break", 6); + sendSz = (int)strlen(msg); + /* try to tell server done */ + SSL_write(ssl, msg, sendSz); +#else + SSL_shutdown(ssl); +#endif + + SSL_free(ssl); + SSL_CTX_free(ctx); + + fflush(fout); + if (inCreated) fclose(fin); + if (outCreated) fclose(fout); + + CloseSocket(sockfd); + ((func_args*)args)->return_code = 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + + if (CurrentDir("echoclient") || CurrentDir("build")) + ChangeDirBack(2); + echoclient_test(&args); + + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + +#endif /* NO_MAIN_DRIVER */ + + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c new file mode 100644 index 00000000..ccfb92fc --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c @@ -0,0 +1,101 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include "cmsis_os.h" +#include "rl_fs.h" +#include "rl_net.h" +#include +#include "cyassl_MDK_ARM.h" +#include + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +static void init_filesystem (void) { + int32_t retv; + + retv = finit ("M0:"); + if (retv == 0) { + retv = fmount ("M0:"); + if (retv == 0) { + printf ("Drive M0 ready!\n"); + } + else { + printf ("Drive M0 mount failed!\n"); + } + } + else { + printf ("Drive M0 initialization failed!\n"); + } +} + +/*----------------------------------------------------------------------------- + * TCP/IP tasks + *----------------------------------------------------------------------------*/ +void tcp_poll (void const *arg) +{ + CYASSL_MSG("TCP polling started.\n") ; + while (1) { + net_main (); + osDelay(1) ; + } +} + +typedef struct func_args { + int argc; + char** argv; +} func_args; + +extern void echoclient_test(func_args * args) ; +extern void init_time(void) ; + + osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ +int myoptind = 0; +char* myoptarg = NULL; + +#include "config-EchoClient.h" + +int main() +{ + void *args = NULL ; + init_time() ; + init_filesystem (); + net_initialize() ; + osThreadCreate (osThread (tcp_poll), NULL); + osDelay(30000) ; /* wait for DHCP */ + #if defined(DEBUG_CYASSL) + printf("Turning ON Debug message\n") ; + CyaSSL_Debugging_ON() ; + #endif + + echoclient_test(args) ; + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt new file mode 100644 index 00000000..d43c94a3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt @@ -0,0 +1,24 @@ +This program is echo server with CyaSSL/wolfCrypt library. + +In order to run this program, +Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. +Set the server IP address in Net_Config_ETH_0.h +The server default port is 11111, defined in test.h. + +For further configuration, refer config-Crypt.h and config-CyaSSL.h. + +When testing this server, it is recommended to test against one of the standard +CyaSSL example applications running on a desktop machine. The standard CyaSSL +example applications are located in the CyaSSL root directory under the +/examples directory. + +For the hardware crypt on config-Crypt.h, download +STSW-STM32062: STM32F2xx standard peripherals library at +http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to + {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib + + +Support +------- +Please send questions or comments to support@wolfssl.com + \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx new file mode 100644 index 00000000..ba35f0f5 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx @@ -0,0 +1,1406 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + EchoServer + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + 0x20000408 + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 17 + 0 + 0 + 0 + 0 + .\echoserver.c + echoserver.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 0 + 0 + + + 2 + 4 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 5 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 6 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 10 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 11 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + PHY_ST802RT1.c + 1 + 0 + + + 6 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + EMAC_STM32F2xx.c + 1 + 0 + + + 6 + 15 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 16 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 18 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::Network + 0 + 0 + 0 + 1 + + 8 + 19 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + Net_Dbg_CM3_L.lib + 1 + 0 + + + 8 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config.c + Net_Config.c + 1 + 0 + + + 8 + 21 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_BSD.h + Net_Config_BSD.h + 1 + 0 + + + 8 + 22 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_DNS_Client.h + Net_Config_DNS_Client.h + 1 + 0 + + + 8 + 23 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_ETH_0.h + Net_Config_ETH_0.h + 1 + 0 + + + 8 + 24 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_TCP.h + Net_Config_TCP.h + 1 + 0 + + + 8 + 25 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_UDP.h + Net_Config_UDP.h + 1 + 0 + + + 8 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Debug.c + Net_Debug.c + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 9 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 9 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 9 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 9 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 9 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 9 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 9 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 9 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 9 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 9 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 9 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 9 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 9 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 9 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 9 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 9 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 9 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 9 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 9 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 9 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 9 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 9 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 9 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 9 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 9 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + crl.c + 1 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + internal.c + 1 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + io.c + 1 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + keys.c + 1 + 0 + + + 9 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + ocsp.c + 1 + 0 + + + 9 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + sniffer.c + 1 + 0 + + + 9 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + ssl.c + 1 + 0 + + + 9 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + tls.c + 1 + 0 + + + 9 + 69 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 9 + 70 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 1 + 0 + + + 9 + 71 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config.h + config.h + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx new file mode 100644 index 00000000..b8ce12e1 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx @@ -0,0 +1,1101 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + EchoServer + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + EchoServer + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_SimpleClient CYASSL_STM32F2xx + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + echoserver.c + 1 + .\echoserver.c + + + + + Configuration + + + config-CyaSSL.h + 5 + .\RTE\wolfSSL\config-CyaSSL.h + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + PHY_ST802RT1.c + 1 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + + + EMAC_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::Network + + + Net_Dbg_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + + + Net_Config.c + 1 + RTE\Network\Net_Config.c + + + Net_Config_BSD.h + 5 + RTE\Network\Net_Config_BSD.h + + + Net_Config_DNS_Client.h + 5 + RTE\Network\Net_Config_DNS_Client.h + + + Net_Config_ETH_0.h + 5 + RTE\Network\Net_Config_ETH_0.h + + + Net_Config_TCP.h + 5 + RTE\Network\Net_Config_TCP.h + + + Net_Config_UDP.h + 5 + RTE\Network\Net_Config_UDP.h + + + Net_Debug.c + 1 + RTE\Network\Net_Debug.c + + + + + ::wolfSSL + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + + + crl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + + + internal.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + + + io.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + + + keys.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + + + ocsp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + + + sniffer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + + + ssl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + + + tls.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config-CyaSSL.h + 5 + RTE\wolfSSL\config-CyaSSL.h + + + config.h + 5 + RTE\wolfSSL\config.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + + + RTE\Network\Net_Debug.c + + + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-CyaSSL.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config-CyaSSL.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..54b3e0bf --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 5 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 250 +#endif + +// Main Thread stack size [bytes] <64-20000:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 2000 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 2 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 2500 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-64000:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..4a09246f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 1 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..c4e2ab9f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00002000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00007000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c new file mode 100644 index 00000000..6b9dc8e0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config.c + * Purpose: Network Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Definitions +// Global Network System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "my_host" +#define NET_HOST_NAME "my_host" + +// Memory Pool size <1536-262144:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// Network packets are allocated from this memory pool. +// Default: 12000 bytes +#define NET_MEM_SIZE 3000 + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_Network_Interface_ETH_0 +#include "Net_Config_ETH_0.h" +#endif +#ifdef RTE_Network_Interface_ETH_1 +#include "Net_Config_ETH_1.h" +#endif + +#ifdef RTE_Network_Interface_PPP_0 +#include "Net_Config_PPP_0.h" +#endif +#ifdef RTE_Network_Interface_PPP_1 +#include "Net_Config_PPP_1.h" +#endif + +#ifdef RTE_Network_Interface_SLIP_0 +#include "Net_Config_SLIP_0.h" +#endif +#ifdef RTE_Network_Interface_SLIP_1 +#include "Net_Config_SLIP_1.h" +#endif + +#ifdef RTE_Network_Socket_UDP +#include "Net_Config_UDP.h" +#endif +#ifdef RTE_Network_Socket_TCP +#include "Net_Config_TCP.h" +#endif +#ifdef RTE_Network_Socket_BSD +#include "Net_Config_BSD.h" +#endif + +#ifdef RTE_Network_Web_Server_RO +#include "Net_Config_HTTP_Server.h" +#endif +#ifdef RTE_Network_Web_Server_FS +#include "Net_Config_HTTP_Server.h" +#endif + +#ifdef RTE_Network_Telnet_Server +#include "Net_Config_Telnet_Server.h" +#endif + +#ifdef RTE_Network_TFTP_Server +#include "Net_Config_TFTP_Server.h" +#endif +#ifdef RTE_Network_TFTP_Client +#include "Net_Config_TFTP_Client.h" +#endif + +#ifdef RTE_Network_FTP_Server +#include "Net_Config_FTP_Server.h" +#endif +#ifdef RTE_Network_FTP_Client +#include "Net_Config_FTP_Client.h" +#endif + +#ifdef RTE_Network_DNS_Client +#include "Net_Config_DNS_Client.h" +#endif + +#ifdef RTE_Network_SMTP_Client +#include "Net_Config_SMTP_Client.h" +#endif + +#ifdef RTE_Network_SNMP_Agent +#include "Net_Config_SNMP_Agent.h" +#endif + +#ifdef RTE_Network_SNTP_Client +#include "Net_Config_SNTP_Client.h" +#endif + +#include "net_config.h" + +/** +\addtogroup net_genFunc +@{ +*/ +/** + \fn void net_sys_error (ERROR_CODE error) + \ingroup net_cores + \brief Network system error handler. +*/ +void net_sys_error (ERROR_CODE error) { + /* This function is called when a fatal error is encountered. */ + /* The normal program execution is not possible anymore. */ + + switch (error) { + case ERR_MEM_ALLOC: + /* Out of memory */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer Corrupted */ + /* More data written than the size of allocated mem block */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state */ + break; + } + + /* End-less loop */ + while (1); +} +/** +@} +*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h new file mode 100644 index 00000000..4166a0a2 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_BSD.h + * Purpose: Network Configuration BSD Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Berkley (BSD) Sockets +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUM_SOCKS 15 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SERVER_SOCKS 1 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RECEIVE_TOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_HOSTNAME_ENABLE 0 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h new file mode 100644 index 00000000..d30b7180 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Service + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_DNS_Client.h + * Purpose: Network Configuration DNS Client + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// DNS Client +#define DNS_CLIENT_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_CLIENT_TAB_SIZE 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h new file mode 100644 index 00000000..9a49f382 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h @@ -0,0 +1,222 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Interface + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_ETH_0.h + * Purpose: Network Configuration ETH Interface + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Ethernet Network Interface 0 +#define ETH0_ENABLE 1 + +// Connect to hardware via Driver_ETH# <0-255> +// Select driver control block for MAC and PHY interface +#define ETH0_DRIVER 1 + +// MAC Address +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x1E +#define ETH0_MAC1 0x1E + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define ETH0_MAC2 0x30 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define ETH0_MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0xA2 +#define ETH0_MAC4 0xA2 + +// Address byte 5 <0x00-0xff> +// Default: 0x45 +#define ETH0_MAC5 0x45 + +// Address byte 6 <0x00-0xff> +// Default: 0x5E +#define ETH0_MAC6 0x5E +// + +// IP Address +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define ETH0_IP4 100 +// + +// Subnet mask +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define ETH0_MASK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define ETH0_MASK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define ETH0_MASK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define ETH0_MASK4 0 +// + +// Default Gateway +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define ETH0_GW4 254 +// + +// Primary DNS Server +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_PRI_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_PRI_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_PRI_DNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define ETH0_PRI_DNS4 129 +// + +// Secondary DNS Server +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_SEC_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_SEC_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_SEC_DNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define ETH0_SEC_DNS4 130 +// + +// ARP Definitions +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ETH0_ARP_TAB_SIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ETH0_ARP_CACHE_TOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ETH0_ARP_MAX_RETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ETH0_ARP_RESEND_TOUT 2 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ETH0_ARP_NOTIFY 0 +// + +// IGMP Group Management +// Enable or disable Internet Group Management Protocol +#define ETH0_IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define ETH0_IGMP_TAB_SIZE 5 +// + +// NetBIOS Name Service +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define ETH0_NBNS_ENABLE 1 + +// Dynamic Host Configuration +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define ETH0_DHCP_ENABLE 0 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define ETH0_DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_BOOTFILE 0 + +// NTP Servers +// This value is optional. If enabled, a list of NTP Servers +// (option 42) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_NTP_SERVERS 0 +// + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h new file mode 100644 index 00000000..9d5b419e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_TCP.h + * Purpose: Network Configuration TCP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUM_SOCKS 15 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAX_RETRY 5 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRY_TOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFAULT_TOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAX_SEG_SIZE 1460 + +// Receive Window Size <536-65535> +// Receive Window Size specifies the size of data, +// that the socket is able to buffer in flow-control mode. +// Default: 4380 +#define TCP_RECEIVE_WIN_SIZE 4380 + +// + +// TCP Initial Retransmit period in seconds +#define TCP_INITIAL_RETRY_TOUT 1 + +// TCP SYN frame retransmit period in seconds +#define TCP_SYN_RETRY_TOUT 2 + +// Number of retries to establish a connection +#define TCP_CONNECT_RETRY 7 + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h new file mode 100644 index 00000000..113f314a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_UDP.h + * Purpose: Network Configuration UDP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-20> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUM_SOCKS 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c new file mode 100644 index 00000000..735089a4 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Debug.c + * Purpose: Network Debug Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Print Time Stamp +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 0 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 0 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 1 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 1 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Time debug messages +#define DBG_SNTP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 1 +// + +// Application Debug Definitions +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP_SERVER 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP_SERVER 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTP_CLIENT 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TELNET_SERVER 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP_SERVER 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTP_CLIENT 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP_CLIENT 1 +// + + +#include "net_debug.h" + + +/** + \fn void net_debug_init (void) + \brief Initialize Network Debug Interface. +*/ +void net_debug_init (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h new file mode 100644 index 00000000..20773df0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h @@ -0,0 +1,28 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'EchoServer' + * Target: 'EchoServer' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ +#define RTE_Network_Core /* Network Core */ + #define RTE_Network_Debug /* Network Debug Version */ +#define RTE_Network_DNS_Client /* Network DNS Client */ +#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ +#define RTE_Network_Socket_BSD /* Network Socket BSD */ +#define RTE_Network_Socket_TCP /* Network Socket TCP */ +#define RTE_Network_Socket_UDP /* Network Socket UDP */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c new file mode 100644 index 00000000..132e4c6d --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c @@ -0,0 +1,370 @@ +/* echoserver.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include +#include + +#ifndef NO_MAIN_DRIVER + #define ECHO_OUT +#endif + +#include "examples/echoserver/echoserver.h" + + +#ifdef SESSION_STATS + CYASSL_API void PrintSessionStats(void); +#endif + +#define SVR_COMMAND_SIZE 256 + +static void SignalReady(void* args, int port) +{ +#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) + /* signal ready to tcp_accept */ + func_args* server_args = (func_args*)args; + tcp_ready* ready = server_args->signal; + pthread_mutex_lock(&ready->mutex); + ready->ready = 1; + ready->port = port; + pthread_cond_signal(&ready->cond); + pthread_mutex_unlock(&ready->mutex); +#endif + (void)args; + (void)port; +} + + +THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) +{ + SOCKET_T sockfd = 0; + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + + int doDTLS = 0; + int doPSK = 0; + int outCreated = 0; + int shutDown = 0; + int useAnyAddr = 0; + int port = yasslPort; + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + +#ifdef ECHO_OUT + FILE* fout = stdout; + if (argc >= 2) { + fout = fopen(argv[1], "w"); + outCreated = 1; + } + if (!fout) err_sys("can't open output file"); +#endif + (void)outCreated; + (void)argc; + (void)argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + + #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ + !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_ARM) + port = 0; + #endif + #if defined(USE_ANY_ADDR) + useAnyAddr = 1; + #endif + tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); + +#if defined(CYASSL_DTLS) + method = CyaDTLSv1_server_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_server_method(); +#else + method = CyaSSLv3_server_method(); +#endif + ctx = CyaSSL_CTX_new(method); + /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#ifndef NO_FILESYSTEM + if (doPSK == 0) { + #ifdef HAVE_NTRU + /* ntru */ + if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load ntru cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) + != SSL_SUCCESS) + err_sys("can't load ntru key file, " + "Please run from CyaSSL home dir"); + #elif defined(HAVE_ECC) + /* ecc */ + if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #elif defined(NO_CERTS) + /* do nothing, just don't load cert files */ + #else + /* normal */ + if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #endif + } /* doPSK */ +#elif !defined(NO_CERTS) + if (!doPSK) { + load_buffer(ctx, svrCert, CYASSL_CERT); + load_buffer(ctx, svrKey, CYASSL_KEY); + } +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 2"); +#endif + } + + SignalReady(args, port); + + while (!shutDown) { + CYASSL* ssl = 0; + char command[SVR_COMMAND_SIZE+1]; + int echoSz = 0; + int clientfd; + int firstRead = 1; + int gotFirstG = 0; + +#ifndef CYASSL_DTLS + SOCKADDR_IN_T client; + socklen_t client_len = sizeof(client); + clientfd = accept(sockfd, (struct sockaddr*)&client, + (ACCEPT_THIRD_T)&client_len); +#else + clientfd = udp_read_connect(sockfd); +#endif + if (clientfd == -1) err_sys("tcp accept failed"); + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) err_sys("SSL_new failed"); + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + CyaSSL_set_fd(ssl, clientfd); + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #elif !defined(NO_CERTS) + SetDH(ssl); /* will repick suites with DHE, higher than PSK */ + #endif + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + printf("SSL_accept failed\n"); + CyaSSL_free(ssl); + CloseSocket(clientfd); + continue; + } +#if defined(PEER_INFO) + showPeer(ssl); +#endif + + while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { + + if (firstRead == 1) { + firstRead = 0; /* browser may send 1 byte 'G' to start */ + if (echoSz == 1 && command[0] == 'G') { + gotFirstG = 1; + continue; + } + } + else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { + strncpy(command, "GET", 4); + /* fall through to normal GET */ + } + + if ( strncmp(command, "quit", 4) == 0) { + printf("client sent quit command: shutting down!\n"); + shutDown = 1; + break; + } + if ( strncmp(command, "break", 5) == 0) { + printf("client sent break command: closing session!\n"); + break; + } +#ifdef SESSION_STATS + if ( strncmp(command, "printstats", 10) == 0) { + PrintSessionStats(); + break; + } +#endif + if ( strncmp(command, "GET", 3) == 0) { + char type[] = "HTTP/1.0 200 ok\r\nContent-type:" + " text/html\r\n\r\n"; + char header[] = "\n
\n";
+                char body[]   = "greetings from CyaSSL\n";
+                char footer[] = "\r\n\r\n";
+            
+                strncpy(command, type, sizeof(type));
+                echoSz = sizeof(type) - 1;
+
+                strncpy(&command[echoSz], header, sizeof(header));
+                echoSz += (int)sizeof(header) - 1;
+                strncpy(&command[echoSz], body, sizeof(body));
+                echoSz += (int)sizeof(body) - 1;
+                strncpy(&command[echoSz], footer, sizeof(footer));
+                echoSz += (int)sizeof(footer);
+
+                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                    err_sys("SSL_write failed");
+                break;
+            }
+            command[echoSz] = 0;
+
+            #ifdef ECHO_OUT
+                fputs(command, fout);
+            #endif
+
+            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                err_sys("SSL_write failed");
+        }
+#ifndef CYASSL_DTLS
+        CyaSSL_shutdown(ssl);
+#endif
+        CyaSSL_free(ssl);
+        CloseSocket(clientfd);
+#ifdef CYASSL_DTLS
+        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
+        SignalReady(args, port);
+#endif
+    }
+#ifdef CYASSL_CMSIS_RTOS
+    osDelay(5000) ;
+#endif
+    CloseSocket(sockfd);
+    CyaSSL_CTX_free(ctx);
+
+#ifdef ECHO_OUT
+    if (outCreated)
+        fclose(fout);
+#endif
+
+    ((func_args*)args)->return_code = 0;
+    return 0;
+}
+
+
+/* so overall tests can pull in test function */
+#ifndef NO_MAIN_DRIVER
+
+    int main(int argc, char** argv)
+    {
+        func_args args;
+
+#ifdef HAVE_CAVIUM
+        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
+        if (ret != 0)
+            err_sys("Cavium OpenNitroxDevice failed");
+#endif /* HAVE_CAVIUM */
+
+        StartTCP();
+
+        args.argc = argc;
+        args.argv = argv;
+
+        CyaSSL_Init();
+#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
+        CyaSSL_Debugging_ON();
+#endif
+        if (CurrentDir("echoserver") || CurrentDir("build"))
+            ChangeDirBack(2);
+        echoserver_test(&args);
+        CyaSSL_Cleanup();
+
+#ifdef HAVE_CAVIUM
+        CspShutdown(CAVIUM_DEV_ID);
+#endif
+        return args.return_code;
+    }
+
+        
+#endif /* NO_MAIN_DRIVER */
+
+
+
+
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c
new file mode 100644
index 00000000..3947b13a
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c
@@ -0,0 +1,99 @@
+/* main.c
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+ 
+#ifdef HAVE_CONFIG_H
+    #include 
+#endif
+
+#include 
+#include 
+
+#include "cmsis_os.h"
+#include "rl_fs.h" 
+#include "rl_net.h" 
+#include 
+#include "cyassl_MDK_ARM.h"
+#include 
+
+/*-----------------------------------------------------------------------------
+ *        Initialize a Flash Memory Card
+ *----------------------------------------------------------------------------*/
+static void init_filesystem (void) {
+    int32_t retv;
+
+    retv = finit ("M0:");
+    if (retv == 0) {
+        retv = fmount ("M0:");
+        if (retv == 0) {
+            printf ("Drive M0 ready!\n");
+        }
+        else {
+          printf ("Drive M0 mount failed!\n");
+        }
+    } else {
+        printf ("Drive M0 initialization failed!\n");
+    }
+}
+
+/*-----------------------------------------------------------------------------
+ *        TCP/IP tasks
+ *----------------------------------------------------------------------------*/
+void tcp_poll (void const *arg)
+{
+    CYASSL_MSG("TCP polling started.\n") ;
+    while (1) {
+        net_main ();
+        osDelay(1) ;
+    }
+}
+
+typedef struct func_args {
+    int    argc;
+    char** argv;
+} func_args;
+
+extern void echoserver_test(func_args * args) ;
+extern void init_time(void) ;
+
+    osThreadDef (tcp_poll, osPriorityHigh, 1, 0) ;
+/*-----------------------------------------------------------------------------
+ *       mian entry 
+ *----------------------------------------------------------------------------*/
+int myoptind = 0;
+char* myoptarg = NULL;
+
+int main() 
+{
+    void *args = NULL ;
+    init_time() ;
+    init_filesystem ();
+    net_initialize() ;
+    osThreadCreate (osThread (tcp_poll), NULL); 
+    osDelay(10000) ;  /* wait for DHCP */
+    #if defined(DEBUG_CYASSL)
+        printf("Turning ON Debug message\n") ;
+        CyaSSL_Debugging_ON() ;
+    #endif
+
+        printf("echoserver: Started\n") ;
+    echoserver_test(args) ;
+    printf("echoserver: Terminated\n") ;
+}
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt
new file mode 100644
index 00000000..39ab9e9e
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt
@@ -0,0 +1,22 @@
+This program is a simple client example with CyaSSL/wolfCrypt library.
+
+In order to run this program,
+Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory.
+Set config-SimpleClient.h configuration file for the Callee IP or Port number.
+
+For further configuration, refer config-Crypt.h and config-CyaSSL.h.
+
+When testing this client, it is recommended to test against one of the standard 
+CyaSSL example applications running on a desktop machine.  The standard CyaSSL 
+example applications are located in the CyaSSL root directory under the 
+/examples directory.
+
+For the hardware crypt on config-Crypt.h, download 
+STSW-STM32062: STM32F2xx standard peripherals library at 
+http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to 
+ {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
+
+
+Support
+-------
+Please send questions or comments to support@wolfssl.com
\ No newline at end of file
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c
new file mode 100644
index 00000000..54b3e0bf
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c
@@ -0,0 +1,276 @@
+/*----------------------------------------------------------------------------
+ *      RL-ARM - RTX
+ *----------------------------------------------------------------------------
+ *      Name:    RTX_Conf_CM.C
+ *      Purpose: Configuration of CMSIS RTX Kernel for Cortex-M
+ *      Rev.:    V4.70
+ *----------------------------------------------------------------------------
+ *
+ * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
+ * All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *  - Neither the name of ARM  nor the names of its contributors may be used 
+ *    to endorse or promote products derived from this software without 
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *---------------------------------------------------------------------------*/
+
+#include "cmsis_os.h"
+
+
+/*----------------------------------------------------------------------------
+ *      RTX User configuration part BEGIN
+ *---------------------------------------------------------------------------*/
+
+//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
+//
+// Thread Configuration
+// =======================
+//
+//   Number of concurrent running threads <0-250>
+//    Defines max. number of threads that will run at the same time.
+//    Default: 6
+#ifndef OS_TASKCNT
+ #define OS_TASKCNT     5
+#endif
+
+//   Default Thread stack size [bytes] <64-4096:8><#/4>
+//    Defines default stack size for threads with osThreadDef stacksz = 0
+//    Default: 200
+#ifndef OS_STKSIZE
+ #define OS_STKSIZE     250
+#endif
+
+//   Main Thread stack size [bytes] <64-20000:8><#/4>
+//    Defines stack size for main thread.
+//    Default: 200
+#ifndef OS_MAINSTKSIZE
+ #define OS_MAINSTKSIZE 2000
+#endif
+
+//   Number of threads with user-provided stack size <0-250>
+//    Defines the number of threads with user-provided stack size.
+//    Default: 0
+#ifndef OS_PRIVCNT
+ #define OS_PRIVCNT     2
+#endif
+
+//   Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4>
+//    Defines the combined stack size for threads with user-provided stack size.
+//    Default: 0
+#ifndef OS_PRIVSTKSIZE
+ #define OS_PRIVSTKSIZE 2500
+#endif
+
+// Check for stack overflow
+//  Includes the stack checking code for stack overflow.
+//  Note that additional code reduces the Kernel performance.
+#ifndef OS_STKCHECK
+ #define OS_STKCHECK    1
+#endif
+
+// Processor mode for thread execution 
+//   <0=> Unprivileged mode 
+//   <1=> Privileged mode
+//  Default: Privileged mode
+#ifndef OS_RUNPRIV
+ #define OS_RUNPRIV     1
+#endif
+
+// 
+
+// RTX Kernel Timer Tick Configuration
+// ======================================
+//  Use Cortex-M SysTick timer as RTX Kernel Timer
+//  Use the Cortex-M SysTick timer as a time-base for RTX.
+#ifndef OS_SYSTICK
+ #define OS_SYSTICK     1
+#endif
+//
+//   Timer clock value [Hz] <1-1000000000>
+//    Defines the timer clock value.
+//    Default: 12000000  (12MHz)
+#ifndef OS_CLOCK
+ #define OS_CLOCK       12000000
+#endif
+
+//   Timer tick value [us] <1-1000000>
+//    Defines the timer tick value.
+//    Default: 1000  (1ms)
+#ifndef OS_TICK
+ #define OS_TICK        1000
+#endif
+
+// 
+
+// System Configuration
+// =======================
+//
+// Round-Robin Thread switching
+// ===============================
+//
+//  Enables Round-Robin Thread switching.
+#ifndef OS_ROBIN
+ #define OS_ROBIN       1
+#endif
+
+//   Round-Robin Timeout [ticks] <1-1000>
+//    Defines how long a thread will execute before a thread switch.
+//    Default: 5
+#ifndef OS_ROBINTOUT
+ #define OS_ROBINTOUT   5
+#endif
+
+// 
+
+// User Timers
+// ==============
+//    Enables user Timers
+#ifndef OS_TIMERS
+ #define OS_TIMERS      1
+#endif
+
+//   Timer Thread Priority
+//                        <1=> Low
+//     <2=> Below Normal  <3=> Normal  <4=> Above Normal
+//                        <5=> High
+//                        <6=> Realtime (highest)
+//    Defines priority for Timer Thread
+//    Default: High
+#ifndef OS_TIMERPRIO
+ #define OS_TIMERPRIO   5
+#endif
+
+//   Timer Thread stack size [bytes] <64-64000:8><#/4>
+//    Defines stack size for Timer thread.
+//    Default: 200
+#ifndef OS_TIMERSTKSZ
+ #define OS_TIMERSTKSZ  50
+#endif
+
+//   Timer Callback Queue size <1-32>
+//    Number of concurrent active timer callback functions.
+//    Default: 4
+#ifndef OS_TIMERCBQS
+ #define OS_TIMERCBQS   4
+#endif
+
+// 
+
+//   ISR FIFO Queue size<4=>   4 entries  <8=>   8 entries
+//                         <12=> 12 entries  <16=> 16 entries
+//                         <24=> 24 entries  <32=> 32 entries
+//                         <48=> 48 entries  <64=> 64 entries
+//                         <96=> 96 entries
+//    ISR functions store requests to this buffer,
+//    when they are called from the interrupt handler.
+//    Default: 16 entries
+#ifndef OS_FIFOSZ
+ #define OS_FIFOSZ      16
+#endif
+
+// 
+
+//------------- <<< end of configuration section >>> -----------------------
+
+// Standard library system mutexes
+// ===============================
+//  Define max. number system mutexes that are used to protect 
+//  the arm standard runtime library. For microlib they are not used.
+#ifndef OS_MUTEXCNT
+ #define OS_MUTEXCNT    8
+#endif
+
+/*----------------------------------------------------------------------------
+ *      RTX User configuration part END
+ *---------------------------------------------------------------------------*/
+
+#define OS_TRV          ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1)
+
+
+/*----------------------------------------------------------------------------
+ *      Global Functions
+ *---------------------------------------------------------------------------*/
+
+/*--------------------------- os_idle_demon ---------------------------------*/
+
+void os_idle_demon (void) {
+  /* The idle demon is a system thread, running when no other thread is      */
+  /* ready to run.                                                           */
+
+  for (;;) {
+    /* HERE: include optional user code to be executed when no thread runs.*/
+  }
+}
+
+#if (OS_SYSTICK == 0)   // Functions for alternative timer as RTX kernel timer
+
+/*--------------------------- os_tick_init ----------------------------------*/
+
+// Initialize alternative hardware timer as RTX kernel timer
+// Return: IRQ number of the alternative hardware timer
+int os_tick_init (void) {
+  return (-1);  /* Return IRQ number of timer (0..239) */
+}
+
+/*--------------------------- os_tick_val -----------------------------------*/
+
+// Get alternative hardware timer current value (0 .. OS_TRV)
+uint32_t os_tick_val (void) {
+  return (0);
+}
+
+/*--------------------------- os_tick_ovf -----------------------------------*/
+
+// Get alternative hardware timer overflow flag
+// Return: 1 - overflow, 0 - no overflow
+uint32_t os_tick_ovf (void) {
+  return (0);
+}
+
+/*--------------------------- os_tick_irqack --------------------------------*/
+
+// Acknowledge alternative hardware timer interrupt
+void os_tick_irqack (void) {
+  /* ... */
+}
+
+#endif   // (OS_SYSTICK == 0)
+
+/*--------------------------- os_error --------------------------------------*/
+
+void os_error (uint32_t err_code) {
+  /* This function is called when a runtime error is detected. Parameter */
+  /* 'err_code' holds the runtime error code (defined in RTL.H).         */
+
+  /* HERE: include optional code to be executed on runtime error. */
+  for (;;);
+}
+
+
+/*----------------------------------------------------------------------------
+ *      RTX Configuration Functions
+ *---------------------------------------------------------------------------*/
+
+#include "RTX_CM_lib.h"
+
+/*----------------------------------------------------------------------------
+ * end of file
+ *---------------------------------------------------------------------------*/
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h
new file mode 100644
index 00000000..4a09246f
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h
@@ -0,0 +1,3127 @@
+/* -----------------------------------------------------------------------------
+ * Copyright (C) 2013 ARM Limited. All rights reserved.
+ *  
+ * $Date:        27. June 2013
+ * $Revision:    V1.01
+ *  
+ * Project:      RTE Device Configuration for ST STM32F2xx
+ * -------------------------------------------------------------------------- */
+
+//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
+
+#ifndef __RTE_DEVICE_H
+#define __RTE_DEVICE_H
+
+
+#define GPIO_PORT(num) \
+ ((num == 0) ? GPIOA : \
+  (num == 1) ? GPIOB : \
+  (num == 2) ? GPIOC : \
+  (num == 3) ? GPIOD : \
+  (num == 4) ? GPIOE : \
+  (num == 5) ? GPIOF : \
+  (num == 6) ? GPIOG : \
+  (num == 7) ? GPIOH : \
+  (num == 8) ? GPIOI : \
+  NULL)
+
+
+//  Clock Configuration
+//    High-speed Internal Clock <1-999999999>
+#define RTE_HSI                         16000000
+//    High-speed External Clock <1-999999999>
+#define RTE_HSE                         25000000
+//    System Clock <1-999999999>
+#define RTE_SYSCLK                      120000000
+//    AHB Clock    <1-999999999>
+#define RTE_HCLK                        120000000
+//    APB1 Clock   <1-999999999>
+#define RTE_PCLK1                       30000000
+//    APB2 Clock   <1-999999999>
+#define RTE_PCLK2                       60000000
+//       48MHz Clock
+#define RTE_PLL48CK                     48000000
+// 
+
+
+//  USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1]
+//  Configuration settings for Driver_UART1 in component ::Drivers:UART
+#define RTE_USART1                      0
+
+//    USART1_TX Pin <0=>PA9 <1=>PB6
+#define RTE_USART1_TX_ID                0
+#if    (RTE_USART1_TX_ID == 0)
+#define RTE_USART1_TX_PORT              GPIOA
+#define RTE_USART1_TX_BIT               9
+#elif  (RTE_USART1_TX_ID == 1)
+#define RTE_USART1_TX_PORT              GPIOB
+#define RTE_USART1_TX_BIT               6
+#else
+#error "Invalid USART1_TX Pin Configuration!"
+#endif
+
+//    USART1_RX Pin <0=>PA10 <1=>PB7
+#define RTE_USART1_RX_ID                0
+#if    (RTE_USART1_RX_ID == 0)
+#define RTE_USART1_RX_PORT              GPIOA
+#define RTE_USART1_RX_BIT               10
+#elif  (RTE_USART1_RX_ID == 1)
+#define RTE_USART1_RX_PORT              GPIOB
+#define RTE_USART1_RX_BIT               7
+#else
+#error "Invalid USART1_RX Pin Configuration!"
+#endif
+
+//      Synchronous
+//        USART1_CK Pin <0=>PA8
+//     
+#define RTE_USART1_CK                   0
+#define RTE_USART1_CK_ID                0
+#if    (RTE_USART1_CK_ID == 0)
+#define RTE_USART1_CK_PORT              GPIOA
+#define RTE_USART1_CK_BIT               8
+#else
+#error "Invalid USART1_CK Pin Configuration!"
+#endif
+
+//      Hardware flow control
+//        USART1_CTS Pin <0=>PA11
+//        USART1_RTS Pin <0=>PA12
+//        Manual CTS/RTS
+//     
+#define RTE_USART1_HW_FLOW              0
+#define RTE_USART1_CTS_ID               0
+#define RTE_USART1_RTS_ID               0
+#define RTE_USART1_MANUAL_FLOW          0
+#if    (RTE_USART1_CTS_ID == 0)
+#define RTE_USART1_CTS_PORT             GPIOA
+#define RTE_USART1_CTS_BIT              11
+#else
+#error "Invalid USART1_CTS Pin Configuration!"
+#endif
+#if    (RTE_USART1_RTS_ID == 0)
+#define RTE_USART1_RTS_PORT             GPIOA
+#define RTE_USART1_RTS_BIT              12
+#else
+#error "Invalid USART1_RTS Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <2=>2 <5=>5
+//       Selects DMA Stream (only Stream 2 or 5 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART1_RX_DMA               1
+#define RTE_USART1_RX_DMA_NUMBER        2
+#define RTE_USART1_RX_DMA_STREAM        2
+#define RTE_USART1_RX_DMA_CHANNEL       4
+#define RTE_USART1_RX_DMA_PRIORITY      0
+
+//    DMA Tx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <7=>7
+//       Selects DMA Stream (only Stream 7 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART1_TX_DMA               1
+#define RTE_USART1_TX_DMA_NUMBER        2
+#define RTE_USART1_TX_DMA_STREAM        7
+#define RTE_USART1_TX_DMA_CHANNEL       4
+#define RTE_USART1_TX_DMA_PRIORITY      0
+
+// 
+
+
+//  USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2]
+//  Configuration settings for Driver_UART2 in component ::Drivers:UART
+#define RTE_USART2                      0
+
+//    USART2_TX Pin <0=>PA2 <1=>PD5
+#define RTE_USART2_TX_ID                0
+#if    (RTE_USART2_TX_ID == 0)
+#define RTE_USART2_TX_PORT              GPIOA
+#define RTE_USART2_TX_BIT               2
+#elif  (RTE_USART2_TX_ID == 1)
+#define RTE_USART2_TX_PORT              GPIOD
+#define RTE_USART2_TX_BIT               5
+#else
+#error "Invalid USART2_TX Pin Configuration!"
+#endif
+
+//    USART2_RX Pin <0=>PA3 <1=>PD6
+#define RTE_USART2_RX_ID                0
+#if    (RTE_USART2_RX_ID == 0)
+#define RTE_USART2_RX_PORT              GPIOA
+#define RTE_USART2_RX_BIT               3
+#elif  (RTE_USART2_RX_ID == 1)
+#define RTE_USART2_RX_PORT              GPIOD
+#define RTE_USART2_RX_BIT               6
+#else
+#error "Invalid USART2_RX Pin Configuration!"
+#endif
+
+//      Synchronous
+//        USART2_CK Pin <0=>PA4 <1=>PD7
+//     
+#define RTE_USART2_CK                   0
+#define RTE_USART2_CK_ID                0
+#if    (RTE_USART2_CK_ID == 0)
+#define RTE_USART2_CK_PORT              GPIOA
+#define RTE_USART2_CK_BIT               4
+#elif  (RTE_USART2_CK_ID == 1)
+#define RTE_USART2_CK_PORT              GPIOD
+#define RTE_USART2_CK_BIT               7
+#else
+#error "Invalid USART2_CK Pin Configuration!"
+#endif
+
+//      Hardware flow control
+//        USART2_CTS Pin <0=>PA0 <1=>PD3
+//        USART2_RTS Pin <0=>PA1 <1=>PD4
+//        Manual CTS/RTS
+//     
+#define RTE_USART2_HW_FLOW              0
+#define RTE_USART2_CTS_ID               0
+#define RTE_USART2_RTS_ID               0
+#define RTE_USART2_MANUAL_FLOW          0
+#if    (RTE_USART2_CTS_ID == 0)
+#define RTE_USART2_CTS_PORT             GPIOA
+#define RTE_USART2_CTS_BIT              0
+#elif  (RTE_USART2_CTS_ID == 1)
+#define RTE_USART2_CTS_PORT             GPIOD
+#define RTE_USART2_CTS_BIT              3
+#else
+#error "Invalid USART2_CTS Pin Configuration!"
+#endif
+#if    (RTE_USART2_RTS_ID == 0)
+#define RTE_USART2_RTS_PORT             GPIOA
+#define RTE_USART2_RTS_BIT              1
+#elif  (RTE_USART2_RTS_ID == 1)
+#define RTE_USART2_RTS_PORT             GPIOD
+#define RTE_USART2_RTS_BIT              4
+#else
+#error "Invalid USART2_RTS Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <5=>5
+//       Selects DMA Stream (only Stream 5 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART2_RX_DMA               1
+#define RTE_USART2_RX_DMA_NUMBER        1
+#define RTE_USART2_RX_DMA_STREAM        5
+#define RTE_USART2_RX_DMA_CHANNEL       4
+#define RTE_USART2_RX_DMA_PRIORITY      0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <6=>6
+//       Selects DMA Stream (only Stream 6 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART2_TX_DMA               1
+#define RTE_USART2_TX_DMA_NUMBER        1
+#define RTE_USART2_TX_DMA_STREAM        6
+#define RTE_USART2_TX_DMA_CHANNEL       4
+#define RTE_USART2_TX_DMA_PRIORITY      0
+
+// 
+
+
+//  USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3]
+//  Configuration settings for Driver_UART3 in component ::Drivers:UART
+#define RTE_USART3                      0
+
+//    USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8
+#define RTE_USART3_TX_ID                0
+#if    (RTE_USART3_TX_ID == 0)
+#define RTE_USART3_TX_PORT              GPIOB
+#define RTE_USART3_TX_BIT               10
+#elif  (RTE_USART3_TX_ID == 1)
+#define RTE_USART3_TX_PORT              GPIOC
+#define RTE_USART3_TX_BIT               10
+#elif  (RTE_USART3_TX_ID == 2)
+#define RTE_USART3_TX_PORT              GPIOD
+#define RTE_USART3_TX_BIT               8
+#else
+#error "Invalid USART3_TX Pin Configuration!"
+#endif
+
+//    USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9
+#define RTE_USART3_RX_ID                0
+#if    (RTE_USART3_RX_ID == 0)
+#define RTE_USART3_RX_PORT              GPIOB
+#define RTE_USART3_RX_BIT               11
+#elif  (RTE_USART3_RX_ID == 1)
+#define RTE_USART3_RX_PORT              GPIOC
+#define RTE_USART3_RX_BIT               11
+#elif  (RTE_USART3_RX_ID == 2)
+#define RTE_USART3_RX_PORT              GPIOD
+#define RTE_USART3_RX_BIT               9
+#else
+#error "Invalid USART3_RX Pin Configuration!"
+#endif
+
+//      Synchronous
+//        USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10
+//     
+#define RTE_USART3_CK                   0
+#define RTE_USART3_CK_ID                0
+#if    (RTE_USART3_CK_ID == 0)
+#define RTE_USART3_CK_PORT              GPIOB
+#define RTE_USART3_CK_BIT               12
+#elif  (RTE_USART3_CK_ID == 1)
+#define RTE_USART3_CK_PORT              GPIOC
+#define RTE_USART3_CK_BIT               12
+#elif  (RTE_USART3_CK_ID == 2)
+#define RTE_USART3_CK_PORT              GPIOD
+#define RTE_USART3_CK_BIT               10
+#else
+#error "Invalid USART3_CK Pin Configuration!"
+#endif
+
+//      Hardware flow control
+//        USART3_CTS Pin <0=>PB13 <1=>PD11
+//        USART3_RTS Pin <0=>PB14 <1=>PD12
+//        Manual CTS/RTS
+//     
+#define RTE_USART3_HW_FLOW              0
+#define RTE_USART3_CTS_ID               0
+#define RTE_USART3_RTS_ID               0
+#define RTE_USART3_MANUAL_FLOW          0
+#if    (RTE_USART3_CTS_ID == 0)
+#define RTE_USART3_CTS_PORT             GPIOB
+#define RTE_USART3_CTS_BIT              13
+#elif  (RTE_USART3_CTS_ID == 1)
+#define RTE_USART3_CTS_PORT             GPIOD
+#define RTE_USART3_CTS_BIT              11
+#else
+#error "Invalid USART3_CTS Pin Configuration!"
+#endif
+#if    (RTE_USART3_RTS_ID == 0)
+#define RTE_USART3_RTS_PORT             GPIOB
+#define RTE_USART3_RTS_BIT              14
+#elif  (RTE_USART3_RTS_ID == 1)
+#define RTE_USART3_RTS_PORT             GPIOD
+#define RTE_USART3_RTS_BIT              12
+#else
+#error "Invalid USART3_RTS Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <1=>1
+//       Selects DMA Stream (only Stream 1 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART3_RX_DMA               1
+#define RTE_USART3_RX_DMA_NUMBER        1
+#define RTE_USART3_RX_DMA_STREAM        1
+#define RTE_USART3_RX_DMA_CHANNEL       4
+#define RTE_USART3_RX_DMA_PRIORITY      0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <3=>3
+//       Selects DMA Stream (only Stream 3 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART3_TX_DMA               1
+#define RTE_USART3_TX_DMA_NUMBER        1
+#define RTE_USART3_TX_DMA_STREAM        3
+#define RTE_USART3_TX_DMA_CHANNEL       4
+#define RTE_USART3_TX_DMA_PRIORITY      0
+
+// 
+
+
+//  UART4 (Universal asynchronous receiver transmitter) [Driver_UART4]
+//  Configuration settings for Driver_UART4 in component ::Drivers:UART
+#define RTE_UART4                       0
+
+//    UART4_TX Pin <0=>PA0 <1=>PC10
+#define RTE_UART4_TX_ID                 0
+#if    (RTE_UART4_TX_ID == 0)
+#define RTE_UART4_TX_PORT               GPIOA
+#define RTE_UART4_TX_BIT                0
+#elif  (RTE_UART4_TX_ID == 1)
+#define RTE_UART4_TX_PORT               GPIOC
+#define RTE_UART4_TX_BIT                10
+#else
+#error "Invalid UART4_TX Pin Configuration!"
+#endif
+
+//    UART4_RX Pin <0=>PA1 <1=>PC11
+#define RTE_UART4_RX_ID                 0
+#if    (RTE_UART4_RX_ID == 0)
+#define RTE_UART4_RX_PORT               GPIOA
+#define RTE_UART4_RX_BIT                1
+#elif  (RTE_UART4_RX_ID == 1)
+#define RTE_UART4_RX_PORT               GPIOC
+#define RTE_UART4_RX_BIT                11
+#else
+#error "Invalid UART4_RX Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <2=>2
+//       Selects DMA Stream (only Stream 2 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_UART4_RX_DMA                1
+#define RTE_UART4_RX_DMA_NUMBER         1
+#define RTE_UART4_RX_DMA_STREAM         2
+#define RTE_UART4_RX_DMA_CHANNEL        4
+#define RTE_UART4_RX_DMA_PRIORITY       0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <4=>4
+//       Selects DMA Stream (only Stream 4 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_UART4_TX_DMA                1
+#define RTE_UART4_TX_DMA_NUMBER         1
+#define RTE_UART4_TX_DMA_STREAM         4
+#define RTE_UART4_TX_DMA_CHANNEL        4
+#define RTE_UART4_TX_DMA_PRIORITY       0
+
+// 
+
+
+//  UART5 (Universal asynchronous receiver transmitter) [Driver_UART5]
+//  Configuration settings for Driver_UART5 in component ::Drivers:UART
+#define RTE_UART5                       0
+
+//    UART5_TX Pin <0=>PC12
+#define RTE_UART5_TX_ID                 0
+#if    (RTE_UART5_TX_ID == 0)
+#define RTE_UART5_TX_PORT               GPIOC
+#define RTE_UART5_TX_BIT                12
+#else
+#error "Invalid UART5_TX Pin Configuration!"
+#endif
+
+//    UART5_RX Pin <0=>PD2
+#define RTE_UART5_RX_ID                 0
+#if    (RTE_UART5_RX_ID == 0)
+#define RTE_UART5_RX_PORT               GPIOD
+#define RTE_UART5_RX_BIT                2
+#else
+#error "Invalid UART5_RX Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <0=>0
+//       Selects DMA Stream (only Stream 0 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_UART5_RX_DMA                1
+#define RTE_UART5_RX_DMA_NUMBER         1
+#define RTE_UART5_RX_DMA_STREAM         0
+#define RTE_UART5_RX_DMA_CHANNEL        4
+#define RTE_UART5_RX_DMA_PRIORITY       0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <7=>7
+//       Selects DMA Stream (only Stream 7 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_UART5_TX_DMA                1
+#define RTE_UART5_TX_DMA_NUMBER         1
+#define RTE_UART5_TX_DMA_STREAM         7
+#define RTE_UART5_TX_DMA_CHANNEL        4
+#define RTE_UART5_TX_DMA_PRIORITY       0
+
+// 
+
+
+//  USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6]
+//  Configuration settings for Driver_UART6 in component ::Drivers:UART
+#define RTE_USART6                      0
+
+//    USART6_TX Pin <0=>PC6 <1=>PG14
+#define RTE_USART6_TX_ID                0
+#if    (RTE_USART6_TX_ID == 0)
+#define RTE_USART6_TX_PORT              GPIOC
+#define RTE_USART6_TX_BIT               6
+#elif  (RTE_USART6_TX_ID == 1)
+#define RTE_USART6_TX_PORT              GPIOG
+#define RTE_USART6_TX_BIT               14
+#else
+#error "Invalid USART6_TX Pin Configuration!"
+#endif
+
+//    USART6_RX Pin <0=>PC7 <1=>PG9
+#define RTE_USART6_RX_ID                0
+#if    (RTE_USART6_RX_ID == 0)
+#define RTE_USART6_RX_PORT              GPIOC
+#define RTE_USART6_RX_BIT               7
+#elif  (RTE_USART6_RX_ID == 1)
+#define RTE_USART6_RX_PORT              GPIOG
+#define RTE_USART6_RX_BIT               9
+#else
+#error "Invalid USART6_RX Pin Configuration!"
+#endif
+
+//      Synchronous
+//        USART6_CK Pin <0=>PC8 <1=>PG7
+//     
+#define RTE_USART6_CK                   0
+#define RTE_USART6_CK_ID                0
+#if    (RTE_USART6_CK_ID == 0)
+#define RTE_USART6_CK_PORT              GPIOC
+#define RTE_USART6_CK_BIT               8
+#elif  (RTE_USART6_CK_ID == 1)
+#define RTE_USART6_CK_PORT              GPIOG
+#define RTE_USART6_CK_BIT               7
+#else
+#error "Invalid USART6_CK Pin Configuration!"
+#endif
+
+//      Hardware flow control
+//        USART6_CTS Pin <0=>PG13 <1=>PG15
+//        USART6_RTS Pin <0=>PG8  <1=>PG12
+//        Manual CTS/RTS
+//     
+#define RTE_USART6_HW_FLOW              0
+#define RTE_USART6_CTS_ID               0
+#define RTE_USART6_RTS_ID               0
+#define RTE_USART6_MANUAL_FLOW          0
+#if    (RTE_USART6_CTS_ID == 0)
+#define RTE_USART6_CTS_PORT             GPIOG
+#define RTE_USART6_CTS_BIT              13
+#elif  (RTE_USART6_CTS_ID == 1)
+#define RTE_USART6_CTS_PORT             GPIOG
+#define RTE_USART6_CTS_BIT              15
+#else
+#error "Invalid USART6_CTS Pin Configuration!"
+#endif
+#if    (RTE_USART6_RTS_ID == 0)
+#define RTE_USART6_RTS_PORT             GPIOG
+#define RTE_USART6_RTS_BIT              8
+#elif  (RTE_USART6_RTS_ID == 1)
+#define RTE_USART6_RTS_PORT             GPIOG
+#define RTE_USART6_RTS_BIT              12
+#else
+#error "Invalid USART6_RTS Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <1=>1 <2=>2
+//       Selects DMA Stream (only Stream 1 or 2 can be used)
+//      Channel <5=>5
+//       Selects DMA Channel (only Channel 5 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART6_RX_DMA               1
+#define RTE_USART6_RX_DMA_NUMBER        2
+#define RTE_USART6_RX_DMA_STREAM        1
+#define RTE_USART6_RX_DMA_CHANNEL       5
+#define RTE_USART6_RX_DMA_PRIORITY      0
+
+//    DMA Tx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <6=>6 <7=>7
+//       Selects DMA Stream (only Stream 6 or 7 can be used)
+//      Channel <5=>5
+//       Selects DMA Channel (only Channel 5 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_USART6_TX_DMA               1
+#define RTE_USART6_TX_DMA_NUMBER        2
+#define RTE_USART6_TX_DMA_STREAM        6
+#define RTE_USART6_TX_DMA_CHANNEL       5
+#define RTE_USART6_TX_DMA_PRIORITY      0
+
+// 
+
+
+//  I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
+//  Configuration settings for Driver_I2C1 in component ::Drivers:I2C
+#define RTE_I2C1                        0
+
+//    I2C1_SCL Pin <0=>PB6 <1=>PB8
+#define RTE_I2C1_SCL_PORT_ID            0
+#if    (RTE_I2C1_SCL_PORT_ID == 0)
+#define RTE_I2C1_SCL_PORT               GPIOB
+#define RTE_I2C1_SCL_BIT                6
+#elif  (RTE_I2C1_SCL_PORT_ID == 1)
+#define RTE_I2C1_SCL_PORT               GPIOB
+#define RTE_I2C1_SCL_BIT                8
+#else
+#error "Invalid I2C1_SCL Pin Configuration!"
+#endif
+
+//    I2C1_SDA Pin <0=>PB7 <1=>PB9
+#define RTE_I2C1_SDA_PORT_ID            0
+#if    (RTE_I2C1_SDA_PORT_ID == 0)
+#define RTE_I2C1_SDA_PORT               GPIOB
+#define RTE_I2C1_SDA_BIT                7
+#elif  (RTE_I2C1_SDA_PORT_ID == 1)
+#define RTE_I2C1_SDA_PORT               GPIOB
+#define RTE_I2C1_SDA_BIT                9
+#else
+#error "Invalid I2C1_SDA Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <0=>0 <5=>5
+//       Selects DMA Stream (only Stream 0 or 5 can be used)
+//      Channel <1=>1
+//       Selects DMA Channel (only Channel 1 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C1_RX_DMA                 1
+#define RTE_I2C1_RX_DMA_NUMBER          1
+#define RTE_I2C1_RX_DMA_STREAM          0
+#define RTE_I2C1_RX_DMA_CHANNEL         1
+#define RTE_I2C1_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <6=>6 <7=>7
+//       Selects DMA Stream (only Stream 6 or 7 can be used)
+//      Channel <1=>1
+//       Selects DMA Channel (only Channel 1 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C1_TX_DMA                 1
+#define RTE_I2C1_TX_DMA_NUMBER          1
+#define RTE_I2C1_TX_DMA_STREAM          6
+#define RTE_I2C1_TX_DMA_CHANNEL         1
+#define RTE_I2C1_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2]
+//  Configuration settings for Driver_I2C2 in component ::Drivers:I2C
+#define RTE_I2C2                        0
+
+//    I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10
+#define RTE_I2C2_SCL_PORT_ID            0
+#if    (RTE_I2C2_SCL_PORT_ID == 0)
+#define RTE_I2C2_SCL_PORT               GPIOF
+#define RTE_I2C2_SCL_BIT                1
+#elif  (RTE_I2C2_SCL_PORT_ID == 1)
+#define RTE_I2C2_SCL_PORT               GPIOH
+#define RTE_I2C2_SCL_BIT                4
+#elif  (RTE_I2C2_SCL_PORT_ID == 2)
+#define RTE_I2C2_SCL_PORT               GPIOB
+#define RTE_I2C2_SCL_BIT                10
+#else
+#error "Invalid I2C2_SCL Pin Configuration!"
+#endif
+
+//    I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11
+#define RTE_I2C2_SDA_PORT_ID            0
+#if    (RTE_I2C2_SDA_PORT_ID == 0)
+#define RTE_I2C2_SDA_PORT               GPIOF
+#define RTE_I2C2_SDA_BIT                0
+#elif  (RTE_I2C2_SDA_PORT_ID == 1)
+#define RTE_I2C2_SDA_PORT               GPIOH
+#define RTE_I2C2_SDA_BIT                5
+#elif  (RTE_I2C2_SDA_PORT_ID == 2)
+#define RTE_I2C2_SDA_PORT               GPIOB
+#define RTE_I2C2_SDA_BIT                11
+#else
+#error "Invalid I2C2_SCL Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <2=>2 <3=>3
+//       Selects DMA Stream (only Stream 2 or 3 can be used)
+//      Channel <7=>7
+//       Selects DMA Channel (only Channel 7 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C2_RX_DMA                 1
+#define RTE_I2C2_RX_DMA_NUMBER          1
+#define RTE_I2C2_RX_DMA_STREAM          2
+#define RTE_I2C2_RX_DMA_CHANNEL         7
+#define RTE_I2C2_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <7=>7
+//       Selects DMA Stream (only Stream 7 can be used)
+//      Channel <7=>7
+//       Selects DMA Channel (only Channel 1 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C2_TX_DMA                 1
+#define RTE_I2C2_TX_DMA_NUMBER          1
+#define RTE_I2C2_TX_DMA_STREAM          7
+#define RTE_I2C2_TX_DMA_CHANNEL         7
+#define RTE_I2C2_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3]
+//  Configuration settings for Driver_I2C3 in component ::Drivers:I2C
+#define RTE_I2C3                        0
+
+//    I2C3_SCL Pin <0=>PH7 <1=>PA8
+#define RTE_I2C3_SCL_PORT_ID            0
+#if    (RTE_I2C3_SCL_PORT_ID == 0)
+#define RTE_I2C3_SCL_PORT               GPIOH
+#define RTE_I2C3_SCL_BIT                7
+#elif  (RTE_I2C3_SCL_PORT_ID == 1)
+#define RTE_I2C3_SCL_PORT               GPIOA
+#define RTE_I2C3_SCL_BIT                8
+#else
+#error "Invalid I2C3_SCL Pin Configuration!"
+#endif
+
+//    I2C3_SDA Pin <0=>PH8 <1=>PC9
+#define RTE_I2C3_SDA_PORT_ID            0
+#if    (RTE_I2C3_SDA_PORT_ID == 0)
+#define RTE_I2C3_SDA_PORT               GPIOH
+#define RTE_I2C3_SDA_BIT                8
+#elif  (RTE_I2C3_SDA_PORT_ID == 1)
+#define RTE_I2C3_SDA_PORT               GPIOC
+#define RTE_I2C3_SDA_BIT                9
+#else
+#error "Invalid I2C3_SCL Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <2=>2
+//       Selects DMA Stream (only Stream 2 can be used)
+//      Channel <3=>3
+//       Selects DMA Channel (only Channel 3 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C3_RX_DMA                 1
+#define RTE_I2C3_RX_DMA_NUMBER          1
+#define RTE_I2C3_RX_DMA_STREAM          2
+#define RTE_I2C3_RX_DMA_CHANNEL         3
+#define RTE_I2C3_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <4=>4
+//       Selects DMA Stream (only Stream 4 can be used)
+//      Channel <3=>3
+//       Selects DMA Channel (only Channel 3 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_I2C3_TX_DMA                 1
+#define RTE_I2C3_TX_DMA_NUMBER          1
+#define RTE_I2C3_TX_DMA_STREAM          4
+#define RTE_I2C3_TX_DMA_CHANNEL         3
+#define RTE_I2C3_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  SPI1 (Serial Peripheral Interface 1) [Driver_SPI1]
+//  Configuration settings for Driver_SPI1 in component ::Drivers:SPI
+#define RTE_SPI1                        0
+
+//    SPI1_NSS Pin
+//    Configure Pin if exists
+//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//       Selects Port Name
+//      Bit <0-15>
+//       Selects Port Bit
+//   
+#define RTE_SPI1_NSS_PIN                1
+#define RTE_SPI1_NSS_PORT               GPIO_PORT(0)
+#define RTE_SPI1_NSS_BIT                4
+
+//    SPI1_SCK Pin <0=>PA5 <1=>PB3
+#define RTE_SPI1_SCL_PORT_ID            0
+#if    (RTE_SPI1_SCL_PORT_ID == 0)
+#define RTE_SPI1_SCL_PORT               GPIOA
+#define RTE_SPI1_SCL_BIT                5
+#elif  (RTE_SPI1_SCL_PORT_ID == 1)
+#define RTE_SPI1_SCL_PORT               GPIOB
+#define RTE_SPI1_SCL_BIT                3
+#else
+#error "Invalid SPI1_SCK Pin Configuration!"
+#endif
+
+//    SPI1_MISO Pin <0=>PA6 <1=>PB4
+#define RTE_SPI1_MISO_PORT_ID           0
+#if    (RTE_SPI1_MISO_PORT_ID == 0)
+#define RTE_SPI1_MISO_PORT              GPIOA
+#define RTE_SPI1_MISO_BIT               6
+#elif  (RTE_SPI1_MISO_PORT_ID == 1)
+#define RTE_SPI1_MISO_PORT              GPIOB
+#define RTE_SPI1_MISO_BIT               4
+#else
+#error "Invalid SPI1_MISO Pin Configuration!"
+#endif
+
+//    SPI1_MOSI Pin <0=>PA7 <1=>PB5
+#define RTE_SPI1_MOSI_PORT_ID           0
+#if    (RTE_SPI1_MOSI_PORT_ID == 0)
+#define RTE_SPI1_MOSI_PORT              GPIOA
+#define RTE_SPI1_MOSI_BIT               7
+#elif  (RTE_SPI1_MOSI_PORT_ID == 1)
+#define RTE_SPI1_MOSI_PORT              GPIOB
+#define RTE_SPI1_MOSI_BIT               5
+#else
+#error "Invalid SPI1_MISO Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <0=>0 <2=>2
+//       Selects DMA Stream (only Stream 0 or 2 can be used)
+//      Channel <3=>3
+//       Selects DMA Channel (only Channel 3 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI1_RX_DMA                 1
+#define RTE_SPI1_RX_DMA_NUMBER          2
+#define RTE_SPI1_RX_DMA_STREAM          0
+#define RTE_SPI1_RX_DMA_CHANNEL         3
+#define RTE_SPI1_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <3=>3 <5=>5
+//       Selects DMA Stream (only Stream 3 or 5 can be used)
+//      Channel <3=>3
+//       Selects DMA Channel (only Channel 3 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI1_TX_DMA                 1
+#define RTE_SPI1_TX_DMA_NUMBER          2
+#define RTE_SPI1_TX_DMA_STREAM          5
+#define RTE_SPI1_TX_DMA_CHANNEL         3
+#define RTE_SPI1_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  SPI2 (Serial Peripheral Interface 2) [Driver_SPI2]
+//  Configuration settings for Driver_SPI2 in component ::Drivers:SPI
+#define RTE_SPI2                        0
+
+//    SPI2_NSS Pin
+//    Configure Pin if exists
+//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//       Selects Port Name
+//      Bit <0-15>
+//       Selects Port Bit
+//   
+#define RTE_SPI2_NSS_PIN                1
+#define RTE_SPI2_NSS_PORT               GPIO_PORT(1)
+#define RTE_SPI2_NSS_BIT                12
+
+//    SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1
+#define RTE_SPI2_SCL_PORT_ID            0
+#if    (RTE_SPI2_SCL_PORT_ID == 0)
+#define RTE_SPI2_SCL_PORT               GPIOB
+#define RTE_SPI2_SCL_BIT                10
+#elif  (RTE_SPI2_SCL_PORT_ID == 1)
+#define RTE_SPI2_SCL_PORT               GPIOB
+#define RTE_SPI2_SCL_BIT                13
+#elif  (RTE_SPI2_SCL_PORT_ID == 2)
+#define RTE_SPI2_SCL_PORT               GPIOI
+#define RTE_SPI2_SCL_BIT                1
+#else
+#error "Invalid SPI2_SCK Pin Configuration!"
+#endif
+
+//    SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2
+#define RTE_SPI2_MISO_PORT_ID           0
+#if    (RTE_SPI2_MISO_PORT_ID == 0)
+#define RTE_SPI2_MISO_PORT              GPIOB
+#define RTE_SPI2_MISO_BIT               14
+#elif  (RTE_SPI2_MISO_PORT_ID == 1)
+#define RTE_SPI2_MISO_PORT              GPIOC
+#define RTE_SPI2_MISO_BIT               2
+#elif  (RTE_SPI2_MISO_PORT_ID == 2)
+#define RTE_SPI2_MISO_PORT              GPIOI
+#define RTE_SPI2_MISO_BIT               2
+#else
+#error "Invalid SPI2_MISO Pin Configuration!"
+#endif
+
+//    SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3
+#define RTE_SPI2_MOSI_PORT_ID           0
+#if    (RTE_SPI2_MOSI_PORT_ID == 0)
+#define RTE_SPI2_MOSI_PORT              GPIOB
+#define RTE_SPI2_MOSI_BIT               15
+#elif  (RTE_SPI2_MOSI_PORT_ID == 1)
+#define RTE_SPI2_MOSI_PORT              GPIOC
+#define RTE_SPI2_MOSI_BIT               3
+#elif  (RTE_SPI2_MOSI_PORT_ID == 2)
+#define RTE_SPI2_MOSI_PORT              GPIOI
+#define RTE_SPI2_MOSI_BIT               3
+#else
+#error "Invalid SPI2_MISO Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <2=>2
+//       Selects DMA Stream (only Stream 2 can be used)
+//      Channel <0=>0
+//       Selects DMA Channel (only Channel 0 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI2_RX_DMA                 1
+#define RTE_SPI2_RX_DMA_NUMBER          1
+#define RTE_SPI2_RX_DMA_STREAM          2
+#define RTE_SPI2_RX_DMA_CHANNEL         0
+#define RTE_SPI2_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <3=>3
+//       Selects DMA Stream (only Stream 3 can be used)
+//      Channel <0=>0
+//       Selects DMA Channel (only Channel 0 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI2_TX_DMA                 1
+#define RTE_SPI2_TX_DMA_NUMBER          1
+#define RTE_SPI2_TX_DMA_STREAM          3
+#define RTE_SPI2_TX_DMA_CHANNEL         0
+#define RTE_SPI2_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  SPI3 (Serial Peripheral Interface 3) [Driver_SPI3]
+//  Configuration settings for Driver_SPI3 in component ::Drivers:SPI
+#define RTE_SPI3                        0
+
+//    SPI3_NSS Pin
+//    Configure Pin if exists
+//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//       Selects Port Name
+//      Bit <0-15>
+//       Selects Port Bit
+//   
+#define RTE_SPI3_NSS_PIN                1
+#define RTE_SPI3_NSS_PORT               GPIO_PORT(0)
+#define RTE_SPI3_NSS_BIT                15
+
+//    SPI3_SCK Pin <0=>PB3 <1=>PC10
+#define RTE_SPI3_SCL_PORT_ID            0
+#if    (RTE_SPI3_SCL_PORT_ID == 0)
+#define RTE_SPI3_SCL_PORT               GPIOB
+#define RTE_SPI3_SCL_BIT                3
+#elif  (RTE_SPI3_SCL_PORT_ID == 1)
+#define RTE_SPI3_SCL_PORT               GPIOC
+#define RTE_SPI3_SCL_BIT                10
+#else
+#error "Invalid SPI3_SCK Pin Configuration!"
+#endif
+
+//    SPI3_MISO Pin <0=>PB4 <1=>PC11
+#define RTE_SPI3_MISO_PORT_ID           0
+#if    (RTE_SPI3_MISO_PORT_ID == 0)
+#define RTE_SPI3_MISO_PORT              GPIOB
+#define RTE_SPI3_MISO_BIT               4
+#elif  (RTE_SPI3_MISO_PORT_ID == 1)
+#define RTE_SPI3_MISO_PORT              GPIOC
+#define RTE_SPI3_MISO_BIT               11
+#else
+#error "Invalid SPI3_MISO Pin Configuration!"
+#endif
+
+//    SPI3_MOSI Pin <0=>PB5 <1=>PC12
+#define RTE_SPI3_MOSI_PORT_ID           0
+#if    (RTE_SPI3_MOSI_PORT_ID == 0)
+#define RTE_SPI3_MOSI_PORT              GPIOB
+#define RTE_SPI3_MOSI_BIT               5
+#elif  (RTE_SPI3_MOSI_PORT_ID == 1)
+#define RTE_SPI3_MOSI_PORT              GPIOC
+#define RTE_SPI3_MOSI_BIT               12
+#else
+#error "Invalid SPI3_MISO Pin Configuration!"
+#endif
+
+//    DMA Rx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <0=>0 <2=>2
+//       Selects DMA Stream (only Stream 0 or 2 can be used)
+//      Channel <0=>0
+//       Selects DMA Channel (only Channel 0 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI3_RX_DMA                 1
+#define RTE_SPI3_RX_DMA_NUMBER          1
+#define RTE_SPI3_RX_DMA_STREAM          0
+#define RTE_SPI3_RX_DMA_CHANNEL         0
+#define RTE_SPI3_RX_DMA_PRIORITY        0
+
+//    DMA Tx
+//      Number <1=>1
+//       Selects DMA Number (only DMA1 can be used)
+//      Stream <5=>5 <7=>7
+//       Selects DMA Stream (only Stream 5 or 7 can be used)
+//      Channel <0=>0
+//       Selects DMA Channel (only Channel 0 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SPI3_TX_DMA                 1
+#define RTE_SPI3_TX_DMA_NUMBER          1
+#define RTE_SPI3_TX_DMA_STREAM          5
+#define RTE_SPI3_TX_DMA_CHANNEL         0
+#define RTE_SPI3_TX_DMA_PRIORITY        0
+
+// 
+
+
+//  SDIO (Secure Digital Input/Output) [Driver_MCI0]
+//  Configuration settings for Driver_MCI0 in component ::Drivers:MCI
+#define RTE_SDIO                        1
+
+//    SDIO_CD (Card Detect) Pin
+//    Configure Pin if exists
+//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//      Active State <0=>Low <1=>High
+//       Selects Active State Logical Level
+//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//       Selects Port Name
+//      Bit <0-15>
+//       Selects Port Bit
+//   
+#define RTE_SDIO_CD_PIN                 1
+#define RTE_SDIO_CD_ACTIVE              0
+#define RTE_SDIO_CD_PORT                GPIO_PORT(7)
+#define RTE_SDIO_CD_BIT                 15
+
+//    SDIO_WP (Write Protect) Pin
+//    Configure Pin if exists
+//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//      Active State <0=>Low <1=>High
+//       Selects Active State Logical Level
+//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//       Selects Port Name
+//      Bit <0-15>
+//       Selects Port Bit
+//   
+#define RTE_SDIO_WP_PIN                 0
+#define RTE_SDIO_WP_ACTIVE              0
+#define RTE_SDIO_WP_PORT                GPIO_PORT(7)
+#define RTE_SDIO_WP_BIT                 16
+
+//    SDIO Bus
+//      SDIO_CK Pin <0=>PC12
+#define RTE_SDIO_CK_PORT_ID             0
+#if    (RTE_SDIO_CK_PORT_ID == 0)
+#define RTE_SDIO_CK_PORT                GPIOC
+#define RTE_SDIO_CK_PIN                 12
+#else
+#error "Invalid SDIO_CK Pin Configuration!"
+#endif
+//      SDIO_CMD Pin <0=>PD2
+#define RTE_SDIO_CMD_PORT_ID            0
+#if    (RTE_SDIO_CMD_PORT_ID == 0)
+#define RTE_SDIO_CMD_PORT               GPIOD
+#define RTE_SDIO_CMD_PIN                2
+#else
+#error "Invalid SDIO_CDM Pin Configuration!"
+#endif
+//      SDIO_D0 Pin <0=>PC8
+#define RTE_SDIO_D0_PORT_ID             0
+#if    (RTE_SDIO_D0_PORT_ID == 0)
+#define RTE_SDIO_D0_PORT                GPIOC
+#define RTE_SDIO_D0_PIN                 8
+#else
+#error "Invalid SDIO_D0 Pin Configuration!"
+#endif
+//      SDIO_D1 Pin <0=>PC9
+#define RTE_SDIO_D1_PORT_ID             0
+#if    (RTE_SDIO_D1_PORT_ID == 0)
+#define RTE_SDIO_D1_PORT                GPIOC
+#define RTE_SDIO_D1_PIN                 9
+#else
+#error "Invalid SDIO_D1 Pin Configuration!"
+#endif
+//      SDIO_D2 Pin <0=>PC10
+#define RTE_SDIO_D2_PORT_ID             0
+#if    (RTE_SDIO_D2_PORT_ID == 0)
+#define RTE_SDIO_D2_PORT                GPIOC
+#define RTE_SDIO_D2_PIN                 10
+#else
+#error "Invalid SDIO_D2 Pin Configuration!"
+#endif
+//      SDIO_D3 Pin <0=>PC11
+#define RTE_SDIO_D3_PORT_ID             0
+#if    (RTE_SDIO_D3_PORT_ID == 0)
+#define RTE_SDIO_D3_PORT                GPIOC
+#define RTE_SDIO_D3_PIN                 11
+#else
+#error "Invalid SDIO_D3 Pin Configuration!"
+#endif
+//      SDIO_D4 Pin <0=>PB8
+#define RTE_SDIO_D4_PORT_ID             0
+#if    (RTE_SDIO_D4_PORT_ID == 0)
+#define RTE_SDIO_D4_PORT                GPIOB
+#define RTE_SDIO_D4_PIN                 8
+#else
+#error "Invalid SDIO_D4 Pin Configuration!"
+#endif
+//      SDIO_D5 Pin <0=>PB9
+#define RTE_SDIO_D5_PORT_ID             0
+#if    (RTE_SDIO_D5_PORT_ID == 0)
+#define RTE_SDIO_D5_PORT                GPIOB
+#define RTE_SDIO_D5_PIN                 9
+#else
+#error "Invalid SDIO_D5 Pin Configuration!"
+#endif
+//      SDIO_D6 Pin <0=>PC6
+#define RTE_SDIO_D6_PORT_ID             0
+#if    (RTE_SDIO_D6_PORT_ID == 0)
+#define RTE_SDIO_D6_PORT                GPIOC
+#define RTE_SDIO_D6_PIN                 6
+#else
+#error "Invalid SDIO_D6 Pin Configuration!"
+#endif
+//      SDIO_D7 Pin <0=>PC7
+#define RTE_SDIO_D7_PORT_ID             0
+#if    (RTE_SDIO_D7_PORT_ID == 0)
+#define RTE_SDIO_D7_PORT                GPIOC
+#define RTE_SDIO_D7_PIN                 7
+#else
+#error "Invalid SDIO_D7 Pin Configuration!"
+#endif
+//   
+
+//    DMA
+//      Number <2=>2
+//       Selects DMA Number (only DMA2 can be used)
+//      Stream <3=>3 <6=>6
+//       Selects DMA Stream (only Stream 3 or 6 can be used)
+//      Channel <4=>4
+//       Selects DMA Channel (only Channel 4 can be used)
+//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
+//       Selects DMA Priority
+//   
+#define RTE_SDIO_DMA                    1
+#define RTE_SDIO_DMA_NUMBER             2
+#define RTE_SDIO_DMA_STREAM             3
+#define RTE_SDIO_DMA_CHANNEL            4
+#define RTE_SDIO_DMA_PRIORITY           0
+
+// 
+
+
+//  ETH (Ethernet Interface) [Driver_ETH_MAC0]
+//  Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC
+#define RTE_ETH                         1
+
+//    MII (Media Independent Interface)
+#define RTE_ETH_MII                     0
+
+//      ETH_MII_TX_CLK Pin <0=>PC3
+#define RTE_ETH_MII_TX_CLK_PORT_ID      0
+#if    (RTE_ETH_MII_TX_CLK_PORT_ID == 0)
+#define RTE_ETH_MII_TX_CLK_PORT         GPIOC
+#define RTE_ETH_MII_TX_CLK_PIN          3
+#else
+#error "Invalid ETH_MII_TX_CLK Pin Configuration!"
+#endif
+//      ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13
+#define RTE_ETH_MII_TXD0_PORT_ID        0
+#if    (RTE_ETH_MII_TXD0_PORT_ID == 0)
+#define RTE_ETH_MII_TXD0_PORT           GPIOB
+#define RTE_ETH_MII_TXD0_PIN            12
+#elif  (RTE_ETH_MII_TXD0_PORT_ID == 1)
+#define RTE_ETH_MII_TXD0_PORT           GPIOG
+#define RTE_ETH_MII_TXD0_PIN            13
+#else
+#error "Invalid ETH_MII_TXD0 Pin Configuration!"
+#endif
+//      ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14
+#define RTE_ETH_MII_TXD1_PORT_ID        0
+#if    (RTE_ETH_MII_TXD1_PORT_ID == 0)
+#define RTE_ETH_MII_TXD1_PORT           GPIOB
+#define RTE_ETH_MII_TXD1_PIN            13
+#elif  (RTE_ETH_MII_TXD1_PORT_ID == 1)
+#define RTE_ETH_MII_TXD1_PORT           GPIOG
+#define RTE_ETH_MII_TXD1_PIN            14
+#else
+#error "Invalid ETH_MII_TXD1 Pin Configuration!"
+#endif
+//      ETH_MII_TXD2 Pin <0=>PC2
+#define RTE_ETH_MII_TXD2_PORT_ID        0
+#if    (RTE_ETH_MII_TXD2_PORT_ID == 0)
+#define RTE_ETH_MII_TXD2_PORT           GPIOC
+#define RTE_ETH_MII_TXD2_PIN            2
+#else
+#error "Invalid ETH_MII_TXD2 Pin Configuration!"
+#endif
+//      ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2
+#define RTE_ETH_MII_TXD3_PORT_ID        0
+#if    (RTE_ETH_MII_TXD3_PORT_ID == 0)
+#define RTE_ETH_MII_TXD3_PORT           GPIOB
+#define RTE_ETH_MII_TXD3_PIN            8
+#elif  (RTE_ETH_MII_TXD3_PORT_ID == 1)
+#define RTE_ETH_MII_TXD3_PORT           GPIOE
+#define RTE_ETH_MII_TXD3_PIN            2
+#else
+#error "Invalid ETH_MII_TXD3 Pin Configuration!"
+#endif
+//      ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11
+#define RTE_ETH_MII_TX_EN_PORT_ID       0
+#if    (RTE_ETH_MII_TX_EN_PORT_ID == 0)
+#define RTE_ETH_MII_TX_EN_PORT          GPIOB
+#define RTE_ETH_MII_TX_EN_PIN           11
+#elif  (RTE_ETH_MII_TX_EN_PORT_ID == 1)
+#define RTE_ETH_MII_TX_EN_PORT          GPIOG
+#define RTE_ETH_MII_TX_EN_PIN           11
+#else
+#error "Invalid ETH_MII_TX_EN Pin Configuration!"
+#endif
+//      ETH_MII_RX_CLK Pin <0=>PA1
+#define RTE_ETH_MII_RX_CLK_PORT_ID        0
+#if    (RTE_ETH_MII_RX_CLK_PORT_ID == 0)
+#define RTE_ETH_MII_RX_CLK_PORT         GPIOA
+#define RTE_ETH_MII_RX_CLK_PIN          1
+#else
+#error "Invalid ETH_MII_RX_CLK Pin Configuration!"
+#endif
+//      ETH_MII_RXD0 Pin <0=>PC4
+#define RTE_ETH_MII_RXD0_PORT_ID        0
+#if    (RTE_ETH_MII_RXD0_PORT_ID == 0)
+#define RTE_ETH_MII_RXD0_PORT           GPIOC
+#define RTE_ETH_MII_RXD0_PIN            4
+#else
+#error "Invalid ETH_MII_RXD0 Pin Configuration!"
+#endif
+//      ETH_MII_RXD1 Pin <0=>PC5
+#define RTE_ETH_MII_RXD1_PORT_ID        0
+#if    (RTE_ETH_MII_RXD1_PORT_ID == 0)
+#define RTE_ETH_MII_RXD1_PORT           GPIOC
+#define RTE_ETH_MII_RXD1_PIN            5
+#else
+#error "Invalid ETH_MII_RXD1 Pin Configuration!"
+#endif
+//      ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6
+#define RTE_ETH_MII_RXD2_PORT_ID        0
+#if    (RTE_ETH_MII_RXD2_PORT_ID == 0)
+#define RTE_ETH_MII_RXD2_PORT           GPIOB
+#define RTE_ETH_MII_RXD2_PIN            0
+#elif  (RTE_ETH_MII_RXD2_PORT_ID == 1)
+#define RTE_ETH_MII_RXD2_PORT           GPIOH
+#define RTE_ETH_MII_RXD2_PIN            6
+#else
+#error "Invalid ETH_MII_RXD2 Pin Configuration!"
+#endif
+//      ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7
+#define RTE_ETH_MII_RXD3_PORT_ID        0
+#if    (RTE_ETH_MII_RXD3_PORT_ID == 0)
+#define RTE_ETH_MII_RXD3_PORT           GPIOB
+#define RTE_ETH_MII_RXD3_PIN            1
+#elif  (RTE_ETH_MII_RXD3_PORT_ID == 1)
+#define RTE_ETH_MII_RXD3_PORT           GPIOH
+#define RTE_ETH_MII_RXD3_PIN            7
+#else
+#error "Invalid ETH_MII_RXD3 Pin Configuration!"
+#endif
+//      ETH_MII_RX_DV Pin <0=>PA7
+#define RTE_ETH_MII_RX_DV_PORT_ID       0
+#if    (RTE_ETH_MII_RX_DV_PORT_ID == 0)
+#define RTE_ETH_MII_RX_DV_PORT          GPIOA
+#define RTE_ETH_MII_RX_DV_PIN           7
+#else
+#error "Invalid ETH_MII_RX_DV Pin Configuration!"
+#endif
+//      ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10
+#define RTE_ETH_MII_RX_ER_PORT_ID       0
+#if    (RTE_ETH_MII_RX_ER_PORT_ID == 0)
+#define RTE_ETH_MII_RX_ER_PORT          GPIOB
+#define RTE_ETH_MII_RX_ER_PIN           10
+#elif  (RTE_ETH_MII_RXD3_PORT_ID == 1)
+#define RTE_ETH_MII_RX_ER_PORT          GPIOI
+#define RTE_ETH_MII_RX_ER_PIN           10
+#else
+#error "Invalid ETH_MII_RX_ER Pin Configuration!"
+#endif
+//      ETH_MII_CRS Pin <0=>PA0 <1=>PH2
+#define RTE_ETH_MII_CRS_PORT_ID       0
+#if    (RTE_ETH_MII_CRS_PORT_ID == 0)
+#define RTE_ETH_MII_CRS_PORT            GPIOA
+#define RTE_ETH_MII_CRS_PIN             0
+#elif  (RTE_ETH_MII_CRS_PORT_ID == 1)
+#define RTE_ETH_MII_CRS_PORT            GPIOH
+#define RTE_ETH_MII_CRS_PIN             2
+#else
+#error "Invalid ETH_MII_CRS Pin Configuration!"
+#endif
+//      ETH_MII_COL Pin <0=>PA3 <1=>PH3
+#define RTE_ETH_MII_COL_PORT_ID       0
+#if    (RTE_ETH_MII_COL_PORT_ID == 0)
+#define RTE_ETH_MII_COL_PORT            GPIOA
+#define RTE_ETH_MII_COL_PIN             3
+#elif  (RTE_ETH_MII_COL_PORT_ID == 1)
+#define RTE_ETH_MII_COL_PORT            GPIOH
+#define RTE_ETH_MII_COL_PIN             3
+#else
+#error "Invalid ETH_MII_COL Pin Configuration!"
+#endif
+
+//   
+
+//    RMII (Reduced Media Independent Interface)
+#define RTE_ETH_RMII                    1
+
+//      ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13
+#define RTE_ETH_RMII_TXD0_PORT_ID       1
+#if    (RTE_ETH_RMII_TXD0_PORT_ID == 0)
+#define RTE_ETH_RMII_TXD0_PORT          GPIOB
+#define RTE_ETH_RMII_TXD0_PIN           12
+#elif  (RTE_ETH_RMII_TXD0_PORT_ID == 1)
+#define RTE_ETH_RMII_TXD0_PORT          GPIOG
+#define RTE_ETH_RMII_TXD0_PIN           13
+#else
+#error "Invalid ETH_RMII_TXD0 Pin Configuration!"
+#endif
+//      ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14
+#define RTE_ETH_RMII_TXD1_PORT_ID       1
+#if    (RTE_ETH_RMII_TXD1_PORT_ID == 0)
+#define RTE_ETH_RMII_TXD1_PORT          GPIOB
+#define RTE_ETH_RMII_TXD1_PIN           13
+#elif  (RTE_ETH_RMII_TXD1_PORT_ID == 1)
+#define RTE_ETH_RMII_TXD1_PORT          GPIOG
+#define RTE_ETH_RMII_TXD1_PIN           14
+#else
+#error "Invalid ETH_RMII_TXD1 Pin Configuration!"
+#endif
+//      ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11
+#define RTE_ETH_RMII_TX_EN_PORT_ID      1
+#if    (RTE_ETH_RMII_TX_EN_PORT_ID == 0)
+#define RTE_ETH_RMII_TX_EN_PORT         GPIOB
+#define RTE_ETH_RMII_TX_EN_PIN          11
+#elif  (RTE_ETH_RMII_TX_EN_PORT_ID == 1)
+#define RTE_ETH_RMII_TX_EN_PORT         GPIOG
+#define RTE_ETH_RMII_TX_EN_PIN          11
+#else
+#error "Invalid ETH_RMII_TX_EN Pin Configuration!"
+#endif
+//      ETH_RMII_RXD0 Pin <0=>PC4
+#define RTE_ETH_RMII_RXD0_PORT_ID       0
+#if    (RTE_ETH_RMII_RXD0_PORT_ID == 0)
+#define RTE_ETH_RMII_RXD0_PORT          GPIOC
+#define RTE_ETH_RMII_RXD0_PIN           4
+#else
+#error "Invalid ETH_RMII_RXD0 Pin Configuration!"
+#endif
+//      ETH_RMII_RXD1 Pin <0=>PC5
+#define RTE_ETH_RMII_RXD1_PORT_ID       0
+#if    (RTE_ETH_RMII_RXD1_PORT_ID == 0)
+#define RTE_ETH_RMII_RXD1_PORT          GPIOC
+#define RTE_ETH_RMII_RXD1_PIN           5
+#else
+#error "Invalid ETH_RMII_RXD1 Pin Configuration!"
+#endif
+//      ETH_RMII_REF_CLK Pin <0=>PA1
+#define RTE_ETH_RMII_REF_CLK_PORT_ID    0
+#if    (RTE_ETH_RMII_REF_CLK_PORT_ID == 0)
+#define RTE_ETH_RMII_REF_CLK_PORT       GPIOA
+#define RTE_ETH_RMII_REF_CLK_PIN        1
+#else
+#error "Invalid ETH_RMII_REF_CLK Pin Configuration!"
+#endif
+//      ETH_RMII_CRS_DV Pin <0=>PA7
+#define RTE_ETH_RMII_CRS_DV_PORT_ID     0
+#if    (RTE_ETH_RMII_CRS_DV_PORT_ID == 0)
+#define RTE_ETH_RMII_CRS_DV_PORT        GPIOA
+#define RTE_ETH_RMII_CRS_DV_PIN         7
+#else
+#error "Invalid ETH_RMII_CRS_DV Pin Configuration!"
+#endif
+
+//   
+
+//    Management Data Interface
+//      ETH_MDC Pin <0=>PC1
+#define RTE_ETH_MDI_MDC_PORT_ID         0
+#if    (RTE_ETH_MDI_MDC_PORT_ID == 0)
+#define RTE_ETH_MDI_MDC_PORT            GPIOC
+#define RTE_ETH_MDI_MDC_PIN             1
+#else
+#error "Invalid ETH_MDC Pin Configuration!"
+#endif
+//      ETH_MDIO Pin <0=>PA2
+#define RTE_ETH_MDI_MDIO_PORT_ID        0
+#if    (RTE_ETH_MDI_MDIO_PORT_ID == 0)
+#define RTE_ETH_MDI_MDIO_PORT           GPIOA
+#define RTE_ETH_MDI_MDIO_PIN            2
+#else
+#error "Invalid ETH_MDIO Pin Configuration!"
+#endif
+//   
+
+//    Reference 25MHz/50MHz Clock generation
+#define RTE_ETH_REF_CLOCK               0
+
+//      MCO Pin <0=>PA2 <1=>PC9
+#define RTE_ETH_REF_CLOCK_PORT_ID       0
+#if    (RTE_ETH_REF_CLOCK_PORT_ID == 0)
+#define RTE_ETH_REF_CLOCK_PORT          GPIOA
+#define RTE_ETH_REF_CLOCK_PIN           8
+#elif  (RTE_ETH_REF_CLOCK_PORT_ID == 1)
+#define RTE_ETH_REF_CLOCK_PORT          GPIOC
+#define RTE_ETH_REF_CLOCK_PIN           9
+#else
+#error "Invalid MCO Pin Configuration!"
+#endif
+
+//   
+
+// 
+
+
+//  USB OTG Full-speed
+#define RTE_USB_OTG_FS                  0
+
+//    Device [Driver_USBD0]
+//    Configuration settings for Driver_USBD0 in component ::Drivers:USB Device
+#define RTE_USB_OTG_FS_DEV              1
+
+//      Endpoints
+//      Reduce memory requirements of Driver by disabling unused endpoints
+//        Endpoint 1
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 2
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 3
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//     
+#define RTE_USB_OTG_FS_DEV_EP           0x0000000F
+#define RTE_USB_OTG_FS_DEV_EP_BULK      0x000E000E
+#define RTE_USB_OTG_FS_DEV_EP_INT       0x000E000E
+#define RTE_USB_OTG_FS_DEV_EP_ISO       0x000E000E
+
+//   
+
+//    Host [Driver_USBH0]
+//    Configuration settings for Driver_USBH0 in component ::Drivers:USB Host
+
+#define RTE_USB_OTG_FS_HOST             1
+
+//      VBUS Power On/Off Pin
+//      Configure Pin for driving VBUS
+//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//        Active State <0=>Low <1=>High
+//         Selects Active State Logical Level
+//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//         Selects Port Name
+//        Bit <0-15>
+//         Selects Port Bit
+//     
+#define RTE_OTG_FS_VBUS_PIN             1
+#define RTE_OTG_FS_VBUS_ACTIVE          0
+#define RTE_OTG_FS_VBUS_PORT            GPIO_PORT(7)
+#define RTE_OTG_FS_VBUS_BIT             5
+
+//      Overcurrent Detection Pin
+//      Configure Pin for overcurrent detection
+//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//        Active State <0=>Low <1=>High
+//         Selects Active State Logical Level
+//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//         Selects Port Name
+//        Bit <0-15>
+//         Selects Port Bit
+//     
+#define RTE_OTG_FS_OC_PIN               1
+#define RTE_OTG_FS_OC_ACTIVE            0
+#define RTE_OTG_FS_OC_PORT              GPIO_PORT(5)
+#define RTE_OTG_FS_OC_BIT               11
+//   
+
+// 
+
+
+//  USB OTG High-speed
+#define RTE_USB_OTG_HS                  0
+
+//    PHY (Physical Layer)
+
+//      PHY Interface
+//       <0=>On-chip full-speed PHY
+//       <1=>External ULPI high-speed PHY
+#define RTE_USB_OTG_HS_PHY              1
+
+//      External ULPI Pins (UTMI+ Low Pin Interface)
+
+//        OTG_HS_ULPI_CK Pin <0=>PA5
+#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_CK_PORT     GPIOA
+#define RTE_USB_OTG_HS_ULPI_CK_PIN      5
+#else
+#error "Invalid OTG_HS_ULPI_CK Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2
+#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0
+#if    (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOI
+#define RTE_USB_OTG_HS_ULPI_DIR_PIN     11
+#elif  (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1)
+#define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOC
+#define RTE_USB_OTG_HS_ULPI_DIR_PIN     2
+#else
+#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_STP Pin <0=>PC0
+#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0
+#if    (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_STP_PORT    GPIOC
+#define RTE_USB_OTG_HS_ULPI_STP_PIN     0
+#else
+#error "Invalid OTG_HS_ULPI_STP Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4
+#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1
+#if    (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOC
+#define RTE_USB_OTG_HS_ULPI_NXT_PIN     2
+#elif  (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1)
+#define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOH
+#define RTE_USB_OTG_HS_ULPI_NXT_PIN     4
+#else
+#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D0 Pin <0=>PA3
+#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D0_PORT     GPIOA
+#define RTE_USB_OTG_HS_ULPI_D0_PIN      3
+#else
+#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D1 Pin <0=>PB0
+#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D1_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D1_PIN      0
+#else
+#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D2 Pin <0=>PB1
+#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D2_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D2_PIN      1
+#else
+#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D3 Pin <0=>PB10
+#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D3_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D3_PIN      10
+#else
+#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D4 Pin <0=>PB11
+#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D4_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D4_PIN      11
+#else
+#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D5 Pin <0=>PB12
+#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D5_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D5_PIN      12
+#else
+#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D6 Pin <0=>PB13
+#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D6_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D6_PIN      13
+#else
+#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!"
+#endif
+//        OTG_HS_ULPI_D7 Pin <0=>PB5
+#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID  0
+#if    (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0)
+#define RTE_USB_OTG_HS_ULPI_D7_PORT     GPIOB
+#define RTE_USB_OTG_HS_ULPI_D7_PIN      5
+#else
+#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!"
+#endif
+
+//     
+
+//   
+
+//    Device [Driver_USBD1]
+//    Configuration settings for Driver_USBD1 in component ::Drivers:USB Device
+#define RTE_USB_OTG_HS_DEV              1
+
+//      Endpoints
+//      Reduce memory requirements of Driver by disabling unused endpoints
+//        Endpoint 1
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 2
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 3
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 4
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//        Endpoint 5
+//           Bulk OUT
+//          Bulk IN
+//           Interrupt OUT
+//          Interrupt IN
+//           Isochronous OUT
+//          Isochronous IN
+//       
+//     
+#define RTE_USB_OTG_HS_DEV_EP           0x0000003F
+#define RTE_USB_OTG_HS_DEV_EP_BULK      0x003E003E
+#define RTE_USB_OTG_HS_DEV_EP_INT       0x003E003E
+#define RTE_USB_OTG_HS_DEV_EP_ISO       0x003E003E
+
+//   
+
+//    Host [Driver_USBH1]
+//    Configuration settings for Driver_USBH1 in component ::Drivers:USB Host
+#define RTE_USB_OTG_HS_HOST             1
+
+//      VBUS Power On/Off Pin
+//      Configure Pin for driving VBUS
+//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//        Active State <0=>Low <1=>High
+//         Selects Active State Logical Level
+//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//         Selects Port Name
+//        Bit <0-15>
+//         Selects Port Bit
+//     
+#define RTE_OTG_HS_VBUS_PIN             1
+#define RTE_OTG_HS_VBUS_ACTIVE          0
+#define RTE_OTG_HS_VBUS_PORT            GPIO_PORT(2)
+#define RTE_OTG_HS_VBUS_BIT             2
+
+//      Overcurrent Detection Pin
+//      Configure Pin for overcurrent detection
+//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
+//        Active State <0=>Low <1=>High
+//         Selects Active State Logical Level
+//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
+//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
+//         Selects Port Name
+//        Bit <0-15>
+//         Selects Port Bit
+//     
+#define RTE_OTG_HS_OC_PIN               1
+#define RTE_OTG_HS_OC_ACTIVE            0
+#define RTE_OTG_HS_OC_PORT              GPIO_PORT(5)
+#define RTE_OTG_HS_OC_BIT               12
+//   
+
+// 
+
+
+//  EXTI (External Interrupt/Event Controller)
+#define RTE_EXTI                        0
+
+//    EXTI0 Line
+#define RTE_EXTI0                       0
+//      Pin   <0=>PA0  <1=>PB0  <2=>PC0  <3=>PD0  <4=>PE0  <5=>PF0  <6=>PG0  <7=>PH0  <8=>PI0
+#define RTE_EXTI0_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI0_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI0_TRIGGER               0
+//   
+
+//    EXTI1 Line
+#define RTE_EXTI1                       0
+//      Pin   <0=>PA1  <1=>PB1  <2=>PC1  <3=>PD1  <4=>PE1  <5=>PF1  <6=>PG1  <7=>PH1  <8=>PI1
+#define RTE_EXTI1_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI1_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI1_TRIGGER               0
+//   
+
+//    EXTI2 Line
+#define RTE_EXTI2                       0
+//      Pin   <0=>PA2  <1=>PB2  <2=>PC2  <3=>PD2  <4=>PE2  <5=>PF2  <6=>PG2  <7=>PH2  <8=>PI2
+#define RTE_EXTI2_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI2_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI2_TRIGGER               0
+//   
+
+//    EXTI3 Line
+#define RTE_EXTI3                       0
+//      Pin   <0=>PA3  <1=>PB3  <2=>PC3  <3=>PD3  <4=>PE3  <5=>PF3  <6=>PG3  <7=>PH3  <8=>PI3
+#define RTE_EXTI3_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI3_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI3_TRIGGER               0
+//   
+
+//    EXTI4 Line
+#define RTE_EXTI4                       0
+//      Pin   <0=>PA4  <1=>PB4  <2=>PC4  <3=>PD4  <4=>PE4  <5=>PF4  <6=>PG4  <7=>PH4  <8=>PI4
+#define RTE_EXTI4_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI4_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI4_TRIGGER               0
+//   
+
+//    EXTI5 Line
+#define RTE_EXTI5                       0
+//      Pin   <0=>PA5  <1=>PB5  <2=>PC5  <3=>PD5  <4=>PE5  <5=>PF5  <6=>PG5  <7=>PH5  <8=>PI5
+#define RTE_EXTI5_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI5_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI5_TRIGGER               0
+//   
+
+//    EXTI6 Line
+#define RTE_EXTI6                       0
+//      Pin   <0=>PA6  <1=>PB6  <2=>PC6  <3=>PD6  <4=>PE6  <5=>PF6  <6=>PG6  <7=>PH6  <8=>PI6
+#define RTE_EXTI6_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI6_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI6_TRIGGER               0
+//   
+
+//    EXTI7 Line
+#define RTE_EXTI7                       0
+//      Pin   <0=>PA7  <1=>PB7  <2=>PC7  <3=>PD7  <4=>PE7  <5=>PF7  <6=>PG7  <7=>PH7  <8=>PI7
+#define RTE_EXTI7_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI7_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI7_TRIGGER               0
+//   
+
+//    EXTI8 Line
+#define RTE_EXTI8                       0
+//      Pin   <0=>PA8  <1=>PB8  <2=>PC8  <3=>PD8  <4=>PE8  <5=>PF8  <6=>PG8  <7=>PH8  <8=>PI8
+#define RTE_EXTI8_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI8_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI8_TRIGGER               0
+//   
+
+//    EXTI9 Line
+#define RTE_EXTI9                       0
+//      Pin   <0=>PA9  <1=>PB9  <2=>PC9  <3=>PD9  <4=>PE9  <5=>PF9  <6=>PG9  <7=>PH9  <8=>PI9
+#define RTE_EXTI9_PIN                   0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI9_MODE                  0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI9_TRIGGER               0
+//   
+
+//    EXTI10 Line
+#define RTE_EXTI10                      0
+//      Pin   <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10
+#define RTE_EXTI10_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI10_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI10_TRIGGER              0
+//   
+
+//    EXTI11 Line
+#define RTE_EXTI11                      0
+//      Pin   <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11
+#define RTE_EXTI11_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI11_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI11_TRIGGER              0
+//   
+
+//    EXTI12 Line
+#define RTE_EXTI12                      0
+//      Pin   <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12
+#define RTE_EXTI12_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI12_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI12_TRIGGER              0
+//   
+
+//    EXTI13 Line
+#define RTE_EXTI13                      0
+//      Pin   <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13
+#define RTE_EXTI13_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI13_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI13_TRIGGER              0
+//   
+
+//    EXTI14 Line
+#define RTE_EXTI14                      0
+//      Pin   <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14
+#define RTE_EXTI14_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI14_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI14_TRIGGER              0
+//   
+
+//    EXTI15 Line
+#define RTE_EXTI15                      0
+//      Pin   <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15
+#define RTE_EXTI15_PIN                  0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI15_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI15_TRIGGER              0
+//   
+
+//    EXTI16 Line: PVD Output
+#define RTE_EXTI16                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI16_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI16_TRIGGER              0
+//   
+
+//    EXTI17 Line: RTC Alarm
+#define RTE_EXTI17                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI17_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI17_TRIGGER              0
+//   
+
+//    EXTI18 Line: USB OTG FS Wakeup
+#define RTE_EXTI18                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI18_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI18_TRIGGER              0
+//   
+
+//    EXTI19 Line: Ethernet Wakeup
+#define RTE_EXTI19                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI19_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI19_TRIGGER              0
+//   
+
+//    EXTI20 Line: USB OTG HS Wakeup
+#define RTE_EXTI20                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI20_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI20_TRIGGER              0
+//   
+
+//    EXTI21 Line: RTC Tamper and TimeStamp
+#define RTE_EXTI21                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI21_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI21_TRIGGER              0
+//   
+
+//    EXTI22 Line: RTC Wakeup
+#define RTE_EXTI22                      0
+//      Mode  <0=>Interrupt  <1=>Event
+#define RTE_EXTI22_MODE                 0
+//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
+#define RTE_EXTI22_TRIGGER              0
+//   
+
+// 
+
+
+//  FSMC (Flexible Static Memory Controller)
+#define RTE_FSMC                        0
+
+//    Pin Configuration
+//    Configure Pins
+#define RTE_FSMC_PINS                   0
+
+//      Address Bus Pins
+//       <0=>A[17:16]
+//       <1=>A[10:0]   <2=>A[15:0]   <3=>A[16:0]   <4=>A[17:0]
+//       <5=>A[18:0]   <6=>A[19:0]   <7=>A[20:0]   <8=>A[21:0]
+//       <9=>A[22:0]  <10=>A[23:0]  <11=>A[24:0]  <12=>A[25:0]
+#define RTE_FSMC_ABUS_PINS              10
+//      Data Bus Pins  <0=>D[7:0] <1=>D[15:0]
+#define RTE_FSMC_DBUS_PINS              0
+//      FSMC_NOE Pin
+#define RTE_FSMC_NOE_PIN                0
+//      FSMC_NWE Pin
+#define RTE_FSMC_NWE_PIN                0
+//      FSMC_NBL0 Pin
+#define RTE_FSMC_NBL0_PIN               0
+//      FSMC_NBL1 Pin
+#define RTE_FSMC_NBL1_PIN               0
+//      FSMC_NL Pin
+#define RTE_FSMC_NL_PIN                 0
+//      FSMC_NWAIT Pin
+#define RTE_FSMC_NWAIT_PIN              0
+//      FSMC_CLK Pin
+#define RTE_FSMC_CLK_PIN                0
+//      FSMC_NE1/NCE2 Pin
+#define RTE_FSMC_NE1_PIN                0
+//      FSMC_NE2/NCE3 Pin
+#define RTE_FSMC_NE2_PIN                0
+//      FSMC_NE3/NCE4_1 Pin
+#define RTE_FSMC_NE3_PIN                0
+//      FSMC_NE4 Pin
+#define RTE_FSMC_NE4_PIN                0
+//      FSMC_NCE4_2 Pin
+#define RTE_FSMC_NCE42_PIN              0
+//      FSMC_INT2 Pin
+#define RTE_FSMC_INT2_PIN               0
+//      FSMC_INT3 Pin
+#define RTE_FSMC_INT3_PIN               0
+//      FSMC_INTR Pin
+#define RTE_FSMC_INTR_PIN               0
+//      FSMC_NIORD Pin
+#define RTE_FSMC_NIORD_PIN              0
+//      FSMC_NIOWR Pin
+#define RTE_FSMC_NIOWR_PIN              0
+//      FSMC_NREG Pin
+#define RTE_FSMC_NREG_PIN               0
+//      FSMC_CD Pin
+#define RTE_FSMC_CD_PIN                 0
+
+//   
+
+//    NOR Flash / PSRAM Controller
+
+//      FSMC_NE1 Chip Select
+//      Configure Device on Chip Select FSMC_NE1
+#define RTE_FSMC_NE1                    0
+
+//        Chip-select control
+//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
+//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
+//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
+//          ASYNCWAIT: Wait signal during asynchronous transfer
+//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
+//          EXTMOD: Extended mode enable
+//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
+//          WAITEN: Wait enable
+//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
+//          WREN: Write enable
+//          Enable/disable write operations in the current bank by the FSMC
+//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
+//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
+//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
+//          by the memory one clock cycle before the wait state or during the wait state
+//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
+//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
+//          BURSTEN: Burst enable
+//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
+//          FACCEN: Flash access enable
+//          Enables NOR Flash memory access operations.
+//          MWID: Memory databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width, valid for all type of memories.
+//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
+//          Defines the type of external memory attached to the corresponding memory bank.
+//          MUXEN: Address/data multiplexing enable
+//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
+//          MBKEN: Memory bank enable
+//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
+//          disabled bank causes an ERROR on AHB bus.
+#define RTE_FSMC_BCR1_CBURSTRW          0
+#define RTE_FSMC_BCR1_ASYNCWAIT         0
+#define RTE_FSMC_BCR1_EXTMOD            0
+#define RTE_FSMC_BCR1_WAITEN            1
+#define RTE_FSMC_BCR1_WREN              1
+#define RTE_FSMC_BCR1_WAITCFG           0
+#define RTE_FSMC_BCR1_WRAPMOD           0
+#define RTE_FSMC_BCR1_WAITPOL           0
+#define RTE_FSMC_BCR1_BURSTEN           0
+#define RTE_FSMC_BCR1_FACCEN            1
+#define RTE_FSMC_BCR1_MWID              1
+#define RTE_FSMC_BCR1_MTYP              2
+#define RTE_FSMC_BCR1_MUXEN             1
+#define RTE_FSMC_BCR1_MBKEN             1
+//       
+
+//        Chip-select timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
+//          cycles (+2) to issue to the memory before getting the first data:
+//          0000: Data latency of 2 CLK clock cycles for first burst access
+//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
+//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
+//          In the case of CRAM, this field must be set to ‘0’.
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
+//          0000: Reserved
+//          0001: CLK period = 2 × HCLK periods
+//          0010: CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Define the bus turnaround delay after a read access only
+//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
+//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
+//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
+//          databus in Hi-Z state.
+//          These bits are written by software to add a delay at the end of a write/read transaction. This
+//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
+//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
+//          read access (tEHQZ):
+//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
+//          EXTMOD = ‘0’
+//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration =1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
+//          memory clock period duration.
+//          ADDSET: Address setup phase duration <0-15>
+//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don’t care.
+#define RTE_FSMC_BTR1_ACCMOD            0
+#define RTE_FSMC_BTR1_DATLAT            15
+#define RTE_FSMC_BTR1_CLKDIV            15
+#define RTE_FSMC_BTR1_BUSTURN           15
+#define RTE_FSMC_BTR1_DATAST            255
+#define RTE_FSMC_BTR1_ADDHLD            15
+#define RTE_FSMC_BTR1_ADDSET            15
+//       
+
+//        Write timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
+//          (+2) to issue to the memory before getting the first data.
+//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
+//          ...
+//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
+//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
+//          CRAM, this field must be set to 0
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
+//          0000: Reserved
+//          0001 CLK period = 2 × HCLK periods
+//          0010 CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
+//          (BUSTRUN + 1) HCLK period = tEHELmin.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
+//          ADDSET: Address setup phase duration <1-15>
+//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is don’t care.
+#define RTE_FSMC_BWTR1_ACCMOD        0
+#define RTE_FSMC_BWTR1_DATLAT        15
+#define RTE_FSMC_BWTR1_CLKDIV        15
+#define RTE_FSMC_BWTR1_BUSTURN       15
+#define RTE_FSMC_BWTR1_DATAST        255
+#define RTE_FSMC_BWTR1_ADDHLD        15
+#define RTE_FSMC_BWTR1_ADDSET        15
+//       
+//     
+
+//      FSMC_NE2 Chip Select
+//      Configure Device on Chip Select FSMC_NE2
+#define RTE_FSMC_NE2                    0
+
+//        Chip-select control
+//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
+//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
+//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
+//          ASYNCWAIT: Wait signal during asynchronous transfer
+//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
+//          EXTMOD: Extended mode enable
+//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
+//          WAITEN: Wait enable
+//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
+//          WREN: Write enable
+//          Enable/disable write operations in the current bank by the FSMC
+//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
+//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
+//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
+//          by the memory one clock cycle before the wait state or during the wait state
+//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
+//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
+//          BURSTEN: Burst enable
+//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
+//          FACCEN: Flash access enable
+//          Enables NOR Flash memory access operations.
+//          MWID: Memory databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width, valid for all type of memories.
+//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
+//          Defines the type of external memory attached to the corresponding memory bank.
+//          MUXEN: Address/data multiplexing enable
+//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
+//          MBKEN: Memory bank enable
+//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
+//          disabled bank causes an ERROR on AHB bus.
+#define RTE_FSMC_BCR2_CBURSTRW          0
+#define RTE_FSMC_BCR2_ASYNCWAIT         0
+#define RTE_FSMC_BCR2_EXTMOD            0
+#define RTE_FSMC_BCR2_WAITEN            1
+#define RTE_FSMC_BCR2_WREN              1
+#define RTE_FSMC_BCR2_WAITCFG           0
+#define RTE_FSMC_BCR2_WRAPMOD           0
+#define RTE_FSMC_BCR2_WAITPOL           0
+#define RTE_FSMC_BCR2_BURSTEN           0
+#define RTE_FSMC_BCR2_FACCEN            1
+#define RTE_FSMC_BCR2_MWID              1
+#define RTE_FSMC_BCR2_MTYP              0
+#define RTE_FSMC_BCR2_MUXEN             1
+#define RTE_FSMC_BCR2_MBKEN             0
+//       
+
+//        Chip-select timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
+//          cycles (+2) to issue to the memory before getting the first data:
+//          0000: Data latency of 2 CLK clock cycles for first burst access
+//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
+//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
+//          In the case of CRAM, this field must be set to ‘0’.
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
+//          0000: Reserved
+//          0001: CLK period = 2 × HCLK periods
+//          0010: CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Define the bus turnaround delay after a read access only
+//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
+//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
+//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
+//          databus in Hi-Z state.
+//          These bits are written by software to add a delay at the end of a write/read transaction. This
+//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
+//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
+//          read access (tEHQZ):
+//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
+//          EXTMOD = ‘0’
+//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration =1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
+//          memory clock period duration.
+//          ADDSET: Address setup phase duration <0-15>
+//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don’t care.
+#define RTE_FSMC_BTR2_ACCMOD            0
+#define RTE_FSMC_BTR2_DATLAT            15
+#define RTE_FSMC_BTR2_CLKDIV            15
+#define RTE_FSMC_BTR2_BUSTURN           15
+#define RTE_FSMC_BTR2_DATAST            255
+#define RTE_FSMC_BTR2_ADDHLD            15
+#define RTE_FSMC_BTR2_ADDSET            15
+//       
+
+//        Write timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
+//          (+2) to issue to the memory before getting the first data.
+//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
+//          ...
+//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
+//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
+//          CRAM, this field must be set to 0
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
+//          0000: Reserved
+//          0001 CLK period = 2 × HCLK periods
+//          0010 CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
+//          (BUSTRUN + 1) HCLK period = tEHELmin.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
+//          ADDSET: Address setup phase duration <1-15>
+//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is don’t care.
+#define RTE_FSMC_BWTR2_ACCMOD        0
+#define RTE_FSMC_BWTR2_DATLAT        15
+#define RTE_FSMC_BWTR2_CLKDIV        15
+#define RTE_FSMC_BWTR2_BUSTURN       15
+#define RTE_FSMC_BWTR2_DATAST        255
+#define RTE_FSMC_BWTR2_ADDHLD        15
+#define RTE_FSMC_BWTR2_ADDSET        15
+//       
+//     
+
+//      FSMC_NE3 Chip Select
+//      Configure Device on Chip Select FSMC_NE3
+#define RTE_FSMC_NE3                    0
+
+//        Chip-select control
+//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
+//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
+//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
+//          ASYNCWAIT: Wait signal during asynchronous transfer
+//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
+//          EXTMOD: Extended mode enable
+//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
+//          WAITEN: Wait enable
+//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
+//          WREN: Write enable
+//          Enable/disable write operations in the current bank by the FSMC
+//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
+//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
+//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
+//          by the memory one clock cycle before the wait state or during the wait state
+//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
+//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
+//          BURSTEN: Burst enable
+//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
+//          FACCEN: Flash access enable
+//          Enables NOR Flash memory access operations.
+//          MWID: Memory databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width, valid for all type of memories.
+//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
+//          Defines the type of external memory attached to the corresponding memory bank.
+//          MUXEN: Address/data multiplexing enable
+//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
+//          MBKEN: Memory bank enable
+//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
+//          disabled bank causes an ERROR on AHB bus.
+#define RTE_FSMC_BCR3_CBURSTRW          0
+#define RTE_FSMC_BCR3_ASYNCWAIT         0
+#define RTE_FSMC_BCR3_EXTMOD            0
+#define RTE_FSMC_BCR3_WAITEN            1
+#define RTE_FSMC_BCR3_WREN              1
+#define RTE_FSMC_BCR3_WAITCFG           0
+#define RTE_FSMC_BCR3_WRAPMOD           0
+#define RTE_FSMC_BCR3_WAITPOL           0
+#define RTE_FSMC_BCR3_BURSTEN           0
+#define RTE_FSMC_BCR3_FACCEN            1
+#define RTE_FSMC_BCR3_MWID              1
+#define RTE_FSMC_BCR3_MTYP              0
+#define RTE_FSMC_BCR3_MUXEN             1
+#define RTE_FSMC_BCR3_MBKEN             0
+//       
+
+//        Chip-select timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
+//          cycles (+2) to issue to the memory before getting the first data:
+//          0000: Data latency of 2 CLK clock cycles for first burst access
+//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
+//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
+//          In the case of CRAM, this field must be set to ‘0’.
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
+//          0000: Reserved
+//          0001: CLK period = 2 × HCLK periods
+//          0010: CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Define the bus turnaround delay after a read access only
+//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
+//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
+//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
+//          databus in Hi-Z state.
+//          These bits are written by software to add a delay at the end of a write/read transaction. This
+//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
+//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
+//          read access (tEHQZ):
+//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
+//          EXTMOD = ‘0’
+//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration =1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
+//          memory clock period duration.
+//          ADDSET: Address setup phase duration <0-15>
+//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don’t care.
+#define RTE_FSMC_BTR3_ACCMOD            0
+#define RTE_FSMC_BTR3_DATLAT            15
+#define RTE_FSMC_BTR3_CLKDIV            15
+#define RTE_FSMC_BTR3_BUSTURN           15
+#define RTE_FSMC_BTR3_DATAST            255
+#define RTE_FSMC_BTR3_ADDHLD            15
+#define RTE_FSMC_BTR3_ADDSET            15
+//       
+
+//        Write timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
+//          (+2) to issue to the memory before getting the first data.
+//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
+//          ...
+//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
+//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
+//          CRAM, this field must be set to 0
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
+//          0000: Reserved
+//          0001 CLK period = 2 × HCLK periods
+//          0010 CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
+//          (BUSTRUN + 1) HCLK period = tEHELmin.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
+//          ADDSET: Address setup phase duration <1-15>
+//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is don’t care.
+#define RTE_FSMC_BWTR3_ACCMOD        0
+#define RTE_FSMC_BWTR3_DATLAT        15
+#define RTE_FSMC_BWTR3_CLKDIV        15
+#define RTE_FSMC_BWTR3_BUSTURN       15
+#define RTE_FSMC_BWTR3_DATAST        255
+#define RTE_FSMC_BWTR3_ADDHLD        15
+#define RTE_FSMC_BWTR3_ADDSET        15
+//       
+//     
+
+//      FSMC_NE4 Chip Select
+//      Configure Device on Chip Select FSMC_NE4
+#define RTE_FSMC_NE4                    0
+
+//        Chip-select control
+//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
+//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
+//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
+//          ASYNCWAIT: Wait signal during asynchronous transfer
+//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
+//          EXTMOD: Extended mode enable
+//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
+//          WAITEN: Wait enable
+//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
+//          WREN: Write enable
+//          Enable/disable write operations in the current bank by the FSMC
+//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
+//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
+//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
+//          by the memory one clock cycle before the wait state or during the wait state
+//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
+//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
+//          BURSTEN: Burst enable
+//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
+//          FACCEN: Flash access enable
+//          Enables NOR Flash memory access operations.
+//          MWID: Memory databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width, valid for all type of memories.
+//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
+//          Defines the type of external memory attached to the corresponding memory bank.
+//          MUXEN: Address/data multiplexing enable
+//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
+//          MBKEN: Memory bank enable
+//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
+//          disabled bank causes an ERROR on AHB bus.
+#define RTE_FSMC_BCR4_CBURSTRW          0
+#define RTE_FSMC_BCR4_ASYNCWAIT         0
+#define RTE_FSMC_BCR4_EXTMOD            0
+#define RTE_FSMC_BCR4_WAITEN            1
+#define RTE_FSMC_BCR4_WREN              1
+#define RTE_FSMC_BCR4_WAITCFG           0
+#define RTE_FSMC_BCR4_WRAPMOD           0
+#define RTE_FSMC_BCR4_WAITPOL           0
+#define RTE_FSMC_BCR4_BURSTEN           0
+#define RTE_FSMC_BCR4_FACCEN            1
+#define RTE_FSMC_BCR4_MWID              1
+#define RTE_FSMC_BCR4_MTYP              0
+#define RTE_FSMC_BCR4_MUXEN             1
+#define RTE_FSMC_BCR4_MBKEN             0
+//       
+
+//        Chip-select timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
+//          cycles (+2) to issue to the memory before getting the first data:
+//          0000: Data latency of 2 CLK clock cycles for first burst access
+//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
+//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
+//          In the case of CRAM, this field must be set to ‘0’.
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
+//          0000: Reserved
+//          0001: CLK period = 2 × HCLK periods
+//          0010: CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Define the bus turnaround delay after a read access only
+//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
+//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
+//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
+//          databus in Hi-Z state.
+//          These bits are written by software to add a delay at the end of a write/read transaction. This
+//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
+//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
+//          read access (tEHQZ):
+//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
+//          EXTMOD = ‘0’
+//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration =1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
+//          memory clock period duration.
+//          ADDSET: Address setup phase duration <0-15>
+//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don’t care.
+#define RTE_FSMC_BTR4_ACCMOD            0
+#define RTE_FSMC_BTR4_DATLAT            15
+#define RTE_FSMC_BTR4_CLKDIV            15
+#define RTE_FSMC_BTR4_BUSTURN           15
+#define RTE_FSMC_BTR4_DATAST            255
+#define RTE_FSMC_BTR4_ADDHLD            15
+#define RTE_FSMC_BTR4_ADDSET            15
+//       
+
+//        Write timing
+//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
+//          Specifies the asynchronous access modes. Access mode is taken into account only when
+//          Extended mode is enabled in the Chip-select control register.
+//          DATLAT: Data latency <0-15>
+//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
+//          (+2) to issue to the memory before getting the first data.
+//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
+//          ...
+//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
+//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
+//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
+//          CRAM, this field must be set to 0
+//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
+//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
+//          0000: Reserved
+//          0001 CLK period = 2 × HCLK periods
+//          0010 CLK period = 3 × HCLK periods
+//          1111: CLK period = 16 × HCLK periods (default value after reset)
+//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
+//          BUSTURN: Bus turnaround phase duration <0-15>
+//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
+//          (BUSTRUN + 1) HCLK period = tEHELmin.
+//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
+//          ...
+//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
+//          DATAST: Data phase duration <1-255>
+//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
+//          0000 0000: Reserved
+//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
+//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
+//          ...
+//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous accesses, this value is don't care.
+//          ADDHLD: Address hold phase duration <1-15>
+//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
+//          0000: Reserved
+//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
+//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
+//          ...
+//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
+//          ADDSET: Address setup phase duration <1-15>
+//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
+//          0000: ADDSET phase duration = 0 × HCLK clock cycle
+//          ...
+//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
+//          Note: In synchronous NOR Flash accesses, this value is don’t care.
+#define RTE_FSMC_BWTR4_ACCMOD        0
+#define RTE_FSMC_BWTR4_DATLAT        15
+#define RTE_FSMC_BWTR4_CLKDIV        15
+#define RTE_FSMC_BWTR4_BUSTURN       15
+#define RTE_FSMC_BWTR4_DATAST        255
+#define RTE_FSMC_BWTR4_ADDHLD        15
+#define RTE_FSMC_BWTR4_ADDSET        15
+//       
+//     
+
+//   
+
+//    NAND Flash Controller
+
+//      FSMC_NCE2 Chip Select
+//      Configure NAND Device on Chip Select FSMC_NCE2
+#define RTE_FSMC_NCE2                   0
+
+//        NAND Flash Control
+//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
+//          Defines the page size for the extended ECC.
+//          TAR: ALE to RE delay <0-15>
+//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          TCLR: CLE to RE delay <0-15>
+//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          ECCEN: ECC computation logic enable 
+//         PWID: Databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width.
+//          PTYP: Memory type <1=>NAND Flash
+//          Defines the type of device attached to the corresponding memory bank.
+//          PBKEN: NAND Flash memory bank enable
+//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
+//          PWAITEN: Wait feature enable
+//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
+#define RTE_FSMC_PCR2_ECCPS             0
+#define RTE_FSMC_PCR2_TAR               0
+#define RTE_FSMC_PCR2_TCLR              0
+#define RTE_FSMC_PCR2_ECCEN             0
+#define RTE_FSMC_PCR2_PWID              0
+#define RTE_FSMC_PCR2_PTYP              1
+#define RTE_FSMC_PCR2_PBKEN             0
+#define RTE_FSMC_PCR2_PWAITEN           0
+
+//       
+
+//        Interrupt configuration
+//         IFEN: Falling edge detection enable
+//         ILEN: High-level detection enable
+//         IREN: Rising edge detection enable
+#define RTE_FSMC_SR2_IFEN               0
+#define RTE_FSMC_SR2_ILEN               0
+#define RTE_FSMC_SR2_IREN               0
+
+//       
+
+//       Common memory space timing
+//          MEMHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access to. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
+//          MEMSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 2 HCLK cycles (for NAND Flash)
+//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
+#define RTE_FSMC_PMEM2_MEMHIZ           255
+#define RTE_FSMC_PMEM2_MEMHOLD          255
+#define RTE_FSMC_PMEM2_MEMWAIT          255
+#define RTE_FSMC_PMEM2_MEMSET           255
+
+//       
+
+//       Attribute memory space timing
+//          ATTHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
+//          ATTSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 1 HCLK cycle
+//           1111 1111: 256 HCLK cycles (default value after reset)
+#define RTE_FSMC_PATT2_ATTHIZ           255
+#define RTE_FSMC_PATT2_ATTHOLD          255
+#define RTE_FSMC_PATT2_ATTWAIT          255
+#define RTE_FSMC_PATT2_ATTSET           255
+
+//       
+
+//     
+
+//      FSMC_NCE3 Chip Select
+//      Configure NAND Device on Chip Select FSMC_NCE3
+#define RTE_FSMC_NCE3                   0
+
+//        NAND Flash Control
+//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
+//          Defines the page size for the extended ECC.
+//          TAR: ALE to RE delay <0-15>
+//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          TCLR: CLE to RE delay <0-15>
+//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          ECCEN: ECC computation logic enable 
+//         PWID: Databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width.
+//          PTYP: Memory type <1=>NAND Flash
+//          Defines the type of device attached to the corresponding memory bank.
+//          PBKEN: NAND Flash memory bank enable
+//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
+//          PWAITEN: Wait feature enable
+//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
+#define RTE_FSMC_PCR3_ECCPS             0
+#define RTE_FSMC_PCR3_TAR               0
+#define RTE_FSMC_PCR3_TCLR              0
+#define RTE_FSMC_PCR3_ECCEN             0
+#define RTE_FSMC_PCR3_PWID              0
+#define RTE_FSMC_PCR3_PTYP              1
+#define RTE_FSMC_PCR3_PBKEN             0
+#define RTE_FSMC_PCR3_PWAITEN           0
+
+//       
+
+//        Interrupt configuration
+//         IFEN: Falling edge detection enable
+//         ILEN: High-level detection enable
+//         IREN: Rising edge detection enable
+#define RTE_FSMC_SR3_IFEN               0
+#define RTE_FSMC_SR3_ILEN               0
+#define RTE_FSMC_SR3_IREN               0
+
+//       
+
+//       Common memory space timing
+//          MEMHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access to. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
+//          MEMSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 2 HCLK cycles (for NAND Flash)
+//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
+#define RTE_FSMC_PMEM3_MEMHIZ           255
+#define RTE_FSMC_PMEM3_MEMHOLD          255
+#define RTE_FSMC_PMEM3_MEMWAIT          255
+#define RTE_FSMC_PMEM3_MEMSET           255
+
+//       
+
+//       Attribute memory space timing
+//          ATTHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
+//          ATTSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 1 HCLK cycle
+//           1111 1111: 256 HCLK cycles (default value after reset)
+#define RTE_FSMC_PATT3_ATTHIZ           255
+#define RTE_FSMC_PATT3_ATTHOLD          255
+#define RTE_FSMC_PATT3_ATTWAIT          255
+#define RTE_FSMC_PATT3_ATTSET           255
+
+//       
+
+//     
+
+//   
+
+//    PC Card Controller
+
+//      FSMC_NCE4_x Chip Select
+//      Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2
+#define RTE_FSMC_NCE4              0
+
+//        PC Card Control
+//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
+//          Defines the page size for the extended ECC.
+//          TAR: ALE to RE delay <0-15>
+//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          TCLR: CLE to RE delay <0-15>
+//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
+//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
+//          0000: 1 HCLK cycle (default)
+//          1111: 16 HCLK cycles
+//          Note: SET is MEMSET or ATTSET according to the addressed space.
+//          ECCEN: ECC computation logic enable
+//         PWID: Databus width <0=>8 bits <1=>16 bits
+//          Defines the external memory device width.
+//          PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA
+//          Defines the type of device attached to the corresponding memory bank.
+//          PBKEN: PC Card memory bank enable
+//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
+//          PWAITEN: Wait feature enable
+//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
+#define RTE_FSMC_PCR4_ECCPS             0
+#define RTE_FSMC_PCR4_TAR               0
+#define RTE_FSMC_PCR4_TCLR              0
+#define RTE_FSMC_PCR4_ECCEN             0
+#define RTE_FSMC_PCR4_PWID              0
+#define RTE_FSMC_PCR4_PTYP              0
+#define RTE_FSMC_PCR4_PBKEN             0
+#define RTE_FSMC_PCR4_PWAITEN           0
+
+//       
+
+//        Interrupt configuration
+//         IFEN: Falling edge detection enable
+//         ILEN: High-level detection enable
+//         IREN: Rising edge detection enable
+#define RTE_FSMC_SR4_IFEN               0
+#define RTE_FSMC_SR4_ILEN               0
+#define RTE_FSMC_SR4_IREN               0
+
+//       
+
+//        Common memory space timing
+//          MEMHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          MEMWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access to. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
+//          MEMSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 2 HCLK cycles (for NAND Flash)
+//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
+#define RTE_FSMC_PMEM4_MEMHIZ           255
+#define RTE_FSMC_PMEM4_MEMHOLD          255
+#define RTE_FSMC_PMEM4_MEMWAIT          255
+#define RTE_FSMC_PMEM4_MEMSET           255
+
+//       
+
+//        Attribute memory space timing
+//          ATTHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a NAND Flash write access.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          ATTWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
+//           NOE), for NAND Flash read or write access. The duration for command assertion
+//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
+//           0000 0000: reserved
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
+//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
+//          ATTSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up address before the command
+//           assertion (NWE, NOE), for NAND Flash read or write access.
+//           0000 0000: 1 HCLK cycle
+//           1111 1111: 256 HCLK cycles (default value after reset)
+#define RTE_FSMC_PATT4_ATTHIZ           255
+#define RTE_FSMC_PATT4_ATTHOLD          255
+#define RTE_FSMC_PATT4_ATTWAIT          255
+#define RTE_FSMC_PATT4_ATTSET           255
+
+//       
+
+//        I/O space timing
+//          IOHIZ: Databus HiZ time <0-255>
+//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
+//           start of a PC Card write access. Only valid for write transaction.
+//           0000 0000: 0 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          IOHOLD: Hold time <1-255>
+//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
+//           the command deassertion (NWE, NOE), for PC Card read or write access.
+//           0000 0000: reserved
+//           0000 0001: 1 HCLK cycle
+//           1111 1111: 255 HCLK cycles (default value after reset)
+//          IOWAIT: Wait time <1-255>
+//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE,
+//           SMNOE), for PC Card read or write access. The duration for command assertion is
+//           extended if the wait signal (NWAIT) is active (low) at the end of the
+//           programmed value of HCLK.
+//           0000 0000: reserved, do not use this value
+//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
+//           1111 1111: 256 HCLK cycles
+//          IOSET: Setup time <0-255>
+//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
+//           assertion (NWE, NOE), for PC Card read or write access.
+//           0000 0000: 1 HCLK cycle
+//           1111 1111: 256 HCLK cycles (default value after reset)
+#define RTE_FSMC_PIO4_IOHIZ             255
+#define RTE_FSMC_PIO4_IOHOLD            255
+#define RTE_FSMC_PIO4_IOWAIT            255
+#define RTE_FSMC_PIO4_IOSET             255
+
+//       
+
+//     
+
+//   
+
+// 
+
+
+#endif  /* __RTE_DEVICE_H */
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s
new file mode 100644
index 00000000..d398143e
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s
@@ -0,0 +1,419 @@
+;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
+;* File Name          : startup_stm32f2xx.s
+;* Author             : MCD Application Team
+;* Version            : V1.0.0
+;* Date               : 18-April-2011
+;* Description        : STM32F2xx devices vector table for MDK-ARM toolchain. 
+;*                      This module performs:
+;*                      - Set the initial SP
+;*                      - Set the initial PC == Reset_Handler
+;*                      - Set the vector table entries with the exceptions ISR address
+;*                      - Branches to __main in the C library (which eventually
+;*                        calls main()).
+;*                      After Reset the CortexM3 processor is in Thread mode,
+;*                      priority is Privileged, and the Stack is set to Main.
+;* <<< Use Configuration Wizard in Context Menu >>>   
+;*******************************************************************************
+; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+; Amount of memory (in bytes) allocated for Stack
+; Tailor this value to your application needs
+;  Stack Configuration
+;    Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
+; 
+
+Stack_Size      EQU     0x00000400
+
+                AREA    STACK, NOINIT, READWRITE, ALIGN=3
+Stack_Mem       SPACE   Stack_Size
+__initial_sp
+
+
+;  Heap Configuration
+;     Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
+; 
+
+Heap_Size       EQU     0x00007000
+
+                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
+__heap_base
+Heap_Mem        SPACE   Heap_Size
+__heap_limit
+
+                PRESERVE8
+                THUMB
+
+
+; Vector Table Mapped to Address 0 at Reset
+                AREA    RESET, DATA, READONLY
+                EXPORT  __Vectors
+                EXPORT  __Vectors_End
+                EXPORT  __Vectors_Size
+
+__Vectors       DCD     __initial_sp               ; Top of Stack
+                DCD     Reset_Handler              ; Reset Handler
+                DCD     NMI_Handler                ; NMI Handler
+                DCD     HardFault_Handler          ; Hard Fault Handler
+                DCD     MemManage_Handler          ; MPU Fault Handler
+                DCD     BusFault_Handler           ; Bus Fault Handler
+                DCD     UsageFault_Handler         ; Usage Fault Handler
+                DCD     0                          ; Reserved
+                DCD     0                          ; Reserved
+                DCD     0                          ; Reserved
+                DCD     0                          ; Reserved
+                DCD     SVC_Handler                ; SVCall Handler
+                DCD     DebugMon_Handler           ; Debug Monitor Handler
+                DCD     0                          ; Reserved
+                DCD     PendSV_Handler             ; PendSV Handler
+                DCD     SysTick_Handler            ; SysTick Handler
+
+                ; External Interrupts
+                DCD     WWDG_IRQHandler                   ; Window WatchDog                                        
+                DCD     PVD_IRQHandler                    ; PVD through EXTI Line detection                        
+                DCD     TAMP_STAMP_IRQHandler             ; Tamper and TimeStamps through the EXTI line            
+                DCD     RTC_WKUP_IRQHandler               ; RTC Wakeup through the EXTI line                       
+                DCD     FLASH_IRQHandler                  ; FLASH                                           
+                DCD     RCC_IRQHandler                    ; RCC                                             
+                DCD     EXTI0_IRQHandler                  ; EXTI Line0                                             
+                DCD     EXTI1_IRQHandler                  ; EXTI Line1                                             
+                DCD     EXTI2_IRQHandler                  ; EXTI Line2                                             
+                DCD     EXTI3_IRQHandler                  ; EXTI Line3                                             
+                DCD     EXTI4_IRQHandler                  ; EXTI Line4                                             
+                DCD     DMA1_Stream0_IRQHandler           ; DMA1 Stream 0                                   
+                DCD     DMA1_Stream1_IRQHandler           ; DMA1 Stream 1                                   
+                DCD     DMA1_Stream2_IRQHandler           ; DMA1 Stream 2                                   
+                DCD     DMA1_Stream3_IRQHandler           ; DMA1 Stream 3                                   
+                DCD     DMA1_Stream4_IRQHandler           ; DMA1 Stream 4                                   
+                DCD     DMA1_Stream5_IRQHandler           ; DMA1 Stream 5                                   
+                DCD     DMA1_Stream6_IRQHandler           ; DMA1 Stream 6                                   
+                DCD     ADC_IRQHandler                    ; ADC1, ADC2 and ADC3s                            
+                DCD     CAN1_TX_IRQHandler                ; CAN1 TX                                                
+                DCD     CAN1_RX0_IRQHandler               ; CAN1 RX0                                               
+                DCD     CAN1_RX1_IRQHandler               ; CAN1 RX1                                               
+                DCD     CAN1_SCE_IRQHandler               ; CAN1 SCE                                               
+                DCD     EXTI9_5_IRQHandler                ; External Line[9:5]s                                    
+                DCD     TIM1_BRK_TIM9_IRQHandler          ; TIM1 Break and TIM9                   
+                DCD     TIM1_UP_TIM10_IRQHandler          ; TIM1 Update and TIM10                 
+                DCD     TIM1_TRG_COM_TIM11_IRQHandler     ; TIM1 Trigger and Commutation and TIM11
+                DCD     TIM1_CC_IRQHandler                ; TIM1 Capture Compare                                   
+                DCD     TIM2_IRQHandler                   ; TIM2                                            
+                DCD     TIM3_IRQHandler                   ; TIM3                                            
+                DCD     TIM4_IRQHandler                   ; TIM4                                            
+                DCD     I2C1_EV_IRQHandler                ; I2C1 Event                                             
+                DCD     I2C1_ER_IRQHandler                ; I2C1 Error                                             
+                DCD     I2C2_EV_IRQHandler                ; I2C2 Event                                             
+                DCD     I2C2_ER_IRQHandler                ; I2C2 Error                                               
+                DCD     SPI1_IRQHandler                   ; SPI1                                            
+                DCD     SPI2_IRQHandler                   ; SPI2                                            
+                DCD     USART1_IRQHandler                 ; USART1                                          
+                DCD     USART2_IRQHandler                 ; USART2                                          
+                DCD     USART3_IRQHandler                 ; USART3                                          
+                DCD     EXTI15_10_IRQHandler              ; External Line[15:10]s                                  
+                DCD     RTC_Alarm_IRQHandler              ; RTC Alarm (A and B) through EXTI Line                  
+                DCD     OTG_FS_WKUP_IRQHandler            ; USB OTG FS Wakeup through EXTI line                        
+                DCD     TIM8_BRK_TIM12_IRQHandler         ; TIM8 Break and TIM12                  
+                DCD     TIM8_UP_TIM13_IRQHandler          ; TIM8 Update and TIM13                 
+                DCD     TIM8_TRG_COM_TIM14_IRQHandler     ; TIM8 Trigger and Commutation and TIM14
+                DCD     TIM8_CC_IRQHandler                ; TIM8 Capture Compare                                   
+                DCD     DMA1_Stream7_IRQHandler           ; DMA1 Stream7                                           
+                DCD     FSMC_IRQHandler                   ; FSMC                                            
+                DCD     SDIO_IRQHandler                   ; SDIO                                            
+                DCD     TIM5_IRQHandler                   ; TIM5                                            
+                DCD     SPI3_IRQHandler                   ; SPI3                                            
+                DCD     UART4_IRQHandler                  ; UART4                                           
+                DCD     UART5_IRQHandler                  ; UART5                                           
+                DCD     TIM6_DAC_IRQHandler               ; TIM6 and DAC1&2 underrun errors                   
+                DCD     TIM7_IRQHandler                   ; TIM7                   
+                DCD     DMA2_Stream0_IRQHandler           ; DMA2 Stream 0                                   
+                DCD     DMA2_Stream1_IRQHandler           ; DMA2 Stream 1                                   
+                DCD     DMA2_Stream2_IRQHandler           ; DMA2 Stream 2                                   
+                DCD     DMA2_Stream3_IRQHandler           ; DMA2 Stream 3                                   
+                DCD     DMA2_Stream4_IRQHandler           ; DMA2 Stream 4                                   
+                DCD     ETH_IRQHandler                    ; Ethernet                                        
+                DCD     ETH_WKUP_IRQHandler               ; Ethernet Wakeup through EXTI line                      
+                DCD     CAN2_TX_IRQHandler                ; CAN2 TX                                                
+                DCD     CAN2_RX0_IRQHandler               ; CAN2 RX0                                               
+                DCD     CAN2_RX1_IRQHandler               ; CAN2 RX1                                               
+                DCD     CAN2_SCE_IRQHandler               ; CAN2 SCE                                               
+                DCD     OTG_FS_IRQHandler                 ; USB OTG FS                                      
+                DCD     DMA2_Stream5_IRQHandler           ; DMA2 Stream 5                                   
+                DCD     DMA2_Stream6_IRQHandler           ; DMA2 Stream 6                                   
+                DCD     DMA2_Stream7_IRQHandler           ; DMA2 Stream 7                                   
+                DCD     USART6_IRQHandler                 ; USART6                                           
+                DCD     I2C3_EV_IRQHandler                ; I2C3 event                                             
+                DCD     I2C3_ER_IRQHandler                ; I2C3 error                                             
+                DCD     OTG_HS_EP1_OUT_IRQHandler         ; USB OTG HS End Point 1 Out                      
+                DCD     OTG_HS_EP1_IN_IRQHandler          ; USB OTG HS End Point 1 In                       
+                DCD     OTG_HS_WKUP_IRQHandler            ; USB OTG HS Wakeup through EXTI                         
+                DCD     OTG_HS_IRQHandler                 ; USB OTG HS                                      
+                DCD     DCMI_IRQHandler                   ; DCMI                                            
+                DCD     CRYP_IRQHandler                   ; CRYP crypto                                     
+                DCD     HASH_RNG_IRQHandler               ; Hash and Rng 
+__Vectors_End
+
+__Vectors_Size  EQU  __Vectors_End - __Vectors
+
+                AREA    |.text|, CODE, READONLY
+
+; Reset handler
+Reset_Handler    PROC
+                 EXPORT  Reset_Handler             [WEAK]
+        IMPORT  SystemInit
+        IMPORT  __main
+                 LDR     R0, =SystemInit
+                 BLX     R0
+                 LDR     R0, =__main
+                 BX      R0
+                 ENDP
+
+; Dummy Exception Handlers (infinite loops which can be modified)
+
+NMI_Handler     PROC
+                EXPORT  NMI_Handler                [WEAK]
+                B       .
+                ENDP
+HardFault_Handler\
+                PROC
+                EXPORT  HardFault_Handler          [WEAK]
+                B       .
+                ENDP
+MemManage_Handler\
+                PROC
+                EXPORT  MemManage_Handler          [WEAK]
+                B       .
+                ENDP
+BusFault_Handler\
+                PROC
+                EXPORT  BusFault_Handler           [WEAK]
+                B       .
+                ENDP
+UsageFault_Handler\
+                PROC
+                EXPORT  UsageFault_Handler         [WEAK]
+                B       .
+                ENDP
+SVC_Handler     PROC
+                EXPORT  SVC_Handler                [WEAK]
+                B       .
+                ENDP
+DebugMon_Handler\
+                PROC
+                EXPORT  DebugMon_Handler           [WEAK]
+                B       .
+                ENDP
+PendSV_Handler  PROC
+                EXPORT  PendSV_Handler             [WEAK]
+                B       .
+                ENDP
+SysTick_Handler PROC
+                EXPORT  SysTick_Handler            [WEAK]
+                B       .
+                ENDP
+
+Default_Handler PROC
+
+                EXPORT  WWDG_IRQHandler                   [WEAK]                                        
+                EXPORT  PVD_IRQHandler                    [WEAK]                      
+                EXPORT  TAMP_STAMP_IRQHandler             [WEAK]         
+                EXPORT  RTC_WKUP_IRQHandler               [WEAK]                     
+                EXPORT  FLASH_IRQHandler                  [WEAK]                                         
+                EXPORT  RCC_IRQHandler                    [WEAK]                                            
+                EXPORT  EXTI0_IRQHandler                  [WEAK]                                            
+                EXPORT  EXTI1_IRQHandler                  [WEAK]                                             
+                EXPORT  EXTI2_IRQHandler                  [WEAK]                                            
+                EXPORT  EXTI3_IRQHandler                  [WEAK]                                           
+                EXPORT  EXTI4_IRQHandler                  [WEAK]                                            
+                EXPORT  DMA1_Stream0_IRQHandler           [WEAK]                                
+                EXPORT  DMA1_Stream1_IRQHandler           [WEAK]                                   
+                EXPORT  DMA1_Stream2_IRQHandler           [WEAK]                                   
+                EXPORT  DMA1_Stream3_IRQHandler           [WEAK]                                   
+                EXPORT  DMA1_Stream4_IRQHandler           [WEAK]                                   
+                EXPORT  DMA1_Stream5_IRQHandler           [WEAK]                                   
+                EXPORT  DMA1_Stream6_IRQHandler           [WEAK]                                   
+                EXPORT  ADC_IRQHandler                    [WEAK]                         
+                EXPORT  CAN1_TX_IRQHandler                [WEAK]                                                
+                EXPORT  CAN1_RX0_IRQHandler               [WEAK]                                               
+                EXPORT  CAN1_RX1_IRQHandler               [WEAK]                                                
+                EXPORT  CAN1_SCE_IRQHandler               [WEAK]                                                
+                EXPORT  EXTI9_5_IRQHandler                [WEAK]                                    
+                EXPORT  TIM1_BRK_TIM9_IRQHandler          [WEAK]                  
+                EXPORT  TIM1_UP_TIM10_IRQHandler          [WEAK]                
+                EXPORT  TIM1_TRG_COM_TIM11_IRQHandler     [WEAK] 
+                EXPORT  TIM1_CC_IRQHandler                [WEAK]                                   
+                EXPORT  TIM2_IRQHandler                   [WEAK]                                            
+                EXPORT  TIM3_IRQHandler                   [WEAK]                                            
+                EXPORT  TIM4_IRQHandler                   [WEAK]                                            
+                EXPORT  I2C1_EV_IRQHandler                [WEAK]                                             
+                EXPORT  I2C1_ER_IRQHandler                [WEAK]                                             
+                EXPORT  I2C2_EV_IRQHandler                [WEAK]                                            
+                EXPORT  I2C2_ER_IRQHandler                [WEAK]                                               
+                EXPORT  SPI1_IRQHandler                   [WEAK]                                           
+                EXPORT  SPI2_IRQHandler                   [WEAK]                                            
+                EXPORT  USART1_IRQHandler                 [WEAK]                                          
+                EXPORT  USART2_IRQHandler                 [WEAK]                                          
+                EXPORT  USART3_IRQHandler                 [WEAK]                                         
+                EXPORT  EXTI15_10_IRQHandler              [WEAK]                                  
+                EXPORT  RTC_Alarm_IRQHandler              [WEAK]                  
+                EXPORT  OTG_FS_WKUP_IRQHandler            [WEAK]                        
+                EXPORT  TIM8_BRK_TIM12_IRQHandler         [WEAK]                 
+                EXPORT  TIM8_UP_TIM13_IRQHandler          [WEAK]                 
+                EXPORT  TIM8_TRG_COM_TIM14_IRQHandler     [WEAK] 
+                EXPORT  TIM8_CC_IRQHandler                [WEAK]                                   
+                EXPORT  DMA1_Stream7_IRQHandler           [WEAK]                                          
+                EXPORT  FSMC_IRQHandler                   [WEAK]                                             
+                EXPORT  SDIO_IRQHandler                   [WEAK]                                             
+                EXPORT  TIM5_IRQHandler                   [WEAK]                                             
+                EXPORT  SPI3_IRQHandler                   [WEAK]                                             
+                EXPORT  UART4_IRQHandler                  [WEAK]                                            
+                EXPORT  UART5_IRQHandler                  [WEAK]                                            
+                EXPORT  TIM6_DAC_IRQHandler               [WEAK]                   
+                EXPORT  TIM7_IRQHandler                   [WEAK]                    
+                EXPORT  DMA2_Stream0_IRQHandler           [WEAK]                                  
+                EXPORT  DMA2_Stream1_IRQHandler           [WEAK]                                   
+                EXPORT  DMA2_Stream2_IRQHandler           [WEAK]                                    
+                EXPORT  DMA2_Stream3_IRQHandler           [WEAK]                                    
+                EXPORT  DMA2_Stream4_IRQHandler           [WEAK]                                 
+                EXPORT  ETH_IRQHandler                    [WEAK]                                         
+                EXPORT  ETH_WKUP_IRQHandler               [WEAK]                     
+                EXPORT  CAN2_TX_IRQHandler                [WEAK]                                               
+                EXPORT  CAN2_RX0_IRQHandler               [WEAK]                                               
+                EXPORT  CAN2_RX1_IRQHandler               [WEAK]                                               
+                EXPORT  CAN2_SCE_IRQHandler               [WEAK]                                               
+                EXPORT  OTG_FS_IRQHandler                 [WEAK]                                       
+                EXPORT  DMA2_Stream5_IRQHandler           [WEAK]                                   
+                EXPORT  DMA2_Stream6_IRQHandler           [WEAK]                                   
+                EXPORT  DMA2_Stream7_IRQHandler           [WEAK]                                   
+                EXPORT  USART6_IRQHandler                 [WEAK]                                           
+                EXPORT  I2C3_EV_IRQHandler                [WEAK]                                              
+                EXPORT  I2C3_ER_IRQHandler                [WEAK]                                              
+                EXPORT  OTG_HS_EP1_OUT_IRQHandler         [WEAK]                      
+                EXPORT  OTG_HS_EP1_IN_IRQHandler          [WEAK]                      
+                EXPORT  OTG_HS_WKUP_IRQHandler            [WEAK]                        
+                EXPORT  OTG_HS_IRQHandler                 [WEAK]                                      
+                EXPORT  DCMI_IRQHandler                   [WEAK]                                             
+                EXPORT  CRYP_IRQHandler                   [WEAK]                                     
+                EXPORT  HASH_RNG_IRQHandler               [WEAK]
+
+WWDG_IRQHandler                                                       
+PVD_IRQHandler                                      
+TAMP_STAMP_IRQHandler                  
+RTC_WKUP_IRQHandler                                
+FLASH_IRQHandler                                                       
+RCC_IRQHandler                                                            
+EXTI0_IRQHandler                                                          
+EXTI1_IRQHandler                                                           
+EXTI2_IRQHandler                                                          
+EXTI3_IRQHandler                                                         
+EXTI4_IRQHandler                                                          
+DMA1_Stream0_IRQHandler                                       
+DMA1_Stream1_IRQHandler                                          
+DMA1_Stream2_IRQHandler                                          
+DMA1_Stream3_IRQHandler                                          
+DMA1_Stream4_IRQHandler                                          
+DMA1_Stream5_IRQHandler                                          
+DMA1_Stream6_IRQHandler                                          
+ADC_IRQHandler                                         
+CAN1_TX_IRQHandler                                                            
+CAN1_RX0_IRQHandler                                                          
+CAN1_RX1_IRQHandler                                                           
+CAN1_SCE_IRQHandler                                                           
+EXTI9_5_IRQHandler                                                
+TIM1_BRK_TIM9_IRQHandler                        
+TIM1_UP_TIM10_IRQHandler                      
+TIM1_TRG_COM_TIM11_IRQHandler  
+TIM1_CC_IRQHandler                                               
+TIM2_IRQHandler                                                           
+TIM3_IRQHandler                                                           
+TIM4_IRQHandler                                                           
+I2C1_EV_IRQHandler                                                         
+I2C1_ER_IRQHandler                                                         
+I2C2_EV_IRQHandler                                                        
+I2C2_ER_IRQHandler                                                           
+SPI1_IRQHandler                                                          
+SPI2_IRQHandler                                                           
+USART1_IRQHandler                                                       
+USART2_IRQHandler                                                       
+USART3_IRQHandler                                                      
+EXTI15_10_IRQHandler                                            
+RTC_Alarm_IRQHandler                            
+OTG_FS_WKUP_IRQHandler                                
+TIM8_BRK_TIM12_IRQHandler                      
+TIM8_UP_TIM13_IRQHandler                       
+TIM8_TRG_COM_TIM14_IRQHandler  
+TIM8_CC_IRQHandler                                               
+DMA1_Stream7_IRQHandler                                                 
+FSMC_IRQHandler                                                            
+SDIO_IRQHandler                                                            
+TIM5_IRQHandler                                                            
+SPI3_IRQHandler                                                            
+UART4_IRQHandler                                                          
+UART5_IRQHandler                                                          
+TIM6_DAC_IRQHandler                            
+TIM7_IRQHandler                              
+DMA2_Stream0_IRQHandler                                         
+DMA2_Stream1_IRQHandler                                          
+DMA2_Stream2_IRQHandler                                           
+DMA2_Stream3_IRQHandler                                           
+DMA2_Stream4_IRQHandler                                        
+ETH_IRQHandler                                                         
+ETH_WKUP_IRQHandler                                
+CAN2_TX_IRQHandler                                                           
+CAN2_RX0_IRQHandler                                                          
+CAN2_RX1_IRQHandler                                                          
+CAN2_SCE_IRQHandler                                                          
+OTG_FS_IRQHandler                                                    
+DMA2_Stream5_IRQHandler                                          
+DMA2_Stream6_IRQHandler                                          
+DMA2_Stream7_IRQHandler                                          
+USART6_IRQHandler                                                        
+I2C3_EV_IRQHandler                                                          
+I2C3_ER_IRQHandler                                                          
+OTG_HS_EP1_OUT_IRQHandler                           
+OTG_HS_EP1_IN_IRQHandler                            
+OTG_HS_WKUP_IRQHandler                                
+OTG_HS_IRQHandler                                                   
+DCMI_IRQHandler                                                            
+CRYP_IRQHandler                                                    
+HASH_RNG_IRQHandler                                               
+
+                B       .
+
+                ENDP
+
+                ALIGN
+
+;*******************************************************************************
+; User Stack and Heap initialization
+;*******************************************************************************
+                 IF      :DEF:__MICROLIB
+                
+                 EXPORT  __initial_sp
+                 EXPORT  __heap_base
+                 EXPORT  __heap_limit
+                
+                 ELSE
+                
+                 IMPORT  __use_two_region_memory
+                 EXPORT  __user_initial_stackheap
+                 
+__user_initial_stackheap
+
+                 LDR     R0, =  Heap_Mem
+                 LDR     R1, =(Stack_Mem + Stack_Size)
+                 LDR     R2, = (Heap_Mem +  Heap_Size)
+                 LDR     R3, = Stack_Mem
+                 BX      LR
+
+                 ALIGN
+
+                 ENDIF
+
+                 END
+
+;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE*****
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c
new file mode 100644
index 00000000..da0e189c
--- /dev/null
+++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c
@@ -0,0 +1,536 @@
+/**
+  ******************************************************************************
+  * @file    system_stm32f2xx.c
+  * @author  MCD Application Team
+  * @version V1.0.0
+  * @date    18-April-2011
+  * @brief   CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
+  *          This file contains the system clock configuration for STM32F2xx devices,
+  *          and is generated by the clock configuration tool
+  *          "STM32f2xx_Clock_Configuration_V1.0.0.xls"
+  *             
+  * 1.  This file provides two functions and one global variable to be called from 
+  *     user application:
+  *      - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
+  *                      and Divider factors, AHB/APBx prescalers and Flash settings),
+  *                      depending on the configuration made in the clock xls tool. 
+  *                      This function is called at startup just after reset and 
+  *                      before branch to main program. This call is made inside
+  *                      the "startup_stm32f2xx.s" file.
+  *
+  *      - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
+  *                                  by the user application to setup the SysTick 
+  *                                  timer or configure other parameters.
+  *                                     
+  *      - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
+  *                                 be called whenever the core clock is changed
+  *                                 during program execution.
+  *
+  * 2. After each device reset the HSI (16 MHz) is used as system clock source.
+  *    Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to
+  *    configure the system clock before to branch to main program.
+  *
+  * 3. If the system clock source selected by user fails to startup, the SystemInit()
+  *    function will do nothing and HSI still used as system clock source. User can 
+  *    add some code to deal with this issue inside the SetSysClock() function.
+  *
+  * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define
+  *    in "stm32f2xx.h" file. When HSE is used as system clock source, directly or
+  *    through PLL, and you are using different crystal you have to adapt the HSE
+  *    value to your own configuration.
+  *
+  * 5. This file configures the system clock as follows:
+  *=============================================================================
+  *=============================================================================
+  *        Supported STM32F2xx device revision    | Rev B and Y
+  *-----------------------------------------------------------------------------
+  *        System Clock source                    | PLL (HSE)
+  *-----------------------------------------------------------------------------
+  *        SYSCLK(Hz)                             | 120000000
+  *-----------------------------------------------------------------------------
+  *        HCLK(Hz)                               | 120000000
+  *-----------------------------------------------------------------------------
+  *        AHB Prescaler                          | 1
+  *-----------------------------------------------------------------------------
+  *        APB1 Prescaler                         | 4
+  *-----------------------------------------------------------------------------
+  *        APB2 Prescaler                         | 2
+  *-----------------------------------------------------------------------------
+  *        HSE Frequency(Hz)                      | 25000000
+  *-----------------------------------------------------------------------------
+  *        PLL_M                                  | 25
+  *-----------------------------------------------------------------------------
+  *        PLL_N                                  | 240
+  *-----------------------------------------------------------------------------
+  *        PLL_P                                  | 2
+  *-----------------------------------------------------------------------------
+  *        PLL_Q                                  | 5
+  *-----------------------------------------------------------------------------
+  *        PLLI2S_N                               | NA
+  *-----------------------------------------------------------------------------
+  *        PLLI2S_R                               | NA
+  *-----------------------------------------------------------------------------
+  *        I2S input clock                        | NA
+  *-----------------------------------------------------------------------------
+  *        VDD(V)                                 | 3.3
+  *-----------------------------------------------------------------------------
+  *        Flash Latency(WS)                      | 3
+  *-----------------------------------------------------------------------------
+  *        Prefetch Buffer                        | ON
+  *-----------------------------------------------------------------------------
+  *        Instruction cache                      | ON
+  *-----------------------------------------------------------------------------
+  *        Data cache                             | ON
+  *-----------------------------------------------------------------------------
+  *        Require 48MHz for USB OTG FS,          | Enabled
+  *        SDIO and RNG clock                     |
+  *-----------------------------------------------------------------------------
+  *=============================================================================
+  ****************************************************************************** 
+  * @attention
+  *
+  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
+  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
+  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
+  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
+  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+  *
+  * 

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c new file mode 100644 index 00000000..6b9dc8e0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config.c + * Purpose: Network Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Definitions +// Global Network System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "my_host" +#define NET_HOST_NAME "my_host" + +// Memory Pool size <1536-262144:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// Network packets are allocated from this memory pool. +// Default: 12000 bytes +#define NET_MEM_SIZE 3000 + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_Network_Interface_ETH_0 +#include "Net_Config_ETH_0.h" +#endif +#ifdef RTE_Network_Interface_ETH_1 +#include "Net_Config_ETH_1.h" +#endif + +#ifdef RTE_Network_Interface_PPP_0 +#include "Net_Config_PPP_0.h" +#endif +#ifdef RTE_Network_Interface_PPP_1 +#include "Net_Config_PPP_1.h" +#endif + +#ifdef RTE_Network_Interface_SLIP_0 +#include "Net_Config_SLIP_0.h" +#endif +#ifdef RTE_Network_Interface_SLIP_1 +#include "Net_Config_SLIP_1.h" +#endif + +#ifdef RTE_Network_Socket_UDP +#include "Net_Config_UDP.h" +#endif +#ifdef RTE_Network_Socket_TCP +#include "Net_Config_TCP.h" +#endif +#ifdef RTE_Network_Socket_BSD +#include "Net_Config_BSD.h" +#endif + +#ifdef RTE_Network_Web_Server_RO +#include "Net_Config_HTTP_Server.h" +#endif +#ifdef RTE_Network_Web_Server_FS +#include "Net_Config_HTTP_Server.h" +#endif + +#ifdef RTE_Network_Telnet_Server +#include "Net_Config_Telnet_Server.h" +#endif + +#ifdef RTE_Network_TFTP_Server +#include "Net_Config_TFTP_Server.h" +#endif +#ifdef RTE_Network_TFTP_Client +#include "Net_Config_TFTP_Client.h" +#endif + +#ifdef RTE_Network_FTP_Server +#include "Net_Config_FTP_Server.h" +#endif +#ifdef RTE_Network_FTP_Client +#include "Net_Config_FTP_Client.h" +#endif + +#ifdef RTE_Network_DNS_Client +#include "Net_Config_DNS_Client.h" +#endif + +#ifdef RTE_Network_SMTP_Client +#include "Net_Config_SMTP_Client.h" +#endif + +#ifdef RTE_Network_SNMP_Agent +#include "Net_Config_SNMP_Agent.h" +#endif + +#ifdef RTE_Network_SNTP_Client +#include "Net_Config_SNTP_Client.h" +#endif + +#include "net_config.h" + +/** +\addtogroup net_genFunc +@{ +*/ +/** + \fn void net_sys_error (ERROR_CODE error) + \ingroup net_cores + \brief Network system error handler. +*/ +void net_sys_error (ERROR_CODE error) { + /* This function is called when a fatal error is encountered. */ + /* The normal program execution is not possible anymore. */ + + switch (error) { + case ERR_MEM_ALLOC: + /* Out of memory */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer Corrupted */ + /* More data written than the size of allocated mem block */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state */ + break; + } + + /* End-less loop */ + while (1); +} +/** +@} +*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h new file mode 100644 index 00000000..d7e6a614 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_BSD.h + * Purpose: Network Configuration BSD Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Berkley (BSD) Sockets +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUM_SOCKS 7 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SERVER_SOCKS 1 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RECEIVE_TOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_HOSTNAME_ENABLE 0 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h new file mode 100644 index 00000000..d30b7180 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Service + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_DNS_Client.h + * Purpose: Network Configuration DNS Client + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// DNS Client +#define DNS_CLIENT_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_CLIENT_TAB_SIZE 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h new file mode 100644 index 00000000..7be57ad6 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h @@ -0,0 +1,222 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Interface + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_ETH_0.h + * Purpose: Network Configuration ETH Interface + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Ethernet Network Interface 0 +#define ETH0_ENABLE 1 + +// Connect to hardware via Driver_ETH# <0-255> +// Select driver control block for MAC and PHY interface +#define ETH0_DRIVER 1 + +// MAC Address +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x1E +#define ETH0_MAC1 0x1E + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define ETH0_MAC2 0x30 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define ETH0_MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0xA2 +#define ETH0_MAC4 0xA2 + +// Address byte 5 <0x00-0xff> +// Default: 0x45 +#define ETH0_MAC5 0x45 + +// Address byte 6 <0x00-0xff> +// Default: 0x5E +#define ETH0_MAC6 0x5E +// + +// IP Address +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define ETH0_IP4 100 +// + +// Subnet mask +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define ETH0_MASK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define ETH0_MASK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define ETH0_MASK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define ETH0_MASK4 0 +// + +// Default Gateway +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define ETH0_GW4 254 +// + +// Primary DNS Server +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_PRI_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_PRI_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_PRI_DNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define ETH0_PRI_DNS4 129 +// + +// Secondary DNS Server +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_SEC_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_SEC_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_SEC_DNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define ETH0_SEC_DNS4 130 +// + +// ARP Definitions +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ETH0_ARP_TAB_SIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ETH0_ARP_CACHE_TOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ETH0_ARP_MAX_RETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ETH0_ARP_RESEND_TOUT 2 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ETH0_ARP_NOTIFY 0 +// + +// IGMP Group Management +// Enable or disable Internet Group Management Protocol +#define ETH0_IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define ETH0_IGMP_TAB_SIZE 5 +// + +// NetBIOS Name Service +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define ETH0_NBNS_ENABLE 1 + +// Dynamic Host Configuration +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define ETH0_DHCP_ENABLE 1 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define ETH0_DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_BOOTFILE 0 + +// NTP Servers +// This value is optional. If enabled, a list of NTP Servers +// (option 42) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_NTP_SERVERS 0 +// + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h new file mode 100644 index 00000000..e659ce92 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_TCP.h + * Purpose: Network Configuration TCP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUM_SOCKS 10 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAX_RETRY 5 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRY_TOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFAULT_TOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAX_SEG_SIZE 1460 + +// Receive Window Size <536-65535> +// Receive Window Size specifies the size of data, +// that the socket is able to buffer in flow-control mode. +// Default: 4380 +#define TCP_RECEIVE_WIN_SIZE 4380 + +// + +// TCP Initial Retransmit period in seconds +#define TCP_INITIAL_RETRY_TOUT 1 + +// TCP SYN frame retransmit period in seconds +#define TCP_SYN_RETRY_TOUT 2 + +// Number of retries to establish a connection +#define TCP_CONNECT_RETRY 7 + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h new file mode 100644 index 00000000..b7995c22 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_UDP.h + * Purpose: Network Configuration UDP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-20> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUM_SOCKS 10 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c new file mode 100644 index 00000000..735089a4 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Debug.c + * Purpose: Network Debug Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Print Time Stamp +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 0 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 0 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 1 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 1 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Time debug messages +#define DBG_SNTP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 1 +// + +// Application Debug Definitions +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP_SERVER 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP_SERVER 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTP_CLIENT 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TELNET_SERVER 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP_SERVER 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTP_CLIENT 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP_CLIENT 1 +// + + +#include "net_debug.h" + + +/** + \fn void net_debug_init (void) + \brief Initialize Network Debug Interface. +*/ +void net_debug_init (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h new file mode 100644 index 00000000..938bd18e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h @@ -0,0 +1,28 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'simpleClient' + * Target: 'SimpleClient' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ +#define RTE_Network_Core /* Network Core */ + #define RTE_Network_Debug /* Network Debug Version */ +#define RTE_Network_DNS_Client /* Network DNS Client */ +#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ +#define RTE_Network_Socket_BSD /* Network Socket BSD */ +#define RTE_Network_Socket_TCP /* Network Socket TCP */ +#define RTE_Network_Socket_UDP /* Network Socket UDP */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx new file mode 100644 index 00000000..93fced47 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx @@ -0,0 +1,1422 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + SimpleClient + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + 0x20000408 + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 3 + 0 + 0 + 0 + 0 + .\client.c + client.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\config-SimpleClient.h + config-SimpleClient.h + 0 + 0 + + + 2 + 4 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 0 + 0 + + + 2 + 5 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 6 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 7 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 10 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 11 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 12 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + PHY_ST802RT1.c + 1 + 0 + + + 6 + 15 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + EMAC_STM32F2xx.c + 1 + 0 + + + 6 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 17 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 19 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::Network + 0 + 0 + 0 + 1 + + 8 + 20 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + Net_Dbg_CM3_L.lib + 1 + 0 + + + 8 + 21 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config.c + Net_Config.c + 1 + 0 + + + 8 + 22 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_BSD.h + Net_Config_BSD.h + 1 + 0 + + + 8 + 23 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_DNS_Client.h + Net_Config_DNS_Client.h + 1 + 0 + + + 8 + 24 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_ETH_0.h + Net_Config_ETH_0.h + 1 + 0 + + + 8 + 25 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_TCP.h + Net_Config_TCP.h + 1 + 0 + + + 8 + 26 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_UDP.h + Net_Config_UDP.h + 1 + 0 + + + 8 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Debug.c + Net_Debug.c + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 9 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 9 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 9 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 9 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 9 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 9 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 9 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 9 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 9 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 9 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 9 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 9 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 9 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 9 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 9 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 9 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 9 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 9 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 9 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 9 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 9 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 9 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 9 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 9 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + crl.c + 1 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + internal.c + 1 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + io.c + 1 + 0 + + + 9 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + keys.c + 1 + 0 + + + 9 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + ocsp.c + 1 + 0 + + + 9 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + sniffer.c + 1 + 0 + + + 9 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + ssl.c + 1 + 0 + + + 9 + 69 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + tls.c + 1 + 0 + + + 9 + 70 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 9 + 71 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 1 + 0 + + + 9 + 72 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config.h + config.h + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c new file mode 100644 index 00000000..1d1720dc --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c @@ -0,0 +1,758 @@ +/* client.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + #define CYASSL_MDK_ARM +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) + /* in case memory tracker wants stats */ + #define CYASSL_TRACK_MEMORY +#endif + +#include +#include + +#include "examples/client/client.h" + +#define USE_CYASSL_MEMORY + +#ifdef CYASSL_CALLBACKS + int handShakeCB(HandShakeInfo*); + int timeoutCB(TimeoutInfo*); + Timeval timeout; +#endif + + +static void NonBlockingSSL_Connect(CYASSL* ssl) +{ +#ifndef CYASSL_CALLBACKS + int ret = CyaSSL_connect(ssl); +#else + int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); +#endif + int error = CyaSSL_get_error(ssl, 0); + SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); + int select_ret; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... client would read block\n"); + else + printf("... client would write block\n"); + +#ifdef CYASSL_DTLS + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); +#endif + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + #ifndef CYASSL_CALLBACKS + ret = CyaSSL_connect(ssl); + #else + ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); + #endif + error = CyaSSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } +#ifdef CYASSL_DTLS + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } +#endif + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_connect failed"); +} + + +static void Usage(void) +{ + printf("client " LIBCYASSL_VERSION_STRING + " NOTE: All files relative to CyaSSL home dir\n"); + printf("-? Help, print this usage\n"); + printf("-h Host to connect to, default %s\n", yasslIP); + printf("-p Port to connect on, not 0, default %d\n", yasslPort); + printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", + CLIENT_DEFAULT_VERSION); + printf("-l Cipher list\n"); + printf("-c Certificate file, default %s\n", cliCert); + printf("-k Key file, default %s\n", cliKey); + printf("-A Certificate Authority file, default %s\n", caCert); + printf("-b Benchmark connections and print stats\n"); + printf("-s Use pre Shared keys\n"); + printf("-t Track CyaSSL memory use\n"); + printf("-d Disable peer checks\n"); + printf("-g Send server HTTP GET\n"); + printf("-u Use UDP DTLS," + " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); + printf("-m Match domain name in cert\n"); + printf("-N Use Non-blocking sockets\n"); + printf("-r Resume session\n"); + printf("-f Fewer packets/group messages\n"); + printf("-x Disable client cert/key loading\n"); +#ifdef SHOW_SIZES + printf("-z Print structure sizes\n"); +#endif + printf("-S Use Host Name Indication\n"); +} + +#ifdef CYASSL_MDK_SHELL +#define exit(code) return(code) +#endif + +#ifdef CYASSL_MDK_SHELL + #define exit(code) return(code) +#endif + + +THREAD_RETURN CYASSL_THREAD client_test(void* args) +{ + SOCKET_T sockfd = 0; + + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + CYASSL* ssl = 0; + + CYASSL* sslResume = 0; + CYASSL_SESSION* session = 0; + char resumeMsg[] = "resuming cyassl!"; + int resumeSz = sizeof(resumeMsg); + + char msg[32] = "hello cyassl!"; /* GET may make bigger */ + char reply[80]; + int input; + int msgSz = (int)strlen(msg); + + int port = yasslPort; + char* host = (char*)yasslIP; + char* domain = (char*)"www.yassl.com"; + + int ch; + int version = CLIENT_INVALID_VERSION; + int usePsk = 0; + int sendGET = 0; + int benchmark = 0; + int doDTLS = 0; + int matchName = 0; + int doPeerCheck = 1; + int nonBlocking = 0; + int resumeSession = 0; + int trackMemory = 0; + int useClientCert = 1; + int fewerPackets = 0; + char* cipherList = NULL; + char* verifyCert = (char*)caCert; + char* ourCert = (char*)cliCert; + char* ourKey = (char*)cliKey; + +#ifdef HAVE_SNI + char* sniHostName = NULL; +#endif + + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef NO_RSA + verifyCert = (char*)eccCert; + ourCert = (char*)cliEccCert; + ourKey = (char*)cliEccKey; +#endif + (void)resumeSz; + (void)session; + (void)sslResume; + (void)trackMemory; + + while ((ch = mygetopt(argc, argv, "?gdusmNrtfxh:p:v:l:A:c:k:b:zS:")) != -1){ + switch (ch) { + case '?' : + Usage(); + exit(EXIT_SUCCESS); + + case 'g' : + sendGET = 1; + break; + + case 'd' : + doPeerCheck = 0; + break; + + case 'u' : + doDTLS = 1; + break; + + case 's' : + usePsk = 1; + break; + + case 't' : + #ifdef USE_CYASSL_MEMORY + trackMemory = 1; + #endif + break; + + case 'm' : + matchName = 1; + break; + + case 'x' : + useClientCert = 0; + break; + + case 'f' : + fewerPackets = 1; + break; + + case 'h' : + host = myoptarg; + domain = myoptarg; + break; + + case 'p' : + port = atoi(myoptarg); + #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) + if (port == 0) + err_sys("port number cannot be 0"); + #endif + break; + + case 'v' : + version = atoi(myoptarg); + if (version < 0 || version > 3) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'l' : + cipherList = myoptarg; + break; + + case 'A' : + verifyCert = myoptarg; + break; + + case 'c' : + ourCert = myoptarg; + break; + + case 'k' : + ourKey = myoptarg; + break; + + case 'b' : + benchmark = atoi(myoptarg); + if (benchmark < 0 || benchmark > 1000000) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'N' : + nonBlocking = 1; + break; + + case 'r' : + resumeSession = 1; + break; + + case 'z' : + #ifndef CYASSL_LEANPSK + CyaSSL_GetObjectSize(); + #endif + break; + + case 'S' : + #ifdef HAVE_SNI + sniHostName = myoptarg; + #endif + break; + + default: + Usage(); + exit(MY_EX_USAGE); + } + } + + myoptind = 0; /* reset for test cases */ + + /* sort out DTLS versus TLS versions */ + if (version == CLIENT_INVALID_VERSION) { + if (doDTLS) + version = CLIENT_DTLS_DEFAULT_VERSION; + else + version = CLIENT_DEFAULT_VERSION; + } + else { + if (doDTLS) { + if (version == 3) + version = -2; + else + version = -1; + } + } + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + InitMemoryTracker(); +#endif + + switch (version) { +#ifndef NO_OLD_TLS + case 0: + method = CyaSSLv3_client_method(); + break; + + + #ifndef NO_TLS + case 1: + method = CyaTLSv1_client_method(); + break; + + case 2: + method = CyaTLSv1_1_client_method(); + break; + #endif /* NO_TLS */ + +#endif /* NO_OLD_TLS */ + +#ifndef NO_TLS + case 3: + method = CyaTLSv1_2_client_method(); + break; +#endif + +#ifdef CYASSL_DTLS + case -1: + method = CyaDTLSv1_client_method(); + break; + + case -2: + method = CyaDTLSv1_2_client_method(); + break; +#endif + + default: + err_sys("Bad SSL version"); + break; + } + + if (method == NULL) + err_sys("unable to get method"); + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + err_sys("unable to get ctx"); + + if (cipherList) + if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) + err_sys("client can't set cipher list 1"); + +#ifdef CYASSL_LEANPSK + usePsk = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + usePsk = 1; +#endif + + if (fewerPackets) + CyaSSL_CTX_set_group_messages(ctx); + + if (usePsk) { +#ifndef NO_PSK + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + if (cipherList == NULL) { + const char *defaultCipherList; + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); + } +#endif + useClientCert = 0; + } + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + if (cipherList == NULL) { + /* don't use EDH, can't sniff tmp keys */ + if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { + err_sys("client can't set cipher list 3"); + } + } +#endif + +#ifdef USER_CA_CB + CyaSSL_CTX_SetCACb(ctx, CaCb); +#endif + +#ifdef VERIFY_CALLBACK + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); +#endif +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (useClientCert){ + if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) + err_sys("can't load client cert file, check file and run from" + " CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load client private key file, check file and run " + "from CyaSSL home dir"); + } + + if (!usePsk) { + if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + } +#endif +#if !defined(NO_CERTS) + if (!usePsk && doPeerCheck == 0) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); +#endif + +#ifdef HAVE_CAVIUM + CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); +#endif + +#ifdef HAVE_SNI + if (sniHostName) + if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) + != SSL_SUCCESS) + err_sys("UseSNI failed"); +#endif + + if (benchmark) { + /* time passed in number of connects give average */ + int times = benchmark; + int i = 0; + + double start = current_time(), avg; + + for (i = 0; i < times; i++) { + tcp_connect(&sockfd, host, port, doDTLS); + + ssl = CyaSSL_new(ctx); + CyaSSL_set_fd(ssl, sockfd); + if (CyaSSL_connect(ssl) != SSL_SUCCESS) + err_sys("SSL_connect failed"); + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + CloseSocket(sockfd); + } + avg = current_time() - start; + avg /= times; + avg *= 1000; /* milliseconds */ + printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); + + CyaSSL_CTX_free(ctx); + ((func_args*)args)->return_code = 0; + + exit(EXIT_SUCCESS); + } + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) + err_sys("unable to get SSL object"); + + CyaSSL_set_quiet_shutdown(ssl, 1) ; + + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(ssl, sockfd); +#ifdef HAVE_CRL + if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) + err_sys("can't enable crl check"); + if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) + err_sys("can't load crl, check crlfile and date validity"); + if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) + err_sys("can't set crl callback"); +#endif + if (matchName && doPeerCheck) + CyaSSL_check_domain_name(ssl, domain); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(ssl); + } + else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { + /* see note at top of README */ + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("err = %d, %s\n", err, + CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_connect failed"); + /* if you're getting an error here */ + } +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + showPeer(ssl); + + if (sendGET) { + printf("SSL connect ok, sending GET...\n"); + msgSz = 28; + strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); + msg[msgSz] = '\0'; + } + if (CyaSSL_write(ssl, msg, msgSz) != msgSz) + err_sys("SSL_write failed"); + + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server response: %s", reply); + + if (sendGET && (input == (sizeof(reply)-1))) { /* get html */ + while (1) { + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("%s", reply); + if(input < sizeof(reply)-1) + break ; + } + else + break; + } + } + printf("\n"); + } + else if (input < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("CyaSSL_read failed"); + } + +#ifdef CYASSL_CMSIS_RTOS + osDelay(5000) ; +#endif + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + strncpy(msg, "break", 6); + msgSz = (int)strlen(msg); + /* try to send session close */ + CyaSSL_write(ssl, msg, msgSz); + } + session = CyaSSL_get_session(ssl); + sslResume = CyaSSL_new(ctx); + } +#endif + + if (doDTLS == 0) /* don't send alert after "break" command */ + CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ + CyaSSL_free(ssl); + CloseSocket(sockfd); + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + SOCKADDR_IN_T addr; + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(sslResume, sockfd); + CyaSSL_set_session(sslResume, session); + + showPeer(sslResume); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(sslResume, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(sslResume); + } + else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) + err_sys("SSL resume failed"); +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + + if (CyaSSL_session_reused(sslResume)) + printf("reused session id\n"); + else + printf("didn't reuse session id!!!\n"); + + if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) + err_sys("SSL_write failed"); + + if (nonBlocking) { + /* give server a chance to bounce a message back to client */ + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + } + + input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server resume response: %s\n", reply); + } + + /* try to send session break */ + CyaSSL_write(sslResume, msg, msgSz); + + CyaSSL_shutdown(sslResume); + CyaSSL_free(sslResume); + CloseSocket(sockfd); + } +#endif /* NO_SESSION_CACHE */ + + CyaSSL_CTX_free(ctx); + + ((func_args*)args)->return_code = 0; + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + ShowMemoryTracker(); +#endif /* USE_CYASSL_MEMORY */ + + return 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + if (CurrentDir("client") || CurrentDir("build")) + ChangeDirBack(2); + +#ifdef HAVE_STACK_SIZE + StackSizeCheck(&args, client_test); +#else + client_test(&args); +#endif + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + + int myoptind = 0; + char* myoptarg = NULL; + +#endif /* NO_MAIN_DRIVER */ + + + +#ifdef CYASSL_CALLBACKS + + int handShakeCB(HandShakeInfo* info) + { + (void)info; + return 0; + } + + + int timeoutCB(TimeoutInfo* info) + { + (void)info; + return 0; + } + +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c new file mode 100644 index 00000000..f6f9ff35 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c @@ -0,0 +1,115 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include "cmsis_os.h" +#include "rl_fs.h" +#include "rl_net.h" +#include +#include "cyassl_MDK_ARM.h" +#include + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +static void init_filesystem (void) { + int32_t retv; + + retv = finit ("M0:"); + if (retv == 0) { + retv = fmount ("M0:"); + if (retv == 0) { + printf ("Drive M0 ready!\n"); + } + else { + printf ("Drive M0 mount failed!\n"); + } + } else { + printf ("Drive M0 initialization failed!\n"); + } +} + +/*----------------------------------------------------------------------------- + * TCP/IP tasks + *----------------------------------------------------------------------------*/ +void tcp_poll (void const *arg) +{ + CYASSL_MSG("TCP polling started.\n") ; + while (1) { + net_main (); + osDelay(100) ; + } +} + +typedef struct func_args { + int argc; + char** argv; +} func_args; + +extern void client_test(func_args * args) ; +extern void init_time(void) ; + + osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ +int myoptind = 0; +char* myoptarg = NULL; + +#include "config-SimpleClient.h" + +int main() +{ + static char *argv[] = + { "client", "-h", CYASSL_CALLEE_IP, "-p", CYASSL_CALLEE_PORT, + "-v", CYASSL_SSL_VER, CYASSL_HTTP_GET } ; + static func_args args = + { 7 + CYASSL_HTTP_GET_COUNT, argv } ; + + init_time() ; + init_filesystem (); + net_initialize() ; + osThreadCreate (osThread (tcp_poll), NULL); + osDelay(50000) ; /* wait for DHCP */ + #if defined(DEBUG_CYASSL) + printf("Turning ON Debug message\n") ; + CyaSSL_Debugging_ON() ; + #endif + + if(args.argc == 7) + printf("Simple SSL/TLS, ") ; + else + printf("HTTP GET, ") ; + + printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ; + + while(1) { + client_test(&args) ; + printf("Enter any key to iterate.\n") ; + getchar() ; + } +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx new file mode 100644 index 00000000..fb0174c7 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx @@ -0,0 +1,1106 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + SimpleClient + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + SimpleClient + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_SimpleClient CYASSL_STM32F2xx + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + client.c + 1 + .\client.c + + + + + Configuration + + + config-SimpleClient.h + 5 + .\config-SimpleClient.h + + + config-CyaSSL.h + 5 + .\RTE\wolfSSL\config-CyaSSL.h + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + PHY_ST802RT1.c + 1 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + + + EMAC_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::Network + + + Net_Dbg_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + + + Net_Config.c + 1 + RTE\Network\Net_Config.c + + + Net_Config_BSD.h + 5 + RTE\Network\Net_Config_BSD.h + + + Net_Config_DNS_Client.h + 5 + RTE\Network\Net_Config_DNS_Client.h + + + Net_Config_ETH_0.h + 5 + RTE\Network\Net_Config_ETH_0.h + + + Net_Config_TCP.h + 5 + RTE\Network\Net_Config_TCP.h + + + Net_Config_UDP.h + 5 + RTE\Network\Net_Config_UDP.h + + + Net_Debug.c + 1 + RTE\Network\Net_Debug.c + + + + + ::wolfSSL + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + + + crl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + + + internal.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + + + io.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + + + keys.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + + + ocsp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + + + sniffer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + + + ssl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + + + tls.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config-CyaSSL.h + 5 + RTE\wolfSSL\config-CyaSSL.h + + + config.h + 5 + RTE\wolfSSL\config.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + + + RTE\Network\Net_Debug.c + + + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-CyaSSL.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config-CyaSSL.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt new file mode 100644 index 00000000..ea3ec641 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt @@ -0,0 +1,23 @@ +This program is a simple server example with CyaSSL/wolfCrypt library. + +In order to run this program, +Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. +Set the server IP address in Net_Config_ETH_0.h +The default server listning port is 11111, defined in test.h + +For further configuration, refer config-Crypt.h and config-CyaSSL.h. + +When testing this server, it is recommended to test against one of the standard +CyaSSL example applications running on a desktop machine. The standard CyaSSL +example applications are located in the CyaSSL root directory under the +/examples directory. + +For the hardware crypt on config-Crypt.h, download +STSW-STM32062: STM32F2xx standard peripherals library at +http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to + {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib + + +Support +------- +Please send questions or comments to support@wolfssl.com \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c new file mode 100644 index 00000000..2298f7dd --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------- + * RL-ARM - RTX + *---------------------------------------------------------------------------- + * Name: RTX_Conf_CM.C + * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M + * Rev.: V4.70 + *---------------------------------------------------------------------------- + * + * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of ARM nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *---------------------------------------------------------------------------*/ + +#include "cmsis_os.h" + + +/*---------------------------------------------------------------------------- + * RTX User configuration part BEGIN + *---------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Thread Configuration +// ======================= +// +// Number of concurrent running threads <0-250> +// Defines max. number of threads that will run at the same time. +// Default: 6 +#ifndef OS_TASKCNT + #define OS_TASKCNT 5 +#endif + +// Default Thread stack size [bytes] <64-4096:8><#/4> +// Defines default stack size for threads with osThreadDef stacksz = 0 +// Default: 200 +#ifndef OS_STKSIZE + #define OS_STKSIZE 250 +#endif + +// Main Thread stack size [bytes] <64-20000:8><#/4> +// Defines stack size for main thread. +// Default: 200 +#ifndef OS_MAINSTKSIZE + #define OS_MAINSTKSIZE 3000 +#endif + +// Number of threads with user-provided stack size <0-250> +// Defines the number of threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVCNT + #define OS_PRIVCNT 0 +#endif + +// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> +// Defines the combined stack size for threads with user-provided stack size. +// Default: 0 +#ifndef OS_PRIVSTKSIZE + #define OS_PRIVSTKSIZE 4500 +#endif + +// Check for stack overflow +// Includes the stack checking code for stack overflow. +// Note that additional code reduces the Kernel performance. +#ifndef OS_STKCHECK + #define OS_STKCHECK 1 +#endif + +// Processor mode for thread execution +// <0=> Unprivileged mode +// <1=> Privileged mode +// Default: Privileged mode +#ifndef OS_RUNPRIV + #define OS_RUNPRIV 1 +#endif + +// + +// RTX Kernel Timer Tick Configuration +// ====================================== +// Use Cortex-M SysTick timer as RTX Kernel Timer +// Use the Cortex-M SysTick timer as a time-base for RTX. +#ifndef OS_SYSTICK + #define OS_SYSTICK 1 +#endif +// +// Timer clock value [Hz] <1-1000000000> +// Defines the timer clock value. +// Default: 12000000 (12MHz) +#ifndef OS_CLOCK + #define OS_CLOCK 12000000 +#endif + +// Timer tick value [us] <1-1000000> +// Defines the timer tick value. +// Default: 1000 (1ms) +#ifndef OS_TICK + #define OS_TICK 1000 +#endif + +// + +// System Configuration +// ======================= +// +// Round-Robin Thread switching +// =============================== +// +// Enables Round-Robin Thread switching. +#ifndef OS_ROBIN + #define OS_ROBIN 1 +#endif + +// Round-Robin Timeout [ticks] <1-1000> +// Defines how long a thread will execute before a thread switch. +// Default: 5 +#ifndef OS_ROBINTOUT + #define OS_ROBINTOUT 5 +#endif + +// + +// User Timers +// ============== +// Enables user Timers +#ifndef OS_TIMERS + #define OS_TIMERS 1 +#endif + +// Timer Thread Priority +// <1=> Low +// <2=> Below Normal <3=> Normal <4=> Above Normal +// <5=> High +// <6=> Realtime (highest) +// Defines priority for Timer Thread +// Default: High +#ifndef OS_TIMERPRIO + #define OS_TIMERPRIO 5 +#endif + +// Timer Thread stack size [bytes] <64-64000:8><#/4> +// Defines stack size for Timer thread. +// Default: 200 +#ifndef OS_TIMERSTKSZ + #define OS_TIMERSTKSZ 50 +#endif + +// Timer Callback Queue size <1-32> +// Number of concurrent active timer callback functions. +// Default: 4 +#ifndef OS_TIMERCBQS + #define OS_TIMERCBQS 4 +#endif + +// + +// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries +// <12=> 12 entries <16=> 16 entries +// <24=> 24 entries <32=> 32 entries +// <48=> 48 entries <64=> 64 entries +// <96=> 96 entries +// ISR functions store requests to this buffer, +// when they are called from the interrupt handler. +// Default: 16 entries +#ifndef OS_FIFOSZ + #define OS_FIFOSZ 16 +#endif + +// + +//------------- <<< end of configuration section >>> ----------------------- + +// Standard library system mutexes +// =============================== +// Define max. number system mutexes that are used to protect +// the arm standard runtime library. For microlib they are not used. +#ifndef OS_MUTEXCNT + #define OS_MUTEXCNT 8 +#endif + +/*---------------------------------------------------------------------------- + * RTX User configuration part END + *---------------------------------------------------------------------------*/ + +#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) + + +/*---------------------------------------------------------------------------- + * Global Functions + *---------------------------------------------------------------------------*/ + +/*--------------------------- os_idle_demon ---------------------------------*/ + +void os_idle_demon (void) { + /* The idle demon is a system thread, running when no other thread is */ + /* ready to run. */ + + for (;;) { + /* HERE: include optional user code to be executed when no thread runs.*/ + } +} + +#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer + +/*--------------------------- os_tick_init ----------------------------------*/ + +// Initialize alternative hardware timer as RTX kernel timer +// Return: IRQ number of the alternative hardware timer +int os_tick_init (void) { + return (-1); /* Return IRQ number of timer (0..239) */ +} + +/*--------------------------- os_tick_val -----------------------------------*/ + +// Get alternative hardware timer current value (0 .. OS_TRV) +uint32_t os_tick_val (void) { + return (0); +} + +/*--------------------------- os_tick_ovf -----------------------------------*/ + +// Get alternative hardware timer overflow flag +// Return: 1 - overflow, 0 - no overflow +uint32_t os_tick_ovf (void) { + return (0); +} + +/*--------------------------- os_tick_irqack --------------------------------*/ + +// Acknowledge alternative hardware timer interrupt +void os_tick_irqack (void) { + /* ... */ +} + +#endif // (OS_SYSTICK == 0) + +/*--------------------------- os_error --------------------------------------*/ + +void os_error (uint32_t err_code) { + /* This function is called when a runtime error is detected. Parameter */ + /* 'err_code' holds the runtime error code (defined in RTL.H). */ + + /* HERE: include optional code to be executed on runtime error. */ + for (;;); +} + + +/*---------------------------------------------------------------------------- + * RTX Configuration Functions + *---------------------------------------------------------------------------*/ + +#include "RTX_CM_lib.h" + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h new file mode 100644 index 00000000..4a09246f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h @@ -0,0 +1,3127 @@ +/* ----------------------------------------------------------------------------- + * Copyright (C) 2013 ARM Limited. All rights reserved. + * + * $Date: 27. June 2013 + * $Revision: V1.01 + * + * Project: RTE Device Configuration for ST STM32F2xx + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H + + +#define GPIO_PORT(num) \ + ((num == 0) ? GPIOA : \ + (num == 1) ? GPIOB : \ + (num == 2) ? GPIOC : \ + (num == 3) ? GPIOD : \ + (num == 4) ? GPIOE : \ + (num == 5) ? GPIOF : \ + (num == 6) ? GPIOG : \ + (num == 7) ? GPIOH : \ + (num == 8) ? GPIOI : \ + NULL) + + +// Clock Configuration +// High-speed Internal Clock <1-999999999> +#define RTE_HSI 16000000 +// High-speed External Clock <1-999999999> +#define RTE_HSE 25000000 +// System Clock <1-999999999> +#define RTE_SYSCLK 120000000 +// AHB Clock <1-999999999> +#define RTE_HCLK 120000000 +// APB1 Clock <1-999999999> +#define RTE_PCLK1 30000000 +// APB2 Clock <1-999999999> +#define RTE_PCLK2 60000000 +// 48MHz Clock +#define RTE_PLL48CK 48000000 +// + + +// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::Drivers:UART +#define RTE_USART1 0 + +// USART1_TX Pin <0=>PA9 <1=>PB6 +#define RTE_USART1_TX_ID 0 +#if (RTE_USART1_TX_ID == 0) +#define RTE_USART1_TX_PORT GPIOA +#define RTE_USART1_TX_BIT 9 +#elif (RTE_USART1_TX_ID == 1) +#define RTE_USART1_TX_PORT GPIOB +#define RTE_USART1_TX_BIT 6 +#else +#error "Invalid USART1_TX Pin Configuration!" +#endif + +// USART1_RX Pin <0=>PA10 <1=>PB7 +#define RTE_USART1_RX_ID 0 +#if (RTE_USART1_RX_ID == 0) +#define RTE_USART1_RX_PORT GPIOA +#define RTE_USART1_RX_BIT 10 +#elif (RTE_USART1_RX_ID == 1) +#define RTE_USART1_RX_PORT GPIOB +#define RTE_USART1_RX_BIT 7 +#else +#error "Invalid USART1_RX Pin Configuration!" +#endif + +// Synchronous +// USART1_CK Pin <0=>PA8 +// +#define RTE_USART1_CK 0 +#define RTE_USART1_CK_ID 0 +#if (RTE_USART1_CK_ID == 0) +#define RTE_USART1_CK_PORT GPIOA +#define RTE_USART1_CK_BIT 8 +#else +#error "Invalid USART1_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART1_CTS Pin <0=>PA11 +// USART1_RTS Pin <0=>PA12 +// Manual CTS/RTS +// +#define RTE_USART1_HW_FLOW 0 +#define RTE_USART1_CTS_ID 0 +#define RTE_USART1_RTS_ID 0 +#define RTE_USART1_MANUAL_FLOW 0 +#if (RTE_USART1_CTS_ID == 0) +#define RTE_USART1_CTS_PORT GPIOA +#define RTE_USART1_CTS_BIT 11 +#else +#error "Invalid USART1_CTS Pin Configuration!" +#endif +#if (RTE_USART1_RTS_ID == 0) +#define RTE_USART1_RTS_PORT GPIOA +#define RTE_USART1_RTS_BIT 12 +#else +#error "Invalid USART1_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <2=>2 <5=>5 +// Selects DMA Stream (only Stream 2 or 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_RX_DMA 1 +#define RTE_USART1_RX_DMA_NUMBER 2 +#define RTE_USART1_RX_DMA_STREAM 2 +#define RTE_USART1_RX_DMA_CHANNEL 4 +#define RTE_USART1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART1_TX_DMA 1 +#define RTE_USART1_TX_DMA_NUMBER 2 +#define RTE_USART1_TX_DMA_STREAM 7 +#define RTE_USART1_TX_DMA_CHANNEL 4 +#define RTE_USART1_TX_DMA_PRIORITY 0 + +// + + +// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] +// Configuration settings for Driver_UART2 in component ::Drivers:UART +#define RTE_USART2 0 + +// USART2_TX Pin <0=>PA2 <1=>PD5 +#define RTE_USART2_TX_ID 0 +#if (RTE_USART2_TX_ID == 0) +#define RTE_USART2_TX_PORT GPIOA +#define RTE_USART2_TX_BIT 2 +#elif (RTE_USART2_TX_ID == 1) +#define RTE_USART2_TX_PORT GPIOD +#define RTE_USART2_TX_BIT 5 +#else +#error "Invalid USART2_TX Pin Configuration!" +#endif + +// USART2_RX Pin <0=>PA3 <1=>PD6 +#define RTE_USART2_RX_ID 0 +#if (RTE_USART2_RX_ID == 0) +#define RTE_USART2_RX_PORT GPIOA +#define RTE_USART2_RX_BIT 3 +#elif (RTE_USART2_RX_ID == 1) +#define RTE_USART2_RX_PORT GPIOD +#define RTE_USART2_RX_BIT 6 +#else +#error "Invalid USART2_RX Pin Configuration!" +#endif + +// Synchronous +// USART2_CK Pin <0=>PA4 <1=>PD7 +// +#define RTE_USART2_CK 0 +#define RTE_USART2_CK_ID 0 +#if (RTE_USART2_CK_ID == 0) +#define RTE_USART2_CK_PORT GPIOA +#define RTE_USART2_CK_BIT 4 +#elif (RTE_USART2_CK_ID == 1) +#define RTE_USART2_CK_PORT GPIOD +#define RTE_USART2_CK_BIT 7 +#else +#error "Invalid USART2_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART2_CTS Pin <0=>PA0 <1=>PD3 +// USART2_RTS Pin <0=>PA1 <1=>PD4 +// Manual CTS/RTS +// +#define RTE_USART2_HW_FLOW 0 +#define RTE_USART2_CTS_ID 0 +#define RTE_USART2_RTS_ID 0 +#define RTE_USART2_MANUAL_FLOW 0 +#if (RTE_USART2_CTS_ID == 0) +#define RTE_USART2_CTS_PORT GPIOA +#define RTE_USART2_CTS_BIT 0 +#elif (RTE_USART2_CTS_ID == 1) +#define RTE_USART2_CTS_PORT GPIOD +#define RTE_USART2_CTS_BIT 3 +#else +#error "Invalid USART2_CTS Pin Configuration!" +#endif +#if (RTE_USART2_RTS_ID == 0) +#define RTE_USART2_RTS_PORT GPIOA +#define RTE_USART2_RTS_BIT 1 +#elif (RTE_USART2_RTS_ID == 1) +#define RTE_USART2_RTS_PORT GPIOD +#define RTE_USART2_RTS_BIT 4 +#else +#error "Invalid USART2_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 +// Selects DMA Stream (only Stream 5 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_RX_DMA 1 +#define RTE_USART2_RX_DMA_NUMBER 1 +#define RTE_USART2_RX_DMA_STREAM 5 +#define RTE_USART2_RX_DMA_CHANNEL 4 +#define RTE_USART2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 +// Selects DMA Stream (only Stream 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART2_TX_DMA 1 +#define RTE_USART2_TX_DMA_NUMBER 1 +#define RTE_USART2_TX_DMA_STREAM 6 +#define RTE_USART2_TX_DMA_CHANNEL 4 +#define RTE_USART2_TX_DMA_PRIORITY 0 + +// + + +// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] +// Configuration settings for Driver_UART3 in component ::Drivers:UART +#define RTE_USART3 0 + +// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 +#define RTE_USART3_TX_ID 0 +#if (RTE_USART3_TX_ID == 0) +#define RTE_USART3_TX_PORT GPIOB +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 1) +#define RTE_USART3_TX_PORT GPIOC +#define RTE_USART3_TX_BIT 10 +#elif (RTE_USART3_TX_ID == 2) +#define RTE_USART3_TX_PORT GPIOD +#define RTE_USART3_TX_BIT 8 +#else +#error "Invalid USART3_TX Pin Configuration!" +#endif + +// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 +#define RTE_USART3_RX_ID 0 +#if (RTE_USART3_RX_ID == 0) +#define RTE_USART3_RX_PORT GPIOB +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 1) +#define RTE_USART3_RX_PORT GPIOC +#define RTE_USART3_RX_BIT 11 +#elif (RTE_USART3_RX_ID == 2) +#define RTE_USART3_RX_PORT GPIOD +#define RTE_USART3_RX_BIT 9 +#else +#error "Invalid USART3_RX Pin Configuration!" +#endif + +// Synchronous +// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 +// +#define RTE_USART3_CK 0 +#define RTE_USART3_CK_ID 0 +#if (RTE_USART3_CK_ID == 0) +#define RTE_USART3_CK_PORT GPIOB +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 1) +#define RTE_USART3_CK_PORT GPIOC +#define RTE_USART3_CK_BIT 12 +#elif (RTE_USART3_CK_ID == 2) +#define RTE_USART3_CK_PORT GPIOD +#define RTE_USART3_CK_BIT 10 +#else +#error "Invalid USART3_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART3_CTS Pin <0=>PB13 <1=>PD11 +// USART3_RTS Pin <0=>PB14 <1=>PD12 +// Manual CTS/RTS +// +#define RTE_USART3_HW_FLOW 0 +#define RTE_USART3_CTS_ID 0 +#define RTE_USART3_RTS_ID 0 +#define RTE_USART3_MANUAL_FLOW 0 +#if (RTE_USART3_CTS_ID == 0) +#define RTE_USART3_CTS_PORT GPIOB +#define RTE_USART3_CTS_BIT 13 +#elif (RTE_USART3_CTS_ID == 1) +#define RTE_USART3_CTS_PORT GPIOD +#define RTE_USART3_CTS_BIT 11 +#else +#error "Invalid USART3_CTS Pin Configuration!" +#endif +#if (RTE_USART3_RTS_ID == 0) +#define RTE_USART3_RTS_PORT GPIOB +#define RTE_USART3_RTS_BIT 14 +#elif (RTE_USART3_RTS_ID == 1) +#define RTE_USART3_RTS_PORT GPIOD +#define RTE_USART3_RTS_BIT 12 +#else +#error "Invalid USART3_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <1=>1 +// Selects DMA Stream (only Stream 1 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_RX_DMA 1 +#define RTE_USART3_RX_DMA_NUMBER 1 +#define RTE_USART3_RX_DMA_STREAM 1 +#define RTE_USART3_RX_DMA_CHANNEL 4 +#define RTE_USART3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART3_TX_DMA 1 +#define RTE_USART3_TX_DMA_NUMBER 1 +#define RTE_USART3_TX_DMA_STREAM 3 +#define RTE_USART3_TX_DMA_CHANNEL 4 +#define RTE_USART3_TX_DMA_PRIORITY 0 + +// + + +// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] +// Configuration settings for Driver_UART4 in component ::Drivers:UART +#define RTE_UART4 0 + +// UART4_TX Pin <0=>PA0 <1=>PC10 +#define RTE_UART4_TX_ID 0 +#if (RTE_UART4_TX_ID == 0) +#define RTE_UART4_TX_PORT GPIOA +#define RTE_UART4_TX_BIT 0 +#elif (RTE_UART4_TX_ID == 1) +#define RTE_UART4_TX_PORT GPIOC +#define RTE_UART4_TX_BIT 10 +#else +#error "Invalid UART4_TX Pin Configuration!" +#endif + +// UART4_RX Pin <0=>PA1 <1=>PC11 +#define RTE_UART4_RX_ID 0 +#if (RTE_UART4_RX_ID == 0) +#define RTE_UART4_RX_PORT GPIOA +#define RTE_UART4_RX_BIT 1 +#elif (RTE_UART4_RX_ID == 1) +#define RTE_UART4_RX_PORT GPIOC +#define RTE_UART4_RX_BIT 11 +#else +#error "Invalid UART4_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_RX_DMA 1 +#define RTE_UART4_RX_DMA_NUMBER 1 +#define RTE_UART4_RX_DMA_STREAM 2 +#define RTE_UART4_RX_DMA_CHANNEL 4 +#define RTE_UART4_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART4_TX_DMA 1 +#define RTE_UART4_TX_DMA_NUMBER 1 +#define RTE_UART4_TX_DMA_STREAM 4 +#define RTE_UART4_TX_DMA_CHANNEL 4 +#define RTE_UART4_TX_DMA_PRIORITY 0 + +// + + +// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] +// Configuration settings for Driver_UART5 in component ::Drivers:UART +#define RTE_UART5 0 + +// UART5_TX Pin <0=>PC12 +#define RTE_UART5_TX_ID 0 +#if (RTE_UART5_TX_ID == 0) +#define RTE_UART5_TX_PORT GPIOC +#define RTE_UART5_TX_BIT 12 +#else +#error "Invalid UART5_TX Pin Configuration!" +#endif + +// UART5_RX Pin <0=>PD2 +#define RTE_UART5_RX_ID 0 +#if (RTE_UART5_RX_ID == 0) +#define RTE_UART5_RX_PORT GPIOD +#define RTE_UART5_RX_BIT 2 +#else +#error "Invalid UART5_RX Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 +// Selects DMA Stream (only Stream 0 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_RX_DMA 1 +#define RTE_UART5_RX_DMA_NUMBER 1 +#define RTE_UART5_RX_DMA_STREAM 0 +#define RTE_UART5_RX_DMA_CHANNEL 4 +#define RTE_UART5_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_UART5_TX_DMA 1 +#define RTE_UART5_TX_DMA_NUMBER 1 +#define RTE_UART5_TX_DMA_STREAM 7 +#define RTE_UART5_TX_DMA_CHANNEL 4 +#define RTE_UART5_TX_DMA_PRIORITY 0 + +// + + +// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] +// Configuration settings for Driver_UART6 in component ::Drivers:UART +#define RTE_USART6 0 + +// USART6_TX Pin <0=>PC6 <1=>PG14 +#define RTE_USART6_TX_ID 0 +#if (RTE_USART6_TX_ID == 0) +#define RTE_USART6_TX_PORT GPIOC +#define RTE_USART6_TX_BIT 6 +#elif (RTE_USART6_TX_ID == 1) +#define RTE_USART6_TX_PORT GPIOG +#define RTE_USART6_TX_BIT 14 +#else +#error "Invalid USART6_TX Pin Configuration!" +#endif + +// USART6_RX Pin <0=>PC7 <1=>PG9 +#define RTE_USART6_RX_ID 0 +#if (RTE_USART6_RX_ID == 0) +#define RTE_USART6_RX_PORT GPIOC +#define RTE_USART6_RX_BIT 7 +#elif (RTE_USART6_RX_ID == 1) +#define RTE_USART6_RX_PORT GPIOG +#define RTE_USART6_RX_BIT 9 +#else +#error "Invalid USART6_RX Pin Configuration!" +#endif + +// Synchronous +// USART6_CK Pin <0=>PC8 <1=>PG7 +// +#define RTE_USART6_CK 0 +#define RTE_USART6_CK_ID 0 +#if (RTE_USART6_CK_ID == 0) +#define RTE_USART6_CK_PORT GPIOC +#define RTE_USART6_CK_BIT 8 +#elif (RTE_USART6_CK_ID == 1) +#define RTE_USART6_CK_PORT GPIOG +#define RTE_USART6_CK_BIT 7 +#else +#error "Invalid USART6_CK Pin Configuration!" +#endif + +// Hardware flow control +// USART6_CTS Pin <0=>PG13 <1=>PG15 +// USART6_RTS Pin <0=>PG8 <1=>PG12 +// Manual CTS/RTS +// +#define RTE_USART6_HW_FLOW 0 +#define RTE_USART6_CTS_ID 0 +#define RTE_USART6_RTS_ID 0 +#define RTE_USART6_MANUAL_FLOW 0 +#if (RTE_USART6_CTS_ID == 0) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 13 +#elif (RTE_USART6_CTS_ID == 1) +#define RTE_USART6_CTS_PORT GPIOG +#define RTE_USART6_CTS_BIT 15 +#else +#error "Invalid USART6_CTS Pin Configuration!" +#endif +#if (RTE_USART6_RTS_ID == 0) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 8 +#elif (RTE_USART6_RTS_ID == 1) +#define RTE_USART6_RTS_PORT GPIOG +#define RTE_USART6_RTS_BIT 12 +#else +#error "Invalid USART6_RTS Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <1=>1 <2=>2 +// Selects DMA Stream (only Stream 1 or 2 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_RX_DMA 1 +#define RTE_USART6_RX_DMA_NUMBER 2 +#define RTE_USART6_RX_DMA_STREAM 1 +#define RTE_USART6_RX_DMA_CHANNEL 5 +#define RTE_USART6_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <5=>5 +// Selects DMA Channel (only Channel 5 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_USART6_TX_DMA 1 +#define RTE_USART6_TX_DMA_NUMBER 2 +#define RTE_USART6_TX_DMA_STREAM 6 +#define RTE_USART6_TX_DMA_CHANNEL 5 +#define RTE_USART6_TX_DMA_PRIORITY 0 + +// + + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C +#define RTE_I2C1 0 + +// I2C1_SCL Pin <0=>PB6 <1=>PB8 +#define RTE_I2C1_SCL_PORT_ID 0 +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT GPIOB +#define RTE_I2C1_SCL_BIT 8 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SDA Pin <0=>PB7 <1=>PB9 +#define RTE_I2C1_SDA_PORT_ID 0 +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT GPIOB +#define RTE_I2C1_SDA_BIT 9 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <5=>5 +// Selects DMA Stream (only Stream 0 or 5 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_RX_DMA 1 +#define RTE_I2C1_RX_DMA_NUMBER 1 +#define RTE_I2C1_RX_DMA_STREAM 0 +#define RTE_I2C1_RX_DMA_CHANNEL 1 +#define RTE_I2C1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <6=>6 <7=>7 +// Selects DMA Stream (only Stream 6 or 7 can be used) +// Channel <1=>1 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C1_TX_DMA 1 +#define RTE_I2C1_TX_DMA_NUMBER 1 +#define RTE_I2C1_TX_DMA_STREAM 6 +#define RTE_I2C1_TX_DMA_CHANNEL 1 +#define RTE_I2C1_TX_DMA_PRIORITY 0 + +// + + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 0 + +// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 +#define RTE_I2C2_SCL_PORT_ID 0 +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT GPIOF +#define RTE_I2C2_SCL_BIT 1 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT GPIOH +#define RTE_I2C2_SCL_BIT 4 +#elif (RTE_I2C2_SCL_PORT_ID == 2) +#define RTE_I2C2_SCL_PORT GPIOB +#define RTE_I2C2_SCL_BIT 10 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT GPIOF +#define RTE_I2C2_SDA_BIT 0 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT GPIOH +#define RTE_I2C2_SDA_BIT 5 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT GPIOB +#define RTE_I2C2_SDA_BIT 11 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 <3=>3 +// Selects DMA Stream (only Stream 2 or 3 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 7 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_RX_DMA 1 +#define RTE_I2C2_RX_DMA_NUMBER 1 +#define RTE_I2C2_RX_DMA_STREAM 2 +#define RTE_I2C2_RX_DMA_CHANNEL 7 +#define RTE_I2C2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <7=>7 +// Selects DMA Stream (only Stream 7 can be used) +// Channel <7=>7 +// Selects DMA Channel (only Channel 1 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C2_TX_DMA 1 +#define RTE_I2C2_TX_DMA_NUMBER 1 +#define RTE_I2C2_TX_DMA_STREAM 7 +#define RTE_I2C2_TX_DMA_CHANNEL 7 +#define RTE_I2C2_TX_DMA_PRIORITY 0 + +// + + +// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] +// Configuration settings for Driver_I2C3 in component ::Drivers:I2C +#define RTE_I2C3 0 + +// I2C3_SCL Pin <0=>PH7 <1=>PA8 +#define RTE_I2C3_SCL_PORT_ID 0 +#if (RTE_I2C3_SCL_PORT_ID == 0) +#define RTE_I2C3_SCL_PORT GPIOH +#define RTE_I2C3_SCL_BIT 7 +#elif (RTE_I2C3_SCL_PORT_ID == 1) +#define RTE_I2C3_SCL_PORT GPIOA +#define RTE_I2C3_SCL_BIT 8 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// I2C3_SDA Pin <0=>PH8 <1=>PC9 +#define RTE_I2C3_SDA_PORT_ID 0 +#if (RTE_I2C3_SDA_PORT_ID == 0) +#define RTE_I2C3_SDA_PORT GPIOH +#define RTE_I2C3_SDA_BIT 8 +#elif (RTE_I2C3_SDA_PORT_ID == 1) +#define RTE_I2C3_SDA_PORT GPIOC +#define RTE_I2C3_SDA_BIT 9 +#else +#error "Invalid I2C3_SCL Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_RX_DMA 1 +#define RTE_I2C3_RX_DMA_NUMBER 1 +#define RTE_I2C3_RX_DMA_STREAM 2 +#define RTE_I2C3_RX_DMA_CHANNEL 3 +#define RTE_I2C3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <4=>4 +// Selects DMA Stream (only Stream 4 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_I2C3_TX_DMA 1 +#define RTE_I2C3_TX_DMA_NUMBER 1 +#define RTE_I2C3_TX_DMA_STREAM 4 +#define RTE_I2C3_TX_DMA_CHANNEL 3 +#define RTE_I2C3_TX_DMA_PRIORITY 0 + +// + + +// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] +// Configuration settings for Driver_SPI1 in component ::Drivers:SPI +#define RTE_SPI1 0 + +// SPI1_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI1_NSS_PIN 1 +#define RTE_SPI1_NSS_PORT GPIO_PORT(0) +#define RTE_SPI1_NSS_BIT 4 + +// SPI1_SCK Pin <0=>PA5 <1=>PB3 +#define RTE_SPI1_SCL_PORT_ID 0 +#if (RTE_SPI1_SCL_PORT_ID == 0) +#define RTE_SPI1_SCL_PORT GPIOA +#define RTE_SPI1_SCL_BIT 5 +#elif (RTE_SPI1_SCL_PORT_ID == 1) +#define RTE_SPI1_SCL_PORT GPIOB +#define RTE_SPI1_SCL_BIT 3 +#else +#error "Invalid SPI1_SCK Pin Configuration!" +#endif + +// SPI1_MISO Pin <0=>PA6 <1=>PB4 +#define RTE_SPI1_MISO_PORT_ID 0 +#if (RTE_SPI1_MISO_PORT_ID == 0) +#define RTE_SPI1_MISO_PORT GPIOA +#define RTE_SPI1_MISO_BIT 6 +#elif (RTE_SPI1_MISO_PORT_ID == 1) +#define RTE_SPI1_MISO_PORT GPIOB +#define RTE_SPI1_MISO_BIT 4 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// SPI1_MOSI Pin <0=>PA7 <1=>PB5 +#define RTE_SPI1_MOSI_PORT_ID 0 +#if (RTE_SPI1_MOSI_PORT_ID == 0) +#define RTE_SPI1_MOSI_PORT GPIOA +#define RTE_SPI1_MOSI_BIT 7 +#elif (RTE_SPI1_MOSI_PORT_ID == 1) +#define RTE_SPI1_MOSI_PORT GPIOB +#define RTE_SPI1_MOSI_BIT 5 +#else +#error "Invalid SPI1_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_RX_DMA 1 +#define RTE_SPI1_RX_DMA_NUMBER 2 +#define RTE_SPI1_RX_DMA_STREAM 0 +#define RTE_SPI1_RX_DMA_CHANNEL 3 +#define RTE_SPI1_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <5=>5 +// Selects DMA Stream (only Stream 3 or 5 can be used) +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI1_TX_DMA 1 +#define RTE_SPI1_TX_DMA_NUMBER 2 +#define RTE_SPI1_TX_DMA_STREAM 5 +#define RTE_SPI1_TX_DMA_CHANNEL 3 +#define RTE_SPI1_TX_DMA_PRIORITY 0 + +// + + +// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] +// Configuration settings for Driver_SPI2 in component ::Drivers:SPI +#define RTE_SPI2 0 + +// SPI2_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI2_NSS_PIN 1 +#define RTE_SPI2_NSS_PORT GPIO_PORT(1) +#define RTE_SPI2_NSS_BIT 12 + +// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 +#define RTE_SPI2_SCL_PORT_ID 0 +#if (RTE_SPI2_SCL_PORT_ID == 0) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 10 +#elif (RTE_SPI2_SCL_PORT_ID == 1) +#define RTE_SPI2_SCL_PORT GPIOB +#define RTE_SPI2_SCL_BIT 13 +#elif (RTE_SPI2_SCL_PORT_ID == 2) +#define RTE_SPI2_SCL_PORT GPIOI +#define RTE_SPI2_SCL_BIT 1 +#else +#error "Invalid SPI2_SCK Pin Configuration!" +#endif + +// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 +#define RTE_SPI2_MISO_PORT_ID 0 +#if (RTE_SPI2_MISO_PORT_ID == 0) +#define RTE_SPI2_MISO_PORT GPIOB +#define RTE_SPI2_MISO_BIT 14 +#elif (RTE_SPI2_MISO_PORT_ID == 1) +#define RTE_SPI2_MISO_PORT GPIOC +#define RTE_SPI2_MISO_BIT 2 +#elif (RTE_SPI2_MISO_PORT_ID == 2) +#define RTE_SPI2_MISO_PORT GPIOI +#define RTE_SPI2_MISO_BIT 2 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 +#define RTE_SPI2_MOSI_PORT_ID 0 +#if (RTE_SPI2_MOSI_PORT_ID == 0) +#define RTE_SPI2_MOSI_PORT GPIOB +#define RTE_SPI2_MOSI_BIT 15 +#elif (RTE_SPI2_MOSI_PORT_ID == 1) +#define RTE_SPI2_MOSI_PORT GPIOC +#define RTE_SPI2_MOSI_BIT 3 +#elif (RTE_SPI2_MOSI_PORT_ID == 2) +#define RTE_SPI2_MOSI_PORT GPIOI +#define RTE_SPI2_MOSI_BIT 3 +#else +#error "Invalid SPI2_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <2=>2 +// Selects DMA Stream (only Stream 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_RX_DMA 1 +#define RTE_SPI2_RX_DMA_NUMBER 1 +#define RTE_SPI2_RX_DMA_STREAM 2 +#define RTE_SPI2_RX_DMA_CHANNEL 0 +#define RTE_SPI2_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <3=>3 +// Selects DMA Stream (only Stream 3 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI2_TX_DMA 1 +#define RTE_SPI2_TX_DMA_NUMBER 1 +#define RTE_SPI2_TX_DMA_STREAM 3 +#define RTE_SPI2_TX_DMA_CHANNEL 0 +#define RTE_SPI2_TX_DMA_PRIORITY 0 + +// + + +// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] +// Configuration settings for Driver_SPI3 in component ::Drivers:SPI +#define RTE_SPI3 0 + +// SPI3_NSS Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SPI3_NSS_PIN 1 +#define RTE_SPI3_NSS_PORT GPIO_PORT(0) +#define RTE_SPI3_NSS_BIT 15 + +// SPI3_SCK Pin <0=>PB3 <1=>PC10 +#define RTE_SPI3_SCL_PORT_ID 0 +#if (RTE_SPI3_SCL_PORT_ID == 0) +#define RTE_SPI3_SCL_PORT GPIOB +#define RTE_SPI3_SCL_BIT 3 +#elif (RTE_SPI3_SCL_PORT_ID == 1) +#define RTE_SPI3_SCL_PORT GPIOC +#define RTE_SPI3_SCL_BIT 10 +#else +#error "Invalid SPI3_SCK Pin Configuration!" +#endif + +// SPI3_MISO Pin <0=>PB4 <1=>PC11 +#define RTE_SPI3_MISO_PORT_ID 0 +#if (RTE_SPI3_MISO_PORT_ID == 0) +#define RTE_SPI3_MISO_PORT GPIOB +#define RTE_SPI3_MISO_BIT 4 +#elif (RTE_SPI3_MISO_PORT_ID == 1) +#define RTE_SPI3_MISO_PORT GPIOC +#define RTE_SPI3_MISO_BIT 11 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// SPI3_MOSI Pin <0=>PB5 <1=>PC12 +#define RTE_SPI3_MOSI_PORT_ID 0 +#if (RTE_SPI3_MOSI_PORT_ID == 0) +#define RTE_SPI3_MOSI_PORT GPIOB +#define RTE_SPI3_MOSI_BIT 5 +#elif (RTE_SPI3_MOSI_PORT_ID == 1) +#define RTE_SPI3_MOSI_PORT GPIOC +#define RTE_SPI3_MOSI_BIT 12 +#else +#error "Invalid SPI3_MISO Pin Configuration!" +#endif + +// DMA Rx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <0=>0 <2=>2 +// Selects DMA Stream (only Stream 0 or 2 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_RX_DMA 1 +#define RTE_SPI3_RX_DMA_NUMBER 1 +#define RTE_SPI3_RX_DMA_STREAM 0 +#define RTE_SPI3_RX_DMA_CHANNEL 0 +#define RTE_SPI3_RX_DMA_PRIORITY 0 + +// DMA Tx +// Number <1=>1 +// Selects DMA Number (only DMA1 can be used) +// Stream <5=>5 <7=>7 +// Selects DMA Stream (only Stream 5 or 7 can be used) +// Channel <0=>0 +// Selects DMA Channel (only Channel 0 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SPI3_TX_DMA 1 +#define RTE_SPI3_TX_DMA_NUMBER 1 +#define RTE_SPI3_TX_DMA_STREAM 5 +#define RTE_SPI3_TX_DMA_CHANNEL 0 +#define RTE_SPI3_TX_DMA_PRIORITY 0 + +// + + +// SDIO (Secure Digital Input/Output) [Driver_MCI0] +// Configuration settings for Driver_MCI0 in component ::Drivers:MCI +#define RTE_SDIO 1 + +// SDIO_CD (Card Detect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_CD_PIN 1 +#define RTE_SDIO_CD_ACTIVE 0 +#define RTE_SDIO_CD_PORT GPIO_PORT(7) +#define RTE_SDIO_CD_BIT 15 + +// SDIO_WP (Write Protect) Pin +// Configure Pin if exists +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_SDIO_WP_PIN 0 +#define RTE_SDIO_WP_ACTIVE 0 +#define RTE_SDIO_WP_PORT GPIO_PORT(7) +#define RTE_SDIO_WP_BIT 16 + +// SDIO Bus +// SDIO_CK Pin <0=>PC12 +#define RTE_SDIO_CK_PORT_ID 0 +#if (RTE_SDIO_CK_PORT_ID == 0) +#define RTE_SDIO_CK_PORT GPIOC +#define RTE_SDIO_CK_PIN 12 +#else +#error "Invalid SDIO_CK Pin Configuration!" +#endif +// SDIO_CMD Pin <0=>PD2 +#define RTE_SDIO_CMD_PORT_ID 0 +#if (RTE_SDIO_CMD_PORT_ID == 0) +#define RTE_SDIO_CMD_PORT GPIOD +#define RTE_SDIO_CMD_PIN 2 +#else +#error "Invalid SDIO_CDM Pin Configuration!" +#endif +// SDIO_D0 Pin <0=>PC8 +#define RTE_SDIO_D0_PORT_ID 0 +#if (RTE_SDIO_D0_PORT_ID == 0) +#define RTE_SDIO_D0_PORT GPIOC +#define RTE_SDIO_D0_PIN 8 +#else +#error "Invalid SDIO_D0 Pin Configuration!" +#endif +// SDIO_D1 Pin <0=>PC9 +#define RTE_SDIO_D1_PORT_ID 0 +#if (RTE_SDIO_D1_PORT_ID == 0) +#define RTE_SDIO_D1_PORT GPIOC +#define RTE_SDIO_D1_PIN 9 +#else +#error "Invalid SDIO_D1 Pin Configuration!" +#endif +// SDIO_D2 Pin <0=>PC10 +#define RTE_SDIO_D2_PORT_ID 0 +#if (RTE_SDIO_D2_PORT_ID == 0) +#define RTE_SDIO_D2_PORT GPIOC +#define RTE_SDIO_D2_PIN 10 +#else +#error "Invalid SDIO_D2 Pin Configuration!" +#endif +// SDIO_D3 Pin <0=>PC11 +#define RTE_SDIO_D3_PORT_ID 0 +#if (RTE_SDIO_D3_PORT_ID == 0) +#define RTE_SDIO_D3_PORT GPIOC +#define RTE_SDIO_D3_PIN 11 +#else +#error "Invalid SDIO_D3 Pin Configuration!" +#endif +// SDIO_D4 Pin <0=>PB8 +#define RTE_SDIO_D4_PORT_ID 0 +#if (RTE_SDIO_D4_PORT_ID == 0) +#define RTE_SDIO_D4_PORT GPIOB +#define RTE_SDIO_D4_PIN 8 +#else +#error "Invalid SDIO_D4 Pin Configuration!" +#endif +// SDIO_D5 Pin <0=>PB9 +#define RTE_SDIO_D5_PORT_ID 0 +#if (RTE_SDIO_D5_PORT_ID == 0) +#define RTE_SDIO_D5_PORT GPIOB +#define RTE_SDIO_D5_PIN 9 +#else +#error "Invalid SDIO_D5 Pin Configuration!" +#endif +// SDIO_D6 Pin <0=>PC6 +#define RTE_SDIO_D6_PORT_ID 0 +#if (RTE_SDIO_D6_PORT_ID == 0) +#define RTE_SDIO_D6_PORT GPIOC +#define RTE_SDIO_D6_PIN 6 +#else +#error "Invalid SDIO_D6 Pin Configuration!" +#endif +// SDIO_D7 Pin <0=>PC7 +#define RTE_SDIO_D7_PORT_ID 0 +#if (RTE_SDIO_D7_PORT_ID == 0) +#define RTE_SDIO_D7_PORT GPIOC +#define RTE_SDIO_D7_PIN 7 +#else +#error "Invalid SDIO_D7 Pin Configuration!" +#endif +// + +// DMA +// Number <2=>2 +// Selects DMA Number (only DMA2 can be used) +// Stream <3=>3 <6=>6 +// Selects DMA Stream (only Stream 3 or 6 can be used) +// Channel <4=>4 +// Selects DMA Channel (only Channel 4 can be used) +// Priority <0=>Low <1=>Medium <2=>High <3=>Very High +// Selects DMA Priority +// +#define RTE_SDIO_DMA 1 +#define RTE_SDIO_DMA_NUMBER 2 +#define RTE_SDIO_DMA_STREAM 3 +#define RTE_SDIO_DMA_CHANNEL 4 +#define RTE_SDIO_DMA_PRIORITY 0 + +// + + +// ETH (Ethernet Interface) [Driver_ETH_MAC0] +// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC +#define RTE_ETH 1 + +// MII (Media Independent Interface) +#define RTE_ETH_MII 0 + +// ETH_MII_TX_CLK Pin <0=>PC3 +#define RTE_ETH_MII_TX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_TX_CLK_PORT GPIOC +#define RTE_ETH_MII_TX_CLK_PIN 3 +#else +#error "Invalid ETH_MII_TX_CLK Pin Configuration!" +#endif +// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_MII_TXD0_PORT_ID 0 +#if (RTE_ETH_MII_TXD0_PORT_ID == 0) +#define RTE_ETH_MII_TXD0_PORT GPIOB +#define RTE_ETH_MII_TXD0_PIN 12 +#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) +#define RTE_ETH_MII_TXD0_PORT GPIOG +#define RTE_ETH_MII_TXD0_PIN 13 +#else +#error "Invalid ETH_MII_TXD0 Pin Configuration!" +#endif +// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_MII_TXD1_PORT_ID 0 +#if (RTE_ETH_MII_TXD1_PORT_ID == 0) +#define RTE_ETH_MII_TXD1_PORT GPIOB +#define RTE_ETH_MII_TXD1_PIN 13 +#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) +#define RTE_ETH_MII_TXD1_PORT GPIOG +#define RTE_ETH_MII_TXD1_PIN 14 +#else +#error "Invalid ETH_MII_TXD1 Pin Configuration!" +#endif +// ETH_MII_TXD2 Pin <0=>PC2 +#define RTE_ETH_MII_TXD2_PORT_ID 0 +#if (RTE_ETH_MII_TXD2_PORT_ID == 0) +#define RTE_ETH_MII_TXD2_PORT GPIOC +#define RTE_ETH_MII_TXD2_PIN 2 +#else +#error "Invalid ETH_MII_TXD2 Pin Configuration!" +#endif +// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 +#define RTE_ETH_MII_TXD3_PORT_ID 0 +#if (RTE_ETH_MII_TXD3_PORT_ID == 0) +#define RTE_ETH_MII_TXD3_PORT GPIOB +#define RTE_ETH_MII_TXD3_PIN 8 +#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) +#define RTE_ETH_MII_TXD3_PORT GPIOE +#define RTE_ETH_MII_TXD3_PIN 2 +#else +#error "Invalid ETH_MII_TXD3 Pin Configuration!" +#endif +// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_MII_TX_EN_PORT_ID 0 +#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) +#define RTE_ETH_MII_TX_EN_PORT GPIOB +#define RTE_ETH_MII_TX_EN_PIN 11 +#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) +#define RTE_ETH_MII_TX_EN_PORT GPIOG +#define RTE_ETH_MII_TX_EN_PIN 11 +#else +#error "Invalid ETH_MII_TX_EN Pin Configuration!" +#endif +// ETH_MII_RX_CLK Pin <0=>PA1 +#define RTE_ETH_MII_RX_CLK_PORT_ID 0 +#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) +#define RTE_ETH_MII_RX_CLK_PORT GPIOA +#define RTE_ETH_MII_RX_CLK_PIN 1 +#else +#error "Invalid ETH_MII_RX_CLK Pin Configuration!" +#endif +// ETH_MII_RXD0 Pin <0=>PC4 +#define RTE_ETH_MII_RXD0_PORT_ID 0 +#if (RTE_ETH_MII_RXD0_PORT_ID == 0) +#define RTE_ETH_MII_RXD0_PORT GPIOC +#define RTE_ETH_MII_RXD0_PIN 4 +#else +#error "Invalid ETH_MII_RXD0 Pin Configuration!" +#endif +// ETH_MII_RXD1 Pin <0=>PC5 +#define RTE_ETH_MII_RXD1_PORT_ID 0 +#if (RTE_ETH_MII_RXD1_PORT_ID == 0) +#define RTE_ETH_MII_RXD1_PORT GPIOC +#define RTE_ETH_MII_RXD1_PIN 5 +#else +#error "Invalid ETH_MII_RXD1 Pin Configuration!" +#endif +// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 +#define RTE_ETH_MII_RXD2_PORT_ID 0 +#if (RTE_ETH_MII_RXD2_PORT_ID == 0) +#define RTE_ETH_MII_RXD2_PORT GPIOB +#define RTE_ETH_MII_RXD2_PIN 0 +#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) +#define RTE_ETH_MII_RXD2_PORT GPIOH +#define RTE_ETH_MII_RXD2_PIN 6 +#else +#error "Invalid ETH_MII_RXD2 Pin Configuration!" +#endif +// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 +#define RTE_ETH_MII_RXD3_PORT_ID 0 +#if (RTE_ETH_MII_RXD3_PORT_ID == 0) +#define RTE_ETH_MII_RXD3_PORT GPIOB +#define RTE_ETH_MII_RXD3_PIN 1 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RXD3_PORT GPIOH +#define RTE_ETH_MII_RXD3_PIN 7 +#else +#error "Invalid ETH_MII_RXD3 Pin Configuration!" +#endif +// ETH_MII_RX_DV Pin <0=>PA7 +#define RTE_ETH_MII_RX_DV_PORT_ID 0 +#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) +#define RTE_ETH_MII_RX_DV_PORT GPIOA +#define RTE_ETH_MII_RX_DV_PIN 7 +#else +#error "Invalid ETH_MII_RX_DV Pin Configuration!" +#endif +// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 +#define RTE_ETH_MII_RX_ER_PORT_ID 0 +#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) +#define RTE_ETH_MII_RX_ER_PORT GPIOB +#define RTE_ETH_MII_RX_ER_PIN 10 +#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) +#define RTE_ETH_MII_RX_ER_PORT GPIOI +#define RTE_ETH_MII_RX_ER_PIN 10 +#else +#error "Invalid ETH_MII_RX_ER Pin Configuration!" +#endif +// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 +#define RTE_ETH_MII_CRS_PORT_ID 0 +#if (RTE_ETH_MII_CRS_PORT_ID == 0) +#define RTE_ETH_MII_CRS_PORT GPIOA +#define RTE_ETH_MII_CRS_PIN 0 +#elif (RTE_ETH_MII_CRS_PORT_ID == 1) +#define RTE_ETH_MII_CRS_PORT GPIOH +#define RTE_ETH_MII_CRS_PIN 2 +#else +#error "Invalid ETH_MII_CRS Pin Configuration!" +#endif +// ETH_MII_COL Pin <0=>PA3 <1=>PH3 +#define RTE_ETH_MII_COL_PORT_ID 0 +#if (RTE_ETH_MII_COL_PORT_ID == 0) +#define RTE_ETH_MII_COL_PORT GPIOA +#define RTE_ETH_MII_COL_PIN 3 +#elif (RTE_ETH_MII_COL_PORT_ID == 1) +#define RTE_ETH_MII_COL_PORT GPIOH +#define RTE_ETH_MII_COL_PIN 3 +#else +#error "Invalid ETH_MII_COL Pin Configuration!" +#endif + +// + +// RMII (Reduced Media Independent Interface) +#define RTE_ETH_RMII 1 + +// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 +#define RTE_ETH_RMII_TXD0_PORT_ID 1 +#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) +#define RTE_ETH_RMII_TXD0_PORT GPIOB +#define RTE_ETH_RMII_TXD0_PIN 12 +#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) +#define RTE_ETH_RMII_TXD0_PORT GPIOG +#define RTE_ETH_RMII_TXD0_PIN 13 +#else +#error "Invalid ETH_RMII_TXD0 Pin Configuration!" +#endif +// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 +#define RTE_ETH_RMII_TXD1_PORT_ID 1 +#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) +#define RTE_ETH_RMII_TXD1_PORT GPIOB +#define RTE_ETH_RMII_TXD1_PIN 13 +#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) +#define RTE_ETH_RMII_TXD1_PORT GPIOG +#define RTE_ETH_RMII_TXD1_PIN 14 +#else +#error "Invalid ETH_RMII_TXD1 Pin Configuration!" +#endif +// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 +#define RTE_ETH_RMII_TX_EN_PORT_ID 1 +#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) +#define RTE_ETH_RMII_TX_EN_PORT GPIOB +#define RTE_ETH_RMII_TX_EN_PIN 11 +#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) +#define RTE_ETH_RMII_TX_EN_PORT GPIOG +#define RTE_ETH_RMII_TX_EN_PIN 11 +#else +#error "Invalid ETH_RMII_TX_EN Pin Configuration!" +#endif +// ETH_RMII_RXD0 Pin <0=>PC4 +#define RTE_ETH_RMII_RXD0_PORT_ID 0 +#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) +#define RTE_ETH_RMII_RXD0_PORT GPIOC +#define RTE_ETH_RMII_RXD0_PIN 4 +#else +#error "Invalid ETH_RMII_RXD0 Pin Configuration!" +#endif +// ETH_RMII_RXD1 Pin <0=>PC5 +#define RTE_ETH_RMII_RXD1_PORT_ID 0 +#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) +#define RTE_ETH_RMII_RXD1_PORT GPIOC +#define RTE_ETH_RMII_RXD1_PIN 5 +#else +#error "Invalid ETH_RMII_RXD1 Pin Configuration!" +#endif +// ETH_RMII_REF_CLK Pin <0=>PA1 +#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 +#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) +#define RTE_ETH_RMII_REF_CLK_PORT GPIOA +#define RTE_ETH_RMII_REF_CLK_PIN 1 +#else +#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" +#endif +// ETH_RMII_CRS_DV Pin <0=>PA7 +#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 +#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) +#define RTE_ETH_RMII_CRS_DV_PORT GPIOA +#define RTE_ETH_RMII_CRS_DV_PIN 7 +#else +#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" +#endif + +// + +// Management Data Interface +// ETH_MDC Pin <0=>PC1 +#define RTE_ETH_MDI_MDC_PORT_ID 0 +#if (RTE_ETH_MDI_MDC_PORT_ID == 0) +#define RTE_ETH_MDI_MDC_PORT GPIOC +#define RTE_ETH_MDI_MDC_PIN 1 +#else +#error "Invalid ETH_MDC Pin Configuration!" +#endif +// ETH_MDIO Pin <0=>PA2 +#define RTE_ETH_MDI_MDIO_PORT_ID 0 +#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) +#define RTE_ETH_MDI_MDIO_PORT GPIOA +#define RTE_ETH_MDI_MDIO_PIN 2 +#else +#error "Invalid ETH_MDIO Pin Configuration!" +#endif +// + +// Reference 25MHz/50MHz Clock generation +#define RTE_ETH_REF_CLOCK 0 + +// MCO Pin <0=>PA2 <1=>PC9 +#define RTE_ETH_REF_CLOCK_PORT_ID 0 +#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) +#define RTE_ETH_REF_CLOCK_PORT GPIOA +#define RTE_ETH_REF_CLOCK_PIN 8 +#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) +#define RTE_ETH_REF_CLOCK_PORT GPIOC +#define RTE_ETH_REF_CLOCK_PIN 9 +#else +#error "Invalid MCO Pin Configuration!" +#endif + +// + +// + + +// USB OTG Full-speed +#define RTE_USB_OTG_FS 0 + +// Device [Driver_USBD0] +// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device +#define RTE_USB_OTG_FS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_FS_DEV_EP 0x0000000F +#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E +#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E + +// + +// Host [Driver_USBH0] +// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host + +#define RTE_USB_OTG_FS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_VBUS_PIN 1 +#define RTE_OTG_FS_VBUS_ACTIVE 0 +#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) +#define RTE_OTG_FS_VBUS_BIT 5 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_FS_OC_PIN 1 +#define RTE_OTG_FS_OC_ACTIVE 0 +#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_FS_OC_BIT 11 +// + +// + + +// USB OTG High-speed +#define RTE_USB_OTG_HS 0 + +// PHY (Physical Layer) + +// PHY Interface +// <0=>On-chip full-speed PHY +// <1=>External ULPI high-speed PHY +#define RTE_USB_OTG_HS_PHY 1 + +// External ULPI Pins (UTMI+ Low Pin Interface) + +// OTG_HS_ULPI_CK Pin <0=>PA5 +#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" +#endif +// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 +#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 +#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 +#else +#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" +#endif +// OTG_HS_ULPI_STP Pin <0=>PC0 +#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" +#endif +// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 +#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 +#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 +#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) +#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH +#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 +#else +#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" +#endif +// OTG_HS_ULPI_D0 Pin <0=>PA3 +#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA +#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 +#else +#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" +#endif +// OTG_HS_ULPI_D1 Pin <0=>PB0 +#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 +#else +#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" +#endif +// OTG_HS_ULPI_D2 Pin <0=>PB1 +#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 +#else +#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" +#endif +// OTG_HS_ULPI_D3 Pin <0=>PB10 +#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 +#else +#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" +#endif +// OTG_HS_ULPI_D4 Pin <0=>PB11 +#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 +#else +#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" +#endif +// OTG_HS_ULPI_D5 Pin <0=>PB12 +#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 +#else +#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" +#endif +// OTG_HS_ULPI_D6 Pin <0=>PB13 +#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 +#else +#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" +#endif +// OTG_HS_ULPI_D7 Pin <0=>PB5 +#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 +#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) +#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB +#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 +#else +#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" +#endif + +// + +// + +// Device [Driver_USBD1] +// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device +#define RTE_USB_OTG_HS_DEV 1 + +// Endpoints +// Reduce memory requirements of Driver by disabling unused endpoints +// Endpoint 1 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 2 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 3 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 4 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// Endpoint 5 +// Bulk OUT +// Bulk IN +// Interrupt OUT +// Interrupt IN +// Isochronous OUT +// Isochronous IN +// +// +#define RTE_USB_OTG_HS_DEV_EP 0x0000003F +#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E +#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E + +// + +// Host [Driver_USBH1] +// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host +#define RTE_USB_OTG_HS_HOST 1 + +// VBUS Power On/Off Pin +// Configure Pin for driving VBUS +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_VBUS_PIN 1 +#define RTE_OTG_HS_VBUS_ACTIVE 0 +#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) +#define RTE_OTG_HS_VBUS_BIT 2 + +// Overcurrent Detection Pin +// Configure Pin for overcurrent detection +// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) +// Active State <0=>Low <1=>High +// Selects Active State Logical Level +// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD +// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI +// Selects Port Name +// Bit <0-15> +// Selects Port Bit +// +#define RTE_OTG_HS_OC_PIN 1 +#define RTE_OTG_HS_OC_ACTIVE 0 +#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) +#define RTE_OTG_HS_OC_BIT 12 +// + +// + + +// EXTI (External Interrupt/Event Controller) +#define RTE_EXTI 0 + +// EXTI0 Line +#define RTE_EXTI0 0 +// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 +#define RTE_EXTI0_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI0_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI0_TRIGGER 0 +// + +// EXTI1 Line +#define RTE_EXTI1 0 +// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 +#define RTE_EXTI1_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI1_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI1_TRIGGER 0 +// + +// EXTI2 Line +#define RTE_EXTI2 0 +// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 +#define RTE_EXTI2_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI2_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI2_TRIGGER 0 +// + +// EXTI3 Line +#define RTE_EXTI3 0 +// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 +#define RTE_EXTI3_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI3_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI3_TRIGGER 0 +// + +// EXTI4 Line +#define RTE_EXTI4 0 +// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 +#define RTE_EXTI4_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI4_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI4_TRIGGER 0 +// + +// EXTI5 Line +#define RTE_EXTI5 0 +// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 +#define RTE_EXTI5_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI5_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI5_TRIGGER 0 +// + +// EXTI6 Line +#define RTE_EXTI6 0 +// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 +#define RTE_EXTI6_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI6_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI6_TRIGGER 0 +// + +// EXTI7 Line +#define RTE_EXTI7 0 +// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 +#define RTE_EXTI7_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI7_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI7_TRIGGER 0 +// + +// EXTI8 Line +#define RTE_EXTI8 0 +// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 +#define RTE_EXTI8_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI8_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI8_TRIGGER 0 +// + +// EXTI9 Line +#define RTE_EXTI9 0 +// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 +#define RTE_EXTI9_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI9_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI9_TRIGGER 0 +// + +// EXTI10 Line +#define RTE_EXTI10 0 +// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 +#define RTE_EXTI10_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI10_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI10_TRIGGER 0 +// + +// EXTI11 Line +#define RTE_EXTI11 0 +// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 +#define RTE_EXTI11_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI11_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI11_TRIGGER 0 +// + +// EXTI12 Line +#define RTE_EXTI12 0 +// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 +#define RTE_EXTI12_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI12_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI12_TRIGGER 0 +// + +// EXTI13 Line +#define RTE_EXTI13 0 +// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 +#define RTE_EXTI13_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI13_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI13_TRIGGER 0 +// + +// EXTI14 Line +#define RTE_EXTI14 0 +// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 +#define RTE_EXTI14_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI14_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI14_TRIGGER 0 +// + +// EXTI15 Line +#define RTE_EXTI15 0 +// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 +#define RTE_EXTI15_PIN 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI15_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI15_TRIGGER 0 +// + +// EXTI16 Line: PVD Output +#define RTE_EXTI16 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI16_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI16_TRIGGER 0 +// + +// EXTI17 Line: RTC Alarm +#define RTE_EXTI17 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI17_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI17_TRIGGER 0 +// + +// EXTI18 Line: USB OTG FS Wakeup +#define RTE_EXTI18 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI18_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI18_TRIGGER 0 +// + +// EXTI19 Line: Ethernet Wakeup +#define RTE_EXTI19 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI19_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI19_TRIGGER 0 +// + +// EXTI20 Line: USB OTG HS Wakeup +#define RTE_EXTI20 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI20_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI20_TRIGGER 0 +// + +// EXTI21 Line: RTC Tamper and TimeStamp +#define RTE_EXTI21 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI21_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI21_TRIGGER 0 +// + +// EXTI22 Line: RTC Wakeup +#define RTE_EXTI22 0 +// Mode <0=>Interrupt <1=>Event +#define RTE_EXTI22_MODE 0 +// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge +#define RTE_EXTI22_TRIGGER 0 +// + +// + + +// FSMC (Flexible Static Memory Controller) +#define RTE_FSMC 0 + +// Pin Configuration +// Configure Pins +#define RTE_FSMC_PINS 0 + +// Address Bus Pins +// <0=>A[17:16] +// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] +// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] +// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] +#define RTE_FSMC_ABUS_PINS 10 +// Data Bus Pins <0=>D[7:0] <1=>D[15:0] +#define RTE_FSMC_DBUS_PINS 0 +// FSMC_NOE Pin +#define RTE_FSMC_NOE_PIN 0 +// FSMC_NWE Pin +#define RTE_FSMC_NWE_PIN 0 +// FSMC_NBL0 Pin +#define RTE_FSMC_NBL0_PIN 0 +// FSMC_NBL1 Pin +#define RTE_FSMC_NBL1_PIN 0 +// FSMC_NL Pin +#define RTE_FSMC_NL_PIN 0 +// FSMC_NWAIT Pin +#define RTE_FSMC_NWAIT_PIN 0 +// FSMC_CLK Pin +#define RTE_FSMC_CLK_PIN 0 +// FSMC_NE1/NCE2 Pin +#define RTE_FSMC_NE1_PIN 0 +// FSMC_NE2/NCE3 Pin +#define RTE_FSMC_NE2_PIN 0 +// FSMC_NE3/NCE4_1 Pin +#define RTE_FSMC_NE3_PIN 0 +// FSMC_NE4 Pin +#define RTE_FSMC_NE4_PIN 0 +// FSMC_NCE4_2 Pin +#define RTE_FSMC_NCE42_PIN 0 +// FSMC_INT2 Pin +#define RTE_FSMC_INT2_PIN 0 +// FSMC_INT3 Pin +#define RTE_FSMC_INT3_PIN 0 +// FSMC_INTR Pin +#define RTE_FSMC_INTR_PIN 0 +// FSMC_NIORD Pin +#define RTE_FSMC_NIORD_PIN 0 +// FSMC_NIOWR Pin +#define RTE_FSMC_NIOWR_PIN 0 +// FSMC_NREG Pin +#define RTE_FSMC_NREG_PIN 0 +// FSMC_CD Pin +#define RTE_FSMC_CD_PIN 0 + +// + +// NOR Flash / PSRAM Controller + +// FSMC_NE1 Chip Select +// Configure Device on Chip Select FSMC_NE1 +#define RTE_FSMC_NE1 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR1_CBURSTRW 0 +#define RTE_FSMC_BCR1_ASYNCWAIT 0 +#define RTE_FSMC_BCR1_EXTMOD 0 +#define RTE_FSMC_BCR1_WAITEN 1 +#define RTE_FSMC_BCR1_WREN 1 +#define RTE_FSMC_BCR1_WAITCFG 0 +#define RTE_FSMC_BCR1_WRAPMOD 0 +#define RTE_FSMC_BCR1_WAITPOL 0 +#define RTE_FSMC_BCR1_BURSTEN 0 +#define RTE_FSMC_BCR1_FACCEN 1 +#define RTE_FSMC_BCR1_MWID 1 +#define RTE_FSMC_BCR1_MTYP 2 +#define RTE_FSMC_BCR1_MUXEN 1 +#define RTE_FSMC_BCR1_MBKEN 1 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR1_ACCMOD 0 +#define RTE_FSMC_BTR1_DATLAT 15 +#define RTE_FSMC_BTR1_CLKDIV 15 +#define RTE_FSMC_BTR1_BUSTURN 15 +#define RTE_FSMC_BTR1_DATAST 255 +#define RTE_FSMC_BTR1_ADDHLD 15 +#define RTE_FSMC_BTR1_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR1_ACCMOD 0 +#define RTE_FSMC_BWTR1_DATLAT 15 +#define RTE_FSMC_BWTR1_CLKDIV 15 +#define RTE_FSMC_BWTR1_BUSTURN 15 +#define RTE_FSMC_BWTR1_DATAST 255 +#define RTE_FSMC_BWTR1_ADDHLD 15 +#define RTE_FSMC_BWTR1_ADDSET 15 +// +// + +// FSMC_NE2 Chip Select +// Configure Device on Chip Select FSMC_NE2 +#define RTE_FSMC_NE2 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR2_CBURSTRW 0 +#define RTE_FSMC_BCR2_ASYNCWAIT 0 +#define RTE_FSMC_BCR2_EXTMOD 0 +#define RTE_FSMC_BCR2_WAITEN 1 +#define RTE_FSMC_BCR2_WREN 1 +#define RTE_FSMC_BCR2_WAITCFG 0 +#define RTE_FSMC_BCR2_WRAPMOD 0 +#define RTE_FSMC_BCR2_WAITPOL 0 +#define RTE_FSMC_BCR2_BURSTEN 0 +#define RTE_FSMC_BCR2_FACCEN 1 +#define RTE_FSMC_BCR2_MWID 1 +#define RTE_FSMC_BCR2_MTYP 0 +#define RTE_FSMC_BCR2_MUXEN 1 +#define RTE_FSMC_BCR2_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR2_ACCMOD 0 +#define RTE_FSMC_BTR2_DATLAT 15 +#define RTE_FSMC_BTR2_CLKDIV 15 +#define RTE_FSMC_BTR2_BUSTURN 15 +#define RTE_FSMC_BTR2_DATAST 255 +#define RTE_FSMC_BTR2_ADDHLD 15 +#define RTE_FSMC_BTR2_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR2_ACCMOD 0 +#define RTE_FSMC_BWTR2_DATLAT 15 +#define RTE_FSMC_BWTR2_CLKDIV 15 +#define RTE_FSMC_BWTR2_BUSTURN 15 +#define RTE_FSMC_BWTR2_DATAST 255 +#define RTE_FSMC_BWTR2_ADDHLD 15 +#define RTE_FSMC_BWTR2_ADDSET 15 +// +// + +// FSMC_NE3 Chip Select +// Configure Device on Chip Select FSMC_NE3 +#define RTE_FSMC_NE3 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR3_CBURSTRW 0 +#define RTE_FSMC_BCR3_ASYNCWAIT 0 +#define RTE_FSMC_BCR3_EXTMOD 0 +#define RTE_FSMC_BCR3_WAITEN 1 +#define RTE_FSMC_BCR3_WREN 1 +#define RTE_FSMC_BCR3_WAITCFG 0 +#define RTE_FSMC_BCR3_WRAPMOD 0 +#define RTE_FSMC_BCR3_WAITPOL 0 +#define RTE_FSMC_BCR3_BURSTEN 0 +#define RTE_FSMC_BCR3_FACCEN 1 +#define RTE_FSMC_BCR3_MWID 1 +#define RTE_FSMC_BCR3_MTYP 0 +#define RTE_FSMC_BCR3_MUXEN 1 +#define RTE_FSMC_BCR3_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR3_ACCMOD 0 +#define RTE_FSMC_BTR3_DATLAT 15 +#define RTE_FSMC_BTR3_CLKDIV 15 +#define RTE_FSMC_BTR3_BUSTURN 15 +#define RTE_FSMC_BTR3_DATAST 255 +#define RTE_FSMC_BTR3_ADDHLD 15 +#define RTE_FSMC_BTR3_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR3_ACCMOD 0 +#define RTE_FSMC_BWTR3_DATLAT 15 +#define RTE_FSMC_BWTR3_CLKDIV 15 +#define RTE_FSMC_BWTR3_BUSTURN 15 +#define RTE_FSMC_BWTR3_DATAST 255 +#define RTE_FSMC_BWTR3_ADDHLD 15 +#define RTE_FSMC_BWTR3_ADDSET 15 +// +// + +// FSMC_NE4 Chip Select +// Configure Device on Chip Select FSMC_NE4 +#define RTE_FSMC_NE4 0 + +// Chip-select control +// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write +// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash +// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. +// ASYNCWAIT: Wait signal during asynchronous transfer +// Enables the FSMC to use the wait signal even during an asynchronous protocol. +// EXTMOD: Extended mode enable +// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. +// WAITEN: Wait enable +// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. +// WREN: Write enable +// Enable/disable write operations in the current bank by the FSMC +// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state +// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory +// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted +// by the memory one clock cycle before the wait state or during the wait state +// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high +// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. +// BURSTEN: Burst enable +// Enables the burst access mode for the memory. Valid only with synchronous burst memories. +// FACCEN: Flash access enable +// Enables NOR Flash memory access operations. +// MWID: Memory databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width, valid for all type of memories. +// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash +// Defines the type of external memory attached to the corresponding memory bank. +// MUXEN: Address/data multiplexing enable +// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. +// MBKEN: Memory bank enable +// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a +// disabled bank causes an ERROR on AHB bus. +#define RTE_FSMC_BCR4_CBURSTRW 0 +#define RTE_FSMC_BCR4_ASYNCWAIT 0 +#define RTE_FSMC_BCR4_EXTMOD 0 +#define RTE_FSMC_BCR4_WAITEN 1 +#define RTE_FSMC_BCR4_WREN 1 +#define RTE_FSMC_BCR4_WAITCFG 0 +#define RTE_FSMC_BCR4_WRAPMOD 0 +#define RTE_FSMC_BCR4_WAITPOL 0 +#define RTE_FSMC_BCR4_BURSTEN 0 +#define RTE_FSMC_BCR4_FACCEN 1 +#define RTE_FSMC_BCR4_MWID 1 +#define RTE_FSMC_BCR4_MTYP 0 +#define RTE_FSMC_BCR4_MUXEN 1 +#define RTE_FSMC_BCR4_MBKEN 0 +// + +// Chip-select timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock +// cycles (+2) to issue to the memory before getting the first data: +// 0000: Data latency of 2 CLK clock cycles for first burst access +// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) +// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. +// In the case of CRAM, this field must be set to ‘0’. +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: +// 0000: Reserved +// 0001: CLK period = 2 × HCLK periods +// 0010: CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Define the bus turnaround delay after a read access only +// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive +// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the +// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the +// databus in Hi-Z state. +// These bits are written by software to add a delay at the end of a write/read transaction. This +// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx +// high to NEx low) and the maximum time needed by the memory to free the data bus after a +// read access (tEHQZ): +// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if +// EXTMOD = ‘0’ +// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) +// DATAST: Data phase duration <1-255> +// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Define the duration of the address hold phase used in mode D and multiplexed accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration =1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 +// memory clock period duration. +// ADDSET: Address setup phase duration <0-15> +// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don’t care. +#define RTE_FSMC_BTR4_ACCMOD 0 +#define RTE_FSMC_BTR4_DATLAT 15 +#define RTE_FSMC_BTR4_CLKDIV 15 +#define RTE_FSMC_BTR4_BUSTURN 15 +#define RTE_FSMC_BTR4_DATAST 255 +#define RTE_FSMC_BTR4_ADDHLD 15 +#define RTE_FSMC_BTR4_ADDSET 15 +// + +// Write timing +// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D +// Specifies the asynchronous access modes. Access mode is taken into account only when +// Extended mode is enabled in the Chip-select control register. +// DATLAT: Data latency <0-15> +// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles +// (+2) to issue to the memory before getting the first data. +// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access +// ... +// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) +// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In +// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of +// CRAM, this field must be set to 0 +// CLKDIV: Clock divide ratio (for CLK signal) <1-15> +// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. +// 0000: Reserved +// 0001 CLK period = 2 × HCLK periods +// 0010 CLK period = 3 × HCLK periods +// 1111: CLK period = 16 × HCLK periods (default value after reset) +// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. +// BUSTURN: Bus turnaround phase duration <0-15> +// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). +// (BUSTRUN + 1) HCLK period = tEHELmin. +// 0000: BUSTURN phase duration = 0 HCLK clock cycle added +// ... +// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) +// DATAST: Data phase duration <1-255> +// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. +// 0000 0000: Reserved +// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles +// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles +// ... +// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) +// Note: In synchronous accesses, this value is don't care. +// ADDHLD: Address hold phase duration <1-15> +// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. +// 0000: Reserved +// 0001: ADDHLD phase duration = 1 × HCLK clock cycle +// 0010: ADDHLD phase duration = 2 × HCLK clock cycle +// ... +// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. +// ADDSET: Address setup phase duration <1-15> +// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. +// 0000: ADDSET phase duration = 0 × HCLK clock cycle +// ... +// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) +// Note: In synchronous NOR Flash accesses, this value is don’t care. +#define RTE_FSMC_BWTR4_ACCMOD 0 +#define RTE_FSMC_BWTR4_DATLAT 15 +#define RTE_FSMC_BWTR4_CLKDIV 15 +#define RTE_FSMC_BWTR4_BUSTURN 15 +#define RTE_FSMC_BWTR4_DATAST 255 +#define RTE_FSMC_BWTR4_ADDHLD 15 +#define RTE_FSMC_BWTR4_ADDSET 15 +// +// + +// + +// NAND Flash Controller + +// FSMC_NCE2 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE2 +#define RTE_FSMC_NCE2 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR2_ECCPS 0 +#define RTE_FSMC_PCR2_TAR 0 +#define RTE_FSMC_PCR2_TCLR 0 +#define RTE_FSMC_PCR2_ECCEN 0 +#define RTE_FSMC_PCR2_PWID 0 +#define RTE_FSMC_PCR2_PTYP 1 +#define RTE_FSMC_PCR2_PBKEN 0 +#define RTE_FSMC_PCR2_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR2_IFEN 0 +#define RTE_FSMC_SR2_ILEN 0 +#define RTE_FSMC_SR2_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM2_MEMHIZ 255 +#define RTE_FSMC_PMEM2_MEMHOLD 255 +#define RTE_FSMC_PMEM2_MEMWAIT 255 +#define RTE_FSMC_PMEM2_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT2_ATTHIZ 255 +#define RTE_FSMC_PATT2_ATTHOLD 255 +#define RTE_FSMC_PATT2_ATTWAIT 255 +#define RTE_FSMC_PATT2_ATTSET 255 + +// + +// + +// FSMC_NCE3 Chip Select +// Configure NAND Device on Chip Select FSMC_NCE3 +#define RTE_FSMC_NCE3 0 + +// NAND Flash Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <1=>NAND Flash +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: NAND Flash memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR3_ECCPS 0 +#define RTE_FSMC_PCR3_TAR 0 +#define RTE_FSMC_PCR3_TCLR 0 +#define RTE_FSMC_PCR3_ECCEN 0 +#define RTE_FSMC_PCR3_PWID 0 +#define RTE_FSMC_PCR3_PTYP 1 +#define RTE_FSMC_PCR3_PBKEN 0 +#define RTE_FSMC_PCR3_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR3_IFEN 0 +#define RTE_FSMC_SR3_ILEN 0 +#define RTE_FSMC_SR3_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM3_MEMHIZ 255 +#define RTE_FSMC_PMEM3_MEMHOLD 255 +#define RTE_FSMC_PMEM3_MEMWAIT 255 +#define RTE_FSMC_PMEM3_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT3_ATTHIZ 255 +#define RTE_FSMC_PATT3_ATTHOLD 255 +#define RTE_FSMC_PATT3_ATTWAIT 255 +#define RTE_FSMC_PATT3_ATTSET 255 + +// + +// + +// + +// PC Card Controller + +// FSMC_NCE4_x Chip Select +// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 +#define RTE_FSMC_NCE4 0 + +// PC Card Control +// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes +// Defines the page size for the extended ECC. +// TAR: ALE to RE delay <0-15> +// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). +// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// TCLR: CLE to RE delay <0-15> +// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). +// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period +// 0000: 1 HCLK cycle (default) +// 1111: 16 HCLK cycles +// Note: SET is MEMSET or ATTSET according to the addressed space. +// ECCEN: ECC computation logic enable +// PWID: Databus width <0=>8 bits <1=>16 bits +// Defines the external memory device width. +// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA +// Defines the type of device attached to the corresponding memory bank. +// PBKEN: PC Card memory bank enable +// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. +// PWAITEN: Wait feature enable +// Enables the Wait feature for the PC Card/NAND Flash memory bank. +#define RTE_FSMC_PCR4_ECCPS 0 +#define RTE_FSMC_PCR4_TAR 0 +#define RTE_FSMC_PCR4_TCLR 0 +#define RTE_FSMC_PCR4_ECCEN 0 +#define RTE_FSMC_PCR4_PWID 0 +#define RTE_FSMC_PCR4_PTYP 0 +#define RTE_FSMC_PCR4_PBKEN 0 +#define RTE_FSMC_PCR4_PWAITEN 0 + +// + +// Interrupt configuration +// IFEN: Falling edge detection enable +// ILEN: High-level detection enable +// IREN: Rising edge detection enable +#define RTE_FSMC_SR4_IFEN 0 +#define RTE_FSMC_SR4_ILEN 0 +#define RTE_FSMC_SR4_IREN 0 + +// + +// Common memory space timing +// MEMHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// MEMWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access to. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) +// MEMSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 2 HCLK cycles (for NAND Flash) +// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) +#define RTE_FSMC_PMEM4_MEMHIZ 255 +#define RTE_FSMC_PMEM4_MEMHOLD 255 +#define RTE_FSMC_PMEM4_MEMWAIT 255 +#define RTE_FSMC_PMEM4_MEMSET 255 + +// + +// Attribute memory space timing +// ATTHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a NAND Flash write access. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// ATTWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, +// NOE), for NAND Flash read or write access. The duration for command assertion +// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. +// 0000 0000: reserved +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) +// ATTSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up address before the command +// assertion (NWE, NOE), for NAND Flash read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PATT4_ATTHIZ 255 +#define RTE_FSMC_PATT4_ATTHOLD 255 +#define RTE_FSMC_PATT4_ATTWAIT 255 +#define RTE_FSMC_PATT4_ATTSET 255 + +// + +// I/O space timing +// IOHIZ: Databus HiZ time <0-255> +// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the +// start of a PC Card write access. Only valid for write transaction. +// 0000 0000: 0 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOHOLD: Hold time <1-255> +// Defines the number of HCLK clock cycles to hold address (and data for write access) after +// the command deassertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: reserved +// 0000 0001: 1 HCLK cycle +// 1111 1111: 255 HCLK cycles (default value after reset) +// IOWAIT: Wait time <1-255> +// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, +// SMNOE), for PC Card read or write access. The duration for command assertion is +// extended if the wait signal (NWAIT) is active (low) at the end of the +// programmed value of HCLK. +// 0000 0000: reserved, do not use this value +// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) +// 1111 1111: 256 HCLK cycles +// IOSET: Setup time <0-255> +// Defines the number of HCLK (+1) clock cycles to set up the address before the command +// assertion (NWE, NOE), for PC Card read or write access. +// 0000 0000: 1 HCLK cycle +// 1111 1111: 256 HCLK cycles (default value after reset) +#define RTE_FSMC_PIO4_IOHIZ 255 +#define RTE_FSMC_PIO4_IOHOLD 255 +#define RTE_FSMC_PIO4_IOWAIT 255 +#define RTE_FSMC_PIO4_IOSET 255 + +// + +// + +// + +// + + +#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s new file mode 100644 index 00000000..b2a3fc40 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s @@ -0,0 +1,419 @@ +;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** +;* File Name : startup_stm32f2xx.s +;* Author : MCD Application Team +;* Version : V1.0.0 +;* Date : 18-April-2011 +;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. +;* This module performs: +;* - Set the initial SP +;* - Set the initial PC == Reset_Handler +;* - Set the vector table entries with the exceptions ISR address +;* - Branches to __main in the C library (which eventually +;* calls main()). +;* After Reset the CortexM3 processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;* <<< Use Configuration Wizard in Context Menu >>> +;******************************************************************************* +; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +;******************************************************************************* + +; Amount of memory (in bytes) allocated for Stack +; Tailor this value to your application needs +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00004000 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x0000A000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + + +; Vector Table Mapped to Address 0 at Reset + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window WatchDog + DCD PVD_IRQHandler ; PVD through EXTI Line detection + DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line + DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_IRQHandler ; RCC + DCD EXTI0_IRQHandler ; EXTI Line0 + DCD EXTI1_IRQHandler ; EXTI Line1 + DCD EXTI2_IRQHandler ; EXTI Line2 + DCD EXTI3_IRQHandler ; EXTI Line3 + DCD EXTI4_IRQHandler ; EXTI Line4 + DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 + DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 + DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 + DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 + DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 + DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 + DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 + DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s + DCD CAN1_TX_IRQHandler ; CAN1 TX + DCD CAN1_RX0_IRQHandler ; CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; CAN1 SCE + DCD EXTI9_5_IRQHandler ; External Line[9:5]s + DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 + DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 + DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 + DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM4_IRQHandler ; TIM4 + DCD I2C1_EV_IRQHandler ; I2C1 Event + DCD I2C1_ER_IRQHandler ; I2C1 Error + DCD I2C2_EV_IRQHandler ; I2C2 Event + DCD I2C2_ER_IRQHandler ; I2C2 Error + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD USART3_IRQHandler ; USART3 + DCD EXTI15_10_IRQHandler ; External Line[15:10]s + DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line + DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line + DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 + DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 + DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 + DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare + DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 + DCD FSMC_IRQHandler ; FSMC + DCD SDIO_IRQHandler ; SDIO + DCD TIM5_IRQHandler ; TIM5 + DCD SPI3_IRQHandler ; SPI3 + DCD UART4_IRQHandler ; UART4 + DCD UART5_IRQHandler ; UART5 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors + DCD TIM7_IRQHandler ; TIM7 + DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 + DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 + DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 + DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 + DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 + DCD ETH_IRQHandler ; Ethernet + DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line + DCD CAN2_TX_IRQHandler ; CAN2 TX + DCD CAN2_RX0_IRQHandler ; CAN2 RX0 + DCD CAN2_RX1_IRQHandler ; CAN2 RX1 + DCD CAN2_SCE_IRQHandler ; CAN2 SCE + DCD OTG_FS_IRQHandler ; USB OTG FS + DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 + DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 + DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 + DCD USART6_IRQHandler ; USART6 + DCD I2C3_EV_IRQHandler ; I2C3 event + DCD I2C3_ER_IRQHandler ; I2C3 error + DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out + DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In + DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI + DCD OTG_HS_IRQHandler ; USB OTG HS + DCD DCMI_IRQHandler ; DCMI + DCD CRYP_IRQHandler ; CRYP crypto + DCD HASH_RNG_IRQHandler ; Hash and Rng +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT WWDG_IRQHandler [WEAK] + EXPORT PVD_IRQHandler [WEAK] + EXPORT TAMP_STAMP_IRQHandler [WEAK] + EXPORT RTC_WKUP_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_IRQHandler [WEAK] + EXPORT EXTI0_IRQHandler [WEAK] + EXPORT EXTI1_IRQHandler [WEAK] + EXPORT EXTI2_IRQHandler [WEAK] + EXPORT EXTI3_IRQHandler [WEAK] + EXPORT EXTI4_IRQHandler [WEAK] + EXPORT DMA1_Stream0_IRQHandler [WEAK] + EXPORT DMA1_Stream1_IRQHandler [WEAK] + EXPORT DMA1_Stream2_IRQHandler [WEAK] + EXPORT DMA1_Stream3_IRQHandler [WEAK] + EXPORT DMA1_Stream4_IRQHandler [WEAK] + EXPORT DMA1_Stream5_IRQHandler [WEAK] + EXPORT DMA1_Stream6_IRQHandler [WEAK] + EXPORT ADC_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + EXPORT EXTI9_5_IRQHandler [WEAK] + EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] + EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] + EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] + EXPORT TIM1_CC_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM4_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT USART3_IRQHandler [WEAK] + EXPORT EXTI15_10_IRQHandler [WEAK] + EXPORT RTC_Alarm_IRQHandler [WEAK] + EXPORT OTG_FS_WKUP_IRQHandler [WEAK] + EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] + EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] + EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] + EXPORT TIM8_CC_IRQHandler [WEAK] + EXPORT DMA1_Stream7_IRQHandler [WEAK] + EXPORT FSMC_IRQHandler [WEAK] + EXPORT SDIO_IRQHandler [WEAK] + EXPORT TIM5_IRQHandler [WEAK] + EXPORT SPI3_IRQHandler [WEAK] + EXPORT UART4_IRQHandler [WEAK] + EXPORT UART5_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT DMA2_Stream0_IRQHandler [WEAK] + EXPORT DMA2_Stream1_IRQHandler [WEAK] + EXPORT DMA2_Stream2_IRQHandler [WEAK] + EXPORT DMA2_Stream3_IRQHandler [WEAK] + EXPORT DMA2_Stream4_IRQHandler [WEAK] + EXPORT ETH_IRQHandler [WEAK] + EXPORT ETH_WKUP_IRQHandler [WEAK] + EXPORT CAN2_TX_IRQHandler [WEAK] + EXPORT CAN2_RX0_IRQHandler [WEAK] + EXPORT CAN2_RX1_IRQHandler [WEAK] + EXPORT CAN2_SCE_IRQHandler [WEAK] + EXPORT OTG_FS_IRQHandler [WEAK] + EXPORT DMA2_Stream5_IRQHandler [WEAK] + EXPORT DMA2_Stream6_IRQHandler [WEAK] + EXPORT DMA2_Stream7_IRQHandler [WEAK] + EXPORT USART6_IRQHandler [WEAK] + EXPORT I2C3_EV_IRQHandler [WEAK] + EXPORT I2C3_ER_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] + EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] + EXPORT OTG_HS_WKUP_IRQHandler [WEAK] + EXPORT OTG_HS_IRQHandler [WEAK] + EXPORT DCMI_IRQHandler [WEAK] + EXPORT CRYP_IRQHandler [WEAK] + EXPORT HASH_RNG_IRQHandler [WEAK] + +WWDG_IRQHandler +PVD_IRQHandler +TAMP_STAMP_IRQHandler +RTC_WKUP_IRQHandler +FLASH_IRQHandler +RCC_IRQHandler +EXTI0_IRQHandler +EXTI1_IRQHandler +EXTI2_IRQHandler +EXTI3_IRQHandler +EXTI4_IRQHandler +DMA1_Stream0_IRQHandler +DMA1_Stream1_IRQHandler +DMA1_Stream2_IRQHandler +DMA1_Stream3_IRQHandler +DMA1_Stream4_IRQHandler +DMA1_Stream5_IRQHandler +DMA1_Stream6_IRQHandler +ADC_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler +EXTI9_5_IRQHandler +TIM1_BRK_TIM9_IRQHandler +TIM1_UP_TIM10_IRQHandler +TIM1_TRG_COM_TIM11_IRQHandler +TIM1_CC_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM4_IRQHandler +I2C1_EV_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +USART3_IRQHandler +EXTI15_10_IRQHandler +RTC_Alarm_IRQHandler +OTG_FS_WKUP_IRQHandler +TIM8_BRK_TIM12_IRQHandler +TIM8_UP_TIM13_IRQHandler +TIM8_TRG_COM_TIM14_IRQHandler +TIM8_CC_IRQHandler +DMA1_Stream7_IRQHandler +FSMC_IRQHandler +SDIO_IRQHandler +TIM5_IRQHandler +SPI3_IRQHandler +UART4_IRQHandler +UART5_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +DMA2_Stream0_IRQHandler +DMA2_Stream1_IRQHandler +DMA2_Stream2_IRQHandler +DMA2_Stream3_IRQHandler +DMA2_Stream4_IRQHandler +ETH_IRQHandler +ETH_WKUP_IRQHandler +CAN2_TX_IRQHandler +CAN2_RX0_IRQHandler +CAN2_RX1_IRQHandler +CAN2_SCE_IRQHandler +OTG_FS_IRQHandler +DMA2_Stream5_IRQHandler +DMA2_Stream6_IRQHandler +DMA2_Stream7_IRQHandler +USART6_IRQHandler +I2C3_EV_IRQHandler +I2C3_ER_IRQHandler +OTG_HS_EP1_OUT_IRQHandler +OTG_HS_EP1_IN_IRQHandler +OTG_HS_WKUP_IRQHandler +OTG_HS_IRQHandler +DCMI_IRQHandler +CRYP_IRQHandler +HASH_RNG_IRQHandler + + B . + + ENDP + + ALIGN + +;******************************************************************************* +; User Stack and Heap initialization +;******************************************************************************* + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + + ALIGN + + ENDIF + + END + +;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c new file mode 100644 index 00000000..da0e189c --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c @@ -0,0 +1,536 @@ +/** + ****************************************************************************** + * @file system_stm32f2xx.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-April-2011 + * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. + * This file contains the system clock configuration for STM32F2xx devices, + * and is generated by the clock configuration tool + * "STM32f2xx_Clock_Configuration_V1.0.0.xls" + * + * 1. This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier + * and Divider factors, AHB/APBx prescalers and Flash settings), + * depending on the configuration made in the clock xls tool. + * This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32f2xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * 2. After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to + * configure the system clock before to branch to main program. + * + * 3. If the system clock source selected by user fails to startup, the SystemInit() + * function will do nothing and HSI still used as system clock source. User can + * add some code to deal with this issue inside the SetSysClock() function. + * + * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define + * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or + * through PLL, and you are using different crystal you have to adapt the HSE + * value to your own configuration. + * + * 5. This file configures the system clock as follows: + *============================================================================= + *============================================================================= + * Supported STM32F2xx device revision | Rev B and Y + *----------------------------------------------------------------------------- + * System Clock source | PLL (HSE) + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 120000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 4 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 2 + *----------------------------------------------------------------------------- + * HSE Frequency(Hz) | 25000000 + *----------------------------------------------------------------------------- + * PLL_M | 25 + *----------------------------------------------------------------------------- + * PLL_N | 240 + *----------------------------------------------------------------------------- + * PLL_P | 2 + *----------------------------------------------------------------------------- + * PLL_Q | 5 + *----------------------------------------------------------------------------- + * PLLI2S_N | NA + *----------------------------------------------------------------------------- + * PLLI2S_R | NA + *----------------------------------------------------------------------------- + * I2S input clock | NA + *----------------------------------------------------------------------------- + * VDD(V) | 3.3 + *----------------------------------------------------------------------------- + * Flash Latency(WS) | 3 + *----------------------------------------------------------------------------- + * Prefetch Buffer | ON + *----------------------------------------------------------------------------- + * Instruction cache | ON + *----------------------------------------------------------------------------- + * Data cache | ON + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Enabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS + * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE + * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY + * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING + * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE + * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. + * + *

© COPYRIGHT 2011 STMicroelectronics

+ ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32f2xx_system + * @{ + */ + +/** @addtogroup STM32F2xx_System_Private_Includes + * @{ + */ + +#include "stm32f2xx.h" + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Defines + * @{ + */ + +/*!< Uncomment the following line if you need to use external SRAM mounted + on STM322xG_EVAL board as data memory */ +/* #define DATA_IN_ExtSRAM */ + +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ + + +/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ +#define PLL_M 25 +#define PLL_N 240 + +/* SYSCLK = PLL_VCO / PLL_P */ +#define PLL_P 2 + +/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ +#define PLL_Q 5 + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Variables + * @{ + */ + + uint32_t SystemCoreClock = 120000000; + + __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes + * @{ + */ + +static void SetSysClock(void); +#ifdef DATA_IN_ExtSRAM + static void SystemInit_ExtMemCtl(void); +#endif /* DATA_IN_ExtSRAM */ + +/** + * @} + */ + +/** @addtogroup STM32F2xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system + * Initialize the Embedded Flash Interface, the PLL and update the + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR |= (uint32_t)0x00000001; + + /* Reset CFGR register */ + RCC->CFGR = 0x00000000; + + /* Reset HSEON, CSSON and PLLON bits */ + RCC->CR &= (uint32_t)0xFEF6FFFF; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x24003010; + + /* Reset HSEBYP bit */ + RCC->CR &= (uint32_t)0xFFFBFFFF; + + /* Disable all interrupts */ + RCC->CIR = 0x00000000; + +#ifdef DATA_IN_ExtSRAM + SystemInit_ExtMemCtl(); +#endif /* DATA_IN_ExtSRAM */ + + /* Configure the System clock source, PLL Multiplier and Divider factors, + AHB/APBx prescalers and Flash settings ----------------------------------*/ + SetSysClock(); + + /* Configure the Vector Table location add offset address ------------------*/ +#ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ +#endif +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; + + /* Get SYSCLK source -------------------------------------------------------*/ + tmp = RCC->CFGR & RCC_CFGR_SWS; + + switch (tmp) + { + case 0x00: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + case 0x04: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + case 0x08: /* PLL used as system clock source */ + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N + SYSCLK = PLL_VCO / PLL_P + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + + if (pllsource != 0) + { + /* HSE used as PLL clock source */ + pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + else + { + /* HSI used as PLL clock source */ + pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); + } + + pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; + SystemCoreClock = pllvco/pllp; + break; + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK frequency --------------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK frequency */ + SystemCoreClock >>= tmp; +} + +/** + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @Note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ +static void SetSysClock(void) +{ +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + __IO uint32_t StartUpCounter = 0, HSEStatus = 0; + + /* Enable HSE */ + RCC->CR |= ((uint32_t)RCC_CR_HSEON); + + /* Wait till HSE is ready and if Time out is reached exit */ + do + { + HSEStatus = RCC->CR & RCC_CR_HSERDY; + StartUpCounter++; + } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); + + if ((RCC->CR & RCC_CR_HSERDY) != RESET) + { + HSEStatus = (uint32_t)0x01; + } + else + { + HSEStatus = (uint32_t)0x00; + } + + if (HSEStatus == (uint32_t)0x01) + { + /* HCLK = SYSCLK / 1*/ + RCC->CFGR |= RCC_CFGR_HPRE_DIV1; + + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; + + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; + + /* Configure the main PLL */ + RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | + (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); + + /* Enable the main PLL */ + RCC->CR |= RCC_CR_PLLON; + + /* Wait till the main PLL is ready */ + while((RCC->CR & RCC_CR_PLLRDY) == 0) + { + } + + /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; + + /* Select the main PLL as system clock source */ + RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); + RCC->CFGR |= RCC_CFGR_SW_PLL; + + /* Wait till the main PLL is used as system clock source */ + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + { + } + } + else + { /* If HSE fails to start-up, the application will have wrong clock + configuration. User can add here some code to deal with this error */ + } + +} + +/** + * @brief Setup the external memory controller. Called in startup_stm32f2xx.s + * before jump to __main + * @param None + * @retval None + */ +#ifdef DATA_IN_ExtSRAM +/** + * @brief Setup the external memory controller. + * Called in startup_stm32f2xx.s before jump to main. + * This function configures the external SRAM mounted on STM322xG_EVAL board + * This SRAM will be used as program data memory (including heap and stack). + * @param None + * @retval None + */ +void SystemInit_ExtMemCtl(void) +{ +/*-- GPIOs Configuration -----------------------------------------------------*/ +/* + +-------------------+--------------------+------------------+------------------+ + + SRAM pins assignment + + +-------------------+--------------------+------------------+------------------+ + | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | + | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | + | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | + | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | + | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | + | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | + | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | + | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ + | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | + | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | + | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ + +-------------------+--------------------+ +*/ + /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ + RCC->AHB1ENR = 0x00000078; + + /* Connect PDx pins to FSMC Alternate function */ + GPIOD->AFR[0] = 0x00cc00cc; + GPIOD->AFR[1] = 0xcc0ccccc; + /* Configure PDx pins in Alternate function mode */ + GPIOD->MODER = 0xa2aa0a0a; + /* Configure PDx pins speed to 100 MHz */ + GPIOD->OSPEEDR = 0xf3ff0f0f; + /* Configure PDx pins Output type to push-pull */ + GPIOD->OTYPER = 0x00000000; + /* No pull-up, pull-down for PDx pins */ + GPIOD->PUPDR = 0x00000000; + + /* Connect PEx pins to FSMC Alternate function */ + GPIOE->AFR[0] = 0xc00000cc; + GPIOE->AFR[1] = 0xcccccccc; + /* Configure PEx pins in Alternate function mode */ + GPIOE->MODER = 0xaaaa800a; + /* Configure PEx pins speed to 100 MHz */ + GPIOE->OSPEEDR = 0xffffc00f; + /* Configure PEx pins Output type to push-pull */ + GPIOE->OTYPER = 0x00000000; + /* No pull-up, pull-down for PEx pins */ + GPIOE->PUPDR = 0x00000000; + + /* Connect PFx pins to FSMC Alternate function */ + GPIOF->AFR[0] = 0x00cccccc; + GPIOF->AFR[1] = 0xcccc0000; + /* Configure PFx pins in Alternate function mode */ + GPIOF->MODER = 0xaa000aaa; + /* Configure PFx pins speed to 100 MHz */ + GPIOF->OSPEEDR = 0xff000fff; + /* Configure PFx pins Output type to push-pull */ + GPIOF->OTYPER = 0x00000000; + /* No pull-up, pull-down for PFx pins */ + GPIOF->PUPDR = 0x00000000; + + /* Connect PGx pins to FSMC Alternate function */ + GPIOG->AFR[0] = 0x00cccccc; + GPIOG->AFR[1] = 0x000000c0; + /* Configure PGx pins in Alternate function mode */ + GPIOG->MODER = 0x00080aaa; + /* Configure PGx pins speed to 100 MHz */ + GPIOG->OSPEEDR = 0x000c0fff; + /* Configure PGx pins Output type to push-pull */ + GPIOG->OTYPER = 0x00000000; + /* No pull-up, pull-down for PGx pins */ + GPIOG->PUPDR = 0x00000000; + +/*-- FSMC Configuration ------------------------------------------------------*/ + /* Enable the FSMC interface clock */ + RCC->AHB3ENR = 0x00000001; + + /* Configure and enable Bank1_SRAM2 */ + FSMC_Bank1->BTCR[2] = 0x00001015; + FSMC_Bank1->BTCR[3] = 0x00010400; + FSMC_Bank1E->BWTR[2] = 0x0fffffff; +/* + Bank1_SRAM2 is configured as follow: + + p.FSMC_AddressSetupTime = 0; + p.FSMC_AddressHoldTime = 0; + p.FSMC_DataSetupTime = 4; + p.FSMC_BusTurnAroundDuration = 1; + p.FSMC_CLKDivision = 0; + p.FSMC_DataLatency = 0; + p.FSMC_AccessMode = FSMC_AccessMode_A; + + FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; + FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; + FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; + FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; + FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; + FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; + FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; + FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; + FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; + FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; + FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; + FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; +*/ + +} +#endif /* DATA_IN_ExtSRAM */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c new file mode 100644 index 00000000..78564b08 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config.c + * Purpose: File System Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// File System +// Define File System global parameters + +// Number of open files <4-16> +// Define number of files that can be +// opened at the same time. +// Default: 8 +#define NUM_FILES 8 + +// FAT Name Cache Size <0-1000000> +// Define number of cached FAT file or directory names. +// 48 bytes of RAM is required for each cached name. +#define FAT_NAME_CACHE_SIZE 0 + +// Relocate FAT Name Cache Buffer +// Locate Cache Buffer at a specific address. +#define FAT_NAME_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Define the Cache buffer base address. +#define FAT_NAME_CACHE_ADDR 0x60000000 + +// + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_FileSystem_Drive_RAM +#include "FS_Config_RAM.h" +#endif + +#ifdef RTE_FileSystem_Drive_NOR_0 +#include "FS_Config_NOR_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NOR_1 +#include "FS_Config_NOR_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_NAND_0 +#include "FS_Config_NAND_0.h" +#endif +#ifdef RTE_FileSystem_Drive_NAND_1 +#include "FS_Config_NAND_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_MC_0 +#include "FS_Config_MC_0.h" +#endif +#ifdef RTE_FileSystem_Drive_MC_1 +#include "FS_Config_MC_1.h" +#endif + +#ifdef RTE_FileSystem_Drive_USB_0 +#include "FS_Config_USB_0.h" +#endif +#ifdef RTE_FileSystem_Drive_USB_1 +#include "FS_Config_USB_1.h" +#endif + +#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h new file mode 100644 index 00000000..0b1c6d3a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h @@ -0,0 +1,57 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::File System:Drive + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: FS_Config_MC_0.h + * Purpose: File System Configuration for Memory Card Drive + * Rev.: V5.01 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Memory Card Drive 0 +// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" +#define MC0_ENABLE 1 + +// Connect to hardware via Driver_MCI# <0-255> +// Select driver control block for hardware interface +#define MC0_MCI_DRIVER 0 + +// Connect to hardware via Driver_SPI# <0-255> +// Select driver control block for hardware interface when in SPI mode +#define MC0_SPI_DRIVER 0 + +// Memory Card Interface Mode <0=>Native <1=>SPI +// Native uses a SD Bus with up to 8 data lines, CLK, and CMD +// SPI uses 2 data lines (MOSI and MISO), SCLK and CS +// When using SPI both Driver_SPI# and Driver_MCI# must be specified +// since the MCI driver provides the control interface lines. +#define MC0_SPI 0 + +// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB +// <8=>8 KB <16=>16 KB <32=>32 KB +// Drive Cache stores data sectors and may be increased to speed-up +// file read/write operations on this drive (default: 4 KB) +#define MC0_CACHE_SIZE 4 + +// Locate Drive Cache and Drive Buffer +// Some microcontrollers support DMA only in specific memory areas and +// require to locate the drive buffers at a fixed address. +#define MC0_CACHE_RELOC 0 + +// Base address <0x0000-0xFFFFFE00:0x200> +// Set buffer base address to RAM areas that support DMA with the drive. +#define MC0_CACHE_ADDR 0x7FD00000 + +// + +// Use FAT Journal +// Protect File Allocation Table and Directory Entries for +// fail-safe operation. +#define MC0_FAT_JOURNAL 0 + +// Default Drive "M0:" +// Use this drive when no drive letter is specified. +#define MC0_DEFAULT_DRIVE 1 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c new file mode 100644 index 00000000..6b9dc8e0 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c @@ -0,0 +1,153 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config.c + * Purpose: Network Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// System Definitions +// Global Network System definitions +// Local Host Name +// This is the name under which embedded host can be +// accessed on a local area network. +// Default: "my_host" +#define NET_HOST_NAME "my_host" + +// Memory Pool size <1536-262144:4><#/4> +// This is the size of a memory pool in bytes. Buffers for +// Network packets are allocated from this memory pool. +// Default: 12000 bytes +#define NET_MEM_SIZE 3000 + +// + +#include "..\RTE_Components.h" + +#ifdef RTE_Network_Interface_ETH_0 +#include "Net_Config_ETH_0.h" +#endif +#ifdef RTE_Network_Interface_ETH_1 +#include "Net_Config_ETH_1.h" +#endif + +#ifdef RTE_Network_Interface_PPP_0 +#include "Net_Config_PPP_0.h" +#endif +#ifdef RTE_Network_Interface_PPP_1 +#include "Net_Config_PPP_1.h" +#endif + +#ifdef RTE_Network_Interface_SLIP_0 +#include "Net_Config_SLIP_0.h" +#endif +#ifdef RTE_Network_Interface_SLIP_1 +#include "Net_Config_SLIP_1.h" +#endif + +#ifdef RTE_Network_Socket_UDP +#include "Net_Config_UDP.h" +#endif +#ifdef RTE_Network_Socket_TCP +#include "Net_Config_TCP.h" +#endif +#ifdef RTE_Network_Socket_BSD +#include "Net_Config_BSD.h" +#endif + +#ifdef RTE_Network_Web_Server_RO +#include "Net_Config_HTTP_Server.h" +#endif +#ifdef RTE_Network_Web_Server_FS +#include "Net_Config_HTTP_Server.h" +#endif + +#ifdef RTE_Network_Telnet_Server +#include "Net_Config_Telnet_Server.h" +#endif + +#ifdef RTE_Network_TFTP_Server +#include "Net_Config_TFTP_Server.h" +#endif +#ifdef RTE_Network_TFTP_Client +#include "Net_Config_TFTP_Client.h" +#endif + +#ifdef RTE_Network_FTP_Server +#include "Net_Config_FTP_Server.h" +#endif +#ifdef RTE_Network_FTP_Client +#include "Net_Config_FTP_Client.h" +#endif + +#ifdef RTE_Network_DNS_Client +#include "Net_Config_DNS_Client.h" +#endif + +#ifdef RTE_Network_SMTP_Client +#include "Net_Config_SMTP_Client.h" +#endif + +#ifdef RTE_Network_SNMP_Agent +#include "Net_Config_SNMP_Agent.h" +#endif + +#ifdef RTE_Network_SNTP_Client +#include "Net_Config_SNTP_Client.h" +#endif + +#include "net_config.h" + +/** +\addtogroup net_genFunc +@{ +*/ +/** + \fn void net_sys_error (ERROR_CODE error) + \ingroup net_cores + \brief Network system error handler. +*/ +void net_sys_error (ERROR_CODE error) { + /* This function is called when a fatal error is encountered. */ + /* The normal program execution is not possible anymore. */ + + switch (error) { + case ERR_MEM_ALLOC: + /* Out of memory */ + break; + + case ERR_MEM_FREE: + /* Trying to release non existing memory block */ + break; + + case ERR_MEM_CORRUPT: + /* Memory Link pointer Corrupted */ + /* More data written than the size of allocated mem block */ + break; + + case ERR_MEM_LOCK: + /* Locked Memory management function (alloc/free) re-entered */ + break; + + case ERR_UDP_ALLOC: + /* Out of UDP Sockets */ + break; + + case ERR_TCP_ALLOC: + /* Out of TCP Sockets */ + break; + + case ERR_TCP_STATE: + /* TCP State machine in undefined state */ + break; + } + + /* End-less loop */ + while (1); +} +/** +@} +*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h new file mode 100644 index 00000000..4166a0a2 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_BSD.h + * Purpose: Network Configuration BSD Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Berkley (BSD) Sockets +#define BSD_ENABLE 1 + +// Number of BSD Sockets <1-20> +// Number of available Berkeley Sockets +// Default: 2 +#define BSD_NUM_SOCKS 15 + +// Number of Streaming Server Sockets <0-20> +// Defines a number of Streaming (TCP) Server sockets, +// that listen for an incoming connection from the client. +// Default: 1 +#define BSD_SERVER_SOCKS 1 + +// Receive Timeout in seconds <0-600> +// A timeout for socket receive in blocking mode. +// Timeout value of 0 means indefinite timeout. +// Default: 20 +#define BSD_RECEIVE_TOUT 20 + +// Hostname Resolver +// Enable or disable Berkeley style hostname resolver. +#define BSD_HOSTNAME_ENABLE 0 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h new file mode 100644 index 00000000..d30b7180 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Service + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_DNS_Client.h + * Purpose: Network Configuration DNS Client + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// DNS Client +#define DNS_CLIENT_ENABLE 1 + +// Cache Table size <5-100> +// Number of cached DNS host names/IP addresses +// Default: 20 +#define DNS_CLIENT_TAB_SIZE 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h new file mode 100644 index 00000000..9a49f382 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h @@ -0,0 +1,222 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Interface + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_ETH_0.h + * Purpose: Network Configuration ETH Interface + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Ethernet Network Interface 0 +#define ETH0_ENABLE 1 + +// Connect to hardware via Driver_ETH# <0-255> +// Select driver control block for MAC and PHY interface +#define ETH0_DRIVER 1 + +// MAC Address +// Local Ethernet MAC Address +// Value FF:FF:FF:FF:FF:FF is not allowed. +// It is an ethernet Broadcast MAC address. +// Address byte 1 <0x00-0xff:2> +// LSB is an ethernet Multicast bit. +// Must be 0 for local MAC address. +// Default: 0x1E +#define ETH0_MAC1 0x1E + +// Address byte 2 <0x00-0xff> +// Default: 0x30 +#define ETH0_MAC2 0x30 + +// Address byte 3 <0x00-0xff> +// Default: 0x6C +#define ETH0_MAC3 0x6C + +// Address byte 4 <0x00-0xff> +// Default: 0xA2 +#define ETH0_MAC4 0xA2 + +// Address byte 5 <0x00-0xff> +// Default: 0x45 +#define ETH0_MAC5 0x45 + +// Address byte 6 <0x00-0xff> +// Default: 0x5E +#define ETH0_MAC6 0x5E +// + +// IP Address +// Local Static IP Address +// Value 255.255.255.255 is not allowed. +// It is a Broadcast IP address. +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_IP1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_IP2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_IP3 0 + +// Address byte 4 <0-255> +// Default: 100 +#define ETH0_IP4 100 +// + +// Subnet mask +// Local Subnet mask +// Mask byte 1 <0-255> +// Default: 255 +#define ETH0_MASK1 255 + +// Mask byte 2 <0-255> +// Default: 255 +#define ETH0_MASK2 255 + +// Mask byte 3 <0-255> +// Default: 255 +#define ETH0_MASK3 255 + +// Mask byte 4 <0-255> +// Default: 0 +#define ETH0_MASK4 0 +// + +// Default Gateway +// Default Gateway IP Address +// Address byte 1 <0-255> +// Default: 192 +#define ETH0_GW1 192 + +// Address byte 2 <0-255> +// Default: 168 +#define ETH0_GW2 168 + +// Address byte 3 <0-255> +// Default: 0 +#define ETH0_GW3 0 + +// Address byte 4 <0-255> +// Default: 254 +#define ETH0_GW4 254 +// + +// Primary DNS Server +// Primary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_PRI_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_PRI_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_PRI_DNS3 2 + +// Address byte 4 <0-255> +// Default: 129 +#define ETH0_PRI_DNS4 129 +// + +// Secondary DNS Server +// Secondary DNS Server IP Address +// Address byte 1 <0-255> +// Default: 194 +#define ETH0_SEC_DNS1 194 + +// Address byte 2 <0-255> +// Default: 25 +#define ETH0_SEC_DNS2 25 + +// Address byte 3 <0-255> +// Default: 2 +#define ETH0_SEC_DNS3 2 + +// Address byte 4 <0-255> +// Default: 130 +#define ETH0_SEC_DNS4 130 +// + +// ARP Definitions +// Address Resolution Protocol Definitions +// Cache Table size <5-100> +// Number of cached hardware/IP addresses +// Default: 10 +#define ETH0_ARP_TAB_SIZE 10 + +// Cache Timeout in seconds <5-255> +// A timeout for a cached hardware/IP addresses +// Default: 150 +#define ETH0_ARP_CACHE_TOUT 150 + +// Number of Retries <0-20> +// Number of Retries to resolve an IP address +// before ARP module gives up +// Default: 4 +#define ETH0_ARP_MAX_RETRY 4 + +// Resend Timeout in seconds <1-10> +// A timeout to resend the ARP Request +// Default: 2 +#define ETH0_ARP_RESEND_TOUT 2 + +// Send Notification on Address changes +// When this option is enabled, the embedded host +// will send a Gratuitous ARP notification at startup, +// or when the device IP address has changed. +// Default: Disabled +#define ETH0_ARP_NOTIFY 0 +// + +// IGMP Group Management +// Enable or disable Internet Group Management Protocol +#define ETH0_IGMP_ENABLE 0 + +// Membership Table size <2-50> +// Number of Groups this host can join +// Default: 5 +#define ETH0_IGMP_TAB_SIZE 5 +// + +// NetBIOS Name Service +// When this option is enabled, the embedded host can be +// accessed by his name on the local LAN using NBNS protocol. +// You need to modify also the number of UDP Sockets, +// because NBNS protocol uses one UDP socket to run. +#define ETH0_NBNS_ENABLE 1 + +// Dynamic Host Configuration +// When this option is enabled, local IP address, Net Mask +// and Default Gateway are obtained automatically from +// the DHCP Server on local LAN. +// You need to modify also the number of UDP Sockets, +// because DHCP protocol uses one UDP socket to run. +#define ETH0_DHCP_ENABLE 0 + +// Vendor Class Identifier +// This value is optional. If specified, it is added +// to DHCP request message, identifying vendor type. +// Default: "" +#define ETH0_DHCP_VCID "" + +// Bootfile Name +// This value is optional. If enabled, the Bootfile Name +// (option 67) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_BOOTFILE 0 + +// NTP Servers +// This value is optional. If enabled, a list of NTP Servers +// (option 42) is also requested from DHCP server. +// Default: disabled +#define ETH0_DHCP_NTP_SERVERS 0 +// + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h new file mode 100644 index 00000000..9d5b419e --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_TCP.h + * Purpose: Network Configuration TCP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// TCP Sockets +#define TCP_ENABLE 1 + +// Number of TCP Sockets <1-20> +// Number of available TCP sockets +// Default: 5 +#define TCP_NUM_SOCKS 15 + +// Number of Retries <0-20> +// How many times TCP module will try to retransmit data +// before giving up. Increase this value for high-latency +// and low_throughput networks. +// Default: 5 +#define TCP_MAX_RETRY 5 + +// Retry Timeout in seconds <1-10> +// If data frame not acknowledged within this time frame, +// TCP module will try to resend the data again. +// Default: 4 +#define TCP_RETRY_TOUT 4 + +// Default Connect Timeout in seconds <1-600> +// Default TCP Socket Keep Alive timeout. When it expires +// with no TCP data frame send, TCP Connection is closed. +// Default: 120 +#define TCP_DEFAULT_TOUT 120 + +// Maximum Segment Size <536-1460> +// The Maximum Segment Size specifies the maximum +// number of bytes in the TCP segment's Data field. +// Default: 1460 +#define TCP_MAX_SEG_SIZE 1460 + +// Receive Window Size <536-65535> +// Receive Window Size specifies the size of data, +// that the socket is able to buffer in flow-control mode. +// Default: 4380 +#define TCP_RECEIVE_WIN_SIZE 4380 + +// + +// TCP Initial Retransmit period in seconds +#define TCP_INITIAL_RETRY_TOUT 1 + +// TCP SYN frame retransmit period in seconds +#define TCP_SYN_RETRY_TOUT 2 + +// Number of retries to establish a connection +#define TCP_CONNECT_RETRY 7 + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h new file mode 100644 index 00000000..113f314a --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network:Socket + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Config_UDP.h + * Purpose: Network Configuration UDP Sockets + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// UDP Sockets +#define UDP_ENABLE 1 + +// Number of UDP Sockets <1-20> +// Number of available UDP sockets +// Default: 5 +#define UDP_NUM_SOCKS 20 + +// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c new file mode 100644 index 00000000..735089a4 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------------------------ + * MDK Middleware - Component ::Network + * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. + *------------------------------------------------------------------------------ + * Name: Net_Debug.c + * Purpose: Network Debug Configuration + * Rev.: V5.00 + *----------------------------------------------------------------------------*/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Print Time Stamp +// Enable printing the time-info in debug messages +#define DBG_TIME 1 + +// TCPnet Debug Definitions +// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Memory debug messages +#define DBG_MEM 1 + +// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Ethernet debug messages +#define DBG_ETH 0 + +// PPP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off PPP debug messages +#define DBG_PPP 0 + +// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SLIP debug messages +#define DBG_SLIP 0 + +// ARP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ARP debug messages +#define DBG_ARP 0 + +// IP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IP debug messages +#define DBG_IP 1 + +// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off ICMP debug messages +#define DBG_ICMP 1 + +// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off IGMP debug messages +#define DBG_IGMP 1 + +// UDP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off UDP debug messages +#define DBG_UDP 1 + +// TCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TCP debug messages +#define DBG_TCP 1 + +// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off NetBIOS Name Service debug messages +#define DBG_NBNS 1 + +// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Dynamic Host Configuration debug messages +#define DBG_DHCP 1 + +// DNS Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Domain Name Service debug messages +#define DBG_DNS 1 + +// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Management debug messages +#define DBG_SNMP 1 + +// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Simple Network Time debug messages +#define DBG_SNTP 1 + +// BSD Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off BSD Interface debug messages +#define DBG_BSD 1 +// + +// Application Debug Definitions +// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Web Server debug messages +#define DBG_HTTP_SERVER 1 + +// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Server debug messages +#define DBG_FTP_SERVER 1 + +// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off FTP Client debug messages +#define DBG_FTP_CLIENT 1 + +// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off Telnet Server debug messages +#define DBG_TELNET_SERVER 1 + +// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Server debug messages +#define DBG_TFTP_SERVER 1 + +// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off TFTP Client debug messages +#define DBG_TFTP_CLIENT 1 + +// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug +// Turn On/Off SMTP Client debug messages +#define DBG_SMTP_CLIENT 1 +// + + +#include "net_debug.h" + + +/** + \fn void net_debug_init (void) + \brief Initialize Network Debug Interface. +*/ +void net_debug_init (void) { + /* Add your code to initialize the Debug output. This is usually the */ + /* serial interface. The function is called at TCPnet system startup. */ + /* You may need to customize also the 'putchar()' function. */ + +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h new file mode 100644 index 00000000..dc29d6c5 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h @@ -0,0 +1,28 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'SimpleServer' + * Target: 'SimpleServer' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ +#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ +#define RTE_Drivers_MCI0 /* Driver MCI0 */ +#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ +#define RTE_FileSystem_Core /* File System Core */ + #define RTE_FileSystem_LFN /* File System with Long Filename support */ +#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ +#define RTE_Network_Core /* Network Core */ + #define RTE_Network_Debug /* Network Debug Version */ +#define RTE_Network_DNS_Client /* Network DNS Client */ +#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ +#define RTE_Network_Socket_BSD /* Network Socket BSD */ +#define RTE_Network_Socket_TCP /* Network Socket TCP */ +#define RTE_Network_Socket_UDP /* Network Socket UDP */ + +#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini new file mode 100644 index 00000000..239abce3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini @@ -0,0 +1,36 @@ +/******************************************************************************/ +/* STM32_SWO.ini: STM32 Debugger Initialization File */ +/******************************************************************************/ +// <<< Use Configuration Wizard in Context Menu >>> // +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + + +FUNC void DebugSetup (void) { +// Debug MCU Configuration +// DBG_SLEEP Debug Sleep Mode +// DBG_STOP Debug Stop Mode +// DBG_STANDBY Debug Standby Mode +// TRACE_IOEN Trace I/O Enable +// TRACE_MODE Trace Mode +// <0=> Asynchronous +// <1=> Synchronous: TRACEDATA Size 1 +// <2=> Synchronous: TRACEDATA Size 2 +// <3=> Synchronous: TRACEDATA Size 4 +// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted +// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted +// DBG_TIM1_STOP Timer 1 Stopped when Core is halted +// DBG_TIM2_STOP Timer 2 Stopped when Core is halted +// DBG_TIM3_STOP Timer 3 Stopped when Core is halted +// DBG_TIM4_STOP Timer 4 Stopped when Core is halted +// DBG_CAN_STOP CAN Stopped when Core is halted +// + _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR +} + +DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx new file mode 100644 index 00000000..b3a8b8db --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx @@ -0,0 +1,1406 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + SimpleServer + 0x4 + ARM-ADS + + 120000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Object\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 8 + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ULP2CM3 + -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) + + + 0 + DLGUARM + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + + + + + + 1 + 8 + 0x20000408 + + + + + 2 + 8 + 0x8004dc8 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + + + + + + + Source + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 4 + 0 + 0 + 0 + 0 + .\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 4 + 0 + 0 + 0 + 0 + .\server.c + server.c + 0 + 0 + + + + + Configuration + 1 + 0 + 0 + 0 + + 2 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 0 + 0 + + + 2 + 4 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + .\RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 0 + 0 + + + + + Documentation + 1 + 0 + 0 + 0 + + 3 + 5 + 5 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\Abstract.txt + Abstract.txt + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + 4 + 6 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + RTX_CM3.lib + 1 + 0 + + + 4 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\CMSIS\RTX_Conf_CM.c + RTX_Conf_CM.c + 1 + 0 + + + + + ::Device + 0 + 0 + 0 + 1 + + 5 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + DMA_STM32F2xx.c + 1 + 0 + + + 5 + 9 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + GPIO_STM32F2xx.c + 1 + 0 + + + 5 + 10 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\RTE_Device.h + RTE_Device.h + 1 + 0 + + + 5 + 11 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + startup_stm32f2xx.s + 1 + 0 + + + 5 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Device\STM32F207IG\system_stm32f2xx.c + system_stm32f2xx.c + 1 + 0 + + + + + ::Drivers + 0 + 0 + 0 + 1 + + 6 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + PHY_ST802RT1.c + 1 + 0 + + + 6 + 14 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + EMAC_STM32F2xx.c + 1 + 0 + + + 6 + 15 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + MCI_STM32F2xx.c + 1 + 0 + + + + + ::File System + 0 + 0 + 0 + 1 + + 7 + 16 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + FS_LFN_CM3_L.lib + 1 + 0 + + + 7 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config.c + FS_Config.c + 1 + 0 + + + 7 + 18 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\File_System\FS_Config_MC_0.h + FS_Config_MC_0.h + 1 + 0 + + + + + ::Network + 0 + 0 + 0 + 1 + + 8 + 19 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + Net_Dbg_CM3_L.lib + 1 + 0 + + + 8 + 20 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config.c + Net_Config.c + 1 + 0 + + + 8 + 21 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_BSD.h + Net_Config_BSD.h + 1 + 0 + + + 8 + 22 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_DNS_Client.h + Net_Config_DNS_Client.h + 1 + 0 + + + 8 + 23 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_ETH_0.h + Net_Config_ETH_0.h + 1 + 0 + + + 8 + 24 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_TCP.h + Net_Config_TCP.h + 1 + 0 + + + 8 + 25 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Config_UDP.h + Net_Config_UDP.h + 1 + 0 + + + 8 + 26 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\Network\Net_Debug.c + Net_Debug.c + 1 + 0 + + + + + ::wolfSSL + 0 + 0 + 0 + 1 + + 9 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + cyassl_MDK_ARM.c + 1 + 0 + + + 9 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + time-STM32F2xx.c + 1 + 0 + + + 9 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + aes.c + 1 + 0 + + + 9 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + arc4.c + 1 + 0 + + + 9 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + asm.c + 1 + 0 + + + 9 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + asn.c + 1 + 0 + + + 9 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + blake2b.c + 1 + 0 + + + 9 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + camellia.c + 1 + 0 + + + 9 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + coding.c + 1 + 0 + + + 9 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + compress.c + 1 + 0 + + + 9 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + des3.c + 1 + 0 + + + 9 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + dh.c + 1 + 0 + + + 9 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + dsa.c + 1 + 0 + + + 9 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + ecc.c + 1 + 0 + + + 9 + 41 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + ecc_fp.c + 1 + 0 + + + 9 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + error.c + 1 + 0 + + + 9 + 43 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + hc128.c + 1 + 0 + + + 9 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + hmac.c + 1 + 0 + + + 9 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + integer.c + 1 + 0 + + + 9 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + logging.c + 1 + 0 + + + 9 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + md2.c + 1 + 0 + + + 9 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + md4.c + 1 + 0 + + + 9 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + md5.c + 1 + 0 + + + 9 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + memory.c + 1 + 0 + + + 9 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + misc.c + 1 + 0 + + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + pwdbased.c + 1 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + rabbit.c + 1 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + random.c + 1 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + ripemd.c + 1 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + rsa.c + 1 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + sha.c + 1 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + sha256.c + 1 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + sha512.c + 1 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + tfm.c + 1 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + crl.c + 1 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + internal.c + 1 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + io.c + 1 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + keys.c + 1 + 0 + + + 9 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + ocsp.c + 1 + 0 + + + 9 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + sniffer.c + 1 + 0 + + + 9 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + ssl.c + 1 + 0 + + + 9 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + tls.c + 1 + 0 + + + 9 + 69 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-Crypt.h + config-Crypt.h + 1 + 0 + + + 9 + 70 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config-CyaSSL.h + config-CyaSSL.h + 1 + 0 + + + 9 + 71 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + RTE\wolfSSL\config.h + config.h + 1 + 0 + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx new file mode 100644 index 00000000..d354efbe --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx @@ -0,0 +1,1101 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + SimpleServer + 0x4 + ARM-ADS + + + STM32F207IG + STMicroelectronics + IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) + 0 + $$Device:STM32F207IG$Device\Include\stm32f2xx.h + + + + + + + + + + $$Device:STM32F207IG$SVD\STM32F20x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\Object\ + SimpleServer + 1 + 0 + 0 + 1 + 1 + .\Object\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM3 + SARMCM3.DLL + -REMAP -MPU + TCM.DLL + -pCM3 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 8 + + + + + + + + + + + + + .\STM32_SWO.ini + BIN\ULP2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 1 + 4100 + + 1 + BIN\ULP2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M3" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + HAVE_CONFIG_H MDK_CONF_SimpleServer CYASSL_STM32F2xx + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + Source + + + main.c + 1 + .\main.c + + + server.c + 1 + .\server.c + + + + + Configuration + + + config-CyaSSL.h + 5 + .\RTE\wolfSSL\config-CyaSSL.h + + + config-Crypt.h + 5 + .\RTE\wolfSSL\config-Crypt.h + + + + + Documentation + + + Abstract.txt + 5 + .\Abstract.txt + + + + + ::CMSIS + + + RTX_CM3.lib + 4 + C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib + + + RTX_Conf_CM.c + 1 + RTE\CMSIS\RTX_Conf_CM.c + + + + + ::Device + + + DMA_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c + + + GPIO_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c + + + RTE_Device.h + 5 + RTE\Device\STM32F207IG\RTE_Device.h + + + startup_stm32f2xx.s + 2 + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + system_stm32f2xx.c + 1 + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + ::Drivers + + + PHY_ST802RT1.c + 1 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c + + + EMAC_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c + + + MCI_STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c + + + + + ::File System + + + FS_LFN_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib + + + FS_Config.c + 1 + RTE\File_System\FS_Config.c + + + FS_Config_MC_0.h + 5 + RTE\File_System\FS_Config_MC_0.h + + + + + ::Network + + + Net_Dbg_CM3_L.lib + 4 + C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib + + + Net_Config.c + 1 + RTE\Network\Net_Config.c + + + Net_Config_BSD.h + 5 + RTE\Network\Net_Config_BSD.h + + + Net_Config_DNS_Client.h + 5 + RTE\Network\Net_Config_DNS_Client.h + + + Net_Config_ETH_0.h + 5 + RTE\Network\Net_Config_ETH_0.h + + + Net_Config_TCP.h + 5 + RTE\Network\Net_Config_TCP.h + + + Net_Config_UDP.h + 5 + RTE\Network\Net_Config_UDP.h + + + Net_Debug.c + 1 + RTE\Network\Net_Debug.c + + + + + ::wolfSSL + + + cyassl_MDK_ARM.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c + + + time-STM32F2xx.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c + + + aes.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c + + + arc4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c + + + asm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c + + + asn.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c + + + blake2b.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c + + + camellia.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c + + + coding.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c + + + compress.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c + + + des3.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c + + + dh.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c + + + dsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c + + + ecc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c + + + ecc_fp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c + + + error.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c + + + hc128.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c + + + hmac.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c + + + integer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c + + + logging.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c + + + md2.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c + + + md4.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c + + + md5.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c + + + memory.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c + + + misc.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c + + + pwdbased.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c + + + rabbit.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c + + + random.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c + + + ripemd.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c + + + rsa.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c + + + sha.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c + + + sha256.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c + + + sha512.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c + + + tfm.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c + + + crl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c + + + internal.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c + + + io.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c + + + keys.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c + + + ocsp.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c + + + sniffer.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c + + + ssl.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c + + + tls.c + 1 + C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c + + + config-Crypt.h + 5 + RTE\wolfSSL\config-Crypt.h + + + config-CyaSSL.h + 5 + RTE\wolfSSL\config-CyaSSL.h + + + config.h + 5 + RTE\wolfSSL\config.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\CMSIS\RTX_Conf_CM.c + + + + + + + + RTE\Device\STM32F207IG\RTE_Device.h + + + + + + + + RTE\Device\STM32F207IG\startup_stm32f2xx.s + + + + + + + + RTE\Device\STM32F207IG\system_stm32f2xx.c + + + + + + + + RTE\File_System\FS_Config.c + + + + + + + + RTE\File_System\FS_Config_MC_0.h + + + + + + + + RTE\Network\Net_Config.c + + + + + + + + RTE\Network\Net_Config_BSD.h + + + + + + + + RTE\Network\Net_Config_DNS_Client.h + + + + + + + + RTE\Network\Net_Config_ETH_0.h + + + + + + + + RTE\Network\Net_Config_TCP.h + + + + + + + + RTE\Network\Net_Config_UDP.h + + + + + + + + RTE\Network\Net_Debug.c + + + + + + + + RTE\Other\config-Crypt.h + + + + + + RTE\Other\config-CyaSSL.h + + + + + + RTE\Other\config-RTX-TCP-FS.h + + + + + + RTE\Other\config.h + + + + + + RTE\wolfSSL\config-Crypt.h + + + + + + + + RTE\wolfSSL\config-CyaSSL.h + + + + + + + + RTE\wolfSSL\config.h + + + + + + + + + +
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c new file mode 100644 index 00000000..76c1d72f --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c @@ -0,0 +1,104 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include + +#include "cmsis_os.h" +#include "rl_fs.h" +#include "rl_net.h" +#include +#include "cyassl_MDK_ARM.h" +#include + +/*----------------------------------------------------------------------------- + * Initialize a Flash Memory Card + *----------------------------------------------------------------------------*/ +static void init_filesystem (void) { + int32_t retv; + + retv = finit ("M0:"); + if (retv == 0) { + retv = fmount ("M0:"); + if (retv == 0) { + printf ("Drive M0 ready!\n"); + } + else { + printf ("Drive M0 mount failed!\n"); + } + } else { + printf ("Drive M0 initialization failed!\n"); + } +} + +/*----------------------------------------------------------------------------- + * TCP/IP tasks + *----------------------------------------------------------------------------*/ +void tcp_poll (void const *arg) +{ + CYASSL_MSG("TCP polling started.\n") ; + while (1) { + net_main (); + osDelay(1) ; + } +} + +typedef struct func_args { + int argc; + char** argv; +} func_args; + +extern void server_test(func_args * args) ; +extern void init_time(void) ; + + osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; +/*----------------------------------------------------------------------------- + * mian entry + *----------------------------------------------------------------------------*/ +int myoptind = 0; +char* myoptarg = NULL; + +int main() +{ + static char *argv[] = { "client", ""} ; + static func_args args = { 2, argv } ; + + init_time() ; + init_filesystem (); + net_initialize() ; + osThreadCreate (osThread (tcp_poll), NULL); + osDelay(10000) ; /* wait for DHCP */ + #if defined(DEBUG_CYASSL) + printf("Turning ON Debug message\n") ; + CyaSSL_Debugging_ON() ; + #endif + + printf("Simple Server: Started\n") ; + while(1) { + server_test(&args) ; + printf("Enter any key to iterate.\n") ; + getchar() ; + } +} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c new file mode 100644 index 00000000..bcb9f047 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c @@ -0,0 +1,560 @@ +/* server.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) + /* in case memory tracker wants stats */ + #define CYASSL_TRACK_MEMORY +#endif + +#if defined(CYASSL_MDK_ARM) + #include + #include + + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include "rtl.h" + #endif + + #include "cyassl_MDK_ARM.h" +#endif + +#include +#include + +#include "examples/server/server.h" + + +#ifdef CYASSL_CALLBACKS + int srvHandShakeCB(HandShakeInfo*); + int srvTimeoutCB(TimeoutInfo*); + Timeval srvTo; +#endif + +static void NonBlockingSSL_Accept(SSL* ssl) +{ +#ifndef CYASSL_CALLBACKS + int ret = SSL_accept(ssl); +#else + int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo); +#endif + int error = SSL_get_error(ssl, 0); + SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); + int select_ret; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... server would read block\n"); + else + printf("... server would write block\n"); + +#ifdef CYASSL_DTLS + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); +#endif + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + #ifndef CYASSL_CALLBACKS + ret = SSL_accept(ssl); + #else + ret = CyaSSL_accept_ex(ssl, + srvHandShakeCB, srvTimeoutCB, srvTo); + #endif + error = SSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } +#ifdef CYASSL_DTLS + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } +#endif + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_accept failed"); +} + + +static void Usage(void) +{ + printf("server " LIBCYASSL_VERSION_STRING + " NOTE: All files relative to CyaSSL home dir\n"); + printf("-? Help, print this usage\n"); + printf("-p Port to listen on, not 0, default %d\n", yasslPort); + printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", + SERVER_DEFAULT_VERSION); + printf("-l Cipher list\n"); + printf("-c Certificate file, default %s\n", svrCert); + printf("-k Key file, default %s\n", svrKey); + printf("-A Certificate Authority file, default %s\n", cliCert); + printf("-d Disable client cert check\n"); + printf("-b Bind to any interface instead of localhost only\n"); + printf("-s Use pre Shared keys\n"); + printf("-t Track CyaSSL memory use\n"); + printf("-u Use UDP DTLS," + " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); + printf("-f Fewer packets/group messages\n"); + printf("-N Use Non-blocking sockets\n"); + printf("-S Use Host Name Indication\n"); +} + +#ifdef CYASSL_MDK_SHELL +#define exit(code) return(code) +#endif + + +THREAD_RETURN CYASSL_THREAD server_test(void* args) +{ + SOCKET_T sockfd = 0; + SOCKET_T clientfd = 0; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + + char msg[] = "I hear you fa shizzle!"; + char input[80]; + int idx; + int ch; + int version = SERVER_DEFAULT_VERSION; + int doCliCertCheck = 1; + int useAnyAddr = 0; + int port = yasslPort; + int usePsk = 0; + int doDTLS = 0; + int useNtruKey = 0; + int nonBlocking = 0; + int trackMemory = 0; + int fewerPackets = 0; + char* cipherList = NULL; + char* verifyCert = (char*)cliCert; + char* ourCert = (char*)svrCert; + char* ourKey = (char*)svrKey; + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + +#ifdef HAVE_SNI + char* sniHostName = NULL; +#endif + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef NO_RSA + verifyCert = (char*)cliEccCert; + ourCert = (char*)eccCert; + ourKey = (char*)eccKey; +#endif + (void)trackMemory; + + while ((ch = mygetopt(argc, argv, "?dbstnNufp:v:l:A:c:k:S:")) != -1) { + switch (ch) { + case '?' : + Usage(); + exit(EXIT_SUCCESS); + + case 'd' : + doCliCertCheck = 0; + break; + + case 'b' : + useAnyAddr = 1; + break; + + case 's' : + usePsk = 1; + break; + + case 't' : + #ifdef USE_CYASSL_MEMORY + trackMemory = 1; + #endif + break; + + case 'n' : + useNtruKey = 1; + break; + + case 'u' : + doDTLS = 1; + break; + + case 'f' : + fewerPackets = 1; + break; + + case 'p' : + port = atoi(myoptarg); + #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) + if (port == 0) + err_sys("port number cannot be 0"); + #endif + break; + + case 'v' : + version = atoi(myoptarg); + if (version < 0 || version > 3) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'l' : + cipherList = myoptarg; + break; + + case 'A' : + verifyCert = myoptarg; + break; + + case 'c' : + ourCert = myoptarg; + break; + + case 'k' : + ourKey = myoptarg; + break; + + case 'N': + nonBlocking = 1; + break; + + case 'S' : + #ifdef HAVE_SNI + sniHostName = myoptarg; + #endif + break; + + default: + Usage(); + exit(MY_EX_USAGE); + } + } + + myoptind = 0; /* reset for test cases */ + + /* sort out DTLS versus TLS versions */ + if (version == CLIENT_INVALID_VERSION) { + if (doDTLS) + version = CLIENT_DTLS_DEFAULT_VERSION; + else + version = CLIENT_DEFAULT_VERSION; + } + else { + if (doDTLS) { + if (version == 3) + version = -2; + else + version = -1; + } + } + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + InitMemoryTracker(); +#endif + + switch (version) { +#ifndef NO_OLD_TLS + case 0: + method = SSLv3_server_method(); + break; + + #ifndef NO_TLS + case 1: + method = TLSv1_server_method(); + break; + + + case 2: + method = TLSv1_1_server_method(); + break; + + #endif +#endif + +#ifndef NO_TLS + case 3: + method = TLSv1_2_server_method(); + break; +#endif + +#ifdef CYASSL_DTLS + case -1: + method = DTLSv1_server_method(); + break; + + case -2: + method = DTLSv1_2_server_method(); + break; +#endif + + default: + err_sys("Bad SSL version"); + } + + if (method == NULL) + err_sys("unable to get method"); + + ctx = SSL_CTX_new(method); + if (ctx == NULL) + err_sys("unable to get ctx"); + + if (cipherList) + if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 1"); + +#ifdef CYASSL_LEANPSK + usePsk = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + usePsk = 1; +#endif + + if (fewerPackets) + CyaSSL_CTX_set_group_messages(ctx); + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (!usePsk) { + if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, check file and run from" + " CyaSSL home dir"); + } +#endif + +#ifdef HAVE_NTRU + if (useNtruKey) { + if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey) + != SSL_SUCCESS) + err_sys("can't load ntru key file, " + "Please run from CyaSSL home dir"); + } +#endif + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (!useNtruKey && !usePsk) { + if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, check file and run from" + " CyaSSL home dir"); + } +#endif + + if (usePsk) { +#ifndef NO_PSK + SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + SSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + if (cipherList == NULL) { + const char *defaultCipherList; + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 2"); + } +#endif + } + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + /* if not using PSK, verify peer with certs */ + if (doCliCertCheck && usePsk == 0) { + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | + SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0); + if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + } +#endif + +#ifdef OPENSSL_EXTRA + SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + if (cipherList == NULL) { + if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) + err_sys("server can't set cipher list 3"); + } +#endif + +#ifdef HAVE_SNI + if (sniHostName) { + if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName, + XSTRLEN(sniHostName)) != SSL_SUCCESS) + err_sys("UseSNI failed"); + else + CyaSSL_CTX_SNI_SetOptions(ctx, CYASSL_SNI_HOST_NAME, + CYASSL_SNI_ABORT_ON_MISMATCH); + } +#endif + + ssl = SSL_new(ctx); + if (ssl == NULL) + err_sys("unable to get SSL"); + CyaSSL_set_quiet_shutdown(ssl, 1) ; +#ifdef HAVE_CRL + CyaSSL_EnableCRL(ssl, 0); + CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR | + CYASSL_CRL_START_MON); + CyaSSL_SetCRL_Cb(ssl, CRL_CallBack); +#endif + osDelay(5000) ; + tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS); + if (!doDTLS) + CloseSocket(sockfd); + + SSL_set_fd(ssl, clientfd); + if (usePsk == 0) { + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #elif !defined(NO_CERTS) + SetDH(ssl); /* repick suites with DHE, higher priority than PSK */ + #endif + } + osDelay(5000) ; +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&clientfd); + NonBlockingSSL_Accept(ssl); + } else if (SSL_accept(ssl) != SSL_SUCCESS) { + int err = SSL_get_error(ssl, 0); + char buffer[80]; + printf("error = %d, %s\n", err, ERR_error_string(err, buffer)); + err_sys("SSL_accept failed"); + } +#else + NonBlockingSSL_Accept(ssl); +#endif + showPeer(ssl); + osDelay(5000) ; + idx = SSL_read(ssl, input, sizeof(input)-1); + if (idx > 0) { + input[idx] = 0; + printf("Client message: %s\n", input); + + } + else if (idx < 0) { + int readErr = SSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) + err_sys("SSL_write failed"); + + SSL_shutdown(ssl); + SSL_free(ssl); + SSL_CTX_free(ctx); + + CloseSocket(clientfd); + ((func_args*)args)->return_code = 0; + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + ShowMemoryTracker(); +#endif /* USE_CYASSL_MEMORY */ + + return 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + if (CurrentDir("server") || CurrentDir("build")) + ChangeDirBack(2); + +#ifdef HAVE_STACK_SIZE + StackSizeCheck(&args, server_test); +#else + server_test(&args); +#endif + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + + int myoptind = 0; + char* myoptarg = NULL; + +#endif /* NO_MAIN_DRIVER */ + + +#ifdef CYASSL_CALLBACKS + + int srvHandShakeCB(HandShakeInfo* info) + { + (void)info; + return 0; + } + + + int srvTimeoutCB(TimeoutInfo* info) + { + (void)info; + return 0; + } + +#endif + diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c new file mode 100644 index 00000000..e2912d19 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c @@ -0,0 +1,299 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include "time.h" + +#define PERIPH_BASE ((uint32_t)0x40000000) +/*----------------------------------------------------------------------------- + * initialize RTC + *----------------------------------------------------------------------------*/ +#include "stm32f2xx.h" + +#define assert_param(a) + +#define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F) +#define SYNCHRO_TIMEOUT ((uint32_t) 0x00008000) +#define Bcd2ToByte(v) \ + ((((uint8_t)(v & (uint8_t)0xF0) >> (uint8_t)0x4) * 10) + (v & (uint8_t)0x0F)) +#define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F) +#define RTC_TR_MNT ((uint32_t)0x00007000) +#define RTC_TR_MNU ((uint32_t)0x00000F00) + +#define PWR_OFFSET (PWR_BASE - PERIPH_BASE) +#define CR_OFFSET (PWR_OFFSET + 0x00) +#define DBP_BitNumber 0x08 +#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4)) +#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF) +#define INITMODE_TIMEOUT ((uint32_t) 0x00010000) + +static void init_RTC() +{ + __IO uint32_t initcounter = 0x00 ; + uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */ + ((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ; + + /* Allow access to RTC */ + *(__IO uint32_t *) CR_DBP_BB = ENABLE ; + /* RCC_LSEConfig(RCC_LSE_ON) */ + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); + /* Reset LSEBYP bit */ + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); + *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01); + /* Wait till LSE is ready */ + while((RCC->BDCR << 0x2) == 0x0) { } + /* Select the RTC clock source: RCC_RTCCLKSource_LSE */ + ((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100; + + /* Enable the RTC Clock */ + *(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE; + + *(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE; + RTC->ISR = (uint32_t) RTC_INIT_MASK; + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + + RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); /* Clear RTC CR FMT Bit */ + /* Set RTC_CR register */ + RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */ + + /* Configure the RTC PRER */ + RTC->PRER = 0x7f ; + RTC->PRER |= (uint32_t)(0xff << 16); + + /* Exit Initialization mode */ + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + /* Enable the write protection for RTC registers */ + RTC->WPR = 0xFF; +} + +/*----------------------------------------------------------------------------- + * initialize TIM + *----------------------------------------------------------------------------*/ +#define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001) + +static void init_TIM() +{ + uint16_t tmpcr1 = 0; + + ((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ; + + tmpcr1 = TIM2->CR1 ; + tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) )); + /* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */ + tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */ + TIM2->CR1= tmpcr1 ; + + TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */ + TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */ + TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */ + + *(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ; + /* TIM_Cmd(TIM2, ENABLE) ; */ +} + +void init_time(void) { + init_RTC() ; + init_TIM() ; +} + +static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s) +{ + uint32_t tmpreg = 0; + tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); + *h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16)); + *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8)); + *s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU))); +} + +static uint32_t ByteToBcd2(uint8_t Value) +{ + uint8_t bcdhigh = 0; + while (Value >= 10) { + bcdhigh++; + Value -= 10; + } + return ((uint8_t)(bcdhigh << 4) | Value); +} + +static void SetTime(uint8_t h, uint8_t m, uint8_t s) +{ + __IO uint32_t synchrocounter = 0; + uint32_t synchrostatus = 0x00; + __IO uint32_t initcounter = 0; + uint32_t initstatus = 0x00; + uint32_t tmpreg ; + + tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ; + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + RTC->ISR = (uint32_t)RTC_INIT_MASK; + + /* Wait till RTC is in INIT state and if Time out is reached exit */ + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + + RTC->ISR &= (uint32_t)RTC_RSF_MASK; + /* Wait the registers to be synchronised */ + do { + synchrostatus = RTC->ISR & RTC_ISR_RSF; + synchrocounter++; + } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); + + RTC->WPR = 0xFF; +} + +static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d) +{ + uint32_t tmpreg = 0; + tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK); + *y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16)); + *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8)); + *d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU))); +} + +static void SetDate(uint8_t y, uint8_t m, uint8_t d) +{ + __IO uint32_t synchrocounter = 0; + uint32_t synchrostatus = 0x00; + __IO uint32_t initcounter = 0; + uint32_t initstatus = 0x00; + uint32_t tmpreg = 0 ; + + tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ; + /* Disable the write protection for RTC registers */ + RTC->WPR = 0xCA; + RTC->WPR = 0x53; + RTC->ISR &= (uint32_t)~RTC_ISR_INIT; + + RTC->ISR = (uint32_t)RTC_INIT_MASK; + + /* Wait till RTC is in INIT state and if Time out is reached exit */ + do { + initstatus = RTC->ISR & RTC_ISR_INITF; + initcounter++; + } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); + + RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + + RTC->ISR &= (uint32_t)RTC_RSF_MASK; + /* Wait the registers to be synchronised */ + do { + synchrostatus = RTC->ISR & RTC_ISR_RSF; + synchrocounter++; + } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); + + RTC->WPR = 0xFF; +} + + +#include +void CYASSL_MSG(const char *msg) ; + +struct tm *Cyassl_MDK_gmtime(const time_t *c) +{ + uint8_t h, m, s ; + uint8_t y, mo, d ; + static struct tm date ; + + GetTime(&h, &m, &s) ; + GetDate(&y, &mo, &d) ; + + date.tm_year = y + 100 ; + date.tm_mon = mo - 1 ; + date.tm_mday = d ; + date.tm_hour = h ; + date.tm_min = m ; + date.tm_sec = s ; + + #if defined(DEBUG_CYASSL) + { + char msg[100] ; + sprintf(msg, + "Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n", + d, mo, y+2000, h, m, s) ; + CYASSL_MSG(msg) ; + } + #endif + + return(&date) ; +} + +double current_time() +{ + return ((double)TIM2->CNT/1000000.0) ; +} + +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + +void time_main(void *args) +{ + char * datetime ; + uint8_t h, m, s ; + uint8_t y, mo, d ; + + if( args == NULL || ((func_args *)args)->argc == 1) { + GetTime(&h, &m, &s) ; + GetDate(&y, &mo, &d) ; + printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", + mo, d, y+2000, h, m, s) ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 'd' ) { + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ; + SetDate(y-2000, mo, d) ; + } else if(((func_args *)args)->argc == 3 && + ((func_args *)args)->argv[1][0] == '-' && + ((func_args *)args)->argv[1][1] == 't' ) { + datetime = ((func_args *)args)->argv[2]; + sscanf(datetime, "%d:%d:%d", + (int *)&h, (int *)&m, (int *)&s) ; + SetTime(h, m, s) ; + } else printf("Invalid argument\n") ; +} + + +/******************************************************************* + time() +********************************************************************/ +time_t time(time_t * t) { return 0 ; } diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc b/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc new file mode 100644 index 00000000..b0a7a6b3 --- /dev/null +++ b/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc @@ -0,0 +1,281 @@ + + + + CyaSSL + Light weight SSL/TLS and Crypt Library for Embedded Systems + wolfSSL + http://www.wolfSSL.com/files/ide + cyassl\IDE\MDK5-ARM\Docs\CyaSSL-License.txt + + wolfSSL: SSL/TLS and Crypt Library + CyaSSL: SSL/TLS Library + wolfCrypt: Crypt Library + + + + + Oct/7/2013, Initial release of CyaSSL pack + + + + + CyaSSL + wolfSSL + Security + Crypt + Cipher + SSL + TLS + + + + + + + + The condition is true if the package is used with a Cortex-Mx based device + + + + + + + CMSIS Core with Cortex-M processor + + + + + + CMSIS Core with RTOS for Cortex-M processor + + + + + + File System on Memory Card + + + + + Network UDP/TCP and CORE component + + + + + + + + + + + + + + + + + + + + + + + + wolfSSL: SSL/TLS and Crypt Library + cyassl\IDE\MDK5-ARM\Docs\CyaSSLManual-TableofContents.htm + + CyaSSL, Light weight SSL/TLS library + + + + + + + + + + + + + + + + + + + + wolfCrypt Core, Light weight Crypt/Cipher Library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dummy file for Crypt alone use + + + + + + + + Device depend Timer functions + + + + + + + + + + + + CyaSSL Demo, SSL/TLS Server/Client Examples, Simple test suites, Benchmark + + + + + + + Middleware + Security + SSL + TLS + + + + wolfCrypt Simple Test Suite + + + + + + + Middleware + Security + Crypt + Cipher + + + + wolfCrypt Benchmark Suite + + + + + + + Middleware + Security + Crypt + Cipher + + + + CyaSSL Simple Client Example + + + + + + + Middleware + Security + Crypt + Cipher + + + + CyaSSL Simple Server Example + + + + + + + Middleware + Security + Crypt + Cipher + + + + CyaSSL Echo Client Example + + + + + + + Middleware + Security + Crypt + Cipher + + + + CyaSSL Echo Server Example + + + + + + + Middleware + Security + Crypt + Cipher + + + + diff --git a/project1/cyassl-3.0.0/Makefile b/project1/cyassl-3.0.0/Makefile new file mode 100644 index 00000000..25bf8c0e --- /dev/null +++ b/project1/cyassl-3.0.0/Makefile @@ -0,0 +1,3049 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + + + + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/cyassl +pkgincludedir = $(includedir)/cyassl +pkglibdir = $(libdir)/cyassl +pkglibexecdir = $(libexecdir)/cyassl +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +bin_PROGRAMS = +noinst_PROGRAMS = ctaocrypt/benchmark/benchmark$(EXEEXT) \ + ctaocrypt/test/testctaocrypt$(EXEEXT) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) $(am__EXEEXT_2) +check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +DIST_COMMON = $(srcdir)/cyassl/include.am \ + $(srcdir)/cyassl/ctaocrypt/include.am \ + $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am \ + $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am \ + $(srcdir)/doc/include.am $(srcdir)/swig/include.am \ + $(srcdir)/src/include.am $(srcdir)/support/include.am \ + $(srcdir)/ctaocrypt/benchmark/include.am \ + $(srcdir)/ctaocrypt/src/include.am \ + $(srcdir)/ctaocrypt/test/include.am \ + $(srcdir)/examples/client/include.am \ + $(srcdir)/examples/server/include.am \ + $(srcdir)/examples/echoclient/include.am \ + $(srcdir)/examples/echoserver/include.am \ + $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am \ + $(srcdir)/sslSniffer/sslSnifferTest/include.am \ + $(srcdir)/rpm/include.am \ + $(srcdir)/mqx/ctaocrypt_test/Sources/include.am \ + $(srcdir)/mqx/cyassl/include.am \ + $(srcdir)/mqx/cyassl_client/Sources/include.am \ + $(srcdir)/mqx/util_lib/Sources/include.am \ + $(srcdir)/mplabx/include.am \ + $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am \ + $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am \ + $(srcdir)/mplabx/cyassl.X/nbproject/include.am \ + $(srcdir)/mcapi/include.am \ + $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am \ + $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am \ + $(srcdir)/mcapi/cyassl.X/nbproject/include.am \ + $(srcdir)/mcapi/zlib.X/nbproject/include.am \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.in $(srcdir)/stamp-h.in \ + $(top_srcdir)/cyassl/version.h.in \ + $(top_srcdir)/cyassl/options.h.in \ + $(top_srcdir)/support/cyassl.pc.in $(top_srcdir)/rpm/spec.in \ + $(top_srcdir)/build-aux/depcomp $(dist_doc_DATA) \ + $(dist_example_DATA) $(include_HEADERS) \ + $(nobase_include_HEADERS) $(am__noinst_HEADERS_DIST) \ + $(top_srcdir)/build-aux/test-driver AUTHORS COPYING ChangeLog \ + NEWS README build-aux/compile build-aux/config.guess \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/missing build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing +am__append_1 = ctaocrypt/src/memory.c +am__append_2 = ctaocrypt/src/rsa.c +am__append_3 = ctaocrypt/src/dh.c +am__append_4 = ctaocrypt/src/asn.c +#am__append_5 = ctaocrypt/src/fips.c \ +# ctaocrypt/src/fips_test.c +am__append_6 = ctaocrypt/src/coding.c +am__append_7 = ctaocrypt/src/aes.c +am__append_8 = ctaocrypt/src/des3.c +am__append_9 = ctaocrypt/src/sha.c +am__append_10 = ctaocrypt/src/arc4.c +#am__append_11 = ctaocrypt/src/md4.c +am__append_12 = ctaocrypt/src/md5.c +#am__append_13 = ctaocrypt/src/pwdbased.c +#am__append_14 = ctaocrypt/src/dsa.c +#am__append_15 = ctaocrypt/src/aes_asm.s +#am__append_16 = ctaocrypt/src/camellia.c +#am__append_17 = ctaocrypt/src/md2.c +#am__append_18 = ctaocrypt/src/ripemd.c +#am__append_19 = ctaocrypt/src/sha512.c +#am__append_20 = ctaocrypt/src/blake2b.c +#am__append_21 = src/sniffer.c +#am__append_22 = ctaocrypt/src/hc128.c +#am__append_23 = ctaocrypt/src/rabbit.c +#am__append_24 = ctaocrypt/src/misc.c +#am__append_25 = ctaocrypt/src/tfm.c +am__append_26 = ctaocrypt/src/integer.c +#am__append_27 = ctaocrypt/src/ecc.c +#am__append_28 = src/ocsp.c +#am__append_29 = src/crl.c +#am__append_30 = ctaocrypt/src/compress.c +#am__append_31 = ctaocrypt/src/pkcs7.c +am__append_32 = examples/client/client \ + examples/server/server \ + examples/echoclient/echoclient \ + examples/echoserver/echoserver \ + testsuite/testsuite.test tests/unit.test +am__append_33 = examples/client/client.h \ + examples/server/server.h \ + examples/echoclient/echoclient.h \ + examples/echoserver/echoserver.h +am__append_34 = testsuite/testsuite.test \ + tests/unit.test +#am__append_35 = sslSniffer/sslSnifferTest/snifftest +#am__append_36 = mcapi/test +#am__append_37 = mcapi/test +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \ + $(top_srcdir)/m4/ax_am_jobserver.m4 \ + $(top_srcdir)/m4/ax_am_macros.m4 \ + $(top_srcdir)/m4/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4/ax_append_flag.m4 \ + $(top_srcdir)/m4/ax_append_to_file.m4 \ + $(top_srcdir)/m4/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4/ax_check_link_flag.m4 \ + $(top_srcdir)/m4/ax_count_cpus.m4 \ + $(top_srcdir)/m4/ax_create_generic_config.m4 \ + $(top_srcdir)/m4/ax_debug.m4 \ + $(top_srcdir)/m4/ax_file_escapes.m4 \ + $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \ + $(top_srcdir)/m4/ax_print_to_file.m4 \ + $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/ax_vcs_checkout.m4 \ + $(top_srcdir)/m4/hexversion.m4 \ + $(top_srcdir)/m4/lib_socket_nsl.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/visibility.m4 \ + $(top_srcdir)/m4/wolfssl_darwin_clang.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = stamp-h cyassl/version.h cyassl/options.h \ + support/cyassl.pc rpm/spec +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +src_libcyassl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__src_libcyassl_la_SOURCES_DIST = src/internal.c src/io.c src/keys.c \ + src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ + ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ + ctaocrypt/src/logging.c ctaocrypt/src/port.c \ + ctaocrypt/src/error.c ctaocrypt/src/memory.c \ + ctaocrypt/src/rsa.c ctaocrypt/src/dh.c ctaocrypt/src/asn.c \ + ctaocrypt/src/fips.c ctaocrypt/src/fips_test.c \ + ctaocrypt/src/coding.c ctaocrypt/src/aes.c \ + ctaocrypt/src/des3.c ctaocrypt/src/sha.c ctaocrypt/src/arc4.c \ + ctaocrypt/src/md4.c ctaocrypt/src/md5.c \ + ctaocrypt/src/pwdbased.c ctaocrypt/src/dsa.c \ + ctaocrypt/src/aes_asm.s ctaocrypt/src/camellia.c \ + ctaocrypt/src/md2.c ctaocrypt/src/ripemd.c \ + ctaocrypt/src/sha512.c ctaocrypt/src/blake2b.c src/sniffer.c \ + ctaocrypt/src/hc128.c ctaocrypt/src/rabbit.c \ + ctaocrypt/src/misc.c ctaocrypt/src/tfm.c \ + ctaocrypt/src/integer.c ctaocrypt/src/ecc.c src/ocsp.c \ + src/crl.c ctaocrypt/src/compress.c ctaocrypt/src/pkcs7.c +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = \ + ctaocrypt/src/src_libcyassl_la-memory.lo +am__objects_2 = ctaocrypt/src/src_libcyassl_la-rsa.lo +am__objects_3 = ctaocrypt/src/src_libcyassl_la-dh.lo +am__objects_4 = ctaocrypt/src/src_libcyassl_la-asn.lo +#am__objects_5 = \ +# ctaocrypt/src/src_libcyassl_la-fips.lo \ +# ctaocrypt/src/src_libcyassl_la-fips_test.lo +am__objects_6 = \ + ctaocrypt/src/src_libcyassl_la-coding.lo +am__objects_7 = ctaocrypt/src/src_libcyassl_la-aes.lo +am__objects_8 = \ + ctaocrypt/src/src_libcyassl_la-des3.lo +am__objects_9 = ctaocrypt/src/src_libcyassl_la-sha.lo +am__objects_10 = \ + ctaocrypt/src/src_libcyassl_la-arc4.lo +#am__objects_11 = \ +# ctaocrypt/src/src_libcyassl_la-md4.lo +am__objects_12 = \ + ctaocrypt/src/src_libcyassl_la-md5.lo +#am__objects_13 = ctaocrypt/src/src_libcyassl_la-pwdbased.lo +#am__objects_14 = \ +# ctaocrypt/src/src_libcyassl_la-dsa.lo +#am__objects_15 = ctaocrypt/src/aes_asm.lo +#am__objects_16 = ctaocrypt/src/src_libcyassl_la-camellia.lo +#am__objects_17 = \ +# ctaocrypt/src/src_libcyassl_la-md2.lo +#am__objects_18 = \ +# ctaocrypt/src/src_libcyassl_la-ripemd.lo +#am__objects_19 = \ +# ctaocrypt/src/src_libcyassl_la-sha512.lo +#am__objects_20 = \ +# ctaocrypt/src/src_libcyassl_la-blake2b.lo +#am__objects_21 = src/src_libcyassl_la-sniffer.lo +#am__objects_22 = \ +# ctaocrypt/src/src_libcyassl_la-hc128.lo +#am__objects_23 = \ +# ctaocrypt/src/src_libcyassl_la-rabbit.lo +#am__objects_24 = \ +# ctaocrypt/src/src_libcyassl_la-misc.lo +#am__objects_25 = \ +# ctaocrypt/src/src_libcyassl_la-tfm.lo +am__objects_26 = ctaocrypt/src/src_libcyassl_la-integer.lo +#am__objects_27 = \ +# ctaocrypt/src/src_libcyassl_la-ecc.lo +#am__objects_28 = src/src_libcyassl_la-ocsp.lo +#am__objects_29 = src/src_libcyassl_la-crl.lo +#am__objects_30 = \ +# ctaocrypt/src/src_libcyassl_la-compress.lo +#am__objects_31 = \ +# ctaocrypt/src/src_libcyassl_la-pkcs7.lo +am_src_libcyassl_la_OBJECTS = src/src_libcyassl_la-internal.lo \ + src/src_libcyassl_la-io.lo src/src_libcyassl_la-keys.lo \ + src/src_libcyassl_la-ssl.lo src/src_libcyassl_la-tls.lo \ + ctaocrypt/src/src_libcyassl_la-hmac.lo \ + ctaocrypt/src/src_libcyassl_la-random.lo \ + ctaocrypt/src/src_libcyassl_la-sha256.lo \ + ctaocrypt/src/src_libcyassl_la-logging.lo \ + ctaocrypt/src/src_libcyassl_la-port.lo \ + ctaocrypt/src/src_libcyassl_la-error.lo $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) $(am__objects_13) \ + $(am__objects_14) $(am__objects_15) $(am__objects_16) \ + $(am__objects_17) $(am__objects_18) $(am__objects_19) \ + $(am__objects_20) $(am__objects_21) $(am__objects_22) \ + $(am__objects_23) $(am__objects_24) $(am__objects_25) \ + $(am__objects_26) $(am__objects_27) $(am__objects_28) \ + $(am__objects_29) $(am__objects_30) $(am__objects_31) +src_libcyassl_la_OBJECTS = $(am_src_libcyassl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +src_libcyassl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(src_libcyassl_la_CFLAGS) $(CFLAGS) \ + $(src_libcyassl_la_LDFLAGS) $(LDFLAGS) -o $@ +am__EXEEXT_1 = testsuite/testsuite.test$(EXEEXT) \ + tests/unit.test$(EXEEXT) +#am__EXEEXT_2 = mcapi/test$(EXEEXT) +am__EXEEXT_3 = examples/client/client$(EXEEXT) \ + examples/server/server$(EXEEXT) \ + examples/echoclient/echoclient$(EXEEXT) \ + examples/echoserver/echoserver$(EXEEXT) \ + testsuite/testsuite.test$(EXEEXT) \ + tests/unit.test$(EXEEXT) +#am__EXEEXT_4 = sslSniffer/sslSnifferTest/snifftest$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_ctaocrypt_benchmark_benchmark_OBJECTS = \ + ctaocrypt/benchmark/benchmark.$(OBJEXT) +ctaocrypt_benchmark_benchmark_OBJECTS = \ + $(am_ctaocrypt_benchmark_benchmark_OBJECTS) +am_ctaocrypt_test_testctaocrypt_OBJECTS = \ + ctaocrypt/test/test.$(OBJEXT) +ctaocrypt_test_testctaocrypt_OBJECTS = \ + $(am_ctaocrypt_test_testctaocrypt_OBJECTS) +am__examples_client_client_SOURCES_DIST = examples/client/client.c +am_examples_client_client_OBJECTS = \ + examples/client/client.$(OBJEXT) +examples_client_client_OBJECTS = $(am_examples_client_client_OBJECTS) +am__examples_echoclient_echoclient_SOURCES_DIST = \ + examples/echoclient/echoclient.c +am_examples_echoclient_echoclient_OBJECTS = \ + examples/echoclient/echoclient.$(OBJEXT) +examples_echoclient_echoclient_OBJECTS = \ + $(am_examples_echoclient_echoclient_OBJECTS) +am__examples_echoserver_echoserver_SOURCES_DIST = \ + examples/echoserver/echoserver.c +am_examples_echoserver_echoserver_OBJECTS = \ + examples/echoserver/echoserver.$(OBJEXT) +examples_echoserver_echoserver_OBJECTS = \ + $(am_examples_echoserver_echoserver_OBJECTS) +am__examples_server_server_SOURCES_DIST = examples/server/server.c +am_examples_server_server_OBJECTS = \ + examples/server/server.$(OBJEXT) +examples_server_server_OBJECTS = $(am_examples_server_server_OBJECTS) +am__mcapi_test_SOURCES_DIST = mcapi/crypto.c mcapi/mcapi_test.c +#am_mcapi_test_OBJECTS = mcapi/crypto.$(OBJEXT) \ +# mcapi/mcapi_test.$(OBJEXT) +mcapi_test_OBJECTS = $(am_mcapi_test_OBJECTS) +am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST = \ + sslSniffer/sslSnifferTest/snifftest.c +#am_sslSniffer_sslSnifferTest_snifftest_OBJECTS = sslSniffer/sslSnifferTest/snifftest.$(OBJEXT) +sslSniffer_sslSnifferTest_snifftest_OBJECTS = \ + $(am_sslSniffer_sslSnifferTest_snifftest_OBJECTS) +am__tests_unit_test_SOURCES_DIST = tests/unit.c tests/api.c \ + tests/suites.c tests/hash.c examples/client/client.c \ + examples/server/server.c +am_tests_unit_test_OBJECTS = \ + tests/tests_unit_test-unit.$(OBJEXT) \ + tests/tests_unit_test-api.$(OBJEXT) \ + tests/tests_unit_test-suites.$(OBJEXT) \ + tests/tests_unit_test-hash.$(OBJEXT) \ + examples/client/tests_unit_test-client.$(OBJEXT) \ + examples/server/tests_unit_test-server.$(OBJEXT) +tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS) +tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_unit_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__testsuite_testsuite_test_SOURCES_DIST = ctaocrypt/test/test.c \ + examples/client/client.c examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c examples/server/server.c \ + testsuite/testsuite.c +am_testsuite_testsuite_test_OBJECTS = ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT) \ + examples/client/testsuite_testsuite_test-client.$(OBJEXT) \ + examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT) \ + examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT) \ + examples/server/testsuite_testsuite_test-server.$(OBJEXT) \ + testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT) +testsuite_testsuite_test_OBJECTS = \ + $(am_testsuite_testsuite_test_OBJECTS) +testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ + $(CCASFLAGS) +AM_V_CCAS = $(am__v_CCAS_$(V)) +am__v_CCAS_ = $(am__v_CCAS_$(AM_DEFAULT_VERBOSITY)) +am__v_CCAS_0 = @echo " CCAS " $@; +am__v_CCAS_1 = +SOURCES = $(src_libcyassl_la_SOURCES) \ + $(ctaocrypt_benchmark_benchmark_SOURCES) \ + $(ctaocrypt_test_testctaocrypt_SOURCES) \ + $(examples_client_client_SOURCES) \ + $(examples_echoclient_echoclient_SOURCES) \ + $(examples_echoserver_echoserver_SOURCES) \ + $(examples_server_server_SOURCES) $(mcapi_test_SOURCES) \ + $(sslSniffer_sslSnifferTest_snifftest_SOURCES) \ + $(tests_unit_test_SOURCES) $(testsuite_testsuite_test_SOURCES) +DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \ + $(ctaocrypt_benchmark_benchmark_SOURCES) \ + $(ctaocrypt_test_testctaocrypt_SOURCES) \ + $(am__examples_client_client_SOURCES_DIST) \ + $(am__examples_echoclient_echoclient_SOURCES_DIST) \ + $(am__examples_echoserver_echoserver_SOURCES_DIST) \ + $(am__examples_server_server_SOURCES_DIST) \ + $(am__mcapi_test_SOURCES_DIST) \ + $(am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST) \ + $(am__tests_unit_test_SOURCES_DIST) \ + $(am__testsuite_testsuite_test_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA) +am__noinst_HEADERS_DIST = cyassl/internal.h ctaocrypt/test/test.h \ + examples/client/client.h examples/server/server.h \ + examples/echoclient/echoclient.h \ + examples/echoserver/echoserver.h mcapi/crypto.h +HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ + $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope check recheck +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14 +AMINCLUDE = aminclude.am +AMTAR = $${TAR-tar} +AM_CFLAGS = -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer +AM_CPPFLAGS = -fvisibility=hidden +AM_DEFAULT_VERBOSITY = 0 +AM_LDFLAGS = +AR = ar +AUTOCONF = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf +AUTOHEADER = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader +AUTOMAKE = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14 +AWK = mawk +CC = clang +CCAS = clang +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = -g -O2 +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE +CFLAG_VISIBILITY = -fvisibility=hidden +CPP = clang -E +CPPFLAGS = -fvisibility=hidden +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYASSL_LIBRARY_VERSION = 5:5:0 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GENERIC_CONFIG = cyassl-config +GREP = /bin/grep +HAVE_OPENSSL_CMD = +HAVE_VALGRIND = +HAVE_VISIBILITY = 1 +HEX_VERSION = 0x03000000 +INC_AMINCLUDE = include $(top_builddir)/aminclude.am +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBM = -lm +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo +MANIFEST_TOOL = : +MCHECK = +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = cyassl +PACKAGE_BUGREPORT = https://github.com/cyassl/cyassl/issues +PACKAGE_NAME = cyassl +PACKAGE_STRING = cyassl 3.0.0 +PACKAGE_TARNAME = cyassl +PACKAGE_URL = http://www.wolfssl.com +PACKAGE_VERSION = 3.0.0 +PATH_SEPARATOR = : +PTHREAD_CC = clang +PTHREAD_CFLAGS = -pthread +PTHREAD_LIBS = +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 3.0.0 +abs_builddir = /home/khimes/work/project1/cyassl-3.0.0 +abs_srcdir = /home/khimes/work/project1/cyassl-3.0.0 +abs_top_builddir = /home/khimes/work/project1/cyassl-3.0.0 +abs_top_srcdir = /home/khimes/work/project1/cyassl-3.0.0 +ac_ct_AR = ar +ac_ct_CC = clang +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +ax_pthread_config = +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . + +# includes append to these: +SUFFIXES = +TESTS = $(check_PROGRAMS) +CLEANFILES = +DISTCLEANFILES = aminclude.am ctaocrypt/benchmark/.libs/benchmark \ + ctaocrypt/test/.libs/testctaocrypt \ + examples/client/.libs/client examples/server/.libs/server \ + examples/echoclient/.libs/echoclient \ + examples/echoserver/.libs/echoserver \ + testsuite/.libs/testsuite.test tests/.libs/unit.test \ + sslSniffer/sslSnifferTest/.libs/snifftest cyassl-config +noinst_HEADERS = cyassl/internal.h ctaocrypt/test/test.h \ + $(am__append_33) mcapi/crypto.h +lib_LTLIBRARIES = src/libcyassl.la +man_MANS = +noinst_LTLIBRARIES = +include_HEADERS = +nobase_include_HEADERS = cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/camellia.h \ + cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/compress.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/dh.h \ + cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/ecc.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/fips_test.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/md2.h \ + cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/md5.h \ + cyassl/ctaocrypt/misc.h cyassl/ctaocrypt/pkcs7.h \ + cyassl/ctaocrypt/port.h cyassl/ctaocrypt/pwdbased.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/blake2.h cyassl/ctaocrypt/blake2-int.h \ + cyassl/ctaocrypt/blake2-impl.h cyassl/ctaocrypt/tfm.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/memory.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/openssl/asn1.h cyassl/openssl/bio.h cyassl/openssl/bn.h \ + cyassl/openssl/conf.h cyassl/openssl/crypto.h \ + cyassl/openssl/des.h cyassl/openssl/dh.h cyassl/openssl/dsa.h \ + cyassl/openssl/ecdsa.h cyassl/openssl/ec.h \ + cyassl/openssl/engine.h cyassl/openssl/err.h \ + cyassl/openssl/evp.h cyassl/openssl/hmac.h \ + cyassl/openssl/lhash.h cyassl/openssl/md4.h \ + cyassl/openssl/md5.h cyassl/openssl/ripemd.h \ + cyassl/openssl/ocsp.h cyassl/openssl/opensslconf.h \ + cyassl/openssl/opensslv.h cyassl/openssl/ossl_typ.h \ + cyassl/openssl/pem.h cyassl/openssl/pkcs12.h \ + cyassl/openssl/rand.h cyassl/openssl/rsa.h \ + cyassl/openssl/sha.h cyassl/openssl/ssl.h \ + cyassl/openssl/stack.h cyassl/openssl/ui.h \ + cyassl/openssl/x509.h cyassl/openssl/x509v3.h \ + cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \ + cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \ + cyassl/test.h cyassl/version.h cyassl/options.h cyassl/ocsp.h \ + cyassl/crl.h +EXTRA_HEADERS = +BUILT_SOURCES = +EXTRA_DIST = lib/dummy cyassl-ntru.vcproj cyassl.vcproj \ + cyassl-iphone.xcodeproj/project.pbxproj \ + cyassl-ios.xcodeproj/project.pbxproj cyassl-ntru.sln \ + cyassl.sln valgrind-error.sh gencertbuf.pl IDE \ + cyassl/sniffer_error.rc certs/ca-cert.pem certs/ca-key.pem \ + certs/client-cert.pem certs/client-keyEnc.pem \ + certs/client-key.pem certs/ecc-key.pem certs/ecc-keyPkcs8.pem \ + certs/ecc-client-key.pem certs/client-ecc-cert.pem \ + certs/ntru-cert.pem certs/dh2048.pem certs/server-cert.pem \ + certs/server-ecc.pem certs/server-ecc-rsa.pem \ + certs/server-keyEnc.pem certs/server-key.pem \ + certs/server-keyPkcs8Enc12.pem certs/server-keyPkcs8Enc2.pem \ + certs/server-keyPkcs8Enc.pem certs/server-keyPkcs8.pem \ + certs/ca-key.der certs/client-cert.der certs/client-key.der \ + certs/dh2048.der certs/rsa2048.der certs/dsa2048.der \ + certs/ecc-key.der certs/ntru-key.raw \ + certs/1024/client-cert.pem certs/1024/client-key.pem \ + certs/1024/dh1024.pem certs/1024/dsa1024.pem \ + certs/1024/client-cert.der certs/1024/client-key.der \ + certs/1024/dh1024.der certs/1024/dsa1024.der \ + certs/1024/rsa1024.der certs/crl/crl.pem certs/crl/cliCrl.pem \ + certs/crl/eccSrvCRL.pem certs/crl/eccCliCRL.pem \ + certs/crl/crl.revoked swig/PythonBuild.sh swig/README \ + swig/cyassl.i swig/cyassl_adds.c swig/python_cyassl.vcproj \ + swig/rsasign.py swig/runme.py support/cyassl.pc \ + ctaocrypt/benchmark/benchmark.sln \ + ctaocrypt/benchmark/benchmark.vcproj ctaocrypt/src/misc.c \ + ctaocrypt/src/asm.c ctaocrypt/src/ecc_fp.c \ + ctaocrypt/src/fp_mont_small.i ctaocrypt/src/fp_mul_comba_12.i \ + ctaocrypt/src/fp_mul_comba_17.i \ + ctaocrypt/src/fp_mul_comba_20.i \ + ctaocrypt/src/fp_mul_comba_24.i \ + ctaocrypt/src/fp_mul_comba_28.i \ + ctaocrypt/src/fp_mul_comba_32.i ctaocrypt/src/fp_mul_comba_3.i \ + ctaocrypt/src/fp_mul_comba_48.i ctaocrypt/src/fp_mul_comba_4.i \ + ctaocrypt/src/fp_mul_comba_64.i ctaocrypt/src/fp_mul_comba_6.i \ + ctaocrypt/src/fp_mul_comba_7.i ctaocrypt/src/fp_mul_comba_8.i \ + ctaocrypt/src/fp_mul_comba_9.i \ + ctaocrypt/src/fp_mul_comba_small_set.i \ + ctaocrypt/src/fp_sqr_comba_12.i \ + ctaocrypt/src/fp_sqr_comba_17.i \ + ctaocrypt/src/fp_sqr_comba_20.i \ + ctaocrypt/src/fp_sqr_comba_24.i \ + ctaocrypt/src/fp_sqr_comba_28.i \ + ctaocrypt/src/fp_sqr_comba_32.i ctaocrypt/src/fp_sqr_comba_3.i \ + ctaocrypt/src/fp_sqr_comba_48.i ctaocrypt/src/fp_sqr_comba_4.i \ + ctaocrypt/src/fp_sqr_comba_64.i ctaocrypt/src/fp_sqr_comba_6.i \ + ctaocrypt/src/fp_sqr_comba_7.i ctaocrypt/src/fp_sqr_comba_8.i \ + ctaocrypt/src/fp_sqr_comba_9.i \ + ctaocrypt/src/fp_sqr_comba_small_set.i ctaocrypt/test/test.sln \ + ctaocrypt/test/test.vcproj examples/client/client.sln \ + examples/client/client-ntru.vcproj \ + examples/client/client.vcproj examples/server/server.sln \ + examples/server/server-ntru.vcproj \ + examples/server/server.vcproj \ + examples/echoclient/echoclient.sln \ + examples/echoclient/echoclient-ntru.vcproj \ + examples/echoclient/echoclient.vcproj \ + examples/echoserver/echoserver.sln \ + examples/echoserver/echoserver-ntru.vcproj \ + examples/echoserver/echoserver.vcproj testsuite/testsuite.sln \ + testsuite/testsuite-ntru.vcproj testsuite/testsuite.vcproj \ + input quit tests/unit.h tests/test.conf tests/test-dtls.conf \ + sslSniffer/sslSniffer.vcproj \ + sslSniffer/sslSnifferTest/sslSniffTest.vcproj \ + mqx/ctaocrypt_test/.cproject mqx/ctaocrypt_test/.project \ + mqx/ctaocrypt_test/ReferencedRSESystems.xml \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ + mqx/ctaocrypt_test/Sources/main.c \ + mqx/ctaocrypt_test/Sources/main.h mqx/README \ + mqx/cyassl/.cproject mqx/cyassl/.project \ + mqx/cyassl_client/.cproject mqx/cyassl_client/.project \ + mqx/cyassl_client/ReferencedRSESystems.xml \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ + mqx/cyassl_client/Sources/main.c \ + mqx/cyassl_client/Sources/main.h mqx/util_lib/.cproject \ + mqx/util_lib/.project mqx/util_lib/Sources/util.c \ + mqx/util_lib/Sources/util.h mplabx/PIC32MZ-serial.h \ + mplabx/README mplabx/benchmark_main.c mplabx/test_main.c \ + mplabx/ctaocrypt_benchmark.X/Makefile \ + mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_benchmark.X/nbproject/project.xml \ + mplabx/ctaocrypt_test.X/Makefile \ + mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_test.X/nbproject/project.xml \ + mplabx/cyassl.X/Makefile \ + mplabx/cyassl.X/nbproject/configurations.xml \ + mplabx/cyassl.X/nbproject/project.xml mcapi/README \ + mcapi/PIC32MZ-serial.h mcapi/ctaocrypt_mcapi.X/Makefile \ + mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_mcapi.X/nbproject/project.xml \ + mcapi/ctaocrypt_test.X/Makefile \ + mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_test.X/nbproject/project.xml \ + mcapi/cyassl.X/Makefile \ + mcapi/cyassl.X/nbproject/configurations.xml \ + mcapi/cyassl.X/nbproject/project.xml mcapi/zlib.X/Makefile \ + mcapi/zlib.X/nbproject/configurations.xml \ + mcapi/zlib.X/nbproject/project.xml +dist_doc_DATA = certs/taoCert.txt doc/README.txt +exampledir = $(docdir)/example +dist_example_DATA = examples/client/client.c examples/server/server.c \ + examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c +ACLOCAL_AMFLAGS = -I m4 +src_libcyassl_la_SOURCES = src/internal.c src/io.c src/keys.c \ + src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ + ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ + ctaocrypt/src/logging.c ctaocrypt/src/port.c \ + ctaocrypt/src/error.c $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_14) \ + $(am__append_15) $(am__append_16) $(am__append_17) \ + $(am__append_18) $(am__append_19) $(am__append_20) \ + $(am__append_21) $(am__append_22) $(am__append_23) \ + $(am__append_24) $(am__append_25) $(am__append_26) \ + $(am__append_27) $(am__append_28) $(am__append_29) \ + $(am__append_30) $(am__append_31) +src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} +src_libcyassl_la_LIBADD = $(LIBM) +src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) +src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = support/cyassl.pc +ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c +ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la +ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la +ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c +ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la +ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la +examples_client_client_SOURCES = examples/client/client.c +examples_client_client_LDADD = src/libcyassl.la +examples_client_client_DEPENDENCIES = src/libcyassl.la +examples_server_server_SOURCES = examples/server/server.c +examples_server_server_LDADD = src/libcyassl.la +examples_server_server_DEPENDENCIES = src/libcyassl.la +examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c +examples_echoclient_echoclient_LDADD = src/libcyassl.la +examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la +examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c +examples_echoserver_echoserver_LDADD = src/libcyassl.la +examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la +testsuite_testsuite_test_SOURCES = \ + ctaocrypt/test/test.c \ + examples/client/client.c \ + examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c \ + examples/server/server.c \ + testsuite/testsuite.c + +testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +testsuite_testsuite_test_LDADD = src/libcyassl.la +testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la +tests_unit_test_SOURCES = \ + tests/unit.c \ + tests/api.c \ + tests/suites.c \ + tests/hash.c \ + examples/client/client.c \ + examples/server/server.c + +tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +tests_unit_test_LDADD = src/libcyassl.la +tests_unit_test_DEPENDENCIES = src/libcyassl.la +#sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c +#sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap +#sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la +#mcapi_test_SOURCES = mcapi/crypto.c \ +# mcapi/mcapi_test.c + +#mcapi_test_LDADD = src/libcyassl.la +#mcapi_test_DEPENDENCIES = src/libcyassl.la +#TESTS_ENVIRONMENT = ./valgrind-error.sh +TEST_EXTENSIONS = .test +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .s .test .test$(EXEEXT) .trs +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +stamp-h: $(top_builddir)/config.status $(srcdir)/stamp-h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +cyassl/version.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +cyassl/options.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/options.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +support/cyassl.pc: $(top_builddir)/config.status $(top_srcdir)/support/cyassl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +rpm/spec: $(top_builddir)/config.status $(top_srcdir)/rpm/spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/$(am__dirstamp): + @$(MKDIR_P) src + @: > src/$(am__dirstamp) +src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/$(DEPDIR) + @: > src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-internal.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-io.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-keys.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-ssl.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-tls.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/src + @: > ctaocrypt/src/$(am__dirstamp) +ctaocrypt/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/src/$(DEPDIR) + @: > ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-random.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha256.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-logging.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-error.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-memory.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-fips_test.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-coding.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-pwdbased.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/aes_asm.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-camellia.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-ripemd.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha512.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-blake2b.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-sniffer.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-hc128.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-rabbit.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-integer.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-ocsp.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-crl.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-compress.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-pkcs7.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) + +src/libcyassl.la: $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_DEPENDENCIES) $(EXTRA_src_libcyassl_la_DEPENDENCIES) src/$(am__dirstamp) + $(AM_V_CCLD)$(src_libcyassl_la_LINK) -rpath $(libdir) $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ctaocrypt/benchmark/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/benchmark + @: > ctaocrypt/benchmark/$(am__dirstamp) +ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/benchmark/$(DEPDIR) + @: > ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/benchmark/benchmark.$(OBJEXT): \ + ctaocrypt/benchmark/$(am__dirstamp) \ + ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) + +ctaocrypt/benchmark/benchmark$(EXEEXT): $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_DEPENDENCIES) $(EXTRA_ctaocrypt_benchmark_benchmark_DEPENDENCIES) ctaocrypt/benchmark/$(am__dirstamp) + @rm -f ctaocrypt/benchmark/benchmark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_LDADD) $(LIBS) +ctaocrypt/test/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/test + @: > ctaocrypt/test/$(am__dirstamp) +ctaocrypt/test/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/test/$(DEPDIR) + @: > ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/test/test.$(OBJEXT): ctaocrypt/test/$(am__dirstamp) \ + ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) + +ctaocrypt/test/testctaocrypt$(EXEEXT): $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_DEPENDENCIES) $(EXTRA_ctaocrypt_test_testctaocrypt_DEPENDENCIES) ctaocrypt/test/$(am__dirstamp) + @rm -f ctaocrypt/test/testctaocrypt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_LDADD) $(LIBS) +examples/client/$(am__dirstamp): + @$(MKDIR_P) examples/client + @: > examples/client/$(am__dirstamp) +examples/client/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/client/$(DEPDIR) + @: > examples/client/$(DEPDIR)/$(am__dirstamp) +examples/client/client.$(OBJEXT): examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) + +examples/client/client$(EXEEXT): $(examples_client_client_OBJECTS) $(examples_client_client_DEPENDENCIES) $(EXTRA_examples_client_client_DEPENDENCIES) examples/client/$(am__dirstamp) + @rm -f examples/client/client$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_client_client_OBJECTS) $(examples_client_client_LDADD) $(LIBS) +examples/echoclient/$(am__dirstamp): + @$(MKDIR_P) examples/echoclient + @: > examples/echoclient/$(am__dirstamp) +examples/echoclient/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/echoclient/$(DEPDIR) + @: > examples/echoclient/$(DEPDIR)/$(am__dirstamp) +examples/echoclient/echoclient.$(OBJEXT): \ + examples/echoclient/$(am__dirstamp) \ + examples/echoclient/$(DEPDIR)/$(am__dirstamp) + +examples/echoclient/echoclient$(EXEEXT): $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_DEPENDENCIES) $(EXTRA_examples_echoclient_echoclient_DEPENDENCIES) examples/echoclient/$(am__dirstamp) + @rm -f examples/echoclient/echoclient$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_LDADD) $(LIBS) +examples/echoserver/$(am__dirstamp): + @$(MKDIR_P) examples/echoserver + @: > examples/echoserver/$(am__dirstamp) +examples/echoserver/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/echoserver/$(DEPDIR) + @: > examples/echoserver/$(DEPDIR)/$(am__dirstamp) +examples/echoserver/echoserver.$(OBJEXT): \ + examples/echoserver/$(am__dirstamp) \ + examples/echoserver/$(DEPDIR)/$(am__dirstamp) + +examples/echoserver/echoserver$(EXEEXT): $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_DEPENDENCIES) $(EXTRA_examples_echoserver_echoserver_DEPENDENCIES) examples/echoserver/$(am__dirstamp) + @rm -f examples/echoserver/echoserver$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_LDADD) $(LIBS) +examples/server/$(am__dirstamp): + @$(MKDIR_P) examples/server + @: > examples/server/$(am__dirstamp) +examples/server/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/server/$(DEPDIR) + @: > examples/server/$(DEPDIR)/$(am__dirstamp) +examples/server/server.$(OBJEXT): examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) + +examples/server/server$(EXEEXT): $(examples_server_server_OBJECTS) $(examples_server_server_DEPENDENCIES) $(EXTRA_examples_server_server_DEPENDENCIES) examples/server/$(am__dirstamp) + @rm -f examples/server/server$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_server_server_OBJECTS) $(examples_server_server_LDADD) $(LIBS) +mcapi/$(am__dirstamp): + @$(MKDIR_P) mcapi + @: > mcapi/$(am__dirstamp) +mcapi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) mcapi/$(DEPDIR) + @: > mcapi/$(DEPDIR)/$(am__dirstamp) +mcapi/crypto.$(OBJEXT): mcapi/$(am__dirstamp) \ + mcapi/$(DEPDIR)/$(am__dirstamp) +mcapi/mcapi_test.$(OBJEXT): mcapi/$(am__dirstamp) \ + mcapi/$(DEPDIR)/$(am__dirstamp) + +mcapi/test$(EXEEXT): $(mcapi_test_OBJECTS) $(mcapi_test_DEPENDENCIES) $(EXTRA_mcapi_test_DEPENDENCIES) mcapi/$(am__dirstamp) + @rm -f mcapi/test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mcapi_test_OBJECTS) $(mcapi_test_LDADD) $(LIBS) +sslSniffer/sslSnifferTest/$(am__dirstamp): + @$(MKDIR_P) sslSniffer/sslSnifferTest + @: > sslSniffer/sslSnifferTest/$(am__dirstamp) +sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) sslSniffer/sslSnifferTest/$(DEPDIR) + @: > sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) +sslSniffer/sslSnifferTest/snifftest.$(OBJEXT): \ + sslSniffer/sslSnifferTest/$(am__dirstamp) \ + sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) + +sslSniffer/sslSnifferTest/snifftest$(EXEEXT): $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) $(EXTRA_sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) sslSniffer/sslSnifferTest/$(am__dirstamp) + @rm -f sslSniffer/sslSnifferTest/snifftest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_LDADD) $(LIBS) +tests/$(am__dirstamp): + @$(MKDIR_P) tests + @: > tests/$(am__dirstamp) +tests/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tests/$(DEPDIR) + @: > tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-unit.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-api.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-suites.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-hash.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +examples/client/tests_unit_test-client.$(OBJEXT): \ + examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) +examples/server/tests_unit_test-server.$(OBJEXT): \ + examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) + +tests/unit.test$(EXEEXT): $(tests_unit_test_OBJECTS) $(tests_unit_test_DEPENDENCIES) $(EXTRA_tests_unit_test_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/unit.test$(EXEEXT) + $(AM_V_CCLD)$(tests_unit_test_LINK) $(tests_unit_test_OBJECTS) $(tests_unit_test_LDADD) $(LIBS) +ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT): \ + ctaocrypt/test/$(am__dirstamp) \ + ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) +examples/client/testsuite_testsuite_test-client.$(OBJEXT): \ + examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) +examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT): \ + examples/echoclient/$(am__dirstamp) \ + examples/echoclient/$(DEPDIR)/$(am__dirstamp) +examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT): \ + examples/echoserver/$(am__dirstamp) \ + examples/echoserver/$(DEPDIR)/$(am__dirstamp) +examples/server/testsuite_testsuite_test-server.$(OBJEXT): \ + examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) +testsuite/$(am__dirstamp): + @$(MKDIR_P) testsuite + @: > testsuite/$(am__dirstamp) +testsuite/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) testsuite/$(DEPDIR) + @: > testsuite/$(DEPDIR)/$(am__dirstamp) +testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT): \ + testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp) + +testsuite/testsuite.test$(EXEEXT): $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_DEPENDENCIES) $(EXTRA_testsuite_testsuite_test_DEPENDENCIES) testsuite/$(am__dirstamp) + @rm -f testsuite/testsuite.test$(EXEEXT) + $(AM_V_CCLD)$(testsuite_testsuite_test_LINK) $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f ctaocrypt/benchmark/*.$(OBJEXT) + -rm -f ctaocrypt/src/*.$(OBJEXT) + -rm -f ctaocrypt/src/*.lo + -rm -f ctaocrypt/test/*.$(OBJEXT) + -rm -f examples/client/*.$(OBJEXT) + -rm -f examples/echoclient/*.$(OBJEXT) + -rm -f examples/echoserver/*.$(OBJEXT) + -rm -f examples/server/*.$(OBJEXT) + -rm -f mcapi/*.$(OBJEXT) + -rm -f src/*.$(OBJEXT) + -rm -f src/*.lo + -rm -f sslSniffer/sslSnifferTest/*.$(OBJEXT) + -rm -f tests/*.$(OBJEXT) + -rm -f testsuite/*.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ctaocrypt/benchmark/$(DEPDIR)/benchmark.Po +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo +include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo +include ctaocrypt/test/$(DEPDIR)/test.Po +include ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po +include examples/client/$(DEPDIR)/client.Po +include examples/client/$(DEPDIR)/tests_unit_test-client.Po +include examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po +include examples/echoclient/$(DEPDIR)/echoclient.Po +include examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po +include examples/echoserver/$(DEPDIR)/echoserver.Po +include examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po +include examples/server/$(DEPDIR)/server.Po +include examples/server/$(DEPDIR)/tests_unit_test-server.Po +include examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po +include mcapi/$(DEPDIR)/crypto.Po +include mcapi/$(DEPDIR)/mcapi_test.Po +include src/$(DEPDIR)/src_libcyassl_la-crl.Plo +include src/$(DEPDIR)/src_libcyassl_la-internal.Plo +include src/$(DEPDIR)/src_libcyassl_la-io.Plo +include src/$(DEPDIR)/src_libcyassl_la-keys.Plo +include src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo +include src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo +include src/$(DEPDIR)/src_libcyassl_la-ssl.Plo +include src/$(DEPDIR)/src_libcyassl_la-tls.Plo +include sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po +include tests/$(DEPDIR)/tests_unit_test-api.Po +include tests/$(DEPDIR)/tests_unit_test-hash.Po +include tests/$(DEPDIR)/tests_unit_test-suites.Po +include tests/$(DEPDIR)/tests_unit_test-unit.Po +include testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po + +.c.o: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Plo +# $(AM_V_CC)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< + +src/src_libcyassl_la-internal.lo: src/internal.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-internal.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-internal.Tpo -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-internal.Tpo src/$(DEPDIR)/src_libcyassl_la-internal.Plo +# $(AM_V_CC)source='src/internal.c' object='src/src_libcyassl_la-internal.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c + +src/src_libcyassl_la-io.lo: src/io.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-io.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-io.Tpo -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-io.Tpo src/$(DEPDIR)/src_libcyassl_la-io.Plo +# $(AM_V_CC)source='src/io.c' object='src/src_libcyassl_la-io.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c + +src/src_libcyassl_la-keys.lo: src/keys.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-keys.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-keys.Tpo -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-keys.Tpo src/$(DEPDIR)/src_libcyassl_la-keys.Plo +# $(AM_V_CC)source='src/keys.c' object='src/src_libcyassl_la-keys.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c + +src/src_libcyassl_la-ssl.lo: src/ssl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ssl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo src/$(DEPDIR)/src_libcyassl_la-ssl.Plo +# $(AM_V_CC)source='src/ssl.c' object='src/src_libcyassl_la-ssl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c + +src/src_libcyassl_la-tls.lo: src/tls.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-tls.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-tls.Tpo -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-tls.Tpo src/$(DEPDIR)/src_libcyassl_la-tls.Plo +# $(AM_V_CC)source='src/tls.c' object='src/src_libcyassl_la-tls.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c + +ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hmac.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo +# $(AM_V_CC)source='ctaocrypt/src/hmac.c' object='ctaocrypt/src/src_libcyassl_la-hmac.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c + +ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-random.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo +# $(AM_V_CC)source='ctaocrypt/src/random.c' object='ctaocrypt/src/src_libcyassl_la-random.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c + +ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha256.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo +# $(AM_V_CC)source='ctaocrypt/src/sha256.c' object='ctaocrypt/src/src_libcyassl_la-sha256.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c + +ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-logging.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo +# $(AM_V_CC)source='ctaocrypt/src/logging.c' object='ctaocrypt/src/src_libcyassl_la-logging.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c + +ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-port.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo +# $(AM_V_CC)source='ctaocrypt/src/port.c' object='ctaocrypt/src/src_libcyassl_la-port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c + +ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-error.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo +# $(AM_V_CC)source='ctaocrypt/src/error.c' object='ctaocrypt/src/src_libcyassl_la-error.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c + +ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-memory.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo +# $(AM_V_CC)source='ctaocrypt/src/memory.c' object='ctaocrypt/src/src_libcyassl_la-memory.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c + +ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo +# $(AM_V_CC)source='ctaocrypt/src/rsa.c' object='ctaocrypt/src/src_libcyassl_la-rsa.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c + +ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dh.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo +# $(AM_V_CC)source='ctaocrypt/src/dh.c' object='ctaocrypt/src/src_libcyassl_la-dh.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c + +ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-asn.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo +# $(AM_V_CC)source='ctaocrypt/src/asn.c' object='ctaocrypt/src/src_libcyassl_la-asn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c + +ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/fips.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo +# $(AM_V_CC)source='ctaocrypt/src/fips.c' object='ctaocrypt/src/src_libcyassl_la-fips.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c + +ctaocrypt/src/src_libcyassl_la-fips_test.lo: ctaocrypt/src/fips_test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips_test.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo +# $(AM_V_CC)source='ctaocrypt/src/fips_test.c' object='ctaocrypt/src/src_libcyassl_la-fips_test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c + +ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-coding.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo +# $(AM_V_CC)source='ctaocrypt/src/coding.c' object='ctaocrypt/src/src_libcyassl_la-coding.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c + +ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-aes.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo +# $(AM_V_CC)source='ctaocrypt/src/aes.c' object='ctaocrypt/src/src_libcyassl_la-aes.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c + +ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-des3.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo +# $(AM_V_CC)source='ctaocrypt/src/des3.c' object='ctaocrypt/src/src_libcyassl_la-des3.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c + +ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo +# $(AM_V_CC)source='ctaocrypt/src/sha.c' object='ctaocrypt/src/src_libcyassl_la-sha.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c + +ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-arc4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo +# $(AM_V_CC)source='ctaocrypt/src/arc4.c' object='ctaocrypt/src/src_libcyassl_la-arc4.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c + +ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/md4.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo +# $(AM_V_CC)source='ctaocrypt/src/md4.c' object='ctaocrypt/src/src_libcyassl_la-md4.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c + +ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md5.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo +# $(AM_V_CC)source='ctaocrypt/src/md5.c' object='ctaocrypt/src/src_libcyassl_la-md5.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c + +ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pwdbased.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo +# $(AM_V_CC)source='ctaocrypt/src/pwdbased.c' object='ctaocrypt/src/src_libcyassl_la-pwdbased.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c + +ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/dsa.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo +# $(AM_V_CC)source='ctaocrypt/src/dsa.c' object='ctaocrypt/src/src_libcyassl_la-dsa.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c + +ctaocrypt/src/src_libcyassl_la-camellia.lo: ctaocrypt/src/camellia.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-camellia.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo +# $(AM_V_CC)source='ctaocrypt/src/camellia.c' object='ctaocrypt/src/src_libcyassl_la-camellia.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c + +ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/md2.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md2.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo +# $(AM_V_CC)source='ctaocrypt/src/md2.c' object='ctaocrypt/src/src_libcyassl_la-md2.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c + +ctaocrypt/src/src_libcyassl_la-ripemd.lo: ctaocrypt/src/ripemd.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ripemd.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo +# $(AM_V_CC)source='ctaocrypt/src/ripemd.c' object='ctaocrypt/src/src_libcyassl_la-ripemd.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c + +ctaocrypt/src/src_libcyassl_la-sha512.lo: ctaocrypt/src/sha512.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha512.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo +# $(AM_V_CC)source='ctaocrypt/src/sha512.c' object='ctaocrypt/src/src_libcyassl_la-sha512.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c + +ctaocrypt/src/src_libcyassl_la-blake2b.lo: ctaocrypt/src/blake2b.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-blake2b.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo +# $(AM_V_CC)source='ctaocrypt/src/blake2b.c' object='ctaocrypt/src/src_libcyassl_la-blake2b.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c + +src/src_libcyassl_la-sniffer.lo: src/sniffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-sniffer.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo +# $(AM_V_CC)source='src/sniffer.c' object='src/src_libcyassl_la-sniffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c + +ctaocrypt/src/src_libcyassl_la-hc128.lo: ctaocrypt/src/hc128.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hc128.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo +# $(AM_V_CC)source='ctaocrypt/src/hc128.c' object='ctaocrypt/src/src_libcyassl_la-hc128.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c + +ctaocrypt/src/src_libcyassl_la-rabbit.lo: ctaocrypt/src/rabbit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rabbit.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo +# $(AM_V_CC)source='ctaocrypt/src/rabbit.c' object='ctaocrypt/src/src_libcyassl_la-rabbit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c + +ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/misc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-misc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo +# $(AM_V_CC)source='ctaocrypt/src/misc.c' object='ctaocrypt/src/src_libcyassl_la-misc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c + +ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/tfm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-tfm.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo +# $(AM_V_CC)source='ctaocrypt/src/tfm.c' object='ctaocrypt/src/src_libcyassl_la-tfm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c + +ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-integer.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo +# $(AM_V_CC)source='ctaocrypt/src/integer.c' object='ctaocrypt/src/src_libcyassl_la-integer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c + +ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ecc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo +# $(AM_V_CC)source='ctaocrypt/src/ecc.c' object='ctaocrypt/src/src_libcyassl_la-ecc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c + +src/src_libcyassl_la-ocsp.lo: src/ocsp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ocsp.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo +# $(AM_V_CC)source='src/ocsp.c' object='src/src_libcyassl_la-ocsp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c + +src/src_libcyassl_la-crl.lo: src/crl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-crl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-crl.Tpo -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c + $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-crl.Tpo src/$(DEPDIR)/src_libcyassl_la-crl.Plo +# $(AM_V_CC)source='src/crl.c' object='src/src_libcyassl_la-crl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c + +ctaocrypt/src/src_libcyassl_la-compress.lo: ctaocrypt/src/compress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-compress.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo +# $(AM_V_CC)source='ctaocrypt/src/compress.c' object='ctaocrypt/src/src_libcyassl_la-compress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c + +ctaocrypt/src/src_libcyassl_la-pkcs7.lo: ctaocrypt/src/pkcs7.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pkcs7.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c + $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo +# $(AM_V_CC)source='ctaocrypt/src/pkcs7.c' object='ctaocrypt/src/src_libcyassl_la-pkcs7.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c + +tests/tests_unit_test-unit.o: tests/unit.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po +# $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c + +tests/tests_unit_test-unit.obj: tests/unit.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po +# $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` + +tests/tests_unit_test-api.o: tests/api.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po +# $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c + +tests/tests_unit_test-api.obj: tests/api.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po +# $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` + +tests/tests_unit_test-suites.o: tests/suites.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po +# $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c + +tests/tests_unit_test-suites.obj: tests/suites.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po +# $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` + +tests/tests_unit_test-hash.o: tests/hash.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po +# $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c + +tests/tests_unit_test-hash.obj: tests/hash.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` + $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po +# $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` + +examples/client/tests_unit_test-client.o: examples/client/client.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po +# $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + +examples/client/tests_unit_test-client.obj: examples/client/client.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po +# $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + +examples/server/tests_unit_test-server.o: examples/server/server.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po +# $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + +examples/server/tests_unit_test-server.obj: examples/server/server.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po +# $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + +ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.o -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c + $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po +# $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c + +ctaocrypt/test/testsuite_testsuite_test-test.obj: ctaocrypt/test/test.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.obj -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` + $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po +# $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` + +examples/client/testsuite_testsuite_test-client.o: examples/client/client.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po +# $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + +examples/client/testsuite_testsuite_test-client.obj: examples/client/client.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po +# $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + +examples/echoclient/testsuite_testsuite_test-echoclient.o: examples/echoclient/echoclient.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.o -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c + $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po +# $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c + +examples/echoclient/testsuite_testsuite_test-echoclient.obj: examples/echoclient/echoclient.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.obj -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` + $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po +# $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` + +examples/echoserver/testsuite_testsuite_test-echoserver.o: examples/echoserver/echoserver.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.o -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c + $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po +# $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c + +examples/echoserver/testsuite_testsuite_test-echoserver.obj: examples/echoserver/echoserver.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.obj -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` + $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po +# $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` + +examples/server/testsuite_testsuite_test-server.o: examples/server/server.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po +# $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + +examples/server/testsuite_testsuite_test-server.obj: examples/server/server.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po +# $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + +testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.o -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c + $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po +# $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c + +testsuite/testsuite_testsuite_test-testsuite.obj: testsuite/testsuite.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.obj -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` + $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po +# $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` + +.s.o: + $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $< + +.s.obj: + $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.s.lo: + $(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf ctaocrypt/benchmark/.libs ctaocrypt/benchmark/_libs + -rm -rf ctaocrypt/src/.libs ctaocrypt/src/_libs + -rm -rf ctaocrypt/test/.libs ctaocrypt/test/_libs + -rm -rf examples/client/.libs examples/client/_libs + -rm -rf examples/echoclient/.libs examples/echoclient/_libs + -rm -rf examples/echoserver/.libs examples/echoserver/_libs + -rm -rf examples/server/.libs examples/server/_libs + -rm -rf mcapi/.libs mcapi/_libs + -rm -rf src/.libs src/_libs + -rm -rf sslSniffer/sslSnifferTest/.libs sslSniffer/sslSnifferTest/_libs + -rm -rf tests/.libs tests/_libs + -rm -rf testsuite/.libs testsuite/_libs + +distclean-libtool: + -rm -f libtool config.lt +install-dist_docDATA: $(dist_doc_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ + done + +uninstall-dist_docDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) +install-dist_exampleDATA: $(dist_example_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \ + done + +uninstall-dist_exampleDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ + echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ + $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +mcapi/test.log: mcapi/test$(EXEEXT) + @p='mcapi/test$(EXEEXT)'; \ + b='mcapi/test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +#.test$(EXEEXT).log: +# @p='$<'; \ +# $(am__set_b); \ +# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +# --log-file $$b.log --trs-file $$b.trs \ +# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +# "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ + config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/benchmark/$(am__dirstamp) + -rm -f ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/src/$(am__dirstamp) + -rm -f ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/test/$(am__dirstamp) + -rm -f examples/client/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/client/$(am__dirstamp) + -rm -f examples/echoclient/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/echoclient/$(am__dirstamp) + -rm -f examples/echoserver/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/echoserver/$(am__dirstamp) + -rm -f examples/server/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/server/$(am__dirstamp) + -rm -f mcapi/$(DEPDIR)/$(am__dirstamp) + -rm -f mcapi/$(am__dirstamp) + -rm -f src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/$(am__dirstamp) + -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) + -rm -f sslSniffer/sslSnifferTest/$(am__dirstamp) + -rm -f tests/$(DEPDIR)/$(am__dirstamp) + -rm -f tests/$(am__dirstamp) + -rm -f testsuite/$(DEPDIR)/$(am__dirstamp) + -rm -f testsuite/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_docDATA install-dist_exampleDATA \ + install-includeHEADERS install-nobase_includeHEADERS \ + install-pkgconfigDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-exec-local \ + install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ + uninstall-dist_exampleDATA uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA + +.MAKE: all check check-am install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ + check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ + clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ + install-data-am install-dist_docDATA install-dist_exampleDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_includeHEADERS install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \ + uninstall-dist_exampleDATA uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA + + +#includes additional rules from aminclude.am +include $(top_builddir)/aminclude.am + +rpm-build: rpm/spec dist + @rm -f *.rpm + @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm + @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm + @mkdir -p ~/rpmbuild/BUILD/ + @mkdir -p ~/rpmbuild/RPMS/i386/ + @mkdir -p ~/rpmbuild/RPMS/i686/ + @mkdir -p ~/rpmbuild/RPMS/noarch/ + @mkdir -p ~/rpmbuild/RPMS/x86_64/ + @mkdir -p ~/rpmbuild/SOURCES/ + @mkdir -p ~/rpmbuild/SPECS/ + @mkdir -p ~/rpmbuild/SRPMS/ + @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ + @rpmbuild -ba --clean rpm/spec + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . + @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . + +rpm-sign: rpm-build + @rpm --addsign *.rpm + @rpm --checksig *.rpm + +clean-rpm: + @rm -f *.tar.gz + @rm -f *.src.rpm + @rm -f *.rpm + +rpm: rpm-build + +release: rpm-sign + +auto-rpmbuild: + @auto-br-rpmbuild -ba rpm/spec +test: check +tests/unit.log: testsuite/testsuite.log + +maintainer-clean-local: + -rm Makefile.in + -rm aclocal.m4 + -rm build-aux/compile + -rm build-aux/config.guess + -rm build-aux/config.sub + -rm build-aux/depcomp + -rm build-aux/install-sh + -rm build-aux/ltmain.sh + -rm build-aux/missing + -rm cyassl-config + -rmdir build-aux + -rm configure + -rm config.log + -rm config.status + -rm config.in + -rm m4/libtool.m4 + -rm m4/ltoptions.m4 + -rm m4/ltsugar.m4 + -rm m4/ltversion.m4 + -rm m4/lt~obsolete.m4 + -rm support/cyassl.pc + find . -type f -name '*~' -exec rm -f '{}' \; + -rm -f cyassl-*.tar.gz + -rm -f cyassl-*.rpm + +# !!!! first line of rule has to start with a hard (real) tab, not spaces +egs: + $(MAKE) examples/client/client; \ + $(MAKE) examples/echoclient/echoclient;\ + $(MAKE) examples/server/server; \ + $(MAKE) examples/echoserver/echoserver; + +ctc: + $(MAKE) ctaocrypt/test/testctaocrypt; \ + $(MAKE) ctaocrypt/benchmark/benchmark; + +install-exec-local: install-generic-config + +install-generic-config: + $(mkinstalldirs) $(DESTDIR)$(bindir) + $(INSTALL_SCRIPT) cyassl-config $(DESTDIR)$(bindir) + +uninstall-local: + -rm -f $(DESTDIR)$(bindir)/cyassl-config + +merge-clean: + @find ./ | $(GREP) \.gcda | xargs rm -f + @find ./ | $(GREP) \.gcno | xargs rm -f + @find ./ | $(GREP) \.gz | xargs rm -f + @find ./ | $(GREP) \.orig | xargs rm -f + @find ./ | $(GREP) \.rej | xargs rm -f + @find ./ | $(GREP) \.rpm | xargs rm -f + @find ./ | $(GREP) \.THIS | xargs rm -f + @find ./ | $(GREP) \.OTHER | xargs rm -f + @find ./ | $(GREP) \.BASE | xargs rm -f + @find ./ | $(GREP) \~$$ | xargs rm -f + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/project1/cyassl-3.0.0/Makefile.am b/project1/cyassl-3.0.0/Makefile.am new file mode 100644 index 00000000..72cf64cb --- /dev/null +++ b/project1/cyassl-3.0.0/Makefile.am @@ -0,0 +1,142 @@ +# includes append to these: +SUFFIXES = +TESTS = +CLEANFILES = +DISTCLEANFILES = +bin_PROGRAMS = +noinst_HEADERS = +lib_LTLIBRARIES = +man_MANS = +noinst_LTLIBRARIES = +noinst_PROGRAMS = +include_HEADERS = +nobase_include_HEADERS = +check_PROGRAMS = +EXTRA_HEADERS = +BUILT_SOURCES= +EXTRA_DIST= +dist_doc_DATA= + +#includes additional rules from aminclude.am +@INC_AMINCLUDE@ +DISTCLEANFILES+= aminclude.am + +exampledir = $(docdir)/example +dist_example_DATA= + +ACLOCAL_AMFLAGS= -I m4 + +EXTRA_DIST+= lib/dummy + +EXTRA_DIST+= cyassl-ntru.vcproj +EXTRA_DIST+= cyassl.vcproj +EXTRA_DIST+= cyassl-iphone.xcodeproj/project.pbxproj +EXTRA_DIST+= cyassl-ios.xcodeproj/project.pbxproj +EXTRA_DIST+= cyassl-ntru.sln +EXTRA_DIST+= cyassl.sln +EXTRA_DIST+= valgrind-error.sh +EXTRA_DIST+= gencertbuf.pl +EXTRA_DIST+= IDE + +include cyassl/include.am +include certs/include.am +include certs/1024/include.am +include certs/crl/include.am +include doc/include.am +include swig/include.am + +include src/include.am +include support/include.am +include ctaocrypt/benchmark/include.am +include ctaocrypt/src/include.am +include ctaocrypt/test/include.am +include examples/client/include.am +include examples/server/include.am +include examples/echoclient/include.am +include examples/echoserver/include.am +include testsuite/include.am +include tests/include.am +include sslSniffer/sslSnifferTest/include.am +include rpm/include.am +include mqx/ctaocrypt_test/Sources/include.am +include mqx/cyassl/include.am +include mqx/cyassl_client/Sources/include.am +include mqx/util_lib/Sources/include.am +include mplabx/include.am +include mplabx/ctaocrypt_benchmark.X/nbproject/include.am +include mplabx/ctaocrypt_test.X/nbproject/include.am +include mplabx/cyassl.X/nbproject/include.am +include mcapi/include.am +include mcapi/ctaocrypt_mcapi.X/nbproject/include.am +include mcapi/ctaocrypt_test.X/nbproject/include.am +include mcapi/cyassl.X/nbproject/include.am +include mcapi/zlib.X/nbproject/include.am + +if USE_VALGRIND +TESTS_ENVIRONMENT=./valgrind-error.sh +endif + +TEST_EXTENSIONS=.test +TESTS += $(check_PROGRAMS) +test: check +tests/unit.log: testsuite/testsuite.log + +DISTCLEANFILES+= cyassl-config + +maintainer-clean-local: + -rm Makefile.in + -rm aclocal.m4 + -rm build-aux/compile + -rm build-aux/config.guess + -rm build-aux/config.sub + -rm build-aux/depcomp + -rm build-aux/install-sh + -rm build-aux/ltmain.sh + -rm build-aux/missing + -rm cyassl-config + -rmdir build-aux + -rm configure + -rm config.log + -rm config.status + -rm config.in + -rm m4/libtool.m4 + -rm m4/ltoptions.m4 + -rm m4/ltsugar.m4 + -rm m4/ltversion.m4 + -rm m4/lt~obsolete.m4 + -rm support/cyassl.pc + find . -type f -name '*~' -exec rm -f '{}' \; + -rm -f @PACKAGE@-*.tar.gz + -rm -f @PACKAGE@-*.rpm + +# !!!! first line of rule has to start with a hard (real) tab, not spaces +egs: + $(MAKE) examples/client/client; \ + $(MAKE) examples/echoclient/echoclient;\ + $(MAKE) examples/server/server; \ + $(MAKE) examples/echoserver/echoserver; + +ctc: + $(MAKE) ctaocrypt/test/testctaocrypt; \ + $(MAKE) ctaocrypt/benchmark/benchmark; + +install-exec-local: install-generic-config + +install-generic-config: + $(mkinstalldirs) $(DESTDIR)$(bindir) + $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) + +uninstall-local: + -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@ + +merge-clean: + @find ./ | $(GREP) \.gcda | xargs rm -f + @find ./ | $(GREP) \.gcno | xargs rm -f + @find ./ | $(GREP) \.gz | xargs rm -f + @find ./ | $(GREP) \.orig | xargs rm -f + @find ./ | $(GREP) \.rej | xargs rm -f + @find ./ | $(GREP) \.rpm | xargs rm -f + @find ./ | $(GREP) \.THIS | xargs rm -f + @find ./ | $(GREP) \.OTHER | xargs rm -f + @find ./ | $(GREP) \.BASE | xargs rm -f + @find ./ | $(GREP) \~$$ | xargs rm -f diff --git a/project1/cyassl-3.0.0/Makefile.in b/project1/cyassl-3.0.0/Makefile.in new file mode 100644 index 00000000..08fb010a --- /dev/null +++ b/project1/cyassl-3.0.0/Makefile.in @@ -0,0 +1,3049 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + +# vim:ft=automake +# All paths should be given relative to the root +# + + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = +noinst_PROGRAMS = ctaocrypt/benchmark/benchmark$(EXEEXT) \ + ctaocrypt/test/testctaocrypt$(EXEEXT) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) $(am__EXEEXT_2) +check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +DIST_COMMON = $(srcdir)/cyassl/include.am \ + $(srcdir)/cyassl/ctaocrypt/include.am \ + $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am \ + $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am \ + $(srcdir)/doc/include.am $(srcdir)/swig/include.am \ + $(srcdir)/src/include.am $(srcdir)/support/include.am \ + $(srcdir)/ctaocrypt/benchmark/include.am \ + $(srcdir)/ctaocrypt/src/include.am \ + $(srcdir)/ctaocrypt/test/include.am \ + $(srcdir)/examples/client/include.am \ + $(srcdir)/examples/server/include.am \ + $(srcdir)/examples/echoclient/include.am \ + $(srcdir)/examples/echoserver/include.am \ + $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am \ + $(srcdir)/sslSniffer/sslSnifferTest/include.am \ + $(srcdir)/rpm/include.am \ + $(srcdir)/mqx/ctaocrypt_test/Sources/include.am \ + $(srcdir)/mqx/cyassl/include.am \ + $(srcdir)/mqx/cyassl_client/Sources/include.am \ + $(srcdir)/mqx/util_lib/Sources/include.am \ + $(srcdir)/mplabx/include.am \ + $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am \ + $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am \ + $(srcdir)/mplabx/cyassl.X/nbproject/include.am \ + $(srcdir)/mcapi/include.am \ + $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am \ + $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am \ + $(srcdir)/mcapi/cyassl.X/nbproject/include.am \ + $(srcdir)/mcapi/zlib.X/nbproject/include.am \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.in $(srcdir)/stamp-h.in \ + $(top_srcdir)/cyassl/version.h.in \ + $(top_srcdir)/cyassl/options.h.in \ + $(top_srcdir)/support/cyassl.pc.in $(top_srcdir)/rpm/spec.in \ + $(top_srcdir)/build-aux/depcomp $(dist_doc_DATA) \ + $(dist_example_DATA) $(include_HEADERS) \ + $(nobase_include_HEADERS) $(am__noinst_HEADERS_DIST) \ + $(top_srcdir)/build-aux/test-driver AUTHORS COPYING ChangeLog \ + NEWS README build-aux/compile build-aux/config.guess \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/missing build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing +@BUILD_MEMORY_TRUE@am__append_1 = ctaocrypt/src/memory.c +@BUILD_RSA_TRUE@am__append_2 = ctaocrypt/src/rsa.c +@BUILD_DH_TRUE@am__append_3 = ctaocrypt/src/dh.c +@BUILD_ASN_TRUE@am__append_4 = ctaocrypt/src/asn.c +@BUILD_FIPS_TRUE@am__append_5 = ctaocrypt/src/fips.c \ +@BUILD_FIPS_TRUE@ ctaocrypt/src/fips_test.c +@BUILD_CODING_TRUE@am__append_6 = ctaocrypt/src/coding.c +@BUILD_AES_TRUE@am__append_7 = ctaocrypt/src/aes.c +@BUILD_DES3_TRUE@am__append_8 = ctaocrypt/src/des3.c +@BUILD_SHA_TRUE@am__append_9 = ctaocrypt/src/sha.c +@BUILD_RC4_TRUE@am__append_10 = ctaocrypt/src/arc4.c +@BUILD_MD4_TRUE@am__append_11 = ctaocrypt/src/md4.c +@BUILD_MD5_TRUE@am__append_12 = ctaocrypt/src/md5.c +@BUILD_PWDBASED_TRUE@am__append_13 = ctaocrypt/src/pwdbased.c +@BUILD_DSA_TRUE@am__append_14 = ctaocrypt/src/dsa.c +@BUILD_AESNI_TRUE@am__append_15 = ctaocrypt/src/aes_asm.s +@BUILD_CAMELLIA_TRUE@am__append_16 = ctaocrypt/src/camellia.c +@BUILD_MD2_TRUE@am__append_17 = ctaocrypt/src/md2.c +@BUILD_RIPEMD_TRUE@am__append_18 = ctaocrypt/src/ripemd.c +@BUILD_SHA512_TRUE@am__append_19 = ctaocrypt/src/sha512.c +@BUILD_BLAKE2_TRUE@am__append_20 = ctaocrypt/src/blake2b.c +@BUILD_SNIFFER_TRUE@am__append_21 = src/sniffer.c +@BUILD_HC128_TRUE@am__append_22 = ctaocrypt/src/hc128.c +@BUILD_RABBIT_TRUE@am__append_23 = ctaocrypt/src/rabbit.c +@BUILD_INLINE_FALSE@am__append_24 = ctaocrypt/src/misc.c +@BUILD_FASTMATH_TRUE@am__append_25 = ctaocrypt/src/tfm.c +@BUILD_SLOWMATH_TRUE@am__append_26 = ctaocrypt/src/integer.c +@BUILD_ECC_TRUE@am__append_27 = ctaocrypt/src/ecc.c +@BUILD_OCSP_TRUE@am__append_28 = src/ocsp.c +@BUILD_CRL_TRUE@am__append_29 = src/crl.c +@BUILD_LIBZ_TRUE@am__append_30 = ctaocrypt/src/compress.c +@BUILD_PKCS7_TRUE@am__append_31 = ctaocrypt/src/pkcs7.c +@BUILD_EXAMPLES_TRUE@am__append_32 = examples/client/client \ +@BUILD_EXAMPLES_TRUE@ examples/server/server \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver \ +@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.test tests/unit.test +@BUILD_EXAMPLES_TRUE@am__append_33 = examples/client/client.h \ +@BUILD_EXAMPLES_TRUE@ examples/server/server.h \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.h \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.h +@BUILD_EXAMPLES_TRUE@am__append_34 = testsuite/testsuite.test \ +@BUILD_EXAMPLES_TRUE@ tests/unit.test +@BUILD_SNIFFTEST_TRUE@am__append_35 = sslSniffer/sslSnifferTest/snifftest +@BUILD_MCAPI_TRUE@am__append_36 = mcapi/test +@BUILD_MCAPI_TRUE@am__append_37 = mcapi/test +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \ + $(top_srcdir)/m4/ax_am_jobserver.m4 \ + $(top_srcdir)/m4/ax_am_macros.m4 \ + $(top_srcdir)/m4/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4/ax_append_flag.m4 \ + $(top_srcdir)/m4/ax_append_to_file.m4 \ + $(top_srcdir)/m4/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4/ax_check_link_flag.m4 \ + $(top_srcdir)/m4/ax_count_cpus.m4 \ + $(top_srcdir)/m4/ax_create_generic_config.m4 \ + $(top_srcdir)/m4/ax_debug.m4 \ + $(top_srcdir)/m4/ax_file_escapes.m4 \ + $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \ + $(top_srcdir)/m4/ax_print_to_file.m4 \ + $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \ + $(top_srcdir)/m4/ax_vcs_checkout.m4 \ + $(top_srcdir)/m4/hexversion.m4 \ + $(top_srcdir)/m4/lib_socket_nsl.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/visibility.m4 \ + $(top_srcdir)/m4/wolfssl_darwin_clang.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = stamp-h cyassl/version.h cyassl/options.h \ + support/cyassl.pc rpm/spec +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +src_libcyassl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__src_libcyassl_la_SOURCES_DIST = src/internal.c src/io.c src/keys.c \ + src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ + ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ + ctaocrypt/src/logging.c ctaocrypt/src/port.c \ + ctaocrypt/src/error.c ctaocrypt/src/memory.c \ + ctaocrypt/src/rsa.c ctaocrypt/src/dh.c ctaocrypt/src/asn.c \ + ctaocrypt/src/fips.c ctaocrypt/src/fips_test.c \ + ctaocrypt/src/coding.c ctaocrypt/src/aes.c \ + ctaocrypt/src/des3.c ctaocrypt/src/sha.c ctaocrypt/src/arc4.c \ + ctaocrypt/src/md4.c ctaocrypt/src/md5.c \ + ctaocrypt/src/pwdbased.c ctaocrypt/src/dsa.c \ + ctaocrypt/src/aes_asm.s ctaocrypt/src/camellia.c \ + ctaocrypt/src/md2.c ctaocrypt/src/ripemd.c \ + ctaocrypt/src/sha512.c ctaocrypt/src/blake2b.c src/sniffer.c \ + ctaocrypt/src/hc128.c ctaocrypt/src/rabbit.c \ + ctaocrypt/src/misc.c ctaocrypt/src/tfm.c \ + ctaocrypt/src/integer.c ctaocrypt/src/ecc.c src/ocsp.c \ + src/crl.c ctaocrypt/src/compress.c ctaocrypt/src/pkcs7.c +am__dirstamp = $(am__leading_dot)dirstamp +@BUILD_MEMORY_TRUE@am__objects_1 = \ +@BUILD_MEMORY_TRUE@ ctaocrypt/src/src_libcyassl_la-memory.lo +@BUILD_RSA_TRUE@am__objects_2 = ctaocrypt/src/src_libcyassl_la-rsa.lo +@BUILD_DH_TRUE@am__objects_3 = ctaocrypt/src/src_libcyassl_la-dh.lo +@BUILD_ASN_TRUE@am__objects_4 = ctaocrypt/src/src_libcyassl_la-asn.lo +@BUILD_FIPS_TRUE@am__objects_5 = \ +@BUILD_FIPS_TRUE@ ctaocrypt/src/src_libcyassl_la-fips.lo \ +@BUILD_FIPS_TRUE@ ctaocrypt/src/src_libcyassl_la-fips_test.lo +@BUILD_CODING_TRUE@am__objects_6 = \ +@BUILD_CODING_TRUE@ ctaocrypt/src/src_libcyassl_la-coding.lo +@BUILD_AES_TRUE@am__objects_7 = ctaocrypt/src/src_libcyassl_la-aes.lo +@BUILD_DES3_TRUE@am__objects_8 = \ +@BUILD_DES3_TRUE@ ctaocrypt/src/src_libcyassl_la-des3.lo +@BUILD_SHA_TRUE@am__objects_9 = ctaocrypt/src/src_libcyassl_la-sha.lo +@BUILD_RC4_TRUE@am__objects_10 = \ +@BUILD_RC4_TRUE@ ctaocrypt/src/src_libcyassl_la-arc4.lo +@BUILD_MD4_TRUE@am__objects_11 = \ +@BUILD_MD4_TRUE@ ctaocrypt/src/src_libcyassl_la-md4.lo +@BUILD_MD5_TRUE@am__objects_12 = \ +@BUILD_MD5_TRUE@ ctaocrypt/src/src_libcyassl_la-md5.lo +@BUILD_PWDBASED_TRUE@am__objects_13 = ctaocrypt/src/src_libcyassl_la-pwdbased.lo +@BUILD_DSA_TRUE@am__objects_14 = \ +@BUILD_DSA_TRUE@ ctaocrypt/src/src_libcyassl_la-dsa.lo +@BUILD_AESNI_TRUE@am__objects_15 = ctaocrypt/src/aes_asm.lo +@BUILD_CAMELLIA_TRUE@am__objects_16 = ctaocrypt/src/src_libcyassl_la-camellia.lo +@BUILD_MD2_TRUE@am__objects_17 = \ +@BUILD_MD2_TRUE@ ctaocrypt/src/src_libcyassl_la-md2.lo +@BUILD_RIPEMD_TRUE@am__objects_18 = \ +@BUILD_RIPEMD_TRUE@ ctaocrypt/src/src_libcyassl_la-ripemd.lo +@BUILD_SHA512_TRUE@am__objects_19 = \ +@BUILD_SHA512_TRUE@ ctaocrypt/src/src_libcyassl_la-sha512.lo +@BUILD_BLAKE2_TRUE@am__objects_20 = \ +@BUILD_BLAKE2_TRUE@ ctaocrypt/src/src_libcyassl_la-blake2b.lo +@BUILD_SNIFFER_TRUE@am__objects_21 = src/src_libcyassl_la-sniffer.lo +@BUILD_HC128_TRUE@am__objects_22 = \ +@BUILD_HC128_TRUE@ ctaocrypt/src/src_libcyassl_la-hc128.lo +@BUILD_RABBIT_TRUE@am__objects_23 = \ +@BUILD_RABBIT_TRUE@ ctaocrypt/src/src_libcyassl_la-rabbit.lo +@BUILD_INLINE_FALSE@am__objects_24 = \ +@BUILD_INLINE_FALSE@ ctaocrypt/src/src_libcyassl_la-misc.lo +@BUILD_FASTMATH_TRUE@am__objects_25 = \ +@BUILD_FASTMATH_TRUE@ ctaocrypt/src/src_libcyassl_la-tfm.lo +@BUILD_SLOWMATH_TRUE@am__objects_26 = ctaocrypt/src/src_libcyassl_la-integer.lo +@BUILD_ECC_TRUE@am__objects_27 = \ +@BUILD_ECC_TRUE@ ctaocrypt/src/src_libcyassl_la-ecc.lo +@BUILD_OCSP_TRUE@am__objects_28 = src/src_libcyassl_la-ocsp.lo +@BUILD_CRL_TRUE@am__objects_29 = src/src_libcyassl_la-crl.lo +@BUILD_LIBZ_TRUE@am__objects_30 = \ +@BUILD_LIBZ_TRUE@ ctaocrypt/src/src_libcyassl_la-compress.lo +@BUILD_PKCS7_TRUE@am__objects_31 = \ +@BUILD_PKCS7_TRUE@ ctaocrypt/src/src_libcyassl_la-pkcs7.lo +am_src_libcyassl_la_OBJECTS = src/src_libcyassl_la-internal.lo \ + src/src_libcyassl_la-io.lo src/src_libcyassl_la-keys.lo \ + src/src_libcyassl_la-ssl.lo src/src_libcyassl_la-tls.lo \ + ctaocrypt/src/src_libcyassl_la-hmac.lo \ + ctaocrypt/src/src_libcyassl_la-random.lo \ + ctaocrypt/src/src_libcyassl_la-sha256.lo \ + ctaocrypt/src/src_libcyassl_la-logging.lo \ + ctaocrypt/src/src_libcyassl_la-port.lo \ + ctaocrypt/src/src_libcyassl_la-error.lo $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) $(am__objects_13) \ + $(am__objects_14) $(am__objects_15) $(am__objects_16) \ + $(am__objects_17) $(am__objects_18) $(am__objects_19) \ + $(am__objects_20) $(am__objects_21) $(am__objects_22) \ + $(am__objects_23) $(am__objects_24) $(am__objects_25) \ + $(am__objects_26) $(am__objects_27) $(am__objects_28) \ + $(am__objects_29) $(am__objects_30) $(am__objects_31) +src_libcyassl_la_OBJECTS = $(am_src_libcyassl_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +src_libcyassl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(src_libcyassl_la_CFLAGS) $(CFLAGS) \ + $(src_libcyassl_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = testsuite/testsuite.test$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ tests/unit.test$(EXEEXT) +@BUILD_MCAPI_TRUE@am__EXEEXT_2 = mcapi/test$(EXEEXT) +@BUILD_EXAMPLES_TRUE@am__EXEEXT_3 = examples/client/client$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/server/server$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.test$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ tests/unit.test$(EXEEXT) +@BUILD_SNIFFTEST_TRUE@am__EXEEXT_4 = sslSniffer/sslSnifferTest/snifftest$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_ctaocrypt_benchmark_benchmark_OBJECTS = \ + ctaocrypt/benchmark/benchmark.$(OBJEXT) +ctaocrypt_benchmark_benchmark_OBJECTS = \ + $(am_ctaocrypt_benchmark_benchmark_OBJECTS) +am_ctaocrypt_test_testctaocrypt_OBJECTS = \ + ctaocrypt/test/test.$(OBJEXT) +ctaocrypt_test_testctaocrypt_OBJECTS = \ + $(am_ctaocrypt_test_testctaocrypt_OBJECTS) +am__examples_client_client_SOURCES_DIST = examples/client/client.c +@BUILD_EXAMPLES_TRUE@am_examples_client_client_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ examples/client/client.$(OBJEXT) +examples_client_client_OBJECTS = $(am_examples_client_client_OBJECTS) +am__examples_echoclient_echoclient_SOURCES_DIST = \ + examples/echoclient/echoclient.c +@BUILD_EXAMPLES_TRUE@am_examples_echoclient_echoclient_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.$(OBJEXT) +examples_echoclient_echoclient_OBJECTS = \ + $(am_examples_echoclient_echoclient_OBJECTS) +am__examples_echoserver_echoserver_SOURCES_DIST = \ + examples/echoserver/echoserver.c +@BUILD_EXAMPLES_TRUE@am_examples_echoserver_echoserver_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.$(OBJEXT) +examples_echoserver_echoserver_OBJECTS = \ + $(am_examples_echoserver_echoserver_OBJECTS) +am__examples_server_server_SOURCES_DIST = examples/server/server.c +@BUILD_EXAMPLES_TRUE@am_examples_server_server_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ examples/server/server.$(OBJEXT) +examples_server_server_OBJECTS = $(am_examples_server_server_OBJECTS) +am__mcapi_test_SOURCES_DIST = mcapi/crypto.c mcapi/mcapi_test.c +@BUILD_MCAPI_TRUE@am_mcapi_test_OBJECTS = mcapi/crypto.$(OBJEXT) \ +@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.$(OBJEXT) +mcapi_test_OBJECTS = $(am_mcapi_test_OBJECTS) +am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST = \ + sslSniffer/sslSnifferTest/snifftest.c +@BUILD_SNIFFTEST_TRUE@am_sslSniffer_sslSnifferTest_snifftest_OBJECTS = sslSniffer/sslSnifferTest/snifftest.$(OBJEXT) +sslSniffer_sslSnifferTest_snifftest_OBJECTS = \ + $(am_sslSniffer_sslSnifferTest_snifftest_OBJECTS) +am__tests_unit_test_SOURCES_DIST = tests/unit.c tests/api.c \ + tests/suites.c tests/hash.c examples/client/client.c \ + examples/server/server.c +@BUILD_EXAMPLES_TRUE@am_tests_unit_test_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-unit.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-api.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-suites.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-hash.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/client/tests_unit_test-client.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/server/tests_unit_test-server.$(OBJEXT) +tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS) +tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_unit_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__testsuite_testsuite_test_SOURCES_DIST = ctaocrypt/test/test.c \ + examples/client/client.c examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c examples/server/server.c \ + testsuite/testsuite.c +@BUILD_EXAMPLES_TRUE@am_testsuite_testsuite_test_OBJECTS = ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/client/testsuite_testsuite_test-client.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ examples/server/testsuite_testsuite_test-server.$(OBJEXT) \ +@BUILD_EXAMPLES_TRUE@ testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT) +testsuite_testsuite_test_OBJECTS = \ + $(am_testsuite_testsuite_test_OBJECTS) +testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ + $(CCASFLAGS) +AM_V_CCAS = $(am__v_CCAS_@AM_V@) +am__v_CCAS_ = $(am__v_CCAS_@AM_DEFAULT_V@) +am__v_CCAS_0 = @echo " CCAS " $@; +am__v_CCAS_1 = +SOURCES = $(src_libcyassl_la_SOURCES) \ + $(ctaocrypt_benchmark_benchmark_SOURCES) \ + $(ctaocrypt_test_testctaocrypt_SOURCES) \ + $(examples_client_client_SOURCES) \ + $(examples_echoclient_echoclient_SOURCES) \ + $(examples_echoserver_echoserver_SOURCES) \ + $(examples_server_server_SOURCES) $(mcapi_test_SOURCES) \ + $(sslSniffer_sslSnifferTest_snifftest_SOURCES) \ + $(tests_unit_test_SOURCES) $(testsuite_testsuite_test_SOURCES) +DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \ + $(ctaocrypt_benchmark_benchmark_SOURCES) \ + $(ctaocrypt_test_testctaocrypt_SOURCES) \ + $(am__examples_client_client_SOURCES_DIST) \ + $(am__examples_echoclient_echoclient_SOURCES_DIST) \ + $(am__examples_echoserver_echoserver_SOURCES_DIST) \ + $(am__examples_server_server_SOURCES_DIST) \ + $(am__mcapi_test_SOURCES_DIST) \ + $(am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST) \ + $(am__tests_unit_test_SOURCES_DIST) \ + $(am__testsuite_testsuite_test_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA) +am__noinst_HEADERS_DIST = cyassl/internal.h ctaocrypt/test/test.h \ + examples/client/client.h examples/server/server.h \ + examples/echoclient/echoclient.h \ + examples/echoserver/echoserver.h mcapi/crypto.h +HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ + $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope check recheck +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMINCLUDE = @AMINCLUDE@ +AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AM_LDFLAGS = @AM_LDFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYASSL_LIBRARY_VERSION = @CYASSL_LIBRARY_VERSION@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERIC_CONFIG = @GENERIC_CONFIG@ +GREP = @GREP@ +HAVE_OPENSSL_CMD = @HAVE_OPENSSL_CMD@ +HAVE_VALGRIND = @HAVE_VALGRIND@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +HEX_VERSION = @HEX_VERSION@ +INC_AMINCLUDE = @INC_AMINCLUDE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MCHECK = @MCHECK@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# includes append to these: +SUFFIXES = +TESTS = $(check_PROGRAMS) +CLEANFILES = +DISTCLEANFILES = aminclude.am ctaocrypt/benchmark/.libs/benchmark \ + ctaocrypt/test/.libs/testctaocrypt \ + examples/client/.libs/client examples/server/.libs/server \ + examples/echoclient/.libs/echoclient \ + examples/echoserver/.libs/echoserver \ + testsuite/.libs/testsuite.test tests/.libs/unit.test \ + sslSniffer/sslSnifferTest/.libs/snifftest cyassl-config +noinst_HEADERS = cyassl/internal.h ctaocrypt/test/test.h \ + $(am__append_33) mcapi/crypto.h +lib_LTLIBRARIES = src/libcyassl.la +man_MANS = +noinst_LTLIBRARIES = +include_HEADERS = +nobase_include_HEADERS = cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/camellia.h \ + cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/compress.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/dh.h \ + cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/ecc.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/fips_test.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/md2.h \ + cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/md5.h \ + cyassl/ctaocrypt/misc.h cyassl/ctaocrypt/pkcs7.h \ + cyassl/ctaocrypt/port.h cyassl/ctaocrypt/pwdbased.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/blake2.h cyassl/ctaocrypt/blake2-int.h \ + cyassl/ctaocrypt/blake2-impl.h cyassl/ctaocrypt/tfm.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/memory.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/openssl/asn1.h cyassl/openssl/bio.h cyassl/openssl/bn.h \ + cyassl/openssl/conf.h cyassl/openssl/crypto.h \ + cyassl/openssl/des.h cyassl/openssl/dh.h cyassl/openssl/dsa.h \ + cyassl/openssl/ecdsa.h cyassl/openssl/ec.h \ + cyassl/openssl/engine.h cyassl/openssl/err.h \ + cyassl/openssl/evp.h cyassl/openssl/hmac.h \ + cyassl/openssl/lhash.h cyassl/openssl/md4.h \ + cyassl/openssl/md5.h cyassl/openssl/ripemd.h \ + cyassl/openssl/ocsp.h cyassl/openssl/opensslconf.h \ + cyassl/openssl/opensslv.h cyassl/openssl/ossl_typ.h \ + cyassl/openssl/pem.h cyassl/openssl/pkcs12.h \ + cyassl/openssl/rand.h cyassl/openssl/rsa.h \ + cyassl/openssl/sha.h cyassl/openssl/ssl.h \ + cyassl/openssl/stack.h cyassl/openssl/ui.h \ + cyassl/openssl/x509.h cyassl/openssl/x509v3.h \ + cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \ + cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \ + cyassl/test.h cyassl/version.h cyassl/options.h cyassl/ocsp.h \ + cyassl/crl.h +EXTRA_HEADERS = +BUILT_SOURCES = +EXTRA_DIST = lib/dummy cyassl-ntru.vcproj cyassl.vcproj \ + cyassl-iphone.xcodeproj/project.pbxproj \ + cyassl-ios.xcodeproj/project.pbxproj cyassl-ntru.sln \ + cyassl.sln valgrind-error.sh gencertbuf.pl IDE \ + cyassl/sniffer_error.rc certs/ca-cert.pem certs/ca-key.pem \ + certs/client-cert.pem certs/client-keyEnc.pem \ + certs/client-key.pem certs/ecc-key.pem certs/ecc-keyPkcs8.pem \ + certs/ecc-client-key.pem certs/client-ecc-cert.pem \ + certs/ntru-cert.pem certs/dh2048.pem certs/server-cert.pem \ + certs/server-ecc.pem certs/server-ecc-rsa.pem \ + certs/server-keyEnc.pem certs/server-key.pem \ + certs/server-keyPkcs8Enc12.pem certs/server-keyPkcs8Enc2.pem \ + certs/server-keyPkcs8Enc.pem certs/server-keyPkcs8.pem \ + certs/ca-key.der certs/client-cert.der certs/client-key.der \ + certs/dh2048.der certs/rsa2048.der certs/dsa2048.der \ + certs/ecc-key.der certs/ntru-key.raw \ + certs/1024/client-cert.pem certs/1024/client-key.pem \ + certs/1024/dh1024.pem certs/1024/dsa1024.pem \ + certs/1024/client-cert.der certs/1024/client-key.der \ + certs/1024/dh1024.der certs/1024/dsa1024.der \ + certs/1024/rsa1024.der certs/crl/crl.pem certs/crl/cliCrl.pem \ + certs/crl/eccSrvCRL.pem certs/crl/eccCliCRL.pem \ + certs/crl/crl.revoked swig/PythonBuild.sh swig/README \ + swig/cyassl.i swig/cyassl_adds.c swig/python_cyassl.vcproj \ + swig/rsasign.py swig/runme.py support/cyassl.pc \ + ctaocrypt/benchmark/benchmark.sln \ + ctaocrypt/benchmark/benchmark.vcproj ctaocrypt/src/misc.c \ + ctaocrypt/src/asm.c ctaocrypt/src/ecc_fp.c \ + ctaocrypt/src/fp_mont_small.i ctaocrypt/src/fp_mul_comba_12.i \ + ctaocrypt/src/fp_mul_comba_17.i \ + ctaocrypt/src/fp_mul_comba_20.i \ + ctaocrypt/src/fp_mul_comba_24.i \ + ctaocrypt/src/fp_mul_comba_28.i \ + ctaocrypt/src/fp_mul_comba_32.i ctaocrypt/src/fp_mul_comba_3.i \ + ctaocrypt/src/fp_mul_comba_48.i ctaocrypt/src/fp_mul_comba_4.i \ + ctaocrypt/src/fp_mul_comba_64.i ctaocrypt/src/fp_mul_comba_6.i \ + ctaocrypt/src/fp_mul_comba_7.i ctaocrypt/src/fp_mul_comba_8.i \ + ctaocrypt/src/fp_mul_comba_9.i \ + ctaocrypt/src/fp_mul_comba_small_set.i \ + ctaocrypt/src/fp_sqr_comba_12.i \ + ctaocrypt/src/fp_sqr_comba_17.i \ + ctaocrypt/src/fp_sqr_comba_20.i \ + ctaocrypt/src/fp_sqr_comba_24.i \ + ctaocrypt/src/fp_sqr_comba_28.i \ + ctaocrypt/src/fp_sqr_comba_32.i ctaocrypt/src/fp_sqr_comba_3.i \ + ctaocrypt/src/fp_sqr_comba_48.i ctaocrypt/src/fp_sqr_comba_4.i \ + ctaocrypt/src/fp_sqr_comba_64.i ctaocrypt/src/fp_sqr_comba_6.i \ + ctaocrypt/src/fp_sqr_comba_7.i ctaocrypt/src/fp_sqr_comba_8.i \ + ctaocrypt/src/fp_sqr_comba_9.i \ + ctaocrypt/src/fp_sqr_comba_small_set.i ctaocrypt/test/test.sln \ + ctaocrypt/test/test.vcproj examples/client/client.sln \ + examples/client/client-ntru.vcproj \ + examples/client/client.vcproj examples/server/server.sln \ + examples/server/server-ntru.vcproj \ + examples/server/server.vcproj \ + examples/echoclient/echoclient.sln \ + examples/echoclient/echoclient-ntru.vcproj \ + examples/echoclient/echoclient.vcproj \ + examples/echoserver/echoserver.sln \ + examples/echoserver/echoserver-ntru.vcproj \ + examples/echoserver/echoserver.vcproj testsuite/testsuite.sln \ + testsuite/testsuite-ntru.vcproj testsuite/testsuite.vcproj \ + input quit tests/unit.h tests/test.conf tests/test-dtls.conf \ + sslSniffer/sslSniffer.vcproj \ + sslSniffer/sslSnifferTest/sslSniffTest.vcproj \ + mqx/ctaocrypt_test/.cproject mqx/ctaocrypt_test/.project \ + mqx/ctaocrypt_test/ReferencedRSESystems.xml \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ + mqx/ctaocrypt_test/Sources/main.c \ + mqx/ctaocrypt_test/Sources/main.h mqx/README \ + mqx/cyassl/.cproject mqx/cyassl/.project \ + mqx/cyassl_client/.cproject mqx/cyassl_client/.project \ + mqx/cyassl_client/ReferencedRSESystems.xml \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ + mqx/cyassl_client/Sources/main.c \ + mqx/cyassl_client/Sources/main.h mqx/util_lib/.cproject \ + mqx/util_lib/.project mqx/util_lib/Sources/util.c \ + mqx/util_lib/Sources/util.h mplabx/PIC32MZ-serial.h \ + mplabx/README mplabx/benchmark_main.c mplabx/test_main.c \ + mplabx/ctaocrypt_benchmark.X/Makefile \ + mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_benchmark.X/nbproject/project.xml \ + mplabx/ctaocrypt_test.X/Makefile \ + mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_test.X/nbproject/project.xml \ + mplabx/cyassl.X/Makefile \ + mplabx/cyassl.X/nbproject/configurations.xml \ + mplabx/cyassl.X/nbproject/project.xml mcapi/README \ + mcapi/PIC32MZ-serial.h mcapi/ctaocrypt_mcapi.X/Makefile \ + mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_mcapi.X/nbproject/project.xml \ + mcapi/ctaocrypt_test.X/Makefile \ + mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_test.X/nbproject/project.xml \ + mcapi/cyassl.X/Makefile \ + mcapi/cyassl.X/nbproject/configurations.xml \ + mcapi/cyassl.X/nbproject/project.xml mcapi/zlib.X/Makefile \ + mcapi/zlib.X/nbproject/configurations.xml \ + mcapi/zlib.X/nbproject/project.xml +dist_doc_DATA = certs/taoCert.txt doc/README.txt +exampledir = $(docdir)/example +dist_example_DATA = examples/client/client.c examples/server/server.c \ + examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c +ACLOCAL_AMFLAGS = -I m4 +src_libcyassl_la_SOURCES = src/internal.c src/io.c src/keys.c \ + src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ + ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ + ctaocrypt/src/logging.c ctaocrypt/src/port.c \ + ctaocrypt/src/error.c $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_14) \ + $(am__append_15) $(am__append_16) $(am__append_17) \ + $(am__append_18) $(am__append_19) $(am__append_20) \ + $(am__append_21) $(am__append_22) $(am__append_23) \ + $(am__append_24) $(am__append_25) $(am__append_26) \ + $(am__append_27) $(am__append_28) $(am__append_29) \ + $(am__append_30) $(am__append_31) +src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} +src_libcyassl_la_LIBADD = $(LIBM) +src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) +src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = support/cyassl.pc +ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c +ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la +ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la +ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c +ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la +ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_client_client_SOURCES = examples/client/client.c +@BUILD_EXAMPLES_TRUE@examples_client_client_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_client_client_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_server_server_SOURCES = examples/server/server.c +@BUILD_EXAMPLES_TRUE@examples_server_server_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_server_server_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c +@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c +@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_SOURCES = \ +@BUILD_EXAMPLES_TRUE@ ctaocrypt/test/test.c \ +@BUILD_EXAMPLES_TRUE@ examples/client/client.c \ +@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.c \ +@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.c \ +@BUILD_EXAMPLES_TRUE@ examples/server/server.c \ +@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.c + +@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@tests_unit_test_SOURCES = \ +@BUILD_EXAMPLES_TRUE@ tests/unit.c \ +@BUILD_EXAMPLES_TRUE@ tests/api.c \ +@BUILD_EXAMPLES_TRUE@ tests/suites.c \ +@BUILD_EXAMPLES_TRUE@ tests/hash.c \ +@BUILD_EXAMPLES_TRUE@ examples/client/client.c \ +@BUILD_EXAMPLES_TRUE@ examples/server/server.c + +@BUILD_EXAMPLES_TRUE@tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +@BUILD_EXAMPLES_TRUE@tests_unit_test_LDADD = src/libcyassl.la +@BUILD_EXAMPLES_TRUE@tests_unit_test_DEPENDENCIES = src/libcyassl.la +@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c +@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap +@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la +@BUILD_MCAPI_TRUE@mcapi_test_SOURCES = mcapi/crypto.c \ +@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.c + +@BUILD_MCAPI_TRUE@mcapi_test_LDADD = src/libcyassl.la +@BUILD_MCAPI_TRUE@mcapi_test_DEPENDENCIES = src/libcyassl.la +@USE_VALGRIND_TRUE@TESTS_ENVIRONMENT = ./valgrind-error.sh +TEST_EXTENSIONS = .test +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .s .test .test$(EXEEXT) .trs +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +stamp-h: $(top_builddir)/config.status $(srcdir)/stamp-h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +cyassl/version.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +cyassl/options.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/options.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +support/cyassl.pc: $(top_builddir)/config.status $(top_srcdir)/support/cyassl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +rpm/spec: $(top_builddir)/config.status $(top_srcdir)/rpm/spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/$(am__dirstamp): + @$(MKDIR_P) src + @: > src/$(am__dirstamp) +src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/$(DEPDIR) + @: > src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-internal.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-io.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-keys.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-ssl.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-tls.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/src + @: > ctaocrypt/src/$(am__dirstamp) +ctaocrypt/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/src/$(DEPDIR) + @: > ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-random.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha256.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-logging.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-error.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-memory.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-fips_test.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-coding.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-pwdbased.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/aes_asm.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-camellia.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-ripemd.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-sha512.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-blake2b.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-sniffer.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-hc128.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-rabbit.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-integer.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-ocsp.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_libcyassl_la-crl.lo: src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-compress.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/src/src_libcyassl_la-pkcs7.lo: \ + ctaocrypt/src/$(am__dirstamp) \ + ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) + +src/libcyassl.la: $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_DEPENDENCIES) $(EXTRA_src_libcyassl_la_DEPENDENCIES) src/$(am__dirstamp) + $(AM_V_CCLD)$(src_libcyassl_la_LINK) -rpath $(libdir) $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +ctaocrypt/benchmark/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/benchmark + @: > ctaocrypt/benchmark/$(am__dirstamp) +ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/benchmark/$(DEPDIR) + @: > ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/benchmark/benchmark.$(OBJEXT): \ + ctaocrypt/benchmark/$(am__dirstamp) \ + ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) + +ctaocrypt/benchmark/benchmark$(EXEEXT): $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_DEPENDENCIES) $(EXTRA_ctaocrypt_benchmark_benchmark_DEPENDENCIES) ctaocrypt/benchmark/$(am__dirstamp) + @rm -f ctaocrypt/benchmark/benchmark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_LDADD) $(LIBS) +ctaocrypt/test/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/test + @: > ctaocrypt/test/$(am__dirstamp) +ctaocrypt/test/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ctaocrypt/test/$(DEPDIR) + @: > ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) +ctaocrypt/test/test.$(OBJEXT): ctaocrypt/test/$(am__dirstamp) \ + ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) + +ctaocrypt/test/testctaocrypt$(EXEEXT): $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_DEPENDENCIES) $(EXTRA_ctaocrypt_test_testctaocrypt_DEPENDENCIES) ctaocrypt/test/$(am__dirstamp) + @rm -f ctaocrypt/test/testctaocrypt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_LDADD) $(LIBS) +examples/client/$(am__dirstamp): + @$(MKDIR_P) examples/client + @: > examples/client/$(am__dirstamp) +examples/client/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/client/$(DEPDIR) + @: > examples/client/$(DEPDIR)/$(am__dirstamp) +examples/client/client.$(OBJEXT): examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) + +examples/client/client$(EXEEXT): $(examples_client_client_OBJECTS) $(examples_client_client_DEPENDENCIES) $(EXTRA_examples_client_client_DEPENDENCIES) examples/client/$(am__dirstamp) + @rm -f examples/client/client$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_client_client_OBJECTS) $(examples_client_client_LDADD) $(LIBS) +examples/echoclient/$(am__dirstamp): + @$(MKDIR_P) examples/echoclient + @: > examples/echoclient/$(am__dirstamp) +examples/echoclient/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/echoclient/$(DEPDIR) + @: > examples/echoclient/$(DEPDIR)/$(am__dirstamp) +examples/echoclient/echoclient.$(OBJEXT): \ + examples/echoclient/$(am__dirstamp) \ + examples/echoclient/$(DEPDIR)/$(am__dirstamp) + +examples/echoclient/echoclient$(EXEEXT): $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_DEPENDENCIES) $(EXTRA_examples_echoclient_echoclient_DEPENDENCIES) examples/echoclient/$(am__dirstamp) + @rm -f examples/echoclient/echoclient$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_LDADD) $(LIBS) +examples/echoserver/$(am__dirstamp): + @$(MKDIR_P) examples/echoserver + @: > examples/echoserver/$(am__dirstamp) +examples/echoserver/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/echoserver/$(DEPDIR) + @: > examples/echoserver/$(DEPDIR)/$(am__dirstamp) +examples/echoserver/echoserver.$(OBJEXT): \ + examples/echoserver/$(am__dirstamp) \ + examples/echoserver/$(DEPDIR)/$(am__dirstamp) + +examples/echoserver/echoserver$(EXEEXT): $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_DEPENDENCIES) $(EXTRA_examples_echoserver_echoserver_DEPENDENCIES) examples/echoserver/$(am__dirstamp) + @rm -f examples/echoserver/echoserver$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_LDADD) $(LIBS) +examples/server/$(am__dirstamp): + @$(MKDIR_P) examples/server + @: > examples/server/$(am__dirstamp) +examples/server/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) examples/server/$(DEPDIR) + @: > examples/server/$(DEPDIR)/$(am__dirstamp) +examples/server/server.$(OBJEXT): examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) + +examples/server/server$(EXEEXT): $(examples_server_server_OBJECTS) $(examples_server_server_DEPENDENCIES) $(EXTRA_examples_server_server_DEPENDENCIES) examples/server/$(am__dirstamp) + @rm -f examples/server/server$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examples_server_server_OBJECTS) $(examples_server_server_LDADD) $(LIBS) +mcapi/$(am__dirstamp): + @$(MKDIR_P) mcapi + @: > mcapi/$(am__dirstamp) +mcapi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) mcapi/$(DEPDIR) + @: > mcapi/$(DEPDIR)/$(am__dirstamp) +mcapi/crypto.$(OBJEXT): mcapi/$(am__dirstamp) \ + mcapi/$(DEPDIR)/$(am__dirstamp) +mcapi/mcapi_test.$(OBJEXT): mcapi/$(am__dirstamp) \ + mcapi/$(DEPDIR)/$(am__dirstamp) + +mcapi/test$(EXEEXT): $(mcapi_test_OBJECTS) $(mcapi_test_DEPENDENCIES) $(EXTRA_mcapi_test_DEPENDENCIES) mcapi/$(am__dirstamp) + @rm -f mcapi/test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mcapi_test_OBJECTS) $(mcapi_test_LDADD) $(LIBS) +sslSniffer/sslSnifferTest/$(am__dirstamp): + @$(MKDIR_P) sslSniffer/sslSnifferTest + @: > sslSniffer/sslSnifferTest/$(am__dirstamp) +sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) sslSniffer/sslSnifferTest/$(DEPDIR) + @: > sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) +sslSniffer/sslSnifferTest/snifftest.$(OBJEXT): \ + sslSniffer/sslSnifferTest/$(am__dirstamp) \ + sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) + +sslSniffer/sslSnifferTest/snifftest$(EXEEXT): $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) $(EXTRA_sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) sslSniffer/sslSnifferTest/$(am__dirstamp) + @rm -f sslSniffer/sslSnifferTest/snifftest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_LDADD) $(LIBS) +tests/$(am__dirstamp): + @$(MKDIR_P) tests + @: > tests/$(am__dirstamp) +tests/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tests/$(DEPDIR) + @: > tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-unit.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-api.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-suites.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_unit_test-hash.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +examples/client/tests_unit_test-client.$(OBJEXT): \ + examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) +examples/server/tests_unit_test-server.$(OBJEXT): \ + examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) + +tests/unit.test$(EXEEXT): $(tests_unit_test_OBJECTS) $(tests_unit_test_DEPENDENCIES) $(EXTRA_tests_unit_test_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/unit.test$(EXEEXT) + $(AM_V_CCLD)$(tests_unit_test_LINK) $(tests_unit_test_OBJECTS) $(tests_unit_test_LDADD) $(LIBS) +ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT): \ + ctaocrypt/test/$(am__dirstamp) \ + ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) +examples/client/testsuite_testsuite_test-client.$(OBJEXT): \ + examples/client/$(am__dirstamp) \ + examples/client/$(DEPDIR)/$(am__dirstamp) +examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT): \ + examples/echoclient/$(am__dirstamp) \ + examples/echoclient/$(DEPDIR)/$(am__dirstamp) +examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT): \ + examples/echoserver/$(am__dirstamp) \ + examples/echoserver/$(DEPDIR)/$(am__dirstamp) +examples/server/testsuite_testsuite_test-server.$(OBJEXT): \ + examples/server/$(am__dirstamp) \ + examples/server/$(DEPDIR)/$(am__dirstamp) +testsuite/$(am__dirstamp): + @$(MKDIR_P) testsuite + @: > testsuite/$(am__dirstamp) +testsuite/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) testsuite/$(DEPDIR) + @: > testsuite/$(DEPDIR)/$(am__dirstamp) +testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT): \ + testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp) + +testsuite/testsuite.test$(EXEEXT): $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_DEPENDENCIES) $(EXTRA_testsuite_testsuite_test_DEPENDENCIES) testsuite/$(am__dirstamp) + @rm -f testsuite/testsuite.test$(EXEEXT) + $(AM_V_CCLD)$(testsuite_testsuite_test_LINK) $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f ctaocrypt/benchmark/*.$(OBJEXT) + -rm -f ctaocrypt/src/*.$(OBJEXT) + -rm -f ctaocrypt/src/*.lo + -rm -f ctaocrypt/test/*.$(OBJEXT) + -rm -f examples/client/*.$(OBJEXT) + -rm -f examples/echoclient/*.$(OBJEXT) + -rm -f examples/echoserver/*.$(OBJEXT) + -rm -f examples/server/*.$(OBJEXT) + -rm -f mcapi/*.$(OBJEXT) + -rm -f src/*.$(OBJEXT) + -rm -f src/*.lo + -rm -f sslSniffer/sslSnifferTest/*.$(OBJEXT) + -rm -f tests/*.$(OBJEXT) + -rm -f testsuite/*.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/benchmark/$(DEPDIR)/benchmark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/test/$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/tests_unit_test-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/echoclient.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/echoserver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/tests_unit_test-server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/crypto.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/mcapi_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-crl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-internal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-keys.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-ssl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-tls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-api.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-suites.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-unit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +src/src_libcyassl_la-internal.lo: src/internal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-internal.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-internal.Tpo -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-internal.Tpo src/$(DEPDIR)/src_libcyassl_la-internal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/internal.c' object='src/src_libcyassl_la-internal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c + +src/src_libcyassl_la-io.lo: src/io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-io.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-io.Tpo -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-io.Tpo src/$(DEPDIR)/src_libcyassl_la-io.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/io.c' object='src/src_libcyassl_la-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c + +src/src_libcyassl_la-keys.lo: src/keys.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-keys.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-keys.Tpo -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-keys.Tpo src/$(DEPDIR)/src_libcyassl_la-keys.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/keys.c' object='src/src_libcyassl_la-keys.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c + +src/src_libcyassl_la-ssl.lo: src/ssl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ssl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo src/$(DEPDIR)/src_libcyassl_la-ssl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ssl.c' object='src/src_libcyassl_la-ssl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c + +src/src_libcyassl_la-tls.lo: src/tls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-tls.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-tls.Tpo -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-tls.Tpo src/$(DEPDIR)/src_libcyassl_la-tls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tls.c' object='src/src_libcyassl_la-tls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c + +ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hmac.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/hmac.c' object='ctaocrypt/src/src_libcyassl_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c + +ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-random.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/random.c' object='ctaocrypt/src/src_libcyassl_la-random.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c + +ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha256.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha256.c' object='ctaocrypt/src/src_libcyassl_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c + +ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-logging.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/logging.c' object='ctaocrypt/src/src_libcyassl_la-logging.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c + +ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-port.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/port.c' object='ctaocrypt/src/src_libcyassl_la-port.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c + +ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-error.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/error.c' object='ctaocrypt/src/src_libcyassl_la-error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c + +ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-memory.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/memory.c' object='ctaocrypt/src/src_libcyassl_la-memory.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c + +ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/rsa.c' object='ctaocrypt/src/src_libcyassl_la-rsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c + +ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dh.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/dh.c' object='ctaocrypt/src/src_libcyassl_la-dh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c + +ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-asn.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/asn.c' object='ctaocrypt/src/src_libcyassl_la-asn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c + +ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/fips.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips.c' object='ctaocrypt/src/src_libcyassl_la-fips.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c + +ctaocrypt/src/src_libcyassl_la-fips_test.lo: ctaocrypt/src/fips_test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips_test.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips_test.c' object='ctaocrypt/src/src_libcyassl_la-fips_test.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c + +ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-coding.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/coding.c' object='ctaocrypt/src/src_libcyassl_la-coding.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c + +ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-aes.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/aes.c' object='ctaocrypt/src/src_libcyassl_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c + +ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-des3.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/des3.c' object='ctaocrypt/src/src_libcyassl_la-des3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c + +ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha.c' object='ctaocrypt/src/src_libcyassl_la-sha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c + +ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-arc4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/arc4.c' object='ctaocrypt/src/src_libcyassl_la-arc4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c + +ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/md4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md4.c' object='ctaocrypt/src/src_libcyassl_la-md4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c + +ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md5.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md5.c' object='ctaocrypt/src/src_libcyassl_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c + +ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pwdbased.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/pwdbased.c' object='ctaocrypt/src/src_libcyassl_la-pwdbased.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c + +ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/dsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/dsa.c' object='ctaocrypt/src/src_libcyassl_la-dsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c + +ctaocrypt/src/src_libcyassl_la-camellia.lo: ctaocrypt/src/camellia.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-camellia.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/camellia.c' object='ctaocrypt/src/src_libcyassl_la-camellia.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c + +ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/md2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md2.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md2.c' object='ctaocrypt/src/src_libcyassl_la-md2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c + +ctaocrypt/src/src_libcyassl_la-ripemd.lo: ctaocrypt/src/ripemd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ripemd.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/ripemd.c' object='ctaocrypt/src/src_libcyassl_la-ripemd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c + +ctaocrypt/src/src_libcyassl_la-sha512.lo: ctaocrypt/src/sha512.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha512.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha512.c' object='ctaocrypt/src/src_libcyassl_la-sha512.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c + +ctaocrypt/src/src_libcyassl_la-blake2b.lo: ctaocrypt/src/blake2b.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-blake2b.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/blake2b.c' object='ctaocrypt/src/src_libcyassl_la-blake2b.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c + +src/src_libcyassl_la-sniffer.lo: src/sniffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-sniffer.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sniffer.c' object='src/src_libcyassl_la-sniffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c + +ctaocrypt/src/src_libcyassl_la-hc128.lo: ctaocrypt/src/hc128.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hc128.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/hc128.c' object='ctaocrypt/src/src_libcyassl_la-hc128.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c + +ctaocrypt/src/src_libcyassl_la-rabbit.lo: ctaocrypt/src/rabbit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rabbit.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/rabbit.c' object='ctaocrypt/src/src_libcyassl_la-rabbit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c + +ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/misc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-misc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/misc.c' object='ctaocrypt/src/src_libcyassl_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c + +ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/tfm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-tfm.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/tfm.c' object='ctaocrypt/src/src_libcyassl_la-tfm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c + +ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-integer.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/integer.c' object='ctaocrypt/src/src_libcyassl_la-integer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c + +ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ecc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/ecc.c' object='ctaocrypt/src/src_libcyassl_la-ecc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c + +src/src_libcyassl_la-ocsp.lo: src/ocsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ocsp.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ocsp.c' object='src/src_libcyassl_la-ocsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c + +src/src_libcyassl_la-crl.lo: src/crl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-crl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-crl.Tpo -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-crl.Tpo src/$(DEPDIR)/src_libcyassl_la-crl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/crl.c' object='src/src_libcyassl_la-crl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c + +ctaocrypt/src/src_libcyassl_la-compress.lo: ctaocrypt/src/compress.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-compress.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/compress.c' object='ctaocrypt/src/src_libcyassl_la-compress.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c + +ctaocrypt/src/src_libcyassl_la-pkcs7.lo: ctaocrypt/src/pkcs7.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pkcs7.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/pkcs7.c' object='ctaocrypt/src/src_libcyassl_la-pkcs7.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c + +tests/tests_unit_test-unit.o: tests/unit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c + +tests/tests_unit_test-unit.obj: tests/unit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` + +tests/tests_unit_test-api.o: tests/api.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c + +tests/tests_unit_test-api.obj: tests/api.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` + +tests/tests_unit_test-suites.o: tests/suites.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c + +tests/tests_unit_test-suites.obj: tests/suites.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` + +tests/tests_unit_test-hash.o: tests/hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c + +tests/tests_unit_test-hash.obj: tests/hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` + +examples/client/tests_unit_test-client.o: examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + +examples/client/tests_unit_test-client.obj: examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + +examples/server/tests_unit_test-server.o: examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + +examples/server/tests_unit_test-server.obj: examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + +ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.o -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c + +ctaocrypt/test/testsuite_testsuite_test-test.obj: ctaocrypt/test/test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.obj -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` + +examples/client/testsuite_testsuite_test-client.o: examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c + +examples/client/testsuite_testsuite_test-client.obj: examples/client/client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` + +examples/echoclient/testsuite_testsuite_test-echoclient.o: examples/echoclient/echoclient.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.o -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c + +examples/echoclient/testsuite_testsuite_test-echoclient.obj: examples/echoclient/echoclient.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.obj -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` + +examples/echoserver/testsuite_testsuite_test-echoserver.o: examples/echoserver/echoserver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.o -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c + +examples/echoserver/testsuite_testsuite_test-echoserver.obj: examples/echoserver/echoserver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.obj -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` + +examples/server/testsuite_testsuite_test-server.o: examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c + +examples/server/testsuite_testsuite_test-server.obj: examples/server/server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` + +testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.o -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c + +testsuite/testsuite_testsuite_test-testsuite.obj: testsuite/testsuite.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.obj -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` + +.s.o: + $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $< + +.s.obj: + $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.s.lo: + $(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf ctaocrypt/benchmark/.libs ctaocrypt/benchmark/_libs + -rm -rf ctaocrypt/src/.libs ctaocrypt/src/_libs + -rm -rf ctaocrypt/test/.libs ctaocrypt/test/_libs + -rm -rf examples/client/.libs examples/client/_libs + -rm -rf examples/echoclient/.libs examples/echoclient/_libs + -rm -rf examples/echoserver/.libs examples/echoserver/_libs + -rm -rf examples/server/.libs examples/server/_libs + -rm -rf mcapi/.libs mcapi/_libs + -rm -rf src/.libs src/_libs + -rm -rf sslSniffer/sslSnifferTest/.libs sslSniffer/sslSnifferTest/_libs + -rm -rf tests/.libs tests/_libs + -rm -rf testsuite/.libs testsuite/_libs + +distclean-libtool: + -rm -f libtool config.lt +install-dist_docDATA: $(dist_doc_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ + done + +uninstall-dist_docDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) +install-dist_exampleDATA: $(dist_example_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \ + done + +uninstall-dist_exampleDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ + echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ + $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +mcapi/test.log: mcapi/test$(EXEEXT) + @p='mcapi/test$(EXEEXT)'; \ + b='mcapi/test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ + config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/benchmark/$(am__dirstamp) + -rm -f ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/src/$(am__dirstamp) + -rm -f ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) + -rm -f ctaocrypt/test/$(am__dirstamp) + -rm -f examples/client/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/client/$(am__dirstamp) + -rm -f examples/echoclient/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/echoclient/$(am__dirstamp) + -rm -f examples/echoserver/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/echoserver/$(am__dirstamp) + -rm -f examples/server/$(DEPDIR)/$(am__dirstamp) + -rm -f examples/server/$(am__dirstamp) + -rm -f mcapi/$(DEPDIR)/$(am__dirstamp) + -rm -f mcapi/$(am__dirstamp) + -rm -f src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/$(am__dirstamp) + -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) + -rm -f sslSniffer/sslSnifferTest/$(am__dirstamp) + -rm -f tests/$(DEPDIR)/$(am__dirstamp) + -rm -f tests/$(am__dirstamp) + -rm -f testsuite/$(DEPDIR)/$(am__dirstamp) + -rm -f testsuite/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_docDATA install-dist_exampleDATA \ + install-includeHEADERS install-nobase_includeHEADERS \ + install-pkgconfigDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-exec-local \ + install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ + uninstall-dist_exampleDATA uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA + +.MAKE: all check check-am install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ + check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ + clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ + install-data-am install-dist_docDATA install-dist_exampleDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_includeHEADERS install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \ + uninstall-dist_exampleDATA uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA + + +#includes additional rules from aminclude.am +@INC_AMINCLUDE@ + +rpm-build: rpm/spec dist + @rm -f *.rpm + @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm + @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm + @mkdir -p ~/rpmbuild/BUILD/ + @mkdir -p ~/rpmbuild/RPMS/i386/ + @mkdir -p ~/rpmbuild/RPMS/i686/ + @mkdir -p ~/rpmbuild/RPMS/noarch/ + @mkdir -p ~/rpmbuild/RPMS/x86_64/ + @mkdir -p ~/rpmbuild/SOURCES/ + @mkdir -p ~/rpmbuild/SPECS/ + @mkdir -p ~/rpmbuild/SRPMS/ + @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ + @rpmbuild -ba --clean rpm/spec + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . + @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . + +rpm-sign: rpm-build + @rpm --addsign *.rpm + @rpm --checksig *.rpm + +clean-rpm: + @rm -f *.tar.gz + @rm -f *.src.rpm + @rm -f *.rpm + +rpm: rpm-build + +release: rpm-sign + +auto-rpmbuild: + @auto-br-rpmbuild -ba rpm/spec +test: check +tests/unit.log: testsuite/testsuite.log + +maintainer-clean-local: + -rm Makefile.in + -rm aclocal.m4 + -rm build-aux/compile + -rm build-aux/config.guess + -rm build-aux/config.sub + -rm build-aux/depcomp + -rm build-aux/install-sh + -rm build-aux/ltmain.sh + -rm build-aux/missing + -rm cyassl-config + -rmdir build-aux + -rm configure + -rm config.log + -rm config.status + -rm config.in + -rm m4/libtool.m4 + -rm m4/ltoptions.m4 + -rm m4/ltsugar.m4 + -rm m4/ltversion.m4 + -rm m4/lt~obsolete.m4 + -rm support/cyassl.pc + find . -type f -name '*~' -exec rm -f '{}' \; + -rm -f @PACKAGE@-*.tar.gz + -rm -f @PACKAGE@-*.rpm + +# !!!! first line of rule has to start with a hard (real) tab, not spaces +egs: + $(MAKE) examples/client/client; \ + $(MAKE) examples/echoclient/echoclient;\ + $(MAKE) examples/server/server; \ + $(MAKE) examples/echoserver/echoserver; + +ctc: + $(MAKE) ctaocrypt/test/testctaocrypt; \ + $(MAKE) ctaocrypt/benchmark/benchmark; + +install-exec-local: install-generic-config + +install-generic-config: + $(mkinstalldirs) $(DESTDIR)$(bindir) + $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) + +uninstall-local: + -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@ + +merge-clean: + @find ./ | $(GREP) \.gcda | xargs rm -f + @find ./ | $(GREP) \.gcno | xargs rm -f + @find ./ | $(GREP) \.gz | xargs rm -f + @find ./ | $(GREP) \.orig | xargs rm -f + @find ./ | $(GREP) \.rej | xargs rm -f + @find ./ | $(GREP) \.rpm | xargs rm -f + @find ./ | $(GREP) \.THIS | xargs rm -f + @find ./ | $(GREP) \.OTHER | xargs rm -f + @find ./ | $(GREP) \.BASE | xargs rm -f + @find ./ | $(GREP) \~$$ | xargs rm -f + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/project1/cyassl-3.0.0/NEWS b/project1/cyassl-3.0.0/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/README b/project1/cyassl-3.0.0/README new file mode 100644 index 00000000..9e3c58ea --- /dev/null +++ b/project1/cyassl-3.0.0/README @@ -0,0 +1,996 @@ +*** Notes, Please read *** + +Note 1) +CyaSSL now needs all examples and tests to be run from the CyaSSL home +directory. This is because it finds certs and keys from ./certs/. Trying to +maintain the ability to run each program from its own directory, the testsuite +directory, the main directory (for make check/test), and for the various +different project layouts (with or without config) was becoming harder and +harder. Now to run testsuite just do: + +./testsuite/testsuite + +or + +make check (when using autoconf) + +On *nix or Windows the examples and testsuite will check to see if the current +directory is the source directory and if so, attempt to change to the CyaSSL +home directory. This should work in most setup cases, if not, just follow the +beginning of the note and specify the full path. + + +Note 2) +CyaSSL takes a different approach to certificate verification than OpenSSL does. +The default policy for the client is to verify the server, this means that if +you don't load CAs to verify the server you'll get a connect error, no signer +error to confirm failure (-188). If you want to mimic OpenSSL behavior of +having SSL_connect succeed even if verifying the server fails and reducing +security you can do this by calling: + +SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + +before calling SSL_new(); Though it's not recommended. + +*** end Notes *** + + +CyaSSL Release 3.0.0 (04/29/2014) + +Release 3.0.0 CyaSSL has bug fixes and new features including: + +- FIPS release candidate +- X.509 improvements that address items reported by Suman Jana with security + researchers at UT Austin and UC Davis +- Small stack size improvements, --enable-smallstack. Offloads large local + variables to the heap. (Note this is not complete.) +- Updated AES-CCM-8 cipher suites to use approved suite numbers. + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + +************ CyaSSL Release 2.9.4 (04/09/2014) + +Release 2.9.4 CyaSSL has bug fixes and new features including: + +- Security fixes that address items reported by Ivan Fratric of the Google + Security Team +- X.509 Unknown critical extensions treated as errors, report by Suman Jana with + security researchers at UT Austin and UC Davis +- Sniffer fixes for corrupted packet length and Jumbo frames +- ARM thumb mode assembly fixes +- Xcode 5.1 support including new clang +- PIC32 MZ hardware support +- CyaSSL Object has enough room to read the Record Header now w/o allocs +- FIPS wrappers for AES, 3DES, SHA1, SHA256, SHA384, HMAC, and RSA. +- A sample I/O pool is demonstrated with --enable-iopool to overtake memory + handling and reduce memory fragmentation on I/O large sizes + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + +************ CyaSSL Release 2.9.0 (02/07/2014) + +Release 2.9.0 CyaSSL has bug fixes and new features including: +- Freescale Kinetis RNGB support +- Freescale Kinetis mmCAU support +- TLS Hello extensions + - ECC + - Secure Renegotiation (null) + - Truncated HMAC +- SCEP support + - PKCS #7 Enveloped data and signed data + - PKCS #10 Certificate Signing Request generation +- DTLS sliding window +- OCSP Improvements + - API change to integrate into Certificate Manager + - IPv4/IPv6 agnostic + - example client/server support for OCSP + - OCSP nonces are optional +- GMAC hashing +- Windows build additions +- Windows CYGWIN build fixes +- Updated test certificates +- Microchip MPLAB Harmony support +- Update autoconf scripts +- Additional X.509 inspection functions +- ECC encrypt/decrypt primitives +- ECC Certificate generation + +The Freescale Kinetis K53 RNGB documentation can be found in Chapter 33 of the +K53 Sub-Family Reference Manual: +http://cache.freescale.com/files/32bit/doc/ref_manual/K53P144M100SF2RM.pdf + +Freescale Kinetis K60 mmCAU (AES, DES, 3DES, MD5, SHA, SHA256) documentation +can be found in the "ColdFire/ColdFire+ CAU and Kinetis mmCAU Software Library +User Guide": +http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf + + +*****************CyaSSL Release 2.8.0 (8/30/2013) + +Release 2.8.0 CyaSSL has bug fixes and new features including: +- AES-GCM and AES-CCM use AES-NI +- NetX default IO callback handlers +- IPv6 fixes for DTLS Hello Cookies +- The ability to unload Certs/Keys after the handshake, CyaSSL_UnloadCertsKeys() +- SEP certificate extensions +- Callback getters for easier resource freeing +- External CYASSL_MAX_ERROR_SZ for correct error buffer sizing +- MacEncrypt and DecryptVerify Callbacks for User Atomic Record Layer Processing +- Public Key Callbacks for ECC and RSA +- Client now sends blank cert upon request if doesn't have one with TLS <= 1.2 + + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + +*****************CyaSSL Release 2.7.0 (6/17/2013) + +Release 2.7.0 CyaSSL has bug fixes and new features including: +- SNI support for client and server +- KEIL MDK-ARM projects +- Wildcard check to domain name match, and Subject altnames are checked too +- Better error messages for certificate verification errors +- Ability to discard session during handshake verify +- More consistent error returns across all APIs +- Ability to unload CAs at the CTX or CertManager level +- Authority subject id support for Certificate matching +- Persistent session cache functionality +- Persistent CA cache functionality +- Client session table lookups to push serverID table to library level +- Camellia support to sniffer +- User controllable settings for DTLS timeout values +- Sniffer fixes for caching long lived sessions +- DTLS reliability enhancements for the handshake +- Better ThreadX support + +When compiling with Mingw, libtool may give the following warning due to +path conversion errors: + +libtool: link: Could not determine host file name corresponding to ** +libtool: link: Continuing, but uninstalled executables may not work. + +If so, examples and testsuite will have problems when run, showing an +error while loading shared libraries. To resolve, please run "make install". + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + +************** CyaSSL Release 2.6.0 (04/15/2013) + +Release 2.6.0 CyaSSL has bug fixes and new features including: +- DTLS 1.2 support including AEAD ciphers +- SHA-3 finalist Blake2 support, it's fast and uses little resources +- SHA-384 cipher suites including ECC ones +- HMAC now supports SHA-512 +- Track memory use for example client/server with -t option +- Better IPv6 examples with --enable-ipv6, before if ipv6 examples/tests were + turned on, localhost only was used. Now link-local (with scope ids) and ipv6 + hosts can be used as well. +- Xcode v4.6 project for iOS v6.1 update +- settings.h is now checked in all *.c files for true one file setting detection +- Better alignment at SSL layer for hardware crypto alignment needs + * Note, SSL itself isn't friendly to alignment with 5 byte TLS headers and + 13 bytes DTLS headers, but every effort is now made to align with the + CYASSL_GENERAL_ALIGNMENT flag which sets desired alignment requirement +- NO_64BIT flag to turn off 64bit data type accumulators in public key code + * Note, some systems are faster with 32bit accumulators +- --enable-stacksize for example client/server stack use + * Note, modern desktop Operating Systems may add bytes to each stack frame +- Updated compression/decompression with direct crypto access +- All ./configure options are now lowercase only for consistency +- ./configure builds default to fastmath option + * Note, if on ia32 and building in shared mode this may produce a problem + with a missing register being available because of PIC, there are at least + 5 solutions to this: + 1) --disable-fastmath , don't use fastmath + 2) --disable-shared, don't build a shared library + 3) C_EXTRA_FLAGS=-DTFM_NO_ASM , turn off assembly use + 4) use clang, it just seems to work + 5) play around with no PIC options to force all registers being open +- Many new ./configure switches for option enable/disable for example + * rsa + * dh + * dsa + * md5 + * sha + * arc4 + * null (allow NULL ciphers) + * oldtls (only use TLS 1.2) + * asn (no certs or public keys allowed) +- ./configure generates cyassl/options.h which allows a header the user can + include in their app to make sure the same options are set at the app and + CyaSSL level. +- autoconf no longer needs serial-tests which lowers version requirements of + automake to 1.11 and autoconf to 2.63 + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +************** CyaSSL Release 2.5.0 (02/04/2013) + +Release 2.5.0 CyaSSL has bug fixes and new features including: +- Fix for TLS CBC padding timing attack identified by Nadhem Alfardan and + Kenny Paterson: http://www.isg.rhul.ac.uk/tls/ +- Microchip PIC32 (MIPS16, MIPS32) support +- Microchip MPLAB X example projects for PIC32 Ethernet Starter Kit +- Updated CTaoCrypt benchmark app for embedded systems +- 1024-bit test certs/keys and cert/key buffers +- AES-CCM-8 crypto and cipher suites +- Camellia crypto and cipher suites +- Bumped minimum autoconf version to 2.65, automake version to 1.12 +- Addition of OCSP callbacks +- STM32F2 support with hardware crypto and RNG +- Cavium NITROX support + +CTaoCrypt now has support for the Microchip PIC32 and has been tested with +the Microchip PIC32 Ethernet Starter Kit, the XC32 compiler and +MPLAB X IDE in both MIPS16 and MIPS32 instruction set modes. See the README +located under the /mplabx directory for more details. + +To add Cavium NITROX support do: + +./configure --with-cavium=/home/user/cavium/software + +pointing to your licensed cavium/software directory. Since Cavium doesn't +build a library we pull in the cavium_common.o file which gives a libtool +warning about the portability of this. Also, if you're using the github source +tree you'll need to remove the -Wredundant-decls warning from the generated +Makefile because the cavium headers don't conform to this warning. Currently +CyaSSL supports Cavium RNG, AES, 3DES, RC4, HMAC, and RSA directly at the crypto +layer. Support at the SSL level is partial and currently just does AES, 3DES, +and RC4. RSA and HMAC are slower until the Cavium calls can be utilized in non +blocking mode. The example client turns on cavium support as does the crypto +test and benchmark. Please see the HAVE_CAVIUM define. + +CyaSSL is able to use the STM32F2 hardware-based cryptography and random number +generator through the STM32F2 Standard Peripheral Library. For necessary +defines, see the CYASSL_STM32F2 define in settings.h. Documentation for the +STM32F2 Standard Peripheral Library can be found in the following document: +http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00023896.pdf + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +*************** CyaSSL Release 2.4.6 (12/20/2012) + +Release 2.4.6 CyaSSL has bug fixes and a few new features including: +- ECC into main version +- Lean PSK build (reduced code size, RAM usage, and stack usage) +- FreeBSD CRL monitor support +- CyaSSL_peek() +- CyaSSL_send() and CyaSSL_recv() for I/O flag setting +- CodeWarrior Support +- MQX Support +- Freescale Kinetis support including Hardware RNG +- autoconf builds use jobserver +- cyassl-config +- Sniffer memory reductions + +Thanks to Brian Aker for the improved autoconf system, make rpm, cyassl-config, +warning system, and general good ideas for improving CyaSSL! + +The Freescale Kinetis K70 RNGA documentation can be found in Chapter 37 of the +K70 Sub-Family Reference Manual: +http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K70P256M150SF3RM.pdf + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + +*************** CyaSSL Release 2.4.0 (10/10/2012) + +Release 2.4.0 CyaSSL has bug fixes and a few new features including: +- DTLS reliability +- Reduced memory usage after handshake +- Updated build process + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +*************** CyaSSL Release 2.3.0 (8/10/2012) + +Release 2.3.0 CyaSSL has bug fixes and a few new features including: +- AES-GCM crypto and cipher suites +- make test cipher suite checks +- Subject AltName processing +- Command line support for client/server examples +- Sniffer SessionTicket support +- SHA-384 cipher suites +- Verify cipher suite validity when user overrides +- CRL dir monitoring +- DTLS Cookie support, reliability coming soon + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +***************CyaSSL Release 2.2.0 (5/18/2012) + +Release 2.2.0 CyaSSL has bug fixes and a few new features including: +- Initial CRL support (--enable-crl) +- Initial OCSP support (--enable-ocsp) +- Add static ECDH suites +- SHA-384 support +- ECC client certificate support +- Add medium session cache size (1055 sessions) +- Updated unit tests +- Protection against mutex reinitialization + + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +***************CyaSSL Release 2.0.8 (2/24/2012) + +Release 2.0.8 CyaSSL has bug fixes and a few new features including: +- A fix for malicious certificates pointed out by Remi Gacogne (thanks) + resulting in NULL pointer use. +- Respond to renegotiation attempt with no_renegoatation alert +- Add basic path support for load_verify_locations() +- Add set Temp EC-DHE key size +- Extra checks on rsa test when porting into + + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +************* CyaSSL Release 2.0.6 (1/27/2012) + +Release 2.0.6 CyaSSL has bug fixes and a few new features including: +- Fixes for CA basis constraint check +- CTX reference counting +- Initial unit test additions +- Lean and Mean Windows fix +- ECC benchmarking +- SSMTP build support +- Ability to group handshake messages with set_group_messages(ctx/ssl) +- CA cache addition callback +- Export Base64_Encode for general use + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +************* CyaSSL Release 2.0.2 (12/05/2011) + +Release 2.0.2 CyaSSL has bug fixes and a few new features including: +- CTaoCrypt Runtime library detection settings when directly using the crypto + library +- Default certificate generation now uses SHAwRSA and adds SHA256wRSA generation +- All test certificates now use 2048bit and SHA-1 for better modern browser + support +- Direct AES block access and AES-CTR (counter) mode +- Microchip pic32 support + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + + + +************* CyaSSL Release 2.0.0rc3 (9/28/2011) + +Release 2.0.0rc3 for CyaSSL has bug fixes and a few new features including: +- updated autoconf support +- better make install and uninstall (uses system directories) +- make test / make check +- CyaSSL headers now in +- CTaocrypt headers now in +- OpenSSL compatibility headers now in +- examples and tests all run from home directory so can use certs in ./certs + (see note 1) + +So previous applications that used the OpenSSL compatibility header + now need to include instead, no other +changes are required. + +Special Thanks to Brian Aker for his autoconf, install, and header patches. + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + +************CyaSSL Release 2.0.0rc2 (6/6/2011) + +Release 2.0.0rc2 for CyaSSL has bug fixes and a few new features including: +- bug fixes (Alerts, DTLS with DHE) +- FreeRTOS support +- lwIP support +- Wshadow warnings removed +- asn public header +- CTaoCrypt public headers now all have ctc_ prefix (the manual is still being + updated to reflect this change) +- and more. + +This is the 2nd and perhaps final release candidate for version 2. +Please send any comments or questions to support@yassl.com. + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + +***********CyaSSL Release 2.0.0rc1 (5/2/2011) + +Release 2.0.0rc1 for CyaSSL has many new features including: +- bug fixes +- SHA-256 cipher suites +- Root Certificate Verification (instead of needing all certs in the chain) +- PKCS #8 private key encryption (supports PKCS #5 v1-v2 and PKCS #12) +- Serial number retrieval for x509 +- PBKDF2 and PKCS #12 PBKDF +- UID parsing for x509 +- SHA-256 certificate signatures +- Client and server can send chains (SSL_CTX_use_certificate_chain_file) +- CA loading can now parse multiple certificates per file +- Dynamic memory runtime hooks +- Runtime hooks for logging +- EDH on server side +- More informative error codes +- More informative logging messages +- Version downgrade more robust (use SSL_v23*) +- Shared build only by default through ./configure +- Compiler visibility is now used, internal functions not polluting namespace +- Single Makefile, no recursion, for faster and simpler building +- Turn on all warnings possible build option, warning fixes +- and more. + +Because of all the new features and the multiple OS, compiler, feature-set +options that CyaSSL allows, there may be some configuration fixes needed. +Please send any comments or questions to support@yassl.com. + +The CyaSSL manual is available at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions +and comments about the new features please check the manual. + +****************** CyaSSL Release 1.9.0 (3/2/2011) + +Release 1.9.0 for CyaSSL adds bug fixes, improved TLSv1.2 through testing and +better hash/sig algo ids, --enable-webServer for the yaSSL embedded web server, +improper AES key setup detection, user cert verify callback improvements, and +more. + +The CyaSSL manual offering is included in the doc/ directory. For build +instructions and comments about the new features please check the manual. + +Please send any comments or questions to support@yassl.com. + +****************** CyaSSL Release 1.8.0 (12/23/2010) + +Release 1.8.0 for CyaSSL adds bug fixes, x509 v3 CA signed certificate +generation, a C standard library abstraction layer, lower memory use, increased +portability through the os_settings.h file, and the ability to use NTRU cipher +suites when used in conjunction with an NTRU license and library. + +The initial CyaSSL manual offering is included in the doc/ directory. For +build instructions and comments about the new features please check the manual. + +Please send any comments or questions to support@yassl.com. + +Happy Holidays. + + +********************* CyaSSL Release 1.6.5 (9/9/2010) + +Release 1.6.5 for CyaSSL adds bug fixes and x509 v3 self signed certificate +generation. + +For general build instructions see doc/Building_CyaSSL.pdf. + +To enable certificate generation support add this option to ./configure +./configure --enable-certgen + +An example is included in ctaocrypt/test/test.c and documentation is provided +in doc/CyaSSL_Extensions_Reference.pdf item 11. + +********************** CyaSSL Release 1.6.0 (8/27/2010) + +Release 1.6.0 for CyaSSL adds bug fixes, RIPEMD-160, SHA-512, and RSA key +generation. + +For general build instructions see doc/Building_CyaSSL.pdf. + +To add RIPEMD-160 support add this option to ./configure +./configure --enable-ripemd + +To add SHA-512 support add this option to ./configure +./configure --enable-sha512 + +To add RSA key generation support add this option to ./configure +./configure --enable-keygen + +Please see ctaocrypt/test/test.c for examples and usage. + +For Windows, RIPEMD-160 and SHA-512 are enabled by default but key generation is +off by default. To turn key generation on add the define CYASSL_KEY_GEN to +CyaSSL. + + +************* CyaSSL Release 1.5.6 (7/28/2010) + +Release 1.5.6 for CyaSSL adds bug fixes, compatibility for our JSSE provider, +and a fix for GCC builds on some systems. + +For general build instructions see doc/Building_CyaSSL.pdf. + +To add AES-NI support add this option to ./configure +./configure --enable-aesni + +You'll need GCC 4.4.3 or later to make use of the assembly. + +************** CyaSSL Release 1.5.4 (7/7/2010) + +Release 1.5.4 for CyaSSL adds bug fixes, support for AES-NI, SHA1 speed +improvements from loop unrolling, and support for the Mongoose Web Server. + +For general build instructions see doc/Building_CyaSSL.pdf. + +To add AES-NI support add this option to ./configure +./configure --enable-aesni + +You'll need GCC 4.4.3 or later to make use of the assembly. + +*************** CyaSSL Release 1.5.0 (5/11/2010) + +Release 1.5.0 for CyaSSL adds bug fixes, GoAhead WebServer support, sniffer +support, and initial swig interface support. + +For general build instructions see doc/Building_CyaSSL.pdf. + +To add support for GoAhead WebServer either --enable-opensslExtra or if you +don't want all the features of opensslExtra you can just define GOAHEAD_WS +instead. GOAHEAD_WS can be added to ./configure with CFLAGS=-DGOAHEAD_WS or +you can define it yourself. + +To look at the sniffer support please see the sniffertest app in +sslSniffer/sslSnifferTest. Build with --enable-sniffer on *nix or use the +vcproj files on windows. You'll need to have pcap installed on *nix and +WinPcap on windows. + +A swig interface file is now located in the swig directory for using Python, +Java, Perl, and others with CyaSSL. This is initial support and experimental, +please send questions or comments to support@yassl.com. + +When doing load testing with CyaSSL, on the echoserver example say, the client +machine may run out of tcp ephemeral ports, they will end up in the TIME_WAIT +queue, and can't be reused by default. There are generally two ways to fix +this. 1) Reduce the length sockets remain on the TIME_WAIT queue or 2) Allow +items on the TIME_WAIT queue to be reused. + + +To reduce the TIME_WAIT length in OS X to 3 seconds (3000 milliseconds) + +sudo sysctl -w net.inet.tcp.msl=3000 + +In Linux + +sudo sysctl -w net.ipv4.tcp_tw_reuse=1 + +allows reuse of sockets in TIME_WAIT + +sudo sysctl -w net.ipv4.tcp_tw_recycle=1 + +works but seems to remove sockets from TIME_WAIT entirely? + +sudo sysctl -w net.ipv4.tcp_fin_timeout=1 + +doen't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts + + +******************** CyaSSL Release 1.4.0 (2/18/2010) + +Release 1.3.0 for CyaSSL adds bug fixes, better multi TLS/SSL version support +through SSLv23_server_method(), and improved documentation in the doc/ folder. + +For general build instructions doc/Building_CyaSSL.pdf. + +******************** CyaSSL Release 1.3.0 (1/21/2010) + +Release 1.3.0 for CyaSSL adds bug fixes, a potential security problem fix, +better porting support, removal of assert()s, and a complete THREADX port. + +For general build instructions see rc1 below. + +******************** CyaSSL Release 1.2.0 (11/2/2009) + +Release 1.2.0 for CyaSSL adds bug fixes and session negotiation if first use is +read or write. + +For general build instructions see rc1 below. + +******************** CyaSSL Release 1.1.0 (9/2/2009) + +Release 1.1.0 for CyaSSL adds bug fixes, a check against malicious session +cache use, support for lighttpd, and TLS 1.2. + +To get TLS 1.2 support please use the client and server functions: + +SSL_METHOD *TLSv1_2_server_method(void); +SSL_METHOD *TLSv1_2_client_method(void); + +CyaSSL was tested against lighttpd 1.4.23. To build CyaSSL for use with +lighttpd use the following commands from the CyaSSL install dir : + +./configure --disable-shared --enable-opensslExtra --enable-fastmath --without-zlib + +make +make openssl-links + +Then to build lighttpd with CyaSSL use the following commands from the +lighttpd install dir: + +./configure --with-openssl --with-openssl-includes=/include --with-openssl-libs=/lib LDFLAGS=-lm + +make + +On some systems you may get a linker error about a duplicate symbol for +MD5_Init or other MD5 calls. This seems to be caused by the lighttpd src file +md5.c, which defines MD5_Init(), and is included in liblightcomp_la-md5.o. +When liblightcomp is linked with the SSL_LIBs the linker may complain about +the duplicate symbol. This can be fixed by editing the lighttpd src file md5.c +and adding this line to the beginning of the file: + +#if 0 + +and this line to the end of the file + +#endif + +Then from the lighttpd src dir do a: + +make clean +make + + +If you get link errors about undefined symbols more than likely the actual +OpenSSL libraries are found by the linker before the CyaSSL openssl-links that +point to the CyaSSL library, causing the linker confusion. This can be fixed +by editing the Makefile in the lighttpd src directory and changing the line: + +SSL_LIB = -lssl -lcrypto + +to + +SSL_LIB = -lcyassl + +Then from the lighttpd src dir do a: + +make clean +make + +This should remove any confusion the linker may be having with missing symbols. + +For any questions or concerns please contact support@yassl.com . + +For general build instructions see rc1 below. + +******************CyaSSL Release 1.0.6 (8/03/2009) + +Release 1.0.6 for CyaSSL adds bug fixes, an improved session cache, and faster +math with a huge code option. + +The session cache now defaults to a client mode, also good for embedded servers. +For servers not under heavy load (less than 200 new sessions per minute), define +BIG_SESSION_CACHE. If the server will be under heavy load, define +HUGE_SESSION_CACHE. + +There is now a fasthugemath option for configure. This enables fastmath plus +even faster math by greatly increasing the code size of the math library. Use +the benchmark utility to compare public key operations. + + +For general build instructions see rc1 below. + +******************CyaSSL Release 1.0.3 (5/10/2009) + +Release 1.0.3 for CyaSSL adds bug fixes and add increased support for OpenSSL +compatibility when building other applications. + +Release 1.0.3 includes an alpha release of DTLS for both client and servers. +This is only for testing purposes at this time. Rebroadcast and reordering +aren't fully implemented at this time but will be for the next release. + +For general build instructions see rc1 below. + +******************CyaSSL Release 1.0.2 (4/3/2009) + +Release 1.0.2 for CyaSSL adds bug fixes for a couple I/O issues. Some systems +will send a SIGPIPE on socket recv() at any time and this should be handled by +the application by turning off SIGPIPE through setsockopt() or returning from +the handler. + +Release 1.0.2 includes an alpha release of DTLS for both client and servers. +This is only for testing purposes at this time. Rebroadcast and reordering +aren't fully implemented at this time but will be for the next release. + +For general build instructions see rc1 below. + +*****************CyaSSL Release Candidiate 3 rc3-1.0.0 (2/25/2009) + + +Release Candidate 3 for CyaSSL 1.0.0 adds bug fixes and adds a project file for +iPhone development with Xcode. cyassl-iphone.xcodeproj is located in the root +directory. This release also includes a fix for supporting other +implementations that bundle multiple messages at the record layer, this was +lost when cyassl i/o was re-implemented but is now fixed. + +For general build instructions see rc1 below. + +*****************CyaSSL Release Candidiate 2 rc2-1.0.0 (1/21/2009) + + +Release Candidate 2 for CyaSSL 1.0.0 adds bug fixes and adds two new stream +ciphers along with their respective cipher suites. CyaSSL adds support for +HC-128 and RABBIT stream ciphers. The new suites are: + +TLS_RSA_WITH_HC_128_SHA +TLS_RSA_WITH_RABBIT_SHA + +And the corresponding cipher names are + +HC128-SHA +RABBIT-SHA + +CyaSSL also adds support for building with devkitPro for PPC by changing the +library proper to use libogc. The examples haven't been changed yet but if +there's interest they can be. Here's an example ./configure to build CyaSSL +for devkitPro: + +./configure --disable-shared CC=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-gcc --host=ppc --without-zlib --enable-singleThreaded RANLIB=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-ranlib CFLAGS="-DDEVKITPRO -DGEKKO" + +For linking purposes you'll need + +LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map" + +For general build instructions see rc1 below. + + +********************CyaSSL Release Candidiate 1 rc1-1.0.0 (12/17/2008) + + +Release Candidate 1 for CyaSSL 1.0.0 contains major internal changes. Several +areas have optimization improvements, less dynamic memory use, and the I/O +strategy has been refactored to allow alternate I/O handling or Library use. +Many thanks to Thierry Fournier for providing these ideas and most of the work. + +Because of these changes, this release is only a candidate since some problems +are probably inevitable on some platform with some I/O use. Please report any +problems and we'll try to resolve them as soon as possible. You can contact us +at support@yassl.com or todd@yassl.com. + +Using TomsFastMath by passing --enable-fastmath to ./configure now uses assembly +on some platforms. This is new so please report any problems as every compiler, +mode, OS combination hasn't been tested. On ia32 all of the registers need to +be available so be sure to pass these options to CFLAGS: + +CFLAGS="-O3 -fomit-frame-pointer" + +OS X will also need -mdynamic-no-pic added to CFLAGS + +Also if you're building in shared mode for ia32 you'll need to pass options to +LDFLAGS as well on OS X: + +LDFLAGS=-Wl,-read_only_relocs,warning + +This gives warnings for some symbols but seems to work. + + +--To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin: + + ./configure + make + + from the ./testsuite/ directory run ./testsuite + +to make a debug build: + + ./configure --enable-debug --disable-shared + make + + + +--To build on Win32 + +Choose (Re)Build All from the project workspace + +Run the testsuite program + + + + + +*************************CyaSSL version 0.9.9 (7/25/2008) + +This release of CyaSSL adds bug fixes, Pre-Shared Keys, over-rideable memory +handling, and optionally TomsFastMath. Thanks to Moisés Guimarães for the +work on TomsFastMath. + +To optionally use TomsFastMath pass --enable-fastmath to ./configure +Or define USE_FAST_MATH in each project from CyaSSL for MSVC. + +Please use the benchmark routine before and after to see the performance +difference, on some platforms the gains will be little but RSA encryption +always seems to be faster. On x86-64 machines with GCC the normal math library +may outperform the fast one when using CFLAGS=-m64 because TomsFastMath can't +yet use -m64 because of GCCs inability to do 128bit division. + + **** UPDATE GCC 4.2.1 can now do 128bit division *** + +See notes below (0.2.0) for complete build instructions. + + +****************CyaSSL version 0.9.8 (5/7/2008) + +This release of CyaSSL adds bug fixes, client side Diffie-Hellman, and better +socket handling. + +See notes below (0.2.0) for complete build instructions. + + +****************CyaSSL version 0.9.6 (1/31/2008) + +This release of CyaSSL adds bug fixes, increased session management, and a fix +for gnutls. + +See notes below (0.2.0) for complete build instructions. + + +****************CyaSSL version 0.9.0 (10/15/2007) + +This release of CyaSSL adds bug fixes, MSVC 2005 support, GCC 4.2 support, +IPV6 support and test, and new test certificates. + +See notes below (0.2.0) for complete build instructions. + + +****************CyaSSL version 0.8.0 (1/10/2007) + +This release of CyaSSL adds increased socket support, for non-blocking writes, +connects, and interrupted system calls. + +See notes below (0.2.0) for complete build instructions. + + +****************CyaSSL version 0.6.3 (10/30/2006) + +This release of CyaSSL adds debug logging to stderr to aid in the debugging of +CyaSSL on systems that may not provide the best support. + +If CyaSSL is built with debugging support then you need to call +CyaSSL_Debugging_ON() to turn logging on. + +On Unix use ./configure --enable-debug + +On Windows define DEBUG_CYASSL when building CyaSSL + + +To turn logging back off call CyaSSL_Debugging_OFF() + +See notes below (0.2.0) for complete build instructions. + + +*****************CyaSSL version 0.6.2 (10/29/2006) + +This release of CyaSSL adds TLS 1.1. + +Note that CyaSSL has certificate verification on by default, unlike OpenSSL. +To emulate OpenSSL behavior, you must call SSL_CTX_set_verify() with +SSL_VERIFY_NONE. In order to have full security you should never do this, +provide CyaSSL with the proper certificates to eliminate impostors and call +CyaSSL_check_domain_name() to prevent man in the middle attacks. + +See notes below (0.2.0) for build instructions. + +*****************CyaSSL version 0.6.0 (10/25/2006) + +This release of CyaSSL adds more SSL functions, better autoconf, nonblocking +I/O for accept, connect, and read. There is now an --enable-small configure +option that turns off TLS, AES, DES3, HMAC, and ERROR_STRINGS, see configure.in +for the defines. Note that TLS requires HMAC and AES requires TLS. + +See notes below (0.2.0) for build instructions. + + +*****************CyaSSL version 0.5.5 (09/27/2006) + +This mini release of CyaSSL adds better input processing through buffered input +and big message support. Added SSL_pending() and some sanity checks on user +settings. + +See notes below (0.2.0) for build instructions. + + +*****************CyaSSL version 0.5.0 (03/27/2006) + +This release of CyaSSL adds AES support and minor bug fixes. + +See notes below (0.2.0) for build instructions. + + +*****************CyaSSL version 0.4.0 (03/15/2006) + +This release of CyaSSL adds TLSv1 client/server support and libtool. + +See notes below for build instructions. + + +*****************CyaSSL version 0.3.0 (02/26/2006) + +This release of CyaSSL adds SSLv3 server support and session resumption. + +See notes below for build instructions. + + +*****************CyaSSL version 0.2.0 (02/19/2006) + + +This is the first release of CyaSSL and its crypt brother, CTaoCrypt. CyaSSL +is written in ANSI C with the idea of a small code size, footprint, and memory +usage in mind. CTaoCrypt can be as small as 32K, and the current client +version of CyaSSL can be as small as 12K. + + +The first release of CTaoCrypt supports MD5, SHA-1, 3DES, ARC4, Big Integer +Support, RSA, ASN parsing, and basic x509 (en/de)coding. + +The first release of CyaSSL supports normal client RSA mode SSLv3 connections +with support for SHA-1 and MD5 digests. Ciphers include 3DES and RC4. + + +--To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin: + + ./configure + make + + from the ./testsuite/ directory run ./testsuite + +to make a debug build: + + ./configure --enable-debug --disable-shared + make + + + +--To build on Win32 + +Choose (Re)Build All from the project workspace + +Run the testsuite program + + + +*** The next release of CyaSSL will support a server and more OpenSSL +compatibility functions. + + +Please send questions or comments to todd@yassl.com + diff --git a/project1/cyassl-3.0.0/aclocal.m4 b/project1/cyassl-3.0.0/aclocal.m4 new file mode 100644 index 00000000..64fd2c65 --- /dev/null +++ b/project1/cyassl-3.0.0/aclocal.m4 @@ -0,0 +1,1195 @@ +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ax_add_am_macro.m4]) +m4_include([m4/ax_am_jobserver.m4]) +m4_include([m4/ax_am_macros.m4]) +m4_include([m4/ax_append_compile_flags.m4]) +m4_include([m4/ax_append_flag.m4]) +m4_include([m4/ax_append_to_file.m4]) +m4_include([m4/ax_check_compile_flag.m4]) +m4_include([m4/ax_check_link_flag.m4]) +m4_include([m4/ax_count_cpus.m4]) +m4_include([m4/ax_create_generic_config.m4]) +m4_include([m4/ax_debug.m4]) +m4_include([m4/ax_file_escapes.m4]) +m4_include([m4/ax_harden_compiler_flags.m4]) +m4_include([m4/ax_print_to_file.m4]) +m4_include([m4/ax_pthread.m4]) +m4_include([m4/ax_tls.m4]) +m4_include([m4/ax_vcs_checkout.m4]) +m4_include([m4/hexversion.m4]) +m4_include([m4/lib_socket_nsl.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/visibility.m4]) +m4_include([m4/wolfssl_darwin_clang.m4]) diff --git a/project1/cyassl-3.0.0/aminclude.am b/project1/cyassl-3.0.0/aminclude.am new file mode 100644 index 00000000..b6865f31 --- /dev/null +++ b/project1/cyassl-3.0.0/aminclude.am @@ -0,0 +1,5 @@ + +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on Mon May 19 14:54:12 MDT 2014 + +AM_MAKEFLAGS += -j5 diff --git a/project1/cyassl-3.0.0/autom4te.cache/output.0 b/project1/cyassl-3.0.0/autom4te.cache/output.0 new file mode 100644 index 00000000..624e3a5f --- /dev/null +++ b/project1/cyassl-3.0.0/autom4te.cache/output.0 @@ -0,0 +1,27349 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.69 for cyassl 3.0.0. +@%:@ +@%:@ Report bugs to . +@%:@ +@%:@ +@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@%:@ +@%:@ +@%:@ This configure script is free software; the Free Software Foundation +@%:@ gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in @%:@( + *posix*) : + set -o posix ;; @%:@( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in @%:@( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in @%:@(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in @%:@( + *posix*) : + set -o posix ;; @%:@( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in @%:@( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/cyassl/cyassl/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIB@&t@OBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='cyassl' +PACKAGE_TARNAME='cyassl' +PACKAGE_VERSION='3.0.0' +PACKAGE_STRING='cyassl 3.0.0' +PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' +PACKAGE_URL='http://www.wolfssl.com' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIB@&t@OBJS +INC_AMINCLUDE +AMINCLUDE +GENERIC_CONFIG +AM_LDFLAGS +AM_CFLAGS +AM_CPPFLAGS +HEX_VERSION +IS_VCS_CHECKOUT_FALSE +IS_VCS_CHECKOUT_TRUE +BUILD_MCAPI_FALSE +BUILD_MCAPI_TRUE +BUILD_LIBZ_FALSE +BUILD_LIBZ_TRUE +BUILD_EXAMPLES_FALSE +BUILD_EXAMPLES_TRUE +BUILD_SLOWMATH_FALSE +BUILD_SLOWMATH_TRUE +BUILD_FASTMATH_FALSE +BUILD_FASTMATH_TRUE +USE_VALGRIND_FALSE +USE_VALGRIND_TRUE +HAVE_VALGRIND +BUILD_PKCS7_FALSE +BUILD_PKCS7_TRUE +BUILD_NTRU_FALSE +BUILD_NTRU_TRUE +BUILD_CRL_MONITOR_FALSE +BUILD_CRL_MONITOR_TRUE +BUILD_CRL_FALSE +BUILD_CRL_TRUE +HAVE_OPENSSL_CMD +BUILD_OCSP_FALSE +BUILD_OCSP_TRUE +BUILD_INLINE_FALSE +BUILD_INLINE_TRUE +BUILD_FIPS_FALSE +BUILD_FIPS_TRUE +BUILD_RABBIT_FALSE +BUILD_RABBIT_TRUE +BUILD_HC128_FALSE +BUILD_HC128_TRUE +BUILD_PWDBASED_FALSE +BUILD_PWDBASED_TRUE +BUILD_MD4_FALSE +BUILD_MD4_TRUE +BUILD_SHA_FALSE +BUILD_SHA_TRUE +BUILD_MD5_FALSE +BUILD_MD5_TRUE +BUILD_RC4_FALSE +BUILD_RC4_TRUE +BUILD_DES3_FALSE +BUILD_DES3_TRUE +BUILD_CODING_FALSE +BUILD_CODING_TRUE +BUILD_AES_FALSE +BUILD_AES_TRUE +BUILD_ASN_FALSE +BUILD_ASN_TRUE +BUILD_DH_FALSE +BUILD_DH_TRUE +BUILD_RSA_FALSE +BUILD_RSA_TRUE +BUILD_MEMORY_FALSE +BUILD_MEMORY_TRUE +BUILD_ECC_FALSE +BUILD_ECC_TRUE +BUILD_DSA_FALSE +BUILD_DSA_TRUE +BUILD_SHA512_FALSE +BUILD_SHA512_TRUE +BUILD_BLAKE2_FALSE +BUILD_BLAKE2_TRUE +BUILD_RIPEMD_FALSE +BUILD_RIPEMD_TRUE +BUILD_MD2_FALSE +BUILD_MD2_TRUE +BUILD_CAMELLIA_FALSE +BUILD_CAMELLIA_TRUE +BUILD_AESNI_FALSE +BUILD_AESNI_TRUE +BUILD_AESCCM_FALSE +BUILD_AESCCM_TRUE +BUILD_AESGCM_FALSE +BUILD_AESGCM_TRUE +BUILD_SNIFFTEST_FALSE +BUILD_SNIFFTEST_TRUE +BUILD_SNIFFER_FALSE +BUILD_SNIFFER_TRUE +BUILD_LEANPSK_FALSE +BUILD_LEANPSK_TRUE +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +DEBUG_FALSE +DEBUG_TRUE +MCHECK +LIBM +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +HAVE_VISIBILITY +CFLAG_VISIBILITY +CXXCPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +LIBTOOL +CYASSL_LIBRARY_VERSION +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_static +enable_shared +with_pic +enable_fast_install +enable_dependency_tracking +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_debug +enable_singlethreaded +enable_dtls +enable_opensslextra +enable_ipv6 +enable_fortress +enable_bump +enable_leanpsk +enable_bigcache +enable_hugecache +enable_smallcache +enable_savesession +enable_savecert +enable_atomicuser +enable_pkcallbacks +enable_sniffer +enable_aesgcm +enable_aesccm +enable_aesni +enable_camellia +enable_md2 +enable_nullcipher +enable_ripemd +enable_blake2 +enable_sha512 +enable_sessioncerts +enable_keygen +enable_certgen +enable_certreq +enable_sep +enable_hkdf +enable_dsa +enable_ecc +enable_fpecc +enable_eccencrypt +enable_psk +enable_errorstrings +enable_oldtls +enable_stacksize +enable_memory +enable_rsa +enable_dh +enable_asn +enable_aes +enable_coding +enable_des3 +enable_arc4 +enable_md5 +enable_sha +enable_md4 +enable_webserver +enable_pwdbased +enable_hc128 +enable_rabbit +enable_fips +enable_filesystem +enable_inline +enable_ocsp +enable_crl +enable_crl_monitor +enable_ntru +enable_sni +enable_maxfragment +enable_truncatedhmac +enable_renegotiation_indication +enable_supportedcurves +enable_tlsx +enable_pkcs7 +enable_scep +enable_smallstack +enable_valgrind +enable_testcert +enable_iopool +enable_certservice +enable_fastmath +enable_fasthugemath +enable_examples +with_libz +with_cavium +enable_mcapi +enable_jobserver +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures cyassl 3.0.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + @<:@@S|@ac_default_prefix@:>@ + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + @<:@PREFIX@:>@ + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root @<:@DATAROOTDIR/doc/cyassl@:>@ + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of cyassl 3.0.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=no@:>@ + --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ + --enable-fast-install@<:@=PKGS@:>@ + optimize for fast installation @<:@default=yes@:>@ + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug Add debug code/turns off optimizations (yes|no) + @<:@default=no@:>@ + --enable-singlethreaded Enable CyaSSL single threaded (default: disabled) + --enable-dtls Enable CyaSSL DTLS (default: disabled) + --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled) + --enable-ipv6 Enable testing of IPV6 (default: disabled) + --enable-fortress Enable SSL fortress build (default: disabled) + --enable-bump Enable SSL Bump build (default: disabled) + --enable-leanpsk Enable Lean PSK build (default: disabled) + --enable-bigcache Enable big session cache (default: disabled) + --enable-hugecache Enable huge session cache (default: disabled) + --enable-smallcache Enable small session cache (default: disabled) + --enable-savesession Enable persistent session cache (default: disabled) + --enable-savecert Enable persistent cert cache (default: disabled) + --enable-atomicuser Enable Atomic User Record Layer (default: disabled) + --enable-pkcallbacks Enable Public Key Callbacks (default: disabled) + --enable-sniffer Enable CyaSSL sniffer support (default: disabled) + --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled) + --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled) + --enable-aesni Enable CyaSSL AES-NI support (default: disabled) + --enable-camellia Enable CyaSSL Camellia support (default: disabled) + --enable-md2 Enable CyaSSL MD2 support (default: disabled) + --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled) + --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled) + --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled) + --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled) + --enable-sessioncerts Enable session cert storing (default: disabled) + --enable-keygen Enable key generation (default: disabled) + --enable-certgen Enable cert generation (default: disabled) + --enable-certreq Enable cert request generation (default: disabled) + --enable-sep Enable sep extensions (default: disabled) + --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled) + --enable-dsa Enable DSA (default: disabled) + --enable-ecc Enable ECC (default: disabled) + --enable-fpecc Enable Fixed Point cache ECC (default: disabled) + --enable-eccencrypt Enable ECC encrypt (default: disabled) + --enable-psk Enable PSK (default: disabled) + --enable-errorstrings Enable error strings table (default: enabled) + --enable-oldtls Enable old TLS versions < 1.2 (default: enabled) + --enable-stacksize Enable stack size info on examples (default: disabled) + --enable-memory Enable memory callbacks (default: enabled) + --enable-rsa Enable RSA (default: enabled) + --enable-dh Enable DH (default: enabled) + --enable-asn Enable ASN (default: enabled) + --enable-aes Enable AES (default: enabled) + --enable-coding Enable Coding base 16/64 (default: enabled) + --enable-des3 Enable DES3 (default: enabled) + --enable-arc4 Enable ARC4 (default: enabled) + --enable-md5 Enable MD5 (default: enabled) + --enable-sha Enable SHA (default: enabled) + --enable-md4 Enable MD4 (default: disabled) + --enable-webserver Enable Web Server (default: disabled) + --enable-pwdbased Enable PWDBASED (default: disabled) + --enable-hc128 Enable HC-128 (default: disabled) + --enable-rabbit Enable RABBIT (default: disabled) + --enable-fips Enable FIPS 140-2 (default: disabled) + --enable-filesystem Enable Filesystem support (default: enabled) + --enable-inline Enable inline functions (default: enabled) + --enable-ocsp Enable OCSP (default: disabled) + --enable-crl Enable CRL (default: disabled) + --enable-crl-monitor Enable CRL Monitor (default: disabled) + --enable-ntru Enable NTRU (default: disabled) + --enable-sni Enable SNI (default: disabled) + --enable-maxfragment Enable Maximum Fragment Length (default: disabled) + --enable-truncatedhmac Enable Truncated HMAC (default: disabled) + --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled) + --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled) + --enable-tlsx Enable all TLS Extensions (default: disabled) + --enable-pkcs7 Enable PKCS7 (default: disabled) + --enable-scep Enable wolfSCEP (default: disabled) + --enable-smallstack Enable Small Stack Usage (default: enabled) + --enable-valgrind Enable valgrind for unit tests (default: disabled) + --enable-testcert Enable Test Cert (default: disabled) + --enable-iopool Enable I/O Pool example (default: disabled) + --enable-certservice Enable cert service (default: disabled) + --enable-fastmath Enable fast math ops (default: enabled on x86_64) + --enable-fasthugemath Enable fast math + huge code (default: disabled) + --enable-examples Enable Examples (default: enabled) + --enable-mcapi Enable Microchip API (default: disabled) + --enable-jobserver@<:@=no/yes/@%:@@:>@ default=yes + Enable up to @%:@ make jobs + yes: enable one more than CPU count + + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic@<:@=PKGS@:>@ try to use only PIC/non-PIC objects @<:@default=use + both@:>@ + --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-libz=PATH PATH to libz install (default /usr/) + --with-cavium=PATH PATH to cavium/software dir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +cyassl home page: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +cyassl configure 3.0.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +@%:@ ac_fn_c_try_compile LINENO +@%:@ -------------------------- +@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_c_try_compile + +@%:@ ac_fn_c_try_link LINENO +@%:@ ----------------------- +@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_c_try_link + +@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +@%:@ ------------------------------------------------------- +@%:@ Tests whether HEADER exists and can be compiled using the include files in +@%:@ INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +@%:@include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_header_compile + +@%:@ ac_fn_c_try_cpp LINENO +@%:@ ---------------------- +@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_c_try_cpp + +@%:@ ac_fn_c_try_run LINENO +@%:@ ---------------------- +@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes +@%:@ that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_c_try_run + +@%:@ ac_fn_c_check_func LINENO FUNC VAR +@%:@ ---------------------------------- +@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_func + +@%:@ ac_fn_cxx_try_compile LINENO +@%:@ ---------------------------- +@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_cxx_try_compile + +@%:@ ac_fn_cxx_try_cpp LINENO +@%:@ ------------------------ +@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_cxx_try_cpp + +@%:@ ac_fn_cxx_try_link LINENO +@%:@ ------------------------- +@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} @%:@ ac_fn_cxx_try_link + +@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +@%:@ ------------------------------------------------------- +@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using +@%:@ the include files in INCLUDES and setting the cache variable VAR +@%:@ accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +@%:@include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------------ ## +## Report this to https://github.com/cyassl/cyassl/issues ## +## ------------------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_header_mongrel + +@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +@%:@ -------------------------------------------- +@%:@ Tries to find the compile-time value of EXPR in a program that includes +@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be +@%:@ computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in @%:@(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_type + +@%:@ ac_fn_c_find_uintX_t LINENO BITS VAR +@%:@ ------------------------------------ +@%:@ Finds an unsigned integer type with width BITS, setting cache variable VAR +@%:@ accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array @<:@1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)@:>@; +test_array @<:@0@:>@ = 0; +return test_array @<:@0@:>@; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in @%:@( + uint$2_t) : + eval "$3=yes" ;; @%:@( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_find_uintX_t +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cyassl $as_me 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in @%:@(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in @%:@(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +@%:@ Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='cyassl' + VERSION='3.0.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + + + +#PROTECT_AC_USE_SYSTEM_EXTENSIONS + + + +ac_config_headers="$ac_config_headers config.h:config.in" + +#shared library versioning +CYASSL_LIBRARY_VERSION=5:5:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed +# | or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed + + +# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even +# if user doesn't override, no way to tell +USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +@%:@ Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +@%:@ Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +@%:@ Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +@%:@ Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options +@%:@ Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + + + enable_dlopen=no + + + enable_win32_dll=no + + + @%:@ Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +@%:@ Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + @%:@ Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +@%:@define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +@%:@ Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } + if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } + if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + +if test -n "$CFLAG_VISIBILITY" ; then : + + AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" + CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" + +fi + +@%:@ Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + +for ac_func in gethostbyname +do : + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_GETHOSTBYNAME 1 +_ACEOF + +fi +done + +for ac_func in getaddrinfo +do : + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_GETADDRINFO 1 +_ACEOF + +fi +done + +for ac_func in gettimeofday +do : + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_GETTIMEOFDAY 1 +_ACEOF + +fi +done + +for ac_func in inet_ntoa +do : + ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" +if test "x$ac_cv_func_inet_ntoa" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_INET_NTOA 1 +_ACEOF + +fi +done + +for ac_func in memset +do : + ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_MEMSET 1 +_ACEOF + +fi +done + +for ac_func in socket +do : + ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_SOCKET 1 +_ACEOF + +fi +done + +for ac_header in arpa/inet.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_ARPA_INET_H 1 +_ACEOF + +fi + +done + +for ac_header in fcntl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_FCNTL_H 1 +_ACEOF + +fi + +done + +for ac_header in limits.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIMITS_H 1 +_ACEOF + +fi + +done + +for ac_header in netdb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_NETDB_H 1 +_ACEOF + +fi + +done + +for ac_header in netinet/in.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_NETINET_IN_H 1 +_ACEOF + +fi + +done + +for ac_header in stddef.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_STDDEF_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/ioctl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_SYS_IOCTL_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/socket.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_SYS_SOCKET_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_SYS_TIME_H 1 +_ACEOF + +fi + +done + +for ac_header in errno.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_ERRNO_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 +$as_echo_n "checking for socket in -lnetwork... " >&6; } +if ${ac_cv_lib_network_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_network_socket=yes +else + ac_cv_lib_network_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 +$as_echo "$ac_cv_lib_network_socket" >&6; } +if test "x$ac_cv_lib_network_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBNETWORK 1 +_ACEOF + + LIBS="-lnetwork $LIBS" + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +# mktime check takes forever on some systems, if time supported it would be +# highly unusual for mktime to be missing +#AC_FUNC_MKTIME + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +@%:@define size_t unsigned int +_ACEOF + +fi + +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +$as_echo "@%:@define _UINT8_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +@%:@define uint8_t $ac_cv_c_uint8_t +_ACEOF +;; + esac + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + + +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="-lm" +fi + + ;; +esac + + + +OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" +OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" +OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" +DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" + +thread_ls_on=no +# Thread local storage + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +$as_echo_n "checking for thread local storage (TLS) class... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_tls_keywords="__thread __declspec(thread) none" + for ax_tls_keyword in $ax_tls_keywords; do + case $ax_tls_keyword in @%:@( + none) : + ac_cv_tls=none ; break ;; @%:@( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void + foo(void) { + static $ax_tls_keyword int bar; + exit(1); + } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$ax_tls_keyword ; break +else + ac_cv_tls=none + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; +esac + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then : + +cat >>confdefs.h <<_ACEOF +@%:@define TLS $ac_cv_tls +_ACEOF + + + AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS" + thread_ls_on=yes + +else + : + +fi + + + +# DEBUG + @%:@ Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; ax_enable_debug=yes + +$as_echo "@%:@define DEBUG 1" >>confdefs.h + +else + ax_enable_debug=no + + +$as_echo "@%:@define DEBUG 0" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5 +$as_echo_n "checking for debug... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5 +$as_echo "$ax_enable_debug" >&6; } + if test "x${ax_enable_debug}" = "xyes"; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + +if test "$ax_enable_debug" = "yes"; then : + AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS" +else + AM_CFLAGS="$AM_CFLAGS -DNDEBUG" +fi + + +# SINGLE THREADED +@%:@ Check whether --enable-singlethreaded was given. +if test "${enable_singlethreaded+set}" = set; then : + enableval=$enable_singlethreaded; ENABLED_SINGLETHREADED=$enableval +else + ENABLED_SINGLETHREADED=no +fi + + + + if test x"$CC" = xclang; then + wolfssl_darwin_clang=yes + elif test x"$CC" = x || test x"$CC" = xgcc; then + if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then + wolfssl_darwin_clang=yes + fi + fi + +if test "x$ENABLED_SINGLETHREADED" = "xno" ; then : + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + + if test x"$wolfssl_darwin_clang" = x"yes"; then : + ax_pthread_flags="$ax_pthread_flags" +else + ax_pthread_flags="-pthread $ax_pthread_flags" +fi + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } +int +main () +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int attr = $attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +@%:@define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +$as_echo "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : + +$as_echo "@%:@define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + +fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in @%:@( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in @%:@( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; @%:@( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; @%:@( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + + +$as_echo "@%:@define HAVE_PTHREAD 1" >>confdefs.h + + AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + + : +else + ax_pthread_ok=no + + ENABLED_SINGLETHREADED=yes + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +fi + +if test "x$ENABLED_SINGLETHREADED" = "xyes" ; then : + AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" +fi + + +# DTLS +@%:@ Check whether --enable-dtls was given. +if test "${enable_dtls+set}" = set; then : + enableval=$enable_dtls; ENABLED_DTLS=$enableval +else + ENABLED_DTLS=no + +fi + +if test "$ENABLED_DTLS" = "yes" +then + AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" +fi + + +# OPENSSL Extra Compatibility +@%:@ Check whether --enable-opensslextra was given. +if test "${enable_opensslextra+set}" = set; then : + enableval=$enable_opensslextra; ENABLED_OPENSSLEXTRA=$enableval +else + ENABLED_OPENSSLEXTRA=no + +fi + +if test "$ENABLED_OPENSSLEXTRA" = "yes" +then + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" +fi + +if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable small and opensslextra, only one or the other." "$LINENO" 5 +fi + + +# IPv6 Test Apps +@%:@ Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; ENABLED_IPV6=$enableval +else + ENABLED_IPV6=no + +fi + + +if test "$ENABLED_IPV6" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" +fi + + +# Fortress build +@%:@ Check whether --enable-fortress was given. +if test "${enable_fortress+set}" = set; then : + enableval=$enable_fortress; ENABLED_FORTRESS=$enableval +else + ENABLED_FORTRESS=no + +fi + + +if test "$ENABLED_FORTRESS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" +fi + + +# ssl bump build +@%:@ Check whether --enable-bump was given. +if test "${enable_bump+set}" = set; then : + enableval=$enable_bump; ENABLED_BUMP=$enableval +else + ENABLED_BUMP=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" +fi + +ENABLED_SLOWMATH="yes" + +# lean psk build +@%:@ Check whether --enable-leanpsk was given. +if test "${enable_leanpsk+set}" = set; then : + enableval=$enable_leanpsk; ENABLED_LEANPSK=$enableval +else + ENABLED_LEANPSK=no + +fi + + +if test "$ENABLED_LEANPSK" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" + ENABLED_SLOWMATH="no" + ENABLED_SINGLETHREADED="yes" +fi + + if test "x$ENABLED_LEANPSK" = "xyes"; then + BUILD_LEANPSK_TRUE= + BUILD_LEANPSK_FALSE='#' +else + BUILD_LEANPSK_TRUE='#' + BUILD_LEANPSK_FALSE= +fi + + + +# big cache +@%:@ Check whether --enable-bigcache was given. +if test "${enable_bigcache+set}" = set; then : + enableval=$enable_bigcache; ENABLED_BIGCACHE=$enableval +else + ENABLED_BIGCACHE=no + +fi + + +if test "$ENABLED_BIGCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" +fi + + +# HUGE cache +@%:@ Check whether --enable-hugecache was given. +if test "${enable_hugecache+set}" = set; then : + enableval=$enable_hugecache; ENABLED_HUGECACHE=$enableval +else + ENABLED_HUGECACHE=no + +fi + + +if test "$ENABLED_HUGECACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" +fi + + +# SMALL cache +@%:@ Check whether --enable-smallcache was given. +if test "${enable_smallcache+set}" = set; then : + enableval=$enable_smallcache; ENABLED_SMALLCACHE=$enableval +else + ENABLED_SMALLCACHE=no + +fi + + +if test "$ENABLED_SMALLCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" +fi + + +# Persistent session cache +@%:@ Check whether --enable-savesession was given. +if test "${enable_savesession+set}" = set; then : + enableval=$enable_savesession; ENABLED_SAVESESSION=$enableval +else + ENABLED_SAVESESSION=no + +fi + + +if test "$ENABLED_SAVESESSION" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" +fi + + +# Persistent cert cache +@%:@ Check whether --enable-savecert was given. +if test "${enable_savecert+set}" = set; then : + enableval=$enable_savecert; ENABLED_SAVECERT=$enableval +else + ENABLED_SAVECERT=no + +fi + + +if test "$ENABLED_SAVECERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" +fi + + +# Atomic User Record Layer +@%:@ Check whether --enable-atomicuser was given. +if test "${enable_atomicuser+set}" = set; then : + enableval=$enable_atomicuser; ENABLED_ATOMICUSER=$enableval +else + ENABLED_ATOMICUSER=no + +fi + + +if test "$ENABLED_ATOMICUSER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" +fi + + +# Public Key Callbacks +@%:@ Check whether --enable-pkcallbacks was given. +if test "${enable_pkcallbacks+set}" = set; then : + enableval=$enable_pkcallbacks; ENABLED_PKCALLBACKS=$enableval +else + ENABLED_PKCALLBACKS=no + +fi + + +if test "$ENABLED_PKCALLBACKS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" +fi + + +# SNIFFER +ENABLED_SNIFFTEST=no +@%:@ Check whether --enable-sniffer was given. +if test "${enable_sniffer+set}" = set; then : + enableval=$enable_sniffer; + ENABLED_SNIFFER=yes + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" + if test "x$enableval" = "xyes" ; then : + for ac_header in pcap/pcap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" +if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_PCAP_PCAP_H 1 +_ACEOF + + ENABLED_SNIFFTEST=yes + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable sniffer test without having libpcap available." >&5 +$as_echo "$as_me: WARNING: cannot enable sniffer test without having libpcap available." >&2;} +fi + +done + +fi + +else + + ENABLED_SNIFFER=no + +fi + + + if test "x$ENABLED_SNIFFER" = "xyes" ; then + BUILD_SNIFFER_TRUE= + BUILD_SNIFFER_FALSE='#' +else + BUILD_SNIFFER_TRUE='#' + BUILD_SNIFFER_FALSE= +fi + + if test "x$ENABLED_SNIFFTEST" = "xyes" ; then + BUILD_SNIFFTEST_TRUE= + BUILD_SNIFFTEST_FALSE='#' +else + BUILD_SNIFFTEST_TRUE='#' + BUILD_SNIFFTEST_FALSE= +fi + + +# AES-GCM +@%:@ Check whether --enable-aesgcm was given. +if test "${enable_aesgcm+set}" = set; then : + enableval=$enable_aesgcm; ENABLED_AESGCM=$enableval +else + ENABLED_AESGCM=no + +fi + + +if test "$ENABLED_AESGCM" = "word32" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "small" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "table" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" +fi + + if test "x$ENABLED_AESGCM" = "xyes"; then + BUILD_AESGCM_TRUE= + BUILD_AESGCM_FALSE='#' +else + BUILD_AESGCM_TRUE='#' + BUILD_AESGCM_FALSE= +fi + + + +# AES-CCM +@%:@ Check whether --enable-aesccm was given. +if test "${enable_aesccm+set}" = set; then : + enableval=$enable_aesccm; ENABLED_AESCCM=$enableval +else + ENABLED_AESCCM=no + +fi + + +if test "$ENABLED_AESCCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" +fi + + if test "x$ENABLED_AESCCM" = "xyes"; then + BUILD_AESCCM_TRUE= + BUILD_AESCCM_FALSE='#' +else + BUILD_AESCCM_TRUE='#' + BUILD_AESCCM_FALSE= +fi + + + +# AES-NI +@%:@ Check whether --enable-aesni was given. +if test "${enable_aesni+set}" = set; then : + enableval=$enable_aesni; ENABLED_AESNI=$enableval +else + ENABLED_AESNI=no + +fi + + +if test "$ENABLED_AESNI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" + if test "$GCC" = "yes" + then + # GCC needs these flags, icc doesn't + # opt levels greater than 2 may cause problems on systems w/o aesni + AM_CFLAGS="$AM_CFLAGS -maes -msse4" + fi +fi + + if test "x$ENABLED_AESNI" = "xyes"; then + BUILD_AESNI_TRUE= + BUILD_AESNI_FALSE='#' +else + BUILD_AESNI_TRUE='#' + BUILD_AESNI_FALSE= +fi + + + +# Camellia +@%:@ Check whether --enable-camellia was given. +if test "${enable_camellia+set}" = set; then : + enableval=$enable_camellia; ENABLED_CAMELLIA=$enableval +else + ENABLED_CAMELLIA=no + +fi + + +if test "$ENABLED_CAMELLIA" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" +fi + + if test "x$ENABLED_CAMELLIA" = "xyes"; then + BUILD_CAMELLIA_TRUE= + BUILD_CAMELLIA_FALSE='#' +else + BUILD_CAMELLIA_TRUE='#' + BUILD_CAMELLIA_FALSE= +fi + + + +# MD2 +@%:@ Check whether --enable-md2 was given. +if test "${enable_md2+set}" = set; then : + enableval=$enable_md2; ENABLED_MD2=$enableval +else + ENABLED_MD2=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_MD2="yes" +fi + +if test "$ENABLED_MD2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" +fi + + if test "x$ENABLED_MD2" = "xyes"; then + BUILD_MD2_TRUE= + BUILD_MD2_FALSE='#' +else + BUILD_MD2_TRUE='#' + BUILD_MD2_FALSE= +fi + + + +# NULL CIPHER +@%:@ Check whether --enable-nullcipher was given. +if test "${enable_nullcipher+set}" = set; then : + enableval=$enable_nullcipher; ENABLED_NULL_CIPHER=$enableval +else + ENABLED_NULL_CIPHER=no + +fi + + +if test "$ENABLED_NULL_CIPHER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" +fi + +# RIPEMD +@%:@ Check whether --enable-ripemd was given. +if test "${enable_ripemd+set}" = set; then : + enableval=$enable_ripemd; ENABLED_RIPEMD=$enableval +else + ENABLED_RIPEMD=no + +fi + + +if test "$ENABLED_RIPEMD" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" +fi + + if test "x$ENABLED_RIPEMD" = "xyes"; then + BUILD_RIPEMD_TRUE= + BUILD_RIPEMD_FALSE='#' +else + BUILD_RIPEMD_TRUE='#' + BUILD_RIPEMD_FALSE= +fi + + + +# BLAKE2 +@%:@ Check whether --enable-blake2 was given. +if test "${enable_blake2+set}" = set; then : + enableval=$enable_blake2; ENABLED_BLAKE2=$enableval +else + ENABLED_BLAKE2=no + +fi + + +if test "$ENABLED_BLAKE2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" +fi + + if test "x$ENABLED_BLAKE2" = "xyes"; then + BUILD_BLAKE2_TRUE= + BUILD_BLAKE2_FALSE='#' +else + BUILD_BLAKE2_TRUE='#' + BUILD_BLAKE2_FALSE= +fi + + + +# SHA512 +@%:@ Check whether --enable-sha512 was given. +if test "${enable_sha512+set}" = set; then : + enableval=$enable_sha512; ENABLED_SHA512=$enableval +else + ENABLED_SHA512=no + +fi + + +if test "$ENABLED_SHA512" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" +fi + +if test "$ENABLED_FORTRESS" = "yes" +then + ENABLED_SHA512="yes" +fi + + + if test "x$ENABLED_SHA512" = "xyes"; then + BUILD_SHA512_TRUE= + BUILD_SHA512_FALSE='#' +else + BUILD_SHA512_TRUE='#' + BUILD_SHA512_FALSE= +fi + + + +# SESSION CERTS +@%:@ Check whether --enable-sessioncerts was given. +if test "${enable_sessioncerts+set}" = set; then : + enableval=$enable_sessioncerts; ENABLED_SESSIONCERTS=$enableval +else + ENABLED_SESSIONCERTS=no + +fi + + +if test "$ENABLED_SESSIONCERTS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" +fi + + +# KEY GENERATION +@%:@ Check whether --enable-keygen was given. +if test "${enable_keygen+set}" = set; then : + enableval=$enable_keygen; ENABLED_KEYGEN=$enableval +else + ENABLED_KEYGEN=no + +fi + + +if test "$ENABLED_KEYGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" +fi + + +# CERT GENERATION +@%:@ Check whether --enable-certgen was given. +if test "${enable_certgen+set}" = set; then : + enableval=$enable_certgen; ENABLED_CERTGEN=$enableval +else + ENABLED_CERTGEN=no + +fi + + +if test "$ENABLED_CERTGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" +fi + + +# CERT REQUEST GENERATION +@%:@ Check whether --enable-certreq was given. +if test "${enable_certreq+set}" = set; then : + enableval=$enable_certreq; ENABLED_CERTREQ=$enableval +else + ENABLED_CERTREQ=no + +fi + + +if test "$ENABLED_CERTREQ" = "yes" +then + if test "$ENABLED_CERTGEN" = "no" + then + as_fn_error $? "cannot enable certreq without enabling certgen." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" +fi + + +# SEP +@%:@ Check whether --enable-sep was given. +if test "${enable_sep+set}" = set; then : + enableval=$enable_sep; ENABLED_SEP=$enableval +else + ENABLED_SEP=no + +fi + +if test "$ENABLED_SEP" = "yes" +then + AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" +fi + + +# HKDF +@%:@ Check whether --enable-hkdf was given. +if test "${enable_hkdf+set}" = set; then : + enableval=$enable_hkdf; ENABLED_HKDF=$enableval +else + ENABLED_HKDF=no + +fi + +if test "$ENABLED_HKDF" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" +fi + + +# DSA +@%:@ Check whether --enable-dsa was given. +if test "${enable_dsa+set}" = set; then : + enableval=$enable_dsa; ENABLED_DSA=$enableval +else + ENABLED_DSA=no + +fi + + +if test "$ENABLED_DSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DSA" +fi + + if test "x$ENABLED_DSA" = "xyes"; then + BUILD_DSA_TRUE= + BUILD_DSA_FALSE='#' +else + BUILD_DSA_TRUE='#' + BUILD_DSA_FALSE= +fi + + + +# ECC +@%:@ Check whether --enable-ecc was given. +if test "${enable_ecc+set}" = set; then : + enableval=$enable_ecc; ENABLED_ECC=$enableval +else + ENABLED_ECC=no + +fi + + +if test "$ENABLED_ECC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" +fi + + if test "x$ENABLED_ECC" = "xyes"; then + BUILD_ECC_TRUE= + BUILD_ECC_FALSE='#' +else + BUILD_ECC_TRUE='#' + BUILD_ECC_FALSE= +fi + + + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable ecc and small, ecc requires TLS which small turns off." "$LINENO" 5 +fi + + +# FP ECC, Fixed Point cache ECC +@%:@ Check whether --enable-fpecc was given. +if test "${enable_fpecc+set}" = set; then : + enableval=$enable_fpecc; ENABLED_FPECC=$enableval +else + ENABLED_FPECC=no + +fi + + +if test "$ENABLED_FPECC" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + as_fn_error $? "cannot enable fpecc without enabling ecc." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DFP_ECC" +fi + + +# ECC encrypt +@%:@ Check whether --enable-eccencrypt was given. +if test "${enable_eccencrypt+set}" = set; then : + enableval=$enable_eccencrypt; ENABLED_ECC_ENCRYPT=$enableval +else + ENABLED_ECC_ENCRYPT=no + +fi + + +if test "$ENABLED_ECC_ENCRYPT" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + as_fn_error $? "cannot enable eccencrypt without enabling ecc." "$LINENO" 5 + fi + if test "$ENABLED_HKDF" = "no" + then + as_fn_error $? "cannot enable eccencrypt without enabling hkdf." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" +fi + + +# PSK +@%:@ Check whether --enable-psk was given. +if test "${enable_psk+set}" = set; then : + enableval=$enable_psk; ENABLED_PSK=$enableval +else + ENABLED_PSK=no + +fi + + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_PSK" +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" +then + ENABLED_PSK=yes +fi + + +# ERROR STRINGS +@%:@ Check whether --enable-errorstrings was given. +if test "${enable_errorstrings+set}" = set; then : + enableval=$enable_errorstrings; ENABLED_ERROR_STRINGS=$enableval +else + ENABLED_ERROR_STRINGS=yes + +fi + + +if test "$ENABLED_ERROR_STRINGS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" +else + # turn off error strings if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" + ENABLED_ERROR_STRINGS=no + fi +fi + + +# OLD TLS +@%:@ Check whether --enable-oldtls was given. +if test "${enable_oldtls+set}" = set; then : + enableval=$enable_oldtls; ENABLED_OLD_TLS=$enableval +else + ENABLED_OLD_TLS=yes + +fi + + +if test "$ENABLED_OLD_TLS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" +else + # turn off old if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" + ENABLED_OLD_TLS=no + fi +fi + + +# STACK SIZE info for examples +@%:@ Check whether --enable-stacksize was given. +if test "${enable_stacksize+set}" = set; then : + enableval=$enable_stacksize; ENABLED_STACKSIZE=$enableval +else + ENABLED_STACKSIZE=no + +fi + + +if test "$ENABLED_STACKSIZE" = "yes" +then + ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" +if test "x$ac_cv_func_posix_memalign" = xyes; then : + +else + as_fn_error $? "stacksize needs posix_memalign" "$LINENO" 5 +fi + + ac_fn_c_check_func "$LINENO" "pthread_attr_setstack" "ac_cv_func_pthread_attr_setstack" +if test "x$ac_cv_func_pthread_attr_setstack" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstack in -lpthread" >&5 +$as_echo_n "checking for pthread_attr_setstack in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_attr_setstack+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_setstack (); +int +main () +{ +return pthread_attr_setstack (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_attr_setstack=yes +else + ac_cv_lib_pthread_pthread_attr_setstack=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstack" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_attr_setstack" >&6; } +if test "x$ac_cv_lib_pthread_pthread_attr_setstack" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + +fi + + AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" +fi + + +# MEMORY +@%:@ Check whether --enable-memory was given. +if test "${enable_memory+set}" = set; then : + enableval=$enable_memory; ENABLED_MEMORY=$enableval +else + ENABLED_MEMORY=yes + +fi + + +if test "$ENABLED_MEMORY" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" +else + # turn off memory cb if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + # but don't turn on NO_CYASSL_MEMORY because using own + ENABLED_MEMORY=no + fi +fi + + if test "x$ENABLED_MEMORY" = "xyes"; then + BUILD_MEMORY_TRUE= + BUILD_MEMORY_FALSE='#' +else + BUILD_MEMORY_TRUE='#' + BUILD_MEMORY_FALSE= +fi + + + +# RSA +@%:@ Check whether --enable-rsa was given. +if test "${enable_rsa+set}" = set; then : + enableval=$enable_rsa; ENABLED_RSA=$enableval +else + ENABLED_RSA=yes + +fi + + +if test "$ENABLED_RSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" +else + # turn off RSA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" + ENABLED_RSA=no + fi +fi + + if test "x$ENABLED_RSA" = "xyes"; then + BUILD_RSA_TRUE= + BUILD_RSA_FALSE='#' +else + BUILD_RSA_TRUE='#' + BUILD_RSA_FALSE= +fi + + + +# DH +@%:@ Check whether --enable-dh was given. +if test "${enable_dh+set}" = set; then : + enableval=$enable_dh; ENABLED_DH=$enableval +else + ENABLED_DH=yes + +fi + + +if test "$ENABLED_DH" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" +else + # turn off DH if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" + ENABLED_DH=no + fi +fi + + if test "x$ENABLED_DH" = "xyes"; then + BUILD_DH_TRUE= + BUILD_DH_FALSE='#' +else + BUILD_DH_TRUE='#' + BUILD_DH_FALSE= +fi + + + +# ASN +# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, +# and no big int, use this to disable all public key stuff +@%:@ Check whether --enable-asn was given. +if test "${enable_asn+set}" = set; then : + enableval=$enable_asn; ENABLED_ASN=$enableval +else + ENABLED_ASN=yes + +fi + + +if test "$ENABLED_ASN" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" +else + # turn off ASN if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" + ENABLED_ASN=no + fi +fi + +if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable rsa if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable dsa if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable dh if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable ecc if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please enable psk if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_ASN" = "no" +then + ENABLED_FASTMATH=no + ENABLED_SLOWMATH=no +fi + + if test "x$ENABLED_ASN" = "xyes"; then + BUILD_ASN_TRUE= + BUILD_ASN_FALSE='#' +else + BUILD_ASN_TRUE='#' + BUILD_ASN_FALSE= +fi + + + +# AES +@%:@ Check whether --enable-aes was given. +if test "${enable_aes+set}" = set; then : + enableval=$enable_aes; ENABLED_AES=$enableval +else + ENABLED_AES=yes + +fi + + +if test "$ENABLED_AES" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" +else + # turn off AES if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" + ENABLED_AES=no + fi +fi + + if test "x$ENABLED_AES" = "xyes"; then + BUILD_AES_TRUE= + BUILD_AES_FALSE='#' +else + BUILD_AES_TRUE='#' + BUILD_AES_FALSE= +fi + + + +# CODING +@%:@ Check whether --enable-coding was given. +if test "${enable_coding+set}" = set; then : + enableval=$enable_coding; ENABLED_CODING=$enableval +else + ENABLED_CODING=yes + +fi + + +if test "$ENABLED_CODING" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" +else + # turn off CODING if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" + ENABLED_CODING=no + fi +fi + + if test "x$ENABLED_CODING" = "xyes"; then + BUILD_CODING_TRUE= + BUILD_CODING_FALSE='#' +else + BUILD_CODING_TRUE='#' + BUILD_CODING_FALSE= +fi + + + +# DES3 +@%:@ Check whether --enable-des3 was given. +if test "${enable_des3+set}" = set; then : + enableval=$enable_des3; ENABLED_DES3=$enableval +else + ENABLED_DES3=yes + +fi + + +if test "$ENABLED_DES3" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" +else + # turn off DES3 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" + ENABLED_DES3=no + fi +fi + + if test "x$ENABLED_DES3" = "xyes"; then + BUILD_DES3_TRUE= + BUILD_DES3_FALSE='#' +else + BUILD_DES3_TRUE='#' + BUILD_DES3_FALSE= +fi + + + +# ARC4 +@%:@ Check whether --enable-arc4 was given. +if test "${enable_arc4+set}" = set; then : + enableval=$enable_arc4; ENABLED_ARC4=$enableval +else + ENABLED_ARC4=yes + +fi + + +if test "$ENABLED_ARC4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" +else + # turn off ARC4 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" + ENABLED_ARC4=no + fi +fi + + if test "x$ENABLED_ARC4" = "xyes"; then + BUILD_RC4_TRUE= + BUILD_RC4_FALSE='#' +else + BUILD_RC4_TRUE='#' + BUILD_RC4_FALSE= +fi + + + +# MD5 +@%:@ Check whether --enable-md5 was given. +if test "${enable_md5+set}" = set; then : + enableval=$enable_md5; ENABLED_MD5=$enableval +else + ENABLED_MD5=yes + +fi + + +if test "$ENABLED_MD5" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" +else + # turn off MD5 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" + ENABLED_MD5=no + fi +fi + + if test "x$ENABLED_MD5" = "xyes"; then + BUILD_MD5_TRUE= + BUILD_MD5_FALSE='#' +else + BUILD_MD5_TRUE='#' + BUILD_MD5_FALSE= +fi + + + +# SHA +@%:@ Check whether --enable-sha was given. +if test "${enable_sha+set}" = set; then : + enableval=$enable_sha; ENABLED_SHA=$enableval +else + ENABLED_SHA=yes + +fi + + +if test "$ENABLED_SHA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" +else + # turn off SHA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" + ENABLED_SHA=no + fi +fi + + if test "x$ENABLED_SHA" = "xyes"; then + BUILD_SHA_TRUE= + BUILD_SHA_FALSE='#' +else + BUILD_SHA_TRUE='#' + BUILD_SHA_FALSE= +fi + + + +# MD4 +@%:@ Check whether --enable-md4 was given. +if test "${enable_md4+set}" = set; then : + enableval=$enable_md4; ENABLED_MD4=$enableval +else + ENABLED_MD4=no + +fi + + +if test "$ENABLED_MD4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD4" +fi + + if test "x$ENABLED_MD4" = "xyes"; then + BUILD_MD4_TRUE= + BUILD_MD4_FALSE='#' +else + BUILD_MD4_TRUE='#' + BUILD_MD4_FALSE= +fi + + + +# Web Server Build +@%:@ Check whether --enable-webserver was given. +if test "${enable_webserver+set}" = set; then : + enableval=$enable_webserver; ENABLED_WEBSERVER=$enableval +else + ENABLED_WEBSERVER=no + +fi + + +if test "$ENABLED_WEBSERVER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" +fi + + +# PWDBASED +@%:@ Check whether --enable-pwdbased was given. +if test "${enable_pwdbased+set}" = set; then : + enableval=$enable_pwdbased; ENABLED_PWDBASED=$enableval +else + ENABLED_PWDBASED=no + +fi + + +if test "$ENABLED_PWDBASED" = "no" +then + if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" + then + # opensslextra and webserver needs pwdbased + ENABLED_PWDBASED=yes + else + AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" + fi +fi + + if test "x$ENABLED_PWDBASED" = "xyes"; then + BUILD_PWDBASED_TRUE= + BUILD_PWDBASED_FALSE='#' +else + BUILD_PWDBASED_TRUE='#' + BUILD_PWDBASED_FALSE= +fi + + + +# HC128 +@%:@ Check whether --enable-hc128 was given. +if test "${enable_hc128+set}" = set; then : + enableval=$enable_hc128; ENABLED_HC128=$enableval +else + ENABLED_HC128=no + +fi + + +if test "$ENABLED_HC128" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_HC128" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" +fi + + if test "x$ENABLED_HC128" = "xyes"; then + BUILD_HC128_TRUE= + BUILD_HC128_FALSE='#' +else + BUILD_HC128_TRUE='#' + BUILD_HC128_FALSE= +fi + + + +# RABBIT +@%:@ Check whether --enable-rabbit was given. +if test "${enable_rabbit+set}" = set; then : + enableval=$enable_rabbit; ENABLED_RABBIT=$enableval +else + ENABLED_RABBIT=no + +fi + + +if test "$ENABLED_RABBIT" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" +fi + + if test "x$ENABLED_RABBIT" = "xyes"; then + BUILD_RABBIT_TRUE= + BUILD_RABBIT_FALSE='#' +else + BUILD_RABBIT_TRUE='#' + BUILD_RABBIT_FALSE= +fi + + + +# FIPS +@%:@ Check whether --enable-fips was given. +if test "${enable_fips+set}" = set; then : + enableval=$enable_fips; ENABLED_FIPS=$enableval +else + ENABLED_FIPS=no + +fi + + +if test "x$ENABLED_FIPS" = "xyes" +then + # requires thread local storage + if test "$thread_ls_on" = "no" + then + as_fn_error $? "FIPS requires Thread Local Storage" "$LINENO" 5 + fi + # requires SHA512 + if test "x$ENABLED_SHA512" = "xno" + then + ENABLED_SHA512="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" + if test "x$ENABLED_SHA512" = "xyes"; then + BUILD_SHA512_TRUE= + BUILD_SHA512_FALSE='#' +else + BUILD_SHA512_TRUE='#' + BUILD_SHA512_FALSE= +fi + + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" +fi + + if test "x$ENABLED_FIPS" = "xyes"; then + BUILD_FIPS_TRUE= + BUILD_FIPS_FALSE='#' +else + BUILD_FIPS_TRUE='#' + BUILD_FIPS_FALSE= +fi + + + +# Filesystem Build +@%:@ Check whether --enable-filesystem was given. +if test "${enable_filesystem+set}" = set; then : + enableval=$enable_filesystem; ENABLED_FILESYSTEM=$enableval +else + ENABLED_FILESYSTEM=yes + +fi + + +if test "$ENABLED_FILESYSTEM" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" +else + # turn off filesystem if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" + ENABLED_FILESYSTEM=no + fi +fi + + +# inline Build +@%:@ Check whether --enable-inline was given. +if test "${enable_inline+set}" = set; then : + enableval=$enable_inline; ENABLED_INLINE=$enableval +else + ENABLED_INLINE=yes + +fi + + +if test "$ENABLED_INLINE" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" +fi + + if test "x$ENABLED_INLINE" = "xyes"; then + BUILD_INLINE_TRUE= + BUILD_INLINE_FALSE='#' +else + BUILD_INLINE_TRUE='#' + BUILD_INLINE_FALSE= +fi + + + +# OCSP +@%:@ Check whether --enable-ocsp was given. +if test "${enable_ocsp+set}" = set; then : + enableval=$enable_ocsp; ENABLED_OCSP=$enableval +else + ENABLED_OCSP=no +fi + + +if test "$ENABLED_OCSP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" +fi + + if test "x$ENABLED_OCSP" = "xyes"; then + BUILD_OCSP_TRUE= + BUILD_OCSP_FALSE='#' +else + BUILD_OCSP_TRUE='#' + BUILD_OCSP_FALSE= +fi + + + +if test "$ENABLED_OCSP" = "yes" +then + # check openssl command tool for testing ocsp + # Extract the first word of "openssl", so it can be a program name with args. +set dummy openssl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_OPENSSL_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_OPENSSL_CMD"; then + ac_cv_prog_HAVE_OPENSSL_CMD="$HAVE_OPENSSL_CMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_OPENSSL_CMD="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_OPENSSL_CMD" && ac_cv_prog_HAVE_OPENSSL_CMD="no" +fi +fi +HAVE_OPENSSL_CMD=$ac_cv_prog_HAVE_OPENSSL_CMD +if test -n "$HAVE_OPENSSL_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OPENSSL_CMD" >&5 +$as_echo "$HAVE_OPENSSL_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$HAVE_OPENSSL_CMD" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl command line tool not available for testing ocsp" >&5 +$as_echo "$as_me: WARNING: openssl command line tool not available for testing ocsp" >&2;} + fi +fi + + +# CRL +@%:@ Check whether --enable-crl was given. +if test "${enable_crl+set}" = set; then : + enableval=$enable_crl; ENABLED_CRL=$enableval +else + ENABLED_CRL=no +fi + + +if test "$ENABLED_CRL" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" +fi + + if test "x$ENABLED_CRL" = "xyes"; then + BUILD_CRL_TRUE= + BUILD_CRL_FALSE='#' +else + BUILD_CRL_TRUE='#' + BUILD_CRL_FALSE= +fi + + + +# CRL Monitor +@%:@ Check whether --enable-crl-monitor was given. +if test "${enable_crl_monitor+set}" = set; then : + enableval=$enable_crl_monitor; ENABLED_CRL_MONITOR=$enableval +else + ENABLED_CRL_MONITOR=no +fi + + +if test "$ENABLED_CRL_MONITOR" = "yes" +then + case $host_os in + *linux* | *darwin* | *freebsd*) + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; + *) + as_fn_error $? "crl monitor only allowed on linux, OS X, or freebsd" "$LINENO" 5 ;; + esac +fi + + if test "x$ENABLED_CRL_MONITOR" = "xyes"; then + BUILD_CRL_MONITOR_TRUE= + BUILD_CRL_MONITOR_FALSE='#' +else + BUILD_CRL_MONITOR_TRUE='#' + BUILD_CRL_MONITOR_FALSE= +fi + + + +# NTRU +ntruHome=`pwd`/NTRU_algorithm +ntruInclude=$ntruHome/cryptolib +ntruLib=$ntruHome +@%:@ Check whether --enable-ntru was given. +if test "${enable_ntru+set}" = set; then : + enableval=$enable_ntru; ENABLED_NTRU=$enableval +else + ENABLED_NTRU=no + +fi + + +if test "$ENABLED_NTRU" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" + AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" + LIBS="$LIBS -lntru_encrypt" +fi + + if test "x$ENABLED_NTRU" = "xyes"; then + BUILD_NTRU_TRUE= + BUILD_NTRU_FALSE='#' +else + BUILD_NTRU_TRUE='#' + BUILD_NTRU_FALSE= +fi + + +if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable ntru and small, ntru requires TLS which small turns off." "$LINENO" 5 +fi + +# SNI +@%:@ Check whether --enable-sni was given. +if test "${enable_sni+set}" = set; then : + enableval=$enable_sni; ENABLED_SNI=$enableval +else + ENABLED_SNI=no + +fi + + +if test "x$ENABLED_SNI" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" +fi + +# Maximum Fragment Length +@%:@ Check whether --enable-maxfragment was given. +if test "${enable_maxfragment+set}" = set; then : + enableval=$enable_maxfragment; ENABLED_MAX_FRAGMENT=$enableval +else + ENABLED_MAX_FRAGMENT=no + +fi + + +if test "x$ENABLED_MAX_FRAGMENT" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" +fi + +# Truncated HMAC +@%:@ Check whether --enable-truncatedhmac was given. +if test "${enable_truncatedhmac+set}" = set; then : + enableval=$enable_truncatedhmac; ENABLED_TRUNCATED_HMAC=$enableval +else + ENABLED_TRUNCATED_HMAC=no + +fi + + +if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" +fi + +# Renegotiation Indication +@%:@ Check whether --enable-renegotiation-indication was given. +if test "${enable_renegotiation_indication+set}" = set; then : + enableval=$enable_renegotiation_indication; ENABLED_RENEGOTIATION_INDICATION=$enableval +else + ENABLED_RENEGOTIATION_INDICATION=no + +fi + + +if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" +fi + +# Supported Elliptic Curves Extensions +@%:@ Check whether --enable-supportedcurves was given. +if test "${enable_supportedcurves+set}" = set; then : + enableval=$enable_supportedcurves; ENABLED_SUPPORTED_CURVES=$enableval +else + ENABLED_SUPPORTED_CURVES=no + +fi + + +if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" +fi + +# TLS Extensions +@%:@ Check whether --enable-tlsx was given. +if test "${enable_tlsx+set}" = set; then : + enableval=$enable_tlsx; ENABLED_TLSX=$enableval +else + ENABLED_TLSX=no + +fi + + +if test "x$ENABLED_TLSX" = "xyes" +then + ENABLED_SNI=yes + ENABLED_MAX_FRAGMENT=yes + ENABLED_TRUNCATED_HMAC=yes + ENABLED_RENEGOTIATION_INDICATION=yes + ENABLED_SUPPORTED_CURVES=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" +fi + +# PKCS7 +@%:@ Check whether --enable-pkcs7 was given. +if test "${enable_pkcs7+set}" = set; then : + enableval=$enable_pkcs7; ENABLED_PKCS7=$enableval +else + ENABLED_PKCS7=no +fi + + +if test "$ENABLED_PKCS7" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" +fi + + if test "x$ENABLED_PKCS7" = "xyes"; then + BUILD_PKCS7_TRUE= + BUILD_PKCS7_FALSE='#' +else + BUILD_PKCS7_TRUE='#' + BUILD_PKCS7_FALSE= +fi + + + +# Simple Certificate Enrollment Protocol (SCEP) +@%:@ Check whether --enable-scep was given. +if test "${enable_scep+set}" = set; then : + enableval=$enable_scep; ENABLED_WOLFSCEP=$enableval +else + ENABLED_WOLFSCEP=no + +fi + +if test "$ENABLED_WOLFSCEP" = "yes" +then + # Enable prereqs if not already enabled + if test "x$ENABLED_KEYGEN" = "xno" + then + ENABLED_KEYGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" + fi + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_CERTREQ" = "xno" + then + ENABLED_CERTREQ="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" + fi + if test "x$ENABLED_PKCS7" = "xno" + then + ENABLED_PKCS7="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" + if test "x$ENABLED_PKCS7" = "xyes"; then + BUILD_PKCS7_TRUE= + BUILD_PKCS7_FALSE='#' +else + BUILD_PKCS7_TRUE='#' + BUILD_PKCS7_FALSE= +fi + + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" +fi + + +# Small Stack +@%:@ Check whether --enable-smallstack was given. +if test "${enable_smallstack+set}" = set; then : + enableval=$enable_smallstack; ENABLED_SMALL_STACK=$enableval +else + ENABLED_SMALL_STACK=yes + +fi + + +if test "x$ENABLED_SMALL_STACK" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" +fi + + +#valgrind +@%:@ Check whether --enable-valgrind was given. +if test "${enable_valgrind+set}" = set; then : + enableval=$enable_valgrind; ENABLED_VALGRIND=$enableval +else + ENABLED_VALGRIND=no + +fi + + +if test "$ENABLED_VALGRIND" = "yes" +then + # Extract the first word of "valgrind", so it can be a program name with args. +set dummy valgrind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_VALGRIND+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_VALGRIND"; then + ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_VALGRIND="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no" +fi +fi +HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND +if test -n "$HAVE_VALGRIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5 +$as_echo "$HAVE_VALGRIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$HAVE_VALGRIND" = "no" + then + as_fn_error $? "Valgrind not found." "$LINENO" 5 + fi + enable_shared=no + enable_static=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" +fi + + if test "x$ENABLED_VALGRIND" = "xyes"; then + USE_VALGRIND_TRUE= + USE_VALGRIND_FALSE='#' +else + USE_VALGRIND_TRUE='#' + USE_VALGRIND_FALSE= +fi + + + +# Test certs, use internal cert functions for extra testing +@%:@ Check whether --enable-testcert was given. +if test "${enable_testcert+set}" = set; then : + enableval=$enable_testcert; ENABLED_TESTCERT=$enableval +else + ENABLED_TESTCERT=no + +fi + + +if test "$ENABLED_TESTCERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" +fi + + +# I/O Pool, an example to show user how to override memory handler and use +# a pool for the input/output buffer requests +@%:@ Check whether --enable-iopool was given. +if test "${enable_iopool+set}" = set; then : + enableval=$enable_iopool; ENABLED_IOPOOL=$enableval +else + ENABLED_IOPOOL=no + +fi + + +if test "$ENABLED_IOPOOL" = "yes" +then + if test "$thread_ls_on" = "no" + then + as_fn_error $? "I/O Pool example requires Thread Local Storage" "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" +fi + + +# Certificate Service Support +@%:@ Check whether --enable-certservice was given. +if test "${enable_certservice+set}" = set; then : + enableval=$enable_certservice; ENABLED_CERT_SERVICE=$enableval +else + ENABLED_CERT_SERVICE=no + +fi + +if test "$ENABLED_CERT_SERVICE" = "yes" +then + # Requires ecc,certgen, and opensslextra make sure on + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_ECC" = "xno" + then + ENABLED_ECC="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" + if test "x$ENABLED_ECC" = "xyes"; then + BUILD_ECC_TRUE= + BUILD_ECC_FALSE='#' +else + BUILD_ECC_TRUE='#' + BUILD_ECC_FALSE= +fi + + fi + if test "x$ENABLED_OPENSSLEXTRA" = "xno" + then + ENABLED_OPENSSLEXTRA="yes" + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" +fi + + +# set fastmath default +FASTMATH_DEFAULT=no + +if test "$host_cpu" = "x86_64" +then +FASTMATH_DEFAULT=yes +fi + +# fastmath +@%:@ Check whether --enable-fastmath was given. +if test "${enable_fastmath+set}" = set; then : + enableval=$enable_fastmath; ENABLED_FASTMATH=$enableval +else + ENABLED_FASTMATH=$FASTMATH_DEFAULT + +fi + + +if test "x$ENABLED_FASTMATH" = "xyes" +then + # turn off fastmth if leanpsk on or asn off + if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" + then + ENABLED_FASTMATH=no + else + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" + fi +fi + + +# fast HUGE math +@%:@ Check whether --enable-fasthugemath was given. +if test "${enable_fasthugemath+set}" = set; then : + enableval=$enable_fasthugemath; ENABLED_FASTHUGEMATH=$enableval +else + ENABLED_FASTHUGEMATH=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_FASTHUGEMATH="yes" +fi + +if test "$ENABLED_FASTHUGEMATH" = "yes" +then + ENABLED_FASTMATH="yes" + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" +fi + + if test "x$ENABLED_FASTMATH" = "xyes"; then + BUILD_FASTMATH_TRUE= + BUILD_FASTMATH_FALSE='#' +else + BUILD_FASTMATH_TRUE='#' + BUILD_FASTMATH_FALSE= +fi + + if test "x$ENABLED_SLOWMATH" = "xyes"; then + BUILD_SLOWMATH_TRUE= + BUILD_SLOWMATH_FALSE='#' +else + BUILD_SLOWMATH_TRUE='#' + BUILD_SLOWMATH_FALSE= +fi + + + +# Enable Examples, used to disable examples +@%:@ Check whether --enable-examples was given. +if test "${enable_examples+set}" = set; then : + enableval=$enable_examples; ENABLED_EXAMPLES=$enableval +else + ENABLED_EXAMPLES=yes + +fi + + +if test "x$ENABLED_FILESYSTEM" = "xno"; then : + ENABLED_EXAMPLES="no" +fi +if test "x$ENABLED_INLINE" = "xno"; then : + ENABLED_EXAMPLES="no" +fi +# certs still have sha signatures for now +if test "x$ENABLED_SHA" = "xno"; then : + ENABLED_EXAMPLES="no" +fi + if test "x$ENABLED_EXAMPLES" = "xyes"; then + BUILD_EXAMPLES_TRUE= + BUILD_EXAMPLES_FALSE='#' +else + BUILD_EXAMPLES_TRUE='#' + BUILD_EXAMPLES_FALSE= +fi + + + +# LIBZ +ENABLED_LIBZ="no" +trylibzdir="" + +@%:@ Check whether --with-libz was given. +if test "${with_libz+set}" = set; then : + withval=$with_libz; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz" >&5 +$as_echo_n "checking for libz... " >&6; } + CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" + LIBS="$LIBS -lz" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + deflateInit(0, 8); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libz_linked=yes +else + libz_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$libz_linked" == "xno" ; then + if test "x$withval" != "xno" ; then + trylibzdir=$withval + fi + if test "x$withval" == "xyes" ; then + trylibzdir="/usr" + fi + + AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" + CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + deflateInit(0, 8); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libz_linked=yes +else + libz_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$libz_linked" == "xno" ; then + as_fn_error $? "libz isn't found. + If it's already installed, specify its path using --with-libz=/dir/" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + ENABLED_LIBZ="yes" + + +fi + + if test "x$ENABLED_LIBZ" = "xyes"; then + BUILD_LIBZ_TRUE= + BUILD_LIBZ_FALSE='#' +else + BUILD_LIBZ_TRUE='#' + BUILD_LIBZ_FALSE= +fi + + + +# cavium +trycaviumdir="" + +@%:@ Check whether --with-cavium was given. +if test "${with_cavium+set}" = set; then : + withval=$with_cavium; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5 +$as_echo_n "checking for cavium... " >&6; } + CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" + + if test "x$withval" == "xyes" ; then + as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5 + fi + if test "x$withval" != "xno" ; then + trycaviumdir=$withval + fi + + LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" + CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cavium_common.h" +int +main () +{ + CspShutdown(CAVIUM_DEV_ID); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + cavium_linked=yes +else + cavium_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$cavium_linked" == "xno" ; then + as_fn_error $? "cavium isn't found. + If it's already installed, specify its path using --with-cavium=/dir/" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_shared=no + enable_static=yes + + +fi + + + +# microchip api +@%:@ Check whether --enable-mcapi was given. +if test "${enable_mcapi+set}" = set; then : + enableval=$enable_mcapi; ENABLED_MCAPI=$enableval +else + ENABLED_MCAPI=no + +fi + + +if test "$ENABLED_MCAPI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" +then + as_fn_error $? "please enable sha512 if enabling mcapi." "$LINENO" 5 +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" +then + as_fn_error $? "please enable ecc if enabling mcapi." "$LINENO" 5 +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" +then + as_fn_error $? "please use --with-libz if enabling mcapi." "$LINENO" 5 +fi + + if test "x$ENABLED_MCAPI" = "xyes"; then + BUILD_MCAPI_TRUE= + BUILD_MCAPI_FALSE='#' +else + BUILD_MCAPI_TRUE='#' + BUILD_MCAPI_FALSE= +fi + + + + +# OPTIMIZE FLAGS +if test "$GCC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" + if test "$ax_enable_debug" = "no" + then + if test "$ENABLED_FASTMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" + if test "$ENABLED_FASTHUGEMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" + fi + else + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" + fi + fi +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + LIBS="-lsocket -lnsl $LIBS" +fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts " >&5 +$as_echo_n "checking whether C compiler accepts ... " >&6; } +if ${ax_cv_check_cflags__+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS " + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_cv_check_cflags__=yes +else + ax_cv_check_cflags__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__" >&5 +$as_echo "$ax_cv_check_cflags__" >&6; } +if test x"$ax_cv_check_cflags__" = xyes; then : + : +else + : +fi + +if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains "; } >&5 + (: CFLAGS already contains ) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \""; } >&5 + (: CFLAGS="$CFLAGS ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS " + ;; + esac +else + CFLAGS="" +fi + + + +for flag in ; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts " >&5 +$as_echo_n "checking whether the linker accepts ... " >&6; } +if ${ax_cv_check_ldflags__+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS " + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags__=yes +else + ax_cv_check_ldflags__=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__" >&5 +$as_echo "$ax_cv_check_ldflags__" >&6; } +if test x"$ax_cv_check_ldflags__" = xyes; then : + : +else + : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5 +$as_echo_n "checking for vcs system... " >&6; } +if ${ac_cv_vcs_system+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_vcs_system="none" + if test -d ".bzr"; then : + ac_cv_vcs_system="bazaar" +fi + if test -d ".svn"; then : + ac_cv_vcs_system="svn" +fi + if test -d ".hg"; then : + ac_cv_vcs_system="mercurial" +fi + if test -d ".git"; then : + ac_cv_vcs_system="git" +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5 +$as_echo "$ac_cv_vcs_system" >&6; } + +cat >>confdefs.h <<_ACEOF +@%:@define VCS_SYSTEM "$ac_cv_vcs_system" +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5 +$as_echo_n "checking for vcs checkout... " >&6; } +if ${ac_cv_vcs_checkout+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$ac_cv_vcs_system" != "xnone"; then : + ac_cv_vcs_checkout=yes +else + ac_cv_vcs_checkout=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5 +$as_echo "$ac_cv_vcs_checkout" >&6; } + + if test "x$ac_cv_vcs_checkout" = "xyes"; then + IS_VCS_CHECKOUT_TRUE= + IS_VCS_CHECKOUT_FALSE='#' +else + IS_VCS_CHECKOUT_TRUE='#' + IS_VCS_CHECKOUT_FALSE= +fi + + if test "x$ac_cv_vcs_checkout" = "xyes"; then : + +$as_echo "@%:@define VCS_CHECKOUT 1" >>confdefs.h + +else + +$as_echo "@%:@define VCS_CHECKOUT 0" >>confdefs.h + +fi + + + + + + + AX_HARDEN_LIB= + ax_append_compile_link_flags_extra= + if test "x$ac_cv_vcs_checkout" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 +$as_echo_n "checking whether the linker accepts -Werror... " >&6; } +if ${ax_cv_check_ldflags___Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Werror=yes +else + ax_cv_check_ldflags___Werror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 +$as_echo "$ax_cv_check_ldflags___Werror" >&6; } +if test x"$ax_cv_check_ldflags___Werror" = xyes; then : + + AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" + +else + : +fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 +$as_echo_n "checking whether the linker accepts -Werror... " >&6; } +if ${ax_cv_check_ldflags___Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Werror=yes +else + ax_cv_check_ldflags___Werror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 +$as_echo "$ax_cv_check_ldflags___Werror" >&6; } +if test x"$ax_cv_check_ldflags___Werror" = xyes; then : + + ax_append_compile_link_flags_extra='-Werror' + +else + : +fi + + +fi + + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-z relro -z now" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5 +$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -z relro -z now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + + AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" + +else + : +fi + + + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-pie" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5 +$as_echo_n "checking whether the linker accepts -pie... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -pie" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + + AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" + +else + : +fi + + + LIB="$LIB $AX_HARDEN_LIB" + + + + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + CFLAGS= + ac_cv_warnings_as_errors=no + ax_append_compile_cflags_extra= + if test "$ac_cv_vcs_checkout" = "yes"; then : + + + +for flag in -Werror; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ac_cv_warnings_as_errors=yes + +else + + + +for flag in -Werror; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${ax_append_compile_cflags_extra+:} false; then : + case " $ax_append_compile_cflags_extra " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra already contains \$flag"; } >&5 + (: ax_append_compile_cflags_extra already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra \$flag\""; } >&5 + (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" + ;; + esac +else + ax_append_compile_cflags_extra="$flag" +fi + +else + : +fi + +done + + +fi + + if test "$ax_enable_debug" = "yes"; then : + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -ggdb; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -O0; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + + +for flag in -Wno-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wall; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wno-strict-aliasing; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wextra; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wthis-test-should-fail; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + if test "$CC" = "clang"; then : + +else + + + +for flag in --param=ssp-buffer-size=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + +for flag in -Waddress; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Warray-bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wbad-function-cast; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wchar-subscripts; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wcomment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wfloat-equal; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wformat-security; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wformat=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmaybe-uninitialized; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-field-initializers; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wnested-externs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wnormalized=id; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Woverride-init; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wpointer-arith; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wpointer-sign; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wredundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wshadow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wshorten-64-to-32; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wsign-compare; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wstrict-overflow=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wstrict-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wswitch-enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wundef; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused-result; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused-variable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wwrite-strings; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -fwrapv; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -fPIE; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# link to ws2_32 if on mingw +case $host_os in + *mingw32) + LDFLAGS="$LDFLAGS -lws2_32" ;; +esac + +# add user C_EXTRA_FLAGS back +CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" +OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" + + + + HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \ + awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` + + + + + + +# FINAL +ac_config_files="$ac_config_files stamp-h" + +ac_config_files="$ac_config_files Makefile" + +ac_config_files="$ac_config_files cyassl/version.h" + +ac_config_files="$ac_config_files cyassl/options.h" + +ac_config_files="$ac_config_files support/cyassl.pc" + +ac_config_files="$ac_config_files rpm/spec" + + +# create a generic PACKAGE-config file +L=`echo $PACKAGE $LIBS` +P=`echo $L | sed -e 's/ -.*//'` +P=`echo $P` +V=`echo $VERSION` +F=`echo $P-config` +L=`echo -l$L | sed -e 's/^-llib/-l/'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: creating $F - generic $V for $L" >&5 +$as_echo "creating $F - generic $V for $L" >&6; } +test "x$prefix" = xNONE && prefix="$ac_default_prefix" +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +echo '#! /bin/sh' >$F +echo ' ' >>$F +echo 'package="'$P'"' >>$F +echo 'version="'$V'"' >>$F +echo 'libs="'$L'"' >>$F +echo ' ' >>$F +# in the order of occurence a standard automake Makefile +echo 'prefix="'$prefix'"' >>$F +echo 'exec_prefix="'$exec_prefix'"' >>$F +echo 'bindir="'$bindir'"' >>$F +echo 'sbindir="'$sbindir'"' >>$F +echo 'libexecdir="'$libexecdir'"' >>$F +echo 'datadir="'$datadir'"' >>$F +echo 'sysconfdir="'$sysconfdir'"' >>$F +echo 'sharedstatedir="'$sharedstatedir'"' >>$F +echo 'localstatedir="'$localstatedir'"' >>$F +echo 'libdir="'$libdir'"' >>$F +echo 'infodir="'$infodir'"' >>$F +echo 'mandir="'$mandir'"' >>$F +echo 'includedir="'$includedir'"' >>$F +echo 'target="'$target'"' >>$F +echo 'host="'$host'"' >>$F +echo 'build="'$build'"' >>$F +echo ' ' >>$F +echo 'if test "'"\$""#"'" -eq 0; then' >>$F +echo ' cat <>$F +echo 'Usage: $package-config OPTIONS' >>$F +echo 'Options:' >>$F +echo ' --prefix=DIR) : \$prefix' >>$F +echo ' --package) : \$package' >>$F +echo ' --version) : \$version' >>$F +echo ' --cflags) : -I\$includedir' >>$F +echo ' --libs) : -L\$libdir -l\$package' >>$F +echo ' --help) print all the options (not just these)' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +echo ' ' >>$F +echo 'o=""' >>$F +echo 'h=""' >>$F +echo 'for i in "$@"; do' >>$F +echo ' case $i in' >>$F +echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F +echo ' --prefix) o="$o $prefix" ;;' >>$F +echo ' --package) o="$o $package" ;;' >>$F +echo ' --version) o="$o $version" ;;' >>$F +echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F +echo ' then o="$o -I$includedir" ; fi' >>$F +echo ' ;;' >>$F +echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F +echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F +echo ' --bindir) o="$o $bindir" ;;' >>$F +echo ' --sbindir) o="$o $sbindir" ;;' >>$F +echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F +echo ' --datadir) o="$o $datadir" ;;' >>$F +echo ' --datainc) o="$o -I$datadir" ;;' >>$F +echo ' --datalib) o="$o -L$datadir" ;;' >>$F +echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F +echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F +echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F +echo ' --libdir) o="$o $libdir" ;;' >>$F +echo ' --libadd) o="$o -L$libdir" ;;' >>$F +echo ' --infodir) o="$o $infodir" ;;' >>$F +echo ' --mandir) o="$o $mandir" ;;' >>$F +echo ' --target) o="$o $target" ;;' >>$F +echo ' --host) o="$o $host" ;;' >>$F +echo ' --build) o="$o $build" ;;' >>$F +echo ' --data) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F +echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F +echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F +echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F +echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F +echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F +echo ' --help) h="1" ;;' >>$F +echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F +echo ' v=`echo $i | sed -e s://:\$:g`' >>$F +echo ' v=`eval "echo $v"` ' >>$F +echo ' o="$o $v" ;; ' >>$F +echo ' esac' >>$F +echo 'done' >>$F +echo ' ' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'eval "echo $o"' >>$F +echo ' ' >>$F +echo 'if test ! -z "$h" ; then ' >>$F +echo 'cat <>$F +echo ' --prefix=xxx) (what is that for anyway?)' >>$F +echo ' --prefix) \$prefix $prefix' >>$F +echo ' --package) \$package $package' >>$F +echo ' --version) \$version $version' >>$F +echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F +echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F +echo ' --exec_prefix) or... ' >>$F +echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F +echo ' --bindir) \$bindir $bindir' >>$F +echo ' --sbindir) \$sbindir $sbindir' >>$F +echo ' --libexecdir) \$libexecdir $libexecdir' >>$F +echo ' --datadir) \$datadir $datadir' >>$F +echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F +echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F +echo ' --localstatedir) \$localstatedir $localstatedir' >>$F +echo ' --libdir) \$libdir $libdir' >>$F +echo ' --infodir) \$infodir $infodir' >>$F +echo ' --mandir) \$mandir $mandir' >>$F +echo ' --target) \$target $target' >>$F +echo ' --host) \$host $host' >>$F +echo ' --build) \$build $build' >>$F +echo ' --data) -I\$datadir/\$package' >>$F +echo ' --pkgdatadir) \$datadir/\$package' >>$F +echo ' --pkglibdir) \$libdir/\$package' >>$F +echo ' --pkgincludedir) \$includedir/\$package' >>$F +echo ' --help) generated by ax_create_generic_config.m4' >>$F +echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F +echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +GENERIC_CONFIG="$F" + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 +$as_echo_n "checking the number of available CPUs... " >&6; } + CPU_COUNT="0" + + case $host_os in @%:@( + + *darwin*) : + + if test -x /usr/sbin/sysctl; then : + + sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` + if test sysctl_a; then : + + CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` + +fi + +fi ;; @%:@( + + *linux*) : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` + +fi + +fi + ;; @%:@( + *) : + ;; +esac + + if test "x$CPU_COUNT" = "x0"; then : + + CPU_COUNT="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1) " >&5 +$as_echo "unable to detect (assuming 1) " >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT " >&5 +$as_echo "$CPU_COUNT " >&6; } + +fi + + +AX_DOLLAR="\$" +AX_SRB="\\135" +AX_SLB="\\133" +AX_BS="\\\\" +AX_DQ="\"" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5 +$as_echo "$as_me: adding automake macro support" >&6;} +AMINCLUDE="aminclude.am" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5 +$as_echo "$as_me: creating $AMINCLUDE" >&6;} +AMINCLUDE_TIME=`date` + + +printf " +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on $AMINCLUDE_TIME + +" > "$AMINCLUDE" + + +INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" + + + + + + @%:@ Check whether --enable-jobserver was given. +if test "${enable_jobserver+set}" = set; then : + enableval=$enable_jobserver; +else + enable_jobserver=yes +fi + + if test "x$enable_jobserver" = "xyes"; then + enable_jobserver=$CPU_COUNT + ((enable_jobserver++)) + fi + + if test "x$enable_jobserver" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5 +$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;} + + + + +printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE" + + + fi + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIB@&t@OBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + as_fn_error $? "conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LEANPSK_TRUE}" && test -z "${BUILD_LEANPSK_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LEANPSK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SNIFFER_TRUE}" && test -z "${BUILD_SNIFFER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SNIFFER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SNIFFTEST_TRUE}" && test -z "${BUILD_SNIFFTEST_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SNIFFTEST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESGCM_TRUE}" && test -z "${BUILD_AESGCM_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESGCM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESCCM_TRUE}" && test -z "${BUILD_AESCCM_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESCCM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESNI_TRUE}" && test -z "${BUILD_AESNI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESNI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CAMELLIA_TRUE}" && test -z "${BUILD_CAMELLIA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CAMELLIA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD2_TRUE}" && test -z "${BUILD_MD2_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RIPEMD_TRUE}" && test -z "${BUILD_RIPEMD_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RIPEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_BLAKE2_TRUE}" && test -z "${BUILD_BLAKE2_FALSE}"; then + as_fn_error $? "conditional \"BUILD_BLAKE2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DSA_TRUE}" && test -z "${BUILD_DSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ECC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MEMORY_TRUE}" && test -z "${BUILD_MEMORY_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MEMORY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RSA_TRUE}" && test -z "${BUILD_RSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DH_TRUE}" && test -z "${BUILD_DH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ASN_TRUE}" && test -z "${BUILD_ASN_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ASN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AES_TRUE}" && test -z "${BUILD_AES_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CODING_TRUE}" && test -z "${BUILD_CODING_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CODING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DES3_TRUE}" && test -z "${BUILD_DES3_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DES3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RC4_TRUE}" && test -z "${BUILD_RC4_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RC4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD5_TRUE}" && test -z "${BUILD_MD5_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD5\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA_TRUE}" && test -z "${BUILD_SHA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD4_TRUE}" && test -z "${BUILD_MD4_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PWDBASED_TRUE}" && test -z "${BUILD_PWDBASED_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PWDBASED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_HC128_TRUE}" && test -z "${BUILD_HC128_FALSE}"; then + as_fn_error $? "conditional \"BUILD_HC128\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RABBIT_TRUE}" && test -z "${BUILD_RABBIT_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RABBIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_FIPS_TRUE}" && test -z "${BUILD_FIPS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_FIPS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_INLINE_TRUE}" && test -z "${BUILD_INLINE_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_OCSP_TRUE}" && test -z "${BUILD_OCSP_FALSE}"; then + as_fn_error $? "conditional \"BUILD_OCSP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CRL_TRUE}" && test -z "${BUILD_CRL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CRL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CRL_MONITOR_TRUE}" && test -z "${BUILD_CRL_MONITOR_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CRL_MONITOR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_NTRU_TRUE}" && test -z "${BUILD_NTRU_FALSE}"; then + as_fn_error $? "conditional \"BUILD_NTRU\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_VALGRIND_TRUE}" && test -z "${USE_VALGRIND_FALSE}"; then + as_fn_error $? "conditional \"USE_VALGRIND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ECC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_FASTMATH_TRUE}" && test -z "${BUILD_FASTMATH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_FASTMATH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SLOWMATH_TRUE}" && test -z "${BUILD_SLOWMATH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SLOWMATH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then + as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LIBZ_TRUE}" && test -z "${BUILD_LIBZ_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LIBZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MCAPI_TRUE}" && test -z "${BUILD_MCAPI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MCAPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then + as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in @%:@( + *posix*) : + set -o posix ;; @%:@( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in @%:@( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in @%:@(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cyassl $as_me 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +cyassl home page: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +cyassl config.status 3.0.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX +@%:@@%:@ Running $as_me. @%:@@%:@ +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; + "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; + "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; + "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + "stamp-h":F) echo timestamp > stamp-h ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + + +# force make clean +echo "---" +echo "Running make clean..." +make clean >/dev/null 2>&1 +echo + +# generate user options header +echo "---" +echo "Generating user options header..." +OPTION_FILE="cyassl/options.h" +rm -f $OPTION_FILE + +echo "/* cyassl options.h" >> $OPTION_FILE +echo " * generated from configure options" >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * This file is part of CyaSSL." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " */" >> $OPTION_FILE + +echo "" >> $OPTION_FILE +echo "#pragma once" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "extern \"C\" {" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE + +for option in $OPTION_FLAGS; do + defonly=`echo $option | sed 's/-D//'` + if test "$defonly" != "$option" + then + noequalsign=`echo $defonly | sed 's/=/ /'` + echo "#undef $noequalsign" >> $OPTION_FILE + echo "#define $noequalsign" >> $OPTION_FILE + echo "" >> $OPTION_FILE + else + echo "option w/o begin -D is $option, not saving to $OPTION_FILE" + fi +done + +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "}" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo + +# output config summary +echo "---" +echo "Configuration summary for $PACKAGE_NAME version $VERSION" +echo "" +echo " * Installation prefix: $prefix" +echo " * System type: $host_vendor-$host_os" +echo " * Host CPU: $host_cpu" +echo " * C Compiler: $CC" +echo " * C Flags: $CFLAGS" +echo " * C++ Compiler: $CXX" +echo " * C++ Flags: $CXXFLAGS" +echo " * CPP Flags: $CPPFLAGS" +echo " * LIB Flags: $LIB" +echo " * Debug enabled: $ax_enable_debug" +echo " * Warnings as failure: $ac_cv_warnings_as_errors" +echo " * make -j: $enable_jobserver" +echo " * VCS checkout: $ac_cv_vcs_checkout" +echo +echo " Features " +echo " * Single threaded: $ENABLED_SINGLETHREADED" +echo " * Filesystem: $ENABLED_FILESYSTEM" +echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" +echo " * fastmath: $ENABLED_FASTMATH" +echo " * sniffer: $ENABLED_SNIFFER" +echo " * snifftest: $ENABLED_SNIFFTEST" +echo " * ARC4: $ENABLED_ARC4" +echo " * AES: $ENABLED_AES" +echo " * AES-NI: $ENABLED_AESNI" +echo " * AES-GCM: $ENABLED_AESGCM" +echo " * AES-CCM: $ENABLED_AESCCM" +echo " * DES3: $ENABLED_DES3" +echo " * Camellia: $ENABLED_CAMELLIA" +echo " * NULL Cipher: $ENABLED_NULL_CIPHER" +echo " * MD5: $ENABLED_MD5" +echo " * RIPEMD: $ENABLED_RIPEMD" +echo " * SHA: $ENABLED_SHA" +echo " * SHA-512: $ENABLED_SHA512" +echo " * BLAKE2: $ENABLED_BLAKE2" +echo " * keygen: $ENABLED_KEYGEN" +echo " * certgen: $ENABLED_CERTGEN" +echo " * certreq: $ENABLED_CERTREQ" +echo " * HC-128: $ENABLED_HC128" +echo " * RABBIT: $ENABLED_RABBIT" +echo " * PWDBASED: $ENABLED_PWDBASED" +echo " * HKDF: $ENABLED_HKDF" +echo " * MD4: $ENABLED_MD4" +echo " * PSK: $ENABLED_PSK" +echo " * LEANPSK: $ENABLED_LEANPSK" +echo " * RSA: $ENABLED_RSA" +echo " * DSA: $ENABLED_DSA" +echo " * DH: $ENABLED_DH" +echo " * ECC: $ENABLED_ECC" +echo " * FPECC: $ENABLED_FPECC" +echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" +echo " * ASN: $ENABLED_ASN" +echo " * CODING: $ENABLED_CODING" +echo " * MEMORY: $ENABLED_MEMORY" +echo " * I/O POOL: $ENABLED_IOPOOL" +echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" +echo " * DTLS: $ENABLED_DTLS" +echo " * Old TLS Versions: $ENABLED_OLD_TLS" +echo " * OCSP: $ENABLED_OCSP" +echo " * CRL: $ENABLED_CRL" +echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" +echo " * Persistent session cache: $ENABLED_SAVESESSION" +echo " * Persistent cert cache: $ENABLED_SAVECERT" +echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" +echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" +echo " * NTRU: $ENABLED_NTRU" +echo " * SNI: $ENABLED_SNI" +echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" +echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" +echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" +echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" +echo " * All TLS Extensions: $ENABLED_TLSX" +echo " * PKCS#7 $ENABLED_PKCS7" +echo " * wolfSCEP $ENABLED_WOLFSCEP" +echo " * Small Stack: $ENABLED_SMALL_STACK" +echo " * valgrind unit tests: $ENABLED_VALGRIND" +echo " * LIBZ: $ENABLED_LIBZ" +echo " * Examples: $ENABLED_EXAMPLES" +echo "" +echo "---" + diff --git a/project1/cyassl-3.0.0/autom4te.cache/requests b/project1/cyassl-3.0.0/autom4te.cache/requests new file mode 100644 index 00000000..283cef37 --- /dev/null +++ b/project1/cyassl-3.0.0/autom4te.cache/requests @@ -0,0 +1,80 @@ +# This file was generated by Autom4te Thu Apr 10 10:06:43 UTC 2014. +# It contains the lists of macros which have been traced. +# It can be safely removed. + +@request = ( + bless( [ + '0', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + 'aclocal.m4', + 'configure.ac' + ], + { + 'AC_CANONICAL_SYSTEM' => 1, + 'AM_POT_TOOLS' => 1, + 'AC_LIBSOURCE' => 1, + 'AM_PATH_GUILE' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_CANONICAL_HOST' => 1, + 'AM_NLS' => 1, + 'AM_CONDITIONAL' => 1, + '_AM_COND_IF' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AC_SUBST_TRACE' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_PROG_AR' => 1, + 'AC_CONFIG_LINKS' => 1, + '_AM_COND_ENDIF' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_FC_FREEFORM' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AM_PROG_MOC' => 1, + 'm4_pattern_allow' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + '_AM_COND_ELSE' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'AC_FC_SRCEXT' => 1, + 'include' => 1, + 'LT_INIT' => 1, + 'm4_include' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AC_CONFIG_FILES' => 1, + 'm4_pattern_forbid' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'm4_sinclude' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AM_PROG_F77_C_O' => 1, + 'AC_SUBST' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AM_SILENT_RULES' => 1, + '_m4_warn' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AC_INIT' => 1, + 'AH_OUTPUT' => 1, + 'AM_ENABLE_MULTILIB' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + 'sinclude' => 1 + } + ], 'Autom4te::Request' ) + ); + diff --git a/project1/cyassl-3.0.0/autom4te.cache/traces.0 b/project1/cyassl-3.0.0/autom4te.cache/traces.0 new file mode 100644 index 00000000..db8f6f5d --- /dev/null +++ b/project1/cyassl-3.0.0/autom4te.cache/traces.0 @@ -0,0 +1,1332 @@ +m4trace:aclocal.m4:1170: -1- m4_include([m4/ax_add_am_macro.m4]) +m4trace:aclocal.m4:1171: -1- m4_include([m4/ax_am_jobserver.m4]) +m4trace:aclocal.m4:1172: -1- m4_include([m4/ax_am_macros.m4]) +m4trace:aclocal.m4:1173: -1- m4_include([m4/ax_append_compile_flags.m4]) +m4trace:aclocal.m4:1174: -1- m4_include([m4/ax_append_flag.m4]) +m4trace:aclocal.m4:1175: -1- m4_include([m4/ax_append_to_file.m4]) +m4trace:aclocal.m4:1176: -1- m4_include([m4/ax_check_compile_flag.m4]) +m4trace:aclocal.m4:1177: -1- m4_include([m4/ax_check_link_flag.m4]) +m4trace:aclocal.m4:1178: -1- m4_include([m4/ax_count_cpus.m4]) +m4trace:aclocal.m4:1179: -1- m4_include([m4/ax_create_generic_config.m4]) +m4trace:aclocal.m4:1180: -1- m4_include([m4/ax_debug.m4]) +m4trace:aclocal.m4:1181: -1- m4_include([m4/ax_file_escapes.m4]) +m4trace:aclocal.m4:1182: -1- m4_include([m4/ax_harden_compiler_flags.m4]) +m4trace:aclocal.m4:1183: -1- m4_include([m4/ax_print_to_file.m4]) +m4trace:aclocal.m4:1184: -1- m4_include([m4/ax_pthread.m4]) +m4trace:aclocal.m4:1185: -1- m4_include([m4/ax_tls.m4]) +m4trace:aclocal.m4:1186: -1- m4_include([m4/ax_vcs_checkout.m4]) +m4trace:aclocal.m4:1187: -1- m4_include([m4/hexversion.m4]) +m4trace:aclocal.m4:1188: -1- m4_include([m4/lib_socket_nsl.m4]) +m4trace:aclocal.m4:1189: -1- m4_include([m4/libtool.m4]) +m4trace:aclocal.m4:1190: -1- m4_include([m4/ltoptions.m4]) +m4trace:aclocal.m4:1191: -1- m4_include([m4/ltsugar.m4]) +m4trace:aclocal.m4:1192: -1- m4_include([m4/ltversion.m4]) +m4trace:aclocal.m4:1193: -1- m4_include([m4/lt~obsolete.m4]) +m4trace:aclocal.m4:1194: -1- m4_include([m4/visibility.m4]) +m4trace:aclocal.m4:1195: -1- m4_include([m4/wolfssl_darwin_clang.m4]) +m4trace:configure.ac:9: -1- AC_INIT([cyassl], [3.0.0], [https://github.com/cyassl/cyassl/issues], [cyassl], [http://www.wolfssl.com]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:9: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:9: -1- AC_SUBST([SHELL]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([SHELL]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:9: -1- AC_SUBST([PATH_SEPARATOR]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_NAME]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_STRING]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_URL]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:9: -1- AC_SUBST([exec_prefix], [NONE]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([exec_prefix]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:9: -1- AC_SUBST([prefix], [NONE]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([prefix]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:9: -1- AC_SUBST([program_transform_name], [s,x,x,]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([program_transform_name]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:9: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([bindir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:9: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sbindir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:9: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([libexecdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([datarootdir], ['${prefix}/share']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([datarootdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([datadir], ['${datarootdir}']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([datadir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:9: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sysconfdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sharedstatedir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:9: -1- AC_SUBST([localstatedir], ['${prefix}/var']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([localstatedir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:9: -1- AC_SUBST([includedir], ['${prefix}/include']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([includedir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:9: -1- AC_SUBST([oldincludedir], ['/usr/include']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([oldincludedir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:9: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([docdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([infodir], ['${datarootdir}/info']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([infodir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:9: -1- AC_SUBST([htmldir], ['${docdir}']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([htmldir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:9: -1- AC_SUBST([dvidir], ['${docdir}']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([dvidir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:9: -1- AC_SUBST([pdfdir], ['${docdir}']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([pdfdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([psdir], ['${docdir}']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([psdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([libdir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:9: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([localedir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:9: -1- AC_SUBST([mandir], ['${datarootdir}/man']) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([mandir]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ +@%:@undef PACKAGE_NAME]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ +@%:@undef PACKAGE_TARNAME]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ +@%:@undef PACKAGE_VERSION]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ +@%:@undef PACKAGE_STRING]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ +@%:@undef PACKAGE_BUGREPORT]) +m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ +@%:@undef PACKAGE_URL]) +m4trace:configure.ac:9: -1- AC_SUBST([DEFS]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DEFS]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:9: -1- AC_SUBST([ECHO_C]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_C]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:9: -1- AC_SUBST([ECHO_N]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_N]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:9: -1- AC_SUBST([ECHO_T]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_T]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:9: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:9: -1- AC_SUBST([build_alias]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build_alias]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:9: -1- AC_SUBST([host_alias]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host_alias]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:9: -1- AC_SUBST([target_alias]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target_alias]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:11: -1- AC_CONFIG_AUX_DIR([build-aux]) +m4trace:configure.ac:13: -1- AC_CANONICAL_HOST +m4trace:configure.ac:13: -1- AC_CANONICAL_BUILD +m4trace:configure.ac:13: -1- AC_REQUIRE_AUX_FILE([config.sub]) +m4trace:configure.ac:13: -1- AC_REQUIRE_AUX_FILE([config.guess]) +m4trace:configure.ac:13: -1- AC_SUBST([build], [$ac_cv_build]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:13: -1- AC_SUBST([build_cpu], [$[1]]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_cpu]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:13: -1- AC_SUBST([build_vendor], [$[2]]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_vendor]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:13: -1- AC_SUBST([build_os]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_os]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:13: -1- AC_SUBST([host], [$ac_cv_host]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:13: -1- AC_SUBST([host_cpu], [$[1]]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_cpu]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:13: -1- AC_SUBST([host_vendor], [$[2]]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_vendor]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:13: -1- AC_SUBST([host_os]) +m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_os]) +m4trace:configure.ac:13: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:14: -1- AC_CANONICAL_BUILD +m4trace:configure.ac:16: -1- AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:16: -1- AM_AUTOMAKE_VERSION([1.14.1]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_DATA]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__isrc]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:16: -1- AC_SUBST([CYGPATH_W]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CYGPATH_W]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:16: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([PACKAGE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:16: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([VERSION]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([missing]) +m4trace:configure.ac:16: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ACLOCAL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOCONF]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOMAKE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOHEADER]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:16: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MAKEINFO]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:16: -1- AC_SUBST([install_sh]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([install_sh]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:16: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:16: -1- AC_SUBST([MKDIR_P]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:16: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([mkdir_p]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:16: -1- AC_SUBST([AWK]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AWK]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:16: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SET_MAKE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__leading_dot]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__leading_dot]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:16: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AMTAR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__tar]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__tar]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__untar]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__untar]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:16: -1- AM_SILENT_RULES +m4trace:configure.ac:16: -1- AC_SUBST([AM_V]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_V]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_V$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:16: -1- AC_SUBST([AM_DEFAULT_V]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_DEFAULT_V$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:16: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) +m4trace:configure.ac:16: -1- AC_SUBST([AM_BACKSLASH]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_BACKSLASH]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_BACKSLASH$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) +m4trace:configure.ac:31: -1- AC_CONFIG_HEADERS([config.h:config.in]) +m4trace:configure.ac:46: -1- AC_SUBST([CYASSL_LIBRARY_VERSION]) +m4trace:configure.ac:46: -1- AC_SUBST_TRACE([CYASSL_LIBRARY_VERSION]) +m4trace:configure.ac:46: -1- m4_pattern_allow([^CYASSL_LIBRARY_VERSION$]) +m4trace:configure.ac:53: -1- LT_INIT([disable-static], [win32-dll]) +m4trace:configure.ac:53: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.ac:53: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.ac:53: -1- AC_SUBST([LIBTOOL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIBTOOL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:53: -1- AC_SUBST([CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:53: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:53: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:53: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:53: -1- AC_SUBST([CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:53: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([EXEEXT]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:53: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJEXT]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:53: -1- AC_REQUIRE_AUX_FILE([compile]) +m4trace:configure.ac:53: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DEPDIR]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:53: -1- AC_SUBST([am__include]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__include]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:53: -1- AC_SUBST([am__quote]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__quote]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:53: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:53: -1- AC_SUBST([AMDEP_TRUE]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEP_TRUE]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:53: -1- AC_SUBST([AMDEP_FALSE]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEP_FALSE]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:53: -1- AC_SUBST([AMDEPBACKSLASH]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:53: -1- AC_SUBST([am__nodep]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__nodep]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^am__nodep$]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__nodep]) +m4trace:configure.ac:53: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:53: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:53: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:53: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:53: -1- AC_SUBST([SED]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([SED]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:53: -1- AC_SUBST([GREP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:53: -1- AC_SUBST([EGREP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([EGREP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:53: -1- AC_SUBST([FGREP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([FGREP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.ac:53: -1- AC_SUBST([GREP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:53: -1- AC_SUBST([LD]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LD]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LD$]) +m4trace:configure.ac:53: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_DUMPBIN]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.ac:53: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:53: -1- AC_SUBST([NM]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([NM]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^NM$]) +m4trace:configure.ac:53: -1- AC_SUBST([LN_S], [$as_ln_s]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LN_S]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:53: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:53: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:53: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:53: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:53: -1- AC_SUBST([AR]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AR]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_AR]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_AR]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.ac:53: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:53: -1- AC_SUBST([RANLIB]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([RANLIB]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:53: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.ac:53: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +@%:@undef LT_OBJDIR]) +m4trace:configure.ac:53: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.ac:53: -1- AC_SUBST([MANIFEST_TOOL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([MANIFEST_TOOL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.ac:53: -1- AC_SUBST([DSYMUTIL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DSYMUTIL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.ac:53: -1- AC_SUBST([NMEDIT]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([NMEDIT]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.ac:53: -1- AC_SUBST([LIPO]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIPO]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.ac:53: -1- AC_SUBST([OTOOL]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OTOOL]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.ac:53: -1- AC_SUBST([OTOOL64]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OTOOL64]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_DLFCN_H]) +m4trace:configure.ac:53: -1- AC_SUBST([CPP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:53: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:53: -1- AC_SUBST([CPP]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:53: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +@%:@undef STDC_HEADERS]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_TYPES_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_STAT_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDLIB_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRING_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_MEMORY_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRINGS_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_INTTYPES_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDINT_H]) +m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_UNISTD_H]) +m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.ac:54: -1- LT_SUPPORTED_TAG([CXX]) +m4trace:configure.ac:54: -1- AC_SUBST([CXX]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:54: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXFLAGS]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:54: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:54: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:54: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:54: -1- AC_SUBST([CXX]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:54: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([ac_ct_CXX]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:54: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:54: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:54: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:54: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:54: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:54: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:54: -1- AC_SUBST([CXXCPP]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:54: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:54: -1- AC_SUBST([CXXCPP]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:54: -1- AC_SUBST([LD]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LD]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^LD$]) +m4trace:configure.ac:57: -1- AC_SUBST([CFLAG_VISIBILITY]) +m4trace:configure.ac:57: -1- AC_SUBST_TRACE([CFLAG_VISIBILITY]) +m4trace:configure.ac:57: -1- m4_pattern_allow([^CFLAG_VISIBILITY$]) +m4trace:configure.ac:57: -1- AC_SUBST([HAVE_VISIBILITY]) +m4trace:configure.ac:57: -1- AC_SUBST_TRACE([HAVE_VISIBILITY]) +m4trace:configure.ac:57: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) +m4trace:configure.ac:57: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VISIBILITY]) +m4trace:configure.ac:57: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) +m4trace:configure.ac:57: -1- AH_OUTPUT([HAVE_VISIBILITY], [/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +@%:@undef HAVE_VISIBILITY]) +m4trace:configure.ac:63: -1- AM_SILENT_RULES([yes]) +m4trace:configure.ac:63: -1- AC_SUBST([AM_V]) +m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_V]) +m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_V$]) +m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:63: -1- AC_SUBST([AM_DEFAULT_V]) +m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) +m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_DEFAULT_V$]) +m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:63: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) +m4trace:configure.ac:63: -1- AC_SUBST([AM_BACKSLASH]) +m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_BACKSLASH]) +m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_BACKSLASH$]) +m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) +m4trace:configure.ac:65: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ +@%:@undef HAVE_GETHOSTBYNAME]) +m4trace:configure.ac:65: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME$]) +m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Define to 1 if you have the `getaddrinfo\' function. */ +@%:@undef HAVE_GETADDRINFO]) +m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) +m4trace:configure.ac:67: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ +@%:@undef HAVE_GETTIMEOFDAY]) +m4trace:configure.ac:67: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTIMEOFDAY]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY$]) +m4trace:configure.ac:68: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */ +@%:@undef HAVE_INET_NTOA]) +m4trace:configure.ac:68: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOA]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^HAVE_INET_NTOA$]) +m4trace:configure.ac:69: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ +@%:@undef HAVE_MEMSET]) +m4trace:configure.ac:69: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMSET]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^HAVE_MEMSET$]) +m4trace:configure.ac:70: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ +@%:@undef HAVE_SOCKET]) +m4trace:configure.ac:70: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKET]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^HAVE_SOCKET$]) +m4trace:configure.ac:71: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_ARPA_INET_H]) +m4trace:configure.ac:71: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ARPA_INET_H]) +m4trace:configure.ac:71: -1- m4_pattern_allow([^HAVE_ARPA_INET_H$]) +m4trace:configure.ac:72: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_FCNTL_H]) +m4trace:configure.ac:72: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FCNTL_H]) +m4trace:configure.ac:72: -1- m4_pattern_allow([^HAVE_FCNTL_H$]) +m4trace:configure.ac:73: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_LIMITS_H]) +m4trace:configure.ac:73: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMITS_H]) +m4trace:configure.ac:73: -1- m4_pattern_allow([^HAVE_LIMITS_H$]) +m4trace:configure.ac:74: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_NETDB_H]) +m4trace:configure.ac:74: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETDB_H]) +m4trace:configure.ac:74: -1- m4_pattern_allow([^HAVE_NETDB_H$]) +m4trace:configure.ac:75: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_NETINET_IN_H]) +m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETINET_IN_H]) +m4trace:configure.ac:75: -1- m4_pattern_allow([^HAVE_NETINET_IN_H$]) +m4trace:configure.ac:76: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDDEF_H]) +m4trace:configure.ac:76: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDDEF_H]) +m4trace:configure.ac:76: -1- m4_pattern_allow([^HAVE_STDDEF_H$]) +m4trace:configure.ac:77: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_IOCTL_H]) +m4trace:configure.ac:77: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_IOCTL_H]) +m4trace:configure.ac:77: -1- m4_pattern_allow([^HAVE_SYS_IOCTL_H$]) +m4trace:configure.ac:78: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_SOCKET_H]) +m4trace:configure.ac:78: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SOCKET_H]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^HAVE_SYS_SOCKET_H$]) +m4trace:configure.ac:79: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_TIME_H]) +m4trace:configure.ac:79: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIME_H]) +m4trace:configure.ac:79: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_ERRNO_H]) +m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ERRNO_H]) +m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ERRNO_H$]) +m4trace:configure.ac:81: -1- AH_OUTPUT([HAVE_LIBNETWORK], [/* Define to 1 if you have the `network\' library (-lnetwork). */ +@%:@undef HAVE_LIBNETWORK]) +m4trace:configure.ac:81: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNETWORK]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^HAVE_LIBNETWORK$]) +m4trace:configure.ac:82: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG]) +m4trace:configure.ac:82: -1- m4_pattern_allow([^SIZEOF_LONG_LONG$]) +m4trace:configure.ac:82: -1- AH_OUTPUT([SIZEOF_LONG_LONG], [/* The size of `long long\', as computed by sizeof. */ +@%:@undef SIZEOF_LONG_LONG]) +m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG]) +m4trace:configure.ac:83: -1- m4_pattern_allow([^SIZEOF_LONG$]) +m4trace:configure.ac:83: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */ +@%:@undef SIZEOF_LONG]) +m4trace:configure.ac:84: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif]) +m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN]) +m4trace:configure.ac:84: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) +m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) +m4trace:configure.ac:84: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) +m4trace:configure.ac:84: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ +@%:@undef AC_APPLE_UNIVERSAL_BUILD]) +m4trace:configure.ac:89: -1- AC_SUBST([CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:89: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:89: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:89: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:89: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:89: -1- AC_SUBST([CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:89: -1- AC_SUBST([CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:89: -1- AC_SUBST([CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:89: -1- AC_SUBST([CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:89: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:89: -1- AC_REQUIRE_AUX_FILE([compile]) +m4trace:configure.ac:89: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:89: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:89: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:89: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:89: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:89: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:90: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O]) +m4trace:configure.ac:90: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) +m4trace:configure.ac:90: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */ +@%:@undef NO_MINUS_C_MINUS_O]) +m4trace:configure.ac:91: -1- AC_SUBST([CXX]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:91: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXXFLAGS]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:91: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:91: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:91: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:91: -1- AC_SUBST([CXX]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:91: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([ac_ct_CXX]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:91: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:91: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:91: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:91: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:91: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:91: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:91: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:93: -1- AC_DEFINE_TRACE_LITERAL([size_t]) +m4trace:configure.ac:93: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:93: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ +@%:@undef size_t]) +m4trace:configure.ac:94: -1- AC_DEFINE_TRACE_LITERAL([_UINT8_T]) +m4trace:configure.ac:94: -1- m4_pattern_allow([^_UINT8_T$]) +m4trace:configure.ac:94: -1- AH_OUTPUT([_UINT8_T], [/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + @%:@define below would cause a syntax error. */ +@%:@undef _UINT8_T]) +m4trace:configure.ac:94: -1- AC_DEFINE_TRACE_LITERAL([uint8_t]) +m4trace:configure.ac:94: -1- m4_pattern_allow([^uint8_t$]) +m4trace:configure.ac:94: -1- AH_OUTPUT([uint8_t], [/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +@%:@undef uint8_t]) +m4trace:configure.ac:95: -1- AC_SUBST([CCAS]) +m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCAS]) +m4trace:configure.ac:95: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:95: -1- AC_SUBST([CCASFLAGS]) +m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCASFLAGS]) +m4trace:configure.ac:95: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:95: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type]) +m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCASDEPMODE]) +m4trace:configure.ac:95: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:95: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:95: -1- AC_SUBST([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:95: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:95: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:95: -1- AC_SUBST([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:95: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:95: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:95: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:95: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:96: -1- AM_PROG_CC_C_O +m4trace:configure.ac:97: -1- AC_SUBST([LIBM]) +m4trace:configure.ac:97: -1- AC_SUBST_TRACE([LIBM]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^LIBM$]) +m4trace:configure.ac:106: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:550: AS_CASE is expanded from... +../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... +../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... +m4/ax_tls.m4:65: AX_TLS is expanded from... +configure.ac:106: the top level]) +m4trace:configure.ac:106: -2- AC_DEFINE_TRACE_LITERAL([TLS]) +m4trace:configure.ac:106: -2- m4_pattern_allow([^TLS$]) +m4trace:configure.ac:106: -2- AH_OUTPUT([TLS], [/* If the compiler supports a TLS storage class define it to that here */ +@%:@undef TLS]) +m4trace:configure.ac:113: -1- AC_DEFINE_TRACE_LITERAL([DEBUG]) +m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG$]) +m4trace:configure.ac:113: -1- AH_OUTPUT([DEBUG], [/* Define to 1 to enable debugging code. */ +@%:@undef DEBUG]) +m4trace:configure.ac:113: -1- AC_SUBST([MCHECK]) +m4trace:configure.ac:113: -1- AC_SUBST_TRACE([MCHECK]) +m4trace:configure.ac:113: -1- m4_pattern_allow([^MCHECK$]) +m4trace:configure.ac:113: -1- AC_DEFINE_TRACE_LITERAL([DEBUG]) +m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG$]) +m4trace:configure.ac:113: -1- AH_OUTPUT([DEBUG], [/* Define to 1 to enable debugging code. */ +@%:@undef DEBUG]) +m4trace:configure.ac:113: -1- AM_CONDITIONAL([DEBUG], [test "x${ax_enable_debug}" = "xyes"]) +m4trace:configure.ac:113: -1- AC_SUBST([DEBUG_TRUE]) +m4trace:configure.ac:113: -1- AC_SUBST_TRACE([DEBUG_TRUE]) +m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG_TRUE$]) +m4trace:configure.ac:113: -1- AC_SUBST([DEBUG_FALSE]) +m4trace:configure.ac:113: -1- AC_SUBST_TRACE([DEBUG_FALSE]) +m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG_FALSE$]) +m4trace:configure.ac:113: -1- _AM_SUBST_NOTMAKE([DEBUG_TRUE]) +m4trace:configure.ac:113: -1- _AM_SUBST_NOTMAKE([DEBUG_FALSE]) +m4trace:configure.ac:125: -1- AC_SUBST([ax_pthread_config]) +m4trace:configure.ac:125: -1- AC_SUBST_TRACE([ax_pthread_config]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^ax_pthread_config$]) +m4trace:configure.ac:125: -1- AC_DEFINE_TRACE_LITERAL([PTHREAD_CREATE_JOINABLE]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CREATE_JOINABLE$]) +m4trace:configure.ac:125: -1- AH_OUTPUT([PTHREAD_CREATE_JOINABLE], [/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +@%:@undef PTHREAD_CREATE_JOINABLE]) +m4trace:configure.ac:125: -2- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_PRIO_INHERIT]) +m4trace:configure.ac:125: -2- m4_pattern_allow([^HAVE_PTHREAD_PRIO_INHERIT$]) +m4trace:configure.ac:125: -2- AH_OUTPUT([HAVE_PTHREAD_PRIO_INHERIT], [/* Have PTHREAD_PRIO_INHERIT. */ +@%:@undef HAVE_PTHREAD_PRIO_INHERIT]) +m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CC]) +m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CC]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CC$]) +m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_LIBS]) +m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_LIBS]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_LIBS$]) +m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CFLAGS]) +m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CFLAGS]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CFLAGS$]) +m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CC]) +m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CC]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CC$]) +m4trace:configure.ac:125: -2- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD]) +m4trace:configure.ac:125: -2- m4_pattern_allow([^HAVE_PTHREAD$]) +m4trace:configure.ac:125: -2- AH_OUTPUT([HAVE_PTHREAD], [/* Define if you have POSIX threads libraries and header files. */ +@%:@undef HAVE_PTHREAD]) +m4trace:configure.ac:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_PTHREAD$]) +m4trace:configure.ac:125: -1- AH_OUTPUT([HAVE_PTHREAD], [/* Define if you have POSIX threads libraries and header files. */ +@%:@undef HAVE_PTHREAD]) +m4trace:configure.ac:221: -1- AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"]) +m4trace:configure.ac:221: -1- AC_SUBST([BUILD_LEANPSK_TRUE]) +m4trace:configure.ac:221: -1- AC_SUBST_TRACE([BUILD_LEANPSK_TRUE]) +m4trace:configure.ac:221: -1- m4_pattern_allow([^BUILD_LEANPSK_TRUE$]) +m4trace:configure.ac:221: -1- AC_SUBST([BUILD_LEANPSK_FALSE]) +m4trace:configure.ac:221: -1- AC_SUBST_TRACE([BUILD_LEANPSK_FALSE]) +m4trace:configure.ac:221: -1- m4_pattern_allow([^BUILD_LEANPSK_FALSE$]) +m4trace:configure.ac:221: -1- _AM_SUBST_NOTMAKE([BUILD_LEANPSK_TRUE]) +m4trace:configure.ac:221: -1- _AM_SUBST_NOTMAKE([BUILD_LEANPSK_FALSE]) +m4trace:configure.ac:317: -1- AH_OUTPUT([HAVE_PCAP_PCAP_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_PCAP_PCAP_H]) +m4trace:configure.ac:317: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PCAP_PCAP_H]) +m4trace:configure.ac:317: -1- m4_pattern_allow([^HAVE_PCAP_PCAP_H$]) +m4trace:configure.ac:328: -1- AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" ]) +m4trace:configure.ac:328: -1- AC_SUBST([BUILD_SNIFFER_TRUE]) +m4trace:configure.ac:328: -1- AC_SUBST_TRACE([BUILD_SNIFFER_TRUE]) +m4trace:configure.ac:328: -1- m4_pattern_allow([^BUILD_SNIFFER_TRUE$]) +m4trace:configure.ac:328: -1- AC_SUBST([BUILD_SNIFFER_FALSE]) +m4trace:configure.ac:328: -1- AC_SUBST_TRACE([BUILD_SNIFFER_FALSE]) +m4trace:configure.ac:328: -1- m4_pattern_allow([^BUILD_SNIFFER_FALSE$]) +m4trace:configure.ac:328: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFER_TRUE]) +m4trace:configure.ac:328: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFER_FALSE]) +m4trace:configure.ac:329: -1- AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ]) +m4trace:configure.ac:329: -1- AC_SUBST([BUILD_SNIFFTEST_TRUE]) +m4trace:configure.ac:329: -1- AC_SUBST_TRACE([BUILD_SNIFFTEST_TRUE]) +m4trace:configure.ac:329: -1- m4_pattern_allow([^BUILD_SNIFFTEST_TRUE$]) +m4trace:configure.ac:329: -1- AC_SUBST([BUILD_SNIFFTEST_FALSE]) +m4trace:configure.ac:329: -1- AC_SUBST_TRACE([BUILD_SNIFFTEST_FALSE]) +m4trace:configure.ac:329: -1- m4_pattern_allow([^BUILD_SNIFFTEST_FALSE$]) +m4trace:configure.ac:329: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFTEST_TRUE]) +m4trace:configure.ac:329: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFTEST_FALSE]) +m4trace:configure.ac:361: -1- AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"]) +m4trace:configure.ac:361: -1- AC_SUBST([BUILD_AESGCM_TRUE]) +m4trace:configure.ac:361: -1- AC_SUBST_TRACE([BUILD_AESGCM_TRUE]) +m4trace:configure.ac:361: -1- m4_pattern_allow([^BUILD_AESGCM_TRUE$]) +m4trace:configure.ac:361: -1- AC_SUBST([BUILD_AESGCM_FALSE]) +m4trace:configure.ac:361: -1- AC_SUBST_TRACE([BUILD_AESGCM_FALSE]) +m4trace:configure.ac:361: -1- m4_pattern_allow([^BUILD_AESGCM_FALSE$]) +m4trace:configure.ac:361: -1- _AM_SUBST_NOTMAKE([BUILD_AESGCM_TRUE]) +m4trace:configure.ac:361: -1- _AM_SUBST_NOTMAKE([BUILD_AESGCM_FALSE]) +m4trace:configure.ac:376: -1- AM_CONDITIONAL([BUILD_AESCCM], [test "x$ENABLED_AESCCM" = "xyes"]) +m4trace:configure.ac:376: -1- AC_SUBST([BUILD_AESCCM_TRUE]) +m4trace:configure.ac:376: -1- AC_SUBST_TRACE([BUILD_AESCCM_TRUE]) +m4trace:configure.ac:376: -1- m4_pattern_allow([^BUILD_AESCCM_TRUE$]) +m4trace:configure.ac:376: -1- AC_SUBST([BUILD_AESCCM_FALSE]) +m4trace:configure.ac:376: -1- AC_SUBST_TRACE([BUILD_AESCCM_FALSE]) +m4trace:configure.ac:376: -1- m4_pattern_allow([^BUILD_AESCCM_FALSE$]) +m4trace:configure.ac:376: -1- _AM_SUBST_NOTMAKE([BUILD_AESCCM_TRUE]) +m4trace:configure.ac:376: -1- _AM_SUBST_NOTMAKE([BUILD_AESCCM_FALSE]) +m4trace:configure.ac:397: -1- AM_CONDITIONAL([BUILD_AESNI], [test "x$ENABLED_AESNI" = "xyes"]) +m4trace:configure.ac:397: -1- AC_SUBST([BUILD_AESNI_TRUE]) +m4trace:configure.ac:397: -1- AC_SUBST_TRACE([BUILD_AESNI_TRUE]) +m4trace:configure.ac:397: -1- m4_pattern_allow([^BUILD_AESNI_TRUE$]) +m4trace:configure.ac:397: -1- AC_SUBST([BUILD_AESNI_FALSE]) +m4trace:configure.ac:397: -1- AC_SUBST_TRACE([BUILD_AESNI_FALSE]) +m4trace:configure.ac:397: -1- m4_pattern_allow([^BUILD_AESNI_FALSE$]) +m4trace:configure.ac:397: -1- _AM_SUBST_NOTMAKE([BUILD_AESNI_TRUE]) +m4trace:configure.ac:397: -1- _AM_SUBST_NOTMAKE([BUILD_AESNI_FALSE]) +m4trace:configure.ac:412: -1- AM_CONDITIONAL([BUILD_CAMELLIA], [test "x$ENABLED_CAMELLIA" = "xyes"]) +m4trace:configure.ac:412: -1- AC_SUBST([BUILD_CAMELLIA_TRUE]) +m4trace:configure.ac:412: -1- AC_SUBST_TRACE([BUILD_CAMELLIA_TRUE]) +m4trace:configure.ac:412: -1- m4_pattern_allow([^BUILD_CAMELLIA_TRUE$]) +m4trace:configure.ac:412: -1- AC_SUBST([BUILD_CAMELLIA_FALSE]) +m4trace:configure.ac:412: -1- AC_SUBST_TRACE([BUILD_CAMELLIA_FALSE]) +m4trace:configure.ac:412: -1- m4_pattern_allow([^BUILD_CAMELLIA_FALSE$]) +m4trace:configure.ac:412: -1- _AM_SUBST_NOTMAKE([BUILD_CAMELLIA_TRUE]) +m4trace:configure.ac:412: -1- _AM_SUBST_NOTMAKE([BUILD_CAMELLIA_FALSE]) +m4trace:configure.ac:432: -1- AM_CONDITIONAL([BUILD_MD2], [test "x$ENABLED_MD2" = "xyes"]) +m4trace:configure.ac:432: -1- AC_SUBST([BUILD_MD2_TRUE]) +m4trace:configure.ac:432: -1- AC_SUBST_TRACE([BUILD_MD2_TRUE]) +m4trace:configure.ac:432: -1- m4_pattern_allow([^BUILD_MD2_TRUE$]) +m4trace:configure.ac:432: -1- AC_SUBST([BUILD_MD2_FALSE]) +m4trace:configure.ac:432: -1- AC_SUBST_TRACE([BUILD_MD2_FALSE]) +m4trace:configure.ac:432: -1- m4_pattern_allow([^BUILD_MD2_FALSE$]) +m4trace:configure.ac:432: -1- _AM_SUBST_NOTMAKE([BUILD_MD2_TRUE]) +m4trace:configure.ac:432: -1- _AM_SUBST_NOTMAKE([BUILD_MD2_FALSE]) +m4trace:configure.ac:459: -1- AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"]) +m4trace:configure.ac:459: -1- AC_SUBST([BUILD_RIPEMD_TRUE]) +m4trace:configure.ac:459: -1- AC_SUBST_TRACE([BUILD_RIPEMD_TRUE]) +m4trace:configure.ac:459: -1- m4_pattern_allow([^BUILD_RIPEMD_TRUE$]) +m4trace:configure.ac:459: -1- AC_SUBST([BUILD_RIPEMD_FALSE]) +m4trace:configure.ac:459: -1- AC_SUBST_TRACE([BUILD_RIPEMD_FALSE]) +m4trace:configure.ac:459: -1- m4_pattern_allow([^BUILD_RIPEMD_FALSE$]) +m4trace:configure.ac:459: -1- _AM_SUBST_NOTMAKE([BUILD_RIPEMD_TRUE]) +m4trace:configure.ac:459: -1- _AM_SUBST_NOTMAKE([BUILD_RIPEMD_FALSE]) +m4trace:configure.ac:474: -1- AM_CONDITIONAL([BUILD_BLAKE2], [test "x$ENABLED_BLAKE2" = "xyes"]) +m4trace:configure.ac:474: -1- AC_SUBST([BUILD_BLAKE2_TRUE]) +m4trace:configure.ac:474: -1- AC_SUBST_TRACE([BUILD_BLAKE2_TRUE]) +m4trace:configure.ac:474: -1- m4_pattern_allow([^BUILD_BLAKE2_TRUE$]) +m4trace:configure.ac:474: -1- AC_SUBST([BUILD_BLAKE2_FALSE]) +m4trace:configure.ac:474: -1- AC_SUBST_TRACE([BUILD_BLAKE2_FALSE]) +m4trace:configure.ac:474: -1- m4_pattern_allow([^BUILD_BLAKE2_FALSE$]) +m4trace:configure.ac:474: -1- _AM_SUBST_NOTMAKE([BUILD_BLAKE2_TRUE]) +m4trace:configure.ac:474: -1- _AM_SUBST_NOTMAKE([BUILD_BLAKE2_FALSE]) +m4trace:configure.ac:495: -1- AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) +m4trace:configure.ac:495: -1- AC_SUBST([BUILD_SHA512_TRUE]) +m4trace:configure.ac:495: -1- AC_SUBST_TRACE([BUILD_SHA512_TRUE]) +m4trace:configure.ac:495: -1- m4_pattern_allow([^BUILD_SHA512_TRUE$]) +m4trace:configure.ac:495: -1- AC_SUBST([BUILD_SHA512_FALSE]) +m4trace:configure.ac:495: -1- AC_SUBST_TRACE([BUILD_SHA512_FALSE]) +m4trace:configure.ac:495: -1- m4_pattern_allow([^BUILD_SHA512_FALSE$]) +m4trace:configure.ac:495: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_TRUE]) +m4trace:configure.ac:495: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_FALSE]) +m4trace:configure.ac:590: -1- AM_CONDITIONAL([BUILD_DSA], [test "x$ENABLED_DSA" = "xyes"]) +m4trace:configure.ac:590: -1- AC_SUBST([BUILD_DSA_TRUE]) +m4trace:configure.ac:590: -1- AC_SUBST_TRACE([BUILD_DSA_TRUE]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^BUILD_DSA_TRUE$]) +m4trace:configure.ac:590: -1- AC_SUBST([BUILD_DSA_FALSE]) +m4trace:configure.ac:590: -1- AC_SUBST_TRACE([BUILD_DSA_FALSE]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^BUILD_DSA_FALSE$]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([BUILD_DSA_TRUE]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([BUILD_DSA_FALSE]) +m4trace:configure.ac:605: -1- AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) +m4trace:configure.ac:605: -1- AC_SUBST([BUILD_ECC_TRUE]) +m4trace:configure.ac:605: -1- AC_SUBST_TRACE([BUILD_ECC_TRUE]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^BUILD_ECC_TRUE$]) +m4trace:configure.ac:605: -1- AC_SUBST([BUILD_ECC_FALSE]) +m4trace:configure.ac:605: -1- AC_SUBST_TRACE([BUILD_ECC_FALSE]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^BUILD_ECC_FALSE$]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_TRUE]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_FALSE]) +m4trace:configure.ac:720: -2- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ +@%:@undef HAVE_LIBPTHREAD]) +m4trace:configure.ac:720: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) +m4trace:configure.ac:720: -2- m4_pattern_allow([^HAVE_LIBPTHREAD$]) +m4trace:configure.ac:744: -1- AM_CONDITIONAL([BUILD_MEMORY], [test "x$ENABLED_MEMORY" = "xyes"]) +m4trace:configure.ac:744: -1- AC_SUBST([BUILD_MEMORY_TRUE]) +m4trace:configure.ac:744: -1- AC_SUBST_TRACE([BUILD_MEMORY_TRUE]) +m4trace:configure.ac:744: -1- m4_pattern_allow([^BUILD_MEMORY_TRUE$]) +m4trace:configure.ac:744: -1- AC_SUBST([BUILD_MEMORY_FALSE]) +m4trace:configure.ac:744: -1- AC_SUBST_TRACE([BUILD_MEMORY_FALSE]) +m4trace:configure.ac:744: -1- m4_pattern_allow([^BUILD_MEMORY_FALSE$]) +m4trace:configure.ac:744: -1- _AM_SUBST_NOTMAKE([BUILD_MEMORY_TRUE]) +m4trace:configure.ac:744: -1- _AM_SUBST_NOTMAKE([BUILD_MEMORY_FALSE]) +m4trace:configure.ac:766: -1- AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"]) +m4trace:configure.ac:766: -1- AC_SUBST([BUILD_RSA_TRUE]) +m4trace:configure.ac:766: -1- AC_SUBST_TRACE([BUILD_RSA_TRUE]) +m4trace:configure.ac:766: -1- m4_pattern_allow([^BUILD_RSA_TRUE$]) +m4trace:configure.ac:766: -1- AC_SUBST([BUILD_RSA_FALSE]) +m4trace:configure.ac:766: -1- AC_SUBST_TRACE([BUILD_RSA_FALSE]) +m4trace:configure.ac:766: -1- m4_pattern_allow([^BUILD_RSA_FALSE$]) +m4trace:configure.ac:766: -1- _AM_SUBST_NOTMAKE([BUILD_RSA_TRUE]) +m4trace:configure.ac:766: -1- _AM_SUBST_NOTMAKE([BUILD_RSA_FALSE]) +m4trace:configure.ac:788: -1- AM_CONDITIONAL([BUILD_DH], [test "x$ENABLED_DH" = "xyes"]) +m4trace:configure.ac:788: -1- AC_SUBST([BUILD_DH_TRUE]) +m4trace:configure.ac:788: -1- AC_SUBST_TRACE([BUILD_DH_TRUE]) +m4trace:configure.ac:788: -1- m4_pattern_allow([^BUILD_DH_TRUE$]) +m4trace:configure.ac:788: -1- AC_SUBST([BUILD_DH_FALSE]) +m4trace:configure.ac:788: -1- AC_SUBST_TRACE([BUILD_DH_FALSE]) +m4trace:configure.ac:788: -1- m4_pattern_allow([^BUILD_DH_FALSE$]) +m4trace:configure.ac:788: -1- _AM_SUBST_NOTMAKE([BUILD_DH_TRUE]) +m4trace:configure.ac:788: -1- _AM_SUBST_NOTMAKE([BUILD_DH_FALSE]) +m4trace:configure.ac:843: -1- AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"]) +m4trace:configure.ac:843: -1- AC_SUBST([BUILD_ASN_TRUE]) +m4trace:configure.ac:843: -1- AC_SUBST_TRACE([BUILD_ASN_TRUE]) +m4trace:configure.ac:843: -1- m4_pattern_allow([^BUILD_ASN_TRUE$]) +m4trace:configure.ac:843: -1- AC_SUBST([BUILD_ASN_FALSE]) +m4trace:configure.ac:843: -1- AC_SUBST_TRACE([BUILD_ASN_FALSE]) +m4trace:configure.ac:843: -1- m4_pattern_allow([^BUILD_ASN_FALSE$]) +m4trace:configure.ac:843: -1- _AM_SUBST_NOTMAKE([BUILD_ASN_TRUE]) +m4trace:configure.ac:843: -1- _AM_SUBST_NOTMAKE([BUILD_ASN_FALSE]) +m4trace:configure.ac:865: -1- AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"]) +m4trace:configure.ac:865: -1- AC_SUBST([BUILD_AES_TRUE]) +m4trace:configure.ac:865: -1- AC_SUBST_TRACE([BUILD_AES_TRUE]) +m4trace:configure.ac:865: -1- m4_pattern_allow([^BUILD_AES_TRUE$]) +m4trace:configure.ac:865: -1- AC_SUBST([BUILD_AES_FALSE]) +m4trace:configure.ac:865: -1- AC_SUBST_TRACE([BUILD_AES_FALSE]) +m4trace:configure.ac:865: -1- m4_pattern_allow([^BUILD_AES_FALSE$]) +m4trace:configure.ac:865: -1- _AM_SUBST_NOTMAKE([BUILD_AES_TRUE]) +m4trace:configure.ac:865: -1- _AM_SUBST_NOTMAKE([BUILD_AES_FALSE]) +m4trace:configure.ac:887: -1- AM_CONDITIONAL([BUILD_CODING], [test "x$ENABLED_CODING" = "xyes"]) +m4trace:configure.ac:887: -1- AC_SUBST([BUILD_CODING_TRUE]) +m4trace:configure.ac:887: -1- AC_SUBST_TRACE([BUILD_CODING_TRUE]) +m4trace:configure.ac:887: -1- m4_pattern_allow([^BUILD_CODING_TRUE$]) +m4trace:configure.ac:887: -1- AC_SUBST([BUILD_CODING_FALSE]) +m4trace:configure.ac:887: -1- AC_SUBST_TRACE([BUILD_CODING_FALSE]) +m4trace:configure.ac:887: -1- m4_pattern_allow([^BUILD_CODING_FALSE$]) +m4trace:configure.ac:887: -1- _AM_SUBST_NOTMAKE([BUILD_CODING_TRUE]) +m4trace:configure.ac:887: -1- _AM_SUBST_NOTMAKE([BUILD_CODING_FALSE]) +m4trace:configure.ac:909: -1- AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"]) +m4trace:configure.ac:909: -1- AC_SUBST([BUILD_DES3_TRUE]) +m4trace:configure.ac:909: -1- AC_SUBST_TRACE([BUILD_DES3_TRUE]) +m4trace:configure.ac:909: -1- m4_pattern_allow([^BUILD_DES3_TRUE$]) +m4trace:configure.ac:909: -1- AC_SUBST([BUILD_DES3_FALSE]) +m4trace:configure.ac:909: -1- AC_SUBST_TRACE([BUILD_DES3_FALSE]) +m4trace:configure.ac:909: -1- m4_pattern_allow([^BUILD_DES3_FALSE$]) +m4trace:configure.ac:909: -1- _AM_SUBST_NOTMAKE([BUILD_DES3_TRUE]) +m4trace:configure.ac:909: -1- _AM_SUBST_NOTMAKE([BUILD_DES3_FALSE]) +m4trace:configure.ac:931: -1- AM_CONDITIONAL([BUILD_RC4], [test "x$ENABLED_ARC4" = "xyes"]) +m4trace:configure.ac:931: -1- AC_SUBST([BUILD_RC4_TRUE]) +m4trace:configure.ac:931: -1- AC_SUBST_TRACE([BUILD_RC4_TRUE]) +m4trace:configure.ac:931: -1- m4_pattern_allow([^BUILD_RC4_TRUE$]) +m4trace:configure.ac:931: -1- AC_SUBST([BUILD_RC4_FALSE]) +m4trace:configure.ac:931: -1- AC_SUBST_TRACE([BUILD_RC4_FALSE]) +m4trace:configure.ac:931: -1- m4_pattern_allow([^BUILD_RC4_FALSE$]) +m4trace:configure.ac:931: -1- _AM_SUBST_NOTMAKE([BUILD_RC4_TRUE]) +m4trace:configure.ac:931: -1- _AM_SUBST_NOTMAKE([BUILD_RC4_FALSE]) +m4trace:configure.ac:953: -1- AM_CONDITIONAL([BUILD_MD5], [test "x$ENABLED_MD5" = "xyes"]) +m4trace:configure.ac:953: -1- AC_SUBST([BUILD_MD5_TRUE]) +m4trace:configure.ac:953: -1- AC_SUBST_TRACE([BUILD_MD5_TRUE]) +m4trace:configure.ac:953: -1- m4_pattern_allow([^BUILD_MD5_TRUE$]) +m4trace:configure.ac:953: -1- AC_SUBST([BUILD_MD5_FALSE]) +m4trace:configure.ac:953: -1- AC_SUBST_TRACE([BUILD_MD5_FALSE]) +m4trace:configure.ac:953: -1- m4_pattern_allow([^BUILD_MD5_FALSE$]) +m4trace:configure.ac:953: -1- _AM_SUBST_NOTMAKE([BUILD_MD5_TRUE]) +m4trace:configure.ac:953: -1- _AM_SUBST_NOTMAKE([BUILD_MD5_FALSE]) +m4trace:configure.ac:975: -1- AM_CONDITIONAL([BUILD_SHA], [test "x$ENABLED_SHA" = "xyes"]) +m4trace:configure.ac:975: -1- AC_SUBST([BUILD_SHA_TRUE]) +m4trace:configure.ac:975: -1- AC_SUBST_TRACE([BUILD_SHA_TRUE]) +m4trace:configure.ac:975: -1- m4_pattern_allow([^BUILD_SHA_TRUE$]) +m4trace:configure.ac:975: -1- AC_SUBST([BUILD_SHA_FALSE]) +m4trace:configure.ac:975: -1- AC_SUBST_TRACE([BUILD_SHA_FALSE]) +m4trace:configure.ac:975: -1- m4_pattern_allow([^BUILD_SHA_FALSE$]) +m4trace:configure.ac:975: -1- _AM_SUBST_NOTMAKE([BUILD_SHA_TRUE]) +m4trace:configure.ac:975: -1- _AM_SUBST_NOTMAKE([BUILD_SHA_FALSE]) +m4trace:configure.ac:990: -1- AM_CONDITIONAL([BUILD_MD4], [test "x$ENABLED_MD4" = "xyes"]) +m4trace:configure.ac:990: -1- AC_SUBST([BUILD_MD4_TRUE]) +m4trace:configure.ac:990: -1- AC_SUBST_TRACE([BUILD_MD4_TRUE]) +m4trace:configure.ac:990: -1- m4_pattern_allow([^BUILD_MD4_TRUE$]) +m4trace:configure.ac:990: -1- AC_SUBST([BUILD_MD4_FALSE]) +m4trace:configure.ac:990: -1- AC_SUBST_TRACE([BUILD_MD4_FALSE]) +m4trace:configure.ac:990: -1- m4_pattern_allow([^BUILD_MD4_FALSE$]) +m4trace:configure.ac:990: -1- _AM_SUBST_NOTMAKE([BUILD_MD4_TRUE]) +m4trace:configure.ac:990: -1- _AM_SUBST_NOTMAKE([BUILD_MD4_FALSE]) +m4trace:configure.ac:1024: -1- AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"]) +m4trace:configure.ac:1024: -1- AC_SUBST([BUILD_PWDBASED_TRUE]) +m4trace:configure.ac:1024: -1- AC_SUBST_TRACE([BUILD_PWDBASED_TRUE]) +m4trace:configure.ac:1024: -1- m4_pattern_allow([^BUILD_PWDBASED_TRUE$]) +m4trace:configure.ac:1024: -1- AC_SUBST([BUILD_PWDBASED_FALSE]) +m4trace:configure.ac:1024: -1- AC_SUBST_TRACE([BUILD_PWDBASED_FALSE]) +m4trace:configure.ac:1024: -1- m4_pattern_allow([^BUILD_PWDBASED_FALSE$]) +m4trace:configure.ac:1024: -1- _AM_SUBST_NOTMAKE([BUILD_PWDBASED_TRUE]) +m4trace:configure.ac:1024: -1- _AM_SUBST_NOTMAKE([BUILD_PWDBASED_FALSE]) +m4trace:configure.ac:1041: -1- AM_CONDITIONAL([BUILD_HC128], [test "x$ENABLED_HC128" = "xyes"]) +m4trace:configure.ac:1041: -1- AC_SUBST([BUILD_HC128_TRUE]) +m4trace:configure.ac:1041: -1- AC_SUBST_TRACE([BUILD_HC128_TRUE]) +m4trace:configure.ac:1041: -1- m4_pattern_allow([^BUILD_HC128_TRUE$]) +m4trace:configure.ac:1041: -1- AC_SUBST([BUILD_HC128_FALSE]) +m4trace:configure.ac:1041: -1- AC_SUBST_TRACE([BUILD_HC128_FALSE]) +m4trace:configure.ac:1041: -1- m4_pattern_allow([^BUILD_HC128_FALSE$]) +m4trace:configure.ac:1041: -1- _AM_SUBST_NOTMAKE([BUILD_HC128_TRUE]) +m4trace:configure.ac:1041: -1- _AM_SUBST_NOTMAKE([BUILD_HC128_FALSE]) +m4trace:configure.ac:1058: -1- AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"]) +m4trace:configure.ac:1058: -1- AC_SUBST([BUILD_RABBIT_TRUE]) +m4trace:configure.ac:1058: -1- AC_SUBST_TRACE([BUILD_RABBIT_TRUE]) +m4trace:configure.ac:1058: -1- m4_pattern_allow([^BUILD_RABBIT_TRUE$]) +m4trace:configure.ac:1058: -1- AC_SUBST([BUILD_RABBIT_FALSE]) +m4trace:configure.ac:1058: -1- AC_SUBST_TRACE([BUILD_RABBIT_FALSE]) +m4trace:configure.ac:1058: -1- m4_pattern_allow([^BUILD_RABBIT_FALSE$]) +m4trace:configure.ac:1058: -1- _AM_SUBST_NOTMAKE([BUILD_RABBIT_TRUE]) +m4trace:configure.ac:1058: -1- _AM_SUBST_NOTMAKE([BUILD_RABBIT_FALSE]) +m4trace:configure.ac:1080: -1- AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) +m4trace:configure.ac:1080: -1- AC_SUBST([BUILD_SHA512_TRUE]) +m4trace:configure.ac:1080: -1- AC_SUBST_TRACE([BUILD_SHA512_TRUE]) +m4trace:configure.ac:1080: -1- m4_pattern_allow([^BUILD_SHA512_TRUE$]) +m4trace:configure.ac:1080: -1- AC_SUBST([BUILD_SHA512_FALSE]) +m4trace:configure.ac:1080: -1- AC_SUBST_TRACE([BUILD_SHA512_FALSE]) +m4trace:configure.ac:1080: -1- m4_pattern_allow([^BUILD_SHA512_FALSE$]) +m4trace:configure.ac:1080: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_TRUE]) +m4trace:configure.ac:1080: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_FALSE]) +m4trace:configure.ac:1085: -1- AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"]) +m4trace:configure.ac:1085: -1- AC_SUBST([BUILD_FIPS_TRUE]) +m4trace:configure.ac:1085: -1- AC_SUBST_TRACE([BUILD_FIPS_TRUE]) +m4trace:configure.ac:1085: -1- m4_pattern_allow([^BUILD_FIPS_TRUE$]) +m4trace:configure.ac:1085: -1- AC_SUBST([BUILD_FIPS_FALSE]) +m4trace:configure.ac:1085: -1- AC_SUBST_TRACE([BUILD_FIPS_FALSE]) +m4trace:configure.ac:1085: -1- m4_pattern_allow([^BUILD_FIPS_FALSE$]) +m4trace:configure.ac:1085: -1- _AM_SUBST_NOTMAKE([BUILD_FIPS_TRUE]) +m4trace:configure.ac:1085: -1- _AM_SUBST_NOTMAKE([BUILD_FIPS_FALSE]) +m4trace:configure.ac:1120: -1- AM_CONDITIONAL([BUILD_INLINE], [test "x$ENABLED_INLINE" = "xyes"]) +m4trace:configure.ac:1120: -1- AC_SUBST([BUILD_INLINE_TRUE]) +m4trace:configure.ac:1120: -1- AC_SUBST_TRACE([BUILD_INLINE_TRUE]) +m4trace:configure.ac:1120: -1- m4_pattern_allow([^BUILD_INLINE_TRUE$]) +m4trace:configure.ac:1120: -1- AC_SUBST([BUILD_INLINE_FALSE]) +m4trace:configure.ac:1120: -1- AC_SUBST_TRACE([BUILD_INLINE_FALSE]) +m4trace:configure.ac:1120: -1- m4_pattern_allow([^BUILD_INLINE_FALSE$]) +m4trace:configure.ac:1120: -1- _AM_SUBST_NOTMAKE([BUILD_INLINE_TRUE]) +m4trace:configure.ac:1120: -1- _AM_SUBST_NOTMAKE([BUILD_INLINE_FALSE]) +m4trace:configure.ac:1135: -1- AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"]) +m4trace:configure.ac:1135: -1- AC_SUBST([BUILD_OCSP_TRUE]) +m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([BUILD_OCSP_TRUE]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^BUILD_OCSP_TRUE$]) +m4trace:configure.ac:1135: -1- AC_SUBST([BUILD_OCSP_FALSE]) +m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([BUILD_OCSP_FALSE]) +m4trace:configure.ac:1135: -1- m4_pattern_allow([^BUILD_OCSP_FALSE$]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([BUILD_OCSP_TRUE]) +m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([BUILD_OCSP_FALSE]) +m4trace:configure.ac:1141: -1- AC_SUBST([HAVE_OPENSSL_CMD]) +m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([HAVE_OPENSSL_CMD]) +m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_OPENSSL_CMD$]) +m4trace:configure.ac:1164: -1- AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"]) +m4trace:configure.ac:1164: -1- AC_SUBST([BUILD_CRL_TRUE]) +m4trace:configure.ac:1164: -1- AC_SUBST_TRACE([BUILD_CRL_TRUE]) +m4trace:configure.ac:1164: -1- m4_pattern_allow([^BUILD_CRL_TRUE$]) +m4trace:configure.ac:1164: -1- AC_SUBST([BUILD_CRL_FALSE]) +m4trace:configure.ac:1164: -1- AC_SUBST_TRACE([BUILD_CRL_FALSE]) +m4trace:configure.ac:1164: -1- m4_pattern_allow([^BUILD_CRL_FALSE$]) +m4trace:configure.ac:1164: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_TRUE]) +m4trace:configure.ac:1164: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_FALSE]) +m4trace:configure.ac:1184: -1- AM_CONDITIONAL([BUILD_CRL_MONITOR], [test "x$ENABLED_CRL_MONITOR" = "xyes"]) +m4trace:configure.ac:1184: -1- AC_SUBST([BUILD_CRL_MONITOR_TRUE]) +m4trace:configure.ac:1184: -1- AC_SUBST_TRACE([BUILD_CRL_MONITOR_TRUE]) +m4trace:configure.ac:1184: -1- m4_pattern_allow([^BUILD_CRL_MONITOR_TRUE$]) +m4trace:configure.ac:1184: -1- AC_SUBST([BUILD_CRL_MONITOR_FALSE]) +m4trace:configure.ac:1184: -1- AC_SUBST_TRACE([BUILD_CRL_MONITOR_FALSE]) +m4trace:configure.ac:1184: -1- m4_pattern_allow([^BUILD_CRL_MONITOR_FALSE$]) +m4trace:configure.ac:1184: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_MONITOR_TRUE]) +m4trace:configure.ac:1184: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_MONITOR_FALSE]) +m4trace:configure.ac:1204: -1- AM_CONDITIONAL([BUILD_NTRU], [test "x$ENABLED_NTRU" = "xyes"]) +m4trace:configure.ac:1204: -1- AC_SUBST([BUILD_NTRU_TRUE]) +m4trace:configure.ac:1204: -1- AC_SUBST_TRACE([BUILD_NTRU_TRUE]) +m4trace:configure.ac:1204: -1- m4_pattern_allow([^BUILD_NTRU_TRUE$]) +m4trace:configure.ac:1204: -1- AC_SUBST([BUILD_NTRU_FALSE]) +m4trace:configure.ac:1204: -1- AC_SUBST_TRACE([BUILD_NTRU_FALSE]) +m4trace:configure.ac:1204: -1- m4_pattern_allow([^BUILD_NTRU_FALSE$]) +m4trace:configure.ac:1204: -1- _AM_SUBST_NOTMAKE([BUILD_NTRU_TRUE]) +m4trace:configure.ac:1204: -1- _AM_SUBST_NOTMAKE([BUILD_NTRU_FALSE]) +m4trace:configure.ac:1300: -1- AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) +m4trace:configure.ac:1300: -1- AC_SUBST([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1300: -1- AC_SUBST_TRACE([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1300: -1- m4_pattern_allow([^BUILD_PKCS7_TRUE$]) +m4trace:configure.ac:1300: -1- AC_SUBST([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1300: -1- AC_SUBST_TRACE([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1300: -1- m4_pattern_allow([^BUILD_PKCS7_FALSE$]) +m4trace:configure.ac:1300: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1300: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1331: -1- AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) +m4trace:configure.ac:1331: -1- AC_SUBST([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1331: -1- AC_SUBST_TRACE([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1331: -1- m4_pattern_allow([^BUILD_PKCS7_TRUE$]) +m4trace:configure.ac:1331: -1- AC_SUBST([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1331: -1- AC_SUBST_TRACE([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1331: -1- m4_pattern_allow([^BUILD_PKCS7_FALSE$]) +m4trace:configure.ac:1331: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_TRUE]) +m4trace:configure.ac:1331: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_FALSE]) +m4trace:configure.ac:1359: -1- AC_SUBST([HAVE_VALGRIND]) +m4trace:configure.ac:1359: -1- AC_SUBST_TRACE([HAVE_VALGRIND]) +m4trace:configure.ac:1359: -1- m4_pattern_allow([^HAVE_VALGRIND$]) +m4trace:configure.ac:1370: -1- AM_CONDITIONAL([USE_VALGRIND], [test "x$ENABLED_VALGRIND" = "xyes"]) +m4trace:configure.ac:1370: -1- AC_SUBST([USE_VALGRIND_TRUE]) +m4trace:configure.ac:1370: -1- AC_SUBST_TRACE([USE_VALGRIND_TRUE]) +m4trace:configure.ac:1370: -1- m4_pattern_allow([^USE_VALGRIND_TRUE$]) +m4trace:configure.ac:1370: -1- AC_SUBST([USE_VALGRIND_FALSE]) +m4trace:configure.ac:1370: -1- AC_SUBST_TRACE([USE_VALGRIND_FALSE]) +m4trace:configure.ac:1370: -1- m4_pattern_allow([^USE_VALGRIND_FALSE$]) +m4trace:configure.ac:1370: -1- _AM_SUBST_NOTMAKE([USE_VALGRIND_TRUE]) +m4trace:configure.ac:1370: -1- _AM_SUBST_NOTMAKE([USE_VALGRIND_FALSE]) +m4trace:configure.ac:1422: -1- AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) +m4trace:configure.ac:1422: -1- AC_SUBST([BUILD_ECC_TRUE]) +m4trace:configure.ac:1422: -1- AC_SUBST_TRACE([BUILD_ECC_TRUE]) +m4trace:configure.ac:1422: -1- m4_pattern_allow([^BUILD_ECC_TRUE$]) +m4trace:configure.ac:1422: -1- AC_SUBST([BUILD_ECC_FALSE]) +m4trace:configure.ac:1422: -1- AC_SUBST_TRACE([BUILD_ECC_FALSE]) +m4trace:configure.ac:1422: -1- m4_pattern_allow([^BUILD_ECC_FALSE$]) +m4trace:configure.ac:1422: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_TRUE]) +m4trace:configure.ac:1422: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_FALSE]) +m4trace:configure.ac:1480: -1- AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"]) +m4trace:configure.ac:1480: -1- AC_SUBST([BUILD_FASTMATH_TRUE]) +m4trace:configure.ac:1480: -1- AC_SUBST_TRACE([BUILD_FASTMATH_TRUE]) +m4trace:configure.ac:1480: -1- m4_pattern_allow([^BUILD_FASTMATH_TRUE$]) +m4trace:configure.ac:1480: -1- AC_SUBST([BUILD_FASTMATH_FALSE]) +m4trace:configure.ac:1480: -1- AC_SUBST_TRACE([BUILD_FASTMATH_FALSE]) +m4trace:configure.ac:1480: -1- m4_pattern_allow([^BUILD_FASTMATH_FALSE$]) +m4trace:configure.ac:1480: -1- _AM_SUBST_NOTMAKE([BUILD_FASTMATH_TRUE]) +m4trace:configure.ac:1480: -1- _AM_SUBST_NOTMAKE([BUILD_FASTMATH_FALSE]) +m4trace:configure.ac:1481: -1- AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"]) +m4trace:configure.ac:1481: -1- AC_SUBST([BUILD_SLOWMATH_TRUE]) +m4trace:configure.ac:1481: -1- AC_SUBST_TRACE([BUILD_SLOWMATH_TRUE]) +m4trace:configure.ac:1481: -1- m4_pattern_allow([^BUILD_SLOWMATH_TRUE$]) +m4trace:configure.ac:1481: -1- AC_SUBST([BUILD_SLOWMATH_FALSE]) +m4trace:configure.ac:1481: -1- AC_SUBST_TRACE([BUILD_SLOWMATH_FALSE]) +m4trace:configure.ac:1481: -1- m4_pattern_allow([^BUILD_SLOWMATH_FALSE$]) +m4trace:configure.ac:1481: -1- _AM_SUBST_NOTMAKE([BUILD_SLOWMATH_TRUE]) +m4trace:configure.ac:1481: -1- _AM_SUBST_NOTMAKE([BUILD_SLOWMATH_FALSE]) +m4trace:configure.ac:1495: -1- AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"]) +m4trace:configure.ac:1495: -1- AC_SUBST([BUILD_EXAMPLES_TRUE]) +m4trace:configure.ac:1495: -1- AC_SUBST_TRACE([BUILD_EXAMPLES_TRUE]) +m4trace:configure.ac:1495: -1- m4_pattern_allow([^BUILD_EXAMPLES_TRUE$]) +m4trace:configure.ac:1495: -1- AC_SUBST([BUILD_EXAMPLES_FALSE]) +m4trace:configure.ac:1495: -1- AC_SUBST_TRACE([BUILD_EXAMPLES_FALSE]) +m4trace:configure.ac:1495: -1- m4_pattern_allow([^BUILD_EXAMPLES_FALSE$]) +m4trace:configure.ac:1495: -1- _AM_SUBST_NOTMAKE([BUILD_EXAMPLES_TRUE]) +m4trace:configure.ac:1495: -1- _AM_SUBST_NOTMAKE([BUILD_EXAMPLES_FALSE]) +m4trace:configure.ac:1534: -1- AM_CONDITIONAL([BUILD_LIBZ], [test "x$ENABLED_LIBZ" = "xyes"]) +m4trace:configure.ac:1534: -1- AC_SUBST([BUILD_LIBZ_TRUE]) +m4trace:configure.ac:1534: -1- AC_SUBST_TRACE([BUILD_LIBZ_TRUE]) +m4trace:configure.ac:1534: -1- m4_pattern_allow([^BUILD_LIBZ_TRUE$]) +m4trace:configure.ac:1534: -1- AC_SUBST([BUILD_LIBZ_FALSE]) +m4trace:configure.ac:1534: -1- AC_SUBST_TRACE([BUILD_LIBZ_FALSE]) +m4trace:configure.ac:1534: -1- m4_pattern_allow([^BUILD_LIBZ_FALSE$]) +m4trace:configure.ac:1534: -1- _AM_SUBST_NOTMAKE([BUILD_LIBZ_TRUE]) +m4trace:configure.ac:1534: -1- _AM_SUBST_NOTMAKE([BUILD_LIBZ_FALSE]) +m4trace:configure.ac:1595: -1- AM_CONDITIONAL([BUILD_MCAPI], [test "x$ENABLED_MCAPI" = "xyes"]) +m4trace:configure.ac:1595: -1- AC_SUBST([BUILD_MCAPI_TRUE]) +m4trace:configure.ac:1595: -1- AC_SUBST_TRACE([BUILD_MCAPI_TRUE]) +m4trace:configure.ac:1595: -1- m4_pattern_allow([^BUILD_MCAPI_TRUE$]) +m4trace:configure.ac:1595: -1- AC_SUBST([BUILD_MCAPI_FALSE]) +m4trace:configure.ac:1595: -1- AC_SUBST_TRACE([BUILD_MCAPI_FALSE]) +m4trace:configure.ac:1595: -1- m4_pattern_allow([^BUILD_MCAPI_FALSE$]) +m4trace:configure.ac:1595: -1- _AM_SUBST_NOTMAKE([BUILD_MCAPI_TRUE]) +m4trace:configure.ac:1595: -1- _AM_SUBST_NOTMAKE([BUILD_MCAPI_FALSE]) +m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_SYSTEM]) +m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_SYSTEM$]) +m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_SYSTEM], [/* VCS system */ +@%:@undef VCS_SYSTEM]) +m4trace:configure.ac:1619: -1- AM_CONDITIONAL([IS_VCS_CHECKOUT], [test "x$ac_cv_vcs_checkout" = "xyes"]) +m4trace:configure.ac:1619: -1- AC_SUBST([IS_VCS_CHECKOUT_TRUE]) +m4trace:configure.ac:1619: -1- AC_SUBST_TRACE([IS_VCS_CHECKOUT_TRUE]) +m4trace:configure.ac:1619: -1- m4_pattern_allow([^IS_VCS_CHECKOUT_TRUE$]) +m4trace:configure.ac:1619: -1- AC_SUBST([IS_VCS_CHECKOUT_FALSE]) +m4trace:configure.ac:1619: -1- AC_SUBST_TRACE([IS_VCS_CHECKOUT_FALSE]) +m4trace:configure.ac:1619: -1- m4_pattern_allow([^IS_VCS_CHECKOUT_FALSE$]) +m4trace:configure.ac:1619: -1- _AM_SUBST_NOTMAKE([IS_VCS_CHECKOUT_TRUE]) +m4trace:configure.ac:1619: -1- _AM_SUBST_NOTMAKE([IS_VCS_CHECKOUT_FALSE]) +m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_CHECKOUT]) +m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_CHECKOUT$]) +m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_CHECKOUT], [/* Define if the code was built from VCS. */ +@%:@undef VCS_CHECKOUT]) +m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_CHECKOUT]) +m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_CHECKOUT$]) +m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_CHECKOUT], [/* Define if the code was built from VCS. */ +@%:@undef VCS_CHECKOUT]) +m4trace:configure.ac:1631: -1- AC_SUBST([HEX_VERSION]) +m4trace:configure.ac:1631: -1- AC_SUBST_TRACE([HEX_VERSION]) +m4trace:configure.ac:1631: -1- m4_pattern_allow([^HEX_VERSION$]) +m4trace:configure.ac:1632: -1- AC_SUBST([AM_CPPFLAGS]) +m4trace:configure.ac:1632: -1- AC_SUBST_TRACE([AM_CPPFLAGS]) +m4trace:configure.ac:1632: -1- m4_pattern_allow([^AM_CPPFLAGS$]) +m4trace:configure.ac:1633: -1- AC_SUBST([AM_CFLAGS]) +m4trace:configure.ac:1633: -1- AC_SUBST_TRACE([AM_CFLAGS]) +m4trace:configure.ac:1633: -1- m4_pattern_allow([^AM_CFLAGS$]) +m4trace:configure.ac:1634: -1- AC_SUBST([AM_LDFLAGS]) +m4trace:configure.ac:1634: -1- AC_SUBST_TRACE([AM_LDFLAGS]) +m4trace:configure.ac:1634: -1- m4_pattern_allow([^AM_LDFLAGS$]) +m4trace:configure.ac:1637: -1- AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +m4trace:configure.ac:1638: -1- AC_CONFIG_FILES([Makefile]) +m4trace:configure.ac:1639: -1- AC_CONFIG_FILES([cyassl/version.h]) +m4trace:configure.ac:1640: -1- AC_CONFIG_FILES([cyassl/options.h]) +m4trace:configure.ac:1641: -1- AC_CONFIG_FILES([support/cyassl.pc]) +m4trace:configure.ac:1642: -1- AC_CONFIG_FILES([rpm/spec]) +m4trace:configure.ac:1644: -1- AC_SUBST([GENERIC_CONFIG]) +m4trace:configure.ac:1644: -1- AC_SUBST_TRACE([GENERIC_CONFIG]) +m4trace:configure.ac:1644: -1- m4_pattern_allow([^GENERIC_CONFIG$]) +m4trace:configure.ac:1645: -1- AC_SUBST([AMINCLUDE]) +m4trace:configure.ac:1645: -1- AC_SUBST_TRACE([AMINCLUDE]) +m4trace:configure.ac:1645: -1- m4_pattern_allow([^AMINCLUDE$]) +m4trace:configure.ac:1645: -1- AC_SUBST([INC_AMINCLUDE]) +m4trace:configure.ac:1645: -1- AC_SUBST_TRACE([INC_AMINCLUDE]) +m4trace:configure.ac:1645: -1- m4_pattern_allow([^INC_AMINCLUDE$]) +m4trace:configure.ac:1645: -1- m4_pattern_allow([AM_MAKEFLAGS]) +m4trace:configure.ac:1647: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:1647: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:1647: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:1647: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:1647: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:1647: -1- AC_SUBST([am__EXEEXT_TRUE]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) +m4trace:configure.ac:1647: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:1647: -1- AC_SUBST([am__EXEEXT_FALSE]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) +m4trace:configure.ac:1647: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:1647: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:1647: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:1647: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff --git a/project1/cyassl-3.0.0/build-aux/compile b/project1/cyassl-3.0.0/build-aux/compile new file mode 100755 index 00000000..531136b0 --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program 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, or (at your option) +# any later version. +# +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/config.guess b/project1/cyassl-3.0.0/build-aux/config.guess new file mode 100755 index 00000000..9afd6762 --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/config.guess @@ -0,0 +1,1568 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-11-29' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/config.sub b/project1/cyassl-3.0.0/build-aux/config.sub new file mode 100755 index 00000000..61cb4bc2 --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/config.sub @@ -0,0 +1,1793 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-10-01' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/depcomp b/project1/cyassl-3.0.0/build-aux/depcomp new file mode 100755 index 00000000..4ebd5b3a --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. + +# This program 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, or (at your option) +# any later version. + +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/install-sh b/project1/cyassl-3.0.0/build-aux/install-sh new file mode 100755 index 00000000..377bb868 --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/ltmain.sh b/project1/cyassl-3.0.0/build-aux/ltmain.sh new file mode 100644 index 00000000..63ae69dc --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/ltmain.sh @@ -0,0 +1,9655 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.2 +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/project1/cyassl-3.0.0/build-aux/missing b/project1/cyassl-3.0.0/build-aux/missing new file mode 100755 index 00000000..db98974f --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program 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, or (at your option) +# any later version. + +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/project1/cyassl-3.0.0/build-aux/test-driver b/project1/cyassl-3.0.0/build-aux/test-driver new file mode 100755 index 00000000..d3060566 --- /dev/null +++ b/project1/cyassl-3.0.0/build-aux/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program 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, or (at your option) +# any later version. +# +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/project1/cyassl-3.0.0/certs/1024/client-cert.der b/project1/cyassl-3.0.0/certs/1024/client-cert.der new file mode 100644 index 0000000000000000000000000000000000000000..6b796b6388254e6f5ff20f1f81425410acda814b GIT binary patch literal 752 zcmXqLVtQlH#1y)KnTe5!iIbt1cg??JGhEdSc-c6$+C196^D;8BvN9Mn_8D>;aI!In zvaks=g$5h)0~G){96W6PMXBled4_@p{2&2#9*%(gqLQ4%yc9z|10IkN7Y}P?VsNmJ zp@@MHh|kT#9Z-~?UX+-do0*qxC}to65@qJ$EiW(Et4u5|&e2QG&oz`akcK;flTnN> zGcPUQ0WNJIC(dhVY+z_;VPt4xWMUZwX}S5Ei-{BB?QTA~dVk8PgDbB~-fBDf z!uLp`S<}DOYwOBYclQb|-IHXs!s3kOB9^o*-@kueb<3BDZ+Bd8rpKM~lNx+VFSD1Z z?eckX@UK_Cw*339b>Ai=Jx!5&t!rKk420{ zq%o8K$NjtKO*F5jmln1jFBQm)d}AOFl2&GsFc53Nt^gF{vcfE^2F#3%|B*cmOhn8; zpBAO@XDw`<%J!^X>aF&zw=EMoml^sde5y|7xij0v=US4ZN{K;%AG-jnP@Kr-yXPa+ zC!b&C->PHE_dj|?_SUIJSI-n@L`xs}(HUp^gUQmUmTigA%gyhT7C6WH|2}8SVZ7e9 jUg&gJ)S=|tc6VPzrwe$_kDey&7rV!AR*n4XFn2Ei&;$A< literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/1024/client-cert.pem b/project1/cyassl-3.0.0/certs/1024/client-cert.pem new file mode 100644 index 00000000..09d603a3 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/1024/client-cert.pem @@ -0,0 +1,59 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10163970144298616102 (0x8d0dacfec6984526) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Jan 18 21:42:49 2013 GMT + Not After : Oct 15 21:42:49 2015 GMT + Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (1024 bit) + Modulus: + 00:bc:73:0e:a8:49:f3:74:a2:a9:ef:18:a5:da:55: + 99:21:f9:c8:ec:b3:6d:48:e5:35:35:75:77:37:ec: + d1:61:90:5f:3e:d9:e4:d5:df:94:ca:c1:a9:d7:19: + da:86:c9:e8:4d:c4:61:36:82:fe:ab:ad:7e:77:25: + bb:8d:11:a5:bc:62:3a:a8:38:cc:39:a2:04:66:b4: + f7:f7:f3:aa:da:4d:02:0e:bb:5e:8d:69:48:dc:77: + c9:28:0e:22:e9:6b:a4:26:ba:4c:e8:c1:fd:4a:6f: + 2b:1f:ef:8a:ae:f6:90:62:e5:64:1e:eb:2b:3c:67: + c8:dc:27:00:f6:91:68:65:a9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC + X509v3 Authority Key Identifier: + keyid:81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 72:66:0f:6a:a1:85:95:06:e6:87:1a:ed:2b:da:ed:84:90:89: + a6:31:4d:60:f2:7b:63:0c:dc:9b:44:4c:d6:62:41:24:74:30: + 70:4e:07:10:05:12:5e:14:b3:dd:cf:58:27:93:cf:aa:4f:85: + 2c:35:0e:ff:5b:a8:6b:b5:95:32:d5:cc:73:68:5b:1b:c4:f8: + 89:5e:3d:f8:02:39:32:7d:06:a4:32:e9:b3:ef:62:a0:43:5d: + 4f:fb:ce:3d:08:33:af:3d:7f:12:cb:8a:5a:c2:63:db:3e:dd: + ea:5b:67:10:49:9f:5b:96:1b:4e:5d:bc:4e:9a:7c:1f:ab:56: + 47:4a +-----BEGIN CERTIFICATE----- +MIIC7DCCAlWgAwIBAgIJAI0NrP7GmEUmMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD +VQQGEwJVUzEPMA0GA1UECAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwG +A1UECgwFeWFTU0wxFDASBgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cu +eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMzAx +MTgyMTQyNDlaFw0xNTEwMTUyMTQyNDlaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE +CAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwGA1UECgwFeWFTU0wxFDAS +BgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cueWFzc2wuY29tMR0wGwYJ +KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw +gYkCgYEAvHMOqEnzdKKp7xil2lWZIfnI7LNtSOU1NXV3N+zRYZBfPtnk1d+UysGp +1xnahsnoTcRhNoL+q61+dyW7jRGlvGI6qDjMOaIEZrT39/Oq2k0CDrtejWlI3HfJ +KA4i6WukJrpM6MH9Sm8rH++KrvaQYuVkHusrPGfI3CcA9pFoZakCAwEAAaNQME4w +HQYDVR0OBBYEFIFpD/jf3c80KdVndXGFx3UQaVnsMB8GA1UdIwQYMBaAFIFpD/jf +3c80KdVndXGFx3UQaVnsMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA +cmYPaqGFlQbmhxrtK9rthJCJpjFNYPJ7Ywzcm0RM1mJBJHQwcE4HEAUSXhSz3c9Y +J5PPqk+FLDUO/1uoa7WVMtXMc2hbG8T4iV49+AI5Mn0GpDLps+9ioENdT/vOPQgz +rz1/EsuKWsJj2z7d6ltnEEmfW5YbTl28Tpp8H6tWR0o= +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/1024/client-key.der b/project1/cyassl-3.0.0/certs/1024/client-key.der new file mode 100644 index 0000000000000000000000000000000000000000..1c47c253221fdee6708c0f855dfb21ecd6fa63af GIT binary patch literal 608 zcmV-m0-yabf&yFu0RRGlfdIU74yZ}>eQVK##PtF3-_CA*CgrMzM~s5s0yq6B8N_xJOv+D!ruyIzfH zNZfbHC=Md&YosQ+Oz6S=N^dJ4?~1PWkYeRz9_uSSXUNgYIlC8Ase&J93(G3CT?&6|QdSP6zZW?$SfknvB|+ZEm3*E^MyF&HrpUZd8c8gXuc zNE}Pg+m3pMVKUtNRlyc*Cz2#Zi}AQfu}dAS-rC)cFT#=grKxWCI%@I#P#Eu@=flc) z>Q>X!a$A<&P6kdo!`Z%awq*wgOaTHx0QyJNdVG>RRquiDK`-g7 zf*LXD>GwyK8BkM+Ot_bau`J;ql#3>#EI z0zm+seg)p`^tZD6{4h&Z9pf(nN0w;?%?>Usy@O-6t9-X@%3EZo&c247!qBXyiRM6GEOR_*{{WEN)Ad~_=nw4(mM2x}T$Kadi!1%@#x+u7ou9V*2D literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/1024/client-key.pem b/project1/cyassl-3.0.0/certs/1024/client-key.pem new file mode 100644 index 00000000..79e398cc --- /dev/null +++ b/project1/cyassl-3.0.0/certs/1024/client-key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQC8cw6oSfN0oqnvGKXaVZkh+cjss21I5TU1dXc37NFhkF8+2eTV +35TKwanXGdqGyehNxGE2gv6rrX53JbuNEaW8YjqoOMw5ogRmtPf386raTQIOu16N +aUjcd8koDiLpa6Qmukzowf1Kbysf74qu9pBi5WQe6ys8Z8jcJwD2kWhlqQIDAQAB +AoGAE5fq6Dh4JaJcBM4NQHwx5cRwzZuCO1gJhjtmX9wxkPFP1dsV3d7XO5WTMRgx +Dl6j1qIacW6BSBxLz9uOeoZhMtz7VcEWbSeSJEWL8bhIsUsdrN7a3Y4vwpH7palu ++Dpq8f1QGO+f58PKeOpW09NyW5bdTgZOOsPZvnK2ZQcHTAECQQD6R9R6fJI8Ve+B +8EEwLaPPjxzmhycFcA3fmDXW8Ys4LyS10IS2eU9xKZRa8GRqrOdyxu1NWZg+Zzrz +dCz5YRdpAkEAwMGCDQzrxi/ckvmdghox6en3S/KChxzuFmrRHRiCcPPAti/28/cd +8YYjyE7rj1aOj/W/8fcrtcw9xlc5DBtUQQJBAJ1+Bd7t9Ley+/wwS1Ud4y8BR5Zp +Bc0OLiy9g2O2q3y3bcpbZKfOvobfO1PeYdIe66X2N+2sq3jZTOdV+9cRmcECQBiY +GCnmHic5cCForAovoXLBIYaVOMZYkKBXnLrjp7EVyN72G8JhI3bvsJ0cRL4TQzln +F8idyvv1RWSLOIIs8oECQDmJ5ZwZVTC6t0iMSBQO9J9+d5dD4bQZNTEjdZw7RK1p +ElbuAGFkFmbTfHQrFbSi/r8IaxpdP5ASsQWGMSnb2eI= +-----END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/1024/dh1024.der b/project1/cyassl-3.0.0/certs/1024/dh1024.der new file mode 100644 index 0000000000000000000000000000000000000000..f29e6dc0448fdc367f4adc816c98018f6a4cf3fd GIT binary patch literal 138 zcmV;50CoQ`frkQtfdHh^xNdm$+3hWS-L@8nT1y3XklkisxouLX9Is-=X-9iG^81wR zym|j5UhjFkS+e}f2iElIH23H@=hrht9iwD+8ibcrbU=h375;oBDk~-Zp23MTj5#GM sK<3T(sG*8e#z(TC*N^KiU)qZSPH~8Z^0&I;O4@cn&1p!UgM1P9Wifd5 zB`x>2_)N3HGmI|ljic}# z$dC4Z_|Fpcw4o7i4Ak%jt;GBkMaPsCyctWb?~`gz%oNy1i#cY80@Nr9xb6uz^Z=j) zr+KH+Johw1R*uko!q`m@iR~1@ESyXko1WZL37_9B@C+wZI(HN;-U5Mv0O%ilx4=|U zrzkC0eBRVt-PLx4JT@S}!zI@`IN?;t{Xl3MAyg(g6u0_sJ!?013-~3`!*Z z6&4jp%?naQKzop5E07|^7zKb+uY(^{;;^C%T9PE;Vkkei%DIWwptr5A1>wP2K=wu+BQLI06(UI6I*kb>Exya#K$^;T-G}gn}5VDAub0 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/1024/dsa1024.pem b/project1/cyassl-3.0.0/certs/1024/dsa1024.pem new file mode 100644 index 00000000..c5bb0675 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/1024/dsa1024.pem @@ -0,0 +1,12 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIBvAIBAAKBgQD3S/m7FZjr3d4eTnGIhfK3uuJK2nZAzWlInoN8EfdlMXj1JS33 +t/hSP77YtsX+GBVbudWShryyF3zYsL6gfPLVc3pYj43lSgCZg0rAnhYJoRA01Rm7 +Y+Pdg3R/EMpzde4xSt2f4AJqne6yS6drKmzHhnfoBBXckrR6KR9Og2OFVQIVANIF +5HP7wZnF3GikjZInPeJSX4mLAoGBAKohAglDbvuiVBSFCvQofMvM2/UeohipId6I +iDOMLuuNo/AdyI/2fvjPEvW0oRFvDNTwBq3E/BRFx5QVvBlLru+Tak/MFNhHizlm +hwLUKAq47gk39ACgBKd5p9I89zRDVo7QfMLYTQ+J7RTBLJxMGZue3FMJn98t8Awn +VDp3FC3eAoGBAOgffLfAVFGnKC1YfN7UXN3VdoQ8NiDAwyXXOjjhVMj9QGgaIVQm +ORS/9qOcXtkr98klugAJy38MSiT9FRYVSM0LUkRAe5BjK5AixRgFgFOvgx9U4rCi +C1qSJOFiKD+3yrmJ1qC3ra4F4cFZQO1KG2ine/vDIIHvS/NpkbDOOrA4AhQlODuh +GXXfm/VyU0854RzsE4SCGA== +-----END DSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/1024/include.am b/project1/cyassl-3.0.0/certs/1024/include.am new file mode 100644 index 00000000..c9684978 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/1024/include.am @@ -0,0 +1,17 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + certs/1024/client-cert.pem \ + certs/1024/client-key.pem \ + certs/1024/dh1024.pem \ + certs/1024/dsa1024.pem + +EXTRA_DIST += \ + certs/1024/client-cert.der \ + certs/1024/client-key.der \ + certs/1024/dh1024.der \ + certs/1024/dsa1024.der \ + certs/1024/rsa1024.der + diff --git a/project1/cyassl-3.0.0/certs/1024/rsa1024.der b/project1/cyassl-3.0.0/certs/1024/rsa1024.der new file mode 100644 index 0000000000000000000000000000000000000000..173d32bce3b9bc4fdf64d3771cc412d8cb22579e GIT binary patch literal 609 zcmV-n0-pUaf&yIv0RRGlfdIa6aJU2*MDTJQLr_y2lMh>BsxonR!AE>B%0cAfW17614;~o zao*ztaH6+h2^(I=J)mS@flJf!s0RRC4fq)L~ z9mp?w3@t>Ir;*)BRcZvz5KW>ScFh+%RFZI;f^c#&BnLk{Y+t-griLe!twP<0+`wx@ ziSs`iJ`qHOE@@1=N^u&yno>M#-n_DWQSVQWI^0kMPPQ>-sE!6ZQK`X-%fx}oEotnC z{4x{)AL2&{>0R0!3LR1_h_}5+UNl&lYHE#&U$3R?uScbx~ z7C9uv2CzM^0@8Xw{Njp7uPtM2>z2;Z~ns*NeC7Tr%h)7QZZ*EPMGac zMIE^W*$eF0D6>nw?KXJ=0|5X50)hbmJ#J258iaqHg?!;l2YlexnJV6$`8G5TcMd)X z>QChcCe-#g_umZ<94-c;^eSkaV{+p)<^++EwZXBZRIJy=`$3@Ab#J{3PQS5I=wC@D zm{v!}-s$Q*U;)1<+%dmNUz16PdVyP(OHImLI8V3XveU;Q+B_162jm;vL+t46RAJ}# z?WPMZ_1}Vj#vfrBoTP&}-ywyGZ+EYT6*35-S_>v&`)~}(oH%{FBJS&>s1^YEihv#f zgs4hE_=E#zFC$won`%rvXL$JO;FFoh2=BRNw4JjL0)c@5;dVuUS+>(j-wN*%)(`Nv%PKd&r}(u^^)WTA zw5tsL;n*Cwp*?YEX}_weM=&jFZE z+;mi`ZC+YIG5-IWwx9*wsSs57YtX8L0)c=b(*%k{>rl6RX1|9k<|t0;gW~Bm;qnnj z|DpB#pDpD&f&2jjZ&R&QC$>`VR%;d67!vbzew(y z4#ABO|7Dt;EgFiHTFAhqrG#Og)Fip@sh!Dp3&(I~J-WzL-_kST^?&&%VZK*I-M2*- zB=sZYI1Z5~?&BcX6v&iEcR+VV7@iHzc|TV%RtZUGzLZ!`_Qb2=iR0snzy(z-B*03S G1Sgsk)I)m! literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/ca-key.pem b/project1/cyassl-3.0.0/certs/ca-key.pem new file mode 100644 index 00000000..774feba0 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/ca-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAvwzKLRSyHoRCW804H0ryTXUQ8bY1n9/KfQOY06zeA2buKvHY +sH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQu2lSEAMvqPOVxfGLYlYb72dvpBBB +la0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkcrMft8nyVsJWCfUlcOM13Je+9gHVT +lDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfaQG/YIdxzG0ItU5z+Gvx9q3o2P5je +hHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+jJtK3b7FaF9c4mQj+k1hv/sMTSQgW +C6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02eQIDAQABAoIBAD1uTmAahH+dhXzh +Swd84NaZKt6d+TY0DncOPgjqT+UGJtT2OPffDQ8cLgai9CponGNy4zXmBJGRtcGx +pFSs18b7QaDWdW+9C06/sVLoX0kmmFZHx97p6jxgAb8o3DG/SV+TSYd6gVuWS03K +XDhPt+Gy08ch2jwShwfkG9xD7OjsVGHn9u2mCy7134J/xh9hGZykgznfIYWJb3ev +hhUyCKJaCyZh+3AMypw4fbwi7uujqBYA+YqAHgCEqEpB+IQDZy8jWy+baybDBzSU +owM7ctWfcuCtzDSrvcfV9SYwhQ8wIzlS/zzLmSFNiKWr7mK5x+C7R4fBac9z8zC+ +zjkEnOUCgYEA4XZFgFm200nfCu8S1g/wt8sqN7+n+LVN9TE1reSjlKHb8ZattQVk +hYP8G1spqr74Jj92fq0c8MvXJrQbBY5Whn4IYiHBhtZHeT63XaTGOtexdCD2UJdB +BFPtPybWb5H6aCbsKtya8efc+3PweUMbIaNZBGNSB8nX5tEbXV6W+lMCgYEA2O1O +ZGFrkQxhAbUPu0RnUx7cB8Qkfp5shCORDOQSBBZNeJjMlj0gTg9Fmrb4s5MNsqIb +KfImecjF0nh+XnPy13Bhu0DOYQX+aR6CKeYUuKHnltAjPwWTAPLhTX7tt5Zs9/Dk +0c8BmE/cdFSqbV5aQTH+/5q2oAXdqRBU+GvQqoMCgYAh0wSKROtQt3xmv4cr5ihO +6oPi6TXh8hFH/6H1/J8t5TqB/AEDb1OtVCe2Uu7lVtETq+GzD3WQCoS0ocCMDNae +RrorPrUx7WO7pNUNj3LN0R4mNeu+G3L9mzm0h7cT9eqDRZOYuo/kSsy0TKh/CLpB +SahJKD1ePcHONwDL+SzdUQKBgQChV58+udavg22DP4/70NyozgMJI7GhG2PKxElW +NSvRLmVglQVVmRE1/dXfRMeliHJfsoJRqHFFkzbPXB9hUQwFgOivxXu6XiLjPHXD +hAVVbdY6LYSJkzPLONqqMQXNzmwt3VXTVwvwpTVqsK4xukOWygDHS+MZEkPTQvpv +6oDA0QKBgQC524kgNCdwYjTqXyViEvOdgb9I7poOwY0Q/2WanS0aipRayMClpYRh +ntQkue+pncl3C8dwZj26yFTf0jPh9X/5J2G+V0Xdt0UXJPUj5DgOkSfu4yDYFMiU +R3dAd0UYng3OeT9XMVYJSWe+lFhP9sSr4onj44rABVUsJMBKlwQnmg== +-----END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/client-cert.der b/project1/cyassl-3.0.0/certs/client-cert.der new file mode 100644 index 0000000000000000000000000000000000000000..a656ff91f3e20281d2ce8fa5154bb4dcfb1291c8 GIT binary patch literal 1180 zcmXqLVwqvk#N4oenTe5!iIbt-t90MQv>Ubtylk9WZ60mkc^Mg5Ss4r(`wY1aIN6v( zS=fY`LW2$YfeL^e4q-O`qSW;KJVQYPevkmWFh@XsQAti>UWy@~0S`!sOPIAXF*w-A zP{cq8#OD^~4k*e`FG|eK&CE+T6f+P3i82fGmY0|7RVEe}=jbKp=NifyNW-1L$tcE` znU|LD0GBq96X!KFG&C?WF|;r;G&PL^a!m}(jSQgN!RO#6MkVAxWn^VwZerwTFlb`r zVrpV!WH`)xQTw0e5+hgZ;1ey{S~VrJ_O8+jVt2o`%xn|8QQw7KnbpS*yUe@N=AC3D#ek45Sjcn zz1pg(;vr*L*u-VRPQ90G9On4Ezu0!)JW!fvq4n2~i@i*rJUln;zI5Gwzv&kQUaa6S zXk4$r?JRP%Bz=ofQ+{vTp$>+VrFDuT-^B0pz*VTEHFjL^0A1qh#22+O}n1aE>Rc4TcAGi zxZ3sB)B^^Mhe7hnERDMj8h12cRkN^h%96&3gDw>`A>}Yo=8zR;VKrc8Wc-huG=TXH zm^2s}WNMrmHRmawzi{JVNdB31BAgcgGiJ=18eAq({mh{3jRtS&@_P@?_FWBC&T`lG z>-|&9w)h7B+PG^hCmD=?m#bgi%DlN+vBZ$uYrU@2=E;3$KF8Zmus`!SRB~cZxE7d9>?p{#_Hf@*Ic3oTUnBRBLyPa|T?+Kkv=sdRNHi{Dy4kmvY;0|O zy>q8B7j5d6ta&Mtx3Hr)BO|* z50VzSf0^v8<((79rT_E!Gq2>f4QsR(zTOg@e%9#8HbL)MMQOZ?yvq9jDeYm)_(YS{Q&^Gkff0S literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/client-cert.pem b/project1/cyassl-3.0.0/certs/client-cert.pem new file mode 100644 index 00000000..278b43fe --- /dev/null +++ b/project1/cyassl-3.0.0/certs/client-cert.pem @@ -0,0 +1,87 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 87:4a:75:be:91:66:d8:3d + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:21:55 2011 GMT + Not After : Jul 20 18:21:55 2014 GMT + Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:c3:03:d1:2b:fe:39:a4:32:45:3b:53:c8:84:2b: + 2a:7c:74:9a:bd:aa:2a:52:07:47:d6:a6:36:b2:07: + 32:8e:d0:ba:69:7b:c6:c3:44:9e:d4:81:48:fd:2d: + 68:a2:8b:67:bb:a1:75:c8:36:2c:4a:d2:1b:f7:8b: + ba:cf:0d:f9:ef:ec:f1:81:1e:7b:9b:03:47:9a:bf: + 65:cc:7f:65:24:69:a6:e8:14:89:5b:e4:34:f7:c5: + b0:14:93:f5:67:7b:3a:7a:78:e1:01:56:56:91:a6: + 13:42:8d:d2:3c:40:9c:4c:ef:d1:86:df:37:51:1b: + 0c:a1:3b:f5:f1:a3:4a:35:e4:e1:ce:96:df:1b:7e: + bf:4e:97:d0:10:e8:a8:08:30:81:af:20:0b:43:14: + c5:74:67:b4:32:82:6f:8d:86:c2:88:40:99:36:83: + ba:1e:40:72:22:17:d7:52:65:24:73:b0:ce:ef:19: + cd:ae:ff:78:6c:7b:c0:12:03:d4:4e:72:0d:50:6d: + 3b:a3:3b:a3:99:5e:9d:c8:d9:0c:85:b3:d9:8a:d9: + 54:26:db:6d:fa:ac:bb:ff:25:4c:c4:d1:79:f4:71: + d3:86:40:18:13:b0:63:b5:72:4e:30:c4:97:84:86: + 2d:56:2f:d7:15:f7:7f:c0:ae:f5:fc:5b:e5:fb:a1: + ba:d3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 + X509v3 Authority Key Identifier: + keyid:33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 + DirName:/C=US/ST=Oregon/L=Portland/O=yaSSL/OU=Programming/CN=www.yassl.com/emailAddress=info@yassl.com + serial:87:4A:75:BE:91:66:D8:3D + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 1c:7c:42:81:29:9e:21:cf:d0:d8:c1:54:6f:cc:ae:14:09:38: + ff:68:98:9a:95:53:76:18:7b:e6:30:76:ec:28:0d:75:a7:de: + e0:cd:8e:d5:55:23:6a:47:2b:4e:8d:fc:7d:06:a3:d8:0f:ad: + 5e:d6:04:c9:00:33:fb:77:27:d3:b5:03:b3:7b:21:74:31:0b: + 4a:af:2d:1a:b3:93:8e:cc:f3:5f:3d:90:3f:cc:e3:55:19:91: + 7b:78:24:2e:4a:09:bb:18:4e:61:2d:9c:c6:0a:a0:34:91:88: + 70:6b:3b:48:47:bc:79:94:a2:a0:4d:32:47:54:c2:a3:dc:2e: + d2:51:4c:29:39:11:ff:e2:15:5e:58:97:36:f6:e9:06:06:86: + 0e:8d:9d:95:03:72:b2:8b:19:7c:e9:14:6e:a1:88:73:68:58: + 6d:71:5e:c2:d5:d3:13:d2:5f:de:ea:03:be:e2:00:40:e5:ce: + fd:e6:92:31:57:c3:eb:bb:66:ac:cb:2f:1a:fa:e0:62:a2:47: + f4:93:43:2a:4b:6c:5e:0a:2f:f9:e7:e6:4a:63:86:b0:ac:2a: + a1:eb:b4:5b:67:cd:32:e4:b6:11:4b:9a:72:66:0d:a2:4a:76: + 8f:fe:22:bc:83:fd:db:b7:d5:a9:ee:05:c9:b1:71:7e:1b:2b: + e1:e3:af:c0 +-----BEGIN CERTIFICATE----- +MIIEmDCCA4CgAwIBAgIJAIdKdb6RZtg9MA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD +VQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwG +A1UEChMFeWFTU0wxFDASBgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cu +eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMTEw +MjQxODIxNTVaFw0xNDA3MjAxODIxNTVaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE +CBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFTU0wxFDAS +BgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJ +KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9amNrIHMo7Quml7xsNE +ntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/Zcx/ZSRppugUiVvk +NPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE79fGjSjXk4c6W3xt+ +v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX11JlJHOwzu8Zza7/ +eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8lTMTRefRx04ZAGBOw +Y7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB9jCB8zAdBgNVHQ4EFgQU +M9hFZtdohxh+VA1wJ5HHJteFZcAwgcMGA1UdIwSBuzCBuIAUM9hFZtdohxh+VA1w +J5HHJteFZcChgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24x +ETAPBgNVBAcTCFBvcnRsYW5kMQ4wDAYDVQQKEwV5YVNTTDEUMBIGA1UECxMLUHJv +Z3JhbW1pbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW +DmluZm9AeWFzc2wuY29tggkAh0p1vpFm2D0wDAYDVR0TBAUwAwEB/zANBgkqhkiG +9w0BAQUFAAOCAQEAHHxCgSmeIc/Q2MFUb8yuFAk4/2iYmpVTdhh75jB27CgNdafe +4M2O1VUjakcrTo38fQaj2A+tXtYEyQAz+3cn07UDs3shdDELSq8tGrOTjszzXz2Q +P8zjVRmRe3gkLkoJuxhOYS2cxgqgNJGIcGs7SEe8eZSioE0yR1TCo9wu0lFMKTkR +/+IVXliXNvbpBgaGDo2dlQNysosZfOkUbqGIc2hYbXFewtXTE9Jf3uoDvuIAQOXO +/eaSMVfD67tmrMsvGvrgYqJH9JNDKktsXgov+efmSmOGsKwqoeu0W2fNMuS2EUua +cmYNokp2j/4ivIP927fVqe4FybFxfhsr4eOvwA== +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/client-ecc-cert.pem b/project1/cyassl-3.0.0/certs/client-ecc-cert.pem new file mode 100644 index 00000000..4d0448fc --- /dev/null +++ b/project1/cyassl-3.0.0/certs/client-ecc-cert.pem @@ -0,0 +1,54 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + bf:cc:cb:7a:0a:07:42:82 + Signature Algorithm: ecdsa-with-SHA1 + Issuer: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: May 1 23:51:33 2012 GMT + Not After : Jan 26 23:51:33 2015 GMT + Subject: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + EC Public Key: + pub: + 04:55:bf:f4:0f:44:50:9a:3d:ce:9b:b7:f0:c5:4d: + f5:70:7b:d4:ec:24:8e:19:80:ec:5a:4c:a2:24:03: + 62:2c:9b:da:ef:a2:35:12:43:84:76:16:c6:56:95: + 06:cc:01:a9:bd:f6:75:1a:42:f7:bd:a9:b2:36:22: + 5f:c7:5d:7f:b4 + ASN1 OID: prime256v1 + X509v3 extensions: + X509v3 Subject Key Identifier: + EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2 + X509v3 Authority Key Identifier: + keyid:EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2 + DirName:/C=US/ST=Oregon/L=Salem/O=Client ECC/OU=Fast/CN=www.yassl.com/emailAddress=info@yassl.com + serial:BF:CC:CB:7A:0A:07:42:82 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: ecdsa-with-SHA1 + 30:44:02:20:26:08:44:95:35:2e:fa:9d:20:01:a6:79:60:ed: + 35:a7:0a:dd:7a:0e:75:c5:80:d2:0b:9f:6a:90:d6:31:76:75: + 02:20:2d:87:a2:bb:d5:e2:42:61:35:19:59:40:1d:fd:71:4f: + 28:65:96:99:e6:85:1b:09:ad:d4:58:71:56:63:0b:c7 +-----BEGIN CERTIFICATE----- +MIIC+jCCAqKgAwIBAgIJAL/My3oKB0KCMAkGByqGSM49BAEwgYkxCzAJBgNVBAYT +AlVTMQ8wDQYDVQQIEwZPcmVnb24xDjAMBgNVBAcTBVNhbGVtMRMwEQYDVQQKEwpD +bGllbnQgRUNDMQ0wCwYDVQQLEwRGYXN0MRYwFAYDVQQDEw13d3cueWFzc2wuY29t +MR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMjA1MDEyMzUxMzNa +Fw0xNTAxMjYyMzUxMzNaMIGJMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29u +MQ4wDAYDVQQHEwVTYWxlbTETMBEGA1UEChMKQ2xpZW50IEVDQzENMAsGA1UECxME +RmFzdDEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEdMBsGCSqGSIb3DQEJARYOaW5m +b0B5YXNzbC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARVv/QPRFCaPc6b +t/DFTfVwe9TsJI4ZgOxaTKIkA2Ism9rvojUSQ4R2FsZWlQbMAam99nUaQve9qbI2 +Il/HXX+0o4HxMIHuMB0GA1UdDgQWBBTr1EtZa5VhP1FXtgRNiUGIRFyr8jCBvgYD +VR0jBIG2MIGzgBTr1EtZa5VhP1FXtgRNiUGIRFyr8qGBj6SBjDCBiTELMAkGA1UE +BhMCVVMxDzANBgNVBAgTBk9yZWdvbjEOMAwGA1UEBxMFU2FsZW0xEzARBgNVBAoT +CkNsaWVudCBFQ0MxDTALBgNVBAsTBEZhc3QxFjAUBgNVBAMTDXd3dy55YXNzbC5j +b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkAv8zLegoHQoIwDAYD +VR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCICYIRJU1LvqdIAGmeWDtNacK3XoO +dcWA0gufapDWMXZ1AiAth6K71eJCYTUZWUAd/XFPKGWWmeaFGwmt1FhxVmMLxw== +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/client-key.der b/project1/cyassl-3.0.0/certs/client-key.der new file mode 100644 index 0000000000000000000000000000000000000000..94dc253a2bd214f1c2c9a99c5d7c649e5da5ded9 GIT binary patch literal 1192 zcmV;Z1Xueof&`=j0RRGm0RaHR1JNt~Iixa0J5$JnD=K_+n!TzjQU^!YrZ%z%GLF!? zX?w=QM4r@vNc}BnqKjv{p>@bMEK1TF_lvsE4f*fv@qr$Dn*&Fhzh%sSWh7~)=oE=t zIH zQ{ItG9c}7ad-8Xx*~Zz5tJvWdb z-nWk2K-Hq|;2xp$zL(pEW0n-nmX;qbG(B&l8|4j%w5{vn!ETW!-TtCWIhLpIp) zLTDrqMbuE_7dc4KHH(yO5#Eo=SptE90O};C`DruhaokdUh#@F1N#4407U|4KdWa2_ zSA;rXjg**Jr2>J0 z0M$4f!;i(23`YxZHIl`!jYi0l7?1UU3it1!{(!l)D!R%TuwA7G(36eWoCF-yVveRJ zfdT){iYj9?H9)FufZmBCYFAC3Zmp9}R*(yAopXx}t|vX-PVlP5Yqng$pj6Bem*@U z62lmK^C|OR4t8u=b>u;WX`M3j%_6I?HM&Z&JmuL~wqj3R-sPSO%2To|_nxzB3R`() z>~4`xk|6f{{1)xgb`0X|f3j&4Yj_S?Mr5>Jwmw{U*2|#F+}3bH2kF z0)c@5x|*!YeY|8%B0LWA)=~9`*qOi)AYBhB{afO$*&Nv+R&D%* z&|mEk6&x5L=fpir*U+A7mCqu{1ACt1U;+Fu0)c=L&`Zx7XStscbw`F}t}(*KFsxYy zP}vW)a0d7A)5v0csM>D!AwSc9U+RjhKiMi?^HI{mFgN2Zqje1)O(8VZS8!a3zjEwK zZfMob7<4mEj5lu%QSBoCp)TSq413FxB+{!B0e|*6&KjB_|x{(w0*ST#?

NKo6^CG#lCV}r{|I8)Sq()guZ%{Rkgw9F; z=@NcgG1oKvArp4Y7BJfk{KaCYHMsA$u&lr~_SwlsNcljJ04p1+Y~vck3j>}T!baps zP9k$}!(Y^z)-VT1){Ky=)b{b?NYhwLrn${2zi1x_OJjyFTx-_024(lA+yG~5yThqL SgZsz&$l@M;uK+)j0s#Vkbb);U literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/dh2048.pem b/project1/cyassl-3.0.0/certs/dh2048.pem new file mode 100644 index 00000000..1e2b848d --- /dev/null +++ b/project1/cyassl-3.0.0/certs/dh2048.pem @@ -0,0 +1,29 @@ +Diffie-Hellman-Parameters: (2048 bit) + prime: + 00:b0:a1:08:06:9c:08:13:ba:59:06:3c:bc:30:d5: + f5:00:c1:4f:44:a7:d6:ef:4a:c6:25:27:1c:e8:d2: + 96:53:0a:5c:91:dd:a2:c2:94:84:bf:7d:b2:44:9f: + 9b:d2:c1:8a:c5:be:72:5c:a7:e7:91:e6:d4:9f:73: + 07:85:5b:66:48:c7:70:fa:b4:ee:02:c9:3d:9a:4a: + da:3d:c1:46:3e:19:69:d1:17:46:07:a3:4d:9f:2b: + 96:17:39:6d:30:8d:2a:f3:94:d3:75:cf:a0:75:e6: + f2:92:1f:1a:70:05:aa:04:83:57:30:fb:da:76:93: + 38:50:e8:27:fd:63:ee:3c:e5:b7:c8:09:ae:6f:50: + 35:8e:84:ce:4a:00:e9:12:7e:5a:31:d7:33:fc:21: + 13:76:cc:16:30:db:0c:fc:c5:62:a7:35:b8:ef:b7: + b0:ac:c0:36:f6:d9:c9:46:48:f9:40:90:00:2b:1b: + aa:6c:e3:1a:c3:0b:03:9e:1b:c2:46:e4:48:4e:22: + 73:6f:c3:5f:d4:9a:d6:30:07:48:d6:8c:90:ab:d4: + f6:f1:e3:48:d3:58:4b:a6:b9:cd:29:bf:68:1f:08: + 4b:63:86:2f:5c:6b:d6:b6:06:65:f7:a6:dc:00:67: + 6b:bb:c3:a9:41:83:fb:c7:fa:c8:e2:1e:7e:af:00: + 3f:93 + generator: 2 (0x2) +-----BEGIN DH PARAMETERS----- +MIIBCAKCAQEAsKEIBpwIE7pZBjy8MNX1AMFPRKfW70rGJScc6NKWUwpckd2iwpSE +v32yRJ+b0sGKxb5yXKfnkebUn3MHhVtmSMdw+rTuAsk9mkraPcFGPhlp0RdGB6NN +nyuWFzltMI0q85TTdc+gdebykh8acAWqBINXMPvadpM4UOgn/WPuPOW3yAmub1A1 +joTOSgDpEn5aMdcz/CETdswWMNsM/MVipzW477ewrMA29tnJRkj5QJAAKxuqbOMa +wwsDnhvCRuRITiJzb8Nf1JrWMAdI1oyQq9T28eNI01hLprnNKb9oHwhLY4YvXGvW +tgZl96bcAGdru8OpQYP7x/rI4h5+rwA/kwIBAg== +-----END DH PARAMETERS----- diff --git a/project1/cyassl-3.0.0/certs/dsa2048.der b/project1/cyassl-3.0.0/certs/dsa2048.der new file mode 100644 index 0000000000000000000000000000000000000000..0bcb0b44d95d1ce20ee8b9e5feb2718bc9050334 GIT binary patch literal 835 zcmV-J1HAk&f&)JS0RRGm0RaHaj>(|ankO9EQs2kG<_4rbie^dBSu;^-#GGDag~#!$ z)!AaK{h{C+SO1pp44=qEhwEIC&_+TDP--K~iEmZuY7wcZGOIHUQMGwdw5y^e5sl>} zzS!}dP7-gdL{xyOw1H?&L=Lz)^S*-!bfU(3*J^zVh*yJ1+|OQb?r046{{sY&s`m$& z_-9&!BW6cn!$WQZk*p|Y%ka|$$O)IVt^r!=JKK zVF4+smdhYuLLItwOJl(T6#(a@In-)5UX=zp2X_kVpabi8f|~+@0RaG-)J$Zc>(ONG>2zTDS)UuhxX{9=*=4(hB)@o3`Q=<;K?v1)hvI( z2*1o)f{xVGNvfjy=E0rt*_N>X3|ljf2Hl+~sp)`0JJ@=ZA&*w^qO>cC9CZJFk=!4V z6PT~Z2GUHBqP^M{x@E8}Xooy*C5@2BybY;C1IfP6g>TyjdyM$8!buQmV^%lCFw*;R zn&^TDEBWF``PpYf&l<#OS`wpNR}oZ1T=q#Gc6>xDVO5}caw<|+Z&U(ERY%rJ0{s#^C}5g+^i+EsYN@YI&5Kt zzi8Czo5d+eU=aDt)L(`Zq zgV+>j==jx7tl&Gpr&JbRNn|Eeq-$w>x{8C@E@cX$C-0e=2-mfrpaJiG7r%pRF5SR6 zI3sAZc5CIz_k8ZaQsUjMSvo=nMX<-gcLlNxGC)SE+Ie>bao>6Z6#$s-xluPhbrTZ? NkCfBq=>W@OZJIn>m1zI~ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/ecc-client-key.pem b/project1/cyassl-3.0.0/certs/ecc-client-key.pem new file mode 100644 index 00000000..cf9812d8 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/ecc-client-key.pem @@ -0,0 +1,9 @@ +ASN1 OID: prime256v1 +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIPjPkmu9HijxqKuhI08ydBiIUK1+x+yS+I+XTa9WiWXHoAoGCCqGSM49 +AwEHoUQDQgAEVb/0D0RQmj3Om7fwxU31cHvU7CSOGYDsWkyiJANiLJva76I1EkOE +dhbGVpUGzAGpvfZ1GkL3vamyNiJfx11/tA== +-----END EC PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/ecc-key.der b/project1/cyassl-3.0.0/certs/ecc-key.der new file mode 100644 index 0000000000000000000000000000000000000000..a88d141e08cceb829f2bc756ffcabd7d8e8c0b79 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1RzDWX##VcY=xmXTXN{=$E?HyjZ-xQ`fMoNG>ze?35=i$1_&yK zNX|V20SBQ(13~}x++j1?=l2(Pj8`LPkYu4B+&MFH`^#;L)q0{s)EB3rD zNgoiMhqn~H@g;e$B`^lq%Q0rH*ztTy;s@5L)UIt#!p$F~w*2rc6Z&((N zD7XK7yL9jY)3seF8b5^?e-jEw)y@^%5vMPO3OTItzfiJICQ3fmR{lN}TJ+bq9{VA3 z6G8`iE0MbPenA@As{+Ve=fJ+5zddQCqW5I%@_-CfmHCh}p1Q~`1n zDS|5+PIv8j|58I1t6SUQ)$MOK=YxUoOY_ZIJ$YQ`^fed*P6r)|jrL|cL>-(Ro@FJi z+Q6X_mJZtNg&zkk<@&FMbV<#&EcCDi?rVApfXrHemk4i>QdGcl@%}V=yIbj4Ll*gG zisMVfO^gC+;w9l)CnL78aY+Xu&cIADkB_Uh=ajBw-wCO)%WE7O-hzR@2wgwGwy~(CoPltsPBMoT9C!}!82;-^H!JDk_xe%B zSh?5+1MR>A7*&gy{;~GZJ^Ew7I2p$P?@gItw7SmY&e>}%c9j47cNj|kW$+4-TstC^ zh0q`vSuUkB1FRcgcrpem4c0 zAaiT4V@o42+&5+viM-(Wpj|CjW#Govn`S3s?8CT>*sit7zYhL{a%j~@4i5OPomQ+* zt%#ta_WU@_mRnwawwSx~itPHxw~%$94tHz)Sw&h5|CNo-{+sq0jtij-?#6lDoneJs z8Ei+)2>+#G+vF`R-4timN@OZ#NmQKUg&5~CLgLUYAfR*)A0UaktAN-z*+yx*@63y# zbEop;I9=9tpNI}t&DexlDRcFqdD?m(zjK4YZJ&!Y6~Jw2Y9QuO&qZ#`1;jeQo~pqH zFRPg_;clHpdjF};aJUv44j}r$0)c@5|1c54JZrSpo@>FA(MZmKExxb!y0X{9#8Yk+ z0;*xT>IIv5XA92R`gt0#il^MkUBGJB(i{k60GBUCS%Wtx&L${H&XD#CtXD!0)c@5 z>PV;Eb3s-i7573#O{w8#TfHTH_o!tPt}Qqb&6E5vqbx+b&(I-{`@#9G9qyLTmq}n# zfTg1N?zz=>MBV)vD)E8z**xrX&??wGCx>|whUZrdS+IT<7V;efA7YDlT4ZM0)c@5#kL@fH1pl?N?n3wTu9_~I{W&n9OPqn zF|5)hMI&tk_2kk>g(e8)s-Vs;9c}!s()mJu>TOwivyn?4R}pRYvqa zkMayKeq7y%Njq7&hrGtcB#IDYAs=QMKJ-}8Yz;uNz#U^k4#ZXtz|6wdW)8%wwKMin z0)c=Te&(gN(K%{JRjeeIn-VB(dt3!2T5<(`LiK|hcq~n>v^JKhy5OuPovCUmgSl_J~C96*EXSytDnPOGkPXVIhaY}b#L4vnmM|4$&zeC3fq-{EwiJ!U69|6E#Ol<#4Wyp4Zr&Pt z_=$+`Haro$gXl19fqX~vP0H$40b*4yONptyZvpmn0;=PLW(Jisq2kJA{-Z5Jmz8X9 z)wDSF`IRvG_?#sxwiHp!F0)(K+#2jH30prp(6~+~AKWVLtf^UD2V)U~3)FOgwtZqn FzgDSPO>O`H literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/certs/server-cert.pem b/project1/cyassl-3.0.0/certs/server-cert.pem new file mode 100644 index 00000000..8381265e --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-cert.pem @@ -0,0 +1,158 @@ +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 2 (0x2) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:27:13 2011 GMT + Not After : Jul 20 18:27:13 2014 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=yaSSL, OU=Support, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27: + 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6: + f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75: + f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab: + 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e: + 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25: + 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c: + 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6: + 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc: + 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8: + dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3: + e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9: + 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0: + c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77: + ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4: + b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22: + a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f: + ad:d7 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 71:4e:d3:62:df:cc:4c:f7:cd:b7:6e:52:0b:6c:6e:e0:bd:c2: + 2d:07:d7:c0:b0:6e:43:1e:35:bc:30:01:50:f0:ff:99:23:6c: + 18:1a:41:b6:11:d6:d4:19:61:fd:e4:77:97:1c:39:e1:57:ab: + c5:15:63:77:11:36:5e:74:e2:24:0b:1f:41:78:ad:b7:81:e7: + b4:40:66:80:f0:4b:91:a0:6d:a8:6e:3d:53:d9:8b:ce:2a:e1: + 0b:45:65:87:a1:96:ae:ee:3e:88:d5:12:1f:78:17:ae:2c:c5: + 73:44:d8:dc:f4:af:d8:cc:ae:4c:e1:0c:be:55:a4:99:f7:6e: + 96:c0:c8:45:87:bf:dc:51:57:ff:9e:73:37:6a:18:9c:c3:f9: + 22:7a:f4:b0:52:bd:fc:21:30:f8:c5:ff:1e:87:7d:ad:a2:5a: + 35:f5:22:a8:b4:0a:76:38:e6:76:b0:98:af:1b:ec:8a:0a:43: + 74:d2:85:34:37:84:07:e1:f6:23:b2:29:de:a6:b6:b7:4c:57: + 7e:96:06:cb:a9:16:25:29:3a:03:2d:55:7d:a6:8c:a4:f7:9e: + 81:c9:95:b6:7c:c1:4a:ce:94:66:0c:ca:88:eb:d2:09:f5:5b: + 19:58:82:df:27:fd:67:95:78:b7:02:06:d5:a7:61:bd:ef:3a: + fc:b2:61:cd +-----BEGIN CERTIFICATE----- +MIIDkDCCAngCAQIwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTExMDI0MTgyNzEzWhcN +MTQwNzIwMTgyNzEzWjCBijELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB01vbnRhbmEx +EDAOBgNVBAcTB0JvemVtYW4xDjAMBgNVBAoTBXlhU1NMMRAwDgYDVQQLEwdTdXBw +b3J0MRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZv +QHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCVCOFX +QfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hnf/5cnFF194rKB+c1L4/h +vXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/XGQ0lT+FjY1GLC2Q/rUO4 +pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bMQLRpo0YzaYduxLsXpvPo +3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq0KGWSrzh1Bpbx6DAwWN4 +D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ6dgIvDMgs1gip6rrxOHm +YYPF0pbf2dBPrdcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAcU7TYt/MTPfNt25S +C2xu4L3CLQfXwLBuQx41vDABUPD/mSNsGBpBthHW1Blh/eR3lxw54VerxRVjdxE2 +XnTiJAsfQXitt4HntEBmgPBLkaBtqG49U9mLzirhC0Vlh6GWru4+iNUSH3gXrizF +c0TY3PSv2MyuTOEMvlWkmfdulsDIRYe/3FFX/55zN2oYnMP5Inr0sFK9/CEw+MX/ +Hod9raJaNfUiqLQKdjjmdrCYrxvsigpDdNKFNDeEB+H2I7Ip3qa2t0xXfpYGy6kW +JSk6Ay1VfaaMpPeegcmVtnzBSs6UZgzKiOvSCfVbGViC3yf9Z5V4twIG1adhve86 +/LJhzQ== +-----END CERTIFICATE----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + e9:d0:a7:5f:79:25:f4:3c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 24 18:18:15 2011 GMT + Not After : Jul 20 18:18:15 2014 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: + f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: + de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: + 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: + 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: + 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: + a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: + a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: + 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: + 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: + 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: + 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: + de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: + cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: + b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: + 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: + ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: + 36:79 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + X509v3 Authority Key Identifier: + keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com + serial:E9:D0:A7:5F:79:25:F4:3C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: + 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: + e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: + f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: + af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: + 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: + 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: + 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: + 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: + 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: + 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: + 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: + f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: + b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: + 5a:1f:7f:ca +-----BEGIN CERTIFICATE----- +MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD +VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G +A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 +dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx +MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q +8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k +EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A +dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ +mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ +CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O +BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd +P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u +dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV +BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG +9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 +PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH +Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr +G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m +ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi +rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem b/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem new file mode 100644 index 00000000..5f25d9df --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem @@ -0,0 +1,54 @@ +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 9 (0x9) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Aug 8 21:58:29 2012 GMT + Not After : May 5 21:58:29 2015 GMT + Subject: C=US, ST=Washington, L=Seattle, O=Elliptic - RSAsig, OU=ECC-RSAsig, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + EC Public Key: + pub: + 04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de: + 9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c: + 16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92: + 21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33: + 0b:80:34:89:d8 + ASN1 OID: prime256v1 + Signature Algorithm: sha1WithRSAEncryption + a0:1c:de:98:e8:61:c8:fb:0a:0e:af:ea:99:4b:c0:49:e6:66: + 68:5e:7a:18:b8:0c:e3:0f:16:86:bc:b5:86:79:02:69:1c:b7: + e7:ff:53:d9:05:5d:27:39:24:54:67:14:de:ef:8e:c2:a0:11: + ca:c8:27:99:b9:d6:e9:71:1f:86:c9:8f:b1:74:a2:9f:93:6a: + 0c:74:cf:17:77:8c:26:08:6e:a8:ac:69:d4:55:15:a2:95:87: + 43:7a:ab:72:93:73:40:58:c2:bb:9c:89:f2:73:20:69:df:f1: + f3:65:08:9c:00:67:97:a6:71:00:2b:31:84:10:ac:bd:54:ac: + fd:b3:eb:12:36:77:f6:0a:e3:9a:96:d2:a6:22:bc:1d:6b:ce: + 3c:0d:7b:d9:1c:1d:f1:ee:ec:ce:83:c8:98:c9:65:3e:06:31: + c3:b2:87:da:09:b4:90:0b:e2:6b:29:0e:d6:ae:53:1d:10:98: + e2:dc:f9:63:38:a1:a2:af:46:23:a4:4c:ab:0c:0b:08:be:cd: + a4:a6:6d:46:f0:f8:e0:31:99:85:39:10:4a:a0:04:54:3b:21: + e1:e9:b4:f3:a5:06:cd:37:ae:2c:ca:5d:ac:90:b5:ab:92:81: + aa:bf:2d:3f:8e:ee:4d:12:81:0a:8e:a4:ca:87:93:af:b0:25: + 7e:e2:07:f7 +-----BEGIN CERTIFICATE----- +MIIC1zCCAb8CAQkwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 +aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd +MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTIwODA4MjE1ODI5WhcN +MTUwNTA1MjE1ODI5WjCBnDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0 +b24xEDAOBgNVBAcTB1NlYXR0bGUxGjAYBgNVBAoTEUVsbGlwdGljIC0gUlNBc2ln +MRMwEQYDVQQLEwpFQ0MtUlNBc2lnMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0w +GwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABLszrEwnUErGSqUEwzzenzbbci3OlOor+ssgCTksFuhhAumvTdMCk5ox +W5eSIX/wzxjakRECNIboIFgzC4A0idgwDQYJKoZIhvcNAQEFBQADggEBAKAc3pjo +Ycj7Cg6v6plLwEnmZmheehi4DOMPFoa8tYZ5Amkct+f/U9kFXSc5JFRnFN7vjsKg +EcrIJ5m51ulxH4bJj7F0op+Tagx0zxd3jCYIbqisadRVFaKVh0N6q3KTc0BYwruc +ifJzIGnf8fNlCJwAZ5emcQArMYQQrL1UrP2z6xI2d/YK45qW0qYivB1rzjwNe9kc +HfHu7M6DyJjJZT4GMcOyh9oJtJAL4mspDtauUx0QmOLc+WM4oaKvRiOkTKsMCwi+ +zaSmbUbw+OAxmYU5EEqgBFQ7IeHptPOlBs03rizKXayQtauSgaq/LT+O7k0SgQqO +pMqHk6+wJX7iB/c= +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-ecc.pem b/project1/cyassl-3.0.0/certs/server-ecc.pem new file mode 100644 index 00000000..3d7db6a1 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-ecc.pem @@ -0,0 +1,55 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + f9:ec:48:2d:d0:a4:49:6c + Signature Algorithm: ecdsa-with-SHA1 + Issuer: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com + Validity + Not Before: Oct 22 04:02:45 2013 GMT + Not After : Jul 18 04:02:45 2016 GMT + Subject: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + EC Public Key: + pub: + 04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de: + 9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c: + 16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92: + 21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33: + 0b:80:34:89:d8 + ASN1 OID: prime256v1 + X509v3 extensions: + X509v3 Subject Key Identifier: + 5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30 + X509v3 Authority Key Identifier: + keyid:5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30 + DirName:/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC/CN=www.yassl.com/emailAddress=info@yassl.com + serial:F9:EC:48:2D:D0:A4:49:6C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: ecdsa-with-SHA1 + 30:44:02:20:36:14:3b:c8:19:43:87:b9:3d:aa:32:6f:18:9a: + 4e:07:0c:47:6c:e1:dc:87:fd:ad:f4:2c:71:ec:04:ba:c9:58: + 02:20:65:4e:67:ee:68:26:ed:1c:03:11:0e:31:91:69:f6:16: + 27:06:f7:33:68:18:0b:5d:63:5f:8b:e8:bc:d6:00:57 +-----BEGIN CERTIFICATE----- +MIIDADCCAqigAwIBAgIJAPnsSC3QpElsMAkGByqGSM49BAEwgYsxCzAJBgNVBAYT +AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYD +VQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5j +b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEzMTAyMjA0MDI0 +NVoXDTE2MDcxODA0MDI0NVowgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNo +aW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYDVQQKEwdFbGlwdGljMQwwCgYD +VQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW +DmluZm9AeWFzc2wuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuzOsTCdQ +SsZKpQTDPN6fNttyLc6U6iv6yyAJOSwW6GEC6a9N0wKTmjFbl5Ihf/DPGNqREQI0 +huggWDMLgDSJ2KOB8zCB8DAdBgNVHQ4EFgQUXV0m76x+NvmbdhUrSiUCI++yiTAw +gcAGA1UdIwSBuDCBtYAUXV0m76x+NvmbdhUrSiUCI++yiTChgZGkgY4wgYsxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxl +MRAwDgYDVQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55 +YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkA+exILdCk +SWwwDAYDVR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCIDYUO8gZQ4e5Paoybxia +TgcMR2zh3If9rfQscewEuslYAiBlTmfuaCbtHAMRDjGRafYWJwb3M2gYC11jX4vo +vNYAVw== +-----END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-key.pem b/project1/cyassl-3.0.0/certs/server-key.pem new file mode 100644 index 00000000..d1627f4d --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7 +qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf +P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj +xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk +wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC +Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv +n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd +x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y +oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz +0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB +QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD +LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8 +ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8 +yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT +3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N +zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB +hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv +VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB +qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf +H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza +1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ +c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe +9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY +dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n +WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA= +-----END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyEnc.pem b/project1/cyassl-3.0.0/certs/server-keyEnc.pem new file mode 100644 index 00000000..e5ab57d4 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-keyEnc.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-CBC,136C7D8A69656668 + +jvNTyPaztxPIoAzbdmZnD0Zw2+60tMxNc0GMHNmeOyG25aHP/dT+TWiKFpFVkkkY +uoCIhYUyw7gmpw+CnRJwWd+ans4nrvAjwy5oWJvarvsyUpjqvnPoIlAqd+d4TDKN +eESzcI76+gHdisAtCrQD+fGqgTZhli5TgDbnpasL/QnY2qDlutvakkVw7gPXe156 +2Phy8WN+efr65J6wt3K/dj7Datl9u4JeHQK81gYyWBVX+EagEjPGDzkFQCj9Z0q7 +8K3iB5GW1JAqJS0IfZPB40AnSTF/n1TL1SN3qfU3l7hTGNrx9o7580bgDEoAR7pI +F8eZlS15KHtZmh11AnU1KTKZ6kmgnNqeMTGMN6N0ct2wMKW1dV87eTDlF0oiR2ol +XwtFgKmrIjfpmzkdWjbJmWnGMjD56KdiFZga/ZyKMsPrVoYLgfJEpn36iQspfygx +HCGNTf0PjIsjEWU0WyQiF86t+c45W3wNFsv/AxVyfMl+su02yrd6u2ecuQDir3Cs +b2k8IKtQgVe/NIpEWLKuiHG5oedIPPQyDYK5uq+gHxCGeOoKnWlsWFEHZRiza4X5 +tbgTrJB8Sw0ENWrvVGGmQZN4pSImlsMwzQ2qik5CQ00N1b3+56/obn0z75I3bUSb +tC5g8DRjl6oclAenNgh/MYMT287y5W2dD4npxHcekX4O3J2CDXNfg4vV2j5GRxtg +LVJdYE2p7bpYePCDHrYng8b9ubBprx0CrEnkIvvtUjzNPf6VDL0+MBKl+XgR2/nz +iRqTuZnlGGOyM+KYDwXpgwfs/HfvFGksxTAlO/40GkGh+WGPaIoNyCK0SgQKhyb4 +JIkR0vd2/yLg3lWMJrGwh7A0Gm07Z/781oURP3uWd+PaCOgGcd5ipcAjcEyuxNly +AthipWqmQWUcbf6Z2N9j3OA22Hv2Uzk8HSfi9VOZtL9svdEEZ0NnOekJgnc6stQp +bXiknlK/T5WdrWxSyCfgUq68Vf6DFfIRAVuFdJ3WHT2wVXHrDfft6D+Ne/XCxPoE +8zGmkyusaph33UHQ1oNyUbLbwcDCDSmOo8gYoedD3IwxtMA3wJRugomqosItwV8X +vkgmcy8eSE/+gZUxJEN2gnLcfKFhCkC80J6oFhmoDD6vuUnPHcFdKZgVPw2rzPk5 +Vb1kX+gpORplYmKpq1vz/ujscL4T0TmYLz02hkIS4edpW55ncTTv7JWefpRiTB1J +RB3td3me4htqR+YIDWJ+emrOmqsCG2WvpAS+MTw2mj1jYk9LL/ZYobTjSCEWmuwT +yVK6m303irR7HQDauxhslRFgoK21w63viOyj5NKIU1gQtaAANGDxcgORC1XLjjgt +oNutSQA+7P42vfHSHK4cnTBXl6V32H/GyVpdHQOZqSrqIjgLmUZodSmRPROxosZF +a46B1O7m/rJFxkiKW4vod+/WqjoE0Hhfrb8rRrkRjzGeCqqSSnQ3vrunVkvF8hlA +b6FOv4ZBJL4piC1GKH+rscqke9NEiDqXN8C3iYz86jbck/Ha21yUS8T3X7N52sg+ +B3AmOGnLK6BebYeto9vZxQjacChJZSixSxLV+l9/nVQ0+mW42azHdzk0ru59TGAj +-----END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem new file mode 100644 index 00000000..a24c5a26 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDAlQjhV0HycW23 +0kVBJwFlxkWu8rwkMLiVzi9O1vYciLx8n/uoZ3/+XJxRdfeKygfnNS+P4b17wC98 +q2SoF/zKXXu64CHlci5vLobYlXParBtTuV8/1xkNJU/hY2NRiwtkP61DuKUcXDSz +rgCgY8X2fwtZaHhzpowYqQJtr8MZAS64EOPGzEC0aaNGM2mHbsS7F6bz6N2tc7x7 +LyG1/WZRDL1Us+FtXxy8I3PRCQOJFNIQuWTDKtChlkq84dQaW8egwMFjeA9ENzAy +loAyI5Whd7oT0pdz4l0lyWoNwzlgpLSwaUJCCenYCLwzILNYIqeq68Th5mGDxdKW +39nQT63XAgMBAAECggEBAJrQNA9SYgVQAe+f7WRuwsTaGvKE15IQSJLE6Wrri3Vs +xnk48slySoZkVJV3y8OanbfUHaQAyJ5O5N3HumcWwXS8qdaUjyswGvvt3yEFI9lK +Ob2Ya2WauNzEfe6mQxUuPb4dImAqczDVPtiirIZDLsT1ZF4/iXUPEdhRJU6f2Kqj +zmCz4orZfhvwZMqaWwULW6rL5eM/bjIiBfPQ+u90UoHiX3TTvf8xg0V1+mN6ly7W +thnGkibkKAZQUA54Lql4DRSXtBLYMUCroQFBwjD4B18W5GF30mDyn43o9LrrY94q +l4HvTGzmVTRRKyg09FMcxFgKP7uvtfdKhUMtPPFYWIECgYEA8ixUdjkjY8kQMreT +ra++GXWWgWTmtbiJQkHRbdAcG/gbrGnLNjxkfdz0GbjDYLFXSF9ST1k6VX8ywBlD +UD+uzm8X8w6fQMpOrRU7yXnpwFk4c3CcCnzJOkgyp9hJdQqFwsL9FXPamQkqaZqf +CnG/sASmjHpab0haVDvGsVMX3+cCgYEAy5PedxVdt1xcfNiQqZgt1mkOY7Oj3KbM +i2qkohKMjntILLJLN9wGGH3q/nah1KHpPw3NG1+vX56WW1sPoXyvs5uQ21dzOu2w +I0SuQU8fB0ITI0zL+vQUpNX3njZ8W5+oPMGFX3TSOS3/0ITf+7Mgei6bF67muguu +X1OkUu0bxJECgYEA7Jjau9X++VJKfQJVSW9VblIvhKMrs4Zis1TSY1La44h2oO+L +FaXTGBRyd17HowQfnhlitRsbnsPytTL5TMGq6wwmfdRfSlFcpEUGcESnVsDUIhR2 +nthjUImQ0+K/gZWSMUGHORpDCxilUx85Gl8fQ7yHat9u0yIA/iKYcE4aGSkCgYEA +ikFWKFGeX9SeCzuYo1TybFbUqulpM4UkDNrUDC3Ev08CaTh81ObcTO3XFhHDPgDn +wybAUQLeu3Wcb1acevOO78+KxSvS2gZqRMlz/m6Zh/hbvvF85mW1T2zwycX/FsqL +GxfiWD2iN6sBvL9AzlOMju3v7lmd4GPmfF71jkvxO8ECgYBNRflAjMVb9CoairTy +HKxr6QxWNrdOcpbV5YrS4v/x8RgTPYYJuNh2p8kccVKUMEPg8Xh0/WEbTAnM5mgq +ca0c30O8VtulpL41cKRez0/8AFWZOj0jz2da9SL4tSnQRBHrNS5Gvv2OGLJfqL8Z +MqH13APmfJofDHypsA4hNzvxsA== +-----END PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem new file mode 100644 index 00000000..4be31a32 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem @@ -0,0 +1,29 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIE6TAbBgkqhkiG9w0BBQMwDgQIr3AyvPqfFRQCAggABIIEyPUs6wCboqtKmExH +zfez3vfHn2cp6s3X563Bz73hYn/8vXtI/q0oDNOpgav60/N7rMy50fno3LmW0/6E ++UN4MwofmBS3lp1ZVY3KmzDy6lz5vcFo4GCCj+X6dacsyBQ4lFOge5BihQ3R9cKt +dSrd1EFKwGGu3qTDG7ajTZukmYjxuRqpyHqPO5OJO7yXxHOB7B7sSKIyJRCkkucd +oBC86kQdWraweSYj+Klza6VjKzmNzDBx9Fyhrj9XGXJ3rJLhjgNpelwX+PIMU31i +/yklI4jm0aMSoAvXgdBXZuOsnsI27GXxy//i7AOgLLWi+Bu4dJSSl5PMtespf83u +5jSysJymXiNcN6vEautGyjCujdMs5c/FEMbgubAMXymCI9DsAN+5dNMDY8Zrfqdl +hFKfctcu8BxFa+0tavJ28fOEBuEyJLsQ9OvvS7dn4AV502JRKWObfsw7fi+mMzMu +oxhYo99MRqic6a9uDmYB3SPeU31eOHiEi0n51D7Gtcn++F+IaDFwSHMirThzakGn +go3nj0yq62euzVcEuhIfTTAe3F2tqzpzznVFbs1XgrGVREJ6gp5vRgMUUGYIqQir +p5oW0HVRI4iuoSjdN4/wNAxIP9zakwYx+vWx1VXhDVEJfgNmxDRvEbF+OOz+iJCf +7A2e8L+kZ/5oC3HO8h7GdHNTUjRRdh8FUM8lGo+HbMYDznMy/bJlIP2bx9hIIha7 +U70i09glS2Z7Ei+VecJbvFzdro0vdYyGO2ef8bWwCc5JMucxDcRklWdUxK6amKJN +VpXL3TW0VYCfr1rLmZXUfBGk/KXM20/BoM04WLjeR3oiV/2b7SYK7GnJ7kBmAHHx +gnrwMDO3JvH89CwlHRizVSQl59ViqEMGLmbHThcMqkEOkFphB2xox7/IOVyp6cFn +mY0ZCrbhdX+L6t5jiyq/4us5bzF7FOBYsJr6n1Rm9b8eeOL693y/6uM3CvTJcTOb +5RqWiHgTgmefeOeUQ0/dVgvEOIWz2yqBQmHKiB4+0CGGIRwUOXBrTKSLilumsjQe +qGhJ6yw25VIpdXsMD1WVviczgRTNYjdldIJoHQdvpCEAhQ1RR3rkuIPniTumJFmY +CnjfNqjtkaZWIN1nOCmcu50tswksWEEFEfkcP1xyzhr3EVCYAoFncLTp5vHBtdmg +6KBdar40/OFGAcbDGDX1g3XEEi6jHmy0Lyz7M3DwESgaMgwzscsQLr+wMITk1IUN +yfiXHl1CQjGxhDj8KoAhdDjjPENkSlCSd1vEO+lg1/IFb1dtnL2DJp6BQt9/VLHo +Fp3pdZ7r95H20+pEhCZp0HXLNo1o8xjJQ5RWUCs1Zc1cauDOAh8lAjps6MBxTa3a +LOgTW9lgiAQ+S1g2jK4BmqbLvZUF+Z6xupc8uE3E3HhJolmDRYojMNFNmmvODa8M +CneWmj3T1KvqEToAIq46mStlTfQufSMpaJ73Wds4gmIiGwn5hIuUN6f3kybbt4f2 +4DLZXMcjYweLi9tJtFC+JaO0rS5gtX/k/ys1QSblSU5qfRu1XfwNAcZO1ReKgGYN +ymI78cSACGIcEvAwin8CdRu3W99NbMqHW9AcCETFlTsC3wNlQxyYSem75sjPaWVF +sxLy7YxEJ8tDEJZbSQ== +-----END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem new file mode 100644 index 00000000..a1e43887 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem @@ -0,0 +1,29 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIE5TAcBgoqhkiG9w0BDAEBMA4ECFytdly5R2o9AgIIAASCBMOa6fgAUIR5GokK +Z81YZMxC3sNqAwjLEkOwmez2za2fq+2mw6T8tB5W75lFpWyXD1MDPa1PpLzyw27c +d2C8nipCzp37yYLmXr+aS519CBJR80ily/WLcdv+ScsA6pjOEW2p+VDY55jFp2pr +n94/K2nFQpMxAdjxnqQCF5ewMLqzy3o3s6U3V9zIxy/xlLYi//UWFI8fqtOikqs4 +apWLNqJONRZq95OITKO/Nhz7GyEfjrewJmv4zVToEnSagSwbR4IVFn5Lok8rSpI9 +qwey9wsB1CguVwR0O2NjDVKUGXinfhdr+zMQlCoz+xY/Q1TkH4gEY5wpln4cBvtm +PL/BnD4wEWHh8vS61wfOQ7wPgY+cdCe75stTrKzc6amVJB+40Qi3Vt4TEPGwcP16 +/qGl0zpYuAgilPtuEBw3GX3LiigpHmSt43D3DiYNGzv+Aran2Ei9iGSGeI2zHz8r +WFZEnptAwlqeyL7+MZjAOXlu6QG1yix8HvZLmtBHrE2MhuR4KbS3fAUCNQpn8OKu +zxYzs1ti5F2V4c9yK63gSz3H1ObRNsM2OkpUbSVGqLUN6a8HsI6yYh4we6q0gxKD +VGdzEz4S1BFEBfXWVSPnRNMR4YD8kiQEPutUZFLiWWZ7WliH5yNfHZUia8dovxFa +MWmAbSjMKRGvV+LvAGQHYBVfJSQO6VvBfBDtu0H4rLr8urmcPY+hbw1XxGfKSQp1 +iIdvVwjefl8wM9LSRsvqY5l4mu+XDPanQlFbzKBOSyLQts97ys3AR+jkK8Bmv14l +xmCF8bJzzz5a2wAqbPhWIbk4J4VfcJEXNMzd19w4SxGv9fUXNiZZElUdNE+wtRsQ +YvACYn9sZ6JUwg9hNTLXuXZY47LuQrrdTDHupoVA9zLvUYMKgO+pjwS8uy1dLQao +0aztHLZEXuVJvpiRoMtYZl37ZNoLHQJeZUNyNATshAoD1+uSc7aywl8yqdTzXRR2 +g0rkExXEVJ5OPyzbFdOQSC5HoOC7dInIBmkrSFEJMKDkMzwYI+uSoIbn+8i+Gjzy +Vh3/lftts/BIvr4NAh1ZAq/215jZSdAGo+1VZeuBeybwh3RBdBl8PhDBviTvbxSk +P+F1T+UcbAz9bgjQJgNvDb9XHNI8rfEhfDPX/Pr4VvxBZNndmRJVQDKi23YD/7yF +WAwXy418M7DPqp7NYmUHFe7JRm9bHk41EeknLZaZGW5qHwQKA10RoJCgjoOIFTsd +kD3Qq/0mEuOiuJn5UPE19xtUpvFWamDf3s3zSHM7VJ+gGNrS/WbQ+KmTimj0Wucd +2vWiNCGbhWwmp3LLKQlB5xDwXJy099SZUUkgcxGmfcT7FOpd3QSLYnwtPz8uLW0N +76zbiUTYCQ/ASLrwcKFGCKKBz62DlRreK23E/RjqkKKCVFzzg8AzQTa02ml+wQyG ++5EOwEF2yIrhV0p4hY/GDAIe3cdchiy1EQf6xH/IxPF/QsKNp0CfHVPgdFwLzjM2 +oFD3analGblxp9CMiDbiKTOdFPL8XcguufqpWra2jtUbe07HQaeU2NcM2TeB2KsU +PhgBwgdNxW69K55iHReaZtuLw0GhD+KBrm7gSteVniiYLzLKzxmMycGGtoNwpbGi +MMJBE+BYZylG +-----END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem new file mode 100644 index 00000000..297f2a02 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem @@ -0,0 +1,30 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIxaI9IblN3acCAggA +MBQGCCqGSIb3DQMHBAi7kwdRvCrqMgSCBMjkSOSVfmu42O0q2GzFrJVr3cam9ZKe +InQsxqtgADdBxMgJJVnr360tUNPQyyvfCH//Duhz+aJIC0MQZkWR3ZSy5pfHX+vr +C3wd741VOlI44uEdzRktlPc11saMDyKS04/K9aaYIDqspOiobt9WZLQildXl1n8j +N+7Laj7A/vxJ5GUJ4hdPwQOIeuJXTDDzn+Ld12XXGH+Iw1M5Cx3tBw1TNizSnmXQ +vf/MsfsWsZbHBppCXZbF27jJA+6Bg7dGT0OZM0pI+ZQvyHr+qjog0hollY9KjwTG +h+hsM7umWFJdeRMrmkTrX/R9HY/c5I4ExNSp1AtMmFeeU8h2VTJtYcoykUU1q2pF +KHfjPghwmYromQGR4nPA9sqa9s+VMq9OaqoJDoBwNobdFr7sEtMLT08vTa0+rMX7 +bmjAF44/dVBYpBxXjTQ0pXVeb24Q00Sn6NOI4fTsBnkR+WTtuwz/L0qaGnJlh10y +sQ3+95cUtZc3SZS67yYUx5auswqT3V4JCmhJcHNi+/jHyrj9D8nVWibQ2TBmgUf+ +0NzvdKb7sraEx7PSgFWDMLoQrd2+cqsJArpY9TbLSLhBDrOVc8v/lXYuK6QI0gMd +HIwAZARUZMoI3WS6icTLYyLdQPMsFzI6U0arkbrdhjNNd3kVqeFEJ+oF0rkuAcJJ +K8eUcsby1AIBS/9tuW1gSYubmuXsZX8xbYbJnHUqGOTAVa7jo8eVUTiyUfPXa+0N +s1tTpZXtOOlqncZ08mPHppshdKF2cpuh0JNjiR6fHvXytGWFGMsKtxdwKs/14UCg +qoTW0EQU4ONfBxR2PtX8PlNV4bOt704HP8Vc0H9JV2uWpJaLRzY2bBiPgKcrO9Eh +83zFrPu/0obBQTxnP3mMihxvCndflHQqeJ0V1YYw9n4+XbgBqULXDQs7OetRohnY +gYyc//NdC2I8mbdabFYvUTWSH6oMA6lqkwTjTTwtn5E8BJkRi1sIq4jNFUekpm2T +5AwP7xWn//PM+B12CPoIgYtYT6Yhbf8arXuGU28y1Ahhi/hKcpR9HRPQeyaR62vi +skjjycfn38wcj0WrIVnOceGgPa3EBrkkTaPUHvMQ5G/xzMZ82o3CnmwdnH+lp3eg +TLcLm8Yp9InkMJNVOrGLxFvmTljl3h9x2JVuE0wtuWt91QVmfCZo0k3Cx46ad7xB +eK20veTy+PySy2U3W1twGfsXXXRwaQiXXRrgPciK0LcGXZneShZuebk04U31sq4F +rYaMAzIDDmvwbjh+UpNcl1VdBDGGePxzzOD3HHYPbm240HVMPuS85P2kFjak3PdJ +GqsRUS1SRp1e451aFGjzggPLXFjAfDMaxrgjSWapRzu78i+xvcvf69979oX0KO9Y +KMSC14RnmnT1+UdKxX+p9r1AwfH/vJxM34AOSva1uLiSJckRGYGOzuaYsTT9ZAx/ +q3CNALF4qFUMWmJnvQDYmCUnw6lJl3CazbtV5RI2ILQX6ZHR6YAHT5hYY43k+AnZ +mFW6BGKoX/f4iVqYtjQWiGWAJAf6C9+548O2t9MiVcgQf4Nvj6lFLM00pzFn7jW4 +DsDFUBmmrSF8wfR7SRpOc/ViVZBRleYPLsMu0tmD29fowqqBY0MEkxqSahFAGTgk +sao= +-----END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/taoCert.txt b/project1/cyassl-3.0.0/certs/taoCert.txt new file mode 100644 index 00000000..15a12c05 --- /dev/null +++ b/project1/cyassl-3.0.0/certs/taoCert.txt @@ -0,0 +1,173 @@ + +***** Create a self signed cert ************ + +1) openssl genrsa 512 > client-key.pem + +2) openssl req -new -x509 -nodes -md5 -days 1000 -key client-key.pem > client-cert.pem + +3) note sha1 would be -sha1 + +-- adding metadata to beginning + +3) openssl x509 -in client-cert.pem -text > tmp.pem + +4) mv tmp.pem client-cert.pem + + +***** Create a CA, signing authority ********** + +same as self signed, use ca prefix instead of client + + +***** Create a cert signed by CA ************** + +1) openssl req -newkey rsa:512 -md5 -days 1000 -nodes -keyout server-key.pem > server-req.pem + +* note if using exisitng key do: -new -key keyName + +2) copy ca-key.pem ca-cert.srl (why ????) + +3) openssl x509 -req -in server-req.pem -days 1000 -md5 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem + + +***** Adding Subject Key ID and Authentication Key ID extensions to a cert ***** + +Create a config file for OpenSSL with the example contents: + + [skidakid] + subjectKeyIdentifier=hash + authorityKeyIdentifier=keyid + +Add to the openssl command for creating a cert signed by a CA step 3 the +following options: + + -extfile -extensions skidakid + +anywhere before the redirect. This will add the cert's public key hash as the +Subject Key Identifier, and the signer's SKID as the Authentication Key ID. + + +***** To create a dsa cert ******************** + +1) openssl dsaparam 512 > dsa512.param # creates group params + +2) openssl gendsa dsa512.param > dsa512.pem # creates private key + +3) openssl req -new -x509 -nodes -days 1000 -key dsa512.pem > dsa-cert.pem + + + + +***** To convert from PEM to DER ************** + +a) openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER + +to convert rsa private PEM to DER : + +b) openssl rsa -in key.pem -outform DER -out key.der + + +**** To encrypt rsa key already in pem ********** + +a) openssl rsa server-keyEnc.pem + +note location of des, pass = yassl123 + + +*** To make a public key from a private key ****** + + +openssl rsa -in 1024rsa.priv -pubout -out 1024rsa.pub + + +**** To convert to pkcs8 ******* + +openssl pkcs8 -nocrypt -topk8 -in server-key.pem -out server-keyPkcs8.pem + + +**** To convert to pkcs8 encrypted ******* + +openssl pkcs8 -topk8 -in server-key.pem -out server-keyPkcs8Enc.pem + +passwd: yassl123 + +to use PKCS#5 v2 instead of v1.5 which is default add + +-v2 des3 # file Pkcs8Enc2 + +to use PKCS#12 instead use -v1 witch a 12 algo like + +-v1 PBE-SHA1-RC4-128 # file Pkcs8Enc12 , see man pkcs8 for more info + + +**** To convert from pkcs8 to traditional **** + +openssl pkcs8 -nocrypt -in server-keyPkcs8.pem -out server-key.pem + + +*** DH paramters *** + +openssl dhparam 2048 > dh2048.param + +to add metadata + +openssl dhparam -in dh2048.param -text > dh2048.pem + +**** ECC ****** + +1) make a key + + to see types available do + openssl ecparam -list_curves + + make a new key + openssl ecparam -genkey -text -name secp256r1 -out ecc-key.pem + + +*** CRL *** + +1) create a crl + +a) openssl ca -gencrl -crldays 120 -out crl.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem + +Error No ./CA root/index.txt so: + +b) touch ./CA root/index.txt + +a) again + +Error No ./CA root/crlnumber so: + +c) touch ./CA root/crlnumber + +a) again + +Error unable to load CRL number + +d) add '01' to crlnumber file + +a) again + +2) view crl file + +openssl crl -in crl.pem -text + +3) revoke + +openssl ca -revoke server-cert.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem + +Then regenerate crl with a) + +4) verify + +openssl verify -CAfile ./ca-cert.pem ./server-cert.pem + +OK + +Make file with both ca and crl + +cat ca-cert.pem crl.pem > ca-crl.pem + +openssl verify -CAfile ./ca-crl.pem -crl_check ./ca-cert.pem + +revoked diff --git a/project1/cyassl-3.0.0/config.h b/project1/cyassl-3.0.0/config.h new file mode 100644 index 00000000..e2a524e7 --- /dev/null +++ b/project1/cyassl-3.0.0/config.h @@ -0,0 +1,176 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 to enable debugging code. */ +#define DEBUG 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `gethostbyname' function. */ +#define HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `inet_ntoa' function. */ +#define HAVE_INET_NTOA 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `network' library (-lnetwork). */ +/* #undef HAVE_LIBNETWORK */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +/* #undef HAVE_LIBPTHREAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PCAP_PCAP_H */ + +/* Define if you have POSIX threads libraries and header files. */ +#define HAVE_PTHREAD 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "cyassl" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "cyassl 3.0.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "cyassl" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://www.wolfssl.com" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.0.0" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* If the compiler supports a TLS storage class define it to that here */ +#define TLS __thread + +/* Define if the code was built from VCS. */ +#define VCS_CHECKOUT 0 + +/* VCS system */ +#define VCS_SYSTEM "none" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ diff --git a/project1/cyassl-3.0.0/config.in b/project1/cyassl-3.0.0/config.in new file mode 100644 index 00000000..b61290fe --- /dev/null +++ b/project1/cyassl-3.0.0/config.in @@ -0,0 +1,175 @@ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define to 1 to enable debugging code. */ +#undef DEBUG + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `gethostbyname' function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `inet_ntoa' function. */ +#undef HAVE_INET_NTOA + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `network' library (-lnetwork). */ +#undef HAVE_LIBNETWORK + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PCAP_PCAP_H + +/* Define if you have POSIX threads libraries and header files. */ +#undef HAVE_PTHREAD + +/* Have PTHREAD_PRIO_INHERIT. */ +#undef HAVE_PTHREAD_PRIO_INHERIT + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#undef HAVE_VISIBILITY + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#undef PTHREAD_CREATE_JOINABLE + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* If the compiler supports a TLS storage class define it to that here */ +#undef TLS + +/* Define if the code was built from VCS. */ +#undef VCS_CHECKOUT + +/* VCS system */ +#undef VCS_SYSTEM + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +#undef _UINT8_T + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +#undef uint8_t diff --git a/project1/cyassl-3.0.0/config.log b/project1/cyassl-3.0.0/config.log new file mode 100644 index 00000000..62f6ad64 --- /dev/null +++ b/project1/cyassl-3.0.0/config.log @@ -0,0 +1,2438 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cyassl configure 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ ./configure --enable-dtls + +## --------- ## +## Platform. ## +## --------- ## + +hostname = khimes-TravelMate-X483 +uname -m = i686 +uname -r = 3.13.0-24-generic +uname -s = Linux +uname -v = #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 + +/usr/bin/uname -p = unknown +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/local/sbin +PATH: /usr/local/bin +PATH: /usr/sbin +PATH: /usr/bin +PATH: /sbin +PATH: /bin +PATH: /usr/games +PATH: /usr/local/games + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:2943: checking build system type +configure:2957: result: i686-pc-linux-gnu +configure:2977: checking host system type +configure:2990: result: i686-pc-linux-gnu +configure:3028: checking for a BSD-compatible install +configure:3096: result: /usr/bin/install -c +configure:3107: checking whether build environment is sane +configure:3162: result: yes +configure:3313: checking for a thread-safe mkdir -p +configure:3352: result: /bin/mkdir -p +configure:3359: checking for gawk +configure:3389: result: no +configure:3359: checking for mawk +configure:3375: found /usr/bin/mawk +configure:3386: result: mawk +configure:3397: checking whether make sets $(MAKE) +configure:3419: result: yes +configure:3448: checking whether make supports nested variables +configure:3465: result: yes +configure:3545: checking whether UID '1000' is supported by ustar format +configure:3548: result: yes +configure:3555: checking whether GID '1000' is supported by ustar format +configure:3558: result: yes +configure:3566: checking how to create a ustar tar archive +configure:3577: tar --version +tar (GNU tar) 1.27.1 +Copyright (C) 2013 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later . +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by John Gilmore and Jay Fenlason. +configure:3580: $? = 0 +configure:3620: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar +configure:3623: $? = 0 +configure:3627: tar -xf - &5 +Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) +Target: i386-pc-linux-gnu +Thread model: posix +configure:4208: $? = 0 +configure:4197: clang -v >&5 +Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) +Target: i386-pc-linux-gnu +Thread model: posix +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8.2 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9.0 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.2 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 +... rest of stderr output deleted ... +configure:4208: $? = 0 +configure:4197: clang -V >&5 +clang: error: argument to '-V' is missing (expected 1 value) +clang: error: no input files +configure:4208: $? = 1 +configure:4197: clang -qversion >&5 +clang: error: unknown argument: '-qversion' +clang: error: no input files +configure:4208: $? = 1 +configure:4228: checking whether the C compiler works +configure:4250: clang conftest.c >&5 +configure:4254: $? = 0 +configure:4302: result: yes +configure:4305: checking for C compiler default output file name +configure:4307: result: a.out +configure:4313: checking for suffix of executables +configure:4320: clang -o conftest conftest.c >&5 +configure:4324: $? = 0 +configure:4346: result: +configure:4368: checking whether we are cross compiling +configure:4376: clang -o conftest conftest.c >&5 +configure:4380: $? = 0 +configure:4387: ./conftest +configure:4391: $? = 0 +configure:4406: result: no +configure:4411: checking for suffix of object files +configure:4433: clang -c conftest.c >&5 +configure:4437: $? = 0 +configure:4458: result: o +configure:4462: checking whether we are using the GNU C compiler +configure:4481: clang -c conftest.c >&5 +configure:4481: $? = 0 +configure:4490: result: yes +configure:4499: checking whether clang accepts -g +configure:4519: clang -c -g conftest.c >&5 +configure:4519: $? = 0 +configure:4560: result: yes +configure:4577: checking for clang option to accept ISO C89 +configure:4640: clang -c -g -O2 conftest.c >&5 +configure:4640: $? = 0 +configure:4653: result: none needed +configure:4678: checking whether clang understands -c and -o together +configure:4700: clang -c conftest.c -o conftest2.o +configure:4703: $? = 0 +configure:4700: clang -c conftest.c -o conftest2.o +configure:4703: $? = 0 +configure:4715: result: yes +configure:4734: checking dependency style of clang +configure:4845: result: gcc3 +configure:4860: checking for a sed that does not truncate output +configure:4924: result: /bin/sed +configure:4942: checking for grep that handles long lines and -e +configure:5000: result: /bin/grep +configure:5005: checking for egrep +configure:5067: result: /bin/grep -E +configure:5072: checking for fgrep +configure:5134: result: /bin/grep -F +configure:5169: checking for ld used by clang +configure:5236: result: /usr/bin/ld +configure:5243: checking if the linker (/usr/bin/ld) is GNU ld +configure:5258: result: yes +configure:5270: checking for BSD- or MS-compatible name lister (nm) +configure:5319: result: /usr/bin/nm -B +configure:5449: checking the name lister (/usr/bin/nm -B) interface +configure:5456: clang -c -g -O2 conftest.c >&5 +configure:5459: /usr/bin/nm -B "conftest.o" +configure:5462: output +00000000 B some_variable +configure:5469: result: BSD nm +configure:5472: checking whether ln -s works +configure:5476: result: yes +configure:5484: checking the maximum length of command line arguments +configure:5614: result: 1572864 +configure:5631: checking whether the shell understands some XSI constructs +configure:5641: result: yes +configure:5645: checking whether the shell understands "+=" +configure:5651: result: yes +configure:5686: checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format +configure:5726: result: func_convert_file_noop +configure:5733: checking how to convert i686-pc-linux-gnu file names to toolchain format +configure:5753: result: func_convert_file_noop +configure:5760: checking for /usr/bin/ld option to reload object files +configure:5767: result: -r +configure:5841: checking for objdump +configure:5857: found /usr/bin/objdump +configure:5868: result: objdump +configure:5900: checking how to recognize dependent libraries +configure:6102: result: pass_all +configure:6187: checking for dlltool +configure:6217: result: no +configure:6247: checking how to associate runtime and link libraries +configure:6274: result: printf %s\n +configure:6335: checking for ar +configure:6351: found /usr/bin/ar +configure:6362: result: ar +configure:6399: checking for archiver @FILE support +configure:6416: clang -c -g -O2 conftest.c >&5 +configure:6416: $? = 0 +configure:6419: ar cru libconftest.a @conftest.lst >&5 +configure:6422: $? = 0 +configure:6427: ar cru libconftest.a @conftest.lst >&5 +ar: conftest.o: No such file or directory +configure:6430: $? = 1 +configure:6442: result: @ +configure:6500: checking for strip +configure:6516: found /usr/bin/strip +configure:6527: result: strip +configure:6599: checking for ranlib +configure:6615: found /usr/bin/ranlib +configure:6626: result: ranlib +configure:6728: checking command to parse /usr/bin/nm -B output from clang object +configure:6848: clang -c -g -O2 conftest.c >&5 +configure:6851: $? = 0 +configure:6855: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:6858: $? = 0 +configure:6924: clang -o conftest -g -O2 conftest.c conftstm.o >&5 +configure:6927: $? = 0 +configure:6965: result: ok +configure:7002: checking for sysroot +configure:7032: result: no +configure:7288: checking for mt +configure:7304: found /bin/mt +configure:7315: result: mt +configure:7338: checking if mt is a manifest tool +configure:7344: mt '-?' +configure:7352: result: no +configure:7994: checking how to run the C preprocessor +configure:8025: clang -E conftest.c +configure:8025: $? = 0 +configure:8039: clang -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:8039: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| /* end confdefs.h. */ +| #include +configure:8064: result: clang -E +configure:8084: clang -E conftest.c +configure:8084: $? = 0 +configure:8098: clang -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:8098: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| /* end confdefs.h. */ +| #include +configure:8127: checking for ANSI C header files +configure:8147: clang -c -g -O2 conftest.c >&5 +configure:8147: $? = 0 +configure:8220: clang -o conftest -g -O2 conftest.c >&5 +configure:8220: $? = 0 +configure:8220: ./conftest +configure:8220: $? = 0 +configure:8231: result: yes +configure:8244: checking for sys/types.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for sys/stat.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for stdlib.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for string.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for memory.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for strings.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for inttypes.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for stdint.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8244: checking for unistd.h +configure:8244: clang -c -g -O2 conftest.c >&5 +configure:8244: $? = 0 +configure:8244: result: yes +configure:8258: checking for dlfcn.h +configure:8258: clang -c -g -O2 conftest.c >&5 +configure:8258: $? = 0 +configure:8258: result: yes +configure:8463: checking for objdir +configure:8478: result: .libs +configure:8749: checking if clang supports -fno-rtti -fno-exceptions +configure:8767: clang -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 +configure:8771: $? = 0 +configure:8784: result: yes +configure:9111: checking for clang option to produce PIC +configure:9118: result: -fPIC -DPIC +configure:9126: checking if clang PIC flag -fPIC -DPIC works +configure:9144: clang -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 +configure:9148: $? = 0 +configure:9161: result: yes +configure:9190: checking if clang static flag -static works +configure:9218: result: yes +configure:9233: checking if clang supports -c -o file.o +configure:9254: clang -c -g -O2 -o out/conftest2.o conftest.c >&5 +configure:9258: $? = 0 +configure:9280: result: yes +configure:9288: checking if clang supports -c -o file.o +configure:9335: result: yes +configure:9368: checking whether the clang linker (/usr/bin/ld) supports shared libraries +configure:10521: result: yes +configure:10558: checking whether -lc should be explicitly linked in +configure:10566: clang -c -g -O2 conftest.c >&5 +configure:10569: $? = 0 +configure:10584: clang -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep -lc \>/dev/null 2\>\&1 +configure:10587: $? = 0 +configure:10601: result: no +configure:10761: checking dynamic linker characteristics +configure:11272: clang -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 +configure:11272: $? = 0 +configure:11494: result: GNU/Linux ld.so +configure:11601: checking how to hardcode library paths into programs +configure:11626: result: immediate +configure:12166: checking whether stripping libraries is possible +configure:12171: result: yes +configure:12206: checking if libtool supports shared libraries +configure:12208: result: yes +configure:12211: checking whether to build shared libraries +configure:12232: result: yes +configure:12235: checking whether to build static libraries +configure:12239: result: no +configure:12334: checking for g++ +configure:12350: found /usr/bin/g++ +configure:12361: result: g++ +configure:12388: checking for C++ compiler version +configure:12397: g++ --version >&5 +g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 +Copyright (C) 2013 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:12408: $? = 0 +configure:12397: g++ -v >&5 +Using built-in specs. +COLLECT_GCC=g++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper +Target: i686-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu +Thread model: posix +gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) +configure:12408: $? = 0 +configure:12397: g++ -V >&5 +g++: error: unrecognized command line option '-V' +g++: fatal error: no input files +compilation terminated. +configure:12408: $? = 4 +configure:12397: g++ -qversion >&5 +g++: error: unrecognized command line option '-qversion' +g++: fatal error: no input files +compilation terminated. +configure:12408: $? = 4 +configure:12412: checking whether we are using the GNU C++ compiler +configure:12431: g++ -c conftest.cpp >&5 +configure:12431: $? = 0 +configure:12440: result: yes +configure:12449: checking whether g++ accepts -g +configure:12469: g++ -c -g conftest.cpp >&5 +configure:12469: $? = 0 +configure:12510: result: yes +configure:12535: checking dependency style of g++ +configure:12646: result: gcc3 +configure:12680: checking how to run the C++ preprocessor +configure:12707: g++ -E conftest.cpp +configure:12707: $? = 0 +configure:12721: g++ -E conftest.cpp +conftest.cpp:21:28: fatal error: ac_nonexistent.h: No such file or directory + #include + ^ +compilation terminated. +configure:12721: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +configure:12746: result: g++ -E +configure:12766: g++ -E conftest.cpp +configure:12766: $? = 0 +configure:12780: g++ -E conftest.cpp +conftest.cpp:21:28: fatal error: ac_nonexistent.h: No such file or directory + #include + ^ +compilation terminated. +configure:12780: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +configure:12949: checking for ld used by g++ +configure:13016: result: /usr/bin/ld +configure:13023: checking if the linker (/usr/bin/ld) is GNU ld +configure:13038: result: yes +configure:13093: checking whether the g++ linker (/usr/bin/ld) supports shared libraries +configure:14098: result: yes +configure:14134: g++ -c -g -O2 conftest.cpp >&5 +configure:14137: $? = 0 +configure:14657: checking for g++ option to produce PIC +configure:14664: result: -fPIC -DPIC +configure:14672: checking if g++ PIC flag -fPIC -DPIC works +configure:14690: g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5 +configure:14694: $? = 0 +configure:14707: result: yes +configure:14730: checking if g++ static flag -static works +configure:14758: result: yes +configure:14770: checking if g++ supports -c -o file.o +configure:14791: g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 +configure:14795: $? = 0 +configure:14817: result: yes +configure:14822: checking if g++ supports -c -o file.o +configure:14869: result: yes +configure:14899: checking whether the g++ linker (/usr/bin/ld) supports shared libraries +configure:14935: result: yes +configure:15076: checking dynamic linker characteristics +configure:15743: result: GNU/Linux ld.so +configure:15796: checking how to hardcode library paths into programs +configure:15821: result: immediate +configure:15868: checking whether the -Werror option is usable +configure:15887: clang -c -g -O2 -Werror conftest.c >&5 +configure:15887: $? = 0 +configure:15896: result: yes +configure:15898: checking for simple visibility declarations +configure:15925: clang -c -g -O2 -fvisibility=hidden -Werror conftest.c >&5 +configure:15925: $? = 0 +configure:15934: result: yes +configure:15967: checking whether make supports nested variables +configure:15984: result: yes +configure:15998: checking for gethostbyname +configure:15998: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:15998: $? = 0 +configure:15998: result: yes +configure:16009: checking for getaddrinfo +configure:16009: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16009: $? = 0 +configure:16009: result: yes +configure:16020: checking for gettimeofday +configure:16020: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16020: $? = 0 +configure:16020: result: yes +configure:16031: checking for inet_ntoa +configure:16031: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16031: $? = 0 +configure:16031: result: yes +configure:16042: checking for memset +configure:16042: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +conftest.c:49:6: warning: incompatible redeclaration of library function 'memset' [-Wincompatible-library-redeclaration] +char memset (); + ^ +conftest.c:49:6: note: 'memset' is a builtin with type 'void *(void *, int, unsigned int)' +1 warning generated. +configure:16042: $? = 0 +configure:16042: result: yes +configure:16053: checking for socket +configure:16053: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16053: $? = 0 +configure:16053: result: yes +configure:16064: checking arpa/inet.h usability +configure:16064: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16064: $? = 0 +configure:16064: result: yes +configure:16064: checking arpa/inet.h presence +configure:16064: clang -E -fvisibility=hidden conftest.c +configure:16064: $? = 0 +configure:16064: result: yes +configure:16064: checking for arpa/inet.h +configure:16064: result: yes +configure:16076: checking fcntl.h usability +configure:16076: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16076: $? = 0 +configure:16076: result: yes +configure:16076: checking fcntl.h presence +configure:16076: clang -E -fvisibility=hidden conftest.c +configure:16076: $? = 0 +configure:16076: result: yes +configure:16076: checking for fcntl.h +configure:16076: result: yes +configure:16088: checking limits.h usability +configure:16088: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16088: $? = 0 +configure:16088: result: yes +configure:16088: checking limits.h presence +configure:16088: clang -E -fvisibility=hidden conftest.c +configure:16088: $? = 0 +configure:16088: result: yes +configure:16088: checking for limits.h +configure:16088: result: yes +configure:16100: checking netdb.h usability +configure:16100: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16100: $? = 0 +configure:16100: result: yes +configure:16100: checking netdb.h presence +configure:16100: clang -E -fvisibility=hidden conftest.c +configure:16100: $? = 0 +configure:16100: result: yes +configure:16100: checking for netdb.h +configure:16100: result: yes +configure:16112: checking netinet/in.h usability +configure:16112: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16112: $? = 0 +configure:16112: result: yes +configure:16112: checking netinet/in.h presence +configure:16112: clang -E -fvisibility=hidden conftest.c +configure:16112: $? = 0 +configure:16112: result: yes +configure:16112: checking for netinet/in.h +configure:16112: result: yes +configure:16124: checking stddef.h usability +configure:16124: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16124: $? = 0 +configure:16124: result: yes +configure:16124: checking stddef.h presence +configure:16124: clang -E -fvisibility=hidden conftest.c +configure:16124: $? = 0 +configure:16124: result: yes +configure:16124: checking for stddef.h +configure:16124: result: yes +configure:16136: checking sys/ioctl.h usability +configure:16136: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16136: $? = 0 +configure:16136: result: yes +configure:16136: checking sys/ioctl.h presence +configure:16136: clang -E -fvisibility=hidden conftest.c +configure:16136: $? = 0 +configure:16136: result: yes +configure:16136: checking for sys/ioctl.h +configure:16136: result: yes +configure:16148: checking sys/socket.h usability +configure:16148: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16148: $? = 0 +configure:16148: result: yes +configure:16148: checking sys/socket.h presence +configure:16148: clang -E -fvisibility=hidden conftest.c +configure:16148: $? = 0 +configure:16148: result: yes +configure:16148: checking for sys/socket.h +configure:16148: result: yes +configure:16160: checking sys/time.h usability +configure:16160: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16160: $? = 0 +configure:16160: result: yes +configure:16160: checking sys/time.h presence +configure:16160: clang -E -fvisibility=hidden conftest.c +configure:16160: $? = 0 +configure:16160: result: yes +configure:16160: checking for sys/time.h +configure:16160: result: yes +configure:16172: checking errno.h usability +configure:16172: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16172: $? = 0 +configure:16172: result: yes +configure:16172: checking errno.h presence +configure:16172: clang -E -fvisibility=hidden conftest.c +configure:16172: $? = 0 +configure:16172: result: yes +configure:16172: checking for errno.h +configure:16172: result: yes +configure:16182: checking for socket in -lnetwork +configure:16207: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lnetwork >&5 +/usr/bin/ld: cannot find -lnetwork +clang: error: linker command failed with exit code 1 (use -v to see invocation) +configure:16207: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char socket (); +| int +| main () +| { +| return socket (); +| ; +| return 0; +| } +configure:16216: result: no +configure:16231: checking size of long long +configure:16236: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16236: $? = 0 +configure:16236: ./conftest +configure:16236: $? = 0 +configure:16250: result: 8 +configure:16264: checking size of long +configure:16269: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16269: $? = 0 +configure:16269: ./conftest +configure:16269: $? = 0 +configure:16283: result: 4 +configure:16293: checking whether byte ordering is bigendian +configure:16308: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +conftest.c:41:9: error: unknown type name 'not' + not a universal capable compiler + ^ +conftest.c:41:14: error: expected ';' after top level declarator + not a universal capable compiler + ^ + ; +2 errors generated. +configure:16308: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| /* end confdefs.h. */ +| #ifndef __APPLE_CC__ +| not a universal capable compiler +| #endif +| typedef int dummy; +| +configure:16353: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:16353: $? = 0 +configure:16371: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +conftest.c:47:4: error: use of undeclared identifier 'not' + not big endian + ^ +1 error generated. +configure:16371: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| /* end confdefs.h. */ +| #include +| #include +| +| int +| main () +| { +| #if BYTE_ORDER != BIG_ENDIAN +| not big endian +| #endif +| +| ; +| return 0; +| } +configure:16499: result: no +configure:16569: checking for gcc +configure:16596: result: clang +configure:16825: checking for C compiler version +configure:16834: clang --version >&5 +Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) +Target: i386-pc-linux-gnu +Thread model: posix +configure:16845: $? = 0 +configure:16834: clang -v >&5 +Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) +Target: i386-pc-linux-gnu +Thread model: posix +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8.2 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9 +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9.0 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.2 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 +... rest of stderr output deleted ... +configure:16845: $? = 0 +configure:16834: clang -V >&5 +clang: error: argument to '-V' is missing (expected 1 value) +clang: error: no input files +configure:16845: $? = 1 +configure:16834: clang -qversion >&5 +clang: error: unknown argument: '-qversion' +clang: error: no input files +configure:16845: $? = 1 +configure:16849: checking whether we are using the GNU C compiler +configure:16877: result: yes +configure:16886: checking whether clang accepts -g +configure:16947: result: yes +configure:16964: checking for clang option to accept ISO C89 +configure:17040: result: none needed +configure:17065: checking whether clang understands -c and -o together +configure:17102: result: yes +configure:17121: checking dependency style of clang +configure:17232: result: gcc3 +configure:17248: checking whether clang and cc understand -c and -o together +configure:17279: clang -c conftest.c -o conftest2.o >&5 +configure:17283: $? = 0 +configure:17289: clang -c conftest.c -o conftest2.o >&5 +configure:17293: $? = 0 +configure:17304: cc -c conftest.c >&5 +configure:17308: $? = 0 +configure:17316: cc -c conftest.c -o conftest2.o >&5 +configure:17320: $? = 0 +configure:17326: cc -c conftest.c -o conftest2.o >&5 +configure:17330: $? = 0 +configure:17348: result: yes +configure:17470: checking for C++ compiler version +configure:17479: g++ --version >&5 +g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 +Copyright (C) 2013 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:17490: $? = 0 +configure:17479: g++ -v >&5 +Using built-in specs. +COLLECT_GCC=g++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper +Target: i686-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu +Thread model: posix +gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) +configure:17490: $? = 0 +configure:17479: g++ -V >&5 +g++: error: unrecognized command line option '-V' +g++: fatal error: no input files +compilation terminated. +configure:17490: $? = 4 +configure:17479: g++ -qversion >&5 +g++: error: unrecognized command line option '-qversion' +g++: fatal error: no input files +compilation terminated. +configure:17490: $? = 4 +configure:17494: checking whether we are using the GNU C++ compiler +configure:17522: result: yes +configure:17531: checking whether g++ accepts -g +configure:17592: result: yes +configure:17617: checking dependency style of g++ +configure:17728: result: gcc3 +configure:17744: checking for size_t +configure:17744: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:17744: $? = 0 +configure:17744: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +conftest.c:76:21: error: expected expression +if (sizeof ((size_t))) + ^ +1 error generated. +configure:17744: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((size_t))) +| return 0; +| ; +| return 0; +| } +configure:17744: result: yes +configure:17755: checking for uint8_t +configure:17755: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:17755: $? = 0 +configure:17755: result: yes +configure:17778: checking dependency style of clang +configure:17887: result: gcc3 +configure:17991: checking for cos in -lm +configure:18016: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lm >&5 +conftest.c:47:6: warning: incompatible redeclaration of library function 'cos' [-Wincompatible-library-redeclaration] +char cos (); + ^ +conftest.c:47:6: note: 'cos' is a builtin with type 'double (double)' +1 warning generated. +configure:18016: $? = 0 +configure:18025: result: yes +configure:18044: checking for thread local storage (TLS) class +configure:18072: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:18072: $? = 0 +configure:18084: result: __thread +configure:18120: checking for debug +configure:18122: result: no +configure:18332: checking for the pthreads library -lpthreads +configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lpthreads >&5 +/usr/bin/ld: cannot find -lpthreads +clang: error: linker command failed with exit code 1 (use -v to see invocation) +configure:18370: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| /* end confdefs.h. */ +| #include +| static void routine(void *a) { a = 0; } +| static void *start_routine(void *a) { return a; } +| int +| main () +| { +| pthread_t th; pthread_attr_t attr; +| pthread_create(&th, 0, start_routine, 0); +| pthread_join(th, 0); +| pthread_attr_init(&attr); +| pthread_cleanup_push(routine, 0); +| pthread_cleanup_pop(0) /* ; */ +| ; +| return 0; +| } +configure:18379: result: no +configure:18277: checking whether pthreads work without any flags +configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +/tmp/conftest-c6ef02.o: In function `main': +/home/khimes/work/project1/cyassl-3.0.0/conftest.c:49: undefined reference to `pthread_create' +/home/khimes/work/project1/cyassl-3.0.0/conftest.c:50: undefined reference to `pthread_join' +/home/khimes/work/project1/cyassl-3.0.0/conftest.c:52: undefined reference to `__pthread_register_cancel' +/home/khimes/work/project1/cyassl-3.0.0/conftest.c:53: undefined reference to `__pthread_unregister_cancel' +clang: error: linker command failed with exit code 1 (use -v to see invocation) +configure:18370: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| /* end confdefs.h. */ +| #include +| static void routine(void *a) { a = 0; } +| static void *start_routine(void *a) { return a; } +| int +| main () +| { +| pthread_t th; pthread_attr_t attr; +| pthread_create(&th, 0, start_routine, 0); +| pthread_join(th, 0); +| pthread_attr_init(&attr); +| pthread_cleanup_push(routine, 0); +| pthread_cleanup_pop(0) /* ; */ +| ; +| return 0; +| } +configure:18379: result: no +configure:18282: checking whether pthreads work with -Kthread +configure:18370: clang -o conftest -g -O2 -Kthread -fvisibility=hidden conftest.c >&5 +clang: error: unknown argument: '-Kthread' +configure:18370: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| /* end confdefs.h. */ +| #include +| static void routine(void *a) { a = 0; } +| static void *start_routine(void *a) { return a; } +| int +| main () +| { +| pthread_t th; pthread_attr_t attr; +| pthread_create(&th, 0, start_routine, 0); +| pthread_join(th, 0); +| pthread_attr_init(&attr); +| pthread_cleanup_push(routine, 0); +| pthread_cleanup_pop(0) /* ; */ +| ; +| return 0; +| } +configure:18379: result: no +configure:18282: checking whether pthreads work with -kthread +configure:18370: clang -o conftest -g -O2 -kthread -fvisibility=hidden conftest.c >&5 +clang: error: unknown argument: '-kthread' +configure:18370: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| /* end confdefs.h. */ +| #include +| static void routine(void *a) { a = 0; } +| static void *start_routine(void *a) { return a; } +| int +| main () +| { +| pthread_t th; pthread_attr_t attr; +| pthread_create(&th, 0, start_routine, 0); +| pthread_join(th, 0); +| pthread_attr_init(&attr); +| pthread_cleanup_push(routine, 0); +| pthread_cleanup_pop(0) /* ; */ +| ; +| return 0; +| } +configure:18379: result: no +configure:18332: checking for the pthreads library -llthread +configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -llthread >&5 +/usr/bin/ld: cannot find -llthread +clang: error: linker command failed with exit code 1 (use -v to see invocation) +configure:18370: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| /* end confdefs.h. */ +| #include +| static void routine(void *a) { a = 0; } +| static void *start_routine(void *a) { return a; } +| int +| main () +| { +| pthread_t th; pthread_attr_t attr; +| pthread_create(&th, 0, start_routine, 0); +| pthread_join(th, 0); +| pthread_attr_init(&attr); +| pthread_cleanup_push(routine, 0); +| pthread_cleanup_pop(0) /* ; */ +| ; +| return 0; +| } +configure:18379: result: no +configure:18282: checking whether pthreads work with -pthread +configure:18370: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 +configure:18370: $? = 0 +configure:18379: result: yes +configure:18398: checking for joinable pthread attribute +configure:18413: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 +configure:18413: $? = 0 +configure:18419: result: PTHREAD_CREATE_JOINABLE +configure:18429: checking if more special flags are required for pthreads +configure:18443: result: no +configure:18449: checking for PTHREAD_PRIO_INHERIT +configure:18467: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 +configure:18467: $? = 0 +configure:18476: result: yes +configure:20812: checking for library containing gethostbyname +configure:20843: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:20843: $? = 0 +configure:20860: result: none required +configure:20868: checking for library containing socket +configure:20899: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:20899: $? = 0 +configure:20916: result: none required +configure:20967: checking whether C compiler accepts +configure:20986: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 +configure:20986: $? = 0 +configure:20994: result: yes +configure:21012: : CFLAGS="$CFLAGS " +configure:21015: $? = 0 +configure:21087: checking whether the linker accepts +configure:21106: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 +configure:21106: $? = 0 +configure:21115: result: yes +configure:21123: checking for vcs system +configure:21143: result: none +configure:21152: checking for vcs checkout +configure:21164: result: no +configure:21235: checking whether the linker accepts -Werror +configure:21254: clang -o conftest -g -O2 -fvisibility=hidden -Werror conftest.c >&5 +configure:21254: $? = 0 +configure:21263: result: yes +configure:21277: checking whether the linker accepts -z relro -z now +configure:21296: clang -o conftest -g -O2 -fvisibility=hidden -Werror -z relro -z now conftest.c >&5 +clang: error: unknown argument: '-z' +clang: error: unknown argument: '-z' +clang: error: no such file or directory: 'relro' +clang: error: no such file or directory: 'now' +configure:21296: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:21306: result: no +configure:21318: checking whether the linker accepts -pie +configure:21337: clang -o conftest -g -O2 -fvisibility=hidden -Werror -pie conftest.c >&5 +configure:21337: $? = 0 +configure:21347: result: yes +configure:21447: checking whether C compiler accepts -Werror +configure:21466: clang -c -Werror -fvisibility=hidden conftest.c >&5 +configure:21466: $? = 0 +configure:21475: result: yes +configure:21488: : ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" +configure:21491: $? = 0 +configure:21707: checking whether C compiler accepts -Wno-pragmas +configure:21726: clang -c -Werror -Wno-pragmas -fvisibility=hidden conftest.c >&5 +error: unknown warning option '-Wno-pragmas' [-Werror,-Wunknown-warning-option] +configure:21726: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:21735: result: no +configure:21771: checking whether C compiler accepts -Wall +configure:21790: clang -c -Werror -Wall -fvisibility=hidden conftest.c >&5 +configure:21790: $? = 0 +configure:21799: result: yes +configure:21812: : CFLAGS="$CFLAGS $flag" +configure:21815: $? = 0 +configure:21834: checking whether C compiler accepts -Wno-strict-aliasing +configure:21853: clang -c -Wall -Werror -Wno-strict-aliasing -fvisibility=hidden conftest.c >&5 +configure:21853: $? = 0 +configure:21862: result: yes +configure:21875: : CFLAGS="$CFLAGS $flag" +configure:21878: $? = 0 +configure:21897: checking whether C compiler accepts -Wextra +configure:21916: clang -c -Wall -Wno-strict-aliasing -Werror -Wextra -fvisibility=hidden conftest.c >&5 +configure:21916: $? = 0 +configure:21925: result: yes +configure:21938: : CFLAGS="$CFLAGS $flag" +configure:21941: $? = 0 +configure:21960: checking whether C compiler accepts -Wunknown-pragmas +configure:21979: clang -c -Wall -Wno-strict-aliasing -Wextra -Werror -Wunknown-pragmas -fvisibility=hidden conftest.c >&5 +configure:21979: $? = 0 +configure:21988: result: yes +configure:22001: : CFLAGS="$CFLAGS $flag" +configure:22004: $? = 0 +configure:22023: checking whether C compiler accepts -Wthis-test-should-fail +configure:22042: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Werror -Wthis-test-should-fail -fvisibility=hidden conftest.c >&5 +error: unknown warning option '-Wthis-test-should-fail'; did you mean '-Wmismatched-tags'? [-Werror,-Wunknown-warning-option] +configure:22042: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:22051: result: no +configure:22155: checking whether C compiler accepts -Waddress +configure:22174: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Werror -Waddress -fvisibility=hidden conftest.c >&5 +configure:22174: $? = 0 +configure:22183: result: yes +configure:22196: : CFLAGS="$CFLAGS $flag" +configure:22199: $? = 0 +configure:22218: checking whether C compiler accepts -Warray-bounds +configure:22237: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Werror -Warray-bounds -fvisibility=hidden conftest.c >&5 +configure:22237: $? = 0 +configure:22246: result: yes +configure:22259: : CFLAGS="$CFLAGS $flag" +configure:22262: $? = 0 +configure:22281: checking whether C compiler accepts -Wbad-function-cast +configure:22300: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Werror -Wbad-function-cast -fvisibility=hidden conftest.c >&5 +configure:22300: $? = 0 +configure:22309: result: yes +configure:22322: : CFLAGS="$CFLAGS $flag" +configure:22325: $? = 0 +configure:22344: checking whether C compiler accepts -Wchar-subscripts +configure:22363: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Werror -Wchar-subscripts -fvisibility=hidden conftest.c >&5 +configure:22363: $? = 0 +configure:22372: result: yes +configure:22385: : CFLAGS="$CFLAGS $flag" +configure:22388: $? = 0 +configure:22407: checking whether C compiler accepts -Wcomment +configure:22426: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Werror -Wcomment -fvisibility=hidden conftest.c >&5 +configure:22426: $? = 0 +configure:22435: result: yes +configure:22448: : CFLAGS="$CFLAGS $flag" +configure:22451: $? = 0 +configure:22470: checking whether C compiler accepts -Wfloat-equal +configure:22489: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Werror -Wfloat-equal -fvisibility=hidden conftest.c >&5 +configure:22489: $? = 0 +configure:22498: result: yes +configure:22511: : CFLAGS="$CFLAGS $flag" +configure:22514: $? = 0 +configure:22533: checking whether C compiler accepts -Wformat-security +configure:22552: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Werror -Wformat-security -fvisibility=hidden conftest.c >&5 +configure:22552: $? = 0 +configure:22561: result: yes +configure:22574: : CFLAGS="$CFLAGS $flag" +configure:22577: $? = 0 +configure:22596: checking whether C compiler accepts -Wformat=2 +configure:22615: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Werror -Wformat=2 -fvisibility=hidden conftest.c >&5 +configure:22615: $? = 0 +configure:22624: result: yes +configure:22637: : CFLAGS="$CFLAGS $flag" +configure:22640: $? = 0 +configure:22659: checking whether C compiler accepts -Wmaybe-uninitialized +configure:22678: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Werror -Wmaybe-uninitialized -fvisibility=hidden conftest.c >&5 +error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option] +configure:22678: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:22687: result: no +configure:22722: checking whether C compiler accepts -Wmissing-field-initializers +configure:22741: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Werror -Wmissing-field-initializers -fvisibility=hidden conftest.c >&5 +configure:22741: $? = 0 +configure:22750: result: yes +configure:22763: : CFLAGS="$CFLAGS $flag" +configure:22766: $? = 0 +configure:22785: checking whether C compiler accepts -Wmissing-noreturn +configure:22804: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Werror -Wmissing-noreturn -fvisibility=hidden conftest.c >&5 +configure:22804: $? = 0 +configure:22813: result: yes +configure:22826: : CFLAGS="$CFLAGS $flag" +configure:22829: $? = 0 +configure:22848: checking whether C compiler accepts -Wmissing-prototypes +configure:22867: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Werror -Wmissing-prototypes -fvisibility=hidden conftest.c >&5 +configure:22867: $? = 0 +configure:22876: result: yes +configure:22889: : CFLAGS="$CFLAGS $flag" +configure:22892: $? = 0 +configure:22911: checking whether C compiler accepts -Wnested-externs +configure:22930: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Werror -Wnested-externs -fvisibility=hidden conftest.c >&5 +configure:22930: $? = 0 +configure:22939: result: yes +configure:22952: : CFLAGS="$CFLAGS $flag" +configure:22955: $? = 0 +configure:22974: checking whether C compiler accepts -Wnormalized=id +configure:22993: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Wnormalized=id -fvisibility=hidden conftest.c >&5 +error: unknown warning option '-Wnormalized=id'; did you mean '-Wformat=2'? [-Werror,-Wunknown-warning-option] +configure:22993: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:23002: result: no +configure:23037: checking whether C compiler accepts -Woverride-init +configure:23056: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Woverride-init -fvisibility=hidden conftest.c >&5 +error: unknown warning option '-Woverride-init' [-Werror,-Wunknown-warning-option] +configure:23056: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "cyassl" +| #define PACKAGE_TARNAME "cyassl" +| #define PACKAGE_VERSION "3.0.0" +| #define PACKAGE_STRING "cyassl 3.0.0" +| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +| #define PACKAGE_URL "http://www.wolfssl.com" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_VISIBILITY 1 +| #define HAVE_GETHOSTBYNAME 1 +| #define HAVE_GETADDRINFO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_INET_NTOA 1 +| #define HAVE_MEMSET 1 +| #define HAVE_SOCKET 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_ERRNO_H 1 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_LONG 4 +| #define TLS __thread +| #define DEBUG 0 +| #define HAVE_PTHREAD_PRIO_INHERIT 1 +| #define HAVE_PTHREAD 1 +| #define VCS_SYSTEM "none" +| #define VCS_CHECKOUT 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:23065: result: no +configure:23100: checking whether C compiler accepts -Wpointer-arith +configure:23119: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Wpointer-arith -fvisibility=hidden conftest.c >&5 +configure:23119: $? = 0 +configure:23128: result: yes +configure:23141: : CFLAGS="$CFLAGS $flag" +configure:23144: $? = 0 +configure:23163: checking whether C compiler accepts -Wpointer-sign +configure:23182: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror -Wpointer-sign -fvisibility=hidden conftest.c >&5 +configure:23182: $? = 0 +configure:23191: result: yes +configure:23204: : CFLAGS="$CFLAGS $flag" +configure:23207: $? = 0 +configure:23226: checking whether C compiler accepts -Wredundant-decls +configure:23245: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Werror -Wredundant-decls -fvisibility=hidden conftest.c >&5 +configure:23245: $? = 0 +configure:23254: result: yes +configure:23267: : CFLAGS="$CFLAGS $flag" +configure:23270: $? = 0 +configure:23289: checking whether C compiler accepts -Wshadow +configure:23308: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Werror -Wshadow -fvisibility=hidden conftest.c >&5 +configure:23308: $? = 0 +configure:23317: result: yes +configure:23330: : CFLAGS="$CFLAGS $flag" +configure:23333: $? = 0 +configure:23352: checking whether C compiler accepts -Wshorten-64-to-32 +configure:23371: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Werror -Wshorten-64-to-32 -fvisibility=hidden conftest.c >&5 +configure:23371: $? = 0 +configure:23380: result: yes +configure:23393: : CFLAGS="$CFLAGS $flag" +configure:23396: $? = 0 +configure:23415: checking whether C compiler accepts -Wsign-compare +configure:23434: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Werror -Wsign-compare -fvisibility=hidden conftest.c >&5 +configure:23434: $? = 0 +configure:23443: result: yes +configure:23456: : CFLAGS="$CFLAGS $flag" +configure:23459: $? = 0 +configure:23478: checking whether C compiler accepts -Wstrict-overflow=1 +configure:23497: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Werror -Wstrict-overflow=1 -fvisibility=hidden conftest.c >&5 +configure:23497: $? = 0 +configure:23506: result: yes +configure:23519: : CFLAGS="$CFLAGS $flag" +configure:23522: $? = 0 +configure:23541: checking whether C compiler accepts -Wstrict-prototypes +configure:23560: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Werror -Wstrict-prototypes -fvisibility=hidden conftest.c >&5 +configure:23560: $? = 0 +configure:23569: result: yes +configure:23582: : CFLAGS="$CFLAGS $flag" +configure:23585: $? = 0 +configure:23604: checking whether C compiler accepts -Wswitch-enum +configure:23623: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Werror -Wswitch-enum -fvisibility=hidden conftest.c >&5 +configure:23623: $? = 0 +configure:23632: result: yes +configure:23645: : CFLAGS="$CFLAGS $flag" +configure:23648: $? = 0 +configure:23667: checking whether C compiler accepts -Wundef +configure:23686: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Werror -Wundef -fvisibility=hidden conftest.c >&5 +configure:23686: $? = 0 +configure:23695: result: yes +configure:23708: : CFLAGS="$CFLAGS $flag" +configure:23711: $? = 0 +configure:23730: checking whether C compiler accepts -Wunused +configure:23749: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Werror -Wunused -fvisibility=hidden conftest.c >&5 +configure:23749: $? = 0 +configure:23758: result: yes +configure:23771: : CFLAGS="$CFLAGS $flag" +configure:23774: $? = 0 +configure:23793: checking whether C compiler accepts -Wunused-result +configure:23812: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Werror -Wunused-result -fvisibility=hidden conftest.c >&5 +configure:23812: $? = 0 +configure:23821: result: yes +configure:23834: : CFLAGS="$CFLAGS $flag" +configure:23837: $? = 0 +configure:23856: checking whether C compiler accepts -Wunused-variable +configure:23875: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Werror -Wunused-variable -fvisibility=hidden conftest.c >&5 +configure:23875: $? = 0 +configure:23884: result: yes +configure:23897: : CFLAGS="$CFLAGS $flag" +configure:23900: $? = 0 +configure:23919: checking whether C compiler accepts -Wwrite-strings +configure:23938: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Werror -Wwrite-strings -fvisibility=hidden conftest.c >&5 +configure:23938: $? = 0 +configure:23947: result: yes +configure:23960: : CFLAGS="$CFLAGS $flag" +configure:23963: $? = 0 +configure:23982: checking whether C compiler accepts -fwrapv +configure:24001: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -Werror -fwrapv -fvisibility=hidden conftest.c >&5 +configure:24001: $? = 0 +configure:24010: result: yes +configure:24023: : CFLAGS="$CFLAGS $flag" +configure:24026: $? = 0 +configure:24045: checking whether C compiler accepts -fPIE +configure:24064: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -Werror -fPIE -fvisibility=hidden conftest.c >&5 +configure:24064: $? = 0 +configure:24073: result: yes +configure:24086: : CFLAGS="$CFLAGS $flag" +configure:24089: $? = 0 +configure:24153: result: creating cyassl-config - generic 3.0.0 for -lcyassl +configure:24281: checking the number of available CPUs +configure:24324: result: 4 +configure:24337: adding automake macro support +configure:24341: creating aminclude.am +configure:24372: added jobserver support to make for 5 jobs +configure:24493: checking that generated files are newer than configure +configure:24499: result: done +configure:24719: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by cyassl config.status 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on khimes-TravelMate-X483 + +config.status:1283: creating stamp-h +config.status:1283: creating Makefile +config.status:1283: creating cyassl/version.h +config.status:1283: creating cyassl/options.h +config.status:1283: creating support/cyassl.pc +config.status:1283: creating rpm/spec +config.status:1283: creating config.h +config.status:1464: config.h is unchanged +config.status:1512: executing depfiles commands +config.status:1512: executing libtool commands + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_build=i686-pc-linux-gnu +ac_cv_c_bigendian=no +ac_cv_c_compiler_gnu=yes +ac_cv_c_uint8_t=yes +ac_cv_cxx_compiler_gnu=yes +ac_cv_env_CCASFLAGS_set= +ac_cv_env_CCASFLAGS_value= +ac_cv_env_CCAS_set= +ac_cv_env_CCAS_value= +ac_cv_env_CCC_set= +ac_cv_env_CCC_value= +ac_cv_env_CC_set=set +ac_cv_env_CC_value=clang +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_CXXCPP_set= +ac_cv_env_CXXCPP_value= +ac_cv_env_CXXFLAGS_set= +ac_cv_env_CXXFLAGS_value= +ac_cv_env_CXX_set= +ac_cv_env_CXX_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_func_getaddrinfo=yes +ac_cv_func_gethostbyname=yes +ac_cv_func_gettimeofday=yes +ac_cv_func_inet_ntoa=yes +ac_cv_func_memset=yes +ac_cv_func_socket=yes +ac_cv_header_arpa_inet_h=yes +ac_cv_header_dlfcn_h=yes +ac_cv_header_errno_h=yes +ac_cv_header_fcntl_h=yes +ac_cv_header_inttypes_h=yes +ac_cv_header_limits_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_netdb_h=yes +ac_cv_header_netinet_in_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stddef_h=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_ioctl_h=yes +ac_cv_header_sys_socket_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_time_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_host=i686-pc-linux-gnu +ac_cv_lib_m_cos=yes +ac_cv_lib_network_socket=no +ac_cv_objext=o +ac_cv_path_EGREP='/bin/grep -E' +ac_cv_path_FGREP='/bin/grep -F' +ac_cv_path_GREP=/bin/grep +ac_cv_path_SED=/bin/sed +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_mkdir=/bin/mkdir +ac_cv_prog_AWK=mawk +ac_cv_prog_CPP='clang -E' +ac_cv_prog_CXXCPP='g++ -E' +ac_cv_prog_ac_ct_AR=ar +ac_cv_prog_ac_ct_CC=clang +ac_cv_prog_ac_ct_CXX=g++ +ac_cv_prog_ac_ct_MANIFEST_TOOL=mt +ac_cv_prog_ac_ct_OBJDUMP=objdump +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_ac_ct_STRIP=strip +ac_cv_prog_cc_c89= +ac_cv_prog_cc_clang_c_o=yes +ac_cv_prog_cc_g=yes +ac_cv_prog_cxx_g=yes +ac_cv_prog_make_make_set=yes +ac_cv_search_gethostbyname='none required' +ac_cv_search_socket='none required' +ac_cv_sizeof_long=4 +ac_cv_sizeof_long_long=8 +ac_cv_tls=__thread +ac_cv_type_size_t=yes +ac_cv_vcs_checkout=no +ac_cv_vcs_system=none +ac_cv_warnings_as_errors=no +am_cv_CCAS_dependencies_compiler_type=gcc3 +am_cv_CC_dependencies_compiler_type=gcc3 +am_cv_CXX_dependencies_compiler_type=gcc3 +am_cv_make_support_nested_variables=yes +am_cv_prog_cc_c_o=yes +am_cv_prog_tar_ustar=gnutar +ax_cv_PTHREAD_PRIO_INHERIT=yes +ax_cv_check_cflags__=yes +ax_cv_check_cflags__Waddress=yes +ax_cv_check_cflags__Wall=yes +ax_cv_check_cflags__Warray_bounds=yes +ax_cv_check_cflags__Wbad_function_cast=yes +ax_cv_check_cflags__Wchar_subscripts=yes +ax_cv_check_cflags__Wcomment=yes +ax_cv_check_cflags__Wextra=yes +ax_cv_check_cflags__Wfloat_equal=yes +ax_cv_check_cflags__Wformat_2=yes +ax_cv_check_cflags__Wformat_security=yes +ax_cv_check_cflags__Wmaybe_uninitialized=no +ax_cv_check_cflags__Wmissing_field_initializers=yes +ax_cv_check_cflags__Wmissing_noreturn=yes +ax_cv_check_cflags__Wmissing_prototypes=yes +ax_cv_check_cflags__Wnested_externs=yes +ax_cv_check_cflags__Wno_pragmas=no +ax_cv_check_cflags__Wno_strict_aliasing=yes +ax_cv_check_cflags__Wnormalized_id=no +ax_cv_check_cflags__Woverride_init=no +ax_cv_check_cflags__Wpointer_arith=yes +ax_cv_check_cflags__Wpointer_sign=yes +ax_cv_check_cflags__Wredundant_decls=yes +ax_cv_check_cflags__Wshadow=yes +ax_cv_check_cflags__Wshorten_64_to_32=yes +ax_cv_check_cflags__Wsign_compare=yes +ax_cv_check_cflags__Wstrict_overflow_1=yes +ax_cv_check_cflags__Wstrict_prototypes=yes +ax_cv_check_cflags__Wswitch_enum=yes +ax_cv_check_cflags__Wthis_test_should_fail=no +ax_cv_check_cflags__Wundef=yes +ax_cv_check_cflags__Wunknown_pragmas=yes +ax_cv_check_cflags__Wunused=yes +ax_cv_check_cflags__Wunused_result=yes +ax_cv_check_cflags__Wunused_variable=yes +ax_cv_check_cflags__Wwrite_strings=yes +ax_cv_check_cflags___Werror=yes +ax_cv_check_cflags__fPIE=yes +ax_cv_check_cflags__fwrapv=yes +ax_cv_check_ldflags__=yes +ax_cv_check_ldflags___Werror=yes +ax_cv_check_ldflags__pie=yes +ax_cv_check_ldflags__z_relro__z_now=no +gl_cv_cc_vis_werror=yes +gl_cv_cc_visibility=yes +lt_cv_ar_at_file=@ +lt_cv_archive_cmds_need_lc=no +lt_cv_deplibs_check_method=pass_all +lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_ld_reload_flag=-r +lt_cv_nm_interface='BSD nm' +lt_cv_objdir=.libs +lt_cv_path_LD=/usr/bin/ld +lt_cv_path_LDCXX=/usr/bin/ld +lt_cv_path_NM='/usr/bin/nm -B' +lt_cv_path_mainfest_tool=no +lt_cv_prog_compiler_c_o=yes +lt_cv_prog_compiler_c_o_CXX=yes +lt_cv_prog_compiler_pic='-fPIC -DPIC' +lt_cv_prog_compiler_pic_CXX='-fPIC -DPIC' +lt_cv_prog_compiler_pic_works=yes +lt_cv_prog_compiler_pic_works_CXX=yes +lt_cv_prog_compiler_rtti_exceptions=yes +lt_cv_prog_compiler_static_works=yes +lt_cv_prog_compiler_static_works_CXX=yes +lt_cv_prog_gnu_ld=yes +lt_cv_prog_gnu_ldcxx=yes +lt_cv_sharedlib_from_linklib_cmd='printf %s\n' +lt_cv_shlibpath_overrides_runpath=no +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_max_cmd_len=1572864 +lt_cv_to_host_file_cmd=func_convert_file_noop +lt_cv_to_tool_file_cmd=func_convert_file_noop + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14' +AMDEPBACKSLASH='\' +AMDEP_FALSE='#' +AMDEP_TRUE='' +AMINCLUDE='aminclude.am' +AMTAR='$${TAR-tar}' +AM_BACKSLASH='\' +AM_CFLAGS='-DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer' +AM_CPPFLAGS=' -fvisibility=hidden' +AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +AM_DEFAULT_VERBOSITY='0' +AM_LDFLAGS='' +AM_V='$(V)' +AR='ar' +AUTOCONF='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf' +AUTOHEADER='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader' +AUTOMAKE='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14' +AWK='mawk' +BUILD_AESCCM_FALSE='' +BUILD_AESCCM_TRUE='#' +BUILD_AESGCM_FALSE='' +BUILD_AESGCM_TRUE='#' +BUILD_AESNI_FALSE='' +BUILD_AESNI_TRUE='#' +BUILD_AES_FALSE='#' +BUILD_AES_TRUE='' +BUILD_ASN_FALSE='#' +BUILD_ASN_TRUE='' +BUILD_BLAKE2_FALSE='' +BUILD_BLAKE2_TRUE='#' +BUILD_CAMELLIA_FALSE='' +BUILD_CAMELLIA_TRUE='#' +BUILD_CODING_FALSE='#' +BUILD_CODING_TRUE='' +BUILD_CRL_FALSE='' +BUILD_CRL_MONITOR_FALSE='' +BUILD_CRL_MONITOR_TRUE='#' +BUILD_CRL_TRUE='#' +BUILD_DES3_FALSE='#' +BUILD_DES3_TRUE='' +BUILD_DH_FALSE='#' +BUILD_DH_TRUE='' +BUILD_DSA_FALSE='' +BUILD_DSA_TRUE='#' +BUILD_ECC_FALSE='' +BUILD_ECC_TRUE='#' +BUILD_EXAMPLES_FALSE='#' +BUILD_EXAMPLES_TRUE='' +BUILD_FASTMATH_FALSE='' +BUILD_FASTMATH_TRUE='#' +BUILD_FIPS_FALSE='' +BUILD_FIPS_TRUE='#' +BUILD_HC128_FALSE='' +BUILD_HC128_TRUE='#' +BUILD_INLINE_FALSE='#' +BUILD_INLINE_TRUE='' +BUILD_LEANPSK_FALSE='' +BUILD_LEANPSK_TRUE='#' +BUILD_LIBZ_FALSE='' +BUILD_LIBZ_TRUE='#' +BUILD_MCAPI_FALSE='' +BUILD_MCAPI_TRUE='#' +BUILD_MD2_FALSE='' +BUILD_MD2_TRUE='#' +BUILD_MD4_FALSE='' +BUILD_MD4_TRUE='#' +BUILD_MD5_FALSE='#' +BUILD_MD5_TRUE='' +BUILD_MEMORY_FALSE='#' +BUILD_MEMORY_TRUE='' +BUILD_NTRU_FALSE='' +BUILD_NTRU_TRUE='#' +BUILD_OCSP_FALSE='' +BUILD_OCSP_TRUE='#' +BUILD_PKCS7_FALSE='' +BUILD_PKCS7_TRUE='#' +BUILD_PWDBASED_FALSE='' +BUILD_PWDBASED_TRUE='#' +BUILD_RABBIT_FALSE='' +BUILD_RABBIT_TRUE='#' +BUILD_RC4_FALSE='#' +BUILD_RC4_TRUE='' +BUILD_RIPEMD_FALSE='' +BUILD_RIPEMD_TRUE='#' +BUILD_RSA_FALSE='#' +BUILD_RSA_TRUE='' +BUILD_SHA512_FALSE='' +BUILD_SHA512_TRUE='#' +BUILD_SHA_FALSE='#' +BUILD_SHA_TRUE='' +BUILD_SLOWMATH_FALSE='#' +BUILD_SLOWMATH_TRUE='' +BUILD_SNIFFER_FALSE='' +BUILD_SNIFFER_TRUE='#' +BUILD_SNIFFTEST_FALSE='' +BUILD_SNIFFTEST_TRUE='#' +CC='clang' +CCAS='clang' +CCASDEPMODE='depmode=gcc3' +CCASFLAGS='-g -O2' +CCDEPMODE='depmode=gcc3' +CFLAGS=' -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE ' +CFLAG_VISIBILITY='-fvisibility=hidden' +CPP='clang -E' +CPPFLAGS=' -fvisibility=hidden' +CXX='g++' +CXXCPP='g++ -E' +CXXDEPMODE='depmode=gcc3' +CXXFLAGS='-g -O2' +CYASSL_LIBRARY_VERSION='5:5:0' +CYGPATH_W='echo' +DEBUG_FALSE='' +DEBUG_TRUE='#' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +DLLTOOL='false' +DSYMUTIL='' +DUMPBIN='' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +EGREP='/bin/grep -E' +EXEEXT='' +FGREP='/bin/grep -F' +GENERIC_CONFIG='cyassl-config' +GREP='/bin/grep' +HAVE_OPENSSL_CMD='' +HAVE_VALGRIND='' +HAVE_VISIBILITY='1' +HEX_VERSION='0x03000000' +INC_AMINCLUDE='include $(top_builddir)/aminclude.am' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +IS_VCS_CHECKOUT_FALSE='' +IS_VCS_CHECKOUT_TRUE='#' +LD='/usr/bin/ld' +LDFLAGS='' +LIBM='-lm' +LIBOBJS='' +LIBS=' ' +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIPO='' +LN_S='ln -s' +LTLIBOBJS='' +MAKEINFO='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo' +MANIFEST_TOOL=':' +MCHECK='' +MKDIR_P='/bin/mkdir -p' +NM='/usr/bin/nm -B' +NMEDIT='' +OBJDUMP='objdump' +OBJEXT='o' +OTOOL64='' +OTOOL='' +PACKAGE='cyassl' +PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' +PACKAGE_NAME='cyassl' +PACKAGE_STRING='cyassl 3.0.0' +PACKAGE_TARNAME='cyassl' +PACKAGE_URL='http://www.wolfssl.com' +PACKAGE_VERSION='3.0.0' +PATH_SEPARATOR=':' +PTHREAD_CC='clang' +PTHREAD_CFLAGS='-pthread' +PTHREAD_LIBS='' +RANLIB='ranlib' +SED='/bin/sed' +SET_MAKE='' +SHELL='/bin/bash' +STRIP='strip' +USE_VALGRIND_FALSE='' +USE_VALGRIND_TRUE='#' +VERSION='3.0.0' +ac_ct_AR='ar' +ac_ct_CC='clang' +ac_ct_CXX='g++' +ac_ct_DUMPBIN='' +am__EXEEXT_FALSE='' +am__EXEEXT_TRUE='#' +am__fastdepCCAS_FALSE='#' +am__fastdepCCAS_TRUE='' +am__fastdepCC_FALSE='#' +am__fastdepCC_TRUE='' +am__fastdepCXX_FALSE='#' +am__fastdepCXX_TRUE='' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__nodep='_no' +am__quote='' +am__tar='tar --format=ustar -chf - "$$tardir"' +am__untar='tar -xf -' +ax_pthread_config='' +bindir='${exec_prefix}/bin' +build='i686-pc-linux-gnu' +build_alias='' +build_cpu='i686' +build_os='linux-gnu' +build_vendor='pc' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host='i686-pc-linux-gnu' +host_alias='' +host_cpu='i686' +host_os='linux-gnu' +host_vendor='pc' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localedir='${datarootdir}/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +mkdir_p='$(MKDIR_P)' +oldincludedir='/usr/include' +pdfdir='${docdir}' +prefix='/usr/local' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "cyassl" +#define PACKAGE_TARNAME "cyassl" +#define PACKAGE_VERSION "3.0.0" +#define PACKAGE_STRING "cyassl 3.0.0" +#define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" +#define PACKAGE_URL "http://www.wolfssl.com" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_VISIBILITY 1 +#define HAVE_GETHOSTBYNAME 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INET_NTOA 1 +#define HAVE_MEMSET 1 +#define HAVE_SOCKET 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_ERRNO_H 1 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_LONG 4 +#define TLS __thread +#define DEBUG 0 +#define HAVE_PTHREAD_PRIO_INHERIT 1 +#define HAVE_PTHREAD 1 +#define VCS_SYSTEM "none" +#define VCS_CHECKOUT 0 + +configure: exit 0 diff --git a/project1/cyassl-3.0.0/config.status b/project1/cyassl-3.0.0/config.status new file mode 100755 index 00000000..1f9288e2 --- /dev/null +++ b/project1/cyassl-3.0.0/config.status @@ -0,0 +1,2415 @@ +#! /bin/bash +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/bash} +export SHELL +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cyassl $as_me 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" stamp-h Makefile cyassl/version.h cyassl/options.h support/cyassl.pc rpm/spec" +config_headers=" config.h:config.in" +config_commands=" depfiles libtool" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +cyassl home page: ." + +ac_cs_config="'--enable-dtls' 'CC=clang'" +ac_cs_version="\ +cyassl config.status 3.0.0 +configured by ./configure, generated by GNU Autoconf 2.69, + with options \"$ac_cs_config\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/home/khimes/work/project1/cyassl-3.0.0' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/bin/mkdir -p' +AWK='mawk' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + set X /bin/bash './configure' '--enable-dtls' 'CC=clang' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 + CONFIG_SHELL='/bin/bash' + export CONFIG_SHELL + exec "$@" +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="build-aux" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +double_quote_subst='s/\(["`\\]\)/\\\1/g' +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +macro_version='2.4.2' +macro_revision='1.3337' +enable_static='no' +enable_shared='yes' +pic_mode='default' +enable_fast_install='yes' +SHELL='/bin/bash' +ECHO='printf %s\n' +PATH_SEPARATOR=':' +host_alias='' +host='i686-pc-linux-gnu' +host_os='linux-gnu' +build_alias='' +build='i686-pc-linux-gnu' +build_os='linux-gnu' +SED='/bin/sed' +Xsed='/bin/sed -e 1s/^X//' +GREP='/bin/grep' +EGREP='/bin/grep -E' +FGREP='/bin/grep -F' +LD='/usr/bin/ld' +NM='/usr/bin/nm -B' +LN_S='ln -s' +max_cmd_len='1572864' +ac_objext='o' +exeext='' +lt_unset='unset' +lt_SP2NL='tr \040 \012' +lt_NL2SP='tr \015\012 \040\040' +lt_cv_to_host_file_cmd='func_convert_file_noop' +lt_cv_to_tool_file_cmd='func_convert_file_noop' +reload_flag=' -r' +reload_cmds='$LD$reload_flag -o $output$reload_objs' +OBJDUMP='objdump' +deplibs_check_method='pass_all' +file_magic_cmd='$MAGIC_CMD' +file_magic_glob='' +want_nocaseglob='no' +DLLTOOL='false' +sharedlib_from_linklib_cmd='printf %s\n' +AR='ar' +AR_FLAGS='cru' +archiver_list_spec='@' +STRIP='strip' +RANLIB='ranlib' +old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' +old_postuninstall_cmds='' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' +lock_old_archive_extraction='no' +CC='clang' +CFLAGS=' -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE ' +compiler='g++' +GCC='yes' +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' +nm_file_list_spec='@' +lt_sysroot='' +objdir='.libs' +MAGIC_CMD='file' +lt_prog_compiler_no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' +lt_prog_compiler_pic=' -fPIC -DPIC' +lt_prog_compiler_wl='-Wl,' +lt_prog_compiler_static='-static' +lt_cv_prog_compiler_c_o='yes' +need_locks='no' +MANIFEST_TOOL=':' +DSYMUTIL='' +NMEDIT='' +LIPO='' +OTOOL='' +OTOOL64='' +libext='a' +shrext_cmds='.so' +extract_expsyms_cmds='' +archive_cmds_need_lc='no' +enable_shared_with_static_runtimes='no' +export_dynamic_flag_spec='${wl}--export-dynamic' +whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' +compiler_needs_object='no' +old_archive_from_new_cmds='' +old_archive_from_expsyms_cmds='' +archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' +module_cmds='' +module_expsym_cmds='' +with_gnu_ld='yes' +allow_undefined_flag='' +no_undefined_flag='' +hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' +hardcode_libdir_separator='' +hardcode_direct='no' +hardcode_direct_absolute='no' +hardcode_minus_L='no' +hardcode_shlibpath_var='unsupported' +hardcode_automatic='no' +inherit_rpath='no' +link_all_deplibs='unknown' +always_export_symbols='no' +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' +include_expsyms='' +prelink_cmds='' +postlink_cmds='' +file_list_spec='' +variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' +need_lib_prefix='no' +need_version='no' +version_type='linux' +runpath_var='LD_RUN_PATH' +shlibpath_var='LD_LIBRARY_PATH' +shlibpath_overrides_runpath='no' +libname_spec='lib$name' +library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' +soname_spec='${libname}${release}${shared_ext}$major' +install_override_mode='' +postinstall_cmds='' +postuninstall_cmds='' +finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' +finish_eval='' +hardcode_into_libs='yes' +sys_lib_search_path_spec='/usr/lib/clang/3.4 /usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib /lib ' +sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/i386-linux-gnu/libfakeroot /usr/lib/i386-linux-gnu/mesa-egl /usr/lib/i386-linux-gnu/mesa /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib ' +hardcode_action='immediate' +enable_dlopen='unknown' +enable_dlopen_self='unknown' +enable_dlopen_self_static='unknown' +old_striplib='strip --strip-debug' +striplib='strip --strip-unneeded' +compiler_lib_search_dirs='' +predep_objects='' +postdep_objects='' +predeps='' +postdeps='' +compiler_lib_search_path='' +LD_CXX='/usr/bin/ld' +reload_flag_CXX=' -r' +reload_cmds_CXX='$LD$reload_flag -o $output$reload_objs' +old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' +compiler_CXX='g++' +GCC_CXX='yes' +lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +lt_prog_compiler_pic_CXX=' -fPIC -DPIC' +lt_prog_compiler_wl_CXX='-Wl,' +lt_prog_compiler_static_CXX='-static' +lt_cv_prog_compiler_c_o_CXX='yes' +archive_cmds_need_lc_CXX='no' +enable_shared_with_static_runtimes_CXX='no' +export_dynamic_flag_spec_CXX='${wl}--export-dynamic' +whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' +compiler_needs_object_CXX='no' +old_archive_from_new_cmds_CXX='' +old_archive_from_expsyms_cmds_CXX='' +archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' +archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' +module_cmds_CXX='' +module_expsym_cmds_CXX='' +with_gnu_ld_CXX='yes' +allow_undefined_flag_CXX='' +no_undefined_flag_CXX='' +hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' +hardcode_libdir_separator_CXX='' +hardcode_direct_CXX='no' +hardcode_direct_absolute_CXX='no' +hardcode_minus_L_CXX='no' +hardcode_shlibpath_var_CXX='unsupported' +hardcode_automatic_CXX='no' +inherit_rpath_CXX='no' +link_all_deplibs_CXX='unknown' +always_export_symbols_CXX='no' +export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' +include_expsyms_CXX='' +prelink_cmds_CXX='' +postlink_cmds_CXX='' +file_list_spec_CXX='' +hardcode_action_CXX='immediate' +compiler_lib_search_dirs_CXX='/usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu /usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /usr/lib/gcc/i686-linux-gnu/4.8/../../..' +predep_objects_CXX='/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.8/crtbeginS.o' +postdep_objects_CXX='/usr/lib/gcc/i686-linux-gnu/4.8/crtendS.o /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o' +predeps_CXX='' +postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s' +compiler_lib_search_path_CXX='-L/usr/lib/gcc/i686-linux-gnu/4.8 -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.8/../../..' + +LTCC='clang' +LTCFLAGS='-g -O2' +compiler='clang' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag OBJDUMP deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob DLLTOOL sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix nm_file_list_spec lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib compiler_lib_search_dirs predep_objects postdep_objects predeps postdeps compiler_lib_search_path LD_CXX reload_flag_CXX compiler_CXX lt_prog_compiler_no_builtin_flag_CXX lt_prog_compiler_pic_CXX lt_prog_compiler_wl_CXX lt_prog_compiler_static_CXX lt_cv_prog_compiler_c_o_CXX export_dynamic_flag_spec_CXX whole_archive_flag_spec_CXX compiler_needs_object_CXX with_gnu_ld_CXX allow_undefined_flag_CXX no_undefined_flag_CXX hardcode_libdir_flag_spec_CXX hardcode_libdir_separator_CXX exclude_expsyms_CXX include_expsyms_CXX file_list_spec_CXX compiler_lib_search_dirs_CXX predep_objects_CXX postdep_objects_CXX predeps_CXX postdeps_CXX compiler_lib_search_path_CXX; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec sys_lib_dlsearch_path_spec reload_cmds_CXX old_archive_cmds_CXX old_archive_from_new_cmds_CXX old_archive_from_expsyms_cmds_CXX archive_cmds_CXX archive_expsym_cmds_CXX module_cmds_CXX module_expsym_cmds_CXX export_symbols_cmds_CXX prelink_cmds_CXX postlink_cmds_CXX; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +ac_aux_dir='build-aux' +xsi_shell='yes' +lt_shell_append='yes' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='cyassl' + VERSION='3.0.0' + TIMESTAMP='' + RM='rm -f' + ofile='libtool' + + + + + + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; + "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; + "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; + "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["am__EXEEXT_FALSE"]="" +S["am__EXEEXT_TRUE"]="#" +S["LTLIBOBJS"]="" +S["LIBOBJS"]="" +S["INC_AMINCLUDE"]="include $(top_builddir)/aminclude.am" +S["AMINCLUDE"]="aminclude.am" +S["GENERIC_CONFIG"]="cyassl-config" +S["AM_LDFLAGS"]="" +S["AM_CFLAGS"]="-DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_ST"\ +"ACK -Wall -Wno-unused -Os -fomit-frame-pointer" +S["AM_CPPFLAGS"]=" -fvisibility=hidden" +S["HEX_VERSION"]="0x03000000" +S["IS_VCS_CHECKOUT_FALSE"]="" +S["IS_VCS_CHECKOUT_TRUE"]="#" +S["BUILD_MCAPI_FALSE"]="" +S["BUILD_MCAPI_TRUE"]="#" +S["BUILD_LIBZ_FALSE"]="" +S["BUILD_LIBZ_TRUE"]="#" +S["BUILD_EXAMPLES_FALSE"]="#" +S["BUILD_EXAMPLES_TRUE"]="" +S["BUILD_SLOWMATH_FALSE"]="#" +S["BUILD_SLOWMATH_TRUE"]="" +S["BUILD_FASTMATH_FALSE"]="" +S["BUILD_FASTMATH_TRUE"]="#" +S["USE_VALGRIND_FALSE"]="" +S["USE_VALGRIND_TRUE"]="#" +S["HAVE_VALGRIND"]="" +S["BUILD_PKCS7_FALSE"]="" +S["BUILD_PKCS7_TRUE"]="#" +S["BUILD_NTRU_FALSE"]="" +S["BUILD_NTRU_TRUE"]="#" +S["BUILD_CRL_MONITOR_FALSE"]="" +S["BUILD_CRL_MONITOR_TRUE"]="#" +S["BUILD_CRL_FALSE"]="" +S["BUILD_CRL_TRUE"]="#" +S["HAVE_OPENSSL_CMD"]="" +S["BUILD_OCSP_FALSE"]="" +S["BUILD_OCSP_TRUE"]="#" +S["BUILD_INLINE_FALSE"]="#" +S["BUILD_INLINE_TRUE"]="" +S["BUILD_FIPS_FALSE"]="" +S["BUILD_FIPS_TRUE"]="#" +S["BUILD_RABBIT_FALSE"]="" +S["BUILD_RABBIT_TRUE"]="#" +S["BUILD_HC128_FALSE"]="" +S["BUILD_HC128_TRUE"]="#" +S["BUILD_PWDBASED_FALSE"]="" +S["BUILD_PWDBASED_TRUE"]="#" +S["BUILD_MD4_FALSE"]="" +S["BUILD_MD4_TRUE"]="#" +S["BUILD_SHA_FALSE"]="#" +S["BUILD_SHA_TRUE"]="" +S["BUILD_MD5_FALSE"]="#" +S["BUILD_MD5_TRUE"]="" +S["BUILD_RC4_FALSE"]="#" +S["BUILD_RC4_TRUE"]="" +S["BUILD_DES3_FALSE"]="#" +S["BUILD_DES3_TRUE"]="" +S["BUILD_CODING_FALSE"]="#" +S["BUILD_CODING_TRUE"]="" +S["BUILD_AES_FALSE"]="#" +S["BUILD_AES_TRUE"]="" +S["BUILD_ASN_FALSE"]="#" +S["BUILD_ASN_TRUE"]="" +S["BUILD_DH_FALSE"]="#" +S["BUILD_DH_TRUE"]="" +S["BUILD_RSA_FALSE"]="#" +S["BUILD_RSA_TRUE"]="" +S["BUILD_MEMORY_FALSE"]="#" +S["BUILD_MEMORY_TRUE"]="" +S["BUILD_ECC_FALSE"]="" +S["BUILD_ECC_TRUE"]="#" +S["BUILD_DSA_FALSE"]="" +S["BUILD_DSA_TRUE"]="#" +S["BUILD_SHA512_FALSE"]="" +S["BUILD_SHA512_TRUE"]="#" +S["BUILD_BLAKE2_FALSE"]="" +S["BUILD_BLAKE2_TRUE"]="#" +S["BUILD_RIPEMD_FALSE"]="" +S["BUILD_RIPEMD_TRUE"]="#" +S["BUILD_MD2_FALSE"]="" +S["BUILD_MD2_TRUE"]="#" +S["BUILD_CAMELLIA_FALSE"]="" +S["BUILD_CAMELLIA_TRUE"]="#" +S["BUILD_AESNI_FALSE"]="" +S["BUILD_AESNI_TRUE"]="#" +S["BUILD_AESCCM_FALSE"]="" +S["BUILD_AESCCM_TRUE"]="#" +S["BUILD_AESGCM_FALSE"]="" +S["BUILD_AESGCM_TRUE"]="#" +S["BUILD_SNIFFTEST_FALSE"]="" +S["BUILD_SNIFFTEST_TRUE"]="#" +S["BUILD_SNIFFER_FALSE"]="" +S["BUILD_SNIFFER_TRUE"]="#" +S["BUILD_LEANPSK_FALSE"]="" +S["BUILD_LEANPSK_TRUE"]="#" +S["PTHREAD_CFLAGS"]="-pthread" +S["PTHREAD_LIBS"]="" +S["PTHREAD_CC"]="clang" +S["ax_pthread_config"]="" +S["DEBUG_FALSE"]="" +S["DEBUG_TRUE"]="#" +S["MCHECK"]="" +S["LIBM"]="-lm" +S["am__fastdepCCAS_FALSE"]="#" +S["am__fastdepCCAS_TRUE"]="" +S["CCASDEPMODE"]="depmode=gcc3" +S["CCASFLAGS"]="-g -O2" +S["CCAS"]="clang" +S["HAVE_VISIBILITY"]="1" +S["CFLAG_VISIBILITY"]="-fvisibility=hidden" +S["CXXCPP"]="g++ -E" +S["am__fastdepCXX_FALSE"]="#" +S["am__fastdepCXX_TRUE"]="" +S["CXXDEPMODE"]="depmode=gcc3" +S["ac_ct_CXX"]="g++" +S["CXXFLAGS"]="-g -O2" +S["CXX"]="g++" +S["CPP"]="clang -E" +S["OTOOL64"]="" +S["OTOOL"]="" +S["LIPO"]="" +S["NMEDIT"]="" +S["DSYMUTIL"]="" +S["MANIFEST_TOOL"]=":" +S["RANLIB"]="ranlib" +S["ac_ct_AR"]="ar" +S["AR"]="ar" +S["DLLTOOL"]="false" +S["OBJDUMP"]="objdump" +S["LN_S"]="ln -s" +S["NM"]="/usr/bin/nm -B" +S["ac_ct_DUMPBIN"]="" +S["DUMPBIN"]="" +S["LD"]="/usr/bin/ld" +S["FGREP"]="/bin/grep -F" +S["EGREP"]="/bin/grep -E" +S["GREP"]="/bin/grep" +S["SED"]="/bin/sed" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["am__nodep"]="_no" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__quote"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="clang" +S["CPPFLAGS"]=" -fvisibility=hidden" +S["LDFLAGS"]="" +S["CFLAGS"]=" -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wforma"\ +"t-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredunda"\ +"nt-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-"\ +"variable -Wwrite-strings -fwrapv -fPIE " +S["CC"]="clang" +S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" +S["CYASSL_LIBRARY_VERSION"]="5:5:0" +S["AM_BACKSLASH"]="\\" +S["AM_DEFAULT_VERBOSITY"]="0" +S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" +S["AM_V"]="$(V)" +S["am__untar"]="tar -xf -" +S["am__tar"]="tar --format=ustar -chf - \"$$tardir\"" +S["AMTAR"]="$${TAR-tar}" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="mawk" +S["mkdir_p"]="$(MKDIR_P)" +S["MKDIR_P"]="/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="strip" +S["install_sh"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh" +S["MAKEINFO"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo" +S["AUTOHEADER"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader" +S["AUTOMAKE"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14" +S["AUTOCONF"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf" +S["ACLOCAL"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14" +S["VERSION"]="3.0.0" +S["PACKAGE"]="cyassl" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["host_os"]="linux-gnu" +S["host_vendor"]="pc" +S["host_cpu"]="i686" +S["host"]="i686-pc-linux-gnu" +S["build_os"]="linux-gnu" +S["build_vendor"]="pc" +S["build_cpu"]="i686" +S["build"]="i686-pc-linux-gnu" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]=" " +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="http://www.wolfssl.com" +S["PACKAGE_BUGREPORT"]="https://github.com/cyassl/cyassl/issues" +S["PACKAGE_STRING"]="cyassl 3.0.0" +S["PACKAGE_VERSION"]="3.0.0" +S["PACKAGE_TARNAME"]="cyassl" +S["PACKAGE_NAME"]="cyassl" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/bash" +_ACAWK +cat >>"$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"cyassl\"" +D["PACKAGE_TARNAME"]=" \"cyassl\"" +D["PACKAGE_VERSION"]=" \"3.0.0\"" +D["PACKAGE_STRING"]=" \"cyassl 3.0.0\"" +D["PACKAGE_BUGREPORT"]=" \"https://github.com/cyassl/cyassl/issues\"" +D["PACKAGE_URL"]=" \"http://www.wolfssl.com\"" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["HAVE_DLFCN_H"]=" 1" +D["LT_OBJDIR"]=" \".libs/\"" +D["HAVE_VISIBILITY"]=" 1" +D["HAVE_GETHOSTBYNAME"]=" 1" +D["HAVE_GETADDRINFO"]=" 1" +D["HAVE_GETTIMEOFDAY"]=" 1" +D["HAVE_INET_NTOA"]=" 1" +D["HAVE_MEMSET"]=" 1" +D["HAVE_SOCKET"]=" 1" +D["HAVE_ARPA_INET_H"]=" 1" +D["HAVE_FCNTL_H"]=" 1" +D["HAVE_LIMITS_H"]=" 1" +D["HAVE_NETDB_H"]=" 1" +D["HAVE_NETINET_IN_H"]=" 1" +D["HAVE_STDDEF_H"]=" 1" +D["HAVE_SYS_IOCTL_H"]=" 1" +D["HAVE_SYS_SOCKET_H"]=" 1" +D["HAVE_SYS_TIME_H"]=" 1" +D["HAVE_ERRNO_H"]=" 1" +D["SIZEOF_LONG_LONG"]=" 8" +D["SIZEOF_LONG"]=" 4" +D["TLS"]=" __thread" +D["DEBUG"]=" 0" +D["HAVE_PTHREAD_PRIO_INHERIT"]=" 1" +D["HAVE_PTHREAD"]=" 1" +D["VCS_SYSTEM"]=" \"none\"" +D["VCS_CHECKOUT"]=" 0" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + "stamp-h":F) echo timestamp > stamp-h ;; + + esac +done # for ac_tag + + +as_fn_exit 0 diff --git a/project1/cyassl-3.0.0/configure b/project1/cyassl-3.0.0/configure new file mode 100755 index 00000000..a738892b --- /dev/null +++ b/project1/cyassl-3.0.0/configure @@ -0,0 +1,27349 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for cyassl 3.0.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/cyassl/cyassl/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='cyassl' +PACKAGE_TARNAME='cyassl' +PACKAGE_VERSION='3.0.0' +PACKAGE_STRING='cyassl 3.0.0' +PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' +PACKAGE_URL='http://www.wolfssl.com' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +INC_AMINCLUDE +AMINCLUDE +GENERIC_CONFIG +AM_LDFLAGS +AM_CFLAGS +AM_CPPFLAGS +HEX_VERSION +IS_VCS_CHECKOUT_FALSE +IS_VCS_CHECKOUT_TRUE +BUILD_MCAPI_FALSE +BUILD_MCAPI_TRUE +BUILD_LIBZ_FALSE +BUILD_LIBZ_TRUE +BUILD_EXAMPLES_FALSE +BUILD_EXAMPLES_TRUE +BUILD_SLOWMATH_FALSE +BUILD_SLOWMATH_TRUE +BUILD_FASTMATH_FALSE +BUILD_FASTMATH_TRUE +USE_VALGRIND_FALSE +USE_VALGRIND_TRUE +HAVE_VALGRIND +BUILD_PKCS7_FALSE +BUILD_PKCS7_TRUE +BUILD_NTRU_FALSE +BUILD_NTRU_TRUE +BUILD_CRL_MONITOR_FALSE +BUILD_CRL_MONITOR_TRUE +BUILD_CRL_FALSE +BUILD_CRL_TRUE +HAVE_OPENSSL_CMD +BUILD_OCSP_FALSE +BUILD_OCSP_TRUE +BUILD_INLINE_FALSE +BUILD_INLINE_TRUE +BUILD_FIPS_FALSE +BUILD_FIPS_TRUE +BUILD_RABBIT_FALSE +BUILD_RABBIT_TRUE +BUILD_HC128_FALSE +BUILD_HC128_TRUE +BUILD_PWDBASED_FALSE +BUILD_PWDBASED_TRUE +BUILD_MD4_FALSE +BUILD_MD4_TRUE +BUILD_SHA_FALSE +BUILD_SHA_TRUE +BUILD_MD5_FALSE +BUILD_MD5_TRUE +BUILD_RC4_FALSE +BUILD_RC4_TRUE +BUILD_DES3_FALSE +BUILD_DES3_TRUE +BUILD_CODING_FALSE +BUILD_CODING_TRUE +BUILD_AES_FALSE +BUILD_AES_TRUE +BUILD_ASN_FALSE +BUILD_ASN_TRUE +BUILD_DH_FALSE +BUILD_DH_TRUE +BUILD_RSA_FALSE +BUILD_RSA_TRUE +BUILD_MEMORY_FALSE +BUILD_MEMORY_TRUE +BUILD_ECC_FALSE +BUILD_ECC_TRUE +BUILD_DSA_FALSE +BUILD_DSA_TRUE +BUILD_SHA512_FALSE +BUILD_SHA512_TRUE +BUILD_BLAKE2_FALSE +BUILD_BLAKE2_TRUE +BUILD_RIPEMD_FALSE +BUILD_RIPEMD_TRUE +BUILD_MD2_FALSE +BUILD_MD2_TRUE +BUILD_CAMELLIA_FALSE +BUILD_CAMELLIA_TRUE +BUILD_AESNI_FALSE +BUILD_AESNI_TRUE +BUILD_AESCCM_FALSE +BUILD_AESCCM_TRUE +BUILD_AESGCM_FALSE +BUILD_AESGCM_TRUE +BUILD_SNIFFTEST_FALSE +BUILD_SNIFFTEST_TRUE +BUILD_SNIFFER_FALSE +BUILD_SNIFFER_TRUE +BUILD_LEANPSK_FALSE +BUILD_LEANPSK_TRUE +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +DEBUG_FALSE +DEBUG_TRUE +MCHECK +LIBM +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +HAVE_VISIBILITY +CFLAG_VISIBILITY +CXXCPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +LIBTOOL +CYASSL_LIBRARY_VERSION +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_static +enable_shared +with_pic +enable_fast_install +enable_dependency_tracking +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_debug +enable_singlethreaded +enable_dtls +enable_opensslextra +enable_ipv6 +enable_fortress +enable_bump +enable_leanpsk +enable_bigcache +enable_hugecache +enable_smallcache +enable_savesession +enable_savecert +enable_atomicuser +enable_pkcallbacks +enable_sniffer +enable_aesgcm +enable_aesccm +enable_aesni +enable_camellia +enable_md2 +enable_nullcipher +enable_ripemd +enable_blake2 +enable_sha512 +enable_sessioncerts +enable_keygen +enable_certgen +enable_certreq +enable_sep +enable_hkdf +enable_dsa +enable_ecc +enable_fpecc +enable_eccencrypt +enable_psk +enable_errorstrings +enable_oldtls +enable_stacksize +enable_memory +enable_rsa +enable_dh +enable_asn +enable_aes +enable_coding +enable_des3 +enable_arc4 +enable_md5 +enable_sha +enable_md4 +enable_webserver +enable_pwdbased +enable_hc128 +enable_rabbit +enable_fips +enable_filesystem +enable_inline +enable_ocsp +enable_crl +enable_crl_monitor +enable_ntru +enable_sni +enable_maxfragment +enable_truncatedhmac +enable_renegotiation_indication +enable_supportedcurves +enable_tlsx +enable_pkcs7 +enable_scep +enable_smallstack +enable_valgrind +enable_testcert +enable_iopool +enable_certservice +enable_fastmath +enable_fasthugemath +enable_examples +with_libz +with_cavium +enable_mcapi +enable_jobserver +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures cyassl 3.0.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/cyassl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of cyassl 3.0.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug Add debug code/turns off optimizations (yes|no) + [default=no] + --enable-singlethreaded Enable CyaSSL single threaded (default: disabled) + --enable-dtls Enable CyaSSL DTLS (default: disabled) + --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled) + --enable-ipv6 Enable testing of IPV6 (default: disabled) + --enable-fortress Enable SSL fortress build (default: disabled) + --enable-bump Enable SSL Bump build (default: disabled) + --enable-leanpsk Enable Lean PSK build (default: disabled) + --enable-bigcache Enable big session cache (default: disabled) + --enable-hugecache Enable huge session cache (default: disabled) + --enable-smallcache Enable small session cache (default: disabled) + --enable-savesession Enable persistent session cache (default: disabled) + --enable-savecert Enable persistent cert cache (default: disabled) + --enable-atomicuser Enable Atomic User Record Layer (default: disabled) + --enable-pkcallbacks Enable Public Key Callbacks (default: disabled) + --enable-sniffer Enable CyaSSL sniffer support (default: disabled) + --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled) + --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled) + --enable-aesni Enable CyaSSL AES-NI support (default: disabled) + --enable-camellia Enable CyaSSL Camellia support (default: disabled) + --enable-md2 Enable CyaSSL MD2 support (default: disabled) + --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled) + --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled) + --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled) + --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled) + --enable-sessioncerts Enable session cert storing (default: disabled) + --enable-keygen Enable key generation (default: disabled) + --enable-certgen Enable cert generation (default: disabled) + --enable-certreq Enable cert request generation (default: disabled) + --enable-sep Enable sep extensions (default: disabled) + --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled) + --enable-dsa Enable DSA (default: disabled) + --enable-ecc Enable ECC (default: disabled) + --enable-fpecc Enable Fixed Point cache ECC (default: disabled) + --enable-eccencrypt Enable ECC encrypt (default: disabled) + --enable-psk Enable PSK (default: disabled) + --enable-errorstrings Enable error strings table (default: enabled) + --enable-oldtls Enable old TLS versions < 1.2 (default: enabled) + --enable-stacksize Enable stack size info on examples (default: disabled) + --enable-memory Enable memory callbacks (default: enabled) + --enable-rsa Enable RSA (default: enabled) + --enable-dh Enable DH (default: enabled) + --enable-asn Enable ASN (default: enabled) + --enable-aes Enable AES (default: enabled) + --enable-coding Enable Coding base 16/64 (default: enabled) + --enable-des3 Enable DES3 (default: enabled) + --enable-arc4 Enable ARC4 (default: enabled) + --enable-md5 Enable MD5 (default: enabled) + --enable-sha Enable SHA (default: enabled) + --enable-md4 Enable MD4 (default: disabled) + --enable-webserver Enable Web Server (default: disabled) + --enable-pwdbased Enable PWDBASED (default: disabled) + --enable-hc128 Enable HC-128 (default: disabled) + --enable-rabbit Enable RABBIT (default: disabled) + --enable-fips Enable FIPS 140-2 (default: disabled) + --enable-filesystem Enable Filesystem support (default: enabled) + --enable-inline Enable inline functions (default: enabled) + --enable-ocsp Enable OCSP (default: disabled) + --enable-crl Enable CRL (default: disabled) + --enable-crl-monitor Enable CRL Monitor (default: disabled) + --enable-ntru Enable NTRU (default: disabled) + --enable-sni Enable SNI (default: disabled) + --enable-maxfragment Enable Maximum Fragment Length (default: disabled) + --enable-truncatedhmac Enable Truncated HMAC (default: disabled) + --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled) + --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled) + --enable-tlsx Enable all TLS Extensions (default: disabled) + --enable-pkcs7 Enable PKCS7 (default: disabled) + --enable-scep Enable wolfSCEP (default: disabled) + --enable-smallstack Enable Small Stack Usage (default: enabled) + --enable-valgrind Enable valgrind for unit tests (default: disabled) + --enable-testcert Enable Test Cert (default: disabled) + --enable-iopool Enable I/O Pool example (default: disabled) + --enable-certservice Enable cert service (default: disabled) + --enable-fastmath Enable fast math ops (default: enabled on x86_64) + --enable-fasthugemath Enable fast math + huge code (default: disabled) + --enable-examples Enable Examples (default: enabled) + --enable-mcapi Enable Microchip API (default: disabled) + --enable-jobserver[=no/yes/#] default=yes + Enable up to # make jobs + yes: enable one more than CPU count + + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-libz=PATH PATH to libz install (default /usr/) + --with-cavium=PATH PATH to cavium/software dir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +cyassl home page: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +cyassl configure 3.0.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------------ ## +## Report this to https://github.com/cyassl/cyassl/issues ## +## ------------------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_find_uintX_t +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cyassl $as_me 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='cyassl' + VERSION='3.0.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + + + +#PROTECT_AC_USE_SYSTEM_EXTENSIONS + + + +ac_config_headers="$ac_config_headers config.h:config.in" + +#shared library versioning +CYASSL_LIBRARY_VERSION=5:5:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed +# | or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed + + +# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even +# if user doesn't override, no way to tell +USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } + if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } + if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + +if test -n "$CFLAG_VISIBILITY" ; then : + + AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" + CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" + +fi + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + +for ac_func in gethostbyname +do : + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYNAME 1 +_ACEOF + +fi +done + +for ac_func in getaddrinfo +do : + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + +fi +done + +for ac_func in gettimeofday +do : + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETTIMEOFDAY 1 +_ACEOF + +fi +done + +for ac_func in inet_ntoa +do : + ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" +if test "x$ac_cv_func_inet_ntoa" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INET_NTOA 1 +_ACEOF + +fi +done + +for ac_func in memset +do : + ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMSET 1 +_ACEOF + +fi +done + +for ac_func in socket +do : + ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET 1 +_ACEOF + +fi +done + +for ac_header in arpa/inet.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ARPA_INET_H 1 +_ACEOF + +fi + +done + +for ac_header in fcntl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FCNTL_H 1 +_ACEOF + +fi + +done + +for ac_header in limits.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIMITS_H 1 +_ACEOF + +fi + +done + +for ac_header in netdb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETDB_H 1 +_ACEOF + +fi + +done + +for ac_header in netinet/in.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETINET_IN_H 1 +_ACEOF + +fi + +done + +for ac_header in stddef.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDDEF_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/ioctl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_IOCTL_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/socket.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIME_H 1 +_ACEOF + +fi + +done + +for ac_header in errno.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ERRNO_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 +$as_echo_n "checking for socket in -lnetwork... " >&6; } +if ${ac_cv_lib_network_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_network_socket=yes +else + ac_cv_lib_network_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 +$as_echo "$ac_cv_lib_network_socket" >&6; } +if test "x$ac_cv_lib_network_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNETWORK 1 +_ACEOF + + LIBS="-lnetwork $LIBS" + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +# mktime check takes forever on some systems, if time supported it would be +# highly unusual for mktime to be missing +#AC_FUNC_MKTIME + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT8_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint8_t $ac_cv_c_uint8_t +_ACEOF +;; + esac + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + + +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="-lm" +fi + + ;; +esac + + + +OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" +OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" +OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" +DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" + +thread_ls_on=no +# Thread local storage + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +$as_echo_n "checking for thread local storage (TLS) class... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_tls_keywords="__thread __declspec(thread) none" + for ax_tls_keyword in $ax_tls_keywords; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void + foo(void) { + static $ax_tls_keyword int bar; + exit(1); + } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$ax_tls_keyword ; break +else + ac_cv_tls=none + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; +esac + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then : + +cat >>confdefs.h <<_ACEOF +#define TLS $ac_cv_tls +_ACEOF + + + AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS" + thread_ls_on=yes + +else + : + +fi + + + +# DEBUG + # Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; ax_enable_debug=yes + +$as_echo "#define DEBUG 1" >>confdefs.h + +else + ax_enable_debug=no + + +$as_echo "#define DEBUG 0" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5 +$as_echo_n "checking for debug... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5 +$as_echo "$ax_enable_debug" >&6; } + if test "x${ax_enable_debug}" = "xyes"; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + +if test "$ax_enable_debug" = "yes"; then : + AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS" +else + AM_CFLAGS="$AM_CFLAGS -DNDEBUG" +fi + + +# SINGLE THREADED +# Check whether --enable-singlethreaded was given. +if test "${enable_singlethreaded+set}" = set; then : + enableval=$enable_singlethreaded; ENABLED_SINGLETHREADED=$enableval +else + ENABLED_SINGLETHREADED=no +fi + + + + if test x"$CC" = xclang; then + wolfssl_darwin_clang=yes + elif test x"$CC" = x || test x"$CC" = xgcc; then + if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then + wolfssl_darwin_clang=yes + fi + fi + +if test "x$ENABLED_SINGLETHREADED" = "xno" ; then : + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + + if test x"$wolfssl_darwin_clang" = x"yes"; then : + ax_pthread_flags="$ax_pthread_flags" +else + ax_pthread_flags="-pthread $ax_pthread_flags" +fi + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } +int +main () +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int attr = $attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +$as_echo "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : + +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + +fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + + AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + + : +else + ax_pthread_ok=no + + ENABLED_SINGLETHREADED=yes + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +fi + +if test "x$ENABLED_SINGLETHREADED" = "xyes" ; then : + AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" +fi + + +# DTLS +# Check whether --enable-dtls was given. +if test "${enable_dtls+set}" = set; then : + enableval=$enable_dtls; ENABLED_DTLS=$enableval +else + ENABLED_DTLS=no + +fi + +if test "$ENABLED_DTLS" = "yes" +then + AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" +fi + + +# OPENSSL Extra Compatibility +# Check whether --enable-opensslextra was given. +if test "${enable_opensslextra+set}" = set; then : + enableval=$enable_opensslextra; ENABLED_OPENSSLEXTRA=$enableval +else + ENABLED_OPENSSLEXTRA=no + +fi + +if test "$ENABLED_OPENSSLEXTRA" = "yes" +then + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" +fi + +if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable small and opensslextra, only one or the other." "$LINENO" 5 +fi + + +# IPv6 Test Apps +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; ENABLED_IPV6=$enableval +else + ENABLED_IPV6=no + +fi + + +if test "$ENABLED_IPV6" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" +fi + + +# Fortress build +# Check whether --enable-fortress was given. +if test "${enable_fortress+set}" = set; then : + enableval=$enable_fortress; ENABLED_FORTRESS=$enableval +else + ENABLED_FORTRESS=no + +fi + + +if test "$ENABLED_FORTRESS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" +fi + + +# ssl bump build +# Check whether --enable-bump was given. +if test "${enable_bump+set}" = set; then : + enableval=$enable_bump; ENABLED_BUMP=$enableval +else + ENABLED_BUMP=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" +fi + +ENABLED_SLOWMATH="yes" + +# lean psk build +# Check whether --enable-leanpsk was given. +if test "${enable_leanpsk+set}" = set; then : + enableval=$enable_leanpsk; ENABLED_LEANPSK=$enableval +else + ENABLED_LEANPSK=no + +fi + + +if test "$ENABLED_LEANPSK" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" + ENABLED_SLOWMATH="no" + ENABLED_SINGLETHREADED="yes" +fi + + if test "x$ENABLED_LEANPSK" = "xyes"; then + BUILD_LEANPSK_TRUE= + BUILD_LEANPSK_FALSE='#' +else + BUILD_LEANPSK_TRUE='#' + BUILD_LEANPSK_FALSE= +fi + + + +# big cache +# Check whether --enable-bigcache was given. +if test "${enable_bigcache+set}" = set; then : + enableval=$enable_bigcache; ENABLED_BIGCACHE=$enableval +else + ENABLED_BIGCACHE=no + +fi + + +if test "$ENABLED_BIGCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" +fi + + +# HUGE cache +# Check whether --enable-hugecache was given. +if test "${enable_hugecache+set}" = set; then : + enableval=$enable_hugecache; ENABLED_HUGECACHE=$enableval +else + ENABLED_HUGECACHE=no + +fi + + +if test "$ENABLED_HUGECACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" +fi + + +# SMALL cache +# Check whether --enable-smallcache was given. +if test "${enable_smallcache+set}" = set; then : + enableval=$enable_smallcache; ENABLED_SMALLCACHE=$enableval +else + ENABLED_SMALLCACHE=no + +fi + + +if test "$ENABLED_SMALLCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" +fi + + +# Persistent session cache +# Check whether --enable-savesession was given. +if test "${enable_savesession+set}" = set; then : + enableval=$enable_savesession; ENABLED_SAVESESSION=$enableval +else + ENABLED_SAVESESSION=no + +fi + + +if test "$ENABLED_SAVESESSION" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" +fi + + +# Persistent cert cache +# Check whether --enable-savecert was given. +if test "${enable_savecert+set}" = set; then : + enableval=$enable_savecert; ENABLED_SAVECERT=$enableval +else + ENABLED_SAVECERT=no + +fi + + +if test "$ENABLED_SAVECERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" +fi + + +# Atomic User Record Layer +# Check whether --enable-atomicuser was given. +if test "${enable_atomicuser+set}" = set; then : + enableval=$enable_atomicuser; ENABLED_ATOMICUSER=$enableval +else + ENABLED_ATOMICUSER=no + +fi + + +if test "$ENABLED_ATOMICUSER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" +fi + + +# Public Key Callbacks +# Check whether --enable-pkcallbacks was given. +if test "${enable_pkcallbacks+set}" = set; then : + enableval=$enable_pkcallbacks; ENABLED_PKCALLBACKS=$enableval +else + ENABLED_PKCALLBACKS=no + +fi + + +if test "$ENABLED_PKCALLBACKS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" +fi + + +# SNIFFER +ENABLED_SNIFFTEST=no +# Check whether --enable-sniffer was given. +if test "${enable_sniffer+set}" = set; then : + enableval=$enable_sniffer; + ENABLED_SNIFFER=yes + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" + if test "x$enableval" = "xyes" ; then : + for ac_header in pcap/pcap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" +if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PCAP_PCAP_H 1 +_ACEOF + + ENABLED_SNIFFTEST=yes + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable sniffer test without having libpcap available." >&5 +$as_echo "$as_me: WARNING: cannot enable sniffer test without having libpcap available." >&2;} +fi + +done + +fi + +else + + ENABLED_SNIFFER=no + +fi + + + if test "x$ENABLED_SNIFFER" = "xyes" ; then + BUILD_SNIFFER_TRUE= + BUILD_SNIFFER_FALSE='#' +else + BUILD_SNIFFER_TRUE='#' + BUILD_SNIFFER_FALSE= +fi + + if test "x$ENABLED_SNIFFTEST" = "xyes" ; then + BUILD_SNIFFTEST_TRUE= + BUILD_SNIFFTEST_FALSE='#' +else + BUILD_SNIFFTEST_TRUE='#' + BUILD_SNIFFTEST_FALSE= +fi + + +# AES-GCM +# Check whether --enable-aesgcm was given. +if test "${enable_aesgcm+set}" = set; then : + enableval=$enable_aesgcm; ENABLED_AESGCM=$enableval +else + ENABLED_AESGCM=no + +fi + + +if test "$ENABLED_AESGCM" = "word32" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "small" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "table" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" +fi + + if test "x$ENABLED_AESGCM" = "xyes"; then + BUILD_AESGCM_TRUE= + BUILD_AESGCM_FALSE='#' +else + BUILD_AESGCM_TRUE='#' + BUILD_AESGCM_FALSE= +fi + + + +# AES-CCM +# Check whether --enable-aesccm was given. +if test "${enable_aesccm+set}" = set; then : + enableval=$enable_aesccm; ENABLED_AESCCM=$enableval +else + ENABLED_AESCCM=no + +fi + + +if test "$ENABLED_AESCCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" +fi + + if test "x$ENABLED_AESCCM" = "xyes"; then + BUILD_AESCCM_TRUE= + BUILD_AESCCM_FALSE='#' +else + BUILD_AESCCM_TRUE='#' + BUILD_AESCCM_FALSE= +fi + + + +# AES-NI +# Check whether --enable-aesni was given. +if test "${enable_aesni+set}" = set; then : + enableval=$enable_aesni; ENABLED_AESNI=$enableval +else + ENABLED_AESNI=no + +fi + + +if test "$ENABLED_AESNI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" + if test "$GCC" = "yes" + then + # GCC needs these flags, icc doesn't + # opt levels greater than 2 may cause problems on systems w/o aesni + AM_CFLAGS="$AM_CFLAGS -maes -msse4" + fi +fi + + if test "x$ENABLED_AESNI" = "xyes"; then + BUILD_AESNI_TRUE= + BUILD_AESNI_FALSE='#' +else + BUILD_AESNI_TRUE='#' + BUILD_AESNI_FALSE= +fi + + + +# Camellia +# Check whether --enable-camellia was given. +if test "${enable_camellia+set}" = set; then : + enableval=$enable_camellia; ENABLED_CAMELLIA=$enableval +else + ENABLED_CAMELLIA=no + +fi + + +if test "$ENABLED_CAMELLIA" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" +fi + + if test "x$ENABLED_CAMELLIA" = "xyes"; then + BUILD_CAMELLIA_TRUE= + BUILD_CAMELLIA_FALSE='#' +else + BUILD_CAMELLIA_TRUE='#' + BUILD_CAMELLIA_FALSE= +fi + + + +# MD2 +# Check whether --enable-md2 was given. +if test "${enable_md2+set}" = set; then : + enableval=$enable_md2; ENABLED_MD2=$enableval +else + ENABLED_MD2=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_MD2="yes" +fi + +if test "$ENABLED_MD2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" +fi + + if test "x$ENABLED_MD2" = "xyes"; then + BUILD_MD2_TRUE= + BUILD_MD2_FALSE='#' +else + BUILD_MD2_TRUE='#' + BUILD_MD2_FALSE= +fi + + + +# NULL CIPHER +# Check whether --enable-nullcipher was given. +if test "${enable_nullcipher+set}" = set; then : + enableval=$enable_nullcipher; ENABLED_NULL_CIPHER=$enableval +else + ENABLED_NULL_CIPHER=no + +fi + + +if test "$ENABLED_NULL_CIPHER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" +fi + +# RIPEMD +# Check whether --enable-ripemd was given. +if test "${enable_ripemd+set}" = set; then : + enableval=$enable_ripemd; ENABLED_RIPEMD=$enableval +else + ENABLED_RIPEMD=no + +fi + + +if test "$ENABLED_RIPEMD" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" +fi + + if test "x$ENABLED_RIPEMD" = "xyes"; then + BUILD_RIPEMD_TRUE= + BUILD_RIPEMD_FALSE='#' +else + BUILD_RIPEMD_TRUE='#' + BUILD_RIPEMD_FALSE= +fi + + + +# BLAKE2 +# Check whether --enable-blake2 was given. +if test "${enable_blake2+set}" = set; then : + enableval=$enable_blake2; ENABLED_BLAKE2=$enableval +else + ENABLED_BLAKE2=no + +fi + + +if test "$ENABLED_BLAKE2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" +fi + + if test "x$ENABLED_BLAKE2" = "xyes"; then + BUILD_BLAKE2_TRUE= + BUILD_BLAKE2_FALSE='#' +else + BUILD_BLAKE2_TRUE='#' + BUILD_BLAKE2_FALSE= +fi + + + +# SHA512 +# Check whether --enable-sha512 was given. +if test "${enable_sha512+set}" = set; then : + enableval=$enable_sha512; ENABLED_SHA512=$enableval +else + ENABLED_SHA512=no + +fi + + +if test "$ENABLED_SHA512" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" +fi + +if test "$ENABLED_FORTRESS" = "yes" +then + ENABLED_SHA512="yes" +fi + + + if test "x$ENABLED_SHA512" = "xyes"; then + BUILD_SHA512_TRUE= + BUILD_SHA512_FALSE='#' +else + BUILD_SHA512_TRUE='#' + BUILD_SHA512_FALSE= +fi + + + +# SESSION CERTS +# Check whether --enable-sessioncerts was given. +if test "${enable_sessioncerts+set}" = set; then : + enableval=$enable_sessioncerts; ENABLED_SESSIONCERTS=$enableval +else + ENABLED_SESSIONCERTS=no + +fi + + +if test "$ENABLED_SESSIONCERTS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" +fi + + +# KEY GENERATION +# Check whether --enable-keygen was given. +if test "${enable_keygen+set}" = set; then : + enableval=$enable_keygen; ENABLED_KEYGEN=$enableval +else + ENABLED_KEYGEN=no + +fi + + +if test "$ENABLED_KEYGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" +fi + + +# CERT GENERATION +# Check whether --enable-certgen was given. +if test "${enable_certgen+set}" = set; then : + enableval=$enable_certgen; ENABLED_CERTGEN=$enableval +else + ENABLED_CERTGEN=no + +fi + + +if test "$ENABLED_CERTGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" +fi + + +# CERT REQUEST GENERATION +# Check whether --enable-certreq was given. +if test "${enable_certreq+set}" = set; then : + enableval=$enable_certreq; ENABLED_CERTREQ=$enableval +else + ENABLED_CERTREQ=no + +fi + + +if test "$ENABLED_CERTREQ" = "yes" +then + if test "$ENABLED_CERTGEN" = "no" + then + as_fn_error $? "cannot enable certreq without enabling certgen." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" +fi + + +# SEP +# Check whether --enable-sep was given. +if test "${enable_sep+set}" = set; then : + enableval=$enable_sep; ENABLED_SEP=$enableval +else + ENABLED_SEP=no + +fi + +if test "$ENABLED_SEP" = "yes" +then + AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" +fi + + +# HKDF +# Check whether --enable-hkdf was given. +if test "${enable_hkdf+set}" = set; then : + enableval=$enable_hkdf; ENABLED_HKDF=$enableval +else + ENABLED_HKDF=no + +fi + +if test "$ENABLED_HKDF" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" +fi + + +# DSA +# Check whether --enable-dsa was given. +if test "${enable_dsa+set}" = set; then : + enableval=$enable_dsa; ENABLED_DSA=$enableval +else + ENABLED_DSA=no + +fi + + +if test "$ENABLED_DSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DSA" +fi + + if test "x$ENABLED_DSA" = "xyes"; then + BUILD_DSA_TRUE= + BUILD_DSA_FALSE='#' +else + BUILD_DSA_TRUE='#' + BUILD_DSA_FALSE= +fi + + + +# ECC +# Check whether --enable-ecc was given. +if test "${enable_ecc+set}" = set; then : + enableval=$enable_ecc; ENABLED_ECC=$enableval +else + ENABLED_ECC=no + +fi + + +if test "$ENABLED_ECC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" +fi + + if test "x$ENABLED_ECC" = "xyes"; then + BUILD_ECC_TRUE= + BUILD_ECC_FALSE='#' +else + BUILD_ECC_TRUE='#' + BUILD_ECC_FALSE= +fi + + + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable ecc and small, ecc requires TLS which small turns off." "$LINENO" 5 +fi + + +# FP ECC, Fixed Point cache ECC +# Check whether --enable-fpecc was given. +if test "${enable_fpecc+set}" = set; then : + enableval=$enable_fpecc; ENABLED_FPECC=$enableval +else + ENABLED_FPECC=no + +fi + + +if test "$ENABLED_FPECC" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + as_fn_error $? "cannot enable fpecc without enabling ecc." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DFP_ECC" +fi + + +# ECC encrypt +# Check whether --enable-eccencrypt was given. +if test "${enable_eccencrypt+set}" = set; then : + enableval=$enable_eccencrypt; ENABLED_ECC_ENCRYPT=$enableval +else + ENABLED_ECC_ENCRYPT=no + +fi + + +if test "$ENABLED_ECC_ENCRYPT" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + as_fn_error $? "cannot enable eccencrypt without enabling ecc." "$LINENO" 5 + fi + if test "$ENABLED_HKDF" = "no" + then + as_fn_error $? "cannot enable eccencrypt without enabling hkdf." "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" +fi + + +# PSK +# Check whether --enable-psk was given. +if test "${enable_psk+set}" = set; then : + enableval=$enable_psk; ENABLED_PSK=$enableval +else + ENABLED_PSK=no + +fi + + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_PSK" +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" +then + ENABLED_PSK=yes +fi + + +# ERROR STRINGS +# Check whether --enable-errorstrings was given. +if test "${enable_errorstrings+set}" = set; then : + enableval=$enable_errorstrings; ENABLED_ERROR_STRINGS=$enableval +else + ENABLED_ERROR_STRINGS=yes + +fi + + +if test "$ENABLED_ERROR_STRINGS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" +else + # turn off error strings if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" + ENABLED_ERROR_STRINGS=no + fi +fi + + +# OLD TLS +# Check whether --enable-oldtls was given. +if test "${enable_oldtls+set}" = set; then : + enableval=$enable_oldtls; ENABLED_OLD_TLS=$enableval +else + ENABLED_OLD_TLS=yes + +fi + + +if test "$ENABLED_OLD_TLS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" +else + # turn off old if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" + ENABLED_OLD_TLS=no + fi +fi + + +# STACK SIZE info for examples +# Check whether --enable-stacksize was given. +if test "${enable_stacksize+set}" = set; then : + enableval=$enable_stacksize; ENABLED_STACKSIZE=$enableval +else + ENABLED_STACKSIZE=no + +fi + + +if test "$ENABLED_STACKSIZE" = "yes" +then + ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" +if test "x$ac_cv_func_posix_memalign" = xyes; then : + +else + as_fn_error $? "stacksize needs posix_memalign" "$LINENO" 5 +fi + + ac_fn_c_check_func "$LINENO" "pthread_attr_setstack" "ac_cv_func_pthread_attr_setstack" +if test "x$ac_cv_func_pthread_attr_setstack" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstack in -lpthread" >&5 +$as_echo_n "checking for pthread_attr_setstack in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_attr_setstack+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_setstack (); +int +main () +{ +return pthread_attr_setstack (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_attr_setstack=yes +else + ac_cv_lib_pthread_pthread_attr_setstack=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstack" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_attr_setstack" >&6; } +if test "x$ac_cv_lib_pthread_pthread_attr_setstack" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + +fi + + AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" +fi + + +# MEMORY +# Check whether --enable-memory was given. +if test "${enable_memory+set}" = set; then : + enableval=$enable_memory; ENABLED_MEMORY=$enableval +else + ENABLED_MEMORY=yes + +fi + + +if test "$ENABLED_MEMORY" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" +else + # turn off memory cb if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + # but don't turn on NO_CYASSL_MEMORY because using own + ENABLED_MEMORY=no + fi +fi + + if test "x$ENABLED_MEMORY" = "xyes"; then + BUILD_MEMORY_TRUE= + BUILD_MEMORY_FALSE='#' +else + BUILD_MEMORY_TRUE='#' + BUILD_MEMORY_FALSE= +fi + + + +# RSA +# Check whether --enable-rsa was given. +if test "${enable_rsa+set}" = set; then : + enableval=$enable_rsa; ENABLED_RSA=$enableval +else + ENABLED_RSA=yes + +fi + + +if test "$ENABLED_RSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" +else + # turn off RSA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" + ENABLED_RSA=no + fi +fi + + if test "x$ENABLED_RSA" = "xyes"; then + BUILD_RSA_TRUE= + BUILD_RSA_FALSE='#' +else + BUILD_RSA_TRUE='#' + BUILD_RSA_FALSE= +fi + + + +# DH +# Check whether --enable-dh was given. +if test "${enable_dh+set}" = set; then : + enableval=$enable_dh; ENABLED_DH=$enableval +else + ENABLED_DH=yes + +fi + + +if test "$ENABLED_DH" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" +else + # turn off DH if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" + ENABLED_DH=no + fi +fi + + if test "x$ENABLED_DH" = "xyes"; then + BUILD_DH_TRUE= + BUILD_DH_FALSE='#' +else + BUILD_DH_TRUE='#' + BUILD_DH_FALSE= +fi + + + +# ASN +# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, +# and no big int, use this to disable all public key stuff +# Check whether --enable-asn was given. +if test "${enable_asn+set}" = set; then : + enableval=$enable_asn; ENABLED_ASN=$enableval +else + ENABLED_ASN=yes + +fi + + +if test "$ENABLED_ASN" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" +else + # turn off ASN if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" + ENABLED_ASN=no + fi +fi + +if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable rsa if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable dsa if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable dh if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please disable ecc if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" +then + as_fn_error $? "please enable psk if disabling asn." "$LINENO" 5 +fi + +if test "$ENABLED_ASN" = "no" +then + ENABLED_FASTMATH=no + ENABLED_SLOWMATH=no +fi + + if test "x$ENABLED_ASN" = "xyes"; then + BUILD_ASN_TRUE= + BUILD_ASN_FALSE='#' +else + BUILD_ASN_TRUE='#' + BUILD_ASN_FALSE= +fi + + + +# AES +# Check whether --enable-aes was given. +if test "${enable_aes+set}" = set; then : + enableval=$enable_aes; ENABLED_AES=$enableval +else + ENABLED_AES=yes + +fi + + +if test "$ENABLED_AES" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" +else + # turn off AES if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" + ENABLED_AES=no + fi +fi + + if test "x$ENABLED_AES" = "xyes"; then + BUILD_AES_TRUE= + BUILD_AES_FALSE='#' +else + BUILD_AES_TRUE='#' + BUILD_AES_FALSE= +fi + + + +# CODING +# Check whether --enable-coding was given. +if test "${enable_coding+set}" = set; then : + enableval=$enable_coding; ENABLED_CODING=$enableval +else + ENABLED_CODING=yes + +fi + + +if test "$ENABLED_CODING" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" +else + # turn off CODING if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" + ENABLED_CODING=no + fi +fi + + if test "x$ENABLED_CODING" = "xyes"; then + BUILD_CODING_TRUE= + BUILD_CODING_FALSE='#' +else + BUILD_CODING_TRUE='#' + BUILD_CODING_FALSE= +fi + + + +# DES3 +# Check whether --enable-des3 was given. +if test "${enable_des3+set}" = set; then : + enableval=$enable_des3; ENABLED_DES3=$enableval +else + ENABLED_DES3=yes + +fi + + +if test "$ENABLED_DES3" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" +else + # turn off DES3 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" + ENABLED_DES3=no + fi +fi + + if test "x$ENABLED_DES3" = "xyes"; then + BUILD_DES3_TRUE= + BUILD_DES3_FALSE='#' +else + BUILD_DES3_TRUE='#' + BUILD_DES3_FALSE= +fi + + + +# ARC4 +# Check whether --enable-arc4 was given. +if test "${enable_arc4+set}" = set; then : + enableval=$enable_arc4; ENABLED_ARC4=$enableval +else + ENABLED_ARC4=yes + +fi + + +if test "$ENABLED_ARC4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" +else + # turn off ARC4 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" + ENABLED_ARC4=no + fi +fi + + if test "x$ENABLED_ARC4" = "xyes"; then + BUILD_RC4_TRUE= + BUILD_RC4_FALSE='#' +else + BUILD_RC4_TRUE='#' + BUILD_RC4_FALSE= +fi + + + +# MD5 +# Check whether --enable-md5 was given. +if test "${enable_md5+set}" = set; then : + enableval=$enable_md5; ENABLED_MD5=$enableval +else + ENABLED_MD5=yes + +fi + + +if test "$ENABLED_MD5" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" +else + # turn off MD5 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" + ENABLED_MD5=no + fi +fi + + if test "x$ENABLED_MD5" = "xyes"; then + BUILD_MD5_TRUE= + BUILD_MD5_FALSE='#' +else + BUILD_MD5_TRUE='#' + BUILD_MD5_FALSE= +fi + + + +# SHA +# Check whether --enable-sha was given. +if test "${enable_sha+set}" = set; then : + enableval=$enable_sha; ENABLED_SHA=$enableval +else + ENABLED_SHA=yes + +fi + + +if test "$ENABLED_SHA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" +else + # turn off SHA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" + ENABLED_SHA=no + fi +fi + + if test "x$ENABLED_SHA" = "xyes"; then + BUILD_SHA_TRUE= + BUILD_SHA_FALSE='#' +else + BUILD_SHA_TRUE='#' + BUILD_SHA_FALSE= +fi + + + +# MD4 +# Check whether --enable-md4 was given. +if test "${enable_md4+set}" = set; then : + enableval=$enable_md4; ENABLED_MD4=$enableval +else + ENABLED_MD4=no + +fi + + +if test "$ENABLED_MD4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD4" +fi + + if test "x$ENABLED_MD4" = "xyes"; then + BUILD_MD4_TRUE= + BUILD_MD4_FALSE='#' +else + BUILD_MD4_TRUE='#' + BUILD_MD4_FALSE= +fi + + + +# Web Server Build +# Check whether --enable-webserver was given. +if test "${enable_webserver+set}" = set; then : + enableval=$enable_webserver; ENABLED_WEBSERVER=$enableval +else + ENABLED_WEBSERVER=no + +fi + + +if test "$ENABLED_WEBSERVER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" +fi + + +# PWDBASED +# Check whether --enable-pwdbased was given. +if test "${enable_pwdbased+set}" = set; then : + enableval=$enable_pwdbased; ENABLED_PWDBASED=$enableval +else + ENABLED_PWDBASED=no + +fi + + +if test "$ENABLED_PWDBASED" = "no" +then + if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" + then + # opensslextra and webserver needs pwdbased + ENABLED_PWDBASED=yes + else + AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" + fi +fi + + if test "x$ENABLED_PWDBASED" = "xyes"; then + BUILD_PWDBASED_TRUE= + BUILD_PWDBASED_FALSE='#' +else + BUILD_PWDBASED_TRUE='#' + BUILD_PWDBASED_FALSE= +fi + + + +# HC128 +# Check whether --enable-hc128 was given. +if test "${enable_hc128+set}" = set; then : + enableval=$enable_hc128; ENABLED_HC128=$enableval +else + ENABLED_HC128=no + +fi + + +if test "$ENABLED_HC128" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_HC128" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" +fi + + if test "x$ENABLED_HC128" = "xyes"; then + BUILD_HC128_TRUE= + BUILD_HC128_FALSE='#' +else + BUILD_HC128_TRUE='#' + BUILD_HC128_FALSE= +fi + + + +# RABBIT +# Check whether --enable-rabbit was given. +if test "${enable_rabbit+set}" = set; then : + enableval=$enable_rabbit; ENABLED_RABBIT=$enableval +else + ENABLED_RABBIT=no + +fi + + +if test "$ENABLED_RABBIT" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" +fi + + if test "x$ENABLED_RABBIT" = "xyes"; then + BUILD_RABBIT_TRUE= + BUILD_RABBIT_FALSE='#' +else + BUILD_RABBIT_TRUE='#' + BUILD_RABBIT_FALSE= +fi + + + +# FIPS +# Check whether --enable-fips was given. +if test "${enable_fips+set}" = set; then : + enableval=$enable_fips; ENABLED_FIPS=$enableval +else + ENABLED_FIPS=no + +fi + + +if test "x$ENABLED_FIPS" = "xyes" +then + # requires thread local storage + if test "$thread_ls_on" = "no" + then + as_fn_error $? "FIPS requires Thread Local Storage" "$LINENO" 5 + fi + # requires SHA512 + if test "x$ENABLED_SHA512" = "xno" + then + ENABLED_SHA512="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" + if test "x$ENABLED_SHA512" = "xyes"; then + BUILD_SHA512_TRUE= + BUILD_SHA512_FALSE='#' +else + BUILD_SHA512_TRUE='#' + BUILD_SHA512_FALSE= +fi + + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" +fi + + if test "x$ENABLED_FIPS" = "xyes"; then + BUILD_FIPS_TRUE= + BUILD_FIPS_FALSE='#' +else + BUILD_FIPS_TRUE='#' + BUILD_FIPS_FALSE= +fi + + + +# Filesystem Build +# Check whether --enable-filesystem was given. +if test "${enable_filesystem+set}" = set; then : + enableval=$enable_filesystem; ENABLED_FILESYSTEM=$enableval +else + ENABLED_FILESYSTEM=yes + +fi + + +if test "$ENABLED_FILESYSTEM" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" +else + # turn off filesystem if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" + ENABLED_FILESYSTEM=no + fi +fi + + +# inline Build +# Check whether --enable-inline was given. +if test "${enable_inline+set}" = set; then : + enableval=$enable_inline; ENABLED_INLINE=$enableval +else + ENABLED_INLINE=yes + +fi + + +if test "$ENABLED_INLINE" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" +fi + + if test "x$ENABLED_INLINE" = "xyes"; then + BUILD_INLINE_TRUE= + BUILD_INLINE_FALSE='#' +else + BUILD_INLINE_TRUE='#' + BUILD_INLINE_FALSE= +fi + + + +# OCSP +# Check whether --enable-ocsp was given. +if test "${enable_ocsp+set}" = set; then : + enableval=$enable_ocsp; ENABLED_OCSP=$enableval +else + ENABLED_OCSP=no +fi + + +if test "$ENABLED_OCSP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" +fi + + if test "x$ENABLED_OCSP" = "xyes"; then + BUILD_OCSP_TRUE= + BUILD_OCSP_FALSE='#' +else + BUILD_OCSP_TRUE='#' + BUILD_OCSP_FALSE= +fi + + + +if test "$ENABLED_OCSP" = "yes" +then + # check openssl command tool for testing ocsp + # Extract the first word of "openssl", so it can be a program name with args. +set dummy openssl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_OPENSSL_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_OPENSSL_CMD"; then + ac_cv_prog_HAVE_OPENSSL_CMD="$HAVE_OPENSSL_CMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_OPENSSL_CMD="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_OPENSSL_CMD" && ac_cv_prog_HAVE_OPENSSL_CMD="no" +fi +fi +HAVE_OPENSSL_CMD=$ac_cv_prog_HAVE_OPENSSL_CMD +if test -n "$HAVE_OPENSSL_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OPENSSL_CMD" >&5 +$as_echo "$HAVE_OPENSSL_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$HAVE_OPENSSL_CMD" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl command line tool not available for testing ocsp" >&5 +$as_echo "$as_me: WARNING: openssl command line tool not available for testing ocsp" >&2;} + fi +fi + + +# CRL +# Check whether --enable-crl was given. +if test "${enable_crl+set}" = set; then : + enableval=$enable_crl; ENABLED_CRL=$enableval +else + ENABLED_CRL=no +fi + + +if test "$ENABLED_CRL" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" +fi + + if test "x$ENABLED_CRL" = "xyes"; then + BUILD_CRL_TRUE= + BUILD_CRL_FALSE='#' +else + BUILD_CRL_TRUE='#' + BUILD_CRL_FALSE= +fi + + + +# CRL Monitor +# Check whether --enable-crl-monitor was given. +if test "${enable_crl_monitor+set}" = set; then : + enableval=$enable_crl_monitor; ENABLED_CRL_MONITOR=$enableval +else + ENABLED_CRL_MONITOR=no +fi + + +if test "$ENABLED_CRL_MONITOR" = "yes" +then + case $host_os in + *linux* | *darwin* | *freebsd*) + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; + *) + as_fn_error $? "crl monitor only allowed on linux, OS X, or freebsd" "$LINENO" 5 ;; + esac +fi + + if test "x$ENABLED_CRL_MONITOR" = "xyes"; then + BUILD_CRL_MONITOR_TRUE= + BUILD_CRL_MONITOR_FALSE='#' +else + BUILD_CRL_MONITOR_TRUE='#' + BUILD_CRL_MONITOR_FALSE= +fi + + + +# NTRU +ntruHome=`pwd`/NTRU_algorithm +ntruInclude=$ntruHome/cryptolib +ntruLib=$ntruHome +# Check whether --enable-ntru was given. +if test "${enable_ntru+set}" = set; then : + enableval=$enable_ntru; ENABLED_NTRU=$enableval +else + ENABLED_NTRU=no + +fi + + +if test "$ENABLED_NTRU" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" + AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" + LIBS="$LIBS -lntru_encrypt" +fi + + if test "x$ENABLED_NTRU" = "xyes"; then + BUILD_NTRU_TRUE= + BUILD_NTRU_FALSE='#' +else + BUILD_NTRU_TRUE='#' + BUILD_NTRU_FALSE= +fi + + +if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" +then + as_fn_error $? "cannot enable ntru and small, ntru requires TLS which small turns off." "$LINENO" 5 +fi + +# SNI +# Check whether --enable-sni was given. +if test "${enable_sni+set}" = set; then : + enableval=$enable_sni; ENABLED_SNI=$enableval +else + ENABLED_SNI=no + +fi + + +if test "x$ENABLED_SNI" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" +fi + +# Maximum Fragment Length +# Check whether --enable-maxfragment was given. +if test "${enable_maxfragment+set}" = set; then : + enableval=$enable_maxfragment; ENABLED_MAX_FRAGMENT=$enableval +else + ENABLED_MAX_FRAGMENT=no + +fi + + +if test "x$ENABLED_MAX_FRAGMENT" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" +fi + +# Truncated HMAC +# Check whether --enable-truncatedhmac was given. +if test "${enable_truncatedhmac+set}" = set; then : + enableval=$enable_truncatedhmac; ENABLED_TRUNCATED_HMAC=$enableval +else + ENABLED_TRUNCATED_HMAC=no + +fi + + +if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" +fi + +# Renegotiation Indication +# Check whether --enable-renegotiation-indication was given. +if test "${enable_renegotiation_indication+set}" = set; then : + enableval=$enable_renegotiation_indication; ENABLED_RENEGOTIATION_INDICATION=$enableval +else + ENABLED_RENEGOTIATION_INDICATION=no + +fi + + +if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" +fi + +# Supported Elliptic Curves Extensions +# Check whether --enable-supportedcurves was given. +if test "${enable_supportedcurves+set}" = set; then : + enableval=$enable_supportedcurves; ENABLED_SUPPORTED_CURVES=$enableval +else + ENABLED_SUPPORTED_CURVES=no + +fi + + +if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" +fi + +# TLS Extensions +# Check whether --enable-tlsx was given. +if test "${enable_tlsx+set}" = set; then : + enableval=$enable_tlsx; ENABLED_TLSX=$enableval +else + ENABLED_TLSX=no + +fi + + +if test "x$ENABLED_TLSX" = "xyes" +then + ENABLED_SNI=yes + ENABLED_MAX_FRAGMENT=yes + ENABLED_TRUNCATED_HMAC=yes + ENABLED_RENEGOTIATION_INDICATION=yes + ENABLED_SUPPORTED_CURVES=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" +fi + +# PKCS7 +# Check whether --enable-pkcs7 was given. +if test "${enable_pkcs7+set}" = set; then : + enableval=$enable_pkcs7; ENABLED_PKCS7=$enableval +else + ENABLED_PKCS7=no +fi + + +if test "$ENABLED_PKCS7" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" +fi + + if test "x$ENABLED_PKCS7" = "xyes"; then + BUILD_PKCS7_TRUE= + BUILD_PKCS7_FALSE='#' +else + BUILD_PKCS7_TRUE='#' + BUILD_PKCS7_FALSE= +fi + + + +# Simple Certificate Enrollment Protocol (SCEP) +# Check whether --enable-scep was given. +if test "${enable_scep+set}" = set; then : + enableval=$enable_scep; ENABLED_WOLFSCEP=$enableval +else + ENABLED_WOLFSCEP=no + +fi + +if test "$ENABLED_WOLFSCEP" = "yes" +then + # Enable prereqs if not already enabled + if test "x$ENABLED_KEYGEN" = "xno" + then + ENABLED_KEYGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" + fi + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_CERTREQ" = "xno" + then + ENABLED_CERTREQ="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" + fi + if test "x$ENABLED_PKCS7" = "xno" + then + ENABLED_PKCS7="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" + if test "x$ENABLED_PKCS7" = "xyes"; then + BUILD_PKCS7_TRUE= + BUILD_PKCS7_FALSE='#' +else + BUILD_PKCS7_TRUE='#' + BUILD_PKCS7_FALSE= +fi + + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" +fi + + +# Small Stack +# Check whether --enable-smallstack was given. +if test "${enable_smallstack+set}" = set; then : + enableval=$enable_smallstack; ENABLED_SMALL_STACK=$enableval +else + ENABLED_SMALL_STACK=yes + +fi + + +if test "x$ENABLED_SMALL_STACK" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" +fi + + +#valgrind +# Check whether --enable-valgrind was given. +if test "${enable_valgrind+set}" = set; then : + enableval=$enable_valgrind; ENABLED_VALGRIND=$enableval +else + ENABLED_VALGRIND=no + +fi + + +if test "$ENABLED_VALGRIND" = "yes" +then + # Extract the first word of "valgrind", so it can be a program name with args. +set dummy valgrind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_VALGRIND+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_VALGRIND"; then + ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_VALGRIND="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no" +fi +fi +HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND +if test -n "$HAVE_VALGRIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5 +$as_echo "$HAVE_VALGRIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$HAVE_VALGRIND" = "no" + then + as_fn_error $? "Valgrind not found." "$LINENO" 5 + fi + enable_shared=no + enable_static=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" +fi + + if test "x$ENABLED_VALGRIND" = "xyes"; then + USE_VALGRIND_TRUE= + USE_VALGRIND_FALSE='#' +else + USE_VALGRIND_TRUE='#' + USE_VALGRIND_FALSE= +fi + + + +# Test certs, use internal cert functions for extra testing +# Check whether --enable-testcert was given. +if test "${enable_testcert+set}" = set; then : + enableval=$enable_testcert; ENABLED_TESTCERT=$enableval +else + ENABLED_TESTCERT=no + +fi + + +if test "$ENABLED_TESTCERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" +fi + + +# I/O Pool, an example to show user how to override memory handler and use +# a pool for the input/output buffer requests +# Check whether --enable-iopool was given. +if test "${enable_iopool+set}" = set; then : + enableval=$enable_iopool; ENABLED_IOPOOL=$enableval +else + ENABLED_IOPOOL=no + +fi + + +if test "$ENABLED_IOPOOL" = "yes" +then + if test "$thread_ls_on" = "no" + then + as_fn_error $? "I/O Pool example requires Thread Local Storage" "$LINENO" 5 + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" +fi + + +# Certificate Service Support +# Check whether --enable-certservice was given. +if test "${enable_certservice+set}" = set; then : + enableval=$enable_certservice; ENABLED_CERT_SERVICE=$enableval +else + ENABLED_CERT_SERVICE=no + +fi + +if test "$ENABLED_CERT_SERVICE" = "yes" +then + # Requires ecc,certgen, and opensslextra make sure on + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_ECC" = "xno" + then + ENABLED_ECC="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" + if test "x$ENABLED_ECC" = "xyes"; then + BUILD_ECC_TRUE= + BUILD_ECC_FALSE='#' +else + BUILD_ECC_TRUE='#' + BUILD_ECC_FALSE= +fi + + fi + if test "x$ENABLED_OPENSSLEXTRA" = "xno" + then + ENABLED_OPENSSLEXTRA="yes" + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" +fi + + +# set fastmath default +FASTMATH_DEFAULT=no + +if test "$host_cpu" = "x86_64" +then +FASTMATH_DEFAULT=yes +fi + +# fastmath +# Check whether --enable-fastmath was given. +if test "${enable_fastmath+set}" = set; then : + enableval=$enable_fastmath; ENABLED_FASTMATH=$enableval +else + ENABLED_FASTMATH=$FASTMATH_DEFAULT + +fi + + +if test "x$ENABLED_FASTMATH" = "xyes" +then + # turn off fastmth if leanpsk on or asn off + if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" + then + ENABLED_FASTMATH=no + else + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" + fi +fi + + +# fast HUGE math +# Check whether --enable-fasthugemath was given. +if test "${enable_fasthugemath+set}" = set; then : + enableval=$enable_fasthugemath; ENABLED_FASTHUGEMATH=$enableval +else + ENABLED_FASTHUGEMATH=no + +fi + + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_FASTHUGEMATH="yes" +fi + +if test "$ENABLED_FASTHUGEMATH" = "yes" +then + ENABLED_FASTMATH="yes" + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" +fi + + if test "x$ENABLED_FASTMATH" = "xyes"; then + BUILD_FASTMATH_TRUE= + BUILD_FASTMATH_FALSE='#' +else + BUILD_FASTMATH_TRUE='#' + BUILD_FASTMATH_FALSE= +fi + + if test "x$ENABLED_SLOWMATH" = "xyes"; then + BUILD_SLOWMATH_TRUE= + BUILD_SLOWMATH_FALSE='#' +else + BUILD_SLOWMATH_TRUE='#' + BUILD_SLOWMATH_FALSE= +fi + + + +# Enable Examples, used to disable examples +# Check whether --enable-examples was given. +if test "${enable_examples+set}" = set; then : + enableval=$enable_examples; ENABLED_EXAMPLES=$enableval +else + ENABLED_EXAMPLES=yes + +fi + + +if test "x$ENABLED_FILESYSTEM" = "xno"; then : + ENABLED_EXAMPLES="no" +fi +if test "x$ENABLED_INLINE" = "xno"; then : + ENABLED_EXAMPLES="no" +fi +# certs still have sha signatures for now +if test "x$ENABLED_SHA" = "xno"; then : + ENABLED_EXAMPLES="no" +fi + if test "x$ENABLED_EXAMPLES" = "xyes"; then + BUILD_EXAMPLES_TRUE= + BUILD_EXAMPLES_FALSE='#' +else + BUILD_EXAMPLES_TRUE='#' + BUILD_EXAMPLES_FALSE= +fi + + + +# LIBZ +ENABLED_LIBZ="no" +trylibzdir="" + +# Check whether --with-libz was given. +if test "${with_libz+set}" = set; then : + withval=$with_libz; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz" >&5 +$as_echo_n "checking for libz... " >&6; } + CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" + LIBS="$LIBS -lz" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + deflateInit(0, 8); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libz_linked=yes +else + libz_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$libz_linked" == "xno" ; then + if test "x$withval" != "xno" ; then + trylibzdir=$withval + fi + if test "x$withval" == "xyes" ; then + trylibzdir="/usr" + fi + + AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" + CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + deflateInit(0, 8); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libz_linked=yes +else + libz_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$libz_linked" == "xno" ; then + as_fn_error $? "libz isn't found. + If it's already installed, specify its path using --with-libz=/dir/" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + ENABLED_LIBZ="yes" + + +fi + + if test "x$ENABLED_LIBZ" = "xyes"; then + BUILD_LIBZ_TRUE= + BUILD_LIBZ_FALSE='#' +else + BUILD_LIBZ_TRUE='#' + BUILD_LIBZ_FALSE= +fi + + + +# cavium +trycaviumdir="" + +# Check whether --with-cavium was given. +if test "${with_cavium+set}" = set; then : + withval=$with_cavium; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5 +$as_echo_n "checking for cavium... " >&6; } + CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" + + if test "x$withval" == "xyes" ; then + as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5 + fi + if test "x$withval" != "xno" ; then + trycaviumdir=$withval + fi + + LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" + CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cavium_common.h" +int +main () +{ + CspShutdown(CAVIUM_DEV_ID); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + cavium_linked=yes +else + cavium_linked=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$cavium_linked" == "xno" ; then + as_fn_error $? "cavium isn't found. + If it's already installed, specify its path using --with-cavium=/dir/" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_shared=no + enable_static=yes + + +fi + + + +# microchip api +# Check whether --enable-mcapi was given. +if test "${enable_mcapi+set}" = set; then : + enableval=$enable_mcapi; ENABLED_MCAPI=$enableval +else + ENABLED_MCAPI=no + +fi + + +if test "$ENABLED_MCAPI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" +then + as_fn_error $? "please enable sha512 if enabling mcapi." "$LINENO" 5 +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" +then + as_fn_error $? "please enable ecc if enabling mcapi." "$LINENO" 5 +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" +then + as_fn_error $? "please use --with-libz if enabling mcapi." "$LINENO" 5 +fi + + if test "x$ENABLED_MCAPI" = "xyes"; then + BUILD_MCAPI_TRUE= + BUILD_MCAPI_FALSE='#' +else + BUILD_MCAPI_TRUE='#' + BUILD_MCAPI_FALSE= +fi + + + + +# OPTIMIZE FLAGS +if test "$GCC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" + if test "$ax_enable_debug" = "no" + then + if test "$ENABLED_FASTMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" + if test "$ENABLED_FASTHUGEMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" + fi + else + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" + fi + fi +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + LIBS="-lsocket -lnsl $LIBS" +fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts " >&5 +$as_echo_n "checking whether C compiler accepts ... " >&6; } +if ${ax_cv_check_cflags__+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS " + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_cv_check_cflags__=yes +else + ax_cv_check_cflags__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__" >&5 +$as_echo "$ax_cv_check_cflags__" >&6; } +if test x"$ax_cv_check_cflags__" = xyes; then : + : +else + : +fi + +if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains "; } >&5 + (: CFLAGS already contains ) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \""; } >&5 + (: CFLAGS="$CFLAGS ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS " + ;; + esac +else + CFLAGS="" +fi + + + +for flag in ; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts " >&5 +$as_echo_n "checking whether the linker accepts ... " >&6; } +if ${ax_cv_check_ldflags__+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS " + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags__=yes +else + ax_cv_check_ldflags__=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__" >&5 +$as_echo "$ax_cv_check_ldflags__" >&6; } +if test x"$ax_cv_check_ldflags__" = xyes; then : + : +else + : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5 +$as_echo_n "checking for vcs system... " >&6; } +if ${ac_cv_vcs_system+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_vcs_system="none" + if test -d ".bzr"; then : + ac_cv_vcs_system="bazaar" +fi + if test -d ".svn"; then : + ac_cv_vcs_system="svn" +fi + if test -d ".hg"; then : + ac_cv_vcs_system="mercurial" +fi + if test -d ".git"; then : + ac_cv_vcs_system="git" +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5 +$as_echo "$ac_cv_vcs_system" >&6; } + +cat >>confdefs.h <<_ACEOF +#define VCS_SYSTEM "$ac_cv_vcs_system" +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5 +$as_echo_n "checking for vcs checkout... " >&6; } +if ${ac_cv_vcs_checkout+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$ac_cv_vcs_system" != "xnone"; then : + ac_cv_vcs_checkout=yes +else + ac_cv_vcs_checkout=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5 +$as_echo "$ac_cv_vcs_checkout" >&6; } + + if test "x$ac_cv_vcs_checkout" = "xyes"; then + IS_VCS_CHECKOUT_TRUE= + IS_VCS_CHECKOUT_FALSE='#' +else + IS_VCS_CHECKOUT_TRUE='#' + IS_VCS_CHECKOUT_FALSE= +fi + + if test "x$ac_cv_vcs_checkout" = "xyes"; then : + +$as_echo "#define VCS_CHECKOUT 1" >>confdefs.h + +else + +$as_echo "#define VCS_CHECKOUT 0" >>confdefs.h + +fi + + + + + + + AX_HARDEN_LIB= + ax_append_compile_link_flags_extra= + if test "x$ac_cv_vcs_checkout" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 +$as_echo_n "checking whether the linker accepts -Werror... " >&6; } +if ${ax_cv_check_ldflags___Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Werror=yes +else + ax_cv_check_ldflags___Werror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 +$as_echo "$ax_cv_check_ldflags___Werror" >&6; } +if test x"$ax_cv_check_ldflags___Werror" = xyes; then : + + AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" + +else + : +fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 +$as_echo_n "checking whether the linker accepts -Werror... " >&6; } +if ${ax_cv_check_ldflags___Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags___Werror=yes +else + ax_cv_check_ldflags___Werror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 +$as_echo "$ax_cv_check_ldflags___Werror" >&6; } +if test x"$ax_cv_check_ldflags___Werror" = xyes; then : + + ax_append_compile_link_flags_extra='-Werror' + +else + : +fi + + +fi + + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-z relro -z now" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5 +$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -z relro -z now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + + AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" + +else + : +fi + + + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-pie" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5 +$as_echo_n "checking whether the linker accepts -pie... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -pie" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + + AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" + +else + : +fi + + + LIB="$LIB $AX_HARDEN_LIB" + + + + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + CFLAGS= + ac_cv_warnings_as_errors=no + ax_append_compile_cflags_extra= + if test "$ac_cv_vcs_checkout" = "yes"; then : + + + +for flag in -Werror; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ac_cv_warnings_as_errors=yes + +else + + + +for flag in -Werror; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${ax_append_compile_cflags_extra+:} false; then : + case " $ax_append_compile_cflags_extra " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra already contains \$flag"; } >&5 + (: ax_append_compile_cflags_extra already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra \$flag\""; } >&5 + (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" + ;; + esac +else + ax_append_compile_cflags_extra="$flag" +fi + +else + : +fi + +done + + +fi + + if test "$ax_enable_debug" = "yes"; then : + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -ggdb; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -O0; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + + +for flag in -Wno-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wall; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wno-strict-aliasing; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wextra; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wthis-test-should-fail; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + if test "$CC" = "clang"; then : + +else + + + +for flag in --param=ssp-buffer-size=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + +for flag in -Waddress; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Warray-bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wbad-function-cast; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wchar-subscripts; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wcomment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wfloat-equal; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wformat-security; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wformat=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmaybe-uninitialized; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-field-initializers; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wmissing-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wnested-externs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wnormalized=id; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Woverride-init; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wpointer-arith; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wpointer-sign; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wredundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wshadow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wshorten-64-to-32; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wsign-compare; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wstrict-overflow=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wstrict-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wswitch-enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wundef; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused-result; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wunused-variable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -Wwrite-strings; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -fwrapv; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +for flag in -fPIE; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# link to ws2_32 if on mingw +case $host_os in + *mingw32) + LDFLAGS="$LDFLAGS -lws2_32" ;; +esac + +# add user C_EXTRA_FLAGS back +CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" +OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" + + + + HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \ + awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` + + + + + + +# FINAL +ac_config_files="$ac_config_files stamp-h" + +ac_config_files="$ac_config_files Makefile" + +ac_config_files="$ac_config_files cyassl/version.h" + +ac_config_files="$ac_config_files cyassl/options.h" + +ac_config_files="$ac_config_files support/cyassl.pc" + +ac_config_files="$ac_config_files rpm/spec" + + +# create a generic PACKAGE-config file +L=`echo $PACKAGE $LIBS` +P=`echo $L | sed -e 's/ -.*//'` +P=`echo $P` +V=`echo $VERSION` +F=`echo $P-config` +L=`echo -l$L | sed -e 's/^-llib/-l/'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: creating $F - generic $V for $L" >&5 +$as_echo "creating $F - generic $V for $L" >&6; } +test "x$prefix" = xNONE && prefix="$ac_default_prefix" +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +echo '#! /bin/sh' >$F +echo ' ' >>$F +echo 'package="'$P'"' >>$F +echo 'version="'$V'"' >>$F +echo 'libs="'$L'"' >>$F +echo ' ' >>$F +# in the order of occurence a standard automake Makefile +echo 'prefix="'$prefix'"' >>$F +echo 'exec_prefix="'$exec_prefix'"' >>$F +echo 'bindir="'$bindir'"' >>$F +echo 'sbindir="'$sbindir'"' >>$F +echo 'libexecdir="'$libexecdir'"' >>$F +echo 'datadir="'$datadir'"' >>$F +echo 'sysconfdir="'$sysconfdir'"' >>$F +echo 'sharedstatedir="'$sharedstatedir'"' >>$F +echo 'localstatedir="'$localstatedir'"' >>$F +echo 'libdir="'$libdir'"' >>$F +echo 'infodir="'$infodir'"' >>$F +echo 'mandir="'$mandir'"' >>$F +echo 'includedir="'$includedir'"' >>$F +echo 'target="'$target'"' >>$F +echo 'host="'$host'"' >>$F +echo 'build="'$build'"' >>$F +echo ' ' >>$F +echo 'if test "'"\$""#"'" -eq 0; then' >>$F +echo ' cat <>$F +echo 'Usage: $package-config OPTIONS' >>$F +echo 'Options:' >>$F +echo ' --prefix=DIR) : \$prefix' >>$F +echo ' --package) : \$package' >>$F +echo ' --version) : \$version' >>$F +echo ' --cflags) : -I\$includedir' >>$F +echo ' --libs) : -L\$libdir -l\$package' >>$F +echo ' --help) print all the options (not just these)' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +echo ' ' >>$F +echo 'o=""' >>$F +echo 'h=""' >>$F +echo 'for i in "$@"; do' >>$F +echo ' case $i in' >>$F +echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F +echo ' --prefix) o="$o $prefix" ;;' >>$F +echo ' --package) o="$o $package" ;;' >>$F +echo ' --version) o="$o $version" ;;' >>$F +echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F +echo ' then o="$o -I$includedir" ; fi' >>$F +echo ' ;;' >>$F +echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F +echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F +echo ' --bindir) o="$o $bindir" ;;' >>$F +echo ' --sbindir) o="$o $sbindir" ;;' >>$F +echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F +echo ' --datadir) o="$o $datadir" ;;' >>$F +echo ' --datainc) o="$o -I$datadir" ;;' >>$F +echo ' --datalib) o="$o -L$datadir" ;;' >>$F +echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F +echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F +echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F +echo ' --libdir) o="$o $libdir" ;;' >>$F +echo ' --libadd) o="$o -L$libdir" ;;' >>$F +echo ' --infodir) o="$o $infodir" ;;' >>$F +echo ' --mandir) o="$o $mandir" ;;' >>$F +echo ' --target) o="$o $target" ;;' >>$F +echo ' --host) o="$o $host" ;;' >>$F +echo ' --build) o="$o $build" ;;' >>$F +echo ' --data) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F +echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F +echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F +echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F +echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F +echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F +echo ' --help) h="1" ;;' >>$F +echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F +echo ' v=`echo $i | sed -e s://:\$:g`' >>$F +echo ' v=`eval "echo $v"` ' >>$F +echo ' o="$o $v" ;; ' >>$F +echo ' esac' >>$F +echo 'done' >>$F +echo ' ' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'eval "echo $o"' >>$F +echo ' ' >>$F +echo 'if test ! -z "$h" ; then ' >>$F +echo 'cat <>$F +echo ' --prefix=xxx) (what is that for anyway?)' >>$F +echo ' --prefix) \$prefix $prefix' >>$F +echo ' --package) \$package $package' >>$F +echo ' --version) \$version $version' >>$F +echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F +echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F +echo ' --exec_prefix) or... ' >>$F +echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F +echo ' --bindir) \$bindir $bindir' >>$F +echo ' --sbindir) \$sbindir $sbindir' >>$F +echo ' --libexecdir) \$libexecdir $libexecdir' >>$F +echo ' --datadir) \$datadir $datadir' >>$F +echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F +echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F +echo ' --localstatedir) \$localstatedir $localstatedir' >>$F +echo ' --libdir) \$libdir $libdir' >>$F +echo ' --infodir) \$infodir $infodir' >>$F +echo ' --mandir) \$mandir $mandir' >>$F +echo ' --target) \$target $target' >>$F +echo ' --host) \$host $host' >>$F +echo ' --build) \$build $build' >>$F +echo ' --data) -I\$datadir/\$package' >>$F +echo ' --pkgdatadir) \$datadir/\$package' >>$F +echo ' --pkglibdir) \$libdir/\$package' >>$F +echo ' --pkgincludedir) \$includedir/\$package' >>$F +echo ' --help) generated by ax_create_generic_config.m4' >>$F +echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F +echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +GENERIC_CONFIG="$F" + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 +$as_echo_n "checking the number of available CPUs... " >&6; } + CPU_COUNT="0" + + case $host_os in #( + + *darwin*) : + + if test -x /usr/sbin/sysctl; then : + + sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` + if test sysctl_a; then : + + CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` + +fi + +fi ;; #( + + *linux*) : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` + +fi + +fi + ;; #( + *) : + ;; +esac + + if test "x$CPU_COUNT" = "x0"; then : + + CPU_COUNT="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1) " >&5 +$as_echo "unable to detect (assuming 1) " >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT " >&5 +$as_echo "$CPU_COUNT " >&6; } + +fi + + +AX_DOLLAR="\$" +AX_SRB="\\135" +AX_SLB="\\133" +AX_BS="\\\\" +AX_DQ="\"" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5 +$as_echo "$as_me: adding automake macro support" >&6;} +AMINCLUDE="aminclude.am" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5 +$as_echo "$as_me: creating $AMINCLUDE" >&6;} +AMINCLUDE_TIME=`date` + + +printf " +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on $AMINCLUDE_TIME + +" > "$AMINCLUDE" + + +INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" + + + + + + # Check whether --enable-jobserver was given. +if test "${enable_jobserver+set}" = set; then : + enableval=$enable_jobserver; +else + enable_jobserver=yes +fi + + if test "x$enable_jobserver" = "xyes"; then + enable_jobserver=$CPU_COUNT + ((enable_jobserver++)) + fi + + if test "x$enable_jobserver" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5 +$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;} + + + + +printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE" + + + fi + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + as_fn_error $? "conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LEANPSK_TRUE}" && test -z "${BUILD_LEANPSK_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LEANPSK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SNIFFER_TRUE}" && test -z "${BUILD_SNIFFER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SNIFFER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SNIFFTEST_TRUE}" && test -z "${BUILD_SNIFFTEST_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SNIFFTEST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESGCM_TRUE}" && test -z "${BUILD_AESGCM_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESGCM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESCCM_TRUE}" && test -z "${BUILD_AESCCM_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESCCM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AESNI_TRUE}" && test -z "${BUILD_AESNI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AESNI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CAMELLIA_TRUE}" && test -z "${BUILD_CAMELLIA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CAMELLIA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD2_TRUE}" && test -z "${BUILD_MD2_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RIPEMD_TRUE}" && test -z "${BUILD_RIPEMD_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RIPEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_BLAKE2_TRUE}" && test -z "${BUILD_BLAKE2_FALSE}"; then + as_fn_error $? "conditional \"BUILD_BLAKE2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DSA_TRUE}" && test -z "${BUILD_DSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ECC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MEMORY_TRUE}" && test -z "${BUILD_MEMORY_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MEMORY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RSA_TRUE}" && test -z "${BUILD_RSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DH_TRUE}" && test -z "${BUILD_DH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ASN_TRUE}" && test -z "${BUILD_ASN_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ASN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AES_TRUE}" && test -z "${BUILD_AES_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CODING_TRUE}" && test -z "${BUILD_CODING_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CODING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DES3_TRUE}" && test -z "${BUILD_DES3_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DES3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RC4_TRUE}" && test -z "${BUILD_RC4_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RC4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD5_TRUE}" && test -z "${BUILD_MD5_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD5\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA_TRUE}" && test -z "${BUILD_SHA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MD4_TRUE}" && test -z "${BUILD_MD4_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MD4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PWDBASED_TRUE}" && test -z "${BUILD_PWDBASED_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PWDBASED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_HC128_TRUE}" && test -z "${BUILD_HC128_FALSE}"; then + as_fn_error $? "conditional \"BUILD_HC128\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_RABBIT_TRUE}" && test -z "${BUILD_RABBIT_FALSE}"; then + as_fn_error $? "conditional \"BUILD_RABBIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_FIPS_TRUE}" && test -z "${BUILD_FIPS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_FIPS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_INLINE_TRUE}" && test -z "${BUILD_INLINE_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_OCSP_TRUE}" && test -z "${BUILD_OCSP_FALSE}"; then + as_fn_error $? "conditional \"BUILD_OCSP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CRL_TRUE}" && test -z "${BUILD_CRL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CRL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CRL_MONITOR_TRUE}" && test -z "${BUILD_CRL_MONITOR_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CRL_MONITOR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_NTRU_TRUE}" && test -z "${BUILD_NTRU_FALSE}"; then + as_fn_error $? "conditional \"BUILD_NTRU\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_VALGRIND_TRUE}" && test -z "${USE_VALGRIND_FALSE}"; then + as_fn_error $? "conditional \"USE_VALGRIND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ECC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_FASTMATH_TRUE}" && test -z "${BUILD_FASTMATH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_FASTMATH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SLOWMATH_TRUE}" && test -z "${BUILD_SLOWMATH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SLOWMATH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then + as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LIBZ_TRUE}" && test -z "${BUILD_LIBZ_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LIBZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MCAPI_TRUE}" && test -z "${BUILD_MCAPI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MCAPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then + as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cyassl $as_me 3.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +cyassl home page: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +cyassl config.status 3.0.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; + "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; + "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; + "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + "stamp-h":F) echo timestamp > stamp-h ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + + +# force make clean +echo "---" +echo "Running make clean..." +make clean >/dev/null 2>&1 +echo + +# generate user options header +echo "---" +echo "Generating user options header..." +OPTION_FILE="cyassl/options.h" +rm -f $OPTION_FILE + +echo "/* cyassl options.h" >> $OPTION_FILE +echo " * generated from configure options" >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * This file is part of CyaSSL." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " */" >> $OPTION_FILE + +echo "" >> $OPTION_FILE +echo "#pragma once" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "extern \"C\" {" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE + +for option in $OPTION_FLAGS; do + defonly=`echo $option | sed 's/-D//'` + if test "$defonly" != "$option" + then + noequalsign=`echo $defonly | sed 's/=/ /'` + echo "#undef $noequalsign" >> $OPTION_FILE + echo "#define $noequalsign" >> $OPTION_FILE + echo "" >> $OPTION_FILE + else + echo "option w/o begin -D is $option, not saving to $OPTION_FILE" + fi +done + +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "}" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo + +# output config summary +echo "---" +echo "Configuration summary for $PACKAGE_NAME version $VERSION" +echo "" +echo " * Installation prefix: $prefix" +echo " * System type: $host_vendor-$host_os" +echo " * Host CPU: $host_cpu" +echo " * C Compiler: $CC" +echo " * C Flags: $CFLAGS" +echo " * C++ Compiler: $CXX" +echo " * C++ Flags: $CXXFLAGS" +echo " * CPP Flags: $CPPFLAGS" +echo " * LIB Flags: $LIB" +echo " * Debug enabled: $ax_enable_debug" +echo " * Warnings as failure: $ac_cv_warnings_as_errors" +echo " * make -j: $enable_jobserver" +echo " * VCS checkout: $ac_cv_vcs_checkout" +echo +echo " Features " +echo " * Single threaded: $ENABLED_SINGLETHREADED" +echo " * Filesystem: $ENABLED_FILESYSTEM" +echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" +echo " * fastmath: $ENABLED_FASTMATH" +echo " * sniffer: $ENABLED_SNIFFER" +echo " * snifftest: $ENABLED_SNIFFTEST" +echo " * ARC4: $ENABLED_ARC4" +echo " * AES: $ENABLED_AES" +echo " * AES-NI: $ENABLED_AESNI" +echo " * AES-GCM: $ENABLED_AESGCM" +echo " * AES-CCM: $ENABLED_AESCCM" +echo " * DES3: $ENABLED_DES3" +echo " * Camellia: $ENABLED_CAMELLIA" +echo " * NULL Cipher: $ENABLED_NULL_CIPHER" +echo " * MD5: $ENABLED_MD5" +echo " * RIPEMD: $ENABLED_RIPEMD" +echo " * SHA: $ENABLED_SHA" +echo " * SHA-512: $ENABLED_SHA512" +echo " * BLAKE2: $ENABLED_BLAKE2" +echo " * keygen: $ENABLED_KEYGEN" +echo " * certgen: $ENABLED_CERTGEN" +echo " * certreq: $ENABLED_CERTREQ" +echo " * HC-128: $ENABLED_HC128" +echo " * RABBIT: $ENABLED_RABBIT" +echo " * PWDBASED: $ENABLED_PWDBASED" +echo " * HKDF: $ENABLED_HKDF" +echo " * MD4: $ENABLED_MD4" +echo " * PSK: $ENABLED_PSK" +echo " * LEANPSK: $ENABLED_LEANPSK" +echo " * RSA: $ENABLED_RSA" +echo " * DSA: $ENABLED_DSA" +echo " * DH: $ENABLED_DH" +echo " * ECC: $ENABLED_ECC" +echo " * FPECC: $ENABLED_FPECC" +echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" +echo " * ASN: $ENABLED_ASN" +echo " * CODING: $ENABLED_CODING" +echo " * MEMORY: $ENABLED_MEMORY" +echo " * I/O POOL: $ENABLED_IOPOOL" +echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" +echo " * DTLS: $ENABLED_DTLS" +echo " * Old TLS Versions: $ENABLED_OLD_TLS" +echo " * OCSP: $ENABLED_OCSP" +echo " * CRL: $ENABLED_CRL" +echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" +echo " * Persistent session cache: $ENABLED_SAVESESSION" +echo " * Persistent cert cache: $ENABLED_SAVECERT" +echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" +echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" +echo " * NTRU: $ENABLED_NTRU" +echo " * SNI: $ENABLED_SNI" +echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" +echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" +echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" +echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" +echo " * All TLS Extensions: $ENABLED_TLSX" +echo " * PKCS#7 $ENABLED_PKCS7" +echo " * wolfSCEP $ENABLED_WOLFSCEP" +echo " * Small Stack: $ENABLED_SMALL_STACK" +echo " * valgrind unit tests: $ENABLED_VALGRIND" +echo " * LIBZ: $ENABLED_LIBZ" +echo " * Examples: $ENABLED_EXAMPLES" +echo "" +echo "---" + diff --git a/project1/cyassl-3.0.0/configure.ac b/project1/cyassl-3.0.0/configure.ac new file mode 100644 index 00000000..2de6912a --- /dev/null +++ b/project1/cyassl-3.0.0/configure.ac @@ -0,0 +1,1782 @@ +# configure.ac +# +# Copyright (C) 2006-2014 wolfSSL Inc. +# +# This file is part of CyaSSL. +# +# + +AC_INIT([cyassl],[3.0.0],[https://github.com/cyassl/cyassl/issues],[cyassl],[http://www.wolfssl.com]) + +AC_CONFIG_AUX_DIR([build-aux]) + +AC_CANONICAL_HOST +AC_CANONICAL_BUILD + +AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests]) +AC_PREREQ([2.63]) + +AC_ARG_PROGRAM +AC_DEFUN([PROTECT_AC_USE_SYSTEM_EXTENSIONS], + [AX_SAVE_FLAGS + AC_LANG_PUSH([C]) + AC_USE_SYSTEM_EXTENSIONS + AC_LANG_POP([C]) + AX_RESTORE_FLAGS + ]) +#PROTECT_AC_USE_SYSTEM_EXTENSIONS + +AC_CONFIG_MACRO_DIR([m4]) + +AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS. + +#shared library versioning +CYASSL_LIBRARY_VERSION=5:5:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed +# | or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed +AC_SUBST([CYASSL_LIBRARY_VERSION]) + +# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even +# if user doesn't override, no way to tell +USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" + +LT_PREREQ([2.2]) +LT_INIT([disable-static],[win32-dll]) +LT_LANG([C++]) +LT_LANG([C]) + +gl_VISIBILITY +AS_IF([ test -n "$CFLAG_VISIBILITY" ], [ + AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" + CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" + ]) + +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +AC_CHECK_FUNCS([gethostbyname]) +AC_CHECK_FUNCS([getaddrinfo]) +AC_CHECK_FUNCS([gettimeofday]) +AC_CHECK_FUNCS([inet_ntoa]) +AC_CHECK_FUNCS([memset]) +AC_CHECK_FUNCS([socket]) +AC_CHECK_HEADERS([arpa/inet.h]) +AC_CHECK_HEADERS([fcntl.h]) +AC_CHECK_HEADERS([limits.h]) +AC_CHECK_HEADERS([netdb.h]) +AC_CHECK_HEADERS([netinet/in.h]) +AC_CHECK_HEADERS([stddef.h]) +AC_CHECK_HEADERS([sys/ioctl.h]) +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([errno.h]) +AC_CHECK_LIB(network,socket) +AC_CHECK_SIZEOF(long long, 8) +AC_CHECK_SIZEOF(long, 4) +AC_C_BIGENDIAN +# mktime check takes forever on some systems, if time supported it would be +# highly unusual for mktime to be missing +#AC_FUNC_MKTIME + +AC_PROG_CC +AC_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_INSTALL +AC_TYPE_SIZE_T +AC_TYPE_UINT8_T +AM_PROG_AS +AM_PROG_CC_C_O +LT_LIB_M + +OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" +OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" +OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" +DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" + +thread_ls_on=no +# Thread local storage +AX_TLS([ + [AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"] + [thread_ls_on=yes] + ] , [:]) + + +# DEBUG +AX_DEBUG +AS_IF([test "$ax_enable_debug" = "yes"], + [AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS"], + [AM_CFLAGS="$AM_CFLAGS -DNDEBUG"]) + + +# SINGLE THREADED +AC_ARG_ENABLE([singlethreaded], + [ --enable-singlethreaded Enable CyaSSL single threaded (default: disabled)], + [ ENABLED_SINGLETHREADED=$enableval ], + [ ENABLED_SINGLETHREADED=no ]) + +AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xno" ],[ + AX_PTHREAD([ + AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files.]) + AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + ],[ + ENABLED_SINGLETHREADED=yes + ]) + ]) + +AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" ]) + + +# DTLS +AC_ARG_ENABLE([dtls], + [ --enable-dtls Enable CyaSSL DTLS (default: disabled)], + [ ENABLED_DTLS=$enableval ], + [ ENABLED_DTLS=no ] + ) +if test "$ENABLED_DTLS" = "yes" +then + AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" +fi + + +# OPENSSL Extra Compatibility +AC_ARG_ENABLE([opensslextra], + [ --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled)], + [ ENABLED_OPENSSLEXTRA=$enableval ], + [ ENABLED_OPENSSLEXTRA=no ] + ) +if test "$ENABLED_OPENSSLEXTRA" = "yes" +then + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" +fi + +if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" +then + AC_MSG_ERROR([cannot enable small and opensslextra, only one or the other.]) +fi + + +# IPv6 Test Apps +AC_ARG_ENABLE([ipv6], + [ --enable-ipv6 Enable testing of IPV6 (default: disabled)], + [ ENABLED_IPV6=$enableval ], + [ ENABLED_IPV6=no ] + ) + +if test "$ENABLED_IPV6" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" +fi + + +# Fortress build +AC_ARG_ENABLE([fortress], + [ --enable-fortress Enable SSL fortress build (default: disabled)], + [ ENABLED_FORTRESS=$enableval ], + [ ENABLED_FORTRESS=no ] + ) + +if test "$ENABLED_FORTRESS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" +fi + + +# ssl bump build +AC_ARG_ENABLE([bump], + [ --enable-bump Enable SSL Bump build (default: disabled)], + [ ENABLED_BUMP=$enableval ], + [ ENABLED_BUMP=no ] + ) + +if test "$ENABLED_BUMP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" +fi + +ENABLED_SLOWMATH="yes" + +# lean psk build +AC_ARG_ENABLE([leanpsk], + [ --enable-leanpsk Enable Lean PSK build (default: disabled)], + [ ENABLED_LEANPSK=$enableval ], + [ ENABLED_LEANPSK=no ] + ) + +if test "$ENABLED_LEANPSK" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" + ENABLED_SLOWMATH="no" + ENABLED_SINGLETHREADED="yes" +fi + +AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"]) + + +# big cache +AC_ARG_ENABLE([bigcache], + [ --enable-bigcache Enable big session cache (default: disabled)], + [ ENABLED_BIGCACHE=$enableval ], + [ ENABLED_BIGCACHE=no ] + ) + +if test "$ENABLED_BIGCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" +fi + + +# HUGE cache +AC_ARG_ENABLE([hugecache], + [ --enable-hugecache Enable huge session cache (default: disabled)], + [ ENABLED_HUGECACHE=$enableval ], + [ ENABLED_HUGECACHE=no ] + ) + +if test "$ENABLED_HUGECACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" +fi + + +# SMALL cache +AC_ARG_ENABLE([smallcache], + [ --enable-smallcache Enable small session cache (default: disabled)], + [ ENABLED_SMALLCACHE=$enableval ], + [ ENABLED_SMALLCACHE=no ] + ) + +if test "$ENABLED_SMALLCACHE" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" +fi + + +# Persistent session cache +AC_ARG_ENABLE([savesession], + [ --enable-savesession Enable persistent session cache (default: disabled)], + [ ENABLED_SAVESESSION=$enableval ], + [ ENABLED_SAVESESSION=no ] + ) + +if test "$ENABLED_SAVESESSION" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" +fi + + +# Persistent cert cache +AC_ARG_ENABLE([savecert], + [ --enable-savecert Enable persistent cert cache (default: disabled)], + [ ENABLED_SAVECERT=$enableval ], + [ ENABLED_SAVECERT=no ] + ) + +if test "$ENABLED_SAVECERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" +fi + + +# Atomic User Record Layer +AC_ARG_ENABLE([atomicuser], + [ --enable-atomicuser Enable Atomic User Record Layer (default: disabled)], + [ ENABLED_ATOMICUSER=$enableval ], + [ ENABLED_ATOMICUSER=no ] + ) + +if test "$ENABLED_ATOMICUSER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" +fi + + +# Public Key Callbacks +AC_ARG_ENABLE([pkcallbacks], + [ --enable-pkcallbacks Enable Public Key Callbacks (default: disabled)], + [ ENABLED_PKCALLBACKS=$enableval ], + [ ENABLED_PKCALLBACKS=no ] + ) + +if test "$ENABLED_PKCALLBACKS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" +fi + + +# SNIFFER +ENABLED_SNIFFTEST=no +AC_ARG_ENABLE([sniffer], + [AS_HELP_STRING([--enable-sniffer],[ Enable CyaSSL sniffer support (default: disabled) ])],[ + ENABLED_SNIFFER=yes + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" + AS_IF([ test "x$enableval" = "xyes" ],[ AC_CHECK_HEADERS([pcap/pcap.h],[ + ENABLED_SNIFFTEST=yes + ],[ AC_MSG_WARN([cannot enable sniffer test without having libpcap available.]) ]) ]) + ],[ + ENABLED_SNIFFER=no + ]) + +AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" ]) +AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ]) + +# AES-GCM +AC_ARG_ENABLE([aesgcm], + [ --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled)], + [ ENABLED_AESGCM=$enableval ], + [ ENABLED_AESGCM=no ] + ) + +if test "$ENABLED_AESGCM" = "word32" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "small" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "table" +then + AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" + ENABLED_AESGCM=yes +fi + +if test "$ENABLED_AESGCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" +fi + +AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"]) + + +# AES-CCM +AC_ARG_ENABLE([aesccm], + [ --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled)], + [ ENABLED_AESCCM=$enableval ], + [ ENABLED_AESCCM=no ] + ) + +if test "$ENABLED_AESCCM" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" +fi + +AM_CONDITIONAL([BUILD_AESCCM], [test "x$ENABLED_AESCCM" = "xyes"]) + + +# AES-NI +AC_ARG_ENABLE([aesni], + [ --enable-aesni Enable CyaSSL AES-NI support (default: disabled)], + [ ENABLED_AESNI=$enableval ], + [ ENABLED_AESNI=no ] + ) + +if test "$ENABLED_AESNI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" + if test "$GCC" = "yes" + then + # GCC needs these flags, icc doesn't + # opt levels greater than 2 may cause problems on systems w/o aesni + AM_CFLAGS="$AM_CFLAGS -maes -msse4" + fi +fi + +AM_CONDITIONAL([BUILD_AESNI], [test "x$ENABLED_AESNI" = "xyes"]) + + +# Camellia +AC_ARG_ENABLE([camellia], + [ --enable-camellia Enable CyaSSL Camellia support (default: disabled)], + [ ENABLED_CAMELLIA=$enableval ], + [ ENABLED_CAMELLIA=no ] + ) + +if test "$ENABLED_CAMELLIA" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" +fi + +AM_CONDITIONAL([BUILD_CAMELLIA], [test "x$ENABLED_CAMELLIA" = "xyes"]) + + +# MD2 +AC_ARG_ENABLE([md2], + [ --enable-md2 Enable CyaSSL MD2 support (default: disabled)], + [ ENABLED_MD2=$enableval ], + [ ENABLED_MD2=no ] + ) + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_MD2="yes" +fi + +if test "$ENABLED_MD2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" +fi + +AM_CONDITIONAL([BUILD_MD2], [test "x$ENABLED_MD2" = "xyes"]) + + +# NULL CIPHER +AC_ARG_ENABLE([nullcipher], + [ --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled)], + [ ENABLED_NULL_CIPHER=$enableval ], + [ ENABLED_NULL_CIPHER=no ] + ) + +if test "$ENABLED_NULL_CIPHER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" +fi + +# RIPEMD +AC_ARG_ENABLE([ripemd], + [ --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled)], + [ ENABLED_RIPEMD=$enableval ], + [ ENABLED_RIPEMD=no ] + ) + +if test "$ENABLED_RIPEMD" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" +fi + +AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"]) + + +# BLAKE2 +AC_ARG_ENABLE([blake2], + [ --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled)], + [ ENABLED_BLAKE2=$enableval ], + [ ENABLED_BLAKE2=no ] + ) + +if test "$ENABLED_BLAKE2" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" +fi + +AM_CONDITIONAL([BUILD_BLAKE2], [test "x$ENABLED_BLAKE2" = "xyes"]) + + +# SHA512 +AC_ARG_ENABLE([sha512], + [ --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled)], + [ ENABLED_SHA512=$enableval ], + [ ENABLED_SHA512=no ] + ) + +if test "$ENABLED_SHA512" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" +fi + +if test "$ENABLED_FORTRESS" = "yes" +then + ENABLED_SHA512="yes" +fi + + +AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) + + +# SESSION CERTS +AC_ARG_ENABLE([sessioncerts], + [ --enable-sessioncerts Enable session cert storing (default: disabled)], + [ ENABLED_SESSIONCERTS=$enableval ], + [ ENABLED_SESSIONCERTS=no ] + ) + +if test "$ENABLED_SESSIONCERTS" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" +fi + + +# KEY GENERATION +AC_ARG_ENABLE([keygen], + [ --enable-keygen Enable key generation (default: disabled)], + [ ENABLED_KEYGEN=$enableval ], + [ ENABLED_KEYGEN=no ] + ) + +if test "$ENABLED_KEYGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" +fi + + +# CERT GENERATION +AC_ARG_ENABLE([certgen], + [ --enable-certgen Enable cert generation (default: disabled)], + [ ENABLED_CERTGEN=$enableval ], + [ ENABLED_CERTGEN=no ] + ) + +if test "$ENABLED_CERTGEN" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" +fi + + +# CERT REQUEST GENERATION +AC_ARG_ENABLE([certreq], + [ --enable-certreq Enable cert request generation (default: disabled)], + [ ENABLED_CERTREQ=$enableval ], + [ ENABLED_CERTREQ=no ] + ) + +if test "$ENABLED_CERTREQ" = "yes" +then + if test "$ENABLED_CERTGEN" = "no" + then + AC_MSG_ERROR([cannot enable certreq without enabling certgen.]) + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" +fi + + +# SEP +AC_ARG_ENABLE([sep], + [ --enable-sep Enable sep extensions (default: disabled)], + [ ENABLED_SEP=$enableval ], + [ ENABLED_SEP=no ] + ) +if test "$ENABLED_SEP" = "yes" +then + AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" +fi + + +# HKDF +AC_ARG_ENABLE([hkdf], + [ --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled)], + [ ENABLED_HKDF=$enableval ], + [ ENABLED_HKDF=no ] + ) +if test "$ENABLED_HKDF" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" +fi + + +# DSA +AC_ARG_ENABLE([dsa], + [ --enable-dsa Enable DSA (default: disabled)], + [ ENABLED_DSA=$enableval ], + [ ENABLED_DSA=no ] + ) + +if test "$ENABLED_DSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DSA" +fi + +AM_CONDITIONAL([BUILD_DSA], [test "x$ENABLED_DSA" = "xyes"]) + + +# ECC +AC_ARG_ENABLE([ecc], + [ --enable-ecc Enable ECC (default: disabled)], + [ ENABLED_ECC=$enableval ], + [ ENABLED_ECC=no ] + ) + +if test "$ENABLED_ECC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" +fi + +AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) + + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" +then + AC_MSG_ERROR([cannot enable ecc and small, ecc requires TLS which small turns off.]) +fi + + +# FP ECC, Fixed Point cache ECC +AC_ARG_ENABLE([fpecc], + [ --enable-fpecc Enable Fixed Point cache ECC (default: disabled)], + [ ENABLED_FPECC=$enableval ], + [ ENABLED_FPECC=no ] + ) + +if test "$ENABLED_FPECC" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + AC_MSG_ERROR([cannot enable fpecc without enabling ecc.]) + fi + AM_CFLAGS="$AM_CFLAGS -DFP_ECC" +fi + + +# ECC encrypt +AC_ARG_ENABLE([eccencrypt], + [ --enable-eccencrypt Enable ECC encrypt (default: disabled)], + [ ENABLED_ECC_ENCRYPT=$enableval ], + [ ENABLED_ECC_ENCRYPT=no ] + ) + +if test "$ENABLED_ECC_ENCRYPT" = "yes" +then + if test "$ENABLED_ECC" = "no" + then + AC_MSG_ERROR([cannot enable eccencrypt without enabling ecc.]) + fi + if test "$ENABLED_HKDF" = "no" + then + AC_MSG_ERROR([cannot enable eccencrypt without enabling hkdf.]) + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" +fi + + +# PSK +AC_ARG_ENABLE([psk], + [ --enable-psk Enable PSK (default: disabled)], + [ ENABLED_PSK=$enableval ], + [ ENABLED_PSK=no ] + ) + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_PSK" +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" +then + ENABLED_PSK=yes +fi + + +# ERROR STRINGS +AC_ARG_ENABLE([errorstrings], + [ --enable-errorstrings Enable error strings table (default: enabled)], + [ ENABLED_ERROR_STRINGS=$enableval ], + [ ENABLED_ERROR_STRINGS=yes ] + ) + +if test "$ENABLED_ERROR_STRINGS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" +else + # turn off error strings if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" + ENABLED_ERROR_STRINGS=no + fi +fi + + +# OLD TLS +AC_ARG_ENABLE([oldtls], + [ --enable-oldtls Enable old TLS versions < 1.2 (default: enabled)], + [ ENABLED_OLD_TLS=$enableval ], + [ ENABLED_OLD_TLS=yes ] + ) + +if test "$ENABLED_OLD_TLS" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" +else + # turn off old if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" + ENABLED_OLD_TLS=no + fi +fi + + +# STACK SIZE info for examples +AC_ARG_ENABLE([stacksize], + [ --enable-stacksize Enable stack size info on examples (default: disabled)], + [ ENABLED_STACKSIZE=$enableval ], + [ ENABLED_STACKSIZE=no ] + ) + +if test "$ENABLED_STACKSIZE" = "yes" +then + AC_CHECK_FUNC([posix_memalign], [], [AC_MSG_ERROR(stacksize needs posix_memalign)]) + AC_CHECK_FUNC([pthread_attr_setstack], [], AC_CHECK_LIB([pthread],[pthread_attr_setstack])) + AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" +fi + + +# MEMORY +AC_ARG_ENABLE([memory], + [ --enable-memory Enable memory callbacks (default: enabled)], + [ ENABLED_MEMORY=$enableval ], + [ ENABLED_MEMORY=yes ] + ) + +if test "$ENABLED_MEMORY" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" +else + # turn off memory cb if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + # but don't turn on NO_CYASSL_MEMORY because using own + ENABLED_MEMORY=no + fi +fi + +AM_CONDITIONAL([BUILD_MEMORY], [test "x$ENABLED_MEMORY" = "xyes"]) + + +# RSA +AC_ARG_ENABLE([rsa], + [ --enable-rsa Enable RSA (default: enabled)], + [ ENABLED_RSA=$enableval ], + [ ENABLED_RSA=yes ] + ) + +if test "$ENABLED_RSA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" +else + # turn off RSA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RSA" + ENABLED_RSA=no + fi +fi + +AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"]) + + +# DH +AC_ARG_ENABLE([dh], + [ --enable-dh Enable DH (default: enabled)], + [ ENABLED_DH=$enableval ], + [ ENABLED_DH=yes ] + ) + +if test "$ENABLED_DH" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" +else + # turn off DH if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DH" + ENABLED_DH=no + fi +fi + +AM_CONDITIONAL([BUILD_DH], [test "x$ENABLED_DH" = "xyes"]) + + +# ASN +# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, +# and no big int, use this to disable all public key stuff +AC_ARG_ENABLE([asn], + [ --enable-asn Enable ASN (default: enabled)], + [ ENABLED_ASN=$enableval ], + [ ENABLED_ASN=yes ] + ) + +if test "$ENABLED_ASN" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" +else + # turn off ASN if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" + ENABLED_ASN=no + fi +fi + +if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" +then + AC_MSG_ERROR([please disable rsa if disabling asn.]) +fi + +if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" +then + AC_MSG_ERROR([please disable dsa if disabling asn.]) +fi + +if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" +then + AC_MSG_ERROR([please disable dh if disabling asn.]) +fi + +if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" +then + AC_MSG_ERROR([please disable ecc if disabling asn.]) +fi + +if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" +then + AC_MSG_ERROR([please enable psk if disabling asn.]) +fi + +if test "$ENABLED_ASN" = "no" +then + ENABLED_FASTMATH=no + ENABLED_SLOWMATH=no +fi + +AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"]) + + +# AES +AC_ARG_ENABLE([aes], + [ --enable-aes Enable AES (default: enabled)], + [ ENABLED_AES=$enableval ], + [ ENABLED_AES=yes ] + ) + +if test "$ENABLED_AES" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" +else + # turn off AES if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_AES" + ENABLED_AES=no + fi +fi + +AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"]) + + +# CODING +AC_ARG_ENABLE([coding], + [ --enable-coding Enable Coding base 16/64 (default: enabled)], + [ ENABLED_CODING=$enableval ], + [ ENABLED_CODING=yes ] + ) + +if test "$ENABLED_CODING" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" +else + # turn off CODING if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_CODING" + ENABLED_CODING=no + fi +fi + +AM_CONDITIONAL([BUILD_CODING], [test "x$ENABLED_CODING" = "xyes"]) + + +# DES3 +AC_ARG_ENABLE([des3], + [ --enable-des3 Enable DES3 (default: enabled)], + [ ENABLED_DES3=$enableval ], + [ ENABLED_DES3=yes ] + ) + +if test "$ENABLED_DES3" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" +else + # turn off DES3 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_DES3" + ENABLED_DES3=no + fi +fi + +AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"]) + + +# ARC4 +AC_ARG_ENABLE([arc4], + [ --enable-arc4 Enable ARC4 (default: enabled)], + [ ENABLED_ARC4=$enableval ], + [ ENABLED_ARC4=yes ] + ) + +if test "$ENABLED_ARC4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" +else + # turn off ARC4 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_RC4" + ENABLED_ARC4=no + fi +fi + +AM_CONDITIONAL([BUILD_RC4], [test "x$ENABLED_ARC4" = "xyes"]) + + +# MD5 +AC_ARG_ENABLE([md5], + [ --enable-md5 Enable MD5 (default: enabled)], + [ ENABLED_MD5=$enableval ], + [ ENABLED_MD5=yes ] + ) + +if test "$ENABLED_MD5" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" +else + # turn off MD5 if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" + ENABLED_MD5=no + fi +fi + +AM_CONDITIONAL([BUILD_MD5], [test "x$ENABLED_MD5" = "xyes"]) + + +# SHA +AC_ARG_ENABLE([sha], + [ --enable-sha Enable SHA (default: enabled)], + [ ENABLED_SHA=$enableval ], + [ ENABLED_SHA=yes ] + ) + +if test "$ENABLED_SHA" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" +else + # turn off SHA if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" + ENABLED_SHA=no + fi +fi + +AM_CONDITIONAL([BUILD_SHA], [test "x$ENABLED_SHA" = "xyes"]) + + +# MD4 +AC_ARG_ENABLE([md4], + [ --enable-md4 Enable MD4 (default: disabled)], + [ ENABLED_MD4=$enableval ], + [ ENABLED_MD4=no ] + ) + +if test "$ENABLED_MD4" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_MD4" +fi + +AM_CONDITIONAL([BUILD_MD4], [test "x$ENABLED_MD4" = "xyes"]) + + +# Web Server Build +AC_ARG_ENABLE([webserver], + [ --enable-webserver Enable Web Server (default: disabled)], + [ ENABLED_WEBSERVER=$enableval ], + [ ENABLED_WEBSERVER=no ] + ) + +if test "$ENABLED_WEBSERVER" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" +fi + + +# PWDBASED +AC_ARG_ENABLE([pwdbased], + [ --enable-pwdbased Enable PWDBASED (default: disabled)], + [ ENABLED_PWDBASED=$enableval ], + [ ENABLED_PWDBASED=no ] + ) + +if test "$ENABLED_PWDBASED" = "no" +then + if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" + then + # opensslextra and webserver needs pwdbased + ENABLED_PWDBASED=yes + else + AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" + fi +fi + +AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"]) + + +# HC128 +AC_ARG_ENABLE([hc128], + [ --enable-hc128 Enable HC-128 (default: disabled)], + [ ENABLED_HC128=$enableval ], + [ ENABLED_HC128=no ] + ) + +if test "$ENABLED_HC128" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_HC128" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" +fi + +AM_CONDITIONAL([BUILD_HC128], [test "x$ENABLED_HC128" = "xyes"]) + + +# RABBIT +AC_ARG_ENABLE([rabbit], + [ --enable-rabbit Enable RABBIT (default: disabled)], + [ ENABLED_RABBIT=$enableval ], + [ ENABLED_RABBIT=no ] + ) + +if test "$ENABLED_RABBIT" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" +else + AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" +fi + +AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"]) + + +# FIPS +AC_ARG_ENABLE([fips], + [ --enable-fips Enable FIPS 140-2 (default: disabled)], + [ ENABLED_FIPS=$enableval ], + [ ENABLED_FIPS=no ] + ) + +if test "x$ENABLED_FIPS" = "xyes" +then + # requires thread local storage + if test "$thread_ls_on" = "no" + then + AC_MSG_ERROR([FIPS requires Thread Local Storage]) + fi + # requires SHA512 + if test "x$ENABLED_SHA512" = "xno" + then + ENABLED_SHA512="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" + AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" +fi + +AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"]) + + +# Filesystem Build +AC_ARG_ENABLE([filesystem], + [ --enable-filesystem Enable Filesystem support (default: enabled)], + [ ENABLED_FILESYSTEM=$enableval ], + [ ENABLED_FILESYSTEM=yes ] + ) + +if test "$ENABLED_FILESYSTEM" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" +else + # turn off filesystem if leanpsk on + if test "$ENABLED_LEANPSK" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" + ENABLED_FILESYSTEM=no + fi +fi + + +# inline Build +AC_ARG_ENABLE([inline], + [ --enable-inline Enable inline functions (default: enabled)], + [ ENABLED_INLINE=$enableval ], + [ ENABLED_INLINE=yes ] + ) + +if test "$ENABLED_INLINE" = "no" +then + AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" +fi + +AM_CONDITIONAL([BUILD_INLINE], [test "x$ENABLED_INLINE" = "xyes"]) + + +# OCSP +AC_ARG_ENABLE([ocsp], + [ --enable-ocsp Enable OCSP (default: disabled)], + [ ENABLED_OCSP=$enableval ], + [ ENABLED_OCSP=no ], + ) + +if test "$ENABLED_OCSP" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" +fi + +AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"]) + + +if test "$ENABLED_OCSP" = "yes" +then + # check openssl command tool for testing ocsp + AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no]) + + if test "$HAVE_OPENSSL_CMD" = "yes" + then + AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" + else + AC_MSG_WARN([openssl command line tool not available for testing ocsp]) + fi +fi + + +# CRL +AC_ARG_ENABLE([crl], + [ --enable-crl Enable CRL (default: disabled)], + [ ENABLED_CRL=$enableval ], + [ ENABLED_CRL=no ], + ) + +if test "$ENABLED_CRL" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" +fi + +AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"]) + + +# CRL Monitor +AC_ARG_ENABLE([crl-monitor], + [ --enable-crl-monitor Enable CRL Monitor (default: disabled)], + [ ENABLED_CRL_MONITOR=$enableval ], + [ ENABLED_CRL_MONITOR=no ], + ) + +if test "$ENABLED_CRL_MONITOR" = "yes" +then + case $host_os in + *linux* | *darwin* | *freebsd*) + AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; + *) + AC_MSG_ERROR([crl monitor only allowed on linux, OS X, or freebsd]) ;; + esac +fi + +AM_CONDITIONAL([BUILD_CRL_MONITOR], [test "x$ENABLED_CRL_MONITOR" = "xyes"]) + + +# NTRU +ntruHome=`pwd`/NTRU_algorithm +ntruInclude=$ntruHome/cryptolib +ntruLib=$ntruHome +AC_ARG_ENABLE([ntru], + [ --enable-ntru Enable NTRU (default: disabled)], + [ ENABLED_NTRU=$enableval ], + [ ENABLED_NTRU=no ] + ) + +if test "$ENABLED_NTRU" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" + AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" + LIBS="$LIBS -lntru_encrypt" +fi + +AM_CONDITIONAL([BUILD_NTRU], [test "x$ENABLED_NTRU" = "xyes"]) + +if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" +then + AC_MSG_ERROR([cannot enable ntru and small, ntru requires TLS which small turns off.]) +fi + +# SNI +AC_ARG_ENABLE([sni], + [ --enable-sni Enable SNI (default: disabled)], + [ ENABLED_SNI=$enableval ], + [ ENABLED_SNI=no ] + ) + +if test "x$ENABLED_SNI" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" +fi + +# Maximum Fragment Length +AC_ARG_ENABLE([maxfragment], + [ --enable-maxfragment Enable Maximum Fragment Length (default: disabled)], + [ ENABLED_MAX_FRAGMENT=$enableval ], + [ ENABLED_MAX_FRAGMENT=no ] + ) + +if test "x$ENABLED_MAX_FRAGMENT" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" +fi + +# Truncated HMAC +AC_ARG_ENABLE([truncatedhmac], + [ --enable-truncatedhmac Enable Truncated HMAC (default: disabled)], + [ ENABLED_TRUNCATED_HMAC=$enableval ], + [ ENABLED_TRUNCATED_HMAC=no ] + ) + +if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" +fi + +# Renegotiation Indication +AC_ARG_ENABLE([renegotiation-indication], + [ --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled)], + [ ENABLED_RENEGOTIATION_INDICATION=$enableval ], + [ ENABLED_RENEGOTIATION_INDICATION=no ] + ) + +if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" +fi + +# Supported Elliptic Curves Extensions +AC_ARG_ENABLE([supportedcurves], + [ --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled)], + [ ENABLED_SUPPORTED_CURVES=$enableval ], + [ ENABLED_SUPPORTED_CURVES=no ] + ) + +if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" +fi + +# TLS Extensions +AC_ARG_ENABLE([tlsx], + [ --enable-tlsx Enable all TLS Extensions (default: disabled)], + [ ENABLED_TLSX=$enableval ], + [ ENABLED_TLSX=no ] + ) + +if test "x$ENABLED_TLSX" = "xyes" +then + ENABLED_SNI=yes + ENABLED_MAX_FRAGMENT=yes + ENABLED_TRUNCATED_HMAC=yes + ENABLED_RENEGOTIATION_INDICATION=yes + ENABLED_SUPPORTED_CURVES=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" +fi + +# PKCS7 +AC_ARG_ENABLE([pkcs7], + [ --enable-pkcs7 Enable PKCS7 (default: disabled)], + [ ENABLED_PKCS7=$enableval ], + [ ENABLED_PKCS7=no ], + ) + +if test "$ENABLED_PKCS7" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" +fi + +AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) + + +# Simple Certificate Enrollment Protocol (SCEP) +AC_ARG_ENABLE([scep], + [ --enable-scep Enable wolfSCEP (default: disabled)], + [ ENABLED_WOLFSCEP=$enableval ], + [ ENABLED_WOLFSCEP=no ] + ) +if test "$ENABLED_WOLFSCEP" = "yes" +then + # Enable prereqs if not already enabled + if test "x$ENABLED_KEYGEN" = "xno" + then + ENABLED_KEYGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" + fi + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_CERTREQ" = "xno" + then + ENABLED_CERTREQ="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" + fi + if test "x$ENABLED_PKCS7" = "xno" + then + ENABLED_PKCS7="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" + AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" +fi + + +# Small Stack +AC_ARG_ENABLE([smallstack], + [ --enable-smallstack Enable Small Stack Usage (default: enabled)], + [ ENABLED_SMALL_STACK=$enableval ], + [ ENABLED_SMALL_STACK=yes ] + ) + +if test "x$ENABLED_SMALL_STACK" = "xyes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" +fi + + +#valgrind +AC_ARG_ENABLE([valgrind], + [ --enable-valgrind Enable valgrind for unit tests (default: disabled)], + [ ENABLED_VALGRIND=$enableval ], + [ ENABLED_VALGRIND=no ] + ) + +if test "$ENABLED_VALGRIND" = "yes" +then + AC_CHECK_PROG([HAVE_VALGRIND],[valgrind],[yes],[no]) + + if test "$HAVE_VALGRIND" = "no" + then + AC_MSG_ERROR([Valgrind not found.]) + fi + enable_shared=no + enable_static=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" +fi + +AM_CONDITIONAL([USE_VALGRIND], [test "x$ENABLED_VALGRIND" = "xyes"]) + + +# Test certs, use internal cert functions for extra testing +AC_ARG_ENABLE([testcert], + [ --enable-testcert Enable Test Cert (default: disabled)], + [ ENABLED_TESTCERT=$enableval ], + [ ENABLED_TESTCERT=no ] + ) + +if test "$ENABLED_TESTCERT" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" +fi + + +# I/O Pool, an example to show user how to override memory handler and use +# a pool for the input/output buffer requests +AC_ARG_ENABLE([iopool], + [ --enable-iopool Enable I/O Pool example (default: disabled)], + [ ENABLED_IOPOOL=$enableval ], + [ ENABLED_IOPOOL=no ] + ) + +if test "$ENABLED_IOPOOL" = "yes" +then + if test "$thread_ls_on" = "no" + then + AC_MSG_ERROR([I/O Pool example requires Thread Local Storage]) + fi + AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" +fi + + +# Certificate Service Support +AC_ARG_ENABLE([certservice], + [ --enable-certservice Enable cert service (default: disabled)], + [ ENABLED_CERT_SERVICE=$enableval ], + [ ENABLED_CERT_SERVICE=no ] + ) +if test "$ENABLED_CERT_SERVICE" = "yes" +then + # Requires ecc,certgen, and opensslextra make sure on + if test "x$ENABLED_CERTGEN" = "xno" + then + ENABLED_CERTGEN="yes" + AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" + fi + if test "x$ENABLED_ECC" = "xno" + then + ENABLED_ECC="yes" + AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" + AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) + fi + if test "x$ENABLED_OPENSSLEXTRA" = "xno" + then + ENABLED_OPENSSLEXTRA="yes" + AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" + fi + AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" +fi + + +# set fastmath default +FASTMATH_DEFAULT=no + +if test "$host_cpu" = "x86_64" +then +FASTMATH_DEFAULT=yes +fi + +# fastmath +AC_ARG_ENABLE([fastmath], + [ --enable-fastmath Enable fast math ops (default: enabled on x86_64)], + [ ENABLED_FASTMATH=$enableval ], + [ ENABLED_FASTMATH=$FASTMATH_DEFAULT] + ) + +if test "x$ENABLED_FASTMATH" = "xyes" +then + # turn off fastmth if leanpsk on or asn off + if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" + then + ENABLED_FASTMATH=no + else + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" + fi +fi + + +# fast HUGE math +AC_ARG_ENABLE([fasthugemath], + [ --enable-fasthugemath Enable fast math + huge code (default: disabled)], + [ ENABLED_FASTHUGEMATH=$enableval ], + [ ENABLED_FASTHUGEMATH=no ] + ) + +if test "$ENABLED_BUMP" = "yes" +then + ENABLED_FASTHUGEMATH="yes" +fi + +if test "$ENABLED_FASTHUGEMATH" = "yes" +then + ENABLED_FASTMATH="yes" + AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" + ENABLED_SLOWMATH="no" +fi + +AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"]) +AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"]) + + +# Enable Examples, used to disable examples +AC_ARG_ENABLE([examples], + [ --enable-examples Enable Examples (default: enabled)], + [ ENABLED_EXAMPLES=$enableval ], + [ ENABLED_EXAMPLES=yes ] + ) + +AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"]) +AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"]) +# certs still have sha signatures for now +AS_IF([test "x$ENABLED_SHA" = "xno"], [ENABLED_EXAMPLES="no"]) +AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"]) + + +# LIBZ +ENABLED_LIBZ="no" +trylibzdir="" +AC_ARG_WITH([libz], + [ --with-libz=PATH PATH to libz install (default /usr/) ], + [ + AC_MSG_CHECKING([for libz]) + CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" + LIBS="$LIBS -lz" + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ]) + + if test "x$libz_linked" == "xno" ; then + if test "x$withval" != "xno" ; then + trylibzdir=$withval + fi + if test "x$withval" == "xyes" ; then + trylibzdir="/usr" + fi + + AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" + CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ]) + + if test "x$libz_linked" == "xno" ; then + AC_MSG_ERROR([libz isn't found. + If it's already installed, specify its path using --with-libz=/dir/]) + fi + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([yes]) + fi + ENABLED_LIBZ="yes" + ] +) +AM_CONDITIONAL([BUILD_LIBZ], [test "x$ENABLED_LIBZ" = "xyes"]) + + +# cavium +trycaviumdir="" +AC_ARG_WITH([cavium], + [ --with-cavium=PATH PATH to cavium/software dir ], + [ + AC_MSG_CHECKING([for cavium]) + CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" + + if test "x$withval" == "xyes" ; then + AC_MSG_ERROR([need a PATH for --with-cavium]) + fi + if test "x$withval" != "xno" ; then + trycaviumdir=$withval + fi + + LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" + CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cavium_common.h"]], [[ CspShutdown(CAVIUM_DEV_ID); ]])],[ cavium_linked=yes ],[ cavium_linked=no ]) + + if test "x$cavium_linked" == "xno" ; then + AC_MSG_ERROR([cavium isn't found. + If it's already installed, specify its path using --with-cavium=/dir/]) + fi + AC_MSG_RESULT([yes]) + enable_shared=no + enable_static=yes + ] +) + + +# microchip api +AC_ARG_ENABLE([mcapi], + [ --enable-mcapi Enable Microchip API (default: disabled)], + [ ENABLED_MCAPI=$enableval ], + [ ENABLED_MCAPI=no ] + ) + +if test "$ENABLED_MCAPI" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" +then + AC_MSG_ERROR([please enable sha512 if enabling mcapi.]) +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" +then + AC_MSG_ERROR([please enable ecc if enabling mcapi.]) +fi + +if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" +then + AC_MSG_ERROR([please use --with-libz if enabling mcapi.]) +fi + +AM_CONDITIONAL([BUILD_MCAPI], [test "x$ENABLED_MCAPI" = "xyes"]) + + + +# OPTIMIZE FLAGS +if test "$GCC" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" + if test "$ax_enable_debug" = "no" + then + if test "$ENABLED_FASTMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" + if test "$ENABLED_FASTHUGEMATH" = "yes" + then + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" + fi + else + AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" + fi + fi +fi + +LIB_SOCKET_NSL +AX_HARDEN_CC_COMPILER_FLAGS + +# link to ws2_32 if on mingw +case $host_os in + *mingw32) + LDFLAGS="$LDFLAGS -lws2_32" ;; +esac + +# add user C_EXTRA_FLAGS back +CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" +OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" + +CREATE_HEX_VERSION +AC_SUBST([AM_CPPFLAGS]) +AC_SUBST([AM_CFLAGS]) +AC_SUBST([AM_LDFLAGS]) + +# FINAL +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([cyassl/version.h]) +AC_CONFIG_FILES([cyassl/options.h]) +AC_CONFIG_FILES([support/cyassl.pc]) +AC_CONFIG_FILES([rpm/spec]) + +AX_CREATE_GENERIC_CONFIG +AX_AM_JOBSERVER([yes]) + +AC_OUTPUT + + +# force make clean +echo "---" +echo "Running make clean..." +make clean >/dev/null 2>&1 +echo + +# generate user options header +echo "---" +echo "Generating user options header..." +OPTION_FILE="cyassl/options.h" +rm -f $OPTION_FILE + +echo "/* cyassl options.h" >> $OPTION_FILE +echo " * generated from configure options" >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " * This file is part of CyaSSL." >> $OPTION_FILE +echo " *" >> $OPTION_FILE +echo " */" >> $OPTION_FILE + +echo "" >> $OPTION_FILE +echo "#pragma once" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "extern \"C\" {" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE + +for option in $OPTION_FLAGS; do + defonly=`echo $option | sed 's/-D//'` + if test "$defonly" != "$option" + then + noequalsign=`echo $defonly | sed 's/=/ /'` + echo "#undef $noequalsign" >> $OPTION_FILE + echo "#define $noequalsign" >> $OPTION_FILE + echo "" >> $OPTION_FILE + else + echo "option w/o begin -D is $option, not saving to $OPTION_FILE" + fi +done + +echo "" >> $OPTION_FILE +echo "#ifdef __cplusplus" >> $OPTION_FILE +echo "}" >> $OPTION_FILE +echo "#endif" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo + +# output config summary +echo "---" +echo "Configuration summary for $PACKAGE_NAME version $VERSION" +echo "" +echo " * Installation prefix: $prefix" +echo " * System type: $host_vendor-$host_os" +echo " * Host CPU: $host_cpu" +echo " * C Compiler: $CC" +echo " * C Flags: $CFLAGS" +echo " * C++ Compiler: $CXX" +echo " * C++ Flags: $CXXFLAGS" +echo " * CPP Flags: $CPPFLAGS" +echo " * LIB Flags: $LIB" +echo " * Debug enabled: $ax_enable_debug" +echo " * Warnings as failure: $ac_cv_warnings_as_errors" +echo " * make -j: $enable_jobserver" +echo " * VCS checkout: $ac_cv_vcs_checkout" +echo +echo " Features " +echo " * Single threaded: $ENABLED_SINGLETHREADED" +echo " * Filesystem: $ENABLED_FILESYSTEM" +echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" +echo " * fastmath: $ENABLED_FASTMATH" +echo " * sniffer: $ENABLED_SNIFFER" +echo " * snifftest: $ENABLED_SNIFFTEST" +echo " * ARC4: $ENABLED_ARC4" +echo " * AES: $ENABLED_AES" +echo " * AES-NI: $ENABLED_AESNI" +echo " * AES-GCM: $ENABLED_AESGCM" +echo " * AES-CCM: $ENABLED_AESCCM" +echo " * DES3: $ENABLED_DES3" +echo " * Camellia: $ENABLED_CAMELLIA" +echo " * NULL Cipher: $ENABLED_NULL_CIPHER" +echo " * MD5: $ENABLED_MD5" +echo " * RIPEMD: $ENABLED_RIPEMD" +echo " * SHA: $ENABLED_SHA" +echo " * SHA-512: $ENABLED_SHA512" +echo " * BLAKE2: $ENABLED_BLAKE2" +echo " * keygen: $ENABLED_KEYGEN" +echo " * certgen: $ENABLED_CERTGEN" +echo " * certreq: $ENABLED_CERTREQ" +echo " * HC-128: $ENABLED_HC128" +echo " * RABBIT: $ENABLED_RABBIT" +echo " * PWDBASED: $ENABLED_PWDBASED" +echo " * HKDF: $ENABLED_HKDF" +echo " * MD4: $ENABLED_MD4" +echo " * PSK: $ENABLED_PSK" +echo " * LEANPSK: $ENABLED_LEANPSK" +echo " * RSA: $ENABLED_RSA" +echo " * DSA: $ENABLED_DSA" +echo " * DH: $ENABLED_DH" +echo " * ECC: $ENABLED_ECC" +echo " * FPECC: $ENABLED_FPECC" +echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" +echo " * ASN: $ENABLED_ASN" +echo " * CODING: $ENABLED_CODING" +echo " * MEMORY: $ENABLED_MEMORY" +echo " * I/O POOL: $ENABLED_IOPOOL" +echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" +echo " * DTLS: $ENABLED_DTLS" +echo " * Old TLS Versions: $ENABLED_OLD_TLS" +echo " * OCSP: $ENABLED_OCSP" +echo " * CRL: $ENABLED_CRL" +echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" +echo " * Persistent session cache: $ENABLED_SAVESESSION" +echo " * Persistent cert cache: $ENABLED_SAVECERT" +echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" +echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" +echo " * NTRU: $ENABLED_NTRU" +echo " * SNI: $ENABLED_SNI" +echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" +echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" +echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" +echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" +echo " * All TLS Extensions: $ENABLED_TLSX" +echo " * PKCS#7 $ENABLED_PKCS7" +echo " * wolfSCEP $ENABLED_WOLFSCEP" +echo " * Small Stack: $ENABLED_SMALL_STACK" +echo " * valgrind unit tests: $ENABLED_VALGRIND" +echo " * LIBZ: $ENABLED_LIBZ" +echo " * Examples: $ENABLED_EXAMPLES" +echo "" +echo "---" + diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po new file mode 100644 index 00000000..0c0940dc --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po @@ -0,0 +1,194 @@ +ctaocrypt/benchmark/benchmark.o: ctaocrypt/benchmark/benchmark.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/xlocale.h \ + /usr/include/stdio.h /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/include/time.h /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/ctype.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/md5.h \ + cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/dh.h \ + cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/ripemd.h \ + /usr/include/i386-linux-gnu/sys/time.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/stdio.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/sha512.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/ripemd.h: + +/usr/include/i386-linux-gnu/sys/time.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark new file mode 100755 index 0000000000000000000000000000000000000000..87269476752492de9415865ff061fc2eeb2972ed GIT binary patch literal 17091 zcmeHOeRNbsmail&wiuIuk%_|S8|`Qqp$QN$DmrOM0%(9p!iNWkrqkU?w{*JO{=j6G z*$vY{i6I)5$I(N(j*U)6iv zFOQ($->IBR)vxZYTeog~z4yBAKh)IK=H%oEBjk!aLDbQ0vsWP1W+_UA(8M{SOk6A` zi*YC-t)c@wh#D#|o`o_SVjf~6aN{PMo$-8NM$%9$BN8-Xvorp;CIlnviy}oIatbl@ zoXyVoBr5IA)nvP*=Ys7k(7ytW(GW_#*al+&bpmLcu^O1spw+*h@M)S5S|4;rbb!Wa z&~E}A@T5TbXkIJ_-K<{`+G1pVBw|J=*fb;Ln;r^=lWop;#0eXc#=4|0T)G1PRX-@R z1d;S&MB0w@`!ZK2iQt2&2eS0chBVt&p4 z9Qp0L_ifyH@4*&6!0+2?89VRpp`FAXsx*9=4W<3?x1NlF(;O7k@ zQql`8^sg=0Wx+OfN)N36wE>V4Pq5H~7Wy2EykA)Gxt98`SnB`9!oSLbrG`+dc7khzoFza4&9L;`aGt{+3`o;g2;gSrCeZ z{f(ZckYBjnEv=ETJD%{w5^lF}->|{GT<2R5f(Uf%cXRfIB$7j1uawKl> zCm=-B#{7PWU>1$(h1G$D{;)p=nJBOK1Y=T~&PKt|MAnpwNEMPzppOahIvOz5;K#W=Nc zh~{#{qKQDv@9`0r%Mnx*_u^$39bYi)PR9K{(Hx2T!y=kY#QDz~@Wezk77QnvMLZD; zfz;}6^+wx8vo{op`$aQFiWYw&5p4BGnth&jj5w!{SPFL2Lt&dlV>ImPs#7CHZOZ&pa9*}Tf-WvE77bDD#5!T94Dkt+r;pN&0uLNIt9 zTUZ29EGv>YS1i{X`RaL_eH;#te5|LlS&u1b#Z0k)N|@qsox&6chsN}5oOw*KV#=7F zBg8bO?7Vq+#zv*_(|fZ#3AB-;&l>7iC-eFmpDOufVfKHHsXWC zz2$tqgQ*wb|2eLxE$>z2?8}DUJa% ze)2aEH~kU(OPv^Zd(Hq2B`}wdujqO|b);m!%|Y7mftLq*o*?N-Ldn19L~hp$dp^7* z=fEFMBy$FymK9$&Dt1*nY)0kRUmoZ>-t){A5MJe_ukL>=) z+1}Y`uP0?cG(3#n=J%wA-jq38Pr^~wRpHoQ?Iz7oaHhjAI=HibNQ~WfQ9*5&5mMRb;jqE#9wMT>Xcm zg|{3yT3D1iAT?O~!qLK;QwNncjWmJAPDw>v%-I}L&0_Y7nx?1!-|+CJy)@!l_nMy$ zD4Wg$G;F$iCi`=;C6xs~M)jUfM>#4$cE(lGi#xL1#@;zO@2%5W<2;t z(f;4S{H=D&?qnz1Z9BTYEIGn%SXOdfRy(E{cDrx%5xWvCpN8E|bDhpn-L&j#tB#Li zw^v~aV`jZIP1>!VGwaL0NxKzN@1B$o0tdTkv}YXsNV?`_x3wt5szm_;GFTKcv(_}^ z6Y3mgGe5HK`)a=Jk}V}KuStDv`};#Zra5+p8oQ}Vhd$_Vc)ZGQQXNcpqAnH-+LKek ztk$1E`YyGw^PT2eeQq?14sOKht`3JII64h8K5!*Y(@sZPo{%tE>LXUB9Upi69))Vl zv*Q&&q(3_b63qPywC&p8lREp)I_vH&Z!5~Dq`bKKqr%Q89t*lQIx4$D*p)jSM<_}j zFLseH&u<$x4UyKQC>*2dCm_6M_fDa)$@B@J&HaU2uA`WQqXODgF)JSdq^{{23?*4E zRW0R%&5oAX6RCfu(ez=8uEr*0I^SAQ*3GhN2M$!6)zu?Tx3cGaP_H}Ws6YpbAy&4I zrw?R*&jxWIqk5&@lC+eRo{twrk$&nkT4-q!hdD%}0i1hkU#jd0q0x`c9XSMM$ybH{ zby5-2Y{alvLbdL9-Xzz}-D#vfscUF@`6y85u;b7!qPp_%#ym}51c{r63%Br#pSh(N z%AqwoT`@|hE1#tln3_FAM>Bm^RqPng%;C;nreMP*$v31V$U`5YDfW;`tFga4dgeX+ z`M3745)us!ZI1LH;Ne-A0a*UyRmJoLEW5ZT^()NH!v#I515C&Dq;_$xqRxw;Z`#YX zVA`3t;+@-A8h=+Nm&QguWg%ddB=oF#>ff$U{o@d)rvBYv&dy{f$~jH%K`9ih(icPr zL_rG-nVlb+IdpPC6jIE79GQzSaOpin8y)#wpW{DgHDLYO)ewr;bBLvFXp5)Fxtg3I$2>IC0W&D=pc^c5HRyP9mc?== z;~}jRJR{ajxtu=T=p!VwDMh(-0+0cnxpZhiWVs^*@S1?Eow{KwOxHrIB}qIYV!>dk zU^10w9&N1ZJO*AcDus~Qsw-2ZKU7a>WaYKLgP51(BO?S_SJ0>5I=>EnBIj4s=*3P) zKv{>q2$_1p6=v#1hpJ~)_zM)D!hS|StJIF8Y}CEgA)BsqlyLvit*4tzT2HB9$4U!; zDlO=PRhA~7HCYfF3YH^>!>UjK3XNt#^Err}2Lh~it5A~+l1JNl`aYIB%)Bm4s`rrR z$WDP?oAz>L$%Tg3%MxRWm6T!@Vrqb0ZeE;guc4akLlOShIf|)5_W7T!z6FD)_Li*C z-?~?Xe3QHRc;X86-rddp zdzyp8hinDSIK1t*WK8YPx%%_u+o`=%)~t2^bl~uLz2@*4K1IoQRu9^l-hEkta8rKq$$a<}Gj&pXi z7RT4`urEGME4_+v$^04d@#;gj`tUr8u-VnRw9^yjTE3v-4BB2&J?BhR0L>eCk(`??dXy+~SX zy}un+kiVd?U9I#C)HaFm@VAjxe>j2pa3&(W{#YVD!xxxUUQy}9&r(7a#NwVziTwR! z=|X+f)jGy+&vB1dFMr9=^xvFDGRRu;$D)ztMtxtvzrGy?$L~^^`J`;vgpmxidSdGh zR+;8Z&bwAaj{A%l93GyBqzKT$289FexbD{3Y_3P8MDPkH|iza7atrnveh@0Q|< zn!J;at7-gyoE)@qmaVHOH8kpBrZov!cxk&lWimPxk z$aiYooZ-7`8QSA}G_KJJT#Xa2-f6QlzZWU*%Ti(9p=XMZhLLS3A4W=@@ntYl0gUV! z2YG*9uQj*JX0JtDiP(&|0r3vR2M`}dd;)PF;v0w`ARb2?cbCmR3Gs5oxrnuhD-oL! zHz3}D_yFR=h)*EyLwp1A1H|Kq*`i6VV$YCP9JY?O?aA+CSocL7&%-v^~a*Z8IC0UPS^a! z(;-(!E#aiIDH+7||DaDei2|N@KsbHvVaQWyBBm(1jw65@w3t6cewB%a62ck8w@Bek z_}lOwItM|D$P24Zf56=w^R)Wi0Uv4_NY!wAVlmuyl{Jj~tzNJ}xTiJfMZ*yY#6PEO zMM=aBSmE?WTKQSaF#mU^Toas&oXgVh1Az0@2&6GwhKP$^zf$N9?*N8HF zTd;=sJqh2wGr{1iMhSkKjj&y=y`A8jhdkFH1Nj(vpN#8|d|Z=h@C^ZQjUp>~xHeZJ za$S;-Yxp24bL|>|ybNm*x&BDv+N(gPSZ1`#az=hl<9cPDYjzv>%8@s>3n+euh#xIv z9j^Jk;N#>sQOvKsC3{yzEGR6qFo!MDyJ zqRf!@u!&Fl>u96TgU3yL)qU{!0bei5j9`d<4h02>9AoKUgc~sijl4$wcgW+4v*hC* zf9w=|Z-9sWpgdl1JaG!XH$mrEkWcz8fsYkg#=v$tzV9I#@_4WNE8J-^bOK4{i3d%5 zf;TeDh3G?>5y-=M6w#2^2fjY=u^l5AvQMCZ<9LfV(2J*%9 zJQLCwd3I5j5iY`l9!G*6j4V^rbQ1^W3Q>hQjqBb5*E3}wijZ>7o8=WZ^63ZLI$mIz>L1jZ8 zo}kR*W)q(dv&TmJIoLT^qhEgx$Q9>FAGaYBc7bj@&yl_gSl&iPnuFTSNV$HI0G}^< zkn$OjnEVeSlXY0@Y}z#*>8j` zsQ+gsx`wh`Y-v06^*AB7L=*y>{pv0@ZK|~AR13b=f>&EGuZb9e^`pRaVelZ&`P5;d z-)q4;fFIxEkn67q>)}ygK3`BK>+b^Q^8x1*{Q&>VQhyI{cKqQt$od%1TUj6Wc-_MP zrUk!m!Jk<07Z#jrI&(C%G0BA4|1t}%u;41-4ZpP6gOE%876Tjlb9`1<_}wPV_S%8h zY_r)X>-AG6I@`Y+`1-qTcCLHMe-PO0C;2bHPxspFm+JIKfkXG$>`Qely!c@{k;I(< zFP!0SSg_n(x45AZUXfYfNq3^v4bQqT+#(H+NK=v9?TffuLXjp<$n8r+VsW=8*(UHh z5e@khexGyhoU6+rc@!q;VW?hH;Ch#c!GTY{*!YsIt#sKlA?ZIkg4LVwM5J%!jLh%Y z*&O=P6pDD)H?~Lp!W)bR@Pm7BgTNgC5e?D%F9ttFx4U+^Ye|i}W@$B@KxN;JJYT;u z&H048`sSssC5sn;%S4g>qr$zgZrOZSoqJhrZ9`3?yU{hju7={I!=X2xRDP6FNq0Qp zG5jp06X;1ko!{=Y+EzK&iJKhmsMnncB*W{SO>Kg&aJv5@?yf+p?sBOdB&(_nf5vk2 zO`Mb6LzM@mnO%2~T&ym|=)RR%hMBS>bUIaC^I&$ET`sen7=8H$JJNABV-Om`>W4}< zQt8EMmSS>?#dOMcn|`5YKHQkly>GKFtKMWRhAHNzM<~W-r2DVi7mv6Dp0JOu!6Q9S zO/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/benchmark/benchmark.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'benchmark' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c b/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c new file mode 100644 index 00000000..2cccd362 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c @@ -0,0 +1,1222 @@ +/* benchmark.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* CTaoCrypt benchmark */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif + +#if defined(CYASSL_MDK_ARM) + extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; + #define fopen CyaSSL_fopen +#endif + +#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) + /* include test cert and key buffers for use with NO_FILESYSTEM */ + #if defined(CYASSL_MDK_ARM) + #include "cert_data.h" /* use certs_test.c for initial data, + so other commands can share the data. */ + #else + #include + #endif +#endif + + +#ifdef HAVE_BLAKE2 + #include + void bench_blake2(void); +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +void bench_des(void); +void bench_arc4(void); +void bench_hc128(void); +void bench_rabbit(void); +void bench_aes(int); +void bench_aesgcm(void); +void bench_aesccm(void); +void bench_aesctr(void); +void bench_camellia(void); + +void bench_md5(void); +void bench_sha(void); +void bench_sha256(void); +void bench_sha512(void); +void bench_ripemd(void); + +void bench_rsa(void); +void bench_rsaKeyGen(void); +void bench_dh(void); +#ifdef HAVE_ECC +void bench_eccKeyGen(void); +void bench_eccKeyAgree(void); +#endif + +double current_time(int); + + +#ifdef HAVE_CAVIUM + +static int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif + + +/* so embedded projects can pull in tests on their own */ +#if !defined(NO_MAIN_DRIVER) + +int main(int argc, char** argv) + +{ + (void)argc; + (void)argv; +#else +int benchmark_test(void *args) +{ +#endif + + #ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) { + printf("Cavium OpenNitroxDevice failed\n"); + exit(-1); + } +#endif /* HAVE_CAVIUM */ +#ifndef NO_AES + bench_aes(0); + bench_aes(1); +#endif +#ifdef HAVE_AESGCM + bench_aesgcm(); +#endif + +#ifdef CYASSL_AES_COUNTER + bench_aesctr(); +#endif + +#ifdef HAVE_AESCCM + bench_aesccm(); +#endif +#ifdef HAVE_CAMELLIA + bench_camellia(); +#endif +#ifndef NO_RC4 + bench_arc4(); +#endif +#ifdef HAVE_HC128 + bench_hc128(); +#endif +#ifndef NO_RABBIT + bench_rabbit(); +#endif +#ifndef NO_DES3 + bench_des(); +#endif + + printf("\n"); + +#ifndef NO_MD5 + bench_md5(); +#endif +#ifndef NO_SHA + bench_sha(); +#endif +#ifndef NO_SHA256 + bench_sha256(); +#endif +#ifdef CYASSL_SHA512 + bench_sha512(); +#endif +#ifdef CYASSL_RIPEMD + bench_ripemd(); +#endif +#ifdef HAVE_BLAKE2 + bench_blake2(); +#endif + + printf("\n"); + +#ifndef NO_RSA + bench_rsa(); +#endif + +#ifndef NO_DH + bench_dh(); +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) + bench_rsaKeyGen(); +#endif + +#ifdef HAVE_ECC + bench_eccKeyGen(); + bench_eccKeyAgree(); +#endif + + return 0; +} + + +#ifdef BENCH_EMBEDDED +enum BenchmarkBounds { + numBlocks = 25, /* how many kB to test (en/de)cryption */ + ntimes = 1, + genTimes = 5, /* public key iterations */ + agreeTimes = 5 +}; +static const char blockType[] = "kB"; /* used in printf output */ +#else +enum BenchmarkBounds { + numBlocks = 5, /* how many megs to test (en/de)cryption */ + ntimes = 100, + genTimes = 100, + agreeTimes = 100 +}; +static const char blockType[] = "megs"; /* used in printf output */ +#endif + +static const byte key[] = +{ + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, + 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, + 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 +}; + +static const byte iv[] = +{ + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 + +}; + + +/* use kB instead of mB for embedded benchmarking */ +#ifdef BENCH_EMBEDDED +static byte plain [1024]; +static byte cipher[1024]; +#else +static byte plain [1024*1024]; +static byte cipher[1024*1024]; +#endif + + +#ifndef NO_AES +void bench_aes(int show) +{ + Aes enc; + double start, total, persec; + int i; + int ret; + +#ifdef HAVE_CAVIUM + if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) { + printf("aes init cavium failed\n"); + return; + } +#endif + + ret = AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("AesSetKey failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + if (show) + printf("AES %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + AesFreeCavium(&enc); +#endif +} +#endif + + +#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM) + static byte additional[13]; + static byte tag[16]; +#endif + + +#ifdef HAVE_AESGCM +void bench_aesgcm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesGcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-GCM %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_AES_COUNTER +void bench_aesctr(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesSetKeyDirect(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCtrEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-CTR %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + + +#ifdef HAVE_AESCCM +void bench_aesccm(void) +{ + Aes enc; + double start, total, persec; + int i; + + AesCcmSetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, + tag, 16, additional, 13); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("AES-CCM %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_CAMELLIA +void bench_camellia(void) +{ + Camellia cam; + double start, total, persec; + int i, ret; + + ret = CamelliaSetKey(&cam, key, 16, iv); + if (ret != 0) { + printf("CamelliaSetKey failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("Camellia %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifndef NO_DES3 +void bench_des(void) +{ + Des3 enc; + double start, total, persec; + int i, ret; + +#ifdef HAVE_CAVIUM + if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("des3 init cavium failed\n"); +#endif + ret = Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); + if (ret != 0) { + printf("Des3_SetKey failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); + + total = current_time(0) - start; + + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("3DES %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Des3_FreeCavium(&enc); +#endif +} +#endif + + +#ifndef NO_RC4 +void bench_arc4(void) +{ + Arc4 enc; + double start, total, persec; + int i; + +#ifdef HAVE_CAVIUM + if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) + printf("arc4 init cavium failed\n"); +#endif + + Arc4SetKey(&enc, key, 16); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Arc4Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("ARC4 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +#ifdef HAVE_CAVIUM + Arc4FreeCavium(&enc); +#endif +} +#endif + + +#ifdef HAVE_HC128 +void bench_hc128(void) +{ + HC128 enc; + double start, total, persec; + int i; + + Hc128_SetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Hc128_Process(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("HC128 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* HAVE_HC128 */ + + +#ifndef NO_RABBIT +void bench_rabbit(void) +{ + Rabbit enc; + double start, total, persec; + int i; + + RabbitSetKey(&enc, key, iv); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RabbitProcess(&enc, cipher, plain, sizeof(plain)); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RABBIT %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_RABBIT */ + + +#ifndef NO_MD5 +void bench_md5(void) +{ + Md5 hash; + byte digest[MD5_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitMd5(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + Md5Update(&hash, plain, sizeof(plain)); + + Md5Final(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("MD5 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_MD5 */ + + +#ifndef NO_SHA +void bench_sha(void) +{ + Sha hash; + byte digest[SHA_DIGEST_SIZE]; + double start, total, persec; + int i, ret; + + ret = InitSha(&hash); + if (ret != 0) { + printf("InitSha failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + ShaUpdate(&hash, plain, sizeof(plain)); + + ShaFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif /* NO_SHA */ + + +#ifndef NO_SHA256 +void bench_sha256(void) +{ + Sha256 hash; + byte digest[SHA256_DIGEST_SIZE]; + double start, total, persec; + int i, ret; + + ret = InitSha256(&hash); + if (ret != 0) { + printf("InitSha256 failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) { + ret = Sha256Update(&hash, plain, sizeof(plain)); + if (ret != 0) { + printf("Sha256Update failed, ret = %d\n", ret); + return; + } + } + + ret = Sha256Final(&hash, digest); + if (ret != 0) { + printf("Sha256Final failed, ret = %d\n", ret); + return; + } + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-256 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_SHA512 +void bench_sha512(void) +{ + Sha512 hash; + byte digest[SHA512_DIGEST_SIZE]; + double start, total, persec; + int i, ret; + + ret = InitSha512(&hash); + if (ret != 0) { + printf("InitSha512 failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) { + ret = Sha512Update(&hash, plain, sizeof(plain)); + if (ret != 0) { + printf("Sha512Update failed, ret = %d\n", ret); + return; + } + } + + ret = Sha512Final(&hash, digest); + if (ret != 0) { + printf("Sha512Final failed, ret = %d\n", ret); + return; + } + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("SHA-512 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + +#ifdef CYASSL_RIPEMD +void bench_ripemd(void) +{ + RipeMd hash; + byte digest[RIPEMD_DIGEST_SIZE]; + double start, total, persec; + int i; + + InitRipeMd(&hash); + start = current_time(1); + + for(i = 0; i < numBlocks; i++) + RipeMdUpdate(&hash, plain, sizeof(plain)); + + RipeMdFinal(&hash, digest); + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("RIPEMD %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#ifdef HAVE_BLAKE2 +void bench_blake2(void) +{ + Blake2b b2b; + byte digest[64]; + double start, total, persec; + int i, ret; + + ret = InitBlake2b(&b2b, 64); + if (ret != 0) { + printf("InitBlake2b failed, ret = %d\n", ret); + return; + } + start = current_time(1); + + for(i = 0; i < numBlocks; i++) { + ret = Blake2bUpdate(&b2b, plain, sizeof(plain)); + if (ret != 0) { + printf("Blake2bUpdate failed, ret = %d\n", ret); + return; + } + } + + ret = Blake2bFinal(&b2b, digest, 64); + if (ret != 0) { + printf("Blake2bFinal failed, ret = %d\n", ret); + return; + } + + total = current_time(0) - start; + persec = 1 / total * numBlocks; +#ifdef BENCH_EMBEDDED + /* since using kB, convert to MB/s */ + persec = persec / 1024; +#endif + + printf("BLAKE2b %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, + blockType, total, persec); +} +#endif + + +#if !defined(NO_RSA) || !defined(NO_DH) \ + || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) +static RNG rng; +#endif + +#ifndef NO_RSA + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certRSAname = "certs/rsa2048.der" ; +static void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certRSAname = "certs/rsa2048.der" ; +#endif + +void bench_rsa(void) +{ + int i; + int ret; + byte tmp[3072]; + size_t bytes; + word32 idx = 0; + + byte message[] = "Everyone gets Friday off."; + byte enc[512]; /* for up to 4096 bit */ + const int len = (int)strlen((char*)message); + double start, total, each, milliEach; + + RsaKey rsaKey; + int rsaKeySz = 2048; /* used in printf */ + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); + bytes = sizeof_rsa_key_der_1024; + rsaKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); + bytes = sizeof_rsa_key_der_2048; +#else + FILE* file = fopen(certRSAname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); + return; + } + + bytes = fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + +#ifdef HAVE_CAVIUM + if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) + printf("RSA init cavium failed\n"); +#endif + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + ret = InitRsaKey(&rsaKey, 0); + if (ret < 0) { + printf("InitRsaKey failed\n"); + return; + } + ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); + + start = current_time(1); + + for (i = 0; i < ntimes; i++) + ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); + + total = current_time(0) - start; + each = total / ntimes; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d encryption took %6.3f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, ntimes); + + if (ret < 0) { + printf("Rsa Public Encrypt failed\n"); + return; + } + + start = current_time(1); + + for (i = 0; i < ntimes; i++) { + byte out[512]; /* for up to 4096 bit */ + RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); + } + + total = current_time(0) - start; + each = total / ntimes; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("RSA %d decryption took %6.3f milliseconds, avg over %d" + " iterations\n", rsaKeySz, milliEach, ntimes); + + FreeRsaKey(&rsaKey); +#ifdef HAVE_CAVIUM + RsaFreeCavium(&rsaKey); +#endif +} +#endif + + +#ifndef NO_DH + + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ + defined(CYASSL_MDK_SHELL) +static char *certDHname = "certs/dh2048.der" ; +void set_Bench_DH_File(char * cert) { certDHname = cert ; } + /* set by shell command */ +#elif defined(CYASSL_MDK_SHELL) + /* nothing */ +#else +static const char *certDHname = "certs/dh2048.der" ; +#endif + +void bench_dh(void) +{ + int i, ret; + byte tmp[1024]; + size_t bytes; + word32 idx = 0, pubSz, privSz = 0, pubSz2, privSz2, agreeSz; + + byte pub[256]; /* for 2048 bit */ + byte priv[256]; /* for 2048 bit */ + byte pub2[256]; /* for 2048 bit */ + byte priv2[256]; /* for 2048 bit */ + byte agree[256]; /* for 2048 bit */ + + double start, total, each, milliEach; + DhKey dhKey; + int dhKeySz = 2048; /* used in printf */ + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); + bytes = sizeof_dh_key_der_1024; + dhKeySz = 1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); + bytes = sizeof_dh_key_der_2048; +#else + FILE* file = fopen(certDHname, "rb"); + + if (!file) { + printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); + return; + } + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + bytes = fread(tmp, 1, sizeof(tmp), file); +#endif /* USE_CERT_BUFFERS */ + + + InitDhKey(&dhKey); + bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); + if (bytes != 0) { + printf("dhekydecode failed, can't benchmark\n"); + #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); + #endif + return; + } + + start = current_time(1); + + for (i = 0; i < ntimes; i++) + DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); + + total = current_time(0) - start; + each = total / ntimes; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key generation %6.3f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, ntimes); + + DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); + start = current_time(1); + + for (i = 0; i < ntimes; i++) + DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); + + total = current_time(0) - start; + each = total / ntimes; /* per second */ + milliEach = each * 1000; /* milliseconds */ + + printf("DH %d key agreement %6.3f milliseconds, avg over %d" + " iterations\n", dhKeySz, milliEach, ntimes); + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + fclose(file); +#endif + FreeDhKey(&dhKey); +} +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) +void bench_rsaKeyGen(void) +{ + RsaKey genKey; + double start, total, each, milliEach; + int i; + + /* 1024 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 1024, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("RSA 1024 key generation %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); + + /* 2048 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 2048, 65537, &rng); + FreeRsaKey(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("RSA 2048 key generation %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} +#endif /* CYASSL_KEY_GEN */ + +#ifdef HAVE_ECC +void bench_eccKeyGen(void) +{ + ecc_key genKey; + double start, total, each, milliEach; + int i, ret; + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < genTimes; i++) { + ecc_make_key(&rng, 32, &genKey); + ecc_free(&genKey); + } + + total = current_time(0) - start; + each = total / genTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("\n"); + printf("ECC 256 key generation %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, genTimes); +} + + +void bench_eccKeyAgree(void) +{ + ecc_key genKey, genKey2; + double start, total, each, milliEach; + int i, ret; + byte shared[1024]; + byte sig[1024]; + byte digest[32]; + word32 x = 0; + + ecc_init(&genKey); + ecc_init(&genKey2); + + ret = InitRng(&rng); + if (ret < 0) { + printf("InitRNG failed\n"); + return; + } + + ret = ecc_make_key(&rng, 32, &genKey); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + ret = ecc_make_key(&rng, 32, &genKey2); + if (ret != 0) { + printf("ecc_make_key failed\n"); + return; + } + + /* 256 bit */ + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(shared); + ret = ecc_shared_secret(&genKey, &genKey2, shared, &x); + if (ret != 0) { + printf("ecc_shared_secret failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DHE key agreement %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + /* make dummy digest */ + for (i = 0; i < (int)sizeof(digest); i++) + digest[i] = (byte)i; + + + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + x = sizeof(sig); + ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); + if (ret != 0) { + printf("ecc_sign_hash failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DSA sign time %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + start = current_time(1); + + for(i = 0; i < agreeTimes; i++) { + int verify = 0; + ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &genKey); + if (ret != 0) { + printf("ecc_verify_hash failed\n"); + return; + } + } + + total = current_time(0) - start; + each = total / agreeTimes; /* per second */ + milliEach = each * 1000; /* millisconds */ + printf("EC-DSA verify time %6.3f milliseconds, avg over %d" + " iterations\n", milliEach, agreeTimes); + + ecc_free(&genKey2); + ecc_free(&genKey); +} +#endif /* HAVE_ECC */ + + +#ifdef _WIN32 + + #define WIN32_LEAN_AND_MEAN + #include + + double current_time(int reset) + { + static int init = 0; + static LARGE_INTEGER freq; + + LARGE_INTEGER count; + + (void)reset; + + if (!init) { + QueryPerformanceFrequency(&freq); + init = 1; + } + + QueryPerformanceCounter(&count); + + return (double)count.QuadPart / freq.QuadPart; + } + +#elif defined MICROCHIP_PIC32 + #if defined(CYASSL_MICROCHIP_PIC32MZ) + #define CLOCK 8000000.0 + #else + #include + #define CLOCK 4000000.0 + #endif + + double current_time(int reset) + { + unsigned int ns; + + if (reset) { + WriteCoreTimer(0); + } + + /* get timer in ns */ + ns = ReadCoreTimer(); + + /* return seconds as a double */ + return ( ns / CLOCK * 2.0); + } + +#elif defined CYASSL_MDK_ARM + + extern double current_time(int reset) ; + +#elif defined FREERTOS + + double current_time(int reset) + { + (void) reset; + + portTickType tickCount; + + /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */ + tickCount = xTaskGetTickCount(); + return (double)tickCount / 1000; + } + +#else + + #include + + double current_time(int reset) + { + struct timeval tv; + + (void)reset; + + gettimeofday(&tv, 0); + + return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; + } + +#endif /* _WIN32 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o b/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o new file mode 100644 index 0000000000000000000000000000000000000000..f8c942cee616e845ee44c8568d25a627e9a366a6 GIT binary patch literal 10084 zcmc&)eQ;b=6+bas*p%9&*lI<@S9pbh?KatLnjl3Ix=G8hZ9~&SYq8;F_a(b#KjQAD zHd=(*6v?y!w2q?A0OKH{c1HXfl>rU3PO74!;|HktjkdNRmJ$C@slVTS_wK&DrellD zcxT@J?(g1n&pG$p@3gmcCAw>BYHCHN8mW~ULxA_q_ee}Zqs*0aq<7b`@L}>TI}fno zRLCYfyw=OJ`QfYi^C4spKl~acF`EVdI&tE};eVjb;rX-hv+Ars)y-$4bRR^UCwCnT zZ#l5B_lE0t9!pRSnj3o)yGX|4_MA#CG*Px2$7A+X+-_hcFwBgyxO=jEE~Gsdqo1jq2c_>#VHbEoudzDpWK4L8Hqf5u@H~r{%{f$o^uW!&EY<>KA z{bu9M244t_BOzP4IiJ0vr^=O`2N}ezeOunCW4Z!##+dpdS&iVtnB9a1oH%n z5~m+6hQ}AJCqQS6mI*p%SJ`f=^h}5Sm~YmX%3ud#|l+zv>ZUNKP|CC(o%D(D;?at-6z)R@|_x z)Vhq@OJ1G0y$b6z5Vt1~iNMV2G2@H4)mKk}BOJnsN9;+!_=@S=TM-IF61ckTLj=>5N%2+T3~aB0Ni}6V z25&l;Ro*CHRRfA#=vkTru`n#LCo1k0qn_$GHlg78#uPS}^nuIZ)mBZcia?QxklqTpyAK@wXkanz#lY;%~_t1E#m)6lJWR;XN9GlDB377UgOCR0=8YBQ5N5cC{EX0LXp zVIRFkvkh##^}A4WNL?AB@XS{boE$d2*l(x3=&%=AUoW`Auow7y0g0I$K1KXYKRdh~ z$BWUPy`JfWy^#Blj-C#gik{~}7%MG}+DZi1jy&p%AT|^%M-InK4$Txn6D1utC@>|b zzw_*g+bhQPq%tGB^B`B2T4;D)F7z)kbfE#_YV$I4P4%GxzX^MO)df0*!#Vs60>10u z!Yv0l+9J1(MLNCQ3s-qKzk~SyFW;>Ekd8Y8{+wK1b5Yme_~*a>*O!0&@ZH-sL>riA z*}1Xnx8KFQPV*KucV6ebduPraEJ>$Z>UGQ4x}(;BlgYZNC05ZbTUT0(Q?sSBtJhL# zamrd;vdV?RkhQoq(lTI`++-o2DlM@Vw~?;7dRb|<#NAR$-zk-~#I?55Q`WhDW$X-W zuZg#wiL2M-Gv(g2Gee(yS9iVwMbXyfGwDh@sMt81a?0*0tGhFKCp%N^>dvK9i;*~; z;CF3vi=&0SYYn>PlGRZpDd0JmotUD9{c4S>|7?B%~U3Uvu)5Sz&7PGWw+>1 z9Fsw-NV%_EMZoL-?sj~&iq;S&^Prp8zM$v~-1ez(28*tnbMs})hci);bc^NEvQ#?S z6l;&9+@g2|#gbDg;q+U-c9kA=?lb{x*54TURN5UH zMc@mm>a6o(*^d!T=bYk@$j1JWe0ju5W}W$?(N zoxNRsEwN>oKTh^itFa%GCuKoAk+^;h+gvIVDZ1H6+1*~2NV1S))FjehDoG??D7%qW zYd0<}m7U~}L`vyWxmb4kkux}&Q@mKfI&mc8{dz2tES1}#Tvf3}bEJ8BfCqYiYKr4d zct65l6jkEiD?c|^6M(v=04almrjm{=65&+@Zw^&QIoy!tTFr3@QR%lnT`VyA_~%i| z`{lwl7D~Ki1nC*bjTtAv zS;udyMk6=;I?N%InS|S|k~>FZldkv)T}ORy)Ok~Nk^cLz;gn&*w5h~|oN_la zqmz-l0^IbKRZqTN#KK>JUyFPkALB-tN*Paio zk+a2t@f#uZ7R`CbeINJ*n!gMDl3C?*%`#Jc+xoiC24W0ov z_TCPDw~rqHpYrkN!CwOBd!G90puYiSrhOauRp1D}s{a_Unr6v;Ae_funkAn_hU4d@ zSuzK07aA(FWC6J4;}?K8`gk|EnUezfb>Qv3`c2>+K0X1y+Q&Z%-s9uWPhl({^zj_{Lq5I@ z{OdmcEcm34-vNDx;IkRO&8TPccv!9jx4^ym5|(?wJHTyxH5j>Tz(?@aD}J`T2yDXV z?XPFaQ^F4Xm7;J<_$Z_@QS@EhTFyRLr^_(yPPtfpk`iBDiynuaRK>bw#?mw(3|5Cu-#nh=2>-m>5 zlgJ+r@IwLqJtGXH{HFr-vjXs%@=k;KZLYnuC-Os3gnqLSGrxb#=wvZzs)MZsgJoXNR`0lbDJnHf&wIzF7G`*`=R z>`&_Zwe)8T$)OFS!>(=_mEmG0UmoyGM2*pCpEerpi%KWD=Dl`Rwx?J~y1el!)2&|1 z7SpoDv}{33-$Pl8w|Hefk32OoPfg6Ii5WF9sNp+c4MK>|dt)-Eo|9TDZpw^Vt7+Y8 zTDR)fcmiwDHbGu%LC&uQ_it)hZnP{nT9#L}aL7E5FQ=l)t5*}hx@Lw@jSfdrWul&i zHe;d9SZITVNWz;_m9*a;0EvAfP z2M?o{Yh;ALxdu2(5Yl$j;dayEcGY19B^p!i#?#cOezkX=QVxm|YeMBJ@3G4+^f;NK zslr4{ck&Ty3R;wxo=WAwVvaa`QIq8KDB6i5hnRS^fcFU7N^W zV!OzG)~^$Jm>m1a)8tu^zmvZKZ!PRabys4a(r5!iYem|KkQ-z<U?S$^OqJ!v4j;P_Iag9Gh`3IrI;a;{v>c z2tRJq_zBjphkhdDe#dgiy-37``~(pXjdO56pdSl}xX8a1NIw!l`mu@p9U=uH^n4Il zXW`yRguVSNze(iB#6FQDM99_RUO~A9#6=>Dh!=`1CBj}C5%0P+K-$X#Y45${@5H^8 z^?0X!h8+6%Uk>Un!nhD&_m3t^!LIcoGgxnQC%B>;VBAbbeMO-567KjT(b^~em z0U+&ui5w5qN!H`t_bYPfdx`vFyd!XLqTTa>Ay;HMF@<*_%hBf^B4WCU<Br0DO?cae(HR#Tq4A|7#ASp(oK#ytR+VrZYB=lUrC9Z zvCfIt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am b/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am new file mode 100644 index 00000000..47e7bf0c --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am @@ -0,0 +1,10 @@ +# vim:ft=automake +# All paths should be given relative to the root + +noinst_PROGRAMS += ctaocrypt/benchmark/benchmark +ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c +ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la +ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la +EXTRA_DIST += ctaocrypt/benchmark/benchmark.sln +EXTRA_DIST += ctaocrypt/benchmark/benchmark.vcproj +DISTCLEANFILES+= ctaocrypt/benchmark/.libs/benchmark diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo new file mode 100644 index 00000000..2d819a1a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo @@ -0,0 +1,117 @@ +ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/aes.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/logging.h ctaocrypt/src/misc.c \ + cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/logging.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo new file mode 100644 index 00000000..319d6f72 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo @@ -0,0 +1,107 @@ +ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo new file mode 100644 index 00000000..a181e175 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo @@ -0,0 +1,173 @@ +ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/coding.h \ + cyassl/ctaocrypt/md2.h cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ + cyassl/ctaocrypt/logging.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/integer.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/coding.h: + +cyassl/ctaocrypt/md2.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/pwdbased.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/sha512.h: + +cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo new file mode 100644 index 00000000..2139dd8a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo @@ -0,0 +1,112 @@ +ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/logging.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/coding.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo new file mode 100644 index 00000000..c7328328 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo @@ -0,0 +1,114 @@ +ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ + ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/error-crypt.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo new file mode 100644 index 00000000..88edca41 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo @@ -0,0 +1,162 @@ +ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/error-crypt.h /usr/include/math.h \ + /usr/include/i386-linux-gnu/bits/huge_val.h \ + /usr/include/i386-linux-gnu/bits/huge_valf.h \ + /usr/include/i386-linux-gnu/bits/huge_vall.h \ + /usr/include/i386-linux-gnu/bits/inf.h \ + /usr/include/i386-linux-gnu/bits/nan.h \ + /usr/include/i386-linux-gnu/bits/mathdef.h \ + /usr/include/i386-linux-gnu/bits/mathcalls.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/error-crypt.h: + +/usr/include/math.h: + +/usr/include/i386-linux-gnu/bits/huge_val.h: + +/usr/include/i386-linux-gnu/bits/huge_valf.h: + +/usr/include/i386-linux-gnu/bits/huge_vall.h: + +/usr/include/i386-linux-gnu/bits/inf.h: + +/usr/include/i386-linux-gnu/bits/nan.h: + +/usr/include/i386-linux-gnu/bits/mathdef.h: + +/usr/include/i386-linux-gnu/bits/mathcalls.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo new file mode 100644 index 00000000..a39293f2 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo @@ -0,0 +1,169 @@ +ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/dh.h \ + cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/md5.h \ + cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo new file mode 100644 index 00000000..a09f4cd9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo @@ -0,0 +1,107 @@ +ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo new file mode 100644 index 00000000..4a55a69f --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo @@ -0,0 +1,116 @@ +ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo new file mode 100644 index 00000000..0a569f97 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo @@ -0,0 +1,128 @@ +ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/integer.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo new file mode 100644 index 00000000..2c76fc91 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo @@ -0,0 +1,110 @@ +ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo new file mode 100644 index 00000000..acdffb28 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo @@ -0,0 +1,111 @@ +ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo new file mode 100644 index 00000000..daf83fbf --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo @@ -0,0 +1,109 @@ +ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ + /usr/include/features.h /usr/include/stdc-predef.h \ + /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/string.h \ + /usr/include/ctype.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +/usr/include/string.h: + +/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo new file mode 100644 index 00000000..9e2bbabf --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo @@ -0,0 +1,107 @@ +ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo new file mode 100644 index 00000000..7457b47f --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo @@ -0,0 +1,148 @@ +ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/error-crypt.h ctaocrypt/src/misc.c \ + cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/pwdbased.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/error-crypt.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo new file mode 100644 index 00000000..011ef052 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo @@ -0,0 +1,136 @@ +ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/error-crypt.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/error-crypt.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo new file mode 100644 index 00000000..7986d0cc --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo @@ -0,0 +1,141 @@ +ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/logging.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo new file mode 100644 index 00000000..af387a20 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo @@ -0,0 +1,111 @@ +ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo new file mode 100644 index 00000000..7cbbaf27 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo @@ -0,0 +1,114 @@ +ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ + ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/error-crypt.h: + +ctaocrypt/src/misc.c: + +cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o new file mode 100644 index 0000000000000000000000000000000000000000..070f968f618066338c89c8ba1357e56808e28243 GIT binary patch literal 16548 zcmcKBd0b5W|Nrr!P^1YVgb+efCWKJPnmv1#Bx^!tUsK7LvS!b|?|XJiWM8uH*_A9s z2+{ZPnmM^#pYQi}`~Cj;Ja4ypopUu1xdrY>_8V9wU{KJSrnqp4=7c zVHd-Sv%c7=3aLy~UAuJe7W&RQMK<*gNswc8!L}|@-O>+t$;rtH{b8Ywu+OJb9pS_( z_4*`rXgSt&&261^lWiTfU*g~AjcS))J2#yJwZXO~+UB;#T36eYYz_{8AFOtY)0su6 zFKEpo-0G(Ueh&R@p$u!e^(O>e$=5=tat= z994x+P7liU%usdeWxU@%ToKmaH;wOoGxm* zs<_Tf83m^#t!G4*#*?e|WT5Ud!l7}-p=XUlvudfshs%XJaiO8VZPej|WT*-_J=CT~ z&DUSB7iYeh8pg7ISZ~IsS?OX{$*UjHU+X0uZ-d7BnuRv$|F{{hI@RgEI`)Zj%nAJ! zr#W3x$8sNryU>1ex-SE(^-OlucqUs?ovE_!qVcq~pt|y|hBmjgG}Z+tTl4H#Xft@8 z{u#T1ay^E(Hp3}io1%_AqYIm%Y~&i!oz81h)v*_Jk+TgOW!&_8#;5T18g|v*aXQb< zSZeZUnxTjuG5!NLap0ibnl|Cj6R(an zJo55Pb1j;fgB+n!$7bg4D_cxtOB_QGE=Ox(!c}IRq-UniJ?p=5-YlJa_J8BN*}6Rc zh0~U58X9lWa7nrh+l&Rg<7uYhIr_;ixJAghOg1ySx$F3ryA!qe-tCwy6__xOD zurr*7iPjtaJ#gX`6)LaH>}eU*)?RC7+eVvV8t)YMHQs29rOcr-og(#nxP@jJk4aCn zm~EEdG15qmVT;9>bX}<2P-vD~9pS;LlTy@Sji}nmOv%BvW?C;>3*9mO%`MDgN8SEx z`L2`S59({`i|VWD3z~+SF23>ewq9w&)+h^Rgt5UNFBZylm~cS$=+*Io^)>j$*4#RL5Rp z!G@`WVvXECkGd|htp5Cw;asYUL9%C>ivMUH@4qQJXpZNe z#8DPysO5UNC3yop8LFNyHJws46W+<{$%Mj%x@eq@7y)O^WFupZr;&-q%g9W9Rl8rN0rfTQF_{SX zXr_~?Kz&iWP$mOTX~Cgp9B0DW{*O5@^qfU#qDA-(b$E}TIXO;op=aFw*KF4>S8)GrL_|?BHXQJ^i`}Tx=9Cenq zC~;1$D@P$n`{d6|p?#}6UR!VP_-rnLDd)0=C7y5X6NcD@IZW2YpSP{8ex~6e{K8q8 z2GS{Z0$<(;b!;jh5wT?zpJHBFKY8xRt3UG&{h1kQ+kZ`c_+cVNgNrVvw1NK&xdgqj z82vS{Xs2P(AdlxjCLVjvWFu$#GfC^GWP{;I!_7qM&!kP^!t6DX`}AIeZLMWd&Lz)H zSngKf=5BS?OwAO1n!Z_@_Su^JQDbemMQ80@?P2ejo>#|y<_K%;Rk`xF<{{7ZBNSayzhksvN11$Cl*y$z7t5lI`#q+UzwTBY zo6K9mnAJ0kS?;0Clevd7X8J=p3u7i1Y{xCzBKnVEK0E1$GR$zLVTY6}wbO*nRc1FE zSu~8ii)KgeR%cD8mpntRnw}|g8QL_ByUc#P`XT+*{?hbJmrvAIGRHSnhetC1X+P>B z=gO3Elvl~Ako4E{r#nzj`2lmu9ho?opOk%NE=e-Y;6x1jC+4U_|IAU$d;ZG2_xG9O z-1R4#Lq6k1$ad4~jI(k4>wFA|7ZRN{*0nYMwVC#6n`oNXHd9~HlQq$5)K|2_jkUL# z_u87M&ug2R<<59*wD$`!4H-Uj71c$C%f#el7W(HCS7bif;%H{1eB%0hc4UC8n6X;R zw3R0`A$Nv!_}2`{PR8LE3?DU{@cfyC#LF4~^P{HWBz)9#XPV>FB@+|h-Fe!i06;!! zCh)!E=FCoA{M@G|Y$#cJao?&9E)Cz_FvDYI`RzS^>{w{@qHWh7jy7LMjNLhZ?B!XN zJ@bCazWb`f-AmQaPH$eP%G~t>4z}*K_sQTgM=LKif9vrq?suQOV`?Q7P4^60zobP} z;`f`w-}IYnv?yjl@wAB}PCe+^c~Q;KlecbG2<}mB=+oBC&tI4`OnZ9F_z80|hd1uA z?D6O$Rbx9mJ6Uq)tn@)UY%UyVaCM4Rn`GY^PNiS<*K}IqF|Eshr{f0h4cj&RnDv^F z-_bQpzV{f?YE-FT9&;o7pF|(Zn$)?{&7kei^R^A_KDYdf>f5^xDqxqk&*=2QTFWP$ zow?DZ-px-Dc8>cto~m?om{DHu871D=u)a2X!GQ^z(?1pXy!QFf_E$0=_}xC4FMs&~ z&PlU>Z#uKGi-Yr;uAkS{el|Pbn6$4O>c0yuwC!VmxBRO|_w8g6aN_&y3XL1(f4q2C zzQ&JRoOs>tV3gPVe0|Q09(gOjaZd4${cV3PEwv=|#GT8{+_d9X-5-3SY092iI&A@$ z-lg6={BV9k%Yu{FrmCAxzECbqewC_1XHGY5^}a^!9ixhrYaiIl|7VW*uWl~k>TFaDB`3!A4 zu2+fDMXd`SUHJS}^)+$Lo>p`%Te3{iLWNDucb?OIIboVSUX7{nj z%Rc<-KW+W$DtW#g{}SkZw&9@W&QpK(9$T%M?onc;OGC2X$NFZxJbdwy(_M>j-==OA zmlU%pk{C9{woQ0eqhmLU)c(F}#M)}-+SXcC_Os)@NAEh%EPVY%{5by-`)e#aGHUCO zR?$T&4oq!%CNg_V=_cuG?%7Z2_Hmx3;<@&%BjS@>?*CqQF|uxJPVcjN^1|yw zx7NHpa(~gv*BUO{aeng@D~kZ%n3PG!8a^}~U*$@sRnLGthnBzFvb;m6U%;Z*Q(xz7 zGr4xW!t0dcAMdYtbM$K6k!^07u6}!G@}6qD_ib=;s??;qWAw(vxIydc)H~ijc+SsB!QS!`(&Bup)-hHw0nIT8)oo!wExvf7Pm{7KaS>@-)b*)|P+!qzj8J%ZK{U`g) zOk!RhxHm7p+d!YNOOr;$*1jF=?cb_t_rurW-x2;@;GY2h#qhrb{|xwVhyOzOcZL5~ z_|J!bW%y^q|1SKe!+$RPTf=`a{FlQ28T|9YzbO3I!#@%JZ{WWO{%P=k0RNiszX|_p z@NW+PVelUh|Kad|4F6d8mxTWy_#c4375rzwzd!sv;QtiD7iz`qpyBjA4s z{*~bW9RA(mUmgAh;BN%~nU-;eQPNzu>R~e7XHrg z9}E9S@E-zyU-(~yzXkl=;BN!}De%vNe-ZePfPY)~e}?}%_+N*=Km3=${|Edl!v75X zOT+&j{6E6~9Q@U&H@C{IA0Q7X0tPe>eP{;O_|k zIQZ9t|0ekFfq!xMw}JmR_?yGO7W|{&-wys>@K1*S3;36T|6%w~gTFES`@la4{toc( z1^>?Q*TBCR{3GE%5&m=FuZ8~y_}78|d-%J;zbE{gz<&b#Pr?5!{CmUS68;e{1+3fd41>KZk!N{7=Gv z0Q`T$zYF}k!v7ik)8PLO{vYAL8vYjWpAG-~@XrVT6Y!6Me;@eYf`4)N|Ac=k{F}jl z75tmRUkCr*@c#h+g78X!+$>f&%)mZ{%zr38vaM&UmgBW;a?K|h2eh={#)R`75=5*UjY7(;ol$rRp9>x z{te+j75>%Wp9ueK_-DZX5&Xm9UlIOA;BO26M)0o<|F!V11%F5QcZUB9_?LkH5%{-) z|3LUh!oLap?cqNU{_WwP1pjsLF9iP(_&a_)meqFZ_?ee?0uH;C~4I%i$jY|JU%p2LBZJuYiAD_?yCiGW_?! zzY_eT;Xere$Kihw{@3Au5B^Kx{{a3S;r|u>ci_JV{_Wsz4F7}hp9TN&@b3iwxA3n6 z|6usL!@n&2Z@|AB{9D4`2mWU8w}ihd{HwzM0{maWe=q!#;U5J5tMIP}|10p{2LF-p ze+d82@IM28XZX9pKLP%g;olnmi{PIJ{`=wo68`b<4}*U!{Jr7d9sZf{cZYvT_*aGh zcKEM^{}1@TfWIUB$HMfR|0D2!2LD;`w}Jmv_$R}^H2gckzYF{a!hbmY zL*Q=$|5ot#fd3QtPlA6C{M*96Jp8-DKMno|;eQtX_26#@|5NZcf`1A4UxWVy_!ofx zQ20N9e?Is-!+#U}9pL{N{E0{=w#w}JmL_-_k;gb_(#G2 z9{lUWKLP%I;C~(dx8YwI{yX4r1^*cMH-vu``1geWa`<i^Km7{71rn zHT?I$e*^rRz<(qB*TKI%{Aa*_9{e}M-x&Vy;C}`F^WonP{vYAL4gQPap9KG5@VAG* zAN>2mKN9{C@Gk`a!SH_we+&5Ef&X3juZ4dW{ENYVEBt-nZw>#J@V^27Pw=;d|2g=7 zga0r1H-dk2`0s}Q5cu1|e?9!m!v8t^UEyCC{#)R02LA)_?*{)%@UIPjfA}BnOialz za+^4kx@049A*YBNSx;7x5b~MaB|phz@`BVSGsp^3i}3%Bb0UZ{nM0b9=Hv`{LQ=^k z;zcHrXi}SOBBx0u(ujN@o@5azM4FNxB!RRiCd7fPC4-0^xle4#J~Ec{ChJIRGJ@zx z5~)lANf!A^29lX%2w6%>kXvK}@g|o^AL2)1$pYd}Mv+#eBl$(%lOyB-=}U@}7Nk4b zOrpq25=Q2cdt^Hi|B>W4xk(C=Z{#KELGqEqWIypB`N?%+Ps)+GHnOO}vNWCsZ*70Da2lhh&M zX8&;O~#O95j6eSj;yd*|>2Zq9#rHTKLnaoD;)`-`P8I zvGv**4GEnChhl%D?c-OiovgKyp1|7+d4es6d0_Ba(2Q|a4=4P6!o z2EOba7q{Z{p+jS=fBky4YvIC1!>UyA>{Yj}zk8D=Q}cfN_NBw+%c0)R&OQ$0SM#lGrqenjvf=d@CrvXih7q4z+Y;4l`+_^=5l`6I9n~<>5&dSPh?c&At)cNui zJh*&$Ez<%8%YTLFBC4T;Vf3{h(nRnZ@Ti#Wp z85A8JUgVmG$83x5-&6DF&1)PoZQAejjvd!DcXb_qboJ`WFScxH`?*u6b-&lI?-S?d zHhuQox%qZ3SkUD7%9Rybxwwon{_-Uw`S@|)_}JKSV;(%%?OUNjQ%4I6o6aiu7p^cnOW5-R;)^`ckdFO_3L+X-I67BE;nyJtA5Fn4&Be3S@>!5=B_iQ zPR(xFsL{k70|%ae)2GkT8l_6rUKAAcdQJcSaZ5u&N+osZuxi?)N9zYwtk`^N_3B>R z=gn&vI%`&;i!EA2R{QYb+|9#>hr3!@+D&-!Wb^aBeUFzdRH($*hYxo)eERfZx7xJ_ zwr|iNxLm=4mJeIEUQjT9elvet+g2~Vy$|;}eR_4k&6_7a?%2_6(|`eIw#=Vjf5W0h zPW4{Cys4Wo;ZyB5Z*Dg`e_q$KUcG=rBSt)kjEc%L@b>M!H`=$4dAfCL>jVD&_kMKi zwxd91=I6?9-(K78=XY_=#EF@yyLPp-GBL5Zee~$aS>wm2kE~p|O`wB=x2?6cOU9;6 z-On935Y#C#aY?0=luMHzKVBOX9Gp_2eEG(Y+qPZ&=)?)1nL1tJ@Y%D~^G1z&+O%=w z$!8889KCJOpv(7KwVIdD$S8lFuV23vH8;0j@8fg2U!6L`zIX4w>-v!+L+8(&S+Ylb z{IaTL%QiT&YE@O2XV2~z%gRdIzjSF0O_3rMj}0AqW7PfoTeWlM6xbXct%+T+qGrW% zeYyxu3fi{x3lXwF*$kT+{j3ythH-c+Oua;wwKqIJI9WVXi%brJ^VMqKMelM z;2#D5!tg%<|Gn_{f`3Q&8^M1o{HMUb6#NIk|26!V!`}n`E8*`3{|NXOhkqLUFTlSL z{NKTUF#LbP|1JDa!T%fl7sJ0d{7=K*8veWBKMel8;O`FqyzuV;e{c9_!rvMGCh%Vf z{~-8xfqxVDo58;`{QcnH7yfqeUkiUV{13w46#jMLzXJY^;9mv)L*ah~{;T0%2L7wy z9}Is7_}7I0KKOrt|4;aTg?~Hv`@sJy{3pS`G5klve+m4*z<-GNhrd1i`@_FH{LjPx zJ^W9?zXkm7!@n*3pTPeX{8QlH2L8k0UmgCh;9mm%XW@Sr{$1f84gYKKw}5|s_=mth z9sbSXe-!>N;Qtx^zu_MT|Jm^03IF5pZv}s2_$R|Z9{ywC?+brN_?L#iIs8Y!-xL0p z@UH{^TJV1c|8?-c4FCG@=QB&!Pw<}s|CaFI0slAfuL1u>@LvP}rSMOJ|1|gyg8x+b zZ-;*<{4c`48vJj<-xdB7;Qt){W#K;-{te;Z4gT%nUk?5c;a?E`{_uYZ|32^!fd5DM zZ-W08_-}xJJ^1V3UmO0-;NKJehu|Lx|AFwo0sp7)KLGz9@Gk)W%JAO}|2gnag})X2 zZ^M5U{71q+5dOCC&w&3q_;-STCHPNL9!2dD)AHjbn{KMft5B^Qze+K^B;C~PP z`QV=i{zc)x9{&B{{~i9<;Xfb#J>Xvz{zu^N0{>$0-w%Hc{ExwZ6#TXD-wgj)_*aDg z0{Gj&zcu`G;6EPz6X8D>{#o#!4*!zye*k|c_$R{uF#HqXzX$%~;9ms(eCFPg4gWjv zZvcN^_)muaIQUP3|0nnlhyO_UpM}38{PVznF#K!4|2O>a!hbvb$HM<2{Aa-b0{o}I z{|Eeg!oMZ_)8W4p{%zYY{J+8fGW?z4 zzY+eg;GY5i(eS?qe<%1ChrcoW&%wVE{1f1B1^>nH&jegMU@{ z?}Pss_?yB%6#n+`FAe`P@DG50FZi#4e`okNg#R7*?}vXi_`iUEE%=AQzYF}6^#0@R z-^1Sq{@L)~3;*8m9|r$R@IMLv`tWZ9e^2=Lfd4i4Ux)uk_-}*%Pxv>3e>?bV;2#cu z5BPtFe_r@cgMUZ(yTX4p{I|fr6a3f1-wpnA;lBX>E8*_~|1a=A4*yvAKY)J)_*=j~ z2mYVoe*^wk;BN;1V(@>;58?k5{KLGzk_@}`CG5mw!UmpH#;eP`DI{43q|0wu3 zhW|nM4}yOy_#46hEBwvj?*soj@b3=)Bk-RI|9JS9h5st}KZAc3{FlPN2>ge_|33WZ zz&{%PE8t%a{t@s`h5uFfcZI(l{FC7y3IDb5*TTOr{7=FEHT;{xe+c~D;lB+2HQ}#@ z{~q{z!T%WiOTgb3{*&Q94*rwi{|WxX;Xe}oXW{P%|2*&?4F4MN{|*1U@ZS#qvGBhL z{~7SV0RJiQ{{jD=@NWtKbolRt|1J2hga2;$$H0FB`~%@12meFx{{{br@UH^@y6|rT z|8MZW41Z_%Z-oCV_-DX>H2m+u-wFQ3;cpE8bMUVO{{;A3!GAIQ^TB^P{0qRpDEz0x z|2h2A;9nK~``|wY{-*E`g}*)gOT)hm`~%?M3;t{1-x>Z5;eQAI`{7>={x9HP3;tp7 z?*f0lfB3(LzYYAe;lCIDz2QF${+Hl?68`n!-v<7k@b3ZtYw*7g|BvwB2LGS%ZwCK% z@YldU9R42g{|^7W@Sg_%j_`Md|7!Sefqy6XuZO=I{O7`d0sL3O-v$0(;C~$cvG9KY z{|fN8fPW7BKg0h9{I9^@4F1L7{|^5B;J*a^&Ea1X{%7F78U9n@-w6H#;ok@TrQja~ z|Nig~fqw`1KZ1Wn_*aMjJowLoe+&43fd66mTf+Yd{QJVc5d0s)|0(=y!@mLi3&OuO z{PV-#7XIGwKMntz@ZSOd0q~y>|3&bB3I7T3e*^#X@UI8|5%7?am!#@)KYvHeje_{Bag8ysyH--NY_`Ab@ z8T@O)Uk(2~@b`lMG5D8|o`Cf5q-P*~IO+9BUr72c(u0wHp!AHSCnS9a>7hvPPx@8T zTa$j1^!=o#A^imD%}Jj``a04pl3tMX(4_w+eJJUBNIy;bZqk#H-j4Llq%R`<3h6yc z|4RB^(r=Ugq4Xl9ha!C8nZKLwYsRFO;63^oFD-CA~7~{YWoI`ZvEB5& zMtX^c&;Re=OV3GqQqnh)zN7S2rOzq-D(R6*Ur73y($ABgn)L6a48DDcRQf>D zi<17C^!cQJCcQlAG0|e|D19L5B}vapdQZ}ul^(71|D-1=y+!HWN)JhTiPEc-UZnJW zq>m-NS?S?QpG`}pwj1({vYkH{?Zec zzM=FCr3WbeE9q-WFHQQM(!-U$rSzbr_bWY7>E%jaPI_O`_mw`R^gE?TD}7Dr-%8I_ zdco2Ql^&z?0Hs$cy(ajnX5N{-X4DrMD`5Z0QY4KTi6y(jSywpY$`OcPqU( z>9a}iSo&qs6O>-C^pT}MDLrWEaY`>ydX~~3l>Vml3Z=&=y;SKTOAl3gztVe@o}cue zr4KB9R_P~8zfyX1(hHT|uk?hazbrjj>2pdyUHWsFxRfey+s;&dZ1O$(<@%8r!7;H1vFED86$N(FS zgL6%%G5ViqZ0v%41_#yZ?BVI*-o>Mz#<|v@p#eVr)oknr_yqY4v|)Eo&u;DHm})AO zL!h6(L$KfYV3mXK$Ppv_0$3Oj6r^$p7#Zy6(6W8knnA%nzQa`xK|_Lq1A~1Au#{UT zjL@$KjvVL{?4xqff9D$izrsH})ZcJ^Wp8Kd5%oWZ>i=9)*~j#s&8l||`L~b!P`1f{ z#|=bSx}O@AH$%3SaP?IYQO`-4-2wEu1T&> z9v}^0x%bMVYB~q{%Yu^J^X0DR*1xwKt1@z$=l*~J%%jSua+h@(Ol93w))^leBKi5> z`S-tEmFxNYiex=^Gz~`?{jcM5pOW047f^L&u?;s{k(VmUE4F0ao8=FjO4fZ@_vaaC zN0s&BREg{(>*Wor`tLGMb^c>rCzsNh;bfxfkT{DK^ORqlR4UHpRE`b|*v zYw6jcsk>*t4lP=A@$l;B<=)iOqn~Po-w5AP6I6k|BLh@kek!klazwKMz8(SkGbwA$ z{r;?Rw$|NL@~9T%TMw!+7ZXV}VN3%6{XNI!CEnl$s%x z{mhtMWWSn9byKRBQe%|5SE-3geWcX294p5kQ0g(M{Oq(+uPEDZDeK9~`fFwVyRvS^ zwa9sjN#*#`O0BGHw^!EdDeH}ub@`_va@;_r4p+7ZDs_soJxp1jtE?|p*0(6@$CP?n z*?vK(x0LM)4IM0r}PmOsTVG)I_BwDfN+3vy_^n z)Pe;J=P#~QYo%6F>UgD2Q|d;g?ojF>rJh#mE2X|u>Nln4Wg?XOsIF8erMfCr{wbvV zyt7h=DK$)~Yn6IZsW+6GqSPFv7G<)Q^Hfo)t5Ultb&yggDs`q(S1NUnQqL>3C+_8a zsK7)g&ySr_Yb&*>QYR^OhEg{ub-Pkyl^UOQ4jRO(Zuep6~e ebHn+|Db-P_EtT3=sewwJs?=zuZdYo8QvU~tz)pq$ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o new file mode 100644 index 0000000000000000000000000000000000000000..b7f43fd5896439e83a1e829a9edbf893a9611ebf GIT binary patch literal 1228 zcmah|T}u>U6nv3l$@_NDrs+VU7r?S7Ga!@Z;S>0V}#w=!eAB@gn_ zctIF?jy>trr_@f}sXV!*++01twd{Tl)R+*4Wehz$qjr$mvmBFa4+NoB5JFWZ`1gjb ztl+C2QhR!U=U!6#nA+K1-pUT})^sn=9Z>sV4;WXn?R@nsH1k`lBsDot?YB>gTxH)1 zTC?2ltAH~S*U=P?_xan}I|7|u-8~n2DOt)@N~{vn3TkORbWbjN~R?xo`~c(N@`&w6waxpz7_(yEH7Wjnh`=oLobL-zt4!Mm5W8a1WwL0 ziC8K#T};g{jhal=?h?_wV={xOIq*EYRdn#0%2eo6Mk{J2i(PH5{#>sO82AL*T_(PR zy6dCyyFPL{T_4RpB!X@XbI1#TPJtr!9$W%Ji+KI|A%^_(cyqwP7JZ;76990oC+MSg zgCZ{qin0h`q2W4T%%NU%trLXLQw+9<2jOb|tPRu1Tlo)f9AbP+{26TM1>i1FJTKfY zt}hPi?G;?I2?-e;SG>6%_H1k1PrlU$yo6)%_L}ndpN;ccCnEMvzft2O|JHl2z{_`# z32+~SnxK7fg2P}@FoyWDgBl;)C()Q%){L!97BLMiq8eI4)QBigEzU)iC`kfN>+G7o rMU<4hFqxE?N?BaLB&_pw+Z1 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o new file mode 100644 index 0000000000000000000000000000000000000000..0709441863a97ba1942507cc116f1018bee7e92d GIT binary patch literal 21760 zcmd6Pe|%KcweLBT2~2R{j2boCC{d?2D1`)qCK7A{lMrl>R01NVO+qr5=n!IZM!*}* zgvpQ`4oAHHYCnD6immUq@7Ail*NfOEG(k;3>kshf)mClmZ4-iuR%yaj^1k1_&zT>A z((8Nwy!nt>d+ojU+H0-7*4}IHbB4~c%5qgz(-ixoDrt)9Ab<~FC6NLFaurSSDl3*> zx6%ywvrLcGteVySoTArvb&QXXZCZA| z7M@(YX{J)AQ{VQ%PphEkgy{sIh;H;6$X!?>wg-%*Wfe^#W}leb4l zO}GGq7aNs+uT|;K2J`@C0lE#he`q!+VtpHZ;8BR7vyD8IvW&^bk?6BIknWkUHe~*P zW5}nE|D7RMLSQe1@tCJaiqCfK5?Wjk>6oLcyV|MI8IaMZ?bPSEqI=U|)YDDnd(UuM zqKC6nj6?j2>IQRAdd_siLN>2J#8Q! znW7%2?TtK4IBcFRJmO@!U=qQp5X1$T^gL662$_Rr^aVxCu9V$l$)Vjwv47|{U((dV zfLiY(QsGQ#i_A#z2G6o8z>>y?>m(-LNEqBA0xxWoIfda2ZS#054{Fk$NIG1n-I(9WaHCFvCCzQ zX|dJ7BON|fwS8b2+jW0ov@gw22e(9E2Sz_xLJ|)oBs=5fp$CN(_S`~q^`6UKm@})y zCn!7Msc;hX5FynrXtmx?rBy+eb273@o9u-+nNS5jmcs4pHrc~*vXYZ=J8o;-6DO-W z8QGhHOz5$3h18)=(0z$-5B&<`3oU*DN@Fb62cqJQmtvVKjP7m49C}G8RL%4c^@6B> zbo$q6myyZBs0k+)ql|ofGGDfRnBD<->B*czAN|e>VJZhJ|gi zON;#qSfry+Rkhe-C~^Y9Ot?-`JUfgYv8~f>^VsU092uJwE-0DMNl4&y$~-34spVjr zl_sUjLPyajGUg6nnKW8T$9Kj=$Me`x9fg1S#8SX@1xi7b@r031ZXHIth;rL9(z$J` z{8g|QLA~)>dara`s1{$(#2neN@PSZc7pG|B#nAz-^diucY5G9p%;TxT4qZ{s9 ztDs~j8>?E%v*uLtzb0nB4L9PUO64XghBSDh{jRXVbA;q}A)dfadbbRw; z+_@1YV@n6Vtt}CJuN~a-k!VEWh$t9tKf>Cx4&;DBF5&WnTSi4Y`F$2IA>9(6!7X3d zbycf)iZ3?yR->pcw`8#j)Je;<9;7tdP$U;3Y5cnlxC zqe%^GW_exm@XEM5ZA({_k;3M_Axs7+)te7ATHAajAHowW{r;^>UDmz6x{>kmU7Vs3jXhtH zJ&&NLF%W%8)pqW`dH)pkfVQ)Go?>mA(l{zRYdb4*U1%}(MxS>hW6MpmwoUsOTN*g$ z82!=x>8LylEgfe~TB|)fsNieB#X1*D>~fZ>3b`>&&$4G-*MJtuzHhR-T>$7v(ivH2+oyLS$6=O-#M^WJN^p(Y_6Tv zeqa7kCX1`XbFeX0IKF0~0aADPn-u-Dp$i~GtS{^v$rw6Q6!r8yB7Hy}S1Iy1o)m7$ zG;hl+I=+i7+V-vdj%~)bdA)D`YF}rEgki6Fy?6d#$o z%$Pr=)0N-HP?4@ylj3T+ztwt_QEzVH3Si2(=MkdAU&RbX?2!n-oBzVC&Q36=GA|N~ zg;DOE*fY7;Jke`oiFv0OBjB%6_Zj6r*~MC!gA{Q`cxJTUWh_;&G{;B#qwMFAgd;vN z?l2efLAqv=oMLms@`K6C;pDxSkaJ@*8nc}Su^T^^zd!orbW~S$7D7Xj1Emo3$M%OW zkSm_xZ0AU#^P@X3cK&{w9=W2Z9mQ6Z%@i~PtyX!Kd8aVs{bB*FMi%AlAvils`;11^ zdf$cp@(&uH4E+uTR=g+-I$;K6rYUWLF{s^teiEOBjV1XX3LaHh?~TD-_)%c6}=bEA0wVgxFhRBIy`BGzfPx#Xb}%o|3j}ouGLl zWwLReO-O;P^oAqSo<<5M?!T$r|@!ApaYTz{C_xv|gPHJt*Pj@x{=14yjhGmYl^ZfmAmH-orD-(xldO z3>ky*KCodfE;|-luJ21KZ6>2-9a`v|tc(zu1 z)ZS|U#gXGHwAho-1Y7&XZY@Tavc8jM+%M>=RTqfzqWx~^hbe;<#vKOpoNEuYjYDj5`{OkV0tN&miA`U*xWXZqMvR*DM(R4OHpX{r=K4-cQM`AhFR@;u0WfW$8IA zZ83sQ5U?OFS<%bdgMC|(4o8k%s>N=AWHiMVEmno1b=|b0=YOeox_bM2EB$BEgS+=L ze-6)}G;0R~9&h^se0v((g6)9r=1^%P1q`mMkM>W41i8q$Jg};hb7dl?qKv8TAVjei ztBf^~fA)cKrcvtFy1z{!#e#1~0(VUNc7UW?Aq(Wd{fD{GJ>V`>kRci_V`Z*>WADD< z?HH{%U5jx$fRz5CecJYeELX#Ra9l|3^0qBt5hYJ}-I}0Xb~o3Dt`TLoYj%6EjYX?! z8mEBkjJDkbn_=1rEi(}gxt2TkRD!C!7Rb%-W8_F1XK1l<^rwyQ)?)Kf?C#TIa{;Zz z>0(kKX6}pw6#9I7pn-tTyb~=FT@dzZ#hPAS$VDIl$B@^uGPyJ0MP$v_evf%5!$n!gTPmd2Ai}#WF^2`ZV zsK`GW9d&CxAJOMK{FN9s08S-lcNErE)VIdp7sscrv3~-Ew*7~wjE=3+V!MIv#%W5i z#PJ43%pT4}U044`9FwAB8CuT|fm(tMq9S|uX&@H7%x$8J`XA%JPwM<8n!CoBP-(F` z^c19tcF}$KUqOT$*0Hj1@ou_9qJ8-L@&27fU1L822d(=e3N-d0%drdbEy+h7>l)jJ zal#iSy6@&%IkK{AYzrGSoABKHqrJG<6b)<#Jpg zS8gkCmCN`X*D2!49%Q+WD|4~7^ebHI=a|zh?(_^+F|>WzqaNpN%}f!RQqbZ1;VNBY zJ7A{pAML6rs-)j^r1;Gv{=1;M`Go%gf^Pr41o!%X002Gay0Lo~K%RM6y*!oj-WsR}EJLZ=d_8w~t#>RJX_to3XvO05VBc%{>+ZU_oFyNky zRkd!gtO+xqblslKPzaYqan+|^X_oQsXzq#pE<##wF69EA!Vk;yU>P1!K&X_5GhK%d zBW9E5(x~z4m_ZMwz7pl@5Mf2V8%<@mgyKc+L`0p-42ztZBK*Fd`uiILjI8YqVd?n=wpl+PyUQ>`y==s z?Dik#F!=0V&R*S{PRAy?PwTz~&~6p_{0^6&Kha_@ff8CbVIt}<<6f)VPqlw#kN8*(9Srkc9k=`5zWNA^CiQ39r+lLui1dXd>&b*C~0m zztXy^PnIgIs+p(=SS5Lop#)~DqB6!y7_Npg7++dX3lWD~!N_`&_5f9gRKt5wCHBnW z%_u?L4_J*4db^<-QB1xuY#bZv$(E<=Z-Wx@&}{I^Cd#?ypMW*N(@P3 ztNlKzXe6p_2KeE=VV892#>9h)BhaYFhUJROP(ES)G|8SX^643?d^1<(K6$6>j^)7 zS&MzflZUNNz+Y|6RMpqvwVZfpEc{&--E^Z3ErDrSjyj*b5jpy$X-`%0Y9pvUzjEt8=n;I!$gs@aol)W+gyzB8U9Cv zc@*(X%JA!$QW4o*Pr&Igk=1GUiVh~kQ1_<6ZH#|>98JT6Qx#>wPobBy7JRO4e;(+9 z?fBBRzl`r_Uj!GiT2B*?Mq=@ZX9@#7uYrkbJ|Z2+Jp<#~b29`%_+ccYNKAT(ff3bL z;89)+#Hi;|h9ap@bi=43g0Ff{+TnW8W8)!Z^mwKgi(nH@!+^krHqX&d&A_Eh?<$N^ z-=~_-eJQ>wFZB#JWftl_#wtL@*Kg1TMJmkRC^Ezg414ar{GC)ONNh)zE zBUTt6#s+br(d+y$|5DEOxb>2DPU@ti^gziNi2f zOEJC9fjA3S6y0ot{x-Z9`vA>3KwNB z)bnX>rm@gNLHt_pLNEAKn<@^KLx?VLN5GCoA+RngK&cG^UeB@;<9EZd#MUUYL_tj8N z{R<>+QlG(hNZaYoQu~atwMG{oxrrdOCB{}zV0rV^1CXKGcpVeL)qTaX7SA8`wDi*W1!seb_dj6S<{ayYQy5`zLIC+D|qq*DgkxTkFnY zOybVS@=kMH3yX;3R>D`!GI`e`QxBuxEX_4=m)o2>On0ZS#hbO*b0{YX&7;@^8#zLM z_8(H{(@rJyrI+# zQ#m?vU6K;szpcb#`Cy>m58wqcEY1{&OEY}5N^WZd)oG+ zjIe{)3!E5AUE)83QTc%n9+4#{J0NP?mqaMWmw3$TdfwNo^YAqoE3$VhHDKNK6K>UbW@*&{1J*rkXpn*h5f^Ii?^;M2#3* z2B{dE1}cz2+Ww{-`_8|^x#%l%KG)`4a4OEYV|@>6!B>;{*KbIf-)087O;{F25lPiE zhWRwt7TW~KuB=QST)Ro+Rrl~7L)|yr4lvL&OyuOg)(xNK2h$j_i*`Ce)b=$JCHvY> zY_S%}#F))8(PT+I;%umqVl{&OA4Gqj+^v~gJg{hce`byj5?8y)ttUce6-cMjv zH|_-JnOgLpq}TH7_k|R|7)DvREg!S$L+^RzG4Q9L1QSv%;4}Zu^P;1R^_kJp3cQLZ z*AU6vHS*8`Ua*9Jm{RQ-*_whQs>G3HnHJ*ogdcmS`njTFQyhPMG{ zfFT&<6Yr0)1vbI}LyZT;Y#MxA%8MXz1%Y|1b1o)gAKC}OO?)LbREMFuzT~$S`xACv zd5dA<-ls>0Rm`4NesAB1Z=`fQ(fyWY;^h<%v@$-BWxj?fOLy9<((AYDwkJO;=(0TJWbh6t7)-I zD1Xzqu|89M!`M)RR6$;1bqks2FV5QCB>XgR`fDU_iuD| zG)BC9to#c1)5+$t#EqQ2>5;_h>7#5iyhXSpKj6(9mX=<01cv7)id*ZxO$^H20tbDo zN8C1{8?^(0ZAifZ4@16TEf#CWNn3XZs6}@n7-Ha6<_51>>oY5Od0AufI=R{`aigWl zyspMv%vb#y&1G45boLnEmP5$Y8NZwHd77|Z*H{ngIxpxNO9#|1?Hc1bMZc(Pj5gO| z^Wfqmde_)?)`q&qIm_?m50M0fjgGWRr!6xJl$}N zuCZR|7G8#4;-H%}R?;}4>C_s~G}OR{F-9sl%J4Rf0lQcFtGf5^7BLnW8eR{Txl|!I zM<$~X7jU==E#!~`4zvlMcy!?nFJ2py-!9Z+PA*3^QVO1M`2j_vSipMhr<`?kN9zfH z7ELE@W4tJAZw$i-v7_i@^0~>AzSqKMm zhb@}80$JN6UDBNr-3cP!+o$auN)Bb3&luVrl+E3I#dG(SL=Z?HljV}^kx3w`F*Eo^ zE>9aDj6MimYs?BRB#mYXZ};o)1}Q+3qbfT>iaKfs*a*lq_9=+Nv6_b7fn7L<^C|P? zc(S@@n6GMbjAESBsgk+DkB1iB{5j44^?2Ye$Gh1c?*&L;kN1XsvthPoahxC18||xc zz(({WUSq>18&=w|j&N%^P1``z4gfWKXiMBwp*uCzy2Z89c46>qJX&lDM_(xy;KZ(D zFP73ckU$IcI~-usD)E@lT#Of9VaX=(9+_75JS^3ubw9;XuOY)4^BT_RDjdR9EFPm~ zDJO(i0r9v*ckwC~U=2vcgxChE9=aNmqeIO|bFnKNG#BG_TW7ZFw6X(OVe0g2}d#dcvD@cL(+qE7~>RP@UL@G>Z|8bv=JpiyE~ zimriSYivLKA*7Y{<2gK@;~&P#EuZ60c#=No20QyT6Fj22Vh{-Cv;?j|P$2=AIbg_$ z2(l#L>J2QLAS#}_pX}{rvmCFkBwm{~%e|>6?(t-6ACeif94{|Q^q0(Sj_Om*sN|2= zv&Y|$inp}oBTerR8|>es!2o{cj+w~BbMikl-H(CG>1JyM%ssRgu@S?MoWdUux*ubg zviTvuKm2y|S+B4NtmQ$tx$#^Y*Z7J)W$mE4BaO#CWx%bvqWe?;y!E82(LUERC%zhw zcYx6KSk8v;z~Z^!mNTHZB1Ou^^Lwk<1ztg?O9H*se*Da99A?jo9#gd*z8)MM!-10Pz}BToWNencKr(*t zxjS+rV^2HYob6NQb7DSW8sxUbJiX?VXQ{XYGN3+uhv*->xFlwUlX zHlNfHvQ}UoUSP!v(!*VUWRlVI85dIg!qmD|HS)JAco=iBd$?HLbt3{%>-l#uGke5= zM{2}0MFt|ySH`n(ZM5F4B*jB1tMo6?(KC15jQ$%o$x-FONj(BHbE9V{)=-r334eHApd|kt!98j6AN&0O__=Ianrkw@&P!M7wp6IWG`CAl6kUm8TDo%S zmWnNZo$5-Dm(VQhRMnj*#@ki(v_!2pQJk76VyxMV7AUhT@wW_rc$ty!Hu7D^HlTPr zlP_xWrOkGrc&~7QJ!0BqWyP9siyqEt2-UaTm~(5et-X1DOU~R`1>ejMiaKZq$`o4eQsf z3$~!JroCO6)v{g>&RTrUif^{-^$j;Gv)Y^5^)|hJ4N4B&v`*mU(6+v@UawbX$#03x zYG~IBF@R_yl7D#|1CRV!`Cr91a968vS-}BBdIG`I|pe|*anr4NmG zAS~KQ=fNMU1&;6#pUNa&tZ?`-{UH6{qgw+Sj(rCH_^ATFJXsXq%x(C$7=NTgIEqgM zbUX_G*+<#cfBNbe$~NABS!}aK|QW`l1B( zfP!30#h)`5C@S71XmgwbxWkWa$)DtUxAMt2&+3_HIuxqHJBpUG68IUw zwrJ@00K=fv26F;P+dM*C=vX)~QM{l-MUyT#5fP=nIqZ7lE%$ z!jA#JHwk|N{a0}k#79-$2Hu#2(_pPh`1xr6NmBo3!0)!Cc3#|TcqPT*$Cqd}bMnMT zRdxVhlVhWh|L4GsZzS*+fFHa#fsX^I@(v?NPa~u@ye@daBq&xt9ZhFliDA_#QpekX*2eJ68MxW z6y+M5eluVLY{+v2+gAYpKFYtb+nuH5A8fn=kWV|nQqX?@eq-SGmW@vbBrSc4{7L~o zO2Xeo`DQrRnBD#m`j>-Qjg2=#-%G!yC~w$!3#TL-G_V2rZ3Eg0+x?pI!d^RpFNOVn zNP6JB0UbXFF$GBa4!{?HbKfT33VaLjG8+#7zvFED+4vyjSp|J&+4yR-UkZ8$zXtdh zpm*@sK)(g_j=s%kUzJ3^1AJzK<^sx#@s|QN!Yu}E998iT*O6lr@GkUqK5UvnRA)I{~klfUli^^I^90p?u$%fWJCny!{jK%bd=D?9U%RJ0Ie; z6XIv;igI>SB zp>0#EKD)iGVRn6c%d7@vaZs-ew%n*Uv9vsROE}ol5L9XxS1wyvT3NfSynK0Cb!~O& z!pgE*Nud)g-Lz8X-9(lkV_w%<+uYJDU|X=hu{PY&-h5+Au(5Vca|;_ALc#hr5|@T< zT)(7IxwgH&s;&9fdOi5<;HE&ZVSQszsa{{*R^QmHBb~1gDeHpk)~&xaC@8~gLd^{c z!a!4Ud3jI=sw~0ql2PNLU>hU}u4@nKN_kr_SQ^r=sb3dtR~BumU%tGumUW_mwade6 zbl~lxBALOg%0*R6^5@m&DNZRrUYetnr|8Y=g368S1YpHt*gy}qRX5eQ zD3WFMdddhxBpar-z4^8vEA{m$^_0D#bra1+2?@n8RB?Gzy@J0LtsI=Cavp6U*usVR zg|%~wP`bK$35pb3)Xm9v^j=yY3axL5*W)Z=Q{aqZ_os@I)7*GzUc7XL0%P0mf>PXF zP+r!cqe5?MZn=>}_(!m0T`Oh|et~k?#za|oK|t`GGp}~;9F!n6ic)G6=CF$-!@;Y5 zLI)`($&%^THO|{`?efyvII-lJATCH{no7KIA^8<1k)-ev&H2Itwpfk9_C;$N?7>o` zom*INLN%!8o{W55*2PbQdQs99u)BxFI^i9)$7fOWVrFNH8%wtbi}{VtFZR+ z0(<5QYwcM=0ds0M=g+bId5+`HDCEzxodiYUIj~S+ZBe|_<aZwFa@egw}5ew$(EB4eSe3kRW_v!+*veLHsQ2-)GA+GE>e{139mr@PMC*tJmJNPazA0AqUeqh%R+W3%-pOG!;R%6aGzK(M!Y@6YSy`UreU1r02Lhx+?4ePhs z@CicHUwnzIUu45u2vOe*+i*S~BE)=t0GklchOLOtBEWjp48bdM8)?ioVReN1>W?s#A;cPs9S2-kxzVH503xDF3x2t&AUA#6~TnR5V} zaXuxy4tfzn?#BsRkl$l2-M1>rC4@oP(Z&xD;_|5!b4WN&2)Z?xBjPXG@LJ3*=iz&R zwA*7gzLz-0KVZW#z%=0JULoo4vEcw9^=Cc-p%H;{ptN4P2(sPqx0<6et!lA>f0q8;v{WMECoA;cQv zCp=Bw7i6F_rdP>0UEcX+oGH&}8B^qaNX8lR9wB3@JnOPOKzhIm8&=w|%7)d1SR+;u zYVu5(0paS1BUTy-Arz)q$v9h4LWGC~xPX8#fsz3wHrhCrP$dJ(L#Y8M! z%7yl$-}b@8f4~op7?(7C&ctm_<`= z4bU(7g&T4l*Jx>2u+Xpk1N_1!K;`xse(76q=ytgU?ic7@mt6^5{~0J}mM6QknkT|+J%czcwH;bP+8Mq!8ZS%REpNJ0$2UHe0yK1n|{8yF3w`* znstQU3Lb?9*7ENr92ig=f3||X!K<{j^hbcqcsOtRn<=bPzHKj^zn}w(vrX~+p$tba zRX2i_c4y@T1MNf|ki?&UyV_jF+VocQeZJABIeS&Km)isK3l{ouOgL!`gC~83ujv2m zbed**jCgJ~bux$UR6gr_HF4tPMM9o|O*!m)V))6Cr=A}52OvTrj7H1q^ajpo>N4-U zi??*|@39`}z1wzhH-FE)efQn}fc?S#hlGa@J>qaaI`G(_%RS_I+)JiXrJPu@r?bi2 zto>A`P@K!>>|U2|&{L8#Ub{m~&KBJ-Mq-iBWF+DBxo75b$*j}vNF|GzX*Z zjgt^pA(M59nYTpZO6TY2GdXZl#UgR#@?yp{{@m1HQB0;^C$8daMX?|zQ{bug^t>Dw z^3zE%NnG+1@8JItJO{WyM6ZzX+nj;VNflOckYiLqut8YhP%z9Pj{`jlim~#klXH7& z0W9;-T0xQjU%Y35gZ0!hSnqj=Rlyue7byBe7=T;@-o&meKQV`TP_Z%yk5P311yJk3 zk^DUyrjYl7!a<|*M!{ESLp%%{`XN{oDDD^Tiv`pRy0_J@z&iq%Dr!A7R_$J#CD%KC zC4qau5Ins*^3T65_S@SLWA!w5*J%H>UcCis-au?hdAt+*H4Hg)r=9#>BrPWM>B8wZ zM0c@}cBk{xbGcbpnvB66AND1}89*{5F&>*33&j!>(dc9(o`{FWVvz*F?_k)cP@pak UYJ!dX1gsJINs7Iq*dG-87lTS}u>b%7 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o new file mode 100644 index 0000000000000000000000000000000000000000..8360b569a29549b54d1620fc0953d39bdf9dc909 GIT binary patch literal 6292 zcma)AZE#f889uwYEW5a{Hy9v7l&f89q7ZV~2&l9MB*BjbltgMPnkI2;9gw8S2BkyW z%`9QKE}3a-Ew*FrOn+*BI30$uEo1ivFvxTus8eR_I2E)Spvu=20nzk%-g7Q2U~Nyh z_x*a_k8|Gl-d*-5jp?RPC{(7*3aK&`3Ix#MiCU-^Qmx`DrkYpWKSJ^0z8&-{v?Qwv z>10J=QPS=&W+xW1$;$rI*>NWmcI0HDTpcZkcKlF-MV}$wRK93?R&vB8yVH8~;T`a` zfGS6vX#X487<@zY-EoEMjt85+wIctoD(`RJzS1g&tmM-OH*$V-bky6`|M9DNFo_M{ z#b&&0(sqjj&oXmj+w7&@iTuH_{ugD5ZS`~ew-!YG+@dk6VPXEvyxw=cmB~u?%|BN` z@3kZ=h8nX(3^jI}O!`)}DLrZ4 z!u+{;y?=K{=``>PT@u?Ox%Jg^RkqGM^T(H8dg5yEe-RSDqW_*1 z8XD;5c*5?Th5zx-#eYu!$Jt68ay6#K#^@-FPJa$Kw|I1_TZFY@sDFbQ>mjl5fb%=! zQa3y~e3Q-aO)$fkV}zrXuv84?E_jQU-frepzq1TP&pel^fsKkUtadJ#}>aGwCs^E*^mx?LFnyC%qHc+;vD|o}sb%p=f?r z6op1{T(1O$%adSVcHT}QTv%=;b|?0D2mFsLf6#J=`aU|2<(_d5c<1~>aepZ84)z^V zYIM{ccF*~P6TAZirLYX>NW>qSO3o2pqH@RGy99!QylTuC!=}a_TtHbbTU5B zl8lc06)y!=>KCWuMC0C|yQlAvcn!OIy#2mE#oNbh68Vg~&;KamA1TWpx-)jp+wb~) z2c?YN?tX8Ne<;E-kB|EPMC~Ls)9F||fXmhZPyGI@m3Sku+lzQht^7_Kz5S{V{Se)$ zMwgP9QDEEw{{^?iQr4NjmpS3bSX;a;69K{O-qLQxmLDT7x3XLwUbsvR>fBtRD(fo45Cp@d_92yu8 zaYE$$b!!jC{lPd}C~ZPde1C$shal;x1|5$0gHs8T0T573gY=NdXhkt9IC(q^1DLRZ z)nLzhM@G7M4#)Ky!aIyDwL;PNx}qA74IxXw^NH5u7yYvF+v~pG_n~Az?(X$J494%| zSB{@J$-e0HNjzrY7su~}j2{NZ@xtD{7{St$tdetlsISP6OguX_YMhTZMPkFxp+Gn0 zq2u+K#kzrCZsK-Y@Ho9_`d-1otTgYXjbg@Z{sYswGHH)Ipr`Y!_u0j%&=YZCMmZIF zA}-A7F%%j{$S|g$j4u~_gku;`7G8P1&s_dmk4iiC;*?7_0;j6NoWkwy$9S;}R;4Ox zytnf2-H&pZARyaqJXR%5hgg4Xy)CkF{^e07mLJiU{wrllsT%h`TKIotnxIWXyR z;_j)`_L6e8Ur`RMmzG03s<>Dcf}x!JF1zpZ9F8H;|2CRcz{gh|XVjaQ-x-z9AZ3Ms z;|eJYyrpni;Ehfg>WPEW0)QAg5Ca)EI`e{>m)PkeSh^8QKiISnb70{HH_0m^V@Lq8 z!3jQsVO+-G4gYi<)QPXSn0&}X4CB)#VDTe}@u(+DKIG)=oYH>^JhZlQaCelQbD#$g zN(?UW@>ha^o>=(8qL*+c7W^fiwh>ECVo7}QAeQ;mg*YZ3vDD+w0S6pw0TwIA8*Ag; z_)<189K*u~09MXmwVrXHu~if!r^4YVAyEYy1|c7Y0lZOwQV#{N)PawRFZANT7&?}= ziJf?c6@&1^GKOFoQ|H!s2%|yUB`igPjgPKFaH3}oQWwMO+Q3NdVxUbhx>oX{XH4c+ zAsk?zqvXmd9u8!c!<681px}azS067?0Ea)ph@Cg$spZnXY+4_AYQT$?)VUaoI>u2Y zI>7aUF7ONDgan7U4&ngSM;VkkltYSmpgGY8yuu=%!<`Fv2Y1Ng7~<*R3aN!WRnaNc zpmkAF>R<=2F$=*fEZCq|f+0^FFj3lZiH%g-6yi%R>V*f9*u-#A-=On~o%sTt_SH2Q zY>-E4p?#tF(keBX98$Z)6^qzd2kOGp;UJ|$tK9$!Ufu$lho~Ir6&Ye}0-=Kfdfc(7 z1MkqJ8Z<94Bo<==13hfo$M8_oN9O}p`w}lPBp-QVh-E&hfweV2V0==_Sg1o{(dD8| z^vEwU0xWQn!$DXTR*r?I!J-%2K|UOXDN4NqJ$S4zUYWSKKxqSKu#h#+*D7q{D}Ll9 zCgO^oakz*np{PS*nb?dEtHc#7@RCF4y;z^AOV=61lpMNt=4KvKM-YoOAzp)xV`H-r zzQMMnZPYbTg`;a=T4mW{v%v!co`jSpHvQ<)EQu)Wi1zMsDpJAuP@mXQI>t1TXX$2<+0H1vv0m(>cny3 zJ5slNZQ9jWmCdi8k-T&6ted7!NsRsGoZ7EnH+e$j8@JB9@!Cn_$5d6st(?;PcR-nl zqrjc8XCYh@%CD*njVY^2L?(@!a&_FA8nwqxs~8`ysh@u1thv`!r)FMXH^aSY-VL|b z-aI>btrH4ck?6Sighct(lcroVtx7%E-n%B->vXJcTl2WHHq+hnMCTeORa-yP?G;PP zsm``N-ZN`?W4ducb7O0&e%AM%Sktz;#;I;^>&ZOk0G>{-SVEr~rE0q~t825Fr?aZI zqw~opGi$)K_w=aRHJ#Z^?c${m&g{vyb*xggJ>T!ic4yn#!3A{PlOlI_KGv3PQ?>f8 zrP_|3tUCw${eKs}w#oV6TdJ&j+*@Ks0O1*O@eE7UYV#DFF_hzsjX0k9eMaWDd#+8T zPLP9m72t{gU%0z~VQ%)3i}5zm(X1fe1CWWEX!JH188{=;M)@jS>vj zB`l(p7dv zJZz+7m7%bIL!Je75p*IdcpLN{gn7Zpn?Q%rklT#B9<&njt47`h`ZCIR(a8MKG=?&B zMqU8gjO!L7qfN4?W4#~{lC$cKrneFb(LNz-8HFak)43Y}c1U%v};$7_>jccSViuZSSc4T^b79#E{ z%FElHx?Dw%MVSj8smmgyF2@TXaA@vo@5GPSd?vU|I8|fB9|Af9$ehBkGdfL!$(iier+Pt=Q=}c4gC+!TN?2I literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o new file mode 100644 index 0000000000000000000000000000000000000000..e15adb64039f2db3723d0d7f0c9e2cfbe86cf4d2 GIT binary patch literal 2456 zcma)7T}&KR6ut{f3+*Pe{ZmXD-6l6?F?4}0ji`;~XLl(&0x7UkX}iwu4zTI4OLk`! znwnA<5+_?Cwv7+IXngX)hdwlYFlrz)fEs^Z^ueS_eQ1I|C6uI1O*HtOnR_X0)5Me9 z`OZ1_JLjHz?wy(QVKw4%xyqRk7b|BjX#o4(j?rj?pY3FotQg|%#bytA7Mu4I%=bjQ zmq{78Fi)w9Cihy6eEFaC_4UHSL-mIH^uT;y&+E~`U&a>xB%eT-<#s}>g}Gbhg$EU1 zQ6Y}=6(@=`;qV_g!l4#g!gjj{gReuD9b z(zZNzr|iOQ?EIPV3oA-wrT8U(4-D%ZcNZu5B&lw08NAXi(^{CiuT1>{FD5TiCdFg< zr$hXhg*F5G!N$h+Vu}I10-g3_!(`i;re?psgjJO(3m(c(E7}Pbts_ojLHPibX@eij zM?vvm%?V;7Phr+e0rCt$odGpp2g-~?aa*+;Y2K%~J;iJM3e5?>wXNa)hAx)0Rtq-fLwvNTa)XjsDyrY8(DaJUDxuYB zl~@0H9^5f-%?)lzQ$WhU0n(dD&d;d%p@KAH@@oUWGPc%M=%-0zZk& zN3Rp{<@Dot9pF&@-54Y@2=LjO^Pn6wc482(9)sj6cwLTaKWUD}Qvz)#9_z9I;UEqP zj%K4avWXWZMTq3R1iMT+fnGH76HM-aPM-+cFMTqC7@L>6x}C9m@JW&Rq%Co?-_7o> zx626|D_A#>_U}jqI{}5(bEJaBp;Swg(P=-Ft$!M-Z*zrY%hPgV${&fBw?@uyXLq1J zkA@sT;k(iCGq8_hJP`KN(Dz`}V$i((SrtCAKY}iW_TiTXkn9gj?3YXIA4}}dOYAR7 z>|aalcS`I_B{oZ#S|*VlA2sW8*+gA(IFMi+>6957epMf5k*uyeTC82|YHd+tU6Dvn zxHs0@(yE4IY-BW+Fmx@;0%}`#$DvrgR2rmmNGd@V8gAFqdR8-ar0&*ISqjgmbE%=U zo{Ys)=~ymxR%fG`x0#U{V#hn%V=|!C$l#j+dJ3h*M)HQ4A}gzF$t@YksgI4CBbg+r zW@hVbXt-qvJE9iQx$W4+*mFQP4v_x2gq^~Fifml8F<=$W|5LK@vRxw^*XkRx@e=^k8S;1lAK{7d*GWBZVs);U0k^=kx1fK=aEvJw9= dA>zLixJHOP3TmM|&k`cfi-gG2D)1G7{{g>ME*$^> literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o new file mode 100644 index 0000000000000000000000000000000000000000..e4d201461ebd0aa4e3127b93d184bc0844ab1b64 GIT binary patch literal 9992 zcmeHNYnU8Wnf``}2^9$f8g2_xBoh+IWRjj+2!hL`GYKJ0GGr!P1R1NlYi62scQxJB znHh*nAb>)+=mLTg1s?v?+K@BO~7PQB-xuTIse3;K&;i(raLe%#*n?yz{vu zpCP~CiZAoTUAYebiUm79X+rfW`YQ-e>Wn7Vorpo5h)I23Mm#1b&Y95uE2d8FxYQFeNOT*7o^QqK)A~hdP%?DHSGpYIU z)VwP-Z%xhXQuFfEj8n6enir+!aB7~Bnx~~^cWN$9&0|vY(A1orn!o*BtMk81&7Y*^ z_fqq*)O;v4{~VupY#vsH$zwxDK!2Pe#ph(a)Eo!d9EK8s17X z4yQVO=(FdK1*LLWluB(hy_(;MgE*wmv}9zbzHq7*SE6FlXzGrm(W$8^*W2kAg6iVf zFGSUCVLfJhjb?s-8F0t-pkPvh;*6%X5xChvrCHuz18~QsT6x;0>?2Rx&@3NulR2{& zt+XUss&0Fgb`a4f3YD6x2d(;-hV{s=hYd*T^s5nOaH(^L~Ga^IHe7RKcH-y@Q8PPQ;9DiF-E)`4heiMe9 z`HL|cel@7*4KbsE^^Haoz1&YYA2e`X6jKAWQmV#&cEFG8&3#)5r{b{Mz@Rm(`hnq% zel4gs*f&$kofs%1F&Qvn0t%Gp?3+++R`OxpWQ>Qgk730*_MS|eDF$(1a<*bn(%UFa zFcV`kqNMjFTjNej(Zu7RC6c96ZI;W%pVW}bV~AyDLU}9_7!s#@Nj;U47Nhi9&Fa=_ zG+Ff<&5CcMkZuRC)6ZjlXp}AuO{;F8(5%-(bldpyA*%EL$O*<`J8F&6cr}Qd_0~ly zC6sGimau?#vxkjhf>V)RT-muA)PO`WP$KD?ZmX zT-KcLgqzhyvsR1hxE=k8pfQnNcQq=_!VVsMzY$%yK%ft8c|BKU*)w zr9yz!O6$?bP+;VWGMLRKmFEZb@n(f1o6H!m<5UFiW|NEp&6wFSmqw@emxM{$7MiKu zgd5lC=f25&4CunrQXp%?WSTgMD$*5j5D-M^JjS=oD>#NnH zZKWbk$WQyt2B*Fp`x|+OBa$zNmCn{_1B1iM)@9G~2b%E&dX6D7k1-Sko>QDOVMg{f zGqS<95=wYIACG3eOdhOR$i}+cNCNx#61pbbUy|cZ(l|s|!^W#-a*U5lIed7W`V(Qf zX6gza*0(Oo=p&b>-z&fD<{a~0t3sLb2e!5;J3RDS%~5+;DEMJDd5JL3^7Mf(jMwlq z#d^_+M^U2@jEA=V%3*apo)BG+3w#jN!%LcBBld$BOH3Yb54x-lZO9HUT$yz06yLe6 zS$J7w!obgLLH^4e7#N5_YZIxMdkex3E>Z8WUK7 z;~)=9ak^qSTc}57rRqxlCX9)huFN0tvidsYa<4txp2I!%#jTyV$Smt;j%RJc)bS!a z4iI@gY{r;(Aby)H*Cy^#1AZRb-kV@EU&F7Kw+=aMAD1!*^WIH|J+!?nxU28Qg(8O_ zm-^U8)wcyUPw&Q$#}Wi5of8@3Py4lkNjUC2IO$u$k{sq8g&$FmUm(vtG=_O^^_6kv z6`e%QdkcKpSB5VBpd%M_(z=ld%zzAUu5IA zfd3Tyjh0^t{u21Hme;@!$AGY2sP7{1lfX}~{3_@>8Fn%cb0mlO5aO(3=AQz76*%XS zd55aPV(}Yky{eKL>uijsF)0c^-bgyV@Q-v&Ps zT>JYa@G~8LFZfn))w3J?I`Bodz3ag51K0MZz#j+a{lobi1AiG@+aCcx7K_(18y`XJ zR@hpesvI-b926Zsmrj?XjTPlIcHeg_<~TJ`i0 z_|f1CY zh--hp0{#W?6KwuxfKP+#_4a_z#(Jyk!(W200N4520iFZb{*8g>!RG_n|An~zcVX-J z9R~hO@I^Mh6#TGu5OcK2(cp6&?t#CIIo9~EXNf%T@SlMH)ZveV|A)gL1pk)9?*o6> z;U5J5M~CkMzt7>jas5$8&ottDocK8S`yIXo{6>do!FM`51I~Ly`*R$4#o_b7^A7(l zu6?e+rk5 zuW|Uz;Fmf43h_n6u;)4a8?X;>co};63`veQ`5a=uR*L@oH8|IZ)$*4H1JP4d@1Og>@H=3K4!;&QpV`ULCX+C>D8=EN*EBghsTBuFil$9rIq)$C7)zhnNvhk=wlWaVy zuv;skTSv89$GKZIcdO=Z)oha4PDVAGWaClICfRsYvq?4{)tu4V$f)Lwj&nveXLOu1 zs@Wu)c2u)THXhY%l8r|-XP8WnO3vsotKy7~vI=G<&rrFlR>i7Tm8wcrXlrck0;40V zB2`iHO=0fc$-BC@JJ}<9coFA*+RNd+5IE}|yf2dDK{QG{Q)HaDK3V&{Gw}U{e4WVU z#I@L864!{_M9hlZM#O{fPT~OGw}_|Xy_optBKH&DD)LXn(?q^OJXPf1iTEJ$G;tNa znGhlFCE`kG!?WGP!}JZrKJ2@Qz1Ry7@quIo5g&TqLd=M8Z{*=az}ZB+lwC+%hW-%o zV5<|C;`vX+28G|5yc0!kCN2^A5OJ}XcOLHqd`BQ(g#8wAA@+&H1tR}OJYM8UqA&6@ z;&CFsB4Xp+b^!2Lj6V?@^&^P*AhCdmjps7r5ts)eHbPnAe36YrY`o4V;)6+%co^n^ zhz;PSL_CzQCSt?*9^yRg&xi+!+(Udl_M61HBA+K>Z}kWfdo=Fdy*VO3AkM~rj3MHc z;{_u25w8$8;)izu?=0*AiG$e76HmdOj<_7(BZwU$rxUSp-atGU--(F$1w^#P!@E8C zrsbhXAVIwMC3WfDntbQ-Zb|l<-p$FL+{1>EdqwZPB0ljw$zIjF5${ptH()er^tE4D^WMZD@5Kw z+>w08^HBT~`#c7 zirhs+qkD*xB7a5PCh`elQ{-=mxcH}u4Ux|h>zH@qCCPiY2aykvN7y$JD2M5ljD97nwn$CCYk7bg31uZaB}{RNR1iFxe5i2?rbet3ty zk4G{8mBe4&nuvf6F^9n)@I5{08E^4f9Vt5A#nv z7xPa%C)rPVTQL9RBba~UFy^1Q8S_s(8}m;bvg^hs%s=@Zn13R!Ghwl8u}1s==AU>I W=AU?#$adni$PQu^-zSOZi~KKlk>!g3 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o new file mode 100644 index 0000000000000000000000000000000000000000..dbf10deb219593513353ca1876f9389472c1bdbd GIT binary patch literal 2680 zcmbVNT})g>6rSZrw*`9vQP7&YiJQ6@S)fqTL=yQaP~t_}ZYhbhT`tRQA?z+>_bvs~ z_>*TrO9!ki#X4g-a2jyVM~qHuyxDaErmf(DCGr@>QyaUtQtejOFz# zycGU!{sC^z=w9y|=gT231=iQsGhy%3$=gMimb~psJeF?puKopW&aI?WR!bd#bFL!w zgO>6`QWkA-o>7u(MOI64&6Su;-ff?mO^3bi%t5a&eb8H?Jk#gy$;;Kq;re+jbnn~B zokxBPhx~1+?6Lm97B$g)Nh&m7#)gWwcQF^u_nS6!O{=`P>jv4-PgrzD4Dog%9y zdB>ITrFA5hSJm88g&J(H%~hv|eE>=_nSTiQaPBZx z{ePy;KK)1P^0Q`jolaX~0xOu}M8Rk+7-DcV5w#MYP}qo`@ywX9_{3Dy)9i1lZ%Wvf zW{=M@&cqvzcI(|8f$m^)OT+1js1dI7_(qMmIp%@8t{?B`o;o4?F*EG9%vnqLLsOB6 z8HF$!j|+cv$};`E&kxqeEh983{PFR)6|;;{NDAj7HXk!A197H^{!rX%YUM@#Fq9 zlcOE+JhtR4d|%EoO!_rqa*V)lz!B}0HqJ*R+Da^+6y!%Ajyg=08#(=kD9EAwo&hgX zN?;a+{1nEWkeL(1Grwlc{CLy2{7vZ8Q1KL3n6EDpx7Ht41{+Jo<3PrDMydD`!X6~_ z8nDQ|u`~fT{}YnuXGFfa7{x;VS;`Q_8(rckipBlnSBOQ}#{Q|oc~^lS;QSFJPVRGD z#k-PU2B$nP{ZB|cf%o8ht3iH55g_^d1^hw*=e^aS|5-(V1jAYS8~JMS$cV z7H|==jHys;ZrW;y$3hL`5hLUe3BTTTxUVtTsDvhQ2!?=ZJ!j5|V6Q&V*`WsqdU^ug z$AZT?I`!_L=!;HRfpJ6OzWuGX*gv*kKs`8(uiK>5!ygk0@VKW1aSRbN5}KY9*d~pT zHY{<|vJ;Ue=7fa$qERz;$cT^IHpjVZ&IknbV6SP>so$6lOuT6F>Kf+GS|K`tB`Ana ztQ6uj5k}Ulq(+E~L^SKy#D|3Vg@}*djkhnsNB9KsK_ME5__&V{9~I&xa0mKljEMHU z1mt;t(2lrkM8vCt5BJvtX&)qqJxYZAO=-U@?Q7)7rwTFYw^!mmBJ_Pk^W`5SaV>t+n@L0;v7& zcfWh{eaU+L*MF_`f3L?*du45v!{Nx(tRIJ#sX6Qd(iIJ=P$H88?R+guTbY5vn#p(G zH6{G9JI;o?JJt|`88Y%C$-oWWPQ!^}{A4njjC6@=_Zz2?(>r$nb2s6&?kxGY+R3rH zt6eOaErt;}7#Mp-?@G7cdC@?}N`h+Lm8xf@>KQN!BF6&WGkR8`=eq<}U53bxRjOl^ z>?jVIexoST6}aB&D%QzKi(X879J>GeKzB)%?s2O7ID5v$Uoc~HpyN4b++vh?k3|lW zVtVK61RhMYN_SwMHScrv?|lSaM7fdpKK{gavQT6s=3_Pa!fC|Usn$3VixML-*=~5& zYFMEf;=e>n5+sU=XSpgFMDei77cl>T1;zY#Rlb<{dy$u{6^FxX-S;-#eb1UZr!>S- zo05otk$uL>s@$t64FS&=v&FknYzVJ)-h21C(1Fo6n^kTw?S}9zTH7%1#%|{_4mqxD zSm+m|ShwF$6Gu-9Ts(k3 znBUt(@jj?Xy61!Lpi}tc+(82djQq0*k3nh;4Mc<*8=CXav@V$T5BSGEDD`LH&mDrc(Zg26WhOremY@WM0X?^yp#iyjCRYr=+2hF6xk23Z=Fgedv#U=jB9yCfgIF3`#GdC z7~M*z!mUnCU;aMo%}RHg9Mw5PpZ0D-b@;T$3>i~HSFZZ8G2uyZxUbi7RBVmKN5)P# z9jn0w0V#^#h54NmVD4&9;rf7Ek`)~LH^7-$k*>BJv)&yJb)3|KSv3L`?MERAS(X_D z75qo_Y|sIJYmNM)dQPoTjK6-P05z2w{?xf-E!z~FYEy8su~M@svI^?pO^V~;wdGPn z6)%eh@zQTpNa<_=@r#W3e}af&edJj1fj1!nNeF137AOPJjYl-_+P}>2bBGo&spxDG z?U8+}p`{y$stlti#zc}36Mx&~E5Quyk=h~2M{;jj);J`&%zaC=J?T3ht#E|m1b1_? z$0*iC%AC;0WDlBaz%am*d~cVpFEGWda+)K2TU#$8BVg&`H5h_6k9qw|D19(s9NZGK~Y^4XRgW))8ju6AmYL}>TdAq`Ev!zm5*R}RnoduZ13w8JH?+Jo5f)Y^=YSL{oM5)Urhf=m;Q2><8WCPh}Y`wc7{2Pin1&i z*bT9G#w%A(c+%+GPx+2Xo^Ib)bEWe|Q%{Vxq*yt4kg^?%@j~9cU1`g?3(HAdHbLl- zjcr-ska2J2*l z2J>yL#xqEXT8vUCQ3+O89By-Fw3a}3V2+)nTigj1rlkBFg=m!vmLU&7TDNka%B8js zPkh5_8&of~Zjh))4z^tj3+S>&prG4YT3)BWoKnpQ}ZkMpqNjm#M!ZZF;=# zfY|ByWIzF;ey_t5xWOm1T|z$ zV2;$0Wq;njkF+!?_46P?c`Ky|?LuX)c^4&UuXm4lPi!@Fe=D|QrMcS^;>h;>Lr;KL zrB_We@;dgz9P0wjt1C_2_jaf!vL|psbeuzEnbmILStfDkAfKWg2D4~qI~bdAGD@2sM~>(uj%fj`AlsKm93bB#)2x?F=3eM`FDr9Y=cleH%F4)^c{a99^XG zuzCdD1Tt&+&c=b#Qb=j)@a(qXGQL&>y_-NPGixoCd19t@$=u9Kcetxuo7V z@W;Ecb7Rm2@$00E07UjVd*vGOXE8?a;{-Z%7X6GsZHjE?jLD*n5LocQw_5azcLGyw z&$2l_{WwT|5J3elK#f@{}_7?gNMklJw z;gM}}n;p12I#F&;9&nqD|9CR8jhmAL!Oz3}u298F1e991|LV{UE4kb0=#S!WsBqf85L!)p`kx=SRgA#T3q3ax7M;C`lCy;f!<}!T<*E% zriSr<s_g^veo zUyd*MU8w=+S`5PE>W|I>l@WYH;P4kmA&9;oHSPlkkm)q0B4c(MkIM2u%&y>69|eTY zsctHIhdaUCj(?m?${E3Ke2l#4lQTzYFG`q836ya};X3lhGDYjq08>;KJSvWNtfh~U zq4E>}yG$4T)#ccGNKTVBJT&%AisGweairwufsu}59r6%J|0z6AT%ysd4?7aozAd4>iJ{&u zoHh|S70`El9KxjIs7iB;Pmz-UpB*FgA9Iphe7(~H-@> ztdZ_fhJ)MpOZVvC{sAJq2H%0!M%avfPDoS*I2eFS+;N6I9HMuw1gwN|_go1>r zs1t$Rd6#gTBf9lS621zeOmwCet<@YI{TlN6FJm{;=IX!f>fE3ZMS1?M>6IIRyCMNM zb+hJMC*37iIGgVB$^&Wca*2RA>!^{G?Oj8sm^Ov#E9@zR*b*jkQtJ#V`Hh)Y)G`@h zFf)WBPo`SwG|3ykaUaWpJJ2F?HpC!LGA+%MOl3bzXbA?TZzcthbt20UgOgu|z$#Ih z))oyQg2g&JM{@3ZZf+e!{|alfqSg#^eD4Utd8~d4Q-c11_Qny$Qft(OvC3)an;U zqTgd=Ol!%hOaE?Kh~K9mVBjx89C)qw4T5wUQgt=D;9?M4I%cFLpsGeXA&-zjvZ}~R z5qU}EHOd7SOBYQ4Z(~cjV2Ls1f@@&2N(Q;$66u0Vr3)^l3-$+Zg$pjT$@E=|K^K3; zYV^)|biW^S4gsTx?zbrAeha)w-%)ERr9cGddn=u<#fl-;7|*fumrzWPL;*oo_(N*| zSfCv4Y;pknA_L+VTDWF>DK49&kuKy)0ZKiP#ML|hjn0-17~)e3XUl^gWQ*WzA47IP zg6gH->5=28{qkw^3X1cUF1A3r*mR+RG)}Q_(X)R!F1lcnph$moF=!ZmP1-Rnc*U1> z3*IGN@Kou7?~^WgA^0F&@N6Z7zm(;47fd)<2lVMQ2qayw)y;CjFnkdGsRAm#-~;K1 zrLCHQJf>5d?s}zJn}`O>_4bPm9c$^w(%c$XKgg}UW~@b3_*Ml^C z5(9H9l8cn8lPxC#^MRC+OG+oB&l<~sggfHz;Dks;?_+@g?nQ<-FU9TJT_nY$Mi;<= zMcOkNQ^C%!ccFs}{9go+HHMQ&A4qloC)F~Qf++igEK^gh-$yH?tOCfHN)?7&m6PB8 zw(LRXwLHzdO7R5DY}}1ph%_K6z*`*jo~pIApl&AWf-^9t99v-A+lJcn&BVAAWv%TR zK>E4$=S31}=aM7<^!q7j-a=cg^3?uwYu$k-d+D8}-GK z0-Oq2F}y#;E?!Av`88_!jrQ^>GO6Y7PeD^tfrqW?(jv=&{zKPHr&I>DGDz?A=X>5??bQL8Ws3TRBKvG4YmKp1e8yhr3)VL5VLsZ{-e?UjyRC&1-e^KS7 z9zUbQzSmaLF$#?o33TT~p-%SZ)ZVPR(T{58 zVj7>9>U{*UkJ)MLLoE*wrFvtfAE8>Q_k85irocVMQ~zU+eLEUqaXBfiZ4~hQ0U7Gv zNYrxHTHDu9y8@X3W93m8t@TNpF+PPcsVo_Z;IxOue6CCZ>;(YUv5?4-&SnZ>YN42-9Yv9=V>ji~AW!SV|1RqbtA}wVEZ0v9lGA=wc*~;9kfhx|aZX zq$V|(NB^7}^}4iq*`9^RWNL`7sa8cM4E}2nN40#eL`M+^EkCkbI)m`|y?;S7)awUG zY`eRWRUu;u?Cu-LVyT_1q3Qik)zko;#Dr@|BU{P;X3Zt=UazDA&IKh1hMbB;fZ+ie z=s|sWS;|=kdJ-yzN9dd5|PhRd1<#l-y`d#-9Du9(r*7%<)z(z2YK3U8tRnY4u3r8xyo5P zMZ-E@d^B^wkqj?YlLABVjB53S!#@5=@bXPD7Y<^CWR$%B*v%D(t-BKpd-e+g zydP-O)2`h4f&hCTmvx1hqyHqPzr0bn&UrnI<8%|}$9!F(`!=)=m+A) z+tkg`Vwl)8amfv!NUp&3ByMue1#T|_$)m!4tPSm+9?M{K>jXp;wuRWOyf1CZB!U~hpK$0HMEqv1P$4`{3B znmfZEyQm_mSOIPuU9!#FU1bff;Kkt+j^I_cF{6J;WTR>o>~wM^Wli_T!fRc3ui>BG z-=G4Wo#CY}$4Y_(MudG13D_A#LnzUFAV zE_!=1wm-vs!0p(Xi3{$enNc?6!JI|ItHY~LhS#6O8=ftpM8YkXgd;$%(YhH6e;gV_ z$7iL74!2rS2kwiYb><%o8I!8O1lH+sEW z(@H)!G&Ag{i2WXOVydm0ZJZ{qD6f>$#k5UpsbIryngY3NYsNY;&-*wC0Bg!rR3m%I z#iAF(95Qc3s@E7AmEOXBNCL^wVE2~nrgQ-MpHi`$GWBrv&boJ-kbcz_}Jo#cX3 ztu+=(*E$;&>CQnm5(>cz{wlE46G0x3>;6q*5;jD*`lNo~(zq6Y8Tg%eHsXO36WK_p z!HDmZvzTh0k4I+ym>92iv|wh_e@ovi8GEP7OMhIg@&#mg8S?a0p)|*Ay*-4<@SD&p zlN%w!9FB8mk60&qI@Vl{Q;*uiKlNXrepN& z^c@yQ^}4OT^?lp)+QWT2y$3T#h1WPmJkt@5ImNozLC@6?5?y44yPcDQ`^{-EDxM$X z%H$x>_33qeg*&kbLv)M1z~_7-4cn0LdgplGiO@$t zVnjV*Bza;KI@g%P3OBUnV+yf-8N$O8Ko`^$rW+E4Rm#WCU-n{Zz(uMTmC8j9e*Ot^ zVn9EpY%{~_3p!i#F-l^GURX z6Yrt66z*;F%4Y-l;xxGC;Y%ZDVYfKW?jOnSw}5;Tf*)cu*)LlDBNEV@tQBr;yMlzn zOWnbQD^P@+4CTOE%SybLdK_=fToVOr+K<3}ZNpPM^;$SQ@E8?nv+=mZbRCO1-bPk zz8JS{sYi!{f>zL?5wvJ9hhX+acuERlSK!$}E{gIz>DzEqWJUw9Bf{0PVfSD{lYG=9 zpKt4(*Q1Fxq3wEb%YZ9ZaYp^>sJk2LRVw=7mOXC>Pk*<+Uy4<=@14*=u?5mlic4*D z!W)8q^ByhQc$ouFZ406c9e7V#x3h3{Y=5S}+Z;q9X(FlK-vd6fM_>NWST*cWr5iIY ziR`h)UV~Cz)Y*;1gO@$fOvp;HS%)`QPO(9M4&F{F8I1OuP-iVM)C`<*nzg62YLL5> zNBn&=UpeX6kaJY{PaPMHr%w9b3+(}U%sM9@+j#V6aXks7RS?O{N>@&gZ?C9yi8^<5 zo-6bO)|NL85>}8Hx{CNIR#<7iTw;%S3xjytziGO}4zs}-#qrk8*e4!+#U@PQJ!fX_ zdpSo$?t9{ZK2p1xqV!ncjFu6v{}CC%05vV<}2h; z(N>4AKlE{8h+O_>;*i*jWfc`}5$y#)LGO|sqZvUhrkvU#$1sn`gN|1q1iHFkbc;zvON(>L2`jdG6#Iqu+ z;hoRnrmfw@xeNx41rADa0eCtI`n6wta}rc+cUzj$TMRD^@>cjB?II^sFI9UH>iG=0Ttr|MjNQq9A+KJ=Dk zT0VyN;HGr5w<|L@OZ3EgJ!;1k*(h?eq7{%XX=gBZabz6KG9F7m`Ymvm%QbHV>vHk< zQN6%?p08IYi5nxw@Ur(<>TNSe6ziov z_UIxJU)PT%qFH?EJqSY8yT#_Vx+r`YxPphP?})b~Zy4tF^ciO6DDlZ92g4sY9P4v- zh)w#6&zzREyACv~5ANi=#HVs*Y?#?GYe(k>d;}_LGNuF zcII~zRF)KJEozB(~X z6YoytHx>WQ-4^2X;BcvEDsYL<=OapvlnRrtL4}*b#HD=C#NFY;4N|p)aAJV9!cX9B7Dqs*n{ZZ^e>a! zvMO%9)GP7BeFykzW^DTBKl1CIxiOrl75^3d;UwdqUWD5W@kO zeCh`Qkgp><(I%O}@3P8)L+!BG3Q2en&lK>&7r7fZC_dyf%=yA6xTXtHl%wN>awy^c z_V!^?ox#ZQplU*WMuk!}G^yJ@_Zj#)&6B=TxgfsBD=-^eWw&E@wOW7qgz1eoUT+U^ zjqfvk(q|o~N%HnfVfyI4OEDx5cjUJBcR1llrc1O_*E zIn5!_8i#L_b(#jc{1Q6B=dD{0u4TA5AaBZy=>wErRKTh+psc1XOV0+XHkI8)VnM1BkliCwT|( zNnZLFNpw=q|Kjs)r4Pyg3=XhySp!@RrY~A@t8bwltU$;#Iieof2I-K2J_H3)s6Q4% z1w(CY{Z%Xlmlf%KS#go@b&8TZx_DXb4q3+8{Y&@jW-=y+f;F+@6TX* zk#CD$w8_4e(+?u+9g<~On7JlS^@cedS*Eu!aQ z)Yb+6>PY5nL~l-0zb9CqQ(5Ihps_hqg6o~Sl zAym2zU$qpK!6WMt1M8D(ayd3)ih1%Az($DqFdTffUHb}}b#WRk1qiptT)9JVn=SX$ zM=(%c)cpiwDX3&)Vu+XFbT0OCBe<7?BY+TqhH|%}L>N!V5p+$$HqQF05*5~0mC91c zIfAd;9Z@9IR|iTYrVX+jxQH}Mqk&r;v_A0Or8LBMgWXisMq z9*s^r>Wo%7e8*ewMaKdH%U3lemvrG(F{+9|HGY_eGZVALDAu1lfWb@p_B#$_ULfAS zWMlY!hhtq%kG`VUX>G41ZPz32dK=w}WZadDy&bWm9N7pod4bC^FSw*jY_cv0E(SZm z(eS?Pp|Rix2*JWwixd3ip1#0$T#po!!=M6qlP&3V0Ff`hS@VZO41I@Ak~BKjei(HD z_-yj5f`TiLmLSR9aA`ff=4O7)SQhBGF_x_v#q4LI8B>wzX>X9${SKj5$Vh`Z76TO*ZjLr^=UtD@MB6QW@1mu|cR;T@fJ|w$@oU;Bc+AC~0&^R|tFy z>x2YN2r}R=jh6qka4Uo+PpR|ZqZy^nl~6V~j5`2>=mAooWL(^-5o4^{rAT5gK{s`yNB$?O% zY{lYJL~&aoAO(pWw3kFNlZ5vmY%)4HcKeRDW{3juZsj;IxeVq~kBp|wG#WK>L+z0! zp;4W$4V?($p}zfaWE)8+O@h2~I77>84g1vjQF)z@=Cm(h2h0Udilk*AwE7BGKql6| zt}H`Knq}||k_r2Qa|$jv@%bbUY=?tt@=R^WYGoiIq`bW2q+h}Nyn5=mjM8w&xyQRr zY!$oBKtvOt#uAs|h5LtalKRk{qND?QS~eo|UStn+poEeR4ayDZ-Tn@FHDL}PFNWhg z*Wrab+AhT&n%AF@C4}@a25C-BUVhS9rAJz|gVuqET2k2Ps0sue)e8_&isQdhRB>3z zXvDk`;#R=BRQL{W*Cc(}@sv=)FM-J=5GD^+6pQsDQuM_3c|iEA)Fs)szi{{5ji(%& z9LIAGgpUKy8eBzWc=vSf0a1+Lj5Ig^b?58|cb^LH;8%noh7-iFZ**L^g5z;_t_rzg zkfJz*Cbtx#EeKKNak!Td8U-k+(3rN zz~+yibRdj_tiq^k+Qlrhy;vP=w!Bsel!pid?J8G*bzYv!kiGLff zOvCD*B%I?k0<=_j2?Y=<{>zg*&i-3iGk1%6WENx-ORIsClY^l#w=0?KIE8xGqKo9* ztz)k%kK)-Qcf0QN+Vdd}3KjRKl@u0^u;tBUa_%~wUsPaVN;^*t;_Gnus-Qn4AuU{- zq&@n29BwIywSYhi&pJ|XYMyz|Zj~4EXq6u$H-otO08ed?aj@Z$w)%|AU{BhUwLHvM z-B4q`--o5)u)*8U9P-+IR*O6)rpA^7lRpi7+- z4%)=P(=35*@#u0Pyw~ukKgZFrW(3G|vpiV&rmshz)PwK`HSL#!B_XgxerOIoms+$G zBHG)6KNLF|*MmcM<3fOLr4jYg;UEqcN6oP~`{ItIR6Ul2`Oj9dP9B*J#)P8f%RsJT z^C2p5ZnXS)@oC{(*b5zn38$up3S+(=?uhXDFs7un-VZqJdEjYx0|a-W%TUNOozG*K z5{6AYZN>`u8ET2#!DfyYz3Qwv#?a<%X9wQ#Vskkx%pK1zP@+H_hh6v3KhUI#0^SYW zR>lDJFdh;B8pu-n7+jh(8cW~`AXjQXDO~~Lxs)rY;8dk67_jc?yO^}A_5uHpzKc;; z?UemXUsAD3`YxtukdH?{P6d;yFuj>$2OU#qSb`ma6MwBMWiYcKTAzgY)o;Qj*Sf+TjJww9^>O@zkX!oR17tpSm37CF zDTq3=Mgd{HU6GAl4C-^EMUVHrW8xPp*y*`M4-XU*uAp0IrsX*ZQ*?5pF z&$r3i!0;aZ3Y@Q z?yPLOu4K%2=FFeoQkY+G|MbPpGxGsnTRWwWeF`;g^rGgL(ShbA0d4e*1@q=L&qwC| z#f!Dk^A`k~M^{gpeC^`E^ci!t(Tis<4lD{xzaKd}T{=&eXHE}Hr>^~7KRB+H=jTH# z=n|y6>Ib^Y(At8*M+vE)qPsP%0U-tBEa-+tIOcD&$_zgFhtIW?LF9ZDTR{2ukZ$a6HKg4mrscDm}_Vw(K#kE@HCy|~8%vDzT1oHO*emC%N zemy8}2C_d{?XMv{inc#l>w66O2P-vgk5#@J@T>42B(AmKZ$SAc*J~Qzuo2%?fd2u? z08wSse+TQEV3ogxauovqiRef8Hk6x&gPxc(%RJ?dBmW%>ehyL(U@6;de-7!7F-DVB z9*q>>+Hecs!)UvsTGJL-?K6S@anK)2mi>9`(wh$l2hkwDr%`_;`Yf{AC!)O@%4PE> z8+d>H4NW^_wQokcBumpiwaULi`^%-8cEl=w59LoF{7(W8@!y8>@nXCsx7x2j`SF|J z6Rq+%jQyNn(>7S;3iMlkKAx;u{Y%k)36$<{Ry!ZqKjYK1f3(V@0QVf|`<_*%oL*R? zX}`7l^CP?V8#V1ltNantriq%y|6IZO{SfW1-=Jx$t^T~DcnQqIk+3Vef@?4Z3u-YA1&*PA{TdeZiD31kme`A&TF8yZE z=T57<8|9xD;E>HK$C2{?%>0K{rkt+>3`ip9a}nk<3H-77odf(gK}h&n9p}qK_bOe} z7DH%Q4xs%P<25Z8I9UEylpp(t0r{Vb@+M4{ACa(~rw6Z((X=wF{5_0o|IqHi9HxF) z&IFwO!!qrF{loIlfY1Js{m+2cW(1}$n6YT-!oZlti)M_OGe6Kgt9jAr8QN{Ln`g|u zBRIct&b;P3n*)J4^JgvA<}GZRGk;E?X1ZEemF_$BdTd>5J^Hc5~ID=4RFf=P#Z!Yku?0ru*m2Z(2O(Az3+N z0em}Z0&+xjpNY{~wy`wLSg>#@3p3|D&@^@?b9T+V1v9OhMT=+47NqwRBCuf4XsnvG zXu*T_jP7Vo&G@0_MGGX(mg(~rGSj?d#%!jGFqN~AfEd<@Epo)>d5fFnOq-W13}8C! zIA{I?R&G)A%;1dXra6n7#?Do!B~a6MrY{a?i<{(NsvB!q9_XubO^aJFYcx#1U(zQX zV^fQorW|AJ+$PKhzsG`NI$NS(5UpR>PCYibH2Gjq;$1JJYQ%$ltb48}Q7&m}hpfG!~Y zDGiv4ax%K8Va^3yEC2s8d*`_oqXJW|3r z5MZ+YYNRZ`4I9exQrJPJ$E@@c*iPppP5Tj2*1rMY!t_`0NlbUZH!}6XhdU9JOh(G` z!z=^u>I+rc4Ijb!sk%!4f|TtgFmg;oR(b;IQ23`ibC4o#n0AqB{~lrj_Wuki;af(i zbSKiG9!(pGS0qC*x2u_6i}9Jlk3ET$@HL3(*#GlS5T4jt6%<79;4K%SJv32T@Tk(JUSbOk?X_&u7>jKp*^Stf58(^=7~cC5 z9(@I$AkHK^5JAv^-S20=PG*z7IPSnOj2h@NpaupD#1GB81vX(18t^{O^L$h88}cW9 z7OTt*mLiVKr!bX^BsM!%w|$-!Cmpk?L?rF8<2u)#GwXEiyG1OPEwkwh8O}|NyYBRs ze$xW5RQRmG3X;_-jFI?Kf)yt!v~Grzwp1c`088FWl`7#QV_dHaJr_#oss9GLE3Jl( z(mf9}C#Y+FiAXtqQGM+*aPAO|-GAhEFhl*$a8XgeQNhZM=Q>77oa>c|Mm{@5&9l)F z|%M`gQoq*(dz@&mvu&gmm?Z zr1`CuU23om*GTtq(Q}S)ZzIyTqec1zk%~10N+dzLepI$h1ACc7(ISql0D5cTdG5>$ Wm0Nl}pS^zQXGLr_8vf!92Jj6aeq)*d literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o new file mode 100644 index 0000000000000000000000000000000000000000..959a32364872ebadda20ad5979fd814bba5af0e0 GIT binary patch literal 3048 zcma);e{d5;6vuZ-+NL#DRMc|Mh#Y5I&@-zzG{W$b=4DF+F!i$FHg&5NZDkJPuEoR!uZ zL8n;O+xXu~_wi@tjkMtc74-9t2N#=Fz_wZLyFtQyPaTY%qec23FQ z<3m8-aB$oHY`PWbpPk+JYc{NsHbr(ZgHE?a? zOyL`T6eER6;=P5oS5AqvMt=&u_lwO1>KgRFX!RC>NuAJe0-cO=5 zQi%8RiHaM6XsrI_JW*+QIzG;`bxW+L^YG5?B$lAU%0cE<$o$pl4~vMB;KKSt793=8 z`=Sp|WpXXR?f&SKota!#iO9NVt!Z4ST(P!dXRh6LIFoD#@+RBSuQJItAm?21kUo>l z*05&etMPO)yc3wcw!b{{?ZHg4nN`03#j7&O4j}uMzOf5WXtjX3I19N((TRM6MQ(sbA*r=EL%q@>gbVd7Xw$u#bPl ziaL@%!ha@jwAH-uU9*~~4(#i+yyhIA_i>^+ z{ai&_ULSrLD^FA>0+oav3jg_!?|bk!*nD~#DUxbA(%_OB7UL0ojDT6@!A;8tb~UCQ zG{%fWPvk68uH@EZO5E&_5)5qp9NbM9Q1*96o!e1Gr)1B zfGC`ENIM0UToxmf6SMw`$CX@m9}c=t->-&F8HK~hKq@kykOaNtHkh_k9dR4z0UZ(a zL~s&!BS0oj$K%IMg@Oxy+@9m6X-x+B$y0>HIWHv6c_DGm3yE`H(^Q1SIWK7E{J<`w zmN{C|)*BFeE$yA&z#7XvzMf!5SHLp6(mspt)grSkR?)jASanOitG=$ezIC>}>W+?p zx3kP*ZSw|wt1U3x!o+YB%BM zl`LI0hBYYhznaWv;})_`vZcmd5B`+YO|a_=5IO*s)qtT{zJ+kjhAWi=bkXfF;Z>}Y zY$;yKPucYQdNdh#LV&{60Shrj%P2LH@zX~$KV6aesZ~lmqeE;}FEkyjZc);m1NIW& zxxtp_A#^6`UjdfI29y4^U{j6dc|*zp%lu_oK57@eUF|)6-C|X+r@hL*dQN3KS{UdM zZ(2PE!L_6twxtiXHn^JR*ST7o1fjX!)9R_4@2YP_exJX+yAOGKyn)~yT|IvGfWTf7 h776-9&|>u|fZE;%R&PY82IkKE0kHau5qc+S{{h)9_|X6W literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o new file mode 100644 index 0000000000000000000000000000000000000000..059354c1ee9283569a9d2ff91a82e1d05875850f GIT binary patch literal 1348 zcma)5y>HV%6n|+7{h)$?I>6?kLajs`s#GjYX-O(1m!i5YWvO*>-496Y%D$jRLeLHo zlq^UrOsq&Oz=l{TVq)VDU;v4Mm8AoVc|YflxKV|8(%pN%k9$7f*$>NBC6mcyNkxXT zl+l3meFdfxZk&c`fNm}S1iHQV5zF4&aU8d=jpf>MY@~Jg0ZU>JNt?V73Tl+Cj)cP#@;_vNU)bY2YI{N%eN86)1Ema%7Y#44$ z_#4JOFO0SV-zb_>`N>A26pe8yHlo5p*(#UpvQwNYtZ(_EHerlcMdYm+Y`3iCIjor= zGDELsN^eJ!=?3+>=W|hwA~O9zdgknnrFL5%9pDPf%ydaeCH+cYE;59!#zjfg3irWg!aPLfxwe zVbgSJrYUUOa%@kQYPG->G6*AbX07?@lI6@-Dt39%Su9OkWrykl4rjgLyOMuGS`R(1 zi$bqQR-NY(S}oR(tMJlfy(Shqt4Vd~d;`O$i7xVc3=I%nQF&J770%FC6~4nc%LlWg W_y>xA0{#pU&KLd{ihl+EEYTmBlE~`- literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o new file mode 100644 index 0000000000000000000000000000000000000000..e9b3a8487446a04aa96463195f43e19a94c0fa5e GIT binary patch literal 1280 zcmcgry>HV%6n}0E4dtU1La1yWGNeNsP*N5KNQqNba)?A4mJXKf9Ie&l9Qn?Oupm@{ zs2GqKSoj0@8;}?(6^Z^S9T;Fo3hz00;6|-r;z`f%{XXvO`|xweZ5f7902Kxlz|a8e zYX#~VSB3?chwk3D;xXZ^7l$li2H*Ts~q@( z^)0l!?xQx1Spl#UHn1goD!~rp;gE4`0wKWWv1Io8gI+~QKimad>=j! zv4mN})N8;NmQnafjSBrjGI4|>tO2IhUt#|?hb`=N&^o&sU?qHe28$W|ZU#dr{Wwg$F;3XVcqkthtT{Be|0>zwZsn<3;F(R>IhH$Vsu!@IQ#h;Kt$Z uY5D+p=<&1UlxGIGgx|e@m(Id!UIu6=+$M}7SNIv>D*zu9rZYDe0e%5b2im;= literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o new file mode 100644 index 0000000000000000000000000000000000000000..3e82b896a61b8d47aa26869daa4aa576f43a9604 GIT binary patch literal 1924 zcma)6PiP!f82_d_tx2<5jem$(WDXBWsGZH4MTEvf((H!fw9#zR3aKuW*=G#hoe48< ztE&OgX^>$NF9o4qJQPImB6yRALYjnv=*d&BJp^pPUP{5r`h9QSTPN#5AH4m2zwh7s zzVFT3Ps&ckFpM0iWk3!LO%NX)N=Zq=C=9^>ELJa^kMAAdBh}KUTNJx%G7DkvQMcPo zb~YZ|h*3Cp?@1LJTFfO1#bnl66ce{qwy8i~C85rAJS)-*Y{(7vDPmZf)tEt+bbXwwF$Wjds=< z>j-9j5z`TAp_$X}#}B)S(R%4$=H!?3u+(AmYn*~OReZ3qFHUrfq@jv5S=Mj!8hH&F zyJOp%Uy=ALx|*u$KjK^YOrZycjs=cmp(QN%HJMuu=btj;9TU}goJ%?zHHqR)-F!8^ zH*%o!8D@1H#&!&dZ<>jNagM&GJbe|iIf@@y+5#xl`Q<_@bp3kJOo@_Vak=G-mgO~E zf5p1Y!)P_|tqHqyve=TA32RiiD^X#-?3Aaf<=RB4@ZPHLHpZ;cWjEq=3*8;({8@?_ z1F%Ehum%56fb9j%CihWTjv}!AKyZ8Z+~UbdxZWkOqxT~b3U?VLjqRr7byv8UCm{;zcyy{P*m%A4N85%n%eB`1zZK7*uC>n;X-gEHyJMt%dhPb*Fjht^~!7jd2M z8I;NYzx>Xi59NOaH!aHdd@9Ocve6z=I4-pSi|99}WCHC+u_Wtty{|rP!<*^VM!w|t zwhltney32*ruY#XTtnkg)YGPZpTs?ZTlb10Fr42F64cW9G}oBbn{dDTu`)c4Xux6k z9FgR_;t0KU@ZXNk&sIQO-$oje!+hD5>wOj4{us=l_%rVBa1S3cU?eq3-7r>k4S5TT zULZU2?-6e!e_e48Q7@XyTbdve5Bm74ecbBfSNr(IKK@xB|FVyRC)~gb+iRi_gyi(P4lW5Y49mXkLUL5TcR#HSw{1OZWu94}>`AO@((5DSjVu5I^LNT1=KoFU|5W^MA!UIM literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o new file mode 100644 index 0000000000000000000000000000000000000000..e46466d71c36f974e308442038c8b2f81ad35c0f GIT binary patch literal 4128 zcmdT{ZERat89q)-=VcMjwouZN4X?UvG3(M~jUb_6IGLTa#ce~Kv_MMT8|OB&aGYRY zX9-GaifeVZ>17{c+K<6B!Ov+Df6y8b!&5^%2?TV2%9o%B2~x&bHf>W{NX_#cpBp=F zB@q8OlKs5TdEfJ%_q^}#@^dg+Mc{3W53(beCXz367K?T!KUiW(n>23z0(u%M^!CU0^8lrq+;sc@B~* z(`)xlT5fImUzp48J60A4%3`1_wv|O+S!{4btE1$pJ)d24A056h6ghk-`}gJzlP9#m z{H)e(&1y~7_L8}^)OG#*2}E%6^YepRhrR#Zu8XMy^Fb{L%TA=A%?fJumZ`a|Zmkg1 zJT-`Yc_+Sd`OJM*LaVof@P@=GJv73)YQ4SurnK?yUa?lPi_J%)!(VV>vMyOat&FQZ zpDTJ#zXbcULCl%ZIymo=OV~rj$9i1du1uTVQ?qa#QTngCE@H(NN`qkBMNT%THOU-e zP!j@g^Iv^^5CJ#(uTf?977<;8{iPZ%0yf=Ny@no-9D_ylV%<%gFgvR?)TC~=Lu>xk zxraoic4?EVZ+GS$)U45Z)w;Ok_6Yx)>qkhRMES58kd`w!eWdC$Md$lI>DP+472~fc=lzhDc zb0}KM3Ugnjp)|YlEUXs30{_`nm-mbfhE>#aHFkf4tf1OLx%|QtGK@HEuG~uJ{R8&l zHl)*MhcSN`!v+yLtG+%4_0USgSV_D8n0+_^t7eR7x%mih&Sw2g1i;|otup9bo*uu3 zKr(T=f0D7HN$-nwYBQ(7`9k<^tWU@Ru6H@W>O{%i8~4M)<7)a24ab6) z0T0X(d0-+q!i|+%Y2MU)aI_tJRzq@GHXcBye3;V1YsPwOd2+2-%;l%I!ny_4yeAkC zk1w>F0NKSxbx*)+quu*ndog>h&fC8_*Co79=l7n~U7r}$n!HahdKSNrO(42{k*=GY z-GXyD?8?0D|E=k1e`BtDi^$yBb;4Vn&Q&4ZyE3bgL(&DW_b6=Kyn+5bx+m@=gLum8MhA(Zw6ZnbhDZoIJn?=p3> zcPCi!?l^^T-W~7b&$8go+vEM}InspInS0Ir-0?yPFQuIVtVWd}trX_=RXq8HrZYm^MXgY+`)eNJ1D%r$uXW!Zcd@ z_YXagHucySMQi$zw3#yX5l9Zsj7vVMn>r)=uiE=y#l6TIfsMb1+C5T~U-AlrL>u*! zN%rr4zYxDhCrzoN9p#4=XPVd^sqjVa_-lkr)qk?P4L0=Oh7TM49Vm(Nn>v2BD3qP} zdZ}t&+OQ$T>vNLRZVv_39J^iMyeyseL>*#42Xg>XuA>3SpF++WAc}mw5N8}G;1wd( z>#efiE#4|V3QYk1KZ8#VMooergVALm`3E4sgXBdO2duZMU$%&+G9t$3WW6+`R

j zR*UNUKqL6f;ByD(1G2G?d>ZrLg6H|OI@F)0uUGW6$gSQCr z8^w=;pTMSb#_t8+3hs=52;6DRb6XWZ>nMTL-(SVQQN^=W{LfXqr;6vR__wS0@2mK0 zRs4l2{^KhCw<#Z@dCmA;nru9!7GomkL7)p%xhY$4j zgrf)g`XZsh=wMH8I20A*lhIhh&{G0d1DTOTJQhkyf7E1>>G)XE7>$m^lhJhi%Z9Yl zM+tqIWX!}RCdQ5Nv|);a`}?E)M$$;>rqP?2z}*8yY;uNv;s}VCGW5|6PT6TpPnzQs zqZHGb5yE&Tp*kS3Lm!oDb7JFQhMbB|VZxvxW8RZY#FH|}q2xd*%#8-(;Tb&=2}k$o z354h{CW%X;=8%z!AD<~ZD)%`S5u}8&%2R}C5l2y%y3ImN0o_}LIHi!!6!|j>zoqa+ zh36IK75)xLKm1$d-X=sE`cL}jV#HCq>Gt2Rt72ZqSCd4Nd9ws8b3F1BY z)kuW>b3n#7f;)gX1$5(b_$CqYf0u|i;tz_i65)prjr&d^>J{DxXREEuQ3Uo@Z-sni*;EoBhFztTW7cxYBE|hH0xcYviPXppgW{ zPE{tPt_wrDGwHrm+A2+&Chgn$kq>Rfq`a8K84=Lb;!jXXyKkYH8i<8p^C0`3^ZXJM zoOw?=@4oxq@7#0G@7#OOefO;{Ll;6gl%G9$~CCWuec}m%)EV?$Y0 zIny+8_Gv~<`QJnNa8VGHRpuF`!Znd*2CEqJHlYe;)z^4`?6^#)0&1cz~C_Exbqo8EEK55-8vQ z@WSdkJZ_I*gg^|4cYYdb?RCRpc>#qGfKiAF39v$_Ze%QHpg^t1ARdU16~c9cWcdUI zYP}PZg0!Sh|`Rdd>p2)pERq(^mY<%j{+3`EFKlk+ClB2V6_idoDvYc@JI*jQ#ZyfB+$*P`g2 z!QD%t+ir5NIytvL$w>lc5}*)lKvY&sK+RQ;6=HA8kVz})r#!bD6QnOAmoO)j!_w}Yp&4R`7nsHxmnyjz8@9$vv z`nXSn^)y&XW16HfO{S2MI>pBr7|XOAzH1GPs;kRjhBzlyD8^A{Ccb${(AdK$!W6-1 z!-!KMK1hs5UQ%4flFSRYHNYuK7z)8s%Y5*5%R;^f?e}02>A}qC!OSQ~yb+&?EAp;s zVzuA%>G^N|PTt3QJ?Re?TMAIDAoHt{Qp{}R)TXamxA|LDFv_>5``G7loB_@lAW?x zse~z5^am>~4}+IjiL3-5F^I}a39%@?w25FPjBtyHtHFn?L{@x|PKbw%XIK6E0GmqE)GetQUL6&SXuD=URHX72(l7_Bq0e_@--%ctPpb)FE1;# zHztCt5OXRdz)GRUM35C?j^gEGrEp^+$O@oHzKXk#MC3Nc6V3b9hGF%e{in4@@w zS*f!z5oCp!qj*JGDc+a}vO>&Jyke}BY)k}MA?7Gv8}q5bh#)J(9K|cnmej^XkQHK% z;$_dLhEs#A5OWkSdp>QN8tbV7t0$#@O478>shlnnyv^YK+u7~c%)X1(+E3|%)_yOR zDoW6u5Dza|UQQRY*5o_CmsNO4Tt;rLpI>T{1;OQdekpUpp!PTCm-U44{w}t_t0;Dx zTjUqyerwS^7h!lcVbG#WEmIy=Ap!Ov#EWjN%e?4X4pZi${Of`E7#?Pac^~|^yK`ur zS|)B%kamVgYjY!ahVzT%Dz!{mfHHlE;jxX}_@t}UGG$$gLYU#5w9VPd)vfZ&7Oqmu z#0v3mZ@_3Pu!XCXxri0oJ=lA$^~j#y!I7o?7P*TbFUw(SpSYnY#MuLt90qgtCXeG= zn@;2{YoA!s3K*ry`RR=f&1sG`U=0BrmhQ6vYGCG;H~` z-cbWh&~&3EgcdGU-XQfd9^L4EiIo!+dng;Vq(G6T94#ZA+VXtCK^pjD^vfx1vsSf> zq9p&#KbqelQUIsLgY3|c6J93Z*53TBgMc$pmdXL5EnDkF?9$ zHBmm&Iy}igr&QG5bfIMUi@mRm=*jd8pt>2yPd+6-PS+)#ISoJDdf{LiDvh&^3CH9_KY5wFq)K);`nvnN!uNlbgM=D zVAH=mp9B<}>Dvc3fj0(5v&Tk;1CfsCbJ`exi3CEq%+c)bpLQ8t`wn&WMxwiq92?FY-x&z?WwHaW z2LLyWmtG{Dor=;iI&i!rH}Gao>F6IB8X6eJLti$lbPSK=209LOAAT;I%k=+3>BtUd zbECOTAD-;;w10PYFw@bmyfAz$cW5x9Kn|b4 zupCf&4;Tmc?=yN2>iVIsbZ>g!exs{b85$VsKXFn?k7kCmM@B}6NI|DbLSM22IoNs; a@)QQcZ&5nkiqefvQ2kw$&aZ;IYWZIZsq1n8 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o new file mode 100644 index 0000000000000000000000000000000000000000..8bb765ac05e4be2ef2cc660f8aa5388fdd6fe06b GIT binary patch literal 3352 zcma)8eQZpEQk4pg5UdK zQQW&?#43&GpoLD)^a5)ZjERRcGc&OqJ`qj%Sk8rcFpQMM^lw`GnEuUG(aEPHV=S3) zL*3C8`EpFsN4tDX(uZ|3l2Ofp8u0+LfFCX%iTpt9ie9$8RA0L-6Ji~^Iy*>JFHpKP z%#N-LQ9xS{e}ToZI>9n#&6R{P>%uajhFF`%`iZ5Xb@`C}LYbyrDgHU;|DlUnj<1eR z1@Ub8q&`Cut6sW!)iNriW=R?8kf!KbL6Y)FY0vQG$bf_Q`Y zhz%?Uq~jC%Vs#!k*mX@0`Ei2OH6JhFr;#NOhP>=^C0@iv2y%jWv-k+1I@zFUge8^` z_zg#|X&O2koIQLu)sY|N6M*(GmC{m3XLgYoXE&5ygE-EH#H)^*;#HW_s_nWtFfHX# zm5fFJu1i;T)~4y@|8`!ybY5^;oUGR|Z5l`B3v@8%ahfxexuRW0%;93)Q7q6No$^_a zmg7#u6}bgF+>e6P0F!Xm6E^5dP!FgN)C*b$O2@qtHzDpZ6w`>9h0jbe`LGXjl=^^M z%F72W(Uc)_hvf^}1t?x&ebLKxvu;bv?7I>^_E=7Aot{_Ny7YZ}tkrd_l4lFzWjU_b zVmZ;&icr-t|6K03KHNRUlvN|M2)LHC=RyNfb7<^0bgjoMN32(v<%lnuN?+<*r)Fk4 zx~v^{G5Gi@-!BM!?}bvRiWTI*$XriOh!?Q$L}84KX7Bupg6x%Fk^97rUuDFFZ&0Q5^C_jDPbvL;O6liQN`8WuKR;LZ(d(0YHg5PvXG>gsuWzaDoO)pE2lwXPj#s?(?u`u% z{W*=r#rYlPUoS0nJneqi;#!+GzqGn0Yz|&D@809S(tWVQ6*}=w;)9>9*;)8rdu&bj zsSVBQ;>3yTLeASaJDy!|zx}7XbHAjVUTkcBuE_tL%BAOjch37Oi*3aVXK$^m>i<#g zy*78#=ZC&8w>6yEo4>d3uyKxhbZX|(@z0vqpPo21d1-9#%W-bg_DHK7u{SgaS{vJ3W&UvC@m$uw;PfG3;GFPb)T&BAe&86Az09qp1e z=p<)<^sddC3u?`dXg)gG|1Z1eVMFuHL8qq8M~Y0##z*Ir)Sis~8YZvG@I+{g`r-@) z(b_Y!7X?jrYLw)0Y-C7w8;HrYtlifkXJexwCjzl!&-3{EgT6f9Sn!u&WrgofzAXi`EuUfszUtc9j)#Wwy zHLF(p%j>z8U`s>$KCUJdXbtad3$<|1?+a8{`|H;Rnw#4iu!%FW6bc42^GS4g$uS(1 w5yp0Ovz6n10;)$~2C6yaJW%}tj{66w2^%9HxzW!@{XuDbAIS?ju0KQn1=EuV0{{R3 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/aes.c b/project1/cyassl-3.0.0/ctaocrypt/src/aes.c new file mode 100644 index 00000000..869203c4 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/aes.c @@ -0,0 +1,3496 @@ +/* aes.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_AES + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif +#ifdef DEBUG_AESNI + #include +#endif + + +#ifdef _MSC_VER + /* 4127 warning constant while(1) */ + #pragma warning(disable: 4127) +#endif + + + +#ifdef HAVE_CAVIUM + static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length, + const byte* iv); + static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in, + word32 length); + static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in, + word32 length); +#endif + +#if defined(CYASSL_PIC32MZ_CRYPT) + +#include "../../cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h" +#define DEBUG_CYASSL + + /* core hardware crypt engine driver */ + static void AesCrypt(Aes *aes, byte* out, const byte* in, word32 sz, + int dir, int algo, int cryptoalgo) + { + securityAssociation *sa_p ; + bufferDescriptor *bd_p ; + + volatile securityAssociation sa __attribute__((aligned (8))); + volatile bufferDescriptor bd __attribute__((aligned (8))); + volatile int k ; + + /* get uncached address */ + sa_p = KVA0_TO_KVA1(&sa) ; + bd_p = KVA0_TO_KVA1(&bd) ; + + /* Sync cache and physical memory */ + if(PIC32MZ_IF_RAM(in)) { + XMEMCPY((void *)KVA0_TO_KVA1(in), (void *)in, sz); + } + XMEMSET((void *)KVA0_TO_KVA1(out), 0, sz); + /* Set up the Security Association */ + XMEMSET((byte *)KVA0_TO_KVA1(&sa), 0, sizeof(sa)); + sa_p->SA_CTRL.ALGO = algo ; /* AES */ + sa_p->SA_CTRL.LNC = 1; + sa_p->SA_CTRL.LOADIV = 1; + sa_p->SA_CTRL.FB = 1; + sa_p->SA_CTRL.ENCTYPE = dir ; /* Encryption/Decryption */ + sa_p->SA_CTRL.CRYPTOALGO = cryptoalgo; + + if(cryptoalgo == PIC32_CRYPTOALGO_AES_GCM){ + switch(aes->keylen) { + case 32: + sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_256 ; + break ; + case 24: + sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_192 ; + break ; + case 16: + sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_128 ; + break ; + } + } else + sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_128 ; + + ByteReverseWords( + (word32 *)KVA0_TO_KVA1(sa.SA_ENCKEY + 8 - aes->keylen/sizeof(word32)), + (word32 *)aes->key_ce, aes->keylen); + ByteReverseWords( + (word32*)KVA0_TO_KVA1(sa.SA_ENCIV), (word32 *)aes->iv_ce, 16); + + XMEMSET((byte *)KVA0_TO_KVA1(&bd), 0, sizeof(bd)); + /* Set up the Buffer Descriptor */ + bd_p->BD_CTRL.BUFLEN = sz; + if(cryptoalgo == PIC32_CRYPTOALGO_AES_GCM) { + if(sz % 0x10) + bd_p->BD_CTRL.BUFLEN = (sz/0x10 + 1) * 0x10 ; + } + bd_p->BD_CTRL.LIFM = 1; + bd_p->BD_CTRL.SA_FETCH_EN = 1; + bd_p->BD_CTRL.LAST_BD = 1; + bd_p->BD_CTRL.DESC_EN = 1; + + bd_p->SA_ADDR = (unsigned int)KVA_TO_PA(&sa) ; + bd_p->SRCADDR = (unsigned int)KVA_TO_PA(in) ; + bd_p->DSTADDR = (unsigned int)KVA_TO_PA(out); + bd_p->MSGLEN = sz ; + + CECON = 1 << 6; + while (CECON); + + /* Run the engine */ + CEBDPADDR = (unsigned int)KVA_TO_PA(&bd) ; + CEINTEN = 0x07; + CECON = 0x27; + + WAIT_ENGINE ; + + if((cryptoalgo == PIC32_CRYPTOALGO_CBC) || + (cryptoalgo == PIC32_CRYPTOALGO_TCBC)|| + (cryptoalgo == PIC32_CRYPTOALGO_RCBC)) { + /* set iv for the next call */ + if(dir == PIC32_ENCRYPTION) { + XMEMCPY((void *)aes->iv_ce, + (void*)KVA0_TO_KVA1(out + sz - AES_BLOCK_SIZE), + AES_BLOCK_SIZE) ; + } else { + ByteReverseWords((word32*)aes->iv_ce, + (word32 *)KVA0_TO_KVA1(in + sz - AES_BLOCK_SIZE), + AES_BLOCK_SIZE); + } + } + XMEMCPY((byte *)out, (byte *)KVA0_TO_KVA1(out), sz) ; + ByteReverseWords((word32*)out, (word32 *)out, sz); + } + + int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + AesCrypt(aes, out, in, sz, PIC32_ENCRYPTION, PIC32_ALGO_AES, + PIC32_CRYPTOALGO_RCBC ); + } + + int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + AesCrypt(aes, out, in, sz, PIC32_DECRYPTION, PIC32_ALGO_AES, + PIC32_CRYPTOALGO_RCBC); + } + + #if defined(CYASSL_AES_COUNTER) + void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + int i ; + char out_block[AES_BLOCK_SIZE] ; + int odd ; + int even ; + char *tmp ; /* (char *)aes->tmp, for short */ + + tmp = (char *)aes->tmp ; + if(aes->left) { + if((aes->left + sz) >= AES_BLOCK_SIZE){ + odd = AES_BLOCK_SIZE - aes->left ; + } else { + odd = sz ; + } + XMEMCPY(tmp+aes->left, in, odd) ; + if((odd+aes->left) == AES_BLOCK_SIZE){ + AesCrypt(aes, out_block, tmp, AES_BLOCK_SIZE, + PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RCTR); + XMEMCPY(out, out_block+aes->left, odd) ; + aes->left = 0 ; + XMEMSET(tmp, 0x0, AES_BLOCK_SIZE) ; + /* Increment IV */ + for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { + if (++((byte *)aes->iv_ce)[i]) + break ; + } + } + in += odd ; + out+= odd ; + sz -= odd ; + } + odd = sz % AES_BLOCK_SIZE ; /* if there is tail flagment */ + if(sz / AES_BLOCK_SIZE) { + even = (sz/AES_BLOCK_SIZE)*AES_BLOCK_SIZE ; + AesCrypt(aes, out, in, even, PIC32_ENCRYPTION, PIC32_ALGO_AES, + PIC32_CRYPTOALGO_RCTR); + out += even ; + in += even ; + do { /* Increment IV */ + for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { + if (++((byte *)aes->iv_ce)[i]) + break ; + } + even -= AES_BLOCK_SIZE ; + } while((int)even > 0) ; + } + if(odd) { + XMEMSET(tmp+aes->left, 0x0, AES_BLOCK_SIZE - aes->left) ; + XMEMCPY(tmp+aes->left, in, odd) ; + AesCrypt(aes, out_block, tmp, AES_BLOCK_SIZE, + PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RCTR); + XMEMCPY(out, out_block+aes->left,odd) ; + aes->left += odd ; + } + } + #endif /* CYASSL_AES_COUNTER */ + + #ifdef HAVE_AESGCM + #define HAVE_AES_ENGINE + /* Hardware AESGCM borows most of the software AESGCM, GMAC */ + #endif + +#endif /* CYASSL_PIC32MZ_CRYPT */ + +#ifdef STM32F2_CRYPTO + /* + * STM32F2 hardware AES support through the STM32F2 standard peripheral + * library. Documentation located in STM32F2xx Standard Peripheral Library + * document (See note in README). + */ + #include "stm32f2xx.h" + #include "stm32f2xx_cryp.h" + + int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, + int dir) + { + word32 *rk = aes->key; + + if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) + return BAD_FUNC_ARG; + + aes->rounds = keylen/4 + 6; + XMEMCPY(rk, userKey, keylen); + ByteReverseWords(rk, rk, keylen); + + return AesSetIV(aes, iv); + } + + int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + word32 *enc_key, *iv; + CRYP_InitTypeDef AES_CRYP_InitStructure; + CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; + CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; + + enc_key = aes->key; + iv = aes->reg; + + /* crypto structure initialization */ + CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); + CRYP_StructInit(&AES_CRYP_InitStructure); + CRYP_IVStructInit(&AES_CRYP_IVInitStructure); + + /* reset registers to their default values */ + CRYP_DeInit(); + + /* load key into correct registers */ + switch(aes->rounds) + { + case 10: /* 128-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[3]; + break; + + case 12: /* 192-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[5]; + break; + + case 14: /* 256-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; + AES_CRYP_KeyInitStructure.CRYP_Key0Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key0Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[5]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[6]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[7]; + break; + + default: + break; + } + CRYP_KeyInit(&AES_CRYP_KeyInitStructure); + + /* set iv */ + ByteReverseWords(iv, iv, AES_BLOCK_SIZE); + AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; + AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; + AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; + AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; + CRYP_IVInit(&AES_CRYP_IVInitStructure); + + /* set direction, mode, and datatype */ + AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; + AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CBC; + AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; + CRYP_Init(&AES_CRYP_InitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + while (sz > 0) + { + /* flush IN/OUT FIFOs */ + CRYP_FIFOFlush(); + + CRYP_DataIn(*(uint32_t*)&in[0]); + CRYP_DataIn(*(uint32_t*)&in[4]); + CRYP_DataIn(*(uint32_t*)&in[8]); + CRYP_DataIn(*(uint32_t*)&in[12]); + + /* wait until the complete message has been processed */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + *(uint32_t*)&out[0] = CRYP_DataOut(); + *(uint32_t*)&out[4] = CRYP_DataOut(); + *(uint32_t*)&out[8] = CRYP_DataOut(); + *(uint32_t*)&out[12] = CRYP_DataOut(); + + /* store iv for next call */ + XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + + sz -= 16; + in += 16; + out += 16; + } + + /* disable crypto processor */ + CRYP_Cmd(DISABLE); + + return 0; + } + + int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + word32 *dec_key, *iv; + CRYP_InitTypeDef AES_CRYP_InitStructure; + CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; + CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; + + dec_key = aes->key; + iv = aes->reg; + + /* crypto structure initialization */ + CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); + CRYP_StructInit(&AES_CRYP_InitStructure); + CRYP_IVStructInit(&AES_CRYP_IVInitStructure); + + /* if input and output same will overwrite input iv */ + XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + + /* reset registers to their default values */ + CRYP_DeInit(); + + /* load key into correct registers */ + switch(aes->rounds) + { + case 10: /* 128-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[3]; + break; + + case 12: /* 192-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = dec_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = dec_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[5]; + break; + + case 14: /* 256-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; + AES_CRYP_KeyInitStructure.CRYP_Key0Left = dec_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key0Right = dec_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = dec_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = dec_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[5]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[6]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[7]; + break; + + default: + break; + } + + /* set direction, mode, and datatype for key preparation */ + AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; + AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_Key; + AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_32b; + CRYP_Init(&AES_CRYP_InitStructure); + CRYP_KeyInit(&AES_CRYP_KeyInitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + /* wait until key has been prepared */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + /* set direction, mode, and datatype for decryption */ + AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; + AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CBC; + AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; + CRYP_Init(&AES_CRYP_InitStructure); + + /* set iv */ + ByteReverseWords(iv, iv, AES_BLOCK_SIZE); + + AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; + AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; + AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; + AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; + CRYP_IVInit(&AES_CRYP_IVInitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + while (sz > 0) + { + /* flush IN/OUT FIFOs */ + CRYP_FIFOFlush(); + + CRYP_DataIn(*(uint32_t*)&in[0]); + CRYP_DataIn(*(uint32_t*)&in[4]); + CRYP_DataIn(*(uint32_t*)&in[8]); + CRYP_DataIn(*(uint32_t*)&in[12]); + + /* wait until the complete message has been processed */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + *(uint32_t*)&out[0] = CRYP_DataOut(); + *(uint32_t*)&out[4] = CRYP_DataOut(); + *(uint32_t*)&out[8] = CRYP_DataOut(); + *(uint32_t*)&out[12] = CRYP_DataOut(); + + /* store iv for next call */ + XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); + + sz -= 16; + in += 16; + out += 16; + } + + /* disable crypto processor */ + CRYP_Cmd(DISABLE); + + return 0; + } + + #ifdef CYASSL_AES_COUNTER + + /* AES-CTR calls this for key setup */ + int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen, + const byte* iv, int dir) + { + return AesSetKey(aes, userKey, keylen, iv, dir); + } + + void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + word32 *enc_key, *iv; + CRYP_InitTypeDef AES_CRYP_InitStructure; + CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; + CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; + + enc_key = aes->key; + iv = aes->reg; + + /* crypto structure initialization */ + CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); + CRYP_StructInit(&AES_CRYP_InitStructure); + CRYP_IVStructInit(&AES_CRYP_IVInitStructure); + + /* reset registers to their default values */ + CRYP_DeInit(); + + /* load key into correct registers */ + switch(aes->rounds) + { + case 10: /* 128-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[3]; + break; + + case 12: /* 192-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[5]; + break; + + case 14: /* 256-bit key */ + AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; + AES_CRYP_KeyInitStructure.CRYP_Key0Left = enc_key[0]; + AES_CRYP_KeyInitStructure.CRYP_Key0Right = enc_key[1]; + AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[2]; + AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[3]; + AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[4]; + AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[5]; + AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[6]; + AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[7]; + break; + + default: + break; + } + CRYP_KeyInit(&AES_CRYP_KeyInitStructure); + + /* set iv */ + ByteReverseWords(iv, iv, AES_BLOCK_SIZE); + AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; + AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; + AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; + AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; + CRYP_IVInit(&AES_CRYP_IVInitStructure); + + /* set direction, mode, and datatype */ + AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; + AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CTR; + AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; + CRYP_Init(&AES_CRYP_InitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + while (sz > 0) + { + /* flush IN/OUT FIFOs */ + CRYP_FIFOFlush(); + + CRYP_DataIn(*(uint32_t*)&in[0]); + CRYP_DataIn(*(uint32_t*)&in[4]); + CRYP_DataIn(*(uint32_t*)&in[8]); + CRYP_DataIn(*(uint32_t*)&in[12]); + + /* wait until the complete message has been processed */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + *(uint32_t*)&out[0] = CRYP_DataOut(); + *(uint32_t*)&out[4] = CRYP_DataOut(); + *(uint32_t*)&out[8] = CRYP_DataOut(); + *(uint32_t*)&out[12] = CRYP_DataOut(); + + /* store iv for next call */ + XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + + sz -= 16; + in += 16; + out += 16; + } + + /* disable crypto processor */ + CRYP_Cmd(DISABLE); + } + + #endif /* CYASSL_AES_COUNTER */ + + +#elif defined(HAVE_COLDFIRE_SEC) + +#include "sec.h" +#include "mcf548x_sec.h" +#include "mcf548x_siu.h" + +#include "memory_pools.h" +extern TX_BYTE_POOL mp_ncached; /* Non Cached memory pool */ +#define AES_BUFFER_SIZE (AES_BLOCK_SIZE * 8) +static unsigned char *AESBuffer = NULL ; + +#define SEC_DESC_AES_CBC_ENCRYPT 0x60300010 +#define SEC_DESC_AES_CBC_DECRYPT 0x60200010 +#define AES_BLOCK_LENGTH 16 + +extern volatile unsigned char __MBAR[]; + +int AesCbcEncrypt(Aes* aes, byte* po, const byte* pi, word32 sz) +{ + return(AesCbcCrypt(aes, po, pi, sz, SEC_DESC_AES_CBC_ENCRYPT)) ; +} + +int AesCbcDecrypt(Aes* aes, byte* po, const byte* pi, word32 sz) +{ + return(AesCbcCrypt(aes, po, pi, sz, SEC_DESC_AES_CBC_DECRYPT)) ; +} + +static int AesCbcCrypt(Aes* aes, byte* po, const byte* pi, word32 sz, word32 descHeader) +{ + + int i ; int stat1, stat2 ; + int ret ; int size ; + static SECdescriptorType descriptor; + volatile int v ; + + if((pi == NULL) || (po == NULL)) + return BAD_FUNC_ARG;/*wrong pointer*/ + + while(sz) { + if((sz%AES_BUFFER_SIZE) == sz) { + size = sz ; + sz = 0 ; + } else { + size = AES_BUFFER_SIZE ; + sz -= AES_BUFFER_SIZE ; + } + + /* Set descriptor for SEC */ + descriptor.header = descHeader ; + /* + descriptor.length1 = 0x0; + descriptor.pointer1 = NULL; + */ + descriptor.length2 = AES_BLOCK_SIZE; + descriptor.pointer2 = (byte *)aes->reg ; /* Initial Vector */ + + switch(aes->rounds) { + case 10: descriptor.length3 = 16 ; break ; + case 12: descriptor.length3 = 24 ; break ; + case 14: descriptor.length3 = 32 ; break ; + } + + descriptor.pointer3 = (byte *)aes->key; + descriptor.length4 = size; + descriptor.pointer4 = (byte *)pi ; + descriptor.length5 = size; + descriptor.pointer5 = AESBuffer ; + /* + descriptor.length6 = 0x0; + descriptor.pointer6 = NULL; + descriptor.length7 = 0x0; + descriptor.pointer7 = NULL; + descriptor.nextDescriptorPtr = NULL; + */ + + /* Initialize SEC and wait for encryption to complete */ + MCF_SEC_CCCR0 = 0x00000000; + + /* Point SEC to the location of the descriptor */ + MCF_SEC_FR0 = (uint32)&descriptor; + + /* poll SISR to determine when channel is complete */ + i=0 ; + while (!(MCF_SEC_SISRL) && !(MCF_SEC_SISRH))i++ ; + for(v=0; v<100; v++) ; + + ret = MCF_SEC_SISRH; + stat1 = MCF_SEC_AESSR ; + stat2 = MCF_SEC_AESISR ; + if(ret & 0xe0000000) + { + db_printf("Aes_Cbc(i=%d):ISRH=%08x, AESSR=%08x, AESISR=%08x\n", i, ret, stat1, stat2) ; + } + + XMEMCPY(po, AESBuffer, size) ; + + if(descHeader == SEC_DESC_AES_CBC_ENCRYPT) { + XMEMCPY((void*)aes->reg, (void*)&(po[size-AES_BLOCK_SIZE]), AES_BLOCK_SIZE) ; + } else { + XMEMCPY((void*)aes->reg, (void*)&(pi[size-AES_BLOCK_SIZE]), AES_BLOCK_SIZE) ; + } + + pi += size ; + po += size ; + } + + return 0 ; /* for descriptier header 0xff000000 mode */ +} + +int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, + int dir) +{ + int status ; + + if(AESBuffer == NULL) { + status = tx_byte_allocate(&mp_ncached,(void *)&AESBuffer, AES_BUFFER_SIZE,TX_NO_WAIT); + } + + if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) + return BAD_FUNC_ARG; + if (aes == NULL) + return BAD_FUNC_ARG; + + aes->rounds = keylen/4 + 6; + + XMEMCPY(aes->key, userKey, keylen); + if (iv) + XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); + return 0; +} + +#elif defined FREESCALE_MMCAU + /* + * Freescale mmCAU hardware AES support through the CAU/mmCAU library. + * Documentation located in ColdFire/ColdFire+ CAU and Kinetis mmCAU + * Software Library User Guide (See note in README). + */ + #include "cau_api.h" + + int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, + int dir) + { + byte *rk = (byte*)aes->key; + + if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) + return BAD_FUNC_ARG; + + if (rk == NULL) + return BAD_FUNC_ARG; + + aes->rounds = keylen/4 + 6; + cau_aes_set_key(userKey, keylen*8, rk); + + return AesSetIV(aes, iv); + } + + int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + + byte *iv, *enc_key; + byte temp_block[AES_BLOCK_SIZE]; + + iv = (byte*)aes->reg; + enc_key = (byte*)aes->key; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, AES_BLOCK_SIZE); + + /* XOR block with IV for CBC */ + for (i = 0; i < AES_BLOCK_SIZE; i++) + temp_block[i] ^= iv[i]; + + cau_aes_encrypt(temp_block, enc_key, aes->rounds, out + offset); + + len -= AES_BLOCK_SIZE; + offset += AES_BLOCK_SIZE; + + /* store IV for next block */ + XMEMCPY(iv, out + offset - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + } + + return 0; + } + + int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + + byte* iv, *dec_key; + byte temp_block[AES_BLOCK_SIZE]; + + iv = (byte*)aes->reg; + dec_key = (byte*)aes->key; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, AES_BLOCK_SIZE); + + cau_aes_decrypt(in + offset, dec_key, aes->rounds, out + offset); + + /* XOR block with IV for CBC */ + for (i = 0; i < AES_BLOCK_SIZE; i++) + (out + offset)[i] ^= iv[i]; + + /* store IV for next block */ + XMEMCPY(iv, temp_block, AES_BLOCK_SIZE); + + len -= AES_BLOCK_SIZE; + offset += AES_BLOCK_SIZE; + } + + return 0; + } + + +#else /* CTaoCrypt software implementation */ + +static const word32 rcon[] = { + 0x01000000, 0x02000000, 0x04000000, 0x08000000, + 0x10000000, 0x20000000, 0x40000000, 0x80000000, + 0x1B000000, 0x36000000, + /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ +}; + + +static const word32 Te[5][256] = { +{ + 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, + 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, + 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, + 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, + 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, + 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, + 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, + 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, + 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, + 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, + 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, + 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, + 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, + 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, + 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, + 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, + 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, + 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, + 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, + 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, + 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, + 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, + 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, + 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, + 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, + 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, + 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, + 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, + 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, + 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, + 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, + 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, + 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, + 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, + 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, + 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, + 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, + 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, + 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, + 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, + 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, + 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, + 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, + 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, + 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, + 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, + 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, + 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, + 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, + 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, + 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, + 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, + 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, + 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, + 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, + 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, + 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, + 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, + 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, + 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, + 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, + 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, + 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, + 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, +}, +{ + 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, + 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, + 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, + 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, + 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, + 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, + 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, + 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, + 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, + 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, + 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, + 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, + 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, + 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, + 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, + 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, + 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, + 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, + 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, + 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, + 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, + 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, + 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, + 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, + 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, + 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, + 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, + 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, + 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, + 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, + 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, + 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, + 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, + 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, + 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, + 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, + 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, + 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, + 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, + 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, + 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, + 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, + 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, + 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, + 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, + 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, + 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, + 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, + 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, + 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, + 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, + 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, + 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, + 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, + 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, + 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, + 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, + 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, + 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, + 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, + 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, + 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, + 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, + 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, +}, +{ + 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, + 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, + 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, + 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, + 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, + 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, + 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, + 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, + 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, + 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, + 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, + 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, + 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, + 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, + 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, + 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, + 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, + 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, + 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, + 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, + 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, + 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, + 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, + 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, + 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, + 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, + 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, + 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, + 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, + 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, + 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, + 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, + 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, + 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, + 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, + 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, + 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, + 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, + 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, + 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, + 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, + 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, + 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, + 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, + 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, + 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, + 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, + 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, + 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, + 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, + 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, + 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, + 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, + 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, + 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, + 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, + 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, + 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, + 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, + 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, + 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, + 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, + 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, + 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, +}, +{ + 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, + 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, + 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, + 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, + 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, + 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, + 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, + 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, + 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, + 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, + 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, + 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, + 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, + 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, + 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, + 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, + 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, + 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, + 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, + 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, + 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, + 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, + 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, + 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, + 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, + 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, + 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, + 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, + 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, + 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, + 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, + 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, + 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, + 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, + 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, + 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, + 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, + 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, + 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, + 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, + 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, + 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, + 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, + 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, + 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, + 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, + 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, + 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, + 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, + 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, + 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, + 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, + 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, + 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, + 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, + 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, + 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, + 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, + 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, + 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, + 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, + 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, + 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, + 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, +}, +{ + 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, + 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, + 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, + 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, + 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, + 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, + 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, + 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, + 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, + 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, + 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, + 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, + 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, + 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, + 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, + 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, + 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, + 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, + 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, + 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, + 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, + 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, + 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, + 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, + 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, + 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, + 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, + 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, + 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, + 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, + 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, + 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, + 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, + 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, + 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, + 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, + 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, + 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, + 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, + 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, + 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, + 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, + 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, + 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, + 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, + 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, + 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, + 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, + 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, + 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, + 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, + 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, + 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, + 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, + 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, + 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, + 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, + 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, + 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, + 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, + 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, + 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, + 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, + 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, +} +}; + + +static const word32 Td[5][256] = { +{ + 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, + 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, + 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, + 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, + 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, + 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, + 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, + 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, + 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, + 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, + 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, + 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, + 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, + 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, + 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, + 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, + 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, + 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, + 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, + 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, + 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, + 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, + 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, + 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, + 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, + 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, + 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, + 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, + 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, + 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, + 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, + 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, + 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, + 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, + 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, + 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, + 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, + 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, + 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, + 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, + 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, + 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, + 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, + 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, + 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, + 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, + 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, + 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, + 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, + 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, + 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, + 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, + 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, + 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, + 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, + 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, + 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, + 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, + 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, + 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, + 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, + 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, + 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, + 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, +}, +{ + 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, + 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, + 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, + 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, + 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, + 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, + 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, + 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, + 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, + 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, + 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, + 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, + 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, + 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, + 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, + 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, + 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, + 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, + 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, + 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, + 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, + 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, + 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, + 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, + 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, + 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, + 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, + 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, + 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, + 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, + 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, + 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, + 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, + 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, + 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, + 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, + 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, + 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, + 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, + 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, + 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, + 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, + 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, + 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, + 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, + 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, + 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, + 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, + 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, + 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, + 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, + 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, + 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, + 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, + 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, + 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, + 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, + 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, + 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, + 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, + 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, + 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, + 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, + 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, +}, +{ + 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, + 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, + 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, + 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, + 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, + 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, + 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, + 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, + 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, + 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, + 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, + 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, + 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, + 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, + 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, + 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, + 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, + 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, + 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, + 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, + + 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, + 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, + 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, + 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, + 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, + 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, + 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, + 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, + 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, + 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, + 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, + 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, + 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, + 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, + 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, + 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, + 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, + 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, + 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, + 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, + 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, + 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, + 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, + 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, + 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, + 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, + 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, + 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, + 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, + 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, + 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, + 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, + 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, + 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, + 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, + 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, + 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, + 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, + 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, + 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, + 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, + 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, + 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, + 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, +}, +{ + 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, + 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, + 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, + 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, + 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, + 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, + 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, + 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, + 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, + 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, + 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, + 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, + 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, + 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, + 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, + 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, + 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, + 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, + 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, + 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, + 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, + 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, + 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, + 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, + 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, + 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, + 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, + 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, + 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, + 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, + 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, + 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, + 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, + 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, + 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, + 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, + 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, + 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, + 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, + 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, + 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, + 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, + 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, + 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, + 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, + 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, + 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, + 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, + 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, + 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, + 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, + 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, + 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, + 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, + 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, + 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, + 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, + 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, + 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, + 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, + 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, + 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, + 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, + 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, +}, +{ + 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, + 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, + 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, + 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, + 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, + 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, + 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, + 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, + 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, + 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, + 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, + 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, + 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, + 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, + 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, + 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, + 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, + 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, + 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, + 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, + 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, + 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, + 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, + 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, + 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, + 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, + 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, + 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, + 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, + 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, + 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, + 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, + 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, + 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, + 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, + 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, + 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, + 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, + 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, + 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, + 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, + 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, + 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, + 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, + 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, + 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, + 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, + 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, + 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, + 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, + 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, + 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, + 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, + 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, + 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, + 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, + 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, + 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, + 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, + 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, + 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, + 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, + 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, + 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, +} +}; + + +#define GETBYTE(x, y) (word32)((byte)((x) >> (8 * (y)))) + + +#ifdef CYASSL_AESNI + +#ifndef _MSC_VER + + #define cpuid(func,ax,bx,cx,dx)\ + __asm__ __volatile__ ("cpuid":\ + "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func)); + +#else + + #define cpuid(func,ax,bx,cx,dx)\ + __asm mov eax, func \ + __asm cpuid \ + __asm mov ax, eax \ + __asm mov bx, ebx \ + __asm mov cx, ecx \ + __asm mov dx, edx + +#endif /* _MSC_VER */ + + +static int Check_CPU_support_AES(void) +{ + unsigned int a,b,c,d; + cpuid(1,a,b,c,d); + + if (c & 0x2000000) + return 1; + + return 0; +} + +static int checkAESNI = 0; +static int haveAESNI = 0; + + +/* tell C compiler these are asm functions in case any mix up of ABI underscore + prefix between clang/gcc/llvm etc */ +void AES_CBC_encrypt(const unsigned char* in, unsigned char* out, + unsigned char* ivec, unsigned long length, + const unsigned char* KS, int nr) + asm ("AES_CBC_encrypt"); + + +void AES_CBC_decrypt(const unsigned char* in, unsigned char* out, + unsigned char* ivec, unsigned long length, + const unsigned char* KS, int nr) + asm ("AES_CBC_decrypt"); + +void AES_ECB_encrypt(const unsigned char* in, unsigned char* out, + unsigned long length, const unsigned char* KS, int nr) + asm ("AES_ECB_encrypt"); + + +void AES_ECB_decrypt(const unsigned char* in, unsigned char* out, + unsigned long length, const unsigned char* KS, int nr) + asm ("AES_ECB_decrypt"); + +void AES_128_Key_Expansion(const unsigned char* userkey, + unsigned char* key_schedule) + asm ("AES_128_Key_Expansion"); + +void AES_192_Key_Expansion(const unsigned char* userkey, + unsigned char* key_schedule) + asm ("AES_192_Key_Expansion"); + +void AES_256_Key_Expansion(const unsigned char* userkey, + unsigned char* key_schedule) + asm ("AES_256_Key_Expansion"); + + +static int AES_set_encrypt_key(const unsigned char *userKey, const int bits, + Aes* aes) +{ + if (!userKey || !aes) + return BAD_FUNC_ARG; + + if (bits == 128) { + AES_128_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 10; + return 0; + } + else if (bits == 192) { + AES_192_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 12; + return 0; + } + else if (bits == 256) { + AES_256_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 14; + return 0; + } + return BAD_FUNC_ARG; +} + + +static int AES_set_decrypt_key(const unsigned char* userKey, const int bits, + Aes* aes) +{ + int nr; + Aes temp_key; + __m128i *Key_Schedule = (__m128i*)aes->key; + __m128i *Temp_Key_Schedule = (__m128i*)temp_key.key; + + if (!userKey || !aes) + return BAD_FUNC_ARG; + + if (AES_set_encrypt_key(userKey,bits,&temp_key) == BAD_FUNC_ARG) + return BAD_FUNC_ARG; + + nr = temp_key.rounds; + aes->rounds = nr; + + Key_Schedule[nr] = Temp_Key_Schedule[0]; + Key_Schedule[nr-1] = _mm_aesimc_si128(Temp_Key_Schedule[1]); + Key_Schedule[nr-2] = _mm_aesimc_si128(Temp_Key_Schedule[2]); + Key_Schedule[nr-3] = _mm_aesimc_si128(Temp_Key_Schedule[3]); + Key_Schedule[nr-4] = _mm_aesimc_si128(Temp_Key_Schedule[4]); + Key_Schedule[nr-5] = _mm_aesimc_si128(Temp_Key_Schedule[5]); + Key_Schedule[nr-6] = _mm_aesimc_si128(Temp_Key_Schedule[6]); + Key_Schedule[nr-7] = _mm_aesimc_si128(Temp_Key_Schedule[7]); + Key_Schedule[nr-8] = _mm_aesimc_si128(Temp_Key_Schedule[8]); + Key_Schedule[nr-9] = _mm_aesimc_si128(Temp_Key_Schedule[9]); + + if(nr>10) { + Key_Schedule[nr-10] = _mm_aesimc_si128(Temp_Key_Schedule[10]); + Key_Schedule[nr-11] = _mm_aesimc_si128(Temp_Key_Schedule[11]); + } + + if(nr>12) { + Key_Schedule[nr-12] = _mm_aesimc_si128(Temp_Key_Schedule[12]); + Key_Schedule[nr-13] = _mm_aesimc_si128(Temp_Key_Schedule[13]); + } + + Key_Schedule[0] = Temp_Key_Schedule[nr]; + + return 0; +} + + + +#endif /* CYASSL_AESNI */ + + +static int AesSetKeyLocal(Aes* aes, const byte* userKey, word32 keylen, + const byte* iv, int dir) +{ + word32 temp, *rk = aes->key; + unsigned int i = 0; + + #ifdef CYASSL_AESNI + aes->use_aesni = 0; + #endif /* CYASSL_AESNI */ + #ifdef CYASSL_AES_COUNTER + aes->left = 0; + #endif /* CYASSL_AES_COUNTER */ + + aes->rounds = keylen/4 + 6; + + XMEMCPY(rk, userKey, keylen); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(rk, rk, keylen); + #endif + +#ifdef CYASSL_PIC32MZ_CRYPT + { + word32 *akey1 = aes->key_ce; + word32 *areg = aes->iv_ce ; + aes->keylen = keylen ; + XMEMCPY(akey1, userKey, keylen); + if (iv) + XMEMCPY(areg, iv, AES_BLOCK_SIZE); + else + XMEMSET(areg, 0, AES_BLOCK_SIZE); + } +#endif + + switch(keylen) + { + case 16: + while (1) + { + temp = rk[3]; + rk[4] = rk[0] ^ + (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ + (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ + (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ + (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ + rcon[i]; + rk[5] = rk[1] ^ rk[4]; + rk[6] = rk[2] ^ rk[5]; + rk[7] = rk[3] ^ rk[6]; + if (++i == 10) + break; + rk += 4; + } + break; + + case 24: + while (1) /* for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack */ + { + temp = rk[ 5]; + rk[ 6] = rk[ 0] ^ + (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ + (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ + (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ + (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ + rcon[i]; + rk[ 7] = rk[ 1] ^ rk[ 6]; + rk[ 8] = rk[ 2] ^ rk[ 7]; + rk[ 9] = rk[ 3] ^ rk[ 8]; + if (++i == 8) + break; + rk[10] = rk[ 4] ^ rk[ 9]; + rk[11] = rk[ 5] ^ rk[10]; + rk += 6; + } + break; + + case 32: + while (1) + { + temp = rk[ 7]; + rk[ 8] = rk[ 0] ^ + (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ + (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ + (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ + (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ + rcon[i]; + rk[ 9] = rk[ 1] ^ rk[ 8]; + rk[10] = rk[ 2] ^ rk[ 9]; + rk[11] = rk[ 3] ^ rk[10]; + if (++i == 7) + break; + temp = rk[11]; + rk[12] = rk[ 4] ^ + (Te[4][GETBYTE(temp, 3)] & 0xff000000) ^ + (Te[4][GETBYTE(temp, 2)] & 0x00ff0000) ^ + (Te[4][GETBYTE(temp, 1)] & 0x0000ff00) ^ + (Te[4][GETBYTE(temp, 0)] & 0x000000ff); + rk[13] = rk[ 5] ^ rk[12]; + rk[14] = rk[ 6] ^ rk[13]; + rk[15] = rk[ 7] ^ rk[14]; + + rk += 8; + } + break; + + default: + return BAD_FUNC_ARG; + } + + if (dir == AES_DECRYPTION) + { + unsigned int j; + rk = aes->key; + + /* invert the order of the round keys: */ + for (i = 0, j = 4* aes->rounds; i < j; i += 4, j -= 4) { + temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; + temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; + temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; + temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; + } + /* apply the inverse MixColumn transform to all round keys but the + first and the last: */ + for (i = 1; i < aes->rounds; i++) { + rk += 4; + rk[0] = + Td[0][Te[4][GETBYTE(rk[0], 3)] & 0xff] ^ + Td[1][Te[4][GETBYTE(rk[0], 2)] & 0xff] ^ + Td[2][Te[4][GETBYTE(rk[0], 1)] & 0xff] ^ + Td[3][Te[4][GETBYTE(rk[0], 0)] & 0xff]; + rk[1] = + Td[0][Te[4][GETBYTE(rk[1], 3)] & 0xff] ^ + Td[1][Te[4][GETBYTE(rk[1], 2)] & 0xff] ^ + Td[2][Te[4][GETBYTE(rk[1], 1)] & 0xff] ^ + Td[3][Te[4][GETBYTE(rk[1], 0)] & 0xff]; + rk[2] = + Td[0][Te[4][GETBYTE(rk[2], 3)] & 0xff] ^ + Td[1][Te[4][GETBYTE(rk[2], 2)] & 0xff] ^ + Td[2][Te[4][GETBYTE(rk[2], 1)] & 0xff] ^ + Td[3][Te[4][GETBYTE(rk[2], 0)] & 0xff]; + rk[3] = + Td[0][Te[4][GETBYTE(rk[3], 3)] & 0xff] ^ + Td[1][Te[4][GETBYTE(rk[3], 2)] & 0xff] ^ + Td[2][Te[4][GETBYTE(rk[3], 1)] & 0xff] ^ + Td[3][Te[4][GETBYTE(rk[3], 0)] & 0xff]; + } + } + + return AesSetIV(aes, iv); +} + + +int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, + int dir) +{ + + if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) + return BAD_FUNC_ARG; + +#ifdef HAVE_CAVIUM + if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) + return AesCaviumSetKey(aes, userKey, keylen, iv); +#endif + +#ifdef CYASSL_AESNI + if (checkAESNI == 0) { + haveAESNI = Check_CPU_support_AES(); + checkAESNI = 1; + } + if (haveAESNI) { + aes->use_aesni = 1; + if (iv) + XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); + if (dir == AES_ENCRYPTION) + return AES_set_encrypt_key(userKey, keylen * 8, aes); + else + return AES_set_decrypt_key(userKey, keylen * 8, aes); + } +#endif /* CYASSL_AESNI */ + + return AesSetKeyLocal(aes, userKey, keylen, iv, dir); +} + + +static void AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock) +{ + word32 s0, s1, s2, s3; + word32 t0, t1, t2, t3; + word32 r = aes->rounds >> 1; + + const word32* rk = aes->key; + if (r > 7 || r == 0) { + CYASSL_MSG("AesEncrypt encountered improper key, set it up"); + return; /* stop instead of segfaulting, set up your keys! */ + } +#ifdef CYASSL_AESNI + if (haveAESNI && aes->use_aesni) { + #ifdef DEBUG_AESNI + printf("about to aes encrypt\n"); + printf("in = %p\n", inBlock); + printf("out = %p\n", outBlock); + printf("aes->key = %p\n", aes->key); + printf("aes->rounds = %d\n", aes->rounds); + printf("sz = %d\n", AES_BLOCK_SIZE); + #endif + + /* check alignment, decrypt doesn't need alignment */ + if ((word)inBlock % 16) { + #ifndef NO_CYASSL_ALLOC_ALIGN + byte* tmp = (byte*)XMALLOC(AES_BLOCK_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + if (tmp == NULL) return; + + XMEMCPY(tmp, inBlock, AES_BLOCK_SIZE); + AES_ECB_encrypt(tmp, tmp, AES_BLOCK_SIZE, (byte*)aes->key, + aes->rounds); + XMEMCPY(outBlock, tmp, AES_BLOCK_SIZE); + XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return; + #else + CYASSL_MSG("AES-ECB encrypt with bad alignment"); + return; + #endif + } + + AES_ECB_encrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key, + aes->rounds); + + return; + } + else { + #ifdef DEBUG_AESNI + printf("Skipping AES-NI\n"); + #endif + } +#endif + + /* + * map byte array block to cipher state + * and add initial round key: + */ + XMEMCPY(&s0, inBlock, sizeof(s0)); + XMEMCPY(&s1, inBlock + sizeof(s0), sizeof(s1)); + XMEMCPY(&s2, inBlock + 2 * sizeof(s0), sizeof(s2)); + XMEMCPY(&s3, inBlock + 3 * sizeof(s0), sizeof(s3)); + + #ifdef LITTLE_ENDIAN_ORDER + s0 = ByteReverseWord32(s0); + s1 = ByteReverseWord32(s1); + s2 = ByteReverseWord32(s2); + s3 = ByteReverseWord32(s3); + #endif + + s0 ^= rk[0]; + s1 ^= rk[1]; + s2 ^= rk[2]; + s3 ^= rk[3]; + + /* + * Nr - 1 full rounds: + */ + + for (;;) { + t0 = + Te[0][GETBYTE(s0, 3)] ^ + Te[1][GETBYTE(s1, 2)] ^ + Te[2][GETBYTE(s2, 1)] ^ + Te[3][GETBYTE(s3, 0)] ^ + rk[4]; + t1 = + Te[0][GETBYTE(s1, 3)] ^ + Te[1][GETBYTE(s2, 2)] ^ + Te[2][GETBYTE(s3, 1)] ^ + Te[3][GETBYTE(s0, 0)] ^ + rk[5]; + t2 = + Te[0][GETBYTE(s2, 3)] ^ + Te[1][GETBYTE(s3, 2)] ^ + Te[2][GETBYTE(s0, 1)] ^ + Te[3][GETBYTE(s1, 0)] ^ + rk[6]; + t3 = + Te[0][GETBYTE(s3, 3)] ^ + Te[1][GETBYTE(s0, 2)] ^ + Te[2][GETBYTE(s1, 1)] ^ + Te[3][GETBYTE(s2, 0)] ^ + rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = + Te[0][GETBYTE(t0, 3)] ^ + Te[1][GETBYTE(t1, 2)] ^ + Te[2][GETBYTE(t2, 1)] ^ + Te[3][GETBYTE(t3, 0)] ^ + rk[0]; + s1 = + Te[0][GETBYTE(t1, 3)] ^ + Te[1][GETBYTE(t2, 2)] ^ + Te[2][GETBYTE(t3, 1)] ^ + Te[3][GETBYTE(t0, 0)] ^ + rk[1]; + s2 = + Te[0][GETBYTE(t2, 3)] ^ + Te[1][GETBYTE(t3, 2)] ^ + Te[2][GETBYTE(t0, 1)] ^ + Te[3][GETBYTE(t1, 0)] ^ + rk[2]; + s3 = + Te[0][GETBYTE(t3, 3)] ^ + Te[1][GETBYTE(t0, 2)] ^ + Te[2][GETBYTE(t1, 1)] ^ + Te[3][GETBYTE(t2, 0)] ^ + rk[3]; + } + + /* + * apply last round and + * map cipher state to byte array block: + */ + + s0 = + (Te[4][GETBYTE(t0, 3)] & 0xff000000) ^ + (Te[4][GETBYTE(t1, 2)] & 0x00ff0000) ^ + (Te[4][GETBYTE(t2, 1)] & 0x0000ff00) ^ + (Te[4][GETBYTE(t3, 0)] & 0x000000ff) ^ + rk[0]; + s1 = + (Te[4][GETBYTE(t1, 3)] & 0xff000000) ^ + (Te[4][GETBYTE(t2, 2)] & 0x00ff0000) ^ + (Te[4][GETBYTE(t3, 1)] & 0x0000ff00) ^ + (Te[4][GETBYTE(t0, 0)] & 0x000000ff) ^ + rk[1]; + s2 = + (Te[4][GETBYTE(t2, 3)] & 0xff000000) ^ + (Te[4][GETBYTE(t3, 2)] & 0x00ff0000) ^ + (Te[4][GETBYTE(t0, 1)] & 0x0000ff00) ^ + (Te[4][GETBYTE(t1, 0)] & 0x000000ff) ^ + rk[2]; + s3 = + (Te[4][GETBYTE(t3, 3)] & 0xff000000) ^ + (Te[4][GETBYTE(t0, 2)] & 0x00ff0000) ^ + (Te[4][GETBYTE(t1, 1)] & 0x0000ff00) ^ + (Te[4][GETBYTE(t2, 0)] & 0x000000ff) ^ + rk[3]; + + /* write out */ + #ifdef LITTLE_ENDIAN_ORDER + s0 = ByteReverseWord32(s0); + s1 = ByteReverseWord32(s1); + s2 = ByteReverseWord32(s2); + s3 = ByteReverseWord32(s3); + #endif + + XMEMCPY(outBlock, &s0, sizeof(s0)); + XMEMCPY(outBlock + sizeof(s0), &s1, sizeof(s1)); + XMEMCPY(outBlock + 2 * sizeof(s0), &s2, sizeof(s2)); + XMEMCPY(outBlock + 3 * sizeof(s0), &s3, sizeof(s3)); +} + + +static void AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock) +{ + word32 s0, s1, s2, s3; + word32 t0, t1, t2, t3; + word32 r = aes->rounds >> 1; + + const word32* rk = aes->key; + if (r > 7 || r == 0) { + CYASSL_MSG("AesDecrypt encountered improper key, set it up"); + return; /* stop instead of segfaulting, set up your keys! */ + } +#ifdef CYASSL_AESNI + if (haveAESNI && aes->use_aesni) { + #ifdef DEBUG_AESNI + printf("about to aes decrypt\n"); + printf("in = %p\n", inBlock); + printf("out = %p\n", outBlock); + printf("aes->key = %p\n", aes->key); + printf("aes->rounds = %d\n", aes->rounds); + printf("sz = %d\n", AES_BLOCK_SIZE); + #endif + + /* if input and output same will overwrite input iv */ + XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE); + AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key, + aes->rounds); + return; + } + else { + #ifdef DEBUG_AESNI + printf("Skipping AES-NI\n"); + #endif + } +#endif + + /* + * map byte array block to cipher state + * and add initial round key: + */ + XMEMCPY(&s0, inBlock, sizeof(s0)); + XMEMCPY(&s1, inBlock + sizeof(s0), sizeof(s1)); + XMEMCPY(&s2, inBlock + 2 * sizeof(s0), sizeof(s2)); + XMEMCPY(&s3, inBlock + 3 * sizeof(s0), sizeof(s3)); + + #ifdef LITTLE_ENDIAN_ORDER + s0 = ByteReverseWord32(s0); + s1 = ByteReverseWord32(s1); + s2 = ByteReverseWord32(s2); + s3 = ByteReverseWord32(s3); + #endif + + s0 ^= rk[0]; + s1 ^= rk[1]; + s2 ^= rk[2]; + s3 ^= rk[3]; + + /* + * Nr - 1 full rounds: + */ + + for (;;) { + t0 = + Td[0][GETBYTE(s0, 3)] ^ + Td[1][GETBYTE(s3, 2)] ^ + Td[2][GETBYTE(s2, 1)] ^ + Td[3][GETBYTE(s1, 0)] ^ + rk[4]; + t1 = + Td[0][GETBYTE(s1, 3)] ^ + Td[1][GETBYTE(s0, 2)] ^ + Td[2][GETBYTE(s3, 1)] ^ + Td[3][GETBYTE(s2, 0)] ^ + rk[5]; + t2 = + Td[0][GETBYTE(s2, 3)] ^ + Td[1][GETBYTE(s1, 2)] ^ + Td[2][GETBYTE(s0, 1)] ^ + Td[3][GETBYTE(s3, 0)] ^ + rk[6]; + t3 = + Td[0][GETBYTE(s3, 3)] ^ + Td[1][GETBYTE(s2, 2)] ^ + Td[2][GETBYTE(s1, 1)] ^ + Td[3][GETBYTE(s0, 0)] ^ + rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = + Td[0][GETBYTE(t0, 3)] ^ + Td[1][GETBYTE(t3, 2)] ^ + Td[2][GETBYTE(t2, 1)] ^ + Td[3][GETBYTE(t1, 0)] ^ + rk[0]; + s1 = + Td[0][GETBYTE(t1, 3)] ^ + Td[1][GETBYTE(t0, 2)] ^ + Td[2][GETBYTE(t3, 1)] ^ + Td[3][GETBYTE(t2, 0)] ^ + rk[1]; + s2 = + Td[0][GETBYTE(t2, 3)] ^ + Td[1][GETBYTE(t1, 2)] ^ + Td[2][GETBYTE(t0, 1)] ^ + Td[3][GETBYTE(t3, 0)] ^ + rk[2]; + s3 = + Td[0][GETBYTE(t3, 3)] ^ + Td[1][GETBYTE(t2, 2)] ^ + Td[2][GETBYTE(t1, 1)] ^ + Td[3][GETBYTE(t0, 0)] ^ + rk[3]; + } + /* + * apply last round and + * map cipher state to byte array block: + */ + s0 = + (Td[4][GETBYTE(t0, 3)] & 0xff000000) ^ + (Td[4][GETBYTE(t3, 2)] & 0x00ff0000) ^ + (Td[4][GETBYTE(t2, 1)] & 0x0000ff00) ^ + (Td[4][GETBYTE(t1, 0)] & 0x000000ff) ^ + rk[0]; + s1 = + (Td[4][GETBYTE(t1, 3)] & 0xff000000) ^ + (Td[4][GETBYTE(t0, 2)] & 0x00ff0000) ^ + (Td[4][GETBYTE(t3, 1)] & 0x0000ff00) ^ + (Td[4][GETBYTE(t2, 0)] & 0x000000ff) ^ + rk[1]; + s2 = + (Td[4][GETBYTE(t2, 3)] & 0xff000000) ^ + (Td[4][GETBYTE(t1, 2)] & 0x00ff0000) ^ + (Td[4][GETBYTE(t0, 1)] & 0x0000ff00) ^ + (Td[4][GETBYTE(t3, 0)] & 0x000000ff) ^ + rk[2]; + s3 = + (Td[4][GETBYTE(t3, 3)] & 0xff000000) ^ + (Td[4][GETBYTE(t2, 2)] & 0x00ff0000) ^ + (Td[4][GETBYTE(t1, 1)] & 0x0000ff00) ^ + (Td[4][GETBYTE(t0, 0)] & 0x000000ff) ^ + rk[3]; + + /* write out */ + #ifdef LITTLE_ENDIAN_ORDER + s0 = ByteReverseWord32(s0); + s1 = ByteReverseWord32(s1); + s2 = ByteReverseWord32(s2); + s3 = ByteReverseWord32(s3); + #endif + + XMEMCPY(outBlock, &s0, sizeof(s0)); + XMEMCPY(outBlock + sizeof(s0), &s1, sizeof(s1)); + XMEMCPY(outBlock + 2 * sizeof(s0), &s2, sizeof(s2)); + XMEMCPY(outBlock + 3 * sizeof(s0), &s3, sizeof(s3)); +} + +#ifndef HAVE_AES_ENGINE +int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / AES_BLOCK_SIZE; + +#ifdef HAVE_CAVIUM + if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) + return AesCaviumCbcEncrypt(aes, out, in, sz); +#endif + +#ifdef CYASSL_AESNI + if (haveAESNI) { + #ifdef DEBUG_AESNI + printf("about to aes cbc encrypt\n"); + printf("in = %p\n", in); + printf("out = %p\n", out); + printf("aes->key = %p\n", aes->key); + printf("aes->reg = %p\n", aes->reg); + printf("aes->rounds = %d\n", aes->rounds); + printf("sz = %d\n", sz); + #endif + + /* check alignment, decrypt doesn't need alignment */ + if ((word)in % 16) { + #ifndef NO_CYASSL_ALLOC_ALIGN + byte* tmp = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (tmp == NULL) return MEMORY_E; + + XMEMCPY(tmp, in, sz); + AES_CBC_encrypt(tmp, tmp, (byte*)aes->reg, sz, (byte*)aes->key, + aes->rounds); + /* store iv for next call */ + XMEMCPY(aes->reg, tmp + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + + XMEMCPY(out, tmp, sz); + XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return 0; + #else + return BAD_ALIGN_E; + #endif + } + + AES_CBC_encrypt(in, out, (byte*)aes->reg, sz, (byte*)aes->key, + aes->rounds); + /* store iv for next call */ + XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + + return 0; + } +#endif + + while (blocks--) { + xorbuf((byte*)aes->reg, in, AES_BLOCK_SIZE); + AesEncrypt(aes, (byte*)aes->reg, (byte*)aes->reg); + XMEMCPY(out, aes->reg, AES_BLOCK_SIZE); + + out += AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + } + + return 0; +} + + +int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / AES_BLOCK_SIZE; + +#ifdef HAVE_CAVIUM + if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) + return AesCaviumCbcDecrypt(aes, out, in, sz); +#endif + +#ifdef CYASSL_AESNI + if (haveAESNI) { + #ifdef DEBUG_AESNI + printf("about to aes cbc decrypt\n"); + printf("in = %p\n", in); + printf("out = %p\n", out); + printf("aes->key = %p\n", aes->key); + printf("aes->reg = %p\n", aes->reg); + printf("aes->rounds = %d\n", aes->rounds); + printf("sz = %d\n", sz); + #endif + + /* if input and output same will overwrite input iv */ + XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + AES_CBC_decrypt(in, out, (byte*)aes->reg, sz, (byte*)aes->key, + aes->rounds); + /* store iv for next call */ + XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); + return 0; + } +#endif + + while (blocks--) { + XMEMCPY(aes->tmp, in, AES_BLOCK_SIZE); + AesDecrypt(aes, (byte*)aes->tmp, out); + xorbuf(out, (byte*)aes->reg, AES_BLOCK_SIZE); + XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); + + out += AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + } + + return 0; +} +#endif + +#ifdef CYASSL_AES_DIRECT + +/* Allow direct access to one block encrypt */ +void AesEncryptDirect(Aes* aes, byte* out, const byte* in) +{ + return AesEncrypt(aes, in, out); +} + + +/* Allow direct access to one block decrypt */ +void AesDecryptDirect(Aes* aes, byte* out, const byte* in) +{ + return AesDecrypt(aes, in, out); +} + + +#endif /* CYASSL_AES_DIRECT */ + + +#if defined(CYASSL_AES_DIRECT) || defined(CYASSL_AES_COUNTER) + +/* AES-CTR and AES-DIRECT need to use this for key setup, no aesni yet */ +int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen, + const byte* iv, int dir) +{ + return AesSetKeyLocal(aes, userKey, keylen, iv, dir); +} + +#endif /* CYASSL_AES_DIRECT || CYASSL_AES_COUNTER */ + + +#if defined(CYASSL_AES_COUNTER) && !defined(HAVE_AES_ENGINE) + +/* Increment AES counter */ +static INLINE void IncrementAesCounter(byte* inOutCtr) +{ + int i; + + /* in network byte order so start at end and work back */ + for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { + if (++inOutCtr[i]) /* we're done unless we overflow */ + return; + } +} + + +void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) +{ + byte* tmp = (byte*)aes->tmp + AES_BLOCK_SIZE - aes->left; + + /* consume any unused bytes left in aes->tmp */ + while (aes->left && sz) { + *(out++) = *(in++) ^ *(tmp++); + aes->left--; + sz--; + } + + /* do as many block size ops as possible */ + while (sz >= AES_BLOCK_SIZE) { + AesEncrypt(aes, (byte*)aes->reg, out); + IncrementAesCounter((byte*)aes->reg); + xorbuf(out, in, AES_BLOCK_SIZE); + + out += AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + sz -= AES_BLOCK_SIZE; + aes->left = 0; + } + + /* handle non block size remaining and sotre unused byte count in left */ + if (sz) { + AesEncrypt(aes, (byte*)aes->reg, (byte*)aes->tmp); + IncrementAesCounter((byte*)aes->reg); + + aes->left = AES_BLOCK_SIZE; + tmp = (byte*)aes->tmp; + + while (sz--) { + *(out++) = *(in++) ^ *(tmp++); + aes->left--; + } + } +} + +#endif /* CYASSL_AES_COUNTER */ + + +#ifdef HAVE_AESGCM + +/* + * The IV for AES GCM, stored in struct Aes's member reg, is comprised of + * three parts in order: + * 1. The implicit IV. This is generated from the PRF using the shared + * secrets between endpoints. It is 4 bytes long. + * 2. The explicit IV. This is set by the user of the AES. It needs to be + * unique for each call to encrypt. The explicit IV is shared with the + * other end of the transaction in the clear. + * 3. The counter. Each block of data is encrypted with its own sequence + * number counter. + */ + +enum { + CTR_SZ = 4 +}; + + +static INLINE void InitGcmCounter(byte* inOutCtr) +{ + inOutCtr[AES_BLOCK_SIZE - 4] = 0; + inOutCtr[AES_BLOCK_SIZE - 3] = 0; + inOutCtr[AES_BLOCK_SIZE - 2] = 0; + inOutCtr[AES_BLOCK_SIZE - 1] = 1; +} + + +static INLINE void IncrementGcmCounter(byte* inOutCtr) +{ + int i; + + /* in network byte order so start at end and work back */ + for (i = AES_BLOCK_SIZE - 1; i >= AES_BLOCK_SIZE - CTR_SZ; i--) { + if (++inOutCtr[i]) /* we're done unless we overflow */ + return; + } +} + + +#if defined(GCM_SMALL) || defined(GCM_TABLE) + +static INLINE void FlattenSzInBits(byte* buf, word32 sz) +{ + /* Multiply the sz by 8 */ + word32 szHi = (sz >> (8*sizeof(sz) - 3)); + sz <<= 3; + + /* copy over the words of the sz into the destination buffer */ + buf[0] = (szHi >> 24) & 0xff; + buf[1] = (szHi >> 16) & 0xff; + buf[2] = (szHi >> 8) & 0xff; + buf[3] = szHi & 0xff; + buf[4] = (sz >> 24) & 0xff; + buf[5] = (sz >> 16) & 0xff; + buf[6] = (sz >> 8) & 0xff; + buf[7] = sz & 0xff; +} + + +static INLINE void RIGHTSHIFTX(byte* x) +{ + int i; + int carryOut = 0; + int carryIn = 0; + int borrow = x[15] & 0x01; + + for (i = 0; i < AES_BLOCK_SIZE; i++) { + carryOut = x[i] & 0x01; + x[i] = (x[i] >> 1) | (carryIn ? 0x80 : 0); + carryIn = carryOut; + } + if (borrow) x[0] ^= 0xE1; +} + +#endif /* defined(GCM_SMALL) || defined(GCM_TABLE) */ + + +#ifdef GCM_TABLE + +static void GenerateM0(Aes* aes) +{ + int i, j; + byte (*m)[AES_BLOCK_SIZE] = aes->M0; + + XMEMCPY(m[128], aes->H, AES_BLOCK_SIZE); + + for (i = 64; i > 0; i /= 2) { + XMEMCPY(m[i], m[i*2], AES_BLOCK_SIZE); + RIGHTSHIFTX(m[i]); + } + + for (i = 2; i < 256; i *= 2) { + for (j = 1; j < i; j++) { + XMEMCPY(m[i+j], m[i], AES_BLOCK_SIZE); + xorbuf(m[i+j], m[j], AES_BLOCK_SIZE); + } + } + + XMEMSET(m[0], 0, AES_BLOCK_SIZE); +} + +#endif /* GCM_TABLE */ + + +void AesGcmSetKey(Aes* aes, const byte* key, word32 len) +{ + byte iv[AES_BLOCK_SIZE]; + + if (!((len == 16) || (len == 24) || (len == 32))) + return; + + XMEMSET(iv, 0, AES_BLOCK_SIZE); + AesSetKey(aes, key, len, iv, AES_ENCRYPTION); + + AesEncrypt(aes, iv, aes->H); +#ifdef GCM_TABLE + GenerateM0(aes); +#endif /* GCM_TABLE */ +} + + +#if defined(GCM_SMALL) + +static void GMULT(byte* X, byte* Y) +{ + byte Z[AES_BLOCK_SIZE]; + byte V[AES_BLOCK_SIZE]; + int i, j; + + XMEMSET(Z, 0, AES_BLOCK_SIZE); + XMEMCPY(V, X, AES_BLOCK_SIZE); + for (i = 0; i < AES_BLOCK_SIZE; i++) + { + byte y = Y[i]; + for (j = 0; j < 8; j++) + { + if (y & 0x80) { + xorbuf(Z, V, AES_BLOCK_SIZE); + } + + RIGHTSHIFTX(V); + y = y << 1; + } + } + XMEMCPY(X, Z, AES_BLOCK_SIZE); +} + + +static void GHASH(Aes* aes, const byte* a, word32 aSz, + const byte* c, word32 cSz, byte* s, word32 sSz) +{ + byte x[AES_BLOCK_SIZE]; + byte scratch[AES_BLOCK_SIZE]; + word32 blocks, partial; + byte* h = aes->H; + + XMEMSET(x, 0, AES_BLOCK_SIZE); + + /* Hash in A, the Additional Authentication Data */ + if (aSz != 0 && a != NULL) { + blocks = aSz / AES_BLOCK_SIZE; + partial = aSz % AES_BLOCK_SIZE; + while (blocks--) { + xorbuf(x, a, AES_BLOCK_SIZE); + GMULT(x, h); + a += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(scratch, 0, AES_BLOCK_SIZE); + XMEMCPY(scratch, a, partial); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, h); + } + } + + /* Hash in C, the Ciphertext */ + if (cSz != 0 && c != NULL) { + blocks = cSz / AES_BLOCK_SIZE; + partial = cSz % AES_BLOCK_SIZE; + while (blocks--) { + xorbuf(x, c, AES_BLOCK_SIZE); + GMULT(x, h); + c += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(scratch, 0, AES_BLOCK_SIZE); + XMEMCPY(scratch, c, partial); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, h); + } + } + + /* Hash in the lengths of A and C in bits */ + FlattenSzInBits(&scratch[0], aSz); + FlattenSzInBits(&scratch[8], cSz); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, h); + + /* Copy the result into s. */ + XMEMCPY(s, x, sSz); +} + +/* end GCM_SMALL */ +#elif defined(GCM_TABLE) + +static const byte R[256][2] = { + {0x00, 0x00}, {0x01, 0xc2}, {0x03, 0x84}, {0x02, 0x46}, + {0x07, 0x08}, {0x06, 0xca}, {0x04, 0x8c}, {0x05, 0x4e}, + {0x0e, 0x10}, {0x0f, 0xd2}, {0x0d, 0x94}, {0x0c, 0x56}, + {0x09, 0x18}, {0x08, 0xda}, {0x0a, 0x9c}, {0x0b, 0x5e}, + {0x1c, 0x20}, {0x1d, 0xe2}, {0x1f, 0xa4}, {0x1e, 0x66}, + {0x1b, 0x28}, {0x1a, 0xea}, {0x18, 0xac}, {0x19, 0x6e}, + {0x12, 0x30}, {0x13, 0xf2}, {0x11, 0xb4}, {0x10, 0x76}, + {0x15, 0x38}, {0x14, 0xfa}, {0x16, 0xbc}, {0x17, 0x7e}, + {0x38, 0x40}, {0x39, 0x82}, {0x3b, 0xc4}, {0x3a, 0x06}, + {0x3f, 0x48}, {0x3e, 0x8a}, {0x3c, 0xcc}, {0x3d, 0x0e}, + {0x36, 0x50}, {0x37, 0x92}, {0x35, 0xd4}, {0x34, 0x16}, + {0x31, 0x58}, {0x30, 0x9a}, {0x32, 0xdc}, {0x33, 0x1e}, + {0x24, 0x60}, {0x25, 0xa2}, {0x27, 0xe4}, {0x26, 0x26}, + {0x23, 0x68}, {0x22, 0xaa}, {0x20, 0xec}, {0x21, 0x2e}, + {0x2a, 0x70}, {0x2b, 0xb2}, {0x29, 0xf4}, {0x28, 0x36}, + {0x2d, 0x78}, {0x2c, 0xba}, {0x2e, 0xfc}, {0x2f, 0x3e}, + {0x70, 0x80}, {0x71, 0x42}, {0x73, 0x04}, {0x72, 0xc6}, + {0x77, 0x88}, {0x76, 0x4a}, {0x74, 0x0c}, {0x75, 0xce}, + {0x7e, 0x90}, {0x7f, 0x52}, {0x7d, 0x14}, {0x7c, 0xd6}, + {0x79, 0x98}, {0x78, 0x5a}, {0x7a, 0x1c}, {0x7b, 0xde}, + {0x6c, 0xa0}, {0x6d, 0x62}, {0x6f, 0x24}, {0x6e, 0xe6}, + {0x6b, 0xa8}, {0x6a, 0x6a}, {0x68, 0x2c}, {0x69, 0xee}, + {0x62, 0xb0}, {0x63, 0x72}, {0x61, 0x34}, {0x60, 0xf6}, + {0x65, 0xb8}, {0x64, 0x7a}, {0x66, 0x3c}, {0x67, 0xfe}, + {0x48, 0xc0}, {0x49, 0x02}, {0x4b, 0x44}, {0x4a, 0x86}, + {0x4f, 0xc8}, {0x4e, 0x0a}, {0x4c, 0x4c}, {0x4d, 0x8e}, + {0x46, 0xd0}, {0x47, 0x12}, {0x45, 0x54}, {0x44, 0x96}, + {0x41, 0xd8}, {0x40, 0x1a}, {0x42, 0x5c}, {0x43, 0x9e}, + {0x54, 0xe0}, {0x55, 0x22}, {0x57, 0x64}, {0x56, 0xa6}, + {0x53, 0xe8}, {0x52, 0x2a}, {0x50, 0x6c}, {0x51, 0xae}, + {0x5a, 0xf0}, {0x5b, 0x32}, {0x59, 0x74}, {0x58, 0xb6}, + {0x5d, 0xf8}, {0x5c, 0x3a}, {0x5e, 0x7c}, {0x5f, 0xbe}, + {0xe1, 0x00}, {0xe0, 0xc2}, {0xe2, 0x84}, {0xe3, 0x46}, + {0xe6, 0x08}, {0xe7, 0xca}, {0xe5, 0x8c}, {0xe4, 0x4e}, + {0xef, 0x10}, {0xee, 0xd2}, {0xec, 0x94}, {0xed, 0x56}, + {0xe8, 0x18}, {0xe9, 0xda}, {0xeb, 0x9c}, {0xea, 0x5e}, + {0xfd, 0x20}, {0xfc, 0xe2}, {0xfe, 0xa4}, {0xff, 0x66}, + {0xfa, 0x28}, {0xfb, 0xea}, {0xf9, 0xac}, {0xf8, 0x6e}, + {0xf3, 0x30}, {0xf2, 0xf2}, {0xf0, 0xb4}, {0xf1, 0x76}, + {0xf4, 0x38}, {0xf5, 0xfa}, {0xf7, 0xbc}, {0xf6, 0x7e}, + {0xd9, 0x40}, {0xd8, 0x82}, {0xda, 0xc4}, {0xdb, 0x06}, + {0xde, 0x48}, {0xdf, 0x8a}, {0xdd, 0xcc}, {0xdc, 0x0e}, + {0xd7, 0x50}, {0xd6, 0x92}, {0xd4, 0xd4}, {0xd5, 0x16}, + {0xd0, 0x58}, {0xd1, 0x9a}, {0xd3, 0xdc}, {0xd2, 0x1e}, + {0xc5, 0x60}, {0xc4, 0xa2}, {0xc6, 0xe4}, {0xc7, 0x26}, + {0xc2, 0x68}, {0xc3, 0xaa}, {0xc1, 0xec}, {0xc0, 0x2e}, + {0xcb, 0x70}, {0xca, 0xb2}, {0xc8, 0xf4}, {0xc9, 0x36}, + {0xcc, 0x78}, {0xcd, 0xba}, {0xcf, 0xfc}, {0xce, 0x3e}, + {0x91, 0x80}, {0x90, 0x42}, {0x92, 0x04}, {0x93, 0xc6}, + {0x96, 0x88}, {0x97, 0x4a}, {0x95, 0x0c}, {0x94, 0xce}, + {0x9f, 0x90}, {0x9e, 0x52}, {0x9c, 0x14}, {0x9d, 0xd6}, + {0x98, 0x98}, {0x99, 0x5a}, {0x9b, 0x1c}, {0x9a, 0xde}, + {0x8d, 0xa0}, {0x8c, 0x62}, {0x8e, 0x24}, {0x8f, 0xe6}, + {0x8a, 0xa8}, {0x8b, 0x6a}, {0x89, 0x2c}, {0x88, 0xee}, + {0x83, 0xb0}, {0x82, 0x72}, {0x80, 0x34}, {0x81, 0xf6}, + {0x84, 0xb8}, {0x85, 0x7a}, {0x87, 0x3c}, {0x86, 0xfe}, + {0xa9, 0xc0}, {0xa8, 0x02}, {0xaa, 0x44}, {0xab, 0x86}, + {0xae, 0xc8}, {0xaf, 0x0a}, {0xad, 0x4c}, {0xac, 0x8e}, + {0xa7, 0xd0}, {0xa6, 0x12}, {0xa4, 0x54}, {0xa5, 0x96}, + {0xa0, 0xd8}, {0xa1, 0x1a}, {0xa3, 0x5c}, {0xa2, 0x9e}, + {0xb5, 0xe0}, {0xb4, 0x22}, {0xb6, 0x64}, {0xb7, 0xa6}, + {0xb2, 0xe8}, {0xb3, 0x2a}, {0xb1, 0x6c}, {0xb0, 0xae}, + {0xbb, 0xf0}, {0xba, 0x32}, {0xb8, 0x74}, {0xb9, 0xb6}, + {0xbc, 0xf8}, {0xbd, 0x3a}, {0xbf, 0x7c}, {0xbe, 0xbe} }; + + +static void GMULT(byte *x, byte m[256][AES_BLOCK_SIZE]) +{ + int i, j; + byte Z[AES_BLOCK_SIZE]; + byte a; + + XMEMSET(Z, 0, sizeof(Z)); + + for (i = 15; i > 0; i--) { + xorbuf(Z, m[x[i]], AES_BLOCK_SIZE); + a = Z[15]; + + for (j = 15; j > 0; j--) { + Z[j] = Z[j-1]; + } + + Z[0] = R[a][0]; + Z[1] ^= R[a][1]; + } + xorbuf(Z, m[x[0]], AES_BLOCK_SIZE); + + XMEMCPY(x, Z, AES_BLOCK_SIZE); +} + + +static void GHASH(Aes* aes, const byte* a, word32 aSz, + const byte* c, word32 cSz, byte* s, word32 sSz) +{ + byte x[AES_BLOCK_SIZE]; + byte scratch[AES_BLOCK_SIZE]; + word32 blocks, partial; + + XMEMSET(x, 0, AES_BLOCK_SIZE); + + /* Hash in A, the Additional Authentication Data */ + if (aSz != 0 && a != NULL) { + blocks = aSz / AES_BLOCK_SIZE; + partial = aSz % AES_BLOCK_SIZE; + while (blocks--) { + xorbuf(x, a, AES_BLOCK_SIZE); + GMULT(x, aes->M0); + a += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(scratch, 0, AES_BLOCK_SIZE); + XMEMCPY(scratch, a, partial); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, aes->M0); + } + } + + /* Hash in C, the Ciphertext */ + if (cSz != 0 && c != NULL) { + blocks = cSz / AES_BLOCK_SIZE; + partial = cSz % AES_BLOCK_SIZE; + while (blocks--) { + xorbuf(x, c, AES_BLOCK_SIZE); + GMULT(x, aes->M0); + c += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(scratch, 0, AES_BLOCK_SIZE); + XMEMCPY(scratch, c, partial); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, aes->M0); + } + } + + /* Hash in the lengths of A and C in bits */ + FlattenSzInBits(&scratch[0], aSz); + FlattenSzInBits(&scratch[8], cSz); + xorbuf(x, scratch, AES_BLOCK_SIZE); + GMULT(x, aes->M0); + + /* Copy the result into s. */ + XMEMCPY(s, x, sSz); +} + +/* end GCM_TABLE */ +#elif defined(WORD64_AVAILABLE) && !defined(GCM_WORD32) + +static void GMULT(word64* X, word64* Y) +{ + word64 Z[2] = {0,0}; + word64 V[2] ; + int i, j; + V[0] = X[0] ; V[1] = X[1] ; + + for (i = 0; i < 2; i++) + { + word64 y = Y[i]; + for (j = 0; j < 64; j++) + { + if (y & 0x8000000000000000) { + Z[0] ^= V[0]; + Z[1] ^= V[1]; + } + + if (V[1] & 0x0000000000000001) { + V[1] >>= 1; + V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0); + V[0] >>= 1; + V[0] ^= 0xE100000000000000; + } + else { + V[1] >>= 1; + V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0); + V[0] >>= 1; + } + y <<= 1; + } + } + X[0] = Z[0]; + X[1] = Z[1]; +} + + +static void GHASH(Aes* aes, const byte* a, word32 aSz, + const byte* c, word32 cSz, byte* s, word32 sSz) +{ + word64 x[2] = {0,0}; + word32 blocks, partial; + word64 bigH[2]; + + XMEMCPY(bigH, aes->H, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(bigH, bigH, AES_BLOCK_SIZE); + #endif + + /* Hash in A, the Additional Authentication Data */ + if (aSz != 0 && a != NULL) { + word64 bigA[2]; + blocks = aSz / AES_BLOCK_SIZE; + partial = aSz % AES_BLOCK_SIZE; + while (blocks--) { + XMEMCPY(bigA, a, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(bigA, bigA, AES_BLOCK_SIZE); + #endif + x[0] ^= bigA[0]; + x[1] ^= bigA[1]; + GMULT(x, bigH); + a += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(bigA, 0, AES_BLOCK_SIZE); + XMEMCPY(bigA, a, partial); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(bigA, bigA, AES_BLOCK_SIZE); + #endif + x[0] ^= bigA[0]; + x[1] ^= bigA[1]; + GMULT(x, bigH); + } + } + + /* Hash in C, the Ciphertext */ + if (cSz != 0 && c != NULL) { + word64 bigC[2]; + blocks = cSz / AES_BLOCK_SIZE; + partial = cSz % AES_BLOCK_SIZE; + while (blocks--) { + XMEMCPY(bigC, c, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(bigC, bigC, AES_BLOCK_SIZE); + #endif + x[0] ^= bigC[0]; + x[1] ^= bigC[1]; + GMULT(x, bigH); + c += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(bigC, 0, AES_BLOCK_SIZE); + XMEMCPY(bigC, c, partial); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(bigC, bigC, AES_BLOCK_SIZE); + #endif + x[0] ^= bigC[0]; + x[1] ^= bigC[1]; + GMULT(x, bigH); + } + } + + /* Hash in the lengths in bits of A and C */ + { + word64 len[2] ; + len[0] = aSz ; len[1] = cSz; + + /* Lengths are in bytes. Convert to bits. */ + len[0] *= 8; + len[1] *= 8; + + x[0] ^= len[0]; + x[1] ^= len[1]; + GMULT(x, bigH); + } + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(x, x, AES_BLOCK_SIZE); + #endif + XMEMCPY(s, x, sSz); +} + +/* end defined(WORD64_AVAILABLE) && !defined(GCM_WORD32) */ +#else /* GCM_WORD32 */ + +static void GMULT(word32* X, word32* Y) +{ + word32 Z[4] = {0,0,0,0}; + word32 V[4] ; + int i, j; + + V[0] = X[0]; V[1] = X[1]; V[2] = X[2]; V[3] = X[3]; + + for (i = 0; i < 4; i++) + { + word32 y = Y[i]; + for (j = 0; j < 32; j++) + { + if (y & 0x80000000) { + Z[0] ^= V[0]; + Z[1] ^= V[1]; + Z[2] ^= V[2]; + Z[3] ^= V[3]; + } + + if (V[3] & 0x00000001) { + V[3] >>= 1; + V[3] |= ((V[2] & 0x00000001) ? 0x80000000 : 0); + V[2] >>= 1; + V[2] |= ((V[1] & 0x00000001) ? 0x80000000 : 0); + V[1] >>= 1; + V[1] |= ((V[0] & 0x00000001) ? 0x80000000 : 0); + V[0] >>= 1; + V[0] ^= 0xE1000000; + } else { + V[3] >>= 1; + V[3] |= ((V[2] & 0x00000001) ? 0x80000000 : 0); + V[2] >>= 1; + V[2] |= ((V[1] & 0x00000001) ? 0x80000000 : 0); + V[1] >>= 1; + V[1] |= ((V[0] & 0x00000001) ? 0x80000000 : 0); + V[0] >>= 1; + } + y <<= 1; + } + } + X[0] = Z[0]; + X[1] = Z[1]; + X[2] = Z[2]; + X[3] = Z[3]; +} + + +static void GHASH(Aes* aes, const byte* a, word32 aSz, + const byte* c, word32 cSz, byte* s, word32 sSz) +{ + word32 x[4] = {0,0,0,0}; + word32 blocks, partial; + word32 bigH[4]; + + XMEMCPY(bigH, aes->H, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(bigH, bigH, AES_BLOCK_SIZE); + #endif + + /* Hash in A, the Additional Authentication Data */ + if (aSz != 0 && a != NULL) { + word32 bigA[4]; + blocks = aSz / AES_BLOCK_SIZE; + partial = aSz % AES_BLOCK_SIZE; + while (blocks--) { + XMEMCPY(bigA, a, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(bigA, bigA, AES_BLOCK_SIZE); + #endif + x[0] ^= bigA[0]; + x[1] ^= bigA[1]; + x[2] ^= bigA[2]; + x[3] ^= bigA[3]; + GMULT(x, bigH); + a += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(bigA, 0, AES_BLOCK_SIZE); + XMEMCPY(bigA, a, partial); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(bigA, bigA, AES_BLOCK_SIZE); + #endif + x[0] ^= bigA[0]; + x[1] ^= bigA[1]; + x[2] ^= bigA[2]; + x[3] ^= bigA[3]; + GMULT(x, bigH); + } + } + + /* Hash in C, the Ciphertext */ + if (cSz != 0 && c != NULL) { + word32 bigC[4]; + blocks = cSz / AES_BLOCK_SIZE; + partial = cSz % AES_BLOCK_SIZE; + while (blocks--) { + XMEMCPY(bigC, c, AES_BLOCK_SIZE); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(bigC, bigC, AES_BLOCK_SIZE); + #endif + x[0] ^= bigC[0]; + x[1] ^= bigC[1]; + x[2] ^= bigC[2]; + x[3] ^= bigC[3]; + GMULT(x, bigH); + c += AES_BLOCK_SIZE; + } + if (partial != 0) { + XMEMSET(bigC, 0, AES_BLOCK_SIZE); + XMEMCPY(bigC, c, partial); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(bigC, bigC, AES_BLOCK_SIZE); + #endif + x[0] ^= bigC[0]; + x[1] ^= bigC[1]; + x[2] ^= bigC[2]; + x[3] ^= bigC[3]; + GMULT(x, bigH); + } + } + + /* Hash in the lengths in bits of A and C */ + { + word32 len[4]; + + /* Lengths are in bytes. Convert to bits. */ + len[0] = (aSz >> (8*sizeof(aSz) - 3)); + len[1] = aSz << 3; + len[2] = (cSz >> (8*sizeof(cSz) - 3)); + len[3] = cSz << 3; + + x[0] ^= len[0]; + x[1] ^= len[1]; + x[2] ^= len[2]; + x[3] ^= len[3]; + GMULT(x, bigH); + } + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(x, x, AES_BLOCK_SIZE); + #endif + XMEMCPY(s, x, sSz); +} + +#endif /* end GCM_WORD32 */ + + +void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz, + const byte* iv, word32 ivSz, + byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz) +{ + word32 blocks = sz / AES_BLOCK_SIZE; + word32 partial = sz % AES_BLOCK_SIZE; + const byte* p = in; + byte* c = out; + byte counter[AES_BLOCK_SIZE]; + byte *ctr ; + byte scratch[AES_BLOCK_SIZE]; + + CYASSL_ENTER("AesGcmEncrypt"); + +#ifdef CYASSL_PIC32MZ_CRYPT + ctr = (char *)aes->iv_ce ; +#else + ctr = counter ; +#endif + + XMEMSET(ctr, 0, AES_BLOCK_SIZE); + XMEMCPY(ctr, iv, ivSz); + InitGcmCounter(ctr); + +#ifdef CYASSL_PIC32MZ_CRYPT + if(blocks) + AesCrypt(aes, out, in, blocks*AES_BLOCK_SIZE, + PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM ); +#endif + while (blocks--) { + IncrementGcmCounter(ctr); + #ifndef CYASSL_PIC32MZ_CRYPT + AesEncrypt(aes, ctr, scratch); + xorbuf(scratch, p, AES_BLOCK_SIZE); + XMEMCPY(c, scratch, AES_BLOCK_SIZE); + #endif + p += AES_BLOCK_SIZE; + c += AES_BLOCK_SIZE; + } + + if (partial != 0) { + IncrementGcmCounter(ctr); + AesEncrypt(aes, ctr, scratch); + xorbuf(scratch, p, partial); + XMEMCPY(c, scratch, partial); + + } + + GHASH(aes, authIn, authInSz, out, sz, authTag, authTagSz); + InitGcmCounter(ctr); + AesEncrypt(aes, ctr, scratch); + xorbuf(authTag, scratch, authTagSz); + +} + + +int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz, + const byte* iv, word32 ivSz, + const byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz) +{ + word32 blocks = sz / AES_BLOCK_SIZE; + word32 partial = sz % AES_BLOCK_SIZE; + const byte* c = in; + byte* p = out; + byte counter[AES_BLOCK_SIZE]; + byte *ctr ; + byte scratch[AES_BLOCK_SIZE]; + + CYASSL_ENTER("AesGcmDecrypt"); + +#ifdef CYASSL_PIC32MZ_CRYPT + ctr = (char *)aes->iv_ce ; +#else + ctr = counter ; +#endif + + XMEMSET(ctr, 0, AES_BLOCK_SIZE); + XMEMCPY(ctr, iv, ivSz); + InitGcmCounter(ctr); + + /* Calculate the authTag again using the received auth data and the + * cipher text. */ + { + byte Tprime[AES_BLOCK_SIZE]; + byte EKY0[AES_BLOCK_SIZE]; + + GHASH(aes, authIn, authInSz, in, sz, Tprime, sizeof(Tprime)); + AesEncrypt(aes, ctr, EKY0); + xorbuf(Tprime, EKY0, sizeof(Tprime)); + + if (XMEMCMP(authTag, Tprime, authTagSz) != 0) { + return AES_GCM_AUTH_E; + } + } + +#ifdef CYASSL_PIC32MZ_CRYPT + if(blocks) + AesCrypt(aes, out, in, blocks*AES_BLOCK_SIZE, + PIC32_DECRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM ); +#endif + + while (blocks--) { + IncrementGcmCounter(ctr); + #ifndef CYASSL_PIC32MZ_CRYPT + AesEncrypt(aes, ctr, scratch); + xorbuf(scratch, c, AES_BLOCK_SIZE); + XMEMCPY(p, scratch, AES_BLOCK_SIZE); + #endif + p += AES_BLOCK_SIZE; + c += AES_BLOCK_SIZE; + } + if (partial != 0) { + IncrementGcmCounter(ctr); + AesEncrypt(aes, ctr, scratch); + xorbuf(scratch, c, partial); + XMEMCPY(p, scratch, partial); + } + return 0; +} + + + +CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len) +{ + AesGcmSetKey(&gmac->aes, key, len); +} + + +CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, + const byte* authIn, word32 authInSz, + byte* authTag, word32 authTagSz) +{ + AesGcmEncrypt(&gmac->aes, NULL, NULL, 0, iv, ivSz, + authTag, authTagSz, authIn, authInSz); +} + +#endif /* HAVE_AESGCM */ + +#ifdef HAVE_AESCCM + +void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz) +{ + byte nonce[AES_BLOCK_SIZE]; + + if (!((keySz == 16) || (keySz == 24) || (keySz == 32))) + return; + + XMEMSET(nonce, 0, sizeof(nonce)); + AesSetKey(aes, key, keySz, nonce, AES_ENCRYPTION); +} + + +static void roll_x(Aes* aes, const byte* in, word32 inSz, byte* out) +{ + /* process the bulk of the data */ + while (inSz >= AES_BLOCK_SIZE) { + xorbuf(out, in, AES_BLOCK_SIZE); + in += AES_BLOCK_SIZE; + inSz -= AES_BLOCK_SIZE; + + AesEncrypt(aes, out, out); + } + + /* process remainder of the data */ + if (inSz > 0) { + xorbuf(out, in, inSz); + AesEncrypt(aes, out, out); + } +} + + +static void roll_auth(Aes* aes, const byte* in, word32 inSz, byte* out) +{ + word32 authLenSz; + word32 remainder; + + /* encode the length in */ + if (inSz <= 0xFEFF) { + authLenSz = 2; + out[0] ^= ((inSz & 0xFF00) >> 8); + out[1] ^= (inSz & 0x00FF); + } + else if (inSz <= 0xFFFFFFFF) { + authLenSz = 6; + out[0] ^= 0xFF; out[1] ^= 0xFE; + out[2] ^= ((inSz & 0xFF000000) >> 24); + out[3] ^= ((inSz & 0x00FF0000) >> 16); + out[4] ^= ((inSz & 0x0000FF00) >> 8); + out[5] ^= (inSz & 0x000000FF); + } + /* Note, the protocol handles auth data up to 2^64, but we are + * using 32-bit sizes right now, so the bigger data isn't handled + * else if (inSz <= 0xFFFFFFFFFFFFFFFF) {} */ + else + return; + + /* start fill out the rest of the first block */ + remainder = AES_BLOCK_SIZE - authLenSz; + if (inSz >= remainder) { + /* plenty of bulk data to fill the remainder of this block */ + xorbuf(out + authLenSz, in, remainder); + inSz -= remainder; + in += remainder; + } + else { + /* not enough bulk data, copy what is available, and pad zero */ + xorbuf(out + authLenSz, in, inSz); + inSz = 0; + } + AesEncrypt(aes, out, out); + + if (inSz > 0) + roll_x(aes, in, inSz, out); +} + + +static INLINE void AesCcmCtrInc(byte* B, word32 lenSz) +{ + word32 i; + + for (i = 0; i < lenSz; i++) { + if (++B[AES_BLOCK_SIZE - 1 - i] != 0) return; + } +} + + +void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz, + const byte* nonce, word32 nonceSz, + byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz) +{ + byte A[AES_BLOCK_SIZE]; + byte B[AES_BLOCK_SIZE]; + byte lenSz; + word32 i; + + XMEMCPY(B+1, nonce, nonceSz); + lenSz = AES_BLOCK_SIZE - 1 - (byte)nonceSz; + B[0] = (authInSz > 0 ? 64 : 0) + + (8 * (((byte)authTagSz - 2) / 2)) + + (lenSz - 1); + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = (inSz >> (8 * i)) & 0xFF; + + AesEncrypt(aes, B, A); + if (authInSz > 0) + roll_auth(aes, authIn, authInSz, A); + if (inSz > 0) + roll_x(aes, in, inSz, A); + XMEMCPY(authTag, A, authTagSz); + + B[0] = lenSz - 1; + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = 0; + AesEncrypt(aes, B, A); + xorbuf(authTag, A, authTagSz); + + B[15] = 1; + while (inSz >= AES_BLOCK_SIZE) { + AesEncrypt(aes, B, A); + xorbuf(A, in, AES_BLOCK_SIZE); + XMEMCPY(out, A, AES_BLOCK_SIZE); + + AesCcmCtrInc(B, lenSz); + inSz -= AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + out += AES_BLOCK_SIZE; + } + if (inSz > 0) { + AesEncrypt(aes, B, A); + xorbuf(A, in, inSz); + XMEMCPY(out, A, inSz); + } + + XMEMSET(A, 0, AES_BLOCK_SIZE); + XMEMSET(B, 0, AES_BLOCK_SIZE); +} + + +int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz, + const byte* nonce, word32 nonceSz, + const byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz) +{ + byte A[AES_BLOCK_SIZE]; + byte B[AES_BLOCK_SIZE]; + byte* o; + byte lenSz; + word32 i, oSz; + int result = 0; + + o = out; + oSz = inSz; + XMEMCPY(B+1, nonce, nonceSz); + lenSz = AES_BLOCK_SIZE - 1 - (byte)nonceSz; + + B[0] = lenSz - 1; + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = 0; + B[15] = 1; + + while (oSz >= AES_BLOCK_SIZE) { + AesEncrypt(aes, B, A); + xorbuf(A, in, AES_BLOCK_SIZE); + XMEMCPY(o, A, AES_BLOCK_SIZE); + + AesCcmCtrInc(B, lenSz); + oSz -= AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + o += AES_BLOCK_SIZE; + } + if (inSz > 0) { + AesEncrypt(aes, B, A); + xorbuf(A, in, oSz); + XMEMCPY(o, A, oSz); + } + + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = 0; + AesEncrypt(aes, B, A); + + o = out; + oSz = inSz; + + B[0] = (authInSz > 0 ? 64 : 0) + + (8 * (((byte)authTagSz - 2) / 2)) + + (lenSz - 1); + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = (inSz >> (8 * i)) & 0xFF; + + AesEncrypt(aes, B, A); + if (authInSz > 0) + roll_auth(aes, authIn, authInSz, A); + if (inSz > 0) + roll_x(aes, o, oSz, A); + + B[0] = lenSz - 1; + for (i = 0; i < lenSz; i++) + B[AES_BLOCK_SIZE - 1 - i] = 0; + AesEncrypt(aes, B, B); + xorbuf(A, B, authTagSz); + + if (XMEMCMP(A, authTag, authTagSz) != 0) { + /* If the authTag check fails, don't keep the decrypted data. + * Unfortunately, you need the decrypted data to calculate the + * check value. */ + XMEMSET(out, 0, inSz); + result = AES_CCM_AUTH_E; + } + + XMEMSET(A, 0, AES_BLOCK_SIZE); + XMEMSET(B, 0, AES_BLOCK_SIZE); + o = NULL; + + return result; +} + +#endif + +#endif /* STM32F2_CRYPTO */ + +int AesSetIV(Aes* aes, const byte* iv) +{ + if (aes == NULL) + return BAD_FUNC_ARG; + + if (iv) + XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); + else + XMEMSET(aes->reg, 0, AES_BLOCK_SIZE); + + return 0; +} + + +#ifdef HAVE_CAVIUM + +#include +#include "cavium_common.h" + +/* Initiliaze Aes for use with Nitrox device */ +int AesInitCavium(Aes* aes, int devId) +{ + if (aes == NULL) + return -1; + + if (CspAllocContext(CONTEXT_SSL, &aes->contextHandle, devId) != 0) + return -1; + + aes->devId = devId; + aes->magic = CYASSL_AES_CAVIUM_MAGIC; + + return 0; +} + + +/* Free Aes from use with Nitrox device */ +void AesFreeCavium(Aes* aes) +{ + if (aes == NULL) + return; + + if (aes->magic != CYASSL_AES_CAVIUM_MAGIC) + return; + + CspFreeContext(CONTEXT_SSL, aes->contextHandle, aes->devId); + aes->magic = 0; +} + + +static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length, + const byte* iv) +{ + if (aes == NULL) + return -1; + + XMEMCPY(aes->key, key, length); /* key still holds key, iv still in reg */ + if (length == 16) + aes->type = AES_128; + else if (length == 24) + aes->type = AES_192; + else if (length == 32) + aes->type = AES_256; + + return AesSetIV(aes, iv); +} + + +static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in, + word32 length) +{ + word offset = 0; + word32 requestId; + + while (length > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + if (CspEncryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, + aes->type, slen, (byte*)in + offset, out + offset, + (byte*)aes->reg, (byte*)aes->key, &requestId, + aes->devId) != 0) { + CYASSL_MSG("Bad Cavium Aes Encrypt"); + return -1; + } + length -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + XMEMCPY(aes->reg, out + offset - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + } + if (length) { + word16 slen = (word16)length; + if (CspEncryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, + aes->type, slen, (byte*)in + offset, out + offset, + (byte*)aes->reg, (byte*)aes->key, &requestId, + aes->devId) != 0) { + CYASSL_MSG("Bad Cavium Aes Encrypt"); + return -1; + } + XMEMCPY(aes->reg, out + offset+length - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + } + return 0; +} + +static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in, + word32 length) +{ + word32 requestId; + word offset = 0; + + while (length > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + XMEMCPY(aes->tmp, in + offset + slen - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + if (CspDecryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, + aes->type, slen, (byte*)in + offset, out + offset, + (byte*)aes->reg, (byte*)aes->key, &requestId, + aes->devId) != 0) { + CYASSL_MSG("Bad Cavium Aes Decrypt"); + return -1; + } + length -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); + } + if (length) { + word16 slen = (word16)length; + XMEMCPY(aes->tmp, in + offset + slen - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + if (CspDecryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, + aes->type, slen, (byte*)in + offset, out + offset, + (byte*)aes->reg, (byte*)aes->key, &requestId, + aes->devId) != 0) { + CYASSL_MSG("Bad Cavium Aes Decrypt"); + return -1; + } + XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); + } + return 0; +} + +#endif /* HAVE_CAVIUM */ + +#endif /* NO_AES */ + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s b/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s new file mode 100755 index 00000000..382d9b31 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s @@ -0,0 +1,814 @@ +/* aes_asm.s + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* See Intel® Advanced Encryption Standard (AES) Instructions Set White Paper + * by Intel Mobility Group, Israel Development Center, Israel Shay Gueron + */ + + +/* +AES_CBC_encrypt (const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + const unsigned char *KS, + int nr) +*/ +.globl AES_CBC_encrypt +AES_CBC_encrypt: +# parameter 1: %rdi +# parameter 2: %rsi +# parameter 3: %rdx +# parameter 4: %rcx +# parameter 5: %r8 +# parameter 6: %r9d +movq %rcx, %r10 +shrq $4, %rcx +shlq $60, %r10 +je NO_PARTS +addq $1, %rcx +NO_PARTS: +subq $16, %rsi +movdqa (%rdx), %xmm1 +LOOP: +pxor (%rdi), %xmm1 +pxor (%r8), %xmm1 +addq $16,%rsi +addq $16,%rdi +cmpl $12, %r9d +aesenc 16(%r8),%xmm1 +aesenc 32(%r8),%xmm1 +aesenc 48(%r8),%xmm1 +aesenc 64(%r8),%xmm1 +aesenc 80(%r8),%xmm1 +aesenc 96(%r8),%xmm1 +aesenc 112(%r8),%xmm1 +aesenc 128(%r8),%xmm1 +aesenc 144(%r8),%xmm1 +movdqa 160(%r8),%xmm2 +jb LAST +cmpl $14, %r9d + +aesenc 160(%r8),%xmm1 +aesenc 176(%r8),%xmm1 +movdqa 192(%r8),%xmm2 +jb LAST +aesenc 192(%r8),%xmm1 +aesenc 208(%r8),%xmm1 +movdqa 224(%r8),%xmm2 +LAST: +decq %rcx +aesenclast %xmm2,%xmm1 +movdqu %xmm1,(%rsi) +jne LOOP +ret + + + + +/* +AES_CBC_decrypt (const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + const unsigned char *KS, + int nr) +*/ +.globl AES_CBC_decrypt +AES_CBC_decrypt: +# parameter 1: %rdi +# parameter 2: %rsi +# parameter 3: %rdx +# parameter 4: %rcx +# parameter 5: %r8 +# parameter 6: %r9d + +movq %rcx, %r10 +shrq $4, %rcx +shlq $60, %r10 +je DNO_PARTS_4 +addq $1, %rcx +DNO_PARTS_4: +movq %rcx, %r10 +shlq $62, %r10 +shrq $62, %r10 +shrq $2, %rcx +movdqu (%rdx),%xmm5 +je DREMAINDER_4 +subq $64, %rsi +DLOOP_4: +movdqu (%rdi), %xmm1 +movdqu 16(%rdi), %xmm2 +movdqu 32(%rdi), %xmm3 +movdqu 48(%rdi), %xmm4 +movdqa %xmm1, %xmm6 +movdqa %xmm2, %xmm7 +movdqa %xmm3, %xmm8 +movdqa %xmm4, %xmm15 +movdqa (%r8), %xmm9 +movdqa 16(%r8), %xmm10 +movdqa 32(%r8), %xmm11 +movdqa 48(%r8), %xmm12 +pxor %xmm9, %xmm1 +pxor %xmm9, %xmm2 +pxor %xmm9, %xmm3 + +pxor %xmm9, %xmm4 +aesdec %xmm10, %xmm1 +aesdec %xmm10, %xmm2 +aesdec %xmm10, %xmm3 +aesdec %xmm10, %xmm4 +aesdec %xmm11, %xmm1 +aesdec %xmm11, %xmm2 +aesdec %xmm11, %xmm3 +aesdec %xmm11, %xmm4 +aesdec %xmm12, %xmm1 +aesdec %xmm12, %xmm2 +aesdec %xmm12, %xmm3 +aesdec %xmm12, %xmm4 +movdqa 64(%r8), %xmm9 +movdqa 80(%r8), %xmm10 +movdqa 96(%r8), %xmm11 +movdqa 112(%r8), %xmm12 +aesdec %xmm9, %xmm1 +aesdec %xmm9, %xmm2 +aesdec %xmm9, %xmm3 +aesdec %xmm9, %xmm4 +aesdec %xmm10, %xmm1 +aesdec %xmm10, %xmm2 +aesdec %xmm10, %xmm3 +aesdec %xmm10, %xmm4 +aesdec %xmm11, %xmm1 +aesdec %xmm11, %xmm2 +aesdec %xmm11, %xmm3 +aesdec %xmm11, %xmm4 +aesdec %xmm12, %xmm1 +aesdec %xmm12, %xmm2 +aesdec %xmm12, %xmm3 +aesdec %xmm12, %xmm4 +movdqa 128(%r8), %xmm9 +movdqa 144(%r8), %xmm10 +movdqa 160(%r8), %xmm11 +cmpl $12, %r9d +aesdec %xmm9, %xmm1 +aesdec %xmm9, %xmm2 +aesdec %xmm9, %xmm3 +aesdec %xmm9, %xmm4 +aesdec %xmm10, %xmm1 +aesdec %xmm10, %xmm2 +aesdec %xmm10, %xmm3 +aesdec %xmm10, %xmm4 +jb DLAST_4 +movdqa 160(%r8), %xmm9 +movdqa 176(%r8), %xmm10 +movdqa 192(%r8), %xmm11 +cmpl $14, %r9d +aesdec %xmm9, %xmm1 +aesdec %xmm9, %xmm2 +aesdec %xmm9, %xmm3 +aesdec %xmm9, %xmm4 +aesdec %xmm10, %xmm1 +aesdec %xmm10, %xmm2 +aesdec %xmm10, %xmm3 +aesdec %xmm10, %xmm4 +jb DLAST_4 + +movdqa 192(%r8), %xmm9 +movdqa 208(%r8), %xmm10 +movdqa 224(%r8), %xmm11 +aesdec %xmm9, %xmm1 +aesdec %xmm9, %xmm2 +aesdec %xmm9, %xmm3 +aesdec %xmm9, %xmm4 +aesdec %xmm10, %xmm1 +aesdec %xmm10, %xmm2 +aesdec %xmm10, %xmm3 +aesdec %xmm10, %xmm4 +DLAST_4: +addq $64, %rdi +addq $64, %rsi +decq %rcx +aesdeclast %xmm11, %xmm1 +aesdeclast %xmm11, %xmm2 +aesdeclast %xmm11, %xmm3 +aesdeclast %xmm11, %xmm4 +pxor %xmm5 ,%xmm1 +pxor %xmm6 ,%xmm2 +pxor %xmm7 ,%xmm3 +pxor %xmm8 ,%xmm4 +movdqu %xmm1, (%rsi) +movdqu %xmm2, 16(%rsi) +movdqu %xmm3, 32(%rsi) +movdqu %xmm4, 48(%rsi) +movdqa %xmm15,%xmm5 +jne DLOOP_4 +addq $64, %rsi +DREMAINDER_4: +cmpq $0, %r10 +je DEND_4 +DLOOP_4_2: +movdqu (%rdi), %xmm1 +movdqa %xmm1 ,%xmm15 +addq $16, %rdi +pxor (%r8), %xmm1 +movdqu 160(%r8), %xmm2 +cmpl $12, %r9d +aesdec 16(%r8), %xmm1 +aesdec 32(%r8), %xmm1 +aesdec 48(%r8), %xmm1 +aesdec 64(%r8), %xmm1 +aesdec 80(%r8), %xmm1 +aesdec 96(%r8), %xmm1 +aesdec 112(%r8), %xmm1 +aesdec 128(%r8), %xmm1 +aesdec 144(%r8), %xmm1 +jb DLAST_4_2 +movdqu 192(%r8), %xmm2 +cmpl $14, %r9d +aesdec 160(%r8), %xmm1 +aesdec 176(%r8), %xmm1 +jb DLAST_4_2 +movdqu 224(%r8), %xmm2 +aesdec 192(%r8), %xmm1 +aesdec 208(%r8), %xmm1 +DLAST_4_2: +aesdeclast %xmm2, %xmm1 +pxor %xmm5, %xmm1 +movdqa %xmm15, %xmm5 +movdqu %xmm1, (%rsi) + +addq $16, %rsi +decq %r10 +jne DLOOP_4_2 +DEND_4: +ret + + +/* +AES_ECB_encrypt (const unsigned char *in, + unsigned char *out, + unsigned long length, + const unsigned char *KS, + int nr) +*/ +.globl AES_ECB_encrypt +AES_ECB_encrypt: +# parameter 1: %rdi +# parameter 2: %rsi +# parameter 3: %rdx +# parameter 4: %rcx +# parameter 5: %r8d + movq %rdx, %r10 + shrq $4, %rdx + shlq $60, %r10 + je EECB_NO_PARTS_4 + addq $1, %rdx +EECB_NO_PARTS_4: + movq %rdx, %r10 + shlq $62, %r10 + shrq $62, %r10 + shrq $2, %rdx + je EECB_REMAINDER_4 + subq $64, %rsi +EECB_LOOP_4: + movdqu (%rdi), %xmm1 + movdqu 16(%rdi), %xmm2 + movdqu 32(%rdi), %xmm3 + movdqu 48(%rdi), %xmm4 + movdqa (%rcx), %xmm9 + movdqa 16(%rcx), %xmm10 + movdqa 32(%rcx), %xmm11 + movdqa 48(%rcx), %xmm12 + pxor %xmm9, %xmm1 + pxor %xmm9, %xmm2 + pxor %xmm9, %xmm3 + pxor %xmm9, %xmm4 + aesenc %xmm10, %xmm1 + aesenc %xmm10, %xmm2 + aesenc %xmm10, %xmm3 + aesenc %xmm10, %xmm4 + aesenc %xmm11, %xmm1 + aesenc %xmm11, %xmm2 + aesenc %xmm11, %xmm3 + aesenc %xmm11, %xmm4 + aesenc %xmm12, %xmm1 + aesenc %xmm12, %xmm2 + aesenc %xmm12, %xmm3 + aesenc %xmm12, %xmm4 + movdqa 64(%rcx), %xmm9 + movdqa 80(%rcx), %xmm10 + movdqa 96(%rcx), %xmm11 + movdqa 112(%rcx), %xmm12 + aesenc %xmm9, %xmm1 + aesenc %xmm9, %xmm2 + aesenc %xmm9, %xmm3 + aesenc %xmm9, %xmm4 + aesenc %xmm10, %xmm1 + aesenc %xmm10, %xmm2 + aesenc %xmm10, %xmm3 + aesenc %xmm10, %xmm4 + aesenc %xmm11, %xmm1 + aesenc %xmm11, %xmm2 + aesenc %xmm11, %xmm3 + aesenc %xmm11, %xmm4 + aesenc %xmm12, %xmm1 + aesenc %xmm12, %xmm2 + aesenc %xmm12, %xmm3 + aesenc %xmm12, %xmm4 + movdqa 128(%rcx), %xmm9 + movdqa 144(%rcx), %xmm10 + movdqa 160(%rcx), %xmm11 + cmpl $12, %r8d + aesenc %xmm9, %xmm1 + aesenc %xmm9, %xmm2 + aesenc %xmm9, %xmm3 + aesenc %xmm9, %xmm4 + aesenc %xmm10, %xmm1 + aesenc %xmm10, %xmm2 + aesenc %xmm10, %xmm3 + aesenc %xmm10, %xmm4 + jb EECB_LAST_4 + movdqa 160(%rcx), %xmm9 + movdqa 176(%rcx), %xmm10 + movdqa 192(%rcx), %xmm11 + cmpl $14, %r8d + aesenc %xmm9, %xmm1 + aesenc %xmm9, %xmm2 + aesenc %xmm9, %xmm3 + aesenc %xmm9, %xmm4 + aesenc %xmm10, %xmm1 + aesenc %xmm10, %xmm2 + aesenc %xmm10, %xmm3 + aesenc %xmm10, %xmm4 + jb EECB_LAST_4 + movdqa 192(%rcx), %xmm9 + movdqa 208(%rcx), %xmm10 + movdqa 224(%rcx), %xmm11 + aesenc %xmm9, %xmm1 + aesenc %xmm9, %xmm2 + aesenc %xmm9, %xmm3 + aesenc %xmm9, %xmm4 + aesenc %xmm10, %xmm1 + aesenc %xmm10, %xmm2 + aesenc %xmm10, %xmm3 + aesenc %xmm10, %xmm4 +EECB_LAST_4: + addq $64, %rdi + addq $64, %rsi + decq %rdx + aesenclast %xmm11, %xmm1 + aesenclast %xmm11, %xmm2 + aesenclast %xmm11, %xmm3 + aesenclast %xmm11, %xmm4 + movdqu %xmm1, (%rsi) + movdqu %xmm2, 16(%rsi) + movdqu %xmm3, 32(%rsi) + movdqu %xmm4, 48(%rsi) + jne EECB_LOOP_4 + addq $64, %rsi +EECB_REMAINDER_4: + cmpq $0, %r10 + je EECB_END_4 +EECB_LOOP_4_2: + movdqu (%rdi), %xmm1 + addq $16, %rdi + pxor (%rcx), %xmm1 + movdqu 160(%rcx), %xmm2 + aesenc 16(%rcx), %xmm1 + aesenc 32(%rcx), %xmm1 + aesenc 48(%rcx), %xmm1 + aesenc 64(%rcx), %xmm1 + aesenc 80(%rcx), %xmm1 + aesenc 96(%rcx), %xmm1 + aesenc 112(%rcx), %xmm1 + aesenc 128(%rcx), %xmm1 + aesenc 144(%rcx), %xmm1 + cmpl $12, %r8d + jb EECB_LAST_4_2 + movdqu 192(%rcx), %xmm2 + aesenc 160(%rcx), %xmm1 + aesenc 176(%rcx), %xmm1 + cmpl $14, %r8d + jb EECB_LAST_4_2 + movdqu 224(%rcx), %xmm2 + aesenc 192(%rcx), %xmm1 + aesenc 208(%rcx), %xmm1 +EECB_LAST_4_2: + aesenclast %xmm2, %xmm1 + movdqu %xmm1, (%rsi) + addq $16, %rsi + decq %r10 + jne EECB_LOOP_4_2 +EECB_END_4: + ret + + +/* +AES_ECB_decrypt (const unsigned char *in, + unsigned char *out, + unsigned long length, + const unsigned char *KS, + int nr) +*/ +.globl AES_ECB_decrypt +AES_ECB_decrypt: +# parameter 1: %rdi +# parameter 2: %rsi +# parameter 3: %rdx +# parameter 4: %rcx +# parameter 5: %r8d + + movq %rdx, %r10 + shrq $4, %rdx + shlq $60, %r10 + je DECB_NO_PARTS_4 + addq $1, %rdx +DECB_NO_PARTS_4: + movq %rdx, %r10 + shlq $62, %r10 + shrq $62, %r10 + shrq $2, %rdx + je DECB_REMAINDER_4 + subq $64, %rsi +DECB_LOOP_4: + movdqu (%rdi), %xmm1 + movdqu 16(%rdi), %xmm2 + movdqu 32(%rdi), %xmm3 + movdqu 48(%rdi), %xmm4 + movdqa (%rcx), %xmm9 + movdqa 16(%rcx), %xmm10 + movdqa 32(%rcx), %xmm11 + movdqa 48(%rcx), %xmm12 + pxor %xmm9, %xmm1 + pxor %xmm9, %xmm2 + pxor %xmm9, %xmm3 + pxor %xmm9, %xmm4 + aesdec %xmm10, %xmm1 + aesdec %xmm10, %xmm2 + aesdec %xmm10, %xmm3 + aesdec %xmm10, %xmm4 + aesdec %xmm11, %xmm1 + aesdec %xmm11, %xmm2 + aesdec %xmm11, %xmm3 + aesdec %xmm11, %xmm4 + aesdec %xmm12, %xmm1 + aesdec %xmm12, %xmm2 + aesdec %xmm12, %xmm3 + aesdec %xmm12, %xmm4 + movdqa 64(%rcx), %xmm9 + movdqa 80(%rcx), %xmm10 + movdqa 96(%rcx), %xmm11 + movdqa 112(%rcx), %xmm12 + aesdec %xmm9, %xmm1 + aesdec %xmm9, %xmm2 + aesdec %xmm9, %xmm3 + aesdec %xmm9, %xmm4 + aesdec %xmm10, %xmm1 + aesdec %xmm10, %xmm2 + aesdec %xmm10, %xmm3 + aesdec %xmm10, %xmm4 + aesdec %xmm11, %xmm1 + aesdec %xmm11, %xmm2 + aesdec %xmm11, %xmm3 + aesdec %xmm11, %xmm4 + aesdec %xmm12, %xmm1 + aesdec %xmm12, %xmm2 + aesdec %xmm12, %xmm3 + aesdec %xmm12, %xmm4 + movdqa 128(%rcx), %xmm9 + movdqa 144(%rcx), %xmm10 + movdqa 160(%rcx), %xmm11 + cmpl $12, %r8d + aesdec %xmm9, %xmm1 + aesdec %xmm9, %xmm2 + aesdec %xmm9, %xmm3 + aesdec %xmm9, %xmm4 + aesdec %xmm10, %xmm1 + aesdec %xmm10, %xmm2 + aesdec %xmm10, %xmm3 + aesdec %xmm10, %xmm4 + jb DECB_LAST_4 + movdqa 160(%rcx), %xmm9 + movdqa 176(%rcx), %xmm10 + movdqa 192(%rcx), %xmm11 + cmpl $14, %r8d + aesdec %xmm9, %xmm1 + aesdec %xmm9, %xmm2 + aesdec %xmm9, %xmm3 + aesdec %xmm9, %xmm4 + aesdec %xmm10, %xmm1 + aesdec %xmm10, %xmm2 + aesdec %xmm10, %xmm3 + aesdec %xmm10, %xmm4 + jb DECB_LAST_4 + movdqa 192(%rcx), %xmm9 + movdqa 208(%rcx), %xmm10 + movdqa 224(%rcx), %xmm11 + aesdec %xmm9, %xmm1 + aesdec %xmm9, %xmm2 + aesdec %xmm9, %xmm3 + aesdec %xmm9, %xmm4 + aesdec %xmm10, %xmm1 + aesdec %xmm10, %xmm2 + aesdec %xmm10, %xmm3 + aesdec %xmm10, %xmm4 +DECB_LAST_4: + addq $64, %rdi + addq $64, %rsi + decq %rdx + aesdeclast %xmm11, %xmm1 + aesdeclast %xmm11, %xmm2 + aesdeclast %xmm11, %xmm3 + aesdeclast %xmm11, %xmm4 + movdqu %xmm1, (%rsi) + movdqu %xmm2, 16(%rsi) + movdqu %xmm3, 32(%rsi) + movdqu %xmm4, 48(%rsi) + jne DECB_LOOP_4 + addq $64, %rsi +DECB_REMAINDER_4: + cmpq $0, %r10 + je DECB_END_4 +DECB_LOOP_4_2: + movdqu (%rdi), %xmm1 + addq $16, %rdi + pxor (%rcx), %xmm1 + movdqu 160(%rcx), %xmm2 + cmpl $12, %r8d + aesdec 16(%rcx), %xmm1 + aesdec 32(%rcx), %xmm1 + aesdec 48(%rcx), %xmm1 + aesdec 64(%rcx), %xmm1 + aesdec 80(%rcx), %xmm1 + aesdec 96(%rcx), %xmm1 + aesdec 112(%rcx), %xmm1 + aesdec 128(%rcx), %xmm1 + aesdec 144(%rcx), %xmm1 + jb DECB_LAST_4_2 + cmpl $14, %r8d + movdqu 192(%rcx), %xmm2 + aesdec 160(%rcx), %xmm1 + aesdec 176(%rcx), %xmm1 + jb DECB_LAST_4_2 + movdqu 224(%rcx), %xmm2 + aesdec 192(%rcx), %xmm1 + aesdec 208(%rcx), %xmm1 +DECB_LAST_4_2: + aesdeclast %xmm2, %xmm1 + movdqu %xmm1, (%rsi) + addq $16, %rsi + decq %r10 + jne DECB_LOOP_4_2 +DECB_END_4: + ret + + + + +/* +void AES_128_Key_Expansion(const unsigned char* userkey, + unsigned char* key_schedule); +*/ +.align 16,0x90 +.globl AES_128_Key_Expansion +AES_128_Key_Expansion: +# parameter 1: %rdi +# parameter 2: %rsi +movl $10, 240(%rsi) + +movdqu (%rdi), %xmm1 +movdqa %xmm1, (%rsi) + + +ASSISTS: +aeskeygenassist $1, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 16(%rsi) +aeskeygenassist $2, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 32(%rsi) +aeskeygenassist $4, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 48(%rsi) +aeskeygenassist $8, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 64(%rsi) +aeskeygenassist $16, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 80(%rsi) +aeskeygenassist $32, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 96(%rsi) +aeskeygenassist $64, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 112(%rsi) +aeskeygenassist $0x80, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 128(%rsi) +aeskeygenassist $0x1b, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 144(%rsi) +aeskeygenassist $0x36, %xmm1, %xmm2 +call PREPARE_ROUNDKEY_128 +movdqa %xmm1, 160(%rsi) +ret + +PREPARE_ROUNDKEY_128: +pshufd $255, %xmm2, %xmm2 +movdqa %xmm1, %xmm3 +pslldq $4, %xmm3 +pxor %xmm3, %xmm1 +pslldq $4, %xmm3 +pxor %xmm3, %xmm1 +pslldq $4, %xmm3 +pxor %xmm3, %xmm1 +pxor %xmm2, %xmm1 +ret + + +/* +void AES_192_Key_Expansion (const unsigned char *userkey, + unsigned char *key) +*/ +.globl AES_192_Key_Expansion +AES_192_Key_Expansion: +# parameter 1: %rdi +# parameter 2: %rsi + +movdqu (%rdi), %xmm1 +movdqu 16(%rdi), %xmm3 +movdqa %xmm1, (%rsi) +movdqa %xmm3, %xmm5 + +aeskeygenassist $0x1, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +shufpd $0, %xmm1, %xmm5 +movdqa %xmm5, 16(%rsi) +movdqa %xmm1, %xmm6 +shufpd $1, %xmm3, %xmm6 +movdqa %xmm6, 32(%rsi) + +aeskeygenassist $0x2, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +movdqa %xmm1, 48(%rsi) +movdqa %xmm3, %xmm5 + +aeskeygenassist $0x4, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +shufpd $0, %xmm1, %xmm5 +movdqa %xmm5, 64(%rsi) +movdqa %xmm1, %xmm6 +shufpd $1, %xmm3, %xmm6 +movdqa %xmm6, 80(%rsi) + +aeskeygenassist $0x8, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +movdqa %xmm1, 96(%rsi) +movdqa %xmm3, %xmm5 + +aeskeygenassist $0x10, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +shufpd $0, %xmm1, %xmm5 +movdqa %xmm5, 112(%rsi) +movdqa %xmm1, %xmm6 +shufpd $1, %xmm3, %xmm6 +movdqa %xmm6, 128(%rsi) + +aeskeygenassist $0x20, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +movdqa %xmm1, 144(%rsi) +movdqa %xmm3, %xmm5 + +aeskeygenassist $0x40, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +shufpd $0, %xmm1, %xmm5 +movdqa %xmm5, 160(%rsi) +movdqa %xmm1, %xmm6 +shufpd $1, %xmm3, %xmm6 +movdqa %xmm6, 176(%rsi) + +aeskeygenassist $0x80, %xmm3, %xmm2 +call PREPARE_ROUNDKEY_192 +movdqa %xmm1, 192(%rsi) +movdqa %xmm3, 208(%rsi) +ret + +PREPARE_ROUNDKEY_192: +pshufd $0x55, %xmm2, %xmm2 +movdqu %xmm1, %xmm4 +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 + +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 +pxor %xmm2, %xmm1 +pshufd $0xff, %xmm1, %xmm2 +movdqu %xmm3, %xmm4 +pslldq $4, %xmm4 +pxor %xmm4, %xmm3 +pxor %xmm2, %xmm3 +ret + + +/* +void AES_256_Key_Expansion (const unsigned char *userkey, + unsigned char *key) +*/ +.globl AES_256_Key_Expansion +AES_256_Key_Expansion: +# parameter 1: %rdi +# parameter 2: %rsi + +movdqu (%rdi), %xmm1 +movdqu 16(%rdi), %xmm3 +movdqa %xmm1, (%rsi) +movdqa %xmm3, 16(%rsi) + +aeskeygenassist $0x1, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 32(%rsi) +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 48(%rsi) +aeskeygenassist $0x2, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 64(%rsi) +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 80(%rsi) +aeskeygenassist $0x4, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 96(%rsi) +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 112(%rsi) +aeskeygenassist $0x8, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 128(%rsi) +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 144(%rsi) +aeskeygenassist $0x10, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 160(%rsi) +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 176(%rsi) +aeskeygenassist $0x20, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 192(%rsi) + +aeskeygenassist $0x0, %xmm1, %xmm2 +call MAKE_RK256_b +movdqa %xmm3, 208(%rsi) +aeskeygenassist $0x40, %xmm3, %xmm2 +call MAKE_RK256_a +movdqa %xmm1, 224(%rsi) + +ret + +MAKE_RK256_a: +pshufd $0xff, %xmm2, %xmm2 +movdqa %xmm1, %xmm4 +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 +pslldq $4, %xmm4 +pxor %xmm4, %xmm1 +pxor %xmm2, %xmm1 +ret + +MAKE_RK256_b: +pshufd $0xaa, %xmm2, %xmm2 +movdqa %xmm3, %xmm4 +pslldq $4, %xmm4 +pxor %xmm4, %xmm3 +pslldq $4, %xmm4 +pxor %xmm4, %xmm3 +pslldq $4, %xmm4 +pxor %xmm4, %xmm3 +pxor %xmm2, %xmm3 +ret + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c b/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c new file mode 100644 index 00000000..01cc7a19 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c @@ -0,0 +1,179 @@ +/* arc4.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_RC4 + +#include + + +#ifdef HAVE_CAVIUM + static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length); + static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in, + word32 length); +#endif + + +void Arc4SetKey(Arc4* arc4, const byte* key, word32 length) +{ + word32 i; + word32 keyIndex = 0, stateIndex = 0; + +#ifdef HAVE_CAVIUM + if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC) + return Arc4CaviumSetKey(arc4, key, length); +#endif + + arc4->x = 1; + arc4->y = 0; + + for (i = 0; i < ARC4_STATE_SIZE; i++) + arc4->state[i] = (byte)i; + + for (i = 0; i < ARC4_STATE_SIZE; i++) { + word32 a = arc4->state[i]; + stateIndex += key[keyIndex] + a; + stateIndex &= 0xFF; + arc4->state[i] = arc4->state[stateIndex]; + arc4->state[stateIndex] = (byte)a; + + if (++keyIndex >= length) + keyIndex = 0; + } +} + + +static INLINE byte MakeByte(word32* x, word32* y, byte* s) +{ + word32 a = s[*x], b; + *y = (*y+a) & 0xff; + + b = s[*y]; + s[*x] = (byte)b; + s[*y] = (byte)a; + *x = (*x+1) & 0xff; + + return s[(a+b) & 0xff]; +} + + +void Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length) +{ + word32 x; + word32 y; + +#ifdef HAVE_CAVIUM + if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC) + return Arc4CaviumProcess(arc4, out, in, length); +#endif + + x = arc4->x; + y = arc4->y; + + while(length--) + *out++ = *in++ ^ MakeByte(&x, &y, arc4->state); + + arc4->x = (byte)x; + arc4->y = (byte)y; +} + + +#ifdef HAVE_CAVIUM + +#include +#include "cavium_common.h" + +/* Initiliaze Arc4 for use with Nitrox device */ +int Arc4InitCavium(Arc4* arc4, int devId) +{ + if (arc4 == NULL) + return -1; + + if (CspAllocContext(CONTEXT_SSL, &arc4->contextHandle, devId) != 0) + return -1; + + arc4->devId = devId; + arc4->magic = CYASSL_ARC4_CAVIUM_MAGIC; + + return 0; +} + + +/* Free Arc4 from use with Nitrox device */ +void Arc4FreeCavium(Arc4* arc4) +{ + if (arc4 == NULL) + return; + + if (arc4->magic != CYASSL_ARC4_CAVIUM_MAGIC) + return; + + CspFreeContext(CONTEXT_SSL, arc4->contextHandle, arc4->devId); + arc4->magic = 0; +} + + +static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length) +{ + word32 requestId; + + if (CspInitializeRc4(CAVIUM_BLOCKING, arc4->contextHandle, length, + (byte*)key, &requestId, arc4->devId) != 0) { + CYASSL_MSG("Bad Cavium Arc4 Init"); + } +} + + +static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in, + word32 length) +{ + word offset = 0; + word32 requestId; + + while (length > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE, + slen, (byte*)in + offset, out + offset, &requestId, + arc4->devId) != 0) { + CYASSL_MSG("Bad Cavium Arc4 Encrypt"); + } + length -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + } + if (length) { + word16 slen = (word16)length; + if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE, + slen, (byte*)in + offset, out + offset, &requestId, + arc4->devId) != 0) { + CYASSL_MSG("Bad Cavium Arc4 Encrypt"); + } + } +} + +#endif /* HAVE_CAVIUM */ + +#endif /* NO_ARC4 */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/asm.c b/project1/cyassl-3.0.0/ctaocrypt/src/asm.c new file mode 100644 index 00000000..2924cddc --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/asm.c @@ -0,0 +1,1406 @@ +/* asm.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +/* + * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, + * http://math.libtomcrypt.com + */ + + +/******************************************************************/ +/* fp_montgomery_reduce.c asm or generic */ +#if defined(TFM_X86) && !defined(TFM_SSE2) +/* x86-32 code */ + +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ +__asm__( \ + "movl %5,%%eax \n\t" \ + "mull %4 \n\t" \ + "addl %1,%%eax \n\t" \ + "adcl $0,%%edx \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl $0,%%edx \n\t" \ + "movl %%edx,%1 \n\t" \ +:"=g"(_c[LO]), "=r"(cy) \ +:"0"(_c[LO]), "1"(cy), "g"(mu), "g"(*tmpm++) \ +: "%eax", "%edx", "cc") + +#define PROPCARRY \ +__asm__( \ + "addl %1,%0 \n\t" \ + "setb %%al \n\t" \ + "movzbl %%al,%1 \n\t" \ +:"=g"(_c[LO]), "=r"(cy) \ +:"0"(_c[LO]), "1"(cy) \ +: "%eax", "cc") + +/******************************************************************/ +#elif defined(TFM_X86_64) +/* x86-64 code */ + +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ +__asm__( \ + "movq %5,%%rax \n\t" \ + "mulq %4 \n\t" \ + "addq %1,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rdx,%1 \n\t" \ +:"=g"(_c[LO]), "=r"(cy) \ +:"0"(_c[LO]), "1"(cy), "r"(mu), "r"(*tmpm++) \ +: "%rax", "%rdx", "cc") + +#define INNERMUL8 \ + __asm__( \ + "movq 0(%5),%%rax \n\t" \ + "movq 0(%2),%%r10 \n\t" \ + "movq 0x8(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x8(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x10(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x10(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x8(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x18(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x18(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x10(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x20(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x20(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x18(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x28(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x28(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x20(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x30(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x30(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x28(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "movq 0x38(%5),%%r11 \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq 0x38(%2),%%r10 \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x30(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ + "movq %%r11,%%rax \n\t" \ + "mulq %4 \n\t" \ + "addq %%r10,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "addq %3,%%rax \n\t" \ + "adcq $0,%%rdx \n\t" \ + "movq %%rax,0x38(%0) \n\t" \ + "movq %%rdx,%1 \n\t" \ + \ +:"=r"(_c), "=r"(cy) \ +: "0"(_c), "1"(cy), "g"(mu), "r"(tmpm)\ +: "%rax", "%rdx", "%r10", "%r11", "cc") + + +#define PROPCARRY \ +__asm__( \ + "addq %1,%0 \n\t" \ + "setb %%al \n\t" \ + "movzbq %%al,%1 \n\t" \ +:"=g"(_c[LO]), "=r"(cy) \ +:"0"(_c[LO]), "1"(cy) \ +: "%rax", "cc") + +/******************************************************************/ +#elif defined(TFM_SSE2) +/* SSE2 code (assumes 32-bit fp_digits) */ +/* XMM register assignments: + * xmm0 *tmpm++, then Mu * (*tmpm++) + * xmm1 c[x], then Mu + * xmm2 mp + * xmm3 cy + * xmm4 _c[LO] + */ + +#define MONT_START \ + __asm__("movd %0,%%mm2"::"g"(mp)) + +#define MONT_FINI \ + __asm__("emms") + +#define LOOP_START \ +__asm__( \ +"movd %0,%%mm1 \n\t" \ +"pxor %%mm3,%%mm3 \n\t" \ +"pmuludq %%mm2,%%mm1 \n\t" \ +:: "g"(c[x])) + +/* pmuludq on mmx registers does a 32x32->64 multiply. */ +#define INNERMUL \ +__asm__( \ + "movd %1,%%mm4 \n\t" \ + "movd %2,%%mm0 \n\t" \ + "paddq %%mm4,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm0 \n\t" \ + "paddq %%mm0,%%mm3 \n\t" \ + "movd %%mm3,%0 \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +:"=g"(_c[LO]) : "0"(_c[LO]), "g"(*tmpm++) ); + +#define INNERMUL8 \ +__asm__( \ + "movd 0(%1),%%mm4 \n\t" \ + "movd 0(%2),%%mm0 \n\t" \ + "paddq %%mm4,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm0 \n\t" \ + "movd 4(%2),%%mm5 \n\t" \ + "paddq %%mm0,%%mm3 \n\t" \ + "movd 4(%1),%%mm6 \n\t" \ + "movd %%mm3,0(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm6,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm5 \n\t" \ + "movd 8(%2),%%mm6 \n\t" \ + "paddq %%mm5,%%mm3 \n\t" \ + "movd 8(%1),%%mm7 \n\t" \ + "movd %%mm3,4(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm7,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm6 \n\t" \ + "movd 12(%2),%%mm7 \n\t" \ + "paddq %%mm6,%%mm3 \n\t" \ + "movd 12(%1),%%mm5 \n\t" \ + "movd %%mm3,8(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm5,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm7 \n\t" \ + "movd 16(%2),%%mm5 \n\t" \ + "paddq %%mm7,%%mm3 \n\t" \ + "movd 16(%1),%%mm6 \n\t" \ + "movd %%mm3,12(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm6,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm5 \n\t" \ + "movd 20(%2),%%mm6 \n\t" \ + "paddq %%mm5,%%mm3 \n\t" \ + "movd 20(%1),%%mm7 \n\t" \ + "movd %%mm3,16(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm7,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm6 \n\t" \ + "movd 24(%2),%%mm7 \n\t" \ + "paddq %%mm6,%%mm3 \n\t" \ + "movd 24(%1),%%mm5 \n\t" \ + "movd %%mm3,20(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm5,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm7 \n\t" \ + "movd 28(%2),%%mm5 \n\t" \ + "paddq %%mm7,%%mm3 \n\t" \ + "movd 28(%1),%%mm6 \n\t" \ + "movd %%mm3,24(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +\ + "paddq %%mm6,%%mm3 \n\t" \ + "pmuludq %%mm1,%%mm5 \n\t" \ + "paddq %%mm5,%%mm3 \n\t" \ + "movd %%mm3,28(%0) \n\t" \ + "psrlq $32, %%mm3 \n\t" \ +:"=r"(_c) : "0"(_c), "r"(tmpm) ); + +/* TAO switched tmpm from "g" to "r" after gcc tried to index the indexed stack + pointer */ + +#define LOOP_END \ +__asm__( "movd %%mm3,%0 \n" :"=r"(cy)) + +#define PROPCARRY \ +__asm__( \ + "addl %1,%0 \n\t" \ + "setb %%al \n\t" \ + "movzbl %%al,%1 \n\t" \ +:"=g"(_c[LO]), "=r"(cy) \ +:"0"(_c[LO]), "1"(cy) \ +: "%eax", "cc") + +/******************************************************************/ +#elif defined(TFM_ARM) + /* ARMv4 code */ + +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + + +#ifdef __thumb__ + +#define INNERMUL \ +__asm__( \ + " LDR r0,%1 \n\t" \ + " ADDS r0,r0,%0 \n\t" \ + " ITE CS \n\t" \ + " MOVCS %0,#1 \n\t" \ + " MOVCC %0,#0 \n\t" \ + " UMLAL r0,%0,%3,%4 \n\t" \ + " STR r0,%1 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0]):"r0","cc"); + +#define PROPCARRY \ +__asm__( \ + " LDR r0,%1 \n\t" \ + " ADDS r0,r0,%0 \n\t" \ + " STR r0,%1 \n\t" \ + " ITE CS \n\t" \ + " MOVCS %0,#1 \n\t" \ + " MOVCC %0,#0 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"m"(_c[0]):"r0","cc"); + + +/* TAO thumb mode uses ite (if then else) to detect carry directly + * fixed unmatched constraint warning by changing 1 to m */ + +#else /* __thumb__ */ + +#define INNERMUL \ +__asm__( \ + " LDR r0,%1 \n\t" \ + " ADDS r0,r0,%0 \n\t" \ + " MOVCS %0,#1 \n\t" \ + " MOVCC %0,#0 \n\t" \ + " UMLAL r0,%0,%3,%4 \n\t" \ + " STR r0,%1 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(*tmpm++),"1"(_c[0]):"r0","cc"); + +#define PROPCARRY \ +__asm__( \ + " LDR r0,%1 \n\t" \ + " ADDS r0,r0,%0 \n\t" \ + " STR r0,%1 \n\t" \ + " MOVCS %0,#1 \n\t" \ + " MOVCC %0,#0 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"r0","cc"); + +#endif /* __thumb__ */ + +#elif defined(TFM_PPC32) + +/* PPC32 */ +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ +__asm__( \ + " mullw 16,%3,%4 \n\t" \ + " mulhwu 17,%3,%4 \n\t" \ + " addc 16,16,%0 \n\t" \ + " addze 17,17 \n\t" \ + " lwz 18,%1 \n\t" \ + " addc 16,16,18 \n\t" \ + " addze %0,17 \n\t" \ + " stw 16,%1 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(tmpm[0]),"1"(_c[0]):"16", "17", "18","cc"); ++tmpm; + +#define PROPCARRY \ +__asm__( \ + " lwz 16,%1 \n\t" \ + " addc 16,16,%0 \n\t" \ + " stw 16,%1 \n\t" \ + " xor %0,%0,%0 \n\t" \ + " addze %0,%0 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"16","cc"); + +#elif defined(TFM_PPC64) + +/* PPC64 */ +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ +__asm__( \ + " mulld 16,%3,%4 \n\t" \ + " mulhdu 17,%3,%4 \n\t" \ + " addc 16,16,%0 \n\t" \ + " addze 17,17 \n\t" \ + " ldx 18,0,%1 \n\t" \ + " addc 16,16,18 \n\t" \ + " addze %0,17 \n\t" \ + " sdx 16,0,%1 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(tmpm[0]),"1"(_c[0]):"16", "17", "18","cc"); ++tmpm; + +#define PROPCARRY \ +__asm__( \ + " ldx 16,0,%1 \n\t" \ + " addc 16,16,%0 \n\t" \ + " sdx 16,0,%1 \n\t" \ + " xor %0,%0,%0 \n\t" \ + " addze %0,%0 \n\t" \ +:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"16","cc"); + +/******************************************************************/ + +#elif defined(TFM_AVR32) + +/* AVR32 */ +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ +__asm__( \ + " ld.w r2,%1 \n\t" \ + " add r2,%0 \n\t" \ + " eor r3,r3 \n\t" \ + " acr r3 \n\t" \ + " macu.d r2,%3,%4 \n\t" \ + " st.w %1,r2 \n\t" \ + " mov %0,r3 \n\t" \ +:"=r"(cy),"=r"(_c):"0"(cy),"r"(mu),"r"(*tmpm++),"1"(_c):"r2","r3"); + +#define PROPCARRY \ +__asm__( \ + " ld.w r2,%1 \n\t" \ + " add r2,%0 \n\t" \ + " st.w %1,r2 \n\t" \ + " eor %0,%0 \n\t" \ + " acr %0 \n\t" \ +:"=r"(cy),"=r"(&_c[0]):"0"(cy),"1"(&_c[0]):"r2","cc"); + +#else + +/* ISO C code */ +#define MONT_START +#define MONT_FINI +#define LOOP_END +#define LOOP_START \ + mu = c[x] * mp + +#define INNERMUL \ + do { fp_word t; \ + t = ((fp_word)_c[0] + (fp_word)cy) + \ + (((fp_word)mu) * ((fp_word)*tmpm++)); \ + _c[0] = (fp_digit)t; \ + cy = (fp_digit)(t >> DIGIT_BIT); \ + } while (0) + +#define PROPCARRY \ + do { fp_digit t = _c[0] += cy; cy = (t < cy); } while (0) + +#endif +/******************************************************************/ + + +#define LO 0 +/* end fp_montogomery_reduce.c asm */ + + +/* start fp_sqr_comba.c asm */ +#if defined(TFM_X86) + +/* x86-32 optimized */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +#define SQRADD(i, j) \ +__asm__( \ + "movl %6,%%eax \n\t" \ + "mull %%eax \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc"); + +#define SQRADD2(i, j) \ +__asm__( \ + "movl %6,%%eax \n\t" \ + "mull %7 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ + "movl %3,%%eax \n\t" \ + "mull %4 \n\t" \ + "movl %%eax,%0 \n\t" \ + "movl %%edx,%1 \n\t" \ + "xorl %2,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc"); + +/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ + +#define SQRADDAC(i, j) \ +__asm__( \ + "movl %6,%%eax \n\t" \ + "mull %7 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc"); + +#define SQRADDDB \ +__asm__( \ + "addl %6,%0 \n\t" \ + "adcl %7,%1 \n\t" \ + "adcl %8,%2 \n\t" \ + "addl %6,%0 \n\t" \ + "adcl %7,%1 \n\t" \ + "adcl %8,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); + +#elif defined(TFM_X86_64) +/* x86-64 optimized */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +#define SQRADD(i, j) \ +__asm__( \ + "movq %6,%%rax \n\t" \ + "mulq %%rax \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq %%rdx,%1 \n\t" \ + "adcq $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i) :"%rax","%rdx","cc"); + +#define SQRADD2(i, j) \ +__asm__( \ + "movq %6,%%rax \n\t" \ + "mulq %7 \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq %%rdx,%1 \n\t" \ + "adcq $0,%2 \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq %%rdx,%1 \n\t" \ + "adcq $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ + "movq %3,%%rax \n\t" \ + "mulq %4 \n\t" \ + "movq %%rax,%0 \n\t" \ + "movq %%rdx,%1 \n\t" \ + "xorq %2,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%rax","%rdx","cc"); + +/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ + +#define SQRADDAC(i, j) \ +__asm__( \ + "movq %6,%%rax \n\t" \ + "mulq %7 \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq %%rdx,%1 \n\t" \ + "adcq $0,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%rax","%rdx","cc"); + +#define SQRADDDB \ +__asm__( \ + "addq %6,%0 \n\t" \ + "adcq %7,%1 \n\t" \ + "adcq %8,%2 \n\t" \ + "addq %6,%0 \n\t" \ + "adcq %7,%1 \n\t" \ + "adcq %8,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); + +#elif defined(TFM_SSE2) + +/* SSE2 Optimized */ +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI \ + __asm__("emms"); + +#define SQRADD(i, j) \ +__asm__( \ + "movd %6,%%mm0 \n\t" \ + "pmuludq %%mm0,%%mm0\n\t" \ + "movd %%mm0,%%eax \n\t" \ + "psrlq $32,%%mm0 \n\t" \ + "addl %%eax,%0 \n\t" \ + "movd %%mm0,%%eax \n\t" \ + "adcl %%eax,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","cc"); + +#define SQRADD2(i, j) \ +__asm__( \ + "movd %6,%%mm0 \n\t" \ + "movd %7,%%mm1 \n\t" \ + "pmuludq %%mm1,%%mm0\n\t" \ + "movd %%mm0,%%eax \n\t" \ + "psrlq $32,%%mm0 \n\t" \ + "movd %%mm0,%%edx \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ + "movd %3,%%mm0 \n\t" \ + "movd %4,%%mm1 \n\t" \ + "pmuludq %%mm1,%%mm0\n\t" \ + "movd %%mm0,%0 \n\t" \ + "psrlq $32,%%mm0 \n\t" \ + "movd %%mm0,%1 \n\t" \ + "xorl %2,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "m"(i), "m"(j)); + +/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ + +#define SQRADDAC(i, j) \ +__asm__( \ + "movd %6,%%mm0 \n\t" \ + "movd %7,%%mm1 \n\t" \ + "pmuludq %%mm1,%%mm0\n\t" \ + "movd %%mm0,%%eax \n\t" \ + "psrlq $32,%%mm0 \n\t" \ + "movd %%mm0,%%edx \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "m"(i), "m"(j) :"%eax","%edx","cc"); + +#define SQRADDDB \ +__asm__( \ + "addl %6,%0 \n\t" \ + "adcl %7,%1 \n\t" \ + "adcl %8,%2 \n\t" \ + "addl %6,%0 \n\t" \ + "adcl %7,%1 \n\t" \ + "adcl %8,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); + +#elif defined(TFM_ARM) + +/* ARM code */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +/* multiplies point i and j, updates carry "c1" and digit c2 */ +#define SQRADD(i, j) \ +__asm__( \ +" UMULL r0,r1,%6,%6 \n\t" \ +" ADDS %0,%0,r0 \n\t" \ +" ADCS %1,%1,r1 \n\t" \ +" ADC %2,%2,#0 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i) : "r0", "r1", "cc"); + +/* for squaring some of the terms are doubled... */ +#define SQRADD2(i, j) \ +__asm__( \ +" UMULL r0,r1,%6,%7 \n\t" \ +" ADDS %0,%0,r0 \n\t" \ +" ADCS %1,%1,r1 \n\t" \ +" ADC %2,%2,#0 \n\t" \ +" ADDS %0,%0,r0 \n\t" \ +" ADCS %1,%1,r1 \n\t" \ +" ADC %2,%2,#0 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ +" UMULL %0,%1,%3,%4 \n\t" \ +" SUB %2,%2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "r"(i), "r"(j) : "cc"); + +/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ + +#define SQRADDAC(i, j) \ +__asm__( \ +" UMULL r0,r1,%6,%7 \n\t" \ +" ADDS %0,%0,r0 \n\t" \ +" ADCS %1,%1,r1 \n\t" \ +" ADC %2,%2,#0 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "r0", "r1", "cc"); + +#define SQRADDDB \ +__asm__( \ +" ADDS %0,%0,%3 \n\t" \ +" ADCS %1,%1,%4 \n\t" \ +" ADC %2,%2,%5 \n\t" \ +" ADDS %0,%0,%3 \n\t" \ +" ADCS %1,%1,%4 \n\t" \ +" ADC %2,%2,%5 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); + +#elif defined(TFM_PPC32) + +/* PPC32 */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +/* multiplies point i and j, updates carry "c1" and digit c2 */ +#define SQRADD(i, j) \ +__asm__( \ + " mullw 16,%6,%6 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhwu 16,%6,%6 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"16","cc"); + +/* for squaring some of the terms are doubled... */ +#define SQRADD2(i, j) \ +__asm__( \ + " mullw 16,%6,%7 \n\t" \ + " mulhwu 17,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " adde %1,%1,17 \n\t" \ + " addze %2,%2 \n\t" \ + " addc %0,%0,16 \n\t" \ + " adde %1,%1,17 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16", "17","cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ + " mullw %0,%6,%7 \n\t" \ + " mulhwu %1,%6,%7 \n\t" \ + " xor %2,%2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "cc"); + +#define SQRADDAC(i, j) \ +__asm__( \ + " mullw 16,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhwu 16,%6,%7 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"16", "cc"); + +#define SQRADDDB \ +__asm__( \ + " addc %0,%0,%3 \n\t" \ + " adde %1,%1,%4 \n\t" \ + " adde %2,%2,%5 \n\t" \ + " addc %0,%0,%3 \n\t" \ + " adde %1,%1,%4 \n\t" \ + " adde %2,%2,%5 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); + +#elif defined(TFM_PPC64) +/* PPC64 */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +/* multiplies point i and j, updates carry "c1" and digit c2 */ +#define SQRADD(i, j) \ +__asm__( \ + " mulld 16,%6,%6 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhdu 16,%6,%6 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"16","cc"); + +/* for squaring some of the terms are doubled... */ +#define SQRADD2(i, j) \ +__asm__( \ + " mulld 16,%6,%7 \n\t" \ + " mulhdu 17,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " adde %1,%1,17 \n\t" \ + " addze %2,%2 \n\t" \ + " addc %0,%0,16 \n\t" \ + " adde %1,%1,17 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16", "17","cc"); + +#define SQRADDSC(i, j) \ +__asm__( \ + " mulld %0,%6,%7 \n\t" \ + " mulhdu %1,%6,%7 \n\t" \ + " xor %2,%2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "cc"); + +#define SQRADDAC(i, j) \ +__asm__( \ + " mulld 16,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhdu 16,%6,%7 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"16", "cc"); + +#define SQRADDDB \ +__asm__( \ + " addc %0,%0,%3 \n\t" \ + " adde %1,%1,%4 \n\t" \ + " adde %2,%2,%5 \n\t" \ + " addc %0,%0,%3 \n\t" \ + " adde %1,%1,%4 \n\t" \ + " adde %2,%2,%5 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); + + +#elif defined(TFM_AVR32) + +/* AVR32 */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +/* multiplies point i and j, updates carry "c1" and digit c2 */ +#define SQRADD(i, j) \ +__asm__( \ + " mulu.d r2,%6,%6 \n\t" \ + " add %0,%0,r2 \n\t" \ + " adc %1,%1,r3 \n\t" \ + " acr %2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"r2","r3"); + +/* for squaring some of the terms are doubled... */ +#define SQRADD2(i, j) \ +__asm__( \ + " mulu.d r2,%6,%7 \n\t" \ + " add %0,%0,r2 \n\t" \ + " adc %1,%1,r3 \n\t" \ + " acr %2, \n\t" \ + " add %0,%0,r2 \n\t" \ + " adc %1,%1,r3 \n\t" \ + " acr %2, \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"r2", "r3"); + +#define SQRADDSC(i, j) \ +__asm__( \ + " mulu.d r2,%6,%7 \n\t" \ + " mov %0,r2 \n\t" \ + " mov %1,r3 \n\t" \ + " eor %2,%2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "r2", "r3"); + +#define SQRADDAC(i, j) \ +__asm__( \ + " mulu.d r2,%6,%7 \n\t" \ + " add %0,%0,r2 \n\t" \ + " adc %1,%1,r3 \n\t" \ + " acr %2 \n\t" \ +:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"r2", "r3"); + +#define SQRADDDB \ +__asm__( \ + " add %0,%0,%3 \n\t" \ + " adc %1,%1,%4 \n\t" \ + " adc %2,%2,%5 \n\t" \ + " add %0,%0,%3 \n\t" \ + " adc %1,%1,%4 \n\t" \ + " adc %2,%2,%5 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); + + +#else + +#define TFM_ISO + +/* ISO C portable code */ + +#define COMBA_START + +#define CLEAR_CARRY \ + c0 = c1 = c2 = 0; + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define CARRY_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_FINI + +/* multiplies point i and j, updates carry "c1" and digit c2 */ +#define SQRADD(i, j) \ + do { fp_word t; \ + t = c0 + ((fp_word)i) * ((fp_word)j); c0 = (fp_digit)t; \ + t = c1 + (t >> DIGIT_BIT); c1 = (fp_digit)t; \ + c2 +=(fp_digit) (t >> DIGIT_BIT); \ + } while (0); + + +/* for squaring some of the terms are doubled... */ +#define SQRADD2(i, j) \ + do { fp_word t; \ + t = ((fp_word)i) * ((fp_word)j); \ + tt = (fp_word)c0 + t; c0 = (fp_digit)tt; \ + tt = (fp_word)c1 + (tt >> DIGIT_BIT); c1 = (fp_digit)tt; \ + c2 +=(fp_digit)( tt >> DIGIT_BIT); \ + tt = (fp_word)c0 + t; c0 = (fp_digit)tt; \ + tt = (fp_word)c1 + (tt >> DIGIT_BIT); c1 = (fp_digit)tt; \ + c2 +=(fp_digit) (tt >> DIGIT_BIT); \ + } while (0); + +#define SQRADDSC(i, j) \ + do { fp_word t; \ + t = ((fp_word)i) * ((fp_word)j); \ + sc0 = (fp_digit)t; sc1 = (t >> DIGIT_BIT); sc2 = 0; \ + } while (0); + +#define SQRADDAC(i, j) \ + do { fp_word t; \ + t = sc0 + ((fp_word)i) * ((fp_word)j); sc0 = (fp_digit)t; \ + t = sc1 + (t >> DIGIT_BIT); sc1 = (fp_digit)t; \ + sc2 += (fp_digit)(t >> DIGIT_BIT); \ + } while (0); + +#define SQRADDDB \ + do { fp_word t; \ + t = ((fp_word)sc0) + ((fp_word)sc0) + c0; c0 = (fp_digit)t; \ + t = ((fp_word)sc1) + ((fp_word)sc1) + c1 + (t >> DIGIT_BIT); \ + c1 = (fp_digit)t; \ + c2 = c2 + (fp_digit)(((fp_word)sc2) + ((fp_word)sc2) + (t >> DIGIT_BIT)); \ + } while (0); + +#endif + +#ifdef TFM_SMALL_SET + #include "fp_sqr_comba_small_set.i" +#endif + +#if defined(TFM_SQR3) + #include "fp_sqr_comba_3.i" +#endif +#if defined(TFM_SQR4) + #include "fp_sqr_comba_4.i" +#endif +#if defined(TFM_SQR6) + #include "fp_sqr_comba_6.i" +#endif +#if defined(TFM_SQR7) + #include "fp_sqr_comba_7.i" +#endif +#if defined(TFM_SQR8) + #include "fp_sqr_comba_8.i" +#endif +#if defined(TFM_SQR9) + #include "fp_sqr_comba_9.i" +#endif +#if defined(TFM_SQR12) + #include "fp_sqr_comba_12.i" +#endif +#if defined(TFM_SQR17) + #include "fp_sqr_comba_17.i" +#endif +#if defined(TFM_SQR20) + #include "fp_sqr_comba_20.i" +#endif +#if defined(TFM_SQR24) + #include "fp_sqr_comba_24.i" +#endif +#if defined(TFM_SQR28) + #include "fp_sqr_comba_28.i" +#endif +#if defined(TFM_SQR32) + #include "fp_sqr_comba_32.i" +#endif +#if defined(TFM_SQR48) + #include "fp_sqr_comba_48.i" +#endif +#if defined(TFM_SQR64) + #include "fp_sqr_comba_64.i" +#endif +/* end fp_sqr_comba.c asm */ + +/* start fp_mul_comba.c asm */ +/* these are the combas. Worship them. */ +#if defined(TFM_X86) +/* Generic x86 optimized code */ + +/* anything you need at the start */ +#define COMBA_START + +/* clear the chaining variables */ +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +/* forward the carry to the next digit */ +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +/* store the first sum */ +#define COMBA_STORE(x) \ + x = c0; + +/* store the second sum [carry] */ +#define COMBA_STORE2(x) \ + x = c1; + +/* anything you need at the end */ +#define COMBA_FINI + +/* this should multiply i and j */ +#define MULADD(i, j) \ +__asm__( \ + "movl %6,%%eax \n\t" \ + "mull %7 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc"); + +#elif defined(TFM_X86_64) +/* x86-64 optimized */ + +/* anything you need at the start */ +#define COMBA_START + +/* clear the chaining variables */ +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +/* forward the carry to the next digit */ +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +/* store the first sum */ +#define COMBA_STORE(x) \ + x = c0; + +/* store the second sum [carry] */ +#define COMBA_STORE2(x) \ + x = c1; + +/* anything you need at the end */ +#define COMBA_FINI + +/* this should multiply i and j */ +#define MULADD(i, j) \ +__asm__ ( \ + "movq %6,%%rax \n\t" \ + "mulq %7 \n\t" \ + "addq %%rax,%0 \n\t" \ + "adcq %%rdx,%1 \n\t" \ + "adcq $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","cc"); + +#elif defined(TFM_SSE2) +/* use SSE2 optimizations */ + +/* anything you need at the start */ +#define COMBA_START + +/* clear the chaining variables */ +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +/* forward the carry to the next digit */ +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +/* store the first sum */ +#define COMBA_STORE(x) \ + x = c0; + +/* store the second sum [carry] */ +#define COMBA_STORE2(x) \ + x = c1; + +/* anything you need at the end */ +#define COMBA_FINI \ + __asm__("emms"); + +/* this should multiply i and j */ +#define MULADD(i, j) \ +__asm__( \ + "movd %6,%%mm0 \n\t" \ + "movd %7,%%mm1 \n\t" \ + "pmuludq %%mm1,%%mm0\n\t" \ + "movd %%mm0,%%eax \n\t" \ + "psrlq $32,%%mm0 \n\t" \ + "addl %%eax,%0 \n\t" \ + "movd %%mm0,%%eax \n\t" \ + "adcl %%eax,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","cc"); + +#elif defined(TFM_ARM) +/* ARM code */ + +#define COMBA_START + +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define COMBA_FINI + +#define MULADD(i, j) \ +__asm__( \ +" UMULL r0,r1,%6,%7 \n\t" \ +" ADDS %0,%0,r0 \n\t" \ +" ADCS %1,%1,r1 \n\t" \ +" ADC %2,%2,#0 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc"); + +#elif defined(TFM_PPC32) +/* For 32-bit PPC */ + +#define COMBA_START + +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define COMBA_FINI + +/* untested: will mulhwu change the flags? Docs say no */ +#define MULADD(i, j) \ +__asm__( \ + " mullw 16,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhwu 16,%6,%7 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16"); + +#elif defined(TFM_PPC64) +/* For 64-bit PPC */ + +#define COMBA_START + +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define COMBA_FINI + +/* untested: will mulhwu change the flags? Docs say no */ +#define MULADD(i, j) \ +____asm__( \ + " mulld 16,%6,%7 \n\t" \ + " addc %0,%0,16 \n\t" \ + " mulhdu 16,%6,%7 \n\t" \ + " adde %1,%1,16 \n\t" \ + " addze %2,%2 \n\t" \ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16"); + +#elif defined(TFM_AVR32) + +/* ISO C code */ + +#define COMBA_START + +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define COMBA_FINI + +#define MULADD(i, j) \ +____asm__( \ + " mulu.d r2,%6,%7 \n\t"\ + " add %0,r2 \n\t"\ + " adc %1,%1,r3 \n\t"\ + " acr %2 \n\t"\ +:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"r2","r3"); + +#else +/* ISO C code */ + +#define COMBA_START + +#define COMBA_CLEAR \ + c0 = c1 = c2 = 0; + +#define COMBA_FORWARD \ + do { c0 = c1; c1 = c2; c2 = 0; } while (0); + +#define COMBA_STORE(x) \ + x = c0; + +#define COMBA_STORE2(x) \ + x = c1; + +#define COMBA_FINI + +#define MULADD(i, j) \ + do { fp_word t; \ + t = (fp_word)c0 + ((fp_word)i) * ((fp_word)j); c0 = (fp_digit)t; \ + t = (fp_word)c1 + (t >> DIGIT_BIT); \ + c1 = (fp_digit)t; c2 += (fp_digit)(t >> DIGIT_BIT); \ + } while (0); + +#endif + + +#ifdef TFM_SMALL_SET + #include "fp_mul_comba_small_set.i" +#endif + +#if defined(TFM_MUL3) + #include "fp_mul_comba_3.i" +#endif +#if defined(TFM_MUL4) + #include "fp_mul_comba_4.i" +#endif +#if defined(TFM_MUL6) + #include "fp_mul_comba_6.i" +#endif +#if defined(TFM_MUL7) + #include "fp_mul_comba_7.i" +#endif +#if defined(TFM_MUL8) + #include "fp_mul_comba_8.i" +#endif +#if defined(TFM_MUL9) + #include "fp_mul_comba_9.i" +#endif +#if defined(TFM_MUL12) + #include "fp_mul_comba_12.i" +#endif +#if defined(TFM_MUL17) + #include "fp_mul_comba_17.i" +#endif +#if defined(TFM_MUL20) + #include "fp_mul_comba_20.i" +#endif +#if defined(TFM_MUL24) + #include "fp_mul_comba_24.i" +#endif +#if defined(TFM_MUL28) + #include "fp_mul_comba_28.i" +#endif +#if defined(TFM_MUL32) + #include "fp_mul_comba_32.i" +#endif +#if defined(TFM_MUL48) + #include "fp_mul_comba_48.i" +#endif +#if defined(TFM_MUL64) + #include "fp_mul_comba_64.i" +#endif + +/* end fp_mul_comba.c asm */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/asn.c b/project1/cyassl-3.0.0/ctaocrypt/src/asn.c new file mode 100644 index 00000000..266de61b --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/asn.c @@ -0,0 +1,6981 @@ +/* asn.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_ASN + +#ifdef HAVE_RTP_SYS + #include "os.h" /* dc_rtc_api needs */ + #include "dc_rtc_api.h" /* to get current time */ +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +#ifndef NO_RC4 + #include +#endif + +#ifdef HAVE_NTRU + #include "crypto_ntru.h" +#endif + +#ifdef HAVE_ECC + #include +#endif + +#ifdef CYASSL_DEBUG_ENCODING + #ifdef FREESCALE_MQX + #include + #else + #include + #endif +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */ + #pragma warning(disable: 4996) +#endif + + +#ifndef TRUE + #define TRUE 1 +#endif +#ifndef FALSE + #define FALSE 0 +#endif + + +#ifdef HAVE_RTP_SYS + /* uses parital structures */ + #define XTIME(tl) (0) + #define XGMTIME(c) my_gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) +#elif defined(MICRIUM) + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + #define XVALIDATE_DATE(d,f,t) NetSecure_ValidateDateHandler((d),(f),(t)) + #else + #define XVALIDATE_DATE(d, f, t) (0) + #endif + #define NO_TIME_H + /* since Micrium not defining XTIME or XGMTIME, CERT_GEN not available */ +#elif defined(MICROCHIP_TCPIP_V5) || defined(MICROCHIP_TCPIP) + #include + #define XTIME(t1) pic32_time((t1)) + #define XGMTIME(c) gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) +#elif defined(FREESCALE_MQX) + #include + #define XTIME(t1) mqx_time((t1)) + #define XGMTIME(c) gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) +#elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #else + #include + #endif + #undef RNG + #include "cyassl_MDK_ARM.h" + #undef RNG + #define RNG CyaSSL_RNG /*for avoiding name conflict in "stm32f2xx.h" */ + #define XTIME(tl) (0) + #define XGMTIME(c) Cyassl_MDK_gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) +#elif defined(USER_TIME) + /* user time, and gmtime compatible functions, there is a gmtime + implementation here that WINCE uses, so really just need some ticks + since the EPOCH + */ + + struct tm { + int tm_sec; /* seconds after the minute [0-60] */ + int tm_min; /* minutes after the hour [0-59] */ + int tm_hour; /* hours since midnight [0-23] */ + int tm_mday; /* day of the month [1-31] */ + int tm_mon; /* months since January [0-11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday [0-6] */ + int tm_yday; /* days since January 1 [0-365] */ + int tm_isdst; /* Daylight Savings Time flag */ + long tm_gmtoff; /* offset from CUT in seconds */ + char *tm_zone; /* timezone abbreviation */ + }; + typedef long time_t; + + /* forward declaration */ + struct tm* gmtime(const time_t* timer); + extern time_t XTIME(time_t * timer); + + #define XGMTIME(c) gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) + + #ifdef STACK_TRAP + /* for stack trap tracking, don't call os gmtime on OS X/linux, + uses a lot of stack spce */ + extern time_t time(time_t * timer); + #define XTIME(tl) time((tl)) + #endif /* STACK_TRAP */ + +#else + /* default */ + /* uses complete facility */ + #include + #define XTIME(tl) time((tl)) + #define XGMTIME(c) gmtime((c)) + #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) +#endif + + +#ifdef _WIN32_WCE +/* no time() or gmtime() even though in time.h header?? */ + +#include + + +time_t time(time_t* timer) +{ + SYSTEMTIME sysTime; + FILETIME fTime; + ULARGE_INTEGER intTime; + time_t localTime; + + if (timer == NULL) + timer = &localTime; + + GetSystemTime(&sysTime); + SystemTimeToFileTime(&sysTime, &fTime); + + XMEMCPY(&intTime, &fTime, sizeof(FILETIME)); + /* subtract EPOCH */ + intTime.QuadPart -= 0x19db1ded53e8000; + /* to secs */ + intTime.QuadPart /= 10000000; + *timer = (time_t)intTime.QuadPart; + + return *timer; +} + +#endif /* _WIN32_WCE */ +#if defined( _WIN32_WCE ) || defined( USER_TIME ) + +struct tm* gmtime(const time_t* timer) +{ + #define YEAR0 1900 + #define EPOCH_YEAR 1970 + #define SECS_DAY (24L * 60L * 60L) + #define LEAPYEAR(year) (!((year) % 4) && (((year) % 100) || !((year) %400))) + #define YEARSIZE(year) (LEAPYEAR(year) ? 366 : 365) + + static const int _ytab[2][12] = + { + {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, + {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} + }; + + static struct tm st_time; + struct tm* ret = &st_time; + time_t secs = *timer; + unsigned long dayclock, dayno; + int year = EPOCH_YEAR; + + dayclock = (unsigned long)secs % SECS_DAY; + dayno = (unsigned long)secs / SECS_DAY; + + ret->tm_sec = (int) dayclock % 60; + ret->tm_min = (int)(dayclock % 3600) / 60; + ret->tm_hour = (int) dayclock / 3600; + ret->tm_wday = (int) (dayno + 4) % 7; /* day 0 a Thursday */ + + while(dayno >= (unsigned long)YEARSIZE(year)) { + dayno -= YEARSIZE(year); + year++; + } + + ret->tm_year = year - YEAR0; + ret->tm_yday = (int)dayno; + ret->tm_mon = 0; + + while(dayno >= (unsigned long)_ytab[LEAPYEAR(year)][ret->tm_mon]) { + dayno -= _ytab[LEAPYEAR(year)][ret->tm_mon]; + ret->tm_mon++; + } + + ret->tm_mday = (int)++dayno; + ret->tm_isdst = 0; + + return ret; +} + +#endif /* _WIN32_WCE || USER_TIME */ + + +#ifdef HAVE_RTP_SYS + +#define YEAR0 1900 + +struct tm* my_gmtime(const time_t* timer) /* has a gmtime() but hangs */ +{ + static struct tm st_time; + struct tm* ret = &st_time; + + DC_RTC_CALENDAR cal; + dc_rtc_time_get(&cal, TRUE); + + ret->tm_year = cal.year - YEAR0; /* gm starts at 1900 */ + ret->tm_mon = cal.month - 1; /* gm starts at 0 */ + ret->tm_mday = cal.day; + ret->tm_hour = cal.hour; + ret->tm_min = cal.minute; + ret->tm_sec = cal.second; + + return ret; +} + +#endif /* HAVE_RTP_SYS */ + + +#if defined(MICROCHIP_TCPIP_V5) || defined(MICROCHIP_TCPIP) + +/* + * time() is just a stub in Microchip libraries. We need our own + * implementation. Use SNTP client to get seconds since epoch. + */ +time_t pic32_time(time_t* timer) +{ +#ifdef MICROCHIP_TCPIP_V5 + DWORD sec = 0; +#else + uint32_t sec = 0; +#endif + time_t localTime; + + if (timer == NULL) + timer = &localTime; + +#ifdef MICROCHIP_MPLAB_HARMONY + sec = TCPIP_SNTP_UTCSecondsGet(); +#else + sec = SNTPGetUTCSeconds(); +#endif + *timer = (time_t) sec; + + return *timer; +} + +#endif /* MICROCHIP_TCPIP */ + + +#ifdef FREESCALE_MQX + +time_t mqx_time(time_t* timer) +{ + time_t localTime; + TIME_STRUCT time_s; + + if (timer == NULL) + timer = &localTime; + + _time_get(&time_s); + *timer = (time_t) time_s.SECONDS; + + return *timer; +} + +#endif /* FREESCALE_MQX */ + + +static INLINE word32 btoi(byte b) +{ + return b - 0x30; +} + + +/* two byte date/time, add to value */ +static INLINE void GetTime(int* value, const byte* date, int* idx) +{ + int i = *idx; + + *value += btoi(date[i++]) * 10; + *value += btoi(date[i++]); + + *idx = i; +} + + +#if defined(MICRIUM) + +CPU_INT32S NetSecure_ValidateDateHandler(CPU_INT08U *date, CPU_INT08U format, + CPU_INT08U dateType) +{ + CPU_BOOLEAN rtn_code; + CPU_INT32S i; + CPU_INT32S val; + CPU_INT16U year; + CPU_INT08U month; + CPU_INT16U day; + CPU_INT08U hour; + CPU_INT08U min; + CPU_INT08U sec; + + i = 0; + year = 0u; + + if (format == ASN_UTC_TIME) { + if (btoi(date[0]) >= 5) + year = 1900; + else + year = 2000; + } + else { /* format == GENERALIZED_TIME */ + year += btoi(date[i++]) * 1000; + year += btoi(date[i++]) * 100; + } + + val = year; + GetTime(&val, date, &i); + year = (CPU_INT16U)val; + + val = 0; + GetTime(&val, date, &i); + month = (CPU_INT08U)val; + + val = 0; + GetTime(&val, date, &i); + day = (CPU_INT16U)val; + + val = 0; + GetTime(&val, date, &i); + hour = (CPU_INT08U)val; + + val = 0; + GetTime(&val, date, &i); + min = (CPU_INT08U)val; + + val = 0; + GetTime(&val, date, &i); + sec = (CPU_INT08U)val; + + return NetSecure_ValidateDate(year, month, day, hour, min, sec, dateType); +} + +#endif /* MICRIUM */ + + +CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx) +{ + int length = 0; + word32 i = *inOutIdx; + byte b; + + if ( (i+1) > maxIdx) { /* for first read */ + CYASSL_MSG("GetLength bad index on input"); + return BUFFER_E; + } + + b = input[i++]; + if (b >= ASN_LONG_LENGTH) { + word32 bytes = b & 0x7F; + + if ( (i+bytes) > maxIdx) { /* for reading bytes */ + CYASSL_MSG("GetLength bad long length"); + return BUFFER_E; + } + + while (bytes--) { + b = input[i++]; + length = (length << 8) | b; + } + } + else + length = b; + + if ( (i+length) > maxIdx) { /* for user of length */ + CYASSL_MSG("GetLength value exceeds buffer length"); + return BUFFER_E; + } + + *inOutIdx = i; + *len = length; + + return length; +} + + +CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx) +{ + int length = -1; + word32 idx = *inOutIdx; + + if (input[idx++] != (ASN_SEQUENCE | ASN_CONSTRUCTED) || + GetLength(input, &idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + *len = length; + *inOutIdx = idx; + + return length; +} + + +CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx) +{ + int length = -1; + word32 idx = *inOutIdx; + + if (input[idx++] != (ASN_SET | ASN_CONSTRUCTED) || + GetLength(input, &idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + *len = length; + *inOutIdx = idx; + + return length; +} + + +/* winodws header clash for WinCE using GetVersion */ +CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, int* version) +{ + word32 idx = *inOutIdx; + + CYASSL_ENTER("GetMyVersion"); + + if (input[idx++] != ASN_INTEGER) + return ASN_PARSE_E; + + if (input[idx++] != 0x01) + return ASN_VERSION_E; + + *version = input[idx++]; + *inOutIdx = idx; + + return *version; +} + + +#ifndef NO_PWDBASED +/* Get small count integer, 32 bits or less */ +static int GetShortInt(const byte* input, word32* inOutIdx, int* number) +{ + word32 idx = *inOutIdx; + word32 len; + + *number = 0; + + if (input[idx++] != ASN_INTEGER) + return ASN_PARSE_E; + + len = input[idx++]; + if (len > 4) + return ASN_PARSE_E; + + while (len--) { + *number = *number << 8 | input[idx++]; + } + + *inOutIdx = idx; + + return *number; +} +#endif /* !NO_PWDBASED */ + + +/* May not have one, not an error */ +static int GetExplicitVersion(const byte* input, word32* inOutIdx, int* version) +{ + word32 idx = *inOutIdx; + + CYASSL_ENTER("GetExplicitVersion"); + if (input[idx++] == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) { + *inOutIdx = ++idx; /* eat header */ + return GetMyVersion(input, inOutIdx, version); + } + + /* go back as is */ + *version = 0; + + return 0; +} + + +CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx, + word32 maxIdx) +{ + word32 i = *inOutIdx; + byte b = input[i++]; + int length; + + if (b != ASN_INTEGER) + return ASN_PARSE_E; + + if (GetLength(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + if ( (b = input[i++]) == 0x00) + length--; + else + i--; + + if (mp_init(mpi) != MP_OKAY) + return MP_INIT_E; + + if (mp_read_unsigned_bin(mpi, (byte*)input + i, length) != 0) { + mp_clear(mpi); + return ASN_GETINT_E; + } + + *inOutIdx = i + length; + return 0; +} + + +static int GetObjectId(const byte* input, word32* inOutIdx, word32* oid, + word32 maxIdx) +{ + int length; + word32 i = *inOutIdx; + byte b; + *oid = 0; + + b = input[i++]; + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + while(length--) + *oid += input[i++]; + /* just sum it up for now */ + + *inOutIdx = i; + + return 0; +} + + +CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid, + word32 maxIdx) +{ + int length; + word32 i = *inOutIdx; + byte b; + *oid = 0; + + CYASSL_ENTER("GetAlgoId"); + + if (GetSequence(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + b = input[i++]; + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + while(length--) { + /* odd HC08 compiler behavior here when input[i++] */ + *oid += input[i]; + i++; + } + /* just sum it up for now */ + + /* could have NULL tag and 0 terminator, but may not */ + b = input[i++]; + + if (b == ASN_TAG_NULL) { + b = input[i++]; + if (b != 0) + return ASN_EXPECT_0_E; + } + else + /* go back, didn't have it */ + i--; + + *inOutIdx = i; + + return 0; +} + +#ifndef NO_RSA + + +#ifdef HAVE_CAVIUM + +static int GetCaviumInt(byte** buff, word16* buffSz, const byte* input, + word32* inOutIdx, word32 maxIdx, void* heap) +{ + word32 i = *inOutIdx; + byte b = input[i++]; + int length; + + if (b != ASN_INTEGER) + return ASN_PARSE_E; + + if (GetLength(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + if ( (b = input[i++]) == 0x00) + length--; + else + i--; + + *buffSz = (word16)length; + *buff = XMALLOC(*buffSz, heap, DYNAMIC_TYPE_CAVIUM_RSA); + if (*buff == NULL) + return MEMORY_E; + + XMEMCPY(*buff, input + i, *buffSz); + + *inOutIdx = i + length; + return 0; +} + +static int CaviumRsaPrivateKeyDecode(const byte* input, word32* inOutIdx, + RsaKey* key, word32 inSz) +{ + int version, length; + void* h = key->heap; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(input, inOutIdx, &version) < 0) + return ASN_PARSE_E; + + key->type = RSA_PRIVATE; + + if (GetCaviumInt(&key->c_n, &key->c_nSz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_e, &key->c_eSz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_d, &key->c_dSz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_p, &key->c_pSz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_q, &key->c_qSz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_dP, &key->c_dP_Sz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_dQ, &key->c_dQ_Sz, input, inOutIdx, inSz, h) < 0 || + GetCaviumInt(&key->c_u, &key->c_uSz, input, inOutIdx, inSz, h) < 0 ) + return ASN_RSA_KEY_E; + + return 0; +} + + +#endif /* HAVE_CAVIUM */ + +int RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, + word32 inSz) +{ + int version, length; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return CaviumRsaPrivateKeyDecode(input, inOutIdx, key, inSz); +#endif + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(input, inOutIdx, &version) < 0) + return ASN_PARSE_E; + + key->type = RSA_PRIVATE; + + if (GetInt(&key->n, input, inOutIdx, inSz) < 0 || + GetInt(&key->e, input, inOutIdx, inSz) < 0 || + GetInt(&key->d, input, inOutIdx, inSz) < 0 || + GetInt(&key->p, input, inOutIdx, inSz) < 0 || + GetInt(&key->q, input, inOutIdx, inSz) < 0 || + GetInt(&key->dP, input, inOutIdx, inSz) < 0 || + GetInt(&key->dQ, input, inOutIdx, inSz) < 0 || + GetInt(&key->u, input, inOutIdx, inSz) < 0 ) return ASN_RSA_KEY_E; + + return 0; +} + +#endif /* NO_RSA */ + +/* Remove PKCS8 header, move beginning of traditional to beginning of input */ +int ToTraditional(byte* input, word32 sz) +{ + word32 inOutIdx = 0, oid; + int version, length; + + if (GetSequence(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(input, &inOutIdx, &version) < 0) + return ASN_PARSE_E; + + if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) + return ASN_PARSE_E; + + if (input[inOutIdx] == ASN_OBJECT_ID) { + /* pkcs8 ecc uses slightly different format */ + inOutIdx++; /* past id */ + if (GetLength(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + inOutIdx += length; /* over sub id, key input will verify */ + } + + if (input[inOutIdx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + XMEMMOVE(input, input + inOutIdx, length); + + return length; +} + + +#ifndef NO_PWDBASED + +/* Check To see if PKCS version algo is supported, set id if it is return 0 + < 0 on error */ +static int CheckAlgo(int first, int second, int* id, int* version) +{ + *id = ALGO_ID_E; + *version = PKCS5; /* default */ + + if (first == 1) { + switch (second) { + case 1: + *id = PBE_SHA1_RC4_128; + *version = PKCS12; + return 0; + case 3: + *id = PBE_SHA1_DES3; + *version = PKCS12; + return 0; + default: + return ALGO_ID_E; + } + } + + if (first != PKCS5) + return ASN_INPUT_E; /* VERSION ERROR */ + + if (second == PBES2) { + *version = PKCS5v2; + return 0; + } + + switch (second) { + case 3: /* see RFC 2898 for ids */ + *id = PBE_MD5_DES; + return 0; + case 10: + *id = PBE_SHA1_DES; + return 0; + default: + return ALGO_ID_E; + + } +} + + +/* Check To see if PKCS v2 algo is supported, set id if it is return 0 + < 0 on error */ +static int CheckAlgoV2(int oid, int* id) +{ + switch (oid) { + case 69: + *id = PBE_SHA1_DES; + return 0; + case 652: + *id = PBE_SHA1_DES3; + return 0; + default: + return ALGO_ID_E; + + } +} + + +/* Decrypt intput in place from parameters based on id */ +static int DecryptKey(const char* password, int passwordSz, byte* salt, + int saltSz, int iterations, int id, byte* input, + int length, int version, byte* cbcIv) +{ + byte key[MAX_KEY_SIZE]; + int typeH; + int derivedLen; + int decryptionType; + int ret = 0; + + switch (id) { + case PBE_MD5_DES: + typeH = MD5; + derivedLen = 16; /* may need iv for v1.5 */ + decryptionType = DES_TYPE; + break; + + case PBE_SHA1_DES: + typeH = SHA; + derivedLen = 16; /* may need iv for v1.5 */ + decryptionType = DES_TYPE; + break; + + case PBE_SHA1_DES3: + typeH = SHA; + derivedLen = 32; /* may need iv for v1.5 */ + decryptionType = DES3_TYPE; + break; + + case PBE_SHA1_RC4_128: + typeH = SHA; + derivedLen = 16; + decryptionType = RC4_TYPE; + break; + + default: + return ALGO_ID_E; + } + + if (version == PKCS5v2) + ret = PBKDF2(key, (byte*)password, passwordSz, salt, saltSz, iterations, + derivedLen, typeH); + else if (version == PKCS5) + ret = PBKDF1(key, (byte*)password, passwordSz, salt, saltSz, iterations, + derivedLen, typeH); + else if (version == PKCS12) { + int i, idx = 0; + byte unicodePasswd[MAX_UNICODE_SZ]; + + if ( (passwordSz * 2 + 2) > (int)sizeof(unicodePasswd)) + return UNICODE_SIZE_E; + + for (i = 0; i < passwordSz; i++) { + unicodePasswd[idx++] = 0x00; + unicodePasswd[idx++] = (byte)password[i]; + } + /* add trailing NULL */ + unicodePasswd[idx++] = 0x00; + unicodePasswd[idx++] = 0x00; + + ret = PKCS12_PBKDF(key, unicodePasswd, idx, salt, saltSz, + iterations, derivedLen, typeH, 1); + if (decryptionType != RC4_TYPE) + ret += PKCS12_PBKDF(cbcIv, unicodePasswd, idx, salt, saltSz, + iterations, 8, typeH, 2); + } + else + return ALGO_ID_E; + + if (ret != 0) + return ret; + + switch (decryptionType) { +#ifndef NO_DES3 + case DES_TYPE: + { + Des dec; + byte* desIv = key + 8; + + if (version == PKCS5v2 || version == PKCS12) + desIv = cbcIv; + + ret = Des_SetKey(&dec, key, desIv, DES_DECRYPTION); + if (ret != 0) + return ret; + + Des_CbcDecrypt(&dec, input, input, length); + break; + } + + case DES3_TYPE: + { + Des3 dec; + byte* desIv = key + 24; + + if (version == PKCS5v2 || version == PKCS12) + desIv = cbcIv; + ret = Des3_SetKey(&dec, key, desIv, DES_DECRYPTION); + if (ret != 0) + return ret; + ret = Des3_CbcDecrypt(&dec, input, input, length); + if (ret != 0) + return ret; + break; + } +#endif +#ifndef NO_RC4 + case RC4_TYPE: + { + Arc4 dec; + + Arc4SetKey(&dec, key, derivedLen); + Arc4Process(&dec, input, input, length); + break; + } +#endif + + default: + return ALGO_ID_E; + } + + return 0; +} + + +/* Remove Encrypted PKCS8 header, move beginning of traditional to beginning + of input */ +int ToTraditionalEnc(byte* input, word32 sz,const char* password,int passwordSz) +{ + word32 inOutIdx = 0, oid; + int first, second, length, version, saltSz, id; + int iterations = 0; + byte salt[MAX_SALT_SIZE]; + byte cbcIv[MAX_IV_SIZE]; + + if (GetSequence(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) + return ASN_PARSE_E; + + first = input[inOutIdx - 2]; /* PKCS version alwyas 2nd to last byte */ + second = input[inOutIdx - 1]; /* version.algo, algo id last byte */ + + if (CheckAlgo(first, second, &id, &version) < 0) + return ASN_INPUT_E; /* Algo ID error */ + + if (version == PKCS5v2) { + + if (GetSequence(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) + return ASN_PARSE_E; + + if (oid != PBKDF2_OID) + return ASN_PARSE_E; + } + + if (GetSequence(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + if (input[inOutIdx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(input, &inOutIdx, &saltSz, sz) < 0) + return ASN_PARSE_E; + + if (saltSz > MAX_SALT_SIZE) + return ASN_PARSE_E; + + XMEMCPY(salt, &input[inOutIdx], saltSz); + inOutIdx += saltSz; + + if (GetShortInt(input, &inOutIdx, &iterations) < 0) + return ASN_PARSE_E; + + if (version == PKCS5v2) { + /* get encryption algo */ + if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) + return ASN_PARSE_E; + + if (CheckAlgoV2(oid, &id) < 0) + return ASN_PARSE_E; /* PKCS v2 algo id error */ + + if (input[inOutIdx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + XMEMCPY(cbcIv, &input[inOutIdx], length); + inOutIdx += length; + } + + if (input[inOutIdx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(input, &inOutIdx, &length, sz) < 0) + return ASN_PARSE_E; + + if (DecryptKey(password, passwordSz, salt, saltSz, iterations, id, + input + inOutIdx, length, version, cbcIv) < 0) + return ASN_INPUT_E; /* decrypt failure */ + + XMEMMOVE(input, input + inOutIdx, length); + return ToTraditional(input, length); +} + +#endif /* NO_PWDBASED */ + +#ifndef NO_RSA + +int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, + word32 inSz) +{ + int length; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + key->type = RSA_PUBLIC; + +#if defined(OPENSSL_EXTRA) || defined(RSA_DECODE_EXTRA) + { + byte b = input[*inOutIdx]; + if (b != ASN_INTEGER) { + /* not from decoded cert, will have algo id, skip past */ + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + b = input[(*inOutIdx)++]; + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + *inOutIdx += length; /* skip past */ + + /* could have NULL tag and 0 terminator, but may not */ + b = input[(*inOutIdx)++]; + + if (b == ASN_TAG_NULL) { + b = input[(*inOutIdx)++]; + if (b != 0) + return ASN_EXPECT_0_E; + } + else + /* go back, didn't have it */ + (*inOutIdx)--; + + /* should have bit tag length and seq next */ + b = input[(*inOutIdx)++]; + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + /* could have 0 */ + b = input[(*inOutIdx)++]; + if (b != 0) + (*inOutIdx)--; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + } /* end if */ + } /* openssl var block */ +#endif /* OPENSSL_EXTRA */ + + if (GetInt(&key->n, input, inOutIdx, inSz) < 0 || + GetInt(&key->e, input, inOutIdx, inSz) < 0 ) return ASN_RSA_KEY_E; + + return 0; +} + +#endif + +#ifndef NO_DH + +int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz) +{ + int length; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || + GetInt(&key->g, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; + + return 0; +} + +int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, word32 gSz) +{ + if (key == NULL || p == NULL || g == NULL || pSz == 0 || gSz == 0) + return BAD_FUNC_ARG; + + /* may have leading 0 */ + if (p[0] == 0) { + pSz--; p++; + } + + if (g[0] == 0) { + gSz--; g++; + } + + if (mp_init(&key->p) != MP_OKAY) + return MP_INIT_E; + if (mp_read_unsigned_bin(&key->p, p, pSz) != 0) { + mp_clear(&key->p); + return ASN_DH_KEY_E; + } + + if (mp_init(&key->g) != MP_OKAY) { + mp_clear(&key->p); + return MP_INIT_E; + } + if (mp_read_unsigned_bin(&key->g, g, gSz) != 0) { + mp_clear(&key->g); + mp_clear(&key->p); + return ASN_DH_KEY_E; + } + + return 0; +} + + +#ifdef OPENSSL_EXTRA + +int DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz, + byte* g, word32* gInOutSz) +{ + word32 i = 0; + byte b; + int length; + + if (GetSequence(input, &i, &length, inSz) < 0) + return ASN_PARSE_E; + + b = input[i++]; + if (b != ASN_INTEGER) + return ASN_PARSE_E; + + if (GetLength(input, &i, &length, inSz) < 0) + return ASN_PARSE_E; + + if ( (b = input[i++]) == 0x00) + length--; + else + i--; + + if (length <= (int)*pInOutSz) { + XMEMCPY(p, &input[i], length); + *pInOutSz = length; + } + else + return BUFFER_E; + + i += length; + + b = input[i++]; + if (b != ASN_INTEGER) + return ASN_PARSE_E; + + if (GetLength(input, &i, &length, inSz) < 0) + return ASN_PARSE_E; + + if (length <= (int)*gInOutSz) { + XMEMCPY(g, &input[i], length); + *gInOutSz = length; + } + else + return BUFFER_E; + + return 0; +} + +#endif /* OPENSSL_EXTRA */ +#endif /* NO_DH */ + + +#ifndef NO_DSA + +int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key, + word32 inSz) +{ + int length; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || + GetInt(&key->q, input, inOutIdx, inSz) < 0 || + GetInt(&key->g, input, inOutIdx, inSz) < 0 || + GetInt(&key->y, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; + + key->type = DSA_PUBLIC; + return 0; +} + + +int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key, + word32 inSz) +{ + int length, version; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(input, inOutIdx, &version) < 0) + return ASN_PARSE_E; + + if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || + GetInt(&key->q, input, inOutIdx, inSz) < 0 || + GetInt(&key->g, input, inOutIdx, inSz) < 0 || + GetInt(&key->y, input, inOutIdx, inSz) < 0 || + GetInt(&key->x, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; + + key->type = DSA_PRIVATE; + return 0; +} + +#endif /* NO_DSA */ + + +void InitDecodedCert(DecodedCert* cert, byte* source, word32 inSz, void* heap) +{ + cert->publicKey = 0; + cert->pubKeySize = 0; + cert->pubKeyStored = 0; + cert->version = 0; + cert->signature = 0; + cert->subjectCN = 0; + cert->subjectCNLen = 0; + cert->subjectCNStored = 0; + cert->altNames = NULL; +#ifndef IGNORE_NAME_CONSTRAINTS + cert->altEmailNames = NULL; + cert->permittedNames = NULL; + cert->excludedNames = NULL; +#endif /* IGNORE_NAME_CONSTRAINTS */ + cert->issuer[0] = '\0'; + cert->subject[0] = '\0'; + cert->source = source; /* don't own */ + cert->srcIdx = 0; + cert->maxIdx = inSz; /* can't go over this index */ + cert->heap = heap; + XMEMSET(cert->serial, 0, EXTERNAL_SERIAL_SIZE); + cert->serialSz = 0; + cert->extensions = 0; + cert->extensionsSz = 0; + cert->extensionsIdx = 0; + cert->extAuthInfo = NULL; + cert->extAuthInfoSz = 0; + cert->extCrlInfo = NULL; + cert->extCrlInfoSz = 0; + XMEMSET(cert->extSubjKeyId, 0, SHA_SIZE); + cert->extSubjKeyIdSet = 0; + XMEMSET(cert->extAuthKeyId, 0, SHA_SIZE); + cert->extAuthKeyIdSet = 0; + cert->extKeyUsageSet = 0; + cert->extKeyUsage = 0; + cert->extExtKeyUsageSet = 0; + cert->extExtKeyUsage = 0; + cert->isCA = 0; +#ifdef HAVE_PKCS7 + cert->issuerRaw = NULL; + cert->issuerRawLen = 0; +#endif +#ifdef CYASSL_CERT_GEN + cert->subjectSN = 0; + cert->subjectSNLen = 0; + cert->subjectC = 0; + cert->subjectCLen = 0; + cert->subjectL = 0; + cert->subjectLLen = 0; + cert->subjectST = 0; + cert->subjectSTLen = 0; + cert->subjectO = 0; + cert->subjectOLen = 0; + cert->subjectOU = 0; + cert->subjectOULen = 0; + cert->subjectEmail = 0; + cert->subjectEmailLen = 0; +#endif /* CYASSL_CERT_GEN */ + cert->beforeDate = NULL; + cert->beforeDateLen = 0; + cert->afterDate = NULL; + cert->afterDateLen = 0; +#ifdef OPENSSL_EXTRA + XMEMSET(&cert->issuerName, 0, sizeof(DecodedName)); + XMEMSET(&cert->subjectName, 0, sizeof(DecodedName)); + cert->extBasicConstSet = 0; + cert->extBasicConstCrit = 0; + cert->extBasicConstPlSet = 0; + cert->pathLength = 0; + cert->extSubjAltNameSet = 0; + cert->extSubjAltNameCrit = 0; + cert->extAuthKeyIdCrit = 0; + cert->extSubjKeyIdCrit = 0; + cert->extKeyUsageCrit = 0; + cert->extExtKeyUsageCrit = 0; + cert->extExtKeyUsageSrc = NULL; + cert->extExtKeyUsageSz = 0; + cert->extExtKeyUsageCount = 0; + cert->extAuthKeyIdSrc = NULL; + cert->extAuthKeyIdSz = 0; + cert->extSubjKeyIdSrc = NULL; + cert->extSubjKeyIdSz = 0; +#endif /* OPENSSL_EXTRA */ +#if defined(OPENSSL_EXTRA) || !defined(IGNORE_NAME_CONSTRAINTS) + cert->extNameConstraintSet = 0; +#endif /* OPENSSL_EXTRA || !IGNORE_NAME_CONSTRAINTS */ +#ifdef HAVE_ECC + cert->pkCurveOID = 0; +#endif /* HAVE_ECC */ +#ifdef CYASSL_SEP + cert->deviceTypeSz = 0; + cert->deviceType = NULL; + cert->hwTypeSz = 0; + cert->hwType = NULL; + cert->hwSerialNumSz = 0; + cert->hwSerialNum = NULL; + #ifdef OPENSSL_EXTRA + cert->extCertPolicySet = 0; + cert->extCertPolicyCrit = 0; + #endif /* OPENSSL_EXTRA */ +#endif /* CYASSL_SEP */ +} + + +void FreeAltNames(DNS_entry* altNames, void* heap) +{ + (void)heap; + + while (altNames) { + DNS_entry* tmp = altNames->next; + + XFREE(altNames->name, heap, DYNAMIC_TYPE_ALTNAME); + XFREE(altNames, heap, DYNAMIC_TYPE_ALTNAME); + altNames = tmp; + } +} + +#ifndef IGNORE_NAME_CONSTRAINTS + +void FreeNameSubtrees(Base_entry* names, void* heap) +{ + (void)heap; + + while (names) { + Base_entry* tmp = names->next; + + XFREE(names->name, heap, DYNAMIC_TYPE_ALTNAME); + XFREE(names, heap, DYNAMIC_TYPE_ALTNAME); + names = tmp; + } +} + +#endif /* IGNORE_NAME_CONSTRAINTS */ + +void FreeDecodedCert(DecodedCert* cert) +{ + if (cert->subjectCNStored == 1) + XFREE(cert->subjectCN, cert->heap, DYNAMIC_TYPE_SUBJECT_CN); + if (cert->pubKeyStored == 1) + XFREE(cert->publicKey, cert->heap, DYNAMIC_TYPE_PUBLIC_KEY); + if (cert->altNames) + FreeAltNames(cert->altNames, cert->heap); +#ifndef IGNORE_NAME_CONSTRAINTS + if (cert->altEmailNames) + FreeAltNames(cert->altEmailNames, cert->heap); + if (cert->permittedNames) + FreeNameSubtrees(cert->permittedNames, cert->heap); + if (cert->excludedNames) + FreeNameSubtrees(cert->excludedNames, cert->heap); +#endif /* IGNORE_NAME_CONSTRAINTS */ +#ifdef CYASSL_SEP + XFREE(cert->deviceType, cert->heap, 0); + XFREE(cert->hwType, cert->heap, 0); + XFREE(cert->hwSerialNum, cert->heap, 0); +#endif /* CYASSL_SEP */ +#ifdef OPENSSL_EXTRA + if (cert->issuerName.fullName != NULL) + XFREE(cert->issuerName.fullName, NULL, DYNAMIC_TYPE_X509); + if (cert->subjectName.fullName != NULL) + XFREE(cert->subjectName.fullName, NULL, DYNAMIC_TYPE_X509); +#endif /* OPENSSL_EXTRA */ +} + + +static int GetCertHeader(DecodedCert* cert) +{ + int ret = 0, len; + byte serialTmp[EXTERNAL_SERIAL_SIZE]; + mp_int mpi; + + if (GetSequence(cert->source, &cert->srcIdx, &len, cert->maxIdx) < 0) + return ASN_PARSE_E; + + cert->certBegin = cert->srcIdx; + + if (GetSequence(cert->source, &cert->srcIdx, &len, cert->maxIdx) < 0) + return ASN_PARSE_E; + cert->sigIndex = len + cert->srcIdx; + + if (GetExplicitVersion(cert->source, &cert->srcIdx, &cert->version) < 0) + return ASN_PARSE_E; + + if (GetInt(&mpi, cert->source, &cert->srcIdx, cert->maxIdx) < 0) + return ASN_PARSE_E; + + len = mp_unsigned_bin_size(&mpi); + if (len < (int)sizeof(serialTmp)) { + if ( (ret = mp_to_unsigned_bin(&mpi, serialTmp)) == MP_OKAY) { + if (len > EXTERNAL_SERIAL_SIZE) + len = EXTERNAL_SERIAL_SIZE; + XMEMCPY(cert->serial, serialTmp, len); + cert->serialSz = len; + } + } + mp_clear(&mpi); + return ret; +} + +#if !defined(NO_RSA) +/* Store Rsa Key, may save later, Dsa could use in future */ +static int StoreRsaKey(DecodedCert* cert) +{ + int length; + word32 recvd = cert->srcIdx; + + if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + recvd = cert->srcIdx - recvd; + length += recvd; + + while (recvd--) + cert->srcIdx--; + + cert->pubKeySize = length; + cert->publicKey = cert->source + cert->srcIdx; + cert->srcIdx += length; + + return 0; +} +#endif + + +#ifdef HAVE_ECC + + /* return 0 on sucess if the ECC curve oid sum is supported */ + static int CheckCurve(word32 oid) + { + if (oid != ECC_256R1 && oid != ECC_384R1 && oid != ECC_521R1 && oid != + ECC_160R1 && oid != ECC_192R1 && oid != ECC_224R1) + return ALGO_ID_E; + + return 0; + } + +#endif /* HAVE_ECC */ + + +static int GetKey(DecodedCert* cert) +{ + int length; +#ifdef HAVE_NTRU + int tmpIdx = cert->srcIdx; +#endif + + if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + if (GetAlgoId(cert->source, &cert->srcIdx, &cert->keyOID, cert->maxIdx) < 0) + return ASN_PARSE_E; + + switch (cert->keyOID) { + #ifndef NO_RSA + case RSAk: + { + byte b = cert->source[cert->srcIdx++]; + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(cert->source,&cert->srcIdx,&length,cert->maxIdx) < 0) + return ASN_PARSE_E; + b = cert->source[cert->srcIdx++]; + if (b != 0x00) + return ASN_EXPECT_0_E; + + return StoreRsaKey(cert); + } + + #endif /* NO_RSA */ + #ifdef HAVE_NTRU + case NTRUk: + { + const byte* key = &cert->source[tmpIdx]; + byte* next = (byte*)key; + word16 keyLen; + byte keyBlob[MAX_NTRU_KEY_SZ]; + + word32 rc = crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey(key, + &keyLen, NULL, &next); + + if (rc != NTRU_OK) + return ASN_NTRU_KEY_E; + if (keyLen > sizeof(keyBlob)) + return ASN_NTRU_KEY_E; + + rc = crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey(key,&keyLen, + keyBlob, &next); + if (rc != NTRU_OK) + return ASN_NTRU_KEY_E; + + if ( (next - key) < 0) + return ASN_NTRU_KEY_E; + + cert->srcIdx = tmpIdx + (int)(next - key); + + cert->publicKey = (byte*) XMALLOC(keyLen, cert->heap, + DYNAMIC_TYPE_PUBLIC_KEY); + if (cert->publicKey == NULL) + return MEMORY_E; + XMEMCPY(cert->publicKey, keyBlob, keyLen); + cert->pubKeyStored = 1; + cert->pubKeySize = keyLen; + + return 0; + } + #endif /* HAVE_NTRU */ + #ifdef HAVE_ECC + case ECDSAk: + { + int oidSz = 0; + byte b = cert->source[cert->srcIdx++]; + + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(cert->source,&cert->srcIdx,&oidSz,cert->maxIdx) < 0) + return ASN_PARSE_E; + + while(oidSz--) + cert->pkCurveOID += cert->source[cert->srcIdx++]; + + if (CheckCurve(cert->pkCurveOID) < 0) + return ECC_CURVE_OID_E; + + /* key header */ + b = cert->source[cert->srcIdx++]; + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(cert->source,&cert->srcIdx,&length,cert->maxIdx) < 0) + return ASN_PARSE_E; + b = cert->source[cert->srcIdx++]; + if (b != 0x00) + return ASN_EXPECT_0_E; + + /* actual key, use length - 1 since ate preceding 0 */ + length -= 1; + + cert->publicKey = (byte*) XMALLOC(length, cert->heap, + DYNAMIC_TYPE_PUBLIC_KEY); + if (cert->publicKey == NULL) + return MEMORY_E; + XMEMCPY(cert->publicKey, &cert->source[cert->srcIdx], length); + cert->pubKeyStored = 1; + cert->pubKeySize = length; + + cert->srcIdx += length; + + return 0; + } + #endif /* HAVE_ECC */ + default: + return ASN_UNKNOWN_OID_E; + } +} + + +/* process NAME, either issuer or subject */ +static int GetName(DecodedCert* cert, int nameType) +{ + Sha sha; /* MUST have SHA-1 hash for cert names */ + int length; /* length of all distinguished names */ + int dummy; + int ret; + char* full = (nameType == ISSUER) ? cert->issuer : cert->subject; + word32 idx; + #ifdef OPENSSL_EXTRA + DecodedName* dName = + (nameType == ISSUER) ? &cert->issuerName : &cert->subjectName; + #endif /* OPENSSL_EXTRA */ + + CYASSL_MSG("Getting Cert Name"); + + if (cert->source[cert->srcIdx] == ASN_OBJECT_ID) { + CYASSL_MSG("Trying optional prefix..."); + + if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + cert->srcIdx += length; + CYASSL_MSG("Got optional prefix"); + } + + /* For OCSP, RFC2560 section 4.1.1 states the issuer hash should be + * calculated over the entire DER encoding of the Name field, including + * the tag and length. */ + idx = cert->srcIdx; + if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, &cert->source[idx], length + cert->srcIdx - idx); + if (nameType == ISSUER) + ShaFinal(&sha, cert->issuerHash); + else + ShaFinal(&sha, cert->subjectHash); + + length += cert->srcIdx; + idx = 0; + +#ifdef HAVE_PKCS7 + /* store pointer to raw issuer */ + if (nameType == ISSUER) { + cert->issuerRaw = &cert->source[cert->srcIdx]; + cert->issuerRawLen = length - cert->srcIdx; + } +#endif +#ifndef IGNORE_NAME_CONSTRAINTS + if (nameType == SUBJECT) { + cert->subjectRaw = &cert->source[cert->srcIdx]; + cert->subjectRawLen = length - cert->srcIdx; + } +#endif + + while (cert->srcIdx < (word32)length) { + byte b; + byte joint[2]; + byte tooBig = FALSE; + int oidSz; + + if (GetSet(cert->source, &cert->srcIdx, &dummy, cert->maxIdx) < 0) { + CYASSL_MSG("Cert name lacks set header, trying sequence"); + } + + if (GetSequence(cert->source, &cert->srcIdx, &dummy, cert->maxIdx) < 0) + return ASN_PARSE_E; + + b = cert->source[cert->srcIdx++]; + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(cert->source, &cert->srcIdx, &oidSz, cert->maxIdx) < 0) + return ASN_PARSE_E; + + XMEMCPY(joint, &cert->source[cert->srcIdx], sizeof(joint)); + + /* v1 name types */ + if (joint[0] == 0x55 && joint[1] == 0x04) { + byte id; + byte copy = FALSE; + int strLen; + + cert->srcIdx += 2; + id = cert->source[cert->srcIdx++]; + b = cert->source[cert->srcIdx++]; /* strType */ + (void)b; /* may want to validate? */ + + if (GetLength(cert->source, &cert->srcIdx, &strLen, + cert->maxIdx) < 0) + return ASN_PARSE_E; + + if ( (strLen + 14) > (int)(ASN_NAME_MAX - idx)) { + /* include biggest pre fix header too 4 = "/serialNumber=" */ + CYASSL_MSG("ASN Name too big, skipping"); + tooBig = TRUE; + } + + if (id == ASN_COMMON_NAME) { + if (nameType == SUBJECT) { + cert->subjectCN = (char *)&cert->source[cert->srcIdx]; + cert->subjectCNLen = strLen; + } + + if (!tooBig) { + XMEMCPY(&full[idx], "/CN=", 4); + idx += 4; + copy = TRUE; + } + #ifdef OPENSSL_EXTRA + dName->cnIdx = cert->srcIdx; + dName->cnLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_SUR_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/SN=", 4); + idx += 4; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectSN = (char*)&cert->source[cert->srcIdx]; + cert->subjectSNLen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->snIdx = cert->srcIdx; + dName->snLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_COUNTRY_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/C=", 3); + idx += 3; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectC = (char*)&cert->source[cert->srcIdx]; + cert->subjectCLen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->cIdx = cert->srcIdx; + dName->cLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_LOCALITY_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/L=", 3); + idx += 3; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectL = (char*)&cert->source[cert->srcIdx]; + cert->subjectLLen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->lIdx = cert->srcIdx; + dName->lLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_STATE_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/ST=", 4); + idx += 4; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectST = (char*)&cert->source[cert->srcIdx]; + cert->subjectSTLen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->stIdx = cert->srcIdx; + dName->stLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_ORG_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/O=", 3); + idx += 3; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectO = (char*)&cert->source[cert->srcIdx]; + cert->subjectOLen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->oIdx = cert->srcIdx; + dName->oLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_ORGUNIT_NAME) { + if (!tooBig) { + XMEMCPY(&full[idx], "/OU=", 4); + idx += 4; + copy = TRUE; + } + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectOU = (char*)&cert->source[cert->srcIdx]; + cert->subjectOULen = strLen; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->ouIdx = cert->srcIdx; + dName->ouLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + else if (id == ASN_SERIAL_NUMBER) { + if (!tooBig) { + XMEMCPY(&full[idx], "/serialNumber=", 14); + idx += 14; + copy = TRUE; + } + #ifdef OPENSSL_EXTRA + dName->snIdx = cert->srcIdx; + dName->snLen = strLen; + #endif /* OPENSSL_EXTRA */ + } + + if (copy && !tooBig) { + XMEMCPY(&full[idx], &cert->source[cert->srcIdx], strLen); + idx += strLen; + } + + cert->srcIdx += strLen; + } + else { + /* skip */ + byte email = FALSE; + byte uid = FALSE; + int adv; + + if (joint[0] == 0x2a && joint[1] == 0x86) /* email id hdr */ + email = TRUE; + + if (joint[0] == 0x9 && joint[1] == 0x92) /* uid id hdr */ + uid = TRUE; + + cert->srcIdx += oidSz + 1; + + if (GetLength(cert->source, &cert->srcIdx, &adv, cert->maxIdx) < 0) + return ASN_PARSE_E; + + if (adv > (int)(ASN_NAME_MAX - idx)) { + CYASSL_MSG("ASN name too big, skipping"); + tooBig = TRUE; + } + + if (email) { + if ( (14 + adv) > (int)(ASN_NAME_MAX - idx)) { + CYASSL_MSG("ASN name too big, skipping"); + tooBig = TRUE; + } + if (!tooBig) { + XMEMCPY(&full[idx], "/emailAddress=", 14); + idx += 14; + } + + #ifdef CYASSL_CERT_GEN + if (nameType == SUBJECT) { + cert->subjectEmail = (char*)&cert->source[cert->srcIdx]; + cert->subjectEmailLen = adv; + } + #endif /* CYASSL_CERT_GEN */ + #ifdef OPENSSL_EXTRA + dName->emailIdx = cert->srcIdx; + dName->emailLen = adv; + #endif /* OPENSSL_EXTRA */ + #ifndef IGNORE_NAME_CONSTRAINTS + { + DNS_entry* emailName = NULL; + + emailName = (DNS_entry*)XMALLOC(sizeof(DNS_entry), + cert->heap, DYNAMIC_TYPE_ALTNAME); + if (emailName == NULL) { + CYASSL_MSG("\tOut of Memory"); + return MEMORY_E; + } + emailName->name = (char*)XMALLOC(adv + 1, + cert->heap, DYNAMIC_TYPE_ALTNAME); + if (emailName->name == NULL) { + CYASSL_MSG("\tOut of Memory"); + return MEMORY_E; + } + XMEMCPY(emailName->name, + &cert->source[cert->srcIdx], adv); + emailName->name[adv] = 0; + + emailName->next = cert->altEmailNames; + cert->altEmailNames = emailName; + } + #endif /* IGNORE_NAME_CONSTRAINTS */ + if (!tooBig) { + XMEMCPY(&full[idx], &cert->source[cert->srcIdx], adv); + idx += adv; + } + } + + if (uid) { + if ( (5 + adv) > (int)(ASN_NAME_MAX - idx)) { + CYASSL_MSG("ASN name too big, skipping"); + tooBig = TRUE; + } + if (!tooBig) { + XMEMCPY(&full[idx], "/UID=", 5); + idx += 5; + + XMEMCPY(&full[idx], &cert->source[cert->srcIdx], adv); + idx += adv; + } + #ifdef OPENSSL_EXTRA + dName->uidIdx = cert->srcIdx; + dName->uidLen = adv; + #endif /* OPENSSL_EXTRA */ + } + + cert->srcIdx += adv; + } + } + full[idx++] = 0; + + #ifdef OPENSSL_EXTRA + { + int totalLen = 0; + + if (dName->cnLen != 0) + totalLen += dName->cnLen + 4; + if (dName->snLen != 0) + totalLen += dName->snLen + 4; + if (dName->cLen != 0) + totalLen += dName->cLen + 3; + if (dName->lLen != 0) + totalLen += dName->lLen + 3; + if (dName->stLen != 0) + totalLen += dName->stLen + 4; + if (dName->oLen != 0) + totalLen += dName->oLen + 3; + if (dName->ouLen != 0) + totalLen += dName->ouLen + 4; + if (dName->emailLen != 0) + totalLen += dName->emailLen + 14; + if (dName->uidLen != 0) + totalLen += dName->uidLen + 5; + if (dName->serialLen != 0) + totalLen += dName->serialLen + 14; + + dName->fullName = (char*)XMALLOC(totalLen + 1, NULL, DYNAMIC_TYPE_X509); + if (dName->fullName != NULL) { + idx = 0; + + if (dName->cnLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/CN=", 4); + idx += 4; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->cnIdx], dName->cnLen); + dName->cnIdx = idx; + idx += dName->cnLen; + } + if (dName->snLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/SN=", 4); + idx += 4; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->snIdx], dName->snLen); + dName->snIdx = idx; + idx += dName->snLen; + } + if (dName->cLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/C=", 3); + idx += 3; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->cIdx], dName->cLen); + dName->cIdx = idx; + idx += dName->cLen; + } + if (dName->lLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/L=", 3); + idx += 3; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->lIdx], dName->lLen); + dName->lIdx = idx; + idx += dName->lLen; + } + if (dName->stLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/ST=", 4); + idx += 4; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->stIdx], dName->stLen); + dName->stIdx = idx; + idx += dName->stLen; + } + if (dName->oLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/O=", 3); + idx += 3; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->oIdx], dName->oLen); + dName->oIdx = idx; + idx += dName->oLen; + } + if (dName->ouLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/OU=", 4); + idx += 4; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->ouIdx], dName->ouLen); + dName->ouIdx = idx; + idx += dName->ouLen; + } + if (dName->emailLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/emailAddress=", 14); + idx += 14; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->emailIdx], dName->emailLen); + dName->emailIdx = idx; + idx += dName->emailLen; + } + if (dName->uidLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/UID=", 5); + idx += 5; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->uidIdx], dName->uidLen); + dName->uidIdx = idx; + idx += dName->uidLen; + } + if (dName->serialLen != 0) { + dName->entryCount++; + XMEMCPY(&dName->fullName[idx], "/serialNumber=", 14); + idx += 14; + XMEMCPY(&dName->fullName[idx], + &cert->source[dName->serialIdx], dName->serialLen); + dName->serialIdx = idx; + idx += dName->serialLen; + } + dName->fullName[idx] = '\0'; + dName->fullNameLen = totalLen; + } + } + #endif /* OPENSSL_EXTRA */ + + return 0; +} + + +#ifndef NO_TIME_H + +/* to the second */ +static int DateGreaterThan(const struct tm* a, const struct tm* b) +{ + if (a->tm_year > b->tm_year) + return 1; + + if (a->tm_year == b->tm_year && a->tm_mon > b->tm_mon) + return 1; + + if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && + a->tm_mday > b->tm_mday) + return 1; + + if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && + a->tm_mday == b->tm_mday && a->tm_hour > b->tm_hour) + return 1; + + if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && + a->tm_mday == b->tm_mday && a->tm_hour == b->tm_hour && + a->tm_min > b->tm_min) + return 1; + + if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && + a->tm_mday == b->tm_mday && a->tm_hour == b->tm_hour && + a->tm_min == b->tm_min && a->tm_sec > b->tm_sec) + return 1; + + return 0; /* false */ +} + + +static INLINE int DateLessThan(const struct tm* a, const struct tm* b) +{ + return !DateGreaterThan(a,b); +} + + +/* like atoi but only use first byte */ +/* Make sure before and after dates are valid */ +int ValidateDate(const byte* date, byte format, int dateType) +{ + time_t ltime; + struct tm certTime; + struct tm* localTime; + int i = 0; + + ltime = XTIME(0); + XMEMSET(&certTime, 0, sizeof(certTime)); + + if (format == ASN_UTC_TIME) { + if (btoi(date[0]) >= 5) + certTime.tm_year = 1900; + else + certTime.tm_year = 2000; + } + else { /* format == GENERALIZED_TIME */ + certTime.tm_year += btoi(date[i++]) * 1000; + certTime.tm_year += btoi(date[i++]) * 100; + } + + GetTime(&certTime.tm_year, date, &i); certTime.tm_year -= 1900; /* adjust */ + GetTime(&certTime.tm_mon, date, &i); certTime.tm_mon -= 1; /* adjust */ + GetTime(&certTime.tm_mday, date, &i); + GetTime(&certTime.tm_hour, date, &i); + GetTime(&certTime.tm_min, date, &i); + GetTime(&certTime.tm_sec, date, &i); + + if (date[i] != 'Z') { /* only Zulu supported for this profile */ + CYASSL_MSG("Only Zulu time supported for this profile"); + return 0; + } + + localTime = XGMTIME(<ime); + + if (dateType == BEFORE) { + if (DateLessThan(localTime, &certTime)) + return 0; + } + else + if (DateGreaterThan(localTime, &certTime)) + return 0; + + return 1; +} + +#endif /* NO_TIME_H */ + + +static int GetDate(DecodedCert* cert, int dateType) +{ + int length; + byte date[MAX_DATE_SIZE]; + byte b; + word32 startIdx = 0; + + if (dateType == BEFORE) + cert->beforeDate = &cert->source[cert->srcIdx]; + else + cert->afterDate = &cert->source[cert->srcIdx]; + startIdx = cert->srcIdx; + + b = cert->source[cert->srcIdx++]; + if (b != ASN_UTC_TIME && b != ASN_GENERALIZED_TIME) + return ASN_TIME_E; + + if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + if (length > MAX_DATE_SIZE || length < MIN_DATE_SIZE) + return ASN_DATE_SZ_E; + + XMEMCPY(date, &cert->source[cert->srcIdx], length); + cert->srcIdx += length; + + if (dateType == BEFORE) + cert->beforeDateLen = cert->srcIdx - startIdx; + else + cert->afterDateLen = cert->srcIdx - startIdx; + + if (!XVALIDATE_DATE(date, b, dateType)) { + if (dateType == BEFORE) + return ASN_BEFORE_DATE_E; + else + return ASN_AFTER_DATE_E; + } + + return 0; +} + + +static int GetValidity(DecodedCert* cert, int verify) +{ + int length; + int badDate = 0; + + if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + if (GetDate(cert, BEFORE) < 0 && verify) + badDate = ASN_BEFORE_DATE_E; /* continue parsing */ + + if (GetDate(cert, AFTER) < 0 && verify) + return ASN_AFTER_DATE_E; + + if (badDate != 0) + return badDate; + + return 0; +} + + +int DecodeToKey(DecodedCert* cert, int verify) +{ + int badDate = 0; + int ret; + + if ( (ret = GetCertHeader(cert)) < 0) + return ret; + + CYASSL_MSG("Got Cert Header"); + + if ( (ret = GetAlgoId(cert->source, &cert->srcIdx, &cert->signatureOID, + cert->maxIdx)) < 0) + return ret; + + CYASSL_MSG("Got Algo ID"); + + if ( (ret = GetName(cert, ISSUER)) < 0) + return ret; + + if ( (ret = GetValidity(cert, verify)) < 0) + badDate = ret; + + if ( (ret = GetName(cert, SUBJECT)) < 0) + return ret; + + CYASSL_MSG("Got Subject Name"); + + if ( (ret = GetKey(cert)) < 0) + return ret; + + CYASSL_MSG("Got Key"); + + if (badDate != 0) + return badDate; + + return ret; +} + + +static int GetSignature(DecodedCert* cert) +{ + int length; + byte b = cert->source[cert->srcIdx++]; + + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + cert->sigLength = length; + + b = cert->source[cert->srcIdx++]; + if (b != 0x00) + return ASN_EXPECT_0_E; + + cert->sigLength--; + cert->signature = &cert->source[cert->srcIdx]; + cert->srcIdx += cert->sigLength; + + return 0; +} + + +static word32 SetDigest(const byte* digest, word32 digSz, byte* output) +{ + output[0] = ASN_OCTET_STRING; + output[1] = (byte)digSz; + XMEMCPY(&output[2], digest, digSz); + + return digSz + 2; +} + + +static word32 BytePrecision(word32 value) +{ + word32 i; + for (i = sizeof(value); i; --i) + if (value >> ((i - 1) * CYASSL_BIT_SIZE)) + break; + + return i; +} + + +CYASSL_LOCAL word32 SetLength(word32 length, byte* output) +{ + word32 i = 0, j; + + if (length < ASN_LONG_LENGTH) + output[i++] = (byte)length; + else { + output[i++] = (byte)(BytePrecision(length) | ASN_LONG_LENGTH); + + for (j = BytePrecision(length); j; --j) { + output[i] = (byte)(length >> ((j - 1) * CYASSL_BIT_SIZE)); + i++; + } + } + + return i; +} + + +CYASSL_LOCAL word32 SetSequence(word32 len, byte* output) +{ + output[0] = ASN_SEQUENCE | ASN_CONSTRUCTED; + return SetLength(len, output + 1) + 1; +} + +CYASSL_LOCAL word32 SetOctetString(word32 len, byte* output) +{ + output[0] = ASN_OCTET_STRING; + return SetLength(len, output + 1) + 1; +} + +/* Write a set header to output */ +CYASSL_LOCAL word32 SetSet(word32 len, byte* output) +{ + output[0] = ASN_SET | ASN_CONSTRUCTED; + return SetLength(len, output + 1) + 1; +} + +CYASSL_LOCAL word32 SetImplicit(byte tag, byte number, word32 len, byte* output) +{ + + output[0] = ((tag == ASN_SEQUENCE || tag == ASN_SET) ? ASN_CONSTRUCTED : 0) + | ASN_CONTEXT_SPECIFIC | number; + return SetLength(len, output + 1) + 1; +} + +CYASSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output) +{ + output[0] = ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | number; + return SetLength(len, output + 1) + 1; +} + + +#if defined(HAVE_ECC) && defined(CYASSL_CERT_GEN) + +static word32 SetCurve(ecc_key* key, byte* output) +{ + + /* curve types */ + static const byte ECC_192v1_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, + 0x03, 0x01, 0x01}; + static const byte ECC_256v1_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, + 0x03, 0x01, 0x07}; + static const byte ECC_160r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, + 0x02}; + static const byte ECC_224r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, + 0x21}; + static const byte ECC_384r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, + 0x22}; + static const byte ECC_521r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, + 0x23}; + + int oidSz = 0; + int idx = 0; + int lenSz = 0; + const byte* oid = 0; + + output[0] = ASN_OBJECT_ID; + idx++; + + switch (key->dp->size) { + case 20: + oidSz = sizeof(ECC_160r1_AlgoID); + oid = ECC_160r1_AlgoID; + break; + + case 24: + oidSz = sizeof(ECC_192v1_AlgoID); + oid = ECC_192v1_AlgoID; + break; + + case 28: + oidSz = sizeof(ECC_224r1_AlgoID); + oid = ECC_224r1_AlgoID; + break; + + case 32: + oidSz = sizeof(ECC_256v1_AlgoID); + oid = ECC_256v1_AlgoID; + break; + + case 48: + oidSz = sizeof(ECC_384r1_AlgoID); + oid = ECC_384r1_AlgoID; + break; + + case 66: + oidSz = sizeof(ECC_521r1_AlgoID); + oid = ECC_521r1_AlgoID; + break; + + default: + return ASN_UNKNOWN_OID_E; + } + lenSz = SetLength(oidSz, output+idx); + idx += lenSz; + + XMEMCPY(output+idx, oid, oidSz); + idx += oidSz; + + return idx; +} + +#endif /* HAVE_ECC && CYASSL_CERT_GEN */ + + +CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz) +{ + /* adding TAG_NULL and 0 to end */ + + /* hashTypes */ + static const byte shaAlgoID[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a, + 0x05, 0x00 }; + static const byte sha256AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x01, 0x05, 0x00 }; + static const byte sha384AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x02, 0x05, 0x00 }; + static const byte sha512AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x03, 0x05, 0x00 }; + static const byte md5AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x02, 0x05, 0x05, 0x00 }; + static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x02, 0x02, 0x05, 0x00}; + + /* blkTypes, no NULL tags because IV is there instead */ + static const byte desCbcAlgoID[] = { 0x2B, 0x0E, 0x03, 0x02, 0x07 }; + static const byte des3CbcAlgoID[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x03, 0x07 }; + + /* RSA sigTypes */ + #ifndef NO_RSA + static const byte md5wRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x04, 0x05, 0x00}; + static const byte shawRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00}; + static const byte sha256wRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00}; + static const byte sha384wRSA_AlgoID[] = {0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0c, 0x05, 0x00}; + static const byte sha512wRSA_AlgoID[] = {0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0d, 0x05, 0x00}; + #endif /* NO_RSA */ + + /* ECDSA sigTypes */ + #ifdef HAVE_ECC + static const byte shawECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, + 0x04, 0x01, 0x05, 0x00}; + static const byte sha256wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, + 0x04, 0x03, 0x02, 0x05, 0x00}; + static const byte sha384wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, + 0x04, 0x03, 0x03, 0x05, 0x00}; + static const byte sha512wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, + 0x04, 0x03, 0x04, 0x05, 0x00}; + #endif /* HAVE_ECC */ + + /* RSA keyType */ + #ifndef NO_RSA + static const byte RSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x01, 0x05, 0x00}; + #endif /* NO_RSA */ + + #ifdef HAVE_ECC + /* ECC keyType */ + /* no tags, so set tagSz smaller later */ + static const byte ECC_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, + 0x02, 0x01}; + #endif /* HAVE_ECC */ + + int algoSz = 0; + int tagSz = 2; /* tag null and terminator */ + word32 idSz, seqSz; + const byte* algoName = 0; + byte ID_Length[MAX_LENGTH_SZ]; + byte seqArray[MAX_SEQ_SZ + 1]; /* add object_id to end */ + + if (type == hashType) { + switch (algoOID) { + case SHAh: + algoSz = sizeof(shaAlgoID); + algoName = shaAlgoID; + break; + + case SHA256h: + algoSz = sizeof(sha256AlgoID); + algoName = sha256AlgoID; + break; + + case SHA384h: + algoSz = sizeof(sha384AlgoID); + algoName = sha384AlgoID; + break; + + case SHA512h: + algoSz = sizeof(sha512AlgoID); + algoName = sha512AlgoID; + break; + + case MD2h: + algoSz = sizeof(md2AlgoID); + algoName = md2AlgoID; + break; + + case MD5h: + algoSz = sizeof(md5AlgoID); + algoName = md5AlgoID; + break; + + default: + CYASSL_MSG("Unknown Hash Algo"); + return 0; /* UNKOWN_HASH_E; */ + } + } + else if (type == blkType) { + switch (algoOID) { + case DESb: + algoSz = sizeof(desCbcAlgoID); + algoName = desCbcAlgoID; + tagSz = 0; + break; + case DES3b: + algoSz = sizeof(des3CbcAlgoID); + algoName = des3CbcAlgoID; + tagSz = 0; + break; + default: + CYASSL_MSG("Unknown Block Algo"); + return 0; + } + } + else if (type == sigType) { /* sigType */ + switch (algoOID) { + #ifndef NO_RSA + case CTC_MD5wRSA: + algoSz = sizeof(md5wRSA_AlgoID); + algoName = md5wRSA_AlgoID; + break; + + case CTC_SHAwRSA: + algoSz = sizeof(shawRSA_AlgoID); + algoName = shawRSA_AlgoID; + break; + + case CTC_SHA256wRSA: + algoSz = sizeof(sha256wRSA_AlgoID); + algoName = sha256wRSA_AlgoID; + break; + + case CTC_SHA384wRSA: + algoSz = sizeof(sha384wRSA_AlgoID); + algoName = sha384wRSA_AlgoID; + break; + + case CTC_SHA512wRSA: + algoSz = sizeof(sha512wRSA_AlgoID); + algoName = sha512wRSA_AlgoID; + break; + #endif /* NO_RSA */ + #ifdef HAVE_ECC + case CTC_SHAwECDSA: + algoSz = sizeof(shawECDSA_AlgoID); + algoName = shawECDSA_AlgoID; + break; + + case CTC_SHA256wECDSA: + algoSz = sizeof(sha256wECDSA_AlgoID); + algoName = sha256wECDSA_AlgoID; + break; + + case CTC_SHA384wECDSA: + algoSz = sizeof(sha384wECDSA_AlgoID); + algoName = sha384wECDSA_AlgoID; + break; + + case CTC_SHA512wECDSA: + algoSz = sizeof(sha512wECDSA_AlgoID); + algoName = sha512wECDSA_AlgoID; + break; + #endif /* HAVE_ECC */ + default: + CYASSL_MSG("Unknown Signature Algo"); + return 0; + } + } + else if (type == keyType) { /* keyType */ + switch (algoOID) { + #ifndef NO_RSA + case RSAk: + algoSz = sizeof(RSA_AlgoID); + algoName = RSA_AlgoID; + break; + #endif /* NO_RSA */ + #ifdef HAVE_ECC + case ECDSAk: + algoSz = sizeof(ECC_AlgoID); + algoName = ECC_AlgoID; + tagSz = 0; + break; + #endif /* HAVE_ECC */ + default: + CYASSL_MSG("Unknown Key Algo"); + return 0; + } + } + else { + CYASSL_MSG("Unknown Algo type"); + return 0; + } + + idSz = SetLength(algoSz - tagSz, ID_Length); /* don't include tags */ + seqSz = SetSequence(idSz + algoSz + 1 + curveSz, seqArray); + /* +1 for object id, curveID of curveSz follows for ecc */ + seqArray[seqSz++] = ASN_OBJECT_ID; + + XMEMCPY(output, seqArray, seqSz); + XMEMCPY(output + seqSz, ID_Length, idSz); + XMEMCPY(output + seqSz + idSz, algoName, algoSz); + + return seqSz + idSz + algoSz; + +} + + +word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, int hashOID) +{ + byte digArray[MAX_ENCODED_DIG_SZ]; + byte algoArray[MAX_ALGO_SZ]; + byte seqArray[MAX_SEQ_SZ]; + word32 encDigSz, algoSz, seqSz; + + encDigSz = SetDigest(digest, digSz, digArray); + algoSz = SetAlgoID(hashOID, algoArray, hashType, 0); + seqSz = SetSequence(encDigSz + algoSz, seqArray); + + XMEMCPY(out, seqArray, seqSz); + XMEMCPY(out + seqSz, algoArray, algoSz); + XMEMCPY(out + seqSz + algoSz, digArray, encDigSz); + + return encDigSz + algoSz + seqSz; +} + + +/* return true (1) for Confirmation */ +static int ConfirmSignature(const byte* buf, word32 bufSz, + const byte* key, word32 keySz, word32 keyOID, + const byte* sig, word32 sigSz, word32 sigOID, + void* heap) +{ +#ifdef CYASSL_SHA512 + byte digest[SHA512_DIGEST_SIZE]; /* max size */ +#elif !defined(NO_SHA256) + byte digest[SHA256_DIGEST_SIZE]; /* max size */ +#else + byte digest[SHA_DIGEST_SIZE]; /* max size */ +#endif + int typeH, digestSz, ret = 0; + + (void)key; + (void)keySz; + (void)sig; + (void)sigSz; + (void)heap; + (void)ret; + + switch (sigOID) { +#ifndef NO_MD5 + case CTC_MD5wRSA: + { + Md5 md5; + InitMd5(&md5); + Md5Update(&md5, buf, bufSz); + Md5Final(&md5, digest); + typeH = MD5h; + digestSz = MD5_DIGEST_SIZE; + } + break; +#endif + #if defined(CYASSL_MD2) + case CTC_MD2wRSA: + { + Md2 md2; + InitMd2(&md2); + Md2Update(&md2, buf, bufSz); + Md2Final(&md2, digest); + typeH = MD2h; + digestSz = MD2_DIGEST_SIZE; + } + break; + #endif +#ifndef NO_SHA + case CTC_SHAwRSA: + case CTC_SHAwDSA: + case CTC_SHAwECDSA: + { + Sha sha; + ret = InitSha(&sha); + if (ret != 0) { + CYASSL_MSG("InitSha failed"); + return 0; /* not confirmed */ + } + ShaUpdate(&sha, buf, bufSz); + ShaFinal(&sha, digest); + typeH = SHAh; + digestSz = SHA_DIGEST_SIZE; + } + break; +#endif + #ifndef NO_SHA256 + case CTC_SHA256wRSA: + case CTC_SHA256wECDSA: + { + Sha256 sha256; + ret = InitSha256(&sha256); + if (ret != 0) { + CYASSL_MSG("InitSha256 failed"); + return 0; /* not confirmed */ + } + + ret = Sha256Update(&sha256, buf, bufSz); + if (ret != 0) { + CYASSL_MSG("Sha256Update failed"); + return 0; /* not confirmed */ + } + + ret = Sha256Final(&sha256, digest); + if (ret != 0) { + CYASSL_MSG("Sha256Final failed"); + return 0; /* not confirmed */ + } + + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + } + break; + #endif + #ifdef CYASSL_SHA512 + case CTC_SHA512wRSA: + case CTC_SHA512wECDSA: + { + Sha512 sha512; + ret = InitSha512(&sha512); + if (ret != 0) { + CYASSL_MSG("InitSha512 failed"); + return 0; /* not confirmed */ + } + + ret = Sha512Update(&sha512, buf, bufSz); + if (ret != 0) { + CYASSL_MSG("Sha512Update failed"); + return 0; /* not confirmed */ + } + + ret = Sha512Final(&sha512, digest); + if (ret != 0) { + CYASSL_MSG("Sha512Final failed"); + return 0; /* not confirmed */ + } + + typeH = SHA512h; + digestSz = SHA512_DIGEST_SIZE; + } + break; + #endif + #ifdef CYASSL_SHA384 + case CTC_SHA384wRSA: + case CTC_SHA384wECDSA: + { + Sha384 sha384; + ret = InitSha384(&sha384); + if (ret != 0) { + CYASSL_MSG("InitSha384 failed"); + return 0; /* not confirmed */ + } + + ret = Sha384Update(&sha384, buf, bufSz); + if (ret != 0) { + CYASSL_MSG("Sha384Update failed"); + return 0; /* not confirmed */ + } + + ret = Sha384Final(&sha384, digest); + if (ret != 0) { + CYASSL_MSG("Sha384Final failed"); + return 0; /* not confirmed */ + } + + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + } + break; + #endif + default: + CYASSL_MSG("Verify Signautre has unsupported type"); + return 0; + } + (void)typeH; /* some builds won't read */ + + switch (keyOID) { + #ifndef NO_RSA + case RSAk: + { + RsaKey pubKey; + byte encodedSig[MAX_ENCODED_SIG_SZ]; + byte plain[MAX_ENCODED_SIG_SZ]; + word32 idx = 0; + int encodedSigSz, verifySz; + byte* out; + + if (sigSz > MAX_ENCODED_SIG_SZ) { + CYASSL_MSG("Verify Signautre is too big"); + return 0; + } + + ret = InitRsaKey(&pubKey, heap); + if (ret != 0) return ret; + if (RsaPublicKeyDecode(key, &idx, &pubKey, keySz) < 0) { + CYASSL_MSG("ASN Key decode error RSA"); + ret = 0; + } + else { + XMEMCPY(plain, sig, sigSz); + if ( (verifySz = RsaSSL_VerifyInline(plain, sigSz, &out, + &pubKey)) < 0) { + CYASSL_MSG("Rsa SSL verify error"); + ret = 0; + } + else { + /* make sure we're right justified */ + encodedSigSz = + EncodeSignature(encodedSig, digest, digestSz, typeH); + if (encodedSigSz != verifySz || + XMEMCMP(out, encodedSig, encodedSigSz) != 0) { + CYASSL_MSG("Rsa SSL verify match encode error"); + ret = 0; + } + else + ret = 1; /* match */ + + #ifdef CYASSL_DEBUG_ENCODING + { + int x; + printf("cyassl encodedSig:\n"); + for (x = 0; x < encodedSigSz; x++) { + printf("%02x ", encodedSig[x]); + if ( (x % 16) == 15) + printf("\n"); + } + printf("\n"); + printf("actual digest:\n"); + for (x = 0; x < verifySz; x++) { + printf("%02x ", out[x]); + if ( (x % 16) == 15) + printf("\n"); + } + printf("\n"); + } + #endif /* CYASSL_DEBUG_ENCODING */ + } + } + FreeRsaKey(&pubKey); + return ret; + } + + #endif /* NO_RSA */ + #ifdef HAVE_ECC + case ECDSAk: + { + ecc_key pubKey; + int verify = 0; + + if (ecc_import_x963(key, keySz, &pubKey) < 0) { + CYASSL_MSG("ASN Key import error ECC"); + return 0; + } + + ret = ecc_verify_hash(sig,sigSz,digest,digestSz,&verify,&pubKey); + ecc_free(&pubKey); + if (ret == 0 && verify == 1) + return 1; /* match */ + + CYASSL_MSG("ECC Verify didn't match"); + return 0; + } + #endif /* HAVE_ECC */ + default: + CYASSL_MSG("Verify Key type unknown"); + return 0; + } +} + + +#ifndef IGNORE_NAME_CONSTRAINTS + +static int MatchBaseName(int type, const char* name, int nameSz, + const char* base, int baseSz) +{ + if (base == NULL || baseSz <= 0 || name == NULL || nameSz <= 0 || + name[0] == '.' || nameSz < baseSz || + (type != ASN_RFC822_TYPE && type != ASN_DNS_TYPE)) + return 0; + + /* If an email type, handle special cases where the base is only + * a domain, or is an email address itself. */ + if (type == ASN_RFC822_TYPE) { + const char* p = NULL; + int count = 0; + + if (base[0] != '.') { + p = base; + count = 0; + + /* find the '@' in the base */ + while (*p != '@' && count < baseSz) { + count++; + p++; + } + + /* No '@' in base, reset p to NULL */ + if (count >= baseSz) + p = NULL; + } + + if (p == NULL) { + /* Base isn't an email address, it is a domain name, + * wind the name forward one character past its '@'. */ + p = name; + count = 0; + while (*p != '@' && count < baseSz) { + count++; + p++; + } + + if (count < baseSz && *p == '@') { + name = p + 1; + nameSz -= count + 1; + } + } + } + + if ((type == ASN_DNS_TYPE || type == ASN_RFC822_TYPE) && base[0] == '.') { + int szAdjust = nameSz - baseSz; + name += szAdjust; + nameSz -= szAdjust; + } + + while (nameSz > 0) { + if (XTOLOWER(*name++) != XTOLOWER(*base++)) + return 0; + nameSz--; + } + + return 1; +} + + +static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert) +{ + if (signer == NULL || cert == NULL) + return 0; + + /* Check against the excluded list */ + if (signer->excludedNames) { + Base_entry* base = signer->excludedNames; + + while (base != NULL) { + if (base->type == ASN_DNS_TYPE) { + DNS_entry* name = cert->altNames; + while (name != NULL) { + if (MatchBaseName(ASN_DNS_TYPE, + name->name, (int)XSTRLEN(name->name), + base->name, base->nameSz)) + return 0; + name = name->next; + } + } + else if (base->type == ASN_RFC822_TYPE) { + DNS_entry* name = cert->altEmailNames; + while (name != NULL) { + if (MatchBaseName(ASN_RFC822_TYPE, + name->name, (int)XSTRLEN(name->name), + base->name, base->nameSz)) + return 0; + + name = name->next; + } + } + else if (base->type == ASN_DIR_TYPE) { + if (cert->subjectRawLen == base->nameSz && + XMEMCMP(cert->subjectRaw, base->name, base->nameSz) == 0) { + + return 0; + } + } + base = base->next; + } + } + + /* Check against the permitted list */ + if (signer->permittedNames != NULL) { + int needDns = 0; + int matchDns = 0; + int needEmail = 0; + int matchEmail = 0; + int needDir = 0; + int matchDir = 0; + Base_entry* base = signer->permittedNames; + + while (base != NULL) { + if (base->type == ASN_DNS_TYPE) { + DNS_entry* name = cert->altNames; + + if (name != NULL) + needDns = 1; + + while (name != NULL) { + matchDns = MatchBaseName(ASN_DNS_TYPE, + name->name, (int)XSTRLEN(name->name), + base->name, base->nameSz); + name = name->next; + } + } + else if (base->type == ASN_RFC822_TYPE) { + DNS_entry* name = cert->altEmailNames; + + if (name != NULL) + needEmail = 1; + + while (name != NULL) { + matchEmail = MatchBaseName(ASN_DNS_TYPE, + name->name, (int)XSTRLEN(name->name), + base->name, base->nameSz); + name = name->next; + } + } + else if (base->type == ASN_DIR_TYPE) { + needDir = 1; + if (cert->subjectRaw != NULL && + cert->subjectRawLen == base->nameSz && + XMEMCMP(cert->subjectRaw, base->name, base->nameSz) == 0) { + + matchDir = 1; + } + } + base = base->next; + } + + if ((needDns && !matchDns) || (needEmail && !matchEmail) || + (needDir && !matchDir)) { + + return 0; + } + } + + return 1; +} + +#endif /* IGNORE_NAME_CONSTRAINTS */ + + +static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0; + + CYASSL_ENTER("DecodeAltNames"); + + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tBad Sequence"); + return ASN_PARSE_E; + } + + while (length > 0) { + byte b = input[idx++]; + + length--; + + /* Save DNS Type names in the altNames list. */ + /* Save Other Type names in the cert's OidMap */ + if (b == (ASN_CONTEXT_SPECIFIC | ASN_DNS_TYPE)) { + DNS_entry* dnsEntry; + int strLen; + word32 lenStartIdx = idx; + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfail: str length"); + return ASN_PARSE_E; + } + length -= (idx - lenStartIdx); + + dnsEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), cert->heap, + DYNAMIC_TYPE_ALTNAME); + if (dnsEntry == NULL) { + CYASSL_MSG("\tOut of Memory"); + return ASN_PARSE_E; + } + + dnsEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, + DYNAMIC_TYPE_ALTNAME); + if (dnsEntry->name == NULL) { + CYASSL_MSG("\tOut of Memory"); + XFREE(dnsEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); + return ASN_PARSE_E; + } + + XMEMCPY(dnsEntry->name, &input[idx], strLen); + dnsEntry->name[strLen] = '\0'; + + dnsEntry->next = cert->altNames; + cert->altNames = dnsEntry; + + length -= strLen; + idx += strLen; + } +#ifndef IGNORE_NAME_CONSTRAINTS + else if (b == (ASN_CONTEXT_SPECIFIC | ASN_RFC822_TYPE)) { + DNS_entry* emailEntry; + int strLen; + word32 lenStartIdx = idx; + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfail: str length"); + return ASN_PARSE_E; + } + length -= (idx - lenStartIdx); + + emailEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), cert->heap, + DYNAMIC_TYPE_ALTNAME); + if (emailEntry == NULL) { + CYASSL_MSG("\tOut of Memory"); + return ASN_PARSE_E; + } + + emailEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, + DYNAMIC_TYPE_ALTNAME); + if (emailEntry->name == NULL) { + CYASSL_MSG("\tOut of Memory"); + XFREE(emailEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); + return ASN_PARSE_E; + } + + XMEMCPY(emailEntry->name, &input[idx], strLen); + emailEntry->name[strLen] = '\0'; + + emailEntry->next = cert->altEmailNames; + cert->altEmailNames = emailEntry; + + length -= strLen; + idx += strLen; + } +#endif /* IGNORE_NAME_CONSTRAINTS */ +#ifdef CYASSL_SEP + else if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_OTHER_TYPE)) + { + int strLen; + word32 lenStartIdx = idx; + word32 oid = 0; + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfail: other name length"); + return ASN_PARSE_E; + } + /* Consume the rest of this sequence. */ + length -= (strLen + idx - lenStartIdx); + + if (GetObjectId(input, &idx, &oid, sz) < 0) { + CYASSL_MSG("\tbad OID"); + return ASN_PARSE_E; + } + + if (oid != HW_NAME_OID) { + CYASSL_MSG("\tincorrect OID"); + return ASN_PARSE_E; + } + + if (input[idx++] != (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) { + CYASSL_MSG("\twrong type"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfail: str len"); + return ASN_PARSE_E; + } + + if (GetSequence(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tBad Sequence"); + return ASN_PARSE_E; + } + + if (input[idx++] != ASN_OBJECT_ID) { + CYASSL_MSG("\texpected OID"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfailed: str len"); + return ASN_PARSE_E; + } + + cert->hwType = (byte*)XMALLOC(strLen, cert->heap, 0); + if (cert->hwType == NULL) { + CYASSL_MSG("\tOut of Memory"); + return MEMORY_E; + } + + XMEMCPY(cert->hwType, &input[idx], strLen); + cert->hwTypeSz = strLen; + idx += strLen; + + if (input[idx++] != ASN_OCTET_STRING) { + CYASSL_MSG("\texpected Octet String"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfailed: str len"); + return ASN_PARSE_E; + } + + cert->hwSerialNum = (byte*)XMALLOC(strLen + 1, cert->heap, 0); + if (cert->hwSerialNum == NULL) { + CYASSL_MSG("\tOut of Memory"); + return MEMORY_E; + } + + XMEMCPY(cert->hwSerialNum, &input[idx], strLen); + cert->hwSerialNum[strLen] = '\0'; + cert->hwSerialNumSz = strLen; + idx += strLen; + } +#endif /* CYASSL_SEP */ + else { + int strLen; + word32 lenStartIdx = idx; + + CYASSL_MSG("\tUnsupported name type, skipping"); + + if (GetLength(input, &idx, &strLen, sz) < 0) { + CYASSL_MSG("\tfail: unsupported name length"); + return ASN_PARSE_E; + } + length -= (strLen + idx - lenStartIdx); + idx += strLen; + } + } + return 0; +} + + +static int DecodeBasicCaConstraint(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0; + + CYASSL_ENTER("DecodeBasicCaConstraint"); + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: bad SEQUENCE"); + return ASN_PARSE_E; + } + + if (length == 0) + return 0; + + /* If the basic ca constraint is false, this extension may be named, but + * left empty. So, if the length is 0, just return. */ + + if (input[idx++] != ASN_BOOLEAN) + { + CYASSL_MSG("\tfail: constraint not BOOLEAN"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) + { + CYASSL_MSG("\tfail: length"); + return ASN_PARSE_E; + } + + if (input[idx++]) + cert->isCA = 1; + + #ifdef OPENSSL_EXTRA + /* If there isn't any more data, return. */ + if (idx >= (word32)sz) + return 0; + + /* Anything left should be the optional pathlength */ + if (input[idx++] != ASN_INTEGER) { + CYASSL_MSG("\tfail: pathlen not INTEGER"); + return ASN_PARSE_E; + } + + if (input[idx++] != 1) { + CYASSL_MSG("\tfail: pathlen too long"); + return ASN_PARSE_E; + } + + cert->pathLength = input[idx]; + cert->extBasicConstPlSet = 1; + #endif /* OPENSSL_EXTRA */ + + return 0; +} + + +#define CRLDP_FULL_NAME 0 + /* From RFC3280 SS4.2.1.14, Distribution Point Name*/ +#define GENERALNAME_URI 6 + /* From RFC3280 SS4.2.1.7, GeneralName */ + +static int DecodeCrlDist(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0; + + CYASSL_ENTER("DecodeCrlDist"); + + /* Unwrap the list of Distribution Points*/ + if (GetSequence(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + /* Unwrap a single Distribution Point */ + if (GetSequence(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + /* The Distribution Point has three explicit optional members + * First check for a DistributionPointName + */ + if (input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) + { + idx++; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + if (input[idx] == + (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | CRLDP_FULL_NAME)) + { + idx++; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + if (input[idx] == (ASN_CONTEXT_SPECIFIC | GENERALNAME_URI)) + { + idx++; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + cert->extCrlInfoSz = length; + cert->extCrlInfo = input + idx; + idx += length; + } + else + /* This isn't a URI, skip it. */ + idx += length; + } + else + /* This isn't a FULLNAME, skip it. */ + idx += length; + } + + /* Check for reasonFlags */ + if (idx < (word32)sz && + input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) + { + idx++; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + idx += length; + } + + /* Check for cRLIssuer */ + if (idx < (word32)sz && + input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 2)) + { + idx++; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + idx += length; + } + + if (idx < (word32)sz) + { + CYASSL_MSG("\tThere are more CRL Distribution Point records, " + "but we only use the first one."); + } + + return 0; +} + + +static int DecodeAuthInfo(byte* input, int sz, DecodedCert* cert) +/* + * Read the first of the Authority Information Access records. If there are + * any issues, return without saving the record. + */ +{ + word32 idx = 0; + int length = 0; + byte b; + word32 oid; + + CYASSL_ENTER("DecodeAuthInfo"); + + /* Unwrap the list of AIAs */ + if (GetSequence(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + while (idx < (word32)sz) { + /* Unwrap a single AIA */ + if (GetSequence(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + oid = 0; + if (GetObjectId(input, &idx, &oid, sz) < 0) + return ASN_PARSE_E; + + /* Only supporting URIs right now. */ + b = input[idx++]; + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + if (b == (ASN_CONTEXT_SPECIFIC | GENERALNAME_URI) && + oid == AIA_OCSP_OID) + { + cert->extAuthInfoSz = length; + cert->extAuthInfo = input + idx; + break; + } + idx += length; + } + + return 0; +} + + +static int DecodeAuthKeyId(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0, ret = 0; + + CYASSL_ENTER("DecodeAuthKeyId"); + + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE\n"); + return ASN_PARSE_E; + } + + if (input[idx++] != (ASN_CONTEXT_SPECIFIC | 0)) { + CYASSL_MSG("\tfail: wanted OPTIONAL item 0, not available\n"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: extension data length"); + return ASN_PARSE_E; + } + + #ifdef OPENSSL_EXTRA + cert->extAuthKeyIdSrc = &input[idx]; + cert->extAuthKeyIdSz = length; + #endif /* OPENSSL_EXTRA */ + + if (length == SHA_SIZE) { + XMEMCPY(cert->extAuthKeyId, input + idx, length); + } + else { + Sha sha; + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, input + idx, length); + ShaFinal(&sha, cert->extAuthKeyId); + } + + return 0; +} + + +static int DecodeSubjKeyId(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0, ret = 0; + + CYASSL_ENTER("DecodeSubjKeyId"); + + if (input[idx++] != ASN_OCTET_STRING) { + CYASSL_MSG("\tfail: should be an OCTET STRING"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: extension data length"); + return ASN_PARSE_E; + } + + #ifdef OPENSSL_EXTRA + cert->extSubjKeyIdSrc = &input[idx]; + cert->extSubjKeyIdSz = length; + #endif /* OPENSSL_EXTRA */ + + if (length == SIGNER_DIGEST_SIZE) { + XMEMCPY(cert->extSubjKeyId, input + idx, length); + } + else { + Sha sha; + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, input + idx, length); + ShaFinal(&sha, cert->extSubjKeyId); + } + + return ret; +} + + +static int DecodeKeyUsage(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length; + byte unusedBits; + CYASSL_ENTER("DecodeKeyUsage"); + + if (input[idx++] != ASN_BIT_STRING) { + CYASSL_MSG("\tfail: key usage expected bit string"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: key usage bad length"); + return ASN_PARSE_E; + } + + unusedBits = input[idx++]; + length--; + + if (length == 2) { + cert->extKeyUsage = (word16)((input[idx] << 8) | input[idx+1]); + cert->extKeyUsage >>= unusedBits; + } + else if (length == 1) + cert->extKeyUsage = (word16)(input[idx] << 1); + + return 0; +} + + +static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0, oid; + int length; + + CYASSL_ENTER("DecodeExtKeyUsage"); + + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE"); + return ASN_PARSE_E; + } + + #ifdef OPENSSL_EXTRA + cert->extExtKeyUsageSrc = input + idx; + cert->extExtKeyUsageSz = length; + #endif + + while (idx < (word32)sz) { + if (GetObjectId(input, &idx, &oid, sz) < 0) + return ASN_PARSE_E; + + switch (oid) { + case EKU_ANY_OID: + cert->extExtKeyUsage |= EXTKEYUSE_ANY; + break; + case EKU_SERVER_AUTH_OID: + cert->extExtKeyUsage |= EXTKEYUSE_SERVER_AUTH; + break; + case EKU_CLIENT_AUTH_OID: + cert->extExtKeyUsage |= EXTKEYUSE_CLIENT_AUTH; + break; + case EKU_OCSP_SIGN_OID: + cert->extExtKeyUsage |= EXTKEYUSE_OCSP_SIGN; + break; + } + + #ifdef OPENSSL_EXTRA + cert->extExtKeyUsageCount++; + #endif + } + + return 0; +} + + +#ifndef IGNORE_NAME_CONSTRAINTS +static int DecodeSubtree(byte* input, int sz, Base_entry** head, void* heap) +{ + word32 idx = 0; + + (void)heap; + + while (idx < (word32)sz) { + int seqLength, strLength; + word32 nameIdx; + byte b; + + if (GetSequence(input, &idx, &seqLength, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE"); + return ASN_PARSE_E; + } + + nameIdx = idx; + b = input[nameIdx++]; + if (GetLength(input, &nameIdx, &strLength, sz) <= 0) { + CYASSL_MSG("\tinvalid length"); + return ASN_PARSE_E; + } + + if (b == (ASN_CONTEXT_SPECIFIC | ASN_DNS_TYPE) || + b == (ASN_CONTEXT_SPECIFIC | ASN_RFC822_TYPE) || + b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_DIR_TYPE)) { + + Base_entry* entry = (Base_entry*)XMALLOC(sizeof(Base_entry), + heap, DYNAMIC_TYPE_ALTNAME); + + if (entry == NULL) { + CYASSL_MSG("allocate error"); + return MEMORY_E; + } + + entry->name = (char*)XMALLOC(strLength, heap, DYNAMIC_TYPE_ALTNAME); + if (entry->name == NULL) { + CYASSL_MSG("allocate error"); + return MEMORY_E; + } + + XMEMCPY(entry->name, &input[nameIdx], strLength); + entry->nameSz = strLength; + entry->type = b & 0x0F; + + entry->next = *head; + *head = entry; + } + + idx += seqLength; + } + + return 0; +} + + +static int DecodeNameConstraints(byte* input, int sz, DecodedCert* cert) +{ + word32 idx = 0; + int length = 0; + + CYASSL_ENTER("DecodeNameConstraints"); + + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE"); + return ASN_PARSE_E; + } + + while (idx < (word32)sz) { + byte b = input[idx++]; + Base_entry** subtree = NULL; + + if (GetLength(input, &idx, &length, sz) <= 0) { + CYASSL_MSG("\tinvalid length"); + return ASN_PARSE_E; + } + + if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 0)) + subtree = &cert->permittedNames; + else if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 1)) + subtree = &cert->excludedNames; + else { + CYASSL_MSG("\tinvalid subtree"); + return ASN_PARSE_E; + } + + DecodeSubtree(input + idx, length, subtree, cert->heap); + + idx += length; + } + + return 0; +} +#endif /* IGNORE_NAME_CONSTRAINTS */ + + +#ifdef CYASSL_SEP + static int DecodeCertPolicy(byte* input, int sz, DecodedCert* cert) + { + word32 idx = 0; + int length = 0; + + CYASSL_ENTER("DecodeCertPolicy"); + + /* Unwrap certificatePolicies */ + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tdeviceType isn't OID"); + return ASN_PARSE_E; + } + + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tdeviceType isn't OID"); + return ASN_PARSE_E; + } + + if (input[idx++] != ASN_OBJECT_ID) { + CYASSL_MSG("\tdeviceType isn't OID"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tCouldn't read length of deviceType"); + return ASN_PARSE_E; + } + + if (length > 0) { + cert->deviceType = (byte*)XMALLOC(length, cert->heap, 0); + if (cert->deviceType == NULL) { + CYASSL_MSG("\tCouldn't alloc memory for deviceType"); + return MEMORY_E; + } + cert->deviceTypeSz = length; + XMEMCPY(cert->deviceType, input + idx, length); + } + + CYASSL_LEAVE("DecodeCertPolicy", 0); + return 0; + } +#endif /* CYASSL_SEP */ + + +static int DecodeCertExtensions(DecodedCert* cert) +/* + * Processing the Certificate Extensions. This does not modify the current + * index. It is works starting with the recorded extensions pointer. + */ +{ + word32 idx = 0; + int sz = cert->extensionsSz; + byte* input = cert->extensions; + int length; + word32 oid; + byte critical = 0; + byte criticalFail = 0; + + CYASSL_ENTER("DecodeCertExtensions"); + + if (input == NULL || sz == 0) + return BAD_FUNC_ARG; + + if (input[idx++] != ASN_EXTENSIONS) + return ASN_PARSE_E; + + if (GetLength(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + if (GetSequence(input, &idx, &length, sz) < 0) + return ASN_PARSE_E; + + while (idx < (word32)sz) { + if (GetSequence(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE"); + return ASN_PARSE_E; + } + + oid = 0; + if (GetObjectId(input, &idx, &oid, sz) < 0) { + CYASSL_MSG("\tfail: OBJECT ID"); + return ASN_PARSE_E; + } + + /* check for critical flag */ + critical = 0; + if (input[idx] == ASN_BOOLEAN) { + int boolLength = 0; + idx++; + if (GetLength(input, &idx, &boolLength, sz) < 0) { + CYASSL_MSG("\tfail: critical boolean length"); + return ASN_PARSE_E; + } + if (input[idx++]) + critical = 1; + } + + /* process the extension based on the OID */ + if (input[idx++] != ASN_OCTET_STRING) { + CYASSL_MSG("\tfail: should be an OCTET STRING"); + return ASN_PARSE_E; + } + + if (GetLength(input, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: extension data length"); + return ASN_PARSE_E; + } + + switch (oid) { + case BASIC_CA_OID: + #ifdef OPENSSL_EXTRA + cert->extBasicConstSet = 1; + cert->extBasicConstCrit = critical; + #endif + if (DecodeBasicCaConstraint(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case CRL_DIST_OID: + if (DecodeCrlDist(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case AUTH_INFO_OID: + if (DecodeAuthInfo(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case ALT_NAMES_OID: + #ifdef OPENSSL_EXTRA + cert->extSubjAltNameSet = 1; + cert->extSubjAltNameCrit = critical; + #endif + if (DecodeAltNames(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case AUTH_KEY_OID: + cert->extAuthKeyIdSet = 1; + #ifdef OPENSSL_EXTRA + cert->extAuthKeyIdCrit = critical; + #endif + if (DecodeAuthKeyId(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case SUBJ_KEY_OID: + cert->extSubjKeyIdSet = 1; + #ifdef OPENSSL_EXTRA + cert->extSubjKeyIdCrit = critical; + #endif + if (DecodeSubjKeyId(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case CERT_POLICY_OID: + CYASSL_MSG("Certificate Policy extension not supported yet."); + #ifdef CYASSL_SEP + #ifdef OPENSSL_EXTRA + cert->extCertPolicySet = 1; + cert->extCertPolicyCrit = critical; + #endif + if (DecodeCertPolicy(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + #endif + break; + + case KEY_USAGE_OID: + cert->extKeyUsageSet = 1; + #ifdef OPENSSL_EXTRA + cert->extKeyUsageCrit = critical; + #endif + if (DecodeKeyUsage(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + case EXT_KEY_USAGE_OID: + cert->extExtKeyUsageSet = 1; + #ifdef OPENSSL_EXTRA + cert->extExtKeyUsageCrit = critical; + #endif + if (DecodeExtKeyUsage(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + + #ifndef IGNORE_NAME_CONSTRAINTS + case NAME_CONS_OID: + cert->extNameConstraintSet = 1; + #ifdef OPENSSL_EXTRA + cert->extNameConstraintCrit = critical; + #endif + if (DecodeNameConstraints(&input[idx], length, cert) < 0) + return ASN_PARSE_E; + break; + #endif /* IGNORE_NAME_CONSTRAINTS */ + + case INHIBIT_ANY_OID: + CYASSL_MSG("Inhibit anyPolicy extension not supported yet."); + break; + + default: + /* While it is a failure to not support critical extensions, + * still parse the certificate ignoring the unsupported + * extention to allow caller to accept it with the verify + * callback. */ + if (critical) + criticalFail = 1; + break; + } + idx += length; + } + + return criticalFail ? ASN_CRIT_EXT_E : 0; +} + + +int ParseCert(DecodedCert* cert, int type, int verify, void* cm) +{ + int ret; + char* ptr; + + ret = ParseCertRelative(cert, type, verify, cm); + if (ret < 0) + return ret; + + if (cert->subjectCNLen > 0) { + ptr = (char*) XMALLOC(cert->subjectCNLen + 1, cert->heap, + DYNAMIC_TYPE_SUBJECT_CN); + if (ptr == NULL) + return MEMORY_E; + XMEMCPY(ptr, cert->subjectCN, cert->subjectCNLen); + ptr[cert->subjectCNLen] = '\0'; + cert->subjectCN = ptr; + cert->subjectCNStored = 1; + } + + if (cert->keyOID == RSAk && + cert->publicKey != NULL && cert->pubKeySize > 0) { + ptr = (char*) XMALLOC(cert->pubKeySize, cert->heap, + DYNAMIC_TYPE_PUBLIC_KEY); + if (ptr == NULL) + return MEMORY_E; + XMEMCPY(ptr, cert->publicKey, cert->pubKeySize); + cert->publicKey = (byte *)ptr; + cert->pubKeyStored = 1; + } + + return ret; +} + + +/* from SSL proper, for locking can't do find here anymore */ +#ifdef __cplusplus + extern "C" { +#endif + CYASSL_LOCAL Signer* GetCA(void* signers, byte* hash); + #ifndef NO_SKID + CYASSL_LOCAL Signer* GetCAByName(void* signers, byte* hash); + #endif +#ifdef __cplusplus + } +#endif + + +int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm) +{ + word32 confirmOID; + int ret; + int badDate = 0; + int criticalExt = 0; + + if ((ret = DecodeToKey(cert, verify)) < 0) { + if (ret == ASN_BEFORE_DATE_E || ret == ASN_AFTER_DATE_E) + badDate = ret; + else + return ret; + } + + CYASSL_MSG("Parsed Past Key"); + + if (cert->srcIdx < cert->sigIndex) { + #ifndef ALLOW_V1_EXTENSIONS + if (cert->version < 2) { + CYASSL_MSG(" v1 and v2 certs not allowed extensions"); + return ASN_VERSION_E; + } + #endif + /* save extensions */ + cert->extensions = &cert->source[cert->srcIdx]; + cert->extensionsSz = cert->sigIndex - cert->srcIdx; + cert->extensionsIdx = cert->srcIdx; /* for potential later use */ + + if ((ret = DecodeCertExtensions(cert)) < 0) { + if (ret == ASN_CRIT_EXT_E) + criticalExt = ret; + else + return ret; + } + + /* advance past extensions */ + cert->srcIdx = cert->sigIndex; + } + + if ((ret = GetAlgoId(cert->source, &cert->srcIdx, &confirmOID, + cert->maxIdx)) < 0) + return ret; + + if ((ret = GetSignature(cert)) < 0) + return ret; + + if (confirmOID != cert->signatureOID) + return ASN_SIG_OID_E; + + #ifndef NO_SKID + if (cert->extSubjKeyIdSet == 0 + && cert->publicKey != NULL && cert->pubKeySize > 0) { + Sha sha; + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, cert->publicKey, cert->pubKeySize); + ShaFinal(&sha, cert->extSubjKeyId); + } + #endif + + if (verify && type != CA_TYPE) { + Signer* ca = NULL; + #ifndef NO_SKID + if (cert->extAuthKeyIdSet) + ca = GetCA(cm, cert->extAuthKeyId); + if (ca == NULL) + ca = GetCAByName(cm, cert->issuerHash); + #else /* NO_SKID */ + ca = GetCA(cm, cert->issuerHash); + #endif /* NO SKID */ + CYASSL_MSG("About to verify certificate signature"); + + if (ca) { +#ifdef HAVE_OCSP + /* Need the ca's public key hash for OCSP */ + { + Sha sha; + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, ca->publicKey, ca->pubKeySize); + ShaFinal(&sha, cert->issuerKeyHash); + } +#endif /* HAVE_OCSP */ + /* try to confirm/verify signature */ + if (!ConfirmSignature(cert->source + cert->certBegin, + cert->sigIndex - cert->certBegin, + ca->publicKey, ca->pubKeySize, ca->keyOID, + cert->signature, cert->sigLength, cert->signatureOID, + cert->heap)) { + CYASSL_MSG("Confirm signature failed"); + return ASN_SIG_CONFIRM_E; + } +#ifndef IGNORE_NAME_CONSTRAINTS + /* check that this cert's name is permitted by the signer's + * name constraints */ + if (!ConfirmNameConstraints(ca, cert)) { + CYASSL_MSG("Confirm name constraint failed"); + return ASN_NAME_INVALID_E; + } +#endif /* IGNORE_NAME_CONSTRAINTS */ + } + else { + /* no signer */ + CYASSL_MSG("No CA signer to verify with"); + return ASN_NO_SIGNER_E; + } + } + + if (badDate != 0) + return badDate; + + if (criticalExt != 0) + return criticalExt; + + return 0; +} + + +/* Create and init an new signer */ +Signer* MakeSigner(void* heap) +{ + Signer* signer = (Signer*) XMALLOC(sizeof(Signer), heap, + DYNAMIC_TYPE_SIGNER); + if (signer) { + signer->pubKeySize = 0; + signer->keyOID = 0; + signer->publicKey = NULL; + signer->nameLen = 0; + signer->name = NULL; + #ifndef IGNORE_NAME_CONSTRAINTS + signer->permittedNames = NULL; + signer->excludedNames = NULL; + #endif /* IGNORE_NAME_CONSTRAINTS */ + signer->next = NULL; + } + (void)heap; + + return signer; +} + + +/* Free an individual signer */ +void FreeSigner(Signer* signer, void* heap) +{ + XFREE(signer->name, heap, DYNAMIC_TYPE_SUBJECT_CN); + XFREE(signer->publicKey, heap, DYNAMIC_TYPE_PUBLIC_KEY); + #ifndef IGNORE_NAME_CONSTRAINTS + if (signer->permittedNames) + FreeNameSubtrees(signer->permittedNames, heap); + if (signer->excludedNames) + FreeNameSubtrees(signer->excludedNames, heap); + #endif + XFREE(signer, heap, DYNAMIC_TYPE_SIGNER); + + (void)heap; +} + + +/* Free the whole singer table with number of rows */ +void FreeSignerTable(Signer** table, int rows, void* heap) +{ + int i; + + for (i = 0; i < rows; i++) { + Signer* signer = table[i]; + while (signer) { + Signer* next = signer->next; + FreeSigner(signer, heap); + signer = next; + } + table[i] = NULL; + } +} + + +CYASSL_LOCAL int SetMyVersion(word32 version, byte* output, int header) +{ + int i = 0; + + if (header) { + output[i++] = ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED; + output[i++] = ASN_BIT_STRING; + } + output[i++] = ASN_INTEGER; + output[i++] = 0x01; + output[i++] = (byte)version; + + return i; +} + + +CYASSL_LOCAL int SetSerialNumber(const byte* sn, word32 snSz, byte* output) +{ + int result = 0; + + CYASSL_ENTER("SetSerialNumber"); + + if (snSz <= EXTERNAL_SERIAL_SIZE) { + output[0] = ASN_INTEGER; + /* The serial number is always positive. When encoding the + * INTEGER, if the MSB is 1, add a padding zero to keep the + * number positive. */ + if (sn[0] & 0x80) { + output[1] = (byte)snSz + 1; + output[2] = 0; + XMEMCPY(&output[3], sn, snSz); + result = snSz + 3; + } + else { + output[1] = (byte)snSz; + XMEMCPY(&output[2], sn, snSz); + result = snSz + 2; + } + } + return result; +} + + + + +#if defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) + +/* convert der buffer to pem into output, can't do inplace, der and output + need to be different */ +int DerToPem(const byte* der, word32 derSz, byte* output, word32 outSz, + int type) +{ + char header[80]; + char footer[80]; + + int headerLen; + int footerLen; + int i; + int err; + int outLen; /* return length or error */ + + if (der == output) /* no in place conversion */ + return BAD_FUNC_ARG; + + if (type == CERT_TYPE) { + XSTRNCPY(header, "-----BEGIN CERTIFICATE-----\n", sizeof(header)); + XSTRNCPY(footer, "-----END CERTIFICATE-----\n", sizeof(footer)); + } + else if (type == PRIVATEKEY_TYPE) { + XSTRNCPY(header, "-----BEGIN RSA PRIVATE KEY-----\n", sizeof(header)); + XSTRNCPY(footer, "-----END RSA PRIVATE KEY-----\n", sizeof(footer)); + } + #ifdef HAVE_ECC + else if (type == ECC_PRIVATEKEY_TYPE) { + XSTRNCPY(header, "-----BEGIN EC PRIVATE KEY-----\n", sizeof(header)); + XSTRNCPY(footer, "-----END EC PRIVATE KEY-----\n", sizeof(footer)); + } + #endif + #ifdef CYASSL_CERT_REQ + else if (type == CERTREQ_TYPE) + { + XSTRNCPY(header, + "-----BEGIN CERTIFICATE REQUEST-----\n", sizeof(header)); + XSTRNCPY(footer, "-----END CERTIFICATE REQUEST-----\n", sizeof(footer)); + } + #endif + else + return BAD_FUNC_ARG; + + headerLen = (int)XSTRLEN(header); + footerLen = (int)XSTRLEN(footer); + + if (!der || !output) + return BAD_FUNC_ARG; + + /* don't even try if outSz too short */ + if (outSz < headerLen + footerLen + derSz) + return BAD_FUNC_ARG; + + /* header */ + XMEMCPY(output, header, headerLen); + i = headerLen; + + /* body */ + outLen = outSz - (headerLen + footerLen); /* input to Base64_Encode */ + if ( (err = Base64_Encode(der, derSz, output + i, (word32*)&outLen)) < 0) + return err; + i += outLen; + + /* footer */ + if ( (i + footerLen) > (int)outSz) + return BAD_FUNC_ARG; + XMEMCPY(output + i, footer, footerLen); + + return outLen + headerLen + footerLen; +} + + +#endif /* CYASSL_KEY_GEN || CYASSL_CERT_GEN */ + + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) + + +static mp_int* GetRsaInt(RsaKey* key, int idx) +{ + if (idx == 0) + return &key->n; + if (idx == 1) + return &key->e; + if (idx == 2) + return &key->d; + if (idx == 3) + return &key->p; + if (idx == 4) + return &key->q; + if (idx == 5) + return &key->dP; + if (idx == 6) + return &key->dQ; + if (idx == 7) + return &key->u; + + return NULL; +} + + +/* Release Tmp RSA resources */ +static INLINE void FreeTmpRsas(byte** tmps, void* heap) +{ + int i; + + (void)heap; + + for (i = 0; i < RSA_INTS; i++) + XFREE(tmps[i], heap, DYNAMIC_TYPE_RSA); +} + + +/* Convert RsaKey key to DER format, write to output (inLen), return bytes + written */ +int RsaKeyToDer(RsaKey* key, byte* output, word32 inLen) +{ + word32 seqSz, verSz, rawLen, intTotalLen = 0; + word32 sizes[RSA_INTS]; + int i, j, outLen, ret = 0; + + byte seq[MAX_SEQ_SZ]; + byte ver[MAX_VERSION_SZ]; + byte* tmps[RSA_INTS]; + + if (!key || !output) + return BAD_FUNC_ARG; + + if (key->type != RSA_PRIVATE) + return BAD_FUNC_ARG; + + for (i = 0; i < RSA_INTS; i++) + tmps[i] = NULL; + + /* write all big ints from key to DER tmps */ + for (i = 0; i < RSA_INTS; i++) { + mp_int* keyInt = GetRsaInt(key, i); + rawLen = mp_unsigned_bin_size(keyInt); + tmps[i] = (byte*)XMALLOC(rawLen + MAX_SEQ_SZ, key->heap, + DYNAMIC_TYPE_RSA); + if (tmps[i] == NULL) { + ret = MEMORY_E; + break; + } + + tmps[i][0] = ASN_INTEGER; + sizes[i] = SetLength(rawLen, tmps[i] + 1) + 1; /* int tag */ + + if (sizes[i] <= MAX_SEQ_SZ) { + int err = mp_to_unsigned_bin(keyInt, tmps[i] + sizes[i]); + if (err == MP_OKAY) { + sizes[i] += rawLen; + intTotalLen += sizes[i]; + } + else { + ret = err; + break; + } + } + else { + ret = ASN_INPUT_E; + break; + } + } + + if (ret != 0) { + FreeTmpRsas(tmps, key->heap); + return ret; + } + + /* make headers */ + verSz = SetMyVersion(0, ver, FALSE); + seqSz = SetSequence(verSz + intTotalLen, seq); + + outLen = seqSz + verSz + intTotalLen; + if (outLen > (int)inLen) + return BAD_FUNC_ARG; + + /* write to output */ + XMEMCPY(output, seq, seqSz); + j = seqSz; + XMEMCPY(output + j, ver, verSz); + j += verSz; + + for (i = 0; i < RSA_INTS; i++) { + XMEMCPY(output + j, tmps[i], sizes[i]); + j += sizes[i]; + } + FreeTmpRsas(tmps, key->heap); + + return outLen; +} + +#endif /* CYASSL_KEY_GEN && !NO_RSA */ + + +#if defined(CYASSL_CERT_GEN) && !defined(NO_RSA) + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +/* Initialize and Set Certficate defaults: + version = 3 (0x2) + serial = 0 + sigType = SHA_WITH_RSA + issuer = blank + daysValid = 500 + selfSigned = 1 (true) use subject as issuer + subject = blank +*/ +void InitCert(Cert* cert) +{ + cert->version = 2; /* version 3 is hex 2 */ + cert->sigType = CTC_SHAwRSA; + cert->daysValid = 500; + cert->selfSigned = 1; + cert->isCA = 0; + cert->bodySz = 0; +#ifdef CYASSL_ALT_NAMES + cert->altNamesSz = 0; + cert->beforeDateSz = 0; + cert->afterDateSz = 0; +#endif + cert->keyType = RSA_KEY; + XMEMSET(cert->serial, 0, CTC_SERIAL_SIZE); + + cert->issuer.country[0] = '\0'; + cert->issuer.state[0] = '\0'; + cert->issuer.locality[0] = '\0'; + cert->issuer.sur[0] = '\0'; + cert->issuer.org[0] = '\0'; + cert->issuer.unit[0] = '\0'; + cert->issuer.commonName[0] = '\0'; + cert->issuer.email[0] = '\0'; + + cert->subject.country[0] = '\0'; + cert->subject.state[0] = '\0'; + cert->subject.locality[0] = '\0'; + cert->subject.sur[0] = '\0'; + cert->subject.org[0] = '\0'; + cert->subject.unit[0] = '\0'; + cert->subject.commonName[0] = '\0'; + cert->subject.email[0] = '\0'; + +#ifdef CYASSL_CERT_REQ + cert->challengePw[0] ='\0'; +#endif +} + + +/* DER encoded x509 Certificate */ +typedef struct DerCert { + byte size[MAX_LENGTH_SZ]; /* length encoded */ + byte version[MAX_VERSION_SZ]; /* version encoded */ + byte serial[CTC_SERIAL_SIZE + MAX_LENGTH_SZ]; /* serial number encoded */ + byte sigAlgo[MAX_ALGO_SZ]; /* signature algo encoded */ + byte issuer[ASN_NAME_MAX]; /* issuer encoded */ + byte subject[ASN_NAME_MAX]; /* subject encoded */ + byte validity[MAX_DATE_SIZE*2 + MAX_SEQ_SZ*2]; /* before and after dates */ + byte publicKey[MAX_PUBLIC_KEY_SZ]; /* rsa / ntru public key encoded */ + byte ca[MAX_CA_SZ]; /* basic constraint CA true size */ + byte extensions[MAX_EXTENSIONS_SZ]; /* all extensions */ +#ifdef CYASSL_CERT_REQ + byte attrib[MAX_ATTRIB_SZ]; /* Cert req attributes encoded */ +#endif + int sizeSz; /* encoded size length */ + int versionSz; /* encoded version length */ + int serialSz; /* encoded serial length */ + int sigAlgoSz; /* enocded sig alog length */ + int issuerSz; /* encoded issuer length */ + int subjectSz; /* encoded subject length */ + int validitySz; /* encoded validity length */ + int publicKeySz; /* encoded public key length */ + int caSz; /* encoded CA extension length */ + int extensionsSz; /* encoded extensions total length */ + int total; /* total encoded lengths */ +#ifdef CYASSL_CERT_REQ + int attribSz; +#endif +} DerCert; + + +#ifdef CYASSL_CERT_REQ + +/* Write a set header to output */ +static word32 SetUTF8String(word32 len, byte* output) +{ + output[0] = ASN_UTF8STRING; + return SetLength(len, output + 1) + 1; +} + +#endif /* CYASSL_CERT_REQ */ + + +/* Write a serial number to output */ +static int SetSerial(const byte* serial, byte* output) +{ + int length = 0; + + output[length++] = ASN_INTEGER; + length += SetLength(CTC_SERIAL_SIZE, &output[length]); + XMEMCPY(&output[length], serial, CTC_SERIAL_SIZE); + + return length + CTC_SERIAL_SIZE; +} + + +#ifdef HAVE_ECC + +/* Write a public ECC key to output */ +static int SetEccPublicKey(byte* output, ecc_key* key) +{ + byte algo[MAX_ALGO_SZ]; + byte curve[MAX_ALGO_SZ]; + byte len[MAX_LENGTH_SZ + 1]; /* trailing 0 */ + byte pub[ECC_BUFSIZE]; + int algoSz; + int curveSz; + int lenSz; + int idx; + word32 pubSz = sizeof(pub); + + int ret = ecc_export_x963(key, pub, &pubSz); + if (ret != 0) return ret; + + /* headers */ + curveSz = SetCurve(key, curve); + if (curveSz <= 0) return curveSz; + + algoSz = SetAlgoID(ECDSAk, algo, keyType, curveSz); + lenSz = SetLength(pubSz + 1, len); + len[lenSz++] = 0; /* trailing 0 */ + + /* write */ + idx = SetSequence(pubSz + curveSz + lenSz + 1 + algoSz, output); + /* 1 is for ASN_BIT_STRING */ + /* algo */ + XMEMCPY(output + idx, algo, algoSz); + idx += algoSz; + /* curve */ + XMEMCPY(output + idx, curve, curveSz); + idx += curveSz; + /* bit string */ + output[idx++] = ASN_BIT_STRING; + /* length */ + XMEMCPY(output + idx, len, lenSz); + idx += lenSz; + /* pub */ + XMEMCPY(output + idx, pub, pubSz); + idx += pubSz; + + return idx; +} + + +#endif /* HAVE_ECC */ + + +/* Write a public RSA key to output */ +static int SetRsaPublicKey(byte* output, RsaKey* key) +{ + byte n[MAX_RSA_INT_SZ]; + byte e[MAX_RSA_E_SZ]; + byte algo[MAX_ALGO_SZ]; + byte seq[MAX_SEQ_SZ]; + byte len[MAX_LENGTH_SZ + 1]; /* trailing 0 */ + int nSz; + int eSz; + int algoSz; + int seqSz; + int lenSz; + int idx; + int rawLen; + int leadingBit; + int err; + + /* n */ + leadingBit = mp_leading_bit(&key->n); + rawLen = mp_unsigned_bin_size(&key->n) + leadingBit; + n[0] = ASN_INTEGER; + nSz = SetLength(rawLen, n + 1) + 1; /* int tag */ + + if ( (nSz + rawLen) < (int)sizeof(n)) { + if (leadingBit) + n[nSz] = 0; + err = mp_to_unsigned_bin(&key->n, n + nSz + leadingBit); + if (err == MP_OKAY) + nSz += rawLen; + else + return MP_TO_E; + } + else + return BUFFER_E; + + /* e */ + leadingBit = mp_leading_bit(&key->e); + rawLen = mp_unsigned_bin_size(&key->e) + leadingBit; + e[0] = ASN_INTEGER; + eSz = SetLength(rawLen, e + 1) + 1; /* int tag */ + + if ( (eSz + rawLen) < (int)sizeof(e)) { + if (leadingBit) + e[eSz] = 0; + err = mp_to_unsigned_bin(&key->e, e + eSz + leadingBit); + if (err == MP_OKAY) + eSz += rawLen; + else + return MP_TO_E; + } + else + return BUFFER_E; + + /* headers */ + algoSz = SetAlgoID(RSAk, algo, keyType, 0); + seqSz = SetSequence(nSz + eSz, seq); + lenSz = SetLength(seqSz + nSz + eSz + 1, len); + len[lenSz++] = 0; /* trailing 0 */ + + /* write */ + idx = SetSequence(nSz + eSz + seqSz + lenSz + 1 + algoSz, output); + /* 1 is for ASN_BIT_STRING */ + /* algo */ + XMEMCPY(output + idx, algo, algoSz); + idx += algoSz; + /* bit string */ + output[idx++] = ASN_BIT_STRING; + /* length */ + XMEMCPY(output + idx, len, lenSz); + idx += lenSz; + /* seq */ + XMEMCPY(output + idx, seq, seqSz); + idx += seqSz; + /* n */ + XMEMCPY(output + idx, n, nSz); + idx += nSz; + /* e */ + XMEMCPY(output + idx, e, eSz); + idx += eSz; + + return idx; +} + + +static INLINE byte itob(int number) +{ + return (byte)number + 0x30; +} + + +/* write time to output, format */ +static void SetTime(struct tm* date, byte* output) +{ + int i = 0; + + output[i++] = itob((date->tm_year % 10000) / 1000); + output[i++] = itob((date->tm_year % 1000) / 100); + output[i++] = itob((date->tm_year % 100) / 10); + output[i++] = itob( date->tm_year % 10); + + output[i++] = itob(date->tm_mon / 10); + output[i++] = itob(date->tm_mon % 10); + + output[i++] = itob(date->tm_mday / 10); + output[i++] = itob(date->tm_mday % 10); + + output[i++] = itob(date->tm_hour / 10); + output[i++] = itob(date->tm_hour % 10); + + output[i++] = itob(date->tm_min / 10); + output[i++] = itob(date->tm_min % 10); + + output[i++] = itob(date->tm_sec / 10); + output[i++] = itob(date->tm_sec % 10); + + output[i] = 'Z'; /* Zulu profile */ +} + + +#ifdef CYASSL_ALT_NAMES + +/* Copy Dates from cert, return bytes written */ +static int CopyValidity(byte* output, Cert* cert) +{ + int seqSz; + + CYASSL_ENTER("CopyValidity"); + + /* headers and output */ + seqSz = SetSequence(cert->beforeDateSz + cert->afterDateSz, output); + XMEMCPY(output + seqSz, cert->beforeDate, cert->beforeDateSz); + XMEMCPY(output + seqSz + cert->beforeDateSz, cert->afterDate, + cert->afterDateSz); + return seqSz + cert->beforeDateSz + cert->afterDateSz; +} + +#endif + + +/* Set Date validity from now until now + daysValid */ +static int SetValidity(byte* output, int daysValid) +{ + byte before[MAX_DATE_SIZE]; + byte after[MAX_DATE_SIZE]; + + int beforeSz; + int afterSz; + int seqSz; + + time_t ticks; + struct tm* now; + struct tm local; + + ticks = XTIME(0); + now = XGMTIME(&ticks); + + /* before now */ + local = *now; + before[0] = ASN_GENERALIZED_TIME; + beforeSz = SetLength(ASN_GEN_TIME_SZ, before + 1) + 1; /* gen tag */ + + /* subtract 1 day for more compliance */ + local.tm_mday -= 1; + mktime(&local); + + /* adjust */ + local.tm_year += 1900; + local.tm_mon += 1; + + SetTime(&local, before + beforeSz); + beforeSz += ASN_GEN_TIME_SZ; + + /* after now + daysValid */ + local = *now; + after[0] = ASN_GENERALIZED_TIME; + afterSz = SetLength(ASN_GEN_TIME_SZ, after + 1) + 1; /* gen tag */ + + /* add daysValid */ + local.tm_mday += daysValid; + mktime(&local); + + /* adjust */ + local.tm_year += 1900; + local.tm_mon += 1; + + SetTime(&local, after + afterSz); + afterSz += ASN_GEN_TIME_SZ; + + /* headers and output */ + seqSz = SetSequence(beforeSz + afterSz, output); + XMEMCPY(output + seqSz, before, beforeSz); + XMEMCPY(output + seqSz + beforeSz, after, afterSz); + + return seqSz + beforeSz + afterSz; +} + + +/* ASN Encoded Name field */ +typedef struct EncodedName { + int nameLen; /* actual string value length */ + int totalLen; /* total encoded length */ + int type; /* type of name */ + int used; /* are we actually using this one */ + byte encoded[CTC_NAME_SIZE * 2]; /* encoding */ +} EncodedName; + + +/* Get Which Name from index */ +static const char* GetOneName(CertName* name, int idx) +{ + switch (idx) { + case 0: + return name->country; + + case 1: + return name->state; + + case 2: + return name->locality; + + case 3: + return name->sur; + + case 4: + return name->org; + + case 5: + return name->unit; + + case 6: + return name->commonName; + + case 7: + return name->email; + + default: + return 0; + } +} + + +/* Get ASN Name from index */ +static byte GetNameId(int idx) +{ + switch (idx) { + case 0: + return ASN_COUNTRY_NAME; + + case 1: + return ASN_STATE_NAME; + + case 2: + return ASN_LOCALITY_NAME; + + case 3: + return ASN_SUR_NAME; + + case 4: + return ASN_ORG_NAME; + + case 5: + return ASN_ORGUNIT_NAME; + + case 6: + return ASN_COMMON_NAME; + + case 7: + /* email uses different id type */ + return 0; + + default: + return 0; + } +} + + +/* encode all extensions, return total bytes written */ +static int SetExtensions(byte* output, const byte* ext, int extSz, int header) +{ + byte sequence[MAX_SEQ_SZ]; + byte len[MAX_LENGTH_SZ]; + + int sz = 0; + int seqSz = SetSequence(extSz, sequence); + + if (header) { + int lenSz = SetLength(seqSz + extSz, len); + output[0] = ASN_EXTENSIONS; /* extensions id */ + sz++; + XMEMCPY(&output[sz], len, lenSz); /* length */ + sz += lenSz; + } + XMEMCPY(&output[sz], sequence, seqSz); /* sequence */ + sz += seqSz; + XMEMCPY(&output[sz], ext, extSz); /* extensions */ + sz += extSz; + + return sz; +} + + +/* encode CA basic constraint true, return total bytes written */ +static int SetCa(byte* output) +{ + static const byte ca[] = { 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, + 0x05, 0x30, 0x03, 0x01, 0x01, 0xff }; + + XMEMCPY(output, ca, sizeof(ca)); + + return (int)sizeof(ca); +} + + +/* encode CertName into output, return total bytes written */ +static int SetName(byte* output, CertName* name) +{ + int totalBytes = 0, i, idx; + EncodedName names[NAME_ENTRIES]; + + for (i = 0; i < NAME_ENTRIES; i++) { + const char* nameStr = GetOneName(name, i); + if (nameStr) { + /* bottom up */ + byte firstLen[MAX_LENGTH_SZ]; + byte secondLen[MAX_LENGTH_SZ]; + byte sequence[MAX_SEQ_SZ]; + byte set[MAX_SET_SZ]; + + int email = i == (NAME_ENTRIES - 1) ? 1 : 0; + int strLen = (int)XSTRLEN(nameStr); + int thisLen = strLen; + int firstSz, secondSz, seqSz, setSz; + + if (strLen == 0) { /* no user data for this item */ + names[i].used = 0; + continue; + } + + secondSz = SetLength(strLen, secondLen); + thisLen += secondSz; + if (email) { + thisLen += EMAIL_JOINT_LEN; + thisLen ++; /* id type */ + firstSz = SetLength(EMAIL_JOINT_LEN, firstLen); + } + else { + thisLen++; /* str type */ + thisLen++; /* id type */ + thisLen += JOINT_LEN; + firstSz = SetLength(JOINT_LEN + 1, firstLen); + } + thisLen += firstSz; + thisLen++; /* object id */ + + seqSz = SetSequence(thisLen, sequence); + thisLen += seqSz; + setSz = SetSet(thisLen, set); + thisLen += setSz; + + if (thisLen > (int)sizeof(names[i].encoded)) + return BUFFER_E; + + /* store it */ + idx = 0; + /* set */ + XMEMCPY(names[i].encoded, set, setSz); + idx += setSz; + /* seq */ + XMEMCPY(names[i].encoded + idx, sequence, seqSz); + idx += seqSz; + /* asn object id */ + names[i].encoded[idx++] = ASN_OBJECT_ID; + /* first length */ + XMEMCPY(names[i].encoded + idx, firstLen, firstSz); + idx += firstSz; + if (email) { + const byte EMAIL_OID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x09, 0x01, 0x16 }; + /* email joint id */ + XMEMCPY(names[i].encoded + idx, EMAIL_OID, sizeof(EMAIL_OID)); + idx += (int)sizeof(EMAIL_OID); + } + else { + /* joint id */ + byte bType = GetNameId(i); + names[i].encoded[idx++] = 0x55; + names[i].encoded[idx++] = 0x04; + /* id type */ + names[i].encoded[idx++] = bType; + /* str type */ + if (bType == ASN_COUNTRY_NAME) + names[i].encoded[idx++] = 0x13; /* printable */ + else + names[i].encoded[idx++] = 0x0c; /* utf8 */ + } + /* second length */ + XMEMCPY(names[i].encoded + idx, secondLen, secondSz); + idx += secondSz; + /* str value */ + XMEMCPY(names[i].encoded + idx, nameStr, strLen); + idx += strLen; + + totalBytes += idx; + names[i].totalLen = idx; + names[i].used = 1; + } + else + names[i].used = 0; + } + + /* header */ + idx = SetSequence(totalBytes, output); + totalBytes += idx; + if (totalBytes > ASN_NAME_MAX) + return BUFFER_E; + + for (i = 0; i < NAME_ENTRIES; i++) { + if (names[i].used) { + XMEMCPY(output + idx, names[i].encoded, names[i].totalLen); + idx += names[i].totalLen; + } + } + return totalBytes; +} + +/* encode info from cert into DER encoded format */ +static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey, + RNG* rng, const byte* ntruKey, word16 ntruSz) +{ + int ret; + + (void)eccKey; + (void)ntruKey; + (void)ntruSz; + + /* init */ + XMEMSET(der, 0, sizeof(DerCert)); + + /* version */ + der->versionSz = SetMyVersion(cert->version, der->version, TRUE); + + /* serial number */ + ret = RNG_GenerateBlock(rng, cert->serial, CTC_SERIAL_SIZE); + if (ret != 0) + return ret; + + cert->serial[0] = 0x01; /* ensure positive */ + der->serialSz = SetSerial(cert->serial, der->serial); + + /* signature algo */ + der->sigAlgoSz = SetAlgoID(cert->sigType, der->sigAlgo, sigType, 0); + if (der->sigAlgoSz == 0) + return ALGO_ID_E; + + /* public key */ + if (cert->keyType == RSA_KEY) { + if (rsaKey == NULL) + return PUBLIC_KEY_E; + der->publicKeySz = SetRsaPublicKey(der->publicKey, rsaKey); + if (der->publicKeySz <= 0) + return PUBLIC_KEY_E; + } + +#ifdef HAVE_ECC + if (cert->keyType == ECC_KEY) { + if (eccKey == NULL) + return PUBLIC_KEY_E; + der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey); + if (der->publicKeySz <= 0) + return PUBLIC_KEY_E; + } +#endif /* HAVE_ECC */ + +#ifdef HAVE_NTRU + if (cert->keyType == NTRU_KEY) { + word32 rc; + word16 encodedSz; + + rc = crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( ntruSz, + ntruKey, &encodedSz, NULL); + if (rc != NTRU_OK) + return PUBLIC_KEY_E; + if (encodedSz > MAX_PUBLIC_KEY_SZ) + return PUBLIC_KEY_E; + + rc = crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( ntruSz, + ntruKey, &encodedSz, der->publicKey); + if (rc != NTRU_OK) + return PUBLIC_KEY_E; + + der->publicKeySz = encodedSz; + } +#endif /* HAVE_NTRU */ + + der->validitySz = 0; +#ifdef CYASSL_ALT_NAMES + /* date validity copy ? */ + if (cert->beforeDateSz && cert->afterDateSz) { + der->validitySz = CopyValidity(der->validity, cert); + if (der->validitySz == 0) + return DATE_E; + } +#endif + + /* date validity */ + if (der->validitySz == 0) { + der->validitySz = SetValidity(der->validity, cert->daysValid); + if (der->validitySz == 0) + return DATE_E; + } + + /* subject name */ + der->subjectSz = SetName(der->subject, &cert->subject); + if (der->subjectSz == 0) + return SUBJECT_E; + + /* issuer name */ + der->issuerSz = SetName(der->issuer, cert->selfSigned ? + &cert->subject : &cert->issuer); + if (der->issuerSz == 0) + return ISSUER_E; + + /* CA */ + if (cert->isCA) { + der->caSz = SetCa(der->ca); + if (der->caSz == 0) + return CA_TRUE_E; + } + else + der->caSz = 0; + + /* extensions, just CA now */ + if (cert->isCA) { + der->extensionsSz = SetExtensions(der->extensions, + der->ca, der->caSz, TRUE); + if (der->extensionsSz == 0) + return EXTENSIONS_E; + } + else + der->extensionsSz = 0; + +#ifdef CYASSL_ALT_NAMES + if (der->extensionsSz == 0 && cert->altNamesSz) { + der->extensionsSz = SetExtensions(der->extensions, cert->altNames, + cert->altNamesSz, TRUE); + if (der->extensionsSz == 0) + return EXTENSIONS_E; + } +#endif + + der->total = der->versionSz + der->serialSz + der->sigAlgoSz + + der->publicKeySz + der->validitySz + der->subjectSz + der->issuerSz + + der->extensionsSz; + + return 0; +} + + +/* write DER encoded cert to buffer, size already checked */ +static int WriteCertBody(DerCert* der, byte* buffer) +{ + int idx; + + /* signed part header */ + idx = SetSequence(der->total, buffer); + /* version */ + XMEMCPY(buffer + idx, der->version, der->versionSz); + idx += der->versionSz; + /* serial */ + XMEMCPY(buffer + idx, der->serial, der->serialSz); + idx += der->serialSz; + /* sig algo */ + XMEMCPY(buffer + idx, der->sigAlgo, der->sigAlgoSz); + idx += der->sigAlgoSz; + /* issuer */ + XMEMCPY(buffer + idx, der->issuer, der->issuerSz); + idx += der->issuerSz; + /* validity */ + XMEMCPY(buffer + idx, der->validity, der->validitySz); + idx += der->validitySz; + /* subject */ + XMEMCPY(buffer + idx, der->subject, der->subjectSz); + idx += der->subjectSz; + /* public key */ + XMEMCPY(buffer + idx, der->publicKey, der->publicKeySz); + idx += der->publicKeySz; + if (der->extensionsSz) { + /* extensions */ + XMEMCPY(buffer + idx, der->extensions, min(der->extensionsSz, + sizeof(der->extensions))); + idx += der->extensionsSz; + } + + return idx; +} + + +/* Make RSA signature from buffer (sz), write to sig (sigSz) */ +static int MakeSignature(const byte* buffer, int sz, byte* sig, int sigSz, + RsaKey* rsaKey, ecc_key* eccKey, RNG* rng, + int sigAlgoType) +{ + byte digest[SHA256_DIGEST_SIZE]; /* max size */ + byte encSig[MAX_ENCODED_DIG_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ]; + int encSigSz, digestSz, typeH, ret = 0; + + (void)eccKey; + + if (sigAlgoType == CTC_MD5wRSA) { + Md5 md5; + + InitMd5(&md5); + Md5Update(&md5, buffer, sz); + Md5Final(&md5, digest); + + digestSz = MD5_DIGEST_SIZE; + typeH = MD5h; + } + else if (sigAlgoType == CTC_SHAwRSA || sigAlgoType == CTC_SHAwECDSA) { + Sha sha; + + ret = InitSha(&sha); + if (ret != 0) + return ret; + + ShaUpdate(&sha, buffer, sz); + ShaFinal(&sha, digest); + + digestSz = SHA_DIGEST_SIZE; + typeH = SHAh; + } + else if (sigAlgoType == CTC_SHA256wRSA || sigAlgoType == CTC_SHA256wECDSA) { + Sha256 sha256; + + ret = InitSha256(&sha256); + if (ret != 0) + return ret; + + ret = Sha256Update(&sha256, buffer, sz); + if (ret != 0) + return ret; + + ret = Sha256Final(&sha256, digest); + if (ret != 0) + return ret; + + digestSz = SHA256_DIGEST_SIZE; + typeH = SHA256h; + } + else + return ALGO_ID_E; + + if (rsaKey) { + /* signature */ + encSigSz = EncodeSignature(encSig, digest, digestSz, typeH); + return RsaSSL_Sign(encSig, encSigSz, sig, sigSz, rsaKey, rng); + } +#ifdef HAVE_ECC + else if (eccKey) { + word32 outSz = sigSz; + ret = ecc_sign_hash(digest, digestSz, sig, &outSz, rng, eccKey); + + if (ret != 0) + return ret; + return outSz; + } +#endif /* HAVE_ECC */ + + return ALGO_ID_E; +} + + +/* add signature to end of buffer, size of buffer assumed checked, return + new length */ +static int AddSignature(byte* buffer, int bodySz, const byte* sig, int sigSz, + int sigAlgoType) +{ + byte seq[MAX_SEQ_SZ]; + int idx = bodySz, seqSz; + + /* algo */ + idx += SetAlgoID(sigAlgoType, buffer + idx, sigType, 0); + /* bit string */ + buffer[idx++] = ASN_BIT_STRING; + /* length */ + idx += SetLength(sigSz + 1, buffer + idx); + buffer[idx++] = 0; /* trailing 0 */ + /* signature */ + XMEMCPY(buffer + idx, sig, sigSz); + idx += sigSz; + + /* make room for overall header */ + seqSz = SetSequence(idx, seq); + XMEMMOVE(buffer + seqSz, buffer, idx); + XMEMCPY(buffer, seq, seqSz); + + return idx + seqSz; +} + + +/* Make an x509 Certificate v3 any key type from cert input, write to buffer */ +static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, + RsaKey* rsaKey, ecc_key* eccKey, RNG* rng, + const byte* ntruKey, word16 ntruSz) +{ + DerCert der; + int ret; + + if (eccKey) + cert->keyType = ECC_KEY; + else + cert->keyType = rsaKey ? RSA_KEY : NTRU_KEY; + ret = EncodeCert(cert, &der, rsaKey, eccKey, rng, ntruKey, ntruSz); + if (ret != 0) + return ret; + + if (der.total + MAX_SEQ_SZ * 2 > (int)derSz) + return BUFFER_E; + + return cert->bodySz = WriteCertBody(&der, derBuffer); +} + + +/* Make an x509 Certificate v3 RSA or ECC from cert input, write to buffer */ +int MakeCert(Cert* cert, byte* derBuffer, word32 derSz, RsaKey* rsaKey, + ecc_key* eccKey, RNG* rng) +{ + return MakeAnyCert(cert, derBuffer, derSz, rsaKey, eccKey, rng, NULL, 0); +} + + +#ifdef HAVE_NTRU + +int MakeNtruCert(Cert* cert, byte* derBuffer, word32 derSz, + const byte* ntruKey, word16 keySz, RNG* rng) +{ + return MakeAnyCert(cert, derBuffer, derSz, NULL, NULL, rng, ntruKey, keySz); +} + +#endif /* HAVE_NTRU */ + + +#ifdef CYASSL_CERT_REQ + +static int SetReqAttrib(byte* output, char* pw, int extSz) +{ + static const byte cpOid[] = + { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, + 0x09, 0x07 }; + static const byte erOid[] = + { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, + 0x09, 0x0e }; + + int sz = 0; /* overall size */ + int cpSz = 0; /* Challenge Password section size */ + int cpSeqSz = 0; + int cpSetSz = 0; + int cpStrSz = 0; + int pwSz = 0; + int erSz = 0; /* Extension Request section size */ + int erSeqSz = 0; + int erSetSz = 0; + byte cpSeq[MAX_SEQ_SZ]; + byte cpSet[MAX_SET_SZ]; + byte cpStr[MAX_PRSTR_SZ]; + byte erSeq[MAX_SEQ_SZ]; + byte erSet[MAX_SET_SZ]; + + output[0] = 0xa0; + sz++; + + if (pw && pw[0]) { + pwSz = (int)XSTRLEN(pw); + cpStrSz = SetUTF8String(pwSz, cpStr); + cpSetSz = SetSet(cpStrSz + pwSz, cpSet); + cpSeqSz = SetSequence(sizeof(cpOid) + cpSetSz + cpStrSz + pwSz, cpSeq); + cpSz = cpSeqSz + sizeof(cpOid) + cpSetSz + cpStrSz + pwSz; + } + + if (extSz) { + erSetSz = SetSet(extSz, erSet); + erSeqSz = SetSequence(erSetSz + sizeof(erOid) + extSz, erSeq); + erSz = extSz + erSetSz + erSeqSz + sizeof(erOid); + } + + /* Put the pieces together. */ + sz += SetLength(cpSz + erSz, &output[sz]); + + if (cpSz) { + XMEMCPY(&output[sz], cpSeq, cpSeqSz); + sz += cpSeqSz; + XMEMCPY(&output[sz], cpOid, sizeof(cpOid)); + sz += sizeof(cpOid); + XMEMCPY(&output[sz], cpSet, cpSetSz); + sz += cpSetSz; + XMEMCPY(&output[sz], cpStr, cpStrSz); + sz += cpStrSz; + XMEMCPY(&output[sz], pw, pwSz); + sz += pwSz; + } + + if (erSz) { + XMEMCPY(&output[sz], erSeq, erSeqSz); + sz += erSeqSz; + XMEMCPY(&output[sz], erOid, sizeof(erOid)); + sz += sizeof(erOid); + XMEMCPY(&output[sz], erSet, erSetSz); + sz += erSetSz; + /* The actual extension data will be tacked onto the output later. */ + } + + return sz; +} + + +/* encode info from cert into DER encoded format */ +static int EncodeCertReq(Cert* cert, DerCert* der, + RsaKey* rsaKey, ecc_key* eccKey) +{ + (void)eccKey; + + /* init */ + XMEMSET(der, 0, sizeof(DerCert)); + + /* version */ + der->versionSz = SetMyVersion(cert->version, der->version, FALSE); + + /* subject name */ + der->subjectSz = SetName(der->subject, &cert->subject); + if (der->subjectSz == 0) + return SUBJECT_E; + + /* public key */ + if (cert->keyType == RSA_KEY) { + if (rsaKey == NULL) + return PUBLIC_KEY_E; + der->publicKeySz = SetRsaPublicKey(der->publicKey, rsaKey); + if (der->publicKeySz <= 0) + return PUBLIC_KEY_E; + } + +#ifdef HAVE_ECC + if (cert->keyType == ECC_KEY) { + if (eccKey == NULL) + return PUBLIC_KEY_E; + der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey); + if (der->publicKeySz <= 0) + return PUBLIC_KEY_E; + } +#endif /* HAVE_ECC */ + + /* CA */ + if (cert->isCA) { + der->caSz = SetCa(der->ca); + if (der->caSz == 0) + return CA_TRUE_E; + } + else + der->caSz = 0; + + /* extensions, just CA now */ + if (cert->isCA) { + der->extensionsSz = SetExtensions(der->extensions, + der->ca, der->caSz, FALSE); + if (der->extensionsSz == 0) + return EXTENSIONS_E; + } + else + der->extensionsSz = 0; + + der->attribSz = SetReqAttrib(der->attrib, + cert->challengePw, der->extensionsSz); + if (der->attribSz == 0) + return REQ_ATTRIBUTE_E; + + der->total = der->versionSz + der->subjectSz + der->publicKeySz + + der->extensionsSz + der->attribSz; + + return 0; +} + + +/* write DER encoded cert req to buffer, size already checked */ +static int WriteCertReqBody(DerCert* der, byte* buffer) +{ + int idx; + + /* signed part header */ + idx = SetSequence(der->total, buffer); + /* version */ + XMEMCPY(buffer + idx, der->version, der->versionSz); + idx += der->versionSz; + /* subject */ + XMEMCPY(buffer + idx, der->subject, der->subjectSz); + idx += der->subjectSz; + /* public key */ + XMEMCPY(buffer + idx, der->publicKey, der->publicKeySz); + idx += der->publicKeySz; + /* attributes */ + XMEMCPY(buffer + idx, der->attrib, der->attribSz); + idx += der->attribSz; + /* extensions */ + if (der->extensionsSz) { + XMEMCPY(buffer + idx, der->extensions, min(der->extensionsSz, + sizeof(der->extensions))); + idx += der->extensionsSz; + } + + return idx; +} + + +int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, + RsaKey* rsaKey, ecc_key* eccKey) +{ + DerCert der; + int ret; + + cert->keyType = (eccKey != NULL) ? ECC_KEY : RSA_KEY; + ret = EncodeCertReq(cert, &der, rsaKey, eccKey); + if (ret != 0) + return ret; + + if (der.total + MAX_SEQ_SZ * 2 > (int)derSz) + return BUFFER_E; + + return cert->bodySz = WriteCertReqBody(&der, derBuffer); +} + +#endif /* CYASSL_CERT_REQ */ + + +int SignCert(int requestSz, int sType, byte* buffer, word32 buffSz, + RsaKey* rsaKey, ecc_key* eccKey, RNG* rng) +{ + byte sig[MAX_ENCODED_SIG_SZ]; + int sigSz; + + if (requestSz < 0) + return requestSz; + + sigSz = MakeSignature(buffer, requestSz, sig, sizeof(sig), rsaKey, eccKey, + rng, sType); + if (sigSz < 0) + return sigSz; + + if (requestSz + MAX_SEQ_SZ * 2 + sigSz > (int)buffSz) + return BUFFER_E; + + return AddSignature(buffer, requestSz, sig, sigSz, sType); +} + + +int MakeSelfCert(Cert* cert, byte* buffer, word32 buffSz, RsaKey* key, RNG* rng) +{ + int ret = MakeCert(cert, buffer, buffSz, key, NULL, rng); + + if (ret < 0) + return ret; + + return SignCert(cert->bodySz, cert->sigType, buffer, buffSz, key, NULL,rng); +} + + +#ifdef CYASSL_ALT_NAMES + +/* Set Alt Names from der cert, return 0 on success */ +static int SetAltNamesFromCert(Cert* cert, const byte* der, int derSz) +{ + DecodedCert decoded; + int ret; + + if (derSz < 0) + return derSz; + + InitDecodedCert(&decoded, (byte*)der, derSz, 0); + ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); + + if (ret < 0) { + FreeDecodedCert(&decoded); + return ret; + } + + if (decoded.extensions) { + byte b; + int length; + word32 maxExtensionsIdx; + + decoded.srcIdx = decoded.extensionsIdx; + b = decoded.source[decoded.srcIdx++]; + if (b != ASN_EXTENSIONS) { + FreeDecodedCert(&decoded); + return ASN_PARSE_E; + } + + if (GetLength(decoded.source, &decoded.srcIdx, &length, + decoded.maxIdx) < 0) { + FreeDecodedCert(&decoded); + return ASN_PARSE_E; + } + + if (GetSequence(decoded.source, &decoded.srcIdx, &length, + decoded.maxIdx) < 0) { + FreeDecodedCert(&decoded); + return ASN_PARSE_E; + } + + maxExtensionsIdx = decoded.srcIdx + length; + + while (decoded.srcIdx < maxExtensionsIdx) { + word32 oid; + word32 startIdx = decoded.srcIdx; + word32 tmpIdx; + + if (GetSequence(decoded.source, &decoded.srcIdx, &length, + decoded.maxIdx) < 0) { + FreeDecodedCert(&decoded); + return ASN_PARSE_E; + } + + tmpIdx = decoded.srcIdx; + decoded.srcIdx = startIdx; + + if (GetAlgoId(decoded.source, &decoded.srcIdx, &oid, + decoded.maxIdx) < 0) { + FreeDecodedCert(&decoded); + return ASN_PARSE_E; + } + + if (oid == ALT_NAMES_OID) { + cert->altNamesSz = length + (tmpIdx - startIdx); + + if (cert->altNamesSz < (int)sizeof(cert->altNames)) + XMEMCPY(cert->altNames, &decoded.source[startIdx], + cert->altNamesSz); + else { + cert->altNamesSz = 0; + CYASSL_MSG("AltNames extensions too big"); + FreeDecodedCert(&decoded); + return ALT_NAME_E; + } + } + decoded.srcIdx = tmpIdx + length; + } + } + FreeDecodedCert(&decoded); + + return 0; +} + + +/* Set Dates from der cert, return 0 on success */ +static int SetDatesFromCert(Cert* cert, const byte* der, int derSz) +{ + DecodedCert decoded; + int ret; + + CYASSL_ENTER("SetDatesFromCert"); + if (derSz < 0) + return derSz; + + InitDecodedCert(&decoded, (byte*)der, derSz, 0); + ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); + + if (ret < 0) { + CYASSL_MSG("ParseCertRelative error"); + FreeDecodedCert(&decoded); + return ret; + } + + if (decoded.beforeDate == NULL || decoded.afterDate == NULL) { + CYASSL_MSG("Couldn't extract dates"); + FreeDecodedCert(&decoded); + return -1; + } + + if (decoded.beforeDateLen > MAX_DATE_SIZE || decoded.afterDateLen > + MAX_DATE_SIZE) { + CYASSL_MSG("Bad date size"); + FreeDecodedCert(&decoded); + return -1; + } + + XMEMCPY(cert->beforeDate, decoded.beforeDate, decoded.beforeDateLen); + XMEMCPY(cert->afterDate, decoded.afterDate, decoded.afterDateLen); + + cert->beforeDateSz = decoded.beforeDateLen; + cert->afterDateSz = decoded.afterDateLen; + + return 0; +} + + +#endif /* CYASSL_ALT_NAMES && !NO_RSA */ + + +/* Set cn name from der buffer, return 0 on success */ +static int SetNameFromCert(CertName* cn, const byte* der, int derSz) +{ + DecodedCert decoded; + int ret; + int sz; + + if (derSz < 0) + return derSz; + + InitDecodedCert(&decoded, (byte*)der, derSz, 0); + ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); + + if (ret < 0) + return ret; + + if (decoded.subjectCN) { + sz = (decoded.subjectCNLen < CTC_NAME_SIZE) ? decoded.subjectCNLen : + CTC_NAME_SIZE - 1; + strncpy(cn->commonName, decoded.subjectCN, CTC_NAME_SIZE); + cn->commonName[sz] = 0; + } + if (decoded.subjectC) { + sz = (decoded.subjectCLen < CTC_NAME_SIZE) ? decoded.subjectCLen : + CTC_NAME_SIZE - 1; + strncpy(cn->country, decoded.subjectC, CTC_NAME_SIZE); + cn->country[sz] = 0; + } + if (decoded.subjectST) { + sz = (decoded.subjectSTLen < CTC_NAME_SIZE) ? decoded.subjectSTLen : + CTC_NAME_SIZE - 1; + strncpy(cn->state, decoded.subjectST, CTC_NAME_SIZE); + cn->state[sz] = 0; + } + if (decoded.subjectL) { + sz = (decoded.subjectLLen < CTC_NAME_SIZE) ? decoded.subjectLLen : + CTC_NAME_SIZE - 1; + strncpy(cn->locality, decoded.subjectL, CTC_NAME_SIZE); + cn->locality[sz] = 0; + } + if (decoded.subjectO) { + sz = (decoded.subjectOLen < CTC_NAME_SIZE) ? decoded.subjectOLen : + CTC_NAME_SIZE - 1; + strncpy(cn->org, decoded.subjectO, CTC_NAME_SIZE); + cn->org[sz] = 0; + } + if (decoded.subjectOU) { + sz = (decoded.subjectOULen < CTC_NAME_SIZE) ? decoded.subjectOULen : + CTC_NAME_SIZE - 1; + strncpy(cn->unit, decoded.subjectOU, CTC_NAME_SIZE); + cn->unit[sz] = 0; + } + if (decoded.subjectSN) { + sz = (decoded.subjectSNLen < CTC_NAME_SIZE) ? decoded.subjectSNLen : + CTC_NAME_SIZE - 1; + strncpy(cn->sur, decoded.subjectSN, CTC_NAME_SIZE); + cn->sur[sz] = 0; + } + if (decoded.subjectEmail) { + sz = (decoded.subjectEmailLen < CTC_NAME_SIZE) ? + decoded.subjectEmailLen : CTC_NAME_SIZE - 1; + strncpy(cn->email, decoded.subjectEmail, CTC_NAME_SIZE); + cn->email[sz] = 0; + } + + FreeDecodedCert(&decoded); + + return 0; +} + + +#ifndef NO_FILESYSTEM + +/* forward from CyaSSL */ +int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz); + +/* Set cert issuer from issuerFile in PEM */ +int SetIssuer(Cert* cert, const char* issuerFile) +{ + int ret; + int derSz; + byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); + + if (der == NULL) { + CYASSL_MSG("SetIssuer OOF Problem"); + return MEMORY_E; + } + derSz = CyaSSL_PemCertToDer(issuerFile, der, EIGHTK_BUF); + cert->selfSigned = 0; + ret = SetNameFromCert(&cert->issuer, der, derSz); + XFREE(der, NULL, DYNAMIC_TYPE_CERT); + + return ret; +} + + +/* Set cert subject from subjectFile in PEM */ +int SetSubject(Cert* cert, const char* subjectFile) +{ + int ret; + int derSz; + byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); + + if (der == NULL) { + CYASSL_MSG("SetSubject OOF Problem"); + return MEMORY_E; + } + derSz = CyaSSL_PemCertToDer(subjectFile, der, EIGHTK_BUF); + ret = SetNameFromCert(&cert->subject, der, derSz); + XFREE(der, NULL, DYNAMIC_TYPE_CERT); + + return ret; +} + + +#ifdef CYASSL_ALT_NAMES + +/* Set atl names from file in PEM */ +int SetAltNames(Cert* cert, const char* file) +{ + int ret; + int derSz; + byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); + + if (der == NULL) { + CYASSL_MSG("SetAltNames OOF Problem"); + return MEMORY_E; + } + derSz = CyaSSL_PemCertToDer(file, der, EIGHTK_BUF); + ret = SetAltNamesFromCert(cert, der, derSz); + XFREE(der, NULL, DYNAMIC_TYPE_CERT); + + return ret; +} + +#endif /* CYASSL_ALT_NAMES */ + +#endif /* NO_FILESYSTEM */ + +/* Set cert issuer from DER buffer */ +int SetIssuerBuffer(Cert* cert, const byte* der, int derSz) +{ + cert->selfSigned = 0; + return SetNameFromCert(&cert->issuer, der, derSz); +} + + +/* Set cert subject from DER buffer */ +int SetSubjectBuffer(Cert* cert, const byte* der, int derSz) +{ + return SetNameFromCert(&cert->subject, der, derSz); +} + + +#ifdef CYASSL_ALT_NAMES + +/* Set cert alt names from DER buffer */ +int SetAltNamesBuffer(Cert* cert, const byte* der, int derSz) +{ + return SetAltNamesFromCert(cert, der, derSz); +} + +/* Set cert dates from DER buffer */ +int SetDatesBuffer(Cert* cert, const byte* der, int derSz) +{ + return SetDatesFromCert(cert, der, derSz); +} + +#endif /* CYASSL_ALT_NAMES */ + +#endif /* CYASSL_CERT_GEN */ + + +#ifdef HAVE_ECC + +/* Der Encode r & s ints into out, outLen is (in/out) size */ +int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, mp_int* s) +{ + word32 idx = 0; + word32 rSz; /* encoding size */ + word32 sSz; + word32 headerSz = 4; /* 2*ASN_TAG + 2*LEN(ENUM) */ + + /* If the leading bit on the INTEGER is a 1, add a leading zero */ + int rLeadingZero = mp_leading_bit(r); + int sLeadingZero = mp_leading_bit(s); + int rLen = mp_unsigned_bin_size(r); /* big int size */ + int sLen = mp_unsigned_bin_size(s); + int err; + + if (*outLen < (rLen + rLeadingZero + sLen + sLeadingZero + + headerSz + 2)) /* SEQ_TAG + LEN(ENUM) */ + return BAD_FUNC_ARG; + + idx = SetSequence(rLen+rLeadingZero+sLen+sLeadingZero+headerSz, out); + + /* store r */ + out[idx++] = ASN_INTEGER; + rSz = SetLength(rLen + rLeadingZero, &out[idx]); + idx += rSz; + if (rLeadingZero) + out[idx++] = 0; + err = mp_to_unsigned_bin(r, &out[idx]); + if (err != MP_OKAY) return err; + idx += rLen; + + /* store s */ + out[idx++] = ASN_INTEGER; + sSz = SetLength(sLen + sLeadingZero, &out[idx]); + idx += sSz; + if (sLeadingZero) + out[idx++] = 0; + err = mp_to_unsigned_bin(s, &out[idx]); + if (err != MP_OKAY) return err; + idx += sLen; + + *outLen = idx; + + return 0; +} + + +/* Der Decode ECC-DSA Signautre, r & s stored as big ints */ +int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, mp_int* r, mp_int* s) +{ + word32 idx = 0; + int len = 0; + + if (GetSequence(sig, &idx, &len, sigLen) < 0) + return ASN_ECC_KEY_E; + + if ((word32)len > (sigLen - idx)) + return ASN_ECC_KEY_E; + + if (GetInt(r, sig, &idx, sigLen) < 0) + return ASN_ECC_KEY_E; + + if (GetInt(s, sig, &idx, sigLen) < 0) + return ASN_ECC_KEY_E; + + return 0; +} + + +int EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key, + word32 inSz) +{ + word32 oid = 0; + int version, length; + int privSz, pubSz; + byte b; + byte priv[ECC_MAXSIZE]; + byte pub[ECC_MAXSIZE * 2 + 1]; /* public key has two parts plus header */ + + if (input == NULL || inOutIdx == NULL || key == NULL || inSz == 0) + return BAD_FUNC_ARG; + + if (GetSequence(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(input, inOutIdx, &version) < 0) + return ASN_PARSE_E; + + b = input[*inOutIdx]; + *inOutIdx += 1; + + /* priv type */ + if (b != 4 && b != 6 && b != 7) + return ASN_PARSE_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + /* priv key */ + privSz = length; + XMEMCPY(priv, &input[*inOutIdx], privSz); + *inOutIdx += length; + + /* prefix 0, may have */ + b = input[*inOutIdx]; + if (b == ECC_PREFIX_0) { + *inOutIdx += 1; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + /* object id */ + b = input[*inOutIdx]; + *inOutIdx += 1; + + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + while(length--) { + oid += input[*inOutIdx]; + *inOutIdx += 1; + } + if (CheckCurve(oid) < 0) + return ECC_CURVE_OID_E; + } + + /* prefix 1 */ + b = input[*inOutIdx]; + *inOutIdx += 1; + if (b != ECC_PREFIX_1) + return ASN_ECC_KEY_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + + /* key header */ + b = input[*inOutIdx]; + *inOutIdx += 1; + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(input, inOutIdx, &length, inSz) < 0) + return ASN_PARSE_E; + b = input[*inOutIdx]; + *inOutIdx += 1; + if (b != 0x00) + return ASN_EXPECT_0_E; + + pubSz = length - 1; /* null prefix */ + XMEMCPY(pub, &input[*inOutIdx], pubSz); + + *inOutIdx += length; + + return ecc_import_private_key(priv, privSz, pub, pubSz, key); +} + +#endif /* HAVE_ECC */ + + +#if defined(HAVE_OCSP) || defined(HAVE_CRL) + +/* Get raw Date only, no processing, 0 on success */ +static int GetBasicDate(const byte* source, word32* idx, byte* date, + byte* format, int maxIdx) +{ + int length; + + CYASSL_ENTER("GetBasicDate"); + + *format = source[*idx]; + *idx += 1; + if (*format != ASN_UTC_TIME && *format != ASN_GENERALIZED_TIME) + return ASN_TIME_E; + + if (GetLength(source, idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + if (length > MAX_DATE_SIZE || length < MIN_DATE_SIZE) + return ASN_DATE_SZ_E; + + XMEMCPY(date, &source[*idx], length); + *idx += length; + + return 0; +} + +#endif + + +#ifdef HAVE_OCSP + +static int GetEnumerated(const byte* input, word32* inOutIdx, int *value) +{ + word32 idx = *inOutIdx; + word32 len; + + CYASSL_ENTER("GetEnumerated"); + + *value = 0; + + if (input[idx++] != ASN_ENUMERATED) + return ASN_PARSE_E; + + len = input[idx++]; + if (len > 4) + return ASN_PARSE_E; + + while (len--) { + *value = *value << 8 | input[idx++]; + } + + *inOutIdx = idx; + + return *value; +} + + +static int DecodeSingleResponse(byte* source, + word32* ioIndex, OcspResponse* resp, word32 size) +{ + word32 idx = *ioIndex, prevIndex, oid; + int length, wrapperSz; + CertStatus* cs = resp->status; + + CYASSL_ENTER("DecodeSingleResponse"); + + /* Outer wrapper of the SEQUENCE OF Single Responses. */ + if (GetSequence(source, &idx, &wrapperSz, size) < 0) + return ASN_PARSE_E; + + prevIndex = idx; + + /* When making a request, we only request one status on one certificate + * at a time. There should only be one SingleResponse */ + + /* Wrapper around the Single Response */ + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + /* Wrapper around the CertID */ + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + /* Skip the hash algorithm */ + if (GetAlgoId(source, &idx, &oid, size) < 0) + return ASN_PARSE_E; + /* Save reference to the hash of CN */ + if (source[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + resp->issuerHash = source + idx; + idx += length; + /* Save reference to the hash of the issuer public key */ + if (source[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + resp->issuerKeyHash = source + idx; + idx += length; + + /* Read the serial number, it is handled as a string, not as a + * proper number. Just XMEMCPY the data over, rather than load it + * as an mp_int. */ + if (source[idx++] != ASN_INTEGER) + return ASN_PARSE_E; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + if (length <= EXTERNAL_SERIAL_SIZE) + { + if (source[idx] == 0) + { + idx++; + length--; + } + XMEMCPY(cs->serial, source + idx, length); + cs->serialSz = length; + } + else + { + return ASN_GETINT_E; + } + idx += length; + + /* CertStatus */ + switch (source[idx++]) + { + case (ASN_CONTEXT_SPECIFIC | CERT_GOOD): + cs->status = CERT_GOOD; + idx++; + break; + case (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | CERT_REVOKED): + cs->status = CERT_REVOKED; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + idx += length; + break; + case (ASN_CONTEXT_SPECIFIC | CERT_UNKNOWN): + cs->status = CERT_UNKNOWN; + idx++; + break; + default: + return ASN_PARSE_E; + } + + if (GetBasicDate(source, &idx, cs->thisDate, + &cs->thisDateFormat, size) < 0) + return ASN_PARSE_E; + if (!XVALIDATE_DATE(cs->thisDate, cs->thisDateFormat, BEFORE)) + return ASN_BEFORE_DATE_E; + + /* The following items are optional. Only check for them if there is more + * unprocessed data in the singleResponse wrapper. */ + + if (((int)(idx - prevIndex) < wrapperSz) && + (source[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))) + { + idx++; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + if (GetBasicDate(source, &idx, cs->nextDate, + &cs->nextDateFormat, size) < 0) + return ASN_PARSE_E; + } + if (((int)(idx - prevIndex) < wrapperSz) && + (source[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1))) + { + idx++; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + idx += length; + } + + *ioIndex = idx; + + return 0; +} + +static int DecodeOcspRespExtensions(byte* source, + word32* ioIndex, OcspResponse* resp, word32 sz) +{ + word32 idx = *ioIndex; + int length; + int ext_bound; /* boundary index for the sequence of extensions */ + word32 oid; + + CYASSL_ENTER("DecodeOcspRespExtensions"); + + if (source[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) + return ASN_PARSE_E; + + if (GetLength(source, &idx, &length, sz) < 0) return ASN_PARSE_E; + + if (GetSequence(source, &idx, &length, sz) < 0) return ASN_PARSE_E; + + ext_bound = idx + length; + + while (idx < (word32)ext_bound) { + if (GetSequence(source, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: should be a SEQUENCE"); + return ASN_PARSE_E; + } + + oid = 0; + if (GetObjectId(source, &idx, &oid, sz) < 0) { + CYASSL_MSG("\tfail: OBJECT ID"); + return ASN_PARSE_E; + } + + /* check for critical flag */ + if (source[idx] == ASN_BOOLEAN) { + CYASSL_MSG("\tfound optional critical flag, moving past"); + idx += (ASN_BOOL_SIZE + 1); + } + + /* process the extension based on the OID */ + if (source[idx++] != ASN_OCTET_STRING) { + CYASSL_MSG("\tfail: should be an OCTET STRING"); + return ASN_PARSE_E; + } + + if (GetLength(source, &idx, &length, sz) < 0) { + CYASSL_MSG("\tfail: extension data length"); + return ASN_PARSE_E; + } + + if (oid == OCSP_NONCE_OID) { + resp->nonce = source + idx; + resp->nonceSz = length; + } + + idx += length; + } + + *ioIndex = idx; + return 0; +} + + +static int DecodeResponseData(byte* source, + word32* ioIndex, OcspResponse* resp, word32 size) +{ + word32 idx = *ioIndex, prev_idx; + int length; + int version; + word32 responderId = 0; + + CYASSL_ENTER("DecodeResponseData"); + + resp->response = source + idx; + prev_idx = idx; + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + resp->responseSz = length + idx - prev_idx; + + /* Get version. It is an EXPLICIT[0] DEFAULT(0) value. If this + * item isn't an EXPLICIT[0], then set version to zero and move + * onto the next item. + */ + if (source[idx] == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) + { + idx += 2; /* Eat the value and length */ + if (GetMyVersion(source, &idx, &version) < 0) + return ASN_PARSE_E; + } else + version = 0; + + responderId = source[idx++]; + if ((responderId == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 1)) || + (responderId == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 2))) + { + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + idx += length; + } + else + return ASN_PARSE_E; + + /* save pointer to the producedAt time */ + if (GetBasicDate(source, &idx, resp->producedDate, + &resp->producedDateFormat, size) < 0) + return ASN_PARSE_E; + + if (DecodeSingleResponse(source, &idx, resp, size) < 0) + return ASN_PARSE_E; + + if (DecodeOcspRespExtensions(source, &idx, resp, size) < 0) + return ASN_PARSE_E; + + *ioIndex = idx; + return 0; +} + + +static int DecodeCerts(byte* source, + word32* ioIndex, OcspResponse* resp, word32 size) +{ + word32 idx = *ioIndex; + + CYASSL_ENTER("DecodeCerts"); + + if (source[idx++] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC)) + { + int length; + + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + resp->cert = source + idx; + resp->certSz = length; + + idx += length; + } + *ioIndex = idx; + return 0; +} + +static int DecodeBasicOcspResponse(byte* source, + word32* ioIndex, OcspResponse* resp, word32 size) +{ + int length; + word32 idx = *ioIndex; + word32 end_index; + + CYASSL_ENTER("DecodeBasicOcspResponse"); + + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + if (idx + length > size) + return ASN_INPUT_E; + end_index = idx + length; + + if (DecodeResponseData(source, &idx, resp, size) < 0) + return ASN_PARSE_E; + + /* Get the signature algorithm */ + if (GetAlgoId(source, &idx, &resp->sigOID, size) < 0) + return ASN_PARSE_E; + + /* Obtain pointer to the start of the signature, and save the size */ + if (source[idx++] == ASN_BIT_STRING) + { + int sigLength = 0; + if (GetLength(source, &idx, &sigLength, size) < 0) + return ASN_PARSE_E; + resp->sigSz = sigLength; + resp->sig = source + idx; + idx += sigLength; + } + + /* + * Check the length of the BasicOcspResponse against the current index to + * see if there are certificates, they are optional. + */ + if (idx < end_index) + { + DecodedCert cert; + int ret; + + if (DecodeCerts(source, &idx, resp, size) < 0) + return ASN_PARSE_E; + + InitDecodedCert(&cert, resp->cert, resp->certSz, 0); + ret = ParseCertRelative(&cert, CA_TYPE, NO_VERIFY, 0); + if (ret < 0) + return ret; + + ret = ConfirmSignature(resp->response, resp->responseSz, + cert.publicKey, cert.pubKeySize, cert.keyOID, + resp->sig, resp->sigSz, resp->sigOID, NULL); + FreeDecodedCert(&cert); + + if (ret == 0) + { + CYASSL_MSG("\tOCSP Confirm signature failed"); + return ASN_OCSP_CONFIRM_E; + } + } + + *ioIndex = idx; + return 0; +} + + +void InitOcspResponse(OcspResponse* resp, CertStatus* status, + byte* source, word32 inSz) +{ + CYASSL_ENTER("InitOcspResponse"); + + resp->responseStatus = -1; + resp->response = NULL; + resp->responseSz = 0; + resp->producedDateFormat = 0; + resp->issuerHash = NULL; + resp->issuerKeyHash = NULL; + resp->sig = NULL; + resp->sigSz = 0; + resp->sigOID = 0; + resp->status = status; + resp->nonce = NULL; + resp->nonceSz = 0; + resp->source = source; + resp->maxIdx = inSz; +} + + +int OcspResponseDecode(OcspResponse* resp) +{ + int length = 0; + word32 idx = 0; + byte* source = resp->source; + word32 size = resp->maxIdx; + word32 oid; + + CYASSL_ENTER("OcspResponseDecode"); + + /* peel the outer SEQUENCE wrapper */ + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + /* First get the responseStatus, an ENUMERATED */ + if (GetEnumerated(source, &idx, &resp->responseStatus) < 0) + return ASN_PARSE_E; + + if (resp->responseStatus != OCSP_SUCCESSFUL) + return 0; + + /* Next is an EXPLICIT record called ResponseBytes, OPTIONAL */ + if (idx >= size) + return ASN_INPUT_E; + if (source[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC)) + return ASN_PARSE_E; + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + /* Get the responseBytes SEQUENCE */ + if (GetSequence(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + /* Check ObjectID for the resposeBytes */ + if (GetObjectId(source, &idx, &oid, size) < 0) + return ASN_PARSE_E; + if (oid != OCSP_BASIC_OID) + return ASN_PARSE_E; + if (source[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(source, &idx, &length, size) < 0) + return ASN_PARSE_E; + + if (DecodeBasicOcspResponse(source, &idx, resp, size) < 0) + return ASN_PARSE_E; + + return 0; +} + + +static word32 SetOcspReqExtensions(word32 extSz, byte* output, + const byte* nonce, word32 nonceSz) +{ + static const byte NonceObjId[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, + 0x30, 0x01, 0x02 }; + byte seqArray[5][MAX_SEQ_SZ]; + word32 seqSz[5], totalSz; + + CYASSL_ENTER("SetOcspReqExtensions"); + + if (nonce == NULL || nonceSz == 0) return 0; + + seqArray[0][0] = ASN_OCTET_STRING; + seqSz[0] = 1 + SetLength(nonceSz, &seqArray[0][1]); + + seqArray[1][0] = ASN_OBJECT_ID; + seqSz[1] = 1 + SetLength(sizeof(NonceObjId), &seqArray[1][1]); + + totalSz = seqSz[0] + seqSz[1] + nonceSz + (word32)sizeof(NonceObjId); + + seqSz[2] = SetSequence(totalSz, seqArray[2]); + totalSz += seqSz[2]; + + seqSz[3] = SetSequence(totalSz, seqArray[3]); + totalSz += seqSz[3]; + + seqArray[4][0] = (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 2); + seqSz[4] = 1 + SetLength(totalSz, &seqArray[4][1]); + totalSz += seqSz[4]; + + if (totalSz < extSz) + { + totalSz = 0; + XMEMCPY(output + totalSz, seqArray[4], seqSz[4]); + totalSz += seqSz[4]; + XMEMCPY(output + totalSz, seqArray[3], seqSz[3]); + totalSz += seqSz[3]; + XMEMCPY(output + totalSz, seqArray[2], seqSz[2]); + totalSz += seqSz[2]; + XMEMCPY(output + totalSz, seqArray[1], seqSz[1]); + totalSz += seqSz[1]; + XMEMCPY(output + totalSz, NonceObjId, sizeof(NonceObjId)); + totalSz += (word32)sizeof(NonceObjId); + XMEMCPY(output + totalSz, seqArray[0], seqSz[0]); + totalSz += seqSz[0]; + XMEMCPY(output + totalSz, nonce, nonceSz); + totalSz += nonceSz; + } + + return totalSz; +} + + +int EncodeOcspRequest(OcspRequest* req) +{ + byte seqArray[5][MAX_SEQ_SZ]; + /* The ASN.1 of the OCSP Request is an onion of sequences */ + byte algoArray[MAX_ALGO_SZ]; + byte issuerArray[MAX_ENCODED_DIG_SZ]; + byte issuerKeyArray[MAX_ENCODED_DIG_SZ]; + byte snArray[MAX_SN_SZ]; + byte extArray[MAX_OCSP_EXT_SZ]; + byte* output = req->dest; + word32 seqSz[5], algoSz, issuerSz, issuerKeySz, snSz, extSz, totalSz; + int i; + + CYASSL_ENTER("EncodeOcspRequest"); + + algoSz = SetAlgoID(SHAh, algoArray, hashType, 0); + + req->issuerHash = req->cert->issuerHash; + issuerSz = SetDigest(req->cert->issuerHash, SHA_SIZE, issuerArray); + + req->issuerKeyHash = req->cert->issuerKeyHash; + issuerKeySz = SetDigest(req->cert->issuerKeyHash, SHA_SIZE, issuerKeyArray); + + req->serial = req->cert->serial; + req->serialSz = req->cert->serialSz; + snSz = SetSerialNumber(req->cert->serial, req->cert->serialSz, snArray); + + extSz = 0; + if (req->useNonce) { + RNG rng; + if (InitRng(&rng) != 0) { + CYASSL_MSG("\tCannot initialize RNG. Skipping the OSCP Nonce."); + } else { + if (RNG_GenerateBlock(&rng, req->nonce, MAX_OCSP_NONCE_SZ) != 0) + CYASSL_MSG("\tCannot run RNG. Skipping the OSCP Nonce."); + else { + req->nonceSz = MAX_OCSP_NONCE_SZ; + extSz = SetOcspReqExtensions(MAX_OCSP_EXT_SZ, extArray, + req->nonce, req->nonceSz); + } + } + } + + totalSz = algoSz + issuerSz + issuerKeySz + snSz; + + for (i = 4; i >= 0; i--) { + seqSz[i] = SetSequence(totalSz, seqArray[i]); + totalSz += seqSz[i]; + if (i == 2) totalSz += extSz; + } + totalSz = 0; + for (i = 0; i < 5; i++) { + XMEMCPY(output + totalSz, seqArray[i], seqSz[i]); + totalSz += seqSz[i]; + } + XMEMCPY(output + totalSz, algoArray, algoSz); + totalSz += algoSz; + XMEMCPY(output + totalSz, issuerArray, issuerSz); + totalSz += issuerSz; + XMEMCPY(output + totalSz, issuerKeyArray, issuerKeySz); + totalSz += issuerKeySz; + XMEMCPY(output + totalSz, snArray, snSz); + totalSz += snSz; + if (extSz != 0) { + XMEMCPY(output + totalSz, extArray, extSz); + totalSz += extSz; + } + + return totalSz; +} + + +void InitOcspRequest(OcspRequest* req, DecodedCert* cert, byte useNonce, + byte* dest, word32 destSz) +{ + CYASSL_ENTER("InitOcspRequest"); + + req->cert = cert; + req->useNonce = useNonce; + req->nonceSz = 0; + req->issuerHash = NULL; + req->issuerKeyHash = NULL; + req->serial = NULL; + req->dest = dest; + req->destSz = destSz; +} + + +int CompareOcspReqResp(OcspRequest* req, OcspResponse* resp) +{ + int cmp; + + CYASSL_ENTER("CompareOcspReqResp"); + + if (req == NULL) + { + CYASSL_MSG("\tReq missing"); + return -1; + } + + if (resp == NULL) + { + CYASSL_MSG("\tResp missing"); + return 1; + } + + /* Nonces are not critical. The responder may not necessarily add + * the nonce to the response. */ + if (req->useNonce && resp->nonceSz != 0) { + cmp = req->nonceSz - resp->nonceSz; + if (cmp != 0) + { + CYASSL_MSG("\tnonceSz mismatch"); + return cmp; + } + + cmp = XMEMCMP(req->nonce, resp->nonce, req->nonceSz); + if (cmp != 0) + { + CYASSL_MSG("\tnonce mismatch"); + return cmp; + } + } + + cmp = XMEMCMP(req->issuerHash, resp->issuerHash, SHA_DIGEST_SIZE); + if (cmp != 0) + { + CYASSL_MSG("\tissuerHash mismatch"); + return cmp; + } + + cmp = XMEMCMP(req->issuerKeyHash, resp->issuerKeyHash, SHA_DIGEST_SIZE); + if (cmp != 0) + { + CYASSL_MSG("\tissuerKeyHash mismatch"); + return cmp; + } + + cmp = req->serialSz - resp->status->serialSz; + if (cmp != 0) + { + CYASSL_MSG("\tserialSz mismatch"); + return cmp; + } + + cmp = XMEMCMP(req->serial, resp->status->serial, req->serialSz); + if (cmp != 0) + { + CYASSL_MSG("\tserial mismatch"); + return cmp; + } + + return 0; +} + +#endif + + +/* store SHA1 hash of NAME */ +CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash, + int maxIdx) +{ + Sha sha; + int length; /* length of all distinguished names */ + int ret = 0; + word32 dummy; + + CYASSL_ENTER("GetNameHash"); + + if (source[*idx] == ASN_OBJECT_ID) { + CYASSL_MSG("Trying optional prefix..."); + + if (GetLength(source, idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + *idx += length; + CYASSL_MSG("Got optional prefix"); + } + + /* For OCSP, RFC2560 section 4.1.1 states the issuer hash should be + * calculated over the entire DER encoding of the Name field, including + * the tag and length. */ + dummy = *idx; + if (GetSequence(source, idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, source + dummy, length + *idx - dummy); + ShaFinal(&sha, hash); + + *idx += length; + + return 0; +} + + +#ifdef HAVE_CRL + +/* initialize decoded CRL */ +void InitDecodedCRL(DecodedCRL* dcrl) +{ + CYASSL_MSG("InitDecodedCRL"); + + dcrl->certBegin = 0; + dcrl->sigIndex = 0; + dcrl->sigLength = 0; + dcrl->signatureOID = 0; + dcrl->certs = NULL; + dcrl->totalCerts = 0; +} + + +/* free decoded CRL resources */ +void FreeDecodedCRL(DecodedCRL* dcrl) +{ + RevokedCert* tmp = dcrl->certs; + + CYASSL_MSG("FreeDecodedCRL"); + + while(tmp) { + RevokedCert* next = tmp->next; + XFREE(tmp, NULL, DYNAMIC_TYPE_REVOKED); + tmp = next; + } +} + + +/* Get Revoked Cert list, 0 on success */ +static int GetRevoked(const byte* buff, word32* idx, DecodedCRL* dcrl, + int maxIdx) +{ + int len; + word32 end; + byte b; + RevokedCert* rc; + + CYASSL_ENTER("GetRevoked"); + + if (GetSequence(buff, idx, &len, maxIdx) < 0) + return ASN_PARSE_E; + + end = *idx + len; + + /* get serial number */ + b = buff[*idx]; + *idx += 1; + + if (b != ASN_INTEGER) { + CYASSL_MSG("Expecting Integer"); + return ASN_PARSE_E; + } + + if (GetLength(buff, idx, &len, maxIdx) < 0) + return ASN_PARSE_E; + + if (len > EXTERNAL_SERIAL_SIZE) { + CYASSL_MSG("Serial Size too big"); + return ASN_PARSE_E; + } + + rc = (RevokedCert*)XMALLOC(sizeof(RevokedCert), NULL, DYNAMIC_TYPE_CRL); + if (rc == NULL) { + CYASSL_MSG("Alloc Revoked Cert failed"); + return MEMORY_E; + } + + XMEMCPY(rc->serialNumber, &buff[*idx], len); + rc->serialSz = len; + + /* add to list */ + rc->next = dcrl->certs; + dcrl->certs = rc; + dcrl->totalCerts++; + + *idx += len; + + /* get date */ + b = buff[*idx]; + *idx += 1; + + if (b != ASN_UTC_TIME && b != ASN_GENERALIZED_TIME) { + CYASSL_MSG("Expecting Date"); + return ASN_PARSE_E; + } + + if (GetLength(buff, idx, &len, maxIdx) < 0) + return ASN_PARSE_E; + + /* skip for now */ + *idx += len; + + if (*idx != end) /* skip extensions */ + *idx = end; + + return 0; +} + + +/* Get CRL Signature, 0 on success */ +static int GetCRL_Signature(const byte* source, word32* idx, DecodedCRL* dcrl, + int maxIdx) +{ + int length; + byte b; + + CYASSL_ENTER("GetCRL_Signature"); + + b = source[*idx]; + *idx += 1; + if (b != ASN_BIT_STRING) + return ASN_BITSTR_E; + + if (GetLength(source, idx, &length, maxIdx) < 0) + return ASN_PARSE_E; + + dcrl->sigLength = length; + + b = source[*idx]; + *idx += 1; + if (b != 0x00) + return ASN_EXPECT_0_E; + + dcrl->sigLength--; + dcrl->signature = (byte*)&source[*idx]; + + *idx += dcrl->sigLength; + + return 0; +} + + +/* prase crl buffer into decoded state, 0 on success */ +int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm) +{ + int version, len; + word32 oid, idx = 0; + Signer* ca = NULL; + + CYASSL_MSG("ParseCRL"); + + /* raw crl hash */ + /* hash here if needed for optimized comparisons + * Sha sha; + * InitSha(&sha); + * ShaUpdate(&sha, buff, sz); + * ShaFinal(&sha, dcrl->crlHash); */ + + if (GetSequence(buff, &idx, &len, sz) < 0) + return ASN_PARSE_E; + + dcrl->certBegin = idx; + + if (GetSequence(buff, &idx, &len, sz) < 0) + return ASN_PARSE_E; + dcrl->sigIndex = len + idx; + + /* may have version */ + if (buff[idx] == ASN_INTEGER) { + if (GetMyVersion(buff, &idx, &version) < 0) + return ASN_PARSE_E; + } + + if (GetAlgoId(buff, &idx, &oid, sz) < 0) + return ASN_PARSE_E; + + if (GetNameHash(buff, &idx, dcrl->issuerHash, sz) < 0) + return ASN_PARSE_E; + + if (GetBasicDate(buff, &idx, dcrl->lastDate, &dcrl->lastDateFormat, sz) < 0) + return ASN_PARSE_E; + + if (GetBasicDate(buff, &idx, dcrl->nextDate, &dcrl->nextDateFormat, sz) < 0) + return ASN_PARSE_E; + + if (!XVALIDATE_DATE(dcrl->nextDate, dcrl->nextDateFormat, AFTER)) { + CYASSL_MSG("CRL after date is no longer valid"); + return ASN_AFTER_DATE_E; + } + + if (idx != dcrl->sigIndex && buff[idx] != CRL_EXTENSIONS) { + if (GetSequence(buff, &idx, &len, sz) < 0) + return ASN_PARSE_E; + + len += idx; + + while (idx < (word32)len) { + if (GetRevoked(buff, &idx, dcrl, sz) < 0) + return ASN_PARSE_E; + } + } + + if (idx != dcrl->sigIndex) + idx = dcrl->sigIndex; /* skip extensions */ + + if (GetAlgoId(buff, &idx, &dcrl->signatureOID, sz) < 0) + return ASN_PARSE_E; + + if (GetCRL_Signature(buff, &idx, dcrl, sz) < 0) + return ASN_PARSE_E; + + /* openssl doesn't add skid by default for CRLs cause firefox chokes + we're not assuming it's available yet */ + #if !defined(NO_SKID) && defined(CRL_SKID_READY) + if (dcrl->extAuthKeyIdSet) + ca = GetCA(cm, dcrl->extAuthKeyId); + if (ca == NULL) + ca = GetCAByName(cm, dcrl->issuerHash); + #else /* NO_SKID */ + ca = GetCA(cm, dcrl->issuerHash); + #endif /* NO_SKID */ + CYASSL_MSG("About to verify CRL signature"); + + if (ca) { + CYASSL_MSG("Found CRL issuer CA"); + /* try to confirm/verify signature */ + #ifndef IGNORE_KEY_EXTENSIONS + if ((ca->keyUsage & KEYUSE_CRL_SIGN) == 0) { + CYASSL_MSG("CA cannot sign CRLs"); + return ASN_CRL_NO_SIGNER_E; + } + #endif /* IGNORE_KEY_EXTENSIONS */ + if (!ConfirmSignature(buff + dcrl->certBegin, + dcrl->sigIndex - dcrl->certBegin, + ca->publicKey, ca->pubKeySize, ca->keyOID, + dcrl->signature, dcrl->sigLength, dcrl->signatureOID, NULL)) { + CYASSL_MSG("CRL Confirm signature failed"); + return ASN_CRL_CONFIRM_E; + } + } + else { + CYASSL_MSG("Did NOT find CRL issuer CA"); + return ASN_CRL_NO_SIGNER_E; + } + + return 0; +} + +#endif /* HAVE_CRL */ +#endif + +#ifdef CYASSL_SEP + + + +#endif /* CYASSL_SEP */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c b/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c new file mode 100644 index 00000000..a9d1753a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c @@ -0,0 +1,433 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Written in 2012 by Samuel Neves + + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see . +*/ +/* blake2b.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_BLAKE2 + +#include +#include + + +static const word64 blake2b_IV[8] = +{ + 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, + 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, + 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, + 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL +}; + +static const byte blake2b_sigma[12][16] = +{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , + { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , + { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , + { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , + { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , + { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , + { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , + { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , + { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } +}; + + +static INLINE int blake2b_set_lastnode( blake2b_state *S ) +{ + S->f[1] = ~0ULL; + return 0; +} + +/* Some helper functions, not necessarily useful */ +static INLINE int blake2b_set_lastblock( blake2b_state *S ) +{ + if( S->last_node ) blake2b_set_lastnode( S ); + + S->f[0] = ~0ULL; + return 0; +} + +static INLINE int blake2b_increment_counter( blake2b_state *S, const word64 + inc ) +{ + S->t[0] += inc; + S->t[1] += ( S->t[0] < inc ); + return 0; +} + +static INLINE int blake2b_init0( blake2b_state *S ) +{ + int i; + XMEMSET( S, 0, sizeof( blake2b_state ) ); + + for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i]; + + return 0; +} + +/* init xors IV with input parameter block */ +int blake2b_init_param( blake2b_state *S, const blake2b_param *P ) +{ + word32 i; + blake2b_init0( S ); + byte *p = ( byte * )( P ); + + /* IV XOR ParamBlock */ + for( i = 0; i < 8; ++i ) + S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); + + return 0; +} + + + +int blake2b_init( blake2b_state *S, const byte outlen ) +{ + blake2b_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; + + P->digest_length = outlen; + P->key_length = 0; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store64( &P->node_offset, 0 ); + P->node_depth = 0; + P->inner_length = 0; + XMEMSET( P->reserved, 0, sizeof( P->reserved ) ); + XMEMSET( P->salt, 0, sizeof( P->salt ) ); + XMEMSET( P->personal, 0, sizeof( P->personal ) ); + return blake2b_init_param( S, P ); +} + + +int blake2b_init_key( blake2b_state *S, const byte outlen, const void *key, + const byte keylen ) +{ + blake2b_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; + + if ( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1; + + P->digest_length = outlen; + P->key_length = keylen; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store64( &P->node_offset, 0 ); + P->node_depth = 0; + P->inner_length = 0; + XMEMSET( P->reserved, 0, sizeof( P->reserved ) ); + XMEMSET( P->salt, 0, sizeof( P->salt ) ); + XMEMSET( P->personal, 0, sizeof( P->personal ) ); + + if( blake2b_init_param( S, P ) < 0 ) return -1; + + { +#ifdef CYASSL_SMALL_STACK + byte* block; + + block = (byte*)XMALLOC(BLAKE2B_BLOCKBYTES, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + if ( block == NULL ) return -1; +#else + byte block[BLAKE2B_BLOCKBYTES]; +#endif + + XMEMSET( block, 0, BLAKE2B_BLOCKBYTES ); + XMEMCPY( block, key, keylen ); + blake2b_update( S, block, BLAKE2B_BLOCKBYTES ); + secure_zero_memory( block, BLAKE2B_BLOCKBYTES ); /* Burn the key from */ + /* memory */ + +#ifdef CYASSL_SMALL_STACK + XFREE(block, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + } + return 0; +} + +static int blake2b_compress( blake2b_state *S, + const byte block[BLAKE2B_BLOCKBYTES] ) +{ + int i; + +#ifdef CYASSL_SMALL_STACK + word64* m; + word64* v; + + m = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + if ( m == NULL ) return -1; + + v = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + if ( v == NULL ) + { + XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return -1; + } +#else + word64 m[16]; + word64 v[16]; +#endif + + for( i = 0; i < 16; ++i ) + m[i] = load64( block + i * sizeof( m[i] ) ); + + for( i = 0; i < 8; ++i ) + v[i] = S->h[i]; + + v[ 8] = blake2b_IV[0]; + v[ 9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = S->t[0] ^ blake2b_IV[4]; + v[13] = S->t[1] ^ blake2b_IV[5]; + v[14] = S->f[0] ^ blake2b_IV[6]; + v[15] = S->f[1] ^ blake2b_IV[7]; +#define G(r,i,a,b,c,d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2*i+0]]; \ + d = rotr64(d ^ a, 32); \ + c = c + d; \ + b = rotr64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2*i+1]]; \ + d = rotr64(d ^ a, 16); \ + c = c + d; \ + b = rotr64(b ^ c, 63); \ + } while(0) +#define ROUND(r) \ + do { \ + G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ + G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ + G(r,2,v[ 2],v[ 6],v[10],v[14]); \ + G(r,3,v[ 3],v[ 7],v[11],v[15]); \ + G(r,4,v[ 0],v[ 5],v[10],v[15]); \ + G(r,5,v[ 1],v[ 6],v[11],v[12]); \ + G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ + G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ + } while(0) + ROUND( 0 ); + ROUND( 1 ); + ROUND( 2 ); + ROUND( 3 ); + ROUND( 4 ); + ROUND( 5 ); + ROUND( 6 ); + ROUND( 7 ); + ROUND( 8 ); + ROUND( 9 ); + ROUND( 10 ); + ROUND( 11 ); + + for( i = 0; i < 8; ++i ) + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + +#undef G +#undef ROUND + +#ifdef CYASSL_SMALL_STACK + XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(v, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + +/* inlen now in bytes */ +int blake2b_update( blake2b_state *S, const byte *in, word64 inlen ) +{ + while( inlen > 0 ) + { + word64 left = S->buflen; + word64 fill = 2 * BLAKE2B_BLOCKBYTES - left; + + if( inlen > fill ) + { + XMEMCPY( S->buf + left, in, (word)fill ); /* Fill buffer */ + S->buflen += fill; + blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); + + if ( blake2b_compress( S, S->buf ) < 0 ) return -1; /* Compress */ + + XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); + /* Shift buffer left */ + S->buflen -= BLAKE2B_BLOCKBYTES; + in += fill; + inlen -= fill; + } + else /* inlen <= fill */ + { + XMEMCPY( S->buf + left, in, (word)inlen ); + S->buflen += inlen; /* Be lazy, do not compress */ + in += inlen; + inlen -= inlen; + } + } + + return 0; +} + +/* Is this correct? */ +int blake2b_final( blake2b_state *S, byte *out, byte outlen ) +{ + byte buffer[BLAKE2B_OUTBYTES]; + int i; + + if( S->buflen > BLAKE2B_BLOCKBYTES ) + { + blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); + + if ( blake2b_compress( S, S->buf ) < 0 ) return -1; + + S->buflen -= BLAKE2B_BLOCKBYTES; + XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (word)S->buflen ); + } + + blake2b_increment_counter( S, S->buflen ); + blake2b_set_lastblock( S ); + XMEMSET( S->buf + S->buflen, 0, (word)(2 * BLAKE2B_BLOCKBYTES - S->buflen) ); + /* Padding */ + if ( blake2b_compress( S, S->buf ) < 0 ) return -1; + + for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ + store64( buffer + sizeof( S->h[i] ) * i, S->h[i] ); + + XMEMCPY( out, buffer, outlen ); + return 0; +} + +/* inlen, at least, should be word64. Others can be size_t. */ +int blake2b( byte *out, const void *in, const void *key, const byte outlen, + const word64 inlen, byte keylen ) +{ + blake2b_state S[1]; + + /* Verify parameters */ + if ( NULL == in ) return -1; + + if ( NULL == out ) return -1; + + if( NULL == key ) keylen = 0; + + if( keylen > 0 ) + { + if( blake2b_init_key( S, outlen, key, keylen ) < 0 ) return -1; + } + else + { + if( blake2b_init( S, outlen ) < 0 ) return -1; + } + + if ( blake2b_update( S, ( byte * )in, inlen ) < 0) return -1; + + return blake2b_final( S, out, outlen ); +} + +#if defined(BLAKE2B_SELFTEST) +#include +#include "blake2-kat.h" +int main( int argc, char **argv ) +{ + byte key[BLAKE2B_KEYBYTES]; + byte buf[KAT_LENGTH]; + + for( word32 i = 0; i < BLAKE2B_KEYBYTES; ++i ) + key[i] = ( byte )i; + + for( word32 i = 0; i < KAT_LENGTH; ++i ) + buf[i] = ( byte )i; + + for( word32 i = 0; i < KAT_LENGTH; ++i ) + { + byte hash[BLAKE2B_OUTBYTES]; + if ( blake2b( hash, buf, key, BLAKE2B_OUTBYTES, i, BLAKE2B_KEYBYTES ) < 0 ) + { + puts( "error" ); + return -1; + } + + if( 0 != memcmp( hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES ) ) + { + puts( "error" ); + return -1; + } + } + + puts( "ok" ); + return 0; +} +#endif + + +/* CTaoCrypt API */ + +/* Init Blake2b digest, track size incase final doesn't want to "remember" */ +int InitBlake2b(Blake2b* b2b, word32 digestSz) +{ + b2b->digestSz = digestSz; + + return blake2b_init(b2b->S, (byte)digestSz); +} + + +/* Blake2b Update */ +int Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz) +{ + return blake2b_update(b2b->S, data, sz); +} + + +/* Blake2b Final, if pass in zero size we use init digestSz */ +int Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz) +{ + word32 sz = requestSz ? requestSz : b2b->digestSz; + + return blake2b_final(b2b->S, final, (byte)sz); +} + + +/* end CTaoCrypt API */ + +#endif /* HAVE_BLAKE2 */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c b/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c new file mode 100644 index 00000000..eaed4c90 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c @@ -0,0 +1,1621 @@ +/* camellia.c ver 1.2.0 + * + * Copyright (c) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer as + * the first lines of this file unmodified. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* camellia.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* + * Algorithm Specification + * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_CAMELLIA + +#include +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +/* u32 must be 32bit word */ +typedef unsigned int u32; +typedef unsigned char u8; + +/* key constants */ + +#define CAMELLIA_SIGMA1L ((u32)0xA09E667FL) +#define CAMELLIA_SIGMA1R ((u32)0x3BCC908BL) +#define CAMELLIA_SIGMA2L ((u32)0xB67AE858L) +#define CAMELLIA_SIGMA2R ((u32)0x4CAA73B2L) +#define CAMELLIA_SIGMA3L ((u32)0xC6EF372FL) +#define CAMELLIA_SIGMA3R ((u32)0xE94F82BEL) +#define CAMELLIA_SIGMA4L ((u32)0x54FF53A5L) +#define CAMELLIA_SIGMA4R ((u32)0xF1D36F1CL) +#define CAMELLIA_SIGMA5L ((u32)0x10E527FAL) +#define CAMELLIA_SIGMA5R ((u32)0xDE682D1DL) +#define CAMELLIA_SIGMA6L ((u32)0xB05688C2L) +#define CAMELLIA_SIGMA6R ((u32)0xB3E6C1FDL) + +/* + * macros + */ + + +#if defined(_MSC_VER) + +# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) +# define GETU32(p) SWAP(*((u32 *)(p))) +# define PUTU32(ct, st) {*((u32 *)(ct)) = SWAP((st));} + +#else /* not MS-VC */ + +# define GETU32(pt) \ + (((u32)(pt)[0] << 24) \ + ^ ((u32)(pt)[1] << 16) \ + ^ ((u32)(pt)[2] << 8) \ + ^ ((u32)(pt)[3])) + +# define PUTU32(ct, st) { \ + (ct)[0] = (u8)((st) >> 24); \ + (ct)[1] = (u8)((st) >> 16); \ + (ct)[2] = (u8)((st) >> 8); \ + (ct)[3] = (u8)(st); } + +#endif + +#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2]) +#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1]) + +/* rotation right shift 1byte */ +#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24)) +/* rotation left shift 1bit */ +#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31)) +/* rotation left shift 1byte */ +#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24)) + +#define CAMELLIA_ROLDQ(ll, lr, rl, rr, w0, w1, bits) \ + do { \ + w0 = ll; \ + ll = (ll << bits) + (lr >> (32 - bits)); \ + lr = (lr << bits) + (rl >> (32 - bits)); \ + rl = (rl << bits) + (rr >> (32 - bits)); \ + rr = (rr << bits) + (w0 >> (32 - bits)); \ + } while(0) + +#define CAMELLIA_ROLDQo32(ll, lr, rl, rr, w0, w1, bits) \ + do { \ + w0 = ll; \ + w1 = lr; \ + ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \ + lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \ + rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \ + rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \ + } while(0) + +#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)]) +#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)]) +#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)]) +#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)]) + +#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ + do { \ + il = xl ^ kl; \ + ir = xr ^ kr; \ + t0 = il >> 16; \ + t1 = ir >> 16; \ + yl = CAMELLIA_SP1110(ir & 0xff) \ + ^ CAMELLIA_SP0222((t1 >> 8) & 0xff) \ + ^ CAMELLIA_SP3033(t1 & 0xff) \ + ^ CAMELLIA_SP4404((ir >> 8) & 0xff); \ + yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) \ + ^ CAMELLIA_SP0222(t0 & 0xff) \ + ^ CAMELLIA_SP3033((il >> 8) & 0xff) \ + ^ CAMELLIA_SP4404(il & 0xff); \ + yl ^= yr; \ + yr = CAMELLIA_RR8(yr); \ + yr ^= yl; \ + } while(0) + + +/* + * for speed up + * + */ +#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) \ + do { \ + t0 = kll; \ + t0 &= ll; \ + lr ^= CAMELLIA_RL1(t0); \ + t1 = klr; \ + t1 |= lr; \ + ll ^= t1; \ + \ + t2 = krr; \ + t2 |= rr; \ + rl ^= t2; \ + t3 = krl; \ + t3 &= rl; \ + rr ^= CAMELLIA_RL1(t3); \ + } while(0) + +#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ + do { \ + ir = CAMELLIA_SP1110(xr & 0xff) \ + ^ CAMELLIA_SP0222((xr >> 24) & 0xff) \ + ^ CAMELLIA_SP3033((xr >> 16) & 0xff) \ + ^ CAMELLIA_SP4404((xr >> 8) & 0xff); \ + il = CAMELLIA_SP1110((xl >> 24) & 0xff) \ + ^ CAMELLIA_SP0222((xl >> 16) & 0xff) \ + ^ CAMELLIA_SP3033((xl >> 8) & 0xff) \ + ^ CAMELLIA_SP4404(xl & 0xff); \ + il ^= kl; \ + ir ^= kr; \ + ir ^= il; \ + il = CAMELLIA_RR8(il); \ + il ^= ir; \ + yl ^= ir; \ + yr ^= il; \ + } while(0) + + +static const u32 camellia_sp1110[256] = { + 0x70707000,0x82828200,0x2c2c2c00,0xececec00, + 0xb3b3b300,0x27272700,0xc0c0c000,0xe5e5e500, + 0xe4e4e400,0x85858500,0x57575700,0x35353500, + 0xeaeaea00,0x0c0c0c00,0xaeaeae00,0x41414100, + 0x23232300,0xefefef00,0x6b6b6b00,0x93939300, + 0x45454500,0x19191900,0xa5a5a500,0x21212100, + 0xededed00,0x0e0e0e00,0x4f4f4f00,0x4e4e4e00, + 0x1d1d1d00,0x65656500,0x92929200,0xbdbdbd00, + 0x86868600,0xb8b8b800,0xafafaf00,0x8f8f8f00, + 0x7c7c7c00,0xebebeb00,0x1f1f1f00,0xcecece00, + 0x3e3e3e00,0x30303000,0xdcdcdc00,0x5f5f5f00, + 0x5e5e5e00,0xc5c5c500,0x0b0b0b00,0x1a1a1a00, + 0xa6a6a600,0xe1e1e100,0x39393900,0xcacaca00, + 0xd5d5d500,0x47474700,0x5d5d5d00,0x3d3d3d00, + 0xd9d9d900,0x01010100,0x5a5a5a00,0xd6d6d600, + 0x51515100,0x56565600,0x6c6c6c00,0x4d4d4d00, + 0x8b8b8b00,0x0d0d0d00,0x9a9a9a00,0x66666600, + 0xfbfbfb00,0xcccccc00,0xb0b0b000,0x2d2d2d00, + 0x74747400,0x12121200,0x2b2b2b00,0x20202000, + 0xf0f0f000,0xb1b1b100,0x84848400,0x99999900, + 0xdfdfdf00,0x4c4c4c00,0xcbcbcb00,0xc2c2c200, + 0x34343400,0x7e7e7e00,0x76767600,0x05050500, + 0x6d6d6d00,0xb7b7b700,0xa9a9a900,0x31313100, + 0xd1d1d100,0x17171700,0x04040400,0xd7d7d700, + 0x14141400,0x58585800,0x3a3a3a00,0x61616100, + 0xdedede00,0x1b1b1b00,0x11111100,0x1c1c1c00, + 0x32323200,0x0f0f0f00,0x9c9c9c00,0x16161600, + 0x53535300,0x18181800,0xf2f2f200,0x22222200, + 0xfefefe00,0x44444400,0xcfcfcf00,0xb2b2b200, + 0xc3c3c300,0xb5b5b500,0x7a7a7a00,0x91919100, + 0x24242400,0x08080800,0xe8e8e800,0xa8a8a800, + 0x60606000,0xfcfcfc00,0x69696900,0x50505000, + 0xaaaaaa00,0xd0d0d000,0xa0a0a000,0x7d7d7d00, + 0xa1a1a100,0x89898900,0x62626200,0x97979700, + 0x54545400,0x5b5b5b00,0x1e1e1e00,0x95959500, + 0xe0e0e000,0xffffff00,0x64646400,0xd2d2d200, + 0x10101000,0xc4c4c400,0x00000000,0x48484800, + 0xa3a3a300,0xf7f7f700,0x75757500,0xdbdbdb00, + 0x8a8a8a00,0x03030300,0xe6e6e600,0xdadada00, + 0x09090900,0x3f3f3f00,0xdddddd00,0x94949400, + 0x87878700,0x5c5c5c00,0x83838300,0x02020200, + 0xcdcdcd00,0x4a4a4a00,0x90909000,0x33333300, + 0x73737300,0x67676700,0xf6f6f600,0xf3f3f300, + 0x9d9d9d00,0x7f7f7f00,0xbfbfbf00,0xe2e2e200, + 0x52525200,0x9b9b9b00,0xd8d8d800,0x26262600, + 0xc8c8c800,0x37373700,0xc6c6c600,0x3b3b3b00, + 0x81818100,0x96969600,0x6f6f6f00,0x4b4b4b00, + 0x13131300,0xbebebe00,0x63636300,0x2e2e2e00, + 0xe9e9e900,0x79797900,0xa7a7a700,0x8c8c8c00, + 0x9f9f9f00,0x6e6e6e00,0xbcbcbc00,0x8e8e8e00, + 0x29292900,0xf5f5f500,0xf9f9f900,0xb6b6b600, + 0x2f2f2f00,0xfdfdfd00,0xb4b4b400,0x59595900, + 0x78787800,0x98989800,0x06060600,0x6a6a6a00, + 0xe7e7e700,0x46464600,0x71717100,0xbababa00, + 0xd4d4d400,0x25252500,0xababab00,0x42424200, + 0x88888800,0xa2a2a200,0x8d8d8d00,0xfafafa00, + 0x72727200,0x07070700,0xb9b9b900,0x55555500, + 0xf8f8f800,0xeeeeee00,0xacacac00,0x0a0a0a00, + 0x36363600,0x49494900,0x2a2a2a00,0x68686800, + 0x3c3c3c00,0x38383800,0xf1f1f100,0xa4a4a400, + 0x40404000,0x28282800,0xd3d3d300,0x7b7b7b00, + 0xbbbbbb00,0xc9c9c900,0x43434300,0xc1c1c100, + 0x15151500,0xe3e3e300,0xadadad00,0xf4f4f400, + 0x77777700,0xc7c7c700,0x80808000,0x9e9e9e00, +}; + +static const u32 camellia_sp0222[256] = { + 0x00e0e0e0,0x00050505,0x00585858,0x00d9d9d9, + 0x00676767,0x004e4e4e,0x00818181,0x00cbcbcb, + 0x00c9c9c9,0x000b0b0b,0x00aeaeae,0x006a6a6a, + 0x00d5d5d5,0x00181818,0x005d5d5d,0x00828282, + 0x00464646,0x00dfdfdf,0x00d6d6d6,0x00272727, + 0x008a8a8a,0x00323232,0x004b4b4b,0x00424242, + 0x00dbdbdb,0x001c1c1c,0x009e9e9e,0x009c9c9c, + 0x003a3a3a,0x00cacaca,0x00252525,0x007b7b7b, + 0x000d0d0d,0x00717171,0x005f5f5f,0x001f1f1f, + 0x00f8f8f8,0x00d7d7d7,0x003e3e3e,0x009d9d9d, + 0x007c7c7c,0x00606060,0x00b9b9b9,0x00bebebe, + 0x00bcbcbc,0x008b8b8b,0x00161616,0x00343434, + 0x004d4d4d,0x00c3c3c3,0x00727272,0x00959595, + 0x00ababab,0x008e8e8e,0x00bababa,0x007a7a7a, + 0x00b3b3b3,0x00020202,0x00b4b4b4,0x00adadad, + 0x00a2a2a2,0x00acacac,0x00d8d8d8,0x009a9a9a, + 0x00171717,0x001a1a1a,0x00353535,0x00cccccc, + 0x00f7f7f7,0x00999999,0x00616161,0x005a5a5a, + 0x00e8e8e8,0x00242424,0x00565656,0x00404040, + 0x00e1e1e1,0x00636363,0x00090909,0x00333333, + 0x00bfbfbf,0x00989898,0x00979797,0x00858585, + 0x00686868,0x00fcfcfc,0x00ececec,0x000a0a0a, + 0x00dadada,0x006f6f6f,0x00535353,0x00626262, + 0x00a3a3a3,0x002e2e2e,0x00080808,0x00afafaf, + 0x00282828,0x00b0b0b0,0x00747474,0x00c2c2c2, + 0x00bdbdbd,0x00363636,0x00222222,0x00383838, + 0x00646464,0x001e1e1e,0x00393939,0x002c2c2c, + 0x00a6a6a6,0x00303030,0x00e5e5e5,0x00444444, + 0x00fdfdfd,0x00888888,0x009f9f9f,0x00656565, + 0x00878787,0x006b6b6b,0x00f4f4f4,0x00232323, + 0x00484848,0x00101010,0x00d1d1d1,0x00515151, + 0x00c0c0c0,0x00f9f9f9,0x00d2d2d2,0x00a0a0a0, + 0x00555555,0x00a1a1a1,0x00414141,0x00fafafa, + 0x00434343,0x00131313,0x00c4c4c4,0x002f2f2f, + 0x00a8a8a8,0x00b6b6b6,0x003c3c3c,0x002b2b2b, + 0x00c1c1c1,0x00ffffff,0x00c8c8c8,0x00a5a5a5, + 0x00202020,0x00898989,0x00000000,0x00909090, + 0x00474747,0x00efefef,0x00eaeaea,0x00b7b7b7, + 0x00151515,0x00060606,0x00cdcdcd,0x00b5b5b5, + 0x00121212,0x007e7e7e,0x00bbbbbb,0x00292929, + 0x000f0f0f,0x00b8b8b8,0x00070707,0x00040404, + 0x009b9b9b,0x00949494,0x00212121,0x00666666, + 0x00e6e6e6,0x00cecece,0x00ededed,0x00e7e7e7, + 0x003b3b3b,0x00fefefe,0x007f7f7f,0x00c5c5c5, + 0x00a4a4a4,0x00373737,0x00b1b1b1,0x004c4c4c, + 0x00919191,0x006e6e6e,0x008d8d8d,0x00767676, + 0x00030303,0x002d2d2d,0x00dedede,0x00969696, + 0x00262626,0x007d7d7d,0x00c6c6c6,0x005c5c5c, + 0x00d3d3d3,0x00f2f2f2,0x004f4f4f,0x00191919, + 0x003f3f3f,0x00dcdcdc,0x00797979,0x001d1d1d, + 0x00525252,0x00ebebeb,0x00f3f3f3,0x006d6d6d, + 0x005e5e5e,0x00fbfbfb,0x00696969,0x00b2b2b2, + 0x00f0f0f0,0x00313131,0x000c0c0c,0x00d4d4d4, + 0x00cfcfcf,0x008c8c8c,0x00e2e2e2,0x00757575, + 0x00a9a9a9,0x004a4a4a,0x00575757,0x00848484, + 0x00111111,0x00454545,0x001b1b1b,0x00f5f5f5, + 0x00e4e4e4,0x000e0e0e,0x00737373,0x00aaaaaa, + 0x00f1f1f1,0x00dddddd,0x00595959,0x00141414, + 0x006c6c6c,0x00929292,0x00545454,0x00d0d0d0, + 0x00787878,0x00707070,0x00e3e3e3,0x00494949, + 0x00808080,0x00505050,0x00a7a7a7,0x00f6f6f6, + 0x00777777,0x00939393,0x00868686,0x00838383, + 0x002a2a2a,0x00c7c7c7,0x005b5b5b,0x00e9e9e9, + 0x00eeeeee,0x008f8f8f,0x00010101,0x003d3d3d, +}; + +static const u32 camellia_sp3033[256] = { + 0x38003838,0x41004141,0x16001616,0x76007676, + 0xd900d9d9,0x93009393,0x60006060,0xf200f2f2, + 0x72007272,0xc200c2c2,0xab00abab,0x9a009a9a, + 0x75007575,0x06000606,0x57005757,0xa000a0a0, + 0x91009191,0xf700f7f7,0xb500b5b5,0xc900c9c9, + 0xa200a2a2,0x8c008c8c,0xd200d2d2,0x90009090, + 0xf600f6f6,0x07000707,0xa700a7a7,0x27002727, + 0x8e008e8e,0xb200b2b2,0x49004949,0xde00dede, + 0x43004343,0x5c005c5c,0xd700d7d7,0xc700c7c7, + 0x3e003e3e,0xf500f5f5,0x8f008f8f,0x67006767, + 0x1f001f1f,0x18001818,0x6e006e6e,0xaf00afaf, + 0x2f002f2f,0xe200e2e2,0x85008585,0x0d000d0d, + 0x53005353,0xf000f0f0,0x9c009c9c,0x65006565, + 0xea00eaea,0xa300a3a3,0xae00aeae,0x9e009e9e, + 0xec00ecec,0x80008080,0x2d002d2d,0x6b006b6b, + 0xa800a8a8,0x2b002b2b,0x36003636,0xa600a6a6, + 0xc500c5c5,0x86008686,0x4d004d4d,0x33003333, + 0xfd00fdfd,0x66006666,0x58005858,0x96009696, + 0x3a003a3a,0x09000909,0x95009595,0x10001010, + 0x78007878,0xd800d8d8,0x42004242,0xcc00cccc, + 0xef00efef,0x26002626,0xe500e5e5,0x61006161, + 0x1a001a1a,0x3f003f3f,0x3b003b3b,0x82008282, + 0xb600b6b6,0xdb00dbdb,0xd400d4d4,0x98009898, + 0xe800e8e8,0x8b008b8b,0x02000202,0xeb00ebeb, + 0x0a000a0a,0x2c002c2c,0x1d001d1d,0xb000b0b0, + 0x6f006f6f,0x8d008d8d,0x88008888,0x0e000e0e, + 0x19001919,0x87008787,0x4e004e4e,0x0b000b0b, + 0xa900a9a9,0x0c000c0c,0x79007979,0x11001111, + 0x7f007f7f,0x22002222,0xe700e7e7,0x59005959, + 0xe100e1e1,0xda00dada,0x3d003d3d,0xc800c8c8, + 0x12001212,0x04000404,0x74007474,0x54005454, + 0x30003030,0x7e007e7e,0xb400b4b4,0x28002828, + 0x55005555,0x68006868,0x50005050,0xbe00bebe, + 0xd000d0d0,0xc400c4c4,0x31003131,0xcb00cbcb, + 0x2a002a2a,0xad00adad,0x0f000f0f,0xca00caca, + 0x70007070,0xff00ffff,0x32003232,0x69006969, + 0x08000808,0x62006262,0x00000000,0x24002424, + 0xd100d1d1,0xfb00fbfb,0xba00baba,0xed00eded, + 0x45004545,0x81008181,0x73007373,0x6d006d6d, + 0x84008484,0x9f009f9f,0xee00eeee,0x4a004a4a, + 0xc300c3c3,0x2e002e2e,0xc100c1c1,0x01000101, + 0xe600e6e6,0x25002525,0x48004848,0x99009999, + 0xb900b9b9,0xb300b3b3,0x7b007b7b,0xf900f9f9, + 0xce00cece,0xbf00bfbf,0xdf00dfdf,0x71007171, + 0x29002929,0xcd00cdcd,0x6c006c6c,0x13001313, + 0x64006464,0x9b009b9b,0x63006363,0x9d009d9d, + 0xc000c0c0,0x4b004b4b,0xb700b7b7,0xa500a5a5, + 0x89008989,0x5f005f5f,0xb100b1b1,0x17001717, + 0xf400f4f4,0xbc00bcbc,0xd300d3d3,0x46004646, + 0xcf00cfcf,0x37003737,0x5e005e5e,0x47004747, + 0x94009494,0xfa00fafa,0xfc00fcfc,0x5b005b5b, + 0x97009797,0xfe00fefe,0x5a005a5a,0xac00acac, + 0x3c003c3c,0x4c004c4c,0x03000303,0x35003535, + 0xf300f3f3,0x23002323,0xb800b8b8,0x5d005d5d, + 0x6a006a6a,0x92009292,0xd500d5d5,0x21002121, + 0x44004444,0x51005151,0xc600c6c6,0x7d007d7d, + 0x39003939,0x83008383,0xdc00dcdc,0xaa00aaaa, + 0x7c007c7c,0x77007777,0x56005656,0x05000505, + 0x1b001b1b,0xa400a4a4,0x15001515,0x34003434, + 0x1e001e1e,0x1c001c1c,0xf800f8f8,0x52005252, + 0x20002020,0x14001414,0xe900e9e9,0xbd00bdbd, + 0xdd00dddd,0xe400e4e4,0xa100a1a1,0xe000e0e0, + 0x8a008a8a,0xf100f1f1,0xd600d6d6,0x7a007a7a, + 0xbb00bbbb,0xe300e3e3,0x40004040,0x4f004f4f, +}; + +static const u32 camellia_sp4404[256] = { + 0x70700070,0x2c2c002c,0xb3b300b3,0xc0c000c0, + 0xe4e400e4,0x57570057,0xeaea00ea,0xaeae00ae, + 0x23230023,0x6b6b006b,0x45450045,0xa5a500a5, + 0xeded00ed,0x4f4f004f,0x1d1d001d,0x92920092, + 0x86860086,0xafaf00af,0x7c7c007c,0x1f1f001f, + 0x3e3e003e,0xdcdc00dc,0x5e5e005e,0x0b0b000b, + 0xa6a600a6,0x39390039,0xd5d500d5,0x5d5d005d, + 0xd9d900d9,0x5a5a005a,0x51510051,0x6c6c006c, + 0x8b8b008b,0x9a9a009a,0xfbfb00fb,0xb0b000b0, + 0x74740074,0x2b2b002b,0xf0f000f0,0x84840084, + 0xdfdf00df,0xcbcb00cb,0x34340034,0x76760076, + 0x6d6d006d,0xa9a900a9,0xd1d100d1,0x04040004, + 0x14140014,0x3a3a003a,0xdede00de,0x11110011, + 0x32320032,0x9c9c009c,0x53530053,0xf2f200f2, + 0xfefe00fe,0xcfcf00cf,0xc3c300c3,0x7a7a007a, + 0x24240024,0xe8e800e8,0x60600060,0x69690069, + 0xaaaa00aa,0xa0a000a0,0xa1a100a1,0x62620062, + 0x54540054,0x1e1e001e,0xe0e000e0,0x64640064, + 0x10100010,0x00000000,0xa3a300a3,0x75750075, + 0x8a8a008a,0xe6e600e6,0x09090009,0xdddd00dd, + 0x87870087,0x83830083,0xcdcd00cd,0x90900090, + 0x73730073,0xf6f600f6,0x9d9d009d,0xbfbf00bf, + 0x52520052,0xd8d800d8,0xc8c800c8,0xc6c600c6, + 0x81810081,0x6f6f006f,0x13130013,0x63630063, + 0xe9e900e9,0xa7a700a7,0x9f9f009f,0xbcbc00bc, + 0x29290029,0xf9f900f9,0x2f2f002f,0xb4b400b4, + 0x78780078,0x06060006,0xe7e700e7,0x71710071, + 0xd4d400d4,0xabab00ab,0x88880088,0x8d8d008d, + 0x72720072,0xb9b900b9,0xf8f800f8,0xacac00ac, + 0x36360036,0x2a2a002a,0x3c3c003c,0xf1f100f1, + 0x40400040,0xd3d300d3,0xbbbb00bb,0x43430043, + 0x15150015,0xadad00ad,0x77770077,0x80800080, + 0x82820082,0xecec00ec,0x27270027,0xe5e500e5, + 0x85850085,0x35350035,0x0c0c000c,0x41410041, + 0xefef00ef,0x93930093,0x19190019,0x21210021, + 0x0e0e000e,0x4e4e004e,0x65650065,0xbdbd00bd, + 0xb8b800b8,0x8f8f008f,0xebeb00eb,0xcece00ce, + 0x30300030,0x5f5f005f,0xc5c500c5,0x1a1a001a, + 0xe1e100e1,0xcaca00ca,0x47470047,0x3d3d003d, + 0x01010001,0xd6d600d6,0x56560056,0x4d4d004d, + 0x0d0d000d,0x66660066,0xcccc00cc,0x2d2d002d, + 0x12120012,0x20200020,0xb1b100b1,0x99990099, + 0x4c4c004c,0xc2c200c2,0x7e7e007e,0x05050005, + 0xb7b700b7,0x31310031,0x17170017,0xd7d700d7, + 0x58580058,0x61610061,0x1b1b001b,0x1c1c001c, + 0x0f0f000f,0x16160016,0x18180018,0x22220022, + 0x44440044,0xb2b200b2,0xb5b500b5,0x91910091, + 0x08080008,0xa8a800a8,0xfcfc00fc,0x50500050, + 0xd0d000d0,0x7d7d007d,0x89890089,0x97970097, + 0x5b5b005b,0x95950095,0xffff00ff,0xd2d200d2, + 0xc4c400c4,0x48480048,0xf7f700f7,0xdbdb00db, + 0x03030003,0xdada00da,0x3f3f003f,0x94940094, + 0x5c5c005c,0x02020002,0x4a4a004a,0x33330033, + 0x67670067,0xf3f300f3,0x7f7f007f,0xe2e200e2, + 0x9b9b009b,0x26260026,0x37370037,0x3b3b003b, + 0x96960096,0x4b4b004b,0xbebe00be,0x2e2e002e, + 0x79790079,0x8c8c008c,0x6e6e006e,0x8e8e008e, + 0xf5f500f5,0xb6b600b6,0xfdfd00fd,0x59590059, + 0x98980098,0x6a6a006a,0x46460046,0xbaba00ba, + 0x25250025,0x42420042,0xa2a200a2,0xfafa00fa, + 0x07070007,0x55550055,0xeeee00ee,0x0a0a000a, + 0x49490049,0x68680068,0x38380038,0xa4a400a4, + 0x28280028,0x7b7b007b,0xc9c900c9,0xc1c100c1, + 0xe3e300e3,0xf4f400f4,0xc7c700c7,0x9e9e009e, +}; + + +/** + * Stuff related to the Camellia key schedule + */ +#define subl(x) subL[(x)] +#define subr(x) subR[(x)] + +static int camellia_setup128(const unsigned char *key, u32 *subkey) +{ + u32 kll, klr, krl, krr; + u32 il, ir, t0, t1, w0, w1; + u32 kw4l, kw4r, dw, tl, tr; + +#ifdef CYASSL_SMALL_STACK + u32* subL; + u32* subR; + + subL = (u32*) XMALLOC(sizeof(u32) * 26, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (subL == NULL) + return MEMORY_E; + + subR = (u32*) XMALLOC(sizeof(u32) * 26, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (subR == NULL) { + XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#else + u32 subL[26]; + u32 subR[26]; +#endif + + /** + * k == kll || klr || krl || krr (|| is concatination) + */ + kll = GETU32(key ); + klr = GETU32(key + 4); + krl = GETU32(key + 8); + krr = GETU32(key + 12); + /** + * generate KL dependent subkeys + */ + subl(0) = kll; subr(0) = klr; + subl(1) = krl; subr(1) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(4) = kll; subr(4) = klr; + subl(5) = krl; subr(5) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); + subl(10) = kll; subr(10) = klr; + subl(11) = krl; subr(11) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(13) = krl; subr(13) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(16) = kll; subr(16) = klr; + subl(17) = krl; subr(17) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(18) = kll; subr(18) = klr; + subl(19) = krl; subr(19) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(22) = kll; subr(22) = klr; + subl(23) = krl; subr(23) = krr; + + /* generate KA */ + kll = subl(0); klr = subr(0); + krl = subl(1); krr = subr(1); + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, + w0, w1, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, + kll, klr, il, ir, t0, t1); + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, + krl, krr, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, + w0, w1, il, ir, t0, t1); + kll ^= w0; klr ^= w1; + + /* generate KA dependent subkeys */ + subl(2) = kll; subr(2) = klr; + subl(3) = krl; subr(3) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(6) = kll; subr(6) = klr; + subl(7) = krl; subr(7) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(8) = kll; subr(8) = klr; + subl(9) = krl; subr(9) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(12) = kll; subr(12) = klr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(14) = kll; subr(14) = klr; + subl(15) = krl; subr(15) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); + subl(20) = kll; subr(20) = klr; + subl(21) = krl; subr(21) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(24) = kll; subr(24) = klr; + subl(25) = krl; subr(25) = krr; + + + /* absorb kw2 to other subkeys */ + subl(3) ^= subl(1); subr(3) ^= subr(1); + subl(5) ^= subl(1); subr(5) ^= subr(1); + subl(7) ^= subl(1); subr(7) ^= subr(1); + subl(1) ^= subr(1) & ~subr(9); + dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); + subl(11) ^= subl(1); subr(11) ^= subr(1); + subl(13) ^= subl(1); subr(13) ^= subr(1); + subl(15) ^= subl(1); subr(15) ^= subr(1); + subl(1) ^= subr(1) & ~subr(17); + dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); + subl(19) ^= subl(1); subr(19) ^= subr(1); + subl(21) ^= subl(1); subr(21) ^= subr(1); + subl(23) ^= subl(1); subr(23) ^= subr(1); + subl(24) ^= subl(1); subr(24) ^= subr(1); + + /* absorb kw4 to other subkeys */ + kw4l = subl(25); kw4r = subr(25); + subl(22) ^= kw4l; subr(22) ^= kw4r; + subl(20) ^= kw4l; subr(20) ^= kw4r; + subl(18) ^= kw4l; subr(18) ^= kw4r; + kw4l ^= kw4r & ~subr(16); + dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); + subl(14) ^= kw4l; subr(14) ^= kw4r; + subl(12) ^= kw4l; subr(12) ^= kw4r; + subl(10) ^= kw4l; subr(10) ^= kw4r; + kw4l ^= kw4r & ~subr(8); + dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); + subl(6) ^= kw4l; subr(6) ^= kw4r; + subl(4) ^= kw4l; subr(4) ^= kw4r; + subl(2) ^= kw4l; subr(2) ^= kw4r; + subl(0) ^= kw4l; subr(0) ^= kw4r; + + /* key XOR is end of F-function */ + CamelliaSubkeyL(0) = subl(0) ^ subl(2); + CamelliaSubkeyR(0) = subr(0) ^ subr(2); + CamelliaSubkeyL(2) = subl(3); + CamelliaSubkeyR(2) = subr(3); + CamelliaSubkeyL(3) = subl(2) ^ subl(4); + CamelliaSubkeyR(3) = subr(2) ^ subr(4); + CamelliaSubkeyL(4) = subl(3) ^ subl(5); + CamelliaSubkeyR(4) = subr(3) ^ subr(5); + CamelliaSubkeyL(5) = subl(4) ^ subl(6); + CamelliaSubkeyR(5) = subr(4) ^ subr(6); + CamelliaSubkeyL(6) = subl(5) ^ subl(7); + CamelliaSubkeyR(6) = subr(5) ^ subr(7); + tl = subl(10) ^ (subr(10) & ~subr(8)); + dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(7) = subl(6) ^ tl; + CamelliaSubkeyR(7) = subr(6) ^ tr; + CamelliaSubkeyL(8) = subl(8); + CamelliaSubkeyR(8) = subr(8); + CamelliaSubkeyL(9) = subl(9); + CamelliaSubkeyR(9) = subr(9); + tl = subl(7) ^ (subr(7) & ~subr(9)); + dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(10) = tl ^ subl(11); + CamelliaSubkeyR(10) = tr ^ subr(11); + CamelliaSubkeyL(11) = subl(10) ^ subl(12); + CamelliaSubkeyR(11) = subr(10) ^ subr(12); + CamelliaSubkeyL(12) = subl(11) ^ subl(13); + CamelliaSubkeyR(12) = subr(11) ^ subr(13); + CamelliaSubkeyL(13) = subl(12) ^ subl(14); + CamelliaSubkeyR(13) = subr(12) ^ subr(14); + CamelliaSubkeyL(14) = subl(13) ^ subl(15); + CamelliaSubkeyR(14) = subr(13) ^ subr(15); + tl = subl(18) ^ (subr(18) & ~subr(16)); + dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(15) = subl(14) ^ tl; + CamelliaSubkeyR(15) = subr(14) ^ tr; + CamelliaSubkeyL(16) = subl(16); + CamelliaSubkeyR(16) = subr(16); + CamelliaSubkeyL(17) = subl(17); + CamelliaSubkeyR(17) = subr(17); + tl = subl(15) ^ (subr(15) & ~subr(17)); + dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(18) = tl ^ subl(19); + CamelliaSubkeyR(18) = tr ^ subr(19); + CamelliaSubkeyL(19) = subl(18) ^ subl(20); + CamelliaSubkeyR(19) = subr(18) ^ subr(20); + CamelliaSubkeyL(20) = subl(19) ^ subl(21); + CamelliaSubkeyR(20) = subr(19) ^ subr(21); + CamelliaSubkeyL(21) = subl(20) ^ subl(22); + CamelliaSubkeyR(21) = subr(20) ^ subr(22); + CamelliaSubkeyL(22) = subl(21) ^ subl(23); + CamelliaSubkeyR(22) = subr(21) ^ subr(23); + CamelliaSubkeyL(23) = subl(22); + CamelliaSubkeyR(23) = subr(22); + CamelliaSubkeyL(24) = subl(24) ^ subl(23); + CamelliaSubkeyR(24) = subr(24) ^ subr(23); + + /* apply the inverse of the last half of P-function */ + dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; + dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; + dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; + dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; + dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; + dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; + dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; + dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; + dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; + dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; + dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; + dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; + dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; + dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; + dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; + dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; + dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; + dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; + +#ifdef CYASSL_SMALL_STACK + XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + +static int camellia_setup256(const unsigned char *key, u32 *subkey) +{ + u32 kll,klr,krl,krr; /* left half of key */ + u32 krll,krlr,krrl,krrr; /* right half of key */ + u32 il, ir, t0, t1, w0, w1; /* temporary variables */ + u32 kw4l, kw4r, dw, tl, tr; + +#ifdef CYASSL_SMALL_STACK + u32* subL; + u32* subR; + + subL = (u32*) XMALLOC(sizeof(u32) * 34, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (subL == NULL) + return MEMORY_E; + + subR = (u32*) XMALLOC(sizeof(u32) * 34, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (subR == NULL) { + XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#else + u32 subL[34]; + u32 subR[34]; +#endif + + /** + * key = (kll || klr || krl || krr || krll || krlr || krrl || krrr) + * (|| is concatination) + */ + + kll = GETU32(key ); + klr = GETU32(key + 4); + krl = GETU32(key + 8); + krr = GETU32(key + 12); + krll = GETU32(key + 16); + krlr = GETU32(key + 20); + krrl = GETU32(key + 24); + krrr = GETU32(key + 28); + + /* generate KL dependent subkeys */ + subl(0) = kll; subr(0) = klr; + subl(1) = krl; subr(1) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45); + subl(12) = kll; subr(12) = klr; + subl(13) = krl; subr(13) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(16) = kll; subr(16) = klr; + subl(17) = krl; subr(17) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(22) = kll; subr(22) = klr; + subl(23) = krl; subr(23) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); + subl(30) = kll; subr(30) = klr; + subl(31) = krl; subr(31) = krr; + + /* generate KR dependent subkeys */ + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); + subl(4) = krll; subr(4) = krlr; + subl(5) = krrl; subr(5) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); + subl(8) = krll; subr(8) = krlr; + subl(9) = krrl; subr(9) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(18) = krll; subr(18) = krlr; + subl(19) = krrl; subr(19) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); + subl(26) = krll; subr(26) = krlr; + subl(27) = krrl; subr(27) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); + + /* generate KA */ + kll = subl(0) ^ krll; klr = subr(0) ^ krlr; + krl = subl(1) ^ krrl; krr = subr(1) ^ krrr; + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, + w0, w1, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, + kll, klr, il, ir, t0, t1); + kll ^= krll; klr ^= krlr; + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, + krl, krr, il, ir, t0, t1); + krl ^= w0 ^ krrl; krr ^= w1 ^ krrr; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, + w0, w1, il, ir, t0, t1); + kll ^= w0; klr ^= w1; + + /* generate KB */ + krll ^= kll; krlr ^= klr; + krrl ^= krl; krrr ^= krr; + CAMELLIA_F(krll, krlr, + CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R, + w0, w1, il, ir, t0, t1); + krrl ^= w0; krrr ^= w1; + CAMELLIA_F(krrl, krrr, + CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R, + w0, w1, il, ir, t0, t1); + krll ^= w0; krlr ^= w1; + + /* generate KA dependent subkeys */ + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(6) = kll; subr(6) = klr; + subl(7) = krl; subr(7) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); + subl(14) = kll; subr(14) = klr; + subl(15) = krl; subr(15) = krr; + subl(24) = klr; subr(24) = krl; + subl(25) = krr; subr(25) = kll; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49); + subl(28) = kll; subr(28) = klr; + subl(29) = krl; subr(29) = krr; + + /* generate KB dependent subkeys */ + subl(2) = krll; subr(2) = krlr; + subl(3) = krrl; subr(3) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(10) = krll; subr(10) = krlr; + subl(11) = krrl; subr(11) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(20) = krll; subr(20) = krlr; + subl(21) = krrl; subr(21) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51); + subl(32) = krll; subr(32) = krlr; + subl(33) = krrl; subr(33) = krrr; + + /* absorb kw2 to other subkeys */ + subl(3) ^= subl(1); subr(3) ^= subr(1); + subl(5) ^= subl(1); subr(5) ^= subr(1); + subl(7) ^= subl(1); subr(7) ^= subr(1); + subl(1) ^= subr(1) & ~subr(9); + dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); + subl(11) ^= subl(1); subr(11) ^= subr(1); + subl(13) ^= subl(1); subr(13) ^= subr(1); + subl(15) ^= subl(1); subr(15) ^= subr(1); + subl(1) ^= subr(1) & ~subr(17); + dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); + subl(19) ^= subl(1); subr(19) ^= subr(1); + subl(21) ^= subl(1); subr(21) ^= subr(1); + subl(23) ^= subl(1); subr(23) ^= subr(1); + subl(1) ^= subr(1) & ~subr(25); + dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw); + subl(27) ^= subl(1); subr(27) ^= subr(1); + subl(29) ^= subl(1); subr(29) ^= subr(1); + subl(31) ^= subl(1); subr(31) ^= subr(1); + subl(32) ^= subl(1); subr(32) ^= subr(1); + + /* absorb kw4 to other subkeys */ + kw4l = subl(33); kw4r = subr(33); + subl(30) ^= kw4l; subr(30) ^= kw4r; + subl(28) ^= kw4l; subr(28) ^= kw4r; + subl(26) ^= kw4l; subr(26) ^= kw4r; + kw4l ^= kw4r & ~subr(24); + dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw); + subl(22) ^= kw4l; subr(22) ^= kw4r; + subl(20) ^= kw4l; subr(20) ^= kw4r; + subl(18) ^= kw4l; subr(18) ^= kw4r; + kw4l ^= kw4r & ~subr(16); + dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); + subl(14) ^= kw4l; subr(14) ^= kw4r; + subl(12) ^= kw4l; subr(12) ^= kw4r; + subl(10) ^= kw4l; subr(10) ^= kw4r; + kw4l ^= kw4r & ~subr(8); + dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); + subl(6) ^= kw4l; subr(6) ^= kw4r; + subl(4) ^= kw4l; subr(4) ^= kw4r; + subl(2) ^= kw4l; subr(2) ^= kw4r; + subl(0) ^= kw4l; subr(0) ^= kw4r; + + /* key XOR is end of F-function */ + CamelliaSubkeyL(0) = subl(0) ^ subl(2); + CamelliaSubkeyR(0) = subr(0) ^ subr(2); + CamelliaSubkeyL(2) = subl(3); + CamelliaSubkeyR(2) = subr(3); + CamelliaSubkeyL(3) = subl(2) ^ subl(4); + CamelliaSubkeyR(3) = subr(2) ^ subr(4); + CamelliaSubkeyL(4) = subl(3) ^ subl(5); + CamelliaSubkeyR(4) = subr(3) ^ subr(5); + CamelliaSubkeyL(5) = subl(4) ^ subl(6); + CamelliaSubkeyR(5) = subr(4) ^ subr(6); + CamelliaSubkeyL(6) = subl(5) ^ subl(7); + CamelliaSubkeyR(6) = subr(5) ^ subr(7); + tl = subl(10) ^ (subr(10) & ~subr(8)); + dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(7) = subl(6) ^ tl; + CamelliaSubkeyR(7) = subr(6) ^ tr; + CamelliaSubkeyL(8) = subl(8); + CamelliaSubkeyR(8) = subr(8); + CamelliaSubkeyL(9) = subl(9); + CamelliaSubkeyR(9) = subr(9); + tl = subl(7) ^ (subr(7) & ~subr(9)); + dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(10) = tl ^ subl(11); + CamelliaSubkeyR(10) = tr ^ subr(11); + CamelliaSubkeyL(11) = subl(10) ^ subl(12); + CamelliaSubkeyR(11) = subr(10) ^ subr(12); + CamelliaSubkeyL(12) = subl(11) ^ subl(13); + CamelliaSubkeyR(12) = subr(11) ^ subr(13); + CamelliaSubkeyL(13) = subl(12) ^ subl(14); + CamelliaSubkeyR(13) = subr(12) ^ subr(14); + CamelliaSubkeyL(14) = subl(13) ^ subl(15); + CamelliaSubkeyR(14) = subr(13) ^ subr(15); + tl = subl(18) ^ (subr(18) & ~subr(16)); + dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(15) = subl(14) ^ tl; + CamelliaSubkeyR(15) = subr(14) ^ tr; + CamelliaSubkeyL(16) = subl(16); + CamelliaSubkeyR(16) = subr(16); + CamelliaSubkeyL(17) = subl(17); + CamelliaSubkeyR(17) = subr(17); + tl = subl(15) ^ (subr(15) & ~subr(17)); + dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(18) = tl ^ subl(19); + CamelliaSubkeyR(18) = tr ^ subr(19); + CamelliaSubkeyL(19) = subl(18) ^ subl(20); + CamelliaSubkeyR(19) = subr(18) ^ subr(20); + CamelliaSubkeyL(20) = subl(19) ^ subl(21); + CamelliaSubkeyR(20) = subr(19) ^ subr(21); + CamelliaSubkeyL(21) = subl(20) ^ subl(22); + CamelliaSubkeyR(21) = subr(20) ^ subr(22); + CamelliaSubkeyL(22) = subl(21) ^ subl(23); + CamelliaSubkeyR(22) = subr(21) ^ subr(23); + tl = subl(26) ^ (subr(26) & ~subr(24)); + dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(23) = subl(22) ^ tl; + CamelliaSubkeyR(23) = subr(22) ^ tr; + CamelliaSubkeyL(24) = subl(24); + CamelliaSubkeyR(24) = subr(24); + CamelliaSubkeyL(25) = subl(25); + CamelliaSubkeyR(25) = subr(25); + tl = subl(23) ^ (subr(23) & ~subr(25)); + dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(26) = tl ^ subl(27); + CamelliaSubkeyR(26) = tr ^ subr(27); + CamelliaSubkeyL(27) = subl(26) ^ subl(28); + CamelliaSubkeyR(27) = subr(26) ^ subr(28); + CamelliaSubkeyL(28) = subl(27) ^ subl(29); + CamelliaSubkeyR(28) = subr(27) ^ subr(29); + CamelliaSubkeyL(29) = subl(28) ^ subl(30); + CamelliaSubkeyR(29) = subr(28) ^ subr(30); + CamelliaSubkeyL(30) = subl(29) ^ subl(31); + CamelliaSubkeyR(30) = subr(29) ^ subr(31); + CamelliaSubkeyL(31) = subl(30); + CamelliaSubkeyR(31) = subr(30); + CamelliaSubkeyL(32) = subl(32) ^ subl(31); + CamelliaSubkeyR(32) = subr(32) ^ subr(31); + + /* apply the inverse of the last half of P-function */ + dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; + dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; + dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; + dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; + dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; + dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; + dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; + dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; + dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; + dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; + dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; + dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; + dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; + dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; + dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; + dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; + dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; + dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; + dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw; + dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw; + dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw; + dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw; + dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw; + dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw; + +#ifdef CYASSL_SMALL_STACK + XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + +static int camellia_setup192(const unsigned char *key, u32 *subkey) +{ + unsigned char kk[32]; + u32 krll, krlr, krrl,krrr; + + memcpy(kk, key, 24); + memcpy((unsigned char *)&krll, key+16,4); + memcpy((unsigned char *)&krlr, key+20,4); + krrl = ~krll; + krrr = ~krlr; + memcpy(kk+24, (unsigned char *)&krrl, 4); + memcpy(kk+28, (unsigned char *)&krrr, 4); + + return camellia_setup256(kk, subkey); +} + + +/** + * Stuff related to camellia encryption/decryption + * + * "io" must be 4byte aligned and big-endian data. + */ +static void camellia_encrypt128(const u32 *subkey, u32 *io) +{ + u32 il, ir, t0, t1; + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(0); + io[1] ^= CamelliaSubkeyR(0); + /* main iteration */ + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(24); + io[3] ^= CamelliaSubkeyR(24); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +static void camellia_decrypt128(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(24); + io[1] ^= CamelliaSubkeyR(24); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(0); + io[3] ^= CamelliaSubkeyR(0); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +/** + * stuff for 192 and 256bit encryption/decryption + */ +static void camellia_encrypt256(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(0); + io[1] ^= CamelliaSubkeyR(0); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(24),CamelliaSubkeyR(24), + CamelliaSubkeyL(25),CamelliaSubkeyR(25), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(26),CamelliaSubkeyR(26), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(27),CamelliaSubkeyR(27), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(28),CamelliaSubkeyR(28), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(29),CamelliaSubkeyR(29), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(30),CamelliaSubkeyR(30), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(31),CamelliaSubkeyR(31), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(32); + io[3] ^= CamelliaSubkeyR(32); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +static void camellia_decrypt256(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(32); + io[1] ^= CamelliaSubkeyR(32); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(31),CamelliaSubkeyR(31), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(30),CamelliaSubkeyR(30), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(29),CamelliaSubkeyR(29), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(28),CamelliaSubkeyR(28), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(27),CamelliaSubkeyR(27), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(26),CamelliaSubkeyR(26), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(25),CamelliaSubkeyR(25), + CamelliaSubkeyL(24),CamelliaSubkeyR(24), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(0); + io[3] ^= CamelliaSubkeyR(0); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +/*** + * + * API for compatibility + */ + +static void Camellia_EncryptBlock(const int keyBitLength, + const unsigned char *plaintext, + const KEY_TABLE_TYPE keyTable, + unsigned char *ciphertext) +{ + u32 tmp[4]; + + tmp[0] = GETU32(plaintext); + tmp[1] = GETU32(plaintext + 4); + tmp[2] = GETU32(plaintext + 8); + tmp[3] = GETU32(plaintext + 12); + + switch (keyBitLength) { + case 128: + camellia_encrypt128(keyTable, tmp); + break; + case 192: + /* fall through */ + case 256: + camellia_encrypt256(keyTable, tmp); + break; + default: + break; + } + + PUTU32(ciphertext, tmp[0]); + PUTU32(ciphertext + 4, tmp[1]); + PUTU32(ciphertext + 8, tmp[2]); + PUTU32(ciphertext + 12, tmp[3]); +} + +static void Camellia_DecryptBlock(const int keyBitLength, + const unsigned char *ciphertext, + const KEY_TABLE_TYPE keyTable, + unsigned char *plaintext) +{ + u32 tmp[4]; + + tmp[0] = GETU32(ciphertext); + tmp[1] = GETU32(ciphertext + 4); + tmp[2] = GETU32(ciphertext + 8); + tmp[3] = GETU32(ciphertext + 12); + + switch (keyBitLength) { + case 128: + camellia_decrypt128(keyTable, tmp); + break; + case 192: + /* fall through */ + case 256: + camellia_decrypt256(keyTable, tmp); + break; + default: + break; + } + PUTU32(plaintext, tmp[0]); + PUTU32(plaintext + 4, tmp[1]); + PUTU32(plaintext + 8, tmp[2]); + PUTU32(plaintext + 12, tmp[3]); +} + + + +/* CTaoCrypt wrappers to the Camellia code */ + +int CamelliaSetKey(Camellia* cam, const byte* key, word32 len, const byte* iv) +{ + int ret = 0; + + if (cam == NULL) return BAD_FUNC_ARG; + + XMEMSET(cam->key, 0, sizeof(KEY_TABLE_TYPE)); + + switch (len) { + case 16: + ret = camellia_setup128(key, cam->key); + break; + case 24: + ret = camellia_setup192(key, cam->key); + break; + case 32: + ret = camellia_setup256(key, cam->key); + break; + default: + return BAD_FUNC_ARG; + } + + if (ret != 0) + return ret; + + cam->keySz = len * 8; + + return CamelliaSetIV(cam, iv); +} + + +int CamelliaSetIV(Camellia* cam, const byte* iv) +{ + if (cam == NULL) + return BAD_FUNC_ARG; + + if (iv) + XMEMCPY(cam->reg, iv, CAMELLIA_BLOCK_SIZE); + else + XMEMSET(cam->reg, 0, CAMELLIA_BLOCK_SIZE); + + return 0; +} + + +void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in) +{ + Camellia_EncryptBlock(cam->keySz, in, cam->key, out); +} + + +void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in) +{ + Camellia_DecryptBlock(cam->keySz, in, cam->key, out); +} + + +void CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / CAMELLIA_BLOCK_SIZE; + + while (blocks--) { + xorbuf((byte*)cam->reg, in, CAMELLIA_BLOCK_SIZE); + Camellia_EncryptBlock(cam->keySz, (byte*)cam->reg, + cam->key, (byte*)cam->reg); + XMEMCPY(out, cam->reg, CAMELLIA_BLOCK_SIZE); + + out += CAMELLIA_BLOCK_SIZE; + in += CAMELLIA_BLOCK_SIZE; + } +} + + +void CamelliaCbcDecrypt(Camellia* cam, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / CAMELLIA_BLOCK_SIZE; + + while (blocks--) { + XMEMCPY(cam->tmp, in, CAMELLIA_BLOCK_SIZE); + Camellia_DecryptBlock(cam->keySz, (byte*)cam->tmp, cam->key, out); + xorbuf(out, (byte*)cam->reg, CAMELLIA_BLOCK_SIZE); + XMEMCPY(cam->reg, cam->tmp, CAMELLIA_BLOCK_SIZE); + + out += CAMELLIA_BLOCK_SIZE; + in += CAMELLIA_BLOCK_SIZE; + } +} + + +#endif /* HAVE_CAMELLIA */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/coding.c b/project1/cyassl-3.0.0/ctaocrypt/src/coding.c new file mode 100644 index 00000000..cdad0f5c --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/coding.c @@ -0,0 +1,399 @@ +/* coding.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_CODING + +#include +#include +#include + + +enum { + BAD = 0xFF, /* invalid encoding */ + PAD = '=', + PEM_LINE_SZ = 64 +}; + + +static +const byte base64Decode[] = { 62, BAD, BAD, BAD, 63, /* + starts at 0x2B */ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + BAD, BAD, BAD, BAD, BAD, BAD, BAD, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, + BAD, BAD, BAD, BAD, BAD, BAD, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51 + }; + + +int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) +{ + word32 i = 0; + word32 j = 0; + word32 plainSz = inLen - ((inLen + (PEM_LINE_SZ - 1)) / PEM_LINE_SZ ); + const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1; + + plainSz = (plainSz * 3 + 3) / 4; + if (plainSz > *outLen) return BAD_FUNC_ARG; + + while (inLen > 3) { + byte b1, b2, b3; + byte e1 = in[j++]; + byte e2 = in[j++]; + byte e3 = in[j++]; + byte e4 = in[j++]; + + int pad3 = 0; + int pad4 = 0; + + if (e1 == 0) /* end file 0's */ + break; + if (e3 == PAD) + pad3 = 1; + if (e4 == PAD) + pad4 = 1; + + if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) { + CYASSL_MSG("Bad Base64 Decode data, too small"); + return ASN_INPUT_E; + } + + if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) { + CYASSL_MSG("Bad Base64 Decode data, too big"); + return ASN_INPUT_E; + } + + e1 = base64Decode[e1 - 0x2B]; + e2 = base64Decode[e2 - 0x2B]; + e3 = (e3 == PAD) ? 0 : base64Decode[e3 - 0x2B]; + e4 = (e4 == PAD) ? 0 : base64Decode[e4 - 0x2B]; + + b1 = (byte)((e1 << 2) | (e2 >> 4)); + b2 = (byte)(((e2 & 0xF) << 4) | (e3 >> 2)); + b3 = (byte)(((e3 & 0x3) << 6) | e4); + + out[i++] = b1; + if (!pad3) + out[i++] = b2; + if (!pad4) + out[i++] = b3; + else + break; + + inLen -= 4; + if (inLen && (in[j] == ' ' || in[j] == '\r' || in[j] == '\n')) { + byte endLine = in[j++]; + inLen--; + while (inLen && endLine == ' ') { /* allow trailing whitespace */ + endLine = in[j++]; + inLen--; + } + if (endLine == '\r') { + if (inLen) { + endLine = in[j++]; + inLen--; + } + } + if (endLine != '\n') { + CYASSL_MSG("Bad end of line in Base64 Decode"); + return ASN_INPUT_E; + } + } + } + *outLen = i; + + return 0; +} + + +#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) + +static +const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/' + }; + + +/* make sure *i (idx) won't exceed max, store and possibly escape to out, + * raw means use e w/o decode, 0 on success */ +static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max, + int raw) +{ + int doEscape = 0; + word32 needed = 1; + word32 idx = *i; + + byte basic; + byte plus = 0; + byte equals = 0; + byte newline = 0; + + if (raw) + basic = e; + else + basic = base64Encode[e]; + + /* check whether to escape */ + if (escaped) { + switch ((char)basic) { + case '+' : + plus = 1; + doEscape = 1; + needed += 2; + break; + case '=' : + equals = 1; + doEscape = 1; + needed += 2; + break; + case '\n' : + newline = 1; + doEscape = 1; + needed += 2; + break; + default: + /* do nothing */ + break; + } + } + + /* check size */ + if ( (idx+needed) > max) { + CYASSL_MSG("Escape buffer max too small"); + return BUFFER_E; + } + + /* store it */ + if (doEscape == 0) { + out[idx++] = basic; + } + else { + out[idx++] = '%'; /* start escape */ + + if (plus) { + out[idx++] = '2'; + out[idx++] = 'B'; + } + else if (equals) { + out[idx++] = '3'; + out[idx++] = 'D'; + } + else if (newline) { + out[idx++] = '0'; + out[idx++] = 'A'; + } + + } + *i = idx; + + return 0; +} + + +/* internal worker, handles both escaped and normal line endings */ +static int DoBase64_Encode(const byte* in, word32 inLen, byte* out, + word32* outLen, int escaped) +{ + int ret = 0; + word32 i = 0, + j = 0, + n = 0; /* new line counter */ + + word32 outSz = (inLen + 3 - 1) / 3 * 4; + word32 addSz = (outSz + PEM_LINE_SZ - 1) / PEM_LINE_SZ; /* new lines */ + + if (escaped) + addSz *= 3; /* instead of just \n, we're doing %0A triplet */ + + outSz += addSz; + + /* if escaped we can't predetermine size for one pass encoding, but + * make sure we have enough if no escapes are in input */ + if (outSz > *outLen) return BAD_FUNC_ARG; + + while (inLen > 2) { + byte b1 = in[j++]; + byte b2 = in[j++]; + byte b3 = in[j++]; + + /* encoded idx */ + byte e1 = b1 >> 2; + byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4)); + byte e3 = (byte)(((b2 & 0xF) << 2) | (b3 >> 6)); + byte e4 = b3 & 0x3F; + + /* store */ + ret = CEscape(escaped, e1, out, &i, *outLen, 0); + if (ret != 0) break; + ret = CEscape(escaped, e2, out, &i, *outLen, 0); + if (ret != 0) break; + ret = CEscape(escaped, e3, out, &i, *outLen, 0); + if (ret != 0) break; + ret = CEscape(escaped, e4, out, &i, *outLen, 0); + if (ret != 0) break; + + inLen -= 3; + + if ((++n % (PEM_LINE_SZ / 4)) == 0 && inLen) { + ret = CEscape(escaped, '\n', out, &i, *outLen, 1); + if (ret != 0) break; + } + } + + /* last integral */ + if (inLen && ret == 0) { + int twoBytes = (inLen == 2); + + byte b1 = in[j++]; + byte b2 = (twoBytes) ? in[j++] : 0; + + byte e1 = b1 >> 2; + byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4)); + byte e3 = (byte)((b2 & 0xF) << 2); + + ret = CEscape(escaped, e1, out, &i, *outLen, 0); + if (ret == 0) + ret = CEscape(escaped, e2, out, &i, *outLen, 0); + if (ret == 0) { + /* third */ + if (twoBytes) + ret = CEscape(escaped, e3, out, &i, *outLen, 0); + else + ret = CEscape(escaped, '=', out, &i, *outLen, 1); + } + /* fourth always pad */ + if (ret == 0) + ret = CEscape(escaped, '=', out, &i, *outLen, 1); + } + + if (ret == 0) + ret = CEscape(escaped, '\n', out, &i, *outLen, 1); + + if (i != outSz && escaped == 0 && ret == 0) + return ASN_INPUT_E; + + *outLen = i; + return ret; +} + + +/* Base64 Encode, PEM style, with \n line endings */ +int Base64_Encode(const byte* in, word32 inLen, byte* out, word32* outLen) +{ + return DoBase64_Encode(in, inLen, out, outLen, 0); +} + + +/* Base64 Encode, with %0A esacped line endings instead of \n */ +int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen) +{ + return DoBase64_Encode(in, inLen, out, outLen, 1); +} + + +#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) */ + + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) + +static +const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + BAD, BAD, BAD, BAD, BAD, BAD, BAD, + 10, 11, 12, 13, 14, 15, /* upper case A-F */ + BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, + BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, + BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, + BAD, BAD, /* G - ` */ + 10, 11, 12, 13, 14, 15 /* lower case a-f */ + }; /* A starts at 0x41 not 0x3A */ + +int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) +{ + word32 inIdx = 0; + word32 outIdx = 0; + + if (inLen == 1 && *outLen && in) { + byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */ + + /* sanity check */ + if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) + return ASN_INPUT_E; + + b = hexDecode[b]; + + if (b == BAD) + return ASN_INPUT_E; + + out[outIdx++] = b; + + *outLen = outIdx; + return 0; + } + + if (inLen % 2) + return BAD_FUNC_ARG; + + if (*outLen < (inLen / 2)) + return BAD_FUNC_ARG; + + while (inLen) { + byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */ + byte b2 = in[inIdx++] - 0x30; + + /* sanity checks */ + if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) + return ASN_INPUT_E; + if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0])) + return ASN_INPUT_E; + + b = hexDecode[b]; + b2 = hexDecode[b2]; + + if (b == BAD || b2 == BAD) + return ASN_INPUT_E; + + out[outIdx++] = (byte)((b << 4) | b2); + inLen -= 2; + } + + *outLen = outIdx; + return 0; +} + + +#endif /* (OPENSSL_EXTRA) || (HAVE_WEBSERVER) || (HAVE_FIPS) */ + +#endif /* NO_CODING */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/compress.c b/project1/cyassl-3.0.0/ctaocrypt/src/compress.c new file mode 100644 index 00000000..faebd2ad --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/compress.c @@ -0,0 +1,169 @@ +/* compress.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_LIBZ + + +#include +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + +#include + + +/* alloc user allocs to work with zlib */ +static void* myAlloc(void* opaque, unsigned int item, unsigned int size) +{ + (void)opaque; + return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ); +} + + +static void myFree(void* opaque, void* memory) +{ + (void)opaque; + XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ); +} + + +#ifdef HAVE_MCAPI + #define DEFLATE_DEFAULT_WINDOWBITS 11 + #define DEFLATE_DEFAULT_MEMLEVEL 1 +#else + #define DEFLATE_DEFAULT_WINDOWBITS 15 + #define DEFLATE_DEFAULT_MEMLEVEL 8 +#endif + + +int Compress(byte* out, word32 outSz, const byte* in, word32 inSz, word32 flags) +/* + * out - pointer to destination buffer + * outSz - size of destination buffer + * in - pointer to source buffer to compress + * inSz - size of source to compress + * flags - flags to control how compress operates + * + * return: + * negative - error code + * positive - bytes stored in out buffer + * + * Note, the output buffer still needs to be larger than the input buffer. + * The right chunk of data won't compress at all, and the lookup table will + * add to the size of the output. The libz code says the compressed + * buffer should be srcSz + 0.1% + 12. + */ +{ + z_stream stream; + int result = 0; + + stream.next_in = (Bytef*)in; + stream.avail_in = (uInt)inSz; +#ifdef MAXSEG_64K + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != inSz) return COMPRESS_INIT_E; +#endif + stream.next_out = out; + stream.avail_out = (uInt)outSz; + if ((uLong)stream.avail_out != outSz) return COMPRESS_INIT_E; + + stream.zalloc = (alloc_func)myAlloc; + stream.zfree = (free_func)myFree; + stream.opaque = (voidpf)0; + + if (deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, + DEFLATE_DEFAULT_WINDOWBITS, DEFLATE_DEFAULT_MEMLEVEL, + flags ? Z_FIXED : Z_DEFAULT_STRATEGY) != Z_OK) + return COMPRESS_INIT_E; + + if (deflate(&stream, Z_FINISH) != Z_STREAM_END) { + deflateEnd(&stream); + return COMPRESS_E; + } + + result = (int)stream.total_out; + + if (deflateEnd(&stream) != Z_OK) + result = COMPRESS_E; + + return result; +} + + +int DeCompress(byte* out, word32 outSz, const byte* in, word32 inSz) +/* + * out - pointer to destination buffer + * outSz - size of destination buffer + * in - pointer to source buffer to compress + * inSz - size of source to compress + * flags - flags to control how compress operates + * + * return: + * negative - error code + * positive - bytes stored in out buffer + */ +{ + z_stream stream; + int result = 0; + + stream.next_in = (Bytef*)in; + stream.avail_in = (uInt)inSz; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != inSz) return DECOMPRESS_INIT_E; + + stream.next_out = out; + stream.avail_out = (uInt)outSz; + if ((uLong)stream.avail_out != outSz) return DECOMPRESS_INIT_E; + + stream.zalloc = (alloc_func)myAlloc; + stream.zfree = (free_func)myFree; + stream.opaque = (voidpf)0; + + if (inflateInit2(&stream, DEFLATE_DEFAULT_WINDOWBITS) != Z_OK) + return DECOMPRESS_INIT_E; + + if (inflate(&stream, Z_FINISH) != Z_STREAM_END) { + inflateEnd(&stream); + return DECOMPRESS_E; + } + + result = (int)stream.total_out; + + if (inflateEnd(&stream) != Z_OK) + result = DECOMPRESS_E; + + return result; +} + + +#endif /* HAVE_LIBZ */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/des3.c b/project1/cyassl-3.0.0/ctaocrypt/src/des3.c new file mode 100644 index 00000000..dc1aac91 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/des3.c @@ -0,0 +1,1422 @@ +/* des3.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_DES3 + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include + +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifdef HAVE_CAVIUM + static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv); + static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in, + word32 length); + static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in, + word32 length); +#endif + + + + +#ifdef STM32F2_CRYPTO + /* + * STM32F2 hardware DES/3DES support through the STM32F2 standard + * peripheral library. Documentation located in STM32F2xx Standard + * Peripheral Library document (See note in README). + */ + #include "stm32f2xx.h" + #include "stm32f2xx_cryp.h" + + int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) + { + word32 *dkey = des->key; + + XMEMCPY(dkey, key, 8); + ByteReverseWords(dkey, dkey, 8); + + Des_SetIV(des, iv); + + return 0; + } + + int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) + { + word32 *dkey1 = des->key[0]; + word32 *dkey2 = des->key[1]; + word32 *dkey3 = des->key[2]; + + XMEMCPY(dkey1, key, 8); /* set key 1 */ + XMEMCPY(dkey2, key + 8, 8); /* set key 2 */ + XMEMCPY(dkey3, key + 16, 8); /* set key 3 */ + + ByteReverseWords(dkey1, dkey1, 8); + ByteReverseWords(dkey2, dkey2, 8); + ByteReverseWords(dkey3, dkey3, 8); + + return Des3_SetIV(des, iv); + } + + void DesCrypt(Des* des, byte* out, const byte* in, word32 sz, + int dir, int mode) + { + word32 *dkey, *iv; + CRYP_InitTypeDef DES_CRYP_InitStructure; + CRYP_KeyInitTypeDef DES_CRYP_KeyInitStructure; + CRYP_IVInitTypeDef DES_CRYP_IVInitStructure; + + dkey = des->key; + iv = des->reg; + + /* crypto structure initialization */ + CRYP_KeyStructInit(&DES_CRYP_KeyInitStructure); + CRYP_StructInit(&DES_CRYP_InitStructure); + CRYP_IVStructInit(&DES_CRYP_IVInitStructure); + + /* reset registers to their default values */ + CRYP_DeInit(); + + /* set direction, mode, and datatype */ + if (dir == DES_ENCRYPTION) { + DES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; + } else { /* DES_DECRYPTION */ + DES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; + } + + if (mode == DES_CBC) { + DES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_DES_CBC; + } else { /* DES_ECB */ + DES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_DES_ECB; + } + + DES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; + CRYP_Init(&DES_CRYP_InitStructure); + + /* load key into correct registers */ + DES_CRYP_KeyInitStructure.CRYP_Key1Left = dkey[0]; + DES_CRYP_KeyInitStructure.CRYP_Key1Right = dkey[1]; + CRYP_KeyInit(&DES_CRYP_KeyInitStructure); + + /* set iv */ + ByteReverseWords(iv, iv, DES_BLOCK_SIZE); + DES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; + DES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; + CRYP_IVInit(&DES_CRYP_IVInitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + while (sz > 0) + { + /* flush IN/OUT FIFOs */ + CRYP_FIFOFlush(); + + /* if input and output same will overwrite input iv */ + XMEMCPY(des->tmp, in + sz - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + + CRYP_DataIn(*(uint32_t*)&in[0]); + CRYP_DataIn(*(uint32_t*)&in[4]); + + /* wait until the complete message has been processed */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + *(uint32_t*)&out[0] = CRYP_DataOut(); + *(uint32_t*)&out[4] = CRYP_DataOut(); + + /* store iv for next call */ + XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); + + sz -= DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + out += DES_BLOCK_SIZE; + } + + /* disable crypto processor */ + CRYP_Cmd(DISABLE); + } + + void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des, out, in, sz, DES_ENCRYPTION, DES_CBC); + } + + void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des, out, in, sz, DES_DECRYPTION, DES_CBC); + } + + void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des, out, in, sz, DES_ENCRYPTION, DES_ECB); + } + + void Des3Crypt(Des3* des, byte* out, const byte* in, word32 sz, + int dir) + { + word32 *dkey1, *dkey2, *dkey3, *iv; + CRYP_InitTypeDef DES3_CRYP_InitStructure; + CRYP_KeyInitTypeDef DES3_CRYP_KeyInitStructure; + CRYP_IVInitTypeDef DES3_CRYP_IVInitStructure; + + dkey1 = des->key[0]; + dkey2 = des->key[1]; + dkey3 = des->key[2]; + iv = des->reg; + + /* crypto structure initialization */ + CRYP_KeyStructInit(&DES3_CRYP_KeyInitStructure); + CRYP_StructInit(&DES3_CRYP_InitStructure); + CRYP_IVStructInit(&DES3_CRYP_IVInitStructure); + + /* reset registers to their default values */ + CRYP_DeInit(); + + /* set direction, mode, and datatype */ + if (dir == DES_ENCRYPTION) { + DES3_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; + } else { + DES3_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; + } + + DES3_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_TDES_CBC; + DES3_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; + CRYP_Init(&DES3_CRYP_InitStructure); + + /* load key into correct registers */ + DES3_CRYP_KeyInitStructure.CRYP_Key1Left = dkey1[0]; + DES3_CRYP_KeyInitStructure.CRYP_Key1Right = dkey1[1]; + DES3_CRYP_KeyInitStructure.CRYP_Key2Left = dkey2[0]; + DES3_CRYP_KeyInitStructure.CRYP_Key2Right = dkey2[1]; + DES3_CRYP_KeyInitStructure.CRYP_Key3Left = dkey3[0]; + DES3_CRYP_KeyInitStructure.CRYP_Key3Right = dkey3[1]; + CRYP_KeyInit(&DES3_CRYP_KeyInitStructure); + + /* set iv */ + ByteReverseWords(iv, iv, DES_BLOCK_SIZE); + DES3_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; + DES3_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; + CRYP_IVInit(&DES3_CRYP_IVInitStructure); + + /* enable crypto processor */ + CRYP_Cmd(ENABLE); + + while (sz > 0) + { + /* flush IN/OUT FIFOs */ + CRYP_FIFOFlush(); + + CRYP_DataIn(*(uint32_t*)&in[0]); + CRYP_DataIn(*(uint32_t*)&in[4]); + + /* wait until the complete message has been processed */ + while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} + + *(uint32_t*)&out[0] = CRYP_DataOut(); + *(uint32_t*)&out[4] = CRYP_DataOut(); + + /* store iv for next call */ + XMEMCPY(des->reg, out + sz - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + + sz -= DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + out += DES_BLOCK_SIZE; + } + + /* disable crypto processor */ + CRYP_Cmd(DISABLE); + + } + + int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + Des3Crypt(des, out, in, sz, DES_ENCRYPTION); + return 0; + } + + int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + Des3Crypt(des, out, in, sz, DES_DECRYPTION); + return 0; + } + + +#elif defined(HAVE_COLDFIRE_SEC) + +#include "sec.h" +#include "mcf548x_sec.h" + +#include "memory_pools.h" +extern TX_BYTE_POOL mp_ncached; /* Non Cached memory pool */ +#define DES_BUFFER_SIZE (DES_BLOCK_SIZE * 16) +static unsigned char *DesBuffer = NULL ; + +#define SEC_DESC_DES_CBC_ENCRYPT 0x20500010 +#define SEC_DESC_DES_CBC_DECRYPT 0x20400010 +#define SEC_DESC_DES3_CBC_ENCRYPT 0x20700010 +#define SEC_DESC_DES3_CBC_DECRYPT 0x20600010 + +extern volatile unsigned char __MBAR[]; + +static void Des_Cbc(Des* des, byte* out, const byte* in, word32 sz, word32 desc) +{ + static volatile SECdescriptorType descriptor = { NULL } ; + int ret ; int stat1,stat2 ; + int i ; int size ; + volatile int v ; + + while(sz) { + if((sz%DES_BUFFER_SIZE) == sz) { + size = sz ; + sz = 0 ; + } else { + size = DES_BUFFER_SIZE ; + sz -= DES_BUFFER_SIZE ; + } + + descriptor.header = desc ; + /* + escriptor.length1 = 0x0; + descriptor.pointer1 = NULL; + */ + descriptor.length2 = des->ivlen ; + descriptor.pointer2 = (byte *)des->iv ; + descriptor.length3 = des->keylen ; + descriptor.pointer3 = (byte *)des->key; + descriptor.length4 = size; + descriptor.pointer4 = (byte *)in ; + descriptor.length5 = size; + descriptor.pointer5 = DesBuffer ; + /* + descriptor.length6 = 0; + descriptor.pointer6 = NULL; + descriptor.length7 = 0x0; + descriptor.pointer7 = NULL; + descriptor.nextDescriptorPtr = NULL ; + */ + + /* Initialize SEC and wait for encryption to complete */ + MCF_SEC_CCCR0 = 0x0000001A; //enable channel done notification + + /* Point SEC to the location of the descriptor */ + MCF_SEC_FR0 = (uint32)&descriptor; + + /* poll SISR to determine when channel is complete */ + while (!(MCF_SEC_SISRL) && !(MCF_SEC_SISRH)) + ; + + for(v=0; v<500; v++) ; + + ret = MCF_SEC_SISRH; + stat1 = MCF_SEC_DSR ; + stat2 = MCF_SEC_DISR ; + if(ret & 0xe0000000) + db_printf("Des_Cbc(%x):ISRH=%08x, DSR=%08x, DISR=%08x\n", desc, ret, stat1, stat2) ; + + XMEMCPY(out, DesBuffer, size) ; + + if((desc==SEC_DESC_DES3_CBC_ENCRYPT)||(desc==SEC_DESC_DES_CBC_ENCRYPT)) { + XMEMCPY((void*)des->iv, (void*)&(out[size-DES_IVLEN]), DES_IVLEN) ; + } else { + XMEMCPY((void*)des->iv, (void*)&(in[size-DES_IVLEN]), DES_IVLEN) ; + } + + in += size ; + out += size ; + + } +} + + +void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) +{ + Des_Cbc(des, out, in, sz, SEC_DESC_DES_CBC_ENCRYPT) ; +} + +void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) +{ + Des_Cbc(des, out, in, sz, SEC_DESC_DES_CBC_DECRYPT) ; +} + +int Des3_CbcEncrypt(Des3* des3, byte* out, const byte* in, word32 sz) +{ + Des_Cbc((Des *)des3, out, in, sz, SEC_DESC_DES3_CBC_ENCRYPT) ; + return 0; +} + +int Des3_CbcDecrypt(Des3* des3, byte* out, const byte* in, word32 sz) +{ + Des_Cbc((Des *)des3, out, in, sz, SEC_DESC_DES3_CBC_DECRYPT) ; + return 0; +} + + +int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) +{ + int i ; int status ; + + if(DesBuffer == NULL) { + status = tx_byte_allocate(&mp_ncached,(void *)&DesBuffer,DES_BUFFER_SIZE,TX_NO_WAIT); + } + + XMEMCPY(des->key, key, DES_KEYLEN); + des->keylen = DES_KEYLEN ; + des->ivlen = 0 ; + if (iv) { + XMEMCPY(des->iv, iv, DES_IVLEN); + des->ivlen = DES_IVLEN ; + } else { + for(i=0; iiv[i] = 0x0 ; + } + + return 0; +} + +int Des3_SetKey(Des3* des3, const byte* key, const byte* iv, int dir) +{ + int i ; int status ; + + if(DesBuffer == NULL) { + status = tx_byte_allocate(&mp_ncached,(void *)&DesBuffer,DES_BUFFER_SIZE,TX_NO_WAIT); + } + + XMEMCPY(des3->key, key, DES3_KEYLEN); + des3->keylen = DES3_KEYLEN ; + des3->ivlen = 0 ; + if (iv) { + XMEMCPY(des3->iv, iv, DES3_IVLEN); + des3->ivlen = DES3_IVLEN ; + } else { + for(i=0; iiv[i] = 0x0 ; + } + + return 0; +} + +#elif defined FREESCALE_MMCAU + /* + * Freescale mmCAU hardware DES/3DES support through the CAU/mmCAU library. + * Documentation located in ColdFire/ColdFire+ CAU and Kinetis mmCAU + * Software Library User Guide (See note in README). + */ + #include "cau_api.h" + + const unsigned char parityLookup[128] = + { + 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, + 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, + 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, + 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0 + }; + + int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) + { + int i = 0; + byte* dkey = (byte*)des->key; + + XMEMCPY(dkey, key, 8); + + Des_SetIV(des, iv); + + /* fix key parity, if needed */ + for (i = 0; i < 8; i++) { + dkey[i] = ((dkey[i] & 0xFE) | parityLookup[dkey[i] >> 1]); + } + + return 0; + } + + int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) + { + int i = 0, ret = 0; + byte* dkey1 = (byte*)des->key[0]; + byte* dkey2 = (byte*)des->key[1]; + byte* dkey3 = (byte*)des->key[2]; + + XMEMCPY(dkey1, key, 8); /* set key 1 */ + XMEMCPY(dkey2, key + 8, 8); /* set key 2 */ + XMEMCPY(dkey3, key + 16, 8); /* set key 3 */ + + ret = Des3_SetIV(des, iv); + if (ret != 0) + return ret; + + /* fix key parity if needed */ + for (i = 0; i < 8; i++) + dkey1[i] = ((dkey1[i] & 0xFE) | parityLookup[dkey1[i] >> 1]); + + for (i = 0; i < 8; i++) + dkey2[i] = ((dkey2[i] & 0xFE) | parityLookup[dkey2[i] >> 1]); + + for (i = 0; i < 8; i++) + dkey3[i] = ((dkey3[i] & 0xFE) | parityLookup[dkey3[i] >> 1]); + + return ret; + } + + void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + byte *iv; + byte temp_block[DES_BLOCK_SIZE]; + + iv = (byte*)des->reg; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); + + /* XOR block with IV for CBC */ + for (i = 0; i < DES_BLOCK_SIZE; i++) + temp_block[i] ^= iv[i]; + + cau_des_encrypt(temp_block, (byte*)des->key, out + offset); + + len -= DES_BLOCK_SIZE; + offset += DES_BLOCK_SIZE; + + /* store IV for next block */ + XMEMCPY(iv, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + } + + return; + } + + void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + byte* iv; + byte temp_block[DES_BLOCK_SIZE]; + + iv = (byte*)des->reg; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); + + cau_des_decrypt(in + offset, (byte*)des->key, out + offset); + + /* XOR block with IV for CBC */ + for (i = 0; i < DES_BLOCK_SIZE; i++) + (out + offset)[i] ^= iv[i]; + + /* store IV for next block */ + XMEMCPY(iv, temp_block, DES_BLOCK_SIZE); + + len -= DES_BLOCK_SIZE; + offset += DES_BLOCK_SIZE; + } + + return; + } + + int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + + byte *iv; + byte temp_block[DES_BLOCK_SIZE]; + + iv = (byte*)des->reg; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); + + /* XOR block with IV for CBC */ + for (i = 0; i < DES_BLOCK_SIZE; i++) + temp_block[i] ^= iv[i]; + + cau_des_encrypt(temp_block , (byte*)des->key[0], out + offset); + cau_des_decrypt(out + offset, (byte*)des->key[1], out + offset); + cau_des_encrypt(out + offset, (byte*)des->key[2], out + offset); + + len -= DES_BLOCK_SIZE; + offset += DES_BLOCK_SIZE; + + /* store IV for next block */ + XMEMCPY(iv, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + } + + return 0; + } + + int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + int i; + int offset = 0; + int len = sz; + + byte* iv; + byte temp_block[DES_BLOCK_SIZE]; + + iv = (byte*)des->reg; + + while (len > 0) + { + XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); + + cau_des_decrypt(in + offset , (byte*)des->key[2], out + offset); + cau_des_encrypt(out + offset, (byte*)des->key[1], out + offset); + cau_des_decrypt(out + offset, (byte*)des->key[0], out + offset); + + /* XOR block with IV for CBC */ + for (i = 0; i < DES_BLOCK_SIZE; i++) + (out + offset)[i] ^= iv[i]; + + /* store IV for next block */ + XMEMCPY(iv, temp_block, DES_BLOCK_SIZE); + + len -= DES_BLOCK_SIZE; + offset += DES_BLOCK_SIZE; + } + + return 0; + } + + +#elif defined(CYASSL_PIC32MZ_CRYPT) + + #include "../../cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h" + +void Des_SetIV(Des* des, const byte* iv); +int Des3_SetIV(Des3* des, const byte* iv); + + int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) + { + word32 *dkey = des->key ; + word32 *dreg = des->reg ; + + XMEMCPY((byte *)dkey, (byte *)key, 8); + ByteReverseWords(dkey, dkey, 8); + XMEMCPY((byte *)dreg, (byte *)iv, 8); + ByteReverseWords(dreg, dreg, 8); + + return 0; + } + + int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) + { + word32 *dkey1 = des->key[0]; + word32 *dreg = des->reg ; + + XMEMCPY(dkey1, key, 24); + ByteReverseWords(dkey1, dkey1, 24); + XMEMCPY(dreg, iv, 8); + ByteReverseWords(dreg, dreg, 8) ; + + return 0; + } + + void DesCrypt(word32 *key, word32 *iv, byte* out, const byte* in, word32 sz, + int dir, int algo, int cryptoalgo) + { + securityAssociation *sa_p ; + bufferDescriptor *bd_p ; + const byte *in_p, *in_l ; + byte *out_p, *out_l ; + volatile securityAssociation sa __attribute__((aligned (8))); + volatile bufferDescriptor bd __attribute__((aligned (8))); + volatile int k ; + + /* get uncached address */ + + in_l = in; + out_l = out ; + sa_p = KVA0_TO_KVA1(&sa) ; + bd_p = KVA0_TO_KVA1(&bd) ; + in_p = KVA0_TO_KVA1(in_l) ; + out_p= KVA0_TO_KVA1(out_l); + + if(PIC32MZ_IF_RAM(in_p)) + XMEMCPY((void *)in_p, (void *)in, sz); + XMEMSET((void *)out_p, 0, sz); + + /* Set up the Security Association */ + XMEMSET((byte *)KVA0_TO_KVA1(&sa), 0, sizeof(sa)); + sa_p->SA_CTRL.ALGO = algo ; + sa_p->SA_CTRL.LNC = 1; + sa_p->SA_CTRL.LOADIV = 1; + sa_p->SA_CTRL.FB = 1; + sa_p->SA_CTRL.ENCTYPE = dir ; /* Encryption/Decryption */ + sa_p->SA_CTRL.CRYPTOALGO = cryptoalgo; + sa_p->SA_CTRL.KEYSIZE = 1 ; /* KEY is 192 bits */ + XMEMCPY((byte *)KVA0_TO_KVA1(&sa.SA_ENCKEY[algo==PIC32_ALGO_TDES ? 2 : 6]), + (byte *)key, algo==PIC32_ALGO_TDES ? 24 : 8); + XMEMCPY((byte *)KVA0_TO_KVA1(&sa.SA_ENCIV[2]), (byte *)iv, 8); + + XMEMSET((byte *)KVA0_TO_KVA1(&bd), 0, sizeof(bd)); + /* Set up the Buffer Descriptor */ + bd_p->BD_CTRL.BUFLEN = sz; + bd_p->BD_CTRL.LIFM = 1; + bd_p->BD_CTRL.SA_FETCH_EN = 1; + bd_p->BD_CTRL.LAST_BD = 1; + bd_p->BD_CTRL.DESC_EN = 1; + + bd_p->SA_ADDR = (unsigned int)KVA_TO_PA(&sa) ; // (unsigned int)sa_p ; + bd_p->SRCADDR = (unsigned int)KVA_TO_PA(in) ; // (unsigned int)in_p ; + bd_p->DSTADDR = (unsigned int)KVA_TO_PA(out); // (unsigned int)out_p ; + bd_p->NXTPTR = (unsigned int)KVA_TO_PA(&bd); + bd_p->MSGLEN = sz ; + + /* Fire in the hole! */ + CECON = 1 << 6; + while (CECON); + + /* Run the engine */ + CEBDPADDR = (unsigned int)KVA_TO_PA(&bd) ; // (unsigned int)bd_p ; + CEINTEN = 0x07; + CECON = 0x27; + + WAIT_ENGINE ; + + if((cryptoalgo == PIC32_CRYPTOALGO_CBC) || + (cryptoalgo == PIC32_CRYPTOALGO_TCBC)|| + (cryptoalgo == PIC32_CRYPTOALGO_RCBC)) { + /* set iv for the next call */ + if(dir == PIC32_ENCRYPTION) { + XMEMCPY((void *)iv, (void*)&(out_p[sz-DES_IVLEN]), DES_IVLEN) ; + } else { + ByteReverseWords((word32*)iv, (word32 *)&(in_p[sz-DES_IVLEN]), DES_IVLEN); + } + + } + + ByteReverseWords((word32*)out, (word32 *)KVA0_TO_KVA1(out), sz); + } + + void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des->key, des->reg, out, in, sz, + PIC32_ENCRYPTION, PIC32_ALGO_DES, PIC32_CRYPTOALGO_CBC ); + } + + void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des->key, des->reg, out, in, sz, + PIC32_DECRYPTION, PIC32_ALGO_DES, PIC32_CRYPTOALGO_CBC); + } + + int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des->key[0], des->reg, out, in, sz, + PIC32_ENCRYPTION, PIC32_ALGO_TDES, PIC32_CRYPTOALGO_TCBC); + return 0; + } + + int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) + { + DesCrypt(des->key[0], des->reg, out, in, sz, + PIC32_DECRYPTION, PIC32_ALGO_TDES, PIC32_CRYPTOALGO_TCBC); + return 0; + } + +#else /* CTaoCrypt software implementation */ + +/* permuted choice table (key) */ +static const byte pc1[] = { + 57, 49, 41, 33, 25, 17, 9, + 1, 58, 50, 42, 34, 26, 18, + 10, 2, 59, 51, 43, 35, 27, + 19, 11, 3, 60, 52, 44, 36, + + 63, 55, 47, 39, 31, 23, 15, + 7, 62, 54, 46, 38, 30, 22, + 14, 6, 61, 53, 45, 37, 29, + 21, 13, 5, 28, 20, 12, 4 +}; + +/* number left rotations of pc1 */ +static const byte totrot[] = { + 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 +}; + +/* permuted choice key (table) */ +static const byte pc2[] = { + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 +}; + +/* End of DES-defined tables */ + +/* bit 0 is left-most in byte */ +static const int bytebit[] = { + 0200,0100,040,020,010,04,02,01 +}; + +static const word32 Spbox[8][64] = { +{ +0x01010400,0x00000000,0x00010000,0x01010404, +0x01010004,0x00010404,0x00000004,0x00010000, +0x00000400,0x01010400,0x01010404,0x00000400, +0x01000404,0x01010004,0x01000000,0x00000004, +0x00000404,0x01000400,0x01000400,0x00010400, +0x00010400,0x01010000,0x01010000,0x01000404, +0x00010004,0x01000004,0x01000004,0x00010004, +0x00000000,0x00000404,0x00010404,0x01000000, +0x00010000,0x01010404,0x00000004,0x01010000, +0x01010400,0x01000000,0x01000000,0x00000400, +0x01010004,0x00010000,0x00010400,0x01000004, +0x00000400,0x00000004,0x01000404,0x00010404, +0x01010404,0x00010004,0x01010000,0x01000404, +0x01000004,0x00000404,0x00010404,0x01010400, +0x00000404,0x01000400,0x01000400,0x00000000, +0x00010004,0x00010400,0x00000000,0x01010004}, +{ +0x80108020,0x80008000,0x00008000,0x00108020, +0x00100000,0x00000020,0x80100020,0x80008020, +0x80000020,0x80108020,0x80108000,0x80000000, +0x80008000,0x00100000,0x00000020,0x80100020, +0x00108000,0x00100020,0x80008020,0x00000000, +0x80000000,0x00008000,0x00108020,0x80100000, +0x00100020,0x80000020,0x00000000,0x00108000, +0x00008020,0x80108000,0x80100000,0x00008020, +0x00000000,0x00108020,0x80100020,0x00100000, +0x80008020,0x80100000,0x80108000,0x00008000, +0x80100000,0x80008000,0x00000020,0x80108020, +0x00108020,0x00000020,0x00008000,0x80000000, +0x00008020,0x80108000,0x00100000,0x80000020, +0x00100020,0x80008020,0x80000020,0x00100020, +0x00108000,0x00000000,0x80008000,0x00008020, +0x80000000,0x80100020,0x80108020,0x00108000}, +{ +0x00000208,0x08020200,0x00000000,0x08020008, +0x08000200,0x00000000,0x00020208,0x08000200, +0x00020008,0x08000008,0x08000008,0x00020000, +0x08020208,0x00020008,0x08020000,0x00000208, +0x08000000,0x00000008,0x08020200,0x00000200, +0x00020200,0x08020000,0x08020008,0x00020208, +0x08000208,0x00020200,0x00020000,0x08000208, +0x00000008,0x08020208,0x00000200,0x08000000, +0x08020200,0x08000000,0x00020008,0x00000208, +0x00020000,0x08020200,0x08000200,0x00000000, +0x00000200,0x00020008,0x08020208,0x08000200, +0x08000008,0x00000200,0x00000000,0x08020008, +0x08000208,0x00020000,0x08000000,0x08020208, +0x00000008,0x00020208,0x00020200,0x08000008, +0x08020000,0x08000208,0x00000208,0x08020000, +0x00020208,0x00000008,0x08020008,0x00020200}, +{ +0x00802001,0x00002081,0x00002081,0x00000080, +0x00802080,0x00800081,0x00800001,0x00002001, +0x00000000,0x00802000,0x00802000,0x00802081, +0x00000081,0x00000000,0x00800080,0x00800001, +0x00000001,0x00002000,0x00800000,0x00802001, +0x00000080,0x00800000,0x00002001,0x00002080, +0x00800081,0x00000001,0x00002080,0x00800080, +0x00002000,0x00802080,0x00802081,0x00000081, +0x00800080,0x00800001,0x00802000,0x00802081, +0x00000081,0x00000000,0x00000000,0x00802000, +0x00002080,0x00800080,0x00800081,0x00000001, +0x00802001,0x00002081,0x00002081,0x00000080, +0x00802081,0x00000081,0x00000001,0x00002000, +0x00800001,0x00002001,0x00802080,0x00800081, +0x00002001,0x00002080,0x00800000,0x00802001, +0x00000080,0x00800000,0x00002000,0x00802080}, +{ +0x00000100,0x02080100,0x02080000,0x42000100, +0x00080000,0x00000100,0x40000000,0x02080000, +0x40080100,0x00080000,0x02000100,0x40080100, +0x42000100,0x42080000,0x00080100,0x40000000, +0x02000000,0x40080000,0x40080000,0x00000000, +0x40000100,0x42080100,0x42080100,0x02000100, +0x42080000,0x40000100,0x00000000,0x42000000, +0x02080100,0x02000000,0x42000000,0x00080100, +0x00080000,0x42000100,0x00000100,0x02000000, +0x40000000,0x02080000,0x42000100,0x40080100, +0x02000100,0x40000000,0x42080000,0x02080100, +0x40080100,0x00000100,0x02000000,0x42080000, +0x42080100,0x00080100,0x42000000,0x42080100, +0x02080000,0x00000000,0x40080000,0x42000000, +0x00080100,0x02000100,0x40000100,0x00080000, +0x00000000,0x40080000,0x02080100,0x40000100}, +{ +0x20000010,0x20400000,0x00004000,0x20404010, +0x20400000,0x00000010,0x20404010,0x00400000, +0x20004000,0x00404010,0x00400000,0x20000010, +0x00400010,0x20004000,0x20000000,0x00004010, +0x00000000,0x00400010,0x20004010,0x00004000, +0x00404000,0x20004010,0x00000010,0x20400010, +0x20400010,0x00000000,0x00404010,0x20404000, +0x00004010,0x00404000,0x20404000,0x20000000, +0x20004000,0x00000010,0x20400010,0x00404000, +0x20404010,0x00400000,0x00004010,0x20000010, +0x00400000,0x20004000,0x20000000,0x00004010, +0x20000010,0x20404010,0x00404000,0x20400000, +0x00404010,0x20404000,0x00000000,0x20400010, +0x00000010,0x00004000,0x20400000,0x00404010, +0x00004000,0x00400010,0x20004010,0x00000000, +0x20404000,0x20000000,0x00400010,0x20004010}, +{ +0x00200000,0x04200002,0x04000802,0x00000000, +0x00000800,0x04000802,0x00200802,0x04200800, +0x04200802,0x00200000,0x00000000,0x04000002, +0x00000002,0x04000000,0x04200002,0x00000802, +0x04000800,0x00200802,0x00200002,0x04000800, +0x04000002,0x04200000,0x04200800,0x00200002, +0x04200000,0x00000800,0x00000802,0x04200802, +0x00200800,0x00000002,0x04000000,0x00200800, +0x04000000,0x00200800,0x00200000,0x04000802, +0x04000802,0x04200002,0x04200002,0x00000002, +0x00200002,0x04000000,0x04000800,0x00200000, +0x04200800,0x00000802,0x00200802,0x04200800, +0x00000802,0x04000002,0x04200802,0x04200000, +0x00200800,0x00000000,0x00000002,0x04200802, +0x00000000,0x00200802,0x04200000,0x00000800, +0x04000002,0x04000800,0x00000800,0x00200002}, +{ +0x10001040,0x00001000,0x00040000,0x10041040, +0x10000000,0x10001040,0x00000040,0x10000000, +0x00040040,0x10040000,0x10041040,0x00041000, +0x10041000,0x00041040,0x00001000,0x00000040, +0x10040000,0x10000040,0x10001000,0x00001040, +0x00041000,0x00040040,0x10040040,0x10041000, +0x00001040,0x00000000,0x00000000,0x10040040, +0x10000040,0x10001000,0x00041040,0x00040000, +0x00041040,0x00040000,0x10041000,0x00001000, +0x00000040,0x10040040,0x00001000,0x00041040, +0x10001000,0x00000040,0x10000040,0x10040000, +0x10040040,0x10000000,0x00040000,0x10001040, +0x00000000,0x10041040,0x00040040,0x10000040, +0x10040000,0x10001000,0x10001040,0x00000000, +0x10041040,0x00041000,0x00041000,0x00001040, +0x00001040,0x00040040,0x10000000,0x10041000} +}; + + +static INLINE void IPERM(word32* left, word32* right) +{ + word32 work; + + *right = rotlFixed(*right, 4U); + work = (*left ^ *right) & 0xf0f0f0f0; + *left ^= work; + + *right = rotrFixed(*right^work, 20U); + work = (*left ^ *right) & 0xffff0000; + *left ^= work; + + *right = rotrFixed(*right^work, 18U); + work = (*left ^ *right) & 0x33333333; + *left ^= work; + + *right = rotrFixed(*right^work, 6U); + work = (*left ^ *right) & 0x00ff00ff; + *left ^= work; + + *right = rotlFixed(*right^work, 9U); + work = (*left ^ *right) & 0xaaaaaaaa; + *left = rotlFixed(*left^work, 1U); + *right ^= work; +} + + +static INLINE void FPERM(word32* left, word32* right) +{ + word32 work; + + *right = rotrFixed(*right, 1U); + work = (*left ^ *right) & 0xaaaaaaaa; + *right ^= work; + + *left = rotrFixed(*left^work, 9U); + work = (*left ^ *right) & 0x00ff00ff; + *right ^= work; + + *left = rotlFixed(*left^work, 6U); + work = (*left ^ *right) & 0x33333333; + *right ^= work; + + *left = rotlFixed(*left^work, 18U); + work = (*left ^ *right) & 0xffff0000; + *right ^= work; + + *left = rotlFixed(*left^work, 20U); + work = (*left ^ *right) & 0xf0f0f0f0; + *right ^= work; + + *left = rotrFixed(*left^work, 4U); +} + + +static int DesSetKey(const byte* key, int dir, word32* out) +{ +#ifdef CYASSL_SMALL_STACK + byte* buffer = (byte*)XMALLOC(56+56+8, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + if (buffer == NULL) + return MEMORY_E; +#else + byte buffer[56+56+8]; +#endif + + { + byte* const pc1m = buffer; /* place to modify pc1 into */ + byte* const pcr = pc1m + 56; /* place to rotate pc1 into */ + byte* const ks = pcr + 56; + register int i, j, l; + int m; + + for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */ + l = pc1[j] - 1; /* integer bit location */ + m = l & 07; /* find bit */ + pc1m[j] = (key[l >> 3] & /* find which key byte l is in */ + bytebit[m]) /* and which bit of that byte */ + ? 1 : 0; /* and store 1-bit result */ + } + + for (i = 0; i < 16; i++) { /* key chunk for each iteration */ + XMEMSET(ks, 0, 8); /* Clear key schedule */ + + for (j = 0; j < 56; j++) /* rotate pc1 the right amount */ + pcr[j] = + pc1m[(l = j + totrot[i]) < (j < 28 ? 28 : 56) ? l : l-28]; + + /* rotate left and right halves independently */ + for (j = 0; j < 48; j++) { /* select bits individually */ + if (pcr[pc2[j] - 1]) { /* check bit that goes to ks[j] */ + l= j % 6; /* mask it in if it's there */ + ks[j/6] |= bytebit[l] >> 2; + } + } + + /* Now convert to odd/even interleaved form for use in F */ + out[2*i] = ((word32) ks[0] << 24) + | ((word32) ks[2] << 16) + | ((word32) ks[4] << 8) + | ((word32) ks[6]); + + out[2*i + 1] = ((word32) ks[1] << 24) + | ((word32) ks[3] << 16) + | ((word32) ks[5] << 8) + | ((word32) ks[7]); + } + + /* reverse key schedule order */ + if (dir == DES_DECRYPTION) { + for (i = 0; i < 16; i += 2) { + word32 swap = out[i]; + out[i] = out[DES_KS_SIZE - 2 - i]; + out[DES_KS_SIZE - 2 - i] = swap; + + swap = out[i + 1]; + out[i + 1] = out[DES_KS_SIZE - 1 - i]; + out[DES_KS_SIZE - 1 - i] = swap; + } + } + +#ifdef CYASSL_SMALL_STACK + XFREE(buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + } + + return 0; +} + + +static INLINE int Reverse(int dir) +{ + return !dir; +} + + +int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) +{ + Des_SetIV(des, iv); + + return DesSetKey(key, dir, des->key); +} + + +int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) +{ + int ret; + +#ifdef HAVE_CAVIUM + if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) + return Des3_CaviumSetKey(des, key, iv); +#endif + + ret = DesSetKey(key + (dir == DES_ENCRYPTION ? 0:16), dir, des->key[0]); + if (ret != 0) + return ret; + + ret = DesSetKey(key + 8, Reverse(dir), des->key[1]); + if (ret != 0) + return ret; + + ret = DesSetKey(key + (dir == DES_DECRYPTION ? 0:16), dir, des->key[2]); + if (ret != 0) + return ret; + + return Des3_SetIV(des, iv); +} + + +static void DesRawProcessBlock(word32* lIn, word32* rIn, const word32* kptr) +{ + word32 l = *lIn, r = *rIn, i; + + for (i=0; i<8; i++) + { + word32 work = rotrFixed(r, 4U) ^ kptr[4*i+0]; + l ^= Spbox[6][(work) & 0x3f] + ^ Spbox[4][(work >> 8) & 0x3f] + ^ Spbox[2][(work >> 16) & 0x3f] + ^ Spbox[0][(work >> 24) & 0x3f]; + work = r ^ kptr[4*i+1]; + l ^= Spbox[7][(work) & 0x3f] + ^ Spbox[5][(work >> 8) & 0x3f] + ^ Spbox[3][(work >> 16) & 0x3f] + ^ Spbox[1][(work >> 24) & 0x3f]; + + work = rotrFixed(l, 4U) ^ kptr[4*i+2]; + r ^= Spbox[6][(work) & 0x3f] + ^ Spbox[4][(work >> 8) & 0x3f] + ^ Spbox[2][(work >> 16) & 0x3f] + ^ Spbox[0][(work >> 24) & 0x3f]; + work = l ^ kptr[4*i+3]; + r ^= Spbox[7][(work) & 0x3f] + ^ Spbox[5][(work >> 8) & 0x3f] + ^ Spbox[3][(work >> 16) & 0x3f] + ^ Spbox[1][(work >> 24) & 0x3f]; + } + + *lIn = l; *rIn = r; +} + + +static void DesProcessBlock(Des* des, const byte* in, byte* out) +{ + word32 l, r; + + XMEMCPY(&l, in, sizeof(l)); + XMEMCPY(&r, in + sizeof(l), sizeof(r)); + #ifdef LITTLE_ENDIAN_ORDER + l = ByteReverseWord32(l); + r = ByteReverseWord32(r); + #endif + IPERM(&l,&r); + + DesRawProcessBlock(&l, &r, des->key); + + FPERM(&l,&r); + #ifdef LITTLE_ENDIAN_ORDER + l = ByteReverseWord32(l); + r = ByteReverseWord32(r); + #endif + XMEMCPY(out, &r, sizeof(r)); + XMEMCPY(out + sizeof(r), &l, sizeof(l)); +} + + +static void Des3ProcessBlock(Des3* des, const byte* in, byte* out) +{ + word32 l, r; + + XMEMCPY(&l, in, sizeof(l)); + XMEMCPY(&r, in + sizeof(l), sizeof(r)); + #ifdef LITTLE_ENDIAN_ORDER + l = ByteReverseWord32(l); + r = ByteReverseWord32(r); + #endif + IPERM(&l,&r); + + DesRawProcessBlock(&l, &r, des->key[0]); + DesRawProcessBlock(&r, &l, des->key[1]); + DesRawProcessBlock(&l, &r, des->key[2]); + + FPERM(&l,&r); + #ifdef LITTLE_ENDIAN_ORDER + l = ByteReverseWord32(l); + r = ByteReverseWord32(r); + #endif + XMEMCPY(out, &r, sizeof(r)); + XMEMCPY(out + sizeof(r), &l, sizeof(l)); +} + + +void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / DES_BLOCK_SIZE; + + while (blocks--) { + xorbuf((byte*)des->reg, in, DES_BLOCK_SIZE); + DesProcessBlock(des, (byte*)des->reg, (byte*)des->reg); + XMEMCPY(out, des->reg, DES_BLOCK_SIZE); + + out += DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + } +} + + +void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / DES_BLOCK_SIZE; + byte hold[DES_BLOCK_SIZE]; + + while (blocks--) { + XMEMCPY(des->tmp, in, DES_BLOCK_SIZE); + DesProcessBlock(des, (byte*)des->tmp, out); + xorbuf(out, (byte*)des->reg, DES_BLOCK_SIZE); + + XMEMCPY(hold, des->reg, DES_BLOCK_SIZE); + XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); + XMEMCPY(des->tmp, hold, DES_BLOCK_SIZE); + + out += DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + } +} + + +int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) +{ + word32 blocks; + +#ifdef HAVE_CAVIUM + if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) + return Des3_CaviumCbcEncrypt(des, out, in, sz); +#endif + + blocks = sz / DES_BLOCK_SIZE; + while (blocks--) { + xorbuf((byte*)des->reg, in, DES_BLOCK_SIZE); + Des3ProcessBlock(des, (byte*)des->reg, (byte*)des->reg); + XMEMCPY(out, des->reg, DES_BLOCK_SIZE); + + out += DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + } + return 0; +} + + +int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) +{ + word32 blocks; + +#ifdef HAVE_CAVIUM + if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) + return Des3_CaviumCbcDecrypt(des, out, in, sz); +#endif + + blocks = sz / DES_BLOCK_SIZE; + while (blocks--) { + XMEMCPY(des->tmp, in, DES_BLOCK_SIZE); + Des3ProcessBlock(des, (byte*)des->tmp, out); + xorbuf(out, (byte*)des->reg, DES_BLOCK_SIZE); + XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); + + out += DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + } + return 0; +} + +#ifdef CYASSL_DES_ECB + +/* One block, compatibility only */ +void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz) +{ + word32 blocks = sz / DES_BLOCK_SIZE; + + while (blocks--) { + DesProcessBlock(des, in, out); + + out += DES_BLOCK_SIZE; + in += DES_BLOCK_SIZE; + } +} + +#endif /* CYASSL_DES_ECB */ + +#endif /* STM32F2_CRYPTO */ + +void Des_SetIV(Des* des, const byte* iv) +{ + if (des && iv) + XMEMCPY(des->reg, iv, DES_BLOCK_SIZE); + else if (des) + XMEMSET(des->reg, 0, DES_BLOCK_SIZE); +} + + +int Des3_SetIV(Des3* des, const byte* iv) +{ + if (des && iv) + XMEMCPY(des->reg, iv, DES_BLOCK_SIZE); + else if (des) + XMEMSET(des->reg, 0, DES_BLOCK_SIZE); + + return 0; +} + + +#ifdef HAVE_CAVIUM + +#include +#include "cavium_common.h" + +/* Initiliaze Des3 for use with Nitrox device */ +int Des3_InitCavium(Des3* des3, int devId) +{ + if (des3 == NULL) + return -1; + + if (CspAllocContext(CONTEXT_SSL, &des3->contextHandle, devId) != 0) + return -1; + + des3->devId = devId; + des3->magic = CYASSL_3DES_CAVIUM_MAGIC; + + return 0; +} + + +/* Free Des3 from use with Nitrox device */ +void Des3_FreeCavium(Des3* des3) +{ + if (des3 == NULL) + return; + + if (des3->magic != CYASSL_3DES_CAVIUM_MAGIC) + return; + + CspFreeContext(CONTEXT_SSL, des3->contextHandle, des3->devId); + des3->magic = 0; +} + + +static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv) +{ + if (des3 == NULL) + return -1; + + /* key[0] holds key, iv in reg */ + XMEMCPY(des3->key[0], key, DES_BLOCK_SIZE*3); + + return Des3_SetIV(des3, iv); +} + + +static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in, + word32 length) +{ + word offset = 0; + word32 requestId; + + while (length > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + if (CspEncrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, + CAVIUM_NO_UPDATE, slen, (byte*)in + offset, + out + offset, (byte*)des3->reg, (byte*)des3->key[0], + &requestId, des3->devId) != 0) { + CYASSL_MSG("Bad Cavium 3DES Cbc Encrypt"); + return -1; + } + length -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + XMEMCPY(des3->reg, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + } + if (length) { + word16 slen = (word16)length; + + if (CspEncrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, + CAVIUM_NO_UPDATE, slen, (byte*)in + offset, + out + offset, (byte*)des3->reg, (byte*)des3->key[0], + &requestId, des3->devId) != 0) { + CYASSL_MSG("Bad Cavium 3DES Cbc Encrypt"); + return -1; + } + XMEMCPY(des3->reg, out+offset+length - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + } + return 0; +} + +static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in, + word32 length) +{ + word32 requestId; + word offset = 0; + + while (length > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + XMEMCPY(des3->tmp, in + offset + slen - DES_BLOCK_SIZE, DES_BLOCK_SIZE); + if (CspDecrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, + CAVIUM_NO_UPDATE, slen, (byte*)in+offset, out+offset, + (byte*)des3->reg, (byte*)des3->key[0], &requestId, + des3->devId) != 0) { + CYASSL_MSG("Bad Cavium 3Des Decrypt"); + return -1; + } + length -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + XMEMCPY(des3->reg, des3->tmp, DES_BLOCK_SIZE); + } + if (length) { + word16 slen = (word16)length; + XMEMCPY(des3->tmp, in + offset + slen - DES_BLOCK_SIZE,DES_BLOCK_SIZE); + if (CspDecrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, + CAVIUM_NO_UPDATE, slen, (byte*)in+offset, out+offset, + (byte*)des3->reg, (byte*)des3->key[0], &requestId, + des3->devId) != 0) { + CYASSL_MSG("Bad Cavium 3Des Decrypt"); + return -1; + } + XMEMCPY(des3->reg, des3->tmp, DES_BLOCK_SIZE); + } + return 0; +} + +#endif /* HAVE_CAVIUM */ + +#endif /* NO_DES3 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/dh.c b/project1/cyassl-3.0.0/ctaocrypt/src/dh.c new file mode 100644 index 00000000..1e1dd704 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/dh.c @@ -0,0 +1,178 @@ +/* dh.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_DH + +#include +#include + +#ifndef USER_MATH_LIB + #include + #define XPOW(x,y) pow((x),(y)) + #define XLOG(x) log((x)) +#else + /* user's own math lib */ +#endif + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +void InitDhKey(DhKey* key) +{ + (void)key; +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + key->p.dp = 0; + key->g.dp = 0; +#endif +} + + +void FreeDhKey(DhKey* key) +{ + (void)key; +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + mp_clear(&key->p); + mp_clear(&key->g); +#endif +} + + +static word32 DiscreteLogWorkFactor(word32 n) +{ + /* assuming discrete log takes about the same time as factoring */ + if (n<5) + return 0; + else + return (word32)(2.4 * XPOW((double)n, 1.0/3.0) * + XPOW(XLOG((double)n), 2.0/3.0) - 5); +} + + +static int GeneratePrivate(DhKey* key, RNG* rng, byte* priv, word32* privSz) +{ + int ret; + word32 sz = mp_unsigned_bin_size(&key->p); + sz = min(sz, 2 * DiscreteLogWorkFactor(sz * CYASSL_BIT_SIZE) / + CYASSL_BIT_SIZE + 1); + + ret = RNG_GenerateBlock(rng, priv, sz); + if (ret != 0) + return ret; + + priv[0] |= 0x0C; + + *privSz = sz; + + return 0; +} + + +static int GeneratePublic(DhKey* key, const byte* priv, word32 privSz, + byte* pub, word32* pubSz) +{ + int ret = 0; + + mp_int x; + mp_int y; + + if (mp_init_multi(&x, &y, 0, 0, 0, 0) != MP_OKAY) + return MP_INIT_E; + + if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY) + ret = MP_READ_E; + + if (ret == 0 && mp_exptmod(&key->g, &x, &key->p, &y) != MP_OKAY) + ret = MP_EXPTMOD_E; + + if (ret == 0 && mp_to_unsigned_bin(&y, pub) != MP_OKAY) + ret = MP_TO_E; + + if (ret == 0) + *pubSz = mp_unsigned_bin_size(&y); + + mp_clear(&y); + mp_clear(&x); + + return ret; +} + + +int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, word32* privSz, + byte* pub, word32* pubSz) +{ + int ret = GeneratePrivate(key, rng, priv, privSz); + + return (ret != 0) ? ret : GeneratePublic(key, priv, *privSz, pub, pubSz); +} + +int DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv, + word32 privSz, const byte* otherPub, word32 pubSz) +{ + int ret = 0; + + mp_int x; + mp_int y; + mp_int z; + + if (mp_init_multi(&x, &y, &z, 0, 0, 0) != MP_OKAY) + return MP_INIT_E; + + if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY) + ret = MP_READ_E; + + if (ret == 0 && mp_read_unsigned_bin(&y, otherPub, pubSz) != MP_OKAY) + ret = MP_READ_E; + + if (ret == 0 && mp_exptmod(&y, &x, &key->p, &z) != MP_OKAY) + ret = MP_EXPTMOD_E; + + if (ret == 0 && mp_to_unsigned_bin(&z, agree) != MP_OKAY) + ret = MP_TO_E; + + if (ret == 0) + *agreeSz = mp_unsigned_bin_size(&z); + + mp_clear(&z); + mp_clear(&y); + mp_clear(&x); + + return ret; +} + + +#endif /* NO_DH */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c b/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c new file mode 100644 index 00000000..6ee78f72 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c @@ -0,0 +1,226 @@ +/* dsa.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_DSA + +#include +#include +#include +#include + + +enum { + DSA_HALF_SIZE = 20, /* r and s size */ + DSA_SIG_SIZE = 40 /* signature size */ +}; + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +void InitDsaKey(DsaKey* key) +{ + key->type = -1; /* haven't decided yet */ + +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + key->p.dp = 0; /* public alloc parts */ + key->q.dp = 0; + key->g.dp = 0; + key->y.dp = 0; + + key->x.dp = 0; /* private alloc parts */ +#endif +} + + +void FreeDsaKey(DsaKey* key) +{ + (void)key; +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + if (key->type == DSA_PRIVATE) + mp_clear(&key->x); + mp_clear(&key->y); + mp_clear(&key->g); + mp_clear(&key->q); + mp_clear(&key->p); +#endif +} + + +int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng) +{ + mp_int k, kInv, r, s, H; + int ret, sz; + byte buffer[DSA_HALF_SIZE]; + + sz = min(sizeof(buffer), mp_unsigned_bin_size(&key->q)); + + /* generate k */ + ret = RNG_GenerateBlock(rng, buffer, sz); + if (ret != 0) + return ret; + + buffer[0] |= 0x0C; + + if (mp_init_multi(&k, &kInv, &r, &s, &H, 0) != MP_OKAY) + return MP_INIT_E; + + if (mp_read_unsigned_bin(&k, buffer, sz) != MP_OKAY) + ret = MP_READ_E; + + if (ret == 0 && mp_cmp_d(&k, 1) != MP_GT) + ret = MP_CMP_E; + + /* inverse k mod q */ + if (ret == 0 && mp_invmod(&k, &key->q, &kInv) != MP_OKAY) + ret = MP_INVMOD_E; + + /* generate r, r = (g exp k mod p) mod q */ + if (ret == 0 && mp_exptmod(&key->g, &k, &key->p, &r) != MP_OKAY) + ret = MP_EXPTMOD_E; + + if (ret == 0 && mp_mod(&r, &key->q, &r) != MP_OKAY) + ret = MP_MOD_E; + + /* generate H from sha digest */ + if (ret == 0 && mp_read_unsigned_bin(&H, digest,SHA_DIGEST_SIZE) != MP_OKAY) + ret = MP_READ_E; + + /* generate s, s = (kInv * (H + x*r)) % q */ + if (ret == 0 && mp_mul(&key->x, &r, &s) != MP_OKAY) + ret = MP_MUL_E; + + if (ret == 0 && mp_add(&s, &H, &s) != MP_OKAY) + ret = MP_ADD_E; + + if (ret == 0 && mp_mulmod(&s, &kInv, &key->q, &s) != MP_OKAY) + ret = MP_MULMOD_E; + + /* write out */ + if (ret == 0) { + int rSz = mp_unsigned_bin_size(&r); + int sSz = mp_unsigned_bin_size(&s); + + if (rSz == DSA_HALF_SIZE - 1) { + out[0] = 0; + out++; + } + + if (mp_to_unsigned_bin(&r, out) != MP_OKAY) + ret = MP_TO_E; + else { + if (sSz == DSA_HALF_SIZE - 1) { + out[rSz] = 0; + out++; + } + ret = mp_to_unsigned_bin(&s, out + rSz); + } + } + + mp_clear(&H); + mp_clear(&s); + mp_clear(&r); + mp_clear(&kInv); + mp_clear(&k); + + return ret; +} + + +int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, int* answer) +{ + mp_int w, u1, u2, v, r, s; + int ret = 0; + + if (mp_init_multi(&w, &u1, &u2, &v, &r, &s) != MP_OKAY) + return MP_INIT_E; + + /* set r and s from signature */ + if (mp_read_unsigned_bin(&r, sig, DSA_HALF_SIZE) != MP_OKAY || + mp_read_unsigned_bin(&s, sig + DSA_HALF_SIZE, DSA_HALF_SIZE) != MP_OKAY) + ret = MP_READ_E; + + /* sanity checks */ + + + /* put H into u1 from sha digest */ + if (ret == 0 && mp_read_unsigned_bin(&u1,digest,SHA_DIGEST_SIZE) != MP_OKAY) + ret = MP_READ_E; + + /* w = s invmod q */ + if (ret == 0 && mp_invmod(&s, &key->q, &w) != MP_OKAY) + ret = MP_INVMOD_E; + + /* u1 = (H * w) % q */ + if (ret == 0 && mp_mulmod(&u1, &w, &key->q, &u1) != MP_OKAY) + ret = MP_MULMOD_E; + + /* u2 = (r * w) % q */ + if (ret == 0 && mp_mulmod(&r, &w, &key->q, &u2) != MP_OKAY) + ret = MP_MULMOD_E; + + /* verify v = ((g^u1 * y^u2) mod p) mod q */ + if (ret == 0 && mp_exptmod(&key->g, &u1, &key->p, &u1) != MP_OKAY) + ret = MP_EXPTMOD_E; + + if (ret == 0 && mp_exptmod(&key->y, &u2, &key->p, &u2) != MP_OKAY) + ret = MP_EXPTMOD_E; + + if (ret == 0 && mp_mulmod(&u1, &u2, &key->p, &v) != MP_OKAY) + ret = MP_MULMOD_E; + + if (ret == 0 && mp_mod(&v, &key->q, &v) != MP_OKAY) + ret = MP_MULMOD_E; + + /* do they match */ + if (ret == 0 && mp_cmp(&r, &v) == MP_EQ) + *answer = 1; + else + *answer = 0; + + mp_clear(&s); + mp_clear(&r); + mp_clear(&u1); + mp_clear(&u2); + mp_clear(&w); + mp_clear(&v); + + return ret; +} + + +#endif /* NO_DSA */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c b/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c new file mode 100644 index 00000000..6d6da734 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c @@ -0,0 +1,4140 @@ +/* ecc.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* in case user set HAVE_ECC there */ +#include + +#ifdef HAVE_ECC + +#include +#include +#include + +#ifdef HAVE_ECC_ENCRYPT + #include + #include +#endif + + +/* map + + ptmul -> mulmod + +*/ + +#define ECC112 +#define ECC128 +#define ECC160 +#define ECC192 +#define ECC224 +#define ECC256 +#define ECC384 +#define ECC521 + + + +/* This holds the key settings. ***MUST*** be organized by size from + smallest to largest. */ + +const ecc_set_type ecc_sets[] = { +#ifdef ECC112 +{ + 14, + "SECP112R1", + "DB7C2ABF62E35E668076BEAD208B", + "659EF8BA043916EEDE8911702B22", + "DB7C2ABF62E35E7628DFAC6561C5", + "09487239995A5EE76B55F9C2F098", + "A89CE5AF8724C0A23E0E0FF77500" +}, +#endif +#ifdef ECC128 +{ + 16, + "SECP128R1", + "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", + "E87579C11079F43DD824993C2CEE5ED3", + "FFFFFFFE0000000075A30D1B9038A115", + "161FF7528B899B2D0C28607CA52C5B86", + "CF5AC8395BAFEB13C02DA292DDED7A83", +}, +#endif +#ifdef ECC160 +{ + 20, + "SECP160R1", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", + "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", + "0100000000000000000001F4C8F927AED3CA752257", + "4A96B5688EF573284664698968C38BB913CBFC82", + "23A628553168947D59DCC912042351377AC5FB32", +}, +#endif +#ifdef ECC192 +{ + 24, + "ECC-192", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", + "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", + "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", + "7192B95FFC8DA78631011ED6B24CDD573F977A11E794811", +}, +#endif +#ifdef ECC224 +{ + 28, + "ECC-224", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", + "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", +}, +#endif +#ifdef ECC256 +{ + 32, + "ECC-256", + "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", + "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", + "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", +}, +#endif +#ifdef ECC384 +{ + 48, + "ECC-384", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", + "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", + "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", + "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", +}, +#endif +#ifdef ECC521 +{ + 66, + "ECC-521", + "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", + "51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", + "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", + "C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", + "11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650", +}, +#endif +{ + 0, + NULL, NULL, NULL, NULL, NULL, NULL +} +}; + + +ecc_point* ecc_new_point(void); +void ecc_del_point(ecc_point* p); +int ecc_map(ecc_point*, mp_int*, mp_digit*); +int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, + mp_int* modulus, mp_digit* mp); +int ecc_projective_dbl_point(ecc_point* P, ecc_point* R, mp_int* modulus, + mp_digit* mp); +static int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, + int map); +#ifdef ECC_SHAMIR +static int ecc_mul2add(ecc_point* A, mp_int* kA, ecc_point* B, mp_int* kB, + ecc_point* C, mp_int* modulus); +#endif + + +/* helper for either lib */ +static int get_digit_count(mp_int* a) +{ + if (a == NULL) + return 0; + + return a->used; +} + +/* helper for either lib */ +static unsigned long get_digit(mp_int* a, int n) +{ + if (a == NULL) + return 0; + + return (n >= a->used || n < 0) ? 0 : a->dp[n]; +} + + +#if defined(USE_FAST_MATH) + +/* fast math accelerated version, but not for fp ecc yet */ + +/** + Add two ECC points + P The point to add + Q The point to add + R [out] The destination of the double + modulus The modulus of the field the ECC curve is in + mp The "b" value from montgomery_setup() + return MP_OKAY on success +*/ +int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, + mp_int* modulus, mp_digit* mp) +{ + fp_int t1, t2, x, y, z; + int err; + + if (P == NULL || Q == NULL || R == NULL || modulus == NULL || mp == NULL) + return ECC_BAD_ARG_E; + + if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != MP_OKAY) { + return err; + } + + /* should we dbl instead? */ + fp_sub(modulus, &Q->y, &t1); + if ( (fp_cmp(&P->x, &Q->x) == FP_EQ) && + (get_digit_count(&Q->z) && fp_cmp(&P->z, &Q->z) == FP_EQ) && + (fp_cmp(&P->y, &Q->y) == FP_EQ || fp_cmp(&P->y, &t1) == FP_EQ)) { + return ecc_projective_dbl_point(P, R, modulus, mp); + } + + fp_copy(&P->x, &x); + fp_copy(&P->y, &y); + fp_copy(&P->z, &z); + + /* if Z is one then these are no-operations */ + if (get_digit_count(&Q->z)) { + /* T1 = Z' * Z' */ + fp_sqr(&Q->z, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* X = X * T1 */ + fp_mul(&t1, &x, &x); + fp_montgomery_reduce(&x, modulus, *mp); + /* T1 = Z' * T1 */ + fp_mul(&Q->z, &t1, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* Y = Y * T1 */ + fp_mul(&t1, &y, &y); + fp_montgomery_reduce(&y, modulus, *mp); + } + + /* T1 = Z*Z */ + fp_sqr(&z, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* T2 = X' * T1 */ + fp_mul(&Q->x, &t1, &t2); + fp_montgomery_reduce(&t2, modulus, *mp); + /* T1 = Z * T1 */ + fp_mul(&z, &t1, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* T1 = Y' * T1 */ + fp_mul(&Q->y, &t1, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + + /* Y = Y - T1 */ + fp_sub(&y, &t1, &y); + if (fp_cmp_d(&y, 0) == FP_LT) { + fp_add(&y, modulus, &y); + } + /* T1 = 2T1 */ + fp_add(&t1, &t1, &t1); + if (fp_cmp(&t1, modulus) != FP_LT) { + fp_sub(&t1, modulus, &t1); + } + /* T1 = Y + T1 */ + fp_add(&t1, &y, &t1); + if (fp_cmp(&t1, modulus) != FP_LT) { + fp_sub(&t1, modulus, &t1); + } + /* X = X - T2 */ + fp_sub(&x, &t2, &x); + if (fp_cmp_d(&x, 0) == FP_LT) { + fp_add(&x, modulus, &x); + } + /* T2 = 2T2 */ + fp_add(&t2, &t2, &t2); + if (fp_cmp(&t2, modulus) != FP_LT) { + fp_sub(&t2, modulus, &t2); + } + /* T2 = X + T2 */ + fp_add(&t2, &x, &t2); + if (fp_cmp(&t2, modulus) != FP_LT) { + fp_sub(&t2, modulus, &t2); + } + + /* if Z' != 1 */ + if (get_digit_count(&Q->z)) { + /* Z = Z * Z' */ + fp_mul(&z, &Q->z, &z); + fp_montgomery_reduce(&z, modulus, *mp); + } + + /* Z = Z * X */ + fp_mul(&z, &x, &z); + fp_montgomery_reduce(&z, modulus, *mp); + + /* T1 = T1 * X */ + fp_mul(&t1, &x, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* X = X * X */ + fp_sqr(&x, &x); + fp_montgomery_reduce(&x, modulus, *mp); + /* T2 = T2 * x */ + fp_mul(&t2, &x, &t2); + fp_montgomery_reduce(&t2, modulus, *mp); + /* T1 = T1 * X */ + fp_mul(&t1, &x, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + + /* X = Y*Y */ + fp_sqr(&y, &x); + fp_montgomery_reduce(&x, modulus, *mp); + /* X = X - T2 */ + fp_sub(&x, &t2, &x); + if (fp_cmp_d(&x, 0) == FP_LT) { + fp_add(&x, modulus, &x); + } + + /* T2 = T2 - X */ + fp_sub(&t2, &x, &t2); + if (fp_cmp_d(&t2, 0) == FP_LT) { + fp_add(&t2, modulus, &t2); + } + /* T2 = T2 - X */ + fp_sub(&t2, &x, &t2); + if (fp_cmp_d(&t2, 0) == FP_LT) { + fp_add(&t2, modulus, &t2); + } + /* T2 = T2 * Y */ + fp_mul(&t2, &y, &t2); + fp_montgomery_reduce(&t2, modulus, *mp); + /* Y = T2 - T1 */ + fp_sub(&t2, &t1, &y); + if (fp_cmp_d(&y, 0) == FP_LT) { + fp_add(&y, modulus, &y); + } + /* Y = Y/2 */ + if (fp_isodd(&y)) { + fp_add(&y, modulus, &y); + } + fp_div_2(&y, &y); + + fp_copy(&x, &R->x); + fp_copy(&y, &R->y); + fp_copy(&z, &R->z); + + return MP_OKAY; +} + + +/** + Double an ECC point + P The point to double + R [out] The destination of the double + modulus The modulus of the field the ECC curve is in + mp The "b" value from montgomery_setup() + return MP_OKAY on success +*/ +int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* modulus, + mp_digit* mp) +{ + fp_int t1, t2; + int err; + + if (P == NULL || R == NULL || modulus == NULL || mp == NULL) + return ECC_BAD_ARG_E; + + if (P != R) { + fp_copy(&P->x, &R->x); + fp_copy(&P->y, &R->y); + fp_copy(&P->z, &R->z); + } + + if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { + return err; + } + + /* t1 = Z * Z */ + fp_sqr(&R->z, &t1); + fp_montgomery_reduce(&t1, modulus, *mp); + /* Z = Y * Z */ + fp_mul(&R->z, &R->y, &R->z); + fp_montgomery_reduce(&R->z, modulus, *mp); + /* Z = 2Z */ + fp_add(&R->z, &R->z, &R->z); + if (fp_cmp(&R->z, modulus) != FP_LT) { + fp_sub(&R->z, modulus, &R->z); + } + + /* &t2 = X - T1 */ + fp_sub(&R->x, &t1, &t2); + if (fp_cmp_d(&t2, 0) == FP_LT) { + fp_add(&t2, modulus, &t2); + } + /* T1 = X + T1 */ + fp_add(&t1, &R->x, &t1); + if (fp_cmp(&t1, modulus) != FP_LT) { + fp_sub(&t1, modulus, &t1); + } + /* T2 = T1 * T2 */ + fp_mul(&t1, &t2, &t2); + fp_montgomery_reduce(&t2, modulus, *mp); + /* T1 = 2T2 */ + fp_add(&t2, &t2, &t1); + if (fp_cmp(&t1, modulus) != FP_LT) { + fp_sub(&t1, modulus, &t1); + } + /* T1 = T1 + T2 */ + fp_add(&t1, &t2, &t1); + if (fp_cmp(&t1, modulus) != FP_LT) { + fp_sub(&t1, modulus, &t1); + } + + /* Y = 2Y */ + fp_add(&R->y, &R->y, &R->y); + if (fp_cmp(&R->y, modulus) != FP_LT) { + fp_sub(&R->y, modulus, &R->y); + } + /* Y = Y * Y */ + fp_sqr(&R->y, &R->y); + fp_montgomery_reduce(&R->y, modulus, *mp); + /* T2 = Y * Y */ + fp_sqr(&R->y, &t2); + fp_montgomery_reduce(&t2, modulus, *mp); + /* T2 = T2/2 */ + if (fp_isodd(&t2)) { + fp_add(&t2, modulus, &t2); + } + fp_div_2(&t2, &t2); + /* Y = Y * X */ + fp_mul(&R->y, &R->x, &R->y); + fp_montgomery_reduce(&R->y, modulus, *mp); + + /* X = T1 * T1 */ + fp_sqr(&t1, &R->x); + fp_montgomery_reduce(&R->x, modulus, *mp); + /* X = X - Y */ + fp_sub(&R->x, &R->y, &R->x); + if (fp_cmp_d(&R->x, 0) == FP_LT) { + fp_add(&R->x, modulus, &R->x); + } + /* X = X - Y */ + fp_sub(&R->x, &R->y, &R->x); + if (fp_cmp_d(&R->x, 0) == FP_LT) { + fp_add(&R->x, modulus, &R->x); + } + + /* Y = Y - X */ + fp_sub(&R->y, &R->x, &R->y); + if (fp_cmp_d(&R->y, 0) == FP_LT) { + fp_add(&R->y, modulus, &R->y); + } + /* Y = Y * T1 */ + fp_mul(&R->y, &t1, &R->y); + fp_montgomery_reduce(&R->y, modulus, *mp); + /* Y = Y - T2 */ + fp_sub(&R->y, &t2, &R->y); + if (fp_cmp_d(&R->y, 0) == FP_LT) { + fp_add(&R->y, modulus, &R->y); + } + + return MP_OKAY; +} + +#else /* USE_FAST_MATH */ + +/** + Add two ECC points + P The point to add + Q The point to add + R [out] The destination of the double + modulus The modulus of the field the ECC curve is in + mp The "b" value from montgomery_setup() + return MP_OKAY on success +*/ +int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, + mp_int* modulus, mp_digit* mp) +{ + mp_int t1; + mp_int t2; + mp_int x; + mp_int y; + mp_int z; + int err; + + if (P == NULL || Q == NULL || R == NULL || modulus == NULL || mp == NULL) + return ECC_BAD_ARG_E; + + if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != MP_OKAY) { + return err; + } + + /* should we dbl instead? */ + err = mp_sub(modulus, &Q->y, &t1); + + if (err == MP_OKAY) { + if ( (mp_cmp(&P->x, &Q->x) == MP_EQ) && + (get_digit_count(&Q->z) && mp_cmp(&P->z, &Q->z) == MP_EQ) && + (mp_cmp(&P->y, &Q->y) == MP_EQ || mp_cmp(&P->y, &t1) == MP_EQ)) { + mp_clear(&t1); + mp_clear(&t2); + mp_clear(&x); + mp_clear(&y); + mp_clear(&z); + + return ecc_projective_dbl_point(P, R, modulus, mp); + } + } + + if (err == MP_OKAY) + err = mp_copy(&P->x, &x); + if (err == MP_OKAY) + err = mp_copy(&P->y, &y); + if (err == MP_OKAY) + err = mp_copy(&P->z, &z); + + /* if Z is one then these are no-operations */ + if (err == MP_OKAY) { + if (get_digit_count(&Q->z)) { + /* T1 = Z' * Z' */ + err = mp_sqr(&Q->z, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* X = X * T1 */ + if (err == MP_OKAY) + err = mp_mul(&t1, &x, &x); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&x, modulus, *mp); + + /* T1 = Z' * T1 */ + if (err == MP_OKAY) + err = mp_mul(&Q->z, &t1, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* Y = Y * T1 */ + if (err == MP_OKAY) + err = mp_mul(&t1, &y, &y); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&y, modulus, *mp); + } + } + + /* T1 = Z*Z */ + if (err == MP_OKAY) + err = mp_sqr(&z, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* T2 = X' * T1 */ + if (err == MP_OKAY) + err = mp_mul(&Q->x, &t1, &t2); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t2, modulus, *mp); + + /* T1 = Z * T1 */ + if (err == MP_OKAY) + err = mp_mul(&z, &t1, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* T1 = Y' * T1 */ + if (err == MP_OKAY) + err = mp_mul(&Q->y, &t1, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* Y = Y - T1 */ + if (err == MP_OKAY) + err = mp_sub(&y, &t1, &y); + if (err == MP_OKAY) { + if (mp_cmp_d(&y, 0) == MP_LT) + err = mp_add(&y, modulus, &y); + } + /* T1 = 2T1 */ + if (err == MP_OKAY) + err = mp_add(&t1, &t1, &t1); + if (err == MP_OKAY) { + if (mp_cmp(&t1, modulus) != MP_LT) + err = mp_sub(&t1, modulus, &t1); + } + /* T1 = Y + T1 */ + if (err == MP_OKAY) + err = mp_add(&t1, &y, &t1); + if (err == MP_OKAY) { + if (mp_cmp(&t1, modulus) != MP_LT) + err = mp_sub(&t1, modulus, &t1); + } + /* X = X - T2 */ + if (err == MP_OKAY) + err = mp_sub(&x, &t2, &x); + if (err == MP_OKAY) { + if (mp_cmp_d(&x, 0) == MP_LT) + err = mp_add(&x, modulus, &x); + } + /* T2 = 2T2 */ + if (err == MP_OKAY) + err = mp_add(&t2, &t2, &t2); + if (err == MP_OKAY) { + if (mp_cmp(&t2, modulus) != MP_LT) + err = mp_sub(&t2, modulus, &t2); + } + /* T2 = X + T2 */ + if (err == MP_OKAY) + err = mp_add(&t2, &x, &t2); + if (err == MP_OKAY) { + if (mp_cmp(&t2, modulus) != MP_LT) + err = mp_sub(&t2, modulus, &t2); + } + + if (err == MP_OKAY) { + if (get_digit_count(&Q->z)) { + /* Z = Z * Z' */ + err = mp_mul(&z, &Q->z, &z); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&z, modulus, *mp); + } + } + + /* Z = Z * X */ + if (err == MP_OKAY) + err = mp_mul(&z, &x, &z); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&z, modulus, *mp); + + /* T1 = T1 * X */ + if (err == MP_OKAY) + err = mp_mul(&t1, &x, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* X = X * X */ + if (err == MP_OKAY) + err = mp_sqr(&x, &x); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&x, modulus, *mp); + + /* T2 = T2 * x */ + if (err == MP_OKAY) + err = mp_mul(&t2, &x, &t2); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t2, modulus, *mp); + + /* T1 = T1 * X */ + if (err == MP_OKAY) + err = mp_mul(&t1, &x, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* X = Y*Y */ + if (err == MP_OKAY) + err = mp_sqr(&y, &x); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&x, modulus, *mp); + + /* X = X - T2 */ + if (err == MP_OKAY) + err = mp_sub(&x, &t2, &x); + if (err == MP_OKAY) { + if (mp_cmp_d(&x, 0) == MP_LT) + err = mp_add(&x, modulus, &x); + } + /* T2 = T2 - X */ + if (err == MP_OKAY) + err = mp_sub(&t2, &x, &t2); + if (err == MP_OKAY) { + if (mp_cmp_d(&t2, 0) == MP_LT) + err = mp_add(&t2, modulus, &t2); + } + /* T2 = T2 - X */ + if (err == MP_OKAY) + err = mp_sub(&t2, &x, &t2); + if (err == MP_OKAY) { + if (mp_cmp_d(&t2, 0) == MP_LT) + err = mp_add(&t2, modulus, &t2); + } + /* T2 = T2 * Y */ + if (err == MP_OKAY) + err = mp_mul(&t2, &y, &t2); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t2, modulus, *mp); + + /* Y = T2 - T1 */ + if (err == MP_OKAY) + err = mp_sub(&t2, &t1, &y); + if (err == MP_OKAY) { + if (mp_cmp_d(&y, 0) == MP_LT) + err = mp_add(&y, modulus, &y); + } + /* Y = Y/2 */ + if (err == MP_OKAY) { + if (mp_isodd(&y)) + err = mp_add(&y, modulus, &y); + } + if (err == MP_OKAY) + err = mp_div_2(&y, &y); + + if (err == MP_OKAY) + err = mp_copy(&x, &R->x); + if (err == MP_OKAY) + err = mp_copy(&y, &R->y); + if (err == MP_OKAY) + err = mp_copy(&z, &R->z); + + /* clean up */ + mp_clear(&t1); + mp_clear(&t2); + mp_clear(&x); + mp_clear(&y); + mp_clear(&z); + + return err; +} + + +/** + Double an ECC point + P The point to double + R [out] The destination of the double + modulus The modulus of the field the ECC curve is in + mp The "b" value from montgomery_setup() + return MP_OKAY on success +*/ +int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* modulus, + mp_digit* mp) +{ + mp_int t1; + mp_int t2; + int err; + + if (P == NULL || R == NULL || modulus == NULL || mp == NULL) + return ECC_BAD_ARG_E; + + if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { + return err; + } + + if (P != R) { + err = mp_copy(&P->x, &R->x); + if (err == MP_OKAY) + err = mp_copy(&P->y, &R->y); + if (err == MP_OKAY) + err = mp_copy(&P->z, &R->z); + } + + /* t1 = Z * Z */ + if (err == MP_OKAY) + err = mp_sqr(&R->z, &t1); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t1, modulus, *mp); + + /* Z = Y * Z */ + if (err == MP_OKAY) + err = mp_mul(&R->z, &R->y, &R->z); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&R->z, modulus, *mp); + + /* Z = 2Z */ + if (err == MP_OKAY) + err = mp_add(&R->z, &R->z, &R->z); + if (err == MP_OKAY) { + if (mp_cmp(&R->z, modulus) != MP_LT) + err = mp_sub(&R->z, modulus, &R->z); + } + + /* T2 = X - T1 */ + if (err == MP_OKAY) + err = mp_sub(&R->x, &t1, &t2); + if (err == MP_OKAY) { + if (mp_cmp_d(&t2, 0) == MP_LT) + err = mp_add(&t2, modulus, &t2); + } + /* T1 = X + T1 */ + if (err == MP_OKAY) + err = mp_add(&t1, &R->x, &t1); + if (err == MP_OKAY) { + if (mp_cmp(&t1, modulus) != MP_LT) + err = mp_sub(&t1, modulus, &t1); + } + /* T2 = T1 * T2 */ + if (err == MP_OKAY) + err = mp_mul(&t1, &t2, &t2); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t2, modulus, *mp); + + /* T1 = 2T2 */ + if (err == MP_OKAY) + err = mp_add(&t2, &t2, &t1); + if (err == MP_OKAY) { + if (mp_cmp(&t1, modulus) != MP_LT) + err = mp_sub(&t1, modulus, &t1); + } + /* T1 = T1 + T2 */ + if (err == MP_OKAY) + err = mp_add(&t1, &t2, &t1); + if (err == MP_OKAY) { + if (mp_cmp(&t1, modulus) != MP_LT) + err = mp_sub(&t1, modulus, &t1); + } + /* Y = 2Y */ + if (err == MP_OKAY) + err = mp_add(&R->y, &R->y, &R->y); + if (err == MP_OKAY) { + if (mp_cmp(&R->y, modulus) != MP_LT) + err = mp_sub(&R->y, modulus, &R->y); + } + /* Y = Y * Y */ + if (err == MP_OKAY) + err = mp_sqr(&R->y, &R->y); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&R->y, modulus, *mp); + + /* T2 = Y * Y */ + if (err == MP_OKAY) + err = mp_sqr(&R->y, &t2); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&t2, modulus, *mp); + + /* T2 = T2/2 */ + if (err == MP_OKAY) { + if (mp_isodd(&t2)) + err = mp_add(&t2, modulus, &t2); + } + if (err == MP_OKAY) + err = mp_div_2(&t2, &t2); + + /* Y = Y * X */ + if (err == MP_OKAY) + err = mp_mul(&R->y, &R->x, &R->y); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&R->y, modulus, *mp); + + /* X = T1 * T1 */ + if (err == MP_OKAY) + err = mp_sqr(&t1, &R->x); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&R->x, modulus, *mp); + + /* X = X - Y */ + if (err == MP_OKAY) + err = mp_sub(&R->x, &R->y, &R->x); + if (err == MP_OKAY) { + if (mp_cmp_d(&R->x, 0) == MP_LT) + err = mp_add(&R->x, modulus, &R->x); + } + /* X = X - Y */ + if (err == MP_OKAY) + err = mp_sub(&R->x, &R->y, &R->x); + if (err == MP_OKAY) { + if (mp_cmp_d(&R->x, 0) == MP_LT) + err = mp_add(&R->x, modulus, &R->x); + } + /* Y = Y - X */ + if (err == MP_OKAY) + err = mp_sub(&R->y, &R->x, &R->y); + if (err == MP_OKAY) { + if (mp_cmp_d(&R->y, 0) == MP_LT) + err = mp_add(&R->y, modulus, &R->y); + } + /* Y = Y * T1 */ + if (err == MP_OKAY) + err = mp_mul(&R->y, &t1, &R->y); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&R->y, modulus, *mp); + + /* Y = Y - T2 */ + if (err == MP_OKAY) + err = mp_sub(&R->y, &t2, &R->y); + if (err == MP_OKAY) { + if (mp_cmp_d(&R->y, 0) == MP_LT) + err = mp_add(&R->y, modulus, &R->y); + } + + /* clean up */ + mp_clear(&t1); + mp_clear(&t2); + + return err; +} + +#endif /* USE_FAST_MATH */ + +/** + Map a projective jacbobian point back to affine space + P [in/out] The point to map + modulus The modulus of the field the ECC curve is in + mp The "b" value from montgomery_setup() + return MP_OKAY on success +*/ +int ecc_map(ecc_point* P, mp_int* modulus, mp_digit* mp) +{ + mp_int t1; + mp_int t2; + int err; + + if (P == NULL || mp == NULL || modulus == NULL) + return ECC_BAD_ARG_E; + + if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { + return MEMORY_E; + } + + /* first map z back to normal */ + err = mp_montgomery_reduce(&P->z, modulus, *mp); + + /* get 1/z */ + if (err == MP_OKAY) + err = mp_invmod(&P->z, modulus, &t1); + + /* get 1/z^2 and 1/z^3 */ + if (err == MP_OKAY) + err = mp_sqr(&t1, &t2); + if (err == MP_OKAY) + err = mp_mod(&t2, modulus, &t2); + if (err == MP_OKAY) + err = mp_mul(&t1, &t2, &t1); + if (err == MP_OKAY) + err = mp_mod(&t1, modulus, &t1); + + /* multiply against x/y */ + if (err == MP_OKAY) + err = mp_mul(&P->x, &t2, &P->x); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&P->x, modulus, *mp); + if (err == MP_OKAY) + err = mp_mul(&P->y, &t1, &P->y); + if (err == MP_OKAY) + err = mp_montgomery_reduce(&P->y, modulus, *mp); + + if (err == MP_OKAY) + mp_set(&P->z, 1); + + /* clean up */ + mp_clear(&t1); + mp_clear(&t2); + + return err; +} + + +#ifndef ECC_TIMING_RESISTANT + +/* size of sliding window, don't change this! */ +#define WINSIZE 4 + +/** + Perform a point multiplication + k The scalar to multiply by + G The base point + R [out] Destination for kG + modulus The modulus of the field the ECC curve is in + map Boolean whether to map back to affine or not + (1==map, 0 == leave in projective) + return MP_OKAY on success +*/ +#ifdef FP_ECC +static int normal_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, + mp_int* modulus, int map) +#else +static int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, + int map) +#endif +{ + ecc_point *tG, *M[8]; + int i, j, err; + mp_int mu; + mp_digit mp; + unsigned long buf; + int first = 1, bitbuf = 0, bitcpy = 0, bitcnt = 0, mode = 0, + digidx = 0; + + if (k == NULL || G == NULL || R == NULL || modulus == NULL) + return ECC_BAD_ARG_E; + + /* init montgomery reduction */ + if ((err = mp_montgomery_setup(modulus, &mp)) != MP_OKAY) { + return err; + } + if ((err = mp_init(&mu)) != MP_OKAY) { + return err; + } + if ((err = mp_montgomery_calc_normalization(&mu, modulus)) != MP_OKAY) { + mp_clear(&mu); + return err; + } + + /* alloc ram for window temps */ + for (i = 0; i < 8; i++) { + M[i] = ecc_new_point(); + if (M[i] == NULL) { + for (j = 0; j < i; j++) { + ecc_del_point(M[j]); + } + mp_clear(&mu); + return MEMORY_E; + } + } + + /* make a copy of G incase R==G */ + tG = ecc_new_point(); + if (tG == NULL) + err = MEMORY_E; + + /* tG = G and convert to montgomery */ + if (err == MP_OKAY) { + if (mp_cmp_d(&mu, 1) == MP_EQ) { + err = mp_copy(&G->x, &tG->x); + if (err == MP_OKAY) + err = mp_copy(&G->y, &tG->y); + if (err == MP_OKAY) + err = mp_copy(&G->z, &tG->z); + } else { + err = mp_mulmod(&G->x, &mu, modulus, &tG->x); + if (err == MP_OKAY) + err = mp_mulmod(&G->y, &mu, modulus, &tG->y); + if (err == MP_OKAY) + err = mp_mulmod(&G->z, &mu, modulus, &tG->z); + } + } + mp_clear(&mu); + + /* calc the M tab, which holds kG for k==8..15 */ + /* M[0] == 8G */ + if (err == MP_OKAY) + err = ecc_projective_dbl_point(tG, M[0], modulus, &mp); + if (err == MP_OKAY) + err = ecc_projective_dbl_point(M[0], M[0], modulus, &mp); + if (err == MP_OKAY) + err = ecc_projective_dbl_point(M[0], M[0], modulus, &mp); + + /* now find (8+k)G for k=1..7 */ + if (err == MP_OKAY) + for (j = 9; j < 16; j++) { + err = ecc_projective_add_point(M[j-9], tG, M[j-8], modulus, &mp); + if (err != MP_OKAY) break; + } + + /* setup sliding window */ + if (err == MP_OKAY) { + mode = 0; + bitcnt = 1; + buf = 0; + digidx = get_digit_count(k) - 1; + bitcpy = bitbuf = 0; + first = 1; + + /* perform ops */ + for (;;) { + /* grab next digit as required */ + if (--bitcnt == 0) { + if (digidx == -1) { + break; + } + buf = get_digit(k, digidx); + bitcnt = (int) DIGIT_BIT; + --digidx; + } + + /* grab the next msb from the ltiplicand */ + i = (int)(buf >> (DIGIT_BIT - 1)) & 1; + buf <<= 1; + + /* skip leading zero bits */ + if (mode == 0 && i == 0) + continue; + + /* if the bit is zero and mode == 1 then we double */ + if (mode == 1 && i == 0) { + err = ecc_projective_dbl_point(R, R, modulus, &mp); + if (err != MP_OKAY) break; + continue; + } + + /* else we add it to the window */ + bitbuf |= (i << (WINSIZE - ++bitcpy)); + mode = 2; + + if (bitcpy == WINSIZE) { + /* if this is the first window we do a simple copy */ + if (first == 1) { + /* R = kG [k = first window] */ + err = mp_copy(&M[bitbuf-8]->x, &R->x); + if (err != MP_OKAY) break; + + err = mp_copy(&M[bitbuf-8]->y, &R->y); + if (err != MP_OKAY) break; + + err = mp_copy(&M[bitbuf-8]->z, &R->z); + first = 0; + } else { + /* normal window */ + /* ok window is filled so double as required and add */ + /* double first */ + for (j = 0; j < WINSIZE; j++) { + err = ecc_projective_dbl_point(R, R, modulus, &mp); + if (err != MP_OKAY) break; + } + if (err != MP_OKAY) break; /* out of first for(;;) */ + + /* then add, bitbuf will be 8..15 [8..2^WINSIZE] guaranted */ + err = ecc_projective_add_point(R,M[bitbuf-8],R,modulus,&mp); + } + if (err != MP_OKAY) break; + /* empty window and reset */ + bitcpy = bitbuf = 0; + mode = 1; + } + } + } + + /* if bits remain then double/add */ + if (err == MP_OKAY) { + if (mode == 2 && bitcpy > 0) { + /* double then add */ + for (j = 0; j < bitcpy; j++) { + /* only double if we have had at least one add first */ + if (first == 0) { + err = ecc_projective_dbl_point(R, R, modulus, &mp); + if (err != MP_OKAY) break; + } + + bitbuf <<= 1; + if ((bitbuf & (1 << WINSIZE)) != 0) { + if (first == 1) { + /* first add, so copy */ + err = mp_copy(&tG->x, &R->x); + if (err != MP_OKAY) break; + + err = mp_copy(&tG->y, &R->y); + if (err != MP_OKAY) break; + + err = mp_copy(&tG->z, &R->z); + if (err != MP_OKAY) break; + first = 0; + } else { + /* then add */ + err = ecc_projective_add_point(R, tG, R, modulus, &mp); + if (err != MP_OKAY) break; + } + } + } + } + } + + /* map R back from projective space */ + if (err == MP_OKAY && map) + err = ecc_map(R, modulus, &mp); + + mp_clear(&mu); + ecc_del_point(tG); + for (i = 0; i < 8; i++) { + ecc_del_point(M[i]); + } + return err; +} + +#undef WINSIZE +#endif /* ECC_TIMING_RESISTANT */ + + +/** + Allocate a new ECC point + return A newly allocated point or NULL on error +*/ +ecc_point* ecc_new_point(void) +{ + ecc_point* p; + p = (ecc_point*)XMALLOC(sizeof(ecc_point), 0, DYNAMIC_TYPE_BIGINT); + if (p == NULL) { + return NULL; + } + XMEMSET(p, 0, sizeof(ecc_point)); + if (mp_init_multi(&p->x, &p->y, &p->z, NULL, NULL, NULL) != MP_OKAY) { + XFREE(p, 0, DYNAMIC_TYPE_BIGINT); + return NULL; + } + return p; +} + +/** Free an ECC point from memory + p The point to free +*/ +void ecc_del_point(ecc_point* p) +{ + /* prevents free'ing null arguments */ + if (p != NULL) { + mp_clear(&p->x); + mp_clear(&p->y); + mp_clear(&p->z); + XFREE(p, 0, DYNAMIC_TYPE_BIGINT); + } +} + + +/** Returns whether an ECC idx is valid or not + n The idx number to check + return 1 if valid, 0 if not +*/ +static int ecc_is_valid_idx(int n) +{ + int x; + + for (x = 0; ecc_sets[x].size != 0; x++) + ; + /* -1 is a valid index --- indicating that the domain params + were supplied by the user */ + if ((n >= -1) && (n < x)) { + return 1; + } + return 0; +} + + +/** + Create an ECC shared secret between two keys + private_key The private ECC key + public_key The public key + out [out] Destination of the shared secret + Conforms to EC-DH from ANSI X9.63 + outlen [in/out] The max size and resulting size of the shared secret + return MP_OKAY if successful +*/ +int ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, + word32* outlen) +{ + word32 x = 0; + ecc_point* result; + mp_int prime; + int err; + + if (private_key == NULL || public_key == NULL || out == NULL || + outlen == NULL) + return BAD_FUNC_ARG; + + /* type valid? */ + if (private_key->type != ECC_PRIVATEKEY) { + return ECC_BAD_ARG_E; + } + + if (ecc_is_valid_idx(private_key->idx) == 0 || + ecc_is_valid_idx(public_key->idx) == 0) + return ECC_BAD_ARG_E; + + if (XSTRNCMP(private_key->dp->name, public_key->dp->name, ECC_MAXNAME) != 0) + return ECC_BAD_ARG_E; + + /* make new point */ + result = ecc_new_point(); + if (result == NULL) { + return MEMORY_E; + } + + if ((err = mp_init(&prime)) != MP_OKAY) { + ecc_del_point(result); + return err; + } + + err = mp_read_radix(&prime, (char *)private_key->dp->prime, 16); + + if (err == MP_OKAY) + err = ecc_mulmod(&private_key->k, &public_key->pubkey, result, &prime,1); + + if (err == MP_OKAY) { + x = mp_unsigned_bin_size(&prime); + if (*outlen < x) + err = BUFFER_E; + } + + if (err == MP_OKAY) { + XMEMSET(out, 0, x); + err = mp_to_unsigned_bin(&result->x,out + (x - + mp_unsigned_bin_size(&result->x))); + *outlen = x; + } + + mp_clear(&prime); + ecc_del_point(result); + + return err; +} + + +int ecc_make_key_ex(RNG* rng, ecc_key* key, const ecc_set_type* dp); + +/** + Make a new ECC key + rng An active RNG state + keysize The keysize for the new key (in octets from 20 to 65 bytes) + key [out] Destination of the newly created key + return MP_OKAY if successful, + upon error all allocated memory will be freed +*/ +int ecc_make_key(RNG* rng, int keysize, ecc_key* key) +{ + int x, err; + + if (key == NULL || rng == NULL) + return ECC_BAD_ARG_E; + + /* find key size */ + for (x = 0; (keysize > ecc_sets[x].size) && (ecc_sets[x].size != 0); x++) + ; + keysize = ecc_sets[x].size; + + if (keysize > ECC_MAXSIZE || ecc_sets[x].size == 0) { + return BAD_FUNC_ARG; + } + err = ecc_make_key_ex(rng, key, &ecc_sets[x]); + key->idx = x; + + return err; +} + +int ecc_make_key_ex(RNG* rng, ecc_key* key, const ecc_set_type* dp) +{ + int err; + ecc_point* base; + mp_int prime; + mp_int order; +#ifdef CYASSL_SMALL_STACK + byte* buf; +#else + byte buf[ECC_MAXSIZE]; +#endif + int keysize; + + if (key == NULL || rng == NULL || dp == NULL) + return ECC_BAD_ARG_E; + +#ifdef CYASSL_SMALL_STACK + buf = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (buf == NULL) + return MEMORY_E; +#endif + + key->idx = -1; + key->dp = dp; + keysize = dp->size; + + /* allocate ram */ + base = NULL; + + /* make up random string */ + err = RNG_GenerateBlock(rng, buf, keysize); + if (err == 0) + buf[0] |= 0x0c; + + /* setup the key variables */ + if (err == 0) { + err = mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, + &key->k, &prime, &order); + if (err != MP_OKAY) + err = MEMORY_E; + } + + if (err == MP_OKAY) { + base = ecc_new_point(); + if (base == NULL) + err = MEMORY_E; + } + + /* read in the specs for this key */ + if (err == MP_OKAY) + err = mp_read_radix(&prime, (char *)key->dp->prime, 16); + if (err == MP_OKAY) + err = mp_read_radix(&order, (char *)key->dp->order, 16); + if (err == MP_OKAY) + err = mp_read_radix(&base->x, (char *)key->dp->Gx, 16); + if (err == MP_OKAY) + err = mp_read_radix(&base->y, (char *)key->dp->Gy, 16); + + if (err == MP_OKAY) + mp_set(&base->z, 1); + if (err == MP_OKAY) + err = mp_read_unsigned_bin(&key->k, (byte*)buf, keysize); + + /* the key should be smaller than the order of base point */ + if (err == MP_OKAY) { + if (mp_cmp(&key->k, &order) != MP_LT) + err = mp_mod(&key->k, &order, &key->k); + } + /* make the public key */ + if (err == MP_OKAY) + err = ecc_mulmod(&key->k, base, &key->pubkey, &prime, 1); + if (err == MP_OKAY) + key->type = ECC_PRIVATEKEY; + + if (err != MP_OKAY) { + /* clean up */ + mp_clear(&key->pubkey.x); + mp_clear(&key->pubkey.y); + mp_clear(&key->pubkey.z); + mp_clear(&key->k); + } + ecc_del_point(base); + mp_clear(&prime); + mp_clear(&order); + +#ifdef ECC_CLEAN_STACK + XMEMSET(buf, 0, ECC_MAXSIZE); +#endif + +#ifdef CYASSL_SMALL_STACK + XFREE(buf, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return err; +} + + +/* Setup dynamic pointers is using normal math for proper freeing */ +void ecc_init(ecc_key* key) +{ + (void)key; +#ifndef USE_FAST_MATH + key->pubkey.x.dp = NULL; + key->pubkey.y.dp = NULL; + key->pubkey.z.dp = NULL; + + key->k.dp = NULL; +#endif +} + + +/** + Sign a message digest + in The message digest to sign + inlen The length of the digest + out [out] The destination for the signature + outlen [in/out] The max size and resulting size of the signature + key A private ECC key + return MP_OKAY if successful +*/ +int ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen, + RNG* rng, ecc_key* key) +{ + mp_int r; + mp_int s; + mp_int e; + mp_int p; + int err; + + if (in == NULL || out == NULL || outlen == NULL || key == NULL || rng ==NULL) + return ECC_BAD_ARG_E; + + /* is this a private key? */ + if (key->type != ECC_PRIVATEKEY) { + return ECC_BAD_ARG_E; + } + + /* is the IDX valid ? */ + if (ecc_is_valid_idx(key->idx) != 1) { + return ECC_BAD_ARG_E; + } + + /* get the hash and load it as a bignum into 'e' */ + /* init the bignums */ + if ((err = mp_init_multi(&r, &s, &p, &e, NULL, NULL)) != MP_OKAY) { + return err; + } + err = mp_read_radix(&p, (char *)key->dp->order, 16); + + if (err == MP_OKAY) { + /* we may need to truncate if hash is longer than key size */ + word32 orderBits = mp_count_bits(&p); + + /* truncate down to byte size, may be all that's needed */ + if ( (CYASSL_BIT_SIZE * inlen) > orderBits) + inlen = (orderBits + CYASSL_BIT_SIZE - 1)/CYASSL_BIT_SIZE; + err = mp_read_unsigned_bin(&e, (byte*)in, inlen); + + /* may still need bit truncation too */ + if (err == MP_OKAY && (CYASSL_BIT_SIZE * inlen) > orderBits) + mp_rshb(&e, CYASSL_BIT_SIZE - (orderBits & 0x7)); + } + + /* make up a key and export the public copy */ + if (err == MP_OKAY) { + ecc_key pubkey; + ecc_init(&pubkey); + for (;;) { + err = ecc_make_key_ex(rng, &pubkey, key->dp); + if (err != MP_OKAY) break; + + /* find r = x1 mod n */ + err = mp_mod(&pubkey.pubkey.x, &p, &r); + if (err != MP_OKAY) break; + + if (mp_iszero(&r) == MP_YES) + ecc_free(&pubkey); + else { + /* find s = (e + xr)/k */ + err = mp_invmod(&pubkey.k, &p, &pubkey.k); + if (err != MP_OKAY) break; + + err = mp_mulmod(&key->k, &r, &p, &s); /* s = xr */ + if (err != MP_OKAY) break; + + err = mp_add(&e, &s, &s); /* s = e + xr */ + if (err != MP_OKAY) break; + + err = mp_mod(&s, &p, &s); /* s = e + xr */ + if (err != MP_OKAY) break; + + err = mp_mulmod(&s, &pubkey.k, &p, &s); /* s = (e + xr)/k */ + if (err != MP_OKAY) break; + + ecc_free(&pubkey); + if (mp_iszero(&s) == MP_NO) + break; + } + } + ecc_free(&pubkey); + } + + /* store as SEQUENCE { r, s -- integer } */ + if (err == MP_OKAY) + err = StoreECC_DSA_Sig(out, outlen, &r, &s); + + mp_clear(&r); + mp_clear(&s); + mp_clear(&p); + mp_clear(&e); + + return err; +} + + +/** + Free an ECC key from memory + key The key you wish to free +*/ +void ecc_free(ecc_key* key) +{ + if (key == NULL) + return; + + mp_clear(&key->pubkey.x); + mp_clear(&key->pubkey.y); + mp_clear(&key->pubkey.z); + mp_clear(&key->k); +} + + +#ifdef USE_FAST_MATH + #define GEN_MEM_ERR FP_MEM +#else + #define GEN_MEM_ERR MP_MEM +#endif + +#ifdef ECC_SHAMIR + +/** Computes kA*A + kB*B = C using Shamir's Trick + A First point to multiply + kA What to multiple A by + B Second point to multiply + kB What to multiple B by + C [out] Destination point (can overlap with A or B) + modulus Modulus for curve + return MP_OKAY on success +*/ +#ifdef FP_ECC +static int normal_ecc_mul2add(ecc_point* A, mp_int* kA, + ecc_point* B, mp_int* kB, + ecc_point* C, mp_int* modulus) +#else +static int ecc_mul2add(ecc_point* A, mp_int* kA, + ecc_point* B, mp_int* kB, + ecc_point* C, mp_int* modulus) +#endif +{ + ecc_point* precomp[16]; + unsigned bitbufA, bitbufB, lenA, lenB, len, x, y, nA, nB, nibble; + unsigned char* tA; + unsigned char* tB; + int err = MP_OKAY, first; + int muInit = 0; + int tableInit = 0; + mp_digit mp; + mp_int mu; + + /* argchks */ + if (A == NULL || kA == NULL || B == NULL || kB == NULL || C == NULL || + modulus == NULL) + return ECC_BAD_ARG_E; + + + /* allocate memory */ + tA = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (tA == NULL) { + return GEN_MEM_ERR; + } + tB = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (tB == NULL) { + XFREE(tA, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return GEN_MEM_ERR; + } + XMEMSET(tA, 0, ECC_BUFSIZE); + XMEMSET(tB, 0, ECC_BUFSIZE); + + /* get sizes */ + lenA = mp_unsigned_bin_size(kA); + lenB = mp_unsigned_bin_size(kB); + len = MAX(lenA, lenB); + + /* sanity check */ + if ((lenA > ECC_BUFSIZE) || (lenB > ECC_BUFSIZE)) { + err = BAD_FUNC_ARG; + } + + if (err == MP_OKAY) { + /* extract and justify kA */ + err = mp_to_unsigned_bin(kA, (len - lenA) + tA); + + /* extract and justify kB */ + if (err == MP_OKAY) + err = mp_to_unsigned_bin(kB, (len - lenB) + tB); + + /* allocate the table */ + if (err == MP_OKAY) { + for (x = 0; x < 16; x++) { + precomp[x] = ecc_new_point(); + if (precomp[x] == NULL) { + for (y = 0; y < x; ++y) { + ecc_del_point(precomp[y]); + } + err = GEN_MEM_ERR; + break; + } + } + } + } + + if (err == MP_OKAY) + tableInit = 1; + + if (err == MP_OKAY) + /* init montgomery reduction */ + err = mp_montgomery_setup(modulus, &mp); + + if (err == MP_OKAY) + err = mp_init(&mu); + if (err == MP_OKAY) + muInit = 1; + + if (err == MP_OKAY) + err = mp_montgomery_calc_normalization(&mu, modulus); + + if (err == MP_OKAY) + /* copy ones ... */ + err = mp_mulmod(&A->x, &mu, modulus, &precomp[1]->x); + + if (err == MP_OKAY) + err = mp_mulmod(&A->y, &mu, modulus, &precomp[1]->y); + if (err == MP_OKAY) + err = mp_mulmod(&A->z, &mu, modulus, &precomp[1]->z); + + if (err == MP_OKAY) + err = mp_mulmod(&B->x, &mu, modulus, &precomp[1<<2]->x); + if (err == MP_OKAY) + err = mp_mulmod(&B->y, &mu, modulus, &precomp[1<<2]->y); + if (err == MP_OKAY) + err = mp_mulmod(&B->z, &mu, modulus, &precomp[1<<2]->z); + + if (err == MP_OKAY) + /* precomp [i,0](A + B) table */ + err = ecc_projective_dbl_point(precomp[1], precomp[2], modulus, &mp); + + if (err == MP_OKAY) + err = ecc_projective_add_point(precomp[1], precomp[2], precomp[3], + modulus, &mp); + if (err == MP_OKAY) + /* precomp [0,i](A + B) table */ + err = ecc_projective_dbl_point(precomp[1<<2], precomp[2<<2], modulus, &mp); + + if (err == MP_OKAY) + err = ecc_projective_add_point(precomp[1<<2], precomp[2<<2], precomp[3<<2], + modulus, &mp); + + if (err == MP_OKAY) { + /* precomp [i,j](A + B) table (i != 0, j != 0) */ + for (x = 1; x < 4; x++) { + for (y = 1; y < 4; y++) { + if (err == MP_OKAY) + err = ecc_projective_add_point(precomp[x], precomp[(y<<2)], + precomp[x+(y<<2)], modulus, &mp); + } + } + } + + if (err == MP_OKAY) { + nibble = 3; + first = 1; + bitbufA = tA[0]; + bitbufB = tB[0]; + + /* for every byte of the multiplicands */ + for (x = -1;; ) { + /* grab a nibble */ + if (++nibble == 4) { + ++x; if (x == len) break; + bitbufA = tA[x]; + bitbufB = tB[x]; + nibble = 0; + } + + /* extract two bits from both, shift/update */ + nA = (bitbufA >> 6) & 0x03; + nB = (bitbufB >> 6) & 0x03; + bitbufA = (bitbufA << 2) & 0xFF; + bitbufB = (bitbufB << 2) & 0xFF; + + /* if both zero, if first, continue */ + if ((nA == 0) && (nB == 0) && (first == 1)) { + continue; + } + + /* double twice, only if this isn't the first */ + if (first == 0) { + /* double twice */ + if (err == MP_OKAY) + err = ecc_projective_dbl_point(C, C, modulus, &mp); + if (err == MP_OKAY) + err = ecc_projective_dbl_point(C, C, modulus, &mp); + else + break; + } + + /* if not both zero */ + if ((nA != 0) || (nB != 0)) { + if (first == 1) { + /* if first, copy from table */ + first = 0; + if (err == MP_OKAY) + err = mp_copy(&precomp[nA + (nB<<2)]->x, &C->x); + + if (err == MP_OKAY) + err = mp_copy(&precomp[nA + (nB<<2)]->y, &C->y); + + if (err == MP_OKAY) + err = mp_copy(&precomp[nA + (nB<<2)]->z, &C->z); + else + break; + } else { + /* if not first, add from table */ + if (err == MP_OKAY) + err = ecc_projective_add_point(C, precomp[nA + (nB<<2)], C, + modulus, &mp); + else + break; + } + } + } + } + + if (err == MP_OKAY) + /* reduce to affine */ + err = ecc_map(C, modulus, &mp); + + /* clean up */ + if (muInit) + mp_clear(&mu); + + if (tableInit) { + for (x = 0; x < 16; x++) { + ecc_del_point(precomp[x]); + } + } +#ifdef ECC_CLEAN_STACK + XMEMSET(tA, 0, ECC_BUFSIZE); + XMEMSET(tB, 0, ECC_BUFSIZE); +#endif + XFREE(tA, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(tB, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + return err; +} + + +#endif /* ECC_SHAMIR */ + + + +/* verify + * + * w = s^-1 mod n + * u1 = xw + * u2 = rw + * X = u1*G + u2*Q + * v = X_x1 mod n + * accept if v == r + */ + +/** + Verify an ECC signature + sig The signature to verify + siglen The length of the signature (octets) + hash The hash (message digest) that was signed + hashlen The length of the hash (octets) + stat Result of signature, 1==valid, 0==invalid + key The corresponding public ECC key + return MP_OKAY if successful (even if the signature is not valid) +*/ +int ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash, + word32 hashlen, int* stat, ecc_key* key) +{ + ecc_point *mG, *mQ; + mp_int r; + mp_int s; + mp_int v; + mp_int w; + mp_int u1; + mp_int u2; + mp_int e; + mp_int p; + mp_int m; + int err; + + if (sig == NULL || hash == NULL || stat == NULL || key == NULL) + return ECC_BAD_ARG_E; + + /* default to invalid signature */ + *stat = 0; + + /* is the IDX valid ? */ + if (ecc_is_valid_idx(key->idx) != 1) { + return ECC_BAD_ARG_E; + } + + /* allocate ints */ + if ((err = mp_init_multi(&v, &w, &u1, &u2, &p, &e)) != MP_OKAY) { + return MEMORY_E; + } + + if ((err = mp_init(&m)) != MP_OKAY) { + mp_clear(&v); + mp_clear(&w); + mp_clear(&u1); + mp_clear(&u2); + mp_clear(&p); + mp_clear(&e); + return MEMORY_E; + } + + /* allocate points */ + mG = ecc_new_point(); + mQ = ecc_new_point(); + if (mQ == NULL || mG == NULL) + err = MEMORY_E; + + /* Note, DecodeECC_DSA_Sig() calls mp_init() on r and s. + * If either of those don't allocate correctly, none of + * the rest of this function will execute, and everything + * gets cleaned up at the end. */ + XMEMSET(&r, 0, sizeof(r)); + XMEMSET(&s, 0, sizeof(s)); + if (err == MP_OKAY) + err = DecodeECC_DSA_Sig(sig, siglen, &r, &s); + + /* get the order */ + if (err == MP_OKAY) + err = mp_read_radix(&p, (char *)key->dp->order, 16); + + /* get the modulus */ + if (err == MP_OKAY) + err = mp_read_radix(&m, (char *)key->dp->prime, 16); + + /* check for zero */ + if (err == MP_OKAY) { + if (mp_iszero(&r) || mp_iszero(&s) || mp_cmp(&r, &p) != MP_LT || + mp_cmp(&s, &p) != MP_LT) + err = MP_ZERO_E; + } + /* read hash */ + if (err == MP_OKAY) { + /* we may need to truncate if hash is longer than key size */ + unsigned int orderBits = mp_count_bits(&p); + + /* truncate down to byte size, may be all that's needed */ + if ( (CYASSL_BIT_SIZE * hashlen) > orderBits) + hashlen = (orderBits + CYASSL_BIT_SIZE - 1)/CYASSL_BIT_SIZE; + err = mp_read_unsigned_bin(&e, hash, hashlen); + + /* may still need bit truncation too */ + if (err == MP_OKAY && (CYASSL_BIT_SIZE * hashlen) > orderBits) + mp_rshb(&e, CYASSL_BIT_SIZE - (orderBits & 0x7)); + } + + /* w = s^-1 mod n */ + if (err == MP_OKAY) + err = mp_invmod(&s, &p, &w); + + /* u1 = ew */ + if (err == MP_OKAY) + err = mp_mulmod(&e, &w, &p, &u1); + + /* u2 = rw */ + if (err == MP_OKAY) + err = mp_mulmod(&r, &w, &p, &u2); + + /* find mG and mQ */ + if (err == MP_OKAY) + err = mp_read_radix(&mG->x, (char *)key->dp->Gx, 16); + + if (err == MP_OKAY) + err = mp_read_radix(&mG->y, (char *)key->dp->Gy, 16); + if (err == MP_OKAY) + mp_set(&mG->z, 1); + + if (err == MP_OKAY) + err = mp_copy(&key->pubkey.x, &mQ->x); + if (err == MP_OKAY) + err = mp_copy(&key->pubkey.y, &mQ->y); + if (err == MP_OKAY) + err = mp_copy(&key->pubkey.z, &mQ->z); + +#ifndef ECC_SHAMIR + { + mp_digit mp; + + /* compute u1*mG + u2*mQ = mG */ + if (err == MP_OKAY) + err = ecc_mulmod(&u1, mG, mG, &m, 0); + if (err == MP_OKAY) + err = ecc_mulmod(&u2, mQ, mQ, &m, 0); + + /* find the montgomery mp */ + if (err == MP_OKAY) + err = mp_montgomery_setup(&m, &mp); + + /* add them */ + if (err == MP_OKAY) + err = ecc_projective_add_point(mQ, mG, mG, &m, &mp); + + /* reduce */ + if (err == MP_OKAY) + err = ecc_map(mG, &m, &mp); + } +#else + /* use Shamir's trick to compute u1*mG + u2*mQ using half the doubles */ + if (err == MP_OKAY) + err = ecc_mul2add(mG, &u1, mQ, &u2, mG, &m); +#endif /* ECC_SHAMIR */ + + /* v = X_x1 mod n */ + if (err == MP_OKAY) + err = mp_mod(&mG->x, &p, &v); + + /* does v == r */ + if (err == MP_OKAY) { + if (mp_cmp(&v, &r) == MP_EQ) + *stat = 1; + } + + ecc_del_point(mG); + ecc_del_point(mQ); + + mp_clear(&r); + mp_clear(&s); + mp_clear(&v); + mp_clear(&w); + mp_clear(&u1); + mp_clear(&u2); + mp_clear(&p); + mp_clear(&e); + mp_clear(&m); + + return err; +} + + +/* export public ECC key in ANSI X9.63 format */ +int ecc_export_x963(ecc_key* key, byte* out, word32* outLen) +{ +#ifdef CYASSL_SMALL_STACK + byte* buf; +#else + byte buf[ECC_BUFSIZE]; +#endif + word32 numlen; + int ret = MP_OKAY; + + if (key == NULL || out == NULL || outLen == NULL) + return ECC_BAD_ARG_E; + + if (ecc_is_valid_idx(key->idx) == 0) { + return ECC_BAD_ARG_E; + } + numlen = key->dp->size; + + if (*outLen < (1 + 2*numlen)) { + *outLen = 1 + 2*numlen; + return BUFFER_E; + } + + /* store byte 0x04 */ + out[0] = 0x04; + +#ifdef CYASSL_SMALL_STACK + buf = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (buf == NULL) + return MEMORY_E; +#endif + + do { + /* pad and store x */ + XMEMSET(buf, 0, ECC_BUFSIZE); + ret = mp_to_unsigned_bin(&key->pubkey.x, + buf + (numlen - mp_unsigned_bin_size(&key->pubkey.x))); + if (ret != MP_OKAY) + break; + XMEMCPY(out+1, buf, numlen); + + /* pad and store y */ + XMEMSET(buf, 0, ECC_BUFSIZE); + ret = mp_to_unsigned_bin(&key->pubkey.y, + buf + (numlen - mp_unsigned_bin_size(&key->pubkey.y))); + if (ret != MP_OKAY) + break; + XMEMCPY(out+1+numlen, buf, numlen); + + *outLen = 1 + 2*numlen; + } while (0); + +#ifdef CYASSL_SMALL_STACK + XFREE(buf, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + + +/* import public ECC key in ANSI X9.63 format */ +int ecc_import_x963(const byte* in, word32 inLen, ecc_key* key) +{ + int x, err; + + if (in == NULL || key == NULL) + return ECC_BAD_ARG_E; + + /* must be odd */ + if ((inLen & 1) == 0) { + return ECC_BAD_ARG_E; + } + + /* init key */ + if (mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, + NULL, NULL) != MP_OKAY) { + return MEMORY_E; + } + err = MP_OKAY; + + /* check for 4, 6 or 7 */ + if (in[0] != 4 && in[0] != 6 && in[0] != 7) { + err = ASN_PARSE_E; + } + + /* read data */ + if (err == MP_OKAY) + err = mp_read_unsigned_bin(&key->pubkey.x, (byte*)in+1, (inLen-1)>>1); + + if (err == MP_OKAY) + err = mp_read_unsigned_bin(&key->pubkey.y, (byte*)in+1+((inLen-1)>>1), + (inLen-1)>>1); + + if (err == MP_OKAY) + mp_set(&key->pubkey.z, 1); + + if (err == MP_OKAY) { + /* determine the idx */ + for (x = 0; ecc_sets[x].size != 0; x++) { + if ((unsigned)ecc_sets[x].size >= ((inLen-1)>>1)) { + break; + } + } + if (ecc_sets[x].size == 0) { + err = ASN_PARSE_E; + } else { + /* set the idx */ + key->idx = x; + key->dp = &ecc_sets[x]; + key->type = ECC_PUBLICKEY; + } + } + + if (err != MP_OKAY) { + mp_clear(&key->pubkey.x); + mp_clear(&key->pubkey.y); + mp_clear(&key->pubkey.z); + mp_clear(&key->k); + } + + return err; +} + + +/* export ecc private key only raw, outLen is in/out size + return MP_OKAY on success */ +int ecc_export_private_only(ecc_key* key, byte* out, word32* outLen) +{ + word32 numlen; + + if (key == NULL || out == NULL || outLen == NULL) + return ECC_BAD_ARG_E; + + if (ecc_is_valid_idx(key->idx) == 0) { + return ECC_BAD_ARG_E; + } + numlen = key->dp->size; + + if (*outLen < numlen) { + *outLen = numlen; + return BUFFER_E; + } + *outLen = numlen; + XMEMSET(out, 0, *outLen); + return mp_to_unsigned_bin(&key->k, out + (numlen - + mp_unsigned_bin_size(&key->k))); +} + + +/* ecc private key import, public key in ANSI X9.63 format, private raw */ +int ecc_import_private_key(const byte* priv, word32 privSz, const byte* pub, + word32 pubSz, ecc_key* key) +{ + int ret = ecc_import_x963(pub, pubSz, key); + if (ret != 0) + return ret; + + key->type = ECC_PRIVATEKEY; + + return mp_read_unsigned_bin(&key->k, priv, privSz); +} + + +/* key size in octets */ +int ecc_size(ecc_key* key) +{ + if (key == NULL) return 0; + + return key->dp->size; +} + + +/* worst case estimate, check actual return from ecc_sign_hash for actual value + of signature size in octets */ +int ecc_sig_size(ecc_key* key) +{ + int sz = ecc_size(key); + if (sz < 0) + return sz; + + return sz * 2 + SIG_HEADER_SZ + 4; /* (4) worst case estimate */ +} + + +#ifdef FP_ECC + +/* fixed point ECC cache */ +/* number of entries in the cache */ +#ifndef FP_ENTRIES + #define FP_ENTRIES 16 +#endif + +/* number of bits in LUT */ +#ifndef FP_LUT + #define FP_LUT 8U +#endif + +#ifdef ECC_SHAMIR + /* Sharmir requires a bigger LUT, TAO */ + #if (FP_LUT > 12) || (FP_LUT < 4) + #error FP_LUT must be between 4 and 12 inclusively + #endif +#else + #if (FP_LUT > 12) || (FP_LUT < 2) + #error FP_LUT must be between 2 and 12 inclusively + #endif +#endif + + +/** Our FP cache */ +typedef struct { + ecc_point* g; /* cached COPY of base point */ + ecc_point* LUT[1U< 6 + { 1, 0, 0 }, { 2, 1, 64 }, { 2, 2, 64 }, { 3, 3, 64 }, { 2, 4, 64 }, { 3, 5, 64 }, { 3, 6, 64 }, { 4, 7, 64 }, + { 2, 8, 64 }, { 3, 9, 64 }, { 3, 10, 64 }, { 4, 11, 64 }, { 3, 12, 64 }, { 4, 13, 64 }, { 4, 14, 64 }, { 5, 15, 64 }, + { 2, 16, 64 }, { 3, 17, 64 }, { 3, 18, 64 }, { 4, 19, 64 }, { 3, 20, 64 }, { 4, 21, 64 }, { 4, 22, 64 }, { 5, 23, 64 }, + { 3, 24, 64 }, { 4, 25, 64 }, { 4, 26, 64 }, { 5, 27, 64 }, { 4, 28, 64 }, { 5, 29, 64 }, { 5, 30, 64 }, { 6, 31, 64 }, + { 2, 32, 64 }, { 3, 33, 64 }, { 3, 34, 64 }, { 4, 35, 64 }, { 3, 36, 64 }, { 4, 37, 64 }, { 4, 38, 64 }, { 5, 39, 64 }, + { 3, 40, 64 }, { 4, 41, 64 }, { 4, 42, 64 }, { 5, 43, 64 }, { 4, 44, 64 }, { 5, 45, 64 }, { 5, 46, 64 }, { 6, 47, 64 }, + { 3, 48, 64 }, { 4, 49, 64 }, { 4, 50, 64 }, { 5, 51, 64 }, { 4, 52, 64 }, { 5, 53, 64 }, { 5, 54, 64 }, { 6, 55, 64 }, + { 4, 56, 64 }, { 5, 57, 64 }, { 5, 58, 64 }, { 6, 59, 64 }, { 5, 60, 64 }, { 6, 61, 64 }, { 6, 62, 64 }, { 7, 63, 64 }, +#if FP_LUT > 7 + { 1, 0, 0 }, { 2, 1, 128 }, { 2, 2, 128 }, { 3, 3, 128 }, { 2, 4, 128 }, { 3, 5, 128 }, { 3, 6, 128 }, { 4, 7, 128 }, + { 2, 8, 128 }, { 3, 9, 128 }, { 3, 10, 128 }, { 4, 11, 128 }, { 3, 12, 128 }, { 4, 13, 128 }, { 4, 14, 128 }, { 5, 15, 128 }, + { 2, 16, 128 }, { 3, 17, 128 }, { 3, 18, 128 }, { 4, 19, 128 }, { 3, 20, 128 }, { 4, 21, 128 }, { 4, 22, 128 }, { 5, 23, 128 }, + { 3, 24, 128 }, { 4, 25, 128 }, { 4, 26, 128 }, { 5, 27, 128 }, { 4, 28, 128 }, { 5, 29, 128 }, { 5, 30, 128 }, { 6, 31, 128 }, + { 2, 32, 128 }, { 3, 33, 128 }, { 3, 34, 128 }, { 4, 35, 128 }, { 3, 36, 128 }, { 4, 37, 128 }, { 4, 38, 128 }, { 5, 39, 128 }, + { 3, 40, 128 }, { 4, 41, 128 }, { 4, 42, 128 }, { 5, 43, 128 }, { 4, 44, 128 }, { 5, 45, 128 }, { 5, 46, 128 }, { 6, 47, 128 }, + { 3, 48, 128 }, { 4, 49, 128 }, { 4, 50, 128 }, { 5, 51, 128 }, { 4, 52, 128 }, { 5, 53, 128 }, { 5, 54, 128 }, { 6, 55, 128 }, + { 4, 56, 128 }, { 5, 57, 128 }, { 5, 58, 128 }, { 6, 59, 128 }, { 5, 60, 128 }, { 6, 61, 128 }, { 6, 62, 128 }, { 7, 63, 128 }, + { 2, 64, 128 }, { 3, 65, 128 }, { 3, 66, 128 }, { 4, 67, 128 }, { 3, 68, 128 }, { 4, 69, 128 }, { 4, 70, 128 }, { 5, 71, 128 }, + { 3, 72, 128 }, { 4, 73, 128 }, { 4, 74, 128 }, { 5, 75, 128 }, { 4, 76, 128 }, { 5, 77, 128 }, { 5, 78, 128 }, { 6, 79, 128 }, + { 3, 80, 128 }, { 4, 81, 128 }, { 4, 82, 128 }, { 5, 83, 128 }, { 4, 84, 128 }, { 5, 85, 128 }, { 5, 86, 128 }, { 6, 87, 128 }, + { 4, 88, 128 }, { 5, 89, 128 }, { 5, 90, 128 }, { 6, 91, 128 }, { 5, 92, 128 }, { 6, 93, 128 }, { 6, 94, 128 }, { 7, 95, 128 }, + { 3, 96, 128 }, { 4, 97, 128 }, { 4, 98, 128 }, { 5, 99, 128 }, { 4, 100, 128 }, { 5, 101, 128 }, { 5, 102, 128 }, { 6, 103, 128 }, + { 4, 104, 128 }, { 5, 105, 128 }, { 5, 106, 128 }, { 6, 107, 128 }, { 5, 108, 128 }, { 6, 109, 128 }, { 6, 110, 128 }, { 7, 111, 128 }, + { 4, 112, 128 }, { 5, 113, 128 }, { 5, 114, 128 }, { 6, 115, 128 }, { 5, 116, 128 }, { 6, 117, 128 }, { 6, 118, 128 }, { 7, 119, 128 }, + { 5, 120, 128 }, { 6, 121, 128 }, { 6, 122, 128 }, { 7, 123, 128 }, { 6, 124, 128 }, { 7, 125, 128 }, { 7, 126, 128 }, { 8, 127, 128 }, +#if FP_LUT > 8 + { 1, 0, 0 }, { 2, 1, 256 }, { 2, 2, 256 }, { 3, 3, 256 }, { 2, 4, 256 }, { 3, 5, 256 }, { 3, 6, 256 }, { 4, 7, 256 }, + { 2, 8, 256 }, { 3, 9, 256 }, { 3, 10, 256 }, { 4, 11, 256 }, { 3, 12, 256 }, { 4, 13, 256 }, { 4, 14, 256 }, { 5, 15, 256 }, + { 2, 16, 256 }, { 3, 17, 256 }, { 3, 18, 256 }, { 4, 19, 256 }, { 3, 20, 256 }, { 4, 21, 256 }, { 4, 22, 256 }, { 5, 23, 256 }, + { 3, 24, 256 }, { 4, 25, 256 }, { 4, 26, 256 }, { 5, 27, 256 }, { 4, 28, 256 }, { 5, 29, 256 }, { 5, 30, 256 }, { 6, 31, 256 }, + { 2, 32, 256 }, { 3, 33, 256 }, { 3, 34, 256 }, { 4, 35, 256 }, { 3, 36, 256 }, { 4, 37, 256 }, { 4, 38, 256 }, { 5, 39, 256 }, + { 3, 40, 256 }, { 4, 41, 256 }, { 4, 42, 256 }, { 5, 43, 256 }, { 4, 44, 256 }, { 5, 45, 256 }, { 5, 46, 256 }, { 6, 47, 256 }, + { 3, 48, 256 }, { 4, 49, 256 }, { 4, 50, 256 }, { 5, 51, 256 }, { 4, 52, 256 }, { 5, 53, 256 }, { 5, 54, 256 }, { 6, 55, 256 }, + { 4, 56, 256 }, { 5, 57, 256 }, { 5, 58, 256 }, { 6, 59, 256 }, { 5, 60, 256 }, { 6, 61, 256 }, { 6, 62, 256 }, { 7, 63, 256 }, + { 2, 64, 256 }, { 3, 65, 256 }, { 3, 66, 256 }, { 4, 67, 256 }, { 3, 68, 256 }, { 4, 69, 256 }, { 4, 70, 256 }, { 5, 71, 256 }, + { 3, 72, 256 }, { 4, 73, 256 }, { 4, 74, 256 }, { 5, 75, 256 }, { 4, 76, 256 }, { 5, 77, 256 }, { 5, 78, 256 }, { 6, 79, 256 }, + { 3, 80, 256 }, { 4, 81, 256 }, { 4, 82, 256 }, { 5, 83, 256 }, { 4, 84, 256 }, { 5, 85, 256 }, { 5, 86, 256 }, { 6, 87, 256 }, + { 4, 88, 256 }, { 5, 89, 256 }, { 5, 90, 256 }, { 6, 91, 256 }, { 5, 92, 256 }, { 6, 93, 256 }, { 6, 94, 256 }, { 7, 95, 256 }, + { 3, 96, 256 }, { 4, 97, 256 }, { 4, 98, 256 }, { 5, 99, 256 }, { 4, 100, 256 }, { 5, 101, 256 }, { 5, 102, 256 }, { 6, 103, 256 }, + { 4, 104, 256 }, { 5, 105, 256 }, { 5, 106, 256 }, { 6, 107, 256 }, { 5, 108, 256 }, { 6, 109, 256 }, { 6, 110, 256 }, { 7, 111, 256 }, + { 4, 112, 256 }, { 5, 113, 256 }, { 5, 114, 256 }, { 6, 115, 256 }, { 5, 116, 256 }, { 6, 117, 256 }, { 6, 118, 256 }, { 7, 119, 256 }, + { 5, 120, 256 }, { 6, 121, 256 }, { 6, 122, 256 }, { 7, 123, 256 }, { 6, 124, 256 }, { 7, 125, 256 }, { 7, 126, 256 }, { 8, 127, 256 }, + { 2, 128, 256 }, { 3, 129, 256 }, { 3, 130, 256 }, { 4, 131, 256 }, { 3, 132, 256 }, { 4, 133, 256 }, { 4, 134, 256 }, { 5, 135, 256 }, + { 3, 136, 256 }, { 4, 137, 256 }, { 4, 138, 256 }, { 5, 139, 256 }, { 4, 140, 256 }, { 5, 141, 256 }, { 5, 142, 256 }, { 6, 143, 256 }, + { 3, 144, 256 }, { 4, 145, 256 }, { 4, 146, 256 }, { 5, 147, 256 }, { 4, 148, 256 }, { 5, 149, 256 }, { 5, 150, 256 }, { 6, 151, 256 }, + { 4, 152, 256 }, { 5, 153, 256 }, { 5, 154, 256 }, { 6, 155, 256 }, { 5, 156, 256 }, { 6, 157, 256 }, { 6, 158, 256 }, { 7, 159, 256 }, + { 3, 160, 256 }, { 4, 161, 256 }, { 4, 162, 256 }, { 5, 163, 256 }, { 4, 164, 256 }, { 5, 165, 256 }, { 5, 166, 256 }, { 6, 167, 256 }, + { 4, 168, 256 }, { 5, 169, 256 }, { 5, 170, 256 }, { 6, 171, 256 }, { 5, 172, 256 }, { 6, 173, 256 }, { 6, 174, 256 }, { 7, 175, 256 }, + { 4, 176, 256 }, { 5, 177, 256 }, { 5, 178, 256 }, { 6, 179, 256 }, { 5, 180, 256 }, { 6, 181, 256 }, { 6, 182, 256 }, { 7, 183, 256 }, + { 5, 184, 256 }, { 6, 185, 256 }, { 6, 186, 256 }, { 7, 187, 256 }, { 6, 188, 256 }, { 7, 189, 256 }, { 7, 190, 256 }, { 8, 191, 256 }, + { 3, 192, 256 }, { 4, 193, 256 }, { 4, 194, 256 }, { 5, 195, 256 }, { 4, 196, 256 }, { 5, 197, 256 }, { 5, 198, 256 }, { 6, 199, 256 }, + { 4, 200, 256 }, { 5, 201, 256 }, { 5, 202, 256 }, { 6, 203, 256 }, { 5, 204, 256 }, { 6, 205, 256 }, { 6, 206, 256 }, { 7, 207, 256 }, + { 4, 208, 256 }, { 5, 209, 256 }, { 5, 210, 256 }, { 6, 211, 256 }, { 5, 212, 256 }, { 6, 213, 256 }, { 6, 214, 256 }, { 7, 215, 256 }, + { 5, 216, 256 }, { 6, 217, 256 }, { 6, 218, 256 }, { 7, 219, 256 }, { 6, 220, 256 }, { 7, 221, 256 }, { 7, 222, 256 }, { 8, 223, 256 }, + { 4, 224, 256 }, { 5, 225, 256 }, { 5, 226, 256 }, { 6, 227, 256 }, { 5, 228, 256 }, { 6, 229, 256 }, { 6, 230, 256 }, { 7, 231, 256 }, + { 5, 232, 256 }, { 6, 233, 256 }, { 6, 234, 256 }, { 7, 235, 256 }, { 6, 236, 256 }, { 7, 237, 256 }, { 7, 238, 256 }, { 8, 239, 256 }, + { 5, 240, 256 }, { 6, 241, 256 }, { 6, 242, 256 }, { 7, 243, 256 }, { 6, 244, 256 }, { 7, 245, 256 }, { 7, 246, 256 }, { 8, 247, 256 }, + { 6, 248, 256 }, { 7, 249, 256 }, { 7, 250, 256 }, { 8, 251, 256 }, { 7, 252, 256 }, { 8, 253, 256 }, { 8, 254, 256 }, { 9, 255, 256 }, +#if FP_LUT > 9 + { 1, 0, 0 }, { 2, 1, 512 }, { 2, 2, 512 }, { 3, 3, 512 }, { 2, 4, 512 }, { 3, 5, 512 }, { 3, 6, 512 }, { 4, 7, 512 }, + { 2, 8, 512 }, { 3, 9, 512 }, { 3, 10, 512 }, { 4, 11, 512 }, { 3, 12, 512 }, { 4, 13, 512 }, { 4, 14, 512 }, { 5, 15, 512 }, + { 2, 16, 512 }, { 3, 17, 512 }, { 3, 18, 512 }, { 4, 19, 512 }, { 3, 20, 512 }, { 4, 21, 512 }, { 4, 22, 512 }, { 5, 23, 512 }, + { 3, 24, 512 }, { 4, 25, 512 }, { 4, 26, 512 }, { 5, 27, 512 }, { 4, 28, 512 }, { 5, 29, 512 }, { 5, 30, 512 }, { 6, 31, 512 }, + { 2, 32, 512 }, { 3, 33, 512 }, { 3, 34, 512 }, { 4, 35, 512 }, { 3, 36, 512 }, { 4, 37, 512 }, { 4, 38, 512 }, { 5, 39, 512 }, + { 3, 40, 512 }, { 4, 41, 512 }, { 4, 42, 512 }, { 5, 43, 512 }, { 4, 44, 512 }, { 5, 45, 512 }, { 5, 46, 512 }, { 6, 47, 512 }, + { 3, 48, 512 }, { 4, 49, 512 }, { 4, 50, 512 }, { 5, 51, 512 }, { 4, 52, 512 }, { 5, 53, 512 }, { 5, 54, 512 }, { 6, 55, 512 }, + { 4, 56, 512 }, { 5, 57, 512 }, { 5, 58, 512 }, { 6, 59, 512 }, { 5, 60, 512 }, { 6, 61, 512 }, { 6, 62, 512 }, { 7, 63, 512 }, + { 2, 64, 512 }, { 3, 65, 512 }, { 3, 66, 512 }, { 4, 67, 512 }, { 3, 68, 512 }, { 4, 69, 512 }, { 4, 70, 512 }, { 5, 71, 512 }, + { 3, 72, 512 }, { 4, 73, 512 }, { 4, 74, 512 }, { 5, 75, 512 }, { 4, 76, 512 }, { 5, 77, 512 }, { 5, 78, 512 }, { 6, 79, 512 }, + { 3, 80, 512 }, { 4, 81, 512 }, { 4, 82, 512 }, { 5, 83, 512 }, { 4, 84, 512 }, { 5, 85, 512 }, { 5, 86, 512 }, { 6, 87, 512 }, + { 4, 88, 512 }, { 5, 89, 512 }, { 5, 90, 512 }, { 6, 91, 512 }, { 5, 92, 512 }, { 6, 93, 512 }, { 6, 94, 512 }, { 7, 95, 512 }, + { 3, 96, 512 }, { 4, 97, 512 }, { 4, 98, 512 }, { 5, 99, 512 }, { 4, 100, 512 }, { 5, 101, 512 }, { 5, 102, 512 }, { 6, 103, 512 }, + { 4, 104, 512 }, { 5, 105, 512 }, { 5, 106, 512 }, { 6, 107, 512 }, { 5, 108, 512 }, { 6, 109, 512 }, { 6, 110, 512 }, { 7, 111, 512 }, + { 4, 112, 512 }, { 5, 113, 512 }, { 5, 114, 512 }, { 6, 115, 512 }, { 5, 116, 512 }, { 6, 117, 512 }, { 6, 118, 512 }, { 7, 119, 512 }, + { 5, 120, 512 }, { 6, 121, 512 }, { 6, 122, 512 }, { 7, 123, 512 }, { 6, 124, 512 }, { 7, 125, 512 }, { 7, 126, 512 }, { 8, 127, 512 }, + { 2, 128, 512 }, { 3, 129, 512 }, { 3, 130, 512 }, { 4, 131, 512 }, { 3, 132, 512 }, { 4, 133, 512 }, { 4, 134, 512 }, { 5, 135, 512 }, + { 3, 136, 512 }, { 4, 137, 512 }, { 4, 138, 512 }, { 5, 139, 512 }, { 4, 140, 512 }, { 5, 141, 512 }, { 5, 142, 512 }, { 6, 143, 512 }, + { 3, 144, 512 }, { 4, 145, 512 }, { 4, 146, 512 }, { 5, 147, 512 }, { 4, 148, 512 }, { 5, 149, 512 }, { 5, 150, 512 }, { 6, 151, 512 }, + { 4, 152, 512 }, { 5, 153, 512 }, { 5, 154, 512 }, { 6, 155, 512 }, { 5, 156, 512 }, { 6, 157, 512 }, { 6, 158, 512 }, { 7, 159, 512 }, + { 3, 160, 512 }, { 4, 161, 512 }, { 4, 162, 512 }, { 5, 163, 512 }, { 4, 164, 512 }, { 5, 165, 512 }, { 5, 166, 512 }, { 6, 167, 512 }, + { 4, 168, 512 }, { 5, 169, 512 }, { 5, 170, 512 }, { 6, 171, 512 }, { 5, 172, 512 }, { 6, 173, 512 }, { 6, 174, 512 }, { 7, 175, 512 }, + { 4, 176, 512 }, { 5, 177, 512 }, { 5, 178, 512 }, { 6, 179, 512 }, { 5, 180, 512 }, { 6, 181, 512 }, { 6, 182, 512 }, { 7, 183, 512 }, + { 5, 184, 512 }, { 6, 185, 512 }, { 6, 186, 512 }, { 7, 187, 512 }, { 6, 188, 512 }, { 7, 189, 512 }, { 7, 190, 512 }, { 8, 191, 512 }, + { 3, 192, 512 }, { 4, 193, 512 }, { 4, 194, 512 }, { 5, 195, 512 }, { 4, 196, 512 }, { 5, 197, 512 }, { 5, 198, 512 }, { 6, 199, 512 }, + { 4, 200, 512 }, { 5, 201, 512 }, { 5, 202, 512 }, { 6, 203, 512 }, { 5, 204, 512 }, { 6, 205, 512 }, { 6, 206, 512 }, { 7, 207, 512 }, + { 4, 208, 512 }, { 5, 209, 512 }, { 5, 210, 512 }, { 6, 211, 512 }, { 5, 212, 512 }, { 6, 213, 512 }, { 6, 214, 512 }, { 7, 215, 512 }, + { 5, 216, 512 }, { 6, 217, 512 }, { 6, 218, 512 }, { 7, 219, 512 }, { 6, 220, 512 }, { 7, 221, 512 }, { 7, 222, 512 }, { 8, 223, 512 }, + { 4, 224, 512 }, { 5, 225, 512 }, { 5, 226, 512 }, { 6, 227, 512 }, { 5, 228, 512 }, { 6, 229, 512 }, { 6, 230, 512 }, { 7, 231, 512 }, + { 5, 232, 512 }, { 6, 233, 512 }, { 6, 234, 512 }, { 7, 235, 512 }, { 6, 236, 512 }, { 7, 237, 512 }, { 7, 238, 512 }, { 8, 239, 512 }, + { 5, 240, 512 }, { 6, 241, 512 }, { 6, 242, 512 }, { 7, 243, 512 }, { 6, 244, 512 }, { 7, 245, 512 }, { 7, 246, 512 }, { 8, 247, 512 }, + { 6, 248, 512 }, { 7, 249, 512 }, { 7, 250, 512 }, { 8, 251, 512 }, { 7, 252, 512 }, { 8, 253, 512 }, { 8, 254, 512 }, { 9, 255, 512 }, + { 2, 256, 512 }, { 3, 257, 512 }, { 3, 258, 512 }, { 4, 259, 512 }, { 3, 260, 512 }, { 4, 261, 512 }, { 4, 262, 512 }, { 5, 263, 512 }, + { 3, 264, 512 }, { 4, 265, 512 }, { 4, 266, 512 }, { 5, 267, 512 }, { 4, 268, 512 }, { 5, 269, 512 }, { 5, 270, 512 }, { 6, 271, 512 }, + { 3, 272, 512 }, { 4, 273, 512 }, { 4, 274, 512 }, { 5, 275, 512 }, { 4, 276, 512 }, { 5, 277, 512 }, { 5, 278, 512 }, { 6, 279, 512 }, + { 4, 280, 512 }, { 5, 281, 512 }, { 5, 282, 512 }, { 6, 283, 512 }, { 5, 284, 512 }, { 6, 285, 512 }, { 6, 286, 512 }, { 7, 287, 512 }, + { 3, 288, 512 }, { 4, 289, 512 }, { 4, 290, 512 }, { 5, 291, 512 }, { 4, 292, 512 }, { 5, 293, 512 }, { 5, 294, 512 }, { 6, 295, 512 }, + { 4, 296, 512 }, { 5, 297, 512 }, { 5, 298, 512 }, { 6, 299, 512 }, { 5, 300, 512 }, { 6, 301, 512 }, { 6, 302, 512 }, { 7, 303, 512 }, + { 4, 304, 512 }, { 5, 305, 512 }, { 5, 306, 512 }, { 6, 307, 512 }, { 5, 308, 512 }, { 6, 309, 512 }, { 6, 310, 512 }, { 7, 311, 512 }, + { 5, 312, 512 }, { 6, 313, 512 }, { 6, 314, 512 }, { 7, 315, 512 }, { 6, 316, 512 }, { 7, 317, 512 }, { 7, 318, 512 }, { 8, 319, 512 }, + { 3, 320, 512 }, { 4, 321, 512 }, { 4, 322, 512 }, { 5, 323, 512 }, { 4, 324, 512 }, { 5, 325, 512 }, { 5, 326, 512 }, { 6, 327, 512 }, + { 4, 328, 512 }, { 5, 329, 512 }, { 5, 330, 512 }, { 6, 331, 512 }, { 5, 332, 512 }, { 6, 333, 512 }, { 6, 334, 512 }, { 7, 335, 512 }, + { 4, 336, 512 }, { 5, 337, 512 }, { 5, 338, 512 }, { 6, 339, 512 }, { 5, 340, 512 }, { 6, 341, 512 }, { 6, 342, 512 }, { 7, 343, 512 }, + { 5, 344, 512 }, { 6, 345, 512 }, { 6, 346, 512 }, { 7, 347, 512 }, { 6, 348, 512 }, { 7, 349, 512 }, { 7, 350, 512 }, { 8, 351, 512 }, + { 4, 352, 512 }, { 5, 353, 512 }, { 5, 354, 512 }, { 6, 355, 512 }, { 5, 356, 512 }, { 6, 357, 512 }, { 6, 358, 512 }, { 7, 359, 512 }, + { 5, 360, 512 }, { 6, 361, 512 }, { 6, 362, 512 }, { 7, 363, 512 }, { 6, 364, 512 }, { 7, 365, 512 }, { 7, 366, 512 }, { 8, 367, 512 }, + { 5, 368, 512 }, { 6, 369, 512 }, { 6, 370, 512 }, { 7, 371, 512 }, { 6, 372, 512 }, { 7, 373, 512 }, { 7, 374, 512 }, { 8, 375, 512 }, + { 6, 376, 512 }, { 7, 377, 512 }, { 7, 378, 512 }, { 8, 379, 512 }, { 7, 380, 512 }, { 8, 381, 512 }, { 8, 382, 512 }, { 9, 383, 512 }, + { 3, 384, 512 }, { 4, 385, 512 }, { 4, 386, 512 }, { 5, 387, 512 }, { 4, 388, 512 }, { 5, 389, 512 }, { 5, 390, 512 }, { 6, 391, 512 }, + { 4, 392, 512 }, { 5, 393, 512 }, { 5, 394, 512 }, { 6, 395, 512 }, { 5, 396, 512 }, { 6, 397, 512 }, { 6, 398, 512 }, { 7, 399, 512 }, + { 4, 400, 512 }, { 5, 401, 512 }, { 5, 402, 512 }, { 6, 403, 512 }, { 5, 404, 512 }, { 6, 405, 512 }, { 6, 406, 512 }, { 7, 407, 512 }, + { 5, 408, 512 }, { 6, 409, 512 }, { 6, 410, 512 }, { 7, 411, 512 }, { 6, 412, 512 }, { 7, 413, 512 }, { 7, 414, 512 }, { 8, 415, 512 }, + { 4, 416, 512 }, { 5, 417, 512 }, { 5, 418, 512 }, { 6, 419, 512 }, { 5, 420, 512 }, { 6, 421, 512 }, { 6, 422, 512 }, { 7, 423, 512 }, + { 5, 424, 512 }, { 6, 425, 512 }, { 6, 426, 512 }, { 7, 427, 512 }, { 6, 428, 512 }, { 7, 429, 512 }, { 7, 430, 512 }, { 8, 431, 512 }, + { 5, 432, 512 }, { 6, 433, 512 }, { 6, 434, 512 }, { 7, 435, 512 }, { 6, 436, 512 }, { 7, 437, 512 }, { 7, 438, 512 }, { 8, 439, 512 }, + { 6, 440, 512 }, { 7, 441, 512 }, { 7, 442, 512 }, { 8, 443, 512 }, { 7, 444, 512 }, { 8, 445, 512 }, { 8, 446, 512 }, { 9, 447, 512 }, + { 4, 448, 512 }, { 5, 449, 512 }, { 5, 450, 512 }, { 6, 451, 512 }, { 5, 452, 512 }, { 6, 453, 512 }, { 6, 454, 512 }, { 7, 455, 512 }, + { 5, 456, 512 }, { 6, 457, 512 }, { 6, 458, 512 }, { 7, 459, 512 }, { 6, 460, 512 }, { 7, 461, 512 }, { 7, 462, 512 }, { 8, 463, 512 }, + { 5, 464, 512 }, { 6, 465, 512 }, { 6, 466, 512 }, { 7, 467, 512 }, { 6, 468, 512 }, { 7, 469, 512 }, { 7, 470, 512 }, { 8, 471, 512 }, + { 6, 472, 512 }, { 7, 473, 512 }, { 7, 474, 512 }, { 8, 475, 512 }, { 7, 476, 512 }, { 8, 477, 512 }, { 8, 478, 512 }, { 9, 479, 512 }, + { 5, 480, 512 }, { 6, 481, 512 }, { 6, 482, 512 }, { 7, 483, 512 }, { 6, 484, 512 }, { 7, 485, 512 }, { 7, 486, 512 }, { 8, 487, 512 }, + { 6, 488, 512 }, { 7, 489, 512 }, { 7, 490, 512 }, { 8, 491, 512 }, { 7, 492, 512 }, { 8, 493, 512 }, { 8, 494, 512 }, { 9, 495, 512 }, + { 6, 496, 512 }, { 7, 497, 512 }, { 7, 498, 512 }, { 8, 499, 512 }, { 7, 500, 512 }, { 8, 501, 512 }, { 8, 502, 512 }, { 9, 503, 512 }, + { 7, 504, 512 }, { 8, 505, 512 }, { 8, 506, 512 }, { 9, 507, 512 }, { 8, 508, 512 }, { 9, 509, 512 }, { 9, 510, 512 }, { 10, 511, 512 }, +#if FP_LUT > 10 + { 1, 0, 0 }, { 2, 1, 1024 }, { 2, 2, 1024 }, { 3, 3, 1024 }, { 2, 4, 1024 }, { 3, 5, 1024 }, { 3, 6, 1024 }, { 4, 7, 1024 }, + { 2, 8, 1024 }, { 3, 9, 1024 }, { 3, 10, 1024 }, { 4, 11, 1024 }, { 3, 12, 1024 }, { 4, 13, 1024 }, { 4, 14, 1024 }, { 5, 15, 1024 }, + { 2, 16, 1024 }, { 3, 17, 1024 }, { 3, 18, 1024 }, { 4, 19, 1024 }, { 3, 20, 1024 }, { 4, 21, 1024 }, { 4, 22, 1024 }, { 5, 23, 1024 }, + { 3, 24, 1024 }, { 4, 25, 1024 }, { 4, 26, 1024 }, { 5, 27, 1024 }, { 4, 28, 1024 }, { 5, 29, 1024 }, { 5, 30, 1024 }, { 6, 31, 1024 }, + { 2, 32, 1024 }, { 3, 33, 1024 }, { 3, 34, 1024 }, { 4, 35, 1024 }, { 3, 36, 1024 }, { 4, 37, 1024 }, { 4, 38, 1024 }, { 5, 39, 1024 }, + { 3, 40, 1024 }, { 4, 41, 1024 }, { 4, 42, 1024 }, { 5, 43, 1024 }, { 4, 44, 1024 }, { 5, 45, 1024 }, { 5, 46, 1024 }, { 6, 47, 1024 }, + { 3, 48, 1024 }, { 4, 49, 1024 }, { 4, 50, 1024 }, { 5, 51, 1024 }, { 4, 52, 1024 }, { 5, 53, 1024 }, { 5, 54, 1024 }, { 6, 55, 1024 }, + { 4, 56, 1024 }, { 5, 57, 1024 }, { 5, 58, 1024 }, { 6, 59, 1024 }, { 5, 60, 1024 }, { 6, 61, 1024 }, { 6, 62, 1024 }, { 7, 63, 1024 }, + { 2, 64, 1024 }, { 3, 65, 1024 }, { 3, 66, 1024 }, { 4, 67, 1024 }, { 3, 68, 1024 }, { 4, 69, 1024 }, { 4, 70, 1024 }, { 5, 71, 1024 }, + { 3, 72, 1024 }, { 4, 73, 1024 }, { 4, 74, 1024 }, { 5, 75, 1024 }, { 4, 76, 1024 }, { 5, 77, 1024 }, { 5, 78, 1024 }, { 6, 79, 1024 }, + { 3, 80, 1024 }, { 4, 81, 1024 }, { 4, 82, 1024 }, { 5, 83, 1024 }, { 4, 84, 1024 }, { 5, 85, 1024 }, { 5, 86, 1024 }, { 6, 87, 1024 }, + { 4, 88, 1024 }, { 5, 89, 1024 }, { 5, 90, 1024 }, { 6, 91, 1024 }, { 5, 92, 1024 }, { 6, 93, 1024 }, { 6, 94, 1024 }, { 7, 95, 1024 }, + { 3, 96, 1024 }, { 4, 97, 1024 }, { 4, 98, 1024 }, { 5, 99, 1024 }, { 4, 100, 1024 }, { 5, 101, 1024 }, { 5, 102, 1024 }, { 6, 103, 1024 }, + { 4, 104, 1024 }, { 5, 105, 1024 }, { 5, 106, 1024 }, { 6, 107, 1024 }, { 5, 108, 1024 }, { 6, 109, 1024 }, { 6, 110, 1024 }, { 7, 111, 1024 }, + { 4, 112, 1024 }, { 5, 113, 1024 }, { 5, 114, 1024 }, { 6, 115, 1024 }, { 5, 116, 1024 }, { 6, 117, 1024 }, { 6, 118, 1024 }, { 7, 119, 1024 }, + { 5, 120, 1024 }, { 6, 121, 1024 }, { 6, 122, 1024 }, { 7, 123, 1024 }, { 6, 124, 1024 }, { 7, 125, 1024 }, { 7, 126, 1024 }, { 8, 127, 1024 }, + { 2, 128, 1024 }, { 3, 129, 1024 }, { 3, 130, 1024 }, { 4, 131, 1024 }, { 3, 132, 1024 }, { 4, 133, 1024 }, { 4, 134, 1024 }, { 5, 135, 1024 }, + { 3, 136, 1024 }, { 4, 137, 1024 }, { 4, 138, 1024 }, { 5, 139, 1024 }, { 4, 140, 1024 }, { 5, 141, 1024 }, { 5, 142, 1024 }, { 6, 143, 1024 }, + { 3, 144, 1024 }, { 4, 145, 1024 }, { 4, 146, 1024 }, { 5, 147, 1024 }, { 4, 148, 1024 }, { 5, 149, 1024 }, { 5, 150, 1024 }, { 6, 151, 1024 }, + { 4, 152, 1024 }, { 5, 153, 1024 }, { 5, 154, 1024 }, { 6, 155, 1024 }, { 5, 156, 1024 }, { 6, 157, 1024 }, { 6, 158, 1024 }, { 7, 159, 1024 }, + { 3, 160, 1024 }, { 4, 161, 1024 }, { 4, 162, 1024 }, { 5, 163, 1024 }, { 4, 164, 1024 }, { 5, 165, 1024 }, { 5, 166, 1024 }, { 6, 167, 1024 }, + { 4, 168, 1024 }, { 5, 169, 1024 }, { 5, 170, 1024 }, { 6, 171, 1024 }, { 5, 172, 1024 }, { 6, 173, 1024 }, { 6, 174, 1024 }, { 7, 175, 1024 }, + { 4, 176, 1024 }, { 5, 177, 1024 }, { 5, 178, 1024 }, { 6, 179, 1024 }, { 5, 180, 1024 }, { 6, 181, 1024 }, { 6, 182, 1024 }, { 7, 183, 1024 }, + { 5, 184, 1024 }, { 6, 185, 1024 }, { 6, 186, 1024 }, { 7, 187, 1024 }, { 6, 188, 1024 }, { 7, 189, 1024 }, { 7, 190, 1024 }, { 8, 191, 1024 }, + { 3, 192, 1024 }, { 4, 193, 1024 }, { 4, 194, 1024 }, { 5, 195, 1024 }, { 4, 196, 1024 }, { 5, 197, 1024 }, { 5, 198, 1024 }, { 6, 199, 1024 }, + { 4, 200, 1024 }, { 5, 201, 1024 }, { 5, 202, 1024 }, { 6, 203, 1024 }, { 5, 204, 1024 }, { 6, 205, 1024 }, { 6, 206, 1024 }, { 7, 207, 1024 }, + { 4, 208, 1024 }, { 5, 209, 1024 }, { 5, 210, 1024 }, { 6, 211, 1024 }, { 5, 212, 1024 }, { 6, 213, 1024 }, { 6, 214, 1024 }, { 7, 215, 1024 }, + { 5, 216, 1024 }, { 6, 217, 1024 }, { 6, 218, 1024 }, { 7, 219, 1024 }, { 6, 220, 1024 }, { 7, 221, 1024 }, { 7, 222, 1024 }, { 8, 223, 1024 }, + { 4, 224, 1024 }, { 5, 225, 1024 }, { 5, 226, 1024 }, { 6, 227, 1024 }, { 5, 228, 1024 }, { 6, 229, 1024 }, { 6, 230, 1024 }, { 7, 231, 1024 }, + { 5, 232, 1024 }, { 6, 233, 1024 }, { 6, 234, 1024 }, { 7, 235, 1024 }, { 6, 236, 1024 }, { 7, 237, 1024 }, { 7, 238, 1024 }, { 8, 239, 1024 }, + { 5, 240, 1024 }, { 6, 241, 1024 }, { 6, 242, 1024 }, { 7, 243, 1024 }, { 6, 244, 1024 }, { 7, 245, 1024 }, { 7, 246, 1024 }, { 8, 247, 1024 }, + { 6, 248, 1024 }, { 7, 249, 1024 }, { 7, 250, 1024 }, { 8, 251, 1024 }, { 7, 252, 1024 }, { 8, 253, 1024 }, { 8, 254, 1024 }, { 9, 255, 1024 }, + { 2, 256, 1024 }, { 3, 257, 1024 }, { 3, 258, 1024 }, { 4, 259, 1024 }, { 3, 260, 1024 }, { 4, 261, 1024 }, { 4, 262, 1024 }, { 5, 263, 1024 }, + { 3, 264, 1024 }, { 4, 265, 1024 }, { 4, 266, 1024 }, { 5, 267, 1024 }, { 4, 268, 1024 }, { 5, 269, 1024 }, { 5, 270, 1024 }, { 6, 271, 1024 }, + { 3, 272, 1024 }, { 4, 273, 1024 }, { 4, 274, 1024 }, { 5, 275, 1024 }, { 4, 276, 1024 }, { 5, 277, 1024 }, { 5, 278, 1024 }, { 6, 279, 1024 }, + { 4, 280, 1024 }, { 5, 281, 1024 }, { 5, 282, 1024 }, { 6, 283, 1024 }, { 5, 284, 1024 }, { 6, 285, 1024 }, { 6, 286, 1024 }, { 7, 287, 1024 }, + { 3, 288, 1024 }, { 4, 289, 1024 }, { 4, 290, 1024 }, { 5, 291, 1024 }, { 4, 292, 1024 }, { 5, 293, 1024 }, { 5, 294, 1024 }, { 6, 295, 1024 }, + { 4, 296, 1024 }, { 5, 297, 1024 }, { 5, 298, 1024 }, { 6, 299, 1024 }, { 5, 300, 1024 }, { 6, 301, 1024 }, { 6, 302, 1024 }, { 7, 303, 1024 }, + { 4, 304, 1024 }, { 5, 305, 1024 }, { 5, 306, 1024 }, { 6, 307, 1024 }, { 5, 308, 1024 }, { 6, 309, 1024 }, { 6, 310, 1024 }, { 7, 311, 1024 }, + { 5, 312, 1024 }, { 6, 313, 1024 }, { 6, 314, 1024 }, { 7, 315, 1024 }, { 6, 316, 1024 }, { 7, 317, 1024 }, { 7, 318, 1024 }, { 8, 319, 1024 }, + { 3, 320, 1024 }, { 4, 321, 1024 }, { 4, 322, 1024 }, { 5, 323, 1024 }, { 4, 324, 1024 }, { 5, 325, 1024 }, { 5, 326, 1024 }, { 6, 327, 1024 }, + { 4, 328, 1024 }, { 5, 329, 1024 }, { 5, 330, 1024 }, { 6, 331, 1024 }, { 5, 332, 1024 }, { 6, 333, 1024 }, { 6, 334, 1024 }, { 7, 335, 1024 }, + { 4, 336, 1024 }, { 5, 337, 1024 }, { 5, 338, 1024 }, { 6, 339, 1024 }, { 5, 340, 1024 }, { 6, 341, 1024 }, { 6, 342, 1024 }, { 7, 343, 1024 }, + { 5, 344, 1024 }, { 6, 345, 1024 }, { 6, 346, 1024 }, { 7, 347, 1024 }, { 6, 348, 1024 }, { 7, 349, 1024 }, { 7, 350, 1024 }, { 8, 351, 1024 }, + { 4, 352, 1024 }, { 5, 353, 1024 }, { 5, 354, 1024 }, { 6, 355, 1024 }, { 5, 356, 1024 }, { 6, 357, 1024 }, { 6, 358, 1024 }, { 7, 359, 1024 }, + { 5, 360, 1024 }, { 6, 361, 1024 }, { 6, 362, 1024 }, { 7, 363, 1024 }, { 6, 364, 1024 }, { 7, 365, 1024 }, { 7, 366, 1024 }, { 8, 367, 1024 }, + { 5, 368, 1024 }, { 6, 369, 1024 }, { 6, 370, 1024 }, { 7, 371, 1024 }, { 6, 372, 1024 }, { 7, 373, 1024 }, { 7, 374, 1024 }, { 8, 375, 1024 }, + { 6, 376, 1024 }, { 7, 377, 1024 }, { 7, 378, 1024 }, { 8, 379, 1024 }, { 7, 380, 1024 }, { 8, 381, 1024 }, { 8, 382, 1024 }, { 9, 383, 1024 }, + { 3, 384, 1024 }, { 4, 385, 1024 }, { 4, 386, 1024 }, { 5, 387, 1024 }, { 4, 388, 1024 }, { 5, 389, 1024 }, { 5, 390, 1024 }, { 6, 391, 1024 }, + { 4, 392, 1024 }, { 5, 393, 1024 }, { 5, 394, 1024 }, { 6, 395, 1024 }, { 5, 396, 1024 }, { 6, 397, 1024 }, { 6, 398, 1024 }, { 7, 399, 1024 }, + { 4, 400, 1024 }, { 5, 401, 1024 }, { 5, 402, 1024 }, { 6, 403, 1024 }, { 5, 404, 1024 }, { 6, 405, 1024 }, { 6, 406, 1024 }, { 7, 407, 1024 }, + { 5, 408, 1024 }, { 6, 409, 1024 }, { 6, 410, 1024 }, { 7, 411, 1024 }, { 6, 412, 1024 }, { 7, 413, 1024 }, { 7, 414, 1024 }, { 8, 415, 1024 }, + { 4, 416, 1024 }, { 5, 417, 1024 }, { 5, 418, 1024 }, { 6, 419, 1024 }, { 5, 420, 1024 }, { 6, 421, 1024 }, { 6, 422, 1024 }, { 7, 423, 1024 }, + { 5, 424, 1024 }, { 6, 425, 1024 }, { 6, 426, 1024 }, { 7, 427, 1024 }, { 6, 428, 1024 }, { 7, 429, 1024 }, { 7, 430, 1024 }, { 8, 431, 1024 }, + { 5, 432, 1024 }, { 6, 433, 1024 }, { 6, 434, 1024 }, { 7, 435, 1024 }, { 6, 436, 1024 }, { 7, 437, 1024 }, { 7, 438, 1024 }, { 8, 439, 1024 }, + { 6, 440, 1024 }, { 7, 441, 1024 }, { 7, 442, 1024 }, { 8, 443, 1024 }, { 7, 444, 1024 }, { 8, 445, 1024 }, { 8, 446, 1024 }, { 9, 447, 1024 }, + { 4, 448, 1024 }, { 5, 449, 1024 }, { 5, 450, 1024 }, { 6, 451, 1024 }, { 5, 452, 1024 }, { 6, 453, 1024 }, { 6, 454, 1024 }, { 7, 455, 1024 }, + { 5, 456, 1024 }, { 6, 457, 1024 }, { 6, 458, 1024 }, { 7, 459, 1024 }, { 6, 460, 1024 }, { 7, 461, 1024 }, { 7, 462, 1024 }, { 8, 463, 1024 }, + { 5, 464, 1024 }, { 6, 465, 1024 }, { 6, 466, 1024 }, { 7, 467, 1024 }, { 6, 468, 1024 }, { 7, 469, 1024 }, { 7, 470, 1024 }, { 8, 471, 1024 }, + { 6, 472, 1024 }, { 7, 473, 1024 }, { 7, 474, 1024 }, { 8, 475, 1024 }, { 7, 476, 1024 }, { 8, 477, 1024 }, { 8, 478, 1024 }, { 9, 479, 1024 }, + { 5, 480, 1024 }, { 6, 481, 1024 }, { 6, 482, 1024 }, { 7, 483, 1024 }, { 6, 484, 1024 }, { 7, 485, 1024 }, { 7, 486, 1024 }, { 8, 487, 1024 }, + { 6, 488, 1024 }, { 7, 489, 1024 }, { 7, 490, 1024 }, { 8, 491, 1024 }, { 7, 492, 1024 }, { 8, 493, 1024 }, { 8, 494, 1024 }, { 9, 495, 1024 }, + { 6, 496, 1024 }, { 7, 497, 1024 }, { 7, 498, 1024 }, { 8, 499, 1024 }, { 7, 500, 1024 }, { 8, 501, 1024 }, { 8, 502, 1024 }, { 9, 503, 1024 }, + { 7, 504, 1024 }, { 8, 505, 1024 }, { 8, 506, 1024 }, { 9, 507, 1024 }, { 8, 508, 1024 }, { 9, 509, 1024 }, { 9, 510, 1024 }, { 10, 511, 1024 }, + { 2, 512, 1024 }, { 3, 513, 1024 }, { 3, 514, 1024 }, { 4, 515, 1024 }, { 3, 516, 1024 }, { 4, 517, 1024 }, { 4, 518, 1024 }, { 5, 519, 1024 }, + { 3, 520, 1024 }, { 4, 521, 1024 }, { 4, 522, 1024 }, { 5, 523, 1024 }, { 4, 524, 1024 }, { 5, 525, 1024 }, { 5, 526, 1024 }, { 6, 527, 1024 }, + { 3, 528, 1024 }, { 4, 529, 1024 }, { 4, 530, 1024 }, { 5, 531, 1024 }, { 4, 532, 1024 }, { 5, 533, 1024 }, { 5, 534, 1024 }, { 6, 535, 1024 }, + { 4, 536, 1024 }, { 5, 537, 1024 }, { 5, 538, 1024 }, { 6, 539, 1024 }, { 5, 540, 1024 }, { 6, 541, 1024 }, { 6, 542, 1024 }, { 7, 543, 1024 }, + { 3, 544, 1024 }, { 4, 545, 1024 }, { 4, 546, 1024 }, { 5, 547, 1024 }, { 4, 548, 1024 }, { 5, 549, 1024 }, { 5, 550, 1024 }, { 6, 551, 1024 }, + { 4, 552, 1024 }, { 5, 553, 1024 }, { 5, 554, 1024 }, { 6, 555, 1024 }, { 5, 556, 1024 }, { 6, 557, 1024 }, { 6, 558, 1024 }, { 7, 559, 1024 }, + { 4, 560, 1024 }, { 5, 561, 1024 }, { 5, 562, 1024 }, { 6, 563, 1024 }, { 5, 564, 1024 }, { 6, 565, 1024 }, { 6, 566, 1024 }, { 7, 567, 1024 }, + { 5, 568, 1024 }, { 6, 569, 1024 }, { 6, 570, 1024 }, { 7, 571, 1024 }, { 6, 572, 1024 }, { 7, 573, 1024 }, { 7, 574, 1024 }, { 8, 575, 1024 }, + { 3, 576, 1024 }, { 4, 577, 1024 }, { 4, 578, 1024 }, { 5, 579, 1024 }, { 4, 580, 1024 }, { 5, 581, 1024 }, { 5, 582, 1024 }, { 6, 583, 1024 }, + { 4, 584, 1024 }, { 5, 585, 1024 }, { 5, 586, 1024 }, { 6, 587, 1024 }, { 5, 588, 1024 }, { 6, 589, 1024 }, { 6, 590, 1024 }, { 7, 591, 1024 }, + { 4, 592, 1024 }, { 5, 593, 1024 }, { 5, 594, 1024 }, { 6, 595, 1024 }, { 5, 596, 1024 }, { 6, 597, 1024 }, { 6, 598, 1024 }, { 7, 599, 1024 }, + { 5, 600, 1024 }, { 6, 601, 1024 }, { 6, 602, 1024 }, { 7, 603, 1024 }, { 6, 604, 1024 }, { 7, 605, 1024 }, { 7, 606, 1024 }, { 8, 607, 1024 }, + { 4, 608, 1024 }, { 5, 609, 1024 }, { 5, 610, 1024 }, { 6, 611, 1024 }, { 5, 612, 1024 }, { 6, 613, 1024 }, { 6, 614, 1024 }, { 7, 615, 1024 }, + { 5, 616, 1024 }, { 6, 617, 1024 }, { 6, 618, 1024 }, { 7, 619, 1024 }, { 6, 620, 1024 }, { 7, 621, 1024 }, { 7, 622, 1024 }, { 8, 623, 1024 }, + { 5, 624, 1024 }, { 6, 625, 1024 }, { 6, 626, 1024 }, { 7, 627, 1024 }, { 6, 628, 1024 }, { 7, 629, 1024 }, { 7, 630, 1024 }, { 8, 631, 1024 }, + { 6, 632, 1024 }, { 7, 633, 1024 }, { 7, 634, 1024 }, { 8, 635, 1024 }, { 7, 636, 1024 }, { 8, 637, 1024 }, { 8, 638, 1024 }, { 9, 639, 1024 }, + { 3, 640, 1024 }, { 4, 641, 1024 }, { 4, 642, 1024 }, { 5, 643, 1024 }, { 4, 644, 1024 }, { 5, 645, 1024 }, { 5, 646, 1024 }, { 6, 647, 1024 }, + { 4, 648, 1024 }, { 5, 649, 1024 }, { 5, 650, 1024 }, { 6, 651, 1024 }, { 5, 652, 1024 }, { 6, 653, 1024 }, { 6, 654, 1024 }, { 7, 655, 1024 }, + { 4, 656, 1024 }, { 5, 657, 1024 }, { 5, 658, 1024 }, { 6, 659, 1024 }, { 5, 660, 1024 }, { 6, 661, 1024 }, { 6, 662, 1024 }, { 7, 663, 1024 }, + { 5, 664, 1024 }, { 6, 665, 1024 }, { 6, 666, 1024 }, { 7, 667, 1024 }, { 6, 668, 1024 }, { 7, 669, 1024 }, { 7, 670, 1024 }, { 8, 671, 1024 }, + { 4, 672, 1024 }, { 5, 673, 1024 }, { 5, 674, 1024 }, { 6, 675, 1024 }, { 5, 676, 1024 }, { 6, 677, 1024 }, { 6, 678, 1024 }, { 7, 679, 1024 }, + { 5, 680, 1024 }, { 6, 681, 1024 }, { 6, 682, 1024 }, { 7, 683, 1024 }, { 6, 684, 1024 }, { 7, 685, 1024 }, { 7, 686, 1024 }, { 8, 687, 1024 }, + { 5, 688, 1024 }, { 6, 689, 1024 }, { 6, 690, 1024 }, { 7, 691, 1024 }, { 6, 692, 1024 }, { 7, 693, 1024 }, { 7, 694, 1024 }, { 8, 695, 1024 }, + { 6, 696, 1024 }, { 7, 697, 1024 }, { 7, 698, 1024 }, { 8, 699, 1024 }, { 7, 700, 1024 }, { 8, 701, 1024 }, { 8, 702, 1024 }, { 9, 703, 1024 }, + { 4, 704, 1024 }, { 5, 705, 1024 }, { 5, 706, 1024 }, { 6, 707, 1024 }, { 5, 708, 1024 }, { 6, 709, 1024 }, { 6, 710, 1024 }, { 7, 711, 1024 }, + { 5, 712, 1024 }, { 6, 713, 1024 }, { 6, 714, 1024 }, { 7, 715, 1024 }, { 6, 716, 1024 }, { 7, 717, 1024 }, { 7, 718, 1024 }, { 8, 719, 1024 }, + { 5, 720, 1024 }, { 6, 721, 1024 }, { 6, 722, 1024 }, { 7, 723, 1024 }, { 6, 724, 1024 }, { 7, 725, 1024 }, { 7, 726, 1024 }, { 8, 727, 1024 }, + { 6, 728, 1024 }, { 7, 729, 1024 }, { 7, 730, 1024 }, { 8, 731, 1024 }, { 7, 732, 1024 }, { 8, 733, 1024 }, { 8, 734, 1024 }, { 9, 735, 1024 }, + { 5, 736, 1024 }, { 6, 737, 1024 }, { 6, 738, 1024 }, { 7, 739, 1024 }, { 6, 740, 1024 }, { 7, 741, 1024 }, { 7, 742, 1024 }, { 8, 743, 1024 }, + { 6, 744, 1024 }, { 7, 745, 1024 }, { 7, 746, 1024 }, { 8, 747, 1024 }, { 7, 748, 1024 }, { 8, 749, 1024 }, { 8, 750, 1024 }, { 9, 751, 1024 }, + { 6, 752, 1024 }, { 7, 753, 1024 }, { 7, 754, 1024 }, { 8, 755, 1024 }, { 7, 756, 1024 }, { 8, 757, 1024 }, { 8, 758, 1024 }, { 9, 759, 1024 }, + { 7, 760, 1024 }, { 8, 761, 1024 }, { 8, 762, 1024 }, { 9, 763, 1024 }, { 8, 764, 1024 }, { 9, 765, 1024 }, { 9, 766, 1024 }, { 10, 767, 1024 }, + { 3, 768, 1024 }, { 4, 769, 1024 }, { 4, 770, 1024 }, { 5, 771, 1024 }, { 4, 772, 1024 }, { 5, 773, 1024 }, { 5, 774, 1024 }, { 6, 775, 1024 }, + { 4, 776, 1024 }, { 5, 777, 1024 }, { 5, 778, 1024 }, { 6, 779, 1024 }, { 5, 780, 1024 }, { 6, 781, 1024 }, { 6, 782, 1024 }, { 7, 783, 1024 }, + { 4, 784, 1024 }, { 5, 785, 1024 }, { 5, 786, 1024 }, { 6, 787, 1024 }, { 5, 788, 1024 }, { 6, 789, 1024 }, { 6, 790, 1024 }, { 7, 791, 1024 }, + { 5, 792, 1024 }, { 6, 793, 1024 }, { 6, 794, 1024 }, { 7, 795, 1024 }, { 6, 796, 1024 }, { 7, 797, 1024 }, { 7, 798, 1024 }, { 8, 799, 1024 }, + { 4, 800, 1024 }, { 5, 801, 1024 }, { 5, 802, 1024 }, { 6, 803, 1024 }, { 5, 804, 1024 }, { 6, 805, 1024 }, { 6, 806, 1024 }, { 7, 807, 1024 }, + { 5, 808, 1024 }, { 6, 809, 1024 }, { 6, 810, 1024 }, { 7, 811, 1024 }, { 6, 812, 1024 }, { 7, 813, 1024 }, { 7, 814, 1024 }, { 8, 815, 1024 }, + { 5, 816, 1024 }, { 6, 817, 1024 }, { 6, 818, 1024 }, { 7, 819, 1024 }, { 6, 820, 1024 }, { 7, 821, 1024 }, { 7, 822, 1024 }, { 8, 823, 1024 }, + { 6, 824, 1024 }, { 7, 825, 1024 }, { 7, 826, 1024 }, { 8, 827, 1024 }, { 7, 828, 1024 }, { 8, 829, 1024 }, { 8, 830, 1024 }, { 9, 831, 1024 }, + { 4, 832, 1024 }, { 5, 833, 1024 }, { 5, 834, 1024 }, { 6, 835, 1024 }, { 5, 836, 1024 }, { 6, 837, 1024 }, { 6, 838, 1024 }, { 7, 839, 1024 }, + { 5, 840, 1024 }, { 6, 841, 1024 }, { 6, 842, 1024 }, { 7, 843, 1024 }, { 6, 844, 1024 }, { 7, 845, 1024 }, { 7, 846, 1024 }, { 8, 847, 1024 }, + { 5, 848, 1024 }, { 6, 849, 1024 }, { 6, 850, 1024 }, { 7, 851, 1024 }, { 6, 852, 1024 }, { 7, 853, 1024 }, { 7, 854, 1024 }, { 8, 855, 1024 }, + { 6, 856, 1024 }, { 7, 857, 1024 }, { 7, 858, 1024 }, { 8, 859, 1024 }, { 7, 860, 1024 }, { 8, 861, 1024 }, { 8, 862, 1024 }, { 9, 863, 1024 }, + { 5, 864, 1024 }, { 6, 865, 1024 }, { 6, 866, 1024 }, { 7, 867, 1024 }, { 6, 868, 1024 }, { 7, 869, 1024 }, { 7, 870, 1024 }, { 8, 871, 1024 }, + { 6, 872, 1024 }, { 7, 873, 1024 }, { 7, 874, 1024 }, { 8, 875, 1024 }, { 7, 876, 1024 }, { 8, 877, 1024 }, { 8, 878, 1024 }, { 9, 879, 1024 }, + { 6, 880, 1024 }, { 7, 881, 1024 }, { 7, 882, 1024 }, { 8, 883, 1024 }, { 7, 884, 1024 }, { 8, 885, 1024 }, { 8, 886, 1024 }, { 9, 887, 1024 }, + { 7, 888, 1024 }, { 8, 889, 1024 }, { 8, 890, 1024 }, { 9, 891, 1024 }, { 8, 892, 1024 }, { 9, 893, 1024 }, { 9, 894, 1024 }, { 10, 895, 1024 }, + { 4, 896, 1024 }, { 5, 897, 1024 }, { 5, 898, 1024 }, { 6, 899, 1024 }, { 5, 900, 1024 }, { 6, 901, 1024 }, { 6, 902, 1024 }, { 7, 903, 1024 }, + { 5, 904, 1024 }, { 6, 905, 1024 }, { 6, 906, 1024 }, { 7, 907, 1024 }, { 6, 908, 1024 }, { 7, 909, 1024 }, { 7, 910, 1024 }, { 8, 911, 1024 }, + { 5, 912, 1024 }, { 6, 913, 1024 }, { 6, 914, 1024 }, { 7, 915, 1024 }, { 6, 916, 1024 }, { 7, 917, 1024 }, { 7, 918, 1024 }, { 8, 919, 1024 }, + { 6, 920, 1024 }, { 7, 921, 1024 }, { 7, 922, 1024 }, { 8, 923, 1024 }, { 7, 924, 1024 }, { 8, 925, 1024 }, { 8, 926, 1024 }, { 9, 927, 1024 }, + { 5, 928, 1024 }, { 6, 929, 1024 }, { 6, 930, 1024 }, { 7, 931, 1024 }, { 6, 932, 1024 }, { 7, 933, 1024 }, { 7, 934, 1024 }, { 8, 935, 1024 }, + { 6, 936, 1024 }, { 7, 937, 1024 }, { 7, 938, 1024 }, { 8, 939, 1024 }, { 7, 940, 1024 }, { 8, 941, 1024 }, { 8, 942, 1024 }, { 9, 943, 1024 }, + { 6, 944, 1024 }, { 7, 945, 1024 }, { 7, 946, 1024 }, { 8, 947, 1024 }, { 7, 948, 1024 }, { 8, 949, 1024 }, { 8, 950, 1024 }, { 9, 951, 1024 }, + { 7, 952, 1024 }, { 8, 953, 1024 }, { 8, 954, 1024 }, { 9, 955, 1024 }, { 8, 956, 1024 }, { 9, 957, 1024 }, { 9, 958, 1024 }, { 10, 959, 1024 }, + { 5, 960, 1024 }, { 6, 961, 1024 }, { 6, 962, 1024 }, { 7, 963, 1024 }, { 6, 964, 1024 }, { 7, 965, 1024 }, { 7, 966, 1024 }, { 8, 967, 1024 }, + { 6, 968, 1024 }, { 7, 969, 1024 }, { 7, 970, 1024 }, { 8, 971, 1024 }, { 7, 972, 1024 }, { 8, 973, 1024 }, { 8, 974, 1024 }, { 9, 975, 1024 }, + { 6, 976, 1024 }, { 7, 977, 1024 }, { 7, 978, 1024 }, { 8, 979, 1024 }, { 7, 980, 1024 }, { 8, 981, 1024 }, { 8, 982, 1024 }, { 9, 983, 1024 }, + { 7, 984, 1024 }, { 8, 985, 1024 }, { 8, 986, 1024 }, { 9, 987, 1024 }, { 8, 988, 1024 }, { 9, 989, 1024 }, { 9, 990, 1024 }, { 10, 991, 1024 }, + { 6, 992, 1024 }, { 7, 993, 1024 }, { 7, 994, 1024 }, { 8, 995, 1024 }, { 7, 996, 1024 }, { 8, 997, 1024 }, { 8, 998, 1024 }, { 9, 999, 1024 }, + { 7, 1000, 1024 }, { 8, 1001, 1024 }, { 8, 1002, 1024 }, { 9, 1003, 1024 }, { 8, 1004, 1024 }, { 9, 1005, 1024 }, { 9, 1006, 1024 }, { 10, 1007, 1024 }, + { 7, 1008, 1024 }, { 8, 1009, 1024 }, { 8, 1010, 1024 }, { 9, 1011, 1024 }, { 8, 1012, 1024 }, { 9, 1013, 1024 }, { 9, 1014, 1024 }, { 10, 1015, 1024 }, + { 8, 1016, 1024 }, { 9, 1017, 1024 }, { 9, 1018, 1024 }, { 10, 1019, 1024 }, { 9, 1020, 1024 }, { 10, 1021, 1024 }, { 10, 1022, 1024 }, { 11, 1023, 1024 }, +#if FP_LUT > 11 + { 1, 0, 0 }, { 2, 1, 2048 }, { 2, 2, 2048 }, { 3, 3, 2048 }, { 2, 4, 2048 }, { 3, 5, 2048 }, { 3, 6, 2048 }, { 4, 7, 2048 }, + { 2, 8, 2048 }, { 3, 9, 2048 }, { 3, 10, 2048 }, { 4, 11, 2048 }, { 3, 12, 2048 }, { 4, 13, 2048 }, { 4, 14, 2048 }, { 5, 15, 2048 }, + { 2, 16, 2048 }, { 3, 17, 2048 }, { 3, 18, 2048 }, { 4, 19, 2048 }, { 3, 20, 2048 }, { 4, 21, 2048 }, { 4, 22, 2048 }, { 5, 23, 2048 }, + { 3, 24, 2048 }, { 4, 25, 2048 }, { 4, 26, 2048 }, { 5, 27, 2048 }, { 4, 28, 2048 }, { 5, 29, 2048 }, { 5, 30, 2048 }, { 6, 31, 2048 }, + { 2, 32, 2048 }, { 3, 33, 2048 }, { 3, 34, 2048 }, { 4, 35, 2048 }, { 3, 36, 2048 }, { 4, 37, 2048 }, { 4, 38, 2048 }, { 5, 39, 2048 }, + { 3, 40, 2048 }, { 4, 41, 2048 }, { 4, 42, 2048 }, { 5, 43, 2048 }, { 4, 44, 2048 }, { 5, 45, 2048 }, { 5, 46, 2048 }, { 6, 47, 2048 }, + { 3, 48, 2048 }, { 4, 49, 2048 }, { 4, 50, 2048 }, { 5, 51, 2048 }, { 4, 52, 2048 }, { 5, 53, 2048 }, { 5, 54, 2048 }, { 6, 55, 2048 }, + { 4, 56, 2048 }, { 5, 57, 2048 }, { 5, 58, 2048 }, { 6, 59, 2048 }, { 5, 60, 2048 }, { 6, 61, 2048 }, { 6, 62, 2048 }, { 7, 63, 2048 }, + { 2, 64, 2048 }, { 3, 65, 2048 }, { 3, 66, 2048 }, { 4, 67, 2048 }, { 3, 68, 2048 }, { 4, 69, 2048 }, { 4, 70, 2048 }, { 5, 71, 2048 }, + { 3, 72, 2048 }, { 4, 73, 2048 }, { 4, 74, 2048 }, { 5, 75, 2048 }, { 4, 76, 2048 }, { 5, 77, 2048 }, { 5, 78, 2048 }, { 6, 79, 2048 }, + { 3, 80, 2048 }, { 4, 81, 2048 }, { 4, 82, 2048 }, { 5, 83, 2048 }, { 4, 84, 2048 }, { 5, 85, 2048 }, { 5, 86, 2048 }, { 6, 87, 2048 }, + { 4, 88, 2048 }, { 5, 89, 2048 }, { 5, 90, 2048 }, { 6, 91, 2048 }, { 5, 92, 2048 }, { 6, 93, 2048 }, { 6, 94, 2048 }, { 7, 95, 2048 }, + { 3, 96, 2048 }, { 4, 97, 2048 }, { 4, 98, 2048 }, { 5, 99, 2048 }, { 4, 100, 2048 }, { 5, 101, 2048 }, { 5, 102, 2048 }, { 6, 103, 2048 }, + { 4, 104, 2048 }, { 5, 105, 2048 }, { 5, 106, 2048 }, { 6, 107, 2048 }, { 5, 108, 2048 }, { 6, 109, 2048 }, { 6, 110, 2048 }, { 7, 111, 2048 }, + { 4, 112, 2048 }, { 5, 113, 2048 }, { 5, 114, 2048 }, { 6, 115, 2048 }, { 5, 116, 2048 }, { 6, 117, 2048 }, { 6, 118, 2048 }, { 7, 119, 2048 }, + { 5, 120, 2048 }, { 6, 121, 2048 }, { 6, 122, 2048 }, { 7, 123, 2048 }, { 6, 124, 2048 }, { 7, 125, 2048 }, { 7, 126, 2048 }, { 8, 127, 2048 }, + { 2, 128, 2048 }, { 3, 129, 2048 }, { 3, 130, 2048 }, { 4, 131, 2048 }, { 3, 132, 2048 }, { 4, 133, 2048 }, { 4, 134, 2048 }, { 5, 135, 2048 }, + { 3, 136, 2048 }, { 4, 137, 2048 }, { 4, 138, 2048 }, { 5, 139, 2048 }, { 4, 140, 2048 }, { 5, 141, 2048 }, { 5, 142, 2048 }, { 6, 143, 2048 }, + { 3, 144, 2048 }, { 4, 145, 2048 }, { 4, 146, 2048 }, { 5, 147, 2048 }, { 4, 148, 2048 }, { 5, 149, 2048 }, { 5, 150, 2048 }, { 6, 151, 2048 }, + { 4, 152, 2048 }, { 5, 153, 2048 }, { 5, 154, 2048 }, { 6, 155, 2048 }, { 5, 156, 2048 }, { 6, 157, 2048 }, { 6, 158, 2048 }, { 7, 159, 2048 }, + { 3, 160, 2048 }, { 4, 161, 2048 }, { 4, 162, 2048 }, { 5, 163, 2048 }, { 4, 164, 2048 }, { 5, 165, 2048 }, { 5, 166, 2048 }, { 6, 167, 2048 }, + { 4, 168, 2048 }, { 5, 169, 2048 }, { 5, 170, 2048 }, { 6, 171, 2048 }, { 5, 172, 2048 }, { 6, 173, 2048 }, { 6, 174, 2048 }, { 7, 175, 2048 }, + { 4, 176, 2048 }, { 5, 177, 2048 }, { 5, 178, 2048 }, { 6, 179, 2048 }, { 5, 180, 2048 }, { 6, 181, 2048 }, { 6, 182, 2048 }, { 7, 183, 2048 }, + { 5, 184, 2048 }, { 6, 185, 2048 }, { 6, 186, 2048 }, { 7, 187, 2048 }, { 6, 188, 2048 }, { 7, 189, 2048 }, { 7, 190, 2048 }, { 8, 191, 2048 }, + { 3, 192, 2048 }, { 4, 193, 2048 }, { 4, 194, 2048 }, { 5, 195, 2048 }, { 4, 196, 2048 }, { 5, 197, 2048 }, { 5, 198, 2048 }, { 6, 199, 2048 }, + { 4, 200, 2048 }, { 5, 201, 2048 }, { 5, 202, 2048 }, { 6, 203, 2048 }, { 5, 204, 2048 }, { 6, 205, 2048 }, { 6, 206, 2048 }, { 7, 207, 2048 }, + { 4, 208, 2048 }, { 5, 209, 2048 }, { 5, 210, 2048 }, { 6, 211, 2048 }, { 5, 212, 2048 }, { 6, 213, 2048 }, { 6, 214, 2048 }, { 7, 215, 2048 }, + { 5, 216, 2048 }, { 6, 217, 2048 }, { 6, 218, 2048 }, { 7, 219, 2048 }, { 6, 220, 2048 }, { 7, 221, 2048 }, { 7, 222, 2048 }, { 8, 223, 2048 }, + { 4, 224, 2048 }, { 5, 225, 2048 }, { 5, 226, 2048 }, { 6, 227, 2048 }, { 5, 228, 2048 }, { 6, 229, 2048 }, { 6, 230, 2048 }, { 7, 231, 2048 }, + { 5, 232, 2048 }, { 6, 233, 2048 }, { 6, 234, 2048 }, { 7, 235, 2048 }, { 6, 236, 2048 }, { 7, 237, 2048 }, { 7, 238, 2048 }, { 8, 239, 2048 }, + { 5, 240, 2048 }, { 6, 241, 2048 }, { 6, 242, 2048 }, { 7, 243, 2048 }, { 6, 244, 2048 }, { 7, 245, 2048 }, { 7, 246, 2048 }, { 8, 247, 2048 }, + { 6, 248, 2048 }, { 7, 249, 2048 }, { 7, 250, 2048 }, { 8, 251, 2048 }, { 7, 252, 2048 }, { 8, 253, 2048 }, { 8, 254, 2048 }, { 9, 255, 2048 }, + { 2, 256, 2048 }, { 3, 257, 2048 }, { 3, 258, 2048 }, { 4, 259, 2048 }, { 3, 260, 2048 }, { 4, 261, 2048 }, { 4, 262, 2048 }, { 5, 263, 2048 }, + { 3, 264, 2048 }, { 4, 265, 2048 }, { 4, 266, 2048 }, { 5, 267, 2048 }, { 4, 268, 2048 }, { 5, 269, 2048 }, { 5, 270, 2048 }, { 6, 271, 2048 }, + { 3, 272, 2048 }, { 4, 273, 2048 }, { 4, 274, 2048 }, { 5, 275, 2048 }, { 4, 276, 2048 }, { 5, 277, 2048 }, { 5, 278, 2048 }, { 6, 279, 2048 }, + { 4, 280, 2048 }, { 5, 281, 2048 }, { 5, 282, 2048 }, { 6, 283, 2048 }, { 5, 284, 2048 }, { 6, 285, 2048 }, { 6, 286, 2048 }, { 7, 287, 2048 }, + { 3, 288, 2048 }, { 4, 289, 2048 }, { 4, 290, 2048 }, { 5, 291, 2048 }, { 4, 292, 2048 }, { 5, 293, 2048 }, { 5, 294, 2048 }, { 6, 295, 2048 }, + { 4, 296, 2048 }, { 5, 297, 2048 }, { 5, 298, 2048 }, { 6, 299, 2048 }, { 5, 300, 2048 }, { 6, 301, 2048 }, { 6, 302, 2048 }, { 7, 303, 2048 }, + { 4, 304, 2048 }, { 5, 305, 2048 }, { 5, 306, 2048 }, { 6, 307, 2048 }, { 5, 308, 2048 }, { 6, 309, 2048 }, { 6, 310, 2048 }, { 7, 311, 2048 }, + { 5, 312, 2048 }, { 6, 313, 2048 }, { 6, 314, 2048 }, { 7, 315, 2048 }, { 6, 316, 2048 }, { 7, 317, 2048 }, { 7, 318, 2048 }, { 8, 319, 2048 }, + { 3, 320, 2048 }, { 4, 321, 2048 }, { 4, 322, 2048 }, { 5, 323, 2048 }, { 4, 324, 2048 }, { 5, 325, 2048 }, { 5, 326, 2048 }, { 6, 327, 2048 }, + { 4, 328, 2048 }, { 5, 329, 2048 }, { 5, 330, 2048 }, { 6, 331, 2048 }, { 5, 332, 2048 }, { 6, 333, 2048 }, { 6, 334, 2048 }, { 7, 335, 2048 }, + { 4, 336, 2048 }, { 5, 337, 2048 }, { 5, 338, 2048 }, { 6, 339, 2048 }, { 5, 340, 2048 }, { 6, 341, 2048 }, { 6, 342, 2048 }, { 7, 343, 2048 }, + { 5, 344, 2048 }, { 6, 345, 2048 }, { 6, 346, 2048 }, { 7, 347, 2048 }, { 6, 348, 2048 }, { 7, 349, 2048 }, { 7, 350, 2048 }, { 8, 351, 2048 }, + { 4, 352, 2048 }, { 5, 353, 2048 }, { 5, 354, 2048 }, { 6, 355, 2048 }, { 5, 356, 2048 }, { 6, 357, 2048 }, { 6, 358, 2048 }, { 7, 359, 2048 }, + { 5, 360, 2048 }, { 6, 361, 2048 }, { 6, 362, 2048 }, { 7, 363, 2048 }, { 6, 364, 2048 }, { 7, 365, 2048 }, { 7, 366, 2048 }, { 8, 367, 2048 }, + { 5, 368, 2048 }, { 6, 369, 2048 }, { 6, 370, 2048 }, { 7, 371, 2048 }, { 6, 372, 2048 }, { 7, 373, 2048 }, { 7, 374, 2048 }, { 8, 375, 2048 }, + { 6, 376, 2048 }, { 7, 377, 2048 }, { 7, 378, 2048 }, { 8, 379, 2048 }, { 7, 380, 2048 }, { 8, 381, 2048 }, { 8, 382, 2048 }, { 9, 383, 2048 }, + { 3, 384, 2048 }, { 4, 385, 2048 }, { 4, 386, 2048 }, { 5, 387, 2048 }, { 4, 388, 2048 }, { 5, 389, 2048 }, { 5, 390, 2048 }, { 6, 391, 2048 }, + { 4, 392, 2048 }, { 5, 393, 2048 }, { 5, 394, 2048 }, { 6, 395, 2048 }, { 5, 396, 2048 }, { 6, 397, 2048 }, { 6, 398, 2048 }, { 7, 399, 2048 }, + { 4, 400, 2048 }, { 5, 401, 2048 }, { 5, 402, 2048 }, { 6, 403, 2048 }, { 5, 404, 2048 }, { 6, 405, 2048 }, { 6, 406, 2048 }, { 7, 407, 2048 }, + { 5, 408, 2048 }, { 6, 409, 2048 }, { 6, 410, 2048 }, { 7, 411, 2048 }, { 6, 412, 2048 }, { 7, 413, 2048 }, { 7, 414, 2048 }, { 8, 415, 2048 }, + { 4, 416, 2048 }, { 5, 417, 2048 }, { 5, 418, 2048 }, { 6, 419, 2048 }, { 5, 420, 2048 }, { 6, 421, 2048 }, { 6, 422, 2048 }, { 7, 423, 2048 }, + { 5, 424, 2048 }, { 6, 425, 2048 }, { 6, 426, 2048 }, { 7, 427, 2048 }, { 6, 428, 2048 }, { 7, 429, 2048 }, { 7, 430, 2048 }, { 8, 431, 2048 }, + { 5, 432, 2048 }, { 6, 433, 2048 }, { 6, 434, 2048 }, { 7, 435, 2048 }, { 6, 436, 2048 }, { 7, 437, 2048 }, { 7, 438, 2048 }, { 8, 439, 2048 }, + { 6, 440, 2048 }, { 7, 441, 2048 }, { 7, 442, 2048 }, { 8, 443, 2048 }, { 7, 444, 2048 }, { 8, 445, 2048 }, { 8, 446, 2048 }, { 9, 447, 2048 }, + { 4, 448, 2048 }, { 5, 449, 2048 }, { 5, 450, 2048 }, { 6, 451, 2048 }, { 5, 452, 2048 }, { 6, 453, 2048 }, { 6, 454, 2048 }, { 7, 455, 2048 }, + { 5, 456, 2048 }, { 6, 457, 2048 }, { 6, 458, 2048 }, { 7, 459, 2048 }, { 6, 460, 2048 }, { 7, 461, 2048 }, { 7, 462, 2048 }, { 8, 463, 2048 }, + { 5, 464, 2048 }, { 6, 465, 2048 }, { 6, 466, 2048 }, { 7, 467, 2048 }, { 6, 468, 2048 }, { 7, 469, 2048 }, { 7, 470, 2048 }, { 8, 471, 2048 }, + { 6, 472, 2048 }, { 7, 473, 2048 }, { 7, 474, 2048 }, { 8, 475, 2048 }, { 7, 476, 2048 }, { 8, 477, 2048 }, { 8, 478, 2048 }, { 9, 479, 2048 }, + { 5, 480, 2048 }, { 6, 481, 2048 }, { 6, 482, 2048 }, { 7, 483, 2048 }, { 6, 484, 2048 }, { 7, 485, 2048 }, { 7, 486, 2048 }, { 8, 487, 2048 }, + { 6, 488, 2048 }, { 7, 489, 2048 }, { 7, 490, 2048 }, { 8, 491, 2048 }, { 7, 492, 2048 }, { 8, 493, 2048 }, { 8, 494, 2048 }, { 9, 495, 2048 }, + { 6, 496, 2048 }, { 7, 497, 2048 }, { 7, 498, 2048 }, { 8, 499, 2048 }, { 7, 500, 2048 }, { 8, 501, 2048 }, { 8, 502, 2048 }, { 9, 503, 2048 }, + { 7, 504, 2048 }, { 8, 505, 2048 }, { 8, 506, 2048 }, { 9, 507, 2048 }, { 8, 508, 2048 }, { 9, 509, 2048 }, { 9, 510, 2048 }, { 10, 511, 2048 }, + { 2, 512, 2048 }, { 3, 513, 2048 }, { 3, 514, 2048 }, { 4, 515, 2048 }, { 3, 516, 2048 }, { 4, 517, 2048 }, { 4, 518, 2048 }, { 5, 519, 2048 }, + { 3, 520, 2048 }, { 4, 521, 2048 }, { 4, 522, 2048 }, { 5, 523, 2048 }, { 4, 524, 2048 }, { 5, 525, 2048 }, { 5, 526, 2048 }, { 6, 527, 2048 }, + { 3, 528, 2048 }, { 4, 529, 2048 }, { 4, 530, 2048 }, { 5, 531, 2048 }, { 4, 532, 2048 }, { 5, 533, 2048 }, { 5, 534, 2048 }, { 6, 535, 2048 }, + { 4, 536, 2048 }, { 5, 537, 2048 }, { 5, 538, 2048 }, { 6, 539, 2048 }, { 5, 540, 2048 }, { 6, 541, 2048 }, { 6, 542, 2048 }, { 7, 543, 2048 }, + { 3, 544, 2048 }, { 4, 545, 2048 }, { 4, 546, 2048 }, { 5, 547, 2048 }, { 4, 548, 2048 }, { 5, 549, 2048 }, { 5, 550, 2048 }, { 6, 551, 2048 }, + { 4, 552, 2048 }, { 5, 553, 2048 }, { 5, 554, 2048 }, { 6, 555, 2048 }, { 5, 556, 2048 }, { 6, 557, 2048 }, { 6, 558, 2048 }, { 7, 559, 2048 }, + { 4, 560, 2048 }, { 5, 561, 2048 }, { 5, 562, 2048 }, { 6, 563, 2048 }, { 5, 564, 2048 }, { 6, 565, 2048 }, { 6, 566, 2048 }, { 7, 567, 2048 }, + { 5, 568, 2048 }, { 6, 569, 2048 }, { 6, 570, 2048 }, { 7, 571, 2048 }, { 6, 572, 2048 }, { 7, 573, 2048 }, { 7, 574, 2048 }, { 8, 575, 2048 }, + { 3, 576, 2048 }, { 4, 577, 2048 }, { 4, 578, 2048 }, { 5, 579, 2048 }, { 4, 580, 2048 }, { 5, 581, 2048 }, { 5, 582, 2048 }, { 6, 583, 2048 }, + { 4, 584, 2048 }, { 5, 585, 2048 }, { 5, 586, 2048 }, { 6, 587, 2048 }, { 5, 588, 2048 }, { 6, 589, 2048 }, { 6, 590, 2048 }, { 7, 591, 2048 }, + { 4, 592, 2048 }, { 5, 593, 2048 }, { 5, 594, 2048 }, { 6, 595, 2048 }, { 5, 596, 2048 }, { 6, 597, 2048 }, { 6, 598, 2048 }, { 7, 599, 2048 }, + { 5, 600, 2048 }, { 6, 601, 2048 }, { 6, 602, 2048 }, { 7, 603, 2048 }, { 6, 604, 2048 }, { 7, 605, 2048 }, { 7, 606, 2048 }, { 8, 607, 2048 }, + { 4, 608, 2048 }, { 5, 609, 2048 }, { 5, 610, 2048 }, { 6, 611, 2048 }, { 5, 612, 2048 }, { 6, 613, 2048 }, { 6, 614, 2048 }, { 7, 615, 2048 }, + { 5, 616, 2048 }, { 6, 617, 2048 }, { 6, 618, 2048 }, { 7, 619, 2048 }, { 6, 620, 2048 }, { 7, 621, 2048 }, { 7, 622, 2048 }, { 8, 623, 2048 }, + { 5, 624, 2048 }, { 6, 625, 2048 }, { 6, 626, 2048 }, { 7, 627, 2048 }, { 6, 628, 2048 }, { 7, 629, 2048 }, { 7, 630, 2048 }, { 8, 631, 2048 }, + { 6, 632, 2048 }, { 7, 633, 2048 }, { 7, 634, 2048 }, { 8, 635, 2048 }, { 7, 636, 2048 }, { 8, 637, 2048 }, { 8, 638, 2048 }, { 9, 639, 2048 }, + { 3, 640, 2048 }, { 4, 641, 2048 }, { 4, 642, 2048 }, { 5, 643, 2048 }, { 4, 644, 2048 }, { 5, 645, 2048 }, { 5, 646, 2048 }, { 6, 647, 2048 }, + { 4, 648, 2048 }, { 5, 649, 2048 }, { 5, 650, 2048 }, { 6, 651, 2048 }, { 5, 652, 2048 }, { 6, 653, 2048 }, { 6, 654, 2048 }, { 7, 655, 2048 }, + { 4, 656, 2048 }, { 5, 657, 2048 }, { 5, 658, 2048 }, { 6, 659, 2048 }, { 5, 660, 2048 }, { 6, 661, 2048 }, { 6, 662, 2048 }, { 7, 663, 2048 }, + { 5, 664, 2048 }, { 6, 665, 2048 }, { 6, 666, 2048 }, { 7, 667, 2048 }, { 6, 668, 2048 }, { 7, 669, 2048 }, { 7, 670, 2048 }, { 8, 671, 2048 }, + { 4, 672, 2048 }, { 5, 673, 2048 }, { 5, 674, 2048 }, { 6, 675, 2048 }, { 5, 676, 2048 }, { 6, 677, 2048 }, { 6, 678, 2048 }, { 7, 679, 2048 }, + { 5, 680, 2048 }, { 6, 681, 2048 }, { 6, 682, 2048 }, { 7, 683, 2048 }, { 6, 684, 2048 }, { 7, 685, 2048 }, { 7, 686, 2048 }, { 8, 687, 2048 }, + { 5, 688, 2048 }, { 6, 689, 2048 }, { 6, 690, 2048 }, { 7, 691, 2048 }, { 6, 692, 2048 }, { 7, 693, 2048 }, { 7, 694, 2048 }, { 8, 695, 2048 }, + { 6, 696, 2048 }, { 7, 697, 2048 }, { 7, 698, 2048 }, { 8, 699, 2048 }, { 7, 700, 2048 }, { 8, 701, 2048 }, { 8, 702, 2048 }, { 9, 703, 2048 }, + { 4, 704, 2048 }, { 5, 705, 2048 }, { 5, 706, 2048 }, { 6, 707, 2048 }, { 5, 708, 2048 }, { 6, 709, 2048 }, { 6, 710, 2048 }, { 7, 711, 2048 }, + { 5, 712, 2048 }, { 6, 713, 2048 }, { 6, 714, 2048 }, { 7, 715, 2048 }, { 6, 716, 2048 }, { 7, 717, 2048 }, { 7, 718, 2048 }, { 8, 719, 2048 }, + { 5, 720, 2048 }, { 6, 721, 2048 }, { 6, 722, 2048 }, { 7, 723, 2048 }, { 6, 724, 2048 }, { 7, 725, 2048 }, { 7, 726, 2048 }, { 8, 727, 2048 }, + { 6, 728, 2048 }, { 7, 729, 2048 }, { 7, 730, 2048 }, { 8, 731, 2048 }, { 7, 732, 2048 }, { 8, 733, 2048 }, { 8, 734, 2048 }, { 9, 735, 2048 }, + { 5, 736, 2048 }, { 6, 737, 2048 }, { 6, 738, 2048 }, { 7, 739, 2048 }, { 6, 740, 2048 }, { 7, 741, 2048 }, { 7, 742, 2048 }, { 8, 743, 2048 }, + { 6, 744, 2048 }, { 7, 745, 2048 }, { 7, 746, 2048 }, { 8, 747, 2048 }, { 7, 748, 2048 }, { 8, 749, 2048 }, { 8, 750, 2048 }, { 9, 751, 2048 }, + { 6, 752, 2048 }, { 7, 753, 2048 }, { 7, 754, 2048 }, { 8, 755, 2048 }, { 7, 756, 2048 }, { 8, 757, 2048 }, { 8, 758, 2048 }, { 9, 759, 2048 }, + { 7, 760, 2048 }, { 8, 761, 2048 }, { 8, 762, 2048 }, { 9, 763, 2048 }, { 8, 764, 2048 }, { 9, 765, 2048 }, { 9, 766, 2048 }, { 10, 767, 2048 }, + { 3, 768, 2048 }, { 4, 769, 2048 }, { 4, 770, 2048 }, { 5, 771, 2048 }, { 4, 772, 2048 }, { 5, 773, 2048 }, { 5, 774, 2048 }, { 6, 775, 2048 }, + { 4, 776, 2048 }, { 5, 777, 2048 }, { 5, 778, 2048 }, { 6, 779, 2048 }, { 5, 780, 2048 }, { 6, 781, 2048 }, { 6, 782, 2048 }, { 7, 783, 2048 }, + { 4, 784, 2048 }, { 5, 785, 2048 }, { 5, 786, 2048 }, { 6, 787, 2048 }, { 5, 788, 2048 }, { 6, 789, 2048 }, { 6, 790, 2048 }, { 7, 791, 2048 }, + { 5, 792, 2048 }, { 6, 793, 2048 }, { 6, 794, 2048 }, { 7, 795, 2048 }, { 6, 796, 2048 }, { 7, 797, 2048 }, { 7, 798, 2048 }, { 8, 799, 2048 }, + { 4, 800, 2048 }, { 5, 801, 2048 }, { 5, 802, 2048 }, { 6, 803, 2048 }, { 5, 804, 2048 }, { 6, 805, 2048 }, { 6, 806, 2048 }, { 7, 807, 2048 }, + { 5, 808, 2048 }, { 6, 809, 2048 }, { 6, 810, 2048 }, { 7, 811, 2048 }, { 6, 812, 2048 }, { 7, 813, 2048 }, { 7, 814, 2048 }, { 8, 815, 2048 }, + { 5, 816, 2048 }, { 6, 817, 2048 }, { 6, 818, 2048 }, { 7, 819, 2048 }, { 6, 820, 2048 }, { 7, 821, 2048 }, { 7, 822, 2048 }, { 8, 823, 2048 }, + { 6, 824, 2048 }, { 7, 825, 2048 }, { 7, 826, 2048 }, { 8, 827, 2048 }, { 7, 828, 2048 }, { 8, 829, 2048 }, { 8, 830, 2048 }, { 9, 831, 2048 }, + { 4, 832, 2048 }, { 5, 833, 2048 }, { 5, 834, 2048 }, { 6, 835, 2048 }, { 5, 836, 2048 }, { 6, 837, 2048 }, { 6, 838, 2048 }, { 7, 839, 2048 }, + { 5, 840, 2048 }, { 6, 841, 2048 }, { 6, 842, 2048 }, { 7, 843, 2048 }, { 6, 844, 2048 }, { 7, 845, 2048 }, { 7, 846, 2048 }, { 8, 847, 2048 }, + { 5, 848, 2048 }, { 6, 849, 2048 }, { 6, 850, 2048 }, { 7, 851, 2048 }, { 6, 852, 2048 }, { 7, 853, 2048 }, { 7, 854, 2048 }, { 8, 855, 2048 }, + { 6, 856, 2048 }, { 7, 857, 2048 }, { 7, 858, 2048 }, { 8, 859, 2048 }, { 7, 860, 2048 }, { 8, 861, 2048 }, { 8, 862, 2048 }, { 9, 863, 2048 }, + { 5, 864, 2048 }, { 6, 865, 2048 }, { 6, 866, 2048 }, { 7, 867, 2048 }, { 6, 868, 2048 }, { 7, 869, 2048 }, { 7, 870, 2048 }, { 8, 871, 2048 }, + { 6, 872, 2048 }, { 7, 873, 2048 }, { 7, 874, 2048 }, { 8, 875, 2048 }, { 7, 876, 2048 }, { 8, 877, 2048 }, { 8, 878, 2048 }, { 9, 879, 2048 }, + { 6, 880, 2048 }, { 7, 881, 2048 }, { 7, 882, 2048 }, { 8, 883, 2048 }, { 7, 884, 2048 }, { 8, 885, 2048 }, { 8, 886, 2048 }, { 9, 887, 2048 }, + { 7, 888, 2048 }, { 8, 889, 2048 }, { 8, 890, 2048 }, { 9, 891, 2048 }, { 8, 892, 2048 }, { 9, 893, 2048 }, { 9, 894, 2048 }, { 10, 895, 2048 }, + { 4, 896, 2048 }, { 5, 897, 2048 }, { 5, 898, 2048 }, { 6, 899, 2048 }, { 5, 900, 2048 }, { 6, 901, 2048 }, { 6, 902, 2048 }, { 7, 903, 2048 }, + { 5, 904, 2048 }, { 6, 905, 2048 }, { 6, 906, 2048 }, { 7, 907, 2048 }, { 6, 908, 2048 }, { 7, 909, 2048 }, { 7, 910, 2048 }, { 8, 911, 2048 }, + { 5, 912, 2048 }, { 6, 913, 2048 }, { 6, 914, 2048 }, { 7, 915, 2048 }, { 6, 916, 2048 }, { 7, 917, 2048 }, { 7, 918, 2048 }, { 8, 919, 2048 }, + { 6, 920, 2048 }, { 7, 921, 2048 }, { 7, 922, 2048 }, { 8, 923, 2048 }, { 7, 924, 2048 }, { 8, 925, 2048 }, { 8, 926, 2048 }, { 9, 927, 2048 }, + { 5, 928, 2048 }, { 6, 929, 2048 }, { 6, 930, 2048 }, { 7, 931, 2048 }, { 6, 932, 2048 }, { 7, 933, 2048 }, { 7, 934, 2048 }, { 8, 935, 2048 }, + { 6, 936, 2048 }, { 7, 937, 2048 }, { 7, 938, 2048 }, { 8, 939, 2048 }, { 7, 940, 2048 }, { 8, 941, 2048 }, { 8, 942, 2048 }, { 9, 943, 2048 }, + { 6, 944, 2048 }, { 7, 945, 2048 }, { 7, 946, 2048 }, { 8, 947, 2048 }, { 7, 948, 2048 }, { 8, 949, 2048 }, { 8, 950, 2048 }, { 9, 951, 2048 }, + { 7, 952, 2048 }, { 8, 953, 2048 }, { 8, 954, 2048 }, { 9, 955, 2048 }, { 8, 956, 2048 }, { 9, 957, 2048 }, { 9, 958, 2048 }, { 10, 959, 2048 }, + { 5, 960, 2048 }, { 6, 961, 2048 }, { 6, 962, 2048 }, { 7, 963, 2048 }, { 6, 964, 2048 }, { 7, 965, 2048 }, { 7, 966, 2048 }, { 8, 967, 2048 }, + { 6, 968, 2048 }, { 7, 969, 2048 }, { 7, 970, 2048 }, { 8, 971, 2048 }, { 7, 972, 2048 }, { 8, 973, 2048 }, { 8, 974, 2048 }, { 9, 975, 2048 }, + { 6, 976, 2048 }, { 7, 977, 2048 }, { 7, 978, 2048 }, { 8, 979, 2048 }, { 7, 980, 2048 }, { 8, 981, 2048 }, { 8, 982, 2048 }, { 9, 983, 2048 }, + { 7, 984, 2048 }, { 8, 985, 2048 }, { 8, 986, 2048 }, { 9, 987, 2048 }, { 8, 988, 2048 }, { 9, 989, 2048 }, { 9, 990, 2048 }, { 10, 991, 2048 }, + { 6, 992, 2048 }, { 7, 993, 2048 }, { 7, 994, 2048 }, { 8, 995, 2048 }, { 7, 996, 2048 }, { 8, 997, 2048 }, { 8, 998, 2048 }, { 9, 999, 2048 }, + { 7, 1000, 2048 }, { 8, 1001, 2048 }, { 8, 1002, 2048 }, { 9, 1003, 2048 }, { 8, 1004, 2048 }, { 9, 1005, 2048 }, { 9, 1006, 2048 }, { 10, 1007, 2048 }, + { 7, 1008, 2048 }, { 8, 1009, 2048 }, { 8, 1010, 2048 }, { 9, 1011, 2048 }, { 8, 1012, 2048 }, { 9, 1013, 2048 }, { 9, 1014, 2048 }, { 10, 1015, 2048 }, + { 8, 1016, 2048 }, { 9, 1017, 2048 }, { 9, 1018, 2048 }, { 10, 1019, 2048 }, { 9, 1020, 2048 }, { 10, 1021, 2048 }, { 10, 1022, 2048 }, { 11, 1023, 2048 }, + { 2, 1024, 2048 }, { 3, 1025, 2048 }, { 3, 1026, 2048 }, { 4, 1027, 2048 }, { 3, 1028, 2048 }, { 4, 1029, 2048 }, { 4, 1030, 2048 }, { 5, 1031, 2048 }, + { 3, 1032, 2048 }, { 4, 1033, 2048 }, { 4, 1034, 2048 }, { 5, 1035, 2048 }, { 4, 1036, 2048 }, { 5, 1037, 2048 }, { 5, 1038, 2048 }, { 6, 1039, 2048 }, + { 3, 1040, 2048 }, { 4, 1041, 2048 }, { 4, 1042, 2048 }, { 5, 1043, 2048 }, { 4, 1044, 2048 }, { 5, 1045, 2048 }, { 5, 1046, 2048 }, { 6, 1047, 2048 }, + { 4, 1048, 2048 }, { 5, 1049, 2048 }, { 5, 1050, 2048 }, { 6, 1051, 2048 }, { 5, 1052, 2048 }, { 6, 1053, 2048 }, { 6, 1054, 2048 }, { 7, 1055, 2048 }, + { 3, 1056, 2048 }, { 4, 1057, 2048 }, { 4, 1058, 2048 }, { 5, 1059, 2048 }, { 4, 1060, 2048 }, { 5, 1061, 2048 }, { 5, 1062, 2048 }, { 6, 1063, 2048 }, + { 4, 1064, 2048 }, { 5, 1065, 2048 }, { 5, 1066, 2048 }, { 6, 1067, 2048 }, { 5, 1068, 2048 }, { 6, 1069, 2048 }, { 6, 1070, 2048 }, { 7, 1071, 2048 }, + { 4, 1072, 2048 }, { 5, 1073, 2048 }, { 5, 1074, 2048 }, { 6, 1075, 2048 }, { 5, 1076, 2048 }, { 6, 1077, 2048 }, { 6, 1078, 2048 }, { 7, 1079, 2048 }, + { 5, 1080, 2048 }, { 6, 1081, 2048 }, { 6, 1082, 2048 }, { 7, 1083, 2048 }, { 6, 1084, 2048 }, { 7, 1085, 2048 }, { 7, 1086, 2048 }, { 8, 1087, 2048 }, + { 3, 1088, 2048 }, { 4, 1089, 2048 }, { 4, 1090, 2048 }, { 5, 1091, 2048 }, { 4, 1092, 2048 }, { 5, 1093, 2048 }, { 5, 1094, 2048 }, { 6, 1095, 2048 }, + { 4, 1096, 2048 }, { 5, 1097, 2048 }, { 5, 1098, 2048 }, { 6, 1099, 2048 }, { 5, 1100, 2048 }, { 6, 1101, 2048 }, { 6, 1102, 2048 }, { 7, 1103, 2048 }, + { 4, 1104, 2048 }, { 5, 1105, 2048 }, { 5, 1106, 2048 }, { 6, 1107, 2048 }, { 5, 1108, 2048 }, { 6, 1109, 2048 }, { 6, 1110, 2048 }, { 7, 1111, 2048 }, + { 5, 1112, 2048 }, { 6, 1113, 2048 }, { 6, 1114, 2048 }, { 7, 1115, 2048 }, { 6, 1116, 2048 }, { 7, 1117, 2048 }, { 7, 1118, 2048 }, { 8, 1119, 2048 }, + { 4, 1120, 2048 }, { 5, 1121, 2048 }, { 5, 1122, 2048 }, { 6, 1123, 2048 }, { 5, 1124, 2048 }, { 6, 1125, 2048 }, { 6, 1126, 2048 }, { 7, 1127, 2048 }, + { 5, 1128, 2048 }, { 6, 1129, 2048 }, { 6, 1130, 2048 }, { 7, 1131, 2048 }, { 6, 1132, 2048 }, { 7, 1133, 2048 }, { 7, 1134, 2048 }, { 8, 1135, 2048 }, + { 5, 1136, 2048 }, { 6, 1137, 2048 }, { 6, 1138, 2048 }, { 7, 1139, 2048 }, { 6, 1140, 2048 }, { 7, 1141, 2048 }, { 7, 1142, 2048 }, { 8, 1143, 2048 }, + { 6, 1144, 2048 }, { 7, 1145, 2048 }, { 7, 1146, 2048 }, { 8, 1147, 2048 }, { 7, 1148, 2048 }, { 8, 1149, 2048 }, { 8, 1150, 2048 }, { 9, 1151, 2048 }, + { 3, 1152, 2048 }, { 4, 1153, 2048 }, { 4, 1154, 2048 }, { 5, 1155, 2048 }, { 4, 1156, 2048 }, { 5, 1157, 2048 }, { 5, 1158, 2048 }, { 6, 1159, 2048 }, + { 4, 1160, 2048 }, { 5, 1161, 2048 }, { 5, 1162, 2048 }, { 6, 1163, 2048 }, { 5, 1164, 2048 }, { 6, 1165, 2048 }, { 6, 1166, 2048 }, { 7, 1167, 2048 }, + { 4, 1168, 2048 }, { 5, 1169, 2048 }, { 5, 1170, 2048 }, { 6, 1171, 2048 }, { 5, 1172, 2048 }, { 6, 1173, 2048 }, { 6, 1174, 2048 }, { 7, 1175, 2048 }, + { 5, 1176, 2048 }, { 6, 1177, 2048 }, { 6, 1178, 2048 }, { 7, 1179, 2048 }, { 6, 1180, 2048 }, { 7, 1181, 2048 }, { 7, 1182, 2048 }, { 8, 1183, 2048 }, + { 4, 1184, 2048 }, { 5, 1185, 2048 }, { 5, 1186, 2048 }, { 6, 1187, 2048 }, { 5, 1188, 2048 }, { 6, 1189, 2048 }, { 6, 1190, 2048 }, { 7, 1191, 2048 }, + { 5, 1192, 2048 }, { 6, 1193, 2048 }, { 6, 1194, 2048 }, { 7, 1195, 2048 }, { 6, 1196, 2048 }, { 7, 1197, 2048 }, { 7, 1198, 2048 }, { 8, 1199, 2048 }, + { 5, 1200, 2048 }, { 6, 1201, 2048 }, { 6, 1202, 2048 }, { 7, 1203, 2048 }, { 6, 1204, 2048 }, { 7, 1205, 2048 }, { 7, 1206, 2048 }, { 8, 1207, 2048 }, + { 6, 1208, 2048 }, { 7, 1209, 2048 }, { 7, 1210, 2048 }, { 8, 1211, 2048 }, { 7, 1212, 2048 }, { 8, 1213, 2048 }, { 8, 1214, 2048 }, { 9, 1215, 2048 }, + { 4, 1216, 2048 }, { 5, 1217, 2048 }, { 5, 1218, 2048 }, { 6, 1219, 2048 }, { 5, 1220, 2048 }, { 6, 1221, 2048 }, { 6, 1222, 2048 }, { 7, 1223, 2048 }, + { 5, 1224, 2048 }, { 6, 1225, 2048 }, { 6, 1226, 2048 }, { 7, 1227, 2048 }, { 6, 1228, 2048 }, { 7, 1229, 2048 }, { 7, 1230, 2048 }, { 8, 1231, 2048 }, + { 5, 1232, 2048 }, { 6, 1233, 2048 }, { 6, 1234, 2048 }, { 7, 1235, 2048 }, { 6, 1236, 2048 }, { 7, 1237, 2048 }, { 7, 1238, 2048 }, { 8, 1239, 2048 }, + { 6, 1240, 2048 }, { 7, 1241, 2048 }, { 7, 1242, 2048 }, { 8, 1243, 2048 }, { 7, 1244, 2048 }, { 8, 1245, 2048 }, { 8, 1246, 2048 }, { 9, 1247, 2048 }, + { 5, 1248, 2048 }, { 6, 1249, 2048 }, { 6, 1250, 2048 }, { 7, 1251, 2048 }, { 6, 1252, 2048 }, { 7, 1253, 2048 }, { 7, 1254, 2048 }, { 8, 1255, 2048 }, + { 6, 1256, 2048 }, { 7, 1257, 2048 }, { 7, 1258, 2048 }, { 8, 1259, 2048 }, { 7, 1260, 2048 }, { 8, 1261, 2048 }, { 8, 1262, 2048 }, { 9, 1263, 2048 }, + { 6, 1264, 2048 }, { 7, 1265, 2048 }, { 7, 1266, 2048 }, { 8, 1267, 2048 }, { 7, 1268, 2048 }, { 8, 1269, 2048 }, { 8, 1270, 2048 }, { 9, 1271, 2048 }, + { 7, 1272, 2048 }, { 8, 1273, 2048 }, { 8, 1274, 2048 }, { 9, 1275, 2048 }, { 8, 1276, 2048 }, { 9, 1277, 2048 }, { 9, 1278, 2048 }, { 10, 1279, 2048 }, + { 3, 1280, 2048 }, { 4, 1281, 2048 }, { 4, 1282, 2048 }, { 5, 1283, 2048 }, { 4, 1284, 2048 }, { 5, 1285, 2048 }, { 5, 1286, 2048 }, { 6, 1287, 2048 }, + { 4, 1288, 2048 }, { 5, 1289, 2048 }, { 5, 1290, 2048 }, { 6, 1291, 2048 }, { 5, 1292, 2048 }, { 6, 1293, 2048 }, { 6, 1294, 2048 }, { 7, 1295, 2048 }, + { 4, 1296, 2048 }, { 5, 1297, 2048 }, { 5, 1298, 2048 }, { 6, 1299, 2048 }, { 5, 1300, 2048 }, { 6, 1301, 2048 }, { 6, 1302, 2048 }, { 7, 1303, 2048 }, + { 5, 1304, 2048 }, { 6, 1305, 2048 }, { 6, 1306, 2048 }, { 7, 1307, 2048 }, { 6, 1308, 2048 }, { 7, 1309, 2048 }, { 7, 1310, 2048 }, { 8, 1311, 2048 }, + { 4, 1312, 2048 }, { 5, 1313, 2048 }, { 5, 1314, 2048 }, { 6, 1315, 2048 }, { 5, 1316, 2048 }, { 6, 1317, 2048 }, { 6, 1318, 2048 }, { 7, 1319, 2048 }, + { 5, 1320, 2048 }, { 6, 1321, 2048 }, { 6, 1322, 2048 }, { 7, 1323, 2048 }, { 6, 1324, 2048 }, { 7, 1325, 2048 }, { 7, 1326, 2048 }, { 8, 1327, 2048 }, + { 5, 1328, 2048 }, { 6, 1329, 2048 }, { 6, 1330, 2048 }, { 7, 1331, 2048 }, { 6, 1332, 2048 }, { 7, 1333, 2048 }, { 7, 1334, 2048 }, { 8, 1335, 2048 }, + { 6, 1336, 2048 }, { 7, 1337, 2048 }, { 7, 1338, 2048 }, { 8, 1339, 2048 }, { 7, 1340, 2048 }, { 8, 1341, 2048 }, { 8, 1342, 2048 }, { 9, 1343, 2048 }, + { 4, 1344, 2048 }, { 5, 1345, 2048 }, { 5, 1346, 2048 }, { 6, 1347, 2048 }, { 5, 1348, 2048 }, { 6, 1349, 2048 }, { 6, 1350, 2048 }, { 7, 1351, 2048 }, + { 5, 1352, 2048 }, { 6, 1353, 2048 }, { 6, 1354, 2048 }, { 7, 1355, 2048 }, { 6, 1356, 2048 }, { 7, 1357, 2048 }, { 7, 1358, 2048 }, { 8, 1359, 2048 }, + { 5, 1360, 2048 }, { 6, 1361, 2048 }, { 6, 1362, 2048 }, { 7, 1363, 2048 }, { 6, 1364, 2048 }, { 7, 1365, 2048 }, { 7, 1366, 2048 }, { 8, 1367, 2048 }, + { 6, 1368, 2048 }, { 7, 1369, 2048 }, { 7, 1370, 2048 }, { 8, 1371, 2048 }, { 7, 1372, 2048 }, { 8, 1373, 2048 }, { 8, 1374, 2048 }, { 9, 1375, 2048 }, + { 5, 1376, 2048 }, { 6, 1377, 2048 }, { 6, 1378, 2048 }, { 7, 1379, 2048 }, { 6, 1380, 2048 }, { 7, 1381, 2048 }, { 7, 1382, 2048 }, { 8, 1383, 2048 }, + { 6, 1384, 2048 }, { 7, 1385, 2048 }, { 7, 1386, 2048 }, { 8, 1387, 2048 }, { 7, 1388, 2048 }, { 8, 1389, 2048 }, { 8, 1390, 2048 }, { 9, 1391, 2048 }, + { 6, 1392, 2048 }, { 7, 1393, 2048 }, { 7, 1394, 2048 }, { 8, 1395, 2048 }, { 7, 1396, 2048 }, { 8, 1397, 2048 }, { 8, 1398, 2048 }, { 9, 1399, 2048 }, + { 7, 1400, 2048 }, { 8, 1401, 2048 }, { 8, 1402, 2048 }, { 9, 1403, 2048 }, { 8, 1404, 2048 }, { 9, 1405, 2048 }, { 9, 1406, 2048 }, { 10, 1407, 2048 }, + { 4, 1408, 2048 }, { 5, 1409, 2048 }, { 5, 1410, 2048 }, { 6, 1411, 2048 }, { 5, 1412, 2048 }, { 6, 1413, 2048 }, { 6, 1414, 2048 }, { 7, 1415, 2048 }, + { 5, 1416, 2048 }, { 6, 1417, 2048 }, { 6, 1418, 2048 }, { 7, 1419, 2048 }, { 6, 1420, 2048 }, { 7, 1421, 2048 }, { 7, 1422, 2048 }, { 8, 1423, 2048 }, + { 5, 1424, 2048 }, { 6, 1425, 2048 }, { 6, 1426, 2048 }, { 7, 1427, 2048 }, { 6, 1428, 2048 }, { 7, 1429, 2048 }, { 7, 1430, 2048 }, { 8, 1431, 2048 }, + { 6, 1432, 2048 }, { 7, 1433, 2048 }, { 7, 1434, 2048 }, { 8, 1435, 2048 }, { 7, 1436, 2048 }, { 8, 1437, 2048 }, { 8, 1438, 2048 }, { 9, 1439, 2048 }, + { 5, 1440, 2048 }, { 6, 1441, 2048 }, { 6, 1442, 2048 }, { 7, 1443, 2048 }, { 6, 1444, 2048 }, { 7, 1445, 2048 }, { 7, 1446, 2048 }, { 8, 1447, 2048 }, + { 6, 1448, 2048 }, { 7, 1449, 2048 }, { 7, 1450, 2048 }, { 8, 1451, 2048 }, { 7, 1452, 2048 }, { 8, 1453, 2048 }, { 8, 1454, 2048 }, { 9, 1455, 2048 }, + { 6, 1456, 2048 }, { 7, 1457, 2048 }, { 7, 1458, 2048 }, { 8, 1459, 2048 }, { 7, 1460, 2048 }, { 8, 1461, 2048 }, { 8, 1462, 2048 }, { 9, 1463, 2048 }, + { 7, 1464, 2048 }, { 8, 1465, 2048 }, { 8, 1466, 2048 }, { 9, 1467, 2048 }, { 8, 1468, 2048 }, { 9, 1469, 2048 }, { 9, 1470, 2048 }, { 10, 1471, 2048 }, + { 5, 1472, 2048 }, { 6, 1473, 2048 }, { 6, 1474, 2048 }, { 7, 1475, 2048 }, { 6, 1476, 2048 }, { 7, 1477, 2048 }, { 7, 1478, 2048 }, { 8, 1479, 2048 }, + { 6, 1480, 2048 }, { 7, 1481, 2048 }, { 7, 1482, 2048 }, { 8, 1483, 2048 }, { 7, 1484, 2048 }, { 8, 1485, 2048 }, { 8, 1486, 2048 }, { 9, 1487, 2048 }, + { 6, 1488, 2048 }, { 7, 1489, 2048 }, { 7, 1490, 2048 }, { 8, 1491, 2048 }, { 7, 1492, 2048 }, { 8, 1493, 2048 }, { 8, 1494, 2048 }, { 9, 1495, 2048 }, + { 7, 1496, 2048 }, { 8, 1497, 2048 }, { 8, 1498, 2048 }, { 9, 1499, 2048 }, { 8, 1500, 2048 }, { 9, 1501, 2048 }, { 9, 1502, 2048 }, { 10, 1503, 2048 }, + { 6, 1504, 2048 }, { 7, 1505, 2048 }, { 7, 1506, 2048 }, { 8, 1507, 2048 }, { 7, 1508, 2048 }, { 8, 1509, 2048 }, { 8, 1510, 2048 }, { 9, 1511, 2048 }, + { 7, 1512, 2048 }, { 8, 1513, 2048 }, { 8, 1514, 2048 }, { 9, 1515, 2048 }, { 8, 1516, 2048 }, { 9, 1517, 2048 }, { 9, 1518, 2048 }, { 10, 1519, 2048 }, + { 7, 1520, 2048 }, { 8, 1521, 2048 }, { 8, 1522, 2048 }, { 9, 1523, 2048 }, { 8, 1524, 2048 }, { 9, 1525, 2048 }, { 9, 1526, 2048 }, { 10, 1527, 2048 }, + { 8, 1528, 2048 }, { 9, 1529, 2048 }, { 9, 1530, 2048 }, { 10, 1531, 2048 }, { 9, 1532, 2048 }, { 10, 1533, 2048 }, { 10, 1534, 2048 }, { 11, 1535, 2048 }, + { 3, 1536, 2048 }, { 4, 1537, 2048 }, { 4, 1538, 2048 }, { 5, 1539, 2048 }, { 4, 1540, 2048 }, { 5, 1541, 2048 }, { 5, 1542, 2048 }, { 6, 1543, 2048 }, + { 4, 1544, 2048 }, { 5, 1545, 2048 }, { 5, 1546, 2048 }, { 6, 1547, 2048 }, { 5, 1548, 2048 }, { 6, 1549, 2048 }, { 6, 1550, 2048 }, { 7, 1551, 2048 }, + { 4, 1552, 2048 }, { 5, 1553, 2048 }, { 5, 1554, 2048 }, { 6, 1555, 2048 }, { 5, 1556, 2048 }, { 6, 1557, 2048 }, { 6, 1558, 2048 }, { 7, 1559, 2048 }, + { 5, 1560, 2048 }, { 6, 1561, 2048 }, { 6, 1562, 2048 }, { 7, 1563, 2048 }, { 6, 1564, 2048 }, { 7, 1565, 2048 }, { 7, 1566, 2048 }, { 8, 1567, 2048 }, + { 4, 1568, 2048 }, { 5, 1569, 2048 }, { 5, 1570, 2048 }, { 6, 1571, 2048 }, { 5, 1572, 2048 }, { 6, 1573, 2048 }, { 6, 1574, 2048 }, { 7, 1575, 2048 }, + { 5, 1576, 2048 }, { 6, 1577, 2048 }, { 6, 1578, 2048 }, { 7, 1579, 2048 }, { 6, 1580, 2048 }, { 7, 1581, 2048 }, { 7, 1582, 2048 }, { 8, 1583, 2048 }, + { 5, 1584, 2048 }, { 6, 1585, 2048 }, { 6, 1586, 2048 }, { 7, 1587, 2048 }, { 6, 1588, 2048 }, { 7, 1589, 2048 }, { 7, 1590, 2048 }, { 8, 1591, 2048 }, + { 6, 1592, 2048 }, { 7, 1593, 2048 }, { 7, 1594, 2048 }, { 8, 1595, 2048 }, { 7, 1596, 2048 }, { 8, 1597, 2048 }, { 8, 1598, 2048 }, { 9, 1599, 2048 }, + { 4, 1600, 2048 }, { 5, 1601, 2048 }, { 5, 1602, 2048 }, { 6, 1603, 2048 }, { 5, 1604, 2048 }, { 6, 1605, 2048 }, { 6, 1606, 2048 }, { 7, 1607, 2048 }, + { 5, 1608, 2048 }, { 6, 1609, 2048 }, { 6, 1610, 2048 }, { 7, 1611, 2048 }, { 6, 1612, 2048 }, { 7, 1613, 2048 }, { 7, 1614, 2048 }, { 8, 1615, 2048 }, + { 5, 1616, 2048 }, { 6, 1617, 2048 }, { 6, 1618, 2048 }, { 7, 1619, 2048 }, { 6, 1620, 2048 }, { 7, 1621, 2048 }, { 7, 1622, 2048 }, { 8, 1623, 2048 }, + { 6, 1624, 2048 }, { 7, 1625, 2048 }, { 7, 1626, 2048 }, { 8, 1627, 2048 }, { 7, 1628, 2048 }, { 8, 1629, 2048 }, { 8, 1630, 2048 }, { 9, 1631, 2048 }, + { 5, 1632, 2048 }, { 6, 1633, 2048 }, { 6, 1634, 2048 }, { 7, 1635, 2048 }, { 6, 1636, 2048 }, { 7, 1637, 2048 }, { 7, 1638, 2048 }, { 8, 1639, 2048 }, + { 6, 1640, 2048 }, { 7, 1641, 2048 }, { 7, 1642, 2048 }, { 8, 1643, 2048 }, { 7, 1644, 2048 }, { 8, 1645, 2048 }, { 8, 1646, 2048 }, { 9, 1647, 2048 }, + { 6, 1648, 2048 }, { 7, 1649, 2048 }, { 7, 1650, 2048 }, { 8, 1651, 2048 }, { 7, 1652, 2048 }, { 8, 1653, 2048 }, { 8, 1654, 2048 }, { 9, 1655, 2048 }, + { 7, 1656, 2048 }, { 8, 1657, 2048 }, { 8, 1658, 2048 }, { 9, 1659, 2048 }, { 8, 1660, 2048 }, { 9, 1661, 2048 }, { 9, 1662, 2048 }, { 10, 1663, 2048 }, + { 4, 1664, 2048 }, { 5, 1665, 2048 }, { 5, 1666, 2048 }, { 6, 1667, 2048 }, { 5, 1668, 2048 }, { 6, 1669, 2048 }, { 6, 1670, 2048 }, { 7, 1671, 2048 }, + { 5, 1672, 2048 }, { 6, 1673, 2048 }, { 6, 1674, 2048 }, { 7, 1675, 2048 }, { 6, 1676, 2048 }, { 7, 1677, 2048 }, { 7, 1678, 2048 }, { 8, 1679, 2048 }, + { 5, 1680, 2048 }, { 6, 1681, 2048 }, { 6, 1682, 2048 }, { 7, 1683, 2048 }, { 6, 1684, 2048 }, { 7, 1685, 2048 }, { 7, 1686, 2048 }, { 8, 1687, 2048 }, + { 6, 1688, 2048 }, { 7, 1689, 2048 }, { 7, 1690, 2048 }, { 8, 1691, 2048 }, { 7, 1692, 2048 }, { 8, 1693, 2048 }, { 8, 1694, 2048 }, { 9, 1695, 2048 }, + { 5, 1696, 2048 }, { 6, 1697, 2048 }, { 6, 1698, 2048 }, { 7, 1699, 2048 }, { 6, 1700, 2048 }, { 7, 1701, 2048 }, { 7, 1702, 2048 }, { 8, 1703, 2048 }, + { 6, 1704, 2048 }, { 7, 1705, 2048 }, { 7, 1706, 2048 }, { 8, 1707, 2048 }, { 7, 1708, 2048 }, { 8, 1709, 2048 }, { 8, 1710, 2048 }, { 9, 1711, 2048 }, + { 6, 1712, 2048 }, { 7, 1713, 2048 }, { 7, 1714, 2048 }, { 8, 1715, 2048 }, { 7, 1716, 2048 }, { 8, 1717, 2048 }, { 8, 1718, 2048 }, { 9, 1719, 2048 }, + { 7, 1720, 2048 }, { 8, 1721, 2048 }, { 8, 1722, 2048 }, { 9, 1723, 2048 }, { 8, 1724, 2048 }, { 9, 1725, 2048 }, { 9, 1726, 2048 }, { 10, 1727, 2048 }, + { 5, 1728, 2048 }, { 6, 1729, 2048 }, { 6, 1730, 2048 }, { 7, 1731, 2048 }, { 6, 1732, 2048 }, { 7, 1733, 2048 }, { 7, 1734, 2048 }, { 8, 1735, 2048 }, + { 6, 1736, 2048 }, { 7, 1737, 2048 }, { 7, 1738, 2048 }, { 8, 1739, 2048 }, { 7, 1740, 2048 }, { 8, 1741, 2048 }, { 8, 1742, 2048 }, { 9, 1743, 2048 }, + { 6, 1744, 2048 }, { 7, 1745, 2048 }, { 7, 1746, 2048 }, { 8, 1747, 2048 }, { 7, 1748, 2048 }, { 8, 1749, 2048 }, { 8, 1750, 2048 }, { 9, 1751, 2048 }, + { 7, 1752, 2048 }, { 8, 1753, 2048 }, { 8, 1754, 2048 }, { 9, 1755, 2048 }, { 8, 1756, 2048 }, { 9, 1757, 2048 }, { 9, 1758, 2048 }, { 10, 1759, 2048 }, + { 6, 1760, 2048 }, { 7, 1761, 2048 }, { 7, 1762, 2048 }, { 8, 1763, 2048 }, { 7, 1764, 2048 }, { 8, 1765, 2048 }, { 8, 1766, 2048 }, { 9, 1767, 2048 }, + { 7, 1768, 2048 }, { 8, 1769, 2048 }, { 8, 1770, 2048 }, { 9, 1771, 2048 }, { 8, 1772, 2048 }, { 9, 1773, 2048 }, { 9, 1774, 2048 }, { 10, 1775, 2048 }, + { 7, 1776, 2048 }, { 8, 1777, 2048 }, { 8, 1778, 2048 }, { 9, 1779, 2048 }, { 8, 1780, 2048 }, { 9, 1781, 2048 }, { 9, 1782, 2048 }, { 10, 1783, 2048 }, + { 8, 1784, 2048 }, { 9, 1785, 2048 }, { 9, 1786, 2048 }, { 10, 1787, 2048 }, { 9, 1788, 2048 }, { 10, 1789, 2048 }, { 10, 1790, 2048 }, { 11, 1791, 2048 }, + { 4, 1792, 2048 }, { 5, 1793, 2048 }, { 5, 1794, 2048 }, { 6, 1795, 2048 }, { 5, 1796, 2048 }, { 6, 1797, 2048 }, { 6, 1798, 2048 }, { 7, 1799, 2048 }, + { 5, 1800, 2048 }, { 6, 1801, 2048 }, { 6, 1802, 2048 }, { 7, 1803, 2048 }, { 6, 1804, 2048 }, { 7, 1805, 2048 }, { 7, 1806, 2048 }, { 8, 1807, 2048 }, + { 5, 1808, 2048 }, { 6, 1809, 2048 }, { 6, 1810, 2048 }, { 7, 1811, 2048 }, { 6, 1812, 2048 }, { 7, 1813, 2048 }, { 7, 1814, 2048 }, { 8, 1815, 2048 }, + { 6, 1816, 2048 }, { 7, 1817, 2048 }, { 7, 1818, 2048 }, { 8, 1819, 2048 }, { 7, 1820, 2048 }, { 8, 1821, 2048 }, { 8, 1822, 2048 }, { 9, 1823, 2048 }, + { 5, 1824, 2048 }, { 6, 1825, 2048 }, { 6, 1826, 2048 }, { 7, 1827, 2048 }, { 6, 1828, 2048 }, { 7, 1829, 2048 }, { 7, 1830, 2048 }, { 8, 1831, 2048 }, + { 6, 1832, 2048 }, { 7, 1833, 2048 }, { 7, 1834, 2048 }, { 8, 1835, 2048 }, { 7, 1836, 2048 }, { 8, 1837, 2048 }, { 8, 1838, 2048 }, { 9, 1839, 2048 }, + { 6, 1840, 2048 }, { 7, 1841, 2048 }, { 7, 1842, 2048 }, { 8, 1843, 2048 }, { 7, 1844, 2048 }, { 8, 1845, 2048 }, { 8, 1846, 2048 }, { 9, 1847, 2048 }, + { 7, 1848, 2048 }, { 8, 1849, 2048 }, { 8, 1850, 2048 }, { 9, 1851, 2048 }, { 8, 1852, 2048 }, { 9, 1853, 2048 }, { 9, 1854, 2048 }, { 10, 1855, 2048 }, + { 5, 1856, 2048 }, { 6, 1857, 2048 }, { 6, 1858, 2048 }, { 7, 1859, 2048 }, { 6, 1860, 2048 }, { 7, 1861, 2048 }, { 7, 1862, 2048 }, { 8, 1863, 2048 }, + { 6, 1864, 2048 }, { 7, 1865, 2048 }, { 7, 1866, 2048 }, { 8, 1867, 2048 }, { 7, 1868, 2048 }, { 8, 1869, 2048 }, { 8, 1870, 2048 }, { 9, 1871, 2048 }, + { 6, 1872, 2048 }, { 7, 1873, 2048 }, { 7, 1874, 2048 }, { 8, 1875, 2048 }, { 7, 1876, 2048 }, { 8, 1877, 2048 }, { 8, 1878, 2048 }, { 9, 1879, 2048 }, + { 7, 1880, 2048 }, { 8, 1881, 2048 }, { 8, 1882, 2048 }, { 9, 1883, 2048 }, { 8, 1884, 2048 }, { 9, 1885, 2048 }, { 9, 1886, 2048 }, { 10, 1887, 2048 }, + { 6, 1888, 2048 }, { 7, 1889, 2048 }, { 7, 1890, 2048 }, { 8, 1891, 2048 }, { 7, 1892, 2048 }, { 8, 1893, 2048 }, { 8, 1894, 2048 }, { 9, 1895, 2048 }, + { 7, 1896, 2048 }, { 8, 1897, 2048 }, { 8, 1898, 2048 }, { 9, 1899, 2048 }, { 8, 1900, 2048 }, { 9, 1901, 2048 }, { 9, 1902, 2048 }, { 10, 1903, 2048 }, + { 7, 1904, 2048 }, { 8, 1905, 2048 }, { 8, 1906, 2048 }, { 9, 1907, 2048 }, { 8, 1908, 2048 }, { 9, 1909, 2048 }, { 9, 1910, 2048 }, { 10, 1911, 2048 }, + { 8, 1912, 2048 }, { 9, 1913, 2048 }, { 9, 1914, 2048 }, { 10, 1915, 2048 }, { 9, 1916, 2048 }, { 10, 1917, 2048 }, { 10, 1918, 2048 }, { 11, 1919, 2048 }, + { 5, 1920, 2048 }, { 6, 1921, 2048 }, { 6, 1922, 2048 }, { 7, 1923, 2048 }, { 6, 1924, 2048 }, { 7, 1925, 2048 }, { 7, 1926, 2048 }, { 8, 1927, 2048 }, + { 6, 1928, 2048 }, { 7, 1929, 2048 }, { 7, 1930, 2048 }, { 8, 1931, 2048 }, { 7, 1932, 2048 }, { 8, 1933, 2048 }, { 8, 1934, 2048 }, { 9, 1935, 2048 }, + { 6, 1936, 2048 }, { 7, 1937, 2048 }, { 7, 1938, 2048 }, { 8, 1939, 2048 }, { 7, 1940, 2048 }, { 8, 1941, 2048 }, { 8, 1942, 2048 }, { 9, 1943, 2048 }, + { 7, 1944, 2048 }, { 8, 1945, 2048 }, { 8, 1946, 2048 }, { 9, 1947, 2048 }, { 8, 1948, 2048 }, { 9, 1949, 2048 }, { 9, 1950, 2048 }, { 10, 1951, 2048 }, + { 6, 1952, 2048 }, { 7, 1953, 2048 }, { 7, 1954, 2048 }, { 8, 1955, 2048 }, { 7, 1956, 2048 }, { 8, 1957, 2048 }, { 8, 1958, 2048 }, { 9, 1959, 2048 }, + { 7, 1960, 2048 }, { 8, 1961, 2048 }, { 8, 1962, 2048 }, { 9, 1963, 2048 }, { 8, 1964, 2048 }, { 9, 1965, 2048 }, { 9, 1966, 2048 }, { 10, 1967, 2048 }, + { 7, 1968, 2048 }, { 8, 1969, 2048 }, { 8, 1970, 2048 }, { 9, 1971, 2048 }, { 8, 1972, 2048 }, { 9, 1973, 2048 }, { 9, 1974, 2048 }, { 10, 1975, 2048 }, + { 8, 1976, 2048 }, { 9, 1977, 2048 }, { 9, 1978, 2048 }, { 10, 1979, 2048 }, { 9, 1980, 2048 }, { 10, 1981, 2048 }, { 10, 1982, 2048 }, { 11, 1983, 2048 }, + { 6, 1984, 2048 }, { 7, 1985, 2048 }, { 7, 1986, 2048 }, { 8, 1987, 2048 }, { 7, 1988, 2048 }, { 8, 1989, 2048 }, { 8, 1990, 2048 }, { 9, 1991, 2048 }, + { 7, 1992, 2048 }, { 8, 1993, 2048 }, { 8, 1994, 2048 }, { 9, 1995, 2048 }, { 8, 1996, 2048 }, { 9, 1997, 2048 }, { 9, 1998, 2048 }, { 10, 1999, 2048 }, + { 7, 2000, 2048 }, { 8, 2001, 2048 }, { 8, 2002, 2048 }, { 9, 2003, 2048 }, { 8, 2004, 2048 }, { 9, 2005, 2048 }, { 9, 2006, 2048 }, { 10, 2007, 2048 }, + { 8, 2008, 2048 }, { 9, 2009, 2048 }, { 9, 2010, 2048 }, { 10, 2011, 2048 }, { 9, 2012, 2048 }, { 10, 2013, 2048 }, { 10, 2014, 2048 }, { 11, 2015, 2048 }, + { 7, 2016, 2048 }, { 8, 2017, 2048 }, { 8, 2018, 2048 }, { 9, 2019, 2048 }, { 8, 2020, 2048 }, { 9, 2021, 2048 }, { 9, 2022, 2048 }, { 10, 2023, 2048 }, + { 8, 2024, 2048 }, { 9, 2025, 2048 }, { 9, 2026, 2048 }, { 10, 2027, 2048 }, { 9, 2028, 2048 }, { 10, 2029, 2048 }, { 10, 2030, 2048 }, { 11, 2031, 2048 }, + { 8, 2032, 2048 }, { 9, 2033, 2048 }, { 9, 2034, 2048 }, { 10, 2035, 2048 }, { 9, 2036, 2048 }, { 10, 2037, 2048 }, { 10, 2038, 2048 }, { 11, 2039, 2048 }, + { 9, 2040, 2048 }, { 10, 2041, 2048 }, { 10, 2042, 2048 }, { 11, 2043, 2048 }, { 10, 2044, 2048 }, { 11, 2045, 2048 }, { 11, 2046, 2048 }, { 12, 2047, 2048 }, +#endif +#endif +#endif +#endif +#endif +#endif +}; + +/* find a hole and free as required, return -1 if no hole found */ +static int find_hole(void) +{ + unsigned x; + int y, z; + for (z = -1, y = INT_MAX, x = 0; x < FP_ENTRIES; x++) { + if (fp_cache[x].lru_count < y && fp_cache[x].lock == 0) { + z = x; + y = fp_cache[x].lru_count; + } + } + + /* decrease all */ + for (x = 0; x < FP_ENTRIES; x++) { + if (fp_cache[x].lru_count > 3) { + --(fp_cache[x].lru_count); + } + } + + /* free entry z */ + if (z >= 0 && fp_cache[z].g) { + mp_clear(&fp_cache[z].mu); + ecc_del_point(fp_cache[z].g); + fp_cache[z].g = NULL; + for (x = 0; x < (1U<x, &g->x) == MP_EQ && + mp_cmp(&fp_cache[x].g->y, &g->y) == MP_EQ && + mp_cmp(&fp_cache[x].g->z, &g->z) == MP_EQ) { + break; + } + } + if (x == FP_ENTRIES) { + x = -1; + } + return x; +} + +/* add a new base to the cache */ +static int add_entry(int idx, ecc_point *g) +{ + unsigned x, y; + + /* allocate base and LUT */ + fp_cache[idx].g = ecc_new_point(); + if (fp_cache[idx].g == NULL) { + return GEN_MEM_ERR; + } + + /* copy x and y */ + if ((mp_copy(&g->x, &fp_cache[idx].g->x) != MP_OKAY) || + (mp_copy(&g->y, &fp_cache[idx].g->y) != MP_OKAY) || + (mp_copy(&g->z, &fp_cache[idx].g->z) != MP_OKAY)) { + ecc_del_point(fp_cache[idx].g); + fp_cache[idx].g = NULL; + return GEN_MEM_ERR; + } + + for (x = 0; x < (1U<x, mu, modulus, + &fp_cache[idx].LUT[1]->x) != MP_OKAY) || + (mp_mulmod(&fp_cache[idx].g->y, mu, modulus, + &fp_cache[idx].LUT[1]->y) != MP_OKAY) || + (mp_mulmod(&fp_cache[idx].g->z, mu, modulus, + &fp_cache[idx].LUT[1]->z) != MP_OKAY)) { + err = MP_MULMOD_E; + } + } + + /* make all single bit entries */ + for (x = 1; x < FP_LUT; x++) { + if (err != MP_OKAY) + break; + if ((mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->x, + &fp_cache[idx].LUT[1<x) != MP_OKAY) || + (mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->y, + &fp_cache[idx].LUT[1<y) != MP_OKAY) || + (mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->z, + &fp_cache[idx].LUT[1<z) != MP_OKAY)){ + err = MP_INIT_E; + break; + } else { + + /* now double it bitlen/FP_LUT times */ + for (y = 0; y < lut_gap; y++) { + if ((err = ecc_projective_dbl_point(fp_cache[idx].LUT[1<z, modulus, *mp); + + /* invert it */ + if (err == MP_OKAY) + err = mp_invmod(&fp_cache[idx].LUT[x]->z, modulus, + &fp_cache[idx].LUT[x]->z); + + if (err == MP_OKAY) + /* now square it */ + err = mp_sqrmod(&fp_cache[idx].LUT[x]->z, modulus, &tmp); + + if (err == MP_OKAY) + /* fix x */ + err = mp_mulmod(&fp_cache[idx].LUT[x]->x, &tmp, modulus, + &fp_cache[idx].LUT[x]->x); + + if (err == MP_OKAY) + /* get 1/z^3 */ + err = mp_mulmod(&tmp, &fp_cache[idx].LUT[x]->z, modulus, &tmp); + + if (err == MP_OKAY) + /* fix y */ + err = mp_mulmod(&fp_cache[idx].LUT[x]->y, &tmp, modulus, + &fp_cache[idx].LUT[x]->y); + + if (err == MP_OKAY) + /* free z */ + mp_clear(&fp_cache[idx].LUT[x]->z); + } + mp_clear(&tmp); + + if (err == MP_OKAY) + return MP_OKAY; + + /* err cleanup */ + for (y = 0; y < (1U< mp_unsigned_bin_size(modulus)) { + mp_int order; + if (mp_init(&order) != MP_OKAY) { + mp_clear(&tk); + return MP_INIT_E; + } + + /* find order */ + y = mp_unsigned_bin_size(modulus); + for (x = 0; ecc_sets[x].size; x++) { + if (y <= (unsigned)ecc_sets[x].size) break; + } + + /* back off if we are on the 521 bit curve */ + if (y == 66) --x; + + if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { + mp_clear(&order); + mp_clear(&tk); + return err; + } + + /* k must be less than modulus */ + if (mp_cmp(k, &order) != MP_LT) { + if ((err = mp_mod(k, &order, &tk)) != MP_OKAY) { + mp_clear(&tk); + mp_clear(&order); + return err; + } + } else { + mp_copy(k, &tk); + } + mp_clear(&order); + } else { + mp_copy(k, &tk); + } + + /* get bitlen and round up to next multiple of FP_LUT */ + bitlen = mp_unsigned_bin_size(modulus) << 3; + x = bitlen % FP_LUT; + if (x) { + bitlen += FP_LUT - x; + } + lut_gap = bitlen / FP_LUT; + + /* get the k value */ + if (mp_unsigned_bin_size(&tk) > (int)(KB_SIZE - 2)) { + mp_clear(&tk); + return BUFFER_E; + } + + /* store k */ +#ifdef CYASSL_SMALL_STACK + kb = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (kb == NULL) + return MEMORY_E; +#endif + + XMEMSET(kb, 0, KB_SIZE); + if ((err = mp_to_unsigned_bin(&tk, kb)) != MP_OKAY) { + mp_clear(&tk); + } + else { + /* let's reverse kb so it's little endian */ + x = 0; + y = mp_unsigned_bin_size(&tk) - 1; + mp_clear(&tk); + + while ((unsigned)x < y) { + z = kb[x]; kb[x] = kb[y]; kb[y] = z; + ++x; --y; + } + + /* at this point we can start, yipee */ + first = 1; + for (x = lut_gap-1; x >= 0; x--) { + /* extract FP_LUT bits from kb spread out by lut_gap bits and offset + by x bits from the start */ + bitpos = x; + for (y = z = 0; y < FP_LUT; y++) { + z |= ((kb[bitpos>>3] >> (bitpos&7)) & 1) << y; + bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid + the mult in each loop */ + } + + /* double if not first */ + if (!first) { + if ((err = ecc_projective_dbl_point(R, R, modulus, + mp)) != MP_OKAY) { + break; + } + } + + /* add if not first, otherwise copy */ + if (!first && z) { + if ((err = ecc_projective_add_point(R, fp_cache[idx].LUT[z], R, + modulus, mp)) != MP_OKAY) { + break; + } + } else if (z) { + if ((mp_copy(&fp_cache[idx].LUT[z]->x, &R->x) != MP_OKAY) || + (mp_copy(&fp_cache[idx].LUT[z]->y, &R->y) != MP_OKAY) || + (mp_copy(&fp_cache[idx].mu, &R->z) != MP_OKAY)) { + err = GEN_MEM_ERR; + break; + } + first = 0; + } + } + } + + if (err == MP_OKAY) { + z = 0; + XMEMSET(kb, 0, KB_SIZE); + /* map R back from projective space */ + if (map) { + err = ecc_map(R, modulus, mp); + } else { + err = MP_OKAY; + } + } + +#ifdef CYASSL_SMALL_STACK + XFREE(kb, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + +#undef KB_SIZE + + return err; +} + +#ifdef ECC_SHAMIR +/* perform a fixed point ECC mulmod */ +static int accel_fp_mul2add(int idx1, int idx2, + mp_int* kA, mp_int* kB, + ecc_point *R, mp_int* modulus, mp_digit* mp) +{ +#define KB_SIZE 128 + +#ifdef CYASSL_SMALL_STACK + unsigned char* kb[2]; +#else + unsigned char kb[2][128]; +#endif + int x; + unsigned y, z, err, bitlen, bitpos, lut_gap, first, zA, zB; + mp_int tka; + mp_int tkb; + mp_int order; + + if (mp_init_multi(&tka, &tkb, 0, 0, 0, 0) != MP_OKAY) + return MP_INIT_E; + + /* if it's smaller than modulus we fine */ + if (mp_unsigned_bin_size(kA) > mp_unsigned_bin_size(modulus)) { + /* find order */ + y = mp_unsigned_bin_size(modulus); + for (x = 0; ecc_sets[x].size; x++) { + if (y <= (unsigned)ecc_sets[x].size) break; + } + + /* back off if we are on the 521 bit curve */ + if (y == 66) --x; + + if ((err = mp_init(&order)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + return err; + } + if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + mp_clear(&order); + return err; + } + + /* kA must be less than modulus */ + if (mp_cmp(kA, &order) != MP_LT) { + if ((err = mp_mod(kA, &order, &tka)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + mp_clear(&order); + return err; + } + } else { + mp_copy(kA, &tka); + } + mp_clear(&order); + } else { + mp_copy(kA, &tka); + } + + /* if it's smaller than modulus we fine */ + if (mp_unsigned_bin_size(kB) > mp_unsigned_bin_size(modulus)) { + /* find order */ + y = mp_unsigned_bin_size(modulus); + for (x = 0; ecc_sets[x].size; x++) { + if (y <= (unsigned)ecc_sets[x].size) break; + } + + /* back off if we are on the 521 bit curve */ + if (y == 66) --x; + + if ((err = mp_init(&order)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + return err; + } + if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + mp_clear(&order); + return err; + } + + /* kB must be less than modulus */ + if (mp_cmp(kB, &order) != MP_LT) { + if ((err = mp_mod(kB, &order, &tkb)) != MP_OKAY) { + mp_clear(&tkb); + mp_clear(&tka); + mp_clear(&order); + return err; + } + } else { + mp_copy(kB, &tkb); + } + mp_clear(&order); + } else { + mp_copy(kB, &tkb); + } + + /* get bitlen and round up to next multiple of FP_LUT */ + bitlen = mp_unsigned_bin_size(modulus) << 3; + x = bitlen % FP_LUT; + if (x) { + bitlen += FP_LUT - x; + } + lut_gap = bitlen / FP_LUT; + + /* get the k value */ + if ((mp_unsigned_bin_size(&tka) > (int)(KB_SIZE - 2)) || + (mp_unsigned_bin_size(&tkb) > (int)(KB_SIZE - 2)) ) { + mp_clear(&tka); + mp_clear(&tkb); + return BUFFER_E; + } + + /* store k */ +#ifdef CYASSL_SMALL_STACK + kb[0] = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (kb[0] == NULL) + return MEMORY_E; +#endif + + XMEMSET(kb[0], 0, KB_SIZE); + if ((err = mp_to_unsigned_bin(&tka, kb[0])) != MP_OKAY) { + mp_clear(&tka); + mp_clear(&tkb); + XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); + return err; + } + + /* let's reverse kb so it's little endian */ + x = 0; + y = mp_unsigned_bin_size(&tka) - 1; + mp_clear(&tka); + while ((unsigned)x < y) { + z = kb[0][x]; kb[0][x] = kb[0][y]; kb[0][y] = z; + ++x; --y; + } + + /* store b */ +#ifdef CYASSL_SMALL_STACK + kb[1] = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (kb[1] == NULL) { + XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + XMEMSET(kb[1], 0, KB_SIZE); + if ((err = mp_to_unsigned_bin(&tkb, kb[1])) != MP_OKAY) { + mp_clear(&tkb); + } + else { + x = 0; + y = mp_unsigned_bin_size(&tkb) - 1; + mp_clear(&tkb); + while ((unsigned)x < y) { + z = kb[1][x]; kb[1][x] = kb[1][y]; kb[1][y] = z; + ++x; --y; + } + + /* at this point we can start, yipee */ + first = 1; + for (x = lut_gap-1; x >= 0; x--) { + /* extract FP_LUT bits from kb spread out by lut_gap bits and + offset by x bits from the start */ + bitpos = x; + for (y = zA = zB = 0; y < FP_LUT; y++) { + zA |= ((kb[0][bitpos>>3] >> (bitpos&7)) & 1) << y; + zB |= ((kb[1][bitpos>>3] >> (bitpos&7)) & 1) << y; + bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid + the mult in each loop */ + } + + /* double if not first */ + if (!first) { + if ((err = ecc_projective_dbl_point(R, R, modulus, + mp)) != MP_OKAY) { + break; + } + } + + /* add if not first, otherwise copy */ + if (!first) { + if (zA) { + if ((err = ecc_projective_add_point(R, fp_cache[idx1].LUT[zA], + R, modulus, mp)) != MP_OKAY) { + break; + } + } + if (zB) { + if ((err = ecc_projective_add_point(R, fp_cache[idx2].LUT[zB], + R, modulus, mp)) != MP_OKAY) { + break; + } + } + } else { + if (zA) { + if ((mp_copy(&fp_cache[idx1].LUT[zA]->x, &R->x) != MP_OKAY) || + (mp_copy(&fp_cache[idx1].LUT[zA]->y, &R->y) != MP_OKAY) || + (mp_copy(&fp_cache[idx1].mu, &R->z) != MP_OKAY)) { + err = GEN_MEM_ERR; + break; + } + first = 0; + } + if (zB && first == 0) { + if (zB) { + if ((err = ecc_projective_add_point(R, + fp_cache[idx2].LUT[zB], R, modulus, mp)) != MP_OKAY){ + break; + } + } + } else if (zB && first == 1) { + if ((mp_copy(&fp_cache[idx2].LUT[zB]->x, &R->x) != MP_OKAY) || + (mp_copy(&fp_cache[idx2].LUT[zB]->y, &R->y) != MP_OKAY) || + (mp_copy(&fp_cache[idx2].mu, &R->z) != MP_OKAY)) { + err = GEN_MEM_ERR; + break; + } + first = 0; + } + } + } + } + + XMEMSET(kb[0], 0, KB_SIZE); + XMEMSET(kb[1], 0, KB_SIZE); + +#ifdef CYASSL_SMALL_STACK + XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(kb[1], NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + +#undef KB_SIZE + + return ecc_map(R, modulus, mp); +} + +/** ECC Fixed Point mulmod global + Computes kA*A + kB*B = C using Shamir's Trick + A First point to multiply + kA What to multiple A by + B Second point to multiply + kB What to multiple B by + C [out] Destination point (can overlap with A or B) + modulus Modulus for curve + return MP_OKAY on success +*/ +int ecc_mul2add(ecc_point* A, mp_int* kA, + ecc_point* B, mp_int* kB, + ecc_point* C, mp_int* modulus) +{ + int idx1 = -1, idx2 = -1, err = MP_OKAY, mpInit = 0; + mp_digit mp; + mp_int mu; + + err = mp_init(&mu); + if (err != MP_OKAY) + return err; + +#ifndef HAVE_THREAD_LS + if (initMutex == 0) { + InitMutex(&ecc_fp_lock); + initMutex = 1; + } + if (LockMutex(&ecc_fp_lock) != 0) + return BAD_MUTEX_E; +#endif /* HAVE_THREAD_LS */ + + /* find point */ + idx1 = find_base(A); + + /* no entry? */ + if (idx1 == -1) { + /* find hole and add it */ + if ((idx1 = find_hole()) >= 0) { + err = add_entry(idx1, A); + } + } + if (err == MP_OKAY && idx1 != -1) { + /* increment LRU */ + ++(fp_cache[idx1].lru_count); + } + + if (err == MP_OKAY) + /* find point */ + idx2 = find_base(B); + + if (err == MP_OKAY) { + /* no entry? */ + if (idx2 == -1) { + /* find hole and add it */ + if ((idx2 = find_hole()) >= 0) + err = add_entry(idx2, B); + } + } + + if (err == MP_OKAY && idx2 != -1) { + /* increment LRU */ + ++(fp_cache[idx2].lru_count); + } + + if (err == MP_OKAY) { + /* if it's 2 build the LUT, if it's higher just use the LUT */ + if (idx1 >= 0 && fp_cache[idx1].lru_count == 2) { + /* compute mp */ + err = mp_montgomery_setup(modulus, &mp); + + if (err == MP_OKAY) { + mpInit = 1; + err = mp_montgomery_calc_normalization(&mu, modulus); + } + + if (err == MP_OKAY) + /* build the LUT */ + err = build_lut(idx1, modulus, &mp, &mu); + } + } + + if (err == MP_OKAY) { + /* if it's 2 build the LUT, if it's higher just use the LUT */ + if (idx2 >= 0 && fp_cache[idx2].lru_count == 2) { + if (mpInit == 0) { + /* compute mp */ + err = mp_montgomery_setup(modulus, &mp); + if (err == MP_OKAY) { + mpInit = 1; + err = mp_montgomery_calc_normalization(&mu, modulus); + } + } + + if (err == MP_OKAY) + /* build the LUT */ + err = build_lut(idx2, modulus, &mp, &mu); + } + } + + + if (err == MP_OKAY) { + if (idx1 >=0 && idx2 >= 0 && fp_cache[idx1].lru_count >= 2 && + fp_cache[idx2].lru_count >= 2) { + if (mpInit == 0) { + /* compute mp */ + err = mp_montgomery_setup(modulus, &mp); + } + if (err == MP_OKAY) + err = accel_fp_mul2add(idx1, idx2, kA, kB, C, modulus, &mp); + } else { + err = normal_ecc_mul2add(A, kA, B, kB, C, modulus); + } + } + +#ifndef HAVE_THREAD_LS + UnLockMutex(&ecc_fp_lock); +#endif /* HAVE_THREAD_LS */ + mp_clear(&mu); + + return err; +} +#endif + +/** ECC Fixed Point mulmod global + k The multiplicand + G Base point to multiply + R [out] Destination of product + modulus The modulus for the curve + map [boolean] If non-zero maps the point back to affine co-ordinates, + otherwise it's left in jacobian-montgomery form + return MP_OKAY if successful +*/ +int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, + int map) +{ + int idx, err = MP_OKAY; + mp_digit mp; + mp_int mu; + int mpSetup = 0; + + if (mp_init(&mu) != MP_OKAY) + return MP_INIT_E; + +#ifndef HAVE_THREAD_LS + if (initMutex == 0) { + InitMutex(&ecc_fp_lock); + initMutex = 1; + } + + if (LockMutex(&ecc_fp_lock) != 0) + return BAD_MUTEX_E; +#endif /* HAVE_THREAD_LS */ + + /* find point */ + idx = find_base(G); + + /* no entry? */ + if (idx == -1) { + /* find hole and add it */ + idx = find_hole(); + + if (idx >= 0) + err = add_entry(idx, G); + } + if (err == MP_OKAY && idx != -1) { + /* increment LRU */ + ++(fp_cache[idx].lru_count); + } + + + if (err == MP_OKAY) { + /* if it's 2 build the LUT, if it's higher just use the LUT */ + if (idx >= 0 && fp_cache[idx].lru_count == 2) { + /* compute mp */ + err = mp_montgomery_setup(modulus, &mp); + + if (err == MP_OKAY) { + /* compute mu */ + mpSetup = 1; + err = mp_montgomery_calc_normalization(&mu, modulus); + } + + if (err == MP_OKAY) + /* build the LUT */ + err = build_lut(idx, modulus, &mp, &mu); + } + } + + if (err == MP_OKAY) { + if (idx >= 0 && fp_cache[idx].lru_count >= 2) { + if (mpSetup == 0) { + /* compute mp */ + err = mp_montgomery_setup(modulus, &mp); + } + if (err == MP_OKAY) + err = accel_fp_mul(idx, k, R, modulus, &mp, map); + } else { + err = normal_ecc_mulmod(k, G, R, modulus, map); + } + } + +#ifndef HAVE_THREAD_LS + UnLockMutex(&ecc_fp_lock); +#endif /* HAVE_THREAD_LS */ + mp_clear(&mu); + + return err; +} + +/* helper function for freeing the cache ... + must be called with the cache mutex locked */ +static void ecc_fp_free_cache(void) +{ + unsigned x, y; + for (x = 0; x < FP_ENTRIES; x++) { + if (fp_cache[x].g != NULL) { + for (y = 0; y < (1U<protocol == 0) + return NULL; + + if (ctx->protocol == REQ_RESP_CLIENT) { + if (ctx->cliSt == ecCLI_INIT) { + ctx->cliSt = ecCLI_SALT_GET; + return ctx->clientSalt; + } + else { + ctx->cliSt = ecCLI_BAD_STATE; + return NULL; + } + } + else if (ctx->protocol == REQ_RESP_SERVER) { + if (ctx->srvSt == ecSRV_INIT) { + ctx->srvSt = ecSRV_SALT_GET; + return ctx->serverSalt; + } + else { + ctx->srvSt = ecSRV_BAD_STATE; + return NULL; + } + } + + return NULL; +} + + +static const char* exchange_info = "Secure Message Exchange"; + +int ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt) +{ + byte tmp[EXCHANGE_SALT_SZ/2]; + int halfSz = EXCHANGE_SALT_SZ/2; + + if (ctx == NULL || ctx->protocol == 0 || salt == NULL) + return BAD_FUNC_ARG; + + if (ctx->protocol == REQ_RESP_CLIENT) { + XMEMCPY(ctx->serverSalt, salt, EXCHANGE_SALT_SZ); + if (ctx->cliSt == ecCLI_SALT_GET) + ctx->cliSt = ecCLI_SALT_SET; + else { + ctx->cliSt = ecCLI_BAD_STATE; + return BAD_ENC_STATE_E; + } + } + else { + XMEMCPY(ctx->clientSalt, salt, EXCHANGE_SALT_SZ); + if (ctx->srvSt == ecSRV_SALT_GET) + ctx->srvSt = ecSRV_SALT_SET; + else { + ctx->srvSt = ecSRV_BAD_STATE; + return BAD_ENC_STATE_E; + } + } + + /* mix half and half */ + /* tmp stores 2nd half of client before overwrite */ + XMEMCPY(tmp, ctx->clientSalt + halfSz, halfSz); + XMEMCPY(ctx->clientSalt + halfSz, ctx->serverSalt, halfSz); + XMEMCPY(ctx->serverSalt, tmp, halfSz); + + ctx->kdfSalt = ctx->clientSalt; + ctx->kdfSaltSz = EXCHANGE_SALT_SZ; + + ctx->macSalt = ctx->serverSalt; + ctx->macSaltSz = EXCHANGE_SALT_SZ; + + ctx->kdfInfo = (byte*)exchange_info; + ctx->kdfInfoSz = EXCHANGE_INFO_SZ; + + return 0; +} + + +static int ecc_ctx_set_salt(ecEncCtx* ctx, int flags, RNG* rng) +{ + byte* saltBuffer = NULL; + + if (ctx == NULL || rng == NULL || flags == 0) + return BAD_FUNC_ARG; + + saltBuffer = (flags == REQ_RESP_CLIENT) ? ctx->clientSalt : ctx->serverSalt; + + return RNG_GenerateBlock(rng, saltBuffer, EXCHANGE_SALT_SZ); +} + + +static void ecc_ctx_init(ecEncCtx* ctx, int flags) +{ + if (ctx) { + XMEMSET(ctx, 0, sizeof(ecEncCtx)); + + ctx->encAlgo = ecAES_128_CBC; + ctx->kdfAlgo = ecHKDF_SHA256; + ctx->macAlgo = ecHMAC_SHA256; + ctx->protocol = (byte)flags; + + if (flags == REQ_RESP_CLIENT) + ctx->cliSt = ecCLI_INIT; + if (flags == REQ_RESP_SERVER) + ctx->srvSt = ecSRV_INIT; + } +} + + +/* allow ecc context reset so user doesn't have to init/free for resue */ +int ecc_ctx_reset(ecEncCtx* ctx, RNG* rng) +{ + if (ctx == NULL || rng == NULL) + return BAD_FUNC_ARG; + + ecc_ctx_init(ctx, ctx->protocol); + return ecc_ctx_set_salt(ctx, ctx->protocol, rng); +} + + +/* alloc/init and set defaults, return new Context */ +ecEncCtx* ecc_ctx_new(int flags, RNG* rng) +{ + int ret = 0; + ecEncCtx* ctx = (ecEncCtx*)XMALLOC(sizeof(ecEncCtx), 0, DYNAMIC_TYPE_ECC); + + if (ctx) + ctx->protocol = (byte)flags; + + ret = ecc_ctx_reset(ctx, rng); + if (ret != 0) { + ecc_ctx_free(ctx); + ctx = NULL; + } + + return ctx; +} + + +/* free any resources, clear any keys */ +void ecc_ctx_free(ecEncCtx* ctx) +{ + if (ctx) { + XMEMSET(ctx, 0, sizeof(ecEncCtx)); + XFREE(ctx, 0, DYNAMIC_TYPE_ECC); + } +} + + +static int ecc_get_key_sizes(ecEncCtx* ctx, int* encKeySz, int* ivSz, + int* keysLen, word32* digestSz, word32* blockSz) +{ + if (ctx) { + switch (ctx->encAlgo) { + case ecAES_128_CBC: + *encKeySz = KEY_SIZE_128; + *ivSz = IV_SIZE_64; + *blockSz = AES_BLOCK_SIZE; + break; + default: + return BAD_FUNC_ARG; + } + + switch (ctx->macAlgo) { + case ecHMAC_SHA256: + *digestSz = SHA256_DIGEST_SIZE; + break; + default: + return BAD_FUNC_ARG; + } + } else + return BAD_FUNC_ARG; + + *keysLen = *encKeySz + *ivSz + *digestSz; + + return 0; +} + + +/* ecc encrypt with shared secret run through kdf + ctx holds non default algos and inputs + msgSz should be the right size for encAlgo, i.e., already padded + return 0 on success */ +int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, + word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx) +{ + int ret; + word32 blockSz; + word32 digestSz; + ecEncCtx localCtx; +#ifdef CYASSL_SMALL_STACK + byte* sharedSecret; + byte* keys; +#else + byte sharedSecret[ECC_MAXSIZE]; /* 521 max size */ + byte keys[ECC_BUFSIZE]; /* max size */ +#endif + word32 sharedSz = ECC_MAXSIZE; + int keysLen; + int encKeySz; + int ivSz; + int offset = 0; /* keys offset if doing msg exchange */ + byte* encKey; + byte* encIv; + byte* macKey; + + if (privKey == NULL || pubKey == NULL || msg == NULL || out == NULL || + outSz == NULL) + return BAD_FUNC_ARG; + + if (ctx == NULL) { /* use defaults */ + ecc_ctx_init(&localCtx, 0); + ctx = &localCtx; + } + + ret = ecc_get_key_sizes(ctx, &encKeySz, &ivSz, &keysLen, &digestSz, + &blockSz); + if (ret != 0) + return ret; + + if (ctx->protocol == REQ_RESP_SERVER) { + offset = keysLen; + keysLen *= 2; + + if (ctx->srvSt != ecSRV_RECV_REQ) + return BAD_ENC_STATE_E; + + ctx->srvSt = ecSRV_BAD_STATE; /* we're done no more ops allowed */ + } + else if (ctx->protocol == REQ_RESP_CLIENT) { + if (ctx->cliSt != ecCLI_SALT_SET) + return BAD_ENC_STATE_E; + + ctx->cliSt = ecCLI_SENT_REQ; /* only do this once */ + } + + if (keysLen > ECC_BUFSIZE) /* keys size */ + return BUFFER_E; + + if ( (msgSz%blockSz) != 0) + return BAD_PADDING_E; + + if (*outSz < (msgSz + digestSz)) + return BUFFER_E; + +#ifdef CYASSL_SMALL_STACK + sharedSecret = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (sharedSecret == NULL) + return MEMORY_E; + + keys = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (keys == NULL) { + XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + ret = ecc_shared_secret(privKey, pubKey, sharedSecret, &sharedSz); + + if (ret == 0) { + switch (ctx->kdfAlgo) { + case ecHKDF_SHA256 : + ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt, + ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, + keys, keysLen); + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) { + encKey = keys + offset; + encIv = encKey + encKeySz; + macKey = encKey + encKeySz + ivSz; + + switch (ctx->encAlgo) { + case ecAES_128_CBC: + { + Aes aes; + ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv, + AES_ENCRYPTION); + if (ret != 0) + break; + ret = AesCbcEncrypt(&aes, out, msg, msgSz); + } + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) { + switch (ctx->macAlgo) { + case ecHMAC_SHA256: + { + Hmac hmac; + ret = HmacSetKey(&hmac, SHA256, macKey, SHA256_DIGEST_SIZE); + if (ret != 0) + break; + ret = HmacUpdate(&hmac, out, msgSz); + if (ret != 0) + break; + ret = HmacUpdate(&hmac, ctx->macSalt, ctx->macSaltSz); + if (ret != 0) + break; + ret = HmacFinal(&hmac, out+msgSz); + } + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) + *outSz = msgSz + digestSz; + +#ifdef CYASSL_SMALL_STACK + XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(keys, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + + +/* ecc decrypt with shared secret run through kdf + ctx holds non default algos and inputs + return 0 on success */ +int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, + word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx) +{ + int ret; + word32 blockSz; + word32 digestSz; + ecEncCtx localCtx; +#ifdef CYASSL_SMALL_STACK + byte* sharedSecret; + byte* keys; +#else + byte sharedSecret[ECC_MAXSIZE]; /* 521 max size */ + byte keys[ECC_BUFSIZE]; /* max size */ +#endif + word32 sharedSz = ECC_MAXSIZE; + int keysLen; + int encKeySz; + int ivSz; + int offset = 0; /* in case using msg exchange */ + byte* encKey; + byte* encIv; + byte* macKey; + + if (privKey == NULL || pubKey == NULL || msg == NULL || out == NULL || + outSz == NULL) + return BAD_FUNC_ARG; + + if (ctx == NULL) { /* use defaults */ + ecc_ctx_init(&localCtx, 0); + ctx = &localCtx; + } + + ret = ecc_get_key_sizes(ctx, &encKeySz, &ivSz, &keysLen, &digestSz, + &blockSz); + if (ret != 0) + return ret; + + if (ctx->protocol == REQ_RESP_CLIENT) { + offset = keysLen; + keysLen *= 2; + + if (ctx->cliSt != ecCLI_SENT_REQ) + return BAD_ENC_STATE_E; + + ctx->cliSt = ecSRV_BAD_STATE; /* we're done no more ops allowed */ + } + else if (ctx->protocol == REQ_RESP_SERVER) { + if (ctx->srvSt != ecSRV_SALT_SET) + return BAD_ENC_STATE_E; + + ctx->srvSt = ecSRV_RECV_REQ; /* only do this once */ + } + + if (keysLen > ECC_BUFSIZE) /* keys size */ + return BUFFER_E; + + if ( ((msgSz-digestSz) % blockSz) != 0) + return BAD_PADDING_E; + + if (*outSz < (msgSz - digestSz)) + return BUFFER_E; + +#ifdef CYASSL_SMALL_STACK + sharedSecret = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (sharedSecret == NULL) + return MEMORY_E; + + keys = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (keys == NULL) { + XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + ret = ecc_shared_secret(privKey, pubKey, sharedSecret, &sharedSz); + + if (ret == 0) { + switch (ctx->kdfAlgo) { + case ecHKDF_SHA256 : + ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt, + ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, + keys, keysLen); + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) { + encKey = keys + offset; + encIv = encKey + encKeySz; + macKey = encKey + encKeySz + ivSz; + + switch (ctx->macAlgo) { + case ecHMAC_SHA256: + { + byte verify[SHA256_DIGEST_SIZE]; + Hmac hmac; + ret = HmacSetKey(&hmac, SHA256, macKey, SHA256_DIGEST_SIZE); + if (ret != 0) + break; + ret = HmacUpdate(&hmac, msg, msgSz-digestSz); + if (ret != 0) + break; + ret = HmacUpdate(&hmac, ctx->macSalt, ctx->macSaltSz); + if (ret != 0) + break; + ret = HmacFinal(&hmac, verify); + if (ret != 0) + break; + if (memcmp(verify, msg + msgSz - digestSz, digestSz) != 0) + ret = -1; + } + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) { + switch (ctx->encAlgo) { + case ecAES_128_CBC: + { + Aes aes; + ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv, + AES_DECRYPTION); + if (ret != 0) + break; + ret = AesCbcDecrypt(&aes, out, msg, msgSz-digestSz); + } + break; + + default: + ret = BAD_FUNC_ARG; + break; + } + } + + if (ret == 0) + *outSz = msgSz - digestSz; + +#ifdef CYASSL_SMALL_STACK + XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(keys, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + + +#endif /* HAVE_ECC_ENCRYPT */ + +#endif /* HAVE_ECC */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c b/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c new file mode 100644 index 00000000..c8acf938 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c @@ -0,0 +1 @@ +/* dummy ecc_fp.c for dist */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/error.c b/project1/cyassl-3.0.0/ctaocrypt/src/error.c new file mode 100644 index 00000000..3b629ae0 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/error.c @@ -0,0 +1,365 @@ +/* error.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */ + #pragma warning(disable: 4996) +#endif + + +void CTaoCryptErrorString(int error, char* buffer) +{ + const int max = CYASSL_MAX_ERROR_SZ; /* shorthand */ + +#ifdef NO_ERROR_STRINGS + + (void)error; + XSTRNCPY(buffer, "no support for error strings built in", max); + +#else + + switch (error) { + + case OPEN_RAN_E : + XSTRNCPY(buffer, "opening random device error", max); + break; + + case READ_RAN_E : + XSTRNCPY(buffer, "reading random device error", max); + break; + + case WINCRYPT_E : + XSTRNCPY(buffer, "windows crypt init error", max); + break; + + case CRYPTGEN_E : + XSTRNCPY(buffer, "windows crypt generation error", max); + break; + + case RAN_BLOCK_E : + XSTRNCPY(buffer, "random device read would block error", max); + break; + + case BAD_MUTEX_E : + XSTRNCPY(buffer, "Bad mutex, operation failed", max); + break; + + case MP_INIT_E : + XSTRNCPY(buffer, "mp_init error state", max); + break; + + case MP_READ_E : + XSTRNCPY(buffer, "mp_read error state", max); + break; + + case MP_EXPTMOD_E : + XSTRNCPY(buffer, "mp_exptmod error state", max); + break; + + case MP_TO_E : + XSTRNCPY(buffer, "mp_to_xxx error state, can't convert", max); + break; + + case MP_SUB_E : + XSTRNCPY(buffer, "mp_sub error state, can't subtract", max); + break; + + case MP_ADD_E : + XSTRNCPY(buffer, "mp_add error state, can't add", max); + break; + + case MP_MUL_E : + XSTRNCPY(buffer, "mp_mul error state, can't multiply", max); + break; + + case MP_MULMOD_E : + XSTRNCPY(buffer, "mp_mulmod error state, can't multiply mod", max); + break; + + case MP_MOD_E : + XSTRNCPY(buffer, "mp_mod error state, can't mod", max); + break; + + case MP_INVMOD_E : + XSTRNCPY(buffer, "mp_invmod error state, can't inv mod", max); + break; + + case MP_CMP_E : + XSTRNCPY(buffer, "mp_cmp error state", max); + break; + + case MP_ZERO_E : + XSTRNCPY(buffer, "mp zero result, not expected", max); + break; + + case MEMORY_E : + XSTRNCPY(buffer, "out of memory error", max); + break; + + case RSA_WRONG_TYPE_E : + XSTRNCPY(buffer, "RSA wrong block type for RSA function", max); + break; + + case RSA_BUFFER_E : + XSTRNCPY(buffer, "RSA buffer error, output too small or input too big", + max); + break; + + case BUFFER_E : + XSTRNCPY(buffer, "Buffer error, output too small or input too big",max); + break; + + case ALGO_ID_E : + XSTRNCPY(buffer, "Setting Cert AlogID error", max); + break; + + case PUBLIC_KEY_E : + XSTRNCPY(buffer, "Setting Cert Public Key error", max); + break; + + case DATE_E : + XSTRNCPY(buffer, "Setting Cert Date validity error", max); + break; + + case SUBJECT_E : + XSTRNCPY(buffer, "Setting Cert Subject name error", max); + break; + + case ISSUER_E : + XSTRNCPY(buffer, "Setting Cert Issuer name error", max); + break; + + case CA_TRUE_E : + XSTRNCPY(buffer, "Setting basic constraint CA true error", max); + break; + + case EXTENSIONS_E : + XSTRNCPY(buffer, "Setting extensions error", max); + break; + + case ASN_PARSE_E : + XSTRNCPY(buffer, "ASN parsing error, invalid input", max); + break; + + case ASN_VERSION_E : + XSTRNCPY(buffer, "ASN version error, invalid number", max); + break; + + case ASN_GETINT_E : + XSTRNCPY(buffer, "ASN get big int error, invalid data", max); + break; + + case ASN_RSA_KEY_E : + XSTRNCPY(buffer, "ASN key init error, invalid input", max); + break; + + case ASN_OBJECT_ID_E : + XSTRNCPY(buffer, "ASN object id error, invalid id", max); + break; + + case ASN_TAG_NULL_E : + XSTRNCPY(buffer, "ASN tag error, not null", max); + break; + + case ASN_EXPECT_0_E : + XSTRNCPY(buffer, "ASN expect error, not zero", max); + break; + + case ASN_BITSTR_E : + XSTRNCPY(buffer, "ASN bit string error, wrong id", max); + break; + + case ASN_UNKNOWN_OID_E : + XSTRNCPY(buffer, "ASN oid error, unknown sum id", max); + break; + + case ASN_DATE_SZ_E : + XSTRNCPY(buffer, "ASN date error, bad size", max); + break; + + case ASN_BEFORE_DATE_E : + XSTRNCPY(buffer, "ASN date error, current date before", max); + break; + + case ASN_AFTER_DATE_E : + XSTRNCPY(buffer, "ASN date error, current date after", max); + break; + + case ASN_SIG_OID_E : + XSTRNCPY(buffer, "ASN signature error, mismatched oid", max); + break; + + case ASN_TIME_E : + XSTRNCPY(buffer, "ASN time error, unkown time type", max); + break; + + case ASN_INPUT_E : + XSTRNCPY(buffer, "ASN input error, not enough data", max); + break; + + case ASN_SIG_CONFIRM_E : + XSTRNCPY(buffer, "ASN sig error, confirm failure", max); + break; + + case ASN_SIG_HASH_E : + XSTRNCPY(buffer, "ASN sig error, unsupported hash type", max); + break; + + case ASN_SIG_KEY_E : + XSTRNCPY(buffer, "ASN sig error, unsupported key type", max); + break; + + case ASN_DH_KEY_E : + XSTRNCPY(buffer, "ASN key init error, invalid input", max); + break; + + case ASN_NTRU_KEY_E : + XSTRNCPY(buffer, "ASN NTRU key decode error, invalid input", max); + break; + + case ASN_CRIT_EXT_E: + XSTRNCPY(buffer, "X.509 Critical extension ignored", max); + break; + + case ECC_BAD_ARG_E : + XSTRNCPY(buffer, "ECC input argument wrong type, invalid input", max); + break; + + case ASN_ECC_KEY_E : + XSTRNCPY(buffer, "ECC ASN1 bad key data, invalid input", max); + break; + + case ECC_CURVE_OID_E : + XSTRNCPY(buffer, "ECC curve sum OID unsupported, invalid input", max); + break; + + case BAD_FUNC_ARG : + XSTRNCPY(buffer, "Bad function argument", max); + break; + + case NOT_COMPILED_IN : + XSTRNCPY(buffer, "Feature not compiled in", max); + break; + + case UNICODE_SIZE_E : + XSTRNCPY(buffer, "Unicode password too big", max); + break; + + case NO_PASSWORD : + XSTRNCPY(buffer, "No password provided by user", max); + break; + + case ALT_NAME_E : + XSTRNCPY(buffer, "Alt Name problem, too big", max); + break; + + case AES_GCM_AUTH_E: + XSTRNCPY(buffer, "AES-GCM Authentication check fail", max); + break; + + case AES_CCM_AUTH_E: + XSTRNCPY(buffer, "AES-CCM Authentication check fail", max); + break; + + case CAVIUM_INIT_E: + XSTRNCPY(buffer, "Cavium Init type error", max); + break; + + case COMPRESS_INIT_E: + XSTRNCPY(buffer, "Compress Init error", max); + break; + + case COMPRESS_E: + XSTRNCPY(buffer, "Compress error", max); + break; + + case DECOMPRESS_INIT_E: + XSTRNCPY(buffer, "DeCompress Init error", max); + break; + + case DECOMPRESS_E: + XSTRNCPY(buffer, "DeCompress error", max); + break; + + case BAD_ALIGN_E: + XSTRNCPY(buffer, "Bad alignment error, no alloc help", max); + break; + + case ASN_NO_SIGNER_E : + XSTRNCPY(buffer, "ASN no signer error to confirm failure", max); + break; + + case ASN_CRL_CONFIRM_E : + XSTRNCPY(buffer, "ASN CRL sig error, confirm failure", max); + break; + + case ASN_CRL_NO_SIGNER_E : + XSTRNCPY(buffer, "ASN CRL no signer error to confirm failure", max); + break; + + case ASN_OCSP_CONFIRM_E : + XSTRNCPY(buffer, "ASN OCSP sig error, confirm failure", max); + break; + + case BAD_ENC_STATE_E: + XSTRNCPY(buffer, "Bad ecc encrypt state operation", max); + break; + + case BAD_PADDING_E: + XSTRNCPY(buffer, "Bad padding, message wrong length", max); + break; + + case REQ_ATTRIBUTE_E: + XSTRNCPY(buffer, "Setting cert request attributes error", max); + break; + + case PKCS7_OID_E: + XSTRNCPY(buffer, "PKCS#7 error: mismatched OID value", max); + break; + + case PKCS7_RECIP_E: + XSTRNCPY(buffer, "PKCS#7 error: no matching recipient found", max); + break; + + case FIPS_NOT_ALLOWED_E: + XSTRNCPY(buffer, "FIPS mode not allowed error", max); + break; + + case ASN_NAME_INVALID_E: + XSTRNCPY(buffer, "Name Constraint error", max); + break; + + default: + XSTRNCPY(buffer, "unknown error number", max); + + } + +#endif /* NO_ERROR_STRINGS */ + +} diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fips.c b/project1/cyassl-3.0.0/ctaocrypt/src/fips.c new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c b/project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i new file mode 100644 index 00000000..f52cc087 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i @@ -0,0 +1,3860 @@ +/* fp_mont_small.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SMALL_MONT_SET +/* computes x/R == x (mod N) via Montgomery Reduction */ +void fp_montgomery_reduce_small(fp_int *a, fp_int *m, fp_digit mp) +{ + fp_digit c[FP_SIZE], *_c, *tmpm, mu, cy; + int oldused, x, y, pa; + +#if defined(USE_MEMSET) + /* now zero the buff */ + memset(c, 0, sizeof c); +#endif + pa = m->used; + + /* copy the input */ + oldused = a->used; + for (x = 0; x < oldused; x++) { + c[x] = a->dp[x]; + } +#if !defined(USE_MEMSET) + for (; x < 2*pa+3; x++) { + c[x] = 0; + } +#endif + MONT_START; + + switch (pa) { + case 1: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; +#else + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 2: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 3: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 4: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 5: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 6: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 7: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 8: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 9: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 10: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 11: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 12: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 11; cy = 0; + LOOP_START; + _c = c + 11; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 13: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 11; cy = 0; + LOOP_START; + _c = c + 11; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 12; cy = 0; + LOOP_START; + _c = c + 12; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 14: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 11; cy = 0; + LOOP_START; + _c = c + 11; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 12; cy = 0; + LOOP_START; + _c = c + 12; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 13; cy = 0; + LOOP_START; + _c = c + 13; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 15: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 11; cy = 0; + LOOP_START; + _c = c + 11; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 12; cy = 0; + LOOP_START; + _c = c + 12; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 13; cy = 0; + LOOP_START; + _c = c + 13; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 14; cy = 0; + LOOP_START; + _c = c + 14; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + case 16: + x = 0; cy = 0; + LOOP_START; + _c = c + 0; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 1; cy = 0; + LOOP_START; + _c = c + 1; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 2; cy = 0; + LOOP_START; + _c = c + 2; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 3; cy = 0; + LOOP_START; + _c = c + 3; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 4; cy = 0; + LOOP_START; + _c = c + 4; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 5; cy = 0; + LOOP_START; + _c = c + 5; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 6; cy = 0; + LOOP_START; + _c = c + 6; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 7; cy = 0; + LOOP_START; + _c = c + 7; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 8; cy = 0; + LOOP_START; + _c = c + 8; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 9; cy = 0; + LOOP_START; + _c = c + 9; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 10; cy = 0; + LOOP_START; + _c = c + 10; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 11; cy = 0; + LOOP_START; + _c = c + 11; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 12; cy = 0; + LOOP_START; + _c = c + 12; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 13; cy = 0; + LOOP_START; + _c = c + 13; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 14; cy = 0; + LOOP_START; + _c = c + 14; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + x = 15; cy = 0; + LOOP_START; + _c = c + 15; + tmpm = m->dp; +#ifdef INNERMUL8 + INNERMUL8; _c += 8; tmpm += 8; + INNERMUL8; _c += 8; tmpm += 8; +#else + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; + INNERMUL; ++_c; +#endif + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + break; + } + /* now copy out */ + _c = c + pa; + tmpm = a->dp; + for (x = 0; x < pa+1; x++) { + *tmpm++ = *_c++; + } + + for (; x < oldused; x++) { + *tmpm++ = 0; + } + + MONT_FINI; + + a->used = pa+1; + fp_clamp(a); + + /* if A >= m then A = A - m */ + if (fp_cmp_mag (a, m) != FP_LT) { + s_fp_sub (a, m, a); + } +} + +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i new file mode 100644 index 00000000..c40ee2ba --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i @@ -0,0 +1,130 @@ +/* fp_mul_comba_12.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL12 +void fp_mul_comba12(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[24]; + + memcpy(at, A->dp, 12 * sizeof(fp_digit)); + memcpy(at+12, B->dp, 12 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[12]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); MULADD(at[11], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[10], at[23]); MULADD(at[11], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[11], at[23]); + COMBA_STORE(C->dp[22]); + COMBA_STORE2(C->dp[23]); + C->used = 24; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i new file mode 100644 index 00000000..c9223707 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i @@ -0,0 +1,170 @@ +/* fp_mul_comba_17.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL17 +void fp_mul_comba17(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[34]; + + memcpy(at, A->dp, 17 * sizeof(fp_digit)); + memcpy(at+17, B->dp, 17 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[17]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); MULADD(at[15], at[17]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); MULADD(at[15], at[18]); MULADD(at[16], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); MULADD(at[15], at[19]); MULADD(at[16], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); MULADD(at[16], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[15], at[33]); MULADD(at[16], at[32]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[16], at[33]); + COMBA_STORE(C->dp[32]); + COMBA_STORE2(C->dp[33]); + C->used = 34; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i new file mode 100644 index 00000000..22d342fa --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i @@ -0,0 +1,193 @@ +/* fp_mul_comba_20.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef TFM_MUL20 +void fp_mul_comba20(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[40]; + + memcpy(at, A->dp, 20 * sizeof(fp_digit)); + memcpy(at+20, B->dp, 20 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[20]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]); MULADD(at[17], at[20]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]); MULADD(at[17], at[21]); MULADD(at[18], at[20]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]); MULADD(at[17], at[22]); MULADD(at[18], at[21]); MULADD(at[19], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); MULADD(at[17], at[23]); MULADD(at[18], at[22]); MULADD(at[19], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]); MULADD(at[18], at[23]); MULADD(at[19], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]); MULADD(at[19], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[18], at[39]); MULADD(at[19], at[38]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[19], at[39]); + COMBA_STORE(C->dp[38]); + COMBA_STORE2(C->dp[39]); + C->used = 40; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i new file mode 100644 index 00000000..18de6b81 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i @@ -0,0 +1,226 @@ +/* fp_mul_comba_24.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL24 +void fp_mul_comba24(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[48]; + + memcpy(at, A->dp, 24 * sizeof(fp_digit)); + memcpy(at+24, B->dp, 24 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[24]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]); MULADD(at[20], at[24]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]); MULADD(at[20], at[25]); MULADD(at[21], at[24]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]); MULADD(at[20], at[26]); MULADD(at[21], at[25]); MULADD(at[22], at[24]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); MULADD(at[20], at[27]); MULADD(at[21], at[26]); MULADD(at[22], at[25]); MULADD(at[23], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]); MULADD(at[21], at[27]); MULADD(at[22], at[26]); MULADD(at[23], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]); MULADD(at[22], at[27]); MULADD(at[23], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]); MULADD(at[23], at[27]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); + COMBA_STORE(C->dp[38]); + /* 39 */ + COMBA_FORWARD; + MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); + COMBA_STORE(C->dp[39]); + /* 40 */ + COMBA_FORWARD; + MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); + COMBA_STORE(C->dp[40]); + /* 41 */ + COMBA_FORWARD; + MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); + COMBA_STORE(C->dp[41]); + /* 42 */ + COMBA_FORWARD; + MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); + COMBA_STORE(C->dp[42]); + /* 43 */ + COMBA_FORWARD; + MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); + COMBA_STORE(C->dp[43]); + /* 44 */ + COMBA_FORWARD; + MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); + COMBA_STORE(C->dp[44]); + /* 45 */ + COMBA_FORWARD; + MULADD(at[22], at[47]); MULADD(at[23], at[46]); + COMBA_STORE(C->dp[45]); + /* 46 */ + COMBA_FORWARD; + MULADD(at[23], at[47]); + COMBA_STORE(C->dp[46]); + COMBA_STORE2(C->dp[47]); + C->used = 48; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i new file mode 100644 index 00000000..8c8f9ae4 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i @@ -0,0 +1,258 @@ +/* fp_mul_comba_28.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL28 +void fp_mul_comba28(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[56]; + + memcpy(at, A->dp, 28 * sizeof(fp_digit)); + memcpy(at+28, B->dp, 28 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[28]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]); MULADD(at[24], at[28]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]); MULADD(at[24], at[29]); MULADD(at[25], at[28]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]); MULADD(at[24], at[30]); MULADD(at[25], at[29]); MULADD(at[26], at[28]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); MULADD(at[24], at[31]); MULADD(at[25], at[30]); MULADD(at[26], at[29]); MULADD(at[27], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]); MULADD(at[25], at[31]); MULADD(at[26], at[30]); MULADD(at[27], at[29]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]); MULADD(at[26], at[31]); MULADD(at[27], at[30]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]); MULADD(at[27], at[31]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]); + COMBA_STORE(C->dp[38]); + /* 39 */ + COMBA_FORWARD; + MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]); + COMBA_STORE(C->dp[39]); + /* 40 */ + COMBA_FORWARD; + MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]); + COMBA_STORE(C->dp[40]); + /* 41 */ + COMBA_FORWARD; + MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]); + COMBA_STORE(C->dp[41]); + /* 42 */ + COMBA_FORWARD; + MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]); + COMBA_STORE(C->dp[42]); + /* 43 */ + COMBA_FORWARD; + MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]); + COMBA_STORE(C->dp[43]); + /* 44 */ + COMBA_FORWARD; + MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]); + COMBA_STORE(C->dp[44]); + /* 45 */ + COMBA_FORWARD; + MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]); + COMBA_STORE(C->dp[45]); + /* 46 */ + COMBA_FORWARD; + MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]); + COMBA_STORE(C->dp[46]); + /* 47 */ + COMBA_FORWARD; + MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); + COMBA_STORE(C->dp[47]); + /* 48 */ + COMBA_FORWARD; + MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); + COMBA_STORE(C->dp[48]); + /* 49 */ + COMBA_FORWARD; + MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); + COMBA_STORE(C->dp[49]); + /* 50 */ + COMBA_FORWARD; + MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); + COMBA_STORE(C->dp[50]); + /* 51 */ + COMBA_FORWARD; + MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); + COMBA_STORE(C->dp[51]); + /* 52 */ + COMBA_FORWARD; + MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); + COMBA_STORE(C->dp[52]); + /* 53 */ + COMBA_FORWARD; + MULADD(at[26], at[55]); MULADD(at[27], at[54]); + COMBA_STORE(C->dp[53]); + /* 54 */ + COMBA_FORWARD; + MULADD(at[27], at[55]); + COMBA_STORE(C->dp[54]); + COMBA_STORE2(C->dp[55]); + C->used = 56; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i new file mode 100644 index 00000000..a0720f30 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i @@ -0,0 +1,58 @@ +/* fp_mul_comba_3.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL3 +void fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[6]; + + memcpy(at, A->dp, 3 * sizeof(fp_digit)); + memcpy(at+3, B->dp, 3 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[3]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[4]); MULADD(at[1], at[3]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[1], at[5]); MULADD(at[2], at[4]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[2], at[5]); + COMBA_STORE(C->dp[4]); + COMBA_STORE2(C->dp[5]); + C->used = 6; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i new file mode 100644 index 00000000..b1ddf1df --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i @@ -0,0 +1,304 @@ +/* fp_mul_comba_32.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL32 +void fp_mul_comba32(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[64]; + int out_size; + + out_size = A->used + B->used; + memcpy(at, A->dp, 32 * sizeof(fp_digit)); + memcpy(at+32, B->dp, 32 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[32]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[33]); MULADD(at[1], at[32]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[0], at[56]); MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[0], at[57]); MULADD(at[1], at[56]); MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[0], at[58]); MULADD(at[1], at[57]); MULADD(at[2], at[56]); MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[0], at[59]); MULADD(at[1], at[58]); MULADD(at[2], at[57]); MULADD(at[3], at[56]); MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[0], at[60]); MULADD(at[1], at[59]); MULADD(at[2], at[58]); MULADD(at[3], at[57]); MULADD(at[4], at[56]); MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]); MULADD(at[28], at[32]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[0], at[61]); MULADD(at[1], at[60]); MULADD(at[2], at[59]); MULADD(at[3], at[58]); MULADD(at[4], at[57]); MULADD(at[5], at[56]); MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]); MULADD(at[28], at[33]); MULADD(at[29], at[32]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[0], at[62]); MULADD(at[1], at[61]); MULADD(at[2], at[60]); MULADD(at[3], at[59]); MULADD(at[4], at[58]); MULADD(at[5], at[57]); MULADD(at[6], at[56]); MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]); MULADD(at[28], at[34]); MULADD(at[29], at[33]); MULADD(at[30], at[32]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[0], at[63]); MULADD(at[1], at[62]); MULADD(at[2], at[61]); MULADD(at[3], at[60]); MULADD(at[4], at[59]); MULADD(at[5], at[58]); MULADD(at[6], at[57]); MULADD(at[7], at[56]); MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]); MULADD(at[28], at[35]); MULADD(at[29], at[34]); MULADD(at[30], at[33]); MULADD(at[31], at[32]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[1], at[63]); MULADD(at[2], at[62]); MULADD(at[3], at[61]); MULADD(at[4], at[60]); MULADD(at[5], at[59]); MULADD(at[6], at[58]); MULADD(at[7], at[57]); MULADD(at[8], at[56]); MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]); MULADD(at[28], at[36]); MULADD(at[29], at[35]); MULADD(at[30], at[34]); MULADD(at[31], at[33]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[2], at[63]); MULADD(at[3], at[62]); MULADD(at[4], at[61]); MULADD(at[5], at[60]); MULADD(at[6], at[59]); MULADD(at[7], at[58]); MULADD(at[8], at[57]); MULADD(at[9], at[56]); MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]); MULADD(at[28], at[37]); MULADD(at[29], at[36]); MULADD(at[30], at[35]); MULADD(at[31], at[34]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[3], at[63]); MULADD(at[4], at[62]); MULADD(at[5], at[61]); MULADD(at[6], at[60]); MULADD(at[7], at[59]); MULADD(at[8], at[58]); MULADD(at[9], at[57]); MULADD(at[10], at[56]); MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]); MULADD(at[28], at[38]); MULADD(at[29], at[37]); MULADD(at[30], at[36]); MULADD(at[31], at[35]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[4], at[63]); MULADD(at[5], at[62]); MULADD(at[6], at[61]); MULADD(at[7], at[60]); MULADD(at[8], at[59]); MULADD(at[9], at[58]); MULADD(at[10], at[57]); MULADD(at[11], at[56]); MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]); MULADD(at[28], at[39]); MULADD(at[29], at[38]); MULADD(at[30], at[37]); MULADD(at[31], at[36]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[5], at[63]); MULADD(at[6], at[62]); MULADD(at[7], at[61]); MULADD(at[8], at[60]); MULADD(at[9], at[59]); MULADD(at[10], at[58]); MULADD(at[11], at[57]); MULADD(at[12], at[56]); MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]); MULADD(at[28], at[40]); MULADD(at[29], at[39]); MULADD(at[30], at[38]); MULADD(at[31], at[37]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[6], at[63]); MULADD(at[7], at[62]); MULADD(at[8], at[61]); MULADD(at[9], at[60]); MULADD(at[10], at[59]); MULADD(at[11], at[58]); MULADD(at[12], at[57]); MULADD(at[13], at[56]); MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]); MULADD(at[28], at[41]); MULADD(at[29], at[40]); MULADD(at[30], at[39]); MULADD(at[31], at[38]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[7], at[63]); MULADD(at[8], at[62]); MULADD(at[9], at[61]); MULADD(at[10], at[60]); MULADD(at[11], at[59]); MULADD(at[12], at[58]); MULADD(at[13], at[57]); MULADD(at[14], at[56]); MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]); MULADD(at[28], at[42]); MULADD(at[29], at[41]); MULADD(at[30], at[40]); MULADD(at[31], at[39]); + COMBA_STORE(C->dp[38]); + + /* early out at 40 digits, 40*32==1280, or two 640 bit operands */ + if (out_size <= 40) { COMBA_STORE2(C->dp[39]); C->used = 40; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } + + /* 39 */ + COMBA_FORWARD; + MULADD(at[8], at[63]); MULADD(at[9], at[62]); MULADD(at[10], at[61]); MULADD(at[11], at[60]); MULADD(at[12], at[59]); MULADD(at[13], at[58]); MULADD(at[14], at[57]); MULADD(at[15], at[56]); MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]); MULADD(at[28], at[43]); MULADD(at[29], at[42]); MULADD(at[30], at[41]); MULADD(at[31], at[40]); + COMBA_STORE(C->dp[39]); + /* 40 */ + COMBA_FORWARD; + MULADD(at[9], at[63]); MULADD(at[10], at[62]); MULADD(at[11], at[61]); MULADD(at[12], at[60]); MULADD(at[13], at[59]); MULADD(at[14], at[58]); MULADD(at[15], at[57]); MULADD(at[16], at[56]); MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]); MULADD(at[28], at[44]); MULADD(at[29], at[43]); MULADD(at[30], at[42]); MULADD(at[31], at[41]); + COMBA_STORE(C->dp[40]); + /* 41 */ + COMBA_FORWARD; + MULADD(at[10], at[63]); MULADD(at[11], at[62]); MULADD(at[12], at[61]); MULADD(at[13], at[60]); MULADD(at[14], at[59]); MULADD(at[15], at[58]); MULADD(at[16], at[57]); MULADD(at[17], at[56]); MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]); MULADD(at[28], at[45]); MULADD(at[29], at[44]); MULADD(at[30], at[43]); MULADD(at[31], at[42]); + COMBA_STORE(C->dp[41]); + /* 42 */ + COMBA_FORWARD; + MULADD(at[11], at[63]); MULADD(at[12], at[62]); MULADD(at[13], at[61]); MULADD(at[14], at[60]); MULADD(at[15], at[59]); MULADD(at[16], at[58]); MULADD(at[17], at[57]); MULADD(at[18], at[56]); MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]); MULADD(at[28], at[46]); MULADD(at[29], at[45]); MULADD(at[30], at[44]); MULADD(at[31], at[43]); + COMBA_STORE(C->dp[42]); + /* 43 */ + COMBA_FORWARD; + MULADD(at[12], at[63]); MULADD(at[13], at[62]); MULADD(at[14], at[61]); MULADD(at[15], at[60]); MULADD(at[16], at[59]); MULADD(at[17], at[58]); MULADD(at[18], at[57]); MULADD(at[19], at[56]); MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); MULADD(at[28], at[47]); MULADD(at[29], at[46]); MULADD(at[30], at[45]); MULADD(at[31], at[44]); + COMBA_STORE(C->dp[43]); + /* 44 */ + COMBA_FORWARD; + MULADD(at[13], at[63]); MULADD(at[14], at[62]); MULADD(at[15], at[61]); MULADD(at[16], at[60]); MULADD(at[17], at[59]); MULADD(at[18], at[58]); MULADD(at[19], at[57]); MULADD(at[20], at[56]); MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); MULADD(at[28], at[48]); MULADD(at[29], at[47]); MULADD(at[30], at[46]); MULADD(at[31], at[45]); + COMBA_STORE(C->dp[44]); + /* 45 */ + COMBA_FORWARD; + MULADD(at[14], at[63]); MULADD(at[15], at[62]); MULADD(at[16], at[61]); MULADD(at[17], at[60]); MULADD(at[18], at[59]); MULADD(at[19], at[58]); MULADD(at[20], at[57]); MULADD(at[21], at[56]); MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); MULADD(at[28], at[49]); MULADD(at[29], at[48]); MULADD(at[30], at[47]); MULADD(at[31], at[46]); + COMBA_STORE(C->dp[45]); + /* 46 */ + COMBA_FORWARD; + MULADD(at[15], at[63]); MULADD(at[16], at[62]); MULADD(at[17], at[61]); MULADD(at[18], at[60]); MULADD(at[19], at[59]); MULADD(at[20], at[58]); MULADD(at[21], at[57]); MULADD(at[22], at[56]); MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); MULADD(at[28], at[50]); MULADD(at[29], at[49]); MULADD(at[30], at[48]); MULADD(at[31], at[47]); + COMBA_STORE(C->dp[46]); + + /* early out at 48 digits, 48*32==1536, or two 768 bit operands */ + if (out_size <= 48) { COMBA_STORE2(C->dp[47]); C->used = 48; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } + + /* 47 */ + COMBA_FORWARD; + MULADD(at[16], at[63]); MULADD(at[17], at[62]); MULADD(at[18], at[61]); MULADD(at[19], at[60]); MULADD(at[20], at[59]); MULADD(at[21], at[58]); MULADD(at[22], at[57]); MULADD(at[23], at[56]); MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); MULADD(at[28], at[51]); MULADD(at[29], at[50]); MULADD(at[30], at[49]); MULADD(at[31], at[48]); + COMBA_STORE(C->dp[47]); + /* 48 */ + COMBA_FORWARD; + MULADD(at[17], at[63]); MULADD(at[18], at[62]); MULADD(at[19], at[61]); MULADD(at[20], at[60]); MULADD(at[21], at[59]); MULADD(at[22], at[58]); MULADD(at[23], at[57]); MULADD(at[24], at[56]); MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); MULADD(at[28], at[52]); MULADD(at[29], at[51]); MULADD(at[30], at[50]); MULADD(at[31], at[49]); + COMBA_STORE(C->dp[48]); + /* 49 */ + COMBA_FORWARD; + MULADD(at[18], at[63]); MULADD(at[19], at[62]); MULADD(at[20], at[61]); MULADD(at[21], at[60]); MULADD(at[22], at[59]); MULADD(at[23], at[58]); MULADD(at[24], at[57]); MULADD(at[25], at[56]); MULADD(at[26], at[55]); MULADD(at[27], at[54]); MULADD(at[28], at[53]); MULADD(at[29], at[52]); MULADD(at[30], at[51]); MULADD(at[31], at[50]); + COMBA_STORE(C->dp[49]); + /* 50 */ + COMBA_FORWARD; + MULADD(at[19], at[63]); MULADD(at[20], at[62]); MULADD(at[21], at[61]); MULADD(at[22], at[60]); MULADD(at[23], at[59]); MULADD(at[24], at[58]); MULADD(at[25], at[57]); MULADD(at[26], at[56]); MULADD(at[27], at[55]); MULADD(at[28], at[54]); MULADD(at[29], at[53]); MULADD(at[30], at[52]); MULADD(at[31], at[51]); + COMBA_STORE(C->dp[50]); + /* 51 */ + COMBA_FORWARD; + MULADD(at[20], at[63]); MULADD(at[21], at[62]); MULADD(at[22], at[61]); MULADD(at[23], at[60]); MULADD(at[24], at[59]); MULADD(at[25], at[58]); MULADD(at[26], at[57]); MULADD(at[27], at[56]); MULADD(at[28], at[55]); MULADD(at[29], at[54]); MULADD(at[30], at[53]); MULADD(at[31], at[52]); + COMBA_STORE(C->dp[51]); + /* 52 */ + COMBA_FORWARD; + MULADD(at[21], at[63]); MULADD(at[22], at[62]); MULADD(at[23], at[61]); MULADD(at[24], at[60]); MULADD(at[25], at[59]); MULADD(at[26], at[58]); MULADD(at[27], at[57]); MULADD(at[28], at[56]); MULADD(at[29], at[55]); MULADD(at[30], at[54]); MULADD(at[31], at[53]); + COMBA_STORE(C->dp[52]); + /* 53 */ + COMBA_FORWARD; + MULADD(at[22], at[63]); MULADD(at[23], at[62]); MULADD(at[24], at[61]); MULADD(at[25], at[60]); MULADD(at[26], at[59]); MULADD(at[27], at[58]); MULADD(at[28], at[57]); MULADD(at[29], at[56]); MULADD(at[30], at[55]); MULADD(at[31], at[54]); + COMBA_STORE(C->dp[53]); + /* 54 */ + COMBA_FORWARD; + MULADD(at[23], at[63]); MULADD(at[24], at[62]); MULADD(at[25], at[61]); MULADD(at[26], at[60]); MULADD(at[27], at[59]); MULADD(at[28], at[58]); MULADD(at[29], at[57]); MULADD(at[30], at[56]); MULADD(at[31], at[55]); + COMBA_STORE(C->dp[54]); + + /* early out at 56 digits, 56*32==1792, or two 896 bit operands */ + if (out_size <= 56) { COMBA_STORE2(C->dp[55]); C->used = 56; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } + + /* 55 */ + COMBA_FORWARD; + MULADD(at[24], at[63]); MULADD(at[25], at[62]); MULADD(at[26], at[61]); MULADD(at[27], at[60]); MULADD(at[28], at[59]); MULADD(at[29], at[58]); MULADD(at[30], at[57]); MULADD(at[31], at[56]); + COMBA_STORE(C->dp[55]); + /* 56 */ + COMBA_FORWARD; + MULADD(at[25], at[63]); MULADD(at[26], at[62]); MULADD(at[27], at[61]); MULADD(at[28], at[60]); MULADD(at[29], at[59]); MULADD(at[30], at[58]); MULADD(at[31], at[57]); + COMBA_STORE(C->dp[56]); + /* 57 */ + COMBA_FORWARD; + MULADD(at[26], at[63]); MULADD(at[27], at[62]); MULADD(at[28], at[61]); MULADD(at[29], at[60]); MULADD(at[30], at[59]); MULADD(at[31], at[58]); + COMBA_STORE(C->dp[57]); + /* 58 */ + COMBA_FORWARD; + MULADD(at[27], at[63]); MULADD(at[28], at[62]); MULADD(at[29], at[61]); MULADD(at[30], at[60]); MULADD(at[31], at[59]); + COMBA_STORE(C->dp[58]); + /* 59 */ + COMBA_FORWARD; + MULADD(at[28], at[63]); MULADD(at[29], at[62]); MULADD(at[30], at[61]); MULADD(at[31], at[60]); + COMBA_STORE(C->dp[59]); + /* 60 */ + COMBA_FORWARD; + MULADD(at[29], at[63]); MULADD(at[30], at[62]); MULADD(at[31], at[61]); + COMBA_STORE(C->dp[60]); + /* 61 */ + COMBA_FORWARD; + MULADD(at[30], at[63]); MULADD(at[31], at[62]); + COMBA_STORE(C->dp[61]); + /* 62 */ + COMBA_FORWARD; + MULADD(at[31], at[63]); + COMBA_STORE(C->dp[62]); + COMBA_STORE2(C->dp[63]); + C->used = 64; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i new file mode 100644 index 00000000..a3bdd429 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i @@ -0,0 +1,66 @@ +/* fp_mul_comba_4.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL4 +void fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[8]; + + memcpy(at, A->dp, 4 * sizeof(fp_digit)); + memcpy(at+4, B->dp, 4 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[4]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[5]); MULADD(at[1], at[4]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[2], at[7]); MULADD(at[3], at[6]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[3], at[7]); + COMBA_STORE(C->dp[6]); + COMBA_STORE2(C->dp[7]); + C->used = 8; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i new file mode 100644 index 00000000..bb068583 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i @@ -0,0 +1,418 @@ +/* fp_mul_comba_48.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL48 +void fp_mul_comba48(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[96]; + + memcpy(at, A->dp, 48 * sizeof(fp_digit)); + memcpy(at+48, B->dp, 48 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[48]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[49]); MULADD(at[1], at[48]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[56]); MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[57]); MULADD(at[1], at[56]); MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[58]); MULADD(at[1], at[57]); MULADD(at[2], at[56]); MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[59]); MULADD(at[1], at[58]); MULADD(at[2], at[57]); MULADD(at[3], at[56]); MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[60]); MULADD(at[1], at[59]); MULADD(at[2], at[58]); MULADD(at[3], at[57]); MULADD(at[4], at[56]); MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[61]); MULADD(at[1], at[60]); MULADD(at[2], at[59]); MULADD(at[3], at[58]); MULADD(at[4], at[57]); MULADD(at[5], at[56]); MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[62]); MULADD(at[1], at[61]); MULADD(at[2], at[60]); MULADD(at[3], at[59]); MULADD(at[4], at[58]); MULADD(at[5], at[57]); MULADD(at[6], at[56]); MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[63]); MULADD(at[1], at[62]); MULADD(at[2], at[61]); MULADD(at[3], at[60]); MULADD(at[4], at[59]); MULADD(at[5], at[58]); MULADD(at[6], at[57]); MULADD(at[7], at[56]); MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[64]); MULADD(at[1], at[63]); MULADD(at[2], at[62]); MULADD(at[3], at[61]); MULADD(at[4], at[60]); MULADD(at[5], at[59]); MULADD(at[6], at[58]); MULADD(at[7], at[57]); MULADD(at[8], at[56]); MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[65]); MULADD(at[1], at[64]); MULADD(at[2], at[63]); MULADD(at[3], at[62]); MULADD(at[4], at[61]); MULADD(at[5], at[60]); MULADD(at[6], at[59]); MULADD(at[7], at[58]); MULADD(at[8], at[57]); MULADD(at[9], at[56]); MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[66]); MULADD(at[1], at[65]); MULADD(at[2], at[64]); MULADD(at[3], at[63]); MULADD(at[4], at[62]); MULADD(at[5], at[61]); MULADD(at[6], at[60]); MULADD(at[7], at[59]); MULADD(at[8], at[58]); MULADD(at[9], at[57]); MULADD(at[10], at[56]); MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[67]); MULADD(at[1], at[66]); MULADD(at[2], at[65]); MULADD(at[3], at[64]); MULADD(at[4], at[63]); MULADD(at[5], at[62]); MULADD(at[6], at[61]); MULADD(at[7], at[60]); MULADD(at[8], at[59]); MULADD(at[9], at[58]); MULADD(at[10], at[57]); MULADD(at[11], at[56]); MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[0], at[68]); MULADD(at[1], at[67]); MULADD(at[2], at[66]); MULADD(at[3], at[65]); MULADD(at[4], at[64]); MULADD(at[5], at[63]); MULADD(at[6], at[62]); MULADD(at[7], at[61]); MULADD(at[8], at[60]); MULADD(at[9], at[59]); MULADD(at[10], at[58]); MULADD(at[11], at[57]); MULADD(at[12], at[56]); MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[0], at[69]); MULADD(at[1], at[68]); MULADD(at[2], at[67]); MULADD(at[3], at[66]); MULADD(at[4], at[65]); MULADD(at[5], at[64]); MULADD(at[6], at[63]); MULADD(at[7], at[62]); MULADD(at[8], at[61]); MULADD(at[9], at[60]); MULADD(at[10], at[59]); MULADD(at[11], at[58]); MULADD(at[12], at[57]); MULADD(at[13], at[56]); MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[0], at[70]); MULADD(at[1], at[69]); MULADD(at[2], at[68]); MULADD(at[3], at[67]); MULADD(at[4], at[66]); MULADD(at[5], at[65]); MULADD(at[6], at[64]); MULADD(at[7], at[63]); MULADD(at[8], at[62]); MULADD(at[9], at[61]); MULADD(at[10], at[60]); MULADD(at[11], at[59]); MULADD(at[12], at[58]); MULADD(at[13], at[57]); MULADD(at[14], at[56]); MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[0], at[71]); MULADD(at[1], at[70]); MULADD(at[2], at[69]); MULADD(at[3], at[68]); MULADD(at[4], at[67]); MULADD(at[5], at[66]); MULADD(at[6], at[65]); MULADD(at[7], at[64]); MULADD(at[8], at[63]); MULADD(at[9], at[62]); MULADD(at[10], at[61]); MULADD(at[11], at[60]); MULADD(at[12], at[59]); MULADD(at[13], at[58]); MULADD(at[14], at[57]); MULADD(at[15], at[56]); MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[0], at[72]); MULADD(at[1], at[71]); MULADD(at[2], at[70]); MULADD(at[3], at[69]); MULADD(at[4], at[68]); MULADD(at[5], at[67]); MULADD(at[6], at[66]); MULADD(at[7], at[65]); MULADD(at[8], at[64]); MULADD(at[9], at[63]); MULADD(at[10], at[62]); MULADD(at[11], at[61]); MULADD(at[12], at[60]); MULADD(at[13], at[59]); MULADD(at[14], at[58]); MULADD(at[15], at[57]); MULADD(at[16], at[56]); MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[0], at[73]); MULADD(at[1], at[72]); MULADD(at[2], at[71]); MULADD(at[3], at[70]); MULADD(at[4], at[69]); MULADD(at[5], at[68]); MULADD(at[6], at[67]); MULADD(at[7], at[66]); MULADD(at[8], at[65]); MULADD(at[9], at[64]); MULADD(at[10], at[63]); MULADD(at[11], at[62]); MULADD(at[12], at[61]); MULADD(at[13], at[60]); MULADD(at[14], at[59]); MULADD(at[15], at[58]); MULADD(at[16], at[57]); MULADD(at[17], at[56]); MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[0], at[74]); MULADD(at[1], at[73]); MULADD(at[2], at[72]); MULADD(at[3], at[71]); MULADD(at[4], at[70]); MULADD(at[5], at[69]); MULADD(at[6], at[68]); MULADD(at[7], at[67]); MULADD(at[8], at[66]); MULADD(at[9], at[65]); MULADD(at[10], at[64]); MULADD(at[11], at[63]); MULADD(at[12], at[62]); MULADD(at[13], at[61]); MULADD(at[14], at[60]); MULADD(at[15], at[59]); MULADD(at[16], at[58]); MULADD(at[17], at[57]); MULADD(at[18], at[56]); MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[0], at[75]); MULADD(at[1], at[74]); MULADD(at[2], at[73]); MULADD(at[3], at[72]); MULADD(at[4], at[71]); MULADD(at[5], at[70]); MULADD(at[6], at[69]); MULADD(at[7], at[68]); MULADD(at[8], at[67]); MULADD(at[9], at[66]); MULADD(at[10], at[65]); MULADD(at[11], at[64]); MULADD(at[12], at[63]); MULADD(at[13], at[62]); MULADD(at[14], at[61]); MULADD(at[15], at[60]); MULADD(at[16], at[59]); MULADD(at[17], at[58]); MULADD(at[18], at[57]); MULADD(at[19], at[56]); MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[0], at[76]); MULADD(at[1], at[75]); MULADD(at[2], at[74]); MULADD(at[3], at[73]); MULADD(at[4], at[72]); MULADD(at[5], at[71]); MULADD(at[6], at[70]); MULADD(at[7], at[69]); MULADD(at[8], at[68]); MULADD(at[9], at[67]); MULADD(at[10], at[66]); MULADD(at[11], at[65]); MULADD(at[12], at[64]); MULADD(at[13], at[63]); MULADD(at[14], at[62]); MULADD(at[15], at[61]); MULADD(at[16], at[60]); MULADD(at[17], at[59]); MULADD(at[18], at[58]); MULADD(at[19], at[57]); MULADD(at[20], at[56]); MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); MULADD(at[28], at[48]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[0], at[77]); MULADD(at[1], at[76]); MULADD(at[2], at[75]); MULADD(at[3], at[74]); MULADD(at[4], at[73]); MULADD(at[5], at[72]); MULADD(at[6], at[71]); MULADD(at[7], at[70]); MULADD(at[8], at[69]); MULADD(at[9], at[68]); MULADD(at[10], at[67]); MULADD(at[11], at[66]); MULADD(at[12], at[65]); MULADD(at[13], at[64]); MULADD(at[14], at[63]); MULADD(at[15], at[62]); MULADD(at[16], at[61]); MULADD(at[17], at[60]); MULADD(at[18], at[59]); MULADD(at[19], at[58]); MULADD(at[20], at[57]); MULADD(at[21], at[56]); MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); MULADD(at[28], at[49]); MULADD(at[29], at[48]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[0], at[78]); MULADD(at[1], at[77]); MULADD(at[2], at[76]); MULADD(at[3], at[75]); MULADD(at[4], at[74]); MULADD(at[5], at[73]); MULADD(at[6], at[72]); MULADD(at[7], at[71]); MULADD(at[8], at[70]); MULADD(at[9], at[69]); MULADD(at[10], at[68]); MULADD(at[11], at[67]); MULADD(at[12], at[66]); MULADD(at[13], at[65]); MULADD(at[14], at[64]); MULADD(at[15], at[63]); MULADD(at[16], at[62]); MULADD(at[17], at[61]); MULADD(at[18], at[60]); MULADD(at[19], at[59]); MULADD(at[20], at[58]); MULADD(at[21], at[57]); MULADD(at[22], at[56]); MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); MULADD(at[28], at[50]); MULADD(at[29], at[49]); MULADD(at[30], at[48]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[0], at[79]); MULADD(at[1], at[78]); MULADD(at[2], at[77]); MULADD(at[3], at[76]); MULADD(at[4], at[75]); MULADD(at[5], at[74]); MULADD(at[6], at[73]); MULADD(at[7], at[72]); MULADD(at[8], at[71]); MULADD(at[9], at[70]); MULADD(at[10], at[69]); MULADD(at[11], at[68]); MULADD(at[12], at[67]); MULADD(at[13], at[66]); MULADD(at[14], at[65]); MULADD(at[15], at[64]); MULADD(at[16], at[63]); MULADD(at[17], at[62]); MULADD(at[18], at[61]); MULADD(at[19], at[60]); MULADD(at[20], at[59]); MULADD(at[21], at[58]); MULADD(at[22], at[57]); MULADD(at[23], at[56]); MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); MULADD(at[28], at[51]); MULADD(at[29], at[50]); MULADD(at[30], at[49]); MULADD(at[31], at[48]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[0], at[80]); MULADD(at[1], at[79]); MULADD(at[2], at[78]); MULADD(at[3], at[77]); MULADD(at[4], at[76]); MULADD(at[5], at[75]); MULADD(at[6], at[74]); MULADD(at[7], at[73]); MULADD(at[8], at[72]); MULADD(at[9], at[71]); MULADD(at[10], at[70]); MULADD(at[11], at[69]); MULADD(at[12], at[68]); MULADD(at[13], at[67]); MULADD(at[14], at[66]); MULADD(at[15], at[65]); MULADD(at[16], at[64]); MULADD(at[17], at[63]); MULADD(at[18], at[62]); MULADD(at[19], at[61]); MULADD(at[20], at[60]); MULADD(at[21], at[59]); MULADD(at[22], at[58]); MULADD(at[23], at[57]); MULADD(at[24], at[56]); MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); MULADD(at[28], at[52]); MULADD(at[29], at[51]); MULADD(at[30], at[50]); MULADD(at[31], at[49]); MULADD(at[32], at[48]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[0], at[81]); MULADD(at[1], at[80]); MULADD(at[2], at[79]); MULADD(at[3], at[78]); MULADD(at[4], at[77]); MULADD(at[5], at[76]); MULADD(at[6], at[75]); MULADD(at[7], at[74]); MULADD(at[8], at[73]); MULADD(at[9], at[72]); MULADD(at[10], at[71]); MULADD(at[11], at[70]); MULADD(at[12], at[69]); MULADD(at[13], at[68]); MULADD(at[14], at[67]); MULADD(at[15], at[66]); MULADD(at[16], at[65]); MULADD(at[17], at[64]); MULADD(at[18], at[63]); MULADD(at[19], at[62]); MULADD(at[20], at[61]); MULADD(at[21], at[60]); MULADD(at[22], at[59]); MULADD(at[23], at[58]); MULADD(at[24], at[57]); MULADD(at[25], at[56]); MULADD(at[26], at[55]); MULADD(at[27], at[54]); MULADD(at[28], at[53]); MULADD(at[29], at[52]); MULADD(at[30], at[51]); MULADD(at[31], at[50]); MULADD(at[32], at[49]); MULADD(at[33], at[48]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[0], at[82]); MULADD(at[1], at[81]); MULADD(at[2], at[80]); MULADD(at[3], at[79]); MULADD(at[4], at[78]); MULADD(at[5], at[77]); MULADD(at[6], at[76]); MULADD(at[7], at[75]); MULADD(at[8], at[74]); MULADD(at[9], at[73]); MULADD(at[10], at[72]); MULADD(at[11], at[71]); MULADD(at[12], at[70]); MULADD(at[13], at[69]); MULADD(at[14], at[68]); MULADD(at[15], at[67]); MULADD(at[16], at[66]); MULADD(at[17], at[65]); MULADD(at[18], at[64]); MULADD(at[19], at[63]); MULADD(at[20], at[62]); MULADD(at[21], at[61]); MULADD(at[22], at[60]); MULADD(at[23], at[59]); MULADD(at[24], at[58]); MULADD(at[25], at[57]); MULADD(at[26], at[56]); MULADD(at[27], at[55]); MULADD(at[28], at[54]); MULADD(at[29], at[53]); MULADD(at[30], at[52]); MULADD(at[31], at[51]); MULADD(at[32], at[50]); MULADD(at[33], at[49]); MULADD(at[34], at[48]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[0], at[83]); MULADD(at[1], at[82]); MULADD(at[2], at[81]); MULADD(at[3], at[80]); MULADD(at[4], at[79]); MULADD(at[5], at[78]); MULADD(at[6], at[77]); MULADD(at[7], at[76]); MULADD(at[8], at[75]); MULADD(at[9], at[74]); MULADD(at[10], at[73]); MULADD(at[11], at[72]); MULADD(at[12], at[71]); MULADD(at[13], at[70]); MULADD(at[14], at[69]); MULADD(at[15], at[68]); MULADD(at[16], at[67]); MULADD(at[17], at[66]); MULADD(at[18], at[65]); MULADD(at[19], at[64]); MULADD(at[20], at[63]); MULADD(at[21], at[62]); MULADD(at[22], at[61]); MULADD(at[23], at[60]); MULADD(at[24], at[59]); MULADD(at[25], at[58]); MULADD(at[26], at[57]); MULADD(at[27], at[56]); MULADD(at[28], at[55]); MULADD(at[29], at[54]); MULADD(at[30], at[53]); MULADD(at[31], at[52]); MULADD(at[32], at[51]); MULADD(at[33], at[50]); MULADD(at[34], at[49]); MULADD(at[35], at[48]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[0], at[84]); MULADD(at[1], at[83]); MULADD(at[2], at[82]); MULADD(at[3], at[81]); MULADD(at[4], at[80]); MULADD(at[5], at[79]); MULADD(at[6], at[78]); MULADD(at[7], at[77]); MULADD(at[8], at[76]); MULADD(at[9], at[75]); MULADD(at[10], at[74]); MULADD(at[11], at[73]); MULADD(at[12], at[72]); MULADD(at[13], at[71]); MULADD(at[14], at[70]); MULADD(at[15], at[69]); MULADD(at[16], at[68]); MULADD(at[17], at[67]); MULADD(at[18], at[66]); MULADD(at[19], at[65]); MULADD(at[20], at[64]); MULADD(at[21], at[63]); MULADD(at[22], at[62]); MULADD(at[23], at[61]); MULADD(at[24], at[60]); MULADD(at[25], at[59]); MULADD(at[26], at[58]); MULADD(at[27], at[57]); MULADD(at[28], at[56]); MULADD(at[29], at[55]); MULADD(at[30], at[54]); MULADD(at[31], at[53]); MULADD(at[32], at[52]); MULADD(at[33], at[51]); MULADD(at[34], at[50]); MULADD(at[35], at[49]); MULADD(at[36], at[48]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[0], at[85]); MULADD(at[1], at[84]); MULADD(at[2], at[83]); MULADD(at[3], at[82]); MULADD(at[4], at[81]); MULADD(at[5], at[80]); MULADD(at[6], at[79]); MULADD(at[7], at[78]); MULADD(at[8], at[77]); MULADD(at[9], at[76]); MULADD(at[10], at[75]); MULADD(at[11], at[74]); MULADD(at[12], at[73]); MULADD(at[13], at[72]); MULADD(at[14], at[71]); MULADD(at[15], at[70]); MULADD(at[16], at[69]); MULADD(at[17], at[68]); MULADD(at[18], at[67]); MULADD(at[19], at[66]); MULADD(at[20], at[65]); MULADD(at[21], at[64]); MULADD(at[22], at[63]); MULADD(at[23], at[62]); MULADD(at[24], at[61]); MULADD(at[25], at[60]); MULADD(at[26], at[59]); MULADD(at[27], at[58]); MULADD(at[28], at[57]); MULADD(at[29], at[56]); MULADD(at[30], at[55]); MULADD(at[31], at[54]); MULADD(at[32], at[53]); MULADD(at[33], at[52]); MULADD(at[34], at[51]); MULADD(at[35], at[50]); MULADD(at[36], at[49]); MULADD(at[37], at[48]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[0], at[86]); MULADD(at[1], at[85]); MULADD(at[2], at[84]); MULADD(at[3], at[83]); MULADD(at[4], at[82]); MULADD(at[5], at[81]); MULADD(at[6], at[80]); MULADD(at[7], at[79]); MULADD(at[8], at[78]); MULADD(at[9], at[77]); MULADD(at[10], at[76]); MULADD(at[11], at[75]); MULADD(at[12], at[74]); MULADD(at[13], at[73]); MULADD(at[14], at[72]); MULADD(at[15], at[71]); MULADD(at[16], at[70]); MULADD(at[17], at[69]); MULADD(at[18], at[68]); MULADD(at[19], at[67]); MULADD(at[20], at[66]); MULADD(at[21], at[65]); MULADD(at[22], at[64]); MULADD(at[23], at[63]); MULADD(at[24], at[62]); MULADD(at[25], at[61]); MULADD(at[26], at[60]); MULADD(at[27], at[59]); MULADD(at[28], at[58]); MULADD(at[29], at[57]); MULADD(at[30], at[56]); MULADD(at[31], at[55]); MULADD(at[32], at[54]); MULADD(at[33], at[53]); MULADD(at[34], at[52]); MULADD(at[35], at[51]); MULADD(at[36], at[50]); MULADD(at[37], at[49]); MULADD(at[38], at[48]); + COMBA_STORE(C->dp[38]); + /* 39 */ + COMBA_FORWARD; + MULADD(at[0], at[87]); MULADD(at[1], at[86]); MULADD(at[2], at[85]); MULADD(at[3], at[84]); MULADD(at[4], at[83]); MULADD(at[5], at[82]); MULADD(at[6], at[81]); MULADD(at[7], at[80]); MULADD(at[8], at[79]); MULADD(at[9], at[78]); MULADD(at[10], at[77]); MULADD(at[11], at[76]); MULADD(at[12], at[75]); MULADD(at[13], at[74]); MULADD(at[14], at[73]); MULADD(at[15], at[72]); MULADD(at[16], at[71]); MULADD(at[17], at[70]); MULADD(at[18], at[69]); MULADD(at[19], at[68]); MULADD(at[20], at[67]); MULADD(at[21], at[66]); MULADD(at[22], at[65]); MULADD(at[23], at[64]); MULADD(at[24], at[63]); MULADD(at[25], at[62]); MULADD(at[26], at[61]); MULADD(at[27], at[60]); MULADD(at[28], at[59]); MULADD(at[29], at[58]); MULADD(at[30], at[57]); MULADD(at[31], at[56]); MULADD(at[32], at[55]); MULADD(at[33], at[54]); MULADD(at[34], at[53]); MULADD(at[35], at[52]); MULADD(at[36], at[51]); MULADD(at[37], at[50]); MULADD(at[38], at[49]); MULADD(at[39], at[48]); + COMBA_STORE(C->dp[39]); + /* 40 */ + COMBA_FORWARD; + MULADD(at[0], at[88]); MULADD(at[1], at[87]); MULADD(at[2], at[86]); MULADD(at[3], at[85]); MULADD(at[4], at[84]); MULADD(at[5], at[83]); MULADD(at[6], at[82]); MULADD(at[7], at[81]); MULADD(at[8], at[80]); MULADD(at[9], at[79]); MULADD(at[10], at[78]); MULADD(at[11], at[77]); MULADD(at[12], at[76]); MULADD(at[13], at[75]); MULADD(at[14], at[74]); MULADD(at[15], at[73]); MULADD(at[16], at[72]); MULADD(at[17], at[71]); MULADD(at[18], at[70]); MULADD(at[19], at[69]); MULADD(at[20], at[68]); MULADD(at[21], at[67]); MULADD(at[22], at[66]); MULADD(at[23], at[65]); MULADD(at[24], at[64]); MULADD(at[25], at[63]); MULADD(at[26], at[62]); MULADD(at[27], at[61]); MULADD(at[28], at[60]); MULADD(at[29], at[59]); MULADD(at[30], at[58]); MULADD(at[31], at[57]); MULADD(at[32], at[56]); MULADD(at[33], at[55]); MULADD(at[34], at[54]); MULADD(at[35], at[53]); MULADD(at[36], at[52]); MULADD(at[37], at[51]); MULADD(at[38], at[50]); MULADD(at[39], at[49]); MULADD(at[40], at[48]); + COMBA_STORE(C->dp[40]); + /* 41 */ + COMBA_FORWARD; + MULADD(at[0], at[89]); MULADD(at[1], at[88]); MULADD(at[2], at[87]); MULADD(at[3], at[86]); MULADD(at[4], at[85]); MULADD(at[5], at[84]); MULADD(at[6], at[83]); MULADD(at[7], at[82]); MULADD(at[8], at[81]); MULADD(at[9], at[80]); MULADD(at[10], at[79]); MULADD(at[11], at[78]); MULADD(at[12], at[77]); MULADD(at[13], at[76]); MULADD(at[14], at[75]); MULADD(at[15], at[74]); MULADD(at[16], at[73]); MULADD(at[17], at[72]); MULADD(at[18], at[71]); MULADD(at[19], at[70]); MULADD(at[20], at[69]); MULADD(at[21], at[68]); MULADD(at[22], at[67]); MULADD(at[23], at[66]); MULADD(at[24], at[65]); MULADD(at[25], at[64]); MULADD(at[26], at[63]); MULADD(at[27], at[62]); MULADD(at[28], at[61]); MULADD(at[29], at[60]); MULADD(at[30], at[59]); MULADD(at[31], at[58]); MULADD(at[32], at[57]); MULADD(at[33], at[56]); MULADD(at[34], at[55]); MULADD(at[35], at[54]); MULADD(at[36], at[53]); MULADD(at[37], at[52]); MULADD(at[38], at[51]); MULADD(at[39], at[50]); MULADD(at[40], at[49]); MULADD(at[41], at[48]); + COMBA_STORE(C->dp[41]); + /* 42 */ + COMBA_FORWARD; + MULADD(at[0], at[90]); MULADD(at[1], at[89]); MULADD(at[2], at[88]); MULADD(at[3], at[87]); MULADD(at[4], at[86]); MULADD(at[5], at[85]); MULADD(at[6], at[84]); MULADD(at[7], at[83]); MULADD(at[8], at[82]); MULADD(at[9], at[81]); MULADD(at[10], at[80]); MULADD(at[11], at[79]); MULADD(at[12], at[78]); MULADD(at[13], at[77]); MULADD(at[14], at[76]); MULADD(at[15], at[75]); MULADD(at[16], at[74]); MULADD(at[17], at[73]); MULADD(at[18], at[72]); MULADD(at[19], at[71]); MULADD(at[20], at[70]); MULADD(at[21], at[69]); MULADD(at[22], at[68]); MULADD(at[23], at[67]); MULADD(at[24], at[66]); MULADD(at[25], at[65]); MULADD(at[26], at[64]); MULADD(at[27], at[63]); MULADD(at[28], at[62]); MULADD(at[29], at[61]); MULADD(at[30], at[60]); MULADD(at[31], at[59]); MULADD(at[32], at[58]); MULADD(at[33], at[57]); MULADD(at[34], at[56]); MULADD(at[35], at[55]); MULADD(at[36], at[54]); MULADD(at[37], at[53]); MULADD(at[38], at[52]); MULADD(at[39], at[51]); MULADD(at[40], at[50]); MULADD(at[41], at[49]); MULADD(at[42], at[48]); + COMBA_STORE(C->dp[42]); + /* 43 */ + COMBA_FORWARD; + MULADD(at[0], at[91]); MULADD(at[1], at[90]); MULADD(at[2], at[89]); MULADD(at[3], at[88]); MULADD(at[4], at[87]); MULADD(at[5], at[86]); MULADD(at[6], at[85]); MULADD(at[7], at[84]); MULADD(at[8], at[83]); MULADD(at[9], at[82]); MULADD(at[10], at[81]); MULADD(at[11], at[80]); MULADD(at[12], at[79]); MULADD(at[13], at[78]); MULADD(at[14], at[77]); MULADD(at[15], at[76]); MULADD(at[16], at[75]); MULADD(at[17], at[74]); MULADD(at[18], at[73]); MULADD(at[19], at[72]); MULADD(at[20], at[71]); MULADD(at[21], at[70]); MULADD(at[22], at[69]); MULADD(at[23], at[68]); MULADD(at[24], at[67]); MULADD(at[25], at[66]); MULADD(at[26], at[65]); MULADD(at[27], at[64]); MULADD(at[28], at[63]); MULADD(at[29], at[62]); MULADD(at[30], at[61]); MULADD(at[31], at[60]); MULADD(at[32], at[59]); MULADD(at[33], at[58]); MULADD(at[34], at[57]); MULADD(at[35], at[56]); MULADD(at[36], at[55]); MULADD(at[37], at[54]); MULADD(at[38], at[53]); MULADD(at[39], at[52]); MULADD(at[40], at[51]); MULADD(at[41], at[50]); MULADD(at[42], at[49]); MULADD(at[43], at[48]); + COMBA_STORE(C->dp[43]); + /* 44 */ + COMBA_FORWARD; + MULADD(at[0], at[92]); MULADD(at[1], at[91]); MULADD(at[2], at[90]); MULADD(at[3], at[89]); MULADD(at[4], at[88]); MULADD(at[5], at[87]); MULADD(at[6], at[86]); MULADD(at[7], at[85]); MULADD(at[8], at[84]); MULADD(at[9], at[83]); MULADD(at[10], at[82]); MULADD(at[11], at[81]); MULADD(at[12], at[80]); MULADD(at[13], at[79]); MULADD(at[14], at[78]); MULADD(at[15], at[77]); MULADD(at[16], at[76]); MULADD(at[17], at[75]); MULADD(at[18], at[74]); MULADD(at[19], at[73]); MULADD(at[20], at[72]); MULADD(at[21], at[71]); MULADD(at[22], at[70]); MULADD(at[23], at[69]); MULADD(at[24], at[68]); MULADD(at[25], at[67]); MULADD(at[26], at[66]); MULADD(at[27], at[65]); MULADD(at[28], at[64]); MULADD(at[29], at[63]); MULADD(at[30], at[62]); MULADD(at[31], at[61]); MULADD(at[32], at[60]); MULADD(at[33], at[59]); MULADD(at[34], at[58]); MULADD(at[35], at[57]); MULADD(at[36], at[56]); MULADD(at[37], at[55]); MULADD(at[38], at[54]); MULADD(at[39], at[53]); MULADD(at[40], at[52]); MULADD(at[41], at[51]); MULADD(at[42], at[50]); MULADD(at[43], at[49]); MULADD(at[44], at[48]); + COMBA_STORE(C->dp[44]); + /* 45 */ + COMBA_FORWARD; + MULADD(at[0], at[93]); MULADD(at[1], at[92]); MULADD(at[2], at[91]); MULADD(at[3], at[90]); MULADD(at[4], at[89]); MULADD(at[5], at[88]); MULADD(at[6], at[87]); MULADD(at[7], at[86]); MULADD(at[8], at[85]); MULADD(at[9], at[84]); MULADD(at[10], at[83]); MULADD(at[11], at[82]); MULADD(at[12], at[81]); MULADD(at[13], at[80]); MULADD(at[14], at[79]); MULADD(at[15], at[78]); MULADD(at[16], at[77]); MULADD(at[17], at[76]); MULADD(at[18], at[75]); MULADD(at[19], at[74]); MULADD(at[20], at[73]); MULADD(at[21], at[72]); MULADD(at[22], at[71]); MULADD(at[23], at[70]); MULADD(at[24], at[69]); MULADD(at[25], at[68]); MULADD(at[26], at[67]); MULADD(at[27], at[66]); MULADD(at[28], at[65]); MULADD(at[29], at[64]); MULADD(at[30], at[63]); MULADD(at[31], at[62]); MULADD(at[32], at[61]); MULADD(at[33], at[60]); MULADD(at[34], at[59]); MULADD(at[35], at[58]); MULADD(at[36], at[57]); MULADD(at[37], at[56]); MULADD(at[38], at[55]); MULADD(at[39], at[54]); MULADD(at[40], at[53]); MULADD(at[41], at[52]); MULADD(at[42], at[51]); MULADD(at[43], at[50]); MULADD(at[44], at[49]); MULADD(at[45], at[48]); + COMBA_STORE(C->dp[45]); + /* 46 */ + COMBA_FORWARD; + MULADD(at[0], at[94]); MULADD(at[1], at[93]); MULADD(at[2], at[92]); MULADD(at[3], at[91]); MULADD(at[4], at[90]); MULADD(at[5], at[89]); MULADD(at[6], at[88]); MULADD(at[7], at[87]); MULADD(at[8], at[86]); MULADD(at[9], at[85]); MULADD(at[10], at[84]); MULADD(at[11], at[83]); MULADD(at[12], at[82]); MULADD(at[13], at[81]); MULADD(at[14], at[80]); MULADD(at[15], at[79]); MULADD(at[16], at[78]); MULADD(at[17], at[77]); MULADD(at[18], at[76]); MULADD(at[19], at[75]); MULADD(at[20], at[74]); MULADD(at[21], at[73]); MULADD(at[22], at[72]); MULADD(at[23], at[71]); MULADD(at[24], at[70]); MULADD(at[25], at[69]); MULADD(at[26], at[68]); MULADD(at[27], at[67]); MULADD(at[28], at[66]); MULADD(at[29], at[65]); MULADD(at[30], at[64]); MULADD(at[31], at[63]); MULADD(at[32], at[62]); MULADD(at[33], at[61]); MULADD(at[34], at[60]); MULADD(at[35], at[59]); MULADD(at[36], at[58]); MULADD(at[37], at[57]); MULADD(at[38], at[56]); MULADD(at[39], at[55]); MULADD(at[40], at[54]); MULADD(at[41], at[53]); MULADD(at[42], at[52]); MULADD(at[43], at[51]); MULADD(at[44], at[50]); MULADD(at[45], at[49]); MULADD(at[46], at[48]); + COMBA_STORE(C->dp[46]); + /* 47 */ + COMBA_FORWARD; + MULADD(at[0], at[95]); MULADD(at[1], at[94]); MULADD(at[2], at[93]); MULADD(at[3], at[92]); MULADD(at[4], at[91]); MULADD(at[5], at[90]); MULADD(at[6], at[89]); MULADD(at[7], at[88]); MULADD(at[8], at[87]); MULADD(at[9], at[86]); MULADD(at[10], at[85]); MULADD(at[11], at[84]); MULADD(at[12], at[83]); MULADD(at[13], at[82]); MULADD(at[14], at[81]); MULADD(at[15], at[80]); MULADD(at[16], at[79]); MULADD(at[17], at[78]); MULADD(at[18], at[77]); MULADD(at[19], at[76]); MULADD(at[20], at[75]); MULADD(at[21], at[74]); MULADD(at[22], at[73]); MULADD(at[23], at[72]); MULADD(at[24], at[71]); MULADD(at[25], at[70]); MULADD(at[26], at[69]); MULADD(at[27], at[68]); MULADD(at[28], at[67]); MULADD(at[29], at[66]); MULADD(at[30], at[65]); MULADD(at[31], at[64]); MULADD(at[32], at[63]); MULADD(at[33], at[62]); MULADD(at[34], at[61]); MULADD(at[35], at[60]); MULADD(at[36], at[59]); MULADD(at[37], at[58]); MULADD(at[38], at[57]); MULADD(at[39], at[56]); MULADD(at[40], at[55]); MULADD(at[41], at[54]); MULADD(at[42], at[53]); MULADD(at[43], at[52]); MULADD(at[44], at[51]); MULADD(at[45], at[50]); MULADD(at[46], at[49]); MULADD(at[47], at[48]); + COMBA_STORE(C->dp[47]); + /* 48 */ + COMBA_FORWARD; + MULADD(at[1], at[95]); MULADD(at[2], at[94]); MULADD(at[3], at[93]); MULADD(at[4], at[92]); MULADD(at[5], at[91]); MULADD(at[6], at[90]); MULADD(at[7], at[89]); MULADD(at[8], at[88]); MULADD(at[9], at[87]); MULADD(at[10], at[86]); MULADD(at[11], at[85]); MULADD(at[12], at[84]); MULADD(at[13], at[83]); MULADD(at[14], at[82]); MULADD(at[15], at[81]); MULADD(at[16], at[80]); MULADD(at[17], at[79]); MULADD(at[18], at[78]); MULADD(at[19], at[77]); MULADD(at[20], at[76]); MULADD(at[21], at[75]); MULADD(at[22], at[74]); MULADD(at[23], at[73]); MULADD(at[24], at[72]); MULADD(at[25], at[71]); MULADD(at[26], at[70]); MULADD(at[27], at[69]); MULADD(at[28], at[68]); MULADD(at[29], at[67]); MULADD(at[30], at[66]); MULADD(at[31], at[65]); MULADD(at[32], at[64]); MULADD(at[33], at[63]); MULADD(at[34], at[62]); MULADD(at[35], at[61]); MULADD(at[36], at[60]); MULADD(at[37], at[59]); MULADD(at[38], at[58]); MULADD(at[39], at[57]); MULADD(at[40], at[56]); MULADD(at[41], at[55]); MULADD(at[42], at[54]); MULADD(at[43], at[53]); MULADD(at[44], at[52]); MULADD(at[45], at[51]); MULADD(at[46], at[50]); MULADD(at[47], at[49]); + COMBA_STORE(C->dp[48]); + /* 49 */ + COMBA_FORWARD; + MULADD(at[2], at[95]); MULADD(at[3], at[94]); MULADD(at[4], at[93]); MULADD(at[5], at[92]); MULADD(at[6], at[91]); MULADD(at[7], at[90]); MULADD(at[8], at[89]); MULADD(at[9], at[88]); MULADD(at[10], at[87]); MULADD(at[11], at[86]); MULADD(at[12], at[85]); MULADD(at[13], at[84]); MULADD(at[14], at[83]); MULADD(at[15], at[82]); MULADD(at[16], at[81]); MULADD(at[17], at[80]); MULADD(at[18], at[79]); MULADD(at[19], at[78]); MULADD(at[20], at[77]); MULADD(at[21], at[76]); MULADD(at[22], at[75]); MULADD(at[23], at[74]); MULADD(at[24], at[73]); MULADD(at[25], at[72]); MULADD(at[26], at[71]); MULADD(at[27], at[70]); MULADD(at[28], at[69]); MULADD(at[29], at[68]); MULADD(at[30], at[67]); MULADD(at[31], at[66]); MULADD(at[32], at[65]); MULADD(at[33], at[64]); MULADD(at[34], at[63]); MULADD(at[35], at[62]); MULADD(at[36], at[61]); MULADD(at[37], at[60]); MULADD(at[38], at[59]); MULADD(at[39], at[58]); MULADD(at[40], at[57]); MULADD(at[41], at[56]); MULADD(at[42], at[55]); MULADD(at[43], at[54]); MULADD(at[44], at[53]); MULADD(at[45], at[52]); MULADD(at[46], at[51]); MULADD(at[47], at[50]); + COMBA_STORE(C->dp[49]); + /* 50 */ + COMBA_FORWARD; + MULADD(at[3], at[95]); MULADD(at[4], at[94]); MULADD(at[5], at[93]); MULADD(at[6], at[92]); MULADD(at[7], at[91]); MULADD(at[8], at[90]); MULADD(at[9], at[89]); MULADD(at[10], at[88]); MULADD(at[11], at[87]); MULADD(at[12], at[86]); MULADD(at[13], at[85]); MULADD(at[14], at[84]); MULADD(at[15], at[83]); MULADD(at[16], at[82]); MULADD(at[17], at[81]); MULADD(at[18], at[80]); MULADD(at[19], at[79]); MULADD(at[20], at[78]); MULADD(at[21], at[77]); MULADD(at[22], at[76]); MULADD(at[23], at[75]); MULADD(at[24], at[74]); MULADD(at[25], at[73]); MULADD(at[26], at[72]); MULADD(at[27], at[71]); MULADD(at[28], at[70]); MULADD(at[29], at[69]); MULADD(at[30], at[68]); MULADD(at[31], at[67]); MULADD(at[32], at[66]); MULADD(at[33], at[65]); MULADD(at[34], at[64]); MULADD(at[35], at[63]); MULADD(at[36], at[62]); MULADD(at[37], at[61]); MULADD(at[38], at[60]); MULADD(at[39], at[59]); MULADD(at[40], at[58]); MULADD(at[41], at[57]); MULADD(at[42], at[56]); MULADD(at[43], at[55]); MULADD(at[44], at[54]); MULADD(at[45], at[53]); MULADD(at[46], at[52]); MULADD(at[47], at[51]); + COMBA_STORE(C->dp[50]); + /* 51 */ + COMBA_FORWARD; + MULADD(at[4], at[95]); MULADD(at[5], at[94]); MULADD(at[6], at[93]); MULADD(at[7], at[92]); MULADD(at[8], at[91]); MULADD(at[9], at[90]); MULADD(at[10], at[89]); MULADD(at[11], at[88]); MULADD(at[12], at[87]); MULADD(at[13], at[86]); MULADD(at[14], at[85]); MULADD(at[15], at[84]); MULADD(at[16], at[83]); MULADD(at[17], at[82]); MULADD(at[18], at[81]); MULADD(at[19], at[80]); MULADD(at[20], at[79]); MULADD(at[21], at[78]); MULADD(at[22], at[77]); MULADD(at[23], at[76]); MULADD(at[24], at[75]); MULADD(at[25], at[74]); MULADD(at[26], at[73]); MULADD(at[27], at[72]); MULADD(at[28], at[71]); MULADD(at[29], at[70]); MULADD(at[30], at[69]); MULADD(at[31], at[68]); MULADD(at[32], at[67]); MULADD(at[33], at[66]); MULADD(at[34], at[65]); MULADD(at[35], at[64]); MULADD(at[36], at[63]); MULADD(at[37], at[62]); MULADD(at[38], at[61]); MULADD(at[39], at[60]); MULADD(at[40], at[59]); MULADD(at[41], at[58]); MULADD(at[42], at[57]); MULADD(at[43], at[56]); MULADD(at[44], at[55]); MULADD(at[45], at[54]); MULADD(at[46], at[53]); MULADD(at[47], at[52]); + COMBA_STORE(C->dp[51]); + /* 52 */ + COMBA_FORWARD; + MULADD(at[5], at[95]); MULADD(at[6], at[94]); MULADD(at[7], at[93]); MULADD(at[8], at[92]); MULADD(at[9], at[91]); MULADD(at[10], at[90]); MULADD(at[11], at[89]); MULADD(at[12], at[88]); MULADD(at[13], at[87]); MULADD(at[14], at[86]); MULADD(at[15], at[85]); MULADD(at[16], at[84]); MULADD(at[17], at[83]); MULADD(at[18], at[82]); MULADD(at[19], at[81]); MULADD(at[20], at[80]); MULADD(at[21], at[79]); MULADD(at[22], at[78]); MULADD(at[23], at[77]); MULADD(at[24], at[76]); MULADD(at[25], at[75]); MULADD(at[26], at[74]); MULADD(at[27], at[73]); MULADD(at[28], at[72]); MULADD(at[29], at[71]); MULADD(at[30], at[70]); MULADD(at[31], at[69]); MULADD(at[32], at[68]); MULADD(at[33], at[67]); MULADD(at[34], at[66]); MULADD(at[35], at[65]); MULADD(at[36], at[64]); MULADD(at[37], at[63]); MULADD(at[38], at[62]); MULADD(at[39], at[61]); MULADD(at[40], at[60]); MULADD(at[41], at[59]); MULADD(at[42], at[58]); MULADD(at[43], at[57]); MULADD(at[44], at[56]); MULADD(at[45], at[55]); MULADD(at[46], at[54]); MULADD(at[47], at[53]); + COMBA_STORE(C->dp[52]); + /* 53 */ + COMBA_FORWARD; + MULADD(at[6], at[95]); MULADD(at[7], at[94]); MULADD(at[8], at[93]); MULADD(at[9], at[92]); MULADD(at[10], at[91]); MULADD(at[11], at[90]); MULADD(at[12], at[89]); MULADD(at[13], at[88]); MULADD(at[14], at[87]); MULADD(at[15], at[86]); MULADD(at[16], at[85]); MULADD(at[17], at[84]); MULADD(at[18], at[83]); MULADD(at[19], at[82]); MULADD(at[20], at[81]); MULADD(at[21], at[80]); MULADD(at[22], at[79]); MULADD(at[23], at[78]); MULADD(at[24], at[77]); MULADD(at[25], at[76]); MULADD(at[26], at[75]); MULADD(at[27], at[74]); MULADD(at[28], at[73]); MULADD(at[29], at[72]); MULADD(at[30], at[71]); MULADD(at[31], at[70]); MULADD(at[32], at[69]); MULADD(at[33], at[68]); MULADD(at[34], at[67]); MULADD(at[35], at[66]); MULADD(at[36], at[65]); MULADD(at[37], at[64]); MULADD(at[38], at[63]); MULADD(at[39], at[62]); MULADD(at[40], at[61]); MULADD(at[41], at[60]); MULADD(at[42], at[59]); MULADD(at[43], at[58]); MULADD(at[44], at[57]); MULADD(at[45], at[56]); MULADD(at[46], at[55]); MULADD(at[47], at[54]); + COMBA_STORE(C->dp[53]); + /* 54 */ + COMBA_FORWARD; + MULADD(at[7], at[95]); MULADD(at[8], at[94]); MULADD(at[9], at[93]); MULADD(at[10], at[92]); MULADD(at[11], at[91]); MULADD(at[12], at[90]); MULADD(at[13], at[89]); MULADD(at[14], at[88]); MULADD(at[15], at[87]); MULADD(at[16], at[86]); MULADD(at[17], at[85]); MULADD(at[18], at[84]); MULADD(at[19], at[83]); MULADD(at[20], at[82]); MULADD(at[21], at[81]); MULADD(at[22], at[80]); MULADD(at[23], at[79]); MULADD(at[24], at[78]); MULADD(at[25], at[77]); MULADD(at[26], at[76]); MULADD(at[27], at[75]); MULADD(at[28], at[74]); MULADD(at[29], at[73]); MULADD(at[30], at[72]); MULADD(at[31], at[71]); MULADD(at[32], at[70]); MULADD(at[33], at[69]); MULADD(at[34], at[68]); MULADD(at[35], at[67]); MULADD(at[36], at[66]); MULADD(at[37], at[65]); MULADD(at[38], at[64]); MULADD(at[39], at[63]); MULADD(at[40], at[62]); MULADD(at[41], at[61]); MULADD(at[42], at[60]); MULADD(at[43], at[59]); MULADD(at[44], at[58]); MULADD(at[45], at[57]); MULADD(at[46], at[56]); MULADD(at[47], at[55]); + COMBA_STORE(C->dp[54]); + /* 55 */ + COMBA_FORWARD; + MULADD(at[8], at[95]); MULADD(at[9], at[94]); MULADD(at[10], at[93]); MULADD(at[11], at[92]); MULADD(at[12], at[91]); MULADD(at[13], at[90]); MULADD(at[14], at[89]); MULADD(at[15], at[88]); MULADD(at[16], at[87]); MULADD(at[17], at[86]); MULADD(at[18], at[85]); MULADD(at[19], at[84]); MULADD(at[20], at[83]); MULADD(at[21], at[82]); MULADD(at[22], at[81]); MULADD(at[23], at[80]); MULADD(at[24], at[79]); MULADD(at[25], at[78]); MULADD(at[26], at[77]); MULADD(at[27], at[76]); MULADD(at[28], at[75]); MULADD(at[29], at[74]); MULADD(at[30], at[73]); MULADD(at[31], at[72]); MULADD(at[32], at[71]); MULADD(at[33], at[70]); MULADD(at[34], at[69]); MULADD(at[35], at[68]); MULADD(at[36], at[67]); MULADD(at[37], at[66]); MULADD(at[38], at[65]); MULADD(at[39], at[64]); MULADD(at[40], at[63]); MULADD(at[41], at[62]); MULADD(at[42], at[61]); MULADD(at[43], at[60]); MULADD(at[44], at[59]); MULADD(at[45], at[58]); MULADD(at[46], at[57]); MULADD(at[47], at[56]); + COMBA_STORE(C->dp[55]); + /* 56 */ + COMBA_FORWARD; + MULADD(at[9], at[95]); MULADD(at[10], at[94]); MULADD(at[11], at[93]); MULADD(at[12], at[92]); MULADD(at[13], at[91]); MULADD(at[14], at[90]); MULADD(at[15], at[89]); MULADD(at[16], at[88]); MULADD(at[17], at[87]); MULADD(at[18], at[86]); MULADD(at[19], at[85]); MULADD(at[20], at[84]); MULADD(at[21], at[83]); MULADD(at[22], at[82]); MULADD(at[23], at[81]); MULADD(at[24], at[80]); MULADD(at[25], at[79]); MULADD(at[26], at[78]); MULADD(at[27], at[77]); MULADD(at[28], at[76]); MULADD(at[29], at[75]); MULADD(at[30], at[74]); MULADD(at[31], at[73]); MULADD(at[32], at[72]); MULADD(at[33], at[71]); MULADD(at[34], at[70]); MULADD(at[35], at[69]); MULADD(at[36], at[68]); MULADD(at[37], at[67]); MULADD(at[38], at[66]); MULADD(at[39], at[65]); MULADD(at[40], at[64]); MULADD(at[41], at[63]); MULADD(at[42], at[62]); MULADD(at[43], at[61]); MULADD(at[44], at[60]); MULADD(at[45], at[59]); MULADD(at[46], at[58]); MULADD(at[47], at[57]); + COMBA_STORE(C->dp[56]); + /* 57 */ + COMBA_FORWARD; + MULADD(at[10], at[95]); MULADD(at[11], at[94]); MULADD(at[12], at[93]); MULADD(at[13], at[92]); MULADD(at[14], at[91]); MULADD(at[15], at[90]); MULADD(at[16], at[89]); MULADD(at[17], at[88]); MULADD(at[18], at[87]); MULADD(at[19], at[86]); MULADD(at[20], at[85]); MULADD(at[21], at[84]); MULADD(at[22], at[83]); MULADD(at[23], at[82]); MULADD(at[24], at[81]); MULADD(at[25], at[80]); MULADD(at[26], at[79]); MULADD(at[27], at[78]); MULADD(at[28], at[77]); MULADD(at[29], at[76]); MULADD(at[30], at[75]); MULADD(at[31], at[74]); MULADD(at[32], at[73]); MULADD(at[33], at[72]); MULADD(at[34], at[71]); MULADD(at[35], at[70]); MULADD(at[36], at[69]); MULADD(at[37], at[68]); MULADD(at[38], at[67]); MULADD(at[39], at[66]); MULADD(at[40], at[65]); MULADD(at[41], at[64]); MULADD(at[42], at[63]); MULADD(at[43], at[62]); MULADD(at[44], at[61]); MULADD(at[45], at[60]); MULADD(at[46], at[59]); MULADD(at[47], at[58]); + COMBA_STORE(C->dp[57]); + /* 58 */ + COMBA_FORWARD; + MULADD(at[11], at[95]); MULADD(at[12], at[94]); MULADD(at[13], at[93]); MULADD(at[14], at[92]); MULADD(at[15], at[91]); MULADD(at[16], at[90]); MULADD(at[17], at[89]); MULADD(at[18], at[88]); MULADD(at[19], at[87]); MULADD(at[20], at[86]); MULADD(at[21], at[85]); MULADD(at[22], at[84]); MULADD(at[23], at[83]); MULADD(at[24], at[82]); MULADD(at[25], at[81]); MULADD(at[26], at[80]); MULADD(at[27], at[79]); MULADD(at[28], at[78]); MULADD(at[29], at[77]); MULADD(at[30], at[76]); MULADD(at[31], at[75]); MULADD(at[32], at[74]); MULADD(at[33], at[73]); MULADD(at[34], at[72]); MULADD(at[35], at[71]); MULADD(at[36], at[70]); MULADD(at[37], at[69]); MULADD(at[38], at[68]); MULADD(at[39], at[67]); MULADD(at[40], at[66]); MULADD(at[41], at[65]); MULADD(at[42], at[64]); MULADD(at[43], at[63]); MULADD(at[44], at[62]); MULADD(at[45], at[61]); MULADD(at[46], at[60]); MULADD(at[47], at[59]); + COMBA_STORE(C->dp[58]); + /* 59 */ + COMBA_FORWARD; + MULADD(at[12], at[95]); MULADD(at[13], at[94]); MULADD(at[14], at[93]); MULADD(at[15], at[92]); MULADD(at[16], at[91]); MULADD(at[17], at[90]); MULADD(at[18], at[89]); MULADD(at[19], at[88]); MULADD(at[20], at[87]); MULADD(at[21], at[86]); MULADD(at[22], at[85]); MULADD(at[23], at[84]); MULADD(at[24], at[83]); MULADD(at[25], at[82]); MULADD(at[26], at[81]); MULADD(at[27], at[80]); MULADD(at[28], at[79]); MULADD(at[29], at[78]); MULADD(at[30], at[77]); MULADD(at[31], at[76]); MULADD(at[32], at[75]); MULADD(at[33], at[74]); MULADD(at[34], at[73]); MULADD(at[35], at[72]); MULADD(at[36], at[71]); MULADD(at[37], at[70]); MULADD(at[38], at[69]); MULADD(at[39], at[68]); MULADD(at[40], at[67]); MULADD(at[41], at[66]); MULADD(at[42], at[65]); MULADD(at[43], at[64]); MULADD(at[44], at[63]); MULADD(at[45], at[62]); MULADD(at[46], at[61]); MULADD(at[47], at[60]); + COMBA_STORE(C->dp[59]); + /* 60 */ + COMBA_FORWARD; + MULADD(at[13], at[95]); MULADD(at[14], at[94]); MULADD(at[15], at[93]); MULADD(at[16], at[92]); MULADD(at[17], at[91]); MULADD(at[18], at[90]); MULADD(at[19], at[89]); MULADD(at[20], at[88]); MULADD(at[21], at[87]); MULADD(at[22], at[86]); MULADD(at[23], at[85]); MULADD(at[24], at[84]); MULADD(at[25], at[83]); MULADD(at[26], at[82]); MULADD(at[27], at[81]); MULADD(at[28], at[80]); MULADD(at[29], at[79]); MULADD(at[30], at[78]); MULADD(at[31], at[77]); MULADD(at[32], at[76]); MULADD(at[33], at[75]); MULADD(at[34], at[74]); MULADD(at[35], at[73]); MULADD(at[36], at[72]); MULADD(at[37], at[71]); MULADD(at[38], at[70]); MULADD(at[39], at[69]); MULADD(at[40], at[68]); MULADD(at[41], at[67]); MULADD(at[42], at[66]); MULADD(at[43], at[65]); MULADD(at[44], at[64]); MULADD(at[45], at[63]); MULADD(at[46], at[62]); MULADD(at[47], at[61]); + COMBA_STORE(C->dp[60]); + /* 61 */ + COMBA_FORWARD; + MULADD(at[14], at[95]); MULADD(at[15], at[94]); MULADD(at[16], at[93]); MULADD(at[17], at[92]); MULADD(at[18], at[91]); MULADD(at[19], at[90]); MULADD(at[20], at[89]); MULADD(at[21], at[88]); MULADD(at[22], at[87]); MULADD(at[23], at[86]); MULADD(at[24], at[85]); MULADD(at[25], at[84]); MULADD(at[26], at[83]); MULADD(at[27], at[82]); MULADD(at[28], at[81]); MULADD(at[29], at[80]); MULADD(at[30], at[79]); MULADD(at[31], at[78]); MULADD(at[32], at[77]); MULADD(at[33], at[76]); MULADD(at[34], at[75]); MULADD(at[35], at[74]); MULADD(at[36], at[73]); MULADD(at[37], at[72]); MULADD(at[38], at[71]); MULADD(at[39], at[70]); MULADD(at[40], at[69]); MULADD(at[41], at[68]); MULADD(at[42], at[67]); MULADD(at[43], at[66]); MULADD(at[44], at[65]); MULADD(at[45], at[64]); MULADD(at[46], at[63]); MULADD(at[47], at[62]); + COMBA_STORE(C->dp[61]); + /* 62 */ + COMBA_FORWARD; + MULADD(at[15], at[95]); MULADD(at[16], at[94]); MULADD(at[17], at[93]); MULADD(at[18], at[92]); MULADD(at[19], at[91]); MULADD(at[20], at[90]); MULADD(at[21], at[89]); MULADD(at[22], at[88]); MULADD(at[23], at[87]); MULADD(at[24], at[86]); MULADD(at[25], at[85]); MULADD(at[26], at[84]); MULADD(at[27], at[83]); MULADD(at[28], at[82]); MULADD(at[29], at[81]); MULADD(at[30], at[80]); MULADD(at[31], at[79]); MULADD(at[32], at[78]); MULADD(at[33], at[77]); MULADD(at[34], at[76]); MULADD(at[35], at[75]); MULADD(at[36], at[74]); MULADD(at[37], at[73]); MULADD(at[38], at[72]); MULADD(at[39], at[71]); MULADD(at[40], at[70]); MULADD(at[41], at[69]); MULADD(at[42], at[68]); MULADD(at[43], at[67]); MULADD(at[44], at[66]); MULADD(at[45], at[65]); MULADD(at[46], at[64]); MULADD(at[47], at[63]); + COMBA_STORE(C->dp[62]); + /* 63 */ + COMBA_FORWARD; + MULADD(at[16], at[95]); MULADD(at[17], at[94]); MULADD(at[18], at[93]); MULADD(at[19], at[92]); MULADD(at[20], at[91]); MULADD(at[21], at[90]); MULADD(at[22], at[89]); MULADD(at[23], at[88]); MULADD(at[24], at[87]); MULADD(at[25], at[86]); MULADD(at[26], at[85]); MULADD(at[27], at[84]); MULADD(at[28], at[83]); MULADD(at[29], at[82]); MULADD(at[30], at[81]); MULADD(at[31], at[80]); MULADD(at[32], at[79]); MULADD(at[33], at[78]); MULADD(at[34], at[77]); MULADD(at[35], at[76]); MULADD(at[36], at[75]); MULADD(at[37], at[74]); MULADD(at[38], at[73]); MULADD(at[39], at[72]); MULADD(at[40], at[71]); MULADD(at[41], at[70]); MULADD(at[42], at[69]); MULADD(at[43], at[68]); MULADD(at[44], at[67]); MULADD(at[45], at[66]); MULADD(at[46], at[65]); MULADD(at[47], at[64]); + COMBA_STORE(C->dp[63]); + /* 64 */ + COMBA_FORWARD; + MULADD(at[17], at[95]); MULADD(at[18], at[94]); MULADD(at[19], at[93]); MULADD(at[20], at[92]); MULADD(at[21], at[91]); MULADD(at[22], at[90]); MULADD(at[23], at[89]); MULADD(at[24], at[88]); MULADD(at[25], at[87]); MULADD(at[26], at[86]); MULADD(at[27], at[85]); MULADD(at[28], at[84]); MULADD(at[29], at[83]); MULADD(at[30], at[82]); MULADD(at[31], at[81]); MULADD(at[32], at[80]); MULADD(at[33], at[79]); MULADD(at[34], at[78]); MULADD(at[35], at[77]); MULADD(at[36], at[76]); MULADD(at[37], at[75]); MULADD(at[38], at[74]); MULADD(at[39], at[73]); MULADD(at[40], at[72]); MULADD(at[41], at[71]); MULADD(at[42], at[70]); MULADD(at[43], at[69]); MULADD(at[44], at[68]); MULADD(at[45], at[67]); MULADD(at[46], at[66]); MULADD(at[47], at[65]); + COMBA_STORE(C->dp[64]); + /* 65 */ + COMBA_FORWARD; + MULADD(at[18], at[95]); MULADD(at[19], at[94]); MULADD(at[20], at[93]); MULADD(at[21], at[92]); MULADD(at[22], at[91]); MULADD(at[23], at[90]); MULADD(at[24], at[89]); MULADD(at[25], at[88]); MULADD(at[26], at[87]); MULADD(at[27], at[86]); MULADD(at[28], at[85]); MULADD(at[29], at[84]); MULADD(at[30], at[83]); MULADD(at[31], at[82]); MULADD(at[32], at[81]); MULADD(at[33], at[80]); MULADD(at[34], at[79]); MULADD(at[35], at[78]); MULADD(at[36], at[77]); MULADD(at[37], at[76]); MULADD(at[38], at[75]); MULADD(at[39], at[74]); MULADD(at[40], at[73]); MULADD(at[41], at[72]); MULADD(at[42], at[71]); MULADD(at[43], at[70]); MULADD(at[44], at[69]); MULADD(at[45], at[68]); MULADD(at[46], at[67]); MULADD(at[47], at[66]); + COMBA_STORE(C->dp[65]); + /* 66 */ + COMBA_FORWARD; + MULADD(at[19], at[95]); MULADD(at[20], at[94]); MULADD(at[21], at[93]); MULADD(at[22], at[92]); MULADD(at[23], at[91]); MULADD(at[24], at[90]); MULADD(at[25], at[89]); MULADD(at[26], at[88]); MULADD(at[27], at[87]); MULADD(at[28], at[86]); MULADD(at[29], at[85]); MULADD(at[30], at[84]); MULADD(at[31], at[83]); MULADD(at[32], at[82]); MULADD(at[33], at[81]); MULADD(at[34], at[80]); MULADD(at[35], at[79]); MULADD(at[36], at[78]); MULADD(at[37], at[77]); MULADD(at[38], at[76]); MULADD(at[39], at[75]); MULADD(at[40], at[74]); MULADD(at[41], at[73]); MULADD(at[42], at[72]); MULADD(at[43], at[71]); MULADD(at[44], at[70]); MULADD(at[45], at[69]); MULADD(at[46], at[68]); MULADD(at[47], at[67]); + COMBA_STORE(C->dp[66]); + /* 67 */ + COMBA_FORWARD; + MULADD(at[20], at[95]); MULADD(at[21], at[94]); MULADD(at[22], at[93]); MULADD(at[23], at[92]); MULADD(at[24], at[91]); MULADD(at[25], at[90]); MULADD(at[26], at[89]); MULADD(at[27], at[88]); MULADD(at[28], at[87]); MULADD(at[29], at[86]); MULADD(at[30], at[85]); MULADD(at[31], at[84]); MULADD(at[32], at[83]); MULADD(at[33], at[82]); MULADD(at[34], at[81]); MULADD(at[35], at[80]); MULADD(at[36], at[79]); MULADD(at[37], at[78]); MULADD(at[38], at[77]); MULADD(at[39], at[76]); MULADD(at[40], at[75]); MULADD(at[41], at[74]); MULADD(at[42], at[73]); MULADD(at[43], at[72]); MULADD(at[44], at[71]); MULADD(at[45], at[70]); MULADD(at[46], at[69]); MULADD(at[47], at[68]); + COMBA_STORE(C->dp[67]); + /* 68 */ + COMBA_FORWARD; + MULADD(at[21], at[95]); MULADD(at[22], at[94]); MULADD(at[23], at[93]); MULADD(at[24], at[92]); MULADD(at[25], at[91]); MULADD(at[26], at[90]); MULADD(at[27], at[89]); MULADD(at[28], at[88]); MULADD(at[29], at[87]); MULADD(at[30], at[86]); MULADD(at[31], at[85]); MULADD(at[32], at[84]); MULADD(at[33], at[83]); MULADD(at[34], at[82]); MULADD(at[35], at[81]); MULADD(at[36], at[80]); MULADD(at[37], at[79]); MULADD(at[38], at[78]); MULADD(at[39], at[77]); MULADD(at[40], at[76]); MULADD(at[41], at[75]); MULADD(at[42], at[74]); MULADD(at[43], at[73]); MULADD(at[44], at[72]); MULADD(at[45], at[71]); MULADD(at[46], at[70]); MULADD(at[47], at[69]); + COMBA_STORE(C->dp[68]); + /* 69 */ + COMBA_FORWARD; + MULADD(at[22], at[95]); MULADD(at[23], at[94]); MULADD(at[24], at[93]); MULADD(at[25], at[92]); MULADD(at[26], at[91]); MULADD(at[27], at[90]); MULADD(at[28], at[89]); MULADD(at[29], at[88]); MULADD(at[30], at[87]); MULADD(at[31], at[86]); MULADD(at[32], at[85]); MULADD(at[33], at[84]); MULADD(at[34], at[83]); MULADD(at[35], at[82]); MULADD(at[36], at[81]); MULADD(at[37], at[80]); MULADD(at[38], at[79]); MULADD(at[39], at[78]); MULADD(at[40], at[77]); MULADD(at[41], at[76]); MULADD(at[42], at[75]); MULADD(at[43], at[74]); MULADD(at[44], at[73]); MULADD(at[45], at[72]); MULADD(at[46], at[71]); MULADD(at[47], at[70]); + COMBA_STORE(C->dp[69]); + /* 70 */ + COMBA_FORWARD; + MULADD(at[23], at[95]); MULADD(at[24], at[94]); MULADD(at[25], at[93]); MULADD(at[26], at[92]); MULADD(at[27], at[91]); MULADD(at[28], at[90]); MULADD(at[29], at[89]); MULADD(at[30], at[88]); MULADD(at[31], at[87]); MULADD(at[32], at[86]); MULADD(at[33], at[85]); MULADD(at[34], at[84]); MULADD(at[35], at[83]); MULADD(at[36], at[82]); MULADD(at[37], at[81]); MULADD(at[38], at[80]); MULADD(at[39], at[79]); MULADD(at[40], at[78]); MULADD(at[41], at[77]); MULADD(at[42], at[76]); MULADD(at[43], at[75]); MULADD(at[44], at[74]); MULADD(at[45], at[73]); MULADD(at[46], at[72]); MULADD(at[47], at[71]); + COMBA_STORE(C->dp[70]); + /* 71 */ + COMBA_FORWARD; + MULADD(at[24], at[95]); MULADD(at[25], at[94]); MULADD(at[26], at[93]); MULADD(at[27], at[92]); MULADD(at[28], at[91]); MULADD(at[29], at[90]); MULADD(at[30], at[89]); MULADD(at[31], at[88]); MULADD(at[32], at[87]); MULADD(at[33], at[86]); MULADD(at[34], at[85]); MULADD(at[35], at[84]); MULADD(at[36], at[83]); MULADD(at[37], at[82]); MULADD(at[38], at[81]); MULADD(at[39], at[80]); MULADD(at[40], at[79]); MULADD(at[41], at[78]); MULADD(at[42], at[77]); MULADD(at[43], at[76]); MULADD(at[44], at[75]); MULADD(at[45], at[74]); MULADD(at[46], at[73]); MULADD(at[47], at[72]); + COMBA_STORE(C->dp[71]); + /* 72 */ + COMBA_FORWARD; + MULADD(at[25], at[95]); MULADD(at[26], at[94]); MULADD(at[27], at[93]); MULADD(at[28], at[92]); MULADD(at[29], at[91]); MULADD(at[30], at[90]); MULADD(at[31], at[89]); MULADD(at[32], at[88]); MULADD(at[33], at[87]); MULADD(at[34], at[86]); MULADD(at[35], at[85]); MULADD(at[36], at[84]); MULADD(at[37], at[83]); MULADD(at[38], at[82]); MULADD(at[39], at[81]); MULADD(at[40], at[80]); MULADD(at[41], at[79]); MULADD(at[42], at[78]); MULADD(at[43], at[77]); MULADD(at[44], at[76]); MULADD(at[45], at[75]); MULADD(at[46], at[74]); MULADD(at[47], at[73]); + COMBA_STORE(C->dp[72]); + /* 73 */ + COMBA_FORWARD; + MULADD(at[26], at[95]); MULADD(at[27], at[94]); MULADD(at[28], at[93]); MULADD(at[29], at[92]); MULADD(at[30], at[91]); MULADD(at[31], at[90]); MULADD(at[32], at[89]); MULADD(at[33], at[88]); MULADD(at[34], at[87]); MULADD(at[35], at[86]); MULADD(at[36], at[85]); MULADD(at[37], at[84]); MULADD(at[38], at[83]); MULADD(at[39], at[82]); MULADD(at[40], at[81]); MULADD(at[41], at[80]); MULADD(at[42], at[79]); MULADD(at[43], at[78]); MULADD(at[44], at[77]); MULADD(at[45], at[76]); MULADD(at[46], at[75]); MULADD(at[47], at[74]); + COMBA_STORE(C->dp[73]); + /* 74 */ + COMBA_FORWARD; + MULADD(at[27], at[95]); MULADD(at[28], at[94]); MULADD(at[29], at[93]); MULADD(at[30], at[92]); MULADD(at[31], at[91]); MULADD(at[32], at[90]); MULADD(at[33], at[89]); MULADD(at[34], at[88]); MULADD(at[35], at[87]); MULADD(at[36], at[86]); MULADD(at[37], at[85]); MULADD(at[38], at[84]); MULADD(at[39], at[83]); MULADD(at[40], at[82]); MULADD(at[41], at[81]); MULADD(at[42], at[80]); MULADD(at[43], at[79]); MULADD(at[44], at[78]); MULADD(at[45], at[77]); MULADD(at[46], at[76]); MULADD(at[47], at[75]); + COMBA_STORE(C->dp[74]); + /* 75 */ + COMBA_FORWARD; + MULADD(at[28], at[95]); MULADD(at[29], at[94]); MULADD(at[30], at[93]); MULADD(at[31], at[92]); MULADD(at[32], at[91]); MULADD(at[33], at[90]); MULADD(at[34], at[89]); MULADD(at[35], at[88]); MULADD(at[36], at[87]); MULADD(at[37], at[86]); MULADD(at[38], at[85]); MULADD(at[39], at[84]); MULADD(at[40], at[83]); MULADD(at[41], at[82]); MULADD(at[42], at[81]); MULADD(at[43], at[80]); MULADD(at[44], at[79]); MULADD(at[45], at[78]); MULADD(at[46], at[77]); MULADD(at[47], at[76]); + COMBA_STORE(C->dp[75]); + /* 76 */ + COMBA_FORWARD; + MULADD(at[29], at[95]); MULADD(at[30], at[94]); MULADD(at[31], at[93]); MULADD(at[32], at[92]); MULADD(at[33], at[91]); MULADD(at[34], at[90]); MULADD(at[35], at[89]); MULADD(at[36], at[88]); MULADD(at[37], at[87]); MULADD(at[38], at[86]); MULADD(at[39], at[85]); MULADD(at[40], at[84]); MULADD(at[41], at[83]); MULADD(at[42], at[82]); MULADD(at[43], at[81]); MULADD(at[44], at[80]); MULADD(at[45], at[79]); MULADD(at[46], at[78]); MULADD(at[47], at[77]); + COMBA_STORE(C->dp[76]); + /* 77 */ + COMBA_FORWARD; + MULADD(at[30], at[95]); MULADD(at[31], at[94]); MULADD(at[32], at[93]); MULADD(at[33], at[92]); MULADD(at[34], at[91]); MULADD(at[35], at[90]); MULADD(at[36], at[89]); MULADD(at[37], at[88]); MULADD(at[38], at[87]); MULADD(at[39], at[86]); MULADD(at[40], at[85]); MULADD(at[41], at[84]); MULADD(at[42], at[83]); MULADD(at[43], at[82]); MULADD(at[44], at[81]); MULADD(at[45], at[80]); MULADD(at[46], at[79]); MULADD(at[47], at[78]); + COMBA_STORE(C->dp[77]); + /* 78 */ + COMBA_FORWARD; + MULADD(at[31], at[95]); MULADD(at[32], at[94]); MULADD(at[33], at[93]); MULADD(at[34], at[92]); MULADD(at[35], at[91]); MULADD(at[36], at[90]); MULADD(at[37], at[89]); MULADD(at[38], at[88]); MULADD(at[39], at[87]); MULADD(at[40], at[86]); MULADD(at[41], at[85]); MULADD(at[42], at[84]); MULADD(at[43], at[83]); MULADD(at[44], at[82]); MULADD(at[45], at[81]); MULADD(at[46], at[80]); MULADD(at[47], at[79]); + COMBA_STORE(C->dp[78]); + /* 79 */ + COMBA_FORWARD; + MULADD(at[32], at[95]); MULADD(at[33], at[94]); MULADD(at[34], at[93]); MULADD(at[35], at[92]); MULADD(at[36], at[91]); MULADD(at[37], at[90]); MULADD(at[38], at[89]); MULADD(at[39], at[88]); MULADD(at[40], at[87]); MULADD(at[41], at[86]); MULADD(at[42], at[85]); MULADD(at[43], at[84]); MULADD(at[44], at[83]); MULADD(at[45], at[82]); MULADD(at[46], at[81]); MULADD(at[47], at[80]); + COMBA_STORE(C->dp[79]); + /* 80 */ + COMBA_FORWARD; + MULADD(at[33], at[95]); MULADD(at[34], at[94]); MULADD(at[35], at[93]); MULADD(at[36], at[92]); MULADD(at[37], at[91]); MULADD(at[38], at[90]); MULADD(at[39], at[89]); MULADD(at[40], at[88]); MULADD(at[41], at[87]); MULADD(at[42], at[86]); MULADD(at[43], at[85]); MULADD(at[44], at[84]); MULADD(at[45], at[83]); MULADD(at[46], at[82]); MULADD(at[47], at[81]); + COMBA_STORE(C->dp[80]); + /* 81 */ + COMBA_FORWARD; + MULADD(at[34], at[95]); MULADD(at[35], at[94]); MULADD(at[36], at[93]); MULADD(at[37], at[92]); MULADD(at[38], at[91]); MULADD(at[39], at[90]); MULADD(at[40], at[89]); MULADD(at[41], at[88]); MULADD(at[42], at[87]); MULADD(at[43], at[86]); MULADD(at[44], at[85]); MULADD(at[45], at[84]); MULADD(at[46], at[83]); MULADD(at[47], at[82]); + COMBA_STORE(C->dp[81]); + /* 82 */ + COMBA_FORWARD; + MULADD(at[35], at[95]); MULADD(at[36], at[94]); MULADD(at[37], at[93]); MULADD(at[38], at[92]); MULADD(at[39], at[91]); MULADD(at[40], at[90]); MULADD(at[41], at[89]); MULADD(at[42], at[88]); MULADD(at[43], at[87]); MULADD(at[44], at[86]); MULADD(at[45], at[85]); MULADD(at[46], at[84]); MULADD(at[47], at[83]); + COMBA_STORE(C->dp[82]); + /* 83 */ + COMBA_FORWARD; + MULADD(at[36], at[95]); MULADD(at[37], at[94]); MULADD(at[38], at[93]); MULADD(at[39], at[92]); MULADD(at[40], at[91]); MULADD(at[41], at[90]); MULADD(at[42], at[89]); MULADD(at[43], at[88]); MULADD(at[44], at[87]); MULADD(at[45], at[86]); MULADD(at[46], at[85]); MULADD(at[47], at[84]); + COMBA_STORE(C->dp[83]); + /* 84 */ + COMBA_FORWARD; + MULADD(at[37], at[95]); MULADD(at[38], at[94]); MULADD(at[39], at[93]); MULADD(at[40], at[92]); MULADD(at[41], at[91]); MULADD(at[42], at[90]); MULADD(at[43], at[89]); MULADD(at[44], at[88]); MULADD(at[45], at[87]); MULADD(at[46], at[86]); MULADD(at[47], at[85]); + COMBA_STORE(C->dp[84]); + /* 85 */ + COMBA_FORWARD; + MULADD(at[38], at[95]); MULADD(at[39], at[94]); MULADD(at[40], at[93]); MULADD(at[41], at[92]); MULADD(at[42], at[91]); MULADD(at[43], at[90]); MULADD(at[44], at[89]); MULADD(at[45], at[88]); MULADD(at[46], at[87]); MULADD(at[47], at[86]); + COMBA_STORE(C->dp[85]); + /* 86 */ + COMBA_FORWARD; + MULADD(at[39], at[95]); MULADD(at[40], at[94]); MULADD(at[41], at[93]); MULADD(at[42], at[92]); MULADD(at[43], at[91]); MULADD(at[44], at[90]); MULADD(at[45], at[89]); MULADD(at[46], at[88]); MULADD(at[47], at[87]); + COMBA_STORE(C->dp[86]); + /* 87 */ + COMBA_FORWARD; + MULADD(at[40], at[95]); MULADD(at[41], at[94]); MULADD(at[42], at[93]); MULADD(at[43], at[92]); MULADD(at[44], at[91]); MULADD(at[45], at[90]); MULADD(at[46], at[89]); MULADD(at[47], at[88]); + COMBA_STORE(C->dp[87]); + /* 88 */ + COMBA_FORWARD; + MULADD(at[41], at[95]); MULADD(at[42], at[94]); MULADD(at[43], at[93]); MULADD(at[44], at[92]); MULADD(at[45], at[91]); MULADD(at[46], at[90]); MULADD(at[47], at[89]); + COMBA_STORE(C->dp[88]); + /* 89 */ + COMBA_FORWARD; + MULADD(at[42], at[95]); MULADD(at[43], at[94]); MULADD(at[44], at[93]); MULADD(at[45], at[92]); MULADD(at[46], at[91]); MULADD(at[47], at[90]); + COMBA_STORE(C->dp[89]); + /* 90 */ + COMBA_FORWARD; + MULADD(at[43], at[95]); MULADD(at[44], at[94]); MULADD(at[45], at[93]); MULADD(at[46], at[92]); MULADD(at[47], at[91]); + COMBA_STORE(C->dp[90]); + /* 91 */ + COMBA_FORWARD; + MULADD(at[44], at[95]); MULADD(at[45], at[94]); MULADD(at[46], at[93]); MULADD(at[47], at[92]); + COMBA_STORE(C->dp[91]); + /* 92 */ + COMBA_FORWARD; + MULADD(at[45], at[95]); MULADD(at[46], at[94]); MULADD(at[47], at[93]); + COMBA_STORE(C->dp[92]); + /* 93 */ + COMBA_FORWARD; + MULADD(at[46], at[95]); MULADD(at[47], at[94]); + COMBA_STORE(C->dp[93]); + /* 94 */ + COMBA_FORWARD; + MULADD(at[47], at[95]); + COMBA_STORE(C->dp[94]); + COMBA_STORE2(C->dp[95]); + C->used = 96; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i new file mode 100644 index 00000000..da46589e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i @@ -0,0 +1,82 @@ +/* fp_mul_comba_6.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL6 +void fp_mul_comba6(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[12]; + + memcpy(at, A->dp, 6 * sizeof(fp_digit)); + memcpy(at+6, B->dp, 6 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[6]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[7]); MULADD(at[1], at[6]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); MULADD(at[5], at[6]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[4], at[11]); MULADD(at[5], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[5], at[11]); + COMBA_STORE(C->dp[10]); + COMBA_STORE2(C->dp[11]); + C->used = 12; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i new file mode 100644 index 00000000..38b40a71 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i @@ -0,0 +1,546 @@ +/* fp_mul_comba_64.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL64 +void fp_mul_comba64(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[128]; + + memcpy(at, A->dp, 64 * sizeof(fp_digit)); + memcpy(at+64, B->dp, 64 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[64]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[65]); MULADD(at[1], at[64]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[66]); MULADD(at[1], at[65]); MULADD(at[2], at[64]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[67]); MULADD(at[1], at[66]); MULADD(at[2], at[65]); MULADD(at[3], at[64]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[68]); MULADD(at[1], at[67]); MULADD(at[2], at[66]); MULADD(at[3], at[65]); MULADD(at[4], at[64]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[69]); MULADD(at[1], at[68]); MULADD(at[2], at[67]); MULADD(at[3], at[66]); MULADD(at[4], at[65]); MULADD(at[5], at[64]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[70]); MULADD(at[1], at[69]); MULADD(at[2], at[68]); MULADD(at[3], at[67]); MULADD(at[4], at[66]); MULADD(at[5], at[65]); MULADD(at[6], at[64]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[71]); MULADD(at[1], at[70]); MULADD(at[2], at[69]); MULADD(at[3], at[68]); MULADD(at[4], at[67]); MULADD(at[5], at[66]); MULADD(at[6], at[65]); MULADD(at[7], at[64]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[72]); MULADD(at[1], at[71]); MULADD(at[2], at[70]); MULADD(at[3], at[69]); MULADD(at[4], at[68]); MULADD(at[5], at[67]); MULADD(at[6], at[66]); MULADD(at[7], at[65]); MULADD(at[8], at[64]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[73]); MULADD(at[1], at[72]); MULADD(at[2], at[71]); MULADD(at[3], at[70]); MULADD(at[4], at[69]); MULADD(at[5], at[68]); MULADD(at[6], at[67]); MULADD(at[7], at[66]); MULADD(at[8], at[65]); MULADD(at[9], at[64]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[74]); MULADD(at[1], at[73]); MULADD(at[2], at[72]); MULADD(at[3], at[71]); MULADD(at[4], at[70]); MULADD(at[5], at[69]); MULADD(at[6], at[68]); MULADD(at[7], at[67]); MULADD(at[8], at[66]); MULADD(at[9], at[65]); MULADD(at[10], at[64]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[75]); MULADD(at[1], at[74]); MULADD(at[2], at[73]); MULADD(at[3], at[72]); MULADD(at[4], at[71]); MULADD(at[5], at[70]); MULADD(at[6], at[69]); MULADD(at[7], at[68]); MULADD(at[8], at[67]); MULADD(at[9], at[66]); MULADD(at[10], at[65]); MULADD(at[11], at[64]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[76]); MULADD(at[1], at[75]); MULADD(at[2], at[74]); MULADD(at[3], at[73]); MULADD(at[4], at[72]); MULADD(at[5], at[71]); MULADD(at[6], at[70]); MULADD(at[7], at[69]); MULADD(at[8], at[68]); MULADD(at[9], at[67]); MULADD(at[10], at[66]); MULADD(at[11], at[65]); MULADD(at[12], at[64]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[77]); MULADD(at[1], at[76]); MULADD(at[2], at[75]); MULADD(at[3], at[74]); MULADD(at[4], at[73]); MULADD(at[5], at[72]); MULADD(at[6], at[71]); MULADD(at[7], at[70]); MULADD(at[8], at[69]); MULADD(at[9], at[68]); MULADD(at[10], at[67]); MULADD(at[11], at[66]); MULADD(at[12], at[65]); MULADD(at[13], at[64]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[78]); MULADD(at[1], at[77]); MULADD(at[2], at[76]); MULADD(at[3], at[75]); MULADD(at[4], at[74]); MULADD(at[5], at[73]); MULADD(at[6], at[72]); MULADD(at[7], at[71]); MULADD(at[8], at[70]); MULADD(at[9], at[69]); MULADD(at[10], at[68]); MULADD(at[11], at[67]); MULADD(at[12], at[66]); MULADD(at[13], at[65]); MULADD(at[14], at[64]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[79]); MULADD(at[1], at[78]); MULADD(at[2], at[77]); MULADD(at[3], at[76]); MULADD(at[4], at[75]); MULADD(at[5], at[74]); MULADD(at[6], at[73]); MULADD(at[7], at[72]); MULADD(at[8], at[71]); MULADD(at[9], at[70]); MULADD(at[10], at[69]); MULADD(at[11], at[68]); MULADD(at[12], at[67]); MULADD(at[13], at[66]); MULADD(at[14], at[65]); MULADD(at[15], at[64]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[0], at[80]); MULADD(at[1], at[79]); MULADD(at[2], at[78]); MULADD(at[3], at[77]); MULADD(at[4], at[76]); MULADD(at[5], at[75]); MULADD(at[6], at[74]); MULADD(at[7], at[73]); MULADD(at[8], at[72]); MULADD(at[9], at[71]); MULADD(at[10], at[70]); MULADD(at[11], at[69]); MULADD(at[12], at[68]); MULADD(at[13], at[67]); MULADD(at[14], at[66]); MULADD(at[15], at[65]); MULADD(at[16], at[64]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[0], at[81]); MULADD(at[1], at[80]); MULADD(at[2], at[79]); MULADD(at[3], at[78]); MULADD(at[4], at[77]); MULADD(at[5], at[76]); MULADD(at[6], at[75]); MULADD(at[7], at[74]); MULADD(at[8], at[73]); MULADD(at[9], at[72]); MULADD(at[10], at[71]); MULADD(at[11], at[70]); MULADD(at[12], at[69]); MULADD(at[13], at[68]); MULADD(at[14], at[67]); MULADD(at[15], at[66]); MULADD(at[16], at[65]); MULADD(at[17], at[64]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[0], at[82]); MULADD(at[1], at[81]); MULADD(at[2], at[80]); MULADD(at[3], at[79]); MULADD(at[4], at[78]); MULADD(at[5], at[77]); MULADD(at[6], at[76]); MULADD(at[7], at[75]); MULADD(at[8], at[74]); MULADD(at[9], at[73]); MULADD(at[10], at[72]); MULADD(at[11], at[71]); MULADD(at[12], at[70]); MULADD(at[13], at[69]); MULADD(at[14], at[68]); MULADD(at[15], at[67]); MULADD(at[16], at[66]); MULADD(at[17], at[65]); MULADD(at[18], at[64]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[0], at[83]); MULADD(at[1], at[82]); MULADD(at[2], at[81]); MULADD(at[3], at[80]); MULADD(at[4], at[79]); MULADD(at[5], at[78]); MULADD(at[6], at[77]); MULADD(at[7], at[76]); MULADD(at[8], at[75]); MULADD(at[9], at[74]); MULADD(at[10], at[73]); MULADD(at[11], at[72]); MULADD(at[12], at[71]); MULADD(at[13], at[70]); MULADD(at[14], at[69]); MULADD(at[15], at[68]); MULADD(at[16], at[67]); MULADD(at[17], at[66]); MULADD(at[18], at[65]); MULADD(at[19], at[64]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[0], at[84]); MULADD(at[1], at[83]); MULADD(at[2], at[82]); MULADD(at[3], at[81]); MULADD(at[4], at[80]); MULADD(at[5], at[79]); MULADD(at[6], at[78]); MULADD(at[7], at[77]); MULADD(at[8], at[76]); MULADD(at[9], at[75]); MULADD(at[10], at[74]); MULADD(at[11], at[73]); MULADD(at[12], at[72]); MULADD(at[13], at[71]); MULADD(at[14], at[70]); MULADD(at[15], at[69]); MULADD(at[16], at[68]); MULADD(at[17], at[67]); MULADD(at[18], at[66]); MULADD(at[19], at[65]); MULADD(at[20], at[64]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[0], at[85]); MULADD(at[1], at[84]); MULADD(at[2], at[83]); MULADD(at[3], at[82]); MULADD(at[4], at[81]); MULADD(at[5], at[80]); MULADD(at[6], at[79]); MULADD(at[7], at[78]); MULADD(at[8], at[77]); MULADD(at[9], at[76]); MULADD(at[10], at[75]); MULADD(at[11], at[74]); MULADD(at[12], at[73]); MULADD(at[13], at[72]); MULADD(at[14], at[71]); MULADD(at[15], at[70]); MULADD(at[16], at[69]); MULADD(at[17], at[68]); MULADD(at[18], at[67]); MULADD(at[19], at[66]); MULADD(at[20], at[65]); MULADD(at[21], at[64]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[0], at[86]); MULADD(at[1], at[85]); MULADD(at[2], at[84]); MULADD(at[3], at[83]); MULADD(at[4], at[82]); MULADD(at[5], at[81]); MULADD(at[6], at[80]); MULADD(at[7], at[79]); MULADD(at[8], at[78]); MULADD(at[9], at[77]); MULADD(at[10], at[76]); MULADD(at[11], at[75]); MULADD(at[12], at[74]); MULADD(at[13], at[73]); MULADD(at[14], at[72]); MULADD(at[15], at[71]); MULADD(at[16], at[70]); MULADD(at[17], at[69]); MULADD(at[18], at[68]); MULADD(at[19], at[67]); MULADD(at[20], at[66]); MULADD(at[21], at[65]); MULADD(at[22], at[64]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[0], at[87]); MULADD(at[1], at[86]); MULADD(at[2], at[85]); MULADD(at[3], at[84]); MULADD(at[4], at[83]); MULADD(at[5], at[82]); MULADD(at[6], at[81]); MULADD(at[7], at[80]); MULADD(at[8], at[79]); MULADD(at[9], at[78]); MULADD(at[10], at[77]); MULADD(at[11], at[76]); MULADD(at[12], at[75]); MULADD(at[13], at[74]); MULADD(at[14], at[73]); MULADD(at[15], at[72]); MULADD(at[16], at[71]); MULADD(at[17], at[70]); MULADD(at[18], at[69]); MULADD(at[19], at[68]); MULADD(at[20], at[67]); MULADD(at[21], at[66]); MULADD(at[22], at[65]); MULADD(at[23], at[64]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[0], at[88]); MULADD(at[1], at[87]); MULADD(at[2], at[86]); MULADD(at[3], at[85]); MULADD(at[4], at[84]); MULADD(at[5], at[83]); MULADD(at[6], at[82]); MULADD(at[7], at[81]); MULADD(at[8], at[80]); MULADD(at[9], at[79]); MULADD(at[10], at[78]); MULADD(at[11], at[77]); MULADD(at[12], at[76]); MULADD(at[13], at[75]); MULADD(at[14], at[74]); MULADD(at[15], at[73]); MULADD(at[16], at[72]); MULADD(at[17], at[71]); MULADD(at[18], at[70]); MULADD(at[19], at[69]); MULADD(at[20], at[68]); MULADD(at[21], at[67]); MULADD(at[22], at[66]); MULADD(at[23], at[65]); MULADD(at[24], at[64]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[0], at[89]); MULADD(at[1], at[88]); MULADD(at[2], at[87]); MULADD(at[3], at[86]); MULADD(at[4], at[85]); MULADD(at[5], at[84]); MULADD(at[6], at[83]); MULADD(at[7], at[82]); MULADD(at[8], at[81]); MULADD(at[9], at[80]); MULADD(at[10], at[79]); MULADD(at[11], at[78]); MULADD(at[12], at[77]); MULADD(at[13], at[76]); MULADD(at[14], at[75]); MULADD(at[15], at[74]); MULADD(at[16], at[73]); MULADD(at[17], at[72]); MULADD(at[18], at[71]); MULADD(at[19], at[70]); MULADD(at[20], at[69]); MULADD(at[21], at[68]); MULADD(at[22], at[67]); MULADD(at[23], at[66]); MULADD(at[24], at[65]); MULADD(at[25], at[64]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[0], at[90]); MULADD(at[1], at[89]); MULADD(at[2], at[88]); MULADD(at[3], at[87]); MULADD(at[4], at[86]); MULADD(at[5], at[85]); MULADD(at[6], at[84]); MULADD(at[7], at[83]); MULADD(at[8], at[82]); MULADD(at[9], at[81]); MULADD(at[10], at[80]); MULADD(at[11], at[79]); MULADD(at[12], at[78]); MULADD(at[13], at[77]); MULADD(at[14], at[76]); MULADD(at[15], at[75]); MULADD(at[16], at[74]); MULADD(at[17], at[73]); MULADD(at[18], at[72]); MULADD(at[19], at[71]); MULADD(at[20], at[70]); MULADD(at[21], at[69]); MULADD(at[22], at[68]); MULADD(at[23], at[67]); MULADD(at[24], at[66]); MULADD(at[25], at[65]); MULADD(at[26], at[64]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[0], at[91]); MULADD(at[1], at[90]); MULADD(at[2], at[89]); MULADD(at[3], at[88]); MULADD(at[4], at[87]); MULADD(at[5], at[86]); MULADD(at[6], at[85]); MULADD(at[7], at[84]); MULADD(at[8], at[83]); MULADD(at[9], at[82]); MULADD(at[10], at[81]); MULADD(at[11], at[80]); MULADD(at[12], at[79]); MULADD(at[13], at[78]); MULADD(at[14], at[77]); MULADD(at[15], at[76]); MULADD(at[16], at[75]); MULADD(at[17], at[74]); MULADD(at[18], at[73]); MULADD(at[19], at[72]); MULADD(at[20], at[71]); MULADD(at[21], at[70]); MULADD(at[22], at[69]); MULADD(at[23], at[68]); MULADD(at[24], at[67]); MULADD(at[25], at[66]); MULADD(at[26], at[65]); MULADD(at[27], at[64]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[0], at[92]); MULADD(at[1], at[91]); MULADD(at[2], at[90]); MULADD(at[3], at[89]); MULADD(at[4], at[88]); MULADD(at[5], at[87]); MULADD(at[6], at[86]); MULADD(at[7], at[85]); MULADD(at[8], at[84]); MULADD(at[9], at[83]); MULADD(at[10], at[82]); MULADD(at[11], at[81]); MULADD(at[12], at[80]); MULADD(at[13], at[79]); MULADD(at[14], at[78]); MULADD(at[15], at[77]); MULADD(at[16], at[76]); MULADD(at[17], at[75]); MULADD(at[18], at[74]); MULADD(at[19], at[73]); MULADD(at[20], at[72]); MULADD(at[21], at[71]); MULADD(at[22], at[70]); MULADD(at[23], at[69]); MULADD(at[24], at[68]); MULADD(at[25], at[67]); MULADD(at[26], at[66]); MULADD(at[27], at[65]); MULADD(at[28], at[64]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[0], at[93]); MULADD(at[1], at[92]); MULADD(at[2], at[91]); MULADD(at[3], at[90]); MULADD(at[4], at[89]); MULADD(at[5], at[88]); MULADD(at[6], at[87]); MULADD(at[7], at[86]); MULADD(at[8], at[85]); MULADD(at[9], at[84]); MULADD(at[10], at[83]); MULADD(at[11], at[82]); MULADD(at[12], at[81]); MULADD(at[13], at[80]); MULADD(at[14], at[79]); MULADD(at[15], at[78]); MULADD(at[16], at[77]); MULADD(at[17], at[76]); MULADD(at[18], at[75]); MULADD(at[19], at[74]); MULADD(at[20], at[73]); MULADD(at[21], at[72]); MULADD(at[22], at[71]); MULADD(at[23], at[70]); MULADD(at[24], at[69]); MULADD(at[25], at[68]); MULADD(at[26], at[67]); MULADD(at[27], at[66]); MULADD(at[28], at[65]); MULADD(at[29], at[64]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[0], at[94]); MULADD(at[1], at[93]); MULADD(at[2], at[92]); MULADD(at[3], at[91]); MULADD(at[4], at[90]); MULADD(at[5], at[89]); MULADD(at[6], at[88]); MULADD(at[7], at[87]); MULADD(at[8], at[86]); MULADD(at[9], at[85]); MULADD(at[10], at[84]); MULADD(at[11], at[83]); MULADD(at[12], at[82]); MULADD(at[13], at[81]); MULADD(at[14], at[80]); MULADD(at[15], at[79]); MULADD(at[16], at[78]); MULADD(at[17], at[77]); MULADD(at[18], at[76]); MULADD(at[19], at[75]); MULADD(at[20], at[74]); MULADD(at[21], at[73]); MULADD(at[22], at[72]); MULADD(at[23], at[71]); MULADD(at[24], at[70]); MULADD(at[25], at[69]); MULADD(at[26], at[68]); MULADD(at[27], at[67]); MULADD(at[28], at[66]); MULADD(at[29], at[65]); MULADD(at[30], at[64]); + COMBA_STORE(C->dp[30]); + /* 31 */ + COMBA_FORWARD; + MULADD(at[0], at[95]); MULADD(at[1], at[94]); MULADD(at[2], at[93]); MULADD(at[3], at[92]); MULADD(at[4], at[91]); MULADD(at[5], at[90]); MULADD(at[6], at[89]); MULADD(at[7], at[88]); MULADD(at[8], at[87]); MULADD(at[9], at[86]); MULADD(at[10], at[85]); MULADD(at[11], at[84]); MULADD(at[12], at[83]); MULADD(at[13], at[82]); MULADD(at[14], at[81]); MULADD(at[15], at[80]); MULADD(at[16], at[79]); MULADD(at[17], at[78]); MULADD(at[18], at[77]); MULADD(at[19], at[76]); MULADD(at[20], at[75]); MULADD(at[21], at[74]); MULADD(at[22], at[73]); MULADD(at[23], at[72]); MULADD(at[24], at[71]); MULADD(at[25], at[70]); MULADD(at[26], at[69]); MULADD(at[27], at[68]); MULADD(at[28], at[67]); MULADD(at[29], at[66]); MULADD(at[30], at[65]); MULADD(at[31], at[64]); + COMBA_STORE(C->dp[31]); + /* 32 */ + COMBA_FORWARD; + MULADD(at[0], at[96]); MULADD(at[1], at[95]); MULADD(at[2], at[94]); MULADD(at[3], at[93]); MULADD(at[4], at[92]); MULADD(at[5], at[91]); MULADD(at[6], at[90]); MULADD(at[7], at[89]); MULADD(at[8], at[88]); MULADD(at[9], at[87]); MULADD(at[10], at[86]); MULADD(at[11], at[85]); MULADD(at[12], at[84]); MULADD(at[13], at[83]); MULADD(at[14], at[82]); MULADD(at[15], at[81]); MULADD(at[16], at[80]); MULADD(at[17], at[79]); MULADD(at[18], at[78]); MULADD(at[19], at[77]); MULADD(at[20], at[76]); MULADD(at[21], at[75]); MULADD(at[22], at[74]); MULADD(at[23], at[73]); MULADD(at[24], at[72]); MULADD(at[25], at[71]); MULADD(at[26], at[70]); MULADD(at[27], at[69]); MULADD(at[28], at[68]); MULADD(at[29], at[67]); MULADD(at[30], at[66]); MULADD(at[31], at[65]); MULADD(at[32], at[64]); + COMBA_STORE(C->dp[32]); + /* 33 */ + COMBA_FORWARD; + MULADD(at[0], at[97]); MULADD(at[1], at[96]); MULADD(at[2], at[95]); MULADD(at[3], at[94]); MULADD(at[4], at[93]); MULADD(at[5], at[92]); MULADD(at[6], at[91]); MULADD(at[7], at[90]); MULADD(at[8], at[89]); MULADD(at[9], at[88]); MULADD(at[10], at[87]); MULADD(at[11], at[86]); MULADD(at[12], at[85]); MULADD(at[13], at[84]); MULADD(at[14], at[83]); MULADD(at[15], at[82]); MULADD(at[16], at[81]); MULADD(at[17], at[80]); MULADD(at[18], at[79]); MULADD(at[19], at[78]); MULADD(at[20], at[77]); MULADD(at[21], at[76]); MULADD(at[22], at[75]); MULADD(at[23], at[74]); MULADD(at[24], at[73]); MULADD(at[25], at[72]); MULADD(at[26], at[71]); MULADD(at[27], at[70]); MULADD(at[28], at[69]); MULADD(at[29], at[68]); MULADD(at[30], at[67]); MULADD(at[31], at[66]); MULADD(at[32], at[65]); MULADD(at[33], at[64]); + COMBA_STORE(C->dp[33]); + /* 34 */ + COMBA_FORWARD; + MULADD(at[0], at[98]); MULADD(at[1], at[97]); MULADD(at[2], at[96]); MULADD(at[3], at[95]); MULADD(at[4], at[94]); MULADD(at[5], at[93]); MULADD(at[6], at[92]); MULADD(at[7], at[91]); MULADD(at[8], at[90]); MULADD(at[9], at[89]); MULADD(at[10], at[88]); MULADD(at[11], at[87]); MULADD(at[12], at[86]); MULADD(at[13], at[85]); MULADD(at[14], at[84]); MULADD(at[15], at[83]); MULADD(at[16], at[82]); MULADD(at[17], at[81]); MULADD(at[18], at[80]); MULADD(at[19], at[79]); MULADD(at[20], at[78]); MULADD(at[21], at[77]); MULADD(at[22], at[76]); MULADD(at[23], at[75]); MULADD(at[24], at[74]); MULADD(at[25], at[73]); MULADD(at[26], at[72]); MULADD(at[27], at[71]); MULADD(at[28], at[70]); MULADD(at[29], at[69]); MULADD(at[30], at[68]); MULADD(at[31], at[67]); MULADD(at[32], at[66]); MULADD(at[33], at[65]); MULADD(at[34], at[64]); + COMBA_STORE(C->dp[34]); + /* 35 */ + COMBA_FORWARD; + MULADD(at[0], at[99]); MULADD(at[1], at[98]); MULADD(at[2], at[97]); MULADD(at[3], at[96]); MULADD(at[4], at[95]); MULADD(at[5], at[94]); MULADD(at[6], at[93]); MULADD(at[7], at[92]); MULADD(at[8], at[91]); MULADD(at[9], at[90]); MULADD(at[10], at[89]); MULADD(at[11], at[88]); MULADD(at[12], at[87]); MULADD(at[13], at[86]); MULADD(at[14], at[85]); MULADD(at[15], at[84]); MULADD(at[16], at[83]); MULADD(at[17], at[82]); MULADD(at[18], at[81]); MULADD(at[19], at[80]); MULADD(at[20], at[79]); MULADD(at[21], at[78]); MULADD(at[22], at[77]); MULADD(at[23], at[76]); MULADD(at[24], at[75]); MULADD(at[25], at[74]); MULADD(at[26], at[73]); MULADD(at[27], at[72]); MULADD(at[28], at[71]); MULADD(at[29], at[70]); MULADD(at[30], at[69]); MULADD(at[31], at[68]); MULADD(at[32], at[67]); MULADD(at[33], at[66]); MULADD(at[34], at[65]); MULADD(at[35], at[64]); + COMBA_STORE(C->dp[35]); + /* 36 */ + COMBA_FORWARD; + MULADD(at[0], at[100]); MULADD(at[1], at[99]); MULADD(at[2], at[98]); MULADD(at[3], at[97]); MULADD(at[4], at[96]); MULADD(at[5], at[95]); MULADD(at[6], at[94]); MULADD(at[7], at[93]); MULADD(at[8], at[92]); MULADD(at[9], at[91]); MULADD(at[10], at[90]); MULADD(at[11], at[89]); MULADD(at[12], at[88]); MULADD(at[13], at[87]); MULADD(at[14], at[86]); MULADD(at[15], at[85]); MULADD(at[16], at[84]); MULADD(at[17], at[83]); MULADD(at[18], at[82]); MULADD(at[19], at[81]); MULADD(at[20], at[80]); MULADD(at[21], at[79]); MULADD(at[22], at[78]); MULADD(at[23], at[77]); MULADD(at[24], at[76]); MULADD(at[25], at[75]); MULADD(at[26], at[74]); MULADD(at[27], at[73]); MULADD(at[28], at[72]); MULADD(at[29], at[71]); MULADD(at[30], at[70]); MULADD(at[31], at[69]); MULADD(at[32], at[68]); MULADD(at[33], at[67]); MULADD(at[34], at[66]); MULADD(at[35], at[65]); MULADD(at[36], at[64]); + COMBA_STORE(C->dp[36]); + /* 37 */ + COMBA_FORWARD; + MULADD(at[0], at[101]); MULADD(at[1], at[100]); MULADD(at[2], at[99]); MULADD(at[3], at[98]); MULADD(at[4], at[97]); MULADD(at[5], at[96]); MULADD(at[6], at[95]); MULADD(at[7], at[94]); MULADD(at[8], at[93]); MULADD(at[9], at[92]); MULADD(at[10], at[91]); MULADD(at[11], at[90]); MULADD(at[12], at[89]); MULADD(at[13], at[88]); MULADD(at[14], at[87]); MULADD(at[15], at[86]); MULADD(at[16], at[85]); MULADD(at[17], at[84]); MULADD(at[18], at[83]); MULADD(at[19], at[82]); MULADD(at[20], at[81]); MULADD(at[21], at[80]); MULADD(at[22], at[79]); MULADD(at[23], at[78]); MULADD(at[24], at[77]); MULADD(at[25], at[76]); MULADD(at[26], at[75]); MULADD(at[27], at[74]); MULADD(at[28], at[73]); MULADD(at[29], at[72]); MULADD(at[30], at[71]); MULADD(at[31], at[70]); MULADD(at[32], at[69]); MULADD(at[33], at[68]); MULADD(at[34], at[67]); MULADD(at[35], at[66]); MULADD(at[36], at[65]); MULADD(at[37], at[64]); + COMBA_STORE(C->dp[37]); + /* 38 */ + COMBA_FORWARD; + MULADD(at[0], at[102]); MULADD(at[1], at[101]); MULADD(at[2], at[100]); MULADD(at[3], at[99]); MULADD(at[4], at[98]); MULADD(at[5], at[97]); MULADD(at[6], at[96]); MULADD(at[7], at[95]); MULADD(at[8], at[94]); MULADD(at[9], at[93]); MULADD(at[10], at[92]); MULADD(at[11], at[91]); MULADD(at[12], at[90]); MULADD(at[13], at[89]); MULADD(at[14], at[88]); MULADD(at[15], at[87]); MULADD(at[16], at[86]); MULADD(at[17], at[85]); MULADD(at[18], at[84]); MULADD(at[19], at[83]); MULADD(at[20], at[82]); MULADD(at[21], at[81]); MULADD(at[22], at[80]); MULADD(at[23], at[79]); MULADD(at[24], at[78]); MULADD(at[25], at[77]); MULADD(at[26], at[76]); MULADD(at[27], at[75]); MULADD(at[28], at[74]); MULADD(at[29], at[73]); MULADD(at[30], at[72]); MULADD(at[31], at[71]); MULADD(at[32], at[70]); MULADD(at[33], at[69]); MULADD(at[34], at[68]); MULADD(at[35], at[67]); MULADD(at[36], at[66]); MULADD(at[37], at[65]); MULADD(at[38], at[64]); + COMBA_STORE(C->dp[38]); + /* 39 */ + COMBA_FORWARD; + MULADD(at[0], at[103]); MULADD(at[1], at[102]); MULADD(at[2], at[101]); MULADD(at[3], at[100]); MULADD(at[4], at[99]); MULADD(at[5], at[98]); MULADD(at[6], at[97]); MULADD(at[7], at[96]); MULADD(at[8], at[95]); MULADD(at[9], at[94]); MULADD(at[10], at[93]); MULADD(at[11], at[92]); MULADD(at[12], at[91]); MULADD(at[13], at[90]); MULADD(at[14], at[89]); MULADD(at[15], at[88]); MULADD(at[16], at[87]); MULADD(at[17], at[86]); MULADD(at[18], at[85]); MULADD(at[19], at[84]); MULADD(at[20], at[83]); MULADD(at[21], at[82]); MULADD(at[22], at[81]); MULADD(at[23], at[80]); MULADD(at[24], at[79]); MULADD(at[25], at[78]); MULADD(at[26], at[77]); MULADD(at[27], at[76]); MULADD(at[28], at[75]); MULADD(at[29], at[74]); MULADD(at[30], at[73]); MULADD(at[31], at[72]); MULADD(at[32], at[71]); MULADD(at[33], at[70]); MULADD(at[34], at[69]); MULADD(at[35], at[68]); MULADD(at[36], at[67]); MULADD(at[37], at[66]); MULADD(at[38], at[65]); MULADD(at[39], at[64]); + COMBA_STORE(C->dp[39]); + /* 40 */ + COMBA_FORWARD; + MULADD(at[0], at[104]); MULADD(at[1], at[103]); MULADD(at[2], at[102]); MULADD(at[3], at[101]); MULADD(at[4], at[100]); MULADD(at[5], at[99]); MULADD(at[6], at[98]); MULADD(at[7], at[97]); MULADD(at[8], at[96]); MULADD(at[9], at[95]); MULADD(at[10], at[94]); MULADD(at[11], at[93]); MULADD(at[12], at[92]); MULADD(at[13], at[91]); MULADD(at[14], at[90]); MULADD(at[15], at[89]); MULADD(at[16], at[88]); MULADD(at[17], at[87]); MULADD(at[18], at[86]); MULADD(at[19], at[85]); MULADD(at[20], at[84]); MULADD(at[21], at[83]); MULADD(at[22], at[82]); MULADD(at[23], at[81]); MULADD(at[24], at[80]); MULADD(at[25], at[79]); MULADD(at[26], at[78]); MULADD(at[27], at[77]); MULADD(at[28], at[76]); MULADD(at[29], at[75]); MULADD(at[30], at[74]); MULADD(at[31], at[73]); MULADD(at[32], at[72]); MULADD(at[33], at[71]); MULADD(at[34], at[70]); MULADD(at[35], at[69]); MULADD(at[36], at[68]); MULADD(at[37], at[67]); MULADD(at[38], at[66]); MULADD(at[39], at[65]); MULADD(at[40], at[64]); + COMBA_STORE(C->dp[40]); + /* 41 */ + COMBA_FORWARD; + MULADD(at[0], at[105]); MULADD(at[1], at[104]); MULADD(at[2], at[103]); MULADD(at[3], at[102]); MULADD(at[4], at[101]); MULADD(at[5], at[100]); MULADD(at[6], at[99]); MULADD(at[7], at[98]); MULADD(at[8], at[97]); MULADD(at[9], at[96]); MULADD(at[10], at[95]); MULADD(at[11], at[94]); MULADD(at[12], at[93]); MULADD(at[13], at[92]); MULADD(at[14], at[91]); MULADD(at[15], at[90]); MULADD(at[16], at[89]); MULADD(at[17], at[88]); MULADD(at[18], at[87]); MULADD(at[19], at[86]); MULADD(at[20], at[85]); MULADD(at[21], at[84]); MULADD(at[22], at[83]); MULADD(at[23], at[82]); MULADD(at[24], at[81]); MULADD(at[25], at[80]); MULADD(at[26], at[79]); MULADD(at[27], at[78]); MULADD(at[28], at[77]); MULADD(at[29], at[76]); MULADD(at[30], at[75]); MULADD(at[31], at[74]); MULADD(at[32], at[73]); MULADD(at[33], at[72]); MULADD(at[34], at[71]); MULADD(at[35], at[70]); MULADD(at[36], at[69]); MULADD(at[37], at[68]); MULADD(at[38], at[67]); MULADD(at[39], at[66]); MULADD(at[40], at[65]); MULADD(at[41], at[64]); + COMBA_STORE(C->dp[41]); + /* 42 */ + COMBA_FORWARD; + MULADD(at[0], at[106]); MULADD(at[1], at[105]); MULADD(at[2], at[104]); MULADD(at[3], at[103]); MULADD(at[4], at[102]); MULADD(at[5], at[101]); MULADD(at[6], at[100]); MULADD(at[7], at[99]); MULADD(at[8], at[98]); MULADD(at[9], at[97]); MULADD(at[10], at[96]); MULADD(at[11], at[95]); MULADD(at[12], at[94]); MULADD(at[13], at[93]); MULADD(at[14], at[92]); MULADD(at[15], at[91]); MULADD(at[16], at[90]); MULADD(at[17], at[89]); MULADD(at[18], at[88]); MULADD(at[19], at[87]); MULADD(at[20], at[86]); MULADD(at[21], at[85]); MULADD(at[22], at[84]); MULADD(at[23], at[83]); MULADD(at[24], at[82]); MULADD(at[25], at[81]); MULADD(at[26], at[80]); MULADD(at[27], at[79]); MULADD(at[28], at[78]); MULADD(at[29], at[77]); MULADD(at[30], at[76]); MULADD(at[31], at[75]); MULADD(at[32], at[74]); MULADD(at[33], at[73]); MULADD(at[34], at[72]); MULADD(at[35], at[71]); MULADD(at[36], at[70]); MULADD(at[37], at[69]); MULADD(at[38], at[68]); MULADD(at[39], at[67]); MULADD(at[40], at[66]); MULADD(at[41], at[65]); MULADD(at[42], at[64]); + COMBA_STORE(C->dp[42]); + /* 43 */ + COMBA_FORWARD; + MULADD(at[0], at[107]); MULADD(at[1], at[106]); MULADD(at[2], at[105]); MULADD(at[3], at[104]); MULADD(at[4], at[103]); MULADD(at[5], at[102]); MULADD(at[6], at[101]); MULADD(at[7], at[100]); MULADD(at[8], at[99]); MULADD(at[9], at[98]); MULADD(at[10], at[97]); MULADD(at[11], at[96]); MULADD(at[12], at[95]); MULADD(at[13], at[94]); MULADD(at[14], at[93]); MULADD(at[15], at[92]); MULADD(at[16], at[91]); MULADD(at[17], at[90]); MULADD(at[18], at[89]); MULADD(at[19], at[88]); MULADD(at[20], at[87]); MULADD(at[21], at[86]); MULADD(at[22], at[85]); MULADD(at[23], at[84]); MULADD(at[24], at[83]); MULADD(at[25], at[82]); MULADD(at[26], at[81]); MULADD(at[27], at[80]); MULADD(at[28], at[79]); MULADD(at[29], at[78]); MULADD(at[30], at[77]); MULADD(at[31], at[76]); MULADD(at[32], at[75]); MULADD(at[33], at[74]); MULADD(at[34], at[73]); MULADD(at[35], at[72]); MULADD(at[36], at[71]); MULADD(at[37], at[70]); MULADD(at[38], at[69]); MULADD(at[39], at[68]); MULADD(at[40], at[67]); MULADD(at[41], at[66]); MULADD(at[42], at[65]); MULADD(at[43], at[64]); + COMBA_STORE(C->dp[43]); + /* 44 */ + COMBA_FORWARD; + MULADD(at[0], at[108]); MULADD(at[1], at[107]); MULADD(at[2], at[106]); MULADD(at[3], at[105]); MULADD(at[4], at[104]); MULADD(at[5], at[103]); MULADD(at[6], at[102]); MULADD(at[7], at[101]); MULADD(at[8], at[100]); MULADD(at[9], at[99]); MULADD(at[10], at[98]); MULADD(at[11], at[97]); MULADD(at[12], at[96]); MULADD(at[13], at[95]); MULADD(at[14], at[94]); MULADD(at[15], at[93]); MULADD(at[16], at[92]); MULADD(at[17], at[91]); MULADD(at[18], at[90]); MULADD(at[19], at[89]); MULADD(at[20], at[88]); MULADD(at[21], at[87]); MULADD(at[22], at[86]); MULADD(at[23], at[85]); MULADD(at[24], at[84]); MULADD(at[25], at[83]); MULADD(at[26], at[82]); MULADD(at[27], at[81]); MULADD(at[28], at[80]); MULADD(at[29], at[79]); MULADD(at[30], at[78]); MULADD(at[31], at[77]); MULADD(at[32], at[76]); MULADD(at[33], at[75]); MULADD(at[34], at[74]); MULADD(at[35], at[73]); MULADD(at[36], at[72]); MULADD(at[37], at[71]); MULADD(at[38], at[70]); MULADD(at[39], at[69]); MULADD(at[40], at[68]); MULADD(at[41], at[67]); MULADD(at[42], at[66]); MULADD(at[43], at[65]); MULADD(at[44], at[64]); + COMBA_STORE(C->dp[44]); + /* 45 */ + COMBA_FORWARD; + MULADD(at[0], at[109]); MULADD(at[1], at[108]); MULADD(at[2], at[107]); MULADD(at[3], at[106]); MULADD(at[4], at[105]); MULADD(at[5], at[104]); MULADD(at[6], at[103]); MULADD(at[7], at[102]); MULADD(at[8], at[101]); MULADD(at[9], at[100]); MULADD(at[10], at[99]); MULADD(at[11], at[98]); MULADD(at[12], at[97]); MULADD(at[13], at[96]); MULADD(at[14], at[95]); MULADD(at[15], at[94]); MULADD(at[16], at[93]); MULADD(at[17], at[92]); MULADD(at[18], at[91]); MULADD(at[19], at[90]); MULADD(at[20], at[89]); MULADD(at[21], at[88]); MULADD(at[22], at[87]); MULADD(at[23], at[86]); MULADD(at[24], at[85]); MULADD(at[25], at[84]); MULADD(at[26], at[83]); MULADD(at[27], at[82]); MULADD(at[28], at[81]); MULADD(at[29], at[80]); MULADD(at[30], at[79]); MULADD(at[31], at[78]); MULADD(at[32], at[77]); MULADD(at[33], at[76]); MULADD(at[34], at[75]); MULADD(at[35], at[74]); MULADD(at[36], at[73]); MULADD(at[37], at[72]); MULADD(at[38], at[71]); MULADD(at[39], at[70]); MULADD(at[40], at[69]); MULADD(at[41], at[68]); MULADD(at[42], at[67]); MULADD(at[43], at[66]); MULADD(at[44], at[65]); MULADD(at[45], at[64]); + COMBA_STORE(C->dp[45]); + /* 46 */ + COMBA_FORWARD; + MULADD(at[0], at[110]); MULADD(at[1], at[109]); MULADD(at[2], at[108]); MULADD(at[3], at[107]); MULADD(at[4], at[106]); MULADD(at[5], at[105]); MULADD(at[6], at[104]); MULADD(at[7], at[103]); MULADD(at[8], at[102]); MULADD(at[9], at[101]); MULADD(at[10], at[100]); MULADD(at[11], at[99]); MULADD(at[12], at[98]); MULADD(at[13], at[97]); MULADD(at[14], at[96]); MULADD(at[15], at[95]); MULADD(at[16], at[94]); MULADD(at[17], at[93]); MULADD(at[18], at[92]); MULADD(at[19], at[91]); MULADD(at[20], at[90]); MULADD(at[21], at[89]); MULADD(at[22], at[88]); MULADD(at[23], at[87]); MULADD(at[24], at[86]); MULADD(at[25], at[85]); MULADD(at[26], at[84]); MULADD(at[27], at[83]); MULADD(at[28], at[82]); MULADD(at[29], at[81]); MULADD(at[30], at[80]); MULADD(at[31], at[79]); MULADD(at[32], at[78]); MULADD(at[33], at[77]); MULADD(at[34], at[76]); MULADD(at[35], at[75]); MULADD(at[36], at[74]); MULADD(at[37], at[73]); MULADD(at[38], at[72]); MULADD(at[39], at[71]); MULADD(at[40], at[70]); MULADD(at[41], at[69]); MULADD(at[42], at[68]); MULADD(at[43], at[67]); MULADD(at[44], at[66]); MULADD(at[45], at[65]); MULADD(at[46], at[64]); + COMBA_STORE(C->dp[46]); + /* 47 */ + COMBA_FORWARD; + MULADD(at[0], at[111]); MULADD(at[1], at[110]); MULADD(at[2], at[109]); MULADD(at[3], at[108]); MULADD(at[4], at[107]); MULADD(at[5], at[106]); MULADD(at[6], at[105]); MULADD(at[7], at[104]); MULADD(at[8], at[103]); MULADD(at[9], at[102]); MULADD(at[10], at[101]); MULADD(at[11], at[100]); MULADD(at[12], at[99]); MULADD(at[13], at[98]); MULADD(at[14], at[97]); MULADD(at[15], at[96]); MULADD(at[16], at[95]); MULADD(at[17], at[94]); MULADD(at[18], at[93]); MULADD(at[19], at[92]); MULADD(at[20], at[91]); MULADD(at[21], at[90]); MULADD(at[22], at[89]); MULADD(at[23], at[88]); MULADD(at[24], at[87]); MULADD(at[25], at[86]); MULADD(at[26], at[85]); MULADD(at[27], at[84]); MULADD(at[28], at[83]); MULADD(at[29], at[82]); MULADD(at[30], at[81]); MULADD(at[31], at[80]); MULADD(at[32], at[79]); MULADD(at[33], at[78]); MULADD(at[34], at[77]); MULADD(at[35], at[76]); MULADD(at[36], at[75]); MULADD(at[37], at[74]); MULADD(at[38], at[73]); MULADD(at[39], at[72]); MULADD(at[40], at[71]); MULADD(at[41], at[70]); MULADD(at[42], at[69]); MULADD(at[43], at[68]); MULADD(at[44], at[67]); MULADD(at[45], at[66]); MULADD(at[46], at[65]); MULADD(at[47], at[64]); + COMBA_STORE(C->dp[47]); + /* 48 */ + COMBA_FORWARD; + MULADD(at[0], at[112]); MULADD(at[1], at[111]); MULADD(at[2], at[110]); MULADD(at[3], at[109]); MULADD(at[4], at[108]); MULADD(at[5], at[107]); MULADD(at[6], at[106]); MULADD(at[7], at[105]); MULADD(at[8], at[104]); MULADD(at[9], at[103]); MULADD(at[10], at[102]); MULADD(at[11], at[101]); MULADD(at[12], at[100]); MULADD(at[13], at[99]); MULADD(at[14], at[98]); MULADD(at[15], at[97]); MULADD(at[16], at[96]); MULADD(at[17], at[95]); MULADD(at[18], at[94]); MULADD(at[19], at[93]); MULADD(at[20], at[92]); MULADD(at[21], at[91]); MULADD(at[22], at[90]); MULADD(at[23], at[89]); MULADD(at[24], at[88]); MULADD(at[25], at[87]); MULADD(at[26], at[86]); MULADD(at[27], at[85]); MULADD(at[28], at[84]); MULADD(at[29], at[83]); MULADD(at[30], at[82]); MULADD(at[31], at[81]); MULADD(at[32], at[80]); MULADD(at[33], at[79]); MULADD(at[34], at[78]); MULADD(at[35], at[77]); MULADD(at[36], at[76]); MULADD(at[37], at[75]); MULADD(at[38], at[74]); MULADD(at[39], at[73]); MULADD(at[40], at[72]); MULADD(at[41], at[71]); MULADD(at[42], at[70]); MULADD(at[43], at[69]); MULADD(at[44], at[68]); MULADD(at[45], at[67]); MULADD(at[46], at[66]); MULADD(at[47], at[65]); MULADD(at[48], at[64]); + COMBA_STORE(C->dp[48]); + /* 49 */ + COMBA_FORWARD; + MULADD(at[0], at[113]); MULADD(at[1], at[112]); MULADD(at[2], at[111]); MULADD(at[3], at[110]); MULADD(at[4], at[109]); MULADD(at[5], at[108]); MULADD(at[6], at[107]); MULADD(at[7], at[106]); MULADD(at[8], at[105]); MULADD(at[9], at[104]); MULADD(at[10], at[103]); MULADD(at[11], at[102]); MULADD(at[12], at[101]); MULADD(at[13], at[100]); MULADD(at[14], at[99]); MULADD(at[15], at[98]); MULADD(at[16], at[97]); MULADD(at[17], at[96]); MULADD(at[18], at[95]); MULADD(at[19], at[94]); MULADD(at[20], at[93]); MULADD(at[21], at[92]); MULADD(at[22], at[91]); MULADD(at[23], at[90]); MULADD(at[24], at[89]); MULADD(at[25], at[88]); MULADD(at[26], at[87]); MULADD(at[27], at[86]); MULADD(at[28], at[85]); MULADD(at[29], at[84]); MULADD(at[30], at[83]); MULADD(at[31], at[82]); MULADD(at[32], at[81]); MULADD(at[33], at[80]); MULADD(at[34], at[79]); MULADD(at[35], at[78]); MULADD(at[36], at[77]); MULADD(at[37], at[76]); MULADD(at[38], at[75]); MULADD(at[39], at[74]); MULADD(at[40], at[73]); MULADD(at[41], at[72]); MULADD(at[42], at[71]); MULADD(at[43], at[70]); MULADD(at[44], at[69]); MULADD(at[45], at[68]); MULADD(at[46], at[67]); MULADD(at[47], at[66]); MULADD(at[48], at[65]); MULADD(at[49], at[64]); + COMBA_STORE(C->dp[49]); + /* 50 */ + COMBA_FORWARD; + MULADD(at[0], at[114]); MULADD(at[1], at[113]); MULADD(at[2], at[112]); MULADD(at[3], at[111]); MULADD(at[4], at[110]); MULADD(at[5], at[109]); MULADD(at[6], at[108]); MULADD(at[7], at[107]); MULADD(at[8], at[106]); MULADD(at[9], at[105]); MULADD(at[10], at[104]); MULADD(at[11], at[103]); MULADD(at[12], at[102]); MULADD(at[13], at[101]); MULADD(at[14], at[100]); MULADD(at[15], at[99]); MULADD(at[16], at[98]); MULADD(at[17], at[97]); MULADD(at[18], at[96]); MULADD(at[19], at[95]); MULADD(at[20], at[94]); MULADD(at[21], at[93]); MULADD(at[22], at[92]); MULADD(at[23], at[91]); MULADD(at[24], at[90]); MULADD(at[25], at[89]); MULADD(at[26], at[88]); MULADD(at[27], at[87]); MULADD(at[28], at[86]); MULADD(at[29], at[85]); MULADD(at[30], at[84]); MULADD(at[31], at[83]); MULADD(at[32], at[82]); MULADD(at[33], at[81]); MULADD(at[34], at[80]); MULADD(at[35], at[79]); MULADD(at[36], at[78]); MULADD(at[37], at[77]); MULADD(at[38], at[76]); MULADD(at[39], at[75]); MULADD(at[40], at[74]); MULADD(at[41], at[73]); MULADD(at[42], at[72]); MULADD(at[43], at[71]); MULADD(at[44], at[70]); MULADD(at[45], at[69]); MULADD(at[46], at[68]); MULADD(at[47], at[67]); MULADD(at[48], at[66]); MULADD(at[49], at[65]); MULADD(at[50], at[64]); + COMBA_STORE(C->dp[50]); + /* 51 */ + COMBA_FORWARD; + MULADD(at[0], at[115]); MULADD(at[1], at[114]); MULADD(at[2], at[113]); MULADD(at[3], at[112]); MULADD(at[4], at[111]); MULADD(at[5], at[110]); MULADD(at[6], at[109]); MULADD(at[7], at[108]); MULADD(at[8], at[107]); MULADD(at[9], at[106]); MULADD(at[10], at[105]); MULADD(at[11], at[104]); MULADD(at[12], at[103]); MULADD(at[13], at[102]); MULADD(at[14], at[101]); MULADD(at[15], at[100]); MULADD(at[16], at[99]); MULADD(at[17], at[98]); MULADD(at[18], at[97]); MULADD(at[19], at[96]); MULADD(at[20], at[95]); MULADD(at[21], at[94]); MULADD(at[22], at[93]); MULADD(at[23], at[92]); MULADD(at[24], at[91]); MULADD(at[25], at[90]); MULADD(at[26], at[89]); MULADD(at[27], at[88]); MULADD(at[28], at[87]); MULADD(at[29], at[86]); MULADD(at[30], at[85]); MULADD(at[31], at[84]); MULADD(at[32], at[83]); MULADD(at[33], at[82]); MULADD(at[34], at[81]); MULADD(at[35], at[80]); MULADD(at[36], at[79]); MULADD(at[37], at[78]); MULADD(at[38], at[77]); MULADD(at[39], at[76]); MULADD(at[40], at[75]); MULADD(at[41], at[74]); MULADD(at[42], at[73]); MULADD(at[43], at[72]); MULADD(at[44], at[71]); MULADD(at[45], at[70]); MULADD(at[46], at[69]); MULADD(at[47], at[68]); MULADD(at[48], at[67]); MULADD(at[49], at[66]); MULADD(at[50], at[65]); MULADD(at[51], at[64]); + COMBA_STORE(C->dp[51]); + /* 52 */ + COMBA_FORWARD; + MULADD(at[0], at[116]); MULADD(at[1], at[115]); MULADD(at[2], at[114]); MULADD(at[3], at[113]); MULADD(at[4], at[112]); MULADD(at[5], at[111]); MULADD(at[6], at[110]); MULADD(at[7], at[109]); MULADD(at[8], at[108]); MULADD(at[9], at[107]); MULADD(at[10], at[106]); MULADD(at[11], at[105]); MULADD(at[12], at[104]); MULADD(at[13], at[103]); MULADD(at[14], at[102]); MULADD(at[15], at[101]); MULADD(at[16], at[100]); MULADD(at[17], at[99]); MULADD(at[18], at[98]); MULADD(at[19], at[97]); MULADD(at[20], at[96]); MULADD(at[21], at[95]); MULADD(at[22], at[94]); MULADD(at[23], at[93]); MULADD(at[24], at[92]); MULADD(at[25], at[91]); MULADD(at[26], at[90]); MULADD(at[27], at[89]); MULADD(at[28], at[88]); MULADD(at[29], at[87]); MULADD(at[30], at[86]); MULADD(at[31], at[85]); MULADD(at[32], at[84]); MULADD(at[33], at[83]); MULADD(at[34], at[82]); MULADD(at[35], at[81]); MULADD(at[36], at[80]); MULADD(at[37], at[79]); MULADD(at[38], at[78]); MULADD(at[39], at[77]); MULADD(at[40], at[76]); MULADD(at[41], at[75]); MULADD(at[42], at[74]); MULADD(at[43], at[73]); MULADD(at[44], at[72]); MULADD(at[45], at[71]); MULADD(at[46], at[70]); MULADD(at[47], at[69]); MULADD(at[48], at[68]); MULADD(at[49], at[67]); MULADD(at[50], at[66]); MULADD(at[51], at[65]); MULADD(at[52], at[64]); + COMBA_STORE(C->dp[52]); + /* 53 */ + COMBA_FORWARD; + MULADD(at[0], at[117]); MULADD(at[1], at[116]); MULADD(at[2], at[115]); MULADD(at[3], at[114]); MULADD(at[4], at[113]); MULADD(at[5], at[112]); MULADD(at[6], at[111]); MULADD(at[7], at[110]); MULADD(at[8], at[109]); MULADD(at[9], at[108]); MULADD(at[10], at[107]); MULADD(at[11], at[106]); MULADD(at[12], at[105]); MULADD(at[13], at[104]); MULADD(at[14], at[103]); MULADD(at[15], at[102]); MULADD(at[16], at[101]); MULADD(at[17], at[100]); MULADD(at[18], at[99]); MULADD(at[19], at[98]); MULADD(at[20], at[97]); MULADD(at[21], at[96]); MULADD(at[22], at[95]); MULADD(at[23], at[94]); MULADD(at[24], at[93]); MULADD(at[25], at[92]); MULADD(at[26], at[91]); MULADD(at[27], at[90]); MULADD(at[28], at[89]); MULADD(at[29], at[88]); MULADD(at[30], at[87]); MULADD(at[31], at[86]); MULADD(at[32], at[85]); MULADD(at[33], at[84]); MULADD(at[34], at[83]); MULADD(at[35], at[82]); MULADD(at[36], at[81]); MULADD(at[37], at[80]); MULADD(at[38], at[79]); MULADD(at[39], at[78]); MULADD(at[40], at[77]); MULADD(at[41], at[76]); MULADD(at[42], at[75]); MULADD(at[43], at[74]); MULADD(at[44], at[73]); MULADD(at[45], at[72]); MULADD(at[46], at[71]); MULADD(at[47], at[70]); MULADD(at[48], at[69]); MULADD(at[49], at[68]); MULADD(at[50], at[67]); MULADD(at[51], at[66]); MULADD(at[52], at[65]); MULADD(at[53], at[64]); + COMBA_STORE(C->dp[53]); + /* 54 */ + COMBA_FORWARD; + MULADD(at[0], at[118]); MULADD(at[1], at[117]); MULADD(at[2], at[116]); MULADD(at[3], at[115]); MULADD(at[4], at[114]); MULADD(at[5], at[113]); MULADD(at[6], at[112]); MULADD(at[7], at[111]); MULADD(at[8], at[110]); MULADD(at[9], at[109]); MULADD(at[10], at[108]); MULADD(at[11], at[107]); MULADD(at[12], at[106]); MULADD(at[13], at[105]); MULADD(at[14], at[104]); MULADD(at[15], at[103]); MULADD(at[16], at[102]); MULADD(at[17], at[101]); MULADD(at[18], at[100]); MULADD(at[19], at[99]); MULADD(at[20], at[98]); MULADD(at[21], at[97]); MULADD(at[22], at[96]); MULADD(at[23], at[95]); MULADD(at[24], at[94]); MULADD(at[25], at[93]); MULADD(at[26], at[92]); MULADD(at[27], at[91]); MULADD(at[28], at[90]); MULADD(at[29], at[89]); MULADD(at[30], at[88]); MULADD(at[31], at[87]); MULADD(at[32], at[86]); MULADD(at[33], at[85]); MULADD(at[34], at[84]); MULADD(at[35], at[83]); MULADD(at[36], at[82]); MULADD(at[37], at[81]); MULADD(at[38], at[80]); MULADD(at[39], at[79]); MULADD(at[40], at[78]); MULADD(at[41], at[77]); MULADD(at[42], at[76]); MULADD(at[43], at[75]); MULADD(at[44], at[74]); MULADD(at[45], at[73]); MULADD(at[46], at[72]); MULADD(at[47], at[71]); MULADD(at[48], at[70]); MULADD(at[49], at[69]); MULADD(at[50], at[68]); MULADD(at[51], at[67]); MULADD(at[52], at[66]); MULADD(at[53], at[65]); MULADD(at[54], at[64]); + COMBA_STORE(C->dp[54]); + /* 55 */ + COMBA_FORWARD; + MULADD(at[0], at[119]); MULADD(at[1], at[118]); MULADD(at[2], at[117]); MULADD(at[3], at[116]); MULADD(at[4], at[115]); MULADD(at[5], at[114]); MULADD(at[6], at[113]); MULADD(at[7], at[112]); MULADD(at[8], at[111]); MULADD(at[9], at[110]); MULADD(at[10], at[109]); MULADD(at[11], at[108]); MULADD(at[12], at[107]); MULADD(at[13], at[106]); MULADD(at[14], at[105]); MULADD(at[15], at[104]); MULADD(at[16], at[103]); MULADD(at[17], at[102]); MULADD(at[18], at[101]); MULADD(at[19], at[100]); MULADD(at[20], at[99]); MULADD(at[21], at[98]); MULADD(at[22], at[97]); MULADD(at[23], at[96]); MULADD(at[24], at[95]); MULADD(at[25], at[94]); MULADD(at[26], at[93]); MULADD(at[27], at[92]); MULADD(at[28], at[91]); MULADD(at[29], at[90]); MULADD(at[30], at[89]); MULADD(at[31], at[88]); MULADD(at[32], at[87]); MULADD(at[33], at[86]); MULADD(at[34], at[85]); MULADD(at[35], at[84]); MULADD(at[36], at[83]); MULADD(at[37], at[82]); MULADD(at[38], at[81]); MULADD(at[39], at[80]); MULADD(at[40], at[79]); MULADD(at[41], at[78]); MULADD(at[42], at[77]); MULADD(at[43], at[76]); MULADD(at[44], at[75]); MULADD(at[45], at[74]); MULADD(at[46], at[73]); MULADD(at[47], at[72]); MULADD(at[48], at[71]); MULADD(at[49], at[70]); MULADD(at[50], at[69]); MULADD(at[51], at[68]); MULADD(at[52], at[67]); MULADD(at[53], at[66]); MULADD(at[54], at[65]); MULADD(at[55], at[64]); + COMBA_STORE(C->dp[55]); + /* 56 */ + COMBA_FORWARD; + MULADD(at[0], at[120]); MULADD(at[1], at[119]); MULADD(at[2], at[118]); MULADD(at[3], at[117]); MULADD(at[4], at[116]); MULADD(at[5], at[115]); MULADD(at[6], at[114]); MULADD(at[7], at[113]); MULADD(at[8], at[112]); MULADD(at[9], at[111]); MULADD(at[10], at[110]); MULADD(at[11], at[109]); MULADD(at[12], at[108]); MULADD(at[13], at[107]); MULADD(at[14], at[106]); MULADD(at[15], at[105]); MULADD(at[16], at[104]); MULADD(at[17], at[103]); MULADD(at[18], at[102]); MULADD(at[19], at[101]); MULADD(at[20], at[100]); MULADD(at[21], at[99]); MULADD(at[22], at[98]); MULADD(at[23], at[97]); MULADD(at[24], at[96]); MULADD(at[25], at[95]); MULADD(at[26], at[94]); MULADD(at[27], at[93]); MULADD(at[28], at[92]); MULADD(at[29], at[91]); MULADD(at[30], at[90]); MULADD(at[31], at[89]); MULADD(at[32], at[88]); MULADD(at[33], at[87]); MULADD(at[34], at[86]); MULADD(at[35], at[85]); MULADD(at[36], at[84]); MULADD(at[37], at[83]); MULADD(at[38], at[82]); MULADD(at[39], at[81]); MULADD(at[40], at[80]); MULADD(at[41], at[79]); MULADD(at[42], at[78]); MULADD(at[43], at[77]); MULADD(at[44], at[76]); MULADD(at[45], at[75]); MULADD(at[46], at[74]); MULADD(at[47], at[73]); MULADD(at[48], at[72]); MULADD(at[49], at[71]); MULADD(at[50], at[70]); MULADD(at[51], at[69]); MULADD(at[52], at[68]); MULADD(at[53], at[67]); MULADD(at[54], at[66]); MULADD(at[55], at[65]); MULADD(at[56], at[64]); + COMBA_STORE(C->dp[56]); + /* 57 */ + COMBA_FORWARD; + MULADD(at[0], at[121]); MULADD(at[1], at[120]); MULADD(at[2], at[119]); MULADD(at[3], at[118]); MULADD(at[4], at[117]); MULADD(at[5], at[116]); MULADD(at[6], at[115]); MULADD(at[7], at[114]); MULADD(at[8], at[113]); MULADD(at[9], at[112]); MULADD(at[10], at[111]); MULADD(at[11], at[110]); MULADD(at[12], at[109]); MULADD(at[13], at[108]); MULADD(at[14], at[107]); MULADD(at[15], at[106]); MULADD(at[16], at[105]); MULADD(at[17], at[104]); MULADD(at[18], at[103]); MULADD(at[19], at[102]); MULADD(at[20], at[101]); MULADD(at[21], at[100]); MULADD(at[22], at[99]); MULADD(at[23], at[98]); MULADD(at[24], at[97]); MULADD(at[25], at[96]); MULADD(at[26], at[95]); MULADD(at[27], at[94]); MULADD(at[28], at[93]); MULADD(at[29], at[92]); MULADD(at[30], at[91]); MULADD(at[31], at[90]); MULADD(at[32], at[89]); MULADD(at[33], at[88]); MULADD(at[34], at[87]); MULADD(at[35], at[86]); MULADD(at[36], at[85]); MULADD(at[37], at[84]); MULADD(at[38], at[83]); MULADD(at[39], at[82]); MULADD(at[40], at[81]); MULADD(at[41], at[80]); MULADD(at[42], at[79]); MULADD(at[43], at[78]); MULADD(at[44], at[77]); MULADD(at[45], at[76]); MULADD(at[46], at[75]); MULADD(at[47], at[74]); MULADD(at[48], at[73]); MULADD(at[49], at[72]); MULADD(at[50], at[71]); MULADD(at[51], at[70]); MULADD(at[52], at[69]); MULADD(at[53], at[68]); MULADD(at[54], at[67]); MULADD(at[55], at[66]); MULADD(at[56], at[65]); MULADD(at[57], at[64]); + COMBA_STORE(C->dp[57]); + /* 58 */ + COMBA_FORWARD; + MULADD(at[0], at[122]); MULADD(at[1], at[121]); MULADD(at[2], at[120]); MULADD(at[3], at[119]); MULADD(at[4], at[118]); MULADD(at[5], at[117]); MULADD(at[6], at[116]); MULADD(at[7], at[115]); MULADD(at[8], at[114]); MULADD(at[9], at[113]); MULADD(at[10], at[112]); MULADD(at[11], at[111]); MULADD(at[12], at[110]); MULADD(at[13], at[109]); MULADD(at[14], at[108]); MULADD(at[15], at[107]); MULADD(at[16], at[106]); MULADD(at[17], at[105]); MULADD(at[18], at[104]); MULADD(at[19], at[103]); MULADD(at[20], at[102]); MULADD(at[21], at[101]); MULADD(at[22], at[100]); MULADD(at[23], at[99]); MULADD(at[24], at[98]); MULADD(at[25], at[97]); MULADD(at[26], at[96]); MULADD(at[27], at[95]); MULADD(at[28], at[94]); MULADD(at[29], at[93]); MULADD(at[30], at[92]); MULADD(at[31], at[91]); MULADD(at[32], at[90]); MULADD(at[33], at[89]); MULADD(at[34], at[88]); MULADD(at[35], at[87]); MULADD(at[36], at[86]); MULADD(at[37], at[85]); MULADD(at[38], at[84]); MULADD(at[39], at[83]); MULADD(at[40], at[82]); MULADD(at[41], at[81]); MULADD(at[42], at[80]); MULADD(at[43], at[79]); MULADD(at[44], at[78]); MULADD(at[45], at[77]); MULADD(at[46], at[76]); MULADD(at[47], at[75]); MULADD(at[48], at[74]); MULADD(at[49], at[73]); MULADD(at[50], at[72]); MULADD(at[51], at[71]); MULADD(at[52], at[70]); MULADD(at[53], at[69]); MULADD(at[54], at[68]); MULADD(at[55], at[67]); MULADD(at[56], at[66]); MULADD(at[57], at[65]); MULADD(at[58], at[64]); + COMBA_STORE(C->dp[58]); + /* 59 */ + COMBA_FORWARD; + MULADD(at[0], at[123]); MULADD(at[1], at[122]); MULADD(at[2], at[121]); MULADD(at[3], at[120]); MULADD(at[4], at[119]); MULADD(at[5], at[118]); MULADD(at[6], at[117]); MULADD(at[7], at[116]); MULADD(at[8], at[115]); MULADD(at[9], at[114]); MULADD(at[10], at[113]); MULADD(at[11], at[112]); MULADD(at[12], at[111]); MULADD(at[13], at[110]); MULADD(at[14], at[109]); MULADD(at[15], at[108]); MULADD(at[16], at[107]); MULADD(at[17], at[106]); MULADD(at[18], at[105]); MULADD(at[19], at[104]); MULADD(at[20], at[103]); MULADD(at[21], at[102]); MULADD(at[22], at[101]); MULADD(at[23], at[100]); MULADD(at[24], at[99]); MULADD(at[25], at[98]); MULADD(at[26], at[97]); MULADD(at[27], at[96]); MULADD(at[28], at[95]); MULADD(at[29], at[94]); MULADD(at[30], at[93]); MULADD(at[31], at[92]); MULADD(at[32], at[91]); MULADD(at[33], at[90]); MULADD(at[34], at[89]); MULADD(at[35], at[88]); MULADD(at[36], at[87]); MULADD(at[37], at[86]); MULADD(at[38], at[85]); MULADD(at[39], at[84]); MULADD(at[40], at[83]); MULADD(at[41], at[82]); MULADD(at[42], at[81]); MULADD(at[43], at[80]); MULADD(at[44], at[79]); MULADD(at[45], at[78]); MULADD(at[46], at[77]); MULADD(at[47], at[76]); MULADD(at[48], at[75]); MULADD(at[49], at[74]); MULADD(at[50], at[73]); MULADD(at[51], at[72]); MULADD(at[52], at[71]); MULADD(at[53], at[70]); MULADD(at[54], at[69]); MULADD(at[55], at[68]); MULADD(at[56], at[67]); MULADD(at[57], at[66]); MULADD(at[58], at[65]); MULADD(at[59], at[64]); + COMBA_STORE(C->dp[59]); + /* 60 */ + COMBA_FORWARD; + MULADD(at[0], at[124]); MULADD(at[1], at[123]); MULADD(at[2], at[122]); MULADD(at[3], at[121]); MULADD(at[4], at[120]); MULADD(at[5], at[119]); MULADD(at[6], at[118]); MULADD(at[7], at[117]); MULADD(at[8], at[116]); MULADD(at[9], at[115]); MULADD(at[10], at[114]); MULADD(at[11], at[113]); MULADD(at[12], at[112]); MULADD(at[13], at[111]); MULADD(at[14], at[110]); MULADD(at[15], at[109]); MULADD(at[16], at[108]); MULADD(at[17], at[107]); MULADD(at[18], at[106]); MULADD(at[19], at[105]); MULADD(at[20], at[104]); MULADD(at[21], at[103]); MULADD(at[22], at[102]); MULADD(at[23], at[101]); MULADD(at[24], at[100]); MULADD(at[25], at[99]); MULADD(at[26], at[98]); MULADD(at[27], at[97]); MULADD(at[28], at[96]); MULADD(at[29], at[95]); MULADD(at[30], at[94]); MULADD(at[31], at[93]); MULADD(at[32], at[92]); MULADD(at[33], at[91]); MULADD(at[34], at[90]); MULADD(at[35], at[89]); MULADD(at[36], at[88]); MULADD(at[37], at[87]); MULADD(at[38], at[86]); MULADD(at[39], at[85]); MULADD(at[40], at[84]); MULADD(at[41], at[83]); MULADD(at[42], at[82]); MULADD(at[43], at[81]); MULADD(at[44], at[80]); MULADD(at[45], at[79]); MULADD(at[46], at[78]); MULADD(at[47], at[77]); MULADD(at[48], at[76]); MULADD(at[49], at[75]); MULADD(at[50], at[74]); MULADD(at[51], at[73]); MULADD(at[52], at[72]); MULADD(at[53], at[71]); MULADD(at[54], at[70]); MULADD(at[55], at[69]); MULADD(at[56], at[68]); MULADD(at[57], at[67]); MULADD(at[58], at[66]); MULADD(at[59], at[65]); MULADD(at[60], at[64]); + COMBA_STORE(C->dp[60]); + /* 61 */ + COMBA_FORWARD; + MULADD(at[0], at[125]); MULADD(at[1], at[124]); MULADD(at[2], at[123]); MULADD(at[3], at[122]); MULADD(at[4], at[121]); MULADD(at[5], at[120]); MULADD(at[6], at[119]); MULADD(at[7], at[118]); MULADD(at[8], at[117]); MULADD(at[9], at[116]); MULADD(at[10], at[115]); MULADD(at[11], at[114]); MULADD(at[12], at[113]); MULADD(at[13], at[112]); MULADD(at[14], at[111]); MULADD(at[15], at[110]); MULADD(at[16], at[109]); MULADD(at[17], at[108]); MULADD(at[18], at[107]); MULADD(at[19], at[106]); MULADD(at[20], at[105]); MULADD(at[21], at[104]); MULADD(at[22], at[103]); MULADD(at[23], at[102]); MULADD(at[24], at[101]); MULADD(at[25], at[100]); MULADD(at[26], at[99]); MULADD(at[27], at[98]); MULADD(at[28], at[97]); MULADD(at[29], at[96]); MULADD(at[30], at[95]); MULADD(at[31], at[94]); MULADD(at[32], at[93]); MULADD(at[33], at[92]); MULADD(at[34], at[91]); MULADD(at[35], at[90]); MULADD(at[36], at[89]); MULADD(at[37], at[88]); MULADD(at[38], at[87]); MULADD(at[39], at[86]); MULADD(at[40], at[85]); MULADD(at[41], at[84]); MULADD(at[42], at[83]); MULADD(at[43], at[82]); MULADD(at[44], at[81]); MULADD(at[45], at[80]); MULADD(at[46], at[79]); MULADD(at[47], at[78]); MULADD(at[48], at[77]); MULADD(at[49], at[76]); MULADD(at[50], at[75]); MULADD(at[51], at[74]); MULADD(at[52], at[73]); MULADD(at[53], at[72]); MULADD(at[54], at[71]); MULADD(at[55], at[70]); MULADD(at[56], at[69]); MULADD(at[57], at[68]); MULADD(at[58], at[67]); MULADD(at[59], at[66]); MULADD(at[60], at[65]); MULADD(at[61], at[64]); + COMBA_STORE(C->dp[61]); + /* 62 */ + COMBA_FORWARD; + MULADD(at[0], at[126]); MULADD(at[1], at[125]); MULADD(at[2], at[124]); MULADD(at[3], at[123]); MULADD(at[4], at[122]); MULADD(at[5], at[121]); MULADD(at[6], at[120]); MULADD(at[7], at[119]); MULADD(at[8], at[118]); MULADD(at[9], at[117]); MULADD(at[10], at[116]); MULADD(at[11], at[115]); MULADD(at[12], at[114]); MULADD(at[13], at[113]); MULADD(at[14], at[112]); MULADD(at[15], at[111]); MULADD(at[16], at[110]); MULADD(at[17], at[109]); MULADD(at[18], at[108]); MULADD(at[19], at[107]); MULADD(at[20], at[106]); MULADD(at[21], at[105]); MULADD(at[22], at[104]); MULADD(at[23], at[103]); MULADD(at[24], at[102]); MULADD(at[25], at[101]); MULADD(at[26], at[100]); MULADD(at[27], at[99]); MULADD(at[28], at[98]); MULADD(at[29], at[97]); MULADD(at[30], at[96]); MULADD(at[31], at[95]); MULADD(at[32], at[94]); MULADD(at[33], at[93]); MULADD(at[34], at[92]); MULADD(at[35], at[91]); MULADD(at[36], at[90]); MULADD(at[37], at[89]); MULADD(at[38], at[88]); MULADD(at[39], at[87]); MULADD(at[40], at[86]); MULADD(at[41], at[85]); MULADD(at[42], at[84]); MULADD(at[43], at[83]); MULADD(at[44], at[82]); MULADD(at[45], at[81]); MULADD(at[46], at[80]); MULADD(at[47], at[79]); MULADD(at[48], at[78]); MULADD(at[49], at[77]); MULADD(at[50], at[76]); MULADD(at[51], at[75]); MULADD(at[52], at[74]); MULADD(at[53], at[73]); MULADD(at[54], at[72]); MULADD(at[55], at[71]); MULADD(at[56], at[70]); MULADD(at[57], at[69]); MULADD(at[58], at[68]); MULADD(at[59], at[67]); MULADD(at[60], at[66]); MULADD(at[61], at[65]); MULADD(at[62], at[64]); + COMBA_STORE(C->dp[62]); + /* 63 */ + COMBA_FORWARD; + MULADD(at[0], at[127]); MULADD(at[1], at[126]); MULADD(at[2], at[125]); MULADD(at[3], at[124]); MULADD(at[4], at[123]); MULADD(at[5], at[122]); MULADD(at[6], at[121]); MULADD(at[7], at[120]); MULADD(at[8], at[119]); MULADD(at[9], at[118]); MULADD(at[10], at[117]); MULADD(at[11], at[116]); MULADD(at[12], at[115]); MULADD(at[13], at[114]); MULADD(at[14], at[113]); MULADD(at[15], at[112]); MULADD(at[16], at[111]); MULADD(at[17], at[110]); MULADD(at[18], at[109]); MULADD(at[19], at[108]); MULADD(at[20], at[107]); MULADD(at[21], at[106]); MULADD(at[22], at[105]); MULADD(at[23], at[104]); MULADD(at[24], at[103]); MULADD(at[25], at[102]); MULADD(at[26], at[101]); MULADD(at[27], at[100]); MULADD(at[28], at[99]); MULADD(at[29], at[98]); MULADD(at[30], at[97]); MULADD(at[31], at[96]); MULADD(at[32], at[95]); MULADD(at[33], at[94]); MULADD(at[34], at[93]); MULADD(at[35], at[92]); MULADD(at[36], at[91]); MULADD(at[37], at[90]); MULADD(at[38], at[89]); MULADD(at[39], at[88]); MULADD(at[40], at[87]); MULADD(at[41], at[86]); MULADD(at[42], at[85]); MULADD(at[43], at[84]); MULADD(at[44], at[83]); MULADD(at[45], at[82]); MULADD(at[46], at[81]); MULADD(at[47], at[80]); MULADD(at[48], at[79]); MULADD(at[49], at[78]); MULADD(at[50], at[77]); MULADD(at[51], at[76]); MULADD(at[52], at[75]); MULADD(at[53], at[74]); MULADD(at[54], at[73]); MULADD(at[55], at[72]); MULADD(at[56], at[71]); MULADD(at[57], at[70]); MULADD(at[58], at[69]); MULADD(at[59], at[68]); MULADD(at[60], at[67]); MULADD(at[61], at[66]); MULADD(at[62], at[65]); MULADD(at[63], at[64]); + COMBA_STORE(C->dp[63]); + /* 64 */ + COMBA_FORWARD; + MULADD(at[1], at[127]); MULADD(at[2], at[126]); MULADD(at[3], at[125]); MULADD(at[4], at[124]); MULADD(at[5], at[123]); MULADD(at[6], at[122]); MULADD(at[7], at[121]); MULADD(at[8], at[120]); MULADD(at[9], at[119]); MULADD(at[10], at[118]); MULADD(at[11], at[117]); MULADD(at[12], at[116]); MULADD(at[13], at[115]); MULADD(at[14], at[114]); MULADD(at[15], at[113]); MULADD(at[16], at[112]); MULADD(at[17], at[111]); MULADD(at[18], at[110]); MULADD(at[19], at[109]); MULADD(at[20], at[108]); MULADD(at[21], at[107]); MULADD(at[22], at[106]); MULADD(at[23], at[105]); MULADD(at[24], at[104]); MULADD(at[25], at[103]); MULADD(at[26], at[102]); MULADD(at[27], at[101]); MULADD(at[28], at[100]); MULADD(at[29], at[99]); MULADD(at[30], at[98]); MULADD(at[31], at[97]); MULADD(at[32], at[96]); MULADD(at[33], at[95]); MULADD(at[34], at[94]); MULADD(at[35], at[93]); MULADD(at[36], at[92]); MULADD(at[37], at[91]); MULADD(at[38], at[90]); MULADD(at[39], at[89]); MULADD(at[40], at[88]); MULADD(at[41], at[87]); MULADD(at[42], at[86]); MULADD(at[43], at[85]); MULADD(at[44], at[84]); MULADD(at[45], at[83]); MULADD(at[46], at[82]); MULADD(at[47], at[81]); MULADD(at[48], at[80]); MULADD(at[49], at[79]); MULADD(at[50], at[78]); MULADD(at[51], at[77]); MULADD(at[52], at[76]); MULADD(at[53], at[75]); MULADD(at[54], at[74]); MULADD(at[55], at[73]); MULADD(at[56], at[72]); MULADD(at[57], at[71]); MULADD(at[58], at[70]); MULADD(at[59], at[69]); MULADD(at[60], at[68]); MULADD(at[61], at[67]); MULADD(at[62], at[66]); MULADD(at[63], at[65]); + COMBA_STORE(C->dp[64]); + /* 65 */ + COMBA_FORWARD; + MULADD(at[2], at[127]); MULADD(at[3], at[126]); MULADD(at[4], at[125]); MULADD(at[5], at[124]); MULADD(at[6], at[123]); MULADD(at[7], at[122]); MULADD(at[8], at[121]); MULADD(at[9], at[120]); MULADD(at[10], at[119]); MULADD(at[11], at[118]); MULADD(at[12], at[117]); MULADD(at[13], at[116]); MULADD(at[14], at[115]); MULADD(at[15], at[114]); MULADD(at[16], at[113]); MULADD(at[17], at[112]); MULADD(at[18], at[111]); MULADD(at[19], at[110]); MULADD(at[20], at[109]); MULADD(at[21], at[108]); MULADD(at[22], at[107]); MULADD(at[23], at[106]); MULADD(at[24], at[105]); MULADD(at[25], at[104]); MULADD(at[26], at[103]); MULADD(at[27], at[102]); MULADD(at[28], at[101]); MULADD(at[29], at[100]); MULADD(at[30], at[99]); MULADD(at[31], at[98]); MULADD(at[32], at[97]); MULADD(at[33], at[96]); MULADD(at[34], at[95]); MULADD(at[35], at[94]); MULADD(at[36], at[93]); MULADD(at[37], at[92]); MULADD(at[38], at[91]); MULADD(at[39], at[90]); MULADD(at[40], at[89]); MULADD(at[41], at[88]); MULADD(at[42], at[87]); MULADD(at[43], at[86]); MULADD(at[44], at[85]); MULADD(at[45], at[84]); MULADD(at[46], at[83]); MULADD(at[47], at[82]); MULADD(at[48], at[81]); MULADD(at[49], at[80]); MULADD(at[50], at[79]); MULADD(at[51], at[78]); MULADD(at[52], at[77]); MULADD(at[53], at[76]); MULADD(at[54], at[75]); MULADD(at[55], at[74]); MULADD(at[56], at[73]); MULADD(at[57], at[72]); MULADD(at[58], at[71]); MULADD(at[59], at[70]); MULADD(at[60], at[69]); MULADD(at[61], at[68]); MULADD(at[62], at[67]); MULADD(at[63], at[66]); + COMBA_STORE(C->dp[65]); + /* 66 */ + COMBA_FORWARD; + MULADD(at[3], at[127]); MULADD(at[4], at[126]); MULADD(at[5], at[125]); MULADD(at[6], at[124]); MULADD(at[7], at[123]); MULADD(at[8], at[122]); MULADD(at[9], at[121]); MULADD(at[10], at[120]); MULADD(at[11], at[119]); MULADD(at[12], at[118]); MULADD(at[13], at[117]); MULADD(at[14], at[116]); MULADD(at[15], at[115]); MULADD(at[16], at[114]); MULADD(at[17], at[113]); MULADD(at[18], at[112]); MULADD(at[19], at[111]); MULADD(at[20], at[110]); MULADD(at[21], at[109]); MULADD(at[22], at[108]); MULADD(at[23], at[107]); MULADD(at[24], at[106]); MULADD(at[25], at[105]); MULADD(at[26], at[104]); MULADD(at[27], at[103]); MULADD(at[28], at[102]); MULADD(at[29], at[101]); MULADD(at[30], at[100]); MULADD(at[31], at[99]); MULADD(at[32], at[98]); MULADD(at[33], at[97]); MULADD(at[34], at[96]); MULADD(at[35], at[95]); MULADD(at[36], at[94]); MULADD(at[37], at[93]); MULADD(at[38], at[92]); MULADD(at[39], at[91]); MULADD(at[40], at[90]); MULADD(at[41], at[89]); MULADD(at[42], at[88]); MULADD(at[43], at[87]); MULADD(at[44], at[86]); MULADD(at[45], at[85]); MULADD(at[46], at[84]); MULADD(at[47], at[83]); MULADD(at[48], at[82]); MULADD(at[49], at[81]); MULADD(at[50], at[80]); MULADD(at[51], at[79]); MULADD(at[52], at[78]); MULADD(at[53], at[77]); MULADD(at[54], at[76]); MULADD(at[55], at[75]); MULADD(at[56], at[74]); MULADD(at[57], at[73]); MULADD(at[58], at[72]); MULADD(at[59], at[71]); MULADD(at[60], at[70]); MULADD(at[61], at[69]); MULADD(at[62], at[68]); MULADD(at[63], at[67]); + COMBA_STORE(C->dp[66]); + /* 67 */ + COMBA_FORWARD; + MULADD(at[4], at[127]); MULADD(at[5], at[126]); MULADD(at[6], at[125]); MULADD(at[7], at[124]); MULADD(at[8], at[123]); MULADD(at[9], at[122]); MULADD(at[10], at[121]); MULADD(at[11], at[120]); MULADD(at[12], at[119]); MULADD(at[13], at[118]); MULADD(at[14], at[117]); MULADD(at[15], at[116]); MULADD(at[16], at[115]); MULADD(at[17], at[114]); MULADD(at[18], at[113]); MULADD(at[19], at[112]); MULADD(at[20], at[111]); MULADD(at[21], at[110]); MULADD(at[22], at[109]); MULADD(at[23], at[108]); MULADD(at[24], at[107]); MULADD(at[25], at[106]); MULADD(at[26], at[105]); MULADD(at[27], at[104]); MULADD(at[28], at[103]); MULADD(at[29], at[102]); MULADD(at[30], at[101]); MULADD(at[31], at[100]); MULADD(at[32], at[99]); MULADD(at[33], at[98]); MULADD(at[34], at[97]); MULADD(at[35], at[96]); MULADD(at[36], at[95]); MULADD(at[37], at[94]); MULADD(at[38], at[93]); MULADD(at[39], at[92]); MULADD(at[40], at[91]); MULADD(at[41], at[90]); MULADD(at[42], at[89]); MULADD(at[43], at[88]); MULADD(at[44], at[87]); MULADD(at[45], at[86]); MULADD(at[46], at[85]); MULADD(at[47], at[84]); MULADD(at[48], at[83]); MULADD(at[49], at[82]); MULADD(at[50], at[81]); MULADD(at[51], at[80]); MULADD(at[52], at[79]); MULADD(at[53], at[78]); MULADD(at[54], at[77]); MULADD(at[55], at[76]); MULADD(at[56], at[75]); MULADD(at[57], at[74]); MULADD(at[58], at[73]); MULADD(at[59], at[72]); MULADD(at[60], at[71]); MULADD(at[61], at[70]); MULADD(at[62], at[69]); MULADD(at[63], at[68]); + COMBA_STORE(C->dp[67]); + /* 68 */ + COMBA_FORWARD; + MULADD(at[5], at[127]); MULADD(at[6], at[126]); MULADD(at[7], at[125]); MULADD(at[8], at[124]); MULADD(at[9], at[123]); MULADD(at[10], at[122]); MULADD(at[11], at[121]); MULADD(at[12], at[120]); MULADD(at[13], at[119]); MULADD(at[14], at[118]); MULADD(at[15], at[117]); MULADD(at[16], at[116]); MULADD(at[17], at[115]); MULADD(at[18], at[114]); MULADD(at[19], at[113]); MULADD(at[20], at[112]); MULADD(at[21], at[111]); MULADD(at[22], at[110]); MULADD(at[23], at[109]); MULADD(at[24], at[108]); MULADD(at[25], at[107]); MULADD(at[26], at[106]); MULADD(at[27], at[105]); MULADD(at[28], at[104]); MULADD(at[29], at[103]); MULADD(at[30], at[102]); MULADD(at[31], at[101]); MULADD(at[32], at[100]); MULADD(at[33], at[99]); MULADD(at[34], at[98]); MULADD(at[35], at[97]); MULADD(at[36], at[96]); MULADD(at[37], at[95]); MULADD(at[38], at[94]); MULADD(at[39], at[93]); MULADD(at[40], at[92]); MULADD(at[41], at[91]); MULADD(at[42], at[90]); MULADD(at[43], at[89]); MULADD(at[44], at[88]); MULADD(at[45], at[87]); MULADD(at[46], at[86]); MULADD(at[47], at[85]); MULADD(at[48], at[84]); MULADD(at[49], at[83]); MULADD(at[50], at[82]); MULADD(at[51], at[81]); MULADD(at[52], at[80]); MULADD(at[53], at[79]); MULADD(at[54], at[78]); MULADD(at[55], at[77]); MULADD(at[56], at[76]); MULADD(at[57], at[75]); MULADD(at[58], at[74]); MULADD(at[59], at[73]); MULADD(at[60], at[72]); MULADD(at[61], at[71]); MULADD(at[62], at[70]); MULADD(at[63], at[69]); + COMBA_STORE(C->dp[68]); + /* 69 */ + COMBA_FORWARD; + MULADD(at[6], at[127]); MULADD(at[7], at[126]); MULADD(at[8], at[125]); MULADD(at[9], at[124]); MULADD(at[10], at[123]); MULADD(at[11], at[122]); MULADD(at[12], at[121]); MULADD(at[13], at[120]); MULADD(at[14], at[119]); MULADD(at[15], at[118]); MULADD(at[16], at[117]); MULADD(at[17], at[116]); MULADD(at[18], at[115]); MULADD(at[19], at[114]); MULADD(at[20], at[113]); MULADD(at[21], at[112]); MULADD(at[22], at[111]); MULADD(at[23], at[110]); MULADD(at[24], at[109]); MULADD(at[25], at[108]); MULADD(at[26], at[107]); MULADD(at[27], at[106]); MULADD(at[28], at[105]); MULADD(at[29], at[104]); MULADD(at[30], at[103]); MULADD(at[31], at[102]); MULADD(at[32], at[101]); MULADD(at[33], at[100]); MULADD(at[34], at[99]); MULADD(at[35], at[98]); MULADD(at[36], at[97]); MULADD(at[37], at[96]); MULADD(at[38], at[95]); MULADD(at[39], at[94]); MULADD(at[40], at[93]); MULADD(at[41], at[92]); MULADD(at[42], at[91]); MULADD(at[43], at[90]); MULADD(at[44], at[89]); MULADD(at[45], at[88]); MULADD(at[46], at[87]); MULADD(at[47], at[86]); MULADD(at[48], at[85]); MULADD(at[49], at[84]); MULADD(at[50], at[83]); MULADD(at[51], at[82]); MULADD(at[52], at[81]); MULADD(at[53], at[80]); MULADD(at[54], at[79]); MULADD(at[55], at[78]); MULADD(at[56], at[77]); MULADD(at[57], at[76]); MULADD(at[58], at[75]); MULADD(at[59], at[74]); MULADD(at[60], at[73]); MULADD(at[61], at[72]); MULADD(at[62], at[71]); MULADD(at[63], at[70]); + COMBA_STORE(C->dp[69]); + /* 70 */ + COMBA_FORWARD; + MULADD(at[7], at[127]); MULADD(at[8], at[126]); MULADD(at[9], at[125]); MULADD(at[10], at[124]); MULADD(at[11], at[123]); MULADD(at[12], at[122]); MULADD(at[13], at[121]); MULADD(at[14], at[120]); MULADD(at[15], at[119]); MULADD(at[16], at[118]); MULADD(at[17], at[117]); MULADD(at[18], at[116]); MULADD(at[19], at[115]); MULADD(at[20], at[114]); MULADD(at[21], at[113]); MULADD(at[22], at[112]); MULADD(at[23], at[111]); MULADD(at[24], at[110]); MULADD(at[25], at[109]); MULADD(at[26], at[108]); MULADD(at[27], at[107]); MULADD(at[28], at[106]); MULADD(at[29], at[105]); MULADD(at[30], at[104]); MULADD(at[31], at[103]); MULADD(at[32], at[102]); MULADD(at[33], at[101]); MULADD(at[34], at[100]); MULADD(at[35], at[99]); MULADD(at[36], at[98]); MULADD(at[37], at[97]); MULADD(at[38], at[96]); MULADD(at[39], at[95]); MULADD(at[40], at[94]); MULADD(at[41], at[93]); MULADD(at[42], at[92]); MULADD(at[43], at[91]); MULADD(at[44], at[90]); MULADD(at[45], at[89]); MULADD(at[46], at[88]); MULADD(at[47], at[87]); MULADD(at[48], at[86]); MULADD(at[49], at[85]); MULADD(at[50], at[84]); MULADD(at[51], at[83]); MULADD(at[52], at[82]); MULADD(at[53], at[81]); MULADD(at[54], at[80]); MULADD(at[55], at[79]); MULADD(at[56], at[78]); MULADD(at[57], at[77]); MULADD(at[58], at[76]); MULADD(at[59], at[75]); MULADD(at[60], at[74]); MULADD(at[61], at[73]); MULADD(at[62], at[72]); MULADD(at[63], at[71]); + COMBA_STORE(C->dp[70]); + /* 71 */ + COMBA_FORWARD; + MULADD(at[8], at[127]); MULADD(at[9], at[126]); MULADD(at[10], at[125]); MULADD(at[11], at[124]); MULADD(at[12], at[123]); MULADD(at[13], at[122]); MULADD(at[14], at[121]); MULADD(at[15], at[120]); MULADD(at[16], at[119]); MULADD(at[17], at[118]); MULADD(at[18], at[117]); MULADD(at[19], at[116]); MULADD(at[20], at[115]); MULADD(at[21], at[114]); MULADD(at[22], at[113]); MULADD(at[23], at[112]); MULADD(at[24], at[111]); MULADD(at[25], at[110]); MULADD(at[26], at[109]); MULADD(at[27], at[108]); MULADD(at[28], at[107]); MULADD(at[29], at[106]); MULADD(at[30], at[105]); MULADD(at[31], at[104]); MULADD(at[32], at[103]); MULADD(at[33], at[102]); MULADD(at[34], at[101]); MULADD(at[35], at[100]); MULADD(at[36], at[99]); MULADD(at[37], at[98]); MULADD(at[38], at[97]); MULADD(at[39], at[96]); MULADD(at[40], at[95]); MULADD(at[41], at[94]); MULADD(at[42], at[93]); MULADD(at[43], at[92]); MULADD(at[44], at[91]); MULADD(at[45], at[90]); MULADD(at[46], at[89]); MULADD(at[47], at[88]); MULADD(at[48], at[87]); MULADD(at[49], at[86]); MULADD(at[50], at[85]); MULADD(at[51], at[84]); MULADD(at[52], at[83]); MULADD(at[53], at[82]); MULADD(at[54], at[81]); MULADD(at[55], at[80]); MULADD(at[56], at[79]); MULADD(at[57], at[78]); MULADD(at[58], at[77]); MULADD(at[59], at[76]); MULADD(at[60], at[75]); MULADD(at[61], at[74]); MULADD(at[62], at[73]); MULADD(at[63], at[72]); + COMBA_STORE(C->dp[71]); + /* 72 */ + COMBA_FORWARD; + MULADD(at[9], at[127]); MULADD(at[10], at[126]); MULADD(at[11], at[125]); MULADD(at[12], at[124]); MULADD(at[13], at[123]); MULADD(at[14], at[122]); MULADD(at[15], at[121]); MULADD(at[16], at[120]); MULADD(at[17], at[119]); MULADD(at[18], at[118]); MULADD(at[19], at[117]); MULADD(at[20], at[116]); MULADD(at[21], at[115]); MULADD(at[22], at[114]); MULADD(at[23], at[113]); MULADD(at[24], at[112]); MULADD(at[25], at[111]); MULADD(at[26], at[110]); MULADD(at[27], at[109]); MULADD(at[28], at[108]); MULADD(at[29], at[107]); MULADD(at[30], at[106]); MULADD(at[31], at[105]); MULADD(at[32], at[104]); MULADD(at[33], at[103]); MULADD(at[34], at[102]); MULADD(at[35], at[101]); MULADD(at[36], at[100]); MULADD(at[37], at[99]); MULADD(at[38], at[98]); MULADD(at[39], at[97]); MULADD(at[40], at[96]); MULADD(at[41], at[95]); MULADD(at[42], at[94]); MULADD(at[43], at[93]); MULADD(at[44], at[92]); MULADD(at[45], at[91]); MULADD(at[46], at[90]); MULADD(at[47], at[89]); MULADD(at[48], at[88]); MULADD(at[49], at[87]); MULADD(at[50], at[86]); MULADD(at[51], at[85]); MULADD(at[52], at[84]); MULADD(at[53], at[83]); MULADD(at[54], at[82]); MULADD(at[55], at[81]); MULADD(at[56], at[80]); MULADD(at[57], at[79]); MULADD(at[58], at[78]); MULADD(at[59], at[77]); MULADD(at[60], at[76]); MULADD(at[61], at[75]); MULADD(at[62], at[74]); MULADD(at[63], at[73]); + COMBA_STORE(C->dp[72]); + /* 73 */ + COMBA_FORWARD; + MULADD(at[10], at[127]); MULADD(at[11], at[126]); MULADD(at[12], at[125]); MULADD(at[13], at[124]); MULADD(at[14], at[123]); MULADD(at[15], at[122]); MULADD(at[16], at[121]); MULADD(at[17], at[120]); MULADD(at[18], at[119]); MULADD(at[19], at[118]); MULADD(at[20], at[117]); MULADD(at[21], at[116]); MULADD(at[22], at[115]); MULADD(at[23], at[114]); MULADD(at[24], at[113]); MULADD(at[25], at[112]); MULADD(at[26], at[111]); MULADD(at[27], at[110]); MULADD(at[28], at[109]); MULADD(at[29], at[108]); MULADD(at[30], at[107]); MULADD(at[31], at[106]); MULADD(at[32], at[105]); MULADD(at[33], at[104]); MULADD(at[34], at[103]); MULADD(at[35], at[102]); MULADD(at[36], at[101]); MULADD(at[37], at[100]); MULADD(at[38], at[99]); MULADD(at[39], at[98]); MULADD(at[40], at[97]); MULADD(at[41], at[96]); MULADD(at[42], at[95]); MULADD(at[43], at[94]); MULADD(at[44], at[93]); MULADD(at[45], at[92]); MULADD(at[46], at[91]); MULADD(at[47], at[90]); MULADD(at[48], at[89]); MULADD(at[49], at[88]); MULADD(at[50], at[87]); MULADD(at[51], at[86]); MULADD(at[52], at[85]); MULADD(at[53], at[84]); MULADD(at[54], at[83]); MULADD(at[55], at[82]); MULADD(at[56], at[81]); MULADD(at[57], at[80]); MULADD(at[58], at[79]); MULADD(at[59], at[78]); MULADD(at[60], at[77]); MULADD(at[61], at[76]); MULADD(at[62], at[75]); MULADD(at[63], at[74]); + COMBA_STORE(C->dp[73]); + /* 74 */ + COMBA_FORWARD; + MULADD(at[11], at[127]); MULADD(at[12], at[126]); MULADD(at[13], at[125]); MULADD(at[14], at[124]); MULADD(at[15], at[123]); MULADD(at[16], at[122]); MULADD(at[17], at[121]); MULADD(at[18], at[120]); MULADD(at[19], at[119]); MULADD(at[20], at[118]); MULADD(at[21], at[117]); MULADD(at[22], at[116]); MULADD(at[23], at[115]); MULADD(at[24], at[114]); MULADD(at[25], at[113]); MULADD(at[26], at[112]); MULADD(at[27], at[111]); MULADD(at[28], at[110]); MULADD(at[29], at[109]); MULADD(at[30], at[108]); MULADD(at[31], at[107]); MULADD(at[32], at[106]); MULADD(at[33], at[105]); MULADD(at[34], at[104]); MULADD(at[35], at[103]); MULADD(at[36], at[102]); MULADD(at[37], at[101]); MULADD(at[38], at[100]); MULADD(at[39], at[99]); MULADD(at[40], at[98]); MULADD(at[41], at[97]); MULADD(at[42], at[96]); MULADD(at[43], at[95]); MULADD(at[44], at[94]); MULADD(at[45], at[93]); MULADD(at[46], at[92]); MULADD(at[47], at[91]); MULADD(at[48], at[90]); MULADD(at[49], at[89]); MULADD(at[50], at[88]); MULADD(at[51], at[87]); MULADD(at[52], at[86]); MULADD(at[53], at[85]); MULADD(at[54], at[84]); MULADD(at[55], at[83]); MULADD(at[56], at[82]); MULADD(at[57], at[81]); MULADD(at[58], at[80]); MULADD(at[59], at[79]); MULADD(at[60], at[78]); MULADD(at[61], at[77]); MULADD(at[62], at[76]); MULADD(at[63], at[75]); + COMBA_STORE(C->dp[74]); + /* 75 */ + COMBA_FORWARD; + MULADD(at[12], at[127]); MULADD(at[13], at[126]); MULADD(at[14], at[125]); MULADD(at[15], at[124]); MULADD(at[16], at[123]); MULADD(at[17], at[122]); MULADD(at[18], at[121]); MULADD(at[19], at[120]); MULADD(at[20], at[119]); MULADD(at[21], at[118]); MULADD(at[22], at[117]); MULADD(at[23], at[116]); MULADD(at[24], at[115]); MULADD(at[25], at[114]); MULADD(at[26], at[113]); MULADD(at[27], at[112]); MULADD(at[28], at[111]); MULADD(at[29], at[110]); MULADD(at[30], at[109]); MULADD(at[31], at[108]); MULADD(at[32], at[107]); MULADD(at[33], at[106]); MULADD(at[34], at[105]); MULADD(at[35], at[104]); MULADD(at[36], at[103]); MULADD(at[37], at[102]); MULADD(at[38], at[101]); MULADD(at[39], at[100]); MULADD(at[40], at[99]); MULADD(at[41], at[98]); MULADD(at[42], at[97]); MULADD(at[43], at[96]); MULADD(at[44], at[95]); MULADD(at[45], at[94]); MULADD(at[46], at[93]); MULADD(at[47], at[92]); MULADD(at[48], at[91]); MULADD(at[49], at[90]); MULADD(at[50], at[89]); MULADD(at[51], at[88]); MULADD(at[52], at[87]); MULADD(at[53], at[86]); MULADD(at[54], at[85]); MULADD(at[55], at[84]); MULADD(at[56], at[83]); MULADD(at[57], at[82]); MULADD(at[58], at[81]); MULADD(at[59], at[80]); MULADD(at[60], at[79]); MULADD(at[61], at[78]); MULADD(at[62], at[77]); MULADD(at[63], at[76]); + COMBA_STORE(C->dp[75]); + /* 76 */ + COMBA_FORWARD; + MULADD(at[13], at[127]); MULADD(at[14], at[126]); MULADD(at[15], at[125]); MULADD(at[16], at[124]); MULADD(at[17], at[123]); MULADD(at[18], at[122]); MULADD(at[19], at[121]); MULADD(at[20], at[120]); MULADD(at[21], at[119]); MULADD(at[22], at[118]); MULADD(at[23], at[117]); MULADD(at[24], at[116]); MULADD(at[25], at[115]); MULADD(at[26], at[114]); MULADD(at[27], at[113]); MULADD(at[28], at[112]); MULADD(at[29], at[111]); MULADD(at[30], at[110]); MULADD(at[31], at[109]); MULADD(at[32], at[108]); MULADD(at[33], at[107]); MULADD(at[34], at[106]); MULADD(at[35], at[105]); MULADD(at[36], at[104]); MULADD(at[37], at[103]); MULADD(at[38], at[102]); MULADD(at[39], at[101]); MULADD(at[40], at[100]); MULADD(at[41], at[99]); MULADD(at[42], at[98]); MULADD(at[43], at[97]); MULADD(at[44], at[96]); MULADD(at[45], at[95]); MULADD(at[46], at[94]); MULADD(at[47], at[93]); MULADD(at[48], at[92]); MULADD(at[49], at[91]); MULADD(at[50], at[90]); MULADD(at[51], at[89]); MULADD(at[52], at[88]); MULADD(at[53], at[87]); MULADD(at[54], at[86]); MULADD(at[55], at[85]); MULADD(at[56], at[84]); MULADD(at[57], at[83]); MULADD(at[58], at[82]); MULADD(at[59], at[81]); MULADD(at[60], at[80]); MULADD(at[61], at[79]); MULADD(at[62], at[78]); MULADD(at[63], at[77]); + COMBA_STORE(C->dp[76]); + /* 77 */ + COMBA_FORWARD; + MULADD(at[14], at[127]); MULADD(at[15], at[126]); MULADD(at[16], at[125]); MULADD(at[17], at[124]); MULADD(at[18], at[123]); MULADD(at[19], at[122]); MULADD(at[20], at[121]); MULADD(at[21], at[120]); MULADD(at[22], at[119]); MULADD(at[23], at[118]); MULADD(at[24], at[117]); MULADD(at[25], at[116]); MULADD(at[26], at[115]); MULADD(at[27], at[114]); MULADD(at[28], at[113]); MULADD(at[29], at[112]); MULADD(at[30], at[111]); MULADD(at[31], at[110]); MULADD(at[32], at[109]); MULADD(at[33], at[108]); MULADD(at[34], at[107]); MULADD(at[35], at[106]); MULADD(at[36], at[105]); MULADD(at[37], at[104]); MULADD(at[38], at[103]); MULADD(at[39], at[102]); MULADD(at[40], at[101]); MULADD(at[41], at[100]); MULADD(at[42], at[99]); MULADD(at[43], at[98]); MULADD(at[44], at[97]); MULADD(at[45], at[96]); MULADD(at[46], at[95]); MULADD(at[47], at[94]); MULADD(at[48], at[93]); MULADD(at[49], at[92]); MULADD(at[50], at[91]); MULADD(at[51], at[90]); MULADD(at[52], at[89]); MULADD(at[53], at[88]); MULADD(at[54], at[87]); MULADD(at[55], at[86]); MULADD(at[56], at[85]); MULADD(at[57], at[84]); MULADD(at[58], at[83]); MULADD(at[59], at[82]); MULADD(at[60], at[81]); MULADD(at[61], at[80]); MULADD(at[62], at[79]); MULADD(at[63], at[78]); + COMBA_STORE(C->dp[77]); + /* 78 */ + COMBA_FORWARD; + MULADD(at[15], at[127]); MULADD(at[16], at[126]); MULADD(at[17], at[125]); MULADD(at[18], at[124]); MULADD(at[19], at[123]); MULADD(at[20], at[122]); MULADD(at[21], at[121]); MULADD(at[22], at[120]); MULADD(at[23], at[119]); MULADD(at[24], at[118]); MULADD(at[25], at[117]); MULADD(at[26], at[116]); MULADD(at[27], at[115]); MULADD(at[28], at[114]); MULADD(at[29], at[113]); MULADD(at[30], at[112]); MULADD(at[31], at[111]); MULADD(at[32], at[110]); MULADD(at[33], at[109]); MULADD(at[34], at[108]); MULADD(at[35], at[107]); MULADD(at[36], at[106]); MULADD(at[37], at[105]); MULADD(at[38], at[104]); MULADD(at[39], at[103]); MULADD(at[40], at[102]); MULADD(at[41], at[101]); MULADD(at[42], at[100]); MULADD(at[43], at[99]); MULADD(at[44], at[98]); MULADD(at[45], at[97]); MULADD(at[46], at[96]); MULADD(at[47], at[95]); MULADD(at[48], at[94]); MULADD(at[49], at[93]); MULADD(at[50], at[92]); MULADD(at[51], at[91]); MULADD(at[52], at[90]); MULADD(at[53], at[89]); MULADD(at[54], at[88]); MULADD(at[55], at[87]); MULADD(at[56], at[86]); MULADD(at[57], at[85]); MULADD(at[58], at[84]); MULADD(at[59], at[83]); MULADD(at[60], at[82]); MULADD(at[61], at[81]); MULADD(at[62], at[80]); MULADD(at[63], at[79]); + COMBA_STORE(C->dp[78]); + /* 79 */ + COMBA_FORWARD; + MULADD(at[16], at[127]); MULADD(at[17], at[126]); MULADD(at[18], at[125]); MULADD(at[19], at[124]); MULADD(at[20], at[123]); MULADD(at[21], at[122]); MULADD(at[22], at[121]); MULADD(at[23], at[120]); MULADD(at[24], at[119]); MULADD(at[25], at[118]); MULADD(at[26], at[117]); MULADD(at[27], at[116]); MULADD(at[28], at[115]); MULADD(at[29], at[114]); MULADD(at[30], at[113]); MULADD(at[31], at[112]); MULADD(at[32], at[111]); MULADD(at[33], at[110]); MULADD(at[34], at[109]); MULADD(at[35], at[108]); MULADD(at[36], at[107]); MULADD(at[37], at[106]); MULADD(at[38], at[105]); MULADD(at[39], at[104]); MULADD(at[40], at[103]); MULADD(at[41], at[102]); MULADD(at[42], at[101]); MULADD(at[43], at[100]); MULADD(at[44], at[99]); MULADD(at[45], at[98]); MULADD(at[46], at[97]); MULADD(at[47], at[96]); MULADD(at[48], at[95]); MULADD(at[49], at[94]); MULADD(at[50], at[93]); MULADD(at[51], at[92]); MULADD(at[52], at[91]); MULADD(at[53], at[90]); MULADD(at[54], at[89]); MULADD(at[55], at[88]); MULADD(at[56], at[87]); MULADD(at[57], at[86]); MULADD(at[58], at[85]); MULADD(at[59], at[84]); MULADD(at[60], at[83]); MULADD(at[61], at[82]); MULADD(at[62], at[81]); MULADD(at[63], at[80]); + COMBA_STORE(C->dp[79]); + /* 80 */ + COMBA_FORWARD; + MULADD(at[17], at[127]); MULADD(at[18], at[126]); MULADD(at[19], at[125]); MULADD(at[20], at[124]); MULADD(at[21], at[123]); MULADD(at[22], at[122]); MULADD(at[23], at[121]); MULADD(at[24], at[120]); MULADD(at[25], at[119]); MULADD(at[26], at[118]); MULADD(at[27], at[117]); MULADD(at[28], at[116]); MULADD(at[29], at[115]); MULADD(at[30], at[114]); MULADD(at[31], at[113]); MULADD(at[32], at[112]); MULADD(at[33], at[111]); MULADD(at[34], at[110]); MULADD(at[35], at[109]); MULADD(at[36], at[108]); MULADD(at[37], at[107]); MULADD(at[38], at[106]); MULADD(at[39], at[105]); MULADD(at[40], at[104]); MULADD(at[41], at[103]); MULADD(at[42], at[102]); MULADD(at[43], at[101]); MULADD(at[44], at[100]); MULADD(at[45], at[99]); MULADD(at[46], at[98]); MULADD(at[47], at[97]); MULADD(at[48], at[96]); MULADD(at[49], at[95]); MULADD(at[50], at[94]); MULADD(at[51], at[93]); MULADD(at[52], at[92]); MULADD(at[53], at[91]); MULADD(at[54], at[90]); MULADD(at[55], at[89]); MULADD(at[56], at[88]); MULADD(at[57], at[87]); MULADD(at[58], at[86]); MULADD(at[59], at[85]); MULADD(at[60], at[84]); MULADD(at[61], at[83]); MULADD(at[62], at[82]); MULADD(at[63], at[81]); + COMBA_STORE(C->dp[80]); + /* 81 */ + COMBA_FORWARD; + MULADD(at[18], at[127]); MULADD(at[19], at[126]); MULADD(at[20], at[125]); MULADD(at[21], at[124]); MULADD(at[22], at[123]); MULADD(at[23], at[122]); MULADD(at[24], at[121]); MULADD(at[25], at[120]); MULADD(at[26], at[119]); MULADD(at[27], at[118]); MULADD(at[28], at[117]); MULADD(at[29], at[116]); MULADD(at[30], at[115]); MULADD(at[31], at[114]); MULADD(at[32], at[113]); MULADD(at[33], at[112]); MULADD(at[34], at[111]); MULADD(at[35], at[110]); MULADD(at[36], at[109]); MULADD(at[37], at[108]); MULADD(at[38], at[107]); MULADD(at[39], at[106]); MULADD(at[40], at[105]); MULADD(at[41], at[104]); MULADD(at[42], at[103]); MULADD(at[43], at[102]); MULADD(at[44], at[101]); MULADD(at[45], at[100]); MULADD(at[46], at[99]); MULADD(at[47], at[98]); MULADD(at[48], at[97]); MULADD(at[49], at[96]); MULADD(at[50], at[95]); MULADD(at[51], at[94]); MULADD(at[52], at[93]); MULADD(at[53], at[92]); MULADD(at[54], at[91]); MULADD(at[55], at[90]); MULADD(at[56], at[89]); MULADD(at[57], at[88]); MULADD(at[58], at[87]); MULADD(at[59], at[86]); MULADD(at[60], at[85]); MULADD(at[61], at[84]); MULADD(at[62], at[83]); MULADD(at[63], at[82]); + COMBA_STORE(C->dp[81]); + /* 82 */ + COMBA_FORWARD; + MULADD(at[19], at[127]); MULADD(at[20], at[126]); MULADD(at[21], at[125]); MULADD(at[22], at[124]); MULADD(at[23], at[123]); MULADD(at[24], at[122]); MULADD(at[25], at[121]); MULADD(at[26], at[120]); MULADD(at[27], at[119]); MULADD(at[28], at[118]); MULADD(at[29], at[117]); MULADD(at[30], at[116]); MULADD(at[31], at[115]); MULADD(at[32], at[114]); MULADD(at[33], at[113]); MULADD(at[34], at[112]); MULADD(at[35], at[111]); MULADD(at[36], at[110]); MULADD(at[37], at[109]); MULADD(at[38], at[108]); MULADD(at[39], at[107]); MULADD(at[40], at[106]); MULADD(at[41], at[105]); MULADD(at[42], at[104]); MULADD(at[43], at[103]); MULADD(at[44], at[102]); MULADD(at[45], at[101]); MULADD(at[46], at[100]); MULADD(at[47], at[99]); MULADD(at[48], at[98]); MULADD(at[49], at[97]); MULADD(at[50], at[96]); MULADD(at[51], at[95]); MULADD(at[52], at[94]); MULADD(at[53], at[93]); MULADD(at[54], at[92]); MULADD(at[55], at[91]); MULADD(at[56], at[90]); MULADD(at[57], at[89]); MULADD(at[58], at[88]); MULADD(at[59], at[87]); MULADD(at[60], at[86]); MULADD(at[61], at[85]); MULADD(at[62], at[84]); MULADD(at[63], at[83]); + COMBA_STORE(C->dp[82]); + /* 83 */ + COMBA_FORWARD; + MULADD(at[20], at[127]); MULADD(at[21], at[126]); MULADD(at[22], at[125]); MULADD(at[23], at[124]); MULADD(at[24], at[123]); MULADD(at[25], at[122]); MULADD(at[26], at[121]); MULADD(at[27], at[120]); MULADD(at[28], at[119]); MULADD(at[29], at[118]); MULADD(at[30], at[117]); MULADD(at[31], at[116]); MULADD(at[32], at[115]); MULADD(at[33], at[114]); MULADD(at[34], at[113]); MULADD(at[35], at[112]); MULADD(at[36], at[111]); MULADD(at[37], at[110]); MULADD(at[38], at[109]); MULADD(at[39], at[108]); MULADD(at[40], at[107]); MULADD(at[41], at[106]); MULADD(at[42], at[105]); MULADD(at[43], at[104]); MULADD(at[44], at[103]); MULADD(at[45], at[102]); MULADD(at[46], at[101]); MULADD(at[47], at[100]); MULADD(at[48], at[99]); MULADD(at[49], at[98]); MULADD(at[50], at[97]); MULADD(at[51], at[96]); MULADD(at[52], at[95]); MULADD(at[53], at[94]); MULADD(at[54], at[93]); MULADD(at[55], at[92]); MULADD(at[56], at[91]); MULADD(at[57], at[90]); MULADD(at[58], at[89]); MULADD(at[59], at[88]); MULADD(at[60], at[87]); MULADD(at[61], at[86]); MULADD(at[62], at[85]); MULADD(at[63], at[84]); + COMBA_STORE(C->dp[83]); + /* 84 */ + COMBA_FORWARD; + MULADD(at[21], at[127]); MULADD(at[22], at[126]); MULADD(at[23], at[125]); MULADD(at[24], at[124]); MULADD(at[25], at[123]); MULADD(at[26], at[122]); MULADD(at[27], at[121]); MULADD(at[28], at[120]); MULADD(at[29], at[119]); MULADD(at[30], at[118]); MULADD(at[31], at[117]); MULADD(at[32], at[116]); MULADD(at[33], at[115]); MULADD(at[34], at[114]); MULADD(at[35], at[113]); MULADD(at[36], at[112]); MULADD(at[37], at[111]); MULADD(at[38], at[110]); MULADD(at[39], at[109]); MULADD(at[40], at[108]); MULADD(at[41], at[107]); MULADD(at[42], at[106]); MULADD(at[43], at[105]); MULADD(at[44], at[104]); MULADD(at[45], at[103]); MULADD(at[46], at[102]); MULADD(at[47], at[101]); MULADD(at[48], at[100]); MULADD(at[49], at[99]); MULADD(at[50], at[98]); MULADD(at[51], at[97]); MULADD(at[52], at[96]); MULADD(at[53], at[95]); MULADD(at[54], at[94]); MULADD(at[55], at[93]); MULADD(at[56], at[92]); MULADD(at[57], at[91]); MULADD(at[58], at[90]); MULADD(at[59], at[89]); MULADD(at[60], at[88]); MULADD(at[61], at[87]); MULADD(at[62], at[86]); MULADD(at[63], at[85]); + COMBA_STORE(C->dp[84]); + /* 85 */ + COMBA_FORWARD; + MULADD(at[22], at[127]); MULADD(at[23], at[126]); MULADD(at[24], at[125]); MULADD(at[25], at[124]); MULADD(at[26], at[123]); MULADD(at[27], at[122]); MULADD(at[28], at[121]); MULADD(at[29], at[120]); MULADD(at[30], at[119]); MULADD(at[31], at[118]); MULADD(at[32], at[117]); MULADD(at[33], at[116]); MULADD(at[34], at[115]); MULADD(at[35], at[114]); MULADD(at[36], at[113]); MULADD(at[37], at[112]); MULADD(at[38], at[111]); MULADD(at[39], at[110]); MULADD(at[40], at[109]); MULADD(at[41], at[108]); MULADD(at[42], at[107]); MULADD(at[43], at[106]); MULADD(at[44], at[105]); MULADD(at[45], at[104]); MULADD(at[46], at[103]); MULADD(at[47], at[102]); MULADD(at[48], at[101]); MULADD(at[49], at[100]); MULADD(at[50], at[99]); MULADD(at[51], at[98]); MULADD(at[52], at[97]); MULADD(at[53], at[96]); MULADD(at[54], at[95]); MULADD(at[55], at[94]); MULADD(at[56], at[93]); MULADD(at[57], at[92]); MULADD(at[58], at[91]); MULADD(at[59], at[90]); MULADD(at[60], at[89]); MULADD(at[61], at[88]); MULADD(at[62], at[87]); MULADD(at[63], at[86]); + COMBA_STORE(C->dp[85]); + /* 86 */ + COMBA_FORWARD; + MULADD(at[23], at[127]); MULADD(at[24], at[126]); MULADD(at[25], at[125]); MULADD(at[26], at[124]); MULADD(at[27], at[123]); MULADD(at[28], at[122]); MULADD(at[29], at[121]); MULADD(at[30], at[120]); MULADD(at[31], at[119]); MULADD(at[32], at[118]); MULADD(at[33], at[117]); MULADD(at[34], at[116]); MULADD(at[35], at[115]); MULADD(at[36], at[114]); MULADD(at[37], at[113]); MULADD(at[38], at[112]); MULADD(at[39], at[111]); MULADD(at[40], at[110]); MULADD(at[41], at[109]); MULADD(at[42], at[108]); MULADD(at[43], at[107]); MULADD(at[44], at[106]); MULADD(at[45], at[105]); MULADD(at[46], at[104]); MULADD(at[47], at[103]); MULADD(at[48], at[102]); MULADD(at[49], at[101]); MULADD(at[50], at[100]); MULADD(at[51], at[99]); MULADD(at[52], at[98]); MULADD(at[53], at[97]); MULADD(at[54], at[96]); MULADD(at[55], at[95]); MULADD(at[56], at[94]); MULADD(at[57], at[93]); MULADD(at[58], at[92]); MULADD(at[59], at[91]); MULADD(at[60], at[90]); MULADD(at[61], at[89]); MULADD(at[62], at[88]); MULADD(at[63], at[87]); + COMBA_STORE(C->dp[86]); + /* 87 */ + COMBA_FORWARD; + MULADD(at[24], at[127]); MULADD(at[25], at[126]); MULADD(at[26], at[125]); MULADD(at[27], at[124]); MULADD(at[28], at[123]); MULADD(at[29], at[122]); MULADD(at[30], at[121]); MULADD(at[31], at[120]); MULADD(at[32], at[119]); MULADD(at[33], at[118]); MULADD(at[34], at[117]); MULADD(at[35], at[116]); MULADD(at[36], at[115]); MULADD(at[37], at[114]); MULADD(at[38], at[113]); MULADD(at[39], at[112]); MULADD(at[40], at[111]); MULADD(at[41], at[110]); MULADD(at[42], at[109]); MULADD(at[43], at[108]); MULADD(at[44], at[107]); MULADD(at[45], at[106]); MULADD(at[46], at[105]); MULADD(at[47], at[104]); MULADD(at[48], at[103]); MULADD(at[49], at[102]); MULADD(at[50], at[101]); MULADD(at[51], at[100]); MULADD(at[52], at[99]); MULADD(at[53], at[98]); MULADD(at[54], at[97]); MULADD(at[55], at[96]); MULADD(at[56], at[95]); MULADD(at[57], at[94]); MULADD(at[58], at[93]); MULADD(at[59], at[92]); MULADD(at[60], at[91]); MULADD(at[61], at[90]); MULADD(at[62], at[89]); MULADD(at[63], at[88]); + COMBA_STORE(C->dp[87]); + /* 88 */ + COMBA_FORWARD; + MULADD(at[25], at[127]); MULADD(at[26], at[126]); MULADD(at[27], at[125]); MULADD(at[28], at[124]); MULADD(at[29], at[123]); MULADD(at[30], at[122]); MULADD(at[31], at[121]); MULADD(at[32], at[120]); MULADD(at[33], at[119]); MULADD(at[34], at[118]); MULADD(at[35], at[117]); MULADD(at[36], at[116]); MULADD(at[37], at[115]); MULADD(at[38], at[114]); MULADD(at[39], at[113]); MULADD(at[40], at[112]); MULADD(at[41], at[111]); MULADD(at[42], at[110]); MULADD(at[43], at[109]); MULADD(at[44], at[108]); MULADD(at[45], at[107]); MULADD(at[46], at[106]); MULADD(at[47], at[105]); MULADD(at[48], at[104]); MULADD(at[49], at[103]); MULADD(at[50], at[102]); MULADD(at[51], at[101]); MULADD(at[52], at[100]); MULADD(at[53], at[99]); MULADD(at[54], at[98]); MULADD(at[55], at[97]); MULADD(at[56], at[96]); MULADD(at[57], at[95]); MULADD(at[58], at[94]); MULADD(at[59], at[93]); MULADD(at[60], at[92]); MULADD(at[61], at[91]); MULADD(at[62], at[90]); MULADD(at[63], at[89]); + COMBA_STORE(C->dp[88]); + /* 89 */ + COMBA_FORWARD; + MULADD(at[26], at[127]); MULADD(at[27], at[126]); MULADD(at[28], at[125]); MULADD(at[29], at[124]); MULADD(at[30], at[123]); MULADD(at[31], at[122]); MULADD(at[32], at[121]); MULADD(at[33], at[120]); MULADD(at[34], at[119]); MULADD(at[35], at[118]); MULADD(at[36], at[117]); MULADD(at[37], at[116]); MULADD(at[38], at[115]); MULADD(at[39], at[114]); MULADD(at[40], at[113]); MULADD(at[41], at[112]); MULADD(at[42], at[111]); MULADD(at[43], at[110]); MULADD(at[44], at[109]); MULADD(at[45], at[108]); MULADD(at[46], at[107]); MULADD(at[47], at[106]); MULADD(at[48], at[105]); MULADD(at[49], at[104]); MULADD(at[50], at[103]); MULADD(at[51], at[102]); MULADD(at[52], at[101]); MULADD(at[53], at[100]); MULADD(at[54], at[99]); MULADD(at[55], at[98]); MULADD(at[56], at[97]); MULADD(at[57], at[96]); MULADD(at[58], at[95]); MULADD(at[59], at[94]); MULADD(at[60], at[93]); MULADD(at[61], at[92]); MULADD(at[62], at[91]); MULADD(at[63], at[90]); + COMBA_STORE(C->dp[89]); + /* 90 */ + COMBA_FORWARD; + MULADD(at[27], at[127]); MULADD(at[28], at[126]); MULADD(at[29], at[125]); MULADD(at[30], at[124]); MULADD(at[31], at[123]); MULADD(at[32], at[122]); MULADD(at[33], at[121]); MULADD(at[34], at[120]); MULADD(at[35], at[119]); MULADD(at[36], at[118]); MULADD(at[37], at[117]); MULADD(at[38], at[116]); MULADD(at[39], at[115]); MULADD(at[40], at[114]); MULADD(at[41], at[113]); MULADD(at[42], at[112]); MULADD(at[43], at[111]); MULADD(at[44], at[110]); MULADD(at[45], at[109]); MULADD(at[46], at[108]); MULADD(at[47], at[107]); MULADD(at[48], at[106]); MULADD(at[49], at[105]); MULADD(at[50], at[104]); MULADD(at[51], at[103]); MULADD(at[52], at[102]); MULADD(at[53], at[101]); MULADD(at[54], at[100]); MULADD(at[55], at[99]); MULADD(at[56], at[98]); MULADD(at[57], at[97]); MULADD(at[58], at[96]); MULADD(at[59], at[95]); MULADD(at[60], at[94]); MULADD(at[61], at[93]); MULADD(at[62], at[92]); MULADD(at[63], at[91]); + COMBA_STORE(C->dp[90]); + /* 91 */ + COMBA_FORWARD; + MULADD(at[28], at[127]); MULADD(at[29], at[126]); MULADD(at[30], at[125]); MULADD(at[31], at[124]); MULADD(at[32], at[123]); MULADD(at[33], at[122]); MULADD(at[34], at[121]); MULADD(at[35], at[120]); MULADD(at[36], at[119]); MULADD(at[37], at[118]); MULADD(at[38], at[117]); MULADD(at[39], at[116]); MULADD(at[40], at[115]); MULADD(at[41], at[114]); MULADD(at[42], at[113]); MULADD(at[43], at[112]); MULADD(at[44], at[111]); MULADD(at[45], at[110]); MULADD(at[46], at[109]); MULADD(at[47], at[108]); MULADD(at[48], at[107]); MULADD(at[49], at[106]); MULADD(at[50], at[105]); MULADD(at[51], at[104]); MULADD(at[52], at[103]); MULADD(at[53], at[102]); MULADD(at[54], at[101]); MULADD(at[55], at[100]); MULADD(at[56], at[99]); MULADD(at[57], at[98]); MULADD(at[58], at[97]); MULADD(at[59], at[96]); MULADD(at[60], at[95]); MULADD(at[61], at[94]); MULADD(at[62], at[93]); MULADD(at[63], at[92]); + COMBA_STORE(C->dp[91]); + /* 92 */ + COMBA_FORWARD; + MULADD(at[29], at[127]); MULADD(at[30], at[126]); MULADD(at[31], at[125]); MULADD(at[32], at[124]); MULADD(at[33], at[123]); MULADD(at[34], at[122]); MULADD(at[35], at[121]); MULADD(at[36], at[120]); MULADD(at[37], at[119]); MULADD(at[38], at[118]); MULADD(at[39], at[117]); MULADD(at[40], at[116]); MULADD(at[41], at[115]); MULADD(at[42], at[114]); MULADD(at[43], at[113]); MULADD(at[44], at[112]); MULADD(at[45], at[111]); MULADD(at[46], at[110]); MULADD(at[47], at[109]); MULADD(at[48], at[108]); MULADD(at[49], at[107]); MULADD(at[50], at[106]); MULADD(at[51], at[105]); MULADD(at[52], at[104]); MULADD(at[53], at[103]); MULADD(at[54], at[102]); MULADD(at[55], at[101]); MULADD(at[56], at[100]); MULADD(at[57], at[99]); MULADD(at[58], at[98]); MULADD(at[59], at[97]); MULADD(at[60], at[96]); MULADD(at[61], at[95]); MULADD(at[62], at[94]); MULADD(at[63], at[93]); + COMBA_STORE(C->dp[92]); + /* 93 */ + COMBA_FORWARD; + MULADD(at[30], at[127]); MULADD(at[31], at[126]); MULADD(at[32], at[125]); MULADD(at[33], at[124]); MULADD(at[34], at[123]); MULADD(at[35], at[122]); MULADD(at[36], at[121]); MULADD(at[37], at[120]); MULADD(at[38], at[119]); MULADD(at[39], at[118]); MULADD(at[40], at[117]); MULADD(at[41], at[116]); MULADD(at[42], at[115]); MULADD(at[43], at[114]); MULADD(at[44], at[113]); MULADD(at[45], at[112]); MULADD(at[46], at[111]); MULADD(at[47], at[110]); MULADD(at[48], at[109]); MULADD(at[49], at[108]); MULADD(at[50], at[107]); MULADD(at[51], at[106]); MULADD(at[52], at[105]); MULADD(at[53], at[104]); MULADD(at[54], at[103]); MULADD(at[55], at[102]); MULADD(at[56], at[101]); MULADD(at[57], at[100]); MULADD(at[58], at[99]); MULADD(at[59], at[98]); MULADD(at[60], at[97]); MULADD(at[61], at[96]); MULADD(at[62], at[95]); MULADD(at[63], at[94]); + COMBA_STORE(C->dp[93]); + /* 94 */ + COMBA_FORWARD; + MULADD(at[31], at[127]); MULADD(at[32], at[126]); MULADD(at[33], at[125]); MULADD(at[34], at[124]); MULADD(at[35], at[123]); MULADD(at[36], at[122]); MULADD(at[37], at[121]); MULADD(at[38], at[120]); MULADD(at[39], at[119]); MULADD(at[40], at[118]); MULADD(at[41], at[117]); MULADD(at[42], at[116]); MULADD(at[43], at[115]); MULADD(at[44], at[114]); MULADD(at[45], at[113]); MULADD(at[46], at[112]); MULADD(at[47], at[111]); MULADD(at[48], at[110]); MULADD(at[49], at[109]); MULADD(at[50], at[108]); MULADD(at[51], at[107]); MULADD(at[52], at[106]); MULADD(at[53], at[105]); MULADD(at[54], at[104]); MULADD(at[55], at[103]); MULADD(at[56], at[102]); MULADD(at[57], at[101]); MULADD(at[58], at[100]); MULADD(at[59], at[99]); MULADD(at[60], at[98]); MULADD(at[61], at[97]); MULADD(at[62], at[96]); MULADD(at[63], at[95]); + COMBA_STORE(C->dp[94]); + /* 95 */ + COMBA_FORWARD; + MULADD(at[32], at[127]); MULADD(at[33], at[126]); MULADD(at[34], at[125]); MULADD(at[35], at[124]); MULADD(at[36], at[123]); MULADD(at[37], at[122]); MULADD(at[38], at[121]); MULADD(at[39], at[120]); MULADD(at[40], at[119]); MULADD(at[41], at[118]); MULADD(at[42], at[117]); MULADD(at[43], at[116]); MULADD(at[44], at[115]); MULADD(at[45], at[114]); MULADD(at[46], at[113]); MULADD(at[47], at[112]); MULADD(at[48], at[111]); MULADD(at[49], at[110]); MULADD(at[50], at[109]); MULADD(at[51], at[108]); MULADD(at[52], at[107]); MULADD(at[53], at[106]); MULADD(at[54], at[105]); MULADD(at[55], at[104]); MULADD(at[56], at[103]); MULADD(at[57], at[102]); MULADD(at[58], at[101]); MULADD(at[59], at[100]); MULADD(at[60], at[99]); MULADD(at[61], at[98]); MULADD(at[62], at[97]); MULADD(at[63], at[96]); + COMBA_STORE(C->dp[95]); + /* 96 */ + COMBA_FORWARD; + MULADD(at[33], at[127]); MULADD(at[34], at[126]); MULADD(at[35], at[125]); MULADD(at[36], at[124]); MULADD(at[37], at[123]); MULADD(at[38], at[122]); MULADD(at[39], at[121]); MULADD(at[40], at[120]); MULADD(at[41], at[119]); MULADD(at[42], at[118]); MULADD(at[43], at[117]); MULADD(at[44], at[116]); MULADD(at[45], at[115]); MULADD(at[46], at[114]); MULADD(at[47], at[113]); MULADD(at[48], at[112]); MULADD(at[49], at[111]); MULADD(at[50], at[110]); MULADD(at[51], at[109]); MULADD(at[52], at[108]); MULADD(at[53], at[107]); MULADD(at[54], at[106]); MULADD(at[55], at[105]); MULADD(at[56], at[104]); MULADD(at[57], at[103]); MULADD(at[58], at[102]); MULADD(at[59], at[101]); MULADD(at[60], at[100]); MULADD(at[61], at[99]); MULADD(at[62], at[98]); MULADD(at[63], at[97]); + COMBA_STORE(C->dp[96]); + /* 97 */ + COMBA_FORWARD; + MULADD(at[34], at[127]); MULADD(at[35], at[126]); MULADD(at[36], at[125]); MULADD(at[37], at[124]); MULADD(at[38], at[123]); MULADD(at[39], at[122]); MULADD(at[40], at[121]); MULADD(at[41], at[120]); MULADD(at[42], at[119]); MULADD(at[43], at[118]); MULADD(at[44], at[117]); MULADD(at[45], at[116]); MULADD(at[46], at[115]); MULADD(at[47], at[114]); MULADD(at[48], at[113]); MULADD(at[49], at[112]); MULADD(at[50], at[111]); MULADD(at[51], at[110]); MULADD(at[52], at[109]); MULADD(at[53], at[108]); MULADD(at[54], at[107]); MULADD(at[55], at[106]); MULADD(at[56], at[105]); MULADD(at[57], at[104]); MULADD(at[58], at[103]); MULADD(at[59], at[102]); MULADD(at[60], at[101]); MULADD(at[61], at[100]); MULADD(at[62], at[99]); MULADD(at[63], at[98]); + COMBA_STORE(C->dp[97]); + /* 98 */ + COMBA_FORWARD; + MULADD(at[35], at[127]); MULADD(at[36], at[126]); MULADD(at[37], at[125]); MULADD(at[38], at[124]); MULADD(at[39], at[123]); MULADD(at[40], at[122]); MULADD(at[41], at[121]); MULADD(at[42], at[120]); MULADD(at[43], at[119]); MULADD(at[44], at[118]); MULADD(at[45], at[117]); MULADD(at[46], at[116]); MULADD(at[47], at[115]); MULADD(at[48], at[114]); MULADD(at[49], at[113]); MULADD(at[50], at[112]); MULADD(at[51], at[111]); MULADD(at[52], at[110]); MULADD(at[53], at[109]); MULADD(at[54], at[108]); MULADD(at[55], at[107]); MULADD(at[56], at[106]); MULADD(at[57], at[105]); MULADD(at[58], at[104]); MULADD(at[59], at[103]); MULADD(at[60], at[102]); MULADD(at[61], at[101]); MULADD(at[62], at[100]); MULADD(at[63], at[99]); + COMBA_STORE(C->dp[98]); + /* 99 */ + COMBA_FORWARD; + MULADD(at[36], at[127]); MULADD(at[37], at[126]); MULADD(at[38], at[125]); MULADD(at[39], at[124]); MULADD(at[40], at[123]); MULADD(at[41], at[122]); MULADD(at[42], at[121]); MULADD(at[43], at[120]); MULADD(at[44], at[119]); MULADD(at[45], at[118]); MULADD(at[46], at[117]); MULADD(at[47], at[116]); MULADD(at[48], at[115]); MULADD(at[49], at[114]); MULADD(at[50], at[113]); MULADD(at[51], at[112]); MULADD(at[52], at[111]); MULADD(at[53], at[110]); MULADD(at[54], at[109]); MULADD(at[55], at[108]); MULADD(at[56], at[107]); MULADD(at[57], at[106]); MULADD(at[58], at[105]); MULADD(at[59], at[104]); MULADD(at[60], at[103]); MULADD(at[61], at[102]); MULADD(at[62], at[101]); MULADD(at[63], at[100]); + COMBA_STORE(C->dp[99]); + /* 100 */ + COMBA_FORWARD; + MULADD(at[37], at[127]); MULADD(at[38], at[126]); MULADD(at[39], at[125]); MULADD(at[40], at[124]); MULADD(at[41], at[123]); MULADD(at[42], at[122]); MULADD(at[43], at[121]); MULADD(at[44], at[120]); MULADD(at[45], at[119]); MULADD(at[46], at[118]); MULADD(at[47], at[117]); MULADD(at[48], at[116]); MULADD(at[49], at[115]); MULADD(at[50], at[114]); MULADD(at[51], at[113]); MULADD(at[52], at[112]); MULADD(at[53], at[111]); MULADD(at[54], at[110]); MULADD(at[55], at[109]); MULADD(at[56], at[108]); MULADD(at[57], at[107]); MULADD(at[58], at[106]); MULADD(at[59], at[105]); MULADD(at[60], at[104]); MULADD(at[61], at[103]); MULADD(at[62], at[102]); MULADD(at[63], at[101]); + COMBA_STORE(C->dp[100]); + /* 101 */ + COMBA_FORWARD; + MULADD(at[38], at[127]); MULADD(at[39], at[126]); MULADD(at[40], at[125]); MULADD(at[41], at[124]); MULADD(at[42], at[123]); MULADD(at[43], at[122]); MULADD(at[44], at[121]); MULADD(at[45], at[120]); MULADD(at[46], at[119]); MULADD(at[47], at[118]); MULADD(at[48], at[117]); MULADD(at[49], at[116]); MULADD(at[50], at[115]); MULADD(at[51], at[114]); MULADD(at[52], at[113]); MULADD(at[53], at[112]); MULADD(at[54], at[111]); MULADD(at[55], at[110]); MULADD(at[56], at[109]); MULADD(at[57], at[108]); MULADD(at[58], at[107]); MULADD(at[59], at[106]); MULADD(at[60], at[105]); MULADD(at[61], at[104]); MULADD(at[62], at[103]); MULADD(at[63], at[102]); + COMBA_STORE(C->dp[101]); + /* 102 */ + COMBA_FORWARD; + MULADD(at[39], at[127]); MULADD(at[40], at[126]); MULADD(at[41], at[125]); MULADD(at[42], at[124]); MULADD(at[43], at[123]); MULADD(at[44], at[122]); MULADD(at[45], at[121]); MULADD(at[46], at[120]); MULADD(at[47], at[119]); MULADD(at[48], at[118]); MULADD(at[49], at[117]); MULADD(at[50], at[116]); MULADD(at[51], at[115]); MULADD(at[52], at[114]); MULADD(at[53], at[113]); MULADD(at[54], at[112]); MULADD(at[55], at[111]); MULADD(at[56], at[110]); MULADD(at[57], at[109]); MULADD(at[58], at[108]); MULADD(at[59], at[107]); MULADD(at[60], at[106]); MULADD(at[61], at[105]); MULADD(at[62], at[104]); MULADD(at[63], at[103]); + COMBA_STORE(C->dp[102]); + /* 103 */ + COMBA_FORWARD; + MULADD(at[40], at[127]); MULADD(at[41], at[126]); MULADD(at[42], at[125]); MULADD(at[43], at[124]); MULADD(at[44], at[123]); MULADD(at[45], at[122]); MULADD(at[46], at[121]); MULADD(at[47], at[120]); MULADD(at[48], at[119]); MULADD(at[49], at[118]); MULADD(at[50], at[117]); MULADD(at[51], at[116]); MULADD(at[52], at[115]); MULADD(at[53], at[114]); MULADD(at[54], at[113]); MULADD(at[55], at[112]); MULADD(at[56], at[111]); MULADD(at[57], at[110]); MULADD(at[58], at[109]); MULADD(at[59], at[108]); MULADD(at[60], at[107]); MULADD(at[61], at[106]); MULADD(at[62], at[105]); MULADD(at[63], at[104]); + COMBA_STORE(C->dp[103]); + /* 104 */ + COMBA_FORWARD; + MULADD(at[41], at[127]); MULADD(at[42], at[126]); MULADD(at[43], at[125]); MULADD(at[44], at[124]); MULADD(at[45], at[123]); MULADD(at[46], at[122]); MULADD(at[47], at[121]); MULADD(at[48], at[120]); MULADD(at[49], at[119]); MULADD(at[50], at[118]); MULADD(at[51], at[117]); MULADD(at[52], at[116]); MULADD(at[53], at[115]); MULADD(at[54], at[114]); MULADD(at[55], at[113]); MULADD(at[56], at[112]); MULADD(at[57], at[111]); MULADD(at[58], at[110]); MULADD(at[59], at[109]); MULADD(at[60], at[108]); MULADD(at[61], at[107]); MULADD(at[62], at[106]); MULADD(at[63], at[105]); + COMBA_STORE(C->dp[104]); + /* 105 */ + COMBA_FORWARD; + MULADD(at[42], at[127]); MULADD(at[43], at[126]); MULADD(at[44], at[125]); MULADD(at[45], at[124]); MULADD(at[46], at[123]); MULADD(at[47], at[122]); MULADD(at[48], at[121]); MULADD(at[49], at[120]); MULADD(at[50], at[119]); MULADD(at[51], at[118]); MULADD(at[52], at[117]); MULADD(at[53], at[116]); MULADD(at[54], at[115]); MULADD(at[55], at[114]); MULADD(at[56], at[113]); MULADD(at[57], at[112]); MULADD(at[58], at[111]); MULADD(at[59], at[110]); MULADD(at[60], at[109]); MULADD(at[61], at[108]); MULADD(at[62], at[107]); MULADD(at[63], at[106]); + COMBA_STORE(C->dp[105]); + /* 106 */ + COMBA_FORWARD; + MULADD(at[43], at[127]); MULADD(at[44], at[126]); MULADD(at[45], at[125]); MULADD(at[46], at[124]); MULADD(at[47], at[123]); MULADD(at[48], at[122]); MULADD(at[49], at[121]); MULADD(at[50], at[120]); MULADD(at[51], at[119]); MULADD(at[52], at[118]); MULADD(at[53], at[117]); MULADD(at[54], at[116]); MULADD(at[55], at[115]); MULADD(at[56], at[114]); MULADD(at[57], at[113]); MULADD(at[58], at[112]); MULADD(at[59], at[111]); MULADD(at[60], at[110]); MULADD(at[61], at[109]); MULADD(at[62], at[108]); MULADD(at[63], at[107]); + COMBA_STORE(C->dp[106]); + /* 107 */ + COMBA_FORWARD; + MULADD(at[44], at[127]); MULADD(at[45], at[126]); MULADD(at[46], at[125]); MULADD(at[47], at[124]); MULADD(at[48], at[123]); MULADD(at[49], at[122]); MULADD(at[50], at[121]); MULADD(at[51], at[120]); MULADD(at[52], at[119]); MULADD(at[53], at[118]); MULADD(at[54], at[117]); MULADD(at[55], at[116]); MULADD(at[56], at[115]); MULADD(at[57], at[114]); MULADD(at[58], at[113]); MULADD(at[59], at[112]); MULADD(at[60], at[111]); MULADD(at[61], at[110]); MULADD(at[62], at[109]); MULADD(at[63], at[108]); + COMBA_STORE(C->dp[107]); + /* 108 */ + COMBA_FORWARD; + MULADD(at[45], at[127]); MULADD(at[46], at[126]); MULADD(at[47], at[125]); MULADD(at[48], at[124]); MULADD(at[49], at[123]); MULADD(at[50], at[122]); MULADD(at[51], at[121]); MULADD(at[52], at[120]); MULADD(at[53], at[119]); MULADD(at[54], at[118]); MULADD(at[55], at[117]); MULADD(at[56], at[116]); MULADD(at[57], at[115]); MULADD(at[58], at[114]); MULADD(at[59], at[113]); MULADD(at[60], at[112]); MULADD(at[61], at[111]); MULADD(at[62], at[110]); MULADD(at[63], at[109]); + COMBA_STORE(C->dp[108]); + /* 109 */ + COMBA_FORWARD; + MULADD(at[46], at[127]); MULADD(at[47], at[126]); MULADD(at[48], at[125]); MULADD(at[49], at[124]); MULADD(at[50], at[123]); MULADD(at[51], at[122]); MULADD(at[52], at[121]); MULADD(at[53], at[120]); MULADD(at[54], at[119]); MULADD(at[55], at[118]); MULADD(at[56], at[117]); MULADD(at[57], at[116]); MULADD(at[58], at[115]); MULADD(at[59], at[114]); MULADD(at[60], at[113]); MULADD(at[61], at[112]); MULADD(at[62], at[111]); MULADD(at[63], at[110]); + COMBA_STORE(C->dp[109]); + /* 110 */ + COMBA_FORWARD; + MULADD(at[47], at[127]); MULADD(at[48], at[126]); MULADD(at[49], at[125]); MULADD(at[50], at[124]); MULADD(at[51], at[123]); MULADD(at[52], at[122]); MULADD(at[53], at[121]); MULADD(at[54], at[120]); MULADD(at[55], at[119]); MULADD(at[56], at[118]); MULADD(at[57], at[117]); MULADD(at[58], at[116]); MULADD(at[59], at[115]); MULADD(at[60], at[114]); MULADD(at[61], at[113]); MULADD(at[62], at[112]); MULADD(at[63], at[111]); + COMBA_STORE(C->dp[110]); + /* 111 */ + COMBA_FORWARD; + MULADD(at[48], at[127]); MULADD(at[49], at[126]); MULADD(at[50], at[125]); MULADD(at[51], at[124]); MULADD(at[52], at[123]); MULADD(at[53], at[122]); MULADD(at[54], at[121]); MULADD(at[55], at[120]); MULADD(at[56], at[119]); MULADD(at[57], at[118]); MULADD(at[58], at[117]); MULADD(at[59], at[116]); MULADD(at[60], at[115]); MULADD(at[61], at[114]); MULADD(at[62], at[113]); MULADD(at[63], at[112]); + COMBA_STORE(C->dp[111]); + /* 112 */ + COMBA_FORWARD; + MULADD(at[49], at[127]); MULADD(at[50], at[126]); MULADD(at[51], at[125]); MULADD(at[52], at[124]); MULADD(at[53], at[123]); MULADD(at[54], at[122]); MULADD(at[55], at[121]); MULADD(at[56], at[120]); MULADD(at[57], at[119]); MULADD(at[58], at[118]); MULADD(at[59], at[117]); MULADD(at[60], at[116]); MULADD(at[61], at[115]); MULADD(at[62], at[114]); MULADD(at[63], at[113]); + COMBA_STORE(C->dp[112]); + /* 113 */ + COMBA_FORWARD; + MULADD(at[50], at[127]); MULADD(at[51], at[126]); MULADD(at[52], at[125]); MULADD(at[53], at[124]); MULADD(at[54], at[123]); MULADD(at[55], at[122]); MULADD(at[56], at[121]); MULADD(at[57], at[120]); MULADD(at[58], at[119]); MULADD(at[59], at[118]); MULADD(at[60], at[117]); MULADD(at[61], at[116]); MULADD(at[62], at[115]); MULADD(at[63], at[114]); + COMBA_STORE(C->dp[113]); + /* 114 */ + COMBA_FORWARD; + MULADD(at[51], at[127]); MULADD(at[52], at[126]); MULADD(at[53], at[125]); MULADD(at[54], at[124]); MULADD(at[55], at[123]); MULADD(at[56], at[122]); MULADD(at[57], at[121]); MULADD(at[58], at[120]); MULADD(at[59], at[119]); MULADD(at[60], at[118]); MULADD(at[61], at[117]); MULADD(at[62], at[116]); MULADD(at[63], at[115]); + COMBA_STORE(C->dp[114]); + /* 115 */ + COMBA_FORWARD; + MULADD(at[52], at[127]); MULADD(at[53], at[126]); MULADD(at[54], at[125]); MULADD(at[55], at[124]); MULADD(at[56], at[123]); MULADD(at[57], at[122]); MULADD(at[58], at[121]); MULADD(at[59], at[120]); MULADD(at[60], at[119]); MULADD(at[61], at[118]); MULADD(at[62], at[117]); MULADD(at[63], at[116]); + COMBA_STORE(C->dp[115]); + /* 116 */ + COMBA_FORWARD; + MULADD(at[53], at[127]); MULADD(at[54], at[126]); MULADD(at[55], at[125]); MULADD(at[56], at[124]); MULADD(at[57], at[123]); MULADD(at[58], at[122]); MULADD(at[59], at[121]); MULADD(at[60], at[120]); MULADD(at[61], at[119]); MULADD(at[62], at[118]); MULADD(at[63], at[117]); + COMBA_STORE(C->dp[116]); + /* 117 */ + COMBA_FORWARD; + MULADD(at[54], at[127]); MULADD(at[55], at[126]); MULADD(at[56], at[125]); MULADD(at[57], at[124]); MULADD(at[58], at[123]); MULADD(at[59], at[122]); MULADD(at[60], at[121]); MULADD(at[61], at[120]); MULADD(at[62], at[119]); MULADD(at[63], at[118]); + COMBA_STORE(C->dp[117]); + /* 118 */ + COMBA_FORWARD; + MULADD(at[55], at[127]); MULADD(at[56], at[126]); MULADD(at[57], at[125]); MULADD(at[58], at[124]); MULADD(at[59], at[123]); MULADD(at[60], at[122]); MULADD(at[61], at[121]); MULADD(at[62], at[120]); MULADD(at[63], at[119]); + COMBA_STORE(C->dp[118]); + /* 119 */ + COMBA_FORWARD; + MULADD(at[56], at[127]); MULADD(at[57], at[126]); MULADD(at[58], at[125]); MULADD(at[59], at[124]); MULADD(at[60], at[123]); MULADD(at[61], at[122]); MULADD(at[62], at[121]); MULADD(at[63], at[120]); + COMBA_STORE(C->dp[119]); + /* 120 */ + COMBA_FORWARD; + MULADD(at[57], at[127]); MULADD(at[58], at[126]); MULADD(at[59], at[125]); MULADD(at[60], at[124]); MULADD(at[61], at[123]); MULADD(at[62], at[122]); MULADD(at[63], at[121]); + COMBA_STORE(C->dp[120]); + /* 121 */ + COMBA_FORWARD; + MULADD(at[58], at[127]); MULADD(at[59], at[126]); MULADD(at[60], at[125]); MULADD(at[61], at[124]); MULADD(at[62], at[123]); MULADD(at[63], at[122]); + COMBA_STORE(C->dp[121]); + /* 122 */ + COMBA_FORWARD; + MULADD(at[59], at[127]); MULADD(at[60], at[126]); MULADD(at[61], at[125]); MULADD(at[62], at[124]); MULADD(at[63], at[123]); + COMBA_STORE(C->dp[122]); + /* 123 */ + COMBA_FORWARD; + MULADD(at[60], at[127]); MULADD(at[61], at[126]); MULADD(at[62], at[125]); MULADD(at[63], at[124]); + COMBA_STORE(C->dp[123]); + /* 124 */ + COMBA_FORWARD; + MULADD(at[61], at[127]); MULADD(at[62], at[126]); MULADD(at[63], at[125]); + COMBA_STORE(C->dp[124]); + /* 125 */ + COMBA_FORWARD; + MULADD(at[62], at[127]); MULADD(at[63], at[126]); + COMBA_STORE(C->dp[125]); + /* 126 */ + COMBA_FORWARD; + MULADD(at[63], at[127]); + COMBA_STORE(C->dp[126]); + COMBA_STORE2(C->dp[127]); + C->used = 128; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i new file mode 100644 index 00000000..22b2eec2 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i @@ -0,0 +1,90 @@ +/* fp_mul_comba_7.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL7 +void fp_mul_comba7(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[14]; + + memcpy(at, A->dp, 7 * sizeof(fp_digit)); + memcpy(at+7, B->dp, 7 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[7]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[8]); MULADD(at[1], at[7]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); MULADD(at[6], at[7]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[5], at[13]); MULADD(at[6], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[6], at[13]); + COMBA_STORE(C->dp[12]); + COMBA_STORE2(C->dp[13]); + C->used = 14; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i new file mode 100644 index 00000000..7847d111 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i @@ -0,0 +1,98 @@ +/* fp_mul_comba_8.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL8 +void fp_mul_comba8(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[16]; + + memcpy(at, A->dp, 8 * sizeof(fp_digit)); + memcpy(at+8, B->dp, 8 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[8]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); MULADD(at[7], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[6], at[15]); MULADD(at[7], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[7], at[15]); + COMBA_STORE(C->dp[14]); + COMBA_STORE2(C->dp[15]); + C->used = 16; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i new file mode 100644 index 00000000..598c281a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i @@ -0,0 +1,106 @@ +/* fp_mul_comba_9.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_MUL9 +void fp_mul_comba9(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[18]; + + memcpy(at, A->dp, 9 * sizeof(fp_digit)); + memcpy(at+9, B->dp, 9 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[9]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); MULADD(at[8], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[7], at[17]); MULADD(at[8], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[8], at[17]); + COMBA_STORE(C->dp[16]); + COMBA_STORE2(C->dp[17]); + C->used = 18; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; +} +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i new file mode 100644 index 00000000..64326c6b --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i @@ -0,0 +1,1250 @@ +/* fp_mul_comba_small_set.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#if defined(TFM_SMALL_SET) +void fp_mul_comba_small(fp_int *A, fp_int *B, fp_int *C) +{ + fp_digit c0, c1, c2, at[32]; + switch (MAX(A->used, B->used)) { + + case 1: + memcpy(at, A->dp, 1 * sizeof(fp_digit)); + memcpy(at+1, B->dp, 1 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[1]); + COMBA_STORE(C->dp[0]); + COMBA_STORE2(C->dp[1]); + C->used = 2; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 2: + memcpy(at, A->dp, 2 * sizeof(fp_digit)); + memcpy(at+2, B->dp, 2 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[2]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[3]); MULADD(at[1], at[2]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[1], at[3]); + COMBA_STORE(C->dp[2]); + COMBA_STORE2(C->dp[3]); + C->used = 4; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 3: + memcpy(at, A->dp, 3 * sizeof(fp_digit)); + memcpy(at+3, B->dp, 3 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[3]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[4]); MULADD(at[1], at[3]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[1], at[5]); MULADD(at[2], at[4]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[2], at[5]); + COMBA_STORE(C->dp[4]); + COMBA_STORE2(C->dp[5]); + C->used = 6; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 4: + memcpy(at, A->dp, 4 * sizeof(fp_digit)); + memcpy(at+4, B->dp, 4 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[4]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[5]); MULADD(at[1], at[4]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[2], at[7]); MULADD(at[3], at[6]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[3], at[7]); + COMBA_STORE(C->dp[6]); + COMBA_STORE2(C->dp[7]); + C->used = 8; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 5: + memcpy(at, A->dp, 5 * sizeof(fp_digit)); + memcpy(at+5, B->dp, 5 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[5]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[6]); MULADD(at[1], at[5]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); MULADD(at[4], at[5]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[3], at[9]); MULADD(at[4], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[4], at[9]); + COMBA_STORE(C->dp[8]); + COMBA_STORE2(C->dp[9]); + C->used = 10; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 6: + memcpy(at, A->dp, 6 * sizeof(fp_digit)); + memcpy(at+6, B->dp, 6 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[6]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[7]); MULADD(at[1], at[6]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); MULADD(at[5], at[6]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[4], at[11]); MULADD(at[5], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[5], at[11]); + COMBA_STORE(C->dp[10]); + COMBA_STORE2(C->dp[11]); + C->used = 12; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 7: + memcpy(at, A->dp, 7 * sizeof(fp_digit)); + memcpy(at+7, B->dp, 7 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[7]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[8]); MULADD(at[1], at[7]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); MULADD(at[6], at[7]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[5], at[13]); MULADD(at[6], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[6], at[13]); + COMBA_STORE(C->dp[12]); + COMBA_STORE2(C->dp[13]); + C->used = 14; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 8: + memcpy(at, A->dp, 8 * sizeof(fp_digit)); + memcpy(at+8, B->dp, 8 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[8]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[9]); MULADD(at[1], at[8]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); MULADD(at[7], at[8]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[6], at[15]); MULADD(at[7], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[7], at[15]); + COMBA_STORE(C->dp[14]); + COMBA_STORE2(C->dp[15]); + C->used = 16; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 9: + memcpy(at, A->dp, 9 * sizeof(fp_digit)); + memcpy(at+9, B->dp, 9 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[9]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[10]); MULADD(at[1], at[9]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); MULADD(at[8], at[9]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[7], at[17]); MULADD(at[8], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[8], at[17]); + COMBA_STORE(C->dp[16]); + COMBA_STORE2(C->dp[17]); + C->used = 18; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 10: + memcpy(at, A->dp, 10 * sizeof(fp_digit)); + memcpy(at+10, B->dp, 10 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[10]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[11]); MULADD(at[1], at[10]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); MULADD(at[9], at[10]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); MULADD(at[9], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[8], at[19]); MULADD(at[9], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[9], at[19]); + COMBA_STORE(C->dp[18]); + COMBA_STORE2(C->dp[19]); + C->used = 20; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 11: + memcpy(at, A->dp, 11 * sizeof(fp_digit)); + memcpy(at+11, B->dp, 11 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[11]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[12]); MULADD(at[1], at[11]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); MULADD(at[9], at[11]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); MULADD(at[10], at[11]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[9], at[21]); MULADD(at[10], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[10], at[21]); + COMBA_STORE(C->dp[20]); + COMBA_STORE2(C->dp[21]); + C->used = 22; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 12: + memcpy(at, A->dp, 12 * sizeof(fp_digit)); + memcpy(at+12, B->dp, 12 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[12]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[13]); MULADD(at[1], at[12]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); MULADD(at[11], at[12]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[10], at[23]); MULADD(at[11], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[11], at[23]); + COMBA_STORE(C->dp[22]); + COMBA_STORE2(C->dp[23]); + C->used = 24; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 13: + memcpy(at, A->dp, 13 * sizeof(fp_digit)); + memcpy(at+13, B->dp, 13 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[13]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[14]); MULADD(at[1], at[13]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); MULADD(at[12], at[13]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); MULADD(at[12], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[11], at[25]); MULADD(at[12], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[12], at[25]); + COMBA_STORE(C->dp[24]); + COMBA_STORE2(C->dp[25]); + C->used = 26; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 14: + memcpy(at, A->dp, 14 * sizeof(fp_digit)); + memcpy(at+14, B->dp, 14 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[14]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[15]); MULADD(at[1], at[14]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); MULADD(at[12], at[14]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); MULADD(at[13], at[14]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); MULADD(at[13], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[12], at[27]); MULADD(at[13], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[13], at[27]); + COMBA_STORE(C->dp[26]); + COMBA_STORE2(C->dp[27]); + C->used = 28; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 15: + memcpy(at, A->dp, 15 * sizeof(fp_digit)); + memcpy(at+15, B->dp, 15 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[15]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[16]); MULADD(at[1], at[15]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); MULADD(at[13], at[15]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); MULADD(at[14], at[15]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); MULADD(at[14], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[13], at[29]); MULADD(at[14], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[14], at[29]); + COMBA_STORE(C->dp[28]); + COMBA_STORE2(C->dp[29]); + C->used = 30; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + case 16: + memcpy(at, A->dp, 16 * sizeof(fp_digit)); + memcpy(at+16, B->dp, 16 * sizeof(fp_digit)); + COMBA_START; + + COMBA_CLEAR; + /* 0 */ + MULADD(at[0], at[16]); + COMBA_STORE(C->dp[0]); + /* 1 */ + COMBA_FORWARD; + MULADD(at[0], at[17]); MULADD(at[1], at[16]); + COMBA_STORE(C->dp[1]); + /* 2 */ + COMBA_FORWARD; + MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); + COMBA_STORE(C->dp[2]); + /* 3 */ + COMBA_FORWARD; + MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); + COMBA_STORE(C->dp[3]); + /* 4 */ + COMBA_FORWARD; + MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); + COMBA_STORE(C->dp[4]); + /* 5 */ + COMBA_FORWARD; + MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); + COMBA_STORE(C->dp[5]); + /* 6 */ + COMBA_FORWARD; + MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); + COMBA_STORE(C->dp[6]); + /* 7 */ + COMBA_FORWARD; + MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); + COMBA_STORE(C->dp[7]); + /* 8 */ + COMBA_FORWARD; + MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); + COMBA_STORE(C->dp[8]); + /* 9 */ + COMBA_FORWARD; + MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); + COMBA_STORE(C->dp[9]); + /* 10 */ + COMBA_FORWARD; + MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); + COMBA_STORE(C->dp[10]); + /* 11 */ + COMBA_FORWARD; + MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); + COMBA_STORE(C->dp[11]); + /* 12 */ + COMBA_FORWARD; + MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); + COMBA_STORE(C->dp[12]); + /* 13 */ + COMBA_FORWARD; + MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); + COMBA_STORE(C->dp[13]); + /* 14 */ + COMBA_FORWARD; + MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); MULADD(at[14], at[16]); + COMBA_STORE(C->dp[14]); + /* 15 */ + COMBA_FORWARD; + MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); MULADD(at[15], at[16]); + COMBA_STORE(C->dp[15]); + /* 16 */ + COMBA_FORWARD; + MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); MULADD(at[15], at[17]); + COMBA_STORE(C->dp[16]); + /* 17 */ + COMBA_FORWARD; + MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); MULADD(at[15], at[18]); + COMBA_STORE(C->dp[17]); + /* 18 */ + COMBA_FORWARD; + MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); MULADD(at[15], at[19]); + COMBA_STORE(C->dp[18]); + /* 19 */ + COMBA_FORWARD; + MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); + COMBA_STORE(C->dp[19]); + /* 20 */ + COMBA_FORWARD; + MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); + COMBA_STORE(C->dp[20]); + /* 21 */ + COMBA_FORWARD; + MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); + COMBA_STORE(C->dp[21]); + /* 22 */ + COMBA_FORWARD; + MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); + COMBA_STORE(C->dp[22]); + /* 23 */ + COMBA_FORWARD; + MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); + COMBA_STORE(C->dp[23]); + /* 24 */ + COMBA_FORWARD; + MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); + COMBA_STORE(C->dp[24]); + /* 25 */ + COMBA_FORWARD; + MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); + COMBA_STORE(C->dp[25]); + /* 26 */ + COMBA_FORWARD; + MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); + COMBA_STORE(C->dp[26]); + /* 27 */ + COMBA_FORWARD; + MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); + COMBA_STORE(C->dp[27]); + /* 28 */ + COMBA_FORWARD; + MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); + COMBA_STORE(C->dp[28]); + /* 29 */ + COMBA_FORWARD; + MULADD(at[14], at[31]); MULADD(at[15], at[30]); + COMBA_STORE(C->dp[29]); + /* 30 */ + COMBA_FORWARD; + MULADD(at[15], at[31]); + COMBA_STORE(C->dp[30]); + COMBA_STORE2(C->dp[31]); + C->used = 32; + C->sign = A->sign ^ B->sign; + fp_clamp(C); + COMBA_FINI; + break; + + default: + break; + } +} + +#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i new file mode 100644 index 00000000..f6326d7e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i @@ -0,0 +1,159 @@ +/* fp_sqr_comba_12.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR12 +void fp_sqr_comba12(fp_int *A, fp_int *B) +{ + fp_digit *a, b[24], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADD2(a[7], a[11]); SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADD2(a[8], a[11]); SQRADD2(a[9], a[10]); + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADD2(a[10], a[11]); + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + COMBA_STORE2(b[23]); + COMBA_FINI; + + B->used = 24; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 24 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i new file mode 100644 index 00000000..d94bd638 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i @@ -0,0 +1,210 @@ +/* fp_sqr_comba_17.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR17 +void fp_sqr_comba17(fp_int *A, fp_int *B) +{ + fp_digit *a, b[34], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADD2(a[12], a[16]); SQRADD2(a[13], a[15]); SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADD2(a[13], a[16]); SQRADD2(a[14], a[15]); + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADD2(a[14], a[16]); SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADD2(a[15], a[16]); + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + COMBA_STORE2(b[33]); + COMBA_FINI; + + B->used = 34; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 34 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i new file mode 100644 index 00000000..04b5dd40 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i @@ -0,0 +1,240 @@ +/* fp_sqr_comba_20.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR20 +void fp_sqr_comba20(fp_int *A, fp_int *B) +{ + fp_digit *a, b[40], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADD2(a[15], a[19]); SQRADD2(a[16], a[18]); SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADD2(a[16], a[19]); SQRADD2(a[17], a[18]); + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADD2(a[17], a[19]); SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADD2(a[18], a[19]); + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + COMBA_STORE2(b[39]); + COMBA_FINI; + + B->used = 40; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 40 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i new file mode 100644 index 00000000..3e23e9f5 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i @@ -0,0 +1,280 @@ +/* fp_sqr_comba_24.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR24 +void fp_sqr_comba24(fp_int *A, fp_int *B) +{ + fp_digit *a, b[48], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADDSC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + + /* output 39 */ + CARRY_FORWARD; + SQRADDSC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; + COMBA_STORE(b[39]); + + /* output 40 */ + CARRY_FORWARD; + SQRADDSC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); + COMBA_STORE(b[40]); + + /* output 41 */ + CARRY_FORWARD; + SQRADDSC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; + COMBA_STORE(b[41]); + + /* output 42 */ + CARRY_FORWARD; + SQRADD2(a[19], a[23]); SQRADD2(a[20], a[22]); SQRADD(a[21], a[21]); + COMBA_STORE(b[42]); + + /* output 43 */ + CARRY_FORWARD; + SQRADD2(a[20], a[23]); SQRADD2(a[21], a[22]); + COMBA_STORE(b[43]); + + /* output 44 */ + CARRY_FORWARD; + SQRADD2(a[21], a[23]); SQRADD(a[22], a[22]); + COMBA_STORE(b[44]); + + /* output 45 */ + CARRY_FORWARD; + SQRADD2(a[22], a[23]); + COMBA_STORE(b[45]); + + /* output 46 */ + CARRY_FORWARD; + SQRADD(a[23], a[23]); + COMBA_STORE(b[46]); + COMBA_STORE2(b[47]); + COMBA_FINI; + + B->used = 48; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 48 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i new file mode 100644 index 00000000..d6e4998f --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i @@ -0,0 +1,320 @@ +/* fp_sqr_comba_28.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR28 +void fp_sqr_comba28(fp_int *A, fp_int *B) +{ + fp_digit *a, b[56], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + + /* output 39 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; + COMBA_STORE(b[39]); + + /* output 40 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); + COMBA_STORE(b[40]); + + /* output 41 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; + COMBA_STORE(b[41]); + + /* output 42 */ + CARRY_FORWARD; + SQRADDSC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); + COMBA_STORE(b[42]); + + /* output 43 */ + CARRY_FORWARD; + SQRADDSC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; + COMBA_STORE(b[43]); + + /* output 44 */ + CARRY_FORWARD; + SQRADDSC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); + COMBA_STORE(b[44]); + + /* output 45 */ + CARRY_FORWARD; + SQRADDSC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; + COMBA_STORE(b[45]); + + /* output 46 */ + CARRY_FORWARD; + SQRADDSC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); + COMBA_STORE(b[46]); + + /* output 47 */ + CARRY_FORWARD; + SQRADDSC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; + COMBA_STORE(b[47]); + + /* output 48 */ + CARRY_FORWARD; + SQRADDSC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); + COMBA_STORE(b[48]); + + /* output 49 */ + CARRY_FORWARD; + SQRADDSC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; + COMBA_STORE(b[49]); + + /* output 50 */ + CARRY_FORWARD; + SQRADD2(a[23], a[27]); SQRADD2(a[24], a[26]); SQRADD(a[25], a[25]); + COMBA_STORE(b[50]); + + /* output 51 */ + CARRY_FORWARD; + SQRADD2(a[24], a[27]); SQRADD2(a[25], a[26]); + COMBA_STORE(b[51]); + + /* output 52 */ + CARRY_FORWARD; + SQRADD2(a[25], a[27]); SQRADD(a[26], a[26]); + COMBA_STORE(b[52]); + + /* output 53 */ + CARRY_FORWARD; + SQRADD2(a[26], a[27]); + COMBA_STORE(b[53]); + + /* output 54 */ + CARRY_FORWARD; + SQRADD(a[27], a[27]); + COMBA_STORE(b[54]); + COMBA_STORE2(b[55]); + COMBA_FINI; + + B->used = 56; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 56 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i new file mode 100644 index 00000000..7e308dd5 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i @@ -0,0 +1,70 @@ +/* fp_sqr_comba_3.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR3 +void fp_sqr_comba3(fp_int *A, fp_int *B) +{ + fp_digit *a, b[6], c0, c1, c2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + COMBA_STORE2(b[5]); + COMBA_FINI; + + B->used = 6; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 6 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i new file mode 100644 index 00000000..598a514e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i @@ -0,0 +1,360 @@ +/* fp_sqr_comba_32.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR32 +void fp_sqr_comba32(fp_int *A, fp_int *B) +{ + fp_digit *a, b[64], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + + /* output 39 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; + COMBA_STORE(b[39]); + + /* output 40 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); + COMBA_STORE(b[40]); + + /* output 41 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; + COMBA_STORE(b[41]); + + /* output 42 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); + COMBA_STORE(b[42]); + + /* output 43 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; + COMBA_STORE(b[43]); + + /* output 44 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); + COMBA_STORE(b[44]); + + /* output 45 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; + COMBA_STORE(b[45]); + + /* output 46 */ + CARRY_FORWARD; + SQRADDSC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); + COMBA_STORE(b[46]); + + /* output 47 */ + CARRY_FORWARD; + SQRADDSC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; + COMBA_STORE(b[47]); + + /* output 48 */ + CARRY_FORWARD; + SQRADDSC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); + COMBA_STORE(b[48]); + + /* output 49 */ + CARRY_FORWARD; + SQRADDSC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; + COMBA_STORE(b[49]); + + /* output 50 */ + CARRY_FORWARD; + SQRADDSC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); + COMBA_STORE(b[50]); + + /* output 51 */ + CARRY_FORWARD; + SQRADDSC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; + COMBA_STORE(b[51]); + + /* output 52 */ + CARRY_FORWARD; + SQRADDSC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); + COMBA_STORE(b[52]); + + /* output 53 */ + CARRY_FORWARD; + SQRADDSC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; + COMBA_STORE(b[53]); + + /* output 54 */ + CARRY_FORWARD; + SQRADDSC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); + COMBA_STORE(b[54]); + + /* output 55 */ + CARRY_FORWARD; + SQRADDSC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; + COMBA_STORE(b[55]); + + /* output 56 */ + CARRY_FORWARD; + SQRADDSC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); + COMBA_STORE(b[56]); + + /* output 57 */ + CARRY_FORWARD; + SQRADDSC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; + COMBA_STORE(b[57]); + + /* output 58 */ + CARRY_FORWARD; + SQRADD2(a[27], a[31]); SQRADD2(a[28], a[30]); SQRADD(a[29], a[29]); + COMBA_STORE(b[58]); + + /* output 59 */ + CARRY_FORWARD; + SQRADD2(a[28], a[31]); SQRADD2(a[29], a[30]); + COMBA_STORE(b[59]); + + /* output 60 */ + CARRY_FORWARD; + SQRADD2(a[29], a[31]); SQRADD(a[30], a[30]); + COMBA_STORE(b[60]); + + /* output 61 */ + CARRY_FORWARD; + SQRADD2(a[30], a[31]); + COMBA_STORE(b[61]); + + /* output 62 */ + CARRY_FORWARD; + SQRADD(a[31], a[31]); + COMBA_STORE(b[62]); + COMBA_STORE2(b[63]); + COMBA_FINI; + + B->used = 64; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 64 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i new file mode 100644 index 00000000..53c2a905 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i @@ -0,0 +1,80 @@ +/* fp_sqr_comba_4.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR4 +void fp_sqr_comba4(fp_int *A, fp_int *B) +{ + fp_digit *a, b[8], c0, c1, c2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADD2(a[2], a[3]); + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + COMBA_STORE2(b[7]); + COMBA_FINI; + + B->used = 8; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 8 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i new file mode 100644 index 00000000..61779c88 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i @@ -0,0 +1,520 @@ +/* fp_sqr_comba_48.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR48 +void fp_sqr_comba48(fp_int *A, fp_int *B) +{ + fp_digit *a, b[96], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[32]); SQRADDAC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[33]); SQRADDAC(a[1], a[32]); SQRADDAC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[34]); SQRADDAC(a[1], a[33]); SQRADDAC(a[2], a[32]); SQRADDAC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[35]); SQRADDAC(a[1], a[34]); SQRADDAC(a[2], a[33]); SQRADDAC(a[3], a[32]); SQRADDAC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[36]); SQRADDAC(a[1], a[35]); SQRADDAC(a[2], a[34]); SQRADDAC(a[3], a[33]); SQRADDAC(a[4], a[32]); SQRADDAC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[37]); SQRADDAC(a[1], a[36]); SQRADDAC(a[2], a[35]); SQRADDAC(a[3], a[34]); SQRADDAC(a[4], a[33]); SQRADDAC(a[5], a[32]); SQRADDAC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[38]); SQRADDAC(a[1], a[37]); SQRADDAC(a[2], a[36]); SQRADDAC(a[3], a[35]); SQRADDAC(a[4], a[34]); SQRADDAC(a[5], a[33]); SQRADDAC(a[6], a[32]); SQRADDAC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + + /* output 39 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[39]); SQRADDAC(a[1], a[38]); SQRADDAC(a[2], a[37]); SQRADDAC(a[3], a[36]); SQRADDAC(a[4], a[35]); SQRADDAC(a[5], a[34]); SQRADDAC(a[6], a[33]); SQRADDAC(a[7], a[32]); SQRADDAC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; + COMBA_STORE(b[39]); + + /* output 40 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[40]); SQRADDAC(a[1], a[39]); SQRADDAC(a[2], a[38]); SQRADDAC(a[3], a[37]); SQRADDAC(a[4], a[36]); SQRADDAC(a[5], a[35]); SQRADDAC(a[6], a[34]); SQRADDAC(a[7], a[33]); SQRADDAC(a[8], a[32]); SQRADDAC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); + COMBA_STORE(b[40]); + + /* output 41 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[41]); SQRADDAC(a[1], a[40]); SQRADDAC(a[2], a[39]); SQRADDAC(a[3], a[38]); SQRADDAC(a[4], a[37]); SQRADDAC(a[5], a[36]); SQRADDAC(a[6], a[35]); SQRADDAC(a[7], a[34]); SQRADDAC(a[8], a[33]); SQRADDAC(a[9], a[32]); SQRADDAC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; + COMBA_STORE(b[41]); + + /* output 42 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[42]); SQRADDAC(a[1], a[41]); SQRADDAC(a[2], a[40]); SQRADDAC(a[3], a[39]); SQRADDAC(a[4], a[38]); SQRADDAC(a[5], a[37]); SQRADDAC(a[6], a[36]); SQRADDAC(a[7], a[35]); SQRADDAC(a[8], a[34]); SQRADDAC(a[9], a[33]); SQRADDAC(a[10], a[32]); SQRADDAC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); + COMBA_STORE(b[42]); + + /* output 43 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[43]); SQRADDAC(a[1], a[42]); SQRADDAC(a[2], a[41]); SQRADDAC(a[3], a[40]); SQRADDAC(a[4], a[39]); SQRADDAC(a[5], a[38]); SQRADDAC(a[6], a[37]); SQRADDAC(a[7], a[36]); SQRADDAC(a[8], a[35]); SQRADDAC(a[9], a[34]); SQRADDAC(a[10], a[33]); SQRADDAC(a[11], a[32]); SQRADDAC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; + COMBA_STORE(b[43]); + + /* output 44 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[44]); SQRADDAC(a[1], a[43]); SQRADDAC(a[2], a[42]); SQRADDAC(a[3], a[41]); SQRADDAC(a[4], a[40]); SQRADDAC(a[5], a[39]); SQRADDAC(a[6], a[38]); SQRADDAC(a[7], a[37]); SQRADDAC(a[8], a[36]); SQRADDAC(a[9], a[35]); SQRADDAC(a[10], a[34]); SQRADDAC(a[11], a[33]); SQRADDAC(a[12], a[32]); SQRADDAC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); + COMBA_STORE(b[44]); + + /* output 45 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[45]); SQRADDAC(a[1], a[44]); SQRADDAC(a[2], a[43]); SQRADDAC(a[3], a[42]); SQRADDAC(a[4], a[41]); SQRADDAC(a[5], a[40]); SQRADDAC(a[6], a[39]); SQRADDAC(a[7], a[38]); SQRADDAC(a[8], a[37]); SQRADDAC(a[9], a[36]); SQRADDAC(a[10], a[35]); SQRADDAC(a[11], a[34]); SQRADDAC(a[12], a[33]); SQRADDAC(a[13], a[32]); SQRADDAC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; + COMBA_STORE(b[45]); + + /* output 46 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[46]); SQRADDAC(a[1], a[45]); SQRADDAC(a[2], a[44]); SQRADDAC(a[3], a[43]); SQRADDAC(a[4], a[42]); SQRADDAC(a[5], a[41]); SQRADDAC(a[6], a[40]); SQRADDAC(a[7], a[39]); SQRADDAC(a[8], a[38]); SQRADDAC(a[9], a[37]); SQRADDAC(a[10], a[36]); SQRADDAC(a[11], a[35]); SQRADDAC(a[12], a[34]); SQRADDAC(a[13], a[33]); SQRADDAC(a[14], a[32]); SQRADDAC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); + COMBA_STORE(b[46]); + + /* output 47 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[47]); SQRADDAC(a[1], a[46]); SQRADDAC(a[2], a[45]); SQRADDAC(a[3], a[44]); SQRADDAC(a[4], a[43]); SQRADDAC(a[5], a[42]); SQRADDAC(a[6], a[41]); SQRADDAC(a[7], a[40]); SQRADDAC(a[8], a[39]); SQRADDAC(a[9], a[38]); SQRADDAC(a[10], a[37]); SQRADDAC(a[11], a[36]); SQRADDAC(a[12], a[35]); SQRADDAC(a[13], a[34]); SQRADDAC(a[14], a[33]); SQRADDAC(a[15], a[32]); SQRADDAC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; + COMBA_STORE(b[47]); + + /* output 48 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[47]); SQRADDAC(a[2], a[46]); SQRADDAC(a[3], a[45]); SQRADDAC(a[4], a[44]); SQRADDAC(a[5], a[43]); SQRADDAC(a[6], a[42]); SQRADDAC(a[7], a[41]); SQRADDAC(a[8], a[40]); SQRADDAC(a[9], a[39]); SQRADDAC(a[10], a[38]); SQRADDAC(a[11], a[37]); SQRADDAC(a[12], a[36]); SQRADDAC(a[13], a[35]); SQRADDAC(a[14], a[34]); SQRADDAC(a[15], a[33]); SQRADDAC(a[16], a[32]); SQRADDAC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); + COMBA_STORE(b[48]); + + /* output 49 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[47]); SQRADDAC(a[3], a[46]); SQRADDAC(a[4], a[45]); SQRADDAC(a[5], a[44]); SQRADDAC(a[6], a[43]); SQRADDAC(a[7], a[42]); SQRADDAC(a[8], a[41]); SQRADDAC(a[9], a[40]); SQRADDAC(a[10], a[39]); SQRADDAC(a[11], a[38]); SQRADDAC(a[12], a[37]); SQRADDAC(a[13], a[36]); SQRADDAC(a[14], a[35]); SQRADDAC(a[15], a[34]); SQRADDAC(a[16], a[33]); SQRADDAC(a[17], a[32]); SQRADDAC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; + COMBA_STORE(b[49]); + + /* output 50 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[47]); SQRADDAC(a[4], a[46]); SQRADDAC(a[5], a[45]); SQRADDAC(a[6], a[44]); SQRADDAC(a[7], a[43]); SQRADDAC(a[8], a[42]); SQRADDAC(a[9], a[41]); SQRADDAC(a[10], a[40]); SQRADDAC(a[11], a[39]); SQRADDAC(a[12], a[38]); SQRADDAC(a[13], a[37]); SQRADDAC(a[14], a[36]); SQRADDAC(a[15], a[35]); SQRADDAC(a[16], a[34]); SQRADDAC(a[17], a[33]); SQRADDAC(a[18], a[32]); SQRADDAC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); + COMBA_STORE(b[50]); + + /* output 51 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[47]); SQRADDAC(a[5], a[46]); SQRADDAC(a[6], a[45]); SQRADDAC(a[7], a[44]); SQRADDAC(a[8], a[43]); SQRADDAC(a[9], a[42]); SQRADDAC(a[10], a[41]); SQRADDAC(a[11], a[40]); SQRADDAC(a[12], a[39]); SQRADDAC(a[13], a[38]); SQRADDAC(a[14], a[37]); SQRADDAC(a[15], a[36]); SQRADDAC(a[16], a[35]); SQRADDAC(a[17], a[34]); SQRADDAC(a[18], a[33]); SQRADDAC(a[19], a[32]); SQRADDAC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; + COMBA_STORE(b[51]); + + /* output 52 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[47]); SQRADDAC(a[6], a[46]); SQRADDAC(a[7], a[45]); SQRADDAC(a[8], a[44]); SQRADDAC(a[9], a[43]); SQRADDAC(a[10], a[42]); SQRADDAC(a[11], a[41]); SQRADDAC(a[12], a[40]); SQRADDAC(a[13], a[39]); SQRADDAC(a[14], a[38]); SQRADDAC(a[15], a[37]); SQRADDAC(a[16], a[36]); SQRADDAC(a[17], a[35]); SQRADDAC(a[18], a[34]); SQRADDAC(a[19], a[33]); SQRADDAC(a[20], a[32]); SQRADDAC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); + COMBA_STORE(b[52]); + + /* output 53 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[47]); SQRADDAC(a[7], a[46]); SQRADDAC(a[8], a[45]); SQRADDAC(a[9], a[44]); SQRADDAC(a[10], a[43]); SQRADDAC(a[11], a[42]); SQRADDAC(a[12], a[41]); SQRADDAC(a[13], a[40]); SQRADDAC(a[14], a[39]); SQRADDAC(a[15], a[38]); SQRADDAC(a[16], a[37]); SQRADDAC(a[17], a[36]); SQRADDAC(a[18], a[35]); SQRADDAC(a[19], a[34]); SQRADDAC(a[20], a[33]); SQRADDAC(a[21], a[32]); SQRADDAC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; + COMBA_STORE(b[53]); + + /* output 54 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[47]); SQRADDAC(a[8], a[46]); SQRADDAC(a[9], a[45]); SQRADDAC(a[10], a[44]); SQRADDAC(a[11], a[43]); SQRADDAC(a[12], a[42]); SQRADDAC(a[13], a[41]); SQRADDAC(a[14], a[40]); SQRADDAC(a[15], a[39]); SQRADDAC(a[16], a[38]); SQRADDAC(a[17], a[37]); SQRADDAC(a[18], a[36]); SQRADDAC(a[19], a[35]); SQRADDAC(a[20], a[34]); SQRADDAC(a[21], a[33]); SQRADDAC(a[22], a[32]); SQRADDAC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); + COMBA_STORE(b[54]); + + /* output 55 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[47]); SQRADDAC(a[9], a[46]); SQRADDAC(a[10], a[45]); SQRADDAC(a[11], a[44]); SQRADDAC(a[12], a[43]); SQRADDAC(a[13], a[42]); SQRADDAC(a[14], a[41]); SQRADDAC(a[15], a[40]); SQRADDAC(a[16], a[39]); SQRADDAC(a[17], a[38]); SQRADDAC(a[18], a[37]); SQRADDAC(a[19], a[36]); SQRADDAC(a[20], a[35]); SQRADDAC(a[21], a[34]); SQRADDAC(a[22], a[33]); SQRADDAC(a[23], a[32]); SQRADDAC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; + COMBA_STORE(b[55]); + + /* output 56 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[47]); SQRADDAC(a[10], a[46]); SQRADDAC(a[11], a[45]); SQRADDAC(a[12], a[44]); SQRADDAC(a[13], a[43]); SQRADDAC(a[14], a[42]); SQRADDAC(a[15], a[41]); SQRADDAC(a[16], a[40]); SQRADDAC(a[17], a[39]); SQRADDAC(a[18], a[38]); SQRADDAC(a[19], a[37]); SQRADDAC(a[20], a[36]); SQRADDAC(a[21], a[35]); SQRADDAC(a[22], a[34]); SQRADDAC(a[23], a[33]); SQRADDAC(a[24], a[32]); SQRADDAC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); + COMBA_STORE(b[56]); + + /* output 57 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[47]); SQRADDAC(a[11], a[46]); SQRADDAC(a[12], a[45]); SQRADDAC(a[13], a[44]); SQRADDAC(a[14], a[43]); SQRADDAC(a[15], a[42]); SQRADDAC(a[16], a[41]); SQRADDAC(a[17], a[40]); SQRADDAC(a[18], a[39]); SQRADDAC(a[19], a[38]); SQRADDAC(a[20], a[37]); SQRADDAC(a[21], a[36]); SQRADDAC(a[22], a[35]); SQRADDAC(a[23], a[34]); SQRADDAC(a[24], a[33]); SQRADDAC(a[25], a[32]); SQRADDAC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; + COMBA_STORE(b[57]); + + /* output 58 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[47]); SQRADDAC(a[12], a[46]); SQRADDAC(a[13], a[45]); SQRADDAC(a[14], a[44]); SQRADDAC(a[15], a[43]); SQRADDAC(a[16], a[42]); SQRADDAC(a[17], a[41]); SQRADDAC(a[18], a[40]); SQRADDAC(a[19], a[39]); SQRADDAC(a[20], a[38]); SQRADDAC(a[21], a[37]); SQRADDAC(a[22], a[36]); SQRADDAC(a[23], a[35]); SQRADDAC(a[24], a[34]); SQRADDAC(a[25], a[33]); SQRADDAC(a[26], a[32]); SQRADDAC(a[27], a[31]); SQRADDAC(a[28], a[30]); SQRADDDB; SQRADD(a[29], a[29]); + COMBA_STORE(b[58]); + + /* output 59 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[47]); SQRADDAC(a[13], a[46]); SQRADDAC(a[14], a[45]); SQRADDAC(a[15], a[44]); SQRADDAC(a[16], a[43]); SQRADDAC(a[17], a[42]); SQRADDAC(a[18], a[41]); SQRADDAC(a[19], a[40]); SQRADDAC(a[20], a[39]); SQRADDAC(a[21], a[38]); SQRADDAC(a[22], a[37]); SQRADDAC(a[23], a[36]); SQRADDAC(a[24], a[35]); SQRADDAC(a[25], a[34]); SQRADDAC(a[26], a[33]); SQRADDAC(a[27], a[32]); SQRADDAC(a[28], a[31]); SQRADDAC(a[29], a[30]); SQRADDDB; + COMBA_STORE(b[59]); + + /* output 60 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[47]); SQRADDAC(a[14], a[46]); SQRADDAC(a[15], a[45]); SQRADDAC(a[16], a[44]); SQRADDAC(a[17], a[43]); SQRADDAC(a[18], a[42]); SQRADDAC(a[19], a[41]); SQRADDAC(a[20], a[40]); SQRADDAC(a[21], a[39]); SQRADDAC(a[22], a[38]); SQRADDAC(a[23], a[37]); SQRADDAC(a[24], a[36]); SQRADDAC(a[25], a[35]); SQRADDAC(a[26], a[34]); SQRADDAC(a[27], a[33]); SQRADDAC(a[28], a[32]); SQRADDAC(a[29], a[31]); SQRADDDB; SQRADD(a[30], a[30]); + COMBA_STORE(b[60]); + + /* output 61 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[47]); SQRADDAC(a[15], a[46]); SQRADDAC(a[16], a[45]); SQRADDAC(a[17], a[44]); SQRADDAC(a[18], a[43]); SQRADDAC(a[19], a[42]); SQRADDAC(a[20], a[41]); SQRADDAC(a[21], a[40]); SQRADDAC(a[22], a[39]); SQRADDAC(a[23], a[38]); SQRADDAC(a[24], a[37]); SQRADDAC(a[25], a[36]); SQRADDAC(a[26], a[35]); SQRADDAC(a[27], a[34]); SQRADDAC(a[28], a[33]); SQRADDAC(a[29], a[32]); SQRADDAC(a[30], a[31]); SQRADDDB; + COMBA_STORE(b[61]); + + /* output 62 */ + CARRY_FORWARD; + SQRADDSC(a[15], a[47]); SQRADDAC(a[16], a[46]); SQRADDAC(a[17], a[45]); SQRADDAC(a[18], a[44]); SQRADDAC(a[19], a[43]); SQRADDAC(a[20], a[42]); SQRADDAC(a[21], a[41]); SQRADDAC(a[22], a[40]); SQRADDAC(a[23], a[39]); SQRADDAC(a[24], a[38]); SQRADDAC(a[25], a[37]); SQRADDAC(a[26], a[36]); SQRADDAC(a[27], a[35]); SQRADDAC(a[28], a[34]); SQRADDAC(a[29], a[33]); SQRADDAC(a[30], a[32]); SQRADDDB; SQRADD(a[31], a[31]); + COMBA_STORE(b[62]); + + /* output 63 */ + CARRY_FORWARD; + SQRADDSC(a[16], a[47]); SQRADDAC(a[17], a[46]); SQRADDAC(a[18], a[45]); SQRADDAC(a[19], a[44]); SQRADDAC(a[20], a[43]); SQRADDAC(a[21], a[42]); SQRADDAC(a[22], a[41]); SQRADDAC(a[23], a[40]); SQRADDAC(a[24], a[39]); SQRADDAC(a[25], a[38]); SQRADDAC(a[26], a[37]); SQRADDAC(a[27], a[36]); SQRADDAC(a[28], a[35]); SQRADDAC(a[29], a[34]); SQRADDAC(a[30], a[33]); SQRADDAC(a[31], a[32]); SQRADDDB; + COMBA_STORE(b[63]); + + /* output 64 */ + CARRY_FORWARD; + SQRADDSC(a[17], a[47]); SQRADDAC(a[18], a[46]); SQRADDAC(a[19], a[45]); SQRADDAC(a[20], a[44]); SQRADDAC(a[21], a[43]); SQRADDAC(a[22], a[42]); SQRADDAC(a[23], a[41]); SQRADDAC(a[24], a[40]); SQRADDAC(a[25], a[39]); SQRADDAC(a[26], a[38]); SQRADDAC(a[27], a[37]); SQRADDAC(a[28], a[36]); SQRADDAC(a[29], a[35]); SQRADDAC(a[30], a[34]); SQRADDAC(a[31], a[33]); SQRADDDB; SQRADD(a[32], a[32]); + COMBA_STORE(b[64]); + + /* output 65 */ + CARRY_FORWARD; + SQRADDSC(a[18], a[47]); SQRADDAC(a[19], a[46]); SQRADDAC(a[20], a[45]); SQRADDAC(a[21], a[44]); SQRADDAC(a[22], a[43]); SQRADDAC(a[23], a[42]); SQRADDAC(a[24], a[41]); SQRADDAC(a[25], a[40]); SQRADDAC(a[26], a[39]); SQRADDAC(a[27], a[38]); SQRADDAC(a[28], a[37]); SQRADDAC(a[29], a[36]); SQRADDAC(a[30], a[35]); SQRADDAC(a[31], a[34]); SQRADDAC(a[32], a[33]); SQRADDDB; + COMBA_STORE(b[65]); + + /* output 66 */ + CARRY_FORWARD; + SQRADDSC(a[19], a[47]); SQRADDAC(a[20], a[46]); SQRADDAC(a[21], a[45]); SQRADDAC(a[22], a[44]); SQRADDAC(a[23], a[43]); SQRADDAC(a[24], a[42]); SQRADDAC(a[25], a[41]); SQRADDAC(a[26], a[40]); SQRADDAC(a[27], a[39]); SQRADDAC(a[28], a[38]); SQRADDAC(a[29], a[37]); SQRADDAC(a[30], a[36]); SQRADDAC(a[31], a[35]); SQRADDAC(a[32], a[34]); SQRADDDB; SQRADD(a[33], a[33]); + COMBA_STORE(b[66]); + + /* output 67 */ + CARRY_FORWARD; + SQRADDSC(a[20], a[47]); SQRADDAC(a[21], a[46]); SQRADDAC(a[22], a[45]); SQRADDAC(a[23], a[44]); SQRADDAC(a[24], a[43]); SQRADDAC(a[25], a[42]); SQRADDAC(a[26], a[41]); SQRADDAC(a[27], a[40]); SQRADDAC(a[28], a[39]); SQRADDAC(a[29], a[38]); SQRADDAC(a[30], a[37]); SQRADDAC(a[31], a[36]); SQRADDAC(a[32], a[35]); SQRADDAC(a[33], a[34]); SQRADDDB; + COMBA_STORE(b[67]); + + /* output 68 */ + CARRY_FORWARD; + SQRADDSC(a[21], a[47]); SQRADDAC(a[22], a[46]); SQRADDAC(a[23], a[45]); SQRADDAC(a[24], a[44]); SQRADDAC(a[25], a[43]); SQRADDAC(a[26], a[42]); SQRADDAC(a[27], a[41]); SQRADDAC(a[28], a[40]); SQRADDAC(a[29], a[39]); SQRADDAC(a[30], a[38]); SQRADDAC(a[31], a[37]); SQRADDAC(a[32], a[36]); SQRADDAC(a[33], a[35]); SQRADDDB; SQRADD(a[34], a[34]); + COMBA_STORE(b[68]); + + /* output 69 */ + CARRY_FORWARD; + SQRADDSC(a[22], a[47]); SQRADDAC(a[23], a[46]); SQRADDAC(a[24], a[45]); SQRADDAC(a[25], a[44]); SQRADDAC(a[26], a[43]); SQRADDAC(a[27], a[42]); SQRADDAC(a[28], a[41]); SQRADDAC(a[29], a[40]); SQRADDAC(a[30], a[39]); SQRADDAC(a[31], a[38]); SQRADDAC(a[32], a[37]); SQRADDAC(a[33], a[36]); SQRADDAC(a[34], a[35]); SQRADDDB; + COMBA_STORE(b[69]); + + /* output 70 */ + CARRY_FORWARD; + SQRADDSC(a[23], a[47]); SQRADDAC(a[24], a[46]); SQRADDAC(a[25], a[45]); SQRADDAC(a[26], a[44]); SQRADDAC(a[27], a[43]); SQRADDAC(a[28], a[42]); SQRADDAC(a[29], a[41]); SQRADDAC(a[30], a[40]); SQRADDAC(a[31], a[39]); SQRADDAC(a[32], a[38]); SQRADDAC(a[33], a[37]); SQRADDAC(a[34], a[36]); SQRADDDB; SQRADD(a[35], a[35]); + COMBA_STORE(b[70]); + + /* output 71 */ + CARRY_FORWARD; + SQRADDSC(a[24], a[47]); SQRADDAC(a[25], a[46]); SQRADDAC(a[26], a[45]); SQRADDAC(a[27], a[44]); SQRADDAC(a[28], a[43]); SQRADDAC(a[29], a[42]); SQRADDAC(a[30], a[41]); SQRADDAC(a[31], a[40]); SQRADDAC(a[32], a[39]); SQRADDAC(a[33], a[38]); SQRADDAC(a[34], a[37]); SQRADDAC(a[35], a[36]); SQRADDDB; + COMBA_STORE(b[71]); + + /* output 72 */ + CARRY_FORWARD; + SQRADDSC(a[25], a[47]); SQRADDAC(a[26], a[46]); SQRADDAC(a[27], a[45]); SQRADDAC(a[28], a[44]); SQRADDAC(a[29], a[43]); SQRADDAC(a[30], a[42]); SQRADDAC(a[31], a[41]); SQRADDAC(a[32], a[40]); SQRADDAC(a[33], a[39]); SQRADDAC(a[34], a[38]); SQRADDAC(a[35], a[37]); SQRADDDB; SQRADD(a[36], a[36]); + COMBA_STORE(b[72]); + + /* output 73 */ + CARRY_FORWARD; + SQRADDSC(a[26], a[47]); SQRADDAC(a[27], a[46]); SQRADDAC(a[28], a[45]); SQRADDAC(a[29], a[44]); SQRADDAC(a[30], a[43]); SQRADDAC(a[31], a[42]); SQRADDAC(a[32], a[41]); SQRADDAC(a[33], a[40]); SQRADDAC(a[34], a[39]); SQRADDAC(a[35], a[38]); SQRADDAC(a[36], a[37]); SQRADDDB; + COMBA_STORE(b[73]); + + /* output 74 */ + CARRY_FORWARD; + SQRADDSC(a[27], a[47]); SQRADDAC(a[28], a[46]); SQRADDAC(a[29], a[45]); SQRADDAC(a[30], a[44]); SQRADDAC(a[31], a[43]); SQRADDAC(a[32], a[42]); SQRADDAC(a[33], a[41]); SQRADDAC(a[34], a[40]); SQRADDAC(a[35], a[39]); SQRADDAC(a[36], a[38]); SQRADDDB; SQRADD(a[37], a[37]); + COMBA_STORE(b[74]); + + /* output 75 */ + CARRY_FORWARD; + SQRADDSC(a[28], a[47]); SQRADDAC(a[29], a[46]); SQRADDAC(a[30], a[45]); SQRADDAC(a[31], a[44]); SQRADDAC(a[32], a[43]); SQRADDAC(a[33], a[42]); SQRADDAC(a[34], a[41]); SQRADDAC(a[35], a[40]); SQRADDAC(a[36], a[39]); SQRADDAC(a[37], a[38]); SQRADDDB; + COMBA_STORE(b[75]); + + /* output 76 */ + CARRY_FORWARD; + SQRADDSC(a[29], a[47]); SQRADDAC(a[30], a[46]); SQRADDAC(a[31], a[45]); SQRADDAC(a[32], a[44]); SQRADDAC(a[33], a[43]); SQRADDAC(a[34], a[42]); SQRADDAC(a[35], a[41]); SQRADDAC(a[36], a[40]); SQRADDAC(a[37], a[39]); SQRADDDB; SQRADD(a[38], a[38]); + COMBA_STORE(b[76]); + + /* output 77 */ + CARRY_FORWARD; + SQRADDSC(a[30], a[47]); SQRADDAC(a[31], a[46]); SQRADDAC(a[32], a[45]); SQRADDAC(a[33], a[44]); SQRADDAC(a[34], a[43]); SQRADDAC(a[35], a[42]); SQRADDAC(a[36], a[41]); SQRADDAC(a[37], a[40]); SQRADDAC(a[38], a[39]); SQRADDDB; + COMBA_STORE(b[77]); + + /* output 78 */ + CARRY_FORWARD; + SQRADDSC(a[31], a[47]); SQRADDAC(a[32], a[46]); SQRADDAC(a[33], a[45]); SQRADDAC(a[34], a[44]); SQRADDAC(a[35], a[43]); SQRADDAC(a[36], a[42]); SQRADDAC(a[37], a[41]); SQRADDAC(a[38], a[40]); SQRADDDB; SQRADD(a[39], a[39]); + COMBA_STORE(b[78]); + + /* output 79 */ + CARRY_FORWARD; + SQRADDSC(a[32], a[47]); SQRADDAC(a[33], a[46]); SQRADDAC(a[34], a[45]); SQRADDAC(a[35], a[44]); SQRADDAC(a[36], a[43]); SQRADDAC(a[37], a[42]); SQRADDAC(a[38], a[41]); SQRADDAC(a[39], a[40]); SQRADDDB; + COMBA_STORE(b[79]); + + /* output 80 */ + CARRY_FORWARD; + SQRADDSC(a[33], a[47]); SQRADDAC(a[34], a[46]); SQRADDAC(a[35], a[45]); SQRADDAC(a[36], a[44]); SQRADDAC(a[37], a[43]); SQRADDAC(a[38], a[42]); SQRADDAC(a[39], a[41]); SQRADDDB; SQRADD(a[40], a[40]); + COMBA_STORE(b[80]); + + /* output 81 */ + CARRY_FORWARD; + SQRADDSC(a[34], a[47]); SQRADDAC(a[35], a[46]); SQRADDAC(a[36], a[45]); SQRADDAC(a[37], a[44]); SQRADDAC(a[38], a[43]); SQRADDAC(a[39], a[42]); SQRADDAC(a[40], a[41]); SQRADDDB; + COMBA_STORE(b[81]); + + /* output 82 */ + CARRY_FORWARD; + SQRADDSC(a[35], a[47]); SQRADDAC(a[36], a[46]); SQRADDAC(a[37], a[45]); SQRADDAC(a[38], a[44]); SQRADDAC(a[39], a[43]); SQRADDAC(a[40], a[42]); SQRADDDB; SQRADD(a[41], a[41]); + COMBA_STORE(b[82]); + + /* output 83 */ + CARRY_FORWARD; + SQRADDSC(a[36], a[47]); SQRADDAC(a[37], a[46]); SQRADDAC(a[38], a[45]); SQRADDAC(a[39], a[44]); SQRADDAC(a[40], a[43]); SQRADDAC(a[41], a[42]); SQRADDDB; + COMBA_STORE(b[83]); + + /* output 84 */ + CARRY_FORWARD; + SQRADDSC(a[37], a[47]); SQRADDAC(a[38], a[46]); SQRADDAC(a[39], a[45]); SQRADDAC(a[40], a[44]); SQRADDAC(a[41], a[43]); SQRADDDB; SQRADD(a[42], a[42]); + COMBA_STORE(b[84]); + + /* output 85 */ + CARRY_FORWARD; + SQRADDSC(a[38], a[47]); SQRADDAC(a[39], a[46]); SQRADDAC(a[40], a[45]); SQRADDAC(a[41], a[44]); SQRADDAC(a[42], a[43]); SQRADDDB; + COMBA_STORE(b[85]); + + /* output 86 */ + CARRY_FORWARD; + SQRADDSC(a[39], a[47]); SQRADDAC(a[40], a[46]); SQRADDAC(a[41], a[45]); SQRADDAC(a[42], a[44]); SQRADDDB; SQRADD(a[43], a[43]); + COMBA_STORE(b[86]); + + /* output 87 */ + CARRY_FORWARD; + SQRADDSC(a[40], a[47]); SQRADDAC(a[41], a[46]); SQRADDAC(a[42], a[45]); SQRADDAC(a[43], a[44]); SQRADDDB; + COMBA_STORE(b[87]); + + /* output 88 */ + CARRY_FORWARD; + SQRADDSC(a[41], a[47]); SQRADDAC(a[42], a[46]); SQRADDAC(a[43], a[45]); SQRADDDB; SQRADD(a[44], a[44]); + COMBA_STORE(b[88]); + + /* output 89 */ + CARRY_FORWARD; + SQRADDSC(a[42], a[47]); SQRADDAC(a[43], a[46]); SQRADDAC(a[44], a[45]); SQRADDDB; + COMBA_STORE(b[89]); + + /* output 90 */ + CARRY_FORWARD; + SQRADD2(a[43], a[47]); SQRADD2(a[44], a[46]); SQRADD(a[45], a[45]); + COMBA_STORE(b[90]); + + /* output 91 */ + CARRY_FORWARD; + SQRADD2(a[44], a[47]); SQRADD2(a[45], a[46]); + COMBA_STORE(b[91]); + + /* output 92 */ + CARRY_FORWARD; + SQRADD2(a[45], a[47]); SQRADD(a[46], a[46]); + COMBA_STORE(b[92]); + + /* output 93 */ + CARRY_FORWARD; + SQRADD2(a[46], a[47]); + COMBA_STORE(b[93]); + + /* output 94 */ + CARRY_FORWARD; + SQRADD(a[47], a[47]); + COMBA_STORE(b[94]); + COMBA_STORE2(b[95]); + COMBA_FINI; + + B->used = 96; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 96 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i new file mode 100644 index 00000000..75205e85 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i @@ -0,0 +1,100 @@ +/* fp_sqr_comba_6.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR6 +void fp_sqr_comba6(fp_int *A, fp_int *B) +{ + fp_digit *a, b[12], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADD2(a[1], a[5]); SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADD2(a[2], a[5]); SQRADD2(a[3], a[4]); + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADD2(a[4], a[5]); + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + COMBA_STORE2(b[11]); + COMBA_FINI; + + B->used = 12; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 12 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i new file mode 100644 index 00000000..6c8b9f13 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i @@ -0,0 +1,680 @@ +/* fp_sqr_comba_64.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR64 +void fp_sqr_comba64(fp_int *A, fp_int *B) +{ + fp_digit *a, b[128], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + + /* output 31 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; + COMBA_STORE(b[31]); + + /* output 32 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[32]); SQRADDAC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); + COMBA_STORE(b[32]); + + /* output 33 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[33]); SQRADDAC(a[1], a[32]); SQRADDAC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; + COMBA_STORE(b[33]); + + /* output 34 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[34]); SQRADDAC(a[1], a[33]); SQRADDAC(a[2], a[32]); SQRADDAC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); + COMBA_STORE(b[34]); + + /* output 35 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[35]); SQRADDAC(a[1], a[34]); SQRADDAC(a[2], a[33]); SQRADDAC(a[3], a[32]); SQRADDAC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; + COMBA_STORE(b[35]); + + /* output 36 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[36]); SQRADDAC(a[1], a[35]); SQRADDAC(a[2], a[34]); SQRADDAC(a[3], a[33]); SQRADDAC(a[4], a[32]); SQRADDAC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); + COMBA_STORE(b[36]); + + /* output 37 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[37]); SQRADDAC(a[1], a[36]); SQRADDAC(a[2], a[35]); SQRADDAC(a[3], a[34]); SQRADDAC(a[4], a[33]); SQRADDAC(a[5], a[32]); SQRADDAC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; + COMBA_STORE(b[37]); + + /* output 38 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[38]); SQRADDAC(a[1], a[37]); SQRADDAC(a[2], a[36]); SQRADDAC(a[3], a[35]); SQRADDAC(a[4], a[34]); SQRADDAC(a[5], a[33]); SQRADDAC(a[6], a[32]); SQRADDAC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); + COMBA_STORE(b[38]); + + /* output 39 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[39]); SQRADDAC(a[1], a[38]); SQRADDAC(a[2], a[37]); SQRADDAC(a[3], a[36]); SQRADDAC(a[4], a[35]); SQRADDAC(a[5], a[34]); SQRADDAC(a[6], a[33]); SQRADDAC(a[7], a[32]); SQRADDAC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; + COMBA_STORE(b[39]); + + /* output 40 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[40]); SQRADDAC(a[1], a[39]); SQRADDAC(a[2], a[38]); SQRADDAC(a[3], a[37]); SQRADDAC(a[4], a[36]); SQRADDAC(a[5], a[35]); SQRADDAC(a[6], a[34]); SQRADDAC(a[7], a[33]); SQRADDAC(a[8], a[32]); SQRADDAC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); + COMBA_STORE(b[40]); + + /* output 41 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[41]); SQRADDAC(a[1], a[40]); SQRADDAC(a[2], a[39]); SQRADDAC(a[3], a[38]); SQRADDAC(a[4], a[37]); SQRADDAC(a[5], a[36]); SQRADDAC(a[6], a[35]); SQRADDAC(a[7], a[34]); SQRADDAC(a[8], a[33]); SQRADDAC(a[9], a[32]); SQRADDAC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; + COMBA_STORE(b[41]); + + /* output 42 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[42]); SQRADDAC(a[1], a[41]); SQRADDAC(a[2], a[40]); SQRADDAC(a[3], a[39]); SQRADDAC(a[4], a[38]); SQRADDAC(a[5], a[37]); SQRADDAC(a[6], a[36]); SQRADDAC(a[7], a[35]); SQRADDAC(a[8], a[34]); SQRADDAC(a[9], a[33]); SQRADDAC(a[10], a[32]); SQRADDAC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); + COMBA_STORE(b[42]); + + /* output 43 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[43]); SQRADDAC(a[1], a[42]); SQRADDAC(a[2], a[41]); SQRADDAC(a[3], a[40]); SQRADDAC(a[4], a[39]); SQRADDAC(a[5], a[38]); SQRADDAC(a[6], a[37]); SQRADDAC(a[7], a[36]); SQRADDAC(a[8], a[35]); SQRADDAC(a[9], a[34]); SQRADDAC(a[10], a[33]); SQRADDAC(a[11], a[32]); SQRADDAC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; + COMBA_STORE(b[43]); + + /* output 44 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[44]); SQRADDAC(a[1], a[43]); SQRADDAC(a[2], a[42]); SQRADDAC(a[3], a[41]); SQRADDAC(a[4], a[40]); SQRADDAC(a[5], a[39]); SQRADDAC(a[6], a[38]); SQRADDAC(a[7], a[37]); SQRADDAC(a[8], a[36]); SQRADDAC(a[9], a[35]); SQRADDAC(a[10], a[34]); SQRADDAC(a[11], a[33]); SQRADDAC(a[12], a[32]); SQRADDAC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); + COMBA_STORE(b[44]); + + /* output 45 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[45]); SQRADDAC(a[1], a[44]); SQRADDAC(a[2], a[43]); SQRADDAC(a[3], a[42]); SQRADDAC(a[4], a[41]); SQRADDAC(a[5], a[40]); SQRADDAC(a[6], a[39]); SQRADDAC(a[7], a[38]); SQRADDAC(a[8], a[37]); SQRADDAC(a[9], a[36]); SQRADDAC(a[10], a[35]); SQRADDAC(a[11], a[34]); SQRADDAC(a[12], a[33]); SQRADDAC(a[13], a[32]); SQRADDAC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; + COMBA_STORE(b[45]); + + /* output 46 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[46]); SQRADDAC(a[1], a[45]); SQRADDAC(a[2], a[44]); SQRADDAC(a[3], a[43]); SQRADDAC(a[4], a[42]); SQRADDAC(a[5], a[41]); SQRADDAC(a[6], a[40]); SQRADDAC(a[7], a[39]); SQRADDAC(a[8], a[38]); SQRADDAC(a[9], a[37]); SQRADDAC(a[10], a[36]); SQRADDAC(a[11], a[35]); SQRADDAC(a[12], a[34]); SQRADDAC(a[13], a[33]); SQRADDAC(a[14], a[32]); SQRADDAC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); + COMBA_STORE(b[46]); + + /* output 47 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[47]); SQRADDAC(a[1], a[46]); SQRADDAC(a[2], a[45]); SQRADDAC(a[3], a[44]); SQRADDAC(a[4], a[43]); SQRADDAC(a[5], a[42]); SQRADDAC(a[6], a[41]); SQRADDAC(a[7], a[40]); SQRADDAC(a[8], a[39]); SQRADDAC(a[9], a[38]); SQRADDAC(a[10], a[37]); SQRADDAC(a[11], a[36]); SQRADDAC(a[12], a[35]); SQRADDAC(a[13], a[34]); SQRADDAC(a[14], a[33]); SQRADDAC(a[15], a[32]); SQRADDAC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; + COMBA_STORE(b[47]); + + /* output 48 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[48]); SQRADDAC(a[1], a[47]); SQRADDAC(a[2], a[46]); SQRADDAC(a[3], a[45]); SQRADDAC(a[4], a[44]); SQRADDAC(a[5], a[43]); SQRADDAC(a[6], a[42]); SQRADDAC(a[7], a[41]); SQRADDAC(a[8], a[40]); SQRADDAC(a[9], a[39]); SQRADDAC(a[10], a[38]); SQRADDAC(a[11], a[37]); SQRADDAC(a[12], a[36]); SQRADDAC(a[13], a[35]); SQRADDAC(a[14], a[34]); SQRADDAC(a[15], a[33]); SQRADDAC(a[16], a[32]); SQRADDAC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); + COMBA_STORE(b[48]); + + /* output 49 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[49]); SQRADDAC(a[1], a[48]); SQRADDAC(a[2], a[47]); SQRADDAC(a[3], a[46]); SQRADDAC(a[4], a[45]); SQRADDAC(a[5], a[44]); SQRADDAC(a[6], a[43]); SQRADDAC(a[7], a[42]); SQRADDAC(a[8], a[41]); SQRADDAC(a[9], a[40]); SQRADDAC(a[10], a[39]); SQRADDAC(a[11], a[38]); SQRADDAC(a[12], a[37]); SQRADDAC(a[13], a[36]); SQRADDAC(a[14], a[35]); SQRADDAC(a[15], a[34]); SQRADDAC(a[16], a[33]); SQRADDAC(a[17], a[32]); SQRADDAC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; + COMBA_STORE(b[49]); + + /* output 50 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[50]); SQRADDAC(a[1], a[49]); SQRADDAC(a[2], a[48]); SQRADDAC(a[3], a[47]); SQRADDAC(a[4], a[46]); SQRADDAC(a[5], a[45]); SQRADDAC(a[6], a[44]); SQRADDAC(a[7], a[43]); SQRADDAC(a[8], a[42]); SQRADDAC(a[9], a[41]); SQRADDAC(a[10], a[40]); SQRADDAC(a[11], a[39]); SQRADDAC(a[12], a[38]); SQRADDAC(a[13], a[37]); SQRADDAC(a[14], a[36]); SQRADDAC(a[15], a[35]); SQRADDAC(a[16], a[34]); SQRADDAC(a[17], a[33]); SQRADDAC(a[18], a[32]); SQRADDAC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); + COMBA_STORE(b[50]); + + /* output 51 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[51]); SQRADDAC(a[1], a[50]); SQRADDAC(a[2], a[49]); SQRADDAC(a[3], a[48]); SQRADDAC(a[4], a[47]); SQRADDAC(a[5], a[46]); SQRADDAC(a[6], a[45]); SQRADDAC(a[7], a[44]); SQRADDAC(a[8], a[43]); SQRADDAC(a[9], a[42]); SQRADDAC(a[10], a[41]); SQRADDAC(a[11], a[40]); SQRADDAC(a[12], a[39]); SQRADDAC(a[13], a[38]); SQRADDAC(a[14], a[37]); SQRADDAC(a[15], a[36]); SQRADDAC(a[16], a[35]); SQRADDAC(a[17], a[34]); SQRADDAC(a[18], a[33]); SQRADDAC(a[19], a[32]); SQRADDAC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; + COMBA_STORE(b[51]); + + /* output 52 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[52]); SQRADDAC(a[1], a[51]); SQRADDAC(a[2], a[50]); SQRADDAC(a[3], a[49]); SQRADDAC(a[4], a[48]); SQRADDAC(a[5], a[47]); SQRADDAC(a[6], a[46]); SQRADDAC(a[7], a[45]); SQRADDAC(a[8], a[44]); SQRADDAC(a[9], a[43]); SQRADDAC(a[10], a[42]); SQRADDAC(a[11], a[41]); SQRADDAC(a[12], a[40]); SQRADDAC(a[13], a[39]); SQRADDAC(a[14], a[38]); SQRADDAC(a[15], a[37]); SQRADDAC(a[16], a[36]); SQRADDAC(a[17], a[35]); SQRADDAC(a[18], a[34]); SQRADDAC(a[19], a[33]); SQRADDAC(a[20], a[32]); SQRADDAC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); + COMBA_STORE(b[52]); + + /* output 53 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[53]); SQRADDAC(a[1], a[52]); SQRADDAC(a[2], a[51]); SQRADDAC(a[3], a[50]); SQRADDAC(a[4], a[49]); SQRADDAC(a[5], a[48]); SQRADDAC(a[6], a[47]); SQRADDAC(a[7], a[46]); SQRADDAC(a[8], a[45]); SQRADDAC(a[9], a[44]); SQRADDAC(a[10], a[43]); SQRADDAC(a[11], a[42]); SQRADDAC(a[12], a[41]); SQRADDAC(a[13], a[40]); SQRADDAC(a[14], a[39]); SQRADDAC(a[15], a[38]); SQRADDAC(a[16], a[37]); SQRADDAC(a[17], a[36]); SQRADDAC(a[18], a[35]); SQRADDAC(a[19], a[34]); SQRADDAC(a[20], a[33]); SQRADDAC(a[21], a[32]); SQRADDAC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; + COMBA_STORE(b[53]); + + /* output 54 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[54]); SQRADDAC(a[1], a[53]); SQRADDAC(a[2], a[52]); SQRADDAC(a[3], a[51]); SQRADDAC(a[4], a[50]); SQRADDAC(a[5], a[49]); SQRADDAC(a[6], a[48]); SQRADDAC(a[7], a[47]); SQRADDAC(a[8], a[46]); SQRADDAC(a[9], a[45]); SQRADDAC(a[10], a[44]); SQRADDAC(a[11], a[43]); SQRADDAC(a[12], a[42]); SQRADDAC(a[13], a[41]); SQRADDAC(a[14], a[40]); SQRADDAC(a[15], a[39]); SQRADDAC(a[16], a[38]); SQRADDAC(a[17], a[37]); SQRADDAC(a[18], a[36]); SQRADDAC(a[19], a[35]); SQRADDAC(a[20], a[34]); SQRADDAC(a[21], a[33]); SQRADDAC(a[22], a[32]); SQRADDAC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); + COMBA_STORE(b[54]); + + /* output 55 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[55]); SQRADDAC(a[1], a[54]); SQRADDAC(a[2], a[53]); SQRADDAC(a[3], a[52]); SQRADDAC(a[4], a[51]); SQRADDAC(a[5], a[50]); SQRADDAC(a[6], a[49]); SQRADDAC(a[7], a[48]); SQRADDAC(a[8], a[47]); SQRADDAC(a[9], a[46]); SQRADDAC(a[10], a[45]); SQRADDAC(a[11], a[44]); SQRADDAC(a[12], a[43]); SQRADDAC(a[13], a[42]); SQRADDAC(a[14], a[41]); SQRADDAC(a[15], a[40]); SQRADDAC(a[16], a[39]); SQRADDAC(a[17], a[38]); SQRADDAC(a[18], a[37]); SQRADDAC(a[19], a[36]); SQRADDAC(a[20], a[35]); SQRADDAC(a[21], a[34]); SQRADDAC(a[22], a[33]); SQRADDAC(a[23], a[32]); SQRADDAC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; + COMBA_STORE(b[55]); + + /* output 56 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[56]); SQRADDAC(a[1], a[55]); SQRADDAC(a[2], a[54]); SQRADDAC(a[3], a[53]); SQRADDAC(a[4], a[52]); SQRADDAC(a[5], a[51]); SQRADDAC(a[6], a[50]); SQRADDAC(a[7], a[49]); SQRADDAC(a[8], a[48]); SQRADDAC(a[9], a[47]); SQRADDAC(a[10], a[46]); SQRADDAC(a[11], a[45]); SQRADDAC(a[12], a[44]); SQRADDAC(a[13], a[43]); SQRADDAC(a[14], a[42]); SQRADDAC(a[15], a[41]); SQRADDAC(a[16], a[40]); SQRADDAC(a[17], a[39]); SQRADDAC(a[18], a[38]); SQRADDAC(a[19], a[37]); SQRADDAC(a[20], a[36]); SQRADDAC(a[21], a[35]); SQRADDAC(a[22], a[34]); SQRADDAC(a[23], a[33]); SQRADDAC(a[24], a[32]); SQRADDAC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); + COMBA_STORE(b[56]); + + /* output 57 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[57]); SQRADDAC(a[1], a[56]); SQRADDAC(a[2], a[55]); SQRADDAC(a[3], a[54]); SQRADDAC(a[4], a[53]); SQRADDAC(a[5], a[52]); SQRADDAC(a[6], a[51]); SQRADDAC(a[7], a[50]); SQRADDAC(a[8], a[49]); SQRADDAC(a[9], a[48]); SQRADDAC(a[10], a[47]); SQRADDAC(a[11], a[46]); SQRADDAC(a[12], a[45]); SQRADDAC(a[13], a[44]); SQRADDAC(a[14], a[43]); SQRADDAC(a[15], a[42]); SQRADDAC(a[16], a[41]); SQRADDAC(a[17], a[40]); SQRADDAC(a[18], a[39]); SQRADDAC(a[19], a[38]); SQRADDAC(a[20], a[37]); SQRADDAC(a[21], a[36]); SQRADDAC(a[22], a[35]); SQRADDAC(a[23], a[34]); SQRADDAC(a[24], a[33]); SQRADDAC(a[25], a[32]); SQRADDAC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; + COMBA_STORE(b[57]); + + /* output 58 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[58]); SQRADDAC(a[1], a[57]); SQRADDAC(a[2], a[56]); SQRADDAC(a[3], a[55]); SQRADDAC(a[4], a[54]); SQRADDAC(a[5], a[53]); SQRADDAC(a[6], a[52]); SQRADDAC(a[7], a[51]); SQRADDAC(a[8], a[50]); SQRADDAC(a[9], a[49]); SQRADDAC(a[10], a[48]); SQRADDAC(a[11], a[47]); SQRADDAC(a[12], a[46]); SQRADDAC(a[13], a[45]); SQRADDAC(a[14], a[44]); SQRADDAC(a[15], a[43]); SQRADDAC(a[16], a[42]); SQRADDAC(a[17], a[41]); SQRADDAC(a[18], a[40]); SQRADDAC(a[19], a[39]); SQRADDAC(a[20], a[38]); SQRADDAC(a[21], a[37]); SQRADDAC(a[22], a[36]); SQRADDAC(a[23], a[35]); SQRADDAC(a[24], a[34]); SQRADDAC(a[25], a[33]); SQRADDAC(a[26], a[32]); SQRADDAC(a[27], a[31]); SQRADDAC(a[28], a[30]); SQRADDDB; SQRADD(a[29], a[29]); + COMBA_STORE(b[58]); + + /* output 59 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[59]); SQRADDAC(a[1], a[58]); SQRADDAC(a[2], a[57]); SQRADDAC(a[3], a[56]); SQRADDAC(a[4], a[55]); SQRADDAC(a[5], a[54]); SQRADDAC(a[6], a[53]); SQRADDAC(a[7], a[52]); SQRADDAC(a[8], a[51]); SQRADDAC(a[9], a[50]); SQRADDAC(a[10], a[49]); SQRADDAC(a[11], a[48]); SQRADDAC(a[12], a[47]); SQRADDAC(a[13], a[46]); SQRADDAC(a[14], a[45]); SQRADDAC(a[15], a[44]); SQRADDAC(a[16], a[43]); SQRADDAC(a[17], a[42]); SQRADDAC(a[18], a[41]); SQRADDAC(a[19], a[40]); SQRADDAC(a[20], a[39]); SQRADDAC(a[21], a[38]); SQRADDAC(a[22], a[37]); SQRADDAC(a[23], a[36]); SQRADDAC(a[24], a[35]); SQRADDAC(a[25], a[34]); SQRADDAC(a[26], a[33]); SQRADDAC(a[27], a[32]); SQRADDAC(a[28], a[31]); SQRADDAC(a[29], a[30]); SQRADDDB; + COMBA_STORE(b[59]); + + /* output 60 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[60]); SQRADDAC(a[1], a[59]); SQRADDAC(a[2], a[58]); SQRADDAC(a[3], a[57]); SQRADDAC(a[4], a[56]); SQRADDAC(a[5], a[55]); SQRADDAC(a[6], a[54]); SQRADDAC(a[7], a[53]); SQRADDAC(a[8], a[52]); SQRADDAC(a[9], a[51]); SQRADDAC(a[10], a[50]); SQRADDAC(a[11], a[49]); SQRADDAC(a[12], a[48]); SQRADDAC(a[13], a[47]); SQRADDAC(a[14], a[46]); SQRADDAC(a[15], a[45]); SQRADDAC(a[16], a[44]); SQRADDAC(a[17], a[43]); SQRADDAC(a[18], a[42]); SQRADDAC(a[19], a[41]); SQRADDAC(a[20], a[40]); SQRADDAC(a[21], a[39]); SQRADDAC(a[22], a[38]); SQRADDAC(a[23], a[37]); SQRADDAC(a[24], a[36]); SQRADDAC(a[25], a[35]); SQRADDAC(a[26], a[34]); SQRADDAC(a[27], a[33]); SQRADDAC(a[28], a[32]); SQRADDAC(a[29], a[31]); SQRADDDB; SQRADD(a[30], a[30]); + COMBA_STORE(b[60]); + + /* output 61 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[61]); SQRADDAC(a[1], a[60]); SQRADDAC(a[2], a[59]); SQRADDAC(a[3], a[58]); SQRADDAC(a[4], a[57]); SQRADDAC(a[5], a[56]); SQRADDAC(a[6], a[55]); SQRADDAC(a[7], a[54]); SQRADDAC(a[8], a[53]); SQRADDAC(a[9], a[52]); SQRADDAC(a[10], a[51]); SQRADDAC(a[11], a[50]); SQRADDAC(a[12], a[49]); SQRADDAC(a[13], a[48]); SQRADDAC(a[14], a[47]); SQRADDAC(a[15], a[46]); SQRADDAC(a[16], a[45]); SQRADDAC(a[17], a[44]); SQRADDAC(a[18], a[43]); SQRADDAC(a[19], a[42]); SQRADDAC(a[20], a[41]); SQRADDAC(a[21], a[40]); SQRADDAC(a[22], a[39]); SQRADDAC(a[23], a[38]); SQRADDAC(a[24], a[37]); SQRADDAC(a[25], a[36]); SQRADDAC(a[26], a[35]); SQRADDAC(a[27], a[34]); SQRADDAC(a[28], a[33]); SQRADDAC(a[29], a[32]); SQRADDAC(a[30], a[31]); SQRADDDB; + COMBA_STORE(b[61]); + + /* output 62 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[62]); SQRADDAC(a[1], a[61]); SQRADDAC(a[2], a[60]); SQRADDAC(a[3], a[59]); SQRADDAC(a[4], a[58]); SQRADDAC(a[5], a[57]); SQRADDAC(a[6], a[56]); SQRADDAC(a[7], a[55]); SQRADDAC(a[8], a[54]); SQRADDAC(a[9], a[53]); SQRADDAC(a[10], a[52]); SQRADDAC(a[11], a[51]); SQRADDAC(a[12], a[50]); SQRADDAC(a[13], a[49]); SQRADDAC(a[14], a[48]); SQRADDAC(a[15], a[47]); SQRADDAC(a[16], a[46]); SQRADDAC(a[17], a[45]); SQRADDAC(a[18], a[44]); SQRADDAC(a[19], a[43]); SQRADDAC(a[20], a[42]); SQRADDAC(a[21], a[41]); SQRADDAC(a[22], a[40]); SQRADDAC(a[23], a[39]); SQRADDAC(a[24], a[38]); SQRADDAC(a[25], a[37]); SQRADDAC(a[26], a[36]); SQRADDAC(a[27], a[35]); SQRADDAC(a[28], a[34]); SQRADDAC(a[29], a[33]); SQRADDAC(a[30], a[32]); SQRADDDB; SQRADD(a[31], a[31]); + COMBA_STORE(b[62]); + + /* output 63 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[63]); SQRADDAC(a[1], a[62]); SQRADDAC(a[2], a[61]); SQRADDAC(a[3], a[60]); SQRADDAC(a[4], a[59]); SQRADDAC(a[5], a[58]); SQRADDAC(a[6], a[57]); SQRADDAC(a[7], a[56]); SQRADDAC(a[8], a[55]); SQRADDAC(a[9], a[54]); SQRADDAC(a[10], a[53]); SQRADDAC(a[11], a[52]); SQRADDAC(a[12], a[51]); SQRADDAC(a[13], a[50]); SQRADDAC(a[14], a[49]); SQRADDAC(a[15], a[48]); SQRADDAC(a[16], a[47]); SQRADDAC(a[17], a[46]); SQRADDAC(a[18], a[45]); SQRADDAC(a[19], a[44]); SQRADDAC(a[20], a[43]); SQRADDAC(a[21], a[42]); SQRADDAC(a[22], a[41]); SQRADDAC(a[23], a[40]); SQRADDAC(a[24], a[39]); SQRADDAC(a[25], a[38]); SQRADDAC(a[26], a[37]); SQRADDAC(a[27], a[36]); SQRADDAC(a[28], a[35]); SQRADDAC(a[29], a[34]); SQRADDAC(a[30], a[33]); SQRADDAC(a[31], a[32]); SQRADDDB; + COMBA_STORE(b[63]); + + /* output 64 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[63]); SQRADDAC(a[2], a[62]); SQRADDAC(a[3], a[61]); SQRADDAC(a[4], a[60]); SQRADDAC(a[5], a[59]); SQRADDAC(a[6], a[58]); SQRADDAC(a[7], a[57]); SQRADDAC(a[8], a[56]); SQRADDAC(a[9], a[55]); SQRADDAC(a[10], a[54]); SQRADDAC(a[11], a[53]); SQRADDAC(a[12], a[52]); SQRADDAC(a[13], a[51]); SQRADDAC(a[14], a[50]); SQRADDAC(a[15], a[49]); SQRADDAC(a[16], a[48]); SQRADDAC(a[17], a[47]); SQRADDAC(a[18], a[46]); SQRADDAC(a[19], a[45]); SQRADDAC(a[20], a[44]); SQRADDAC(a[21], a[43]); SQRADDAC(a[22], a[42]); SQRADDAC(a[23], a[41]); SQRADDAC(a[24], a[40]); SQRADDAC(a[25], a[39]); SQRADDAC(a[26], a[38]); SQRADDAC(a[27], a[37]); SQRADDAC(a[28], a[36]); SQRADDAC(a[29], a[35]); SQRADDAC(a[30], a[34]); SQRADDAC(a[31], a[33]); SQRADDDB; SQRADD(a[32], a[32]); + COMBA_STORE(b[64]); + + /* output 65 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[63]); SQRADDAC(a[3], a[62]); SQRADDAC(a[4], a[61]); SQRADDAC(a[5], a[60]); SQRADDAC(a[6], a[59]); SQRADDAC(a[7], a[58]); SQRADDAC(a[8], a[57]); SQRADDAC(a[9], a[56]); SQRADDAC(a[10], a[55]); SQRADDAC(a[11], a[54]); SQRADDAC(a[12], a[53]); SQRADDAC(a[13], a[52]); SQRADDAC(a[14], a[51]); SQRADDAC(a[15], a[50]); SQRADDAC(a[16], a[49]); SQRADDAC(a[17], a[48]); SQRADDAC(a[18], a[47]); SQRADDAC(a[19], a[46]); SQRADDAC(a[20], a[45]); SQRADDAC(a[21], a[44]); SQRADDAC(a[22], a[43]); SQRADDAC(a[23], a[42]); SQRADDAC(a[24], a[41]); SQRADDAC(a[25], a[40]); SQRADDAC(a[26], a[39]); SQRADDAC(a[27], a[38]); SQRADDAC(a[28], a[37]); SQRADDAC(a[29], a[36]); SQRADDAC(a[30], a[35]); SQRADDAC(a[31], a[34]); SQRADDAC(a[32], a[33]); SQRADDDB; + COMBA_STORE(b[65]); + + /* output 66 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[63]); SQRADDAC(a[4], a[62]); SQRADDAC(a[5], a[61]); SQRADDAC(a[6], a[60]); SQRADDAC(a[7], a[59]); SQRADDAC(a[8], a[58]); SQRADDAC(a[9], a[57]); SQRADDAC(a[10], a[56]); SQRADDAC(a[11], a[55]); SQRADDAC(a[12], a[54]); SQRADDAC(a[13], a[53]); SQRADDAC(a[14], a[52]); SQRADDAC(a[15], a[51]); SQRADDAC(a[16], a[50]); SQRADDAC(a[17], a[49]); SQRADDAC(a[18], a[48]); SQRADDAC(a[19], a[47]); SQRADDAC(a[20], a[46]); SQRADDAC(a[21], a[45]); SQRADDAC(a[22], a[44]); SQRADDAC(a[23], a[43]); SQRADDAC(a[24], a[42]); SQRADDAC(a[25], a[41]); SQRADDAC(a[26], a[40]); SQRADDAC(a[27], a[39]); SQRADDAC(a[28], a[38]); SQRADDAC(a[29], a[37]); SQRADDAC(a[30], a[36]); SQRADDAC(a[31], a[35]); SQRADDAC(a[32], a[34]); SQRADDDB; SQRADD(a[33], a[33]); + COMBA_STORE(b[66]); + + /* output 67 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[63]); SQRADDAC(a[5], a[62]); SQRADDAC(a[6], a[61]); SQRADDAC(a[7], a[60]); SQRADDAC(a[8], a[59]); SQRADDAC(a[9], a[58]); SQRADDAC(a[10], a[57]); SQRADDAC(a[11], a[56]); SQRADDAC(a[12], a[55]); SQRADDAC(a[13], a[54]); SQRADDAC(a[14], a[53]); SQRADDAC(a[15], a[52]); SQRADDAC(a[16], a[51]); SQRADDAC(a[17], a[50]); SQRADDAC(a[18], a[49]); SQRADDAC(a[19], a[48]); SQRADDAC(a[20], a[47]); SQRADDAC(a[21], a[46]); SQRADDAC(a[22], a[45]); SQRADDAC(a[23], a[44]); SQRADDAC(a[24], a[43]); SQRADDAC(a[25], a[42]); SQRADDAC(a[26], a[41]); SQRADDAC(a[27], a[40]); SQRADDAC(a[28], a[39]); SQRADDAC(a[29], a[38]); SQRADDAC(a[30], a[37]); SQRADDAC(a[31], a[36]); SQRADDAC(a[32], a[35]); SQRADDAC(a[33], a[34]); SQRADDDB; + COMBA_STORE(b[67]); + + /* output 68 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[63]); SQRADDAC(a[6], a[62]); SQRADDAC(a[7], a[61]); SQRADDAC(a[8], a[60]); SQRADDAC(a[9], a[59]); SQRADDAC(a[10], a[58]); SQRADDAC(a[11], a[57]); SQRADDAC(a[12], a[56]); SQRADDAC(a[13], a[55]); SQRADDAC(a[14], a[54]); SQRADDAC(a[15], a[53]); SQRADDAC(a[16], a[52]); SQRADDAC(a[17], a[51]); SQRADDAC(a[18], a[50]); SQRADDAC(a[19], a[49]); SQRADDAC(a[20], a[48]); SQRADDAC(a[21], a[47]); SQRADDAC(a[22], a[46]); SQRADDAC(a[23], a[45]); SQRADDAC(a[24], a[44]); SQRADDAC(a[25], a[43]); SQRADDAC(a[26], a[42]); SQRADDAC(a[27], a[41]); SQRADDAC(a[28], a[40]); SQRADDAC(a[29], a[39]); SQRADDAC(a[30], a[38]); SQRADDAC(a[31], a[37]); SQRADDAC(a[32], a[36]); SQRADDAC(a[33], a[35]); SQRADDDB; SQRADD(a[34], a[34]); + COMBA_STORE(b[68]); + + /* output 69 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[63]); SQRADDAC(a[7], a[62]); SQRADDAC(a[8], a[61]); SQRADDAC(a[9], a[60]); SQRADDAC(a[10], a[59]); SQRADDAC(a[11], a[58]); SQRADDAC(a[12], a[57]); SQRADDAC(a[13], a[56]); SQRADDAC(a[14], a[55]); SQRADDAC(a[15], a[54]); SQRADDAC(a[16], a[53]); SQRADDAC(a[17], a[52]); SQRADDAC(a[18], a[51]); SQRADDAC(a[19], a[50]); SQRADDAC(a[20], a[49]); SQRADDAC(a[21], a[48]); SQRADDAC(a[22], a[47]); SQRADDAC(a[23], a[46]); SQRADDAC(a[24], a[45]); SQRADDAC(a[25], a[44]); SQRADDAC(a[26], a[43]); SQRADDAC(a[27], a[42]); SQRADDAC(a[28], a[41]); SQRADDAC(a[29], a[40]); SQRADDAC(a[30], a[39]); SQRADDAC(a[31], a[38]); SQRADDAC(a[32], a[37]); SQRADDAC(a[33], a[36]); SQRADDAC(a[34], a[35]); SQRADDDB; + COMBA_STORE(b[69]); + + /* output 70 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[63]); SQRADDAC(a[8], a[62]); SQRADDAC(a[9], a[61]); SQRADDAC(a[10], a[60]); SQRADDAC(a[11], a[59]); SQRADDAC(a[12], a[58]); SQRADDAC(a[13], a[57]); SQRADDAC(a[14], a[56]); SQRADDAC(a[15], a[55]); SQRADDAC(a[16], a[54]); SQRADDAC(a[17], a[53]); SQRADDAC(a[18], a[52]); SQRADDAC(a[19], a[51]); SQRADDAC(a[20], a[50]); SQRADDAC(a[21], a[49]); SQRADDAC(a[22], a[48]); SQRADDAC(a[23], a[47]); SQRADDAC(a[24], a[46]); SQRADDAC(a[25], a[45]); SQRADDAC(a[26], a[44]); SQRADDAC(a[27], a[43]); SQRADDAC(a[28], a[42]); SQRADDAC(a[29], a[41]); SQRADDAC(a[30], a[40]); SQRADDAC(a[31], a[39]); SQRADDAC(a[32], a[38]); SQRADDAC(a[33], a[37]); SQRADDAC(a[34], a[36]); SQRADDDB; SQRADD(a[35], a[35]); + COMBA_STORE(b[70]); + + /* output 71 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[63]); SQRADDAC(a[9], a[62]); SQRADDAC(a[10], a[61]); SQRADDAC(a[11], a[60]); SQRADDAC(a[12], a[59]); SQRADDAC(a[13], a[58]); SQRADDAC(a[14], a[57]); SQRADDAC(a[15], a[56]); SQRADDAC(a[16], a[55]); SQRADDAC(a[17], a[54]); SQRADDAC(a[18], a[53]); SQRADDAC(a[19], a[52]); SQRADDAC(a[20], a[51]); SQRADDAC(a[21], a[50]); SQRADDAC(a[22], a[49]); SQRADDAC(a[23], a[48]); SQRADDAC(a[24], a[47]); SQRADDAC(a[25], a[46]); SQRADDAC(a[26], a[45]); SQRADDAC(a[27], a[44]); SQRADDAC(a[28], a[43]); SQRADDAC(a[29], a[42]); SQRADDAC(a[30], a[41]); SQRADDAC(a[31], a[40]); SQRADDAC(a[32], a[39]); SQRADDAC(a[33], a[38]); SQRADDAC(a[34], a[37]); SQRADDAC(a[35], a[36]); SQRADDDB; + COMBA_STORE(b[71]); + + /* output 72 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[63]); SQRADDAC(a[10], a[62]); SQRADDAC(a[11], a[61]); SQRADDAC(a[12], a[60]); SQRADDAC(a[13], a[59]); SQRADDAC(a[14], a[58]); SQRADDAC(a[15], a[57]); SQRADDAC(a[16], a[56]); SQRADDAC(a[17], a[55]); SQRADDAC(a[18], a[54]); SQRADDAC(a[19], a[53]); SQRADDAC(a[20], a[52]); SQRADDAC(a[21], a[51]); SQRADDAC(a[22], a[50]); SQRADDAC(a[23], a[49]); SQRADDAC(a[24], a[48]); SQRADDAC(a[25], a[47]); SQRADDAC(a[26], a[46]); SQRADDAC(a[27], a[45]); SQRADDAC(a[28], a[44]); SQRADDAC(a[29], a[43]); SQRADDAC(a[30], a[42]); SQRADDAC(a[31], a[41]); SQRADDAC(a[32], a[40]); SQRADDAC(a[33], a[39]); SQRADDAC(a[34], a[38]); SQRADDAC(a[35], a[37]); SQRADDDB; SQRADD(a[36], a[36]); + COMBA_STORE(b[72]); + + /* output 73 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[63]); SQRADDAC(a[11], a[62]); SQRADDAC(a[12], a[61]); SQRADDAC(a[13], a[60]); SQRADDAC(a[14], a[59]); SQRADDAC(a[15], a[58]); SQRADDAC(a[16], a[57]); SQRADDAC(a[17], a[56]); SQRADDAC(a[18], a[55]); SQRADDAC(a[19], a[54]); SQRADDAC(a[20], a[53]); SQRADDAC(a[21], a[52]); SQRADDAC(a[22], a[51]); SQRADDAC(a[23], a[50]); SQRADDAC(a[24], a[49]); SQRADDAC(a[25], a[48]); SQRADDAC(a[26], a[47]); SQRADDAC(a[27], a[46]); SQRADDAC(a[28], a[45]); SQRADDAC(a[29], a[44]); SQRADDAC(a[30], a[43]); SQRADDAC(a[31], a[42]); SQRADDAC(a[32], a[41]); SQRADDAC(a[33], a[40]); SQRADDAC(a[34], a[39]); SQRADDAC(a[35], a[38]); SQRADDAC(a[36], a[37]); SQRADDDB; + COMBA_STORE(b[73]); + + /* output 74 */ + CARRY_FORWARD; + SQRADDSC(a[11], a[63]); SQRADDAC(a[12], a[62]); SQRADDAC(a[13], a[61]); SQRADDAC(a[14], a[60]); SQRADDAC(a[15], a[59]); SQRADDAC(a[16], a[58]); SQRADDAC(a[17], a[57]); SQRADDAC(a[18], a[56]); SQRADDAC(a[19], a[55]); SQRADDAC(a[20], a[54]); SQRADDAC(a[21], a[53]); SQRADDAC(a[22], a[52]); SQRADDAC(a[23], a[51]); SQRADDAC(a[24], a[50]); SQRADDAC(a[25], a[49]); SQRADDAC(a[26], a[48]); SQRADDAC(a[27], a[47]); SQRADDAC(a[28], a[46]); SQRADDAC(a[29], a[45]); SQRADDAC(a[30], a[44]); SQRADDAC(a[31], a[43]); SQRADDAC(a[32], a[42]); SQRADDAC(a[33], a[41]); SQRADDAC(a[34], a[40]); SQRADDAC(a[35], a[39]); SQRADDAC(a[36], a[38]); SQRADDDB; SQRADD(a[37], a[37]); + COMBA_STORE(b[74]); + + /* output 75 */ + CARRY_FORWARD; + SQRADDSC(a[12], a[63]); SQRADDAC(a[13], a[62]); SQRADDAC(a[14], a[61]); SQRADDAC(a[15], a[60]); SQRADDAC(a[16], a[59]); SQRADDAC(a[17], a[58]); SQRADDAC(a[18], a[57]); SQRADDAC(a[19], a[56]); SQRADDAC(a[20], a[55]); SQRADDAC(a[21], a[54]); SQRADDAC(a[22], a[53]); SQRADDAC(a[23], a[52]); SQRADDAC(a[24], a[51]); SQRADDAC(a[25], a[50]); SQRADDAC(a[26], a[49]); SQRADDAC(a[27], a[48]); SQRADDAC(a[28], a[47]); SQRADDAC(a[29], a[46]); SQRADDAC(a[30], a[45]); SQRADDAC(a[31], a[44]); SQRADDAC(a[32], a[43]); SQRADDAC(a[33], a[42]); SQRADDAC(a[34], a[41]); SQRADDAC(a[35], a[40]); SQRADDAC(a[36], a[39]); SQRADDAC(a[37], a[38]); SQRADDDB; + COMBA_STORE(b[75]); + + /* output 76 */ + CARRY_FORWARD; + SQRADDSC(a[13], a[63]); SQRADDAC(a[14], a[62]); SQRADDAC(a[15], a[61]); SQRADDAC(a[16], a[60]); SQRADDAC(a[17], a[59]); SQRADDAC(a[18], a[58]); SQRADDAC(a[19], a[57]); SQRADDAC(a[20], a[56]); SQRADDAC(a[21], a[55]); SQRADDAC(a[22], a[54]); SQRADDAC(a[23], a[53]); SQRADDAC(a[24], a[52]); SQRADDAC(a[25], a[51]); SQRADDAC(a[26], a[50]); SQRADDAC(a[27], a[49]); SQRADDAC(a[28], a[48]); SQRADDAC(a[29], a[47]); SQRADDAC(a[30], a[46]); SQRADDAC(a[31], a[45]); SQRADDAC(a[32], a[44]); SQRADDAC(a[33], a[43]); SQRADDAC(a[34], a[42]); SQRADDAC(a[35], a[41]); SQRADDAC(a[36], a[40]); SQRADDAC(a[37], a[39]); SQRADDDB; SQRADD(a[38], a[38]); + COMBA_STORE(b[76]); + + /* output 77 */ + CARRY_FORWARD; + SQRADDSC(a[14], a[63]); SQRADDAC(a[15], a[62]); SQRADDAC(a[16], a[61]); SQRADDAC(a[17], a[60]); SQRADDAC(a[18], a[59]); SQRADDAC(a[19], a[58]); SQRADDAC(a[20], a[57]); SQRADDAC(a[21], a[56]); SQRADDAC(a[22], a[55]); SQRADDAC(a[23], a[54]); SQRADDAC(a[24], a[53]); SQRADDAC(a[25], a[52]); SQRADDAC(a[26], a[51]); SQRADDAC(a[27], a[50]); SQRADDAC(a[28], a[49]); SQRADDAC(a[29], a[48]); SQRADDAC(a[30], a[47]); SQRADDAC(a[31], a[46]); SQRADDAC(a[32], a[45]); SQRADDAC(a[33], a[44]); SQRADDAC(a[34], a[43]); SQRADDAC(a[35], a[42]); SQRADDAC(a[36], a[41]); SQRADDAC(a[37], a[40]); SQRADDAC(a[38], a[39]); SQRADDDB; + COMBA_STORE(b[77]); + + /* output 78 */ + CARRY_FORWARD; + SQRADDSC(a[15], a[63]); SQRADDAC(a[16], a[62]); SQRADDAC(a[17], a[61]); SQRADDAC(a[18], a[60]); SQRADDAC(a[19], a[59]); SQRADDAC(a[20], a[58]); SQRADDAC(a[21], a[57]); SQRADDAC(a[22], a[56]); SQRADDAC(a[23], a[55]); SQRADDAC(a[24], a[54]); SQRADDAC(a[25], a[53]); SQRADDAC(a[26], a[52]); SQRADDAC(a[27], a[51]); SQRADDAC(a[28], a[50]); SQRADDAC(a[29], a[49]); SQRADDAC(a[30], a[48]); SQRADDAC(a[31], a[47]); SQRADDAC(a[32], a[46]); SQRADDAC(a[33], a[45]); SQRADDAC(a[34], a[44]); SQRADDAC(a[35], a[43]); SQRADDAC(a[36], a[42]); SQRADDAC(a[37], a[41]); SQRADDAC(a[38], a[40]); SQRADDDB; SQRADD(a[39], a[39]); + COMBA_STORE(b[78]); + + /* output 79 */ + CARRY_FORWARD; + SQRADDSC(a[16], a[63]); SQRADDAC(a[17], a[62]); SQRADDAC(a[18], a[61]); SQRADDAC(a[19], a[60]); SQRADDAC(a[20], a[59]); SQRADDAC(a[21], a[58]); SQRADDAC(a[22], a[57]); SQRADDAC(a[23], a[56]); SQRADDAC(a[24], a[55]); SQRADDAC(a[25], a[54]); SQRADDAC(a[26], a[53]); SQRADDAC(a[27], a[52]); SQRADDAC(a[28], a[51]); SQRADDAC(a[29], a[50]); SQRADDAC(a[30], a[49]); SQRADDAC(a[31], a[48]); SQRADDAC(a[32], a[47]); SQRADDAC(a[33], a[46]); SQRADDAC(a[34], a[45]); SQRADDAC(a[35], a[44]); SQRADDAC(a[36], a[43]); SQRADDAC(a[37], a[42]); SQRADDAC(a[38], a[41]); SQRADDAC(a[39], a[40]); SQRADDDB; + COMBA_STORE(b[79]); + + /* output 80 */ + CARRY_FORWARD; + SQRADDSC(a[17], a[63]); SQRADDAC(a[18], a[62]); SQRADDAC(a[19], a[61]); SQRADDAC(a[20], a[60]); SQRADDAC(a[21], a[59]); SQRADDAC(a[22], a[58]); SQRADDAC(a[23], a[57]); SQRADDAC(a[24], a[56]); SQRADDAC(a[25], a[55]); SQRADDAC(a[26], a[54]); SQRADDAC(a[27], a[53]); SQRADDAC(a[28], a[52]); SQRADDAC(a[29], a[51]); SQRADDAC(a[30], a[50]); SQRADDAC(a[31], a[49]); SQRADDAC(a[32], a[48]); SQRADDAC(a[33], a[47]); SQRADDAC(a[34], a[46]); SQRADDAC(a[35], a[45]); SQRADDAC(a[36], a[44]); SQRADDAC(a[37], a[43]); SQRADDAC(a[38], a[42]); SQRADDAC(a[39], a[41]); SQRADDDB; SQRADD(a[40], a[40]); + COMBA_STORE(b[80]); + + /* output 81 */ + CARRY_FORWARD; + SQRADDSC(a[18], a[63]); SQRADDAC(a[19], a[62]); SQRADDAC(a[20], a[61]); SQRADDAC(a[21], a[60]); SQRADDAC(a[22], a[59]); SQRADDAC(a[23], a[58]); SQRADDAC(a[24], a[57]); SQRADDAC(a[25], a[56]); SQRADDAC(a[26], a[55]); SQRADDAC(a[27], a[54]); SQRADDAC(a[28], a[53]); SQRADDAC(a[29], a[52]); SQRADDAC(a[30], a[51]); SQRADDAC(a[31], a[50]); SQRADDAC(a[32], a[49]); SQRADDAC(a[33], a[48]); SQRADDAC(a[34], a[47]); SQRADDAC(a[35], a[46]); SQRADDAC(a[36], a[45]); SQRADDAC(a[37], a[44]); SQRADDAC(a[38], a[43]); SQRADDAC(a[39], a[42]); SQRADDAC(a[40], a[41]); SQRADDDB; + COMBA_STORE(b[81]); + + /* output 82 */ + CARRY_FORWARD; + SQRADDSC(a[19], a[63]); SQRADDAC(a[20], a[62]); SQRADDAC(a[21], a[61]); SQRADDAC(a[22], a[60]); SQRADDAC(a[23], a[59]); SQRADDAC(a[24], a[58]); SQRADDAC(a[25], a[57]); SQRADDAC(a[26], a[56]); SQRADDAC(a[27], a[55]); SQRADDAC(a[28], a[54]); SQRADDAC(a[29], a[53]); SQRADDAC(a[30], a[52]); SQRADDAC(a[31], a[51]); SQRADDAC(a[32], a[50]); SQRADDAC(a[33], a[49]); SQRADDAC(a[34], a[48]); SQRADDAC(a[35], a[47]); SQRADDAC(a[36], a[46]); SQRADDAC(a[37], a[45]); SQRADDAC(a[38], a[44]); SQRADDAC(a[39], a[43]); SQRADDAC(a[40], a[42]); SQRADDDB; SQRADD(a[41], a[41]); + COMBA_STORE(b[82]); + + /* output 83 */ + CARRY_FORWARD; + SQRADDSC(a[20], a[63]); SQRADDAC(a[21], a[62]); SQRADDAC(a[22], a[61]); SQRADDAC(a[23], a[60]); SQRADDAC(a[24], a[59]); SQRADDAC(a[25], a[58]); SQRADDAC(a[26], a[57]); SQRADDAC(a[27], a[56]); SQRADDAC(a[28], a[55]); SQRADDAC(a[29], a[54]); SQRADDAC(a[30], a[53]); SQRADDAC(a[31], a[52]); SQRADDAC(a[32], a[51]); SQRADDAC(a[33], a[50]); SQRADDAC(a[34], a[49]); SQRADDAC(a[35], a[48]); SQRADDAC(a[36], a[47]); SQRADDAC(a[37], a[46]); SQRADDAC(a[38], a[45]); SQRADDAC(a[39], a[44]); SQRADDAC(a[40], a[43]); SQRADDAC(a[41], a[42]); SQRADDDB; + COMBA_STORE(b[83]); + + /* output 84 */ + CARRY_FORWARD; + SQRADDSC(a[21], a[63]); SQRADDAC(a[22], a[62]); SQRADDAC(a[23], a[61]); SQRADDAC(a[24], a[60]); SQRADDAC(a[25], a[59]); SQRADDAC(a[26], a[58]); SQRADDAC(a[27], a[57]); SQRADDAC(a[28], a[56]); SQRADDAC(a[29], a[55]); SQRADDAC(a[30], a[54]); SQRADDAC(a[31], a[53]); SQRADDAC(a[32], a[52]); SQRADDAC(a[33], a[51]); SQRADDAC(a[34], a[50]); SQRADDAC(a[35], a[49]); SQRADDAC(a[36], a[48]); SQRADDAC(a[37], a[47]); SQRADDAC(a[38], a[46]); SQRADDAC(a[39], a[45]); SQRADDAC(a[40], a[44]); SQRADDAC(a[41], a[43]); SQRADDDB; SQRADD(a[42], a[42]); + COMBA_STORE(b[84]); + + /* output 85 */ + CARRY_FORWARD; + SQRADDSC(a[22], a[63]); SQRADDAC(a[23], a[62]); SQRADDAC(a[24], a[61]); SQRADDAC(a[25], a[60]); SQRADDAC(a[26], a[59]); SQRADDAC(a[27], a[58]); SQRADDAC(a[28], a[57]); SQRADDAC(a[29], a[56]); SQRADDAC(a[30], a[55]); SQRADDAC(a[31], a[54]); SQRADDAC(a[32], a[53]); SQRADDAC(a[33], a[52]); SQRADDAC(a[34], a[51]); SQRADDAC(a[35], a[50]); SQRADDAC(a[36], a[49]); SQRADDAC(a[37], a[48]); SQRADDAC(a[38], a[47]); SQRADDAC(a[39], a[46]); SQRADDAC(a[40], a[45]); SQRADDAC(a[41], a[44]); SQRADDAC(a[42], a[43]); SQRADDDB; + COMBA_STORE(b[85]); + + /* output 86 */ + CARRY_FORWARD; + SQRADDSC(a[23], a[63]); SQRADDAC(a[24], a[62]); SQRADDAC(a[25], a[61]); SQRADDAC(a[26], a[60]); SQRADDAC(a[27], a[59]); SQRADDAC(a[28], a[58]); SQRADDAC(a[29], a[57]); SQRADDAC(a[30], a[56]); SQRADDAC(a[31], a[55]); SQRADDAC(a[32], a[54]); SQRADDAC(a[33], a[53]); SQRADDAC(a[34], a[52]); SQRADDAC(a[35], a[51]); SQRADDAC(a[36], a[50]); SQRADDAC(a[37], a[49]); SQRADDAC(a[38], a[48]); SQRADDAC(a[39], a[47]); SQRADDAC(a[40], a[46]); SQRADDAC(a[41], a[45]); SQRADDAC(a[42], a[44]); SQRADDDB; SQRADD(a[43], a[43]); + COMBA_STORE(b[86]); + + /* output 87 */ + CARRY_FORWARD; + SQRADDSC(a[24], a[63]); SQRADDAC(a[25], a[62]); SQRADDAC(a[26], a[61]); SQRADDAC(a[27], a[60]); SQRADDAC(a[28], a[59]); SQRADDAC(a[29], a[58]); SQRADDAC(a[30], a[57]); SQRADDAC(a[31], a[56]); SQRADDAC(a[32], a[55]); SQRADDAC(a[33], a[54]); SQRADDAC(a[34], a[53]); SQRADDAC(a[35], a[52]); SQRADDAC(a[36], a[51]); SQRADDAC(a[37], a[50]); SQRADDAC(a[38], a[49]); SQRADDAC(a[39], a[48]); SQRADDAC(a[40], a[47]); SQRADDAC(a[41], a[46]); SQRADDAC(a[42], a[45]); SQRADDAC(a[43], a[44]); SQRADDDB; + COMBA_STORE(b[87]); + + /* output 88 */ + CARRY_FORWARD; + SQRADDSC(a[25], a[63]); SQRADDAC(a[26], a[62]); SQRADDAC(a[27], a[61]); SQRADDAC(a[28], a[60]); SQRADDAC(a[29], a[59]); SQRADDAC(a[30], a[58]); SQRADDAC(a[31], a[57]); SQRADDAC(a[32], a[56]); SQRADDAC(a[33], a[55]); SQRADDAC(a[34], a[54]); SQRADDAC(a[35], a[53]); SQRADDAC(a[36], a[52]); SQRADDAC(a[37], a[51]); SQRADDAC(a[38], a[50]); SQRADDAC(a[39], a[49]); SQRADDAC(a[40], a[48]); SQRADDAC(a[41], a[47]); SQRADDAC(a[42], a[46]); SQRADDAC(a[43], a[45]); SQRADDDB; SQRADD(a[44], a[44]); + COMBA_STORE(b[88]); + + /* output 89 */ + CARRY_FORWARD; + SQRADDSC(a[26], a[63]); SQRADDAC(a[27], a[62]); SQRADDAC(a[28], a[61]); SQRADDAC(a[29], a[60]); SQRADDAC(a[30], a[59]); SQRADDAC(a[31], a[58]); SQRADDAC(a[32], a[57]); SQRADDAC(a[33], a[56]); SQRADDAC(a[34], a[55]); SQRADDAC(a[35], a[54]); SQRADDAC(a[36], a[53]); SQRADDAC(a[37], a[52]); SQRADDAC(a[38], a[51]); SQRADDAC(a[39], a[50]); SQRADDAC(a[40], a[49]); SQRADDAC(a[41], a[48]); SQRADDAC(a[42], a[47]); SQRADDAC(a[43], a[46]); SQRADDAC(a[44], a[45]); SQRADDDB; + COMBA_STORE(b[89]); + + /* output 90 */ + CARRY_FORWARD; + SQRADDSC(a[27], a[63]); SQRADDAC(a[28], a[62]); SQRADDAC(a[29], a[61]); SQRADDAC(a[30], a[60]); SQRADDAC(a[31], a[59]); SQRADDAC(a[32], a[58]); SQRADDAC(a[33], a[57]); SQRADDAC(a[34], a[56]); SQRADDAC(a[35], a[55]); SQRADDAC(a[36], a[54]); SQRADDAC(a[37], a[53]); SQRADDAC(a[38], a[52]); SQRADDAC(a[39], a[51]); SQRADDAC(a[40], a[50]); SQRADDAC(a[41], a[49]); SQRADDAC(a[42], a[48]); SQRADDAC(a[43], a[47]); SQRADDAC(a[44], a[46]); SQRADDDB; SQRADD(a[45], a[45]); + COMBA_STORE(b[90]); + + /* output 91 */ + CARRY_FORWARD; + SQRADDSC(a[28], a[63]); SQRADDAC(a[29], a[62]); SQRADDAC(a[30], a[61]); SQRADDAC(a[31], a[60]); SQRADDAC(a[32], a[59]); SQRADDAC(a[33], a[58]); SQRADDAC(a[34], a[57]); SQRADDAC(a[35], a[56]); SQRADDAC(a[36], a[55]); SQRADDAC(a[37], a[54]); SQRADDAC(a[38], a[53]); SQRADDAC(a[39], a[52]); SQRADDAC(a[40], a[51]); SQRADDAC(a[41], a[50]); SQRADDAC(a[42], a[49]); SQRADDAC(a[43], a[48]); SQRADDAC(a[44], a[47]); SQRADDAC(a[45], a[46]); SQRADDDB; + COMBA_STORE(b[91]); + + /* output 92 */ + CARRY_FORWARD; + SQRADDSC(a[29], a[63]); SQRADDAC(a[30], a[62]); SQRADDAC(a[31], a[61]); SQRADDAC(a[32], a[60]); SQRADDAC(a[33], a[59]); SQRADDAC(a[34], a[58]); SQRADDAC(a[35], a[57]); SQRADDAC(a[36], a[56]); SQRADDAC(a[37], a[55]); SQRADDAC(a[38], a[54]); SQRADDAC(a[39], a[53]); SQRADDAC(a[40], a[52]); SQRADDAC(a[41], a[51]); SQRADDAC(a[42], a[50]); SQRADDAC(a[43], a[49]); SQRADDAC(a[44], a[48]); SQRADDAC(a[45], a[47]); SQRADDDB; SQRADD(a[46], a[46]); + COMBA_STORE(b[92]); + + /* output 93 */ + CARRY_FORWARD; + SQRADDSC(a[30], a[63]); SQRADDAC(a[31], a[62]); SQRADDAC(a[32], a[61]); SQRADDAC(a[33], a[60]); SQRADDAC(a[34], a[59]); SQRADDAC(a[35], a[58]); SQRADDAC(a[36], a[57]); SQRADDAC(a[37], a[56]); SQRADDAC(a[38], a[55]); SQRADDAC(a[39], a[54]); SQRADDAC(a[40], a[53]); SQRADDAC(a[41], a[52]); SQRADDAC(a[42], a[51]); SQRADDAC(a[43], a[50]); SQRADDAC(a[44], a[49]); SQRADDAC(a[45], a[48]); SQRADDAC(a[46], a[47]); SQRADDDB; + COMBA_STORE(b[93]); + + /* output 94 */ + CARRY_FORWARD; + SQRADDSC(a[31], a[63]); SQRADDAC(a[32], a[62]); SQRADDAC(a[33], a[61]); SQRADDAC(a[34], a[60]); SQRADDAC(a[35], a[59]); SQRADDAC(a[36], a[58]); SQRADDAC(a[37], a[57]); SQRADDAC(a[38], a[56]); SQRADDAC(a[39], a[55]); SQRADDAC(a[40], a[54]); SQRADDAC(a[41], a[53]); SQRADDAC(a[42], a[52]); SQRADDAC(a[43], a[51]); SQRADDAC(a[44], a[50]); SQRADDAC(a[45], a[49]); SQRADDAC(a[46], a[48]); SQRADDDB; SQRADD(a[47], a[47]); + COMBA_STORE(b[94]); + + /* output 95 */ + CARRY_FORWARD; + SQRADDSC(a[32], a[63]); SQRADDAC(a[33], a[62]); SQRADDAC(a[34], a[61]); SQRADDAC(a[35], a[60]); SQRADDAC(a[36], a[59]); SQRADDAC(a[37], a[58]); SQRADDAC(a[38], a[57]); SQRADDAC(a[39], a[56]); SQRADDAC(a[40], a[55]); SQRADDAC(a[41], a[54]); SQRADDAC(a[42], a[53]); SQRADDAC(a[43], a[52]); SQRADDAC(a[44], a[51]); SQRADDAC(a[45], a[50]); SQRADDAC(a[46], a[49]); SQRADDAC(a[47], a[48]); SQRADDDB; + COMBA_STORE(b[95]); + + /* output 96 */ + CARRY_FORWARD; + SQRADDSC(a[33], a[63]); SQRADDAC(a[34], a[62]); SQRADDAC(a[35], a[61]); SQRADDAC(a[36], a[60]); SQRADDAC(a[37], a[59]); SQRADDAC(a[38], a[58]); SQRADDAC(a[39], a[57]); SQRADDAC(a[40], a[56]); SQRADDAC(a[41], a[55]); SQRADDAC(a[42], a[54]); SQRADDAC(a[43], a[53]); SQRADDAC(a[44], a[52]); SQRADDAC(a[45], a[51]); SQRADDAC(a[46], a[50]); SQRADDAC(a[47], a[49]); SQRADDDB; SQRADD(a[48], a[48]); + COMBA_STORE(b[96]); + + /* output 97 */ + CARRY_FORWARD; + SQRADDSC(a[34], a[63]); SQRADDAC(a[35], a[62]); SQRADDAC(a[36], a[61]); SQRADDAC(a[37], a[60]); SQRADDAC(a[38], a[59]); SQRADDAC(a[39], a[58]); SQRADDAC(a[40], a[57]); SQRADDAC(a[41], a[56]); SQRADDAC(a[42], a[55]); SQRADDAC(a[43], a[54]); SQRADDAC(a[44], a[53]); SQRADDAC(a[45], a[52]); SQRADDAC(a[46], a[51]); SQRADDAC(a[47], a[50]); SQRADDAC(a[48], a[49]); SQRADDDB; + COMBA_STORE(b[97]); + + /* output 98 */ + CARRY_FORWARD; + SQRADDSC(a[35], a[63]); SQRADDAC(a[36], a[62]); SQRADDAC(a[37], a[61]); SQRADDAC(a[38], a[60]); SQRADDAC(a[39], a[59]); SQRADDAC(a[40], a[58]); SQRADDAC(a[41], a[57]); SQRADDAC(a[42], a[56]); SQRADDAC(a[43], a[55]); SQRADDAC(a[44], a[54]); SQRADDAC(a[45], a[53]); SQRADDAC(a[46], a[52]); SQRADDAC(a[47], a[51]); SQRADDAC(a[48], a[50]); SQRADDDB; SQRADD(a[49], a[49]); + COMBA_STORE(b[98]); + + /* output 99 */ + CARRY_FORWARD; + SQRADDSC(a[36], a[63]); SQRADDAC(a[37], a[62]); SQRADDAC(a[38], a[61]); SQRADDAC(a[39], a[60]); SQRADDAC(a[40], a[59]); SQRADDAC(a[41], a[58]); SQRADDAC(a[42], a[57]); SQRADDAC(a[43], a[56]); SQRADDAC(a[44], a[55]); SQRADDAC(a[45], a[54]); SQRADDAC(a[46], a[53]); SQRADDAC(a[47], a[52]); SQRADDAC(a[48], a[51]); SQRADDAC(a[49], a[50]); SQRADDDB; + COMBA_STORE(b[99]); + + /* output 100 */ + CARRY_FORWARD; + SQRADDSC(a[37], a[63]); SQRADDAC(a[38], a[62]); SQRADDAC(a[39], a[61]); SQRADDAC(a[40], a[60]); SQRADDAC(a[41], a[59]); SQRADDAC(a[42], a[58]); SQRADDAC(a[43], a[57]); SQRADDAC(a[44], a[56]); SQRADDAC(a[45], a[55]); SQRADDAC(a[46], a[54]); SQRADDAC(a[47], a[53]); SQRADDAC(a[48], a[52]); SQRADDAC(a[49], a[51]); SQRADDDB; SQRADD(a[50], a[50]); + COMBA_STORE(b[100]); + + /* output 101 */ + CARRY_FORWARD; + SQRADDSC(a[38], a[63]); SQRADDAC(a[39], a[62]); SQRADDAC(a[40], a[61]); SQRADDAC(a[41], a[60]); SQRADDAC(a[42], a[59]); SQRADDAC(a[43], a[58]); SQRADDAC(a[44], a[57]); SQRADDAC(a[45], a[56]); SQRADDAC(a[46], a[55]); SQRADDAC(a[47], a[54]); SQRADDAC(a[48], a[53]); SQRADDAC(a[49], a[52]); SQRADDAC(a[50], a[51]); SQRADDDB; + COMBA_STORE(b[101]); + + /* output 102 */ + CARRY_FORWARD; + SQRADDSC(a[39], a[63]); SQRADDAC(a[40], a[62]); SQRADDAC(a[41], a[61]); SQRADDAC(a[42], a[60]); SQRADDAC(a[43], a[59]); SQRADDAC(a[44], a[58]); SQRADDAC(a[45], a[57]); SQRADDAC(a[46], a[56]); SQRADDAC(a[47], a[55]); SQRADDAC(a[48], a[54]); SQRADDAC(a[49], a[53]); SQRADDAC(a[50], a[52]); SQRADDDB; SQRADD(a[51], a[51]); + COMBA_STORE(b[102]); + + /* output 103 */ + CARRY_FORWARD; + SQRADDSC(a[40], a[63]); SQRADDAC(a[41], a[62]); SQRADDAC(a[42], a[61]); SQRADDAC(a[43], a[60]); SQRADDAC(a[44], a[59]); SQRADDAC(a[45], a[58]); SQRADDAC(a[46], a[57]); SQRADDAC(a[47], a[56]); SQRADDAC(a[48], a[55]); SQRADDAC(a[49], a[54]); SQRADDAC(a[50], a[53]); SQRADDAC(a[51], a[52]); SQRADDDB; + COMBA_STORE(b[103]); + + /* output 104 */ + CARRY_FORWARD; + SQRADDSC(a[41], a[63]); SQRADDAC(a[42], a[62]); SQRADDAC(a[43], a[61]); SQRADDAC(a[44], a[60]); SQRADDAC(a[45], a[59]); SQRADDAC(a[46], a[58]); SQRADDAC(a[47], a[57]); SQRADDAC(a[48], a[56]); SQRADDAC(a[49], a[55]); SQRADDAC(a[50], a[54]); SQRADDAC(a[51], a[53]); SQRADDDB; SQRADD(a[52], a[52]); + COMBA_STORE(b[104]); + + /* output 105 */ + CARRY_FORWARD; + SQRADDSC(a[42], a[63]); SQRADDAC(a[43], a[62]); SQRADDAC(a[44], a[61]); SQRADDAC(a[45], a[60]); SQRADDAC(a[46], a[59]); SQRADDAC(a[47], a[58]); SQRADDAC(a[48], a[57]); SQRADDAC(a[49], a[56]); SQRADDAC(a[50], a[55]); SQRADDAC(a[51], a[54]); SQRADDAC(a[52], a[53]); SQRADDDB; + COMBA_STORE(b[105]); + + /* output 106 */ + CARRY_FORWARD; + SQRADDSC(a[43], a[63]); SQRADDAC(a[44], a[62]); SQRADDAC(a[45], a[61]); SQRADDAC(a[46], a[60]); SQRADDAC(a[47], a[59]); SQRADDAC(a[48], a[58]); SQRADDAC(a[49], a[57]); SQRADDAC(a[50], a[56]); SQRADDAC(a[51], a[55]); SQRADDAC(a[52], a[54]); SQRADDDB; SQRADD(a[53], a[53]); + COMBA_STORE(b[106]); + + /* output 107 */ + CARRY_FORWARD; + SQRADDSC(a[44], a[63]); SQRADDAC(a[45], a[62]); SQRADDAC(a[46], a[61]); SQRADDAC(a[47], a[60]); SQRADDAC(a[48], a[59]); SQRADDAC(a[49], a[58]); SQRADDAC(a[50], a[57]); SQRADDAC(a[51], a[56]); SQRADDAC(a[52], a[55]); SQRADDAC(a[53], a[54]); SQRADDDB; + COMBA_STORE(b[107]); + + /* output 108 */ + CARRY_FORWARD; + SQRADDSC(a[45], a[63]); SQRADDAC(a[46], a[62]); SQRADDAC(a[47], a[61]); SQRADDAC(a[48], a[60]); SQRADDAC(a[49], a[59]); SQRADDAC(a[50], a[58]); SQRADDAC(a[51], a[57]); SQRADDAC(a[52], a[56]); SQRADDAC(a[53], a[55]); SQRADDDB; SQRADD(a[54], a[54]); + COMBA_STORE(b[108]); + + /* output 109 */ + CARRY_FORWARD; + SQRADDSC(a[46], a[63]); SQRADDAC(a[47], a[62]); SQRADDAC(a[48], a[61]); SQRADDAC(a[49], a[60]); SQRADDAC(a[50], a[59]); SQRADDAC(a[51], a[58]); SQRADDAC(a[52], a[57]); SQRADDAC(a[53], a[56]); SQRADDAC(a[54], a[55]); SQRADDDB; + COMBA_STORE(b[109]); + + /* output 110 */ + CARRY_FORWARD; + SQRADDSC(a[47], a[63]); SQRADDAC(a[48], a[62]); SQRADDAC(a[49], a[61]); SQRADDAC(a[50], a[60]); SQRADDAC(a[51], a[59]); SQRADDAC(a[52], a[58]); SQRADDAC(a[53], a[57]); SQRADDAC(a[54], a[56]); SQRADDDB; SQRADD(a[55], a[55]); + COMBA_STORE(b[110]); + + /* output 111 */ + CARRY_FORWARD; + SQRADDSC(a[48], a[63]); SQRADDAC(a[49], a[62]); SQRADDAC(a[50], a[61]); SQRADDAC(a[51], a[60]); SQRADDAC(a[52], a[59]); SQRADDAC(a[53], a[58]); SQRADDAC(a[54], a[57]); SQRADDAC(a[55], a[56]); SQRADDDB; + COMBA_STORE(b[111]); + + /* output 112 */ + CARRY_FORWARD; + SQRADDSC(a[49], a[63]); SQRADDAC(a[50], a[62]); SQRADDAC(a[51], a[61]); SQRADDAC(a[52], a[60]); SQRADDAC(a[53], a[59]); SQRADDAC(a[54], a[58]); SQRADDAC(a[55], a[57]); SQRADDDB; SQRADD(a[56], a[56]); + COMBA_STORE(b[112]); + + /* output 113 */ + CARRY_FORWARD; + SQRADDSC(a[50], a[63]); SQRADDAC(a[51], a[62]); SQRADDAC(a[52], a[61]); SQRADDAC(a[53], a[60]); SQRADDAC(a[54], a[59]); SQRADDAC(a[55], a[58]); SQRADDAC(a[56], a[57]); SQRADDDB; + COMBA_STORE(b[113]); + + /* output 114 */ + CARRY_FORWARD; + SQRADDSC(a[51], a[63]); SQRADDAC(a[52], a[62]); SQRADDAC(a[53], a[61]); SQRADDAC(a[54], a[60]); SQRADDAC(a[55], a[59]); SQRADDAC(a[56], a[58]); SQRADDDB; SQRADD(a[57], a[57]); + COMBA_STORE(b[114]); + + /* output 115 */ + CARRY_FORWARD; + SQRADDSC(a[52], a[63]); SQRADDAC(a[53], a[62]); SQRADDAC(a[54], a[61]); SQRADDAC(a[55], a[60]); SQRADDAC(a[56], a[59]); SQRADDAC(a[57], a[58]); SQRADDDB; + COMBA_STORE(b[115]); + + /* output 116 */ + CARRY_FORWARD; + SQRADDSC(a[53], a[63]); SQRADDAC(a[54], a[62]); SQRADDAC(a[55], a[61]); SQRADDAC(a[56], a[60]); SQRADDAC(a[57], a[59]); SQRADDDB; SQRADD(a[58], a[58]); + COMBA_STORE(b[116]); + + /* output 117 */ + CARRY_FORWARD; + SQRADDSC(a[54], a[63]); SQRADDAC(a[55], a[62]); SQRADDAC(a[56], a[61]); SQRADDAC(a[57], a[60]); SQRADDAC(a[58], a[59]); SQRADDDB; + COMBA_STORE(b[117]); + + /* output 118 */ + CARRY_FORWARD; + SQRADDSC(a[55], a[63]); SQRADDAC(a[56], a[62]); SQRADDAC(a[57], a[61]); SQRADDAC(a[58], a[60]); SQRADDDB; SQRADD(a[59], a[59]); + COMBA_STORE(b[118]); + + /* output 119 */ + CARRY_FORWARD; + SQRADDSC(a[56], a[63]); SQRADDAC(a[57], a[62]); SQRADDAC(a[58], a[61]); SQRADDAC(a[59], a[60]); SQRADDDB; + COMBA_STORE(b[119]); + + /* output 120 */ + CARRY_FORWARD; + SQRADDSC(a[57], a[63]); SQRADDAC(a[58], a[62]); SQRADDAC(a[59], a[61]); SQRADDDB; SQRADD(a[60], a[60]); + COMBA_STORE(b[120]); + + /* output 121 */ + CARRY_FORWARD; + SQRADDSC(a[58], a[63]); SQRADDAC(a[59], a[62]); SQRADDAC(a[60], a[61]); SQRADDDB; + COMBA_STORE(b[121]); + + /* output 122 */ + CARRY_FORWARD; + SQRADD2(a[59], a[63]); SQRADD2(a[60], a[62]); SQRADD(a[61], a[61]); + COMBA_STORE(b[122]); + + /* output 123 */ + CARRY_FORWARD; + SQRADD2(a[60], a[63]); SQRADD2(a[61], a[62]); + COMBA_STORE(b[123]); + + /* output 124 */ + CARRY_FORWARD; + SQRADD2(a[61], a[63]); SQRADD(a[62], a[62]); + COMBA_STORE(b[124]); + + /* output 125 */ + CARRY_FORWARD; + SQRADD2(a[62], a[63]); + COMBA_STORE(b[125]); + + /* output 126 */ + CARRY_FORWARD; + SQRADD(a[63], a[63]); + COMBA_STORE(b[126]); + COMBA_STORE2(b[127]); + COMBA_FINI; + + B->used = 128; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 128 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i new file mode 100644 index 00000000..12b4f19a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i @@ -0,0 +1,110 @@ +/* fp_sqr_comba_7.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR7 +void fp_sqr_comba7(fp_int *A, fp_int *B) +{ + fp_digit *a, b[14], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADD2(a[2], a[6]); SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADD2(a[3], a[6]); SQRADD2(a[4], a[5]); + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADD2(a[5], a[6]); + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + COMBA_STORE2(b[13]); + COMBA_FINI; + + B->used = 14; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 14 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i new file mode 100644 index 00000000..52a0cebd --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i @@ -0,0 +1,120 @@ +/* fp_sqr_comba_8.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR8 +void fp_sqr_comba8(fp_int *A, fp_int *B) +{ + fp_digit *a, b[16], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD2(a[3], a[7]); SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADD2(a[4], a[7]); SQRADD2(a[5], a[6]); + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADD2(a[6], a[7]); + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + COMBA_STORE2(b[15]); + COMBA_FINI; + + B->used = 16; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 16 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i new file mode 100644 index 00000000..bbf7149e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i @@ -0,0 +1,130 @@ +/* fp_sqr_comba_9.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef TFM_SQR9 +void fp_sqr_comba9(fp_int *A, fp_int *B) +{ + fp_digit *a, b[18], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD2(a[4], a[8]); SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADD2(a[5], a[8]); SQRADD2(a[6], a[7]); + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADD2(a[7], a[8]); + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + COMBA_STORE2(b[17]); + COMBA_FINI; + + B->used = 18; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 18 * sizeof(fp_digit)); + fp_clamp(B); +} +#endif + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i new file mode 100644 index 00000000..43f15b5e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i @@ -0,0 +1,1540 @@ +/* fp_sqr_comba_small_set.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#if defined(TFM_SMALL_SET) +void fp_sqr_comba_small(fp_int *A, fp_int *B) +{ + fp_digit *a, b[32], c0, c1, c2, sc0, sc1, sc2; +#ifdef TFM_ISO + fp_word tt; +#endif + switch (A->used) { + case 1: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + COMBA_STORE2(b[1]); + COMBA_FINI; + + B->used = 2; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 2 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 2: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + COMBA_STORE2(b[3]); + COMBA_FINI; + + B->used = 4; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 4 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 3: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + COMBA_STORE2(b[5]); + COMBA_FINI; + + B->used = 6; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 6 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 4: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADD2(a[2], a[3]); + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + COMBA_STORE2(b[7]); + COMBA_FINI; + + B->used = 8; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 8 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 5: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADD2(a[1], a[4]); SQRADD2(a[2], a[3]); + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADD2(a[3], a[4]); + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + COMBA_STORE2(b[9]); + COMBA_FINI; + + B->used = 10; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 10 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 6: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADD2(a[1], a[5]); SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADD2(a[2], a[5]); SQRADD2(a[3], a[4]); + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADD2(a[4], a[5]); + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + COMBA_STORE2(b[11]); + COMBA_FINI; + + B->used = 12; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 12 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 7: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADD2(a[2], a[6]); SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADD2(a[3], a[6]); SQRADD2(a[4], a[5]); + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADD2(a[5], a[6]); + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + COMBA_STORE2(b[13]); + COMBA_FINI; + + B->used = 14; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 14 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 8: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADD2(a[3], a[7]); SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADD2(a[4], a[7]); SQRADD2(a[5], a[6]); + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADD2(a[6], a[7]); + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + COMBA_STORE2(b[15]); + COMBA_FINI; + + B->used = 16; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 16 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 9: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADD2(a[4], a[8]); SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADD2(a[5], a[8]); SQRADD2(a[6], a[7]); + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADD2(a[7], a[8]); + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + COMBA_STORE2(b[17]); + COMBA_FINI; + + B->used = 18; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 18 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 10: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADD2(a[5], a[9]); SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADD2(a[6], a[9]); SQRADD2(a[7], a[8]); + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADD2(a[7], a[9]); SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADD2(a[8], a[9]); + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + COMBA_STORE2(b[19]); + COMBA_FINI; + + B->used = 20; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 20 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 11: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADD2(a[6], a[10]); SQRADD2(a[7], a[9]); SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADD2(a[7], a[10]); SQRADD2(a[8], a[9]); + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADD2(a[9], a[10]); + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + COMBA_STORE2(b[21]); + COMBA_FINI; + + B->used = 22; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 22 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 12: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADD2(a[7], a[11]); SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADD2(a[8], a[11]); SQRADD2(a[9], a[10]); + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADD2(a[10], a[11]); + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + COMBA_STORE2(b[23]); + COMBA_FINI; + + B->used = 24; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 24 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 13: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADD2(a[8], a[12]); SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADD2(a[9], a[12]); SQRADD2(a[10], a[11]); + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADD2(a[10], a[12]); SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADD2(a[11], a[12]); + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + COMBA_STORE2(b[25]); + COMBA_FINI; + + B->used = 26; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 26 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 14: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADD2(a[9], a[13]); SQRADD2(a[10], a[12]); SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADD2(a[10], a[13]); SQRADD2(a[11], a[12]); + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADD2(a[11], a[13]); SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADD2(a[12], a[13]); + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + COMBA_STORE2(b[27]); + COMBA_FINI; + + B->used = 28; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 28 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 15: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADD2(a[10], a[14]); SQRADD2(a[11], a[13]); SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADD2(a[11], a[14]); SQRADD2(a[12], a[13]); + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADD2(a[12], a[14]); SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADD2(a[13], a[14]); + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + COMBA_STORE2(b[29]); + COMBA_FINI; + + B->used = 30; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 30 * sizeof(fp_digit)); + fp_clamp(B); + break; + + case 16: + a = A->dp; + COMBA_START; + + /* clear carries */ + CLEAR_CARRY; + + /* output 0 */ + SQRADD(a[0],a[0]); + COMBA_STORE(b[0]); + + /* output 1 */ + CARRY_FORWARD; + SQRADD2(a[0], a[1]); + COMBA_STORE(b[1]); + + /* output 2 */ + CARRY_FORWARD; + SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); + COMBA_STORE(b[2]); + + /* output 3 */ + CARRY_FORWARD; + SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); + COMBA_STORE(b[3]); + + /* output 4 */ + CARRY_FORWARD; + SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); + COMBA_STORE(b[4]); + + /* output 5 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; + COMBA_STORE(b[5]); + + /* output 6 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); + COMBA_STORE(b[6]); + + /* output 7 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; + COMBA_STORE(b[7]); + + /* output 8 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); + COMBA_STORE(b[8]); + + /* output 9 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; + COMBA_STORE(b[9]); + + /* output 10 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); + COMBA_STORE(b[10]); + + /* output 11 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; + COMBA_STORE(b[11]); + + /* output 12 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); + COMBA_STORE(b[12]); + + /* output 13 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; + COMBA_STORE(b[13]); + + /* output 14 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); + COMBA_STORE(b[14]); + + /* output 15 */ + CARRY_FORWARD; + SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; + COMBA_STORE(b[15]); + + /* output 16 */ + CARRY_FORWARD; + SQRADDSC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); + COMBA_STORE(b[16]); + + /* output 17 */ + CARRY_FORWARD; + SQRADDSC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; + COMBA_STORE(b[17]); + + /* output 18 */ + CARRY_FORWARD; + SQRADDSC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); + COMBA_STORE(b[18]); + + /* output 19 */ + CARRY_FORWARD; + SQRADDSC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; + COMBA_STORE(b[19]); + + /* output 20 */ + CARRY_FORWARD; + SQRADDSC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); + COMBA_STORE(b[20]); + + /* output 21 */ + CARRY_FORWARD; + SQRADDSC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; + COMBA_STORE(b[21]); + + /* output 22 */ + CARRY_FORWARD; + SQRADDSC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); + COMBA_STORE(b[22]); + + /* output 23 */ + CARRY_FORWARD; + SQRADDSC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; + COMBA_STORE(b[23]); + + /* output 24 */ + CARRY_FORWARD; + SQRADDSC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); + COMBA_STORE(b[24]); + + /* output 25 */ + CARRY_FORWARD; + SQRADDSC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; + COMBA_STORE(b[25]); + + /* output 26 */ + CARRY_FORWARD; + SQRADD2(a[11], a[15]); SQRADD2(a[12], a[14]); SQRADD(a[13], a[13]); + COMBA_STORE(b[26]); + + /* output 27 */ + CARRY_FORWARD; + SQRADD2(a[12], a[15]); SQRADD2(a[13], a[14]); + COMBA_STORE(b[27]); + + /* output 28 */ + CARRY_FORWARD; + SQRADD2(a[13], a[15]); SQRADD(a[14], a[14]); + COMBA_STORE(b[28]); + + /* output 29 */ + CARRY_FORWARD; + SQRADD2(a[14], a[15]); + COMBA_STORE(b[29]); + + /* output 30 */ + CARRY_FORWARD; + SQRADD(a[15], a[15]); + COMBA_STORE(b[30]); + COMBA_STORE2(b[31]); + COMBA_FINI; + + B->used = 32; + B->sign = FP_ZPOS; + memcpy(B->dp, b, 32 * sizeof(fp_digit)); + fp_clamp(B); + break; + + default: + break; +} +} + +#endif /* TFM_SMALL_SET */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c b/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c new file mode 100644 index 00000000..4937d6eb --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c @@ -0,0 +1,399 @@ +/* hc128.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_HC128 + +#include +#include +#include +#ifdef NO_INLINE + #include + #include +#else + #include +#endif + + +#ifdef BIG_ENDIAN_ORDER + #define LITTLE32(x) ByteReverseWord32(x) +#else + #define LITTLE32(x) (x) +#endif + + +/*h1 function*/ +#define h1(ctx, x, y) { \ + byte a,c; \ + a = (byte) (x); \ + c = (byte) ((x) >> 16); \ + y = (ctx->T[512+a])+(ctx->T[512+256+c]); \ +} + +/*h2 function*/ +#define h2(ctx, x, y) { \ + byte a,c; \ + a = (byte) (x); \ + c = (byte) ((x) >> 16); \ + y = (ctx->T[a])+(ctx->T[256+c]); \ +} + +/*one step of HC-128, update P and generate 32 bits keystream*/ +#define step_P(ctx,u,v,a,b,c,d,n){ \ + word32 tem0,tem1,tem2,tem3; \ + h1((ctx),(ctx->X[(d)]),tem3); \ + tem0 = rotrFixed((ctx->T[(v)]),23); \ + tem1 = rotrFixed((ctx->X[(c)]),10); \ + tem2 = rotrFixed((ctx->X[(b)]),8); \ + (ctx->T[(u)]) += tem2+(tem0 ^ tem1); \ + (ctx->X[(a)]) = (ctx->T[(u)]); \ + (n) = tem3 ^ (ctx->T[(u)]) ; \ +} + +/*one step of HC-128, update Q and generate 32 bits keystream*/ +#define step_Q(ctx,u,v,a,b,c,d,n){ \ + word32 tem0,tem1,tem2,tem3; \ + h2((ctx),(ctx->Y[(d)]),tem3); \ + tem0 = rotrFixed((ctx->T[(v)]),(32-23)); \ + tem1 = rotrFixed((ctx->Y[(c)]),(32-10)); \ + tem2 = rotrFixed((ctx->Y[(b)]),(32-8)); \ + (ctx->T[(u)]) += tem2 + (tem0 ^ tem1); \ + (ctx->Y[(a)]) = (ctx->T[(u)]); \ + (n) = tem3 ^ (ctx->T[(u)]) ; \ +} + +/*16 steps of HC-128, generate 512 bits keystream*/ +static void generate_keystream(HC128* ctx, word32* keystream) +{ + word32 cc,dd; + cc = ctx->counter1024 & 0x1ff; + dd = (cc+16)&0x1ff; + + if (ctx->counter1024 < 512) + { + ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; + step_P(ctx, cc+0, cc+1, 0, 6, 13,4, keystream[0]); + step_P(ctx, cc+1, cc+2, 1, 7, 14,5, keystream[1]); + step_P(ctx, cc+2, cc+3, 2, 8, 15,6, keystream[2]); + step_P(ctx, cc+3, cc+4, 3, 9, 0, 7, keystream[3]); + step_P(ctx, cc+4, cc+5, 4, 10,1, 8, keystream[4]); + step_P(ctx, cc+5, cc+6, 5, 11,2, 9, keystream[5]); + step_P(ctx, cc+6, cc+7, 6, 12,3, 10,keystream[6]); + step_P(ctx, cc+7, cc+8, 7, 13,4, 11,keystream[7]); + step_P(ctx, cc+8, cc+9, 8, 14,5, 12,keystream[8]); + step_P(ctx, cc+9, cc+10,9, 15,6, 13,keystream[9]); + step_P(ctx, cc+10,cc+11,10,0, 7, 14,keystream[10]); + step_P(ctx, cc+11,cc+12,11,1, 8, 15,keystream[11]); + step_P(ctx, cc+12,cc+13,12,2, 9, 0, keystream[12]); + step_P(ctx, cc+13,cc+14,13,3, 10,1, keystream[13]); + step_P(ctx, cc+14,cc+15,14,4, 11,2, keystream[14]); + step_P(ctx, cc+15,dd+0, 15,5, 12,3, keystream[15]); + } + else + { + ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; + step_Q(ctx, 512+cc+0, 512+cc+1, 0, 6, 13,4, keystream[0]); + step_Q(ctx, 512+cc+1, 512+cc+2, 1, 7, 14,5, keystream[1]); + step_Q(ctx, 512+cc+2, 512+cc+3, 2, 8, 15,6, keystream[2]); + step_Q(ctx, 512+cc+3, 512+cc+4, 3, 9, 0, 7, keystream[3]); + step_Q(ctx, 512+cc+4, 512+cc+5, 4, 10,1, 8, keystream[4]); + step_Q(ctx, 512+cc+5, 512+cc+6, 5, 11,2, 9, keystream[5]); + step_Q(ctx, 512+cc+6, 512+cc+7, 6, 12,3, 10,keystream[6]); + step_Q(ctx, 512+cc+7, 512+cc+8, 7, 13,4, 11,keystream[7]); + step_Q(ctx, 512+cc+8, 512+cc+9, 8, 14,5, 12,keystream[8]); + step_Q(ctx, 512+cc+9, 512+cc+10,9, 15,6, 13,keystream[9]); + step_Q(ctx, 512+cc+10,512+cc+11,10,0, 7, 14,keystream[10]); + step_Q(ctx, 512+cc+11,512+cc+12,11,1, 8, 15,keystream[11]); + step_Q(ctx, 512+cc+12,512+cc+13,12,2, 9, 0, keystream[12]); + step_Q(ctx, 512+cc+13,512+cc+14,13,3, 10,1, keystream[13]); + step_Q(ctx, 512+cc+14,512+cc+15,14,4, 11,2, keystream[14]); + step_Q(ctx, 512+cc+15,512+dd+0, 15,5, 12,3, keystream[15]); + } +} + + +/* The following defines the initialization functions */ +#define f1(x) (rotrFixed((x),7) ^ rotrFixed((x),18) ^ ((x) >> 3)) +#define f2(x) (rotrFixed((x),17) ^ rotrFixed((x),19) ^ ((x) >> 10)) + +/*update table P*/ +#define update_P(ctx,u,v,a,b,c,d){ \ + word32 tem0,tem1,tem2,tem3; \ + tem0 = rotrFixed((ctx->T[(v)]),23); \ + tem1 = rotrFixed((ctx->X[(c)]),10); \ + tem2 = rotrFixed((ctx->X[(b)]),8); \ + h1((ctx),(ctx->X[(d)]),tem3); \ + (ctx->T[(u)]) = ((ctx->T[(u)]) + tem2+(tem0^tem1)) ^ tem3; \ + (ctx->X[(a)]) = (ctx->T[(u)]); \ +} + +/*update table Q*/ +#define update_Q(ctx,u,v,a,b,c,d){ \ + word32 tem0,tem1,tem2,tem3; \ + tem0 = rotrFixed((ctx->T[(v)]),(32-23)); \ + tem1 = rotrFixed((ctx->Y[(c)]),(32-10)); \ + tem2 = rotrFixed((ctx->Y[(b)]),(32-8)); \ + h2((ctx),(ctx->Y[(d)]),tem3); \ + (ctx->T[(u)]) = ((ctx->T[(u)]) + tem2+(tem0^tem1)) ^ tem3; \ + (ctx->Y[(a)]) = (ctx->T[(u)]); \ +} + +/*16 steps of HC-128, without generating keystream, */ +/*but use the outputs to update P and Q*/ +static void setup_update(HC128* ctx) /*each time 16 steps*/ +{ + word32 cc,dd; + cc = ctx->counter1024 & 0x1ff; + dd = (cc+16)&0x1ff; + + if (ctx->counter1024 < 512) + { + ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; + update_P(ctx, cc+0, cc+1, 0, 6, 13, 4); + update_P(ctx, cc+1, cc+2, 1, 7, 14, 5); + update_P(ctx, cc+2, cc+3, 2, 8, 15, 6); + update_P(ctx, cc+3, cc+4, 3, 9, 0, 7); + update_P(ctx, cc+4, cc+5, 4, 10,1, 8); + update_P(ctx, cc+5, cc+6, 5, 11,2, 9); + update_P(ctx, cc+6, cc+7, 6, 12,3, 10); + update_P(ctx, cc+7, cc+8, 7, 13,4, 11); + update_P(ctx, cc+8, cc+9, 8, 14,5, 12); + update_P(ctx, cc+9, cc+10,9, 15,6, 13); + update_P(ctx, cc+10,cc+11,10,0, 7, 14); + update_P(ctx, cc+11,cc+12,11,1, 8, 15); + update_P(ctx, cc+12,cc+13,12,2, 9, 0); + update_P(ctx, cc+13,cc+14,13,3, 10, 1); + update_P(ctx, cc+14,cc+15,14,4, 11, 2); + update_P(ctx, cc+15,dd+0, 15,5, 12, 3); + } + else + { + ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; + update_Q(ctx, 512+cc+0, 512+cc+1, 0, 6, 13, 4); + update_Q(ctx, 512+cc+1, 512+cc+2, 1, 7, 14, 5); + update_Q(ctx, 512+cc+2, 512+cc+3, 2, 8, 15, 6); + update_Q(ctx, 512+cc+3, 512+cc+4, 3, 9, 0, 7); + update_Q(ctx, 512+cc+4, 512+cc+5, 4, 10,1, 8); + update_Q(ctx, 512+cc+5, 512+cc+6, 5, 11,2, 9); + update_Q(ctx, 512+cc+6, 512+cc+7, 6, 12,3, 10); + update_Q(ctx, 512+cc+7, 512+cc+8, 7, 13,4, 11); + update_Q(ctx, 512+cc+8, 512+cc+9, 8, 14,5, 12); + update_Q(ctx, 512+cc+9, 512+cc+10,9, 15,6, 13); + update_Q(ctx, 512+cc+10,512+cc+11,10,0, 7, 14); + update_Q(ctx, 512+cc+11,512+cc+12,11,1, 8, 15); + update_Q(ctx, 512+cc+12,512+cc+13,12,2, 9, 0); + update_Q(ctx, 512+cc+13,512+cc+14,13,3, 10, 1); + update_Q(ctx, 512+cc+14,512+cc+15,14,4, 11, 2); + update_Q(ctx, 512+cc+15,512+dd+0, 15,5, 12, 3); + } +} + + +/* for the 128-bit key: key[0]...key[15] +* key[0] is the least significant byte of ctx->key[0] (K_0); +* key[3] is the most significant byte of ctx->key[0] (K_0); +* ... +* key[12] is the least significant byte of ctx->key[3] (K_3) +* key[15] is the most significant byte of ctx->key[3] (K_3) +* +* for the 128-bit iv: iv[0]...iv[15] +* iv[0] is the least significant byte of ctx->iv[0] (IV_0); +* iv[3] is the most significant byte of ctx->iv[0] (IV_0); +* ... +* iv[12] is the least significant byte of ctx->iv[3] (IV_3) +* iv[15] is the most significant byte of ctx->iv[3] (IV_3) +*/ + + + +static void Hc128_SetIV(HC128* ctx, const byte* inIv) +{ + word32 i; + word32 iv[4]; + + if (inIv) + XMEMCPY(iv, inIv, sizeof(iv)); + else + XMEMSET(iv, 0, sizeof(iv)); + + for (i = 0; i < (128 >> 5); i++) + ctx->iv[i] = LITTLE32(iv[i]); + + for (; i < 8; i++) ctx->iv[i] = ctx->iv[i-4]; + + /* expand the key and IV into the table T */ + /* (expand the key and IV into the table P and Q) */ + + for (i = 0; i < 8; i++) ctx->T[i] = ctx->key[i]; + for (i = 8; i < 16; i++) ctx->T[i] = ctx->iv[i-8]; + + for (i = 16; i < (256+16); i++) + ctx->T[i] = f2(ctx->T[i-2]) + ctx->T[i-7] + f1(ctx->T[i-15]) + + ctx->T[i-16]+i; + + for (i = 0; i < 16; i++) ctx->T[i] = ctx->T[256+i]; + + for (i = 16; i < 1024; i++) + ctx->T[i] = f2(ctx->T[i-2]) + ctx->T[i-7] + f1(ctx->T[i-15]) + + ctx->T[i-16]+256+i; + + /* initialize counter1024, X and Y */ + ctx->counter1024 = 0; + for (i = 0; i < 16; i++) ctx->X[i] = ctx->T[512-16+i]; + for (i = 0; i < 16; i++) ctx->Y[i] = ctx->T[512+512-16+i]; + + /* run the cipher 1024 steps before generating the output */ + for (i = 0; i < 64; i++) setup_update(ctx); +} + + +static INLINE int DoKey(HC128* ctx, const byte* key, const byte* iv) +{ + word32 i; + + /* Key size in bits 128 */ + for (i = 0; i < (128 >> 5); i++) + ctx->key[i] = LITTLE32(((word32*)key)[i]); + + for ( ; i < 8 ; i++) ctx->key[i] = ctx->key[i-4]; + + Hc128_SetIV(ctx, iv); + + return 0; +} + + +/* Key setup */ +int Hc128_SetKey(HC128* ctx, const byte* key, const byte* iv) +{ +#ifdef XSTREAM_ALIGN + if ((word)key % 4) { + int alignKey[4]; + + /* iv gets aligned in SetIV */ + CYASSL_MSG("Hc128SetKey unaligned key"); + + XMEMCPY(alignKey, key, sizeof(alignKey)); + + return DoKey(ctx, (const byte*)alignKey, iv); + } +#endif /* XSTREAM_ALIGN */ + + return DoKey(ctx, key, iv); +} + + + +/* The following defines the encryption of data stream */ +static INLINE int DoProcess(HC128* ctx, byte* output, const byte* input, + word32 msglen) +{ + word32 i, keystream[16]; + + for ( ; msglen >= 64; msglen -= 64, input += 64, output += 64) + { + generate_keystream(ctx, keystream); + + /* unroll loop */ + ((word32*)output)[0] = ((word32*)input)[0] ^ LITTLE32(keystream[0]); + ((word32*)output)[1] = ((word32*)input)[1] ^ LITTLE32(keystream[1]); + ((word32*)output)[2] = ((word32*)input)[2] ^ LITTLE32(keystream[2]); + ((word32*)output)[3] = ((word32*)input)[3] ^ LITTLE32(keystream[3]); + ((word32*)output)[4] = ((word32*)input)[4] ^ LITTLE32(keystream[4]); + ((word32*)output)[5] = ((word32*)input)[5] ^ LITTLE32(keystream[5]); + ((word32*)output)[6] = ((word32*)input)[6] ^ LITTLE32(keystream[6]); + ((word32*)output)[7] = ((word32*)input)[7] ^ LITTLE32(keystream[7]); + ((word32*)output)[8] = ((word32*)input)[8] ^ LITTLE32(keystream[8]); + ((word32*)output)[9] = ((word32*)input)[9] ^ LITTLE32(keystream[9]); + ((word32*)output)[10] = ((word32*)input)[10] ^ LITTLE32(keystream[10]); + ((word32*)output)[11] = ((word32*)input)[11] ^ LITTLE32(keystream[11]); + ((word32*)output)[12] = ((word32*)input)[12] ^ LITTLE32(keystream[12]); + ((word32*)output)[13] = ((word32*)input)[13] ^ LITTLE32(keystream[13]); + ((word32*)output)[14] = ((word32*)input)[14] ^ LITTLE32(keystream[14]); + ((word32*)output)[15] = ((word32*)input)[15] ^ LITTLE32(keystream[15]); + } + + if (msglen > 0) + { + XMEMSET(keystream, 0, sizeof(keystream)); /* hush the static analysis */ + generate_keystream(ctx, keystream); + +#ifdef BIG_ENDIAN_ORDER + { + word32 wordsLeft = msglen / sizeof(word32); + if (msglen % sizeof(word32)) wordsLeft++; + + ByteReverseWords(keystream, keystream, wordsLeft * sizeof(word32)); + } +#endif + + for (i = 0; i < msglen; i++) + output[i] = input[i] ^ ((byte*)keystream)[i]; + } + + return 0; +} + + +/* Encrypt/decrypt a message of any size */ +int Hc128_Process(HC128* ctx, byte* output, const byte* input, word32 msglen) +{ +#ifdef XSTREAM_ALIGN + if ((word)input % 4 || (word)output % 4) { + #ifndef NO_CYASSL_ALLOC_ALIGN + byte* tmp; + CYASSL_MSG("Hc128Process unaligned"); + + tmp = (byte*)XMALLOC(msglen, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (tmp == NULL) return MEMORY_E; + + XMEMCPY(tmp, input, msglen); + DoProcess(ctx, tmp, tmp, msglen); + XMEMCPY(output, tmp, msglen); + + XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + return 0; + #else + return BAD_ALIGN_E; + #endif + } +#endif /* XSTREAM_ALIGN */ + + return DoProcess(ctx, output, input, msglen); +} + + +#else /* HAVE_HC128 */ + + +#ifdef _MSC_VER + /* 4206 warning for blank file */ + #pragma warning(disable: 4206) +#endif + + +#endif /* HAVE_HC128 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c b/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c new file mode 100644 index 00000000..0bd1c41d --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c @@ -0,0 +1,820 @@ +/* hmac.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_HMAC + +#ifdef CYASSL_PIC32MZ_HASH + +#define InitMd5 InitMd5_sw +#define Md5Update Md5Update_sw +#define Md5Final Md5Final_sw + +#define InitSha InitSha_sw +#define ShaUpdate ShaUpdate_sw +#define ShaFinal ShaFinal_sw + +#define InitSha256 InitSha256_sw +#define Sha256Update Sha256Update_sw +#define Sha256Final Sha256Final_sw + +#endif + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include + + +#ifdef HAVE_CAVIUM + static void HmacCaviumFinal(Hmac* hmac, byte* hash); + static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length); + static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key, + word32 length); +#endif + +static int InitHmac(Hmac* hmac, int type) +{ + int ret = 0; + + hmac->innerHashKeyed = 0; + hmac->macType = (byte)type; + + if (!(type == MD5 || type == SHA || type == SHA256 || type == SHA384 + || type == SHA512 || type == BLAKE2B_ID)) + return BAD_FUNC_ARG; + + switch (type) { + #ifndef NO_MD5 + case MD5: + InitMd5(&hmac->hash.md5); + break; + #endif + + #ifndef NO_SHA + case SHA: + ret = InitSha(&hmac->hash.sha); + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + ret = InitSha256(&hmac->hash.sha256); + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + ret = InitSha384(&hmac->hash.sha384); + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + ret = InitSha512(&hmac->hash.sha512); + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + ret = InitBlake2b(&hmac->hash.blake2b, BLAKE2B_256); + break; + #endif + + default: + return BAD_FUNC_ARG; + } + + return ret; +} + + +int HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) +{ + byte* ip = (byte*) hmac->ipad; + byte* op = (byte*) hmac->opad; + word32 i, hmac_block_size = 0; + int ret; + +#ifdef HAVE_CAVIUM + if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) + return HmacCaviumSetKey(hmac, type, key, length); +#endif + + ret = InitHmac(hmac, type); + if (ret != 0) + return ret; + + switch (hmac->macType) { + #ifndef NO_MD5 + case MD5: + { + hmac_block_size = MD5_BLOCK_SIZE; + if (length <= MD5_BLOCK_SIZE) { + XMEMCPY(ip, key, length); + } + else { + Md5Update(&hmac->hash.md5, key, length); + Md5Final(&hmac->hash.md5, ip); + length = MD5_DIGEST_SIZE; + } + } + break; + #endif + + #ifndef NO_SHA + case SHA: + { + hmac_block_size = SHA_BLOCK_SIZE; + if (length <= SHA_BLOCK_SIZE) { + XMEMCPY(ip, key, length); + } + else { + ShaUpdate(&hmac->hash.sha, key, length); + ShaFinal(&hmac->hash.sha, ip); + length = SHA_DIGEST_SIZE; + } + } + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + { + hmac_block_size = SHA256_BLOCK_SIZE; + if (length <= SHA256_BLOCK_SIZE) { + XMEMCPY(ip, key, length); + } + else { + ret = Sha256Update(&hmac->hash.sha256, key, length); + if (ret != 0) + return ret; + + ret = Sha256Final(&hmac->hash.sha256, ip); + if (ret != 0) + return ret; + + length = SHA256_DIGEST_SIZE; + } + } + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + { + hmac_block_size = SHA384_BLOCK_SIZE; + if (length <= SHA384_BLOCK_SIZE) { + XMEMCPY(ip, key, length); + } + else { + ret = Sha384Update(&hmac->hash.sha384, key, length); + if (ret != 0) + return ret; + + ret = Sha384Final(&hmac->hash.sha384, ip); + if (ret != 0) + return ret; + + length = SHA384_DIGEST_SIZE; + } + } + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + { + hmac_block_size = SHA512_BLOCK_SIZE; + if (length <= SHA512_BLOCK_SIZE) { + XMEMCPY(ip, key, length); + } + else { + ret = Sha512Update(&hmac->hash.sha512, key, length); + if (ret != 0) + return ret; + + ret = Sha512Final(&hmac->hash.sha512, ip); + if (ret != 0) + return ret; + + length = SHA512_DIGEST_SIZE; + } + } + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + { + hmac_block_size = BLAKE2B_BLOCKBYTES; + if (length <= BLAKE2B_BLOCKBYTES) { + XMEMCPY(ip, key, length); + } + else { + ret = Blake2bUpdate(&hmac->hash.blake2b, key, length); + if (ret != 0) + return ret; + + ret = Blake2bFinal(&hmac->hash.blake2b, ip, BLAKE2B_256); + if (ret != 0) + return ret; + + length = BLAKE2B_256; + } + } + break; + #endif + + default: + return BAD_FUNC_ARG; + } + if (length < hmac_block_size) + XMEMSET(ip + length, 0, hmac_block_size - length); + + for(i = 0; i < hmac_block_size; i++) { + op[i] = ip[i] ^ OPAD; + ip[i] ^= IPAD; + } + return 0; +} + + +static int HmacKeyInnerHash(Hmac* hmac) +{ + int ret = 0; + + switch (hmac->macType) { + #ifndef NO_MD5 + case MD5: + Md5Update(&hmac->hash.md5, (byte*) hmac->ipad, MD5_BLOCK_SIZE); + break; + #endif + + #ifndef NO_SHA + case SHA: + ShaUpdate(&hmac->hash.sha, (byte*) hmac->ipad, SHA_BLOCK_SIZE); + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + ret = Sha256Update(&hmac->hash.sha256, + (byte*) hmac->ipad, SHA256_BLOCK_SIZE); + if (ret != 0) + return ret; + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + ret = Sha384Update(&hmac->hash.sha384, + (byte*) hmac->ipad, SHA384_BLOCK_SIZE); + if (ret != 0) + return ret; + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + ret = Sha512Update(&hmac->hash.sha512, + (byte*) hmac->ipad, SHA512_BLOCK_SIZE); + if (ret != 0) + return ret; + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + ret = Blake2bUpdate(&hmac->hash.blake2b, + (byte*) hmac->ipad,BLAKE2B_BLOCKBYTES); + if (ret != 0) + return ret; + break; + #endif + + default: + break; + } + + hmac->innerHashKeyed = 1; + + return ret; +} + + +int HmacUpdate(Hmac* hmac, const byte* msg, word32 length) +{ + int ret; + +#ifdef HAVE_CAVIUM + if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) + return HmacCaviumUpdate(hmac, msg, length); +#endif + + if (!hmac->innerHashKeyed) { + ret = HmacKeyInnerHash(hmac); + if (ret != 0) + return ret; + } + + switch (hmac->macType) { + #ifndef NO_MD5 + case MD5: + Md5Update(&hmac->hash.md5, msg, length); + break; + #endif + + #ifndef NO_SHA + case SHA: + ShaUpdate(&hmac->hash.sha, msg, length); + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + ret = Sha256Update(&hmac->hash.sha256, msg, length); + if (ret != 0) + return ret; + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + ret = Sha384Update(&hmac->hash.sha384, msg, length); + if (ret != 0) + return ret; + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + ret = Sha512Update(&hmac->hash.sha512, msg, length); + if (ret != 0) + return ret; + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + ret = Blake2bUpdate(&hmac->hash.blake2b, msg, length); + if (ret != 0) + return ret; + break; + #endif + + default: + break; + } + + return 0; +} + + +int HmacFinal(Hmac* hmac, byte* hash) +{ + int ret; + +#ifdef HAVE_CAVIUM + if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) + return HmacCaviumFinal(hmac, hash); +#endif + + if (!hmac->innerHashKeyed) { + ret = HmacKeyInnerHash(hmac); + if (ret != 0) + return ret; + } + + switch (hmac->macType) { + #ifndef NO_MD5 + case MD5: + { + Md5Final(&hmac->hash.md5, (byte*) hmac->innerHash); + + Md5Update(&hmac->hash.md5, (byte*) hmac->opad, MD5_BLOCK_SIZE); + Md5Update(&hmac->hash.md5, + (byte*) hmac->innerHash, MD5_DIGEST_SIZE); + + Md5Final(&hmac->hash.md5, hash); + } + break; + #endif + + #ifndef NO_SHA + case SHA: + { + ShaFinal(&hmac->hash.sha, (byte*) hmac->innerHash); + + ShaUpdate(&hmac->hash.sha, (byte*) hmac->opad, SHA_BLOCK_SIZE); + ShaUpdate(&hmac->hash.sha, + (byte*) hmac->innerHash, SHA_DIGEST_SIZE); + + ShaFinal(&hmac->hash.sha, hash); + } + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + { + ret = Sha256Final(&hmac->hash.sha256, (byte*) hmac->innerHash); + if (ret != 0) + return ret; + + ret = Sha256Update(&hmac->hash.sha256, + (byte*) hmac->opad, SHA256_BLOCK_SIZE); + if (ret != 0) + return ret; + + ret = Sha256Update(&hmac->hash.sha256, + (byte*) hmac->innerHash, SHA256_DIGEST_SIZE); + if (ret != 0) + return ret; + + ret = Sha256Final(&hmac->hash.sha256, hash); + if (ret != 0) + return ret; + } + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + { + ret = Sha384Final(&hmac->hash.sha384, (byte*) hmac->innerHash); + if (ret != 0) + return ret; + + ret = Sha384Update(&hmac->hash.sha384, + (byte*) hmac->opad, SHA384_BLOCK_SIZE); + if (ret != 0) + return ret; + + ret = Sha384Update(&hmac->hash.sha384, + (byte*) hmac->innerHash, SHA384_DIGEST_SIZE); + if (ret != 0) + return ret; + + ret = Sha384Final(&hmac->hash.sha384, hash); + if (ret != 0) + return ret; + } + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + { + ret = Sha512Final(&hmac->hash.sha512, (byte*) hmac->innerHash); + if (ret != 0) + return ret; + + ret = Sha512Update(&hmac->hash.sha512, + (byte*) hmac->opad, SHA512_BLOCK_SIZE); + if (ret != 0) + return ret; + + ret = Sha512Update(&hmac->hash.sha512, + (byte*) hmac->innerHash, SHA512_DIGEST_SIZE); + if (ret != 0) + return ret; + + ret = Sha512Final(&hmac->hash.sha512, hash); + if (ret != 0) + return ret; + } + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + { + ret = Blake2bFinal(&hmac->hash.blake2b, (byte*) hmac->innerHash, + BLAKE2B_256); + if (ret != 0) + return ret; + + ret = Blake2bUpdate(&hmac->hash.blake2b, + (byte*) hmac->opad, BLAKE2B_BLOCKBYTES); + if (ret != 0) + return ret; + + ret = Blake2bUpdate(&hmac->hash.blake2b, + (byte*) hmac->innerHash, BLAKE2B_256); + if (ret != 0) + return ret; + + ret = Blake2bFinal(&hmac->hash.blake2b, hash, BLAKE2B_256); + if (ret != 0) + return ret; + } + break; + #endif + + default: + break; + } + + hmac->innerHashKeyed = 0; + + return 0; +} + + +#ifdef HAVE_CAVIUM + +/* Initiliaze Hmac for use with Nitrox device */ +int HmacInitCavium(Hmac* hmac, int devId) +{ + if (hmac == NULL) + return -1; + + if (CspAllocContext(CONTEXT_SSL, &hmac->contextHandle, devId) != 0) + return -1; + + hmac->keyLen = 0; + hmac->dataLen = 0; + hmac->type = 0; + hmac->devId = devId; + hmac->magic = CYASSL_HMAC_CAVIUM_MAGIC; + hmac->data = NULL; /* buffered input data */ + + hmac->innerHashKeyed = 0; + + return 0; +} + + +/* Free Hmac from use with Nitrox device */ +void HmacFreeCavium(Hmac* hmac) +{ + if (hmac == NULL) + return; + + CspFreeContext(CONTEXT_SSL, hmac->contextHandle, hmac->devId); + hmac->magic = 0; + XFREE(hmac->data, NULL, DYNAMIC_TYPE_CAVIUM_TMP); + hmac->data = NULL; +} + + +static void HmacCaviumFinal(Hmac* hmac, byte* hash) +{ + word32 requestId; + + if (CspHmac(CAVIUM_BLOCKING, hmac->type, NULL, hmac->keyLen, + (byte*)hmac->ipad, hmac->dataLen, hmac->data, hash, &requestId, + hmac->devId) != 0) { + CYASSL_MSG("Cavium Hmac failed"); + } + hmac->innerHashKeyed = 0; /* tell update to start over if used again */ +} + + +static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length) +{ + word16 add = (word16)length; + word32 total; + byte* tmp; + + if (length > CYASSL_MAX_16BIT) { + CYASSL_MSG("Too big msg for cavium hmac"); + return; + } + + if (hmac->innerHashKeyed == 0) { /* starting new */ + hmac->dataLen = 0; + hmac->innerHashKeyed = 1; + } + + total = add + hmac->dataLen; + if (total > CYASSL_MAX_16BIT) { + CYASSL_MSG("Too big msg for cavium hmac"); + return; + } + + tmp = XMALLOC(hmac->dataLen + add, NULL,DYNAMIC_TYPE_CAVIUM_TMP); + if (tmp == NULL) { + CYASSL_MSG("Out of memory for cavium update"); + return; + } + if (hmac->dataLen) + XMEMCPY(tmp, hmac->data, hmac->dataLen); + XMEMCPY(tmp + hmac->dataLen, msg, add); + + hmac->dataLen += add; + XFREE(hmac->data, NULL, DYNAMIC_TYPE_CAVIUM_TMP); + hmac->data = tmp; +} + + +static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key, + word32 length) +{ + hmac->macType = (byte)type; + if (type == MD5) + hmac->type = MD5_TYPE; + else if (type == SHA) + hmac->type = SHA1_TYPE; + else if (type == SHA256) + hmac->type = SHA256_TYPE; + else { + CYASSL_MSG("unsupported cavium hmac type"); + } + + hmac->innerHashKeyed = 0; /* should we key Startup flag */ + + hmac->keyLen = (word16)length; + /* store key in ipad */ + XMEMCPY(hmac->ipad, key, length); +} + +#endif /* HAVE_CAVIUM */ + +int CyaSSL_GetHmacMaxSize(void) +{ + return MAX_DIGEST_SIZE; +} + +#ifdef HAVE_HKDF + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +static INLINE int GetHashSizeByType(int type) +{ + if (!(type == MD5 || type == SHA || type == SHA256 || type == SHA384 + || type == SHA512 || type == BLAKE2B_ID)) + return BAD_FUNC_ARG; + + switch (type) { + #ifndef NO_MD5 + case MD5: + return MD5_DIGEST_SIZE; + break; + #endif + + #ifndef NO_SHA + case SHA: + return SHA_DIGEST_SIZE; + break; + #endif + + #ifndef NO_SHA256 + case SHA256: + return SHA256_DIGEST_SIZE; + break; + #endif + + #ifdef CYASSL_SHA384 + case SHA384: + return SHA384_DIGEST_SIZE; + break; + #endif + + #ifdef CYASSL_SHA512 + case SHA512: + return SHA512_DIGEST_SIZE; + break; + #endif + + #ifdef HAVE_BLAKE2 + case BLAKE2B_ID: + return BLAKE2B_OUTBYTES; + break; + #endif + + default: + return BAD_FUNC_ARG; + break; + } +} + + +/* HMAC-KDF with hash type, optional salt and info, return 0 on success */ +int HKDF(int type, const byte* inKey, word32 inKeySz, + const byte* salt, word32 saltSz, + const byte* info, word32 infoSz, + byte* out, word32 outSz) +{ + Hmac myHmac; +#ifdef CYASSL_SMALL_STACK + byte* tmp; + byte* prk; +#else + byte tmp[MAX_DIGEST_SIZE]; /* localSalt helper and T */ + byte prk[MAX_DIGEST_SIZE]; +#endif + const byte* localSalt; /* either points to user input or tmp */ + int hashSz = GetHashSizeByType(type); + word32 outIdx = 0; + byte n = 0x1; + int ret; + + if (hashSz < 0) + return BAD_FUNC_ARG; + +#ifdef CYASSL_SMALL_STACK + tmp = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (tmp == NULL) + return MEMORY_E; + + prk = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (prk == NULL) { + XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + localSalt = salt; + if (localSalt == NULL) { + XMEMSET(tmp, 0, hashSz); + localSalt = tmp; + saltSz = hashSz; + } + + do { + ret = HmacSetKey(&myHmac, type, localSalt, saltSz); + if (ret != 0) + break; + ret = HmacUpdate(&myHmac, inKey, inKeySz); + if (ret != 0) + break; + ret = HmacFinal(&myHmac, prk); + } while (0); + + if (ret == 0) { + while (outIdx < outSz) { + int tmpSz = (n == 1) ? 0 : hashSz; + word32 left = outSz - outIdx; + + ret = HmacSetKey(&myHmac, type, prk, hashSz); + if (ret != 0) + break; + ret = HmacUpdate(&myHmac, tmp, tmpSz); + if (ret != 0) + break; + ret = HmacUpdate(&myHmac, info, infoSz); + if (ret != 0) + break; + ret = HmacUpdate(&myHmac, &n, 1); + if (ret != 0) + break; + ret = HmacFinal(&myHmac, tmp); + if (ret != 0) + break; + + left = min(left, (word32)hashSz); + XMEMCPY(out+outIdx, tmp, left); + + outIdx += hashSz; + n++; + } + } + +#ifdef CYASSL_SMALL_STACK + XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(prk, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + +#endif /* HAVE_HKDF */ + +#endif /* NO_HMAC */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/include.am b/project1/cyassl-3.0.0/ctaocrypt/src/include.am new file mode 100644 index 00000000..580d3f55 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/include.am @@ -0,0 +1,39 @@ +# vim:ft=automake +# All paths should be given relative to the root + +EXTRA_DIST += ctaocrypt/src/misc.c +EXTRA_DIST += ctaocrypt/src/asm.c + +EXTRA_DIST += \ + ctaocrypt/src/ecc_fp.c \ + ctaocrypt/src/fp_mont_small.i \ + ctaocrypt/src/fp_mul_comba_12.i \ + ctaocrypt/src/fp_mul_comba_17.i \ + ctaocrypt/src/fp_mul_comba_20.i \ + ctaocrypt/src/fp_mul_comba_24.i \ + ctaocrypt/src/fp_mul_comba_28.i \ + ctaocrypt/src/fp_mul_comba_32.i \ + ctaocrypt/src/fp_mul_comba_3.i \ + ctaocrypt/src/fp_mul_comba_48.i \ + ctaocrypt/src/fp_mul_comba_4.i \ + ctaocrypt/src/fp_mul_comba_64.i \ + ctaocrypt/src/fp_mul_comba_6.i \ + ctaocrypt/src/fp_mul_comba_7.i \ + ctaocrypt/src/fp_mul_comba_8.i \ + ctaocrypt/src/fp_mul_comba_9.i \ + ctaocrypt/src/fp_mul_comba_small_set.i \ + ctaocrypt/src/fp_sqr_comba_12.i \ + ctaocrypt/src/fp_sqr_comba_17.i \ + ctaocrypt/src/fp_sqr_comba_20.i \ + ctaocrypt/src/fp_sqr_comba_24.i \ + ctaocrypt/src/fp_sqr_comba_28.i \ + ctaocrypt/src/fp_sqr_comba_32.i \ + ctaocrypt/src/fp_sqr_comba_3.i \ + ctaocrypt/src/fp_sqr_comba_48.i \ + ctaocrypt/src/fp_sqr_comba_4.i \ + ctaocrypt/src/fp_sqr_comba_64.i \ + ctaocrypt/src/fp_sqr_comba_6.i \ + ctaocrypt/src/fp_sqr_comba_7.i \ + ctaocrypt/src/fp_sqr_comba_8.i \ + ctaocrypt/src/fp_sqr_comba_9.i \ + ctaocrypt/src/fp_sqr_comba_small_set.i diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/integer.c b/project1/cyassl-3.0.0/ctaocrypt/src/integer.c new file mode 100644 index 00000000..e885ca04 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/integer.c @@ -0,0 +1,4488 @@ +/* integer.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* + * Based on public domain LibTomMath 0.38 by Tom St Denis, tomstdenis@iahu.ca, + * http://math.libtomcrypt.com + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* in case user set USE_FAST_MATH there */ +#include + +#ifndef NO_BIG_INT + +#ifndef USE_FAST_MATH + +#include + +#ifndef NO_CYASSL_SMALL_STACK + #ifndef CYASSL_SMALL_STACK + #define CYASSL_SMALL_STACK + #endif +#endif + +static void bn_reverse (unsigned char *s, int len); + +/* math settings check */ +word32 CheckRunTimeSettings(void) +{ + return CTC_SETTINGS; +} + + +/* handle up to 6 inits */ +int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, + mp_int* f) +{ + int res = MP_OKAY; + + if (a && ((res = mp_init(a)) != MP_OKAY)) + return res; + + if (b && ((res = mp_init(b)) != MP_OKAY)) { + mp_clear(a); + return res; + } + + if (c && ((res = mp_init(c)) != MP_OKAY)) { + mp_clear(a); mp_clear(b); + return res; + } + + if (d && ((res = mp_init(d)) != MP_OKAY)) { + mp_clear(a); mp_clear(b); mp_clear(c); + return res; + } + + if (e && ((res = mp_init(e)) != MP_OKAY)) { + mp_clear(a); mp_clear(b); mp_clear(c); mp_clear(d); + return res; + } + + if (f && ((res = mp_init(f)) != MP_OKAY)) { + mp_clear(a); mp_clear(b); mp_clear(c); mp_clear(d); mp_clear(e); + return res; + } + + return res; +} + + +/* init a new mp_int */ +int mp_init (mp_int * a) +{ + int i; + + /* allocate memory required and clear it */ + a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC, 0, + DYNAMIC_TYPE_BIGINT); + if (a->dp == NULL) { + return MP_MEM; + } + + /* set the digits to zero */ + for (i = 0; i < MP_PREC; i++) { + a->dp[i] = 0; + } + + /* set the used to zero, allocated digits to the default precision + * and sign to positive */ + a->used = 0; + a->alloc = MP_PREC; + a->sign = MP_ZPOS; + + return MP_OKAY; +} + + +/* clear one (frees) */ +void +mp_clear (mp_int * a) +{ + int i; + + if (a == NULL) + return; + + /* only do anything if a hasn't been freed previously */ + if (a->dp != NULL) { + /* first zero the digits */ + for (i = 0; i < a->used; i++) { + a->dp[i] = 0; + } + + /* free ram */ + XFREE(a->dp, 0, DYNAMIC_TYPE_BIGINT); + + /* reset members to make debugging easier */ + a->dp = NULL; + a->alloc = a->used = 0; + a->sign = MP_ZPOS; + } +} + + +/* get the size for an unsigned equivalent */ +int mp_unsigned_bin_size (mp_int * a) +{ + int size = mp_count_bits (a); + return (size / 8 + ((size & 7) != 0 ? 1 : 0)); +} + + +/* returns the number of bits in an int */ +int +mp_count_bits (mp_int * a) +{ + int r; + mp_digit q; + + /* shortcut */ + if (a->used == 0) { + return 0; + } + + /* get number of digits and add that */ + r = (a->used - 1) * DIGIT_BIT; + + /* take the last digit and count the bits in it */ + q = a->dp[a->used - 1]; + while (q > ((mp_digit) 0)) { + ++r; + q >>= ((mp_digit) 1); + } + return r; +} + + +int mp_leading_bit (mp_int * a) +{ + int bit = 0; + mp_int t; + + if (mp_init_copy(&t, a) != MP_OKAY) + return 0; + + while (mp_iszero(&t) == 0) { +#ifndef MP_8BIT + bit = (t.dp[0] & 0x80) != 0; +#else + bit = (t.dp[0] | ((t.dp[1] & 0x01) << 7)) & 0x80 != 0; +#endif + if (mp_div_2d (&t, 8, &t, NULL) != MP_OKAY) + break; + } + mp_clear(&t); + return bit; +} + + +/* store in unsigned [big endian] format */ +int mp_to_unsigned_bin (mp_int * a, unsigned char *b) +{ + int x, res; + mp_int t; + + if ((res = mp_init_copy (&t, a)) != MP_OKAY) { + return res; + } + + x = 0; + while (mp_iszero (&t) == 0) { +#ifndef MP_8BIT + b[x++] = (unsigned char) (t.dp[0] & 255); +#else + b[x++] = (unsigned char) (t.dp[0] | ((t.dp[1] & 0x01) << 7)); +#endif + if ((res = mp_div_2d (&t, 8, &t, NULL)) != MP_OKAY) { + mp_clear (&t); + return res; + } + } + bn_reverse (b, x); + mp_clear (&t); + return MP_OKAY; +} + + +/* creates "a" then copies b into it */ +int mp_init_copy (mp_int * a, mp_int * b) +{ + int res; + + if ((res = mp_init (a)) != MP_OKAY) { + return res; + } + return mp_copy (b, a); +} + + +/* copy, b = a */ +int +mp_copy (mp_int * a, mp_int * b) +{ + int res, n; + + /* if dst == src do nothing */ + if (a == b) { + return MP_OKAY; + } + + /* grow dest */ + if (b->alloc < a->used) { + if ((res = mp_grow (b, a->used)) != MP_OKAY) { + return res; + } + } + + /* zero b and copy the parameters over */ + { + register mp_digit *tmpa, *tmpb; + + /* pointer aliases */ + + /* source */ + tmpa = a->dp; + + /* destination */ + tmpb = b->dp; + + /* copy all the digits */ + for (n = 0; n < a->used; n++) { + *tmpb++ = *tmpa++; + } + + /* clear high digits */ + for (; n < b->used; n++) { + *tmpb++ = 0; + } + } + + /* copy used count and sign */ + b->used = a->used; + b->sign = a->sign; + return MP_OKAY; +} + + +/* grow as required */ +int mp_grow (mp_int * a, int size) +{ + int i; + mp_digit *tmp; + + /* if the alloc size is smaller alloc more ram */ + if (a->alloc < size) { + /* ensure there are always at least MP_PREC digits extra on top */ + size += (MP_PREC * 2) - (size % MP_PREC); + + /* reallocate the array a->dp + * + * We store the return in a temporary variable + * in case the operation failed we don't want + * to overwrite the dp member of a. + */ + tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size, 0, + DYNAMIC_TYPE_BIGINT); + if (tmp == NULL) { + /* reallocation failed but "a" is still valid [can be freed] */ + return MP_MEM; + } + + /* reallocation succeeded so set a->dp */ + a->dp = tmp; + + /* zero excess digits */ + i = a->alloc; + a->alloc = size; + for (; i < a->alloc; i++) { + a->dp[i] = 0; + } + } + return MP_OKAY; +} + + +/* reverse an array, used for radix code */ +void +bn_reverse (unsigned char *s, int len) +{ + int ix, iy; + unsigned char t; + + ix = 0; + iy = len - 1; + while (ix < iy) { + t = s[ix]; + s[ix] = s[iy]; + s[iy] = t; + ++ix; + --iy; + } +} + + +/* shift right by a certain bit count (store quotient in c, optional + remainder in d) */ +int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) +{ + int D, res; + mp_int t; + + + /* if the shift count is <= 0 then we do no work */ + if (b <= 0) { + res = mp_copy (a, c); + if (d != NULL) { + mp_zero (d); + } + return res; + } + + if ((res = mp_init (&t)) != MP_OKAY) { + return res; + } + + /* get the remainder */ + if (d != NULL) { + if ((res = mp_mod_2d (a, b, &t)) != MP_OKAY) { + mp_clear (&t); + return res; + } + } + + /* copy */ + if ((res = mp_copy (a, c)) != MP_OKAY) { + mp_clear (&t); + return res; + } + + /* shift by as many digits in the bit count */ + if (b >= (int)DIGIT_BIT) { + mp_rshd (c, b / DIGIT_BIT); + } + + /* shift any bit count < DIGIT_BIT */ + D = (b % DIGIT_BIT); + if (D != 0) { + mp_rshb(c, D); + } + mp_clamp (c); + if (d != NULL) { + mp_exch (&t, d); + } + mp_clear (&t); + return MP_OKAY; +} + + +/* set to zero */ +void mp_zero (mp_int * a) +{ + int n; + mp_digit *tmp; + + a->sign = MP_ZPOS; + a->used = 0; + + tmp = a->dp; + for (n = 0; n < a->alloc; n++) { + *tmp++ = 0; + } +} + + +/* trim unused digits + * + * This is used to ensure that leading zero digits are + * trimed and the leading "used" digit will be non-zero + * Typically very fast. Also fixes the sign if there + * are no more leading digits + */ +void +mp_clamp (mp_int * a) +{ + /* decrease used while the most significant digit is + * zero. + */ + while (a->used > 0 && a->dp[a->used - 1] == 0) { + --(a->used); + } + + /* reset the sign flag if used == 0 */ + if (a->used == 0) { + a->sign = MP_ZPOS; + } +} + + +/* swap the elements of two integers, for cases where you can't simply swap the + * mp_int pointers around + */ +void +mp_exch (mp_int * a, mp_int * b) +{ + mp_int t; + + t = *a; + *a = *b; + *b = t; +} + + +/* shift right a certain number of bits */ +void mp_rshb (mp_int *c, int x) +{ + register mp_digit *tmpc, mask, shift; + mp_digit r, rr; + mp_digit D = x; + + /* mask */ + mask = (((mp_digit)1) << D) - 1; + + /* shift for lsb */ + shift = DIGIT_BIT - D; + + /* alias */ + tmpc = c->dp + (c->used - 1); + + /* carry */ + r = 0; + for (x = c->used - 1; x >= 0; x--) { + /* get the lower bits of this word in a temp */ + rr = *tmpc & mask; + + /* shift the current word and mix in the carry bits from previous word */ + *tmpc = (*tmpc >> D) | (r << shift); + --tmpc; + + /* set the carry to the carry bits of the current word found above */ + r = rr; + } +} + + +/* shift right a certain amount of digits */ +void mp_rshd (mp_int * a, int b) +{ + int x; + + /* if b <= 0 then ignore it */ + if (b <= 0) { + return; + } + + /* if b > used then simply zero it and return */ + if (a->used <= b) { + mp_zero (a); + return; + } + + { + register mp_digit *bottom, *top; + + /* shift the digits down */ + + /* bottom */ + bottom = a->dp; + + /* top [offset into digits] */ + top = a->dp + b; + + /* this is implemented as a sliding window where + * the window is b-digits long and digits from + * the top of the window are copied to the bottom + * + * e.g. + + b-2 | b-1 | b0 | b1 | b2 | ... | bb | ----> + /\ | ----> + \-------------------/ ----> + */ + for (x = 0; x < (a->used - b); x++) { + *bottom++ = *top++; + } + + /* zero the top digits */ + for (; x < a->used; x++) { + *bottom++ = 0; + } + } + + /* remove excess digits */ + a->used -= b; +} + + +/* calc a value mod 2**b */ +int +mp_mod_2d (mp_int * a, int b, mp_int * c) +{ + int x, res; + + /* if b is <= 0 then zero the int */ + if (b <= 0) { + mp_zero (c); + return MP_OKAY; + } + + /* if the modulus is larger than the value than return */ + if (b >= (int) (a->used * DIGIT_BIT)) { + res = mp_copy (a, c); + return res; + } + + /* copy */ + if ((res = mp_copy (a, c)) != MP_OKAY) { + return res; + } + + /* zero digits above the last digit of the modulus */ + for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { + c->dp[x] = 0; + } + /* clear the digit that is not completely outside/inside the modulus */ + c->dp[b / DIGIT_BIT] &= (mp_digit) ((((mp_digit) 1) << + (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1)); + mp_clamp (c); + return MP_OKAY; +} + + +/* reads a unsigned char array, assumes the msb is stored first [big endian] */ +int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) +{ + int res; + + /* make sure there are at least two digits */ + if (a->alloc < 2) { + if ((res = mp_grow(a, 2)) != MP_OKAY) { + return res; + } + } + + /* zero the int */ + mp_zero (a); + + /* read the bytes in */ + while (c-- > 0) { + if ((res = mp_mul_2d (a, 8, a)) != MP_OKAY) { + return res; + } + +#ifndef MP_8BIT + a->dp[0] |= *b++; + a->used += 1; +#else + a->dp[0] = (*b & MP_MASK); + a->dp[1] |= ((*b++ >> 7U) & 1); + a->used += 2; +#endif + } + mp_clamp (a); + return MP_OKAY; +} + + +/* shift left by a certain bit count */ +int mp_mul_2d (mp_int * a, int b, mp_int * c) +{ + mp_digit d; + int res; + + /* copy */ + if (a != c) { + if ((res = mp_copy (a, c)) != MP_OKAY) { + return res; + } + } + + if (c->alloc < (int)(c->used + b/DIGIT_BIT + 1)) { + if ((res = mp_grow (c, c->used + b / DIGIT_BIT + 1)) != MP_OKAY) { + return res; + } + } + + /* shift by as many digits in the bit count */ + if (b >= (int)DIGIT_BIT) { + if ((res = mp_lshd (c, b / DIGIT_BIT)) != MP_OKAY) { + return res; + } + } + + /* shift any bit count < DIGIT_BIT */ + d = (mp_digit) (b % DIGIT_BIT); + if (d != 0) { + register mp_digit *tmpc, shift, mask, r, rr; + register int x; + + /* bitmask for carries */ + mask = (((mp_digit)1) << d) - 1; + + /* shift for msbs */ + shift = DIGIT_BIT - d; + + /* alias */ + tmpc = c->dp; + + /* carry */ + r = 0; + for (x = 0; x < c->used; x++) { + /* get the higher bits of the current word */ + rr = (*tmpc >> shift) & mask; + + /* shift the current word and OR in the carry */ + *tmpc = ((*tmpc << d) | r) & MP_MASK; + ++tmpc; + + /* set the carry to the carry bits of the current word */ + r = rr; + } + + /* set final carry */ + if (r != 0) { + c->dp[(c->used)++] = r; + } + } + mp_clamp (c); + return MP_OKAY; +} + + +/* shift left a certain amount of digits */ +int mp_lshd (mp_int * a, int b) +{ + int x, res; + + /* if its less than zero return */ + if (b <= 0) { + return MP_OKAY; + } + + /* grow to fit the new digits */ + if (a->alloc < a->used + b) { + if ((res = mp_grow (a, a->used + b)) != MP_OKAY) { + return res; + } + } + + { + register mp_digit *top, *bottom; + + /* increment the used by the shift amount then copy upwards */ + a->used += b; + + /* top */ + top = a->dp + a->used - 1; + + /* base */ + bottom = a->dp + a->used - 1 - b; + + /* much like mp_rshd this is implemented using a sliding window + * except the window goes the otherway around. Copying from + * the bottom to the top. see bn_mp_rshd.c for more info. + */ + for (x = a->used - 1; x >= b; x--) { + *top-- = *bottom--; + } + + /* zero the lower digits */ + top = a->dp; + for (x = 0; x < b; x++) { + *top++ = 0; + } + } + return MP_OKAY; +} + + +/* this is a shell function that calls either the normal or Montgomery + * exptmod functions. Originally the call to the montgomery code was + * embedded in the normal function but that wasted alot of stack space + * for nothing (since 99% of the time the Montgomery code would be called) + */ +int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) +{ + int dr; + + /* modulus P must be positive */ + if (P->sign == MP_NEG) { + return MP_VAL; + } + + /* if exponent X is negative we have to recurse */ + if (X->sign == MP_NEG) { +#ifdef BN_MP_INVMOD_C + mp_int tmpG, tmpX; + int err; + + /* first compute 1/G mod P */ + if ((err = mp_init(&tmpG)) != MP_OKAY) { + return err; + } + if ((err = mp_invmod(G, P, &tmpG)) != MP_OKAY) { + mp_clear(&tmpG); + return err; + } + + /* now get |X| */ + if ((err = mp_init(&tmpX)) != MP_OKAY) { + mp_clear(&tmpG); + return err; + } + if ((err = mp_abs(X, &tmpX)) != MP_OKAY) { + mp_clear(&tmpG); + mp_clear(&tmpX); + return err; + } + + /* and now compute (1/G)**|X| instead of G**X [X < 0] */ + err = mp_exptmod(&tmpG, &tmpX, P, Y); + mp_clear(&tmpG); + mp_clear(&tmpX); + return err; +#else + /* no invmod */ + return MP_VAL; +#endif + } + +/* modified diminished radix reduction */ +#if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C) && \ + defined(BN_S_MP_EXPTMOD_C) + if (mp_reduce_is_2k_l(P) == MP_YES) { + return s_mp_exptmod(G, X, P, Y, 1); + } +#endif + +#ifdef BN_MP_DR_IS_MODULUS_C + /* is it a DR modulus? */ + dr = mp_dr_is_modulus(P); +#else + /* default to no */ + dr = 0; +#endif + +#ifdef BN_MP_REDUCE_IS_2K_C + /* if not, is it a unrestricted DR modulus? */ + if (dr == 0) { + dr = mp_reduce_is_2k(P) << 1; + } +#endif + + /* if the modulus is odd or dr != 0 use the montgomery method */ +#ifdef BN_MP_EXPTMOD_FAST_C + if (mp_isodd (P) == 1 || dr != 0) { + return mp_exptmod_fast (G, X, P, Y, dr); + } else { +#endif +#ifdef BN_S_MP_EXPTMOD_C + /* otherwise use the generic Barrett reduction technique */ + return s_mp_exptmod (G, X, P, Y, 0); +#else + /* no exptmod for evens */ + return MP_VAL; +#endif +#ifdef BN_MP_EXPTMOD_FAST_C + } +#endif +} + + +/* b = |a| + * + * Simple function copies the input and fixes the sign to positive + */ +int +mp_abs (mp_int * a, mp_int * b) +{ + int res; + + /* copy a to b */ + if (a != b) { + if ((res = mp_copy (a, b)) != MP_OKAY) { + return res; + } + } + + /* force the sign of b to positive */ + b->sign = MP_ZPOS; + + return MP_OKAY; +} + + +/* hac 14.61, pp608 */ +int mp_invmod (mp_int * a, mp_int * b, mp_int * c) +{ + /* b cannot be negative */ + if (b->sign == MP_NEG || mp_iszero(b) == 1) { + return MP_VAL; + } + +#ifdef BN_FAST_MP_INVMOD_C + /* if the modulus is odd we can use a faster routine instead */ + if (mp_isodd (b) == 1) { + return fast_mp_invmod (a, b, c); + } +#endif + +#ifdef BN_MP_INVMOD_SLOW_C + return mp_invmod_slow(a, b, c); +#endif +} + + +/* computes the modular inverse via binary extended euclidean algorithm, + * that is c = 1/a mod b + * + * Based on slow invmod except this is optimized for the case where b is + * odd as per HAC Note 14.64 on pp. 610 + */ +int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c) +{ + mp_int x, y, u, v, B, D; + int res, neg; + + /* 2. [modified] b must be odd */ + if (mp_iseven (b) == 1) { + return MP_VAL; + } + + /* init all our temps */ + if ((res = mp_init_multi(&x, &y, &u, &v, &B, &D)) != MP_OKAY) { + return res; + } + + /* x == modulus, y == value to invert */ + if ((res = mp_copy (b, &x)) != MP_OKAY) { + goto LBL_ERR; + } + + /* we need y = |a| */ + if ((res = mp_mod (a, b, &y)) != MP_OKAY) { + goto LBL_ERR; + } + + /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ + if ((res = mp_copy (&x, &u)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_copy (&y, &v)) != MP_OKAY) { + goto LBL_ERR; + } + mp_set (&D, 1); + +top: + /* 4. while u is even do */ + while (mp_iseven (&u) == 1) { + /* 4.1 u = u/2 */ + if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { + goto LBL_ERR; + } + /* 4.2 if B is odd then */ + if (mp_isodd (&B) == 1) { + if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } + /* B = B/2 */ + if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* 5. while v is even do */ + while (mp_iseven (&v) == 1) { + /* 5.1 v = v/2 */ + if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { + goto LBL_ERR; + } + /* 5.2 if D is odd then */ + if (mp_isodd (&D) == 1) { + /* D = (D-x)/2 */ + if ((res = mp_sub (&D, &x, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + /* D = D/2 */ + if ((res = mp_div_2 (&D, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* 6. if u >= v then */ + if (mp_cmp (&u, &v) != MP_LT) { + /* u = u - v, B = B - D */ + if ((res = mp_sub (&u, &v, &u)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&B, &D, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } else { + /* v - v - u, D = D - B */ + if ((res = mp_sub (&v, &u, &v)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&D, &B, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* if not zero goto step 4 */ + if (mp_iszero (&u) == 0) { + goto top; + } + + /* now a = C, b = D, gcd == g*v */ + + /* if v != 1 then there is no inverse */ + if (mp_cmp_d (&v, 1) != MP_EQ) { + res = MP_VAL; + goto LBL_ERR; + } + + /* b is now the inverse */ + neg = a->sign; + while (D.sign == MP_NEG) { + if ((res = mp_add (&D, b, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + mp_exch (&D, c); + c->sign = neg; + res = MP_OKAY; + +LBL_ERR:mp_clear(&x); + mp_clear(&y); + mp_clear(&u); + mp_clear(&v); + mp_clear(&B); + mp_clear(&D); + return res; +} + + +/* hac 14.61, pp608 */ +int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c) +{ + mp_int x, y, u, v, A, B, C, D; + int res; + + /* b cannot be negative */ + if (b->sign == MP_NEG || mp_iszero(b) == 1) { + return MP_VAL; + } + + /* init temps */ + if ((res = mp_init_multi(&x, &y, &u, &v, + &A, &B)) != MP_OKAY) { + return res; + } + + /* init rest of tmps temps */ + if ((res = mp_init_multi(&C, &D, 0, 0, 0, 0)) != MP_OKAY) { + return res; + } + + /* x = a, y = b */ + if ((res = mp_mod(a, b, &x)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_copy (b, &y)) != MP_OKAY) { + goto LBL_ERR; + } + + /* 2. [modified] if x,y are both even then return an error! */ + if (mp_iseven (&x) == 1 && mp_iseven (&y) == 1) { + res = MP_VAL; + goto LBL_ERR; + } + + /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ + if ((res = mp_copy (&x, &u)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_copy (&y, &v)) != MP_OKAY) { + goto LBL_ERR; + } + mp_set (&A, 1); + mp_set (&D, 1); + +top: + /* 4. while u is even do */ + while (mp_iseven (&u) == 1) { + /* 4.1 u = u/2 */ + if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { + goto LBL_ERR; + } + /* 4.2 if A or B is odd then */ + if (mp_isodd (&A) == 1 || mp_isodd (&B) == 1) { + /* A = (A+y)/2, B = (B-x)/2 */ + if ((res = mp_add (&A, &y, &A)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } + /* A = A/2, B = B/2 */ + if ((res = mp_div_2 (&A, &A)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* 5. while v is even do */ + while (mp_iseven (&v) == 1) { + /* 5.1 v = v/2 */ + if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { + goto LBL_ERR; + } + /* 5.2 if C or D is odd then */ + if (mp_isodd (&C) == 1 || mp_isodd (&D) == 1) { + /* C = (C+y)/2, D = (D-x)/2 */ + if ((res = mp_add (&C, &y, &C)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_sub (&D, &x, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + /* C = C/2, D = D/2 */ + if ((res = mp_div_2 (&C, &C)) != MP_OKAY) { + goto LBL_ERR; + } + if ((res = mp_div_2 (&D, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* 6. if u >= v then */ + if (mp_cmp (&u, &v) != MP_LT) { + /* u = u - v, A = A - C, B = B - D */ + if ((res = mp_sub (&u, &v, &u)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&A, &C, &A)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&B, &D, &B)) != MP_OKAY) { + goto LBL_ERR; + } + } else { + /* v - v - u, C = C - A, D = D - B */ + if ((res = mp_sub (&v, &u, &v)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&C, &A, &C)) != MP_OKAY) { + goto LBL_ERR; + } + + if ((res = mp_sub (&D, &B, &D)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* if not zero goto step 4 */ + if (mp_iszero (&u) == 0) + goto top; + + /* now a = C, b = D, gcd == g*v */ + + /* if v != 1 then there is no inverse */ + if (mp_cmp_d (&v, 1) != MP_EQ) { + res = MP_VAL; + goto LBL_ERR; + } + + /* if its too low */ + while (mp_cmp_d(&C, 0) == MP_LT) { + if ((res = mp_add(&C, b, &C)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* too big */ + while (mp_cmp_mag(&C, b) != MP_LT) { + if ((res = mp_sub(&C, b, &C)) != MP_OKAY) { + goto LBL_ERR; + } + } + + /* C is now the inverse */ + mp_exch (&C, c); + res = MP_OKAY; +LBL_ERR:mp_clear(&x); + mp_clear(&y); + mp_clear(&u); + mp_clear(&v); + mp_clear(&A); + mp_clear(&B); + mp_clear(&C); + mp_clear(&D); + return res; +} + + +/* compare maginitude of two ints (unsigned) */ +int mp_cmp_mag (mp_int * a, mp_int * b) +{ + int n; + mp_digit *tmpa, *tmpb; + + /* compare based on # of non-zero digits */ + if (a->used > b->used) { + return MP_GT; + } + + if (a->used < b->used) { + return MP_LT; + } + + /* alias for a */ + tmpa = a->dp + (a->used - 1); + + /* alias for b */ + tmpb = b->dp + (a->used - 1); + + /* compare based on digits */ + for (n = 0; n < a->used; ++n, --tmpa, --tmpb) { + if (*tmpa > *tmpb) { + return MP_GT; + } + + if (*tmpa < *tmpb) { + return MP_LT; + } + } + return MP_EQ; +} + + +/* compare two ints (signed)*/ +int +mp_cmp (mp_int * a, mp_int * b) +{ + /* compare based on sign */ + if (a->sign != b->sign) { + if (a->sign == MP_NEG) { + return MP_LT; + } else { + return MP_GT; + } + } + + /* compare digits */ + if (a->sign == MP_NEG) { + /* if negative compare opposite direction */ + return mp_cmp_mag(b, a); + } else { + return mp_cmp_mag(a, b); + } +} + + +/* compare a digit */ +int mp_cmp_d(mp_int * a, mp_digit b) +{ + /* compare based on sign */ + if (a->sign == MP_NEG) { + return MP_LT; + } + + /* compare based on magnitude */ + if (a->used > 1) { + return MP_GT; + } + + /* compare the only digit of a to b */ + if (a->dp[0] > b) { + return MP_GT; + } else if (a->dp[0] < b) { + return MP_LT; + } else { + return MP_EQ; + } +} + + +/* set to a digit */ +void mp_set (mp_int * a, mp_digit b) +{ + mp_zero (a); + a->dp[0] = b & MP_MASK; + a->used = (a->dp[0] != 0) ? 1 : 0; +} + + +/* c = a mod b, 0 <= c < b */ +int +mp_mod (mp_int * a, mp_int * b, mp_int * c) +{ + mp_int t; + int res; + + if ((res = mp_init (&t)) != MP_OKAY) { + return res; + } + + if ((res = mp_div (a, b, NULL, &t)) != MP_OKAY) { + mp_clear (&t); + return res; + } + + if (t.sign != b->sign) { + res = mp_add (b, &t, c); + } else { + res = MP_OKAY; + mp_exch (&t, c); + } + + mp_clear (&t); + return res; +} + + +/* slower bit-bang division... also smaller */ +int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) +{ + mp_int ta, tb, tq, q; + int res, n, n2; + + /* is divisor zero ? */ + if (mp_iszero (b) == 1) { + return MP_VAL; + } + + /* if a < b then q=0, r = a */ + if (mp_cmp_mag (a, b) == MP_LT) { + if (d != NULL) { + res = mp_copy (a, d); + } else { + res = MP_OKAY; + } + if (c != NULL) { + mp_zero (c); + } + return res; + } + + /* init our temps */ + if ((res = mp_init_multi(&ta, &tb, &tq, &q, 0, 0)) != MP_OKAY) { + return res; + } + + + mp_set(&tq, 1); + n = mp_count_bits(a) - mp_count_bits(b); + if (((res = mp_abs(a, &ta)) != MP_OKAY) || + ((res = mp_abs(b, &tb)) != MP_OKAY) || + ((res = mp_mul_2d(&tb, n, &tb)) != MP_OKAY) || + ((res = mp_mul_2d(&tq, n, &tq)) != MP_OKAY)) { + goto LBL_ERR; + } + + while (n-- >= 0) { + if (mp_cmp(&tb, &ta) != MP_GT) { + if (((res = mp_sub(&ta, &tb, &ta)) != MP_OKAY) || + ((res = mp_add(&q, &tq, &q)) != MP_OKAY)) { + goto LBL_ERR; + } + } + if (((res = mp_div_2d(&tb, 1, &tb, NULL)) != MP_OKAY) || + ((res = mp_div_2d(&tq, 1, &tq, NULL)) != MP_OKAY)) { + goto LBL_ERR; + } + } + + /* now q == quotient and ta == remainder */ + n = a->sign; + n2 = (a->sign == b->sign ? MP_ZPOS : MP_NEG); + if (c != NULL) { + mp_exch(c, &q); + c->sign = (mp_iszero(c) == MP_YES) ? MP_ZPOS : n2; + } + if (d != NULL) { + mp_exch(d, &ta); + d->sign = (mp_iszero(d) == MP_YES) ? MP_ZPOS : n; + } +LBL_ERR: + mp_clear(&ta); + mp_clear(&tb); + mp_clear(&tq); + mp_clear(&q); + return res; +} + + +/* b = a/2 */ +int mp_div_2(mp_int * a, mp_int * b) +{ + int x, res, oldused; + + /* copy */ + if (b->alloc < a->used) { + if ((res = mp_grow (b, a->used)) != MP_OKAY) { + return res; + } + } + + oldused = b->used; + b->used = a->used; + { + register mp_digit r, rr, *tmpa, *tmpb; + + /* source alias */ + tmpa = a->dp + b->used - 1; + + /* dest alias */ + tmpb = b->dp + b->used - 1; + + /* carry */ + r = 0; + for (x = b->used - 1; x >= 0; x--) { + /* get the carry for the next iteration */ + rr = *tmpa & 1; + + /* shift the current digit, add in carry and store */ + *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); + + /* forward carry to next iteration */ + r = rr; + } + + /* zero excess digits */ + tmpb = b->dp + b->used; + for (x = b->used; x < oldused; x++) { + *tmpb++ = 0; + } + } + b->sign = a->sign; + mp_clamp (b); + return MP_OKAY; +} + + +/* high level addition (handles signs) */ +int mp_add (mp_int * a, mp_int * b, mp_int * c) +{ + int sa, sb, res; + + /* get sign of both inputs */ + sa = a->sign; + sb = b->sign; + + /* handle two cases, not four */ + if (sa == sb) { + /* both positive or both negative */ + /* add their magnitudes, copy the sign */ + c->sign = sa; + res = s_mp_add (a, b, c); + } else { + /* one positive, the other negative */ + /* subtract the one with the greater magnitude from */ + /* the one of the lesser magnitude. The result gets */ + /* the sign of the one with the greater magnitude. */ + if (mp_cmp_mag (a, b) == MP_LT) { + c->sign = sb; + res = s_mp_sub (b, a, c); + } else { + c->sign = sa; + res = s_mp_sub (a, b, c); + } + } + return res; +} + + +/* low level addition, based on HAC pp.594, Algorithm 14.7 */ +int +s_mp_add (mp_int * a, mp_int * b, mp_int * c) +{ + mp_int *x; + int olduse, res, min, max; + + /* find sizes, we let |a| <= |b| which means we have to sort + * them. "x" will point to the input with the most digits + */ + if (a->used > b->used) { + min = b->used; + max = a->used; + x = a; + } else { + min = a->used; + max = b->used; + x = b; + } + + /* init result */ + if (c->alloc < max + 1) { + if ((res = mp_grow (c, max + 1)) != MP_OKAY) { + return res; + } + } + + /* get old used digit count and set new one */ + olduse = c->used; + c->used = max + 1; + + { + register mp_digit u, *tmpa, *tmpb, *tmpc; + register int i; + + /* alias for digit pointers */ + + /* first input */ + tmpa = a->dp; + + /* second input */ + tmpb = b->dp; + + /* destination */ + tmpc = c->dp; + + /* zero the carry */ + u = 0; + for (i = 0; i < min; i++) { + /* Compute the sum at one digit, T[i] = A[i] + B[i] + U */ + *tmpc = *tmpa++ + *tmpb++ + u; + + /* U = carry bit of T[i] */ + u = *tmpc >> ((mp_digit)DIGIT_BIT); + + /* take away carry bit from T[i] */ + *tmpc++ &= MP_MASK; + } + + /* now copy higher words if any, that is in A+B + * if A or B has more digits add those in + */ + if (min != max) { + for (; i < max; i++) { + /* T[i] = X[i] + U */ + *tmpc = x->dp[i] + u; + + /* U = carry bit of T[i] */ + u = *tmpc >> ((mp_digit)DIGIT_BIT); + + /* take away carry bit from T[i] */ + *tmpc++ &= MP_MASK; + } + } + + /* add carry */ + *tmpc++ = u; + + /* clear digits above oldused */ + for (i = c->used; i < olduse; i++) { + *tmpc++ = 0; + } + } + + mp_clamp (c); + return MP_OKAY; +} + + +/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */ +int +s_mp_sub (mp_int * a, mp_int * b, mp_int * c) +{ + int olduse, res, min, max; + + /* find sizes */ + min = b->used; + max = a->used; + + /* init result */ + if (c->alloc < max) { + if ((res = mp_grow (c, max)) != MP_OKAY) { + return res; + } + } + olduse = c->used; + c->used = max; + + { + register mp_digit u, *tmpa, *tmpb, *tmpc; + register int i; + + /* alias for digit pointers */ + tmpa = a->dp; + tmpb = b->dp; + tmpc = c->dp; + + /* set carry to zero */ + u = 0; + for (i = 0; i < min; i++) { + /* T[i] = A[i] - B[i] - U */ + *tmpc = *tmpa++ - *tmpb++ - u; + + /* U = carry bit of T[i] + * Note this saves performing an AND operation since + * if a carry does occur it will propagate all the way to the + * MSB. As a result a single shift is enough to get the carry + */ + u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); + + /* Clear carry from T[i] */ + *tmpc++ &= MP_MASK; + } + + /* now copy higher words if any, e.g. if A has more digits than B */ + for (; i < max; i++) { + /* T[i] = A[i] - U */ + *tmpc = *tmpa++ - u; + + /* U = carry bit of T[i] */ + u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); + + /* Clear carry from T[i] */ + *tmpc++ &= MP_MASK; + } + + /* clear digits above used (since we may not have grown result above) */ + for (i = c->used; i < olduse; i++) { + *tmpc++ = 0; + } + } + + mp_clamp (c); + return MP_OKAY; +} + + +/* high level subtraction (handles signs) */ +int +mp_sub (mp_int * a, mp_int * b, mp_int * c) +{ + int sa, sb, res; + + sa = a->sign; + sb = b->sign; + + if (sa != sb) { + /* subtract a negative from a positive, OR */ + /* subtract a positive from a negative. */ + /* In either case, ADD their magnitudes, */ + /* and use the sign of the first number. */ + c->sign = sa; + res = s_mp_add (a, b, c); + } else { + /* subtract a positive from a positive, OR */ + /* subtract a negative from a negative. */ + /* First, take the difference between their */ + /* magnitudes, then... */ + if (mp_cmp_mag (a, b) != MP_LT) { + /* Copy the sign from the first */ + c->sign = sa; + /* The first has a larger or equal magnitude */ + res = s_mp_sub (a, b, c); + } else { + /* The result has the *opposite* sign from */ + /* the first number. */ + c->sign = (sa == MP_ZPOS) ? MP_NEG : MP_ZPOS; + /* The second has a larger magnitude */ + res = s_mp_sub (b, a, c); + } + } + return res; +} + + +/* determines if reduce_2k_l can be used */ +int mp_reduce_is_2k_l(mp_int *a) +{ + int ix, iy; + + if (a->used == 0) { + return MP_NO; + } else if (a->used == 1) { + return MP_YES; + } else if (a->used > 1) { + /* if more than half of the digits are -1 we're sold */ + for (iy = ix = 0; ix < a->used; ix++) { + if (a->dp[ix] == MP_MASK) { + ++iy; + } + } + return (iy >= (a->used/2)) ? MP_YES : MP_NO; + + } + return MP_NO; +} + + +/* determines if mp_reduce_2k can be used */ +int mp_reduce_is_2k(mp_int *a) +{ + int ix, iy, iw; + mp_digit iz; + + if (a->used == 0) { + return MP_NO; + } else if (a->used == 1) { + return MP_YES; + } else if (a->used > 1) { + iy = mp_count_bits(a); + iz = 1; + iw = 1; + + /* Test every bit from the second digit up, must be 1 */ + for (ix = DIGIT_BIT; ix < iy; ix++) { + if ((a->dp[iw] & iz) == 0) { + return MP_NO; + } + iz <<= 1; + if (iz > (mp_digit)MP_MASK) { + ++iw; + iz = 1; + } + } + } + return MP_YES; +} + + +/* determines if a number is a valid DR modulus */ +int mp_dr_is_modulus(mp_int *a) +{ + int ix; + + /* must be at least two digits */ + if (a->used < 2) { + return 0; + } + + /* must be of the form b**k - a [a <= b] so all + * but the first digit must be equal to -1 (mod b). + */ + for (ix = 1; ix < a->used; ix++) { + if (a->dp[ix] != MP_MASK) { + return 0; + } + } + return 1; +} + + +/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85 + * + * Uses a left-to-right k-ary sliding window to compute the modular + * exponentiation. + * The value of k changes based on the size of the exponent. + * + * Uses Montgomery or Diminished Radix reduction [whichever appropriate] + */ + +#ifdef MP_LOW_MEM + #define TAB_SIZE 32 +#else + #define TAB_SIZE 256 +#endif + +int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, + int redmode) +{ + mp_int M[TAB_SIZE], res; + mp_digit buf, mp; + int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; + + /* use a pointer to the reduction algorithm. This allows us to use + * one of many reduction algorithms without modding the guts of + * the code with if statements everywhere. + */ + int (*redux)(mp_int*,mp_int*,mp_digit); + + /* find window size */ + x = mp_count_bits (X); + if (x <= 7) { + winsize = 2; + } else if (x <= 36) { + winsize = 3; + } else if (x <= 140) { + winsize = 4; + } else if (x <= 450) { + winsize = 5; + } else if (x <= 1303) { + winsize = 6; + } else if (x <= 3529) { + winsize = 7; + } else { + winsize = 8; + } + +#ifdef MP_LOW_MEM + if (winsize > 5) { + winsize = 5; + } +#endif + + /* init M array */ + /* init first cell */ + if ((err = mp_init(&M[1])) != MP_OKAY) { + return err; + } + + /* now init the second half of the array */ + for (x = 1<<(winsize-1); x < (1 << winsize); x++) { + if ((err = mp_init(&M[x])) != MP_OKAY) { + for (y = 1<<(winsize-1); y < x; y++) { + mp_clear (&M[y]); + } + mp_clear(&M[1]); + return err; + } + } + + /* determine and setup reduction code */ + if (redmode == 0) { +#ifdef BN_MP_MONTGOMERY_SETUP_C + /* now setup montgomery */ + if ((err = mp_montgomery_setup (P, &mp)) != MP_OKAY) { + goto LBL_M; + } +#else + err = MP_VAL; + goto LBL_M; +#endif + + /* automatically pick the comba one if available (saves quite a few + calls/ifs) */ +#ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C + if (((P->used * 2 + 1) < MP_WARRAY) && + P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { + redux = fast_mp_montgomery_reduce; + } else +#endif + { +#ifdef BN_MP_MONTGOMERY_REDUCE_C + /* use slower baseline Montgomery method */ + redux = mp_montgomery_reduce; +#else + err = MP_VAL; + goto LBL_M; +#endif + } + } else if (redmode == 1) { +#if defined(BN_MP_DR_SETUP_C) && defined(BN_MP_DR_REDUCE_C) + /* setup DR reduction for moduli of the form B**k - b */ + mp_dr_setup(P, &mp); + redux = mp_dr_reduce; +#else + err = MP_VAL; + goto LBL_M; +#endif + } else { +#if defined(BN_MP_REDUCE_2K_SETUP_C) && defined(BN_MP_REDUCE_2K_C) + /* setup DR reduction for moduli of the form 2**k - b */ + if ((err = mp_reduce_2k_setup(P, &mp)) != MP_OKAY) { + goto LBL_M; + } + redux = mp_reduce_2k; +#else + err = MP_VAL; + goto LBL_M; +#endif + } + + /* setup result */ + if ((err = mp_init (&res)) != MP_OKAY) { + goto LBL_M; + } + + /* create M table + * + + * + * The first half of the table is not computed though accept for M[0] and M[1] + */ + + if (redmode == 0) { +#ifdef BN_MP_MONTGOMERY_CALC_NORMALIZATION_C + /* now we need R mod m */ + if ((err = mp_montgomery_calc_normalization (&res, P)) != MP_OKAY) { + goto LBL_RES; + } +#else + err = MP_VAL; + goto LBL_RES; +#endif + + /* now set M[1] to G * R mod m */ + if ((err = mp_mulmod (G, &res, P, &M[1])) != MP_OKAY) { + goto LBL_RES; + } + } else { + mp_set(&res, 1); + if ((err = mp_mod(G, P, &M[1])) != MP_OKAY) { + goto LBL_RES; + } + } + + /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times*/ + if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { + goto LBL_RES; + } + + for (x = 0; x < (winsize - 1); x++) { + if ((err = mp_sqr (&M[1 << (winsize - 1)], &M[1 << (winsize - 1)])) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&M[1 << (winsize - 1)], P, mp)) != MP_OKAY) { + goto LBL_RES; + } + } + + /* create upper table */ + for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { + if ((err = mp_mul (&M[x - 1], &M[1], &M[x])) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&M[x], P, mp)) != MP_OKAY) { + goto LBL_RES; + } + } + + /* set initial mode and bit cnt */ + mode = 0; + bitcnt = 1; + buf = 0; + digidx = X->used - 1; + bitcpy = 0; + bitbuf = 0; + + for (;;) { + /* grab next digit as required */ + if (--bitcnt == 0) { + /* if digidx == -1 we are out of digits so break */ + if (digidx == -1) { + break; + } + /* read next digit and reset bitcnt */ + buf = X->dp[digidx--]; + bitcnt = (int)DIGIT_BIT; + } + + /* grab the next msb from the exponent */ + y = (int)(buf >> (DIGIT_BIT - 1)) & 1; + buf <<= (mp_digit)1; + + /* if the bit is zero and mode == 0 then we ignore it + * These represent the leading zero bits before the first 1 bit + * in the exponent. Technically this opt is not required but it + * does lower the # of trivial squaring/reductions used + */ + if (mode == 0 && y == 0) { + continue; + } + + /* if the bit is zero and mode == 1 then we square */ + if (mode == 1 && y == 0) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + continue; + } + + /* else we add it to the window */ + bitbuf |= (y << (winsize - ++bitcpy)); + mode = 2; + + if (bitcpy == winsize) { + /* ok window is filled so square as required and multiply */ + /* square first */ + for (x = 0; x < winsize; x++) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + } + + /* then multiply */ + if ((err = mp_mul (&res, &M[bitbuf], &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + + /* empty window and reset */ + bitcpy = 0; + bitbuf = 0; + mode = 1; + } + } + + /* if bits remain then square/multiply */ + if (mode == 2 && bitcpy > 0) { + /* square then multiply if the bit is set */ + for (x = 0; x < bitcpy; x++) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + + /* get next bit of the window */ + bitbuf <<= 1; + if ((bitbuf & (1 << winsize)) != 0) { + /* then multiply */ + if ((err = mp_mul (&res, &M[1], &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + } + } + } + + if (redmode == 0) { + /* fixup result if Montgomery reduction is used + * recall that any value in a Montgomery system is + * actually multiplied by R mod n. So we have + * to reduce one more time to cancel out the factor + * of R. + */ + if ((err = redux(&res, P, mp)) != MP_OKAY) { + goto LBL_RES; + } + } + + /* swap res with Y */ + mp_exch (&res, Y); + err = MP_OKAY; +LBL_RES:mp_clear (&res); +LBL_M: + mp_clear(&M[1]); + for (x = 1<<(winsize-1); x < (1 << winsize); x++) { + mp_clear (&M[x]); + } + return err; +} + + +/* setups the montgomery reduction stuff */ +int +mp_montgomery_setup (mp_int * n, mp_digit * rho) +{ + mp_digit x, b; + +/* fast inversion mod 2**k + * + * Based on the fact that + * + * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) + * => 2*X*A - X*X*A*A = 1 + * => 2*(1) - (1) = 1 + */ + b = n->dp[0]; + + if ((b & 1) == 0) { + return MP_VAL; + } + + x = (((b + 2) & 4) << 1) + b; /* here x*a==1 mod 2**4 */ + x *= 2 - b * x; /* here x*a==1 mod 2**8 */ +#if !defined(MP_8BIT) + x *= 2 - b * x; /* here x*a==1 mod 2**16 */ +#endif +#if defined(MP_64BIT) || !(defined(MP_8BIT) || defined(MP_16BIT)) + x *= 2 - b * x; /* here x*a==1 mod 2**32 */ +#endif +#ifdef MP_64BIT + x *= 2 - b * x; /* here x*a==1 mod 2**64 */ +#endif + + /* rho = -1/m mod b */ + /* TAO, switched mp_word casts to mp_digit to shut up compiler */ + *rho = (((mp_digit)1 << ((mp_digit) DIGIT_BIT)) - x) & MP_MASK; + + return MP_OKAY; +} + + +/* computes xR**-1 == x (mod N) via Montgomery Reduction + * + * This is an optimized implementation of montgomery_reduce + * which uses the comba method to quickly calculate the columns of the + * reduction. + * + * Based on Algorithm 14.32 on pp.601 of HAC. +*/ +int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) +{ + int ix, res, olduse; +#ifdef CYASSL_SMALL_STACK + mp_word* W; /* uses dynamic memory and slower */ +#else + mp_word W[MP_WARRAY]; +#endif + + /* get old used count */ + olduse = x->used; + + /* grow a as required */ + if (x->alloc < n->used + 1) { + if ((res = mp_grow (x, n->used + 1)) != MP_OKAY) { + return res; + } + } + +#ifdef CYASSL_SMALL_STACK + W = (mp_word*)XMALLOC(sizeof(mp_word) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); + if (W == NULL) + return MP_MEM; +#endif + + /* first we have to get the digits of the input into + * an array of double precision words W[...] + */ + { + register mp_word *_W; + register mp_digit *tmpx; + + /* alias for the W[] array */ + _W = W; + + /* alias for the digits of x*/ + tmpx = x->dp; + + /* copy the digits of a into W[0..a->used-1] */ + for (ix = 0; ix < x->used; ix++) { + *_W++ = *tmpx++; + } + + /* zero the high words of W[a->used..m->used*2] */ + for (; ix < n->used * 2 + 1; ix++) { + *_W++ = 0; + } + } + + /* now we proceed to zero successive digits + * from the least significant upwards + */ + for (ix = 0; ix < n->used; ix++) { + /* mu = ai * m' mod b + * + * We avoid a double precision multiplication (which isn't required) + * by casting the value down to a mp_digit. Note this requires + * that W[ix-1] have the carry cleared (see after the inner loop) + */ + register mp_digit mu; + mu = (mp_digit) (((W[ix] & MP_MASK) * rho) & MP_MASK); + + /* a = a + mu * m * b**i + * + * This is computed in place and on the fly. The multiplication + * by b**i is handled by offseting which columns the results + * are added to. + * + * Note the comba method normally doesn't handle carries in the + * inner loop In this case we fix the carry from the previous + * column since the Montgomery reduction requires digits of the + * result (so far) [see above] to work. This is + * handled by fixing up one carry after the inner loop. The + * carry fixups are done in order so after these loops the + * first m->used words of W[] have the carries fixed + */ + { + register int iy; + register mp_digit *tmpn; + register mp_word *_W; + + /* alias for the digits of the modulus */ + tmpn = n->dp; + + /* Alias for the columns set by an offset of ix */ + _W = W + ix; + + /* inner loop */ + for (iy = 0; iy < n->used; iy++) { + *_W++ += ((mp_word)mu) * ((mp_word)*tmpn++); + } + } + + /* now fix carry for next digit, W[ix+1] */ + W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); + } + + /* now we have to propagate the carries and + * shift the words downward [all those least + * significant digits we zeroed]. + */ + { + register mp_digit *tmpx; + register mp_word *_W, *_W1; + + /* nox fix rest of carries */ + + /* alias for current word */ + _W1 = W + ix; + + /* alias for next word, where the carry goes */ + _W = W + ++ix; + + for (; ix <= n->used * 2 + 1; ix++) { + *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); + } + + /* copy out, A = A/b**n + * + * The result is A/b**n but instead of converting from an + * array of mp_word to mp_digit than calling mp_rshd + * we just copy them in the right order + */ + + /* alias for destination word */ + tmpx = x->dp; + + /* alias for shifted double precision result */ + _W = W + n->used; + + for (ix = 0; ix < n->used + 1; ix++) { + *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); + } + + /* zero oldused digits, if the input a was larger than + * m->used+1 we'll have to clear the digits + */ + for (; ix < olduse; ix++) { + *tmpx++ = 0; + } + } + + /* set the max used and clamp */ + x->used = n->used + 1; + mp_clamp (x); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, 0, DYNAMIC_TYPE_BIGINT); +#endif + + /* if A >= m then A = A - m */ + if (mp_cmp_mag (x, n) != MP_LT) { + return s_mp_sub (x, n, x); + } + return MP_OKAY; +} + + +/* computes xR**-1 == x (mod N) via Montgomery Reduction */ +int +mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) +{ + int ix, res, digs; + mp_digit mu; + + /* can the fast reduction [comba] method be used? + * + * Note that unlike in mul you're safely allowed *less* + * than the available columns [255 per default] since carries + * are fixed up in the inner loop. + */ + digs = n->used * 2 + 1; + if ((digs < MP_WARRAY) && + n->used < + (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { + return fast_mp_montgomery_reduce (x, n, rho); + } + + /* grow the input as required */ + if (x->alloc < digs) { + if ((res = mp_grow (x, digs)) != MP_OKAY) { + return res; + } + } + x->used = digs; + + for (ix = 0; ix < n->used; ix++) { + /* mu = ai * rho mod b + * + * The value of rho must be precalculated via + * montgomery_setup() such that + * it equals -1/n0 mod b this allows the + * following inner loop to reduce the + * input one digit at a time + */ + mu = (mp_digit) (((mp_word)x->dp[ix]) * ((mp_word)rho) & MP_MASK); + + /* a = a + mu * m * b**i */ + { + register int iy; + register mp_digit *tmpn, *tmpx, u; + register mp_word r; + + /* alias for digits of the modulus */ + tmpn = n->dp; + + /* alias for the digits of x [the input] */ + tmpx = x->dp + ix; + + /* set the carry to zero */ + u = 0; + + /* Multiply and add in place */ + for (iy = 0; iy < n->used; iy++) { + /* compute product and sum */ + r = ((mp_word)mu) * ((mp_word)*tmpn++) + + ((mp_word) u) + ((mp_word) * tmpx); + + /* get carry */ + u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); + + /* fix digit */ + *tmpx++ = (mp_digit)(r & ((mp_word) MP_MASK)); + } + /* At this point the ix'th digit of x should be zero */ + + + /* propagate carries upwards as required*/ + while (u) { + *tmpx += u; + u = *tmpx >> DIGIT_BIT; + *tmpx++ &= MP_MASK; + } + } + } + + /* at this point the n.used'th least + * significant digits of x are all zero + * which means we can shift x to the + * right by n.used digits and the + * residue is unchanged. + */ + + /* x = x/b**n.used */ + mp_clamp(x); + mp_rshd (x, n->used); + + /* if x >= n then x = x - n */ + if (mp_cmp_mag (x, n) != MP_LT) { + return s_mp_sub (x, n, x); + } + + return MP_OKAY; +} + + +/* determines the setup value */ +void mp_dr_setup(mp_int *a, mp_digit *d) +{ + /* the casts are required if DIGIT_BIT is one less than + * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] + */ + *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - + ((mp_word)a->dp[0])); +} + + +/* reduce "x" in place modulo "n" using the Diminished Radix algorithm. + * + * Based on algorithm from the paper + * + * "Generating Efficient Primes for Discrete Log Cryptosystems" + * Chae Hoon Lim, Pil Joong Lee, + * POSTECH Information Research Laboratories + * + * The modulus must be of a special format [see manual] + * + * Has been modified to use algorithm 7.10 from the LTM book instead + * + * Input x must be in the range 0 <= x <= (n-1)**2 + */ +int +mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k) +{ + int err, i, m; + mp_word r; + mp_digit mu, *tmpx1, *tmpx2; + + /* m = digits in modulus */ + m = n->used; + + /* ensure that "x" has at least 2m digits */ + if (x->alloc < m + m) { + if ((err = mp_grow (x, m + m)) != MP_OKAY) { + return err; + } + } + +/* top of loop, this is where the code resumes if + * another reduction pass is required. + */ +top: + /* aliases for digits */ + /* alias for lower half of x */ + tmpx1 = x->dp; + + /* alias for upper half of x, or x/B**m */ + tmpx2 = x->dp + m; + + /* set carry to zero */ + mu = 0; + + /* compute (x mod B**m) + k * [x/B**m] inline and inplace */ + for (i = 0; i < m; i++) { + r = ((mp_word)*tmpx2++) * ((mp_word)k) + *tmpx1 + mu; + *tmpx1++ = (mp_digit)(r & MP_MASK); + mu = (mp_digit)(r >> ((mp_word)DIGIT_BIT)); + } + + /* set final carry */ + *tmpx1++ = mu; + + /* zero words above m */ + for (i = m + 1; i < x->used; i++) { + *tmpx1++ = 0; + } + + /* clamp, sub and return */ + mp_clamp (x); + + /* if x >= n then subtract and reduce again + * Each successive "recursion" makes the input smaller and smaller. + */ + if (mp_cmp_mag (x, n) != MP_LT) { + s_mp_sub(x, n, x); + goto top; + } + return MP_OKAY; +} + + +/* reduces a modulo n where n is of the form 2**p - d */ +int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d) +{ + mp_int q; + int p, res; + + if ((res = mp_init(&q)) != MP_OKAY) { + return res; + } + + p = mp_count_bits(n); +top: + /* q = a/2**p, a = a mod 2**p */ + if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { + goto ERR; + } + + if (d != 1) { + /* q = q * d */ + if ((res = mp_mul_d(&q, d, &q)) != MP_OKAY) { + goto ERR; + } + } + + /* a = a + q */ + if ((res = s_mp_add(a, &q, a)) != MP_OKAY) { + goto ERR; + } + + if (mp_cmp_mag(a, n) != MP_LT) { + s_mp_sub(a, n, a); + goto top; + } + +ERR: + mp_clear(&q); + return res; +} + + +/* determines the setup value */ +int mp_reduce_2k_setup(mp_int *a, mp_digit *d) +{ + int res, p; + mp_int tmp; + + if ((res = mp_init(&tmp)) != MP_OKAY) { + return res; + } + + p = mp_count_bits(a); + if ((res = mp_2expt(&tmp, p)) != MP_OKAY) { + mp_clear(&tmp); + return res; + } + + if ((res = s_mp_sub(&tmp, a, &tmp)) != MP_OKAY) { + mp_clear(&tmp); + return res; + } + + *d = tmp.dp[0]; + mp_clear(&tmp); + return MP_OKAY; +} + + +/* computes a = 2**b + * + * Simple algorithm which zeroes the int, grows it then just sets one bit + * as required. + */ +int +mp_2expt (mp_int * a, int b) +{ + int res; + + /* zero a as per default */ + mp_zero (a); + + /* grow a to accomodate the single bit */ + if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) { + return res; + } + + /* set the used count of where the bit will go */ + a->used = b / DIGIT_BIT + 1; + + /* put the single bit in its place */ + a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); + + return MP_OKAY; +} + + +/* multiply by a digit */ +int +mp_mul_d (mp_int * a, mp_digit b, mp_int * c) +{ + mp_digit u, *tmpa, *tmpc; + mp_word r; + int ix, res, olduse; + + /* make sure c is big enough to hold a*b */ + if (c->alloc < a->used + 1) { + if ((res = mp_grow (c, a->used + 1)) != MP_OKAY) { + return res; + } + } + + /* get the original destinations used count */ + olduse = c->used; + + /* set the sign */ + c->sign = a->sign; + + /* alias for a->dp [source] */ + tmpa = a->dp; + + /* alias for c->dp [dest] */ + tmpc = c->dp; + + /* zero carry */ + u = 0; + + /* compute columns */ + for (ix = 0; ix < a->used; ix++) { + /* compute product and carry sum for this term */ + r = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b); + + /* mask off higher bits to get a single digit */ + *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK)); + + /* send carry into next iteration */ + u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); + } + + /* store final carry [if any] and increment ix offset */ + *tmpc++ = u; + ++ix; + + /* now zero digits above the top */ + while (ix++ < olduse) { + *tmpc++ = 0; + } + + /* set used count */ + c->used = a->used + 1; + mp_clamp(c); + + return MP_OKAY; +} + + +/* d = a * b (mod c) */ +int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) +{ + int res; + mp_int t; + + if ((res = mp_init (&t)) != MP_OKAY) { + return res; + } + + if ((res = mp_mul (a, b, &t)) != MP_OKAY) { + mp_clear (&t); + return res; + } + res = mp_mod (&t, c, d); + mp_clear (&t); + return res; +} + + +/* computes b = a*a */ +int +mp_sqr (mp_int * a, mp_int * b) +{ + int res; + + { +#ifdef BN_FAST_S_MP_SQR_C + /* can we use the fast comba multiplier? */ + if ((a->used * 2 + 1) < MP_WARRAY && + a->used < + (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { + res = fast_s_mp_sqr (a, b); + } else +#endif +#ifdef BN_S_MP_SQR_C + res = s_mp_sqr (a, b); +#else + res = MP_VAL; +#endif + } + b->sign = MP_ZPOS; + return res; +} + + +/* high level multiplication (handles sign) */ +int mp_mul (mp_int * a, mp_int * b, mp_int * c) +{ + int res, neg; + neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG; + + { + /* can we use the fast multiplier? + * + * The fast multiplier can be used if the output will + * have less than MP_WARRAY digits and the number of + * digits won't affect carry propagation + */ + int digs = a->used + b->used + 1; + +#ifdef BN_FAST_S_MP_MUL_DIGS_C + if ((digs < MP_WARRAY) && + MIN(a->used, b->used) <= + (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { + res = fast_s_mp_mul_digs (a, b, c, digs); + } else +#endif +#ifdef BN_S_MP_MUL_DIGS_C + res = s_mp_mul (a, b, c); /* uses s_mp_mul_digs */ +#else + res = MP_VAL; +#endif + + } + c->sign = (c->used > 0) ? neg : MP_ZPOS; + return res; +} + + +/* b = a*2 */ +int mp_mul_2(mp_int * a, mp_int * b) +{ + int x, res, oldused; + + /* grow to accomodate result */ + if (b->alloc < a->used + 1) { + if ((res = mp_grow (b, a->used + 1)) != MP_OKAY) { + return res; + } + } + + oldused = b->used; + b->used = a->used; + + { + register mp_digit r, rr, *tmpa, *tmpb; + + /* alias for source */ + tmpa = a->dp; + + /* alias for dest */ + tmpb = b->dp; + + /* carry */ + r = 0; + for (x = 0; x < a->used; x++) { + + /* get what will be the *next* carry bit from the + * MSB of the current digit + */ + rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1)); + + /* now shift up this digit, add in the carry [from the previous] */ + *tmpb++ = ((*tmpa++ << ((mp_digit)1)) | r) & MP_MASK; + + /* copy the carry that would be from the source + * digit into the next iteration + */ + r = rr; + } + + /* new leading digit? */ + if (r != 0) { + /* add a MSB which is always 1 at this point */ + *tmpb = 1; + ++(b->used); + } + + /* now zero any excess digits on the destination + * that we didn't write to + */ + tmpb = b->dp + b->used; + for (x = b->used; x < oldused; x++) { + *tmpb++ = 0; + } + } + b->sign = a->sign; + return MP_OKAY; +} + + +/* divide by three (based on routine from MPI and the GMP manual) */ +int +mp_div_3 (mp_int * a, mp_int *c, mp_digit * d) +{ + mp_int q; + mp_word w, t; + mp_digit b; + int res, ix; + + /* b = 2**DIGIT_BIT / 3 */ + b = (((mp_word)1) << ((mp_word)DIGIT_BIT)) / ((mp_word)3); + + if ((res = mp_init_size(&q, a->used)) != MP_OKAY) { + return res; + } + + q.used = a->used; + q.sign = a->sign; + w = 0; + for (ix = a->used - 1; ix >= 0; ix--) { + w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); + + if (w >= 3) { + /* multiply w by [1/3] */ + t = (w * ((mp_word)b)) >> ((mp_word)DIGIT_BIT); + + /* now subtract 3 * [w/3] from w, to get the remainder */ + w -= t+t+t; + + /* fixup the remainder as required since + * the optimization is not exact. + */ + while (w >= 3) { + t += 1; + w -= 3; + } + } else { + t = 0; + } + q.dp[ix] = (mp_digit)t; + } + + /* [optional] store the remainder */ + if (d != NULL) { + *d = (mp_digit)w; + } + + /* [optional] store the quotient */ + if (c != NULL) { + mp_clamp(&q); + mp_exch(&q, c); + } + mp_clear(&q); + + return res; +} + + +/* init an mp_init for a given size */ +int mp_init_size (mp_int * a, int size) +{ + int x; + + /* pad size so there are always extra digits */ + size += (MP_PREC * 2) - (size % MP_PREC); + + /* alloc mem */ + a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size, 0, + DYNAMIC_TYPE_BIGINT); + if (a->dp == NULL) { + return MP_MEM; + } + + /* set the members */ + a->used = 0; + a->alloc = size; + a->sign = MP_ZPOS; + + /* zero the digits */ + for (x = 0; x < size; x++) { + a->dp[x] = 0; + } + + return MP_OKAY; +} + + +/* the jist of squaring... + * you do like mult except the offset of the tmpx [one that + * starts closer to zero] can't equal the offset of tmpy. + * So basically you set up iy like before then you min it with + * (ty-tx) so that it never happens. You double all those + * you add in the inner loop + +After that loop you do the squares and add them in. +*/ + +int fast_s_mp_sqr (mp_int * a, mp_int * b) +{ + int olduse, res, pa, ix, iz; +#ifdef CYASSL_SMALL_STACK + mp_digit* W; /* uses dynamic memory and slower */ +#else + mp_digit W[MP_WARRAY]; +#endif + mp_digit *tmpx; + mp_word W1; + + /* grow the destination as required */ + pa = a->used + a->used; + if (b->alloc < pa) { + if ((res = mp_grow (b, pa)) != MP_OKAY) { + return res; + } + } + + if (pa > MP_WARRAY) + return MP_RANGE; /* TAO range check */ + +#ifdef CYASSL_SMALL_STACK + W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); + if (W == NULL) + return MP_MEM; +#endif + + /* number of output digits to produce */ + W1 = 0; + for (ix = 0; ix < pa; ix++) { + int tx, ty, iy; + mp_word _W; + mp_digit *tmpy; + + /* clear counter */ + _W = 0; + + /* get offsets into the two bignums */ + ty = MIN(a->used-1, ix); + tx = ix - ty; + + /* setup temp aliases */ + tmpx = a->dp + tx; + tmpy = a->dp + ty; + + /* this is the number of times the loop will iterrate, essentially + while (tx++ < a->used && ty-- >= 0) { ... } + */ + iy = MIN(a->used-tx, ty+1); + + /* now for squaring tx can never equal ty + * we halve the distance since they approach at a rate of 2x + * and we have to round because odd cases need to be executed + */ + iy = MIN(iy, (ty-tx+1)>>1); + + /* execute loop */ + for (iz = 0; iz < iy; iz++) { + _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); + } + + /* double the inner product and add carry */ + _W = _W + _W + W1; + + /* even columns have the square term in them */ + if ((ix&1) == 0) { + _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); + } + + /* store it */ + W[ix] = (mp_digit)(_W & MP_MASK); + + /* make next carry */ + W1 = _W >> ((mp_word)DIGIT_BIT); + } + + /* setup dest */ + olduse = b->used; + b->used = a->used+a->used; + + { + mp_digit *tmpb; + tmpb = b->dp; + for (ix = 0; ix < pa; ix++) { + *tmpb++ = W[ix] & MP_MASK; + } + + /* clear unused digits [that existed in the old copy of c] */ + for (; ix < olduse; ix++) { + *tmpb++ = 0; + } + } + mp_clamp (b); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, 0, DYNAMIC_TYPE_BIGINT); +#endif + + return MP_OKAY; +} + + +/* Fast (comba) multiplier + * + * This is the fast column-array [comba] multiplier. It is + * designed to compute the columns of the product first + * then handle the carries afterwards. This has the effect + * of making the nested loops that compute the columns very + * simple and schedulable on super-scalar processors. + * + * This has been modified to produce a variable number of + * digits of output so if say only a half-product is required + * you don't have to compute the upper half (a feature + * required for fast Barrett reduction). + * + * Based on Algorithm 14.12 on pp.595 of HAC. + * + */ +int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) +{ + int olduse, res, pa, ix, iz; +#ifdef CYASSL_SMALL_STACK + mp_digit* W; /* uses dynamic memory and slower */ +#else + mp_digit W[MP_WARRAY]; +#endif + register mp_word _W; + + /* grow the destination as required */ + if (c->alloc < digs) { + if ((res = mp_grow (c, digs)) != MP_OKAY) { + return res; + } + } + + /* number of output digits to produce */ + pa = MIN(digs, a->used + b->used); + if (pa > MP_WARRAY) + return MP_RANGE; /* TAO range check */ + +#ifdef CYASSL_SMALL_STACK + W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); + if (W == NULL) + return MP_MEM; +#endif + + /* clear the carry */ + _W = 0; + for (ix = 0; ix < pa; ix++) { + int tx, ty; + int iy; + mp_digit *tmpx, *tmpy; + + /* get offsets into the two bignums */ + ty = MIN(b->used-1, ix); + tx = ix - ty; + + /* setup temp aliases */ + tmpx = a->dp + tx; + tmpy = b->dp + ty; + + /* this is the number of times the loop will iterrate, essentially + while (tx++ < a->used && ty-- >= 0) { ... } + */ + iy = MIN(a->used-tx, ty+1); + + /* execute loop */ + for (iz = 0; iz < iy; ++iz) { + _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); + + } + + /* store term */ + W[ix] = ((mp_digit)_W) & MP_MASK; + + /* make next carry */ + _W = _W >> ((mp_word)DIGIT_BIT); + } + + /* setup dest */ + olduse = c->used; + c->used = pa; + + { + register mp_digit *tmpc; + tmpc = c->dp; + for (ix = 0; ix < pa+1; ix++) { + /* now extract the previous digit [below the carry] */ + *tmpc++ = W[ix]; + } + + /* clear unused digits [that existed in the old copy of c] */ + for (; ix < olduse; ix++) { + *tmpc++ = 0; + } + } + mp_clamp (c); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, 0, DYNAMIC_TYPE_BIGINT); +#endif + + return MP_OKAY; +} + + +/* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */ +int s_mp_sqr (mp_int * a, mp_int * b) +{ + mp_int t; + int res, ix, iy, pa; + mp_word r; + mp_digit u, tmpx, *tmpt; + + pa = a->used; + if ((res = mp_init_size (&t, 2*pa + 1)) != MP_OKAY) { + return res; + } + + /* default used is maximum possible size */ + t.used = 2*pa + 1; + + for (ix = 0; ix < pa; ix++) { + /* first calculate the digit at 2*ix */ + /* calculate double precision result */ + r = ((mp_word) t.dp[2*ix]) + + ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); + + /* store lower part in result */ + t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); + + /* get the carry */ + u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); + + /* left hand side of A[ix] * A[iy] */ + tmpx = a->dp[ix]; + + /* alias for where to store the results */ + tmpt = t.dp + (2*ix + 1); + + for (iy = ix + 1; iy < pa; iy++) { + /* first calculate the product */ + r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); + + /* now calculate the double precision result, note we use + * addition instead of *2 since it's easier to optimize + */ + r = ((mp_word) *tmpt) + r + r + ((mp_word) u); + + /* store lower part */ + *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); + + /* get carry */ + u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); + } + /* propagate upwards */ + while (u != ((mp_digit) 0)) { + r = ((mp_word) *tmpt) + ((mp_word) u); + *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); + u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); + } + } + + mp_clamp (&t); + mp_exch (&t, b); + mp_clear (&t); + return MP_OKAY; +} + + +/* multiplies |a| * |b| and only computes upto digs digits of result + * HAC pp. 595, Algorithm 14.12 Modified so you can control how + * many digits of output are created. + */ +int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) +{ + mp_int t; + int res, pa, pb, ix, iy; + mp_digit u; + mp_word r; + mp_digit tmpx, *tmpt, *tmpy; + + /* can we use the fast multiplier? */ + if (((digs) < MP_WARRAY) && + MIN (a->used, b->used) < + (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { + return fast_s_mp_mul_digs (a, b, c, digs); + } + + if ((res = mp_init_size (&t, digs)) != MP_OKAY) { + return res; + } + t.used = digs; + + /* compute the digits of the product directly */ + pa = a->used; + for (ix = 0; ix < pa; ix++) { + /* set the carry to zero */ + u = 0; + + /* limit ourselves to making digs digits of output */ + pb = MIN (b->used, digs - ix); + + /* setup some aliases */ + /* copy of the digit from a used within the nested loop */ + tmpx = a->dp[ix]; + + /* an alias for the destination shifted ix places */ + tmpt = t.dp + ix; + + /* an alias for the digits of b */ + tmpy = b->dp; + + /* compute the columns of the output and propagate the carry */ + for (iy = 0; iy < pb; iy++) { + /* compute the column as a mp_word */ + r = ((mp_word)*tmpt) + + ((mp_word)tmpx) * ((mp_word)*tmpy++) + + ((mp_word) u); + + /* the new column is the lower part of the result */ + *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); + + /* get the carry word from the result */ + u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); + } + /* set carry if it is placed below digs */ + if (ix + iy < digs) { + *tmpt = u; + } + } + + mp_clamp (&t); + mp_exch (&t, c); + + mp_clear (&t); + return MP_OKAY; +} + + +/* + * shifts with subtractions when the result is greater than b. + * + * The method is slightly modified to shift B unconditionally upto just under + * the leading bit of b. This saves alot of multiple precision shifting. + */ +int mp_montgomery_calc_normalization (mp_int * a, mp_int * b) +{ + int x, bits, res; + + /* how many bits of last digit does b use */ + bits = mp_count_bits (b) % DIGIT_BIT; + + if (b->used > 1) { + if ((res = mp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) { + return res; + } + } else { + mp_set(a, 1); + bits = 1; + } + + + /* now compute C = A * B mod b */ + for (x = bits - 1; x < (int)DIGIT_BIT; x++) { + if ((res = mp_mul_2 (a, a)) != MP_OKAY) { + return res; + } + if (mp_cmp_mag (a, b) != MP_LT) { + if ((res = s_mp_sub (a, b, a)) != MP_OKAY) { + return res; + } + } + } + + return MP_OKAY; +} + + +#ifdef MP_LOW_MEM + #define TAB_SIZE 32 +#else + #define TAB_SIZE 256 +#endif + +int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) +{ + mp_int M[TAB_SIZE], res, mu; + mp_digit buf; + int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; + int (*redux)(mp_int*,mp_int*,mp_int*); + + /* find window size */ + x = mp_count_bits (X); + if (x <= 7) { + winsize = 2; + } else if (x <= 36) { + winsize = 3; + } else if (x <= 140) { + winsize = 4; + } else if (x <= 450) { + winsize = 5; + } else if (x <= 1303) { + winsize = 6; + } else if (x <= 3529) { + winsize = 7; + } else { + winsize = 8; + } + +#ifdef MP_LOW_MEM + if (winsize > 5) { + winsize = 5; + } +#endif + + /* init M array */ + /* init first cell */ + if ((err = mp_init(&M[1])) != MP_OKAY) { + return err; + } + + /* now init the second half of the array */ + for (x = 1<<(winsize-1); x < (1 << winsize); x++) { + if ((err = mp_init(&M[x])) != MP_OKAY) { + for (y = 1<<(winsize-1); y < x; y++) { + mp_clear (&M[y]); + } + mp_clear(&M[1]); + return err; + } + } + + /* create mu, used for Barrett reduction */ + if ((err = mp_init (&mu)) != MP_OKAY) { + goto LBL_M; + } + + if (redmode == 0) { + if ((err = mp_reduce_setup (&mu, P)) != MP_OKAY) { + goto LBL_MU; + } + redux = mp_reduce; + } else { + if ((err = mp_reduce_2k_setup_l (P, &mu)) != MP_OKAY) { + goto LBL_MU; + } + redux = mp_reduce_2k_l; + } + + /* create M table + * + * The M table contains powers of the base, + * e.g. M[x] = G**x mod P + * + * The first half of the table is not + * computed though accept for M[0] and M[1] + */ + if ((err = mp_mod (G, P, &M[1])) != MP_OKAY) { + goto LBL_MU; + } + + /* compute the value at M[1<<(winsize-1)] by squaring + * M[1] (winsize-1) times + */ + if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { + goto LBL_MU; + } + + for (x = 0; x < (winsize - 1); x++) { + /* square it */ + if ((err = mp_sqr (&M[1 << (winsize - 1)], + &M[1 << (winsize - 1)])) != MP_OKAY) { + goto LBL_MU; + } + + /* reduce modulo P */ + if ((err = redux (&M[1 << (winsize - 1)], P, &mu)) != MP_OKAY) { + goto LBL_MU; + } + } + + /* create upper table, that is M[x] = M[x-1] * M[1] (mod P) + * for x = (2**(winsize - 1) + 1) to (2**winsize - 1) + */ + for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { + if ((err = mp_mul (&M[x - 1], &M[1], &M[x])) != MP_OKAY) { + goto LBL_MU; + } + if ((err = redux (&M[x], P, &mu)) != MP_OKAY) { + goto LBL_MU; + } + } + + /* setup result */ + if ((err = mp_init (&res)) != MP_OKAY) { + goto LBL_MU; + } + mp_set (&res, 1); + + /* set initial mode and bit cnt */ + mode = 0; + bitcnt = 1; + buf = 0; + digidx = X->used - 1; + bitcpy = 0; + bitbuf = 0; + + for (;;) { + /* grab next digit as required */ + if (--bitcnt == 0) { + /* if digidx == -1 we are out of digits */ + if (digidx == -1) { + break; + } + /* read next digit and reset the bitcnt */ + buf = X->dp[digidx--]; + bitcnt = (int) DIGIT_BIT; + } + + /* grab the next msb from the exponent */ + y = (int)(buf >> (mp_digit)(DIGIT_BIT - 1)) & 1; + buf <<= (mp_digit)1; + + /* if the bit is zero and mode == 0 then we ignore it + * These represent the leading zero bits before the first 1 bit + * in the exponent. Technically this opt is not required but it + * does lower the # of trivial squaring/reductions used + */ + if (mode == 0 && y == 0) { + continue; + } + + /* if the bit is zero and mode == 1 then we square */ + if (mode == 1 && y == 0) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, &mu)) != MP_OKAY) { + goto LBL_RES; + } + continue; + } + + /* else we add it to the window */ + bitbuf |= (y << (winsize - ++bitcpy)); + mode = 2; + + if (bitcpy == winsize) { + /* ok window is filled so square as required and multiply */ + /* square first */ + for (x = 0; x < winsize; x++) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, &mu)) != MP_OKAY) { + goto LBL_RES; + } + } + + /* then multiply */ + if ((err = mp_mul (&res, &M[bitbuf], &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, &mu)) != MP_OKAY) { + goto LBL_RES; + } + + /* empty window and reset */ + bitcpy = 0; + bitbuf = 0; + mode = 1; + } + } + + /* if bits remain then square/multiply */ + if (mode == 2 && bitcpy > 0) { + /* square then multiply if the bit is set */ + for (x = 0; x < bitcpy; x++) { + if ((err = mp_sqr (&res, &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, &mu)) != MP_OKAY) { + goto LBL_RES; + } + + bitbuf <<= 1; + if ((bitbuf & (1 << winsize)) != 0) { + /* then multiply */ + if ((err = mp_mul (&res, &M[1], &res)) != MP_OKAY) { + goto LBL_RES; + } + if ((err = redux (&res, P, &mu)) != MP_OKAY) { + goto LBL_RES; + } + } + } + } + + mp_exch (&res, Y); + err = MP_OKAY; +LBL_RES:mp_clear (&res); +LBL_MU:mp_clear (&mu); +LBL_M: + mp_clear(&M[1]); + for (x = 1<<(winsize-1); x < (1 << winsize); x++) { + mp_clear (&M[x]); + } + return err; +} + + +/* pre-calculate the value required for Barrett reduction + * For a given modulus "b" it calulates the value required in "a" + */ +int mp_reduce_setup (mp_int * a, mp_int * b) +{ + int res; + + if ((res = mp_2expt (a, b->used * 2 * DIGIT_BIT)) != MP_OKAY) { + return res; + } + return mp_div (a, b, a, NULL); +} + + +/* reduces x mod m, assumes 0 < x < m**2, mu is + * precomputed via mp_reduce_setup. + * From HAC pp.604 Algorithm 14.42 + */ +int mp_reduce (mp_int * x, mp_int * m, mp_int * mu) +{ + mp_int q; + int res, um = m->used; + + /* q = x */ + if ((res = mp_init_copy (&q, x)) != MP_OKAY) { + return res; + } + + /* q1 = x / b**(k-1) */ + mp_rshd (&q, um - 1); + + /* according to HAC this optimization is ok */ + if (((mp_word) um) > (((mp_digit)1) << (DIGIT_BIT - 1))) { + if ((res = mp_mul (&q, mu, &q)) != MP_OKAY) { + goto CLEANUP; + } + } else { +#ifdef BN_S_MP_MUL_HIGH_DIGS_C + if ((res = s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { + goto CLEANUP; + } +#elif defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) + if ((res = fast_s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { + goto CLEANUP; + } +#else + { + res = MP_VAL; + goto CLEANUP; + } +#endif + } + + /* q3 = q2 / b**(k+1) */ + mp_rshd (&q, um + 1); + + /* x = x mod b**(k+1), quick (no division) */ + if ((res = mp_mod_2d (x, DIGIT_BIT * (um + 1), x)) != MP_OKAY) { + goto CLEANUP; + } + + /* q = q * m mod b**(k+1), quick (no division) */ + if ((res = s_mp_mul_digs (&q, m, &q, um + 1)) != MP_OKAY) { + goto CLEANUP; + } + + /* x = x - q */ + if ((res = mp_sub (x, &q, x)) != MP_OKAY) { + goto CLEANUP; + } + + /* If x < 0, add b**(k+1) to it */ + if (mp_cmp_d (x, 0) == MP_LT) { + mp_set (&q, 1); + if ((res = mp_lshd (&q, um + 1)) != MP_OKAY) + goto CLEANUP; + if ((res = mp_add (x, &q, x)) != MP_OKAY) + goto CLEANUP; + } + + /* Back off if it's too big */ + while (mp_cmp (x, m) != MP_LT) { + if ((res = s_mp_sub (x, m, x)) != MP_OKAY) { + goto CLEANUP; + } + } + +CLEANUP: + mp_clear (&q); + + return res; +} + + +/* reduces a modulo n where n is of the form 2**p - d + This differs from reduce_2k since "d" can be larger + than a single digit. +*/ +int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d) +{ + mp_int q; + int p, res; + + if ((res = mp_init(&q)) != MP_OKAY) { + return res; + } + + p = mp_count_bits(n); +top: + /* q = a/2**p, a = a mod 2**p */ + if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { + goto ERR; + } + + /* q = q * d */ + if ((res = mp_mul(&q, d, &q)) != MP_OKAY) { + goto ERR; + } + + /* a = a + q */ + if ((res = s_mp_add(a, &q, a)) != MP_OKAY) { + goto ERR; + } + + if (mp_cmp_mag(a, n) != MP_LT) { + s_mp_sub(a, n, a); + goto top; + } + +ERR: + mp_clear(&q); + return res; +} + + +/* determines the setup value */ +int mp_reduce_2k_setup_l(mp_int *a, mp_int *d) +{ + int res; + mp_int tmp; + + if ((res = mp_init(&tmp)) != MP_OKAY) { + return res; + } + + if ((res = mp_2expt(&tmp, mp_count_bits(a))) != MP_OKAY) { + goto ERR; + } + + if ((res = s_mp_sub(&tmp, a, d)) != MP_OKAY) { + goto ERR; + } + +ERR: + mp_clear(&tmp); + return res; +} + + +/* multiplies |a| * |b| and does not compute the lower digs digits + * [meant to get the higher part of the product] + */ +int +s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) +{ + mp_int t; + int res, pa, pb, ix, iy; + mp_digit u; + mp_word r; + mp_digit tmpx, *tmpt, *tmpy; + + /* can we use the fast multiplier? */ +#ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C + if (((a->used + b->used + 1) < MP_WARRAY) + && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { + return fast_s_mp_mul_high_digs (a, b, c, digs); + } +#endif + + if ((res = mp_init_size (&t, a->used + b->used + 1)) != MP_OKAY) { + return res; + } + t.used = a->used + b->used + 1; + + pa = a->used; + pb = b->used; + for (ix = 0; ix < pa; ix++) { + /* clear the carry */ + u = 0; + + /* left hand side of A[ix] * B[iy] */ + tmpx = a->dp[ix]; + + /* alias to the address of where the digits will be stored */ + tmpt = &(t.dp[digs]); + + /* alias for where to read the right hand side from */ + tmpy = b->dp + (digs - ix); + + for (iy = digs - ix; iy < pb; iy++) { + /* calculate the double precision result */ + r = ((mp_word)*tmpt) + + ((mp_word)tmpx) * ((mp_word)*tmpy++) + + ((mp_word) u); + + /* get the lower part */ + *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); + + /* carry the carry */ + u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); + } + *tmpt = u; + } + mp_clamp (&t); + mp_exch (&t, c); + mp_clear (&t); + return MP_OKAY; +} + + +/* this is a modified version of fast_s_mul_digs that only produces + * output digits *above* digs. See the comments for fast_s_mul_digs + * to see how it works. + * + * This is used in the Barrett reduction since for one of the multiplications + * only the higher digits were needed. This essentially halves the work. + * + * Based on Algorithm 14.12 on pp.595 of HAC. + */ +int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) +{ + int olduse, res, pa, ix, iz; +#ifdef CYASSL_SMALL_STACK + mp_digit* W; /* uses dynamic memory and slower */ +#else + mp_digit W[MP_WARRAY]; +#endif + mp_word _W; + + /* grow the destination as required */ + pa = a->used + b->used; + if (c->alloc < pa) { + if ((res = mp_grow (c, pa)) != MP_OKAY) { + return res; + } + } + + if (pa > MP_WARRAY) + return MP_RANGE; /* TAO range check */ + +#ifdef CYASSL_SMALL_STACK + W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); + if (W == NULL) + return MP_MEM; +#endif + + /* number of output digits to produce */ + pa = a->used + b->used; + _W = 0; + for (ix = digs; ix < pa; ix++) { + int tx, ty, iy; + mp_digit *tmpx, *tmpy; + + /* get offsets into the two bignums */ + ty = MIN(b->used-1, ix); + tx = ix - ty; + + /* setup temp aliases */ + tmpx = a->dp + tx; + tmpy = b->dp + ty; + + /* this is the number of times the loop will iterrate, essentially its + while (tx++ < a->used && ty-- >= 0) { ... } + */ + iy = MIN(a->used-tx, ty+1); + + /* execute loop */ + for (iz = 0; iz < iy; iz++) { + _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); + } + + /* store term */ + W[ix] = ((mp_digit)_W) & MP_MASK; + + /* make next carry */ + _W = _W >> ((mp_word)DIGIT_BIT); + } + + /* setup dest */ + olduse = c->used; + c->used = pa; + + { + register mp_digit *tmpc; + + tmpc = c->dp + digs; + for (ix = digs; ix <= pa; ix++) { + /* now extract the previous digit [below the carry] */ + *tmpc++ = W[ix]; + } + + /* clear unused digits [that existed in the old copy of c] */ + for (; ix < olduse; ix++) { + *tmpc++ = 0; + } + } + mp_clamp (c); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, 0, DYNAMIC_TYPE_BIGINT); +#endif + + return MP_OKAY; +} + + +/* set a 32-bit const */ +int mp_set_int (mp_int * a, unsigned long b) +{ + int x, res; + + mp_zero (a); + + /* set four bits at a time */ + for (x = 0; x < 8; x++) { + /* shift the number up four bits */ + if ((res = mp_mul_2d (a, 4, a)) != MP_OKAY) { + return res; + } + + /* OR in the top four bits of the source */ + a->dp[0] |= (b >> 28) & 15; + + /* shift the source up to the next four bits */ + b <<= 4; + + /* ensure that digits are not clamped off */ + a->used += 1; + } + mp_clamp (a); + return MP_OKAY; +} + + +#if defined(CYASSL_KEY_GEN) || defined(HAVE_ECC) + +/* c = a * a (mod b) */ +int mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) +{ + int res; + mp_int t; + + if ((res = mp_init (&t)) != MP_OKAY) { + return res; + } + + if ((res = mp_sqr (a, &t)) != MP_OKAY) { + mp_clear (&t); + return res; + } + res = mp_mod (&t, b, c); + mp_clear (&t); + return res; +} + +#endif + + +#if defined(HAVE_ECC) || !defined(NO_PWDBASED) || defined(CYASSL_SNIFFER) || defined(CYASSL_HAVE_WOLFSCEP) + +/* single digit addition */ +int mp_add_d (mp_int* a, mp_digit b, mp_int* c) +{ + int res, ix, oldused; + mp_digit *tmpa, *tmpc, mu; + + /* grow c as required */ + if (c->alloc < a->used + 1) { + if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { + return res; + } + } + + /* if a is negative and |a| >= b, call c = |a| - b */ + if (a->sign == MP_NEG && (a->used > 1 || a->dp[0] >= b)) { + /* temporarily fix sign of a */ + a->sign = MP_ZPOS; + + /* c = |a| - b */ + res = mp_sub_d(a, b, c); + + /* fix sign */ + a->sign = c->sign = MP_NEG; + + /* clamp */ + mp_clamp(c); + + return res; + } + + /* old number of used digits in c */ + oldused = c->used; + + /* sign always positive */ + c->sign = MP_ZPOS; + + /* source alias */ + tmpa = a->dp; + + /* destination alias */ + tmpc = c->dp; + + /* if a is positive */ + if (a->sign == MP_ZPOS) { + /* add digit, after this we're propagating + * the carry. + */ + *tmpc = *tmpa++ + b; + mu = *tmpc >> DIGIT_BIT; + *tmpc++ &= MP_MASK; + + /* now handle rest of the digits */ + for (ix = 1; ix < a->used; ix++) { + *tmpc = *tmpa++ + mu; + mu = *tmpc >> DIGIT_BIT; + *tmpc++ &= MP_MASK; + } + /* set final carry */ + if (mu != 0 && ix < c->alloc) { + ix++; + *tmpc++ = mu; + } + + /* setup size */ + c->used = a->used + 1; + } else { + /* a was negative and |a| < b */ + c->used = 1; + + /* the result is a single digit */ + if (a->used == 1) { + *tmpc++ = b - a->dp[0]; + } else { + *tmpc++ = b; + } + + /* setup count so the clearing of oldused + * can fall through correctly + */ + ix = 1; + } + + /* now zero to oldused */ + while (ix++ < oldused) { + *tmpc++ = 0; + } + mp_clamp(c); + + return MP_OKAY; +} + + +/* single digit subtraction */ +int mp_sub_d (mp_int * a, mp_digit b, mp_int * c) +{ + mp_digit *tmpa, *tmpc, mu; + int res, ix, oldused; + + /* grow c as required */ + if (c->alloc < a->used + 1) { + if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { + return res; + } + } + + /* if a is negative just do an unsigned + * addition [with fudged signs] + */ + if (a->sign == MP_NEG) { + a->sign = MP_ZPOS; + res = mp_add_d(a, b, c); + a->sign = c->sign = MP_NEG; + + /* clamp */ + mp_clamp(c); + + return res; + } + + /* setup regs */ + oldused = c->used; + tmpa = a->dp; + tmpc = c->dp; + + /* if a <= b simply fix the single digit */ + if ((a->used == 1 && a->dp[0] <= b) || a->used == 0) { + if (a->used == 1) { + *tmpc++ = b - *tmpa; + } else { + *tmpc++ = b; + } + ix = 1; + + /* negative/1digit */ + c->sign = MP_NEG; + c->used = 1; + } else { + /* positive/size */ + c->sign = MP_ZPOS; + c->used = a->used; + + /* subtract first digit */ + *tmpc = *tmpa++ - b; + mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1); + *tmpc++ &= MP_MASK; + + /* handle rest of the digits */ + for (ix = 1; ix < a->used; ix++) { + *tmpc = *tmpa++ - mu; + mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1); + *tmpc++ &= MP_MASK; + } + } + + /* zero excess digits */ + while (ix++ < oldused) { + *tmpc++ = 0; + } + mp_clamp(c); + return MP_OKAY; +} + +#endif /* defined(HAVE_ECC) || !defined(NO_PWDBASED) */ + + +#ifdef CYASSL_KEY_GEN + +int mp_cnt_lsb(mp_int *a); + +static int s_is_power_of_two(mp_digit b, int *p) +{ + int x; + + /* fast return if no power of two */ + if ((b==0) || (b & (b-1))) { + return 0; + } + + for (x = 0; x < DIGIT_BIT; x++) { + if (b == (((mp_digit)1)<dp[0] & ((((mp_digit)1)<used)) != MP_OKAY) { + return res; + } + + q.used = a->used; + q.sign = a->sign; + w = 0; + for (ix = a->used - 1; ix >= 0; ix--) { + w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); + + if (w >= b) { + t = (mp_digit)(w / b); + w -= ((mp_word)t) * ((mp_word)b); + } else { + t = 0; + } + q.dp[ix] = (mp_digit)t; + } + + if (d != NULL) { + *d = (mp_digit)w; + } + + if (c != NULL) { + mp_clamp(&q); + mp_exch(&q, c); + } + mp_clear(&q); + + return res; +} + + +static int mp_mod_d (mp_int * a, mp_digit b, mp_digit * c) +{ + return mp_div_d(a, b, NULL, c); +} + + +const mp_digit ltm_prime_tab[] = { + 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, + 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, + 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, + 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, +#ifndef MP_8BIT + 0x0083, + 0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD, + 0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF, + 0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107, + 0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137, + + 0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167, + 0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199, + 0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9, + 0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7, + 0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239, + 0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265, + 0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293, + 0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF, + + 0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301, + 0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B, + 0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371, + 0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD, + 0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5, + 0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419, + 0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449, + 0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B, + + 0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7, + 0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503, + 0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529, + 0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F, + 0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3, + 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, + 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, + 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 +#endif +}; + + +/* Miller-Rabin test of "a" to the base of "b" as described in + * HAC pp. 139 Algorithm 4.24 + * + * Sets result to 0 if definitely composite or 1 if probably prime. + * Randomly the chance of error is no more than 1/4 and often + * very much lower. + */ +static int mp_prime_miller_rabin (mp_int * a, mp_int * b, int *result) +{ + mp_int n1, y, r; + int s, j, err; + + /* default */ + *result = MP_NO; + + /* ensure b > 1 */ + if (mp_cmp_d(b, 1) != MP_GT) { + return MP_VAL; + } + + /* get n1 = a - 1 */ + if ((err = mp_init_copy (&n1, a)) != MP_OKAY) { + return err; + } + if ((err = mp_sub_d (&n1, 1, &n1)) != MP_OKAY) { + goto LBL_N1; + } + + /* set 2**s * r = n1 */ + if ((err = mp_init_copy (&r, &n1)) != MP_OKAY) { + goto LBL_N1; + } + + /* count the number of least significant bits + * which are zero + */ + s = mp_cnt_lsb(&r); + + /* now divide n - 1 by 2**s */ + if ((err = mp_div_2d (&r, s, &r, NULL)) != MP_OKAY) { + goto LBL_R; + } + + /* compute y = b**r mod a */ + if ((err = mp_init (&y)) != MP_OKAY) { + goto LBL_R; + } + if ((err = mp_exptmod (b, &r, a, &y)) != MP_OKAY) { + goto LBL_Y; + } + + /* if y != 1 and y != n1 do */ + if (mp_cmp_d (&y, 1) != MP_EQ && mp_cmp (&y, &n1) != MP_EQ) { + j = 1; + /* while j <= s-1 and y != n1 */ + while ((j <= (s - 1)) && mp_cmp (&y, &n1) != MP_EQ) { + if ((err = mp_sqrmod (&y, a, &y)) != MP_OKAY) { + goto LBL_Y; + } + + /* if y == 1 then composite */ + if (mp_cmp_d (&y, 1) == MP_EQ) { + goto LBL_Y; + } + + ++j; + } + + /* if y != n1 then composite */ + if (mp_cmp (&y, &n1) != MP_EQ) { + goto LBL_Y; + } + } + + /* probably prime now */ + *result = MP_YES; +LBL_Y:mp_clear (&y); +LBL_R:mp_clear (&r); +LBL_N1:mp_clear (&n1); + return err; +} + + +/* determines if an integers is divisible by one + * of the first PRIME_SIZE primes or not + * + * sets result to 0 if not, 1 if yes + */ +static int mp_prime_is_divisible (mp_int * a, int *result) +{ + int err, ix; + mp_digit res; + + /* default to not */ + *result = MP_NO; + + for (ix = 0; ix < PRIME_SIZE; ix++) { + /* what is a mod LBL_prime_tab[ix] */ + if ((err = mp_mod_d (a, ltm_prime_tab[ix], &res)) != MP_OKAY) { + return err; + } + + /* is the residue zero? */ + if (res == 0) { + *result = MP_YES; + return MP_OKAY; + } + } + + return MP_OKAY; +} + + +/* + * Sets result to 1 if probably prime, 0 otherwise + */ +int mp_prime_is_prime (mp_int * a, int t, int *result) +{ + mp_int b; + int ix, err, res; + + /* default to no */ + *result = MP_NO; + + /* valid value of t? */ + if (t <= 0 || t > PRIME_SIZE) { + return MP_VAL; + } + + /* is the input equal to one of the primes in the table? */ + for (ix = 0; ix < PRIME_SIZE; ix++) { + if (mp_cmp_d(a, ltm_prime_tab[ix]) == MP_EQ) { + *result = 1; + return MP_OKAY; + } + } + + /* first perform trial division */ + if ((err = mp_prime_is_divisible (a, &res)) != MP_OKAY) { + return err; + } + + /* return if it was trivially divisible */ + if (res == MP_YES) { + return MP_OKAY; + } + + /* now perform the miller-rabin rounds */ + if ((err = mp_init (&b)) != MP_OKAY) { + return err; + } + + for (ix = 0; ix < t; ix++) { + /* set the prime */ + mp_set (&b, ltm_prime_tab[ix]); + + if ((err = mp_prime_miller_rabin (a, &b, &res)) != MP_OKAY) { + goto LBL_B; + } + + if (res == MP_NO) { + goto LBL_B; + } + } + + /* passed the test */ + *result = MP_YES; +LBL_B:mp_clear (&b); + return err; +} + + +/* computes least common multiple as |a*b|/(a, b) */ +int mp_lcm (mp_int * a, mp_int * b, mp_int * c) +{ + int res; + mp_int t1, t2; + + + if ((res = mp_init_multi (&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { + return res; + } + + /* t1 = get the GCD of the two inputs */ + if ((res = mp_gcd (a, b, &t1)) != MP_OKAY) { + goto LBL_T; + } + + /* divide the smallest by the GCD */ + if (mp_cmp_mag(a, b) == MP_LT) { + /* store quotient in t2 such that t2 * b is the LCM */ + if ((res = mp_div(a, &t1, &t2, NULL)) != MP_OKAY) { + goto LBL_T; + } + res = mp_mul(b, &t2, c); + } else { + /* store quotient in t2 such that t2 * a is the LCM */ + if ((res = mp_div(b, &t1, &t2, NULL)) != MP_OKAY) { + goto LBL_T; + } + res = mp_mul(a, &t2, c); + } + + /* fix the sign to positive */ + c->sign = MP_ZPOS; + +LBL_T: + mp_clear(&t1); + mp_clear(&t2); + return res; +} + + +static const int lnz[16] = { + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +}; + +/* Counts the number of lsbs which are zero before the first zero bit */ +int mp_cnt_lsb(mp_int *a) +{ + int x; + mp_digit q, qq; + + /* easy out */ + if (mp_iszero(a) == 1) { + return 0; + } + + /* scan lower digits until non-zero */ + for (x = 0; x < a->used && a->dp[x] == 0; x++); + q = a->dp[x]; + x *= DIGIT_BIT; + + /* now scan this digit until a 1 is found */ + if ((q & 1) == 0) { + do { + qq = q & 15; + x += lnz[qq]; + q >>= 4; + } while (qq == 0); + } + return x; +} + + +/* Greatest Common Divisor using the binary method */ +int mp_gcd (mp_int * a, mp_int * b, mp_int * c) +{ + mp_int u, v; + int k, u_lsb, v_lsb, res; + + /* either zero than gcd is the largest */ + if (mp_iszero (a) == MP_YES) { + return mp_abs (b, c); + } + if (mp_iszero (b) == MP_YES) { + return mp_abs (a, c); + } + + /* get copies of a and b we can modify */ + if ((res = mp_init_copy (&u, a)) != MP_OKAY) { + return res; + } + + if ((res = mp_init_copy (&v, b)) != MP_OKAY) { + goto LBL_U; + } + + /* must be positive for the remainder of the algorithm */ + u.sign = v.sign = MP_ZPOS; + + /* B1. Find the common power of two for u and v */ + u_lsb = mp_cnt_lsb(&u); + v_lsb = mp_cnt_lsb(&v); + k = MIN(u_lsb, v_lsb); + + if (k > 0) { + /* divide the power of two out */ + if ((res = mp_div_2d(&u, k, &u, NULL)) != MP_OKAY) { + goto LBL_V; + } + + if ((res = mp_div_2d(&v, k, &v, NULL)) != MP_OKAY) { + goto LBL_V; + } + } + + /* divide any remaining factors of two out */ + if (u_lsb != k) { + if ((res = mp_div_2d(&u, u_lsb - k, &u, NULL)) != MP_OKAY) { + goto LBL_V; + } + } + + if (v_lsb != k) { + if ((res = mp_div_2d(&v, v_lsb - k, &v, NULL)) != MP_OKAY) { + goto LBL_V; + } + } + + while (mp_iszero(&v) == 0) { + /* make sure v is the largest */ + if (mp_cmp_mag(&u, &v) == MP_GT) { + /* swap u and v to make sure v is >= u */ + mp_exch(&u, &v); + } + + /* subtract smallest from largest */ + if ((res = s_mp_sub(&v, &u, &v)) != MP_OKAY) { + goto LBL_V; + } + + /* Divide out all factors of two */ + if ((res = mp_div_2d(&v, mp_cnt_lsb(&v), &v, NULL)) != MP_OKAY) { + goto LBL_V; + } + } + + /* multiply by 2**k which we divided out at the beginning */ + if ((res = mp_mul_2d (&u, k, c)) != MP_OKAY) { + goto LBL_V; + } + c->sign = MP_ZPOS; + res = MP_OKAY; +LBL_V:mp_clear (&u); +LBL_U:mp_clear (&v); + return res; +} + + + +#endif /* CYASSL_KEY_GEN */ + + +#ifdef HAVE_ECC + +/* chars used in radix conversions */ +const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; + +/* read a string [ASCII] in a given radix */ +int mp_read_radix (mp_int * a, const char *str, int radix) +{ + int y, res, neg; + char ch; + + /* zero the digit bignum */ + mp_zero(a); + + /* make sure the radix is ok */ + if (radix < 2 || radix > 64) { + return MP_VAL; + } + + /* if the leading digit is a + * minus set the sign to negative. + */ + if (*str == '-') { + ++str; + neg = MP_NEG; + } else { + neg = MP_ZPOS; + } + + /* set the integer to the default of zero */ + mp_zero (a); + + /* process each digit of the string */ + while (*str) { + /* if the radix < 36 the conversion is case insensitive + * this allows numbers like 1AB and 1ab to represent the same value + * [e.g. in hex] + */ + ch = (char) ((radix < 36) ? XTOUPPER(*str) : *str); + for (y = 0; y < 64; y++) { + if (ch == mp_s_rmap[y]) { + break; + } + } + + /* if the char was found in the map + * and is less than the given radix add it + * to the number, otherwise exit the loop. + */ + if (y < radix) { + if ((res = mp_mul_d (a, (mp_digit) radix, a)) != MP_OKAY) { + return res; + } + if ((res = mp_add_d (a, (mp_digit) y, a)) != MP_OKAY) { + return res; + } + } else { + break; + } + ++str; + } + + /* set the sign only if a != 0 */ + if (mp_iszero(a) != 1) { + a->sign = neg; + } + return MP_OKAY; +} + +#endif /* HAVE_ECC */ + +#endif /* USE_FAST_MATH */ + +#endif /* NO_BIG_INT */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/logging.c b/project1/cyassl-3.0.0/ctaocrypt/src/logging.c new file mode 100644 index 00000000..5c17f591 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/logging.c @@ -0,0 +1,162 @@ +/* logging.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +/* submitted by eof */ + +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + CYASSL_API int CyaSSL_Debugging_ON(void); + CYASSL_API void CyaSSL_Debugging_OFF(void); +#ifdef __cplusplus + } +#endif + + +#ifdef DEBUG_CYASSL + +/* Set these to default values initially. */ +static CyaSSL_Logging_cb log_function = 0; +static int loggingEnabled = 0; + +#endif /* DEBUG_CYASSL */ + + +int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f) +{ +#ifdef DEBUG_CYASSL + int res = 0; + + if (f) + log_function = f; + else + res = BAD_FUNC_ARG; + + return res; +#else + (void)f; + return NOT_COMPILED_IN; +#endif +} + + +int CyaSSL_Debugging_ON(void) +{ +#ifdef DEBUG_CYASSL + loggingEnabled = 1; + return 0; +#else + return NOT_COMPILED_IN; +#endif +} + + +void CyaSSL_Debugging_OFF(void) +{ +#ifdef DEBUG_CYASSL + loggingEnabled = 0; +#endif +} + + +#ifdef DEBUG_CYASSL + +#ifdef FREESCALE_MQX + #include +#else + #include /* for default printf stuff */ +#endif + +#ifdef THREADX + int dc_log_printf(char*, ...); +#endif + +static void cyassl_log(const int logLevel, const char *const logMessage) +{ + if (log_function) + log_function(logLevel, logMessage); + else { + if (loggingEnabled) { +#ifdef THREADX + dc_log_printf("%s\n", logMessage); +#elif defined(MICRIUM) + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + NetSecure_TraceOut((CPU_CHAR *)logMessage); + #endif +#elif defined(CYASSL_MDK_ARM) + fflush(stdout) ; + printf("%s\n", logMessage); + fflush(stdout) ; +#else + fprintf(stderr, "%s\n", logMessage); +#endif + } + } +} + + +void CYASSL_MSG(const char* msg) +{ + if (loggingEnabled) + cyassl_log(INFO_LOG , msg); +} + + +void CYASSL_ENTER(const char* msg) +{ + if (loggingEnabled) { + char buffer[80]; + sprintf(buffer, "CyaSSL Entering %s", msg); + cyassl_log(ENTER_LOG , buffer); + } +} + + +void CYASSL_LEAVE(const char* msg, int ret) +{ + if (loggingEnabled) { + char buffer[80]; + sprintf(buffer, "CyaSSL Leaving %s, return %d", msg, ret); + cyassl_log(LEAVE_LOG , buffer); + } +} + + +void CYASSL_ERROR(int error) +{ + if (loggingEnabled) { + char buffer[80]; + sprintf(buffer, "CyaSSL error occured, error = %d", error); + cyassl_log(ERROR_LOG , buffer); + } +} + +#endif /* DEBUG_CYASSL */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md2.c b/project1/cyassl-3.0.0/ctaocrypt/src/md2.c new file mode 100644 index 00000000..178287ee --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/md2.c @@ -0,0 +1,131 @@ +/* md2.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef CYASSL_MD2 + +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +void InitMd2(Md2* md2) +{ + XMEMSET(md2->X, 0, MD2_X_SIZE); + XMEMSET(md2->C, 0, MD2_BLOCK_SIZE); + XMEMSET(md2->buffer, 0, MD2_BLOCK_SIZE); + md2->count = 0; +} + + +void Md2Update(Md2* md2, const byte* data, word32 len) +{ + static const byte S[256] = + { + 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, + 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, + 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, + 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, + 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, + 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, + 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, + 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, + 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, + 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, + 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, + 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, + 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, + 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, + 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, + 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, + 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, + 31, 26, 219, 153, 141, 51, 159, 17, 131, 20 + }; + + while (len) { + word32 L = (MD2_PAD_SIZE - md2->count) < len ? + (MD2_PAD_SIZE - md2->count) : len; + XMEMCPY(md2->buffer + md2->count, data, L); + md2->count += L; + data += L; + len -= L; + + if (md2->count == MD2_PAD_SIZE) { + int i; + byte t; + + md2->count = 0; + XMEMCPY(md2->X + MD2_PAD_SIZE, md2->buffer, MD2_PAD_SIZE); + t = md2->C[15]; + + for(i = 0; i < MD2_PAD_SIZE; i++) { + md2->X[32 + i] = md2->X[MD2_PAD_SIZE + i] ^ md2->X[i]; + t = md2->C[i] ^= S[md2->buffer[i] ^ t]; + } + + t=0; + for(i = 0; i < 18; i++) { + int j; + for(j = 0; j < MD2_X_SIZE; j += 8) { + t = md2->X[j+0] ^= S[t]; + t = md2->X[j+1] ^= S[t]; + t = md2->X[j+2] ^= S[t]; + t = md2->X[j+3] ^= S[t]; + t = md2->X[j+4] ^= S[t]; + t = md2->X[j+5] ^= S[t]; + t = md2->X[j+6] ^= S[t]; + t = md2->X[j+7] ^= S[t]; + } + t = (t + i) & 0xFF; + } + } + } +} + + +void Md2Final(Md2* md2, byte* hash) +{ + byte padding[MD2_BLOCK_SIZE]; + word32 padLen = MD2_PAD_SIZE - md2->count; + word32 i; + + for (i = 0; i < padLen; i++) + padding[i] = (byte)padLen; + + Md2Update(md2, padding, padLen); + Md2Update(md2, md2->C, MD2_BLOCK_SIZE); + + XMEMCPY(hash, md2->X, MD2_DIGEST_SIZE); + + InitMd2(md2); +} + + +#endif /* CYASSL_MD2 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md4.c b/project1/cyassl-3.0.0/ctaocrypt/src/md4.c new file mode 100644 index 00000000..d696d638 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/md4.c @@ -0,0 +1,219 @@ +/* md4.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_MD4 + +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +void InitMd4(Md4* md4) +{ + md4->digest[0] = 0x67452301L; + md4->digest[1] = 0xefcdab89L; + md4->digest[2] = 0x98badcfeL; + md4->digest[3] = 0x10325476L; + + md4->buffLen = 0; + md4->loLen = 0; + md4->hiLen = 0; +} + + +static void Transform(Md4* md4) +{ +#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) +#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) + + /* Copy context->state[] to working vars */ + word32 A = md4->digest[0]; + word32 B = md4->digest[1]; + word32 C = md4->digest[2]; + word32 D = md4->digest[3]; + +#define function(a,b,c,d,k,s) a=rotlFixed(a+F(b,c,d)+md4->buffer[k],s); + function(A,B,C,D, 0, 3); + function(D,A,B,C, 1, 7); + function(C,D,A,B, 2,11); + function(B,C,D,A, 3,19); + function(A,B,C,D, 4, 3); + function(D,A,B,C, 5, 7); + function(C,D,A,B, 6,11); + function(B,C,D,A, 7,19); + function(A,B,C,D, 8, 3); + function(D,A,B,C, 9, 7); + function(C,D,A,B,10,11); + function(B,C,D,A,11,19); + function(A,B,C,D,12, 3); + function(D,A,B,C,13, 7); + function(C,D,A,B,14,11); + function(B,C,D,A,15,19); + +#undef function +#define function(a,b,c,d,k,s) \ + a=rotlFixed(a+G(b,c,d)+md4->buffer[k]+0x5a827999,s); + + function(A,B,C,D, 0, 3); + function(D,A,B,C, 4, 5); + function(C,D,A,B, 8, 9); + function(B,C,D,A,12,13); + function(A,B,C,D, 1, 3); + function(D,A,B,C, 5, 5); + function(C,D,A,B, 9, 9); + function(B,C,D,A,13,13); + function(A,B,C,D, 2, 3); + function(D,A,B,C, 6, 5); + function(C,D,A,B,10, 9); + function(B,C,D,A,14,13); + function(A,B,C,D, 3, 3); + function(D,A,B,C, 7, 5); + function(C,D,A,B,11, 9); + function(B,C,D,A,15,13); + +#undef function +#define function(a,b,c,d,k,s) \ + a=rotlFixed(a+H(b,c,d)+md4->buffer[k]+0x6ed9eba1,s); + + function(A,B,C,D, 0, 3); + function(D,A,B,C, 8, 9); + function(C,D,A,B, 4,11); + function(B,C,D,A,12,15); + function(A,B,C,D, 2, 3); + function(D,A,B,C,10, 9); + function(C,D,A,B, 6,11); + function(B,C,D,A,14,15); + function(A,B,C,D, 1, 3); + function(D,A,B,C, 9, 9); + function(C,D,A,B, 5,11); + function(B,C,D,A,13,15); + function(A,B,C,D, 3, 3); + function(D,A,B,C,11, 9); + function(C,D,A,B, 7,11); + function(B,C,D,A,15,15); + + /* Add the working vars back into digest state[] */ + md4->digest[0] += A; + md4->digest[1] += B; + md4->digest[2] += C; + md4->digest[3] += D; +} + + +static INLINE void AddLength(Md4* md4, word32 len) +{ + word32 tmp = md4->loLen; + if ( (md4->loLen += len) < tmp) + md4->hiLen++; /* carry low to high */ +} + + +void Md4Update(Md4* md4, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)md4->buffer; + + while (len) { + word32 add = min(len, MD4_BLOCK_SIZE - md4->buffLen); + XMEMCPY(&local[md4->buffLen], data, add); + + md4->buffLen += add; + data += add; + len -= add; + + if (md4->buffLen == MD4_BLOCK_SIZE) { + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); + #endif + Transform(md4); + AddLength(md4, MD4_BLOCK_SIZE); + md4->buffLen = 0; + } + } +} + + +void Md4Final(Md4* md4, byte* hash) +{ + byte* local = (byte*)md4->buffer; + + AddLength(md4, md4->buffLen); /* before adding pads */ + + local[md4->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (md4->buffLen > MD4_PAD_SIZE) { + XMEMSET(&local[md4->buffLen], 0, MD4_BLOCK_SIZE - md4->buffLen); + md4->buffLen += MD4_BLOCK_SIZE - md4->buffLen; + + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); + #endif + Transform(md4); + md4->buffLen = 0; + } + XMEMSET(&local[md4->buffLen], 0, MD4_PAD_SIZE - md4->buffLen); + + /* put lengths in bits */ + md4->hiLen = (md4->loLen >> (8*sizeof(md4->loLen) - 3)) + + (md4->hiLen << 3); + md4->loLen = md4->loLen << 3; + + /* store lengths */ + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + XMEMCPY(&local[MD4_PAD_SIZE], &md4->loLen, sizeof(word32)); + XMEMCPY(&local[MD4_PAD_SIZE + sizeof(word32)], &md4->hiLen, sizeof(word32)); + + Transform(md4); + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(md4->digest, md4->digest, MD4_DIGEST_SIZE); + #endif + XMEMCPY(hash, md4->digest, MD4_DIGEST_SIZE); + + InitMd4(md4); /* reset state */ +} + + +#endif /* NO_MD4 */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md5.c b/project1/cyassl-3.0.0/ctaocrypt/src/md5.c new file mode 100644 index 00000000..3da4cc6b --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/md5.c @@ -0,0 +1,364 @@ +/* md5.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if !defined(NO_MD5) + +#ifdef CYASSL_PIC32MZ_HASH +#define InitMd5 InitMd5_sw +#define Md5Update Md5Update_sw +#define Md5Final Md5Final_sw +#endif + +#include + +#ifdef NO_INLINE + #include +#else + #include +#endif + +#ifdef FREESCALE_MMCAU + #include "cau_api.h" + #define XTRANSFORM(S,B) cau_md5_hash_n((B), 1, (unsigned char*)(S)->digest) +#else + #define XTRANSFORM(S,B) Transform((S)) +#endif + + +#ifdef STM32F2_HASH + /* + * STM32F2 hardware MD5 support through the STM32F2 standard peripheral + * library. Documentation located in STM32F2xx Standard Peripheral Library + * document (See note in README). + */ + #include "stm32f2xx.h" + + void InitMd5(Md5* md5) + { + /* STM32F2 struct notes: + * md5->buffer = first 4 bytes used to hold partial block if needed + * md5->buffLen = num bytes currently stored in md5->buffer + * md5->loLen = num bytes that have been written to STM32 FIFO + */ + XMEMSET(md5->buffer, 0, MD5_REG_SIZE); + + md5->buffLen = 0; + md5->loLen = 0; + + /* initialize HASH peripheral */ + HASH_DeInit(); + + /* configure algo used, algo mode, datatype */ + HASH->CR &= ~ (HASH_CR_ALGO | HASH_CR_DATATYPE | HASH_CR_MODE); + HASH->CR |= (HASH_AlgoSelection_MD5 | HASH_AlgoMode_HASH + | HASH_DataType_8b); + + /* reset HASH processor */ + HASH->CR |= HASH_CR_INIT; + } + + void Md5Update(Md5* md5, const byte* data, word32 len) + { + word32 i = 0; + word32 fill = 0; + word32 diff = 0; + + /* if saved partial block is available */ + if (md5->buffLen > 0) { + fill = 4 - md5->buffLen; + + /* if enough data to fill, fill and push to FIFO */ + if (fill <= len) { + XMEMCPY((byte*)md5->buffer + md5->buffLen, data, fill); + HASH_DataIn(*(uint32_t*)md5->buffer); + + data += fill; + len -= fill; + md5->loLen += 4; + md5->buffLen = 0; + } else { + /* append partial to existing stored block */ + XMEMCPY((byte*)md5->buffer + md5->buffLen, data, len); + md5->buffLen += len; + return; + } + } + + /* write input block in the IN FIFO */ + for (i = 0; i < len; i += 4) + { + diff = len - i; + if (diff < 4) { + /* store incomplete last block, not yet in FIFO */ + XMEMSET(md5->buffer, 0, MD5_REG_SIZE); + XMEMCPY((byte*)md5->buffer, data, diff); + md5->buffLen = diff; + } else { + HASH_DataIn(*(uint32_t*)data); + data+=4; + } + } + + /* keep track of total data length thus far */ + md5->loLen += (len - md5->buffLen); + } + + void Md5Final(Md5* md5, byte* hash) + { + __IO uint16_t nbvalidbitsdata = 0; + + /* finish reading any trailing bytes into FIFO */ + if (md5->buffLen > 0) { + HASH_DataIn(*(uint32_t*)md5->buffer); + md5->loLen += md5->buffLen; + } + + /* calculate number of valid bits in last word of input data */ + nbvalidbitsdata = 8 * (md5->loLen % MD5_REG_SIZE); + + /* configure number of valid bits in last word of the data */ + HASH_SetLastWordValidBitsNbr(nbvalidbitsdata); + + /* start HASH processor */ + HASH_StartDigest(); + + /* wait until Busy flag == RESET */ + while (HASH_GetFlagStatus(HASH_FLAG_BUSY) != RESET) {} + + /* read message digest */ + md5->digest[0] = HASH->HR[0]; + md5->digest[1] = HASH->HR[1]; + md5->digest[2] = HASH->HR[2]; + md5->digest[3] = HASH->HR[3]; + + ByteReverseWords(md5->digest, md5->digest, MD5_DIGEST_SIZE); + + XMEMCPY(hash, md5->digest, MD5_DIGEST_SIZE); + + InitMd5(md5); /* reset state */ + } + +#else /* CTaoCrypt software implementation */ + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +void InitMd5(Md5* md5) +{ + md5->digest[0] = 0x67452301L; + md5->digest[1] = 0xefcdab89L; + md5->digest[2] = 0x98badcfeL; + md5->digest[3] = 0x10325476L; + + md5->buffLen = 0; + md5->loLen = 0; + md5->hiLen = 0; +} + +#ifndef FREESCALE_MMCAU + +static void Transform(Md5* md5) +{ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +#define MD5STEP(f, w, x, y, z, data, s) \ + w = rotlFixed(w + f(x, y, z) + data, s) + x + + /* Copy context->state[] to working vars */ + word32 a = md5->digest[0]; + word32 b = md5->digest[1]; + word32 c = md5->digest[2]; + word32 d = md5->digest[3]; + + MD5STEP(F1, a, b, c, d, md5->buffer[0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, md5->buffer[1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, md5->buffer[2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, md5->buffer[3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, md5->buffer[4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, md5->buffer[5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, md5->buffer[6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, md5->buffer[7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, md5->buffer[8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, md5->buffer[9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, md5->buffer[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, md5->buffer[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, md5->buffer[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, md5->buffer[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, md5->buffer[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, md5->buffer[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, md5->buffer[1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, md5->buffer[6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, md5->buffer[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, md5->buffer[0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, md5->buffer[5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, md5->buffer[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, md5->buffer[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, md5->buffer[4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, md5->buffer[9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, md5->buffer[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, md5->buffer[3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, md5->buffer[8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, md5->buffer[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, md5->buffer[2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, md5->buffer[7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, md5->buffer[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, md5->buffer[5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, md5->buffer[8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, md5->buffer[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, md5->buffer[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, md5->buffer[1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, md5->buffer[4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, md5->buffer[7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, md5->buffer[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, md5->buffer[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, md5->buffer[0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, md5->buffer[3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, md5->buffer[6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, md5->buffer[9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, md5->buffer[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, md5->buffer[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, md5->buffer[2] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, md5->buffer[0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, md5->buffer[7] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, md5->buffer[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, md5->buffer[5] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, md5->buffer[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, md5->buffer[3] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, md5->buffer[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, md5->buffer[1] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, md5->buffer[8] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, md5->buffer[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, md5->buffer[6] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, md5->buffer[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, md5->buffer[4] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, md5->buffer[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, md5->buffer[2] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, md5->buffer[9] + 0xeb86d391, 21); + + /* Add the working vars back into digest state[] */ + md5->digest[0] += a; + md5->digest[1] += b; + md5->digest[2] += c; + md5->digest[3] += d; +} + +#endif /* FREESCALE_MMCAU */ + + +static INLINE void AddLength(Md5* md5, word32 len) +{ + word32 tmp = md5->loLen; + if ( (md5->loLen += len) < tmp) + md5->hiLen++; /* carry low to high */ +} + + +void Md5Update(Md5* md5, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)md5->buffer; + + while (len) { + word32 add = min(len, MD5_BLOCK_SIZE - md5->buffLen); + XMEMCPY(&local[md5->buffLen], data, add); + + md5->buffLen += add; + data += add; + len -= add; + + if (md5->buffLen == MD5_BLOCK_SIZE) { + #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); + #endif + XTRANSFORM(md5, local); + AddLength(md5, MD5_BLOCK_SIZE); + md5->buffLen = 0; + } + } +} + + +void Md5Final(Md5* md5, byte* hash) +{ + byte* local = (byte*)md5->buffer; + + AddLength(md5, md5->buffLen); /* before adding pads */ + + local[md5->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (md5->buffLen > MD5_PAD_SIZE) { + XMEMSET(&local[md5->buffLen], 0, MD5_BLOCK_SIZE - md5->buffLen); + md5->buffLen += MD5_BLOCK_SIZE - md5->buffLen; + + #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); + #endif + XTRANSFORM(md5, local); + md5->buffLen = 0; + } + XMEMSET(&local[md5->buffLen], 0, MD5_PAD_SIZE - md5->buffLen); + + /* put lengths in bits */ + md5->hiLen = (md5->loLen >> (8*sizeof(md5->loLen) - 3)) + + (md5->hiLen << 3); + md5->loLen = md5->loLen << 3; + + /* store lengths */ + #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + XMEMCPY(&local[MD5_PAD_SIZE], &md5->loLen, sizeof(word32)); + XMEMCPY(&local[MD5_PAD_SIZE + sizeof(word32)], &md5->hiLen, sizeof(word32)); + + XTRANSFORM(md5, local); + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(md5->digest, md5->digest, MD5_DIGEST_SIZE); + #endif + XMEMCPY(hash, md5->digest, MD5_DIGEST_SIZE); + + InitMd5(md5); /* reset state */ +} + +#endif /* STM32F2_HASH */ + +#endif /* NO_MD5 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/memory.c b/project1/cyassl-3.0.0/ctaocrypt/src/memory.c new file mode 100644 index 00000000..71bbbc46 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/memory.c @@ -0,0 +1,183 @@ +/* memory.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef USE_CYASSL_MEMORY + +#include +#include + +#ifdef CYASSL_MALLOC_CHECK + #include +#endif + +/* Set these to default values initially. */ +static CyaSSL_Malloc_cb malloc_function = 0; +static CyaSSL_Free_cb free_function = 0; +static CyaSSL_Realloc_cb realloc_function = 0; + +int CyaSSL_SetAllocators(CyaSSL_Malloc_cb mf, + CyaSSL_Free_cb ff, + CyaSSL_Realloc_cb rf) +{ + int res = 0; + + if (mf) + malloc_function = mf; + else + res = BAD_FUNC_ARG; + + if (ff) + free_function = ff; + else + res = BAD_FUNC_ARG; + + if (rf) + realloc_function = rf; + else + res = BAD_FUNC_ARG; + + return res; +} + + +void* CyaSSL_Malloc(size_t size) +{ + void* res = 0; + + if (malloc_function) + res = malloc_function(size); + else + res = malloc(size); + + #ifdef CYASSL_MALLOC_CHECK + if (res == NULL) + puts("CyaSSL_malloc failed"); + #endif + + return res; +} + +void CyaSSL_Free(void *ptr) +{ + if (free_function) + free_function(ptr); + else + free(ptr); +} + +void* CyaSSL_Realloc(void *ptr, size_t size) +{ + void* res = 0; + + if (realloc_function) + res = realloc_function(ptr, size); + else + res = realloc(ptr, size); + + return res; +} + +#endif /* USE_CYASSL_MEMORY */ + + +#ifdef HAVE_IO_POOL + +/* Example for user io pool, shared build may need definitions in lib proper */ + +#include +#include + +#ifndef HAVE_THREAD_LS + #error "Oops, simple I/O pool example needs thread local storage" +#endif + + +/* allow simple per thread in and out pools */ +/* use 17k size sense max record size is 16k plus overhead */ +static THREAD_LS_T byte pool_in[17*1024]; +static THREAD_LS_T byte pool_out[17*1024]; + + +void* XMALLOC(size_t n, void* heap, int type) +{ + (void)heap; + + if (type == DYNAMIC_TYPE_IN_BUFFER) { + if (n < sizeof(pool_in)) + return pool_in; + else + return NULL; + } + + if (type == DYNAMIC_TYPE_OUT_BUFFER) { + if (n < sizeof(pool_out)) + return pool_out; + else + return NULL; + } + + return malloc(n); +} + +void* XREALLOC(void *p, size_t n, void* heap, int type) +{ + (void)heap; + + if (type == DYNAMIC_TYPE_IN_BUFFER) { + if (n < sizeof(pool_in)) + return pool_in; + else + return NULL; + } + + if (type == DYNAMIC_TYPE_OUT_BUFFER) { + if (n < sizeof(pool_out)) + return pool_out; + else + return NULL; + } + + return realloc(p, n); +} + + +/* unit api calls, let's make sure visisble with CYASSL_API */ +CYASSL_API void XFREE(void *p, void* heap, int type) +{ + (void)heap; + + if (type == DYNAMIC_TYPE_IN_BUFFER) + return; /* do nothing, static pool */ + + if (type == DYNAMIC_TYPE_OUT_BUFFER) + return; /* do nothing, static pool */ + + free(p); +} + +#endif /* HAVE_IO_POOL */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/misc.c b/project1/cyassl-3.0.0/ctaocrypt/src/misc.c new file mode 100644 index 00000000..69fd4a44 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/misc.c @@ -0,0 +1,170 @@ +/* misc.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +/* inlining these functions is a huge speed increase and a small size decrease, + because the functions are smaller than function call setup/cleanup, e.g., + md5 benchmark is twice as fast with inline. If you don't want it, then + define NO_INLINE and compile this file into cyassl, otherwise it's used as + a source header + */ + +#ifdef NO_INLINE + #define STATIC +#else + #define STATIC static +#endif + + +#ifdef INTEL_INTRINSICS + + #include /* get intrinsic definitions */ + + #pragma intrinsic(_lrotl, _lrotr) + + STATIC INLINE word32 rotlFixed(word32 x, word32 y) + { + return y ? _lrotl(x, y) : x; + } + + STATIC INLINE word32 rotrFixed(word32 x, word32 y) + { + return y ? _lrotr(x, y) : x; + } + +#else /* generic */ + + STATIC INLINE word32 rotlFixed(word32 x, word32 y) + { + return (x << y) | (x >> (sizeof(y) * 8 - y)); + } + + + STATIC INLINE word32 rotrFixed(word32 x, word32 y) + { + return (x >> y) | (x << (sizeof(y) * 8 - y)); + } + +#endif + + +STATIC INLINE word32 ByteReverseWord32(word32 value) +{ +#ifdef PPC_INTRINSICS + /* PPC: load reverse indexed instruction */ + return (word32)__lwbrx(&value,0); +#elif defined(KEIL_INTRINSICS) + return (word32)__rev(value); +#elif defined(FAST_ROTATE) + /* 5 instructions with rotate instruction, 9 without */ + return (rotrFixed(value, 8U) & 0xff00ff00) | + (rotlFixed(value, 8U) & 0x00ff00ff); +#else + /* 6 instructions with rotate instruction, 8 without */ + value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); + return rotlFixed(value, 16U); +#endif +} + + +STATIC INLINE void ByteReverseWords(word32* out, const word32* in, + word32 byteCount) +{ + word32 count = byteCount/(word32)sizeof(word32), i; + + for (i = 0; i < count; i++) + out[i] = ByteReverseWord32(in[i]); + +} + + +#ifdef WORD64_AVAILABLE + + +STATIC INLINE word64 rotlFixed64(word64 x, word64 y) +{ + return (x << y) | (x >> (sizeof(y) * 8 - y)); +} + + +STATIC INLINE word64 rotrFixed64(word64 x, word64 y) +{ + return (x >> y) | (x << (sizeof(y) * 8 - y)); +} + + +STATIC INLINE word64 ByteReverseWord64(word64 value) +{ +#ifdef CTAOCRYPT_SLOW_WORD64 + return (word64)(ByteReverseWord32((word32)value)) << 32 | + ByteReverseWord32((word32)(value>>32)); +#else + value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | + ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); + value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | + ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); + return rotlFixed64(value, 32U); +#endif +} + + +STATIC INLINE void ByteReverseWords64(word64* out, const word64* in, + word32 byteCount) +{ + word32 count = byteCount/(word32)sizeof(word64), i; + + for (i = 0; i < count; i++) + out[i] = ByteReverseWord64(in[i]); + +} + +#endif /* WORD64_AVAILABLE */ + + +STATIC INLINE void XorWords(word* r, const word* a, word32 n) +{ + word32 i; + + for (i = 0; i < n; i++) r[i] ^= a[i]; +} + + +STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count) +{ + if (((word)buf | (word)mask | count) % CYASSL_WORD_SIZE == 0) + XorWords( (word*)buf, (const word*)mask, count / CYASSL_WORD_SIZE); + else { + word32 i; + byte* b = (byte*)buf; + const byte* m = (const byte*)mask; + + for (i = 0; i < count; i++) b[i] ^= m[i]; + } +} +#undef STATIC + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c b/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c new file mode 100644 index 00000000..1b009279 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c @@ -0,0 +1,1391 @@ +/* pkcs7.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_PKCS7 + +#include +#include +#include + +#ifndef min + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } +#endif + + +/* placed ASN.1 contentType OID into *output, return idx on success, + * 0 upon failure */ +CYASSL_LOCAL int SetContentType(int pkcs7TypeOID, byte* output) +{ + /* PKCS#7 content types, RFC 2315, section 14 */ + static const byte pkcs7[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07 }; + static const byte data[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x01 }; + static const byte signedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x02}; + static const byte envelopedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x03 }; + static const byte signedAndEnveloped[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x04 }; + static const byte digestedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x05 }; + static const byte encryptedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x07, 0x06 }; + + int idSz; + int typeSz = 0, idx = 0; + const byte* typeName = 0; + byte ID_Length[MAX_LENGTH_SZ]; + + switch (pkcs7TypeOID) { + case PKCS7_MSG: + typeSz = sizeof(pkcs7); + typeName = pkcs7; + break; + + case DATA: + typeSz = sizeof(data); + typeName = data; + break; + + case SIGNED_DATA: + typeSz = sizeof(signedData); + typeName = signedData; + break; + + case ENVELOPED_DATA: + typeSz = sizeof(envelopedData); + typeName = envelopedData; + break; + + case SIGNED_AND_ENVELOPED_DATA: + typeSz = sizeof(signedAndEnveloped); + typeName = signedAndEnveloped; + break; + + case DIGESTED_DATA: + typeSz = sizeof(digestedData); + typeName = digestedData; + break; + + case ENCRYPTED_DATA: + typeSz = sizeof(encryptedData); + typeName = encryptedData; + break; + + default: + CYASSL_MSG("Unknown PKCS#7 Type"); + return 0; + }; + + idSz = SetLength(typeSz, ID_Length); + output[idx++] = ASN_OBJECT_ID; + XMEMCPY(output + idx, ID_Length, idSz); + idx += idSz; + XMEMCPY(output + idx, typeName, typeSz); + idx += typeSz; + + return idx; + +} + + +/* get ASN.1 contentType OID sum, return 0 on success, <0 on failure */ +int GetContentType(const byte* input, word32* inOutIdx, word32* oid, + word32 maxIdx) +{ + int length; + word32 i = *inOutIdx; + byte b; + *oid = 0; + + CYASSL_ENTER("GetContentType"); + + b = input[i++]; + if (b != ASN_OBJECT_ID) + return ASN_OBJECT_ID_E; + + if (GetLength(input, &i, &length, maxIdx) < 0) + return ASN_PARSE_E; + + while(length--) { + *oid += input[i]; + i++; + } + + *inOutIdx = i; + + return 0; +} + + +/* init PKCS7 struct with recipient cert, decode into DecodedCert */ +int PKCS7_InitWithCert(PKCS7* pkcs7, byte* cert, word32 certSz) +{ + int ret = 0; + + XMEMSET(pkcs7, 0, sizeof(PKCS7)); + if (cert != NULL && certSz > 0) { + DecodedCert dCert; + + pkcs7->singleCert = cert; + pkcs7->singleCertSz = certSz; + InitDecodedCert(&dCert, cert, certSz, 0); + + ret = ParseCert(&dCert, CA_TYPE, NO_VERIFY, 0); + if (ret < 0) { + FreeDecodedCert(&dCert); + return ret; + } + XMEMCPY(pkcs7->publicKey, dCert.publicKey, dCert.pubKeySize); + pkcs7->publicKeySz = dCert.pubKeySize; + XMEMCPY(pkcs7->issuerHash, dCert.issuerHash, SHA_SIZE); + pkcs7->issuer = dCert.issuerRaw; + pkcs7->issuerSz = dCert.issuerRawLen; + XMEMCPY(pkcs7->issuerSn, dCert.serial, dCert.serialSz); + pkcs7->issuerSnSz = dCert.serialSz; + FreeDecodedCert(&dCert); + } + + return ret; +} + + +/* releases any memory allocated by a PKCS7 initializer */ +void PKCS7_Free(PKCS7* pkcs7) +{ + (void)pkcs7; +} + + +/* build PKCS#7 data content type */ +int PKCS7_EncodeData(PKCS7* pkcs7, byte* output, word32 outputSz) +{ + static const byte oid[] = + { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, + 0x07, 0x01 }; + byte seq[MAX_SEQ_SZ]; + byte octetStr[MAX_OCTET_STR_SZ]; + word32 seqSz; + word32 octetStrSz; + word32 oidSz = (word32)sizeof(oid); + int idx = 0; + + octetStrSz = SetOctetString(pkcs7->contentSz, octetStr); + seqSz = SetSequence(pkcs7->contentSz + octetStrSz + oidSz, seq); + + if (outputSz < pkcs7->contentSz + octetStrSz + oidSz + seqSz) + return BUFFER_E; + + XMEMCPY(output, seq, seqSz); + idx += seqSz; + XMEMCPY(output + idx, oid, oidSz); + idx += oidSz; + XMEMCPY(output + idx, octetStr, octetStrSz); + idx += octetStrSz; + XMEMCPY(output + idx, pkcs7->content, pkcs7->contentSz); + idx += pkcs7->contentSz; + + return idx; +} + + +typedef struct EncodedAttrib { + byte valueSeq[MAX_SEQ_SZ]; + const byte* oid; + byte valueSet[MAX_SET_SZ]; + const byte* value; + word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz; +} EncodedAttrib; + + +typedef struct ESD { + Sha sha; + byte contentDigest[SHA_DIGEST_SIZE + 2]; /* content only + ASN.1 heading */ + byte contentAttribsDigest[SHA_DIGEST_SIZE]; + byte encContentDigest[512]; + + byte outerSeq[MAX_SEQ_SZ]; + byte outerContent[MAX_EXP_SZ]; + byte innerSeq[MAX_SEQ_SZ]; + byte version[MAX_VERSION_SZ]; + byte digAlgoIdSet[MAX_SET_SZ]; + byte singleDigAlgoId[MAX_ALGO_SZ]; + + byte contentInfoSeq[MAX_SEQ_SZ]; + byte innerContSeq[MAX_EXP_SZ]; + byte innerOctets[MAX_OCTET_STR_SZ]; + + byte certsSet[MAX_SET_SZ]; + + byte signerInfoSet[MAX_SET_SZ]; + byte signerInfoSeq[MAX_SEQ_SZ]; + byte signerVersion[MAX_VERSION_SZ]; + byte issuerSnSeq[MAX_SEQ_SZ]; + byte issuerName[MAX_SEQ_SZ]; + byte issuerSn[MAX_SN_SZ]; + byte signerDigAlgoId[MAX_ALGO_SZ]; + byte digEncAlgoId[MAX_ALGO_SZ]; + byte signedAttribSet[MAX_SET_SZ]; + EncodedAttrib signedAttribs[6]; + byte signerDigest[MAX_OCTET_STR_SZ]; + word32 innerOctetsSz, innerContSeqSz, contentInfoSeqSz; + word32 outerSeqSz, outerContentSz, innerSeqSz, versionSz, digAlgoIdSetSz, + singleDigAlgoIdSz, certsSetSz; + word32 signerInfoSetSz, signerInfoSeqSz, signerVersionSz, + issuerSnSeqSz, issuerNameSz, issuerSnSz, + signerDigAlgoIdSz, digEncAlgoIdSz, signerDigestSz; + word32 encContentDigestSz, signedAttribsSz, signedAttribsCount, + signedAttribSetSz; +} ESD; + + +static int EncodeAttributes(EncodedAttrib* ea, int eaSz, + PKCS7Attrib* attribs, int attribsSz) +{ + int i; + int maxSz = min(eaSz, attribsSz); + int allAttribsSz = 0; + + for (i = 0; i < maxSz; i++) + { + int attribSz = 0; + + ea[i].value = attribs[i].value; + ea[i].valueSz = attribs[i].valueSz; + attribSz += ea[i].valueSz; + ea[i].valueSetSz = SetSet(attribSz, ea[i].valueSet); + attribSz += ea[i].valueSetSz; + ea[i].oid = attribs[i].oid; + ea[i].oidSz = attribs[i].oidSz; + attribSz += ea[i].oidSz; + ea[i].valueSeqSz = SetSequence(attribSz, ea[i].valueSeq); + attribSz += ea[i].valueSeqSz; + ea[i].totalSz = attribSz; + + allAttribsSz += attribSz; + } + return allAttribsSz; +} + + +static int FlattenAttributes(byte* output, EncodedAttrib* ea, int eaSz) +{ + int i, idx; + + idx = 0; + for (i = 0; i < eaSz; i++) { + XMEMCPY(output + idx, ea[i].valueSeq, ea[i].valueSeqSz); + idx += ea[i].valueSeqSz; + XMEMCPY(output + idx, ea[i].oid, ea[i].oidSz); + idx += ea[i].oidSz; + XMEMCPY(output + idx, ea[i].valueSet, ea[i].valueSetSz); + idx += ea[i].valueSetSz; + XMEMCPY(output + idx, ea[i].value, ea[i].valueSz); + idx += ea[i].valueSz; + } + return 0; +} + + +/* build PKCS#7 signedData content type */ +int PKCS7_EncodeSignedData(PKCS7* pkcs7, byte* output, word32 outputSz) +{ + static const byte outerOid[] = + { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, + 0x07, 0x02 }; + static const byte innerOid[] = + { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, + 0x07, 0x01 }; + + ESD esd; + word32 signerInfoSz = 0; + word32 totalSz = 0; + int idx = 0, ret = 0; + byte* flatSignedAttribs = NULL; + word32 flatSignedAttribsSz = 0; + word32 innerOidSz = sizeof(innerOid); + word32 outerOidSz = sizeof(outerOid); + + if (pkcs7 == NULL || pkcs7->content == NULL || pkcs7->contentSz == 0 || + pkcs7->encryptOID == 0 || pkcs7->hashOID == 0 || pkcs7->rng == 0 || + pkcs7->singleCert == NULL || pkcs7->singleCertSz == 0 || + pkcs7->privateKey == NULL || pkcs7->privateKeySz == 0 || + output == NULL || outputSz == 0) + return BAD_FUNC_ARG; + + XMEMSET(&esd, 0, sizeof(esd)); + ret = InitSha(&esd.sha); + if (ret != 0) + return ret; + + if (pkcs7->contentSz != 0) + { + ShaUpdate(&esd.sha, pkcs7->content, pkcs7->contentSz); + esd.contentDigest[0] = ASN_OCTET_STRING; + esd.contentDigest[1] = SHA_DIGEST_SIZE; + ShaFinal(&esd.sha, &esd.contentDigest[2]); + } + + esd.innerOctetsSz = SetOctetString(pkcs7->contentSz, esd.innerOctets); + esd.innerContSeqSz = SetExplicit(0, esd.innerOctetsSz + pkcs7->contentSz, + esd.innerContSeq); + esd.contentInfoSeqSz = SetSequence(pkcs7->contentSz + esd.innerOctetsSz + + innerOidSz + esd.innerContSeqSz, + esd.contentInfoSeq); + + esd.issuerSnSz = SetSerialNumber(pkcs7->issuerSn, pkcs7->issuerSnSz, + esd.issuerSn); + signerInfoSz += esd.issuerSnSz; + esd.issuerNameSz = SetSequence(pkcs7->issuerSz, esd.issuerName); + signerInfoSz += esd.issuerNameSz + pkcs7->issuerSz; + esd.issuerSnSeqSz = SetSequence(signerInfoSz, esd.issuerSnSeq); + signerInfoSz += esd.issuerSnSeqSz; + esd.signerVersionSz = SetMyVersion(1, esd.signerVersion, 0); + signerInfoSz += esd.signerVersionSz; + esd.signerDigAlgoIdSz = SetAlgoID(pkcs7->hashOID, esd.signerDigAlgoId, + hashType, 0); + signerInfoSz += esd.signerDigAlgoIdSz; + esd.digEncAlgoIdSz = SetAlgoID(pkcs7->encryptOID, esd.digEncAlgoId, + keyType, 0); + signerInfoSz += esd.digEncAlgoIdSz; + + if (pkcs7->signedAttribsSz != 0) { + byte contentTypeOid[] = + { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xF7, 0x0d, 0x01, + 0x09, 0x03 }; + byte contentType[] = + { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, + 0x07, 0x01 }; + byte messageDigestOid[] = + { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, + 0x09, 0x04 }; + + PKCS7Attrib cannedAttribs[2] = + { + { contentTypeOid, sizeof(contentTypeOid), + contentType, sizeof(contentType) }, + { messageDigestOid, sizeof(messageDigestOid), + esd.contentDigest, sizeof(esd.contentDigest) } + }; + word32 cannedAttribsCount = sizeof(cannedAttribs)/sizeof(PKCS7Attrib); + + esd.signedAttribsCount += cannedAttribsCount; + esd.signedAttribsSz += EncodeAttributes(&esd.signedAttribs[0], 2, + cannedAttribs, cannedAttribsCount); + + esd.signedAttribsCount += pkcs7->signedAttribsSz; + esd.signedAttribsSz += EncodeAttributes(&esd.signedAttribs[2], 4, + pkcs7->signedAttribs, pkcs7->signedAttribsSz); + + flatSignedAttribs = (byte*)XMALLOC(esd.signedAttribsSz, 0, NULL); + flatSignedAttribsSz = esd.signedAttribsSz; + if (flatSignedAttribs == NULL) + return MEMORY_E; + FlattenAttributes(flatSignedAttribs, + esd.signedAttribs, esd.signedAttribsCount); + esd.signedAttribSetSz = SetImplicit(ASN_SET, 0, esd.signedAttribsSz, + esd.signedAttribSet); + } + /* Calculate the final hash and encrypt it. */ + { + RsaKey privKey; + int result; + word32 scratch = 0; + + byte digestInfo[MAX_SEQ_SZ + MAX_ALGO_SZ + + MAX_OCTET_STR_SZ + SHA_DIGEST_SIZE]; + byte digestInfoSeq[MAX_SEQ_SZ]; + byte digestStr[MAX_OCTET_STR_SZ]; + word32 digestInfoSeqSz, digestStrSz; + int digIdx = 0; + + if (pkcs7->signedAttribsSz != 0) { + byte attribSet[MAX_SET_SZ]; + word32 attribSetSz; + + attribSetSz = SetSet(flatSignedAttribsSz, attribSet); + + ret = InitSha(&esd.sha); + if (ret < 0) { + XFREE(flatSignedAttribs, 0, NULL); + return ret; + } + ShaUpdate(&esd.sha, attribSet, attribSetSz); + ShaUpdate(&esd.sha, flatSignedAttribs, flatSignedAttribsSz); + } + ShaFinal(&esd.sha, esd.contentAttribsDigest); + + digestStrSz = SetOctetString(SHA_DIGEST_SIZE, digestStr); + digestInfoSeqSz = SetSequence(esd.signerDigAlgoIdSz + + digestStrSz + SHA_DIGEST_SIZE, + digestInfoSeq); + + XMEMCPY(digestInfo + digIdx, digestInfoSeq, digestInfoSeqSz); + digIdx += digestInfoSeqSz; + XMEMCPY(digestInfo + digIdx, + esd.signerDigAlgoId, esd.signerDigAlgoIdSz); + digIdx += esd.signerDigAlgoIdSz; + XMEMCPY(digestInfo + digIdx, digestStr, digestStrSz); + digIdx += digestStrSz; + XMEMCPY(digestInfo + digIdx, esd.contentAttribsDigest, SHA_DIGEST_SIZE); + digIdx += SHA_DIGEST_SIZE; + + result = InitRsaKey(&privKey, NULL); + if (result == 0) + result = RsaPrivateKeyDecode(pkcs7->privateKey, &scratch, &privKey, + pkcs7->privateKeySz); + if (result < 0) { + XFREE(flatSignedAttribs, 0, NULL); + return PUBLIC_KEY_E; + } + result = RsaSSL_Sign(digestInfo, digIdx, + esd.encContentDigest, sizeof(esd.encContentDigest), + &privKey, pkcs7->rng); + FreeRsaKey(&privKey); + if (result < 0) { + XFREE(flatSignedAttribs, 0, NULL); + return result; + } + esd.encContentDigestSz = (word32)result; + } + signerInfoSz += flatSignedAttribsSz + esd.signedAttribSetSz; + + esd.signerDigestSz = SetOctetString(esd.encContentDigestSz, + esd.signerDigest); + signerInfoSz += esd.signerDigestSz + esd.encContentDigestSz; + + esd.signerInfoSeqSz = SetSequence(signerInfoSz, esd.signerInfoSeq); + signerInfoSz += esd.signerInfoSeqSz; + esd.signerInfoSetSz = SetSet(signerInfoSz, esd.signerInfoSet); + signerInfoSz += esd.signerInfoSetSz; + + esd.certsSetSz = SetImplicit(ASN_SET, 0, pkcs7->singleCertSz, esd.certsSet); + + esd.singleDigAlgoIdSz = SetAlgoID(pkcs7->hashOID, esd.singleDigAlgoId, + hashType, 0); + esd.digAlgoIdSetSz = SetSet(esd.singleDigAlgoIdSz, esd.digAlgoIdSet); + + + esd.versionSz = SetMyVersion(1, esd.version, 0); + + totalSz = esd.versionSz + esd.singleDigAlgoIdSz + esd.digAlgoIdSetSz + + esd.contentInfoSeqSz + esd.certsSetSz + pkcs7->singleCertSz + + esd.innerOctetsSz + esd.innerContSeqSz + + innerOidSz + pkcs7->contentSz + + signerInfoSz; + esd.innerSeqSz = SetSequence(totalSz, esd.innerSeq); + totalSz += esd.innerSeqSz; + esd.outerContentSz = SetExplicit(0, totalSz, esd.outerContent); + totalSz += esd.outerContentSz + outerOidSz; + esd.outerSeqSz = SetSequence(totalSz, esd.outerSeq); + totalSz += esd.outerSeqSz; + + if (outputSz < totalSz) + return BUFFER_E; + + idx = 0; + XMEMCPY(output + idx, esd.outerSeq, esd.outerSeqSz); + idx += esd.outerSeqSz; + XMEMCPY(output + idx, outerOid, outerOidSz); + idx += outerOidSz; + XMEMCPY(output + idx, esd.outerContent, esd.outerContentSz); + idx += esd.outerContentSz; + XMEMCPY(output + idx, esd.innerSeq, esd.innerSeqSz); + idx += esd.innerSeqSz; + XMEMCPY(output + idx, esd.version, esd.versionSz); + idx += esd.versionSz; + XMEMCPY(output + idx, esd.digAlgoIdSet, esd.digAlgoIdSetSz); + idx += esd.digAlgoIdSetSz; + XMEMCPY(output + idx, esd.singleDigAlgoId, esd.singleDigAlgoIdSz); + idx += esd.singleDigAlgoIdSz; + XMEMCPY(output + idx, esd.contentInfoSeq, esd.contentInfoSeqSz); + idx += esd.contentInfoSeqSz; + XMEMCPY(output + idx, innerOid, innerOidSz); + idx += innerOidSz; + XMEMCPY(output + idx, esd.innerContSeq, esd.innerContSeqSz); + idx += esd.innerContSeqSz; + XMEMCPY(output + idx, esd.innerOctets, esd.innerOctetsSz); + idx += esd.innerOctetsSz; + XMEMCPY(output + idx, pkcs7->content, pkcs7->contentSz); + idx += pkcs7->contentSz; + XMEMCPY(output + idx, esd.certsSet, esd.certsSetSz); + idx += esd.certsSetSz; + XMEMCPY(output + idx, pkcs7->singleCert, pkcs7->singleCertSz); + idx += pkcs7->singleCertSz; + XMEMCPY(output + idx, esd.signerInfoSet, esd.signerInfoSetSz); + idx += esd.signerInfoSetSz; + XMEMCPY(output + idx, esd.signerInfoSeq, esd.signerInfoSeqSz); + idx += esd.signerInfoSeqSz; + XMEMCPY(output + idx, esd.signerVersion, esd.signerVersionSz); + idx += esd.signerVersionSz; + XMEMCPY(output + idx, esd.issuerSnSeq, esd.issuerSnSeqSz); + idx += esd.issuerSnSeqSz; + XMEMCPY(output + idx, esd.issuerName, esd.issuerNameSz); + idx += esd.issuerNameSz; + XMEMCPY(output + idx, pkcs7->issuer, pkcs7->issuerSz); + idx += pkcs7->issuerSz; + XMEMCPY(output + idx, esd.issuerSn, esd.issuerSnSz); + idx += esd.issuerSnSz; + XMEMCPY(output + idx, esd.signerDigAlgoId, esd.signerDigAlgoIdSz); + idx += esd.signerDigAlgoIdSz; + + /* SignerInfo:Attributes */ + if (pkcs7->signedAttribsSz != 0) { + XMEMCPY(output + idx, esd.signedAttribSet, esd.signedAttribSetSz); + idx += esd.signedAttribSetSz; + XMEMCPY(output + idx, flatSignedAttribs, flatSignedAttribsSz); + idx += flatSignedAttribsSz; + XFREE(flatSignedAttribs, 0, NULL); + } + + XMEMCPY(output + idx, esd.digEncAlgoId, esd.digEncAlgoIdSz); + idx += esd.digEncAlgoIdSz; + XMEMCPY(output + idx, esd.signerDigest, esd.signerDigestSz); + idx += esd.signerDigestSz; + XMEMCPY(output + idx, esd.encContentDigest, esd.encContentDigestSz); + idx += esd.encContentDigestSz; + + return idx; +} + + +/* Finds the certificates in the message and saves it. */ +int PKCS7_VerifySignedData(PKCS7* pkcs7, byte* pkiMsg, word32 pkiMsgSz) +{ + word32 idx, contentType; + int length, version, ret; + byte* content = NULL; + byte* sig = NULL; + byte* cert = NULL; + int contentSz = 0, sigSz = 0, certSz = 0; + + if (pkcs7 == NULL || pkiMsg == NULL || pkiMsgSz == 0) + return BAD_FUNC_ARG; + + idx = 0; + + /* Get the contentInfo sequence */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Get the contentInfo contentType */ + if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (contentType != SIGNED_DATA) { + CYASSL_MSG("PKCS#7 input not of type SignedData"); + return PKCS7_OID_E; + } + + /* get the ContentInfo content */ + if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Get the signedData sequence */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Get the version */ + if (GetMyVersion(pkiMsg, &idx, &version) < 0) + return ASN_PARSE_E; + + if (version != 1) { + CYASSL_MSG("PKCS#7 signedData needs to be of version 1"); + return ASN_VERSION_E; + } + + /* Get the set of DigestAlgorithmIdentifiers */ + if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Skip the set. */ + idx += length; + + /* Get the inner ContentInfo sequence */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Get the inner ContentInfo contentType */ + if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (contentType != DATA) { + CYASSL_MSG("PKCS#7 inner input not of type Data"); + return PKCS7_OID_E; + } + + if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (pkiMsg[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Save the inner data as the content. */ + if (length > 0) { + /* Local pointer for calculating hashes later */ + pkcs7->content = content = &pkiMsg[idx]; + pkcs7->contentSz = contentSz = length; + idx += length; + } + + /* Get the implicit[0] set of certificates */ + if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) { + idx++; + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (length > 0) { + /* At this point, idx is at the first certificate in + * a set of certificates. There may be more than one, + * or none, or they may be a PKCS 6 extended + * certificate. We want to save the first cert if it + * is X.509. */ + + word32 certIdx = idx; + + if (pkiMsg[certIdx++] == (ASN_CONSTRUCTED | ASN_SEQUENCE)) { + if (GetLength(pkiMsg, &certIdx, &certSz, pkiMsgSz) < 0) + return ASN_PARSE_E; + + cert = &pkiMsg[idx]; + certSz += (certIdx - idx); + } + PKCS7_InitWithCert(pkcs7, cert, certSz); + } + idx += length; + } + + /* Get the implicit[1] set of crls */ + if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) { + idx++; + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Skip the set */ + idx += length; + } + + /* Get the set of signerInfos */ + if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (length > 0) { + RsaKey key; + word32 scratch = 0; + int plainSz = 0; + byte digest[MAX_SEQ_SZ+MAX_ALGO_SZ+MAX_OCTET_STR_SZ+SHA_DIGEST_SIZE]; + + /* Get the sequence of the first signerInfo */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Get the version */ + if (GetMyVersion(pkiMsg, &idx, &version) < 0) + return ASN_PARSE_E; + + if (version != 1) { + CYASSL_MSG("PKCS#7 signerInfo needs to be of version 1"); + return ASN_VERSION_E; + } + + /* Get the sequence of IssuerAndSerialNumber */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Skip it */ + idx += length; + + /* Get the sequence of digestAlgorithm */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Skip it */ + idx += length; + + /* Get the IMPLICIT[0] SET OF signedAttributes */ + if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) { + idx++; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + idx += length; + } + + /* Get the sequence of digestEncryptionAlgorithm */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* Skip it */ + idx += length; + + /* Get the signature */ + if (pkiMsg[idx] == ASN_OCTET_STRING) { + idx++; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* save pointer and length */ + sig = &pkiMsg[idx]; + sigSz = length; + + idx += length; + } + + XMEMSET(digest, 0, sizeof(digest)); + pkcs7->content = content; + pkcs7->contentSz = contentSz; + + ret = InitRsaKey(&key, NULL); + if (ret != 0) return ret; + if (RsaPublicKeyDecode(pkcs7->publicKey, &scratch, &key, + pkcs7->publicKeySz) < 0) { + CYASSL_MSG("ASN RSA key decode error"); + return PUBLIC_KEY_E; + } + plainSz = RsaSSL_Verify(sig, sigSz, digest, sizeof(digest), &key); + FreeRsaKey(&key); + if (plainSz < 0) + return plainSz; + } + + return 0; +} + + +/* create ASN.1 fomatted RecipientInfo structure, returns sequence size */ +CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz, + int keyEncAlgo, int blockKeySz, + RNG* rng, byte* contentKeyPlain, + byte* contentKeyEnc, + int* keyEncSz, byte* out, word32 outSz) +{ + word32 idx = 0; + int ret = 0, totalSz = 0; + int verSz, issuerSz, snSz, keyEncAlgSz; + int issuerSeqSz, recipSeqSz, issuerSerialSeqSz; + int encKeyOctetStrSz; + + byte ver[MAX_VERSION_SZ]; + byte serial[MAX_SN_SZ]; + byte issuerSerialSeq[MAX_SEQ_SZ]; + byte recipSeq[MAX_SEQ_SZ]; + byte issuerSeq[MAX_SEQ_SZ]; + byte keyAlgArray[MAX_ALGO_SZ]; + byte encKeyOctetStr[MAX_OCTET_STR_SZ]; + + RsaKey pubKey; + DecodedCert decoded; + + InitDecodedCert(&decoded, (byte*)cert, certSz, 0); + ret = ParseCert(&decoded, CA_TYPE, NO_VERIFY, 0); + if (ret < 0) { + FreeDecodedCert(&decoded); + return ret; + } + + /* version */ + verSz = SetMyVersion(0, ver, 0); + + /* IssuerAndSerialNumber */ + if (decoded.issuerRaw == NULL || decoded.issuerRawLen == 0) { + CYASSL_MSG("DecodedCert lacks raw issuer pointer and length"); + FreeDecodedCert(&decoded); + return -1; + } + issuerSz = decoded.issuerRawLen; + issuerSeqSz = SetSequence(issuerSz, issuerSeq); + + if (decoded.serial == NULL || decoded.serialSz == 0) { + CYASSL_MSG("DecodedCert missing serial number"); + FreeDecodedCert(&decoded); + return -1; + } + snSz = SetSerialNumber(decoded.serial, decoded.serialSz, serial); + + issuerSerialSeqSz = SetSequence(issuerSeqSz + issuerSz + snSz, + issuerSerialSeq); + + /* KeyEncryptionAlgorithmIdentifier, only support RSA now */ + if (keyEncAlgo != RSAk) + return ALGO_ID_E; + + keyEncAlgSz = SetAlgoID(keyEncAlgo, keyAlgArray, keyType, 0); + if (keyEncAlgSz == 0) + return BAD_FUNC_ARG; + + /* EncryptedKey */ + ret = InitRsaKey(&pubKey, 0); + if (ret != 0) return ret; + if (RsaPublicKeyDecode(decoded.publicKey, &idx, &pubKey, + decoded.pubKeySize) < 0) { + CYASSL_MSG("ASN RSA key decode error"); + return PUBLIC_KEY_E; + } + + *keyEncSz = RsaPublicEncrypt(contentKeyPlain, blockKeySz, contentKeyEnc, + MAX_ENCRYPTED_KEY_SZ, &pubKey, rng); + FreeRsaKey(&pubKey); + if (*keyEncSz < 0) { + CYASSL_MSG("RSA Public Encrypt failed"); + return *keyEncSz; + } + + encKeyOctetStrSz = SetOctetString(*keyEncSz, encKeyOctetStr); + + /* RecipientInfo */ + recipSeqSz = SetSequence(verSz + issuerSerialSeqSz + issuerSeqSz + + issuerSz + snSz + keyEncAlgSz + encKeyOctetStrSz + + *keyEncSz, recipSeq); + + if (recipSeqSz + verSz + issuerSerialSeqSz + issuerSeqSz + snSz + + keyEncAlgSz + encKeyOctetStrSz + *keyEncSz > (int)outSz) { + CYASSL_MSG("RecipientInfo output buffer too small"); + return BUFFER_E; + } + + XMEMCPY(out + totalSz, recipSeq, recipSeqSz); + totalSz += recipSeqSz; + XMEMCPY(out + totalSz, ver, verSz); + totalSz += verSz; + XMEMCPY(out + totalSz, issuerSerialSeq, issuerSerialSeqSz); + totalSz += issuerSerialSeqSz; + XMEMCPY(out + totalSz, issuerSeq, issuerSeqSz); + totalSz += issuerSeqSz; + XMEMCPY(out + totalSz, decoded.issuerRaw, issuerSz); + totalSz += issuerSz; + XMEMCPY(out + totalSz, serial, snSz); + totalSz += snSz; + XMEMCPY(out + totalSz, keyAlgArray, keyEncAlgSz); + totalSz += keyEncAlgSz; + XMEMCPY(out + totalSz, encKeyOctetStr, encKeyOctetStrSz); + totalSz += encKeyOctetStrSz; + XMEMCPY(out + totalSz, contentKeyEnc, *keyEncSz); + totalSz += *keyEncSz; + + FreeDecodedCert(&decoded); + + return totalSz; +} + + +/* build PKCS#7 envelopedData content type, return enveloped size */ +int PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz) +{ + int i, ret = 0, idx = 0; + int totalSz = 0, padSz = 0, desOutSz = 0; + + int contentInfoSeqSz, outerContentTypeSz, outerContentSz; + byte contentInfoSeq[MAX_SEQ_SZ]; + byte outerContentType[MAX_ALGO_SZ]; + byte outerContent[MAX_SEQ_SZ]; + + int envDataSeqSz, verSz; + byte envDataSeq[MAX_SEQ_SZ]; + byte ver[MAX_VERSION_SZ]; + + RNG rng; + int contentKeyEncSz, blockKeySz; + int dynamicFlag = 0; + byte contentKeyPlain[MAX_CONTENT_KEY_LEN]; + byte contentKeyEnc[MAX_ENCRYPTED_KEY_SZ]; + byte* plain; + byte* encryptedContent; + + int recipSz, recipSetSz; + byte recip[MAX_RECIP_SZ]; + byte recipSet[MAX_SET_SZ]; + + int encContentOctetSz, encContentSeqSz, contentTypeSz; + int contentEncAlgoSz, ivOctetStringSz; + byte encContentSeq[MAX_SEQ_SZ]; + byte contentType[MAX_ALGO_SZ]; + byte contentEncAlgo[MAX_ALGO_SZ]; + byte tmpIv[DES_BLOCK_SIZE]; + byte ivOctetString[MAX_OCTET_STR_SZ]; + byte encContentOctet[MAX_OCTET_STR_SZ]; + + if (pkcs7 == NULL || pkcs7->content == NULL || pkcs7->contentSz == 0 || + pkcs7->encryptOID == 0 || pkcs7->singleCert == NULL) + return BAD_FUNC_ARG; + + if (output == NULL || outputSz == 0) + return BAD_FUNC_ARG; + + /* PKCS#7 only supports DES, 3DES for now */ + switch (pkcs7->encryptOID) { + case DESb: + blockKeySz = DES_KEYLEN; + break; + + case DES3b: + blockKeySz = DES3_KEYLEN; + break; + + default: + CYASSL_MSG("Unsupported content cipher type"); + return ALGO_ID_E; + }; + + /* outer content type */ + outerContentTypeSz = SetContentType(ENVELOPED_DATA, outerContentType); + + /* version, defined as 0 in RFC 2315 */ + verSz = SetMyVersion(0, ver, 0); + + /* generate random content encryption key */ + ret = InitRng(&rng); + if (ret != 0) + return ret; + + ret = RNG_GenerateBlock(&rng, contentKeyPlain, blockKeySz); + if (ret != 0) + return ret; + + /* build RecipientInfo, only handle 1 for now */ + recipSz = CreateRecipientInfo(pkcs7->singleCert, pkcs7->singleCertSz, RSAk, + blockKeySz, &rng, contentKeyPlain, + contentKeyEnc, &contentKeyEncSz, recip, + MAX_RECIP_SZ); + + if (recipSz < 0) { + CYASSL_MSG("Failed to create RecipientInfo"); + return recipSz; + } + recipSetSz = SetSet(recipSz, recipSet); + + /* generate IV for block cipher */ + ret = RNG_GenerateBlock(&rng, tmpIv, DES_BLOCK_SIZE); + if (ret != 0) + return ret; + + /* EncryptedContentInfo */ + contentTypeSz = SetContentType(pkcs7->contentOID, contentType); + if (contentTypeSz == 0) + return BAD_FUNC_ARG; + + /* allocate encrypted content buffer, pad if necessary, PKCS#7 padding */ + padSz = DES_BLOCK_SIZE - (pkcs7->contentSz % DES_BLOCK_SIZE); + desOutSz = pkcs7->contentSz + padSz; + + if (padSz != 0) { + plain = XMALLOC(desOutSz, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (plain == NULL) { + return MEMORY_E; + } + XMEMCPY(plain, pkcs7->content, pkcs7->contentSz); + dynamicFlag = 1; + + for (i = 0; i < padSz; i++) { + plain[pkcs7->contentSz + i] = padSz; + } + + } else { + plain = pkcs7->content; + desOutSz = pkcs7->contentSz; + } + + encryptedContent = XMALLOC(desOutSz, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (encryptedContent == NULL) { + if (dynamicFlag) + XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } + + /* put together IV OCTET STRING */ + ivOctetStringSz = SetOctetString(DES_BLOCK_SIZE, ivOctetString); + + /* build up our ContentEncryptionAlgorithmIdentifier sequence, + * adding (ivOctetStringSz + DES_BLOCK_SIZE) for IV OCTET STRING */ + contentEncAlgoSz = SetAlgoID(pkcs7->encryptOID, contentEncAlgo, + blkType, ivOctetStringSz + DES_BLOCK_SIZE); + if (contentEncAlgoSz == 0) + return BAD_FUNC_ARG; + + /* encrypt content */ + if (pkcs7->encryptOID == DESb) { + Des des; + + ret = Des_SetKey(&des, contentKeyPlain, tmpIv, DES_ENCRYPTION); + + if (ret == 0) + Des_CbcEncrypt(&des, encryptedContent, plain, desOutSz); + + if (ret != 0) { + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (dynamicFlag) + XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return ret; + } + } + else if (pkcs7->encryptOID == DES3b) { + Des3 des3; + + ret = Des3_SetKey(&des3, contentKeyPlain, tmpIv, DES_ENCRYPTION); + + if (ret == 0) + ret = Des3_CbcEncrypt(&des3, encryptedContent, plain, desOutSz); + + if (ret != 0) { + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (dynamicFlag) + XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return ret; + } + } + + encContentOctetSz = SetImplicit(ASN_OCTET_STRING, 0, + desOutSz, encContentOctet); + + encContentSeqSz = SetSequence(contentTypeSz + contentEncAlgoSz + + ivOctetStringSz + DES_BLOCK_SIZE + + encContentOctetSz + desOutSz, encContentSeq); + + /* keep track of sizes for outer wrapper layering */ + totalSz = verSz + recipSetSz + recipSz + encContentSeqSz + contentTypeSz + + contentEncAlgoSz + ivOctetStringSz + DES_BLOCK_SIZE + + encContentOctetSz + desOutSz; + + /* EnvelopedData */ + envDataSeqSz = SetSequence(totalSz, envDataSeq); + totalSz += envDataSeqSz; + + /* outer content */ + outerContentSz = SetExplicit(0, totalSz, outerContent); + totalSz += outerContentTypeSz; + totalSz += outerContentSz; + + /* ContentInfo */ + contentInfoSeqSz = SetSequence(totalSz, contentInfoSeq); + totalSz += contentInfoSeqSz; + + if (totalSz > (int)outputSz) { + CYASSL_MSG("Pkcs7_encrypt output buffer too small"); + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (dynamicFlag) + XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return BUFFER_E; + } + + XMEMCPY(output + idx, contentInfoSeq, contentInfoSeqSz); + idx += contentInfoSeqSz; + XMEMCPY(output + idx, outerContentType, outerContentTypeSz); + idx += outerContentTypeSz; + XMEMCPY(output + idx, outerContent, outerContentSz); + idx += outerContentSz; + XMEMCPY(output + idx, envDataSeq, envDataSeqSz); + idx += envDataSeqSz; + XMEMCPY(output + idx, ver, verSz); + idx += verSz; + XMEMCPY(output + idx, recipSet, recipSetSz); + idx += recipSetSz; + XMEMCPY(output + idx, recip, recipSz); + idx += recipSz; + XMEMCPY(output + idx, encContentSeq, encContentSeqSz); + idx += encContentSeqSz; + XMEMCPY(output + idx, contentType, contentTypeSz); + idx += contentTypeSz; + XMEMCPY(output + idx, contentEncAlgo, contentEncAlgoSz); + idx += contentEncAlgoSz; + XMEMCPY(output + idx, ivOctetString, ivOctetStringSz); + idx += ivOctetStringSz; + XMEMCPY(output + idx, tmpIv, DES_BLOCK_SIZE); + idx += DES_BLOCK_SIZE; + XMEMCPY(output + idx, encContentOctet, encContentOctetSz); + idx += encContentOctetSz; + XMEMCPY(output + idx, encryptedContent, desOutSz); + idx += desOutSz; + +#ifdef NO_RC4 + FreeRng(&rng); +#endif + + XMEMSET(contentKeyPlain, 0, MAX_CONTENT_KEY_LEN); + XMEMSET(contentKeyEnc, 0, MAX_ENCRYPTED_KEY_SZ); + + if (dynamicFlag) + XFREE(plain, NULL, DYNAMMIC_TYPE_TMP_BUFFER); + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + return idx; +} + +/* unwrap and decrypt PKCS#7 envelopedData object, return decoded size */ +CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg, + word32 pkiMsgSz, byte* output, + word32 outputSz) +{ + int recipFound = 0; + int ret, version, length; + word32 savedIdx = 0, idx = 0; + word32 contentType, encOID; + byte issuerHash[SHA_DIGEST_SIZE]; + mp_int serialNum; + + int encryptedKeySz, keySz; + byte tmpIv[DES_BLOCK_SIZE]; + byte encryptedKey[MAX_ENCRYPTED_KEY_SZ]; + byte* decryptedKey = NULL; + + RsaKey privKey; + int encryptedContentSz; + byte padLen; + byte* encryptedContent = NULL; + + if (pkcs7 == NULL || pkcs7->singleCert == NULL || + pkcs7->singleCertSz == 0 || pkcs7->privateKey == NULL || + pkcs7->privateKeySz == 0) + return BAD_FUNC_ARG; + + if (pkiMsg == NULL || pkiMsgSz == 0 || + output == NULL || outputSz == 0) + return BAD_FUNC_ARG; + + /* load private key */ + ret = InitRsaKey(&privKey, 0); + if (ret != 0) return ret; + ret = RsaPrivateKeyDecode(pkcs7->privateKey, &idx, &privKey, + pkcs7->privateKeySz); + if (ret != 0) { + CYASSL_MSG("Failed to decode RSA private key"); + return ret; + } + + idx = 0; + + /* read past ContentInfo, verify type is envelopedData */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (contentType != ENVELOPED_DATA) { + CYASSL_MSG("PKCS#7 input not of type EnvelopedData"); + return PKCS7_OID_E; + } + + if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* remove EnvelopedData and version */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (GetMyVersion(pkiMsg, &idx, &version) < 0) + return ASN_PARSE_E; + + if (version != 0) { + CYASSL_MSG("PKCS#7 envelopedData needs to be of version 0"); + return ASN_VERSION_E; + } + + /* walk through RecipientInfo set, find correct recipient */ + if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + savedIdx = idx; + recipFound = 0; + + /* when looking for next recipient, use first sequence and version to + * indicate there is another, if not, move on */ + while(recipFound == 0) { + + /* remove RecipientInfo, if we don't have a SEQUENCE, back up idx to + * last good saved one */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) { + idx = savedIdx; + break; + } + + if (GetMyVersion(pkiMsg, &idx, &version) < 0) { + idx = savedIdx; + break; + } + + if (version != 0) + return ASN_VERSION_E; + + /* remove IssuerAndSerialNumber */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (GetNameHash(pkiMsg, &idx, issuerHash, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* if we found correct recipient, issuer hashes will match */ + if (XMEMCMP(issuerHash, pkcs7->issuerHash, SHA_DIGEST_SIZE) == 0) { + recipFound = 1; + } + + if (GetInt(&serialNum, pkiMsg, &idx, pkiMsgSz) < 0) + return ASN_PARSE_E; + mp_clear(&serialNum); + + if (GetAlgoId(pkiMsg, &idx, &encOID, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* key encryption algorithm must be RSA for now */ + if (encOID != RSAk) + return ALGO_ID_E; + + /* read encryptedKey */ + if (pkiMsg[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &encryptedKeySz, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (recipFound == 1) + XMEMCPY(encryptedKey, &pkiMsg[idx], encryptedKeySz); + idx += encryptedKeySz; + + /* update good idx */ + savedIdx = idx; + } + + if (recipFound == 0) { + CYASSL_MSG("No recipient found in envelopedData that matches input"); + return PKCS7_RECIP_E; + } + + /* remove EncryptedContentInfo */ + if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (GetAlgoId(pkiMsg, &idx, &encOID, pkiMsgSz) < 0) + return ASN_PARSE_E; + + /* get block cipher IV, stored in OPTIONAL parameter of AlgoID */ + if (pkiMsg[idx++] != ASN_OCTET_STRING) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) + return ASN_PARSE_E; + + if (length != DES_BLOCK_SIZE) { + CYASSL_MSG("Incorrect IV length, must be of DES_BLOCK_SIZE"); + return ASN_PARSE_E; + } + + XMEMCPY(tmpIv, &pkiMsg[idx], length); + idx += length; + + /* read encryptedContent, cont[0] */ + if (pkiMsg[idx++] != (ASN_CONTEXT_SPECIFIC | 0)) + return ASN_PARSE_E; + + if (GetLength(pkiMsg, &idx, &encryptedContentSz, pkiMsgSz) < 0) + return ASN_PARSE_E; + + encryptedContent = XMALLOC(encryptedContentSz, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + + XMEMCPY(encryptedContent, &pkiMsg[idx], encryptedContentSz); + + /* decrypt encryptedKey */ + keySz = RsaPrivateDecryptInline(encryptedKey, encryptedKeySz, + &decryptedKey, &privKey); + FreeRsaKey(&privKey); + if (keySz <= 0) + return keySz; + + /* decrypt encryptedContent */ + if (encOID == DESb) { + Des des; + ret = Des_SetKey(&des, decryptedKey, tmpIv, DES_DECRYPTION); + + if (ret == 0) + Des_CbcDecrypt(&des, encryptedContent, encryptedContent, + encryptedContentSz); + + if (ret != 0) { + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return ret; + } + } + else if (encOID == DES3b) { + Des3 des; + ret = Des3_SetKey(&des, decryptedKey, tmpIv, DES_DECRYPTION); + if (ret == 0) + ret = Des3_CbcDecrypt(&des, encryptedContent, encryptedContent, + encryptedContentSz); + + if (ret != 0) { + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return ret; + } + } else { + CYASSL_MSG("Unsupported content encryption OID type"); + return ALGO_ID_E; + } + + padLen = encryptedContent[encryptedContentSz-1]; + + /* copy plaintext to output */ + XMEMCPY(output, encryptedContent, encryptedContentSz - padLen); + + /* free memory, zero out keys */ + XMEMSET(encryptedKey, 0, MAX_ENCRYPTED_KEY_SZ); + XMEMSET(encryptedContent, 0, encryptedContentSz); + XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); + + return encryptedContentSz - padLen; +} + + +#else /* HAVE_PKCS7 */ + + +#ifdef _MSC_VER + /* 4206 warning for blank file */ + #pragma warning(disable: 4206) +#endif + + +#endif /* HAVE_PKCS7 */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/port.c b/project1/cyassl-3.0.0/ctaocrypt/src/port.c new file mode 100644 index 00000000..c5106218 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/port.c @@ -0,0 +1,436 @@ +/* port.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include +#include +#include + + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + + + +#ifdef SINGLE_THREADED + +int InitMutex(CyaSSL_Mutex* m) +{ + (void)m; + return 0; +} + + +int FreeMutex(CyaSSL_Mutex *m) +{ + (void)m; + return 0; +} + + +int LockMutex(CyaSSL_Mutex *m) +{ + (void)m; + return 0; +} + + +int UnLockMutex(CyaSSL_Mutex *m) +{ + (void)m; + return 0; +} + +#else /* MULTI_THREAD */ + + #if defined(FREERTOS) + + int InitMutex(CyaSSL_Mutex* m) + { + int iReturn; + + *m = ( CyaSSL_Mutex ) xSemaphoreCreateMutex(); + if( *m != NULL ) + iReturn = 0; + else + iReturn = BAD_MUTEX_E; + + return iReturn; + } + + int FreeMutex(CyaSSL_Mutex* m) + { + vSemaphoreDelete( *m ); + return 0; + } + + int LockMutex(CyaSSL_Mutex* m) + { + /* Assume an infinite block, or should there be zero block? */ + xSemaphoreTake( *m, portMAX_DELAY ); + return 0; + } + + int UnLockMutex(CyaSSL_Mutex* m) + { + xSemaphoreGive( *m ); + return 0; + } + + #elif defined(CYASSL_SAFERTOS) + + int InitMutex(CyaSSL_Mutex* m) + { + vSemaphoreCreateBinary(m->mutexBuffer, m->mutex); + if (m->mutex == NULL) + return BAD_MUTEX_E; + + return 0; + } + + int FreeMutex(CyaSSL_Mutex* m) + { + (void)m; + return 0; + } + + int LockMutex(CyaSSL_Mutex* m) + { + /* Assume an infinite block */ + xSemaphoreTake(m->mutex, portMAX_DELAY); + return 0; + } + + int UnLockMutex(CyaSSL_Mutex* m) + { + xSemaphoreGive(m->mutex); + return 0; + } + + + #elif defined(USE_WINDOWS_API) + + int InitMutex(CyaSSL_Mutex* m) + { + InitializeCriticalSection(m); + return 0; + } + + + int FreeMutex(CyaSSL_Mutex* m) + { + DeleteCriticalSection(m); + return 0; + } + + + int LockMutex(CyaSSL_Mutex* m) + { + EnterCriticalSection(m); + return 0; + } + + + int UnLockMutex(CyaSSL_Mutex* m) + { + LeaveCriticalSection(m); + return 0; + } + + #elif defined(CYASSL_PTHREADS) + + int InitMutex(CyaSSL_Mutex* m) + { + if (pthread_mutex_init(m, 0) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int FreeMutex(CyaSSL_Mutex* m) + { + if (pthread_mutex_destroy(m) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int LockMutex(CyaSSL_Mutex* m) + { + if (pthread_mutex_lock(m) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int UnLockMutex(CyaSSL_Mutex* m) + { + if (pthread_mutex_unlock(m) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + #elif defined(THREADX) + + int InitMutex(CyaSSL_Mutex* m) + { + if (tx_mutex_create(m, "CyaSSL Mutex", TX_NO_INHERIT) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int FreeMutex(CyaSSL_Mutex* m) + { + if (tx_mutex_delete(m) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int LockMutex(CyaSSL_Mutex* m) + { + if (tx_mutex_get(m, TX_WAIT_FOREVER) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + + int UnLockMutex(CyaSSL_Mutex* m) + { + if (tx_mutex_put(m) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + #elif defined(MICRIUM) + + int InitMutex(CyaSSL_Mutex* m) + { + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + if (NetSecure_OS_MutexCreate(m) == 0) + return 0; + else + return BAD_MUTEX_E; + #else + return 0; + #endif + } + + + int FreeMutex(CyaSSL_Mutex* m) + { + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + if (NetSecure_OS_FreeMutex(m) == 0) + return 0; + else + return BAD_MUTEX_E; + #else + return 0; + #endif + } + + + int LockMutex(CyaSSL_Mutex* m) + { + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + if (NetSecure_OS_LockMutex(m) == 0) + return 0; + else + return BAD_MUTEX_E; + #else + return 0; + #endif + } + + + int UnLockMutex(CyaSSL_Mutex* m) + { + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + if (NetSecure_OS_UnLockMutex(m) == 0) + return 0; + else + return BAD_MUTEX_E; + #else + return 0; + #endif + + } + + #elif defined(EBSNET) + + int InitMutex(CyaSSL_Mutex* m) + { + if (rtp_sig_mutex_alloc(m, "CyaSSL Mutex") == -1) + return BAD_MUTEX_E; + else + return 0; + } + + int FreeMutex(CyaSSL_Mutex* m) + { + rtp_sig_mutex_free(*m); + return 0; + } + + int LockMutex(CyaSSL_Mutex* m) + { + if (rtp_sig_mutex_claim_timed(*m, RTIP_INF) == 0) + return 0; + else + return BAD_MUTEX_E; + } + + int UnLockMutex(CyaSSL_Mutex* m) + { + rtp_sig_mutex_release(*m); + return 0; + } + + #elif defined(FREESCALE_MQX) + + int InitMutex(CyaSSL_Mutex* m) + { + if (_mutex_init(m, NULL) == MQX_EOK) + return 0; + else + return BAD_MUTEX_E; + } + + int FreeMutex(CyaSSL_Mutex* m) + { + if (_mutex_destroy(m) == MQX_EOK) + return 0; + else + return BAD_MUTEX_E; + } + + int LockMutex(CyaSSL_Mutex* m) + { + if (_mutex_lock(m) == MQX_EOK) + return 0; + else + return BAD_MUTEX_E; + } + + int UnLockMutex(CyaSSL_Mutex* m) + { + if (_mutex_unlock(m) == MQX_EOK) + return 0; + else + return BAD_MUTEX_E; + } + + #elif defined(CYASSL_MDK_ARM)|| defined(CYASSL_CMSIS_RTOS) + + #if defined(CYASSL_CMSIS_RTOS) + #include "cmsis_os.h" + #define CMSIS_NMUTEX 10 + osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ; + osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; + osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; + osMutexDef(CyaSSL_mt9) ; + + static const osMutexDef_t *CMSIS_mutex[] = { osMutex(CyaSSL_mt0), + osMutex(CyaSSL_mt1), osMutex(CyaSSL_mt2), osMutex(CyaSSL_mt3), + osMutex(CyaSSL_mt4), osMutex(CyaSSL_mt5), osMutex(CyaSSL_mt6), + osMutex(CyaSSL_mt7), osMutex(CyaSSL_mt8), osMutex(CyaSSL_mt9) } ; + + static osMutexId CMSIS_mutexID[CMSIS_NMUTEX] = {0} ; + + int InitMutex(CyaSSL_Mutex* m) + { + int i ; + for (i=0; i +#endif + +#include + +#ifndef NO_PWDBASED + +#ifdef CYASSL_PIC32MZ_HASH + +#define InitMd5 InitMd5_sw +#define Md5Update Md5Update_sw +#define Md5Final Md5Final_sw + +#define InitSha InitSha_sw +#define ShaUpdate ShaUpdate_sw +#define ShaFinal ShaFinal_sw + +#define InitSha256 InitSha256_sw +#define Sha256Update Sha256Update_sw +#define Sha256Final Sha256Final_sw + +#endif + +#include +#include +#include +#include +#if defined(CYASSL_SHA512) || defined(CYASSL_SHA384) + #include +#endif + +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +int PBKDF1(byte* output, const byte* passwd, int pLen, const byte* salt, + int sLen, int iterations, int kLen, int hashType) +{ + Md5 md5; + Sha sha; + int hLen = (hashType == MD5) ? (int)MD5_DIGEST_SIZE : (int)SHA_DIGEST_SIZE; + int i, ret = 0; + byte buffer[SHA_DIGEST_SIZE]; /* max size */ + + if (hashType != MD5 && hashType != SHA) + return BAD_FUNC_ARG; + + if (kLen > hLen) + return BAD_FUNC_ARG; + + if (iterations < 1) + return BAD_FUNC_ARG; + + if (hashType == MD5) { + InitMd5(&md5); + Md5Update(&md5, passwd, pLen); + Md5Update(&md5, salt, sLen); + Md5Final(&md5, buffer); + } + else { + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, passwd, pLen); + ShaUpdate(&sha, salt, sLen); + ShaFinal(&sha, buffer); + } + + for (i = 1; i < iterations; i++) { + if (hashType == MD5) { + Md5Update(&md5, buffer, hLen); + Md5Final(&md5, buffer); + } + else { + ShaUpdate(&sha, buffer, hLen); + ShaFinal(&sha, buffer); + } + } + XMEMCPY(output, buffer, kLen); + + return 0; +} + + +int PBKDF2(byte* output, const byte* passwd, int pLen, const byte* salt, + int sLen, int iterations, int kLen, int hashType) +{ + word32 i = 1; + int hLen; + int j, ret; + Hmac hmac; +#ifdef CYASSL_SMALL_STACK + byte* buffer; +#else + byte buffer[MAX_DIGEST_SIZE]; +#endif + + if (hashType == MD5) { + hLen = MD5_DIGEST_SIZE; + } + else if (hashType == SHA) { + hLen = SHA_DIGEST_SIZE; + } +#ifndef NO_SHA256 + else if (hashType == SHA256) { + hLen = SHA256_DIGEST_SIZE; + } +#endif +#ifdef CYASSL_SHA512 + else if (hashType == SHA512) { + hLen = SHA512_DIGEST_SIZE; + } +#endif + else + return BAD_FUNC_ARG; + +#ifdef CYASSL_SMALL_STACK + buffer = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (buffer == NULL) + return MEMORY_E; +#endif + + ret = HmacSetKey(&hmac, hashType, passwd, pLen); + + if (ret == 0) { + while (kLen) { + int currentLen; + + ret = HmacUpdate(&hmac, salt, sLen); + if (ret != 0) + break; + + /* encode i */ + for (j = 0; j < 4; j++) { + byte b = (byte)(i >> ((3-j) * 8)); + + ret = HmacUpdate(&hmac, &b, 1); + if (ret != 0) + break; + } + + /* check ret from inside for loop */ + if (ret != 0) + break; + + ret = HmacFinal(&hmac, buffer); + if (ret != 0) + break; + + currentLen = min(kLen, hLen); + XMEMCPY(output, buffer, currentLen); + + for (j = 1; j < iterations; j++) { + ret = HmacUpdate(&hmac, buffer, hLen); + if (ret != 0) + break; + ret = HmacFinal(&hmac, buffer); + if (ret != 0) + break; + xorbuf(output, buffer, currentLen); + } + + /* check ret from inside for loop */ + if (ret != 0) + break; + + output += currentLen; + kLen -= currentLen; + i++; + } + } + +#ifdef CYASSL_SMALL_STACK + XFREE(buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + +#ifdef CYASSL_SHA512 +#define PBKDF_DIGEST_SIZE SHA512_BLOCK_SIZE +#elif !defined(NO_SHA256) +#define PBKDF_DIGEST_SIZE SHA256_BLOCK_SIZE +#else +#define PBKDF_DIGEST_SIZE SHA_DIGEST_SIZE +#endif + +int PKCS12_PBKDF(byte* output, const byte* passwd, int passLen,const byte* salt, + int saltLen, int iterations, int kLen, int hashType, int id) +{ + /* all in bytes instead of bits */ + word32 u, v, dLen, pLen, iLen, sLen, totalLen; + int dynamic = 0; + int ret = 0; + int i; + byte *D, *S, *P, *I; +#ifdef CYASSL_SMALL_STACK + byte staticBuffer[1]; /* force dynamic usage */ +#else + byte staticBuffer[1024]; +#endif + byte* buffer = staticBuffer; + +#ifdef CYASSL_SMALL_STACK + byte* Ai; + byte* B; +#else + byte Ai[PBKDF_DIGEST_SIZE]; + byte B[PBKDF_DIGEST_SIZE]; +#endif + + if (!iterations) + iterations = 1; + + if (hashType == MD5) { + v = MD5_BLOCK_SIZE; + u = MD5_DIGEST_SIZE; + } + else if (hashType == SHA) { + v = SHA_BLOCK_SIZE; + u = SHA_DIGEST_SIZE; + } +#ifndef NO_SHA256 + else if (hashType == SHA256) { + v = SHA256_BLOCK_SIZE; + u = SHA256_DIGEST_SIZE; + } +#endif +#ifdef CYASSL_SHA512 + else if (hashType == SHA512) { + v = SHA512_BLOCK_SIZE; + u = SHA512_DIGEST_SIZE; + } +#endif + else + return BAD_FUNC_ARG; + +#ifdef CYASSL_SMALL_STACK + Ai = (byte*)XMALLOC(PBKDF_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (Ai == NULL) + return MEMORY_E; + + B = (byte*)XMALLOC(PBKDF_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (B == NULL) { + XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + dLen = v; + sLen = v * ((saltLen + v - 1) / v); + if (passLen) + pLen = v * ((passLen + v - 1) / v); + else + pLen = 0; + iLen = sLen + pLen; + + totalLen = dLen + sLen + pLen; + + if (totalLen > sizeof(staticBuffer)) { + buffer = (byte*)XMALLOC(totalLen, 0, DYNAMIC_TYPE_KEY); + if (buffer == NULL) { +#ifdef CYASSL_SMALL_STACK + XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(B, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return MEMORY_E; + } + dynamic = 1; + } + + D = buffer; + S = D + dLen; + P = S + sLen; + I = S; + + XMEMSET(D, id, dLen); + + for (i = 0; i < (int)sLen; i++) + S[i] = salt[i % saltLen]; + for (i = 0; i < (int)pLen; i++) + P[i] = passwd[i % passLen]; + + while (kLen > 0) { + word32 currentLen; + mp_int B1; + + if (hashType == MD5) { + Md5 md5; + + InitMd5(&md5); + Md5Update(&md5, buffer, totalLen); + Md5Final(&md5, Ai); + + for (i = 1; i < iterations; i++) { + Md5Update(&md5, Ai, u); + Md5Final(&md5, Ai); + } + } + else if (hashType == SHA) { + Sha sha; + + ret = InitSha(&sha); + if (ret != 0) + break; + ShaUpdate(&sha, buffer, totalLen); + ShaFinal(&sha, Ai); + + for (i = 1; i < iterations; i++) { + ShaUpdate(&sha, Ai, u); + ShaFinal(&sha, Ai); + } + } +#ifndef NO_SHA256 + else if (hashType == SHA256) { + Sha256 sha256; + + ret = InitSha256(&sha256); + if (ret != 0) + break; + + ret = Sha256Update(&sha256, buffer, totalLen); + if (ret != 0) + break; + + ret = Sha256Final(&sha256, Ai); + if (ret != 0) + break; + + for (i = 1; i < iterations; i++) { + ret = Sha256Update(&sha256, Ai, u); + if (ret != 0) + break; + + ret = Sha256Final(&sha256, Ai); + if (ret != 0) + break; + } + } +#endif +#ifdef CYASSL_SHA512 + else if (hashType == SHA512) { + Sha512 sha512; + + ret = InitSha512(&sha512); + if (ret != 0) + break; + + ret = Sha512Update(&sha512, buffer, totalLen); + if (ret != 0) + break; + + ret = Sha512Final(&sha512, Ai); + if (ret != 0) + break; + + for (i = 1; i < iterations; i++) { + ret = Sha512Update(&sha512, Ai, u); + if (ret != 0) + break; + + ret = Sha512Final(&sha512, Ai); + if (ret != 0) + break; + } + } +#endif + + for (i = 0; i < (int)v; i++) + B[i] = Ai[i % u]; + + if (mp_init(&B1) != MP_OKAY) + ret = MP_INIT_E; + else if (mp_read_unsigned_bin(&B1, B, v) != MP_OKAY) + ret = MP_READ_E; + else if (mp_add_d(&B1, (mp_digit)1, &B1) != MP_OKAY) + ret = MP_ADD_E; + + if (ret != 0) { + mp_clear(&B1); + break; + } + + for (i = 0; i < (int)iLen; i += v) { + int outSz; + mp_int i1; + mp_int res; + + if (mp_init_multi(&i1, &res, NULL, NULL, NULL, NULL) != MP_OKAY) { + ret = MP_INIT_E; + break; + } + if (mp_read_unsigned_bin(&i1, I + i, v) != MP_OKAY) + ret = MP_READ_E; + else if (mp_add(&i1, &B1, &res) != MP_OKAY) + ret = MP_ADD_E; + else if ( (outSz = mp_unsigned_bin_size(&res)) < 0) + ret = MP_TO_E; + else { + if (outSz > (int)v) { + /* take off MSB */ + byte tmp[129]; + ret = mp_to_unsigned_bin(&res, tmp); + XMEMCPY(I + i, tmp + 1, v); + } + else if (outSz < (int)v) { + XMEMSET(I + i, 0, v - outSz); + ret = mp_to_unsigned_bin(&res, I + i + v - outSz); + } + else + ret = mp_to_unsigned_bin(&res, I + i); + } + + mp_clear(&i1); + mp_clear(&res); + if (ret < 0) break; + } + + currentLen = min(kLen, (int)u); + XMEMCPY(output, Ai, currentLen); + output += currentLen; + kLen -= currentLen; + mp_clear(&B1); + } + + if (dynamic) XFREE(buffer, 0, DYNAMIC_TYPE_KEY); + +#ifdef CYASSL_SMALL_STACK + XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(B, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + +#undef PBKDF_DIGEST_SIZE + +#endif /* NO_PWDBASED */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c b/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c new file mode 100644 index 00000000..5be47416 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c @@ -0,0 +1,310 @@ +/* rabbit.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_RABBIT + +#include +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifdef BIG_ENDIAN_ORDER + #define LITTLE32(x) ByteReverseWord32(x) +#else + #define LITTLE32(x) (x) +#endif + +#define U32V(x) ((word32)(x) & 0xFFFFFFFFU) + + +/* Square a 32-bit unsigned integer to obtain the 64-bit result and return */ +/* the upper 32 bits XOR the lower 32 bits */ +static word32 RABBIT_g_func(word32 x) +{ + /* Temporary variables */ + word32 a, b, h, l; + + /* Construct high and low argument for squaring */ + a = x&0xFFFF; + b = x>>16; + + /* Calculate high and low result of squaring */ + h = (((U32V(a*a)>>17) + U32V(a*b))>>15) + b*b; + l = x*x; + + /* Return high XOR low */ + return U32V(h^l); +} + + +/* Calculate the next internal state */ +static void RABBIT_next_state(RabbitCtx* ctx) +{ + /* Temporary variables */ + word32 g[8], c_old[8], i; + + /* Save old counter values */ + for (i=0; i<8; i++) + c_old[i] = ctx->c[i]; + + /* Calculate new counter values */ + ctx->c[0] = U32V(ctx->c[0] + 0x4D34D34D + ctx->carry); + ctx->c[1] = U32V(ctx->c[1] + 0xD34D34D3 + (ctx->c[0] < c_old[0])); + ctx->c[2] = U32V(ctx->c[2] + 0x34D34D34 + (ctx->c[1] < c_old[1])); + ctx->c[3] = U32V(ctx->c[3] + 0x4D34D34D + (ctx->c[2] < c_old[2])); + ctx->c[4] = U32V(ctx->c[4] + 0xD34D34D3 + (ctx->c[3] < c_old[3])); + ctx->c[5] = U32V(ctx->c[5] + 0x34D34D34 + (ctx->c[4] < c_old[4])); + ctx->c[6] = U32V(ctx->c[6] + 0x4D34D34D + (ctx->c[5] < c_old[5])); + ctx->c[7] = U32V(ctx->c[7] + 0xD34D34D3 + (ctx->c[6] < c_old[6])); + ctx->carry = (ctx->c[7] < c_old[7]); + + /* Calculate the g-values */ + for (i=0;i<8;i++) + g[i] = RABBIT_g_func(U32V(ctx->x[i] + ctx->c[i])); + + /* Calculate new state values */ + ctx->x[0] = U32V(g[0] + rotlFixed(g[7],16) + rotlFixed(g[6], 16)); + ctx->x[1] = U32V(g[1] + rotlFixed(g[0], 8) + g[7]); + ctx->x[2] = U32V(g[2] + rotlFixed(g[1],16) + rotlFixed(g[0], 16)); + ctx->x[3] = U32V(g[3] + rotlFixed(g[2], 8) + g[1]); + ctx->x[4] = U32V(g[4] + rotlFixed(g[3],16) + rotlFixed(g[2], 16)); + ctx->x[5] = U32V(g[5] + rotlFixed(g[4], 8) + g[3]); + ctx->x[6] = U32V(g[6] + rotlFixed(g[5],16) + rotlFixed(g[4], 16)); + ctx->x[7] = U32V(g[7] + rotlFixed(g[6], 8) + g[5]); +} + + +/* IV setup */ +static void RabbitSetIV(Rabbit* ctx, const byte* inIv) +{ + /* Temporary variables */ + word32 i0, i1, i2, i3, i; + word32 iv[2]; + + if (inIv) + XMEMCPY(iv, inIv, sizeof(iv)); + else + XMEMSET(iv, 0, sizeof(iv)); + + /* Generate four subvectors */ + i0 = LITTLE32(iv[0]); + i2 = LITTLE32(iv[1]); + i1 = (i0>>16) | (i2&0xFFFF0000); + i3 = (i2<<16) | (i0&0x0000FFFF); + + /* Modify counter values */ + ctx->workCtx.c[0] = ctx->masterCtx.c[0] ^ i0; + ctx->workCtx.c[1] = ctx->masterCtx.c[1] ^ i1; + ctx->workCtx.c[2] = ctx->masterCtx.c[2] ^ i2; + ctx->workCtx.c[3] = ctx->masterCtx.c[3] ^ i3; + ctx->workCtx.c[4] = ctx->masterCtx.c[4] ^ i0; + ctx->workCtx.c[5] = ctx->masterCtx.c[5] ^ i1; + ctx->workCtx.c[6] = ctx->masterCtx.c[6] ^ i2; + ctx->workCtx.c[7] = ctx->masterCtx.c[7] ^ i3; + + /* Copy state variables */ + for (i=0; i<8; i++) + ctx->workCtx.x[i] = ctx->masterCtx.x[i]; + ctx->workCtx.carry = ctx->masterCtx.carry; + + /* Iterate the system four times */ + for (i=0; i<4; i++) + RABBIT_next_state(&(ctx->workCtx)); +} + + +/* Key setup */ +static INLINE int DoKey(Rabbit* ctx, const byte* key, const byte* iv) +{ + /* Temporary variables */ + word32 k0, k1, k2, k3, i; + + /* Generate four subkeys */ + k0 = LITTLE32(*(word32*)(key+ 0)); + k1 = LITTLE32(*(word32*)(key+ 4)); + k2 = LITTLE32(*(word32*)(key+ 8)); + k3 = LITTLE32(*(word32*)(key+12)); + + /* Generate initial state variables */ + ctx->masterCtx.x[0] = k0; + ctx->masterCtx.x[2] = k1; + ctx->masterCtx.x[4] = k2; + ctx->masterCtx.x[6] = k3; + ctx->masterCtx.x[1] = U32V(k3<<16) | (k2>>16); + ctx->masterCtx.x[3] = U32V(k0<<16) | (k3>>16); + ctx->masterCtx.x[5] = U32V(k1<<16) | (k0>>16); + ctx->masterCtx.x[7] = U32V(k2<<16) | (k1>>16); + + /* Generate initial counter values */ + ctx->masterCtx.c[0] = rotlFixed(k2, 16); + ctx->masterCtx.c[2] = rotlFixed(k3, 16); + ctx->masterCtx.c[4] = rotlFixed(k0, 16); + ctx->masterCtx.c[6] = rotlFixed(k1, 16); + ctx->masterCtx.c[1] = (k0&0xFFFF0000) | (k1&0xFFFF); + ctx->masterCtx.c[3] = (k1&0xFFFF0000) | (k2&0xFFFF); + ctx->masterCtx.c[5] = (k2&0xFFFF0000) | (k3&0xFFFF); + ctx->masterCtx.c[7] = (k3&0xFFFF0000) | (k0&0xFFFF); + + /* Clear carry bit */ + ctx->masterCtx.carry = 0; + + /* Iterate the system four times */ + for (i=0; i<4; i++) + RABBIT_next_state(&(ctx->masterCtx)); + + /* Modify the counters */ + for (i=0; i<8; i++) + ctx->masterCtx.c[i] ^= ctx->masterCtx.x[(i+4)&0x7]; + + /* Copy master instance to work instance */ + for (i=0; i<8; i++) { + ctx->workCtx.x[i] = ctx->masterCtx.x[i]; + ctx->workCtx.c[i] = ctx->masterCtx.c[i]; + } + ctx->workCtx.carry = ctx->masterCtx.carry; + + RabbitSetIV(ctx, iv); + + return 0; +} + + +/* Key setup */ +int RabbitSetKey(Rabbit* ctx, const byte* key, const byte* iv) +{ +#ifdef XSTREAM_ALIGN + if ((word)key % 4) { + int alignKey[4]; + + /* iv aligned in SetIV */ + CYASSL_MSG("RabbitSetKey unaligned key"); + + XMEMCPY(alignKey, key, sizeof(alignKey)); + + return DoKey(ctx, (const byte*)alignKey, iv); + } +#endif /* XSTREAM_ALIGN */ + + return DoKey(ctx, key, iv); +} + + +/* Encrypt/decrypt a message of any size */ +static INLINE int DoProcess(Rabbit* ctx, byte* output, const byte* input, + word32 msglen) +{ + /* Encrypt/decrypt all full blocks */ + while (msglen >= 16) { + /* Iterate the system */ + RABBIT_next_state(&(ctx->workCtx)); + + /* Encrypt/decrypt 16 bytes of data */ + *(word32*)(output+ 0) = *(word32*)(input+ 0) ^ + LITTLE32(ctx->workCtx.x[0] ^ (ctx->workCtx.x[5]>>16) ^ + U32V(ctx->workCtx.x[3]<<16)); + *(word32*)(output+ 4) = *(word32*)(input+ 4) ^ + LITTLE32(ctx->workCtx.x[2] ^ (ctx->workCtx.x[7]>>16) ^ + U32V(ctx->workCtx.x[5]<<16)); + *(word32*)(output+ 8) = *(word32*)(input+ 8) ^ + LITTLE32(ctx->workCtx.x[4] ^ (ctx->workCtx.x[1]>>16) ^ + U32V(ctx->workCtx.x[7]<<16)); + *(word32*)(output+12) = *(word32*)(input+12) ^ + LITTLE32(ctx->workCtx.x[6] ^ (ctx->workCtx.x[3]>>16) ^ + U32V(ctx->workCtx.x[1]<<16)); + + /* Increment pointers and decrement length */ + input += 16; + output += 16; + msglen -= 16; + } + + /* Encrypt/decrypt remaining data */ + if (msglen) { + + word32 i; + word32 tmp[4]; + byte* buffer = (byte*)tmp; + + XMEMSET(tmp, 0, sizeof(tmp)); /* help static analysis */ + + /* Iterate the system */ + RABBIT_next_state(&(ctx->workCtx)); + + /* Generate 16 bytes of pseudo-random data */ + tmp[0] = LITTLE32(ctx->workCtx.x[0] ^ + (ctx->workCtx.x[5]>>16) ^ U32V(ctx->workCtx.x[3]<<16)); + tmp[1] = LITTLE32(ctx->workCtx.x[2] ^ + (ctx->workCtx.x[7]>>16) ^ U32V(ctx->workCtx.x[5]<<16)); + tmp[2] = LITTLE32(ctx->workCtx.x[4] ^ + (ctx->workCtx.x[1]>>16) ^ U32V(ctx->workCtx.x[7]<<16)); + tmp[3] = LITTLE32(ctx->workCtx.x[6] ^ + (ctx->workCtx.x[3]>>16) ^ U32V(ctx->workCtx.x[1]<<16)); + + /* Encrypt/decrypt the data */ + for (i=0; i +#endif + +#include + +/* on HPUX 11 you may need to install /dev/random see + http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I + +*/ + +#include +#include + +#ifdef NO_RC4 + #include + + #ifdef NO_INLINE + #include + #else + #define MISC_DUMM_FUNC misc_dummy_random + #include + #endif +#endif + +#if defined(USE_WINDOWS_API) + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif + #include + #include +#else + #if !defined(NO_DEV_RANDOM) && !defined(CYASSL_MDK_ARM) \ + && !defined(CYASSL_IAR_ARM) + #include + #ifndef EBSNET + #include + #endif + #else + /* include headers that may be needed to get good seed */ + #endif +#endif /* USE_WINDOWS_API */ + + +#ifdef NO_RC4 + +/* Start NIST DRBG code */ + +#define OUTPUT_BLOCK_LEN (256/8) +#define MAX_REQUEST_LEN (0x1000) +#define MAX_STRING_LEN (0x100000000) +#define RESEED_MAX (0x100000000000LL) +#define ENTROPY_SZ 256 + +#define DBRG_SUCCESS 0 +#define DBRG_ERROR 1 +#define DBRG_NEED_RESEED 2 + + +enum { + dbrgInitC = 0, + dbrgReseed = 1, + dbrgGenerateW = 2, + dbrgGenerateH = 3, + dbrgInitV +}; + + +static int Hash_df(RNG* rng, byte* out, word32 outSz, byte type, byte* inA, word32 inASz, + byte* inB, word32 inBSz, byte* inC, word32 inCSz) +{ + byte ctr; + int i; + int len; + word32 bits = (outSz * 8); /* reverse byte order */ + + #ifdef LITTLE_ENDIAN_ORDER + bits = ByteReverseWord32(bits); + #endif + len = (outSz / SHA256_DIGEST_SIZE) + + ((outSz % SHA256_DIGEST_SIZE) ? 1 : 0); + + for (i = 0, ctr = 1; i < len; i++, ctr++) + { + if (InitSha256(&rng->sha) != 0) + return DBRG_ERROR; + + if (Sha256Update(&rng->sha, &ctr, sizeof(ctr)) != 0) + return DBRG_ERROR; + + if (Sha256Update(&rng->sha, (byte*)&bits, sizeof(bits)) != 0) + return DBRG_ERROR; + + /* churning V is the only string that doesn't have + * the type added */ + if (type != dbrgInitV) + if (Sha256Update(&rng->sha, &type, sizeof(type)) != 0) + return DBRG_ERROR; + + if (Sha256Update(&rng->sha, inA, inASz) != 0) + return DBRG_ERROR; + + if (inB != NULL && inBSz > 0) + if (Sha256Update(&rng->sha, inB, inBSz) != 0) + return DBRG_ERROR; + + if (inC != NULL && inCSz > 0) + if (Sha256Update(&rng->sha, inC, inCSz) != 0) + return DBRG_ERROR; + + if (Sha256Final(&rng->sha, rng->digest) != 0) + return DBRG_ERROR; + + if (outSz > SHA256_DIGEST_SIZE) { + XMEMCPY(out, rng->digest, SHA256_DIGEST_SIZE); + outSz -= SHA256_DIGEST_SIZE; + out += SHA256_DIGEST_SIZE; + } + else { + XMEMCPY(out, rng->digest, outSz); + } + } + + return DBRG_SUCCESS; +} + + +static int Hash_DBRG_Reseed(RNG* rng, byte* entropy, word32 entropySz) +{ + int ret; + byte seed[DBRG_SEED_LEN]; + + ret = Hash_df(rng, seed, sizeof(seed), dbrgInitV, rng->V, sizeof(rng->V), + entropy, entropySz, NULL, 0); + if (ret != 0) + return ret; + + XMEMCPY(rng->V, seed, sizeof(rng->V)); + XMEMSET(seed, 0, sizeof(seed)); + + ret = Hash_df(rng, rng->C, sizeof(rng->C), dbrgInitC, rng->V, + sizeof(rng->V), NULL, 0, NULL, 0); + if (ret != 0) + return ret; + + rng->reseed_ctr = 1; + return 0; +} + +static INLINE void array_add_one(byte* data, word32 dataSz) +{ + int i; + + for (i = dataSz - 1; i >= 0; i--) + { + data[i]++; + if (data[i] != 0) break; + } +} + +static int Hash_gen(RNG* rng, byte* out, word32 outSz, byte* V) +{ + byte data[DBRG_SEED_LEN]; + int i, ret; + int len = (outSz / SHA256_DIGEST_SIZE) + + ((outSz % SHA256_DIGEST_SIZE) ? 1 : 0); + + XMEMCPY(data, V, sizeof(data)); + for (i = 0; i < len; i++) { + ret = InitSha256(&rng->sha); + if (ret != 0) + return ret; + + ret = Sha256Update(&rng->sha, data, sizeof(data)); + if (ret != 0) + return ret; + + ret = Sha256Final(&rng->sha, rng->digest); + if (ret != 0) + return ret; + + if (outSz > SHA256_DIGEST_SIZE) { + XMEMCPY(out, rng->digest, SHA256_DIGEST_SIZE); + outSz -= SHA256_DIGEST_SIZE; + out += SHA256_DIGEST_SIZE; + array_add_one(data, DBRG_SEED_LEN); + } + else { + XMEMCPY(out, rng->digest, outSz); + } + } + XMEMSET(data, 0, sizeof(data)); + + return 0; +} + + +static INLINE void array_add(byte* d, word32 dLen, byte* s, word32 sLen) +{ + word16 carry = 0; + + if (dLen > 0 && sLen > 0 && dLen >= sLen) { + int sIdx, dIdx; + + for (sIdx = sLen - 1, dIdx = dLen - 1; sIdx >= 0; dIdx--, sIdx--) + { + carry += d[dIdx] + s[sIdx]; + d[dIdx] = carry; + carry >>= 8; + } + if (dIdx > 0) + d[dIdx] += carry; + } +} + + +static int Hash_DBRG_Generate(RNG* rng, byte* out, word32 outSz) +{ + int ret; + + if (rng->reseed_ctr != RESEED_MAX) { + byte type = dbrgGenerateH; + + if (Hash_gen(rng, out, outSz, rng->V) != 0) + return DBRG_ERROR; + if (InitSha256(&rng->sha) != 0) + return DBRG_ERROR; + if (Sha256Update(&rng->sha, &type, sizeof(type)) != 0) + return DBRG_ERROR; + if (Sha256Update(&rng->sha, rng->V, sizeof(rng->V)) != 0) + return DBRG_ERROR; + if (Sha256Final(&rng->sha, rng->digest) != 0) + return DBRG_ERROR; + + array_add(rng->V, sizeof(rng->V), rng->digest, sizeof(rng->digest)); + array_add(rng->V, sizeof(rng->V), rng->C, sizeof(rng->C)); + array_add(rng->V, sizeof(rng->V), + (byte*)&rng->reseed_ctr, sizeof(rng->reseed_ctr)); + rng->reseed_ctr++; + ret = DBRG_SUCCESS; + } + else { + ret = DBRG_NEED_RESEED; + } + return ret; +} + + +static int Hash_DBRG_Instantiate(RNG* rng, byte* seed, word32 seedSz) +{ + int ret; + + XMEMSET(rng, 0, sizeof(*rng)); + ret = Hash_df(rng, rng->V, sizeof(rng->V), dbrgInitV, seed, seedSz, NULL, 0, + NULL, 0); + if (ret != 0) + return ret; + + ret = Hash_df(rng, rng->C, sizeof(rng->C), dbrgInitC, rng->V, + sizeof(rng->V), NULL, 0, NULL, 0); + if (ret != 0) + return ret; + + rng->reseed_ctr = 1; + + return 0; +} + + +static int Hash_DBRG_Uninstantiate(RNG* rng) +{ + int result = DBRG_ERROR; + + if (rng != NULL) { + XMEMSET(rng, 0, sizeof(*rng)); + result = DBRG_SUCCESS; + } + + return result; +} + +/* End NIST DRBG Code */ + + + +/* Get seed and key cipher */ +int InitRng(RNG* rng) +{ +#ifdef CYASSL_SMALL_STACK + byte* entropy; +#else + byte entropy[ENTROPY_SZ]; +#endif + int ret = DBRG_ERROR; + +#ifdef CYASSL_SMALL_STACK + entropy = (byte*)XMALLOC(ENTROPY_SZ, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (entropy == NULL) + return MEMORY_E; +#endif + + if (GenerateSeed(&rng->seed, entropy, ENTROPY_SZ) == 0) + ret = Hash_DBRG_Instantiate(rng, entropy, ENTROPY_SZ); + + XMEMSET(entropy, 0, ENTROPY_SZ); + +#ifdef CYASSL_SMALL_STACK + XFREE(entropy, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + + +/* place a generated block in output */ +int RNG_GenerateBlock(RNG* rng, byte* output, word32 sz) +{ + int ret; + + XMEMSET(output, 0, sz); + ret = Hash_DBRG_Generate(rng, output, sz); + + if (ret == DBRG_NEED_RESEED) { +#ifdef CYASSL_SMALL_STACK + byte* entropy; +#else + byte entropy[ENTROPY_SZ]; +#endif + +#ifdef CYASSL_SMALL_STACK + entropy = (byte*)XMALLOC(ENTROPY_SZ, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (entropy == NULL) + return MEMORY_E; +#endif + + ret = GenerateSeed(&rng->seed, entropy, ENTROPY_SZ); + if (ret == 0) { + ret = Hash_DBRG_Reseed(rng, entropy, ENTROPY_SZ); + + if (ret == 0) + ret = Hash_DBRG_Generate(rng, output, sz); + } + else + ret = DBRG_ERROR; + + XMEMSET(entropy, 0, ENTROPY_SZ); + +#ifdef CYASSL_SMALL_STACK + XFREE(entropy, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + } + + return ret; +} + + +int RNG_GenerateByte(RNG* rng, byte* b) +{ + return RNG_GenerateBlock(rng, b, 1); +} + + +void FreeRng(RNG* rng) +{ + Hash_DBRG_Uninstantiate(rng); +} + +#else /* NO_RC4 */ + +/* Get seed and key cipher */ +int InitRng(RNG* rng) +{ + int ret; +#ifdef CYASSL_SMALL_STACK + byte* key; + byte* junk; +#else + byte key[32]; + byte junk[256]; +#endif + +#ifdef HAVE_CAVIUM + if (rng->magic == CYASSL_RNG_CAVIUM_MAGIC) + return 0; +#endif + +#ifdef CYASSL_SMALL_STACK + key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (key == NULL) + return MEMORY_E; + + junk = (byte*)XMALLOC(256, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (junk == NULL) { + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); + return MEMORY_E; + } +#endif + + ret = GenerateSeed(&rng->seed, key, 32); + + if (ret == 0) { + Arc4SetKey(&rng->cipher, key, sizeof(key)); + + ret = RNG_GenerateBlock(rng, junk, 256); /*rid initial state*/ + } + +#ifdef CYASSL_SMALL_STACK + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(junk, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return ret; +} + +#ifdef HAVE_CAVIUM + static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz); +#endif + +/* place a generated block in output */ +int RNG_GenerateBlock(RNG* rng, byte* output, word32 sz) +{ +#ifdef HAVE_CAVIUM + if (rng->magic == CYASSL_RNG_CAVIUM_MAGIC) + return CaviumRNG_GenerateBlock(rng, output, sz); +#endif + XMEMSET(output, 0, sz); + Arc4Process(&rng->cipher, output, output, sz); + + return 0; +} + + +int RNG_GenerateByte(RNG* rng, byte* b) +{ + return RNG_GenerateBlock(rng, b, 1); +} + + +#ifdef HAVE_CAVIUM + +#include +#include "cavium_common.h" + +/* Initiliaze RNG for use with Nitrox device */ +int InitRngCavium(RNG* rng, int devId) +{ + if (rng == NULL) + return -1; + + rng->devId = devId; + rng->magic = CYASSL_RNG_CAVIUM_MAGIC; + + return 0; +} + + +static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz) +{ + word offset = 0; + word32 requestId; + + while (sz > CYASSL_MAX_16BIT) { + word16 slen = (word16)CYASSL_MAX_16BIT; + if (CspRandom(CAVIUM_BLOCKING, slen, output + offset, &requestId, + rng->devId) != 0) { + CYASSL_MSG("Cavium RNG failed"); + } + sz -= CYASSL_MAX_16BIT; + offset += CYASSL_MAX_16BIT; + } + if (sz) { + word16 slen = (word16)sz; + if (CspRandom(CAVIUM_BLOCKING, slen, output + offset, &requestId, + rng->devId) != 0) { + CYASSL_MSG("Cavium RNG failed"); + } + } +} + +#endif /* HAVE_CAVIUM */ + +#endif /* NO_RC4 */ + + +#if defined(USE_WINDOWS_API) + + +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + if(!CryptAcquireContext(&os->handle, 0, 0, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT)) + return WINCRYPT_E; + + if (!CryptGenRandom(os->handle, sz, output)) + return CRYPTGEN_E; + + CryptReleaseContext(os->handle, 0); + + return 0; +} + + +#elif defined(HAVE_RTP_SYS) || defined(EBSNET) + +#include "rtprand.h" /* rtp_rand () */ +#include "rtptime.h" /* rtp_get_system_msec() */ + + +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + int i; + rtp_srand(rtp_get_system_msec()); + + for (i = 0; i < sz; i++ ) { + output[i] = rtp_rand() % 256; + if ( (i % 8) == 7) + rtp_srand(rtp_get_system_msec()); + } + + return 0; +} + + +#elif defined(MICRIUM) + +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + NetSecure_InitSeed(output, sz); + #endif + return 0; +} + +#elif defined(MBED) + +/* write a real one !!!, just for testing board */ +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + int i; + for (i = 0; i < sz; i++ ) + output[i] = i; + + return 0; +} + +#elif defined(MICROCHIP_PIC32) + +#ifdef MICROCHIP_MPLAB_HARMONY + #define PIC32_SEED_COUNT _CP0_GET_COUNT +#else + #if !defined(CYASSL_MICROCHIP_PIC32MZ) + #include + #endif + #define PIC32_SEED_COUNT ReadCoreTimer +#endif + #ifdef CYASSL_MIC32MZ_RNG + #include "xc.h" + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i ; + byte rnd[8] ; + word32 *rnd32 = (word32 *)rnd ; + word32 size = sz ; + byte* op = output ; + + /* This part has to be replaced with better random seed */ + RNGNUMGEN1 = ReadCoreTimer(); + RNGPOLY1 = ReadCoreTimer(); + RNGPOLY2 = ReadCoreTimer(); + RNGNUMGEN2 = ReadCoreTimer(); +#ifdef DEBUG_CYASSL + printf("GenerateSeed::Seed=%08x, %08x\n", RNGNUMGEN1, RNGNUMGEN2) ; +#endif + RNGCONbits.PLEN = 0x40; + RNGCONbits.PRNGEN = 1; + for(i=0; i<5; i++) { /* wait for RNGNUMGEN ready */ + volatile int x ; + x = RNGNUMGEN1 ; + x = RNGNUMGEN2 ; + } + do { + rnd32[0] = RNGNUMGEN1; + rnd32[1] = RNGNUMGEN2; + + for(i=0; i<8; i++, op++) { + *op = rnd[i] ; + size -- ; + if(size==0)break ; + } + } while(size) ; + return 0; + } + #else /* CYASSL_MIC32MZ_RNG */ + /* uses the core timer, in nanoseconds to seed srand */ + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + srand(PIC32_SEED_COUNT() * 25); + + for (i = 0; i < sz; i++ ) { + output[i] = rand() % 256; + if ( (i % 8) == 7) + srand(PIC32_SEED_COUNT() * 25); + } + return 0; + } + #endif /* CYASSL_MIC32MZ_RNG */ + +#elif defined(FREESCALE_MQX) + + #ifdef FREESCALE_K70_RNGA + /* + * Generates a RNG seed using the Random Number Generator Accelerator + * on the Kinetis K70. Documentation located in Chapter 37 of + * K70 Sub-Family Reference Manual (see Note 3 in the README for link). + */ + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + + /* turn on RNGA module */ + SIM_SCGC3 |= SIM_SCGC3_RNGA_MASK; + + /* set SLP bit to 0 - "RNGA is not in sleep mode" */ + RNG_CR &= ~RNG_CR_SLP_MASK; + + /* set HA bit to 1 - "security violations masked" */ + RNG_CR |= RNG_CR_HA_MASK; + + /* set GO bit to 1 - "output register loaded with data" */ + RNG_CR |= RNG_CR_GO_MASK; + + for (i = 0; i < sz; i++) { + + /* wait for RNG FIFO to be full */ + while((RNG_SR & RNG_SR_OREG_LVL(0xF)) == 0) {} + + /* get value */ + output[i] = RNG_OR; + } + + return 0; + } + + #elif defined(FREESCALE_K53_RNGB) + /* + * Generates a RNG seed using the Random Number Generator (RNGB) + * on the Kinetis K53. Documentation located in Chapter 33 of + * K53 Sub-Family Reference Manual (see note in the README for link). + */ + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + + /* turn on RNGB module */ + SIM_SCGC3 |= SIM_SCGC3_RNGB_MASK; + + /* reset RNGB */ + RNG_CMD |= RNG_CMD_SR_MASK; + + /* FIFO generate interrupt, return all zeros on underflow, + * set auto reseed */ + RNG_CR |= (RNG_CR_FUFMOD_MASK | RNG_CR_AR_MASK); + + /* gen seed, clear interrupts, clear errors */ + RNG_CMD |= (RNG_CMD_GS_MASK | RNG_CMD_CI_MASK | RNG_CMD_CE_MASK); + + /* wait for seeding to complete */ + while ((RNG_SR & RNG_SR_SDN_MASK) == 0) {} + + for (i = 0; i < sz; i++) { + + /* wait for a word to be available from FIFO */ + while((RNG_SR & RNG_SR_FIFO_LVL_MASK) == 0) {} + + /* get value */ + output[i] = RNG_OUT; + } + + return 0; + } + + #else + #warning "write a real random seed!!!!, just for testing now" + + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + for (i = 0; i < sz; i++ ) + output[i] = i; + + return 0; + } + #endif /* FREESCALE_K70_RNGA */ + +#elif defined(CYASSL_SAFERTOS) || defined(CYASSL_LEANPSK) \ + || defined(CYASSL_IAR_ARM) + +#warning "write a real random seed!!!!, just for testing now" + +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + word32 i; + for (i = 0; i < sz; i++ ) + output[i] = i; + + (void)os; + + return 0; +} + +#elif defined(STM32F2_RNG) + #undef RNG + #include "stm32f2xx_rng.h" + #include "stm32f2xx_rcc.h" + /* + * Generate a RNG seed using the hardware random number generator + * on the STM32F2. Documentation located in STM32F2xx Standard Peripheral + * Library document (See note in README). + */ + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + + /* enable RNG clock source */ + RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG, ENABLE); + + /* enable RNG peripheral */ + RNG_Cmd(ENABLE); + + for (i = 0; i < sz; i++) { + /* wait until RNG number is ready */ + while(RNG_GetFlagStatus(RNG_FLAG_DRDY)== RESET) { } + + /* get value */ + output[i] = RNG_GetRandomNumber(); + } + + return 0; + } +#elif defined(CYASSL_LPC43xx) || defined(CYASSL_STM32F2xx) + + #warning "write a real random seed!!!!, just for testing now" + + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + + for (i = 0; i < sz; i++ ) + output[i] = i; + + return 0; + } + +#elif defined(CUSTOM_RAND_GENERATE) + + /* Implement your own random generation function + * word32 rand_gen(void); + * #define CUSTOM_RAND_GENERATE rand_gen */ + + int GenerateSeed(OS_Seed* os, byte* output, word32 sz) + { + int i; + + for (i = 0; i < sz; i++ ) + output[i] = CUSTOM_RAND_GENERATE(); + + return 0; + } + +#elif defined(NO_DEV_RANDOM) + +#error "you need to write an os specific GenerateSeed() here" + +/* +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + return 0; +} +*/ + + +#else /* !USE_WINDOWS_API && !HAVE_RPT_SYS && !MICRIUM && !NO_DEV_RANDOM */ + + +/* may block */ +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + int ret = 0; + + os->fd = open("/dev/urandom",O_RDONLY); + if (os->fd == -1) { + /* may still have /dev/random */ + os->fd = open("/dev/random",O_RDONLY); + if (os->fd == -1) + return OPEN_RAN_E; + } + + while (sz) { + int len = (int)read(os->fd, output, sz); + if (len == -1) { + ret = READ_RAN_E; + break; + } + + sz -= len; + output += len; + + if (sz) { +#ifdef BLOCKING + sleep(0); /* context switch */ +#else + ret = RAN_BLOCK_E; + break; +#endif + } + } + close(os->fd); + + return ret; +} + +#endif /* USE_WINDOWS_API */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c b/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c new file mode 100644 index 00000000..69ff9066 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c @@ -0,0 +1,354 @@ +/* ripemd.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef CYASSL_RIPEMD + +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +void InitRipeMd(RipeMd* ripemd) +{ + ripemd->digest[0] = 0x67452301L; + ripemd->digest[1] = 0xEFCDAB89L; + ripemd->digest[2] = 0x98BADCFEL; + ripemd->digest[3] = 0x10325476L; + ripemd->digest[4] = 0xC3D2E1F0L; + + ripemd->buffLen = 0; + ripemd->loLen = 0; + ripemd->hiLen = 0; +} + + +/* for all */ +#define F(x, y, z) (x ^ y ^ z) +#define G(x, y, z) (z ^ (x & (y^z))) +#define H(x, y, z) (z ^ (x | ~y)) +#define I(x, y, z) (y ^ (z & (x^y))) +#define J(x, y, z) (x ^ (y | ~z)) + +#define k0 0 +#define k1 0x5a827999 +#define k2 0x6ed9eba1 +#define k3 0x8f1bbcdc +#define k4 0xa953fd4e +#define k5 0x50a28be6 +#define k6 0x5c4dd124 +#define k7 0x6d703ef3 +#define k8 0x7a6d76e9 +#define k9 0 + +/* for 160 and 320 */ +#define Subround(f, a, b, c, d, e, x, s, k) \ + a += f(b, c, d) + x + k;\ + a = rotlFixed((word32)a, s) + e;\ + c = rotlFixed((word32)c, 10U) + +static void Transform(RipeMd* ripemd) +{ + word32 a1, b1, c1, d1, e1, a2, b2, c2, d2, e2; + a1 = a2 = ripemd->digest[0]; + b1 = b2 = ripemd->digest[1]; + c1 = c2 = ripemd->digest[2]; + d1 = d2 = ripemd->digest[3]; + e1 = e2 = ripemd->digest[4]; + + Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 11, k0); + Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[ 1], 14, k0); + Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[ 2], 15, k0); + Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[ 3], 12, k0); + Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[ 4], 5, k0); + Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[ 5], 8, k0); + Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[ 6], 7, k0); + Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[ 7], 9, k0); + Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 11, k0); + Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[ 9], 13, k0); + Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[10], 14, k0); + Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[11], 15, k0); + Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[12], 6, k0); + Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[13], 7, k0); + Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[14], 9, k0); + Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[15], 8, k0); + + Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 7], 7, k1); + Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[ 4], 6, k1); + Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[13], 8, k1); + Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[ 1], 13, k1); + Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[10], 11, k1); + Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 6], 9, k1); + Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[15], 7, k1); + Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[ 3], 15, k1); + Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[12], 7, k1); + Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 12, k1); + Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 9], 15, k1); + Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[ 5], 9, k1); + Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[ 2], 11, k1); + Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[14], 7, k1); + Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[11], 13, k1); + Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 8], 12, k1); + + Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[ 3], 11, k2); + Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[10], 13, k2); + Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[14], 6, k2); + Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[ 4], 7, k2); + Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 9], 14, k2); + Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[15], 9, k2); + Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 13, k2); + Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[ 1], 15, k2); + Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[ 2], 14, k2); + Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 7], 8, k2); + Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[ 0], 13, k2); + Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[ 6], 6, k2); + Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[13], 5, k2); + Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[11], 12, k2); + Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 7, k2); + Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[12], 5, k2); + + Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 1], 11, k3); + Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[ 9], 12, k3); + Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[11], 14, k3); + Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[10], 15, k3); + Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 0], 14, k3); + Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 15, k3); + Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[12], 9, k3); + Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[ 4], 8, k3); + Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[13], 9, k3); + Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 3], 14, k3); + Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 7], 5, k3); + Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[15], 6, k3); + Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[14], 8, k3); + Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 6, k3); + Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 6], 5, k3); + Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 2], 12, k3); + + Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[ 4], 9, k4); + Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 15, k4); + Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 5, k4); + Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[ 9], 11, k4); + Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[ 7], 6, k4); + Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[12], 8, k4); + Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 2], 13, k4); + Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[10], 12, k4); + Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[14], 5, k4); + Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[ 1], 12, k4); + Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[ 3], 13, k4); + Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 8], 14, k4); + Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[11], 11, k4); + Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[ 6], 8, k4); + Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[15], 5, k4); + Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[13], 6, k4); + + Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[ 5], 8, k5); + Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[14], 9, k5); + Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 7], 9, k5); + Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[ 0], 11, k5); + Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 13, k5); + Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[ 2], 15, k5); + Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[11], 15, k5); + Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 4], 5, k5); + Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[13], 7, k5); + Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 6], 7, k5); + Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[15], 8, k5); + Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 11, k5); + Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 1], 14, k5); + Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[10], 14, k5); + Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 3], 12, k5); + Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[12], 6, k5); + + Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 6], 9, k6); + Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[11], 13, k6); + Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[ 3], 15, k6); + Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[ 7], 7, k6); + Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 12, k6); + Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[13], 8, k6); + Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[ 5], 9, k6); + Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[10], 11, k6); + Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[14], 7, k6); + Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[15], 7, k6); + Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 12, k6); + Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[12], 7, k6); + Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[ 4], 6, k6); + Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 15, k6); + Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[ 1], 13, k6); + Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 2], 11, k6); + + Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[15], 9, k7); + Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 5], 7, k7); + Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[ 1], 15, k7); + Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[ 3], 11, k7); + Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 8, k7); + Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[14], 6, k7); + Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 6], 6, k7); + Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 14, k7); + Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[11], 12, k7); + Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 13, k7); + Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[12], 5, k7); + Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 14, k7); + Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[10], 13, k7); + Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 13, k7); + Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 4], 7, k7); + Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[13], 5, k7); + + Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[ 8], 15, k8); + Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[ 6], 5, k8); + Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 4], 8, k8); + Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 1], 11, k8); + Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[ 3], 14, k8); + Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[11], 14, k8); + Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[15], 6, k8); + Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 14, k8); + Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 5], 6, k8); + Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[12], 9, k8); + Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 12, k8); + Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[13], 9, k8); + Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 9], 12, k8); + Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 5, k8); + Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[10], 15, k8); + Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[14], 8, k8); + + Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[12], 8, k9); + Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[15], 5, k9); + Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[10], 12, k9); + Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 4], 9, k9); + Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 1], 12, k9); + Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[ 5], 5, k9); + Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[ 8], 14, k9); + Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 6, k9); + Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 6], 8, k9); + Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 13, k9); + Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[13], 6, k9); + Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[14], 5, k9); + Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[ 0], 15, k9); + Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 3], 13, k9); + Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 9], 11, k9); + Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[11], 11, k9); + + c1 = ripemd->digest[1] + c1 + d2; + ripemd->digest[1] = ripemd->digest[2] + d1 + e2; + ripemd->digest[2] = ripemd->digest[3] + e1 + a2; + ripemd->digest[3] = ripemd->digest[4] + a1 + b2; + ripemd->digest[4] = ripemd->digest[0] + b1 + c2; + ripemd->digest[0] = c1; +} + + +static INLINE void AddLength(RipeMd* ripemd, word32 len) +{ + word32 tmp = ripemd->loLen; + if ( (ripemd->loLen += len) < tmp) + ripemd->hiLen++; /* carry low to high */ +} + + +void RipeMdUpdate(RipeMd* ripemd, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)ripemd->buffer; + + while (len) { + word32 add = min(len, RIPEMD_BLOCK_SIZE - ripemd->buffLen); + XMEMCPY(&local[ripemd->buffLen], data, add); + + ripemd->buffLen += add; + data += add; + len -= add; + + if (ripemd->buffLen == RIPEMD_BLOCK_SIZE) { + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(ripemd->buffer, ripemd->buffer, + RIPEMD_BLOCK_SIZE); + #endif + Transform(ripemd); + AddLength(ripemd, RIPEMD_BLOCK_SIZE); + ripemd->buffLen = 0; + } + } +} + + +void RipeMdFinal(RipeMd* ripemd, byte* hash) +{ + byte* local = (byte*)ripemd->buffer; + + AddLength(ripemd, ripemd->buffLen); /* before adding pads */ + + local[ripemd->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (ripemd->buffLen > RIPEMD_PAD_SIZE) { + XMEMSET(&local[ripemd->buffLen], 0, RIPEMD_BLOCK_SIZE - ripemd->buffLen); + ripemd->buffLen += RIPEMD_BLOCK_SIZE - ripemd->buffLen; + + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(ripemd->buffer, ripemd->buffer, RIPEMD_BLOCK_SIZE); + #endif + Transform(ripemd); + ripemd->buffLen = 0; + } + XMEMSET(&local[ripemd->buffLen], 0, RIPEMD_PAD_SIZE - ripemd->buffLen); + + /* put lengths in bits */ + ripemd->loLen = ripemd->loLen << 3; + ripemd->hiLen = (ripemd->loLen >> (8*sizeof(ripemd->loLen) - 3)) + + (ripemd->hiLen << 3); + + /* store lengths */ + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(ripemd->buffer, ripemd->buffer, RIPEMD_BLOCK_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + XMEMCPY(&local[RIPEMD_PAD_SIZE], &ripemd->loLen, sizeof(word32)); + XMEMCPY(&local[RIPEMD_PAD_SIZE + sizeof(word32)], &ripemd->hiLen, + sizeof(word32)); + + Transform(ripemd); + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(ripemd->digest, ripemd->digest, RIPEMD_DIGEST_SIZE); + #endif + XMEMCPY(hash, ripemd->digest, RIPEMD_DIGEST_SIZE); + + InitRipeMd(ripemd); /* reset state */ +} + + +#endif /* CYASSL_RIPEMD */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c b/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c new file mode 100644 index 00000000..648d56f1 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c @@ -0,0 +1,834 @@ +/* rsa.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef NO_RSA + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include +#include +#include + +#ifdef SHOW_GEN + #ifdef FREESCALE_MQX + #include + #else + #include + #endif +#endif + +#ifdef HAVE_CAVIUM + static int InitCaviumRsaKey(RsaKey* key, void* heap); + static int FreeCaviumRsaKey(RsaKey* key); + static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); + static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); + static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); + static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); +#endif + +enum { + RSA_PUBLIC_ENCRYPT = 0, + RSA_PUBLIC_DECRYPT = 1, + RSA_PRIVATE_ENCRYPT = 2, + RSA_PRIVATE_DECRYPT = 3, + + RSA_BLOCK_TYPE_1 = 1, + RSA_BLOCK_TYPE_2 = 2, + + RSA_MIN_SIZE = 512, + RSA_MAX_SIZE = 4096, + + RSA_MIN_PAD_SZ = 11 /* seperator + 0 + pad value + 8 pads */ +}; + + +int InitRsaKey(RsaKey* key, void* heap) +{ +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return InitCaviumRsaKey(key, heap); +#endif + + key->type = -1; /* haven't decided yet */ + key->heap = heap; + +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + key->n.dp = key->e.dp = 0; /* public alloc parts */ + + key->d.dp = key->p.dp = 0; /* private alloc parts */ + key->q.dp = key->dP.dp = 0; + key->u.dp = key->dQ.dp = 0; +#endif + + return 0; +} + + +int FreeRsaKey(RsaKey* key) +{ + (void)key; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return FreeCaviumRsaKey(key); +#endif + +/* TomsFastMath doesn't use memory allocation */ +#ifndef USE_FAST_MATH + if (key->type == RSA_PRIVATE) { + mp_clear(&key->u); + mp_clear(&key->dQ); + mp_clear(&key->dP); + mp_clear(&key->q); + mp_clear(&key->p); + mp_clear(&key->d); + } + mp_clear(&key->e); + mp_clear(&key->n); +#endif + + return 0; +} + +static int RsaPad(const byte* input, word32 inputLen, byte* pkcsBlock, + word32 pkcsBlockLen, byte padValue, RNG* rng) +{ + if (inputLen == 0) + return 0; + + pkcsBlock[0] = 0x0; /* set first byte to zero and advance */ + pkcsBlock++; pkcsBlockLen--; + pkcsBlock[0] = padValue; /* insert padValue */ + + if (padValue == RSA_BLOCK_TYPE_1) + /* pad with 0xff bytes */ + XMEMSET(&pkcsBlock[1], 0xFF, pkcsBlockLen - inputLen - 2); + else { + /* pad with non-zero random bytes */ + word32 padLen = pkcsBlockLen - inputLen - 1, i; + int ret = RNG_GenerateBlock(rng, &pkcsBlock[1], padLen); + + if (ret != 0) + return ret; + + /* remove zeros */ + for (i = 1; i < padLen; i++) + if (pkcsBlock[i] == 0) pkcsBlock[i] = 0x01; + } + + pkcsBlock[pkcsBlockLen-inputLen-1] = 0; /* separator */ + XMEMCPY(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen); + + return 0; +} + + +static word32 RsaUnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen, + byte **output, byte padValue) +{ + word32 maxOutputLen = (pkcsBlockLen > 10) ? (pkcsBlockLen - 10) : 0, + invalid = 0, + i = 1, + outputLen; + + if (pkcsBlock[0] != 0x0) /* skip past zero */ + invalid = 1; + pkcsBlock++; pkcsBlockLen--; + + /* Require block type padValue */ + invalid = (pkcsBlock[0] != padValue) || invalid; + + /* skip past the padding until we find the separator */ + while (i maxOutputLen) || invalid; + + if (invalid) { + CYASSL_MSG("RsaUnPad error, bad formatting"); + return 0; + } + + *output = (byte *)(pkcsBlock + i); + return outputLen; +} + + +static int RsaFunction(const byte* in, word32 inLen, byte* out, word32* outLen, + int type, RsaKey* key) +{ + #define ERROR_OUT(x) { ret = x; goto done;} + + mp_int tmp; + int ret = 0; + word32 keyLen, len; + + if (mp_init(&tmp) != MP_OKAY) + return MP_INIT_E; + + if (mp_read_unsigned_bin(&tmp, (byte*)in, inLen) != MP_OKAY) + ERROR_OUT(MP_READ_E); + + if (type == RSA_PRIVATE_DECRYPT || type == RSA_PRIVATE_ENCRYPT) { + #ifdef RSA_LOW_MEM /* half as much memory but twice as slow */ + if (mp_exptmod(&tmp, &key->d, &key->n, &tmp) != MP_OKAY) + ERROR_OUT(MP_EXPTMOD_E); + #else + #define INNER_ERROR_OUT(x) { ret = x; goto inner_done; } + + mp_int tmpa, tmpb; + + if (mp_init(&tmpa) != MP_OKAY) + ERROR_OUT(MP_INIT_E); + + if (mp_init(&tmpb) != MP_OKAY) { + mp_clear(&tmpa); + ERROR_OUT(MP_INIT_E); + } + + /* tmpa = tmp^dP mod p */ + if (mp_exptmod(&tmp, &key->dP, &key->p, &tmpa) != MP_OKAY) + INNER_ERROR_OUT(MP_EXPTMOD_E); + + /* tmpb = tmp^dQ mod q */ + if (mp_exptmod(&tmp, &key->dQ, &key->q, &tmpb) != MP_OKAY) + INNER_ERROR_OUT(MP_EXPTMOD_E); + + /* tmp = (tmpa - tmpb) * qInv (mod p) */ + if (mp_sub(&tmpa, &tmpb, &tmp) != MP_OKAY) + INNER_ERROR_OUT(MP_SUB_E); + + if (mp_mulmod(&tmp, &key->u, &key->p, &tmp) != MP_OKAY) + INNER_ERROR_OUT(MP_MULMOD_E); + + /* tmp = tmpb + q * tmp */ + if (mp_mul(&tmp, &key->q, &tmp) != MP_OKAY) + INNER_ERROR_OUT(MP_MUL_E); + + if (mp_add(&tmp, &tmpb, &tmp) != MP_OKAY) + INNER_ERROR_OUT(MP_ADD_E); + + inner_done: + mp_clear(&tmpa); + mp_clear(&tmpb); + + if (ret != 0) return ret; + + #endif /* RSA_LOW_MEM */ + } + else if (type == RSA_PUBLIC_ENCRYPT || type == RSA_PUBLIC_DECRYPT) { + if (mp_exptmod(&tmp, &key->e, &key->n, &tmp) != MP_OKAY) + ERROR_OUT(MP_EXPTMOD_E); + } + else + ERROR_OUT(RSA_WRONG_TYPE_E); + + keyLen = mp_unsigned_bin_size(&key->n); + if (keyLen > *outLen) + ERROR_OUT(RSA_BUFFER_E); + + len = mp_unsigned_bin_size(&tmp); + + /* pad front w/ zeros to match key length */ + while (len < keyLen) { + *out++ = 0x00; + len++; + } + + *outLen = keyLen; + + /* convert */ + if (mp_to_unsigned_bin(&tmp, out) != MP_OKAY) + ERROR_OUT(MP_TO_E); + +done: + mp_clear(&tmp); + return ret; +} + + +int RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, word32 outLen, + RsaKey* key, RNG* rng) +{ + int sz, ret; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return CaviumRsaPublicEncrypt(in, inLen, out, outLen, key); +#endif + + sz = mp_unsigned_bin_size(&key->n); + if (sz > (int)outLen) + return RSA_BUFFER_E; + + if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) + return RSA_BUFFER_E; + + ret = RsaPad(in, inLen, out, sz, RSA_BLOCK_TYPE_2, rng); + if (ret != 0) + return ret; + + if ((ret = RsaFunction(out, sz, out, &outLen, RSA_PUBLIC_ENCRYPT, key)) < 0) + sz = ret; + + return sz; +} + + +int RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, RsaKey* key) +{ + int plainLen, ret; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) { + ret = CaviumRsaPrivateDecrypt(in, inLen, in, inLen, key); + if (ret > 0) + *out = in; + return ret; + } +#endif + + if ((ret = RsaFunction(in, inLen, in, &inLen, RSA_PRIVATE_DECRYPT, key)) + < 0) { + return ret; + } + + plainLen = RsaUnPad(in, inLen, out, RSA_BLOCK_TYPE_2); + + return plainLen; +} + + +int RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, word32 outLen, + RsaKey* key) +{ + int plainLen, ret; + byte* tmp; + byte* pad = 0; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return CaviumRsaPrivateDecrypt(in, inLen, out, outLen, key); +#endif + + tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); + if (tmp == NULL) { + return MEMORY_E; + } + + XMEMCPY(tmp, in, inLen); + + if ((ret = plainLen = RsaPrivateDecryptInline(tmp, inLen, &pad, key)) + < 0) { + XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); + return ret; + } + if (plainLen > (int)outLen) + plainLen = BAD_FUNC_ARG; + else + XMEMCPY(out, pad, plainLen); + XMEMSET(tmp, 0x00, inLen); + + XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); + return plainLen; +} + + +/* for Rsa Verify */ +int RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key) +{ + int plainLen, ret; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) { + ret = CaviumRsaSSL_Verify(in, inLen, in, inLen, key); + if (ret > 0) + *out = in; + return ret; + } +#endif + + if ((ret = RsaFunction(in, inLen, in, &inLen, RSA_PUBLIC_DECRYPT, key)) + < 0) { + return ret; + } + + plainLen = RsaUnPad(in, inLen, out, RSA_BLOCK_TYPE_1); + + return plainLen; +} + + +int RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen, + RsaKey* key) +{ + int plainLen, ret; + byte* tmp; + byte* pad = 0; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return CaviumRsaSSL_Verify(in, inLen, out, outLen, key); +#endif + + tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); + if (tmp == NULL) { + return MEMORY_E; + } + + XMEMCPY(tmp, in, inLen); + + if ((ret = plainLen = RsaSSL_VerifyInline(tmp, inLen, &pad, key)) + < 0) { + XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); + return ret; + } + + if (plainLen > (int)outLen) + plainLen = BAD_FUNC_ARG; + else + XMEMCPY(out, pad, plainLen); + XMEMSET(tmp, 0x00, inLen); + + XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); + return plainLen; +} + + +/* for Rsa Sign */ +int RsaSSL_Sign(const byte* in, word32 inLen, byte* out, word32 outLen, + RsaKey* key, RNG* rng) +{ + int sz, ret; + +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return CaviumRsaSSL_Sign(in, inLen, out, outLen, key); +#endif + + sz = mp_unsigned_bin_size(&key->n); + if (sz > (int)outLen) + return RSA_BUFFER_E; + + if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) + return RSA_BUFFER_E; + + ret = RsaPad(in, inLen, out, sz, RSA_BLOCK_TYPE_1, rng); + if (ret != 0) + return ret; + + if ((ret = RsaFunction(out, sz, out, &outLen, RSA_PRIVATE_ENCRYPT,key)) < 0) + sz = ret; + + return sz; +} + + +int RsaEncryptSize(RsaKey* key) +{ +#ifdef HAVE_CAVIUM + if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) + return key->c_nSz; +#endif + return mp_unsigned_bin_size(&key->n); +} + + +#ifdef CYASSL_KEY_GEN + +static const int USE_BBS = 1; + +static int rand_prime(mp_int* N, int len, RNG* rng, void* heap) +{ + int err, res, type; + byte* buf; + + (void)heap; + if (N == NULL || rng == NULL) + return BAD_FUNC_ARG; + + /* get type */ + if (len < 0) { + type = USE_BBS; + len = -len; + } else { + type = 0; + } + + /* allow sizes between 2 and 512 bytes for a prime size */ + if (len < 2 || len > 512) { + return BAD_FUNC_ARG; + } + + /* allocate buffer to work with */ + buf = (byte*)XMALLOC(len, heap, DYNAMIC_TYPE_RSA); + if (buf == NULL) { + return MEMORY_E; + } + XMEMSET(buf, 0, len); + + do { +#ifdef SHOW_GEN + printf("."); + fflush(stdout); +#endif + /* generate value */ + err = RNG_GenerateBlock(rng, buf, len); + if (err != 0) { + XFREE(buf, heap, DYNAMIC_TYPE_RSA); + return err; + } + + /* munge bits */ + buf[0] |= 0x80 | 0x40; + buf[len-1] |= 0x01 | ((type & USE_BBS) ? 0x02 : 0x00); + + /* load value */ + if ((err = mp_read_unsigned_bin(N, buf, len)) != MP_OKAY) { + XFREE(buf, heap, DYNAMIC_TYPE_RSA); + return err; + } + + /* test */ + if ((err = mp_prime_is_prime(N, 8, &res)) != MP_OKAY) { + XFREE(buf, heap, DYNAMIC_TYPE_RSA); + return err; + } + } while (res == MP_NO); + +#ifdef LTC_CLEAN_STACK + XMEMSET(buf, 0, len); +#endif + + XFREE(buf, heap, DYNAMIC_TYPE_RSA); + return 0; +} + + +/* Make an RSA key for size bits, with e specified, 65537 is a good e */ +int MakeRsaKey(RsaKey* key, int size, long e, RNG* rng) +{ + mp_int p, q, tmp1, tmp2, tmp3; + int err; + + if (key == NULL || rng == NULL) + return BAD_FUNC_ARG; + + if (size < RSA_MIN_SIZE || size > RSA_MAX_SIZE) + return BAD_FUNC_ARG; + + if (e < 3 || (e & 1) == 0) + return BAD_FUNC_ARG; + + if ((err = mp_init_multi(&p, &q, &tmp1, &tmp2, &tmp3, NULL)) != MP_OKAY) + return err; + + err = mp_set_int(&tmp3, e); + + /* make p */ + if (err == MP_OKAY) { + do { + err = rand_prime(&p, size/16, rng, key->heap); /* size in bytes/2 */ + + if (err == MP_OKAY) + err = mp_sub_d(&p, 1, &tmp1); /* tmp1 = p-1 */ + + if (err == MP_OKAY) + err = mp_gcd(&tmp1, &tmp3, &tmp2); /* tmp2 = gcd(p-1, e) */ + } while (err == MP_OKAY && mp_cmp_d(&tmp2, 1) != 0); /* e divdes p-1 */ + } + + /* make q */ + if (err == MP_OKAY) { + do { + err = rand_prime(&q, size/16, rng, key->heap); /* size in bytes/2 */ + + if (err == MP_OKAY) + err = mp_sub_d(&q, 1, &tmp1); /* tmp1 = q-1 */ + + if (err == MP_OKAY) + err = mp_gcd(&tmp1, &tmp3, &tmp2); /* tmp2 = gcd(q-1, e) */ + } while (err == MP_OKAY && mp_cmp_d(&tmp2, 1) != 0); /* e divdes q-1 */ + } + + if (err == MP_OKAY) + err = mp_init_multi(&key->n, &key->e, &key->d, &key->p, &key->q, NULL); + + if (err == MP_OKAY) + err = mp_init_multi(&key->dP, &key->dQ, &key->u, NULL, NULL, NULL); + + if (err == MP_OKAY) + err = mp_sub_d(&p, 1, &tmp2); /* tmp2 = p-1 */ + + if (err == MP_OKAY) + err = mp_lcm(&tmp1, &tmp2, &tmp1); /* tmp1 = lcm(p-1, q-1),last loop */ + + /* make key */ + if (err == MP_OKAY) + err = mp_set_int(&key->e, e); /* key->e = e */ + + if (err == MP_OKAY) /* key->d = 1/e mod lcm(p-1, q-1) */ + err = mp_invmod(&key->e, &tmp1, &key->d); + + if (err == MP_OKAY) + err = mp_mul(&p, &q, &key->n); /* key->n = pq */ + + if (err == MP_OKAY) + err = mp_sub_d(&p, 1, &tmp1); + + if (err == MP_OKAY) + err = mp_sub_d(&q, 1, &tmp2); + + if (err == MP_OKAY) + err = mp_mod(&key->d, &tmp1, &key->dP); + + if (err == MP_OKAY) + err = mp_mod(&key->d, &tmp2, &key->dQ); + + if (err == MP_OKAY) + err = mp_invmod(&q, &p, &key->u); + + if (err == MP_OKAY) + err = mp_copy(&p, &key->p); + + if (err == MP_OKAY) + err = mp_copy(&q, &key->q); + + if (err == MP_OKAY) + key->type = RSA_PRIVATE; + + mp_clear(&tmp3); + mp_clear(&tmp2); + mp_clear(&tmp1); + mp_clear(&q); + mp_clear(&p); + + if (err != MP_OKAY) { + FreeRsaKey(key); + return err; + } + + return 0; +} + + +#endif /* CYASSL_KEY_GEN */ + + +#ifdef HAVE_CAVIUM + +#include +#include "cavium_common.h" + +/* Initiliaze RSA for use with Nitrox device */ +int RsaInitCavium(RsaKey* rsa, int devId) +{ + if (rsa == NULL) + return -1; + + if (CspAllocContext(CONTEXT_SSL, &rsa->contextHandle, devId) != 0) + return -1; + + rsa->devId = devId; + rsa->magic = CYASSL_RSA_CAVIUM_MAGIC; + + return 0; +} + + +/* Free RSA from use with Nitrox device */ +void RsaFreeCavium(RsaKey* rsa) +{ + if (rsa == NULL) + return; + + CspFreeContext(CONTEXT_SSL, rsa->contextHandle, rsa->devId); + rsa->magic = 0; +} + + +/* Initialize cavium RSA key */ +static int InitCaviumRsaKey(RsaKey* key, void* heap) +{ + if (key == NULL) + return BAD_FUNC_ARG; + + key->heap = heap; + key->type = -1; /* don't know yet */ + + key->c_n = NULL; + key->c_e = NULL; + key->c_d = NULL; + key->c_p = NULL; + key->c_q = NULL; + key->c_dP = NULL; + key->c_dQ = NULL; + key->c_u = NULL; + + key->c_nSz = 0; + key->c_eSz = 0; + key->c_dSz = 0; + key->c_pSz = 0; + key->c_qSz = 0; + key->c_dP_Sz = 0; + key->c_dQ_Sz = 0; + key->c_uSz = 0; + + return 0; +} + + +/* Free cavium RSA key */ +static int FreeCaviumRsaKey(RsaKey* key) +{ + if (key == NULL) + return BAD_FUNC_ARG; + + XFREE(key->c_n, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_e, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_d, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_p, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_q, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_dP, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_dQ, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + XFREE(key->c_u, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); + + return InitCaviumRsaKey(key, key->heap); /* reset pointers */ +} + + +static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key) +{ + word32 requestId; + word32 ret; + + if (key == NULL || in == NULL || out == NULL || outLen < (word32)key->c_nSz) + return -1; + + ret = CspPkcs1v15Enc(CAVIUM_BLOCKING, BT2, key->c_nSz, key->c_eSz, + (word16)inLen, key->c_n, key->c_e, (byte*)in, out, + &requestId, key->devId); + if (ret != 0) { + CYASSL_MSG("Cavium Enc BT2 failed"); + return -1; + } + return key->c_nSz; +} + + +static INLINE void ato16(const byte* c, word16* u16) +{ + *u16 = (c[0] << 8) | (c[1]); +} + + +static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key) +{ + word32 requestId; + word32 ret; + word16 outSz = (word16)outLen; + + if (key == NULL || in == NULL || out == NULL || inLen != (word32)key->c_nSz) + return -1; + + ret = CspPkcs1v15CrtDec(CAVIUM_BLOCKING, BT2, key->c_nSz, key->c_q, + key->c_dQ, key->c_p, key->c_dP, key->c_u, + (byte*)in, &outSz, out, &requestId, key->devId); + if (ret != 0) { + CYASSL_MSG("Cavium CRT Dec BT2 failed"); + return -1; + } + ato16((const byte*)&outSz, &outSz); + + return outSz; +} + + +static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key) +{ + word32 requestId; + word32 ret; + + if (key == NULL || in == NULL || out == NULL || inLen == 0 || outLen < + (word32)key->c_nSz) + return -1; + + ret = CspPkcs1v15CrtEnc(CAVIUM_BLOCKING, BT1, key->c_nSz, (word16)inLen, + key->c_q, key->c_dQ, key->c_p, key->c_dP, key->c_u, + (byte*)in, out, &requestId, key->devId); + if (ret != 0) { + CYASSL_MSG("Cavium CRT Enc BT1 failed"); + return -1; + } + return key->c_nSz; +} + + +static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key) +{ + word32 requestId; + word32 ret; + word16 outSz = (word16)outLen; + + if (key == NULL || in == NULL || out == NULL || inLen != (word32)key->c_nSz) + return -1; + + ret = CspPkcs1v15Dec(CAVIUM_BLOCKING, BT1, key->c_nSz, key->c_eSz, + key->c_n, key->c_e, (byte*)in, &outSz, out, + &requestId, key->devId); + if (ret != 0) { + CYASSL_MSG("Cavium Dec BT1 failed"); + return -1; + } + outSz = ntohs(outSz); + + return outSz; +} + + +#endif /* HAVE_CAVIUM */ + +#endif /* NO_RSA */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha.c new file mode 100644 index 00000000..9797b531 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/sha.c @@ -0,0 +1,395 @@ +/* sha.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if !defined(NO_SHA) + +#ifdef CYASSL_PIC32MZ_HASH +#define InitSha InitSha_sw +#define ShaUpdate ShaUpdate_sw +#define ShaFinal ShaFinal_sw +#endif + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + +#ifdef FREESCALE_MMCAU + #include "cau_api.h" + #define XTRANSFORM(S,B) cau_sha1_hash_n((B), 1, ((S))->digest) +#else + #define XTRANSFORM(S,B) Transform((S)) +#endif + + +#ifdef STM32F2_HASH + /* + * STM32F2 hardware SHA1 support through the STM32F2 standard peripheral + * library. Documentation located in STM32F2xx Standard Peripheral Library + * document (See note in README). + */ + #include "stm32f2xx.h" + #include "stm32f2xx_hash.h" + + int InitSha(Sha* sha) + { + /* STM32F2 struct notes: + * sha->buffer = first 4 bytes used to hold partial block if needed + * sha->buffLen = num bytes currently stored in sha->buffer + * sha->loLen = num bytes that have been written to STM32 FIFO + */ + XMEMSET(sha->buffer, 0, SHA_REG_SIZE); + sha->buffLen = 0; + sha->loLen = 0; + + /* initialize HASH peripheral */ + HASH_DeInit(); + + /* configure algo used, algo mode, datatype */ + HASH->CR &= ~ (HASH_CR_ALGO | HASH_CR_DATATYPE | HASH_CR_MODE); + HASH->CR |= (HASH_AlgoSelection_SHA1 | HASH_AlgoMode_HASH + | HASH_DataType_8b); + + /* reset HASH processor */ + HASH->CR |= HASH_CR_INIT; + + return 0; + } + + int ShaUpdate(Sha* sha, const byte* data, word32 len) + { + word32 i = 0; + word32 fill = 0; + word32 diff = 0; + + /* if saved partial block is available */ + if (sha->buffLen) { + fill = 4 - sha->buffLen; + + /* if enough data to fill, fill and push to FIFO */ + if (fill <= len) { + XMEMCPY((byte*)sha->buffer + sha->buffLen, data, fill); + HASH_DataIn(*(uint32_t*)sha->buffer); + + data += fill; + len -= fill; + sha->loLen += 4; + sha->buffLen = 0; + } else { + /* append partial to existing stored block */ + XMEMCPY((byte*)sha->buffer + sha->buffLen, data, len); + sha->buffLen += len; + return; + } + } + + /* write input block in the IN FIFO */ + for(i = 0; i < len; i += 4) + { + diff = len - i; + if ( diff < 4) { + /* store incomplete last block, not yet in FIFO */ + XMEMSET(sha->buffer, 0, SHA_REG_SIZE); + XMEMCPY((byte*)sha->buffer, data, diff); + sha->buffLen = diff; + } else { + HASH_DataIn(*(uint32_t*)data); + data+=4; + } + } + + /* keep track of total data length thus far */ + sha->loLen += (len - sha->buffLen); + + return 0; + } + + int ShaFinal(Sha* sha, byte* hash) + { + __IO uint16_t nbvalidbitsdata = 0; + + /* finish reading any trailing bytes into FIFO */ + if (sha->buffLen) { + HASH_DataIn(*(uint32_t*)sha->buffer); + sha->loLen += sha->buffLen; + } + + /* calculate number of valid bits in last word of input data */ + nbvalidbitsdata = 8 * (sha->loLen % SHA_REG_SIZE); + + /* configure number of valid bits in last word of the data */ + HASH_SetLastWordValidBitsNbr(nbvalidbitsdata); + + /* start HASH processor */ + HASH_StartDigest(); + + /* wait until Busy flag == RESET */ + while (HASH_GetFlagStatus(HASH_FLAG_BUSY) != RESET) {} + + /* read message digest */ + sha->digest[0] = HASH->HR[0]; + sha->digest[1] = HASH->HR[1]; + sha->digest[2] = HASH->HR[2]; + sha->digest[3] = HASH->HR[3]; + sha->digest[4] = HASH->HR[4]; + + ByteReverseWords(sha->digest, sha->digest, SHA_DIGEST_SIZE); + + XMEMCPY(hash, sha->digest, SHA_DIGEST_SIZE); + + return InitSha(sha); /* reset state */ + } + +#else /* CTaoCrypt software implementation */ + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +int InitSha(Sha* sha) +{ + #ifdef FREESCALE_MMCAU + cau_sha1_initialize_output(sha->digest); + #else + sha->digest[0] = 0x67452301L; + sha->digest[1] = 0xEFCDAB89L; + sha->digest[2] = 0x98BADCFEL; + sha->digest[3] = 0x10325476L; + sha->digest[4] = 0xC3D2E1F0L; + #endif + + sha->buffLen = 0; + sha->loLen = 0; + sha->hiLen = 0; + + return 0; +} + +#ifndef FREESCALE_MMCAU + +#define blk0(i) (W[i] = sha->buffer[i]) +#define blk1(i) (W[i&15] = \ + rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1)) + +#define f1(x,y,z) (z^(x &(y^z))) +#define f2(x,y,z) (x^y^z) +#define f3(x,y,z) ((x&y)|(z&(x|y))) +#define f4(x,y,z) (x^y^z) + +/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ +#define R0(v,w,x,y,z,i) z+= f1(w,x,y) + blk0(i) + 0x5A827999+ \ + rotlFixed(v,5); w = rotlFixed(w,30); +#define R1(v,w,x,y,z,i) z+= f1(w,x,y) + blk1(i) + 0x5A827999+ \ + rotlFixed(v,5); w = rotlFixed(w,30); +#define R2(v,w,x,y,z,i) z+= f2(w,x,y) + blk1(i) + 0x6ED9EBA1+ \ + rotlFixed(v,5); w = rotlFixed(w,30); +#define R3(v,w,x,y,z,i) z+= f3(w,x,y) + blk1(i) + 0x8F1BBCDC+ \ + rotlFixed(v,5); w = rotlFixed(w,30); +#define R4(v,w,x,y,z,i) z+= f4(w,x,y) + blk1(i) + 0xCA62C1D6+ \ + rotlFixed(v,5); w = rotlFixed(w,30); + + +static void Transform(Sha* sha) +{ + word32 W[SHA_BLOCK_SIZE / sizeof(word32)]; + + /* Copy context->state[] to working vars */ + word32 a = sha->digest[0]; + word32 b = sha->digest[1]; + word32 c = sha->digest[2]; + word32 d = sha->digest[3]; + word32 e = sha->digest[4]; + +#ifdef USE_SLOW_SHA + word32 t, i; + + for (i = 0; i < 16; i++) { + R0(a, b, c, d, e, i); + t = e; e = d; d = c; c = b; b = a; a = t; + } + + for (; i < 20; i++) { + R1(a, b, c, d, e, i); + t = e; e = d; d = c; c = b; b = a; a = t; + } + + for (; i < 40; i++) { + R2(a, b, c, d, e, i); + t = e; e = d; d = c; c = b; b = a; a = t; + } + + for (; i < 60; i++) { + R3(a, b, c, d, e, i); + t = e; e = d; d = c; c = b; b = a; a = t; + } + + for (; i < 80; i++) { + R4(a, b, c, d, e, i); + t = e; e = d; d = c; c = b; b = a; a = t; + } +#else + /* nearly 1 K bigger in code size but 25% faster */ + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); + R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); + + R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); + + R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); + + R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); + + R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); +#endif + + /* Add the working vars back into digest state[] */ + sha->digest[0] += a; + sha->digest[1] += b; + sha->digest[2] += c; + sha->digest[3] += d; + sha->digest[4] += e; +} + +#endif /* FREESCALE_MMCAU */ + + +static INLINE void AddLength(Sha* sha, word32 len) +{ + word32 tmp = sha->loLen; + if ( (sha->loLen += len) < tmp) + sha->hiLen++; /* carry low to high */ +} + + +int ShaUpdate(Sha* sha, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)sha->buffer; + + while (len) { + word32 add = min(len, SHA_BLOCK_SIZE - sha->buffLen); + XMEMCPY(&local[sha->buffLen], data, add); + + sha->buffLen += add; + data += add; + len -= add; + + if (sha->buffLen == SHA_BLOCK_SIZE) { + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); + #endif + XTRANSFORM(sha, local); + AddLength(sha, SHA_BLOCK_SIZE); + sha->buffLen = 0; + } + } + + return 0; +} + + +int ShaFinal(Sha* sha, byte* hash) +{ + byte* local = (byte*)sha->buffer; + + AddLength(sha, sha->buffLen); /* before adding pads */ + + local[sha->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (sha->buffLen > SHA_PAD_SIZE) { + XMEMSET(&local[sha->buffLen], 0, SHA_BLOCK_SIZE - sha->buffLen); + sha->buffLen += SHA_BLOCK_SIZE - sha->buffLen; + + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); + #endif + XTRANSFORM(sha, local); + sha->buffLen = 0; + } + XMEMSET(&local[sha->buffLen], 0, SHA_PAD_SIZE - sha->buffLen); + + /* put lengths in bits */ + sha->hiLen = (sha->loLen >> (8*sizeof(sha->loLen) - 3)) + + (sha->hiLen << 3); + sha->loLen = sha->loLen << 3; + + /* store lengths */ + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + XMEMCPY(&local[SHA_PAD_SIZE], &sha->hiLen, sizeof(word32)); + XMEMCPY(&local[SHA_PAD_SIZE + sizeof(word32)], &sha->loLen, sizeof(word32)); + + #ifdef FREESCALE_MMCAU + /* Kinetis requires only these bytes reversed */ + ByteReverseWords(&sha->buffer[SHA_PAD_SIZE/sizeof(word32)], + &sha->buffer[SHA_PAD_SIZE/sizeof(word32)], + 2 * sizeof(word32)); + #endif + + XTRANSFORM(sha, local); + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(sha->digest, sha->digest, SHA_DIGEST_SIZE); + #endif + XMEMCPY(hash, sha->digest, SHA_DIGEST_SIZE); + + return InitSha(sha); /* reset state */ +} + +#endif /* STM32F2_HASH */ + +#endif /* NO_SHA */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c new file mode 100644 index 00000000..2a0d1f97 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c @@ -0,0 +1,287 @@ +/* sha256.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* code submitted by raphael.huck@efixo.com */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if !defined(NO_SHA256) + +#ifdef CYASSL_PIC32MZ_HASH +#define InitSha256 InitSha256_sw +#define Sha256Update Sha256Update_sw +#define Sha256Final Sha256Final_sw +#endif + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + +#ifdef FREESCALE_MMCAU + #include "cau_api.h" +#endif + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +int InitSha256(Sha256* sha256) +{ + #ifdef FREESCALE_MMCAU + cau_sha256_initialize_output(sha256->digest); + #else + sha256->digest[0] = 0x6A09E667L; + sha256->digest[1] = 0xBB67AE85L; + sha256->digest[2] = 0x3C6EF372L; + sha256->digest[3] = 0xA54FF53AL; + sha256->digest[4] = 0x510E527FL; + sha256->digest[5] = 0x9B05688CL; + sha256->digest[6] = 0x1F83D9ABL; + sha256->digest[7] = 0x5BE0CD19L; + #endif + + sha256->buffLen = 0; + sha256->loLen = 0; + sha256->hiLen = 0; + + return 0; +} + +#ifdef FREESCALE_MMCAU + #define XTRANSFORM(S,B) Transform((S), (B)) + +static int Transform(Sha256* sha256, byte* buf) +{ + cau_sha256_hash_n(buf, 1, sha256->digest); + + return 0; +} + +#else + #define XTRANSFORM(S,B) Transform((S)) + +static const word32 K[64] = { + 0x428A2F98L, 0x71374491L, 0xB5C0FBCFL, 0xE9B5DBA5L, 0x3956C25BL, + 0x59F111F1L, 0x923F82A4L, 0xAB1C5ED5L, 0xD807AA98L, 0x12835B01L, + 0x243185BEL, 0x550C7DC3L, 0x72BE5D74L, 0x80DEB1FEL, 0x9BDC06A7L, + 0xC19BF174L, 0xE49B69C1L, 0xEFBE4786L, 0x0FC19DC6L, 0x240CA1CCL, + 0x2DE92C6FL, 0x4A7484AAL, 0x5CB0A9DCL, 0x76F988DAL, 0x983E5152L, + 0xA831C66DL, 0xB00327C8L, 0xBF597FC7L, 0xC6E00BF3L, 0xD5A79147L, + 0x06CA6351L, 0x14292967L, 0x27B70A85L, 0x2E1B2138L, 0x4D2C6DFCL, + 0x53380D13L, 0x650A7354L, 0x766A0ABBL, 0x81C2C92EL, 0x92722C85L, + 0xA2BFE8A1L, 0xA81A664BL, 0xC24B8B70L, 0xC76C51A3L, 0xD192E819L, + 0xD6990624L, 0xF40E3585L, 0x106AA070L, 0x19A4C116L, 0x1E376C08L, + 0x2748774CL, 0x34B0BCB5L, 0x391C0CB3L, 0x4ED8AA4AL, 0x5B9CCA4FL, + 0x682E6FF3L, 0x748F82EEL, 0x78A5636FL, 0x84C87814L, 0x8CC70208L, + 0x90BEFFFAL, 0xA4506CEBL, 0xBEF9A3F7L, 0xC67178F2L +}; + +#define Ch(x,y,z) (z ^ (x & (y ^ z))) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define S(x, n) rotrFixed(x, n) +#define R(x, n) (((x)&0xFFFFFFFFU)>>(n)) +#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) +#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25)) +#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3)) +#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10)) + +#define RND(a,b,c,d,e,f,g,h,i) \ + t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ + t1 = Sigma0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; + + +static int Transform(Sha256* sha256) +{ + word32 S[8], t0, t1; + int i; + +#ifdef CYASSL_SMALL_STACK + word32* W; + + W = (word32*) XMALLOC(sizeof(word32) * 64, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (W == NULL) + return MEMORY_E; +#else + word32 W[64]; +#endif + + /* Copy context->state[] to working vars */ + for (i = 0; i < 8; i++) + S[i] = sha256->digest[i]; + + for (i = 0; i < 16; i++) + W[i] = sha256->buffer[i]; + + for (i = 16; i < 64; i++) + W[i] = Gamma1(W[i-2]) + W[i-7] + Gamma0(W[i-15]) + W[i-16]; + + for (i = 0; i < 64; i += 8) { + RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0); + RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1); + RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2); + RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3); + RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4); + RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5); + RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6); + RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7); + } + + /* Add the working vars back into digest state[] */ + for (i = 0; i < 8; i++) { + sha256->digest[i] += S[i]; + } + +#ifdef CYASSL_SMALL_STACK + XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + +#endif /* FREESCALE_MMCAU */ + + +static INLINE void AddLength(Sha256* sha256, word32 len) +{ + word32 tmp = sha256->loLen; + if ( (sha256->loLen += len) < tmp) + sha256->hiLen++; /* carry low to high */ +} + + +int Sha256Update(Sha256* sha256, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)sha256->buffer; + + while (len) { + word32 add = min(len, SHA256_BLOCK_SIZE - sha256->buffLen); + XMEMCPY(&local[sha256->buffLen], data, add); + + sha256->buffLen += add; + data += add; + len -= add; + + if (sha256->buffLen == SHA256_BLOCK_SIZE) { + int ret; + + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha256->buffer, sha256->buffer, + SHA256_BLOCK_SIZE); + #endif + + ret = XTRANSFORM(sha256, local); + if (ret != 0) + return ret; + + AddLength(sha256, SHA256_BLOCK_SIZE); + sha256->buffLen = 0; + } + } + + return 0; +} + + +int Sha256Final(Sha256* sha256, byte* hash) +{ + byte* local = (byte*)sha256->buffer; + int ret; + + AddLength(sha256, sha256->buffLen); /* before adding pads */ + + local[sha256->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (sha256->buffLen > SHA256_PAD_SIZE) { + XMEMSET(&local[sha256->buffLen], 0, SHA256_BLOCK_SIZE - sha256->buffLen); + sha256->buffLen += SHA256_BLOCK_SIZE - sha256->buffLen; + + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha256->buffer, sha256->buffer, SHA256_BLOCK_SIZE); + #endif + + ret = XTRANSFORM(sha256, local); + if (ret != 0) + return ret; + + sha256->buffLen = 0; + } + XMEMSET(&local[sha256->buffLen], 0, SHA256_PAD_SIZE - sha256->buffLen); + + /* put lengths in bits */ + sha256->hiLen = (sha256->loLen >> (8*sizeof(sha256->loLen) - 3)) + + (sha256->hiLen << 3); + sha256->loLen = sha256->loLen << 3; + + /* store lengths */ + #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) + ByteReverseWords(sha256->buffer, sha256->buffer, SHA256_BLOCK_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + XMEMCPY(&local[SHA256_PAD_SIZE], &sha256->hiLen, sizeof(word32)); + XMEMCPY(&local[SHA256_PAD_SIZE + sizeof(word32)], &sha256->loLen, + sizeof(word32)); + + #ifdef FREESCALE_MMCAU + /* Kinetis requires only these bytes reversed */ + ByteReverseWords(&sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], + &sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], + 2 * sizeof(word32)); + #endif + + ret = XTRANSFORM(sha256, local); + if (ret != 0) + return ret; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords(sha256->digest, sha256->digest, SHA256_DIGEST_SIZE); + #endif + XMEMCPY(hash, sha256->digest, SHA256_DIGEST_SIZE); + + return InitSha256(sha256); /* reset state */ +} + + +#endif /* NO_SHA256 */ + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c new file mode 100644 index 00000000..ceb5a7e7 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c @@ -0,0 +1,475 @@ +/* sha512.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef CYASSL_SHA512 + +#ifdef HAVE_FIPS + /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ + #define FIPS_NO_WRAPPERS +#endif + +#include +#include +#ifdef NO_INLINE + #include +#else + #include +#endif + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +int InitSha512(Sha512* sha512) +{ + sha512->digest[0] = W64LIT(0x6a09e667f3bcc908); + sha512->digest[1] = W64LIT(0xbb67ae8584caa73b); + sha512->digest[2] = W64LIT(0x3c6ef372fe94f82b); + sha512->digest[3] = W64LIT(0xa54ff53a5f1d36f1); + sha512->digest[4] = W64LIT(0x510e527fade682d1); + sha512->digest[5] = W64LIT(0x9b05688c2b3e6c1f); + sha512->digest[6] = W64LIT(0x1f83d9abfb41bd6b); + sha512->digest[7] = W64LIT(0x5be0cd19137e2179); + + sha512->buffLen = 0; + sha512->loLen = 0; + sha512->hiLen = 0; + + return 0; +} + + +static const word64 K512[80] = { + W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd), + W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc), + W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019), + W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118), + W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe), + W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2), + W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1), + W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694), + W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3), + W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65), + W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483), + W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5), + W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210), + W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4), + W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725), + W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70), + W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926), + W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df), + W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8), + W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b), + W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001), + W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30), + W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910), + W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8), + W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53), + W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8), + W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb), + W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3), + W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60), + W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec), + W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9), + W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b), + W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207), + W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178), + W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6), + W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b), + W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493), + W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c), + W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a), + W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817) +}; + + +#define blk0(i) (W[i] = sha512->buffer[i]) +#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#define a(i) T[(0-i)&7] +#define b(i) T[(1-i)&7] +#define c(i) T[(2-i)&7] +#define d(i) T[(3-i)&7] +#define e(i) T[(4-i)&7] +#define f(i) T[(5-i)&7] +#define g(i) T[(6-i)&7] +#define h(i) T[(7-i)&7] + +#define S0(x) (rotrFixed64(x,28)^rotrFixed64(x,34)^rotrFixed64(x,39)) +#define S1(x) (rotrFixed64(x,14)^rotrFixed64(x,18)^rotrFixed64(x,41)) +#define s0(x) (rotrFixed64(x,1)^rotrFixed64(x,8)^(x>>7)) +#define s1(x) (rotrFixed64(x,19)^rotrFixed64(x,61)^(x>>6)) + +#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\ + d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) + +#define blk384(i) (W[i] = sha384->buffer[i]) + +#define R2(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk384(i));\ + d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) + + +static int Transform(Sha512* sha512) +{ + const word64* K = K512; + + word32 j; + word64 T[8]; + +#ifdef CYASSL_SMALL_STACK + word64* W; + + W = (word64*) XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (W == NULL) + return MEMORY_E; +#else + word64 W[16]; +#endif + + /* Copy digest to working vars */ + XMEMCPY(T, sha512->digest, sizeof(T)); + +#ifdef USE_SLOW_SHA2 + /* over twice as small, but 50% slower */ + /* 80 operations, not unrolled */ + for (j = 0; j < 80; j += 16) { + int m; + for (m = 0; m < 16; m++) { /* braces needed here for macros {} */ + R(m); + } + } +#else + /* 80 operations, partially loop unrolled */ + for (j = 0; j < 80; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } +#endif /* USE_SLOW_SHA2 */ + + /* Add the working vars back into digest */ + + sha512->digest[0] += a(0); + sha512->digest[1] += b(0); + sha512->digest[2] += c(0); + sha512->digest[3] += d(0); + sha512->digest[4] += e(0); + sha512->digest[5] += f(0); + sha512->digest[6] += g(0); + sha512->digest[7] += h(0); + + /* Wipe variables */ + XMEMSET(W, 0, sizeof(word64) * 16); + XMEMSET(T, 0, sizeof(T)); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + + +static INLINE void AddLength(Sha512* sha512, word32 len) +{ + word32 tmp = sha512->loLen; + if ( (sha512->loLen += len) < tmp) + sha512->hiLen++; /* carry low to high */ +} + + +int Sha512Update(Sha512* sha512, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)sha512->buffer; + + while (len) { + word32 add = min(len, SHA512_BLOCK_SIZE - sha512->buffLen); + XMEMCPY(&local[sha512->buffLen], data, add); + + sha512->buffLen += add; + data += add; + len -= add; + + if (sha512->buffLen == SHA512_BLOCK_SIZE) { + int ret; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha512->buffer, sha512->buffer, + SHA512_BLOCK_SIZE); + #endif + ret = Transform(sha512); + if (ret != 0) + return ret; + + AddLength(sha512, SHA512_BLOCK_SIZE); + sha512->buffLen = 0; + } + } + return 0; +} + + +int Sha512Final(Sha512* sha512, byte* hash) +{ + byte* local = (byte*)sha512->buffer; + int ret; + + AddLength(sha512, sha512->buffLen); /* before adding pads */ + + local[sha512->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (sha512->buffLen > SHA512_PAD_SIZE) { + XMEMSET(&local[sha512->buffLen], 0, SHA512_BLOCK_SIZE -sha512->buffLen); + sha512->buffLen += SHA512_BLOCK_SIZE - sha512->buffLen; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha512->buffer,sha512->buffer,SHA512_BLOCK_SIZE); + #endif + ret = Transform(sha512); + if (ret != 0) + return ret; + + sha512->buffLen = 0; + } + XMEMSET(&local[sha512->buffLen], 0, SHA512_PAD_SIZE - sha512->buffLen); + + /* put lengths in bits */ + sha512->hiLen = (sha512->loLen >> (8*sizeof(sha512->loLen) - 3)) + + (sha512->hiLen << 3); + sha512->loLen = sha512->loLen << 3; + + /* store lengths */ + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha512->buffer, sha512->buffer, SHA512_PAD_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + sha512->buffer[SHA512_BLOCK_SIZE / sizeof(word64) - 2] = sha512->hiLen; + sha512->buffer[SHA512_BLOCK_SIZE / sizeof(word64) - 1] = sha512->loLen; + + ret = Transform(sha512); + if (ret != 0) + return ret; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha512->digest, sha512->digest, SHA512_DIGEST_SIZE); + #endif + XMEMCPY(hash, sha512->digest, SHA512_DIGEST_SIZE); + + return InitSha512(sha512); /* reset state */ +} + + + +#ifdef CYASSL_SHA384 + +int InitSha384(Sha384* sha384) +{ + sha384->digest[0] = W64LIT(0xcbbb9d5dc1059ed8); + sha384->digest[1] = W64LIT(0x629a292a367cd507); + sha384->digest[2] = W64LIT(0x9159015a3070dd17); + sha384->digest[3] = W64LIT(0x152fecd8f70e5939); + sha384->digest[4] = W64LIT(0x67332667ffc00b31); + sha384->digest[5] = W64LIT(0x8eb44a8768581511); + sha384->digest[6] = W64LIT(0xdb0c2e0d64f98fa7); + sha384->digest[7] = W64LIT(0x47b5481dbefa4fa4); + + sha384->buffLen = 0; + sha384->loLen = 0; + sha384->hiLen = 0; + + return 0; +} + + +static int Transform384(Sha384* sha384) +{ + const word64* K = K512; + + word32 j; + word64 T[8]; + +#ifdef CYASSL_SMALL_STACK + word64* W; + + W = (word64*) XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (W == NULL) + return MEMORY_E; +#else + word64 W[16]; +#endif + + /* Copy digest to working vars */ + XMEMCPY(T, sha384->digest, sizeof(T)); + +#ifdef USE_SLOW_SHA2 + /* over twice as small, but 50% slower */ + /* 80 operations, not unrolled */ + for (j = 0; j < 80; j += 16) { + int m; + for (m = 0; m < 16; m++) { /* braces needed for macros {} */ + R2(m); + } + } +#else + /* 80 operations, partially loop unrolled */ + for (j = 0; j < 80; j += 16) { + R2( 0); R2( 1); R2( 2); R2( 3); + R2( 4); R2( 5); R2( 6); R2( 7); + R2( 8); R2( 9); R2(10); R2(11); + R2(12); R2(13); R2(14); R2(15); + } +#endif /* USE_SLOW_SHA2 */ + + /* Add the working vars back into digest */ + + sha384->digest[0] += a(0); + sha384->digest[1] += b(0); + sha384->digest[2] += c(0); + sha384->digest[3] += d(0); + sha384->digest[4] += e(0); + sha384->digest[5] += f(0); + sha384->digest[6] += g(0); + sha384->digest[7] += h(0); + + /* Wipe variables */ + XMEMSET(W, 0, sizeof(word64) * 16); + XMEMSET(T, 0, sizeof(T)); + +#ifdef CYASSL_SMALL_STACK + XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + + return 0; +} + + +static INLINE void AddLength384(Sha384* sha384, word32 len) +{ + word32 tmp = sha384->loLen; + if ( (sha384->loLen += len) < tmp) + sha384->hiLen++; /* carry low to high */ +} + + +int Sha384Update(Sha384* sha384, const byte* data, word32 len) +{ + /* do block size increments */ + byte* local = (byte*)sha384->buffer; + + while (len) { + word32 add = min(len, SHA384_BLOCK_SIZE - sha384->buffLen); + XMEMCPY(&local[sha384->buffLen], data, add); + + sha384->buffLen += add; + data += add; + len -= add; + + if (sha384->buffLen == SHA384_BLOCK_SIZE) { + int ret; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha384->buffer, sha384->buffer, + SHA384_BLOCK_SIZE); + #endif + ret = Transform384(sha384); + if (ret != 0) + return ret; + + AddLength384(sha384, SHA384_BLOCK_SIZE); + sha384->buffLen = 0; + } + } + return 0; +} + + +int Sha384Final(Sha384* sha384, byte* hash) +{ + byte* local = (byte*)sha384->buffer; + int ret; + + AddLength384(sha384, sha384->buffLen); /* before adding pads */ + + local[sha384->buffLen++] = 0x80; /* add 1 */ + + /* pad with zeros */ + if (sha384->buffLen > SHA384_PAD_SIZE) { + XMEMSET(&local[sha384->buffLen], 0, SHA384_BLOCK_SIZE -sha384->buffLen); + sha384->buffLen += SHA384_BLOCK_SIZE - sha384->buffLen; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha384->buffer,sha384->buffer,SHA384_BLOCK_SIZE); + #endif + ret = Transform384(sha384); + if (ret != 0) + return ret; + + sha384->buffLen = 0; + } + XMEMSET(&local[sha384->buffLen], 0, SHA384_PAD_SIZE - sha384->buffLen); + + /* put lengths in bits */ + sha384->hiLen = (sha384->loLen >> (8*sizeof(sha384->loLen) - 3)) + + (sha384->hiLen << 3); + sha384->loLen = sha384->loLen << 3; + + /* store lengths */ + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha384->buffer, sha384->buffer, SHA384_PAD_SIZE); + #endif + /* ! length ordering dependent on digest endian type ! */ + sha384->buffer[SHA384_BLOCK_SIZE / sizeof(word64) - 2] = sha384->hiLen; + sha384->buffer[SHA384_BLOCK_SIZE / sizeof(word64) - 1] = sha384->loLen; + + ret = Transform384(sha384); + if (ret != 0) + return ret; + + #ifdef LITTLE_ENDIAN_ORDER + ByteReverseWords64(sha384->digest, sha384->digest, SHA384_DIGEST_SIZE); + #endif + XMEMCPY(hash, sha384->digest, SHA384_DIGEST_SIZE); + + return InitSha384(sha384); /* reset state */ +} + +#endif /* CYASSL_SHA384 */ + +#endif /* CYASSL_SHA512 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo new file mode 100644 index 00000000..5087fc68 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-aes.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-aes.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo new file mode 100644 index 00000000..5f0eda1e --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-arc4.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-arc4.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo new file mode 100644 index 00000000..a9a06f03 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-asn.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-asn.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo new file mode 100644 index 00000000..206a1c2a --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-coding.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-coding.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo new file mode 100644 index 00000000..289cf3ac --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-des3.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-des3.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo new file mode 100644 index 00000000..1a0634e9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-dh.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-dh.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo new file mode 100644 index 00000000..596f4fb3 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-error.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-error.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo new file mode 100644 index 00000000..75838f89 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-hmac.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-hmac.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo new file mode 100644 index 00000000..e5e9b2dd --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-integer.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-integer.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo new file mode 100644 index 00000000..ae73fdb4 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-logging.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-logging.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo new file mode 100644 index 00000000..779f1789 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-md5.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-md5.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo new file mode 100644 index 00000000..7bceaa06 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-memory.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-memory.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo new file mode 100644 index 00000000..1750f9f9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-port.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-port.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo new file mode 100644 index 00000000..4905d347 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-random.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-random.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo new file mode 100644 index 00000000..8f5fa22d --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-rsa.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-rsa.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo new file mode 100644 index 00000000..d4fd75ed --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-sha.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-sha.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo new file mode 100644 index 00000000..308149b9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo @@ -0,0 +1,12 @@ +# ctaocrypt/src/src_libcyassl_la-sha256.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-sha256.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c b/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c new file mode 100644 index 00000000..cd4e46fd --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c @@ -0,0 +1,2514 @@ +/* tfm.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* + * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, + * http://math.libtomcrypt.com + */ + +/** + * Edited by Moisés Guimarães (moisesguimaraesm@gmail.com) + * to fit CyaSSL's needs. + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* in case user set USE_FAST_MATH there */ +#include + +#ifdef USE_FAST_MATH + +#include +#include /* will define asm MACROS or C ones */ + + +/* math settings check */ +word32 CheckRunTimeSettings(void) +{ + return CTC_SETTINGS; +} + + +/* math settings size check */ +word32 CheckRunTimeFastMath(void) +{ + return FP_SIZE; +} + + +/* Functions */ + +void fp_add(fp_int *a, fp_int *b, fp_int *c) +{ + int sa, sb; + + /* get sign of both inputs */ + sa = a->sign; + sb = b->sign; + + /* handle two cases, not four */ + if (sa == sb) { + /* both positive or both negative */ + /* add their magnitudes, copy the sign */ + c->sign = sa; + s_fp_add (a, b, c); + } else { + /* one positive, the other negative */ + /* subtract the one with the greater magnitude from */ + /* the one of the lesser magnitude. The result gets */ + /* the sign of the one with the greater magnitude. */ + if (fp_cmp_mag (a, b) == FP_LT) { + c->sign = sb; + s_fp_sub (b, a, c); + } else { + c->sign = sa; + s_fp_sub (a, b, c); + } + } +} + +/* unsigned addition */ +void s_fp_add(fp_int *a, fp_int *b, fp_int *c) +{ + int x, y, oldused; + register fp_word t; + + y = MAX(a->used, b->used); + oldused = c->used; + c->used = y; + + t = 0; + for (x = 0; x < y; x++) { + t += ((fp_word)a->dp[x]) + ((fp_word)b->dp[x]); + c->dp[x] = (fp_digit)t; + t >>= DIGIT_BIT; + } + if (t != 0 && x < FP_SIZE) { + c->dp[c->used++] = (fp_digit)t; + ++x; + } + + c->used = x; + for (; x < oldused; x++) { + c->dp[x] = 0; + } + fp_clamp(c); +} + +/* c = a - b */ +void fp_sub(fp_int *a, fp_int *b, fp_int *c) +{ + int sa, sb; + + sa = a->sign; + sb = b->sign; + + if (sa != sb) { + /* subtract a negative from a positive, OR */ + /* subtract a positive from a negative. */ + /* In either case, ADD their magnitudes, */ + /* and use the sign of the first number. */ + c->sign = sa; + s_fp_add (a, b, c); + } else { + /* subtract a positive from a positive, OR */ + /* subtract a negative from a negative. */ + /* First, take the difference between their */ + /* magnitudes, then... */ + if (fp_cmp_mag (a, b) != FP_LT) { + /* Copy the sign from the first */ + c->sign = sa; + /* The first has a larger or equal magnitude */ + s_fp_sub (a, b, c); + } else { + /* The result has the *opposite* sign from */ + /* the first number. */ + c->sign = (sa == FP_ZPOS) ? FP_NEG : FP_ZPOS; + /* The second has a larger magnitude */ + s_fp_sub (b, a, c); + } + } +} + +/* unsigned subtraction ||a|| >= ||b|| ALWAYS! */ +void s_fp_sub(fp_int *a, fp_int *b, fp_int *c) +{ + int x, oldbused, oldused; + fp_word t; + + oldused = c->used; + oldbused = b->used; + c->used = a->used; + t = 0; + for (x = 0; x < oldbused; x++) { + t = ((fp_word)a->dp[x]) - (((fp_word)b->dp[x]) + t); + c->dp[x] = (fp_digit)t; + t = (t >> DIGIT_BIT)&1; + } + for (; x < a->used; x++) { + t = ((fp_word)a->dp[x]) - t; + c->dp[x] = (fp_digit)t; + t = (t >> DIGIT_BIT)&1; + } + for (; x < oldused; x++) { + c->dp[x] = 0; + } + fp_clamp(c); +} + +/* c = a * b */ +void fp_mul(fp_int *A, fp_int *B, fp_int *C) +{ + int y, yy; + + y = MAX(A->used, B->used); + yy = MIN(A->used, B->used); + + /* call generic if we're out of range */ + if (y + yy > FP_SIZE) { + fp_mul_comba(A, B, C); + return ; + } + + /* pick a comba (unrolled 4/8/16/32 x or rolled) based on the size + of the largest input. We also want to avoid doing excess mults if the + inputs are not close to the next power of two. That is, for example, + if say y=17 then we would do (32-17)^2 = 225 unneeded multiplications + */ + +#ifdef TFM_MUL3 + if (y <= 3) { + fp_mul_comba3(A,B,C); + return; + } +#endif +#ifdef TFM_MUL4 + if (y == 4) { + fp_mul_comba4(A,B,C); + return; + } +#endif +#ifdef TFM_MUL6 + if (y <= 6) { + fp_mul_comba6(A,B,C); + return; + } +#endif +#ifdef TFM_MUL7 + if (y == 7) { + fp_mul_comba7(A,B,C); + return; + } +#endif +#ifdef TFM_MUL8 + if (y == 8) { + fp_mul_comba8(A,B,C); + return; + } +#endif +#ifdef TFM_MUL9 + if (y == 9) { + fp_mul_comba9(A,B,C); + return; + } +#endif +#ifdef TFM_MUL12 + if (y <= 12) { + fp_mul_comba12(A,B,C); + return; + } +#endif +#ifdef TFM_MUL17 + if (y <= 17) { + fp_mul_comba17(A,B,C); + return; + } +#endif + +#ifdef TFM_SMALL_SET + if (y <= 16) { + fp_mul_comba_small(A,B,C); + return; + } +#endif +#if defined(TFM_MUL20) + if (y <= 20) { + fp_mul_comba20(A,B,C); + return; + } +#endif +#if defined(TFM_MUL24) + if (yy >= 16 && y <= 24) { + fp_mul_comba24(A,B,C); + return; + } +#endif +#if defined(TFM_MUL28) + if (yy >= 20 && y <= 28) { + fp_mul_comba28(A,B,C); + return; + } +#endif +#if defined(TFM_MUL32) + if (yy >= 24 && y <= 32) { + fp_mul_comba32(A,B,C); + return; + } +#endif +#if defined(TFM_MUL48) + if (yy >= 40 && y <= 48) { + fp_mul_comba48(A,B,C); + return; + } +#endif +#if defined(TFM_MUL64) + if (yy >= 56 && y <= 64) { + fp_mul_comba64(A,B,C); + return; + } +#endif + fp_mul_comba(A,B,C); +} + +void fp_mul_2(fp_int * a, fp_int * b) +{ + int x, oldused; + + oldused = b->used; + b->used = a->used; + + { + register fp_digit r, rr, *tmpa, *tmpb; + + /* alias for source */ + tmpa = a->dp; + + /* alias for dest */ + tmpb = b->dp; + + /* carry */ + r = 0; + for (x = 0; x < a->used; x++) { + + /* get what will be the *next* carry bit from the + * MSB of the current digit + */ + rr = *tmpa >> ((fp_digit)(DIGIT_BIT - 1)); + + /* now shift up this digit, add in the carry [from the previous] */ + *tmpb++ = ((*tmpa++ << ((fp_digit)1)) | r); + + /* copy the carry that would be from the source + * digit into the next iteration + */ + r = rr; + } + + /* new leading digit? */ + if (r != 0 && b->used != (FP_SIZE-1)) { + /* add a MSB which is always 1 at this point */ + *tmpb = 1; + ++(b->used); + } + + /* now zero any excess digits on the destination + * that we didn't write to + */ + tmpb = b->dp + b->used; + for (x = b->used; x < oldused; x++) { + *tmpb++ = 0; + } + } + b->sign = a->sign; +} + +/* c = a * b */ +void fp_mul_d(fp_int *a, fp_digit b, fp_int *c) +{ + fp_word w; + int x, oldused; + + oldused = c->used; + c->used = a->used; + c->sign = a->sign; + w = 0; + for (x = 0; x < a->used; x++) { + w = ((fp_word)a->dp[x]) * ((fp_word)b) + w; + c->dp[x] = (fp_digit)w; + w = w >> DIGIT_BIT; + } + if (w != 0 && (a->used != FP_SIZE)) { + c->dp[c->used++] = (fp_digit) w; + ++x; + } + for (; x < oldused; x++) { + c->dp[x] = 0; + } + fp_clamp(c); +} + +/* c = a * 2**d */ +void fp_mul_2d(fp_int *a, int b, fp_int *c) +{ + fp_digit carry, carrytmp, shift; + int x; + + /* copy it */ + fp_copy(a, c); + + /* handle whole digits */ + if (b >= DIGIT_BIT) { + fp_lshd(c, b/DIGIT_BIT); + } + b %= DIGIT_BIT; + + /* shift the digits */ + if (b != 0) { + carry = 0; + shift = DIGIT_BIT - b; + for (x = 0; x < c->used; x++) { + carrytmp = c->dp[x] >> shift; + c->dp[x] = (c->dp[x] << b) + carry; + carry = carrytmp; + } + /* store last carry if room */ + if (carry && x < FP_SIZE) { + c->dp[c->used++] = carry; + } + } + fp_clamp(c); +} + +/* generic PxQ multiplier */ +void fp_mul_comba(fp_int *A, fp_int *B, fp_int *C) +{ + int ix, iy, iz, tx, ty, pa; + fp_digit c0, c1, c2, *tmpx, *tmpy; + fp_int tmp, *dst; + + COMBA_START; + COMBA_CLEAR; + + /* get size of output and trim */ + pa = A->used + B->used; + if (pa >= FP_SIZE) { + pa = FP_SIZE-1; + } + + if (A == C || B == C) { + fp_zero(&tmp); + dst = &tmp; + } else { + fp_zero(C); + dst = C; + } + + for (ix = 0; ix < pa; ix++) { + /* get offsets into the two bignums */ + ty = MIN(ix, B->used-1); + tx = ix - ty; + + /* setup temp aliases */ + tmpx = A->dp + tx; + tmpy = B->dp + ty; + + /* this is the number of times the loop will iterrate, essentially its + while (tx++ < a->used && ty-- >= 0) { ... } + */ + iy = MIN(A->used-tx, ty+1); + + /* execute loop */ + COMBA_FORWARD; + for (iz = 0; iz < iy; ++iz) { + /* TAO change COMBA_ADD back to MULADD */ + MULADD(*tmpx++, *tmpy--); + } + + /* store term */ + COMBA_STORE(dst->dp[ix]); + } + COMBA_FINI; + + dst->used = pa; + dst->sign = A->sign ^ B->sign; + fp_clamp(dst); + fp_copy(dst, C); +} + +/* a/b => cb + d == a */ +int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d) +{ + fp_int q, x, y, t1, t2; + int n, t, i, norm, neg; + + /* is divisor zero ? */ + if (fp_iszero (b) == 1) { + return FP_VAL; + } + + /* if a < b then q=0, r = a */ + if (fp_cmp_mag (a, b) == FP_LT) { + if (d != NULL) { + fp_copy (a, d); + } + if (c != NULL) { + fp_zero (c); + } + return FP_OKAY; + } + + fp_init(&q); + q.used = a->used + 2; + + fp_init(&t1); + fp_init(&t2); + fp_init_copy(&x, a); + fp_init_copy(&y, b); + + /* fix the sign */ + neg = (a->sign == b->sign) ? FP_ZPOS : FP_NEG; + x.sign = y.sign = FP_ZPOS; + + /* normalize both x and y, ensure that y >= b/2, [b == 2**DIGIT_BIT] */ + norm = fp_count_bits(&y) % DIGIT_BIT; + if (norm < (int)(DIGIT_BIT-1)) { + norm = (DIGIT_BIT-1) - norm; + fp_mul_2d (&x, norm, &x); + fp_mul_2d (&y, norm, &y); + } else { + norm = 0; + } + + /* note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4 */ + n = x.used - 1; + t = y.used - 1; + + /* while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} } */ + fp_lshd (&y, n - t); /* y = y*b**{n-t} */ + + while (fp_cmp (&x, &y) != FP_LT) { + ++(q.dp[n - t]); + fp_sub (&x, &y, &x); + } + + /* reset y by shifting it back down */ + fp_rshd (&y, n - t); + + /* step 3. for i from n down to (t + 1) */ + for (i = n; i >= (t + 1); i--) { + if (i > x.used) { + continue; + } + + /* step 3.1 if xi == yt then set q{i-t-1} to b-1, + * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ + if (x.dp[i] == y.dp[t]) { + q.dp[i - t - 1] = (fp_digit) ((((fp_word)1) << DIGIT_BIT) - 1); + } else { + fp_word tmp; + tmp = ((fp_word) x.dp[i]) << ((fp_word) DIGIT_BIT); + tmp |= ((fp_word) x.dp[i - 1]); + tmp /= ((fp_word)y.dp[t]); + q.dp[i - t - 1] = (fp_digit) (tmp); + } + + /* while (q{i-t-1} * (yt * b + y{t-1})) > + xi * b**2 + xi-1 * b + xi-2 + + do q{i-t-1} -= 1; + */ + q.dp[i - t - 1] = (q.dp[i - t - 1] + 1); + do { + q.dp[i - t - 1] = (q.dp[i - t - 1] - 1); + + /* find left hand */ + fp_zero (&t1); + t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; + t1.dp[1] = y.dp[t]; + t1.used = 2; + fp_mul_d (&t1, q.dp[i - t - 1], &t1); + + /* find right hand */ + t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; + t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; + t2.dp[2] = x.dp[i]; + t2.used = 3; + } while (fp_cmp_mag(&t1, &t2) == FP_GT); + + /* step 3.3 x = x - q{i-t-1} * y * b**{i-t-1} */ + fp_mul_d (&y, q.dp[i - t - 1], &t1); + fp_lshd (&t1, i - t - 1); + fp_sub (&x, &t1, &x); + + /* if x < 0 then { x = x + y*b**{i-t-1}; q{i-t-1} -= 1; } */ + if (x.sign == FP_NEG) { + fp_copy (&y, &t1); + fp_lshd (&t1, i - t - 1); + fp_add (&x, &t1, &x); + q.dp[i - t - 1] = q.dp[i - t - 1] - 1; + } + } + + /* now q is the quotient and x is the remainder + * [which we have to normalize] + */ + + /* get sign before writing to c */ + x.sign = x.used == 0 ? FP_ZPOS : a->sign; + + if (c != NULL) { + fp_clamp (&q); + fp_copy (&q, c); + c->sign = neg; + } + + if (d != NULL) { + fp_div_2d (&x, norm, &x, NULL); + +/* the following is a kludge, essentially we were seeing the right remainder but + with excess digits that should have been zero + */ + for (i = b->used; i < x.used; i++) { + x.dp[i] = 0; + } + fp_clamp(&x); + fp_copy (&x, d); + } + + return FP_OKAY; +} + +/* b = a/2 */ +void fp_div_2(fp_int * a, fp_int * b) +{ + int x, oldused; + + oldused = b->used; + b->used = a->used; + { + register fp_digit r, rr, *tmpa, *tmpb; + + /* source alias */ + tmpa = a->dp + b->used - 1; + + /* dest alias */ + tmpb = b->dp + b->used - 1; + + /* carry */ + r = 0; + for (x = b->used - 1; x >= 0; x--) { + /* get the carry for the next iteration */ + rr = *tmpa & 1; + + /* shift the current digit, add in carry and store */ + *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); + + /* forward carry to next iteration */ + r = rr; + } + + /* zero excess digits */ + tmpb = b->dp + b->used; + for (x = b->used; x < oldused; x++) { + *tmpb++ = 0; + } + } + b->sign = a->sign; + fp_clamp (b); +} + +/* c = a / 2**b */ +void fp_div_2d(fp_int *a, int b, fp_int *c, fp_int *d) +{ + int D; + fp_int t; + + /* if the shift count is <= 0 then we do no work */ + if (b <= 0) { + fp_copy (a, c); + if (d != NULL) { + fp_zero (d); + } + return; + } + + fp_init(&t); + + /* get the remainder */ + if (d != NULL) { + fp_mod_2d (a, b, &t); + } + + /* copy */ + fp_copy(a, c); + + /* shift by as many digits in the bit count */ + if (b >= (int)DIGIT_BIT) { + fp_rshd (c, b / DIGIT_BIT); + } + + /* shift any bit count < DIGIT_BIT */ + D = (b % DIGIT_BIT); + if (D != 0) { + fp_rshb(c, D); + } + fp_clamp (c); + if (d != NULL) { + fp_copy (&t, d); + } +} + +/* c = a mod b, 0 <= c < b */ +int fp_mod(fp_int *a, fp_int *b, fp_int *c) +{ + fp_int t; + int err; + + fp_zero(&t); + if ((err = fp_div(a, b, NULL, &t)) != FP_OKAY) { + return err; + } + if (t.sign != b->sign) { + fp_add(&t, b, c); + } else { + fp_copy(&t, c); + } + return FP_OKAY; +} + +/* c = a mod 2**d */ +void fp_mod_2d(fp_int *a, int b, fp_int *c) +{ + int x; + + /* zero if count less than or equal to zero */ + if (b <= 0) { + fp_zero(c); + return; + } + + /* get copy of input */ + fp_copy(a, c); + + /* if 2**d is larger than we just return */ + if (b >= (DIGIT_BIT * a->used)) { + return; + } + + /* zero digits above the last digit of the modulus */ + for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { + c->dp[x] = 0; + } + /* clear the digit that is not completely outside/inside the modulus */ + c->dp[b / DIGIT_BIT] &= ~((fp_digit)0) >> (DIGIT_BIT - b); + fp_clamp (c); +} + +static int fp_invmod_slow (fp_int * a, fp_int * b, fp_int * c) +{ + fp_int x, y, u, v, A, B, C, D; + int res; + + /* b cannot be negative */ + if (b->sign == FP_NEG || fp_iszero(b) == 1) { + return FP_VAL; + } + + /* init temps */ + fp_init(&x); fp_init(&y); + fp_init(&u); fp_init(&v); + fp_init(&A); fp_init(&B); + fp_init(&C); fp_init(&D); + + /* x = a, y = b */ + if ((res = fp_mod(a, b, &x)) != FP_OKAY) { + return res; + } + fp_copy(b, &y); + + /* 2. [modified] if x,y are both even then return an error! */ + if (fp_iseven (&x) == 1 && fp_iseven (&y) == 1) { + return FP_VAL; + } + + /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ + fp_copy (&x, &u); + fp_copy (&y, &v); + fp_set (&A, 1); + fp_set (&D, 1); + +top: + /* 4. while u is even do */ + while (fp_iseven (&u) == 1) { + /* 4.1 u = u/2 */ + fp_div_2 (&u, &u); + + /* 4.2 if A or B is odd then */ + if (fp_isodd (&A) == 1 || fp_isodd (&B) == 1) { + /* A = (A+y)/2, B = (B-x)/2 */ + fp_add (&A, &y, &A); + fp_sub (&B, &x, &B); + } + /* A = A/2, B = B/2 */ + fp_div_2 (&A, &A); + fp_div_2 (&B, &B); + } + + /* 5. while v is even do */ + while (fp_iseven (&v) == 1) { + /* 5.1 v = v/2 */ + fp_div_2 (&v, &v); + + /* 5.2 if C or D is odd then */ + if (fp_isodd (&C) == 1 || fp_isodd (&D) == 1) { + /* C = (C+y)/2, D = (D-x)/2 */ + fp_add (&C, &y, &C); + fp_sub (&D, &x, &D); + } + /* C = C/2, D = D/2 */ + fp_div_2 (&C, &C); + fp_div_2 (&D, &D); + } + + /* 6. if u >= v then */ + if (fp_cmp (&u, &v) != FP_LT) { + /* u = u - v, A = A - C, B = B - D */ + fp_sub (&u, &v, &u); + fp_sub (&A, &C, &A); + fp_sub (&B, &D, &B); + } else { + /* v - v - u, C = C - A, D = D - B */ + fp_sub (&v, &u, &v); + fp_sub (&C, &A, &C); + fp_sub (&D, &B, &D); + } + + /* if not zero goto step 4 */ + if (fp_iszero (&u) == 0) + goto top; + + /* now a = C, b = D, gcd == g*v */ + + /* if v != 1 then there is no inverse */ + if (fp_cmp_d (&v, 1) != FP_EQ) { + return FP_VAL; + } + + /* if its too low */ + while (fp_cmp_d(&C, 0) == FP_LT) { + fp_add(&C, b, &C); + } + + /* too big */ + while (fp_cmp_mag(&C, b) != FP_LT) { + fp_sub(&C, b, &C); + } + + /* C is now the inverse */ + fp_copy(&C, c); + return FP_OKAY; +} + +/* c = 1/a (mod b) for odd b only */ +int fp_invmod(fp_int *a, fp_int *b, fp_int *c) +{ + fp_int x, y, u, v, B, D; + int neg; + + /* 2. [modified] b must be odd */ + if (fp_iseven (b) == FP_YES) { + return fp_invmod_slow(a,b,c); + } + + /* init all our temps */ + fp_init(&x); fp_init(&y); + fp_init(&u); fp_init(&v); + fp_init(&B); fp_init(&D); + + /* x == modulus, y == value to invert */ + fp_copy(b, &x); + + /* we need y = |a| */ + fp_abs(a, &y); + + /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ + fp_copy(&x, &u); + fp_copy(&y, &v); + fp_set (&D, 1); + +top: + /* 4. while u is even do */ + while (fp_iseven (&u) == FP_YES) { + /* 4.1 u = u/2 */ + fp_div_2 (&u, &u); + + /* 4.2 if B is odd then */ + if (fp_isodd (&B) == FP_YES) { + fp_sub (&B, &x, &B); + } + /* B = B/2 */ + fp_div_2 (&B, &B); + } + + /* 5. while v is even do */ + while (fp_iseven (&v) == FP_YES) { + /* 5.1 v = v/2 */ + fp_div_2 (&v, &v); + + /* 5.2 if D is odd then */ + if (fp_isodd (&D) == FP_YES) { + /* D = (D-x)/2 */ + fp_sub (&D, &x, &D); + } + /* D = D/2 */ + fp_div_2 (&D, &D); + } + + /* 6. if u >= v then */ + if (fp_cmp (&u, &v) != FP_LT) { + /* u = u - v, B = B - D */ + fp_sub (&u, &v, &u); + fp_sub (&B, &D, &B); + } else { + /* v - v - u, D = D - B */ + fp_sub (&v, &u, &v); + fp_sub (&D, &B, &D); + } + + /* if not zero goto step 4 */ + if (fp_iszero (&u) == FP_NO) { + goto top; + } + + /* now a = C, b = D, gcd == g*v */ + + /* if v != 1 then there is no inverse */ + if (fp_cmp_d (&v, 1) != FP_EQ) { + return FP_VAL; + } + + /* b is now the inverse */ + neg = a->sign; + while (D.sign == FP_NEG) { + fp_add (&D, b, &D); + } + fp_copy (&D, c); + c->sign = neg; + return FP_OKAY; +} + +/* d = a * b (mod c) */ +int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d) +{ + fp_int tmp; + fp_zero(&tmp); + fp_mul(a, b, &tmp); + return fp_mod(&tmp, c, d); +} + +#ifdef TFM_TIMING_RESISTANT + +/* timing resistant montgomery ladder based exptmod + + Based on work by Marc Joye, Sung-Ming Yen, "The Montgomery Powering Ladder", Cryptographic Hardware and Embedded Systems, CHES 2002 +*/ +static int _fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) +{ + fp_int R[2]; + fp_digit buf, mp; + int err, bitcnt, digidx, y; + + /* now setup montgomery */ + if ((err = fp_montgomery_setup (P, &mp)) != FP_OKAY) { + return err; + } + + fp_init(&R[0]); + fp_init(&R[1]); + + /* now we need R mod m */ + fp_montgomery_calc_normalization (&R[0], P); + + /* now set R[0][1] to G * R mod m */ + if (fp_cmp_mag(P, G) != FP_GT) { + /* G > P so we reduce it first */ + fp_mod(G, P, &R[1]); + } else { + fp_copy(G, &R[1]); + } + fp_mulmod (&R[1], &R[0], P, &R[1]); + + /* for j = t-1 downto 0 do + r_!k = R0*R1; r_k = r_k^2 + */ + + /* set initial mode and bit cnt */ + bitcnt = 1; + buf = 0; + digidx = X->used - 1; + + for (;;) { + /* grab next digit as required */ + if (--bitcnt == 0) { + /* if digidx == -1 we are out of digits so break */ + if (digidx == -1) { + break; + } + /* read next digit and reset bitcnt */ + buf = X->dp[digidx--]; + bitcnt = (int)DIGIT_BIT; + } + + /* grab the next msb from the exponent */ + y = (int)(buf >> (DIGIT_BIT - 1)) & 1; + buf <<= (fp_digit)1; + + /* do ops */ + fp_mul(&R[0], &R[1], &R[y^1]); fp_montgomery_reduce(&R[y^1], P, mp); + fp_sqr(&R[y], &R[y]); fp_montgomery_reduce(&R[y], P, mp); + } + + fp_montgomery_reduce(&R[0], P, mp); + fp_copy(&R[0], Y); + return FP_OKAY; +} + +#else + +/* y = g**x (mod b) + * Some restrictions... x must be positive and < b + */ +static int _fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) +{ + fp_int M[64], res; + fp_digit buf, mp; + int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; + + /* find window size */ + x = fp_count_bits (X); + if (x <= 21) { + winsize = 1; + } else if (x <= 36) { + winsize = 3; + } else if (x <= 140) { + winsize = 4; + } else if (x <= 450) { + winsize = 5; + } else { + winsize = 6; + } + + /* init M array */ + XMEMSET(M, 0, sizeof(M)); + + /* now setup montgomery */ + if ((err = fp_montgomery_setup (P, &mp)) != FP_OKAY) { + return err; + } + + /* setup result */ + fp_init(&res); + + /* create M table + * + * The M table contains powers of the input base, e.g. M[x] = G^x mod P + * + * The first half of the table is not computed though accept for M[0] and M[1] + */ + + /* now we need R mod m */ + fp_montgomery_calc_normalization (&res, P); + + /* now set M[1] to G * R mod m */ + if (fp_cmp_mag(P, G) != FP_GT) { + /* G > P so we reduce it first */ + fp_mod(G, P, &M[1]); + } else { + fp_copy(G, &M[1]); + } + fp_mulmod (&M[1], &res, P, &M[1]); + + /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times */ + fp_copy (&M[1], &M[1 << (winsize - 1)]); + for (x = 0; x < (winsize - 1); x++) { + fp_sqr (&M[1 << (winsize - 1)], &M[1 << (winsize - 1)]); + fp_montgomery_reduce (&M[1 << (winsize - 1)], P, mp); + } + + /* create upper table */ + for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { + fp_mul(&M[x - 1], &M[1], &M[x]); + fp_montgomery_reduce(&M[x], P, mp); + } + + /* set initial mode and bit cnt */ + mode = 0; + bitcnt = 1; + buf = 0; + digidx = X->used - 1; + bitcpy = 0; + bitbuf = 0; + + for (;;) { + /* grab next digit as required */ + if (--bitcnt == 0) { + /* if digidx == -1 we are out of digits so break */ + if (digidx == -1) { + break; + } + /* read next digit and reset bitcnt */ + buf = X->dp[digidx--]; + bitcnt = (int)DIGIT_BIT; + } + + /* grab the next msb from the exponent */ + y = (int)(buf >> (DIGIT_BIT - 1)) & 1; + buf <<= (fp_digit)1; + + /* if the bit is zero and mode == 0 then we ignore it + * These represent the leading zero bits before the first 1 bit + * in the exponent. Technically this opt is not required but it + * does lower the # of trivial squaring/reductions used + */ + if (mode == 0 && y == 0) { + continue; + } + + /* if the bit is zero and mode == 1 then we square */ + if (mode == 1 && y == 0) { + fp_sqr(&res, &res); + fp_montgomery_reduce(&res, P, mp); + continue; + } + + /* else we add it to the window */ + bitbuf |= (y << (winsize - ++bitcpy)); + mode = 2; + + if (bitcpy == winsize) { + /* ok window is filled so square as required and multiply */ + /* square first */ + for (x = 0; x < winsize; x++) { + fp_sqr(&res, &res); + fp_montgomery_reduce(&res, P, mp); + } + + /* then multiply */ + fp_mul(&res, &M[bitbuf], &res); + fp_montgomery_reduce(&res, P, mp); + + /* empty window and reset */ + bitcpy = 0; + bitbuf = 0; + mode = 1; + } + } + + /* if bits remain then square/multiply */ + if (mode == 2 && bitcpy > 0) { + /* square then multiply if the bit is set */ + for (x = 0; x < bitcpy; x++) { + fp_sqr(&res, &res); + fp_montgomery_reduce(&res, P, mp); + + /* get next bit of the window */ + bitbuf <<= 1; + if ((bitbuf & (1 << winsize)) != 0) { + /* then multiply */ + fp_mul(&res, &M[1], &res); + fp_montgomery_reduce(&res, P, mp); + } + } + } + + /* fixup result if Montgomery reduction is used + * recall that any value in a Montgomery system is + * actually multiplied by R mod n. So we have + * to reduce one more time to cancel out the factor + * of R. + */ + fp_montgomery_reduce(&res, P, mp); + + /* swap res with Y */ + fp_copy (&res, Y); + return FP_OKAY; +} + +#endif + +int fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) +{ + /* prevent overflows */ + if (P->used > (FP_SIZE/2)) { + return FP_VAL; + } + + if (X->sign == FP_NEG) { +#ifndef POSITIVE_EXP_ONLY /* reduce stack if assume no negatives */ + int err; + fp_int tmp; + + /* yes, copy G and invmod it */ + fp_copy(G, &tmp); + if ((err = fp_invmod(&tmp, P, &tmp)) != FP_OKAY) { + return err; + } + X->sign = FP_ZPOS; + err = _fp_exptmod(&tmp, X, P, Y); + if (X != Y) { + X->sign = FP_NEG; + } + return err; +#else + return FP_VAL; +#endif + } + else { + /* Positive exponent so just exptmod */ + return _fp_exptmod(G, X, P, Y); + } +} + +/* computes a = 2**b */ +void fp_2expt(fp_int *a, int b) +{ + int z; + + /* zero a as per default */ + fp_zero (a); + + if (b < 0) { + return; + } + + z = b / DIGIT_BIT; + if (z >= FP_SIZE) { + return; + } + + /* set the used count of where the bit will go */ + a->used = z + 1; + + /* put the single bit in its place */ + a->dp[z] = ((fp_digit)1) << (b % DIGIT_BIT); +} + +/* b = a*a */ +void fp_sqr(fp_int *A, fp_int *B) +{ + int y = A->used; + + /* call generic if we're out of range */ + if (y + y > FP_SIZE) { + fp_sqr_comba(A, B); + return ; + } + +#if defined(TFM_SQR3) + if (y <= 3) { + fp_sqr_comba3(A,B); + return; + } +#endif +#if defined(TFM_SQR4) + if (y == 4) { + fp_sqr_comba4(A,B); + return; + } +#endif +#if defined(TFM_SQR6) + if (y <= 6) { + fp_sqr_comba6(A,B); + return; + } +#endif +#if defined(TFM_SQR7) + if (y == 7) { + fp_sqr_comba7(A,B); + return; + } +#endif +#if defined(TFM_SQR8) + if (y == 8) { + fp_sqr_comba8(A,B); + return; + } +#endif +#if defined(TFM_SQR9) + if (y == 9) { + fp_sqr_comba9(A,B); + return; + } +#endif +#if defined(TFM_SQR12) + if (y <= 12) { + fp_sqr_comba12(A,B); + return; + } +#endif +#if defined(TFM_SQR17) + if (y <= 17) { + fp_sqr_comba17(A,B); + return; + } +#endif +#if defined(TFM_SMALL_SET) + if (y <= 16) { + fp_sqr_comba_small(A,B); + return; + } +#endif +#if defined(TFM_SQR20) + if (y <= 20) { + fp_sqr_comba20(A,B); + return; + } +#endif +#if defined(TFM_SQR24) + if (y <= 24) { + fp_sqr_comba24(A,B); + return; + } +#endif +#if defined(TFM_SQR28) + if (y <= 28) { + fp_sqr_comba28(A,B); + return; + } +#endif +#if defined(TFM_SQR32) + if (y <= 32) { + fp_sqr_comba32(A,B); + return; + } +#endif +#if defined(TFM_SQR48) + if (y <= 48) { + fp_sqr_comba48(A,B); + return; + } +#endif +#if defined(TFM_SQR64) + if (y <= 64) { + fp_sqr_comba64(A,B); + return; + } +#endif + fp_sqr_comba(A, B); +} + +/* generic comba squarer */ +void fp_sqr_comba(fp_int *A, fp_int *B) +{ + int pa, ix, iz; + fp_digit c0, c1, c2; + fp_int tmp, *dst; +#ifdef TFM_ISO + fp_word tt; +#endif + + /* get size of output and trim */ + pa = A->used + A->used; + if (pa >= FP_SIZE) { + pa = FP_SIZE-1; + } + + /* number of output digits to produce */ + COMBA_START; + COMBA_CLEAR; + + if (A == B) { + fp_zero(&tmp); + dst = &tmp; + } else { + fp_zero(B); + dst = B; + } + + for (ix = 0; ix < pa; ix++) { + int tx, ty, iy; + fp_digit *tmpy, *tmpx; + + /* get offsets into the two bignums */ + ty = MIN(A->used-1, ix); + tx = ix - ty; + + /* setup temp aliases */ + tmpx = A->dp + tx; + tmpy = A->dp + ty; + + /* this is the number of times the loop will iterrate, + while (tx++ < a->used && ty-- >= 0) { ... } + */ + iy = MIN(A->used-tx, ty+1); + + /* now for squaring tx can never equal ty + * we halve the distance since they approach + * at a rate of 2x and we have to round because + * odd cases need to be executed + */ + iy = MIN(iy, (ty-tx+1)>>1); + + /* forward carries */ + COMBA_FORWARD; + + /* execute loop */ + for (iz = 0; iz < iy; iz++) { + SQRADD2(*tmpx++, *tmpy--); + } + + /* even columns have the square term in them */ + if ((ix&1) == 0) { + /* TAO change COMBA_ADD back to SQRADD */ + SQRADD(A->dp[ix>>1], A->dp[ix>>1]); + } + + /* store it */ + COMBA_STORE(dst->dp[ix]); + } + + COMBA_FINI; + + /* setup dest */ + dst->used = pa; + fp_clamp (dst); + if (dst != B) { + fp_copy(dst, B); + } +} + +int fp_cmp(fp_int *a, fp_int *b) +{ + if (a->sign == FP_NEG && b->sign == FP_ZPOS) { + return FP_LT; + } else if (a->sign == FP_ZPOS && b->sign == FP_NEG) { + return FP_GT; + } else { + /* compare digits */ + if (a->sign == FP_NEG) { + /* if negative compare opposite direction */ + return fp_cmp_mag(b, a); + } else { + return fp_cmp_mag(a, b); + } + } +} + +/* compare against a single digit */ +int fp_cmp_d(fp_int *a, fp_digit b) +{ + /* compare based on sign */ + if ((b && a->used == 0) || a->sign == FP_NEG) { + return FP_LT; + } + + /* compare based on magnitude */ + if (a->used > 1) { + return FP_GT; + } + + /* compare the only digit of a to b */ + if (a->dp[0] > b) { + return FP_GT; + } else if (a->dp[0] < b) { + return FP_LT; + } else { + return FP_EQ; + } + +} + +int fp_cmp_mag(fp_int *a, fp_int *b) +{ + int x; + + if (a->used > b->used) { + return FP_GT; + } else if (a->used < b->used) { + return FP_LT; + } else { + for (x = a->used - 1; x >= 0; x--) { + if (a->dp[x] > b->dp[x]) { + return FP_GT; + } else if (a->dp[x] < b->dp[x]) { + return FP_LT; + } + } + } + return FP_EQ; +} + +/* setups the montgomery reduction */ +int fp_montgomery_setup(fp_int *a, fp_digit *rho) +{ + fp_digit x, b; + +/* fast inversion mod 2**k + * + * Based on the fact that + * + * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) + * => 2*X*A - X*X*A*A = 1 + * => 2*(1) - (1) = 1 + */ + b = a->dp[0]; + + if ((b & 1) == 0) { + return FP_VAL; + } + + x = (((b + 2) & 4) << 1) + b; /* here x*a==1 mod 2**4 */ + x *= 2 - b * x; /* here x*a==1 mod 2**8 */ + x *= 2 - b * x; /* here x*a==1 mod 2**16 */ + x *= 2 - b * x; /* here x*a==1 mod 2**32 */ +#ifdef FP_64BIT + x *= 2 - b * x; /* here x*a==1 mod 2**64 */ +#endif + + /* rho = -1/m mod b */ + *rho = (fp_digit) (((fp_word) 1 << ((fp_word) DIGIT_BIT)) - ((fp_word)x)); + + return FP_OKAY; +} + +/* computes a = B**n mod b without division or multiplication useful for + * normalizing numbers in a Montgomery system. + */ +void fp_montgomery_calc_normalization(fp_int *a, fp_int *b) +{ + int x, bits; + + /* how many bits of last digit does b use */ + bits = fp_count_bits (b) % DIGIT_BIT; + if (!bits) bits = DIGIT_BIT; + + /* compute A = B^(n-1) * 2^(bits-1) */ + if (b->used > 1) { + fp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1); + } else { + fp_set(a, 1); + bits = 1; + } + + /* now compute C = A * B mod b */ + for (x = bits - 1; x < (int)DIGIT_BIT; x++) { + fp_mul_2 (a, a); + if (fp_cmp_mag (a, b) != FP_LT) { + s_fp_sub (a, b, a); + } + } +} + + +#ifdef TFM_SMALL_MONT_SET + #include "fp_mont_small.i" +#endif + +/* computes x/R == x (mod N) via Montgomery Reduction */ +void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) +{ + fp_digit c[FP_SIZE], *_c, *tmpm, mu = 0; + int oldused, x, y, pa; + + /* bail if too large */ + if (m->used > (FP_SIZE/2)) { + (void)mu; /* shut up compiler */ + return; + } + +#ifdef TFM_SMALL_MONT_SET + if (m->used <= 16) { + fp_montgomery_reduce_small(a, m, mp); + return; + } +#endif + + + /* now zero the buff */ + XMEMSET(c, 0, sizeof c); + pa = m->used; + + /* copy the input */ + oldused = a->used; + for (x = 0; x < oldused; x++) { + c[x] = a->dp[x]; + } + MONT_START; + + for (x = 0; x < pa; x++) { + fp_digit cy = 0; + /* get Mu for this round */ + LOOP_START; + _c = c + x; + tmpm = m->dp; + y = 0; + #if (defined(TFM_SSE2) || defined(TFM_X86_64)) + for (; y < (pa & ~7); y += 8) { + INNERMUL8; + _c += 8; + tmpm += 8; + } + #endif + + for (; y < pa; y++) { + INNERMUL; + ++_c; + } + LOOP_END; + while (cy) { + PROPCARRY; + ++_c; + } + } + + /* now copy out */ + _c = c + pa; + tmpm = a->dp; + for (x = 0; x < pa+1; x++) { + *tmpm++ = *_c++; + } + + for (; x < oldused; x++) { + *tmpm++ = 0; + } + + MONT_FINI; + + a->used = pa+1; + fp_clamp(a); + + /* if A >= m then A = A - m */ + if (fp_cmp_mag (a, m) != FP_LT) { + s_fp_sub (a, m, a); + } +} + +void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c) +{ + /* zero the int */ + fp_zero (a); + + /* If we know the endianness of this architecture, and we're using + 32-bit fp_digits, we can optimize this */ +#if (defined(LITTLE_ENDIAN_ORDER) || defined(BIG_ENDIAN_ORDER)) && !defined(FP_64BIT) + /* But not for both simultaneously */ +#if defined(LITTLE_ENDIAN_ORDER) && defined(BIG_ENDIAN_ORDER) +#error Both LITTLE_ENDIAN_ORDER and BIG_ENDIAN_ORDER defined. +#endif + { + unsigned char *pd = (unsigned char *)a->dp; + + if ((unsigned)c > (FP_SIZE * sizeof(fp_digit))) { + int excess = c - (FP_SIZE * sizeof(fp_digit)); + c -= excess; + b += excess; + } + a->used = (c + sizeof(fp_digit) - 1)/sizeof(fp_digit); + /* read the bytes in */ +#ifdef BIG_ENDIAN_ORDER + { + /* Use Duff's device to unroll the loop. */ + int idx = (c - 1) & ~3; + switch (c % 4) { + case 0: do { pd[idx+0] = *b++; + case 3: pd[idx+1] = *b++; + case 2: pd[idx+2] = *b++; + case 1: pd[idx+3] = *b++; + idx -= 4; + } while ((c -= 4) > 0); + } + } +#else + for (c -= 1; c >= 0; c -= 1) { + pd[c] = *b++; + } +#endif + } +#else + /* read the bytes in */ + for (; c > 0; c--) { + fp_mul_2d (a, 8, a); + a->dp[0] |= *b++; + a->used += 1; + } +#endif + fp_clamp (a); +} + +void fp_to_unsigned_bin(fp_int *a, unsigned char *b) +{ + int x; + fp_int t; + + fp_init_copy(&t, a); + + x = 0; + while (fp_iszero (&t) == FP_NO) { + b[x++] = (unsigned char) (t.dp[0] & 255); + fp_div_2d (&t, 8, &t, NULL); + } + fp_reverse (b, x); +} + +int fp_unsigned_bin_size(fp_int *a) +{ + int size = fp_count_bits (a); + return (size / 8 + ((size & 7) != 0 ? 1 : 0)); +} + +void fp_set(fp_int *a, fp_digit b) +{ + fp_zero(a); + a->dp[0] = b; + a->used = a->dp[0] ? 1 : 0; +} + +int fp_count_bits (fp_int * a) +{ + int r; + fp_digit q; + + /* shortcut */ + if (a->used == 0) { + return 0; + } + + /* get number of digits and add that */ + r = (a->used - 1) * DIGIT_BIT; + + /* take the last digit and count the bits in it */ + q = a->dp[a->used - 1]; + while (q > ((fp_digit) 0)) { + ++r; + q >>= ((fp_digit) 1); + } + return r; +} + +int fp_leading_bit(fp_int *a) +{ + int bit = 0; + + if (a->used != 0) { + fp_digit q = a->dp[a->used - 1]; + int qSz = sizeof(fp_digit); + + while (qSz > 0) { + if ((unsigned char)q != 0) + bit = (q & 0x80) != 0; + q >>= 8; + qSz--; + } + } + + return bit; +} + +void fp_lshd(fp_int *a, int x) +{ + int y; + + /* move up and truncate as required */ + y = MIN(a->used + x - 1, (int)(FP_SIZE-1)); + + /* store new size */ + a->used = y + 1; + + /* move digits */ + for (; y >= x; y--) { + a->dp[y] = a->dp[y-x]; + } + + /* zero lower digits */ + for (; y >= 0; y--) { + a->dp[y] = 0; + } + + /* clamp digits */ + fp_clamp(a); +} + + +/* right shift by bit count */ +void fp_rshb(fp_int *c, int x) +{ + register fp_digit *tmpc, mask, shift; + fp_digit r, rr; + fp_digit D = x; + + /* mask */ + mask = (((fp_digit)1) << D) - 1; + + /* shift for lsb */ + shift = DIGIT_BIT - D; + + /* alias */ + tmpc = c->dp + (c->used - 1); + + /* carry */ + r = 0; + for (x = c->used - 1; x >= 0; x--) { + /* get the lower bits of this word in a temp */ + rr = *tmpc & mask; + + /* shift the current word and mix in the carry bits from previous word */ + *tmpc = (*tmpc >> D) | (r << shift); + --tmpc; + + /* set the carry to the carry bits of the current word found above */ + r = rr; + } +} + + +void fp_rshd(fp_int *a, int x) +{ + int y; + + /* too many digits just zero and return */ + if (x >= a->used) { + fp_zero(a); + return; + } + + /* shift */ + for (y = 0; y < a->used - x; y++) { + a->dp[y] = a->dp[y+x]; + } + + /* zero rest */ + for (; y < a->used; y++) { + a->dp[y] = 0; + } + + /* decrement count */ + a->used -= x; + fp_clamp(a); +} + +/* reverse an array, used for radix code */ +void fp_reverse (unsigned char *s, int len) +{ + int ix, iy; + unsigned char t; + + ix = 0; + iy = len - 1; + while (ix < iy) { + t = s[ix]; + s[ix] = s[iy]; + s[iy] = t; + ++ix; + --iy; + } +} + + +/* c = a - b */ +void fp_sub_d(fp_int *a, fp_digit b, fp_int *c) +{ + fp_int tmp; + fp_set(&tmp, b); + fp_sub(a, &tmp, c); +} + + +/* CyaSSL callers from normal lib */ + +/* init a new mp_int */ +int mp_init (mp_int * a) +{ + if (a) + fp_init(a); + return MP_OKAY; +} + +/* clear one (frees) */ +void mp_clear (mp_int * a) +{ + fp_zero(a); +} + +/* handle up to 6 inits */ +int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, mp_int* f) +{ + if (a) + fp_init(a); + if (b) + fp_init(b); + if (c) + fp_init(c); + if (d) + fp_init(d); + if (e) + fp_init(e); + if (f) + fp_init(f); + + return MP_OKAY; +} + +/* high level addition (handles signs) */ +int mp_add (mp_int * a, mp_int * b, mp_int * c) +{ + fp_add(a, b, c); + return MP_OKAY; +} + +/* high level subtraction (handles signs) */ +int mp_sub (mp_int * a, mp_int * b, mp_int * c) +{ + fp_sub(a, b, c); + return MP_OKAY; +} + +/* high level multiplication (handles sign) */ +int mp_mul (mp_int * a, mp_int * b, mp_int * c) +{ + fp_mul(a, b, c); + return MP_OKAY; +} + +/* d = a * b (mod c) */ +int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) +{ + return fp_mulmod(a, b, c, d); +} + +/* c = a mod b, 0 <= c < b */ +int mp_mod (mp_int * a, mp_int * b, mp_int * c) +{ + return fp_mod (a, b, c); +} + +/* hac 14.61, pp608 */ +int mp_invmod (mp_int * a, mp_int * b, mp_int * c) +{ + return fp_invmod(a, b, c); +} + +/* this is a shell function that calls either the normal or Montgomery + * exptmod functions. Originally the call to the montgomery code was + * embedded in the normal function but that wasted alot of stack space + * for nothing (since 99% of the time the Montgomery code would be called) + */ +int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) +{ + return fp_exptmod(G, X, P, Y); +} + +/* compare two ints (signed)*/ +int mp_cmp (mp_int * a, mp_int * b) +{ + return fp_cmp(a, b); +} + +/* compare a digit */ +int mp_cmp_d(mp_int * a, mp_digit b) +{ + return fp_cmp_d(a, b); +} + +/* get the size for an unsigned equivalent */ +int mp_unsigned_bin_size (mp_int * a) +{ + return fp_unsigned_bin_size(a); +} + +/* store in unsigned [big endian] format */ +int mp_to_unsigned_bin (mp_int * a, unsigned char *b) +{ + fp_to_unsigned_bin(a,b); + return MP_OKAY; +} + +/* reads a unsigned char array, assumes the msb is stored first [big endian] */ +int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) +{ + fp_read_unsigned_bin(a, (unsigned char *)b, c); + return MP_OKAY; +} + + +int mp_sub_d(fp_int *a, fp_digit b, fp_int *c) +{ + fp_sub_d(a, b, c); + return MP_OKAY; +} + + +/* fast math conversion */ +int mp_copy(fp_int* a, fp_int* b) +{ + fp_copy(a, b); + return MP_OKAY; +} + + +/* fast math conversion */ +int mp_isodd(mp_int* a) +{ + return fp_isodd(a); +} + + +/* fast math conversion */ +int mp_iszero(mp_int* a) +{ + return fp_iszero(a); +} + + +/* fast math conversion */ +int mp_count_bits (mp_int* a) +{ + return fp_count_bits(a); +} + + +int mp_leading_bit (mp_int* a) +{ + return fp_leading_bit(a); +} + + +/* fast math conversion */ +void mp_rshb (mp_int* a, int x) +{ + fp_rshb(a, x); +} + + +/* fast math wrappers */ +int mp_set_int(fp_int *a, fp_digit b) +{ + fp_set(a, b); + return MP_OKAY; +} + + +#if defined(CYASSL_KEY_GEN) || defined (HAVE_ECC) + +/* c = a * a (mod b) */ +int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c) +{ + fp_int tmp; + fp_zero(&tmp); + fp_sqr(a, &tmp); + return fp_mod(&tmp, b, c); +} + +/* fast math conversion */ +int mp_sqrmod(mp_int *a, mp_int *b, mp_int *c) +{ + return fp_sqrmod(a, b, c); +} + +/* fast math conversion */ +int mp_montgomery_calc_normalization(mp_int *a, mp_int *b) +{ + fp_montgomery_calc_normalization(a, b); + return MP_OKAY; +} + +#endif /* CYASSL_KEYGEN || HAVE_ECC */ + + +#ifdef CYASSL_KEY_GEN + +void fp_gcd(fp_int *a, fp_int *b, fp_int *c); +void fp_lcm(fp_int *a, fp_int *b, fp_int *c); +int fp_isprime(fp_int *a); +int fp_cnt_lsb(fp_int *a); + +int mp_gcd(fp_int *a, fp_int *b, fp_int *c) +{ + fp_gcd(a, b, c); + return MP_OKAY; +} + + +int mp_lcm(fp_int *a, fp_int *b, fp_int *c) +{ + fp_lcm(a, b, c); + return MP_OKAY; +} + + +int mp_prime_is_prime(mp_int* a, int t, int* result) +{ + (void)t; + *result = fp_isprime(a); + return MP_OKAY; +} + + + +static int s_is_power_of_two(fp_digit b, int *p) +{ + int x; + + /* fast return if no power of two */ + if ((b==0) || (b & (b-1))) { + return 0; + } + + for (x = 0; x < DIGIT_BIT; x++) { + if (b == (((fp_digit)1)< cb + d == a */ +static int fp_div_d(fp_int *a, fp_digit b, fp_int *c, fp_digit *d) +{ + fp_int q; + fp_word w; + fp_digit t; + int ix; + + /* cannot divide by zero */ + if (b == 0) { + return FP_VAL; + } + + /* quick outs */ + if (b == 1 || fp_iszero(a) == 1) { + if (d != NULL) { + *d = 0; + } + if (c != NULL) { + fp_copy(a, c); + } + return FP_OKAY; + } + + /* power of two ? */ + if (s_is_power_of_two(b, &ix) == 1) { + if (d != NULL) { + *d = a->dp[0] & ((((fp_digit)1)<used; + q.sign = a->sign; + w = 0; + for (ix = a->used - 1; ix >= 0; ix--) { + w = (w << ((fp_word)DIGIT_BIT)) | ((fp_word)a->dp[ix]); + + if (w >= b) { + t = (fp_digit)(w / b); + w -= ((fp_word)t) * ((fp_word)b); + } else { + t = 0; + } + q.dp[ix] = (fp_digit)t; + } + + if (d != NULL) { + *d = (fp_digit)w; + } + + if (c != NULL) { + fp_clamp(&q); + fp_copy(&q, c); + } + + return FP_OKAY; +} + + +/* c = a mod b, 0 <= c < b */ +static int fp_mod_d(fp_int *a, fp_digit b, fp_digit *c) +{ + return fp_div_d(a, b, NULL, c); +} + + +/* Miller-Rabin test of "a" to the base of "b" as described in + * HAC pp. 139 Algorithm 4.24 + * + * Sets result to 0 if definitely composite or 1 if probably prime. + * Randomly the chance of error is no more than 1/4 and often + * very much lower. + */ +static void fp_prime_miller_rabin (fp_int * a, fp_int * b, int *result) +{ + fp_int n1, y, r; + int s, j; + + /* default */ + *result = FP_NO; + + /* ensure b > 1 */ + if (fp_cmp_d(b, 1) != FP_GT) { + return; + } + + /* get n1 = a - 1 */ + fp_init_copy(&n1, a); + fp_sub_d(&n1, 1, &n1); + + /* set 2**s * r = n1 */ + fp_init_copy(&r, &n1); + + /* count the number of least significant bits + * which are zero + */ + s = fp_cnt_lsb(&r); + + /* now divide n - 1 by 2**s */ + fp_div_2d (&r, s, &r, NULL); + + /* compute y = b**r mod a */ + fp_init(&y); + fp_exptmod(b, &r, a, &y); + + /* if y != 1 and y != n1 do */ + if (fp_cmp_d (&y, 1) != FP_EQ && fp_cmp (&y, &n1) != FP_EQ) { + j = 1; + /* while j <= s-1 and y != n1 */ + while ((j <= (s - 1)) && fp_cmp (&y, &n1) != FP_EQ) { + fp_sqrmod (&y, a, &y); + + /* if y == 1 then composite */ + if (fp_cmp_d (&y, 1) == FP_EQ) { + return; + } + ++j; + } + + /* if y != n1 then composite */ + if (fp_cmp (&y, &n1) != FP_EQ) { + return; + } + } + + /* probably prime now */ + *result = FP_YES; +} + + +/* a few primes */ +static const fp_digit primes[256] = { + 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, + 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, + 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, + 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, 0x0083, + 0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD, + 0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF, + 0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107, + 0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137, + + 0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167, + 0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199, + 0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9, + 0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7, + 0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239, + 0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265, + 0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293, + 0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF, + + 0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301, + 0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B, + 0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371, + 0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD, + 0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5, + 0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419, + 0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449, + 0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B, + + 0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7, + 0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503, + 0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529, + 0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F, + 0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3, + 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, + 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, + 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 +}; + +int fp_isprime(fp_int *a) +{ + fp_int b; + fp_digit d = 0; + int r, res; + + /* do trial division */ + for (r = 0; r < 256; r++) { + fp_mod_d(a, primes[r], &d); + if (d == 0) { + return FP_NO; + } + } + + /* now do 8 miller rabins */ + fp_init(&b); + for (r = 0; r < 8; r++) { + fp_set(&b, primes[r]); + fp_prime_miller_rabin(a, &b, &res); + if (res == FP_NO) { + return FP_NO; + } + } + return FP_YES; +} + + +/* c = [a, b] */ +void fp_lcm(fp_int *a, fp_int *b, fp_int *c) +{ + fp_int t1, t2; + + fp_init(&t1); + fp_init(&t2); + fp_gcd(a, b, &t1); + if (fp_cmp_mag(a, b) == FP_GT) { + fp_div(a, &t1, &t2, NULL); + fp_mul(b, &t2, c); + } else { + fp_div(b, &t1, &t2, NULL); + fp_mul(a, &t2, c); + } +} + + +static const int lnz[16] = { + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +}; + +/* Counts the number of lsbs which are zero before the first zero bit */ +int fp_cnt_lsb(fp_int *a) +{ + int x; + fp_digit q, qq; + + /* easy out */ + if (fp_iszero(a) == 1) { + return 0; + } + + /* scan lower digits until non-zero */ + for (x = 0; x < a->used && a->dp[x] == 0; x++); + q = a->dp[x]; + x *= DIGIT_BIT; + + /* now scan this digit until a 1 is found */ + if ((q & 1) == 0) { + do { + qq = q & 15; + x += lnz[qq]; + q >>= 4; + } while (qq == 0); + } + return x; +} + + +/* c = (a, b) */ +void fp_gcd(fp_int *a, fp_int *b, fp_int *c) +{ + fp_int u, v, r; + + /* either zero than gcd is the largest */ + if (fp_iszero (a) == 1 && fp_iszero (b) == 0) { + fp_abs (b, c); + return; + } + if (fp_iszero (a) == 0 && fp_iszero (b) == 1) { + fp_abs (a, c); + return; + } + + /* optimized. At this point if a == 0 then + * b must equal zero too + */ + if (fp_iszero (a) == 1) { + fp_zero(c); + return; + } + + /* sort inputs */ + if (fp_cmp_mag(a, b) != FP_LT) { + fp_init_copy(&u, a); + fp_init_copy(&v, b); + } else { + fp_init_copy(&u, b); + fp_init_copy(&v, a); + } + + fp_zero(&r); + while (fp_iszero(&v) == FP_NO) { + fp_mod(&u, &v, &r); + fp_copy(&v, &u); + fp_copy(&r, &v); + } + fp_copy(&u, c); +} + +#endif /* CYASSL_KEY_GEN */ + + +#if defined(HAVE_ECC) || !defined(NO_PWDBASED) +/* c = a + b */ +void fp_add_d(fp_int *a, fp_digit b, fp_int *c) +{ + fp_int tmp; + fp_set(&tmp, b); + fp_add(a,&tmp,c); +} + +/* external compatibility */ +int mp_add_d(fp_int *a, fp_digit b, fp_int *c) +{ + fp_add_d(a, b, c); + return MP_OKAY; +} + +#endif /* HAVE_ECC || !NO_PWDBASED */ + + +#ifdef HAVE_ECC + +/* chars used in radix conversions */ +static const char *fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; + +static int fp_read_radix(fp_int *a, const char *str, int radix) +{ + int y, neg; + char ch; + + /* make sure the radix is ok */ + if (radix < 2 || radix > 64) { + return FP_VAL; + } + + /* if the leading digit is a + * minus set the sign to negative. + */ + if (*str == '-') { + ++str; + neg = FP_NEG; + } else { + neg = FP_ZPOS; + } + + /* set the integer to the default of zero */ + fp_zero (a); + + /* process each digit of the string */ + while (*str) { + /* if the radix < 36 the conversion is case insensitive + * this allows numbers like 1AB and 1ab to represent the same value + * [e.g. in hex] + */ + ch = (char) ((radix < 36) ? XTOUPPER(*str) : *str); + for (y = 0; y < 64; y++) { + if (ch == fp_s_rmap[y]) { + break; + } + } + + /* if the char was found in the map + * and is less than the given radix add it + * to the number, otherwise exit the loop. + */ + if (y < radix) { + fp_mul_d (a, (fp_digit) radix, a); + fp_add_d (a, (fp_digit) y, a); + } else { + break; + } + ++str; + } + + /* set the sign only if a != 0 */ + if (fp_iszero(a) != FP_YES) { + a->sign = neg; + } + return FP_OKAY; +} + +/* fast math conversion */ +int mp_read_radix(mp_int *a, const char *str, int radix) +{ + return fp_read_radix(a, str, radix); +} + +/* fast math conversion */ +int mp_set(fp_int *a, fp_digit b) +{ + fp_set(a,b); + return MP_OKAY; +} + +/* fast math conversion */ +int mp_sqr(fp_int *A, fp_int *B) +{ + fp_sqr(A, B); + return MP_OKAY; +} + +/* fast math conversion */ +int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) +{ + fp_montgomery_reduce(a, m, mp); + return MP_OKAY; +} + + +/* fast math conversion */ +int mp_montgomery_setup(fp_int *a, fp_digit *rho) +{ + return fp_montgomery_setup(a, rho); +} + +int mp_div_2(fp_int * a, fp_int * b) +{ + fp_div_2(a, b); + return MP_OKAY; +} + + +int mp_init_copy(fp_int * a, fp_int * b) +{ + fp_init_copy(a, b); + return MP_OKAY; +} + + + +#endif /* HAVE_ECC */ + +#endif /* USE_FAST_MATH */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po new file mode 100644 index 00000000..d1f55ba9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po @@ -0,0 +1,202 @@ +ctaocrypt/test/test.o: ctaocrypt/test/test.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/md2.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/pwdbased.h \ + cyassl/ctaocrypt/ripemd.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h ctaocrypt/test/test.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/md2.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/md4.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/sha512.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/coding.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/pwdbased.h: + +cyassl/ctaocrypt/ripemd.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +ctaocrypt/test/test.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po new file mode 100644 index 00000000..934f747b --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po @@ -0,0 +1,202 @@ +ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/md2.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/pwdbased.h \ + cyassl/ctaocrypt/ripemd.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h ctaocrypt/test/test.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/md2.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/md4.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/sha512.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/coding.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/pwdbased.h: + +cyassl/ctaocrypt/ripemd.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +ctaocrypt/test/test.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt b/project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt new file mode 100755 index 0000000000000000000000000000000000000000..765ccaf74b268f64a05b33027d3275d72a293641 GIT binary patch literal 22418 zcmeHPdwf(ymaagHEn*T75H+I>HW&~>0s*5UCXj?zfRKcTf;3IKla6$fwz~s~6Gxa% zkWAAW9b{2q26cRm=-{G=h!6}t|Mg&yW?DtjOo7`N&?)uw5_8)G3 zm8!4KsZ&*_PCf4Jd(Q(|IoUBWF+#sOh>n72^+OhGDq`;_MM)JlahXUI*NX(v30b72 zE(8yP4Fwo3L7oMnBSHai!6J*5;Ywfz(vU3!A|X(gp=PiU3@k6=6@Ax8A$D!HSQ!#J zKt2NNB^^m|4)k-NG3Y``XB`Y4ROCV344J?TIxY8b(AAVAMAIu4D}x<02Aw_ybing2 z%18Ag4|HSu(oh!z%d>xjy(M!8dtHOPC1n+rNrCdDA&SPbq>q_275`N~D6V|X|HcY#S*;f6sA#u<|U&cmg7x_Qa0b=4@ z6aVKX{rCxgW5WGS z_}@|fs|Ku9lqIef-vdWm@HL_WIQ2P;mFqxP5hsqc;lD<_i2Q+JRlb|JTx^8=?%=1q zZUWOAYffR6GZ64{!5JnT;|eA^TyDR+xFisC`wJ$H_Li5q3!HPkZsBkgmzI|~0zs!g z=x_+f`1y`Jjc>FUBHRI0yxqbX?!f4|g;`~V{wiNkj4gE*PW8E*LARLb8kSvB=Jbk8 z&jfc>rn|7*r9Op{rcmhE@DQ3ok#n9k$T%OgM6S>l(~X>6lC?!tL_6=ek_rEc&C zOUjA^l8*KZij&Qk4X>E%Eotd#hQBaXm#^BO>wtYxg~*fZFE4Zllt}at+Q=w|RM~K? zJX(^UpW~S3_Lme@2}cn$A{E(6)^ygYN2M!G(`pEG6=>4(ONz?`*fbtpt2!4OnO9aU z>rul5UX?({wL+>El?!_+r6~=kW%+_0zuV~|PL`IYD2{QHVMVTzGDk(g?Go-vjBHW4 z&s`>b6~Tb;`Af=zMIsRNdy!S@E)BSYj0#JAGV)c4qC#(Zz%5FhUW~LTVkIz7+OlSz zrOuKv=EG{;Ff%8pa{~cIL{^zgjL8`{YP4fWQc6oInUg}hFpY3^kb5Rm+(Xq4DibnI z9>u3(ox5X8uFiX*I0pN={>MGOgO~?_`X1V~q~r?L{G*l^FL4K9QH>Gjwpgs460iqj zJ-8I}I-W6jyEDdu(2Fq+M+uCv@!J?*iZcsitN@9OFT?u4xU&$+j4#J}!nh0042;o& z5sa}^q%)4gnTRnOIhJu(A#xaFvCL(R16u)O97<*|?jgi1#yy3Y!}uy8T#Rve@i4v` zOAzC0gzz!GR)`>D^sAEbuY{;(e4P*r8DEb*jIm9KC5(Fuv6OKiA?g|5AjC4pb|F?U z?kmJf#{F0g;!1!h%@cz#LI}|i5nzdLEMXY zt;8#dZN#f3UQL`xTrcsTh?9vIO8f#bZ%2;!Bwj->S^Z_XRR8hV0FPva+G~x~afVe?l z;a})%rv)*MGz@_`dwOc!;n1;OJ1ut7nwxevM%I(Gfl%^qJ=>w~ovq(oAJg=~*@~D( zd0?*Hrx&ctv|IGT`*t_hosMk6iiEZ8b_x&`S4#QTXf;%@;}Yh@?EVfdd#VXHtf>Eb zy&*kY8bS&ha-<4H>W>8Qzo@=GfBLl0v3Q!Bn7OENYBH9cYP)Uc7%Rxl(f6T%(Af@g zwGTpHQ4jWvx*fHr<7)o|7zrhR+uU4du}7oOWAs_9TZ*_`5_2`;9uhZWmr+CxOeEyf zh_8_N3br0aTp)?{8u1Yl4`V-4#3D&ts}X}FCRlaiR7q^oh|@{T$Bv~+W=i4-jd&}G zqp^J{;!sJ9{}0ubUy+!BJxvk&NMf=^6eLc>MyH5fB{5ece)$uK%dz_@qL4(NM%+Q- z-WK9H;6Qf*I!0up)HK|C-XaU}Glq9#W|e^#kf(9$phI9%fg(w z&`LN5Wirmy?Ik}{1^HIWkA8fXCxwdck%=*(?dL)}<5Lu(-EYB}?HU3Ael zsuJdNccaqmdn|>(S?|CZCbCXyHfWEJgqEmYbcgg_npP9|>?jgir6{&YXunFa1&L{( zAs(oBZaO0M1kLYIT9uklS3DyW&rwwxn)fPhsriM9Cr9#B+db^{rZeo=2FHo!<_cfk ziAWHOQ>MKOPN5>=wHMTFJ=!@OJF2e0-X*jnKAe3Pim^hWQe!^alUJo{kPc^`l6o5` z^~PGFtEBjf_%H-S#-D-Ke(3m{SB`cHqmDBN7Hy-N3|ia7G6>XKf1Cg#Z%M6HQ){29 z-nP-24Xj43EmFO0qczEsY0sr`B%PMMor&JY)rMKvYfs#uje+WP(4Ktsitzns!&#yk zjSOv%mtC&La-a#hObNM*DjQGh(Fv=ik!-k=gp_dBF@q7Y5z%^C5Xyku$XKb2nBOdG zRR()+PzE1a>B>mJu{aWXUUjcmB(zqg614HMSy2?@W>*tttD+`GLSLxVK+uvC6i=$+ zIj$&akx-v+q(O}UPdZM~l#@xGEz(Y2`UrazdfC11Kf+0M1MSg`=mmP#1tV{*`#uZ` z`ac8OML9nG5YZXmOD#{K9`1+DgkxK#pyG@cDUMun%tZ0ARFx(s`h(K%WD-Y)v(IU? zv8oC+AG4%@ifbd2F&{0Vo!`PbVO-4}>h{JxGznWPrscu9vx~M-i3Xik8+5uW(V$aI zxpT_E?9i!P@HCxj(@xVVrrq62Uvk=MI@P9~rc+Eizv7Y8PSdHJcA8EPDV-+hI;B3^ z=rjS!@Mt^wWQp-+)etDO!}d~NJh@wD3MgYDQUdD`l<#ZIY@Haex9>N>?q zOGMZHQ|ffWg>|}Fag5h>s@tj5=@g~#aVDLP)pW|HMOR4yzg(wl&_I3e+i=SqdFciA zevN%B2$9fwf*N}cz|IWx3Jh!`z%##PHQojmINmc zp^?xoRe@J=`dT@IS~3!vr6gBM{tpy?HNZx>Y=n=&#J6B`=NKfSkqbfMu7V_=eKUEq z7uJ=;aHc&qoHz(Da{r0c*m-}1tsIA&%b{_dfTMOQ20aZU68-KZHmEUNOuC@PWW-jKTZyJ1$-TaA zNA&tu9@I|yQqs4}N;Ek?VYtI%PJ|ygCu?C@EQ+rq7jx%Uh)xZspK2kYK~G2$nqtRV znHZOKrXm5m;lRlFZ{=K^NF zWZeTyaSz&Le*sFtmX2i@=WCeHz32_L_P=8c;%eVPP9#)J?o6!Zs`n$PHTFQ2>cvtw zp}7<-g$C`tpczV(ixBk#iH9JuA_(nh<*lfkzZas{+M%h76qSA)s#3LSRaj;I668b7 zL5dj^2|cVD#bJ~J!>(}ZqwxFxR_J(lMe)#KY0BYPZI`#g2H?s>feG#9m-_4k&cb5-n; z;*mOHk~&fqNL{Ry)*<_+4il=Gs{0OA`{$aXjvEw3Q3gc~1E*BfXDx~Xhrx!9!K8FW z?d?rl_>5DQ+wN=jHPnDQ?aG~C0dD0Yp%Xg88v6<|7>;$*c(3Qh89-Uyffn`h+`t2b z+NB*z7gyoFF0OVjW$0zr*c%9?$as`)EpwA9(^Hmt5|qfgOIaJ|BTo;l=E}OFvp~a0 zUJ3RJpT=OtElV$hq9x-Eim@9R$FSX+q9yS(Gz%%)sOSNa(Dkg4s%bgcsQ&Eb0MHy8 zbuCk^Qp@?co8o=2uH$(&v^*}}1lUPXc1q0s34C>Pme&!u_F z`KC^UJ0J%7r3T_^Poj)81T5c}Anb~!kZ7#Z)F+Z}H~1oI$Ah6npN442*e_`>D;eF< zqIk#{KnSY~XJWtLz#)rbkK%^LQ?qArD}aVKfnG5^oQdt0y$UU$eDv!w z#@lPZ-LMx7!Qpb~+A)G|R4}C7#~TZng1oJO^<4v;(tsOeeL;$ZdQ+mT!|;HGwjX^P zH?A;KnNEQ~bu+ybPm}Zs&<#ICU;->b7Oxh=MT1>hgJ-ZMFxn08Lu6ddaLsZfYwW&D zp&PZ1@r{iZ1D?hy7CH|FF z);4miS{unCx)j=)R%D?n@}4ZhC#bv|r3&9bBOq&!B*=$$I6tAo&{=oL@!|0Xk~I7p zl}qV9KFOnWbs~~I!01ij1C|}2R~iIxdMW|cx`0h~A2h;_X#(^G{@d6vefRQ&>VTTV9T`Tuw_A2hm`}sv1r@CC-|&l2Sl7s6lV*B+A;lVYh5+MLLA)b?Z9sg5E&2yTDOlLrGmt%TUrFs1}e$ zOUqO1J03RcCipN`*DzKZ9$7h^pvo?os@6KFy9>q?wD{1rUNak08XBigPidZ(AMFbR z!{c8R3>`}d<8&KY_a2UY(UQZcHna=L{yVn*+@bb#@J96<8#2;h3LH=*QxRL5m%T;C z(9W1!&Qu%>ZA+Lr+i`c}(JShW*LRKD?_BH9gGG&B;%B{({9#MZ7WMlnf8QKcQQ~#k z<_B#4in1VnO1G6dgC1LHNdR%7r?Z%tIm{-npgRz>6*)`1ZddQlB7bbg1+oX>T>zV{ zE%(@o8KVbLQajm{)P6PvwWVa_jZST+F_~HU?KKA3L)+obXrDVTV^ZeiiQsQrWnO-} z9nBo8YBX^>=N5|knA{a3_Dx>9fB7BvC;t5bKYk()1f0cgo2#T4Iut+5E4jb=jo(M| z?i!r(=abGRfkG~KQL(4wo_XHVvU1C4?y*NpqOq~4dVzfZjQ_{ia7IxV_q@7RY zKC|2GIXln(Qw7ul6(MR?jLb~9ZC}~OSH?f}!<7Dq4`=&M3g`dxC0?F+$ESPpiYwm< zts30py65vBpWSb@ut)B3?(3Ac;c!F0-**`~=ay$ie08U*xp(pDW8Z#s^{1V-it+9u zw-{SuEAZfL9`Wch|9!*L-b%Rg)I(=`gwL%K3p~!C%~fuza@rO+%P`f-{kF35pa<`@ z+#xEuRF1r7?du)Cd7&(&^WATxiO+xWC8ljo&HGjNoF$)b*g5n>blqujc{`W*b32zf ze(vBshmQ_^dS9^T$0utJuI&3nb(QFLcVN_;Yr6jRk!PMb^}DBjJ-P5?#fM_S$QQ30 zzA!escH)MkO^+;kzW<$4f~&6UtrMR=1efWv<(XYh)KaKOgTl{yt`?g}^Zzs&^IqKJ+Jk@Q$U6}*=9&=3;8!LNm zc{pb8HyIh}U)=plpBvV8bUw5Es{2;H7T@grr|9vrSbtT@;;EPTUH=|#SpU<_OCLI! zy%{f0q~xI9(|Ch^8-n8Ub?}*)@+n?`uUlhkbvv%I?Y zPRW?!ym!&))%}0-LCx9NI#OE>Iv=hNG6c^9C!?0pxew`_tYmbP1=iHLr*-4olT8#c%D z>1}t(^XYB3%Xa8(_RaI@Z8y;K=`q)Kyv>Gw;4mo`e%9PP0&x?55SW8F9X}?mM9gOt zykhRl6EW4+m}|ROEd1TuhCDuyAAxeb0~N8>?AR{j<1PP5lVX!QjE(J{(HI+_u_Lxi#?Dx4#`ahX9~D$1 ztVCIyV=rD8HE>Y_7d3EE0~a-LQ3Dq>a8UynHE>Y_7d3EE0~a-LQ3JnF1HOkX)?5S@ zyZO%+>(ehYU#0vU(iDS8jJN+q;bnH^e_cCuCJORH2$#25& zDV4nVh(X}X06q&?jmr640*7f*C6hOm>uIc^o;Q%PC4GZv*I_Xa<&<- zfRyiFqWTW_i!S;7yjG$JeVvc67-2cWa|r7Zb|CCW_!{9fLZ_t`YfprJ2*VMw5vCy& zAT(-zrT2hEsltViHCCMt4 zczmcSk_yX9OYyW^AB+D@%=tyT=Dd(TBmijp`b8SA8xZh=yyTO<9zd`G>lf!FuM`BG zZwcljpY_=#Mg7zHG6C^uuAKF99)}9j{syG=i+sEuM9}$i z!Iuj@`5aYJ)!IkiM-6=RGqM_=efYWPX%}_Ji*JqT^7yTL_kOLGk5*5`K9v$5{F*8QIz<^6Gr= zA|0pkald%)0(|?y!~W7l_%T@11^7NS@O=cnkHD9RJpIz^jUt0%MtRa#3iwz7^LUYu zYC4Ia*UN8_&)w15c90|=c~2YoxNnK{wthdz!_aKt`wV=afzL1;Eqb{Gl`^00;}>#Y zfsf_&OHX$OAKOP;=S4ohOsRjQF>t@6Ed836fpvof?b4HsX)F4bIR@hk+rJJOqY+py zZIE-rDDR_OAvWvE15KBQ>d!fz~3iCA5>Pw=dT*)v`F<%v(GavIu+dn%Bo_^H%hjB+~ z@oJtaOv_fjbQGrMgy6hUn4_Z3O$zfgqs~nVtCgMhuCV%bhIXy6IxXqvl#Ze&vjy!` z(Y1wx_K2&a^ri#5Y{5LWwff%ZC{JxNOaAL9u5B}p7ICtf8qnJlgHstL9MbgB0s6pl zAmX*NCUFL^e)c4u4lKX;L>zB|=R4l>I-fv*Qv<>SP?z@I>VFHQaf zz*`LXA>ii?_>aKH4fs{y2Z5>5Fks6?{eFXtg@4iY-&LFi zHjaM_GZN&tU<&KwN$)E?fOY$ffqh;FtdA$@DV*|}J;uO3#{lzNW@dMzy)dC&oE>vb znBPq3mko(};3n83SBh>Ot`N@w>-KJgwZ3ZLr#!PSq9)MO9<^BSLO)slZzlf3CVbk2 zI~f*5%9kG@BIZSWqlrEQSbh}^8hzi~Vxni5aJ~u82JZ6*obR>v7MtkhCcMam9|ku1 z%6ZI0e+GCp=Hm+Vllu5q6MZxA2an@EP^0fM(LXWagTNm@hVz-$-fvCxpMk&lBkn&D zvp)Lx&@bxmY7^!=yZZQ2e<>zkTA88GXA1o)6uUtoFUor#_|f0vUQMHaVxk{0;ZFKN6=hkz zrwLyNyc+#;N;=kK6a5Yoo?^nYfTLRf;;}wEf%W~4^U(v$b0nKZUrgnu@>RgC_I!<~ z1@@pla2X=||2q@^?|~0KZL!j)7WMNaaQ}a4wT~A~{I8qv78BlW!XKLO=O+BM0o%~V zAAy&^{&;`F_H;6wX{hgBCTut1WMIAjw2u+M_pfN}&qNddbOUDn_Zl$kTV%pZP524m zFP^kmuhs158DOI?tQSrEq7ZLs1uO6ZS0UU5jUS!o$QhSk08dw~{;(XuQU_cQmBH1O z?&Zpm<#4#l9mU@AxlXUc6)g7$9L|bLfje2B*Bx}bl7g{CsMV-(3i08tAIHWYLS0+EQ&RXf3LUTEz}Wc3#HBEJxO)Ogb`? zW38w8*rP?g@G6yg=cJ5@<3@waK#@Msgkwz3*~C`B?>yf{al)SrjMzP!$F$ zl#8x$5U4z4!Ks(o!`OfCZ>=(IcoJSNbodG#K~F{5yrj96g3m}aKUPYr=7dXm%}P(# z{aPgpeT3RLLWA3{+%^u%=p?I6DLC5lRT*;S>`PR~UsCngTEt+EV^QI4e zi_r*gCo}Yh$&_XPB{af554P zDyL#b65YE&Zxi4x4zssa|MXU7{@yRJ<}1MbX`Yl zRJ4@L1>q$({d(1zCGfO|x34bdA2 pMkS`zJD!~4`fkz2p`xy8y&`F;%FeVdPHR~xl~m;gv0Yz;{{^637^(mO literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/include.am b/project1/cyassl-3.0.0/ctaocrypt/test/include.am new file mode 100644 index 00000000..d5c550bc --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root + +noinst_PROGRAMS+= ctaocrypt/test/testctaocrypt +ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c +ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la +ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la +noinst_HEADERS += ctaocrypt/test/test.h +EXTRA_DIST += ctaocrypt/test/test.sln +EXTRA_DIST += ctaocrypt/test/test.vcproj +DISTCLEANFILES+= ctaocrypt/test/.libs/testctaocrypt diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.c b/project1/cyassl-3.0.0/ctaocrypt/test/test.c new file mode 100644 index 00000000..e19675bd --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/test.c @@ -0,0 +1,4758 @@ +/* test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef XMALLOC_USER + #include /* we're using malloc / free direct here */ +#endif + +#ifndef NO_CRYPT_TEST + +#ifdef CYASSL_TEST_CERT + #include +#else + #include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_ECC + #include +#endif +#ifdef HAVE_BLAKE2 + #include +#endif +#ifdef HAVE_LIBZ + #include +#endif +#ifdef HAVE_PKCS7 + #include +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +#ifdef OPENSSL_EXTRA + #include + #include + #include + #include +#endif + + +#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) + /* include test cert and key buffers for use with NO_FILESYSTEM */ + #if defined(CYASSL_MDK_ARM) + #include "cert_data.h" + /* use certs_test.c for initial data, so other + commands can share the data. */ + #else + #include + #endif +#endif + +#if defined(CYASSL_MDK_ARM) + #include + #include + extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; + #define fopen CyaSSL_fopen +#endif + +#ifdef HAVE_NTRU + #include "crypto_ntru.h" +#endif +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif + +#ifdef FREESCALE_MQX + #include + #include + #include +#else + #include +#endif + + +#ifdef THREADX + /* since just testing, use THREADX log printf instead */ + int dc_log_printf(char*, ...); + #undef printf + #define printf dc_log_printf +#endif + +#include "ctaocrypt/test/test.h" + + +typedef struct testVector { + const char* input; + const char* output; + size_t inLen; + size_t outLen; +} testVector; + +int md2_test(void); +int md5_test(void); +int md4_test(void); +int sha_test(void); +int sha256_test(void); +int sha512_test(void); +int sha384_test(void); +int hmac_md5_test(void); +int hmac_sha_test(void); +int hmac_sha256_test(void); +int hmac_sha384_test(void); +int hmac_sha512_test(void); +int hmac_blake2b_test(void); +int hkdf_test(void); +int arc4_test(void); +int hc128_test(void); +int rabbit_test(void); +int des_test(void); +int des3_test(void); +int aes_test(void); +int aesgcm_test(void); +int gmac_test(void); +int aesccm_test(void); +int camellia_test(void); +int rsa_test(void); +int dh_test(void); +int dsa_test(void); +int random_test(void); +int pwdbased_test(void); +int ripemd_test(void); +int openssl_test(void); /* test mini api */ +int pbkdf1_test(void); +int pkcs12_test(void); +int pbkdf2_test(void); +#ifdef HAVE_ECC + int ecc_test(void); + #ifdef HAVE_ECC_ENCRYPT + int ecc_encrypt_test(void); + #endif +#endif +#ifdef HAVE_BLAKE2 + int blake2b_test(void); +#endif +#ifdef HAVE_LIBZ + int compress_test(void); +#endif +#ifdef HAVE_PKCS7 + int pkcs7enveloped_test(void); + int pkcs7signed_test(void); +#endif + + + +static void err_sys(const char* msg, int es) +{ + printf("%s error = %d\n", msg, es); + #if !defined(THREADX) && !defined(CYASSL_MDK_ARM) + if (msg) + exit(es); + #endif + return; +} + +/* func_args from test.h, so don't have to pull in other junk */ +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + + + +void ctaocrypt_test(void* args) +{ + int ret = 0; + + ((func_args*)args)->return_code = -1; /* error state */ + +#if !defined(NO_BIG_INT) + if (CheckCtcSettings() != 1) + err_sys("Build vs runtime math mismatch\n", -1234); + +#ifdef USE_FAST_MATH + if (CheckFastMathSettings() != 1) + err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235); +#endif /* USE_FAST_MATH */ +#endif /* !NO_BIG_INT */ + + +#ifndef NO_MD5 + if ( (ret = md5_test()) != 0) + err_sys("MD5 test failed!\n", ret); + else + printf( "MD5 test passed!\n"); +#endif + +#ifdef CYASSL_MD2 + if ( (ret = md2_test()) != 0) + err_sys("MD2 test failed!\n", ret); + else + printf( "MD2 test passed!\n"); +#endif + +#ifndef NO_MD4 + if ( (ret = md4_test()) != 0) + err_sys("MD4 test failed!\n", ret); + else + printf( "MD4 test passed!\n"); +#endif + +#ifndef NO_SHA + if ( (ret = sha_test()) != 0) + err_sys("SHA test failed!\n", ret); + else + printf( "SHA test passed!\n"); +#endif + +#ifndef NO_SHA256 + if ( (ret = sha256_test()) != 0) + err_sys("SHA-256 test failed!\n", ret); + else + printf( "SHA-256 test passed!\n"); +#endif + +#ifdef CYASSL_SHA384 + if ( (ret = sha384_test()) != 0) + err_sys("SHA-384 test failed!\n", ret); + else + printf( "SHA-384 test passed!\n"); +#endif + +#ifdef CYASSL_SHA512 + if ( (ret = sha512_test()) != 0) + err_sys("SHA-512 test failed!\n", ret); + else + printf( "SHA-512 test passed!\n"); +#endif + +#ifdef CYASSL_RIPEMD + if ( (ret = ripemd_test()) != 0) + err_sys("RIPEMD test failed!\n", ret); + else + printf( "RIPEMD test passed!\n"); +#endif + +#ifdef HAVE_BLAKE2 + if ( (ret = blake2b_test()) != 0) + err_sys("BLAKE2b test failed!\n", ret); + else + printf( "BLAKE2b test passed!\n"); +#endif + +#ifndef NO_HMAC + #ifndef NO_MD5 + if ( (ret = hmac_md5_test()) != 0) + err_sys("HMAC-MD5 test failed!\n", ret); + else + printf( "HMAC-MD5 test passed!\n"); + #endif + + #ifndef NO_SHA + if ( (ret = hmac_sha_test()) != 0) + err_sys("HMAC-SHA test failed!\n", ret); + else + printf( "HMAC-SHA test passed!\n"); + #endif + + #ifndef NO_SHA256 + if ( (ret = hmac_sha256_test()) != 0) + err_sys("HMAC-SHA256 test failed!\n", ret); + else + printf( "HMAC-SHA256 test passed!\n"); + #endif + + #ifdef CYASSL_SHA384 + if ( (ret = hmac_sha384_test()) != 0) + err_sys("HMAC-SHA384 test failed!\n", ret); + else + printf( "HMAC-SHA384 test passed!\n"); + #endif + + #ifdef CYASSL_SHA512 + if ( (ret = hmac_sha512_test()) != 0) + err_sys("HMAC-SHA512 test failed!\n", ret); + else + printf( "HMAC-SHA512 test passed!\n"); + #endif + + #ifdef HAVE_BLAKE2 + if ( (ret = hmac_blake2b_test()) != 0) + err_sys("HMAC-BLAKE2 test failed!\n", ret); + else + printf( "HMAC-BLAKE2 test passed!\n"); + #endif + + #ifdef HAVE_HKDF + if ( (ret = hkdf_test()) != 0) + err_sys("HMAC-KDF test failed!\n", ret); + else + printf( "HMAC-KDF test passed!\n"); + #endif + +#endif + +#ifdef HAVE_AESGCM + if ( (ret = gmac_test()) != 0) + err_sys("GMAC test passed!\n", ret); + else + printf( "GMAC test passed!\n"); +#endif + +#ifndef NO_RC4 + if ( (ret = arc4_test()) != 0) + err_sys("ARC4 test failed!\n", ret); + else + printf( "ARC4 test passed!\n"); +#endif + +#ifndef NO_HC128 + if ( (ret = hc128_test()) != 0) + err_sys("HC-128 test failed!\n", ret); + else + printf( "HC-128 test passed!\n"); +#endif + +#ifndef NO_RABBIT + if ( (ret = rabbit_test()) != 0) + err_sys("Rabbit test failed!\n", ret); + else + printf( "Rabbit test passed!\n"); +#endif + +#ifndef NO_DES3 + if ( (ret = des_test()) != 0) + err_sys("DES test failed!\n", ret); + else + printf( "DES test passed!\n"); +#endif + +#ifndef NO_DES3 + if ( (ret = des3_test()) != 0) + err_sys("DES3 test failed!\n", ret); + else + printf( "DES3 test passed!\n"); +#endif + +#ifndef NO_AES + if ( (ret = aes_test()) != 0) + err_sys("AES test failed!\n", ret); + else + printf( "AES test passed!\n"); + +#ifdef HAVE_AESGCM + if ( (ret = aesgcm_test()) != 0) + err_sys("AES-GCM test failed!\n", ret); + else + printf( "AES-GCM test passed!\n"); +#endif + +#ifdef HAVE_AESCCM + if ( (ret = aesccm_test()) != 0) + err_sys("AES-CCM test failed!\n", ret); + else + printf( "AES-CCM test passed!\n"); +#endif +#endif + +#ifdef HAVE_CAMELLIA + if ( (ret = camellia_test()) != 0) + err_sys("CAMELLIA test failed!\n", ret); + else + printf( "CAMELLIA test passed!\n"); +#endif + + if ( (ret = random_test()) != 0) + err_sys("RANDOM test failed!\n", ret); + else + printf( "RANDOM test passed!\n"); + +#ifndef NO_RSA + if ( (ret = rsa_test()) != 0) + err_sys("RSA test failed!\n", ret); + else + printf( "RSA test passed!\n"); +#endif + +#ifndef NO_DH + if ( (ret = dh_test()) != 0) + err_sys("DH test failed!\n", ret); + else + printf( "DH test passed!\n"); +#endif + +#ifndef NO_DSA + if ( (ret = dsa_test()) != 0) + err_sys("DSA test failed!\n", ret); + else + printf( "DSA test passed!\n"); +#endif + +#ifndef NO_PWDBASED + if ( (ret = pwdbased_test()) != 0) + err_sys("PWDBASED test failed!\n", ret); + else + printf( "PWDBASED test passed!\n"); +#endif + +#ifdef OPENSSL_EXTRA + if ( (ret = openssl_test()) != 0) + err_sys("OPENSSL test failed!\n", ret); + else + printf( "OPENSSL test passed!\n"); +#endif + +#ifdef HAVE_ECC + if ( (ret = ecc_test()) != 0) + err_sys("ECC test failed!\n", ret); + else + printf( "ECC test passed!\n"); + #ifdef HAVE_ECC_ENCRYPT + if ( (ret = ecc_encrypt_test()) != 0) + err_sys("ECC Enc test failed!\n", ret); + else + printf( "ECC Enc test passed!\n"); + #endif +#endif + +#ifdef HAVE_LIBZ + if ( (ret = compress_test()) != 0) + err_sys("COMPRESS test failed!\n", ret); + else + printf( "COMPRESS test passed!\n"); +#endif + +#ifdef HAVE_PKCS7 + if ( (ret = pkcs7enveloped_test()) != 0) + err_sys("PKCS7enveloped test failed!\n", ret); + else + printf( "PKCS7enveloped test passed!\n"); + + if ( (ret = pkcs7signed_test()) != 0) + err_sys("PKCS7signed test failed!\n", ret); + else + printf( "PKCS7signed test passed!\n"); +#endif + + ((func_args*)args)->return_code = ret; +} + + +#ifndef NO_MAIN_DRIVER + +#ifdef HAVE_CAVIUM + +static int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif /* HAVE_CAVIUM */ + + /* so overall tests can pull in test function */ + + int main(int argc, char** argv) + { + + func_args args; + + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed", -1236); +#endif /* HAVE_CAVIUM */ + + args.argc = argc; + args.argv = argv; + + ctaocrypt_test(&args); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + + return args.return_code; + } + +#endif /* NO_MAIN_DRIVER */ + + +#ifdef CYASSL_MD2 +int md2_test() +{ + Md2 md2; + byte hash[MD2_DIGEST_SIZE]; + + testVector a, b, c, d, e, f, g; + testVector test_md2[7]; + int times = sizeof(test_md2) / sizeof(testVector), i; + + a.input = ""; + a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69" + "\x27\x73"; + a.inLen = strlen(a.input); + a.outLen = MD2_DIGEST_SIZE; + + b.input = "a"; + b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0" + "\xb5\xd1"; + b.inLen = strlen(b.input); + b.outLen = MD2_DIGEST_SIZE; + + c.input = "abc"; + c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde" + "\xd6\xbb"; + c.inLen = strlen(c.input); + c.outLen = MD2_DIGEST_SIZE; + + d.input = "message digest"; + d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe" + "\x06\xb0"; + d.inLen = strlen(d.input); + d.outLen = MD2_DIGEST_SIZE; + + e.input = "abcdefghijklmnopqrstuvwxyz"; + e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47" + "\x94\x0b"; + e.inLen = strlen(e.input); + e.outLen = MD2_DIGEST_SIZE; + + f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03" + "\x38\xcd"; + f.inLen = strlen(f.input); + f.outLen = MD2_DIGEST_SIZE; + + g.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3" + "\xef\xd8"; + g.inLen = strlen(g.input); + g.outLen = MD2_DIGEST_SIZE; + + test_md2[0] = a; + test_md2[1] = b; + test_md2[2] = c; + test_md2[3] = d; + test_md2[4] = e; + test_md2[5] = f; + test_md2[6] = g; + + InitMd2(&md2); + + for (i = 0; i < times; ++i) { + Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen); + Md2Final(&md2, hash); + + if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0) + return -155 - i; + } + + return 0; +} +#endif + +#ifndef NO_MD5 +int md5_test(void) +{ + Md5 md5; + byte hash[MD5_DIGEST_SIZE]; + + testVector a, b, c, d, e; + testVector test_md5[5]; + int times = sizeof(test_md5) / sizeof(testVector), i; + + a.input = "abc"; + a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" + "\x72"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + b.input = "message digest"; + b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" + "\xd0"; + b.inLen = strlen(b.input); + b.outLen = MD5_DIGEST_SIZE; + + c.input = "abcdefghijklmnopqrstuvwxyz"; + c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" + "\x3b"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" + "\x9f"; + d.inLen = strlen(d.input); + d.outLen = MD5_DIGEST_SIZE; + + e.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" + "\x7a"; + e.inLen = strlen(e.input); + e.outLen = MD5_DIGEST_SIZE; + + test_md5[0] = a; + test_md5[1] = b; + test_md5[2] = c; + test_md5[3] = d; + test_md5[4] = e; + + InitMd5(&md5); + + for (i = 0; i < times; ++i) { + Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); + Md5Final(&md5, hash); + + if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) + return -5 - i; + } + + return 0; +} +#endif /* NO_MD5 */ + + +#ifndef NO_MD4 + +int md4_test(void) +{ + Md4 md4; + byte hash[MD4_DIGEST_SIZE]; + + testVector a, b, c, d, e, f, g; + testVector test_md4[7]; + int times = sizeof(test_md4) / sizeof(testVector), i; + + a.input = ""; + a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" + "\xc0"; + a.inLen = strlen(a.input); + a.outLen = MD4_DIGEST_SIZE; + + b.input = "a"; + b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" + "\x24"; + b.inLen = strlen(b.input); + b.outLen = MD4_DIGEST_SIZE; + + c.input = "abc"; + c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" + "\x9d"; + c.inLen = strlen(c.input); + c.outLen = MD4_DIGEST_SIZE; + + d.input = "message digest"; + d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" + "\x4b"; + d.inLen = strlen(d.input); + d.outLen = MD4_DIGEST_SIZE; + + e.input = "abcdefghijklmnopqrstuvwxyz"; + e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" + "\xa9"; + e.inLen = strlen(e.input); + e.outLen = MD4_DIGEST_SIZE; + + f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" + "\xe4"; + f.inLen = strlen(f.input); + f.outLen = MD4_DIGEST_SIZE; + + g.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" + "\x36"; + g.inLen = strlen(g.input); + g.outLen = MD4_DIGEST_SIZE; + + test_md4[0] = a; + test_md4[1] = b; + test_md4[2] = c; + test_md4[3] = d; + test_md4[4] = e; + test_md4[5] = f; + test_md4[6] = g; + + InitMd4(&md4); + + for (i = 0; i < times; ++i) { + Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); + Md4Final(&md4, hash); + + if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) + return -205 - i; + } + + return 0; +} + +#endif /* NO_MD4 */ + +#ifndef NO_SHA + +int sha_test(void) +{ + Sha sha; + byte hash[SHA_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_sha[4]; + int ret; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" + "\x6C\x9C\xD0\xD8\x9D"; + a.inLen = strlen(a.input); + a.outLen = SHA_DIGEST_SIZE; + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" + "\xE5\xE5\x46\x70\xF1"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaa"; + c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" + "\x2A\x25\xEC\x64\x4D"; + c.inLen = strlen(c.input); + c.outLen = SHA_DIGEST_SIZE; + + d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaa"; + d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" + "\x53\x99\x5E\x26\xA0"; + d.inLen = strlen(d.input); + d.outLen = SHA_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + test_sha[2] = c; + test_sha[3] = d; + + ret = InitSha(&sha); + if (ret != 0) + return -4001; + + for (i = 0; i < times; ++i) { + ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); + ShaFinal(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} + +#endif /* NO_SHA */ + +#ifdef CYASSL_RIPEMD +int ripemd_test(void) +{ + RipeMd ripemd; + byte hash[RIPEMD_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_ripemd[4]; + int times = sizeof(test_ripemd) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" + "\xb0\x87\xf1\x5a\x0b\xfc"; + a.inLen = strlen(a.input); + a.outLen = RIPEMD_DIGEST_SIZE; + + b.input = "message digest"; + b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" + "\x5f\xfa\x21\x59\x5f\x36"; + b.inLen = strlen(b.input); + b.outLen = RIPEMD_DIGEST_SIZE; + + c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" + "\xf4\x9a\xda\x62\xeb\x2b"; + c.inLen = strlen(c.input); + c.outLen = RIPEMD_DIGEST_SIZE; + + d.input = "12345678901234567890123456789012345678901234567890123456" + "789012345678901234567890"; + d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" + "\x82\xbf\x63\x32\x6b\xfb"; + d.inLen = strlen(d.input); + d.outLen = RIPEMD_DIGEST_SIZE; + + test_ripemd[0] = a; + test_ripemd[1] = b; + test_ripemd[2] = c; + test_ripemd[3] = d; + + InitRipeMd(&ripemd); + + for (i = 0; i < times; ++i) { + RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, + (word32)test_ripemd[i].inLen); + RipeMdFinal(&ripemd, hash); + + if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* CYASSL_RIPEMD */ + + +#ifdef HAVE_BLAKE2 + + +#define BLAKE2_TESTS 3 + +static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] = +{ + { + 0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03, + 0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72, + 0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61, + 0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19, + 0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53, + 0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B, + 0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55, + 0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE + }, + { + 0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95, + 0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7, + 0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44, + 0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C, + 0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB, + 0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4, + 0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48, + 0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B + }, + { + 0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9, + 0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72, + 0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF, + 0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15, + 0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB, + 0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04, + 0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1, + 0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5 + } +}; + + + +int blake2b_test(void) +{ + Blake2b b2b; + byte digest[64]; + byte input[64]; + int i, ret; + + for (i = 0; i < (int)sizeof(input); i++) + input[i] = (byte)i; + + for (i = 0; i < BLAKE2_TESTS; i++) { + ret = InitBlake2b(&b2b, 64); + if (ret != 0) + return -4002; + + ret = Blake2bUpdate(&b2b, input, i); + if (ret != 0) + return -4003; + + ret = Blake2bFinal(&b2b, digest, 64); + if (ret != 0) + return -4004; + + if (memcmp(digest, blake2b_vec[i], 64) != 0) { + return -300 - i; + } + } + + return 0; +} +#endif /* HAVE_BLAKE2 */ + + +#ifndef NO_SHA256 +int sha256_test(void) +{ + Sha256 sha; + byte hash[SHA256_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int ret; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" + "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" + "\x15\xAD"; + a.inLen = strlen(a.input); + a.outLen = SHA256_DIGEST_SIZE; + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1"; + b.inLen = strlen(b.input); + b.outLen = SHA256_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha256(&sha); + if (ret != 0) + return -4005; + + for (i = 0; i < times; ++i) { + ret = Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return -4006; + ret = Sha256Final(&sha, hash); + if (ret != 0) + return -4007; + + if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + + +#ifdef CYASSL_SHA512 +int sha512_test(void) +{ + Sha512 sha; + byte hash[SHA512_DIGEST_SIZE]; + int ret; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" + "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" + "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" + "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" + "\xa5\x4c\xa4\x9f"; + a.inLen = strlen(a.input); + a.outLen = SHA512_DIGEST_SIZE; + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09"; + b.inLen = strlen(b.input); + b.outLen = SHA512_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha512(&sha); + if (ret != 0) + return -4009; + + for (i = 0; i < times; ++i) { + ret = Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return -4010; + + ret = Sha512Final(&sha, hash); + if (ret != 0) + return -4011; + + if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + + +#ifdef CYASSL_SHA384 +int sha384_test(void) +{ + Sha384 sha; + byte hash[SHA384_DIGEST_SIZE]; + int ret; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" + "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" + "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" + "\xc8\x25\xa7"; + a.inLen = strlen(a.input); + a.outLen = SHA384_DIGEST_SIZE; + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39"; + b.inLen = strlen(b.input); + b.outLen = SHA384_DIGEST_SIZE; + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha384(&sha); + if (ret != 0) + return -4012; + + for (i = 0; i < times; ++i) { + ret = Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return -4013; + + ret = Sha384Final(&sha, hash); + if (ret != 0) + return -4014; + + if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* CYASSL_SHA384 */ + + +#if !defined(NO_HMAC) && !defined(NO_MD5) +int hmac_md5_test(void) +{ + Hmac hmac; + byte hash[MD5_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" + "\x9d"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" + "\x38"; + b.inLen = strlen(b.input); + b.outLen = MD5_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" + "\xf6"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20009; +#endif + ret = HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4015; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4016; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4017; + + if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif /* NO_HMAC && NO_MD5 */ + +#if !defined(NO_HMAC) && !defined(NO_SHA) +int hmac_sha_test(void) +{ + Hmac hmac; + byte hash[SHA_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" + "\x8e\xf1\x46\xbe\x00"; + a.inLen = strlen(a.input); + a.outLen = SHA_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" + "\x9c\x25\x9a\x7c\x79"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" + "\x4f\x63\xf1\x75\xd3"; + c.inLen = strlen(c.input); + c.outLen = SHA_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20010; +#endif + ret = HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4018; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4019; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4020; + + if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && !defined(NO_SHA256) +int hmac_sha256_test(void) +{ + Hmac hmac; + byte hash[SHA256_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" + "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" + "\xcf\xf7"; + a.inLen = strlen(a.input); + a.outLen = SHA256_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" + "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" + "\x38\x43"; + b.inLen = strlen(b.input); + b.outLen = SHA256_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" + "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" + "\x65\xfe"; + c.inLen = strlen(c.input); + c.outLen = SHA256_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20011; +#endif + ret = HmacSetKey(&hmac, SHA256, (byte*)keys[i],(word32)strlen(keys[i])); + if (ret != 0) + return -4021; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4022; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4023; + + if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(HAVE_BLAKE2) +int hmac_blake2b_test(void) +{ + Hmac hmac; + byte hash[BLAKE2B_256]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x72\x93\x0d\xdd\xf5\xf7\xe1\x78\x38\x07\x44\x18\x0b\x3f\x51" + "\x37\x25\xb5\x82\xc2\x08\x83\x2f\x1c\x99\xfd\x03\xa0\x16\x75" + "\xac\xfd"; + a.inLen = strlen(a.input); + a.outLen = BLAKE2B_256; + + b.input = "what do ya want for nothing?"; + b.output = "\x3d\x20\x50\x71\x05\xc0\x8c\x0c\x38\x44\x1e\xf7\xf9\xd1\x67" + "\x21\xff\x64\xf5\x94\x00\xcf\xf9\x75\x41\xda\x88\x61\x9d\x7c" + "\xda\x2b"; + b.inLen = strlen(b.input); + b.outLen = BLAKE2B_256; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\xda\xfe\x2a\x24\xfc\xe7\xea\x36\x34\xbe\x41\x92\xc7\x11\xa7" + "\x00\xae\x53\x9c\x11\x9c\x80\x74\x55\x22\x25\x4a\xb9\x55\xd3" + "\x0f\x87"; + c.inLen = strlen(c.input); + c.outLen = BLAKE2B_256; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { +#ifdef HAVE_CAVIUM + if (i == 1) + continue; /* driver can't handle keys <= bytes */ + if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) + return -20011; +#endif + ret = HmacSetKey(&hmac, BLAKE2B_ID, (byte*)keys[i], + (word32)strlen(keys[i])); + if (ret != 0) + return -4024; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4025; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4026; + + if (memcmp(hash, test_hmac[i].output, BLAKE2B_256) != 0) + return -20 - i; +#ifdef HAVE_CAVIUM + HmacFreeCavium(&hmac); +#endif + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(CYASSL_SHA384) +int hmac_sha384_test(void) +{ + Hmac hmac; + byte hash[SHA384_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" + "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" + "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" + "\xfa\x9c\xb6"; + a.inLen = strlen(a.input); + a.outLen = SHA384_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" + "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" + "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" + "\xb2\x16\x49"; + b.inLen = strlen(b.input); + b.outLen = SHA384_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" + "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" + "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" + "\xa3\x4f\x27"; + c.inLen = strlen(c.input); + c.outLen = SHA384_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac, SHA384, (byte*)keys[i],(word32)strlen(keys[i])); + if (ret != 0) + return -4027; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4028; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4029; + + if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(CYASSL_SHA512) +int hmac_sha512_test(void) +{ + Hmac hmac; + byte hash[SHA512_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c" + "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1" + "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae" + "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20" + "\x3a\x12\x68\x54"; + a.inLen = strlen(a.input); + a.outLen = SHA512_DIGEST_SIZE; + + b.input = "what do ya want for nothing?"; + b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0" + "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25" + "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8" + "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a" + "\x38\xbc\xe7\x37"; + b.inLen = strlen(b.input); + b.outLen = SHA512_DIGEST_SIZE; + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b" + "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27" + "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e" + "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59" + "\xe1\x32\x92\xfb"; + c.inLen = strlen(c.input); + c.outLen = SHA512_DIGEST_SIZE; + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac, SHA512, (byte*)keys[i],(word32)strlen(keys[i])); + if (ret != 0) + return -4030; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4031; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4032; + + if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + + +#ifndef NO_RC4 +int arc4_test(void) +{ + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x01\x23\x45\x67\x89\xab\xcd\xef", + "\x01\x23\x45\x67\x89\xab\xcd\xef", + "\x00\x00\x00\x00\x00\x00\x00\x00", + "\xef\x01\x23\x45" + }; + + testVector a, b, c, d; + testVector test_arc4[4]; + + int times = sizeof(test_arc4) / sizeof(testVector), i; + + a.input = "\x01\x23\x45\x67\x89\xab\xcd\xef"; + a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a"; + c.inLen = 8; + c.outLen = 8; + + d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61"; + d.inLen = 10; + d.outLen = 10; + + test_arc4[0] = a; + test_arc4[1] = b; + test_arc4[2] = c; + test_arc4[3] = d; + + for (i = 0; i < times; ++i) { + Arc4 enc; + Arc4 dec; + int keylen = 8; /* strlen with key 0x00 not good */ + if (i == 3) + keylen = 4; + +#ifdef HAVE_CAVIUM + if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20001; + if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20002; +#endif + + Arc4SetKey(&enc, (byte*)keys[i], keylen); + Arc4SetKey(&dec, (byte*)keys[i], keylen); + + Arc4Process(&enc, cipher, (byte*)test_arc4[i].input, + (word32)test_arc4[i].outLen); + Arc4Process(&dec, plain, cipher, (word32)test_arc4[i].outLen); + + if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen)) + return -20 - i; + + if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen)) + return -20 - 5 - i; + +#ifdef HAVE_CAVIUM + Arc4FreeCavium(&enc); + Arc4FreeCavium(&dec); +#endif + } + + return 0; +} +#endif + + +int hc128_test(void) +{ +#ifdef HAVE_HC128 + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD", + "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC" + }; + + const char* ivs[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16", + "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31" + }; + + + testVector a, b, c, d; + testVector test_hc128[4]; + + int times = sizeof(test_hc128) / sizeof(testVector), i; + + a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A"; + c.inLen = 8; + c.outLen = 8; + + d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; + d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29"; + d.inLen = 15; + d.outLen = 15; + + test_hc128[0] = a; + test_hc128[1] = b; + test_hc128[2] = c; + test_hc128[3] = d; + + for (i = 0; i < times; ++i) { + HC128 enc; + HC128 dec; + + /* align keys/ivs in plain/cipher buffers */ + memcpy(plain, keys[i], 16); + memcpy(cipher, ivs[i], 16); + + Hc128_SetKey(&enc, plain, cipher); + Hc128_SetKey(&dec, plain, cipher); + + /* align input */ + memcpy(plain, test_hc128[i].input, test_hc128[i].outLen); + Hc128_Process(&enc, cipher, plain, (word32)test_hc128[i].outLen); + Hc128_Process(&dec, plain, cipher, (word32)test_hc128[i].outLen); + + if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen)) + return -120 - i; + + if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen)) + return -120 - 5 - i; + } + +#endif /* HAVE_HC128 */ + return 0; +} + + +#ifndef NO_RABBIT +int rabbit_test(void) +{ + byte cipher[16]; + byte plain[16]; + + const char* keys[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91" + }; + + const char* ivs[] = + { + "\x00\x00\x00\x00\x00\x00\x00\x00", + "\x59\x7E\x26\xC1\x75\xF5\x73\xC3", + 0 + }; + + testVector a, b, c; + testVector test_rabbit[3]; + + int times = sizeof(test_rabbit) / sizeof(testVector), i; + + a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C"; + a.inLen = 8; + a.outLen = 8; + + b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0"; + b.inLen = 8; + b.outLen = 8; + + c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; + c.output = "\x04\xCE\xCA\x7A\x1A\x86\x6E\x77"; + c.inLen = 8; + c.outLen = 8; + + test_rabbit[0] = a; + test_rabbit[1] = b; + test_rabbit[2] = c; + + for (i = 0; i < times; ++i) { + Rabbit enc; + Rabbit dec; + byte* iv; + + /* align keys/ivs in plain/cipher buffers */ + memcpy(plain, keys[i], 16); + if (ivs[i]) { + memcpy(cipher, ivs[i], 8); + iv = cipher; + } else + iv = NULL; + RabbitSetKey(&enc, plain, iv); + RabbitSetKey(&dec, plain, iv); + + /* align input */ + memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen); + RabbitProcess(&enc, cipher, plain, (word32)test_rabbit[i].outLen); + RabbitProcess(&dec, plain, cipher, (word32)test_rabbit[i].outLen); + + if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen)) + return -130 - i; + + if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen)) + return -130 - 5 - i; + } + + return 0; +} +#endif /* NO_RABBIT */ + + +#ifndef NO_DES3 +int des_test(void) +{ + const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + Des enc; + Des dec; + + const byte key[] = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef + }; + + const byte iv[] = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef + }; + + const byte verify[] = + { + 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, + 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, + 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b + }; + + int ret; + + ret = Des_SetKey(&enc, key, iv, DES_ENCRYPTION); + if (ret != 0) + return -31; + + Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); + ret = Des_SetKey(&dec, key, iv, DES_DECRYPTION); + if (ret != 0) + return -32; + Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); + + if (memcmp(plain, vector, sizeof(plain))) + return -33; + + if (memcmp(cipher, verify, sizeof(cipher))) + return -34; + + return 0; +} +#endif /* NO_DES3 */ + + +#ifndef NO_DES3 +int des3_test(void) +{ + const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + Des3 enc; + Des3 dec; + + const byte key3[] = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, + 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, + 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 + }; + const byte iv3[] = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 + + }; + + const byte verify3[] = + { + 0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e, + 0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98, + 0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0 + }; + + int ret; + + +#ifdef HAVE_CAVIUM + if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20005; + if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20006; +#endif + ret = Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION); + if (ret != 0) + return -31; + ret = Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION); + if (ret != 0) + return -32; + ret = Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); + if (ret != 0) + return -33; + ret = Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); + if (ret != 0) + return -34; + + if (memcmp(plain, vector, sizeof(plain))) + return -35; + + if (memcmp(cipher, verify3, sizeof(cipher))) + return -36; + +#ifdef HAVE_CAVIUM + Des3_FreeCavium(&enc); + Des3_FreeCavium(&dec); +#endif + return 0; +} +#endif /* NO_DES */ + + +#ifndef NO_AES +int aes_test(void) +{ + Aes enc; + Aes dec; + + const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + const byte verify[] = + { + 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, + 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb + }; + + byte key[] = "0123456789abcdef "; /* align */ + byte iv[] = "1234567890abcdef "; /* align */ + + byte cipher[AES_BLOCK_SIZE * 4]; + byte plain [AES_BLOCK_SIZE * 4]; + int ret; + +#ifdef HAVE_CAVIUM + if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) + return -20003; + if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0) + return -20004; +#endif + ret = AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); + if (ret != 0) + return -1001; + ret = AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION); + if (ret != 0) + return -1002; + + ret = AesCbcEncrypt(&enc, cipher, msg, AES_BLOCK_SIZE); + if (ret != 0) + return -1005; + ret = AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE); + if (ret != 0) + return -1006; + + if (memcmp(plain, msg, AES_BLOCK_SIZE)) + return -60; + + if (memcmp(cipher, verify, AES_BLOCK_SIZE)) + return -61; + +#ifdef HAVE_CAVIUM + AesFreeCavium(&enc); + AesFreeCavium(&dec); +#endif +#ifdef CYASSL_AES_COUNTER + { + const byte ctrKey[] = + { + 0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6, + 0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c + }; + + const byte ctrIv[] = + { + 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, + 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff + }; + + + const byte ctrPlain[] = + { + 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, + 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, + 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, + 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, + 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11, + 0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef, + 0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17, + 0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10 + }; + + const byte ctrCipher[] = + { + 0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26, + 0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce, + 0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff, + 0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff, + 0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e, + 0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab, + 0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1, + 0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee + }; + + const byte oddCipher[] = + { + 0xb9,0xd7,0xcb,0x08,0xb0,0xe1,0x7b,0xa0, + 0xc2 + }; + + AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + /* Ctr only uses encrypt, even on key setup */ + AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + + AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4); + AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4); + + if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4)) + return -66; + + if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4)) + return -67; + + /* let's try with just 9 bytes, non block size test */ + AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + /* Ctr only uses encrypt, even on key setup */ + AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); + + AesCtrEncrypt(&enc, cipher, ctrPlain, 9); + AesCtrEncrypt(&dec, plain, cipher, 9); + + if (memcmp(plain, ctrPlain, 9)) + return -68; + + if (memcmp(cipher, ctrCipher, 9)) + return -69; + + /* and an additional 9 bytes to reuse tmp left buffer */ + AesCtrEncrypt(&enc, cipher, ctrPlain, 9); + AesCtrEncrypt(&dec, plain, cipher, 9); + + if (memcmp(plain, ctrPlain, 9)) + return -70; + + if (memcmp(cipher, oddCipher, 9)) + return -71; + } +#endif /* CYASSL_AES_COUNTER */ + +#if defined(CYASSL_AESNI) && defined(CYASSL_AES_DIRECT) + { + const byte niPlain[] = + { + 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, + 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a + }; + + const byte niCipher[] = + { + 0xf3,0xee,0xd1,0xbd,0xb5,0xd2,0xa0,0x3c, + 0x06,0x4b,0x5a,0x7e,0x3d,0xb1,0x81,0xf8 + }; + + const byte niKey[] = + { + 0x60,0x3d,0xeb,0x10,0x15,0xca,0x71,0xbe, + 0x2b,0x73,0xae,0xf0,0x85,0x7d,0x77,0x81, + 0x1f,0x35,0x2c,0x07,0x3b,0x61,0x08,0xd7, + 0x2d,0x98,0x10,0xa3,0x09,0x14,0xdf,0xf4 + }; + + XMEMSET(cipher, 0, AES_BLOCK_SIZE); + ret = AesSetKey(&enc, niKey, sizeof(niKey), cipher, AES_ENCRYPTION); + if (ret != 0) + return -1003; + AesEncryptDirect(&enc, cipher, niPlain); + if (XMEMCMP(cipher, niCipher, AES_BLOCK_SIZE) != 0) + return -20006; + + XMEMSET(plain, 0, AES_BLOCK_SIZE); + ret = AesSetKey(&dec, niKey, sizeof(niKey), plain, AES_DECRYPTION); + if (ret != 0) + return -1004; + AesDecryptDirect(&dec, plain, niCipher); + if (XMEMCMP(plain, niPlain, AES_BLOCK_SIZE) != 0) + return -20007; + } +#endif /* CYASSL_AESNI && CYASSL_AES_DIRECT */ + + return 0; +} + +#ifdef HAVE_AESGCM +int aesgcm_test(void) +{ + Aes enc; + + /* + * This is Test Case 16 from the document Galois/ + * Counter Mode of Operation (GCM) by McGrew and + * Viega. + */ + const byte k[] = + { + 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, + 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 + }; + + const byte iv[] = + { + 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, + 0xde, 0xca, 0xf8, 0x88 + }; + + const byte p[] = + { + 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + 0xba, 0x63, 0x7b, 0x39 + }; + + const byte a[] = + { + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xab, 0xad, 0xda, 0xd2 + }; + + const byte c[] = + { + 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, + 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, + 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, + 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, + 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, + 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, + 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, + 0xbc, 0xc9, 0xf6, 0x62 + }; + + const byte t[] = + { + 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, + 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b + }; + + byte t2[sizeof(t)]; + byte p2[sizeof(c)]; + byte c2[sizeof(p)]; + + int result; + + memset(t2, 0, sizeof(t2)); + memset(c2, 0, sizeof(c2)); + memset(p2, 0, sizeof(p2)); + + AesGcmSetKey(&enc, k, sizeof(k)); + /* AES-GCM encrypt and decrypt both use AES encrypt internally */ + AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (memcmp(c, c2, sizeof(c2))) + return -68; + if (memcmp(t, t2, sizeof(t2))) + return -69; + + result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result != 0) + return -70; + if (memcmp(p, p2, sizeof(p2))) + return -71; + + return 0; +} + +int gmac_test(void) +{ + Gmac gmac; + + const byte k1[] = + { + 0x89, 0xc9, 0x49, 0xe9, 0xc8, 0x04, 0xaf, 0x01, + 0x4d, 0x56, 0x04, 0xb3, 0x94, 0x59, 0xf2, 0xc8 + }; + const byte iv1[] = + { + 0xd1, 0xb1, 0x04, 0xc8, 0x15, 0xbf, 0x1e, 0x94, + 0xe2, 0x8c, 0x8f, 0x16 + }; + const byte a1[] = + { + 0x82, 0xad, 0xcd, 0x63, 0x8d, 0x3f, 0xa9, 0xd9, + 0xf3, 0xe8, 0x41, 0x00, 0xd6, 0x1e, 0x07, 0x77 + }; + const byte t1[] = + { + 0x88, 0xdb, 0x9d, 0x62, 0x17, 0x2e, 0xd0, 0x43, + 0xaa, 0x10, 0xf1, 0x6d, 0x22, 0x7d, 0xc4, 0x1b + }; + + const byte k2[] = + { + 0x40, 0xf7, 0xec, 0xb2, 0x52, 0x6d, 0xaa, 0xd4, + 0x74, 0x25, 0x1d, 0xf4, 0x88, 0x9e, 0xf6, 0x5b + }; + const byte iv2[] = + { + 0xee, 0x9c, 0x6e, 0x06, 0x15, 0x45, 0x45, 0x03, + 0x1a, 0x60, 0x24, 0xa7 + }; + const byte a2[] = + { + 0x94, 0x81, 0x2c, 0x87, 0x07, 0x4e, 0x15, 0x18, + 0x34, 0xb8, 0x35, 0xaf, 0x1c, 0xa5, 0x7e, 0x56 + }; + const byte t2[] = + { + 0xc6, 0x81, 0x79, 0x8e, 0x3d, 0xda, 0xb0, 0x9f, + 0x8d, 0x83, 0xb0, 0xbb, 0x14, 0xb6, 0x91 + }; + + const byte k3[] = + { + 0xb8, 0xe4, 0x9a, 0x5e, 0x37, 0xf9, 0x98, 0x2b, + 0xb9, 0x6d, 0xd0, 0xc9, 0xb6, 0xab, 0x26, 0xac + }; + const byte iv3[] = + { + 0xe4, 0x4a, 0x42, 0x18, 0x8c, 0xae, 0x94, 0x92, + 0x6a, 0x9c, 0x26, 0xb0 + }; + const byte a3[] = + { + 0x9d, 0xb9, 0x61, 0x68, 0xa6, 0x76, 0x7a, 0x31, + 0xf8, 0x29, 0xe4, 0x72, 0x61, 0x68, 0x3f, 0x8a + }; + const byte t3[] = + { + 0x23, 0xe2, 0x9f, 0x66, 0xe4, 0xc6, 0x52, 0x48 + }; + + byte tag[16]; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k1, sizeof(k1)); + GmacUpdate(&gmac, iv1, sizeof(iv1), a1, sizeof(a1), tag, sizeof(t1)); + if (memcmp(t1, tag, sizeof(t1)) != 0) + return -126; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k2, sizeof(k2)); + GmacUpdate(&gmac, iv2, sizeof(iv2), a2, sizeof(a2), tag, sizeof(t2)); + if (memcmp(t2, tag, sizeof(t2)) != 0) + return -127; + + memset(tag, 0, sizeof(tag)); + GmacSetKey(&gmac, k3, sizeof(k3)); + GmacUpdate(&gmac, iv3, sizeof(iv3), a3, sizeof(a3), tag, sizeof(t3)); + if (memcmp(t3, tag, sizeof(t3)) != 0) + return -128; + + return 0; +} +#endif /* HAVE_AESGCM */ + +#ifdef HAVE_AESCCM +int aesccm_test(void) +{ + Aes enc; + + /* key */ + const byte k[] = + { + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf + }; + + /* nonce */ + const byte iv[] = + { + 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0, + 0xa1, 0xa2, 0xa3, 0xa4, 0xa5 + }; + + /* plaintext */ + const byte p[] = + { + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e + }; + + const byte a[] = + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 + }; + + const byte c[] = + { + 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2, + 0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80, + 0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84 + }; + + const byte t[] = + { + 0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 + }; + + byte t2[sizeof(t)]; + byte p2[sizeof(p)]; + byte c2[sizeof(c)]; + + int result; + + memset(t2, 0, sizeof(t2)); + memset(c2, 0, sizeof(c2)); + memset(p2, 0, sizeof(p2)); + + AesCcmSetKey(&enc, k, sizeof(k)); + /* AES-CCM encrypt and decrypt both use AES encrypt internally */ + AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (memcmp(c, c2, sizeof(c2))) + return -107; + if (memcmp(t, t2, sizeof(t2))) + return -108; + + result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result != 0) + return -109; + if (memcmp(p, p2, sizeof(p2))) + return -110; + + /* Test the authentication failure */ + t2[0]++; /* Corrupt the authentication tag. */ + result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv), + t2, sizeof(t2), a, sizeof(a)); + if (result == 0) + return -111; + + /* Clear c2 to compare against p2. p2 should be set to zero in case of + * authentication fail. */ + memset(c2, 0, sizeof(c2)); + if (memcmp(p2, c2, sizeof(p2))) + return -112; + + return 0; +} +#endif /* HAVE_AESCCM */ + + +#endif /* NO_AES */ + + +#ifdef HAVE_CAMELLIA + +enum { + CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC +}; + +typedef struct { + int type; + const byte* plaintext; + const byte* iv; + const byte* ciphertext; + const byte* key; + word32 keySz; + int errorCode; +} test_vector_t; + +int camellia_test(void) +{ + /* Camellia ECB Test Plaintext */ + static const byte pte[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 + }; + + /* Camellia ECB Test Initialization Vector */ + static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + + /* Test 1: Camellia ECB 128-bit key */ + static const byte k1[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 + }; + static const byte c1[] = + { + 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, + 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 + }; + + /* Test 2: Camellia ECB 192-bit key */ + static const byte k2[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 + }; + static const byte c2[] = + { + 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, + 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 + }; + + /* Test 3: Camellia ECB 256-bit key */ + static const byte k3[] = + { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + }; + static const byte c3[] = + { + 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, + 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 + }; + + /* Camellia CBC Test Plaintext */ + static const byte ptc[] = + { + 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, + 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A + }; + + /* Camellia CBC Test Initialization Vector */ + static const byte ivc[] = + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F + }; + + /* Test 4: Camellia-CBC 128-bit key */ + static const byte k4[] = + { + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C + }; + static const byte c4[] = + { + 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, + 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB + }; + + /* Test 5: Camellia-CBC 192-bit key */ + static const byte k5[] = + { + 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, + 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, + 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B + }; + static const byte c5[] = + { + 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, + 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 + }; + + /* Test 6: CBC 256-bit key */ + static const byte k6[] = + { + 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, + 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, + 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, + 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 + }; + static const byte c6[] = + { + 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, + 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA + }; + + byte out[CAMELLIA_BLOCK_SIZE]; + Camellia cam; + int i, testsSz; + const test_vector_t testVectors[] = + { + {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114}, + {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115}, + {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116}, + {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117}, + {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118}, + {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119}, + {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120}, + {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121}, + {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122}, + {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123}, + {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124}, + {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125} + }; + + testsSz = sizeof(testVectors)/sizeof(test_vector_t); + for (i = 0; i < testsSz; i++) { + if (CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz, + testVectors[i].iv) != 0) + return testVectors[i].errorCode; + + switch (testVectors[i].type) { + case CAM_ECB_ENC: + CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext); + if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_ECB_DEC: + CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext); + if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_CBC_ENC: + CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext, + CAMELLIA_BLOCK_SIZE); + if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + case CAM_CBC_DEC: + CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext, + CAMELLIA_BLOCK_SIZE); + if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) + return testVectors[i].errorCode; + break; + default: + break; + } + } + + /* Setting the IV and checking it was actually set. */ + CamelliaSetIV(&cam, ivc); + if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE)) + return -1; + + /* Setting the IV to NULL should be same as all zeros IV */ + if (CamelliaSetIV(&cam, NULL) != 0 || + XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE)) + return -1; + + /* First parameter should never be null */ + if (CamelliaSetIV(NULL, NULL) == 0) + return -1; + + /* First parameter should never be null, check it fails */ + if (CamelliaSetKey(NULL, k1, sizeof(k1), NULL) == 0) + return -1; + + /* Key should have a size of 16, 24, or 32 */ + if (CamelliaSetKey(&cam, k1, 0, NULL) == 0) + return -1; + + return 0; +} +#endif /* HAVE_CAMELLIA */ + + +int random_test(void) +{ + RNG rng; + byte block[32]; + int ret; + +#ifdef HAVE_CAVIUM + ret = InitRngCavium(&rng, CAVIUM_DEV_ID); + if (ret != 0) return -2007; +#endif + ret = InitRng(&rng); + if (ret != 0) return -39; + + ret = RNG_GenerateBlock(&rng, block, sizeof(block)); + if (ret != 0) return -40; + + return 0; +} + + +#ifdef HAVE_NTRU + +byte GetEntropy(ENTROPY_CMD cmd, byte* out); + +byte GetEntropy(ENTROPY_CMD cmd, byte* out) +{ + static RNG rng; + + if (cmd == INIT) + return (InitRng(&rng) == 0) ? 1 : 0; + + if (out == NULL) + return 0; + + if (cmd == GET_BYTE_OF_ENTROPY) + return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0; + + if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { + *out = 1; + return 1; + } + + return 0; +} + +#endif /* HAVE_NTRU */ + +#ifndef NO_RSA + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* clientKey = "a:\\certs\\client-key.der"; + static const char* clientCert = "a:\\certs\\client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "a:\\certs\\ca-key.der"; + static const char* caCertFile = "a:\\certs\\ca-cert.pem"; + #ifdef HAVE_ECC + static const char* eccCaKeyFile = "a:\\certs\\ecc-key.der"; + static const char* eccCaCertFile = "a:\\certs\\server-ecc.pem"; + #endif + #endif + #elif defined(CYASSL_MKD_SHELL) + static char* clientKey = "certs/client-key.der"; + static char* clientCert = "certs/client-cert.der"; + void set_clientKey(char *key) { clientKey = key ; } + void set_clientCert(char *cert) { clientCert = cert ; } + #ifdef CYASSL_CERT_GEN + static char* caKeyFile = "certs/ca-key.der"; + static char* caCertFile = "certs/ca-cert.pem"; + void set_caKeyFile (char * key) { caKeyFile = key ; } + void set_caCertFile(char * cert) { caCertFile = cert ; } + #ifdef HAVE_ECC + static const char* eccCaKeyFile = "certs/ecc-key.der"; + static const char* eccCaCertFile = "certs/server-ecc.pem"; + void set_eccCaKeyFile (char * key) { eccCaKeyFile = key ; } + void set_eccCaCertFile(char * cert) { eccCaCertFile = cert ; } + #endif + #endif + #else + static const char* clientKey = "./certs/client-key.der"; + static const char* clientCert = "./certs/client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "./certs/ca-key.der"; + static const char* caCertFile = "./certs/ca-cert.pem"; + #ifdef HAVE_ECC + static const char* eccCaKeyFile = "./certs/ecc-key.der"; + static const char* eccCaCertFile = "./certs/server-ecc.pem"; + #endif + #endif + #endif +#endif + + + +#define FOURK_BUF 4096 + +int rsa_test(void) +{ + byte* tmp; + size_t bytes; + RsaKey key; + RNG rng; + word32 idx = 0; + int ret; + byte in[] = "Everyone gets Friday off."; + word32 inLen = (word32)strlen((char*)in); + byte out[256]; + byte plain[256]; +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + FILE* file, * file2; +#endif +#ifdef CYASSL_TEST_CERT + DecodedCert cert; +#endif + + tmp = (byte*)malloc(FOURK_BUF); + if (tmp == NULL) + return -40; + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024); + bytes = sizeof_client_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048); + bytes = sizeof_client_key_der_2048; +#else + file = fopen(clientKey, "rb"); + + if (!file) + err_sys("can't open ./certs/client-key.der, " + "Please run from CyaSSL home dir", -40); + + bytes = fread(tmp, 1, FOURK_BUF, file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + +#ifdef HAVE_CAVIUM + RsaInitCavium(&key, CAVIUM_DEV_ID); +#endif + ret = InitRsaKey(&key, 0); + if (ret != 0) return -39; + ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes); + if (ret != 0) return -41; + + ret = InitRng(&rng); + if (ret != 0) return -42; + + ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng); + if (ret < 0) return -43; + + ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key); + if (ret < 0) return -44; + + if (memcmp(plain, in, inLen)) return -45; + + ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng); + if (ret < 0) return -46; + + memset(plain, 0, sizeof(plain)); + ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key); + if (ret < 0) return -47; + + if (memcmp(plain, in, ret)) return -48; + +#if defined(CYASSL_MDK_ARM) + #define sizeof(s) strlen((char *)(s)) +#endif + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024); + bytes = sizeof_client_cert_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048); + bytes = sizeof_client_cert_der_2048; +#else + file2 = fopen(clientCert, "rb"); + if (!file2) + return -49; + + bytes = fread(tmp, 1, FOURK_BUF, file2); + fclose(file2); +#endif + +#ifdef sizeof + #undef sizeof +#endif + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&cert, tmp, (word32)bytes, 0); + + ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) return -491; + + FreeDecodedCert(&cert); +#else + (void)bytes; +#endif + + +#ifdef CYASSL_KEY_GEN + { + byte* der; + byte* pem; + int derSz = 0; + int pemSz = 0; + RsaKey derIn; + RsaKey genKey; + FILE* keyFile; + FILE* pemFile; + + ret = InitRsaKey(&genKey, 0); + if (ret != 0) + return -300; + ret = MakeRsaKey(&genKey, 1024, 65537, &rng); + if (ret != 0) + return -301; + + der = (byte*)malloc(FOURK_BUF); + if (der == NULL) { + FreeRsaKey(&genKey); + return -307; + } + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(der); + FreeRsaKey(&genKey); + return -308; + } + + derSz = RsaKeyToDer(&genKey, der, FOURK_BUF); + if (derSz < 0) { + free(der); + free(pem); + return -302; + } + + keyFile = fopen("./key.der", "wb"); + if (!keyFile) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -303; + } + ret = (int)fwrite(der, 1, derSz, keyFile); + fclose(keyFile); + if (ret != derSz) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -313; + } + + pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE); + if (pemSz < 0) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -304; + } + + pemFile = fopen("./key.pem", "wb"); + if (!pemFile) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -305; + } + ret = (int)fwrite(pem, 1, pemSz, pemFile); + fclose(pemFile); + if (ret != pemSz) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -314; + } + + ret = InitRsaKey(&derIn, 0); + if (ret != 0) { + free(der); + free(pem); + FreeRsaKey(&genKey); + return -3060; + } + idx = 0; + ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz); + if (ret != 0) { + free(der); + free(pem); + FreeRsaKey(&derIn); + FreeRsaKey(&genKey); + return -306; + } + + FreeRsaKey(&derIn); + FreeRsaKey(&genKey); + free(pem); + free(der); + } +#endif /* CYASSL_KEY_GEN */ + + +#ifdef CYASSL_CERT_GEN + /* self signed */ + { + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + int certSz; + int pemSz; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -309; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(derCert); + return -310; + } + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + myCert.isCA = 1; + myCert.sigType = CTC_SHA256wRSA; + + certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); + if (certSz < 0) { + free(derCert); + free(pem); + return -401; + } + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) { + free(derCert); + free(pem); + return -402; + } + FreeDecodedCert(&decode); +#endif + derFile = fopen("./cert.der", "wb"); + if (!derFile) { + free(derCert); + free(pem); + return -403; + } + ret = (int)fwrite(derCert, 1, certSz, derFile); + fclose(derFile); + if (ret != certSz) { + free(derCert); + free(pem); + return -414; + } + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) { + free(derCert); + free(pem); + return -404; + } + + pemFile = fopen("./cert.pem", "wb"); + if (!pemFile) { + free(derCert); + free(pem); + return -405; + } + ret = (int)fwrite(pem, 1, pemSz, pemFile); + fclose(pemFile); + if (ret != pemSz) { + free(derCert); + free(pem); + return -406; + } + free(pem); + free(derCert); + } + /* CA style */ + { + RsaKey caKey; + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + int certSz; + int pemSz; + size_t bytes3; + word32 idx3 = 0; + FILE* file3 ; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -311; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(derCert); + return -312; + } + + file3 = fopen(caKeyFile, "rb"); + + if (!file3) { + free(derCert); + free(pem); + return -412; + } + + bytes3 = fread(tmp, 1, FOURK_BUF, file3); + fclose(file3); + + ret = InitRsaKey(&caKey, 0); + if (ret != 0) { + free(derCert); + free(pem); + return -411; + } + ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); + if (ret != 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -413; + } + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + + ret = SetIssuer(&myCert, caCertFile); + if (ret < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -405; + } + + certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, NULL, &rng); + if (certSz < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -407; + } + + certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, + &caKey, NULL, &rng); + if (certSz < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -408; + } + + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -409; + } + FreeDecodedCert(&decode); +#endif + + derFile = fopen("./othercert.der", "wb"); + if (!derFile) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -410; + } + ret = (int)fwrite(derCert, 1, certSz, derFile); + fclose(derFile); + if (ret != certSz) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -416; + } + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -411; + } + + pemFile = fopen("./othercert.pem", "wb"); + if (!pemFile) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -412; + } + ret = (int)fwrite(pem, 1, pemSz, pemFile); + if (ret != pemSz) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -415; + } + fclose(pemFile); + free(pem); + free(derCert); + FreeRsaKey(&caKey); + } +#ifdef HAVE_ECC + /* ECC CA style */ + { + ecc_key caKey; + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + int certSz; + int pemSz; + size_t bytes3; + word32 idx3 = 0; + FILE* file3; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -5311; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(derCert); + return -5312; + } + + file3 = fopen(eccCaKeyFile, "rb"); + + if (!file3) { + free(derCert); + free(pem); + return -5412; + } + + bytes3 = fread(tmp, 1, FOURK_BUF, file3); + fclose(file3); + + ecc_init(&caKey); + ret = EccPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); + if (ret != 0) { + free(derCert); + free(pem); + return -5413; + } + + InitCert(&myCert); + myCert.sigType = CTC_SHA256wECDSA; + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "wolfSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.wolfssl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@wolfssl.com", CTC_NAME_SIZE); + + ret = SetIssuer(&myCert, eccCaCertFile); + if (ret < 0) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5405; + } + + certSz = MakeCert(&myCert, derCert, FOURK_BUF, NULL, &caKey, &rng); + if (certSz < 0) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5407; + } + + certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, + NULL, &caKey, &rng); + if (certSz < 0) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5408; + } + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5409; + } + FreeDecodedCert(&decode); +#endif + + derFile = fopen("./certecc.der", "wb"); + if (!derFile) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5410; + } + ret = (int)fwrite(derCert, 1, certSz, derFile); + fclose(derFile); + if (ret != certSz) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5414; + } + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5411; + } + + pemFile = fopen("./certecc.pem", "wb"); + if (!pemFile) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5412; + } + ret = (int)fwrite(pem, 1, pemSz, pemFile); + if (ret != pemSz) { + free(pem); + free(derCert); + ecc_free(&caKey); + return -5415; + } + fclose(pemFile); + free(pem); + free(derCert); + ecc_free(&caKey); + } +#endif /* HAVE_ECC */ +#ifdef HAVE_NTRU + { + RsaKey caKey; + Cert myCert; + byte* derCert; + byte* pem; + FILE* derFile; + FILE* pemFile; + FILE* caFile; + FILE* ntruPrivFile; + int certSz; + int pemSz; + word32 idx3; +#ifdef CYASSL_TEST_CERT + DecodedCert decode; +#endif + derCert = (byte*)malloc(FOURK_BUF); + if (derCert == NULL) + return -311; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(derCert); + return -312; + } + + byte public_key[557]; /* sized for EES401EP2 */ + word16 public_key_len; /* no. of octets in public key */ + byte private_key[607]; /* sized for EES401EP2 */ + word16 private_key_len; /* no. of octets in private key */ + DRBG_HANDLE drbg; + static uint8_t const pers_str[] = { + 'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't' + }; + word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str), + GetEntropy, &drbg); + if (rc != DRBG_OK) { + free(derCert); + free(pem); + return -450; + } + + rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, + NULL, &private_key_len, NULL); + if (rc != NTRU_OK) { + free(derCert); + free(pem); + return -451; + } + + rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, + public_key, &private_key_len, private_key); + crypto_drbg_uninstantiate(drbg); + + if (rc != NTRU_OK) { + free(derCert); + free(pem); + return -452; + } + + caFile = fopen(caKeyFile, "rb"); + + if (!caFile) { + free(derCert); + free(pem); + return -453; + } + + bytes = fread(tmp, 1, FOURK_BUF, caFile); + fclose(caFile); + + ret = InitRsaKey(&caKey, 0); + if (ret != 0) { + free(derCert); + free(pem); + return -459; + } + ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes); + if (ret != 0) { + free(derCert); + free(pem); + return -454; + } + + InitCert(&myCert); + + strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); + strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); + strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); + + ret = SetIssuer(&myCert, caCertFile); + if (ret < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -455; + } + + certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key, + public_key_len, &rng); + if (certSz < 0) { + free(derCert); + free(pem); + FreeRsaKey(&caKey); + return -456; + } + + certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, + &caKey, NULL, &rng); + FreeRsaKey(&caKey); + if (certSz < 0) { + free(derCert); + free(pem); + return -457; + } + + +#ifdef CYASSL_TEST_CERT + InitDecodedCert(&decode, derCert, certSz, 0); + ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); + if (ret != 0) { + free(derCert); + free(pem); + return -458; + } + FreeDecodedCert(&decode); +#endif + derFile = fopen("./ntru-cert.der", "wb"); + if (!derFile) { + free(derCert); + free(pem); + return -459; + } + ret = (int)fwrite(derCert, 1, certSz, derFile); + fclose(derFile); + if (ret != certSz) { + free(derCert); + free(pem); + return -473; + } + + pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); + if (pemSz < 0) { + free(derCert); + free(pem); + return -460; + } + + pemFile = fopen("./ntru-cert.pem", "wb"); + if (!pemFile) { + free(derCert); + free(pem); + return -461; + } + ret = (int)fwrite(pem, 1, pemSz, pemFile); + fclose(pemFile); + if (ret != pemSz) { + free(derCert); + free(pem); + return -474; + } + + ntruPrivFile = fopen("./ntru-key.raw", "wb"); + if (!ntruPrivFile) { + free(derCert); + free(pem); + return -462; + } + ret = (int)fwrite(private_key, 1, private_key_len, ntruPrivFile); + fclose(ntruPrivFile); + if (ret != private_key_len) { + free(pem); + free(derCert); + return -475; + } + free(pem); + free(derCert); + } +#endif /* HAVE_NTRU */ +#ifdef CYASSL_CERT_REQ + { + Cert req; + byte* der; + byte* pem; + int derSz; + int pemSz; + FILE* reqFile; + + der = (byte*)malloc(FOURK_BUF); + if (der == NULL) + return -463; + pem = (byte*)malloc(FOURK_BUF); + if (pem == NULL) { + free(der); + return -464; + } + + InitCert(&req); + + req.version = 0; + req.isCA = 1; + strncpy(req.challengePw, "yassl123", CTC_NAME_SIZE); + strncpy(req.subject.country, "US", CTC_NAME_SIZE); + strncpy(req.subject.state, "OR", CTC_NAME_SIZE); + strncpy(req.subject.locality, "Portland", CTC_NAME_SIZE); + strncpy(req.subject.org, "yaSSL", CTC_NAME_SIZE); + strncpy(req.subject.unit, "Development", CTC_NAME_SIZE); + strncpy(req.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); + strncpy(req.subject.email, "info@yassl.com", CTC_NAME_SIZE); + req.sigType = CTC_SHA256wRSA; + + derSz = MakeCertReq(&req, der, FOURK_BUF, &key, NULL); + if (derSz < 0) { + free(pem); + free(der); + return -465; + } + + derSz = SignCert(req.bodySz, req.sigType, der, FOURK_BUF, + &key, NULL, &rng); + if (derSz < 0) { + free(pem); + free(der); + return -466; + } + + pemSz = DerToPem(der, derSz, pem, FOURK_BUF, CERTREQ_TYPE); + if (pemSz < 0) { + free(pem); + free(der); + return -467; + } + + reqFile = fopen("./certreq.der", "wb"); + if (!reqFile) { + free(pem); + free(der); + return -468; + } + + ret = (int)fwrite(der, 1, derSz, reqFile); + fclose(reqFile); + if (ret != derSz) { + free(pem); + free(der); + return -471; + } + + reqFile = fopen("./certreq.pem", "wb"); + if (!reqFile) { + free(pem); + free(der); + return -469; + } + ret = (int)fwrite(pem, 1, pemSz, reqFile); + fclose(reqFile); + if (ret != pemSz) { + free(pem); + free(der); + return -470; + } + + free(pem); + free(der); + } +#endif /* CYASSL_CERT_REQ */ +#endif /* CYASSL_CERT_GEN */ + + FreeRsaKey(&key); +#ifdef HAVE_CAVIUM + RsaFreeCavium(&key); +#endif + free(tmp); + + return 0; +} + +#endif + + +#ifndef NO_DH + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* dhKey = "a:\certs\\dh2048.der"; + #else + static const char* dhKey = "./certs/dh2048.der"; + #endif +#endif + +int dh_test(void) +{ + int ret; + word32 bytes; + word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2; + byte tmp[1024]; + byte priv[256]; + byte pub[256]; + byte priv2[256]; + byte pub2[256]; + byte agree[256]; + byte agree2[256]; + DhKey key; + DhKey key2; + RNG rng; + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); + bytes = sizeof_dh_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); + bytes = sizeof_dh_key_der_2048; +#else + FILE* file = fopen(dhKey, "rb"); + + if (!file) + return -50; + + bytes = (word32) fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + InitDhKey(&key); + InitDhKey(&key2); + ret = DhKeyDecode(tmp, &idx, &key, bytes); + if (ret != 0) + return -51; + + idx = 0; + ret = DhKeyDecode(tmp, &idx, &key2, bytes); + if (ret != 0) + return -52; + + ret = InitRng(&rng); + if (ret != 0) + return -53; + + ret = DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz); + ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2); + if (ret != 0) + return -54; + + ret = DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2); + ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz); + if (ret != 0) + return -55; + + if (memcmp(agree, agree2, agreeSz)) + return -56; + + FreeDhKey(&key); + FreeDhKey(&key2); + + return 0; +} + +#endif /* NO_DH */ + + +#ifndef NO_DSA + +#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) + #ifdef FREESCALE_MQX + static const char* dsaKey = "a:\\certs\\dsa2048.der"; + #else + static const char* dsaKey = "./certs/dsa2048.der"; + #endif +#endif + +int dsa_test(void) +{ + int ret, answer; + word32 bytes; + word32 idx = 0; + byte tmp[1024]; + DsaKey key; + RNG rng; + Sha sha; + byte hash[SHA_DIGEST_SIZE]; + byte signature[40]; + + +#ifdef USE_CERT_BUFFERS_1024 + XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024); + bytes = sizeof_dsa_key_der_1024; +#elif defined(USE_CERT_BUFFERS_2048) + XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048); + bytes = sizeof_dsa_key_der_2048; +#else + FILE* file = fopen(dsaKey, "rb"); + + if (!file) + return -60; + + bytes = (word32) fread(tmp, 1, sizeof(tmp), file); + fclose(file); +#endif /* USE_CERT_BUFFERS */ + + ret = InitSha(&sha); + if (ret != 0) + return -4002; + ShaUpdate(&sha, tmp, bytes); + ShaFinal(&sha, hash); + + InitDsaKey(&key); + ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes); + if (ret != 0) return -61; + + ret = InitRng(&rng); + if (ret != 0) return -62; + + ret = DsaSign(hash, signature, &key, &rng); + if (ret != 0) return -63; + + ret = DsaVerify(hash, signature, &key, &answer); + if (ret != 0) return -64; + if (answer != 1) return -65; + + FreeDsaKey(&key); + + return 0; +} + +#endif /* NO_DSA */ + + +#ifdef OPENSSL_EXTRA + +int openssl_test(void) +{ + EVP_MD_CTX md_ctx; + testVector a, b, c, d, e, f; + byte hash[SHA_DIGEST_SIZE*4]; /* max size */ + + (void)e; + (void)f; + + a.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" + "\x7a"; + a.inLen = strlen(a.input); + a.outLen = MD5_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_md5()); + + EVP_DigestUpdate(&md_ctx, a.input, a.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0) + return -71; + + b.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaa"; + b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" + "\x53\x99\x5E\x26\xA0"; + b.inLen = strlen(b.input); + b.outLen = SHA_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha1()); + + EVP_DigestUpdate(&md_ctx, b.input, b.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0) + return -72; + + + d.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1"; + d.inLen = strlen(d.input); + d.outLen = SHA256_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha256()); + + EVP_DigestUpdate(&md_ctx, d.input, d.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0) + return -78; + +#ifdef CYASSL_SHA384 + + e.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39"; + e.inLen = strlen(e.input); + e.outLen = SHA384_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha384()); + + EVP_DigestUpdate(&md_ctx, e.input, e.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0) + return -79; + +#endif /* CYASSL_SHA384 */ + + +#ifdef CYASSL_SHA512 + + f.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09"; + f.inLen = strlen(f.input); + f.outLen = SHA512_DIGEST_SIZE; + + EVP_MD_CTX_init(&md_ctx); + EVP_DigestInit(&md_ctx, EVP_sha512()); + + EVP_DigestUpdate(&md_ctx, f.input, f.inLen); + EVP_DigestFinal(&md_ctx, hash, 0); + + if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0) + return -80; + +#endif /* CYASSL_SHA512 */ + + + if (RAND_bytes(hash, sizeof(hash)) != 1) + return -73; + + c.input = "what do ya want for nothing?"; + c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" + "\x38"; + c.inLen = strlen(c.input); + c.outLen = MD5_DIGEST_SIZE; + + HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0); + + if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0) + return -74; + + { /* des test */ + const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + byte plain[24]; + byte cipher[24]; + + const_DES_cblock key = + { + 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef + }; + + DES_cblock iv = + { + 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef + }; + + DES_key_schedule sched; + + const byte verify[] = + { + 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, + 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, + 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b + }; + + DES_key_sched(&key, &sched); + + DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT); + DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT); + + if (memcmp(plain, vector, sizeof(vector)) != 0) + return -75; + + if (memcmp(cipher, verify, sizeof(verify)) != 0) + return -76; + + /* test changing iv */ + DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT); + DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT); + + if (memcmp(cipher, verify, sizeof(verify)) != 0) + return -77; + + } /* end des test */ + + { /* evp_cipher test */ + EVP_CIPHER_CTX ctx; + + + const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ + 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, + 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, + 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 + }; + + const byte verify[] = + { + 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, + 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb + }; + + byte key[] = "0123456789abcdef "; /* align */ + byte iv[] = "1234567890abcdef "; /* align */ + + byte cipher[AES_BLOCK_SIZE * 4]; + byte plain [AES_BLOCK_SIZE * 4]; + + EVP_CIPHER_CTX_init(&ctx); + if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0) + return -81; + + if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0) + return -82; + + if (memcmp(cipher, verify, AES_BLOCK_SIZE)) + return -83; + + EVP_CIPHER_CTX_init(&ctx); + if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0) + return -84; + + if (EVP_Cipher(&ctx, plain, cipher, 16) == 0) + return -85; + + if (memcmp(plain, msg, AES_BLOCK_SIZE)) + return -86; + + + } /* end evp_cipher test */ + + return 0; +} + +#endif /* OPENSSL_EXTRA */ + + +#ifndef NO_PWDBASED + +int pkcs12_test(void) +{ + const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67, + 0x00, 0x00 }; + const byte salt[] = { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f }; + + const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65, + 0x00, 0x67, 0x00, 0x00 }; + const byte salt2[] = { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 }; + byte derived[64]; + + const byte verify[] = { + 0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46, + 0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E, + 0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3 + }; + + const byte verify2[] = { + 0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E, + 0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB, + 0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F + }; + + int id = 1; + int kLen = 24; + int iterations = 1; + int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations, + kLen, SHA, id); + + if (ret < 0) + return -103; + + if ( (ret = memcmp(derived, verify, kLen)) != 0) + return -104; + + iterations = 1000; + ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, + kLen, SHA, id); + if (ret < 0) + return -105; + + if ( (ret = memcmp(derived, verify2, 24)) != 0) + return -106; + + return 0; +} + + +int pbkdf2_test(void) +{ + char passwd[] = "password"; + const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; + int iterations = 2048; + int kLen = 24; + byte derived[64]; + + const byte verify[] = { + 0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2, + 0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43 + + }; + + int ret = PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, + iterations, kLen, SHA); + if (ret != 0) + return ret; + + if (memcmp(derived, verify, sizeof(verify)) != 0) + return -102; + + return 0; +} + + +int pbkdf1_test(void) +{ + char passwd[] = "password"; + const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; + int iterations = 1000; + int kLen = 16; + byte derived[16]; + + const byte verify[] = { + 0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB, + 0x4A, 0x3D, 0x2A, 0x20 + }; + + PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, + kLen, SHA); + + if (memcmp(derived, verify, sizeof(verify)) != 0) + return -101; + + return 0; +} + + +int pwdbased_test(void) +{ + int ret = pbkdf1_test(); + ret += pbkdf2_test(); + + return ret + pkcs12_test(); +} + +#endif /* NO_PWDBASED */ + +#if defined(HAVE_HKDF) && (!defined(NO_SHA) || !defined(NO_SHA256)) + +int hkdf_test(void) +{ + int ret; + int L = 42; + byte okm1[42]; + byte ikm1[22] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b }; + byte salt1[13] ={ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c }; + byte info1[10] ={ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9 }; + byte res1[42] = { 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, + 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, + 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, + 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, + 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, + 0x49, 0x18 }; + byte res2[42] = { 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, + 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, + 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, + 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, + 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, + 0xf8, 0x96 }; + byte res3[42] = { 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, + 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, + 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, + 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, + 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, + 0x96, 0xc8 }; + byte res4[42] = { 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, + 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, + 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, + 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, + 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, + 0x58, 0x65 }; + + (void)res1; + (void)res2; + (void)res3; + (void)res4; + +#ifndef NO_SHA + ret = HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L); + if (ret != 0) + return -2001; + + if (memcmp(okm1, res1, L) != 0) + return -2002; + + ret = HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L); + if (ret != 0) + return -2003; + + if (memcmp(okm1, res2, L) != 0) + return -2004; +#endif /* NO_SHA */ + +#ifndef NO_SHA256 + ret = HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L); + if (ret != 0) + return -2005; + + if (memcmp(okm1, res3, L) != 0) + return -2006; + + ret = HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L); + if (ret != 0) + return -2007; + + if (memcmp(okm1, res4, L) != 0) + return -2007; +#endif /* NO_SHA256 */ + + return 0; +} + +#endif /* HAVE_HKDF */ + + +#ifdef HAVE_ECC + +int ecc_test(void) +{ + RNG rng; + byte sharedA[1024]; + byte sharedB[1024]; + byte sig[1024]; + byte digest[20]; + byte exportBuf[1024]; + word32 x, y; + int i, verify, ret; + ecc_key userA, userB, pubKey; + + ret = InitRng(&rng); + if (ret != 0) + return -1001; + + ecc_init(&userA); + ecc_init(&userB); + ecc_init(&pubKey); + + ret = ecc_make_key(&rng, 32, &userA); + + if (ret != 0) + return -1014; + + ret = ecc_make_key(&rng, 32, &userB); + + if (ret != 0) + return -1002; + + x = sizeof(sharedA); + ret = ecc_shared_secret(&userA, &userB, sharedA, &x); + + if (ret != 0) + return -1015; + + y = sizeof(sharedB); + ret = ecc_shared_secret(&userB, &userA, sharedB, &y); + + if (ret != 0) + return -1003; + + if (y != x) + return -1004; + + if (memcmp(sharedA, sharedB, x)) + return -1005; + + x = sizeof(exportBuf); + ret = ecc_export_x963(&userA, exportBuf, &x); + if (ret != 0) + return -1006; + + ret = ecc_import_x963(exportBuf, x, &pubKey); + + if (ret != 0) + return -1007; + + y = sizeof(sharedB); + ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y); + + if (ret != 0) + return -1008; + + if (memcmp(sharedA, sharedB, y)) + return -1010; + + /* test DSA sign hash */ + for (i = 0; i < (int)sizeof(digest); i++) + digest[i] = (byte)i; + + x = sizeof(sig); + ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA); + + if (ret != 0) + return -1016; + + verify = 0; + ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA); + + if (ret != 0) + return -1011; + + if (verify != 1) + return -1012; + + x = sizeof(exportBuf); + ret = ecc_export_private_only(&userA, exportBuf, &x); + if (ret != 0) + return -1013; + + ecc_free(&pubKey); + ecc_free(&userB); + ecc_free(&userA); + + return 0; +} + +#ifdef HAVE_ECC_ENCRYPT + +int ecc_encrypt_test(void) +{ + RNG rng; + int ret; + ecc_key userA, userB; + byte msg[48]; + byte plain[48]; + byte out[80]; + word32 outSz = sizeof(out); + word32 plainSz = sizeof(plain); + int i; + + ret = InitRng(&rng); + if (ret != 0) + return -3001; + + ecc_init(&userA); + ecc_init(&userB); + + ret = ecc_make_key(&rng, 32, &userA); + ret += ecc_make_key(&rng, 32, &userB); + + if (ret != 0) + return -3002; + + for (i = 0; i < 48; i++) + msg[i] = i; + + /* encrypt msg to B */ + ret = ecc_encrypt(&userA, &userB, msg, sizeof(msg), out, &outSz, NULL); + if (ret != 0) + return -3003; + + /* decrypt msg from A */ + ret = ecc_decrypt(&userB, &userA, out, outSz, plain, &plainSz, NULL); + if (ret != 0) + return -3004; + + if (memcmp(plain, msg, sizeof(msg)) != 0) + return -3005; + + + { /* let's verify message exchange works, A is client, B is server */ + ecEncCtx* cliCtx = ecc_ctx_new(REQ_RESP_CLIENT, &rng); + ecEncCtx* srvCtx = ecc_ctx_new(REQ_RESP_SERVER, &rng); + + byte cliSalt[EXCHANGE_SALT_SZ]; + byte srvSalt[EXCHANGE_SALT_SZ]; + const byte* tmpSalt; + + if (cliCtx == NULL || srvCtx == NULL) + return -3006; + + /* get salt to send to peer */ + tmpSalt = ecc_ctx_get_own_salt(cliCtx); + if (tmpSalt == NULL) + return -3007; + memcpy(cliSalt, tmpSalt, EXCHANGE_SALT_SZ); + + tmpSalt = ecc_ctx_get_own_salt(srvCtx); + if (tmpSalt == NULL) + return -3007; + memcpy(srvSalt, tmpSalt, EXCHANGE_SALT_SZ); + + /* in actual use, we'd get the peer's salt over the transport */ + ret = ecc_ctx_set_peer_salt(cliCtx, srvSalt); + ret += ecc_ctx_set_peer_salt(srvCtx, cliSalt); + + if (ret != 0) + return -3008; + + /* get encrypted msg (request) to send to B */ + outSz = sizeof(out); + ret = ecc_encrypt(&userA, &userB, msg, sizeof(msg), out, &outSz,cliCtx); + if (ret != 0) + return -3009; + + /* B decrypts msg (request) from A */ + plainSz = sizeof(plain); + ret = ecc_decrypt(&userB, &userA, out, outSz, plain, &plainSz, srvCtx); + if (ret != 0) + return -3010; + + if (memcmp(plain, msg, sizeof(msg)) != 0) + return -3011; + + { + /* msg2 (response) from B to A */ + byte msg2[48]; + byte plain2[48]; + byte out2[80]; + word32 outSz2 = sizeof(out2); + word32 plainSz2 = sizeof(plain2); + + for (i = 0; i < 48; i++) + msg2[i] = i+48; + + /* get encrypted msg (response) to send to B */ + ret = ecc_encrypt(&userB, &userA, msg2, sizeof(msg2), out2, + &outSz2, srvCtx); + if (ret != 0) + return -3012; + + /* A decrypts msg (response) from B */ + ret = ecc_decrypt(&userA, &userB, out2, outSz2, plain2, &plainSz2, + cliCtx); + if (ret != 0) + return -3013; + + if (memcmp(plain2, msg2, sizeof(msg2)) != 0) + return -3014; + } + + /* cleanup */ + ecc_ctx_free(srvCtx); + ecc_ctx_free(cliCtx); + } + + /* cleanup */ + ecc_free(&userB); + ecc_free(&userA); + + return 0; +} + +#endif /* HAVE_ECC_ENCRYPT */ +#endif /* HAVE_ECC */ + +#ifdef HAVE_LIBZ + +const byte sample_text[] = + "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" + "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" + "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" + "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" + "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" + "small batch meggings kogi dolore food truck bespoke gastropub.\n" + "\n" + "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" + "four loko you probably haven't heard of them high life. Messenger bag\n" + "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" + "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" + "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" + "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" + "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" + "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n" + "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n" + "four loko whatever street art yr farm-to-table.\n" + "\n" + "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n" + "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n" + "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n" + "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n" + "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n" + "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n" + "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n" + "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n" + "locavore.\n" + "\n" + "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n" + "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n" + "cillum pickled velit, YOLO officia you probably haven't heard of them\n" + "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n" + "small batch american apparel. Put a bird on it cosby sweater before they\n" + "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n" + "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n" + "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n" + "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n" + "neutra PBR selvage.\n" + "\n" + "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n" + "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n" + "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n" + "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n" + "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n" + "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n" + "incididunt flannel sustainable helvetica pork belly pug banksy you\n" + "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n" + "mollit magna, sriracha sartorial helvetica.\n" + "\n" + "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n" + "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n" + "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n" + "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n" + "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n" + "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n" + "Veniam sunt food truck leggings, sint vinyl fap.\n" + "\n" + "Hella dolore pork belly, truffaut carles you probably haven't heard of\n" + "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n" + "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n" + "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n" + "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n" + "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n" + "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n" + "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n" + "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n" + "\n" + "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n" + "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n" + "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n" + "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n" + "tousled beard mollit mustache leggings portland next level. Nihil esse\n" + "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n" + "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n" + "bag dolor terry richardson sapiente.\n"; + + +int compress_test(void) +{ + int ret = 0; + word32 dSz = sizeof(sample_text); + word32 cSz = (dSz + (word32)(dSz * 0.001) + 12); + byte *c = NULL; + byte *d = NULL; + + c = calloc(cSz, sizeof(byte)); + d = calloc(dSz, sizeof(byte)); + + if (c == NULL || d == NULL) + ret = -300; + + if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0) + ret = -301; + + if (ret > 0) { + cSz = (word32)ret; + ret = 0; + } + + if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz) + ret = -302; + + if (ret == 0 && memcmp(d, sample_text, dSz)) + ret = -303; + + if (c) free(c); + if (d) free(d); + + return ret; +} + +#endif /* HAVE_LIBZ */ + +#ifdef HAVE_PKCS7 + +int pkcs7enveloped_test(void) +{ + int ret = 0; + + int cipher = DES3b; + int envelopedSz, decodedSz; + PKCS7 pkcs7; + byte* cert; + byte* privKey; + byte enveloped[2048]; + byte decoded[2048]; + + size_t certSz; + size_t privKeySz; + FILE* certFile; + FILE* keyFile; + FILE* pkcs7File; + const char* pkcs7OutFile = "pkcs7envelopedData.der"; + + const byte data[] = { /* Hello World */ + 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f, + 0x72,0x6c,0x64 + }; + + /* read client cert and key in DER format */ + cert = (byte*)malloc(FOURK_BUF); + if (cert == NULL) + return -201; + + privKey = (byte*)malloc(FOURK_BUF); + if (privKey == NULL) { + free(cert); + return -202; + } + + certFile = fopen(clientCert, "rb"); + if (!certFile) { + free(cert); + free(privKey); + err_sys("can't open ./certs/client-cert.der, " + "Please run from CyaSSL home dir", -42); + } + + certSz = fread(cert, 1, FOURK_BUF, certFile); + fclose(certFile); + + keyFile = fopen(clientKey, "rb"); + if (!keyFile) { + free(cert); + free(privKey); + err_sys("can't open ./certs/client-key.der, " + "Please run from CyaSSL home dir", -43); + } + + privKeySz = fread(privKey, 1, FOURK_BUF, keyFile); + fclose(keyFile); + + PKCS7_InitWithCert(&pkcs7, cert, (word32)certSz); + pkcs7.content = (byte*)data; + pkcs7.contentSz = (word32)sizeof(data); + pkcs7.contentOID = DATA; + pkcs7.encryptOID = cipher; + pkcs7.privateKey = privKey; + pkcs7.privateKeySz = (word32)privKeySz; + + /* encode envelopedData */ + envelopedSz = PKCS7_EncodeEnvelopedData(&pkcs7, enveloped, + sizeof(enveloped)); + if (envelopedSz <= 0) { + free(cert); + free(privKey); + return -203; + } + + /* decode envelopedData */ + decodedSz = PKCS7_DecodeEnvelopedData(&pkcs7, enveloped, envelopedSz, + decoded, sizeof(decoded)); + if (decodedSz <= 0) { + free(cert); + free(privKey); + return -204; + } + + /* test decode result */ + if (memcmp(decoded, data, sizeof(data)) != 0) { + free(cert); + free(privKey); + return -205; + } + + /* output pkcs7 envelopedData for external testing */ + pkcs7File = fopen(pkcs7OutFile, "wb"); + if (!pkcs7File) { + free(cert); + free(privKey); + return -206; + } + + ret = (int)fwrite(enveloped, envelopedSz, 1, pkcs7File); + fclose(pkcs7File); + + free(cert); + free(privKey); + PKCS7_Free(&pkcs7); + + if (ret > 0) + return 0; + + return ret; +} + +int pkcs7signed_test(void) +{ + int ret = 0; + + FILE* file; + byte* certDer; + byte* keyDer; + byte* out; + char data[] = "Hello World"; + word32 dataSz, outSz, certDerSz, keyDerSz; + PKCS7 msg; + RNG rng; + + byte transIdOid[] = + { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, + 0x09, 0x07 }; + byte messageTypeOid[] = + { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, + 0x09, 0x02 }; + byte senderNonceOid[] = + { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, + 0x09, 0x05 }; + byte transId[(SHA_DIGEST_SIZE + 1) * 2 + 1]; + byte messageType[] = { 0x13, 2, '1', '9' }; + byte senderNonce[PKCS7_NONCE_SZ + 2]; + + PKCS7Attrib attribs[] = + { + { transIdOid, sizeof(transIdOid), + transId, sizeof(transId) - 1 }, /* take off the null */ + { messageTypeOid, sizeof(messageTypeOid), + messageType, sizeof(messageType) }, + { senderNonceOid, sizeof(senderNonceOid), + senderNonce, sizeof(senderNonce) } + }; + + dataSz = (word32) strlen(data); + outSz = FOURK_BUF; + + certDer = (byte*)malloc(FOURK_BUF); + if (certDer == NULL) + return -207; + keyDer = (byte*)malloc(FOURK_BUF); + if (keyDer == NULL) { + free(certDer); + return -208; + } + out = (byte*)malloc(FOURK_BUF); + if (out == NULL) { + free(certDer); + free(keyDer); + return -209; + } + + /* read in DER cert of recipient, into cert of size certSz */ + file = fopen(clientCert, "rb"); + if (!file) { + free(certDer); + free(keyDer); + free(out); + err_sys("can't open ./certs/client-cert.der, " + "Please run from CyaSSL home dir", -44); + } + certDerSz = (word32)fread(certDer, 1, FOURK_BUF, file); + fclose(file); + + file = fopen(clientKey, "rb"); + if (!file) { + free(certDer); + free(keyDer); + free(out); + err_sys("can't open ./certs/client-key.der, " + "Please run from CyaSSL home dir", -45); + } + keyDerSz = (word32)fread(keyDer, 1, FOURK_BUF, file); + fclose(file); + + ret = InitRng(&rng); + if (ret != 0) { + free(certDer); + free(keyDer); + free(out); + return -210; + } + + senderNonce[0] = 0x04; + senderNonce[1] = PKCS7_NONCE_SZ; + + ret = RNG_GenerateBlock(&rng, &senderNonce[2], PKCS7_NONCE_SZ); + if (ret != 0) { + free(certDer); + free(keyDer); + free(out); + return -211; + } + + PKCS7_InitWithCert(&msg, certDer, certDerSz); + msg.privateKey = keyDer; + msg.privateKeySz = keyDerSz; + msg.content = (byte*)data; + msg.contentSz = dataSz; + msg.hashOID = SHAh; + msg.encryptOID = RSAk; + msg.signedAttribs = attribs; + msg.signedAttribsSz = sizeof(attribs)/sizeof(PKCS7Attrib); + msg.rng = &rng; + { + Sha sha; + byte digest[SHA_DIGEST_SIZE]; + int i,j; + + transId[0] = 0x13; + transId[1] = SHA_DIGEST_SIZE * 2; + + ret = InitSha(&sha); + if (ret != 0) { + free(certDer); + free(keyDer); + free(out); + return -4003; + } + ShaUpdate(&sha, msg.publicKey, msg.publicKeySz); + ShaFinal(&sha, digest); + + for (i = 0, j = 2; i < SHA_DIGEST_SIZE; i++, j += 2) { + snprintf((char*)&transId[j], 3, "%02x", digest[i]); + } + } + ret = PKCS7_EncodeSignedData(&msg, out, outSz); + if (ret < 0) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -212; + } + else + outSz = ret; + + /* write PKCS#7 to output file for more testing */ + file = fopen("./pkcs7signedData.der", "wb"); + if (!file) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -213; + } + ret = (int)fwrite(out, 1, outSz, file); + fclose(file); + if (ret != (int)outSz) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -218; + } + + PKCS7_Free(&msg); + PKCS7_InitWithCert(&msg, NULL, 0); + + ret = PKCS7_VerifySignedData(&msg, out, outSz); + if (ret < 0) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -214; + } + + if (msg.singleCert == NULL || msg.singleCertSz == 0) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -215; + } + + file = fopen("./pkcs7cert.der", "wb"); + if (!file) { + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + return -216; + } + ret = (int)fwrite(msg.singleCert, 1, msg.singleCertSz, file); + fclose(file); + + free(certDer); + free(keyDer); + free(out); + PKCS7_Free(&msg); + + if (ret > 0) + return 0; + + return ret; +} + +#endif /* HAVE_PKCS7 */ + +#endif /* NO_CRYPT_TEST */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.h b/project1/cyassl-3.0.0/ctaocrypt/test/test.h new file mode 100644 index 00000000..2310ed51 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/test.h @@ -0,0 +1,33 @@ +/* ctaocrypt/test/test.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#pragma once + +#ifdef __cplusplus + extern "C" { +#endif + +void ctaocrypt_test(void* args); + +#ifdef __cplusplus + } /* extern "C" */ +#endif + diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.o b/project1/cyassl-3.0.0/ctaocrypt/test/test.o new file mode 100644 index 0000000000000000000000000000000000000000..8d0ac21b0c9497cc331b80c8f4edf8e34749031c GIT binary patch literal 15008 zcmbtb3wTu3wcde%2}TnsAXRDy957%QNHTdqF%U>XfCNGk9)cK#Wb%N?B+g8LU=T2g zFdafs(Sj9=P^(t7w7ycb8s4QAQG8+X*;}uaM-{IYtSI;Y&)NITnUkQm*Ykacf3LmP zUTd$l*M6KmVMT61UQ|?6cOjoB(OpC-0+?je38w~$B3{Ial36pGPbC~@&D>Rc*fi8+ zw;h-ma{wq`a8M%y*1;}4;&&b+rX^Mz=| zT+^BPL=VMW(wX^DPsOb4%p4G-m@_&vOJWr>r!#ZHrHYx_nVB7@n1ebq3old5D>^gp zy<9OFcuRy18_Z7-I1BU1D^$z(Ix#UC40ZF~gqzFe?vV|1?9qmb13C5>$5(Q^4n*6H zaxh?z(WU-zCp4JI+at)6i^Hsw3r*#lP32-!InPucZ7MrVkZQ905g9LnP4)qyiRVJ`!2)}X z76>VHAUH;kL0gW!KDZyzidHqD0<_6KA3RKXgbH?Is9y_RYez$$w!*09edn7GBqVn< ze;pk>blawr(P!Tc9$&SWp+x%3+oMPJFKmTZ&HA<{Nx)Wu;YA;4?=Pb|pbxkP$7Yn+ zgTzemfJqTDmdKCOWyVCvSR%htmnqO>n(Woe>(-9;vQIBuXs8c<+7`g#lw*(U1<^K- zy)?M%WUtWW^G>LO9oWOD39DmmcoTzDJb8e(IQ zJ+WPmf$ns`KJw&cq2=d7x#9vk*}N}7bGZr2L8Ov74B2F6kA-m~8OfpCQ>G+hC&Iyi z-nM)#7*V%v2nU1Sn}XrN5*HDSX7B}+_BUJ}AjiuV0}jT`9x-7O4Y?%nMh?(roDnja zhRhhqj7!mFawzknmM4#)#Juej{Ab7!Owwl#IuVDFj|qMe0tf!jMs(30+mPXB`*g-( zIdUd+xiJNGNg0XuB1+6f^L&O%s!_~oWM+l(&P!gtZX#knUfnhg^D(;lz-eSBlIudZ z;NkdnQ?aXJTD~7Vw`wngXo_jm#bRno9>i2z@MKKCb=t|8e(SW8G1aDBWK0KKG^PU( zjA|KEbXnz2`_wLDN=X&ALKV|e88)5$8PDo@QZon(n=zKkimrl$OV9MkRSV8q&1^T6Oo3A=;TVUxT~PpB8w;cV_iuM<=CB}#PQgAZOyx) zn>!MM`=?=T83~>fE599UhYkBrQuDvBjK8NN{+W)pF|Ax@LPNog;r`RsVjqW;#8xg3 zH;RFywi6R66Cu$35-Fz`_UE76SNHOH_N~}`D@AFrx}UR^J!?sdCdyj z%0&_9gV9j!42}ETV95@(cAzVEtd)uJxn~;&U^h%^n|xZ^4dd6H{RYcbFSJZLd-PWW)OM1vWN=sO!S?s)M9!{G>$wMecf>qV$E=t(6(lV*?A^se^9tPNaBHLNfydhU zrIW|;tq(JXVFTzctcRV8>*QP`UD9Q=7_rD0=?2W=^iMxb=-mvvk3hZKMWCpvt3bVD z1PT(S96E)RiU?FQoY6Yp_LO})i~4ET*a=MIvfaLs0+wSP!WDQ^a|CFmfr5w$!fo1Bf@&YbOX!>?Vw2 zIM8On-V~h3e#=0cnR^-NVJ6RwgH6~UEgko$C^M{DluPh6#qZ#V7zeQQ7%M>g+thAH zANy-g=<&8GCp5iBm0qg4d9M7Hcn3pi){7-H2X^_G`udc87%Js3@*_)&jj|7uc6_-C zxU1LWo}pbc*WyAmLywJplayRFg9lnK#JA*8c@u_Q?>7};%%VAVy25=3s8&Kk6fr%u z`4({^WCY?{&!CN#2w1)`LFkGMh}Ikl|CT0q5OQt$j)z21yf-!8IHhM2ZS!bOoZdKY;i$Lu2-RV=@K5r zO`SJI_7(6OW`%OF-FD7_eXXb44?`f3t_|JAl0bbQ$W&0-m)wC5WVIj}xfaed_!Yxs z)J6$uYLxYl>9v<)0O_~9Lc;`DgDO5Y#8)`fiw#9y% zufZFrsdd|GU4d#_ZH*sTUfoL+=A_xQC*bx6Y?ZDWkGo=EFHw@8eUa+nDQW38TcmV; zVfKXK)YL^aHFaH0MUkBB;t9?!I+K%I(p6_ro!W(TcGuFy*;8|-6+%AJWN}HCj^^a+ z7A?}Q1?6IWRMEyUN2cv~^WL$`6F*$x6SZ!?-&N(dRn$}=hT_XbHOrfxy}PY=&WPmS zoN>J((5S*)Syf%LaFM6hTUURJ&mU-5yku$PGLb!gLQZbp#QaH57ooVSAnWMz3fyXu;S@QN554i>;{W5#=FNMJh3w^JWn05N|t=Iq8 z!5P~p{nat>l4q8QM>l1qPwcsB;m)kVw=6B%?YaMzqnkAk=_LK6tMrx*(`UL(&*?n< zX9ySt212xK%*q+?lOx`pPfULB%jrWu`Y5mdjBtI==X)#op7veh@wsD$yu@YI($D zccokW#`1{#8e3_#+vgT{ZSXBi&wOsc4?bUau5al4X0fE&6|hy**&1E8B`z;!bDhuT ztqWAwc&o;WhPb6!3wJ!-{lp{QG3E3)v3$$ zpi__OfcWJ6`wKrhIb!RPK)*N6w7h@+;QN{yMelk3@qgHU#i2X5-S_!VAG~#1`I&~- z#FDH>uSs8dd0uN_`^i`CT=nqK8)HLR=XMQxyL?8Um)~%IBciU&tqMMN=o9e?N}}P} z)hjoBu}?tIMvFHe%zpUPn9TS8=n~;spieB!ZqsB5*X1sD z`x@)KZd;W*;J4-ZYARffwz|qnhwv>Bi4OtF=vNbd{78*sANW@>bONglbn&oifsy$u>rnR7JgA)k_m% zu;1qP`7p9K*albh5_`_S_Ll3ezl-HxP4fJ?>cgK1v2o|^Q*P=v{?@l1>^*Ew&alC! zDhkEUrTt#~S=8YZ+1caXoA<<^Yj<>aZM*l%W%oaoaKZJN==->M=E~$dX7un?{4Lb+ z%vTv}*PY3GL5LmB0@u-FnI$(p^4phxd+C|$*ZgR=IM{r{!$ba&;c=uKJ}c(Fvn%h# z`3+MSM%#zP+|zJiju;!W`MOcfn@`RDL&d4g3EBzC`j5A6iLJ(O3sk#p+J?j|b$L8C zHLSgzGncN%@P?X-cSK$9X`dE<@_)W6yTjkN^~pg~?zn!+)bD8j&3ijHE-p<;V2V(u z(uZG8wdaa~$=TCgx2&45W$10Mww${>SkaQw`;C~5{WtUttnR&h$Hn@0&xX5Zm5pCj zlJu9&c}upYz9htBIB`6WcNgB9ad=_b4}49&55V1xleb=H*MIR`H?$!XMW@s-UUBmFYnBc+|&*J zj0HFvHQ35ME^n0$^WR@n=e4CeoWqkFG)}55G2p85k0{P9$jvUvElYKdsI2k2JVR}X z3ozL$Y!ELfm|4g+Lxpho+#W~3y)+;k<#n~SSRRC9f#0v!SGWQ$O~6;@@YI#NJi>t$ z+U=M)b;fXiz*W9TIQ-TAfG^-$fRe(-T8;MAvAJ;Q|LPQlk{!wEP_J<%ZOW=|FXDvD z4?BUwyY@KwZ$G`ve^vTY20yqP&$v_}67V&HU(2=jl#9W;K+>2B+T%3oVujMjdmhSv zm)ugw&^CX>;6r^Mu+#D(kMA6bINxheAN(@1j12jx;*UVHtn98wMWPY{s{Z{DWwXCU zqlG9!9sPydnjHIIjhFgV|2m+Le;}bAUhj~^IbOq&k}>ngLQIoo0%iD;Z)z?cf}HtL zym6>hK9Enj)hx(I$rXcEF(IpE5d6SBIDaYUSkYhhaWY=BzSon4Sg4W$Jf#oCh{s$X zEzVq+EGuk~iV{5p|Eh!KDd$Y%|e^P|h&XZ=yUEFa4(d_fam!i$BlM=;J7tyO49u0 z#?<^?BDrd<{Al!B_mA;9Uh8%Za8h9(19JUkZ96 zc&h*NK(7H`^|uoAW)r;{^i7ag{a+7yxryEc`uC7m{%i%!{aX3+6lm_-I^9#-<3BX< z{|NpG6TKhw|Cs2*pdUtieZKb;w;?`m&?-Jh!9Ndqo!>*$VlA757uA~omt)QqfSw@f zD?$GZ^baKc1-vWJ!iT)5B zp>BQMxcQUZwv8${(2M^C&~m;9rKa%|s7Gd7Oz(L3zH39*^=$6Ws&8 zaedI^-BUO~F9fZ}r>9ti`0=mE6u%L4FB821G}kM|-v@fMiO;!k1bpr#QP_q1g8s9K z9uE5VruK6||J6jJXgraB4al6rV40ro+Nu|>=#KF>Ki!Q}fL_~O+v&m*-L+X^rm>Nj zp6@v)I(#%6X8zs%y+=xwesFeQ@bQY59YDqIzW0Cwp zDPM;9@HHksJ)^##0@F~(-~UKI1NvPAQ_)*M2QLZJb0GUCv`<4l<);JLmpQV1U*K^} zo|%%*eq~{>`B#^eUyS-hgpGMc+70?M@X{r1Gli5n(%V9Rh4E7l`Cprch%|Mnhx8al z07*Y>Y5$Og=Gv$p$`@GZ8!Yr73!RVnsE6&-E%Y!8U1XuZvG_aL;*ZlpkG0S?i@uQ< z8}+b1Sr+|wS?D`0@-JBE@fJGMLg!iZ?Y7XHE%fg!^y?P-V+;MJ#oj>+z0E>zvd}|R zFo2AQ3wfs=(jkkz6&AYHLdRO-U1{M@vDp7_OTK(yk>@;85BoD;5kS(zE#oc91FpJq zUt@h>1TSW_e;noE+A`LPvWW%L#%C9lP0PzG$t^7_%^qKnTP7w{yUQ09H+V~NuU+B} z1aQyg7qt~>dK*UpK8-|uL%=Wm)h<(AMg}YJk!!BY6xFq^^0LU*8Kd;t$o82djoL^h znaRTCD|edIW~PV=x8Gcm%8FETjZ?THMbd=N<*lfzH4CK+pWp05W`?M!HVb45M*+Y6 zBxIzEdS8tRq9BoCsj31O;I&UPpVVZD21u%Vv@HeP*{;B@Xn~mhp?NaJbsSj9=^7`wqCVS zwo{euRAt+#Y&(^0r?Tx#)eMwWy98co043dk9!00>mNQKWBMm4I2sZ%{(MnlQQ`Xaz z^)zKYO?jS16A}67!1W*UINCTqB`v*Dm3PVZYmp7ME0J=B41rOen2ti ziKAw5xD2mF4rYgxS98g+*j*l|^J%OJ3(9l7+5)1;9JfxIqzH#Lrr#4%OVYFw8@gufTkELHL0myOU?R5b1l5gcKfAYhHS0Biq$4lI;9L5g1Dxl zOPmeG-YQW%bz<2>x7Y2%gcy%|C0rvFs0G7O;}x~IV67`hC6|Z{HMkjRqLR1SqSEJf zRfx)RPo3Yb>-4*rUB!M^k*{Vkl!8JZ>MGn?UBd!TjS=;*km@CBaOquEQd0%X?pnV) zz*el9sdroU!zuE7ZZ}x8g+91d2UXH#=+iN$ngZItvJ*Mg%3E-XT)0@zsm`vV25Qvh zYh7@>x;!~0Q(q_bJC9!Y;J60+Q1lZ0Y!y2m_m-r$;T#H#oq#=6(md4i1Ir~=Lyj+=|iL^3h{=dPms>n&;OLa1bbubBz&6zN!v+J#{b)qbT;WJ_#Tw> z&7=$Tvoz&zC0(fBH;~>)8Xwz%noB0j*cBH|Z>Aw=x+DMak=Swx%@CKGX%o=LuM?uu-`(&IBy_6AjG5Or(wK^ zqu?*=vG{&OydQZ*ybtRH){5vL<}-0U<{c6Cg2X$~j`%YnP7=}2VOUe5@4{bm5g){T z1@UenenkZTIbdw25PL|&-U%Y?eMW@6e-m%V_+w3q-i*6QU~IY&KPHaGeHiPv3h@&n z*1hRK`n!O9_~RjF2oWG3`hQJ?{vAZh$}GfB@XHf z8k?0@;(8+dd4#wMag_Kvkp1BkbrX0JF)cM3X{jN?t0B~D*k9rRi8kUqA?%X=U(wMy A`2YX_ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.sln b/project1/cyassl-3.0.0/ctaocrypt/test/test.sln new file mode 100755 index 00000000..97b2e8df --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/test.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.ActiveCfg = Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.Build.0 = Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.ActiveCfg = Release|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj b/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj new file mode 100755 index 00000000..38c5c6be --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt b/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt new file mode 100755 index 00000000..954447f9 --- /dev/null +++ b/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt @@ -0,0 +1,228 @@ +#! /bin/bash + +# ctaocrypt/test/testctaocrypt - temporary wrapper script for .libs/testctaocrypt +# Generated by libtool (GNU libtool) 2.4.2 +# +# The ctaocrypt/test/testctaocrypt program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/test/test.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'testctaocrypt' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o b/project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o new file mode 100644 index 0000000000000000000000000000000000000000..2b16426b39ae53a4a948f7f0d659d6a96380febd GIT binary patch literal 14932 zcmbtb3w%_?)t^AX1fz)vNR`?J7YrB{l58Fz1_DV4kU&VnLmq}D**svgiMtyh7+xk3 z)+H1zTCmchv{frwT3;zz zIcLt9Gmkr2R^=AtMMXt*7xIY`-9?llfE_>338w~$B3{Ial36pGPbZvY&D=Hn*fi8+ zw;h@oa{r!#ZHrHYx_nVB7@n1ebq3old5D>^gp zy<9OFcuRzi8qALoI1BTMD^$yOIx#UC40ZGVgj>qy?vo93?9qmbLpk;s$Cq-v4n^CI zaxh?z(WU-=7c`j2+at(ROTw&Ei%jKPOyy!zInPucZ7MrVoNrqGDU_=DP(46=`!;oWEL1Q6_BYe(q%lFOpARrNHtl0kBk?=Ci{TU#Pgx}V1YeG z3xpIp6da?+pe@HeoWoy1SuITVYi5fsW=w3CX*g zzlshXS-Is@^trc#C)ey}D3Lz%_vw-S6IU{ZvPCGz8RnK2PEmdLNxWePNzCVRE=x^;JZ*(Vn+G}H$_X$xR+%CX1wf@qt^ zUK-qUs#oap@xfAiT=T(%P~Le2CI$gDA{O+7%b~o_w74Z{aibL#w}cQBv`s#TsD06W z<>RM%hG65|@iqGyCR5a&V;j6i)Se}Qk-SLMY~UKPx=7SCnH+nON)C8C7v9FVhS=C+ zPi&WCpgSF~k34l*XvO(ZuDF0sHXlgPTyDa05UFGiLpGV&V`1D(Msg_kv?+<$iEuEW zw=G`_M%2np;b72vQ!qSO;v$0448DNU{)Wo~HGeRcQ zkQoD+aVfe?4rN}@^5jvJn74g`{|GsPN&3t|C*m;jF~QG6;K2Xch%VY=8#4TCpUya} zK+c3NH>RL2DI?KdM2Wd*p3hK8HHtZn%&bsehven!CL-qJHEq){AETQOok4aYxh`}I z9*y5H6}u{?<-5W2YxXmUrkFNeET*R9K}@v;Psa2cr=5)HH%>blQ*GKs#&p0%V>$rA zsFpEBmsRexPwg_MlvH6WR52};aWgXuEHN#WF*VQCZ;vU1_q=rM$Lpz(Yu*#x zygMOya2nQ@k>EM8^4qa?*s%X3HUImn_dxXEZL#f-RO!PYh_}5?zx5m*bS4~CZExE!}ty7zQ%IZ3oVn*9Y57A z_{p069DUOS>$DN*$$<6OI8{WqJ!gNIqdSJnFwWOT?zO*Vbth> z-m1T9r7i8;*aG(chzvEF7oqo{u_1uy$o4TXUP@KiB&E2a3U1MwG!bLeV;6pxYK9w~ z;xK9owVfm^8Qjx)xcwbEk+Y}MdhWsA9WhVTF)OA`1xX7Hdv~$WybQNF+}bF6;IVdo z>Ev;I>qCrT*Z{f<>tW~OIyu)!mvk8|Ml3Q$x&gB|{nHNQHTV*mslER3Cbiqq z$NriVdc1AQ2~F>DrI)I1nJd2~-oj9t^GhXl0O_~9Lc;`Dhblf@DAR`;N!$JsRK~ZY%gjYC)n9_x=*5fM5j6-4;Fr~QxUOw`%3VxTl@@5bJ$oj*!=43n8!;RJ zjzw1;gi3Y=Dm6!?N;)c4qGy_yN*DS|4-raOu=Mq?*4Kt{P^xTOV*Uq6G}zG6943n* zCM`2hTi=s+?-S!2YCILTC4QT)!5gTlb=zuPfofZAjUQNE-Afeaq}jA5;PwY>m983( zyJBE3QIem1k?P?oY3Vjwq;!5^_JrZo)I~KlbzMzGk(}(}3C=D$lapK0RcBD0+J$s> z*V4t=Q*)*jLO#-DaY>hs=H%-ZEz+)qv~zBQH8s*s=8*;Vo$BNuKre^KhUsb>9WSP{?C+R0$rMGmLKGSV_PUq=AL%=975Ta#sR?dJMk9l`JKKX$!rVst#gS`5)!u1`W z@2ucE+INY^=8iq_VsX{7z0F%k^u6|>k}bCk*(U65i(JQgX10H@d&rOCvKEZmKIU&X zS6moa^{>-s{`|cYJ@<%9EsvP&u5^oESssyJV=Jw8``qI0O}^#nna>Wm^0N)+`-VEU zilx=AfUTm=*66Y=b$KzH>wGqEU7)(gTQycR#4XEOwDYO%A3f|%?lu3JO!4-A{fL>* zJBz>Hr(oTQ_Cu+koP6S6ow`g9I`xttoUG%}J5f2^<^n2}W%e(gvzOSiK^q%h@ z|GOPm9Jy=zeV^U=z-`mY&o;a&mS#P2ZTjlV^I8krPrZECnumto92?3yzh}^!Hn^gf*w^vu8?L+mCRTho$@9mm_iq$p z^RC;c%d)8m2CawhxK9r{T~XF*auF^`n}%o}T@?iqn}Bw9}6D zA8*}KTaDiqsCL`54T)Lm@_1}&SbIBXF58IV4K)?-jJm#rk*8rn_gAjbBre^rx+POCL;qQHV!zdUy`+9=x~UAi}aA_^Nz=3fJF4 z+5ANAxAiW+AN#FIAadjFl5g69JM$yA;*0Q&J^A8%V{^8ML~hX*Cj5xptGnczHto** z$lbd$KXM!If*-M;cjiZK>;`|vLL848Y~>!8x5|b!z+Y46wWT_o!;>2{PO2?2;HvVE zD9$a&%`V9;OLdN@tns=$Lv4u*G2tt05HBd0S;#g+g>d-X9!J2vEFc`^b+xrvB7|e1 z->=tKxB@Osz*pz+)RntD!hu!V?U*=q#&CbYRlZm_{MG(|FW_2;lETJXjrP^Cxp3(J z>J){N9m(lXuW==9%BpWJ;>5}iHG#vp_BiqHi+v>lP$^6q`~lr~I`CJ57<`@JuisjG z%EjPaC}~Uw{pqI)Ix2m&>vD5M)kMA6bIInBZd)ElDoDBJ> z;`c$btnAK1MWPY{s{VZsWwXE0qlG9!9sPydnjHIIjhFgV|29G&fAF9lUe}Psxm?4M zk}(9oy_hD;1j_Iw-_%?*$lqw7T6+|494O@j8I)Vgf_#)*F=!PNvPuUDF%I|I{L44T zivF^XlkuAMZAuctt&##fr4Pl3$6OyR&R&=-D{PR85m40634*_qW#_uVf0(~d=I^9G374$LCoEz-Vk|@LzWflKZ;GY0r^`Ev*gVyI= z5AhY~SOj13dxCd0=v1jM9(19JUkZ96c&h*NL9YW}^|uoARujDz^gPI`{%-`m!bEQY z{aeT@e;x$QJzM$nBxvs4I^9#-=ifK+e-HjgCi)=gf12o{pdUheeZKb;D-jUarT~_a<;RUZwvdl;1Pa9VkQ4 z;9rKa%|s7Gd7Oz(L3x3R9*^>B6Ws&8aedI^-BUO~F9NN{r>9tq`0-a^ir)yjmx25>r#rHm7worVbK$z*yIYjtUr~}Fb{Xb9Y33oH z&5~wpZpNlMRLZ{(It$5ljiec?u}J=)l%Iq7@CQtOdPaSB0@F~(zvq#D8uZ%;rlPlj z4qg(br-P>LIa0na@FXV7Ow_YI`;mpg<*z15FF}1G!o)lx?FRiRc;E%Y!8U1XuZ zw)i{Q;*ZlpkG0S?i@uQ<8}+b1Sr+|wTj;wi^3Pl7@fJGMLg!iZ?X}QbE%a|J^q(#C zhZg#Ei@n1Zdb@?*VxfnqU;r5p7xGR$q(c^at1NV@g^snvyVAm+VzK|fmV9~7BF}lG z9`6u<0VT>m6)c4C61DqtOS#lWU>-X z&QLN+I7JDkDB%<(oT7wNRPRz$tJINFPpWF3nxblyo>Zr*Q3_Mj#UyV{ps*rM;GI#A z4_`M+dHnpw-Ft0$ZM|xvY^N&Qsmiuf*>)=1PG#Gfsu?J$b_u-F07|+6J&I1%EoYh% zMjB8a5N-k@qLs3qrmUwa>uJh*n({o2CL;3Dfh#}calq$sdqqAn75P5J-KZ6%P1c$% zrl|;|sR*R851LwkIRACcx@+mGZ|SOU>8fw(s&DDITF|m7UBw|?8A?}%(v`CrRA|fz z-BdQFi0nO!MZUUn{L#diCytsW;WE4yIhY+%Ud<)P5_fr^&Zn^^EG*CUY72-WbKE*< zlJ?b9Hijo2Oqix2dzH$zsU|b}3^mzFEsHdy(I!hq1Day2)TE|*Ej8;K&9(3{+wGTr z8M3whDps3J>69{L2;y3bE^#&#d#gn8)QM#i-Cnm36Jk8>k#KEPpcV{AjaSs-Qnjue zm0Th+)Zk{MiAvsJi%Or{RUsmbqxzWHAd9K zLaLXj!9{mjNlg_jyKDXK09&zYrrvGY52wiUx!qvV7W&{;9aKq|p-;!0Y6@uo%1-1| zD{sLma^W&Pr#ice8mLj1uP#qc$<&uf>^nGuie5h!;#y!d4skqJ#g4}vCFuuo<|I7< z`>CXP&Wil3lZrx3BXXAyBmm`udEc_tC(>4ijm6nlv{ z&o3w9BbL97r2X|k+TTQk{a*nY|DELHJim*GbN+E628Z_uu{a=f5OEp6dw|&9LfD8n z?++v5BQ=MJ^Zry~KOt@fM&E&W5ZA*FF@#?)5b@z24PR)t7m#-Q5b@FBAmSq|lZcPW zV&c`fDTp+^EXvB(k#sO((G7-sEL4+MI z5qEMMfYJC!d6l>ccOgV1R~%wYJrjY{QwWT;2{DT}2zN5X>x5WEvSE>^w?@osWUE^EogUb}kTy;r<7?Lp#?KZ@~Q&5q72! zlc0|XJIjHzb3YMwo+rZ22_o!VAi~ZB%zUo)Sk0v6|?>Pg95^g?NUTjCny! z5#mFlQ;08!S;(hLp|1hoh!P(o25^TW@k1i)b;B4Fi-5E{6Bs)~hy}!%n6KnFVZ2Gt z65=P|tP1*x8tGl3om?-dkCZkJQ_U#kfl*zY#wgmw1fzB|@Af zy$tgOb18bM5H}H_w*VMhDnyl}Hvy^lKGxra?@8AGOo(SmV^Mrv(q9q%_*TbSLCgWh zPJ@4>eTWb7Rv~^#gq^2=u|@Dt(&vG+6OB0?y;g|9#5TkW$a)trHXC;6DqD%@krEY1sRS2z#FrVej9>H5mUZf%oIy5g3~;#1Dw0 zareb~ta~>SH{%``NPicS4}Uzw3?TyKL;o*{(7%%i{Vxz(v3^VZJ8_i|{0~;dG$Q<4 zLtKe@FL6*`(74$2O58|S@h2S~IL=VSkp G^nU=>G$W$` literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/cyassl-config b/project1/cyassl-3.0.0/cyassl-config new file mode 100644 index 00000000..614f7fbf --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl-config @@ -0,0 +1,117 @@ +#! /bin/sh + +package="cyassl" +version="3.0.0" +libs="-lcyassl" + +prefix="/usr/local" +exec_prefix="${prefix}" +bindir="${exec_prefix}/bin" +sbindir="${exec_prefix}/sbin" +libexecdir="${exec_prefix}/libexec" +datadir="${datarootdir}" +sysconfdir="${prefix}/etc" +sharedstatedir="${prefix}/com" +localstatedir="${prefix}/var" +libdir="${exec_prefix}/lib" +infodir="${datarootdir}/info" +mandir="${datarootdir}/man" +includedir="${prefix}/include" +target="" +host="i686-pc-linux-gnu" +build="i686-pc-linux-gnu" + +if test "$#" -eq 0; then + cat < + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/cyassl.sln b/project1/cyassl-3.0.0/cyassl.sln new file mode 100755 index 00000000..fde689fa --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl.sln @@ -0,0 +1,74 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cyassl", "cyassl.vcproj", "{73973223-5EE8-41CA-8E88-1D60E89A237B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsuite", "testsuite\testsuite.vcproj", "{611E8971-46E0-4D0A-B5A1-632C3B00CB80}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sslSniffer", "sslSniffer\sslSniffer.vcproj", "{34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoserver", "examples\echoserver\echoserver.vcproj", "{07D97C48-E08F-4E34-9F67-3064039FF2CB}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoclient", "examples\echoclient\echoclient.vcproj", "{8362A816-C5DC-4E22-B5C5-9E6806387073}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "examples\client\client.vcproj", "{3ADE9549-582D-4D8E-9826-B172197A7959}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "examples\server\server.vcproj", "{E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}" + ProjectSection(ProjectDependencies) = postProject + {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.ActiveCfg = Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.Build.0 = Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.ActiveCfg = Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.Build.0 = Release|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|Win32.ActiveCfg = Debug|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|Win32.Build.0 = Debug|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.ActiveCfg = Release|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.Build.0 = Release|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|Win32.ActiveCfg = Debug|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|Win32.Build.0 = Debug|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.ActiveCfg = Release|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.Build.0 = Release|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|Win32.Build.0 = Debug|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.ActiveCfg = Release|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.Build.0 = Release|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|Win32.ActiveCfg = Debug|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|Win32.Build.0 = Debug|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.ActiveCfg = Release|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.Build.0 = Release|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|Win32.ActiveCfg = Debug|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|Win32.Build.0 = Debug|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.ActiveCfg = Release|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.Build.0 = Release|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|Win32.Build.0 = Debug|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.ActiveCfg = Release|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/cyassl.vcproj b/project1/cyassl-3.0.0/cyassl.vcproj new file mode 100755 index 00000000..7005e3aa --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl.vcproj @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/cyassl/callbacks.h b/project1/cyassl-3.0.0/cyassl/callbacks.h new file mode 100644 index 00000000..3dacc572 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/callbacks.h @@ -0,0 +1,80 @@ +/* callbacks.h + * + * Copyright (C) 2013 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_CALLBACKS_H +#define CYASSL_CALLBACKS_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { /* CALLBACK CONTSTANTS */ + MAX_PACKETNAME_SZ = 24, + MAX_CIPHERNAME_SZ = 24, + MAX_TIMEOUT_NAME_SZ = 24, + MAX_PACKETS_HANDSHAKE = 14, /* 12 for client auth plus 2 alerts */ + MAX_VALUE_SZ = 128, /* all handshake packets but Cert should + fit here */ +}; + + +typedef struct handShakeInfo_st { + char cipherName[MAX_CIPHERNAME_SZ + 1]; /* negotiated cipher */ + char packetNames[MAX_PACKETS_HANDSHAKE][MAX_PACKETNAME_SZ + 1]; + /* SSL packet names */ + int numberPackets; /* actual # of packets */ + int negotiationError; /* cipher/parameter err */ +} HandShakeInfo; + + +typedef struct timeval Timeval; + + +typedef struct packetInfo_st { + char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */ + Timeval timestamp; /* when it occured */ + unsigned char value[MAX_VALUE_SZ]; /* if fits, it's here */ + unsigned char* bufferValue; /* otherwise here (non 0) */ + int valueSz; /* sz of value or buffer */ +} PacketInfo; + + +typedef struct timeoutInfo_st { + char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; /* timeout Name */ + int flags; /* for future use */ + int numberPackets; /* actual # of packets */ + PacketInfo packets[MAX_PACKETS_HANDSHAKE]; /* list of all packets */ + Timeval timeoutValue; /* timer that caused it */ +} TimeoutInfo; + + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_CALLBACKS_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/certs_test.h b/project1/cyassl-3.0.0/cyassl/certs_test.h new file mode 100644 index 00000000..5d10679a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/certs_test.h @@ -0,0 +1,800 @@ +/* certs_test.h */ + +#ifndef CYASSL_CERTS_TEST_H +#define CYASSL_CERTS_TEST_H + +#ifdef USE_CERT_BUFFERS_1024 + +/* ./certs/1024/client-key.der, 1024-bit */ +const unsigned char client_key_der_1024[] = +{ + 0x30, 0x82, 0x02, 0x5C, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xBC, 0x73, 0x0E, 0xA8, 0x49, 0xF3, 0x74, 0xA2, 0xA9, + 0xEF, 0x18, 0xA5, 0xDA, 0x55, 0x99, 0x21, 0xF9, 0xC8, 0xEC, + 0xB3, 0x6D, 0x48, 0xE5, 0x35, 0x35, 0x75, 0x77, 0x37, 0xEC, + 0xD1, 0x61, 0x90, 0x5F, 0x3E, 0xD9, 0xE4, 0xD5, 0xDF, 0x94, + 0xCA, 0xC1, 0xA9, 0xD7, 0x19, 0xDA, 0x86, 0xC9, 0xE8, 0x4D, + 0xC4, 0x61, 0x36, 0x82, 0xFE, 0xAB, 0xAD, 0x7E, 0x77, 0x25, + 0xBB, 0x8D, 0x11, 0xA5, 0xBC, 0x62, 0x3A, 0xA8, 0x38, 0xCC, + 0x39, 0xA2, 0x04, 0x66, 0xB4, 0xF7, 0xF7, 0xF3, 0xAA, 0xDA, + 0x4D, 0x02, 0x0E, 0xBB, 0x5E, 0x8D, 0x69, 0x48, 0xDC, 0x77, + 0xC9, 0x28, 0x0E, 0x22, 0xE9, 0x6B, 0xA4, 0x26, 0xBA, 0x4C, + 0xE8, 0xC1, 0xFD, 0x4A, 0x6F, 0x2B, 0x1F, 0xEF, 0x8A, 0xAE, + 0xF6, 0x90, 0x62, 0xE5, 0x64, 0x1E, 0xEB, 0x2B, 0x3C, 0x67, + 0xC8, 0xDC, 0x27, 0x00, 0xF6, 0x91, 0x68, 0x65, 0xA9, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x13, 0x97, 0xEA, + 0xE8, 0x38, 0x78, 0x25, 0xA2, 0x5C, 0x04, 0xCE, 0x0D, 0x40, + 0x7C, 0x31, 0xE5, 0xC4, 0x70, 0xCD, 0x9B, 0x82, 0x3B, 0x58, + 0x09, 0x86, 0x3B, 0x66, 0x5F, 0xDC, 0x31, 0x90, 0xF1, 0x4F, + 0xD5, 0xDB, 0x15, 0xDD, 0xDE, 0xD7, 0x3B, 0x95, 0x93, 0x31, + 0x18, 0x31, 0x0E, 0x5E, 0xA3, 0xD6, 0xA2, 0x1A, 0x71, 0x6E, + 0x81, 0x48, 0x1C, 0x4B, 0xCF, 0xDB, 0x8E, 0x7A, 0x86, 0x61, + 0x32, 0xDC, 0xFB, 0x55, 0xC1, 0x16, 0x6D, 0x27, 0x92, 0x24, + 0x45, 0x8B, 0xF1, 0xB8, 0x48, 0xB1, 0x4B, 0x1D, 0xAC, 0xDE, + 0xDA, 0xDD, 0x8E, 0x2F, 0xC2, 0x91, 0xFB, 0xA5, 0xA9, 0x6E, + 0xF8, 0x3A, 0x6A, 0xF1, 0xFD, 0x50, 0x18, 0xEF, 0x9F, 0xE7, + 0xC3, 0xCA, 0x78, 0xEA, 0x56, 0xD3, 0xD3, 0x72, 0x5B, 0x96, + 0xDD, 0x4E, 0x06, 0x4E, 0x3A, 0xC3, 0xD9, 0xBE, 0x72, 0xB6, + 0x65, 0x07, 0x07, 0x4C, 0x01, 0x02, 0x41, 0x00, 0xFA, 0x47, + 0xD4, 0x7A, 0x7C, 0x92, 0x3C, 0x55, 0xEF, 0x81, 0xF0, 0x41, + 0x30, 0x2D, 0xA3, 0xCF, 0x8F, 0x1C, 0xE6, 0x87, 0x27, 0x05, + 0x70, 0x0D, 0xDF, 0x98, 0x35, 0xD6, 0xF1, 0x8B, 0x38, 0x2F, + 0x24, 0xB5, 0xD0, 0x84, 0xB6, 0x79, 0x4F, 0x71, 0x29, 0x94, + 0x5A, 0xF0, 0x64, 0x6A, 0xAC, 0xE7, 0x72, 0xC6, 0xED, 0x4D, + 0x59, 0x98, 0x3E, 0x67, 0x3A, 0xF3, 0x74, 0x2C, 0xF9, 0x61, + 0x17, 0x69, 0x02, 0x41, 0x00, 0xC0, 0xC1, 0x82, 0x0D, 0x0C, + 0xEB, 0xC6, 0x2F, 0xDC, 0x92, 0xF9, 0x9D, 0x82, 0x1A, 0x31, + 0xE9, 0xE9, 0xF7, 0x4B, 0xF2, 0x82, 0x87, 0x1C, 0xEE, 0x16, + 0x6A, 0xD1, 0x1D, 0x18, 0x82, 0x70, 0xF3, 0xC0, 0xB6, 0x2F, + 0xF6, 0xF3, 0xF7, 0x1D, 0xF1, 0x86, 0x23, 0xC8, 0x4E, 0xEB, + 0x8F, 0x56, 0x8E, 0x8F, 0xF5, 0xBF, 0xF1, 0xF7, 0x2B, 0xB5, + 0xCC, 0x3D, 0xC6, 0x57, 0x39, 0x0C, 0x1B, 0x54, 0x41, 0x02, + 0x41, 0x00, 0x9D, 0x7E, 0x05, 0xDE, 0xED, 0xF4, 0xB7, 0xB2, + 0xFB, 0xFC, 0x30, 0x4B, 0x55, 0x1D, 0xE3, 0x2F, 0x01, 0x47, + 0x96, 0x69, 0x05, 0xCD, 0x0E, 0x2E, 0x2C, 0xBD, 0x83, 0x63, + 0xB6, 0xAB, 0x7C, 0xB7, 0x6D, 0xCA, 0x5B, 0x64, 0xA7, 0xCE, + 0xBE, 0x86, 0xDF, 0x3B, 0x53, 0xDE, 0x61, 0xD2, 0x1E, 0xEB, + 0xA5, 0xF6, 0x37, 0xED, 0xAC, 0xAB, 0x78, 0xD9, 0x4C, 0xE7, + 0x55, 0xFB, 0xD7, 0x11, 0x99, 0xC1, 0x02, 0x40, 0x18, 0x98, + 0x18, 0x29, 0xE6, 0x1E, 0x27, 0x39, 0x70, 0x21, 0x68, 0xAC, + 0x0A, 0x2F, 0xA1, 0x72, 0xC1, 0x21, 0x86, 0x95, 0x38, 0xC6, + 0x58, 0x90, 0xA0, 0x57, 0x9C, 0xBA, 0xE3, 0xA7, 0xB1, 0x15, + 0xC8, 0xDE, 0xF6, 0x1B, 0xC2, 0x61, 0x23, 0x76, 0xEF, 0xB0, + 0x9D, 0x1C, 0x44, 0xBE, 0x13, 0x43, 0x39, 0x67, 0x17, 0xC8, + 0x9D, 0xCA, 0xFB, 0xF5, 0x45, 0x64, 0x8B, 0x38, 0x82, 0x2C, + 0xF2, 0x81, 0x02, 0x40, 0x39, 0x89, 0xE5, 0x9C, 0x19, 0x55, + 0x30, 0xBA, 0xB7, 0x48, 0x8C, 0x48, 0x14, 0x0E, 0xF4, 0x9F, + 0x7E, 0x77, 0x97, 0x43, 0xE1, 0xB4, 0x19, 0x35, 0x31, 0x23, + 0x75, 0x9C, 0x3B, 0x44, 0xAD, 0x69, 0x12, 0x56, 0xEE, 0x00, + 0x61, 0x64, 0x16, 0x66, 0xD3, 0x7C, 0x74, 0x2B, 0x15, 0xB4, + 0xA2, 0xFE, 0xBF, 0x08, 0x6B, 0x1A, 0x5D, 0x3F, 0x90, 0x12, + 0xB1, 0x05, 0x86, 0x31, 0x29, 0xDB, 0xD9, 0xE2 +}; +const int sizeof_client_key_der_1024 = sizeof(client_key_der_1024) ; + +/* ./certs/1024/client-cert.der, 1024-bit */ +const unsigned char client_cert_der_1024[] = +{ + 0x30, 0x82, 0x02, 0xEC, 0x30, 0x82, 0x02, 0x55, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x8D, 0x0D, 0xAC, 0xFE, + 0xC6, 0x98, 0x45, 0x26, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, + 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, + 0x81, 0x8E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, + 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, + 0x03, 0x55, 0x04, 0x08, 0x0C, 0x06, 0x4F, 0x72, 0x65, 0x67, + 0x6F, 0x6E, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x0C, 0x08, 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, + 0x64, 0x31, 0x0E, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, + 0x0C, 0x05, 0x79, 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, + 0x12, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x0B, 0x50, 0x72, + 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, + 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0D, + 0x77, 0x77, 0x77, 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, + 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, + 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x33, + 0x30, 0x31, 0x31, 0x38, 0x32, 0x31, 0x34, 0x32, 0x34, 0x39, + 0x5A, 0x17, 0x0D, 0x31, 0x35, 0x31, 0x30, 0x31, 0x35, 0x32, + 0x31, 0x34, 0x32, 0x34, 0x39, 0x5A, 0x30, 0x81, 0x8E, 0x31, + 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, + 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, + 0x08, 0x0C, 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, + 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x08, + 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, + 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x05, 0x79, + 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, + 0x55, 0x04, 0x0B, 0x0C, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, + 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0D, 0x77, 0x77, 0x77, + 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, + 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x30, 0x81, 0x9F, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, + 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, + 0x81, 0x8D, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, + 0xBC, 0x73, 0x0E, 0xA8, 0x49, 0xF3, 0x74, 0xA2, 0xA9, 0xEF, + 0x18, 0xA5, 0xDA, 0x55, 0x99, 0x21, 0xF9, 0xC8, 0xEC, 0xB3, + 0x6D, 0x48, 0xE5, 0x35, 0x35, 0x75, 0x77, 0x37, 0xEC, 0xD1, + 0x61, 0x90, 0x5F, 0x3E, 0xD9, 0xE4, 0xD5, 0xDF, 0x94, 0xCA, + 0xC1, 0xA9, 0xD7, 0x19, 0xDA, 0x86, 0xC9, 0xE8, 0x4D, 0xC4, + 0x61, 0x36, 0x82, 0xFE, 0xAB, 0xAD, 0x7E, 0x77, 0x25, 0xBB, + 0x8D, 0x11, 0xA5, 0xBC, 0x62, 0x3A, 0xA8, 0x38, 0xCC, 0x39, + 0xA2, 0x04, 0x66, 0xB4, 0xF7, 0xF7, 0xF3, 0xAA, 0xDA, 0x4D, + 0x02, 0x0E, 0xBB, 0x5E, 0x8D, 0x69, 0x48, 0xDC, 0x77, 0xC9, + 0x28, 0x0E, 0x22, 0xE9, 0x6B, 0xA4, 0x26, 0xBA, 0x4C, 0xE8, + 0xC1, 0xFD, 0x4A, 0x6F, 0x2B, 0x1F, 0xEF, 0x8A, 0xAE, 0xF6, + 0x90, 0x62, 0xE5, 0x64, 0x1E, 0xEB, 0x2B, 0x3C, 0x67, 0xC8, + 0xDC, 0x27, 0x00, 0xF6, 0x91, 0x68, 0x65, 0xA9, 0x02, 0x03, + 0x01, 0x00, 0x01, 0xA3, 0x50, 0x30, 0x4E, 0x30, 0x1D, 0x06, + 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x81, 0x69, + 0x0F, 0xF8, 0xDF, 0xDD, 0xCF, 0x34, 0x29, 0xD5, 0x67, 0x75, + 0x71, 0x85, 0xC7, 0x75, 0x10, 0x69, 0x59, 0xEC, 0x30, 0x1F, + 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, + 0x14, 0x81, 0x69, 0x0F, 0xF8, 0xDF, 0xDD, 0xCF, 0x34, 0x29, + 0xD5, 0x67, 0x75, 0x71, 0x85, 0xC7, 0x75, 0x10, 0x69, 0x59, + 0xEC, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, + 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0D, 0x06, 0x09, 0x2A, + 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, + 0x03, 0x81, 0x81, 0x00, 0x72, 0x66, 0x0F, 0x6A, 0xA1, 0x85, + 0x95, 0x06, 0xE6, 0x87, 0x1A, 0xED, 0x2B, 0xDA, 0xED, 0x84, + 0x90, 0x89, 0xA6, 0x31, 0x4D, 0x60, 0xF2, 0x7B, 0x63, 0x0C, + 0xDC, 0x9B, 0x44, 0x4C, 0xD6, 0x62, 0x41, 0x24, 0x74, 0x30, + 0x70, 0x4E, 0x07, 0x10, 0x05, 0x12, 0x5E, 0x14, 0xB3, 0xDD, + 0xCF, 0x58, 0x27, 0x93, 0xCF, 0xAA, 0x4F, 0x85, 0x2C, 0x35, + 0x0E, 0xFF, 0x5B, 0xA8, 0x6B, 0xB5, 0x95, 0x32, 0xD5, 0xCC, + 0x73, 0x68, 0x5B, 0x1B, 0xC4, 0xF8, 0x89, 0x5E, 0x3D, 0xF8, + 0x02, 0x39, 0x32, 0x7D, 0x06, 0xA4, 0x32, 0xE9, 0xB3, 0xEF, + 0x62, 0xA0, 0x43, 0x5D, 0x4F, 0xFB, 0xCE, 0x3D, 0x08, 0x33, + 0xAF, 0x3D, 0x7F, 0x12, 0xCB, 0x8A, 0x5A, 0xC2, 0x63, 0xDB, + 0x3E, 0xDD, 0xEA, 0x5B, 0x67, 0x10, 0x49, 0x9F, 0x5B, 0x96, + 0x1B, 0x4E, 0x5D, 0xBC, 0x4E, 0x9A, 0x7C, 0x1F, 0xAB, 0x56, + 0x47, 0x4A +}; +const int sizeof_client_cert_der_1024 = sizeof(client_cert_der_1024) ; + +/* ./certs/1024/dh1024.der, 1024-bit */ +const unsigned char dh_key_der_1024[] = +{ + 0x30, 0x81, 0x87, 0x02, 0x81, 0x81, 0x00, 0xA4, 0xD2, 0xB8, + 0x6E, 0x78, 0xF5, 0xD9, 0xED, 0x2D, 0x7C, 0xDD, 0xB6, 0x16, + 0x86, 0x5A, 0x4B, 0x05, 0x76, 0x90, 0xDD, 0x66, 0x61, 0xB9, + 0x6D, 0x52, 0xA7, 0x1C, 0xAF, 0x62, 0xC6, 0x69, 0x47, 0x7B, + 0x39, 0xF2, 0xFB, 0x94, 0xEC, 0xBC, 0x79, 0xFF, 0x24, 0x5E, + 0xEF, 0x79, 0xBB, 0x59, 0xB2, 0xFC, 0xCA, 0x07, 0xD6, 0xF4, + 0xE9, 0x34, 0xF7, 0xE8, 0x38, 0xE7, 0xD7, 0x33, 0x44, 0x1D, + 0xA3, 0x64, 0x76, 0x1A, 0x84, 0x97, 0x54, 0x74, 0x40, 0x84, + 0x1F, 0x15, 0xFE, 0x7C, 0x25, 0x2A, 0x2B, 0x25, 0xFD, 0x9E, + 0xC1, 0x89, 0x33, 0x8C, 0x39, 0x25, 0x2B, 0x40, 0xE6, 0xCD, + 0xF8, 0xA8, 0xA1, 0x8A, 0x53, 0xC6, 0x47, 0xB2, 0xA0, 0xD7, + 0x8F, 0xEB, 0x2E, 0x60, 0x0A, 0x0D, 0x4B, 0xF8, 0xB4, 0x94, + 0x8C, 0x63, 0x0A, 0xAD, 0xC7, 0x10, 0xEA, 0xC7, 0xA1, 0xB9, + 0x9D, 0xF2, 0xA8, 0x37, 0x73, 0x02, 0x01, 0x02 +}; +const int sizeof_dh_key_der_1024 = sizeof(dh_key_der_1024) ; + +/* ./certs/1024/dsa1024.der, 1024-bit */ +const unsigned char dsa_key_der_1024[] = +{ + 0x30, 0x82, 0x01, 0xBC, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xF7, 0x4B, 0xF9, 0xBB, 0x15, 0x98, 0xEB, 0xDD, 0xDE, + 0x1E, 0x4E, 0x71, 0x88, 0x85, 0xF2, 0xB7, 0xBA, 0xE2, 0x4A, + 0xDA, 0x76, 0x40, 0xCD, 0x69, 0x48, 0x9E, 0x83, 0x7C, 0x11, + 0xF7, 0x65, 0x31, 0x78, 0xF5, 0x25, 0x2D, 0xF7, 0xB7, 0xF8, + 0x52, 0x3F, 0xBE, 0xD8, 0xB6, 0xC5, 0xFE, 0x18, 0x15, 0x5B, + 0xB9, 0xD5, 0x92, 0x86, 0xBC, 0xB2, 0x17, 0x7C, 0xD8, 0xB0, + 0xBE, 0xA0, 0x7C, 0xF2, 0xD5, 0x73, 0x7A, 0x58, 0x8F, 0x8D, + 0xE5, 0x4A, 0x00, 0x99, 0x83, 0x4A, 0xC0, 0x9E, 0x16, 0x09, + 0xA1, 0x10, 0x34, 0xD5, 0x19, 0xBB, 0x63, 0xE3, 0xDD, 0x83, + 0x74, 0x7F, 0x10, 0xCA, 0x73, 0x75, 0xEE, 0x31, 0x4A, 0xDD, + 0x9F, 0xE0, 0x02, 0x6A, 0x9D, 0xEE, 0xB2, 0x4B, 0xA7, 0x6B, + 0x2A, 0x6C, 0xC7, 0x86, 0x77, 0xE8, 0x04, 0x15, 0xDC, 0x92, + 0xB4, 0x7A, 0x29, 0x1F, 0x4E, 0x83, 0x63, 0x85, 0x55, 0x02, + 0x15, 0x00, 0xD2, 0x05, 0xE4, 0x73, 0xFB, 0xC1, 0x99, 0xC5, + 0xDC, 0x68, 0xA4, 0x8D, 0x92, 0x27, 0x3D, 0xE2, 0x52, 0x5F, + 0x89, 0x8B, 0x02, 0x81, 0x81, 0x00, 0xAA, 0x21, 0x02, 0x09, + 0x43, 0x6E, 0xFB, 0xA2, 0x54, 0x14, 0x85, 0x0A, 0xF4, 0x28, + 0x7C, 0xCB, 0xCC, 0xDB, 0xF5, 0x1E, 0xA2, 0x18, 0xA9, 0x21, + 0xDE, 0x88, 0x88, 0x33, 0x8C, 0x2E, 0xEB, 0x8D, 0xA3, 0xF0, + 0x1D, 0xC8, 0x8F, 0xF6, 0x7E, 0xF8, 0xCF, 0x12, 0xF5, 0xB4, + 0xA1, 0x11, 0x6F, 0x0C, 0xD4, 0xF0, 0x06, 0xAD, 0xC4, 0xFC, + 0x14, 0x45, 0xC7, 0x94, 0x15, 0xBC, 0x19, 0x4B, 0xAE, 0xEF, + 0x93, 0x6A, 0x4F, 0xCC, 0x14, 0xD8, 0x47, 0x8B, 0x39, 0x66, + 0x87, 0x02, 0xD4, 0x28, 0x0A, 0xB8, 0xEE, 0x09, 0x37, 0xF4, + 0x00, 0xA0, 0x04, 0xA7, 0x79, 0xA7, 0xD2, 0x3C, 0xF7, 0x34, + 0x43, 0x56, 0x8E, 0xD0, 0x7C, 0xC2, 0xD8, 0x4D, 0x0F, 0x89, + 0xED, 0x14, 0xC1, 0x2C, 0x9C, 0x4C, 0x19, 0x9B, 0x9E, 0xDC, + 0x53, 0x09, 0x9F, 0xDF, 0x2D, 0xF0, 0x0C, 0x27, 0x54, 0x3A, + 0x77, 0x14, 0x2D, 0xDE, 0x02, 0x81, 0x81, 0x00, 0xE8, 0x1F, + 0x7C, 0xB7, 0xC0, 0x54, 0x51, 0xA7, 0x28, 0x2D, 0x58, 0x7C, + 0xDE, 0xD4, 0x5C, 0xDD, 0xD5, 0x76, 0x84, 0x3C, 0x36, 0x20, + 0xC0, 0xC3, 0x25, 0xD7, 0x3A, 0x38, 0xE1, 0x54, 0xC8, 0xFD, + 0x40, 0x68, 0x1A, 0x21, 0x54, 0x26, 0x39, 0x14, 0xBF, 0xF6, + 0xA3, 0x9C, 0x5E, 0xD9, 0x2B, 0xF7, 0xC9, 0x25, 0xBA, 0x00, + 0x09, 0xCB, 0x7F, 0x0C, 0x4A, 0x24, 0xFD, 0x15, 0x16, 0x15, + 0x48, 0xCD, 0x0B, 0x52, 0x44, 0x40, 0x7B, 0x90, 0x63, 0x2B, + 0x90, 0x22, 0xC5, 0x18, 0x05, 0x80, 0x53, 0xAF, 0x83, 0x1F, + 0x54, 0xE2, 0xB0, 0xA2, 0x0B, 0x5A, 0x92, 0x24, 0xE1, 0x62, + 0x28, 0x3F, 0xB7, 0xCA, 0xB9, 0x89, 0xD6, 0xA0, 0xB7, 0xAD, + 0xAE, 0x05, 0xE1, 0xC1, 0x59, 0x40, 0xED, 0x4A, 0x1B, 0x68, + 0xA7, 0x7B, 0xFB, 0xC3, 0x20, 0x81, 0xEF, 0x4B, 0xF3, 0x69, + 0x91, 0xB0, 0xCE, 0x3A, 0xB0, 0x38, 0x02, 0x14, 0x25, 0x38, + 0x3B, 0xA1, 0x19, 0x75, 0xDF, 0x9B, 0xF5, 0x72, 0x53, 0x4F, + 0x39, 0xE1, 0x1C, 0xEC, 0x13, 0x84, 0x82, 0x18 +}; +const int sizeof_dsa_key_der_1024 = sizeof(dsa_key_der_1024) ; + +/* ./certs/1024/rsa1024.der, 1024-bit */ +const unsigned char rsa_key_der_1024[] = +{ + 0x30, 0x82, 0x02, 0x5D, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xBE, 0x70, 0x70, 0xB8, 0x04, 0x18, 0xE5, 0x28, 0xFE, + 0x66, 0xD8, 0x90, 0x88, 0xE0, 0xF1, 0xB7, 0xC3, 0xD0, 0xD2, + 0x3E, 0xE6, 0x4B, 0x94, 0x74, 0xB0, 0xFF, 0xB0, 0xF7, 0x63, + 0xA5, 0xAB, 0x7E, 0xAF, 0xB6, 0x2B, 0xB7, 0x38, 0x16, 0x1A, + 0x50, 0xBF, 0xF1, 0xCA, 0x87, 0x3A, 0xD5, 0xB0, 0xDA, 0xF8, + 0x43, 0x7A, 0x15, 0xB9, 0x7E, 0xEA, 0x2A, 0x80, 0xD2, 0x51, + 0xB0, 0x35, 0xAF, 0x07, 0xF3, 0xF2, 0x5D, 0x24, 0x3A, 0x4B, + 0x87, 0x56, 0x48, 0x1B, 0x3C, 0x24, 0x9A, 0xDA, 0x70, 0x80, + 0xBD, 0x3C, 0x8B, 0x03, 0x4A, 0x0C, 0x83, 0x71, 0xDE, 0xE3, + 0x03, 0x70, 0xA2, 0xB7, 0x60, 0x09, 0x1B, 0x5E, 0xC7, 0x3D, + 0xA0, 0x64, 0x60, 0xE3, 0xA9, 0x06, 0x8D, 0xD3, 0xFF, 0x42, + 0xBB, 0x0A, 0x94, 0x27, 0x2D, 0x57, 0x42, 0x0D, 0xB0, 0x2D, + 0xE0, 0xBA, 0x18, 0x25, 0x60, 0x92, 0x11, 0x92, 0xF3, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x0E, 0xEE, 0x1D, + 0xC8, 0x2F, 0x7A, 0x0C, 0x2D, 0x44, 0x94, 0xA7, 0x91, 0xDD, + 0x49, 0x55, 0x6A, 0x04, 0xCE, 0x10, 0x4D, 0xA2, 0x1C, 0x76, + 0xCD, 0x17, 0x3B, 0x54, 0x92, 0x70, 0x9B, 0x82, 0x70, 0x72, + 0x32, 0x24, 0x07, 0x3F, 0x3C, 0x6C, 0x5F, 0xBC, 0x4C, 0xA6, + 0x86, 0x27, 0x94, 0xAD, 0x42, 0xDD, 0x87, 0xDC, 0xC0, 0x6B, + 0x44, 0x89, 0xF3, 0x3F, 0x1A, 0x3E, 0x11, 0x44, 0x84, 0x2E, + 0x69, 0x4C, 0xBB, 0x4A, 0x71, 0x1A, 0xBB, 0x9A, 0x52, 0x3C, + 0x6B, 0xDE, 0xBC, 0xB2, 0x7C, 0x51, 0xEF, 0x4F, 0x8F, 0x3A, + 0xDC, 0x50, 0x04, 0x4E, 0xB6, 0x31, 0x66, 0xA8, 0x8E, 0x06, + 0x3B, 0x51, 0xA9, 0xC1, 0x8A, 0xCB, 0xC4, 0x81, 0xCA, 0x2D, + 0x69, 0xEC, 0x88, 0xFC, 0x33, 0x88, 0xD1, 0xD4, 0x29, 0x47, + 0x87, 0x37, 0xF9, 0x6A, 0x22, 0x69, 0xB9, 0xC9, 0xFE, 0xEB, + 0x8C, 0xC5, 0x21, 0x41, 0x71, 0x02, 0x41, 0x00, 0xFD, 0x17, + 0x98, 0x42, 0x54, 0x1C, 0x23, 0xF8, 0xD7, 0x5D, 0xEF, 0x49, + 0x4F, 0xAF, 0xD9, 0x35, 0x6F, 0x08, 0xC6, 0xC7, 0x40, 0x5C, + 0x7E, 0x58, 0x86, 0xC2, 0xB2, 0x16, 0x39, 0x24, 0xC5, 0x06, + 0xB0, 0x3D, 0xAF, 0x02, 0xD2, 0x87, 0x77, 0xD2, 0x76, 0xBA, + 0xE3, 0x59, 0x60, 0x42, 0xF1, 0x16, 0xEF, 0x33, 0x0B, 0xF2, + 0x0B, 0xBA, 0x99, 0xCC, 0xB6, 0x4C, 0x46, 0x3F, 0x33, 0xE4, + 0xD4, 0x67, 0x02, 0x41, 0x00, 0xC0, 0xA0, 0x91, 0x6D, 0xFE, + 0x28, 0xE0, 0x81, 0x5A, 0x15, 0xA7, 0xC9, 0xA8, 0x98, 0xC6, + 0x0A, 0xAB, 0x00, 0xC5, 0x40, 0xC9, 0x21, 0xBB, 0xB2, 0x33, + 0x5A, 0xA7, 0xCB, 0x6E, 0xB8, 0x08, 0x56, 0x4A, 0x76, 0x28, + 0xE8, 0x6D, 0xBD, 0xF5, 0x26, 0x7B, 0xBF, 0xC5, 0x46, 0x45, + 0x0D, 0xEC, 0x7D, 0xEE, 0x82, 0xD6, 0xCA, 0x5F, 0x3D, 0x6E, + 0xCC, 0x94, 0x73, 0xCD, 0xCE, 0x86, 0x6E, 0x95, 0x95, 0x02, + 0x40, 0x38, 0xFD, 0x28, 0x1E, 0xBF, 0x5B, 0xBA, 0xC9, 0xDC, + 0x8C, 0xDD, 0x45, 0xAF, 0xB8, 0xD3, 0xFB, 0x11, 0x2E, 0x73, + 0xBC, 0x08, 0x05, 0x0B, 0xBA, 0x19, 0x56, 0x1B, 0xCD, 0x9F, + 0x3E, 0x65, 0x53, 0x15, 0x3A, 0x3E, 0x7F, 0x2F, 0x32, 0xAB, + 0xCB, 0x6B, 0x4A, 0xB7, 0xC8, 0xB7, 0x41, 0x3B, 0x92, 0x43, + 0x78, 0x46, 0x17, 0x51, 0x86, 0xC9, 0xFC, 0xEB, 0x8B, 0x8F, + 0x41, 0xCA, 0x08, 0x9B, 0xBF, 0x02, 0x41, 0x00, 0xAD, 0x9B, + 0x89, 0xB6, 0xF2, 0x8C, 0x70, 0xDA, 0xE4, 0x10, 0x04, 0x6B, + 0x11, 0x92, 0xAF, 0x5A, 0xCA, 0x08, 0x25, 0xBF, 0x60, 0x07, + 0x11, 0x1D, 0x68, 0x7F, 0x5A, 0x1F, 0x55, 0x28, 0x74, 0x0B, + 0x21, 0x8D, 0x21, 0x0D, 0x6A, 0x6A, 0xFB, 0xD9, 0xB5, 0x4A, + 0x7F, 0x47, 0xF7, 0xD0, 0xB6, 0xC6, 0x41, 0x02, 0x97, 0x07, + 0x49, 0x93, 0x1A, 0x9B, 0x33, 0x68, 0xB3, 0xA2, 0x61, 0x32, + 0xA5, 0x89, 0x02, 0x41, 0x00, 0x8F, 0xEF, 0xAD, 0xB5, 0xB0, + 0xB0, 0x7E, 0x86, 0x03, 0x43, 0x93, 0x6E, 0xDD, 0x3C, 0x2D, + 0x9B, 0x6A, 0x55, 0xFF, 0x6F, 0x3E, 0x70, 0x2A, 0xD4, 0xBF, + 0x1F, 0x8C, 0x93, 0x60, 0x9E, 0x6D, 0x2F, 0x18, 0x6C, 0x11, + 0x36, 0x98, 0x3F, 0x10, 0x78, 0xE8, 0x3E, 0x8F, 0xFE, 0x55, + 0xB9, 0x9E, 0xD5, 0x5B, 0x2E, 0x87, 0x1C, 0x58, 0xD0, 0x37, + 0x89, 0x96, 0xEC, 0x48, 0x54, 0xF5, 0x9F, 0x0F, 0xB3 +}; +const int sizeof_rsa_key_der_1024 = sizeof(rsa_key_der_1024) ; + +#elif defined(USE_CERT_BUFFERS_2048) + +/* ./certs/client-key.der, 2048-bit */ +const unsigned char client_key_der_2048[] = +{ + 0x30, 0x82, 0x04, 0xA4, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xC3, 0x03, 0xD1, 0x2B, 0xFE, 0x39, 0xA4, 0x32, + 0x45, 0x3B, 0x53, 0xC8, 0x84, 0x2B, 0x2A, 0x7C, 0x74, 0x9A, + 0xBD, 0xAA, 0x2A, 0x52, 0x07, 0x47, 0xD6, 0xA6, 0x36, 0xB2, + 0x07, 0x32, 0x8E, 0xD0, 0xBA, 0x69, 0x7B, 0xC6, 0xC3, 0x44, + 0x9E, 0xD4, 0x81, 0x48, 0xFD, 0x2D, 0x68, 0xA2, 0x8B, 0x67, + 0xBB, 0xA1, 0x75, 0xC8, 0x36, 0x2C, 0x4A, 0xD2, 0x1B, 0xF7, + 0x8B, 0xBA, 0xCF, 0x0D, 0xF9, 0xEF, 0xEC, 0xF1, 0x81, 0x1E, + 0x7B, 0x9B, 0x03, 0x47, 0x9A, 0xBF, 0x65, 0xCC, 0x7F, 0x65, + 0x24, 0x69, 0xA6, 0xE8, 0x14, 0x89, 0x5B, 0xE4, 0x34, 0xF7, + 0xC5, 0xB0, 0x14, 0x93, 0xF5, 0x67, 0x7B, 0x3A, 0x7A, 0x78, + 0xE1, 0x01, 0x56, 0x56, 0x91, 0xA6, 0x13, 0x42, 0x8D, 0xD2, + 0x3C, 0x40, 0x9C, 0x4C, 0xEF, 0xD1, 0x86, 0xDF, 0x37, 0x51, + 0x1B, 0x0C, 0xA1, 0x3B, 0xF5, 0xF1, 0xA3, 0x4A, 0x35, 0xE4, + 0xE1, 0xCE, 0x96, 0xDF, 0x1B, 0x7E, 0xBF, 0x4E, 0x97, 0xD0, + 0x10, 0xE8, 0xA8, 0x08, 0x30, 0x81, 0xAF, 0x20, 0x0B, 0x43, + 0x14, 0xC5, 0x74, 0x67, 0xB4, 0x32, 0x82, 0x6F, 0x8D, 0x86, + 0xC2, 0x88, 0x40, 0x99, 0x36, 0x83, 0xBA, 0x1E, 0x40, 0x72, + 0x22, 0x17, 0xD7, 0x52, 0x65, 0x24, 0x73, 0xB0, 0xCE, 0xEF, + 0x19, 0xCD, 0xAE, 0xFF, 0x78, 0x6C, 0x7B, 0xC0, 0x12, 0x03, + 0xD4, 0x4E, 0x72, 0x0D, 0x50, 0x6D, 0x3B, 0xA3, 0x3B, 0xA3, + 0x99, 0x5E, 0x9D, 0xC8, 0xD9, 0x0C, 0x85, 0xB3, 0xD9, 0x8A, + 0xD9, 0x54, 0x26, 0xDB, 0x6D, 0xFA, 0xAC, 0xBB, 0xFF, 0x25, + 0x4C, 0xC4, 0xD1, 0x79, 0xF4, 0x71, 0xD3, 0x86, 0x40, 0x18, + 0x13, 0xB0, 0x63, 0xB5, 0x72, 0x4E, 0x30, 0xC4, 0x97, 0x84, + 0x86, 0x2D, 0x56, 0x2F, 0xD7, 0x15, 0xF7, 0x7F, 0xC0, 0xAE, + 0xF5, 0xFC, 0x5B, 0xE5, 0xFB, 0xA1, 0xBA, 0xD3, 0x02, 0x03, + 0x01, 0x00, 0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xA2, 0xE6, + 0xD8, 0x5F, 0x10, 0x71, 0x64, 0x08, 0x9E, 0x2E, 0x6D, 0xD1, + 0x6D, 0x1E, 0x85, 0xD2, 0x0A, 0xB1, 0x8C, 0x47, 0xCE, 0x2C, + 0x51, 0x6A, 0xA0, 0x12, 0x9E, 0x53, 0xDE, 0x91, 0x4C, 0x1D, + 0x6D, 0xEA, 0x59, 0x7B, 0xF2, 0x77, 0xAA, 0xD9, 0xC6, 0xD9, + 0x8A, 0xAB, 0xD8, 0xE1, 0x16, 0xE4, 0x63, 0x26, 0xFF, 0xB5, + 0x6C, 0x13, 0x59, 0xB8, 0xE3, 0xA5, 0xC8, 0x72, 0x17, 0x2E, + 0x0C, 0x9F, 0x6F, 0xE5, 0x59, 0x3F, 0x76, 0x6F, 0x49, 0xB1, + 0x11, 0xC2, 0x5A, 0x2E, 0x16, 0x29, 0x0D, 0xDE, 0xB7, 0x8E, + 0xDC, 0x40, 0xD5, 0xA2, 0xEE, 0xE0, 0x1E, 0xA1, 0xF4, 0xBE, + 0x97, 0xDB, 0x86, 0x63, 0x96, 0x14, 0xCD, 0x98, 0x09, 0x60, + 0x2D, 0x30, 0x76, 0x9C, 0x3C, 0xCD, 0xE6, 0x88, 0xEE, 0x47, + 0x92, 0x79, 0x0B, 0x5A, 0x00, 0xE2, 0x5E, 0x5F, 0x11, 0x7C, + 0x7D, 0xF9, 0x08, 0xB7, 0x20, 0x06, 0x89, 0x2A, 0x5D, 0xFD, + 0x00, 0xAB, 0x22, 0xE1, 0xF0, 0xB3, 0xBC, 0x24, 0xA9, 0x5E, + 0x26, 0x0E, 0x1F, 0x00, 0x2D, 0xFE, 0x21, 0x9A, 0x53, 0x5B, + 0x6D, 0xD3, 0x2B, 0xAB, 0x94, 0x82, 0x68, 0x43, 0x36, 0xD8, + 0xF6, 0x2F, 0xC6, 0x22, 0xFC, 0xB5, 0x41, 0x5D, 0x0D, 0x33, + 0x60, 0xEA, 0xA4, 0x7D, 0x7E, 0xE8, 0x4B, 0x55, 0x91, 0x56, + 0xD3, 0x5C, 0x57, 0x8F, 0x1F, 0x94, 0x17, 0x2F, 0xAA, 0xDE, + 0xE9, 0x9E, 0xA8, 0xF4, 0xCF, 0x8A, 0x4C, 0x8E, 0xA0, 0xE4, + 0x56, 0x73, 0xB2, 0xCF, 0x4F, 0x86, 0xC5, 0x69, 0x3C, 0xF3, + 0x24, 0x20, 0x8B, 0x5C, 0x96, 0x0C, 0xFA, 0x6B, 0x12, 0x3B, + 0x9A, 0x67, 0xC1, 0xDF, 0xC6, 0x96, 0xB2, 0xA5, 0xD5, 0x92, + 0x0D, 0x9B, 0x09, 0x42, 0x68, 0x24, 0x10, 0x45, 0xD4, 0x50, + 0xE4, 0x17, 0x39, 0x48, 0xD0, 0x35, 0x8B, 0x94, 0x6D, 0x11, + 0xDE, 0x8F, 0xCA, 0x59, 0x02, 0x81, 0x81, 0x00, 0xEA, 0x24, + 0xA7, 0xF9, 0x69, 0x33, 0xE9, 0x71, 0xDC, 0x52, 0x7D, 0x88, + 0x21, 0x28, 0x2F, 0x49, 0xDE, 0xBA, 0x72, 0x16, 0xE9, 0xCC, + 0x47, 0x7A, 0x88, 0x0D, 0x94, 0x57, 0x84, 0x58, 0x16, 0x3A, + 0x81, 0xB0, 0x3F, 0xA2, 0xCF, 0xA6, 0x6C, 0x1E, 0xB0, 0x06, + 0x29, 0x00, 0x8F, 0xE7, 0x77, 0x76, 0xAC, 0xDB, 0xCA, 0xC7, + 0xD9, 0x5E, 0x9B, 0x3F, 0x26, 0x90, 0x52, 0xAE, 0xFC, 0x38, + 0x90, 0x00, 0x14, 0xBB, 0xB4, 0x0F, 0x58, 0x94, 0xE7, 0x2F, + 0x6A, 0x7E, 0x1C, 0x4F, 0x41, 0x21, 0xD4, 0x31, 0x59, 0x1F, + 0x4E, 0x8A, 0x1A, 0x8D, 0xA7, 0x57, 0x6C, 0x22, 0xD8, 0xE5, + 0xF4, 0x7E, 0x32, 0xA6, 0x10, 0xCB, 0x64, 0xA5, 0x55, 0x03, + 0x87, 0xA6, 0x27, 0x05, 0x8C, 0xC3, 0xD7, 0xB6, 0x27, 0xB2, + 0x4D, 0xBA, 0x30, 0xDA, 0x47, 0x8F, 0x54, 0xD3, 0x3D, 0x8B, + 0x84, 0x8D, 0x94, 0x98, 0x58, 0xA5, 0x02, 0x81, 0x81, 0x00, + 0xD5, 0x38, 0x1B, 0xC3, 0x8F, 0xC5, 0x93, 0x0C, 0x47, 0x0B, + 0x6F, 0x35, 0x92, 0xC5, 0xB0, 0x8D, 0x46, 0xC8, 0x92, 0x18, + 0x8F, 0xF5, 0x80, 0x0A, 0xF7, 0xEF, 0xA1, 0xFE, 0x80, 0xB9, + 0xB5, 0x2A, 0xBA, 0xCA, 0x18, 0xB0, 0x5D, 0xA5, 0x07, 0xD0, + 0x93, 0x8D, 0xD8, 0x9C, 0x04, 0x1C, 0xD4, 0x62, 0x8E, 0xA6, + 0x26, 0x81, 0x01, 0xFF, 0xCE, 0x8A, 0x2A, 0x63, 0x34, 0x35, + 0x40, 0xAA, 0x6D, 0x80, 0xDE, 0x89, 0x23, 0x6A, 0x57, 0x4D, + 0x9E, 0x6E, 0xAD, 0x93, 0x4E, 0x56, 0x90, 0x0B, 0x6D, 0x9D, + 0x73, 0x8B, 0x0C, 0xAE, 0x27, 0x3D, 0xDE, 0x4E, 0xF0, 0xAA, + 0xC5, 0x6C, 0x78, 0x67, 0x6C, 0x94, 0x52, 0x9C, 0x37, 0x67, + 0x6C, 0x2D, 0xEF, 0xBB, 0xAF, 0xDF, 0xA6, 0x90, 0x3C, 0xC4, + 0x47, 0xCF, 0x8D, 0x96, 0x9E, 0x98, 0xA9, 0xB4, 0x9F, 0xC5, + 0xA6, 0x50, 0xDC, 0xB3, 0xF0, 0xFB, 0x74, 0x17, 0x02, 0x81, + 0x80, 0x5E, 0x83, 0x09, 0x62, 0xBD, 0xBA, 0x7C, 0xA2, 0xBF, + 0x42, 0x74, 0xF5, 0x7C, 0x1C, 0xD2, 0x69, 0xC9, 0x04, 0x0D, + 0x85, 0x7E, 0x3E, 0x3D, 0x24, 0x12, 0xC3, 0x18, 0x7B, 0xF3, + 0x29, 0xF3, 0x5F, 0x0E, 0x76, 0x6C, 0x59, 0x75, 0xE4, 0x41, + 0x84, 0x69, 0x9D, 0x32, 0xF3, 0xCD, 0x22, 0xAB, 0xB0, 0x35, + 0xBA, 0x4A, 0xB2, 0x3C, 0xE5, 0xD9, 0x58, 0xB6, 0x62, 0x4F, + 0x5D, 0xDE, 0xE5, 0x9E, 0x0A, 0xCA, 0x53, 0xB2, 0x2C, 0xF7, + 0x9E, 0xB3, 0x6B, 0x0A, 0x5B, 0x79, 0x65, 0xEC, 0x6E, 0x91, + 0x4E, 0x92, 0x20, 0xF6, 0xFC, 0xFC, 0x16, 0xED, 0xD3, 0x76, + 0x0C, 0xE2, 0xEC, 0x7F, 0xB2, 0x69, 0x13, 0x6B, 0x78, 0x0E, + 0x5A, 0x46, 0x64, 0xB4, 0x5E, 0xB7, 0x25, 0xA0, 0x5A, 0x75, + 0x3A, 0x4B, 0xEF, 0xC7, 0x3C, 0x3E, 0xF7, 0xFD, 0x26, 0xB8, + 0x20, 0xC4, 0x99, 0x0A, 0x9A, 0x73, 0xBE, 0xC3, 0x19, 0x02, + 0x81, 0x81, 0x00, 0xBA, 0x44, 0x93, 0x14, 0xAC, 0x34, 0x19, + 0x3B, 0x5F, 0x91, 0x60, 0xAC, 0xF7, 0xB4, 0xD6, 0x81, 0x05, + 0x36, 0x51, 0x53, 0x3D, 0xE8, 0x65, 0xDC, 0xAF, 0x2E, 0xDC, + 0x61, 0x3E, 0xC9, 0x7D, 0xB8, 0x7F, 0x87, 0xF0, 0x3B, 0x9B, + 0x03, 0x82, 0x29, 0x37, 0xCE, 0x72, 0x4E, 0x11, 0xD5, 0xB1, + 0xC1, 0x0C, 0x07, 0xA0, 0x99, 0x91, 0x4A, 0x8D, 0x7F, 0xEC, + 0x79, 0xCF, 0xF1, 0x39, 0xB5, 0xE9, 0x85, 0xEC, 0x62, 0xF7, + 0xDA, 0x7D, 0xBC, 0x64, 0x4D, 0x22, 0x3C, 0x0E, 0xF2, 0xD6, + 0x51, 0xF5, 0x87, 0xD8, 0x99, 0xC0, 0x11, 0x20, 0x5D, 0x0F, + 0x29, 0xFD, 0x5B, 0xE2, 0xAE, 0xD9, 0x1C, 0xD9, 0x21, 0x56, + 0x6D, 0xFC, 0x84, 0xD0, 0x5F, 0xED, 0x10, 0x15, 0x1C, 0x18, + 0x21, 0xE7, 0xC4, 0x3D, 0x4B, 0xD7, 0xD0, 0x9E, 0x6A, 0x95, + 0xCF, 0x22, 0xC9, 0x03, 0x7B, 0x9E, 0xE3, 0x60, 0x01, 0xFC, + 0x2F, 0x02, 0x81, 0x80, 0x11, 0xD0, 0x4B, 0xCF, 0x1B, 0x67, + 0xB9, 0x9F, 0x10, 0x75, 0x47, 0x86, 0x65, 0xAE, 0x31, 0xC2, + 0xC6, 0x30, 0xAC, 0x59, 0x06, 0x50, 0xD9, 0x0F, 0xB5, 0x70, + 0x06, 0xF7, 0xF0, 0xD3, 0xC8, 0x62, 0x7C, 0xA8, 0xDA, 0x6E, + 0xF6, 0x21, 0x3F, 0xD3, 0x7F, 0x5F, 0xEA, 0x8A, 0xAB, 0x3F, + 0xD9, 0x2A, 0x5E, 0xF3, 0x51, 0xD2, 0xC2, 0x30, 0x37, 0xE3, + 0x2D, 0xA3, 0x75, 0x0D, 0x1E, 0x4D, 0x21, 0x34, 0xD5, 0x57, + 0x70, 0x5C, 0x89, 0xBF, 0x72, 0xEC, 0x4A, 0x6E, 0x68, 0xD5, + 0xCD, 0x18, 0x74, 0x33, 0x4E, 0x8C, 0x3A, 0x45, 0x8F, 0xE6, + 0x96, 0x40, 0xEB, 0x63, 0xF9, 0x19, 0x86, 0x3A, 0x51, 0xDD, + 0x89, 0x4B, 0xB0, 0xF3, 0xF9, 0x9F, 0x5D, 0x28, 0x95, 0x38, + 0xBE, 0x35, 0xAB, 0xCA, 0x5C, 0xE7, 0x93, 0x53, 0x34, 0xA1, + 0x45, 0x5D, 0x13, 0x39, 0x65, 0x42, 0x46, 0xA1, 0x9F, 0xCD, + 0xF5, 0xBF +}; +const int sizeof_client_key_der_2048 = sizeof(client_key_der_2048) ; + +/* ./certs/client-cert.der, 2048-bit */ +const unsigned char client_cert_der_2048[] = +{ + 0x30, 0x82, 0x04, 0x98, 0x30, 0x82, 0x03, 0x80, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x87, 0x4A, 0x75, 0xBE, + 0x91, 0x66, 0xD8, 0x3D, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, + 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, + 0x81, 0x8E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, + 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, + 0x03, 0x55, 0x04, 0x08, 0x13, 0x06, 0x4F, 0x72, 0x65, 0x67, + 0x6F, 0x6E, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x13, 0x08, 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, + 0x64, 0x31, 0x0E, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, + 0x13, 0x05, 0x79, 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, + 0x12, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0B, 0x50, 0x72, + 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, + 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0D, + 0x77, 0x77, 0x77, 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, + 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, + 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x31, + 0x31, 0x30, 0x32, 0x34, 0x31, 0x38, 0x32, 0x31, 0x35, 0x35, + 0x5A, 0x17, 0x0D, 0x31, 0x34, 0x30, 0x37, 0x32, 0x30, 0x31, + 0x38, 0x32, 0x31, 0x35, 0x35, 0x5A, 0x30, 0x81, 0x8E, 0x31, + 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, + 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, + 0x08, 0x13, 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, + 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, + 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, + 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x05, 0x79, + 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, + 0x55, 0x04, 0x0B, 0x13, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, + 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0D, 0x77, 0x77, 0x77, + 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, + 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, + 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, + 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, + 0x82, 0x01, 0x01, 0x00, 0xC3, 0x03, 0xD1, 0x2B, 0xFE, 0x39, + 0xA4, 0x32, 0x45, 0x3B, 0x53, 0xC8, 0x84, 0x2B, 0x2A, 0x7C, + 0x74, 0x9A, 0xBD, 0xAA, 0x2A, 0x52, 0x07, 0x47, 0xD6, 0xA6, + 0x36, 0xB2, 0x07, 0x32, 0x8E, 0xD0, 0xBA, 0x69, 0x7B, 0xC6, + 0xC3, 0x44, 0x9E, 0xD4, 0x81, 0x48, 0xFD, 0x2D, 0x68, 0xA2, + 0x8B, 0x67, 0xBB, 0xA1, 0x75, 0xC8, 0x36, 0x2C, 0x4A, 0xD2, + 0x1B, 0xF7, 0x8B, 0xBA, 0xCF, 0x0D, 0xF9, 0xEF, 0xEC, 0xF1, + 0x81, 0x1E, 0x7B, 0x9B, 0x03, 0x47, 0x9A, 0xBF, 0x65, 0xCC, + 0x7F, 0x65, 0x24, 0x69, 0xA6, 0xE8, 0x14, 0x89, 0x5B, 0xE4, + 0x34, 0xF7, 0xC5, 0xB0, 0x14, 0x93, 0xF5, 0x67, 0x7B, 0x3A, + 0x7A, 0x78, 0xE1, 0x01, 0x56, 0x56, 0x91, 0xA6, 0x13, 0x42, + 0x8D, 0xD2, 0x3C, 0x40, 0x9C, 0x4C, 0xEF, 0xD1, 0x86, 0xDF, + 0x37, 0x51, 0x1B, 0x0C, 0xA1, 0x3B, 0xF5, 0xF1, 0xA3, 0x4A, + 0x35, 0xE4, 0xE1, 0xCE, 0x96, 0xDF, 0x1B, 0x7E, 0xBF, 0x4E, + 0x97, 0xD0, 0x10, 0xE8, 0xA8, 0x08, 0x30, 0x81, 0xAF, 0x20, + 0x0B, 0x43, 0x14, 0xC5, 0x74, 0x67, 0xB4, 0x32, 0x82, 0x6F, + 0x8D, 0x86, 0xC2, 0x88, 0x40, 0x99, 0x36, 0x83, 0xBA, 0x1E, + 0x40, 0x72, 0x22, 0x17, 0xD7, 0x52, 0x65, 0x24, 0x73, 0xB0, + 0xCE, 0xEF, 0x19, 0xCD, 0xAE, 0xFF, 0x78, 0x6C, 0x7B, 0xC0, + 0x12, 0x03, 0xD4, 0x4E, 0x72, 0x0D, 0x50, 0x6D, 0x3B, 0xA3, + 0x3B, 0xA3, 0x99, 0x5E, 0x9D, 0xC8, 0xD9, 0x0C, 0x85, 0xB3, + 0xD9, 0x8A, 0xD9, 0x54, 0x26, 0xDB, 0x6D, 0xFA, 0xAC, 0xBB, + 0xFF, 0x25, 0x4C, 0xC4, 0xD1, 0x79, 0xF4, 0x71, 0xD3, 0x86, + 0x40, 0x18, 0x13, 0xB0, 0x63, 0xB5, 0x72, 0x4E, 0x30, 0xC4, + 0x97, 0x84, 0x86, 0x2D, 0x56, 0x2F, 0xD7, 0x15, 0xF7, 0x7F, + 0xC0, 0xAE, 0xF5, 0xFC, 0x5B, 0xE5, 0xFB, 0xA1, 0xBA, 0xD3, + 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x81, 0xF6, 0x30, 0x81, + 0xF3, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, + 0x04, 0x14, 0x33, 0xD8, 0x45, 0x66, 0xD7, 0x68, 0x87, 0x18, + 0x7E, 0x54, 0x0D, 0x70, 0x27, 0x91, 0xC7, 0x26, 0xD7, 0x85, + 0x65, 0xC0, 0x30, 0x81, 0xC3, 0x06, 0x03, 0x55, 0x1D, 0x23, + 0x04, 0x81, 0xBB, 0x30, 0x81, 0xB8, 0x80, 0x14, 0x33, 0xD8, + 0x45, 0x66, 0xD7, 0x68, 0x87, 0x18, 0x7E, 0x54, 0x0D, 0x70, + 0x27, 0x91, 0xC7, 0x26, 0xD7, 0x85, 0x65, 0xC0, 0xA1, 0x81, + 0x94, 0xA4, 0x81, 0x91, 0x30, 0x81, 0x8E, 0x31, 0x0B, 0x30, + 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, + 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, + 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, 0x11, 0x30, + 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, 0x50, 0x6F, + 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, 0x30, 0x0C, + 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x05, 0x79, 0x61, 0x53, + 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, + 0x0B, 0x13, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, + 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x13, 0x0D, 0x77, 0x77, 0x77, 0x2E, 0x79, + 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1D, + 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, + 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, 0x6F, 0x40, + 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x82, + 0x09, 0x00, 0x87, 0x4A, 0x75, 0xBE, 0x91, 0x66, 0xD8, 0x3D, + 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, + 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, + 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, + 0x82, 0x01, 0x01, 0x00, 0x1C, 0x7C, 0x42, 0x81, 0x29, 0x9E, + 0x21, 0xCF, 0xD0, 0xD8, 0xC1, 0x54, 0x6F, 0xCC, 0xAE, 0x14, + 0x09, 0x38, 0xFF, 0x68, 0x98, 0x9A, 0x95, 0x53, 0x76, 0x18, + 0x7B, 0xE6, 0x30, 0x76, 0xEC, 0x28, 0x0D, 0x75, 0xA7, 0xDE, + 0xE0, 0xCD, 0x8E, 0xD5, 0x55, 0x23, 0x6A, 0x47, 0x2B, 0x4E, + 0x8D, 0xFC, 0x7D, 0x06, 0xA3, 0xD8, 0x0F, 0xAD, 0x5E, 0xD6, + 0x04, 0xC9, 0x00, 0x33, 0xFB, 0x77, 0x27, 0xD3, 0xB5, 0x03, + 0xB3, 0x7B, 0x21, 0x74, 0x31, 0x0B, 0x4A, 0xAF, 0x2D, 0x1A, + 0xB3, 0x93, 0x8E, 0xCC, 0xF3, 0x5F, 0x3D, 0x90, 0x3F, 0xCC, + 0xE3, 0x55, 0x19, 0x91, 0x7B, 0x78, 0x24, 0x2E, 0x4A, 0x09, + 0xBB, 0x18, 0x4E, 0x61, 0x2D, 0x9C, 0xC6, 0x0A, 0xA0, 0x34, + 0x91, 0x88, 0x70, 0x6B, 0x3B, 0x48, 0x47, 0xBC, 0x79, 0x94, + 0xA2, 0xA0, 0x4D, 0x32, 0x47, 0x54, 0xC2, 0xA3, 0xDC, 0x2E, + 0xD2, 0x51, 0x4C, 0x29, 0x39, 0x11, 0xFF, 0xE2, 0x15, 0x5E, + 0x58, 0x97, 0x36, 0xF6, 0xE9, 0x06, 0x06, 0x86, 0x0E, 0x8D, + 0x9D, 0x95, 0x03, 0x72, 0xB2, 0x8B, 0x19, 0x7C, 0xE9, 0x14, + 0x6E, 0xA1, 0x88, 0x73, 0x68, 0x58, 0x6D, 0x71, 0x5E, 0xC2, + 0xD5, 0xD3, 0x13, 0xD2, 0x5F, 0xDE, 0xEA, 0x03, 0xBE, 0xE2, + 0x00, 0x40, 0xE5, 0xCE, 0xFD, 0xE6, 0x92, 0x31, 0x57, 0xC3, + 0xEB, 0xBB, 0x66, 0xAC, 0xCB, 0x2F, 0x1A, 0xFA, 0xE0, 0x62, + 0xA2, 0x47, 0xF4, 0x93, 0x43, 0x2A, 0x4B, 0x6C, 0x5E, 0x0A, + 0x2F, 0xF9, 0xE7, 0xE6, 0x4A, 0x63, 0x86, 0xB0, 0xAC, 0x2A, + 0xA1, 0xEB, 0xB4, 0x5B, 0x67, 0xCD, 0x32, 0xE4, 0xB6, 0x11, + 0x4B, 0x9A, 0x72, 0x66, 0x0D, 0xA2, 0x4A, 0x76, 0x8F, 0xFE, + 0x22, 0xBC, 0x83, 0xFD, 0xDB, 0xB7, 0xD5, 0xA9, 0xEE, 0x05, + 0xC9, 0xB1, 0x71, 0x7E, 0x1B, 0x2B, 0xE1, 0xE3, 0xAF, 0xC0 + +}; +const int sizeof_client_cert_der_2048 = sizeof(client_cert_der_2048) ; + +/* ./certs/dh2048.der, 2048-bit */ +const unsigned char dh_key_der_2048[] = +{ + 0x30, 0x82, 0x01, 0x08, 0x02, 0x82, 0x01, 0x01, 0x00, 0xB0, + 0xA1, 0x08, 0x06, 0x9C, 0x08, 0x13, 0xBA, 0x59, 0x06, 0x3C, + 0xBC, 0x30, 0xD5, 0xF5, 0x00, 0xC1, 0x4F, 0x44, 0xA7, 0xD6, + 0xEF, 0x4A, 0xC6, 0x25, 0x27, 0x1C, 0xE8, 0xD2, 0x96, 0x53, + 0x0A, 0x5C, 0x91, 0xDD, 0xA2, 0xC2, 0x94, 0x84, 0xBF, 0x7D, + 0xB2, 0x44, 0x9F, 0x9B, 0xD2, 0xC1, 0x8A, 0xC5, 0xBE, 0x72, + 0x5C, 0xA7, 0xE7, 0x91, 0xE6, 0xD4, 0x9F, 0x73, 0x07, 0x85, + 0x5B, 0x66, 0x48, 0xC7, 0x70, 0xFA, 0xB4, 0xEE, 0x02, 0xC9, + 0x3D, 0x9A, 0x4A, 0xDA, 0x3D, 0xC1, 0x46, 0x3E, 0x19, 0x69, + 0xD1, 0x17, 0x46, 0x07, 0xA3, 0x4D, 0x9F, 0x2B, 0x96, 0x17, + 0x39, 0x6D, 0x30, 0x8D, 0x2A, 0xF3, 0x94, 0xD3, 0x75, 0xCF, + 0xA0, 0x75, 0xE6, 0xF2, 0x92, 0x1F, 0x1A, 0x70, 0x05, 0xAA, + 0x04, 0x83, 0x57, 0x30, 0xFB, 0xDA, 0x76, 0x93, 0x38, 0x50, + 0xE8, 0x27, 0xFD, 0x63, 0xEE, 0x3C, 0xE5, 0xB7, 0xC8, 0x09, + 0xAE, 0x6F, 0x50, 0x35, 0x8E, 0x84, 0xCE, 0x4A, 0x00, 0xE9, + 0x12, 0x7E, 0x5A, 0x31, 0xD7, 0x33, 0xFC, 0x21, 0x13, 0x76, + 0xCC, 0x16, 0x30, 0xDB, 0x0C, 0xFC, 0xC5, 0x62, 0xA7, 0x35, + 0xB8, 0xEF, 0xB7, 0xB0, 0xAC, 0xC0, 0x36, 0xF6, 0xD9, 0xC9, + 0x46, 0x48, 0xF9, 0x40, 0x90, 0x00, 0x2B, 0x1B, 0xAA, 0x6C, + 0xE3, 0x1A, 0xC3, 0x0B, 0x03, 0x9E, 0x1B, 0xC2, 0x46, 0xE4, + 0x48, 0x4E, 0x22, 0x73, 0x6F, 0xC3, 0x5F, 0xD4, 0x9A, 0xD6, + 0x30, 0x07, 0x48, 0xD6, 0x8C, 0x90, 0xAB, 0xD4, 0xF6, 0xF1, + 0xE3, 0x48, 0xD3, 0x58, 0x4B, 0xA6, 0xB9, 0xCD, 0x29, 0xBF, + 0x68, 0x1F, 0x08, 0x4B, 0x63, 0x86, 0x2F, 0x5C, 0x6B, 0xD6, + 0xB6, 0x06, 0x65, 0xF7, 0xA6, 0xDC, 0x00, 0x67, 0x6B, 0xBB, + 0xC3, 0xA9, 0x41, 0x83, 0xFB, 0xC7, 0xFA, 0xC8, 0xE2, 0x1E, + 0x7E, 0xAF, 0x00, 0x3F, 0x93, 0x02, 0x01, 0x02 +}; +const int sizeof_dh_key_der_2048 = sizeof(dh_key_der_2048) ; + +/* ./certs/dsa2048.der, 2048-bit */ +const unsigned char dsa_key_der_2048[] = +{ + 0x30, 0x82, 0x03, 0x3F, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xCC, 0x8E, 0xC9, 0xA0, 0xD5, 0x9A, 0x27, 0x1C, + 0xDA, 0x52, 0xDF, 0xC7, 0xC0, 0xE6, 0x06, 0xA4, 0x3E, 0x8A, + 0x66, 0x49, 0xD0, 0x59, 0x33, 0x51, 0x69, 0xC4, 0x9C, 0x5E, + 0x64, 0x85, 0xC7, 0xF1, 0xAB, 0xD5, 0xD9, 0x62, 0xAC, 0xFD, + 0xA1, 0xE0, 0x1B, 0x57, 0xFF, 0x96, 0xEF, 0x0C, 0x9F, 0xC8, + 0x44, 0x87, 0xEB, 0x5C, 0x91, 0xD0, 0x46, 0x42, 0x09, 0x50, + 0x6A, 0x23, 0xCB, 0x89, 0x6F, 0x55, 0xE9, 0x6A, 0x11, 0xA9, + 0xA8, 0x32, 0xAB, 0x33, 0x0D, 0x51, 0xB5, 0x79, 0x51, 0xB4, + 0xAB, 0xA2, 0x25, 0x11, 0x8D, 0xE5, 0x24, 0xBE, 0xD8, 0xF1, + 0x9D, 0x4E, 0x12, 0x6F, 0xAC, 0x44, 0x54, 0x80, 0xA9, 0xB4, + 0x81, 0x68, 0x4E, 0x44, 0x0E, 0xB8, 0x39, 0xF3, 0xBE, 0x83, + 0x08, 0x74, 0xA2, 0xC6, 0x7A, 0xD7, 0x6A, 0x7D, 0x0A, 0x88, + 0x57, 0x83, 0x48, 0xDC, 0xCF, 0x5E, 0x6F, 0xEE, 0x68, 0x0C, + 0xF7, 0xFF, 0x03, 0x04, 0x90, 0xAA, 0xF7, 0x07, 0x98, 0xF8, + 0x67, 0x5A, 0x83, 0x23, 0x66, 0x47, 0x60, 0xC3, 0x43, 0x6E, + 0x03, 0x91, 0xAC, 0x28, 0x66, 0xCB, 0xF0, 0xD3, 0x05, 0xC8, + 0x09, 0x97, 0xB5, 0xAE, 0x01, 0x5E, 0x80, 0x3B, 0x9D, 0x4F, + 0xDE, 0x3E, 0x94, 0xFE, 0xCB, 0x82, 0xB0, 0xB1, 0xFC, 0x91, + 0x8B, 0x1D, 0x8A, 0xEE, 0xC6, 0x06, 0x1F, 0x37, 0x91, 0x48, + 0xD2, 0xF8, 0x6C, 0x5D, 0x60, 0x13, 0x83, 0xA7, 0x81, 0xAC, + 0xCA, 0x8D, 0xD0, 0x6A, 0x04, 0x0A, 0xEA, 0x3E, 0x22, 0x4E, + 0x13, 0xF1, 0x0D, 0xBB, 0x60, 0x6B, 0xCD, 0xBC, 0x5C, 0x87, + 0xA3, 0x67, 0x2B, 0x42, 0xA1, 0x9F, 0xCD, 0x39, 0x58, 0xBE, + 0x55, 0xB1, 0x93, 0x84, 0xCE, 0xB2, 0x10, 0x4E, 0xE4, 0xC3, + 0x9F, 0xB2, 0x53, 0x61, 0x01, 0x29, 0xAA, 0x96, 0xCB, 0x20, + 0x60, 0x42, 0x1D, 0xBA, 0x75, 0x4B, 0x63, 0xC1, 0x02, 0x15, + 0x00, 0xE7, 0xA5, 0x39, 0xD4, 0x6A, 0x37, 0x5E, 0x95, 0x06, + 0x39, 0x07, 0x77, 0x0A, 0xEB, 0xA0, 0x03, 0xEB, 0x78, 0x82, + 0x9B, 0x02, 0x82, 0x01, 0x01, 0x00, 0x9A, 0xD4, 0x4C, 0x71, + 0x2F, 0xEC, 0xFA, 0x32, 0xB2, 0x80, 0x7E, 0x61, 0x4A, 0x6B, + 0x5F, 0x18, 0x76, 0x43, 0xC3, 0x69, 0xBA, 0x41, 0xC7, 0xA7, + 0x1D, 0x79, 0x01, 0xEC, 0xAF, 0x34, 0x87, 0x67, 0x4F, 0x29, + 0x80, 0xA8, 0x3B, 0x87, 0xF6, 0xE8, 0xA1, 0xE8, 0xCD, 0x1B, + 0x1C, 0x86, 0x38, 0xF6, 0xD1, 0x0C, 0x46, 0x2E, 0xC8, 0xE0, + 0xC9, 0x30, 0x26, 0xD5, 0x2C, 0x7F, 0xC1, 0x08, 0xBF, 0xCC, + 0x5A, 0x82, 0x8E, 0xD4, 0xD4, 0x49, 0xAA, 0xA2, 0xFA, 0xE6, + 0xC1, 0x9D, 0xF0, 0xD9, 0x96, 0xB0, 0xFF, 0x0C, 0x5B, 0x33, + 0x8E, 0x06, 0xDD, 0x9D, 0x28, 0xA9, 0xE9, 0x80, 0x41, 0x3B, + 0xD8, 0x7A, 0x94, 0x21, 0x8F, 0x56, 0xF1, 0xA2, 0xB4, 0x2B, + 0x89, 0x1C, 0x74, 0xFF, 0x7E, 0x91, 0xDC, 0x1F, 0x91, 0x13, + 0x98, 0xAF, 0xC7, 0x06, 0xD2, 0x4C, 0x90, 0xA2, 0xBD, 0xDA, + 0x16, 0xBA, 0x65, 0xB0, 0x2D, 0x68, 0x87, 0x3C, 0x6E, 0x25, + 0x8D, 0x90, 0xC7, 0xBC, 0x0D, 0xA9, 0x43, 0x03, 0xC9, 0xBE, + 0xCF, 0x85, 0x6F, 0xDB, 0x07, 0x7B, 0x8C, 0xF8, 0xB1, 0xC2, + 0x49, 0x10, 0x69, 0x63, 0x56, 0x37, 0xC5, 0x30, 0xD2, 0xFB, + 0x71, 0x9A, 0xE8, 0x82, 0x07, 0x2E, 0x3E, 0x95, 0x50, 0xF3, + 0x73, 0xCF, 0x34, 0x5B, 0xD5, 0xAB, 0x02, 0x15, 0xF2, 0xCC, + 0xD7, 0x52, 0xC5, 0x28, 0xD8, 0x41, 0x19, 0x55, 0x6F, 0xB8, + 0x5F, 0xF1, 0x99, 0xB3, 0xC7, 0xD9, 0xB3, 0x71, 0xF4, 0x2D, + 0xDF, 0x22, 0x59, 0x35, 0x86, 0xDB, 0x39, 0xCA, 0x1B, 0x4D, + 0x35, 0x90, 0x19, 0x6B, 0x31, 0xE3, 0xC8, 0xC6, 0x09, 0xBF, + 0x7C, 0xED, 0x01, 0xB4, 0xB2, 0xF5, 0x6E, 0xDA, 0x63, 0x41, + 0x3C, 0xE6, 0x3A, 0x72, 0x2D, 0x65, 0x48, 0xF6, 0x07, 0xCD, + 0x92, 0x84, 0x8B, 0x1D, 0xA7, 0x31, 0x6B, 0xD6, 0xF0, 0xFB, + 0xD9, 0xF4, 0x02, 0x82, 0x01, 0x00, 0x66, 0x4B, 0xBB, 0xB7, + 0xC9, 0x48, 0x95, 0x0D, 0x5A, 0xA6, 0x2D, 0xA1, 0x7F, 0xDF, + 0x1F, 0x67, 0x6D, 0xED, 0x52, 0x4B, 0x16, 0x6C, 0x17, 0xC6, + 0xAE, 0xF8, 0x6A, 0xC4, 0x57, 0xED, 0x2F, 0xB3, 0xF0, 0x2A, + 0x55, 0xAB, 0xBA, 0xCA, 0xEA, 0x17, 0xE8, 0x35, 0x7C, 0xE5, + 0x31, 0x0D, 0x4A, 0x95, 0xFC, 0x43, 0x6F, 0x97, 0x3C, 0x5C, + 0x67, 0xAC, 0xBE, 0x67, 0x7F, 0xE9, 0x4E, 0xAA, 0x48, 0xB3, + 0x92, 0xA1, 0x76, 0x75, 0xEA, 0x04, 0x34, 0x7F, 0x87, 0x33, + 0x2D, 0x24, 0xB6, 0x29, 0x97, 0xE3, 0x04, 0x77, 0x93, 0x89, + 0x13, 0xDB, 0x1B, 0x93, 0xB8, 0x2C, 0x90, 0x1A, 0x09, 0x3B, + 0x26, 0xD9, 0x59, 0xF3, 0x2A, 0x09, 0x58, 0xDC, 0xAC, 0x25, + 0xB4, 0xA9, 0x45, 0x3B, 0xA2, 0x3A, 0x6C, 0x61, 0x84, 0xBF, + 0x68, 0xD4, 0xEA, 0x9B, 0xC5, 0x29, 0x48, 0x60, 0x15, 0x10, + 0x35, 0x2C, 0x44, 0x1D, 0xB5, 0x9A, 0xEE, 0xAC, 0xC1, 0x68, + 0xE8, 0x47, 0xB7, 0x41, 0x34, 0x39, 0x9A, 0xF8, 0xA5, 0x20, + 0xE9, 0x24, 0xC4, 0x2C, 0x58, 0x3F, 0x4C, 0x41, 0x30, 0x3A, + 0x14, 0x6E, 0x8D, 0xEA, 0xAD, 0xBA, 0x9B, 0x43, 0xD3, 0x98, + 0x2F, 0x83, 0xD8, 0x14, 0x67, 0xE8, 0xF8, 0xD5, 0x4F, 0xAC, + 0xE0, 0x3B, 0xBF, 0xA7, 0x54, 0x16, 0x5E, 0x49, 0x64, 0x26, + 0x54, 0xA4, 0x6B, 0x69, 0x7C, 0xBA, 0x8A, 0x83, 0xD9, 0x2E, + 0x65, 0x0A, 0xA2, 0x27, 0xEF, 0x99, 0x99, 0x08, 0xD7, 0xB5, + 0x9F, 0xA0, 0x01, 0xEF, 0x7E, 0x17, 0xBF, 0x83, 0x6B, 0x2E, + 0xDD, 0xC0, 0x39, 0x38, 0x23, 0x68, 0xB4, 0x76, 0x6B, 0xE5, + 0xCA, 0xF7, 0x7C, 0xEE, 0xC0, 0x52, 0xE2, 0xDD, 0xAD, 0x59, + 0x3A, 0x42, 0x06, 0x45, 0xB0, 0xC7, 0xC1, 0x77, 0x05, 0xB2, + 0x0C, 0x32, 0x40, 0x46, 0xAA, 0xDA, 0x79, 0x77, 0x04, 0x71, + 0xDF, 0x7A, 0x02, 0x15, 0x00, 0x98, 0xEE, 0xB9, 0x51, 0x37, + 0x3E, 0x75, 0x13, 0x13, 0x06, 0x8F, 0x94, 0xD3, 0xE6, 0xE9, + 0x00, 0xCB, 0x62, 0x6D, 0x9A +}; +const int sizeof_dsa_key_der_2048 = sizeof(dsa_key_der_2048) ; + +/* ./certs/rsa2048.der, 2048-bit */ +const unsigned char rsa_key_der_2048[] = +{ + 0x30, 0x82, 0x04, 0xA3, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xE9, 0x8A, 0x5D, 0x15, 0xA4, 0xD4, 0x34, 0xB9, + 0x59, 0xA2, 0xDA, 0xAF, 0x74, 0xC8, 0xC9, 0x03, 0x26, 0x38, + 0xFA, 0x48, 0xFC, 0x4D, 0x30, 0x6E, 0xEA, 0x76, 0x89, 0xCE, + 0x4F, 0xF6, 0x87, 0xDE, 0x32, 0x3A, 0x46, 0x6E, 0x38, 0x12, + 0x58, 0x37, 0x22, 0x0D, 0x80, 0xAC, 0x2D, 0xAF, 0x2F, 0x12, + 0x3E, 0x62, 0x73, 0x60, 0x66, 0x68, 0x90, 0xB2, 0x6F, 0x47, + 0x17, 0x04, 0x2B, 0xCA, 0xB7, 0x26, 0xB7, 0x10, 0xC2, 0x13, + 0xF9, 0x7A, 0x62, 0x0A, 0x93, 0x32, 0x90, 0x42, 0x0D, 0x16, + 0x2E, 0xFA, 0xD7, 0x29, 0xD7, 0x9F, 0x54, 0xE4, 0xFC, 0x65, + 0x74, 0xF8, 0xF6, 0x43, 0x6B, 0x4E, 0x9E, 0x34, 0x7F, 0xCB, + 0x6B, 0x1C, 0x1A, 0xDE, 0x82, 0x81, 0xBF, 0x08, 0x5D, 0x3F, + 0xC0, 0xB6, 0xB1, 0xA8, 0xA5, 0x9C, 0x81, 0x70, 0xA7, 0x4E, + 0x32, 0x87, 0x15, 0x1C, 0x78, 0x0E, 0xF0, 0x18, 0xFE, 0xEB, + 0x4B, 0x37, 0x2B, 0xE9, 0xE1, 0xF7, 0xFA, 0x51, 0xC6, 0x58, + 0xB9, 0xD8, 0x06, 0x03, 0xED, 0xC0, 0x03, 0x18, 0x55, 0x8B, + 0x98, 0xFE, 0xB1, 0xF6, 0xD0, 0x3D, 0xFA, 0x63, 0xC0, 0x38, + 0x19, 0xC7, 0x00, 0xEF, 0x4D, 0x99, 0x60, 0xB4, 0xBA, 0xCE, + 0xE3, 0xCE, 0xD9, 0x6B, 0x2D, 0x76, 0x94, 0xFF, 0xFB, 0x77, + 0x18, 0x4A, 0xFE, 0x65, 0xF0, 0x0A, 0x91, 0x5C, 0x3B, 0x22, + 0x94, 0x85, 0xD0, 0x20, 0x18, 0x59, 0x2E, 0xA5, 0x33, 0x03, + 0xAC, 0x1B, 0x5F, 0x78, 0x32, 0x11, 0x25, 0xEE, 0x7F, 0x96, + 0x21, 0xA9, 0xD6, 0x76, 0x97, 0x8D, 0x66, 0x7E, 0xB2, 0x91, + 0xD0, 0x36, 0x2E, 0xA3, 0x1D, 0xBF, 0xF1, 0x85, 0xED, 0xC0, + 0x3E, 0x60, 0xB8, 0x5A, 0x9F, 0xAB, 0x80, 0xE0, 0xEA, 0x5D, + 0x5F, 0x75, 0x56, 0xC7, 0x4D, 0x51, 0x8E, 0xD4, 0x1F, 0x34, + 0xA6, 0x36, 0xF1, 0x30, 0x1F, 0x51, 0x99, 0x2F, 0x02, 0x03, + 0x01, 0x00, 0x01, 0x02, 0x82, 0x01, 0x00, 0x52, 0x11, 0x33, + 0x40, 0xC5, 0xD9, 0x64, 0x65, 0xB5, 0xE0, 0x0A, 0xA5, 0x19, + 0x8E, 0xED, 0x44, 0x54, 0x0C, 0x35, 0xB7, 0xAC, 0x21, 0x9B, + 0xE1, 0x7E, 0x37, 0x05, 0x9A, 0x20, 0x73, 0x6B, 0xAF, 0x63, + 0x4B, 0x23, 0x30, 0xDC, 0x37, 0x66, 0x14, 0x89, 0xBC, 0xE0, + 0xF8, 0xA0, 0x5D, 0x2D, 0x57, 0x65, 0xE0, 0xC6, 0xD6, 0x9B, + 0x66, 0x27, 0x62, 0xEC, 0xC3, 0xB8, 0x8C, 0xD8, 0xAE, 0xB5, + 0xC9, 0xBF, 0x0E, 0xFE, 0x84, 0x72, 0x68, 0xD5, 0x47, 0x0E, + 0x0E, 0xF8, 0xAE, 0x9D, 0x56, 0xAC, 0x4F, 0xAD, 0x88, 0xA0, + 0xA2, 0xF6, 0xFC, 0x38, 0xCD, 0x96, 0x5B, 0x5E, 0x7E, 0xB6, + 0x98, 0xBB, 0xF3, 0x8A, 0xEC, 0xFA, 0xC8, 0xB7, 0x90, 0x75, + 0xA0, 0x0E, 0x77, 0x6B, 0xFD, 0x59, 0x45, 0x5A, 0x0C, 0xFF, + 0x95, 0x8D, 0xCE, 0xFE, 0x9B, 0xF6, 0x19, 0x8E, 0x0B, 0xA1, + 0x0C, 0xEE, 0xC6, 0x79, 0xDD, 0x9D, 0x61, 0x85, 0x5C, 0x19, + 0x6C, 0x47, 0xCC, 0x08, 0xFF, 0xA5, 0x62, 0xDB, 0xE4, 0x2D, + 0x2D, 0xDD, 0x14, 0x67, 0xD6, 0x4A, 0x64, 0x2A, 0x66, 0x49, + 0x54, 0x9C, 0xE3, 0x85, 0x18, 0xE7, 0x31, 0x42, 0xE2, 0xD0, + 0x2C, 0x20, 0xA0, 0x74, 0x0F, 0x1F, 0x20, 0x89, 0xBA, 0xAB, + 0x80, 0xD8, 0x38, 0xD9, 0x46, 0x69, 0xBB, 0xEF, 0xCC, 0x8B, + 0xA1, 0x73, 0xA7, 0xF2, 0xE4, 0x38, 0x5D, 0xD6, 0x75, 0x9F, + 0x88, 0x0E, 0x56, 0xCD, 0xD8, 0x84, 0x59, 0x29, 0x73, 0xF5, + 0xA1, 0x79, 0xDA, 0x7A, 0x1F, 0xBF, 0x73, 0x83, 0xC0, 0x6D, + 0x9F, 0x8B, 0x34, 0x15, 0xC0, 0x6D, 0x69, 0x6A, 0x20, 0xE6, + 0x51, 0xCF, 0x45, 0x6E, 0xCC, 0x05, 0xC4, 0x3A, 0xC0, 0x9E, + 0xAA, 0xC1, 0x06, 0x2F, 0xAB, 0x99, 0x30, 0xE1, 0x6E, 0x9D, + 0x45, 0x7A, 0xFF, 0xA9, 0xCE, 0x70, 0xB8, 0x16, 0x1A, 0x0E, + 0x20, 0xFA, 0xC1, 0x02, 0x81, 0x81, 0x00, 0xFF, 0x30, 0x11, + 0xC2, 0x3C, 0x6B, 0xB4, 0xD6, 0x9E, 0x6B, 0xC1, 0x93, 0xD1, + 0x48, 0xCE, 0x80, 0x2D, 0xBE, 0xAF, 0xF7, 0xBA, 0xB2, 0xD7, + 0xC3, 0xC4, 0x53, 0x6E, 0x15, 0x02, 0xAA, 0x61, 0xB9, 0xEA, + 0x05, 0x9B, 0x79, 0x67, 0x0B, 0xCE, 0xD9, 0xFB, 0x98, 0x8C, + 0x1D, 0x6B, 0xF4, 0x5A, 0xA7, 0xA0, 0x5E, 0x54, 0x18, 0xE9, + 0x31, 0x44, 0x7C, 0xC7, 0x52, 0xD8, 0x6D, 0xA0, 0x3E, 0xD6, + 0x14, 0x2D, 0x7B, 0x15, 0x9D, 0x1E, 0x39, 0x87, 0x96, 0xDD, + 0xA8, 0x33, 0x55, 0x2A, 0x8E, 0x32, 0xC0, 0xC4, 0xE5, 0xB8, + 0xCB, 0xCD, 0x32, 0x8D, 0xAD, 0x7B, 0xE5, 0xC6, 0x7E, 0x4D, + 0x6F, 0xF3, 0xA4, 0xC5, 0xA6, 0x40, 0xBE, 0x90, 0x3A, 0x33, + 0x6A, 0x24, 0xB2, 0x80, 0x81, 0x12, 0xAC, 0xE3, 0x7B, 0x26, + 0x63, 0xCF, 0x88, 0xB9, 0xFF, 0x74, 0x23, 0x37, 0x52, 0xF0, + 0xC4, 0x27, 0x5D, 0x45, 0x1F, 0x02, 0x81, 0x81, 0x00, 0xEA, + 0x48, 0xA7, 0xDD, 0x73, 0x41, 0x56, 0x21, 0x15, 0xF7, 0x42, + 0x45, 0x4D, 0xA9, 0xE1, 0x66, 0x5B, 0xBD, 0x25, 0x7D, 0xF7, + 0xA8, 0x65, 0x13, 0xAE, 0x2D, 0x38, 0x11, 0xCD, 0x93, 0xFC, + 0x30, 0xA3, 0x2C, 0x44, 0xBB, 0xCF, 0xD0, 0x21, 0x8F, 0xFB, + 0xC1, 0xF9, 0xAD, 0x1D, 0xEE, 0x96, 0xCF, 0x97, 0x49, 0x60, + 0x53, 0x80, 0xA5, 0xA2, 0xF8, 0xEE, 0xB9, 0xD5, 0x77, 0x44, + 0xDD, 0xFD, 0x19, 0x2A, 0xF1, 0x81, 0xF4, 0xD9, 0x3C, 0xEC, + 0x73, 0xD0, 0x2A, 0xD8, 0x3C, 0x27, 0x87, 0x79, 0x12, 0x86, + 0xE7, 0x57, 0x0C, 0x59, 0xD1, 0x44, 0x55, 0xAE, 0xC3, 0x4D, + 0x42, 0xAD, 0xA9, 0xB3, 0x28, 0x61, 0xB4, 0x9C, 0xA6, 0x63, + 0xD3, 0x96, 0xB1, 0x75, 0x9F, 0x2A, 0x78, 0x99, 0xE3, 0x1E, + 0x71, 0x47, 0x39, 0xF4, 0x52, 0xE3, 0x66, 0xF1, 0xEB, 0x7F, + 0xEF, 0xC6, 0x81, 0x93, 0x4C, 0x99, 0xF1, 0x02, 0x81, 0x81, + 0x00, 0xC5, 0xB6, 0x20, 0x8C, 0x34, 0xF3, 0xDD, 0xF0, 0x4A, + 0x5D, 0x82, 0x65, 0x5C, 0x48, 0xE4, 0x75, 0x3A, 0xFB, 0xFA, + 0xAA, 0x1C, 0xE4, 0x63, 0x77, 0x31, 0xAC, 0xD2, 0x25, 0x45, + 0x23, 0x6D, 0x03, 0xF5, 0xE4, 0xD2, 0x48, 0x85, 0x26, 0x08, + 0xE5, 0xAA, 0xA0, 0xCE, 0x2E, 0x1D, 0x6D, 0xFC, 0xAE, 0xD2, + 0xF9, 0x42, 0x7E, 0xEA, 0x6D, 0x59, 0x7A, 0xB3, 0x93, 0xE4, + 0x4B, 0x4B, 0x54, 0x63, 0xD8, 0xCE, 0x44, 0x06, 0xC2, 0xEC, + 0x9F, 0xF6, 0x05, 0x55, 0x46, 0xF4, 0x3E, 0x8F, 0xF2, 0x0C, + 0x30, 0x7E, 0x5C, 0xDD, 0x88, 0x49, 0x3B, 0x59, 0xB9, 0x87, + 0xBC, 0xC6, 0xC5, 0x24, 0x8A, 0x10, 0x63, 0x21, 0x1F, 0x66, + 0x1A, 0x3E, 0xF4, 0x58, 0xD1, 0x6C, 0x0D, 0x40, 0xB2, 0xC0, + 0x1D, 0x63, 0x42, 0x0E, 0xC4, 0x56, 0x0E, 0xC0, 0xCC, 0xC2, + 0xD6, 0x66, 0x0E, 0xC4, 0xAB, 0xB5, 0x33, 0xF6, 0x51, 0x02, + 0x81, 0x80, 0x19, 0x7E, 0xE6, 0xA5, 0xB6, 0xD1, 0x39, 0x6A, + 0x48, 0x55, 0xAC, 0x24, 0x96, 0x9B, 0x12, 0x28, 0x6D, 0x7B, + 0x5C, 0x05, 0x25, 0x5A, 0x72, 0x05, 0x7E, 0x42, 0xF5, 0x83, + 0x1A, 0x78, 0x2C, 0x4D, 0xAE, 0xB4, 0x36, 0x96, 0xA9, 0xBA, + 0xE0, 0xAC, 0x26, 0x9D, 0xA9, 0x6A, 0x29, 0x83, 0xB9, 0x6D, + 0xC5, 0xEC, 0xFA, 0x4A, 0x9C, 0x09, 0x6A, 0x7E, 0xE4, 0x9B, + 0xDC, 0x9B, 0x2A, 0x27, 0x6E, 0x4F, 0xBA, 0xD8, 0xA5, 0x67, + 0xDB, 0xEC, 0x41, 0x5F, 0x29, 0x1C, 0x40, 0x83, 0xEB, 0x59, + 0x56, 0xD7, 0xA9, 0x4E, 0xAB, 0xAE, 0x70, 0x67, 0xD1, 0xA3, + 0xF1, 0x6C, 0xD7, 0x8F, 0x96, 0x0E, 0x8D, 0xAC, 0xAB, 0x55, + 0x58, 0x66, 0xD3, 0x1E, 0x47, 0x9B, 0xF0, 0x4C, 0xED, 0xF6, + 0x49, 0xE8, 0xE9, 0x7B, 0x32, 0x61, 0x20, 0x31, 0x95, 0x05, + 0xB2, 0xF6, 0x09, 0xEA, 0x32, 0x14, 0x0F, 0xCF, 0x9A, 0x41, + 0x02, 0x81, 0x80, 0x77, 0x3F, 0xB6, 0x14, 0x8D, 0xC5, 0x13, + 0x08, 0x7E, 0xC9, 0xC4, 0xEA, 0xD4, 0xBA, 0x0D, 0xA4, 0x9E, + 0xB3, 0x6E, 0xDE, 0x1A, 0x7A, 0xF8, 0x89, 0x88, 0xEF, 0x36, + 0x3C, 0x11, 0xBC, 0x83, 0xE8, 0x30, 0x6C, 0x81, 0x7C, 0x47, + 0xF3, 0x4D, 0xCA, 0xEA, 0x56, 0x01, 0x62, 0x55, 0x2E, 0x4B, + 0x89, 0xA9, 0xBD, 0x6F, 0x01, 0xF6, 0x74, 0x02, 0xAA, 0xE3, + 0x84, 0x66, 0x06, 0x95, 0x34, 0xA1, 0xE2, 0xCA, 0x65, 0xFE, + 0xA3, 0x2D, 0x43, 0x97, 0x95, 0x6C, 0x6F, 0xD5, 0xB4, 0x38, + 0xF6, 0xF9, 0x95, 0x30, 0xFA, 0xF8, 0x9C, 0x25, 0x2B, 0xB6, + 0x14, 0x51, 0xCC, 0x2E, 0xB3, 0x5B, 0xD6, 0xDC, 0x1A, 0xEC, + 0x2D, 0x09, 0x5B, 0x3F, 0x3A, 0xD0, 0xB8, 0x4E, 0x27, 0x1F, + 0xDC, 0x2A, 0xEE, 0xAC, 0xA9, 0x59, 0x5D, 0x07, 0x63, 0x11, + 0x83, 0x0B, 0xD4, 0x74, 0x80, 0xB6, 0x7D, 0x62, 0x45, 0xBF, + 0x56 +}; +const int sizeof_rsa_key_der_2048 = sizeof(rsa_key_der_2048) ; + +#endif /* USE_CERT_BUFFERS_1024 */ + +#endif /* CYASSL_CERTS_TEST_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/crl.h b/project1/cyassl-3.0.0/cyassl/crl.h new file mode 100644 index 00000000..c3dbfd7c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/crl.h @@ -0,0 +1,51 @@ +/* crl.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_CRL_H +#define CYASSL_CRL_H + + +#ifdef HAVE_CRL + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct CYASSL_CRL CYASSL_CRL; + +CYASSL_LOCAL int InitCRL(CYASSL_CRL*, CYASSL_CERT_MANAGER*); +CYASSL_LOCAL void FreeCRL(CYASSL_CRL*, int dynamic); + +CYASSL_LOCAL int LoadCRL(CYASSL_CRL* crl, const char* path, int type, int mon); +CYASSL_LOCAL int BufferLoadCRL(CYASSL_CRL*, const byte*, long, int); +CYASSL_LOCAL int CheckCertCRL(CYASSL_CRL*, DecodedCert*); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* HAVE_CRL */ +#endif /* CYASSL_CRL_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h new file mode 100644 index 00000000..c36dfd5f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h @@ -0,0 +1,180 @@ +/* aes.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_AES + +#ifndef CTAO_CRYPT_AES_H +#define CTAO_CRYPT_AES_H + + +#include + +#ifdef HAVE_CAVIUM + #include + #include "cavium_common.h" +#endif + +#ifdef CYASSL_AESNI + +#include + +#if !defined (ALIGN16) + #if defined (__GNUC__) + #define ALIGN16 __attribute__ ( (aligned (16))) + #elif defined(_MSC_VER) + #define ALIGN16 __declspec (align (16)) + #else + #define ALIGN16 + #endif +#endif + +#endif /* CYASSL_AESNI */ + +#if !defined (ALIGN16) + #define ALIGN16 +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +#define CYASSL_AES_CAVIUM_MAGIC 0xBEEF0002 + +enum { + AES_ENC_TYPE = 1, /* cipher unique type */ + AES_ENCRYPTION = 0, + AES_DECRYPTION = 1, + AES_BLOCK_SIZE = 16 +}; + + +typedef struct Aes { + /* AESNI needs key first, rounds 2nd, not sure why yet */ + ALIGN16 word32 key[60]; + word32 rounds; + + ALIGN16 word32 reg[AES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ + ALIGN16 word32 tmp[AES_BLOCK_SIZE / sizeof(word32)]; /* same */ + +#ifdef HAVE_AESGCM + ALIGN16 byte H[AES_BLOCK_SIZE]; +#ifdef GCM_TABLE + /* key-based fast multiplication table. */ + ALIGN16 byte M0[256][AES_BLOCK_SIZE]; +#endif /* GCM_TABLE */ +#endif /* HAVE_AESGCM */ +#ifdef CYASSL_AESNI + byte use_aesni; +#endif /* CYASSL_AESNI */ +#ifdef HAVE_CAVIUM + AesType type; /* aes key type */ + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ + word64 contextHandle; /* nitrox context memory handle */ +#endif +#ifdef CYASSL_AES_COUNTER + word32 left; /* unsued bytes left from last call */ +#endif +#ifdef CYASSL_PIC32MZ_CRYPT + word32 key_ce[AES_BLOCK_SIZE*2/sizeof(word32)] ; + word32 iv_ce [AES_BLOCK_SIZE /sizeof(word32)] ; + int keylen ; +#endif +} Aes; + + +CYASSL_API int AesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv, + int dir); +CYASSL_API int AesSetIV(Aes* aes, const byte* iv); +CYASSL_API int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz); +CYASSL_API int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz); +CYASSL_API void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz); +CYASSL_API void AesEncryptDirect(Aes* aes, byte* out, const byte* in); +CYASSL_API void AesDecryptDirect(Aes* aes, byte* out, const byte* in); +CYASSL_API int AesSetKeyDirect(Aes* aes, const byte* key, word32 len, + const byte* iv, int dir); +#ifdef HAVE_AESGCM +CYASSL_API void AesGcmSetKey(Aes* aes, const byte* key, word32 len); +CYASSL_API void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz, + const byte* iv, word32 ivSz, + byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz); +CYASSL_API int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz, + const byte* iv, word32 ivSz, + const byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz); + +typedef struct Gmac { + Aes aes; +} Gmac; +CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len); +CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, + const byte* authIn, word32 authInSz, + byte* authTag, word32 authTagSz); +#endif /* HAVE_AESGCM */ +#ifdef HAVE_AESCCM +CYASSL_API void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz); +CYASSL_API void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz, + const byte* nonce, word32 nonceSz, + byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz); +CYASSL_API int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz, + const byte* nonce, word32 nonceSz, + const byte* authTag, word32 authTagSz, + const byte* authIn, word32 authInSz); +#endif /* HAVE_AESCCM */ + +#ifdef HAVE_CAVIUM + CYASSL_API int AesInitCavium(Aes*, int); + CYASSL_API void AesFreeCavium(Aes*); +#endif + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int AesSetKey_fips(Aes* aes, const byte* key, word32 len, + const byte* iv, int dir); + CYASSL_API int AesSetIV_fips(Aes* aes, const byte* iv); + CYASSL_API int AesCbcEncrypt_fips(Aes* aes, byte* out, const byte* in, + word32 sz); + CYASSL_API int AesCbcDecrypt_fips(Aes* aes, byte* out, const byte* in, + word32 sz); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define AesSetKey AesSetKey_fips + #define AesSetIV AesSetIV_fips + #define AesCbcEncrypt AesCbcEncrypt_fips + #define AesCbcDecrypt AesCbcDecrypt_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_AES_H */ +#endif /* NO_AES */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h new file mode 100644 index 00000000..e205c50d --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h @@ -0,0 +1,68 @@ +/* arc4.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_ARC4_H +#define CTAO_CRYPT_ARC4_H + + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +#define CYASSL_ARC4_CAVIUM_MAGIC 0xBEEF0001 + +enum { + ARC4_ENC_TYPE = 4, /* cipher unique type */ + ARC4_STATE_SIZE = 256 +}; + +/* ARC4 encryption and decryption */ +typedef struct Arc4 { + byte x; + byte y; + byte state[ARC4_STATE_SIZE]; +#ifdef HAVE_CAVIUM + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ + word64 contextHandle; /* nitrox context memory handle */ +#endif +} Arc4; + +CYASSL_API void Arc4Process(Arc4*, byte*, const byte*, word32); +CYASSL_API void Arc4SetKey(Arc4*, const byte*, word32); + +#ifdef HAVE_CAVIUM + CYASSL_API int Arc4InitCavium(Arc4*, int); + CYASSL_API void Arc4FreeCavium(Arc4*); +#endif + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_ARC4_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h new file mode 100644 index 00000000..239c0749 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h @@ -0,0 +1,704 @@ +/* asn.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifndef NO_ASN + +#ifndef CTAO_CRYPT_ASN_H +#define CTAO_CRYPT_ASN_H + +#include +#include +#include +#include +#include +#include +#include /* public interface */ +#ifdef HAVE_ECC + #include +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + ISSUER = 0, + SUBJECT = 1, + + EXTERNAL_SERIAL_SIZE = 32, + + BEFORE = 0, + AFTER = 1 +}; + +/* ASN Tags */ +enum ASN_Tags { + ASN_BOOLEAN = 0x01, + ASN_INTEGER = 0x02, + ASN_BIT_STRING = 0x03, + ASN_OCTET_STRING = 0x04, + ASN_TAG_NULL = 0x05, + ASN_OBJECT_ID = 0x06, + ASN_ENUMERATED = 0x0a, + ASN_UTF8STRING = 0x0c, + ASN_SEQUENCE = 0x10, + ASN_SET = 0x11, + ASN_UTC_TIME = 0x17, + ASN_OTHER_TYPE = 0x00, + ASN_RFC822_TYPE = 0x01, + ASN_DNS_TYPE = 0x02, + ASN_DIR_TYPE = 0x04, + ASN_GENERALIZED_TIME = 0x18, + CRL_EXTENSIONS = 0xa0, + ASN_EXTENSIONS = 0xa3, + ASN_LONG_LENGTH = 0x80 +}; + +enum ASN_Flags{ + ASN_CONSTRUCTED = 0x20, + ASN_CONTEXT_SPECIFIC = 0x80 +}; + +enum DN_Tags { + ASN_COMMON_NAME = 0x03, /* CN */ + ASN_SUR_NAME = 0x04, /* SN */ + ASN_SERIAL_NUMBER = 0x05, /* serialNumber */ + ASN_COUNTRY_NAME = 0x06, /* C */ + ASN_LOCALITY_NAME = 0x07, /* L */ + ASN_STATE_NAME = 0x08, /* ST */ + ASN_ORG_NAME = 0x0a, /* O */ + ASN_ORGUNIT_NAME = 0x0b /* OU */ +}; + +enum PBES { + PBE_MD5_DES = 0, + PBE_SHA1_DES = 1, + PBE_SHA1_DES3 = 2, + PBE_SHA1_RC4_128 = 3, + PBES2 = 13 /* algo ID */ +}; + +enum ENCRYPTION_TYPES { + DES_TYPE = 0, + DES3_TYPE = 1, + RC4_TYPE = 2 +}; + +enum ECC_TYPES { + ECC_PREFIX_0 = 160, + ECC_PREFIX_1 = 161 +}; + +enum Misc_ASN { + ASN_NAME_MAX = 256, + MAX_SALT_SIZE = 64, /* MAX PKCS Salt length */ + MAX_IV_SIZE = 64, /* MAX PKCS Iv length */ + MAX_KEY_SIZE = 64, /* MAX PKCS Key length */ + PKCS5 = 5, /* PKCS oid tag */ + PKCS5v2 = 6, /* PKCS #5 v2.0 */ + PKCS12 = 12, /* PKCS #12 */ + MAX_UNICODE_SZ = 256, + ASN_BOOL_SIZE = 2, /* including type */ + SHA_SIZE = 20, + RSA_INTS = 8, /* RSA ints in private key */ + MIN_DATE_SIZE = 13, + MAX_DATE_SIZE = 32, + ASN_GEN_TIME_SZ = 15, /* 7 numbers * 2 + Zulu tag */ + MAX_ENCODED_SIG_SZ = 512, + MAX_SIG_SZ = 256, + MAX_ALGO_SZ = 20, + MAX_SEQ_SZ = 5, /* enum(seq | con) + length(4) */ + MAX_SET_SZ = 5, /* enum(set | con) + length(4) */ + MAX_OCTET_STR_SZ = 5, /* enum(set | con) + length(4) */ + MAX_EXP_SZ = 5, /* enum(contextspec|con|exp) + length(4) */ + MAX_PRSTR_SZ = 5, /* enum(prstr) + length(4) */ + MAX_VERSION_SZ = 5, /* enum + id + version(byte) + (header(2))*/ + MAX_ENCODED_DIG_SZ = 73, /* sha512 + enum(bit or octet) + legnth(4) */ + MAX_RSA_INT_SZ = 517, /* RSA raw sz 4096 for bits + tag + len(4) */ + MAX_NTRU_KEY_SZ = 610, /* NTRU 112 bit public key */ + MAX_NTRU_ENC_SZ = 628, /* NTRU 112 bit DER public encoding */ + MAX_LENGTH_SZ = 4, /* Max length size for DER encoding */ + MAX_RSA_E_SZ = 16, /* Max RSA public e size */ + MAX_CA_SZ = 32, /* Max encoded CA basic constraint length */ + MAX_SN_SZ = 35, /* Max encoded serial number (INT) length */ +#ifdef CYASSL_CERT_GEN + #ifdef CYASSL_CERT_REQ + /* Max encoded cert req attributes length */ + MAX_ATTRIB_SZ = MAX_SEQ_SZ * 3 + (11 + MAX_SEQ_SZ) * 2 + + MAX_PRSTR_SZ + CTC_NAME_SIZE, /* 11 is the OID size */ + #endif + #ifdef CYASSL_ALT_NAMES + MAX_EXTENSIONS_SZ = 1 + MAX_LENGTH_SZ + CTC_MAX_ALT_SIZE, + #else + MAX_EXTENSIONS_SZ = 1 + MAX_LENGTH_SZ + MAX_CA_SZ, + #endif + /* Max total extensions, id + len + others */ +#endif + MAX_OCSP_EXT_SZ = 58, /* Max OCSP Extension length */ + MAX_OCSP_NONCE_SZ = 18, /* OCSP Nonce size */ + EIGHTK_BUF = 8192, /* Tmp buffer size */ + MAX_PUBLIC_KEY_SZ = MAX_NTRU_ENC_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ * 2 + /* use bigger NTRU size */ +}; + + +enum Oid_Types { + hashType = 0, + sigType = 1, + keyType = 2, + curveType = 3, + blkType = 4 +}; + + +enum Hash_Sum { + MD2h = 646, + MD5h = 649, + SHAh = 88, + SHA256h = 414, + SHA384h = 415, + SHA512h = 416 +}; + + +enum Block_Sum { + DESb = 69, + DES3b = 652 +}; + + +enum Key_Sum { + DSAk = 515, + RSAk = 645, + NTRUk = 364, + ECDSAk = 518 +}; + + +enum Ecc_Sum { + ECC_256R1 = 526, + ECC_384R1 = 210, + ECC_521R1 = 211, + ECC_160R1 = 184, + ECC_192R1 = 520, + ECC_224R1 = 209 +}; + + +enum KDF_Sum { + PBKDF2_OID = 660 +}; + + +enum Extensions_Sum { + BASIC_CA_OID = 133, + ALT_NAMES_OID = 131, + CRL_DIST_OID = 145, + AUTH_INFO_OID = 69, + CA_ISSUER_OID = 117, + AUTH_KEY_OID = 149, + SUBJ_KEY_OID = 128, + CERT_POLICY_OID = 146, + KEY_USAGE_OID = 129, /* 2.5.29.15 */ + INHIBIT_ANY_OID = 168, /* 2.5.29.54 */ + EXT_KEY_USAGE_OID = 151, /* 2.5.29.37 */ + NAME_CONS_OID = 144 /* 2.5.29.30 */ +}; + +enum CertificatePolicy_Sum { + CP_ANY_OID = 146 /* id-ce 32 0 */ +}; + +enum SepHardwareName_Sum { + HW_NAME_OID = 79 /* 1.3.6.1.5.5.7.8.4 from RFC 4108*/ +}; + +enum AuthInfo_Sum { + AIA_OCSP_OID = 116, /* 1.3.6.1.5.5.7.48.1 */ + AIA_CA_ISSUER_OID = 117 /* 1.3.6.1.5.5.7.48.2 */ +}; + +enum ExtKeyUsage_Sum { /* From RFC 5280 */ + EKU_ANY_OID = 151, /* 2.5.29.37.0, anyExtendedKeyUsage */ + EKU_SERVER_AUTH_OID = 71, /* 1.3.6.1.5.5.7.3.1, id-kp-serverAuth */ + EKU_CLIENT_AUTH_OID = 72, /* 1.3.6.1.5.5.7.3.2, id-kp-clientAuth */ + EKU_OCSP_SIGN_OID = 79, /* 1.3.6.1.5.5.7.3.9, OCSPSigning */ +}; + + +enum VerifyType { + NO_VERIFY = 0, + VERIFY = 1 +}; + + +/* Key usage extension bits */ +#define KEYUSE_DIGITAL_SIG 0x0100 +#define KEYUSE_CONTENT_COMMIT 0x0080 +#define KEYUSE_KEY_ENCIPHER 0x0040 +#define KEYUSE_DATA_ENCIPHER 0x0020 +#define KEYUSE_KEY_AGREE 0x0010 +#define KEYUSE_KEY_CERT_SIGN 0x0008 +#define KEYUSE_CRL_SIGN 0x0004 +#define KEYUSE_ENCIPHER_ONLY 0x0002 +#define KEYUSE_DECIPHER_ONLY 0x0001 + +#define EXTKEYUSE_ANY 0x08 +#define EXTKEYUSE_OCSP_SIGN 0x04 +#define EXTKEYUSE_CLIENT_AUTH 0x02 +#define EXTKEYUSE_SERVER_AUTH 0x01 + +typedef struct DNS_entry DNS_entry; + +struct DNS_entry { + DNS_entry* next; /* next on DNS list */ + char* name; /* actual DNS name */ +}; + + +typedef struct Base_entry Base_entry; + +struct Base_entry { + Base_entry* next; /* next on name base list */ + char* name; /* actual name base */ + int nameSz; /* name length */ + byte type; /* Name base type (DNS or RFC822) */ +}; + + +struct DecodedName { + char* fullName; + int fullNameLen; + int entryCount; + int cnIdx; + int cnLen; + int snIdx; + int snLen; + int cIdx; + int cLen; + int lIdx; + int lLen; + int stIdx; + int stLen; + int oIdx; + int oLen; + int ouIdx; + int ouLen; + int emailIdx; + int emailLen; + int uidIdx; + int uidLen; + int serialIdx; + int serialLen; +}; + + +typedef struct DecodedCert DecodedCert; +typedef struct DecodedName DecodedName; +typedef struct Signer Signer; + + +struct DecodedCert { + byte* publicKey; + word32 pubKeySize; + int pubKeyStored; + word32 certBegin; /* offset to start of cert */ + word32 sigIndex; /* offset to start of signature */ + word32 sigLength; /* length of signature */ + word32 signatureOID; /* sum of algorithm object id */ + word32 keyOID; /* sum of key algo object id */ + int version; /* cert version, 1 or 3 */ + DNS_entry* altNames; /* alt names list of dns entries */ +#ifndef IGNORE_NAME_CONSTRAINTS + DNS_entry* altEmailNames; /* alt names list of RFC822 entries */ + Base_entry* permittedNames; /* Permitted name bases */ + Base_entry* excludedNames; /* Excluded name bases */ +#endif /* IGNORE_NAME_CONSTRAINTS */ + byte subjectHash[SHA_SIZE]; /* hash of all Names */ + byte issuerHash[SHA_SIZE]; /* hash of all Names */ +#ifdef HAVE_OCSP + byte issuerKeyHash[SHA_SIZE]; /* hash of the public Key */ +#endif /* HAVE_OCSP */ + byte* signature; /* not owned, points into raw cert */ + char* subjectCN; /* CommonName */ + int subjectCNLen; + int subjectCNStored; /* have we saved a copy we own */ + char issuer[ASN_NAME_MAX]; /* full name including common name */ + char subject[ASN_NAME_MAX]; /* full name including common name */ + int verify; /* Default to yes, but could be off */ + byte* source; /* byte buffer holder cert, NOT owner */ + word32 srcIdx; /* current offset into buffer */ + word32 maxIdx; /* max offset based on init size */ + void* heap; /* for user memory overrides */ + byte serial[EXTERNAL_SERIAL_SIZE]; /* raw serial number */ + int serialSz; /* raw serial bytes stored */ + byte* extensions; /* not owned, points into raw cert */ + int extensionsSz; /* length of cert extensions */ + word32 extensionsIdx; /* if want to go back and parse later */ + byte* extAuthInfo; /* Authority Information Access URI */ + int extAuthInfoSz; /* length of the URI */ + byte* extCrlInfo; /* CRL Distribution Points */ + int extCrlInfoSz; /* length of the URI */ + byte extSubjKeyId[SHA_SIZE]; /* Subject Key ID */ + byte extSubjKeyIdSet; /* Set when the SKID was read from cert */ + byte extAuthKeyId[SHA_SIZE]; /* Authority Key ID */ + byte extAuthKeyIdSet; /* Set when the AKID was read from cert */ +#ifndef IGNORE_NAME_CONSTRAINTS + byte extNameConstraintSet; +#endif /* IGNORE_NAME_CONSTRAINTS */ + byte isCA; /* CA basic constraint true */ + byte extKeyUsageSet; + word16 extKeyUsage; /* Key usage bitfield */ + byte extExtKeyUsageSet; /* Extended Key Usage */ + byte extExtKeyUsage; /* Extended Key usage bitfield */ +#ifdef OPENSSL_EXTRA + byte extBasicConstSet; + byte extBasicConstCrit; + byte extBasicConstPlSet; + word32 pathLength; /* CA basic constraint path length, opt */ + byte extSubjAltNameSet; + byte extSubjAltNameCrit; + byte extAuthKeyIdCrit; +#ifndef IGNORE_NAME_CONSTRAINTS + byte extNameConstraintCrit; +#endif /* IGNORE_NAME_CONSTRAINTS */ + byte extSubjKeyIdCrit; + byte extKeyUsageCrit; + byte extExtKeyUsageCrit; + byte* extExtKeyUsageSrc; + word32 extExtKeyUsageSz; + word32 extExtKeyUsageCount; + byte* extAuthKeyIdSrc; + word32 extAuthKeyIdSz; + byte* extSubjKeyIdSrc; + word32 extSubjKeyIdSz; +#endif +#ifdef HAVE_ECC + word32 pkCurveOID; /* Public Key's curve OID */ +#endif /* HAVE_ECC */ + byte* beforeDate; + int beforeDateLen; + byte* afterDate; + int afterDateLen; +#ifdef HAVE_PKCS7 + byte* issuerRaw; /* pointer to issuer inside source */ + int issuerRawLen; +#endif +#ifndef IGNORE_NAME_CONSTRAINT + byte* subjectRaw; /* pointer to subject inside source */ + int subjectRawLen; +#endif +#if defined(CYASSL_CERT_GEN) + /* easy access to subject info for other sign */ + char* subjectSN; + int subjectSNLen; + char* subjectC; + int subjectCLen; + char* subjectL; + int subjectLLen; + char* subjectST; + int subjectSTLen; + char* subjectO; + int subjectOLen; + char* subjectOU; + int subjectOULen; + char* subjectEmail; + int subjectEmailLen; +#endif /* CYASSL_CERT_GEN */ +#ifdef OPENSSL_EXTRA + DecodedName issuerName; + DecodedName subjectName; +#endif /* OPENSSL_EXTRA */ +#ifdef CYASSL_SEP + int deviceTypeSz; + byte* deviceType; + int hwTypeSz; + byte* hwType; + int hwSerialNumSz; + byte* hwSerialNum; + #ifdef OPENSSL_EXTRA + byte extCertPolicySet; + byte extCertPolicyCrit; + #endif /* OPENSSL_EXTRA */ +#endif /* CYASSL_SEP */ +}; + + +#ifdef SHA_DIGEST_SIZE + #define SIGNER_DIGEST_SIZE SHA_DIGEST_SIZE +#else + #define SIGNER_DIGEST_SIZE 20 +#endif + +/* CA Signers */ +/* if change layout change PERSIST_CERT_CACHE functions too */ +struct Signer { + word32 pubKeySize; + word32 keyOID; /* key type */ + word16 keyUsage; + byte* publicKey; + int nameLen; + char* name; /* common name */ +#ifndef IGNORE_NAME_CONSTRAINTS + Base_entry* permittedNames; + Base_entry* excludedNames; +#endif /* IGNORE_NAME_CONSTRAINTS */ + byte subjectNameHash[SIGNER_DIGEST_SIZE]; + /* sha hash of names in certificate */ + #ifndef NO_SKID + byte subjectKeyIdHash[SIGNER_DIGEST_SIZE]; + /* sha hash of names in certificate */ + #endif + Signer* next; +}; + + +/* not for public consumption but may use for testing sometimes */ +#ifdef CYASSL_TEST_CERT + #define CYASSL_TEST_API CYASSL_API +#else + #define CYASSL_TEST_API CYASSL_LOCAL +#endif + +CYASSL_TEST_API void FreeAltNames(DNS_entry*, void*); +#ifndef IGNORE_NAME_CONSTRAINTS + CYASSL_TEST_API void FreeNameSubtrees(Base_entry*, void*); +#endif /* IGNORE_NAME_CONSTRAINTS */ +CYASSL_TEST_API void InitDecodedCert(DecodedCert*, byte*, word32, void*); +CYASSL_TEST_API void FreeDecodedCert(DecodedCert*); +CYASSL_TEST_API int ParseCert(DecodedCert*, int type, int verify, void* cm); + +CYASSL_LOCAL int ParseCertRelative(DecodedCert*, int type, int verify,void* cm); +CYASSL_LOCAL int DecodeToKey(DecodedCert*, int verify); + +CYASSL_LOCAL word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, + int hashOID); + +CYASSL_LOCAL Signer* MakeSigner(void*); +CYASSL_LOCAL void FreeSigner(Signer*, void*); +CYASSL_LOCAL void FreeSignerTable(Signer**, int, void*); + + +CYASSL_LOCAL int ToTraditional(byte* buffer, word32 length); +CYASSL_LOCAL int ToTraditionalEnc(byte* buffer, word32 length,const char*, int); + +CYASSL_LOCAL int ValidateDate(const byte* date, byte format, int dateType); + +/* ASN.1 helper functions */ +CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx); +CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx); +CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len, + word32 maxIdx); +CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, + int* version); +CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx, + word32 maxIdx); +CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid, + word32 maxIdx); +CYASSL_LOCAL word32 SetLength(word32 length, byte* output); +CYASSL_LOCAL word32 SetSequence(word32 len, byte* output); +CYASSL_LOCAL word32 SetOctetString(word32 len, byte* output); +CYASSL_LOCAL word32 SetImplicit(byte tag, byte number, word32 len,byte* output); +CYASSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output); +CYASSL_LOCAL word32 SetSet(word32 len, byte* output); +CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz); +CYASSL_LOCAL int SetMyVersion(word32 version, byte* output, int header); +CYASSL_LOCAL int SetSerialNumber(const byte* sn, word32 snSz, byte* output); +CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash, + int maxIdx); + +#ifdef HAVE_ECC + /* ASN sig helpers */ + CYASSL_LOCAL int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, + mp_int* s); + CYASSL_LOCAL int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, + mp_int* r, mp_int* s); +#endif + +#ifdef CYASSL_CERT_GEN + +enum cert_enums { + NAME_ENTRIES = 8, + JOINT_LEN = 2, + EMAIL_JOINT_LEN = 9, + RSA_KEY = 10, + NTRU_KEY = 11, + ECC_KEY = 12 +}; + + +#endif /* CYASSL_CERT_GEN */ + + + +/* for pointer use */ +typedef struct CertStatus CertStatus; + +#ifdef HAVE_OCSP + +enum Ocsp_Response_Status { + OCSP_SUCCESSFUL = 0, /* Response has valid confirmations */ + OCSP_MALFORMED_REQUEST = 1, /* Illegal confirmation request */ + OCSP_INTERNAL_ERROR = 2, /* Internal error in issuer */ + OCSP_TRY_LATER = 3, /* Try again later */ + OCSP_SIG_REQUIRED = 5, /* Must sign the request (4 is skipped) */ + OCSP_UNAUTHROIZED = 6 /* Request unauthorized */ +}; + + +enum Ocsp_Cert_Status { + CERT_GOOD = 0, + CERT_REVOKED = 1, + CERT_UNKNOWN = 2 +}; + + +enum Ocsp_Sums { + OCSP_BASIC_OID = 117, + OCSP_NONCE_OID = 118 +}; + + +typedef struct OcspRequest OcspRequest; +typedef struct OcspResponse OcspResponse; + + +struct CertStatus { + CertStatus* next; + + byte serial[EXTERNAL_SERIAL_SIZE]; + int serialSz; + + int status; + + byte thisDate[MAX_DATE_SIZE]; + byte nextDate[MAX_DATE_SIZE]; + byte thisDateFormat; + byte nextDateFormat; +}; + + +struct OcspResponse { + int responseStatus; /* return code from Responder */ + + byte* response; /* Pointer to beginning of OCSP Response */ + word32 responseSz; /* length of the OCSP Response */ + + byte producedDate[MAX_DATE_SIZE]; + /* Date at which this response was signed */ + byte producedDateFormat; /* format of the producedDate */ + byte* issuerHash; + byte* issuerKeyHash; + + byte* cert; + word32 certSz; + + byte* sig; /* Pointer to sig in source */ + word32 sigSz; /* Length in octets for the sig */ + word32 sigOID; /* OID for hash used for sig */ + + CertStatus* status; /* certificate status to fill out */ + + byte* nonce; /* pointer to nonce inside ASN.1 response */ + int nonceSz; /* length of the nonce string */ + + byte* source; /* pointer to source buffer, not owned */ + word32 maxIdx; /* max offset based on init size */ +}; + + +struct OcspRequest { + DecodedCert* cert; + + byte useNonce; + byte nonce[MAX_OCSP_NONCE_SZ]; + int nonceSz; + + byte* issuerHash; /* pointer to issuerHash in source cert */ + byte* issuerKeyHash; /* pointer to issuerKeyHash in source cert */ + byte* serial; /* pointer to serial number in source cert */ + int serialSz; /* length of the serial number */ + + byte* dest; /* pointer to the destination ASN.1 buffer */ + word32 destSz; /* length of the destination buffer */ +}; + + +CYASSL_LOCAL void InitOcspResponse(OcspResponse*, CertStatus*, byte*, word32); +CYASSL_LOCAL int OcspResponseDecode(OcspResponse*); + +CYASSL_LOCAL void InitOcspRequest(OcspRequest*, DecodedCert*, + byte, byte*, word32); +CYASSL_LOCAL int EncodeOcspRequest(OcspRequest*); + +CYASSL_LOCAL int CompareOcspReqResp(OcspRequest*, OcspResponse*); + + +#endif /* HAVE_OCSP */ + + +/* for pointer use */ +typedef struct RevokedCert RevokedCert; + +#ifdef HAVE_CRL + +struct RevokedCert { + byte serialNumber[EXTERNAL_SERIAL_SIZE]; + int serialSz; + RevokedCert* next; +}; + +typedef struct DecodedCRL DecodedCRL; + +struct DecodedCRL { + word32 certBegin; /* offset to start of cert */ + word32 sigIndex; /* offset to start of signature */ + word32 sigLength; /* length of signature */ + word32 signatureOID; /* sum of algorithm object id */ + byte* signature; /* pointer into raw source, not owned */ + byte issuerHash[SHA_DIGEST_SIZE]; /* issuer hash */ + byte crlHash[SHA_DIGEST_SIZE]; /* raw crl data hash */ + byte lastDate[MAX_DATE_SIZE]; /* last date updated */ + byte nextDate[MAX_DATE_SIZE]; /* next update date */ + byte lastDateFormat; /* format of last date */ + byte nextDateFormat; /* format of next date */ + RevokedCert* certs; /* revoked cert list */ + int totalCerts; /* number on list */ +}; + +CYASSL_LOCAL void InitDecodedCRL(DecodedCRL*); +CYASSL_LOCAL int ParseCRL(DecodedCRL*, const byte* buff, word32 sz, void* cm); +CYASSL_LOCAL void FreeDecodedCRL(DecodedCRL*); + + +#endif /* HAVE_CRL */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_ASN_H */ + +#endif /* !NO_ASN */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h new file mode 100644 index 00000000..3ad60170 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h @@ -0,0 +1,177 @@ +/* asn_public.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_ASN_PUBLIC_H +#define CTAO_CRYPT_ASN_PUBLIC_H + +#include +#include +#ifdef CYASSL_CERT_GEN + #include +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Certificate file Type */ +enum CertType { + CERT_TYPE = 0, + PRIVATEKEY_TYPE, + DH_PARAM_TYPE, + CRL_TYPE, + CA_TYPE, + ECC_PRIVATEKEY_TYPE, + CERTREQ_TYPE +}; + + +/* Signature type, by OID sum */ +enum Ctc_SigType { + CTC_SHAwDSA = 517, + CTC_MD2wRSA = 646, + CTC_MD5wRSA = 648, + CTC_SHAwRSA = 649, + CTC_SHAwECDSA = 520, + CTC_SHA256wRSA = 655, + CTC_SHA256wECDSA = 524, + CTC_SHA384wRSA = 656, + CTC_SHA384wECDSA = 525, + CTC_SHA512wRSA = 657, + CTC_SHA512wECDSA = 526 +}; + + +#ifdef CYASSL_CERT_GEN + +#ifndef HAVE_ECC + typedef struct ecc_key ecc_key; +#endif + +enum Ctc_Misc { + CTC_NAME_SIZE = 64, + CTC_DATE_SIZE = 32, + CTC_MAX_ALT_SIZE = 8192, /* may be huge */ + CTC_SERIAL_SIZE = 8 +}; + +typedef struct CertName { + char country[CTC_NAME_SIZE]; + char state[CTC_NAME_SIZE]; + char locality[CTC_NAME_SIZE]; + char sur[CTC_NAME_SIZE]; + char org[CTC_NAME_SIZE]; + char unit[CTC_NAME_SIZE]; + char commonName[CTC_NAME_SIZE]; + char email[CTC_NAME_SIZE]; /* !!!! email has to be last !!!! */ +} CertName; + + +/* for user to fill for certificate generation */ +typedef struct Cert { + int version; /* x509 version */ + byte serial[CTC_SERIAL_SIZE]; /* serial number */ + int sigType; /* signature algo type */ + CertName issuer; /* issuer info */ + int daysValid; /* validity days */ + int selfSigned; /* self signed flag */ + CertName subject; /* subject info */ + int isCA; /* is this going to be a CA */ + /* internal use only */ + int bodySz; /* pre sign total size */ + int keyType; /* public key type of subject */ +#ifdef CYASSL_ALT_NAMES + byte altNames[CTC_MAX_ALT_SIZE]; /* altNames copy */ + int altNamesSz; /* altNames size in bytes */ + byte beforeDate[CTC_DATE_SIZE]; /* before date copy */ + int beforeDateSz; /* size of copy */ + byte afterDate[CTC_DATE_SIZE]; /* after date copy */ + int afterDateSz; /* size of copy */ +#endif +#ifdef CYASSL_CERT_REQ + char challengePw[CTC_NAME_SIZE]; +#endif +} Cert; + + + + +/* Initialize and Set Certficate defaults: + version = 3 (0x2) + serial = 0 (Will be randomly generated) + sigType = SHA_WITH_RSA + issuer = blank + daysValid = 500 + selfSigned = 1 (true) use subject as issuer + subject = blank + isCA = 0 (false) + keyType = RSA_KEY (default) +*/ +CYASSL_API void InitCert(Cert*); +CYASSL_API int MakeCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*, + ecc_key*, RNG*); +#ifdef CYASSL_CERT_REQ + CYASSL_API int MakeCertReq(Cert*, byte* derBuffer, word32 derSz, RsaKey*, + ecc_key*); +#endif +CYASSL_API int SignCert(int requestSz, int sigType, byte* derBuffer, + word32 derSz, RsaKey*, ecc_key*, RNG*); +CYASSL_API int MakeSelfCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*, + RNG*); +CYASSL_API int SetIssuer(Cert*, const char*); +CYASSL_API int SetSubject(Cert*, const char*); +#ifdef CYASSL_ALT_NAMES + CYASSL_API int SetAltNames(Cert*, const char*); +#endif +CYASSL_API int SetIssuerBuffer(Cert*, const byte*, int); +CYASSL_API int SetSubjectBuffer(Cert*, const byte*, int); +CYASSL_API int SetAltNamesBuffer(Cert*, const byte*, int); +CYASSL_API int SetDatesBuffer(Cert*, const byte*, int); + + #ifdef HAVE_NTRU + CYASSL_API int MakeNtruCert(Cert*, byte* derBuffer, word32 derSz, + const byte* ntruKey, word16 keySz, RNG*); + #endif + +#endif /* CYASSL_CERT_GEN */ + + +#if defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) + CYASSL_API int DerToPem(const byte* der, word32 derSz, byte* output, + word32 outputSz, int type); +#endif + +#ifdef HAVE_ECC + /* private key helpers */ + CYASSL_API int EccPrivateKeyDecode(const byte* input,word32* inOutIdx, + ecc_key*,word32); +#endif + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_ASN_PUBLIC_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h new file mode 100644 index 00000000..d82bffc6 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h @@ -0,0 +1,154 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Written in 2012 by Samuel Neves + + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see . +*/ +/* blake2-impl.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAOCRYPT_BLAKE2_IMPL_H +#define CTAOCRYPT_BLAKE2_IMPL_H + +#include + +static inline word32 load32( const void *src ) +{ +#if defined(LITTLE_ENDIAN_ORDER) + return *( word32 * )( src ); +#else + const byte *p = ( byte * )src; + word32 w = *p++; + w |= ( word32 )( *p++ ) << 8; + w |= ( word32 )( *p++ ) << 16; + w |= ( word32 )( *p++ ) << 24; + return w; +#endif +} + +static inline word64 load64( const void *src ) +{ +#if defined(LITTLE_ENDIAN_ORDER) + return *( word64 * )( src ); +#else + const byte *p = ( byte * )src; + word64 w = *p++; + w |= ( word64 )( *p++ ) << 8; + w |= ( word64 )( *p++ ) << 16; + w |= ( word64 )( *p++ ) << 24; + w |= ( word64 )( *p++ ) << 32; + w |= ( word64 )( *p++ ) << 40; + w |= ( word64 )( *p++ ) << 48; + w |= ( word64 )( *p++ ) << 56; + return w; +#endif +} + +static inline void store32( void *dst, word32 w ) +{ +#if defined(LITTLE_ENDIAN_ORDER) + *( word32 * )( dst ) = w; +#else + byte *p = ( byte * )dst; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; +#endif +} + +static inline void store64( void *dst, word64 w ) +{ +#if defined(LITTLE_ENDIAN_ORDER) + *( word64 * )( dst ) = w; +#else + byte *p = ( byte * )dst; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; +#endif +} + +static inline word64 load48( const void *src ) +{ + const byte *p = ( const byte * )src; + word64 w = *p++; + w |= ( word64 )( *p++ ) << 8; + w |= ( word64 )( *p++ ) << 16; + w |= ( word64 )( *p++ ) << 24; + w |= ( word64 )( *p++ ) << 32; + w |= ( word64 )( *p++ ) << 40; + return w; +} + +static inline void store48( void *dst, word64 w ) +{ + byte *p = ( byte * )dst; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; w >>= 8; + *p++ = ( byte )w; +} + +static inline word32 rotl32( const word32 w, const unsigned c ) +{ + return ( w << c ) | ( w >> ( 32 - c ) ); +} + +static inline word64 rotl64( const word64 w, const unsigned c ) +{ + return ( w << c ) | ( w >> ( 64 - c ) ); +} + +static inline word32 rotr32( const word32 w, const unsigned c ) +{ + return ( w >> c ) | ( w << ( 32 - c ) ); +} + +static inline word64 rotr64( const word64 w, const unsigned c ) +{ + return ( w >> c ) | ( w << ( 64 - c ) ); +} + +/* prevents compiler optimizing out memset() */ +static inline void secure_zero_memory( void *v, word64 n ) +{ + volatile byte *p = ( volatile byte * )v; + + while( n-- ) *p++ = 0; +} + +#endif /* CTAOCRYPT_BLAKE2_IMPL_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h new file mode 100644 index 00000000..ba5cc774 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h @@ -0,0 +1,183 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Written in 2012 by Samuel Neves + + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see . +*/ +/* blake2-int.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + + +#ifndef CTAOCRYPT_BLAKE2_INT_H +#define CTAOCRYPT_BLAKE2_INT_H + +#include + + +#if defined(_MSC_VER) + #define ALIGN(x) __declspec(align(x)) +#elif defined(__GNUC__) + #define ALIGN(x) __attribute__((aligned(x))) +#else + #define ALIGN(x) +#endif + + +#if defined(__cplusplus) + extern "C" { +#endif + + enum blake2s_constant + { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8 + }; + + enum blake2b_constant + { + BLAKE2B_BLOCKBYTES = 128, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, + BLAKE2B_PERSONALBYTES = 16 + }; + +#pragma pack(push, 1) + typedef struct __blake2s_param + { + byte digest_length; /* 1 */ + byte key_length; /* 2 */ + byte fanout; /* 3 */ + byte depth; /* 4 */ + word32 leaf_length; /* 8 */ + byte node_offset[6];/* 14 */ + byte node_depth; /* 15 */ + byte inner_length; /* 16 */ + /* byte reserved[0]; */ + byte salt[BLAKE2B_SALTBYTES]; /* 24 */ + byte personal[BLAKE2S_PERSONALBYTES]; /* 32 */ + } blake2s_param; + + ALIGN( 64 ) typedef struct __blake2s_state + { + word32 h[8]; + word32 t[2]; + word32 f[2]; + byte buf[2 * BLAKE2S_BLOCKBYTES]; + word64 buflen; + byte last_node; + } blake2s_state ; + + typedef struct __blake2b_param + { + byte digest_length; /* 1 */ + byte key_length; /* 2 */ + byte fanout; /* 3 */ + byte depth; /* 4 */ + word32 leaf_length; /* 8 */ + word64 node_offset; /* 16 */ + byte node_depth; /* 17 */ + byte inner_length; /* 18 */ + byte reserved[14]; /* 32 */ + byte salt[BLAKE2B_SALTBYTES]; /* 48 */ + byte personal[BLAKE2B_PERSONALBYTES]; /* 64 */ + } blake2b_param; + + ALIGN( 64 ) typedef struct __blake2b_state + { + word64 h[8]; + word64 t[2]; + word64 f[2]; + byte buf[2 * BLAKE2B_BLOCKBYTES]; + word64 buflen; + byte last_node; + } blake2b_state; + + typedef struct __blake2sp_state + { + blake2s_state S[8][1]; + blake2s_state R[1]; + byte buf[8 * BLAKE2S_BLOCKBYTES]; + word64 buflen; + } blake2sp_state; + + typedef struct __blake2bp_state + { + blake2b_state S[4][1]; + blake2b_state R[1]; + byte buf[4 * BLAKE2B_BLOCKBYTES]; + word64 buflen; + } blake2bp_state; +#pragma pack(pop) + + /* Streaming API */ + int blake2s_init( blake2s_state *S, const byte outlen ); + int blake2s_init_key( blake2s_state *S, const byte outlen, const void *key, const byte keylen ); + int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); + int blake2s_update( blake2s_state *S, const byte *in, word64 inlen ); + int blake2s_final( blake2s_state *S, byte *out, byte outlen ); + + int blake2b_init( blake2b_state *S, const byte outlen ); + int blake2b_init_key( blake2b_state *S, const byte outlen, const void *key, const byte keylen ); + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); + int blake2b_update( blake2b_state *S, const byte *in, word64 inlen ); + int blake2b_final( blake2b_state *S, byte *out, byte outlen ); + + int blake2sp_init( blake2sp_state *S, const byte outlen ); + int blake2sp_init_key( blake2sp_state *S, const byte outlen, const void *key, const byte keylen ); + int blake2sp_update( blake2sp_state *S, const byte *in, word64 inlen ); + int blake2sp_final( blake2sp_state *S, byte *out, byte outlen ); + + int blake2bp_init( blake2bp_state *S, const byte outlen ); + int blake2bp_init_key( blake2bp_state *S, const byte outlen, const void *key, const byte keylen ); + int blake2bp_update( blake2bp_state *S, const byte *in, word64 inlen ); + int blake2bp_final( blake2bp_state *S, byte *out, byte outlen ); + + /* Simple API */ + int blake2s( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); + int blake2b( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); + + int blake2sp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); + int blake2bp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); + + static inline int blake2( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ) + { + return blake2b( out, in, key, outlen, inlen, keylen ); + } + + + +#if defined(__cplusplus) + } +#endif + +#endif /* CTAOCRYPT_BLAKE2_INT_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h new file mode 100644 index 00000000..ba5ec6fd --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h @@ -0,0 +1,60 @@ +/* blake2.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_BLAKE2 + +#ifndef CTAOCRYPT_BLAKE2_H +#define CTAOCRYPT_BLAKE2_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/* in bytes, variable digest size up to 512 bits (64 bytes) */ +enum { + BLAKE2B_ID = 7, /* hash type unique */ + BLAKE2B_256 = 32 /* 256 bit type, SSL default */ +}; + + +/* BLAKE2b digest */ +typedef struct Blake2b { + blake2b_state S[1]; /* our state */ + word32 digestSz; /* digest size used on init */ +} Blake2b; + + +CYASSL_API int InitBlake2b(Blake2b*, word32); +CYASSL_API int Blake2bUpdate(Blake2b*, const byte*, word32); +CYASSL_API int Blake2bFinal(Blake2b*, byte*, word32); + + + +#ifdef __cplusplus + } +#endif + +#endif /* CTAOCRYPT_BLAKE2_H */ +#endif /* HAVE_BLAKE2 */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h new file mode 100644 index 00000000..aec9ecf6 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h @@ -0,0 +1,96 @@ +/* camellia.h ver 1.2.0 + * + * Copyright (c) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer as + * the first lines of this file unmodified. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* camellia.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CAMELLIA + +#ifndef CTAO_CRYPT_CAMELLIA_H +#define CTAO_CRYPT_CAMELLIA_H + + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + CAMELLIA_BLOCK_SIZE = 16 +}; + +#define CAMELLIA_TABLE_BYTE_LEN 272 +#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / sizeof(word32)) + +typedef word32 KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; + +typedef struct Camellia { + word32 keySz; + KEY_TABLE_TYPE key; + word32 reg[CAMELLIA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ + word32 tmp[CAMELLIA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ +} Camellia; + + +CYASSL_API int CamelliaSetKey(Camellia* cam, + const byte* key, word32 len, const byte* iv); +CYASSL_API int CamelliaSetIV(Camellia* cam, const byte* iv); +CYASSL_API void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in); +CYASSL_API void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in); +CYASSL_API void CamelliaCbcEncrypt(Camellia* cam, + byte* out, const byte* in, word32 sz); +CYASSL_API void CamelliaCbcDecrypt(Camellia* cam, + byte* out, const byte* in, word32 sz); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_AES_H */ +#endif /* HAVE_CAMELLIA */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h new file mode 100644 index 00000000..303565fd --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h @@ -0,0 +1,58 @@ +/* coding.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_CODING_H +#define CTAO_CRYPT_CODING_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* decode needed by CyaSSL */ +CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out, + word32* outLen); + +#if defined(OPENSSL_EXTRA) || defined(SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) + /* encode isn't */ + CYASSL_API + int Base64_Encode(const byte* in, word32 inLen, byte* out, + word32* outLen); + CYASSL_API + int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, + word32* outLen); +#endif + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) + CYASSL_API + int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen); +#endif + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_CODING_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h new file mode 100644 index 00000000..ecf16220 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h @@ -0,0 +1,52 @@ +/* compress.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_LIBZ + +#ifndef CTAO_CRYPT_COMPRESS_H +#define CTAO_CRYPT_COMPRESS_H + + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +#define COMPRESS_FIXED 1 + + +CYASSL_API int Compress(byte*, word32, const byte*, word32, word32); +CYASSL_API int DeCompress(byte*, word32, const byte*, word32); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_COMPRESS_H */ + +#endif /* HAVE_LIBZ */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h new file mode 100644 index 00000000..5a95851d --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h @@ -0,0 +1,137 @@ +/* des3.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_DES3 + +#ifndef CTAO_CRYPT_DES3_H +#define CTAO_CRYPT_DES3_H + + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + +#define CYASSL_3DES_CAVIUM_MAGIC 0xBEEF0003 + +enum { + DES_ENC_TYPE = 2, /* cipher unique type */ + DES3_ENC_TYPE = 3, /* cipher unique type */ + DES_BLOCK_SIZE = 8, + DES_KS_SIZE = 32, + + DES_ENCRYPTION = 0, + DES_DECRYPTION = 1 +}; + +#define DES_IVLEN 8 +#define DES_KEYLEN 8 +#define DES3_IVLEN 8 +#define DES3_KEYLEN 24 + + +#ifdef STM32F2_CRYPTO +enum { + DES_CBC = 0, + DES_ECB = 1 +}; +#endif + + +/* DES encryption and decryption */ +typedef struct Des { + word32 reg[DES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ + word32 tmp[DES_BLOCK_SIZE / sizeof(word32)]; /* same */ +#ifdef HAVE_COLDFIRE_SEC + byte keylen ; /* for Coldfire SEC */ + byte ivlen ; /* for Coldfire SEC */ + byte iv[DES3_IVLEN]; /* for Coldfire SEC */ +#endif + word32 key[DES_KS_SIZE]; +} Des; + + +/* DES3 encryption and decryption */ +typedef struct Des3 { +#ifdef HAVE_COLDFIRE_SEC + byte keylen ; /* for Coldfire SEC */ + byte ivlen ; /* for Coldfire SEC */ + byte iv[DES3_IVLEN]; /* for Coldfire SEC */ +#endif + word32 key[3][DES_KS_SIZE]; + word32 reg[DES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ + word32 tmp[DES_BLOCK_SIZE / sizeof(word32)]; /* same */ +#ifdef HAVE_CAVIUM + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ + word64 contextHandle; /* nitrox context memory handle */ +#endif +} Des3; + + +CYASSL_API int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir); +CYASSL_API void Des_SetIV(Des* des, const byte* iv); +CYASSL_API void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz); +CYASSL_API void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz); +CYASSL_API void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz); + +CYASSL_API int Des3_SetKey(Des3* des, const byte* key, const byte* iv,int dir); +CYASSL_API int Des3_SetIV(Des3* des, const byte* iv); +CYASSL_API int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in,word32 sz); +CYASSL_API int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in,word32 sz); + + +#ifdef HAVE_CAVIUM + CYASSL_API int Des3_InitCavium(Des3*, int); + CYASSL_API void Des3_FreeCavium(Des3*); +#endif + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int Des3_SetKey_fips(Des3* des, const byte* key, const byte* iv, + int dir); + CYASSL_API int Des3_SetIV_fips(Des3* des, const byte* iv); + CYASSL_API int Des3_CbcEncrypt_fips(Des3* des, byte* out, const byte* in, + word32 sz); + CYASSL_API int Des3_CbcDecrypt_fips(Des3* des, byte* out, const byte* in, + word32 sz); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define Des3_SetKey Des3_SetKey_fips + #define Des3_SetIV Des3_SetIV_fips + #define Des3_CbcEncrypt Des3_CbcEncrypt_fips + #define Des3_CbcDecrypt Des3_CbcDecrypt_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* NO_DES3 */ +#endif /* CTAO_CRYPT_DES3_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h new file mode 100644 index 00000000..f700e333 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h @@ -0,0 +1,67 @@ +/* dh.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_DH + +#ifndef CTAO_CRYPT_DH_H +#define CTAO_CRYPT_DH_H + +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Diffie-Hellman Key */ +typedef struct DhKey { + mp_int p, g; /* group parameters */ +} DhKey; + + +CYASSL_API void InitDhKey(DhKey* key); +CYASSL_API void FreeDhKey(DhKey* key); + +CYASSL_API int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, + word32* privSz, byte* pub, word32* pubSz); +CYASSL_API int DhAgree(DhKey* key, byte* agree, word32* agreeSz, + const byte* priv, word32 privSz, const byte* otherPub, + word32 pubSz); + +CYASSL_API int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, + word32); +CYASSL_API int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, + word32 gSz); +CYASSL_API int DhParamsLoad(const byte* input, word32 inSz, byte* p, + word32* pInOutSz, byte* g, word32* gInOutSz); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_DH_H */ + +#endif /* NO_DH */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h new file mode 100644 index 00000000..8bfc3215 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h @@ -0,0 +1,67 @@ +/* dsa.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_DSA + +#ifndef CTAO_CRYPT_DSA_H +#define CTAO_CRYPT_DSA_H + +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + DSA_PUBLIC = 0, + DSA_PRIVATE = 1 +}; + +/* DSA */ +typedef struct DsaKey { + mp_int p, q, g, y, x; + int type; /* public or private */ +} DsaKey; + + +CYASSL_API void InitDsaKey(DsaKey* key); +CYASSL_API void FreeDsaKey(DsaKey* key); + +CYASSL_API int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng); +CYASSL_API int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, + int* answer); + +CYASSL_API int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey*, + word32); +CYASSL_API int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey*, + word32); + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_DSA_H */ +#endif /* NO_DSA */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h new file mode 100644 index 00000000..0c44a4f0 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h @@ -0,0 +1,182 @@ +/* ecc.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_ECC + +#ifndef CTAO_CRYPT_ECC_H +#define CTAO_CRYPT_ECC_H + +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + ECC_PUBLICKEY = 1, + ECC_PRIVATEKEY = 2, + ECC_MAXNAME = 16, /* MAX CURVE NAME LENGTH */ + SIG_HEADER_SZ = 6, /* ECC signature header size */ + ECC_BUFSIZE = 256, /* for exported keys temp buffer */ + ECC_MINSIZE = 20, /* MIN Private Key size */ + ECC_MAXSIZE = 66 /* MAX Private Key size */ +}; + + +/* ECC set type defined a NIST GF(p) curve */ +typedef struct { + int size; /* The size of the curve in octets */ + const char* name; /* name of this curve */ + const char* prime; /* prime that defines the field, curve is in (hex) */ + const char* Bf; /* fields B param (hex) */ + const char* order; /* order of the curve (hex) */ + const char* Gx; /* x coordinate of the base point on curve (hex) */ + const char* Gy; /* y coordinate of the base point on curve (hex) */ +} ecc_set_type; + + +/* A point on an ECC curve, stored in Jacbobian format such that (x,y,z) => + (x/z^2, y/z^3, 1) when interpreted as affine */ +typedef struct { + mp_int x; /* The x coordinate */ + mp_int y; /* The y coordinate */ + mp_int z; /* The z coordinate */ +} ecc_point; + + +/* An ECC Key */ +typedef struct { + int type; /* Public or Private */ + int idx; /* Index into the ecc_sets[] for the parameters of + this curve if -1, this key is using user supplied + curve in dp */ + const ecc_set_type* dp; /* domain parameters, either points to NIST + curves (idx >= 0) or user supplied */ + ecc_point pubkey; /* public key */ + mp_int k; /* private key */ +} ecc_key; + + +/* ECC predefined curve sets */ +extern const ecc_set_type ecc_sets[]; + + +CYASSL_API +int ecc_make_key(RNG* rng, int keysize, ecc_key* key); +CYASSL_API +int ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, + word32* outlen); +CYASSL_API +int ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen, + RNG* rng, ecc_key* key); +CYASSL_API +int ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash, + word32 hashlen, int* stat, ecc_key* key); +CYASSL_API +void ecc_init(ecc_key* key); +CYASSL_API +void ecc_free(ecc_key* key); +CYASSL_API +void ecc_fp_free(void); + + +/* ASN key helpers */ +CYASSL_API +int ecc_export_x963(ecc_key*, byte* out, word32* outLen); +CYASSL_API +int ecc_import_x963(const byte* in, word32 inLen, ecc_key* key); +CYASSL_API +int ecc_import_private_key(const byte* priv, word32 privSz, const byte* pub, + word32 pubSz, ecc_key* key); +CYASSL_API +int ecc_export_private_only(ecc_key* key, byte* out, word32* outLen); + +/* size helper */ +CYASSL_API +int ecc_size(ecc_key* key); +CYASSL_API +int ecc_sig_size(ecc_key* key); + + +#ifdef HAVE_ECC_ENCRYPT +/* ecc encrypt */ + +enum ecEncAlgo { + ecAES_128_CBC = 1, /* default */ + ecAES_256_CBC = 2 +}; + +enum ecKdfAlgo { + ecHKDF_SHA256 = 1, /* default */ + ecHKDF_SHA1 = 2 +}; + +enum ecMacAlgo { + ecHMAC_SHA256 = 1, /* default */ + ecHMAC_SHA1 = 2 +}; + +enum { + KEY_SIZE_128 = 16, + KEY_SIZE_256 = 32, + IV_SIZE_64 = 8, + EXCHANGE_SALT_SZ = 16, + EXCHANGE_INFO_SZ = 23 +}; + +enum ecFlags { + REQ_RESP_CLIENT = 1, + REQ_RESP_SERVER = 2 +}; + + +typedef struct ecEncCtx ecEncCtx; + +CYASSL_API +ecEncCtx* ecc_ctx_new(int flags, RNG* rng); +CYASSL_API +void ecc_ctx_free(ecEncCtx*); +CYASSL_API +int ecc_ctx_reset(ecEncCtx*, RNG*); /* reset for use again w/o alloc/free */ + +CYASSL_API +const byte* ecc_ctx_get_own_salt(ecEncCtx*); +CYASSL_API +int ecc_ctx_set_peer_salt(ecEncCtx*, const byte* salt); + +CYASSL_API +int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, + word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx); +CYASSL_API +int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, + word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx); + +#endif /* HAVE_ECC_ENCRYPT */ + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_ECC_H */ +#endif /* HAVE_ECC */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h new file mode 100644 index 00000000..113d2d73 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h @@ -0,0 +1,141 @@ +/* error-crypt.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_ERROR_H +#define CTAO_CRYPT_ERROR_H + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +/* error codes */ +enum { + MAX_CODE_E = -100, /* errors -101 - -199 */ + OPEN_RAN_E = -101, /* opening random device error */ + READ_RAN_E = -102, /* reading random device error */ + WINCRYPT_E = -103, /* windows crypt init error */ + CRYPTGEN_E = -104, /* windows crypt generation error */ + RAN_BLOCK_E = -105, /* reading random device would block */ + BAD_MUTEX_E = -106, /* Bad mutex operation */ + + MP_INIT_E = -110, /* mp_init error state */ + MP_READ_E = -111, /* mp_read error state */ + MP_EXPTMOD_E = -112, /* mp_exptmod error state */ + MP_TO_E = -113, /* mp_to_xxx error state, can't convert */ + MP_SUB_E = -114, /* mp_sub error state, can't subtract */ + MP_ADD_E = -115, /* mp_add error state, can't add */ + MP_MUL_E = -116, /* mp_mul error state, can't multiply */ + MP_MULMOD_E = -117, /* mp_mulmod error state, can't multiply mod */ + MP_MOD_E = -118, /* mp_mod error state, can't mod */ + MP_INVMOD_E = -119, /* mp_invmod error state, can't inv mod */ + MP_CMP_E = -120, /* mp_cmp error state */ + MP_ZERO_E = -121, /* got a mp zero result, not expected */ + + MEMORY_E = -125, /* out of memory error */ + + RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */ + RSA_BUFFER_E = -131, /* RSA buffer error, output too small or + input too large */ + BUFFER_E = -132, /* output buffer too small or input too large */ + ALGO_ID_E = -133, /* setting algo id error */ + PUBLIC_KEY_E = -134, /* setting public key error */ + DATE_E = -135, /* setting date validity error */ + SUBJECT_E = -136, /* setting subject name error */ + ISSUER_E = -137, /* setting issuer name error */ + CA_TRUE_E = -138, /* setting CA basic constraint true error */ + EXTENSIONS_E = -139, /* setting extensions error */ + + ASN_PARSE_E = -140, /* ASN parsing error, invalid input */ + ASN_VERSION_E = -141, /* ASN version error, invalid number */ + ASN_GETINT_E = -142, /* ASN get big int error, invalid data */ + ASN_RSA_KEY_E = -143, /* ASN key init error, invalid input */ + ASN_OBJECT_ID_E = -144, /* ASN object id error, invalid id */ + ASN_TAG_NULL_E = -145, /* ASN tag error, not null */ + ASN_EXPECT_0_E = -146, /* ASN expect error, not zero */ + ASN_BITSTR_E = -147, /* ASN bit string error, wrong id */ + ASN_UNKNOWN_OID_E = -148, /* ASN oid error, unknown sum id */ + ASN_DATE_SZ_E = -149, /* ASN date error, bad size */ + ASN_BEFORE_DATE_E = -150, /* ASN date error, current date before */ + ASN_AFTER_DATE_E = -151, /* ASN date error, current date after */ + ASN_SIG_OID_E = -152, /* ASN signature error, mismatched oid */ + ASN_TIME_E = -153, /* ASN time error, unknown time type */ + ASN_INPUT_E = -154, /* ASN input error, not enough data */ + ASN_SIG_CONFIRM_E = -155, /* ASN sig error, confirm failure */ + ASN_SIG_HASH_E = -156, /* ASN sig error, unsupported hash type */ + ASN_SIG_KEY_E = -157, /* ASN sig error, unsupported key type */ + ASN_DH_KEY_E = -158, /* ASN key init error, invalid input */ + ASN_NTRU_KEY_E = -159, /* ASN ntru key decode error, invalid input */ + ASN_CRIT_EXT_E = -160, /* ASN unsupported critical extension */ + + ECC_BAD_ARG_E = -170, /* ECC input argument of wrong type */ + ASN_ECC_KEY_E = -171, /* ASN ECC bad input */ + ECC_CURVE_OID_E = -172, /* Unsupported ECC OID curve type */ + BAD_FUNC_ARG = -173, /* Bad function argument provided */ + NOT_COMPILED_IN = -174, /* Feature not compiled in */ + UNICODE_SIZE_E = -175, /* Unicode password too big */ + NO_PASSWORD = -176, /* no password provided by user */ + ALT_NAME_E = -177, /* alt name size problem, too big */ + + AES_GCM_AUTH_E = -180, /* AES-GCM Authentication check failure */ + AES_CCM_AUTH_E = -181, /* AES-CCM Authentication check failure */ + + CAVIUM_INIT_E = -182, /* Cavium Init type error */ + + COMPRESS_INIT_E = -183, /* Compress init error */ + COMPRESS_E = -184, /* Compress error */ + DECOMPRESS_INIT_E = -185, /* DeCompress init error */ + DECOMPRESS_E = -186, /* DeCompress error */ + + BAD_ALIGN_E = -187, /* Bad alignment for operation, no alloc */ + ASN_NO_SIGNER_E = -188, /* ASN no signer to confirm failure */ + ASN_CRL_CONFIRM_E = -189, /* ASN CRL signature confirm failure */ + ASN_CRL_NO_SIGNER_E = -190, /* ASN CRL no signer to confirm failure */ + ASN_OCSP_CONFIRM_E = -191, /* ASN OCSP signature confirm failure */ + + BAD_ENC_STATE_E = -192, /* Bad ecc enc state operation */ + BAD_PADDING_E = -193, /* Bad padding, msg not correct length */ + + REQ_ATTRIBUTE_E = -194, /* setting cert request attributes error */ + + PKCS7_OID_E = -195, /* PKCS#7, mismatched OID error */ + PKCS7_RECIP_E = -196, /* PKCS#7, recipient error */ + FIPS_NOT_ALLOWED_E = -197, /* FIPS not allowed error */ + ASN_NAME_INVALID_E = -198, /* ASN name constraint error */ + + MIN_CODE_E = -200 /* errors -101 - -199 */ +}; + + +CYASSL_API void CTaoCryptErrorString(int err, char* buff); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_ERROR_H */ + + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h new file mode 100644 index 00000000..2015927c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h @@ -0,0 +1,43 @@ +/* fips_test.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_FIPS_TEST_H +#define CTAO_CRYPT_FIPS_TEST_H + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + +/* Known Answer Test string inputs are hex */ + +CYASSL_LOCAL int DoKnownAnswerTests(void); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_FIPS_TEST_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h new file mode 100644 index 00000000..766a79b2 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h @@ -0,0 +1,60 @@ +/* hc128.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_HC128 + +#ifndef CTAO_CRYPT_HC128_H +#define CTAO_CRYPT_HC128_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + HC128_ENC_TYPE = 6 /* cipher unique type */ +}; + +/* HC-128 stream cipher */ +typedef struct HC128 { + word32 T[1024]; /* P[i] = T[i]; Q[i] = T[1024 + i ]; */ + word32 X[16]; + word32 Y[16]; + word32 counter1024; /* counter1024 = i mod 1024 at the ith step */ + word32 key[8]; + word32 iv[8]; +} HC128; + + +CYASSL_API int Hc128_Process(HC128*, byte*, const byte*, word32); +CYASSL_API int Hc128_SetKey(HC128*, const byte* key, const byte* iv); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_HC128_H */ + +#endif /* HAVE_HC128 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h new file mode 100644 index 00000000..68627efc --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h @@ -0,0 +1,199 @@ +/* hmac.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_HMAC + +#ifndef CTAO_CRYPT_HMAC_H +#define CTAO_CRYPT_HMAC_H + +#include + +#ifndef NO_MD5 + #include +#endif + +#ifndef NO_SHA + #include +#endif + +#ifndef NO_SHA256 + #include +#endif + +#ifdef CYASSL_SHA512 + #include +#endif + +#ifdef HAVE_BLAKE2 + #include +#endif + +#ifdef HAVE_CAVIUM + #include + #include "cavium_common.h" +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +#define CYASSL_HMAC_CAVIUM_MAGIC 0xBEEF0005 + +enum { + IPAD = 0x36, + OPAD = 0x5C, + +/* If any hash is not enabled, add the ID here. */ +#ifdef NO_MD5 + MD5 = 0, +#endif +#ifdef NO_SHA + SHA = 1, +#endif +#ifdef NO_SHA256 + SHA256 = 2, +#endif +#ifndef CYASSL_SHA512 + SHA512 = 4, +#endif +#ifndef CYASSL_SHA384 + SHA384 = 5, +#endif +#ifndef HAVE_BLAKE2 + BLAKE2B_ID = 7, +#endif + +/* Select the largest available hash for the buffer size. */ +#if defined(CYASSL_SHA512) + MAX_DIGEST_SIZE = SHA512_DIGEST_SIZE, + HMAC_BLOCK_SIZE = SHA512_BLOCK_SIZE +#elif defined(HAVE_BLAKE2) + MAX_DIGEST_SIZE = BLAKE2B_OUTBYTES, + HMAC_BLOCK_SIZE = BLAKE2B_BLOCKBYTES, +#elif defined(CYASSL_SHA384) + MAX_DIGEST_SIZE = SHA384_DIGEST_SIZE, + HMAC_BLOCK_SIZE = SHA384_BLOCK_SIZE +#elif !defined(NO_SHA256) + MAX_DIGEST_SIZE = SHA256_DIGEST_SIZE, + HMAC_BLOCK_SIZE = SHA256_BLOCK_SIZE +#elif !defined(NO_SHA) + MAX_DIGEST_SIZE = SHA_DIGEST_SIZE, + HMAC_BLOCK_SIZE = SHA_BLOCK_SIZE +#elif !defined(NO_MD5) + MAX_DIGEST_SIZE = MD5_DIGEST_SIZE, + HMAC_BLOCK_SIZE = MD5_BLOCK_SIZE +#else + #error "You have to have some kind of hash if you want to use HMAC." +#endif +}; + + +/* hash union */ +typedef union { + #ifndef NO_MD5 + Md5 md5; + #endif + #ifndef NO_SHA + Sha sha; + #endif + #ifndef NO_SHA256 + Sha256 sha256; + #endif + #ifdef CYASSL_SHA384 + Sha384 sha384; + #endif + #ifdef CYASSL_SHA512 + Sha512 sha512; + #endif + #ifdef HAVE_BLAKE2 + Blake2b blake2b; + #endif +} Hash; + +/* Hmac digest */ +typedef struct Hmac { + Hash hash; + word32 ipad[HMAC_BLOCK_SIZE / sizeof(word32)]; /* same block size all*/ + word32 opad[HMAC_BLOCK_SIZE / sizeof(word32)]; + word32 innerHash[MAX_DIGEST_SIZE / sizeof(word32)]; + byte macType; /* md5 sha or sha256 */ + byte innerHashKeyed; /* keyed flag */ +#ifdef HAVE_CAVIUM + word16 keyLen; /* hmac key length */ + word16 dataLen; + HashType type; /* hmac key type */ + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ + word64 contextHandle; /* nitrox context memory handle */ + byte* data; /* buffered input data for one call */ +#endif +} Hmac; + + +/* does init */ +CYASSL_API int HmacSetKey(Hmac*, int type, const byte* key, word32 keySz); +CYASSL_API int HmacUpdate(Hmac*, const byte*, word32); +CYASSL_API int HmacFinal(Hmac*, byte*); + +#ifdef HAVE_CAVIUM + CYASSL_API int HmacInitCavium(Hmac*, int); + CYASSL_API void HmacFreeCavium(Hmac*); +#endif + +CYASSL_API int CyaSSL_GetHmacMaxSize(void); + + +#ifdef HAVE_HKDF + +CYASSL_API int HKDF(int type, const byte* inKey, word32 inKeySz, + const byte* salt, word32 saltSz, + const byte* info, word32 infoSz, + byte* out, word32 outSz); + +#endif /* HAVE_HKDF */ + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int HmacSetKey_fips(Hmac*, int type, const byte* key, + word32 keySz); + CYASSL_API int HmacUpdate_fips(Hmac*, const byte*, word32); + CYASSL_API int HmacFinal_fips(Hmac*, byte*); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define HmacSetKey HmacSetKey_fips + #define HmacUpdate HmacUpdate_fips + #define HmacFinal HmacFinal_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_HMAC_H */ + +#endif /* NO_HMAC */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am b/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am new file mode 100644 index 00000000..8165af42 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am @@ -0,0 +1,45 @@ +# vim:ft=automake +# All paths should be given relative to the root + +nobase_include_HEADERS+= \ + cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/camellia.h \ + cyassl/ctaocrypt/coding.h \ + cyassl/ctaocrypt/compress.h \ + cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/dh.h \ + cyassl/ctaocrypt/dsa.h \ + cyassl/ctaocrypt/ecc.h \ + cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/fips_test.h \ + cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/integer.h \ + cyassl/ctaocrypt/md2.h \ + cyassl/ctaocrypt/md4.h \ + cyassl/ctaocrypt/md5.h \ + cyassl/ctaocrypt/misc.h \ + cyassl/ctaocrypt/pkcs7.h \ + cyassl/ctaocrypt/port.h \ + cyassl/ctaocrypt/pwdbased.h \ + cyassl/ctaocrypt/rabbit.h \ + cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/ripemd.h \ + cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/settings.h \ + cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/sha512.h \ + cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/blake2.h \ + cyassl/ctaocrypt/blake2-int.h \ + cyassl/ctaocrypt/blake2-impl.h \ + cyassl/ctaocrypt/tfm.h \ + cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/visibility.h \ + cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/memory.h \ + cyassl/ctaocrypt/mpi_class.h \ + cyassl/ctaocrypt/mpi_superclass.h diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h new file mode 100644 index 00000000..8f20f901 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h @@ -0,0 +1,317 @@ +/* integer.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* + * Based on public domain LibTomMath 0.38 by Tom St Denis, tomstdenis@iahu.ca, + * http://math.libtomcrypt.com + */ + + +#ifndef CTAO_CRYPT_INTEGER_H +#define CTAO_CRYPT_INTEGER_H + +/* may optionally use fast math instead, not yet supported on all platforms and + may not be faster on all +*/ +#include /* will set MP_xxBIT if not default */ +#ifdef USE_FAST_MATH + #include +#else + +#ifndef CHAR_BIT + #include +#endif + +#include + +#ifndef MIN + #define MIN(x,y) ((x)<(y)?(x):(y)) +#endif + +#ifndef MAX + #define MAX(x,y) ((x)>(y)?(x):(y)) +#endif + +#ifdef __cplusplus +extern "C" { + +/* C++ compilers don't like assigning void * to mp_digit * */ +#define OPT_CAST(x) (x *) + +#else + +/* C on the other hand doesn't care */ +#define OPT_CAST(x) + +#endif + + +/* detect 64-bit mode if possible */ +#if defined(__x86_64__) + #if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) + #define MP_64BIT + #endif +#endif + +/* some default configurations. + * + * A "mp_digit" must be able to hold DIGIT_BIT + 1 bits + * A "mp_word" must be able to hold 2*DIGIT_BIT + 1 bits + * + * At the very least a mp_digit must be able to hold 7 bits + * [any size beyond that is ok provided it doesn't overflow the data type] + */ +#ifdef MP_8BIT + typedef unsigned char mp_digit; + typedef unsigned short mp_word; +#elif defined(MP_16BIT) || defined(NO_64BIT) + typedef unsigned short mp_digit; + typedef unsigned int mp_word; +#elif defined(MP_64BIT) + /* for GCC only on supported platforms */ + typedef unsigned long long mp_digit; /* 64 bit type, 128 uses mode(TI) */ + typedef unsigned long mp_word __attribute__ ((mode(TI))); + + #define DIGIT_BIT 60 +#else + /* this is the default case, 28-bit digits */ + + #if defined(_MSC_VER) || defined(__BORLANDC__) + typedef unsigned __int64 ulong64; + #else + typedef unsigned long long ulong64; + #endif + + typedef unsigned int mp_digit; /* long could be 64 now, changed TAO */ + typedef ulong64 mp_word; + +#ifdef MP_31BIT + /* this is an extension that uses 31-bit digits */ + #define DIGIT_BIT 31 +#else + /* default case is 28-bit digits, defines MP_28BIT as a handy test macro */ + #define DIGIT_BIT 28 + #define MP_28BIT +#endif +#endif + + +/* otherwise the bits per digit is calculated automatically from the size of + a mp_digit */ +#ifndef DIGIT_BIT + #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) + /* bits per digit */ +#endif + +#define MP_DIGIT_BIT DIGIT_BIT +#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1)) +#define MP_DIGIT_MAX MP_MASK + +/* equalities */ +#define MP_LT -1 /* less than */ +#define MP_EQ 0 /* equal to */ +#define MP_GT 1 /* greater than */ + +#define MP_ZPOS 0 /* positive integer */ +#define MP_NEG 1 /* negative */ + +#define MP_OKAY 0 /* ok result */ +#define MP_MEM -2 /* out of mem */ +#define MP_VAL -3 /* invalid input */ +#define MP_RANGE MP_VAL + +#define MP_YES 1 /* yes response */ +#define MP_NO 0 /* no response */ + +/* Primality generation flags */ +#define LTM_PRIME_BBS 0x0001 /* BBS style prime */ +#define LTM_PRIME_SAFE 0x0002 /* Safe prime (p-1)/2 == prime */ +#define LTM_PRIME_2MSB_ON 0x0008 /* force 2nd MSB to 1 */ + +typedef int mp_err; + +/* define this to use lower memory usage routines (exptmods mostly) */ +#define MP_LOW_MEM + +/* default precision */ +#ifndef MP_PREC + #ifndef MP_LOW_MEM + #define MP_PREC 32 /* default digits of precision */ + #else + #define MP_PREC 1 /* default digits of precision */ + #endif +#endif + +/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - + BITS_PER_DIGIT*2) */ +#define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1)) + +/* the infamous mp_int structure */ +typedef struct { + int used, alloc, sign; + mp_digit *dp; +} mp_int; + +/* callback for mp_prime_random, should fill dst with random bytes and return + how many read [upto len] */ +typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat); + + +#define USED(m) ((m)->used) +#define DIGIT(m,k) ((m)->dp[(k)]) +#define SIGN(m) ((m)->sign) + + +/* ---> Basic Manipulations <--- */ +#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO) +#define mp_iseven(a) \ + (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO) +#define mp_isodd(a) \ + (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO) + + +/* number of primes */ +#ifdef MP_8BIT + #define PRIME_SIZE 31 +#else + #define PRIME_SIZE 256 +#endif + +#define mp_prime_random(a, t, size, bbs, cb, dat) \ + mp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?LTM_PRIME_BBS:0, cb, dat) + +#define mp_read_raw(mp, str, len) mp_read_signed_bin((mp), (str), (len)) +#define mp_raw_size(mp) mp_signed_bin_size(mp) +#define mp_toraw(mp, str) mp_to_signed_bin((mp), (str)) +#define mp_read_mag(mp, str, len) mp_read_unsigned_bin((mp), (str), (len)) +#define mp_mag_size(mp) mp_unsigned_bin_size(mp) +#define mp_tomag(mp, str) mp_to_unsigned_bin((mp), (str)) + +#define mp_tobinary(M, S) mp_toradix((M), (S), 2) +#define mp_tooctal(M, S) mp_toradix((M), (S), 8) +#define mp_todecimal(M, S) mp_toradix((M), (S), 10) +#define mp_tohex(M, S) mp_toradix((M), (S), 16) + +#define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) + +extern const char *mp_s_rmap; + +/* 6 functions needed by Rsa */ +int mp_init (mp_int * a); +void mp_clear (mp_int * a); +int mp_unsigned_bin_size(mp_int * a); +int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c); +int mp_to_unsigned_bin (mp_int * a, unsigned char *b); +int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y); +/* end functions needed by Rsa */ + +/* functions added to support above needed, removed TOOM and KARATSUBA */ +int mp_count_bits (mp_int * a); +int mp_leading_bit (mp_int * a); +int mp_init_copy (mp_int * a, mp_int * b); +int mp_copy (mp_int * a, mp_int * b); +int mp_grow (mp_int * a, int size); +int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d); +void mp_zero (mp_int * a); +void mp_clamp (mp_int * a); +void mp_exch (mp_int * a, mp_int * b); +void mp_rshd (mp_int * a, int b); +void mp_rshb (mp_int * a, int b); +int mp_mod_2d (mp_int * a, int b, mp_int * c); +int mp_mul_2d (mp_int * a, int b, mp_int * c); +int mp_lshd (mp_int * a, int b); +int mp_abs (mp_int * a, mp_int * b); +int mp_invmod (mp_int * a, mp_int * b, mp_int * c); +int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c); +int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c); +int mp_cmp_mag (mp_int * a, mp_int * b); +int mp_cmp (mp_int * a, mp_int * b); +int mp_cmp_d(mp_int * a, mp_digit b); +void mp_set (mp_int * a, mp_digit b); +int mp_mod (mp_int * a, mp_int * b, mp_int * c); +int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d); +int mp_div_2(mp_int * a, mp_int * b); +int mp_add (mp_int * a, mp_int * b, mp_int * c); +int s_mp_add (mp_int * a, mp_int * b, mp_int * c); +int s_mp_sub (mp_int * a, mp_int * b, mp_int * c); +int mp_sub (mp_int * a, mp_int * b, mp_int * c); +int mp_reduce_is_2k_l(mp_int *a); +int mp_reduce_is_2k(mp_int *a); +int mp_dr_is_modulus(mp_int *a); +int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int); +int mp_montgomery_setup (mp_int * n, mp_digit * rho); +int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); +int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); +void mp_dr_setup(mp_int *a, mp_digit *d); +int mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k); +int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d); +int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs); +int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs); +int mp_reduce_2k_setup_l(mp_int *a, mp_int *d); +int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d); +int mp_reduce (mp_int * x, mp_int * m, mp_int * mu); +int mp_reduce_setup (mp_int * a, mp_int * b); +int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode); +int mp_montgomery_calc_normalization (mp_int * a, mp_int * b); +int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs); +int s_mp_sqr (mp_int * a, mp_int * b); +int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs); +int fast_s_mp_sqr (mp_int * a, mp_int * b); +int mp_init_size (mp_int * a, int size); +int mp_div_3 (mp_int * a, mp_int *c, mp_digit * d); +int mp_mul_2(mp_int * a, mp_int * b); +int mp_mul (mp_int * a, mp_int * b, mp_int * c); +int mp_sqr (mp_int * a, mp_int * b); +int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d); +int mp_mul_d (mp_int * a, mp_digit b, mp_int * c); +int mp_2expt (mp_int * a, int b); +int mp_reduce_2k_setup(mp_int *a, mp_digit *d); +int mp_add_d (mp_int* a, mp_digit b, mp_int* c); +int mp_set_int (mp_int * a, unsigned long b); +int mp_sub_d (mp_int * a, mp_digit b, mp_int * c); +/* end support added functions */ + +/* added */ +int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, + mp_int* f); + +#if defined(HAVE_ECC) || defined(CYASSL_KEY_GEN) + int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c); +#endif +#ifdef HAVE_ECC + int mp_read_radix(mp_int* a, const char* str, int radix); +#endif + +#ifdef CYASSL_KEY_GEN + int mp_prime_is_prime (mp_int * a, int t, int *result); + int mp_gcd (mp_int * a, mp_int * b, mp_int * c); + int mp_lcm (mp_int * a, mp_int * b, mp_int * c); +#endif + +#ifdef __cplusplus + } +#endif + + +#endif /* USE_FAST_MATH */ + +#endif /* CTAO_CRYPT_INTEGER_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h new file mode 100644 index 00000000..a361e8cc --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h @@ -0,0 +1,70 @@ +/* logging.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* submitted by eof */ + + +#ifndef CYASSL_LOGGING_H +#define CYASSL_LOGGING_H + + +#ifdef __cplusplus + extern "C" { +#endif + + +enum CYA_Log_Levels { + ERROR_LOG = 0, + INFO_LOG, + ENTER_LOG, + LEAVE_LOG, + OTHER_LOG +}; + +typedef void (*CyaSSL_Logging_cb)(const int logLevel, + const char *const logMessage); + +CYASSL_API int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb log_function); + + +#ifdef DEBUG_CYASSL + + void CYASSL_ENTER(const char* msg); + void CYASSL_LEAVE(const char* msg, int ret); + + void CYASSL_ERROR(int); + void CYASSL_MSG(const char* msg); + +#else /* DEBUG_CYASSL */ + + #define CYASSL_ENTER(m) + #define CYASSL_LEAVE(m, r) + + #define CYASSL_ERROR(e) + #define CYASSL_MSG(m) + +#endif /* DEBUG_CYASSL */ + +#ifdef __cplusplus +} +#endif + +#endif /* CYASSL_MEMORY_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h new file mode 100644 index 00000000..0b99c43b --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h @@ -0,0 +1,64 @@ +/* md2.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef CYASSL_MD2 + +#ifndef CTAO_CRYPT_MD2_H +#define CTAO_CRYPT_MD2_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { + MD2 = 6, /* hash type unique */ + MD2_BLOCK_SIZE = 16, + MD2_DIGEST_SIZE = 16, + MD2_PAD_SIZE = 16, + MD2_X_SIZE = 48 +}; + + +/* Md2 digest */ +typedef struct Md2 { + word32 count; /* bytes % PAD_SIZE */ + byte X[MD2_X_SIZE]; + byte C[MD2_BLOCK_SIZE]; + byte buffer[MD2_BLOCK_SIZE]; +} Md2; + + +CYASSL_API void InitMd2(Md2*); +CYASSL_API void Md2Update(Md2*, const byte*, word32); +CYASSL_API void Md2Final(Md2*, byte*); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_MD2_H */ +#endif /* CYASSL_MD2 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h new file mode 100644 index 00000000..eb5ebb5a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h @@ -0,0 +1,65 @@ +/* md4.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_MD4 + +#ifndef CTAO_CRYPT_MD4_H +#define CTAO_CRYPT_MD4_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { + MD4_BLOCK_SIZE = 64, + MD4_DIGEST_SIZE = 16, + MD4_PAD_SIZE = 56 +}; + + +/* MD4 digest */ +typedef struct Md4 { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word32 digest[MD4_DIGEST_SIZE / sizeof(word32)]; + word32 buffer[MD4_BLOCK_SIZE / sizeof(word32)]; +} Md4; + + +CYASSL_API void InitMd4(Md4*); +CYASSL_API void Md4Update(Md4*, const byte*, word32); +CYASSL_API void Md4Final(Md4*, byte*); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_MD4_H */ + +#endif /* NO_MD4 */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h new file mode 100644 index 00000000..418d7b14 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h @@ -0,0 +1,72 @@ +/* md5.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifndef NO_MD5 + +#ifndef CTAO_CRYPT_MD5_H +#define CTAO_CRYPT_MD5_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { +#ifdef STM32F2_HASH + MD5_REG_SIZE = 4, /* STM32 register size, bytes */ +#endif + MD5 = 0, /* hash type unique */ + MD5_BLOCK_SIZE = 64, + MD5_DIGEST_SIZE = 16, + MD5_PAD_SIZE = 56 +}; + +#ifdef CYASSL_PIC32MZ_HASH +#include "port/pic32/pic32mz-crypt.h" +#endif + +/* MD5 digest */ +typedef struct Md5 { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)]; + #ifndef CYASSL_PIC32MZ_HASH + word32 digest[MD5_DIGEST_SIZE / sizeof(word32)]; + #else + word32 digest[PIC32_HASH_SIZE / sizeof(word32)]; + pic32mz_desc desc ; /* Crypt Engine descripter */ + #endif +} Md5; + +CYASSL_API void InitMd5(Md5*); +CYASSL_API void Md5Update(Md5*, const byte*, word32); +CYASSL_API void Md5Final(Md5*, byte*); + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_MD5_H */ +#endif /* NO_MD5 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h new file mode 100644 index 00000000..20e98a39 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h @@ -0,0 +1,55 @@ +/* memory.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* submitted by eof */ + + +#ifndef CYASSL_MEMORY_H +#define CYASSL_MEMORY_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef void *(*CyaSSL_Malloc_cb)(size_t size); +typedef void (*CyaSSL_Free_cb)(void *ptr); +typedef void *(*CyaSSL_Realloc_cb)(void *ptr, size_t size); + + +/* Public set function */ +CYASSL_API int CyaSSL_SetAllocators(CyaSSL_Malloc_cb malloc_function, + CyaSSL_Free_cb free_function, + CyaSSL_Realloc_cb realloc_function); + +/* Public in case user app wants to use XMALLOC/XFREE */ +CYASSL_API void* CyaSSL_Malloc(size_t size); +CYASSL_API void CyaSSL_Free(void *ptr); +CYASSL_API void* CyaSSL_Realloc(void *ptr, size_t size); + + +#ifdef __cplusplus +} +#endif + +#endif /* CYASSL_MEMORY_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h new file mode 100644 index 00000000..c55f50bd --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h @@ -0,0 +1,72 @@ +/* misc.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_MISC_H +#define CTAO_CRYPT_MISC_H + + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef NO_INLINE +CYASSL_LOCAL +word32 rotlFixed(word32, word32); +CYASSL_LOCAL +word32 rotrFixed(word32, word32); + +CYASSL_LOCAL +word32 ByteReverseWord32(word32); +CYASSL_LOCAL +void ByteReverseWords(word32*, const word32*, word32); + +CYASSL_LOCAL +void XorWords(word*, const word*, word32); +CYASSL_LOCAL +void xorbuf(void*, const void*, word32); + +#ifdef WORD64_AVAILABLE +CYASSL_LOCAL +word64 rotlFixed64(word64, word64); +CYASSL_LOCAL +word64 rotrFixed64(word64, word64); + +CYASSL_LOCAL +word64 ByteReverseWord64(word64); +CYASSL_LOCAL +void ByteReverseWords64(word64*, const word64*, word32); +#endif /* WORD64_AVAILABLE */ + +#endif /* NO_INLINE */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_MISC_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h new file mode 100644 index 00000000..50ad757f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h @@ -0,0 +1,1018 @@ +/* mpi_class.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#if !(defined(LTM1) && defined(LTM2) && defined(LTM3)) +#if defined(LTM2) +#define LTM3 +#endif +#if defined(LTM1) +#define LTM2 +#endif +#define LTM1 + +#if defined(LTM_ALL) +#define BN_ERROR_C +#define BN_FAST_MP_INVMOD_C +#define BN_FAST_MP_MONTGOMERY_REDUCE_C +#define BN_FAST_S_MP_MUL_DIGS_C +#define BN_FAST_S_MP_MUL_HIGH_DIGS_C +#define BN_FAST_S_MP_SQR_C +#define BN_MP_2EXPT_C +#define BN_MP_ABS_C +#define BN_MP_ADD_C +#define BN_MP_ADD_D_C +#define BN_MP_ADDMOD_C +#define BN_MP_AND_C +#define BN_MP_CLAMP_C +#define BN_MP_CLEAR_C +#define BN_MP_CLEAR_MULTI_C +#define BN_MP_CMP_C +#define BN_MP_CMP_D_C +#define BN_MP_CMP_MAG_C +#define BN_MP_CNT_LSB_C +#define BN_MP_COPY_C +#define BN_MP_COUNT_BITS_C +#define BN_MP_DIV_C +#define BN_MP_DIV_2_C +#define BN_MP_DIV_2D_C +#define BN_MP_DIV_3_C +#define BN_MP_DIV_D_C +#define BN_MP_DR_IS_MODULUS_C +#define BN_MP_DR_REDUCE_C +#define BN_MP_DR_SETUP_C +#define BN_MP_EXCH_C +#define BN_MP_EXPT_D_C +#define BN_MP_EXPTMOD_C +#define BN_MP_EXPTMOD_FAST_C +#define BN_MP_EXTEUCLID_C +#define BN_MP_FREAD_C +#define BN_MP_FWRITE_C +#define BN_MP_GCD_C +#define BN_MP_GET_INT_C +#define BN_MP_GROW_C +#define BN_MP_INIT_C +#define BN_MP_INIT_COPY_C +#define BN_MP_INIT_MULTI_C +#define BN_MP_INIT_SET_C +#define BN_MP_INIT_SET_INT_C +#define BN_MP_INIT_SIZE_C +#define BN_MP_INVMOD_C +#define BN_MP_INVMOD_SLOW_C +#define BN_MP_IS_SQUARE_C +#define BN_MP_JACOBI_C +#define BN_MP_KARATSUBA_MUL_C +#define BN_MP_KARATSUBA_SQR_C +#define BN_MP_LCM_C +#define BN_MP_LSHD_C +#define BN_MP_MOD_C +#define BN_MP_MOD_2D_C +#define BN_MP_MOD_D_C +#define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C +#define BN_MP_MONTGOMERY_REDUCE_C +#define BN_MP_MONTGOMERY_SETUP_C +#define BN_MP_MUL_C +#define BN_MP_MUL_2_C +#define BN_MP_MUL_2D_C +#define BN_MP_MUL_D_C +#define BN_MP_MULMOD_C +#define BN_MP_N_ROOT_C +#define BN_MP_NEG_C +#define BN_MP_OR_C +#define BN_MP_PRIME_FERMAT_C +#define BN_MP_PRIME_IS_DIVISIBLE_C +#define BN_MP_PRIME_IS_PRIME_C +#define BN_MP_PRIME_MILLER_RABIN_C +#define BN_MP_PRIME_NEXT_PRIME_C +#define BN_MP_PRIME_RABIN_MILLER_TRIALS_C +#define BN_MP_PRIME_RANDOM_EX_C +#define BN_MP_RADIX_SIZE_C +#define BN_MP_RADIX_SMAP_C +#define BN_MP_RAND_C +#define BN_MP_READ_RADIX_C +#define BN_MP_READ_SIGNED_BIN_C +#define BN_MP_READ_UNSIGNED_BIN_C +#define BN_MP_REDUCE_C +#define BN_MP_REDUCE_2K_C +#define BN_MP_REDUCE_2K_L_C +#define BN_MP_REDUCE_2K_SETUP_C +#define BN_MP_REDUCE_2K_SETUP_L_C +#define BN_MP_REDUCE_IS_2K_C +#define BN_MP_REDUCE_IS_2K_L_C +#define BN_MP_REDUCE_SETUP_C +#define BN_MP_RSHD_C +#define BN_MP_SET_C +#define BN_MP_SET_INT_C +#define BN_MP_SHRINK_C +#define BN_MP_SIGNED_BIN_SIZE_C +#define BN_MP_SQR_C +#define BN_MP_SQRMOD_C +#define BN_MP_SQRT_C +#define BN_MP_SUB_C +#define BN_MP_SUB_D_C +#define BN_MP_SUBMOD_C +#define BN_MP_TO_SIGNED_BIN_C +#define BN_MP_TO_SIGNED_BIN_N_C +#define BN_MP_TO_UNSIGNED_BIN_C +#define BN_MP_TO_UNSIGNED_BIN_N_C +#define BN_MP_TOOM_MUL_C +#define BN_MP_TOOM_SQR_C +#define BN_MP_TORADIX_C +#define BN_MP_TORADIX_N_C +#define BN_MP_UNSIGNED_BIN_SIZE_C +#define BN_MP_XOR_C +#define BN_MP_ZERO_C +#define BN_PRIME_TAB_C +#define BN_REVERSE_C +#define BN_S_MP_ADD_C +#define BN_S_MP_EXPTMOD_C +#define BN_S_MP_MUL_DIGS_C +#define BN_S_MP_MUL_HIGH_DIGS_C +#define BN_S_MP_SQR_C +#define BN_S_MP_SUB_C +#define BNCORE_C +#endif + +#if defined(BN_ERROR_C) + #define BN_MP_ERROR_TO_STRING_C +#endif + +#if defined(BN_FAST_MP_INVMOD_C) + #define BN_MP_ISEVEN_C + #define BN_MP_INIT_MULTI_C + #define BN_MP_COPY_C + #define BN_MP_MOD_C + #define BN_MP_SET_C + #define BN_MP_DIV_2_C + #define BN_MP_ISODD_C + #define BN_MP_SUB_C + #define BN_MP_CMP_C + #define BN_MP_ISZERO_C + #define BN_MP_CMP_D_C + #define BN_MP_ADD_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C) + #define BN_MP_GROW_C + #define BN_MP_RSHD_C + #define BN_MP_CLAMP_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_FAST_S_MP_MUL_DIGS_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_FAST_S_MP_SQR_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_2EXPT_C) + #define BN_MP_ZERO_C + #define BN_MP_GROW_C +#endif + +#if defined(BN_MP_ABS_C) + #define BN_MP_COPY_C +#endif + +#if defined(BN_MP_ADD_C) + #define BN_S_MP_ADD_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_ADD_D_C) + #define BN_MP_GROW_C + #define BN_MP_SUB_D_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_ADDMOD_C) + #define BN_MP_INIT_C + #define BN_MP_ADD_C + #define BN_MP_CLEAR_C + #define BN_MP_MOD_C +#endif + +#if defined(BN_MP_AND_C) + #define BN_MP_INIT_COPY_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_CLAMP_C) +#endif + +#if defined(BN_MP_CLEAR_C) +#endif + +#if defined(BN_MP_CLEAR_MULTI_C) + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_CMP_C) + #define BN_MP_CMP_MAG_C +#endif + +#if defined(BN_MP_CMP_D_C) +#endif + +#if defined(BN_MP_CMP_MAG_C) +#endif + +#if defined(BN_MP_CNT_LSB_C) + #define BN_MP_ISZERO_C +#endif + +#if defined(BN_MP_COPY_C) + #define BN_MP_GROW_C +#endif + +#if defined(BN_MP_COUNT_BITS_C) +#endif + +#if defined(BN_MP_DIV_C) + #define BN_MP_ISZERO_C + #define BN_MP_CMP_MAG_C + #define BN_MP_COPY_C + #define BN_MP_ZERO_C + #define BN_MP_INIT_MULTI_C + #define BN_MP_SET_C + #define BN_MP_COUNT_BITS_C + #define BN_MP_ABS_C + #define BN_MP_MUL_2D_C + #define BN_MP_CMP_C + #define BN_MP_SUB_C + #define BN_MP_ADD_C + #define BN_MP_DIV_2D_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_MULTI_C + #define BN_MP_INIT_SIZE_C + #define BN_MP_INIT_C + #define BN_MP_INIT_COPY_C + #define BN_MP_LSHD_C + #define BN_MP_RSHD_C + #define BN_MP_MUL_D_C + #define BN_MP_CLAMP_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_DIV_2_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_DIV_2D_C) + #define BN_MP_COPY_C + #define BN_MP_ZERO_C + #define BN_MP_INIT_C + #define BN_MP_MOD_2D_C + #define BN_MP_CLEAR_C + #define BN_MP_RSHD_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C +#endif + +#if defined(BN_MP_DIV_3_C) + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_DIV_D_C) + #define BN_MP_ISZERO_C + #define BN_MP_COPY_C + #define BN_MP_DIV_2D_C + #define BN_MP_DIV_3_C + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_DR_IS_MODULUS_C) +#endif + +#if defined(BN_MP_DR_REDUCE_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_DR_SETUP_C) +#endif + +#if defined(BN_MP_EXCH_C) +#endif + +#if defined(BN_MP_EXPT_D_C) + #define BN_MP_INIT_COPY_C + #define BN_MP_SET_C + #define BN_MP_SQR_C + #define BN_MP_CLEAR_C + #define BN_MP_MUL_C +#endif + +#if defined(BN_MP_EXPTMOD_C) + #define BN_MP_INIT_C + #define BN_MP_INVMOD_C + #define BN_MP_CLEAR_C + #define BN_MP_ABS_C + #define BN_MP_CLEAR_MULTI_C + #define BN_MP_REDUCE_IS_2K_L_C + #define BN_S_MP_EXPTMOD_C + #define BN_MP_DR_IS_MODULUS_C + #define BN_MP_REDUCE_IS_2K_C + #define BN_MP_ISODD_C + #define BN_MP_EXPTMOD_FAST_C +#endif + +#if defined(BN_MP_EXPTMOD_FAST_C) + #define BN_MP_COUNT_BITS_C + #define BN_MP_INIT_C + #define BN_MP_CLEAR_C + #define BN_MP_MONTGOMERY_SETUP_C + #define BN_FAST_MP_MONTGOMERY_REDUCE_C + #define BN_MP_MONTGOMERY_REDUCE_C + #define BN_MP_DR_SETUP_C + #define BN_MP_DR_REDUCE_C + #define BN_MP_REDUCE_2K_SETUP_C + #define BN_MP_REDUCE_2K_C + #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C + #define BN_MP_MULMOD_C + #define BN_MP_SET_C + #define BN_MP_MOD_C + #define BN_MP_COPY_C + #define BN_MP_SQR_C + #define BN_MP_MUL_C + #define BN_MP_EXCH_C +#endif + +#if defined(BN_MP_EXTEUCLID_C) + #define BN_MP_INIT_MULTI_C + #define BN_MP_SET_C + #define BN_MP_COPY_C + #define BN_MP_ISZERO_C + #define BN_MP_DIV_C + #define BN_MP_MUL_C + #define BN_MP_SUB_C + #define BN_MP_NEG_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_MP_FREAD_C) + #define BN_MP_ZERO_C + #define BN_MP_S_RMAP_C + #define BN_MP_MUL_D_C + #define BN_MP_ADD_D_C + #define BN_MP_CMP_D_C +#endif + +#if defined(BN_MP_FWRITE_C) + #define BN_MP_RADIX_SIZE_C + #define BN_MP_TORADIX_C +#endif + +#if defined(BN_MP_GCD_C) + #define BN_MP_ISZERO_C + #define BN_MP_ABS_C + #define BN_MP_ZERO_C + #define BN_MP_INIT_COPY_C + #define BN_MP_CNT_LSB_C + #define BN_MP_DIV_2D_C + #define BN_MP_CMP_MAG_C + #define BN_MP_EXCH_C + #define BN_S_MP_SUB_C + #define BN_MP_MUL_2D_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_GET_INT_C) +#endif + +#if defined(BN_MP_GROW_C) +#endif + +#if defined(BN_MP_INIT_C) +#endif + +#if defined(BN_MP_INIT_COPY_C) + #define BN_MP_COPY_C +#endif + +#if defined(BN_MP_INIT_MULTI_C) + #define BN_MP_ERR_C + #define BN_MP_INIT_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_INIT_SET_C) + #define BN_MP_INIT_C + #define BN_MP_SET_C +#endif + +#if defined(BN_MP_INIT_SET_INT_C) + #define BN_MP_INIT_C + #define BN_MP_SET_INT_C +#endif + +#if defined(BN_MP_INIT_SIZE_C) + #define BN_MP_INIT_C +#endif + +#if defined(BN_MP_INVMOD_C) + #define BN_MP_ISZERO_C + #define BN_MP_ISODD_C + #define BN_FAST_MP_INVMOD_C + #define BN_MP_INVMOD_SLOW_C +#endif + +#if defined(BN_MP_INVMOD_SLOW_C) + #define BN_MP_ISZERO_C + #define BN_MP_INIT_MULTI_C + #define BN_MP_MOD_C + #define BN_MP_COPY_C + #define BN_MP_ISEVEN_C + #define BN_MP_SET_C + #define BN_MP_DIV_2_C + #define BN_MP_ISODD_C + #define BN_MP_ADD_C + #define BN_MP_SUB_C + #define BN_MP_CMP_C + #define BN_MP_CMP_D_C + #define BN_MP_CMP_MAG_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_MP_IS_SQUARE_C) + #define BN_MP_MOD_D_C + #define BN_MP_INIT_SET_INT_C + #define BN_MP_MOD_C + #define BN_MP_GET_INT_C + #define BN_MP_SQRT_C + #define BN_MP_SQR_C + #define BN_MP_CMP_MAG_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_JACOBI_C) + #define BN_MP_CMP_D_C + #define BN_MP_ISZERO_C + #define BN_MP_INIT_COPY_C + #define BN_MP_CNT_LSB_C + #define BN_MP_DIV_2D_C + #define BN_MP_MOD_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_KARATSUBA_MUL_C) + #define BN_MP_MUL_C + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_SUB_C + #define BN_MP_ADD_C + #define BN_MP_LSHD_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_KARATSUBA_SQR_C) + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_SQR_C + #define BN_MP_SUB_C + #define BN_S_MP_ADD_C + #define BN_MP_LSHD_C + #define BN_MP_ADD_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_LCM_C) + #define BN_MP_INIT_MULTI_C + #define BN_MP_GCD_C + #define BN_MP_CMP_MAG_C + #define BN_MP_DIV_C + #define BN_MP_MUL_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_MP_LSHD_C) + #define BN_MP_GROW_C + #define BN_MP_RSHD_C +#endif + +#if defined(BN_MP_MOD_C) + #define BN_MP_INIT_C + #define BN_MP_DIV_C + #define BN_MP_CLEAR_C + #define BN_MP_ADD_C + #define BN_MP_EXCH_C +#endif + +#if defined(BN_MP_MOD_2D_C) + #define BN_MP_ZERO_C + #define BN_MP_COPY_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_MOD_D_C) + #define BN_MP_DIV_D_C +#endif + +#if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) + #define BN_MP_COUNT_BITS_C + #define BN_MP_2EXPT_C + #define BN_MP_SET_C + #define BN_MP_MUL_2_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_MONTGOMERY_REDUCE_C) + #define BN_FAST_MP_MONTGOMERY_REDUCE_C + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C + #define BN_MP_RSHD_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_MONTGOMERY_SETUP_C) +#endif + +#if defined(BN_MP_MUL_C) + #define BN_MP_TOOM_MUL_C + #define BN_MP_KARATSUBA_MUL_C + #define BN_FAST_S_MP_MUL_DIGS_C + #define BN_S_MP_MUL_C + #define BN_S_MP_MUL_DIGS_C +#endif + +#if defined(BN_MP_MUL_2_C) + #define BN_MP_GROW_C +#endif + +#if defined(BN_MP_MUL_2D_C) + #define BN_MP_COPY_C + #define BN_MP_GROW_C + #define BN_MP_LSHD_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_MUL_D_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_MULMOD_C) + #define BN_MP_INIT_C + #define BN_MP_MUL_C + #define BN_MP_CLEAR_C + #define BN_MP_MOD_C +#endif + +#if defined(BN_MP_N_ROOT_C) + #define BN_MP_INIT_C + #define BN_MP_SET_C + #define BN_MP_COPY_C + #define BN_MP_EXPT_D_C + #define BN_MP_MUL_C + #define BN_MP_SUB_C + #define BN_MP_MUL_D_C + #define BN_MP_DIV_C + #define BN_MP_CMP_C + #define BN_MP_SUB_D_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_NEG_C) + #define BN_MP_COPY_C + #define BN_MP_ISZERO_C +#endif + +#if defined(BN_MP_OR_C) + #define BN_MP_INIT_COPY_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_PRIME_FERMAT_C) + #define BN_MP_CMP_D_C + #define BN_MP_INIT_C + #define BN_MP_EXPTMOD_C + #define BN_MP_CMP_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_PRIME_IS_DIVISIBLE_C) + #define BN_MP_MOD_D_C +#endif + +#if defined(BN_MP_PRIME_IS_PRIME_C) + #define BN_MP_CMP_D_C + #define BN_MP_PRIME_IS_DIVISIBLE_C + #define BN_MP_INIT_C + #define BN_MP_SET_C + #define BN_MP_PRIME_MILLER_RABIN_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_PRIME_MILLER_RABIN_C) + #define BN_MP_CMP_D_C + #define BN_MP_INIT_COPY_C + #define BN_MP_SUB_D_C + #define BN_MP_CNT_LSB_C + #define BN_MP_DIV_2D_C + #define BN_MP_EXPTMOD_C + #define BN_MP_CMP_C + #define BN_MP_SQRMOD_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_PRIME_NEXT_PRIME_C) + #define BN_MP_CMP_D_C + #define BN_MP_SET_C + #define BN_MP_SUB_D_C + #define BN_MP_ISEVEN_C + #define BN_MP_MOD_D_C + #define BN_MP_INIT_C + #define BN_MP_ADD_D_C + #define BN_MP_PRIME_MILLER_RABIN_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C) +#endif + +#if defined(BN_MP_PRIME_RANDOM_EX_C) + #define BN_MP_READ_UNSIGNED_BIN_C + #define BN_MP_PRIME_IS_PRIME_C + #define BN_MP_SUB_D_C + #define BN_MP_DIV_2_C + #define BN_MP_MUL_2_C + #define BN_MP_ADD_D_C +#endif + +#if defined(BN_MP_RADIX_SIZE_C) + #define BN_MP_COUNT_BITS_C + #define BN_MP_INIT_COPY_C + #define BN_MP_ISZERO_C + #define BN_MP_DIV_D_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_RADIX_SMAP_C) + #define BN_MP_S_RMAP_C +#endif + +#if defined(BN_MP_RAND_C) + #define BN_MP_ZERO_C + #define BN_MP_ADD_D_C + #define BN_MP_LSHD_C +#endif + +#if defined(BN_MP_READ_RADIX_C) + #define BN_MP_ZERO_C + #define BN_MP_S_RMAP_C + #define BN_MP_RADIX_SMAP_C + #define BN_MP_MUL_D_C + #define BN_MP_ADD_D_C + #define BN_MP_ISZERO_C +#endif + +#if defined(BN_MP_READ_SIGNED_BIN_C) + #define BN_MP_READ_UNSIGNED_BIN_C +#endif + +#if defined(BN_MP_READ_UNSIGNED_BIN_C) + #define BN_MP_GROW_C + #define BN_MP_ZERO_C + #define BN_MP_MUL_2D_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_REDUCE_C) + #define BN_MP_REDUCE_SETUP_C + #define BN_MP_INIT_COPY_C + #define BN_MP_RSHD_C + #define BN_MP_MUL_C + #define BN_S_MP_MUL_HIGH_DIGS_C + #define BN_FAST_S_MP_MUL_HIGH_DIGS_C + #define BN_MP_MOD_2D_C + #define BN_S_MP_MUL_DIGS_C + #define BN_MP_SUB_C + #define BN_MP_CMP_D_C + #define BN_MP_SET_C + #define BN_MP_LSHD_C + #define BN_MP_ADD_C + #define BN_MP_CMP_C + #define BN_S_MP_SUB_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_REDUCE_2K_C) + #define BN_MP_INIT_C + #define BN_MP_COUNT_BITS_C + #define BN_MP_DIV_2D_C + #define BN_MP_MUL_D_C + #define BN_S_MP_ADD_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_REDUCE_2K_L_C) + #define BN_MP_INIT_C + #define BN_MP_COUNT_BITS_C + #define BN_MP_DIV_2D_C + #define BN_MP_MUL_C + #define BN_S_MP_ADD_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_REDUCE_2K_SETUP_C) + #define BN_MP_INIT_C + #define BN_MP_COUNT_BITS_C + #define BN_MP_2EXPT_C + #define BN_MP_CLEAR_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_REDUCE_2K_SETUP_L_C) + #define BN_MP_INIT_C + #define BN_MP_2EXPT_C + #define BN_MP_COUNT_BITS_C + #define BN_S_MP_SUB_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_REDUCE_IS_2K_C) + #define BN_MP_REDUCE_2K_C + #define BN_MP_COUNT_BITS_C +#endif + +#if defined(BN_MP_REDUCE_IS_2K_L_C) +#endif + +#if defined(BN_MP_REDUCE_SETUP_C) + #define BN_MP_2EXPT_C + #define BN_MP_DIV_C +#endif + +#if defined(BN_MP_RSHD_C) + #define BN_MP_ZERO_C +#endif + +#if defined(BN_MP_SET_C) + #define BN_MP_ZERO_C +#endif + +#if defined(BN_MP_SET_INT_C) + #define BN_MP_ZERO_C + #define BN_MP_MUL_2D_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_SHRINK_C) +#endif + +#if defined(BN_MP_SIGNED_BIN_SIZE_C) + #define BN_MP_UNSIGNED_BIN_SIZE_C +#endif + +#if defined(BN_MP_SQR_C) + #define BN_MP_TOOM_SQR_C + #define BN_MP_KARATSUBA_SQR_C + #define BN_FAST_S_MP_SQR_C + #define BN_S_MP_SQR_C +#endif + +#if defined(BN_MP_SQRMOD_C) + #define BN_MP_INIT_C + #define BN_MP_SQR_C + #define BN_MP_CLEAR_C + #define BN_MP_MOD_C +#endif + +#if defined(BN_MP_SQRT_C) + #define BN_MP_N_ROOT_C + #define BN_MP_ISZERO_C + #define BN_MP_ZERO_C + #define BN_MP_INIT_COPY_C + #define BN_MP_RSHD_C + #define BN_MP_DIV_C + #define BN_MP_ADD_C + #define BN_MP_DIV_2_C + #define BN_MP_CMP_MAG_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_SUB_C) + #define BN_S_MP_ADD_C + #define BN_MP_CMP_MAG_C + #define BN_S_MP_SUB_C +#endif + +#if defined(BN_MP_SUB_D_C) + #define BN_MP_GROW_C + #define BN_MP_ADD_D_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_MP_SUBMOD_C) + #define BN_MP_INIT_C + #define BN_MP_SUB_C + #define BN_MP_CLEAR_C + #define BN_MP_MOD_C +#endif + +#if defined(BN_MP_TO_SIGNED_BIN_C) + #define BN_MP_TO_UNSIGNED_BIN_C +#endif + +#if defined(BN_MP_TO_SIGNED_BIN_N_C) + #define BN_MP_SIGNED_BIN_SIZE_C + #define BN_MP_TO_SIGNED_BIN_C +#endif + +#if defined(BN_MP_TO_UNSIGNED_BIN_C) + #define BN_MP_INIT_COPY_C + #define BN_MP_ISZERO_C + #define BN_MP_DIV_2D_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_TO_UNSIGNED_BIN_N_C) + #define BN_MP_UNSIGNED_BIN_SIZE_C + #define BN_MP_TO_UNSIGNED_BIN_C +#endif + +#if defined(BN_MP_TOOM_MUL_C) + #define BN_MP_INIT_MULTI_C + #define BN_MP_MOD_2D_C + #define BN_MP_COPY_C + #define BN_MP_RSHD_C + #define BN_MP_MUL_C + #define BN_MP_MUL_2_C + #define BN_MP_ADD_C + #define BN_MP_SUB_C + #define BN_MP_DIV_2_C + #define BN_MP_MUL_2D_C + #define BN_MP_MUL_D_C + #define BN_MP_DIV_3_C + #define BN_MP_LSHD_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_MP_TOOM_SQR_C) + #define BN_MP_INIT_MULTI_C + #define BN_MP_MOD_2D_C + #define BN_MP_COPY_C + #define BN_MP_RSHD_C + #define BN_MP_SQR_C + #define BN_MP_MUL_2_C + #define BN_MP_ADD_C + #define BN_MP_SUB_C + #define BN_MP_DIV_2_C + #define BN_MP_MUL_2D_C + #define BN_MP_MUL_D_C + #define BN_MP_DIV_3_C + #define BN_MP_LSHD_C + #define BN_MP_CLEAR_MULTI_C +#endif + +#if defined(BN_MP_TORADIX_C) + #define BN_MP_ISZERO_C + #define BN_MP_INIT_COPY_C + #define BN_MP_DIV_D_C + #define BN_MP_CLEAR_C + #define BN_MP_S_RMAP_C +#endif + +#if defined(BN_MP_TORADIX_N_C) + #define BN_MP_ISZERO_C + #define BN_MP_INIT_COPY_C + #define BN_MP_DIV_D_C + #define BN_MP_CLEAR_C + #define BN_MP_S_RMAP_C +#endif + +#if defined(BN_MP_UNSIGNED_BIN_SIZE_C) + #define BN_MP_COUNT_BITS_C +#endif + +#if defined(BN_MP_XOR_C) + #define BN_MP_INIT_COPY_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_MP_ZERO_C) +#endif + +#if defined(BN_PRIME_TAB_C) +#endif + +#if defined(BN_REVERSE_C) +#endif + +#if defined(BN_S_MP_ADD_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BN_S_MP_EXPTMOD_C) + #define BN_MP_COUNT_BITS_C + #define BN_MP_INIT_C + #define BN_MP_CLEAR_C + #define BN_MP_REDUCE_SETUP_C + #define BN_MP_REDUCE_C + #define BN_MP_REDUCE_2K_SETUP_L_C + #define BN_MP_REDUCE_2K_L_C + #define BN_MP_MOD_C + #define BN_MP_COPY_C + #define BN_MP_SQR_C + #define BN_MP_MUL_C + #define BN_MP_SET_C + #define BN_MP_EXCH_C +#endif + +#if defined(BN_S_MP_MUL_DIGS_C) + #define BN_FAST_S_MP_MUL_DIGS_C + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_S_MP_MUL_HIGH_DIGS_C) + #define BN_FAST_S_MP_MUL_HIGH_DIGS_C + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_S_MP_SQR_C) + #define BN_MP_INIT_SIZE_C + #define BN_MP_CLAMP_C + #define BN_MP_EXCH_C + #define BN_MP_CLEAR_C +#endif + +#if defined(BN_S_MP_SUB_C) + #define BN_MP_GROW_C + #define BN_MP_CLAMP_C +#endif + +#if defined(BNCORE_C) +#endif + +#ifdef LTM3 +#define LTM_LAST +#endif +#include "mpi_superclass.h" +#include "mpi_class.h" +#else +#define LTM_LAST +#endif + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h new file mode 100644 index 00000000..06a05f54 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h @@ -0,0 +1,95 @@ +/* mpi_superclass.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* super class file for PK algos */ + +/* default ... include all MPI */ +#define LTM_ALL + +/* RSA only (does not support DH/DSA/ECC) */ +/* #define SC_RSA_1 */ + +/* For reference.... On an Athlon64 optimizing for speed... + + LTM's mpi.o with all functions [striped] is 142KiB in size. + +*/ + +/* Works for RSA only, mpi.o is 68KiB */ +#ifdef SC_RSA_1 + #define BN_MP_SHRINK_C + #define BN_MP_LCM_C + #define BN_MP_PRIME_RANDOM_EX_C + #define BN_MP_INVMOD_C + #define BN_MP_GCD_C + #define BN_MP_MOD_C + #define BN_MP_MULMOD_C + #define BN_MP_ADDMOD_C + #define BN_MP_EXPTMOD_C + #define BN_MP_SET_INT_C + #define BN_MP_INIT_MULTI_C + #define BN_MP_CLEAR_MULTI_C + #define BN_MP_UNSIGNED_BIN_SIZE_C + #define BN_MP_TO_UNSIGNED_BIN_C + #define BN_MP_MOD_D_C + #define BN_MP_PRIME_RABIN_MILLER_TRIALS_C + #define BN_REVERSE_C + #define BN_PRIME_TAB_C + + /* other modifiers */ + #define BN_MP_DIV_SMALL /* Slower division, not critical */ + + /* here we are on the last pass so we turn things off. The functions classes are still there + * but we remove them specifically from the build. This also invokes tweaks in functions + * like removing support for even moduli, etc... + */ +#ifdef LTM_LAST + #undef BN_MP_TOOM_MUL_C + #undef BN_MP_TOOM_SQR_C + #undef BN_MP_KARATSUBA_MUL_C + #undef BN_MP_KARATSUBA_SQR_C + #undef BN_MP_REDUCE_C + #undef BN_MP_REDUCE_SETUP_C + #undef BN_MP_DR_IS_MODULUS_C + #undef BN_MP_DR_SETUP_C + #undef BN_MP_DR_REDUCE_C + #undef BN_MP_REDUCE_IS_2K_C + #undef BN_MP_REDUCE_2K_SETUP_C + #undef BN_MP_REDUCE_2K_C + #undef BN_S_MP_EXPTMOD_C + #undef BN_MP_DIV_3_C + #undef BN_S_MP_MUL_HIGH_DIGS_C + #undef BN_FAST_S_MP_MUL_HIGH_DIGS_C + #undef BN_FAST_MP_INVMOD_C + + /* To safely undefine these you have to make sure your RSA key won't exceed the Comba threshold + * which is roughly 255 digits [7140 bits for 32-bit machines, 15300 bits for 64-bit machines] + * which means roughly speaking you can handle upto 2536-bit RSA keys with these defined without + * trouble. + */ + #undef BN_S_MP_MUL_DIGS_C + #undef BN_S_MP_SQR_C + #undef BN_MP_MONTGOMERY_REDUCE_C +#endif + +#endif + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h new file mode 100644 index 00000000..63ae2a54 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h @@ -0,0 +1,123 @@ +/* pkcs7.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_PKCS7 + +#ifndef CTAO_CRYPT_PKCS7_H +#define CTAO_CRYPT_PKCS7_H + +#include +#include +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/* PKCS#7 content types, ref RFC 2315 (Section 14) */ +enum PKCS7_TYPES { + PKCS7_MSG = 650, /* 1.2.840.113549.1.7 */ + DATA = 651, /* 1.2.840.113549.1.7.1 */ + SIGNED_DATA = 652, /* 1.2.840.113549.1.7.2 */ + ENVELOPED_DATA = 653, /* 1.2.840.113549.1.7.3 */ + SIGNED_AND_ENVELOPED_DATA = 654, /* 1.2.840.113549.1.7.4 */ + DIGESTED_DATA = 655, /* 1.2.840.113549.1.7.5 */ + ENCRYPTED_DATA = 656 /* 1.2.840.113549.1.7.6 */ +}; + +enum Pkcs7_Misc { + PKCS7_NONCE_SZ = 16, + MAX_ENCRYPTED_KEY_SZ = 512, /* max enc. key size, RSA <= 4096 */ + MAX_CONTENT_KEY_LEN = DES3_KEYLEN, /* highest current cipher is 3DES */ + MAX_RECIP_SZ = MAX_VERSION_SZ + + MAX_SEQ_SZ + ASN_NAME_MAX + MAX_SN_SZ + + MAX_SEQ_SZ + MAX_ALGO_SZ + 1 + MAX_ENCRYPTED_KEY_SZ +}; + + +typedef struct PKCS7Attrib { + byte* oid; + word32 oidSz; + byte* value; + word32 valueSz; +} PKCS7Attrib; + + +typedef struct PKCS7 { + byte* content; /* inner content, not owner */ + word32 contentSz; /* content size */ + int contentOID; /* PKCS#7 content type OID sum */ + + RNG* rng; + + int hashOID; + int encryptOID; /* key encryption algorithm OID */ + + byte* singleCert; /* recipient cert, DER, not owner */ + word32 singleCertSz; /* size of recipient cert buffer, bytes */ + byte issuerHash[SHA_SIZE]; /* hash of all alt Names */ + byte* issuer; /* issuer name of singleCert */ + word32 issuerSz; /* length of issuer name */ + byte issuerSn[MAX_SN_SZ]; /* singleCert's serial number */ + word32 issuerSnSz; /* length of serial number */ + byte publicKey[512]; + word32 publicKeySz; + byte* privateKey; /* private key, DER, not owner */ + word32 privateKeySz; /* size of private key buffer, bytes */ + + PKCS7Attrib* signedAttribs; + word32 signedAttribsSz; +} PKCS7; + + +CYASSL_LOCAL int SetContentType(int pkcs7TypeOID, byte* output); +CYASSL_LOCAL int GetContentType(const byte* input, word32* inOutIdx, + word32* oid, word32 maxIdx); +CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz, + int keyEncAlgo, int blockKeySz, + RNG* rng, byte* contentKeyPlain, + byte* contentKeyEnc, + int* keyEncSz, byte* out, word32 outSz); + +CYASSL_API int PKCS7_InitWithCert(PKCS7* pkcs7, byte* cert, word32 certSz); +CYASSL_API void PKCS7_Free(PKCS7* pkcs7); +CYASSL_API int PKCS7_EncodeData(PKCS7* pkcs7, byte* output, word32 outputSz); +CYASSL_API int PKCS7_EncodeSignedData(PKCS7* pkcs7, + byte* output, word32 outputSz); +CYASSL_API int PKCS7_VerifySignedData(PKCS7* pkcs7, + byte* pkiMsg, word32 pkiMsgSz); +CYASSL_API int PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, + byte* output, word32 outputSz); +CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg, + word32 pkiMsgSz, byte* output, + word32 outputSz); + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_PKCS7_H */ + +#endif /* HAVE_PKCS7 */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h new file mode 100644 index 00000000..9a2c9776 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h @@ -0,0 +1,194 @@ +/* port.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_PORT_H +#define CTAO_CRYPT_PORT_H + + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef USE_WINDOWS_API + #ifdef CYASSL_GAME_BUILD + #include "system/xtl.h" + #else + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) + /* On WinCE winsock2.h must be included before windows.h */ + #include + #endif + #include + #endif +#elif defined(THREADX) + #ifndef SINGLE_THREADED + #include "tx_api.h" + #endif +#elif defined(MICRIUM) + /* do nothing, just don't pick Unix */ +#elif defined(FREERTOS) || defined(CYASSL_SAFERTOS) + /* do nothing */ +#elif defined(EBSNET) + /* do nothing */ +#elif defined(FREESCALE_MQX) + /* do nothing */ +#elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #else + #include + #endif +#elif defined(CYASSL_CMSIS_RTOS) + #include "cmsis_os.h" +#else + #ifndef SINGLE_THREADED + #define CYASSL_PTHREADS + #include + #endif + #if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) + #include /* for close of BIO */ + #endif +#endif + + +#ifdef SINGLE_THREADED + typedef int CyaSSL_Mutex; +#else /* MULTI_THREADED */ + /* FREERTOS comes first to enable use of FreeRTOS Windows simulator only */ + #ifdef FREERTOS + typedef xSemaphoreHandle CyaSSL_Mutex; + #elif defined(CYASSL_SAFERTOS) + typedef struct CyaSSL_Mutex { + signed char mutexBuffer[portQUEUE_OVERHEAD_BYTES]; + xSemaphoreHandle mutex; + } CyaSSL_Mutex; + #elif defined(USE_WINDOWS_API) + typedef CRITICAL_SECTION CyaSSL_Mutex; + #elif defined(CYASSL_PTHREADS) + typedef pthread_mutex_t CyaSSL_Mutex; + #elif defined(THREADX) + typedef TX_MUTEX CyaSSL_Mutex; + #elif defined(MICRIUM) + typedef OS_MUTEX CyaSSL_Mutex; + #elif defined(EBSNET) + typedef RTP_MUTEX CyaSSL_Mutex; + #elif defined(FREESCALE_MQX) + typedef MUTEX_STRUCT CyaSSL_Mutex; + #elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_CMSIS_RTOS) + typedef osMutexId CyaSSL_Mutex; + #else + typedef OS_MUT CyaSSL_Mutex; + #endif + #elif defined(CYASSL_CMSIS_RTOS) + typedef osMutexId CyaSSL_Mutex; + #else + #error Need a mutex type in multithreaded mode + #endif /* USE_WINDOWS_API */ +#endif /* SINGLE_THREADED */ + +CYASSL_LOCAL int InitMutex(CyaSSL_Mutex*); +CYASSL_LOCAL int FreeMutex(CyaSSL_Mutex*); +CYASSL_LOCAL int LockMutex(CyaSSL_Mutex*); +CYASSL_LOCAL int UnLockMutex(CyaSSL_Mutex*); + + +/* filesystem abstraction layer, used by ssl.c */ +#ifndef NO_FILESYSTEM + +#if defined(EBSNET) + #define XFILE int + #define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0); + #define XFSEEK vf_lseek + #define XFTELL vf_tell + #define XREWIND vf_rewind + #define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT) + #define XFWRITE(BUF, SZ, AMT, FD) vf_write(FD, BUF, SZ*AMT) + #define XFCLOSE vf_close + #define XSEEK_END VSEEK_END + #define XBADFILE -1 +#elif defined(LSR_FS) + #include + #define XFILE struct fs_file* + #define XFOPEN(NAME, MODE) fs_open((char*)NAME); + #define XFSEEK(F, O, W) (void)F + #define XFTELL(F) (F)->len + #define XREWIND(F) (void)F + #define XFREAD(BUF, SZ, AMT, F) fs_read(F, (char*)BUF, SZ*AMT) + #define XFWRITE(BUF, SZ, AMT, F) fs_write(F, (char*)BUF, SZ*AMT) + #define XFCLOSE fs_close + #define XSEEK_END 0 + #define XBADFILE NULL +#elif defined(FREESCALE_MQX) + #define XFILE MQX_FILE_PTR + #define XFOPEN fopen + #define XFSEEK fseek + #define XFTELL ftell + #define XREWIND(F) fseek(F, 0, IO_SEEK_SET) + #define XFREAD fread + #define XFWRITE fwrite + #define XFCLOSE fclose + #define XSEEK_END IO_SEEK_END + #define XBADFILE NULL +#elif defined(MICRIUM) + #include + #define XFILE FS_FILE* + #define XFOPEN fs_fopen + #define XFSEEK fs_fseek + #define XFTELL fs_ftell + #define XREWIND fs_rewind + #define XFREAD fs_fread + #define XFWRITE fs_fwrite + #define XFCLOSE fs_fclose + #define XSEEK_END FS_SEEK_END + #define XBADFILE NULL +#else + /* stdio, default case */ + #define XFILE FILE* + #if defined(CYASSL_MDK_ARM) + extern FILE * CyaSSL_fopen(const char *name, const char *mode) ; + #define XFOPEN CyaSSL_fopen + #else + #define XFOPEN fopen + #endif + #define XFSEEK fseek + #define XFTELL ftell + #define XREWIND rewind + #define XFREAD fread + #define XFWRITE fwrite + #define XFCLOSE fclose + #define XSEEK_END SEEK_END + #define XBADFILE NULL +#endif + +#endif /* NO_FILESYSTEM */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_PORT_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h new file mode 100644 index 00000000..04ea330a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h @@ -0,0 +1,53 @@ +/* pwdbased.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_PWDBASED + +#ifndef CTAO_CRYPT_PWDBASED_H +#define CTAO_CRYPT_PWDBASED_H + +#include +#include /* for hash type */ +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +CYASSL_API int PBKDF1(byte* output, const byte* passwd, int pLen, + const byte* salt, int sLen, int iterations, int kLen, + int hashType); +CYASSL_API int PBKDF2(byte* output, const byte* passwd, int pLen, + const byte* salt, int sLen, int iterations, int kLen, + int hashType); +CYASSL_API int PKCS12_PBKDF(byte* output, const byte* passwd, int pLen, + const byte* salt, int sLen, int iterations, + int kLen, int hashType, int purpose); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_PWDBASED_H */ +#endif /* NO_PWDBASED */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h new file mode 100644 index 00000000..08da26c8 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h @@ -0,0 +1,65 @@ +/* rabbit.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_RABBIT + +#ifndef CTAO_CRYPT_RABBIT_H +#define CTAO_CRYPT_RABBIT_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + RABBIT_ENC_TYPE = 5 /* cipher unique type */ +}; + + +/* Rabbit Context */ +typedef struct RabbitCtx { + word32 x[8]; + word32 c[8]; + word32 carry; +} RabbitCtx; + + +/* Rabbit stream cipher */ +typedef struct Rabbit { + RabbitCtx masterCtx; + RabbitCtx workCtx; +} Rabbit; + + +CYASSL_API int RabbitProcess(Rabbit*, byte*, const byte*, word32); +CYASSL_API int RabbitSetKey(Rabbit*, const byte* key, const byte* iv); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_RABBIT_H */ + +#endif /* NO_RABBIT */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h new file mode 100644 index 00000000..57674402 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h @@ -0,0 +1,119 @@ +/* random.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_RANDOM_H +#define CTAO_CRYPT_RANDOM_H + +#include + +#ifndef NO_RC4 + #include +#else + #include +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +#if defined(USE_WINDOWS_API) + #if defined(_WIN64) + typedef unsigned __int64 ProviderHandle; + /* type HCRYPTPROV, avoid #include */ + #else + typedef unsigned long ProviderHandle; + #endif +#endif + + +/* OS specific seeder */ +typedef struct OS_Seed { + #if defined(USE_WINDOWS_API) + ProviderHandle handle; + #else + int fd; + #endif +} OS_Seed; + + +CYASSL_LOCAL +int GenerateSeed(OS_Seed* os, byte* seed, word32 sz); + +#if defined(CYASSL_MDK_ARM) +#undef RNG +#define RNG CyaSSL_RNG /* for avoiding name conflict in "stm32f2xx.h" */ +#endif + +#ifndef NO_RC4 + +#define CYASSL_RNG_CAVIUM_MAGIC 0xBEEF0004 + +/* secure Random Nnumber Generator */ + + +typedef struct RNG { + OS_Seed seed; + Arc4 cipher; +#ifdef HAVE_CAVIUM + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ +#endif +} RNG; + + +#ifdef HAVE_CAVIUM + CYASSL_API int InitRngCavium(RNG*, int); +#endif + +#else /* NO_RC4 */ + +#define DBRG_SEED_LEN (440/8) + + +/* secure Random Nnumber Generator */ +typedef struct RNG { + OS_Seed seed; + + Sha256 sha; + byte digest[SHA256_DIGEST_SIZE]; + byte V[DBRG_SEED_LEN]; + byte C[DBRG_SEED_LEN]; + word64 reseed_ctr; +} RNG; + +#endif + +CYASSL_API int InitRng(RNG*); +CYASSL_API int RNG_GenerateBlock(RNG*, byte*, word32 sz); +CYASSL_API int RNG_GenerateByte(RNG*, byte*); + +#ifdef NO_RC4 + CYASSL_API void FreeRng(RNG*); +#endif + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_RANDOM_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h new file mode 100644 index 00000000..de062698 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h @@ -0,0 +1,64 @@ +/* ripemd.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef CYASSL_RIPEMD + +#ifndef CTAO_CRYPT_RIPEMD_H +#define CTAO_CRYPT_RIPEME_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { + RIPEMD = 3, /* hash type unique */ + RIPEMD_BLOCK_SIZE = 64, + RIPEMD_DIGEST_SIZE = 20, + RIPEMD_PAD_SIZE = 56 +}; + + +/* RipeMd 160 digest */ +typedef struct RipeMd { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word32 digest[RIPEMD_DIGEST_SIZE / sizeof(word32)]; + word32 buffer[RIPEMD_BLOCK_SIZE / sizeof(word32)]; +} RipeMd; + + +CYASSL_API void InitRipeMd(RipeMd*); +CYASSL_API void RipeMdUpdate(RipeMd*, const byte*, word32); +CYASSL_API void RipeMdFinal(RipeMd*, byte*); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_RIPEMD_H */ +#endif /* CYASSL_RIPEMD */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h new file mode 100644 index 00000000..1f94742a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h @@ -0,0 +1,142 @@ +/* rsa.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifndef NO_RSA + +#ifndef CTAO_CRYPT_RSA_H +#define CTAO_CRYPT_RSA_H + +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +#define CYASSL_RSA_CAVIUM_MAGIC 0xBEEF0006 + +enum { + RSA_PUBLIC = 0, + RSA_PRIVATE = 1 +}; + +/* RSA */ +typedef struct RsaKey { + mp_int n, e, d, p, q, dP, dQ, u; + int type; /* public or private */ + void* heap; /* for user memory overrides */ +#ifdef HAVE_CAVIUM + int devId; /* nitrox device id */ + word32 magic; /* using cavium magic */ + word64 contextHandle; /* nitrox context memory handle */ + byte* c_n; /* cavium byte buffers for key parts */ + byte* c_e; + byte* c_d; + byte* c_p; + byte* c_q; + byte* c_dP; + byte* c_dQ; + byte* c_u; /* sizes in bytes */ + word16 c_nSz, c_eSz, c_dSz, c_pSz, c_qSz, c_dP_Sz, c_dQ_Sz, c_uSz; +#endif +} RsaKey; + + +CYASSL_API int InitRsaKey(RsaKey* key, void*); +CYASSL_API int FreeRsaKey(RsaKey* key); + +CYASSL_API int RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key, RNG* rng); +CYASSL_API int RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, + RsaKey* key); +CYASSL_API int RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); +CYASSL_API int RsaSSL_Sign(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key, RNG* rng); +CYASSL_API int RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, + RsaKey* key); +CYASSL_API int RsaSSL_Verify(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); +CYASSL_API int RsaEncryptSize(RsaKey* key); + +CYASSL_API int RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey*, + word32); +CYASSL_API int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey*, + word32); +#ifdef CYASSL_KEY_GEN + CYASSL_API int MakeRsaKey(RsaKey* key, int size, long e, RNG* rng); + CYASSL_API int RsaKeyToDer(RsaKey*, byte* output, word32 inLen); +#endif + +#ifdef HAVE_CAVIUM + CYASSL_API int RsaInitCavium(RsaKey*, int); + CYASSL_API void RsaFreeCavium(RsaKey*); +#endif + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int InitRsaKey_fips(RsaKey* key, void*); + CYASSL_API int FreeRsaKey_fips(RsaKey* key); + + CYASSL_API int RsaPublicEncrypt_fips(const byte* in,word32 inLen,byte* out, + word32 outLen, RsaKey* key, RNG* rng); + CYASSL_API int RsaPrivateDecryptInline_fips(byte* in, word32 inLen, + byte** out, RsaKey* key); + CYASSL_API int RsaPrivateDecrypt_fips(const byte* in, word32 inLen, + byte* out,word32 outLen,RsaKey* key); + CYASSL_API int RsaSSL_Sign_fips(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key, RNG* rng); + CYASSL_API int RsaSSL_VerifyInline_fips(byte* in, word32 inLen, byte** out, + RsaKey* key); + CYASSL_API int RsaSSL_Verify_fips(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key); + CYASSL_API int RsaEncryptSize_fips(RsaKey* key); + + CYASSL_API int RsaPrivateKeyDecode_fips(const byte* input, word32* inOutIdx, + RsaKey*, word32); + CYASSL_API int RsaPublicKeyDecode_fips(const byte* input, word32* inOutIdx, + RsaKey*, word32); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define InitRsaKey InitRsaKey_fips + #define FreeRsaKey FreeRsaKey_fips + #define RsaPublicEncrypt RsaPublicEncrypt_fips + #define RsaPrivateDecryptInline RsaPrivateDecryptInline_fips + #define RsaPrivateDecrypt RsaPrivateDecrypt_fips + #define RsaSSL_Sign RsaSSL_Sign_fips + #define RsaSSL_VerifyInline RsaSSL_VerifyInline_fips + #define RsaSSL_Verify RsaSSL_Verify_fips + #define RsaEncryptSize RsaEncryptSize_fips + /* no implicit KeyDecodes since in asn.c (not rsa.c) */ + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_RSA_H */ + +#endif /* NO_RSA */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h new file mode 100644 index 00000000..a506755f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h @@ -0,0 +1,667 @@ +/* settings.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* Place OS specific preprocessor flags, defines, includes here, will be + included into every file because types.h includes it */ + + +#ifndef CTAO_CRYPT_SETTINGS_H +#define CTAO_CRYPT_SETTINGS_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Uncomment next line if using IPHONE */ +/* #define IPHONE */ + +/* Uncomment next line if using ThreadX */ +/* #define THREADX */ + +/* Uncomment next line if using Micrium ucOS */ +/* #define MICRIUM */ + +/* Uncomment next line if using Mbed */ +/* #define MBED */ + +/* Uncomment next line if using Microchip PIC32 ethernet starter kit */ +/* #define MICROCHIP_PIC32 */ + +/* Uncomment next line if using Microchip TCP/IP stack, version 5 */ +/* #define MICROCHIP_TCPIP_V5 */ + +/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */ +/* #define MICROCHIP_TCPIP */ + +/* Uncomment next line if using PIC32MZ Crypto Engine */ +/* #define CYASSL_MICROCHIP_PIC32MZ */ + +/* Uncomment next line if using FreeRTOS */ +/* #define FREERTOS */ + +/* Uncomment next line if using FreeRTOS Windows Simulator */ +/* #define FREERTOS_WINSIM */ + +/* Uncomment next line if using RTIP */ +/* #define EBSNET */ + +/* Uncomment next line if using lwip */ +/* #define CYASSL_LWIP */ + +/* Uncomment next line if building CyaSSL for a game console */ +/* #define CYASSL_GAME_BUILD */ + +/* Uncomment next line if building CyaSSL for LSR */ +/* #define CYASSL_LSR */ + +/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */ +/* #define FREESCALE_MQX */ + +/* Uncomment next line if using STM32F2 */ +/* #define CYASSL_STM32F2 */ + +/* Uncomment next line if using Comverge settings */ +/* #define COMVERGE */ + +/* Uncomment next line if using QL SEP settings */ +/* #define CYASSL_QL */ + +/* Uncomment next line if using LwIP native TCP socket settings */ +/* #define HAVE_LWIP_NATIVE */ + +/* Uncomment next line if building for EROAD */ +/* #define CYASSL_EROAD */ + +#include + +#ifdef IPHONE + #define SIZEOF_LONG_LONG 8 +#endif + + +#ifdef CYASSL_USER_SETTINGS + #include +#endif + + +#ifdef COMVERGE + #define THREADX + #define HAVE_NETX + #define CYASSL_USER_IO + #define NO_WRITEV + #define NO_DEV_RANDOM + #define NO_FILESYSTEM + #define NO_SHA512 + #define NO_DH + #define NO_DSA + #define NO_HC128 + #define NO_RSA + #define NO_SESSION_CACHE + #define HAVE_ECC +#endif + + +#ifdef THREADX + #define SIZEOF_LONG_LONG 8 +#endif + +#ifdef HAVE_NETX + #include "nx_api.h" +#endif + +#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */ + #define CYASSL_LWIP + #define NO_WRITEV + #define SINGLE_THREADED + #define CYASSL_USER_IO + #define NO_FILESYSTEM +#endif + +#ifdef MICROCHIP_PIC32 + /* #define CYASSL_MICROCHIP_PIC32MZ */ + #define SIZEOF_LONG_LONG 8 + #define SINGLE_THREADED + #define CYASSL_USER_IO + #define NO_WRITEV + #define NO_DEV_RANDOM + #define NO_FILESYSTEM + #define USE_FAST_MATH + #define TFM_TIMING_RESISTANT +#endif + +#ifdef CYASSL_MICROCHIP_PIC32MZ + #define CYASSL_PIC32MZ_CE + #define CYASSL_PIC32MZ_CRYPT + #define HAVE_AES_ENGINE + #define CYASSL_PIC32MZ_RNG + /* #define CYASSL_PIC32MZ_HASH */ + #define CYASSL_AES_COUNTER + #define HAVE_AESGCM + #define NO_BIG_INT + +#endif + +#ifdef MICROCHIP_TCPIP_V5 + /* include timer functions */ + #include "TCPIP Stack/TCPIP.h" +#endif + +#ifdef MICROCHIP_TCPIP + /* include timer, NTP functions */ + #ifdef MICROCHIP_MPLAB_HARMONY + #include "tcpip/tcpip.h" + #else + #include "system/system_services.h" + #include "tcpip/sntp.h" + #endif +#endif + +#ifdef MBED + #define CYASSL_USER_IO + #define NO_FILESYSTEM + #define NO_CERT + #define USE_CERT_BUFFERS_1024 + #define NO_WRITEV + #define NO_DEV_RANDOM + #define NO_SHA512 + #define NO_DH + #define NO_DSA + #define NO_HC128 + #define HAVE_ECC + #define NO_SESSION_CACHE + #define CYASSL_CMSIS_RTOS +#endif + + +#ifdef CYASSL_EROAD + #define FREESCALE_MQX + #define FREESCALE_MMCAU + #define SINGLE_THREADED + #define NO_STDIO_FILESYSTEM + #define CYASSL_LEANPSK + #define HAVE_NULL_CIPHER + #define NO_OLD_TLS + #define NO_ASN + #define NO_BIG_INT + #define NO_RSA + #define NO_DSA + #define NO_DH + #define NO_CERTS + #define NO_PWDBASED + #define NO_DES3 + #define NO_MD4 + #define NO_RC4 + #define NO_MD5 + #define NO_SESSION_CACHE + #define NO_MAIN_DRIVER +#endif + +#ifdef FREERTOS_WINSIM + #define FREERTOS + #define USE_WINDOWS_API +#endif + + +/* Micrium will use Visual Studio for compilation but not the Win32 API */ +#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \ + && !defined(EBSNET) && !defined(CYASSL_EROAD) + #define USE_WINDOWS_API +#endif + + +#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER) + #include + #define XMALLOC(s, h, type) malloc((s)) + #define XFREE(p, h, type) free((p)) + #define XREALLOC(p, n, h, t) realloc((p), (n)) +#endif + +#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL) + #undef XMALLOC + #define XMALLOC yaXMALLOC + #undef XFREE + #define XFREE yaXFREE + #undef XREALLOC + #define XREALLOC yaXREALLOC +#endif + + +#ifdef FREERTOS + #ifndef NO_WRITEV + #define NO_WRITEV + #endif + #ifndef NO_SHA512 + #define NO_SHA512 + #endif + #ifndef NO_DH + #define NO_DH + #endif + #ifndef NO_DSA + #define NO_DSA + #endif + #ifndef NO_HC128 + #define NO_HC128 + #endif + + #ifndef SINGLE_THREADED + #include "FreeRTOS.h" + #include "semphr.h" + #endif +#endif + +#ifdef EBSNET + #include "rtip.h" + + /* #define DEBUG_CYASSL */ + #define NO_CYASSL_DIR /* tbd */ + + #if (POLLOS) + #define SINGLE_THREADED + #endif + + #if (RTPLATFORM) + #if (!RTP_LITTLE_ENDIAN) + #define BIG_ENDIAN_ORDER + #endif + #else + #if (!KS_LITTLE_ENDIAN) + #define BIG_ENDIAN_ORDER + #endif + #endif + + #if (WINMSP3) + #undef SIZEOF_LONG + #define SIZEOF_LONG_LONG 8 + #else + #sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG + #endif + + #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC)) + #define XFREE(p, h, type) (rtp_free(p)) + #define XREALLOC(p, n, h, t) realloc((p), (n)) + +#endif /* EBSNET */ + +#ifdef CYASSL_GAME_BUILD + #define SIZEOF_LONG_LONG 8 + #if defined(__PPU) || defined(__XENON) + #define BIG_ENDIAN_ORDER + #endif +#endif + +#ifdef CYASSL_LSR + #define HAVE_WEBSERVER + #define SIZEOF_LONG_LONG 8 + #define CYASSL_LOW_MEMORY + #define NO_WRITEV + #define NO_SHA512 + #define NO_DH + #define NO_DSA + #define NO_HC128 + #define NO_DEV_RANDOM + #define NO_CYASSL_DIR + #define NO_RABBIT + #ifndef NO_FILESYSTEM + #define LSR_FS + #include "inc/hw_types.h" + #include "fs.h" + #endif + #define CYASSL_LWIP + #include /* for tcp errno */ + #define CYASSL_SAFERTOS + #if defined(__IAR_SYSTEMS_ICC__) + /* enum uses enum */ + #pragma diag_suppress=Pa089 + #endif +#endif + +#ifdef CYASSL_SAFERTOS + #ifndef SINGLE_THREADED + #include "SafeRTOS/semphr.h" + #endif + + #include "SafeRTOS/heap.h" + #define XMALLOC(s, h, type) pvPortMalloc((s)) + #define XFREE(p, h, type) vPortFree((p)) + #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) +#endif + +#ifdef CYASSL_LOW_MEMORY + #undef RSA_LOW_MEM + #define RSA_LOW_MEM + #undef CYASSL_SMALL_STACK + #define CYASSL_SMALL_STACK + #undef TFM_TIMING_RESISTANT + #define TFM_TIMING_RESISTANT +#endif + +#ifdef FREESCALE_MQX + #define SIZEOF_LONG_LONG 8 + #define NO_WRITEV + #define NO_DEV_RANDOM + #define NO_RABBIT + #define NO_CYASSL_DIR + #define USE_FAST_MATH + #define TFM_TIMING_RESISTANT + #define FREESCALE_K70_RNGA + /* #define FREESCALE_K53_RNGB */ + #include "mqx.h" + #ifndef NO_FILESYSTEM + #include "mfs.h" + #include "fio.h" + #endif + #ifndef SINGLE_THREADED + #include "mutex.h" + #endif + + #define XMALLOC(s, h, t) (void *)_mem_alloc_system((s)) + #define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));} + /* Note: MQX has no realloc, using fastmath above */ +#endif + +#ifdef CYASSL_STM32F2 + #define SIZEOF_LONG_LONG 8 + #define NO_DEV_RANDOM + #define NO_CYASSL_DIR + #define NO_RABBIT + #define STM32F2_RNG + #define STM32F2_CRYPTO + #define KEIL_INTRINSICS +#endif + +#ifdef MICRIUM + + #include "stdlib.h" + #include "net_cfg.h" + #include "ssl_cfg.h" + #include "net_secure_os.h" + + #define CYASSL_TYPES + + typedef CPU_INT08U byte; + typedef CPU_INT16U word16; + typedef CPU_INT32U word32; + + #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32) + #define SIZEOF_LONG 4 + #undef SIZEOF_LONG_LONG + #else + #undef SIZEOF_LONG + #define SIZEOF_LONG_LONG 8 + #endif + + #define STRING_USER + + #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr))) + #define XSTRNCPY(pstr_dest, pstr_src, len_max) \ + ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \ + (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max))) + #define XSTRNCMP(pstr_1, pstr_2, len_max) \ + ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \ + (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max))) + #define XSTRSTR(pstr, pstr_srch) \ + ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \ + (CPU_CHAR *)(pstr_srch))) + #define XMEMSET(pmem, data_val, size) \ + ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \ + (CPU_SIZE_T)(size))) + #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \ + (void *)(psrc), (CPU_SIZE_T)(size))) + #define XMEMCMP(pmem_1, pmem_2, size) \ + (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \ + (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES) + #define XMEMMOVE XMEMCPY + +#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + #define MICRIUM_MALLOC + #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \ + (CPU_SIZE_T)(s), (void *)0)) + #define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \ + (p), (void *)0)) + #define XREALLOC(p, n, h, t) realloc((p), (n)) +#endif + + #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED) + #undef NO_FILESYSTEM + #else + #define NO_FILESYSTEM + #endif + + #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG) + #define DEBUG_CYASSL + #else + #undef DEBUG_CYASSL + #endif + + #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED) + #define OPENSSL_EXTRA + #else + #undef OPENSSL_EXTRA + #endif + + #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED) + #undef SINGLE_THREADED + #else + #define SINGLE_THREADED + #endif + + #if (SSL_CFG_DH_EN == DEF_ENABLED) + #undef NO_DH + #else + #define NO_DH + #endif + + #if (SSL_CFG_DSA_EN == DEF_ENABLED) + #undef NO_DSA + #else + #define NO_DSA + #endif + + #if (SSL_CFG_PSK_EN == DEF_ENABLED) + #undef NO_PSK + #else + #define NO_PSK + #endif + + #if (SSL_CFG_3DES_EN == DEF_ENABLED) + #undef NO_DES + #else + #define NO_DES + #endif + + #if (SSL_CFG_AES_EN == DEF_ENABLED) + #undef NO_AES + #else + #define NO_AES + #endif + + #if (SSL_CFG_RC4_EN == DEF_ENABLED) + #undef NO_RC4 + #else + #define NO_RC4 + #endif + + #if (SSL_CFG_RABBIT_EN == DEF_ENABLED) + #undef NO_RABBIT + #else + #define NO_RABBIT + #endif + + #if (SSL_CFG_HC128_EN == DEF_ENABLED) + #undef NO_HC128 + #else + #define NO_HC128 + #endif + + #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) + #define BIG_ENDIAN_ORDER + #else + #undef BIG_ENDIAN_ORDER + #define LITTLE_ENDIAN_ORDER + #endif + + #if (SSL_CFG_MD4_EN == DEF_ENABLED) + #undef NO_MD4 + #else + #define NO_MD4 + #endif + + #if (SSL_CFG_WRITEV_EN == DEF_ENABLED) + #undef NO_WRITEV + #else + #define NO_WRITEV + #endif + + #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED) + #define NO_DEV_RANDOM + #else + #undef NO_DEV_RANDOM + #endif + + #if (SSL_CFG_USER_IO_EN == DEF_ENABLED) + #define CYASSL_USER_IO + #else + #undef CYASSL_USER_IO + #endif + + #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED) + #undef LARGE_STATIC_BUFFERS + #undef STATIC_CHUNKS_ONLY + #else + #define LARGE_STATIC_BUFFERS + #define STATIC_CHUNKS_ONLY + #endif + + #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED) + #define CYASSL_DER_LOAD + #else + #undef CYASSL_DER_LOAD + #endif + + #if (SSL_CFG_DTLS_EN == DEF_ENABLED) + #define CYASSL_DTLS + #else + #undef CYASSL_DTLS + #endif + + #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED) + #define CYASSL_CALLBACKS + #else + #undef CYASSL_CALLBACKS + #endif + + #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED) + #define USE_FAST_MATH + #else + #undef USE_FAST_MATH + #endif + + #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED) + #define TFM_TIMING_RESISTANT + #else + #undef TFM_TIMING_RESISTANT + #endif + +#endif /* MICRIUM */ + + +#ifdef CYASSL_QL + #ifndef CYASSL_SEP + #define CYASSL_SEP + #endif + #ifndef OPENSSL_EXTRA + #define OPENSSL_EXTRA + #endif + #ifndef SESSION_CERTS + #define SESSION_CERTS + #endif + #ifndef HAVE_AESCCM + #define HAVE_AESCCM + #endif + #ifndef ATOMIC_USER + #define ATOMIC_USER + #endif + #ifndef CYASSL_DER_LOAD + #define CYASSL_DER_LOAD + #endif + #ifndef KEEP_PEER_CERT + #define KEEP_PEER_CERT + #endif + #ifndef HAVE_ECC + #define HAVE_ECC + #endif + #ifndef SESSION_INDEX + #define SESSION_INDEX + #endif +#endif /* CYASSL_QL */ + + +#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \ + !defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY) + #define USE_CYASSL_MEMORY +#endif + + +#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) + #undef KEEP_PEER_CERT + #define KEEP_PEER_CERT +#endif + + +/* stream ciphers except arc4 need 32bit alignment, intel ok without */ +#ifndef XSTREAM_ALIGNMENT + #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__) + #define NO_XSTREAM_ALIGNMENT + #else + #define XSTREAM_ALIGNMENT + #endif +#endif + + +/* if using hardware crypto and have alignment requirements, specify the + requirement here. The record header of SSL/TLS will prvent easy alignment. + This hint tries to help as much as possible. */ +#ifndef CYASSL_GENERAL_ALIGNMENT + #ifdef CYASSL_AESNI + #define CYASSL_GENERAL_ALIGNMENT 16 + #elif defined(XSTREAM_ALIGNMENT) + #define CYASSL_GENERAL_ALIGNMENT 4 + #else + #define CYASSL_GENERAL_ALIGNMENT 0 + #endif +#endif + +#ifdef HAVE_CRL + /* not widely supported yet */ + #undef NO_SKID + #define NO_SKID +#endif + +/* Place any other flags or defines here */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_SETTINGS_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h new file mode 100644 index 00000000..749b728a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h @@ -0,0 +1,91 @@ +/* sha.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef NO_SHA + +#ifndef CTAO_CRYPT_SHA_H +#define CTAO_CRYPT_SHA_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { +#ifdef STM32F2_HASH + SHA_REG_SIZE = 4, /* STM32 register size, bytes */ +#endif + SHA = 1, /* hash type unique */ + SHA_BLOCK_SIZE = 64, + SHA_DIGEST_SIZE = 20, + SHA_PAD_SIZE = 56 +}; + +#ifdef CYASSL_PIC32MZ_HASH +#include "port/pic32/pic32mz-crypt.h" +#endif + +/* Sha digest */ +typedef struct Sha { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word32 buffer[SHA_BLOCK_SIZE / sizeof(word32)]; + #ifndef CYASSL_PIC32MZ_HASH + word32 digest[SHA_DIGEST_SIZE / sizeof(word32)]; + #else + word32 digest[PIC32_HASH_SIZE / sizeof(word32)]; + pic32mz_desc desc; /* Crypt Engine descripter */ + #endif +} Sha; + + +CYASSL_API int InitSha(Sha*); +CYASSL_API int ShaUpdate(Sha*, const byte*, word32); +CYASSL_API int ShaFinal(Sha*, byte*); + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int InitSha_fips(Sha*); + CYASSL_API int ShaUpdate_fips(Sha*, const byte*, word32); + CYASSL_API int ShaFinal_fips(Sha*, byte*); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define InitSha InitSha_fips + #define ShaUpdate ShaUpdate_fips + #define ShaFinal ShaFinal_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_SHA_H */ +#endif /* NO_SHA */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h new file mode 100644 index 00000000..5b709c23 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h @@ -0,0 +1,90 @@ +/* sha256.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* code submitted by raphael.huck@efixo.com */ + + +#ifndef NO_SHA256 + +#ifndef CTAO_CRYPT_SHA256_H +#define CTAO_CRYPT_SHA256_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +#ifdef CYASSL_PIC32MZ_HASH +#include "port/pic32/pic32mz-crypt.h" +#endif + + +/* in bytes */ +enum { + SHA256 = 2, /* hash type unique */ + SHA256_BLOCK_SIZE = 64, + SHA256_DIGEST_SIZE = 32, + SHA256_PAD_SIZE = 56 +}; + + +/* Sha256 digest */ +typedef struct Sha256 { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word32 digest[SHA256_DIGEST_SIZE / sizeof(word32)]; + word32 buffer[SHA256_BLOCK_SIZE / sizeof(word32)]; + #ifdef CYASSL_PIC32MZ_HASH + pic32mz_desc desc ; /* Crypt Engine descripter */ + #endif +} Sha256; + + +CYASSL_API int InitSha256(Sha256*); +CYASSL_API int Sha256Update(Sha256*, const byte*, word32); +CYASSL_API int Sha256Final(Sha256*, byte*); + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int InitSha256_fips(Sha256*); + CYASSL_API int Sha256Update_fips(Sha256*, const byte*, word32); + CYASSL_API int Sha256Final_fips(Sha256*, byte*); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define InitSha256 InitSha256_fips + #define Sha256Update Sha256Update_fips + #define Sha256Final Sha256Final_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_SHA256_H */ +#endif /* NO_SHA256 */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h new file mode 100644 index 00000000..5a49942c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h @@ -0,0 +1,118 @@ +/* sha512.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef CYASSL_SHA512 + +#ifndef CTAO_CRYPT_SHA512_H +#define CTAO_CRYPT_SHA512_H + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* in bytes */ +enum { + SHA512 = 4, /* hash type unique */ + SHA512_BLOCK_SIZE = 128, + SHA512_DIGEST_SIZE = 64, + SHA512_PAD_SIZE = 112 +}; + + +/* Sha512 digest */ +typedef struct Sha512 { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; + word64 buffer[SHA512_BLOCK_SIZE / sizeof(word64)]; +} Sha512; + + +CYASSL_API int InitSha512(Sha512*); +CYASSL_API int Sha512Update(Sha512*, const byte*, word32); +CYASSL_API int Sha512Final(Sha512*, byte*); + + +#if defined(CYASSL_SHA384) || defined(HAVE_AESGCM) + +/* in bytes */ +enum { + SHA384 = 5, /* hash type unique */ + SHA384_BLOCK_SIZE = 128, + SHA384_DIGEST_SIZE = 48, + SHA384_PAD_SIZE = 112 +}; + + +/* Sha384 digest */ +typedef struct Sha384 { + word32 buffLen; /* in bytes */ + word32 loLen; /* length in bytes */ + word32 hiLen; /* length in bytes */ + word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; /* for transform 512 */ + word64 buffer[SHA384_BLOCK_SIZE / sizeof(word64)]; +} Sha384; + + +CYASSL_API int InitSha384(Sha384*); +CYASSL_API int Sha384Update(Sha384*, const byte*, word32); +CYASSL_API int Sha384Final(Sha384*, byte*); + + +#ifdef HAVE_FIPS + /* fips wrapper calls, user can call direct */ + CYASSL_API int InitSha512_fips(Sha512*); + CYASSL_API int Sha512Update_fips(Sha512*, const byte*, word32); + CYASSL_API int Sha512Final_fips(Sha512*, byte*); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define InitSha512 InitSha512_fips + #define Sha512Update Sha512Update_fips + #define Sha512Final Sha512Final_fips + #endif /* FIPS_NO_WRAPPERS */ + + /* fips wrapper calls, user can call direct */ + CYASSL_API int InitSha384_fips(Sha384*); + CYASSL_API int Sha384Update_fips(Sha384*, const byte*, word32); + CYASSL_API int Sha384Final_fips(Sha384*, byte*); + #ifndef FIPS_NO_WRAPPERS + /* if not impl or fips.c impl wrapper force fips calls if fips build */ + #define InitSha384 InitSha384_fips + #define Sha384Update Sha384Update_fips + #define Sha384Final Sha384Final_fips + #endif /* FIPS_NO_WRAPPERS */ + +#endif /* HAVE_FIPS */ + + +#endif /* CYASSL_SHA384 */ + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CTAO_CRYPT_SHA512_H */ +#endif /* CYASSL_SHA512 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h new file mode 100644 index 00000000..abb588f7 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h @@ -0,0 +1,694 @@ +/* tfm.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* + * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, + * http://math.libtomcrypt.com + */ + + +/** + * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + + +#ifndef CTAO_CRYPT_TFM_H +#define CTAO_CRYPT_TFM_H + +#include +#ifndef CHAR_BIT + #include +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef MIN + #define MIN(x,y) ((x)<(y)?(x):(y)) +#endif + +#ifndef MAX + #define MAX(x,y) ((x)>(y)?(x):(y)) +#endif + + +#ifndef NO_64BIT +/* autodetect x86-64 and make sure we are using 64-bit digits with x86-64 asm */ +#if defined(__x86_64__) + #if defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) + #error x86-64 detected, x86-32/SSE2/ARM optimizations are not valid! + #endif + #if !defined(TFM_X86_64) && !defined(TFM_NO_ASM) + #define TFM_X86_64 + #endif +#endif +#if defined(TFM_X86_64) + #if !defined(FP_64BIT) + #define FP_64BIT + #endif +#endif +/* use 64-bit digit even if not using asm on x86_64 */ +#if defined(__x86_64__) && !defined(FP_64BIT) + #define FP_64BIT +#endif +#endif /* NO_64BIT */ + +/* try to detect x86-32 */ +#if defined(__i386__) && !defined(TFM_SSE2) + #if defined(TFM_X86_64) || defined(TFM_ARM) + #error x86-32 detected, x86-64/ARM optimizations are not valid! + #endif + #if !defined(TFM_X86) && !defined(TFM_NO_ASM) + #define TFM_X86 + #endif +#endif + +/* make sure we're 32-bit for x86-32/sse/arm/ppc32 */ +#if (defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) || defined(TFM_PPC32)) && defined(FP_64BIT) + #warning x86-32, SSE2 and ARM, PPC32 optimizations require 32-bit digits (undefining) + #undef FP_64BIT +#endif + +/* multi asms? */ +#ifdef TFM_X86 + #define TFM_ASM +#endif +#ifdef TFM_X86_64 + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif +#ifdef TFM_SSE2 + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif +#ifdef TFM_ARM + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif +#ifdef TFM_PPC32 + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif +#ifdef TFM_PPC64 + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif +#ifdef TFM_AVR32 + #ifdef TFM_ASM + #error TFM_ASM already defined! + #endif + #define TFM_ASM +#endif + +/* we want no asm? */ +#ifdef TFM_NO_ASM + #undef TFM_X86 + #undef TFM_X86_64 + #undef TFM_SSE2 + #undef TFM_ARM + #undef TFM_PPC32 + #undef TFM_PPC64 + #undef TFM_AVR32 + #undef TFM_ASM +#endif + +/* ECC helpers */ +#ifdef TFM_ECC192 + #ifdef FP_64BIT + #define TFM_MUL3 + #define TFM_SQR3 + #else + #define TFM_MUL6 + #define TFM_SQR6 + #endif +#endif + +#ifdef TFM_ECC224 + #ifdef FP_64BIT + #define TFM_MUL4 + #define TFM_SQR4 + #else + #define TFM_MUL7 + #define TFM_SQR7 + #endif +#endif + +#ifdef TFM_ECC256 + #ifdef FP_64BIT + #define TFM_MUL4 + #define TFM_SQR4 + #else + #define TFM_MUL8 + #define TFM_SQR8 + #endif +#endif + +#ifdef TFM_ECC384 + #ifdef FP_64BIT + #define TFM_MUL6 + #define TFM_SQR6 + #else + #define TFM_MUL12 + #define TFM_SQR12 + #endif +#endif + +#ifdef TFM_ECC521 + #ifdef FP_64BIT + #define TFM_MUL9 + #define TFM_SQR9 + #else + #define TFM_MUL17 + #define TFM_SQR17 + #endif +#endif + + +/* some default configurations. + */ +#if defined(FP_64BIT) + /* for GCC only on supported platforms */ + typedef unsigned long long fp_digit; /* 64bit, 128 uses mode(TI) below */ + typedef unsigned long fp_word __attribute__ ((mode(TI))); +#else + #if defined(_MSC_VER) || defined(__BORLANDC__) + typedef unsigned __int64 ulong64; + #else + typedef unsigned long long ulong64; + #endif + + #ifndef NO_64BIT + typedef unsigned int fp_digit; + typedef ulong64 fp_word; + #else + /* some procs like coldfire prefer not to place multiply into 64bit type + even though it exists */ + typedef unsigned short fp_digit; + typedef unsigned int fp_word; + #endif +#endif + +/* # of digits this is */ +#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit)) + +/* Max size of any number in bits. Basically the largest size you will be + * multiplying should be half [or smaller] of FP_MAX_SIZE-four_digit + * + * It defaults to 4096-bits [allowing multiplications upto 2048x2048 bits ] + */ +#ifndef FP_MAX_BITS + #define FP_MAX_BITS 4096 +#endif +#define FP_MAX_SIZE (FP_MAX_BITS+(8*DIGIT_BIT)) + +/* will this lib work? */ +#if (CHAR_BIT & 7) + #error CHAR_BIT must be a multiple of eight. +#endif +#if FP_MAX_BITS % CHAR_BIT + #error FP_MAX_BITS must be a multiple of CHAR_BIT +#endif + +#define FP_MASK (fp_digit)(-1) +#define FP_SIZE (FP_MAX_SIZE/DIGIT_BIT) + +/* signs */ +#define FP_ZPOS 0 +#define FP_NEG 1 + +/* return codes */ +#define FP_OKAY 0 +#define FP_VAL 1 +#define FP_MEM 2 + +/* equalities */ +#define FP_LT -1 /* less than */ +#define FP_EQ 0 /* equal to */ +#define FP_GT 1 /* greater than */ + +/* replies */ +#define FP_YES 1 /* yes response */ +#define FP_NO 0 /* no response */ + +/* a FP type */ +typedef struct { + fp_digit dp[FP_SIZE]; + int used, + sign; +} fp_int; + +/* externally define this symbol to ignore the default settings, useful for changing the build from the make process */ +#ifndef TFM_ALREADY_SET + +/* do we want the large set of small multiplications ? + Enable these if you are going to be doing a lot of small (<= 16 digit) multiplications say in ECC + Or if you're on a 64-bit machine doing RSA as a 1024-bit integer == 16 digits ;-) + */ +/* need to refactor the function */ +/*#define TFM_SMALL_SET */ + +/* do we want huge code + Enable these if you are doing 20, 24, 28, 32, 48, 64 digit multiplications (useful for RSA) + Less important on 64-bit machines as 32 digits == 2048 bits + */ +#if 0 +#define TFM_MUL3 +#define TFM_MUL4 +#define TFM_MUL6 +#define TFM_MUL7 +#define TFM_MUL8 +#define TFM_MUL9 +#define TFM_MUL12 +#define TFM_MUL17 +#endif +#ifdef TFM_HUGE_SET +#define TFM_MUL20 +#define TFM_MUL24 +#define TFM_MUL28 +#define TFM_MUL32 +#if (FP_MAX_BITS >= 6144) && defined(FP_64BIT) + #define TFM_MUL48 +#endif +#if (FP_MAX_BITS >= 8192) && defined(FP_64BIT) + #define TFM_MUL64 +#endif +#endif + +#if 0 +#define TFM_SQR3 +#define TFM_SQR4 +#define TFM_SQR6 +#define TFM_SQR7 +#define TFM_SQR8 +#define TFM_SQR9 +#define TFM_SQR12 +#define TFM_SQR17 +#endif +#ifdef TFM_HUGE_SET +#define TFM_SQR20 +#define TFM_SQR24 +#define TFM_SQR28 +#define TFM_SQR32 +#define TFM_SQR48 +#define TFM_SQR64 +#endif + +/* do we want some overflow checks + Not required if you make sure your numbers are within range (e.g. by default a modulus for fp_exptmod() can only be upto 2048 bits long) + */ +/* #define TFM_CHECK */ + +/* Is the target a P4 Prescott + */ +/* #define TFM_PRESCOTT */ + +/* Do we want timing resistant fp_exptmod() ? + * This makes it slower but also timing invariant with respect to the exponent + */ +/* #define TFM_TIMING_RESISTANT */ + +#endif /* TFM_ALREADY_SET */ + +/* functions */ + +/* returns a TFM ident string useful for debugging... */ +/*const char *fp_ident(void);*/ + +/* initialize [or zero] an fp int */ +#define fp_init(a) (void)XMEMSET((a), 0, sizeof(fp_int)) +#define fp_zero(a) fp_init(a) + +/* zero/even/odd ? */ +#define fp_iszero(a) (((a)->used == 0) ? FP_YES : FP_NO) +#define fp_iseven(a) (((a)->used >= 0 && (((a)->dp[0] & 1) == 0)) ? FP_YES : FP_NO) +#define fp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? FP_YES : FP_NO) + +/* set to a small digit */ +void fp_set(fp_int *a, fp_digit b); + +/* copy from a to b */ +#define fp_copy(a, b) (void)(((a) != (b)) ? ((void)XMEMCPY((b), (a), sizeof(fp_int))) : (void)0) +#define fp_init_copy(a, b) fp_copy(b, a) + +/* clamp digits */ +#define fp_clamp(a) { while ((a)->used && (a)->dp[(a)->used-1] == 0) --((a)->used); (a)->sign = (a)->used ? (a)->sign : FP_ZPOS; } + +/* negate and absolute */ +#define fp_neg(a, b) { fp_copy(a, b); (b)->sign ^= 1; fp_clamp(b); } +#define fp_abs(a, b) { fp_copy(a, b); (b)->sign = 0; } + +/* right shift x digits */ +void fp_rshd(fp_int *a, int x); + +/* right shift x bits */ +void fp_rshb(fp_int *a, int x); + +/* left shift x digits */ +void fp_lshd(fp_int *a, int x); + +/* signed comparison */ +int fp_cmp(fp_int *a, fp_int *b); + +/* unsigned comparison */ +int fp_cmp_mag(fp_int *a, fp_int *b); + +/* power of 2 operations */ +void fp_div_2d(fp_int *a, int b, fp_int *c, fp_int *d); +void fp_mod_2d(fp_int *a, int b, fp_int *c); +void fp_mul_2d(fp_int *a, int b, fp_int *c); +void fp_2expt (fp_int *a, int b); +void fp_mul_2(fp_int *a, fp_int *c); +void fp_div_2(fp_int *a, fp_int *c); + +/* Counts the number of lsbs which are zero before the first zero bit */ +/*int fp_cnt_lsb(fp_int *a);*/ + +/* c = a + b */ +void fp_add(fp_int *a, fp_int *b, fp_int *c); + +/* c = a - b */ +void fp_sub(fp_int *a, fp_int *b, fp_int *c); + +/* c = a * b */ +void fp_mul(fp_int *a, fp_int *b, fp_int *c); + +/* b = a*a */ +void fp_sqr(fp_int *a, fp_int *b); + +/* a/b => cb + d == a */ +int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* c = a mod b, 0 <= c < b */ +int fp_mod(fp_int *a, fp_int *b, fp_int *c); + +/* compare against a single digit */ +int fp_cmp_d(fp_int *a, fp_digit b); + +/* c = a + b */ +void fp_add_d(fp_int *a, fp_digit b, fp_int *c); + +/* c = a - b */ +void fp_sub_d(fp_int *a, fp_digit b, fp_int *c); + +/* c = a * b */ +void fp_mul_d(fp_int *a, fp_digit b, fp_int *c); + +/* a/b => cb + d == a */ +/*int fp_div_d(fp_int *a, fp_digit b, fp_int *c, fp_digit *d);*/ + +/* c = a mod b, 0 <= c < b */ +/*int fp_mod_d(fp_int *a, fp_digit b, fp_digit *c);*/ + +/* ---> number theory <--- */ +/* d = a + b (mod c) */ +/*int fp_addmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d);*/ + +/* d = a - b (mod c) */ +/*int fp_submod(fp_int *a, fp_int *b, fp_int *c, fp_int *d);*/ + +/* d = a * b (mod c) */ +int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* c = a * a (mod b) */ +int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c); + +/* c = 1/a (mod b) */ +int fp_invmod(fp_int *a, fp_int *b, fp_int *c); + +/* c = (a, b) */ +/*void fp_gcd(fp_int *a, fp_int *b, fp_int *c);*/ + +/* c = [a, b] */ +/*void fp_lcm(fp_int *a, fp_int *b, fp_int *c);*/ + +/* setups the montgomery reduction */ +int fp_montgomery_setup(fp_int *a, fp_digit *mp); + +/* computes a = B**n mod b without division or multiplication useful for + * normalizing numbers in a Montgomery system. + */ +void fp_montgomery_calc_normalization(fp_int *a, fp_int *b); + +/* computes x/R == x (mod N) via Montgomery Reduction */ +void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); + +/* d = a**b (mod c) */ +int fp_exptmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* primality stuff */ + +/* perform a Miller-Rabin test of a to the base b and store result in "result" */ +/*void fp_prime_miller_rabin (fp_int * a, fp_int * b, int *result);*/ + +/* 256 trial divisions + 8 Miller-Rabins, returns FP_YES if probable prime */ +/*int fp_isprime(fp_int *a);*/ + +/* Primality generation flags */ +/*#define TFM_PRIME_BBS 0x0001 */ /* BBS style prime */ +/*#define TFM_PRIME_SAFE 0x0002 */ /* Safe prime (p-1)/2 == prime */ +/*#define TFM_PRIME_2MSB_OFF 0x0004 */ /* force 2nd MSB to 0 */ +/*#define TFM_PRIME_2MSB_ON 0x0008 */ /* force 2nd MSB to 1 */ + +/* callback for fp_prime_random, should fill dst with random bytes and return how many read [upto len] */ +/*typedef int tfm_prime_callback(unsigned char *dst, int len, void *dat);*/ + +/*#define fp_prime_random(a, t, size, bbs, cb, dat) fp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?TFM_PRIME_BBS:0, cb, dat)*/ + +/*int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback cb, void *dat);*/ + +/* radix conersions */ +int fp_count_bits(fp_int *a); +int fp_leading_bit(fp_int *a); + +int fp_unsigned_bin_size(fp_int *a); +void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c); +void fp_to_unsigned_bin(fp_int *a, unsigned char *b); + +/*int fp_signed_bin_size(fp_int *a);*/ +/*void fp_read_signed_bin(fp_int *a, unsigned char *b, int c);*/ +/*void fp_to_signed_bin(fp_int *a, unsigned char *b);*/ + +/*int fp_read_radix(fp_int *a, char *str, int radix);*/ +/*int fp_toradix(fp_int *a, char *str, int radix);*/ +/*int fp_toradix_n(fp_int * a, char *str, int radix, int maxlen);*/ + + +/* VARIOUS LOW LEVEL STUFFS */ +void s_fp_add(fp_int *a, fp_int *b, fp_int *c); +void s_fp_sub(fp_int *a, fp_int *b, fp_int *c); +void fp_reverse(unsigned char *s, int len); + +void fp_mul_comba(fp_int *a, fp_int *b, fp_int *c); + +#ifdef TFM_SMALL_SET +void fp_mul_comba_small(fp_int *a, fp_int *b, fp_int *c); +#endif + +#ifdef TFM_MUL3 +void fp_mul_comba3(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL4 +void fp_mul_comba4(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL6 +void fp_mul_comba6(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL7 +void fp_mul_comba7(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL8 +void fp_mul_comba8(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL9 +void fp_mul_comba9(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL12 +void fp_mul_comba12(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL17 +void fp_mul_comba17(fp_int *a, fp_int *b, fp_int *c); +#endif + +#ifdef TFM_MUL20 +void fp_mul_comba20(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL24 +void fp_mul_comba24(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL28 +void fp_mul_comba28(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL32 +void fp_mul_comba32(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL48 +void fp_mul_comba48(fp_int *a, fp_int *b, fp_int *c); +#endif +#ifdef TFM_MUL64 +void fp_mul_comba64(fp_int *a, fp_int *b, fp_int *c); +#endif + +void fp_sqr_comba(fp_int *a, fp_int *b); + +#ifdef TFM_SMALL_SET +void fp_sqr_comba_small(fp_int *a, fp_int *b); +#endif + +#ifdef TFM_SQR3 +void fp_sqr_comba3(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR4 +void fp_sqr_comba4(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR6 +void fp_sqr_comba6(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR7 +void fp_sqr_comba7(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR8 +void fp_sqr_comba8(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR9 +void fp_sqr_comba9(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR12 +void fp_sqr_comba12(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR17 +void fp_sqr_comba17(fp_int *a, fp_int *b); +#endif + +#ifdef TFM_SQR20 +void fp_sqr_comba20(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR24 +void fp_sqr_comba24(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR28 +void fp_sqr_comba28(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR32 +void fp_sqr_comba32(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR48 +void fp_sqr_comba48(fp_int *a, fp_int *b); +#endif +#ifdef TFM_SQR64 +void fp_sqr_comba64(fp_int *a, fp_int *b); +#endif +/*extern const char *fp_s_rmap;*/ + + +/** + * Used by CyaSSL + */ + +/* Types */ + typedef fp_digit mp_digit; + typedef fp_word mp_word; + typedef fp_int mp_int; + +/* Constants */ + #define MP_LT FP_LT /* less than */ + #define MP_EQ FP_EQ /* equal to */ + #define MP_GT FP_GT /* greater than */ + #define MP_OKAY FP_OKAY /* ok result */ + #define MP_NO FP_NO /* yes/no result */ + #define MP_YES FP_YES /* yes/no result */ + +/* Prototypes */ +int mp_init (mp_int * a); +void mp_clear (mp_int * a); +int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, mp_int* f); + +int mp_add (mp_int * a, mp_int * b, mp_int * c); +int mp_sub (mp_int * a, mp_int * b, mp_int * c); +int mp_add_d (mp_int * a, mp_digit b, mp_int * c); + +int mp_mul (mp_int * a, mp_int * b, mp_int * c); +int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d); +int mp_mod(mp_int *a, mp_int *b, mp_int *c); +int mp_invmod(mp_int *a, mp_int *b, mp_int *c); +int mp_exptmod (mp_int * g, mp_int * x, mp_int * p, mp_int * y); + +int mp_cmp(mp_int *a, mp_int *b); +int mp_cmp_d(mp_int *a, mp_digit b); + +int mp_unsigned_bin_size(mp_int * a); +int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c); +int mp_to_unsigned_bin (mp_int * a, unsigned char *b); + +int mp_sub_d(fp_int *a, fp_digit b, fp_int *c); +int mp_copy(fp_int* a, fp_int* b); +int mp_isodd(mp_int* a); +int mp_iszero(mp_int* a); +int mp_count_bits(mp_int *a); +int mp_leading_bit(mp_int *a); +int mp_set_int(fp_int *a, fp_digit b); +void mp_rshb(mp_int *a, int x); + +#ifdef HAVE_ECC + int mp_read_radix(mp_int* a, const char* str, int radix); + int mp_set(fp_int *a, fp_digit b); + int mp_sqr(fp_int *a, fp_int *b); + int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); + int mp_montgomery_setup(fp_int *a, fp_digit *rho); + int mp_div_2(fp_int * a, fp_int * b); + int mp_init_copy(fp_int * a, fp_int * b); +#endif + +#if defined(HAVE_ECC) || defined(CYASSL_KEY_GEN) + int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c); + int mp_montgomery_calc_normalization(mp_int *a, mp_int *b); +#endif + +#ifdef CYASSL_KEY_GEN +int mp_gcd(fp_int *a, fp_int *b, fp_int *c); +int mp_lcm(fp_int *a, fp_int *b, fp_int *c); +int mp_prime_is_prime(mp_int* a, int t, int* result); +#endif /* CYASSL_KEY_GEN */ + +CYASSL_API word32 CheckRunTimeFastMath(void); + +/* If user uses RSA, DH, DSA, or ECC math lib directly then fast math FP_SIZE + must match, return 1 if a match otherwise 0 */ +#define CheckFastMathSettings() (FP_SIZE == CheckRunTimeFastMath()) +#ifdef __cplusplus + } +#endif + + +#endif /* CTAO_CRYPT_TFM_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h new file mode 100644 index 00000000..194b50b7 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h @@ -0,0 +1,328 @@ +/* types.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CTAO_CRYPT_TYPES_H +#define CTAO_CRYPT_TYPES_H + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +#if defined(WORDS_BIGENDIAN) + #define BIG_ENDIAN_ORDER +#endif + +#ifndef BIG_ENDIAN_ORDER + #define LITTLE_ENDIAN_ORDER +#endif + +#ifndef CYASSL_TYPES + #ifndef byte + typedef unsigned char byte; + #endif + typedef unsigned short word16; + typedef unsigned int word32; +#endif + + +/* try to set SIZEOF_LONG or LONG_LONG if user didn't */ +#if !defined(_MSC_VER) && !defined(__BCPLUSPLUS__) + #if !defined(SIZEOF_LONG_LONG) && !defined(SIZEOF_LONG) + #if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) \ + || defined(__mips64) || defined(__x86_64__)) + /* long should be 64bit */ + #define SIZEOF_LONG 8 + #elif defined(__i386__) || defined(__CORTEX_M3__) + /* long long should be 64bit */ + #define SIZEOF_LONG_LONG 8 + #endif + #endif +#endif + + +#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) + #define WORD64_AVAILABLE + #define W64LIT(x) x##ui64 + typedef unsigned __int64 word64; +#elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8 + #define WORD64_AVAILABLE + #define W64LIT(x) x##LL + typedef unsigned long word64; +#elif defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG == 8 + #define WORD64_AVAILABLE + #define W64LIT(x) x##LL + typedef unsigned long long word64; +#elif defined(__SIZEOF_LONG_LONG__) && __SIZEOF_LONG_LONG__ == 8 + #define WORD64_AVAILABLE + #define W64LIT(x) x##LL + typedef unsigned long long word64; +#else + #define MP_16BIT /* for mp_int, mp_word needs to be twice as big as + mp_digit, no 64 bit type so make mp_digit 16 bit */ +#endif + + +/* These platforms have 64-bit CPU registers. */ +#if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \ + defined(__mips64) || defined(__x86_64__) || defined(_M_X64)) + typedef word64 word; +#else + typedef word32 word; + #ifdef WORD64_AVAILABLE + #define CTAOCRYPT_SLOW_WORD64 + #endif +#endif + + +enum { + CYASSL_WORD_SIZE = sizeof(word), + CYASSL_BIT_SIZE = 8, + CYASSL_WORD_BITS = CYASSL_WORD_SIZE * CYASSL_BIT_SIZE +}; + +#define CYASSL_MAX_16BIT 0xffffU + +/* use inlining if compiler allows */ +#ifndef INLINE +#ifndef NO_INLINE + #ifdef _MSC_VER + #define INLINE __inline + #elif defined(__GNUC__) + #define INLINE inline + #elif defined(__IAR_SYSTEMS_ICC__) + #define INLINE inline + #elif defined(THREADX) + #define INLINE _Inline + #else + #define INLINE + #endif +#else + #define INLINE +#endif +#endif + + +/* set up rotate style */ +#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) + #define INTEL_INTRINSICS + #define FAST_ROTATE +#elif defined(__MWERKS__) && TARGET_CPU_PPC + #define PPC_INTRINSICS + #define FAST_ROTATE +#elif defined(__GNUC__) && defined(__i386__) + /* GCC does peephole optimizations which should result in using rotate + instructions */ + #define FAST_ROTATE +#endif + + +/* set up thread local storage if available */ +#ifdef HAVE_THREAD_LS + #if defined(_MSC_VER) + #define THREAD_LS_T __declspec(thread) + #else + #define THREAD_LS_T __thread + #endif +#else + #define THREAD_LS_T +#endif + + +/* Micrium will use Visual Studio for compilation but not the Win32 API */ +#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \ + && !defined(EBSNET) + #define USE_WINDOWS_API +#endif + + +/* idea to add global alloc override by Moisés Guimarães */ +/* default to libc stuff */ +/* XREALLOC is used once in normal math lib, not in fast math lib */ +/* XFREE on some embeded systems doesn't like free(0) so test */ +#if defined(XMALLOC_USER) + /* prototypes for user heap override functions */ + #include /* for size_t */ + extern void *XMALLOC(size_t n, void* heap, int type); + extern void *XREALLOC(void *p, size_t n, void* heap, int type); + extern void XFREE(void *p, void* heap, int type); +#elif defined(NO_CYASSL_MEMORY) + /* just use plain C stdlib stuff if desired */ + #include + #define XMALLOC(s, h, t) ((void)h, (void)t, malloc((s))) + #define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));} + #define XREALLOC(p, n, h, t) realloc((p), (n)) +#elif !defined(MICRIUM_MALLOC) && !defined(EBSNET) \ + && !defined(CYASSL_SAFERTOS) && !defined(FREESCALE_MQX) \ + && !defined(CYASSL_LEANPSK) + /* default C runtime, can install different routines at runtime via cbs */ + #include + #define XMALLOC(s, h, t) ((void)h, (void)t, CyaSSL_Malloc((s))) + #define XFREE(p, h, t) {void* xp = (p); if((xp)) CyaSSL_Free((xp));} + #define XREALLOC(p, n, h, t) CyaSSL_Realloc((p), (n)) +#endif + +#ifndef STRING_USER + #include + char* mystrnstr(const char* s1, const char* s2, unsigned int n); + + #define XMEMCPY(d,s,l) memcpy((d),(s),(l)) + #define XMEMSET(b,c,l) memset((b),(c),(l)) + #define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n)) + #define XMEMMOVE(d,s,l) memmove((d),(s),(l)) + + #define XSTRLEN(s1) strlen((s1)) + #define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n)) + /* strstr, strncmp, and strncat only used by CyaSSL proper, not required for + CTaoCrypt only */ + #define XSTRSTR(s1,s2) strstr((s1),(s2)) + #define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n)) + #define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n)) + #define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n)) + #ifndef USE_WINDOWS_API + #define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n)) + #define XSNPRINTF snprintf + #else + #define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n)) + #define XSNPRINTF _snprintf + #endif +#endif + +#ifndef CTYPE_USER + #include + #if defined(HAVE_ECC) || defined(HAVE_OCSP) + #define XTOUPPER(c) toupper((c)) + #define XISALPHA(c) isalpha((c)) + #endif + /* needed by CyaSSL_check_domain_name() */ + #ifdef __CYGWIN__ + /* Cygwin uses a macro version of tolower() by default, use the + * function version. */ + #undef tolower + #endif + #define XTOLOWER(c) tolower((c)) +#endif + + +/* memory allocation types for user hints */ +enum { + DYNAMIC_TYPE_CA = 1, + DYNAMIC_TYPE_CERT = 2, + DYNAMIC_TYPE_KEY = 3, + DYNAMIC_TYPE_FILE = 4, + DYNAMIC_TYPE_SUBJECT_CN = 5, + DYNAMIC_TYPE_PUBLIC_KEY = 6, + DYNAMIC_TYPE_SIGNER = 7, + DYNAMIC_TYPE_NONE = 8, + DYNAMIC_TYPE_BIGINT = 9, + DYNAMIC_TYPE_RSA = 10, + DYNAMIC_TYPE_METHOD = 11, + DYNAMIC_TYPE_OUT_BUFFER = 12, + DYNAMIC_TYPE_IN_BUFFER = 13, + DYNAMIC_TYPE_INFO = 14, + DYNAMIC_TYPE_DH = 15, + DYNAMIC_TYPE_DOMAIN = 16, + DYNAMIC_TYPE_SSL = 17, + DYNAMIC_TYPE_CTX = 18, + DYNAMIC_TYPE_WRITEV = 19, + DYNAMIC_TYPE_OPENSSL = 20, + DYNAMIC_TYPE_DSA = 21, + DYNAMIC_TYPE_CRL = 22, + DYNAMIC_TYPE_REVOKED = 23, + DYNAMIC_TYPE_CRL_ENTRY = 24, + DYNAMIC_TYPE_CERT_MANAGER = 25, + DYNAMIC_TYPE_CRL_MONITOR = 26, + DYNAMIC_TYPE_OCSP_STATUS = 27, + DYNAMIC_TYPE_OCSP_ENTRY = 28, + DYNAMIC_TYPE_ALTNAME = 29, + DYNAMIC_TYPE_SUITES = 30, + DYNAMIC_TYPE_CIPHER = 31, + DYNAMIC_TYPE_RNG = 32, + DYNAMIC_TYPE_ARRAYS = 33, + DYNAMIC_TYPE_DTLS_POOL = 34, + DYNAMIC_TYPE_SOCKADDR = 35, + DYNAMIC_TYPE_LIBZ = 36, + DYNAMIC_TYPE_ECC = 37, + DYNAMIC_TYPE_TMP_BUFFER = 38, + DYNAMIC_TYPE_DTLS_MSG = 39, + DYNAMIC_TYPE_CAVIUM_TMP = 40, + DYNAMIC_TYPE_CAVIUM_RSA = 41, + DYNAMIC_TYPE_X509 = 42, + DYNAMIC_TYPE_TLSX = 43, + DYNAMIC_TYPE_OCSP = 44, + DYNAMIC_TYPE_SIGNATURE = 45 +}; + +/* max error buffer string size */ +enum { + CYASSL_MAX_ERROR_SZ = 80 +}; + +/* stack protection */ +enum { + MIN_STACK_BUFFER = 8 +}; + + + +/* settings detection for compile vs runtime math incombatibilities */ +enum { +#if !defined(USE_FAST_MATH) && !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG) + CTC_SETTINGS = 0x0 +#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) + CTC_SETTINGS = 0x1 +#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 8) + CTC_SETTINGS = 0x2 +#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 4) + CTC_SETTINGS = 0x4 +#elif defined(USE_FAST_MATH) && !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG) + CTC_SETTINGS = 0x8 +#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) + CTC_SETTINGS = 0x10 +#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 8) + CTC_SETTINGS = 0x20 +#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 4) + CTC_SETTINGS = 0x40 +#else + #error "bad math long / long long settings" +#endif +}; + + +CYASSL_API word32 CheckRunTimeSettings(void); + +/* If user uses RSA, DH, DSA, or ECC math lib directly then fast math and long + types need to match at compile time and run time, CheckCtcSettings will + return 1 if a match otherwise 0 */ +#define CheckCtcSettings() (CTC_SETTINGS == CheckRunTimeSettings()) + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CTAO_CRYPT_TYPES_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h new file mode 100644 index 00000000..a3b27812 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h @@ -0,0 +1,69 @@ +/* visibility.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* Visibility control macros */ + + +#ifndef CTAO_CRYPT_VISIBILITY_H +#define CTAO_CRYPT_VISIBILITY_H + + +/* CYASSL_API is used for the public API symbols. + It either imports or exports (or does nothing for static builds) + + CYASSL_LOCAL is used for non-API symbols (private). +*/ + +#if defined(BUILDING_CYASSL) + #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY + #define CYASSL_API __attribute__ ((visibility("default"))) + #define CYASSL_LOCAL __attribute__ ((visibility("hidden"))) + #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) + #define CYASSL_API __global + #define CYASSL_LOCAL __hidden + #elif defined(_MSC_VER) + #ifdef CYASSL_DLL + #define CYASSL_API extern __declspec(dllexport) + #else + #define CYASSL_API + #endif + #define CYASSL_LOCAL + #else + #define CYASSL_API + #define CYASSL_LOCAL + #endif /* HAVE_VISIBILITY */ +#else /* BUILDING_CYASSL */ + #if defined(_MSC_VER) + #ifdef CYASSL_DLL + #define CYASSL_API extern __declspec(dllimport) + #else + #define CYASSL_API + #endif + #define CYASSL_LOCAL + #else + #define CYASSL_API + #define CYASSL_LOCAL + #endif +#endif /* BUILDING_CYASSL */ + + +#endif /* CTAO_CRYPT_VISIBILITY_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/error-ssl.h b/project1/cyassl-3.0.0/cyassl/error-ssl.h new file mode 100644 index 00000000..74445b40 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/error-ssl.h @@ -0,0 +1,149 @@ +/* error-ssl.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_ERROR_H +#define CYASSL_ERROR_H + +#include /* pull in CTaoCrypt errors */ + +#ifdef __cplusplus + extern "C" { +#endif + +enum CyaSSL_ErrorCodes { + INPUT_CASE_ERROR = -201, /* process input state error */ + PREFIX_ERROR = -202, /* bad index to key rounds */ + MEMORY_ERROR = -203, /* out of memory */ + VERIFY_FINISHED_ERROR = -204, /* verify problem on finished */ + VERIFY_MAC_ERROR = -205, /* verify mac problem */ + PARSE_ERROR = -206, /* parse error on header */ + UNKNOWN_HANDSHAKE_TYPE = -207, /* weird handshake type */ + SOCKET_ERROR_E = -208, /* error state on socket */ + SOCKET_NODATA = -209, /* expected data, not there */ + INCOMPLETE_DATA = -210, /* don't have enough data to + complete task */ + UNKNOWN_RECORD_TYPE = -211, /* unknown type in record hdr */ + DECRYPT_ERROR = -212, /* error during decryption */ + FATAL_ERROR = -213, /* recvd alert fatal error */ + ENCRYPT_ERROR = -214, /* error during encryption */ + FREAD_ERROR = -215, /* fread problem */ + NO_PEER_KEY = -216, /* need peer's key */ + NO_PRIVATE_KEY = -217, /* need the private key */ + RSA_PRIVATE_ERROR = -218, /* error during rsa priv op */ + NO_DH_PARAMS = -219, /* server missing DH params */ + BUILD_MSG_ERROR = -220, /* build message failure */ + + BAD_HELLO = -221, /* client hello malformed */ + DOMAIN_NAME_MISMATCH = -222, /* peer subject name mismatch */ + WANT_READ = -223, /* want read, call again */ + NOT_READY_ERROR = -224, /* handshake layer not ready */ + PMS_VERSION_ERROR = -225, /* pre m secret version error */ + VERSION_ERROR = -226, /* record layer version error */ + WANT_WRITE = -227, /* want write, call again */ + BUFFER_ERROR = -228, /* malformed buffer input */ + VERIFY_CERT_ERROR = -229, /* verify cert error */ + VERIFY_SIGN_ERROR = -230, /* verify sign error */ + CLIENT_ID_ERROR = -231, /* psk client identity error */ + SERVER_HINT_ERROR = -232, /* psk server hint error */ + PSK_KEY_ERROR = -233, /* psk key error */ + ZLIB_INIT_ERROR = -234, /* zlib init error */ + ZLIB_COMPRESS_ERROR = -235, /* zlib compression error */ + ZLIB_DECOMPRESS_ERROR = -236, /* zlib decompression error */ + + GETTIME_ERROR = -237, /* gettimeofday failed ??? */ + GETITIMER_ERROR = -238, /* getitimer failed ??? */ + SIGACT_ERROR = -239, /* sigaction failed ??? */ + SETITIMER_ERROR = -240, /* setitimer failed ??? */ + LENGTH_ERROR = -241, /* record layer length error */ + PEER_KEY_ERROR = -242, /* can't decode peer key */ + ZERO_RETURN = -243, /* peer sent close notify */ + SIDE_ERROR = -244, /* wrong client/server type */ + NO_PEER_CERT = -245, /* peer didn't send key */ + NTRU_KEY_ERROR = -246, /* NTRU key error */ + NTRU_DRBG_ERROR = -247, /* NTRU drbg error */ + NTRU_ENCRYPT_ERROR = -248, /* NTRU encrypt error */ + NTRU_DECRYPT_ERROR = -249, /* NTRU decrypt error */ + ECC_CURVETYPE_ERROR = -250, /* Bad ECC Curve Type */ + ECC_CURVE_ERROR = -251, /* Bad ECC Curve */ + ECC_PEERKEY_ERROR = -252, /* Bad Peer ECC Key */ + ECC_MAKEKEY_ERROR = -253, /* Bad Make ECC Key */ + ECC_EXPORT_ERROR = -254, /* Bad ECC Export Key */ + ECC_SHARED_ERROR = -255, /* Bad ECC Shared Secret */ + NOT_CA_ERROR = -257, /* Not a CA cert error */ + BAD_PATH_ERROR = -258, /* Bad path for opendir */ + BAD_CERT_MANAGER_ERROR = -259, /* Bad Cert Manager */ + OCSP_CERT_REVOKED = -260, /* OCSP Certificate revoked */ + CRL_CERT_REVOKED = -261, /* CRL Certificate revoked */ + CRL_MISSING = -262, /* CRL Not loaded */ + MONITOR_RUNNING_E = -263, /* CRL Monitor already running */ + THREAD_CREATE_E = -264, /* Thread Create Error */ + OCSP_NEED_URL = -265, /* OCSP need an URL for lookup */ + OCSP_CERT_UNKNOWN = -266, /* OCSP responder doesn't know */ + OCSP_LOOKUP_FAIL = -267, /* OCSP lookup not successful */ + MAX_CHAIN_ERROR = -268, /* max chain depth exceeded */ + COOKIE_ERROR = -269, /* dtls cookie error */ + SEQUENCE_ERROR = -270, /* dtls sequence error */ + SUITES_ERROR = -271, /* suites pointer error */ + SSL_NO_PEM_HEADER = -272, /* no PEM header found */ + OUT_OF_ORDER_E = -273, /* out of order message */ + BAD_KEA_TYPE_E = -274, /* bad KEA type found */ + SANITY_CIPHER_E = -275, /* sanity check on cipher error */ + RECV_OVERFLOW_E = -276, /* RXCB returned more than rqed */ + GEN_COOKIE_E = -277, /* Generate Cookie Error */ + NO_PEER_VERIFY = -278, /* Need peer cert verify Error */ + FWRITE_ERROR = -279, /* fwrite problem */ + CACHE_MATCH_ERROR = -280, /* chache hdr match error */ + UNKNOWN_SNI_HOST_NAME_E = -281, /* Unrecognized host name Error */ + UNKNOWN_MAX_FRAG_LEN_E = -282, /* Unrecognized max frag len Error */ + /* add strings to SetErrorString !!!!! */ + KEYUSE_SIGNATURE_E = -283, /* KeyUse digSignature error */ + KEYUSE_ENCIPHER_E = -285, /* KeyUse keyEncipher error */ + EXTKEYUSE_AUTH_E = -286, /* ExtKeyUse server|client_auth */ + + /* begin negotiation parameter errors */ + UNSUPPORTED_SUITE = -290, /* unsupported cipher suite */ + MATCH_SUITE_ERROR = -291 /* can't match cipher suite */ + /* end negotiation parameter errors only 10 for now */ + /* add strings to SetErrorString !!!!! */ +}; + + +#ifdef CYASSL_CALLBACKS + enum { + MIN_PARAM_ERR = UNSUPPORTED_SUITE, + MAX_PARAM_ERR = MIN_PARAM_ERR - 10 + }; +#endif + + +CYASSL_LOCAL +void SetErrorString(int err, char* buff); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CyaSSL_ERROR_H */ + + diff --git a/project1/cyassl-3.0.0/cyassl/include.am b/project1/cyassl-3.0.0/cyassl/include.am new file mode 100644 index 00000000..db1f089e --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/include.am @@ -0,0 +1,25 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +include cyassl/ctaocrypt/include.am +include cyassl/openssl/include.am + +EXTRA_DIST+= cyassl/sniffer_error.rc + +nobase_include_HEADERS+= \ + cyassl/error-ssl.h \ + cyassl/ssl.h \ + cyassl/sniffer_error.h \ + cyassl/sniffer.h \ + cyassl/callbacks.h \ + cyassl/certs_test.h \ + cyassl/test.h \ + cyassl/version.h \ + cyassl/options.h \ + cyassl/ocsp.h \ + cyassl/crl.h + +noinst_HEADERS+= \ + cyassl/internal.h + diff --git a/project1/cyassl-3.0.0/cyassl/internal.h b/project1/cyassl-3.0.0/cyassl/internal.h new file mode 100644 index 00000000..b2dd3cc6 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/internal.h @@ -0,0 +1,2143 @@ +/* internal.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_INT_H +#define CYASSL_INT_H + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef NO_RC4 + #include +#endif +#ifdef HAVE_ECC + #include +#endif +#ifndef NO_SHA256 + #include +#endif +#ifdef HAVE_OCSP + #include +#endif +#ifdef CYASSL_SHA512 + #include +#endif + +#ifdef HAVE_AESGCM + #include +#endif + +#ifdef CYASSL_RIPEMD + #include +#endif + +#ifdef CYASSL_CALLBACKS + #include + #include +#endif + +#ifdef USE_WINDOWS_API + #ifdef CYASSL_GAME_BUILD + #include "system/xtl.h" + #else + #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) + /* On WinCE winsock2.h must be included before windows.h */ + #include + #endif + #include + #endif +#elif defined(THREADX) + #ifndef SINGLE_THREADED + #include "tx_api.h" + #endif +#elif defined(MICRIUM) + /* do nothing, just don't pick Unix */ +#elif defined(FREERTOS) || defined(CYASSL_SAFERTOS) + /* do nothing */ +#elif defined(EBSNET) + /* do nothing */ +#elif defined(FREESCALE_MQX) + /* do nothing */ +#elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #else + #include + #endif +#elif defined(MBED) + +#else + #ifndef SINGLE_THREADED + #define CYASSL_PTHREADS + #include + #endif + #if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) + #include /* for close of BIO */ + #endif +#endif + + +#ifdef HAVE_LIBZ + #include "zlib.h" +#endif + +#ifdef _MSC_VER + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable: 4996) +#endif + +#ifdef NO_AES + #if !defined (ALIGN16) + #define ALIGN16 + #endif +#endif + +#ifdef NO_SHA + #define SHA_DIGEST_SIZE 20 +#endif + +#ifdef NO_SHA256 + #define SHA256_DIGEST_SIZE 32 +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef USE_WINDOWS_API + typedef unsigned int SOCKET_T; +#else + typedef int SOCKET_T; +#endif + + +typedef byte word24[3]; + +/* used by ssl.c and cyassl_int.c */ +void c32to24(word32 in, word24 out); + +/* Define or comment out the cipher suites you'd like to be compiled in + make sure to use at least one BUILD_SSL_xxx or BUILD_TLS_xxx is defined + + When adding cipher suites, add name to cipher_names, idx to cipher_name_idx +*/ +#if !defined(NO_RSA) && !defined(NO_RC4) + #if !defined(NO_SHA) + #define BUILD_SSL_RSA_WITH_RC4_128_SHA + #endif + #if !defined(NO_MD5) + #define BUILD_SSL_RSA_WITH_RC4_128_MD5 + #endif + #if !defined(NO_TLS) && defined(HAVE_NTRU) && !defined(NO_SHA) + #define BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA + #endif +#endif + +#if !defined(NO_RSA) && !defined(NO_DES3) + #if !defined(NO_SHA) + #define BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA + #if !defined(NO_TLS) && defined(HAVE_NTRU) + #define BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA + #endif + #endif +#endif + +#if !defined(NO_RSA) && !defined(NO_AES) && !defined(NO_TLS) + #if !defined(NO_SHA) + #define BUILD_TLS_RSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_RSA_WITH_AES_256_CBC_SHA + #if defined(HAVE_NTRU) + #define BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA + #endif + #endif + #if !defined (NO_SHA256) + #define BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 + #define BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 + #endif + #if defined (HAVE_AESGCM) + #define BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 + #if defined (CYASSL_SHA384) + #define BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 + #endif + #endif + #if defined (HAVE_AESCCM) + #define BUILD_TLS_RSA_WITH_AES_128_CCM_8 + #define BUILD_TLS_RSA_WITH_AES_256_CCM_8 + #endif + #if defined(HAVE_BLAKE2) + #define BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 + #define BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 + #endif +#endif + +#if defined(HAVE_CAMELLIA) && !defined(NO_TLS) + #ifndef NO_RSA + #if !defined(NO_SHA) + #define BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA + #define BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA + #endif + #ifndef NO_SHA256 + #define BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 + #define BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 + #endif + #if !defined(NO_DH) && defined(OPENSSL_EXTRA) + #if !defined(NO_SHA) + #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA + #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA + #endif + #ifndef NO_SHA256 + #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 + #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 + #endif + #endif + #endif +#endif + +#if !defined(NO_PSK) && !defined(NO_AES) && !defined(NO_TLS) + #if !defined(NO_SHA) + #define BUILD_TLS_PSK_WITH_AES_128_CBC_SHA + #define BUILD_TLS_PSK_WITH_AES_256_CBC_SHA + #endif + #ifndef NO_SHA256 + #define BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 + #ifdef HAVE_AESCCM + #define BUILD_TLS_PSK_WITH_AES_128_CCM_8 + #define BUILD_TLS_PSK_WITH_AES_256_CCM_8 + #endif + #endif +#endif + +#if !defined(NO_TLS) && defined(HAVE_NULL_CIPHER) + #if !defined(NO_RSA) + #if !defined(NO_SHA) + #define BUILD_TLS_RSA_WITH_NULL_SHA + #endif + #ifndef NO_SHA256 + #define BUILD_TLS_RSA_WITH_NULL_SHA256 + #endif + #endif + #if !defined(NO_PSK) + #if !defined(NO_SHA) + #define BUILD_TLS_PSK_WITH_NULL_SHA + #endif + #ifndef NO_SHA256 + #define BUILD_TLS_PSK_WITH_NULL_SHA256 + #endif + #endif +#endif + +#if !defined(NO_HC128) && !defined(NO_RSA) && !defined(NO_TLS) + #define BUILD_TLS_RSA_WITH_HC_128_MD5 + #if !defined(NO_SHA) + #define BUILD_TLS_RSA_WITH_HC_128_SHA + #endif + #if defined(HAVE_BLAKE2) + #define BUILD_TLS_RSA_WITH_HC_128_B2B256 + #endif +#endif + +#if !defined(NO_RABBIT) && !defined(NO_TLS) && !defined(NO_RSA) + #if !defined(NO_SHA) + #define BUILD_TLS_RSA_WITH_RABBIT_SHA + #endif +#endif + +#if !defined(NO_DH) && !defined(NO_AES) && !defined(NO_TLS) && \ + !defined(NO_RSA) && defined(OPENSSL_EXTRA) + #if !defined(NO_SHA) + #define BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA + #endif + #if !defined (NO_SHA256) + #define BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 + #define BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 + #if defined (HAVE_AESGCM) + #define BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + #if defined (CYASSL_SHA384) + #define BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 + #endif + #endif + #endif +#endif + +#if defined(HAVE_ECC) && !defined(NO_TLS) + #if !defined(NO_AES) + #if !defined(NO_SHA) + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + #define BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA + #endif + + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA + #endif /* NO_SHA */ + #ifndef NO_SHA256 + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + #define BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 + #endif + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 + #endif + + #ifdef CYASSL_SHA384 + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 + #define BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 + #endif + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 + #endif + + #if defined (HAVE_AESGCM) + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + #define BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 + #if defined(CYASSL_SHA384) + #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + #define BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 + #endif + #endif + + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 + + #if defined(CYASSL_SHA384) + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 + #endif + #endif + #if defined (HAVE_AESCCM) + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 + #endif + #endif /* NO_AES */ + #if !defined(NO_RC4) + #if !defined(NO_SHA) + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA + #define BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA + #endif + + #define BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + #define BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA + #endif + #endif + #if !defined(NO_DES3) + #if !defined(NO_RSA) + #define BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + #define BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA + #endif + + #define BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA + #define BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA + #endif +#endif + + +#if defined(BUILD_SSL_RSA_WITH_RC4_128_SHA) || \ + defined(BUILD_SSL_RSA_WITH_RC4_128_MD5) + #define BUILD_ARC4 +#endif + +#if defined(BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA) + #define BUILD_DES3 +#endif + +#if defined(BUILD_TLS_RSA_WITH_AES_128_CBC_SHA) || \ + defined(BUILD_TLS_RSA_WITH_AES_256_CBC_SHA) || \ + defined(BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) + #undef BUILD_AES + #define BUILD_AES +#endif + +#if defined(BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256) || \ + defined(BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) + #define BUILD_AESGCM +#endif + +#if defined(BUILD_TLS_RSA_WITH_HC_128_SHA) || \ + defined(BUILD_TLS_RSA_WITH_HC_128_MD5) || \ + defined(BUILD_TLS_RSA_WITH_HC_128_B2B256) + #define BUILD_HC128 +#endif + +#if defined(BUILD_TLS_RSA_WITH_RABBIT_SHA) + #define BUILD_RABBIT +#endif + +#ifdef NO_DES3 + #define DES_BLOCK_SIZE 8 +#else + #undef BUILD_DES3 + #define BUILD_DES3 +#endif + +#ifdef NO_AES + #define AES_BLOCK_SIZE 16 +#else + #undef BUILD_AES + #define BUILD_AES +#endif + +#ifndef NO_RC4 + #undef BUILD_ARC4 + #define BUILD_ARC4 +#endif + + + +#if defined(BUILD_AESGCM) || defined(HAVE_AESCCM) + #define HAVE_AEAD +#endif + + +/* actual cipher values, 2nd byte */ +enum { + TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x39, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x33, + TLS_RSA_WITH_AES_256_CBC_SHA = 0x35, + TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F, + TLS_RSA_WITH_NULL_SHA = 0x02, + TLS_PSK_WITH_AES_256_CBC_SHA = 0x8d, + TLS_PSK_WITH_AES_128_CBC_SHA256 = 0xae, + TLS_PSK_WITH_AES_128_CBC_SHA = 0x8c, + TLS_PSK_WITH_NULL_SHA256 = 0xb0, + TLS_PSK_WITH_NULL_SHA = 0x2c, + SSL_RSA_WITH_RC4_128_SHA = 0x05, + SSL_RSA_WITH_RC4_128_MD5 = 0x04, + SSL_RSA_WITH_3DES_EDE_CBC_SHA = 0x0A, + + /* ECC suites, first byte is 0xC0 (ECC_BYTE) */ + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0x14, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0x13, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0x0A, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0x09, + TLS_ECDHE_RSA_WITH_RC4_128_SHA = 0x11, + TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = 0x07, + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x12, + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = 0x08, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0x27, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0x23, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0x28, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0x24, + + /* static ECDH, first byte is 0xC0 (ECC_BYTE) */ + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = 0x0F, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = 0x0E, + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = 0x05, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = 0x04, + TLS_ECDH_RSA_WITH_RC4_128_SHA = 0x0C, + TLS_ECDH_ECDSA_WITH_RC4_128_SHA = 0x02, + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0D, + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = 0x03, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = 0x29, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = 0x25, + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = 0x2A, + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = 0x26, + + /* CyaSSL extension - eSTREAM */ + TLS_RSA_WITH_HC_128_MD5 = 0xFB, + TLS_RSA_WITH_HC_128_SHA = 0xFC, + TLS_RSA_WITH_RABBIT_SHA = 0xFD, + + /* CyaSSL extension - Blake2b 256 */ + TLS_RSA_WITH_AES_128_CBC_B2B256 = 0xF8, + TLS_RSA_WITH_AES_256_CBC_B2B256 = 0xF9, + TLS_RSA_WITH_HC_128_B2B256 = 0xFA, /* eSTREAM too */ + + /* CyaSSL extension - NTRU */ + TLS_NTRU_RSA_WITH_RC4_128_SHA = 0xe5, + TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA = 0xe6, + TLS_NTRU_RSA_WITH_AES_128_CBC_SHA = 0xe7, /* clases w/ official SHA-256 */ + TLS_NTRU_RSA_WITH_AES_256_CBC_SHA = 0xe8, + + /* SHA256 */ + TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x6b, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x67, + TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x3d, + TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x3c, + TLS_RSA_WITH_NULL_SHA256 = 0x3b, + + /* AES-GCM */ + TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x9c, + TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x9d, + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x9e, + TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x9f, + + /* ECC AES-GCM, first byte is 0xC0 (ECC_BYTE) */ + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2b, + TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0x2c, + TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2d, + TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = 0x2e, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0x2f, + TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0x30, + TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0x31, + TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0x32, + + /* AES-CCM, first byte is 0xC0 but isn't ECC, + * also, in some of the other AES-CCM suites + * there will be second byte number conflicts + * with non-ECC AES-GCM */ + TLS_RSA_WITH_AES_128_CCM_8 = 0xa0, + TLS_RSA_WITH_AES_256_CCM_8 = 0xa1, + TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xae, + TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 = 0xaf, + TLS_PSK_WITH_AES_128_CCM = 0xa4, + TLS_PSK_WITH_AES_256_CCM = 0xa5, + TLS_PSK_WITH_AES_128_CCM_8 = 0xa8, + TLS_PSK_WITH_AES_256_CCM_8 = 0xa9, + + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x41, + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x84, + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xba, + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0xc0, + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x45, + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x88, + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xbe, + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0xc4, + + /* Renegotiation Indication Extension Special Suite */ + TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0xff +}; + + +enum Misc { + ECC_BYTE = 0xC0, /* ECC first cipher suite byte */ + + SEND_CERT = 1, + SEND_BLANK_CERT = 2, + + DTLS_MAJOR = 0xfe, /* DTLS major version number */ + DTLS_MINOR = 0xff, /* DTLS minor version number */ + DTLSv1_2_MINOR = 0xfd, /* DTLS minor version number */ + SSLv3_MAJOR = 3, /* SSLv3 and TLSv1+ major version number */ + SSLv3_MINOR = 0, /* TLSv1 minor version number */ + TLSv1_MINOR = 1, /* TLSv1 minor version number */ + TLSv1_1_MINOR = 2, /* TLSv1_1 minor version number */ + TLSv1_2_MINOR = 3, /* TLSv1_2 minor version number */ + INVALID_BYTE = 0xff, /* Used to initialize cipher specs values */ + NO_COMPRESSION = 0, + ZLIB_COMPRESSION = 221, /* CyaSSL zlib compression */ + HELLO_EXT_SIG_ALGO = 13, /* ID for the sig_algo hello extension */ + SECRET_LEN = 48, /* pre RSA and all master */ + ENCRYPT_LEN = 512, /* allow 4096 bit static buffer */ + SIZEOF_SENDER = 4, /* clnt or srvr */ + FINISHED_SZ = 36, /* MD5_DIGEST_SIZE + SHA_DIGEST_SIZE */ + MAX_RECORD_SIZE = 16384, /* 2^14, max size by standard */ + MAX_MSG_EXTRA = 38 + MAX_DIGEST_SIZE, + /* max added to msg, mac + pad from */ + /* RECORD_HEADER_SZ + BLOCK_SZ (pad) + Max + digest sz + BLOC_SZ (iv) + pad byte (1) */ + MAX_COMP_EXTRA = 1024, /* max compression extra */ + MAX_MTU = 1500, /* max expected MTU */ + MAX_UDP_SIZE = 8192 - 100, /* was MAX_MTU - 100 */ + MAX_DH_SZ = 612, /* 2240 p, pub, g + 2 byte size for each */ + MAX_STR_VERSION = 8, /* string rep of protocol version */ + + PAD_MD5 = 48, /* pad length for finished */ + PAD_SHA = 40, /* pad length for finished */ + MAX_PAD_SIZE = 256, /* maximum length of padding */ + COMPRESS_DUMMY_SIZE = 64, /* compression dummy round size */ + COMPRESS_CONSTANT = 13, /* compression calc constant */ + COMPRESS_UPPER = 55, /* compression calc numerator */ + COMPRESS_LOWER = 64, /* compression calc denominator */ + + PEM_LINE_LEN = 80, /* PEM line max + fudge */ + LENGTH_SZ = 2, /* length field for HMAC, data only */ + VERSION_SZ = 2, /* length of proctocol version */ + SEQ_SZ = 8, /* 64 bit sequence number */ + BYTE3_LEN = 3, /* up to 24 bit byte lengths */ + ALERT_SIZE = 2, /* level + description */ + VERIFY_HEADER = 2, /* always use 2 bytes */ + EXT_ID_SZ = 2, /* always use 2 bytes */ + MAX_DH_SIZE = 513, /* 4096 bit plus possible leading 0 */ + + MAX_SUITE_SZ = 200, /* 100 suites for now! */ + RAN_LEN = 32, /* random length */ + SEED_LEN = RAN_LEN * 2, /* tls prf seed length */ + ID_LEN = 32, /* session id length */ + MAX_COOKIE_LEN = 32, /* max dtls cookie size */ + COOKIE_SZ = 20, /* use a 20 byte cookie */ + SUITE_LEN = 2, /* cipher suite sz length */ + ENUM_LEN = 1, /* always a byte */ + OPAQUE8_LEN = 1, /* 1 byte */ + OPAQUE16_LEN = 2, /* 2 bytes */ + OPAQUE24_LEN = 3, /* 3 bytes */ + COMP_LEN = 1, /* compression length */ + CURVE_LEN = 2, /* ecc named curve length */ + SERVER_ID_LEN = 20, /* server session id length */ + + HANDSHAKE_HEADER_SZ = 4, /* type + length(3) */ + RECORD_HEADER_SZ = 5, /* type + version + len(2) */ + CERT_HEADER_SZ = 3, /* always 3 bytes */ + REQ_HEADER_SZ = 2, /* cert request header sz */ + HINT_LEN_SZ = 2, /* length of hint size field */ + TRUNCATED_HMAC_SZ = 10, /* length of hmac w/ truncated hmac extension */ + HELLO_EXT_TYPE_SZ = 2, /* length of a hello extension type */ + HELLO_EXT_SZ = 8, /* total length of the lazy hello extensions */ + HELLO_EXT_LEN = 6, /* length of the lazy hello extensions */ + HELLO_EXT_SIGALGO_SZ = 2, /* length of signature algo extension */ + HELLO_EXT_SIGALGO_MAX = 32, /* number of items in the signature algo list */ + + DTLS_HANDSHAKE_HEADER_SZ = 12, /* normal + seq(2) + offset(3) + length(3) */ + DTLS_RECORD_HEADER_SZ = 13, /* normal + epoch(2) + seq_num(6) */ + DTLS_HANDSHAKE_EXTRA = 8, /* diff from normal */ + DTLS_RECORD_EXTRA = 8, /* diff from normal */ + DTLS_HANDSHAKE_SEQ_SZ = 2, /* handshake header sequence number */ + DTLS_HANDSHAKE_FRAG_SZ = 3, /* fragment offset and length are 24 bit */ + DTLS_POOL_SZ = 5, /* buffers to hold in the retry pool */ + + FINISHED_LABEL_SZ = 15, /* TLS finished label size */ + TLS_FINISHED_SZ = 12, /* TLS has a shorter size */ + MASTER_LABEL_SZ = 13, /* TLS master secret label sz */ + KEY_LABEL_SZ = 13, /* TLS key block expansion sz */ + MAX_PRF_HALF = 128, /* Maximum half secret len */ + MAX_PRF_LABSEED = 128, /* Maximum label + seed len */ + MAX_PRF_DIG = 224, /* Maximum digest len */ + MAX_REQUEST_SZ = 256, /* Maximum cert req len (no auth yet */ + SESSION_FLUSH_COUNT = 256, /* Flush session cache unless user turns off */ + + RC4_KEY_SIZE = 16, /* always 128bit */ + DES_KEY_SIZE = 8, /* des */ + DES3_KEY_SIZE = 24, /* 3 des ede */ + DES_IV_SIZE = DES_BLOCK_SIZE, + AES_256_KEY_SIZE = 32, /* for 256 bit */ + AES_192_KEY_SIZE = 24, /* for 192 bit */ + AES_IV_SIZE = 16, /* always block size */ + AES_128_KEY_SIZE = 16, /* for 128 bit */ + + AEAD_SEQ_OFFSET = 4, /* Auth Data: Sequence number */ + AEAD_TYPE_OFFSET = 8, /* Auth Data: Type */ + AEAD_VMAJ_OFFSET = 9, /* Auth Data: Major Version */ + AEAD_VMIN_OFFSET = 10, /* Auth Data: Minor Version */ + AEAD_LEN_OFFSET = 11, /* Auth Data: Length */ + AEAD_AUTH_DATA_SZ = 13, /* Size of the data to authenticate */ + AEAD_IMP_IV_SZ = 4, /* Size of the implicit IV */ + AEAD_EXP_IV_SZ = 8, /* Size of the explicit IV */ + AEAD_NONCE_SZ = AEAD_EXP_IV_SZ + AEAD_IMP_IV_SZ, + + AES_GCM_AUTH_SZ = 16, /* AES-GCM Auth Tag length */ + AES_CCM_16_AUTH_SZ = 16, /* AES-CCM-16 Auth Tag length */ + AES_CCM_8_AUTH_SZ = 8, /* AES-CCM-8 Auth Tag Length */ + + CAMELLIA_128_KEY_SIZE = 16, /* for 128 bit */ + CAMELLIA_192_KEY_SIZE = 24, /* for 192 bit */ + CAMELLIA_256_KEY_SIZE = 32, /* for 256 bit */ + CAMELLIA_IV_SIZE = 16, /* always block size */ + + HC_128_KEY_SIZE = 16, /* 128 bits */ + HC_128_IV_SIZE = 16, /* also 128 bits */ + + RABBIT_KEY_SIZE = 16, /* 128 bits */ + RABBIT_IV_SIZE = 8, /* 64 bits for iv */ + + EVP_SALT_SIZE = 8, /* evp salt size 64 bits */ + + ECDHE_SIZE = 32, /* ECHDE server size defaults to 256 bit */ + MAX_EXPORT_ECC_SZ = 256, /* Export ANS X9.62 max future size */ + + MAX_HELLO_SZ = 128, /* max client or server hello */ + MAX_CERT_VERIFY_SZ = 1024, /* max */ + CLIENT_HELLO_FIRST = 35, /* Protocol + RAN_LEN + sizeof(id_len) */ + MAX_SUITE_NAME = 48, /* maximum length of cipher suite string */ + DEFAULT_TIMEOUT = 500, /* default resumption timeout in seconds */ + + DTLS_TIMEOUT_INIT = 1, /* default timeout init for DTLS receive */ + DTLS_TIMEOUT_MAX = 64, /* default max timeout for DTLS receive */ + DTLS_TIMEOUT_MULTIPLIER = 2, /* default timeout multiplier for DTLS recv */ + + MAX_PSK_ID_LEN = 128, /* max psk identity/hint supported */ + MAX_PSK_KEY_LEN = 64, /* max psk key supported */ + + MAX_CYASSL_FILE_SIZE = 1024 * 1024 * 4, /* 4 mb file size alloc limit */ + +#ifdef FORTRESS + MAX_EX_DATA = 3, /* allow for three items of ex_data */ +#endif + + MAX_X509_SIZE = 2048, /* max static x509 buffer size */ + CERT_MIN_SIZE = 256, /* min PEM cert size with header/footer */ + MAX_FILENAME_SZ = 256, /* max file name length */ + FILE_BUFFER_SIZE = 1024, /* default static file buffer size for input, + will use dynamic buffer if not big enough */ + + MAX_NTRU_PUB_KEY_SZ = 1027, /* NTRU max for now */ + MAX_NTRU_ENCRYPT_SZ = 1027, /* NTRU max for now */ + MAX_NTRU_BITS = 256, /* max symmetric bit strength */ + NO_SNIFF = 0, /* not sniffing */ + SNIFF = 1, /* currently sniffing */ + + HASH_SIG_SIZE = 2, /* default SHA1 RSA */ + + NO_CAVIUM_DEVICE = -2, /* invalid cavium device id */ + + NO_COPY = 0, /* should we copy static buffer for write */ + COPY = 1 /* should we copy static buffer for write */ +}; + + +#ifdef SESSION_INDEX +/* Shift values for making a session index */ +#define SESSIDX_ROW_SHIFT 4 +#define SESSIDX_IDX_MASK 0x0F +#endif + + +/* max cert chain peer depth */ +#ifndef MAX_CHAIN_DEPTH + #define MAX_CHAIN_DEPTH 9 +#endif + + +/* don't use extra 3/4k stack space unless need to */ +#ifdef HAVE_NTRU + #define MAX_ENCRYPT_SZ MAX_NTRU_ENCRYPT_SZ +#else + #define MAX_ENCRYPT_SZ ENCRYPT_LEN +#endif + + +/* states */ +enum states { + NULL_STATE = 0, + + SERVER_HELLOVERIFYREQUEST_COMPLETE, + SERVER_HELLO_COMPLETE, + SERVER_CERT_COMPLETE, + SERVER_KEYEXCHANGE_COMPLETE, + SERVER_HELLODONE_COMPLETE, + SERVER_FINISHED_COMPLETE, + + CLIENT_HELLO_COMPLETE, + CLIENT_KEYEXCHANGE_COMPLETE, + CLIENT_FINISHED_COMPLETE, + + HANDSHAKE_DONE +}; + + +#if defined(__GNUC__) + #define CYASSL_PACK __attribute__ ((packed)) +#else + #define CYASSL_PACK +#endif + +/* SSL Version */ +typedef struct ProtocolVersion { + byte major; + byte minor; +} CYASSL_PACK ProtocolVersion; + + +CYASSL_LOCAL ProtocolVersion MakeSSLv3(void); +CYASSL_LOCAL ProtocolVersion MakeTLSv1(void); +CYASSL_LOCAL ProtocolVersion MakeTLSv1_1(void); +CYASSL_LOCAL ProtocolVersion MakeTLSv1_2(void); + +#ifdef CYASSL_DTLS + CYASSL_LOCAL ProtocolVersion MakeDTLSv1(void); + CYASSL_LOCAL ProtocolVersion MakeDTLSv1_2(void); +#endif + + +enum BIO_TYPE { + BIO_BUFFER = 1, + BIO_SOCKET = 2, + BIO_SSL = 3, + BIO_MEMORY = 4 +}; + + +/* CyaSSL BIO_METHOD type */ +struct CYASSL_BIO_METHOD { + byte type; /* method type */ +}; + + +/* CyaSSL BIO type */ +struct CYASSL_BIO { + byte type; /* method type */ + byte close; /* close flag */ + byte eof; /* eof flag */ + CYASSL* ssl; /* possible associated ssl */ + byte* mem; /* memory buffer */ + int memLen; /* memory buffer length */ + int fd; /* possible file descriptor */ + CYASSL_BIO* prev; /* previous in chain */ + CYASSL_BIO* next; /* next in chain */ +}; + + +/* CyaSSL method type */ +struct CYASSL_METHOD { + ProtocolVersion version; + byte side; /* connection side, server or client */ + byte downgrade; /* whether to downgrade version, default no */ +}; + + +/* defautls to client */ +CYASSL_LOCAL void InitSSL_Method(CYASSL_METHOD*, ProtocolVersion); + +/* for sniffer */ +CYASSL_LOCAL int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 size, word32 totalSz, int sniff); +CYASSL_LOCAL int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx); + + +/* CyaSSL buffer type */ +typedef struct buffer { + word32 length; + byte* buffer; +} buffer; + + +enum { + FORCED_FREE = 1, + NO_FORCED_FREE = 0 +}; + + +/* only use compression extra if using compression */ +#ifdef HAVE_LIBZ + #define COMP_EXTRA MAX_COMP_EXTRA +#else + #define COMP_EXTRA 0 +#endif + +/* only the sniffer needs space in the buffer for extra MTU record(s) */ +#ifdef CYASSL_SNIFFER + #define MTU_EXTRA MAX_MTU * 3 +#else + #define MTU_EXTRA 0 +#endif + + +/* embedded callbacks require large static buffers, make sure on */ +#ifdef CYASSL_CALLBACKS + #undef LARGE_STATIC_BUFFERS + #define LARGE_STATIC_BUFFERS +#endif + + +/* give user option to use 16K static buffers */ +#if defined(LARGE_STATIC_BUFFERS) + #define RECORD_SIZE MAX_RECORD_SIZE +#else + #ifdef CYASSL_DTLS + #define RECORD_SIZE MAX_MTU + #else + #define RECORD_SIZE 128 + #endif +#endif + + +/* user option to turn off 16K output option */ +/* if using small static buffers (default) and SSL_write tries to write data + larger than the record we have, dynamically get it, unless user says only + write in static buffer chuncks */ +#ifndef STATIC_CHUNKS_ONLY + #define OUTPUT_RECORD_SIZE MAX_RECORD_SIZE +#else + #define OUTPUT_RECORD_SIZE RECORD_SIZE +#endif + +/* CyaSSL input buffer + + RFC 2246: + + length + The length (in bytes) of the following TLSPlaintext.fragment. + The length should not exceed 2^14. +*/ +#if defined(LARGE_STATIC_BUFFERS) + #define STATIC_BUFFER_LEN RECORD_HEADER_SZ + RECORD_SIZE + COMP_EXTRA + \ + MTU_EXTRA + MAX_MSG_EXTRA +#else + /* don't fragment memory from the record header */ + #define STATIC_BUFFER_LEN RECORD_HEADER_SZ +#endif + +typedef struct { + word32 length; /* total buffer length used */ + word32 idx; /* idx to part of length already consumed */ + byte* buffer; /* place holder for static or dynamic buffer */ + word32 bufferSize; /* current buffer size */ + ALIGN16 byte staticBuffer[STATIC_BUFFER_LEN]; + byte dynamicFlag; /* dynamic memory currently in use */ + byte offset; /* alignment offset attempt */ +} bufferStatic; + +/* Cipher Suites holder */ +typedef struct Suites { + int setSuites; /* user set suites from default */ + byte suites[MAX_SUITE_SZ]; + word16 suiteSz; /* suite length in bytes */ + byte hashSigAlgo[HELLO_EXT_SIGALGO_MAX]; /* sig/algo to offer */ + word16 hashSigAlgoSz; /* SigAlgo extension length in bytes */ + byte hashAlgo; /* selected hash algorithm */ + byte sigAlgo; /* selected sig algorithm */ +} Suites; + + +CYASSL_LOCAL +void InitSuites(Suites*, ProtocolVersion, + byte, byte, byte, byte, byte, byte, int); +CYASSL_LOCAL +int SetCipherList(Suites*, const char* list); + +#ifndef PSK_TYPES_DEFINED + typedef unsigned int (*psk_client_callback)(CYASSL*, const char*, char*, + unsigned int, unsigned char*, unsigned int); + typedef unsigned int (*psk_server_callback)(CYASSL*, const char*, + unsigned char*, unsigned int); +#endif /* PSK_TYPES_DEFINED */ + + +#ifndef CYASSL_USER_IO + /* default IO callbacks */ + CYASSL_LOCAL + int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx); + CYASSL_LOCAL + int EmbedSend(CYASSL *ssl, char *buf, int sz, void *ctx); + + #ifdef HAVE_OCSP + CYASSL_LOCAL + int EmbedOcspLookup(void*, const char*, int, byte*, int, byte**); + CYASSL_LOCAL + void EmbedOcspRespFree(void*, byte*); + #endif + + #ifdef CYASSL_DTLS + CYASSL_LOCAL + int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx); + CYASSL_LOCAL + int EmbedSendTo(CYASSL *ssl, char *buf, int sz, void *ctx); + CYASSL_LOCAL + int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx); + CYASSL_LOCAL + int IsUDP(void*); + #endif /* CYASSL_DTLS */ +#endif /* CYASSL_USER_IO */ + +#ifdef HAVE_NETX + CYASSL_LOCAL int NetX_Receive(CYASSL *ssl, char *buf, int sz, void *ctx); + CYASSL_LOCAL int NetX_Send(CYASSL *ssl, char *buf, int sz, void *ctx); +#endif /* HAVE_NETX */ + + +/* CyaSSL Cipher type just points back to SSL */ +struct CYASSL_CIPHER { + CYASSL* ssl; +}; + + +typedef struct OCSP_Entry OCSP_Entry; + +#ifdef SHA_DIGEST_SIZE + #define OCSP_DIGEST_SIZE SHA_DIGEST_SIZE +#else + #define OCSP_DIGEST_SIZE 160 +#endif + +#ifdef NO_ASN + /* no_asn won't have */ + typedef struct CertStatus CertStatus; +#endif + +struct OCSP_Entry { + OCSP_Entry* next; /* next entry */ + byte issuerHash[OCSP_DIGEST_SIZE]; /* issuer hash */ + byte issuerKeyHash[OCSP_DIGEST_SIZE]; /* issuer public key hash */ + CertStatus* status; /* OCSP response list */ + int totalStatus; /* number on list */ +}; + + +#ifndef HAVE_OCSP + typedef struct CYASSL_OCSP CYASSL_OCSP; +#endif + +/* CyaSSL OCSP controller */ +struct CYASSL_OCSP { + CYASSL_CERT_MANAGER* cm; /* pointer back to cert manager */ + OCSP_Entry* ocspList; /* OCSP response list */ + CyaSSL_Mutex ocspLock; /* OCSP list lock */ +}; + +#ifndef MAX_DATE_SIZE +#define MAX_DATE_SIZE 32 +#endif + +typedef struct CRL_Entry CRL_Entry; + +#ifdef SHA_DIGEST_SIZE + #define CRL_DIGEST_SIZE SHA_DIGEST_SIZE +#else + #define CRL_DIGEST_SIZE 160 +#endif + +#ifdef NO_ASN + typedef struct RevokedCert RevokedCert; +#endif + +/* Complete CRL */ +struct CRL_Entry { + CRL_Entry* next; /* next entry */ + byte issuerHash[CRL_DIGEST_SIZE]; /* issuer hash */ + /* byte crlHash[CRL_DIGEST_SIZE]; raw crl data hash */ + /* restore the hash here if needed for optimized comparisons */ + byte lastDate[MAX_DATE_SIZE]; /* last date updated */ + byte nextDate[MAX_DATE_SIZE]; /* next update date */ + byte lastDateFormat; /* last date format */ + byte nextDateFormat; /* next date format */ + RevokedCert* certs; /* revoked cert list */ + int totalCerts; /* number on list */ +}; + + +typedef struct CRL_Monitor CRL_Monitor; + +/* CRL directory monitor */ +struct CRL_Monitor { + char* path; /* full dir path, if valid pointer we're using */ + int type; /* PEM or ASN1 type */ +}; + + +#ifndef HAVE_CRL + typedef struct CYASSL_CRL CYASSL_CRL; +#endif + +/* CyaSSL CRL controller */ +struct CYASSL_CRL { + CYASSL_CERT_MANAGER* cm; /* pointer back to cert manager */ + CRL_Entry* crlList; /* our CRL list */ + CyaSSL_Mutex crlLock; /* CRL list lock */ + CRL_Monitor monitors[2]; /* PEM and DER possible */ +#ifdef HAVE_CRL_MONITOR + pthread_t tid; /* monitoring thread */ +#endif +}; + + +#ifdef NO_ASN + typedef struct Signer Signer; +#endif + + +#ifndef CA_TABLE_SIZE + #define CA_TABLE_SIZE 11 +#endif + +/* CyaSSL Certificate Manager */ +struct CYASSL_CERT_MANAGER { + Signer* caTable[CA_TABLE_SIZE]; /* the CA signer table */ + CyaSSL_Mutex caLock; /* CA list lock */ + CallbackCACache caCacheCallback; /* CA cache addition callback */ + void* heap; /* heap helper */ + CYASSL_CRL* crl; /* CRL checker */ + byte crlEnabled; /* is CRL on ? */ + byte crlCheckAll; /* always leaf, but all ? */ + CbMissingCRL cbMissingCRL; /* notify through cb of missing crl */ + CYASSL_OCSP* ocsp; /* OCSP checker */ + byte ocspEnabled; /* is OCSP on ? */ + byte ocspSendNonce; /* send the OCSP nonce ? */ + byte ocspUseOverrideURL; /* ignore cert's responder, override */ + char* ocspOverrideURL; /* use this responder */ + void* ocspIOCtx; /* I/O callback CTX */ + CbOCSPIO ocspIOCb; /* I/O callback for OCSP lookup */ + CbOCSPRespFree ocspRespFreeCb; /* Frees OCSP Response from IO Cb */ +}; + +CYASSL_LOCAL int CM_SaveCertCache(CYASSL_CERT_MANAGER*, const char*); +CYASSL_LOCAL int CM_RestoreCertCache(CYASSL_CERT_MANAGER*, const char*); +CYASSL_LOCAL int CM_MemSaveCertCache(CYASSL_CERT_MANAGER*, void*, int, int*); +CYASSL_LOCAL int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER*, const void*, int); +CYASSL_LOCAL int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER*); + +/* CyaSSL Sock Addr */ +struct CYASSL_SOCKADDR { + unsigned int sz; /* sockaddr size */ + void* sa; /* pointer to the sockaddr_in or sockaddr_in6 */ +}; + +typedef struct CYASSL_DTLS_CTX { + CYASSL_SOCKADDR peer; + int fd; +} CYASSL_DTLS_CTX; + +/* RFC 6066 TLS Extensions */ +#ifdef HAVE_TLS_EXTENSIONS + +typedef enum { + SERVER_NAME_INDICATION = 0, + MAX_FRAGMENT_LENGTH = 1, + TRUNCATED_HMAC = 4, + ELLIPTIC_CURVES = 10 +} TLSX_Type; + +typedef struct TLSX { + TLSX_Type type; /* Extension Type */ + void* data; /* Extension Data */ + byte resp; /* IsResponse Flag */ + struct TLSX* next; /* List Behavior */ +} TLSX; + +CYASSL_LOCAL TLSX* TLSX_Find(TLSX* list, TLSX_Type type); +CYASSL_LOCAL void TLSX_FreeAll(TLSX* list); + +#ifndef NO_CYASSL_CLIENT +CYASSL_LOCAL word16 TLSX_GetRequestSize(CYASSL* ssl); +CYASSL_LOCAL word16 TLSX_WriteRequest(CYASSL* ssl, byte* output); +#endif + +#ifndef NO_CYASSL_SERVER +CYASSL_LOCAL word16 TLSX_GetResponseSize(CYASSL* ssl); +CYASSL_LOCAL word16 TLSX_WriteResponse(CYASSL* ssl, byte* output); +#endif + +CYASSL_LOCAL int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, + byte isRequest, Suites *suites); + +/* Server Name Indication */ +#ifdef HAVE_SNI + +typedef struct SNI { + byte type; /* SNI Type */ + union { char* host_name; } data; /* SNI Data */ + struct SNI* next; /* List Behavior */ +#ifndef NO_CYASSL_SERVER + byte options; /* Behaviour options */ + byte status; /* Matching result */ +#endif +} SNI; + +CYASSL_LOCAL int TLSX_UseSNI(TLSX** extensions, byte type, const void* data, + word16 size); + +#ifndef NO_CYASSL_SERVER +CYASSL_LOCAL void TLSX_SNI_SetOptions(TLSX* extensions, byte type, + byte options); +CYASSL_LOCAL byte TLSX_SNI_Status(TLSX* extensions, byte type); +CYASSL_LOCAL word16 TLSX_SNI_GetRequest(TLSX* extensions, byte type, + void** data); +CYASSL_LOCAL int TLSX_SNI_GetFromBuffer(const byte* buffer, word32 bufferSz, + byte type, byte* sni, word32* inOutSz); +#endif + +#endif /* HAVE_SNI */ + +/* Maximum Fragment Length */ +#ifdef HAVE_MAX_FRAGMENT + +CYASSL_LOCAL int TLSX_UseMaxFragment(TLSX** extensions, byte mfl); + +#endif /* HAVE_MAX_FRAGMENT */ + +#ifdef HAVE_TRUNCATED_HMAC + +CYASSL_LOCAL int TLSX_UseTruncatedHMAC(TLSX** extensions); + +#endif /* HAVE_TRUNCATED_HMAC */ + +#ifdef HAVE_SUPPORTED_CURVES + +typedef struct EllipticCurve { + word16 name; /* CurveNames */ + struct EllipticCurve* next; /* List Behavior */ + +} EllipticCurve; + +CYASSL_LOCAL int TLSX_UseSupportedCurve(TLSX** extensions, word16 name); + +#ifndef NO_CYASSL_SERVER +CYASSL_LOCAL int TLSX_ValidateEllipticCurves(CYASSL* ssl, byte first, + byte second); +#endif + +#endif /* HAVE_SUPPORTED_CURVES */ + +#endif /* HAVE_TLS_EXTENSIONS */ + +/* CyaSSL context type */ +struct CYASSL_CTX { + CYASSL_METHOD* method; + CyaSSL_Mutex countMutex; /* reference count mutex */ + int refCount; /* reference count */ +#ifndef NO_CERTS + buffer certificate; + buffer certChain; + /* chain after self, in DER, with leading size for each cert */ + buffer privateKey; + buffer serverDH_P; + buffer serverDH_G; + CYASSL_CERT_MANAGER* cm; /* our cert manager, ctx owns SSL will use */ +#endif + Suites suites; + void* heap; /* for user memory overrides */ + byte verifyPeer; + byte verifyNone; + byte failNoCert; + byte sessionCacheOff; + byte sessionCacheFlushOff; + byte sendVerify; /* for client side */ + byte haveRSA; /* RSA available */ + byte haveDH; /* server DH parms set by user */ + byte haveNTRU; /* server private NTRU key loaded */ + byte haveECDSAsig; /* server cert signed w/ ECDSA */ + byte haveStaticECC; /* static server ECC private key */ + byte partialWrite; /* only one msg per write call */ + byte quietShutdown; /* don't send close notify */ + byte groupMessages; /* group handshake messages before sending */ + CallbackIORecv CBIORecv; + CallbackIOSend CBIOSend; +#ifdef CYASSL_DTLS + CallbackGenCookie CBIOCookie; /* gen cookie callback */ +#endif + VerifyCallback verifyCallback; /* cert verification callback */ + word32 timeout; /* session timeout */ +#ifdef HAVE_ECC + word16 eccTempKeySz; /* in octets 20 - 66 */ + word32 pkCurveOID; /* curve Ecc_Sum */ +#endif +#ifndef NO_PSK + byte havePSK; /* psk key set by user */ + psk_client_callback client_psk_cb; /* client callback */ + psk_server_callback server_psk_cb; /* server callback */ + char server_hint[MAX_PSK_ID_LEN]; +#endif /* NO_PSK */ +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + pem_password_cb passwd_cb; + void* userdata; +#endif /* OPENSSL_EXTRA */ +#ifdef HAVE_OCSP + CYASSL_OCSP ocsp; +#endif +#ifdef HAVE_CAVIUM + int devId; /* cavium device id to use */ +#endif +#ifdef HAVE_TLS_EXTENSIONS + TLSX* extensions; /* RFC 6066 TLS Extensions data */ +#endif +#ifdef ATOMIC_USER + CallbackMacEncrypt MacEncryptCb; /* Atomic User Mac/Encrypt Cb */ + CallbackDecryptVerify DecryptVerifyCb; /* Atomic User Decrypt/Verify Cb */ +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + CallbackEccSign EccSignCb; /* User EccSign Callback handler */ + CallbackEccVerify EccVerifyCb; /* User EccVerify Callback handler */ + #endif /* HAVE_ECC */ + #ifndef NO_RSA + CallbackRsaSign RsaSignCb; /* User RsaSign Callback handler */ + CallbackRsaVerify RsaVerifyCb; /* User RsaVerify Callback handler */ + CallbackRsaEnc RsaEncCb; /* User Rsa Public Encrypt handler */ + CallbackRsaDec RsaDecCb; /* User Rsa Private Decrypt handler */ + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ +}; + + +CYASSL_LOCAL +int InitSSL_Ctx(CYASSL_CTX*, CYASSL_METHOD*); +CYASSL_LOCAL +void FreeSSL_Ctx(CYASSL_CTX*); +CYASSL_LOCAL +void SSL_CtxResourceFree(CYASSL_CTX*); + +CYASSL_LOCAL +int DeriveTlsKeys(CYASSL* ssl); +CYASSL_LOCAL +int ProcessOldClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 inSz, word16 sz); +#ifndef NO_CERTS + CYASSL_LOCAL + int AddCA(CYASSL_CERT_MANAGER* ctx, buffer der, int type, int verify); + CYASSL_LOCAL + int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash); +#endif + +/* All cipher suite related info */ +typedef struct CipherSpecs { + byte bulk_cipher_algorithm; + byte cipher_type; /* block, stream, or aead */ + byte mac_algorithm; + byte kea; /* key exchange algo */ + byte sig_algo; + byte hash_size; + byte pad_size; + byte static_ecdh; + word16 key_size; + word16 iv_size; + word16 block_size; + word16 aead_mac_size; +} CipherSpecs; + + +void InitCipherSpecs(CipherSpecs* cs); + + +/* Supported Message Authentication Codes from page 43 */ +enum MACAlgorithm { + no_mac, + md5_mac, + sha_mac, + sha224_mac, + sha256_mac, + sha384_mac, + sha512_mac, + rmd_mac, + blake2b_mac +}; + + +/* Supported Key Exchange Protocols */ +enum KeyExchangeAlgorithm { + no_kea, + rsa_kea, + diffie_hellman_kea, + fortezza_kea, + psk_kea, + ntru_kea, + ecc_diffie_hellman_kea, + ecc_static_diffie_hellman_kea /* for verify suite only */ +}; + + +/* Supported Authentication Schemes */ +enum SignatureAlgorithm { + anonymous_sa_algo, + rsa_sa_algo, + dsa_sa_algo, + ecc_dsa_sa_algo +}; + + +/* Supprted ECC Curve Types */ +enum EccCurves { + named_curve = 3 +}; + + +/* Supprted ECC Named Curves */ +enum EccNamedCurves { + secp256r1 = 0x17, /* default, OpenSSL also calls it prime256v1 */ + secp384r1 = 0x18, + secp521r1 = 0x19, + + secp160r1 = 0x10, + secp192r1 = 0x13, /* Openssl also call it prime192v1 */ + secp224r1 = 0x15 +}; + + +/* Valid client certificate request types from page 27 */ +enum ClientCertificateType { + rsa_sign = 1, + dss_sign = 2, + rsa_fixed_dh = 3, + dss_fixed_dh = 4, + rsa_ephemeral_dh = 5, + dss_ephemeral_dh = 6, + fortezza_kea_cert = 20 +}; + + +enum CipherType { stream, block, aead }; + + +#ifdef CYASSL_DTLS + + #ifdef WORD64_AVAILABLE + typedef word64 DtlsSeq; + #else + typedef word32 DtlsSeq; + #endif + #define DTLS_SEQ_BITS (sizeof(DtlsSeq) * CHAR_BIT) + + typedef struct DtlsState { + DtlsSeq window; /* Sliding window for current epoch */ + word16 nextEpoch; /* Expected epoch in next record */ + word32 nextSeq; /* Expected sequence in next record */ + + word16 curEpoch; /* Received epoch in current record */ + word32 curSeq; /* Received sequence in current record */ + + DtlsSeq prevWindow; /* Sliding window for old epoch */ + word32 prevSeq; /* Next sequence in allowed old epoch */ + } DtlsState; + +#endif /* CYASSL_DTLS */ + + +/* keys and secrets */ +typedef struct Keys { + byte client_write_MAC_secret[MAX_DIGEST_SIZE]; /* max sizes */ + byte server_write_MAC_secret[MAX_DIGEST_SIZE]; + byte client_write_key[AES_256_KEY_SIZE]; /* max sizes */ + byte server_write_key[AES_256_KEY_SIZE]; + byte client_write_IV[AES_IV_SIZE]; /* max sizes */ + byte server_write_IV[AES_IV_SIZE]; +#ifdef HAVE_AEAD + byte aead_exp_IV[AEAD_EXP_IV_SZ]; + byte aead_enc_imp_IV[AEAD_IMP_IV_SZ]; + byte aead_dec_imp_IV[AEAD_IMP_IV_SZ]; +#endif + + word32 peer_sequence_number; + word32 sequence_number; + +#ifdef CYASSL_DTLS + DtlsState dtls_state; /* Peer's state */ + word16 dtls_peer_handshake_number; + word16 dtls_expected_peer_handshake_number; + + word16 dtls_epoch; /* Current tx epoch */ + word32 dtls_sequence_number; /* Current tx sequence */ + word16 dtls_handshake_number; /* Current tx handshake seq */ +#endif + + word32 encryptSz; /* last size of encrypted data */ + word32 padSz; /* how much to advance after decrypt part */ + byte encryptionOn; /* true after change cipher spec */ + byte decryptedCur; /* only decrypt current record once */ +} Keys; + + +/* cipher for now */ +typedef struct Ciphers { +#ifdef BUILD_ARC4 + Arc4* arc4; +#endif +#ifdef BUILD_DES3 + Des3* des3; +#endif +#if defined(BUILD_AES) || defined(BUILD_AESGCM) + Aes* aes; +#endif +#ifdef HAVE_CAMELLIA + Camellia* cam; +#endif +#ifdef HAVE_HC128 + HC128* hc128; +#endif +#ifdef BUILD_RABBIT + Rabbit* rabbit; +#endif + byte setup; /* have we set it up flag for detection */ +} Ciphers; + + +CYASSL_LOCAL void InitCiphers(CYASSL* ssl); +CYASSL_LOCAL void FreeCiphers(CYASSL* ssl); + + +/* hashes type */ +typedef struct Hashes { + #ifndef NO_OLD_TLS + byte md5[MD5_DIGEST_SIZE]; + #endif + byte sha[SHA_DIGEST_SIZE]; + #ifndef NO_SHA256 + byte sha256[SHA256_DIGEST_SIZE]; + #endif + #ifdef CYASSL_SHA384 + byte sha384[SHA384_DIGEST_SIZE]; + #endif +} Hashes; + + +/* Static x509 buffer */ +typedef struct x509_buffer { + int length; /* actual size */ + byte buffer[MAX_X509_SIZE]; /* max static cert size */ +} x509_buffer; + + +/* CyaSSL X509_CHAIN, for no dynamic memory SESSION_CACHE */ +struct CYASSL_X509_CHAIN { + int count; /* total number in chain */ + x509_buffer certs[MAX_CHAIN_DEPTH]; /* only allow max depth 4 for now */ +}; + + +/* CyaSSL session type */ +struct CYASSL_SESSION { + byte sessionID[ID_LEN]; /* id for protocol */ + byte masterSecret[SECRET_LEN]; /* stored secret */ + word32 bornOn; /* create time in seconds */ + word32 timeout; /* timeout in seconds */ +#ifdef SESSION_CERTS + CYASSL_X509_CHAIN chain; /* peer cert chain, static */ + ProtocolVersion version; /* which version was used */ + byte cipherSuite0; /* first byte, normally 0 */ + byte cipherSuite; /* 2nd byte, actual suite */ +#endif +#ifndef NO_CLIENT_CACHE + byte serverID[SERVER_ID_LEN]; /* for easier client lookup */ + word16 idLen; /* serverID length */ +#endif +}; + + +CYASSL_LOCAL +CYASSL_SESSION* GetSession(CYASSL*, byte*); +CYASSL_LOCAL +int SetSession(CYASSL*, CYASSL_SESSION*); + +typedef int (*hmacfp) (CYASSL*, byte*, const byte*, word32, int, int); + +#ifndef NO_CLIENT_CACHE + CYASSL_SESSION* GetSessionClient(CYASSL*, const byte*, int); +#endif + +/* client connect state for nonblocking restart */ +enum ConnectState { + CONNECT_BEGIN = 0, + CLIENT_HELLO_SENT, + HELLO_AGAIN, /* HELLO_AGAIN s for DTLS case */ + HELLO_AGAIN_REPLY, + FIRST_REPLY_DONE, + FIRST_REPLY_FIRST, + FIRST_REPLY_SECOND, + FIRST_REPLY_THIRD, + FIRST_REPLY_FOURTH, + FINISHED_DONE, + SECOND_REPLY_DONE +}; + + +/* server accept state for nonblocking restart */ +enum AcceptState { + ACCEPT_BEGIN = 0, + ACCEPT_CLIENT_HELLO_DONE, + HELLO_VERIFY_SENT, + ACCEPT_FIRST_REPLY_DONE, + SERVER_HELLO_SENT, + CERT_SENT, + KEY_EXCHANGE_SENT, + CERT_REQ_SENT, + SERVER_HELLO_DONE, + ACCEPT_SECOND_REPLY_DONE, + CHANGE_CIPHER_SENT, + ACCEPT_FINISHED_DONE, + ACCEPT_THIRD_REPLY_DONE +}; + + +typedef struct Buffers { +#ifndef NO_CERTS + buffer certificate; /* CYASSL_CTX owns, unless we own */ + buffer key; /* CYASSL_CTX owns, unless we own */ + buffer certChain; /* CYASSL_CTX owns */ + /* chain after self, in DER, with leading size for each cert */ + buffer serverDH_P; /* CYASSL_CTX owns, unless we own */ + buffer serverDH_G; /* CYASSL_CTX owns, unless we own */ + buffer serverDH_Pub; + buffer serverDH_Priv; +#endif + buffer domainName; /* for client check */ + bufferStatic inputBuffer; + bufferStatic outputBuffer; + buffer clearOutputBuffer; + int prevSent; /* previous plain text bytes sent + when got WANT_WRITE */ + int plainSz; /* plain text bytes in buffer to send + when got WANT_WRITE */ + byte weOwnCert; /* SSL own cert flag */ + byte weOwnKey; /* SSL own key flag */ + byte weOwnDH; /* SSL own dh (p,g) flag */ +#ifdef CYASSL_DTLS + CYASSL_DTLS_CTX dtlsCtx; /* DTLS connection context */ +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + buffer peerEccDsaKey; /* we own for Ecc Verify Callbacks */ + #endif /* HAVE_ECC */ + #ifndef NO_RSA + buffer peerRsaKey; /* we own for Rsa Verify Callbacks */ + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ +} Buffers; + +typedef struct Options { + byte sessionCacheOff; + byte sessionCacheFlushOff; + byte cipherSuite0; /* first byte, normally 0 */ + byte cipherSuite; /* second byte, actual suite */ + byte serverState; + byte clientState; + byte handShakeState; + byte side; /* client or server end */ + byte verifyPeer; + byte verifyNone; + byte failNoCert; + byte downgrade; /* allow downgrade of versions */ + byte sendVerify; /* false = 0, true = 1, sendBlank = 2 */ + byte resuming; + byte haveSessionId; /* server may not send */ + byte tls; /* using TLS ? */ + byte tls1_1; /* using TLSv1.1+ ? */ + byte dtls; /* using datagrams ? */ + byte connReset; /* has the peer reset */ + byte isClosed; /* if we consider conn closed */ + byte closeNotify; /* we've recieved a close notify */ + byte sentNotify; /* we've sent a close notify */ + byte connectState; /* nonblocking resume */ + byte acceptState; /* nonblocking resume */ + byte usingCompression; /* are we using compression */ + byte haveRSA; /* RSA available */ + byte haveDH; /* server DH parms set by user */ + byte haveNTRU; /* server NTRU private key loaded */ + byte haveECDSAsig; /* server ECDSA signed cert */ + byte haveStaticECC; /* static server ECC private key */ + byte havePeerCert; /* do we have peer's cert */ + byte havePeerVerify; /* and peer's cert verify */ + byte usingPSK_cipher; /* whether we're using psk as cipher */ + byte sendAlertState; /* nonblocking resume */ + byte processReply; /* nonblocking resume */ + byte partialWrite; /* only one msg per write call */ + byte quietShutdown; /* don't send close notify */ + byte certOnly; /* stop once we get cert */ + byte groupMessages; /* group handshake messages */ + byte usingNonblock; /* set when using nonblocking socket */ + byte saveArrays; /* save array Memory for user get keys + or psk */ +#ifndef NO_PSK + byte havePSK; /* psk key set by user */ + psk_client_callback client_psk_cb; + psk_server_callback server_psk_cb; +#endif /* NO_PSK */ +} Options; + +typedef struct Arrays { + byte clientRandom[RAN_LEN]; + byte serverRandom[RAN_LEN]; + byte sessionID[ID_LEN]; + byte preMasterSecret[ENCRYPT_LEN]; + byte masterSecret[SECRET_LEN]; +#ifdef CYASSL_DTLS + byte cookie[MAX_COOKIE_LEN]; + byte cookieSz; +#endif +#ifndef NO_PSK + char client_identity[MAX_PSK_ID_LEN]; + char server_hint[MAX_PSK_ID_LEN]; + byte psk_key[MAX_PSK_KEY_LEN]; + word32 psk_keySz; /* acutal size */ +#endif + word32 preMasterSz; /* differs for DH, actual size */ +} Arrays; + +#ifndef ASN_NAME_MAX +#define ASN_NAME_MAX 256 +#endif + +#ifndef MAX_DATE_SZ +#define MAX_DATE_SZ 32 +#endif + +struct CYASSL_X509_NAME { + char *name; + char staticName[ASN_NAME_MAX]; + int dynamicName; + int sz; +#ifdef OPENSSL_EXTRA + DecodedName fullName; +#endif /* OPENSSL_EXTRA */ +}; + +#ifndef EXTERNAL_SERIAL_SIZE + #define EXTERNAL_SERIAL_SIZE 32 +#endif + +#ifdef NO_ASN + typedef struct DNS_entry DNS_entry; +#endif + +struct CYASSL_X509 { + int version; + CYASSL_X509_NAME issuer; + CYASSL_X509_NAME subject; + int serialSz; + byte serial[EXTERNAL_SERIAL_SIZE]; + char subjectCN[ASN_NAME_MAX]; /* common name short cut */ +#ifdef CYASSL_SEP + int deviceTypeSz; + byte deviceType[EXTERNAL_SERIAL_SIZE]; + int hwTypeSz; + byte hwType[EXTERNAL_SERIAL_SIZE]; + int hwSerialNumSz; + byte hwSerialNum[EXTERNAL_SERIAL_SIZE]; + #ifdef OPENSSL_EXTRA + byte certPolicySet; + byte certPolicyCrit; + #endif /* OPENSSL_EXTRA */ +#endif + int notBeforeSz; + byte notBefore[MAX_DATE_SZ]; + int notAfterSz; + byte notAfter[MAX_DATE_SZ]; + int sigOID; + buffer sig; + int pubKeyOID; + buffer pubKey; + #ifdef HAVE_ECC + word32 pkCurveOID; + #endif /* HAVE_ECC */ + buffer derCert; /* may need */ + DNS_entry* altNames; /* alt names list */ + DNS_entry* altNamesNext; /* hint for retrieval */ + byte dynamicMemory; /* dynamic memory flag */ + byte isCa; +#ifdef OPENSSL_EXTRA + word32 pathLength; + word16 keyUsage; + byte basicConstSet; + byte basicConstCrit; + byte basicConstPlSet; + byte subjAltNameSet; + byte subjAltNameCrit; + byte authKeyIdSet; + byte authKeyIdCrit; + byte* authKeyId; + word32 authKeyIdSz; + byte subjKeyIdSet; + byte subjKeyIdCrit; + byte* subjKeyId; + word32 subjKeyIdSz; + byte keyUsageSet; + byte keyUsageCrit; +#endif /* OPENSSL_EXTRA */ +}; + + +/* record layer header for PlainText, Compressed, and CipherText */ +typedef struct RecordLayerHeader { + byte type; + byte pvMajor; + byte pvMinor; + byte length[2]; +} RecordLayerHeader; + + +/* record layer header for DTLS PlainText, Compressed, and CipherText */ +typedef struct DtlsRecordLayerHeader { + byte type; + byte pvMajor; + byte pvMinor; + byte epoch[2]; /* increment on cipher state change */ + byte sequence_number[6]; /* per record */ + byte length[2]; +} DtlsRecordLayerHeader; + + +typedef struct DtlsPool { + buffer buf[DTLS_POOL_SZ]; + int used; +} DtlsPool; + +typedef struct DtlsMsg { + struct DtlsMsg* next; + word32 seq; /* Handshake sequence number */ + word32 sz; /* Length of whole mesage */ + word32 fragSz; /* Length of fragments received */ + byte type; + byte* buf; + byte* msg; +} DtlsMsg; + + +#ifdef HAVE_NETX + + /* NETX I/O Callback default */ + typedef struct NetX_Ctx { + NX_TCP_SOCKET* nxSocket; /* send/recv socket handle */ + NX_PACKET* nxPacket; /* incoming packet handle for short reads */ + ULONG nxOffset; /* offset already read from nxPacket */ + ULONG nxWait; /* wait option flag */ + } NetX_Ctx; + +#endif + + +/* CyaSSL ssl type */ +struct CYASSL { + CYASSL_CTX* ctx; + int error; + ProtocolVersion version; /* negotiated version */ + ProtocolVersion chVersion; /* client hello version */ + Suites* suites; /* only need during handshake */ + Ciphers encrypt; + Ciphers decrypt; + CipherSpecs specs; + Keys keys; + int rfd; /* read file descriptor */ + int wfd; /* write file descriptor */ + int rflags; /* user read flags */ + int wflags; /* user write flags */ + CYASSL_BIO* biord; /* socket bio read to free/close */ + CYASSL_BIO* biowr; /* socket bio write to free/close */ + void* IOCB_ReadCtx; + void* IOCB_WriteCtx; + RNG* rng; +#ifndef NO_OLD_TLS +#ifndef NO_SHA + Sha hashSha; /* sha hash of handshake msgs */ +#endif +#ifndef NO_MD5 + Md5 hashMd5; /* md5 hash of handshake msgs */ +#endif +#endif +#ifndef NO_SHA256 + Sha256 hashSha256; /* sha256 hash of handshake msgs */ +#endif +#ifdef CYASSL_SHA384 + Sha384 hashSha384; /* sha384 hash of handshake msgs */ +#endif + Hashes verifyHashes; + Hashes certHashes; /* for cert verify */ + Buffers buffers; + Options options; + Arrays* arrays; + CYASSL_SESSION session; + VerifyCallback verifyCallback; /* cert verification callback */ + void* verifyCbCtx; /* cert verify callback user ctx*/ +#ifndef NO_RSA + RsaKey* peerRsaKey; + byte peerRsaKeyPresent; +#endif +#ifdef HAVE_NTRU + word16 peerNtruKeyLen; + byte peerNtruKey[MAX_NTRU_PUB_KEY_SZ]; + byte peerNtruKeyPresent; +#endif +#ifdef HAVE_ECC + ecc_key* peerEccKey; /* peer's ECDHE key */ + ecc_key* peerEccDsaKey; /* peer's ECDSA key */ + ecc_key* eccTempKey; /* private ECDHE key */ + ecc_key* eccDsaKey; /* private ECDSA key */ + word16 eccTempKeySz; /* in octets 20 - 66 */ + word32 pkCurveOID; /* curve Ecc_Sum */ + byte peerEccKeyPresent; + byte peerEccDsaKeyPresent; + byte eccTempKeyPresent; + byte eccDsaKeyPresent; +#endif + hmacfp hmac; + void* heap; /* for user overrides */ + RecordLayerHeader curRL; + word16 curSize; + word32 timeout; /* session timeout */ + CYASSL_CIPHER cipher; +#ifdef HAVE_LIBZ + z_stream c_stream; /* compression stream */ + z_stream d_stream; /* decompression stream */ + byte didStreamInit; /* for stream init and end */ +#endif +#ifdef CYASSL_DTLS + int dtls_timeout_init; /* starting timeout vaule */ + int dtls_timeout_max; /* maximum timeout value */ + int dtls_timeout; /* current timeout value, changes */ + DtlsPool* dtls_pool; + DtlsMsg* dtls_msg_list; + void* IOCB_CookieCtx; /* gen cookie ctx */ + word32 dtls_expected_rx; +#endif +#ifdef CYASSL_CALLBACKS + HandShakeInfo handShakeInfo; /* info saved during handshake */ + TimeoutInfo timeoutInfo; /* info saved during handshake */ + byte hsInfoOn; /* track handshake info */ + byte toInfoOn; /* track timeout info */ +#endif +#ifdef KEEP_PEER_CERT + CYASSL_X509 peerCert; /* X509 peer cert */ +#endif +#ifdef FORTRESS + void* ex_data[MAX_EX_DATA]; /* external data, for Fortress */ +#endif +#ifdef HAVE_CAVIUM + int devId; /* cavium device id to use */ +#endif +#ifdef HAVE_TLS_EXTENSIONS + TLSX* extensions; /* RFC 6066 TLS Extensions data */ +#ifdef HAVE_MAX_FRAGMENT + word16 max_fragment; +#endif +#ifdef HAVE_TRUNCATED_HMAC + byte truncated_hmac; +#endif +#endif +#ifdef HAVE_NETX + NetX_Ctx nxCtx; /* NetX IO Context */ +#endif +#ifdef SESSION_INDEX + int sessionIndex; /* Session's location in the cache. */ +#endif + CYASSL_ALERT_HISTORY alert_history; +#ifdef ATOMIC_USER + void* MacEncryptCtx; /* Atomic User Mac/Encrypt Callback Context */ + void* DecryptVerifyCtx; /* Atomic User Decrypt/Verify Callback Context */ +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + void* EccSignCtx; /* Ecc Sign Callback Context */ + void* EccVerifyCtx; /* Ecc Verify Callback Context */ + #endif /* HAVE_ECC */ + #ifndef NO_RSA + void* RsaSignCtx; /* Rsa Sign Callback Context */ + void* RsaVerifyCtx; /* Rsa Verify Callback Context */ + void* RsaEncCtx; /* Rsa Public Encrypt Callback Context */ + void* RsaDecCtx; /* Rsa Private Decrypt Callback Context */ + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ +}; + + +CYASSL_LOCAL +int InitSSL(CYASSL*, CYASSL_CTX*); +CYASSL_LOCAL +void FreeSSL(CYASSL*); +CYASSL_API void SSL_ResourceFree(CYASSL*); /* Micrium uses */ + + +enum { + IV_SZ = 32, /* max iv sz */ + NAME_SZ = 80 /* max one line */ +}; + + +typedef struct EncryptedInfo { + char name[NAME_SZ]; /* encryption name */ + byte iv[IV_SZ]; /* encrypted IV */ + word32 ivSz; /* encrypted IV size */ + long consumed; /* tracks PEM bytes consumed */ + byte set; /* if encryption set */ + CYASSL_CTX* ctx; /* CTX owner */ +} EncryptedInfo; + + +#ifndef NO_CERTS + CYASSL_LOCAL int PemToDer(const unsigned char* buff, long sz, int type, + buffer* der, void* heap, EncryptedInfo* info, + int* eccKey); + + CYASSL_LOCAL int ProcessFile(CYASSL_CTX* ctx, const char* fname, int format, + int type, CYASSL* ssl, int userChain, + CYASSL_CRL* crl); +#endif + + +#ifdef CYASSL_CALLBACKS + CYASSL_LOCAL + void InitHandShakeInfo(HandShakeInfo*); + CYASSL_LOCAL + void FinishHandShakeInfo(HandShakeInfo*, const CYASSL*); + CYASSL_LOCAL + void AddPacketName(const char*, HandShakeInfo*); + + CYASSL_LOCAL + void InitTimeoutInfo(TimeoutInfo*); + CYASSL_LOCAL + void FreeTimeoutInfo(TimeoutInfo*, void*); + CYASSL_LOCAL + void AddPacketInfo(const char*, TimeoutInfo*, const byte*, int, void*); + CYASSL_LOCAL + void AddLateName(const char*, TimeoutInfo*); + CYASSL_LOCAL + void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info); +#endif + + +/* Record Layer Header identifier from page 12 */ +enum ContentType { + no_type = 0, + change_cipher_spec = 20, + alert = 21, + handshake = 22, + application_data = 23 +}; + + +/* handshake header, same for each message type, pgs 20/21 */ +typedef struct HandShakeHeader { + byte type; + word24 length; +} HandShakeHeader; + + +/* DTLS handshake header, same for each message type */ +typedef struct DtlsHandShakeHeader { + byte type; + word24 length; + byte message_seq[2]; /* start at 0, restransmit gets same # */ + word24 fragment_offset; /* bytes in previous fragments */ + word24 fragment_length; /* length of this fragment */ +} DtlsHandShakeHeader; + + +enum HandShakeType { + no_shake = -1, + hello_request = 0, + client_hello = 1, + server_hello = 2, + hello_verify_request = 3, /* DTLS addition */ + session_ticket = 4, + certificate = 11, + server_key_exchange = 12, + certificate_request = 13, + server_hello_done = 14, + certificate_verify = 15, + client_key_exchange = 16, + finished = 20 +}; + + +static const byte client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 }; +static const byte server[SIZEOF_SENDER] = { 0x53, 0x52, 0x56, 0x52 }; + +static const byte tls_client[FINISHED_LABEL_SZ + 1] = "client finished"; +static const byte tls_server[FINISHED_LABEL_SZ + 1] = "server finished"; + + +/* internal functions */ +CYASSL_LOCAL int SendChangeCipher(CYASSL*); +CYASSL_LOCAL int SendData(CYASSL*, const void*, int); +CYASSL_LOCAL int SendCertificate(CYASSL*); +CYASSL_LOCAL int SendCertificateRequest(CYASSL*); +CYASSL_LOCAL int SendServerKeyExchange(CYASSL*); +CYASSL_LOCAL int SendBuffered(CYASSL*); +CYASSL_LOCAL int ReceiveData(CYASSL*, byte*, int, int); +CYASSL_LOCAL int SendFinished(CYASSL*); +CYASSL_LOCAL int SendAlert(CYASSL*, int, int); +CYASSL_LOCAL int ProcessReply(CYASSL*); + +CYASSL_LOCAL int SetCipherSpecs(CYASSL*); +CYASSL_LOCAL int MakeMasterSecret(CYASSL*); + +CYASSL_LOCAL int AddSession(CYASSL*); +CYASSL_LOCAL int DeriveKeys(CYASSL* ssl); +CYASSL_LOCAL int StoreKeys(CYASSL* ssl, const byte* keyData); + +CYASSL_LOCAL int IsTLS(const CYASSL* ssl); +CYASSL_LOCAL int IsAtLeastTLSv1_2(const CYASSL* ssl); + +CYASSL_LOCAL void FreeHandshakeResources(CYASSL* ssl); +CYASSL_LOCAL void ShrinkInputBuffer(CYASSL* ssl, int forcedFree); +CYASSL_LOCAL void ShrinkOutputBuffer(CYASSL* ssl); + +CYASSL_LOCAL int VerifyClientSuite(CYASSL* ssl); +#ifndef NO_CERTS + CYASSL_LOCAL Signer* GetCA(void* cm, byte* hash); + #ifndef NO_SKID + CYASSL_LOCAL Signer* GetCAByName(void* cm, byte* hash); + #endif +#endif +CYASSL_LOCAL int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, + const byte* sender); +CYASSL_LOCAL void FreeArrays(CYASSL* ssl, int keep); +CYASSL_LOCAL int CheckAvailableSize(CYASSL *ssl, int size); +CYASSL_LOCAL int GrowInputBuffer(CYASSL* ssl, int size, int usedLength); + +#ifndef NO_TLS + CYASSL_LOCAL int MakeTlsMasterSecret(CYASSL*); + CYASSL_LOCAL int TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, + word32 sz, int content, int verify); +#endif + +#ifndef NO_CYASSL_CLIENT + CYASSL_LOCAL int SendClientHello(CYASSL*); + CYASSL_LOCAL int SendClientKeyExchange(CYASSL*); + CYASSL_LOCAL int SendCertificateVerify(CYASSL*); +#endif /* NO_CYASSL_CLIENT */ + +#ifndef NO_CYASSL_SERVER + CYASSL_LOCAL int SendServerHello(CYASSL*); + CYASSL_LOCAL int SendServerHelloDone(CYASSL*); + #ifdef CYASSL_DTLS + CYASSL_LOCAL int SendHelloVerifyRequest(CYASSL*); + #endif +#endif /* NO_CYASSL_SERVER */ + +#ifdef CYASSL_DTLS + CYASSL_LOCAL int DtlsPoolInit(CYASSL*); + CYASSL_LOCAL int DtlsPoolSave(CYASSL*, const byte*, int); + CYASSL_LOCAL int DtlsPoolTimeout(CYASSL*); + CYASSL_LOCAL int DtlsPoolSend(CYASSL*); + CYASSL_LOCAL void DtlsPoolReset(CYASSL*); + + CYASSL_LOCAL DtlsMsg* DtlsMsgNew(word32, void*); + CYASSL_LOCAL void DtlsMsgDelete(DtlsMsg*, void*); + CYASSL_LOCAL void DtlsMsgListDelete(DtlsMsg*, void*); + CYASSL_LOCAL void DtlsMsgSet(DtlsMsg*, word32, const byte*, byte, + word32, word32); + CYASSL_LOCAL DtlsMsg* DtlsMsgFind(DtlsMsg*, word32); + CYASSL_LOCAL DtlsMsg* DtlsMsgStore(DtlsMsg*, word32, const byte*, word32, + byte, word32, word32, void*); + CYASSL_LOCAL DtlsMsg* DtlsMsgInsert(DtlsMsg*, DtlsMsg*); +#endif /* CYASSL_DTLS */ + +#ifndef NO_TLS + + +#endif /* NO_TLS */ + + +CYASSL_LOCAL word32 LowResTimer(void); + +CYASSL_LOCAL void InitX509Name(CYASSL_X509_NAME*, int); +CYASSL_LOCAL void FreeX509Name(CYASSL_X509_NAME* name); +CYASSL_LOCAL void InitX509(CYASSL_X509*, int); +CYASSL_LOCAL void FreeX509(CYASSL_X509*); +#ifndef NO_CERTS + CYASSL_LOCAL int CopyDecodedToX509(CYASSL_X509*, DecodedCert*); +#endif + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CyaSSL_INT_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/ocsp.h b/project1/cyassl-3.0.0/cyassl/ocsp.h new file mode 100644 index 00000000..3fc4f9f0 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ocsp.h @@ -0,0 +1,52 @@ +/* ocsp.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* CyaSSL OCSP API */ + +#ifndef CYASSL_OCSP_H +#define CYASSL_OCSP_H + +#ifdef HAVE_OCSP + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct CYASSL_OCSP CYASSL_OCSP; + +CYASSL_LOCAL int InitOCSP(CYASSL_OCSP*, CYASSL_CERT_MANAGER*); +CYASSL_LOCAL void FreeOCSP(CYASSL_OCSP*, int dynamic); + +CYASSL_LOCAL int CheckCertOCSP(CYASSL_OCSP*, DecodedCert*); + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* HAVE_OCSP */ +#endif /* CYASSL_OCSP_H */ + + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/asn1.h b/project1/cyassl-3.0.0/cyassl/openssl/asn1.h new file mode 100644 index 00000000..3f34d7d2 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/asn1.h @@ -0,0 +1,2 @@ +/* asn1.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/bio.h b/project1/cyassl-3.0.0/cyassl/openssl/bio.h new file mode 100644 index 00000000..aba1935f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/bio.h @@ -0,0 +1,23 @@ +/* bio.h for openssl */ + + +#ifndef CYASSL_BIO_H_ +#define CYASSL_BIO_H_ + +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_BIO_H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/bn.h b/project1/cyassl-3.0.0/cyassl/openssl/bn.h new file mode 100644 index 00000000..0796bab2 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/bn.h @@ -0,0 +1,115 @@ +/* bn.h for openssl */ + + +#ifndef CYASSL_BN_H_ +#define CYASSL_BN_H_ + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct CYASSL_BIGNUM { + int neg; /* openssh deference */ + void* internal; /* our big num */ +} CYASSL_BIGNUM; + + +typedef struct CYASSL_BN_CTX CYASSL_BN_CTX; + + +CYASSL_API CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void); +CYASSL_API void CyaSSL_BN_CTX_init(CYASSL_BN_CTX*); +CYASSL_API void CyaSSL_BN_CTX_free(CYASSL_BN_CTX*); + +CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_new(void); +CYASSL_API void CyaSSL_BN_free(CYASSL_BIGNUM*); +CYASSL_API void CyaSSL_BN_clear_free(CYASSL_BIGNUM*); + + +CYASSL_API int CyaSSL_BN_sub(CYASSL_BIGNUM*, const CYASSL_BIGNUM*, + const CYASSL_BIGNUM*); +CYASSL_API int CyaSSL_BN_mod(CYASSL_BIGNUM*, const CYASSL_BIGNUM*, + const CYASSL_BIGNUM*, const CYASSL_BN_CTX*); + +CYASSL_API const CYASSL_BIGNUM* CyaSSL_BN_value_one(void); + + +CYASSL_API int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM*); +CYASSL_API int CyaSSL_BN_num_bits(const CYASSL_BIGNUM*); + +CYASSL_API int CyaSSL_BN_is_zero(const CYASSL_BIGNUM*); +CYASSL_API int CyaSSL_BN_is_one(const CYASSL_BIGNUM*); +CYASSL_API int CyaSSL_BN_is_odd(const CYASSL_BIGNUM*); + +CYASSL_API int CyaSSL_BN_cmp(const CYASSL_BIGNUM*, const CYASSL_BIGNUM*); + +CYASSL_API int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM*, unsigned char*); +CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char*, int len, + CYASSL_BIGNUM* ret); + +CYASSL_API int CyaSSL_mask_bits(CYASSL_BIGNUM*, int n); + +CYASSL_API int CyaSSL_BN_rand(CYASSL_BIGNUM*, int bits, int top, int bottom); +CYASSL_API int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM*, int n); +CYASSL_API int CyaSSL_BN_hex2bn(CYASSL_BIGNUM**, const char* str); + +CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM*); +CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM*, const CYASSL_BIGNUM*); + +CYASSL_API int CyaSSL_BN_set_word(CYASSL_BIGNUM*, unsigned long w); + +CYASSL_API int CyaSSL_BN_dec2bn(CYASSL_BIGNUM**, const char* str); +CYASSL_API char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM*); + + +typedef CYASSL_BIGNUM BIGNUM; +typedef CYASSL_BN_CTX BN_CTX; + +#define BN_CTX_new CyaSSL_BN_CTX_new +#define BN_CTX_init CyaSSL_BN_CTX_init +#define BN_CTX_free CyaSSL_BN_CTX_free + +#define BN_new CyaSSL_BN_new +#define BN_free CyaSSL_BN_free +#define BN_clear_free CyaSSL_BN_clear_free + +#define BN_num_bytes CyaSSL_BN_num_bytes +#define BN_num_bits CyaSSL_BN_num_bits + +#define BN_is_zero CyaSSL_BN_is_zero +#define BN_is_one CyaSSL_BN_is_one +#define BN_is_odd CyaSSL_BN_is_odd + +#define BN_cmp CyaSSL_BN_cmp + +#define BN_bn2bin CyaSSL_BN_bn2bin +#define BN_bin2bn CyaSSL_BN_bin2bn + +#define BN_mod CyaSSL_BN_mod +#define BN_sub CyaSSL_BN_sub +#define BN_value_one CyaSSL_BN_value_one + +#define BN_mask_bits CyaSSL_mask_bits + +#define BN_rand CyaSSL_BN_rand +#define BN_is_bit_set CyaSSL_BN_is_bit_set +#define BN_hex2bn CyaSSL_BN_hex2bn + +#define BN_dup CyaSSL_BN_dup +#define BN_copy CyaSSL_BN_copy + +#define BN_set_word CyaSSL_BN_set_word + +#define BN_dec2bn CyaSSL_BN_dec2bn +#define BN_bn2dec CyaSSL_BN_bn2dec + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL__H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/conf.h b/project1/cyassl-3.0.0/cyassl/openssl/conf.h new file mode 100644 index 00000000..1e328cf4 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/conf.h @@ -0,0 +1,2 @@ +/* conf.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/crypto.h b/project1/cyassl-3.0.0/cyassl/openssl/crypto.h new file mode 100644 index 00000000..f7d5337c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/crypto.h @@ -0,0 +1,26 @@ +/* crypto.h for openSSL */ + +#ifndef CYASSL_CRYPTO_H_ +#define CYASSL_CRYPTO_H_ + + +#include + +#ifdef YASSL_PREFIX +#include "prefix_crypto.h" +#endif + + +CYASSL_API const char* CyaSSLeay_version(int type); +CYASSL_API unsigned long CyaSSLeay(void); + +#define SSLeay_version CyaSSLeay_version +#define SSLeay CyaSSLeay + + +#define SSLEAY_VERSION 0x0090600fL +#define SSLEAY_VERSION_NUMBER SSLEAY_VERSION + + +#endif /* header */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/des.h b/project1/cyassl-3.0.0/cyassl/openssl/des.h new file mode 100644 index 00000000..848bc28b --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/des.h @@ -0,0 +1,87 @@ +/* des.h + * + * Copyright (C) 2013 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* des.h defines mini des openssl compatibility layer + * + */ + + +#ifndef CYASSL_DES_H_ +#define CYASSL_DES_H_ + +#include + +#ifdef YASSL_PREFIX +#include "prefix_des.h" +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + +typedef unsigned char CYASSL_DES_cblock[8]; +typedef /* const */ CYASSL_DES_cblock CYASSL_const_DES_cblock; +typedef CYASSL_DES_cblock CYASSL_DES_key_schedule; + + +enum { + DES_ENCRYPT = 1, + DES_DECRYPT = 0 +}; + + +CYASSL_API void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock*, + CYASSL_DES_key_schedule*); +CYASSL_API int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key, + CYASSL_DES_key_schedule* schedule); +CYASSL_API void CyaSSL_DES_cbc_encrypt(const unsigned char* input, + unsigned char* output, long length, + CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, + int enc); +CYASSL_API void CyaSSL_DES_ncbc_encrypt(const unsigned char* input, + unsigned char* output, long length, + CYASSL_DES_key_schedule* schedule, + CYASSL_DES_cblock* ivec, int enc); + +CYASSL_API void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock*); +CYASSL_API void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock*, CYASSL_DES_cblock*, + CYASSL_DES_key_schedule*, int); + + +typedef CYASSL_DES_cblock DES_cblock; +typedef CYASSL_const_DES_cblock const_DES_cblock; +typedef CYASSL_DES_key_schedule DES_key_schedule; + +#define DES_set_key_unchecked CyaSSL_DES_set_key_unchecked +#define DES_key_sched CyaSSL_DES_key_sched +#define DES_cbc_encrypt CyaSSL_DES_cbc_encrypt +#define DES_ncbc_encrypt CyaSSL_DES_ncbc_encrypt +#define DES_set_odd_parity CyaSSL_DES_set_odd_parity +#define DES_ecb_encrypt CyaSSL_DES_ecb_encrypt + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_DES_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/dh.h b/project1/cyassl-3.0.0/cyassl/openssl/dh.h new file mode 100644 index 00000000..2faccbca --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/dh.h @@ -0,0 +1,52 @@ +/* dh.h for openSSL */ + + +#ifndef CYASSL_DH_H_ +#define CYASSL_DH_H_ + + +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + + + +typedef struct CYASSL_DH { + CYASSL_BIGNUM* p; + CYASSL_BIGNUM* g; + CYASSL_BIGNUM* pub_key; /* openssh deference g^x */ + CYASSL_BIGNUM* priv_key; /* openssh deference x */ + void* internal; /* our DH */ + char inSet; /* internal set from external ? */ + char exSet; /* external set from internal ? */ +} CYASSL_DH; + + +CYASSL_API CYASSL_DH* CyaSSL_DH_new(void); +CYASSL_API void CyaSSL_DH_free(CYASSL_DH*); + +CYASSL_API int CyaSSL_DH_size(CYASSL_DH*); +CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*); +CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub, + CYASSL_DH*); + +typedef CYASSL_DH DH; + +#define DH_new CyaSSL_DH_new +#define DH_free CyaSSL_DH_free + +#define DH_size CyaSSL_DH_size +#define DH_generate_key CyaSSL_DH_generate_key +#define DH_compute_key CyaSSL_DH_compute_key + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/dsa.h b/project1/cyassl-3.0.0/cyassl/openssl/dsa.h new file mode 100644 index 00000000..817f1fa1 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/dsa.h @@ -0,0 +1,53 @@ +/* dsa.h for openSSL */ + + +#ifndef CYASSL_DSA_H_ +#define CYASSL_DSA_H_ + + +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + + +struct CYASSL_DSA { + CYASSL_BIGNUM* p; + CYASSL_BIGNUM* q; + CYASSL_BIGNUM* g; + CYASSL_BIGNUM* pub_key; /* our y */ + CYASSL_BIGNUM* priv_key; /* our x */ + void* internal; /* our Dsa Key */ + char inSet; /* internal set from external ? */ + char exSet; /* external set from internal ? */ +}; + + +CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void); +CYASSL_API void CyaSSL_DSA_free(CYASSL_DSA*); + +CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*); +CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits, + unsigned char* seed, int seedLen, int* counterRet, + unsigned long* hRet, void* cb); + +CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz); +CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet, + CYASSL_DSA* dsa); + +#define DSA_new CyaSSL_DSA_new +#define DSA_free CyaSSL_DSA_free + +#define DSA_generate_key CyaSSL_DSA_generate_key +#define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ec.h b/project1/cyassl-3.0.0/cyassl/openssl/ec.h new file mode 100644 index 00000000..5ffdaf6e --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ec.h @@ -0,0 +1,2 @@ +/* ec.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h b/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h new file mode 100644 index 00000000..f3cf0de3 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h @@ -0,0 +1,2 @@ +/* ecdsa.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/engine.h b/project1/cyassl-3.0.0/cyassl/openssl/engine.h new file mode 100644 index 00000000..39952fca --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/engine.h @@ -0,0 +1,5 @@ +/* engine.h for libcurl */ + +#undef HAVE_OPENSSL_ENGINE_H + + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/err.h b/project1/cyassl-3.0.0/cyassl/openssl/err.h new file mode 100644 index 00000000..7e7f1eb7 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/err.h @@ -0,0 +1,2 @@ +/* err.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/evp.h b/project1/cyassl-3.0.0/cyassl/openssl/evp.h new file mode 100644 index 00000000..ee2873c5 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/evp.h @@ -0,0 +1,241 @@ +/* evp.h + * + * Copyright (C) 2013 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* evp.h defines mini evp openssl compatibility layer + * + */ + + +#ifndef CYASSL_EVP_H_ +#define CYASSL_EVP_H_ + +#include + +#ifdef YASSL_PREFIX +#include "prefix_evp.h" +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + +typedef char CYASSL_EVP_MD; +typedef char CYASSL_EVP_CIPHER; + +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_md5(void); +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void); +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void); +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void); +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void); +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void); + +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void); +CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void); + + +typedef union { + CYASSL_MD5_CTX md5; + CYASSL_SHA_CTX sha; + CYASSL_SHA256_CTX sha256; + #ifdef CYASSL_SHA384 + CYASSL_SHA384_CTX sha384; + #endif + #ifdef CYASSL_SHA512 + CYASSL_SHA512_CTX sha512; + #endif + #ifdef CYASSL_RIPEMD + CYASSL_RIPEMD_CTX ripemd; + #endif +} CYASSL_Hasher; + + +typedef struct CYASSL_EVP_MD_CTX { + unsigned char macType; + CYASSL_Hasher hash; +} CYASSL_EVP_MD_CTX; + + +typedef union { + Aes aes; +#ifndef NO_DES3 + Des des; + Des3 des3; +#endif + Arc4 arc4; +} CYASSL_Cipher; + + +enum { + AES_128_CBC_TYPE = 1, + AES_192_CBC_TYPE = 2, + AES_256_CBC_TYPE = 3, + AES_128_CTR_TYPE = 4, + AES_192_CTR_TYPE = 5, + AES_256_CTR_TYPE = 6, + DES_CBC_TYPE = 7, + DES_EDE3_CBC_TYPE = 8, + ARC4_TYPE = 9, + NULL_CIPHER_TYPE = 10, + EVP_PKEY_RSA = 11, + EVP_PKEY_DSA = 12, + NID_sha1 = 64, + NID_md5 = 4 +}; + + +typedef struct CYASSL_EVP_CIPHER_CTX { + int keyLen; /* user may set for variable */ + unsigned char enc; /* if encrypt side, then true */ + unsigned char cipherType; + unsigned char iv[AES_BLOCK_SIZE]; /* working iv pointer into cipher */ + CYASSL_Cipher cipher; +} CYASSL_EVP_CIPHER_CTX; + + +CYASSL_API int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* md); +CYASSL_API void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx); +CYASSL_API int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx); + +CYASSL_API int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, + const CYASSL_EVP_MD* type); +CYASSL_API int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data, + unsigned long sz); +CYASSL_API int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, + unsigned int* s); +CYASSL_API int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, + unsigned char* md, unsigned int* s); +CYASSL_API int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER*, + const CYASSL_EVP_MD*, const unsigned char*, + const unsigned char*, int, int, unsigned char*, + unsigned char*); + +CYASSL_API void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx); +CYASSL_API int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx); + +CYASSL_API int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX*); + + +CYASSL_API int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx, + const CYASSL_EVP_CIPHER* type, + unsigned char* key, unsigned char* iv, + int enc); +CYASSL_API int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx); +CYASSL_API int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx, + int keylen); +CYASSL_API int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, + unsigned char* dst, unsigned char* src, + unsigned int len); + +CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int); + +CYASSL_API CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY*); +CYASSL_API CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY*); + +/* these next ones don't need real OpenSSL type, for OpenSSH compat only */ +CYASSL_API void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx); +CYASSL_API int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx); + +CYASSL_API void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, + unsigned char* iv, int len); +CYASSL_API void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, + unsigned char* iv, int len); + +CYASSL_API int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx); +CYASSL_API int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx); + + +/* end OpenSSH compat */ + +typedef CYASSL_EVP_MD EVP_MD; +typedef CYASSL_EVP_CIPHER EVP_CIPHER; +typedef CYASSL_EVP_MD_CTX EVP_MD_CTX; +typedef CYASSL_EVP_CIPHER_CTX EVP_CIPHER_CTX; + +#define EVP_md5 CyaSSL_EVP_md5 +#define EVP_sha1 CyaSSL_EVP_sha1 +#define EVP_sha256 CyaSSL_EVP_sha256 +#define EVP_sha384 CyaSSL_EVP_sha384 +#define EVP_sha512 CyaSSL_EVP_sha512 +#define EVP_ripemd160 CyaSSL_EVP_ripemd160 + +#define EVP_aes_128_cbc CyaSSL_EVP_aes_128_cbc +#define EVP_aes_192_cbc CyaSSL_EVP_aes_192_cbc +#define EVP_aes_256_cbc CyaSSL_EVP_aes_256_cbc +#define EVP_aes_128_ctr CyaSSL_EVP_aes_128_ctr +#define EVP_aes_192_ctr CyaSSL_EVP_aes_192_ctr +#define EVP_aes_256_ctr CyaSSL_EVP_aes_256_ctr +#define EVP_des_cbc CyaSSL_EVP_des_cbc +#define EVP_des_ede3_cbc CyaSSL_EVP_des_ede3_cbc +#define EVP_rc4 CyaSSL_EVP_rc4 +#define EVP_enc_null CyaSSL_EVP_enc_null + +#define EVP_MD_size CyaSSL_EVP_MD_size +#define EVP_MD_CTX_init CyaSSL_EVP_MD_CTX_init +#define EVP_MD_CTX_cleanup CyaSSL_EVP_MD_CTX_cleanup +#define EVP_DigestInit CyaSSL_EVP_DigestInit +#define EVP_DigestUpdate CyaSSL_EVP_DigestUpdate +#define EVP_DigestFinal CyaSSL_EVP_DigestFinal +#define EVP_DigestFinal_ex CyaSSL_EVP_DigestFinal_ex +#define EVP_BytesToKey CyaSSL_EVP_BytesToKey + +#define EVP_CIPHER_CTX_init CyaSSL_EVP_CIPHER_CTX_init +#define EVP_CIPHER_CTX_cleanup CyaSSL_EVP_CIPHER_CTX_cleanup +#define EVP_CIPHER_CTX_iv_length CyaSSL_EVP_CIPHER_CTX_iv_length +#define EVP_CIPHER_CTX_key_length CyaSSL_EVP_CIPHER_CTX_key_length +#define EVP_CIPHER_CTX_set_key_length CyaSSL_EVP_CIPHER_CTX_set_key_length +#define EVP_CipherInit CyaSSL_EVP_CipherInit +#define EVP_Cipher CyaSSL_EVP_Cipher + +#define EVP_get_digestbynid CyaSSL_EVP_get_digestbynid + +#define EVP_PKEY_get1_RSA CyaSSL_EVP_PKEY_get1_RSA +#define EVP_PKEY_get1_DSA CyaSSL_EVP_PKEY_get1_DSA + +#ifndef EVP_MAX_MD_SIZE + #define EVP_MAX_MD_SIZE 64 /* sha512 */ +#endif + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_EVP_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/hmac.h b/project1/cyassl-3.0.0/cyassl/openssl/hmac.h new file mode 100644 index 00000000..4482d109 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/hmac.h @@ -0,0 +1,81 @@ +/* hmac.h + * + * Copyright (C) 2013 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* hmac.h defines mini hamc openssl compatibility layer + * + */ + + +#ifndef CYASSL_HMAC_H_ +#define CYASSL_HMAC_H_ + +#include + +#ifdef YASSL_PREFIX +#include "prefix_hmac.h" +#endif + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +CYASSL_API unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, + const void* key, int key_len, + const unsigned char* d, int n, unsigned char* md, + unsigned int* md_len); + + +typedef struct CYASSL_HMAC_CTX { + Hmac hmac; + int type; +} CYASSL_HMAC_CTX; + + +CYASSL_API void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, + int keylen, const EVP_MD* type); +CYASSL_API void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, + const unsigned char* data, int len); +CYASSL_API void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash, + unsigned int* len); +CYASSL_API void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx); + + +typedef struct CYASSL_HMAC_CTX HMAC_CTX; + +#define HMAC(a,b,c,d,e,f,g) CyaSSL_HMAC((a),(b),(c),(d),(e),(f),(g)) + +#define HMAC_Init CyaSSL_HMAC_Init +#define HMAC_Update CyaSSL_HMAC_Update +#define HMAC_Final CyaSSL_HMAC_Final +#define HMAC_cleanup CyaSSL_HMAC_cleanup + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_HMAC_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/include.am b/project1/cyassl-3.0.0/cyassl/openssl/include.am new file mode 100644 index 00000000..e531f767 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/include.am @@ -0,0 +1,36 @@ +# vim:ft=automake +# All paths should be given relative to the root + +nobase_include_HEADERS+= \ + cyassl/openssl/asn1.h \ + cyassl/openssl/bio.h \ + cyassl/openssl/bn.h \ + cyassl/openssl/conf.h \ + cyassl/openssl/crypto.h \ + cyassl/openssl/des.h \ + cyassl/openssl/dh.h \ + cyassl/openssl/dsa.h \ + cyassl/openssl/ecdsa.h \ + cyassl/openssl/ec.h \ + cyassl/openssl/engine.h \ + cyassl/openssl/err.h \ + cyassl/openssl/evp.h \ + cyassl/openssl/hmac.h \ + cyassl/openssl/lhash.h \ + cyassl/openssl/md4.h \ + cyassl/openssl/md5.h \ + cyassl/openssl/ripemd.h \ + cyassl/openssl/ocsp.h \ + cyassl/openssl/opensslconf.h \ + cyassl/openssl/opensslv.h \ + cyassl/openssl/ossl_typ.h \ + cyassl/openssl/pem.h \ + cyassl/openssl/pkcs12.h \ + cyassl/openssl/rand.h \ + cyassl/openssl/rsa.h \ + cyassl/openssl/sha.h \ + cyassl/openssl/ssl.h \ + cyassl/openssl/stack.h \ + cyassl/openssl/ui.h \ + cyassl/openssl/x509.h \ + cyassl/openssl/x509v3.h diff --git a/project1/cyassl-3.0.0/cyassl/openssl/lhash.h b/project1/cyassl-3.0.0/cyassl/openssl/lhash.h new file mode 100644 index 00000000..01f8535f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/lhash.h @@ -0,0 +1,2 @@ +/* lhash.h for openSSL */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/md4.h b/project1/cyassl-3.0.0/cyassl/openssl/md4.h new file mode 100644 index 00000000..2e99f977 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/md4.h @@ -0,0 +1 @@ +/* md4.h for libcurl */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/md5.h b/project1/cyassl-3.0.0/cyassl/openssl/md5.h new file mode 100644 index 00000000..0fddb517 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/md5.h @@ -0,0 +1,39 @@ +/* md5.h for openssl */ + + +#ifndef CYASSL_MD5_H_ +#define CYASSL_MD5_H_ + +#include + +#ifdef YASSL_PREFIX +#include "prefix_md5.h" +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct CYASSL_MD5_CTX { + int holder[24]; /* big enough to hold ctaocrypt md5, but check on init */ +} CYASSL_MD5_CTX; + +CYASSL_API void CyaSSL_MD5_Init(CYASSL_MD5_CTX*); +CYASSL_API void CyaSSL_MD5_Update(CYASSL_MD5_CTX*, const void*, unsigned long); +CYASSL_API void CyaSSL_MD5_Final(unsigned char*, CYASSL_MD5_CTX*); + + +typedef CYASSL_MD5_CTX MD5_CTX; + +#define MD5_Init CyaSSL_MD5_Init +#define MD5_Update CyaSSL_MD5_Update +#define MD5_Final CyaSSL_MD5_Final + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_MD5_H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h b/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h new file mode 100644 index 00000000..7463eec9 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h @@ -0,0 +1 @@ +/* ocsp.h for libcurl */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h b/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h new file mode 100644 index 00000000..ac6b55bc --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h @@ -0,0 +1,8 @@ +/* opensslconf.h for openSSL */ + + +#ifndef OPENSSL_THREADS + #define OPENSSL_THREADS +#endif + + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h b/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h new file mode 100644 index 00000000..bdcc805e --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h @@ -0,0 +1,12 @@ +/* opensslv.h compatibility */ + +#ifndef CYASSL_OPENSSLV_H_ +#define CYASSL_OPENSSLV_H_ + + +/* api version compatibility */ +#define OPENSSL_VERSION_NUMBER 0x0090410fL + + +#endif /* header */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h b/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h new file mode 100644 index 00000000..65b00c72 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h @@ -0,0 +1,2 @@ +/* ossl_typ.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/pem.h b/project1/cyassl-3.0.0/cyassl/openssl/pem.h new file mode 100644 index 00000000..b727862b --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/pem.h @@ -0,0 +1,41 @@ +/* pem.h for openssl */ + + +#ifndef CYASSL_PEM_H_ +#define CYASSL_PEM_H_ + +#include +#include +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +CYASSL_API int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa, + const EVP_CIPHER* cipher, + unsigned char* passwd, int len, + pem_password_cb cb, void* arg); + +CYASSL_API int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa, + const EVP_CIPHER* cipher, + unsigned char* passwd, int len, + pem_password_cb cb, void* arg); + +CYASSL_API CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio, + CYASSL_EVP_PKEY**, pem_password_cb cb, void* arg); + +#define PEM_write_bio_RSAPrivateKey CyaSSL_PEM_write_bio_RSAPrivateKey +#define PEM_write_bio_DSAPrivateKey CyaSSL_PEM_write_bio_DSAPrivateKey +#define PEM_read_bio_PrivateKey CyaSSL_PEM_read_bio_PrivateKey + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_PEM_H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h b/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h new file mode 100644 index 00000000..544b6f09 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h @@ -0,0 +1,2 @@ +/* pkcs12.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/rand.h b/project1/cyassl-3.0.0/cyassl/openssl/rand.h new file mode 100644 index 00000000..a5534e1a --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/rand.h @@ -0,0 +1,4 @@ +/* rand.h for openSSL */ + +#include + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h b/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h new file mode 100644 index 00000000..2d4d0146 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h @@ -0,0 +1,37 @@ +/* ripemd.h for openssl */ + + +#ifndef CYASSL_RIPEMD_H_ +#define CYASSL_RIPEMD_H_ + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct CYASSL_RIPEMD_CTX { + int holder[32]; /* big enough to hold ctaocrypt, but check on init */ +} CYASSL_RIPEMD_CTX; + +CYASSL_API void CyaSSL_RIPEMD_Init(CYASSL_RIPEMD_CTX*); +CYASSL_API void CyaSSL_RIPEMD_Update(CYASSL_RIPEMD_CTX*, const void*, + unsigned long); +CYASSL_API void CyaSSL_RIPEMD_Final(unsigned char*, CYASSL_RIPEMD_CTX*); + + +typedef CYASSL_RIPEMD_CTX RIPEMD_CTX; + +#define RIPEMD_Init CyaSSL_RIPEMD_Init +#define RIPEMD_Update CyaSSL_RIPEMD_Update +#define RIPEMD_Final CyaSSL_RIPEMD_Final + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_MD5_H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/rsa.h b/project1/cyassl-3.0.0/cyassl/openssl/rsa.h new file mode 100644 index 00000000..149ad46c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/rsa.h @@ -0,0 +1,75 @@ +/* rsa.h for openSSL */ + + +#ifndef CYASSL_RSA_H_ +#define CYASSL_RSA_H_ + +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +enum { + RSA_PKCS1_PADDING = 1 + }; + +struct CYASSL_RSA { + CYASSL_BIGNUM* n; + CYASSL_BIGNUM* e; + CYASSL_BIGNUM* d; + CYASSL_BIGNUM* p; + CYASSL_BIGNUM* q; + CYASSL_BIGNUM* dmp1; /* dP */ + CYASSL_BIGNUM* dmq1; /* dQ */ + CYASSL_BIGNUM* iqmp; /* u */ + void* internal; /* our RSA */ + char inSet; /* internal set from external ? */ + char exSet; /* external set from internal ? */ +}; + + +CYASSL_API CYASSL_RSA* CyaSSL_RSA_new(void); +CYASSL_API void CyaSSL_RSA_free(CYASSL_RSA*); + +CYASSL_API int CyaSSL_RSA_generate_key_ex(CYASSL_RSA*, int bits, CYASSL_BIGNUM*, + void* cb); + +CYASSL_API int CyaSSL_RSA_blinding_on(CYASSL_RSA*, CYASSL_BN_CTX*); +CYASSL_API int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr, + unsigned char* to, CYASSL_RSA*, int padding); +CYASSL_API int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr, + unsigned char* to, CYASSL_RSA*, int padding); + +CYASSL_API int CyaSSL_RSA_size(const CYASSL_RSA*); +CYASSL_API int CyaSSL_RSA_sign(int type, const unsigned char* m, + unsigned int mLen, unsigned char* sigRet, + unsigned int* sigLen, CYASSL_RSA*); +CYASSL_API int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from, + unsigned char* to, CYASSL_RSA*, int padding); +CYASSL_API int CyaSSL_RSA_GenAdd(CYASSL_RSA*); +CYASSL_API int CyaSSL_RSA_LoadDer(CYASSL_RSA*, const unsigned char*, int sz); + + +#define RSA_new CyaSSL_RSA_new +#define RSA_free CyaSSL_RSA_free + +#define RSA_generate_key_ex CyaSSL_RSA_generate_key_ex + +#define RSA_blinding_on CyaSSL_RSA_blinding_on +#define RSA_public_encrypt CyaSSL_RSA_public_encrypt +#define RSA_private_decrypt CyaSSL_RSA_private_decrypt + +#define RSA_size CyaSSL_RSA_size +#define RSA_sign CyaSSL_RSA_sign +#define RSA_public_decrypt CyaSSL_RSA_public_decrypt + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/sha.h b/project1/cyassl-3.0.0/cyassl/openssl/sha.h new file mode 100644 index 00000000..9545795e --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/sha.h @@ -0,0 +1,125 @@ +/* sha.h for openssl */ + + +#ifndef CYASSL_SHA_H_ +#define CYASSL_SHA_H_ + +#include + +#ifdef YASSL_PREFIX +#include "prefix_sha.h" +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct CYASSL_SHA_CTX { + int holder[24]; /* big enough to hold ctaocrypt sha, but check on init */ +} CYASSL_SHA_CTX; + +CYASSL_API void CyaSSL_SHA_Init(CYASSL_SHA_CTX*); +CYASSL_API void CyaSSL_SHA_Update(CYASSL_SHA_CTX*, const void*, unsigned long); +CYASSL_API void CyaSSL_SHA_Final(unsigned char*, CYASSL_SHA_CTX*); + +/* SHA1 points to above, shouldn't use SHA0 ever */ +CYASSL_API void CyaSSL_SHA1_Init(CYASSL_SHA_CTX*); +CYASSL_API void CyaSSL_SHA1_Update(CYASSL_SHA_CTX*, const void*, unsigned long); +CYASSL_API void CyaSSL_SHA1_Final(unsigned char*, CYASSL_SHA_CTX*); + +enum { + SHA_DIGEST_LENGTH = 20 +}; + + +typedef CYASSL_SHA_CTX SHA_CTX; + +#define SHA_Init CyaSSL_SHA_Init +#define SHA_Update CyaSSL_SHA_Update +#define SHA_Final CyaSSL_SHA_Final + +#define SHA1_Init CyaSSL_SHA1_Init +#define SHA1_Update CyaSSL_SHA1_Update +#define SHA1_Final CyaSSL_SHA1_Final + + +typedef struct CYASSL_SHA256_CTX { + int holder[28]; /* big enough to hold ctaocrypt sha, but check on init */ +} CYASSL_SHA256_CTX; + +CYASSL_API void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX*); +CYASSL_API void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX*, const void*, + unsigned long); +CYASSL_API void CyaSSL_SHA256_Final(unsigned char*, CYASSL_SHA256_CTX*); + +enum { + SHA256_DIGEST_LENGTH = 32 +}; + + +typedef CYASSL_SHA256_CTX SHA256_CTX; + +#define SHA256_Init CyaSSL_SHA256_Init +#define SHA256_Update CyaSSL_SHA256_Update +#define SHA256_Final CyaSSL_SHA256_Final + + +#ifdef CYASSL_SHA384 + +typedef struct CYASSL_SHA384_CTX { + long long holder[32]; /* big enough, but check on init */ +} CYASSL_SHA384_CTX; + +CYASSL_API void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX*); +CYASSL_API void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX*, const void*, + unsigned long); +CYASSL_API void CyaSSL_SHA384_Final(unsigned char*, CYASSL_SHA384_CTX*); + +enum { + SHA384_DIGEST_LENGTH = 48 +}; + + +typedef CYASSL_SHA384_CTX SHA384_CTX; + +#define SHA384_Init CyaSSL_SHA384_Init +#define SHA384_Update CyaSSL_SHA384_Update +#define SHA384_Final CyaSSL_SHA384_Final + +#endif /* CYASSL_SHA384 */ + +#ifdef CYASSL_SHA512 + +typedef struct CYASSL_SHA512_CTX { + long long holder[36]; /* big enough, but check on init */ +} CYASSL_SHA512_CTX; + +CYASSL_API void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX*); +CYASSL_API void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX*, const void*, + unsigned long); +CYASSL_API void CyaSSL_SHA512_Final(unsigned char*, CYASSL_SHA512_CTX*); + +enum { + SHA512_DIGEST_LENGTH = 64 +}; + + +typedef CYASSL_SHA512_CTX SHA512_CTX; + +#define SHA512_Init CyaSSL_SHA512_Init +#define SHA512_Update CyaSSL_SHA512_Update +#define SHA512_Final CyaSSL_SHA512_Final + +#endif /* CYASSL_SHA512 */ + + + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_SHA_H_ */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ssl.h b/project1/cyassl-3.0.0/cyassl/openssl/ssl.h new file mode 100644 index 00000000..0fb6d453 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ssl.h @@ -0,0 +1,380 @@ +/* ssl.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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 + * a with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +/* ssl.h defines openssl compatibility layer + * + */ + + +#ifndef CYASSL_OPENSSL_H_ +#define CYASSL_OPENSSL_H_ + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +#ifdef _WIN32 + /* wincrypt.h clashes */ + #undef X509_NAME +#endif + + +typedef CYASSL SSL; +typedef CYASSL_SESSION SSL_SESSION; +typedef CYASSL_METHOD SSL_METHOD; +typedef CYASSL_CTX SSL_CTX; + +typedef CYASSL_X509 X509; +typedef CYASSL_X509_NAME X509_NAME; +typedef CYASSL_X509_CHAIN X509_CHAIN; + + +/* redeclare guard */ +#define CYASSL_TYPES_DEFINED + + +typedef CYASSL_EVP_PKEY EVP_PKEY; +typedef CYASSL_RSA RSA; +typedef CYASSL_DSA DSA; +typedef CYASSL_BIO BIO; +typedef CYASSL_BIO_METHOD BIO_METHOD; +typedef CYASSL_CIPHER SSL_CIPHER; +typedef CYASSL_X509_LOOKUP X509_LOOKUP; +typedef CYASSL_X509_LOOKUP_METHOD X509_LOOKUP_METHOD; +typedef CYASSL_X509_CRL X509_CRL; +typedef CYASSL_X509_EXTENSION X509_EXTENSION; +typedef CYASSL_ASN1_TIME ASN1_TIME; +typedef CYASSL_ASN1_INTEGER ASN1_INTEGER; +typedef CYASSL_ASN1_OBJECT ASN1_OBJECT; +typedef CYASSL_ASN1_STRING ASN1_STRING; +typedef CYASSL_dynlock_value CRYPTO_dynlock_value; + +#define ASN1_UTCTIME CYASSL_ASN1_TIME + +typedef CYASSL_MD4_CTX MD4_CTX; +typedef CYASSL_COMP_METHOD COMP_METHOD; +typedef CYASSL_X509_STORE X509_STORE; +typedef CYASSL_X509_REVOKED X509_REVOKED; +typedef CYASSL_X509_OBJECT X509_OBJECT; +typedef CYASSL_X509_STORE_CTX X509_STORE_CTX; + + +#define SSLv3_server_method CyaSSLv3_server_method +#define SSLv3_client_method CyaSSLv3_client_method +#define TLSv1_server_method CyaTLSv1_server_method +#define TLSv1_client_method CyaTLSv1_client_method +#define TLSv1_1_server_method CyaTLSv1_1_server_method +#define TLSv1_1_client_method CyaTLSv1_1_client_method +#define TLSv1_2_server_method CyaTLSv1_2_server_method +#define TLSv1_2_client_method CyaTLSv1_2_client_method + +#ifdef CYASSL_DTLS + #define DTLSv1_client_method CyaDTLSv1_client_method + #define DTLSv1_server_method CyaDTLSv1_server_method + #define DTLSv1_2_client_method CyaDTLSv1_2_client_method + #define DTLSv1_2_server_method CyaDTLSv1_2_server_method +#endif + + +#ifndef NO_FILESYSTEM + #define SSL_CTX_use_certificate_file CyaSSL_CTX_use_certificate_file + #define SSL_CTX_use_PrivateKey_file CyaSSL_CTX_use_PrivateKey_file + #define SSL_CTX_load_verify_locations CyaSSL_CTX_load_verify_locations + #define SSL_CTX_use_certificate_chain_file CyaSSL_CTX_use_certificate_chain_file + #define SSL_CTX_use_RSAPrivateKey_file CyaSSL_CTX_use_RSAPrivateKey_file + + #define SSL_use_certificate_file CyaSSL_use_certificate_file + #define SSL_use_PrivateKey_file CyaSSL_use_PrivateKey_file + #define SSL_use_certificate_chain_file CyaSSL_use_certificate_chain_file + #define SSL_use_RSAPrivateKey_file CyaSSL_use_RSAPrivateKey_file +#endif + +#define SSL_CTX_new CyaSSL_CTX_new +#define SSL_new CyaSSL_new +#define SSL_set_fd CyaSSL_set_fd +#define SSL_get_fd CyaSSL_get_fd +#define SSL_connect CyaSSL_connect + +#define SSL_write CyaSSL_write +#define SSL_read CyaSSL_read +#define SSL_peek CyaSSL_peek +#define SSL_accept CyaSSL_accept +#define SSL_CTX_free CyaSSL_CTX_free +#define SSL_free CyaSSL_free +#define SSL_shutdown CyaSSL_shutdown + +#define SSL_CTX_set_quiet_shutdown CyaSSL_CTX_set_quiet_shutdown +#define SSL_set_quiet_shutdown CyaSSL_set_quiet_shutdown +#define SSL_get_error CyaSSL_get_error +#define SSL_set_session CyaSSL_set_session +#define SSL_get_session CyaSSL_get_session +#define SSL_flush_sessions CyaSSL_flush_sessions + +#define SSL_CTX_set_verify CyaSSL_CTX_set_verify +#define SSL_set_verify CyaSSL_set_verify +#define SSL_pending CyaSSL_pending +#define SSL_load_error_strings CyaSSL_load_error_strings +#define SSL_library_init CyaSSL_library_init +#define SSL_CTX_set_session_cache_mode CyaSSL_CTX_set_session_cache_mode +#define SSL_CTX_set_cipher_list CyaSSL_CTX_set_cipher_list +#define SSL_set_cipher_list CyaSSL_set_cipher_list + +#define ERR_error_string CyaSSL_ERR_error_string +#define ERR_error_string_n CyaSSL_ERR_error_string_n + +#define SSL_set_ex_data CyaSSL_set_ex_data +#define SSL_get_shutdown CyaSSL_get_shutdown +#define SSL_set_rfd CyaSSL_set_rfd +#define SSL_set_wfd CyaSSL_set_wfd +#define SSL_set_shutdown CyaSSL_set_shutdown +#define SSL_set_session_id_context CyaSSL_set_session_id_context +#define SSL_set_connect_state CyaSSL_set_connect_state +#define SSL_set_accept_state CyaSSL_set_accept_state +#define SSL_session_reused CyaSSL_session_reused +#define SSL_SESSION_free CyaSSL_SESSION_free +#define SSL_is_init_finished CyaSSL_is_init_finished + +#define SSL_get_version CyaSSL_get_version +#define SSL_get_current_cipher CyaSSL_get_current_cipher +#define SSL_get_cipher CyaSSL_get_cipher +#define SSL_CIPHER_description CyaSSL_CIPHER_description +#define SSL_CIPHER_get_name CyaSSL_CIPHER_get_name +#define SSL_get1_session CyaSSL_get1_session + +#define SSL_get_keyblock_size CyaSSL_get_keyblock_size +#define SSL_get_keys CyaSSL_get_keys + +#define X509_free CyaSSL_X509_free +#define OPENSSL_free CyaSSL_OPENSSL_free + +#define OCSP_parse_url CyaSSL_OCSP_parse_url +#define SSLv23_client_method CyaSSLv23_client_method +#define SSLv2_client_method CyaSSLv2_client_method +#define SSLv2_server_method CyaSSLv2_server_method + +#define MD4_Init CyaSSL_MD4_Init +#define MD4_Update CyaSSL_MD4_Update +#define MD4_Final CyaSSL_MD4_Final + +#define BIO_new CyaSSL_BIO_new +#define BIO_free CyaSSL_BIO_free +#define BIO_free_all CyaSSL_BIO_free_all +#define BIO_read CyaSSL_BIO_read +#define BIO_write CyaSSL_BIO_write +#define BIO_push CyaSSL_BIO_push +#define BIO_pop CyaSSL_BIO_pop +#define BIO_flush CyaSSL_BIO_flush +#define BIO_pending CyaSSL_BIO_pending + +#define BIO_get_mem_data CyaSSL_BIO_get_mem_data +#define BIO_new_mem_buf CyaSSL_BIO_new_mem_buf + +#define BIO_f_buffer CyaSSL_BIO_f_buffer +#define BIO_set_write_buffer_size CyaSSL_BIO_set_write_buffer_size +#define BIO_f_ssl CyaSSL_BIO_f_ssl +#define BIO_new_socket CyaSSL_BIO_new_socket +#define SSL_set_bio CyaSSL_set_bio +#define BIO_eof CyaSSL_BIO_eof +#define BIO_set_ss CyaSSL_BIO_set_ss + +#define BIO_s_mem CyaSSL_BIO_s_mem +#define BIO_f_base64 CyaSSL_BIO_f_base64 +#define BIO_set_flags CyaSSL_BIO_set_flags + +#define OpenSSL_add_all_algorithms CyaSSL_add_all_algorithms +#define SSLeay_add_ssl_algorithms CyaSSL_add_all_algorithms +#define SSLeay_add_all_algorithms CyaSSL_add_all_algorithms + +#define RAND_screen CyaSSL_RAND_screen +#define RAND_file_name CyaSSL_RAND_file_name +#define RAND_write_file CyaSSL_RAND_write_file +#define RAND_load_file CyaSSL_RAND_load_file +#define RAND_egd CyaSSL_RAND_egd +#define RAND_seed CyaSSL_RAND_seed +#define RAND_add CyaSSL_RAND_add + +#define COMP_zlib CyaSSL_COMP_zlib +#define COMP_rle CyaSSL_COMP_rle +#define SSL_COMP_add_compression_method CyaSSL_COMP_add_compression_method + +#define SSL_get_ex_new_index CyaSSL_get_ex_new_index + +#define CRYPTO_set_id_callback CyaSSL_set_id_callback +#define CRYPTO_set_locking_callback CyaSSL_set_locking_callback +#define CRYPTO_set_dynlock_create_callback CyaSSL_set_dynlock_create_callback +#define CRYPTO_set_dynlock_lock_callback CyaSSL_set_dynlock_lock_callback +#define CRYPTO_set_dynlock_destroy_callback CyaSSL_set_dynlock_destroy_callback +#define CRYPTO_num_locks CyaSSL_num_locks + +#define X509_STORE_CTX_get_current_cert CyaSSL_X509_STORE_CTX_get_current_cert +#define X509_STORE_CTX_get_error CyaSSL_X509_STORE_CTX_get_error +#define X509_STORE_CTX_get_error_depth CyaSSL_X509_STORE_CTX_get_error_depth + +#define X509_NAME_oneline CyaSSL_X509_NAME_oneline +#define X509_get_issuer_name CyaSSL_X509_get_issuer_name +#define X509_get_subject_name CyaSSL_X509_get_subject_name +#define X509_verify_cert_error_string CyaSSL_X509_verify_cert_error_string + +#define X509_LOOKUP_add_dir CyaSSL_X509_LOOKUP_add_dir +#define X509_LOOKUP_load_file CyaSSL_X509_LOOKUP_load_file +#define X509_LOOKUP_hash_dir CyaSSL_X509_LOOKUP_hash_dir +#define X509_LOOKUP_file CyaSSL_X509_LOOKUP_file + +#define X509_STORE_add_lookup CyaSSL_X509_STORE_add_lookup +#define X509_STORE_new CyaSSL_X509_STORE_new +#define X509_STORE_get_by_subject CyaSSL_X509_STORE_get_by_subject +#define X509_STORE_CTX_init CyaSSL_X509_STORE_CTX_init +#define X509_STORE_CTX_cleanup CyaSSL_X509_STORE_CTX_cleanup + +#define X509_CRL_get_lastUpdate CyaSSL_X509_CRL_get_lastUpdate +#define X509_CRL_get_nextUpdate CyaSSL_X509_CRL_get_nextUpdate + +#define X509_get_pubkey CyaSSL_X509_get_pubkey +#define X509_CRL_verify CyaSSL_X509_CRL_verify +#define X509_STORE_CTX_set_error CyaSSL_X509_STORE_CTX_set_error +#define X509_OBJECT_free_contents CyaSSL_X509_OBJECT_free_contents +#define EVP_PKEY_free CyaSSL_EVP_PKEY_free +#define X509_cmp_current_time CyaSSL_X509_cmp_current_time +#define sk_X509_REVOKED_num CyaSSL_sk_X509_REVOKED_num +#define X509_CRL_get_REVOKED CyaSSL_X509_CRL_get_REVOKED +#define sk_X509_REVOKED_value CyaSSL_sk_X509_REVOKED_value + +#define X509_get_serialNumber CyaSSL_X509_get_serialNumber + +#define ASN1_TIME_pr CyaSSL_ASN1_TIME_pr + +#define ASN1_INTEGER_cmp CyaSSL_ASN1_INTEGER_cmp +#define ASN1_INTEGER_get CyaSSL_ASN1_INTEGER_get + +#define SSL_load_client_CA_file CyaSSL_load_client_CA_file + +#define SSL_CTX_set_client_CA_list CyaSSL_CTX_set_client_CA_list +#define X509_STORE_CTX_get_ex_data CyaSSL_X509_STORE_CTX_get_ex_data +#define SSL_get_ex_data_X509_STORE_CTX_idx CyaSSL_get_ex_data_X509_STORE_CTX_idx +#define SSL_get_ex_data CyaSSL_get_ex_data + +#define SSL_CTX_set_default_passwd_cb_userdata CyaSSL_CTX_set_default_passwd_cb_userdata +#define SSL_CTX_set_default_passwd_cb CyaSSL_CTX_set_default_passwd_cb + +#define SSL_CTX_set_timeout CyaSSL_CTX_set_timeout +#define SSL_CTX_set_info_callback CyaSSL_CTX_set_info_callback + +#define ERR_peek_error CyaSSL_ERR_peek_error +#define ERR_GET_REASON CyaSSL_ERR_GET_REASON + +#define SSL_alert_type_string CyaSSL_alert_type_string +#define SSL_alert_desc_string CyaSSL_alert_desc_string +#define SSL_state_string CyaSSL_state_string + +#define RSA_free CyaSSL_RSA_free +#define RSA_generate_key CyaSSL_RSA_generate_key +#define SSL_CTX_set_tmp_rsa_callback CyaSSL_CTX_set_tmp_rsa_callback + +#define PEM_def_callback CyaSSL_PEM_def_callback + +#define SSL_CTX_sess_accept CyaSSL_CTX_sess_accept +#define SSL_CTX_sess_connect CyaSSL_CTX_sess_connect +#define SSL_CTX_sess_accept_good CyaSSL_CTX_sess_accept_good +#define SSL_CTX_sess_connect_good CyaSSL_CTX_sess_connect_good +#define SSL_CTX_sess_accept_renegotiate CyaSSL_CTX_sess_accept_renegotiate +#define SSL_CTX_sess_connect_renegotiate CyaSSL_CTX_sess_connect_renegotiate +#define SSL_CTX_sess_hits CyaSSL_CTX_sess_hits +#define SSL_CTX_sess_cb_hits CyaSSL_CTX_sess_cb_hits +#define SSL_CTX_sess_cache_full CyaSSL_CTX_sess_cache_full +#define SSL_CTX_sess_misses CyaSSL_CTX_sess_misses +#define SSL_CTX_sess_timeouts CyaSSL_CTX_sess_timeouts +#define SSL_CTX_sess_number CyaSSL_CTX_sess_number +#define SSL_CTX_sess_get_cache_size CyaSSL_CTX_sess_get_cache_size + + +#define SSL_DEFAULT_CIPHER_LIST CYASSL_DEFAULT_CIPHER_LIST +#define RSA_F4 CYASSL_RSA_F4 + +#define SSL_CTX_set_psk_client_callback CyaSSL_CTX_set_psk_client_callback +#define SSL_set_psk_client_callback CyaSSL_set_psk_client_callback + +#define SSL_get_psk_identity_hint CyaSSL_get_psk_identity_hint +#define SSL_get_psk_identity CyaSSL_get_psk_identity + +#define SSL_CTX_use_psk_identity_hint CyaSSL_CTX_use_psk_identity_hint +#define SSL_use_psk_identity_hint CyaSSL_use_psk_identity_hint + +#define SSL_CTX_set_psk_server_callback CyaSSL_CTX_set_psk_server_callback +#define SSL_set_psk_server_callback CyaSSL_set_psk_server_callback + +#define ERR_get_error_line_data CyaSSL_ERR_get_error_line_data + +#define ERR_get_error CyaSSL_ERR_get_error +#define ERR_clear_error CyaSSL_ERR_clear_error + +#define RAND_status CyaSSL_RAND_status +#define RAND_bytes CyaSSL_RAND_bytes +#define SSLv23_server_method CyaSSLv23_server_method +#define SSL_CTX_set_options CyaSSL_CTX_set_options +#define SSL_CTX_check_private_key CyaSSL_CTX_check_private_key + +#define ERR_free_strings CyaSSL_ERR_free_strings +#define ERR_remove_state CyaSSL_ERR_remove_state +#define EVP_cleanup CyaSSL_EVP_cleanup + +#define CRYPTO_cleanup_all_ex_data CyaSSL_cleanup_all_ex_data +#define SSL_CTX_set_mode CyaSSL_CTX_set_mode +#define SSL_CTX_get_mode CyaSSL_CTX_get_mode +#define SSL_CTX_set_default_read_ahead CyaSSL_CTX_set_default_read_ahead + +#define SSL_CTX_sess_set_cache_size CyaSSL_CTX_sess_set_cache_size +#define SSL_CTX_set_default_verify_paths CyaSSL_CTX_set_default_verify_paths + +#define SSL_CTX_set_session_id_context CyaSSL_CTX_set_session_id_context +#define SSL_get_peer_certificate CyaSSL_get_peer_certificate + +#define SSL_want_read CyaSSL_want_read +#define SSL_want_write CyaSSL_want_write + +#define BIO_prf CyaSSL_BIO_prf +#define ASN1_UTCTIME_pr CyaSSL_ASN1_UTCTIME_pr + +#define sk_num CyaSSL_sk_num +#define sk_value CyaSSL_sk_value + +#define SSL_CTX_get_ex_data CyaSSL_CTX_get_ex_data +#define SSL_CTX_set_ex_data CyaSSL_CTX_set_ex_data +#define SSL_CTX_sess_set_get_cb CyaSSL_CTX_sess_set_get_cb +#define SSL_CTX_sess_set_new_cb CyaSSL_CTX_sess_set_new_cb +#define SSL_CTX_sess_set_remove_cb CyaSSL_CTX_sess_set_remove_cb + +#define i2d_SSL_SESSION CyaSSL_i2d_SSL_SESSION +#define d2i_SSL_SESSION CyaSSL_d2i_SSL_SESSION +#define SSL_SESSION_get_timeout CyaSSL_SESSION_get_timeout +#define SSL_SESSION_get_time CyaSSL_SESSION_get_time +#define SSL_CTX_get_ex_new_index CyaSSL_CTX_get_ex_new_index + + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CyaSSL_openssl_h__ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/stack.h b/project1/cyassl-3.0.0/cyassl/openssl/stack.h new file mode 100644 index 00000000..374c1fcd --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/stack.h @@ -0,0 +1,2 @@ +/* stack.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ui.h b/project1/cyassl-3.0.0/cyassl/openssl/ui.h new file mode 100644 index 00000000..a2539303 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/ui.h @@ -0,0 +1,2 @@ +/* ui.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/openssl/x509.h b/project1/cyassl-3.0.0/cyassl/openssl/x509.h new file mode 100644 index 00000000..645b3b5f --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/x509.h @@ -0,0 +1,3 @@ +/* x509.h for openssl */ + +#include diff --git a/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h b/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h new file mode 100644 index 00000000..77828a33 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h @@ -0,0 +1,2 @@ +/* x509v3.h for openssl */ + diff --git a/project1/cyassl-3.0.0/cyassl/options.h b/project1/cyassl-3.0.0/cyassl/options.h new file mode 100644 index 00000000..cb523801 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/options.h @@ -0,0 +1,53 @@ +/* cyassl options.h + * generated from configure options + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#undef CYASSL_DTLS +#define CYASSL_DTLS + +#undef _POSIX_THREADS +#define _POSIX_THREADS + +#undef HAVE_THREAD_LS +#define HAVE_THREAD_LS + +#undef NDEBUG +#define NDEBUG + +#undef NO_DSA +#define NO_DSA + +#undef NO_PSK +#define NO_PSK + +#undef NO_MD4 +#define NO_MD4 + +#undef NO_PWDBASED +#define NO_PWDBASED + +#undef NO_HC128 +#define NO_HC128 + +#undef NO_RABBIT +#define NO_RABBIT + +#undef CYASSL_SMALL_STACK +#define CYASSL_SMALL_STACK + + +#ifdef __cplusplus +} +#endif + diff --git a/project1/cyassl-3.0.0/cyassl/options.h.in b/project1/cyassl-3.0.0/cyassl/options.h.in new file mode 100644 index 00000000..0030ecdf --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/options.h.in @@ -0,0 +1,34 @@ +/* options.h.in + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +/* default blank options for autoconf */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} +#endif + diff --git a/project1/cyassl-3.0.0/cyassl/sniffer.h b/project1/cyassl-3.0.0/cyassl/sniffer.h new file mode 100644 index 00000000..a1d0e966 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/sniffer.h @@ -0,0 +1,74 @@ +/* sniffer.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_SNIFFER_H +#define CYASSL_SNIFFER_H + +#include + +#ifdef _WIN32 + #ifdef SSL_SNIFFER_EXPORTS + #define SSL_SNIFFER_API __declspec(dllexport) + #else + #define SSL_SNIFFER_API __declspec(dllimport) + #endif +#else + #define SSL_SNIFFER_API +#endif /* _WIN32 */ + + +#ifdef __cplusplus + extern "C" { +#endif + + +CYASSL_API +SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port, + const char* keyFile, int keyType, + const char* password, char* error); + +CYASSL_API +SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length, + unsigned char* data, char* error); + +CYASSL_API +SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error); + + +CYASSL_API void ssl_InitSniffer(void); + +CYASSL_API void ssl_FreeSniffer(void); + + +/* ssl_SetPrivateKey keyTypes */ +enum { + FILETYPE_PEM = 1, + FILETYPE_DER = 2, +}; + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + +#endif /* CyaSSL_SNIFFER_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/sniffer_error.h b/project1/cyassl-3.0.0/cyassl/sniffer_error.h new file mode 100644 index 00000000..c588a568 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/sniffer_error.h @@ -0,0 +1,110 @@ +/* sniffer_error.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifndef CYASSL_SNIFFER_ERROR_H +#define CYASSL_SNIFFER_ERROR_H + +/* need to have errors as #defines since .rc files can't handle enums */ +/* need to start at 1 and go in order for same reason */ + +#define MEMORY_STR 1 +#define NEW_SERVER_STR 2 +#define IP_CHECK_STR 3 +#define SERVER_NOT_REG_STR 4 +#define TCP_CHECK_STR 5 +#define SERVER_PORT_NOT_REG_STR 6 +#define RSA_DECRYPT_STR 7 +#define RSA_DECODE_STR 8 +#define BAD_CIPHER_SPEC_STR 9 +#define SERVER_HELLO_INPUT_STR 10 + +#define BAD_SESSION_RESUME_STR 11 +#define SERVER_DID_RESUMPTION_STR 12 +#define CLIENT_HELLO_INPUT_STR 13 +#define CLIENT_RESUME_TRY_STR 14 +#define HANDSHAKE_INPUT_STR 15 +#define GOT_HELLO_VERIFY_STR 16 +#define GOT_SERVER_HELLO_STR 17 +#define GOT_CERT_REQ_STR 18 +#define GOT_SERVER_KEY_EX_STR 19 +#define GOT_CERT_STR 20 + +#define GOT_SERVER_HELLO_DONE_STR 21 +#define GOT_FINISHED_STR 22 +#define GOT_CLIENT_HELLO_STR 23 +#define GOT_CLIENT_KEY_EX_STR 24 +#define GOT_CERT_VER_STR 25 +#define GOT_UNKNOWN_HANDSHAKE_STR 26 +#define NEW_SESSION_STR 27 +#define BAD_NEW_SSL_STR 28 +#define GOT_PACKET_STR 29 +#define NO_DATA_STR 30 + +#define BAD_SESSION_STR 31 +#define GOT_OLD_CLIENT_HELLO_STR 32 +#define OLD_CLIENT_INPUT_STR 33 +#define OLD_CLIENT_OK_STR 34 +#define BAD_OLD_CLIENT_STR 35 +#define BAD_RECORD_HDR_STR 36 +#define RECORD_INPUT_STR 37 +#define GOT_HANDSHAKE_STR 38 +#define BAD_HANDSHAKE_STR 39 +#define GOT_CHANGE_CIPHER_STR 40 + +#define GOT_APP_DATA_STR 41 +#define BAD_APP_DATA_STR 42 +#define GOT_ALERT_STR 43 +#define ANOTHER_MSG_STR 44 +#define REMOVE_SESSION_STR 45 +#define KEY_FILE_STR 46 +#define BAD_IPVER_STR 47 +#define BAD_PROTO_STR 48 +#define PACKET_HDR_SHORT_STR 49 +#define GOT_UNKNOWN_RECORD_STR 50 + +#define BAD_TRACE_FILE_STR 51 +#define FATAL_ERROR_STR 52 +#define PARTIAL_INPUT_STR 53 +#define BUFFER_ERROR_STR 54 +#define PARTIAL_ADD_STR 55 +#define DUPLICATE_STR 56 +#define OUT_OF_ORDER_STR 57 +#define OVERLAP_DUPLICATE_STR 58 +#define OVERLAP_REASSEMBLY_BEGIN_STR 59 +#define OVERLAP_REASSEMBLY_END_STR 60 + +#define MISSED_CLIENT_HELLO_STR 61 +#define GOT_HELLO_REQUEST_STR 62 +#define GOT_SESSION_TICKET_STR 63 +#define BAD_INPUT_STR 64 +#define BAD_DECRYPT_TYPE 65 +#define BAD_FINISHED_MSG 66 +#define BAD_COMPRESSION_STR 67 +#define BAD_DERIVE_STR 68 +#define ACK_MISSED_STR 69 +#define BAD_DECRYPT 70 + +/* !!!! also add to msgTable in sniffer.c and .rc file !!!! */ + + +#endif /* CyaSSL_SNIFFER_ERROR_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/sniffer_error.rc b/project1/cyassl-3.0.0/cyassl/sniffer_error.rc new file mode 100644 index 00000000..516f7aa1 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/sniffer_error.rc @@ -0,0 +1,88 @@ + +STRINGTABLE +{ + 1, "Out of Memory" + 2, "New SSL Sniffer Server Registered" + 3, "Checking IP Header" + 4, "SSL Sniffer Server Not Registered" + 5, "Checking TCP Header" + + 6, "SSL Sniffer Server Port Not Registered" + 7, "RSA Private Decrypt Error" + 8, "RSA Private Decode Error" + 9, "Set Cipher Spec Error" + 10, "Server Hello Input Malformed" + + 11, "Couldn't Resume Session Error" + 12, "Server Did Resumption" + 13, "Client Hello Input Malformed" + 14, "Client Trying to Resume" + 15, "Handshake Input Malformed" + + 16, "Got Hello Verify msg" + 17, "Got Server Hello msg" + 18, "Got Cert Request msg" + 19, "Got Server Key Exchange msg" + 20, "Got Cert msg" + + 21, "Got Server Hello Done msg" + 22, "Got Finished msg" + 23, "Got Client Hello msg" + 24, "Got Client Key Exchange msg" + 25, "Got Cert Verify msg" + + 26, "Got Unknown Handshake msg" + 27, "New SSL Sniffer Session created" + 28, "Couldn't create new SSL" + 29, "Got a Packet to decode" + 30, "No data present" + + 31, "Session Not Found" + 32, "Got an Old Client Hello msg" + 33, "Old Client Hello Input Malformed" + 34, "Old Client Hello OK" + 35, "Bad Old Client Hello" + + 36, "Bad Record Header" + 37, "Record Header Input Malformed" + 38, "Got a HandShake msg" + 39, "Bad HandShake msg" + 40, "Got a Change Cipher Spec msg" + + 41, "Got Application Data msg" + 42, "Bad Application Data" + 43, "Got an Alert msg" + 44, "Another msg to Process" + 45, "Removing Session From Table" + + 46, "Bad Key File" + 47, "Wrong IP Version" + 48, "Wrong Protocol type" + 49, "Packet Short for header processing" + 50, "Got Unknown Record Type" + + 51, "Can't Open Trace File" + 52, "Session in Fatal Error State" + 53, "Partial SSL record received" + 54, "Buffer Error, malformed input" + 55, "Added to Partial Input" + + 56, "Received a Duplicate Packet" + 57, "Received an Out of Order Packet" + 58, "Received an Overlap Duplicate Packet" + 59, "Received an Overlap Reassembly Begin Duplicate Packet" + 60, "Received an Overlap Reassembly End Duplicate Packet" + + 61, "Missed the Client Hello Entirely" + 62, "Got Hello Request msg" + 63, "Got Session Ticket msg" + 64, "Bad Input" + 65, "Bad Decrypt Type" + + 66, "Bad Finished Message Processing" + 67, "Bad Compression Type" + 68, "Bad DeriveKeys Error" + 69, "Saw ACK for Missing Packet Error" + 70, "Bad Decrypt Operation" +} + diff --git a/project1/cyassl-3.0.0/cyassl/ssl.h b/project1/cyassl-3.0.0/cyassl/ssl.h new file mode 100644 index 00000000..c6ffb273 --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/ssl.h @@ -0,0 +1,1304 @@ +/* ssl.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* CyaSSL API */ + +#ifndef CYASSL_SSL_H +#define CYASSL_SSL_H + + +/* for users not using preprocessor flags*/ +#include +#include + + +#ifndef NO_FILESYSTEM + #ifdef FREESCALE_MQX + #include + #else + #include /* ERR_printf */ + #endif +#endif + +#ifdef YASSL_PREFIX + #include "prefix_ssl.h" +#endif + +#ifdef LIBCYASSL_VERSION_STRING + #define CYASSL_VERSION LIBCYASSL_VERSION_STRING +#endif + +#ifdef _WIN32 + /* wincrypt.h clashes */ + #undef OCSP_REQUEST + #undef OCSP_RESPONSE +#endif + + + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct CYASSL CYASSL; +typedef struct CYASSL_SESSION CYASSL_SESSION; +typedef struct CYASSL_METHOD CYASSL_METHOD; +typedef struct CYASSL_CTX CYASSL_CTX; + +typedef struct CYASSL_X509 CYASSL_X509; +typedef struct CYASSL_X509_NAME CYASSL_X509_NAME; +typedef struct CYASSL_X509_CHAIN CYASSL_X509_CHAIN; + +typedef struct CYASSL_CERT_MANAGER CYASSL_CERT_MANAGER; +typedef struct CYASSL_SOCKADDR CYASSL_SOCKADDR; + +/* redeclare guard */ +#define CYASSL_TYPES_DEFINED + + +typedef struct CYASSL_RSA CYASSL_RSA; +typedef struct CYASSL_DSA CYASSL_DSA; +typedef struct CYASSL_CIPHER CYASSL_CIPHER; +typedef struct CYASSL_X509_LOOKUP CYASSL_X509_LOOKUP; +typedef struct CYASSL_X509_LOOKUP_METHOD CYASSL_X509_LOOKUP_METHOD; +typedef struct CYASSL_X509_CRL CYASSL_X509_CRL; +typedef struct CYASSL_BIO CYASSL_BIO; +typedef struct CYASSL_BIO_METHOD CYASSL_BIO_METHOD; +typedef struct CYASSL_X509_EXTENSION CYASSL_X509_EXTENSION; +typedef struct CYASSL_ASN1_TIME CYASSL_ASN1_TIME; +typedef struct CYASSL_ASN1_INTEGER CYASSL_ASN1_INTEGER; +typedef struct CYASSL_ASN1_OBJECT CYASSL_ASN1_OBJECT; +typedef struct CYASSL_ASN1_STRING CYASSL_ASN1_STRING; +typedef struct CYASSL_dynlock_value CYASSL_dynlock_value; + +#define CYASSL_ASN1_UTCTIME CYASSL_ASN1_TIME + +typedef struct CYASSL_EVP_PKEY { + int type; /* openssh dereference */ + int save_type; /* openssh dereference */ + int pkey_sz; + union { + char* ptr; + } pkey; + #ifdef HAVE_ECC + int pkey_curve; + #endif +} CYASSL_EVP_PKEY; + +typedef struct CYASSL_MD4_CTX { + int buffer[32]; /* big enough to hold, check size in Init */ +} CYASSL_MD4_CTX; + + +typedef struct CYASSL_COMP_METHOD { + int type; /* stunnel dereference */ +} CYASSL_COMP_METHOD; + + +typedef struct CYASSL_X509_STORE { + int cache; /* stunnel dereference */ + CYASSL_CERT_MANAGER* cm; +} CYASSL_X509_STORE; + +typedef struct CYASSL_ALERT { + int code; + int level; +} CYASSL_ALERT; + +typedef struct CYASSL_ALERT_HISTORY { + CYASSL_ALERT last_rx; + CYASSL_ALERT last_tx; +} CYASSL_ALERT_HISTORY; + +typedef struct CYASSL_X509_REVOKED { + CYASSL_ASN1_INTEGER* serialNumber; /* stunnel dereference */ +} CYASSL_X509_REVOKED; + + +typedef struct CYASSL_X509_OBJECT { + union { + char* ptr; + CYASSL_X509_CRL* crl; /* stunnel dereference */ + } data; +} CYASSL_X509_OBJECT; + + +typedef struct CYASSL_X509_STORE_CTX { + CYASSL_X509_STORE* store; /* Store full of a CA cert chain */ + CYASSL_X509* current_cert; /* stunnel dereference */ + char* domain; /* subject CN domain name */ + void* ex_data; /* external data, for fortress build */ + void* userCtx; /* user ctx */ + int error; /* current error */ + int error_depth; /* cert depth for this error */ + int discardSessionCerts; /* so verify callback can flag for discard */ +} CYASSL_X509_STORE_CTX; + + +/* Valid Alert types from page 16/17 */ +enum AlertDescription { + close_notify = 0, + unexpected_message = 10, + bad_record_mac = 20, + decompression_failure = 30, + handshake_failure = 40, + no_certificate = 41, + bad_certificate = 42, + unsupported_certificate = 43, + certificate_revoked = 44, + certificate_expired = 45, + certificate_unknown = 46, + illegal_parameter = 47, + decrypt_error = 51, + protocol_version = 70, + no_renegotiation = 100, + unrecognized_name = 112 +}; + + +enum AlertLevel { + alert_warning = 1, + alert_fatal = 2 +}; + + +CYASSL_API CYASSL_METHOD *CyaSSLv3_server_method(void); +CYASSL_API CYASSL_METHOD *CyaSSLv3_client_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_server_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_client_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_1_server_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_1_client_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_2_server_method(void); +CYASSL_API CYASSL_METHOD *CyaTLSv1_2_client_method(void); + +#ifdef CYASSL_DTLS + CYASSL_API CYASSL_METHOD *CyaDTLSv1_client_method(void); + CYASSL_API CYASSL_METHOD *CyaDTLSv1_server_method(void); + CYASSL_API CYASSL_METHOD *CyaDTLSv1_2_client_method(void); + CYASSL_API CYASSL_METHOD *CyaDTLSv1_2_server_method(void); +#endif + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + +CYASSL_API int CyaSSL_CTX_use_certificate_file(CYASSL_CTX*, const char*, int); +CYASSL_API int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX*, const char*, int); +CYASSL_API int CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, + const char*); +CYASSL_API int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX *, + const char *file); +CYASSL_API int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX*, const char*, int); + +CYASSL_API int CyaSSL_use_certificate_file(CYASSL*, const char*, int); +CYASSL_API int CyaSSL_use_PrivateKey_file(CYASSL*, const char*, int); +CYASSL_API int CyaSSL_use_certificate_chain_file(CYASSL*, const char *file); +CYASSL_API int CyaSSL_use_RSAPrivateKey_file(CYASSL*, const char*, int); + +#ifdef CYASSL_DER_LOAD + CYASSL_API int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX*, + const char*, int); +#endif + +#ifdef HAVE_NTRU + CYASSL_API int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX*, const char*); + /* load NTRU private key blob */ +#endif + +CYASSL_API int CyaSSL_PemCertToDer(const char*, unsigned char*, int); + +#endif /* !NO_FILESYSTEM && !NO_CERTS */ + +CYASSL_API CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD*); +CYASSL_API CYASSL* CyaSSL_new(CYASSL_CTX*); +CYASSL_API int CyaSSL_set_fd (CYASSL*, int); +CYASSL_API int CyaSSL_get_fd(const CYASSL*); +CYASSL_API void CyaSSL_set_using_nonblock(CYASSL*, int); +CYASSL_API int CyaSSL_get_using_nonblock(CYASSL*); +CYASSL_API int CyaSSL_connect(CYASSL*); /* please see note at top of README + if you get an error from connect */ +CYASSL_API int CyaSSL_write(CYASSL*, const void*, int); +CYASSL_API int CyaSSL_read(CYASSL*, void*, int); +CYASSL_API int CyaSSL_peek(CYASSL*, void*, int); +CYASSL_API int CyaSSL_accept(CYASSL*); +CYASSL_API void CyaSSL_CTX_free(CYASSL_CTX*); +CYASSL_API void CyaSSL_free(CYASSL*); +CYASSL_API int CyaSSL_shutdown(CYASSL*); +CYASSL_API int CyaSSL_send(CYASSL*, const void*, int sz, int flags); +CYASSL_API int CyaSSL_recv(CYASSL*, void*, int sz, int flags); + +CYASSL_API void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX*, int); +CYASSL_API void CyaSSL_set_quiet_shutdown(CYASSL*, int); + +CYASSL_API int CyaSSL_get_error(CYASSL*, int); +CYASSL_API int CyaSSL_get_alert_history(CYASSL*, CYASSL_ALERT_HISTORY *); + +CYASSL_API int CyaSSL_set_session(CYASSL* ssl,CYASSL_SESSION* session); +CYASSL_API CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl); +CYASSL_API void CyaSSL_flush_sessions(CYASSL_CTX *ctx, long tm); +CYASSL_API int CyaSSL_SetServerID(CYASSL* ssl, const unsigned char*, + int, int); + +#ifdef SESSION_INDEX +CYASSL_API int CyaSSL_GetSessionIndex(CYASSL* ssl); +CYASSL_API int CyaSSL_GetSessionAtIndex(int index, CYASSL_SESSION* session); +#endif /* SESSION_INDEX */ + +#if defined(SESSION_INDEX) && defined(SESSION_CERTS) +CYASSL_API + CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session); +#endif /* SESSION_INDEX && SESSION_CERTS */ + +typedef int (*VerifyCallback)(int, CYASSL_X509_STORE_CTX*); +typedef int (*pem_password_cb)(char*, int, int, void*); + +CYASSL_API void CyaSSL_CTX_set_verify(CYASSL_CTX*, int, + VerifyCallback verify_callback); +CYASSL_API void CyaSSL_set_verify(CYASSL*, int, VerifyCallback verify_callback); +CYASSL_API void CyaSSL_SetCertCbCtx(CYASSL*, void*); + +CYASSL_API int CyaSSL_pending(CYASSL*); + +CYASSL_API void CyaSSL_load_error_strings(void); +CYASSL_API int CyaSSL_library_init(void); +CYASSL_API long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX*, long); + +/* session cache persistence */ +CYASSL_API int CyaSSL_save_session_cache(const char*); +CYASSL_API int CyaSSL_restore_session_cache(const char*); +CYASSL_API int CyaSSL_memsave_session_cache(void*, int); +CYASSL_API int CyaSSL_memrestore_session_cache(const void*, int); +CYASSL_API int CyaSSL_get_session_cache_memsize(void); + +/* certificate cache persistence, uses ctx since certs are per ctx */ +CYASSL_API int CyaSSL_CTX_save_cert_cache(CYASSL_CTX*, const char*); +CYASSL_API int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX*, const char*); +CYASSL_API int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX*, void*, int, int*); +CYASSL_API int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX*, const void*, int); +CYASSL_API int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX*); + +/* only supports full name from cipher_name[] delimited by : */ +CYASSL_API int CyaSSL_CTX_set_cipher_list(CYASSL_CTX*, const char*); +CYASSL_API int CyaSSL_set_cipher_list(CYASSL*, const char*); + +/* Nonblocking DTLS helper functions */ +CYASSL_API int CyaSSL_dtls_get_current_timeout(CYASSL* ssl); +CYASSL_API int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int); +CYASSL_API int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int); +CYASSL_API int CyaSSL_dtls_got_timeout(CYASSL* ssl); +CYASSL_API int CyaSSL_dtls(CYASSL* ssl); + +CYASSL_API int CyaSSL_dtls_set_peer(CYASSL*, void*, unsigned int); +CYASSL_API int CyaSSL_dtls_get_peer(CYASSL*, void*, unsigned int*); + +CYASSL_API int CyaSSL_ERR_GET_REASON(int err); +CYASSL_API char* CyaSSL_ERR_error_string(unsigned long,char*); +CYASSL_API void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, + unsigned long sz); + +/* extras */ + +#define STACK_OF(x) x + +CYASSL_API int CyaSSL_set_ex_data(CYASSL*, int, void*); +CYASSL_API int CyaSSL_get_shutdown(const CYASSL*); +CYASSL_API int CyaSSL_set_rfd(CYASSL*, int); +CYASSL_API int CyaSSL_set_wfd(CYASSL*, int); +CYASSL_API void CyaSSL_set_shutdown(CYASSL*, int); +CYASSL_API int CyaSSL_set_session_id_context(CYASSL*, const unsigned char*, + unsigned int); +CYASSL_API void CyaSSL_set_connect_state(CYASSL*); +CYASSL_API void CyaSSL_set_accept_state(CYASSL*); +CYASSL_API int CyaSSL_session_reused(CYASSL*); +CYASSL_API void CyaSSL_SESSION_free(CYASSL_SESSION* session); +CYASSL_API int CyaSSL_is_init_finished(CYASSL*); + +CYASSL_API const char* CyaSSL_get_version(CYASSL*); +CYASSL_API int CyaSSL_get_current_cipher_suite(CYASSL* ssl); +CYASSL_API CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL*); +CYASSL_API char* CyaSSL_CIPHER_description(CYASSL_CIPHER*, char*, int); +CYASSL_API const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher); +CYASSL_API const char* CyaSSL_get_cipher(CYASSL*); +CYASSL_API CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl); + /* what's ref count */ + +CYASSL_API void CyaSSL_X509_free(CYASSL_X509*); +CYASSL_API void CyaSSL_OPENSSL_free(void*); + +CYASSL_API int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, + char** path, int* ssl); + +CYASSL_API CYASSL_METHOD* CyaSSLv23_client_method(void); +CYASSL_API CYASSL_METHOD* CyaSSLv2_client_method(void); +CYASSL_API CYASSL_METHOD* CyaSSLv2_server_method(void); + +CYASSL_API void CyaSSL_MD4_Init(CYASSL_MD4_CTX*); +CYASSL_API void CyaSSL_MD4_Update(CYASSL_MD4_CTX*, const void*, unsigned long); +CYASSL_API void CyaSSL_MD4_Final(unsigned char*, CYASSL_MD4_CTX*); + + +CYASSL_API CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD*); +CYASSL_API int CyaSSL_BIO_free(CYASSL_BIO*); +CYASSL_API int CyaSSL_BIO_free_all(CYASSL_BIO*); +CYASSL_API int CyaSSL_BIO_read(CYASSL_BIO*, void*, int); +CYASSL_API int CyaSSL_BIO_write(CYASSL_BIO*, const void*, int); +CYASSL_API CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO*, CYASSL_BIO* append); +CYASSL_API CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO*); +CYASSL_API int CyaSSL_BIO_flush(CYASSL_BIO*); +CYASSL_API int CyaSSL_BIO_pending(CYASSL_BIO*); + +CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void); +CYASSL_API long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO*, long size); +CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void); +CYASSL_API CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int flag); +CYASSL_API int CyaSSL_BIO_eof(CYASSL_BIO*); + +CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void); +CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void); +CYASSL_API void CyaSSL_BIO_set_flags(CYASSL_BIO*, int); + +CYASSL_API int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio,const unsigned char** p); +CYASSL_API CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len); + + +CYASSL_API long CyaSSL_BIO_set_ssl(CYASSL_BIO*, CYASSL*, int flag); +CYASSL_API void CyaSSL_set_bio(CYASSL*, CYASSL_BIO* rd, CYASSL_BIO* wr); + +CYASSL_API int CyaSSL_add_all_algorithms(void); + +CYASSL_API void CyaSSL_RAND_screen(void); +CYASSL_API const char* CyaSSL_RAND_file_name(char*, unsigned long); +CYASSL_API int CyaSSL_RAND_write_file(const char*); +CYASSL_API int CyaSSL_RAND_load_file(const char*, long); +CYASSL_API int CyaSSL_RAND_egd(const char*); +CYASSL_API int CyaSSL_RAND_seed(const void*, int); +CYASSL_API void CyaSSL_RAND_add(const void*, int, double); + +CYASSL_API CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void); +CYASSL_API CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void); +CYASSL_API int CyaSSL_COMP_add_compression_method(int, void*); + +CYASSL_API int CyaSSL_get_ex_new_index(long, void*, void*, void*, void*); + +CYASSL_API void CyaSSL_set_id_callback(unsigned long (*f)(void)); +CYASSL_API void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, + int)); +CYASSL_API void CyaSSL_set_dynlock_create_callback(CYASSL_dynlock_value* (*f) + (const char*, int)); +CYASSL_API void CyaSSL_set_dynlock_lock_callback(void (*f)(int, + CYASSL_dynlock_value*, const char*, int)); +CYASSL_API void CyaSSL_set_dynlock_destroy_callback(void (*f) + (CYASSL_dynlock_value*, const char*, int)); +CYASSL_API int CyaSSL_num_locks(void); + +CYASSL_API CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert( + CYASSL_X509_STORE_CTX*); +CYASSL_API int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX*); +CYASSL_API int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX*); + +CYASSL_API char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME*, char*, int); +CYASSL_API CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509*); +CYASSL_API CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509*); +CYASSL_API int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509*, int); +CYASSL_API int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509*, int); +CYASSL_API int CyaSSL_X509_get_isCA(CYASSL_X509*); +CYASSL_API int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509*); +CYASSL_API unsigned int CyaSSL_X509_get_pathLength(CYASSL_X509*); +CYASSL_API unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509*); +CYASSL_API unsigned char* CyaSSL_X509_get_authorityKeyID( + CYASSL_X509*, unsigned char*, int*); +CYASSL_API unsigned char* CyaSSL_X509_get_subjectKeyID( + CYASSL_X509*, unsigned char*, int*); +CYASSL_API int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME*); +CYASSL_API int CyaSSL_X509_NAME_get_text_by_NID( + CYASSL_X509_NAME*, int, char*, int); +CYASSL_API int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX*); +CYASSL_API const char* CyaSSL_X509_verify_cert_error_string(long); +CYASSL_API int CyaSSL_X509_get_signature_type(CYASSL_X509*); +CYASSL_API int CyaSSL_X509_get_signature(CYASSL_X509*, unsigned char*, int*); + +CYASSL_API int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP*,const char*,long); +CYASSL_API int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP*, const char*, + long); +CYASSL_API CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void); +CYASSL_API CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void); + +CYASSL_API CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE*, + CYASSL_X509_LOOKUP_METHOD*); +CYASSL_API CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void); +CYASSL_API void CyaSSL_X509_STORE_free(CYASSL_X509_STORE*); +CYASSL_API int CyaSSL_X509_STORE_add_cert( + CYASSL_X509_STORE*, CYASSL_X509*); +CYASSL_API int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE*); +CYASSL_API int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX*, + int, CYASSL_X509_NAME*, CYASSL_X509_OBJECT*); +CYASSL_API CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void); +CYASSL_API int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX*, + CYASSL_X509_STORE*, CYASSL_X509*, STACK_OF(CYASSL_X509)*); +CYASSL_API void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX*); +CYASSL_API void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX*); + +CYASSL_API CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL*); +CYASSL_API CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL*); + +CYASSL_API CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509*); +CYASSL_API int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL*, CYASSL_EVP_PKEY*); +CYASSL_API void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX*, + int); +CYASSL_API void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT*); +CYASSL_API void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY*); +CYASSL_API int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME*); +CYASSL_API int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED*); + +CYASSL_API CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL*); +CYASSL_API CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value( + CYASSL_X509_REVOKED*,int); +CYASSL_API CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509*); + +CYASSL_API int CyaSSL_ASN1_TIME_print(CYASSL_BIO*, const CYASSL_ASN1_TIME*); + +CYASSL_API int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER*, + const CYASSL_ASN1_INTEGER*); +CYASSL_API long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER*); + +CYASSL_API STACK_OF(CYASSL_X509_NAME)* CyaSSL_load_client_CA_file(const char*); + +CYASSL_API void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX*, + STACK_OF(CYASSL_X509_NAME)*); +CYASSL_API void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX*, int); +CYASSL_API int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void); +CYASSL_API void* CyaSSL_get_ex_data(const CYASSL*, int); + +CYASSL_API void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX*, + void* userdata); +CYASSL_API void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX*, pem_password_cb); + + +CYASSL_API void CyaSSL_CTX_set_info_callback(CYASSL_CTX*, void (*)(void)); + +CYASSL_API unsigned long CyaSSL_ERR_peek_error(void); +CYASSL_API int CyaSSL_GET_REASON(int); + +CYASSL_API char* CyaSSL_alert_type_string_long(int); +CYASSL_API char* CyaSSL_alert_desc_string_long(int); +CYASSL_API char* CyaSSL_state_string_long(CYASSL*); + +CYASSL_API CYASSL_RSA* CyaSSL_RSA_generate_key(int, unsigned long, + void(*)(int, int, void*), void*); +CYASSL_API void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX*, + CYASSL_RSA*(*)(CYASSL*, int, int)); + +CYASSL_API int CyaSSL_PEM_def_callback(char*, int num, int w, void* key); + +CYASSL_API long CyaSSL_CTX_sess_accept(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_connect(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_accept_good(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_connect_good(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_hits(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_cache_full(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_misses(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_timeouts(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_number(CYASSL_CTX*); +CYASSL_API long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX*); + +#define CYASSL_DEFAULT_CIPHER_LIST "" /* default all */ +#define CYASSL_RSA_F4 0x10001L + +enum { + OCSP_NOCERTS = 1, + OCSP_NOINTERN = 2, + OCSP_NOSIGS = 4, + OCSP_NOCHAIN = 8, + OCSP_NOVERIFY = 16, + OCSP_NOEXPLICIT = 32, + OCSP_NOCASIGN = 64, + OCSP_NODELEGATED = 128, + OCSP_NOCHECKS = 256, + OCSP_TRUSTOTHER = 512, + OCSP_RESPID_KEY = 1024, + OCSP_NOTIME = 2048, + + OCSP_CERTID = 2, + OCSP_REQUEST = 4, + OCSP_RESPONSE = 8, + OCSP_BASICRESP = 16, + + CYASSL_OCSP_URL_OVERRIDE = 1, + CYASSL_OCSP_NO_NONCE = 2, + + CYASSL_CRL_CHECKALL = 1, + + ASN1_GENERALIZEDTIME = 4, + + SSL_OP_MICROSOFT_SESS_ID_BUG = 1, + SSL_OP_NETSCAPE_CHALLENGE_BUG = 2, + SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 3, + SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 4, + SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 5, + SSL_OP_MSIE_SSLV2_RSA_PADDING = 6, + SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 7, + SSL_OP_TLS_D5_BUG = 8, + SSL_OP_TLS_BLOCK_PADDING_BUG = 9, + SSL_OP_TLS_ROLLBACK_BUG = 10, + SSL_OP_ALL = 11, + SSL_OP_EPHEMERAL_RSA = 12, + SSL_OP_NO_SSLv3 = 13, + SSL_OP_NO_TLSv1 = 14, + SSL_OP_PKCS1_CHECK_1 = 15, + SSL_OP_PKCS1_CHECK_2 = 16, + SSL_OP_NETSCAPE_CA_DN_BUG = 17, + SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 18, + SSL_OP_SINGLE_DH_USE = 19, + SSL_OP_NO_TICKET = 20, + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 21, + SSL_OP_NO_QUERY_MTU = 22, + SSL_OP_COOKIE_EXCHANGE = 23, + SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 24, + SSL_OP_SINGLE_ECDH_USE = 25, + SSL_OP_CIPHER_SERVER_PREFERENCE = 26, + + SSL_MAX_SSL_SESSION_ID_LENGTH = 32, + + EVP_R_BAD_DECRYPT = 2, + + SSL_CB_LOOP = 4, + SSL_ST_CONNECT = 5, + SSL_ST_ACCEPT = 6, + SSL_CB_ALERT = 7, + SSL_CB_READ = 8, + SSL_CB_HANDSHAKE_DONE = 9, + + SSL_MODE_ENABLE_PARTIAL_WRITE = 2, + + BIO_FLAGS_BASE64_NO_NL = 1, + BIO_CLOSE = 1, + BIO_NOCLOSE = 0, + + NID_undef = 0, + + X509_FILETYPE_PEM = 8, + X509_LU_X509 = 9, + X509_LU_CRL = 12, + + X509_V_ERR_CRL_SIGNATURE_FAILURE = 13, + X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 14, + X509_V_ERR_CRL_HAS_EXPIRED = 15, + X509_V_ERR_CERT_REVOKED = 16, + X509_V_ERR_CERT_CHAIN_TOO_LONG = 17, + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = 18, + X509_V_ERR_CERT_NOT_YET_VALID = 19, + X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = 20, + X509_V_ERR_CERT_HAS_EXPIRED = 21, + X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = 22, + + X509_V_OK = 0, + + CRYPTO_LOCK = 1, + CRYPTO_NUM_LOCKS = 10 +}; + +/* extras end */ + +#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) +/* CyaSSL extension, provide last error from SSL_get_error + since not using thread storage error queue */ +CYASSL_API void CyaSSL_ERR_print_errors_fp(FILE*, int err); +#endif + +enum { /* ssl Constants */ + SSL_ERROR_NONE = 0, /* for most functions */ + SSL_FAILURE = 0, /* for some functions */ + SSL_SUCCESS = 1, + + SSL_BAD_CERTTYPE = -8, + SSL_BAD_STAT = -7, + SSL_BAD_PATH = -6, + SSL_BAD_FILETYPE = -5, + SSL_BAD_FILE = -4, + SSL_NOT_IMPLEMENTED = -3, + SSL_UNKNOWN = -2, + SSL_FATAL_ERROR = -1, + + SSL_FILETYPE_ASN1 = 2, + SSL_FILETYPE_PEM = 1, + SSL_FILETYPE_DEFAULT = 2, /* ASN1 */ + SSL_FILETYPE_RAW = 3, /* NTRU raw key blob */ + + SSL_VERIFY_NONE = 0, + SSL_VERIFY_PEER = 1, + SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 2, + SSL_VERIFY_CLIENT_ONCE = 4, + + SSL_SESS_CACHE_OFF = 30, + SSL_SESS_CACHE_CLIENT = 31, + SSL_SESS_CACHE_SERVER = 32, + SSL_SESS_CACHE_BOTH = 33, + SSL_SESS_CACHE_NO_AUTO_CLEAR = 34, + SSL_SESS_CACHE_NO_INTERNAL_LOOKUP = 35, + + SSL_ERROR_WANT_READ = 2, + SSL_ERROR_WANT_WRITE = 3, + SSL_ERROR_WANT_CONNECT = 7, + SSL_ERROR_WANT_ACCEPT = 8, + SSL_ERROR_SYSCALL = 5, + SSL_ERROR_WANT_X509_LOOKUP = 83, + SSL_ERROR_ZERO_RETURN = 6, + SSL_ERROR_SSL = 85, + + SSL_SENT_SHUTDOWN = 1, + SSL_RECEIVED_SHUTDOWN = 2, + SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER = 4, + SSL_OP_NO_SSLv2 = 8, + + SSL_R_SSL_HANDSHAKE_FAILURE = 101, + SSL_R_TLSV1_ALERT_UNKNOWN_CA = 102, + SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN = 103, + SSL_R_SSLV3_ALERT_BAD_CERTIFICATE = 104, + + PEM_BUFSIZE = 1024 +}; + + +#ifndef NO_PSK + typedef unsigned int (*psk_client_callback)(CYASSL*, const char*, char*, + unsigned int, unsigned char*, unsigned int); + CYASSL_API void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX*, + psk_client_callback); + CYASSL_API void CyaSSL_set_psk_client_callback(CYASSL*,psk_client_callback); + + CYASSL_API const char* CyaSSL_get_psk_identity_hint(const CYASSL*); + CYASSL_API const char* CyaSSL_get_psk_identity(const CYASSL*); + + CYASSL_API int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX*, const char*); + CYASSL_API int CyaSSL_use_psk_identity_hint(CYASSL*, const char*); + + typedef unsigned int (*psk_server_callback)(CYASSL*, const char*, + unsigned char*, unsigned int); + CYASSL_API void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX*, + psk_server_callback); + CYASSL_API void CyaSSL_set_psk_server_callback(CYASSL*,psk_server_callback); + + #define PSK_TYPES_DEFINED +#endif /* NO_PSK */ + + +/* extra begins */ + +enum { /* ERR Constants */ + ERR_TXT_STRING = 1 +}; + +CYASSL_API unsigned long CyaSSL_ERR_get_error_line_data(const char**, int*, + const char**, int *); + +CYASSL_API unsigned long CyaSSL_ERR_get_error(void); +CYASSL_API void CyaSSL_ERR_clear_error(void); + + +CYASSL_API int CyaSSL_RAND_status(void); +CYASSL_API int CyaSSL_RAND_bytes(unsigned char* buf, int num); +CYASSL_API CYASSL_METHOD *CyaSSLv23_server_method(void); +CYASSL_API long CyaSSL_CTX_set_options(CYASSL_CTX*, long); +#ifndef NO_CERTS + CYASSL_API int CyaSSL_CTX_check_private_key(CYASSL_CTX*); +#endif /* !NO_CERTS */ + +CYASSL_API void CyaSSL_ERR_free_strings(void); +CYASSL_API void CyaSSL_ERR_remove_state(unsigned long); +CYASSL_API void CyaSSL_EVP_cleanup(void); + +CYASSL_API void CyaSSL_cleanup_all_ex_data(void); +CYASSL_API long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode); +CYASSL_API long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx); +CYASSL_API void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m); + +CYASSL_API long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX*, long); + +CYASSL_API int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX*); +CYASSL_API int CyaSSL_CTX_set_session_id_context(CYASSL_CTX*, + const unsigned char*, unsigned int); +CYASSL_API CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl); + +CYASSL_API int CyaSSL_want_read(CYASSL*); +CYASSL_API int CyaSSL_want_write(CYASSL*); + +CYASSL_API int CyaSSL_BIO_printf(CYASSL_BIO*, const char*, ...); +CYASSL_API int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO*, + const CYASSL_ASN1_UTCTIME*); +CYASSL_API int CyaSSL_sk_num(CYASSL_X509_REVOKED*); +CYASSL_API void* CyaSSL_sk_value(CYASSL_X509_REVOKED*, int); + +/* stunnel 4.28 needs */ +CYASSL_API void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX*, int); +CYASSL_API int CyaSSL_CTX_set_ex_data(CYASSL_CTX*, int, void*); +CYASSL_API void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX*, + CYASSL_SESSION*(*f)(CYASSL*, unsigned char*, int, int*)); +CYASSL_API void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX*, + int (*f)(CYASSL*, CYASSL_SESSION*)); +CYASSL_API void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX*, + void (*f)(CYASSL_CTX*, CYASSL_SESSION*)); + +CYASSL_API int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION*,unsigned char**); +CYASSL_API CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION**, + const unsigned char**, long); + +CYASSL_API long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION*); +CYASSL_API long CyaSSL_SESSION_get_time(const CYASSL_SESSION*); +CYASSL_API int CyaSSL_CTX_get_ex_new_index(long, void*, void*, void*, void*); + +/* extra ends */ + + +/* CyaSSL extensions */ + +/* call before SSL_connect, if verifying will add name check to + date check and signature check */ +CYASSL_API int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn); + +/* need to call once to load library (session cache) */ +CYASSL_API int CyaSSL_Init(void); +/* call when done to cleanup/free session cache mutex / resources */ +CYASSL_API int CyaSSL_Cleanup(void); + +/* turn logging on, only if compiled in */ +CYASSL_API int CyaSSL_Debugging_ON(void); +/* turn logging off */ +CYASSL_API void CyaSSL_Debugging_OFF(void); + +/* do accept or connect depedning on side */ +CYASSL_API int CyaSSL_negotiate(CYASSL* ssl); +/* turn on CyaSSL data compression */ +CYASSL_API int CyaSSL_set_compression(CYASSL* ssl); + +CYASSL_API int CyaSSL_set_timeout(CYASSL*, unsigned int); +CYASSL_API int CyaSSL_CTX_set_timeout(CYASSL_CTX*, unsigned int); + +/* get CyaSSL peer X509_CHAIN */ +CYASSL_API CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl); +/* peer chain count */ +CYASSL_API int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain); +/* index cert length */ +CYASSL_API int CyaSSL_get_chain_length(CYASSL_X509_CHAIN*, int idx); +/* index cert */ +CYASSL_API unsigned char* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN*, int idx); +/* index cert in X509 */ +CYASSL_API CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN*, int idx); +/* free X509 */ +CYASSL_API void CyaSSL_FreeX509(CYASSL_X509*); +/* get index cert in PEM */ +CYASSL_API int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN*, int idx, + unsigned char* buffer, int inLen, int* outLen); +CYASSL_API const unsigned char* CyaSSL_get_sessionID(const CYASSL_SESSION* s); +CYASSL_API int CyaSSL_X509_get_serial_number(CYASSL_X509*,unsigned char*,int*); +CYASSL_API char* CyaSSL_X509_get_subjectCN(CYASSL_X509*); +CYASSL_API const unsigned char* CyaSSL_X509_get_der(CYASSL_X509*, int*); +CYASSL_API const unsigned char* CyaSSL_X509_notBefore(CYASSL_X509*); +CYASSL_API const unsigned char* CyaSSL_X509_notAfter(CYASSL_X509*); +CYASSL_API int CyaSSL_X509_version(CYASSL_X509*); +CYASSL_API + +CYASSL_API int CyaSSL_cmp_peer_cert_to_file(CYASSL*, const char*); + +CYASSL_API char* CyaSSL_X509_get_next_altname(CYASSL_X509*); + +CYASSL_API CYASSL_X509* + CyaSSL_X509_d2i(CYASSL_X509** x509, const unsigned char* in, int len); +#ifndef NO_FILESYSTEM + #ifndef NO_STDIO_FILESYSTEM + CYASSL_API CYASSL_X509* + CyaSSL_X509_d2i_fp(CYASSL_X509** x509, FILE* file); + #endif +CYASSL_API CYASSL_X509* + CyaSSL_X509_load_certificate_file(const char* fname, int format); +#endif + +#ifdef CYASSL_SEP + CYASSL_API unsigned char* + CyaSSL_X509_get_device_type(CYASSL_X509*, unsigned char*, int*); + CYASSL_API unsigned char* + CyaSSL_X509_get_hw_type(CYASSL_X509*, unsigned char*, int*); + CYASSL_API unsigned char* + CyaSSL_X509_get_hw_serial_number(CYASSL_X509*, unsigned char*, int*); +#endif + +/* connect enough to get peer cert */ +CYASSL_API int CyaSSL_connect_cert(CYASSL* ssl); + +/* XXX This should be #ifndef NO_DH */ +#ifndef NO_CERTS +/* server Diffie-Hellman parameters */ +CYASSL_API int CyaSSL_SetTmpDH(CYASSL*, const unsigned char* p, int pSz, + const unsigned char* g, int gSz); +CYASSL_API int CyaSSL_SetTmpDH_buffer(CYASSL*, const unsigned char* b, long sz, + int format); +CYASSL_API int CyaSSL_SetTmpEC_DHE_Sz(CYASSL*, unsigned short); +#ifndef NO_FILESYSTEM + CYASSL_API int CyaSSL_SetTmpDH_file(CYASSL*, const char* f, int format); +#endif + +/* server ctx Diffie-Hellman parameters */ +CYASSL_API int CyaSSL_CTX_SetTmpDH(CYASSL_CTX*, const unsigned char* p, + int pSz, const unsigned char* g, int gSz); +CYASSL_API int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX*, const unsigned char* b, + long sz, int format); +CYASSL_API int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX*, unsigned short); + +#ifndef NO_FILESYSTEM + CYASSL_API int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX*, const char* f, + int format); +#endif +#endif + +/* keyblock size in bytes or -1 */ +/* need to call CyaSSL_KeepArrays before handshake to save keys */ +CYASSL_API int CyaSSL_get_keyblock_size(CYASSL*); +CYASSL_API int CyaSSL_get_keys(CYASSL*,unsigned char** ms, unsigned int* msLen, + unsigned char** sr, unsigned int* srLen, + unsigned char** cr, unsigned int* crLen); + +/* Computes EAP-TLS and EAP-TTLS keying material from the master_secret. */ +CYASSL_API int CyaSSL_make_eap_keys(CYASSL*, void* key, unsigned int len, + const char* label); + + +#ifndef _WIN32 + #ifndef NO_WRITEV + #ifdef __PPU + #include + #include + #elif !defined(CYASSL_MDK_ARM) + #include + #endif + /* allow writev style writing */ + CYASSL_API int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, + int iovcnt); + #endif +#endif + + +#ifndef NO_CERTS + /* SSL_CTX versions */ + CYASSL_API int CyaSSL_CTX_UnloadCAs(CYASSL_CTX*); + CYASSL_API int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX*, + const unsigned char*, long, int); + CYASSL_API int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX*, + const unsigned char*, long, int); + CYASSL_API int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX*, + const unsigned char*, long, int); + CYASSL_API int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX*, + const unsigned char*, long); + + /* SSL versions */ + CYASSL_API int CyaSSL_use_certificate_buffer(CYASSL*, const unsigned char*, + long, int); + CYASSL_API int CyaSSL_use_PrivateKey_buffer(CYASSL*, const unsigned char*, + long, int); + CYASSL_API int CyaSSL_use_certificate_chain_buffer(CYASSL*, + const unsigned char*, long); + CYASSL_API int CyaSSL_UnloadCertsKeys(CYASSL*); +#endif + +CYASSL_API int CyaSSL_CTX_set_group_messages(CYASSL_CTX*); +CYASSL_API int CyaSSL_set_group_messages(CYASSL*); + +/* I/O callbacks */ +typedef int (*CallbackIORecv)(CYASSL *ssl, char *buf, int sz, void *ctx); +typedef int (*CallbackIOSend)(CYASSL *ssl, char *buf, int sz, void *ctx); + +CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX*, CallbackIORecv); +CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX*, CallbackIOSend); + +CYASSL_API void CyaSSL_SetIOReadCtx( CYASSL* ssl, void *ctx); +CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *ctx); + +CYASSL_API void* CyaSSL_GetIOReadCtx( CYASSL* ssl); +CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl); + +CYASSL_API void CyaSSL_SetIOReadFlags( CYASSL* ssl, int flags); +CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags); + +#ifdef HAVE_NETX + CYASSL_API void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxsocket, + ULONG waitoption); +#endif + +typedef int (*CallbackGenCookie)(CYASSL* ssl, unsigned char* buf, int sz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX*, CallbackGenCookie); +CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl); + + +/* I/O Callback default errors */ +enum IOerrors { + CYASSL_CBIO_ERR_GENERAL = -1, /* general unexpected err */ + CYASSL_CBIO_ERR_WANT_READ = -2, /* need to call read again */ + CYASSL_CBIO_ERR_WANT_WRITE = -2, /* need to call write again */ + CYASSL_CBIO_ERR_CONN_RST = -3, /* connection reset */ + CYASSL_CBIO_ERR_ISR = -4, /* interrupt */ + CYASSL_CBIO_ERR_CONN_CLOSE = -5, /* connection closed or epipe */ + CYASSL_CBIO_ERR_TIMEOUT = -6 /* socket timeout */ +}; + + +/* CA cache callbacks */ +enum { + CYASSL_SSLV3 = 0, + CYASSL_TLSV1 = 1, + CYASSL_TLSV1_1 = 2, + CYASSL_TLSV1_2 = 3, + CYASSL_USER_CA = 1, /* user added as trusted */ + CYASSL_CHAIN_CA = 2 /* added to cache from trusted chain */ +}; + +CYASSL_API int CyaSSL_GetObjectSize(void); /* object size based on build */ +CYASSL_API int CyaSSL_SetVersion(CYASSL* ssl, int version); +CYASSL_API int CyaSSL_KeyPemToDer(const unsigned char*, int sz, unsigned char*, + int, const char*); +CYASSL_API int CyaSSL_CertPemToDer(const unsigned char*, int sz, unsigned char*, + int, int); + +typedef void (*CallbackCACache)(unsigned char* der, int sz, int type); +typedef void (*CbMissingCRL)(const char* url); +typedef int (*CbOCSPIO)(void*, const char*, int, + unsigned char*, int, unsigned char**); +typedef void (*CbOCSPRespFree)(void*,unsigned char*); + +/* User Atomic Record Layer CallBacks */ +typedef int (*CallbackMacEncrypt)(CYASSL* ssl, unsigned char* macOut, + const unsigned char* macIn, unsigned int macInSz, int macContent, + int macVerify, unsigned char* encOut, const unsigned char* encIn, + unsigned int encSz, void* ctx); +CYASSL_API void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX*, CallbackMacEncrypt); +CYASSL_API void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl); + +typedef int (*CallbackDecryptVerify)(CYASSL* ssl, + unsigned char* decOut, const unsigned char* decIn, + unsigned int decSz, int content, int verify, unsigned int* padSz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX*, + CallbackDecryptVerify); +CYASSL_API void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl); + +CYASSL_API const unsigned char* CyaSSL_GetMacSecret(CYASSL*, int); +CYASSL_API const unsigned char* CyaSSL_GetClientWriteKey(CYASSL*); +CYASSL_API const unsigned char* CyaSSL_GetClientWriteIV(CYASSL*); +CYASSL_API const unsigned char* CyaSSL_GetServerWriteKey(CYASSL*); +CYASSL_API const unsigned char* CyaSSL_GetServerWriteIV(CYASSL*); +CYASSL_API int CyaSSL_GetKeySize(CYASSL*); +CYASSL_API int CyaSSL_GetIVSize(CYASSL*); +CYASSL_API int CyaSSL_GetSide(CYASSL*); +CYASSL_API int CyaSSL_IsTLSv1_1(CYASSL*); +CYASSL_API int CyaSSL_GetBulkCipher(CYASSL*); +CYASSL_API int CyaSSL_GetCipherBlockSize(CYASSL*); +CYASSL_API int CyaSSL_GetAeadMacSize(CYASSL*); +CYASSL_API int CyaSSL_GetHmacSize(CYASSL*); +CYASSL_API int CyaSSL_GetHmacType(CYASSL*); +CYASSL_API int CyaSSL_GetCipherType(CYASSL*); +CYASSL_API int CyaSSL_SetTlsHmacInner(CYASSL*, unsigned char*, + unsigned int, int, int); + +/* Atomic User Needs */ +enum { + CYASSL_SERVER_END = 0, + CYASSL_CLIENT_END = 1, + CYASSL_BLOCK_TYPE = 2, + CYASSL_STREAM_TYPE = 3, + CYASSL_AEAD_TYPE = 4, + CYASSL_TLS_HMAC_INNER_SZ = 13 /* SEQ_SZ + ENUM + VERSION_SZ + LEN_SZ */ +}; + +/* for GetBulkCipher and internal use */ +enum BulkCipherAlgorithm { + cyassl_cipher_null, + cyassl_rc4, + cyassl_rc2, + cyassl_des, + cyassl_triple_des, /* leading 3 (3des) not valid identifier */ + cyassl_des40, + cyassl_idea, + cyassl_aes, + cyassl_aes_gcm, + cyassl_aes_ccm, + cyassl_camellia, + cyassl_hc128, /* CyaSSL extensions */ + cyassl_rabbit +}; + + +/* Public Key Callback support */ +typedef int (*CallbackEccSign)(CYASSL* ssl, + const unsigned char* in, unsigned int inSz, + unsigned char* out, unsigned int* outSz, + const unsigned char* keyDer, unsigned int keySz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX*, CallbackEccSign); +CYASSL_API void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetEccSignCtx(CYASSL* ssl); + +typedef int (*CallbackEccVerify)(CYASSL* ssl, + const unsigned char* sig, unsigned int sigSz, + const unsigned char* hash, unsigned int hashSz, + const unsigned char* keyDer, unsigned int keySz, + int* result, void* ctx); +CYASSL_API void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX*, CallbackEccVerify); +CYASSL_API void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl); + +typedef int (*CallbackRsaSign)(CYASSL* ssl, + const unsigned char* in, unsigned int inSz, + unsigned char* out, unsigned int* outSz, + const unsigned char* keyDer, unsigned int keySz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX*, CallbackRsaSign); +CYASSL_API void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetRsaSignCtx(CYASSL* ssl); + +typedef int (*CallbackRsaVerify)(CYASSL* ssl, + unsigned char* sig, unsigned int sigSz, + unsigned char** out, + const unsigned char* keyDer, unsigned int keySz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX*, CallbackRsaVerify); +CYASSL_API void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl); + +/* RSA Public Encrypt cb */ +typedef int (*CallbackRsaEnc)(CYASSL* ssl, + const unsigned char* in, unsigned int inSz, + unsigned char* out, unsigned int* outSz, + const unsigned char* keyDer, unsigned int keySz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX*, CallbackRsaEnc); +CYASSL_API void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetRsaEncCtx(CYASSL* ssl); + +/* RSA Private Decrypt cb */ +typedef int (*CallbackRsaDec)(CYASSL* ssl, + unsigned char* in, unsigned int inSz, + unsigned char** out, + const unsigned char* keyDer, unsigned int keySz, + void* ctx); +CYASSL_API void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX*, CallbackRsaDec); +CYASSL_API void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx); +CYASSL_API void* CyaSSL_GetRsaDecCtx(CYASSL* ssl); + + +#ifndef NO_CERTS + CYASSL_API void CyaSSL_CTX_SetCACb(CYASSL_CTX*, CallbackCACache); + + CYASSL_API CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void); + CYASSL_API void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER*); + + CYASSL_API int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER*, const char* f, + const char* d); + CYASSL_API int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm); + CYASSL_API int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER*, const char* f, + int format); + CYASSL_API int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, + const unsigned char* buff, long sz, int format); + CYASSL_API int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER*, + unsigned char*, int sz); + CYASSL_API int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER*, + int options); + CYASSL_API int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER*); + CYASSL_API int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER*, const char*, + int, int); + CYASSL_API int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER*, + CbMissingCRL); + CYASSL_API int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER*, + unsigned char*, int sz); + CYASSL_API int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER*, + int options); + CYASSL_API int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER*); + CYASSL_API int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER*, + const char*); + CYASSL_API int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER*, + CbOCSPIO, CbOCSPRespFree, void*); + + CYASSL_API int CyaSSL_EnableCRL(CYASSL* ssl, int options); + CYASSL_API int CyaSSL_DisableCRL(CYASSL* ssl); + CYASSL_API int CyaSSL_LoadCRL(CYASSL*, const char*, int, int); + CYASSL_API int CyaSSL_SetCRL_Cb(CYASSL*, CbMissingCRL); + CYASSL_API int CyaSSL_EnableOCSP(CYASSL*, int options); + CYASSL_API int CyaSSL_DisableOCSP(CYASSL*); + CYASSL_API int CyaSSL_SetOCSP_OverrideURL(CYASSL*, const char*); + CYASSL_API int CyaSSL_SetOCSP_Cb(CYASSL*, CbOCSPIO, CbOCSPRespFree, void*); + + CYASSL_API int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options); + CYASSL_API int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx); + CYASSL_API int CyaSSL_CTX_LoadCRL(CYASSL_CTX*, const char*, int, int); + CYASSL_API int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX*, CbMissingCRL); + CYASSL_API int CyaSSL_CTX_EnableOCSP(CYASSL_CTX*, int options); + CYASSL_API int CyaSSL_CTX_DisableOCSP(CYASSL_CTX*); + CYASSL_API int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX*, const char*); + CYASSL_API int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX*, + CbOCSPIO, CbOCSPRespFree, void*); +#endif /* !NO_CERTS */ + +/* end of handshake frees temporary arrays, if user needs for get_keys or + psk hints, call KeepArrays before handshake and then FreeArrays when done + if don't want to wait for object free */ +CYASSL_API void CyaSSL_KeepArrays(CYASSL*); +CYASSL_API void CyaSSL_FreeArrays(CYASSL*); + + +/* cavium additions */ +CYASSL_API int CyaSSL_UseCavium(CYASSL*, int devId); +CYASSL_API int CyaSSL_CTX_UseCavium(CYASSL_CTX*, int devId); + +/* TLS Extensions */ + +/* Server Name Indication */ +#ifdef HAVE_SNI +/* SNI types */ +enum { + CYASSL_SNI_HOST_NAME = 0 +}; + +CYASSL_API int CyaSSL_UseSNI(CYASSL* ssl, unsigned char type, const void* data, + unsigned short size); +CYASSL_API int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, unsigned char type, + const void* data, unsigned short size); + +#ifndef NO_CYASSL_SERVER +/* SNI options */ +enum { + CYASSL_SNI_CONTINUE_ON_MISMATCH = 0x01, /* do not abort on mismatch flag */ + CYASSL_SNI_ANSWER_ON_MISMATCH = 0x02 /* fake match on mismatch flag */ +}; + +CYASSL_API void CyaSSL_SNI_SetOptions(CYASSL* ssl, unsigned char type, + unsigned char options); +CYASSL_API void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, unsigned char type, + unsigned char options); + +/* SNI status */ +enum { + CYASSL_SNI_NO_MATCH = 0, + CYASSL_SNI_FAKE_MATCH = 1, /* if CYASSL_SNI_ANSWER_ON_MISMATCH is enabled */ + CYASSL_SNI_REAL_MATCH = 2 +}; + +CYASSL_API unsigned char CyaSSL_SNI_Status(CYASSL* ssl, unsigned char type); + +CYASSL_API unsigned short CyaSSL_SNI_GetRequest(CYASSL *ssl, unsigned char type, + void** data); + +CYASSL_API int CyaSSL_SNI_GetFromBuffer( + const unsigned char* clientHello, unsigned int helloSz, + unsigned char type, unsigned char* sni, unsigned int* inOutSz); + +#endif /* NO_CYASSL_SERVER */ +#endif /* HAVE_SNI */ + +/* Maximum Fragment Length */ +#ifdef HAVE_MAX_FRAGMENT +/* Fragment lengths */ +enum { + CYASSL_MFL_2_9 = 1, /* 512 bytes */ + CYASSL_MFL_2_10 = 2, /* 1024 bytes */ + CYASSL_MFL_2_11 = 3, /* 2048 bytes */ + CYASSL_MFL_2_12 = 4, /* 4096 bytes */ + CYASSL_MFL_2_13 = 5 /* 8192 bytes *//* CyaSSL ONLY!!! */ +}; + +#ifndef NO_CYASSL_CLIENT + +CYASSL_API int CyaSSL_UseMaxFragment(CYASSL* ssl, unsigned char mfl); +CYASSL_API int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, unsigned char mfl); + +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_MAX_FRAGMENT */ + +/* Truncated HMAC */ +#ifdef HAVE_TRUNCATED_HMAC +#ifndef NO_CYASSL_CLIENT + +CYASSL_API int CyaSSL_UseTruncatedHMAC(CYASSL* ssl); +CYASSL_API int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx); + +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_TRUNCATED_HMAC */ + +/* Elliptic Curves */ +#ifdef HAVE_SUPPORTED_CURVES + +enum { + CYASSL_ECC_SECP160R1 = 0x10, + CYASSL_ECC_SECP192R1 = 0x13, + CYASSL_ECC_SECP224R1 = 0x15, + CYASSL_ECC_SECP256R1 = 0x17, + CYASSL_ECC_SECP384R1 = 0x18, + CYASSL_ECC_SECP521R1 = 0x19 +}; + +#ifndef NO_CYASSL_CLIENT + +CYASSL_API int CyaSSL_UseSupportedCurve(CYASSL* ssl, unsigned short name); +CYASSL_API int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, + unsigned short name); + +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_SUPPORTED_CURVES */ + + +#define CYASSL_CRL_MONITOR 0x01 /* monitor this dir flag */ +#define CYASSL_CRL_START_MON 0x02 /* start monitoring flag */ + +#ifdef CYASSL_CALLBACKS + +/* used internally by CyaSSL while OpenSSL types aren't */ +#include + +typedef int (*HandShakeCallBack)(HandShakeInfo*); +typedef int (*TimeoutCallBack)(TimeoutInfo*); + +/* CyaSSL connect extension allowing HandShakeCallBack and/or TimeoutCallBack + for diagnostics */ +CYASSL_API int CyaSSL_connect_ex(CYASSL*, HandShakeCallBack, TimeoutCallBack, + Timeval); +CYASSL_API int CyaSSL_accept_ex(CYASSL*, HandShakeCallBack, TimeoutCallBack, + Timeval); + +#endif /* CYASSL_CALLBACKS */ + + +#ifdef CYASSL_HAVE_WOLFSCEP + CYASSL_API void CyaSSL_wolfSCEP(void); +#endif /* CYASSL_HAVE_WOLFSCEP */ + +#ifdef CYASSL_HAVE_CERT_SERVICE + CYASSL_API void CyaSSL_cert_service(void); +#endif + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* CYASSL_SSL_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/test.h b/project1/cyassl-3.0.0/cyassl/test.h new file mode 100644 index 00000000..667476ed --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/test.h @@ -0,0 +1,1730 @@ +/* test.h */ + +#ifndef CyaSSL_TEST_H +#define CyaSSL_TEST_H + +#include +#include +#include +#include +#include +#include + +#ifdef ATOMIC_USER + #include + #include + #include +#endif +#ifdef HAVE_PK_CALLBACKS + #include + #include + #ifdef HAVE_ECC + #include + #endif /* HAVE_ECC */ +#endif /*HAVE_PK_CALLBACKS */ + +#ifdef USE_WINDOWS_API + #include + #include + #ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */ + #include + #include + #endif + #define SOCKET_T SOCKET + #define SNPRINTF _snprintf +#elif defined(CYASSL_MDK_ARM) + #include +#else + #include + #include +#ifndef CYASSL_LEANPSK + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #ifdef TEST_IPV6 + #include + #endif +#endif + #define SOCKET_T int + #ifndef SO_NOSIGPIPE + #include /* ignore SIGPIPE */ + #endif + #define SNPRINTF snprintf +#endif /* USE_WINDOWS_API */ + +#ifdef HAVE_CAVIUM + #include "cavium_sysdep.h" + #include "cavium_common.h" + #include "cavium_ioctl.h" +#endif + +#ifdef _MSC_VER + /* disable conversion warning */ + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable:4244 4996) +#endif + + +#if defined(__MACH__) || defined(USE_WINDOWS_API) + #ifndef _SOCKLEN_T + typedef int socklen_t; + #endif +#endif + + +/* HPUX doesn't use socklent_t for third parameter to accept, unless + _XOPEN_SOURCE_EXTENDED is defined */ +#if !defined(__hpux__) && !defined(CYASSL_MDK_ARM) && !defined(CYASSL_IAR_ARM) + typedef socklen_t* ACCEPT_THIRD_T; +#else + #if defined _XOPEN_SOURCE_EXTENDED + typedef socklen_t* ACCEPT_THIRD_T; + #else + typedef int* ACCEPT_THIRD_T; + #endif +#endif + + +#ifdef USE_WINDOWS_API + #define CloseSocket(s) closesocket(s) + #define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); } +#elif defined(CYASSL_MDK_ARM) + #define CloseSocket(s) closesocket(s) + #define StartTCP() +#else + #define CloseSocket(s) close(s) + #define StartTCP() +#endif + + +#ifdef SINGLE_THREADED + typedef unsigned int THREAD_RETURN; + typedef void* THREAD_TYPE; + #define CYASSL_THREAD +#else + #if defined(_POSIX_THREADS) && !defined(__MINGW32__) + typedef void* THREAD_RETURN; + typedef pthread_t THREAD_TYPE; + #define CYASSL_THREAD + #define INFINITE -1 + #define WAIT_OBJECT_0 0L + #elif defined(CYASSL_MDK_ARM) + typedef unsigned int THREAD_RETURN; + typedef int THREAD_TYPE; + #define CYASSL_THREAD + #else + typedef unsigned int THREAD_RETURN; + typedef intptr_t THREAD_TYPE; + #define CYASSL_THREAD __stdcall + #endif +#endif + + +#ifdef TEST_IPV6 + typedef struct sockaddr_in6 SOCKADDR_IN_T; + #define AF_INET_V AF_INET6 +#else + typedef struct sockaddr_in SOCKADDR_IN_T; + #define AF_INET_V AF_INET +#endif + + +#define SERVER_DEFAULT_VERSION 3 +#define SERVER_DTLS_DEFAULT_VERSION (-2) +#define SERVER_INVALID_VERSION (-99) +#define CLIENT_DEFAULT_VERSION 3 +#define CLIENT_DTLS_DEFAULT_VERSION (-2) +#define CLIENT_INVALID_VERSION (-99) + +/* all certs relative to CyaSSL home directory now */ +#define caCert "./certs/ca-cert.pem" +#define eccCert "./certs/server-ecc.pem" +#define eccKey "./certs/ecc-key.pem" +#define svrCert "./certs/server-cert.pem" +#define svrKey "./certs/server-key.pem" +#define cliCert "./certs/client-cert.pem" +#define cliKey "./certs/client-key.pem" +#define ntruCert "./certs/ntru-cert.pem" +#define ntruKey "./certs/ntru-key.raw" +#define dhParam "./certs/dh2048.pem" +#define cliEccKey "./certs/ecc-client-key.pem" +#define cliEccCert "./certs/client-ecc-cert.pem" +#define crlPemDir "./certs/crl" + +typedef struct tcp_ready { + word16 ready; /* predicate */ + word16 port; +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_t mutex; + pthread_cond_t cond; +#endif +} tcp_ready; + + +void InitTcpReady(tcp_ready*); +void FreeTcpReady(tcp_ready*); + +typedef CYASSL_METHOD* (*method_provider)(void); +typedef void (*ctx_callback)(CYASSL_CTX* ctx); +typedef void (*ssl_callback)(CYASSL* ssl); + +typedef struct callback_functions { + method_provider method; + ctx_callback ctx_ready; + ssl_callback ssl_ready; + ssl_callback on_result; +} callback_functions; + +typedef struct func_args { + int argc; + char** argv; + int return_code; + tcp_ready* signal; + callback_functions *callbacks; +} func_args; + +void wait_tcp_ready(func_args*); + +typedef THREAD_RETURN CYASSL_THREAD THREAD_FUNC(void*); + +void start_thread(THREAD_FUNC, func_args*, THREAD_TYPE*); +void join_thread(THREAD_TYPE); + +/* yaSSL */ +#ifndef TEST_IPV6 + static const char* const yasslIP = "127.0.0.1"; +#else + static const char* const yasslIP = "::1"; +#endif +static const word16 yasslPort = 11111; + +static INLINE void err_sys(const char* msg) +{ + printf("yassl error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + + +#define MY_EX_USAGE 2 + +extern int myoptind; +extern char* myoptarg; + +static INLINE int mygetopt(int argc, char** argv, const char* optstring) +{ + static char* next = NULL; + + char c; + char* cp; + + if (myoptind == 0) + next = NULL; /* we're starting new/over */ + + if (next == NULL || *next == '\0') { + if (myoptind == 0) + myoptind++; + + if (myoptind >= argc || argv[myoptind][0] != '-' || + argv[myoptind][1] == '\0') { + myoptarg = NULL; + if (myoptind < argc) + myoptarg = argv[myoptind]; + + return -1; + } + + if (strcmp(argv[myoptind], "--") == 0) { + myoptind++; + myoptarg = NULL; + + if (myoptind < argc) + myoptarg = argv[myoptind]; + + return -1; + } + + next = argv[myoptind]; + next++; /* skip - */ + myoptind++; + } + + c = *next++; + /* The C++ strchr can return a different value */ + cp = (char*)strchr(optstring, c); + + if (cp == NULL || c == ':') + return '?'; + + cp++; + + if (*cp == ':') { + if (*next != '\0') { + myoptarg = next; + next = NULL; + } + else if (myoptind < argc) { + myoptarg = argv[myoptind]; + myoptind++; + } + else + return '?'; + } + + return c; +} + + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + +static INLINE int PasswordCallBack(char* passwd, int sz, int rw, void* userdata) +{ + (void)rw; + (void)userdata; + strncpy(passwd, "yassl123", sz); + return 8; +} + +#endif + + +#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) + +static INLINE void ShowX509(CYASSL_X509* x509, const char* hdr) +{ + char* altName; + char* issuer = CyaSSL_X509_NAME_oneline( + CyaSSL_X509_get_issuer_name(x509), 0, 0); + char* subject = CyaSSL_X509_NAME_oneline( + CyaSSL_X509_get_subject_name(x509), 0, 0); + byte serial[32]; + int ret; + int sz = sizeof(serial); + + printf("%s\n issuer : %s\n subject: %s\n", hdr, issuer, subject); + + while ( (altName = CyaSSL_X509_get_next_altname(x509)) != NULL) + printf(" altname = %s\n", altName); + + ret = CyaSSL_X509_get_serial_number(x509, serial, &sz); + if (ret == SSL_SUCCESS) { + int i; + int strLen; + char serialMsg[80]; + + /* testsuite has multiple threads writing to stdout, get output + message ready to write once */ + strLen = sprintf(serialMsg, " serial number"); + for (i = 0; i < sz; i++) + sprintf(serialMsg + strLen + (i*3), ":%02x ", serial[i]); + printf("%s\n", serialMsg); + } + + XFREE(subject, 0, DYNAMIC_TYPE_OPENSSL); + XFREE(issuer, 0, DYNAMIC_TYPE_OPENSSL); +} + +#endif /* KEEP_PEER_CERT || SESSION_CERTS */ + + +static INLINE void showPeer(CYASSL* ssl) +{ + + CYASSL_CIPHER* cipher; +#ifdef KEEP_PEER_CERT + CYASSL_X509* peer = CyaSSL_get_peer_certificate(ssl); + if (peer) + ShowX509(peer, "peer's cert info:"); + else + printf("peer has no cert!\n"); +#endif + printf("SSL version is %s\n", CyaSSL_get_version(ssl)); + + cipher = CyaSSL_get_current_cipher(ssl); + printf("SSL cipher suite is %s\n", CyaSSL_CIPHER_get_name(cipher)); + +#if defined(SESSION_CERTS) && defined(SHOW_CERTS) + { + CYASSL_X509_CHAIN* chain = CyaSSL_get_peer_chain(ssl); + int count = CyaSSL_get_chain_count(chain); + int i; + + for (i = 0; i < count; i++) { + int length; + unsigned char buffer[3072]; + CYASSL_X509* chainX509; + + CyaSSL_get_chain_cert_pem(chain,i,buffer, sizeof(buffer), &length); + buffer[length] = 0; + printf("cert %d has length %d data = \n%s\n", i, length, buffer); + + chainX509 = CyaSSL_get_chain_X509(chain, i); + if (chainX509) + ShowX509(chainX509, "session cert info:"); + else + printf("get_chain_X509 failed\n"); + CyaSSL_FreeX509(chainX509); + } + } +#endif + (void)ssl; +} + + +static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer, + word16 port, int udp) +{ + int useLookup = 0; + (void)useLookup; + (void)udp; + + memset(addr, 0, sizeof(SOCKADDR_IN_T)); + +#ifndef TEST_IPV6 + /* peer could be in human readable form */ + if ( (peer != INADDR_ANY) && isalpha((int)peer[0])) { + #ifdef CYASSL_MDK_ARM + int err; + struct hostent* entry = gethostbyname(peer, &err); + #else + struct hostent* entry = gethostbyname(peer); + #endif + + if (entry) { + memcpy(&addr->sin_addr.s_addr, entry->h_addr_list[0], + entry->h_length); + useLookup = 1; + } + else + err_sys("no entry for host"); + } +#endif + + +#ifndef TEST_IPV6 + #if defined(CYASSL_MDK_ARM) + addr->sin_family = PF_INET; + #else + addr->sin_family = AF_INET_V; + #endif + addr->sin_port = htons(port); + if (peer == INADDR_ANY) + addr->sin_addr.s_addr = INADDR_ANY; + else { + if (!useLookup) + addr->sin_addr.s_addr = inet_addr(peer); + } +#else + addr->sin6_family = AF_INET_V; + addr->sin6_port = htons(port); + if (peer == INADDR_ANY) + addr->sin6_addr = in6addr_any; + else { + #ifdef HAVE_GETADDRINFO + struct addrinfo hints; + struct addrinfo* answer = NULL; + int ret; + char strPort[80]; + + memset(&hints, 0, sizeof(hints)); + + hints.ai_family = AF_INET_V; + hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM; + hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP; + + SNPRINTF(strPort, sizeof(strPort), "%d", port); + strPort[79] = '\0'; + + ret = getaddrinfo(peer, strPort, &hints, &answer); + if (ret < 0 || answer == NULL) + err_sys("getaddrinfo failed"); + + memcpy(addr, answer->ai_addr, answer->ai_addrlen); + freeaddrinfo(answer); + #else + printf("no ipv6 getaddrinfo, loopback only tests/examples\n"); + addr->sin6_addr = in6addr_loopback; + #endif + } +#endif +} + + +static INLINE void tcp_socket(SOCKET_T* sockfd, int udp) +{ + if (udp) + *sockfd = socket(AF_INET_V, SOCK_DGRAM, 0); + else + *sockfd = socket(AF_INET_V, SOCK_STREAM, 0); + +#ifdef USE_WINDOWS_API + if (*sockfd == INVALID_SOCKET) + err_sys("socket failed\n"); +#else + if (*sockfd < 0) + err_sys("socket failed\n"); +#endif + +#ifndef USE_WINDOWS_API +#ifdef SO_NOSIGPIPE + { + int on = 1; + socklen_t len = sizeof(on); + int res = setsockopt(*sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, len); + if (res < 0) + err_sys("setsockopt SO_NOSIGPIPE failed\n"); + } +#elif defined(CYASSL_MDK_ARM) + /* nothing to define */ +#else /* no S_NOSIGPIPE */ + signal(SIGPIPE, SIG_IGN); +#endif /* S_NOSIGPIPE */ + +#if defined(TCP_NODELAY) + if (!udp) + { + int on = 1; + socklen_t len = sizeof(on); + int res = setsockopt(*sockfd, IPPROTO_TCP, TCP_NODELAY, &on, len); + if (res < 0) + err_sys("setsockopt TCP_NODELAY failed\n"); + } +#endif +#endif /* USE_WINDOWS_API */ +} + +static INLINE void tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port, + int udp) +{ + SOCKADDR_IN_T addr; + build_addr(&addr, ip, port, udp); + tcp_socket(sockfd, udp); + + if (!udp) { + if (connect(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) + err_sys("tcp connect failed"); + } +} + + +static INLINE void udp_connect(SOCKET_T* sockfd, void* addr, int addrSz) +{ + if (connect(*sockfd, (const struct sockaddr*)addr, addrSz) != 0) + err_sys("tcp connect failed"); +} + + +enum { + TEST_SELECT_FAIL, + TEST_TIMEOUT, + TEST_RECV_READY, + TEST_ERROR_READY +}; + + +#if !defined(CYASSL_MDK_ARM) +static INLINE int tcp_select(SOCKET_T socketfd, int to_sec) +{ + fd_set recvfds, errfds; + SOCKET_T nfds = socketfd + 1; + struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; + int result; + + FD_ZERO(&recvfds); + FD_SET(socketfd, &recvfds); + FD_ZERO(&errfds); + FD_SET(socketfd, &errfds); + + result = select(nfds, &recvfds, NULL, &errfds, &timeout); + + if (result == 0) + return TEST_TIMEOUT; + else if (result > 0) { + if (FD_ISSET(socketfd, &recvfds)) + return TEST_RECV_READY; + else if(FD_ISSET(socketfd, &errfds)) + return TEST_ERROR_READY; + } + + return TEST_SELECT_FAIL; +} +#endif /* !CYASSL_MDK_ARM */ + + +static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr, + int udp) +{ + SOCKADDR_IN_T addr; + + /* don't use INADDR_ANY by default, firewall may block, make user switch + on */ + build_addr(&addr, (useAnyAddr ? INADDR_ANY : yasslIP), *port, udp); + tcp_socket(sockfd, udp); + +#if !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_ARM) + { + int res, on = 1; + socklen_t len = sizeof(on); + res = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) + err_sys("setsockopt SO_REUSEADDR failed\n"); + } +#endif + + if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) + err_sys("tcp bind failed"); + if (!udp) { + if (listen(*sockfd, 5) != 0) + err_sys("tcp listen failed"); + } + #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) + if (*port == 0) { + socklen_t len = sizeof(addr); + if (getsockname(*sockfd, (struct sockaddr*)&addr, &len) == 0) { + #ifndef TEST_IPV6 + *port = ntohs(addr.sin_port); + #else + *port = ntohs(addr.sin6_port); + #endif + } + } + #endif +} + + +static INLINE int udp_read_connect(SOCKET_T sockfd) +{ + SOCKADDR_IN_T cliaddr; + byte b[1500]; + int n; + socklen_t len = sizeof(cliaddr); + + n = (int)recvfrom(sockfd, (char*)b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &len); + if (n > 0) { + if (connect(sockfd, (const struct sockaddr*)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + else + err_sys("recvfrom failed"); + + return sockfd; +} + +static INLINE void udp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd, + int useAnyAddr, word16 port, func_args* args) +{ + SOCKADDR_IN_T addr; + + (void)args; + build_addr(&addr, (useAnyAddr ? INADDR_ANY : yasslIP), port, 1); + tcp_socket(sockfd, 1); + + +#if !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_ARM) + { + int res, on = 1; + socklen_t len = sizeof(on); + res = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) + err_sys("setsockopt SO_REUSEADDR failed\n"); + } +#endif + + if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) + err_sys("tcp bind failed"); + + #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) + if (port == 0) { + socklen_t len = sizeof(addr); + if (getsockname(*sockfd, (struct sockaddr*)&addr, &len) == 0) { + #ifndef TEST_IPV6 + port = ntohs(addr.sin_port); + #else + port = ntohs(addr.sin6_port); + #endif + } + } + #endif + +#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) + /* signal ready to accept data */ + { + tcp_ready* ready = args->signal; + pthread_mutex_lock(&ready->mutex); + ready->ready = 1; + ready->port = port; + pthread_cond_signal(&ready->cond); + pthread_mutex_unlock(&ready->mutex); + } +#endif + + *clientfd = udp_read_connect(*sockfd); +} + +static INLINE void tcp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd, + func_args* args, word16 port, int useAnyAddr, + int udp) +{ + SOCKADDR_IN_T client; + socklen_t client_len = sizeof(client); + + if (udp) { + udp_accept(sockfd, clientfd, useAnyAddr, port, args); + return; + } + + tcp_listen(sockfd, &port, useAnyAddr, udp); + +#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) + /* signal ready to tcp_accept */ + { + tcp_ready* ready = args->signal; + pthread_mutex_lock(&ready->mutex); + ready->ready = 1; + ready->port = port; + pthread_cond_signal(&ready->cond); + pthread_mutex_unlock(&ready->mutex); + } +#endif + + *clientfd = accept(*sockfd, (struct sockaddr*)&client, + (ACCEPT_THIRD_T)&client_len); +#ifdef USE_WINDOWS_API + if (*clientfd == INVALID_SOCKET) + err_sys("tcp accept failed"); +#else + if (*clientfd == -1) + err_sys("tcp accept failed"); +#endif +} + + +static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd) +{ + #ifdef USE_WINDOWS_API + unsigned long blocking = 1; + int ret = ioctlsocket(*sockfd, FIONBIO, &blocking); + if (ret == SOCKET_ERROR) + err_sys("ioctlsocket failed"); + #elif defined(CYASSL_MDK_ARM) + /* non blocking not suppported, for now */ + #else + int flags = fcntl(*sockfd, F_GETFL, 0); + if (flags < 0) + err_sys("fcntl get failed"); + flags = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK); + if (flags < 0) + err_sys("fcntl set failed"); + #endif +} + + +#ifndef NO_PSK + +static INLINE unsigned int my_psk_client_cb(CYASSL* ssl, const char* hint, + char* identity, unsigned int id_max_len, unsigned char* key, + unsigned int key_max_len) +{ + (void)ssl; + (void)hint; + (void)key_max_len; + + /* identity is OpenSSL testing default for openssl s_client, keep same */ + strncpy(identity, "Client_identity", id_max_len); + + + /* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using + unsigned binary */ + key[0] = 26; + key[1] = 43; + key[2] = 60; + key[3] = 77; + + return 4; /* length of key in octets or 0 for error */ +} + + +static INLINE unsigned int my_psk_server_cb(CYASSL* ssl, const char* identity, + unsigned char* key, unsigned int key_max_len) +{ + (void)ssl; + (void)key_max_len; + + /* identity is OpenSSL testing default for openssl s_client, keep same */ + if (strncmp(identity, "Client_identity", 15) != 0) + return 0; + + /* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using + unsigned binary */ + key[0] = 26; + key[1] = 43; + key[2] = 60; + key[3] = 77; + + return 4; /* length of key in octets or 0 for error */ +} + +#endif /* NO_PSK */ + + +#ifdef USE_WINDOWS_API + + #define WIN32_LEAN_AND_MEAN + #include + + static INLINE double current_time() + { + static int init = 0; + static LARGE_INTEGER freq; + + LARGE_INTEGER count; + + if (!init) { + QueryPerformanceFrequency(&freq); + init = 1; + } + + QueryPerformanceCounter(&count); + + return (double)count.QuadPart / freq.QuadPart; + } + +#else + +#if !defined(CYASSL_MDK_ARM) + #include + + static INLINE double current_time(void) + { + struct timeval tv; + gettimeofday(&tv, 0); + + return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; + } + +#endif +#endif /* USE_WINDOWS_API */ + + +#if defined(NO_FILESYSTEM) && !defined(NO_CERTS) + + enum { + CYASSL_CA = 1, + CYASSL_CERT = 2, + CYASSL_KEY = 3 + }; + + static INLINE void load_buffer(CYASSL_CTX* ctx, const char* fname, int type) + { + /* test buffer load */ + long sz = 0; + byte buff[10000]; + FILE* file = fopen(fname, "rb"); + + if (!file) + err_sys("can't open file for buffer load " + "Please run from CyaSSL home directory if not"); + fseek(file, 0, SEEK_END); + sz = ftell(file); + rewind(file); + fread(buff, sizeof(buff), 1, file); + + if (type == CYASSL_CA) { + if (CyaSSL_CTX_load_verify_buffer(ctx, buff, sz, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load buffer ca file"); + } + else if (type == CYASSL_CERT) { + if (CyaSSL_CTX_use_certificate_buffer(ctx, buff, sz, + SSL_FILETYPE_PEM) != SSL_SUCCESS) + err_sys("can't load buffer cert file"); + } + else if (type == CYASSL_KEY) { + if (CyaSSL_CTX_use_PrivateKey_buffer(ctx, buff, sz, + SSL_FILETYPE_PEM) != SSL_SUCCESS) + err_sys("can't load buffer key file"); + } + } + +#endif /* NO_FILESYSTEM */ + +#ifdef VERIFY_CALLBACK + +static INLINE int myVerify(int preverify, CYASSL_X509_STORE_CTX* store) +{ + (void)preverify; + char buffer[CYASSL_MAX_ERROR_SZ]; + +#ifdef OPENSSL_EXTRA + CYASSL_X509* peer; +#endif + + printf("In verification callback, error = %d, %s\n", store->error, + CyaSSL_ERR_error_string(store->error, buffer)); +#ifdef OPENSSL_EXTRA + peer = store->current_cert; + if (peer) { + char* issuer = CyaSSL_X509_NAME_oneline( + CyaSSL_X509_get_issuer_name(peer), 0, 0); + char* subject = CyaSSL_X509_NAME_oneline( + CyaSSL_X509_get_subject_name(peer), 0, 0); + printf("peer's cert info:\n issuer : %s\n subject: %s\n", issuer, + subject); + XFREE(subject, 0, DYNAMIC_TYPE_OPENSSL); + XFREE(issuer, 0, DYNAMIC_TYPE_OPENSSL); + } + else + printf("peer has no cert!\n"); +#endif + printf("Subject's domain name is %s\n", store->domain); + + printf("Allowing to continue anyway (shouldn't do this, EVER!!!)\n"); + return 1; +} + +#endif /* VERIFY_CALLBACK */ + + +#ifdef HAVE_CRL + +static INLINE void CRL_CallBack(const char* url) +{ + printf("CRL callback url = %s\n", url); +} + +#endif + +#ifndef NO_CERTS + +static INLINE void CaCb(unsigned char* der, int sz, int type) +{ + (void)der; + printf("Got CA cache add callback, derSz = %d, type = %d\n", sz, type); +} + + +static INLINE void SetDH(CYASSL* ssl) +{ + /* dh1024 p */ + static unsigned char p[] = + { + 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3, + 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E, + 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59, + 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2, + 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD, + 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF, + 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02, + 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C, + 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7, + 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50, + 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B, + }; + + /* dh1024 g */ + static unsigned char g[] = + { + 0x02, + }; + + CyaSSL_SetTmpDH(ssl, p, sizeof(p), g, sizeof(g)); +} + +static INLINE void SetDHCtx(CYASSL_CTX* ctx) +{ + /* dh1024 p */ + static unsigned char p[] = + { + 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3, + 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E, + 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59, + 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2, + 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD, + 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF, + 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02, + 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C, + 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7, + 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50, + 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B, + }; + + /* dh1024 g */ + static unsigned char g[] = + { + 0x02, + }; + + CyaSSL_CTX_SetTmpDH(ctx, p, sizeof(p), g, sizeof(g)); +} + +#endif /* !NO_CERTS */ + +#ifdef HAVE_CAVIUM + +static INLINE int OpenNitroxDevice(int dma_mode,int dev_id) +{ + Csp1CoreAssignment core_assign; + Uint32 device; + + if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) + return -1; + if (Csp1GetDevType(&device)) + return -1; + if (device != NPX_DEVICE) { + if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, + (Uint32 *)&core_assign)!= 0) + return -1; + } + CspShutdown(CAVIUM_DEV_ID); + + return CspInitialize(dma_mode, dev_id); +} + +#endif /* HAVE_CAVIUM */ + + +#ifdef USE_WINDOWS_API + +/* do back x number of directories */ +static INLINE void ChangeDirBack(int x) +{ + char path[MAX_PATH]; + + if (x == 1) + strncpy(path, "..\\", MAX_PATH); + else if (x == 2) + strncpy(path, "..\\..\\", MAX_PATH); + else if (x == 3) + strncpy(path, "..\\..\\..\\", MAX_PATH); + else if (x == 4) + strncpy(path, "..\\..\\..\\..\\", MAX_PATH); + else + strncpy(path, ".\\", MAX_PATH); + + SetCurrentDirectoryA(path); +} + +/* does current dir contain str */ +static INLINE int CurrentDir(const char* str) +{ + char path[MAX_PATH]; + char* baseName; + + GetCurrentDirectoryA(sizeof(path), path); + + baseName = strrchr(path, '\\'); + if (baseName) + baseName++; + else + baseName = path; + + if (strstr(baseName, str)) + return 1; + + return 0; +} + +#elif defined(CYASSL_MDK_ARM) + /* KEIL-RL File System does not support relative directry */ +#else + +#ifndef MAX_PATH + #define MAX_PATH 256 +#endif + +/* do back x number of directories */ +static INLINE void ChangeDirBack(int x) +{ + char path[MAX_PATH]; + + if (x == 1) + strncpy(path, "../", MAX_PATH); + else if (x == 2) + strncpy(path, "../../", MAX_PATH); + else if (x == 3) + strncpy(path, "../../../", MAX_PATH); + else if (x == 4) + strncpy(path, "../../../../", MAX_PATH); + else + strncpy(path, "./", MAX_PATH); + + if (chdir(path) < 0) + printf("chdir to %s failed\n", path); +} + +/* does current dir contain str */ +static INLINE int CurrentDir(const char* str) +{ + char path[MAX_PATH]; + char* baseName; + + if (getcwd(path, sizeof(path)) == NULL) { + printf("no current dir?\n"); + return 0; + } + + baseName = strrchr(path, '/'); + if (baseName) + baseName++; + else + baseName = path; + + if (strstr(baseName, str)) + return 1; + + return 0; +} + +#endif /* USE_WINDOWS_API */ + + +#ifdef USE_CYASSL_MEMORY + + typedef struct memoryStats { + size_t totalAllocs; /* number of allocations */ + size_t totalBytes; /* total number of bytes allocated */ + size_t peakBytes; /* concurrent max bytes */ + size_t currentBytes; /* total current bytes in use */ + } memoryStats; + + typedef struct memHint { + size_t thisSize; /* size of this memory */ + void* thisMemory; /* actual memory for user */ + } memHint; + + typedef struct memoryTrack { + union { + memHint hint; + byte alignit[16]; /* make sure we have strong alignment */ + } u; + } memoryTrack; + + #if defined(CYASSL_TRACK_MEMORY) + #define DO_MEM_STATS + static memoryStats ourMemStats; + #endif + + static INLINE void* TrackMalloc(size_t sz) + { + memoryTrack* mt; + + if (sz == 0) + return NULL; + + mt = (memoryTrack*)malloc(sizeof(memoryTrack) + sz); + if (mt == NULL) + return NULL; + + mt->u.hint.thisSize = sz; + mt->u.hint.thisMemory = (byte*)mt + sizeof(memoryTrack); + +#ifdef DO_MEM_STATS + ourMemStats.totalAllocs++; + ourMemStats.totalBytes += sz; + ourMemStats.currentBytes += sz; + if (ourMemStats.currentBytes > ourMemStats.peakBytes) + ourMemStats.peakBytes = ourMemStats.currentBytes; +#endif + + return mt->u.hint.thisMemory; + } + + + static INLINE void TrackFree(void* ptr) + { + memoryTrack* mt; + + if (ptr == NULL) + return; + + mt = (memoryTrack*)ptr; + --mt; /* same as minus sizeof(memoryTrack), removes header */ + +#ifdef DO_MEM_STATS + ourMemStats.currentBytes -= mt->u.hint.thisSize; +#endif + + free(mt); + } + + + static INLINE void* TrackRealloc(void* ptr, size_t sz) + { + void* ret = TrackMalloc(sz); + + if (ptr) { + /* if realloc is bigger, don't overread old ptr */ + memoryTrack* mt = (memoryTrack*)ptr; + --mt; /* same as minus sizeof(memoryTrack), removes header */ + + if (mt->u.hint.thisSize < sz) + sz = mt->u.hint.thisSize; + } + + if (ret && ptr) + memcpy(ret, ptr, sz); + + if (ret) + TrackFree(ptr); + + return ret; + } + + static INLINE void InitMemoryTracker(void) + { + if (CyaSSL_SetAllocators(TrackMalloc, TrackFree, TrackRealloc) != 0) + err_sys("CyaSSL SetAllocators failed for track memory"); + + #ifdef DO_MEM_STATS + ourMemStats.totalAllocs = 0; + ourMemStats.totalBytes = 0; + ourMemStats.peakBytes = 0; + ourMemStats.currentBytes = 0; + #endif + } + + static INLINE void ShowMemoryTracker(void) + { + #ifdef DO_MEM_STATS + printf("total Allocs = %9lu\n", + (unsigned long)ourMemStats.totalAllocs); + printf("total Bytes = %9lu\n", + (unsigned long)ourMemStats.totalBytes); + printf("peak Bytes = %9lu\n", + (unsigned long)ourMemStats.peakBytes); + printf("current Bytes = %9lu\n", + (unsigned long)ourMemStats.currentBytes); + #endif + } + +#endif /* USE_CYASSL_MEMORY */ + + +#ifdef HAVE_STACK_SIZE + +typedef THREAD_RETURN CYASSL_THREAD (*thread_func)(void* args); + + +static INLINE void StackSizeCheck(func_args* args, thread_func tf) +{ + int ret, i, used; + unsigned char* myStack; + int stackSize = 1024*128; + pthread_attr_t myAttr; + pthread_t threadId; + +#ifdef PTHREAD_STACK_MIN + if (stackSize < PTHREAD_STACK_MIN) + stackSize = PTHREAD_STACK_MIN; +#endif + + ret = posix_memalign((void**)&myStack, sysconf(_SC_PAGESIZE), stackSize); + if (ret != 0) + err_sys("posix_memalign failed\n"); + + memset(myStack, 0x01, stackSize); + + ret = pthread_attr_init(&myAttr); + if (ret != 0) + err_sys("attr_init failed"); + + ret = pthread_attr_setstack(&myAttr, myStack, stackSize); + if (ret != 0) + err_sys("attr_setstackaddr failed"); + + ret = pthread_create(&threadId, &myAttr, tf, args); + if (ret != 0) { + perror("pthread_create failed"); + exit(EXIT_FAILURE); + } + + ret = pthread_join(threadId, NULL); + if (ret != 0) + err_sys("pthread_join failed"); + + for (i = 0; i < stackSize; i++) { + if (myStack[i] != 0x01) { + break; + } + } + + used = stackSize - i; + printf("stack used = %d\n", used); +} + + +#endif /* HAVE_STACK_SIZE */ + + +#ifdef STACK_TRAP + +/* good settings + --enable-debug --disable-shared C_EXTRA_FLAGS="-DUSER_TIME -DTFM_TIMING_RESISTANT -DPOSITIVE_EXP_ONLY -DSTACK_TRAP" + +*/ + +#ifdef HAVE_STACK_SIZE + /* client only for now, setrlimit will fail if pthread_create() called */ + /* STACK_SIZE does pthread_create() on client */ + #error "can't use STACK_TRAP with STACK_SIZE, setrlimit will fail" +#endif /* HAVE_STACK_SIZE */ + +static INLINE void StackTrap(void) +{ + struct rlimit rl; + if (getrlimit(RLIMIT_STACK, &rl) != 0) + err_sys("getrlimit failed"); + printf("rlim_cur = %llu\n", rl.rlim_cur); + rl.rlim_cur = 1024*21; /* adjust trap size here */ + if (setrlimit(RLIMIT_STACK, &rl) != 0) { + perror("setrlimit"); + err_sys("setrlimit failed"); + } +} + +#else /* STACK_TRAP */ + +static INLINE void StackTrap(void) +{ +} + +#endif /* STACK_TRAP */ + + +#ifdef ATOMIC_USER + +/* Atomic Encrypt Context example */ +typedef struct AtomicEncCtx { + int keySetup; /* have we done key setup yet */ + Aes aes; /* for aes example */ +} AtomicEncCtx; + + +/* Atomic Decrypt Context example */ +typedef struct AtomicDecCtx { + int keySetup; /* have we done key setup yet */ + Aes aes; /* for aes example */ +} AtomicDecCtx; + + +static INLINE int myMacEncryptCb(CYASSL* ssl, unsigned char* macOut, + const unsigned char* macIn, unsigned int macInSz, int macContent, + int macVerify, unsigned char* encOut, const unsigned char* encIn, + unsigned int encSz, void* ctx) +{ + int ret; + Hmac hmac; + byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; + AtomicEncCtx* encCtx = (AtomicEncCtx*)ctx; + const char* tlsStr = "TLS"; + + /* example supports (d)tls aes */ + if (CyaSSL_GetBulkCipher(ssl) != cyassl_aes) { + printf("myMacEncryptCb not using AES\n"); + return -1; + } + + if (strstr(CyaSSL_get_version(ssl), tlsStr) == NULL) { + printf("myMacEncryptCb not using (D)TLS\n"); + return -1; + } + + /* hmac, not needed if aead mode */ + CyaSSL_SetTlsHmacInner(ssl, myInner, macInSz, macContent, macVerify); + + ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), + CyaSSL_GetMacSecret(ssl, macVerify), CyaSSL_GetHmacSize(ssl)); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, macIn, macInSz); + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, macOut); + if (ret != 0) + return ret; + + + /* encrypt setup on first time */ + if (encCtx->keySetup == 0) { + int keyLen = CyaSSL_GetKeySize(ssl); + const byte* key; + const byte* iv; + + if (CyaSSL_GetSide(ssl) == CYASSL_CLIENT_END) { + key = CyaSSL_GetClientWriteKey(ssl); + iv = CyaSSL_GetClientWriteIV(ssl); + } + else { + key = CyaSSL_GetServerWriteKey(ssl); + iv = CyaSSL_GetServerWriteIV(ssl); + } + + ret = AesSetKey(&encCtx->aes, key, keyLen, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("AesSetKey failed in myMacEncryptCb\n"); + return ret; + } + encCtx->keySetup = 1; + } + + /* encrypt */ + return AesCbcEncrypt(&encCtx->aes, encOut, encIn, encSz); +} + + +static INLINE int myDecryptVerifyCb(CYASSL* ssl, + unsigned char* decOut, const unsigned char* decIn, + unsigned int decSz, int macContent, int macVerify, + unsigned int* padSz, void* ctx) +{ + AtomicDecCtx* decCtx = (AtomicDecCtx*)ctx; + int ret = 0; + int macInSz = 0; + int ivExtra = 0; + int digestSz = CyaSSL_GetHmacSize(ssl); + unsigned int pad = 0; + unsigned int padByte = 0; + Hmac hmac; + byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; + byte verify[MAX_DIGEST_SIZE]; + const char* tlsStr = "TLS"; + + /* example supports (d)tls aes */ + if (CyaSSL_GetBulkCipher(ssl) != cyassl_aes) { + printf("myMacEncryptCb not using AES\n"); + return -1; + } + + if (strstr(CyaSSL_get_version(ssl), tlsStr) == NULL) { + printf("myMacEncryptCb not using (D)TLS\n"); + return -1; + } + + /*decrypt */ + if (decCtx->keySetup == 0) { + int keyLen = CyaSSL_GetKeySize(ssl); + const byte* key; + const byte* iv; + + /* decrypt is from other side (peer) */ + if (CyaSSL_GetSide(ssl) == CYASSL_SERVER_END) { + key = CyaSSL_GetClientWriteKey(ssl); + iv = CyaSSL_GetClientWriteIV(ssl); + } + else { + key = CyaSSL_GetServerWriteKey(ssl); + iv = CyaSSL_GetServerWriteIV(ssl); + } + + ret = AesSetKey(&decCtx->aes, key, keyLen, iv, AES_DECRYPTION); + if (ret != 0) { + printf("AesSetKey failed in myDecryptVerifyCb\n"); + return ret; + } + decCtx->keySetup = 1; + } + + /* decrypt */ + ret = AesCbcDecrypt(&decCtx->aes, decOut, decIn, decSz); + + if (CyaSSL_GetCipherType(ssl) == CYASSL_AEAD_TYPE) { + *padSz = CyaSSL_GetAeadMacSize(ssl); + return 0; /* hmac, not needed if aead mode */ + } + + if (CyaSSL_GetCipherType(ssl) == CYASSL_BLOCK_TYPE) { + pad = *(decOut + decSz - 1); + padByte = 1; + if (CyaSSL_IsTLSv1_1(ssl)) + ivExtra = CyaSSL_GetCipherBlockSize(ssl); + } + + *padSz = CyaSSL_GetHmacSize(ssl) + pad + padByte; + macInSz = decSz - ivExtra - digestSz - pad - padByte; + + CyaSSL_SetTlsHmacInner(ssl, myInner, macInSz, macContent, macVerify); + + ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), + CyaSSL_GetMacSecret(ssl, macVerify), digestSz); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, decOut + ivExtra, macInSz); + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, verify); + if (ret != 0) + return ret; + + if (memcmp(verify, decOut + decSz - digestSz - pad - padByte, + digestSz) != 0) { + printf("myDecryptVerify verify failed\n"); + return -1; + } + + return ret; +} + + +static INLINE void SetupAtomicUser(CYASSL_CTX* ctx, CYASSL* ssl) +{ + AtomicEncCtx* encCtx; + AtomicDecCtx* decCtx; + + encCtx = (AtomicEncCtx*)malloc(sizeof(AtomicEncCtx)); + if (encCtx == NULL) + err_sys("AtomicEncCtx malloc failed"); + memset(encCtx, 0, sizeof(AtomicEncCtx)); + + decCtx = (AtomicDecCtx*)malloc(sizeof(AtomicDecCtx)); + if (decCtx == NULL) { + free(encCtx); + err_sys("AtomicDecCtx malloc failed"); + } + memset(decCtx, 0, sizeof(AtomicDecCtx)); + + CyaSSL_CTX_SetMacEncryptCb(ctx, myMacEncryptCb); + CyaSSL_SetMacEncryptCtx(ssl, encCtx); + + CyaSSL_CTX_SetDecryptVerifyCb(ctx, myDecryptVerifyCb); + CyaSSL_SetDecryptVerifyCtx(ssl, decCtx); +} + + +static INLINE void FreeAtomicUser(CYASSL* ssl) +{ + AtomicEncCtx* encCtx = CyaSSL_GetMacEncryptCtx(ssl); + AtomicDecCtx* decCtx = CyaSSL_GetDecryptVerifyCtx(ssl); + + free(decCtx); + free(encCtx); +} + +#endif /* ATOMIC_USER */ + + +#ifdef HAVE_PK_CALLBACKS + +#ifdef HAVE_ECC + +static INLINE int myEccSign(CYASSL* ssl, const byte* in, word32 inSz, + byte* out, word32* outSz, const byte* key, word32 keySz, void* ctx) +{ + RNG rng; + int ret; + word32 idx = 0; + ecc_key myKey; + + (void)ssl; + (void)ctx; + + ret = InitRng(&rng); + if (ret != 0) + return ret; + + ecc_init(&myKey); + + ret = EccPrivateKeyDecode(key, &idx, &myKey, keySz); + if (ret == 0) + ret = ecc_sign_hash(in, inSz, out, outSz, &rng, &myKey); + ecc_free(&myKey); + + return ret; +} + + +static INLINE int myEccVerify(CYASSL* ssl, const byte* sig, word32 sigSz, + const byte* hash, word32 hashSz, const byte* key, word32 keySz, + int* result, void* ctx) +{ + int ret; + ecc_key myKey; + + (void)ssl; + (void)ctx; + + ecc_init(&myKey); + + ret = ecc_import_x963(key, keySz, &myKey); + if (ret == 0) + ret = ecc_verify_hash(sig, sigSz, hash, hashSz, result, &myKey); + ecc_free(&myKey); + + return ret; +} + +#endif /* HAVE_ECC */ + +#ifndef NO_RSA + +static INLINE int myRsaSign(CYASSL* ssl, const byte* in, word32 inSz, + byte* out, word32* outSz, const byte* key, word32 keySz, void* ctx) +{ + RNG rng; + int ret; + word32 idx = 0; + RsaKey myKey; + + (void)ssl; + (void)ctx; + + ret = InitRng(&rng); + if (ret != 0) + return ret; + + InitRsaKey(&myKey, NULL); + + ret = RsaPrivateKeyDecode(key, &idx, &myKey, keySz); + if (ret == 0) + ret = RsaSSL_Sign(in, inSz, out, *outSz, &myKey, &rng); + if (ret > 0) { /* save and convert to 0 success */ + *outSz = ret; + ret = 0; + } + FreeRsaKey(&myKey); + + return ret; +} + + +static INLINE int myRsaVerify(CYASSL* ssl, byte* sig, word32 sigSz, + byte** out, + const byte* key, word32 keySz, + void* ctx) +{ + int ret; + word32 idx = 0; + RsaKey myKey; + + (void)ssl; + (void)ctx; + + InitRsaKey(&myKey, NULL); + + ret = RsaPublicKeyDecode(key, &idx, &myKey, keySz); + if (ret == 0) + ret = RsaSSL_VerifyInline(sig, sigSz, out, &myKey); + FreeRsaKey(&myKey); + + return ret; +} + + +static INLINE int myRsaEnc(CYASSL* ssl, const byte* in, word32 inSz, + byte* out, word32* outSz, const byte* key, + word32 keySz, void* ctx) +{ + int ret; + word32 idx = 0; + RsaKey myKey; + RNG rng; + + (void)ssl; + (void)ctx; + + ret = InitRng(&rng); + if (ret != 0) + return ret; + + InitRsaKey(&myKey, NULL); + + ret = RsaPublicKeyDecode(key, &idx, &myKey, keySz); + if (ret == 0) { + ret = RsaPublicEncrypt(in, inSz, out, *outSz, &myKey, &rng); + if (ret > 0) { + *outSz = ret; + ret = 0; /* reset to success */ + } + } + FreeRsaKey(&myKey); + + return ret; +} + +static INLINE int myRsaDec(CYASSL* ssl, byte* in, word32 inSz, + byte** out, + const byte* key, word32 keySz, void* ctx) +{ + int ret; + word32 idx = 0; + RsaKey myKey; + + (void)ssl; + (void)ctx; + + InitRsaKey(&myKey, NULL); + + ret = RsaPrivateKeyDecode(key, &idx, &myKey, keySz); + if (ret == 0) { + ret = RsaPrivateDecryptInline(in, inSz, out, &myKey); + } + FreeRsaKey(&myKey); + + return ret; +} + +#endif /* NO_RSA */ + +static INLINE void SetupPkCallbacks(CYASSL_CTX* ctx, CYASSL* ssl) +{ + (void)ctx; + (void)ssl; + + #ifdef HAVE_ECC + CyaSSL_CTX_SetEccSignCb(ctx, myEccSign); + CyaSSL_CTX_SetEccVerifyCb(ctx, myEccVerify); + #endif /* HAVE_ECC */ + #ifndef NO_RSA + CyaSSL_CTX_SetRsaSignCb(ctx, myRsaSign); + CyaSSL_CTX_SetRsaVerifyCb(ctx, myRsaVerify); + CyaSSL_CTX_SetRsaEncCb(ctx, myRsaEnc); + CyaSSL_CTX_SetRsaDecCb(ctx, myRsaDec); + #endif /* NO_RSA */ +} + +#endif /* HAVE_PK_CALLBACKS */ + + + + + +#if defined(__hpux__) || defined(__MINGW32__) + +/* HP/UX doesn't have strsep, needed by test/suites.c */ +static INLINE char* strsep(char **stringp, const char *delim) +{ + char* start; + char* end; + + start = *stringp; + if (start == NULL) + return NULL; + + if ((end = strpbrk(start, delim))) { + *end++ = '\0'; + *stringp = end; + } else { + *stringp = NULL; + } + + return start; +} + +#endif /* __hpux__ */ + +#endif /* CyaSSL_TEST_H */ + diff --git a/project1/cyassl-3.0.0/cyassl/version.h b/project1/cyassl-3.0.0/cyassl/version.h new file mode 100644 index 00000000..9df3246e --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/version.h @@ -0,0 +1,35 @@ +/* cyassl_version.h.in + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#define LIBCYASSL_VERSION_STRING "3.0.0" +#define LIBCYASSL_VERSION_HEX 0x03000000 + +#ifdef __cplusplus +} +#endif + diff --git a/project1/cyassl-3.0.0/cyassl/version.h.in b/project1/cyassl-3.0.0/cyassl/version.h.in new file mode 100644 index 00000000..ee1d639c --- /dev/null +++ b/project1/cyassl-3.0.0/cyassl/version.h.in @@ -0,0 +1,35 @@ +/* cyassl_version.h.in + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#define LIBCYASSL_VERSION_STRING "@VERSION@" +#define LIBCYASSL_VERSION_HEX @HEX_VERSION@ + +#ifdef __cplusplus +} +#endif + diff --git a/project1/cyassl-3.0.0/doc/README.txt b/project1/cyassl-3.0.0/doc/README.txt new file mode 100644 index 00000000..d9b367be --- /dev/null +++ b/project1/cyassl-3.0.0/doc/README.txt @@ -0,0 +1,3 @@ +The CyaSSL manual is availalbe at: +http://www.yassl.com/documentation/CyaSSL-Manual.pdf + diff --git a/project1/cyassl-3.0.0/doc/include.am b/project1/cyassl-3.0.0/doc/include.am new file mode 100644 index 00000000..5bef623a --- /dev/null +++ b/project1/cyassl-3.0.0/doc/include.am @@ -0,0 +1,5 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +dist_doc_DATA+= doc/README.txt diff --git a/project1/cyassl-3.0.0/examples/client/.deps/.dirstamp b/project1/cyassl-3.0.0/examples/client/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/examples/client/.deps/client.Po b/project1/cyassl-3.0.0/examples/client/.deps/client.Po new file mode 100644 index 00000000..dbdd956e --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/.deps/client.Po @@ -0,0 +1,268 @@ +examples/client/client.o: examples/client/client.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h cyassl/ssl.h \ + cyassl/version.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po b/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po new file mode 100644 index 00000000..2245eca4 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po @@ -0,0 +1,269 @@ +examples/client/tests_unit_test-client.o: examples/client/client.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/stdc-predef.h \ + /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po b/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po new file mode 100644 index 00000000..0b86e257 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po @@ -0,0 +1,269 @@ +examples/client/testsuite_testsuite_test-client.o: \ + examples/client/client.c config.h cyassl/ctaocrypt/settings.h \ + cyassl/ctaocrypt/visibility.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.dirstamp b/project1/cyassl-3.0.0/examples/client/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/examples/client/.libs/client b/project1/cyassl-3.0.0/examples/client/.libs/client new file mode 100755 index 0000000000000000000000000000000000000000..bd93ed2c06ec441db6dccf85cabf6a2dcff29b44 GIT binary patch literal 23479 zcmeHve|%KMx%UJXTou@e)Eki2V_h^@5)z0s2Gj(?FO8Uzh*YhcO|r?RY)mZo<1ZSlb>HuI=1lhF z7~9YLdH;JqJusR1&hyMO&pb2p%sFT0%q=UMR+W^L2z^ZwlLb-qD=v2p;+@MCrA8Ry zR8cNICe9X9kwsd~R`4JgD8MiUc`k&>2(7@a+gxsjGl3aML$(Zvgg{w_Sr-ez!1AJ0 z(MK*7V&oZ@o1u1+5E~I#FX>2%_dtISGzKk{bk@NTL`6Z=&Cm$UplQv2G&|dBg=pLB zax-{AW6<Ls3)B0tBgk~7bzOclD>M~ z)%dI0L78O;EISKBk zKzgc!{!@p3^BnSfY~`unmmKAnIq>%#_?Sc9We$A3qkUONeU%P*a~!zWA@6gJ^7lIA z?{e_p>Y)F|VUN=t_3d=fyB&C`t$qXPZ#c>yv(ahKuQ_nRq2FGIeEK_mvHVpUAT|&l zvtiPk9rfoN<+nNLXE^Bp>A=5s=vU^@FYb_c2)O)b@ZGpd;Q@aQyk-o~79)_?`E8e* z#m*2O@ys~>*}{eTkAG2>pD9ik!>F$j{FFCSz}>+Icl7(?@em#GMZ&kX^-5o7AQtHE ziJO5~>y;})k#L~Z-yRAGpRc<&686PSf6VmxgzxgrzV#O0iV#Eu;;Q(Bg;(_ZTbo)o zSNj(EIzl~xu<7d!n88S=0HLL&$rldXsFU3R(-(-vA~BuOX@=rH=5{1vF%~s@dIOP! zX{YP-iq?(3I9N9aVm)2`IyV;Z%bFUM4&ycO^@MxIWOYQs;Xub2q_|MT-)YH1y2Eew zM8a_`nG6oyQFR|3|tZD_jUDPC|H`c1k8qzG)W{jW|6fvYpw_d{NY4Y^Ro{zOzhUtHFN}GW=~fS ztQ+uk1gVF;A~gacALw~DbpnBQlgEPzvomsISU_O7$F7MUP0ECtLXnAhPq^C`j)dFM zxJ{&31Ls2q@9KbgRr_Z#Y+8D5lEzWPta`$szIpM4*|JlL-Db7Q7Yo4tW1YEj{dzSu zFbiYQk<+)AGj|D7Q8UPaPFy8ALXmhtbajNykeuX-%eVF_6zzn0rPw%{7cfPj4-)_q zV;#Ymi1&1d{UO3|N3>r=6J}h*10ha|-as!oqNv*JB1b3?W`zHuBiPv!6Fp&=&)?Y@ zle{PnbFz|16s7$fD{vznW`8u`Yv*JV7!tuq+-&cc!w#t9#!hC+Dc;rT?-zbE(j(%b zKp@JhI(nm!K(A#vB92+%3v~KTKM3vdxXMRXxKpfdTDyFOZxPI)Q;X^O=yWH^zdEgR zHC9xcb0&kl##4y+EMTWu0Ff@QVvTeiEXCl$-EQ$8?|n6uQ>m+0hi zl|b$*7M=J^Nq31n=q#i7CynvH_pHl3^;{vQ9dWr&!Fo{27|P6I3^`?tQFbn4JX{!z zPr@PgvI&<6pGhTuIXWWSXXS@>q&v+I3pYdw+KjSq*v?Pzaa}Q!bY&&o|#AK516$*ucA#+M@ zDn?E6arboxMBySAYAeih<1cCyg?ZDE3No2L2KK_dQex8bMEO8BSGjYAdwZt2V zt0Z1V+(v9jTu;mf5I0Nw5OFhcy~KNo zHxgG#{3vl7u_5sgagexF;>U@j#6sdHiTj90I6vk+O}v%(n8Zhjw-X3#6uDv zCBB<@kHjw!?7rQSEv7&JYIIlGZgC#8R~|4-+X9QoO3qU692Wx=28g6T%DOBeq6;RERt*+;QbV9mLN0z~3WDc_yj z0+Sq^!n~5hZ$YzvAAQEntf1_!Thxn{$*Kuo*5hZ?l zWy#f?&3s4E%0Oeq0`Z!A3xxvWD)J&Wt$2$SW9^mswN{L^P~weNyugxEZ(*!mpx3)0 zwJU-Cz=_1!hmwtCCr6Tb1ds90uqX2fNdpCQ%GS$7qG_q=ZS!P*=tk2U zy`jvqJzFoU@C-bPJD#n#ln77iyGUh|e`d>I>GU#hZrw>PfS%NKxXW3cmeN+GWzE@0 zN%}!b|H3KT8@+v=$41jz&^yUV$52{z4#!7s2RermRphFp|Hqj z6sVV?ZdQQi7Wsb$7%No{)a3SJ`2sT!)~QSC(E}q(Q6cN~>rWY&K8^QvOuj zP=dKeGEYSg0AHSq{7HBNfQ=FyS73_-F98%=x{t#jgEBel@_g=bkn)e>CKe?Z$cB9v zImtr7Gw=X&_>ca0%|04<%)*AoNgDc9BdiV-sXb z+8U|!8_E5Xk|(ElKL2anrDsx^;7h8fb6at zQ5B|si6Kk{{&E6}92zKiQb&-35!VRs^by!c4)|9=O^%j$1|9+(1nFAyhBNzYY|{-Hyf2JKmw$vM?3>2SO$hNrq@i&gN$+; zD;uBlLVK{XKF`2p<-DD zmNz{YD#DwdGa9{Z65b9z2{%H(7k>>UtB0UT-@vP$Ylb}Y6@TKKu0tv{iS~+i?H_V? zrBmM9P&oeu{P8^YFCw>?))6Nf`$}AiPkeZR^a5}0ZgdICv-07M%=o6&M>9G9)=bOP zmu3W9u$x9fYsiS!r)*#D5{i!Vc%eUm9-#! zshHDUq6wcyJ&kf1oixOe+d(*S=N%TKbS}oh4IRn+$2F-;# zq-`M}qXe+%^-{=%s0R7KpUy-fJe!RC4w|^UQno910oo6JWRrdasn!CF6%9>i2QbQg z2bA<{Qh&DN2@Jwi2OhgsPxe?N@)%gF4|BYqL(5~ldmg(q_kCEP`milkA6- zG}iD;Xi2N_vKX@|?=c|GO^ms*0sIH5VslNLQ+jH3QzCutb`N?ST;rxz`VA~e6q!vn z@a_TRZ1O+;fE1d4d<0@$UNl_f24TfwYxB+UI8cw4;bpI!S-SE+K`~YNZMem7Rz3}t zLkOoN3!!n=?EIS(dMdOU7_toF+1?1jD9P@WW>HRB&g&OYJLmNRu;_Vw6nPlbUSa+d zq9$RMW*WV`agek8a%hC?T47$R>?@6xI}cSlyg!%Y+%VWt!S*{)!E^!hLJpTJHk8gN z_mstO3pL2+-UrL@8T1zWU$@-IsY5`WDmUXdzmuX3teC(HOv_J74(GSdR=j~ zF}I!qx8SbVtj#9d{-{_Vfxv9?0Q~_QsBX*g@=E0VU_Y4h24!dAww#%nE#74?lRIrH zWBe987ms=dj>3;-AN9Tm7R!q4?yD%~PqKYCUwJU)B3aV2$v2b(%I$v5(kU@>c=Z?y ze5ACea;#&b?vtW!IXe8&fua7{mh~w!_kFY?IXcNRa2^yv8*6Z@gJ_E|t2vRI(S}U| z2|fX|<6Sh`nX6W&TqZljYR_~U5Qh8+YC?V!I$nCkI}~rLT%P0&CzNVs)v}g^n}zm} z32_->6zrqT?|~qxk0&(`-7UF2sc)j7o;BCP0+#RGifnjE+|dlYYOe7-mJqouD6br6 zw8RCU2Jy3{6+EdFT@o)DQ5NK8??ll>TpQ1ZFK@ z{sD4WHySXUL$%+5)1lhU$fCQ=W9UP*+fisD)lQjMwL!2e)ow$|lR9XrcGyx)DAg!6 z|9#}qxgg?|#q37JAq?}iq9GhKa)$p2_9XyWdKbInlk?>u7OU-NL1S=@b9{rx;rND8 zEW4@%D|K61-h3B5oG07M#gbmVagR$q73Hr*R_+&+X5F{kgvLTsYR${83bQoZAE0Jh zs*-_*PF1Er6$qKg4ayli@qJCppWJo1BleK0gJ|0NG?M zlkej8HJj{V@^zWKhRK&@az5@5^1qVFEzEsJCO^g812WmgakL7>K%5RnVKOW0JVC659`K7N|`beuZTWF6&Q44)tqMa7HU7{fi-73+Dh596_ zhh(<#vl2xubiG77EwoOeAq&+@G-9DeKuP|Fqh2w}5&H}}aY4>9c-aN$WOVR-t_+cC(qfRKf7dqw!Q?$oxA_!6g=FPXCLzNooKQ!DdElzP*?bn0fSY!yy@ZG z=TK1wFKHBF{|pT6qpF@Y`yr+Z-CILgJ+#k2lzuDy(tB?`m}&KvXF^`@sk?8dbc>iZ zy|w8-gM4b}_F9mQECfJEDcV0ReLZ~Ci>PWYs?y5`6sU$BP$k=9E`$@B50>&wlh-@2 zBSqQ!;KD@WBV)NusapAlC^4z}@QMAC66=yD;V$n66IiTfWYN5Vp&zrPCsk6gw=gD2 z=B6U^F<1c3I{hm=y$-kF)^GvtYoVB%WA-G}FT=wdM>(VkCxn| z_j%Wrx{DIfMXAGy)3-g&u2-&SfD;yiT-gEZfdgXtF_bNz40JZE(1KUed<4-W;iW->9VG2FJrY_@p&cpBVaIB*+qYKoak1Y=!g`ZSU)_YDDiBE z#7#*qx%-st+$pdq?x;VmTxN)zXy_RzYuDt< z;KH~pCG8z_Wv&z%7!76H9;fkdxb6Uc8%Q26)x8ir552I(YgC`W8}3W8t7XAuvMRGO zU7L-TrlYQcT*^uw;rqqOkI3an{$2VAN5ST)X&I+Sl8={SNF1;`U^nGMAJ}(RX3a=) zXk>my3V?nIv|-GdB#+P4I{o6~Ql}cJ(`A-UyOfctCekUBq{x!dw2YS~Ev;mX%BxWM zMR@;Eoe7Ry{8!KNzskW{KZ2+Xmgb{UZZ>q8{~*QCSZQeYOO9$ZX|5dQ_Me9aufC?b zu%RXQ1bSxMfqBpt%EKX4Wxw|}=1A@&7RPLI1j+da_rE_0HD929CxYl&ERCqwjbshg zDBS)C8Iy-fF8*`kCDeA^4ZhDD7@j_8zur1v{jT03Yy951s8Rlq&N+*VOA+^V@YxvAK^iS?;`9&7(xgJ zuy@GlkUJG&yANEkKs?cl4N+q(H{N(-rP|ln5$P3`3%S26zOchz!9-;=V9S%+5kEA4 zQ=nh6U)J53i1)6GnO%KXHwWvYb(`x#bq#eLb(`wi>uzePYpQFFTvaEck(gwj;}TH5T@SI|F@{L9;hxtZ8j+URYgO zHT|^drwQsHcS>pvS^_b2m4R^;#ct04YK91F+aovGX+FN?*u>&wO~9g73yS5LIbMwF zD$y8dPjrj**jfkkh|0=^>c84a$B{8FZb>^$m=V(-G7Lj*w~Vt@7l#tX?B)GtAa0Ch zN1+p#4M(=M;nA5*<*i|9^u%RDnPrW%cmn%Jb-vtAC`YW-OqIcbX=SJ#g=2abxBnTf zE1G@lu4-J_)bQysayVjOc*iixA~6g|>|r%KqK5AFaf88Vv2QlDB*=1R%#U%7y@`=n zzmRj@klTkFcDdXy?5Y>x5Sy_dD)dHQRM-be` zW#fEsXHO?Rl-#WfKP9*L8aBL|$?dTm5DEdXN}n^e0EOxnsy z?5VT7+hVF>th=gpWgVx2YBhOjAnv-GA;=VsMYahWy=MnNDHU0}#ftcDrHh)-}A z_IQOVLdG)eHkBh`h1_B-UG5lDMSHQ^mj}Wf!Crq1eIf^s)ei0wmyTD}gl+TKNUN_3 z%vOC}4d)n*1&o%UKNjeu(~XM?Q&SD2RgQ0~VQQE|md7%#e+Z4n(VC-=bZ-D{3c?8!Sd=err zu89J>lezZrw==GT{1pkGh=|8`xa98FM-k)G68`WnzoBQ0mokwM^6`2#!m{{TGxBss zwF&V5>XP5jTP4o_lFPjWVHLs#gf4{52)82KiSPiz!w3fvo=12E;RM3eL6`e1g!2)W zAgn^zfY61o8R1rhI}sj0co^Xz!t)5PAe=y$`el?yI3HmN!YYIf2we!95pG4e6X5}b zhY=1UJdf}S!U=?_x1l`3`3Or8Rv~Oa=t9_xa4W){2oE4UjBpU)d4yLGP9RLhSqEn! zoR6>sVHLs#gf0Ya%+)Ja)EVVhwiH@|Sk#V?ANO+l!Ediwa5&@YgWK7<=%=sWa9US2mK==smN|1^Yu z4SBj=mS@<6K!3qBeMSgQtr=<7%RDXmCZw_POy<$&JPJMzel3rD#7P9rM<4Y#_~^UH zM}MjLb|6h%Sr5O{K92psw7tG`y`M*h<|~CSDaCf^HcbSLHX-C@RL#e;Nuuc7pVI+b z7x{Sc=P1obpWTROZ2f#ex)x1ak&iZL1792X1Rb??X?YI-kMZ%m5Ik^rH4|bj?;#ss z3VbQ>4Nk!K81i5W*~jvHlS_*-$gbr*g)~ed`MAcs{ULnMgNOQY%tuS?3oXCSRFt;1iDL3vdcfqXH|WYI|HI!amk`d9ExCBeFMk}=1C zzM5BK%waC!vr9P_Sue)|$Glx$+j=3cVWxFyc^cbe`Xl1WQgd}Kjl!yC`WJ;&4fG=l zt5(xrD6D29{er@(_w?F7S$Zrr&lO#=3C?GQmBO623abIH&rz5xJrvrDd8p`|(dsN9 zg?T4bJZE9D9LYk?A4TVg1;+SSSj{5N2Zh-y>K;nrnG$n+E37;=$Fag{=IVQt$=00{ z$EBj5CCkh4htyg}@is@M7SA4fFTTeKx!j_>ONB^<4+N)<(Yu_21Jo*l-VUosB;R{H%@s zKY)K?!ztha8-Et~D>i%H3H;r=i}l?Hyw8Sr0T0>mcYyD=VQvMv*M<)OKWM{G1NVJf z%lC-?0uKJ~B7PBgE3kon!8clB1o*jKF83n1296KzBYSZEWg5mKW)PX=n3GRnD4aT%t_Nl23Y$S1LxM9G&vWwUv%(Yg8t44Crj9JtAWZvb9k&Brq) z%@*AbdJ34I6#J#T>Ed<={eL>}4;}cR1OF0ujn%$V_>UJH^w%7?1P@odKS%X)KDvQ< zf34f=0oE7Wdp>ZLtvw5Yi{pE?SnA+k1w7?J^*qM;aD{{3=D>Xp{3Qpz&w=@ktiGt< zQx5!F8#X|H!-mOUB3q6GF5>A9T;af%Iq-T1jsk0YaC~jC(GAGI(}r2!*B$r=4*ZM* z|F;9b3#{)4d9Iec@r7Jolt06E&r5uc17GUEq66Dg%tTjLB@f8Ce8qZS)7q9+oU&Cs zi_2&B;@}{h#uXR(ge_Z^563t8xP1CoqPMpnMQli(lr@eu(C23j*jXbts#p;kQQ5S7d6lo)iWhxS zCu()#Vk@z@N+&e);zc@Vu};+J#6>!>L?^W58ZD70vn&JtbM5?$94UDpy;ae3?7Dj#`df;`GRKJ3ykD|_SJ0>5W2=h;&D{SZHW z`&L+|j>(^TSMk6wnYvP)m?YEd0}5O%f2{89$F?CHs#F=~yQWAYc4eTqg}*T4s3SY7 z9)}i4ljBaO`6_Fyt2>3S@zd)Xu3WnUTsDe43r_e}H(j;7 zp~-jEs#Ps3TYaq!%bQmEL~-j!eZ4+?i9=AH-P93Jj609(?;Hb$7kc<_mjj5SpzJx; z<{ZbtS%3RLyS~~bl`y0)+Tk;UiSVY%_CCS4Yt|W3>Y%F$Dq$JN@nJl3YywVeGl1SY z1fw`l7vrH?(SCbT+hEZrTUm{xnQW)c5mKVss-q5pQ^$AN#o5Y|8E-RrG9H>RcE*;S zTb{HvE<>LEWzVq$uH`{*9X$5SP8`>*@>g)(_7?jF9%lZnQ__5nqvP1r4?T!)!ejj` zE#)q_iO#lTAL=)|7B929I<14s#x=@k9~C$eZ9H+@xrjVWZ9KU%9`OaS1+RE;9$TXi zsr!(l(;YR9pT86)9hTfsVU!M%e`H8 z2FpsTou}Q=gXz{VO*5(k9OWTw9N@umV+0!VY&pAZeQH}*)ECqzL4M$*JlPIx;X^x$ z2fbNZaazc;;4D1hsfiyrKX1&e)|?xEDCOAMfl!!d`y9mdLlRh7g_SAl#XMXBiig71?+S*t=*>8e+ wS2&K9MB|Hx`q}v{Z)ndNclst9fC(tiF0?b*8iSorA2^P3+>wICa*M_P0Sa(7{Qv*} literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/client/client b/project1/cyassl-3.0.0/examples/client/client new file mode 100755 index 00000000..fd94a2c9 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client @@ -0,0 +1,228 @@ +#! /bin/bash + +# examples/client/client - temporary wrapper script for .libs/client +# Generated by libtool (GNU libtool) 2.4.2 +# +# The examples/client/client program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/client/client.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "client:examples/client/client:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "client:examples/client/client:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "client:examples/client/client:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'client' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj b/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj new file mode 100755 index 00000000..c8910039 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/client/client.c b/project1/cyassl-3.0.0/examples/client/client.c new file mode 100644 index 00000000..a4720165 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client.c @@ -0,0 +1,851 @@ +/* client.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#if defined(CYASSL_MDK_ARM) + #include + #include + #include + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) + /* in case memory tracker wants stats */ + #define CYASSL_TRACK_MEMORY +#endif + +#include +#include + +#include "examples/client/client.h" + + +#ifdef CYASSL_CALLBACKS + int handShakeCB(HandShakeInfo*); + int timeoutCB(TimeoutInfo*); + Timeval timeout; +#endif + + +static void NonBlockingSSL_Connect(CYASSL* ssl) +{ +#ifndef CYASSL_CALLBACKS + int ret = CyaSSL_connect(ssl); +#else + int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); +#endif + int error = CyaSSL_get_error(ssl, 0); + SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); + int select_ret; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... client would read block\n"); + else + printf("... client would write block\n"); + +#ifdef CYASSL_DTLS + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); +#endif + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + #ifndef CYASSL_CALLBACKS + ret = CyaSSL_connect(ssl); + #else + ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); + #endif + error = CyaSSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } +#ifdef CYASSL_DTLS + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } +#endif + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_connect failed"); +} + + +static void Usage(void) +{ + printf("client " LIBCYASSL_VERSION_STRING + " NOTE: All files relative to CyaSSL home dir\n"); + printf("-? Help, print this usage\n"); + printf("-h Host to connect to, default %s\n", yasslIP); + printf("-p Port to connect on, not 0, default %d\n", yasslPort); + printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", + CLIENT_DEFAULT_VERSION); + printf("-l Cipher list\n"); + printf("-c Certificate file, default %s\n", cliCert); + printf("-k Key file, default %s\n", cliKey); + printf("-A Certificate Authority file, default %s\n", caCert); + printf("-b Benchmark connections and print stats\n"); + printf("-s Use pre Shared keys\n"); + printf("-t Track CyaSSL memory use\n"); + printf("-d Disable peer checks\n"); + printf("-g Send server HTTP GET\n"); + printf("-u Use UDP DTLS," + " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); + printf("-m Match domain name in cert\n"); + printf("-N Use Non-blocking sockets\n"); + printf("-r Resume session\n"); + printf("-f Fewer packets/group messages\n"); + printf("-x Disable client cert/key loading\n"); +#ifdef SHOW_SIZES + printf("-z Print structure sizes\n"); +#endif +#ifdef HAVE_SNI + printf("-S Use Host Name Indication\n"); +#endif +#ifdef HAVE_MAX_FRAGMENT + printf("-L Use Maximum Fragment Length [1-5]\n"); +#endif +#ifdef HAVE_TRUNCATED_HMAC + printf("-T Use Truncated HMAC\n"); +#endif +#ifdef HAVE_OCSP + printf("-o Perform OCSP lookup on peer certificate\n"); + printf("-O Perform OCSP lookup using as responder\n"); +#endif +#ifdef ATOMIC_USER + printf("-U Atomic User Record Layer Callbacks\n"); +#endif +#ifdef HAVE_PK_CALLBACKS + printf("-P Public Key Callbacks\n"); +#endif +} + + +#ifdef CYASSL_MDK_SHELL + #define exit(code) return(code) +#endif + + +THREAD_RETURN CYASSL_THREAD client_test(void* args) +{ + SOCKET_T sockfd = 0; + + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + CYASSL* ssl = 0; + + CYASSL* sslResume = 0; + CYASSL_SESSION* session = 0; + char resumeMsg[] = "resuming cyassl!"; + int resumeSz = sizeof(resumeMsg); + + char msg[32] = "hello cyassl!"; /* GET may make bigger */ + char reply[80]; + int input; + int msgSz = (int)strlen(msg); + + word16 port = yasslPort; + char* host = (char*)yasslIP; + char* domain = (char*)"www.yassl.com"; + + int ch; + int version = CLIENT_INVALID_VERSION; + int usePsk = 0; + int sendGET = 0; + int benchmark = 0; + int doDTLS = 0; + int matchName = 0; + int doPeerCheck = 1; + int nonBlocking = 0; + int resumeSession = 0; + int trackMemory = 0; + int useClientCert = 1; + int fewerPackets = 0; + int atomicUser = 0; + int pkCallbacks = 0; + char* cipherList = NULL; + char* verifyCert = (char*)caCert; + char* ourCert = (char*)cliCert; + char* ourKey = (char*)cliKey; + +#ifdef HAVE_SNI + char* sniHostName = NULL; +#endif +#ifdef HAVE_MAX_FRAGMENT + byte maxFragment = 0; +#endif +#ifdef HAVE_TRUNCATED_HMAC + byte truncatedHMAC = 0; +#endif + + +#ifdef HAVE_OCSP + int useOcsp = 0; + char* ocspUrl = NULL; +#endif + + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef NO_RSA + verifyCert = (char*)eccCert; + ourCert = (char*)cliEccCert; + ourKey = (char*)cliEccKey; +#endif + (void)resumeSz; + (void)session; + (void)sslResume; + (void)trackMemory; + (void)atomicUser; + (void)pkCallbacks; + + StackTrap(); + + while ((ch = mygetopt(argc, argv, + "?gdusmNrtfxUPh:p:v:l:A:c:k:b:zS:L:ToO:")) != -1) { + switch (ch) { + case '?' : + Usage(); + exit(EXIT_SUCCESS); + + case 'g' : + sendGET = 1; + break; + + case 'd' : + doPeerCheck = 0; + break; + + case 'u' : + doDTLS = 1; + break; + + case 's' : + usePsk = 1; + break; + + case 't' : + #ifdef USE_CYASSL_MEMORY + trackMemory = 1; + #endif + break; + + case 'm' : + matchName = 1; + break; + + case 'x' : + useClientCert = 0; + break; + + case 'f' : + fewerPackets = 1; + break; + + case 'U' : + #ifdef ATOMIC_USER + atomicUser = 1; + #endif + break; + + case 'P' : + #ifdef HAVE_PK_CALLBACKS + pkCallbacks = 1; + #endif + break; + + case 'h' : + host = myoptarg; + domain = myoptarg; + break; + + case 'p' : + port = (word16)atoi(myoptarg); + #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) + if (port == 0) + err_sys("port number cannot be 0"); + #endif + break; + + case 'v' : + version = atoi(myoptarg); + if (version < 0 || version > 3) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'l' : + cipherList = myoptarg; + break; + + case 'A' : + verifyCert = myoptarg; + break; + + case 'c' : + ourCert = myoptarg; + break; + + case 'k' : + ourKey = myoptarg; + break; + + case 'b' : + benchmark = atoi(myoptarg); + if (benchmark < 0 || benchmark > 1000000) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'N' : + nonBlocking = 1; + break; + + case 'r' : + resumeSession = 1; + break; + + case 'z' : + #ifndef CYASSL_LEANPSK + CyaSSL_GetObjectSize(); + #endif + break; + + case 'S' : + #ifdef HAVE_SNI + sniHostName = myoptarg; + #endif + break; + + case 'L' : + #ifdef HAVE_MAX_FRAGMENT + maxFragment = atoi(myoptarg); + if (maxFragment < CYASSL_MFL_2_9 || + maxFragment > CYASSL_MFL_2_13) { + Usage(); + exit(MY_EX_USAGE); + } + #endif + break; + + case 'T' : + #ifdef HAVE_TRUNCATED_HMAC + truncatedHMAC = 1; + #endif + break; + + case 'o' : + #ifdef HAVE_OCSP + useOcsp = 1; + #endif + break; + + case 'O' : + #ifdef HAVE_OCSP + useOcsp = 1; + ocspUrl = myoptarg; + #endif + break; + + default: + Usage(); + exit(MY_EX_USAGE); + } + } + + myoptind = 0; /* reset for test cases */ + + /* sort out DTLS versus TLS versions */ + if (version == CLIENT_INVALID_VERSION) { + if (doDTLS) + version = CLIENT_DTLS_DEFAULT_VERSION; + else + version = CLIENT_DEFAULT_VERSION; + } + else { + if (doDTLS) { + if (version == 3) + version = -2; + else + version = -1; + } + } + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + InitMemoryTracker(); +#endif + + switch (version) { +#ifndef NO_OLD_TLS + case 0: + method = CyaSSLv3_client_method(); + break; + + + #ifndef NO_TLS + case 1: + method = CyaTLSv1_client_method(); + break; + + case 2: + method = CyaTLSv1_1_client_method(); + break; + #endif /* NO_TLS */ + +#endif /* NO_OLD_TLS */ + +#ifndef NO_TLS + case 3: + method = CyaTLSv1_2_client_method(); + break; +#endif + +#ifdef CYASSL_DTLS + case -1: + method = CyaDTLSv1_client_method(); + break; + + case -2: + method = CyaDTLSv1_2_client_method(); + break; +#endif + + default: + err_sys("Bad SSL version"); + break; + } + + if (method == NULL) + err_sys("unable to get method"); + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + err_sys("unable to get ctx"); + + if (cipherList) + if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) + err_sys("client can't set cipher list 1"); + +#ifdef CYASSL_LEANPSK + usePsk = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + usePsk = 1; +#endif + + if (fewerPackets) + CyaSSL_CTX_set_group_messages(ctx); + + if (usePsk) { +#ifndef NO_PSK + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + if (cipherList == NULL) { + const char *defaultCipherList; + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); + } +#endif + useClientCert = 0; + } + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + if (cipherList == NULL) { + /* don't use EDH, can't sniff tmp keys */ + if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { + err_sys("client can't set cipher list 3"); + } + } +#endif + +#ifdef HAVE_OCSP + if (useOcsp) { + if (ocspUrl != NULL) { + CyaSSL_CTX_SetOCSP_OverrideURL(ctx, ocspUrl); + CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE + | CYASSL_OCSP_URL_OVERRIDE); + } + else + CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE); + } +#endif + +#ifdef USER_CA_CB + CyaSSL_CTX_SetCACb(ctx, CaCb); +#endif + +#ifdef VERIFY_CALLBACK + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); +#endif +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (useClientCert){ + if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) + err_sys("can't load client cert file, check file and run from" + " CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load client private key file, check file and run " + "from CyaSSL home dir"); + } + + if (!usePsk) { + if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + } +#endif +#if !defined(NO_CERTS) + if (!usePsk && doPeerCheck == 0) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); +#endif + +#ifdef HAVE_CAVIUM + CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); +#endif + +#ifdef HAVE_SNI + if (sniHostName) + if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) + != SSL_SUCCESS) + err_sys("UseSNI failed"); +#endif +#ifdef HAVE_MAX_FRAGMENT + if (maxFragment) + if (CyaSSL_CTX_UseMaxFragment(ctx, maxFragment) != SSL_SUCCESS) + err_sys("UseMaxFragment failed"); +#endif +#ifdef HAVE_TRUNCATED_HMAC + if (truncatedHMAC) + if (CyaSSL_CTX_UseTruncatedHMAC(ctx) != SSL_SUCCESS) + err_sys("UseTruncatedHMAC failed"); +#endif + + if (benchmark) { + /* time passed in number of connects give average */ + int times = benchmark; + int i = 0; + + double start = current_time(), avg; + + for (i = 0; i < times; i++) { + tcp_connect(&sockfd, host, port, doDTLS); + + ssl = CyaSSL_new(ctx); + CyaSSL_set_fd(ssl, sockfd); + if (CyaSSL_connect(ssl) != SSL_SUCCESS) + err_sys("SSL_connect failed"); + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + CloseSocket(sockfd); + } + avg = current_time() - start; + avg /= times; + avg *= 1000; /* milliseconds */ + printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); + + CyaSSL_CTX_free(ctx); + ((func_args*)args)->return_code = 0; + + exit(EXIT_SUCCESS); + } + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) + err_sys("unable to get SSL object"); + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(ssl, sockfd); +#ifdef HAVE_CRL + if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) + err_sys("can't enable crl check"); + if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) + err_sys("can't load crl, check crlfile and date validity"); + if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) + err_sys("can't set crl callback"); +#endif +#ifdef ATOMIC_USER + if (atomicUser) + SetupAtomicUser(ctx, ssl); +#endif +#ifdef HAVE_PK_CALLBACKS + if (pkCallbacks) + SetupPkCallbacks(ctx, ssl); +#endif + if (matchName && doPeerCheck) + CyaSSL_check_domain_name(ssl, domain); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(ssl); + } + else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { + /* see note at top of README */ + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("err = %d, %s\n", err, + CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_connect failed"); + /* if you're getting an error here */ + } +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + showPeer(ssl); + + if (sendGET) { + printf("SSL connect ok, sending GET...\n"); + msgSz = 28; + strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); + msg[msgSz] = '\0'; + } + if (CyaSSL_write(ssl, msg, msgSz) != msgSz) + err_sys("SSL_write failed"); + + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server response: %s\n", reply); + + if (sendGET) { /* get html */ + while (1) { + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("%s\n", reply); + } + else + break; + } + } + } + else if (input < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("CyaSSL_read failed"); + } + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + strncpy(msg, "break", 6); + msgSz = (int)strlen(msg); + /* try to send session close */ + CyaSSL_write(ssl, msg, msgSz); + } + session = CyaSSL_get_session(ssl); + sslResume = CyaSSL_new(ctx); + } +#endif + + if (doDTLS == 0) /* don't send alert after "break" command */ + CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ +#ifdef ATOMIC_USER + if (atomicUser) + FreeAtomicUser(ssl); +#endif + CyaSSL_free(ssl); + CloseSocket(sockfd); + +#ifndef NO_SESSION_CACHE + if (resumeSession) { + if (doDTLS) { + SOCKADDR_IN_T addr; + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + build_addr(&addr, host, port, 1); + CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, host, port, 0); + } + CyaSSL_set_fd(sslResume, sockfd); + CyaSSL_set_session(sslResume, session); + + showPeer(sslResume); +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(sslResume, 1); + tcp_set_nonblocking(&sockfd); + NonBlockingSSL_Connect(sslResume); + } + else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) + err_sys("SSL resume failed"); +#else + timeout.tv_sec = 2; + timeout.tv_usec = 0; + NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ +#endif + + if (CyaSSL_session_reused(sslResume)) + printf("reused session id\n"); + else + printf("didn't reuse session id!!!\n"); + + if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) + err_sys("SSL_write failed"); + + if (nonBlocking) { + /* give server a chance to bounce a message back to client */ + #ifdef USE_WINDOWS_API + Sleep(500); + #else + sleep(1); + #endif + } + + input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server resume response: %s\n", reply); + } + + /* try to send session break */ + CyaSSL_write(sslResume, msg, msgSz); + + CyaSSL_shutdown(sslResume); + CyaSSL_free(sslResume); + CloseSocket(sockfd); + } +#endif /* NO_SESSION_CACHE */ + + CyaSSL_CTX_free(ctx); + + ((func_args*)args)->return_code = 0; + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + ShowMemoryTracker(); +#endif /* USE_CYASSL_MEMORY */ + + return 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) && !defined(STACK_TRAP) + CyaSSL_Debugging_ON(); +#endif + if (CurrentDir("client")) + ChangeDirBack(2); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); + +#ifdef HAVE_STACK_SIZE + StackSizeCheck(&args, client_test); +#else + client_test(&args); +#endif + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + + int myoptind = 0; + char* myoptarg = NULL; + +#endif /* NO_MAIN_DRIVER */ + + + +#ifdef CYASSL_CALLBACKS + + int handShakeCB(HandShakeInfo* info) + { + (void)info; + return 0; + } + + + int timeoutCB(TimeoutInfo* info) + { + (void)info; + return 0; + } + +#endif + diff --git a/project1/cyassl-3.0.0/examples/client/client.h b/project1/cyassl-3.0.0/examples/client/client.h new file mode 100644 index 00000000..61f0e8cc --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client.h @@ -0,0 +1,25 @@ +/* client.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#pragma once + +THREAD_RETURN CYASSL_THREAD client_test(void* args); + diff --git a/project1/cyassl-3.0.0/examples/client/client.o b/project1/cyassl-3.0.0/examples/client/client.o new file mode 100644 index 0000000000000000000000000000000000000000..726aa9a8b9967724088f84175de61699adbf60a6 GIT binary patch literal 18448 zcmeHOeSB2anLdF*Gl-qwS5dKE>!3lCA(I3M0X0AZSOcUaDr$9@%uJGz$;@=-4g{qF z&P>a6h_zO$)>>_~YW=7mwN=!mp;9Q@uC-g+YIoaO*WZ?GuxtGUKgd4Mx#!H>T+*)H z{bT>xtI2bobKdiw_q^vl@4ffju&J$mNkv7)M4_$Ph(a}+xz~kO_3N%UqLkoaQ zLFiae%z1|(Qmibrd)E|~xd5@A?Y(CMlY>R{5GYMAm5frU8e?{`y;RdtDosNh2Nu9( zx5Ff09c6*0!i@^$yiwnzxO4#cYQ<}mo)*PhCAL&T>*&ZNIgjG^SeJh%bMl_-G!}8~ zkzQio9sD)oDL&1n{HQr;^LZlEKHv1N@eDpyiK(}GW5orJY(B5nlYiz&AvSNS5T4v) zD3u*qSYUZ9Kjg_>cC-*n3sT#Xf*g4;QBin++P`?@)>iL;XUBoUMy!stPS)a_iB@SV zHMDV*joyJ~Pp+B8fr{qLoXwvTB4b!)c~L9Pay?RzTGT)zRfPwj2$R#(%#NPxx$aY# zVRp~X?C5;Y7hao!uDPcvRq^8J%S9b5)x*C&B-f#d?ik(+qS{=gU@*^FxX2?s*FK2G z;k&6w_cn%av3j>t@o>>1EmGAr7O9iuvmm8j(-2@C!&lg=rVp>Q)7Ie@tG8G7ZYZ~v ztxER5XZdMp8g_eR2sKLKBdnfXk{tX{PHwd%`z^9jl0SePHq&L<11`_CyU;ZJ%u!Nj zjhxtHsL76wdh++MR?eRF#dhzq?7`bJ$7MHqH;N}Q@aXo5sQ0w}WaL;`XHLl;oanh} z$n%4rWcMCI)oNj0RCsPM`v_JFZm1m0Zn8>3!ao~|0O zvn#nS(j;gvyza@H5Xlb}O|O}m0UgygQO;V6ay(Cd6@-sMddW znt&N@^u`8r-s{m&kh`!f@`mRutKkjL)K>2rNpFOlq^qIey5GV`{}3!0$iL>fc*rx; zlFyvlv&Sk;pudtmJBKQJ3OVl$=sf&I{POJhoMmuPywf^R;mVx-*EQd ziqS=`jumheWx&hPxi4H0Df}6;j1_b`_%So9c9TXKq(usAhiX)58!84`=HuQ|c-ynB z8r$~`PZjPkZ+NbdTO15Gzc)Oqe}eT#Nt^Z8gXXMl(zj4hguw_KcKwW0au$X`J@_TE zt#liZx?OtVN>frd;5{u?AiKO&Xf42>^-e4N7(ti|P1Y+JRT23zME!di@2Ar9hl^ThG2Y-%!Y#=$Fgdk5Kf;Dq4)JVlg<|yNa!R*YNqWq_u7QYsA0s_^ zh52znyD+QZdOkRmb~&n>gn6muUpX6VcZ|*cydBGW=9ZfYvFd{vuX962RFwBbbMed?56&K{WH$)65Gpsx{+I)IJB^m8M3U=C{q3VZ|T zPDO&4r?q03ms}9rd~9xR$HJGgBILT{?MXgxVt!p5T8@&bEOk<=fQ|z;pEn|V%)oL> zX;1E6bhPgpl{+`18d(xgH2K%eWu6@wYhqU7Ojfv%)0BE9%^dV0Y39)BqvbStOXe6V zr=jG@J%QiMX-@&Qb|gG%9lnPW>OljJ`{~dJ*+l`ym))Qbcq;zH~JyQ&ipxfY* z3f!sJSnoaMeC`?Se+v)t%<8R=xUAOUOHsA&1!}WBx4=?b&C6~ItL$P0X-W|mj%Ny# zjF$%Gj{RHDHFSt)YYVi(OY||lq&9lVLwvTWhKPM*V`lAAR%aHC^fI4Zbf(eunp^Gm zoHK5=v~rDdifc@^?1d@iY$*lDX3J00*5Q56qn9IFE@De*o0xdZ;Rqu~jLkW4g*>OA zE39BComFHHO!efCgcfX8*geI*QOD0n*PK+!T=ti2nPK24nPD)XJom5$w33hZn?{wC z(4~}gV8d#>Qpp1m^*m;-Dasc!F3s3U73FK%c=cT8@#>Eox86UrW!HlUlq&+4UH+^! z#PFm8`V?pQy?0B+|11|@Ef-%Z7oRH^pDh=kEEgXt7r#|5-drwjD;Kw*Xss4fpUV1$ z-S8~;g^bj4T9>z|vF=ebnO{~|S1!&d7f&h|J>{Yc#m?;h%6%Mq?75eU`|(CQ-03AL z?(yEU)ilP`mbOBvR>q5Bhb{a6u>NmZ{eRS!-Bo$nv(^#g0w${GkdA8X4lmuee{3Z% zTO8~`P2u;_QP~eGJU8w1r5-2fEcEd1evHyc&a@4&YDNJOJFV(i^n&b&l zW`ck3J3A+2R%8$2AmtVaL1fG{e#oAlTm{aQoK5ChXN{-u65d`%I`L>&gXdahSm7Yd zpN5w=Mme+zUB3qzZ5o%yJf?6U`|=?^wdHQ61}sr-Z|0~iySVgL>apC-fOj}v#=gHtqq(e{BCLLurHO;9$!_>0Z~kLP zc3OhCtfCX%{u7>Zc(9LXn6_mXoqxq;&*Ixac7N5FRoLh?{O{m|`<%h0vLpMzd%i-` zV6v)^bdAbeS;f;lU!3@~ydBBk^PlD|YuynAiG|m*yQ&Zp&pHz@hOdIU?u3tE`fU!Rs*iY@9#%i+!)p`_QxK zLj;*?u;q0b{K!XmRg!L+`2f|>Sp{Vsr!-wgIT~=_p7Sk~g_bY1Nc{g_qAwDQC5+I9 zU^*Q;Z5)53BI!(jG~QbhS-*b0PfGhjiGJam6^f+H^sG>@mIYrjVylZqBXRSu)~}6h zkmBd{hBN8@6)Cf4;KGi+=4A7_=2-K>=1}w6=I-XJI-A>@yAms#MKX~xjd-TNJCZU& z!FW7j8r>12PAm$Bjn2+?V_hVbjwa$F6AyOBB8HhTdLyRMA2It9VMk@i91tOC95tP3 z8fi#|qRBp}jz!a^;TKkYECJCT{ek68*;F4MAGc zm*|fe;b>|cCCOBDUC@jenEU@iS5Wosh(&_w$X_2H#sor%csvq<{7FlHFWLhOc6 znv@o z!sv{ca`r(pkox%CYMKq6%=U2UJSfSS*RKb8UMSUrH5s4>Ek zo?s?s%4ydojRn}k6g4`ypKY>t-6Y zMpt{M-&bGVFmt9uL௪lf7V-rVvq9N`l$O|+H#)@N_$mHmT^p zaTaEfg0KVhjvv#fR`~1Z`s(nXUtqCx1R+4rvyyQ*8fJz{MKajw=}4M6&WMIjJ542P z*$}q1IC8j*G?fDqYil4F4>O%()B1cqq4Qt^Z7^1>>}qS~9+1vSW7JsCjINW})S2AW zIJM`My|FA3OV$|3ao7W9A3{2l4)#XI8dMuI7NpIT41vYvlv@(2?JlqPqDVZ{*B?w_ zF=W)Ju!0BDGVxj?rOlw3F89Ya)z^h^SuzzdI{SjDNSH}CEox2OY8YKIu+_w@_=d@2 z4XzEB{6@737KAjK8f;CzdP`w#e_7x1pc(2j!ioN1G;YL$NRL3?mTgAVt|-fM z{1u6KZ8vh>S_XxcT*}TwzuHt;ewCGoRTQf6d&=!gBJ1IpB(epv(yZQ8B9lbgNHYjZ zI%@~Y^4g!aJM1jp8F|}bAEG#-r2G^)FCXAK+JYwhh9EjQ3-CdR^k z@R^YTQ}EfRADLD7y3=XlL*9z`mae$47O@ywD}3obgt!^(MoHs_e#xmJl?VsTpzvA0 zE#?cQ%_a;Wo7l_m^UrZ`%i$m4_aw;RWkKMWUS5s(-Fc!S0Qs&6qzpc!m99JI3$X?t z8+kCxHp*4vho2b8d1S(Ct4$ZV*2l+h%G>4mK|^0!?m|>h-!ZCz`uNPRFY4gWQv6Vk zZ_2!Gfm}5!)TQ+;2Di^cEP+0B;ymaBJ&zR1?5?(s7&=LatLZFtv5i073bkB|A;bbb zDYVg6${nS!4#;cc>6Wi7X30>F?jq{zr;xK>x(y*#@*UeLx5Xx?<*-a8pRoDvGq7%W zxx=56h->h}`O?M){MgJEE>wJtj#Zb|r@2OZy-WOMlwVSKa!dUcSedT^PsI<{oBUch z`CXLT6fc7Fe1YF^*nT7UR&d54`5y3Rz>igY00#dYyjJns(f$Fr<+n<)1N?ZbryhSJ z*6eifQE z6S&rQ68Iq-e;@t2@pGo?&+l=^W1+Qt4S0>6WB!Z5^?ZB4F9O&8c?t4yaP7ZWz&F|W zZ1C&BJ!-sj!S4WP3~+vzfEQ5K`Z~aOpk4cODL6kO=<$Q#{|2ttdkE`ag&#fs(Qx!> z;5ADB3E<1YxuzWNRPfEF?aNA0hxQ+#PRH9k@ONx{5%^i~fo{JN_B@LI zIzIS0>I$^OL^<9!fI)D*UMa}$MxCDDRp2jzYkzzf<#L{?5R(zhr^g@}URkM*>! z3UM*`^)}9<({jG45ch$9lE%oZLOcpS%f<)6_u2aY3_NOUUju%-tvv<)gpGd{{B0Y5 z7W{l$|LNc}xcF-P9QaE%dH%`9VjEupzQx9`2LDGJZvhY3_+0Q+Hhu><<5`dQ0~Ah2 zo#u~0b`jQ7^M3|E-^Skp@38UDf;Zau3h-JRzX5!{jpMdpyC#X#!MK;LYm%5zvV}EA zh&J?pUA2<;qg)9Y16TpRLbd7mo`87abuxY`aOZjtv1Ooa#gkhkz+1qrcyfymA-@KE z9)2i43GsU;%Cw8T8vJ>bt^MZ~7l6~ACe_{v&I4LQ@yozFz`crxz&G34*Mi>(ewu1e zgFg?>9LMpl1~)M0GZfE)cYx1Oya>J-T+i<-;CF)a{>J{dfjO8!TD?96TQDDpd3Q7tcQ*X(D({$<6l|&p@w`vIRDnNTk&6k^Y1b5Qv7zT z^&vPrf_lpT4)tgj41o&#J{o$t-kP5bj@xUA&jhC}x_vG5OcVR8{Mb5ti&=>g(2XArkT@Ide@GBgA zQ+cz>b-G9GH;&2ie#nBl$fr8w57?HB?Ry>bS?b{X7{BVG{7wgd%fat*^zU)-*$#i+ z>)>}e^gZclKheQ`4*fSc+Fy0>c@FtsIND!vv|r@ld58RMj(GVO2mjE)pLXyj?OY)J z`zObGpYK?&q+>l(4*Sk<@LL@G0|&p!q3;w2A9dLCTL*vJ!LM`lpXji^$1&e64tv%+ z{QE~oJe=&1KhD8_>ga#8qx~(%_?sNO&tbpycR!X8*Jrk)T|@?g{mEDap9$oty8>TG z_}UkDoL?8H(*+#7ONjuETTKyI+P-qp!uG(*B}+Qnx&mDb7qzzqAZnArD>)B`m#2FL z4sb%r4UXo1G~jJI7Kx*Q@6`lOMH&Yi6afJKYy0<0%C&eMm}OC#n=dHmfOy(%L5 zH{i?_hu$dQI|ItTxI7q;gUoH@prQVx(%C4D>q{w}^>eN6!Bnpvg~NTSOSwXhOG9O0 zt}e_GIGT-W)~E{g^HiaMGhmN;93;p>15OYu9lEKJ)22*=R^L!kU+Sf&-cSwfvLqFWSf%Awtvb~obFeHDnbh(~ej zJ=euLCJWRDR7j}LJ(jg|{5Fws1sc`bu4@=q!R#is%ageA+huH6?f!8k=G2unIE_@^ zS=_Zc5Ra@^mIO#~s2{Mt4g~l)%Go3j)&ix2HJctBUIuvHr;fM-p+1}h26)hI*FmWc z>q8XIwhwFO>01DYWzn7u0jwp))XgM;W$`T5cs3;R^5WSjab zpkhL|EIz+uS=*`r1*8qCCwB_0ojX?~GdLHwYW*^jIkY@J)hc*aswC=Vq*8(k<@X&e z#R`4qn~p^yN!`Hd>V}dB8wEO494f|fxZ zwrXbUrrBCpXYSd|SL~z*(0z4RzwY7JI{dnef3}`f+p1O8^aIeuQ)o*kPh+KWKOM|b z>UG~n-PEWDu4i(ljGsf(BAP%+WXrb6-#DSg|-3j7aK$mOjFI8QrP-t}aQ_7d)B5Qy^; zKz`uWJ?H4r7UOepJd+gt*3C&~0PCH5^8MEPpZg-~jLEg#de?U2pt=jsGvuEk{z!;x zfo{C)Z6o4h$IO8Tlj_0G~d{^Z-^NF1}lU4OWg;AjE zLHx;`;`{?P_WPMaKAV%jt8f%Z`3o>d)^`HQw~%98zMHu-LOiGNMTIW|U0)XB&*ZS@ zfI_@pNqE4Jg`3GkWTl^5cD;v+&#LL0}MON8Akh_E+9guP!^^$)B1U#t45 zI3D2qd_?GJ1ackQ6lPUB|8vmri;{tDL;;m6Iy+wo7Uf$mRWpOItS zZxC;Veqs*iI&8;58UHyi+xL=RBE&DqpBCabfnRucQx3V7n?@;yMA)bVDepUa3s^3Y(LE~Ok|8rIU67dwQ zkE(x*{F6eA5>LmsfMbAXAny`qz&}K<5N8w56k-msPKbrX27C)6HVSbu(S@@~;v^yZ ziO4AfMC`ReAmi;@#On~>tjFGYk{t8dL5`fTmxwicfoQ;=#M6ZM4HklVUxqVW#cRmxVK;H65a+TUSCfYk--^#6kH8O#x03f@9Ti_i z-YdkVieC++pZO=OjQ^X6U&D7P;%%@C=#FB49S`h-ERc3hBi@Aj0`VEFBk@Kd-cvZ` z1n{pSuMnYk0TFr=K*qraBJy&U_3-nTiI3p^0;D}dDmtDjbA$~$czn>A$ z$MXrX8T*4c-};X0o`*a`zEFsliI9Jlcn0@%{1@|5*_!|W literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/client/client.sln b/project1/cyassl-3.0.0/examples/client/client.sln new file mode 100755 index 00000000..3c4bbb12 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{F117DD21-2672-4001-9FF8-8DBEBBFCA380}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Debug|Win32.ActiveCfg = Debug|Win32 + {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Debug|Win32.Build.0 = Debug|Win32 + {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Release|Win32.ActiveCfg = Release|Win32 + {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/examples/client/client.vcproj b/project1/cyassl-3.0.0/examples/client/client.vcproj new file mode 100755 index 00000000..a743bcaf --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/client.vcproj @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/client/include.am b/project1/cyassl-3.0.0/examples/client/include.am new file mode 100644 index 00000000..0d74028c --- /dev/null +++ b/project1/cyassl-3.0.0/examples/client/include.am @@ -0,0 +1,16 @@ +# vim:ft=automake +# All paths should be given relative to the root + +if BUILD_EXAMPLES +noinst_PROGRAMS += examples/client/client +noinst_HEADERS += examples/client/client.h +examples_client_client_SOURCES = examples/client/client.c +examples_client_client_LDADD = src/libcyassl.la +examples_client_client_DEPENDENCIES = src/libcyassl.la +endif +EXTRA_DIST += examples/client/client.sln +EXTRA_DIST += examples/client/client-ntru.vcproj +EXTRA_DIST += examples/client/client.vcproj + +dist_example_DATA+= examples/client/client.c +DISTCLEANFILES+= examples/client/.libs/client diff --git a/project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o b/project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o new file mode 100644 index 0000000000000000000000000000000000000000..f9b9fef4a3d2a7ac25fb25ecfe828b1624441b09 GIT binary patch literal 16512 zcmd^GeSB2Kxt@>(vk<$eh+t6qxg|>3-m;JDzC{*k1wYRm^`|F4GdV7fhFSUwjmGpV$%fY9*8jk0=%ES}(iw z#{D}WwvV+}-ng6Hhtedu2Cr)<l>!5^_IJ7!KCxKN~;&o{jrJVV<{F!=^=ba2UI0~c0!vfn;Vh=Ci5geUV= zlyWZ=oS9o3Lw_S}Hr}yqkkDc$i<+)OH&PZE}UL1Sb>M_U-hk6dg`|1GvgID(x#=cNW!{AtEzL7j z1GZQRy)A8l_S`{F_6T-Sb{LK`Q*)rhYZK+{v?#~(WPcCgDTpbl8L)%eC<1ilMYD%I znPIF2&RldT0OYMbUhT@_8%~^Y8aOEWe<2R8}`hz zO{&=3e&N6sV9BSw*a;47w;10QR6?`*Z4nDeG zS8$CU!HybiDjlq!ilf!+Eum8|8wz4J(kI%0?191<+L+W7*hyht*0wv*?k(=s(W&+t zuF77Qmkm<8+!$NNCR^TBtyoO89^Boj00wy!O>Bj6EW*xGYh|X=-yA{qh53_oXUuQQ zPAEnfxjNQ{qv%wdNcKL6+|vxC+D#heCOsMc(iM4BaT+T6>JdTB+*_Wl z3?grMrZ#xjzu~z?#x5}2@!s&P|2ftlC2iIRZ<=$qO5Z}kAPmN~Vb`mql5;Q&>cKCU zZTYA#b-VP!<)@_Xx_j%bjqLJLp|t?7>ywsy8k;b4z^zv@qITrV5UqNK`~5U}9{b(% zKV2FJef&sQnz_-tTj+GwAK46`VO|J{ncjeuUx6Mv7X?Hjr=SANS)U9A3!As zGglooh*@hN-~eWV0Wy&P&;hV2^892Ear;vJ1i|fl6H1{%G94xL=jz2ssLk1vCzJ98x?!FR{TIFa!Kz6=>_z*kT*jqEc+)-zIS zu46p9YV<_d$O11VIF#|e3?{=>xr{~m?Q1_+JW)pJ;h$9OruO2MiA-Jdzv*(^IGOBOGYu63>>GaLUn> z%PAdW1?jwFumiKZAYwnq2v3GEPXROwb1IzA=YjkwM|G_*ufUns?y^qD_~>5@gJnHq z%Ndy5@dDcrdU(5HN0(iIPf@v%eOn+hdV-D?GK}15+195kX-R%H%$(kYI&y1nm)fAE zV0pPP7mZ)SyfPQg47bTFZP=cSw@dB@Jd3k(aI<$2+*E=m%DgicANFM1>ER!H--C$q zBGs(bYO=%Euile!v01i{A70v&I&pMWUPQ&nW2?I1#nIEU!~HXr_o-8QIemD7C;Lr2 zfk0oSFfRpc7G@O>atr3rEl}WNe|sVvz&x!L!@T5z*ydw%a~l>u9~B|DUf!PCI3(t` zo+w92mE=3ARY1o+o6jo|J!WIMr8I7&RA4(dDs~Q_8c`BYG}!}Yljq5lH8Cr2_7=Gi z)0BD!&6&{0n1)UtEvCs^GRIIc4JA+J`}oV4_Cui7j(|t4BVVJ0deDI5KDuewW9!4T zyU^*MFzpVATc&*uB~RvO%Cx7)n?|i8J5k5r0^l`-(+%LsfcyB+!u^*&;Us95!R@Hf zw+A_$ql!j)m`^P_%IJE{t#*67IcB7^;*4^NYh0v!3#Jqzr4$?=DgQ)UNA_KVUXDol zJX`Wd#Ke0GM;M(nKHk6;GBH6{SQ{muoJb!&!IQlkT5wQdcd7l59y=Oce`-Ez+25yS zbb+H}bisf!(P0f}1s?4;jVd6aOFrO?e+;V{zVWFYu!~Dj~ z*UDKb_CXr|+4>K&`v0gc{Zz@7yR8f#b0xW7A~=-W9iG2~K5c~)+>G=-*o&InAEl$x z?-zOQ-sQ<`r;c~iuN+CgJ0bU0F6uQr+51rULwv-RUB7-M*M@iOUAx{nW7o*Xi*^mw z7h$<(?RsY-UNg&vzT^D?#L{CEQYAxKj)M~|F^81Ms2m9Aro6zi!%tAm)3gg}DzT8Y zq*cRD7=Ya0a({a7Z`%jkyk!WFUiXf>s9iM7shEFh?kYr# zKVqm^7)l3oWdMfcT+I1+)|m&9GTaxu*{vDseuDR$)XDkU=FFlexU*6ds-8KtYeH&G z`W>V+?nMnm#!cg=?CHrAF-hrYGP|8Mp4>}#j~s2qLs~hWFqL7scVPaETqzBfi=^xK zBF4?&@|Y*)4yRu}!sn;VJ=B0D$~=>ra^q86dMn;o?&ijJI9^3ar4%XQ^!};#eF9^Q zszXR?o-(v*YEJEDq;yJhi-vlq=6YSZgXyQHVvya=BaP`zh2WI*@Il=#zbn)GOC5uF zKXef2GN5ZNUKP(8Y&y939nW&Q#WmD*ked}xv{tmz(HJ(B%8A4M`WndimdSGc?e)6u z|2uYtqtUn#><=W9(b>mvMk1U{^+aNwd67+{LNXZX?FuK1 zXe4PGRl=%|#-UtGVj4zABpNO^f?eTYw=5fhSjb4EVn#I9ZGp1=-Bn!*hB8V>Kv^I^by@q~TeMr+tyhT|3tnDInXsg#P$ zL;yRjC)^WH^oxovV+l1cH4LK($UUwHFyrM$DBKZ9MNK*Fie6($EY(9%qa}`=Ym<$~ z%8gjuG%9UfLX$-&V!f0!5t@2fu)y$jc&=541@Pu&G z6*w-DjtHiNm6NB2rdZcFL%R!oK9N5aTC#xS`YbE-v5&JXg~N`$rq9;6J{6*>dZDip z|ElcaEEEYb0wlsIoTOwp$rxfpLbGS9peGwbwibJ5l;!?XXDr@b4#8N6VG)PI=kp02 zXKFaIv1V;sW1WGemM%$R)M&trY?RT;89dZD6&DtK&=ijLmK%s6F|217HgYN%=nRiH zs3K}CNty|{@GA--EiY8jURdSj;aIS%Cy>Ar$i1RA6FiWVfz28zX$H(>p?|Vq&pNoQ zHxV{ky8?-Dh(RqWD$GKAo7}x>V%8>x$>R;K2o>ZTB1sv$d&3A2GRQ(-XQ90nzJ-Hj z{9urwlktVFXkQuL1jqCuBp?>e?@Yu~y@(A-Zi2kdioSxp_NVO*HlKGM-qv7_8~~eC-{CgJ zQ_+xN1#4+C1&(T$FPlc~NnG`-mtFUj?nspV} zi@|Q;OLk$4n}K$eH1_vMP7R58C}0MJ&-!aIUodGd!T_>~y{ddw3mn{X_(%9V5i)pw z7D$cCi|-)+g)dL_B_GB?D1+||^4E+7LaZ-g4#aAs9H?M6m9l(u;5F+M3-w>EZyG8n zZRC{y2wti)wNA9F(bq7Hsm;X^sTitwt0Tp26WrS+`)@ZpqbV+}qwvqcE;{_*2b zsV=QgbB*?Tm-y@0BWPfviu#M-$2pw>+u?}p{HQNSO%%@cC?p)(K3wlNG-W$hl*A zWqUW|*PvaGe=~R|IQJj>Kac+X;QXF}{7u+*w@u!M_D8|BzMCQU34C}AC~rdFFxs^} z*Ma}a#$Q7JSHL|={uS`Qg42g`Jn*SlC~eOu_?h6^-Yu}_JaDc5eYCFx*Z%uE^t9tM zSLu5c<0sKxuJ}&y2f^tRj`u_Ge+OT#_%FbxVGO-qzX5Nu@jrlXw($X!bLeZGgAy@{ z@?)rjN~wPm<8;A z5|dG$o{APZcjqe0sW8*{MlWqJt@Y`&B1Gvnr zD18a=U)#p}JoqU#`Q6}MHa-h{IyZyrp813XTbN_cs+R1#utKj z*!Y9swYKqpigD+m&bo@kwUAwi_0jwb;7e`%$KZ`N&a*bp#;1dyY2#ObSK9cgTD8Q9 z;w&KJv2{%pbMm&ZW|BA_{ST^E@*b4=y9onW1inVK>GSX`&I7NH<5Pq?!Oy@Al&$^c z77M}a!L9w}7WZO*Z2(`459J>Me+XsTMZO#Sd6cd5?iPOmr#*{Q`|IG9d3)UA5O@o? zSG6AjAF#DgLd<;#e70);7&yN$U<~1S)4>hQ`E12c2X6tNqxjk21K@goKJbUYdB0%) z1>nzvTj$*^+Q4}jt$67c&EN*O72n+AS**<~2rkv=GXWZ2fi3)*RT;XG?+53Pt(GYM z0yuw=#dTnN82ztgArRf)5wE0B*^6?DJTVIS}%N_g_n+a@h;l$KM-ff!#`5ztq4>)*< zLw>7+H#_**4!+Fh0*?1{Web7)FxEj|v8Zj_lLSDf0cvZ?%>^y{yqnP-@)S! z|1EXs8*sG$+0p-yWByk-bv+QAto^hN)E z+cBSu9P3r*u;+D${02w+Qx5(uhky4v`hVHMf8yYeIQkbm?Ca2z0dhVkIof$I*B9F_ za@cpF!@rvyo*;#T+!))2npWO5?f`N>%kjYmh*qQ`OWgM&aT%3U3xfjwP_5S}o1S znqwC@Id;2TTC2V4*b<8h8k|O|S*~bX?~jEyDNFpMND2F`+_Ilv8#tR}g2tau z(Ae}K3Fc?sNF_-9!7gN!{7jSDbx^9s`oaL2(W9D~#qlHQ66xso%iJ;ZcJ}@>&uSOg z!e*o=9PbDP`i0*gH2ZtQ{&sc~kr>2~8%t1#>E-r*rnZEYs}jjbClWRSx>WXCs4Sr# z$>tLd*x~$+LCYn(Qf4T=DW-V`cT+GLM?TOxm{m1GCLBAo1YInp!hI1_tdqG;<;0K~ zO-lDORjB&&c*qElKgcqL=(qB9emN=Corb28NP+od@tBp%lIeeeY~6B|tV3egzalQb zJkbWhL3F76n#mdqCtayzTQHSKAZexcgl<`JQA<8&ppoH3Sjt?cNmft5$7Q zUY|_EX%)=5X$g5)XdD&FuM)HrD|GHK84ZVfbpxlX8}c5InQp(8-d3jY%rZhM3mGt^ zLv>88sns?4ro7WR9SZ9fh8=QU&nQM-rQ>iFN0T+R+RnyHF0p3hhaeM_NLvAm^{uY69+TOZ{%#}!d~`w#!bH# z?XjY^JW}%AZSvjLJD3|UO3YojzHGg-xi1!?P4TOU-xT5|pd0TrTZzXDnWJ*!IpI-q zyjcAU5zlGQ0gE5TyAqyZT%Qr54(RR_;*$z*CVGY74*^{}g!q!Ge_Y`nB3`6kWc!z3 zA9NOf1@CGKD}dCun%E@7WvV`<@J68P9wD|V{({2S6#iY|OxP~<0xAC~#WyO>XC`-8 zhyx1WRyfA?%|e`tXE66gc&7!r;zFE5?8UE5h@Zu~Eb%TOE+l>q`6S|_O>_^^+*oXWaF^P9ZJe#>T;a!%9M9;T~pBI8TFV}-YyhhxH+!fwoxPEcs zcKj-k_;n$kC1Q~d5Ro)0#^Y4&qICS0iG+e<6Myc|V~0EFu0*L}H{ENio{xAwti|KpGI=%zlMl@2_o9J z60<@K6LD^TLqvc6PbSwbLhL8zu>Ls1T<@7gtoIxu)_WE48}JJe>(xiZdOb*lJ-;Pl zU6?#(`$Cc`15(<9q<2 zQ-rvSI1_#)&Jf}oL?ocTOPquCBhD4#7sN97oj4DEBqBEKCr*Svi6ugmVo!11XA`d# zVm{FAM&6Mec3wa}33+EC)}WO*4f}_PL~?`(-3G~ zo&0RrO*{?X_pl!0?Iu4Rd0WL_B0mG`sQCYoe-ieSL+|_K*jvZp9^*D}UV+qeGC4kH z5NG2YsQL=>V$6?tCgQBBZzR72_Xl$5Z6$9-ep>MWIc{zd#pC4bgxI9`b>x@gm-C7b zl3#{%toVK8>v7*w{1NiYk%LhDyX05E4~p+5zY^=H_^-%uQ+-MCcY*Zt1gr)3k+IY@dkX)qHvISqYz&qLhp}=(EB=&``|F~ zRE&!~Nk2~|;yj)Sq&*ACA42X*@i_SdLfoSG1FHSsh&cDZQ|$tm`&`r!7g~8}_hRf% z#c_0GJRN%?bw;W)yBwxRnSa?;zIU{1YpLxL375K&%ns zAtEOGFcFh{lnDEGD13}~z7XFbE)wDg#46l}Rr@dzetC*`o|VgF|L4e;T6uT(eB2kv zEAgB~^x^(MT!8xy5%RARtMNUE;`@mgT6ubRgAi|$ufRScHVW|`u^xYlfXlG{#N|T# E17af(vk<$eh+t6qxg|>3-m;JDzC{*k1wYRm^`|F4GdV7fhFSUwjmGpV$%fY9*8jk0=%ES}(iw z#{D}WwvV+}-ng6Hhtedu2Cr)<l>!5^_IJ7!KCxKN~;&o{jrJVV<{F!=^=ba2UI0~c0!vfn;Vh=Ci5geUV= zlyWZ=oS9o3Lw_S}Hr}yqkkDc$i<+)OH&PZE}UL1Sb>M_U-hk6dg`|1GvgID(x#=cNW!{AtEzL7j z1GZQRy)A8l_S`{F_6T-Sb{LK`Q*)rhYZK+{v?#~(WPcCgDTpbl8L)%eC<1ilMYD%I znPIF2&RldT0OYMbUhT@_8%~^Y8aOEWe<2R8}`hz zO{&=3e&N6sV9BSw*a;47w;10QR6?`*Z4nDeG zS8$CU!HybiDjlq!ilf!+Eum8|8wz4J(kI%0?191<+L+W7*hyht*0wv*?k(=s(W&+t zuF77Qmkm<8+!$NNCR^TBtyoO89^Boj00wy!O>Bj6EW*xGYh|X=-yA{qh53_oXUuQQ zPAEnfxjNQ{qv%wdNcKL6+|vxC+D#heCOsMc(iM4BaT+T6>JdTB+*_Wl z3?grMrZ#xjzu~z?#x5}2@!s&P|2ftlC2iIRZ<=$qO5Z}kAPmN~Vb`mql5;Q&>cKCU zZTYA#b-VP!<)@_Xx_j%bjqLJLp|t?7>ywsy8k;b4z^zv@qITrV5UqNK`~5U}9{b(% zKV2FJef&sQnz_-tTj+GwAK46`VO|J{ncjeuUx6Mv7X?Hjr=SANS)U9A3!As zGglooh*@hN-~eWV0Wy&P&;hV2^892Ear;vJ1i|fl6H1{%G94xL=jz2ssLk1vCzJ98x?!FR{TIFa!Kz6=>_z*kT*jqEc+)-zIS zu46p9YV<_d$O11VIF#|e3?{=>xr{~m?Q1_+JW)pJ;h$9OruO2MiA-Jdzv*(^IGOBOGYu63>>GaLUn> z%PAdW1?jwFumiKZAYwnq2v3GEPXROwb1IzA=YjkwM|G_*ufUns?y^qD_~>5@gJnHq z%Ndy5@dDcrdU(5HN0(iIPf@v%eOn+hdV-D?GK}15+195kX-R%H%$(kYI&y1nm)fAE zV0pPP7mZ)SyfPQg47bTFZP=cSw@dB@Jd3k(aI<$2+*E=m%DgicANFM1>ER!H--C$q zBGs(bYO=%Euile!v01i{A70v&I&pMWUPQ&nW2?I1#nIEU!~HXr_o-8QIemD7C;Lr2 zfk0oSFfRpc7G@O>atr3rEl}WNe|sVvz&x!L!@T5z*ydw%a~l>u9~B|DUf!PCI3(t` zo+w92mE=3ARY1o+o6jo|J!WIMr8I7&RA4(dDs~Q_8c`BYG}!}Yljq5lH8Cr2_7=Gi z)0BD!&6&{0n1)UtEvCs^GRIIc4JA+J`}oV4_Cui7j(|t4BVVJ0deDI5KDuewW9!4T zyU^*MFzpVATc&*uB~RvO%Cx7)n?|i8J5k5r0^l`-(+%LsfcyB+!u^*&;Us95!R@Hf zw+A_$ql!j)m`^P_%IJE{t#*67IcB7^;*4^NYh0v!3#Jqzr4$?=DgQ)UNA_KVUXDol zJX`Wd#Ke0GM;M(nKHk6;GBH6{SQ{muoJb!&!IQlkT5wQdcd7l59y=Oce`-Ez+25yS zbb+H}bisf!(P0f}1s?4;jVd6aOFrO?e+;V{zVWFYu!~Dj~ z*UDKb_CXr|+4>K&`v0gc{Zz@7yR8f#b0xW7A~=-W9iG2~K5c~)+>G=-*o&InAEl$x z?-zOQ-sQ<`r;c~iuN+CgJ0bU0F6uQr+51rULwv-RUB7-M*M@iOUAx{nW7o*Xi*^mw z7h$<(?RsY-UNg&vzT^D?#L{CEQYAxKj)M~|F^81Ms2m9Aro6zi!%tAm)3gg}DzT8Y zq*cRD7=Ya0a({a7Z`%jkyk!WFUiXf>s9iM7shEFh?kYr# zKVqm^7)l3oWdMfcT+I1+)|m&9GTaxu*{vDseuDR$)XDkU=FFlexU*6ds-8KtYeH&G z`W>V+?nMnm#!cg=?CHrAF-hrYGP|8Mp4>}#j~s2qLs~hWFqL7scVPaETqzBfi=^xK zBF4?&@|Y*)4yRu}!sn;VJ=B0D$~=>ra^q86dMn;o?&ijJI9^3ar4%XQ^!};#eF9^Q zszXR?o-(v*YEJEDq;yJhi-vlq=6YSZgXyQHVvya=BaP`zh2WI*@Il=#zbn)GOC5uF zKXef2GN5ZNUKP(8Y&y939nW&Q#WmD*ked}xv{tmz(HJ(B%8A4M`WndimdSGc?e)6u z|2uYtqtUn#><=W9(b>mvMk1U{^+aNwd67+{LNXZX?FuK1 zXe4PGRl=%|#-UtGVj4zABpNO^f?eTYw=5fhSjb4EVn#I9ZGp1=-Bn!*hB8V>Kv^I^by@q~TeMr+tyhT|3tnDInXsg#P$ zL;yRjC)^WH^oxovV+l1cH4LK($UUwHFyrM$DBKZ9MNK*Fie6($EY(9%qa}`=Ym<$~ z%8gjuG%9UfLX$-&V!f0!5t@2fu)y$jc&=541@Pu&G z6*w-DjtHiNm6NB2rdZcFL%R!oK9N5aTC#xS`YbE-v5&JXg~N`$rq9;6J{6*>dZDip z|ElcaEEEYb0wlsIoTOwp$rxfpLbGS9peGwbwibJ5l;!?XXDr@b4#8N6VG)PI=kp02 zXKFaIv1V;sW1WGemM%$R)M&trY?RT;89dZD6&DtK&=ijLmK%s6F|217HgYN%=nRiH zs3K}CNty|{@GA--EiY8jURdSj;aIS%Cy>Ar$i1RA6FiWVfz28zX$H(>p?|Vq&pNoQ zHxV{ky8?-Dh(RqWD$GKAo7}x>V%8>x$>R;K2o>ZTB1sv$d&3A2GRQ(-XQ90nzJ-Hj z{9urwlktVFXkQuL1jqCuBp?>e?@Yu~y@(A-Zi2kdioSxp_NVO*HlKGM-qv7_8~~eC-{CgJ zQ_+xN1#4+C1&(T$FPlc~NnG`-mtFUj?nspV} zi@|Q;OLk$4n}K$eH1_vMP7R58C}0MJ&-!aIUodGd!T_>~y{ddw3mn{X_(%9V5i)pw z7D$cCi|-)+g)dL_B_GB?D1+||^4E+7LaZ-g4#aAs9H?M6m9l(u;5F+M3-w>EZyG8n zZRC{y2wti)wNA9F(bq7Hsm;X^sTitwt0Tp26WrS+`)@ZpqbV+}qwvqcE;{_*2b zsV=QgbB*?Tm-y@0BWPfviu#M-$2pw>+u?}p{HQNSO%%@cC?p)(K3wlNG-W$hl*A zWqUW|*PvaGe=~R|IQJj>Kac+X;QXF}{7u+*w@u!M_D8|BzMCQU34C}AC~rdFFxs^} z*Ma}a#$Q7JSHL|={uS`Qg42g`Jn*SlC~eOu_?h6^-Yu}_JaDc5eYCFx*Z%uE^t9tM zSLu5c<0sKxuJ}&y2f^tRj`u_Ge+OT#_%FbxVGO-qzX5Nu@jrlXw($X!bLeZGgAy@{ z@?)rjN~wPm<8;A z5|dG$o{APZcjqe0sW8*{MlWqJt@Y`&B1Gvnr zD18a=U)#p}JoqU#`Q6}MHa-h{IyZyrp813XTbN_cs+R1#utKj z*!Y9swYKqpigD+m&bo@kwUAwi_0jwb;7e`%$KZ`N&a*bp#;1dyY2#ObSK9cgTD8Q9 z;w&KJv2{%pbMm&ZW|BA_{ST^E@*b4=y9onW1inVK>GSX`&I7NH<5Pq?!Oy@Al&$^c z77M}a!L9w}7WZO*Z2(`459J>Me+XsTMZO#Sd6cd5?iPOmr#*{Q`|IG9d3)UA5O@o? zSG6AjAF#DgLd<;#e70);7&yN$U<~1S)4>hQ`E12c2X6tNqxjk21K@goKJbUYdB0%) z1>nzvTj$*^+Q4}jt$67c&EN*O72n+AS**<~2rkv=GXWZ2fi3)*RT;XG?+53Pt(GYM z0yuw=#dTnN82ztgArRf)5wE0B*^6?DJTVIS}%N_g_n+a@h;l$KM-ff!#`5ztq4>)*< zLw>7+H#_**4!+Fh0*?1{Web7)FxEj|v8Zj_lLSDf0cvZ?%>^y{yqnP-@)S! z|1EXs8*sG$+0p-yWByk-bv+QAto^hN)E z+cBSu9P3r*u;+D${02w+Qx5(uhky4v`hVHMf8yYeIQkbm?Ca2z0dhVkIof$I*B9F_ za@cpF!@rvyo*;#T+!))2npWO5?f`N>%kjYmh*qQ`OWgM&aT%3U3xfjwP_5S}o1S znqwC@Id;2TTC2V4*b<8h8k|O|S*~bX?~jEyDNFpMND2F`+_Ilv8#tR}g2tau z(Ae}K3Fc?sNF_-9!7gN!{7jSDbx^9s`oaL2(W9D~#qlHQ66xso%iJ;ZcJ}@>&uSOg z!e*o=9PbDP`i0*gH2ZtQ{&sc~kr>2~8%t1#>E-r*rnZEYs}jjbClWRSx>WXCs4Sr# z$>tLd*x~$+LCYn(Qf4T=DW-V`cT+GLM?TOxm{m1GCLBAo1YInp!hI1_tdqG;<;0K~ zO-lDORjB&&c*qElKgcqL=(qB9emN=Corb28NP+od@tBp%lIeeeY~6B|tV3egzalQb zJkbWhL3F76n#mdqCtayzTQHSKAZexcgl<`JQA<8&ppoH3Sjt?cNmft5$7Q zUY|_EX%)=5X$g5)XdD&FuM)HrD|GHK84ZVfbpxlX8}c5InQp(8-d3jY%rZhM3mGt^ zLv>88sns?4ro7WR9SZ9fh8=QU&nQM-rQ>iFN0T+R+RnyHF0p3hhaeM_NLvAm^{uY69+TOZ{%#}!d~`w#!bH# z?XjY^JW}%AZSvjLJD3|UO3YojzHGg-xi1!?P4TOU-xT5|pd0TrTZzXDnWJ*!IpI-q zyjcAU5zlGQ0gE5TyAqyZT%Qr54(RR_;*$z*CVGY74*^{}g!q!Ge_Y`nB3`6kWc!z3 zA9NOf1@CGKD}dCun%E@7WvV`<@J68P9wD|V{({2S6#iY|OxP~<0xAC~#WyO>XC`-8 zhyx1WRyfA?%|e`tXE66gc&7!r;zFE5?8UE5h@Zu~Eb%TOE+l>q`6S|_O>_^^+*oXWaF^P9ZJe#>T;a!%9M9;T~pBI8TFV}-YyhhxH+!fwoxPEcs zcKj-k_;n$kC1Q~d5Ro)0#^Y4&qICS0iG+e<6Myc|V~0EFu0*L}H{ENio{xAwti|KpGI=%zlMl@2_o9J z60<@K6LD^TLqvc6PbSwbLhL8zu>Ls1T<@7gtoIxu)_WE48}JJe>(xiZdOb*lJ-;Pl zU6?#(`$Cc`15(<9q<2 zQ-rvSI1_#)&Jf}oL?ocTOPquCBhD4#7sN97oj4DEBqBEKCr*Svi6ugmVo!11XA`d# zVm{FAM&6Mec3wa}33+EC)}WO*4f}_PL~?`(-3G~ zo&0RrO*{?X_pl!0?Iu4Rd0WL_B0mG`sQCYoe-ieSL+|_K*jvZp9^*D}UV+qeGC4kH z5NG2YsQL=>V$6?tCgQBBZzR72_Xl$5Z6$9-ep>MWIc{zd#pC4bgxI9`b>x@gm-C7b zl3#{%toVK8>v7*w{1NiYk%LhDyX05E4~p+5zY^=H_^-%uQ+-MCcY*Zt1gr)3k+IY@dkX)qHvISqYz&qLhp}=(EB=&``|F~ zRE&!~Nk2~|;yj)Sq&*ACA42X*@i_SdLfoSG1FHSsh&cDZQ|$tm`&`r!7g~8}_hRf% z#c_0GJRN%?bw;W)yBwxRnSa?;zIU{1YpLxL375K&%ns zAtEOGFcFh{lnDEGD13}~z7XFbE)wDg#46l}Rr@dzetC*`o|VgF|L4e;T6uT(eB2kv zEAgB~^x^(MT!8xy5%RARtMNUE;`@mgT6ubRgAi|$ufRScHVW|`u^xYlfXlG{#N|T# E17af6lku2H9AV5g6tq#ObtKGNSjaR#y z-M3g`RIq0)u(IBX%GW@KVH`pUGj$rzq+v**sX@jLEz>%*aolML?m*}YnPQ4#T)x!b z@7{N%r-zg2bo!^SeRS^co^#LrzVF_>=f3rA8_LScgbwARLJ%2yef~!9z!D{C6o$A^ z)QQF75-|%&lr`>z4#+?T(gjHKfhs^@?)3AtPy{l(P&{4EiyYO=<-uX<7U4?8x!?LL7hC=O+aq zBWd{^kOO`p&_0S69gw^0SBtVp%nv43CgQy-6Ok2(crrH-%%*~?l#F>P-+0?*{8jCs z%~}xiqDr#wC@-5>x~=b__477-ZSTGJzC7^au^)6DV!tj2vHi@qhrRxG(}he6f*L^U z*8l3{3vWF*wEvd34j%t@_oAN_Kd74c=l821ni2kq6>-8maMn!+1CbXz^4%W%q*exJ z{trF!mp%An5B^6_{%1V$g&us&gDX9FsR#eaV?V%7a{}wTQv-0~|McW%pXy*BQt-$d zJ@~60`<$;j(EimP`A=Q)xsbo1mBFb$>XH-x$b*05!pt8B=|KH)4Zw+?bmWgP>E7NsrOCpuDxg;SYlhzL5L^D<>!gy;}Tj$*kW;hYIlD64z*|AhanDJ!X)|%l|GHHdUU`toGnMj2q z=G|5%9vwtH9J1r7WLE1_!BtQ+V_8}hu@hM{YuRSnvNAf6I4bMHD(=X{?J50Du4=R- ztWYwS*11@UG;KyvS$1SU`*1a5X*nPj*>O`ZwIG9nxAONJ6EIXwst6C$07C+(<+_E~n8qJ+wbm)gOkDXgHC|a!|weVA?W!*^L6WVyUd%JD3dhTSVa< z5fN2AVw#*Q&hYn#Py^G7gzOMZ^k&hioEAt*M#RRpP3v0BRcN}7T{9KqW-WK}@~OYv z-#P6`3_7kj^%$#gxYnB~_2Da8=K05OG52=^R1=TS;n!v}vmunhUc`|TUo7Pp2orMV znJaOHh&x#2FQ3YP`o}*1EPUM0k}nkEQ}VA0QHizrCE6uN!{(D?an_RKL%)a|A2Eac zOZfhhV>Q;1Ux@D<`D`KT$uGiLgS=9RHRNc)4dht1P2|;B%jBr=P2|`R+sLu8w3DNL zUF7({c9Y|*aToalA$rKaEJTDHAL1DKSFjzBUm`@Bd=d6Xa-2B^$S)OQh}^(;gnWq* zyU8!d9z(tq=Na-Vu#b~pDa6C%bwWHwzD$TG$gdJ&ANkcnbmmX`OMiz>-Zhp&wnF~& z#~4RKoH<-|?IJrdUw-$dLlaU*d% zag)Srh`WjFCBA{UhuDy~iI@!N&KTA9+afJ8)@lJ_j#Lp9_B~B0@B<_(oP5cYuc8P7` zqr^=T4-g+Gu9tX-_yn;b@lN6ragD^giBAy=iT4nnB|h~T+rO6>>lp2qc$C;rd{p9x ziED@tO8gixkE`PcBz}U}Al@hOKH@s!QQ(I6wvGII{_RukT^+F|d@o~1AN2X}*b@8t zpW|%)CMt9~I_mycSQHp@x?6<0iVwN`m19jXNoUkm0>;JNCP5w zv9#|m4WWw;U%<4oS3g9}zJCfA29$rPuE>I^ico@zj1MBq=y(=?qobpnJGXAxb+XNm z+X&6yxohl~SnY-US%?b)wWurPKV`hWushHLwIfY_z{x`0k=B60EcwsMhdK%azQRUd zvGA+6CMQSQ0=^Mnp!5>Dmj<91KzBp2VyL08(O)d|OlxUj=^<(#rcvrn_$iR)hXQq? zdiP@NvBPH+FZ~)dVhOjCA1UU)OMB?BksAWYhDxF}4?&hcTUI@M8k-ITr4APG%19!x zyn5@w>Se8g`qKMIDu^>pVV}LOnE&3}%If1t9X?pSdkh(iZGpx@du5@i2A$Cr@XJyv z1Es(C1igo{>dOV$s;m1ZjG1`a-ZB>48fY9D3M?uji?p#^*0hE-eHAs;)du&WSb?D@ zE4?9GI6PUshX+JT**lQp6Cp|_Y5}W0Q0>U_KxvZN;2(YLw7mwI3K#+u=`X$*Xu}6e z^^p&sNKtwpdTeO}jIxW~q`mQx&qj{Gq90x58$nx_A$9H9>fwKYRx$sH?rYTom=UF| zD3^8~1t{k0*pD0yrNLWo=~_qQdjP|eb_@F97V4mK%Q2F&`K-|!tidb8@7;UZ;nwB1 zh!H#Bld2f(d2C!`pfnqmUiN;CK2< z`OUFnz86C?5iI5h$ge2oe?Y#tn131#npjZG7s#uM`Cl`ARx$rBI0vDae@->I^dy!& zCKo%W^b`v1#NI%p_lBS1gn$b0a#+|Ks0YJhuYryErMHl^Xa@qQFQ+Lt?9zQOfxT$0 zleUs(CuCZ&sjRy7aIw(Ef}QiDzJF6NIoH9HNV+jKygu6LUronhK^ znSSmgn$C5w_1fZ79*eK5;$v=$U!P&oa#@T>i}p>$d_PmsVwF$+SW`NtY?pp3wFZ~S zd7R(jv}Fxa-8HF&HfDJZCq@DjqjUrcm=3kO4zcsM-Rb(`Y~I>1xuvs|L&bKDEyY1J ze{vCKV}0=_C-Jc=J#q%7@+Cx<9e(Na^5HY~mFl|#b89dOIWG}yWQ8Xmeu0YlBV}tp z%DtICwCK)l<~PSC=8U?-hd7qWvs;BM@h3Pc=6P7dc8nn|7du2al)Tb5c%3ogNnAXP zXdHJ)S1Rr%Q^~=VVJl;2SB66?7zw7Wen*uTJtG{FxtAO5xPoOZBa=%S(M+n}P*+JK zmg=_*UU_(bb8d@9G=u^pGD%)wbi%iDxMyW?Pl+e{jI5QxEz-!wa=0w*NE+c(e}5<$ zxz3>0WwYht-Tnn_E1SiA(~vi)>kKaN?a;Ntv6Q;SidL&P*C#qGSzQqfu2lck#mul% z#?q`)o!QPUa0)i8`dY9a{~AOxW#C4f88o7)44Rm=g}kU6Rwk3mTn7`gsS?g*GEigl zzk$BLq~dx5W597Zjd;nRG$Fn?`;fa_jHJ|A%EE=l|J7dOeh0s7)S9i z@}>Eisq$~As=T@SBHK40zVVgouUZvYvIfabAfAyz;G((8KV05iRrx?gOI6MNzUHd= z`3r8VsxQB(YJT%rRZa8Zs>CM51j9T^F46B2hR7v z`5rjm1ONX$a0>6)M?tiVBiUl;2RNs)|PM4_&JzA3kdu? zEKcIbBAyY6fB*SpYCqnYd6V}K?iem%zFxa2pG}-bCB=nPVU2aA3Fwm z2XqEB>pMRG0?-wp)u0WaEubjqZqWUpM?ueko&y~Q9Rs}sIs=+jKz`5_pw*xape>*% z=x)&cphrQ^fSv;#1|0*v13Ckmh4EV8j2WxAv8ClYqi%C=E@|hC#^9RZsuc}ua}qWz zQwhS6h7%!NYH*{G_mgXajVl_I;x$H{9qP-j>{#EnzPWR~c}?R=yjq14%Z$2S+^8Z3 zt}|_ITW&Rw2S3vXvxEJ1s2AMMC?3->JUUsKvW|iI1;o8xt_iNg z{m{DsX=RsPJ`$abr zxsOnfdzaSRi#Y4ba`^VW2bnHMTnAn514z(%2cUNVdh*`uD6&te`=CpY{y_!`TfzZy z0`(Xk18IBQKU*;g^j({BUG9^P9{Zphdfm{wj~Shy^_~G{GWDd-4vYmH9Wt%=*NAJq zPvO_|DfC9qq4#s7;ptG0vGg&*uXfr7)ph*u5y#V_)Z>1C@(<`8gAU8(oZ%zFsXw6i zZ;*2=s3(1wpvR0%V_>-)-?u^99^Y3_94+oU3agU2zbLFq z;69=-OIQ1a!m2>-3ks{z)8F9=xnrqyuH;fpe$N$VE7W&hVV)AEeN!sr4u#_Z)}fNC zk>`3-cn;Z=?@EQ7$!h&5IcKa|Ckm@o$@QQxM@5}y6y_;Ioo5tQJ2vOB!fNH}b3%ns zrx?ylC0{@$&og8d@)U!4$oVKScd%*SoeIIz)O4u8Y05orKJmdMTdd13!_L7RJx=?} z#T@DDHtNF7kn6J@+vw~MR~-f&-_31;GY2-MW25$3^4zz9{F(( ze%FKP%Ozi7VVk~M<*voe^5%Q+DJlOW&M?Cn49!xh3-CwN# zYaaP;T-ZQ+CR~{9`vmw|XZ+@t*9yOD)1tf<*zK!!rANNjgKzQR7%-pVL$Jm9FyNAN zb&t3(%X`Fwp8-DL)UO8X<1an(p9AathW1|p=J%QNiN1BOx%64yZ-J-Bd!cyOC1?4+ z2d2LO&u^ShAA980YKw&?+k-QO3md?zU6}H99^3`2%V&T0xa7=#j|(&ZcRlzi4}QUe zUjugg4!-V@pYY%hJXnPBq+{oz(O?)pVmG&Rm~ERnyWlxE?O$lx{c!w)hhbJ|uR&Lm zX+~0JUn12TN|+HlmC2f++=+K8KQY$y3LEc%55S_2`LkX7LCU7-IBzRc*5Jq3`lq)w-@2&< zS}uv>E4Q)j_I1r|=It9cbgu6*yPDUvt*1HZW*5%plwTq4UHISBq+RLI;y>!6Ik0AR z5RQ9hI&9jpTylG`cR=uR<2dLkuR*st<$mZ+nQpgfTX=SI95%HZrg9*3XOKRK?gYm( zQ27{63mUX3?V+h08>bcOwZbO)U54q#=oYFTajK)d5*=_3-^_Enh$?4Bw^3L)w+pK2 z?lyQ%x-)rvVd=X$Qyj^r%otu0@#d+kIOQ)o(+gC2S-Nv$yy490PWgiG)WgA$Iag?_lL1J0ph)mt?*0xDNETF~d`N%H`FaRkpD|?M|BE?&=muPg!@u W41Z+DUsyi>&QNmu(oPGm5&r{sh4Tpj literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient b/project1/cyassl-3.0.0/examples/echoclient/echoclient new file mode 100755 index 00000000..dfbb98e1 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient @@ -0,0 +1,228 @@ +#! /bin/bash + +# examples/echoclient/echoclient - temporary wrapper script for .libs/echoclient +# Generated by libtool (GNU libtool) 2.4.2 +# +# The examples/echoclient/echoclient program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/echoclient/echoclient.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "echoclient:examples/echoclient/echoclient:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "echoclient:examples/echoclient/echoclient:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "echoclient:examples/echoclient/echoclient:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'echoclient' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj b/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj new file mode 100755 index 00000000..3fa0caf6 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.c b/project1/cyassl-3.0.0/examples/echoclient/echoclient.c new file mode 100644 index 00000000..29e062e7 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient.c @@ -0,0 +1,274 @@ +/* echoclient.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + #include + #include "cyassl_MDK_ARM.h" +#endif + +#include + +#include "examples/echoclient/echoclient.h" + +void echoclient_test(void* args) +{ + SOCKET_T sockfd = 0; + + FILE* fin = stdin ; + FILE* fout = stdout; + + int inCreated = 0; + int outCreated = 0; + + char msg[1024]; + char reply[1024+1]; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + + int doDTLS = 0; + int doPSK = 0; + int sendSz; + int argc = 0; + char** argv = 0; + word16 port = yasslPort; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifndef CYASSL_MDK_SHELL + argc = ((func_args*)args)->argc; + argv = ((func_args*)args)->argv; +#endif + + if (argc >= 2) { + fin = fopen(argv[1], "r"); + inCreated = 1; + } + if (argc >= 3) { + fout = fopen(argv[2], "w"); + outCreated = 1; + } + + if (!fin) err_sys("can't open input file"); + if (!fout) err_sys("can't open output file"); + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + +#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) + port = ((func_args*)args)->signal->port; +#endif + +#if defined(CYASSL_DTLS) + method = DTLSv1_client_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_client_method(); +#else + method = SSLv3_client_method(); +#endif + ctx = SSL_CTX_new(method); + +#ifndef NO_FILESYSTEM + #ifndef NO_RSA + if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif + #ifdef HAVE_ECC + if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + #endif +#elif !defined(NO_CERTS) + if (!doPSK) + load_buffer(ctx, caCert, CYASSL_CA); +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) + err_sys("client can't set cipher list 2"); +#endif + } + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + #if defined(CYASSL_MDK_ARM) + CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); + #endif + + ssl = SSL_new(ctx); + + + if (doDTLS) { + SOCKADDR_IN_T addr; + build_addr(&addr, yasslIP, port, 1); + CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); + tcp_socket(&sockfd, 1); + } + else { + tcp_connect(&sockfd, yasslIP, port, 0); + } + + SSL_set_fd(ssl, sockfd); +#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) + /* let echoserver bind first, TODO: add Windows signal like pthreads does */ + Sleep(100); +#endif + + if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); + + while (fgets(msg, sizeof(msg), fin) != 0) { + + sendSz = (int)strlen(msg); + + if (SSL_write(ssl, msg, sendSz) != sendSz) + err_sys("SSL_write failed"); + + if (strncmp(msg, "quit", 4) == 0) { + fputs("sending server shutdown command: quit!\n", fout); + break; + } + + if (strncmp(msg, "break", 5) == 0) { + fputs("sending server session close: break!\n", fout); + break; + } + + #ifndef CYASSL_MDK_SHELL + while (sendSz) { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + else + break; + } + #else + { + int got; + if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { + reply[got] = 0; + fputs(reply, fout); + fflush(fout) ; + sendSz -= got; + } + } + #endif + } + + +#ifdef CYASSL_DTLS + strncpy(msg, "break", 6); + sendSz = (int)strlen(msg); + /* try to tell server done */ + SSL_write(ssl, msg, sendSz); +#else + SSL_shutdown(ssl); +#endif + + SSL_free(ssl); + SSL_CTX_free(ctx); + + fflush(fout); + if (inCreated) fclose(fin); + if (outCreated) fclose(fout); + + CloseSocket(sockfd); + ((func_args*)args)->return_code = 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + + if (CurrentDir("echoclient")) + ChangeDirBack(2); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); + echoclient_test(&args); + + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + +#endif /* NO_MAIN_DRIVER */ + + diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.h b/project1/cyassl-3.0.0/examples/echoclient/echoclient.h new file mode 100644 index 00000000..ad60ad40 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient.h @@ -0,0 +1,23 @@ +/* echoclient.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#pragma once +void echoclient_test(void* args); diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.o b/project1/cyassl-3.0.0/examples/echoclient/echoclient.o new file mode 100644 index 0000000000000000000000000000000000000000..c49ea93f430ad32cded4c70a7cc7623e4492f331 GIT binary patch literal 4976 zcmb7IZEO_R6}`qw@EU?$k^-p^9mo(&F>9|eF%Z%kY-3P10bwAK2-%KjXYH+bXPuc@ zj4LaF+E%mLSWzk^YO7YQDz%Cl^-rZrRhvkt1YEVL6se7rR{ZFXstR?YC{ctW8swfc z^PX7`t9TGO{yOr5BmPt*nzb2Uy> zGiIWiFyH+YYIFcalVMEXYMe^f2Ah^?Xg&fC;lO%TQ=ovq`WAv zvzJRcg&uAL(b#&W*gAMCoTQ|6{Qn1nvs z!$@0^U>JoC8<@bdGM_LBQKs{=i!IMR3{EMl1L@sM(kbLUWp1pts}vQ6xwpcohAqI7 zO>?iAnM7C$x)BUR@60p}r%NTeUcFVFhsP$ADp6Ir?)#)=_K(o2t96tC+}!r_GRPeo zE9*7B4>G$L^q~%qunq{W9cLv>Uq@8EGW-5BTdwxEKO)t@OoXa>v%8}tcYIKJ{WJ5b zajR!doWg}6I9ju`BU~*kBLdj2qpNhKNZnzQI@bsqC4vm!tF+ zQVJhXxLM(Pg=-bw6(Ki4jnvvWTr5r);t;+KWXrw{GiEoYYR{XU0KDw2@NsXbJ{OoK z;tkIit@s6)y%g+Ia~<04?4`NhhL--T%f19!`@Sfg>#sn2d1U{^b?4`CT{*F!vaj2M zc(9|N$768hb`>MLCVp|lRKQhAlUu`c9DSx#mE)1%l(#af;?2dy&8tyc5#pzcS=gNShjM8ZH3nD z#_^(K`HtaLTqEz5OGe+MH8hklM$09~$Q3*R$=YStb!@C>VZmHDHQ^NkM^8LmDFos> zZm!^t7{243b3DTztpvI9glpL4Qps|2`wePsX%1hLu{*RK-!GJ*TrB&}euJ;l7<3(b zv}_j(jvGk7Gh7*w6HXYeq*5LDtAHbW6u}xn+1Tc*sG7wu+hdN7x>?d)J*iIoNsC)H z;L@8k@?{U1`hiSZzF#yP&ntWT;i8!;cE$6c#wvVGcHoEXRq92^?R?(Xi$7hJ2j!)O~ufpZ43%VbVJYQScPNXm1HslYiONQwnw zhN)rSmy}x$oYdfBr*`>)Wsgb9AN2z-u!b?xI9UpL&I&B}DHAD7BeVbe;a3@FOYTw@ zyc7J4lj`Ajoey=A;VAm`4qDcC(N#D{8THt3`xI{k^0`*$i(LD=7h~#wmflh5(0>D@ZHpogD26C*q1A{++ zb3ZA68T>7bA5gppiZ?Kh>a|kNfHy!#>*v5%fpc$YKM39e&N7jgz}JH_Kl0yW%pBJ% zJ_EUdIqomz*D+?BXi@ynz&>zo|96ZZ#m_n=Ujh3p_!ks^3*#?gyg~67fjr*Y|2vQm zfb-mPy^p{rF}_Ffo8Zr5to@w={~$gnHSIJi8a5GHTt!R)9SfAtPuoU?>>K0^7uhxY?{=Jy|TQNQdfBK>R zrWkLJ`TMt422%e=G5K#|ayKU59OFk~T))S3L;qJ|{+@}&_q&+=x|sa8G5LiUe<;SE zjIH<0nEZtpZ;P#WEoT2=jQ=afSI6v6$M}ZWdaW^jB8?Wv_@VRTkm(NJX%hGS@DR>k@QoE!=W)lE;7v{8z*+BCiu+ z#BWX#4d<`q_lxkIO?*Y<77_nAS&erniT->KFtJ~xhj;+~)x1rP#y?F&ia@?nWOvI+Y!uhX?{F(^6H;J(O8|Ap5{F5AZACW`< zCOPz*Q4{KKCPKd*n8XEVFFEuNkvEH+CLh2*w1}M|Mb57g3CNMh6gm9Pki+jw#BCz~ E0ahtRy8r+H literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln b/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln new file mode 100755 index 00000000..3fb7851d --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoclient", "echoclient.vcproj", "{A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Debug|Win32.Build.0 = Debug|Win32 + {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Release|Win32.ActiveCfg = Release|Win32 + {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj b/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj new file mode 100755 index 00000000..3a2a085a --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/echoclient/include.am b/project1/cyassl-3.0.0/examples/echoclient/include.am new file mode 100644 index 00000000..d913e663 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoclient/include.am @@ -0,0 +1,19 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + +if BUILD_EXAMPLES +noinst_PROGRAMS += examples/echoclient/echoclient +noinst_HEADERS += examples/echoclient/echoclient.h +examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c +examples_echoclient_echoclient_LDADD = src/libcyassl.la +examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la +endif +EXTRA_DIST += examples/echoclient/echoclient.sln +EXTRA_DIST += examples/echoclient/echoclient-ntru.vcproj +EXTRA_DIST += examples/echoclient/echoclient.vcproj + +dist_example_DATA+= examples/echoclient/echoclient.c +DISTCLEANFILES+= examples/echoclient/.libs/echoclient + diff --git a/project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o b/project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o new file mode 100644 index 0000000000000000000000000000000000000000..429c3f79f7d37e95240ecb6762ea86aa6e7c44f3 GIT binary patch literal 3872 zcmb7HU2GiH6+ZS(VAnCMNfAj4gh`ly-LBWaNg(i$5Ib&Qn?$uuB2k!*XYbfs@6IeU zvq@I6fM8p&8Z5*M5f7+UALv6-RkgfO`T$BDOH@Kgs8y;~RiCPW3n(urYAe$3%-p-# zOsgWUGy9$IoO91T_h;^zJUdxB($&?KA=$bpLtTmh^_vnh9z#EEr7X=(pM3n>KT27m z%dCCk+y(9)Ei;LzHDMSXav@qVehAl%gV}3n(eTEEp|j`mm)%RpqO)3SJ(|+iB389Z zhSt)I%m0QWhgtqIv$Qvw%HCi_|GPLt z(RaMHWb9Z&w>Zvc=+)mEkMr$Q`KsiB8WNxl&0t98yRmvL|KgqCY~_`M^_I4E3A0}^ zZb!t#TOzN(%5UM7r1SB|=-4VqpAGcLwyNkUy&t@qUwscA9V=RhGt|^Lyf&}4!^Ja6 zJhpUtoCjIG7EWQdkHtR8JPBcv?ABL5eP-a|MBy=tLZg7C&|+7$rQ-(F{jux7=Z&|c z3By2`?An_~2_cX_FF`vRa$4=j+1oq{#{wLC+iMTMY`j$PzaL3$?)twjd(Y_)kEkVEjfjF7%Afb-$h|BRE9D`rBn1){E9``w%A%wR&`o8 zj>Jd#-0%3Mead{|$qUKEHt&(d#sE%*LV_v*sc zD{j3J>Q1F9I<;OSY^#eyw(!GX$hHPqDAq+yx>h}_tlL)HyP%(_3M&x0-*9!u_iFm# zrZqiX(igm%(90E{Kup_nU14K93j>y8)fvAM3Z;0uQ3)v!Zn@&l>w)l33ttZw8e!Qx zHVQK9}Ine zvNU;UdeR&lA95kAF``p8=wxFRH~*oDHeSQ^N36oC^Xfx?U)X zQ^#fpgV3@UsTeE-p&wdvkQ6p+F)v%8g*YA~8%HpcuhICeni~MYrI4t$2 zF|p%PW>9|Ll(I6d^8$1<6&jn<&W+9Ncj|xmJp>)!(5hX!ndmu83TK6O;Nki5?LLM_ z%@rb@Lc-fSI;wHm*4aAs8eO?ID~;T>i?+}lkY&Z^(cyh?-cPol2mcWAeUe`R{{nJe z@{fR9pyPbm|1#t}o^6tMBk(Tp+a&)GGSBG_$uEI_3-Wf!Ujgy~Z6 zuk1I|ZfWLsU|V+={ph-TypO-`7?St(wUqt&6fdOw|CO@;EM@;q%3e>|cc%EGDX!iV z4#WAar{cYz^52I2RgL{Gr0mb9cq_$!pgIG&|5D2SlNA3;%Ku7=f0E)`Q~7OA#p_G) z@22`6OYy@ge>25NoV9B8stAUJz2Mo^3hv|%v1rqEy%`D=33IA+{Em(mW3kgmX>TstKxznq6;F#TB7x zmCL>gP!6ks89-SV!k5*Og33Iqm~vsO)6P^@ayiaEOxmwvo^l>>QJ1y{*yh@`y2@!- zd7(C!$-#$4K#o&w1PkOKTNJ{0c{fZGq@ehpOCi)bZ!=>Gax#nTgK=1tW^oMPLra=mSR7$UidTTjQ^c_+a=uBZ}K+j3{DP8FRdt_=m#N%ZLyC{{X5n BFy;UN literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp b/project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po b/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po new file mode 100644 index 00000000..8cc153a1 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po @@ -0,0 +1,270 @@ +examples/echoserver/echoserver.o: examples/echoserver/echoserver.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/stdc-predef.h \ + /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h \ + examples/echoserver/echoserver.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/echoserver/echoserver.h: diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po b/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po new file mode 100644 index 00000000..27d0bb4b --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po @@ -0,0 +1,270 @@ +examples/echoserver/testsuite_testsuite_test-echoserver.o: \ + examples/echoserver/echoserver.c config.h cyassl/ctaocrypt/settings.h \ + cyassl/ctaocrypt/visibility.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h \ + examples/echoserver/echoserver.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/echoserver/echoserver.h: diff --git a/project1/cyassl-3.0.0/examples/echoserver/.dirstamp b/project1/cyassl-3.0.0/examples/echoserver/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver b/project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver new file mode 100755 index 0000000000000000000000000000000000000000..49b310918d2c1e001129890e6fc0e3ad81649280 GIT binary patch literal 13134 zcmeHNdvsjId7qWm&SGRq7~`7Y;2V4WfY>X^2xCAv5?c9zg)Jo6nA-96YWJ>o>(%bE zd)Jn7bXvJw_A)!svKnU(CHjOC6h(}O= zznOcbs~hOy^l!%g^v!R+$2{)L+}XL`pS84Z@OV7JPGzE85VhUo_0@x)SfV8LLK7E> zmEuZqg_w;Z%IXK81JYnXnuRhis2tP@+D1*ykZ3QemHhmb zLY)7a*GFn86QUKwdMQU%Oh7&X8Oe4^IqM+BP*DtZlY+n`Th{iH8L38n)em}oBtK*% zTYeklfPawaAJvO?$erz*kGe>-Xa8yv@vfRgWOX8*%=HGcslXZ~qb=ndw{FK@)erhy z2%_zL5XX-4%!cf3uWYDZe&yp@%Qt`Ef1~k{Eu)mJ0l@W3xMiCH@7@{ z{_z(-(|=;ii^I>|xpUFq7hkD7_piULglI;(j83dH5BxvbFe?$Wt#;Co`I$@J;KCnr z`Kxr{yKHCR^#8QW{tcJ>H!k@wqYLzjM;t34buJ88%~;ci>B)A9vXgJLL5DC71k02iA}`9hmyZT=v@>at-;{UGm3V zIN<89$A$Y{`j0yNv;HcVzTc()?=F4KrN14x?oq6Dq-v~~81T9&e7U$E{`~iOeOyPE zh$^vrhW_PZ0OdyqmHj+%vDgiLFZ5B2=Y!>eH5={=WwQw`*lUHpx${;%Vq}c&c-AyB zowqh8Qc0sT)Ri!Vu6OsOl6uw*WlUWc`YrqQc1y200T)JAnZK)Xb6=>Vqg78D2ZWW) z7@>&JZ?p;^vfUC>%D@GkoTIc+YHxLh2xu(B_kvY+@{uWvRsvbV`UEJVdgukSjPN zk$(tlnH;NgCHX~o?~%_DqL%z(oIS`Zum_N%O4Cl3#svr6+Yn)y?{T_b!vQ)%*AFDxgQ`S6#8lglcQi!nR)JWMB-RTEP- zc1Gg)#C)V0|D{%wyUSdt+Mq+kotXkqAahh02yotD%c>Em{ENdkmAbwur zHsT}1XC&?<9wHu=cqj1##3v=*O?;I2sKk4Tj}s3`93ehQJRot5_%Y(N#0lbI;=K~5 ziJvBJlh`CaL)<8FFY$B4wG#IeKToVlJV0C`u9o-^@i?)N_z3X?@%ZoA|9gnB^3i{Z zhlqW|XC%ItxSDua;s=Nq5}%a#^TZnQQHhTduOuFl_+jE&;sM~gm-h_5kpJ~~TW5Pr z;QbmK`kdEy+m6_qpY{4mUql06iw-&e6&CqNocOWp@KRr0k3ac|*#|r$97uureqsCI zOZoE)Pka58O`iGwNby?~Jw_eO zgBOZVVD(|W-b4o?cd7L6EA?Z@MrX0i^Zi%RvM;@c9~h{AvE7gbQw^a64H@f$$T*unUS#IA!QU&3y1`jGz=Mu;hj{CAP>{#fA~{xi_auP^IgQrO@v zG2V4E#L9hRG(9cm8r3W#r=c);5U&z0WnhF?`szYDH28xc=pWfg@*<|q^ zSxfO=SwZOuNJ|YEayTn>!fJ4I(Dbh==9^dv#$&Lam2fJEk{9y)gs19o7p#i;``$&x z16NQn*A(-QKs>gdwXgD*#^}1iUwR7dbT#36s1#V|3IB0)weW;&;JIbR{CG*VtAWOF z^04KkpH7rE2I^_Fts2cMsw^5ke=y;%2K*r;vJVaHLj^WS!M^+lUL~c+-r^Qn^{EtI zoly6pag@21^l+2LJ~iwk-HsE`QU#>dT#*%)Rp;^B`X)({)jmj#D z`IGP=t6fExTs5-V0lKcE2iV+!>g7-_z%zlPb#=qgl|Ps;Ji|~u67<&=AdpX5dXm3k zOOvo196fxY>QfJMtovb^o)!9MrSu?bqS#kleUVH~L^I z>V^-V;(oVB-}Q-+V*Uaea&CDs|04O7#rznyigOE!`M1a`i}|a`XBYE#fXmUyhphJA z3D?-7(SK2DLCx4n^XF>^|Ha-&cjCAeE!hl$dNY^Qm> zRaV2^E|#q;HhQXpqs77rt|Rp>D;@qF+ihN6%shroLUE0PS-Kzy4LCX zlq|Ddf7{{uYUw)H&feP|&!Wufae?v}b9&6o@c5*|<8!ac#%?O+zsFLHqOwz)^oL;w zTv{XR?OP((ZT=Z*qAw?4>ukwxXkp=3Q}#TDr}Qxt6oUSR2TyVE_w1T+`iTy0zrAj9 zM@Q);RB~{{zz?VV`9+0mPVU&T+Iyz@r|w{j1DQ63QC zP;!N-@kh6YU(WcotjYU>Kn;KIXKU1zz-od(+UT*=6RA){QzDHbX|qae!wo~$&@#EC z#vlBex`fbTsUAb)uXC5veMaAV_=Mzrx-`RSP2GrS(GV^^BEq_cv0+Q6RwLhwcjj=r z(1q)XePUB*XIo8OpjKN`TdSq^&7ISnN}5K}T+O?H8#L4CHEUvKPh#$zxpPDVbL$(r zQjtFG=8etUTDP^|v}9>irX}m=G^8`e`Z=N-mpNuU*`0Ov9L6=YTi+nvt(X4TK6#;I zx6laV(m~$5h@jDx>lW>X97hod)TsaJazisy+A{c;-JBzGk+f!AvDlvMn-&{SUvy|4 z+w}I9?Hw&m!C?E83l1JHPp0(cJ5=+GI*R>Q^-3t&B$a@ znH$imIaCSfG8w4xQGXos%bCK7I3-#BkIt zw0bs{Gda*&Bz3@2h6M+8<}`5Dj=6qC`HdQiIPZtYCntII8o(QNFZek4=fQbT&*b@J zyYTe;JXchBy+^Q^HIyv^^}}v}n|h^hLuJJ+RTrDyUh(k{-+1*J|B`hmZUilauMoIs zs`MQ$YpSfcyS%xw`Yvx%<^24tt(CQ9n=0owjZ{`QjaF7Pov!pXeXr8X18hI26}EK$ zLHb|>J{W-yM&N@Hcz+|H6>-x;Lc(@EMO^^IybmYmy*I9w<@X|<;`yBj=OXz%8i!=u zk_&;8nHa|f5chlH-@P-LI)QJ^{9)`nj5}}e5-_f;MFE>NuB_!v2CkZA;`>G5=8XIJ zI@HH^3a+UIe-6fuczw+81n0Li?)&^L$cE!Umzua67f;}{#j7TDFEFzIuOz>pTb5_> zee42g_Fs5?3qZ?3Ye5@8J3vv;e$ZW@`#{G)-vW(-ehNAZx&WG8fIVnAXf0?1Xa^_? z+7G%5bRXy#=v$ys&`&{UK^H)?5qq!zv>db+v;kyy?(BVkdDG@yFRto;WnkpVpY(m| z)89V$=eIpRYtPkMWayT@zfQk-*_ZG5r)QTQJNDa)PStLD_RBT*FK*E0J+w(wCVw$| z(G#=QU-yx|tsN_V8M^ZE?_6=>q1}6f&y?M?|M@+?dFYV`uekJB!~I*o@Jjv*-~9Q! z+t$9mJh0>V-IuNV<#S6%+u9EQYVq7>pWautvAOvMZRPf^T++;G^?`MPHLL5c&q-K! zl`0UHG@JGJZ9(cb<4=4MIf0njX=}Qn^(iHg}RfuKvyn~ID~ja z1c+jxY)k|qeM$IJ9N)yG#A@RVphK2164Y0jbixz?`I$1ngRcn4&w7DON`B-D7%_Y$ z#OE+QhOcQ;NLlEiOeWN)EbRQBgrNrKp`Lgc6{p}3e*&@=WlT#!xVVsdGFAiv4cJax*GzRFTkip6=3z#q#8R!kLVOC-rsQVd^t;aZ} zHdOX?HpEKQV|oB&>v0eF;`^R`cBkB~_Y0ODtJ0vSL2ukuFZGW(^knQ1UJ8B+tYrK9 z1~BWTi+aQt)kAN{(jl|;zJokIS;}WDW1SGwWXqg-KLEfdO{vFs&iH%i{S-Q^mve?6 zCtiCGy`MwQXF)v~Lj^q=vW$ss;Pd@8$o9wYxfA%#$#OeUk2D6d_4rN`nh?iPW+z+k ze^6lS9f#g=4R=ho5;*mkCP1u*?cv%c!jUOBsppQu?yf zUqNp+1y-`NDgz2a=Bxvb*|)6O`a(fW-ruPLt&m&)cRDI zJCqPyhYE8=ft%>gI$u(LJD~iM2=0M(6rAf94ERz}1ea%0aOyt@ z&V2w3@_FJhW~{{a{2TJM{4xpdK@8Lj;3v_)0Sk|TKlB-|Plp2iQO{1ae+^*R8h;N~ zMHv*F{j+t+sb2}X-CjmXEe5v7--GdA32e8Q@*9Ee@%Lc-ZzHx6pKdoX<_l-~JhbnC zOFrnp8g#w_Jb>}#%%4{_S3C}EKTi$)A9d){|8p)p;lguJu``D3631ev{ZbcRk$bs3P7l2P#^Z$~vh2p`Yrn;PvGyKnXLsN*xq00{{djW zkL~t-(V@@X<5A%0=Xtq!(jjO2p9W^!!4b>@&YypF$)9)OaR=65?^Rnaa_lemG8bL~ zETab?aN)EI4+6Jg|JZ`9o$Yxm|DF+|h}M$LY98-R#kEFPlWjqaE$&DAM&v zO7Bjjxb%^=(c!T;CdUedx-Ny$ezBTz3J8#y=7~Vp`EhV zcAmd|rYb_bU+|8tO}B1thL%Gjqe6wgv31+cO|AO24I4UII`z(`n_F9SM?7I;qaFFj z0g!Qn;cQL?N~&PR85;j*Flz6*wE=`6>glj<#&XGhfv#S`A5d1rp$dU?y0bz)-!ooQ z1wlG3tUyK;7C9}bbB2gAqE$s-PAk;f3Y!^TDkCqQLe*cZIVyJ5{xacIv)el}EY%8c z#q@FX6)~JnOIM^W<3?wSBiWQ5!`FrBK-j5hS6Aq%3i6z3?TYt&7a/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/echoserver/echoserver.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "echoserver:examples/echoserver/echoserver:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "echoserver:examples/echoserver/echoserver:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "echoserver:examples/echoserver/echoserver:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'echoserver' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj b/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj new file mode 100755 index 00000000..539b2e78 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.c b/project1/cyassl-3.0.0/examples/echoserver/echoserver.c new file mode 100644 index 00000000..945fc126 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/echoserver/echoserver.c @@ -0,0 +1,360 @@ +/* echoserver.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if defined(CYASSL_MDK_ARM) + #include + #include + #include + #include "cyassl_MDK_ARM.h" +#endif + +#include +#include + +#ifndef NO_MAIN_DRIVER + #define ECHO_OUT +#endif + +#include "examples/echoserver/echoserver.h" + + +#ifdef SESSION_STATS + CYASSL_API void PrintSessionStats(void); +#endif + +#define SVR_COMMAND_SIZE 256 + +static void SignalReady(void* args, word16 port) +{ +#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) + /* signal ready to tcp_accept */ + func_args* server_args = (func_args*)args; + tcp_ready* ready = server_args->signal; + pthread_mutex_lock(&ready->mutex); + ready->ready = 1; + ready->port = port; + pthread_cond_signal(&ready->cond); + pthread_mutex_unlock(&ready->mutex); +#endif + (void)args; + (void)port; +} + + +THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) +{ + SOCKET_T sockfd = 0; + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + + int doDTLS = 0; + int doPSK = 0; + int outCreated = 0; + int shutDown = 0; + int useAnyAddr = 0; + word16 port = yasslPort; + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + +#ifdef ECHO_OUT + FILE* fout = stdout; + if (argc >= 2) { + fout = fopen(argv[1], "w"); + outCreated = 1; + } + if (!fout) err_sys("can't open output file"); +#endif + (void)outCreated; + (void)argc; + (void)argv; + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef CYASSL_DTLS + doDTLS = 1; +#endif + +#ifdef CYASSL_LEANPSK + doPSK = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + doPSK = 1; +#endif + + #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ + !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) + port = 0; + #endif + #if defined(USE_ANY_ADDR) + useAnyAddr = 1; + #endif + tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); + +#if defined(CYASSL_DTLS) + method = CyaDTLSv1_server_method(); +#elif !defined(NO_TLS) + method = CyaSSLv23_server_method(); +#else + method = CyaSSLv3_server_method(); +#endif + ctx = CyaSSL_CTX_new(method); + /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#ifndef NO_FILESYSTEM + if (doPSK == 0) { + #ifdef HAVE_NTRU + /* ntru */ + if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load ntru cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) + != SSL_SUCCESS) + err_sys("can't load ntru key file, " + "Please run from CyaSSL home dir"); + #elif defined(HAVE_ECC) + /* ecc */ + if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #elif defined(NO_CERTS) + /* do nothing, just don't load cert files */ + #else + /* normal */ + if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, " + "Please run from CyaSSL home dir"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server key file, " + "Please run from CyaSSL home dir"); + #endif + } /* doPSK */ +#elif !defined(NO_CERTS) + if (!doPSK) { + load_buffer(ctx, svrCert, CYASSL_CERT); + load_buffer(ctx, svrKey, CYASSL_KEY); + } +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); +#endif + + if (doPSK) { +#ifndef NO_PSK + const char *defaultCipherList; + + CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 2"); +#endif + } + + SignalReady(args, port); + + while (!shutDown) { + CYASSL* ssl = 0; + char command[SVR_COMMAND_SIZE+1]; + int echoSz = 0; + int clientfd; + int firstRead = 1; + int gotFirstG = 0; + +#ifndef CYASSL_DTLS + SOCKADDR_IN_T client; + socklen_t client_len = sizeof(client); + clientfd = accept(sockfd, (struct sockaddr*)&client, + (ACCEPT_THIRD_T)&client_len); +#else + clientfd = udp_read_connect(sockfd); +#endif + if (clientfd == -1) err_sys("tcp accept failed"); + + ssl = CyaSSL_new(ctx); + if (ssl == NULL) err_sys("SSL_new failed"); + CyaSSL_set_fd(ssl, clientfd); + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #elif !defined(NO_CERTS) + SetDH(ssl); /* will repick suites with DHE, higher than PSK */ + #endif + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + printf("SSL_accept failed\n"); + CyaSSL_free(ssl); + CloseSocket(clientfd); + continue; + } +#if defined(PEER_INFO) + showPeer(ssl); +#endif + + while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { + + if (firstRead == 1) { + firstRead = 0; /* browser may send 1 byte 'G' to start */ + if (echoSz == 1 && command[0] == 'G') { + gotFirstG = 1; + continue; + } + } + else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { + strncpy(command, "GET", 4); + /* fall through to normal GET */ + } + + if ( strncmp(command, "quit", 4) == 0) { + printf("client sent quit command: shutting down!\n"); + shutDown = 1; + break; + } + if ( strncmp(command, "break", 5) == 0) { + printf("client sent break command: closing session!\n"); + break; + } +#ifdef SESSION_STATS + if ( strncmp(command, "printstats", 10) == 0) { + PrintSessionStats(); + break; + } +#endif + if ( strncmp(command, "GET", 3) == 0) { + char type[] = "HTTP/1.0 200 ok\r\nContent-type:" + " text/html\r\n\r\n"; + char header[] = "\n

\n";
+                char body[]   = "greetings from CyaSSL\n";
+                char footer[] = "\r\n\r\n";
+            
+                strncpy(command, type, sizeof(type));
+                echoSz = sizeof(type) - 1;
+
+                strncpy(&command[echoSz], header, sizeof(header));
+                echoSz += (int)sizeof(header) - 1;
+                strncpy(&command[echoSz], body, sizeof(body));
+                echoSz += (int)sizeof(body) - 1;
+                strncpy(&command[echoSz], footer, sizeof(footer));
+                echoSz += (int)sizeof(footer);
+
+                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                    err_sys("SSL_write failed");
+                break;
+            }
+            command[echoSz] = 0;
+
+            #ifdef ECHO_OUT
+                fputs(command, fout);
+            #endif
+
+            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
+                err_sys("SSL_write failed");
+        }
+#ifndef CYASSL_DTLS
+        CyaSSL_shutdown(ssl);
+#endif
+        CyaSSL_free(ssl);
+        CloseSocket(clientfd);
+#ifdef CYASSL_DTLS
+        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
+        SignalReady(args, port);
+#endif
+    }
+
+    CloseSocket(sockfd);
+    CyaSSL_CTX_free(ctx);
+
+#ifdef ECHO_OUT
+    if (outCreated)
+        fclose(fout);
+#endif
+
+    ((func_args*)args)->return_code = 0;
+    return 0;
+}
+
+
+/* so overall tests can pull in test function */
+#ifndef NO_MAIN_DRIVER
+
+    int main(int argc, char** argv)
+    {
+        func_args args;
+
+#ifdef HAVE_CAVIUM
+        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
+        if (ret != 0)
+            err_sys("Cavium OpenNitroxDevice failed");
+#endif /* HAVE_CAVIUM */
+
+        StartTCP();
+
+        args.argc = argc;
+        args.argv = argv;
+
+        CyaSSL_Init();
+#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
+        CyaSSL_Debugging_ON();
+#endif
+        if (CurrentDir("echoserver"))
+            ChangeDirBack(2);
+        else if (CurrentDir("Debug") || CurrentDir("Release"))
+            ChangeDirBack(3);
+        echoserver_test(&args);
+        CyaSSL_Cleanup();
+
+#ifdef HAVE_CAVIUM
+        CspShutdown(CAVIUM_DEV_ID);
+#endif
+        return args.return_code;
+    }
+
+        
+#endif /* NO_MAIN_DRIVER */
+
+
+
+
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.h b/project1/cyassl-3.0.0/examples/echoserver/echoserver.h
new file mode 100644
index 00000000..2e229ac0
--- /dev/null
+++ b/project1/cyassl-3.0.0/examples/echoserver/echoserver.h
@@ -0,0 +1,24 @@
+/* echoserver.h
+ *
+ * Copyright (C) 2006-2014 wolfSSL Inc.
+ *
+ * This file is part of CyaSSL.
+ *
+ * CyaSSL 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.
+ *
+ * CyaSSL 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-1301, USA
+ */
+
+#pragma once
+
+THREAD_RETURN CYASSL_THREAD echoserver_test(void* args);
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.o b/project1/cyassl-3.0.0/examples/echoserver/echoserver.o
new file mode 100644
index 0000000000000000000000000000000000000000..34f82d5ea9244f7b00eb05c87dbff06a9703e424
GIT binary patch
literal 6876
zcmbVR4RBP|6+R&wnvH?*BmNYWM_3UmY<~GQq=9Vs(G>y-paoesyKj>nvOnE@3&dd*
znxqm}sIB#{j@mj(9ZPLHV_U80M4{l=s-3n>ol!@sqZOf3X{SiFnttDV_a@7ecC=65
ze)qfQ+;h)4_rCki3pcj}mlYKi6^puxq*#hH0q!VwNWBd+rChwSu5H8mT_+EGN#s5D
zZrpW{!;kd&4ylnbw4X=2^NRcvzTZKww{g^t%KS1;Au1^tG~Q2ZkxPhO<#V+@cKAjbrLK?M`i4kFisE
z0oDYD7Ss$vr-8ai&mdrTz*n7zz+P$FQYkl$DKP5NgV`V-qNm}Ij8=>D>_qsKZ0ik
zI!-Q;W^L2D?lV#(a9Fzba9=%Vlsq=7S}`Y3%U4>M=7k>&{EJDc=z9mjAD=Zct=c9O
z9?yS*ecnrZw1tgu2b=cOQaT4s+jN0Kz?V?c8RwL)SJDg5DQzA&tR9ky!*VqxpC2a|
zBhzv+$E%Z2|IEAr-+Cn;kKo)B}1!kJ=~qpMzbL7NBHk)~1%m72j_hj`v?4sE>t
zpfmf48452|c!9#P3P(F=XTw=c<=YXD5Ai#zh?BJUWc9$yg$HRYzo=rvV8yI}&#+fI
zFQ=O#9xI^iDJwi1{|qyGf<9lqwLIT6E-wS^*lt|3a_3o(A)Cf1i9L6uG=}_Eo~U&9
zoNW_h?Wc($W2nbIaXdbPdQ=8RZ{J1<13(;Ov;=)q*q0v-f2QD>FGnKLIgSq|u+%oC
z1}avaEr>BW1B$u3MUR<<5p`P*=yV21{M;}G`w&NF5C
ze9p7r89uA}2d#ywuS!STKe(rG4OQ?MkoxE;`F}^%pUnTYExn
zF1<_7;cV9zv1qMO9&*z-Z_44o!Bt2-mG*Oc)+Tm)vIlETua12h8}
z-gr>t-Mj8zymI5)vv-`@dGMJ(_U!%kFL!-o&C?~DzhXphzpCel>5nEoblq=`PT#lh
zZ{9=ID~>)?b@$W;W5RtaWNh+{(NhkTG|s=IXI0zfZ-y^@`q|0*@7r`k;FVE}w;tR4
z{(V2bck;x24R^14;8gDeKYwk)nt312@UMULmPrfVe0BQa*4F;Frj9xK!WQnoZ4wD5
zFSm?T+Dsa$oR!X5Ml9ZKioYsiW~^*g*34`*GjmA%X)~eJyHnw);fM^1>@l;A)^0PL
zHH}OzX~Z(Agwfm+Zfgq~U8#g=MB^E^(Jf}rf3XS4=QL?W(ndHEG1KrN49BB_8AC~P
zo2D)8MwR{E`+6>JNk_&EZ;=)4?X6Wc{%WJPy4px>8B^ArN?K;pnq&2(%|(V~Znvts
ztVH*ivN2`Sz*b{JM=IK5EM4BbI=Fi6;>zhU`>Jd#Ye;9z#xm*5n5Gp^c4iAB$KWcC
zYizL1HQM&*-?mKLGPQ?hq$}m*QUYd2u2a^Ub{@s=ufqQd*ot%^i-wglF2gi-v}KZu
zrj1A{nKUEA8OWHCt#4ZsSH*%Ye`Qyo9#BtOeU3C1h2}d63JyUP~(b!6guav@npDrmNByfJ2+}UJs4bn
z4adw9@n_6#KX--r={f=te@8Ye{$$EB{mWOao0GM|kuBoSc4e)M74ASwV^6~7(XbVU
zofMJ68h_0^7q^4|oIfnYaE{1mrO$7XTKm21bnqR+i#lGr<@~gx;MrX)Ql@0o_;@0_m1MPm?{M4d<>!AA_+Isx;
z;C}$u^L4@3x4?D2-v(caTig2x?Hh3Gcwa<&I&OZ2(Efh3PovF`2l9R3yk_Gr!YVM9
zYP7jO$v*_%fZOqBwA3TNYoMd^>(9j@`^uK9l88vhd)Kj<2NlS@A2^4H_iKjP9Kbn&NL
ze4Wc)+GTH|OMjv(9-oVgxjmdncbnO&k*cep>5s@rf546RP{OpjQc?D^T4`>-
zmL;mPQd`)a%bFop)bUt661L2cQ;gfQ)w}gtGx4p^x!UY0RGX{SVkk*bOrf^KMDVt5
zzM#C%iY^aDm5o}T9w`S=F@|C&rA;fa!r!Sdt)=L0Pox7YGS7`h%{u@UuLZgqet>d(I*4!o=pehOq=chkh)D>Mi5A
zXdATavboOeb@OyQTr4}4F`Y~5)y{{W-9Q;ZFq!C2Mu`B*O_);z=w-I2whQc1F$3Kr9PWtWesv!Wa)0S$6PCJ1NI^Ll`&nl4xM97!c@5OyM;;Y&ok)Q%CCq2@r$Uc6Ws
zyB9^$c;c5)GZH6@Oe4aVS;UE`lZhynt^|6n!5^fFE%*l$Aos@>@+OfUpm!4DC%;PM
z5hC*NlIlN7eznLyiEB}xA=jQYB1?#^sCS4MNBJwLB{W(fLU*tFuA1j{_*Q0($&b%m+F9dovAWm|8L(C@nMC#d(JO+pucP$a)
zVw8LFjYE!cH<3gCo8-{HiwOP4h|qtMaum0R$f5r-IsU}>7CF}Sed1D)GwdIWhX6h?
Rj#41)jw6TNX~cOV{{bpvQ#Akp

literal 0
HcmV?d00001

diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln b/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln
new file mode 100755
index 00000000..6bda3549
--- /dev/null
+++ b/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoserver", "echoserver.vcproj", "{4F3F3EF1-BB95-466A-87B2-A91C059D0197}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Debug|Win32.Build.0 = Debug|Win32
+		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Release|Win32.ActiveCfg = Release|Win32
+		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj b/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj
new file mode 100755
index 00000000..0fc396f0
--- /dev/null
+++ b/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj
@@ -0,0 +1,197 @@
+
+
+	
+		
+	
+	
+	
+	
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+	
+	
+	
+	
+		
+			
+			
+		
+		
+		
+		
+		
+	
+	
+	
+
diff --git a/project1/cyassl-3.0.0/examples/echoserver/include.am b/project1/cyassl-3.0.0/examples/echoserver/include.am
new file mode 100644
index 00000000..f207d475
--- /dev/null
+++ b/project1/cyassl-3.0.0/examples/echoserver/include.am
@@ -0,0 +1,18 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+
+if BUILD_EXAMPLES
+noinst_PROGRAMS += examples/echoserver/echoserver
+noinst_HEADERS += examples/echoserver/echoserver.h
+examples_echoserver_echoserver_SOURCES      = examples/echoserver/echoserver.c
+examples_echoserver_echoserver_LDADD        = src/libcyassl.la
+examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la
+endif
+EXTRA_DIST += examples/echoserver/echoserver.sln
+EXTRA_DIST += examples/echoserver/echoserver-ntru.vcproj
+EXTRA_DIST += examples/echoserver/echoserver.vcproj
+
+dist_example_DATA+= examples/echoserver/echoserver.c
+DISTCLEANFILES+= examples/echoserver/.libs/echoserver
diff --git a/project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o b/project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o
new file mode 100644
index 0000000000000000000000000000000000000000..6a26b34ddeaa804b95c4760247b4d5f825234a6b
GIT binary patch
literal 5868
zcmbVQ3vg7`8U8ofKsE$|yhH)LhLu;tCL6-j5P@t6+65vB4~wvDcJGpH_T}EYfhe`a
zBqKX%Xgk(|rL~pmP&%b8owjzSqQ>$FR0kMFv{SV@bf$%ZwbYJUOQqj`?>W0S7dq{D
znY-Wl&i^?7`OmrM{Nc+D{^bsbqmaboph9v;0(`Z^BsB)ipi*+t+UE7^x~?1YT>Dyk~pLAv`%z+|oSdx{g9};z5%)m^4|ASQU(8)``ED_$3{zUvn3lo<(>w`_(TKR;Y+@ecvOC

|if?I=DxN znFuSFpwe86Wf*QWXOoBBDP2n&BfArLDRg(0cK|xItcwL30POO)YqEZ01h(c4Vy@Tm z!;aqf%69)1I+)yo?j118l(RK@sQcdz;UMEb?AUq4@YR@Ea`~qp!l9JuRhBSIjYY@u z$(d(HAgu%7jSVd_oSW)rPm5gXF^k;XL`bsqr$=v)B7HgO<`X>?JQ`(V?qX|F7hcR> zE$jK{)9cqSjl$ybY%g(&gg3D>F!Kd$ed(?nM3+Y8yRf~nC7$GAoW_J_qiKYn53b+m zjtl9un@ZOS>8&@F)@P4nm+)$h&B?`(`Hw3$ryM8?tm@grrur+65#Vf%dUD)=-LF!YFc9crKXONQSCJp=vb_gvOH3r7u3 z1OBSzXwaz0wR49S#w71R*D*ffHU~CtI%=-UWsksV0`CwwLEtEX!%Q?X*3Hi35Q9!P z1~*rl57F)`wb|FRXRN1aq|Z~fexPio&#f5w=%Wvpgq*rhxD;8!iO_R9T=o0i?!Knd zz9pmkDBFS^%WGRI&p7xfpvcR|iz8T}^2_BBEQ7UYs884$`-KCBq7%EE5HN%Iva-X= zb{!H@o(H5Or4$yExvy_HVw#M@q7;)x=V<B+0Lo*REE^Fu2pJkxR5ww=EsjRT*I>oKix`L_!Va=8#rH9YzMl zoH~P=7E{!8I+DhrYmFZxc?dNg4<^Eklu#_GVaAYYS~Qus z%P_O*bH?-PT3bfv3@PE{HlYj)&c@L7qqVJ>gr0%>Ae6EB*ts&tQ#0F}F(h-88G3N5 zR=K9Z->|f~Auy+=G7?P$V>6W*t=N8H1?qnPx|M7*6FWJr#yq^F$R}PoUKM9)e8^9R@x%S#N~EDj+{&FoD%()A*JCZUf`Ce1f9( zmt4xQsQ4=(|FB+Lp5}bqgFZgXUau?ZtwB7Y1*j%}dSl8023-ABHn{Gk7~VS1&BTAN(xHmyK_-Oo{d5HqN!Rd{|y%#;c_>Ap854E&dBO zKE-BVVdGEP^nYgKf41?LZ2W@F-)@`yOTcpk?VYe?x$agFq~* zq2eJ_XucMIbB8xzx(mcry)7B$e!iLOTQ+blMIJw2d)D5JrUtn3i$nFz*JiYAcxU^tAhjB1p`I_GOy;*yoESi!I{!>X3UR#(Y*=F0~Dzk|>B z5?tadfzIjXo#(_QunF9SZ|Gs}|D1XDyKwpMWj>4OMaFy0JIPr`^n2z@i2ea|O(MF+ zd?{Xhmrf56fA7wDL`{s#a5pl}C+cOaH17?km*`n=*JPp}F;2mspDf2E#doh0msb&D za#j(o0lE-;g!yu!$C;x@+bj5f=D0kc6MTR{0;9L3__85?j{AqJ<9 vXc=QY(H6$Jm=EJ3q60wJD59S*qNaR~(S`lQh+^s_BjP#>_j_3dfRrR>mcqp4l|>ycbC0`JL=--Xb=S4^#ebL8FghGMmq*IDkAtn-{+}1CpkI5 z{_eeh-X8}lZ$0(C_10VUR@JFA+%t@ah5EC%Lh{U(K)8zzPPMWNOq}j5SVu~0^5%KSzDvS$1Hs3?w5bOtuEU6{^$RBaqEAPSBb#-Gv6k*`r)#nOq-9e z5MfT`n@67d%RL*m|IJ^z4*qDxxF<88jp%v((-B||xbj$_ag79($}M=7jZfRnOGD%j zG{(4?|Bp1vxQH)jMU9L23mgBpHvF|s-`8elQ07nB^!+cJ{G&Gc7i|1Vw(>r*@&C=H z|00`w$RX@`aZ2G{k>t<2TssA8X@J zvgw~=!?)Vx|7yeIZ1&dMux_!B{ykvJ|F{h|+vF$P_`kN*=Q$gHn+-3t$+z0+2gm#KV*|n*!VG9 z{l2lukFx2n1HS)N%)Ph@FoUfIe!34|DALeh_fMGH!9QQP#7zU_FBGpc-(4#INO7Kc z9p#rop87@#Ojnpg8(V$xc!(3|RN<|vTjcczVu97oaXk>LTQoNm2?y$Y4WWSWdRMnZ z!rr*?$Lvb%t z8xyfuAgp`!=9WMtppg@cD(eIo#ZrhjO8a&u<7K-ssbt zBjLE2g#tFCpfe5;Q=%yr2$*rR*wwK}BI<1k#N)ozs5WX;QCD5Nw!}LbR>hzIJUtlk zlcN|Vr!v?cwE?}ZC0en-UO;1WGzcvrc)?_`x=m6eGp>s@>wRYV8XE)AKEb(FH47@2 z%9afKT1=s}Q%-LItCWZbyfv}rwLU%YH-T1fQ!~76cnJoUhh(coVttKPWo_Y5z!y$L zO?llL&4Xs>vik&p4a_Lgldodnj(87V#!Z9?Bv8WzoUnDLT zjgfFT(5Q=8pmA+eEYczxLy>quG&P3xkQ{$1o40BSboraZbcbKWVNpOAf%WLjC?eJv zjEQ*j>aZ_F7;cQVifBTQLjeYASi}P%meCSupGf6>q!_KU`#zd0tF!>F9k z?~h4I=s+{DqzJlCi;s@RFmKdbqXBON2a7;s1S4_1p;dMzpvHB6;nO3{RNmMUg*c}W zV^(PKHHU>a;P>f1FdE`Fu%HL&Rp+gw1^p-f>|hE{!^%@QWw_aq%dd!>G?ublj25KLyCumI#Mi% zSCD>Bh?S%l2vJY^eIfj$SU3ksFU0MF^dcdmq+^B9NyiDXp7aMoY#_Z@h&EExx1ChO z8k+P{A?_r-Oo&d>%Z0d?)Gfpo((yt(KzfA`TS>1J;vv!rLOen`QHbrNR|&C$^oK$` zMv6t)PSPUW8%aGvbdloOV-IPu5c^3>@O(o$8S5ZYJY2m&I#q~+q|=0WhxBS84v|h5 z;xOq9A+n@ctQ;YojdcR)H9{OE#WT`z((CZ7L|TRpfP3^g<>*(WbA)h`&V~O;D}<;` z9&u*Zp|jk!`$LGOli%iYxsEP@U)l6VX;AA!1eNIZ^MBi<^pMvRsg-JKGxmyB?v&V1yo0z+;vn%( z;;6(S;x6KPiKE2(iEAX*i4PE$NxYu;AaSw88;B1PYZA8+XNe0WZYS;~77}kFK2F^G z9qWH5G3FuEU*b+;C-DJ^?sN zA)Zbgm3TXG8F9VDJBSw$*GT*raSd^q#5;*s5Eo1QG;uw#CUF;WkhnnNJ;YIBA@P3V z^~Aj#E8|}zZX-S<@d4sZ#0MmPgSeBpOX7pXTZnf^{0{L};;j-NB7TIpQ{uzKJBZsP z&Jyn=j!JxlxQn=6;$GtY#5EEhB|bo0Ch>9NgT%!We@lFbSd*ADMlefUATei-U@x(d zm@`Q5IC1YctUqUxAn$qIhk#2yUX}WD@^EiW-O^w&*7w1#Z4T%4%Y$G3+TqN8iUvH| z)M@>f9_QX|#XElibwv;0PxAPXb$Pql(FNwCW6M&1O&%Gu&*3I7ci@HHnJ38FNhsxa z9nViax9g)z@(#RuJdwBicQWH^X2w*7+hJyY?S9>-GD0X z9n7@67ruaHzdVi?PALBp(~t}L3?T=Gbhjc)XLlTbn>ss})!wlDwj#b;Zn|yv z-I%2_$vuC_Uv!&bJ1x`%A&Q!H~WqN@Fq#gp*xFZYD z>1b||NuPHRN~+!NO!^C|t9DPwq~BJtLP*s>NHjgU`iJ0@?kjV`qFg%3Cqa}PO1%q_ zAVol7lcWm_y27Ak2CXwF?hr!soSW`o2ZffxwC)ad97~Md*TF8xYhMRTAb5s zlhu*a2e(}(5;e1Q_exi01J(xV3U_^a_Kvpeid-Fqz->Rt6R!5l5KHxBlFz@RS|~N! zo!xtaHz8O1GVtc7o}#{aso%<)yqkgrnRR)op44xd{&(kWs&M;V&m2!}KvYQLJ%^?5TBftagXej!h|9>2fq? zD3xK^Jq4-9*$(}6Pv)+5-8BPA$(-*eqmsErKbf4&mAl$s#7x=!A6OP8_dS@*jdtDf z7UJpl->-nP^0K)@@Bm+!itc}fU}pZK$>aI1+kc68GPgJ}9NYzx`}Z=X*44g|`tG3) z(-9N8V@QMKbf^*C0R_rrwiN((IS9UPdX{x>u_fmp}FAZ(k8T7 z2j~CpNhlS?)JXA@7{CB4B=}5$pah2jtcn~;QFZdT!*%;UGCxUuk*z@sV-#Yt5I|eu zez{eWU6PM?5eCzy4qcxJn{3y=;Q|U*qtyV_asMxt8#zOD4C`YOP(0y`e~Qz ziT%kJP9kZA(3huP&Lj)ok`-`flJC7KW9SnC4smwbeFdk0{PKOYx+7KSPJNTDf=u#wo~z?9 z*r-~W(9cyIsqa|ga^#s{$io{>nu>gXK4#>50{MpO?%7h%eX8Jem@EspPZcm-=;avG z*PsxplMMiC*y2$8C#Xe%g%&-OKxOJpLvMs0Wno4&ar^a5!NA(r?mh_N0tDqZPsuSv z>YzB2oc=bPU%A(HLzin}yZaDi^m1hKr`}72-1XflB%Dz?iW%0`{sO9Q$#Fh97PGpZ zVe>#w_GWk>Esj+L^BnqY)WV;F8@|bYV3_$VDx0~}eHbOBYlfxE3eqA~=XN5qBQ=cv z`uUf+oSfE>x3prMwt8}MZ2RXgx{_@3{Jjbr1JQqVudX8#%o$9#<&_3`S1+1Pke8cKz zt0=O!*&@Eo`z`|#(=bEVXXj?AsP+9eo0hmASsj-US4a8jqhK{X9)DT0yw&S%hn>b#Y`7q+1+fS~@u$8{y|OEJ$*xbw=Dm_B&x7W=UAe(ny9ALt z;mmXtzlU4LkW5DbXbO{6PxeMyg+}kmz9Q{?l6JWk>_WF>S3>tV0>Z1L>q!kHvt7CT z)6_TLe(^8qI(IM)hYfw~UUr0j8R^hZAps8K@UhV~3s8k&X;x#U+kxuU!4Nc>yfeUz zgS~9qCs{Fla!1$SatReg75yD|wzG&Q*%=dKEU8p4@8F62k{6I3I<_l6QIkB8m)h&< z_zpK3RliGQ{eH*nuJ$8bn#gK9m7Ch%=o4IvCXr%racVc0DLcvAhqWW@%fi0Y3Ahnc zcu(pjx*Hlf2R*~y@|<#@enIL$^3X{vy;51oe&=ex1&VqcbYc4o`o-M=szi685#K@W z-B2rUo9Fe}5oSqHpXq4+6JpX`7k!GDv|D3LrZv%pQf@<^+~=Pltv92)e^Cvx*U_$+*^+FV9Rx3DVHV$$eGMGLgOJl@@lQgodz38x1xB5S$~Ty3 zMLuhfFJglq;*%u$fF|>3?qQ}uJ;BmOD{vrGoV)@Ar`%^KtMRvJNtub;QL_=hf z@{wEiv5AKMVkspb%4Pb^M*0|;E+5Qg`rSslkm*rF>+MqORs-o09WqdpMB=}cpNaBJ~Of7 z-R(A=%3Kqm2ahN-jI>E?p~EsQQi_$%*>6vIjD(c9|NjC2(KBEqLN=}sW z@2sadnXVm@k~Gzu+*5#ga<_FbjG=zmgZ3SrUeKHD>YbRD3Si$)vqsn8`>N!Tai&d& zCrX=2rA^lvHtko9RD3#{)a0FaJS8XbSxLhxNl|z)3ZL3>OfN|XduM#-n)96;Af zW6;uA_c*gNV9UgRp=E5W6s-H|L$oleG)_+a*4Klb%Wf#iEw9Z!56|4Tdn&Aj@m#57 zetYyJn!E@(Gs#{=C+^*KG9M*hsooPp^>p0LP_7fvQks#w_bCb{_vOv_D)AmlyJ?m8 z=G{HRJFV9jyN%ySYGsMLC!j>@k0P8d_#52D=X1Gd5ne{P{?%OWZG$pyhAh&)GSY|a z&E?AWKc9k*3>WK8h=XGN`y-1t_d)eBssz7DbAy3~3je?BYV;X-Yq0Gg9yoLP18a>&5^}GJc8xaP zU#N|bpDXw)zS=keccO0CS|L4%c9YvWX7)+(r+ia}x#ZppGeI?xs0cJ9R*R+h6&_{@ zk7ttluYPu?N5;pE9Onu>qWeOcrpb*JahfzEl;}^M)2avJT3>QB;9CP>&6aFzlCdXS zx`WmnH>+TJIG(_+5i?zGK#)DfsJ}{JhcFWK#;7*1iTbw-XthhcODmVvR+d*(EbXrv za&WtWRfF20V5X>j4Sg9b3hU<9co#3JsH`r(v5#Fc`D#xw{*{PuM8oikq3=Xu=w{d# zlki71V{e72+}vVeVxw2qS~sy6JgG;I`OurOX(AG96>=MtCcBC9eNj}KjZt?kTfc@w z5NCc1xJEzE=Hcxqf9&0(}3GDa4-Xc@W zfO3lH1+(K}l;a0)<1!|SDRh>$cu8I5O!jVRNnDEsLfCY*R!&UzdBVtFbe(CWrY#7B zqJ^5=!lLOxbm9beS(zm%S`^Y|V*`qG&0M)xN_wVGsL0>1ucA3Fr$seEYn-6fG}b3A zL{US({2caQxY`$P)v%2w5Nq-^V$g)K&j#~Aq)EfR7+;88P>X~^tx`)72CR84!@LxY z1+?0rFBb4~zKe?@-Q;Roo$Pc*L#V!oDh{k*QKDa-`j%DHXxuhcsA2PthHf@l_FuJ= zN}FJK34IByDHay@MDr?Y>en|funx0-6g?k%e;A{(=ZGp2baJB``w!qmI`2V#9ivPjkEI?rW@W|a47UF@OnBUfr@*5g#PL$s$ za>o_FO~hv=@|$#gULyE-j?YcRQEd92NYGK>7VA4aR3NlHx~-$c{8N8-p@0 zewdGp0Y>!y`jX$z8@ZO_d(0+;wFny#HY039cmiQB!dnO*ARI#&^7jts1qfFlOhcH5 zupFTYVJ*T&gv|)s5S~ETi|`i02MEUyhIAr7!W9V95auB)M`%J=i?9)4Gr~56ClK}` zyoK-q!ZCy)cOyT-6$sN1<{>OcXhK+vun}Q1!Zw5_5cVRxh42BwF@zyF-{1m-D-fn3 z%tKg?U^d_fn}2>y)lGjX-0)f3?%%)Bde`0me%tNWKQ(yORhqwZVe3Cdzy98@Zv4+T zFW$p;^Qd*t=gzPiG*{E<7pH~qbXm+!5q>3IK=;cxC= zlRtm%+?m>hWeth2p3q7?(>;@mN@gS^ESabhgu!hL`S9|~_^m~o;wddEQG!#n3A%4} zeA3d&>dNxkO7E1?N%#iQ7n-O|Xuz)lcxM>as;ieTVjlc-=83nq=)ML}J*H^TjLFxH zQQ^U><$$MrPE`@~8fbMm;b}-T{KhZnJw zSCME)7asYotVa*5M_hh4>4`<;*L$8o5Z`O!1)evEj|KaX%Hj3JV!l?D!;JrrMue>}1jr4gS43QuFCr3LTtP5=L&P|gFKD>w$_Sr-5tqvk~(ugejzZ$-+< zGbzB(fX$0@2QPdE)+e_K^9J7ux+O>bG36=%vByx3ea<)hEqFH4IPdVH9K&J+&N;M? z^H3IYJHX()gs7C^JHh1$oQo*Od20&<+Ni*|D9dXVf;s1Kz8M4Mn~`Rg%lr&$5I9FM z&UtDFeTn*%81wnYRTwdD{XrGk(4dk%H!cB&8nfe|BHsy54>5%I*g+NWYXAnmf z)jR2zai$8s3p9BYH{<_-xXX|`3b~_akb4UMM8^{h%BhS_~NyQ}=Pi zSw8LK7e4nxPD9+hOu6rnKz+pqgK{xb$l#IB`!#i$*LibLS2B#tjFQr~=Cx-&`U4gT z_)JxfS(eMbz&>x)H+m_y&d^}vGWD6*N;w}950aLvvv3qvC3AjJSe3weL}68H&KC-+ z(a3p0VdXt@y)j76SZbUrz7&(|7KK?0v@^#yu0evUA=D4!j&zWmp@iT#RG1@L$n%F3 z=IX2eY=}X!C#&(J`0TO3=>H00K|-z8 z*e@0T0us4yBN-%DYp4(UkHTX}WPehatH%Co5LS&=zd6KbIo8-LKM$)w=GbbiMe?y* z*#msQg3E!;H7xlz0Lw4bK=Y8h3Dm4#9_~mPV6J;X(C>ze`$2iG5^)|*+t|s7anYVv z5ih$}@wr?2kHFXevLC+>{PIuxaS!lD3qA@wb#p(T<7bWqb4(1eU>EQb3+CqUw=McE z1s-MLUj@94;-@KX5bnNjsaI$@U6f% zSa3V=3e4}QHZGUo7SZh%ycu{4`U?o!e~fq#kukt+2Hpnz-op+j*8}ty_fY*9xWT|r z0~g>k%3m9pU%kBcD~FS3E>Zp!(4El7k<9+^F7P83+ylJbf=>YNuwZ`w|Cj}X-FLBn ze2-Je4pqNA%zBptTl;UHFd~%a*-K`BKf^ThH2YsVQGpk@XvA!zDIc zX~R4V$h??;jSc_Uh99)yM{W378-B@#KeXW!z^4Cr7SRygvg$G4#c*q&e@B`NO4vsG zF0)__xWt0VF9#lt{*S0QKYxr^Y~!!8;RJ9U`XkNaSx4KvJh6fvW z5@ePAcMPz(e&X3#7u)!SHhhf@FSB9YhD9T`jp~V}CJztYSvYs8x4Npf4kv5%pTFhR zTf8_eC>)66^dNO4mnF&T^+&v`Ly-nw$m`c}K9kp%STFE|9SsHafZsE1>WpG&K8=t( zBS}5E<7gi2suSv2-=An{X+;(blE-Nc5Dl#Nv4r>}wdunYpHw8hWNpH6x~;Y1Ff@ zuBzBeJu*@vuvf5RfoHWrqeAZ1n#VK1WNeW-BuU1X1{7E(_oubAV$&_oQSyZOHYJjX zEef>M>OMV=1COkzWB{5x08K&L&s$o)sM1@xxPoV_$!=lB`Ld?Z6FBIs;>N}0i>l^A z%EFPyvkC9~>Lqi^tG!F+&8w}f^VXHmsjl>5~z1Vjp_{ zd3AJ~dCuJFj&HM_vIgsMpqW)^ODo2(FSgno7V5Y|9&BcnvWyw|3RP~MwhC|)v=tj| zH_)^*916%LRVO3LbJN&yg9ADY#v>1av+6ewT5F1WgX@H>1S~)$`VV0C4 zl#}d?^u7c4)Rt#!VJM&H(OHv>OlLa&4;@*Zb9lN_Bav6R%6{}8&zU<-A>0dUcE2+o z8mTs^o+h_Bux)2Jdc8R8(wugA3Z{9(9dHJwrJDU`>7A|++Zl{-Y5y^LR(WFsyESRR n0hXLqFudfEfmR_Ha;9Sx`H2E6i9N-qoa#8>aKC/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/server/server.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "server:examples/server/server:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "server:examples/server/server:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "server:examples/server/server:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'server' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj b/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj new file mode 100755 index 00000000..c6e204b7 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/server/server.c b/project1/cyassl-3.0.0/examples/server/server.c new file mode 100644 index 00000000..85058cac --- /dev/null +++ b/project1/cyassl-3.0.0/examples/server/server.c @@ -0,0 +1,602 @@ +/* server.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) + /* in case memory tracker wants stats */ + #define CYASSL_TRACK_MEMORY +#endif + +#if defined(CYASSL_MDK_ARM) + #include + #include + #include + #include "cyassl_MDK_ARM.h" +#endif + +#include +#include + +#include "examples/server/server.h" + + +#ifdef CYASSL_CALLBACKS + int srvHandShakeCB(HandShakeInfo*); + int srvTimeoutCB(TimeoutInfo*); + Timeval srvTo; +#endif + +static void NonBlockingSSL_Accept(SSL* ssl) +{ +#ifndef CYASSL_CALLBACKS + int ret = SSL_accept(ssl); +#else + int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo); +#endif + int error = SSL_get_error(ssl, 0); + SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); + int select_ret; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... server would read block\n"); + else + printf("... server would write block\n"); + +#ifdef CYASSL_DTLS + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); +#endif + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + #ifndef CYASSL_CALLBACKS + ret = SSL_accept(ssl); + #else + ret = CyaSSL_accept_ex(ssl, + srvHandShakeCB, srvTimeoutCB, srvTo); + #endif + error = SSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } +#ifdef CYASSL_DTLS + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } +#endif + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_accept failed"); +} + + +static void Usage(void) +{ + printf("server " LIBCYASSL_VERSION_STRING + " NOTE: All files relative to CyaSSL home dir\n"); + printf("-? Help, print this usage\n"); + printf("-p Port to listen on, not 0, default %d\n", yasslPort); + printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", + SERVER_DEFAULT_VERSION); + printf("-l Cipher list\n"); + printf("-c Certificate file, default %s\n", svrCert); + printf("-k Key file, default %s\n", svrKey); + printf("-A Certificate Authority file, default %s\n", cliCert); + printf("-d Disable client cert check\n"); + printf("-b Bind to any interface instead of localhost only\n"); + printf("-s Use pre Shared keys\n"); + printf("-t Track CyaSSL memory use\n"); + printf("-u Use UDP DTLS," + " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); + printf("-f Fewer packets/group messages\n"); + printf("-N Use Non-blocking sockets\n"); + printf("-S Use Host Name Indication\n"); +#ifdef HAVE_OCSP + printf("-o Perform OCSP lookup on peer certificate\n"); + printf("-O Perform OCSP lookup using as responder\n"); +#endif +#ifdef HAVE_PK_CALLBACKS + printf("-P Public Key Callbacks\n"); +#endif +} + +#ifdef CYASSL_MDK_SHELL +#define exit(code) return(code) +#endif + + +THREAD_RETURN CYASSL_THREAD server_test(void* args) +{ + SOCKET_T sockfd = 0; + SOCKET_T clientfd = 0; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + + char msg[] = "I hear you fa shizzle!"; + char input[80]; + int idx; + int ch; + int version = SERVER_DEFAULT_VERSION; + int doCliCertCheck = 1; + int useAnyAddr = 0; + word16 port = yasslPort; + int usePsk = 0; + int doDTLS = 0; + int useNtruKey = 0; + int nonBlocking = 0; + int trackMemory = 0; + int fewerPackets = 0; + int pkCallbacks = 0; + char* cipherList = NULL; + char* verifyCert = (char*)cliCert; + char* ourCert = (char*)svrCert; + char* ourKey = (char*)svrKey; + int argc = ((func_args*)args)->argc; + char** argv = ((func_args*)args)->argv; + +#ifdef HAVE_SNI + char* sniHostName = NULL; +#endif + +#ifdef HAVE_OCSP + int useOcsp = 0; + char* ocspUrl = NULL; +#endif + + ((func_args*)args)->return_code = -1; /* error state */ + +#ifdef NO_RSA + verifyCert = (char*)cliEccCert; + ourCert = (char*)eccCert; + ourKey = (char*)eccKey; +#endif + (void)trackMemory; + (void)pkCallbacks; + + while ((ch = mygetopt(argc, argv, "?dbstnNufPp:v:l:A:c:k:S:oO:")) != -1) { + switch (ch) { + case '?' : + Usage(); + exit(EXIT_SUCCESS); + + case 'd' : + doCliCertCheck = 0; + break; + + case 'b' : + useAnyAddr = 1; + break; + + case 's' : + usePsk = 1; + break; + + case 't' : + #ifdef USE_CYASSL_MEMORY + trackMemory = 1; + #endif + break; + + case 'n' : + useNtruKey = 1; + break; + + case 'u' : + doDTLS = 1; + break; + + case 'f' : + fewerPackets = 1; + break; + + case 'P' : + #ifdef HAVE_PK_CALLBACKS + pkCallbacks = 1; + #endif + break; + + case 'p' : + port = (word16)atoi(myoptarg); + #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) + if (port == 0) + err_sys("port number cannot be 0"); + #endif + break; + + case 'v' : + version = atoi(myoptarg); + if (version < 0 || version > 3) { + Usage(); + exit(MY_EX_USAGE); + } + break; + + case 'l' : + cipherList = myoptarg; + break; + + case 'A' : + verifyCert = myoptarg; + break; + + case 'c' : + ourCert = myoptarg; + break; + + case 'k' : + ourKey = myoptarg; + break; + + case 'N': + nonBlocking = 1; + break; + + case 'S' : + #ifdef HAVE_SNI + sniHostName = myoptarg; + #endif + break; + + case 'o' : + #ifdef HAVE_OCSP + useOcsp = 1; + #endif + break; + + case 'O' : + #ifdef HAVE_OCSP + useOcsp = 1; + ocspUrl = myoptarg; + #endif + break; + + default: + Usage(); + exit(MY_EX_USAGE); + } + } + + myoptind = 0; /* reset for test cases */ + + /* sort out DTLS versus TLS versions */ + if (version == CLIENT_INVALID_VERSION) { + if (doDTLS) + version = CLIENT_DTLS_DEFAULT_VERSION; + else + version = CLIENT_DEFAULT_VERSION; + } + else { + if (doDTLS) { + if (version == 3) + version = -2; + else + version = -1; + } + } + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + InitMemoryTracker(); +#endif + + switch (version) { +#ifndef NO_OLD_TLS + case 0: + method = SSLv3_server_method(); + break; + + #ifndef NO_TLS + case 1: + method = TLSv1_server_method(); + break; + + + case 2: + method = TLSv1_1_server_method(); + break; + + #endif +#endif + +#ifndef NO_TLS + case 3: + method = TLSv1_2_server_method(); + break; +#endif + +#ifdef CYASSL_DTLS + case -1: + method = DTLSv1_server_method(); + break; + + case -2: + method = DTLSv1_2_server_method(); + break; +#endif + + default: + err_sys("Bad SSL version"); + } + + if (method == NULL) + err_sys("unable to get method"); + + ctx = SSL_CTX_new(method); + if (ctx == NULL) + err_sys("unable to get ctx"); + + if (cipherList) + if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 1"); + +#ifdef CYASSL_LEANPSK + usePsk = 1; +#endif + +#if defined(NO_RSA) && !defined(HAVE_ECC) + usePsk = 1; +#endif + + if (fewerPackets) + CyaSSL_CTX_set_group_messages(ctx); + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (!usePsk) { + if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server cert file, check file and run from" + " CyaSSL home dir"); + } +#endif + +#ifdef HAVE_NTRU + if (useNtruKey) { + if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey) + != SSL_SUCCESS) + err_sys("can't load ntru key file, " + "Please run from CyaSSL home dir"); + } +#endif + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + if (!useNtruKey && !usePsk) { + if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + err_sys("can't load server private key file, check file and run " + "from CyaSSL home dir"); + } +#endif + + if (usePsk) { +#ifndef NO_PSK + SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + SSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + if (cipherList == NULL) { + const char *defaultCipherList; + #ifdef HAVE_NULL_CIPHER + defaultCipherList = "PSK-NULL-SHA256"; + #else + defaultCipherList = "PSK-AES128-CBC-SHA256"; + #endif + if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) + err_sys("server can't set cipher list 2"); + } +#endif + } + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + /* if not using PSK, verify peer with certs */ + if (doCliCertCheck && usePsk == 0) { + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | + SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0); + if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file, Please run from CyaSSL home dir"); + } +#endif + +#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) + /* don't use EDH, can't sniff tmp keys */ + if (cipherList == NULL) { + if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) + err_sys("server can't set cipher list 3"); + } +#endif + +#ifdef HAVE_SNI + if (sniHostName) + if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName, + XSTRLEN(sniHostName)) != SSL_SUCCESS) + err_sys("UseSNI failed"); +#endif + + ssl = SSL_new(ctx); + if (ssl == NULL) + err_sys("unable to get SSL"); + +#ifdef HAVE_CRL + CyaSSL_EnableCRL(ssl, 0); + CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR | + CYASSL_CRL_START_MON); + CyaSSL_SetCRL_Cb(ssl, CRL_CallBack); +#endif +#ifdef HAVE_OCSP + if (useOcsp) { + if (ocspUrl != NULL) { + CyaSSL_CTX_SetOCSP_OverrideURL(ctx, ocspUrl); + CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE + | CYASSL_OCSP_URL_OVERRIDE); + } + else + CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE); + } +#endif +#ifdef HAVE_PK_CALLBACKS + if (pkCallbacks) + SetupPkCallbacks(ctx, ssl); +#endif + + tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS); + if (!doDTLS) + CloseSocket(sockfd); + + SSL_set_fd(ssl, clientfd); + if (usePsk == 0) { + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #elif !defined(NO_CERTS) + SetDH(ssl); /* repick suites with DHE, higher priority than PSK */ + #endif + } + +#ifndef CYASSL_CALLBACKS + if (nonBlocking) { + CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&clientfd); + NonBlockingSSL_Accept(ssl); + } else if (SSL_accept(ssl) != SSL_SUCCESS) { + int err = SSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("error = %d, %s\n", err, ERR_error_string(err, buffer)); + err_sys("SSL_accept failed"); + } +#else + NonBlockingSSL_Accept(ssl); +#endif + showPeer(ssl); + + idx = SSL_read(ssl, input, sizeof(input)-1); + if (idx > 0) { + input[idx] = 0; + printf("Client message: %s\n", input); + + } + else if (idx < 0) { + int readErr = SSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) + err_sys("SSL_write failed"); + + #if defined(CYASSL_MDK_SHELL) && defined(HAVE_MDK_RTX) + os_dly_wait(500) ; + #endif + + SSL_shutdown(ssl); + SSL_free(ssl); + SSL_CTX_free(ctx); + + CloseSocket(clientfd); + ((func_args*)args)->return_code = 0; + +#ifdef USE_CYASSL_MEMORY + if (trackMemory) + ShowMemoryTracker(); +#endif /* USE_CYASSL_MEMORY */ + + return 0; +} + + +/* so overall tests can pull in test function */ +#ifndef NO_MAIN_DRIVER + + int main(int argc, char** argv) + { + func_args args; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + args.argc = argc; + args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + if (CurrentDir("server")) + ChangeDirBack(2); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); + +#ifdef HAVE_STACK_SIZE + StackSizeCheck(&args, server_test); +#else + server_test(&args); +#endif + CyaSSL_Cleanup(); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + return args.return_code; + } + + int myoptind = 0; + char* myoptarg = NULL; + +#endif /* NO_MAIN_DRIVER */ + + +#ifdef CYASSL_CALLBACKS + + int srvHandShakeCB(HandShakeInfo* info) + { + (void)info; + return 0; + } + + + int srvTimeoutCB(TimeoutInfo* info) + { + (void)info; + return 0; + } + +#endif + diff --git a/project1/cyassl-3.0.0/examples/server/server.h b/project1/cyassl-3.0.0/examples/server/server.h new file mode 100644 index 00000000..559b2bbe --- /dev/null +++ b/project1/cyassl-3.0.0/examples/server/server.h @@ -0,0 +1,24 @@ +/* server.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#pragma once + +THREAD_RETURN CYASSL_THREAD server_test(void* args); diff --git a/project1/cyassl-3.0.0/examples/server/server.o b/project1/cyassl-3.0.0/examples/server/server.o new file mode 100644 index 0000000000000000000000000000000000000000..b76bf473687cc83a016a66ecab0d3b713a1bc9fa GIT binary patch literal 14940 zcmcgz3wTu3wcddVCWsCSzKV}i9ThYg^5PYv5J(_sgh&FSBEw{6lFVf?GtQg=qEx}j zD5qnrwOZR+t*=^ZwYAl1tyM!+(6&C>YU{nNm3sZW#GqoW_=Md5-)HZclOx`K-tT_* z=*++Wz1LoQ@3q$6=bSa+vgX!>B_$%kjIxmi?2|cS}0XOs*UYk4|ksmnY!)s%Aj{7uSbqquRx@SBESZPEecmE zoTsouVH0t9d_G6S{44UNFP7VrnX)~1B&%?3mu;NjWBeNS<{xEKZp19zG*@KWPBVS0 zyaO92V0BHtHTj17HqEW{<|@E9T~;Ez{l}wZ4HqqBHTa}Sa)aLfN&opj2 zLu4v2tJrBxoa3=*kaKMH#qyplmRwjPj2W{AIQH;F>*vJc+Os2Pc(0y=WoJi%mrcr! zoPAkMcBIkU|GRx7BSXJA5cS({&W=p>Uil}K^Zk#qcgfC?9q>R0jWu*H1P2!VH2dKg z@8!3moE=$`IS8#Svh{1Srrq0r1@&D^9oi97hf=76rV7qi4my>VxwPruMDKj~{5fS?fOk?C> z?gVf1)5DWwojD=<(OB>GgWd<9&OWmbRV#(L!g_8Xd*7i@g`G8!z058lCXQiAEspDo zVz}*DY&Usr&tg)lG_g>ctV-6q*{x%;AC-Eq{AM{_m}h;-%OgAF?1#T>!BU4?cYO{O}?hwpm_u)?XfC+)+bUX`(cSU_d1%fw0XiD zUu?nVI{|&BDtWl3j1F-2dl3D~O<#i)^!*QlH`oKr7G@*Vo{mANjw=LuXmO<$16DZn zP(m$6PV_wJam)}aK8H2fSlj!3FGHAiwf*L=-h)C16x(~%+q}(t?x1&Czi$U*%tmwy zTd!I%-sXZ(?3p9lkPj_E;0NzvQuozI9z&2g~H-yRa-ycZ}$=`hBmVWO`9W zHN31(hL6hau|CO6QX|@Kw*{OQ<~~r{p%59~Ei*7F+MjMk>p=k7iV^;bGOGvdBIY^4 zcG^S_h2cD@QgxQSu*@wV!C2_B12S@Hwx8(~Et2~?L@>Z^)Uh7YEJAwnzyrP)#-V8X zCZhJAb}d5{!%a}bmHoA}sO#$0&;@ZNQ$~Ht6}dsUC(L_@xBvI_-M)b<&?<&DvC9|n zTq&1ymCpoxQO_}SY|o`olAfa)UZ3kZ3OGHde8c72p4*n&S)4(=cGz_4y^^ZY^kG01WvIxi~H%lU%!_?7Cz&GrQhX%(jNuC55aMktoNW)7&u3V zqANEqx|T5>?14RyhI94ivYyKB9kCty0J_Lco;f%_YNx@mvX?sAHsV1geZ7ct*v1tLP%`mx9oA2tlpw z$@i^ownB<1@8bT)zV>;N-B;qheyg|tkC+0q_F%DX)~~a#?aO{V26wr=7^2GhwKw+= z+yDGaP82t^oVBj9xIt_mmDZ8`U#7g5Flh2Q2lDf)@)~(_E96k5F>?S=L~wQaCRksP z@R{F|J&O;X)+^qDG@9iYP4{`!AZt*S9hsY%1Xm6~B@}ZewyB19UTjw}Z0)MI)m`mw z)Yy|7T8(E|RcuGGaO1lYBAN_;rBF&2O3^|oP$(@|n#zkx_aSyw?R&-I&SLSEV(|~f z;&v3ZTIqo+FduqSJ)SEQDy9aww%Gql_Af@C4)tvVqwYGonny663*5U!@%`)%J-mJN zso^IThc831J-e%HCucqSU0VgC-3JSjo+&VHm+n)Qzed%Lg{IN6PWG7?Q+>Z^y?Z{+ zG5$~6vQL&>@I*UO65I+-GhsK^p(=lsuL^*d+==l2WP2W_&!?TrUVKl(E6N;IH(gsO zH#jh_#M`v3kc9APJ45;?+cHCULAqdIscJu}tG4*zN3zPL>`p#`?N=Rn64XVNwjunpPYzu@(K55!0;2{ zjLG?y-Pyt2)ACY*3NRTO%vWW19qpP^ot)F$(Q~TW-<v$-m;RD-WCf>dPl=YirBBcHBWPJ-wC(`~T;)*yxD_Q$}ARV{`?L zbWil+i(`>53;*;`BxRynDnsT5Vb6$~PBx7+Bty|;4^+pZY160{c6}@XI+h- z2uz`5*lT?%igl<8+eD%%(wXTN%OY}G!tbAs{}r$l>VZ+{m=n{g<9J~v%wWtgjK)|j z5lVArb7Gld_540Fk~Rv}$w+W5gbi19D3eMd?A+D#g^CIzn$|1Pj!tK|09D@=ikmSR zFlt411>-_hn4zRG+EQptCqiozuwDDoz_RA$?ahr%P0NZ)LyyiV;=`eV(G@|o*tTZ( z!U*FLk_Ckw3)%upmNqrFHlA0|S6ws9UxojwMLc0(xhaGYoY|8|n<5iV8lgly9tjmD zoQj0j$*5F=so-pnn9|lkGm+A6kb2Bi5JBA==}n~iL|-tSju|pq>=39-8V%TdXVCg> z+=+0bT1+BdVQ@EART$w&S1=PZ5nkg(<+@@Irzb9`s;s@Rf?IZ7?bNDiMy1iw+FtFi znOZw-noC2-XyAt9pbN13qFvDtH;=suITQOTjEaD+TwCmOR$-HA$s&&G(^%}|9H%jZ zvjbtSx9X@qmGpuRJjC_f(WkIFG-~NFW69Ev=6Z&>oO;?wMPflSx=tQa?lVKFshnG! zYfB`StT1qNAjHicL~MpzbM$zXF{2@Erlfxs6i>2(P-VENuPK_AN2GmN8$7J-Bds7U zL}h1Dem;X3{tm|b49p>t>I#OibK(ePoC%3816wy3V;mZZc&txqsl=|;*K(Xu$yCH> z?+KhmwHO;Wj}D9`biB;u8wSohj! zyxXw%aY2@SD%*?xpnMChvm}Tc!{T_DVa!{V8eK}<%Uc(wkz%Ib`4sWqmW!S3|*WzDV4jqS~W+Pdjo(ReU6&6wJW8wh+D zH(Fa)oNb`bG>nD#^qY|lrtpUny}dYUgugSL7JlsVh=0+N<&|j@#uEN?4?@licA})Q zuUB$vNF~BSGbsG_x6LS6?XRARF=VUa4nzElVkz43z$#Q$Nz|d-KB?GAW>b_5^8AI% ztVZ&nT5bX=)K9FViKaOP@f80u>ty~P(WR5<7c@-EqBXN7*|gMZG85n9DXsA zSOw%Y0gIpw^riKoyOh)Q7dRK|XhXOZY(iPenJlP_`gom&k7GJQ9ES=_hQA=tK3p&7 zSc{LgF^WQ*0)0rd=u7LVwAPMkHJqxySD#W^gj(;_kR`bXM=lH|DE8gz!_$o-&rVM zf{(V(pU|EI*ZqHp@(uXt^*oFAyTSE%7Wgm0E0w+t;Qs}#*Ovsp7HwMoBFyhYwAU#4 zi@{HUjpi$!2akd4c)Je#76-ox{6z=97W!{P-@{b@>wsmb!w_EO&VyyM_I(0+-7d(eKrgL7|w>frx?{0$EN9C*ONhrqWu_^~MOqjBU_BF+FWg*`Q2 z13tmQU%`009rFBXWXQqyfq&rOztXBCmWrREy`xZ9DjHN-@3#>A$qUCk{8c8R;PX&E zLGdhj5@kEy%fy}F*MOg-+J6i_h%)uE|AXKt2t)D5zzuMp;@iOacM)eP{v7x%;5@I{ z|4-mAfS;)N-@ti5YrYt^sRBPnwKszE{IJi5GI1Qvmjg?S@y_2rHc46PA1nTD@!8E`;@~q}rsQHzU z%qAfHNPF4XQAdO7Ot_-=)A^`z5{`=SMeGv@6b*TV>qs{@{}%Cj2(5S=bjxe z-hjQY#{{=v=tIYph_5Jdj&#TvPvM@Z`Il5XZ9@4c98=~x-*EB2Ii}3^2KY)}EecKK9gMh0GB-%xp>sYPj>N>w6TG- zcZX|y`3tC$Vf#TY`+vhFf2PZygRb^lU0nW2mqY)-F8d^0`aW>QL#In$(#3z~;yo^X z_o%T6T;CEGf7CUfb6oseF8%9V?OR;!n_c{37r)6h{(RSb_qo>Zb+wDghG1_p7D-RH zGYty-A!L!5Y7HQ7W{SX~)}`|sTLViME^Ke^2y`^gZ*2|;f2%{r-<$3hcs9GfNd_6l(B(D2J-!TsYuLpZSy5G8tJ`bmXu(3)nPRz2 zoJ2N6O(ByG%OXMM9c{8O6^YoTv+Y_tBM}&tF%yYQ>g-5wyBRdo{;E-|dK9Y}#R`ko zlYy0>-cDBpY68k3DqC$Yb><9*$bJQ8Q$Qxt_OGCZ?J^^>|MuEqd-eV$>WUKXNh<3s z=vWzuN7k#E1W1v`4A|N908@nSCYfLfs04G`*@~o3fY~UO=nF8>=WcJaGw8_eeWsb? zBJ`tOea=qI;j8KZ6IIN-6h`ID?WnJ-6M;a;>`O)hos<)ZY^Jn2`{Kyjh-e(jk!nf_ zJJ}=B(Qaf=964LTT(8hsSD~`8TKi04XG?{hLl&V}0vRr4Lr%OaED&f-E>WN!^O- zj^1Qbi{_Nhq>*|3GY6)$R?E$Ty^!@ zsO1qO3;HOWp(^UMNS&_Goq2Mx3(qv7uGbx^wa#j-vs$0Gb-GVoVVFV_&ks2ht*1`w zsndGo$tPv>9BOCjr8X~HW(Pq4Q$pk@ZPi+BwO$7^b8?_+P6opE_e?#t8G1%D*cI(F z^#W(;Nzc$KW+)XiIcJE@;*^P;F_F56O4Te*f}EO&GevJOT5#RsI8JTEN@#tUH<(mN z-cq>W>e;No|L8|vqZMmoRqH~HwpvXsyTp0ZlfO#op7K;?6fMASSn*5}Gmtk387Fu> z5#zsMzlW5cY3HgucLT|)d*)tBNKi@cs# zg?~l>^x#2dxvF19ME_pJHxZElxCZFCU5IDNq4#AX#zZz6`FN8xn}zYFwSYUfKh?gOj`KBn+#g?}e5 zh8=*OB=QYJ7>jul&)0+)A;M_m@NDI|2G5|xuj5^Xh=j!g;yT!yxE}cfB9cUR5c`Dq z195{8yND+A5iP6(&(h^52ywo`uK_*RAwNO<9`bm^JCKhX2fPLE=)@lhaW3(0{D}zh zhj>3F-hjLW@drYD3D0Dn?;ytmEI(0*#pKYth6ueD5qe)BLhpM-=sg54uGG7T2)#Ll zcM+j~ka#QBLA)N%tL4CN!=J=Fa!|nX^Msg1JRkXQ)?bGF0r4ulQxd<6{H4N2iJOG@ zJ@E=5UL{^BMB{k$KNs^Ru7Dn(=T6v{c)1X-6Yqlm4+L(;JA=Y5VpfQLBJ|!&gx z{x)$7{0c0`OZynSn0vmD_j6(nb|$8TFo5MpAup!dTZmspUWfIVW4Ef`OoaaL6R$=d zjyNF1uZjIa{Dzo@|B0~ETR_I&2SgTCr(HHlZXV$Y+?;^iNspuu!)HE6~t1+A90)zJ;alQNE3a?=Muk+xFjBr z`4N%e`5qC8!n=tE@`ywvdbSd=p5Fqwo_{A|p0BbV35hp}Q;?5APJ;e9lDH8$D_}Wd zy^0+DW|Ef)F^>p+XR7*@MCe=1dc<0kh?uz)$aA)z{461^0x~YIC2xg26~Bf26xfv< z<2*=ysu0^0{~h_+$fJ^@|9_CI+EJw_bIRyMC*muBk)Ez-wiSv~8nD=xd`Yj-$-#KhY zEM7>Ceo=DBUqlZ1%|yswPlWvKY=_N$LJs+d$?wDzT z`w2PpPC%RI62v!<>zYS?n-I%@+{Y^wu2vXU_-_hR3iCkr|DNJM0DADE{kW=sksNy8 zQ0==E{zKu%3i%@d$1PJ>3*fDnAYR hTJkdxcf^ITBe5C3ix3y#oFL8@B1~L>^MVLv{|$d5es}-? literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/server/server.sln b/project1/cyassl-3.0.0/examples/server/server.sln new file mode 100755 index 00000000..7c9de302 --- /dev/null +++ b/project1/cyassl-3.0.0/examples/server/server.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Debug|Win32.ActiveCfg = Debug|Win32 + {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Debug|Win32.Build.0 = Debug|Win32 + {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Release|Win32.ActiveCfg = Release|Win32 + {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/examples/server/server.vcproj b/project1/cyassl-3.0.0/examples/server/server.vcproj new file mode 100755 index 00000000..ebb1af4a --- /dev/null +++ b/project1/cyassl-3.0.0/examples/server/server.vcproj @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o b/project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o new file mode 100644 index 0000000000000000000000000000000000000000..5317d3e42aae82e2578838582acc3411358c2e73 GIT binary patch literal 13432 zcmcgy3v^V~x!xgzW-vMtv}(b6EF*#@AukXkAddv2Mu;X@tdC)s2gzkJGo3jDM5&^a z5l&-#^lGiTs@1l7Z);nreMoIBxd=#m+uByEtF6Mdx0W%S#GdHxhFDWZ4D;N4H6Xl}J5a7m-D$*ojx;Rc8BbIl5;_@3` zd+%r=_ObTL8@IFjV4lQj3Hk>6gFj@^7u?kntT+k9eeaEqjt=w(t15&TsBqeY9RqDX zK-aDX6=)e9Fnyx~)XDAXy0i!K9H#|hBL2kcv%%ZJSCRv(HO|pE zS7V*VHjQ$DBb5W2$mJ}819q^xa3D8%m#mZZEy3t6X`iP!t&ysMZ?d}Zx_#8fPYaQ| z^gKJ*5g7aum)R2R8mN8@)ir^_?XcCxPnU^6|IH{l2aBulIn_aFoWiz1|92{dXm!3u zjn1AWP!M(M9L!-bSLPga9%ub$TE*s;;EKRg`zi3aR+bvlouE~!{e1)iqhe`qvNsN&LOIB_iqwFUXZU&x)1-w<3Wp1=%7 zpW+4xwC*37BMk)L|V>g>3_gV2gbcrs8wv2F+66DGL;?;OHBIb;6!dYAL*)n~HvxmWNX-XjXT> zYV`9bg4I%R%7+LZqXw8R?1fM}4}(x0?F#hKj#@1S47&7CLN6xIiT=b7UYt7wySeHg zvKD)3SAXz1bbx8Onw4C2yFIOb6r>FU3`&y*THg+QVq0KFe{e74>~ox#h6hk^c9i7g zrVX_2(sF5>2!a0Fv3Lv^bzUCci(=rZqa=GtT6#bXvQ_vYHx}^>i z9K0p?-xz10qjF$D6#}{|SRof$8FZA6AJMw(9Ut0OA*US2g7%_voQOO9!BpqPt_plEg15fdzs!KXTg}ih`mvn?ZSNGPT#YlMsu7o3O zz>yrGbVx_Uoqc2cz#ve5$e<+sKrMWnw?V?DeM?eW6vfx-&R4>Q>duD#3Rhk5s-^zQ4!rvcQ5#V#n9@zOO=xy7j%?)m%Z zXnf!nxgFv|Llx$wC0*(Kd@#w6>teLTcO6xRt#kdj{LU%GEuufpF{}O1t7pX`W_1GA z{VXSF2df7AgMU@Ez5%RL?SV>dv5Mbe&Bh$J-U)JKQ#prm=5`1ApWqVg;8lY+qacRY zqeJNpqxg~_6=FNmsj}?0z;OCqF8t9T<1aq6!@ck~{)vTST|6Y|0~GfwcbFy0QJtOn z!=q~6JFw^FQJUi+P&BMutjo|4X%V^V;*u(hCHe#5Q^h4Qj5eC3q01bcs+Yo`N<^MT zYW$}6eLBc`Y~al+F`;7x4iFhbIAm?Sq9XozHWh`IfI+EJ_Gf1Yd`}sOC>iu^N1d}r zO5_if1@0OO^gqs!y9zD8$-i z3(BCUW9Z%SID(@2gX3}&%xmLFg(*4awWatHxs|gBv<=}v=axnoz6Rh^ziq1p7<^Q1 zy*J)_>uUpD!RSCDxYGaVo!pK_;@iq?Z$kntbRj&c4~QyQq!LtaUo3h6bHprYdk&&) zw3TbJ8w%U5uZBPrr}4_dE&c4Xl@Xph*;PyZTgzEHu73A{p>erOoIUw>%P_C*K%pP? zFtu|~D}IvQ1O2b_<;_)Xhe}L}z?aT55E@y6ZP5*9C}+J1XH^!Rr5)sKS1z(oa9+&s zJ&gBKXTP%}(9bu~5xA*;w;gm2>#cPv0}4UG@w9*W;xJ#unVu&cS9 Bb#tB4tt-( zpdIXmVja*G%dk$p=Ic-0+2ZS!C&1XPjHRs@IUVm^z`j#3qcKs)_v=Cc^BUB*F$}3> zN;k6nJ0}GS2jDC;jGd>p82r@b=sD|?5H~i=4Z(8b)4Ty*6T0&1?So6oc%^`!qfVK= z%k9}kF%cL%>2G*3$H(YE`xYM#*b316q4RT-V62-lG!7)nso@Xq%c?5+Syrhf4>umf zr9r+p4NqtBX7(B8jYSt3DXKWKL8GlPp)m?W=_7Jvg;w@k9QV5TY^k`TRQ!Ia_)QdD zDo)h>K0l^f`d-cscGIs0`pnf#cMF#kUyh>7eI|-_!gFSyIXF+$Ccpsl-DPkSO~64^ zz2*!oPm38|%PA|qg5zG#A1I94Ck+|K2Gdne z+UM-gKV5|#vfXRm0eogb@Rd}{Ke_g%HJ<>%w(t=)UgpYHqmJ(DLrJooOU_rICH|2w~(c zv**RBJ3BfGubg)5^Uti|Cjb9@F0{I1;f&Rn%31NSmF@1i_S!`3bWuAq63f`xnUO?K zENRz})TU#-#rkY4vo@Cb!1^_@J}G{FbXC?)F3rU|(#>m|6U_^oBh71?JDXF>n#H1U z)avYPx1cB6lS+zQGQ27gv+R_$I%ZqFF}phz^;Aae^+JtoMZ(E5Z7U1ONKd*uma!5& zS=*`?sy>l|awCbkTk)PmtlEln$0BQF*$OA4RwkFU;+a&hwYV?LnRKUmV^*{$a|9*n zOwZb|9kZ~o|GlnASoiHn#KPIw2aiA26quTbWiqLZHP1RDT5X+?ogh#b3P&QbG?o^| z+M;5y^c3ut&4yRUnu}7I7)+sM*lS&;2kR(R82ej2S<}auG@GNSu8&8Oc0#&F_f-}2 zfUdA3X>079(3nj{)}%1Y&Sjy?T9JmJznKgQq}wJLTmjxYhv zFDmR>+!0#3tfjSm;T1)F^$q9L*5O~hNTw{rZ3fPQ*}79%TjZi?E0RhkW0B&7GqK28 z>3=;~UpSjhSklzWemX8XWA?&CA{7bSsZ3T6CKcP6Fyg5<)|<-oiJG)EH<|05Z{g`k zA?6UtdNHYFwUtcSR$a9fjm5*cgbhbd5H)K{Js5v_Cs(ok|i9|XJM(2 zdz^(i>{0}j*%V{?)R=QjZ^TCW##*|ptF_sJJ>?{`RwkAR+dXUL#`o?+t)S-o(yZEI ziFCDv?U;mtyAhi?hPxR_VNJrCo3%626N^iyLs6(ETGH3jlau zD9@9usIg1!T{5J!Ayi~xiDMU7lPk$n-}06Ys|6uaZH1#z3sKb|qmxx@>#gb9DF_`j zHM*K=8??RRC4Ea`>u{K+5!cviGgoI)xwJV`vc@DeOH1+`e`zXNvkL28)013nsU2IC zWuKbPl0PWlM(ZpMH! z3w>r_EW~H69b0dU+DNLm7l(?dU6sv>TI}ao?FCDh*JN!NOVnn&5ps5T6-oyCdL^fZ zOez|-!=hIGRg8l5we_B`BaD zBexjbJ-;tD3c-{l=f^ctj^l9`P@fK4@f!49ZItLXwlDX{b>Qo^gqZ}|n1P}kzHN|L z2jugEQ45thqgiFyTd%rHh@dYTZ=8)u`<=tFVLJSq_+KWD7IENA7k>ms4x~PMMFGK$sXgB>QfH%ANJLrEgxS8)u;8%lNy8l-2PlKEJzY0F+lK%<# z1Ktx=7lAX*$*%_A0KQ1`-6&s+veB1BJHHt-{$noqFD||jd>U+S z+Hb&kpF#fuHU=(Wbpkieh~69r6m=V31)8(x!U)l{uUQ! zp7R+OuK}OH#mc8l`~~<`SNqSvlP*3Cevga4ivF*-`X7b1VHckczTd^a0{Q1${3h_9 zy7*4;-@5n@L9`FuuwVx`)d$7eu*+zZkLZ+I*Rb9DQ3f=r(cRK3EL4sd-@Y`L^pL`)W zzX9&md^Y&6u(_uK*?u$X`CwQu{w+P_sBu5#V@_c15wARg-}RJZzq+4t`N>tPDIfDm zM|~57`8eSmCypx<1Fk7xS>hWWUf~*&?QswPBW!6NwqNAoS9rMX;lJ?kZ+ZA z$Rj_`!+-9v2Q$#-p*`w7{0)!%G$Rb8{1nf8{>#IU_4L2e)4tEcpYU+`!wx+r$D8e0 zFTbxd58Kc3^k3=Wb38oZ;k!Nh9yQ8=)W6ij@vEZZ!*;&!nTPy09{o3ac-F)3_3%E= zdcWyuzu(i|;c36n!xwq@7tCaVoUe$j5BH`MvFuEBQ`S%$LB4}&wvZh|0wZ)m`?5s~ z+e6EiEa`0R3Uw`9)ZQ8rwe2pM+TQGHflFf~-6wkckaodk6%xEyG-#~X2w1eJE>y4N z!Ws1IL*5O2YLoJ|BYVxN7w8-5P3vBbQhRqs_ik)N;i9e!>q2#=<{VvUnqz8kzmY>V zaS9x>>0DDNHks~CjRHxQ9@Dj`qu7JfmpYona(VHOt?#jgyfj}H3o}Wh$dXJfrb?Hn zT6LoijY;J|mz=y&I=fLoOkJBp4Iyn9@nktOO&65dJbRW9yY5lY6^>6wH`kvR*gOlgQoDQ}a!=!bOjFzaqb@*%{mh)ykq zm|F6-cc|mmNvsFoy#J>5=y3$D$^nJuclp(pmk%xA(_TB&8)y+I4tZ8qFiBvNayUL)uVPI z8=_n!m&qW_5wd%FW2u}CYbKC0HJT{qE{9g9N}|eZ^^Hb=>U0W5+ob*+cbgeX1*U0P zd|^jh>t%8-(q&rf9Mew68FfvjQl^Lu$#&=LXlh;3@HkHc*WQp^sckggnx$3pOyYsb zgN(>Ch{z*|SkJRc7L30eOxH%!)L=R{nBEO$mhk?36Yca~{yG!tp$M9@CV4Ax}k+GIwR=QBk(RU&m0wdz^aMQ&8l zBH%c&6ymc)owd@u_*mopal-ZL-r+xA0RXoe*ylH()HhU-(uDaV9Y$#6n^e>m{y+orrNEzDtbZu0;$( zAJN7<@&4)mh!6`j_5yu3pdS%N-a>>Q{z^n5;3T|%`R>IXoOq8AYlxp0;&a5CRL;rg z;EqKOJ;&pULp{wz=-Ehwo-YxhXNU+rZxf+sR)xY9MCe;j#4kV}CqnNtK-#z55B{&1 z5An0eHxQAWSWWyKeilXShrfV+B;_6^A}R40ak3Cku>B4po+cKA_%V=r-y?_KDkN~I z_hcgUHWN1@=SIvUM@U>NL?6(93C1Jhq%{j-T_A?6c9LbS0ReLHk}HxWsi>sSxl=XL#qM2xe8*eArV ziR-Z+i76poC9cH2B*I?Samv2SfwXtG#w5^>%X}Yksu2CeGlaN}I8BIqiDwG&5OF$k zFGR%dw}^X4hGJP@;FV-I?A}*?d zv`aG)^IX7s^u3sf|EpM!b@vgwh1kS;#QGiN=yx|c?EWAT`o5;?w-TZ6N32JT{g{ZD z*aPIb_XqL?IDdfj`&;A-g*d2r8RqCeRfyw(9OoqRk73_yUPHbJ`-dF;&m%8K-i>Gp zaS7|uuag`;xte%7t`oX`4f#0yij4Si}AIL9)9W?hHuk3RQ(02>sRP#&8Hwn?B`SrSe z3-MO`Bu=*rJpO9b5of9I2K;BM?+g5AsXLXwUge|75ki8<{1Va97$nYCc_e=m;zZZi z5ofA=segtLbI2Q1eu@1TXgQcn_-nAgh_x#J=||@d@<#PJ=RXhMwU9Tf+`b=4s+HvD QAWuSsa)g}lpDV=w09Dj6egFUf literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o b/project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o new file mode 100644 index 0000000000000000000000000000000000000000..5317d3e42aae82e2578838582acc3411358c2e73 GIT binary patch literal 13432 zcmcgy3v^V~x!xgzW-vMtv}(b6EF*#@AukXkAddv2Mu;X@tdC)s2gzkJGo3jDM5&^a z5l&-#^lGiTs@1l7Z);nreMoIBxd=#m+uByEtF6Mdx0W%S#GdHxhFDWZ4D;N4H6Xl}J5a7m-D$*ojx;Rc8BbIl5;_@3` zd+%r=_ObTL8@IFjV4lQj3Hk>6gFj@^7u?kntT+k9eeaEqjt=w(t15&TsBqeY9RqDX zK-aDX6=)e9Fnyx~)XDAXy0i!K9H#|hBL2kcv%%ZJSCRv(HO|pE zS7V*VHjQ$DBb5W2$mJ}819q^xa3D8%m#mZZEy3t6X`iP!t&ysMZ?d}Zx_#8fPYaQ| z^gKJ*5g7aum)R2R8mN8@)ir^_?XcCxPnU^6|IH{l2aBulIn_aFoWiz1|92{dXm!3u zjn1AWP!M(M9L!-bSLPga9%ub$TE*s;;EKRg`zi3aR+bvlouE~!{e1)iqhe`qvNsN&LOIB_iqwFUXZU&x)1-w<3Wp1=%7 zpW+4xwC*37BMk)L|V>g>3_gV2gbcrs8wv2F+66DGL;?;OHBIb;6!dYAL*)n~HvxmWNX-XjXT> zYV`9bg4I%R%7+LZqXw8R?1fM}4}(x0?F#hKj#@1S47&7CLN6xIiT=b7UYt7wySeHg zvKD)3SAXz1bbx8Onw4C2yFIOb6r>FU3`&y*THg+QVq0KFe{e74>~ox#h6hk^c9i7g zrVX_2(sF5>2!a0Fv3Lv^bzUCci(=rZqa=GtT6#bXvQ_vYHx}^>i z9K0p?-xz10qjF$D6#}{|SRof$8FZA6AJMw(9Ut0OA*US2g7%_voQOO9!BpqPt_plEg15fdzs!KXTg}ih`mvn?ZSNGPT#YlMsu7o3O zz>yrGbVx_Uoqc2cz#ve5$e<+sKrMWnw?V?DeM?eW6vfx-&R4>Q>duD#3Rhk5s-^zQ4!rvcQ5#V#n9@zOO=xy7j%?)m%Z zXnf!nxgFv|Llx$wC0*(Kd@#w6>teLTcO6xRt#kdj{LU%GEuufpF{}O1t7pX`W_1GA z{VXSF2df7AgMU@Ez5%RL?SV>dv5Mbe&Bh$J-U)JKQ#prm=5`1ApWqVg;8lY+qacRY zqeJNpqxg~_6=FNmsj}?0z;OCqF8t9T<1aq6!@ck~{)vTST|6Y|0~GfwcbFy0QJtOn z!=q~6JFw^FQJUi+P&BMutjo|4X%V^V;*u(hCHe#5Q^h4Qj5eC3q01bcs+Yo`N<^MT zYW$}6eLBc`Y~al+F`;7x4iFhbIAm?Sq9XozHWh`IfI+EJ_Gf1Yd`}sOC>iu^N1d}r zO5_if1@0OO^gqs!y9zD8$-i z3(BCUW9Z%SID(@2gX3}&%xmLFg(*4awWatHxs|gBv<=}v=axnoz6Rh^ziq1p7<^Q1 zy*J)_>uUpD!RSCDxYGaVo!pK_;@iq?Z$kntbRj&c4~QyQq!LtaUo3h6bHprYdk&&) zw3TbJ8w%U5uZBPrr}4_dE&c4Xl@Xph*;PyZTgzEHu73A{p>erOoIUw>%P_C*K%pP? zFtu|~D}IvQ1O2b_<;_)Xhe}L}z?aT55E@y6ZP5*9C}+J1XH^!Rr5)sKS1z(oa9+&s zJ&gBKXTP%}(9bu~5xA*;w;gm2>#cPv0}4UG@w9*W;xJ#unVu&cS9 Bb#tB4tt-( zpdIXmVja*G%dk$p=Ic-0+2ZS!C&1XPjHRs@IUVm^z`j#3qcKs)_v=Cc^BUB*F$}3> zN;k6nJ0}GS2jDC;jGd>p82r@b=sD|?5H~i=4Z(8b)4Ty*6T0&1?So6oc%^`!qfVK= z%k9}kF%cL%>2G*3$H(YE`xYM#*b316q4RT-V62-lG!7)nso@Xq%c?5+Syrhf4>umf zr9r+p4NqtBX7(B8jYSt3DXKWKL8GlPp)m?W=_7Jvg;w@k9QV5TY^k`TRQ!Ia_)QdD zDo)h>K0l^f`d-cscGIs0`pnf#cMF#kUyh>7eI|-_!gFSyIXF+$Ccpsl-DPkSO~64^ zz2*!oPm38|%PA|qg5zG#A1I94Ck+|K2Gdne z+UM-gKV5|#vfXRm0eogb@Rd}{Ke_g%HJ<>%w(t=)UgpYHqmJ(DLrJooOU_rICH|2w~(c zv**RBJ3BfGubg)5^Uti|Cjb9@F0{I1;f&Rn%31NSmF@1i_S!`3bWuAq63f`xnUO?K zENRz})TU#-#rkY4vo@Cb!1^_@J}G{FbXC?)F3rU|(#>m|6U_^oBh71?JDXF>n#H1U z)avYPx1cB6lS+zQGQ27gv+R_$I%ZqFF}phz^;Aae^+JtoMZ(E5Z7U1ONKd*uma!5& zS=*`?sy>l|awCbkTk)PmtlEln$0BQF*$OA4RwkFU;+a&hwYV?LnRKUmV^*{$a|9*n zOwZb|9kZ~o|GlnASoiHn#KPIw2aiA26quTbWiqLZHP1RDT5X+?ogh#b3P&QbG?o^| z+M;5y^c3ut&4yRUnu}7I7)+sM*lS&;2kR(R82ej2S<}auG@GNSu8&8Oc0#&F_f-}2 zfUdA3X>079(3nj{)}%1Y&Sjy?T9JmJznKgQq}wJLTmjxYhv zFDmR>+!0#3tfjSm;T1)F^$q9L*5O~hNTw{rZ3fPQ*}79%TjZi?E0RhkW0B&7GqK28 z>3=;~UpSjhSklzWemX8XWA?&CA{7bSsZ3T6CKcP6Fyg5<)|<-oiJG)EH<|05Z{g`k zA?6UtdNHYFwUtcSR$a9fjm5*cgbhbd5H)K{Js5v_Cs(ok|i9|XJM(2 zdz^(i>{0}j*%V{?)R=QjZ^TCW##*|ptF_sJJ>?{`RwkAR+dXUL#`o?+t)S-o(yZEI ziFCDv?U;mtyAhi?hPxR_VNJrCo3%626N^iyLs6(ETGH3jlau zD9@9usIg1!T{5J!Ayi~xiDMU7lPk$n-}06Ys|6uaZH1#z3sKb|qmxx@>#gb9DF_`j zHM*K=8??RRC4Ea`>u{K+5!cviGgoI)xwJV`vc@DeOH1+`e`zXNvkL28)013nsU2IC zWuKbPl0PWlM(ZpMH! z3w>r_EW~H69b0dU+DNLm7l(?dU6sv>TI}ao?FCDh*JN!NOVnn&5ps5T6-oyCdL^fZ zOez|-!=hIGRg8l5we_B`BaD zBexjbJ-;tD3c-{l=f^ctj^l9`P@fK4@f!49ZItLXwlDX{b>Qo^gqZ}|n1P}kzHN|L z2jugEQ45thqgiFyTd%rHh@dYTZ=8)u`<=tFVLJSq_+KWD7IENA7k>ms4x~PMMFGK$sXgB>QfH%ANJLrEgxS8)u;8%lNy8l-2PlKEJzY0F+lK%<# z1Ktx=7lAX*$*%_A0KQ1`-6&s+veB1BJHHt-{$noqFD||jd>U+S z+Hb&kpF#fuHU=(Wbpkieh~69r6m=V31)8(x!U)l{uUQ! zp7R+OuK}OH#mc8l`~~<`SNqSvlP*3Cevga4ivF*-`X7b1VHckczTd^a0{Q1${3h_9 zy7*4;-@5n@L9`FuuwVx`)d$7eu*+zZkLZ+I*Rb9DQ3f=r(cRK3EL4sd-@Y`L^pL`)W zzX9&md^Y&6u(_uK*?u$X`CwQu{w+P_sBu5#V@_c15wARg-}RJZzq+4t`N>tPDIfDm zM|~57`8eSmCypx<1Fk7xS>hWWUf~*&?QswPBW!6NwqNAoS9rMX;lJ?kZ+ZA z$Rj_`!+-9v2Q$#-p*`w7{0)!%G$Rb8{1nf8{>#IU_4L2e)4tEcpYU+`!wx+r$D8e0 zFTbxd58Kc3^k3=Wb38oZ;k!Nh9yQ8=)W6ij@vEZZ!*;&!nTPy09{o3ac-F)3_3%E= zdcWyuzu(i|;c36n!xwq@7tCaVoUe$j5BH`MvFuEBQ`S%$LB4}&wvZh|0wZ)m`?5s~ z+e6EiEa`0R3Uw`9)ZQ8rwe2pM+TQGHflFf~-6wkckaodk6%xEyG-#~X2w1eJE>y4N z!Ws1IL*5O2YLoJ|BYVxN7w8-5P3vBbQhRqs_ik)N;i9e!>q2#=<{VvUnqz8kzmY>V zaS9x>>0DDNHks~CjRHxQ9@Dj`qu7JfmpYona(VHOt?#jgyfj}H3o}Wh$dXJfrb?Hn zT6LoijY;J|mz=y&I=fLoOkJBp4Iyn9@nktOO&65dJbRW9yY5lY6^>6wH`kvR*gOlgQoDQ}a!=!bOjFzaqb@*%{mh)ykq zm|F6-cc|mmNvsFoy#J>5=y3$D$^nJuclp(pmk%xA(_TB&8)y+I4tZ8qFiBvNayUL)uVPI z8=_n!m&qW_5wd%FW2u}CYbKC0HJT{qE{9g9N}|eZ^^Hb=>U0W5+ob*+cbgeX1*U0P zd|^jh>t%8-(q&rf9Mew68FfvjQl^Lu$#&=LXlh;3@HkHc*WQp^sckggnx$3pOyYsb zgN(>Ch{z*|SkJRc7L30eOxH%!)L=R{nBEO$mhk?36Yca~{yG!tp$M9@CV4Ax}k+GIwR=QBk(RU&m0wdz^aMQ&8l zBH%c&6ymc)owd@u_*mopal-ZL-r+xA0RXoe*ylH()HhU-(uDaV9Y$#6n^e>m{y+orrNEzDtbZu0;$( zAJN7<@&4)mh!6`j_5yu3pdS%N-a>>Q{z^n5;3T|%`R>IXoOq8AYlxp0;&a5CRL;rg z;EqKOJ;&pULp{wz=-Ehwo-YxhXNU+rZxf+sR)xY9MCe;j#4kV}CqnNtK-#z55B{&1 z5An0eHxQAWSWWyKeilXShrfV+B;_6^A}R40ak3Cku>B4po+cKA_%V=r-y?_KDkN~I z_hcgUHWN1@=SIvUM@U>NL?6(93C1Jhq%{j-T_A?6c9LbS0ReLHk}HxWsi>sSxl=XL#qM2xe8*eArV ziR-Z+i76poC9cH2B*I?Samv2SfwXtG#w5^>%X}Yksu2CeGlaN}I8BIqiDwG&5OF$k zFGR%dw}^X4hGJP@;FV-I?A}*?d zv`aG)^IX7s^u3sf|EpM!b@vgwh1kS;#QGiN=yx|c?EWAT`o5;?w-TZ6N32JT{g{ZD z*aPIb_XqL?IDdfj`&;A-g*d2r8RqCeRfyw(9OoqRk73_yUPHbJ`-dF;&m%8K-i>Gp zaS7|uuag`;xte%7t`oX`4f#0yij4Si}AIL9)9W?hHuk3RQ(02>sRP#&8Hwn?B`SrSe z3-MO`Bu=*rJpO9b5of9I2K;BM?+g5AsXLXwUge|75ki8<{1Va97$nYCc_e=m;zZZi z5ofA=segtLbI2Q1eu@1TXgQcn_-nAgh_x#J=||@d@<#PJ=RXhMwU9Tf+`b=4s+HvD QAWuSsa)g}lpDV=w09Dj6egFUf literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/gencertbuf.pl b/project1/cyassl-3.0.0/gencertbuf.pl new file mode 100755 index 00000000..6fb1929a --- /dev/null +++ b/project1/cyassl-3.0.0/gencertbuf.pl @@ -0,0 +1,110 @@ +#!/usr/bin/perl + +# gencertbuf.pl +# version 1.0 +# Updated 01/28/2013 +# +# Copyright (C) 2006-2013 wolfSSL +# + +use strict; +use warnings; + +# ---- SCRIPT SETTINGS ------------------------------------------------------- + +# output C header file to write cert/key buffers to +my $outputFile = "./cyassl/certs_test.h"; + +# 1024-bit certs/keys to be converted +# Used with USE_CERT_BUFFERS_1024 define. + +my @fileList_1024 = ( + [ "./certs/1024/client-key.der", "client_key_der_1024" ], + [ "./certs/1024/client-cert.der", "client_cert_der_1024" ], + [ "./certs/1024/dh1024.der", "dh_key_der_1024" ], + [ "./certs/1024/dsa1024.der", "dsa_key_der_1024" ], + [ "./certs/1024/rsa1024.der", "rsa_key_der_1024" ] + ); + +# 2048-bit certs/keys to be converted +# Used with USE_CERT_BUFFERS_2048 define. + +my @fileList_2048 = ( + [ "./certs/client-key.der", "client_key_der_2048" ], + [ "./certs/client-cert.der", "client_cert_der_2048" ], + [ "./certs/dh2048.der", "dh_key_der_2048" ], + [ "./certs/dsa2048.der", "dsa_key_der_2048" ], + [ "./certs/rsa2048.der", "rsa_key_der_2048" ] + ); + +# ---------------------------------------------------------------------------- + +my $num_1024 = @fileList_1024; +my $num_2048 = @fileList_2048; + +# open our output file, "+>" creates and/or truncates +open OUT_FILE, "+>", $outputFile or die $!; + +print OUT_FILE "/* certs_test.h */\n\n"; +print OUT_FILE "#ifndef CYASSL_CERTS_TEST_H\n"; +print OUT_FILE "#define CYASSL_CERTS_TEST_H\n\n"; + +# convert and print 1024-bit cert/keys +print OUT_FILE "#ifdef USE_CERT_BUFFERS_1024\n\n"; +for(my $i = 0; $i < $num_1024; $i++) { + print OUT_FILE "/* $fileList_1024[$i][0], 1024-bit */\n"; + print OUT_FILE "const unsigned char $fileList_1024[$i][1]\[] =\n"; + print OUT_FILE "{\n"; + file_to_hex($fileList_1024[$i][0]); + print OUT_FILE "};\n\n"; +} + +# convert and print 2048-bit certs/keys +print OUT_FILE "#elif defined(USE_CERT_BUFFERS_2048)\n\n"; +for(my $i = 0; $i < $num_2048; $i++) { + print OUT_FILE "/* $fileList_2048[$i][0], 2048-bit */\n"; + print OUT_FILE "const unsigned char $fileList_2048[$i][1]\[] =\n"; + print OUT_FILE "{\n"; + file_to_hex($fileList_2048[$i][0]); + print OUT_FILE "};\n\n"; +} + +print OUT_FILE "#endif /* USE_CERT_BUFFERS_1024 */\n\n"; +print OUT_FILE "#endif /* CYASSL_CERTS_TEST_H */\n\n"; + +# close certs_test.h file +close OUT_FILE or die $!; + +# print file as hex, comma-separated, as needed by C buffer +sub file_to_hex { + my $fileName = $_[0]; + + open my $fp, "<", $fileName or die $!; + binmode($fp); + + my $fileLen = -s $fileName; + my $byte; + + for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++) + { + if ($j == 1) { + print OUT_FILE "\t"; + } + read($fp, $byte, 1) or die "Error reading $fileName"; + my $output = sprintf("0x%02X", ord($byte)); + print OUT_FILE $output; + + if ($i != ($fileLen - 1)) { + print OUT_FILE ", "; + } + + if ($j == 10) { + $j = 0; + print OUT_FILE "\n"; + } + } + + print OUT_FILE "\n"; + + close($fp); +} diff --git a/project1/cyassl-3.0.0/input b/project1/cyassl-3.0.0/input new file mode 100644 index 00000000..06dbbf07 --- /dev/null +++ b/project1/cyassl-3.0.0/input @@ -0,0 +1,87 @@ +/* echoclient.c */ + +#include "openssl/ssl.h" +#include "../test.h" + + +int main(int argc, char** argv) +{ + SOCKET_T sockfd = 0; + + FILE* fin = stdin; + FILE* fout = stdout; + + int inCreated = 0; + int outCreated = 0; + + char send[1024]; + char reply[1024]; + + SSL_METHOD* method = 0; + SSL_CTX* ctx = 0; + SSL* ssl = 0; + +#ifdef _WIN32 + WSADATA wsd; + WSAStartup(0x0002, &wsd); +#endif + + if (argc >= 2) { + fin = fopen(argv[1], "r"); + inCreated = 1; + } + if (argc >= 3) { + fout = fopen(argv[2], "w"); + outCreated = 1; + } + + if (!fin) err_sys("can't open input file"); + if (!fout) err_sys("can't open output file"); + + tcp_connect(&sockfd); + + method = SSLv3_client_method(); + ctx = SSL_CTX_new(method); + + if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) + err_sys("can't load ca file"); + + ssl = SSL_new(ctx); + + SSL_set_fd(ssl, sockfd); + if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); + + while (fgets(send, sizeof(send), fin)) { + + int sendSz = strlen(send) + 1; + + if (SSL_write(ssl, send, sendSz) != sendSz) + err_sys("SSL_write failed"); + + if (strncmp(send, "quit", 4) == 0) { + fputs("sending server shutdown command: quit!\n", fout); + break; + } + + if (SSL_read(ssl, reply, sizeof(reply)) > 0) + fputs(reply, fout); + } + + SSL_shutdown(ssl); + SSL_free(ssl); + SSL_CTX_free(ctx); + + fflush(fout); + if (inCreated) fclose(fin); + if (outCreated) fclose(fout); + +#ifdef _WIN32 + closesocket(sockfd); +#else + close(sockfd); +#endif + + return 0; +} + + diff --git a/project1/cyassl-3.0.0/lib/dummy b/project1/cyassl-3.0.0/lib/dummy new file mode 100644 index 00000000..13c3b18c --- /dev/null +++ b/project1/cyassl-3.0.0/lib/dummy @@ -0,0 +1,2 @@ +// this is a dummy file + diff --git a/project1/cyassl-3.0.0/libtool b/project1/cyassl-3.0.0/libtool new file mode 100755 index 00000000..cd6eb964 --- /dev/null +++ b/project1/cyassl-3.0.0/libtool @@ -0,0 +1,10240 @@ +#! /bin/bash + +# libtool - Provide generalized library-building support services. +# Generated automatically by config.status (cyassl) 3.0.0 +# Libtool was configured on host khimes-TravelMate-X483: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=2.4.2 +macro_revision=1.3337 + +# Whether or not to build static libraries. +build_old_libs=no + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# What type of objects to build. +pic_mode=default + +# Whether or not to optimize for fast installation. +fast_install=yes + +# Shell to use when invoking shell scripts. +SHELL="/bin/bash" + +# An echo program that protects backslashes. +ECHO="printf %s\\n" + +# The PATH separator for the build system. +PATH_SEPARATOR=":" + +# The host system. +host_alias= +host=i686-pc-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=i686-pc-linux-gnu +build_os=linux-gnu + +# A sed program that does not truncate output. +SED="/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP="/bin/grep" + +# An ERE matcher. +EGREP="/bin/grep -E" + +# A literal string matcher. +FGREP="/bin/grep -F" + +# A BSD- or MS-compatible name lister. +NM="/usr/bin/nm -B" + +# Whether we need soft or hard links. +LN_S="ln -s" + +# What is the maximum length of a command? +max_cmd_len=1572864 + +# Object file suffix (normally "o"). +objext=o + +# Executable file suffix (normally ""). +exeext= + +# whether the shell understands "unset". +lt_unset=unset + +# turn spaces into newlines. +SP2NL="tr \\040 \\012" + +# turn newlines into spaces. +NL2SP="tr \\015\\012 \\040\\040" + +# convert $build file names to $host format. +to_host_file_cmd=func_convert_file_noop + +# convert $build files to toolchain format. +to_tool_file_cmd=func_convert_file_noop + +# An object symbol dumper. +OBJDUMP="objdump" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd="\$MAGIC_CMD" + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob="" + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob="no" + +# DLL creation program. +DLLTOOL="false" + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd="printf %s\\n" + +# The archiver. +AR="ar" + +# Flags to create an archive. +AR_FLAGS="cru" + +# How to feed a file listing to the archiver. +archiver_list_spec="@" + +# A symbol stripping program. +STRIP="strip" + +# Commands used to install an old-style archive. +RANLIB="ranlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" +old_postuninstall_cmds="" + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=no + +# A C compiler. +LTCC="clang" + +# LTCC compiler flags. +LTCFLAGS=" -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE " + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p'" + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'" + +# Specify filename containing input files for $NM. +nm_file_list_spec="@" + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot= + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=file + +# Must we lock files when doing compilation? +need_locks="no" + +# Manifest tool. +MANIFEST_TOOL=":" + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL="" + +# Tool to change global to local symbols on Mac OS X. +NMEDIT="" + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO="" + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL="" + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64="" + +# Old archive suffix (normally "a"). +libext=a + +# Shared library suffix (normally ".so"). +shrext_cmds=".so" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Do we need the "lib" prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Library versioning type. +version_type=linux + +# Shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# Shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Permission mode override for installation of shared libraries. +install_override_mode="" + +# Command to use after installation of a shared archive. +postinstall_cmds="" + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval="" + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Compile-time system search path for libraries. +sys_lib_search_path_spec="/usr/lib/clang/3.4 /usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib /lib " + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/i386-linux-gnu/libfakeroot /usr/lib/i386-linux-gnu/mesa-egl /usr/lib/i386-linux-gnu/mesa /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib " + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" + +# A language specific compiler. +CC="clang" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="" +module_expsym_cmds="" + +# Whether we are building with GNU ld or not. +with_gnu_ld="yes" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting ${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=no + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Commands necessary for finishing linking programs. +postlink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs="" + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects="" +postdep_objects="" +predeps="" +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="" + +# ### END LIBTOOL CONFIG + + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.2 +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} # Extended-shell func_dirname implementation + + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} # Extended-shell func_basename implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} # Extended-shell func_dirname_and_basename implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} # Extended-shell func_stripname implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} +} # Extended-shell func_split_short_opt implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=} +} # Extended-shell func_split_long_opt implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}+=\${2}" +} # Extended-shell func_append implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}+=\\ \$func_quote_for_eval_result" +} # Extended-shell func_append_quoted implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} # Extended-shell func_arith implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} # Extended-shell func_len implementation + + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} # Extended-shell func_lo2o implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} # Extended-shell func_xform implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +preserve_args+=" $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +preserve_args+=" $opt" + ;; + --no-verbose) + opt_verbose=false +preserve_args+=" $opt" + ;; + --silent|--quiet) + opt_silent=: +preserve_args+=" $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +preserve_args+=" $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +preserve_args+=" $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || preserve_args+=" --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_to_host_path_result+="$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + pie_flag+=" $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + later+=" $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + base_compile+=" $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist+=" $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist+=" $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command+=" -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command+=" -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command+="$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir+="/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + libdirs+=" $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + libs+=" $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds+=" + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog+="$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + files+=" $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog+=" $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + install_shared_prog+=" $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + install_shared_prog+=" -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs+=" $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs+=" $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs+=" $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir+="$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs+=" $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags+=" $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + libtool_args+=" $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command+=" @OUTPUT@" + finalize_command+=" @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command+=" @SYMFILE@" + finalize_command+=" @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles+=" $arg" + else + dlprefiles+=" $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs+=" $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs+=" $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles+=" $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles+=" $pic_object" + prev= + fi + + # A PIC object. + libobjs+=" $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects+=" $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects+=" $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + libobjs+=" $pic_object" + non_pic_objects+=" $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath+=" $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath+=" $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs+=" $arg" + prev= + continue + ;; + xcclinker) + linker_flags+=" $qarg" + compiler_flags+=" $qarg" + prev= + compile_command+=" $qarg" + finalize_command+=" $qarg" + continue + ;; + xcompiler) + compiler_flags+=" $qarg" + prev= + compile_command+=" $qarg" + finalize_command+=" $qarg" + continue + ;; + xlinker) + linker_flags+=" $qarg" + compiler_flags+=" $wl$qarg" + prev= + compile_command+=" $wl$qarg" + finalize_command+=" $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + compile_command+=" $link_static_flag" + finalize_command+=" $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command+=" $arg" + finalize_command+=" $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) deplibs+=" $arg" ;; + *) deplibs+=" -L$dir" ;; + esac + lib_search_path+=" $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath+=":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath+=":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs+=" System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs+=" $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + compiler_flags+=" $arg" + compile_command+=" $arg" + finalize_command+=" $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + compiler_flags+=" $arg" + compile_command+=" $arg" + finalize_command+=" $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags+=" $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath+=" $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg+=" $func_quote_for_eval_result" + compiler_flags+=" $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg+=" $wl$func_quote_for_eval_result" + compiler_flags+=" $wl$func_quote_for_eval_result" + linker_flags+=" $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + compile_command+=" $arg" + finalize_command+=" $arg" + compiler_flags+=" $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs+=" $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles+=" $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles+=" $pic_object" + prev= + fi + + # A PIC object. + libobjs+=" $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects+=" $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects+=" $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + libobjs+=" $pic_object" + non_pic_objects+=" $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs+=" $arg" + old_deplibs+=" $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles+=" $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles+=" $func_resolve_sysroot_result" + prev= + else + deplibs+=" $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command+=" $arg" + finalize_command+=" $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command+=" $arg" + finalize_command+=" $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + libs+=" $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs+=" $pre_post_deps" ;; + esac + pre_post_deps+=" $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs+=" $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags+=" $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags+=" $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags+=" $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath+=" $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles+=" $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles+=" $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags+=" $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles+=" $dlopen" + test -n "$dlpreopen" && dlprefiles+=" $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience+=" $ladir/$objdir/$old_library" + old_convenience+=" $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + tmp_libs+=" $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles+=" $lib $dependency_libs" + else + newdlfiles+=" $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path+=" $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path+=" $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + newdlprefiles+=" $dir/$linklib" + else + newdlprefiles+=" $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs+=" $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles+=" $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs+=" $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles+=" $dir/$dlname" + else + newdlprefiles+=" $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path+=" $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + tmp_libs+=" $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath+="$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath+=" $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs+=" $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs+=" $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath+=" $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir+=" -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath+="$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath+="$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath+="$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir+=" -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath+=" $temp_xrpath";; + esac;; + *) temp_deplibs+=" $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path+=" $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + specialdeplibs+=" $func_resolve_sysroot_result" ;; + esac + fi + tmp_libs+=" $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags+=" ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags+=" -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path+=" $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs+=" $deplib" ;; + esac + ;; + *) tmp_libs+=" $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs+=" $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs+="$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs+=" $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring+=":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs+=" $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist+=" $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs+=" $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + temp_xrpath+=" -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles+=" $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles+=" $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs+=" System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs+=" -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs+=" $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs+=" $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs+=" $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs+=" $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs+=" $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs+=" -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs+=" $deplib" ;; + esac + ;; + *) new_libs+=" $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath+=" $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath+="$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames+=" $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles+=" $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + delfiles+=" $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles+=" $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs+=" $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $convenience + libobjs+=" $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags+=" $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + delfiles+=" $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + delfiles+=" $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + objlist+=" $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles+=" $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles+=" $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs+=" $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated+=" $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command+=" ${wl}-bind_at_load" + finalize_command+=" ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs+=" -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs+=" $deplib" ;; + esac + ;; + *) new_libs+=" $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command+=" $compile_deplibs" + finalize_command+=" $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath+=" $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath+=":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath+=":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath+=" $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath+="$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath+="$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs+=" $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $addlibs + oldobjs+=" $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs+=" $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs+=" $gentop/$newobj" + ;; + *) oldobjs+=" $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + objlist+=" $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + newdependency_libs+=" -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + newdependency_libs+=" -R$func_replace_sysroot_result" + ;; + *) newdependency_libs+=" $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles+=" ${lt_sysroot:+=}$libdir/$name" + ;; + *) newdlfiles+=" $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles+=" ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles+=" $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles+=" $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM+=" $arg"; rmforce=yes ;; + -*) RM+=" $arg" ;; + *) files+=" $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) rmdirs+=" $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles+=" $odir/$n" + done + test -n "$old_library" && rmfiles+=" $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && rmfiles+=" $odir/$dlname" ;; + esac + test -n "$libdir" && rmfiles+=" $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles+=" $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles+=" $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles+=" $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles+=" $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles+=" $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles+=" $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles+=" $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" + +# A language specific compiler. +CC="g++" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="" +module_expsym_cmds="" + +# Whether we are building with GNU ld or not. +with_gnu_ld="yes" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting ${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=no + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Commands necessary for finishing linking programs. +postlink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs="/usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu /usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /usr/lib/gcc/i686-linux-gnu/4.8/../../.." + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects="/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.8/crtbeginS.o" +postdep_objects="/usr/lib/gcc/i686-linux-gnu/4.8/crtendS.o /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o" +predeps="" +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="-L/usr/lib/gcc/i686-linux-gnu/4.8 -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.8/../../.." + +# ### END LIBTOOL TAG CONFIG: CXX diff --git a/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 b/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 new file mode 100644 index 00000000..51ce0d0c --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 @@ -0,0 +1,29 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_add_am_macro.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_ADD_AM_MACRO([RULE]) +# +# DESCRIPTION +# +# Adds the specified rule to $AMINCLUDE. This macro will only work +# properly with implementations of Make which allow include statements. +# See also AX_ADD_AM_MACRO_STATIC. +# +# LICENSE +# +# Copyright (c) 2009 Tom Howard +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AC_DEFUN([AX_ADD_AM_MACRO],[ + AC_REQUIRE([AX_AM_MACROS]) + AX_APPEND_TO_FILE([$AMINCLUDE],[$1]) +]) diff --git a/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 b/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 new file mode 100644 index 00000000..0bee7ab6 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 @@ -0,0 +1,55 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_am_jobserver.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_AM_JOBSERVER([default_value]) +# +# DESCRIPTION +# +# Enables the use of make's jobserver for the purpose of parallel building +# by passing the -j option to make. +# +# The option --enable-jobserver is added to configure which can accept a +# yes, no, or an integer. The integer is the number of separate jobs to +# allow. If 'yes' is given, then the is assumed to be one more than the +# number of CPUs (determined through AX_COUNT_CPUS). If the value of no is +# given, then the jobserver is disabled. The default value is given by the +# first argument of the macro, or 'yes' if the argument is omitted. +# +# This macro makes use of AX_AM_MACROS, so you must add the following line +# +# @INC_AMINCLUDE@ +# +# to your Makefile.am files. +# +# LICENSE +# +# Copyright (c) 2008 Michael Paul Bailey +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_AM_JOBSERVER], [ + AC_REQUIRE([AX_COUNT_CPUS]) + AC_REQUIRE([AX_AM_MACROS]) + AC_ARG_ENABLE( jobserver, + [ --enable-jobserver@<:@=no/yes/@%:@@:>@ default=m4_ifval([$1],[$1],[yes]) + Enable up to @%:@ make jobs + yes: enable one more than CPU count + ],, [enable_jobserver=m4_ifval([$1],[$1],[yes])]) + if test "x$enable_jobserver" = "xyes"; then + enable_jobserver=$CPU_COUNT + ((enable_jobserver++)) + fi + m4_pattern_allow(AM_MAKEFLAGS) + if test "x$enable_jobserver" != "xno"; then + AC_MSG_NOTICE([added jobserver support to make for $enable_jobserver jobs]) + AX_ADD_AM_MACRO( AM_MAKEFLAGS += -j$enable_jobserver ) + fi +]) diff --git a/project1/cyassl-3.0.0/m4/ax_am_macros.m4 b/project1/cyassl-3.0.0/m4/ax_am_macros.m4 new file mode 100644 index 00000000..6b4bd223 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_am_macros.m4 @@ -0,0 +1,44 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_am_macros.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_AM_MACROS +# +# DESCRIPTION +# +# Adds support for macros that create Make rules. You must manually add +# the following line +# +# @INC_AMINCLUDE@ +# +# to your Makefile.in (or Makefile.am if you use Automake) files. +# +# LICENSE +# +# Copyright (c) 2009 Tom Howard +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AC_DEFUN([AX_AM_MACROS], +[ +AC_MSG_NOTICE([adding automake macro support]) +AMINCLUDE="aminclude.am" +AC_SUBST(AMINCLUDE) +AC_MSG_NOTICE([creating $AMINCLUDE]) +AMINCLUDE_TIME=`date` +AX_PRINT_TO_FILE([$AMINCLUDE],[[ +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on $AMINCLUDE_TIME + +]]) + +INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" +AC_SUBST(INC_AMINCLUDE) +]) diff --git a/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 b/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 new file mode 100644 index 00000000..1f8e7084 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 @@ -0,0 +1,65 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the compiler works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. During the check the flag is always added to the +# current language's flags. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and +# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with +# AX_APPEND_LINK_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 3 + +AC_DEFUN([AX_APPEND_COMPILE_FLAGS], +[AC_REQUIRE([AX_CHECK_COMPILE_FLAG]) +AC_REQUIRE([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) +done +])dnl AX_APPEND_COMPILE_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_append_flag.m4 b/project1/cyassl-3.0.0/m4/ax_append_flag.m4 new file mode 100644 index 00000000..1d38b76f --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_append_flag.m4 @@ -0,0 +1,69 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) +# +# DESCRIPTION +# +# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space +# added in between. +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains +# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly +# FLAG. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_APPEND_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl +AS_VAR_SET_IF(FLAGS, + [case " AS_VAR_GET(FLAGS) " in + *" $1 "*) + AC_RUN_LOG([: FLAGS already contains $1]) + ;; + *) + AC_RUN_LOG([: FLAGS="$FLAGS $1"]) + AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) + ;; + esac], + [AS_VAR_SET(FLAGS,["$1"])]) +AS_VAR_POPDEF([FLAGS])dnl +])dnl AX_APPEND_FLAG diff --git a/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 b/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 new file mode 100644 index 00000000..f9f54e08 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 @@ -0,0 +1,27 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_to_file.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_TO_FILE([FILE],[DATA]) +# +# DESCRIPTION +# +# Appends the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 8 + +AC_DEFUN([AX_APPEND_TO_FILE],[ +AC_REQUIRE([AX_FILE_ESCAPES]) +printf "$2\n" >> "$1" +]) diff --git a/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 b/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 new file mode 100644 index 00000000..c3a8d695 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 @@ -0,0 +1,72 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 b/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 new file mode 100644 index 00000000..e2d0d363 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 @@ -0,0 +1,71 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the linker or gives an error. +# (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_LINK_FLAG], +[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl +AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $4 $1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + LDFLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_LINK_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 b/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 new file mode 100644 index 00000000..d4f3d290 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 @@ -0,0 +1,57 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COUNT_CPUS +# +# DESCRIPTION +# +# Attempt to count the number of processors present on the machine. If the +# detection fails, then a value of 1 is assumed. +# +# The value is placed in the CPU_COUNT variable. +# +# LICENSE +# +# Copyright (c) 2012 Brian Aker +# Copyright (c) 2008 Michael Paul Bailey +# Copyright (c) 2008 Christophe Tournayre +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + + AC_DEFUN([AX_COUNT_CPUS],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_PROG_EGREP]) + AC_MSG_CHECKING([the number of available CPUs]) + CPU_COUNT="0" + + AS_CASE([$host_os],[ + *darwin*],[ + AS_IF([test -x /usr/sbin/sysctl],[ + sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` + AS_IF([test sysctl_a],[ + CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` + ]) + ])],[ + *linux*],[ + AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ + AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ + CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` + ]) + ]) + ]) + + AS_IF([test "x$CPU_COUNT" = "x0"],[ + CPU_COUNT="1" + AC_MSG_RESULT( [unable to detect (assuming 1)] ) + ],[ + AC_MSG_RESULT( $CPU_COUNT ) + ]) + ]) diff --git a/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 b/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 new file mode 100644 index 00000000..535838f4 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 @@ -0,0 +1,195 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_create_generic_config.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CREATE_GENERIC_CONFIG [(PACKAGEnlibs [, VERSION])] +# +# DESCRIPTION +# +# Creates a generic PACKAGE-config file that has all the things that you +# want, hmm, well, atleast it has --cflags, --version, --libs. Ahhm, did +# you see ax_path_generic in the autoconf-archive? ;-) +# +# this macros saves you all the typing for a pkg-config.in script, you +# don't even need to distribute one along. Place this macro in your +# configure.ac, et voila, you got one that you want to install. +# +# oh, btw, if the first arg looks like "mylib -lwhat' then it will go to +# be added to the --libs, and mylib is extracted. +# +# the defaults: $1 = $PACKAGE $LIBS $2 = $VERSION there is also an +# AC_SUBST(GENERIC_CONFIG) that will be set to the name of the file that +# we did output in this macro. Use as: +# +# install-exec-local: install-generic-config +# +# install-generic-config: +# $(mkinstalldirs) $(DESTDIR)$(bindir) +# $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 6 + +AU_ALIAS([AC_CREATE_GENERIC_CONFIG], [AX_CREATE_GENERIC_CONFIG]) +AC_DEFUN([AX_CREATE_GENERIC_CONFIG],[# create a generic PACKAGE-config file +L=`echo ifelse($1, , $PACKAGE $LIBS, $1)` +P=`echo $L | sed -e 's/ -.*//'` +P=`echo $P` +V=`echo ifelse($2, , $VERSION, $2)` +F=`echo $P-config` +L=`echo -l$L | sed -e 's/^-llib/-l/'` +AC_MSG_RESULT(creating $F - generic $V for $L) +test "x$prefix" = xNONE && prefix="$ac_default_prefix" +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +echo '#! /bin/sh' >$F +echo ' ' >>$F +echo 'package="'$P'"' >>$F +echo 'version="'$V'"' >>$F +echo 'libs="'$L'"' >>$F +echo ' ' >>$F +# in the order of occurence a standard automake Makefile +echo 'prefix="'$prefix'"' >>$F +echo 'exec_prefix="'$exec_prefix'"' >>$F +echo 'bindir="'$bindir'"' >>$F +echo 'sbindir="'$sbindir'"' >>$F +echo 'libexecdir="'$libexecdir'"' >>$F +echo 'datadir="'$datadir'"' >>$F +echo 'sysconfdir="'$sysconfdir'"' >>$F +echo 'sharedstatedir="'$sharedstatedir'"' >>$F +echo 'localstatedir="'$localstatedir'"' >>$F +echo 'libdir="'$libdir'"' >>$F +echo 'infodir="'$infodir'"' >>$F +echo 'mandir="'$mandir'"' >>$F +echo 'includedir="'$includedir'"' >>$F +echo 'target="'$target'"' >>$F +echo 'host="'$host'"' >>$F +echo 'build="'$build'"' >>$F +echo ' ' >>$F +echo 'if test "'"\$""#"'" -eq 0; then' >>$F +echo ' cat <>$F +echo 'Usage: $package-config [OPTIONS]' >>$F +echo 'Options:' >>$F +echo ' --prefix[=DIR]) : \$prefix' >>$F +echo ' --package) : \$package' >>$F +echo ' --version) : \$version' >>$F +echo ' --cflags) : -I\$includedir' >>$F +echo ' --libs) : -L\$libdir -l\$package' >>$F +echo ' --help) print all the options (not just these)' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +echo ' ' >>$F +echo 'o=""' >>$F +echo 'h=""' >>$F +echo 'for i in "[$]@"; do' >>$F +echo ' case $i in' >>$F +echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F +echo ' --prefix) o="$o $prefix" ;;' >>$F +echo ' --package) o="$o $package" ;;' >>$F +echo ' --version) o="$o $version" ;;' >>$F +echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F +echo ' then o="$o -I$includedir" ; fi' >>$F +echo ' ;;' >>$F +echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F +echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F +echo ' --bindir) o="$o $bindir" ;;' >>$F +echo ' --sbindir) o="$o $sbindir" ;;' >>$F +echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F +echo ' --datadir) o="$o $datadir" ;;' >>$F +echo ' --datainc) o="$o -I$datadir" ;;' >>$F +echo ' --datalib) o="$o -L$datadir" ;;' >>$F +echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F +echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F +echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F +echo ' --libdir) o="$o $libdir" ;;' >>$F +echo ' --libadd) o="$o -L$libdir" ;;' >>$F +echo ' --infodir) o="$o $infodir" ;;' >>$F +echo ' --mandir) o="$o $mandir" ;;' >>$F +echo ' --target) o="$o $target" ;;' >>$F +echo ' --host) o="$o $host" ;;' >>$F +echo ' --build) o="$o $build" ;;' >>$F +echo ' --data) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F +echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F +echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F +echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F +echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F +echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F +echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F +echo ' --help) h="1" ;;' >>$F +echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F +echo ' v=`echo $i | sed -e s://:\$:g`' >>$F +echo ' v=`eval "echo $v"` ' >>$F +echo ' o="$o $v" ;; ' >>$F +echo ' esac' >>$F +echo 'done' >>$F +echo ' ' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'o=`eval "echo $o"`' >>$F +echo 'eval "echo $o"' >>$F +echo ' ' >>$F +echo 'if test ! -z "$h" ; then ' >>$F +echo 'cat <>$F +echo ' --prefix=xxx) (what is that for anyway?)' >>$F +echo ' --prefix) \$prefix $prefix' >>$F +echo ' --package) \$package $package' >>$F +echo ' --version) \$version $version' >>$F +echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F +echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F +echo ' --exec_prefix) or... ' >>$F +echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F +echo ' --bindir) \$bindir $bindir' >>$F +echo ' --sbindir) \$sbindir $sbindir' >>$F +echo ' --libexecdir) \$libexecdir $libexecdir' >>$F +echo ' --datadir) \$datadir $datadir' >>$F +echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F +echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F +echo ' --localstatedir) \$localstatedir $localstatedir' >>$F +echo ' --libdir) \$libdir $libdir' >>$F +echo ' --infodir) \$infodir $infodir' >>$F +echo ' --mandir) \$mandir $mandir' >>$F +echo ' --target) \$target $target' >>$F +echo ' --host) \$host $host' >>$F +echo ' --build) \$build $build' >>$F +echo ' --data) -I\$datadir/\$package' >>$F +echo ' --pkgdatadir) \$datadir/\$package' >>$F +echo ' --pkglibdir) \$libdir/\$package' >>$F +echo ' --pkgincludedir) \$includedir/\$package' >>$F +echo ' --help) generated by ax_create_generic_config.m4' >>$F +echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F +echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F +echo 'EOF' >>$F +echo 'fi' >>$F +GENERIC_CONFIG="$F" +AC_SUBST(GENERIC_CONFIG) +]) diff --git a/project1/cyassl-3.0.0/m4/ax_debug.m4 b/project1/cyassl-3.0.0/m4/ax_debug.m4 new file mode 100644 index 00000000..63c883c3 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_debug.m4 @@ -0,0 +1,61 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_DEBUG() +# +# DESCRIPTION +# +# --enable-debug +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 6 + +AC_DEFUN([AX_DEBUG], + [AC_PREREQ([2.63])dnl + AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])], + [ax_enable_debug=yes + AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])], + [ax_enable_debug=no + AC_SUBST([MCHECK]) + AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])]) + + AC_MSG_CHECKING([for debug]) + AC_MSG_RESULT([$ax_enable_debug]) + AM_CONDITIONAL([DEBUG],[test "x${ax_enable_debug}" = "xyes"])]) diff --git a/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 b/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 new file mode 100644 index 00000000..f4c6a06a --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 @@ -0,0 +1,30 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_file_escapes.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_FILE_ESCAPES +# +# DESCRIPTION +# +# Writes the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_FILE_ESCAPES],[ +AX_DOLLAR="\$" +AX_SRB="\\135" +AX_SLB="\\133" +AX_BS="\\\\" +AX_DQ="\"" +]) diff --git a/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 b/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 new file mode 100644 index 00000000..93240607 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 @@ -0,0 +1,238 @@ +# =========================================================================== +# https://github.com/BrianAker/ddm4/ +# =========================================================================== +# +# SYNOPSIS +# +# AX_HARDEN_COMPILER_FLAGS() +# AX_HARDEN_LINKER_FLAGS() +# AX_HARDEN_CC_COMPILER_FLAGS() +# AX_HARDEN_CXX_COMPILER_FLAGS() +# +# DESCRIPTION +# +# Any compiler flag that "hardens" or tests code. C99 is assumed. +# +# NOTE: Implementation based on AX_APPEND_FLAG. +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# The Following flags are not checked for +# -Wdeclaration-after-statement is counter to C99 +# AX_APPEND_COMPILE_FLAGS([-std=c++11]) -- Not ready yet +# AX_APPEND_COMPILE_FLAGS([-pedantic]) -- ? +# AX_APPEND_COMPILE_FLAGS([-Wstack-protector]) -- Issues on 32bit compile +# AX_APPEND_COMPILE_FLAGS([-fstack-protector-all]) -- Issues on 32bit compile +# AX_APPEND_COMPILE_FLAGS([-Wlong-long]) -- Don't turn on for compatibility issues memcached_stat_st +# AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_cflags_extra]) +# AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_cflags_extra]) +# AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cflags_extra]) +# AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cflags_extra]) -- problems with fastmath stack size checks +# AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cflags_extra]) -- causes RSA verify problem on x64 +# AX_APPEND_COMPILE_FLAGS([-Wunreachable-code],,[$ax_append_compile_cflags_extra]) -- older clang and when gcc had it are buggy + +#serial 4 + + AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [ + AC_REQUIRE([AX_CHECK_LINK_FLAG]) + AC_REQUIRE([AX_VCS_CHECKOUT]) + AC_REQUIRE([AX_DEBUG]) + + dnl If we are inside of VCS we append -Werror, otherwise we just use it to test other flags + AX_HARDEN_LIB= + ax_append_compile_link_flags_extra= + AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],[ + AX_CHECK_LINK_FLAG([-Werror],[ + AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" + ]) + ],[ + AX_CHECK_LINK_FLAG([-Werror],[ + ax_append_compile_link_flags_extra='-Werror' + ]) + ]) + + AX_CHECK_LINK_FLAG([-z relro -z now],[ + AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" + ],,[$ax_append_compile_link_flags_extra]) + + AX_CHECK_LINK_FLAG([-pie],[ + AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" + ],,[$ax_append_compile_link_flags_extra]) + + LIB="$LIB $AX_HARDEN_LIB" + ]) + + AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS], [ + AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) + AC_REQUIRE([AX_HARDEN_LINKER_FLAGS]) + + AC_LANG_PUSH([C]) + + CFLAGS= + ac_cv_warnings_as_errors=no + ax_append_compile_cflags_extra= + AS_IF([test "$ac_cv_vcs_checkout" = "yes"],[ + AX_APPEND_COMPILE_FLAGS([-Werror]) + ac_cv_warnings_as_errors=yes + ],[ + AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cflags_extra]) + ]) + + AS_IF([test "$ax_enable_debug" = "yes"], [ + AX_APPEND_COMPILE_FLAGS([-g]) + AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cflags_extra]) + ],[]) + + AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cflags_extra]) + + AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wno-strict-aliasing],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cflags_extra]) + dnl Anything below this comment please keep sorted. + AS_IF([test "$CC" = "clang"],[],[ + AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cflags_extra]) + ]) + AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast],,[$ax_append_compile_cflags_extra]) + dnl Not in use -Wc++-compat + AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wnested-externs],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Woverride-init],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra]) + AX_APPEND_COMPILE_FLAGS([-fPIE],,[$ax_append_compile_cflags_extra]) + AC_LANG_POP + ]) + + AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS], [ + AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS]) + AC_LANG_PUSH([C++]) + + ax_append_compile_cxxflags_extra= + AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],[ + AX_APPEND_COMPILE_FLAGS([-Werror]) + ],[ + AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cxxflags_extra]) + ]) + + AS_IF([test "$ax_enable_debug" = "yes" ], [ + AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cxxflags_extra]) + ],[ + AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2],,[$ax_append_compile_cxxflags_extra]) + ]) + + AS_IF([test "$ac_cv_vcs_checkout" = "yes" ], [ + AX_APPEND_COMPILE_FLAGS([-Werror],,[$ax_append_compile_cxxflags_extra]) + ],[ + AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cxxflags_extra]) + ]) + + AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wno-strict-aliasing],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cxxflags_extra]) + dnl Anything below this comment please keep sorted. + AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wctor-dtor-privacy],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wc++11-compat],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cxxflags_extra]) + AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cxxflags_extra]) + AC_LANG_POP + ]) + + AC_DEFUN([AX_HARDEN_COMPILER_FLAGS], [ + AC_REQUIRE([AX_HARDEN_CXX_COMPILER_FLAGS]) + ]) + + AC_DEFUN([AX_CC_OTHER_FLAGS], [ + AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) + AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS]) + + AC_LANG_PUSH([C]) + AX_APPEND_COMPILE_FLAGS([-pipe],,[$ax_append_compile_cflags_extra]) + AC_LANG_POP + ]) diff --git a/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 b/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 new file mode 100644 index 00000000..5b9d1c39 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 @@ -0,0 +1,27 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_print_to_file.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PRINT_TO_FILE([FILE],[DATA]) +# +# DESCRIPTION +# +# Writes the specified data to the specified file. +# +# LICENSE +# +# Copyright (c) 2008 Tom Howard +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_PRINT_TO_FILE],[ +AC_REQUIRE([AX_FILE_ESCAPES]) +printf "$2" > "$1" +]) diff --git a/project1/cyassl-3.0.0/m4/ax_pthread.m4 b/project1/cyassl-3.0.0/m4/ax_pthread.m4 new file mode 100644 index 00000000..bdb34b0a --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_pthread.m4 @@ -0,0 +1,320 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also link it with them as well. e.g. you should link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threads programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name +# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 20 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) + AC_MSG_RESULT($ax_pthread_ok) + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + AC_REQUIRE([WOLFSSL_DARWIN_USING_CLANG]) + AS_IF([test x"$wolfssl_darwin_clang" = x"yes"], + [ax_pthread_flags="$ax_pthread_flags"], + [ax_pthread_flags="-pthread $ax_pthread_flags"]) + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($ax_pthread_ok) + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $attr; return attr /* ; */])], + [attr_name=$attr; break], + []) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + ax_cv_PTHREAD_PRIO_INHERIT, [ + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], + AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/project1/cyassl-3.0.0/m4/ax_tls.m4 b/project1/cyassl-3.0.0/m4/ax_tls.m4 new file mode 100644 index 00000000..3f6b5e10 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_tls.m4 @@ -0,0 +1,92 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_tls.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_TLS([action-if-found], [action-if-not-found]) +# +# DESCRIPTION +# +# Provides a test for the compiler support of thread local storage (TLS) +# extensions. Defines TLS if it is found. Currently knows about GCC/ICC +# and MSVC. I think SunPro uses the same as GCC, and Borland apparently +# supports either. +# +# LICENSE +# +# Copyright (c) 2008 Alan Woodland +# Copyright (c) 2010 Diego Elio Petteno` +# +# This program 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 3 of the License, or (at your +# option) any later version. +# +# This program 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 11 + +# Define m4_ifblank and m4_ifnblank macros from introduced in +# autotools 2.64 m4sugar.m4 if using an earlier autotools. + +ifdef([m4_ifblank], [], [ + m4_define([m4_ifblank], + [m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$2], [$3])]) + ]) + + +ifdef([m4_ifnblank], [], [ + m4_define([m4_ifnblank], + [m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$3], [$2])]) + ]) + +AC_DEFUN([AX_TLS], [ + AC_MSG_CHECKING(for thread local storage (TLS) class) + AC_CACHE_VAL(ac_cv_tls, [ + ax_tls_keywords="__thread __declspec(thread) none" + for ax_tls_keyword in $ax_tls_keywords; do + AS_CASE([$ax_tls_keyword], + [none], [ac_cv_tls=none ; break], + [AC_TRY_COMPILE( + [#include + static void + foo(void) { + static ] $ax_tls_keyword [ int bar; + exit(1); + }], + [], + [ac_cv_tls=$ax_tls_keyword ; break], + ac_cv_tls=none + )]) + done + ]) + AC_MSG_RESULT($ac_cv_tls) + + AS_IF([test "$ac_cv_tls" != "none"], + AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here]) + m4_ifnblank([$1], [$1]), + m4_ifnblank([$2], [$2]) + ) +]) diff --git a/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 b/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 new file mode 100644 index 00000000..8047b65e --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 @@ -0,0 +1,75 @@ +# =========================================================================== +# http:// +# =========================================================================== +# +# SYNOPSIS +# +# AX_VCS_CHECKOUT +# +# DESCRIPTION +# +# Discover whether or not we are operating with a tree which +# has been checked out of a version control system. +# +# +# LICENSE +# +# Copyright (C) 2012 Brian Aker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# * The names of its contributors may not be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#serial 6 + +AC_DEFUN([AX_VCS_SYSTEM], + [AC_PREREQ([2.63])dnl + AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system], + [ac_cv_vcs_system="none" + AS_IF([test -d ".bzr"],[ac_cv_vcs_system="bazaar"]) + AS_IF([test -d ".svn"],[ac_cv_vcs_system="svn"]) + AS_IF([test -d ".hg"],[ac_cv_vcs_system="mercurial"]) + AS_IF([test -d ".git"],[ac_cv_vcs_system="git"]) + ]) + AC_DEFINE_UNQUOTED([VCS_SYSTEM],["$ac_cv_vcs_system"],[VCS system]) + ]) + +AC_DEFUN([AX_VCS_CHECKOUT], + [AC_PREREQ([2.63])dnl + AC_REQUIRE([AX_VCS_SYSTEM]) + AC_CACHE_CHECK([for vcs checkout],[ac_cv_vcs_checkout], + [AS_IF([test "x$ac_cv_vcs_system" != "xnone"], + [ac_cv_vcs_checkout=yes], + [ac_cv_vcs_checkout=no]) + ]) + + AM_CONDITIONAL([IS_VCS_CHECKOUT],[test "x$ac_cv_vcs_checkout" = "xyes"]) + AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"], + [AC_DEFINE([VCS_CHECKOUT],[1],[Define if the code was built from VCS.])], + [AC_DEFINE([VCS_CHECKOUT],[0],[Define if the code was built from VCS.])]) + ]) diff --git a/project1/cyassl-3.0.0/m4/hexversion.m4 b/project1/cyassl-3.0.0/m4/hexversion.m4 new file mode 100644 index 00000000..8d26155e --- /dev/null +++ b/project1/cyassl-3.0.0/m4/hexversion.m4 @@ -0,0 +1,6 @@ +AC_DEFUN([CREATE_HEX_VERSION],[ + + HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \ + awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` + AC_SUBST([HEX_VERSION]) +]) diff --git a/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 b/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 new file mode 100644 index 00000000..e786e61c --- /dev/null +++ b/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 @@ -0,0 +1,25 @@ +dnl @synopsis LIB_SOCKET_NSL +dnl +dnl This macro figures out what libraries are required on this platform +dnl to link sockets programs. +dnl +dnl The common cases are not to need any extra libraries, or to need +dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless we +dnl need it, though, since on some OSes where it isn't necessary it +dnl will totally break networking. Unisys also includes gethostbyname() +dnl in libsocket but needs libnsl for socket(). +dnl +dnl @category Misc +dnl @author Russ Allbery +dnl @author Stepan Kasal +dnl @author Warren Young +dnl @version 2005-09-06 +dnl @license AllPermissive + +AC_DEFUN([LIB_SOCKET_NSL], +[ + AC_SEARCH_LIBS([gethostbyname], [nsl]) + AC_SEARCH_LIBS([socket], [socket], [], [ + AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], + [], [-lnsl])]) +]) diff --git a/project1/cyassl-3.0.0/m4/libtool.m4 b/project1/cyassl-3.0.0/m4/libtool.m4 new file mode 100644 index 00000000..44e0ecff --- /dev/null +++ b/project1/cyassl-3.0.0/m4/libtool.m4 @@ -0,0 +1,7982 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/project1/cyassl-3.0.0/m4/ltoptions.m4 b/project1/cyassl-3.0.0/m4/ltoptions.m4 new file mode 100644 index 00000000..5d9acd8e --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ltoptions.m4 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/project1/cyassl-3.0.0/m4/ltsugar.m4 b/project1/cyassl-3.0.0/m4/ltsugar.m4 new file mode 100644 index 00000000..9000a057 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/project1/cyassl-3.0.0/m4/ltversion.m4 b/project1/cyassl-3.0.0/m4/ltversion.m4 new file mode 100644 index 00000000..07a8602d --- /dev/null +++ b/project1/cyassl-3.0.0/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/project1/cyassl-3.0.0/m4/lt~obsolete.m4 b/project1/cyassl-3.0.0/m4/lt~obsolete.m4 new file mode 100644 index 00000000..c573da90 --- /dev/null +++ b/project1/cyassl-3.0.0/m4/lt~obsolete.m4 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/project1/cyassl-3.0.0/m4/visibility.m4 b/project1/cyassl-3.0.0/m4/visibility.m4 new file mode 100644 index 00000000..75c34b6e --- /dev/null +++ b/project1/cyassl-3.0.0/m4/visibility.m4 @@ -0,0 +1,77 @@ +# visibility.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl MacOS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_MSG_CHECKING([whether the -Werror option is usable]) + AC_CACHE_VAL([gl_cv_cc_vis_werror], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_vis_werror]) + dnl Now check whether visibility declarations are supported. + AC_MSG_CHECKING([for simple visibility declarations]) + AC_CACHE_VAL([gl_cv_cc_visibility], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_visibility]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 b/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 new file mode 100644 index 00000000..fee9b6ae --- /dev/null +++ b/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 @@ -0,0 +1,37 @@ +# =========================================================================== +# +# SYNOPSIS +# +# WOLFSSL_DARWIN_USING_CLANG +# +# DESCRIPTION +# +# With the advent of Apple Xcode v5.0, the old tool sets are missing from +# the distribution. The provided "gcc" executable wrapper accepts the +# "-pthread" flag, and passes it to the underlying "clang" which chokes +# on it. This script checks the version of the gcc executable to see if +# it reports it is really "clang". +# +# The value is placed in the wolfssl_darwin_clang variable. +# +# LICENSE +# +# Copyright (c) 2013 John Safranek +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + +AC_DEFUN([WOLFSSL_DARWIN_USING_CLANG], + [ + if test x"$CC" = xclang; then + wolfssl_darwin_clang=yes + elif test x"$CC" = x || test x"$CC" = xgcc; then + if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then + wolfssl_darwin_clang=yes + fi + fi + ]) diff --git a/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po b/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po b/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h b/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h new file mode 100644 index 00000000..323de525 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h @@ -0,0 +1,28 @@ +void _mon_putc(char c); + +static void init_serial() { + #ifdef MICROCHIP_PIC32 +#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__) + /* Set up PB2 divisor for UART2 */ + SYSKEY = 0x00000000; + SYSKEY = 0xAA996655; + SYSKEY = 0x556699AA; + PB2DIV = 0x00008018; + SYSKEY = 0x33333333; + + /* UART2 Init */ +// U2BRG = 0x0C; + U2BRG = 0x7; + ANSELBCLR = 0x4000; + ANSELGCLR = 0x0040; + RPB14R = 0x02; + U2RXR = 0x01; + U2MODE = 0x8000; + U2STA = 0x400; +#elif defined __PIC32MX__ + SYSTEMConfigPerformance(80000000); + DBINIT(); +#endif + +#endif +} diff --git a/project1/cyassl-3.0.0/mcapi/README b/project1/cyassl-3.0.0/mcapi/README new file mode 100644 index 00000000..01776dc2 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/README @@ -0,0 +1,79 @@ +CyaSSL MPLAB X Project Files + +This directory contains project files for the Microchip MPLAB X IDE. These +projects have been set up to use the Microchip PIC32 Ethernet Starter Kit +and the Microchip XC32 compiler, and have been created specifically to test +the Microchip-specific CTaoCrypt API with compression support. For MPLAB X +projects that don't use compression and are generic to the CTaoCrypt API, +please see the /mplabx directory. + +In order to generate the necessary auto-generated MPLAB X files, make sure +to import the cyassl.X and zlib.X projects into your MPLAB X workspace before +trying to build either the CTaoCrypt test or benchmark applications. This will +correctly set up the respective project's Makefiles. + +Included Project Files +----------------------- + +1. CyaSSL library (cyassl.X) + + This project builds a static CyaSSL library. Prior to building this + project, uncomment the MICROCHIP_PIC32 define located in: + + /cyassl/ctaocrypt/settings.h + + After this project has been built, the compiled library will be located + at: + + /mplabx/cyassl.X/dist/default/production/cyassl.X.a + + Note that this project includes the zlib header location in the project's + include paths. This is because this project has been set up to be compiled + with zlib support to enable compression and decompression features. + +2. CTaoCrypt Test App (ctaocrypt_test.X) + + This project tests the CTaoCrypt cryptography modules. It is generally + a good idea to run this first on an embedded system after compiling + CyaSSL in order to verify all underlying crypto is working correctly. + +3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X) + + This project builds the CTaoCrypt benchmark application. If the CyaSSL + project (cyassl.X) has been compiled with libz support and is being + used to build this project, the zlib.X project will need to added to + the "Libraries" folder under the ctaocrypt_benchmark.X project before + it will compile successfully. + +4. CTaoCrypt MCAPI Test App (ctaocrypt_mcapi.X) + + This project tests the Microchip crytpo API layer. The Microchip crypto + layer is located under the /mcapi directory. + +5. zlib library (zlib.X) + + This project builds the zlib library for use in the ctaocrypt_test.X + and ctaocrypt_mcapi.X projects. This project expects the zlib sources + to be located under the CyaSSL root directory. Currently it is set up + to work with zlib 1.2.8, and looks for sources under: + + /zlib-1.2.8 + +PIC32MX/PIC32MZ +--------------- + +The projects are set for PIC32MX by default. For PIC32MZ, change project +properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to +XC32-gcc->Preprocessing and messages-> Preprocessor macros. + +MIPS16 and MIPS32 Support +------------------------- + +These projects support both MIPS16 and MIPS32 instruction sets. Switching +between these two instruction sets can be done in each project's properties +settings by checking the "Generate 16-bit code" checkbox. + +Support +------- +Please send questions or comments to support@wolfssl.com + diff --git a/project1/cyassl-3.0.0/mcapi/crypto.c b/project1/cyassl-3.0.0/mcapi/crypto.c new file mode 100644 index 00000000..d7232449 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/crypto.c @@ -0,0 +1,703 @@ +/* crypto.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* Implements Microchip CRYPTO API layer */ + + + +#include "crypto.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Initialize MD5 */ +int CRYPT_MD5_Initialize(CRYPT_MD5_CTX* md5) +{ + typedef char md5_test[sizeof(CRYPT_MD5_CTX) >= sizeof(Md5) ? 1 : -1]; + (void)sizeof(md5_test); + + if (md5 == NULL) + return BAD_FUNC_ARG; + + InitMd5((Md5*)md5); + + return 0; +} + + +/* Add data to MD5 */ +int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX* md5, const unsigned char* input, + unsigned int sz) +{ + if (md5 == NULL || input == NULL) + return BAD_FUNC_ARG; + + Md5Update((Md5*)md5, input, sz); + + return 0; +} + + +/* Get MD5 Final into digest */ +int CRYPT_MD5_Finalize(CRYPT_MD5_CTX* md5, unsigned char* digest) +{ + if (md5 == NULL || digest == NULL) + return BAD_FUNC_ARG; + + Md5Final((Md5*)md5, digest); + + return 0; +} + + +/* Initialize SHA */ +int CRYPT_SHA_Initialize(CRYPT_SHA_CTX* sha) +{ + typedef char sha_test[sizeof(CRYPT_SHA_CTX) >= sizeof(Sha) ? 1 : -1]; + (void)sizeof(sha_test); + + if (sha == NULL) + return BAD_FUNC_ARG; + + return InitSha((Sha*)sha); +} + + +/* Add data to SHA */ +int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX* sha, const unsigned char* input, + unsigned int sz) +{ + if (sha == NULL || input == NULL) + return BAD_FUNC_ARG; + + return ShaUpdate((Sha*)sha, input, sz); +} + + +/* Get SHA Final into digest */ +int CRYPT_SHA_Finalize(CRYPT_SHA_CTX* sha, unsigned char* digest) +{ + if (sha == NULL || digest == NULL) + return BAD_FUNC_ARG; + + return ShaFinal((Sha*)sha, digest); +} + + +/* Initialize SHA-256 */ +int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX* sha256) +{ + typedef char sha_test[sizeof(CRYPT_SHA256_CTX) >= sizeof(Sha256) ? 1 : -1]; + (void)sizeof(sha_test); + + if (sha256 == NULL) + return BAD_FUNC_ARG; + + return InitSha256((Sha256*)sha256); +} + + +/* Add data to SHA-256 */ +int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX* sha256, const unsigned char* input, + unsigned int sz) +{ + if (sha256 == NULL || input == NULL) + return BAD_FUNC_ARG; + + return Sha256Update((Sha256*)sha256, input, sz); +} + + +/* Get SHA-256 Final into digest */ +int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX* sha256, unsigned char* digest) +{ + if (sha256 == NULL || digest == NULL) + return BAD_FUNC_ARG; + + return Sha256Final((Sha256*)sha256, digest); +} + + +/* Initialize SHA-384 */ +int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX* sha384) +{ + typedef char sha_test[sizeof(CRYPT_SHA384_CTX) >= sizeof(Sha384) ? 1 : -1]; + (void)sizeof(sha_test); + + if (sha384 == NULL) + return BAD_FUNC_ARG; + + return InitSha384((Sha384*)sha384); +} + + +/* Add data to SHA-384 */ +int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX* sha384, const unsigned char* input, + unsigned int sz) +{ + if (sha384 == NULL || input == NULL) + return BAD_FUNC_ARG; + + return Sha384Update((Sha384*)sha384, input, sz); +} + + +/* Get SHA-384 Final into digest */ +int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX* sha384, unsigned char* digest) +{ + if (sha384 == NULL || digest == NULL) + return BAD_FUNC_ARG; + + return Sha384Final((Sha384*)sha384, digest); +} + + +/* Initialize SHA-512 */ +int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX* sha512) +{ + typedef char sha_test[sizeof(CRYPT_SHA512_CTX) >= sizeof(Sha512) ? 1 : -1]; + (void)sizeof(sha_test); + + if (sha512 == NULL) + return BAD_FUNC_ARG; + + return InitSha512((Sha512*)sha512); +} + + +/* Add data to SHA-512 */ +int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX* sha512, const unsigned char* input, + unsigned int sz) +{ + if (sha512 == NULL || input == NULL) + return BAD_FUNC_ARG; + + return Sha512Update((Sha512*)sha512, input, sz); +} + + +/* Get SHA-512 Final into digest */ +int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX* sha512, unsigned char* digest) +{ + if (sha512 == NULL || digest == NULL) + return BAD_FUNC_ARG; + + return Sha512Final((Sha512*)sha512, digest); +} + + +/* Set HMAC key with type */ +int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX* hmac, int type, const unsigned char* key, + unsigned int sz) +{ + typedef char hmac_test[sizeof(CRYPT_HMAC_CTX) >= sizeof(Hmac) ? 1 : -1]; + (void)sizeof(hmac_test); + + if (hmac == NULL || key == NULL) + return BAD_FUNC_ARG; + + if (type != CRYPT_HMAC_SHA && type != CRYPT_HMAC_SHA256 && + type != CRYPT_HMAC_SHA384 && type != CRYPT_HMAC_SHA512) { + return BAD_FUNC_ARG; /* bad hmac type */ + } + + return HmacSetKey((Hmac*)hmac, type, key, sz); +} + + +int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX* hmac, const unsigned char* input, + unsigned int sz) +{ + if (hmac == NULL || input == NULL) + return BAD_FUNC_ARG; + + return HmacUpdate((Hmac*)hmac, input, sz); +} + + +/* Get HMAC Final into digest */ +int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX* hmac, unsigned char* digest) +{ + if (hmac == NULL || digest == NULL) + return BAD_FUNC_ARG; + + return HmacFinal((Hmac*)hmac, digest); +} + + +/* Huffman Compression, set flag to do static, otherwise dynamic */ +/* return compressed size, otherwise < 0 for error */ +int CRYPT_HUFFMAN_Compress(unsigned char* out, unsigned int outSz, + const unsigned char* in, unsigned int inSz, + unsigned int flags) +{ + if (out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return Compress(out, outSz, in, inSz, flags); +} + + +/* Huffman DeCompression, self determines type */ +/* return decompressed size, otherwise < 0 for error */ +int CRYPT_HUFFMAN_DeCompress(unsigned char* out, unsigned int outSz, + const unsigned char* in, unsigned int inSz) +{ + if (out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return DeCompress(out, outSz, in, inSz); +} + + +/* RNG Initialize, < 0 on error */ +int CRYPT_RNG_Initialize(CRYPT_RNG_CTX* rng) +{ + typedef char rng_test[sizeof(CRYPT_RNG_CTX) >= sizeof(RNG) ? 1 : -1]; + (void)sizeof(rng_test); + + if (rng == NULL) + return BAD_FUNC_ARG; + + return InitRng((RNG*)rng); +} + + +/* RNG Get single bytes, < 0 on error */ +int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b) +{ + if (rng == NULL || b == NULL) + return BAD_FUNC_ARG; + + return RNG_GenerateByte((RNG*)rng, (byte*)b); +} + + +/* RNG Block Generation of sz bytes, < 0 on error */ +int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b, + unsigned int sz) +{ + if (rng == NULL || b == NULL) + return BAD_FUNC_ARG; + + return RNG_GenerateBlock((RNG*)rng, b, sz); +} + + +/* Triple DES Key Set, may have iv, will have direction */ +int CRYPT_TDES_KeySet(CRYPT_TDES_CTX* tdes, const unsigned char* key, + const unsigned char* iv, int dir) +{ + typedef char tdes_test[sizeof(CRYPT_TDES_CTX) >= sizeof(Des3) ? 1 : -1]; + (void)sizeof(tdes_test); + + if (tdes == NULL || key == NULL) + return BAD_FUNC_ARG; + + return Des3_SetKey((Des3*)tdes, key, iv, dir); +} + + +/* Triple DES Iv Set, sometimes added later */ +int CRYPT_TDES_IvSet(CRYPT_TDES_CTX* tdes, const unsigned char* iv) +{ + if (tdes == NULL || iv == NULL) + return BAD_FUNC_ARG; + + return Des3_SetIV((Des3*)tdes, iv); +} + + +/* Triple DES CBC Encrypt */ +int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX* tdes, unsigned char* out, + const unsigned char* in, unsigned int inSz) +{ + if (tdes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return Des3_CbcEncrypt((Des3*)tdes, out, in, inSz); +} + + +/* Triple DES CBC Decrypt */ +int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX* tdes, unsigned char* out, + const unsigned char* in, unsigned int inSz) +{ + if (tdes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return Des3_CbcDecrypt((Des3*)tdes, out, in, inSz); +} + + +/* AES Key Set, may have iv, will have direction */ +int CRYPT_AES_KeySet(CRYPT_AES_CTX* aes, const unsigned char* key, + unsigned int keyLen, const unsigned char* iv, int dir) +{ + typedef char aes_test[sizeof(CRYPT_AES_CTX) >= sizeof(Aes) ? 1 : -1]; + (void)sizeof(aes_test); + + if (aes == NULL || key == NULL) + return BAD_FUNC_ARG; + + return AesSetKey((Aes*)aes, key, keyLen, iv, dir); +} + + +/* AES Iv Set, sometimes added later */ +int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv) +{ + if (aes == NULL || iv == NULL) + return BAD_FUNC_ARG; + + return AesSetIV((Aes*)aes, iv); +} + + +/* AES CBC Encrypt */ +int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, + const unsigned char* in, unsigned int inSz) +{ + if (aes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return AesCbcEncrypt((Aes*)aes, out, in, inSz); +} + + +/* AES CBC Decrypt */ +int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out, + const unsigned char* in, unsigned int inSz) +{ + if (aes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + return AesCbcDecrypt((Aes*)aes, out, in, inSz); +} + + +/* AES CTR Encrypt (used for decrypt too, with ENCRYPT key setup) */ +int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, + const unsigned char* in, unsigned int inSz) +{ + if (aes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + AesCtrEncrypt((Aes*)aes, out, in, inSz); + + return 0; +} + + +/* AES Direct mode encrypt, one block at a time */ +int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, + const unsigned char* in) +{ + if (aes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + AesEncryptDirect((Aes*)aes, out, in); + + return 0; +} + + +/* AES Direct mode decrypt, one block at a time */ +int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out, + const unsigned char* in) +{ + if (aes == NULL || out == NULL || in == NULL) + return BAD_FUNC_ARG; + + AesDecryptDirect((Aes*)aes, out, in); + + return 0; +} + + +/* RSA Initialize */ +int CRYPT_RSA_Initialize(CRYPT_RSA_CTX* rsa) +{ + if (rsa == NULL) + return BAD_FUNC_ARG; + + rsa->holder = (RsaKey*)XMALLOC(sizeof(RsaKey), NULL, DYNAMIC_TYPE_RSA); + if (rsa->holder == NULL) + return -1; + + return InitRsaKey((RsaKey*)rsa->holder, NULL); +} + + +/* RSA Free resources */ +int CRYPT_RSA_Free(CRYPT_RSA_CTX* rsa) +{ + if (rsa == NULL) + return BAD_FUNC_ARG; + + FreeRsaKey((RsaKey*)rsa->holder); + XFREE(rsa->holder, NULL, DYNAMIC_TYPE_RSA); + rsa->holder = NULL; + + return 0; +} + + +/* RSA Public key decode ASN.1 */ +int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in, + unsigned int inSz) +{ + unsigned int idx = 0; + (void)idx; + + if (rsa == NULL || in == NULL) + return BAD_FUNC_ARG; + + return RsaPublicKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz); +} + + +/* RSA Private key decode ASN.1 */ +int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in, + unsigned int inSz) +{ + unsigned int idx = 0; + (void)idx; + + if (rsa == NULL || in == NULL) + return BAD_FUNC_ARG; + + return RsaPrivateKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz); +} + + +/* RSA Public Encrypt */ +int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX* rsa, unsigned char* out, + unsigned int outSz, const unsigned char* in, + unsigned int inSz, CRYPT_RNG_CTX* rng) +{ + if (rsa == NULL || in == NULL || out == NULL || rng == NULL) + return BAD_FUNC_ARG; + + return RsaPublicEncrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder, + (RNG*)rng); +} + + +/* RSA Private Decrypt */ +int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX* rsa, unsigned char* out, + unsigned int outSz, const unsigned char* in, + unsigned int inSz) +{ + if (rsa == NULL || in == NULL || out == NULL) + return BAD_FUNC_ARG; + + return RsaPrivateDecrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder); +} + + +/* RSA Get Encrypt size helper */ +int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX* rsa) +{ + if (rsa == NULL) + return BAD_FUNC_ARG; + + return RsaEncryptSize((RsaKey*)rsa->holder); +} + + +/* ECC init */ +int CRYPT_ECC_Initialize(CRYPT_ECC_CTX* ecc) +{ + if (ecc == NULL) + return BAD_FUNC_ARG; + + ecc->holder = (ecc_key*)XMALLOC(sizeof(ecc_key), NULL, DYNAMIC_TYPE_ECC); + if (ecc->holder == NULL) + return -1; + + ecc_init((ecc_key*)ecc->holder); + + return 0; +} + + +/* ECC free resources */ +int CRYPT_ECC_Free(CRYPT_ECC_CTX* ecc) +{ + if (ecc == NULL) + return BAD_FUNC_ARG; + + ecc_free((ecc_key*)ecc->holder); + XFREE(ecc->holder, NULL, DYNAMIC_TYPE_ECC); + ecc->holder = NULL; + + return 0; +} + + +/* ECC Public x963 Export */ +int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX* ecc, unsigned char* out, + unsigned int outSz, unsigned int* usedSz) +{ + int ret; + unsigned int inOut = outSz; + + if (ecc == NULL || out == NULL) + return BAD_FUNC_ARG; + + ret = ecc_export_x963((ecc_key*)ecc->holder, out, &inOut); + *usedSz = inOut; + + return ret; +} + + +/* ECC Public x963 Import */ +int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX* ecc, const unsigned char* in, + unsigned int inSz) +{ + if (ecc == NULL || in == NULL) + return BAD_FUNC_ARG; + + return ecc_import_x963(in, inSz, (ecc_key*)ecc->holder); +} + + +/* ECC Private x963 Import */ +int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX* ecc, const unsigned char* priv, + unsigned int privSz, const unsigned char* pub, unsigned int pubSz) +{ + if (ecc == NULL || priv == NULL || pub == NULL) + return BAD_FUNC_ARG; + + return ecc_import_private_key(priv, privSz, pub, pubSz, + (ecc_key*)ecc->holder); +} + + +/* ECC DHE Make key */ +int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, int keySz) +{ + if (ecc == NULL || rng == NULL) + return BAD_FUNC_ARG; + + return ecc_make_key((RNG*)rng, keySz, (ecc_key*)ecc->holder); +} + + +/* ECC DHE Make shared secret with our private and peer public */ +int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX* priv, CRYPT_ECC_CTX* pub, + unsigned char* out, unsigned int outSz, unsigned int* usedSz) +{ + int ret; + unsigned int inOut = outSz; + + if (priv == NULL || pub == NULL || out == NULL || usedSz == NULL) + return BAD_FUNC_ARG; + + ret = ecc_shared_secret((ecc_key*)priv->holder, (ecc_key*)pub->holder, + out, &inOut); + *usedSz = inOut; + + return ret; +} + + +/* ECC DSA Hash Sign */ +int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, + unsigned char* sig, unsigned int sigSz, + unsigned int* usedSz, const unsigned char* in, + unsigned int inSz) +{ + int ret; + unsigned int inOut = sigSz; + + if (ecc == NULL || rng == NULL || sig == NULL || usedSz == NULL || + in == NULL) + return BAD_FUNC_ARG; + + ret = ecc_sign_hash(in, inSz, sig, &inOut, (RNG*)rng, + (ecc_key*)ecc->holder); + *usedSz = inOut; + + return ret; +} + + +/* ECC DSA Hash Verify */ +int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX* ecc, const unsigned char* sig, + unsigned int sigSz, unsigned char* hash, + unsigned int hashSz, int* status) +{ + if (ecc == NULL || sig == NULL || hash == NULL || status == NULL) + return BAD_FUNC_ARG; + + return ecc_verify_hash(sig, sigSz, hash, hashSz, status, + (ecc_key*)ecc->holder); +} + + +/* ECC get key size helper */ +int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX* ecc) +{ + if (ecc == NULL) + return BAD_FUNC_ARG; + + return ecc_size((ecc_key*)ecc->holder); +} + + +/* ECC get signature size helper */ +int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX* ecc) +{ + if (ecc == NULL) + return BAD_FUNC_ARG; + + return ecc_sig_size((ecc_key*)ecc->holder); +} + + +/* Save error string from err to str which needs to be >= 80 chars */ +int CRYPT_ERROR_StringGet(int err, char* str) +{ + if (str == NULL) + return BAD_FUNC_ARG; + + CTaoCryptErrorString(err, str); + + return 0; +} + diff --git a/project1/cyassl-3.0.0/mcapi/crypto.h b/project1/cyassl-3.0.0/mcapi/crypto.h new file mode 100644 index 00000000..0838b537 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/crypto.h @@ -0,0 +1,268 @@ +/* crypto.h + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* Defines Microchip CRYPTO API layer */ + + +#ifndef MC_CRYPTO_API_H +#define MC_CRYPTO_API_H + + +#ifdef __cplusplus + extern "C" { +#endif + +/* MD5 */ +typedef struct CRYPT_MD5_CTX { + int holder[24]; /* big enough to hold internal, but check on init */ +} CRYPT_MD5_CTX; + +int CRYPT_MD5_Initialize(CRYPT_MD5_CTX*); +int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX*, const unsigned char*, unsigned int); +int CRYPT_MD5_Finalize(CRYPT_MD5_CTX*, unsigned char*); + +enum { + CRYPT_MD5_DIGEST_SIZE = 16 +}; + + +/* SHA */ +typedef struct CRYPT_SHA_CTX { + int holder[24]; /* big enough to hold internal, but check on init */ +} CRYPT_SHA_CTX; + +int CRYPT_SHA_Initialize(CRYPT_SHA_CTX*); +int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX*, const unsigned char*, unsigned int); +int CRYPT_SHA_Finalize(CRYPT_SHA_CTX*, unsigned char*); + +enum { + CRYPT_SHA_DIGEST_SIZE = 20 +}; + + +/* SHA-256 */ +typedef struct CRYPT_SHA256_CTX { + int holder[28]; /* big enough to hold internal, but check on init */ +} CRYPT_SHA256_CTX; + +int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX*); +int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX*, const unsigned char*, unsigned int); +int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX*, unsigned char*); + +enum { + CRYPT_SHA256_DIGEST_SIZE = 32 +}; + + +/* SHA-384 */ +typedef struct CRYPT_SHA384_CTX { + long long holder[32]; /* big enough to hold internal, but check on init */ +} CRYPT_SHA384_CTX; + +int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX*); +int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX*, const unsigned char*, unsigned int); +int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX*, unsigned char*); + +enum { + CRYPT_SHA384_DIGEST_SIZE = 48 +}; + + +/* SHA-512 */ +typedef struct CRYPT_SHA512_CTX { + long long holder[36]; /* big enough to hold internal, but check on init */ +} CRYPT_SHA512_CTX; + +int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX*); +int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX*, const unsigned char*, unsigned int); +int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX*, unsigned char*); + +enum { + CRYPT_SHA512_DIGEST_SIZE = 64 +}; + + +/* HMAC */ +typedef struct CRYPT_HMAC_CTX { + long long holder[67]; /* big enough to hold internal, but check on init */ +} CRYPT_HMAC_CTX; + +int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX*, int, const unsigned char*, unsigned int); +int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX*, const unsigned char*, unsigned int); +int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX*, unsigned char*); + +/* HMAC types */ +enum { + CRYPT_HMAC_SHA = 1, + CRYPT_HMAC_SHA256 = 2, + CRYPT_HMAC_SHA384 = 5, + CRYPT_HMAC_SHA512 = 4 +}; + + +/* Huffman */ +int CRYPT_HUFFMAN_Compress(unsigned char*, unsigned int, const unsigned char*, + unsigned int, unsigned int); +int CRYPT_HUFFMAN_DeCompress(unsigned char*, unsigned int, const unsigned char*, + unsigned int); + +/* flag to use static huffman */ +enum { + CRYPT_HUFFMAN_COMPRESS_STATIC = 1 +}; + + +/* RNG */ +typedef struct CRYPT_RNG_CTX { + int holder[66]; /* big enough to hold internal, but check on init */ +} CRYPT_RNG_CTX; + +int CRYPT_RNG_Initialize(CRYPT_RNG_CTX*); +int CRYPT_RNG_Get(CRYPT_RNG_CTX*, unsigned char*); +int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX*, unsigned char*, unsigned int); + + +/* TDES */ +typedef struct CRYPT_TDES_CTX { + int holder[100]; /* big enough to hold internal, but check on init */ +} CRYPT_TDES_CTX; + +int CRYPT_TDES_KeySet(CRYPT_TDES_CTX*, const unsigned char*, + const unsigned char*, int); +int CRYPT_TDES_IvSet(CRYPT_TDES_CTX*, const unsigned char*); +int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX*, unsigned char*, + const unsigned char*, unsigned int); +int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX*, unsigned char*, + const unsigned char*, unsigned int); + +/* key direction flags for setup */ +enum { + CRYPT_TDES_ENCRYPTION = 0, + CRYPT_TDES_DECRYPTION = 1 +}; + + +/* AES */ +typedef struct CRYPT_AES_CTX { + int holder[70]; /* big enough to hold internal, but check on init */ +} CRYPT_AES_CTX; + +/* key */ +int CRYPT_AES_KeySet(CRYPT_AES_CTX*, const unsigned char*, unsigned int, + const unsigned char*, int); +int CRYPT_AES_IvSet(CRYPT_AES_CTX*, const unsigned char*); + +/* cbc */ +int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX*, unsigned char*, + const unsigned char*, unsigned int); +int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX*, unsigned char*, + const unsigned char*, unsigned int); + +/* ctr (counter), use Encrypt both ways with ENCRYPT key setup */ +int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX*, unsigned char*, + const unsigned char*, unsigned int); + +/* direct, one block at a time */ +int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX*, unsigned char*, + const unsigned char*); +int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX*, unsigned char*, + const unsigned char*); + +/* key direction flags for setup, ctr always uses ENCRYPT flag */ +enum { + CRYPT_AES_ENCRYPTION = 0, + CRYPT_AES_DECRYPTION = 1, + CRYPT_AES_BLOCK_SIZE = 16 +}; + + + +/* RSA */ +typedef struct CRYPT_RSA_CTX { + void* holder; +} CRYPT_RSA_CTX; + +/* init/free */ +int CRYPT_RSA_Initialize(CRYPT_RSA_CTX*); +int CRYPT_RSA_Free(CRYPT_RSA_CTX*); + +/* key decode */ +int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX*, const unsigned char*, + unsigned int); +int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX*, const unsigned char*, + unsigned int); + +/* encrypt/decrypt */ +int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX*, unsigned char*, + unsigned int, const unsigned char*, unsigned int, + CRYPT_RNG_CTX*); +int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX*, unsigned char*, + unsigned int, const unsigned char*, unsigned int); + +/* helpers */ +int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX*); + + + +/* ECC */ +typedef struct CRYPT_ECC_CTX { + void* holder; +} CRYPT_ECC_CTX; + +/* init/free */ +int CRYPT_ECC_Initialize(CRYPT_ECC_CTX*); +int CRYPT_ECC_Free(CRYPT_ECC_CTX*); + +/* key coders */ +int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX*, unsigned char*, unsigned int, + unsigned int*); +int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int); +int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int, + const unsigned char*, unsigned int); + +/* dhe */ +int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, int); +int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX*, CRYPT_ECC_CTX*, + unsigned char*, unsigned int, unsigned int*); + +/* dsa */ +int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, unsigned char*, + unsigned int, unsigned int*, const unsigned char*, unsigned int); +int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX*, const unsigned char*, + unsigned int, unsigned char*, unsigned int, int*); + +/* helpers */ +int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX*); +int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX*); + + +/* Error string helper, string needs to be >= 80 chars */ +int CRYPT_ERROR_StringGet(int, char*); + + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* MC_CRYPTO_API_H */ + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml new file mode 100644 index 00000000..e9792ab6 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml @@ -0,0 +1,175 @@ + + + + + + + + + ../mcapi_test.c + + + Makefile + + + + .. + + Makefile + + + + localhost + PIC32MX795F512L + + + SKDEPIC32PlatformTool + XC32 + 1.30 + 3 + + + + + + + + + + + + + + + + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am new file mode 100644 index 00000000..4e2ba8af --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mcapi/ctaocrypt_mcapi.X/Makefile + +EXTRA_DIST += \ + mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_mcapi.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml new file mode 100644 index 00000000..ee5e120b --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml @@ -0,0 +1,18 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + ctaocrypt_mcapi + 2ca6ab9b-e225-4ad3-b48e-9ea7b47a4ca4 + 0 + c + + + ISO-8859-1 + + ../zlib.X + ../cyassl.X + + + + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml new file mode 100644 index 00000000..d5b8d3e8 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml @@ -0,0 +1,192 @@ + + + + + ../../ctaocrypt/test/test.h + + + + + ../../ctaocrypt/test/test.c + ../../mplabx/test_main.c + + + Makefile + + + + ../../mplabx + + Makefile + + + + localhost + PIC32MX795F512L + + + SKDEPIC32PlatformTool + XC32 + 1.30 + 3 + + + + + + + + + + + + + + + + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am new file mode 100644 index 00000000..dc3d2f9a --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mcapi/ctaocrypt_test.X/Makefile + +EXTRA_DIST += \ + mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ + mcapi/ctaocrypt_test.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml new file mode 100644 index 00000000..d60fdcdb --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml @@ -0,0 +1,18 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + ctaocrypt_test + b34c4937-7042-4352-88b1-7717bcdf8aeb + 0 + c + + h + ISO-8859-1 + + ../zlib.X + ../cyassl.X + + + + diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile b/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml new file mode 100644 index 00000000..7837eed0 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml @@ -0,0 +1,192 @@ + + + + + + + + + ../../src/crl.c + ../../src/internal.c + ../../src/io.c + ../../src/keys.c + ../../src/ocsp.c + ../../src/sniffer.c + ../../src/ssl.c + ../../src/tls.c + ../../ctaocrypt/src/aes.c + ../../ctaocrypt/src/arc4.c + ../../ctaocrypt/src/asm.c + ../../ctaocrypt/src/asn.c + ../../ctaocrypt/src/coding.c + ../../ctaocrypt/src/des3.c + ../../ctaocrypt/src/dh.c + ../../ctaocrypt/src/dsa.c + ../../ctaocrypt/src/ecc.c + ../../ctaocrypt/src/ecc_fp.c + ../../ctaocrypt/src/error.c + ../../ctaocrypt/src/hc128.c + ../../ctaocrypt/src/hmac.c + ../../ctaocrypt/src/integer.c + ../../ctaocrypt/src/logging.c + ../../ctaocrypt/src/md2.c + ../../ctaocrypt/src/md4.c + ../../ctaocrypt/src/md5.c + ../../ctaocrypt/src/memory.c + ../../ctaocrypt/src/misc.c + ../../ctaocrypt/src/pwdbased.c + ../../ctaocrypt/src/rabbit.c + ../../ctaocrypt/src/random.c + ../../ctaocrypt/src/ripemd.c + ../../ctaocrypt/src/rsa.c + ../../ctaocrypt/src/sha.c + ../../ctaocrypt/src/sha256.c + ../../ctaocrypt/src/sha512.c + ../../ctaocrypt/src/tfm.c + ../../mcapi/crypto.c + ../../ctaocrypt/src/compress.c + ../../ctaocrypt/src/camellia.c + ../../ctaocrypt/src/port.c + + + Makefile + + + + .. + ../../ctaocrypt/src + + Makefile + + + + localhost + PIC32MX795F512L + + + SKDEPIC32PlatformTool + XC32 + 1.30 + 3 + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am new file mode 100644 index 00000000..fc7e8d97 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mcapi/cyassl.X/Makefile + +EXTRA_DIST += \ + mcapi/cyassl.X/nbproject/configurations.xml \ + mcapi/cyassl.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml new file mode 100644 index 00000000..c7604d71 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml @@ -0,0 +1,15 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + cyassl + 93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b + 0 + c + + + ISO-8859-1 + + + + diff --git a/project1/cyassl-3.0.0/mcapi/include.am b/project1/cyassl-3.0.0/mcapi/include.am new file mode 100644 index 00000000..993ba29c --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/include.am @@ -0,0 +1,19 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +if BUILD_MCAPI +check_PROGRAMS += mcapi/test +noinst_PROGRAMS += mcapi/test +mcapi_test_SOURCES = mcapi/crypto.c \ + mcapi/mcapi_test.c +mcapi_test_LDADD = src/libcyassl.la +mcapi_test_DEPENDENCIES = src/libcyassl.la +endif + +noinst_HEADERS += mcapi/crypto.h + +EXTRA_DIST += \ + mcapi/README \ + mcapi/PIC32MZ-serial.h + diff --git a/project1/cyassl-3.0.0/mcapi/mcapi_test.c b/project1/cyassl-3.0.0/mcapi/mcapi_test.c new file mode 100644 index 00000000..5610a650 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/mcapi_test.c @@ -0,0 +1,1482 @@ +/* test.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +/* Tests Microchip CRYPTO API layer */ + + + +/* mc api header */ +#include "crypto.h" + +#include + +/* sanity test against our default implementation, cyassl headers */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define USE_CERT_BUFFERS_1024 +#include + +#if defined(CYASSL_MICROCHIP_PIC32MZ) + #define MICROCHIP_PIC32 + #include + #pragma config ICESEL = ICS_PGx2 + /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ + #include + #include + #include "PIC32MZ-serial.h" + #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ +#elif defined(MICROCHIP_PIC32) + #define PIC32_STARTER_KIT + #include + #include + #include + #include + #include + #define init_serial() /* void out init_serial() */ +#else + #include /* order matters above ? */ +#endif +#define OUR_DATA_SIZE 1024 +static byte ourData[OUR_DATA_SIZE]; +static byte* key = NULL; +static byte* iv = NULL; +static CRYPT_RNG_CTX mcRng; +static RNG defRng; + +static int check_md5(void); +static int check_sha(void); +static int check_sha256(void); +static int check_sha384(void); +static int check_sha512(void); +static int check_hmac(void); +static int check_compress(void); +static int check_rng(void); +static int check_des3(void); +static int check_aescbc(void); +static int check_aesctr(void); +static int check_aesdirect(void); +static int check_rsa(void); +static int check_ecc(void); + + +int main(int argc, char** argv) +{ + int ret; + int i; + + (void)argc; + (void)argv; + +#if defined(MICROCHIP_PIC32) + init_serial() ; /* initialize PIC32MZ serial I/O */ + SYSTEMConfigPerformance(80000000); + DBINIT(); +#endif + + /* align key, iv pointers */ + key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_KEY); + if (key == NULL) { + printf("mcapi key alloc failed\n"); + return -1; + } + + iv = (byte*)XMALLOC(16, NULL, DYNAMIC_TYPE_KEY); + if (iv == NULL) { + printf("mcapi iv alloc failed\n"); + return -1; + } + + for (i = 0; i < OUR_DATA_SIZE; i++) + ourData[i] = (byte)i; + + ret = check_md5(); + if (ret != 0) { + printf("mcapi check_md5 failed\n"); + return -1; + } + + ret = check_sha(); + if (ret != 0) { + printf("mcapi check_sha failed\n"); + return -1; + } + + ret = check_sha256(); + if (ret != 0) { + printf("mcapi check_sha256 failed\n"); + return -1; + } + + ret = check_sha384(); + if (ret != 0) { + printf("mcapi check_sha384 failed\n"); + return -1; + } + + ret = check_sha512(); + if (ret != 0) { + printf("mcapi check_sha512 failed\n"); + return -1; + } + + ret = check_hmac(); + if (ret != 0) { + printf("mcapi check_hmac failed\n"); + return -1; + } + + ret = check_compress(); + if (ret != 0) { + printf("mcapi check_compress failed\n"); + return -1; + } + + ret = check_rng(); + if (ret != 0) { + printf("mcapi check_rng failed\n"); + return -1; + } + + ret = check_des3(); + if (ret != 0) { + printf("mcapi check_des3 failed\n"); + return -1; + } + + ret = check_aescbc(); + if (ret != 0) { + printf("mcapi check_aes cbc failed\n"); + return -1; + } + + ret = check_aesctr(); + if (ret != 0) { + printf("mcapi check_aes ctr failed\n"); + return -1; + } + + ret = check_aesdirect(); + if (ret != 0) { + printf("mcapi check_aes direct failed\n"); + return -1; + } + + ret = check_rsa(); + if (ret != 0) { + printf("mcapi check_rsa failed\n"); + return -1; + } + + ret = check_ecc(); + if (ret != 0) { + printf("mcapi check_ecc failed\n"); + return -1; + } + + XFREE(iv, NULL, DYNAMIC_TYPE_KEY); + XFREE(key, NULL, DYNAMIC_TYPE_KEY); + + return 0; +} + + +/* check mcapi md5 against internal */ +static int check_md5(void) +{ + CRYPT_MD5_CTX mcMd5; + Md5 defMd5; + byte mcDigest[CRYPT_MD5_DIGEST_SIZE]; + byte defDigest[MD5_DIGEST_SIZE]; + + CRYPT_MD5_Initialize(&mcMd5); + InitMd5(&defMd5); + + CRYPT_MD5_DataAdd(&mcMd5, ourData, OUR_DATA_SIZE); + Md5Update(&defMd5, ourData, OUR_DATA_SIZE); + + CRYPT_MD5_Finalize(&mcMd5, mcDigest); + Md5Final(&defMd5, defDigest); + + if (memcmp(mcDigest, defDigest, CRYPT_MD5_DIGEST_SIZE) != 0) { + printf("md5 final memcmp fialed\n"); + return -1; + } + printf("md5 mcapi test passed\n"); + + return 0; +} + + +/* check mcapi sha against internal */ +static int check_sha(void) +{ + CRYPT_SHA_CTX mcSha; + Sha defSha; + int ret = 0; + byte mcDigest[CRYPT_SHA_DIGEST_SIZE]; + byte defDigest[SHA_DIGEST_SIZE]; + + CRYPT_SHA_Initialize(&mcSha); + ret = InitSha(&defSha); + if (ret != 0) { + printf("sha init default failed\n"); + return -1; + } + + CRYPT_SHA_DataAdd(&mcSha, ourData, OUR_DATA_SIZE); + ShaUpdate(&defSha, ourData, OUR_DATA_SIZE); + + CRYPT_SHA_Finalize(&mcSha, mcDigest); + ShaFinal(&defSha, defDigest); + + if (memcmp(mcDigest, defDigest, CRYPT_SHA_DIGEST_SIZE) != 0) { + printf("sha final memcmp failed\n"); + return -1; + } + printf("sha mcapi test passed\n"); + + return 0; +} + + +/* check mcapi sha256 against internal */ +static int check_sha256(void) +{ + CRYPT_SHA256_CTX mcSha256; + Sha256 defSha256; + int ret; + byte mcDigest[CRYPT_SHA256_DIGEST_SIZE]; + byte defDigest[SHA256_DIGEST_SIZE]; + + CRYPT_SHA256_Initialize(&mcSha256); + ret = InitSha256(&defSha256); + if (ret != 0) { + printf("sha256 init default failed\n"); + return -1; + } + + CRYPT_SHA256_DataAdd(&mcSha256, ourData, OUR_DATA_SIZE); + ret = Sha256Update(&defSha256, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("sha256 update default failed\n"); + return -1; + } + + CRYPT_SHA256_Finalize(&mcSha256, mcDigest); + ret = Sha256Final(&defSha256, defDigest); + if (ret != 0) { + printf("sha256 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA256_DIGEST_SIZE) != 0) { + printf("sha256 final memcmp fialed\n"); + return -1; + } + printf("sha256 mcapi test passed\n"); + + return 0; +} + + +/* check mcapi sha384 against internal */ +static int check_sha384(void) +{ + CRYPT_SHA384_CTX mcSha384; + Sha384 defSha384; + int ret; + byte mcDigest[CRYPT_SHA384_DIGEST_SIZE]; + byte defDigest[SHA384_DIGEST_SIZE]; + + CRYPT_SHA384_Initialize(&mcSha384); + ret = InitSha384(&defSha384); + if (ret != 0) { + printf("sha384 init default failed\n"); + return -1; + } + + CRYPT_SHA384_DataAdd(&mcSha384, ourData, OUR_DATA_SIZE); + ret = Sha384Update(&defSha384, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("sha384 update default failed\n"); + return -1; + } + + CRYPT_SHA384_Finalize(&mcSha384, mcDigest); + ret = Sha384Final(&defSha384, defDigest); + if (ret != 0) { + printf("sha384 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA384_DIGEST_SIZE) != 0) { + printf("sha384 final memcmp fialed\n"); + return -1; + } + printf("sha384 mcapi test passed\n"); + + return 0; +} + + +/* check mcapi sha512 against internal */ +static int check_sha512(void) +{ + CRYPT_SHA512_CTX mcSha512; + Sha512 defSha512; + int ret; + byte mcDigest[CRYPT_SHA512_DIGEST_SIZE]; + byte defDigest[SHA512_DIGEST_SIZE]; + + CRYPT_SHA512_Initialize(&mcSha512); + ret = InitSha512(&defSha512); + if (ret != 0) { + printf("sha512 init default failed\n"); + return -1; + } + + CRYPT_SHA512_DataAdd(&mcSha512, ourData, OUR_DATA_SIZE); + ret = Sha512Update(&defSha512, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("sha512 update default failed\n"); + return -1; + } + + CRYPT_SHA512_Finalize(&mcSha512, mcDigest); + ret = Sha512Final(&defSha512, defDigest); + if (ret != 0) { + printf("sha512 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA512_DIGEST_SIZE) != 0) { + printf("sha512 final memcmp fialed\n"); + return -1; + } + printf("sha512 mcapi test passed\n"); + + return 0; +} + + +/* check mcapi hmac against internal */ +static int check_hmac(void) +{ + CRYPT_HMAC_CTX mcHmac; + Hmac defHmac; + int ret; + byte mcDigest[CRYPT_SHA512_DIGEST_SIZE]; + byte defDigest[SHA512_DIGEST_SIZE]; + + strncpy((char*)key, "Jefe", 4); + + /* SHA1 */ + CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA, key, 4); + ret = HmacSetKey(&defHmac, SHA, key, 4); + if (ret != 0) { + printf("hmac sha setkey default failed\n"); + return -1; + } + + CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); + ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("hmac sha update default failed\n"); + return -1; + } + + CRYPT_HMAC_Finalize(&mcHmac, mcDigest); + ret = HmacFinal(&defHmac, defDigest); + if (ret != 0) { + printf("hmac sha final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA_DIGEST_SIZE) != 0) { + printf("hmac sha final memcmp fialed\n"); + return -1; + } + printf("hmac sha mcapi test passed\n"); + + /* SHA-256 */ + CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA256, key, 4); + ret = HmacSetKey(&defHmac, SHA256, key, 4); + if (ret != 0) { + printf("hmac sha256 setkey default failed\n"); + return -1; + } + + CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); + ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("hmac sha256 update default failed\n"); + return -1; + } + + CRYPT_HMAC_Finalize(&mcHmac, mcDigest); + ret = HmacFinal(&defHmac, defDigest); + if (ret != 0) { + printf("hmac sha256 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA256_DIGEST_SIZE) != 0) { + printf("hmac sha256 final memcmp fialed\n"); + return -1; + } + printf("hmac sha256 mcapi test passed\n"); + + /* SHA-384 */ + CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA384, key, 4); + ret = HmacSetKey(&defHmac, SHA384, key, 4); + if (ret != 0) { + printf("hmac sha384 setkey default failed\n"); + return -1; + } + + CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); + ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("hmac sha384 update default failed\n"); + return -1; + } + + CRYPT_HMAC_Finalize(&mcHmac, mcDigest); + ret = HmacFinal(&defHmac, defDigest); + if (ret != 0) { + printf("hmac sha384 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA384_DIGEST_SIZE) != 0) { + printf("hmac sha384 final memcmp fialed\n"); + return -1; + } + printf("hmac sha384 mcapi test passed\n"); + + /* SHA-512 */ + CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA512, key, 4); + ret = HmacSetKey(&defHmac, SHA512, key, 4); + if (ret != 0) { + printf("hmac sha512 setkey default failed\n"); + return -1; + } + + CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); + ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); + if (ret != 0) { + printf("hmac sha512 update default failed\n"); + return -1; + } + + CRYPT_HMAC_Finalize(&mcHmac, mcDigest); + ret = HmacFinal(&defHmac, defDigest); + if (ret != 0) { + printf("hmac sha512 final default failed\n"); + return -1; + } + + if (memcmp(mcDigest, defDigest, CRYPT_SHA512_DIGEST_SIZE) != 0) { + printf("hmac sha512 final memcmp fialed\n"); + return -1; + } + printf("hmac sha512 mcapi test passed\n"); + + return 0; +} + + +/* check mcapi compress against internal */ +static int check_compress(void) +{ + const unsigned char text[] = + "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" + "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" + "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" + "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" + "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" + "small batch meggings kogi dolore food truck bespoke gastropub.\n" + "\n" + "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" + "four loko you probably haven't heard of them high life. Messenger bag\n" + "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" + "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" + "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" + "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" + "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" + "four loko whatever street art yr farm-to-table.\n"; + + unsigned int inSz = sizeof(text); + unsigned int outSz; + unsigned char cBuffer[1024]; + unsigned char dBuffer[1024]; + + int ret1, ret2; + + /* dynamic */ + ret1 = CRYPT_HUFFMAN_Compress(cBuffer, sizeof(cBuffer), text, inSz, 0); + ret2 = Compress(dBuffer, sizeof(dBuffer), text, inSz, 0); + + if (ret1 != ret2 || ret1 < 0) { + printf("compress dynamic ret failed\n"); + return -1; + } + + if (memcmp(cBuffer, dBuffer, ret1) != 0) { + printf("compress dynamic cmp failed\n"); + return -1; + } + + outSz = ret1; + + ret1 = CRYPT_HUFFMAN_DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); + + if (memcmp(dBuffer, text, inSz) != 0) { + printf("mcapi decompress dynamic cmp failed\n"); + return -1; + } + + memset(dBuffer, 0, sizeof(dBuffer)); + + ret1 = DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); + + if (memcmp(dBuffer, text, inSz) != 0) { + printf("decompress dynamic cmp failed\n"); + return -1; + } + + memset(cBuffer, 0, sizeof(cBuffer)); + memset(dBuffer, 0, sizeof(dBuffer)); + + /* static */ + ret1 = CRYPT_HUFFMAN_Compress(cBuffer, sizeof(cBuffer), text, inSz, 1); + ret2 = Compress(dBuffer, sizeof(dBuffer), text, inSz, 1); + + if (ret1 != ret2 || ret1 < 0) { + printf("compress static ret failed\n"); + return -1; + } + + if (memcmp(cBuffer, dBuffer, ret1) != 0) { + printf("compress static cmp failed\n"); + return -1; + } + + outSz = ret1; + + ret1 = CRYPT_HUFFMAN_DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); + + if (memcmp(dBuffer, text, inSz) != 0) { + printf("mcapi decompress static cmp failed\n"); + return -1; + } + + memset(dBuffer, 0, sizeof(dBuffer)); + + ret1 = DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); + + if (memcmp(dBuffer, text, inSz) != 0) { + printf("decompress static cmp failed\n"); + return -1; + } + + printf("huffman mcapi test passed\n"); + + return 0; +} + + +#define RANDOM_BYTE_SZ 32 + +/* check mcapi rng */ +static int check_rng(void) +{ + int ret; + int i; + byte in[RANDOM_BYTE_SZ]; + byte out[RANDOM_BYTE_SZ]; + + for (i = 0; i < RANDOM_BYTE_SZ; i++) + in[i] = (byte)i; + + for (i = 0; i < RANDOM_BYTE_SZ; i++) + out[i] = (byte)i; + + ret = InitRng(&defRng); + if (ret != 0) { + printf("default rng init failed\n"); + return -1; + } + + ret = CRYPT_RNG_Initialize(&mcRng); + if (ret != 0) { + printf("mcapi rng init failed\n"); + return -1; + } + + ret = CRYPT_RNG_Get(&mcRng, &out[0]); + if (ret != 0) { + printf("mcapi rng get failed\n"); + return -1; + } + + ret = CRYPT_RNG_BlockGenerate(&mcRng, out, RANDOM_BYTE_SZ); + if (ret != 0) { + printf("mcapi rng block gen failed\n"); + return -1; + } + + if (memcmp(in, out, RANDOM_BYTE_SZ) == 0) { + printf("mcapi rng block gen output failed\n"); + return -1; + } + + printf("rng mcapi test passed\n"); + + return 0; +} + + +#define TDES_TEST_SIZE 32 + +/* check mcapi des3 */ +static int check_des3(void) +{ + CRYPT_TDES_CTX mcDes3; + Des3 defDes3; + int ret; + byte out1[TDES_TEST_SIZE]; + byte out2[TDES_TEST_SIZE]; + + strncpy((char*)key, "1234567890abcdefghijklmn", 24); + strncpy((char*)iv, "12345678", 8); + + /* cbc encrypt */ + ret = CRYPT_TDES_KeySet(&mcDes3, key, iv, CRYPT_TDES_ENCRYPTION); + if (ret != 0) { + printf("mcapi tdes key set failed\n"); + return -1; + } + ret = Des3_SetKey(&defDes3, key, iv, DES_ENCRYPTION); + if (ret != 0) { + printf("default des3 key set failed\n"); + return -1; + } + + ret = CRYPT_TDES_CBC_Encrypt(&mcDes3, out1, ourData, TDES_TEST_SIZE); + if (ret != 0) { + printf("mcapi tdes cbc encrypt failed\n"); + return -1; + } + ret = Des3_CbcEncrypt(&defDes3, out2, ourData, TDES_TEST_SIZE); + if (ret != 0) { + printf("mcapi default tdes cbc encrypt failed\n"); + return -1; + } + + if (memcmp(out1, out2, TDES_TEST_SIZE) != 0) { + printf("mcapi tdes cbc encrypt cmp failed\n"); + return -1; + } + + /* cbc decrypt */ + ret = CRYPT_TDES_KeySet(&mcDes3, key, iv, CRYPT_TDES_DECRYPTION); + if (ret != 0) { + printf("mcapi tdes key set failed\n"); + return -1; + } + ret = Des3_SetKey(&defDes3, key, iv, DES_DECRYPTION); + if (ret != 0) { + printf("default des3 key set failed\n"); + return -1; + } + + ret = CRYPT_TDES_CBC_Decrypt(&mcDes3, out2, out1, TDES_TEST_SIZE); + if (ret != 0) { + printf("mcapi tdes cbc decrypt failed\n"); + return -1; + } + ret = Des3_CbcDecrypt(&defDes3, out1, out1, TDES_TEST_SIZE); + if (ret != 0) { + printf("mcapi default tdes cbc decrypt failed\n"); + return -1; + } + + if (memcmp(out1, out2, TDES_TEST_SIZE) != 0) { + printf("mcapi tdes cbc decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, TDES_TEST_SIZE) != 0) { + printf("mcapi tdes cbc decrypt orig cmp failed\n"); + return -1; + } + + printf("tdes mcapi test passed\n"); + + return 0; +} + + +#define AES_TEST_SIZE 32 + +/* check mcapi aes cbc */ +static int check_aescbc(void) +{ + CRYPT_AES_CTX mcAes; + Aes defAes; + int ret; + byte out1[AES_TEST_SIZE]; + byte out2[AES_TEST_SIZE]; + + strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); + strncpy((char*)iv, "1234567890abcdef", 16); + + /* 128 cbc encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-128 cbc encrypt failed\n"); + return -1; + } + AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-128 cbc encrypt cmp failed\n"); + return -1; + } + + /* 128 cbc decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, DES_DECRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-128 cbc decrypt failed\n"); + return -1; + } + AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-128 cbc decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-128 cbc decrypt orig cmp failed\n"); + return -1; + } + + /* 192 cbc encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-192 cbc encrypt failed\n"); + return -1; + } + AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-192 cbc encrypt cmp failed\n"); + return -1; + } + + /* 192 cbc decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-192 cbc decrypt failed\n"); + return -1; + } + AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-192 cbc decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-192 cbc decrypt orig cmp failed\n"); + return -1; + } + + /* 256 cbc encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-256 cbc encrypt failed\n"); + return -1; + } + AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-256 cbc encrypt cmp failed\n"); + return -1; + } + + /* 256 cbc decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_DECRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-256 cbc decrypt failed\n"); + return -1; + } + AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-256 cbc decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-256 cbc decrypt orig cmp failed\n"); + return -1; + } + + printf("aes-cbc mcapi test passed\n"); + + return 0; +} + + +/* check mcapi aes ctr */ +static int check_aesctr(void) +{ + CRYPT_AES_CTX mcAes; + Aes defAes; + int ret; + byte out1[AES_TEST_SIZE]; + byte out2[AES_TEST_SIZE]; + + strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); + strncpy((char*)iv, "1234567890abcdef", 16); + + /* 128 ctr encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-128 ctr encrypt failed\n"); + return -1; + } + AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-128 ctr encrypt cmp failed\n"); + return -1; + } + + /* 128 ctr decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-128 ctr decrypt failed\n"); + return -1; + } + + if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-128 ctr decrypt orig cmp failed\n"); + return -1; + } + + /* 192 ctr encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-192 ctr encrypt failed\n"); + return -1; + } + AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-192 ctr encrypt cmp failed\n"); + return -1; + } + + /* 192 ctr decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-192 ctr decrypt failed\n"); + return -1; + } + + if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-192 ctr decrypt orig cmp failed\n"); + return -1; + } + + /* 256 ctr encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-256 ctr encrypt failed\n"); + return -1; + } + AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); + + if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { + printf("mcapi aes-256 ctr encrypt cmp failed\n"); + return -1; + } + + /* 256 ctr decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); + if (ret != 0) { + printf("mcapi aes-256 ctr decrypt failed\n"); + return -1; + } + + if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { + printf("mcapi aes-256 ctr decrypt orig cmp failed\n"); + return -1; + } + + printf("aes-ctr mcapi test passed\n"); + + return 0; +} + + +/* check mcapi aes direct */ +static int check_aesdirect(void) +{ + CRYPT_AES_CTX mcAes; + Aes defAes; + int ret; + byte out1[CRYPT_AES_BLOCK_SIZE]; + byte out2[16]; /* one block at a time */ + + strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); + strncpy((char*)iv, "1234567890abcdef", 16); + + /* 128 direct encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); + if (ret != 0) { + printf("mcapi aes-128 direct encrypt failed\n"); + return -1; + } + AesEncryptDirect(&defAes, out2, ourData); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-128 direct encrypt cmp failed\n"); + return -1; + } + + /* 128 direct decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-128 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 16, iv, DES_DECRYPTION); + if (ret != 0) { + printf("default aes-128 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); + if (ret != 0) { + printf("mcapi aes-128 direct decrypt failed\n"); + return -1; + } + AesDecryptDirect(&defAes, out1, out1); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-128 direct decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-128 direct decrypt orig cmp failed\n"); + return -1; + } + + /* 192 direct encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); + if (ret != 0) { + printf("mcapi aes-192 direct encrypt failed\n"); + return -1; + } + AesEncryptDirect(&defAes, out2, ourData); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-192 direct encrypt cmp failed\n"); + return -1; + } + + /* 192 direct decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-192 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); + if (ret != 0) { + printf("default aes-192 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); + if (ret != 0) { + printf("mcapi aes-192 direct decrypt failed\n"); + return -1; + } + AesDecryptDirect(&defAes, out1, out1); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-192 direct decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-192 direct decrypt orig cmp failed\n"); + return -1; + } + + /* 256 direct encrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); + if (ret != 0) { + printf("mcapi aes-256 direct encrypt failed\n"); + return -1; + } + AesEncryptDirect(&defAes, out2, ourData); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-256 direct encrypt cmp failed\n"); + return -1; + } + + /* 256 direct decrypt */ + ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_DECRYPTION); + if (ret != 0) { + printf("mcapi aes-256 key set failed\n"); + return -1; + } + ret = AesSetKey(&defAes, key, 32, iv, AES_DECRYPTION); + if (ret != 0) { + printf("default aes-256 key set failed\n"); + return -1; + } + + ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); + if (ret != 0) { + printf("mcapi aes-256 direct decrypt failed\n"); + return -1; + } + AesDecryptDirect(&defAes, out1, out1); + + if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-256 direct decrypt cmp failed\n"); + return -1; + } + + if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { + printf("mcapi aes-256 direct decrypt orig cmp failed\n"); + return -1; + } + + printf("aes-direct mcapi test passed\n"); + + return 0; +} + + +#define RSA_TEST_SIZE 64 + +/* check mcapi rsa */ +static int check_rsa(void) +{ + CRYPT_RSA_CTX mcRsa; + RsaKey defRsa; + int ret; + int ret2; + unsigned int keySz = (unsigned int)sizeof(client_key_der_1024); + unsigned int idx = 0; + byte out1[256]; + byte out2[256]; + + ret = InitRsaKey(&defRsa, NULL); + if (ret == 0) + ret = CRYPT_RSA_Initialize(&mcRsa); + if (ret != 0) { + printf("mcapi rsa init failed\n"); + return -1; + } + + ret = CRYPT_RSA_PrivateKeyDecode(&mcRsa, client_key_der_1024, keySz); + if (ret != 0) { + printf("mcapi rsa private key decode failed\n"); + return -1; + } + + ret = RsaPrivateKeyDecode(client_key_der_1024, &idx, &defRsa, keySz); + if (ret != 0) { + printf("default rsa private key decode failed\n"); + return -1; + } + + ret = CRYPT_RSA_PublicEncrypt(&mcRsa, out1, sizeof(out1), ourData, + RSA_TEST_SIZE, &mcRng); + if (ret < 0) { + printf("mcapi rsa public encrypt failed\n"); + return -1; + } + + ret2 = RsaPublicEncrypt(ourData, RSA_TEST_SIZE, out2, sizeof(out2), + &defRsa, &defRng); + if (ret2 < 0) { + printf("default rsa public encrypt failed\n"); + return -1; + } + + if (ret != ret2) { + printf("default rsa public encrypt sz != mcapi sz\n"); + return -1; + } + + if (ret != CRYPT_RSA_EncryptSizeGet(&mcRsa)) { + printf("mcapi encrypt sz get != mcapi sz\n"); + return -1; + } + + ret = CRYPT_RSA_PrivateDecrypt(&mcRsa, out2, sizeof(out2), out1, ret); + if (ret < 0) { + printf("mcapi rsa private derypt failed\n"); + return -1; + } + + if (ret != RSA_TEST_SIZE) { + printf("mcapi rsa private derypt plain size wrong\n"); + return -1; + } + + if (memcmp(out2, ourData, ret) != 0) { + printf("mcapi rsa private derypt plain text bad\n"); + return -1; + } + + FreeRsaKey(&defRsa); + ret = CRYPT_RSA_Free(&mcRsa); + if (ret != 0) { + printf("mcapi rsa free failed\n"); + return -1; + } + + printf("rsa mcapi test passed\n"); + + return 0; +} + + +/* check mcapi ecc */ +static int check_ecc(void) +{ + CRYPT_ECC_CTX userA; + CRYPT_ECC_CTX userB; + int ret; + byte sharedA[100]; + byte sharedB[100]; + byte sig[100]; + unsigned int aSz = (unsigned int)sizeof(sharedA); + unsigned int bSz = (unsigned int)sizeof(sharedB); + unsigned int sigSz = (unsigned int)sizeof(sig); + unsigned int usedA = 0; + unsigned int usedB = 0; + int verifyStatus = 0; + + /* init */ + ret = CRYPT_ECC_Initialize(&userA); + if (ret != 0) { + printf("mcapi ecc init failed\n"); + return -1; + } + + ret = CRYPT_ECC_Initialize(&userB); + if (ret != 0) { + printf("mcapi ecc init b failed\n"); + return -1; + } + + /* dhe + helpers */ + ret = CRYPT_ECC_DHE_KeyMake(&userA, &mcRng, 32); + if (ret != 0) { + printf("mcapi ecc make key failed\n"); + return -1; + } + + ret = CRYPT_ECC_DHE_KeyMake(&userB, &mcRng, 32); + if (ret != 0) { + printf("mcapi ecc make key b failed\n"); + return -1; + } + + ret = CRYPT_ECC_KeySizeGet(&userA); + if (ret <= 0) { + printf("mcapi ecc key size get failed\n"); + return -1; + } + + ret = CRYPT_ECC_SignatureSizeGet(&userA); + if (ret <= 0) { + printf("mcapi ecc signature size get failed\n"); + return -1; + } + + ret = CRYPT_ECC_DHE_SharedSecretMake(&userA, &userB, sharedA, aSz, &usedA); + if (ret != 0) { + printf("mcapi ecc make shared secret failed\n"); + return -1; + } + + ret = CRYPT_ECC_DHE_SharedSecretMake(&userB, &userA, sharedB, bSz, &usedB); + if (ret != 0) { + printf("mcapi ecc make shared secret failed\n"); + return -1; + } + + if (usedA != usedB || usedA <= 0) { + printf("mcapi ecc make shared secret output size match failed\n"); + return -1; + } + + if (memcmp(sharedA, sharedB, usedA) != 0) { + printf("mcapi ecc make shared secret output match cmp failed\n"); + return -1; + } + + /* dsa */ + ret = CRYPT_ECC_DSA_HashSign(&userA, &mcRng, sig, sigSz, &usedA, ourData, + CRYPT_SHA_DIGEST_SIZE); + if (ret != 0) { + printf("mcapi ecc sign hash failed\n"); + return -1; + } + + sigSz = usedA; + if (sigSz <= 0) { + printf("mcapi ecc sign hash bad sig size\n"); + return -1; + } + + ret = CRYPT_ECC_DSA_HashVerify(&userA, sig, sigSz, ourData, + CRYPT_SHA_DIGEST_SIZE, &verifyStatus); + if (ret != 0) { + printf("mcapi ecc verify hash failed\n"); + return -1; + } + if (verifyStatus != 1) { + printf("mcapi ecc verify hash status failed\n"); + return -1; + } + + /* import / export */ + usedA = 0; + ret = CRYPT_ECC_PublicExport(&userA, sharedA, aSz, &usedA); + if (ret != 0) { + printf("mcapi ecc public export failed\n"); + return -1; + } + + ret = CRYPT_ECC_PublicImport(&userB, sharedA, usedA); + if (ret != 0) { + printf("mcapi ecc public import failed\n"); + return -1; + } + + ret = CRYPT_ECC_Free(&userA); + if (ret != 0) { + printf("mcapi ecc free failed\n"); + return -1; + } + + ret = CRYPT_ECC_Free(&userB); + if (ret != 0) { + printf("mcapi ecc free b failed\n"); + return -1; + } + + printf("ecc mcapi test passed\n"); + + return 0; +} + diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile b/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml new file mode 100644 index 00000000..1078d1e2 --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml @@ -0,0 +1,157 @@ + + + + + + + + + ../../zlib-1.2.8/adler32.c + ../../zlib-1.2.8/compress.c + ../../zlib-1.2.8/crc32.c + ../../zlib-1.2.8/deflate.c + ../../zlib-1.2.8/gzclose.c + ../../zlib-1.2.8/gzlib.c + ../../zlib-1.2.8/gzread.c + ../../zlib-1.2.8/gzwrite.c + ../../zlib-1.2.8/infback.c + ../../zlib-1.2.8/inffast.c + ../../zlib-1.2.8/inflate.c + ../../zlib-1.2.8/inftrees.c + ../../zlib-1.2.8/trees.c + ../../zlib-1.2.8/uncompr.c + ../../zlib-1.2.8/zutil.c + + + Makefile + + + Makefile + + + + localhost + PIC32MX795F512L + + + SKDEPIC32PlatformTool + XC32 + 1.10 + 4 + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am new file mode 100644 index 00000000..9d855dde --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mcapi/zlib.X/Makefile + +EXTRA_DIST += \ + mcapi/zlib.X/nbproject/configurations.xml \ + mcapi/zlib.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml new file mode 100644 index 00000000..b0da527d --- /dev/null +++ b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml @@ -0,0 +1,15 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + zlib + 8eef651d-e634-46ae-9183-39443c98e390 + 0 + c + + + ISO-8859-1 + + + + diff --git a/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h b/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h new file mode 100644 index 00000000..323de525 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h @@ -0,0 +1,28 @@ +void _mon_putc(char c); + +static void init_serial() { + #ifdef MICROCHIP_PIC32 +#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__) + /* Set up PB2 divisor for UART2 */ + SYSKEY = 0x00000000; + SYSKEY = 0xAA996655; + SYSKEY = 0x556699AA; + PB2DIV = 0x00008018; + SYSKEY = 0x33333333; + + /* UART2 Init */ +// U2BRG = 0x0C; + U2BRG = 0x7; + ANSELBCLR = 0x4000; + ANSELGCLR = 0x0040; + RPB14R = 0x02; + U2RXR = 0x01; + U2MODE = 0x8000; + U2STA = 0x400; +#elif defined __PIC32MX__ + SYSTEMConfigPerformance(80000000); + DBINIT(); +#endif + +#endif +} diff --git a/project1/cyassl-3.0.0/mplabx/README b/project1/cyassl-3.0.0/mplabx/README new file mode 100644 index 00000000..715c227b --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/README @@ -0,0 +1,55 @@ +CyaSSL MPLAB X Project Files + +This directory contains project files for the Microchip MPLAB X IDE. These +projects have been set up to use the Microchip PIC32 Ethernet Starter Kit +and the Microchip XC32 compiler. + +In order to generate the necessary auto-generated MPLAB X files, make sure +to import the cyassl.X project into your MPLAB X workspace before trying to +build either the CTaoCrypt test or benchmark applications. This will +correctly set up the respective project's Makefiles. + +Included Project Files +----------------------- + +1. CyaSSL library (cyassl.X) + + This project builds a static CyaSSL library. Prior to building this + project, uncomment the MICROCHIP_PIC32 define located in: + + /cyassl/ctaocrypt/settings.h + + After this project has been built, the compiled library will be located + at: + + /mplabx/cyassl.X/dist/default/production/cyassl.X.a + +2. CTaoCrypt Test App (ctaocrypt_test.X) + + This project tests the CTaoCrypt cryptography modules. It is generally + a good idea to run this first on an embedded system after compiling + CyaSSL in order to verify all underlying crypto is working correctly. + +3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X) + + This project builds the CTaoCrypt benchmark application. + +PIC32MX/PIC32MZ +--------------- + +The projects are set for PIC32MX by default. For PIC32MZ, change project +properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to +XC32-gcc->Preprocessing and messages-> Preprocessor macros. + + +MIPS16 and MIPS32 Support +------------------------- + +These projects support both MIPS16 and MIPS32 instruction sets. Switching +between these two instruction sets can be done in each project's properties +settings by checking the "Generate 16-bit code" checkbox. + +Support +------- +Please send questions or comments to support@wolfssl.com + diff --git a/project1/cyassl-3.0.0/mplabx/benchmark_main.c b/project1/cyassl-3.0.0/mplabx/benchmark_main.c new file mode 100644 index 00000000..4d115de7 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/benchmark_main.c @@ -0,0 +1,133 @@ +/* benchmark_main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if defined(CYASSL_MICROCHIP_PIC32MZ) + #define MICROCHIP_PIC32 + #include + #pragma config ICESEL = ICS_PGx2 + /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ + #include "PIC32MZ-serial.h" + #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ +#else + #define PIC32_STARTER_KIT + #include + #include + #include + #define init_serial() /* void out init_serial() ; */ +#endif + +void bench_des(void); +void bench_arc4(void); +void bench_hc128(void); +void bench_rabbit(void); +void bench_aes(int); +void bench_aesgcm(void); + +void bench_md5(void); +void bench_sha(void); +void bench_sha256(void); +void bench_sha512(void); +void bench_ripemd(void); + +void bench_rsa(void); +void bench_rsaKeyGen(void); +void bench_dh(void); +#ifdef HAVE_ECC +void bench_eccKeyGen(void); +void bench_eccKeyAgree(void); +#endif + +/* + * Main driver for CTaoCrypt benchmarks. + */ +int main(int argc, char** argv) { + volatile int i ; + int j ; + + init_serial() ; /* initialize PIC32MZ serial I/O */ + SYSTEMConfigPerformance(80000000); + DBINIT(); + + printf("wolfCrypt Benchmark:\n"); + +#ifndef NO_AES + bench_aes(0); + bench_aes(1); +#endif +#ifdef HAVE_AESGCM + bench_aesgcm(); +#endif +#ifndef NO_RC4 + bench_arc4(); +#endif +#ifdef HAVE_HC128 + bench_hc128(); +#endif +#ifndef NO_RABBIT + bench_rabbit(); +#endif +#ifndef NO_DES3 + bench_des(); +#endif + + printf("\n"); + +#ifndef NO_MD5 + bench_md5(); +#endif + bench_sha(); +#ifndef NO_SHA256 + bench_sha256(); +#endif +#ifdef CYASSL_SHA512 + bench_sha512(); +#endif +#ifdef CYASSL_RIPEMD + bench_ripemd(); +#endif + + printf("\n"); + +#ifndef NO_RSA + bench_rsa(); +#endif + +#ifndef NO_DH + bench_dh(); +#endif + +#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) + bench_rsaKeyGen(); +#endif + +#ifdef HAVE_ECC + bench_eccKeyGen(); + bench_eccKeyAgree(); +#endif + printf("End of wolfCrypt Benchmark:\n"); + return 0; +} + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml new file mode 100644 index 00000000..13faa6bc --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml @@ -0,0 +1,193 @@ + + + + + + + + + ../../ctaocrypt/benchmark/benchmark.c + ../benchmark_main.c + + + Makefile + + + + .. + + Makefile + + + + localhost + PIC32MX795F512L + + + PKOBSKDEPlatformTool + XC32 + 1.30 + 3 + + + + + + + + + + + + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am new file mode 100644 index 00000000..9af74c3b --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mplabx/ctaocrypt_benchmark.X/Makefile + +EXTRA_DIST += \ + mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_benchmark.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml new file mode 100644 index 00000000..e87963a9 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml @@ -0,0 +1,17 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + ctaocrypt_benchmark + 22e4138b-5f20-4957-ac0a-c181b94d3342 + 0 + c + + + ISO-8859-1 + + ../cyassl.X + + + + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml new file mode 100644 index 00000000..7ffe44c2 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml @@ -0,0 +1,194 @@ + + + + + ../../ctaocrypt/test/test.h + + + + + ../../ctaocrypt/test/test.c + ../test_main.c + + + Makefile + + + + .. + + Makefile + + + + localhost + PIC32MX795F512L + + + PKOBSKDEPlatformTool + XC32 + 1.30 + 3 + + + + + + + + + + + + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am new file mode 100644 index 00000000..ea0df611 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mplabx/ctaocrypt_test.X/Makefile + +EXTRA_DIST += \ + mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ + mplabx/ctaocrypt_test.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml new file mode 100644 index 00000000..82180e82 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml @@ -0,0 +1,17 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + ctaocrypt_test + b34c4937-7042-4352-88b1-7717bcdf8aeb + 0 + c + + h + ISO-8859-1 + + ../cyassl.X + + + + diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile b/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile new file mode 100644 index 00000000..05a3fb1b --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile @@ -0,0 +1,108 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml new file mode 100644 index 00000000..1a141bb2 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml @@ -0,0 +1,208 @@ + + + + + + + + + ../../src/crl.c + ../../src/internal.c + ../../src/io.c + ../../src/keys.c + ../../src/ocsp.c + ../../src/sniffer.c + ../../src/ssl.c + ../../src/tls.c + ../../ctaocrypt/src/aes.c + ../../ctaocrypt/src/arc4.c + ../../ctaocrypt/src/asm.c + ../../ctaocrypt/src/asn.c + ../../ctaocrypt/src/coding.c + ../../ctaocrypt/src/des3.c + ../../ctaocrypt/src/dh.c + ../../ctaocrypt/src/dsa.c + ../../ctaocrypt/src/ecc.c + ../../ctaocrypt/src/ecc_fp.c + ../../ctaocrypt/src/error.c + ../../ctaocrypt/src/hc128.c + ../../ctaocrypt/src/hmac.c + ../../ctaocrypt/src/integer.c + ../../ctaocrypt/src/logging.c + ../../ctaocrypt/src/md2.c + ../../ctaocrypt/src/md4.c + ../../ctaocrypt/src/md5.c + ../../ctaocrypt/src/memory.c + ../../ctaocrypt/src/misc.c + ../../ctaocrypt/src/pwdbased.c + ../../ctaocrypt/src/rabbit.c + ../../ctaocrypt/src/random.c + ../../ctaocrypt/src/ripemd.c + ../../ctaocrypt/src/rsa.c + ../../ctaocrypt/src/sha.c + ../../ctaocrypt/src/sha256.c + ../../ctaocrypt/src/sha512.c + ../../ctaocrypt/src/tfm.c + ../../ctaocrypt/src/port.c + + + Makefile + + + + .. + ../../cyassl/ctaocrypt + ../../ctaocrypt/src + + Makefile + + + + localhost + PIC32MX795F512L + + + PKOBSKDEPlatformTool + XC32 + 1.30 + 3 + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am new file mode 100644 index 00000000..7d0b9879 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mplabx/cyassl.X/Makefile + +EXTRA_DIST += \ + mplabx/cyassl.X/nbproject/configurations.xml \ + mplabx/cyassl.X/nbproject/project.xml + diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml new file mode 100644 index 00000000..c7604d71 --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml @@ -0,0 +1,15 @@ + + com.microchip.mplab.nbide.embedded.makeproject + + + cyassl + 93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b + 0 + c + + + ISO-8859-1 + + + + diff --git a/project1/cyassl-3.0.0/mplabx/include.am b/project1/cyassl-3.0.0/mplabx/include.am new file mode 100644 index 00000000..b63cdeca --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/include.am @@ -0,0 +1,10 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mplabx/PIC32MZ-serial.h \ + mplabx/README \ + mplabx/benchmark_main.c \ + mplabx/test_main.c + diff --git a/project1/cyassl-3.0.0/mplabx/test_main.c b/project1/cyassl-3.0.0/mplabx/test_main.c new file mode 100644 index 00000000..b77f4f5d --- /dev/null +++ b/project1/cyassl-3.0.0/mplabx/test_main.c @@ -0,0 +1,77 @@ +/* main.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#if defined(CYASSL_MICROCHIP_PIC32MZ) + #define MICROCHIP_PIC32 + #include + #pragma config ICESEL = ICS_PGx2 + /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ + #include + #include + #include "PIC32MZ-serial.h" + #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ +#else + #define PIC32_STARTER_KIT + #include + #include + #include + #include + #include + #define init_serial() /* void out init_serial() */ +#endif + +/* func_args from test.h, so don't have to pull in other junk */ +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + +/* + * Main driver for CTaoCrypt tests. + */ +int main(int argc, char** argv) { + int i ; + + init_serial() ; /* initialize PIC32MZ serial I/O */ + SYSTEMConfigPerformance(80000000); + DBINIT(); + printf("CTaoCrypt Test:\n"); + func_args args; + + args.argc = argc; + args.argv = argv; + + ctaocrypt_test(&args); + + if (args.return_code == 0) { + printf("All tests passed!\n"); + } + + return 0; +} + diff --git a/project1/cyassl-3.0.0/mqx/README b/project1/cyassl-3.0.0/mqx/README new file mode 100644 index 00000000..3765ba57 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/README @@ -0,0 +1,37 @@ +CyaSSL Freescale CodeWarrior Project Files + +This directory contains project files for Freescale CodeWarrior 10.2. These +project have been created to use MQX, RTCS, and MFS on the Freescale +Kinetis K70 Tower System. + +Included Project Files +----------------------- + +1. CyaSSL library (/cyassl) + + Prior to building this project, uncomment the FREESCALE_MQX define + located in: + + /cyassl/ctaocrypt/settings.h + +2. CTaoCrypt Test App (/ctaocrypt_test) + +3. Example CyaSSL Client (/cyassl_client) + + +Importing into CodeWarrior Workspace +------------------------------------ + +These projects can be imported into a CodeWarrior workspace using the standard +"Import Project" feature. To import a project from CodeWarrior, follow +these steps: + +1. File -> Import +2. General -> Existing Projects into Workspace +3. Select Root Directory (browse to this "/mqx" directory) +4. Select desired projects -> Finish + +Keep in mind that the projects above reference CyaSSL source files and header +files with relative paths to the projects' current location in the +/mqx directory. + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject new file mode 100644 index 00000000..6a742b34 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject @@ -0,0 +1,2542 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project new file mode 100644 index 00000000..82a85749 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project @@ -0,0 +1,98 @@ + + + ctaocrypt_test + + + +cyassl + +util_lib + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + -j6 + + + org.eclipse.cdt.make.core.buildCommand + ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make + + + org.eclipse.cdt.make.core.buildLocation + ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Sources/ctaocrypt-test + 2 + PARENT-2-PROJECT_LOC/ctaocrypt/test + + + + + 1351803045734 + Sources/ctaocrypt-test + 5 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-true-(.*?)\.(c)$ + + + + + + MQX_ROOT_DIR + file:/C:/Freescale/Freescale%20MQX%203.8 + + + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml new file mode 100644 index 00000000..3df5e171 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am new file mode 100644 index 00000000..b167955e --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am @@ -0,0 +1,15 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mqx/ctaocrypt_test/.cproject \ + mqx/ctaocrypt_test/.project \ + mqx/ctaocrypt_test/ReferencedRSESystems.xml \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch + +EXTRA_DIST += \ + mqx/ctaocrypt_test/Sources/main.c \ + mqx/ctaocrypt_test/Sources/main.h + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c new file mode 100644 index 00000000..bb330432 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c @@ -0,0 +1,103 @@ +/* main.c */ + +#include "main.h" + +/* SD card open/close utility functions */ +#include "util.h" + +#if !BSPCFG_ENABLE_IO_SUBSYSTEM +#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ + non-zero in user_config.h. Please recompile BSP with this option. +#endif + +#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED +#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. \ + Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in \ + user_config.h and recompile BSP with this option. +#endif + + +TASK_TEMPLATE_STRUCT MQX_template_list[] = +{ +/* Task number, Entry point, Stack, Pri, String, Auto? */ + {MAIN_TASK, Main_task, 20000, 9, "main", MQX_AUTO_START_TASK}, + {0, 0, 0, 0, 0, 0, } +}; + +/*TASK*----------------------------------------------------- +* +* Task Name : Main_task +* Comments : +* This task opens the SD card device and runs the +* CTaoCrypt test functions located in test.c. +* +*END*-----------------------------------------------------*/ + +#if defined BSP_SDCARD_ESDHC_CHANNEL + #if ! BSPCFG_ENABLE_ESDHC + #error This application requires BSPCFG_ENABLE_ESDHC defined \ + non-zero in user_config.h. Please recompile libraries with \ + this option. + #endif + +#elif defined BSP_SDCARD_SDHC_CHANNEL + #if ! BSPCFG_ENABLE_SDHC + #error This application requires BSPCFG_ENABLE_SDHC defined \ + non-zero in user_config.h. Please recompile libraries with \ + this option. + #endif +#endif + +#if defined (BSP_SDCARD_SPI_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL +#elif defined (BSP_SDCARD_ESDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL +#elif defined (BSP_SDCARD_SDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL +#else + #error "SDCARD low level communication device not defined!" +#endif + +/* func_args from test.h */ +typedef struct func_args { + int argc; + char** argv; + int return_code; +} func_args; + +void Main_task(uint_32 initial_data) +{ + int ret = 0; + func_args args; + _mqx_int error_code, bytes; + _mqx_uint sz; + char filesystem_name[] = "a:"; + char partman_name[] = "pm:"; + MQX_FILE_PTR com_handle, sdcard_handle, filesystem_handle, partman_handle; + MQX_FILE_PTR cert_file = NULL; + const char* fileName = "a:\certs\\client-key.der"; + + ret = sdcard_open(&com_handle, &sdcard_handle, &partman_handle, + &filesystem_handle, partman_name, filesystem_name); + + if (ret != 0) { + printf("error: sdcard_open(), ret = %d\n", ret); + _mqx_exit(1); + } + printf("SD card installed to %s\n", filesystem_name); + + ctaocrypt_test(&args); + + ret = sdcard_close(&sdcard_handle, &partman_handle, + &filesystem_handle, partman_name, filesystem_name); + + if (ret != 0) { + printf("error: sdcard_close(), ret = %d\n", ret); + _mqx_exit(1); + } + printf("SD card uninstalled.\n"); + + _mqx_exit(0); +} + +/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h new file mode 100644 index 00000000..2ea7c913 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h @@ -0,0 +1,21 @@ +/* main.h */ + +#ifndef __main_h_ +#define __main_h_ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#define MAIN_TASK 1 + +extern void Main_task(uint_32); + +#endif /* __main_h_ */ + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch new file mode 100644 index 00000000..6c74d9ae --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch new file mode 100644 index 00000000..8a56e79c --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl/.cproject b/project1/cyassl-3.0.0/mqx/cyassl/.cproject new file mode 100644 index 00000000..14a6d3b8 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl/.cproject @@ -0,0 +1,2579 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl/.project b/project1/cyassl-3.0.0/mqx/cyassl/.project new file mode 100644 index 00000000..1ab3cb41 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl/.project @@ -0,0 +1,103 @@ + + + cyassl + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + -j6 + + + org.eclipse.cdt.make.core.buildCommand + ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make + + + org.eclipse.cdt.make.core.buildLocation + ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Sources/ctaocrypt_src + 2 + PARENT-2-PROJECT_LOC/ctaocrypt/src + + + Sources/cyassl_src + 2 + PARENT-2-PROJECT_LOC/src + + + + + 1351802255000 + Sources/ctaocrypt_src + 6 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-aes_asm.s + + + + + + CYASSL_SOURCES + PARENT-2-PROJECT_LOC + + + MQX_ROOT_DIR + file:/C:/Freescale/Freescale%20MQX%203.8 + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl/include.am b/project1/cyassl-3.0.0/mqx/cyassl/include.am new file mode 100644 index 00000000..509e078a --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl/include.am @@ -0,0 +1,11 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mqx/README + +EXTRA_DIST += \ + mqx/cyassl/.cproject \ + mqx/cyassl/.project + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject b/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject new file mode 100644 index 00000000..f75ed328 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject @@ -0,0 +1,2585 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/.project b/project1/cyassl-3.0.0/mqx/cyassl_client/.project new file mode 100644 index 00000000..a2241849 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/.project @@ -0,0 +1,80 @@ + + + cyassl_client + + + +cyassl + +util_lib + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + -j6 + + + org.eclipse.cdt.make.core.buildCommand + ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make + + + org.eclipse.cdt.make.core.buildLocation + ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + MQX_ROOT_DIR + file:/C:/Freescale/Freescale%20MQX%203.8 + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml b/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml new file mode 100644 index 00000000..0f4419bd --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am new file mode 100644 index 00000000..dd4b2ffd --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am @@ -0,0 +1,15 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mqx/cyassl_client/.cproject \ + mqx/cyassl_client/.project \ + mqx/cyassl_client/ReferencedRSESystems.xml \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ + mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch + +EXTRA_DIST += \ + mqx/cyassl_client/Sources/main.c \ + mqx/cyassl_client/Sources/main.h + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c new file mode 100644 index 00000000..3938a87a --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c @@ -0,0 +1,239 @@ +/* + * main.c + */ + +#include "main.h" +#include "util.h" + +#if !BSPCFG_ENABLE_IO_SUBSYSTEM +#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ + non-zero in user_config.h. Please recompile BSP with this option. +#endif + +#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED +#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. \ + Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in \ + user_config.h and recompile BSP with this option. +#endif + +#if defined BSP_SDCARD_ESDHC_CHANNEL +#if ! BSPCFG_ENABLE_ESDHC +#error This application requires BSPCFG_ENABLE_ESDHC defined non-zero in \ + user_config.h. Please recompile libraries with this option. +#endif + +#elif defined BSP_SDCARD_SDHC_CHANNEL + +#if ! BSPCFG_ENABLE_SDHC +#error This application requires BSPCFG_ENABLE_SDHC defined non-zero in \ + user_config.h. Please recompile libraries with this option. +#endif + +#endif + +#if defined (BSP_SDCARD_SPI_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL +#elif defined (BSP_SDCARD_ESDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL +#elif defined (BSP_SDCARD_SDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL +#else + #error "SDCARD low level communication device not defined!" +#endif + +TASK_TEMPLATE_STRUCT MQX_template_list[] = +{ +/* Task number, Entry point, Stack, Pri, String, Auto? */ + {MAIN_TASK, Main_task, 20000, 9, "main", MQX_AUTO_START_TASK}, + {0, 0, 0, 0, 0, 0, } +}; + +/*TASK*----------------------------------------------------- +* +* Task Name : Main_task +* Comments : +* This task sets up the SD card and Ethernet devices, +* then starts the example CyaSSL client. The example +* CyaSSL client connects to a server over SSL and sends +* a simple HTTP GET message, then prints out the reply +* from the server. +* +* To change the IP address and port of the server, +* change the yasslIP and yasslPort variables in +* client_test(). Note that yasslIP needs to be given +* in hexadecimal. +* +*END*-----------------------------------------------------*/ + +void Main_task(uint_32 initial_data) +{ + int ret = 0; + _mqx_int error_code, bytes; + _mqx_uint param; + _mqx_uint sz; + MQX_FILE_PTR com_handle, sdcard_handle, filesystem_handle, partman_handle; + MQX_FILE_PTR cert_file = NULL; + char filesystem_name[] = "a:"; + char partman_name[] = "pm:"; + const char* fileName = "a:\certs\\client-key.der"; + + printf("Starting client example... \n"); + + ret = sdcard_open(&com_handle, &sdcard_handle, &partman_handle, + &filesystem_handle, partman_name, filesystem_name); + + if (ret != 0) { + printf("error: sdcard_open(), ret = %d\n", ret); + _mqx_exit(1); + } + printf("SD card installed to %s\n", filesystem_name); + + setup_ethernet(); + client_test(); + + ret = sdcard_close(&sdcard_handle, &partman_handle, &filesystem_handle, + partman_name, filesystem_name); + + if (ret != 0) { + printf("error: sdcard_close(), ret = %d\n", ret); + _mqx_exit(1); + } + printf("SD card uninstalled.\n"); + + _mqx_exit(0); +} + +void setup_ethernet(void) { + + int error; + _enet_handle ehandle; /* for Ethernet driver */ + _rtcs_if_handle ihandle; + _enet_address address; + + error = RTCS_create(); + if (error) { + err_sys("failed to create RTCS"); + } + + ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ENET_IPADDR, address); + + /* Set up the Ethernet driver */ + error = ENET_initialize(BSP_DEFAULT_ENET_DEVICE, address, 0, &ehandle); + if (error) + err_sys("failed to initialize Ethernet driver"); + + error = RTCS_if_add(ehandle, RTCS_IF_ENET, &ihandle); + if (error) + err_sys("failed to add interface for Ethernet"); + + error = RTCS_if_bind(ihandle, ENET_IPADDR, ENET_IPMASK); + if (error) + err_sys("failed to bind interface for Ethernet"); + +#ifdef GATE_IPADDR + RTCS_gate_add(GATE_IPADDR, INADDR_ANY, INADDR_ANY); +#endif + + printf("Ethernet device %d bound to %X\n", BSP_DEFAULT_ENET_DEVICE, + ENET_IPADDR); +} + +void client_test(void) { + + char msg[64]; + char reply[1024]; + int sockfd, input; + int ret = 0, msgSz = 0; + struct sockaddr_in servaddr; + CYASSL_CTX* ctx; + CYASSL* ssl; + + long yasslIP = 0xa9fea662; /* 169.254.166.98 */ + long yasslPort = 11111; + + CyaSSL_Debugging_ON(); + CyaSSL_Init(); + + ctx = CyaSSL_CTX_new(CyaSSLv3_client_method()); + + if (ctx == 0) + err_sys("setting up ctx"); + + ret = CyaSSL_CTX_use_certificate_file(ctx, clientCert, SSL_FILETYPE_PEM); + if (ret != SSL_SUCCESS) { + err_sys("can't load client cert file, check file"); + } + + ret = CyaSSL_CTX_use_PrivateKey_file(ctx, clientKey, SSL_FILETYPE_PEM); + if (ret != SSL_SUCCESS) { + err_sys("can't load client key file, check file"); + } + + ret = CyaSSL_CTX_load_verify_locations(ctx, caCert, 0); + if (ret != SSL_SUCCESS) { + err_sys("can't load CA cert file, check file"); + } + + /* create socket descriptor */ + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd == RTCS_SOCKET_ERROR) { + err_sys("socket creation failed"); + } else { + printf("socket created successfully\n"); + } + + /* Unlike most TCP/IP stacks, RTCS requires that sin_port and + * sin_addr needs to be in Host Byte Order, not Network Byte Order. + * This means we shouldn't use htons() when setting these values. */ + memset((char*)&servaddr, 0, sizeof(servaddr)); + servaddr.sin_family = AF_INET; + servaddr.sin_port = yasslPort; + servaddr.sin_addr.s_addr = yasslIP; + + ret = connect(sockfd, &servaddr, sizeof(servaddr)); + if (ret != RTCS_OK) { + err_sys("connect() failed"); + } else { + printf("Connected to %lx, port %d.\n", servaddr.sin_addr.s_addr, + servaddr.sin_port); + } + + if( (ssl = CyaSSL_new(ctx)) == NULL) { + err_sys("CyaSSL_new failed"); + } + + CyaSSL_set_fd(ssl, sockfd); + + ret = CyaSSL_connect(ssl); + if (ret != SSL_SUCCESS) + err_sys("CyaSSL_connect failed"); + + printf("CyaSSL_connect() ok, sending GET...\n"); + msgSz = 28; + strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); + if (CyaSSL_write(ssl, msg, msgSz) != msgSz) + err_sys("CyaSSL_write() failed"); + + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("Server response: %s\n", reply); + + while(1) { + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) { + reply[input] = 0; + printf("%s\n", reply); + } else { + break; + } + } + } + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); +} + +/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h new file mode 100644 index 00000000..91c11b33 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h @@ -0,0 +1,61 @@ +/* main.h */ + +#ifndef __main_h_ +#define __main_h_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define MAIN_TASK 1 + +extern void Main_task(uint_32); +extern void setup_ethernet(void); +extern void client_test(void); + +/* cert file locations */ +static const char* fileName = "a:\certs\\ca-cert.pem"; +static const char* caCert = "a:\certs\\ca-cert.pem"; +static const char* clientCert = "a:\certs\\client-cert.pem"; +static const char* clientKey = "a:\certs\\client-key.pem"; + +static inline void err_sys(const char* msg) +{ + printf("yassl error: %s\n", msg); + if (msg) + _mqx_exit(1); +} + +/* PPP device must be set manually and +** must be different from the default IO channel (BSP_DEFAULT_IO_CHANNEL) +*/ +#define PPP_DEVICE "ittyb:" + +/* +** Define PPP_DEVICE_DUN only when using PPP to communicate +** to Win9x Dial-Up Networking over a null-modem +** This is ignored if PPP_DEVICE is not #define'd +*/ +#define PPP_DEVICE_DUN 1 + +#ifndef ENET_IPADDR + #define ENET_IPADDR IPADDR(169,254,3,3) +#endif + +#ifndef ENET_IPMASK + #define ENET_IPMASK IPADDR(255,255,0,0) +#endif + +#define GATE_IPADDR IPADDR(192,168,0,1) + +#endif /* __main_h_ */ + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch new file mode 100644 index 00000000..9aa53216 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch new file mode 100644 index 00000000..cff2bff7 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/util_lib/.cproject b/project1/cyassl-3.0.0/mqx/util_lib/.cproject new file mode 100644 index 00000000..139b9a35 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/util_lib/.cproject @@ -0,0 +1,2538 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/mqx/util_lib/.project b/project1/cyassl-3.0.0/mqx/util_lib/.project new file mode 100644 index 00000000..4e538b6e --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/util_lib/.project @@ -0,0 +1,76 @@ + + + util_lib + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + -j6 + + + org.eclipse.cdt.make.core.buildCommand + ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make + + + org.eclipse.cdt.make.core.buildLocation + ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + MQX_ROOT_DIR + file:/C:/Freescale/Freescale%20MQX%203.8 + + + diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am b/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am new file mode 100644 index 00000000..4b54a5a6 --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am @@ -0,0 +1,12 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += \ + mqx/util_lib/.cproject \ + mqx/util_lib/.project + +EXTRA_DIST += \ + mqx/util_lib/Sources/util.c \ + mqx/util_lib/Sources/util.h + diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c new file mode 100644 index 00000000..0a3f396b --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c @@ -0,0 +1,178 @@ +/* util.c */ + +#include +#include +#include +#include + +#include "util.h" + +#if !BSPCFG_ENABLE_IO_SUBSYSTEM + #error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ + non-zero in user_config.h. Please recompile BSP with this option. +#endif + +#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED + #error This application requires BSP_DEFAULT_IO_CHANNEL to be not \ + NULL. Please set corresponding BSPCFG_ENABLE_TTYx to non-zero \ + in user_config.h and recompile BSP with this option. +#endif + +#if defined BSP_SDCARD_ESDHC_CHANNEL + #if ! BSPCFG_ENABLE_ESDHC + #error This application requires BSPCFG_ENABLE_ESDHC defined \ + non-zero in user_config.h. Please recompile libraries with \ + this option. + #endif +#elif defined BSP_SDCARD_SDHC_CHANNEL + #if ! BSPCFG_ENABLE_SDHC + #error This application requires BSPCFG_ENABLE_SDHC defined \ + non-zero in user_config.h. Please recompile libraries with \ + this option. + #endif +#endif + +#if defined (BSP_SDCARD_SPI_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL +#elif defined (BSP_SDCARD_ESDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL +#elif defined (BSP_SDCARD_SDHC_CHANNEL) + #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL +#else + #error "SDCARD low level communication device not defined!" +#endif + +int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle, + MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle, + char *partman_name, char *filesystem_name) +{ + + _mqx_int error_code; + _mqx_uint param; + + /* Open low level communication device */ + *com_handle = fopen(SDCARD_COM_CHANNEL, NULL); + + if (NULL == *com_handle) { + printf("Error installing communication handle.\n"); + return -60; + } + + /* Install SD card device */ + error_code = _io_sdcard_install("sdcard:", (pointer) &_bsp_sdcard0_init, + *com_handle); + if (error_code != MQX_OK) { + printf("Error installing SD card device (0x%x)\n", error_code); + return -61; + } + + _time_delay(200); + + /* Open the device which MFS will be installed on */ + *sdcard_handle = fopen("sdcard:", 0); + if (*sdcard_handle == NULL) { + printf("Unable to open SD card device.\n"); + return -62; + } + + /* Install partition manager over SD card driver */ + error_code = _io_part_mgr_install(*sdcard_handle, partman_name, 0); + if (error_code != MFS_NO_ERROR) { + printf("Error installing partition manager: %s\n", MFS_Error_text( + (uint_32) error_code)); + return -63; + } + + /* Open partition manager */ + *partman_handle = fopen(partman_name, NULL); + if (*partman_handle == NULL) { + error_code = ferror(*partman_handle); + printf("Error opening partition manager: %s\n", MFS_Error_text( + (uint_32) error_code)); + return -64; + } + + /* Validate partition 1 */ + param = 1; + error_code = _io_ioctl(*partman_handle, IO_IOCTL_VAL_PART, ¶m); + if (error_code == MQX_OK) { + /* Install MFS over partition 1 */ + error_code = _io_mfs_install(*partman_handle, filesystem_name, param); + if (error_code != MFS_NO_ERROR) { + printf("Error initializing MFS over partition: %s\n", + MFS_Error_text((uint_32) error_code)); + return -65; + } + + } else { + /* Install MFS over SD card driver */ + error_code = _io_mfs_install(*sdcard_handle, filesystem_name, + (_file_size) 0); + if (error_code != MFS_NO_ERROR) { + printf("Error initializing MFS: %s\n", MFS_Error_text( + (uint_32) error_code)); + return -66; + } + } /* end Validate partition 1 */ + + /* Open file system */ + *filesystem_handle = fopen(filesystem_name, NULL); + error_code = ferror(*filesystem_handle); + if ((error_code != MFS_NO_ERROR) && (error_code != MFS_NOT_A_DOS_DISK)) { + printf("Error opening filesystem: %s\n", MFS_Error_text( + (uint_32) error_code)); + return -67; + } + if (error_code == MFS_NOT_A_DOS_DISK) { + printf("NOT A DOS DISK! You must format to continue.\n"); + return -68; + } + + return 0; +} + +int sdcard_close(MQX_FILE_PTR *sdcard_handle, MQX_FILE_PTR *partman_handle, + MQX_FILE_PTR *filesystem_handle, + char *partman_name, char *filesystem_name) +{ + _mqx_int error_code; + + /* Close the filesystem */ + if (MQX_OK != fclose(*filesystem_handle)) { + printf("Error closing filesystem.\n"); + return -69; + } + *filesystem_handle = NULL; + + /* Uninstall MFS */ + error_code = _io_dev_uninstall(filesystem_name); + if (error_code != MFS_NO_ERROR) { + printf("Error uninstalling filesystem.\n"); + return -70; + } + + /* Close partition manager */ + if (MQX_OK != fclose(*partman_handle)) { + printf("Unable to close partition manager.\n"); + return -71; + } + *partman_handle = NULL; + + /* Uninstall partition manager */ + error_code = _io_dev_uninstall(partman_name); + if (error_code != MFS_NO_ERROR) { + printf("Error uninstalling partition manager.\n"); + return -72; + } + + /* Close the SD card device */ + if (MQX_OK != fclose(*sdcard_handle)) { + printf("Unable to close SD card device.\n"); + return -73; + } + *sdcard_handle = NULL; + + return 0; +} + +/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h new file mode 100644 index 00000000..67bdca2f --- /dev/null +++ b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h @@ -0,0 +1,14 @@ +/* util.h */ + +#ifndef UTIL_H_ +#define UTIL_H_ + +int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle, + MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle, + char *partman_name, char *filesystem_name); + +int sdcard_close(MQX_FILE_PTR *sdcard_handle, MQX_FILE_PTR *partman_handle, + MQX_FILE_PTR *filesystem_handle, + char *partman_name, char *filesystem_name); + +#endif /* UTIL_H_ */ diff --git a/project1/cyassl-3.0.0/quit b/project1/cyassl-3.0.0/quit new file mode 100644 index 00000000..3db49b3a --- /dev/null +++ b/project1/cyassl-3.0.0/quit @@ -0,0 +1,2 @@ +quit + diff --git a/project1/cyassl-3.0.0/rpm/include.am b/project1/cyassl-3.0.0/rpm/include.am new file mode 100644 index 00000000..e5253dd1 --- /dev/null +++ b/project1/cyassl-3.0.0/rpm/include.am @@ -0,0 +1,37 @@ +# vim:ft=automake + +rpm-build: rpm/spec dist + @rm -f *.rpm + @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm + @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm + @mkdir -p ~/rpmbuild/BUILD/ + @mkdir -p ~/rpmbuild/RPMS/i386/ + @mkdir -p ~/rpmbuild/RPMS/i686/ + @mkdir -p ~/rpmbuild/RPMS/noarch/ + @mkdir -p ~/rpmbuild/RPMS/x86_64/ + @mkdir -p ~/rpmbuild/SOURCES/ + @mkdir -p ~/rpmbuild/SPECS/ + @mkdir -p ~/rpmbuild/SRPMS/ + @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ + @rpmbuild -ba --clean rpm/spec + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . + @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . + +rpm-sign: rpm-build + @rpm --addsign *.rpm + @rpm --checksig *.rpm + +clean-rpm: + @rm -f *.tar.gz + @rm -f *.src.rpm + @rm -f *.rpm + +rpm: rpm-build + +release: rpm-sign + +auto-rpmbuild: + @auto-br-rpmbuild -ba rpm/spec + diff --git a/project1/cyassl-3.0.0/rpm/spec b/project1/cyassl-3.0.0/rpm/spec new file mode 100644 index 00000000..a1b2763a --- /dev/null +++ b/project1/cyassl-3.0.0/rpm/spec @@ -0,0 +1,166 @@ +Summary: Embedded SSL Library +Name: cyassl +Version: 3.0.0 +Release: 1 +License: GPLv2 +Group: System Environment/Libraries +BuildRequires: gcc +BuildRequires: glibc +BuildRequires: glibc-common +BuildRequires: glibc-devel +BuildRequires: glibc-headers +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: sed +BuildRequires: tar +URL: http://www.yassl.com/yaSSL/Home.html + +Packager: Brian Aker + +Source: http://yassl.com/yaSSL/download/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +%description +Misc tools for Yassl. + +%package devel +Summary: Header files and development libraries for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries +for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. + +%prep +%setup -q + +%configure + + +%build +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" +mkdir -p $RPM_BUILD_ROOT/ + +%check + + +%clean +%{__rm} -rf %{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_docdir}/cyassl/taoCert.txt +%{_docdir}/cyassl/example/echoserver.c +%{_docdir}/cyassl/example/server.c +%{_docdir}/cyassl/example/echoclient.c +%{_docdir}/cyassl/example/client.c +%{_docdir}/cyassl/README.txt +%{_libdir}/libcyassl.la +%{_libdir}/libcyassl.so +%{_libdir}/libcyassl.so.5 +%{_libdir}/libcyassl.so.5.0.5 + +%files devel +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/cyassl-config +%{_includedir}/cyassl/callbacks.h +%{_includedir}/cyassl/certs_test.h +%{_includedir}/cyassl/crl.h +%{_includedir}/cyassl/ctaocrypt/aes.h +%{_includedir}/cyassl/ctaocrypt/arc4.h +%{_includedir}/cyassl/ctaocrypt/asn.h +%{_includedir}/cyassl/ctaocrypt/asn_public.h +%{_includedir}/cyassl/ctaocrypt/blake2-impl.h +%{_includedir}/cyassl/ctaocrypt/blake2-int.h +%{_includedir}/cyassl/ctaocrypt/blake2.h +%{_includedir}/cyassl/ctaocrypt/camellia.h +%{_includedir}/cyassl/ctaocrypt/coding.h +%{_includedir}/cyassl/ctaocrypt/compress.h +%{_includedir}/cyassl/ctaocrypt/des3.h +%{_includedir}/cyassl/ctaocrypt/dh.h +%{_includedir}/cyassl/ctaocrypt/dsa.h +%{_includedir}/cyassl/ctaocrypt/ecc.h +%{_includedir}/cyassl/ctaocrypt/error-crypt.h +%{_includedir}/cyassl/ctaocrypt/fips_test.h +%{_includedir}/cyassl/ctaocrypt/hc128.h +%{_includedir}/cyassl/ctaocrypt/hmac.h +%{_includedir}/cyassl/ctaocrypt/integer.h +%{_includedir}/cyassl/ctaocrypt/logging.h +%{_includedir}/cyassl/ctaocrypt/md2.h +%{_includedir}/cyassl/ctaocrypt/md4.h +%{_includedir}/cyassl/ctaocrypt/md5.h +%{_includedir}/cyassl/ctaocrypt/memory.h +%{_includedir}/cyassl/ctaocrypt/misc.h +%{_includedir}/cyassl/ctaocrypt/mpi_class.h +%{_includedir}/cyassl/ctaocrypt/mpi_superclass.h +%{_includedir}/cyassl/ctaocrypt/pkcs7.h +%{_includedir}/cyassl/ctaocrypt/port.h +%{_includedir}/cyassl/ctaocrypt/pwdbased.h +%{_includedir}/cyassl/ctaocrypt/rabbit.h +%{_includedir}/cyassl/ctaocrypt/random.h +%{_includedir}/cyassl/ctaocrypt/ripemd.h +%{_includedir}/cyassl/ctaocrypt/rsa.h +%{_includedir}/cyassl/ctaocrypt/settings.h +%{_includedir}/cyassl/ctaocrypt/sha.h +%{_includedir}/cyassl/ctaocrypt/sha256.h +%{_includedir}/cyassl/ctaocrypt/sha512.h +%{_includedir}/cyassl/ctaocrypt/tfm.h +%{_includedir}/cyassl/ctaocrypt/types.h +%{_includedir}/cyassl/ctaocrypt/visibility.h +%{_includedir}/cyassl/error-ssl.h +%{_includedir}/cyassl/ocsp.h +%{_includedir}/cyassl/openssl/asn1.h +%{_includedir}/cyassl/openssl/bio.h +%{_includedir}/cyassl/openssl/bn.h +%{_includedir}/cyassl/openssl/conf.h +%{_includedir}/cyassl/openssl/crypto.h +%{_includedir}/cyassl/openssl/des.h +%{_includedir}/cyassl/openssl/dh.h +%{_includedir}/cyassl/openssl/dsa.h +%{_includedir}/cyassl/openssl/ec.h +%{_includedir}/cyassl/openssl/ecdsa.h +%{_includedir}/cyassl/openssl/engine.h +%{_includedir}/cyassl/openssl/err.h +%{_includedir}/cyassl/openssl/evp.h +%{_includedir}/cyassl/openssl/hmac.h +%{_includedir}/cyassl/openssl/lhash.h +%{_includedir}/cyassl/openssl/md4.h +%{_includedir}/cyassl/openssl/md5.h +%{_includedir}/cyassl/openssl/ocsp.h +%{_includedir}/cyassl/openssl/opensslconf.h +%{_includedir}/cyassl/openssl/opensslv.h +%{_includedir}/cyassl/openssl/ossl_typ.h +%{_includedir}/cyassl/openssl/pem.h +%{_includedir}/cyassl/openssl/pkcs12.h +%{_includedir}/cyassl/openssl/rand.h +%{_includedir}/cyassl/openssl/ripemd.h +%{_includedir}/cyassl/openssl/rsa.h +%{_includedir}/cyassl/openssl/sha.h +%{_includedir}/cyassl/openssl/ssl.h +%{_includedir}/cyassl/openssl/stack.h +%{_includedir}/cyassl/openssl/ui.h +%{_includedir}/cyassl/openssl/x509.h +%{_includedir}/cyassl/openssl/x509v3.h +%{_includedir}/cyassl/options.h +%{_includedir}/cyassl/sniffer.h +%{_includedir}/cyassl/sniffer_error.h +%{_includedir}/cyassl/ssl.h +%{_includedir}/cyassl/test.h +%{_includedir}/cyassl/version.h +%{_libdir}/pkgconfig/cyassl.pc + +%changelog +* Fri Oct 20 2012 Brian Aker +- Initial package diff --git a/project1/cyassl-3.0.0/rpm/spec.in b/project1/cyassl-3.0.0/rpm/spec.in new file mode 100644 index 00000000..97d8e572 --- /dev/null +++ b/project1/cyassl-3.0.0/rpm/spec.in @@ -0,0 +1,166 @@ +Summary: Embedded SSL Library +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1 +License: GPLv2 +Group: System Environment/Libraries +BuildRequires: gcc +BuildRequires: glibc +BuildRequires: glibc-common +BuildRequires: glibc-devel +BuildRequires: glibc-headers +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: sed +BuildRequires: tar +URL: http://www.yassl.com/yaSSL/Home.html + +Packager: Brian Aker + +Source: http://yassl.com/yaSSL/download/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +%description +Misc tools for Yassl. + +%package devel +Summary: Header files and development libraries for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries +for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. + +%prep +%setup -q + +%configure + + +%build +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" +mkdir -p $RPM_BUILD_ROOT/ + +%check + + +%clean +%{__rm} -rf %{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_docdir}/cyassl/taoCert.txt +%{_docdir}/cyassl/example/echoserver.c +%{_docdir}/cyassl/example/server.c +%{_docdir}/cyassl/example/echoclient.c +%{_docdir}/cyassl/example/client.c +%{_docdir}/cyassl/README.txt +%{_libdir}/libcyassl.la +%{_libdir}/libcyassl.so +%{_libdir}/libcyassl.so.5 +%{_libdir}/libcyassl.so.5.0.5 + +%files devel +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/cyassl-config +%{_includedir}/cyassl/callbacks.h +%{_includedir}/cyassl/certs_test.h +%{_includedir}/cyassl/crl.h +%{_includedir}/cyassl/ctaocrypt/aes.h +%{_includedir}/cyassl/ctaocrypt/arc4.h +%{_includedir}/cyassl/ctaocrypt/asn.h +%{_includedir}/cyassl/ctaocrypt/asn_public.h +%{_includedir}/cyassl/ctaocrypt/blake2-impl.h +%{_includedir}/cyassl/ctaocrypt/blake2-int.h +%{_includedir}/cyassl/ctaocrypt/blake2.h +%{_includedir}/cyassl/ctaocrypt/camellia.h +%{_includedir}/cyassl/ctaocrypt/coding.h +%{_includedir}/cyassl/ctaocrypt/compress.h +%{_includedir}/cyassl/ctaocrypt/des3.h +%{_includedir}/cyassl/ctaocrypt/dh.h +%{_includedir}/cyassl/ctaocrypt/dsa.h +%{_includedir}/cyassl/ctaocrypt/ecc.h +%{_includedir}/cyassl/ctaocrypt/error-crypt.h +%{_includedir}/cyassl/ctaocrypt/fips_test.h +%{_includedir}/cyassl/ctaocrypt/hc128.h +%{_includedir}/cyassl/ctaocrypt/hmac.h +%{_includedir}/cyassl/ctaocrypt/integer.h +%{_includedir}/cyassl/ctaocrypt/logging.h +%{_includedir}/cyassl/ctaocrypt/md2.h +%{_includedir}/cyassl/ctaocrypt/md4.h +%{_includedir}/cyassl/ctaocrypt/md5.h +%{_includedir}/cyassl/ctaocrypt/memory.h +%{_includedir}/cyassl/ctaocrypt/misc.h +%{_includedir}/cyassl/ctaocrypt/mpi_class.h +%{_includedir}/cyassl/ctaocrypt/mpi_superclass.h +%{_includedir}/cyassl/ctaocrypt/pkcs7.h +%{_includedir}/cyassl/ctaocrypt/port.h +%{_includedir}/cyassl/ctaocrypt/pwdbased.h +%{_includedir}/cyassl/ctaocrypt/rabbit.h +%{_includedir}/cyassl/ctaocrypt/random.h +%{_includedir}/cyassl/ctaocrypt/ripemd.h +%{_includedir}/cyassl/ctaocrypt/rsa.h +%{_includedir}/cyassl/ctaocrypt/settings.h +%{_includedir}/cyassl/ctaocrypt/sha.h +%{_includedir}/cyassl/ctaocrypt/sha256.h +%{_includedir}/cyassl/ctaocrypt/sha512.h +%{_includedir}/cyassl/ctaocrypt/tfm.h +%{_includedir}/cyassl/ctaocrypt/types.h +%{_includedir}/cyassl/ctaocrypt/visibility.h +%{_includedir}/cyassl/error-ssl.h +%{_includedir}/cyassl/ocsp.h +%{_includedir}/cyassl/openssl/asn1.h +%{_includedir}/cyassl/openssl/bio.h +%{_includedir}/cyassl/openssl/bn.h +%{_includedir}/cyassl/openssl/conf.h +%{_includedir}/cyassl/openssl/crypto.h +%{_includedir}/cyassl/openssl/des.h +%{_includedir}/cyassl/openssl/dh.h +%{_includedir}/cyassl/openssl/dsa.h +%{_includedir}/cyassl/openssl/ec.h +%{_includedir}/cyassl/openssl/ecdsa.h +%{_includedir}/cyassl/openssl/engine.h +%{_includedir}/cyassl/openssl/err.h +%{_includedir}/cyassl/openssl/evp.h +%{_includedir}/cyassl/openssl/hmac.h +%{_includedir}/cyassl/openssl/lhash.h +%{_includedir}/cyassl/openssl/md4.h +%{_includedir}/cyassl/openssl/md5.h +%{_includedir}/cyassl/openssl/ocsp.h +%{_includedir}/cyassl/openssl/opensslconf.h +%{_includedir}/cyassl/openssl/opensslv.h +%{_includedir}/cyassl/openssl/ossl_typ.h +%{_includedir}/cyassl/openssl/pem.h +%{_includedir}/cyassl/openssl/pkcs12.h +%{_includedir}/cyassl/openssl/rand.h +%{_includedir}/cyassl/openssl/ripemd.h +%{_includedir}/cyassl/openssl/rsa.h +%{_includedir}/cyassl/openssl/sha.h +%{_includedir}/cyassl/openssl/ssl.h +%{_includedir}/cyassl/openssl/stack.h +%{_includedir}/cyassl/openssl/ui.h +%{_includedir}/cyassl/openssl/x509.h +%{_includedir}/cyassl/openssl/x509v3.h +%{_includedir}/cyassl/options.h +%{_includedir}/cyassl/sniffer.h +%{_includedir}/cyassl/sniffer_error.h +%{_includedir}/cyassl/ssl.h +%{_includedir}/cyassl/test.h +%{_includedir}/cyassl/version.h +%{_libdir}/pkgconfig/cyassl.pc + +%changelog +* Fri Oct 20 2012 Brian Aker +- Initial package diff --git a/project1/cyassl-3.0.0/src/.deps/.dirstamp b/project1/cyassl-3.0.0/src/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo new file mode 100644 index 00000000..579d14aa --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo @@ -0,0 +1,255 @@ +src/src_libcyassl_la-crl.lo: src/crl.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ + cyassl/ctaocrypt/aes.h cyassl/ctaocrypt/camellia.h \ + cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/hmac.h \ + cyassl/ctaocrypt/sha256.h cyassl/ocsp.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h /usr/include/dirent.h \ + /usr/include/i386-linux-gnu/bits/dirent.h \ + /usr/include/i386-linux-gnu/sys/stat.h \ + /usr/include/i386-linux-gnu/bits/stat.h \ + /usr/include/i386-linux-gnu/sys/inotify.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/bits/inotify.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ocsp.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: + +/usr/include/dirent.h: + +/usr/include/i386-linux-gnu/bits/dirent.h: + +/usr/include/i386-linux-gnu/sys/stat.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/i386-linux-gnu/sys/inotify.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/bits/inotify.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo new file mode 100644 index 00000000..168a5a44 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo @@ -0,0 +1,211 @@ +src/src_libcyassl_la-internal.lo: src/internal.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo new file mode 100644 index 00000000..1880a1c9 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo @@ -0,0 +1,325 @@ +src/src_libcyassl_la-io.lo: src/io.c config.h cyassl/ctaocrypt/settings.h \ + cyassl/ctaocrypt/visibility.h cyassl/internal.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h /usr/include/errno.h \ + /usr/include/i386-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/i386-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/unistd.h /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/fcntl.h /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h /usr/include/arpa/inet.h \ + /usr/include/netinet/in.h /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/netdb.h \ + /usr/include/rpc/netdb.h /usr/include/i386-linux-gnu/bits/netdb.h \ + /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: + +/usr/include/errno.h: + +/usr/include/i386-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/i386-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/arpa/inet.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/netdb.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo new file mode 100644 index 00000000..f8a4c098 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo @@ -0,0 +1,211 @@ +src/src_libcyassl_la-keys.lo: src/keys.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo new file mode 100644 index 00000000..a525cfc0 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo @@ -0,0 +1,227 @@ +src/src_libcyassl_la-ocsp.lo: src/ocsp.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/error-ssl.h cyassl/ctaocrypt/error-crypt.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ocsp.h cyassl/ssl.h cyassl/version.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/asn.h \ + cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ + /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ + /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/internal.h cyassl/crl.h \ + cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ + cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ocsp.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/internal.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo new file mode 100644 index 00000000..e3e2a184 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo @@ -0,0 +1,277 @@ +src/src_libcyassl_la-sniffer.lo: src/sniffer.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/assert.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/time.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/xlocale.h \ + /usr/include/arpa/inet.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h cyassl/openssl/ssl.h \ + cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/internal.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/sniffer.h cyassl/sniffer_error.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/assert.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/time.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/xlocale.h: + +/usr/include/arpa/inet.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +cyassl/openssl/ssl.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/sniffer.h: + +cyassl/sniffer_error.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo new file mode 100644 index 00000000..739c90b9 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo @@ -0,0 +1,240 @@ +src/src_libcyassl_la-ssl.lo: src/ssl.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/errno.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/include/i386-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/i386-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/internal.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/coding.h \ + /usr/include/dirent.h /usr/include/i386-linux-gnu/bits/dirent.h \ + /usr/include/i386-linux-gnu/sys/stat.h \ + /usr/include/i386-linux-gnu/bits/stat.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/errno.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/include/i386-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/i386-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: + +cyassl/ctaocrypt/coding.h: + +/usr/include/dirent.h: + +/usr/include/i386-linux-gnu/bits/dirent.h: + +/usr/include/i386-linux-gnu/sys/stat.h: + +/usr/include/i386-linux-gnu/bits/stat.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo new file mode 100644 index 00000000..cc9fb0cc --- /dev/null +++ b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo @@ -0,0 +1,211 @@ +src/src_libcyassl_la-tls.lo: src/tls.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h cyassl/ssl.h \ + cyassl/version.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/internal.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ + cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ + cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ + cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ + cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ + /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ + /usr/include/i386-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/i386-linux-gnu/bits/posix2_lim.h \ + cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ + cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ + cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ + cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ + cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ + cyassl/ctaocrypt/error-crypt.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/internal.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/crl.h: + +cyassl/ctaocrypt/random.h: + +cyassl/ctaocrypt/arc4.h: + +cyassl/ctaocrypt/des3.h: + +cyassl/ctaocrypt/hc128.h: + +cyassl/ctaocrypt/rabbit.h: + +cyassl/ctaocrypt/asn.h: + +cyassl/ctaocrypt/rsa.h: + +cyassl/ctaocrypt/integer.h: + +/usr/bin/../lib/clang/3.4/include/limits.h: + +/usr/include/limits.h: + +/usr/include/i386-linux-gnu/bits/posix1_lim.h: + +/usr/include/i386-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/i386-linux-gnu/bits/posix2_lim.h: + +cyassl/ctaocrypt/mpi_class.h: + +cyassl/ctaocrypt/mpi_superclass.h: + +cyassl/ctaocrypt/dh.h: + +cyassl/ctaocrypt/dsa.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/asn_public.h: + +cyassl/ctaocrypt/ecc.h: + +cyassl/ctaocrypt/aes.h: + +cyassl/ctaocrypt/camellia.h: + +cyassl/ctaocrypt/logging.h: + +cyassl/ctaocrypt/hmac.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/error-ssl.h: + +cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.dirstamp b/project1/cyassl-3.0.0/src/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.la b/project1/cyassl-3.0.0/src/.libs/libcyassl.la new file mode 120000 index 00000000..9b9fbdba --- /dev/null +++ b/project1/cyassl-3.0.0/src/.libs/libcyassl.la @@ -0,0 +1 @@ +../libcyassl.la \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.lai b/project1/cyassl-3.0.0/src/.libs/libcyassl.lai new file mode 100644 index 00000000..8f138174 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.libs/libcyassl.lai @@ -0,0 +1,41 @@ +# libcyassl.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libcyassl.so.5' + +# Names of this library. +library_names='libcyassl.so.5.0.5 libcyassl.so.5 libcyassl.so' + +# The name of the static archive. +old_library='' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags=' -pthread' + +# Libraries that this one depends upon. +dependency_libs=' -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libcyassl. +current=5 +age=0 +revision=5 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib' diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so b/project1/cyassl-3.0.0/src/.libs/libcyassl.so new file mode 120000 index 00000000..5044bab0 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.libs/libcyassl.so @@ -0,0 +1 @@ +libcyassl.so.5.0.5 \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 b/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 new file mode 120000 index 00000000..5044bab0 --- /dev/null +++ b/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 @@ -0,0 +1 @@ +libcyassl.so.5.0.5 \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 b/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 new file mode 100755 index 0000000000000000000000000000000000000000..0b983432b963add2c19a03b9d5b42990ca55e01a GIT binary patch literal 179656 zcmeFad3;nw)&_iU(m)3SH(zEayz~CPKfb@d z=fWH_}q@B;e_e$C|J{;hBh;7D>*GlNu*=jU7Jr_)Fd%qpK`; zC*ElLKB1=+X}Q`eMGWqK?UUKBBu0$O?$T%Qh=lZl#Hh)$H_p!VO+J3_vHr6BmNj8a z_ce95CAzyzSY4XnY0>Xaj2W}HkDQjfW`qj82cCs^7UALFVmwRmJb-5@ zo`>)(!?PSu@NWeG%AbE#Mj%xq^x~<-^Dv&3cvjv4I$M8Ik=LtN2#`6@O zr||^;{tDn3JkQ~IJ{XDc1w4Pl^CF&?@odEN8lJcC)Zy8LXA7QfcpC8Rz_SaF4^J~5 z{_QgYX+Oe4CVT|pQ9N(sc^A(yJpB6*&qsJZC1U=4W`_R`Mj-qG&zC0tH9|k0+ZLU8 z{KdCcZXVtDg*xx8kB_`E+WTn5o=0x@-Mc?}xVq~vwxK9<)KmU?d)5T`E}d`dCSu8ZvR%9@zJX{Wd8NH_m+P4TK$0y zFZ6x&S?fm^7fqk|@N-Yb(E_?sM-g8@K-aZGHY< zw#Lr#3_3Oa?t2$!m2TZIIJx!eLSJfa%DM$#?0VzcCEK6+p99aPzjtZC8|!9Y`}-H1 zx9w?p@coJvzO~&3H}~!H#>G#r|NiT1|M6+7G6KKq9+U%Wr-g+Dk4t?GAIL*7IA zZP_RLO&#ukX8u1bZ}|R|9wq0uTz>x1x4yM(KG)RvZrQoAlYhGZp!@B9_pAHHmv4<6 z-LG%tyr@qe-?00Ok8>U#bZp0u_c#Xi=(c0vH#646^gQSP*V2~nwO$q3O{;6R{QHkf zE0U7pUcM~b-*?OSwv}rSef-0_6@#wbt_=#j{e7>Bx9+hl_;S(Oquzh)eXgdTrTxZ?d-ueyiG!a#{N!IVUi`f0p5yz^4FA^pkB`3@Kfdp{q6Po> zaPX54Khb)_#KfWRTz*C5O@AAFx%JtCm4AHa_>%m#daGXkeZOq^iCzcS2C9@ByPdv! zR?{na%D(p}CJq^P?6atU^`7&uf4q&f`PT>G(q2JKl88USMaTRj-bV>yMtXhsj(BFL@_pNrr3Ao^PV`npwPzsx z`JK|Ib)vT@x?}#-PW%*gD&MzL`j?&B`%))*^E%bHx>I^id-c*afa^NZukDn7YbSbd zb;9K^dI^A+cPj7h)Sk7S(wB9@hj!v;X{YjgI<^0gozlPSl>S^N`uBF?_k&LPhjmJ? z?L@z-6TMxX^k;FW^aY*pCp+P$nI&qa{v7T^?~P9RS0azCOqRa0P=9+!GkQu=@9wf# z%ZXow_SC*1NfaaTv*3SI7_Nc-jg68t*-Tfhk~IA%N&1tC{}y=fcVLsDV_E(L^!u{? zk~GdtUkUoRpOTPbq(9zOk~U-Uxx&N`bOVe9jdlmi9|3=jiY(S?;ww;IZjvN6i?|K> zod+c;-^5>oG5JG_BxRWR3h+_=7g=fzri1?%_DNEziJu1j3zx~E`tF2W?mjI^Ic9o) z2x90BvaktQ-!AB{a-A&JX5wSfzLFuxEb>Q5&wzd&_z$*k5$YcSgOs)q^VcB%bjV|< ziGPRoA4dCon|L$i*KfBZ9faJOKON-{ESIGx&GaY1-|}zT<)xs#WnaSPKtASw4B_)= zPo9}S1?lPA4I7H-&w{ZxA&ekDyFl+e>IWO5{5Z&WR9Jssj`Sy&%2K_VejDWherW%Y z-UQUATrCURi};%$^jTPcrh#5^7`>|?pAkPx(sgF}yU~A-!DyLg@_!H=`{!=5^s$*v zqk7LDWN8N4LHb`JeHoMsT`ceu=#QaEvUJ`oKMeH$0Q&cs=?_BQHI0&lY$E?Xpp%dO z>2KnZNH{(~7WO;o&jFpS3GMw=2YlinS({las`K7{=427grrAcDUbDNf2ne_Z}G>NDvtLjHZw$7mD33-nH5{>e4@@k2hj zEykXT^tyw;85rabo9US-U-Av+SQEb+_36+rmx;fM{HHKK4>j@i=&xw>N07c1`A?$1 zg5^JfJh~zOWHbLZgx4K3_I9kl5A>s|hb;Dc#1+*4Jmwd-nV<8NAN*CAcq!WTzFQW1 zNalY7?f+uGvCkv^1^D^R5LrT(34JJpKGvW=fC~H+_&<5RU7io4{AXv3eHF`>Q@+s8 zsb>Bj=%2NaN3ee;V?KH&OnzqQ(YI@}~l*=G5(2>*=nGSb9HLmt~tK;|a? z8Td(TY@bi&10M~3g7Vyp`rq4!F=ysKfUYloqkTNCL3^JJ8xKy%Gad50-OPUs>FK{| zUtexS`_j<9iDvpE;ODV_8hcx|zZ=^3hp_qR2=bTQ->z>@K!2VO)9+WH_dkMvsF{%O z8MObgVY1lQlHMZFyX0@zH;7VN8piK7v~M`-pJ|qlLD={`dyDjx+LSMdaZeQQ}fc`P8-?Pp9Noa2j*2AE_yBP13rE4HJ^4pc7#Q6BY z%s&|I+ZQ$;XCu9Dl`MP#%-;xp3qUWZkH3Sw;!i@y&GHctd=2!Uwi@$e>XhE7l%+-! zABX%2kQX;9OkWKC-#I8rs8ZncH>F@b0SSTcNBegn|5YY_ANu!C&^L%dq-UbOo?-Gj z2K`@x`R1k|eYA5d_)9eL9;j~^`hTH`4?zA&2ip5D8T$DS)=P*@(BDdV#K_W2lfO8m z|0^s#8T?H{{|q(r-wJtM@u)0~G4r>Azv*G?O#tnG8vMLu<}XEo-yzUN@*Lvjt*Ck0h zVWvl*KR*TiV0(W9d}EmX@GkiMJ>(BI1ij}Wk7vW$a})(PK%TwL^glzsFYd<}H*qOH zfA0L!1^E?@f^tWGzLZ}yZ^1k%e?s2G{5gf?g>&asI10=2CXOvBT~L@;Fsr1{Nc;7a z{Mm~ONT8r(-UG;Z+rs=QCWWyj1r-&A71GqHIf$z$b(YUA%qlM|ltvd;jGZ;xUO2ma zNtwgM#w{?h^4V#*<)yO=D=MV1c?G3onP*&id1?7nNBO)3bEUCM3P^BlVYy>s!GeOh zh2?_gFQX?FE(&H2&oRCb zWR`TNR21A^xI~(;V4h>*oZ%vz0yc?U?gG*#Jgu;NUeOYhuEDCorU9Fr0tv;MQTh3^9ZSjz^BtunrHcy7^C`{wh4W|6 zFB3u85(e{27Zx(CfZ!_}R9U`U{E|}9H z;#Vr2aEFNOKy8krBt)5T{@g-G{%mJ?dEo*_zGL3}!cu2QN15cTzzE1+P`Y52P>}rm z!t(M3rIdDoV_xY33329keYxH7L~%buDP0R9H2Hnm>D9Sus@}vu1cjOqyF>>MVnRDk?Bfb)dsk z%#9W3wfxxyXhHsbj@vLsnWK{m1Zys*ZpV{s6D!BZNostt`_7{nFjGdbME2-la{O6KJ z+J7jRBNXgcDE?CS+IcZ1&R;2HB#h~(XegIkI6tq{9;SRHg#`J<0>_}yu4sZNCPo}-ZASBg|i)EVKMc9D^`%&?S+M9 z9g9G%I`cdgGbx%fc2>vPb*h*aCfI|tkS%Y1nLRrUhg7Kf!5CArpjCltLR=Qio?VF9 z%4E+N<#S5sQ}4p3irJ+L7N9AidY=8E&q|!w3rf)V{9;TYrRAaNiwVZ$5@cD#n9IX|OUbWr zV&MxfDHJ0-qA0Xzk+3-(g=eTJb~@&iE(&!NvtjZH@4I;wLKMP;tSBxFQ7oA^tGu9m zNe4NJ*)?3PL-GilRw4EKf;^OA=?b&?%CWo$leoMEVXkoPuraBY7h+Beiw%mh!#vFn zon1P=tlXH1+i5uR+hxN{zdn&OrIXacR3w~Qr-j>8X=a8vu@r^!b`p4}X}jZs^}kQr zol}2p!d_H>`667ZB4QCOrXWYZM1o>pc*8Gk1FYzX?zqs;E-6J%%qy3Q1SA!eqFbe+ zGN+?L!Z<*e7FDp%iyVa|B@z>vnF&U?XdZf37>EU-5jVcjkv+d)b{=fbAfr<;&6HFy zb^_*u&?ui@a9?45VL=(~f}pxB9QGerM|?-#(NTsSl={oI1{3~6iC?jtf+p2}DDexs z$;jU^HydbJ--OU;%$O2E(-JpT%M{SWg2l$(A$)VOq`i0Tg|nP<=hCRWBP%N?$*{;t z!8lZuQz~-8AS-hevwQOAI~|3Kv1LT(lrHHME9S?J8HLT-G0F*h4m%x_=_!RB_F<@V zH1}l%m=r6d`9>Nl7JIc{?1nn-VI+I;=(#lg?8U)N6<4qVXcm`4dojhv70-Z5O6N*t zrHhao@#Y@NUTjKt?tISc+@~U9!Zc%77y>)(4~YghT`;M+e=&*>Vx?ngtxj<+$OBD8 zIUxKB3A5$=>nlpHzmbqBBH}5;XB#Q``HQh(cS!k#*e@1f4?nA-!q~zi3PXfBmteld<=ef zhUill!{zX6Gen1a8N#9XFvAqwS7Qi==%WnRO42%pm*Jd&A>_NBA>{iU!^_d{3@5_J z$`HQDjSTzZT$tfs;h$&d!Z|3zJK^7FSPwrl!$~-sWB80D?PrMoIn1y>`kCP)=x2rx zqn{bVk$jxt0Q57%+tJSqI4W}yEW?nVDI{0;h_;Vkq&!$kBy!`bM6hDqpuhJ(@n42Piq z878Cu8U7ai&+tR^Kf~+M{|txXEWv%k>i-D}Te(w9i;y(;$+osOPotxYzi%W?-ga5< z-6^%b0R@-Zp5=JsU)!@#JaMB^YB`SVZO=k+q+%ww92PhfLMmotOQXOs;G|;yv}_bO zI!G!`AiiGU1dGussb#gmF%YFBLh6 zoBQF& z-zadNv=*-?zFy!niEkjjTHtetZzS##cro#M;$;FaA>K%QrohXH?;)Nma0l_j#4`oH znE3m|Qv|-0_;KP1z_obW&Z5=r|J|v6Io1C)+F7}C(e)9M`$Vknu0aX?kt+Nq9d@7Z zx~QvrSM0sN+o`$VK|ZV(C)HS6+u=Zq?zm18<^Lwi-xMs*lELy#=Ofgnrj~*7o+Ia- zK|&f8&9fJT>^2LD9SMA?zX?kW_jAb4U4q`%zZLwr{)hA=r%iKzVbtGCbGs0wT5SH8 z(PjP-i1xXeOEx$qWBOLCq$a&?g5Ki>J`M@?_8o`c^X@aS&Wq)TmTHT6|@|KkqA(*e6~ zz2vm%?i8#h!9;CxFj043JB2Wn*jIfAenF8M%s>Bf$WP76*0XY&vvL@t)ZGzLq+OxZ zHB3YvrS6qU2#VA^TcVm{OHfN}@#<1r99y1Pgcu9Du-R^lWl@ANW*BXToQWiV7JiDF zt2ykzc$Nh)hbS4bi_p-7$G^q}j>h`6=(xqbQun%-WlQxJ(W%O~Cikx7-{(VtA>mx~ zU97TchAl3&&Gl2{X3}x?s%ldnYjU+kD0LT<$D2HjN>u?UyGKZhhZ55AY-ygO%40iR zOKmBV@~F>x3{Wy4yDif7(~gc@%j}j>)L@Z3ZOWrf)>F#&yMUpdR9Eapn|a|7 zY%vc?Dtfj>wKlsfRCvaVy#*o6T|>z)hBNYA;jR~19KAFM(&*BbA6X$b8?|c!U zR&}zaxl)XGkkHq}f~>kG2EWafu~@qJ*DR`Pu6z=E6@gc-4nfa_pba7DB@^;iZUp43 ze2qB7iX|@C+tt4jf=%$8RjU4kRCj}50bQBJMhXQSMQ$4e6OKMwHF*jqB_K(wCO^TL zULuCv1Y>^wfqBSjFyM0DGtMeELXu1jM)pG!0jleG!2mBi4<}uw@%^SjqAHhICaUm!n1SN)`ln}Hy1UW)b zSqLgIA+3fBoLZd&8S2%ER2lJ$q1dLcr198X&0pfp)oFkXE>c2JMhF^VLTWXaPIV>M zm*(nX(L01n0DXkUHCLZ7$N&<$1Psd(EpsN)BIlo8{SwJwzPa%Z`_-k0q#vi>_LoEE2Igh(E1cZFWS}Uhm3BAdK3~NN@Gy z0GhKzvak9%im18zDN|C8C|~spgagsFHMA1E0$bO=+F4t}#oJr` zcfdZO!3fr{ys!EhBY4&b{>Y%YnuC^q&DGp;@ULAIkWQRP27p_g_yfSPBmiz%1Yk(e zSIyg{DE$ux0?I>^n7g@pI-pDe%?QQK6b)wToDh^Ch%-)@PAGvIZ6dO^W;{Y~^}`@v zTSH^QTdfP29qz4uRKVi|{Fs2V1iV(j69l{tu&?@0_(kvp1KlkjzX($)11xAYLV>EW z+Oyg}GhK2mvtCjjt^Ny;+8UZt-s)EcoGW0CdtbGfrD|&?i>TK{)EoFk%9{*MD>35} zPAk2ue}>i&NhA`DBqAw9EI?ch)CkGhpRpqt8*66CBoYtASG|;3eAN#b!7>KT)m{X~ zP^n^sh;x|`T9PQ_tJdWr4BBCY>O+~ABE=xEI0QLDP+1VlG8V)vV?oTqf|zA2h(QxK zfpz;}={9GH1<{w4*4CUQTspq2;Yhg|lFfqmvpMS~X4OkAYBEOA$DCJ%8K`*Jg>B>G z8Bc#(v&F`Jm4A;If2v?wslp{wjz7%8R;Gq#<7Y4)HIc{X;`WTixjgt)vp5w;srm>h z9KKV(H-;}QCFJBB;LkU5W<@JiZvofu$Z0ovts=)?zQwF$v3Z$06}iJ6=pXFu2NUWF-x=Ch7DGN>Ij&~Oe4oMF@i>GxvPqRY zPY#TbKwMa9+228Mc3ZsXEIKclR1gZKsjaecp7+{qgH*qFj_o=?zj5@|YK|k5o-M1Z z2m}`>S8VY1@Ey=+N;)3%yfVF*q?0Zl2f#bJMA zMLXlci-qy)p%TCofLnF?;BBdHBI>lq;1iMx%i1`;7@q@zRDPjLKQmPVyAu)hl z=*(RH5iC_@>1 z?cUx2L*vQ$PUd%+-i~uF%)V(QWl!IgBn%DoMFvJmI_3rHdgMUrW(7+_HD~8SDFU8 zm@Y6PZ@~^X7JI%MG5=;x=al;n8bTzO$bJ*SWE_*7jhL0YL`?7Mtq22_psBe18`>N-GtT3(9glUcblKcU4c+Y|hHj(`zmT?Bh`r5mqgI;e`F5F2Uu0?b0Bk`k zn{m2|Sv^Y_mTsSQqVv<{@rjHRPhEGV{6r6TUg5M=o(i;M@?dV{#5vs!p2QJxifZLu4So`1Eb(cNJDbQcN}g%d_}dO z$-qBX1Fb;G@!OyZ+NgpblXM3aY!Ib{mWoos26W_xMtR2noB4(9FBF7>Gm9p+8<38T zX?u|tiV?%=CXt&1jekLjg}gSm#+e$@mBs(Tr39^+g@FLKNN6JqZwoiFbh?CTSEN}M z9y?<+I!D1C;v(+98oK3a+)O*jab4=(X3HMd-fZ6^_!#ZJ(8U=ry(OxUTIybP&#x-l zQ&$-MuWh6#Qyan7t=h6gcbjGTO<1`SIbz;GM+)mJ=aQv@c9Pga*gk$$ukD z@};({#MH*1oiJh2c`98RE&jnF1n$Z zX3uo$C;l|cCiOe9x{IAZI~H$&f!yNgajA`?N)wfbC!xjeUGZX3?9|vnebLyZwlok( z(eyl4_}EPRChbdYOm9`(PlJ?vLB(8_1{G6%p0lReTg|FHEC8+StLfyGOTSkn72Pe-9(=peMUsQr2T1s*u zb%OeUi&#h_2C}efxt39rEfsJI2L@^VJRdqPR}ZS6j=IZI9-|HPe5hV>o>IF7tg0Na zs3X*_>K>X!Ab>*#DN@>DVOt4bY72ue0uEQ5W4(ovqJfhCjZaK3a;GWhb>xAtM^NbU zk1A&N51?7<4$o0@YI%l&#TEw3|0#z}tFdELMAl^DH%vj)WBv$Kpq@tiM!2>ccEBj^ zWOY#h@`*Ky>YHeHDRrxa`DL0#U7;^52@Q#(lrY(dY(`;U4e7}~OyDuQoIldDkrk!N85ax;SE7eD%*k&7klyQ5~FVx3#8uB~^95ttb3k(x2$(aPq zCj0f34)`*J6$w37xn6%Pctx)IG!%8tMaC5QV&p5_f2Z%RzaEi`rl?6l^FG#a26jzt zbTtV7mveZakKq}N3dK3D_ErB84e1`Vbb1%H34fpACIn@e5yp7xG{#RWXki{&w?&k9 zUJZ5XzNv-~m~oKNkNXoI-K>3(nA} zas>J-O?!pQht|La!+jybn`7$_-@^d4njSTEB|U7;ZocZL$)|1^>S_>fO~(*dgCVkO zbd*qqkH?B@dLgN(r_>$(@tEQRS={Jix@YPZ3QTSCKY<%~9l5pdmUvX#A4j#_x^zsk z?B;QhENlX!wX)fYmbcL=3aj$ON1z-udj|A^zh;Il7rW|{h}McNl^3}VIbtd=Ud_ z49&;^r&8+P0NmfgubkSb9tvC&ax!zg@vm9bN@)9OC{AkQwwu6LhDE8F0Z~~4}bwE#T?Dr@)9x|39_Cmt7}HgXO!5=Dpma$vz86272a+rZ;77Ky{gf9W9?lQG^p5{YtgPyW86($R8bPU z%JHa3*t=`90m0-|1Uk0)DOG)OU)NR7^ODGg z{adWSs`e@#NyLid6UB1|6FAP_OQ89V1x4CQ9)c95uVh0Y^_f_!X5jcV$2J{Mp5h*h zTWZ=+ZMj8@a$gv&3HHk`Q_tx4H>RIdKfx54tE{*RnbMmU4x9i(@ni$WhV=GV>Zzs+ z1F!z>>I+e)RG;Gc372rTDPXv$vNg-D)Rce?_D!wT_1Vv^3$fdNi!{Y^C!&4T_;OKD z{~~d7g53UBtrGf=(jom9lsE(}rn>`U)6kGAoD`$wY;w^kA%F@@aI91|XE&v4GkgH9 z2EmBpc?pQJNhmqSe@SgtYDR>!zp`oBE$S(Evo$ceUGrMFKT+zI4bPCBBh-`1rm_sR zDfK9tT2gfGY?0^awr?@q6;BCHxyPqpQpR6$Z5B&KJ-Cq+`$_p+AVNJQa*aa6m6|cg zsUCDKOP01JlXg`qB8(9eDMqtWH!a28+Rbr|yVc?xtxdC`_ewB&qQR@Nn}iAa%m-MV z258d~e=Tv)F)j^Dl3I>oS#!6-=X?NwHZ9@TGA~BvT5%3t)mS?zl^0c@gMD#LqYs9j zUD-4#Ll(pAH8~K+7_OcQD9zD&yLVXC-mgW#jg$wp4=kJ!MoaYA7$7O;Bmpo3#|xZ| z(YWE%;jNGk+LH!BW+WYkMG*sxmT3xGsoQO32$P_7s(bXMwleJRKdBu!GCl_PYLvPUyO)O;+-B`9nsneMQbF3W0c?;NrEU9v;FuZ!wL) z%ye8Tf-$jO)Ia_Z>ar7rK4d2C$wrQ3bAnCb1dFx13?T&vveBJ|2WCpDj=m;4CZee$ z4O<)r7Nwn0+I^gIwa7pmox+WsT^nF5<(vkQ@p9&?BDE6S`%$P6SYg!DY< z%A-51`;@Agu&k6in2u3-O#ZTWg(X=69y4`& zcRBsMdRSRC6onvb8;@H+QEfVR1R)i9L}ZRFV@M8q3vf~silym!-P`oVa_U~R~UVBM&ku{TDq`%YFc8BxxmRAkJWd>o^=Py5O?gQGC zl|0${@5Ig0A>uPZ0mK7$y3fnbT-3gi?E~L8fp2o{XH*(jyWxF!1{s&MkMVMJ!Ow+QxB#d)y=Lx$1zdcdn6_e_L}^*`?M^d&K!LQ zW{soDqm3k+{!h*nO-fZUNVU@zOQ|Q1!j&#UAHT8aoacwc^HxqmQfMMaFFVhAV4TA7pM53!_imz`&Yr zxWD^hlJkEJ$1666w0hd_iT5-g!cy5E9LWG_f2zB>j99*`H1{i*J0%JIR-?pV( zk8A#l$|0B%t${`;Cmz$vjP7Pw&X~2k$!axkBVdE2u5MRk$QHV(v-84sqE0ae+2mPhPVbJ$C z7Hjl%2kU&pN%$^yr|yM0U&ZtDmQ@s7Hho$nOhY!B`%0|oIT4(eaho6~0=o&+3G#OJ z3>mS25k_^1I#;Cr4-Y;W8>Q6Ei0Iz*RZP>rtx+OhkEl;D-DK)Bx<;$t0ZQ3MpF#Q= zr3TJ@?)vEcDq)GwtWl>h>Dx)CDir)gtXFUKA=y|5T}_e_VTt zCvlOqPnN<7hHJzSORV}MNZB$_X$)EsjoI0-ui|Y~b^m;v%&Q(2l(%uapniva;B_zr z`|557kG~8NEJdv-CX{JOB1ROd4*}yDIuw=Z$SI8{c{%cB!&``l&T9D zzStU841)%}j2(q%uTu30w)bdX_iNj{Li6?XI2Pu^&c$dTIDHuOI z7S$fM@lZs2)W%lfv>h&5eZ@MI+KezF(6?$YUJqn2|Sa0I1Z}{GBn-)im&#fZ-O8X;8dek!HMHVGKU18EmN-GsGrb;B=iyY?=Sd zgU}D7HJBW(k8C=QI`Xc!MD2iQU=M0|RM_{1W4VSeNEbC%*{J&DB4>CP;kH>iyld2< zB6nMYQu77n4~rkO`*6N)2r-^^$ux9LK3`>KSat9oM@u zk|bxGvgy4d&5gN1hg&b5cuWU z6r{)bP)G}+PVv`ZV*vd~3G@tQCF#fpRtX88-Eh|Bc-+q%OJ|ol$H(VJBLPtsfw+UFFPWDZQ` zGDt_Il`ek4lToGrSsPv>-o;TII`^$SQNr%zt-}NQV;s5qRvWF|%~!D6V`rY%-^yVQ zoLwMg9aG})!+3EC8g~V;%}?AsKt!6e!&aLMWpMLq=V#~eIpS@CJ;xw+4Z6-IB$8~y z@O%IS)zfAM#q(Fz#QBL+rg1{RPE_CXN3r)j6i&NLjmu^!$l(75!U^5hi#0ot!V{_c znObGzk*`P+m(7}?QvVCZb%LUK-z=sx#RrfIk?;tZwQ!vJix3xT9ZqtKSV5JL1dD5s zAUcfM*(U#{U#Z_n7Cf(GGMq4?W+Oh4#axIFZwnRcf2TCbpk%ZmjM9z2phVty#n(T; zC}MLr221%95v8_*qd5J|Fa>!JituK;TEIL?IP-k%MDd=T)%8%+#YORf9(={_av%{4 z72RR#3UbDudA@QN)i0!t?h~Oa7f=5PO90DBZ4I{_aDc^OFJTq^@y4h`xz8ZF=;8VsBDu+WY6={ZOvhKZ3ISJ^M_j#cDXO@Tm$( znEwfarn(a6^i4dckHxD@OzpnH5tIr#Tuw2@C_t;jt{I9#K!8dtZky zAob|EQ%S-vsV`Mz3}E_XlLap`Y{lyNB%B)@1{?8+#?`Eykx{Lz{(kF2}}e3U$^X-5LD3j6!CUr1KF2^VO>k2PofDTAk}0Q8z=Zr> z?dVkOeB;$)INUF>rKQqsnBawbD>MD@!gEMfPiI6pMuTpe+)T2O5T)#6rO+{+21IiJ zsnIra2dQ%IqfwNi9yE4g>M1C(!?h${svnGz;`qIKkQ{N-uGCFRQO~(AbaM=LU*G~p zt2)Jbhc=#9NGMig^KSIC|H}sK1FzM_b1vl72!UGjF4-PKeO34vw?#98#32i)& zD?1nSPeu_O$saIwilH~HEAiENP|D=pg_j^UN%5?Q_PH9?0f}&4v4wGAy2P1J3Z&xT z4cdoImYyByZirzf2UplcO}vgH?~t3&C>yT4a6`c<1kyH#T0M>*r0qCw$MMp6J^2bQ zJ}L%m!~4c;l|b!>cf+^{04NU1wvqFq9(_INi8l-|DdO0PqbzhINtvfKq%4GLFXb2<<+PoQf@F;%LcJp^3p`I(c?zgG6S+RdNx`;hFO9% z;RSg1Tl6mWizY*k{`xd-m${^f>HmWN88|fD%{>Eg`ZP<&6t76>!bo~e5>yQO3+ieA zM$FcoZm)z_nZhdVQ1B9TxM=}c-HkonyUzr=x*NN=cmE{&^crCbmq66U;Ps#03Tv!} zW-}@b#m<1z){f`S)#_Rf6X?1?_l!tq0^o>+{VSV=-5ksgL-FH!u?XPH105L**+P$; z0CU*7)Q+}pqud4IB_P~S5WdW{1cZBPqob8g8@@xjdp9roY&Hi5-+eQu^bR_#9>hHq zD0v(np~*ksD2Ou;R}n3^mPczVO*1M+kEYi#mTgB*;51yq!hSP$FW@a28XKcq(tVZ) z*?lO&XOEEO+AL%9zD#W1V;9}W&AYR}wJeG^17a86i!0g6CKoxz<|F53$!qKG#Ss(+ zMTC5q?4=Dch4JzspJk-vvya5~!*ErD_TMrhb_G>>uGw%t=%=BUfwfDh7cil^3NxOPg3Ep!h3qm@EttGaA7yNti4!&F?(olSZD8Bf&@^`N7d=*lL1Kd-D zh6ZlFnNA~TTIyccb~=$H=a9f}pc^9s*Q&3w1?ncYz{u63Jy#brRBh_$Y;vCnU7vfb zMaVNjTV$!cM2R}Cz;(>aDlgI1rFgcXqF{f#K7- zHh|&dx_03SgsXJzD~2_?whv*;QnXIj>ImL1z`qitYU!Fz@LmBvNHAA`zb80OfMW@c z6ksaBp#r>?AU6QI)`MU_0e=4{fV~9x9>GWf`UsxKbf#->666gNUHc2c&jq-G;Clkh zC%9jL*#w&em`botfbj%h6krd6>jn57q}}qE0QVED6`=odfXfB=EApCB>L#Jc7pI81;G2>wQZGYG~D@HT?I1vs2wR{;(r_!A~R2#VlI z0sh2_zZBrp1pg&KmEa)(mJ-}0z=;Gm3vejGR|MFH;Ijfe0=;WlC&0fG)CKq;!4(3$ zk>DZ$4kTD2z$k(R0&IXzw@ee@djxM6;NJ=IGh({-CxXKTs1Y12zzTu`1$ZyPSOJbD z7$v|&f|q_K1&QDp0e(&S`UQA|;Ku^oO7N%v7ZGe0;2eTm1vr7=YXTfa@C5;0OYqME z>`ibrKx5qqZP{Oj3pSOrNEv*!cH7{QILyI6l1)3;!H->x0PMO&{NqVT84OH!&v+8U z)>ytdY&lo?d%Y#*_bQqhh)h5nLtG&hq1XTbrxy?Qr)_X>`9J$A%Q?EM&4{rjoeT70 zNE7$x*HKHeyDg=jt|?{gd9jMZ3^4cQ{@dTcOwpEtlX+aZOltPoGm_C1{f(uVHuM)a zLc_Fi!u1xmkr!UBS#OFudyjYfEbiSFcU#wG@3!nDWA2$|(}H!}CD?N&>F(K`Qf@X< zcsZ&J_CUPP-W%V%=^2hT)^>$u(Z#(Z0%k-!WE_Y0>~;6tPL$5PLUx=(kReubChP9` zoiZF18H{#9ILn4s5%!&W8b&UTXBG_*w&>;JSVloERt$Br=p|jOt}S9`;kbI7wt_xf zrB1w^kK_n>w?3{PglOZ=D$s)vH(L6*D9DgbVD&xK=f4}LL9|)AqcH5x7|k$8DCJGY z7K^ueXx-5?rD$QtJ#$8w;Sf0Q@+Iiey}g!Rwd14Icijgfy!KwOT#B^u_?*}H?yl|P z>lkXQ;}-ZE;@DHTO)hxl+j?<$-PfLk-c!eSt*+Kf&KUZj*({}I6^I5dbG1ea)Z+pw ze9{kScj8M7f26+hFzP<{4s64%5g-$Zc^J<6p2(nV5*aXoAgwFXy0u3l#)_CIZDMqh zdo$@sjzQ46MESICkBLq_TKjPCgNXD-$BaQ9Wz%cSlYV;X*X9Nn{TYM(Hf&1tqv7$# zD=;VEamQrD7o9OGguRG84_}GPz~uytozQmL=izZrH~B5v=;j`~MZ%di2Ycm-40KM= ztjzud2-8RLj0D>804nIjLe0h*iWl-1FFAR7B6Dq4cjKtaJ9=hq zR*xWDU>tijyWT_|PVlaV5oCOOBCDx-8$-k0I8zhf%Fx!D{=!%&O$^+`83@gjyJ!jJ z*=VsyT>Lv`&%Jn$ty#I_f-+$b-n8-z2PyTC>D{i)y1`-b?g-$P#_JKdQ{0XJ5US)o zoO(2)t1|8g)QBF+6g_$*sz?j>=WH|lIes0Zmp*3mC68}-*ugitJoM^>_QE#f^$s03 zlA!zMJ~#$dp;yxUH+(Pl03#$vKTbKiWiV!)6mN1jZ%#KEGmd&VK=)t@*9Cbu9NTCv z7B_LPgZq&zG&8tYEwLp#uHt|~=0q_OVj2E$SCA{-uUC`X)q>Yy68(d~0J(N9Fx<(w z^KI;1oqf?T|M#L%m2Fp|FB}$Ri)HM{5uB!R(a}6JG1u)>eoSCBg}Jl^TZalV7mVU z&Rt=KoMI2WfdX2k*nMK_t5phb1jMGlR*w{1K0e_83xQ_U&+Ju%cWa(ZQi2BQIJRaK z1l$EG%tZuW5NA@F=CObQO{dueoQ_hfZg40>j*A~F&?j&oL8y+tsb`TWXko*5HxgPd zP&s(xc`3cRe7P@CMWJmhgxfpj=oU_w&4!}w!HctpYRAzp(jWQ_*^5c&BJ_gyp_0|_ z7Ucx4Q@;tO;j)97;=Dc>ryipRW#KTmJ!)MiLBI>Qi#=WVTh!Cch4#@$)LrDfxTqo! z4Zn-SELVtT+MsutU@=*3)~negSnu_<9|3S}CPj;4-?2FXz!qAIiv7rD{Hw;&w&?6l$0PVb}tF>TSpy=q3V{F7A{_2+5n4?#)Y=^_=twbNK%V zGO;@DkFZbR%Mtnpst~Jr;v?n)|2)dH8Q)}VQ|`C~-Cd}`&y7qedR_|e+Hu)eP$gAae4oL#0oex_GcHtln{gc29fQ(evy(YFC^!nj1_h5gaVdTS-GzGiDf@Rg zMBSLfR4nXBS%-!MPuVvLZz1fFU!1a6?tJilc(>~R4E2>9S&$w-rUY5U!_wI8|N3vR zy~m65TgXXxDducIl+!BoPi<8^YfvTEN2O*Xpq7Wp0gp@Q1dr1yxwNZ?+Rxj?gda9A!I38HopzeWd9)~VouJs^#62w4id6Qq(JRJ@ z`wt|@_8Rg2A6~!=ygP;>=u{7K*&rMY4r4VN$&&4BE#ng*MgKJv+E(MH096FtIn>A+ zr@1JPcFx17oj|>yW}KB9@q*erh!>h>#BnV78;!h%R~_UJGtW7cj?;6k>h8c$4Anux zE*a?F!Q1W}3JEHvoMXs|w?c7l4x4)_Uj7h}9(Ef4i?ete&f>en6^xJG{y1QR&;BlOI2i#Rp9*>PpyN_~xk8CxUDV=6Da zf)t0f^1?=hPSgzlfq6vD+k1$V?y21I2ny5W*dUtG@@;(-`3{XhK$U) z-lBN+!+bz5;yN7ijLaL}Me*Q6y09{^-5Sz}l!V$!etZ!-=7F`9ywnHiDrZt<>(i)I zJ->XK{=g-=L~7n*u_lUM+giVF4g9ms>Ylc*D_hSQ8Sk!a{Q{7(Y7c(htwWSmKMA0_ zQu6?cZsr$UlxL5WXSUo2NZ&G(!fR8M8r}fioPwH_XD=u#1`q>6tUR^_|4KCST1DP2 zN)10gsW#Qlu?_4#$99#vNAU!ZSG2`B#Nb(3C0<-Hxo$&pi0c`DZ0Gt5RIxn4-8xKJ zc^UG!TSq9XzD8y4R$Qe2H->x5E=22F28gOHiu*02qJda87a8CX^crvOn)R;aXPqi{ zuw5-f1f?Qn74Ku}54_`U>!;LIpx9>bGuK9lh7LzQSOHao5!*5yKVc%7z?>nG(5?%L zL|H-mbF|Q81v6k4u@~}Nz7!d8Nd#Yh z86{vZVGm!dX?ajYxEZnPFZgx0&c)Xv;6`z`-ltSO0HEc0WYHh^(B0NksreJ&%{Sl{ zH(TcBXFSm*SAm;}f(}(_d6NFX5BTVfvH~B^L%|OOj89TX?j46Ph?Et)+}Uym3kVsy zTcea3np37AjwmbIK-d%nu=jwqkXU8wpIO1J`W7)D@hR;U?;@?TwTk>#?T3+5*(w@W z)d;vHfJAqzefeN_Yr0ZJ^=*Lxg8VO&%y0B9bId+pv4+{VitI(pZ*jMdQ>v)lEq_Op zzGaHY)>o-{0_bK5ZVu70Gf-$VMyP@DTc<5c@Kf2kljO51TREF9zul-#S;akcWh;fe z++Nwr{#c#^aXV%~)Q;b^+(O#Xh!wQ|4L~SYW$P}0j+M(N=F(PX9SVZ^pj$%7*yQmH=sGos)4iI(s~~ayeOHUat^Ih7O7w^CAgWd^#*zDrkRtAGylS`{ zL#Nrh55Slx>9{=#ngTF@h0!%{6V@bdWebhZ2t|tT5Mh$$4Jz9Dy-*KcojmH__9;Iq zB;1Q28fUmsmaNV39jpJgKcqJG1}8udv}^PA=>+=Qy}82#Jnd(I0mJj z9Wi4VzQ|FVF$~|_cUwD_d3HqNTui8uWx(spLEga;A3(>N;8DgUj=i@RDlJg6oK6$W!5I>I36`PP9e z=Yr0taTaGZd~2g7TAgrhI392BQNtneFs|MBS@XTP$G!mwJQC{}q`;S1xzi3VM^)Kg zLX3D1N~xifAZS=w-M%06Qrxz5`+mkJYvp6;1G`=+c5HNdQfa~NA^*Q|#`w$YAQS)G z@j6Jd@RVOCu7f1#HDZI;PR4%_2VUYU4IVg7g0}|LR%b8QR@-x65NplzNKoolaG;}a zlW{}L7IfQ=G;{Uh*Hfs+vQoVe+3~i%1@BR%xweRJSiB}XlgykrpSTkl0{w6zFG}F} z+DyXRthhjdYv9{bF*nveD(ZK&#$tgH930gieIx;AJo3NVKHnCPEN(-%U~wQan4bZ_ z1%WD_OK7k0gD^_nXnqzpBiI3Sp4s6i{h7Uwp3g?ey*X5c*I?-ejNz>xgwfP*^-$a6 z8Po-S_rg=pm>=D{e;!g|%W!Rfk|PUVe7rG&i;8&Xb4*6k?qE%Lr(w)+`GCB8)JvkL z)$c`LtH%~O$phX$4(A{i*D%l%p2lrApkdA_CKYvr@qVLvim!*B##x2It96dSqlG;C z-J98mfh*Nmu{FVG0E9aeIwkq%B5fN#bHkUZsF%V;fLCd#mhKDJVv4>D!g|=y&m>I4 z_S)E?wK+p&@3ijf>EIhH13?t?T!#79iujC$<0ZVUqEsydS9oJZ@jM8?w?YWTHzrDM zsRWL8h>FgmqF4I}Tnq$yQ|z^HRqEp-)YBtxixL!-nrUdg;vR(SK4wjLnGR8+BJmXr zR&)|8ZFogzf#ajVg78DZ8#ug& zV-ymUN45G-vVotFseAy=rD`i{2RNgjxnbT}Ie$P}=7G?L zbhxg17agV4c^qAU`Lz0%m{)+HjK-r`vF1g3Kss;jH9pvm(?h@th#t`bF-borM@foAQ>X$Dq@LGL2m z$+ss5FBherZ%1uIxB@ijjU^wBM4Z-KY#kaN$lby@f%(O4wSdyR!E)Tacag|UjrpJw+$rFj&wM81EpxVw@_KU4DYF9CT3rW4hX$!r$r~d zk6E1tLV!Lc8OT+x_i4KWne57zT1WU{-iGTUuF^Yjh`(7*^RGRFEfoF<00!n=?p*r? zxn_eFxdPQd)#*xwf5xH;)e&7L%!rhjSOA;st%!es8NV7}ZvqHZufhm$I*rlrI|8|a zpJg|(3!kNn!mJL)6)!DTC#%G6GzI1NU=YBL|0lm}kc?szOIayg{ZrNeHYvL;ebusz z2O%G|guIXo+C=?^c7S;sU@G;uAZ~jpCseh)oSAQhTGGniwFXZeBhv!bYG(=%ZE*;n z%&@92di;_{!MDF;`wEkYYqf$6&TW>WSa!@Bk|v-~jv;6coTTS*%RbJ`!=Y%JJxKM{ z-!6!0t2Q`e@JLiYh&ZBy<2jMVBBLz+;_4Fl3uEU567eujzVL9Y7Fmw;+<~Fh4+OxrpYj!p+~_U-AClo7o{7Vk z;3*j=c4+mHqtbMhKw+h;pBx;m>F3O((Z3XvLR4FZ+=1c`r#v|@YxOnAh+_ejdb>zN zoWFuks`zH?vPi#5zlsHNMGp7RvD#cDea9|!r&h1ARO##`r9!=$QfDUIKBeiM1$(qr ze|G+}>>XrKjjxw#^?Q!M#RR-mP6Xgmvt(e|9<6>GzFAE$LN&n%Gy(3k0+>?$*d>$@ ztByDimwlksKZ~@^qk3s5+Np0VI6R~5&NMCeOYYY{YKODT-h5|=YFGUdUo~3kFt4RL({Xf1>sa4Uw|awE;2DX-;B zSquN_OOOCE%vdC|Wp*TcQlXS_HDeC7=V*~1G3~+f9E!#V5r#y;Lav5^m&b~DL|c|P z1pp*PNh5Uwau605n3aApN+8dGhhlxy$JWRWYW0(dCs1Ln(9ei6q?LxgHbZanzRCKo z;#RQ|IgD8FIUwV}Q5qe*lsGq(9oFjm5(1#l2zG3Nvew0coj5*}W;S`Lpqe>X0zguu zP18XFoVq4#z1=Jy##7&4;00SYTqt~t{?;XAjQOLSBh^$*tA7zd&H2Mbzp#!vYhmo5 zK178Y{Onb8OUizdjYou>{oY!E+s(369)A zzbpu5rM;~1Helr9K+^s^p2x~I`=>!43r$G!gI z?xYu+jk0?{4OCDW++Gw1*?N5go0S|miPf;iB9PqaUV9!!zP9m)|3&YX9Z{6!>=+sB zBcn?tD4ni|eI$c@B!hkAntaB4%<)6O7*}2had&;71O09Q1(RwZ^gB1+gr#5PY$mk1 z!g(;%;dz~8(yF+cbAx*1?1~Gmtc%&j0T^bK(-WN##LkQI0)?L11E5K zF-}&JWPwL6cl!IhP_g=Nlq8jH{ML9)NnmT5ToQU@le76ViHXlZ=740@!jxp%%1r`b zHBB zFOvM!RP2oK3OO0YU=0}`)z%#Dv1;-PtZsrAq2lpR!hj~*cN(jwkC@m8E)p*QK3YTr zh{lRLM~ps0hf2XCDWsPUp?3~CB1m`;*`3>yEv~m;0zKQ7$e~^6a*A3!`K`8R2|;j5 zNvmIu*tRmlwE7c9bZ2%fNPkn#wqH|Gl7^ly{dg@MBH;Yv7dEQ0=58+e3sR>rkksca z)W_NchI2KL3xB?q*xC*e#I5<7Y<{w*3-ti|LZ4>t=+`Ra+*iGV)Wd}6`=(XtdtGgJ zB9-1rfU_b%LxvOfz0>WB0w;e5oP6TWC|aln0F<@23OuX4ZfRi$zM4;o3_2A5=p&T2 zxozKmREAT9StOP4V`iGR_}}mbt=6V>{V}uzc?Y9PnP_jdWzNjaRDq;Tv{i2<6=tpe zEhL`7iQ8%hLdUU=#5pr+g#48Q)0Fx*Fg-J>tvZB@T9LbKi#7X!Q#w}}PwWiFMotd|L*+s4=kkHVOz#|sY5DEn%LzFCWm2Y)8nE>SDet1Y?@A7zZ;bjOMK zFHx&eUHHLR{^&r(YvfrR^5f_M{mFzb1vx;T{xFC(377B{JII8$fp2-bvL)H2aaxB_ zO!ijB0wPTV%_8C8iZ#r#tnGTfGXv}B7Z&EyHbOk47W}*Sion+NC`{QDb5SG!CJs`8 zuAQ}y#l|Q+-|#s$8TH(U=}F;u53M@&&c zx_8n_(g4V;tnq3os)5s0KLQPedYEuT<57?k`v>mE#}!DK@Y-%gQtB~&ukdg_YXCLh zpct#fpnQqERk-j<3!~UrUP7~@Z-L~cpui6Vx^HWu*V+rw*1$PE9D&|aGG z!au<;z{wG0+fsg5=3Rz|CHQsqZtX3jxa8Mf^1B*6%)!*&fp?_YyAJond{T=(F zALj84H^d_{xIhx>C>LXwiGDb?NPLOw$MySMZLhU)L}VQU&DId~EIz4~tn{|W5mt*= zn0j=dvmN<+oH&uoOqK&ONP*)CT9`yd-ItK?3m3$%2E!Q+ZJlQ1G+>K$?Rah72cfTr z`o~Pr+w`|^^N)tO@rX1hbOnwL^(ByZU0)-wL0h*=t9&=%*49mQR^dJTq3;}R-G^oG z_|6J_eW^d5C`3AKT~0&UJO07u6emnD;|?S9b95hC0LXQXIPRhhfwY!|tW$C`ma3{G z4}<$&!x9sGyBYZy?km``|AqdoidCpk$K*yU zjKjKY*UCl@_MqL(8)cY@NhH0@Yu{YFlk8eUVth(4gbFXh_sN;wJE1NMwbtN{3I?nK4 zLhJ`hP2{WZ6@It^s6e7DYdNx`WiQ+SwuH7EOFY?(TwRGJQgWic#}!F6*yRU0vESum z0Pvu}3ymv`$4l&5SkoPJ&G<|y?UAeF)9Vz*_tc#SjC}=y0Fd(G_@T$&UzL*!wEexM z0*NezK`*IVD0v5Na36bhoV3OX@8~N)CG33@Z?HGC@Nuu3mFfoq=`oPo8^A|?x$fV4 zw3>a4DHqXfwOq6sH$8o8t0jJfN?>O%vOsuj;zQcb#C}V_$ib7_xs|&F_BX0cXv-%+ zVqU5;uMEOQknIB%J)cA@+k*X8*HWyhsR{S~Vr1zjjUq(yPt^}5ChMK?^A{=-_EC*K zTs8U#w6d=#+31(Bq2*Gu+kxy!?V6-2xgxlUv`p?SP4SvD^JQsb-XOtyEQ-*?<;Fs{ zYGdP4<6)kb=iWS3RlC7K<}K1W(BMBrfGqmIZE&^BtX5sQ-e))Y+rN`0XO}Soh4{5( zdjM6@ZfemAFqq&gpB#Dk+-p5|SkD&g`Kt9?Zap~~K*~1ZftGWdmXVw53TTp-rDp3A zpq&3M6UTtrvY8+#C_7k?}sJZFHgP@}% zMqcSdC@lC0(*!rM=4xFJ41(5h=|O7g+&O2xPVM>11=W;Tt|oNfT9aV}RXhO6H8%L5 zQY68Vt||G6Ps%Iz5~RG+GSUOOd{~-t#h2$Lv=-RJ_JkuR2ztE_0oCplk7aP@4w!*; zvI$Uq33JwiTLCzY40T*uR|J8fg~MnST>GU(euqG;s>m6uD#mkITCD1FgiG*0JSSFl zMSkLuP{+u+A)$`Tu-8td?TxgE@0m6+IMh*oQW94RI1j(+tFr$vx~+v zS#&ni7A4a{M{cdc(omZzSohH)F@*`hpNvULF}YCanAPooC*_Xeu$+Bc4bBgBjPm~w z#IP%PI_y2bo?x@Fbl}Fu;Kr&<%vT4+#Y`ERvQm+#WVwSJo ztke`CxyJ2;v9t6=v~w-SGE5$^k9}crny-j{_suH0YgMiiz}7E5jIK~MolY9$GZ`A6 zpTK8$QvY0A^&pLLd03}v3!n>nP1gu0-n9T=sbe#l@&LHM!faR$(jbusJ1EK+e)d(~-8(Vcx@Jg+h80@qariH=(_D`!3=IZ@z*MikFi=0bi}dE_%H35Ph{iKt#kqQ)MH=(|$rIR~F(Re9jgLU_+8f^jUe zSMbKYq=NTS;=OjBjdzZP)lPg4E%Yk9CCz^z4e|C`DKOpw?;M5qaNuii6t?lkkeh{~ z9Pv7z3_p4BeV5FY#_+5&d9Iy+@ z*3nYh2{>gVts{Q5K+q!W@kSN=l}_YBuejZndXJPh%2}lzvi*{o(hJK}nQhd@@-aA}d zHLnymWQ;JaIU73WkLIAiCY}Dr&%-NJipUt`a2{|THGNlW7_^G;dcv^=WZDE&b+x6w z2sp)Gp3Q9s*;>GpIp}*rE zJWMyq7o!so(-O_#m@$d_@Rj$}kF~#z9h;b9MOWf4aSakoLV|JD$8q>elrS~FR#jP_ ztMHdNA8EgjujB3L@#C%N@%XcA`6{h9=Hlt7vDs8U0qL!-h^ACWLRuf{>VjRi3dY)g z;c{B;_y&6|-c0L_#{?$QWZP68kxz(YKVeE*dc);^wBBg!4VOdZVI1wf6KU>kD*vUO z?HL5j@ectDH)u}65FxwGVmfs2C(&E*LH37HZs5~@;uETrE7kCR$y~CIqf()mCb@S2 zMOn)^R&y%Q2hp6E7O9Pcm2BJJ10E!mz+MR^32n|EkNZ;cw5Fj@mrRS}Eh2&`;%hso ze&(V4r1}XLqOecfy!nrxgE!ZB1NanJ|5Fg%;X9LR{FG}jsxBhK$q69iRUR-z?UoZK z0Nyf7%Bx_w7GbjM4awxNXhPZIb_d&(Qwh*ao6UUT5_!d$F|$hidEpE9@Pee?b)!)N zTDer(e&Tw%MCnVHV*}}Bp&ab!iB)>90x#kXjChvtGB#C2{sah!Dj#iDwEz z$u4r@yQXN1d~M-Z@?>REJA-7%%A$h|dYG2nSW^_2uX|0GtOnW0vDGo+;xHN-U_81p zBBlaOK?k2E;}hDJ7brkl722%CBmj*KGZL^^2`J|a1;Sp7*yL7ezRlFA?@_>n402Qo zl`nO+OIe7XitbevYRv{YN_mPdU2EdqgeaalbOCV|rptOvIb}7P$slmeeOB?-SfzWq zW3>8Sw%vcwz$OU{1mKAj+WrHyg$3u?C307Yuy2fu;hYnS z6#lhs2}x%|`OkxW(KtF9wij57cMw81^7uwz7|$>Jd~OltdSeE(u!~2~F&`ISIC{fS zwmaVcLF72b6tFqCt0t7aJLga8Mor7X&rMT8`;zy7uUU?=u*o|3MgywDKYy?I!3SW; z!7)eQ6;MI$#rOEzM1wbb=ApXMQzIhIACdFB2Qj1+AA!d@v}YxYhc_X)zB)yjzX1iM z6jEx2ngEzp954;fm>K$o^`3!uY>Rpd(%e5Xa%45}k~i#H@((rtAn727DpJz*?+Our zil-^~EDO6K(KSIx7YNa-?R!9SBhI3yRDS()s`66TLew5nQoLbl(jDamW0^9dF6zQ!dqBZjv&gA=;^eWh`0 zp;pUh-c*GvqW{7%pABta5q$!Nf58|>eBycFX)0zM5(w6@PM}tX);sv-D+#TaJs7wR zvCiG;zal0+f1NX0#jCp0NzyIAIt+N}T)6t;37`bMs(lB6Ztqz=JgB8%9T$4xc$a@q zV?Ay2oh=RWOk}9{@~pX=U^ByQDeac35?D`5f5zN#EbhP(EB_<$#LrB@Co#=@h1UNz z>T*`_qVC|>?%-4eV^Uhuo3J>2TeIB)sztZS)NApbV{IcxqC4(QCgLVqyH+_&eNK0++BPCmm7UJ0KCxuB z-y~yPf%UT9;TQDj(!(l#F_I_}C=k5@3n0BD)km$#RMV4yG9*4Puzr~|xFj6-N;2V< z$%MVT0d0OO89y)?k7KMT=zLWx_gtyfSkp@QNW5+Tal2NTtkti7nS}99GNun>-uzWE zhEA(gHO{c=>+4y-Cr#Z2G$j*f5zIW;N!Ovd9c^`=^J_>9uanf=hJBnkEj$1*uMmQC(##t`WUy$}A8wfMEHqgEMDT%bBb+q-zT;*^Qr zER0B+mG#^zRTf_$67ScBT}A_y=+N;D|3?;)*K+mEzdf-!CU~X=*1v{~YDX!YG$6I@ z%kYlw4)Oeq)DAHgZx%-mMS4~$2U4nMhnRSGGEpxp(b1L3Plr*Ys**w@ogJ~nBEmW$ z!XDg2s48`E&bcgOm+S)~-5dUZ?4eFnD)FYuk1q2xtD)RHj{8lrAg&szB)u#G_%#BX z`nr|Gf1irZupvnFOKa@t@2TkC%(VSK?XSbtR~i4?u`r~B-UaF_+>^60dd(fgOy}8X zKN1)I>lU3Vwe*W$FSHmsv9~#ZA=y5SYwP#DpBA33h;*&Hfjk_Z37TRYtK@RoZ3ts5 ztZ`^zPRVR(pC!!B(buTY1wLq>eu4E1g-mW8GRr^{8TFo1Ma^OqHgLu2ncm6NYwwY2 z3aE8hodOb^MkCcEMn7vs6C8GDsF-RvHFz`!UnEsbUzNwOfPngzv~z9vfsF{K8W>({ zY}3pOh>6wn%%78Ph*ce5f6Ul@VH&Ry5&Qr*J2aE ztV8TBc)CF#NBj)v03uNmXCSSNF{@4nzGfair)e#{E&9aK(AdFP3i=peQvwW`x7|tlZCGi&@UHM2D&am zS9-{%h5nY)2Z5s%4M1;4d@Se{VhwsKsDqeA zmPBz$aHZ1d*?^I)k7NmrEj=4VDKyrVfEfBy@=JCCb*M6p{Wnlo;u1T1LT_1?0v+Ch zpu5q)l#lyEdqT&&%ve`M=u6}`<@o-gcmu{oU1Ag4d%~Yi_!xT7O;Nor-;}`mSHYzY zf3@w>6gQ+RC#{zS*7NQ)hyP*-39=!nl5F4A*kL0wWnTZ7+|lO5aKuIz9!<_R#C@IH zQ8yAKatV2`Pf$F!5Hc zLlzCiS93h~fhWBV-*E>7N##{t(7vbHD?~2Tx_2zF0_1RROy%4EcpSyTQi*s^pjrF} z`vrscr|pae^Ayn)zf5_bG-y)s}4v|K0EM?C|vp zMJp2Nq3CoFzbF5AP%tKCv(Pf}3FKl_(SQEdtfGIO_`4HCoXhm=mpHi%62qu<6SY{~EgvLNPkvimw7lBZTcFs1aI%lM6OTPy7OeC;YAC zU70yoGXGleQ4`pUPT*%L=y4RpQhtks)+9)#%T(Qh`_>Q_{Bw=^d=?S*?!cRDBq`x{ zYtY+VJm7>(}E)`}sC4#FZgqnfFh4 zz;yX49$X4t!6*I@WOn|cbqo2#>U0U%EEi862eVhJ#Y7GJgRpQF(y@)^4WW!GYZE-@ z4gl})QUoQCuwno0_}*zUo)&_mWK_w%ojf1h#G0p=^xnj)A_VHi0BS3PY*?ygmXroJ z<}7tOj&9}_2jAtP<7vLhq2uX(zZt4}4j>@`VSAddnAAOq;4T8^o1r@p+eXI&W@st< z+bI%$1DwpzONdPXT-Is8y(g)LA~tay^~#IQQ0z1Se=A8pCqS?ZlVRaV$A)kxH(x;DPBVTm{y7Qqqpo zlyv+yG|@{!ZW*ds&}QdJREv!;$f728%v*RhGw0j^f$rN;HJ}*{xUiKw55NOU`_49)*kG{ zaEBg!K1WOGjbPalmo6h{ zL2KS6#rvVXdmX+D!EeluvyBtE$|Gx*3vOe|c`iKzzC1Vc@G^x&ip)qAo_mec3r|_2 z>lU8W(6QH@!V@l4Uc@hu{U1n2_+Eq*%r&v87|$F$d2I)!BPq`gKz53I#kdR!nNO7% z=U-W1s+dHJNmVgZdgCTA#TTG)QcSi@6(*vTwk7AocOp@$Ly%)azbeS(5C62p{OoKfX?G(V+Qt)i5{O73tkWOol4_LvFX++@Yxua zb7PA+b9R!U4o!h}A+HX#XO2!8s1&3Cq;Dq+pfXsL+c*zZKqpyByB6My`XcvaxRBTC z-{DKxnEH$|A()lk5g>3pfi=+3J{NCa8j+~LSJ~rPcqv*{eJxE4#n&sC_QLM3S0r-q zwS-@DyT9TV#40zu5u)`9wUtj%eZdv>oOWp|Usm(1C2F3vQq8mAuLG@3RgQPZDUxGT2w0*n3;0v4D1P`kgp#EIlqZ=uxs?jqQwc$6D~D+-ucdn^9H_oF4bL1r z(^-^xZ((rbARQN4VtM1TadM6uH|antDFGHVMdR+=?C9UQ*ptH@)Ng0Ta63=#>Yp2z zzK%PLK8}8#e*cCu3V2yhkx}w0TCzYtE=Oz3Ds{+MHX^Dk*_v-;zxHJs4_9N?(jIt| z#>7zv@jj_UKTrBEQ4N~(wQ_TVFkuNNUfRlx=wA5RnCJvr*zdivio3rvw_v+RdSr{u?v@_)Kq0F(83ou!r6-WSC^gKdYbh${Ap%3D_=nFK?LEcUSjK;9{JUrl8Vp)_oS3J4Fvu%ABh9quag88i@jPq3= zK_0;4hX)CK=OM=+YV>OM#C*hO976A43kGu8+wxtrDZg z=xluq4?sEbFDud4mScr-ObHVDbUNP4uJqo8U))EG@8WrHj0a$8l?k`ZSdAeo1BY^E z=r}2Nt-EzhHS3R-Et01y-ug7ndQRt4Tlu3Bdig-5^YFX^PY<4474>3(W^U@ z4($jt_xQu3MWPQf#(=k>iyN%VE z(IM7SVq!71TCYLS+80`mVvKQ>@COfgzVpZp78gO3xDX^?=~>>c9k^2!Y_s_m85H@| z;p1Kni3eiSzmN7)f=e6M3dg%hA>vEsFD-bp8TPg?7`Dm#K0YD;pZHkg-GK)OTRfbY zYOKMNf2p$$_~B3=9q^`$5GECTl9@F{f=X8QPZ z|HR-I13F9qVvwE2n#!c48Gp|8dG9JhZF$u|GSxpPM!QUopMhIlZ8aO^hTGopm z80LNw(|DN*sM0#(9e~IAm=-QZoTVz$1d_z6eiBk(#9q&o;vaQ5z66gu0eJqoe`-{m_rzEt{lP>`rEWpa$tq_~Di9bRgbX6>vXQ3; zkPq>W9SH#PB!DP=lLj`JzSN9#;dLMgyyueWDFbsMn8ee4cA+jPgG2=fiG@G134&+7 z6o_7G<`nT9kqO-z=EX?kyS9QNg= zt>aW&tB=AuhgN$UiDeqP89BiGEEEOhA}HslF%lzqP<>Uy)>~HTNG3NgO!k(?_aCqr zxq)ssk>D4A8=)@`VuQj5l0|=qGGO_L{1VTR%cKgL`7~Z^h^+;?(KaRc;s|z;#kHo9 z=wjF;iZN*)TO6!RNPEao*fztK6#k z760%k>C#62kL(Az*?2x52#%)y8NyoR_ejR6^__3jyAc4Z_t#O4x8jf0 zuo@Op7!Xy9U`(ucAziGV*_`TtnyP4|MVX)?yAad%E`F>6!3om>>*wQx6yrdkyO^P; zE#?~trC2?)Ior5I1tPQBD5jm<6uBQUZ4crHJ+;!|n`vM-u2JFb2ECoMJ*fsvhFVm3 z5?88>MJi)ScgCl_HDi(RZWtJ0?%}J$m?gbNi}3g(Isg?g{+aOBj3C$u9D~L{)0_{v zBCjBeW_PFG_g>7#$4~}hmcD9d34UXq!9=NQ!qyq zCz`Z(te(>yC&9kov>*g!7IqaLJb_I zGqdtx)hJpwA6x_^xH96Hdz%51h`J8brDK490xf0Y_Ig|pkM@zQ%e=$}#VDT!NOWm6 z9E_;i0E1GLLCNF9#=PPq$VIt|#RA+nXjK^r2m*8z1LtMeU{vj-NJn#(`_9CetkWG% z+hSk@-YjwW_DPo#KGnjDSPxoSF+$xyW@w?9&_@^g2I>!Sq~)?;p+$%IW8-BE!woD- zuK4-`OrgU^ommvgSAjj7H8igfG9dyH4g9Pg#Y5CKl2E(;HE357A{0?yH4k! zAiX`&&wf7x??M4M@B`$OM#@9&>_+;_Jkb<+WVNSq_!lq@=YC4cgm z=gMUC1YPk~z=g!8fP#4}?By|8q@_;jMxA+9fK-&jtLTx1Y@ir=c`l22yHdJ94wxP@ zY)*3HZ=hs31qC=s;-surZ{s#>Rh@Zkm-& zIuh6C^6e(>fNM<qyk;%bd|F?(R@`%<&+6`yPp=`Ob<3 zs(_9&VMk-sS~?wHNcJ9imq9$Al$Q?7R9;3iFDC$E7bR;GhTcF9v_JKQS3eGx5>s8- zW8L&lzqCs>;?Dvbp+axCJ|na1ef(lhJNBjD;3)2xtY7C zG94ywM!5gaAYDT3>8qtyRa=Z@{h!8{Yu8igXxAKzY+cwZ)Rp!yrAQ$@IT8=pp`$xO z?cb~x{bl?XIow*X1zpi||Mpqns63RIZ-&ze4PSH3TBoe>06j942cY5|6(XT<#@?*! zlDz=9MH~4%k(PxS)uFER*{>Kpj0>^f4>dxY7V2Aqo7gxaK=cFgU&G!Ge#?V&zzyR= zr=`~nom#dhT6ihLnDt_6vn0&0jM#q8e$}!M zZi#t2J{vLgbcD@r7HXHko7ze5ZEn%ykyZ6^9Fq+N0DcC9KgZg;k2fXTvN- zN1xQuJ_g_YA9b`pNJj%(PWZ0f(avC(!VraGJ*l1T{@pq3o9JmRNYS&Wt-+UT*Q%cO zIe5~Gih)(NB`@QN#d9cgWL~(f!*7r7wjPRBSHX4`gg!<%+Nzot`e>^vUvS@lXx7XY z_VDiBhqGB3)7f&;+G^4o|MyYseg5;~Ke!zfLl*_KJfkK9eJEq9ez**)8M8f+{pJI9 z*Thv?3kPCV-Nx(TKmtc!(zrlI`Qp(rG|z;PKtbLf{j`S^{_uxRNBjbmjo}U^U9?2y z7FtRmdy!FwgiyzY{>)gQ8g+0c;1gkxACsT)d`k|t$!%y&0EfbJkQZKQYk-TaOa8Hu zm4oXJ>~Iy>s(&ZlL)^%0I8}-rQ}3r~VI z`c$yaJRPiFDX@mwur9Le_|Yw=sACjkPpm3U)|XDI=O1gkY4%CERnH{6|2P%AhrSKo z-6`-MKMCHAr-C>51b8Qmko^I%`}~k>{PWE--;h}*l$p!(AyO^FX?)R*0lj?v^@jyK+aWT}3&kl2CMmg>hV0gTtE z`h{W@_8631iWWOT;hQ#6=A|BCao|2}1P39AO;Pn~yn`)0uhM&=rR3Fmhh%P6Yf15= zAM3l#G!vuQLq_S!U%``TARi$$A8%JQN90=2F5+X-aFafN~;7=U|XjS5{rcvxe%*s;h9& zHTBA>tFmF|tGvo>L`ZwR@~Ua^<2QjOl~+wgljL@V)2Vj`*NA$^!QG$H3IikPx|YHg zRt7e~3`3NN88iXE&v)ea0oCc|AC+2RQpb=njl_m983-)3RlnnB^t~c=$Z-)qrfLMc z%6hiMF0|ISw?qwEBKo>4(Qi5WiM6U1y?-l=a=ps}KE(q*1cCaTPnP|K{_d71V zSLC)AI-bXbVCH1ElPNhkM5_66fNEO>CFPipm|##yAp<-%wC_ zDCWXvEdJ~7f_%Af31Lk9#uxwwx2N3k^b-0a4#nIP{C}}f1i^9>z3mrl-(WKdA1Qwk z@#l~SgH$$#mo88g-Ss%W^sruVC#!6Nq@c*SM_QsBIMBroUF{S>j`=SH)lm!>@%2R?9E_EMMYLBZ#|P*0&~Tikvg==%T2GTB{yO2$u9bwb$2UgIq?C zYCn$D8BJPba6c6{RalbiM1s1d);|=09`q-*eK-kn^#2B=;Fy;JGPQ9IU~ox6vdHKQ ziiBk@PWDqTMO~{`!VSzyn<8NLD z?(QWsQCqoJo6ye;td>3N%GM?0bzn8!);V5v`uhh~s{;sq0;}Z!f>Pndyn}?ZKd3{n7KnRHG^Ch#~iIP zx^aq)hnsjn)4)cK$NKyNgGu;zU<(8GA#sERr|x*wR=z4ekUB4|%MZmmd1pucVthA) z@1SgB#cP|M!4|r=yZ&wlpLrfD5m2w73eBiHC)7Et?z^E*I6%5dk`G}lJ!OPC@2k5a z)On8e4tCNLsehIkybw`|`+}X^ ztL3W>cDC?)wHX}G@836r6(~M&tr;8+$cZs#@DF?+VFqvGbC?-iz~@jixQFo2gnlt zv$n2$_W!50ZckGD|8`r)lO_MZ+}5`5hZ^bI7}*PP<`l-d>87|gGnEZRbj_b$3N2FVib+r(}p3lSRw$9Yb4xRn~x{G zZMdNv0=Fy;K=E|Z82UQ(4X6@##oY*mHq|5-X@dLqK^7{CU`dm@x3NZ+2cbf_@D|*7 z?(I%)ASMMc0;?UBc4e_6!?r zmNVGtM8HA``*m4RK3$mwJBX`R534`Fd4k9G$~%+;$IdULR#Yx`n=sTfNy@DAcxQg%lV`l5)NlV zMf?+q2xux1F8c0^WM;TrJ{$nu*k-8BiB$bZKA_Qb2VNjJ6qte)I71Y16K)hyRiWYE zF-?Qj@Rn2LvQT6$;NdWFp&F^sCiz}g`7SJO;VVuy=0a1=H`fT{#tDvLT0`HeapSM` z|1-FW+$PM2LR>Ri9qG;uE{7dXO9`hVtfnOFhIW^I1nb*i)9Lu6tsDnWSPS3@Yr+U; zt8=@vOLZ2^R+UdDuNSHKhV7^Q!rnaVjWb*2(@EA&B`(W~!&Db3E3G$9bi>|q_15jv zN%l5KR3V~*$-de6-JX5Z42u^u&_CM@UCtg4E>@j0rvlVtCp}X=rIVW2D*+eL$KrQk z;RWrWv|V)ivRCPYiDXE2+t9vRny66EIG3K9w%d>JH_s>Rokcd~q~FW)g9hHeM1NUQ(c~T-- z-4#_HZCAM#O1mtN^{Dpi6in>Dao^WcU+#KkEp&8+H0W@lO|_@0@548vzG@{6%+CzU zMx$>B%HowvRlKUZ;>os4t++6W+LbIEqAFgMWDlHzP!+dY7+8J!9W{xUn zoFU6;8=E0=Zqjj{K zLHq87OU>8Y@oN5rVgY+*D!b0aI<}l3s(D&;Dqm@Z;&eSU4;7?i}o_dET{f^ z1`@f(qEGD)3}70*h!eqTePc9{+iUe?HH^+|9Fy5F zx{n@jxbuvL(OJbU$(9f9V+XXE{SoNN=>L<5qrDXN9*RN-z%+$?LD2vjPs0NePhB$# z;b>NR&qIrdm)~bDX5)<;R?Kw@-}%@{>F+JedWn9ab{E1Fafx2*NnlD%j`{jU(z%C2 z&~oWO7QD<_47!LjhY0^(pHc?;wwrxBzEi~w2WGU_*_hEVV`1}(O2JJ*lZmwTc^;6& zZf|@MQuH`nJ7-F_1$jBriKRR*20@dKpMFjrhUqrAmted&rNO;01X{bXR(<#>bshr&X~oc_%9G|$2J*m;;~ z`?J=um#p{TC(%cY4eM!>fu>PdyzA&um}e(@y~q~&D-E=2zcDosdiBGwakGbgMvJ_` z0-;k874#VdUr<3=D|*68^(4NTs&7mG0D!5|ZE&R%qPPe?oJr*5Jr_H@xQAjjanq`{ zpn|k5=HZQFF27Ra5T)`2phK+kE&{OAV|Dxjg*)vK08oL%HdY%hR8bUv`d26=AF?>l zba4-%2m2#){a$Q7!imfC@gav=n~DAQ1YqgH#eki-8A6-J!xJNO5GkKiNCEltfZ*ew zlUf;kzCv)pg-NJ;x~eaCZg?tytf#D9|3X{z6^2>M7xye6p%o~=d{V^nDaffkc-i;_ z0+N9p@%+I!#oLmyA8y7{%TIrnEv(A`- zJeR-=yW{^h2-T;O6mK|RQL+??aR>tL881bMF-wp}Te+A}AiCj9tljCqKXkm};dwH* zP%|N6pGx3JWt_RDA}sp}+PK$-$*(yv`8cb{%}8KpyB^taT-Jk6@PLiq#P_i*L;IW- zc?PclH21t7fM8Ir1)$LJs~`SOVoZ-Hpi!KH(r|FwTJ|aDf#wQ43gYYnN>x%s-iVf6 z-NM51LzAFRY5B%JGF5t+7DtrN?5<|(mHrHq6 zkx2gB1k@0}GPYZ3$DoQ_XGkuBb~}rC`8p?b_+&E35^P3J#dvU$t#F{=OWBt=6gZ^PLIW*u?ouRE0r(5%SkNMg<1N4u zH&6j9^JP*TjVl!S1{`TFW{aGN{078WsaPRO$oR|rW^pCs+g6?g@I!p2bo?b_P6_xw z&Q&QwEL5Sv0z7z)FOWF@{dOUyK=a?4m;^%A^hEtNuvHv=W-5lENvUD@nTL#sOz=o>#^xS&9fZsU-Cg!q7ElUdg40I~qPnP}~A>>S? z3xD$^9!fbFn!+*dHQ*TNedG*s4jdGqL+UA(f;zAz{Gzva=}x++SkN;X{C|6Qf^|Oy zv-w8K!PiR+UR0xybaBJhQ@IwPbw6RMGn}mjo7erA!R<(j>B!wA7)EqOdd1pFqF+Zu zG1vl8o(5L#)Kd;k+zTwY!p5=LrVS{u^BmP-)u~u)R821Qbbb#2F>+9b$Dk3kxI_e~ zaSLrgf#HZhX647C&Wxoby65ki_qA4JM_#_?jn;~s+5dd7ytN{C#8=n-vb7?w z?)!bOZ>{h&-P`M@trgzi{yB6(YeoJ!Z|%KREugkmh#+jOkhw~6%ZaQtlSskCEVyPN z5G!Gg>8S=LF@xS4a@SS>tAfpC2ehgK7z8=w(!xhd$2Sjzg(Sln54Bh58LR0n#($aN zTB2>yT}wuXI?nSShB&wspV4hDG^$*<)=sZ-%}MX7a<^vSGd2#O%v@(%!2$mh>;v6L zi9`FQbxXQU*9!j&&m97DMOs#e(2QF62r8#f^Ja14>XpeRrkvSTd1~ItAfqPc;2lR2 zdnx{W??!*b8tf$9@zOK*@`J<@HRFJR6nC6{~8RaDCZ+Uo@ zbT9(>_SWF?*@XzoH10Pk7m<1diKCxbI4<2VerN>#!3de$Q6A-1J{EV^Nk-WiScM>d4}AR7fjEVENT zKE#Kk$*qGAWFE!0d|cJa-|bFbpO>RYqtSC&(AmY?817w6;50_%6(1hFLBM#@r^cQC zg}gK!7N$>Ya5>-6JEGA+EU7>8q1-+wH?BuBJBDEKRo^i9SmrilC~>}z!b+TboV;Ny z8|Ac|tM80P&n}MYJEASUi?;wG zt{=AxEkV+J6xxPDQGEKpAG8Xb#sZ(tLV;hyO&f9#Vr~{GWZkA8%xp(-Ir^c&9Vie| z!ub(;Myc}yDKJ-$v%of0Ai}DSykw@N_z;R?bLAtOCw;+}R*_I#)91gMEk%MVgGeD3 zh;ScJ2u*==Dmy{gZ2joq-I?22Yv-Sx8=YUHBjoFQ^errMd$jfJ;#P)x7q_Djx!b0A z_u%ctyFu2H^xN8|Fh?Ebu79y^A~b?U$p-!GGm1YR8jop7eXaaZ;c6rq?dbbsh(m=xMJ+ z{~{V2q#t0BM;Y!@+=*t+*LP9J8|6I@U#+UZT z0JD|5LZ>BdJSpSr)8k~=@`xuIXH=i4Ng)#+7p$yq$tOT?%ce(6rT!s zH#QHpBms^9K#Ty|FRI+>(Y@&y22KIksB-I7cOjWxbuUJaFFRBr^?=BcVsRFbz%Q_H z`w!YOe>}HWiO3%hgJp`uzmAsL-mO(?_^eXHXO$X0tJLsWrH0QcHGEd7;j>B&pE5wT zR;l5$${IdxT>*17wdqIwVyIr4>V>X9EZ}I_Y&}J-Y0j2`>nRRg$z8pvnfAaTvXv>G z(Edf@*HRKs?DsDchf@*{J`LognsO5pb8RQe^=lx6d&};e+uvw1ntq9e**|xEY#P0P ziz!8hX^j7wa61(Ow6t>7HR~)IWTC#8#wgg`6Mr?0!F=vEjiayNx!pAW#Ahpxc=5U3 zG@AHaWg4}7zG52HeE!-r&gb(v(>V4roIY8pC&4@vNO z24_gnVDMH6&Sr3u1Sc^#PJ)**I6{Is3|=O|qrXGYE5SVsLM1~HF$Vie@KpxWB^Y9` zy^{%UXK=p+iy8bxg4qo2mf$~LLXf*FOk*R1Q3*cF;7SSBG5A{v-p=51365g$NeQ0A zV50<&pbgsUB)E$~p9EJkI8%Z@W$<;tT>y>@(^#1oDk|9+47J0zZ9?fAIF136b~ zAOKmwSB_A6Ll|$Ed*Bz3EcGZ?4^eAddEEiyYSg1vJ?8U)IY^3Et~PAXK`paG>jH># z`p1}6vmj04f2_mAy=ppxFG_F{gU?B@g281HEMicXpohVQ5~SRX&p}YfgzSDiIk%u+ zuM?(twJf|AgE3tuP}hLb?=cww=Njobq2>0{}|L8XU4Em6RyG1X7@A49WQ9d<)Z%dScbEz z+W#dvQ{STRjJe#7g5%E3G6g0Va+=F?KIQT-CDGO%M;vw0RQAk~^5M?JL2 zIb5T!wdU}M{3jRX+tb$j;!@4TiV6rg;1(HzwaG@U)u`Mauq6Xq2-cxN$s(ZX>wsg>r%jaUlk=)cCrsoaAtG%n__{ z9_yoxZx58=zLJ(}8}D?ExXYWXJ-NxfiAyhzvUle63CuqS41KH9f4JZSpBtB!m!E^X z9m;lVkGB->ckjhcy2>-0dIq{cJVj+sTADs96EQ@iKrSFU*oXRnJT&vISB4I%z>qx^ zK)gsgh}D>5Gmvb4Qr;weCg0EOFa^%LW-Uh)+)!0s$6A+yTX>+|jdrEh7EdDpdYO~U zn$Tp)25N9422JScjpqTirjWyM(sf>shVZZwu;&5Pw>1Pw22%gy>r*y_6}tdZt-B$T zE(U`e-@sx9x_%Ez?IoW7no{TVLb6j(s+igTJCu6gg@mW1)a|4SD0PHISd{vl;UuL_ z7nZt5Q828VeD~7dz9NulVgvzsEMzb!eVdG%`;lZVWc!4q}otwR#;=e zPO}CZ{W&@-o|aKycYFidw}4oe#$52Z0T9?d)sE>ic!2WV=7VF<=z1EUrv_)J1z}zo16%&ma+JjrPDO(O})3#^@ zkd2rG%EUJ7#v9+gnzG*u@%DOxa$@17K zko~jn?1svYtv}hY>LEL<0*AG!Puwd&vO}}*)bh6xiNji9bU5$}%+M~~ftSyd9^%A4{eKbK?jTz9N#05YV#pdJ628_!LxrflVb?|CpfSH+ajL+L-m zs06hdJMyKn^hN-&n5YBW&O=&XGA%HiC218=kVrQ7O-HZEl0+D|Pz?-Gd*O(Mhr<;~ zh6B=FNWkN^h#Wc3iWHjU^5Yk9WpxQF--cE0$+*%!4TQ|NQVId>RDFE;n*^$mYG?_7P4Su@;GwsS5`W;nGBiC>@>;co3L z{jZ^a)R`rhmA&_HF99f*iR}#itF~kRncC@>TRRZ0;}4{9^QY|KYLvM~UCb zx}Qh-J9hpKyBuAT3nLhh&=z@U>n=kxuXj?r43xWz*7?}{)LF|(EYO$UX5FMSp29<% zYhy6Z1`M83$j8EroIqJW?Awbh{%;hy1_R5t7C8k7X8{?v(JxRwAgx(y zF(@#9nA6!jhc)6g2ykrc8{IITFFn6gq-+8s2zq1J)t@VVD3jMwI*C$w0DDLM#3?H)wBIqI*+pz zMcD#x0t4}>`djIeK8+l8E0V99jk+ZII6H}^4!^Oad5`Ic-O$&-8zUPLkV=u5mhvKl z(jbSU5PLRT*Y2dMXm*MCo1$t70kwvgkPx|Z6fJV#w>zVG7EsV4kEE`PsD>QvHk~9Hrh#a zk-rFx*$WHZ*QbF?akH=6>1cisDfFHGz6mbIF;R)`K5-=~si>6~ff%(Q200%kQ$E^t z7s-eL?N6BGW97NwK8#F8Z~btfJS|P{&?4Am>Ilrwb~-H{z`{AP$LYUx-PyW006K6i zBS>JPe0f3n-5!5VsIZQze7NG7W|6*QVaSg7cz;3uK$++hAuL1D8yW8Xu~YDp?FsUap-C>-hf2W_6sf|T@t;8sNGB~r6dlVpmr_51{k(5 z%OZE6TI6IlA?FHij4gDBE$n-yD5$Ef8n!3`K(O^r(;_^C6PRD>#7>4+5M%=an6OSt zf3^X=WKoBsI@07eX7vtqWcW*{X{BZo4D3ufqG`>$ff=yq$~b0}JOS)r9g$L6kBlFR z$y_Elxz2X*mvY6(kqCYAs}5X#e!8B1$9IJ~?CC-wl-bSP7FCW4c=V$j;E19n+yLnX1AqaR!z)KRn}yM&%b>eK1CKj zOmrH2h7%v~Q1V7EF_eRBywQu?!LrdK!gN(a_Km>b947A+q!rv&{1n1+EnnKT<7B|Z z4QgC$&rW1q!w1_rhYdEpwp+B{1*l3qT8;6Zs5-EI{4kqxy+qRb%_;?#5msEl`LG$Y~J}*rS$xdM=Q}7S~dU zwN`oYi-$)&3e_WDJ&M$0x_V4gk9*bQE}u4Pg1!#qAPLcwZ(%JQ2#j*2VS_(9kKa&ADbM zYL42%=z4*16_%#N919_p37fwTdGEwC(xrF$KMq+(KYN@>%{*QHtw&YVZ)u35KVxt?KE722=d zrDaqV*{@Z2RrOawGpU4E69b&_;wB^f#Rne&-k5vL&<1^p z@YFaV&0Ll}J%NMwY_^2PoI6y`gUG4JLT@{@m0R!M+Q+$5TRC~S!))qvSG&rrt*psU zLkw1Dx4EFP<)@oXeGgzr17r_uhg*B$lRVHDvfmP&Zm`^7V~FE`B4X6<6&9WAz@0WU4@hqmChJKxy=KmY9B0JWP?-UH;x zXQv~y3y^Ehc=Gc23 zzBA&3Kn|GRvJ;u{{u1={k}bsSziO%gecgB{$M{hWOxf&{+M|v9jV!{iadY;_Te9os ztEWH9xH)U&Em?K7Wu5*R*0*f+&F?mDc8|QpT{j7F*IIFTRvgkWj%i#YZ*kQXBF)9d zL)jx|XZr^k4`q#%^R?xrR%wc@@SIDFZ9> z*aB0Pt+JR?JWvsr`wK(SG<^b%=*iOlrt-N}!bG-|+eSg&O4dxlQwBhYA2gnac>c8; z&v`Qu34c>6qVOJY@aE#Jq2m|e^Q5{`)KGLFJAvyyB!I6A{~#st1hO>&zxFV?;mgZW zcJWp#J#@vo8OYI&?wUu1EEBP2Rj#o_2>Fx`W5ejVeTUY znD;Fq=m{;L>_sXw%3$q2JCtmNc@@R`1;!-Ed%g8_K%l8_4Bjwq_;68QX7fyl8B}Nh zM!_dru&Y>yia=b1CnM%kH*G)wi^p*rMDhb z^rV4Bv6waeI02fPc=+#2VQ+34vFig!O#(@&T4SMYso$B0H z_C9!YsxMu?%^`bbrnu6dWt-`PFb5J27Z;zL#oE?$iud5Ymw+F#=6CP0n?3}_ma1BF z2}f`!EModE?9mn1kurhu(hUDKJ@Bqf;?3zMnBv9*q{3Pjt2L~Kpf)6HIvir_60%wc z$xj0aKnww*HTWp#krG@k!Z2_EoR591xbc>dMM^-`tp)71f{t`mYZ6lRLCG^8y#+MP z$1X=KFw)e`?kQ10MoCkflY5aSm2hSYPv_EUNJSThCjDiuAc$A{+{EQ(m2G(w2v;W| zU>OW(V31N%i_a5WkCQOa<4RFp*$#XWJxB`~&`|8R6WJAfRiSTB6Mjn z&W6d}A%V^t)mCl{?L%;(GFi&JK3#uG(oJ@zAyH8%>Qa2zqcAR(B|C1uRa6s;!iF(( zd|$MWcQvQOmq6dd@@G-QhQNm7fn)FraXY?hD|Z>oo_H1GrSpTXPoQAuhIiq9O6jTT zQoKH8y1wu(c9kL&p`d%9seut71;Ki( zqmvd1WCDUENzBT&YtOYbV$msZY^WB&!CFiUy+amj5gZV3m^bw;+xD8XF0CQjP~+`S z4i0Z64t`!_UkJBG?yNbZ@aw*7_T6*vbj_?CeHRhD`+++{(Z0X{=!)?+ew-{1B_4fB zEeG8VRLt?Rhxuc~iO206++C)Hzegm6cdeel5wk{(m;?58b~OSQ-~s!GF~${hl{%my z>S_9veBV6{TiWP2wY--W;cx&fy=7apM|UxdotJpe2i9p>vqv$AklX*jzuj$xT{G{j zohV^f+GTU@p3R^+sV|#=az=a90GKw?2r-4|4*8}l|8$5xkm&4^ErR*j_65Qz8fR*e zD&!}PAJ-xy5yZtk5f~ytieAzvKr_E!Cy_qiDkxT&?HbkU%D(KzYbxR6wAblM{Q7f9 z0is;lyB8>(FCIM<|LmeDPvM^%z&}m+reb9{uwrAC?zB-egvS!sspuzDGIvMUB#Iba z$9?)qzPw@bsKk}>`3Lsr?i|;JqP#*YKanRXM%yV^*mXCKVmCvq{nd22Pgl{iP*Eo& zVfq4xzJT@0D{IvjEr7Md&de2k+)mX?#5XUkW5*U_@eNZz;B4+w41HZUH?!efQ7jWb z5QhV1)@CT)UHYDPzQ7GMy^FV2`}gspkKon-@;CHZO*tsngX{0V6Q}MPindP-b+ii* z|L2K33E+e8tT9Z|kcI?f@a{jPAEale6qh=G$b+Vc*)950PRv;}+UD?EfI&q_t|m@N z9qEzUl}ufD%G5XYNL`#vP5c*h*It=E1v{QW3hmLKpdmsXQ?&>e&(>l#1!wCMUXyuIURw^n1*7vY zO$v2nYV|+Cs~OT63szany`TaMy8+{bExQ4i*_n4EI@m#lN{dWKPDyGSEmpi_Z~HwG z!NS@x&R@P312_t=w)6iunZK?q*zqhNXyFTqP{(r&NB%$J-UU9Y>RRBQlMFDykrQf! zs1brr+eA{$m{=2u8Za+4K)j8LHny~-Emqoc?L@H+fiQ{5;bcH7z1n+eYj3@MdarGz z_(IKqBmv4JAnyu@)lP^=03`{peE+rgnaL!g^!|R|{XTSZUVE>-_F8MNwf5d??>&LP zA^WQ&?|QDTubFbHCxq-%QSctJcimOj_o#d@L-qnmc!~c+=bH+yrSNK3MOH`ijFdcA z5K8F0=o%BUe;>Uc8M6Q4+@rr!@h`%-4H=L^P3-K59FmbrIBXmVRpuG3Y)_bt<-Ssh zBi!B~pW8yE3A|)+sc8%+u~x^qzDVPH^y-RkN?-!W8L}r?MpTsVm#=~A6Nr(J$Rrt> zg#)T+25xTWt8rF(ds(V!hU`iZ?ff@HrLOO3$W;AK$o`JJ3i3+JO-)p8su@MLpH*{q zOwTQc0=7P>jPKf z8Y-t&G)-zw!eroGD(;(JKTfaXdDM;2MF!?&;^R^Uj%o!I_!|wGzo78(QDRi7_tzUn z1i@D8EN!MxH}9(t@r-<5?bMW6hgKNsf@LW;;IA(>r7~sLa}o$fI=?_JxDc2 zQgyE8m9m+gi@2k@(!G>_FjkvjOcrcNKb7FlO)eVVQGJss$Ce6tPNY({_+$P|X| zGrC4uXF-346hY&dEwghvqY+`+3ZMQDK%;~zN{i=?)F@i;{Z7FPC8@4uuy=vl*k+Eo zl%3)cwqom}&g4yt)^gNvE6!|JcS%$G4sTFyq#!BAxty@Hef7DXSmPb`-9b~9P zVzyJZhqCim=>mfHiu|85PbAMtziX5#OnMkj3Bn+Gv=oDmMc%tqGw6RvX&nP!K}^#} z?wFIQjt7&@fgf!ddI_Kk})wjcqe- z{0;Sr>Vl8VrR#aTaVdYyrJMO1Y+1-atl2nQx<*QQ1hcUf;wiK?z6lTm^B_VQa%WPm z!T50hH+A+ z4%4c1%I1542$TjpgV0Zo!V|BKe`dWztCFE0<-%Na2#2UM7Xg=Va?tE*+T0(-@u}#1f!o$b z*%{2BIlNCjLT>*+d;1X9@xL^(M6uxUnm@yfyXDXBp#eo-?$5&WQO}TDrX!AlsqAdh8Vo2Xe{o@w@Oa0@ENSi!zE7B&3xD}6DvET^@{Tx9* zmNE}kFIhn0U@SRc$ZWMsw|WY>uQl2i7Y%b2)R_(cO+oNgmfA&SFZtue@wL*zaQ<$O zrdA7PgE|T9=&;M9`;amjX{`U1d|ahAd~=3fzQZ?SQHtGWeY&(s#*9MVQBl!CiA2RJ z^7J0@4fR-yc0DYP`^~Tz%e_CNQ^Z}6Em&kWtmQrqY3Yg$p-~j+4|i*%FZejp9dAXE zJ_Z*-TEJ+e6?y-}cL(vgbmu-9ah3X=-RDByr;wM$qj?yfg3M!?CygF!m1bpc*WGcI z@P2Y7u5l_+B6!xT7e!;U@^fequDT(_8QWL5qzb+q6kFXL8L0b zn-(PRgl>+TXf7%f8+AxavV5cv$K@H+P)_qn{?Sl+^_`^j;xx%4ZOj8iNd)RKJMyp$-V|@@Qb5cZPpuAoIfO?f7uSWzGVv9HUwAmn=35$;@B}5^GG%5~( zRN2x$ZEd*=_hv^I9i!?|Ux9+{PYuyLVt>&TisI;50D+{W1W zD+jGxv|}uvwWBF_Mt9VpE-Ww>V*g2WevsR@>zZ~$eLOiSJa`62>&Kv;xWXrZVe@RG zRYbrpx>g*ma>voSRvfKsW$COshTQ0U7$B{U-Ky4F_>GPDQ21}UrY^q7KSWP7doRG9 zn#z~>n!cpbvVO$-&Pu_JgB{7Kt1EYds!M#;H6(JX`zfvUy*G7rjdOx*W!3g=2;pTjX_VG9l-?7f&h_OTNO7gnJ$%qATX2a(M|JnW4_fyzXQ&mF_GSa^dUJ zv2|5f1aEc)ZVxVSy8^|bfNx&ZqGfhCepAC1v8N;K=>sEjj?w$#n+$$7wg_&zc}I$P zgMT0+Z>W|gGV;XyiOX%)|41`9G4{SARZKs&vMXuPHT( zHbqj4`aA$q@C^H5ul?0zyG#Zzt85uguCxo?e3@QH&8cZJ8HN-%>3<9L+1_uxti-xR$4I?HnP^Ps4v& zYU!wgwVMQf^-VF@D}3s+!;c;M^Z3CfsD`_DtHP}Q=Rikg&hWQ%sy-8C)b%w{x9aKS zQXO5VtVgIzTsi6!HCPRx!SExmBPmh?A&t}^nKHV{q?FEP>LEK-_$unxy{g(+QKa+x zG7EsJqH%VO;6@?1p5i(y_#zO}fgliN#-ol1FBvu#crWrEp0NB$Tng#o%0E)fQVOim zndO`*;uu=tOBK>-+OWE$49w-cceCLHnQZCq;8Hra%jqpk7r)AKDDaz&XW7k5Jj&;F zhFN6rkfK7trz-{m(ZuUXED9-vM96EMQgVm{I4L7Old24fU+D78;LgM50DEXpA~uao3tE0 z*Gq`!t2f944e5x0yfv+BIEkw4B#FqC-p1m|-U1^qxqxv`u?+g)k4clIfmKz%X)l#P z5EN^b{V&qkv<`FntmO)e>gPI_2`vQb!x==3{(`zz*=3?gX4!=@x<6AkH=%0Ls&3P$ z&Xn4L%`C2>V_yOtDQk9QFLV(eP7<8I$js_%of4`kWfag;mnzv0`&b}WFUx7pTi!Q5 zp**1L@*Z%?+W-bmd00^aJj0%wD&_pANTV|}&UF?!<+;ka&UUWl&UL0-7ncZWzagY; z<I5Bv!teGy&6_pDnT}rrg_YUky83yS^*DOoyfZzgxQ)nV8A&ef`CAPrWIll8M#edQmWf^e?da^H|DvuVmlbt{)O2v;k zMaCCZ9+55%MU@L5%!U_X1L2=DU4ao?%3XnpTnGl0rz-YC-*SGP&+d@P^E@k>6YK|v7BDtjMi)e42 z(&Q3U^X~D{%U*!nL@(PVdKU|ZTehyJ(k0$#*zp?m$T%L$n)up+Gh>$!yr>`lB)-iF zPR$82g091p`ws+Fl(wGV^G2j#)}#F=9aIS5bJb?yiKqJy+wSLpGTNS7CUCz+_68O? zRUc_{KPOp=C(ZHss`mun@G6QxE!lU8Gk5^vbp=L#tIc>iQM!GuR=1H5Y&WIIhgc#natef7eEYlc_L z{FN-;5MLm+oa*&9(Sm8#8R=5ZuV71&Q{*lP93Sb0STV>q-LJWXruj52cfNh&di?a@xixZ9ny zZ8(zWGMC)Ottjs)q8b>3MJX;3!?<|t!jo5<^(;`3@z^}GS%L(bDt#>Tl0EfO*?rY) zl<;7-$Tb^Y0v`@kSlD-U;6@Gj7i()X7WNfdhXPj;NqdJei9sfFIcUyLT3B9K|8veo8KihN^<;Z;cfqP6xq`QQp%y|BhK3PZPY zXgS}_pR8ufxDNj5e@Z&0%kuQrE~E(wto8Yo_gOGGDvXHOc!}bxLt5 zU{Yma347WvIQSa07&4{I3VRNm+Z^S=oqdW2+4k_ZV$$Mct0jyB%l4}8hXc8e%&0Xf zFkXZ~@%iqx19DR+MTaI6^UGH?svgK>*`CoRl4ET!SB_vuw>w>>x3i;&h(TIvB;a1~^qDWa`8hXgE z{EJ;o#$4&{EHGaDHfq6a{0qSBM%Cfbtw!7w-4N+tS#QK@V>T_8q)bYMCLa&>Ui9Jv zV}PJu+QhR6qQMjaxjZ`B;oiE{%X$Duq++P_=5S=V)hA&q zw7d5)WO*T!VSB;@!;^MFRpwZsV z)?3?KI^CWywDT6+NNFh;@w_JQMOFu|l0&Ln_zNwp zJtXrK+-TM-kHhV2a*v#BoeHiw{hF8zv;H_(Sh9I#Hf;CGL|%Ad_{74#F%NlE5vg7G zAx&Vp?!_cmq09UgTjG#9^#>(XH$`v=whR-1r~$@XUqPqpi03b%AdS z+1q#;hFU6zr4a2sVnmo z{)GbLvD%xq7Y0xDvlR)&p{dTK2M+e^?P?a-M1nuf3h{)7y@B+FrzWZjK6r(o38xbb z;q*o`DEoS`PJF6tQ$I|l8Hhd^EN625(?>{5fO)^Wy4B89Y^Z8BW`Wd8hQZ#{zv?i9 z<9Gr)y`qpER1-o|hg(b4V4hezM`hHo6I#RJfJxuU+bBB?HWubb9y}gAn{3v%)gq z&6PT#e-8qdnsbp=+4#Qofjy^jm!FvF#%@sf8`lrH9tiec$8E3KFbfgt+@o>E_i}~) zpm5$tH#60)YU~Ed6l-_5b5z~i3cco0Qt+z^y-vh4)z6})o%XVSlh=>|6i?Euv;FJM zl^g8lCGz?e-nu62W}{XCwnw9?GWgf$+)49p{7|UiXMV1+H>Vt|%OTWmD9rxD!L{yS zFK6e89_wVGH*`)n8@?r^8sXo|VA$gdVVNgg-&qe{imcl>i^N|3b17ZSY5#-`h*xS( z)#haOD*bq6z`E1F+g!QN$@8khxXX|7ryjZ%)-nHXA*@xtKRc&AORwwP$ZeFZk3f)x7 za0K@1q}C3#32jOa6SVu&?aKXbKU-t&_vKXXr@yy9gDbJGsoZ9n4Fq2ITgTDJg*X=f z5H>5h4!J{6g-%=GOD~BBZC5VswsRY;z|w9jrI9E0&T3@q?WG^W9BlehmgzR)q%G~` z8839{X`bn)FFnn(H&l2!KODN%{osolI{RIji+)I9q3LO=i(|cIPyUeYP(Gj%EB+!? zlS5)0iAQ@Xkr$a>+25bD{4bS%My;*2aO@zkqw1`T76%$#BUO4g#3;q$n(N(T_zrCJ_fH_A^jY*CuloXg3!72H0bI;Cv{( z^=Q{+ZKb*oC9U7pR;v3>r5<_mx5N$rjrVX0m2Y!j-P$cjM09*J!-w2v{TqNm(N@v= zXV6Y6LqRDS?U@p~J*+luQd*CSplLY1wE7ds!J zH44m?8|4iij=8d3?&$H6QP#>xM~?4*MaO5L@3{D^R&(WMZqiX5T+(Q{F;TahFIVuJ z8w5T?%0f+rkBqAOhm>xvY_*r&s1hvunMyzme9p30rDV$S$*uG~tMCc-hmWMj&^A}@ zwWFB7>SRpMSrN^cCbwkFp;$oWH2=&2BaxJ2CKvx)q>Av(1%Z z9<$7qYq?OpHC%jBC3B^aGCkZGSF?IuvwBUr4(qtNvIjt^Z1%iUd;*mIfFfLep{nKb zpD1KSF)vs2h1ywiD+KN{SIR&|_TY+cS43Z?*#td=jL<%3Su{UXQu&d@0`v_Z(_-aX zvJo}xVuM~dyGoOK)n6PS={c*SK(gglNGF%o&x5pl1#yrO+pH+u+U1YW{fy^ zpN&z?ZoW_w^BR~6sh(I$fq6D*leUto)=5VZcw4J!ZRxrP#D9fS^cvFHBpOPqlk#O% z<1Ivyobp6ZPGzFk++;m3YQWrVy&{SL z*UT1GV6L~G5M=i})Rg1Ni{c8?)SXXNwB+f&J$+OtjDxVBC7FY=3M?gglbaTm&hA)gT zS9ane(za5=kx`#j%JbO-1^HP88A|&GsXiH7ShbX;zS|2#96nH2+!Z!)=<}3M`SE`siC4ZuD(#PVI-% z`f|R~n=|cn&hXGf=~OY7fY{Z#(qR0duKQ6{chtKkgF-0gMm}rmiZ?p-DX`kjm2zl9 znzczVKQyZDprX*Su`1y*olul7w}LFaZn+h@??Ro#)z)0OA67uK>ov`yS<#cxtk6tl z1qw71gfpnJj}{$k!}v~$l=T|Z`WGBbGji&eDg>}sa;qtym-B4&ZEnsTe@BK2a_)%; z8dg`%WYK<<{({2xOwK*s;!&rHj-O&SG^774&MRG7xw^mqWu-|v;^fa>alP{aU9v+I z2l~lLE4rj3NrK=Z`!RIX3zAgpDD>VONAJZ$4j&#>_pX+`YX;zMPuhqH9s(D)8h88I z=M>D1Rx47Jr*xhwMPs@nMlZYB9Dt{hg0v@Wjg!_^3Vk{V8h`X2J&qN>kZdw6&_7{c ztYOrT7yzbq95viwFMCp6zot~*F{SA!Lwwvud7rceI=jQ~4TB(+w8Y$;v}<$bT#MSf z){|3ot=HV3nykmlF*jNdxUKEzz1uw;YjTV9!Ij3l&DwndYDoKBpRt=8L^1ij!I;O@ zJWSqXdlMaxD_%Q7AU3Uc0&Ie7q8jq*K^l@ovBNBHM*ci?VSzZ*)zncsxSH|DQ?_wD zCI6fgD%o*a_NTwAB06pscvop#*&0rbQ2_HZP=x87z(}o9N4vU4^Y+5%B!EC;h&tI~ z2-q*TYM(~1k~J-(f#YG*=p^zQ)XTNzV_BnHq{R<2e(-lNbo=H3E^^slm?$LFQmwEt z>t~93rH|)t2|ZDBP@KbSr*S0E+atmppuRHq`i2$u3VHn#LOu(p1bg$U-=Ybn`nSH4 z1~eKKyORaDV+GAzxqxUY%ujZ+K*YZ_crxv^Jl>k+$3q3l`8}aP^54z!p2cjM*HnIS z9_Pa3Rqtis^6ttM{cp{Qmb>^>lLZL}a|N<$?C$*2zpcdIY!O zalt9vDLZ`(o13)0iNB>K!T#*(*EuY6ZukHwOnor?c5+gf=K#?^N$9ev4<)ISN)Rk| zbKA+6f7K~}5KUPfP5E#V%Qkkp<=h&xfunb1Iw+a5#X_Yu9BSiz(w=+T%6-x*J8hRg z>9(`2z>{vv6I`7TZ0RLS&0Ch5drpl^BUX9n$ZBjRWyU*@3oRsGF^YkWZ`i2;=REwj z+vo!V`+#Pjl_AmUhxoLtB{bb*uH3?LPmzTp94Y$Sy}`2#L6NV8AvdEf)F9ph-_<7A zvP(SqzsQJ>3<)z~7myf#7oyX!kaTp7F7>zYHKnbgo@e>jroPBsFgjQ@_e4`xU zTPP5^Qh}M$wlJ1ky_MXt6OdvR{`Ns7A6el@VxWo|$4;iw!@!+MM|C3~Eff0zP}LY#3F;qhTt}Ptu!yz@UTWpU!%^lQRC=Hq1TYF%DLq9|=<-{BxGMXMzQ@L)% zC}=(c0VxXt#y@(+uu$_)otFZT5(#|-7q3+!%!7pv|9%?f z-w^CRABWvTN`7!<6n3wPDB_iA1i_?FOVY)TBsD)O2^2O*x<)H$Y98*q@>CzO*jQ9f zv(C^Gr4qv$H~2Ar9Vc1Kr7`P?Ob54tZ9T00&@REgO+;&*u*Mw@GpJQ}P|;tr_HA!? zwO3fE*aT0)Y(KDG5-FbQM4iJqi%JqH0Z@sObRsPzO0+zPip_F1O}q(VzXOh!d2v_!<@^azN` znPv%qOcdpU2}c+}3zb*Bc&J*}Q7W6DveGwHWZqj4nx4D;Mf(QM?n8~F<)ma<+k)@h zoU`Jo8YbE;26%@vVvgA5tVpfdr{BnkB5%Tn#^7)}pZU6twfpUPR0T(gICd(a0t zD;}$1ot=zDqXu-+C3Z>St>_ZOnO3SIt^k{TeeGHvdpNtNl zG&)}Y@tjq0=&bq}I(!|Bj-&^R0jvN9I>EKcb!QfWuGv7GU%!p{l3^XUl^1-&qvHm6 zYAY-^t}Om`8@pcqVdIgu!pgIMd-bKplkg>un|M3YM{HMZehb7LgGPZ}7PyFd4i|(~& z%NC^>ax&a{b#k0rPLMN>aMawM@akcqWj9DFMh@F)Ldo`bQ%Id1ZX4(Cov_Q_ZhT<0 z%HdwaLiO2_F1%(OKDkOLdvxad&vM4sS) zTO`$rn^Y=JRcq6!(n(dI&qXu3I0TKe&xVCojaR8ae1lFU5#ELVHOvOB;V8L1)~WCs z@V`i<;`FlPI#mX#%KRH9obqqrY_wf8BU05Ts#I;`tW!Ew7OBc1*f#%hu;0yKJ*k>6 zP^rLvn@%PBvHJX{Cam$Ff)e|f#3I#-9F+>}*XUHaq)PE`gZSI1<9_S7q*^ser5eCK zk5m=s#lC=4Md!vI{-?nhY9N9zyO5Nr12y1f+9%Yah?ME)twkBB(mtgY8g*)%m4k%v zE9aNmA$u)los%897G%gEVJ<%(zjT!$c=FS~YsPuj}{{~Estl|U}zm&z|&B`=7tuu3lS z=co0NTp$Z=()s18C6BV4O;pL_1mRpwB~Cr5>))o5u^=?^YKgLm!~AJ%-Ce?(~V3Kc?us0h+%XuUbOo~5VIRMARf7zrbmOb6l&-F@ST3=@Dg4q@@@!RMD#@j}PjIuAfssdT8fLQtrl{|02Hh#RS0$HrCa3NbIFAz89ldAej_T>|* zDv*ULLjR}(Ca%CIR8=gOP({3lsLvJSZ2d)wv*K?_b?JEN3JZLpjc}n*)qs1(DsNkwIdf)ZtgF#)z4au{9K zS^p;g4&yk7Otq-asm{Pug;i3{%gr=%E?fES{+9Xm@Nx6|(<->x#*eMS&+=kHNk#CD z%D74J*hutSoW}wEK7MqwR|2r*=w`2TbaUya9NoO--&vkEypXQ`i!uxlcXYEJ1o$j_ zg8frRHa7x@(SrCRn?DXv9obwYtC~v6*zCETRj4w$`Di(#jr?VBa~R=9B~_L_oVlE# zt7(;tT}2OP)?+6ndhDb`kDZk0v6B)#cEX}IhW|hL9A+8vRD)ZD5&Xw`Dop$MRvTlB z{u6XWQrWP*F`a22II`(m=FD~aH+LNyu%B*+8|B#v!PexuvoaW2y~p40-^-}j4nkt{ zn8!)E+Sp(aC%SiWWh(pG<|QVb(FppnJ|$x03j zDl-D*;@+Y8WfI)IczjcpFHwS-ipC@uOa`qpS5}QmXsQ~M&{Q-k!B|5)&|*?tTQxkv z>IRs*={{HKlxYNSguZK3uWCweDl?)(P>)g2r;kAirmWE+3PLVw@F_YSr|3o??>E*# zw;DC{bU#?;0y8_L7MP~muGb35nAw`&W0v%=8-WbJsD&)V??%>eEU~m|+c3I=y@i%h zeWg6AF>CdHvKnogEQgR!_OwA`8Tm3k%IvBBZE#R%f0@Nvy2<5e6}Npyg?)de{Rl%$ z>>>}vQbX=+e-}e0rx;I}_sn;8vJpKlbrA=~w~R2h_;*Zb^?zXOXL#qX7uq5WDQ&QC zCx+Bl7;g0%tqkw<_;(r`L(SLhoty5%?|#d^FO~ec;qYkVsK0Fj6C1{!(6X@~Y19%HQc_e|L7?=g0T>PI|h)_g>~)qUxFEYRg{p3vssZ0rlIxc;iv#!|+V z?vquX+3}_B4mFz>m1O_c>ap+3;G=J7nZ{2_&PbVAe58jxxXfKoExcdK%;sa(&@!Lv zDYB)^Tt21`E%Q%bW;m5H^Z1xIw9MCbR#{S}grX%6E%S=ek3Aq|7Vr-c> z%pyLb=Le`O^;~kxBfqB1@5+EqN_?4zpzQ?Did$7t%tvj8A)67UBFOsn&yG8RCS_}* zHa!kU+*UReEquPPCES|CC}0m9Vxo&JOY$h>j(flIIp!xA_uC9}+Wb9i(UA)L-?y#o z46jZxm_LibF9801$=B={3O^nAUrH%T7zE$w1bW?jzuYwxdIr$jPi_0hQ0Q4ee{bX4 z69z$7(y(L1^=k&f2KQW`H(t2?!$Ht#YaTFTk@ zG5==&PKTdGhhBSzDNF?w&QbFWYW};;`);?|G+g*YEqv5s=IyVX7z{TZxN}#%{@P%; zLW$Pe|Hz1g3*}N3$4-9!mxl&J&INKq_K`OSL(T^Bu*;j=gCPqK^S8XYJ03D^!VqzO z_osW`8w@!`C|~oR;|D`71oAiUdiD(?qG%zS-q_sJk<{To3YCkl$ow$eGThh##$My2 zo*hZ8{vDy_o1W~y>XvYLq!C8H7Z^Kwwk9#-7Fu@IZ?0VShwy3>Io@xy^=wJn;%{dN zJpbt@PKR4A1`0t`#wMVL{T&P>thwjQ-wcO`1Eq#dF?L3wT>Im{dY6V*k2KbkzQ|~e z!pWQe;gSAuiwPX&=MivsmZELn7M9AI*80&RIfE<|m^?Mr)*sEKwN=fTQn2 zbjNj0R%>l!-(z~G18Xwb|1gkUvJnHN%bgs>I6EHWUy)UILnEVX`s-BnoEYO4$)Z$g zXlA`E(uv~!)hLX>cRwY6r>q^c3VdBZ;!k9UJY@O0WNbX$B5r1_{u&X$R<5s0PRLUq zo^?Jvqd!EJa}^SFWec1o`pG9C7U}y8xqrw>CHLRa_t|p)748*lWmT7+=#GmEt0H_D zg^?VsS;JCAof5BXTizc?bEE8qJ=&gQiT@ze6Q=qFUyRaqH+5L64jHPGUS>r&orfR zYRxx+LxKw6D=hfwrlTkuW>?FZS9 z-6ut9h0&(lWN^Nlwcu~_-Y)jW$h9?@j;UC^ z@JY9^8ZJnDO5|?vJ7Fg2g13ucG?hV$|opx1^D6@F6;24rH z!cl`zp$KISjrd!xj*g}eL?@R47v2<0JlIqTE7IR|I{i(jQy+_2xJ>5?ioC?OFr4Mh z>EQ)&b}K8&%az2yLe@ehowz~hk;wl*MA^H%`k~hm0SOFDbp{*D|;+Dg4VsY zHpTubH+G6`v3k}$ndBWcM<AK*;;5hXPeB1EjuavB`w~de-kdm#jYW>K& zza_3ZcT=6N%Wk#IhIO^i!j_K!WlJCff`sWYT#Cj7pMWDfHSDVxs9ZhsA?zZD_I3+`DMbEE zIJ{KqEag-ET-$tE>GVj?A!~O;)McaArXcJ$@93%c_QB+KPwQOl~G9M#?_N)qyqp`=Dic~8y95|{&5*&Oh9S%?xSySff#G&M%#`<;DM1q_3Vj@V9e9l}c zzR0tb(fODpV!tBYF+0gQE_76ie7-<=jBMxh$%y8b(3i^m)dbe=49LL*%Cc;Ve2q>e z5yiL(fhj1#$Q>W@3{h|8`UzD?5gn5ZCa#DyLv$tntM*FxkS-shmEbCD(%TQCVj0zp ztXHmul=1Fy%7T1vaqW7Uv>uUAdDMF4v%A zh*xoTkVrh))APFn$*Ngn#hZGRoF_SYP22(5Gzm*Yu&k{;|C{LyRF6>1?8;#kea+SM z9x!nyL^@b2Hy|A)`I~AE$*vFMjrAQT^S78klXVPV`KnUOb??u?QbnZVxYZK{A@(Tc zl|80mtLkP4z8tzubxs~)vCzMrmK}p8cO0rd73}lW6sjqiVBcqJzNik(s_T=z0%|f} z9LA-tPo%ph?L|@7b$zM4t1;{P)?LU%!!HDdV9N-mQ`8w+W=VHcG7i)^k`Zv+cG(pq zCL*(eB`s=>h#^1DLJj49LX&N4l^t$M}|=Hjne$in%BG7|3GaZ zRHSegXwI(8j|nN4`DBYmwzOKvB~}#~Ns%fPI8`Z>XQbyI{N_B>;AlE+q*90YH2eq+ z77FffLf-CHg}d|f!}G@=JJiBG1LGE{IEt&>nmoPw7$9a_NYYKbQ7Cm*lU=+A1)MKG z{9+XF6$)_ZQ3P6GNlwJsu2)DaJdpQ^7e|vHmp%kj)GUMv)wpLkB}uD{Y>@^?bL1!- z65+IGyJ~Out5&XBEpQfOMB)5_Bnp|271m#gqEuiSby>bbw!+G;c|nQ=p=_?%Y^X9{ zW>>PUzR)AdfR}@p1asBrdLULz(Rqsr{IPR9iK22cbAcm&m5ydlkdML}VOF`rtP1D3 zOs;VqHzsv!j>&ADN?j&b_^uihJuPf6FtVMm>3nq2A1~vb(n(xX$^^T40shfmJq z$*R7E{>jZzjvW46lp~{&&hv1jUJktNj0he9UrGs5pJH`n9^G~zi7J4I;Ni+YCKUjf z%WTLeeYB)ttfb!n;5;QY1f>ul7E-G;_@AZtpDbcmgt+VR3BI`_wK2HU&jS~{6rmeV z2!%(L2^7$SXe^CEFg}p06^vgi@Jg zPMzRy!`i@2gCrJsFU8==z}lz7vX3Wl$)z!l&0H(I zaa7S-KA?)G5~tr=_lDRQ)tkPH#2(ut_Udx_9!ga^=BnCTqFs|sxF&L-wz5yiYl?j> z7XChQgQ`>tacu4mmGnQ*u1C!NJTPLW00#RmuetVh5ye-8#SOXt9vE+&Ky8ard=kqO zQDDr{ZlkL-e{;>gt|Ya4i6mB7iep&!zHBxe;guN1&){KW7-c)u|KAK_+YgmuqWy!D z>f*D{E4DSJo8}3!2y~59ME30GBLAZ1u}qmq*L+#c136}s5rX8nu6`V<2RyRAc^q8p4-yy%MjNX;uy>}jD`v+pS`F!6KfqjFhF z+3+;5?8#mUJ4l`=o71re%*6p(;BR;%sgN-3b>i3!yF|Jah+{QoIbO@1Bty+m8^x0u&b3PMhK+OO zIq)xVOWko*DF#`RsyItBL-K*pJXj>QSt!7*n_F=)1oZ)^vy+=BY?g1gzU zLYqPX;T=e(2RaA9l&0&{kCK|!TCN-Q?2werfDS#+NQA~M0KY*JRAiZ?6J`}i`r2EN z9_gP#;l~|VH)vP|Ly#v4w!Tn6rIMm_60ihB&FdsAx7teckIXN!j)wkKJY%u%g1WNr zwgdQW5d;eUB*1}Hov%p}&V!VTOH6P!#8!rxYc5oE37xpdWl*fja;|xD1$db@!P&|L zi~Wy6iG#)=sdMC>t!GM&i4fe zmNbj`&5D`d41a(AF{dhd0K)j*OzLPE!<{molgyt&F|#2=3SmW2jYM8%XoEXjH~_zd z0g($GSl{?mSW%LyeUbA>D!NG#*R209F}7lW5g!7R)IblnSr}V6)@?w7rmJ>mHuP#< zd?KUGh8;RZhBC1k%EZPC4bpg*14}IXr;|WTu#h0jZ2kc>WD|VRW3K9PpO&rqZe@aJ zC=)zWnc%tPQYLt|aF(rU)pNWFmUOgz^3?kzkut$fHpc{`_z?XW7ES#7?7`ZAC zeizjy4^poMaq3lxCuwFgH*z7@fTDoR;*fiWt9B0WX7R528l|2hS3wqT{+Thooq@YSH-ea=qzQHn#_-(0~_*UX|hN|eV~fj zaF8b3^=;A#;}zOPF?Pw6G}SND)vt_JUqmKW{e!X8(o%sVUlp9wBOEf;<7)JGGCC~4 zW=03$exsjf80OOD+=9=nU>+`nCno~> z=BXxHsG8{0WLHh}DS=b(YgfgYG*Y~O&|3=@J2^0TA-{;BwQtqwpxFgE7C;C?ki|`XqwCQQkT%}H54K9cc zR4!nQgcfYpKg12Ci-=026<$fBoyXN1qDv1DZav&eRk(H2bbl+ip#Fz_(MEcW1|#w- ztxOQ5IYm3C(ax%ueA3K3a*cd9mis8akFAe;l>tQ6ys6zkc&(eu_qdBgLHZcW{vIt` z_P0Xg3R14xiNIOGjkLY-ycMinwHNdD8EyuYRhowA)KBS*DKUusT9XM8+|gpeXF@E& zJ`zxmxdNQ)Y`G##b41tzL)6BcIJGewxt9!ul7VZUT*>%P>Kn}uR8BJWSw>cBY1XgO zjcFdXu$6aws&_s$NH;PRb%UtEYHF=1nnn#Mm=>4>&e8%okX|XIa-Nk!x`mvoMTYRl z0p#e2$dutxAUm~g6|Tpc?L;I&7x9w*8f&())1vSqePyS1Gp@fMs|G$LS9Ud&2Z9meaTUNs$g+P zzZ%PQ7#fpFz{$bfQGFRvyGAMtBnL*2LV!t%yePFUi^2FEDeNcXR^PF~gc=An0A|D!)u&?Z5+ zOlTBs_hj26mL3i?HEKq8`^ z;}x_FcK}f-Xi20Lbc?!i6tvdNel}EqIZF0H=L-F(u;lR~d35yl2z{^g_9=Ew;Jwn@ zNA$hY+wbUmrMKmXQqkL@sAH~H@cr1-(l#bCqdi5}15QuT=Zr5h?IiO~Du$(vd!ZvY)4h%T*_v0}fLL+6n zJ}HDFI{ecmlW&^27>KcoQEL7}w#SIgolxw@BM68es5RrJ+$Dm5zK_S5LLAMO-m<@@ zXXy0suYU?X7*4ktKbGhUGrxWQ7}fk}!iO+2;*B&@Z`-u5w%FO_ws~KKA}NG$r!tdk zf8Q&6UH!ymtqHzkbVS1cxGaey93H>T+W$zz9;Kj4N^)dwtQ{{g6z-<*y9vrt#Z48? zm`zCIC>@aT$AJIm~HRdnP^XsrISX0zr#KCD0_U zkVMv8j}vv!xl45Nz+(xjQteK~tO@MRu+%9&T1R6$e@|*B=bA6Y9fne+OHUz7vVDhV zQiZ4bqTor^G(?q|*q5$kUcH2#?tf8ajYDXHa`1`#>HM`&8CNp+h{t$Qk_5&E^9_}5 z!G*$0`&MuM=!X+7X>phstN7cT8mB6bYXqsK;`Sq+{Ik_&T(!P0T1`AvC^3nmgc27G zp~NPtu3pXaC`qJ0!K2Tj#Xc_v#EJT2Zj3-bnCrF8Nuw5AQQJwgsbR4QI4WoXySvs ztH^i`my|Yb9Wonkq$Cm)3OZc#d&AGRY-} zVJfhs&@7BP#L^!k#)P9^H7pr5BBet5Tq(yzQ`VOtGo6={-0GI-%)rGWBlZBXzq?z( zM5r=I)K;pLj}CQ`KqqsFY*kG+KCY)b9lhIm5`-Kube51AR0Ar7j<_%+a3|-2X?=`g zh;2d3nM=yF&Q_KrLs=4u1DxjJkEFs`Q7S!=D1x-~aE!8Fzub80){l^%M;FsBpGk2{%S zPCrER&OoJ=<|@o1T`X`@t@$qdK0@heu^Fz~dnm97 z(@2z!C@U#_hFsEmWG#fRX9ou_A2X+J$#3o1YL<8R?C>8>oG2$iL=xF0&CPxUhtocb zkeC+R@wul}A7q7tHN1+))=6`^I ze29{{+GXG2RUtA|*VoWrTSQ&c71+7nkozSNPh+DPS!s5CQ`PT=QvO{bBRL^jmz#K~&6)dZ{VHrA-8u``(j?Nzo!MsfN_GzSBl}H|@7C(~ zC{5)H6*LL~IT|Q)OYJxz9Fe+%36~K$@l^p)QY}iUD zo{km{z7Y#X1#B|GCAQ~8*idmL0TJPpP-T)kc+kT#n;qtJM_)%tx?Yh#na9oN_E>w& z=Q?B@+?B~!-fYU;+_TSou7~~S1bL3gp>a4SJm$2H!>mAyN@SqImLsvU2qlHsg@hfX z@TkU7rTIH+4yzs5^O)2o6EOsR_I<8U8*+a`jR#9X

$ypK+B!?mQXd@0s=TX`_AgF{|hdM_rsboxi_kFXXYO zva4A5P@4HH(~|%#K_nB4J)=AF_gTdrYpOT&T~E#9NP6mIBrKyVNgcN*Vnt2URTVo} z@CjlIuChI{Cz(6M@D?Wzq?ymG2ZjCa#FYJ`k6J1FIj@$dTk^Nn?jU`Ihy`*Ry33HT zW12~2tuK_)BenCddrdfP7p$Mq!**{Hg*-7d-^lN)d7tx|r1~FON7#^z=zvUi$0V<> z_LA`136@(7Y>c>(TkeCfH-$<$Y7o(=u!>!^5@KeZ3>G}@!neEA6`IoDu+>_<;Df@h z#3|Mm(xH%If(*RKFTRX;$OMu2zb9zXobi7^6b5fgv` zCIC5%iUVLTy0ITFE$})mr865V4S5UmAC@>u0g9je-|W*bn&UcA(AR4iJTH-M8^o6o zNJL2v0w_XpQgL7CUbigJFqdEtq)<+9q4|58w2YKRWhBFYSj{}6)Zw9jZ`VlM^zSV} zLBl`l4_$pdv;KVAh>YH2v`C38jt+enhlC+=@g&FOz9?nOJd3h*)Tgz z_n0_yEM>NM;6h7&~go`}UZ zONnf2Ep1xSC3PEIaA@@Whw&VdC=2I9F~OHnJp=%WO?E@2mmy5@#L-r=qdsDKeLoA3 zr0pV-MGCd6Lq%V34T@{MyhHQjpr*eMc_v;ZG=*(>>i4(04E;$^0*DzW~Z@1Q)&wS)|v|SD~n_j&` z@M5bwA)4f4RW_#wju7)Xe=N$JqB8Wdw<-1rp7U4NbTbFNuXfbXbraH9Vx)DbWxW;o zjzkD*(dM{x_!A}GQ2WPZQ*>sDlU<(|DNzFL2=mVf zp5&c$v{K0s>my}9Y>5U3}Op?C@nVrw+dUO65R;M!q||a0Fq%xe2`ZpK3Bk8 z7GLOm;_O&QMQ5*J4y;yXqv~E?7f;S1V*{@>L75t;E8Sy)q*+45Vy^Bqymz~(Np;Ig zr0b=l#JhVANz}}>@ymbI>YfL}jHhM41Ahd`$OqJbx#gN^DAlu<)n4EAVB5!59AOO^ znHgBMCaaB{n6+XRy2f}J{cK_RwIFF;ZCyo}v8q?<0gTgHZku0o4brl&;8Osiq+ zz^j~X72lm6?L}{D91xRJcRPZfrUtSJeH(geef=%iZEkD!^kO6m1E>Y74jsfAhkuueFly*O^ep_?~f{(SKCh58Fqzd(jD}!I4I(z z?GII67cJuR`5&3nKGIutEVvZaC+1s@)bXhLQPA%g;ppOcu8)8D$p{HMWci^veKS3+ z;Gn%HVu*ZM5MdSoxY_pIZhJTzujH?HM$@3na@vF##6Lkt%z+Gxjg>=wr+XMhV_xD0 zicYa>y*R-~aiZ{`dVDV!yD(tZHuIS^jtMJv1=qSuCi!djm8inV)5Upf+9KZP$~;y( zjsy(Dh>Q+))lwrzEAc2KZc$F<#Kf7kmtuy41&dtOqpT6=1C(z2f+Lf=5^0V@R_MeZ zG!+|p`gVh=bNa{n#(3Eu>lY(3KHa|B)hdilY~6NPmLY|Tt`;jKYams#dJxrzh+k)X z0J0v|9+1&$S6O=w;dK*nIi91fjMecglEg^4|0Lntx;}@m&ZwJ)b*}@{B{Lna+8Nf-p4~7#D}S>&b#tgdXqJ}Q1E};+?qi{}r*2grdbX2w zYG==OdS6l=KEF+e^K{RZ(z9)2Bf*Y~cssTF9ixA=obsHO$l4%YW&hT&)>NlhyFPoi zzkh+4f7?B!=YY{Rntj>LXHL3x_lq1ER>4!aO1H48C2JBE*=+DpKUF7>u?`ed)e^u; z#C#M3U$tL&na`$mmM&=^{M4xk<^g)aq*>SI+b0+IgfyQ`f_8XFNYyO z2%sT)047}hFNiQ9HS9dFEtqFb-Unc)=wt7W?!o)?5TT;Arpw2TWAIiwhQ{E^hdnE~L!oK+0_4 zFjRmy$%;;g@O)*>T2Zh@T;HT=ibf|Ebn`BN%@&>&3eVIK(?A$Nd?;+()JUNkcamgy zm1>YmrkeEBh?t)PVOkKayDDyIDb~98FI0L+Em6*&Ck6wtQ_l{kR-4cXQ+M?2$=_s7-Gp8eNfYZg&SEXB8wt9#S{(koP{EU# zTM(L5-JAyx%|yOBjpkfTW5Zxfb=tG1jIJ&X`Y1LaIw(WkvMl(yx%}e|dQP-K@2-U( z%Y16OiiI`8oo9VWhRbm?u9a$yg3{C4>-tm|HeH$f*c@`KNBlFHrv1IJ{0J#z-k^-q zt?dyxC?}>Fst^YmOdEluy_ixEsXno*6+_N*k&zvd)_8cJ7vxV0g>a4^pXqpQz z(s@%vp28ksxYd)$D%5CajMqh@x5stIa$m8|($dSSWiJ(pAk7MKtZ1_$8GETq8OQPB zwjdxGU8DJ)8v>Iq|6z188H_#o$L1$k8P;3HlVLJ@ndO-cSBuQBiLUBUrzw?CsmIrn zZi9HdU(nsKRY<5*f|_y|(#rLKw2V48tLc0`bL>HM1+3@+trJM0G=q#$>s7E8GST{~ z)(msvG(%ccCf3$K(dY!{T}*JYe3Aj%F;Gp7sSRJP6$FlqGsh`*h4{Sb(#DmS#vJEf z|5j@Y2R;WHTsR?_`6l)CY zT*qW?uf3E$v`l{@OStqX18vmqxt&%}8eNSZ?`f4s>v85s;76dA5;ieZ85V}>&xojq z<9~{%GFU0zharWD6va0ITv9{qekIyC!S(j_&^%la$&SCDEMQr zKhgYgi^Wl00hR^S1Nv8F=H#L~@4RzZ&)e3T`!~v+!O<%lL>Kxn8rH6tX)gUe2Q&9P zuaO03wlxnbMk(jSC$i+KkmChB&WP^h?T^UN|WG;pgb0v#nrQ!rs zK9QN1=mC{jk~snjmp=Q7a*mRN&Y9~&`leU>klN0n(W50o1^0nA+Bc_+t^^mBTA4|X%CE$KAdU? zS27eu%~O#b-PKep#1%&(_u?Z2<4@O#jXQl?fQkN*xr7YFO13;n73}Y!&eB^n8@`Qf zQnfOSoGOfuDJ}i|b!T|*dGIp|cW2mZ!ZE@grMK&ie>)O!(4eG$S}ejMC2W4ZzyE=? zGJa7=!6NN4Y7kk=;Hysko)FT3B}hg~Z)I>xr+9-De37w^SWL}t_D8?|+WD#$BYzX( zrt>1!J!W7dP3h_(lfh|mA#17N8;i>Q5t>Gdt-fPukzbI5Q{;;pCKWVQ3RK&FfQ%aI z2*_ZYGe*Llt_!tIV^X1OjgX^-`SgL&q#>h5uRp9@8__nA_e=i|$G!f>*o>-*td$fj zW8)SNGWCOLp*f8CG)ym!!*t4EOwIZe;19q5zZ>6rRiYNpF}}4&svsQuGImXke1TSM zVC!BsGF4wcabW8pElQ;rG_du|K8M?8gG9nB&FCR zObCcsspP#fIQYTVG5cD^zNANzr-LO?|H<0dNfl;8ftpZ36XeRae<%$&B~v-k{ z`a;K0;nGrTGQ;^D(j#K|Fetg^f1Pynd9bv5NWxrb6A!7j`;QcpD{hmFHd8}chMKE- zu!&b&oqDV}EUwK)H>XNT=WO z$H+qsE89|(oF(4nW%?~yT-;Y()<|ZQOY_@mk7b^!y)67rg2llkRRiuAg5!;}PX1@c z8DObOomZ&4C0TJUs5k1mO?eQu)@WgD)8iA)9)E{rqZLF?_LGSlB9<+KlpWT)v?#6Z z#-3uIr&xV>Tx3Y{g#Y2TM}_V%tTDyGGoG4FO!|%u7BtCF9oNV`op-aFn23i2&ZR-sbcpGr!AlqVkmdDNe<8o~;jaO2Q}qREO4q-& zhn*mBAR|2|2;u1E?;+)E+_xt5kSjm(u+Mxo68vaVFMvTY*!`_>R zM^UtW+dW~GHS9YK`yNP00uc~G2>WINh$4hZG9iH^6K0Y?5ZPo^L_kCk5JWZ+5ET%W z9a#iKHrW+WL_l^B5QV(w)m=T)M7*EpeUIb&{<<%{()FvVuBz^?v%345WEjgYcWG~~ zt;J7`aF`LS>$hXto9VT9$h?1xU)+#~7QLOxm)~engYQt;wZTs9x|b$zJ92}608T!E zXi?)Cc}zKWC0l;!Pu9B{myR$+`1<2C z9X)wuWzEV@iCvb`OOem<)dk;_B?K_^$|T#vJl;9>X~{1W~PzNpOO?3?%@i$5T( zl{ND6tF1rVvbY_ugEz*T;jQrwcn`cUo`4U*N8l6j8TfpBIsQ4m8UGePil4==;D6v+ zIitUVY)j)+@dkKPybazJ?}NwTsdyGX4*!<1zQy)EdM|l47 zkF!hQmGQdxTJ{fS+Y0Z5Z$$TEI{+VyXX0b0deScj@;!tBPrBqit={^EkF%{V_5NQxXMbj!W}jxcsdJW_`R4Zj z<{188#{0B=%rTnVIh+e|b4+Hwsm(S_T`Kf(cF(4dvp3Ov~S!qr!%}FXgDL%C}LvyAwWT!h_8|qAQ$J-Mf z3?|Vr*lASN$E?Or%N|$UU}w7K9G2#clVgo{q&pheQ(fuybdK4n#k-`;8!u$GZJIMp>YRqundVRt*@T+(^GTQho$&u}L(_;_cWJ1Z?c z$(5?Potbg*c1JQpwI|SRvO1qn)OV(O>nFH53*Ix7>SVNX+_gP&(luQ(W-26Q%EggP zb&gV!JRa%1Z3jCi){)|Qa!hWIL*L8pO4H&Ta=a;y^ti+)uX}7pQgS>O)8larbTZzg zoOqY?AwPr zQqw)&6C3N~>^b5!--SzdWO04vqDVoOJ2@ZE zhtursS)E;VVT>ltI>tnP>d@RwdV6d}LIN!(WF#kR-lH^g4I+#t{yEEKCMG2$#c@f@ ziEc6w>+o<5WfCS0Om(Eo`AqW+R`c7Q6wfSAO3zZ`mJ)S26O&TYExCeRoFh3o))6;Y zWq0ct)k{aw7?m#L-LV6$#cF0*v()5NS;Lc)VwuWGW?#CNS?^{NSnIIcleq((>FG%+ zPFF&_BdbnbRh7&n$#r{kIBZ9ppy12-N1Z1wSF$s8V0xlzkC~b-IJx4P^TNMOcw^#m z;y8;gRuJZltU5YmS{v|*jEJyDWUzABd$MrYU2eN&rOQ#{UkZCjXPxOx+UhC`3&Kl; zWJV5?mGd9jZ97ETS&7_Sbd#TM%xQ-`BHSLEWoJ4h#WAf@J?U+pKLc7< z$FQW7j1+rBA_r`5>rCS?BZtMYv@w>pJ-bBPBdDF^v`6Z98a*f4IV6L*Yvx7EUCCqb z;o^+Zx>2#4%ibfhtGxrOg*UIeaXVsFCQGej4HyOsuYTP-M}`}#cY@r$v}gxs0k9IC zP{q+2H^Fr0Fj=gVk{Mr=GtQaBMDnu7s*~YP&1#d^hHS(W0o_RdtNTh`?# zj;NctitBeQwNA*=C9~EzmV}}D5@d)72Lqy24;RR(Zi{NQHY)T=6=DXaCJkpCi7t;? zevLwzr@f#eK51YQhaGJ$JNnYc8|jI|L8Md*QM8P<$#L5fPz9ifQe1)7l%x z5d};jS?5+4IJfD+iIs8YwcLMJRY%2}qod%D= zN8&T_75E7}Z|39dig*y-LDKI(&fbpi#Si0)=JS5THWinx>6t1$lI;Y1s-;Zo%*vtP zM|V_hU0}O4N4e~CgZ%spA7`(|*W;V>fqj&j-OH2FP}o!kw1#!O2~X1zA=t+M7BbB0Ax7NLe>Z6e!u>}HRMjOy93UB`&< zo{@U4Q5M;)?Z1@#V=sGDqoQ-{|8Hf+o_#_Z zhuK+=bL{k#Y@>cubhy1oRL9;NrM+|Hi#c}t_fli;f8X=zCB|Nn-6Eo1?9nr_?SJU` zf2yNeiug}W{9B>1FDt@-*!iiY?pQ54x=Usgjax@%pz$*xP`{JtKQaRYf}}){%f75bo-y$(Z~Id3YJFxd0=u0+DCMi@tdRYULrZA zva>30(k%Gt9XzFtrw$@VJKlaGz`0A8j^Y1){k%2)^;o<$WH4$D{NsSUl`PGem7W-} zx1y!Be;&KHmZiD>P|MQRf9}-MoK)=Ay<4OvVF`7Y_rAWXw-T@BvBA#!v?Enszj$4; zyp(BL&M-vIFh-+zXJ(@eH}CAO6ipW@%{_T`qu1L^Z`*Xp_kV3&x8(G?%YC=^4!c$C z){BeBwwm!n|B4^aUXkyFt?z5aH;)gjvE$W3z0&(_c0c~~r_syuo|&6|YwosfNpmku zXutW!uKC-F?*E`r4OfH94Ofgy?{wy)H7}o<^k-(&^Uuvr*%i2aPwiZ5c8_{-%bkMf zcD0|r?1$&$_U0W}w{FSt1-_`=tZIdTzf&4?Em62xbWcwK=hp=WWd?k^ea!dgxtq3dkbmiIi_7ItZd$p^&&BG?Vj>5d-Js4lY1<_|KXpTZx0)? z>yM2*SKxUzJJQE*-Pr={CkI|0!BGRky4fqcH z0Dcm`fZxE)djDzrka~GGvoG!Wv#o&F!UORZczZkw?}sPi9(*J|8J~$Sz-8YRY}esi z@qPF){5*aYzmNNE;kfa#cy&Ag&pEEJ9C`9Jz1{Jba3`LIzk*M|r{nYRW%y_KCfwTI z9`q6XC;T#g7nkqYm6tGyUKlfzchJlvUPtuD6ir@{{;g~%Q8L$1k6n-GSl_IlEEs6K zDab39YE!4d>_>kI8|um+8l%TiEboFT8N8n~ke5W>G-QAErjn8t<9m-cVqY40dQ0Zh zmBc5=1Kji!SG@P3OJ%3KVulSHX3Zr4qlb!kU*&ZrUG^p5^Ryad^FkY^S8>EY(X`nJ z+0sBthKhk1V>C<2PEX>oP*uq>yqvXo`!X7P@+iF3jMAjk%ztTz60?c8lr-xB(Z7AT z)9sS?FNS2iIGd5fC&Qh_Zkjxv89__qQc18fudwGPr;;MB{{MQsId(Ujqt^3g&AlH3&}0X{AU-yL`1IBCNL}_cb3z zz6$z<(QCMjfG2(D97?=ip6*Z)IAiLhN;px*XUrjUCwX(0X{Hy&5`HsYeavEGJ|!6~ zx_o_^uh<^qDXNsAs}tCO=u$j!#^FxARck?9hTAP~_j+EelQ*vap^hVgK#SgtH*RT; z&5ZI&SW}HbLVjj3L)2sBlBLJ(<=`#hQ$>_7&TjT%Ho#&-v^Pax*Cbpj`!fi$*b>Sk zWbaAzb@DHjeTBV3(HFq+#J53kwuch|lIS&2Z@CQ_K{UA;Npz+m0iXX+Bf^oH#Bp|%z_Y$y8Vf~RXM`DK z){Fj;Yh=jrL;t{3{miRNnCc>r&m81)iZp%FkRy|qwMegGe4g{qxg~K^%hY+=^ph(8 z%hvSJ=znNV#_o)ZBMhYn`!(e6km zbP~&>fw^Y(=o}GUy{U2J&w4)};R4ItVrk59YEM?-`1B8N^amR!5kdI?j{BIzN!xYo z5iR#iV{*x99!g8b#n2~7M9zS=gx8ccj%cD=uGU6I$*sorT)45-H2K{ztIKDhR=>$F z|62X!v&68@6K6Wd?**{EgBRxuEk)O5+Zi8yfmj#*JN^Q{N$vkDu{ZpT(voNOg_Nzt zH{h>a<2m#$zYlPSSl~^=_x@pQx8CC!_Uhy8@+$v`+B&IQzep~>eDb4w9&Nyc4mM}5 z+Lp~Hmxh5hn)QxqF{Hd}6A(pzq`74+p6@+AxVlJwOmqNUcT3*H@v z<0MCNH$4!GG+@{>6%yC|Rm>nX=`K^70ibR;paZUbR~F8Z~Rxu2Z*O{RRyK8Z{0K zYNGX6cK7*cXZXk+i_4Us)xY+$`v!m9{8r@rDj)ZGxbp2>zjW^Pu(ADKO6IERnfoWz z?Be&w-^YLLetciOouk`^)Ozc~*mWIW`t+xP6~3xDyU3Nu^IISH^UG+oqxj7(V?KPh z-J84qJTmyVn74AhGjB$z--oAcIrU=HI}KmkeDp}w^geZy&UI|N=i8}+CU4IemNoV6 z;OF|x`EkgXwbyq)zq!n+NjDQ#+P_`iqs$ zuI=j@z4yw_2}|-fJ#u?uoyMOn*;4(hLAm^19$Wfa{fgheK4WdxvYWT_-TC0>q;B8c zJ>~pibDq3aVuKI8{&?v(^P>ZT7xucdDCqp_c`|;#w>a$TYXw)_7|=TJf+78%_fOsQ z=j&CUYnk`QS*!Cr_hY+F7rU-|v*+|Y{k|FEI+{0kcBvi%YWy|3+`E@I9orw#dh*cs zPY&GF=F*x;Z%oeDtZ%vBPG8@X)xN-p4=xvNGveFI>`hPHydBH@(-(9)(&eJ8h^5AfvQViPCV4J@7!ktLTh|Fut1@rzrFDG;aS($ zzCV3#h3-4Ij$ULx<4Ec}^rh0}i&rf0)!RS+T5sXjh;!9iR4P-Uc)`NY6j`*B=cS_2GhAw)-3ZaKF5>c|zOZk$?5gtQ+yhnO)WQ zCH{SFecY`J8}^JX!-TwVnKhdPWhnj?#_+guXLyJ zXJ@WPO(=Zumu*9nOMhN}&X;K)J?t>EShe`e?Z27w_ww?sZZ160;MLwYrZuUyyIaSJ z+YU85`FPRZDWL_A&i;PPA4}`}G<->|sb8F0yk%9Z3-h0CPmc@;QG9H&F`DfS-EG~t7ZLDI63#XuMUK|Ivssx!Ifhp z*3|vvv&Dgd)mznTJafsetqF@lnr`ftzI5-{zt|K5akz#j}U!wesBVm35$G*)2_Xd#-$UKf3RVM=>Q`EzeFk-FDcRJD==*?wiCf z8wA&A7SsB}?d~0wN*Aj6^Tsziwx|>SPT}k!w&h_zeO@U4ybEhjOxxBw-Z5_9D{1S4 zen@{gxkH;5HXH>19^fAh{yV^b7WnT2|6AbyG5Eg?{=LBe9{5iO|C-?cH~1e1|Iy(8 z7Wj7r|AF8?8~o3MzaRJ)2mcSje;4@w2LA7W|L@>`3j7;_{}J%73;u1ve-QW&1OLI` z|0DRX2mdnQp8)=A!M`l{j|Kk$;2#P8=fHm)_*Vq~nc&|C{L6v=MDYIt{Hufi&*1+8 z_}2sfeBhr8{NDrrCE$M>{67Q#ufYFh@UIX4Gr<2Q_i9r&*U|2*LD0{?9AuL1t=g8zQ-9}51Pz<(0> zHv|9E;NKqnFN42)^QQ*>uYrFD@Lvi3-N64Z@b3-&mBGI@_{W2PRq#Iq{?CH{r{G@{ z{11cw`{3Ul{1<_L68M(}{{rCuEBHr%ez?U|4Z=S1ODT|zYF+(4gQb7e*yS! z1pl4j9}NDP;C}}E6Tv?Y{P%*tKlrx>e>?cU3jPnkzZm$ZfPZK3zXSeP!T%umCxibS z@P7#Y)xiH7@GlSkC&2#(`0ob)ZQ%bH{6oS2d+@IV{?bJ z0{{Nt{|ESQ2LBP@{}K3q4*t!-e;N3vg8wVv{|xxw1%Dg(F9&}o_>Tnt{NR5P{7-`a z0q{Qx{>Q-o6YviN|Hk0I75tlm|5ET@1OBDJzZ3Z12md1A-w6EQ1plt!-xK`Lg8whz zUjh6#fd44)&kg?lz~2M@0pR}<_(y?%6Ywtq{!_qzIQUNm|HHvs<_@OOiMA@F|#{KLV22>Aa5{`0_p8u&ZF zKMnlT!M_doF9Uxk_%8iK~ z{8xehO7MRc{5yevAow={|54yS6#Q3%|3dJu5B`bZ{|Nk(!T$mH9|3QqpTYkw_-_XPSnz)g{?Xvy3;fT6|L@>` z75s02{{ry$2mjZ>KQH*_0sl?l|0ekN1OKDoUkd#H0{_e49|8XFgMSQh% z{C9%C9sE0ke|hl#3jFJV|2gn41OA1eCq2mg=2za04I1OFeve*pN`0{=h2zd87i z1pm6=zYF~T2LD^&e+K-=gMT&fF9!ZKz`rH<2Z8?w;NJ-R8-sro`2Pa_rNRG8@b3Wr z@!&rN{9A#41Mr^){@uX;5cn?w|AOE@2K;{l|Eb`=1^nlO{|xZo5B}}IzXbSi0RQ{o z{|Wey2LHFgzajV+2md+X|0?*$f&bUwKMefKg8vub{~q|Kg8xPE{~r7=f&X0a4+Z~c zz<&hze+K^5!G9+BCxHJ(@ZSsm2f_aY_|FFaQ{dkN{O^JPG4Njl{$0U8H~6mu|4HCq z1^k}}|101h0{-dX9}fPN!2dA#_Xhv=;O_wcLf~H#{9Ay3ZSemV{C@@iPr?5z_3}3jFhce=ztj1^)o>zXSfSga1A7e+~Qx zfd3HiPX+&~;Qu4|KL`F7!M`W?e*^w`!M_Li&j$ZZ;NKejPlEp?@ShC+<-mUr_>Tbp zHsC)__y_;d;9np7i-G@3;9ms%$AkZB@NWqIMZy1N@b3%$q2ONt{9ge7>)<~Z{I`Pt z8Sozp{>8!nZSY?R{?)+00{A}z{%?T)dho9d{fnD3{4aoiAo$0D|GVJ73;a8Q|JUIEC-~O||M$WFGw`1P{@cL+bMQ|C|C!)_8T|hS z|C`|dD)=`6|Bm3_4E*kz75u*g|LNf075s02{|fM*1^$P?e-QXL0DmX= z_Xqze;6D-k3xfYZ@IMXy{@{NM{EvhG2jKqz{7ZoUN8s-O|BB$>9{dl3|84Lu3I4mm z|33IX0{@oa-xmBo0slnsuL1raf`29O{~7#SfPZ1|Uk?6-z<(|H_Xhuc;2#A3$>6^s z3VQ|{g#Cau#^iJ0C0H|T3)UL@5PKgRgWbW7V}D^IuwSq+Y%DexYlKPQVImfcO~v^A zu86kSH`q_uWo#eT6MF@li3MRxvF%uOtR;3G>w>+56~x+L53wCsH!MFEfPH`^V0EyQ zSPkqmEEDUCEy6ltDcBp>A*?3m#vWkzuy||&mWa*9N@GW{#h83nz8~v{IkENF3@jN- z!#ZF+ut(T6>`Uwv)*mZ{$uG6NfGxw`#O7n;uxZ!{>|;#$pMq_~j$j3_``87n50(ep zfPIe1ugc}c4q^?k%Gg`jUaS>X6!XKjVV_`|uw0l8D}lX^4aT0urenphaI8Bv5Icii z!QRDgW8Y&3u$$Og>>}pDW??I_bgUZo8@37y!Ny}hV}D{zu}fG*ECV}>rDF11ez&ml z*buA|Ru|ieO~zc<7g#J-1Y3cX#WrIVu)ne1*mGECY!`MI%fjr~d)R4gEA|-Ulha|} zVJ~5Ku`1Y)*m6w5pOdhB*lsKk`xGmV`C~6)wXxCIRV)S@fIW|m!al;vVe7C?SYb?l zN9=;%HJC7w{C9yb+?`-H*6)S|jiY)hzE0q4!!>7E3e!ueEW9xron@c zed==k)N|*~={*`Z9>ApW`)J_61FzPv-@Dx7$G^oMKfdnb#~*inFEjIMFTVKMx9!_cEqL?hUsqSH3Lkj%=;x0XEsDAF$tRIp=FO{q zfAQkzS#I}*zFW7>-TuWF85JKrI=}kuw_6UXRjbQOp`pp)ty+!ryMOU~H>WrRo*RojZTj?%nS=t515mOuY|w$|^zf0tCdcDL_7`)t&LjEpN4 zo_VJD`>(xLDZN31J^|&+2RE!xA@sA<)HBy#dTH%n3m5ji7ZtU*YxCxrj$_BZIPm%B zuf9^ZZq#$X{PN?FMveNvJ8oQwKcb_TCLTJZe=k>qYuC07u-jW#`TOr*_I&zj*0sKU z*KZy)=xDor``$dcdGo-|VPWo{I(3?Pv`d%Sm-_Ts)9L%~#}7Vu@auXvZtVPZ#ft8w z|N86N&WMN!$GdiYuUC^M2{Xr!FZO+8)_{&_jCpI`1VqeeZx*`vq8wk=u=`)a|0 zn!hYx-uce+&o6rX;fMXUwr)N8^|#*2vuehSRvYKfuiBwmv$WiQ{Bi5-#*J~?)~_F$ zaq843aaF6fY3%QBFQ1+LYmqy59;F;Uyrs)`-;F6*s8HFE5+!Oix_WiT`Iwl^i{5=V zWPjVXlfufB33%a~Z{EJWY+0|dBS-$-zGchdE92w${MN7ESM|%43wp=nxwvq^fUUE~ zj45}hd-wN8ojLPiLbYmbN7k#?^W$mLn!h$_Qo+6L+D)l@{rc`B8#WAXQL<#6te<{b z_H+OK8!HtoSUU6c=~d0oojct-C@8+$v(KhiE>NK4>5d&|6v&&m5Z{8);lj%=Z|Jvu z`-0RXM>gG9xiVsDZ0tA7r%w-C{LVXpO)p$H@+BEfxl$29b z-h9&*|HBWT9`4p{-noxH>bN#J`NYHCy;tVDd-qPwD_6e%#Od5Sb@=eRmshWDUp9Y! z{~x~k$~9@&u$!)$H9NTj0{9}Iip_2{Ohk5otBn%uFZ4LjreBWx*;nP684|y&|zAhT)Fbv?%lgz zyhxFXA37Y{V?sg({rSQRs}FwpWzzHs6Uy}2wrx)BN|m1d^8NQ~H#>j+WQhk4e*b*- z?D|cL6|44jQqtkHlP5o#JauZmWiw|sSwDAf!)lc)x0o?;Vk!IO%inf9aA0C~uU;#L z)v42C_}Q~d-kLHc*Mko}cyaXP$6JzbE+j z0RLRz{}K4V3jXE5KNkEig8zHq9|`{R!M`>5PXzx`;Qu@Le+&Kv!T&1w4+Q^5;C}`D zw}AhB@Sg?#eZhY__*Vq~)!;t}{9gk9aPap7|L)-bGWg#G|6uUX5B_h1zX$xI!M_#w z7Xtq%@OOfLfAFsZ{vUvUQSe^}{?CAaDEQ9>|CZoi3;dJ7|2yzs0R9!g|9$XJ2mb)@ zZwUUMf&X>z{|o%@fqz%@ga20We;xc+f&WJE?*RU}!T&7yZv+1f@Q(w3zQ66)^59xGy{}k|#2miz1e-8ZDg8xJC z&jI z{|Vqf9{i_)e;e@s2K-lm{|WHV1O7JfFAn}6f`1J7{|WvF!GAjV_W}Rf;QuA~Hv|6? z;Qu-JHv#{z!9NZBCxibo@Lv!9)xduS_}jt1Blu^7|1j_$4*qX}{{!$J4gO`o{}lKK zg8we?-vItQz<&++4+Z~X;LkJn^1s3V82CR6{&CKoRp5UV{1<`$C*VI1 z{1=128~nF|{}jm$|61T53jVFY|33Kd2mfI3UjqKWg8wb>9|Ha-z&{ZDOM!oG z@ZSyo)xm!U_?HF$S>T@s{NDrreBfUk{6~ZT&*1+%_}2#i&%i$e{GS2;*TBC4_?HL& z3gDj#{x5<5Lhz3Q|K{L-4E#R_|GMD+3-~tz|8d|S4gQC8{21^>R_ zKM4Hyf&XUk4+H;B;NJ!O`+)!V;C~SOZ-D;_@c#?^Bf!5a_%{Ln@!%f`{(pkMANY>~ z{~qAq0{j<%|8nqu9{fK9|JLCD7WmHq|M}qG4E+B9|Bc|k9{f*%e^v1J2mfsFzXSe< z!T&q(F9iN2!2c@v$AJI4;NKSf%Ygqk;J*y~M}mJ#@Q(-oe&AmY{5{}50Q|>*e|PXd z1OC;(zaIEc1OG|j-wyn*gZ~EbFA4rXfq#GSF9`mp!T%ii2Z8^y;9mgzJA!{+@UH>> zFN6Pf@IM0nE5Sb&{HKHeJK%o-{IkISH}KyB{!PI@1^nLx{~y4=8~A?&{>k9q8~pEr z{}u3eg8y*vUk(2G!T&4p9|rz4!9M`}D}w)0@Lvo5yTJbv`2Pt0>EK@l{5ymHCh&g) z{9gzEH1K~8{MUhh0{C|T|6JgI5B!UOzXSY3!2bpC{}TKsfd4k|uLS<@ga3K(e*pfo z!M_;zCxQP-@Sh6)Gr@l@_*Vx1iQs=3{11SCFYvDe{%65|3iy8j{*%GKF!*l)|BK+? z2K*DjKOFq$fPX{qFADx^z`rN>e+~Yn!9NcCM}YrO@P7sTZ-f6}@OOd#PVjFG{x$iK|1tO<2mg=3KNI}-g8x|X{}%jT1^;L&3il_}>Tr{oo%A{!76BSMa|D{zJh31o#Jne<|?K4gR~q zzdHEu0ROV!KMVZxfd6~opAYaL{|~{xHTb^;{xiUTKKM5S|3AQgBlxce|5M;!75x3dKO6k-fd66e{|@{M zfqx0`zY6{_;Quc8w*~();QtNyF9ZLP;NKGbL#0 z2maH*e-ik&1OMybzXAM9g8xt8-yi%7g8ymoKL`Fn;QuW67Xbf`;GY-#Yk>dD;J+RG zkAVM5@Q(%m>EQnk_+J43Eb#vg{P%!=Q}9m#|2M(^2k`F({vUyVGWhof|GVIS1^k`h zKOFp5gMWVT{|fwvfqzZ#4*>s);J+07*Mk2p@V^B9KZ1Wc_*Vh{&fvcZ{Q36y*Ix(! zH1K~8{MUhh0{C|T|6JgI5B!UOzXSY3!2bpC{}TKsfd4k|uLS<@ga3K(e*pfo!M_;z zCxQP-@Sh6)Gr@l@_*Vx1iQs=3{11SCFYvDe{%65|3iy8j{*%GKF!*l)|BK+?2K*Dj zKOFq$fPX{qFADx^z`rN>e+~YnB_<#-Jc$`d98O|A5*L!Vi^O0g9w;#*i3v%ZL1HKp z`;&N;#MUIiJ?fGh!D{biI+)iM&fD`_mEhP#0w=RD6t`lNlC0sVm}hg zk@$_oY$O&Xu@s5nNNiBzP!ju;n2N;EBnBlhC5cN(d`Mz55+9Y=jKotU?k2G*iFZnj zQ{s0Li;-BO@%(@7n#7zWCM9tri91SMRpOiyuaX$4#DyfDDe*jssY(1!;y@DDl6b1b zNhJ;>u_%e3Nt{pOXA;Yk7!x7J9ufzVSdzr7B=#h+S&7j~{7+(%5?hqmt;CQdmMF1G ziA74>N8(r#o0S-@#K|NUCb1xi37Ro2iTO#aR$@yMua%gk#Fiu;D=|`ufl8c9;(vs{ z21ra;;)W74lo+7IuOzN1u{4Q$N(@)xmJ)-K*ssJyC6+63If;Eq+*jg|67Q54t;97Y zek(Coi3Lk6RAP)01C&^$#DXOzDltBZH%g35;)@d7mDsApu_ZPv@i>XkN_A)StXt<@k)u&Ni0-izY-Ic__D-gCC(}FbcxSN{8{475`&dkoy4ytW-c*t ziKk0!S7PZBGnW{w#PB4}EiqJy7fbA0VxRkG7Lfnyu8q zN$dYv>X0vW*_RT-^pt9g{q^>YGN~&my)C_ceGjQC{b}BIRDV)e^7+qBih42@>SCki zhm1{rs(nSPHtZ@*85OY6s;-eQ?U3WI<(C=a=O^=ne*%H6pZrS*r2Qx$tuok3J{i=N zJkt5~eaY8%kT#6Aj557k>PxeFfu5GS(uQ7F+BEt$`jKiM~A7dPPJw0E> zppQ$MHO59lAG=;4WqKWBtdiFArA_HuvvC5)*frfpYjSeX+Gr*VZYM*GJn=E&dIt6Q zPp_kw%MYn9xnjn?a?!>}T5?G1rLwjA+LAnJN3-Nn-7xaZ{mgc3dOg~;(+;)9h-NE& zXm;7s9^27+zM0lANss2I7(ea&MC&`+G*YvZuSr7c`b$Of$RMAenBus2Isi*g0r&-NUv*(6}+_INk4oUmvrzpSV+sP-5`LUAXVr-?1l&Xt1 z(z4o8rthooCuzM++ST)=9Wkk6*)k5jE!DQPPpRInUYGiMA4b2v@u_hc<22jU`!L2X zeM>)T9A;ZGCfaN5&uNp3Mf0uwbL*E)@>)w4r>?bhtL66B%lt`GhqRnjt+mvUGEuUR zzBlbiTjU#c^-B5=$@A6K+m${kGuk!VH1?%^qaS@N`hNQU#u#NE`qM{FJ$;;J9dczX z-ZI7^&GOua{Gq`)~#Bu*fX|ggX&c)U%Y@{^CtDHS13_1SBu~VHCi=oRJ%%< zqWPW+4X9PQbdkI*LmJksRH|^EiX{u>9<3S2Z)YnV$yAUdk!xndixewZ)|Mw%#iDsj z6)01pQ10^i{qt2QS=g^`aFv>knpUpUq+!*@4FYR7s}>SaFQ`T(yNy6t{sM)H6fIVw zRGD%WD$<0{a{L*DtwOHmc1m;M11>$vmhbCp{Bd^n0MRS6v-h(tiHq5WM`^YZ`E3=5 zCrn~scJie0itKkzzWlF9{&qzQbt+mgJ@+uJRr%%&rdlG|t?@l8va@T*!GssdKi)6A zNTG?j!i)G%$Q@CnqF+RTBL3mKiWCapT_k__&LX+n7IfvvX;-jgj-0jy{U$xRmob)= zbTNhTH)bn+z2+BD#6F02cNCFR`d|C+8TjuR`0p9`?-}^-8TjuR`0p9`?-}^-8TkMG z3=9b3IUg4r^0!UP!pGoK@j3WnoPUv9`;<3;FYrzHK3pE3XB0Kw3FfKoO14GFKgL%6 z{h{RgnpT+Y)*Cjh9NWeH{q*3ZJp7i&m!svGT{M3N?rKJ(^61{7l&0lnyMZ6__v%G? z5#b-$)!#?t-9Q`Q#|Zcbarhzc1I6$%__#VodSh)(D~{fSm%!y6hHoEoH6Wi*x=Y&N zALw=Usi|oX*~*yzzpyhLpJ_`u7whp|_%ZwF&AHy%=_wc+8*&nZkhvMz<-gp9@iBG_1;Y;!L_%8eyei6Ti=M7+gycQmcx5Inm z33w(x0iT60#ng5z6(EwU&Qa>c>~!WuZ4%=?eN}s0zTT|r?roWc-CI0 zS8PUVdWJnXpjkjr!@#f%T?W=QGBi~hm+at6e$4N?X%Z0JFwm&j#9oJQpYb$`itG{@ z9vvCeB)Ab@*yc#CYp>(|8tN`xdUv(6PhCw5@MNW=J7U?UyNzw4nd0kdoB;zq>+xs-d@+iAX^1)7|L3iINWnkOtaDrv?!{|Zb~9g)nPM9MZnjHElJ!A+G>e43 z4v;7H#GBy-aj7TkhWNB1Mj5;4b^O`3#${irC+m#3tS_cXU9k?htQAsE)(LU>H-^oA zC11Q3E^CXVWqlE!Mq0)sbhG zBrRi=byC(@@#>^aGy5GvhFNbKb;R}fh^i=uE_Fv(>ZQSscn|&GrZy^?r)aFDo~-NQ zW=uwEn*B~v_2hWZQAfN-wA3)nY){UWj8Ez{j_}jHhEYZTX}0%1%BaC$3%d^+a zeh-r)*G$@z`@pT^C8kH+|EN4x*CJ*j)nQcv!SS`R;MwCt!%>WE*) z&Guwn9R2*$&&v(!N&hmwanu_}y-RYUlu27+cX4U2u?S4+xs9a$Q_94P;nJ3A_o(;C z6l|rAm~3SZm^R`CKW$-CBaSwM0_j)gjId#Cui{%=6ImpbneCa{x|KCXESKt4))GS- zJhlW-sM&=uqOOubKHT`}o+g$q7m@$70T~;<;%f-{6I`w*9ZtYgK9HHZUqH)zm3D1fSuKIBdAv4e;hSiA))kZbbJ&{a$HvUs zpqCgwWIVe`dODk#1+_yYt6TIb^dO7=1%1B1ul{wC{k-d4L7nmC{e0!Q7-;JlpDu!K zY1zLVx~gUW>gYbbef1lnHH&VFULWNvZ;d_@=hL0gZj0`T4zuX~=rb0bi2lW*-RMge zJp$c=f7#Zsg4zUhphZtZ*RtsM&=o9tG1}jvSEKV-^ak{}EMNQE(ODL~AN`Pje%0*% z82W}qpF>};=qu=x7JV0ez@i_ccUUx^B5E5fx;T23MOQ>GvglgqcP+XxdWuCqi_Wy@ zw&*by&22ziG}L!Ieb9p~<+11i7M+alWzm`Fjh6jKqdQs3Uq`pH=$YtXi+&%y*0TR{ zbX`mNXXwfny%Al)qIaS5Tl7KnBg^$Vg}!ak7tpB|eH|TV(GSplEZQ%ZrggRGLg?Qt zx-|NXMcdJbEV>?gmqiDozqaV-&}%HZ1A2)?N1@-d=$FxNS#$!rjYX%Sn_Bd6bOVbX zhpuYTQ_-a@dN#VCMK3~Y7QGVv$1vY~S&zPA(Oc1HEqX8ds6`(|e`~qkKZ>@L|AyXd z(YMf_Tl8P(3=YKlchWZUB%MgD0C@{o{To1 zexNe2DW$2O?{VBSEMSqQ+ealyWC;H{vKK(t~e#fUzq7!*J z>q-0a{BRZBl?Psr()ZDI2J?)kbUq#l11DtXAzYKc!Kuw#fbWQX|+WSK3AoQx4 z%$agV{YZ2L^bFNr6uM)qrhUYaq`esQR{H-yl@CI%TLr^P4@bvL(X@k%OX`nD&*pgK zdELhOdL6yTqTfOvdz*ixTkXF9ZELM*U#jsfM~|R>MYX>?E6ekup-X5x(ZeWb8tU!u zN2go#5wvOYe03&={tZ3!E3-yH?IwDvMgNJeZ_zd$u|q8S8FaWs7en{5=yK>-i>`{^ zN?g;h!dgAFX)?ZG^abyWNyfu3p66VNLxdK&tKMZbs6 zd(7A0hv}T^dIQ9@)Dt2 zVLe#)z_Pv+;1$1trM}$1`dD;H%J;LL%A2~4_wVZHjl9pE(REp^5xUe~?zw1L&)cFa zp5=bTx+ppd?fQv(h$?rYXY1qD!OwEV>H%er4bJse`_1(Shjm z7X2*xm_->T67kAvPF+YkF@AF&>oAPiN0$& zzIo_GOZgIXKZ{q*7JV9B!J;pq{Vn<$`anhB`M!s~ zY#HxkbRJ9nd@M;1EBWgCqi>EIJsy!=hWFH&}E#^eT()j$UNZ zeb7Hy#ybH0uBAK)J;kEk=rI=k3OduG$Ds#X^qc4b7Cj5y%c2*cyIS;ebfiUpif(Dq zU!jj!#=9LIVkzH;ZfMa*(KRjlM|35NzKAYm(KpbAE&2gEk44*9SRYxgcLDSt7F_~; z%%Urz_gKbT1HH+j8=$A;VSUuCuoi+gP1e&c==dS#`d(Ih2|d7~2cZ)!`js5}zlHw0 znoWCNt@m@$718JDMAqL$=ruKMT8z>k=h%O94t*H?ax35bJ%e5!?$a01M=km$`i@0E zL>F)4tDl1^q%hU;pFLdwcoxH1vutK0OzGDB7o&qRaR2=}*yHd;9c8 z^ebI`dN(?krT!tb)6(8)w4Vf(bt|a-iauhge*?Y7-#6d>L?5;2Ts#O|vgpES|6;!S zWzdZ+x+>bk2RMt>{0T(28OZx7Ly-9uhJK@kO>3^6kHXP&6KvWtRlh5`oYSU_RrUL# zx6(ehLH&6l4gD9I$823sLU%y(_@L_r=uv2SOp)h{&(Rqcy&F9lZMJs~-P5A)qZe3o ziDEn-TXa423X5)s9%Rw|(CaKZ3*8l+PmSkI^h`_nQnYEp_a<~Mg4#V){k=KLe?s?^ zpf?}=$nl*QEkSOjFNh|nT}SPIImiBw(Mh9intbjcXQ60u*0+&1t(wwR&>l`cmq0HM zLi@d9)8umksow%ULW1U80O`LCdTkp&&93_EB<1L4N_RsaMK@MD3Z0wJ$2iUU{x70U zljE1?!FA(oTCB`l`b)`CJ~oGz`jy_bX-R56&B{^Eu)QYjuco|WTVwv(_@sFw+WPsH zw=xN-zlZXqEjDd~dOkglK6{CHjXEC}(aoeoeg+hx-~Ll+%{-gLsIMXUN@=()RDzm;x{c1Q61taNvDc)U$J zp>$uVf1Gowv;!@_Lm=-L(*98Nm+g55QhF4+YqfH;QkY=%6~-{fJY(e1byG*mhR9h0ePe=0o&z55F9 z@M=6$&|#bpv;KVaS@dzm`zrK8%lu!99>9mB39A3?=mw!SZM16tF#4lT+;f#ai;n!j zriCee7d?aHWs2y>myJHg#oDQK;nK8!-KN!0<12$+|Fuo~TwT9f=(Ws;2C9Bjbjt(W z?^ONP=x3VnnVQmF&|kHIDOLXk^n)cf?T*q8^Z>38uMPTmQqZYia!u9o4MYE3+@^h` z%EzOdo+eVE%HKx+!eStw6Uz0PgI>e+Dy!-*MQ>SV(`qaI3A(4Hzc0}TIKPpqd?(st zxqgSxp$&aJotSM=2oo7P(Ge-Aw@zfB|LV4Pp{InMVfb^h{}fzPuxEw37H zIrN;9HvRWnWc=08Z7tV306h`jf>e8v=*nHV$EyB%ptrKVR8x8Y`ZLNaDV>b&!TEVx z>0#)K;~0Y)&s4PhUXGZJ-=CO^{)n41hpdl(2|E0uO`}O&uS4IC)3hJd{`=5XnM_qx z`EhjWVVgEX?SB>BXt_-zWTfwJcSHa9J@+3Ld^vwFpm(tzc@#hK=nt6xZdKod_UHcdoYKS57u)iAiPBTh zeTMRms*Z0idLHwgjo$tTBpl2qbN&Aaeg7Am#+1~{Ka+9}Mt-kA#`7)u_oX&1Q|*5U zU7q{f7^P33KMvqYL)HHoy??Xu`*^bdRrKe3aV)(RLQcpOtQmKE}<}!vl)6-xA#*jO(e+S0sAlI_8i%{_g1C7ZZO|`@eur zYepTV2cVy$e3jB3^xAqOSqlV5Q$dC$b(SC_NwTNh4;g&c`bB z_Pd()p*r3T=to_B_qXln(Bn4kmfHUpbZwp|W+{CQeUaA(wpXbphttOa^mQ z^;ZVncnzOnDqRQt_zn5pBIA5Lhjw$nHt$Cr(C>0Qy;XT%wE6qj@*9fr=y~ zZJ+9|KKd++$9`2Fgw6%8=KN`gp2~cES(QJJPPVMa{m{?Qe<4+#h%VQZIiYkqx@ZP# zn(FUW^d45OqDoIimkG0J>1zJIhnC;Z5|j09DO&%1MO~NHHlp8TePfBz&;KrTh4WlF zbv}-wzi0BCqQ3C*8`_`snnw&>Uq@&2JSo2iCFOsii|}D7L(p}eip)Qr_drJ1CD126 zC+4NftD#T-&i!8LXVDib*t8H;zb*O=7N^-t_du`Ye$Nu3x7QCXlb74Lu9MIoasD~w zy3Rx&|^OrSG9lD^8-2+^Cd^Zh#)g&66SW+jxB5fc~?DO>3!i zFZ3T*(qCK-J72@BQjK5Qn{TrfxW_eWWi-YVd z^^c&lxL)S|m(b;S7(KvzmGb-O!W^$zUd+yVOn*^o|3GxlSB>Xesow%^n)K1l&h;5( z)7~d7<^9mFTjqxcU8e|qFyEzoB)UJx+fvn^hBi&wTW$BPC;qG_>(D1yjGv=S_TPjy zP3nJdH1`XJ>Y z=)27C7OK26+BE5}AG(3%cvI2EGl+-eG5Q;UUcz`@qpq|!32pxVZ*f-Psc6%rz4_=q z%(pqDrT$v)7>sQgHNqckAm)LhE^m5Dj z*@CviM_KAh`Em65JAB5i^hLC3(%yaamL|sYyVRG3^eF2$k5l^oCDHYY`*c0@2+oIH zm4~8l-R6F#bXT-#(p8d0OMfHKX}@yKIAPM?eDsU#--R;K>(Fn)!)T?yK{uvMGO$@wtXn@Z?|+jvH&uJjjx?qoTCZO~=6b3Jnz zwivx5koJ;O6JyrdN=(+I!tkU6V)9fUApkK5cuM^$eqBAY^ zW&9J+b+#IR8zSSKh5oRBP2-V3AKxnUF3b3~p_f>$=V^2?>YMZVF1jM?gWQj$z5KOU zQ@CE{e5-=4#r>?iDi1|3dJV&Mi0zq#BW3&Ku=`yNn4`NqHEW;XUF zuf&1&q<_fL>&xFhJYfCLt8_>7#I3&b+Y5c&a(+|MrpXva<X#YB_7hErvEPekP=$l-R64aIU z0?@s0`PTo==q0R|@|Ys!vFN#+?;n-ULf>M2Ht!cx(PcP)=Kbs=bg`qHKh@txbTG%) zRqekMUHGKE7gT)8zQ8qd(?+ zg^`x=H%HI2tcRV@zcQbB1k}s>pw}?|@~XZYorUI=Krf$we$BGp&qtdk{jEVCt7X&T zNK1d;NIB>Cq|yh`d;M+N0M*|qbgsHKJ-#LNFQDJydXH4~@1h&?GH2dz^YS88dYnyL zpvwKxtGQk=O4mU*WBp`W>;1Pt?-|7VPaZ?JL(jV6dp>#*{SEaitNK~!YrBp2IT_Dn zbeWlaX_^}E476!>5=+si9`nqu$~U0jIn5kW`Zzj_lWVR&H_=5oKXjpw&#yk~gXMbo zqmMH`*y!cuNzAdVcY#vByiMbgLN9NLK6uHu-oAwPT$6V+qdW!O$HM1$^hhS-WmWzj zI*9!%=s@!TF#eW1MbgP8Kcsr&@qq=F>A9^~^TT_%Ch&IhmVhq~0&G)?jCi?R+{Cy&2(*Jx*eSJQnH*$WX zRr%NG3iQY6)9e3$zRmT&q|WD6bXaZQ^?8UkP1-Bikk8+0`sR0av_J4YPnq=J89m9e zUi3%H-)xE%=dar0(eG^KGY(xB)ZA#(r2Vlu^xHY~GIaPI-~D?Fx(63CihZU3pK{c{ zg&xi4LFW3MH^A&o>hrq`=m^dS%Zk2#d-RvghcZgXqXQ%Oyhoj%40JNruY@X}j5bZ$ zo0CIpaqe_adPYJ*K%5p6(HJn3kVXDMtQ0+W2GV82)D2ouwIn z9vz>Nl9I(P78N6ZRsBR&k2|hWQYxe4@4p#(K$kXcnlz3H3^G$8W+GHi1cy-8)SC?U zr2@UlkT7pDw6U2C@|Fi1ZPQY4GqY5+7#b63^cPG@bx2B83yld<{gLw43o`13GH9bS zNg16<%IHi|P4vzrWwatGqZLW{S~12Vc}BmIGLDE;khc$YK$7R}gMZInPN3v@`%oj5 zJZ~TB3`(B2k05U!O}u?H@g7GLZy!y(eKhg*(ZqWkO}u?H@g7GLZy!y(eFS^^2=?}& zE)1gz_Vy9%?IYORN3ge#U~eDlQp&#GK0>^Ggn0W1@g7Hrw~r8SA0gg8LcD#1c>4(P z9*3G?^rj}5q`ZBEdix0V_7UpsBh=eRsJD+$Zy%xFK0>|6;Vo?HJ)oxE&YF5VYwGQ+ zskgJH-p-nOJ8SA|&)Zp3Z)e`DX5P-4c{^+7?W~!%vu57Tnt3~G=IyMRx3gxxmc5;^ zqNw>A=ItZQ+eet{BMh?C&LmCB!eY!h6c%F+KP*O#rfD$y7>!F(T^l`VG_NO(_DKdQ z3?!-Mg(QumkW^Enf0Al4lTuTTl&>^Q4y{wqjx1r)J1LeKUrG*A@gx1(90Q$NTbH-puAYHCv(m^)Pxg>*>vkliYVDor9aGaX(%Z_HUPyD@Gt!Y- zS4VnWVp~@Vb-M8_7>16{NJ@8VJ;K`t%8wweM^fBi*(W+_V0iLCmlhq}B_=V&5vRo^ zr6qDJ;`=Y0F-h^zo4m>zo4nB#iV=t)l+ zo#{!VKRs!5sV9wzE=e_4^`tRoJ?ZOBEqQvbuQ#>8>AAkf)WQ}R$aFLtBWX59(i}QT zvoVt9&`Fv@Cut6yq&akwW^c@MgCprpt<`$c*PD0fRPgoY9Xh$b#>}Aur5YnCwG$~d zLP1tv8R#=mjgOQX9z3d}W}Lp1w>@7UYPF{owZ=XZo*E0QfKg4JI`qCs7}ZJ0v9c`4RaUEkBxQ6eSB9r2WkK*J zy%jhiD%V$TEIXc|Nx&Mwx8@`}wFsTA2uEBZ=`4pJ>1G+>nap_n(t5aEaV!pPc!~r+ zr6LjmU1dd6n&e6~nuv4p9Y8TD8GJ>KCXaPd&V&fb0$;tBDiYjSR$#YBR67lfW0D=Q z&SWjcp+A!vA}vP$${y%T2D_ z#du6JCIty&W|1%^7763>lQ1qn3FGpUFs3>QW7d!`rYH#m93InD59;xc46_II@JEi> zgL?EM$LvAf$jC8!Q1?4>%pTN3Ut^Of5@x4rH6h0wyIM)eF~_dRAjcfLT0wXqQ)5@i zkYSEpJ@9#-_egjvn`2iGdlZ>tSNC0V%(0tw6>N=T)bkz*^BB}!ogA|V^{hvZc?{}F zj~w$D)N>vWcj_3__I*0k>lOnJO=fcN0E69W{G;nYaF8<@kp3G zs0Tc9%pTO^9XVzX>fw$Y^BB~#QDb#0Y;4{N<;mkoI8vM`E_W8QIl=98#w28<#-#&0 zpe84~;(VGl}l!z4OCIy|$2hj#V+T3o(mTc*k92Ju9;aRs?M#nx6YpNT2Ck6Hv^7O zHX$dU^0sWuyEm{7mW-S_$}u!&78j9ws1}_T`+w@X*5f8at=LpHX}E`solafeW_*`s zX9Pc9H2>86CplHb^GniV`?iKpd{jtffkUSg2>J1^-@hDeYpTSw$F6w$vip#OQAlx@ zi=2&ZyDCZ^?%NW{cw3^>NHcP2oa3A#MM+g0tcn=@uywZo)Y?qDDC~7Ai}p~SZ2gHM zh?`MZ91ROfllEGc`6fR19ow@NQ;C{MS$(RZ{^@Lypexg|?kPhJI6v)d`qiRnLhMh= z@-5RnxFPL^(0{YD?Q(OzgNZJdY$CBUtmN!ZgDq`wXpgdr#pKGi$1?Rz20q(u-T>+iw{t;?t>QGLr2;(&qChs>GXF@#UEKfPepGF=M1ZZN>_zKs zvA1-{7ie;2S{vvA7G7`tS_a37b&#vM(2(#yQ0Ys zg-y*aD@>F96uSbt<`f^INzPLK6YVx!3#@j)c$z&#JdQ?l_Fps;Xp3v!!(!2<+x1SI zwhHPAf5%cJr_}e%32#>KLM{=LiakA+HWpIKX}TpM3$qEt4KdV*CM3bHf+F1d-Dryi zX3XN>@5RNoVox#E>Ju@-zC)soA-?H$Ev(f<5J<-g*cciI0uVd`5E_WD)#xrHXlqVC zKxc1uZJV;I(fN4j(l;E1FetX!$(ERUxX}nkDFT`4;rnxi0|xC9I&UUA_QzxrC> zuRtn{6oP3b?c~NLHAJF&T_|`z3PsGyeiY_RzqVEW>A@du@Z7@+tRaQ)s81{ut1X8X z$0Z?LABzZ-9yV|wbBAqZ`!JSp-D|0$rzySSFq&*TTmdySF;CXk^ksg3ZsMwUkju&w!%X(sv#BZmOw z$&*~_TA{F?7QedN^AaGnKpthv0@i)>^B$4F0jFmu51Dv>5rR%Dpo z?26892^)h8wyUYHbiOWM9w$rl^7OQsZ_Re{xSX4d8!rh?sB3z($=l={XBd*?0JKs* z*z9sgm@50!>(Xv-BQ1k2*ue==d(vt z!+uJ3K;_jnq`jgnc2Zxv`B|!Cs@AlcCXkCi{9QD^6j&rww|=_)8#`H(Tr!41d4Yt! zXLSa0!=GzW4as8_7cr{m?@%X3Vr?Q!s=}obNHX8@r;ShA>0obm^hyGruW?rU^?qw{k8xk z$B+KDzpSl%d1Ozg@@zvRcu!wEHZOSabiI_p%8j*9^v!Sn9z&S-nom>QP6)Wg%YS$! z01`UE0=>FlgE;s<2)%_k!5UjeYP$FlVepew15e^ZgXSH^3>D|F)?j_=HwaKbo9r z!QDhR$E?3VdJQtX=KEFpn_oa1@!qqvVq%U{b>noWe{zl{wz)PB12B>=Lqt{ie&c=@ zx{ySB5hvfk+w=9>$W$4PEjv+DcqwuEgoC%3U(P^qCg(j8`i*1uXgQ8hNT%>y`HrIX z#yYA^E^&Gr7fnv826@2g8Q|Y_0B%a}iF4@eG2KouA8_TC*M&zzAMlXtLEWJ!9S9XM zqCBy5*QZDf1(MIcL8yeP%#PTG!Ri*`-BJhm)1AMD03u#i@rR^Pw^H)GzCMo=ficNP zOd(i&1vtF>^1wL&Tj5X$FXYIc;wu#64F%EiVPrQKX5PL8&>F)Bx8Ka}I(ZghUYB-9iuU^T{Eb-cJ;sHHK>jY=8 z#VSr*&tS{}RSd^TAPVD`h=s=FD;HTOMP+4+P#fC#Zh6O5C#uRoZ1K%XA=7i%y~<%K49n@TI*e$4 zGxEO=~ z6GbD_-_9antc28yNbBgrFlc4|YRk|{flwlj%dmbQ6gDI*|5mbc?+h9Ot$c?b9T9~( zTu7Zzbd{Kt^t@L?b*KO#oMwZ<9<0Z^l|~muo}sC6*Vy?;g`JZi7f8+4prSe$Frj*8TkdeOyJ4=O2jwT#y4RT~l& z^;!t6*~4Z53ThL&m^n4rKo0%v_Bml(U~F8GPkNmL4VTiufzx2}VZS0=2kQ{Z1qPir z;Hw@Dyy03;Z(E|l)qehxkL23`=BH3@I=NI#+#@Wc5mXLV(&G7V4-XnVr#r>dE-EOH zg`b8cwbVMA`Q4pTiiUxCG2PG-xN? zIvT;-_A0lcCL&jd$Bud!JY8o~GYWg`?XvvMih#bLY(WZ>W{ufpyb}w*bysZBDZza$ z5?g~Lk+k?CA4ZjUc!qjoP=Gy*@!+tiia+b1L?R>_G=ZoACL!8@2uSrxtAQkvYe;A^BVZ9G znVDqH91m!VFSjrDy|t}ZvDcEog^=(v0b4<^immmn_qJvnUjP+IEadw<`pUbY5+yzl`APyrlfh? z4*wcws_z{CnhdFn*?lR6J$o1*sdV}W&ick6<*Z0)&W>mK2aLQaB4)Lj*Qr&x9qRMF z?`DOw!Ykx(Ws1O1hiGS=>a6Q4OOd5Lw=MeGlE8cU{jC4a);%OtTj%y@UU!*#Ltn*Y z*4|g)W^!LezVQ;o_EnS`kVm}QziKv1-CBlFUwaLHKgORPV7l7A*cQGWVgHS1eeN$x zwBnZ{W3>Gi`~u_MeBtT;$I#G_T2ZN2RP|L-W%AP|Bbuu{Q4encmet@Tj^Zt&M6%7 zf10|DHTlK{hm=Qp{X;3r)&b?Q-cXMctOn*lv805^A#Jg{D0D=5WVe5vyFgMlN1d-A zl#h_do$CMetWWU|ot=0f@V2~*1jSR8tp|`{GBWJ(pOl?%6rKzn@Qx3j^qm_mbD%M0 zqpp{tW$C4L-3}=^i6(3LKJ^&XZA3fkRRc1`ehuokLMiv15ARK&sMt zmO&{HMeKp7$LW{`jI;ImC}E`N>#dYg`h4UUMJ0W`!_1HOA(oT$`J?pv(#+V=qZgwU zY)_rK{+yA!7!=!y0f&jP>N zS;O1n8V+U;2S@NBXLxF^9W;1>vEhJ#4)sZB*-*4>6bKqaaXp8GrVFx|2PGA~(xE#0 z{0<5{o;`~K?>UDt5yKhzCIq@f7VlV18eXCE&OH&2Tj)mpR;PNaqpwwrcOcUr&IVfb z;Vk_2wPvS?8l*l^RbT7(O X`cNYDvqb30MCd6q6mH#uP_*?~!eDFQz3gFxdfl$j zNhSDiNDXug63~?uY-BkiBN+X(mFW7sqIzZq28WLkrBTXVSQu1fcZz` zGa_ZF;r7Q6=&KOP(e|H_MSbm0n4I!vMB9JCa6B{8K`S9Fz(@z_3b+3fNs$iD+u?Rf zXQYFZcewpm2uIr=V!>$p!^Z0;#_OlX>)U+wwR6z&>1+Ro5kSad1-O$Vk`Wkd1vr)j z<4%kG2@XcvpEfZ5nlC(%Iy8y7``T|us7!>GCgScE4Q6UhBIFXt87E99lmLFWh>Ud1 z#XH>oAkarTXiS9LbrEKVhub%caJdLSBEl6S{HO@uB*Kp)9BuzM{NnXpzVtxt7#Do~FC>rXkC?M)+#dM@x56)K1MCBFNF{|F>Q1h)BTbO}L zh+Q}|cd`}V=Wus{ZKkQH3Zj+Z`N(8wVJB0EX=6>~iTbx7K|*m(4~gOw93}V{q}Ycq zEhXfn;9EH>GL_)(0PD9@C5>KZA_sDZt=wvF=zzMBgTE_)mMXzEq?po#X+q7kTIg#~ zwzjjAF^SY`^E2zTB~F;#9JtEXtsJv7yWOe>X1CWeyFG4q9b$+E%`|%8i_Gpr9}f)` z_QXdCIxGu1&@Hi}yRHCj-ghxw67s%Xr&TyXgR=F}VfA}p_OtHAH2DG8>UN==6k826 zT=%rTmr2Gl?oRC~cRm1Zhnpi7;adIG|0@)xgTOy7=l~|X$|fitZ$rX=VZ|0NW`-PVCR?%DO-w8_82h8 zbvl7eU_$(5ws>;bs39mALu6Xe&56#;Wt0lKIVXvzKCANo9YM^ELqw@DP3 zoM^sTxUi>nFD2DjO@7X@MW_pm$Q!W2&BmJVTIk=h+o^K@h=veYK;RE10A-w2S&5j9 zdqvE+_8oY~9d=VOsapeL!6MuQS>$=bO#lm)J^uVh5JQWCgzcIvuZeZD9k*7IISdp= z+VB{fW5Z)|N5uHM#nj=;FeV+@=hoV3*bOg5qt71W?-tV!O=_x?;YngjViNU>JxLRG z5n?7;DmM|6Xt2Lq7_2a@i-c*7{*wB?g&%*nut;IngIU!2f$qDZXeA&+#NCL{+8Hst zLRu88P%CDY*I*SC8d6XDjwNjktvxt`%svqV)L7zXafxdYV3$vu|!L<1o-%S}V;%wUq{8vH>I4dC)}Y$1JUY{dg~| z_|Qr9nD3aewEEm-;Ydkhef@>-DUBF6=8DU|zEJXF6nvi?^-ccla7!9Y{%%@`fUFy}^|^r|$A;@LbLCniMp$1}XB}PB zS?6TU0|SbaqDPoaf*>{j>`+B+VUHzekUxj^FePv1!(5tlq2$m5qva#2h=jM;5cbi=v4z!_eV5w09PBvxXY<3nraz6VG{J-$29mK^mHv?@n0lC;oLh@e*0 z>Cmz}VWK%r(^RywFLXQQ6OZQTR6h{2yIA?NV^1JD)UzhDys&3xQ?Byhe6%>Qce0oi zKd-Ut+(kf8py`WQ;UjnBH}Cnvo{~W&@I#=I2VjmGyp4uVnr3f1s}8XMq;kBblU6jx zAkq{r|4u`nU#CAJnj#vc>r_u@3v5LZgr=gC1ue`LmB5*sO%}v6^$@cfg`*+jlA|bk zb?Q#mtL`MB?CAfgWd&Ng=BJN1)YHwii4xRE`6fa60pIBOGAo1j7>P`MjEvQu;X)JL zkqJVbAdP11(2Jp-wdd<)qXMT>S66Dm01!#?t3z)Y*y7o8hbSv>=k=;q9Z&R$c;+rV z>EC6|aWGk~8^lP2f-@Qr?Vuw-j=$f10SJx%{j-Jy2Hs>~N%RE<$vU@7pPLE(iO5io zT9NI&$kN7Q9IERrk5iy0Q?1B}kG2MXA@r*`|9ydX@O-T-8~vM@x-FlVQ)mi!2tRMa z5dJ#vH_?Z=C|j?s&z!m5xw;ztS^zO~tBsBbEcfvIEDX&e`H;FkGjzn8m%1cJ@R~z8 z+cep^XvtA`b7SV#GvVs9;aNlRiQ1CvK+ng4UZZPl+3h19!}b8Ygcvm?w>rG(T1M!A z?~^_1{^5fi+^Yncr68+F^STRK_nZgzLisFHkC)UtB8%N+is)uh{(W-!9!vphA9cdF zkrjn2A@!7358heIRu6WAJnl?H6pP`|AVjDCk1S@I?#odyeg~0FVr&%gUxJ{>9lvCF zuHB!h1Vglm=n~=t@c|XtU~(3C;nWs5X5Q*(fm1ksnKm)>n)fT}LG{gn34-*~}uAgoNafOHei)g7S3Et`8xw@f$(YfQ*gW?cWDIk{6p`vrF^( zv|qD%c^?XPt(oKAU{>UJ_r?d|{WL|T}_E;Xt3?31`vI|*C0>7#}xIrecoNESAM(OTJTMeHTC zip*+#?=Qe?H+$5j?gdy?A49aZ!qIw$^N=^I^~}Y5J45fom7su>sBSEVJnkC3-NPn( z+$(h9N=E2zUAWv4TB^6xABWKGdb?zV7VGUozM(iH!i$WySAkNg@IV~yZ{b%i>`@QJ zFG)C=Io|m6iCP)jbpnD@*t7FG&{gVCIu?Q|^qy@>9?p#HecbTC(xRQXrU*PGFFtUd zdc41m4T3&b&nV$@5Vjn%=li=KX1zWva;bW>jZ{PaQhB^@qCr{8mXz52AOJ#9qd8+w zA+wPn>kDM{Q5Mn{V8^=D1Oo4D=zRy~qDPi9PS>gJH-m8|nZ69A^HIX_33d|ANKiTs zlAE5ZvL+5|N#&^t;MC9$fUi;9H3`)DOXFnLu$ax8*|NA5|1 zI$sg4#o>Y*>(mD%eQm1R%_^0x>qe&EG-r zIi|h=6}doZyAYX5dhfgFCK!sxx~U#s`n!6(ci^InKe%`x4%6L% zv1v$15IeIqCt4X6GLEXAp`oN2=M7QUwL*VnmM zVSWEbKvj|OVut);mjBKH7WP{~^6IeX{Q%bX;qEwK06vhL{(;Z^2rotUU ze3@yDDWTWcv=^sP=dBq+1IkKps0hZyE>Zv7L#WHcAmpJeZ+|6nViF-iS<^G0|k$QnyF2 zY}V{se19j;dIisbl1wOB3|ZN{+xff_yc?F4vK2;Q#{TUb`ATpQlXmPTMC(Cg-$R^R zaB|v3RSssdEXfAYSf+bM%O$7P7nM!ZPzbzsbGro?)!tKw@unabr&hU3r&OW05YFpG zu_Ar(=plWLTzCL2Iar(m3UQW7{(a!MEFTBa@tI3u3_d4J2=yZ^Kygw+wXj7*$HQ#Q zqs8u)pH~mDv(QoO<1D-lseI7=5J(mLolKuVg1=R(! z@Chm9r{$wqjvmiDWU^2R=8=}@sXv)Uk+QYy>cDA-mq+7r1E*7z(0_of$ejh|tJWHv zGL@@rd>=^xaSH8`9&oNee*V-_cj?3f@?mA`Y19J)FIf^@2tJg{j&{$jU8apj*HLC0)cxT)iY3z7m)QS@u-gEukzhTVIcR8~L&qd}TF)>EP2@K5XhWmRWlwAKi z@4y5Z68uP>7crNX5wXRsgl>kMf`y@_cJPj$%jMtUUK2ucdv?q8_sIKHqrJeq9?FsJ0rP4lG2PYVg z5rZw+>L)oCj0oH++!w?*AND;Yt9D}d2 ze$MrReiKT|C3)Duc@4icxpbX8wTte}*@kB-CgH&@T0?*K50 zJGMAt8v(VP%g#eL6{*g`1EekfL$;&jP|Lq0TlP=3>aqA|TLqa5-VCm53o>UeaJJkO zyB@%tI#nTX~b6D*l;*5cG*A%I1!L!F$k{#eVn!$eYL-JFFgce-=MF; zF$M(hd502s*L^VUzXiV1CHhl~Tf&qn+F6aKk{` zI1vD5xJwL)fnz7fSk=q>MR~Hr+~`QU8jM|6ElmqAX6XaljZFle7D^S$3&;#!WQN8JzhZi(;!vVu$6*`W#GSe1MoQ~@JmX{Z6pSC9q|zRAb5lgy>}IR5+YT44-u4v2 zFlkFm0Ol&4Pq`N`0&f1+Jtb%lbW47s@us0+p0l)AV#cZ`BD0;PXMLIe`!mkKnNYC$ zhWOahREB&-h)cO|s@}$2joMdP;cq z=>7;clH2F2xyBI9y} zG5FZ;u%+Oy5pOKQ#hb1(i7o5@+d;^O(Hba+sj0nhp^n8<9T~gf8Q6~+HVgaSa4dJE zqa}5HK{rL8R8&nLCEPaarl(~bstXLcl#c&qAHm{>cArk|jyYtyQ$3#XCOeT?aJY+| ztaQ-UQqKnV!EszTq<)0OxOb|*G*9y7D4j>^G;f|uBRCF;~}Rt<-~sSArW^tvJ&&>TZeT|lRPY8Ln1Xs%h+Prc(TtY(x? z9Fk!*28B+#_ytWymHj_;OH%7zj^f0=Z|i#v>`tCKd_jMNBUj(yrnS3m0;_%Hqo3=) zt6~o9T_ELgrsUv<@!}9P&I)3gpS$gR5ov0N9d19$;N;aFO0IvW7#!Zq*fr=nx8O*= zJ25=X3`*$7tcm)G+hWEJ0XtDWDq63F$ebikjl*UI$RLtU>i~`mvjfSzWNOgOEnkt8 zIBfRMV$AwHj9>}3fLRO2sX?OEI_u!Y7X=81cD zPX7ZLXI4*+pTjG5UjdMEpQ3wBSwYUpAN{;_FU2n*je+-uZwX>LiF9z;0S8zP))K~s zO#VJN5+$%6vxuYrhBrB^d>i2Q$&rj4TBq2H*|ZcTF_5x#M-)AfBOjz(VF!h66e~v9 zNw*`+R$=PMj(X%#vVWJc&dC;Yl+nlicfT$wnIu0$%k5S@jq zJhQOf_-b!|PIy*2-&x^V&hT2G7#;rRIpJF~<7we?M(z2k@N2qH$>#SyNFV`izw zX%n2;;m|Po4A)q``fh(Ao3^+#-`tSYdE$b7GdVG8a}-anO4Gi-=2J3T34MYr@`vm* zoffO%yc*APH2+-!r@Ak)k<1L@t{%@TUyfZAHVMI8RkX9q4TZ=pl3$>tsiVE)t&Pzu zg9pq_Pv1@PwcvpebSw38{ZZ~r0U3@+B*K$H3dr1vlNu1bh4GQwrdJPR5{R*Q=(SE8 zbK)0sg7Yz*q| z`L_x2)Yn}(M)90B2VIfaFY~W0lzm@QI&UpC{q5en(bu&5+*&IwLf~}@cV;O25{FM^E8h{n;ZJ*4Issw%?l+lRTop#M%xmQZS# zzp#XS(R-Ed7#|qQ+D3J*R2)LlV$7V0mcTSHG$Z336PT>_>W;DMA=F)iqZ2S&5W1Vy zp)NyZp3vZ@37j5J@_f?(plB9|;3<2-pI0EuMS_}Isw=ue^U0?-K!kiWGOG|P-^uDL z*xYY$7ZuWN=nBKVRaWxieW#GBo+wT6&H~;dxsPa5!Ad#GN+Dz14anpGQZwD84qO!% z2w0tZ&{&13$05XC|Jun?*OeG4-fyS}Nf8(A%GUV>>Z!m$y7$V!04Fe7)djv=w7EP& zLbe)B)Od)i!XSB@+uaAHgT1!JW+ z{H8VB7d*T06g9CD`Vpkh-~Bj%6yJpHjI+rSHJ=nO#Ks$>4~s0lGBwbh#Y|q#u(_JJ zjwA1ud(kL2j=XR|K@|dSn?tP&+Yiz%?6+fk>9n3dfs>Dl0o(nmp{-n$et0*Gg8&HS zK-ji$3eq#D0-v~H0Hug+Cwe|z{i!IRd#)$oRuA*eLS|annK1rks%)gzsl4XG+ja+Ak;FM4H@OA3bBPSIWLh9rDArJ&$5K3W-`BJ z=UVnd19n4pigAylgE)NzU1eBniJK8iUlF=$rYdY6P6vh}p4|Twf)JvME$1Q(<%dv5 zs@!ePmfd2u@UQn&ezEd}q4p3PKWftDan%L{<@qDhcq?WlkwV{SWm21P+Zr z-a84p1^Lngo*untX?2i znUL5l-BA*Cq{x9oDN#>~EJrGg#rt}(c+XyaFBk8=YXABSo(#yo?@k=aRyzHp7>kdp z>!q-JbQoJu7!)b;i@clE`7je(dk-?p2nknXM8ay5X!Lc(DRBqm=Gw^yyu}lAvkI;G#?xjU^o1CyEs-P??p`Yh@MdAI+XB}h}1T% z;c(jI#VmOO0_&VBNf6vIY%Q?_9OyrAYG_FA5NRm>q$s}TD)|HdE?$L{;Q$ZS zp`r2Xucy<mlE2EioTG;(ZE@7_`7Ur0~BH>kBNm&`lge~nZou$-D}?| zJb68xm|m|z+qo9~HU3>ZuqFBKRHN~)m3*Mw@`=_V4xC{!B|pJGH#CgsPO(X*b+8KG z*t}z^2+5ty4r!Wb9Z1ZwiCh2UFTeo7L?}K#!29?)!=wlGWN@1>BRz`(z(o}oP`tZMmBLvI`Qb^I!9lz7Jku>8t0W6n3<=LH7Rd`=Tc zGu{~7v`8>*Iv1c$qfvWv?%ZQ$d((U$HQ$HKcc1y*WxhMj_cP}Em*)G2=KC@8y~%uc z81L9Rbb%TCW->_8GGp&d1{WlQ<;mcTWN=zC$OV9jVPY~kHW^G!22VqsnR$7_#0>s5 z89bT{{vjFcO$N6ngTF}zf0PV9k_<+Y!41ivHyNx?2EUOEE=mR~lR;`?lisV7!7Gx% z$;sfjWH2om{1l4M#BeMb{97{k=Vb6uGPpMx+?EVJoecgo8GJk$)RV!sWN>vd*pLiX zCxc6p!LKHRWy#?5Wbn#l@Sm?GRQ$-#=f2m9!UoKlEEFx;Iql# zFOtFUC4&zkXv`bKmh6Q?&?2kgtM$0AoPo_856o3q%wB%%q8MTS4U+g=jS{>PP-5-O z>6^orx=IXNSlB_D8HjWtj&I%);9D#J@TM0J_NV(wYx)O8nD)G*)jq_y^G?Ob@=X($ zDQaI}sGy6kDP_)SF^j?sFxTaVrWh)~&ODA>=JiEArTJ3fkj|43lKvb1YURT9W?RT7 zyj-Yr+}uFa5!mMl45h7qIktzT0xU(+>~%no=6zub4@a$nJuo@y8HaD)jIo0~ku+Eq zqXN5AU`9*^k8^O({tGcpL56I}m;Xf>jCO*!>^PTHw3j%Oy0FE>ARQTisG>tX`YKF7 z9P))+`nW+$#CLqUXhR6P zym>Gj4#?49ipUrZj^`z6IWm3!}xeT~JK!kcqJ#G0EzF;905sqTG*>dS-+YRF@ zbfD`v$i@)}NEMIH{B;z0r*yWGT)iRX3Sr-=Ct&1aduH|d!WR9C*p^X{ixs159eTqk zr+>RxS$Hol*V^dARkn)T`AANY_vz&m!9+J#R`GKf;zCO=&tT`P*>3fy8tuR1_lC_f z8iiqhW@&~wLN0e2ODvw|p>;>ol&pmv_Y>T$g&7Wp^DLiB&m0$ajE&6AP+tzbkP`Nc zh2>JG&Bf=u=8pF75?{wq2fa7I-;l$e!fA3rD{t%N;JU9T55HMuSt5wvEM5(+bONl( z+WshTnk2XV!GeghZHG}` zWUmox5g&+NjB93SyVX| zT$Hbxl7dZMSJZ)CJQjKEXP^Q{CsTg=y81?Vu~SyhL~e8X2haMl=!0gnl#We68b8lJ zm@2@KAE59_->=<)tUJxaiL;thZrP zq8|;9Kd!*M7ZuA8UUbH&FxJ~Kpv~?t#o+{uoy2lF8sfS1boqC*(XF+$big{&Uy9Bd zW>!AuUVte7`fKD}--2paLNfpk-+;25Sg1LNi-IHmF16r3qe--hB+_{G8_rD;m}VTchu zlm&X`3{+8M_vh?1{5kzPMlXHL<|U7J!Fr>y^y(zm!fxYwhmI3Tlx$-ioQ0~;D@Fa+ zdpg%mf|1uCjs(p=yI~ixbjkT+9JQ~*jp=ea= z&;_W+>p-?_#+nML{It1eX!M{KW)GsTl6@isP-M4vG6=yQdFx)vSYjKe^}Rm;942x> z_gjd<7W96+_<*>s$04pM=03Z*V~bj#?*DZkTLRA{dip<50GGv)6?`bxT7@?PY}23R zmtS!B_=Wx-Fwm#=GkcKXeOjoDm}ov=+nP}(gXvkli!c_xTF3#cnohF`Fdd~%-Jp;q zRrBBn+(%%lcYNVVBnn*Sf-g2e;oym9^g29pD3qHhgws3b=oU_wZHA!j$Hm!0k#hP) zCPBW7$qAvMDE?ju;0LR#;+L!MT4^}!V5az{T5;+t^q|~#HQXK%|1ls4!|mcJ5&jnS z1aqN%^bw5~InS(aiD$y^;x)_FqM2^UT^Y#DSNrsK_6X*C{n5W5;NM1!4#l&3n+t*M zv=$Z5;cZW#sXK2MKn!x338v5=V`CEug%}oq8SePGU2f!!r;C?L7k5D_m=rE52`?^@ z^{SE-bNGJ(G}$`NkFZbR%MtPhtYE9T<0Eu|kUJdpI*Bg6Aik2f0^H-rl)#J0ur&4w zj_Gs7{w?^F@KWeLr;tB&PzgPZDk*(R#}NXT+5*xT;&9%gsYhgqO+)hqVM9`g7kjR>&`N@wYSqz$u_yjf+ z4Qt?7vho^UbrZdMiWTS!oa(;#Gz`_tgk5q`U^h>@b11k}Q{~`RDE7@^b1%Z>4-wLB zyYZjdi+5u$el%Rc_~`AIZN_8U{!2FFz1TA{hJ>FDiS9B?@;`xB_REiY<}`?ptm0{SM)v5*i$2~~*C3VEin zcJWam&otIvR)!z(NujD~qV{Q#){P)H?3r+Jq;-=Kx+Kynj9e_4w!Ds%ODQt4m={f+ zdb#4HGe2oXLc<;G|Je>Q9!uw|MY=iBf-h(;85Y=fNEWoo3^eksd9w<6i(g3S_e-V8SiKv{BMMm zP5bd17@VSP`cwo)D;@Wv=r(@kMfvIB=Catm2pWsC2ZT*tYObE=>^)X(nkApo77{lD{v9g*o*#cPa*``UPH2-5rIMXhT8*!;Pb~USbEIp zg}Y*Z6B#>LXyZ%~4l^9$#hTc+L_~lQn|^@bz~DXjS_IrEfx&x~;Qa{1evT~q{jUXv z#wZ>ChVZs)aEhBP3-B|Z=#mRT%{+mJqO>7TzyD)=^hRmBNEG~&2%m>=VD}*mBBhOo zJ7c%7fZ$j^+K{ysiVqnm-;mW{Zi4vsv#$FZq|D9;A(6`r^ectvkv+oeu>o(jF7%W$U zl`_I^Ef194|ECr8JBAs~dSb#O0&-s@u*3e>!$;4O%a z1E6nTCg@6OcEw}?C%Cc;xlB%k{*JIAIO4OcO7JHlQ4EXo$Q|4t%~ygCA~r@Lw?;y$ z(tZ+?Q|uQayC8Qo7~`#qZ5ATL*=j_Hd$p8DL2|@|hneLMxJD)VBYF^3s}5t!{Wstu z&Tc&OdHbUc!vDF6dl7+v+9w4q^Q*BYM@N)_KBf|BM5D%$#EQ4g+89_iotCRWYH z!37OxE(|vcGeP4PfRg^7|BiMFj?g5{d9-cTbSxG1KZGWZlD8P{ z6p;{n78HG6Ly}fe0Z8iKvemGPbO4{Vis<7Z_3WVS++FQI`v!cJ71;KkHW7Xlye36G z)6UPvMS<{Aun$hykI*IFS=bYwtUbEI0q*ih57%9W=}e&G-0kOYdV9o0%AMM6xamKSwlkY0JcwAG=1_=^_uq)TIID%tgLa~zJzk5B&;-KJ`(7M57kFlt zJA9e&t<9Y0^ue{^eJt6d?6lVR9>lSme%5>^&apoUKnuEm#8&})nXP+xtYl`;{S;!v zJt(DvP6ErYat5Lw>rFUq8HoM^pRAQ%K_7VZRm}`EH1Z8U*2RiyTA1B1zmfLoQnQJV+ zoY<^>N+}Ec?nQ_emHJ6w-#?}_ zxJ&)JzR!^bFFtOJ;GiPze9kV-+h^5;I}Nj^%P+|LW<=e zmTzq5HE5V`p@~H;Htsj7$9X;U1n;B^TAeipjSkY>AJ_)fvM+vtnl1L_@EHK%&V)=! z{r4bkCqHw;%T$z0;Ud6Q8j59L;8LjQ^T4bJ4f)K28umo8r$wr!$>AlV)f3i@m5YEB zdal&GwIV)a;e86XRg~a*P=y;SO6Xe%MB4;YqO&vPSSw((LsWDc6+LsVfW<(dH^mcy zt5TnvqMn#>bB4gEbSy#ZmB3|VfYP`hgUfV?5*3NBV6dWNm}%`5odk@J0t>_sSSN6J z4$G^6C9v#&@$YE=32mOlb(xfRTHcT0N4kU)Tc**!*q;#F zJZdZ)-h%!yYt+(W4q!+yD^+Q08<%8OF3|8(0v`2{vNdyB@7uT)xpd4O1wJkm zD8fhCa9?ug$0#2->r^)Ffu#h76zQeoK`yyga!Tp=YZmAeY$_d(d#TFShVgRm-<)vo zY+W}#CF8@u?o@ob>SYX+V)+b)0Lv*IPq7rlNZs+?mNb|v`Qw43RDJ5>=K#rr{NBr% zio5|Ov=*I?F<49*17}kNt=L#ZW)vt>9=r#FuR~}-I6j7mYxMAZc(l#`coKM^FN?Ju z|KJBe5L<-%aU8(Z_;ezgzBogD`nw-t(~T`wZLD@vC1!nNW=NhpH0=&!8G+^M4z~u> zVBN3r3ppt{t0Fmo)qmA`Zm}Ht2>;&4xnY{r6IQF>0->&Ok#jt{qO?_r|9`I$|(Fu|A$b>LW|I zgQtY1K_1}oK7;XFiX{`E*cAL2hRmoKZ6Z`8RE-pw&kcEQMnD0gY#Re8OOn)HrGv|! zSUV!I6A^?mk|!3I=reBvoh>39?=V1Mj-L;^i61NN@jBm^_fN)e<~c+fl|xs2WDe87~BSQc7MnCr=eK(*tbPVH*;qJ%A`ZXtdYb%K16_R|tvtv|8S7 z`FYb&EEzPXq_uIB{{bYMh)w zr++aPg=n^zawmxI;glvOW~HMF1#vCFqn;Mp5cjX}O{)HVIAxJ~gL(rib`J(s-(-%^$XT|6?6>7o-13v^MiId=ev`X2`%$H%MBTfG{?Nr$v(n=qvd-;d1& zTGg=lAk#^!?%`)()lI?Jh+T#pu(qt5!EHjWlg5$6Lk=(3X}3Xwen;n%vUMl@hrF`; zk95)BF3dFMz2KmTqZ8AziBYMriOn}%9E8Qy;QoW(26gXpPT`!cm!}v9G~izrKJRg} z=z8{~!|Ob57G2Mdbo>}T@0;j)mi2j;Mm*PFg4M#Ur7k735ktka>E|eIen5#sF&+iD z#?hmlUeOj?oB~0@HlPGybAd(qU5p}pPyuup zqL21i7TGbSV*%*|DQp$S8A*n=QZUx))Cb*vV0$}xRIEr`M$CH`m~r7Kg&%k+l6RM! zP&&pE1F+Y%4(x}qHpGdYG=4Khf6z?>RnNW-2!>g-ymd|7>S?|7YTo+(0053`I8gb1 z^@S-EjCI$`GmWL1((!8`)z@7u>Gz}I;~ucEKXqp1I92uZR1_{FBy1L9=ZYQ2ry%zA{o z&e%=Gry4!`yEr$hN4MXO?AQY8a^c<0Zo-G$z`sl=X2W`U&K<_gm6%8dOZNGeLS;}* zVjX-d&cp-jHvT9TFQAlImZKBnmj%waeTB)am+KL6dcc^dIDFiw&eE;NDS->v40A35 z%VpG>(y3#UdyMT>-~P8plW)$H+~&On2#XFNI)ScL~(p zt^NUwyYW;^Mh9WsIROcg{xw%KfqiB2vA}?9JK3aE@OX={5pNo#`rJ8?k+Ntj|HF~2 zJ}*4Kwh7Rj&er1)Q3N-RBJ}P>s&MZpLeHLmU0TZP-Yoxi(RsM@-X;Q=Lb%>CgtLweS-YvVG2W0V4-Oo z7tB<}TJioLVyK-!*fdLGdyZij>V5u~PbJieF#pphR0cwZ{!WSg7-94QPi7Rr2)l&i zMks#%FD_$oaSYV215J?fLfot*%lvDvk$t0|EZg>9)Fhr5<03Z|`46Ose-e6fuiW)F zk!hTU$2~v|OTlWeC+vt*k)j`kplNqr`@Y07{8apqi6v?Cy=8N2GB^whyZBj9w zkD99@(PYz{kxK%n3q*NZDpo;!6>>4E!5%UqjiWg@w}T=ASCZicXt;q*e3~FqdH0O@ zqw$Hvi$ISOQh*{-Ry||ZIVwyFUP&RpR8#4Jg~w1_K9uNj_4E|j*_K8Q9Knz?xW${_ z#_=q{5ZqEyI(~%ISP5~O;|VjmoE2^5_on37FKH-=j^;867A8N4fcuXhfJMo#DCisi zg4{L%O0>s31crMxmVvp?`XEB$v*zkPYq`(?v`>!i;)#C6)6a9&&yjoPf=D!ag(Fst zT^iYilD)Vd=WY+lVmJ*Z@t3N7q(DDA)Uq@~GV(-0g zE)`ahRYD#!Qk3>(fMC^HyzUr8Pf&I+tCR@qt)WED*hdpc^oi2>Lc(BHI$l8LI*<|E z#z5c<_K~XF`f${!K{D=v6w8;~%x6bjf~m^@ESnIZB|HN@V29*pClxjPZTl zsM%BEFiMt;GA1+5F__G-VktSk`p!UK8uRIykXTbs&E3tu(;svnOLhj7ebK`yLf}pUa?+$BZ_?$^>eu+BmHBv>iQx4 zU@qS@!H_k|EH3$R_JIAQ!`P)(VR28#&d1euU+&|8{n_>!#JxU54B;%sHqFSMz@ zOK3QJiZ#f(tXtS){N4O6EZn6rVmxka_$SYbn7$^exn5)dB@(&7Pdh7bCuKhTE)E$D zKZohENxTb1O%+JN+KJ5ntn9N5&X|T0QG*L&cqhChVPIxswJpWSh}%{7g9n0pSa9_A z_kx|+La9aMbI2KYTb~uNwPWsELWXnM0+{(4)tCp9@)QA;IRMhbnDDV+Y=Py);J|W$ z-FqNDYUd^B>((9ar%*`UDxtd|D?@DcR+xj2Gudx#O6-J9_e1_FdhH?p#)Azp${ zp&rca#bbfgr?7a`&$X8fgQ_?&;LS+_CR{Ogl^^LbyfD2=`G*`ePqKm!#a2q0f4k{Z zQW2?l(6fZ^Jx)BSwQ*8GQ|CixuY+OdM+yiJ;>AaQ(2zUcPKbz&_$v1r5Y`|Pt8h^p z0|T2j1l5;^UR2*Ld>`D-4g4MFqVMDN3@6kh3OK+L+9;R*6s$fGZ4=)TSI?;b>WDoX z|mBsW0F^|0qbCi$s0ikbm$>ZyaU2$7++qO7{`P^K#s& zbkCP700&?5PE@*ID|yL#Zs60YzW#VV@+sZf;gXkp7wb!8xM0dppzsg*`OrLI-Vnic z7sC-qZ&|>+B?q$p@A*Ft{2vGYf5m}C3zsaMQ#GF-UX`E@B|1l@;SV3YluGe;J^rr! zUp`C!myfTp#kXozQ?s|W#*_Z$@n`>MvszJ<(>U(RAtb%5feqe5CT7GY>SE^mJs&+Zs zT2t+<&UZC7d0k$#xmK!aBF+`n_ko(mCf_|PL=LuedDF^O4YlBcx4PwC$=7&qW7FzJ zQ3tr;YOY=0#L8=$C8Nd~UvoW(uc=+$ympnhzNt}auDx%0jjOr=q`K-*ZG*|rVfkwt z6Zz|!!G#2e8f!r<+kHg~nJx(!G$TX(ee4`Ynmk%r-_pX$J(Vsnwt8jDaGIK1szoVR z(<*6sHQT$g+Pi$k@P1$Bt8b`5XSTFd-%|^E>l=JvkI@(CpN57elxnDJYF>#R75&lT zTlTMDs;jYjWvvS&2&7VDQ{z?38o+fDWN_cLy1LQZl3?tzT5zwrMoM;EL-ktpFFS<^ zYh7z=z4=N0*VQ+-c%@a%wJWPzyp&V0xYp}}aI}EUiJDFBnjK@HwDK5&{JEqxL+D-0 ze06oeT<2?OkP@x5VvP}Dp!lqmQxfaz>X)NSEJ3%%z_RKV^dW_?{+`BaFZsEus!PC>`eq1$Jr9ZvkG-eX>#bi|+f-Lmy*4+`%!O)mFb-U7f(C)iQ0s_6Ce6n1DW5aP zHOB|d;aUvE;c9Aj*)-jV9AA*QfR%j}l@ZrGDi#2V5y8mvHPoD+iS|^MyP%1h(dpLs znGcz+cFmdPTDH~&aj0Jov2JYfHdiORm{hN-Mzb-tFhZf->YGg#Fli3e$GqxBj7lr| zmN|B_%62RiY8Iu(oAY6DEmfS3^_Ny}ng~1Jb5G=XElZe*O_MG zx+t|qTk2K|6=VQ&szDI2wxEM*&1uop)<%Zg8aZO_X{^5=bgXDzXeg#>=4?>yLpKi3Y)y}~>_=Cl zZ{;#f=d-G+FovW#bLQdYSu{&pu;{DO!Z}4(EvlR)-t#=uB~SUHtLDs}bB&0cRlcb3 z>S8N+_4I44pc#u833Ui1 zq^VGdWSKN|Sxbu%Ps2iFXl|N{=?_9T6)dWqI(PnUSHYTEey=pOWd%mQw|W^u)_d(r z0TXd^6H!Q0jb8&|#=@zEXv#nP(58fwK%%>bPZ9q9`YjO@KeRXbFb^E4i6;x*idADI z{^K5z#(ZR9oe9I&A)cIdX25(|__6^r|Ci)}T@9?L_%^mdZIEd1S!KRdoxe~L8)6U@h|*MhCLJ>DT5AG!=Y=R>~8Qo3{w7{M@3 z!wLAoOiB6^!aR1!^tFILMA*t-2blYC&ZuuLFFcnapTYSHLd-w)lGp@auqa?oPD-Wzc&o!dCltApMvveJ}8*LMW~B zJpObZVCoCc2IB7Xr5AtrjqkH(T&R!1vkU8v%y_TkXvU{1d;`P%|2p6jz!pDm z2E4!qUkCUez?Yik-GC#2E&h!I{Bv9WXF=}<HyaPw)nLOaKM&-68QZH z>axaH8PXp?y4BxT0sa+Wi(iufciYm_0UrTu(fcv_=L5i2f4vP@#-G(c2NAv$f7bZ= zPlRv9pT(~y5xxh17QY`sID$W8o=cbbZ#AE`@wW|WkKylPlV42;cj3=!?^1+c#@`iY z`b`M)D9Ys~d@aH}opF^3p9A<7z*c)NM#VLNAyT40z7BW=U!r+mmTLHgPkSxzDi$Acz zO@Pa6`R@cg*9K1kTxEl0@aspFNqirIpO4t!*8xXt@b3X{u)(}1<+Z`T1YB=}vmj6X z6-oSOF`i$y!H*#SH*ERa057t^O@J$H@KV6n+u)l3Uu}c01$>1Kz7+6e8=M7roDDvM z`60~)zYF-&xk-AD0zPJgp9TD98@w0r-)wLX1T(EXS^f#6AF`!ufcM(qHGsF-;FnO| zWh-Bc^rvm<3jzPs2HyzyaU1+P%IDb1=ObOWrB4LhW`olJueQM-p}!hz@LPbZZ7}~W z;Sw7hM}Ho%_2;XA`)u$&z&mX4Zvj7RgSP|US8e!y3AoG#Zw5Tw2Dbvf(grsIzQ_jO z2{_vZR|3wk!P5bswbg$K;E!zZ4?*8AZ197Czh{Hj0)EH_*8vXM;6;G%x4~tAn{4n^ zfNN~(AZScoV*grP-ZNSAgcpweB)z;tKBEQO({-1y^vB6IQo?wF?0i0=r z+W^Zpn7a0)4gXTWaT|OS;J0k>wSZr?!IuJl-Ud%jm!!ouI1A~!Z15SRKWBsA1^ko^ zJ_`6}Hh3@K@7v&K0dKa!PXK<<25W$WHh2x-bvBs)ThMER7Xogu!8Zb~vBCL(m)c<7 zQSIgk)>w9H{X?nI{;6*GYS6!@RX%VcnjcNHh4A+(fM`B^j`vw)hFTo zfEWL362260S4|S$3HS9OcI?!x|3;AM;;`{2Qtz>Dwm$>yZBM(_r&qO~v$d)bB2X z&0wYvf!>MVlB5GB97Op&cSzEUc#HZ`4^IX zq{9BTKdHi#kc>$cJAroi94QU7T!Y2LpAmg7K7{xN;5rzizcgWfur7$k{MCf{b-A0- z7wA%ve;LxpV=+YgmF2$$_=58#$z#G#ApZ^+*XSaVUWN2GU>`P^@Yevh0pDg5ZUlS{ z@V#rohfw|w7^CO{QN9iEt-yD$3G)Q&cBFF%viJ!wwU^7jQn{A`|9O z%U^&WZza;!TWC1?={oE0XQ2lO>(Al-NJCb30u0tO6NJi5a_+wOy>!fm4IR9iSqoI^jaIN z0$t)4_<5ovso|U zR;0VW3VAWp9|k<;7SIbin7$17T4rO7ZQ}b2%AYPqpPTUe&<{)RPWJB%z!hJ^_&3Y{ z3GjC?KT-b>-_3xRLI0pS0iTEZepAU0t{89__3iM$$7RyE#I|BbRBkKS02)Jzoz2}Z7PrYM3fHz_4 z3F{%e(gN@%93BCmi~g`4rbq1b0}hPfXa0!vg~($)Z2#I3?U^^C{15Hrk)LvAJ*@xL z5$XIsjP(%zFGs-7jDW}6Vc_e6yjl_+A=;Z@WDmv`)3dDF4(5dAVvtdoCRTyGHQm<^(l{yk9bczM~xY z=EJ17?BxMZAHko)BhpJowExNxaCW+d-KhWS5$T;H>X%xYmroO0pV*h0x?H-c1-qvB zo#m~n#c>D#_Z8lCwY2=2tG!KE7fCl^Q*+Uxs=MaZdRH{nB)~b|HPT&kt8SS+tLm;> zDk>J0FTQK>tl3rNcS+^gsjD$}It^eEcA$qvS2Q=ROeQUEGQ!q=r?K5B%~@N`dbwL| zZdT8)U2W7aHgH97o)5cclE~*>gB{~0U-RmtponSR?UYz)>)3ubu=3082QlF-%Cq7~Ik>WUqyY#c}!@hhqPM0mh=C?#KHHgOM`_!tN7vFSE z!CeIi&7O_GbSv=xx;hi^s){R)&ka$zxD+j|`ju8xw5V9~l9%@qq(C4FSoY1J*vFCx zNJs*SEG~7Uh>8mCb)_y9tqbB(i`b&268D388l5b^4wO!&^B0?jV$5j=JB1Du1O& zg#|bQWw>Mvj%Zy-g=PPIr$87tbbjl?-5a;Ql|n*DoZLRQ&DFQowY4=Xc!+?DdL93& zT6GE;bAuI-H8R9wxw=LTQeqoI$b%a*zjX$;#x=DyFAlZOS6l75C=!j(;Y;>;s!h;V z=6qXlmCI)tjBaim;=}ERDZ(qepRb8mv|3YpRcXld8TBEu&DAxv?=H=skvC)15$X8W z7rjeVR+d#RpK~FAAZiN1UrJS3q%qWS$Yf3vJxt*{F=2JBg}Q}SiOrbxM#a;F#D!92 zL4#^;D}BmWyim%iI&_eHA!{OZp<|$`41I;GT)bi?r3J^+!uSO*6D{ZCP~5mtLrdAr zH<;l(hvp$3uW3SaJ7c%qB!B7shdvrB*AfWRGSj9b@9TIM569}8lTl?R44c+ID~!tM z4?;H-X=wh)Bwq;KCkshawmwRRnLy=t-WnG|SG?MH6PvJN7EPK~p1iAvGPzboNKuoIs;u}L*%qvf8Agk0GCOKQr=|FsEc2RJm72_? zqLTZ(YGkfTEQW!j2UR<-Qu2^W=6F@Coj1p;Vq?@~))%Ao-W;DQTJO#As%X78$E%|C z-W;!r))zDD3(@*wW_=-AU(Bp8MC-jd%Bv8qFUlORiq;o1>kH9(PID|(w7!_NeIZ)! z&GC6f>%BQ%6|MK?NX3L;t?JG3s%U*7v%Wf7@6GY4qViq_||&XkYV`)O6Fe24daBA>aVDq5e<+))*+&t<7%B0qg8tC*%*_oVR! z`^KA5$ZFE~7y_0)W98ee^%S8ST<%-8wYG}T#az+Uvx3jnr-~)|T)irm=yUa|SfX!muZku5)|IL<_8Z^2UKJb1o8winajG)A zY?aV#mGv7I39C?5))JM`E?st zhF#tquZm9d=6F>!)z80P)oE(xG`2`qp~}o@xoE1l&_5U}b8ad+Uh&W zhk%Cdj22}r@O-XNJ|VuJ+}Uvv{4Aa2>Nmbzqm8khx~-2IQrHfRJq4c)RN#339g48G z>y&plJlGNTfMJW{yFhIz=UbdzQ=v9n#%oJ{Xa${h3=&q@0IDrzD`IVlr8l}MeAF5< zd&V495p{Vu8H8ryZXUA9a&8-WY=9ly#lQSXy>(-jMEifg(ZksqV@$cPJevMJ@cT-+=@4@?v^rXZc z3d`#fcRwsUnR7edL+JS>uzYah^qyI~-T07kgYkLe>*AoqeG2t_8SiV#_<2sne3i8% zKGv&jT;g)bUC2+dT1uy%;!*zh8g(uvd6V%~<9o&$-oxm*lcCc6&E!3Je<-<^vC>#? zoMdc+WxO;#56X_)pz=G3^V#xAiE9u~NnDF~DseR3Xs1s&t0jIw^?6pLK3icqzi0NP z*undBUc^gQ9AkMy;_6JEAn;yZNzI&pI1Zsz@u%3Tf1ha|2K@4Hm~Ad#Q28U<4h zTTU@q=c&?PYFur6Qsgk<1(V-`>4%(^nEZutKi;<~-610N8z|0AoZefioXIB7GhSlU zxvSEx7n|uKJX5-(pz3#lWZL--lb{ulkKRjXjJvpe6{&1*tQ%zoK@@A8F8ud5flx~Fa zLgO38|A^R;awes8eW3CmAo=jb4TI`$jix_Odiuj=lRq+9zvC%8Cqg~{xygeM401En zb2o{kdqE`Mo}9fX{dq8b#kuV!?}SRf@4|fm42?t?NIiuH2oXWlYckP{KRok z=~r^5B;Eqc7bosflb?}HIbVvT@7EKO-_=m*-;+Eqac6QMDY++SN8$+1pu_`uVfU+? zm-HqbfA#2Wu^;0@{2}9z0~C$3m3<)n_a%{jxkJ=AJqmKjH(X>KT`V$Q%8w!6t(^6W zA9EgbEc_R-hsT9-CsvTIJ#o*$^fl*h%?15hsOL9{l=F>BNdB)>LF#vK9%9c(5&1?~ zHX(7ZNuI{}nB<{}ORC|CiMtZ2o)1VKkhoW&^8ehp3u+wpC3Cg~`Y6Dk8wbxpa_NwcL-TXdD)$!r} z^-%RJ^@r5|GUM5t`IYnMly4S~Pu%k&{(BE9|1JYV`YPi_D1C8IU<*_|mWZ^^!y@he zvfclCU3mV&!6E(Ku>6F?y*MPuX?>6vh}g9WD*rcOmx1(8n7&Tj!U=GHVp2r<_F>|; zI1d-;3q^4fFFA>&0dXAD0UC*lWjf^#k6c;^;~_q2fu-Jtht(22&hH?1ng$GgR?J&iO@b|45{+J4Nc=g?lM&vY$vB9W2tO zy~P34N2KlhiTLOQ5#Nmw@$IQ%4fPS}1M@`s%sC=`@?w#`e3eMwzeQv$tQK?5JuDu< zcoGlioJ%~6b6D|E=iU;>uuh2B{BQ9Gj$lp5SlnCe%ekn?7(G-xnsacGFy4yr%zkbE*@l0H+ufcaJ=$Y6qa zCiARFzr7r$J2>kW|4Dz7p7fg~H}D+<$vpRt^xDdAo6!NV+4L12i8EFpd?;zr*C^##P2OcK>zp4AyacB>TRCYKL=abMa-`TKZdQ z>8_Q&hJA%NmVMl8$a51#o;z_4>G02T5&zsO z;+M*1h@ajOXC-b*8>IX%Me==r9?y?v-#Op(BKim0gZw5`y>IS7CZ8=L!8PAIGo%{} z)nC?&q}yTouOze19ac; zC)7CVdKNrAamPUA+xP6y{$pWzTf#&}d*dsHv`Y#0=xQ=kgiB8gXT2$H$rR&Ke0Y%9 z6ynfQeA7!ZK4Hka6d(2x@m*hWYKVVJ@o8T286mza#TQKFE~V`UiL`mW*g_1sI5)%& zrc0RTB|jG80Mm`ko01_z*>kG+J7PV>r}<8T>B-WiPx0MAlW~VjH#kQ#x%9W;b7uM* zVt6D!$$TrW4{;ai6U<+d*AX)%{yM~wrH``@ll&`U^TbD;TO~e1tgHBNh(k%&a^5fb zA?9h3|B=L{4-)4fJ`m!%()*p;AeqD)#e4YoEbCJZ`#Jf1> z7b*N*@eX1P#oL|RF8-XDFmaW0pNZG8?uyqEuOnW={}OmL{uk+M`p#QQpWH|MCH@z0 z!~f!~_+PvQ|BEz2FYzY)FW!j%#h>ASk;bYJugCx5Rrp_AiT}kF_+Pvd|BF}PfAMns zFD?)9QR!v)U-G5+U%UkWi_2Jt#EbF2xD@}3KP3)Oyb%A37ZJB6UV#6_^YOoU9{v}9 zg8#*H@xOQu{udb|D@4Z5H6ml`25}Mo7a5bQ#18x~G6$>{nH%mCnKRaiZTMeo4Kc9k zX8bQ1ZZK{%ZW8~1|3x~(7URptt;TI4>E0H}=Uw9m#_h(BMbdpHK7;>_yNm>@dcA&l zO6l~MDn$LLxu{qiv4`;>qvFt{?`7<5>|^X}tT5({HOBrT^&4cYHx4t75V3cRae_!a z8;ny#o}X%LH2o}Nv&i#p#tzdjGM-~R-?+rM%(z^nek(-ExyE>d@n+*Hk#u*8*tgnv zpK*=x5s`F{8`m2*7&jU>8J{(7F}`fvYTRag+xV{W1LJn%$Hvc$JB_=Hu1lz2xv{Hp zA7gj%_xRsWD;E@{)zD~KF|0UpJV)sl(WpZ+_*y2WXwOw U=V6@`yPCX@vAeN{@gU>>0hu-nDtHE(Dp6ueRGQh zSh{Ln9y7*ZG%*?zzLLNPGz%grZt}O$Yi2HNkzekhLIh)H*oSYrLk} z+hU@JvN9rLt(WyM59;rCLZ?MBBgnm4n0qkOT>DDl#$FDG9Ep#9vO>vBLO5Oc)sjYA2ru$McV30V*{l|GlS*E*76H2hll5>U(BEgu~-jsF~<>x1%v^9ldrE6_aQ`cGv(Y01|t@WY0Hp8!DihhbO z5E#9i6`UhR3(yZ-^RK_2iF$!zqeebS3=XiMbyztM$9$tkhPe$IK4nS zHwuBX;zc(++H@4E`6@kFOLx}Npg}QjOA#k-g+6WC9SYN<5}oSmh)(%9=xeof%tKa3 zFhjxE;E0+LsxO|3Wk!7yayFM#GQO@r_ogkXVd?VuMQk*;d4DJz+7$^&UEQ0HBr~y8 zyU#xo%gG5J+{57mdudKPV}Y!k3J7^pus~c%r{xTUkz9@iGK!D`{rd(tX5yi%*l(@1caq`Szb8bCDmu?EkPKJ3i{?{b@4vItk4Cr~t!xldc zPPR9JWM2TT#{3T~z87c@>eD8h0Exfq;=j2#EbyTXSr;Ab5aS!StvasC-%#6IXNLSsXsihdskQ*=X$QeHYVg= zMLC+38B!USrU6O=9h;vfm6<<7nvIj+KagDSQ$B8M8*+8$Bpt0`_WcvznHvsLi0NGw*1_ zDBmD_ma&frpJMDH;S-GgN(jFdIGg0x1Ee@{;+(M*A^g6y z^tXs3{?CN)--7oe#Z3}E&De*8KE}=wV&0F0@LPv_N^zq=&ohi2B82@@OCP{{!t*4) WC4}o38zsb_*w+cyBQD_v#{LF@)NyA3 literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o b/project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o new file mode 100644 index 0000000000000000000000000000000000000000..e3554e1f4cf5a35c74a3a7e06cef1a6769d0f21a GIT binary patch literal 4968 zcmai1ZERE589q)7B#idDG^1G;z?6&RuBov}0x5(JC-!w&oq%wXO`_B>!H|@EF#8%c zQW`?9ono8|m8Nad)~?m0sh!knXzL);R_dtKZnhs|(loIj+nCfJP9>L86^|{icmX$6<&`Gj&G@v`<(18@;+R(2c5J;?+9;)eVdyS{F64`K zi|e#f+Z`%)i#sQ|%PU)0L1}d`2fHfVnOg(SZ|#7tXI_`Fg9W9Hv8y_ddbyO&8ig6cJ&R3P=2V-Vv9_xCvi#I5#P;SU&%X+UsVl4++6DWwd*AN~f4x`xq;XN7hh#r` zy~A6cobXnu9_j2vi>~a*jLS8dA=#d>8=cpcK0UOZadv2dZ7XL!md=f|LbV}tL%TYe z3CXf<->MjOR#m(rJc+;t-EmlwxfC!+ct*xH0_#67P=amzyEC(y`t)fsWO zAl`a}VvW1tm-&srtCG%1=@-aCk*VET%A<*6e%Z|74ugO~e;p`=Z?j6COcC{LHrC>U;dp3*s`HR;QCBc5(~#hv*& zpt}$go%pQclFoItBGVNj1!r*^r;K7*a<>{MyM^KWUU%g0u;icIVCG(!`iNq{DokDG z5OtZ7N!OdxE;K$H*}IRQ*yEoxVDJ_l+LY`8OFBEyBAt7_RXTTMtDcgt!!l!@*OdIS zg`~Q-!@_pW_Ag!is+2VxWG82EP?q#TLc<9k7qC5iplLN8*z-1Mw;j^--yoR1y>|A~ z2Hig)&EB%Zput<#hh*o>W_lXROQo0o0;O!~moQ|uOXbV?luUEsD;_;qFwpk);&b43 zf!ks7Iy#EILhQ#X?u5c_CRapm1oxqSQr z4Wnf?hn7^#=C9;QuqNN5SBk0kW!j7f;OdL8%f3Xd$ewwJa!ARqLxUXCZwu_V!^CM^ z!}ID|t}mm?9(?#406RaNn7VqZnUj9GQCI3vM;ACYqoneAA9g^(t-SYL?`fqf^?t2n zOFncE+%}A(Gw+w5#4LisAg<)IoSu`?zlR5i+I+f_gVSc-E6}1*d;<|VDnuD)-{fN! z=+md0XR&Q|95K@~YIz0GqyW8XGWz59Tq2T&#qYUDD2-AlwJzlOkaKgyrJ3}5ZV~F? z=ygJ!r0e3kS2*{wZr{R#Ovxg9J1=R$Yyj%^4TQYC?H1olh!w5iKsj2qak;r#njXc735yJOvGU*L zaweZm^8uNm0ZEr9R(j|1{+d4KGx$&ZHhDd(KZVxNOjOi1U6y_@o6aTcQ*+5W@0?*_ zSbKA@{51VfDUd&Yfd-b(FM4#3)zQ(x=;{gJ%Av*RM!{mNXMb`;O*;FBq9cc#M`Q8C z;OL06$=&?8H_0VUPL~=zl-Rf@5DNIhfk;#H#)E?+(V<73uKm$O?0^&Mp-^up**waa zJ02TytFh-*=I$RI9*&Iw*`G)-_sFOka|gS69#5#z{=>|j7)YpbHM$>|3CD&xO&;Q- z2cl|}xs7jwB1Ny;dygy^i%=Q8}nv(*J*YC_eX(;oyt>H3*!5>8}I0H9pUSjJ1MC+f$Bad_BM^ z-c9(>@-<}&rjmT+^uMTVAT%Fy-sTuDrN2kxS`4Lmbf z64&3)*lsZB#~Mn`^Kbw*;bYbgC>sDXXl@4Df|7WCS^0K$qkIXH*UaX_>aU>BTIe&N z!xnl5^gaun13hS=KLq`Pg}w;-q=kM1^unUfEUd-~ICW zuYx{WL4UV`eyxJ0pUUQXC0`M2H_M1R>70+RpU z3YsP2{TmO*#uDy+7LKVMgGUBp@$ivYe}YAVpkC(p-5+RXlS&b`QrV}*a8a7 zA4@bv1n!F^=DG2~qlSZ>BZF$^ffhzEJb*hf^tJAtn<5?{?d_W)Edp*9aEpMg0zM(2 z*EH~Y8Qk<7!POcgOrhJHVF$qiCRowKvCe2hMG<2C@tDdw!RQ`JEaL6y3Pyslkysqw z+L0QDhOUX_>lt$bRy~6GLLY0_F-AW^2>u=z9Hnl5pW5Pmc5>_%>qURJWUXOekR~Q2!0V~24{$1RKPa@Dc)Zb zjZ5*51RrK>70y1z|1@ANF6hq%eHusAj^uwxa4p^(f~y(3O%NBnA7_&MJp)*Up&SP! zzb6R7?>hwHcQbqvj0*TCg7ABtApCB}TSk7LAqc!GNMw1S`q^zWXxs%_LaQ|M&U- z=RD7u$ISb!z4l&v?X}ll`||Cmp5)o{rvAS9jhth_qrTm#w^iJ7>n>4OT1;JQ9ro7W z2z~J79U?^J91HY&F7HlqEQ9t^XjkBvXMAw2s7Ry)I@YA4QkB0qIXFWpjLOnb*{-r1 zN~{%GD#;7`l2BQsiCtmecnclq*zzs3+&evRY%8rNDAU#Hy*T{5$fs)6`9}Bqkjv1@ zY+)JS?xfpp*#$!;!4N|Z(UPZVyl86{+S&r0qHP@)*Vf@$yfmk1VXXKYK&Ha<$>9ew zp+c~g-{EJo#IyK*U?!iRb>X{Z>-X5xo{aDVEqDk@)&pb(Th}8+wBk0=f=~-3iAS@& z<#{mmGi8Wp-&#kqVLl|8gL%|iM`omhx^gO|13qO(Lz9Crlx|?~*M4fWoq8!- zO6M6&E<6p=_IYwc<&Mn20neo&_*3ZO&BuZxcEKPdZqFb$!P=+$oKHd=O4tg%B#b@_H0 zq&!aF&Sdd$Nz1zAKJVpSZM3Ydrn~J?qD`9)zBI0TPEsyP_YT9uMR`a> z_TZc(?>qOkJ%RMTj`ae2he~=z>Z;vldq>Fcqh7YR`VY43d;s}|t}2Wvzow`6yJ4YE z@1pRpzJnZx(%=s2@q*}MLG*DU9=k+sww9gJ(MHDzH3NlEU5b?%6I${NPh(dbRWQPB zPeVdbg`jX-v4skBpiyRE2%D~kJj`-txGgy$T0~_!*w^2$Ta_No4FPL<4($R{)}0u` zG6PRVI7ux#*c~mms+71^{Vu{89>>`l;fzr2^_;qb4Ux>LTFee~k8!9OjITQYY&+0> z{bs<6J`*mV`4ujos$Bli9OTwce!i|;b@e6S-PiU*SeK4Yq@xpO3^&_Gf*b4Xam5b{ zk7agvEW6ycWe6JOdkg*}9C$n1Xu5iO&y`+#==Y!%&)n1j;o+=+$kX0-Kgv(-xhoR! zq>AgqVEaxE_5N8IdHYa^@V?%=wM*!k(6aMc6f}f2%|Hcm>%mj;H3r1R$RBOgDF(!l zm`q|IeS#|WKxF$9IS`%72s?xk-sv}0qmDL@i`K#7>z_w)UmqIP`-*G^hRnlk#sD7= zB2i`;q72|QV}yBcm+YZhLLB>A$sQJ4C|9ON=6_*q@3}HHrDZ2OW5}v=VhXM45&jnq zoicZ1T!=2{J-DR>Q}Qn9(^=NFL};yJW}tsZ8GYDa3!7pda|Mo={#)^kxvfSpf~fpuXfigI=z58)XQmtF&TnKepax68qK!~muO zh{>eIWGOq~^oX@0Mq-y`iKXOVp$6;Jz_Bgt7Ed1f$bnU4HkYk|BdaqllQ8s2wl1%N zoxT%&Vxl(}bVin{zQf5eeO~NH!y+Rc_RD~!pl*^-SB#L|$+sv!86SKz_?oqxR;U)r zxS>ool)2TSOv?^AL5>L*R$uuxq;2JwIcINhV;$VD^`tQq>mYuav-iM&PS`J1X^&-7 zvJe&5g7I>({m)wfdmB9ku$PZ57-V%WEb2)^qaAQsIz(n*-xr|0-qbCu zch?q91iONJ#Znq(o&XuiD1PQAW?D-loB+6fwZKtxlRq&>*~IEqWN%%aM3Hg|(kT?K zQp&KoOSk$X7Pk&8zfXs;?HH7iQQtc>%vf%)Md{eP$nmu(rs!J7Y83aNXrr&cr0I0X znHD1>3r?OHu7iVG;z@W;KOI#hsjX9&>#BY%ofio|g}5ZNdRSM>W}0_bS-jsOQh;x7 z+44>BhkM7$j9eea^pfylnqTY)E`wht-}eJXsg^Houtwm3`B0a+=_UVr=BC~L_q|E> z{hlGd&Y8W5zRtxk{y_i1rmPVbkt2*7Q0z6fiXGtRfB$)Sb`}&6JSaEV_G~cIBR+Yu zv6-;C*$7>SuPaOMGxX*HJ;BWdJ7l1K2yyUl8SkcsS49fzjp+q({v4@D*P=E-!hzY} zt%tW!7yLzz0{o8spaLCGSezQDN$+JOhPFB0A`f#QH}IjS9dDC7Vs3nzdYY|gkUTDQy?HauKB z%;p`6p=9qJ(=v7Vb`B#m@HzAgyYdp?FLu>q+9j~Yg59#%R=USSqMAUzEa>0ChAHvk z)M3*xW}CBec$tCf08Lh2h5gpFguBszjo`jnAV%utJCrVo#! z5mG$iwGLAlT+NumD^xwc-HTyEv2+Qw)Ftvn5t;|~$$2fctMxjluU0&R9MoY#&FH$9 zJ7=4AC`lT<30RcLbJ$pc&oQ%HLdjLmj5wW3)S}(=A7pP7JIZ}063w>Xk?@D`EzZlr zF2^(&Sa_W8a8eB#I<0pmQuE?c^Lj5v>g92%m-nV4)ft!StO?Fe4$WupWtr{Y;_}68 z-@$E{+5Stp&)O*WS?y0Du?9Vsjo#)`Zam6lAc&>I(rMHto7^Nks8E+m%_IK65v&#f zGa^pxJ3L<60;?w{MVRfA&Gu_-5S<200Hy;ISygyhR_m^b5E;ypMqm*0dax>SLJJ;6 zr*-}{t@Hg1$Vu-!n4I!jN>?JL@vTpUCcPLu`uSfwKS*5u(uj#&tS97r20b}3cycG5 zH9XrXTro?yZ#q)cxb~!kRu%=0dEd$5B%T`7{&d{8TW)$}hpI-X*BMwoaN}jR5A8gd zVYbh=L9LWdvwd~~wc2a8-<_D!EwwuS`CqYmJmPVS5w#*qHw{ZFC}DW#(Y~lTqq8S* zdB=!}-9q;nTXK%{CWh7(VflM@c#hOvF7hn8d*2D3ME3NE(mh|LG!(|Gfg_%}@LgHa zxaPeTotuHi*KNm2i&50@WQPmws-x*m>|jf+B9H0%EVQBs(vo20{d0W%!)cIJq<#&R zxSVQlD4v?rt5_NfEoBRJYGw4!ZcD-+HnkyDFYp5;34Fo%DUxv&$W|N zh3UVG92ZVLW^wFf2WO=MoI%b*o1jH-RvMn}7f*DBMZsD0@WsJdW2S9d$^*CX-A%#PU?e-%+y_Q`XSVp0t`^XHD>$ zZ%|%@P?Cg4`c*L1(Z4^ZU%L$^MWz}a6P6Kt)mhl|ppOi*u)B3P zT~vfGv480R72~iQ9B&~B<=-G|bLX1c9)uZ0v`a&o7$N@w zI@qm+$n_=<*l_e^*^wS^-A$ugCgvo-1)JemjECzC3#>f=;I7L9+!{lcswc}<+Syxs+~hDn9le(qvyy+a@lOIzkzZQ z10Xlh4`-q_sC+D4^cScDCm(?y1E+5iO)$d`gU}MYC%%ckaU#WN?Wc>I8>VB31^=Mu zcGQW*w&{O|4z<>i&7Ktgx7INu_{pJ5ky*<^-F!@)y1nUuEJA?L0=D2=(4CKMB{ zbu?}kjfI`1WsC=R$ay`6KsaDT_d``O@ zqW=euz})OSj|T=vko_*6&A@ZW#;xR+z?PkNG17X@4z(rY0j@qeh-SR1nxT}!geZFi z(_vc@@^!VbnC;L}ltt^QPoP5{K?M$gbLjW@QWe4z7PahLiv&@PfrqbC&6fyDU2QC8 zJH%I1(Q1y?-jCOwk+uUx&^a^@A{z; z_8y*fn6t#FF#}&92?Kx&Fn+>vl7t(wM>{ww412bc$t~!JkwHc71G^!B#O~_n-9(BTcX~=P`#C*qx zu5xU>1Cq@rI-AGQMlcYLf;pqu(51t=+PK}ZX|dwe{m?t$qPf`y87{c3-Xy~XcGle0L?b4A z9JYRq=Ng>n0s&Tx^DxK?)j9IQshK#{$lkFQUIZohX2e)^YY0ao;nYb=itzrhYf_?b zPa^t96y4;YHpmb;+N9YMWow{89_nD^vAG;Ga*m-C<0@VjB-m`K$;dzvuw&$av$c;Q z9o;pyVbWk3o#*p5Dop*K<2wk@5tWKk(8*$!K1CaIf+Cj zz}CYXV8R|K7de~WXFP_rUQ0NWR{?#oXc??Cmef>7mpM}yfZ93jN%1R3hwC-lFSUPDu zS{KtveutBTbl~C;dp{Ww{0Gn$8NYakC)Pv}tMAcISRooSjplRIO3|((1N?nB+XsD& z-Z46N?`qv<7-~EWl_55xgRT{YI;%5bt~{uWyj)Wzqsmzh;ia?S&Fwep7}C!L@NArIwWU?W*0@Oy1Pgz;;{BKPHkrwp|Nx? zDdc$X5b+w@r>dOx)>gakl;jk z;Q^#v`ws4F)VAj-?14DC#H|_M?o7Pe`ahS*-tM{aYfFrVZ{a8KjYtHbZlGlZ7&1U2 zT1Zz&I@W3Pq||h`aHVA9wjdS3_q1c337*rtT4pn`SF$iXy!p(DFU-*uhrt4@JOIAG?7<2GUW7;X4 z6Ij?Uf~4?Y6-do?nI;b9HaNINQwMW?2j3B@!?|saZ-B5I(80&D!arww^ia#$#}l1b zm{Nyx4g_L-JXibXLg}1d}=YA2`clQuqf5J*e zkt`$`y({$7=lgxfzuYR;FLU;8LFDhBxED>aFMque9yJ~{W`_NVl!nxdaGg!O?17HEhZgzz6Ptb&!kc+Ll+mYI!M&}!**PMB1V0jHgujhP zbjS!5U%V)>_~M0A_li>cgC8{S##&%AvcnxS!mhN;V5*1~)F2zlGD2W(?tN6Ak;Y#6 zM%_5RJ%)?4xRTqlUG%(HUYZHbFHf9bGIekBnc?m1a`6iM??3JehxCxx# z$LJHMR_&5tSBzqm(L83bM)zLgJCVMHQ>i%%Cv<^Kcw_6HbbOmHbif64HA0+-npXRK z<(T7%zhU}+3SYvE!&7IhXV|a48AcAY5%hCR zQK;5V+v>r#{LOTZO^h@yxnoC~6Dikhmm}>1_@o0gT-Dt8OJ+TpfK4YGX|_Fv@0j7X zQw+D)SrNt<<(MxNKRMid!S!VF@{b#9J2=9lqi=lJHFPn1PV~0iv$A#zA?VogL-Ala}nz} z9T0^@m6+~uq>BZkYcEeq5PPAam=b&^&hw^pwG^QZw%%0ViF3Tz{LCR0nQUXPp<#uC zvT44~V(4OdFKIs1flH`DwjAHFHx@lOVd2gdZls2gi2bXas=We8Q{L0;oS#-vcoA~;#h z;$#8>U2@>S>NBT4un@epqk<2JlePz#Q(6XAh`c2{OJyHDRb*Q?A}ER}6Ap3(${xB` zoa$|?hCHi9y6l;B#t0FtHZw;PcKo6860nj z9}QK8#4Wn;?EavSUKB01W_Y(qVX7{LS6D(Cep(dslO#w(2r#x&q*?fx&W=?M2)v_{ zb8XCsF)@;ogRMN_9ymS}vl>DrQy%McV;Qsb!)XGNaynYJs-<5YB6iDGwe+h15qg$O zKVR3(m^o;$1s|g%T|BbdLxNc96+0%Vb)L&{o?7J9InGbnBi|+UeE!$qo8g#gho>CS zOWkWT1Ajm}7<)QDN?hJOV&WdgpW4qB%G8YTwkceRg*FMmjFc9hWefTRwfvLDu5=S$j5=?%!N3{b6sWUV~Kdo;Nwhu6%~OlzA8>y0dkgSRO*A;T_tIb4=KEJLh_wGO!D3LShk7!z19gNJEeZ zsxA)yS}rTXTw{nijmB2N#C+iwOvc#D#w!JVKoP$p_%HQDF?yo&Me&M$@8|ETw|bq+ z_u;U71Sj9nCIR6lTX3^Xz>U0`py&Q%EbI`~JogXp_mAKLpmm$zizb`hNWhAESWP$D z1u5K&t40JnaoIz7x~miC3CJc^yo20##L6**U2~`{4??kWOOA+8>yw$mHYZp*nV005 z701rs5b2n7;WrWUiLua|qJCe(+alsB>ZbL45Mm1 z-l$Zt7@ZU?_s`-a8h1q{+FRKaB#il7LJ#Am9Hy#p7(8~A`F(% zJ4_R}zQJx1e#8qw@YBPi*Bi87^CPI=m(?2sfRcD%=SXQ;cr_85`!K8|QJx->h) z`&7JC!9E#pg-@JnMMOBomGqG~fk6w!u*1p|rDXm}h zgY=#&lY1{{`A4D`cRor}@S?kUY{>rrbN8Os`o&3R8!EGj4T#inwAuc^Mu_ix7mNPZ zZ{R6qztA+?%Gcu9qq#bF-4LS(RvNg-Aq3;qC)^^0^C8N>n`>6U1kPujATDFUvO_s4Rh>1NwScnGYc%42KL1ZGP*UfvY!UYQlH3r>VAnsc|VkvkK?Too_EFEG?fqdu~B~d7(&^ zyu$geQ*Z{9vX>TKcYR@5`Ke0}l0!;y71>MjOY`RymKTfhIKQCurjqhP*H_g1&+;fq1z#oN zR7_dc^_49jl-sn#C@U*oImIY1E?b!+zb9#&Y{xN* z-14G|(gJ5i&g8s`vZDOK8S`AZv5YCM!m^4&S7AlLtO8LC!lUx?!KA!XGAHL=erl$r zB=WI6v63x?2k_@#UtBy;ADybRyNU{9MGjKsfINd#J0Oomj?jBR28)n^4P)s!1@oxC z)-=*ZG${)!{**lD;1vuaV^AgHeFu%|+=3-N^0Dsrx?^gU7*Dvwbd%X6ly2|>c z_Lc6Y=GumO`;X&(sVH`vu>c=)}{p#?{;*;^m&*KG#@d7ib4|)7M zTcOr(;atNI$2KaTuJ=sP)_RizhG9n<>t*|Ny(92UxqN5K&oancARooIu9tj1>(2|w zXZ>j2OeAXE$Y;KPe5IhZ?a10tY#94td~_YQcTzvLi~od}RoojDtEBbcOlR%%N=w{Hxpn2%d{A)ok13gaB0nqn= zzEIH{LGyBzL($&`{R-%F75zBqUeL1th8a(R=Jg}H;y(vE6SS^BhctM)elI!=Z#0B0 zsLwU!2^koaQ^h=k0(AO5T3Zf40zJ(0!ooihncoIVUMf*Mq(aw3c@d=p`1~4*Fiu=c)3u zA@4~G{e93cgT6rVp9KApg}w>;-UFU4?}WT`bk2n;|F@8TnuWd+{KcRr>iR$jE%YAP z?>W%;PxN0tr;qL+cGYkJ7&?Odn0puUE&{d%O zEc7bSLuW?oI|KB~7XC!g2Q2h!(C-rqZ9{#ZTIjzZe^P!_-Upyf3q1lcXQPGA0{s&U zeFf-WTIlCdzSg4O1n?iT@ZSLcB@2HH_}{Yd4bU?z^g__@TIed!A6V#m(4Sc7S)ki3 z^gPfzEcEwK|2r0X2k3(qdPD-o2K-rmY{nU&c|lCm=Yqb%LQe!e%R)~9JG@0Kd_ejj?0CVIy!b8or-7e!v0Q(X|0>cK zp)A*Dr2h)}j%kK*r=k<#yFa?nFn+A$Peu9){M9LbH~Q=QIkL}LejM8OAQl5$e~|t$ z_^ZIrRCFuk{}J}!dV~D?p-(3CouTLnP~>COU#945!S_SoQbqTp{9_jWEaZ1h#~4=p z+mZhdmi(81o@}Ap(Vioij5(xO|54CqfUoICK)((CD8>IB=p^tp{VT+#n_=?>x<2r0 zkbkA3zXN^>_*$QXpq~O=q4?J!|6CY@KM7#{dGP;zaPS)x{U!1zV=$#CdM?^~2JH0{ zRsJ;a|AI931Iy0QzZ`SuFG8UeJ{7Szq!wutc^xtU3pM(DX=_HI_MPC5<6CnTFDt`_9 zqYwI}DtaGeZ$RgNN9F$^(u*-nZTMq-PoS;e$&32qGvLpI4zF=M(SDHk3&^`dm7fNF zE_fI=fn0l*nUY=${?EX_S<#EZe;0h+Ka0UH1%IL9Uj+Vr;9sU_7wD~^(d9z^ zLg@D!^bd*&`Z(}6AkZv9A3*yzAdfB|f+L+a(=ZMr5B1*!-x!1OtL^IneH@*2jw;`Y z@^etWP|>HO+&R!sx92ag|I4s{j^d9*`8t%pP|ie3eJ0cePkd_3?CXOW`+47?p_*D3l2=$nBuTAvZnQ7AyYmz&jJ|<7HX4$A__$ZSQJe~(oj(t6_f4RQ2OUDU%>;_}=?+%( zYjO4cJ&q2=wfA&udm#U@IR3M7bXOcb%vwKmI0^sNAKEWDPX3K?bYGnRtcq*@ertZn zdm)bh=eY8}jI-ApaWsEUtUt70N*vu7M?V)wNB36J{*E|4|M6n|p?se0=nv`MIC@7M z{jSxX;9VH!ulwT0Z>JUxr2I3iG@ixpHdGq>;~#PMEJD1}AM&4xadcK3&7Z*Q59Jla@h{O#Ao_<2 z>n2qhE7sujydHl>#hl^=v+|287R;VqR#;w9ovSw>`dn#(GHD~Dn%G->W z*cJ5+^-Iu_8K_l~q;l z#)vtq8tUuaRUV_F0&m#s8!Dhtr3XecTo6{$&`>9AU*@i_o+Vz!yQ_^!#n+V2&2d&_ z<7w6`JmlmVB~1-guy&~%FYY7BQzB2!$Ww0Q>GH_a75Zs%j=`FW-00#P+)cGLYf9aB zc-_q&*?HBu()!CPjk(SFo?=`U@Q8Q36_YiC@1&GgQ>3smcN1Pf36T-b6j4oqyU9~q zQ;YVx1ub)4>t0j1x@s9-T**{RF0Bl8w1{;z)VsCl+-xaYlrN}lT!v0k`sCszGYZbG zt*>ofCd?>|mm9H7Zk}+eqRRT}=4F-3-KFm425%G03JJ7$uC{nCUPj7l>T2;W%+fY+ zlsG))$eMF2U{;|+F5a_6p02P+u(ny{bgG6#Z6rHHmv^ep&8={%F2$4T$lMB;LAl=? zw`akU+u>nlwRc8bu*~f#U(x6)lD+1w^`MO^|EeZXLNym(%BfU1bYz?~xhtzHYU@4j zCcH2-O5IiN+Ldl=W@gX@n_+SN+~lrWsh^vdc|Fy<1;8%JuR|*}hvP?FHnApDGDpR- z+GbBfQ)IZUszemARwfc;1C-u{rKM6>1!5j=uAt?Gyvb4~$w|e0(Wq;R&s|ZkIoG<~ zjrmPYm1`n)Vt`XAmdB{k=T%mfxvQGok#^CK=T+8ME_FA}M;KE%EvXbEqgw6KdUsQK z<&ru{%kVg`!1eWY4VBde`4OEcti-*dyuk&pk37gW<}vEmS0PwQdaA<73h7R?1&1$@ zu0*8666s{b97Y}SK&KWDT11YPA;y4UMM`P0Ia)4amMT8gm{r;AzT8>ia#uA}yN&XO z@}|n_S_VP*mufafNTfk3iM`c`PF3#GTv5|#)HHfM5py)cwbaN%_rM!Vz ztENo$G)#6{JDMY-0`m^0u*j6!Y*5MS+9v2$Sxv+W2z@L^MkNtnLM<{+Wtc%2#bO*P z#>y!bRbpO%k9n3gM8Y5YLP_u$OKbnBHc$aCtQkSJbdq#I&Vmnn+-&t6kDm*|Y{TW^@hBwYH`H ziYh8uv4YXh(sbsi5=)qhI?Q~WyX1b&Nq)XC+pbE6AfYUN6Evr0{Ks+TJcY&Ygb#s=>JuFQ!W zGmKr5!G@|VlTVom3sBi`48CTu;Is@rRr*xvlLwX%n;G1Nt@lQ@M>Tcc=4IMpBAsio zpzaXex7y%{(s8~e2V`}_3XYX}MsjOkHmqoDQeLf+#fm1fa-w`|bXy{}1zH5T@nd@M z9F|c%c!q)FIyT=|S3~Y8tB5Zu!$z!lwYot}Xhw{WSey+Uu<)sE7XFLCqt^Dyaw1yj zm1e}qa#Pymh8B_F%$ykQYDVYUWwKtfOy-iMc~z~aYS|>*S&PnkdD`eKtjC!ei_KhA zpPH{Z1#?S^3QNVFQ8z zaIK}vs;vmi>J=Ea8mfSihR@6=}I>m#`=hXR}G?+@$@*)Pq4pDVLR1;@JbxWGg zC&Vggx)s=tS-elWgR0XhyHgm<8R_v)ka^t2fifw(QnCL2*LG*`uq#8+HZ74o?m0}E^YBSCPCS7AQ<`MD# z+vAxw(*wX1eBIA<90dQ6c+xO70~1Esj1D4ROuoYOFY#Ul$Z{V5S?-v^K41ba;qe_I z(|I3{H1FY&zMS+}n^CCfd8G4fhMNfatAUie5y<)GC9|IbOG173GadTAOB(uqMjH8@IO}Bo+lbJ&m55GzoOp@NXeUCySBTKB zmx%mnIP;`_*+A+S0Mb7mSNJ>;{c}Je?;xk`I7LCE&)!N z3QU2|Tm)o#kxIW!;T=Hg{g~o+F+I^{jK#oW{_}xs=hZ;^`?aK>GK{5)-^O&j$onP{ zgX3XfBHH_c;=j&xjEkd01=K-SNfleE)xAk)i$DLIC*oax0j;||g| z2wzJ?8#k%+M@WyxxF%j^7%!^y4$|3p4@tzkzQ3vTUeXiszLbbD!Mk#lKMI%vAD^h` zO49IIucH5rG<@(uMZZQGKGvh?4@tv!hC&z0n+!~WZ_HM7F=_O9wW6OPjlSKj=$A>O zFW*)4x#^IDcy_nK{Y3NwUsfdi!!Rx;USTtC1kzq-;C(Rdco7kHoCajvxd}-A9i-t8 zcaeX!&Df&SUnh;YF>>A{QGLWm!}XW?I}BNicU5l`Zt32~;)xE%MtlCH!&r0|->L9-MErBDLmj{i5wD2DY(_bd?W-pC8OG0v zXxCjAfIr=4{E!Iwe$g9_V$)c4YhkdBK4*AelLFs&vQqW_5S z_eY8F*KNdW5l@M8ZN>$ez!^3pSK%!{%3B7cT|G>PT^}XFu1^qQ*Iy7}*F8k&_a8*q za|p&R?aSYWB>fV8N<{kgMCk1WQvN-pKgK;5;&*VLi})1onGzpHJO*-nTy?R`f4{p2I=^xG7@Qqk>-HWA|lAINg8K(==qY3TO~5&Hdw2>m7?22#I?KYJxT?Ax3l|Zheey-@3$j7hE-&OPpMb}S8I^x4eK$aUZ1$00B zjhKLOO|;pJ`9Sh-2C|>)n2xy9O2oyWM-=}jiob>FXX1{Z;=ix>pD2Ek6Z~;D<4hvT z<7`gIzY0kCB}|8Wx8mQU_!|}fai&B5uND7*;=iN#N0|=!Lvp2j2ax(-45Xc>D=Z)% z_AXWQEeb0Yu28rJNc#pA{QzmqqfaVKzFf+m31t746VbobMD*{&K-T*>koEmu(QhmK zK;h^skRSe14rISp0a@;LgH6rSHhlqMUB%+?IJeeQ+0a5Nsg*Pa?RpH%0w&$ln z+NBf7ak-C(`0y4H{cxO!xN*r;nQu9e>8}!@r)?VWBiw@`qI?dJ@_w$cPhrV)nf`>r zV+xCA$n-}Pz67M4lL~XLlzbO3>1o{WQ}kva?>hcFF%9!E@lM=VCyv6Mx2t5i>A)0> z$$BE@elM{Z_wtD24C8ymF^D(B@wnSZY%+|uh?oODC7zA_%hf={*m1;k+`xX)HeUFIt9wwr_pAykteo}6RPY`dBzgbGTUf$J9StRd6 zq}+<%$B=)6yknShqrA_Zvd}Q>OutF~Rwv~)c}F;<0{4@dzF7WtEu~W4El#O2j69}S z%e#0fZee~SWr<<9m|i3AB&ICI{ZZ1(`u(ZeNRQ-uW*yXhlv<- z-&OSE#HsT4J}H-@Uq~Z{JgxZ8DBP@Y3vnj=RnZ*^cPrdWMBltZgt7Lk^f!oz`EL;m zMFwrURzNO4Vf0LdMzb7s*j4z2L__6`7MgJ4a(Er5Q=zm3H%P!Kf z#T1B8YNQmS{}qi;X{20({wK~s{}YSQ|B8<-rYMIkvp|GOBjq~uzoKUm!Dw;MS0c{c+gQ01f#v8C;vt;sW? zDYEVz9OK+<)YzU&jbLUjWK?HDhL+KcsgLscd@dETxi`AGnHpP~8l4Onh5-v!&Az>L z+P7BZQl&-nt=M`#=;^5;t`{)6b6FrlS%sNW4WwK%HJVFOmV2I0Jus7f?ijoroY)T2 z&eHmk);dhC$^?u`m@@z?asfCWFv>G~jMB_n14g|%EC6b20FQg|$cBursZt=x@z4X| zd+#4(ItI_2!2)(hvLi+XT*;m=yaYpr1~52Q$tfp{N_wde{Rq!YJ61)ya@H+k@Z){p z9NUA8>5o>?O}K!$3<@4;@T{hg(!jc!Ocdf_qnu(_w!x|bD|uc!Cf8{_CBv}{uQY%p zDSv1asNj6fKupzHcr$fcI5Ak+>kL$6^)6cJNE7{GKfY%&l6eFLFv^b^fc&2kyz--jdh$qmHewG^X|%* zJTn>0kog%h&M<3^qMiJ?NrW|9Df6OzIEU6r#y^oa?inInFslK>hefQPu?!8ez z+WIxmq~{e+-Y%B+_4442@9WEk3(W~1Bxn_)H<75 z%xR@^+FEB?4UkW+&75tQ=h&`lV5&GP8j(aK(|d^xWs&AARLXmq3sYTaKiCH^cg!jJ z!EvUcP`1f4(Th^@tg#Q4vX8J^z|lqq5-IKRJpoCjv|b8ETxOWKF-F( z`kk^ql=12)5=N0hDHMI2&nL&DpBOI+l(UEBgzPg6JM#)$4$cN1oDICNckaODA+ZCO zC&UgsSU4Vqz|{_`0?oXLSX9)T=S7X~=0zBEZvJk|U53v?bp0_S4KTIq!fc>OhL(Ey zSQ}cYwL(9#v95MBdER3!Po6JIEIx+q7h~v;Kv{xg$Do#%Jsee6k$P3m(}%`rJY-a+ zUe61NN^8#SsXn`9%Kq!}^M1`fI!<#y5`Lp{!g4XmZ;LEc6-{g#bPv)0IrYp1i|L!n|OqXQ$v&1%J#!gLFrnhN? z<>_sU(vijKrV>=WFWppnV0~%2sqDb|vUJmu%v3tEG~MK_9WCtq;29R+MTdRFxRXA< zts?#dmdZYBbb*J|vo#>c_W_`O%4PRMbIb*d<-iN|gziySn@`SotgDhUMTwG=&==Fo zk~11`=68D0Nha7`gSdDb&}hAKXW8SUxO5Be1Bts_Yv8b#vbNqEl7ncfm7A7@$Gsy)q6WETb2{f8wJeGNOAhqQ?q$O3MnRk=p z6%X7y_Ib<{{eR39|1V~Ig`gHNGZ8GtW%^kIn>DpSekOuN;)|GCAV*)+)Pezi9vWI0ZB?b+$&$qQP- z`vR-vqz{kjB`-ixoUFhDZyGhVubw-XndIwK@`5M%mpq#yUr^*5h-IvCu8q{Fo_d}u z;hhSAWd-yp8`a!ekAsKnl(p?X)im&J@KSkwsDUaid5GmpadO7@EBdAfU&7KAsK+W$ zymQIr8%GV-`vjxc!PuvJm4_i1Xk5T6w!h2=Sfv`hxGJZW0{Cu5TTU3sJ@{;}t^%Wi zNy!b{23+sL)7#LrYmlvlgp%z_#ccnHyMvi!-v=+MitTu-fcqK|xbLQ!%scx24{*)u z_l)W*hm3wiLC72vvc(e0=;RkgX*pO(pu9(9->DrP9OogD9SRZO7TVO_8SOD+mTyN- ztS8=Wc8Rz-u+tovr5`eP`^;VakyyN^FD7~;aSPJ8**RcZLTu?s#H@s`Ga89K=)*MX z`0D*@SJft@q~2F;MIMZ=zPmZp+|2KMzWmVjYbUq~f@$R@aU`0BBIdFHcqzC%CB34BB z<_|1`bZphNqtU=G@Al$iaXjAJQ&#QCPi@f!3t+o*g}#^03+N+urHs&8+HcI;tG z3cgWBy}KMGKu7Op;Erz;*P!u~Bd8_7`B}?&*^BD&b7BQ5)?F^d4%bA-9%b&~=4;}; z{38(RVD80SbV(6W%3Q}I7Kv8?4g44u>2rW}F8cex%aE*gHNPLU<0JJS2F<;p&!pYs z;(sj|k2@mLv@|=4=goIcnXOYSO60zgVoaA6d4vz}NvQE0UIq{9LH{1~pB1fvJ_5Ji zQuN!PzlTG}b4UG6i0cHB->PUf?IOrq6wS~66_7jnuR*@iC2xTIn=bjIkUx)u>dapR z`JY_tor2xNNW&G-qyJBW9tO>SF-SiR_=Jmo4)h@x{Ws7PNZY$g|903pjE~f%%3d3w zGq@)|o{W{zd+PuCg6y6*Rwl%kh+nd&h zn!}>Cs{tC3sA%hs*vQ6slNB=2zS~1>J8Q#rl+-ocU<>U_K%kk%I(z#CmI^BtQTs{| zcitToy=HG`|8CJA?vBK}NyTvuv_>8>rPWz1T;T_GP0~Z`&PdYYT;Yu~yiO^oL<2PKTprOek54X>I6@bhhvA zHyu`+X<=1zH^yS-fPkCfZcvUKQ(7aPYCWo90{js~xAfx@F(qne3Cq~YvvU*fHLdQx zF2_`BBpU7O6dPkb79DLZ2<y`le1Tfv zVoP?fUQ#2(N}NBfT8LW-uea;I=qp0>k%lk>ScdvNNP3MBKO>EL{W&4}#A!h4-+*&X zdwT%2RYLqg!JAPdnqP>m3hpF?{7D5T6ntC3(^!jk9zc(v-G>3o@HY4CrA?_hGgoqPfC&c3lju2ie#7ls* z_ZsPIgg6UWv;ui6v-!&b$-f1V{H==Lq4-0Je^BwCR{UQp{*>bXTk)?z52l@ZK(2c$ zAnivK|2v9*K=DTu|7FF0UGdK;{tZiQJ6S-+`3xcA{0$-EyV`5hEeduJg8x%O?9Zrz QZz%aYN*=lda_r}S0Nl$o_5c6? literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/src/crl.c b/project1/cyassl-3.0.0/src/crl.c new file mode 100644 index 00000000..b3d114a4 --- /dev/null +++ b/project1/cyassl-3.0.0/src/crl.c @@ -0,0 +1,600 @@ +/* crl.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_CRL + +#include +#include + +#include +#include +#include + + +/* Initialze CRL members */ +int InitCRL(CYASSL_CRL* crl, CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("InitCRL"); + + crl->cm = cm; + crl->crlList = NULL; + crl->monitors[0].path = NULL; + crl->monitors[1].path = NULL; +#ifdef HAVE_CRL_MONITOR + crl->tid = 0; +#endif + if (InitMutex(&crl->crlLock) != 0) + return BAD_MUTEX_E; + + return 0; +} + + +/* Initialze CRL Entry */ +static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl) +{ + CYASSL_ENTER("InitCRL_Entry"); + + XMEMCPY(crle->issuerHash, dcrl->issuerHash, SHA_DIGEST_SIZE); + /* XMEMCPY(crle->crlHash, dcrl->crlHash, SHA_DIGEST_SIZE); + * copy the hash here if needed for optimized comparisons */ + XMEMCPY(crle->lastDate, dcrl->lastDate, MAX_DATE_SIZE); + XMEMCPY(crle->nextDate, dcrl->nextDate, MAX_DATE_SIZE); + crle->lastDateFormat = dcrl->lastDateFormat; + crle->nextDateFormat = dcrl->nextDateFormat; + + crle->certs = dcrl->certs; /* take ownsership */ + dcrl->certs = NULL; + crle->totalCerts = dcrl->totalCerts; + + return 0; +} + + +/* Free all CRL Entry resources */ +static void FreeCRL_Entry(CRL_Entry* crle) +{ + RevokedCert* tmp = crle->certs; + + CYASSL_ENTER("FreeCRL_Entry"); + + while(tmp) { + RevokedCert* next = tmp->next; + XFREE(tmp, NULL, DYNAMIC_TYPE_REVOKED); + tmp = next; + } +} + + + +/* Free all CRL resources */ +void FreeCRL(CYASSL_CRL* crl, int dynamic) +{ + CRL_Entry* tmp = crl->crlList; + + CYASSL_ENTER("FreeCRL"); + + if (crl->monitors[0].path) + XFREE(crl->monitors[0].path, NULL, DYNAMIC_TYPE_CRL_MONITOR); + + if (crl->monitors[1].path) + XFREE(crl->monitors[1].path, NULL, DYNAMIC_TYPE_CRL_MONITOR); + + while(tmp) { + CRL_Entry* next = tmp->next; + FreeCRL_Entry(tmp); + XFREE(tmp, NULL, DYNAMIC_TYPE_CRL_ENTRY); + tmp = next; + } + +#ifdef HAVE_CRL_MONITOR + if (crl->tid != 0) { + CYASSL_MSG("Canceling monitor thread"); + pthread_cancel(crl->tid); + } +#endif + FreeMutex(&crl->crlLock); + if (dynamic) /* free self */ + XFREE(crl, NULL, DYNAMIC_TYPE_CRL); +} + + +/* Is the cert ok with CRL, return 0 on success */ +int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert) +{ + CRL_Entry* crle; + int foundEntry = 0; + int ret = 0; + + CYASSL_ENTER("CheckCertCRL"); + + if (LockMutex(&crl->crlLock) != 0) { + CYASSL_MSG("LockMutex failed"); + return BAD_MUTEX_E; + } + + crle = crl->crlList; + + while (crle) { + if (XMEMCMP(crle->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE) == 0) { + CYASSL_MSG("Found CRL Entry on list"); + CYASSL_MSG("Checking next date validity"); + + if (!ValidateDate(crle->nextDate, crle->nextDateFormat, AFTER)) { + CYASSL_MSG("CRL next date is no longer valid"); + ret = ASN_AFTER_DATE_E; + } + else + foundEntry = 1; + break; + } + crle = crle->next; + } + + if (foundEntry) { + RevokedCert* rc = crle->certs; + + while (rc) { + if (XMEMCMP(rc->serialNumber, cert->serial, rc->serialSz) == 0) { + CYASSL_MSG("Cert revoked"); + ret = CRL_CERT_REVOKED; + break; + } + rc = rc->next; + } + } + + UnLockMutex(&crl->crlLock); + + if (foundEntry == 0) { + CYASSL_MSG("Couldn't find CRL for status check"); + ret = CRL_MISSING; + if (crl->cm->cbMissingCRL) { + char url[256]; + + CYASSL_MSG("Issuing missing CRL callback"); + url[0] = '\0'; + if (cert->extCrlInfoSz < (int)sizeof(url) -1 ) { + XMEMCPY(url, cert->extCrlInfo, cert->extCrlInfoSz); + url[cert->extCrlInfoSz] = '\0'; + } + else { + CYASSL_MSG("CRL url too long"); + } + crl->cm->cbMissingCRL(url); + } + } + + + return ret; +} + + +/* Add Decoded CRL, 0 on success */ +static int AddCRL(CYASSL_CRL* crl, DecodedCRL* dcrl) +{ + CRL_Entry* crle; + + CYASSL_ENTER("AddCRL"); + + crle = (CRL_Entry*)XMALLOC(sizeof(CRL_Entry), NULL, DYNAMIC_TYPE_CRL_ENTRY); + if (crle == NULL) { + CYASSL_MSG("alloc CRL Entry failed"); + return -1; + } + + if (InitCRL_Entry(crle, dcrl) < 0) { + CYASSL_MSG("Init CRL Entry failed"); + XFREE(crle, NULL, DYNAMIC_TYPE_CRL_ENTRY); + return -1; + } + + if (LockMutex(&crl->crlLock) != 0) { + CYASSL_MSG("LockMutex failed"); + FreeCRL_Entry(crle); + XFREE(crle, NULL, DYNAMIC_TYPE_CRL_ENTRY); + return BAD_MUTEX_E; + } + crle->next = crl->crlList; + crl->crlList = crle; + UnLockMutex(&crl->crlLock); + + return 0; +} + + +/* Load CRL File of type, SSL_SUCCESS on ok */ +int BufferLoadCRL(CYASSL_CRL* crl, const byte* buff, long sz, int type) +{ + int ret = SSL_SUCCESS; + const byte* myBuffer = buff; /* if DER ok, otherwise switch */ + buffer der; + DecodedCRL dcrl; + + der.buffer = NULL; + + CYASSL_ENTER("BufferLoadCRL"); + + if (crl == NULL || buff == NULL || sz == 0) + return BAD_FUNC_ARG; + + if (type == SSL_FILETYPE_PEM) { + int eccKey = 0; /* not used */ + EncryptedInfo info; + info.ctx = NULL; + + ret = PemToDer(buff, sz, CRL_TYPE, &der, NULL, &info, &eccKey); + if (ret == 0) { + myBuffer = der.buffer; + sz = der.length; + } + else { + CYASSL_MSG("Pem to Der failed"); + return -1; + } + } + + InitDecodedCRL(&dcrl); + ret = ParseCRL(&dcrl, myBuffer, (word32)sz, crl->cm); + if (ret != 0) { + CYASSL_MSG("ParseCRL error"); + } + else { + ret = AddCRL(crl, &dcrl); + if (ret != 0) { + CYASSL_MSG("AddCRL error"); + } + } + FreeDecodedCRL(&dcrl); + + if (der.buffer) + XFREE(der.buffer, NULL, DYNAMIC_TYPE_CRL); + + if (ret == 0) + return SSL_SUCCESS; /* convert */ + return ret; +} + + +#ifdef HAVE_CRL_MONITOR + + +/* read in new CRL entries and save new list */ +static int SwapLists(CYASSL_CRL* crl) +{ + int ret; + CYASSL_CRL tmp; + CRL_Entry* newList; + + if (InitCRL(&tmp, crl->cm) < 0) { + CYASSL_MSG("Init tmp CRL failed"); + return -1; + } + + if (crl->monitors[0].path) { + ret = LoadCRL(&tmp, crl->monitors[0].path, SSL_FILETYPE_PEM, 0); + if (ret != SSL_SUCCESS) { + CYASSL_MSG("PEM LoadCRL on dir change failed"); + FreeCRL(&tmp, 0); + return -1; + } + } + + if (crl->monitors[1].path) { + ret = LoadCRL(&tmp, crl->monitors[1].path, SSL_FILETYPE_ASN1, 0); + if (ret != SSL_SUCCESS) { + CYASSL_MSG("DER LoadCRL on dir change failed"); + FreeCRL(&tmp, 0); + return -1; + } + } + + if (LockMutex(&crl->crlLock) != 0) { + CYASSL_MSG("LockMutex failed"); + FreeCRL(&tmp, 0); + return -1; + } + + newList = tmp.crlList; + + /* swap lists */ + tmp.crlList = crl->crlList; + crl->crlList = newList; + + UnLockMutex(&crl->crlLock); + + FreeCRL(&tmp, 0); + + return 0; +} + + +#if (defined(__MACH__) || defined(__FreeBSD__)) + +#include +#include +#include +#include + +#ifdef __MACH__ + #define XEVENT_MODE O_EVTONLY +#elif defined(__FreeBSD__) + #define XEVENT_MODE EVFILT_VNODE +#endif + + +/* OS X monitoring */ +static void* DoMonitor(void* arg) +{ + int fPEM, fDER, kq; + struct kevent change; + + CYASSL_CRL* crl = (CYASSL_CRL*)arg; + + CYASSL_ENTER("DoMonitor"); + + kq = kqueue(); + if (kq == -1) { + CYASSL_MSG("kqueue failed"); + return NULL; + } + + fPEM = -1; + fDER = -1; + + if (crl->monitors[0].path) { + fPEM = open(crl->monitors[0].path, XEVENT_MODE); + if (fPEM == -1) { + CYASSL_MSG("PEM event dir open failed"); + return NULL; + } + } + + if (crl->monitors[1].path) { + fDER = open(crl->monitors[1].path, XEVENT_MODE); + if (fDER == -1) { + CYASSL_MSG("DER event dir open failed"); + return NULL; + } + } + + if (fPEM != -1) + EV_SET(&change, fPEM, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, + NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0); + + if (fDER != -1) + EV_SET(&change, fDER, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, + NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0); + + for (;;) { + struct kevent event; + int numEvents = kevent(kq, &change, 1, &event, 1, NULL); + + CYASSL_MSG("Got kevent"); + + if (numEvents == -1) { + CYASSL_MSG("kevent problem, continue"); + continue; + } + + if (SwapLists(crl) < 0) { + CYASSL_MSG("SwapLists problem, continue"); + } + } + + return NULL; +} + + +#elif defined(__linux__) + +#include +#include +#include + +/* linux monitoring */ +static void* DoMonitor(void* arg) +{ + int notifyFd; + int wd; + CYASSL_CRL* crl = (CYASSL_CRL*)arg; + + CYASSL_ENTER("DoMonitor"); + + notifyFd = inotify_init(); + if (notifyFd < 0) { + CYASSL_MSG("inotify failed"); + return NULL; + } + + if (crl->monitors[0].path) { + wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CLOSE_WRITE | + IN_DELETE); + if (wd < 0) { + CYASSL_MSG("PEM notify add watch failed"); + return NULL; + } + } + + if (crl->monitors[1].path) { + wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CLOSE_WRITE | + IN_DELETE); + if (wd < 0) { + CYASSL_MSG("DER notify add watch failed"); + return NULL; + } + } + + for (;;) { + char buff[8192]; + int length = read(notifyFd, buff, sizeof(buff)); + + CYASSL_MSG("Got notify event"); + + if (length < 0) { + CYASSL_MSG("notify read problem, continue"); + continue; + } + + if (SwapLists(crl) < 0) { + CYASSL_MSG("SwapLists problem, continue"); + } + } + + return NULL; +} + + +#else + +#error "CRL monitor only currently supported on linux or mach" + +#endif /* MACH or linux */ + + +/* Start Monitoring the CRL path(s) in a thread */ +static int StartMonitorCRL(CYASSL_CRL* crl) +{ + pthread_attr_t attr; + + CYASSL_ENTER("StartMonitorCRL"); + + if (crl == NULL) + return BAD_FUNC_ARG; + + if (crl->tid != 0) { + CYASSL_MSG("Monitor thread already running"); + return MONITOR_RUNNING_E; + } + + pthread_attr_init(&attr); + + if (pthread_create(&crl->tid, &attr, DoMonitor, crl) != 0) { + CYASSL_MSG("Thread creation error"); + return THREAD_CREATE_E; + } + + return SSL_SUCCESS; +} + + +#else /* HAVE_CRL_MONITOR */ + +static int StartMonitorCRL(CYASSL_CRL* crl) +{ + (void)crl; + + CYASSL_ENTER("StartMonitorCRL"); + CYASSL_MSG("Not compiled in"); + + return NOT_COMPILED_IN; +} + +#endif /* HAVE_CRL_MONITOR */ + + +/* Load CRL path files of type, SSL_SUCCESS on ok */ +int LoadCRL(CYASSL_CRL* crl, const char* path, int type, int monitor) +{ + struct dirent* entry; + DIR* dir; + int ret = SSL_SUCCESS; + + CYASSL_ENTER("LoadCRL"); + if (crl == NULL) + return BAD_FUNC_ARG; + + dir = opendir(path); + if (dir == NULL) { + CYASSL_MSG("opendir path crl load failed"); + return BAD_PATH_ERROR; + } + while ( (entry = readdir(dir)) != NULL) { + char name[MAX_FILENAME_SZ]; + struct stat s; + + XMEMSET(name, 0, sizeof(name)); + XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 2); + XSTRNCAT(name, "/", 1); + XSTRNCAT(name, entry->d_name, MAX_FILENAME_SZ/2); + + if (stat(name, &s) != 0) { + CYASSL_MSG("stat on name failed"); + continue; + } + if (s.st_mode & S_IFREG) { + + if (type == SSL_FILETYPE_PEM) { + if (strstr(entry->d_name, ".pem") == NULL) { + CYASSL_MSG("not .pem file, skipping"); + continue; + } + } + else { + if (strstr(entry->d_name, ".der") == NULL && + strstr(entry->d_name, ".crl") == NULL) { + + CYASSL_MSG("not .der or .crl file, skipping"); + continue; + } + } + + if (ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl) + != SSL_SUCCESS) { + CYASSL_MSG("CRL file load failed, continuing"); + } + } + } + + if (monitor & CYASSL_CRL_MONITOR) { + CYASSL_MSG("monitor path requested"); + + if (type == SSL_FILETYPE_PEM) { + crl->monitors[0].path = strdup(path); + crl->monitors[0].type = SSL_FILETYPE_PEM; + if (crl->monitors[0].path == NULL) + ret = MEMORY_E; + } else { + crl->monitors[1].path = strdup(path); + crl->monitors[1].type = SSL_FILETYPE_ASN1; + if (crl->monitors[1].path == NULL) + ret = MEMORY_E; + } + + if (monitor & CYASSL_CRL_START_MON) { + CYASSL_MSG("start monitoring requested"); + + ret = StartMonitorCRL(crl); + } + } + + closedir(dir); + + return ret; +} + +#endif /* HAVE_CRL */ diff --git a/project1/cyassl-3.0.0/src/include.am b/project1/cyassl-3.0.0/src/include.am new file mode 100644 index 00000000..0673e151 --- /dev/null +++ b/project1/cyassl-3.0.0/src/include.am @@ -0,0 +1,147 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +lib_LTLIBRARIES+= src/libcyassl.la +src_libcyassl_la_SOURCES = \ + src/internal.c \ + src/io.c \ + src/keys.c \ + src/ssl.c \ + src/tls.c \ + ctaocrypt/src/hmac.c \ + ctaocrypt/src/random.c \ + ctaocrypt/src/sha256.c \ + ctaocrypt/src/logging.c \ + ctaocrypt/src/port.c \ + ctaocrypt/src/error.c +src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} +src_libcyassl_la_LIBADD = $(LIBM) +src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) +src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) + +if BUILD_MEMORY +src_libcyassl_la_SOURCES += ctaocrypt/src/memory.c +endif + +if BUILD_RSA +src_libcyassl_la_SOURCES += ctaocrypt/src/rsa.c +endif + +if BUILD_DH +src_libcyassl_la_SOURCES += ctaocrypt/src/dh.c +endif + +if BUILD_ASN +src_libcyassl_la_SOURCES += ctaocrypt/src/asn.c +endif + +if BUILD_FIPS +src_libcyassl_la_SOURCES += ctaocrypt/src/fips.c +src_libcyassl_la_SOURCES += ctaocrypt/src/fips_test.c +endif + +if BUILD_CODING +src_libcyassl_la_SOURCES += ctaocrypt/src/coding.c +endif + +if BUILD_AES +src_libcyassl_la_SOURCES += ctaocrypt/src/aes.c +endif + +if BUILD_DES3 +src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c +endif + +if BUILD_SHA +src_libcyassl_la_SOURCES += ctaocrypt/src/sha.c +endif + +if BUILD_RC4 +src_libcyassl_la_SOURCES += ctaocrypt/src/arc4.c +endif + +if BUILD_MD4 +src_libcyassl_la_SOURCES += ctaocrypt/src/md4.c +endif + +if BUILD_MD5 +src_libcyassl_la_SOURCES += ctaocrypt/src/md5.c +endif + +if BUILD_PWDBASED +src_libcyassl_la_SOURCES += ctaocrypt/src/pwdbased.c +endif + +if BUILD_DSA +src_libcyassl_la_SOURCES += ctaocrypt/src/dsa.c +endif + +if BUILD_AESNI +src_libcyassl_la_SOURCES += ctaocrypt/src/aes_asm.s +endif + +if BUILD_CAMELLIA +src_libcyassl_la_SOURCES += ctaocrypt/src/camellia.c +endif + +if BUILD_MD2 +src_libcyassl_la_SOURCES += ctaocrypt/src/md2.c +endif + +if BUILD_RIPEMD +src_libcyassl_la_SOURCES += ctaocrypt/src/ripemd.c +endif + +if BUILD_SHA512 +src_libcyassl_la_SOURCES += ctaocrypt/src/sha512.c +endif + +if BUILD_BLAKE2 +src_libcyassl_la_SOURCES += ctaocrypt/src/blake2b.c +endif + +if BUILD_SNIFFER +src_libcyassl_la_SOURCES += src/sniffer.c +endif + +if BUILD_HC128 +src_libcyassl_la_SOURCES += ctaocrypt/src/hc128.c +endif + +if BUILD_RABBIT +src_libcyassl_la_SOURCES += ctaocrypt/src/rabbit.c +endif + +if !BUILD_INLINE +src_libcyassl_la_SOURCES += ctaocrypt/src/misc.c +endif + +if BUILD_FASTMATH +src_libcyassl_la_SOURCES += ctaocrypt/src/tfm.c +endif + +if BUILD_SLOWMATH +src_libcyassl_la_SOURCES += ctaocrypt/src/integer.c +endif + +if BUILD_ECC +src_libcyassl_la_SOURCES += ctaocrypt/src/ecc.c +endif + +if BUILD_OCSP +src_libcyassl_la_SOURCES += src/ocsp.c +endif + +if BUILD_CRL +src_libcyassl_la_SOURCES += src/crl.c +endif + +if BUILD_LIBZ +src_libcyassl_la_SOURCES += ctaocrypt/src/compress.c +endif + +if BUILD_PKCS7 +src_libcyassl_la_SOURCES += ctaocrypt/src/pkcs7.c +endif + diff --git a/project1/cyassl-3.0.0/src/internal.c b/project1/cyassl-3.0.0/src/internal.c new file mode 100644 index 00000000..533476cd --- /dev/null +++ b/project1/cyassl-3.0.0/src/internal.c @@ -0,0 +1,11300 @@ +/* internal.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include +#include + +#ifdef HAVE_LIBZ + #include "zlib.h" +#endif + +#ifdef HAVE_NTRU + #include "crypto_ntru.h" +#endif + +#if defined(DEBUG_CYASSL) || defined(SHOW_SECRETS) + #ifdef FREESCALE_MQX + #include + #else + #include + #endif +#endif + +#ifdef __sun + #include +#endif + +#ifndef TRUE + #define TRUE 1 +#endif +#ifndef FALSE + #define FALSE 0 +#endif + + +#if defined(OPENSSL_EXTRA) && defined(NO_DH) + #error OPENSSL_EXTRA needs DH, please remove NO_DH +#endif + +#if defined(CYASSL_CALLBACKS) && !defined(LARGE_STATIC_BUFFERS) + #error \ +CYASSL_CALLBACKS needs LARGE_STATIC_BUFFERS, please add LARGE_STATIC_BUFFERS +#endif + + +#ifndef NO_CYASSL_CLIENT + static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input, word32*, + word32); + static int DoServerHello(CYASSL* ssl, const byte* input, word32*, word32); + static int DoServerKeyExchange(CYASSL* ssl, const byte* input, word32*, + word32); + #ifndef NO_CERTS + static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32*, + word32); + #endif +#endif + + +#ifndef NO_CYASSL_SERVER + static int DoClientHello(CYASSL* ssl, const byte* input, word32*, word32); + static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32*, word32); + #if !defined(NO_RSA) || defined(HAVE_ECC) + static int DoCertificateVerify(CYASSL* ssl, byte*, word32*, word32); + #endif +#endif + + +#ifdef CYASSL_DTLS + static INLINE int DtlsCheckWindow(DtlsState* state); + static INLINE int DtlsUpdateWindow(DtlsState* state); +#endif + + +typedef enum { + doProcessInit = 0, +#ifndef NO_CYASSL_SERVER + runProcessOldClientHello, +#endif + getRecordLayerHeader, + getData, + runProcessingOneMessage +} processReply; + +#ifndef NO_OLD_TLS +static int SSL_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, + int content, int verify); + +#endif + +#ifndef NO_CERTS +static int BuildCertHashes(CYASSL* ssl, Hashes* hashes); +#endif + +static void PickHashSigAlgo(CYASSL* ssl, + const byte* hashSigAlgo, word32 hashSigAlgoSz); + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +int IsTLS(const CYASSL* ssl) +{ + if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_MINOR) + return 1; + + return 0; +} + + +int IsAtLeastTLSv1_2(const CYASSL* ssl) +{ + if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_2_MINOR) + return 1; + if (ssl->version.major == DTLS_MAJOR && ssl->version.minor <= DTLSv1_2_MINOR) + return 1; + + return 0; +} + + +#ifdef HAVE_NTRU + +static byte GetEntropy(ENTROPY_CMD cmd, byte* out) +{ + /* TODO: add locking? */ + static RNG rng; + + if (cmd == INIT) + return (InitRng(&rng) == 0) ? 1 : 0; + + if (out == NULL) + return 0; + + if (cmd == GET_BYTE_OF_ENTROPY) + return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0; + + if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { + *out = 1; + return 1; + } + + return 0; +} + +#endif /* HAVE_NTRU */ + +/* used by ssl.c too */ +void c32to24(word32 in, word24 out) +{ + out[0] = (in >> 16) & 0xff; + out[1] = (in >> 8) & 0xff; + out[2] = in & 0xff; +} + + +#ifdef CYASSL_DTLS + +static INLINE void c32to48(word32 in, byte out[6]) +{ + out[0] = 0; + out[1] = 0; + out[2] = (in >> 24) & 0xff; + out[3] = (in >> 16) & 0xff; + out[4] = (in >> 8) & 0xff; + out[5] = in & 0xff; +} + +#endif /* CYASSL_DTLS */ + + +/* convert 16 bit integer to opaque */ +static INLINE void c16toa(word16 u16, byte* c) +{ + c[0] = (u16 >> 8) & 0xff; + c[1] = u16 & 0xff; +} + + +/* convert 32 bit integer to opaque */ +static INLINE void c32toa(word32 u32, byte* c) +{ + c[0] = (u32 >> 24) & 0xff; + c[1] = (u32 >> 16) & 0xff; + c[2] = (u32 >> 8) & 0xff; + c[3] = u32 & 0xff; +} + + +/* convert a 24 bit integer into a 32 bit one */ +static INLINE void c24to32(const word24 u24, word32* u32) +{ + *u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; +} + + +/* convert opaque to 16 bit integer */ +static INLINE void ato16(const byte* c, word16* u16) +{ + *u16 = (word16) ((c[0] << 8) | (c[1])); +} + + +#ifdef CYASSL_DTLS + +/* convert opaque to 32 bit integer */ +static INLINE void ato32(const byte* c, word32* u32) +{ + *u32 = (c[0] << 24) | (c[1] << 16) | (c[2] << 8) | c[3]; +} + +#endif /* CYASSL_DTLS */ + + +#ifdef HAVE_LIBZ + + /* alloc user allocs to work with zlib */ + static void* myAlloc(void* opaque, unsigned int item, unsigned int size) + { + (void)opaque; + return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ); + } + + + static void myFree(void* opaque, void* memory) + { + (void)opaque; + XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ); + } + + + /* init zlib comp/decomp streams, 0 on success */ + static int InitStreams(CYASSL* ssl) + { + ssl->c_stream.zalloc = (alloc_func)myAlloc; + ssl->c_stream.zfree = (free_func)myFree; + ssl->c_stream.opaque = (voidpf)ssl->heap; + + if (deflateInit(&ssl->c_stream, Z_DEFAULT_COMPRESSION) != Z_OK) + return ZLIB_INIT_ERROR; + + ssl->didStreamInit = 1; + + ssl->d_stream.zalloc = (alloc_func)myAlloc; + ssl->d_stream.zfree = (free_func)myFree; + ssl->d_stream.opaque = (voidpf)ssl->heap; + + if (inflateInit(&ssl->d_stream) != Z_OK) return ZLIB_INIT_ERROR; + + return 0; + } + + + static void FreeStreams(CYASSL* ssl) + { + if (ssl->didStreamInit) { + deflateEnd(&ssl->c_stream); + inflateEnd(&ssl->d_stream); + } + } + + + /* compress in to out, return out size or error */ + static int myCompress(CYASSL* ssl, byte* in, int inSz, byte* out, int outSz) + { + int err; + int currTotal = (int)ssl->c_stream.total_out; + + ssl->c_stream.next_in = in; + ssl->c_stream.avail_in = inSz; + ssl->c_stream.next_out = out; + ssl->c_stream.avail_out = outSz; + + err = deflate(&ssl->c_stream, Z_SYNC_FLUSH); + if (err != Z_OK && err != Z_STREAM_END) return ZLIB_COMPRESS_ERROR; + + return (int)ssl->c_stream.total_out - currTotal; + } + + + /* decompress in to out, returnn out size or error */ + static int myDeCompress(CYASSL* ssl, byte* in,int inSz, byte* out,int outSz) + { + int err; + int currTotal = (int)ssl->d_stream.total_out; + + ssl->d_stream.next_in = in; + ssl->d_stream.avail_in = inSz; + ssl->d_stream.next_out = out; + ssl->d_stream.avail_out = outSz; + + err = inflate(&ssl->d_stream, Z_SYNC_FLUSH); + if (err != Z_OK && err != Z_STREAM_END) return ZLIB_DECOMPRESS_ERROR; + + return (int)ssl->d_stream.total_out - currTotal; + } + +#endif /* HAVE_LIBZ */ + + +void InitSSL_Method(CYASSL_METHOD* method, ProtocolVersion pv) +{ + method->version = pv; + method->side = CYASSL_CLIENT_END; + method->downgrade = 0; +} + + +/* Initialze SSL context, return 0 on success */ +int InitSSL_Ctx(CYASSL_CTX* ctx, CYASSL_METHOD* method) +{ + ctx->method = method; + ctx->refCount = 1; /* so either CTX_free or SSL_free can release */ +#ifndef NO_CERTS + ctx->certificate.buffer = 0; + ctx->certChain.buffer = 0; + ctx->privateKey.buffer = 0; + ctx->serverDH_P.buffer = 0; + ctx->serverDH_G.buffer = 0; +#endif + ctx->haveDH = 0; + ctx->haveNTRU = 0; /* start off */ + ctx->haveECDSAsig = 0; /* start off */ + ctx->haveStaticECC = 0; /* start off */ + ctx->heap = ctx; /* defaults to self */ +#ifndef NO_PSK + ctx->havePSK = 0; + ctx->server_hint[0] = 0; + ctx->client_psk_cb = 0; + ctx->server_psk_cb = 0; +#endif /* NO_PSK */ +#ifdef HAVE_ECC + ctx->eccTempKeySz = ECDHE_SIZE; +#endif + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + ctx->passwd_cb = 0; + ctx->userdata = 0; +#endif /* OPENSSL_EXTRA */ + + ctx->timeout = DEFAULT_TIMEOUT; + +#ifndef CYASSL_USER_IO + ctx->CBIORecv = EmbedReceive; + ctx->CBIOSend = EmbedSend; + #ifdef CYASSL_DTLS + if (method->version.major == DTLS_MAJOR) { + ctx->CBIORecv = EmbedReceiveFrom; + ctx->CBIOSend = EmbedSendTo; + ctx->CBIOCookie = EmbedGenerateCookie; + } + #endif +#else + /* user will set */ + ctx->CBIORecv = NULL; + ctx->CBIOSend = NULL; + #ifdef CYASSL_DTLS + ctx->CBIOCookie = NULL; + #endif +#endif /* CYASSL_USER_IO */ +#ifdef HAVE_NETX + ctx->CBIORecv = NetX_Receive; + ctx->CBIOSend = NetX_Send; +#endif + ctx->partialWrite = 0; + ctx->verifyCallback = 0; + +#ifndef NO_CERTS + ctx->cm = CyaSSL_CertManagerNew(); +#endif +#ifdef HAVE_NTRU + if (method->side == CYASSL_CLIENT_END) + ctx->haveNTRU = 1; /* always on cliet side */ + /* server can turn on by loading key */ +#endif +#ifdef HAVE_ECC + if (method->side == CYASSL_CLIENT_END) { + ctx->haveECDSAsig = 1; /* always on cliet side */ + ctx->haveStaticECC = 1; /* server can turn on by loading key */ + } +#endif + ctx->suites.setSuites = 0; /* user hasn't set yet */ + /* remove DH later if server didn't set, add psk later */ + InitSuites(&ctx->suites, method->version, TRUE, FALSE, TRUE, ctx->haveNTRU, + ctx->haveECDSAsig, ctx->haveStaticECC, method->side); + ctx->verifyPeer = 0; + ctx->verifyNone = 0; + ctx->failNoCert = 0; + ctx->sessionCacheOff = 0; /* initially on */ + ctx->sessionCacheFlushOff = 0; /* initially on */ + ctx->sendVerify = 0; + ctx->quietShutdown = 0; + ctx->groupMessages = 0; +#ifdef HAVE_CAVIUM + ctx->devId = NO_CAVIUM_DEVICE; +#endif +#ifdef HAVE_TLS_EXTENSIONS + ctx->extensions = NULL; +#endif +#ifdef ATOMIC_USER + ctx->MacEncryptCb = NULL; + ctx->DecryptVerifyCb = NULL; +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ctx->EccSignCb = NULL; + ctx->EccVerifyCb = NULL; + #endif /* HAVE_ECC */ + #ifndef NO_RSA + ctx->RsaSignCb = NULL; + ctx->RsaVerifyCb = NULL; + ctx->RsaEncCb = NULL; + ctx->RsaDecCb = NULL; + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ + + if (InitMutex(&ctx->countMutex) < 0) { + CYASSL_MSG("Mutex error on CTX init"); + return BAD_MUTEX_E; + } +#ifndef NO_CERTS + if (ctx->cm == NULL) { + CYASSL_MSG("Bad Cert Manager New"); + return BAD_CERT_MANAGER_ERROR; + } +#endif + return 0; +} + + +/* In case contexts are held in array and don't want to free actual ctx */ +void SSL_CtxResourceFree(CYASSL_CTX* ctx) +{ + XFREE(ctx->method, ctx->heap, DYNAMIC_TYPE_METHOD); + +#ifndef NO_CERTS + XFREE(ctx->serverDH_G.buffer, ctx->heap, DYNAMIC_TYPE_DH); + XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); + XFREE(ctx->privateKey.buffer, ctx->heap, DYNAMIC_TYPE_KEY); + XFREE(ctx->certificate.buffer, ctx->heap, DYNAMIC_TYPE_CERT); + XFREE(ctx->certChain.buffer, ctx->heap, DYNAMIC_TYPE_CERT); + CyaSSL_CertManagerFree(ctx->cm); +#endif +#ifdef HAVE_TLS_EXTENSIONS + TLSX_FreeAll(ctx->extensions); +#endif +} + + +void FreeSSL_Ctx(CYASSL_CTX* ctx) +{ + int doFree = 0; + + if (LockMutex(&ctx->countMutex) != 0) { + CYASSL_MSG("Couldn't lock count mutex"); + return; + } + ctx->refCount--; + if (ctx->refCount == 0) + doFree = 1; + UnLockMutex(&ctx->countMutex); + + if (doFree) { + CYASSL_MSG("CTX ref count down to 0, doing full free"); + SSL_CtxResourceFree(ctx); + FreeMutex(&ctx->countMutex); + XFREE(ctx, ctx->heap, DYNAMIC_TYPE_CTX); + } + else { + (void)ctx; + CYASSL_MSG("CTX ref count not 0 yet, no free"); + } +} + + +/* Set cipher pointers to null */ +void InitCiphers(CYASSL* ssl) +{ +#ifdef BUILD_ARC4 + ssl->encrypt.arc4 = NULL; + ssl->decrypt.arc4 = NULL; +#endif +#ifdef BUILD_DES3 + ssl->encrypt.des3 = NULL; + ssl->decrypt.des3 = NULL; +#endif +#ifdef BUILD_AES + ssl->encrypt.aes = NULL; + ssl->decrypt.aes = NULL; +#endif +#ifdef HAVE_CAMELLIA + ssl->encrypt.cam = NULL; + ssl->decrypt.cam = NULL; +#endif +#ifdef HAVE_HC128 + ssl->encrypt.hc128 = NULL; + ssl->decrypt.hc128 = NULL; +#endif +#ifdef BUILD_RABBIT + ssl->encrypt.rabbit = NULL; + ssl->decrypt.rabbit = NULL; +#endif + ssl->encrypt.setup = 0; + ssl->decrypt.setup = 0; +} + + +/* Free ciphers */ +void FreeCiphers(CYASSL* ssl) +{ + (void)ssl; +#ifdef BUILD_ARC4 + #ifdef HAVE_CAVIUM + if (ssl->devId != NO_CAVIUM_DEVICE) { + Arc4FreeCavium(ssl->encrypt.arc4); + Arc4FreeCavium(ssl->decrypt.arc4); + } + #endif + XFREE(ssl->encrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +#ifdef BUILD_DES3 + #ifdef HAVE_CAVIUM + if (ssl->devId != NO_CAVIUM_DEVICE) { + Des3_FreeCavium(ssl->encrypt.des3); + Des3_FreeCavium(ssl->decrypt.des3); + } + #endif + XFREE(ssl->encrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +#ifdef BUILD_AES + #ifdef HAVE_CAVIUM + if (ssl->devId != NO_CAVIUM_DEVICE) { + AesFreeCavium(ssl->encrypt.aes); + AesFreeCavium(ssl->decrypt.aes); + } + #endif + XFREE(ssl->encrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +#ifdef HAVE_CAMELLIA + XFREE(ssl->encrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +#ifdef HAVE_HC128 + XFREE(ssl->encrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +#ifdef BUILD_RABBIT + XFREE(ssl->encrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER); + XFREE(ssl->decrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER); +#endif +} + + +void InitCipherSpecs(CipherSpecs* cs) +{ + cs->bulk_cipher_algorithm = INVALID_BYTE; + cs->cipher_type = INVALID_BYTE; + cs->mac_algorithm = INVALID_BYTE; + cs->kea = INVALID_BYTE; + cs->sig_algo = INVALID_BYTE; + + cs->hash_size = 0; + cs->static_ecdh = 0; + cs->key_size = 0; + cs->iv_size = 0; + cs->block_size = 0; +} + + +void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK, + byte haveDH, byte haveNTRU, byte haveECDSAsig, + byte haveStaticECC, int side) +{ + word16 idx = 0; + int tls = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_MINOR; + int tls1_2 = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_2_MINOR; + int haveRSAsig = 1; + + (void)tls; /* shut up compiler */ + (void)tls1_2; + (void)haveDH; + (void)havePSK; + (void)haveNTRU; + (void)haveStaticECC; + + if (suites == NULL) { + CYASSL_MSG("InitSuites pointer error"); + return; + } + + if (suites->setSuites) + return; /* trust user settings, don't override */ + + if (side == CYASSL_SERVER_END && haveStaticECC) { + haveRSA = 0; /* can't do RSA with ECDSA key */ + (void)haveRSA; /* some builds won't read */ + } + + if (side == CYASSL_SERVER_END && haveECDSAsig) { + haveRSAsig = 0; /* can't have RSA sig if signed by ECDSA */ + (void)haveRSAsig; /* non ecc builds won't read */ + } + +#ifdef CYASSL_DTLS + if (pv.major == DTLS_MAJOR) { + tls = 1; + tls1_2 = pv.minor <= DTLSv1_2_MINOR; + } +#endif + +#ifdef HAVE_RENEGOTIATION_INDICATION + if (side == CYASSL_CLIENT_END) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_EMPTY_RENEGOTIATION_INFO_SCSV; + } +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA + if (tls && haveNTRU && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA + if (tls && haveNTRU && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA + if (tls && haveNTRU && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_NTRU_RSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA + if (tls && haveNTRU && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveRSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 + if (tls1_2 && haveRSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 + if (tls1_2 && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 + if (tls1_2 && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + if (tls && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA + if (tls && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + if (tls && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA + if (tls && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + if (tls && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA + if (tls && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA + if (tls && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA + if (tls && haveECDSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA + if (tls && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA + if (tls && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA + if (tls && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA + if (tls && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA + if (tls && haveRSAsig && haveStaticECC) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8; + } +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 + if (tls1_2 && haveECDSAsig) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_RSA_WITH_AES_128_CCM_8; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_RSA_WITH_AES_256_CCM_8; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 + if (tls1_2 && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_256_GCM_SHA384; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_128_GCM_SHA256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 + if (tls1_2 && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA256; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA + if (tls && havePSK) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_PSK_WITH_AES_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 + if (tls && havePSK) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA + if (tls && havePSK) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 + if (tls && havePSK) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_PSK_WITH_AES_128_CCM_8; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 + if (tls && havePSK) { + suites->suites[idx++] = ECC_BYTE; + suites->suites[idx++] = TLS_PSK_WITH_AES_256_CCM_8; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 + if (tls && havePSK) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA256; + } +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA + if (tls && havePSK) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA; + } +#endif + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA + if (haveRSA ) { + suites->suites[idx++] = 0; + suites->suites[idx++] = SSL_RSA_WITH_RC4_128_SHA; + } +#endif + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 + if (haveRSA ) { + suites->suites[idx++] = 0; + suites->suites[idx++] = SSL_RSA_WITH_RC4_128_MD5; + } +#endif + +#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA + if (haveRSA ) { + suites->suites[idx++] = 0; + suites->suites[idx++] = SSL_RSA_WITH_3DES_EDE_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_HC_128_MD5; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_HC_128_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_HC_128_B2B256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_B2B256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_B2B256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_RABBIT_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_DHE_WITH_RSA_CAMELLIA_256_CBC_SHA + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 + if (tls && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256; + } +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 + if (tls && haveDH && haveRSA) { + suites->suites[idx++] = 0; + suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256; + } +#endif + + suites->suiteSz = idx; + + { + idx = 0; + + if (haveECDSAsig) { + #ifdef CYASSL_SHA384 + suites->hashSigAlgo[idx++] = sha384_mac; + suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + #endif + #ifndef NO_SHA256 + suites->hashSigAlgo[idx++] = sha256_mac; + suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + #endif + #ifndef NO_SHA + suites->hashSigAlgo[idx++] = sha_mac; + suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + #endif + } + + if (haveRSAsig) { + #ifdef CYASSL_SHA384 + suites->hashSigAlgo[idx++] = sha384_mac; + suites->hashSigAlgo[idx++] = rsa_sa_algo; + #endif + #ifndef NO_SHA256 + suites->hashSigAlgo[idx++] = sha256_mac; + suites->hashSigAlgo[idx++] = rsa_sa_algo; + #endif + #ifndef NO_SHA + suites->hashSigAlgo[idx++] = sha_mac; + suites->hashSigAlgo[idx++] = rsa_sa_algo; + #endif + } + + suites->hashSigAlgoSz = idx; + } +} + + +#ifndef NO_CERTS + + +void InitX509Name(CYASSL_X509_NAME* name, int dynamicFlag) +{ + (void)dynamicFlag; + + if (name != NULL) { + name->name = name->staticName; + name->dynamicName = 0; +#ifdef OPENSSL_EXTRA + XMEMSET(&name->fullName, 0, sizeof(DecodedName)); +#endif /* OPENSSL_EXTRA */ + } +} + + +void FreeX509Name(CYASSL_X509_NAME* name) +{ + if (name != NULL) { + if (name->dynamicName) + XFREE(name->name, NULL, DYNAMIC_TYPE_SUBJECT_CN); +#ifdef OPENSSL_EXTRA + if (name->fullName.fullName != NULL) + XFREE(name->fullName.fullName, NULL, DYNAMIC_TYPE_X509); +#endif /* OPENSSL_EXTRA */ + } +} + + +/* Initialize CyaSSL X509 type */ +void InitX509(CYASSL_X509* x509, int dynamicFlag) +{ + InitX509Name(&x509->issuer, 0); + InitX509Name(&x509->subject, 0); + x509->version = 0; + x509->pubKey.buffer = NULL; + x509->sig.buffer = NULL; + x509->derCert.buffer = NULL; + x509->altNames = NULL; + x509->altNamesNext = NULL; + x509->dynamicMemory = (byte)dynamicFlag; + x509->isCa = 0; +#ifdef HAVE_ECC + x509->pkCurveOID = 0; +#endif /* HAVE_ECC */ +#ifdef OPENSSL_EXTRA + x509->pathLength = 0; + x509->basicConstSet = 0; + x509->basicConstCrit = 0; + x509->basicConstPlSet = 0; + x509->subjAltNameSet = 0; + x509->subjAltNameCrit = 0; + x509->authKeyIdSet = 0; + x509->authKeyIdCrit = 0; + x509->authKeyId = NULL; + x509->authKeyIdSz = 0; + x509->subjKeyIdSet = 0; + x509->subjKeyIdCrit = 0; + x509->subjKeyId = NULL; + x509->subjKeyIdSz = 0; + x509->keyUsageSet = 0; + x509->keyUsageCrit = 0; + x509->keyUsage = 0; + #ifdef CYASSL_SEP + x509->certPolicySet = 0; + x509->certPolicyCrit = 0; + #endif /* CYASSL_SEP */ +#endif /* OPENSSL_EXTRA */ +} + + +/* Free CyaSSL X509 type */ +void FreeX509(CYASSL_X509* x509) +{ + if (x509 == NULL) + return; + + FreeX509Name(&x509->issuer); + FreeX509Name(&x509->subject); + if (x509->pubKey.buffer) + XFREE(x509->pubKey.buffer, NULL, DYNAMIC_TYPE_PUBLIC_KEY); + XFREE(x509->derCert.buffer, NULL, DYNAMIC_TYPE_SUBJECT_CN); + XFREE(x509->sig.buffer, NULL, DYNAMIC_TYPE_SIGNATURE); + #ifdef OPENSSL_EXTRA + XFREE(x509->authKeyId, NULL, 0); + XFREE(x509->subjKeyId, NULL, 0); + #endif /* OPENSSL_EXTRA */ + if (x509->altNames) + FreeAltNames(x509->altNames, NULL); + if (x509->dynamicMemory) + XFREE(x509, NULL, DYNAMIC_TYPE_X509); +} + +#endif /* NO_CERTS */ + + +/* init everything to 0, NULL, default values before calling anything that may + fail so that desctructor has a "good" state to cleanup */ +int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx) +{ + int ret; + byte haveRSA = 0; + byte havePSK = 0; + + ssl->ctx = ctx; /* only for passing to calls, options could change */ + ssl->version = ctx->method->version; + ssl->suites = NULL; + +#ifdef HAVE_LIBZ + ssl->didStreamInit = 0; +#endif +#ifndef NO_RSA + haveRSA = 1; +#endif + +#ifndef NO_CERTS + ssl->buffers.certificate.buffer = 0; + ssl->buffers.key.buffer = 0; + ssl->buffers.certChain.buffer = 0; +#endif + ssl->buffers.inputBuffer.length = 0; + ssl->buffers.inputBuffer.idx = 0; + ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer; + ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN; + ssl->buffers.inputBuffer.dynamicFlag = 0; + ssl->buffers.inputBuffer.offset = 0; + ssl->buffers.outputBuffer.length = 0; + ssl->buffers.outputBuffer.idx = 0; + ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer; + ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN; + ssl->buffers.outputBuffer.dynamicFlag = 0; + ssl->buffers.outputBuffer.offset = 0; + ssl->buffers.domainName.buffer = 0; +#ifndef NO_CERTS + ssl->buffers.serverDH_P.buffer = 0; + ssl->buffers.serverDH_G.buffer = 0; + ssl->buffers.serverDH_Pub.buffer = 0; + ssl->buffers.serverDH_Priv.buffer = 0; +#endif + ssl->buffers.clearOutputBuffer.buffer = 0; + ssl->buffers.clearOutputBuffer.length = 0; + ssl->buffers.prevSent = 0; + ssl->buffers.plainSz = 0; +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ssl->buffers.peerEccDsaKey.buffer = 0; + ssl->buffers.peerEccDsaKey.length = 0; + #endif /* HAVE_ECC */ + #ifndef NO_RSA + ssl->buffers.peerRsaKey.buffer = 0; + ssl->buffers.peerRsaKey.length = 0; + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ + +#ifdef KEEP_PEER_CERT + InitX509(&ssl->peerCert, 0); +#endif + +#ifdef HAVE_ECC + ssl->eccTempKeySz = ctx->eccTempKeySz; + ssl->pkCurveOID = ctx->pkCurveOID; + ssl->peerEccKeyPresent = 0; + ssl->peerEccDsaKeyPresent = 0; + ssl->eccDsaKeyPresent = 0; + ssl->eccTempKeyPresent = 0; + ssl->peerEccKey = NULL; + ssl->peerEccDsaKey = NULL; + ssl->eccDsaKey = NULL; + ssl->eccTempKey = NULL; +#endif + + ssl->timeout = ctx->timeout; + ssl->rfd = -1; /* set to invalid descriptor */ + ssl->wfd = -1; + ssl->rflags = 0; /* no user flags yet */ + ssl->wflags = 0; /* no user flags yet */ + ssl->biord = 0; + ssl->biowr = 0; + + ssl->IOCB_ReadCtx = &ssl->rfd; /* prevent invalid pointer access if not */ + ssl->IOCB_WriteCtx = &ssl->wfd; /* correctly set */ +#ifdef HAVE_NETX + ssl->nxCtx.nxSocket = NULL; + ssl->nxCtx.nxPacket = NULL; + ssl->nxCtx.nxOffset = 0; + ssl->nxCtx.nxWait = 0; + ssl->IOCB_ReadCtx = &ssl->nxCtx; /* default NetX IO ctx, same for read */ + ssl->IOCB_WriteCtx = &ssl->nxCtx; /* and write */ +#endif +#ifdef CYASSL_DTLS + ssl->IOCB_CookieCtx = NULL; /* we don't use for default cb */ + ssl->dtls_expected_rx = MAX_MTU; + ssl->keys.dtls_state.window = 0; + ssl->keys.dtls_state.nextEpoch = 0; + ssl->keys.dtls_state.nextSeq = 0; +#endif + +#ifndef NO_OLD_TLS +#ifndef NO_MD5 + InitMd5(&ssl->hashMd5); +#endif +#ifndef NO_SHA + ret = InitSha(&ssl->hashSha); + if (ret != 0) { + return ret; + } +#endif +#endif +#ifndef NO_SHA256 + ret = InitSha256(&ssl->hashSha256); + if (ret != 0) { + return ret; + } +#endif +#ifdef CYASSL_SHA384 + ret = InitSha384(&ssl->hashSha384); + if (ret != 0) { + return ret; + } +#endif +#ifndef NO_RSA + ssl->peerRsaKey = NULL; + ssl->peerRsaKeyPresent = 0; +#endif + ssl->verifyCallback = ctx->verifyCallback; + ssl->verifyCbCtx = NULL; + ssl->options.side = ctx->method->side; + ssl->options.downgrade = ctx->method->downgrade; + ssl->error = 0; + ssl->options.connReset = 0; + ssl->options.isClosed = 0; + ssl->options.closeNotify = 0; + ssl->options.sentNotify = 0; + ssl->options.usingCompression = 0; + if (ssl->options.side == CYASSL_SERVER_END) + ssl->options.haveDH = ctx->haveDH; + else + ssl->options.haveDH = 0; + ssl->options.haveNTRU = ctx->haveNTRU; + ssl->options.haveECDSAsig = ctx->haveECDSAsig; + ssl->options.haveStaticECC = ctx->haveStaticECC; + ssl->options.havePeerCert = 0; + ssl->options.havePeerVerify = 0; + ssl->options.usingPSK_cipher = 0; + ssl->options.sendAlertState = 0; +#ifndef NO_PSK + havePSK = ctx->havePSK; + ssl->options.havePSK = ctx->havePSK; + ssl->options.client_psk_cb = ctx->client_psk_cb; + ssl->options.server_psk_cb = ctx->server_psk_cb; +#endif /* NO_PSK */ + + ssl->options.serverState = NULL_STATE; + ssl->options.clientState = NULL_STATE; + ssl->options.connectState = CONNECT_BEGIN; + ssl->options.acceptState = ACCEPT_BEGIN; + ssl->options.handShakeState = NULL_STATE; + ssl->options.processReply = doProcessInit; + +#ifdef CYASSL_DTLS + ssl->keys.dtls_sequence_number = 0; + ssl->keys.dtls_state.curSeq = 0; + ssl->keys.dtls_state.nextSeq = 0; + ssl->keys.dtls_handshake_number = 0; + ssl->keys.dtls_expected_peer_handshake_number = 0; + ssl->keys.dtls_epoch = 0; + ssl->keys.dtls_state.curEpoch = 0; + ssl->keys.dtls_state.nextEpoch = 0; + ssl->dtls_timeout_init = DTLS_TIMEOUT_INIT; + ssl->dtls_timeout_max = DTLS_TIMEOUT_MAX; + ssl->dtls_timeout = ssl->dtls_timeout_init; + ssl->dtls_pool = NULL; + ssl->dtls_msg_list = NULL; +#endif + ssl->keys.encryptSz = 0; + ssl->keys.padSz = 0; + ssl->keys.encryptionOn = 0; /* initially off */ + ssl->keys.decryptedCur = 0; /* initially off */ + ssl->options.sessionCacheOff = ctx->sessionCacheOff; + ssl->options.sessionCacheFlushOff = ctx->sessionCacheFlushOff; + + ssl->options.verifyPeer = ctx->verifyPeer; + ssl->options.verifyNone = ctx->verifyNone; + ssl->options.failNoCert = ctx->failNoCert; + ssl->options.sendVerify = ctx->sendVerify; + + ssl->options.resuming = 0; + ssl->options.haveSessionId = 0; + #ifndef NO_OLD_TLS + ssl->hmac = SSL_hmac; /* default to SSLv3 */ + #else + ssl->hmac = TLS_hmac; + #endif + ssl->heap = ctx->heap; /* defaults to self */ + ssl->options.tls = 0; + ssl->options.tls1_1 = 0; + ssl->options.dtls = ssl->version.major == DTLS_MAJOR; + ssl->options.partialWrite = ctx->partialWrite; + ssl->options.quietShutdown = ctx->quietShutdown; + ssl->options.certOnly = 0; + ssl->options.groupMessages = ctx->groupMessages; + ssl->options.usingNonblock = 0; + ssl->options.saveArrays = 0; + +#ifndef NO_CERTS + /* ctx still owns certificate, certChain, key, dh, and cm */ + ssl->buffers.certificate = ctx->certificate; + ssl->buffers.certChain = ctx->certChain; + ssl->buffers.key = ctx->privateKey; + if (ssl->options.side == CYASSL_SERVER_END) { + ssl->buffers.serverDH_P = ctx->serverDH_P; + ssl->buffers.serverDH_G = ctx->serverDH_G; + } +#endif + ssl->buffers.weOwnCert = 0; + ssl->buffers.weOwnKey = 0; + ssl->buffers.weOwnDH = 0; + +#ifdef CYASSL_DTLS + ssl->buffers.dtlsCtx.fd = -1; + ssl->buffers.dtlsCtx.peer.sa = NULL; + ssl->buffers.dtlsCtx.peer.sz = 0; +#endif + +#ifdef KEEP_PEER_CERT + ssl->peerCert.issuer.sz = 0; + ssl->peerCert.subject.sz = 0; +#endif + +#ifdef SESSION_CERTS + ssl->session.chain.count = 0; +#endif + +#ifndef NO_CLIENT_CACHE + ssl->session.idLen = 0; +#endif + + ssl->cipher.ssl = ssl; + +#ifdef FORTRESS + ssl->ex_data[0] = 0; + ssl->ex_data[1] = 0; + ssl->ex_data[2] = 0; +#endif + +#ifdef CYASSL_CALLBACKS + ssl->hsInfoOn = 0; + ssl->toInfoOn = 0; +#endif + +#ifdef HAVE_CAVIUM + ssl->devId = ctx->devId; +#endif + +#ifdef HAVE_TLS_EXTENSIONS + ssl->extensions = NULL; +#ifdef HAVE_MAX_FRAGMENT + ssl->max_fragment = MAX_RECORD_SIZE; +#endif +#ifdef HAVE_TRUNCATED_HMAC + ssl->truncated_hmac = 0; +#endif +#endif + + ssl->rng = NULL; + ssl->arrays = NULL; + + /* default alert state (none) */ + ssl->alert_history.last_rx.code = -1; + ssl->alert_history.last_rx.level = -1; + ssl->alert_history.last_tx.code = -1; + ssl->alert_history.last_tx.level = -1; + + InitCiphers(ssl); + InitCipherSpecs(&ssl->specs); +#ifdef ATOMIC_USER + ssl->MacEncryptCtx = NULL; + ssl->DecryptVerifyCtx = NULL; +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ssl->EccSignCtx = NULL; + ssl->EccVerifyCtx = NULL; + #endif /* HAVE_ECC */ + #ifndef NO_RSA + ssl->RsaSignCtx = NULL; + ssl->RsaVerifyCtx = NULL; + ssl->RsaEncCtx = NULL; + ssl->RsaDecCtx = NULL; + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ + + /* all done with init, now can return errors, call other stuff */ + + /* increment CTX reference count */ + if (LockMutex(&ctx->countMutex) != 0) { + CYASSL_MSG("Couldn't lock CTX count mutex"); + return BAD_MUTEX_E; + } + ctx->refCount++; + UnLockMutex(&ctx->countMutex); + + /* arrays */ + ssl->arrays = (Arrays*)XMALLOC(sizeof(Arrays), ssl->heap, + DYNAMIC_TYPE_ARRAYS); + if (ssl->arrays == NULL) { + CYASSL_MSG("Arrays Memory error"); + return MEMORY_E; + } + XMEMSET(ssl->arrays, 0, sizeof(Arrays)); + +#ifndef NO_PSK + ssl->arrays->client_identity[0] = 0; + if (ctx->server_hint[0]) { /* set in CTX */ + XSTRNCPY(ssl->arrays->server_hint, ctx->server_hint, MAX_PSK_ID_LEN); + ssl->arrays->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; + } + else + ssl->arrays->server_hint[0] = 0; +#endif /* NO_PSK */ + +#ifdef CYASSL_DTLS + ssl->arrays->cookieSz = 0; +#endif + + /* RNG */ + ssl->rng = (RNG*)XMALLOC(sizeof(RNG), ssl->heap, DYNAMIC_TYPE_RNG); + if (ssl->rng == NULL) { + CYASSL_MSG("RNG Memory error"); + return MEMORY_E; + } + + if ( (ret = InitRng(ssl->rng)) != 0) { + CYASSL_MSG("RNG Init error"); + return ret; + } + + /* suites */ + ssl->suites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap, + DYNAMIC_TYPE_SUITES); + if (ssl->suites == NULL) { + CYASSL_MSG("Suites Memory error"); + return MEMORY_E; + } + *ssl->suites = ctx->suites; + + /* peer key */ +#ifndef NO_RSA + ssl->peerRsaKey = (RsaKey*)XMALLOC(sizeof(RsaKey), ssl->heap, + DYNAMIC_TYPE_RSA); + if (ssl->peerRsaKey == NULL) { + CYASSL_MSG("PeerRsaKey Memory error"); + return MEMORY_E; + } + ret = InitRsaKey(ssl->peerRsaKey, ctx->heap); + if (ret != 0) return ret; +#endif +#ifndef NO_CERTS + /* make sure server has cert and key unless using PSK */ + if (ssl->options.side == CYASSL_SERVER_END && !havePSK) + if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) { + CYASSL_MSG("Server missing certificate and/or private key"); + return NO_PRIVATE_KEY; + } +#endif +#ifdef HAVE_ECC + ssl->peerEccKey = (ecc_key*)XMALLOC(sizeof(ecc_key), + ctx->heap, DYNAMIC_TYPE_ECC); + if (ssl->peerEccKey == NULL) { + CYASSL_MSG("PeerEccKey Memory error"); + return MEMORY_E; + } + ssl->peerEccDsaKey = (ecc_key*)XMALLOC(sizeof(ecc_key), + ctx->heap, DYNAMIC_TYPE_ECC); + if (ssl->peerEccDsaKey == NULL) { + CYASSL_MSG("PeerEccDsaKey Memory error"); + return MEMORY_E; + } + ssl->eccDsaKey = (ecc_key*)XMALLOC(sizeof(ecc_key), + ctx->heap, DYNAMIC_TYPE_ECC); + if (ssl->eccDsaKey == NULL) { + CYASSL_MSG("EccDsaKey Memory error"); + return MEMORY_E; + } + ssl->eccTempKey = (ecc_key*)XMALLOC(sizeof(ecc_key), + ctx->heap, DYNAMIC_TYPE_ECC); + if (ssl->eccTempKey == NULL) { + CYASSL_MSG("EccTempKey Memory error"); + return MEMORY_E; + } + ecc_init(ssl->peerEccKey); + ecc_init(ssl->peerEccDsaKey); + ecc_init(ssl->eccDsaKey); + ecc_init(ssl->eccTempKey); +#endif + + /* make sure server has DH parms, and add PSK if there, add NTRU too */ + if (ssl->options.side == CYASSL_SERVER_END) + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + else + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, TRUE, + ssl->options.haveNTRU, ssl->options.haveECDSAsig, + ssl->options.haveStaticECC, ssl->options.side); + + return 0; +} + + +/* free use of temporary arrays */ +void FreeArrays(CYASSL* ssl, int keep) +{ + if (ssl->arrays && keep) { + /* keeps session id for user retrieval */ + XMEMCPY(ssl->session.sessionID, ssl->arrays->sessionID, ID_LEN); + } + XFREE(ssl->arrays, ssl->heap, DYNAMIC_TYPE_ARRAYS); + ssl->arrays = NULL; +} + + +/* In case holding SSL object in array and don't want to free actual ssl */ +void SSL_ResourceFree(CYASSL* ssl) +{ + FreeCiphers(ssl); + FreeArrays(ssl, 0); + XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG); + XFREE(ssl->suites, ssl->heap, DYNAMIC_TYPE_SUITES); + XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN); + +#ifndef NO_CERTS + XFREE(ssl->buffers.serverDH_Priv.buffer, ssl->heap, DYNAMIC_TYPE_DH); + XFREE(ssl->buffers.serverDH_Pub.buffer, ssl->heap, DYNAMIC_TYPE_DH); + /* parameters (p,g) may be owned by ctx */ + if (ssl->buffers.weOwnDH || ssl->options.side == CYASSL_CLIENT_END) { + XFREE(ssl->buffers.serverDH_G.buffer, ssl->heap, DYNAMIC_TYPE_DH); + XFREE(ssl->buffers.serverDH_P.buffer, ssl->heap, DYNAMIC_TYPE_DH); + } + + /* CYASSL_CTX always owns certChain */ + if (ssl->buffers.weOwnCert) + XFREE(ssl->buffers.certificate.buffer, ssl->heap, DYNAMIC_TYPE_CERT); + if (ssl->buffers.weOwnKey) + XFREE(ssl->buffers.key.buffer, ssl->heap, DYNAMIC_TYPE_KEY); +#endif +#ifndef NO_RSA + if (ssl->peerRsaKey) { + FreeRsaKey(ssl->peerRsaKey); + XFREE(ssl->peerRsaKey, ssl->heap, DYNAMIC_TYPE_RSA); + } +#endif + if (ssl->buffers.inputBuffer.dynamicFlag) + ShrinkInputBuffer(ssl, FORCED_FREE); + if (ssl->buffers.outputBuffer.dynamicFlag) + ShrinkOutputBuffer(ssl); +#ifdef CYASSL_DTLS + if (ssl->dtls_pool != NULL) { + DtlsPoolReset(ssl); + XFREE(ssl->dtls_pool, ssl->heap, DYNAMIC_TYPE_NONE); + } + if (ssl->dtls_msg_list != NULL) { + DtlsMsgListDelete(ssl->dtls_msg_list, ssl->heap); + ssl->dtls_msg_list = NULL; + } + XFREE(ssl->buffers.dtlsCtx.peer.sa, ssl->heap, DYNAMIC_TYPE_SOCKADDR); + ssl->buffers.dtlsCtx.peer.sa = NULL; +#endif +#if defined(KEEP_PEER_CERT) || defined(GOAHEAD_WS) + FreeX509(&ssl->peerCert); +#endif +#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) + CyaSSL_BIO_free(ssl->biord); + if (ssl->biord != ssl->biowr) /* in case same as write */ + CyaSSL_BIO_free(ssl->biowr); +#endif +#ifdef HAVE_LIBZ + FreeStreams(ssl); +#endif +#ifdef HAVE_ECC + if (ssl->peerEccKey) { + if (ssl->peerEccKeyPresent) + ecc_free(ssl->peerEccKey); + XFREE(ssl->peerEccKey, ssl->heap, DYNAMIC_TYPE_ECC); + } + if (ssl->peerEccDsaKey) { + if (ssl->peerEccDsaKeyPresent) + ecc_free(ssl->peerEccDsaKey); + XFREE(ssl->peerEccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); + } + if (ssl->eccTempKey) { + if (ssl->eccTempKeyPresent) + ecc_free(ssl->eccTempKey); + XFREE(ssl->eccTempKey, ssl->heap, DYNAMIC_TYPE_ECC); + } + if (ssl->eccDsaKey) { + if (ssl->eccDsaKeyPresent) + ecc_free(ssl->eccDsaKey); + XFREE(ssl->eccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); + } +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC); + #endif /* HAVE_ECC */ + #ifndef NO_RSA + XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA); + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ +#ifdef HAVE_TLS_EXTENSIONS + TLSX_FreeAll(ssl->extensions); +#endif +#ifdef HAVE_NETX + if (ssl->nxCtx.nxPacket) + nx_packet_release(ssl->nxCtx.nxPacket); +#endif +} + + +/* Free any handshake resources no longer needed */ +void FreeHandshakeResources(CYASSL* ssl) +{ + /* input buffer */ + if (ssl->buffers.inputBuffer.dynamicFlag) + ShrinkInputBuffer(ssl, NO_FORCED_FREE); + + /* suites */ + XFREE(ssl->suites, ssl->heap, DYNAMIC_TYPE_SUITES); + ssl->suites = NULL; + + /* RNG */ + if (ssl->specs.cipher_type == stream || ssl->options.tls1_1 == 0) { + XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG); + ssl->rng = NULL; + } + +#ifdef CYASSL_DTLS + /* DTLS_POOL */ + if (ssl->options.dtls && ssl->dtls_pool != NULL) { + DtlsPoolReset(ssl); + XFREE(ssl->dtls_pool, ssl->heap, DYNAMIC_TYPE_DTLS_POOL); + ssl->dtls_pool = NULL; + } +#endif + + /* arrays */ + if (ssl->options.saveArrays) + FreeArrays(ssl, 1); + +#ifndef NO_RSA + /* peerRsaKey */ + if (ssl->peerRsaKey) { + FreeRsaKey(ssl->peerRsaKey); + XFREE(ssl->peerRsaKey, ssl->heap, DYNAMIC_TYPE_RSA); + ssl->peerRsaKey = NULL; + } +#endif + +#ifdef HAVE_ECC + if (ssl->peerEccKey) + { + if (ssl->peerEccKeyPresent) { + ecc_free(ssl->peerEccKey); + ssl->peerEccKeyPresent = 0; + } + XFREE(ssl->peerEccKey, ssl->heap, DYNAMIC_TYPE_ECC); + ssl->peerEccKey = NULL; + } + if (ssl->peerEccDsaKey) + { + if (ssl->peerEccDsaKeyPresent) { + ecc_free(ssl->peerEccDsaKey); + ssl->peerEccDsaKeyPresent = 0; + } + XFREE(ssl->peerEccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); + ssl->peerEccDsaKey = NULL; + } + if (ssl->eccTempKey) + { + if (ssl->eccTempKeyPresent) { + ecc_free(ssl->eccTempKey); + ssl->eccTempKeyPresent = 0; + } + XFREE(ssl->eccTempKey, ssl->heap, DYNAMIC_TYPE_ECC); + ssl->eccTempKey = NULL; + } + if (ssl->eccDsaKey) + { + if (ssl->eccDsaKeyPresent) { + ecc_free(ssl->eccDsaKey); + ssl->eccDsaKeyPresent = 0; + } + XFREE(ssl->eccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); + ssl->eccDsaKey = NULL; + } +#endif +#ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC); + ssl->buffers.peerEccDsaKey.buffer = NULL; + #endif /* HAVE_ECC */ + #ifndef NO_RSA + XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA); + ssl->buffers.peerRsaKey.buffer = NULL; + #endif /* NO_RSA */ +#endif /* HAVE_PK_CALLBACKS */ +} + + +void FreeSSL(CYASSL* ssl) +{ + FreeSSL_Ctx(ssl->ctx); /* will decrement and free underyling CTX if 0 */ + SSL_ResourceFree(ssl); + XFREE(ssl, ssl->heap, DYNAMIC_TYPE_SSL); +} + + +#ifdef CYASSL_DTLS + +int DtlsPoolInit(CYASSL* ssl) +{ + if (ssl->dtls_pool == NULL) { + DtlsPool *pool = (DtlsPool*)XMALLOC(sizeof(DtlsPool), + ssl->heap, DYNAMIC_TYPE_DTLS_POOL); + if (pool == NULL) { + CYASSL_MSG("DTLS Buffer Pool Memory error"); + return MEMORY_E; + } + else { + int i; + + for (i = 0; i < DTLS_POOL_SZ; i++) { + pool->buf[i].length = 0; + pool->buf[i].buffer = NULL; + } + pool->used = 0; + ssl->dtls_pool = pool; + } + } + return 0; +} + + +int DtlsPoolSave(CYASSL* ssl, const byte *src, int sz) +{ + DtlsPool *pool = ssl->dtls_pool; + if (pool != NULL && pool->used < DTLS_POOL_SZ) { + buffer *pBuf = &pool->buf[pool->used]; + pBuf->buffer = (byte*)XMALLOC(sz, ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); + if (pBuf->buffer == NULL) { + CYASSL_MSG("DTLS Buffer Memory error"); + return MEMORY_ERROR; + } + XMEMCPY(pBuf->buffer, src, sz); + pBuf->length = (word32)sz; + pool->used++; + } + return 0; +} + + +void DtlsPoolReset(CYASSL* ssl) +{ + DtlsPool *pool = ssl->dtls_pool; + if (pool != NULL) { + buffer *pBuf; + int i, used; + + used = pool->used; + for (i = 0, pBuf = &pool->buf[0]; i < used; i++, pBuf++) { + XFREE(pBuf->buffer, ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); + pBuf->buffer = NULL; + pBuf->length = 0; + } + pool->used = 0; + } + ssl->dtls_timeout = ssl->dtls_timeout_init; +} + + +int DtlsPoolTimeout(CYASSL* ssl) +{ + int result = -1; + if (ssl->dtls_timeout < ssl->dtls_timeout_max) { + ssl->dtls_timeout *= DTLS_TIMEOUT_MULTIPLIER; + result = 0; + } + return result; +} + + +int DtlsPoolSend(CYASSL* ssl) +{ + int ret; + DtlsPool *pool = ssl->dtls_pool; + + if (pool != NULL && pool->used > 0) { + int i; + for (i = 0; i < pool->used; i++) { + int sendResult; + buffer* buf = &pool->buf[i]; + + DtlsRecordLayerHeader* dtls = (DtlsRecordLayerHeader*)buf->buffer; + + word16 message_epoch; + ato16(dtls->epoch, &message_epoch); + if (message_epoch == ssl->keys.dtls_epoch) { + /* Increment record sequence number on retransmitted handshake + * messages */ + c32to48(ssl->keys.dtls_sequence_number, dtls->sequence_number); + ssl->keys.dtls_sequence_number++; + } + else { + /* The Finished message is sent with the next epoch, keep its + * sequence number */ + } + + if ((ret = CheckAvailableSize(ssl, buf->length)) != 0) + return ret; + + XMEMCPY(ssl->buffers.outputBuffer.buffer, buf->buffer, buf->length); + ssl->buffers.outputBuffer.idx = 0; + ssl->buffers.outputBuffer.length = buf->length; + + sendResult = SendBuffered(ssl); + if (sendResult < 0) { + return sendResult; + } + } + } + return 0; +} + + +/* functions for managing DTLS datagram reordering */ + +/* Need to allocate space for the handshake message header. The hashing + * routines assume the message pointer is still within the buffer that + * has the headers, and will include those headers in the hash. The store + * routines need to take that into account as well. New will allocate + * extra space for the headers. */ +DtlsMsg* DtlsMsgNew(word32 sz, void* heap) +{ + DtlsMsg* msg = NULL; + + msg = (DtlsMsg*)XMALLOC(sizeof(DtlsMsg), heap, DYNAMIC_TYPE_DTLS_MSG); + + if (msg != NULL) { + msg->buf = (byte*)XMALLOC(sz + DTLS_HANDSHAKE_HEADER_SZ, + heap, DYNAMIC_TYPE_NONE); + if (msg->buf != NULL) { + msg->next = NULL; + msg->seq = 0; + msg->sz = sz; + msg->fragSz = 0; + msg->msg = msg->buf + DTLS_HANDSHAKE_HEADER_SZ; + } + else { + XFREE(msg, heap, DYNAMIC_TYPE_DTLS_MSG); + msg = NULL; + } + } + + return msg; +} + +void DtlsMsgDelete(DtlsMsg* item, void* heap) +{ + (void)heap; + + if (item != NULL) { + if (item->buf != NULL) + XFREE(item->buf, heap, DYNAMIC_TYPE_NONE); + XFREE(item, heap, DYNAMIC_TYPE_DTLS_MSG); + } +} + + +void DtlsMsgListDelete(DtlsMsg* head, void* heap) +{ + DtlsMsg* next; + while (head) { + next = head->next; + DtlsMsgDelete(head, heap); + head = next; + } +} + + +void DtlsMsgSet(DtlsMsg* msg, word32 seq, const byte* data, byte type, + word32 fragOffset, word32 fragSz) +{ + if (msg != NULL && data != NULL && msg->fragSz <= msg->sz) { + msg->seq = seq; + msg->type = type; + msg->fragSz += fragSz; + /* If fragOffset is zero, this is either a full message that is out + * of order, or the first fragment of a fragmented message. Copy the + * handshake message header as well as the message data. */ + if (fragOffset == 0) + XMEMCPY(msg->buf, data - DTLS_HANDSHAKE_HEADER_SZ, + fragSz + DTLS_HANDSHAKE_HEADER_SZ); + else { + /* If fragOffet is non-zero, this is an additional fragment that + * needs to be copied to its location in the message buffer. Also + * copy the total size of the message over the fragment size. The + * hash routines look at a defragmented message if it had actually + * come across as a single handshake message. */ + XMEMCPY(msg->msg + fragOffset, data, fragSz); + c32to24(msg->sz, msg->msg - DTLS_HANDSHAKE_FRAG_SZ); + } + } +} + + +DtlsMsg* DtlsMsgFind(DtlsMsg* head, word32 seq) +{ + while (head != NULL && head->seq != seq) { + head = head->next; + } + return head; +} + + +DtlsMsg* DtlsMsgStore(DtlsMsg* head, word32 seq, const byte* data, + word32 dataSz, byte type, word32 fragOffset, word32 fragSz, void* heap) +{ + + /* See if seq exists in the list. If it isn't in the list, make + * a new item of size dataSz, copy fragSz bytes from data to msg->msg + * starting at offset fragOffset, and add fragSz to msg->fragSz. If + * the seq is in the list and it isn't full, copy fragSz bytes from + * data to msg->msg starting at offset fragOffset, and add fragSz to + * msg->fragSz. The new item should be inserted into the list in its + * proper position. + * + * 1. Find seq in list, or where seq should go in list. If seq not in + * list, create new item and insert into list. Either case, keep + * pointer to item. + * 2. If msg->fragSz + fragSz < sz, copy data to msg->msg at offset + * fragOffset. Add fragSz to msg->fragSz. + */ + + if (head != NULL) { + DtlsMsg* cur = DtlsMsgFind(head, seq); + if (cur == NULL) { + cur = DtlsMsgNew(dataSz, heap); + if (cur != NULL) { + DtlsMsgSet(cur, seq, data, type, fragOffset, fragSz); + head = DtlsMsgInsert(head, cur); + } + } + else { + DtlsMsgSet(cur, seq, data, type, fragOffset, fragSz); + } + } + else { + head = DtlsMsgNew(dataSz, heap); + DtlsMsgSet(head, seq, data, type, fragOffset, fragSz); + } + + return head; +} + + +/* DtlsMsgInsert() is an in-order insert. */ +DtlsMsg* DtlsMsgInsert(DtlsMsg* head, DtlsMsg* item) +{ + if (head == NULL || item->seq < head->seq) { + item->next = head; + head = item; + } + else if (head->next == NULL) { + head->next = item; + } + else { + DtlsMsg* cur = head->next; + DtlsMsg* prev = head; + while (cur) { + if (item->seq < cur->seq) { + item->next = cur; + prev->next = item; + break; + } + prev = cur; + cur = cur->next; + } + if (cur == NULL) { + prev->next = item; + } + } + + return head; +} + +#endif /* CYASSL_DTLS */ + +#ifndef NO_OLD_TLS + +ProtocolVersion MakeSSLv3(void) +{ + ProtocolVersion pv; + pv.major = SSLv3_MAJOR; + pv.minor = SSLv3_MINOR; + + return pv; +} + +#endif /* NO_OLD_TLS */ + + +#ifdef CYASSL_DTLS + +ProtocolVersion MakeDTLSv1(void) +{ + ProtocolVersion pv; + pv.major = DTLS_MAJOR; + pv.minor = DTLS_MINOR; + + return pv; +} + +ProtocolVersion MakeDTLSv1_2(void) +{ + ProtocolVersion pv; + pv.major = DTLS_MAJOR; + pv.minor = DTLSv1_2_MINOR; + + return pv; +} + +#endif /* CYASSL_DTLS */ + + + + +#ifdef USE_WINDOWS_API + + word32 LowResTimer(void) + { + static int init = 0; + static LARGE_INTEGER freq; + LARGE_INTEGER count; + + if (!init) { + QueryPerformanceFrequency(&freq); + init = 1; + } + + QueryPerformanceCounter(&count); + + return (word32)(count.QuadPart / freq.QuadPart); + } + +#elif defined(HAVE_RTP_SYS) + + #include "rtptime.h" + + word32 LowResTimer(void) + { + return (word32)rtp_get_system_sec(); + } + + +#elif defined(MICRIUM) + + word32 LowResTimer(void) + { + NET_SECURE_OS_TICK clk; + + #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) + clk = NetSecure_OS_TimeGet(); + #endif + return (word32)clk; + } + + +#elif defined(MICROCHIP_TCPIP_V5) + + word32 LowResTimer(void) + { + return (word32) TickGet(); + } + + +#elif defined(MICROCHIP_TCPIP) + + #if defined(MICROCHIP_MPLAB_HARMONY) + + #include + + word32 LowResTimer(void) + { + return (word32) SYS_TMR_TickCountGet(); + } + + #else + + word32 LowResTimer(void) + { + return (word32) SYS_TICK_Get(); + } + + #endif + +#elif defined(FREESCALE_MQX) + + word32 LowResTimer(void) + { + TIME_STRUCT mqxTime; + + _time_get_elapsed(&mqxTime); + + return (word32) mqxTime.SECONDS; + } + + +#elif defined(USER_TICKS) +#if 0 + word32 LowResTimer(void) + { + /* + write your own clock tick function if don't want time(0) + needs second accuracy but doesn't have to correlated to EPOCH + */ + } +#endif +#else /* !USE_WINDOWS_API && !HAVE_RTP_SYS && !MICRIUM && !USER_TICKS */ + + #include + + word32 LowResTimer(void) + { + return (word32)time(0); + } + + +#endif /* USE_WINDOWS_API */ + + +/* add output to md5 and sha handshake hashes, exclude record header */ +static int HashOutput(CYASSL* ssl, const byte* output, int sz, int ivSz) +{ + const byte* adj = output + RECORD_HEADER_SZ + ivSz; + sz -= RECORD_HEADER_SZ; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + adj += DTLS_RECORD_EXTRA; + sz -= DTLS_RECORD_EXTRA; + } +#endif +#ifndef NO_OLD_TLS +#ifndef NO_SHA + ShaUpdate(&ssl->hashSha, adj, sz); +#endif +#ifndef NO_MD5 + Md5Update(&ssl->hashMd5, adj, sz); +#endif +#endif + + if (IsAtLeastTLSv1_2(ssl)) { + int ret; + +#ifndef NO_SHA256 + ret = Sha256Update(&ssl->hashSha256, adj, sz); + if (ret != 0) + return ret; +#endif +#ifdef CYASSL_SHA384 + ret = Sha384Update(&ssl->hashSha384, adj, sz); + if (ret != 0) + return ret; +#endif + } + + return 0; +} + + +/* add input to md5 and sha handshake hashes, include handshake header */ +static int HashInput(CYASSL* ssl, const byte* input, int sz) +{ + const byte* adj = input - HANDSHAKE_HEADER_SZ; + sz += HANDSHAKE_HEADER_SZ; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + adj -= DTLS_HANDSHAKE_EXTRA; + sz += DTLS_HANDSHAKE_EXTRA; + } +#endif + +#ifndef NO_OLD_TLS +#ifndef NO_SHA + ShaUpdate(&ssl->hashSha, adj, sz); +#endif +#ifndef NO_MD5 + Md5Update(&ssl->hashMd5, adj, sz); +#endif +#endif + + if (IsAtLeastTLSv1_2(ssl)) { + int ret; + +#ifndef NO_SHA256 + ret = Sha256Update(&ssl->hashSha256, adj, sz); + if (ret != 0) + return ret; +#endif +#ifdef CYASSL_SHA384 + ret = Sha384Update(&ssl->hashSha384, adj, sz); + if (ret != 0) + return ret; +#endif + } + + return 0; +} + + +/* add record layer header for message */ +static void AddRecordHeader(byte* output, word32 length, byte type, CYASSL* ssl) +{ + RecordLayerHeader* rl; + + /* record layer header */ + rl = (RecordLayerHeader*)output; + rl->type = type; + rl->pvMajor = ssl->version.major; /* type and version same in each */ + rl->pvMinor = ssl->version.minor; + + if (!ssl->options.dtls) + c16toa((word16)length, rl->length); + else { +#ifdef CYASSL_DTLS + DtlsRecordLayerHeader* dtls; + + /* dtls record layer header extensions */ + dtls = (DtlsRecordLayerHeader*)output; + c16toa(ssl->keys.dtls_epoch, dtls->epoch); + c32to48(ssl->keys.dtls_sequence_number++, dtls->sequence_number); + c16toa((word16)length, dtls->length); +#endif + } +} + + +/* add handshake header for message */ +static void AddHandShakeHeader(byte* output, word32 length, byte type, + CYASSL* ssl) +{ + HandShakeHeader* hs; + (void)ssl; + + /* handshake header */ + hs = (HandShakeHeader*)output; + hs->type = type; + c32to24(length, hs->length); /* type and length same for each */ +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + DtlsHandShakeHeader* dtls; + + /* dtls handshake header extensions */ + dtls = (DtlsHandShakeHeader*)output; + c16toa(ssl->keys.dtls_handshake_number++, dtls->message_seq); + c32to24(0, dtls->fragment_offset); + c32to24(length, dtls->fragment_length); + } +#endif +} + + +/* add both headers for handshake message */ +static void AddHeaders(byte* output, word32 length, byte type, CYASSL* ssl) +{ + if (!ssl->options.dtls) { + AddRecordHeader(output, length + HANDSHAKE_HEADER_SZ, handshake, ssl); + AddHandShakeHeader(output + RECORD_HEADER_SZ, length, type, ssl); + } +#ifdef CYASSL_DTLS + else { + AddRecordHeader(output, length+DTLS_HANDSHAKE_HEADER_SZ, handshake,ssl); + AddHandShakeHeader(output + DTLS_RECORD_HEADER_SZ, length, type, ssl); + } +#endif +} + + +/* return bytes received, -1 on error */ +static int Receive(CYASSL* ssl, byte* buf, word32 sz) +{ + int recvd; + + if (ssl->ctx->CBIORecv == NULL) { + CYASSL_MSG("Your IO Recv callback is null, please set"); + return -1; + } + +retry: + recvd = ssl->ctx->CBIORecv(ssl, (char *)buf, (int)sz, ssl->IOCB_ReadCtx); + if (recvd < 0) + switch (recvd) { + case CYASSL_CBIO_ERR_GENERAL: /* general/unknown error */ + return -1; + + case CYASSL_CBIO_ERR_WANT_READ: /* want read, would block */ + return WANT_READ; + + case CYASSL_CBIO_ERR_CONN_RST: /* connection reset */ + #ifdef USE_WINDOWS_API + if (ssl->options.dtls) { + goto retry; + } + #endif + ssl->options.connReset = 1; + return -1; + + case CYASSL_CBIO_ERR_ISR: /* interrupt */ + /* see if we got our timeout */ + #ifdef CYASSL_CALLBACKS + if (ssl->toInfoOn) { + struct itimerval timeout; + getitimer(ITIMER_REAL, &timeout); + if (timeout.it_value.tv_sec == 0 && + timeout.it_value.tv_usec == 0) { + XSTRNCPY(ssl->timeoutInfo.timeoutName, + "recv() timeout", MAX_TIMEOUT_NAME_SZ); + CYASSL_MSG("Got our timeout"); + return WANT_READ; + } + } + #endif + goto retry; + + case CYASSL_CBIO_ERR_CONN_CLOSE: /* peer closed connection */ + ssl->options.isClosed = 1; + return -1; + + case CYASSL_CBIO_ERR_TIMEOUT: +#ifdef CYASSL_DTLS + if (DtlsPoolTimeout(ssl) == 0 && DtlsPoolSend(ssl) == 0) + goto retry; + else +#endif + return -1; + + default: + return recvd; + } + + return recvd; +} + + +/* Switch dynamic output buffer back to static, buffer is assumed clear */ +void ShrinkOutputBuffer(CYASSL* ssl) +{ + CYASSL_MSG("Shrinking output buffer\n"); + XFREE(ssl->buffers.outputBuffer.buffer - ssl->buffers.outputBuffer.offset, + ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); + ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer; + ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN; + ssl->buffers.outputBuffer.dynamicFlag = 0; + ssl->buffers.outputBuffer.offset = 0; +} + + +/* Switch dynamic input buffer back to static, keep any remaining input */ +/* forced free means cleaning up */ +void ShrinkInputBuffer(CYASSL* ssl, int forcedFree) +{ + int usedLength = ssl->buffers.inputBuffer.length - + ssl->buffers.inputBuffer.idx; + if (!forcedFree && usedLength > STATIC_BUFFER_LEN) + return; + + CYASSL_MSG("Shrinking input buffer\n"); + + if (!forcedFree && usedLength) + XMEMCPY(ssl->buffers.inputBuffer.staticBuffer, + ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx, + usedLength); + + XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset, + ssl->heap, DYNAMIC_TYPE_IN_BUFFER); + ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer; + ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN; + ssl->buffers.inputBuffer.dynamicFlag = 0; + ssl->buffers.inputBuffer.offset = 0; + ssl->buffers.inputBuffer.idx = 0; + ssl->buffers.inputBuffer.length = usedLength; +} + + +int SendBuffered(CYASSL* ssl) +{ + if (ssl->ctx->CBIOSend == NULL) { + CYASSL_MSG("Your IO Send callback is null, please set"); + return SOCKET_ERROR_E; + } + + while (ssl->buffers.outputBuffer.length > 0) { + int sent = ssl->ctx->CBIOSend(ssl, + (char*)ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.idx, + (int)ssl->buffers.outputBuffer.length, + ssl->IOCB_WriteCtx); + if (sent < 0) { + switch (sent) { + + case CYASSL_CBIO_ERR_WANT_WRITE: /* would block */ + return WANT_WRITE; + + case CYASSL_CBIO_ERR_CONN_RST: /* connection reset */ + ssl->options.connReset = 1; + break; + + case CYASSL_CBIO_ERR_ISR: /* interrupt */ + /* see if we got our timeout */ + #ifdef CYASSL_CALLBACKS + if (ssl->toInfoOn) { + struct itimerval timeout; + getitimer(ITIMER_REAL, &timeout); + if (timeout.it_value.tv_sec == 0 && + timeout.it_value.tv_usec == 0) { + XSTRNCPY(ssl->timeoutInfo.timeoutName, + "send() timeout", MAX_TIMEOUT_NAME_SZ); + CYASSL_MSG("Got our timeout"); + return WANT_WRITE; + } + } + #endif + continue; + + case CYASSL_CBIO_ERR_CONN_CLOSE: /* epipe / conn closed */ + ssl->options.connReset = 1; /* treat same as reset */ + break; + + default: + return SOCKET_ERROR_E; + } + + return SOCKET_ERROR_E; + } + + ssl->buffers.outputBuffer.idx += sent; + ssl->buffers.outputBuffer.length -= sent; + } + + ssl->buffers.outputBuffer.idx = 0; + + if (ssl->buffers.outputBuffer.dynamicFlag) + ShrinkOutputBuffer(ssl); + + return 0; +} + + +/* Grow the output buffer */ +static INLINE int GrowOutputBuffer(CYASSL* ssl, int size) +{ + byte* tmp; + byte hdrSz = ssl->options.dtls ? DTLS_RECORD_HEADER_SZ : + RECORD_HEADER_SZ; + byte align = CYASSL_GENERAL_ALIGNMENT; + /* the encrypted data will be offset from the front of the buffer by + the header, if the user wants encrypted alignment they need + to define their alignment requirement */ + + if (align) { + while (align < hdrSz) + align *= 2; + } + + tmp = (byte*) XMALLOC(size + ssl->buffers.outputBuffer.length + align, + ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); + CYASSL_MSG("growing output buffer\n"); + + if (!tmp) return MEMORY_E; + if (align) + tmp += align - hdrSz; + + if (ssl->buffers.outputBuffer.length) + XMEMCPY(tmp, ssl->buffers.outputBuffer.buffer, + ssl->buffers.outputBuffer.length); + + if (ssl->buffers.outputBuffer.dynamicFlag) + XFREE(ssl->buffers.outputBuffer.buffer - + ssl->buffers.outputBuffer.offset, ssl->heap, + DYNAMIC_TYPE_OUT_BUFFER); + ssl->buffers.outputBuffer.dynamicFlag = 1; + if (align) + ssl->buffers.outputBuffer.offset = align - hdrSz; + else + ssl->buffers.outputBuffer.offset = 0; + ssl->buffers.outputBuffer.buffer = tmp; + ssl->buffers.outputBuffer.bufferSize = size + + ssl->buffers.outputBuffer.length; + return 0; +} + + +/* Grow the input buffer, should only be to read cert or big app data */ +int GrowInputBuffer(CYASSL* ssl, int size, int usedLength) +{ + byte* tmp; + byte hdrSz = DTLS_RECORD_HEADER_SZ; + byte align = ssl->options.dtls ? CYASSL_GENERAL_ALIGNMENT : 0; + /* the encrypted data will be offset from the front of the buffer by + the dtls record header, if the user wants encrypted alignment they need + to define their alignment requirement. in tls we read record header + to get size of record and put actual data back at front, so don't need */ + + if (align) { + while (align < hdrSz) + align *= 2; + } + tmp = (byte*) XMALLOC(size + usedLength + align, ssl->heap, + DYNAMIC_TYPE_IN_BUFFER); + CYASSL_MSG("growing input buffer\n"); + + if (!tmp) return MEMORY_E; + if (align) + tmp += align - hdrSz; + + if (usedLength) + XMEMCPY(tmp, ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, usedLength); + + if (ssl->buffers.inputBuffer.dynamicFlag) + XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset, + ssl->heap,DYNAMIC_TYPE_IN_BUFFER); + + ssl->buffers.inputBuffer.dynamicFlag = 1; + if (align) + ssl->buffers.inputBuffer.offset = align - hdrSz; + else + ssl->buffers.inputBuffer.offset = 0; + ssl->buffers.inputBuffer.buffer = tmp; + ssl->buffers.inputBuffer.bufferSize = size + usedLength; + ssl->buffers.inputBuffer.idx = 0; + ssl->buffers.inputBuffer.length = usedLength; + + return 0; +} + + +/* check available size into output buffer, make room if needed */ +int CheckAvailableSize(CYASSL *ssl, int size) +{ + if (ssl->buffers.outputBuffer.bufferSize - ssl->buffers.outputBuffer.length + < (word32)size) { + if (GrowOutputBuffer(ssl, size) < 0) + return MEMORY_E; + } + + return 0; +} + + +/* do all verify and sanity checks on record header */ +static int GetRecordHeader(CYASSL* ssl, const byte* input, word32* inOutIdx, + RecordLayerHeader* rh, word16 *size) +{ + if (!ssl->options.dtls) { + XMEMCPY(rh, input + *inOutIdx, RECORD_HEADER_SZ); + *inOutIdx += RECORD_HEADER_SZ; + ato16(rh->length, size); + } + else { +#ifdef CYASSL_DTLS + /* type and version in same sport */ + XMEMCPY(rh, input + *inOutIdx, ENUM_LEN + VERSION_SZ); + *inOutIdx += ENUM_LEN + VERSION_SZ; + ato16(input + *inOutIdx, &ssl->keys.dtls_state.curEpoch); + *inOutIdx += 4; /* advance past epoch, skip first 2 seq bytes for now */ + ato32(input + *inOutIdx, &ssl->keys.dtls_state.curSeq); + *inOutIdx += 4; /* advance past rest of seq */ + ato16(input + *inOutIdx, size); + *inOutIdx += LENGTH_SZ; +#endif + } + + /* catch version mismatch */ + if (rh->pvMajor != ssl->version.major || rh->pvMinor != ssl->version.minor){ + if (ssl->options.side == CYASSL_SERVER_END && + ssl->options.acceptState == ACCEPT_BEGIN) + CYASSL_MSG("Client attempting to connect with different version"); + else if (ssl->options.side == CYASSL_CLIENT_END && + ssl->options.downgrade && + ssl->options.connectState < FIRST_REPLY_DONE) + CYASSL_MSG("Server attempting to accept with different version"); + else { + CYASSL_MSG("SSL version error"); + return VERSION_ERROR; /* only use requested version */ + } + } + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if (DtlsCheckWindow(&ssl->keys.dtls_state) != 1) + return SEQUENCE_ERROR; + } +#endif + + /* record layer length check */ +#ifdef HAVE_MAX_FRAGMENT + if (*size > (ssl->max_fragment + MAX_COMP_EXTRA + MAX_MSG_EXTRA)) + return LENGTH_ERROR; +#else + if (*size > (MAX_RECORD_SIZE + MAX_COMP_EXTRA + MAX_MSG_EXTRA)) + return LENGTH_ERROR; +#endif + + /* verify record type here as well */ + switch (rh->type) { + case handshake: + case change_cipher_spec: + case application_data: + case alert: + break; + case no_type: + default: + CYASSL_MSG("Unknown Record Type"); + return UNKNOWN_RECORD_TYPE; + } + + /* haven't decrypted this record yet */ + ssl->keys.decryptedCur = 0; + + return 0; +} + + +static int GetHandShakeHeader(CYASSL* ssl, const byte* input, word32* inOutIdx, + byte *type, word32 *size) +{ + const byte *ptr = input + *inOutIdx; + (void)ssl; + *inOutIdx += HANDSHAKE_HEADER_SZ; + + *type = ptr[0]; + c24to32(&ptr[1], size); + + return 0; +} + + +#ifdef CYASSL_DTLS +static int GetDtlsHandShakeHeader(CYASSL* ssl, const byte* input, + word32* inOutIdx, byte *type, word32 *size, + word32 *fragOffset, word32 *fragSz) +{ + word32 idx = *inOutIdx; + + *inOutIdx += HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA; + + *type = input[idx++]; + c24to32(input + idx, size); + idx += BYTE3_LEN; + + ato16(input + idx, &ssl->keys.dtls_peer_handshake_number); + idx += DTLS_HANDSHAKE_SEQ_SZ; + + c24to32(input + idx, fragOffset); + idx += DTLS_HANDSHAKE_FRAG_SZ; + c24to32(input + idx, fragSz); + + return 0; +} +#endif + + +#ifndef NO_OLD_TLS +/* fill with MD5 pad size since biggest required */ +static const byte PAD1[PAD_MD5] = + { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + }; +static const byte PAD2[PAD_MD5] = + { 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, + 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, + 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, + 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, + 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, + 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c + }; + +/* calculate MD5 hash for finished */ +static void BuildMD5(CYASSL* ssl, Hashes* hashes, const byte* sender) +{ + byte md5_result[MD5_DIGEST_SIZE]; + + /* make md5 inner */ + Md5Update(&ssl->hashMd5, sender, SIZEOF_SENDER); + Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); + Md5Update(&ssl->hashMd5, PAD1, PAD_MD5); + Md5Final(&ssl->hashMd5, md5_result); + + /* make md5 outer */ + Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); + Md5Update(&ssl->hashMd5, PAD2, PAD_MD5); + Md5Update(&ssl->hashMd5, md5_result, MD5_DIGEST_SIZE); + + Md5Final(&ssl->hashMd5, hashes->md5); +} + + +/* calculate SHA hash for finished */ +static void BuildSHA(CYASSL* ssl, Hashes* hashes, const byte* sender) +{ + byte sha_result[SHA_DIGEST_SIZE]; + + /* make sha inner */ + ShaUpdate(&ssl->hashSha, sender, SIZEOF_SENDER); + ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); + ShaUpdate(&ssl->hashSha, PAD1, PAD_SHA); + ShaFinal(&ssl->hashSha, sha_result); + + /* make sha outer */ + ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); + ShaUpdate(&ssl->hashSha, PAD2, PAD_SHA); + ShaUpdate(&ssl->hashSha, sha_result, SHA_DIGEST_SIZE); + + ShaFinal(&ssl->hashSha, hashes->sha); +} +#endif + + +static int BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) +{ + /* store current states, building requires get_digest which resets state */ +#ifndef NO_OLD_TLS +#ifndef NO_MD5 + Md5 md5 = ssl->hashMd5; +#endif +#ifndef NO_SHA + Sha sha = ssl->hashSha; +#endif +#endif +#ifndef NO_SHA256 + Sha256 sha256 = ssl->hashSha256; +#endif +#ifdef CYASSL_SHA384 + Sha384 sha384 = ssl->hashSha384; +#endif + + int ret = 0; + +#ifndef NO_TLS + if (ssl->options.tls) { + ret = BuildTlsFinished(ssl, hashes, sender); + } +#endif +#ifndef NO_OLD_TLS + if (!ssl->options.tls) { + BuildMD5(ssl, hashes, sender); + BuildSHA(ssl, hashes, sender); + } +#endif + + /* restore */ +#ifndef NO_OLD_TLS + #ifndef NO_MD5 + ssl->hashMd5 = md5; + #endif + #ifndef NO_SHA + ssl->hashSha = sha; + #endif +#endif + if (IsAtLeastTLSv1_2(ssl)) { + #ifndef NO_SHA256 + ssl->hashSha256 = sha256; + #endif + #ifdef CYASSL_SHA384 + ssl->hashSha384 = sha384; + #endif + } + + return ret; +} + + +#ifndef NO_CERTS + + +/* Match names with wildcards, each wildcard can represent a single name + component or fragment but not mulitple names, i.e., + *.z.com matches y.z.com but not x.y.z.com + + return 1 on success */ +static int MatchDomainName(const char* pattern, int len, const char* str) +{ + char p, s; + + if (pattern == NULL || str == NULL || len <= 0) + return 0; + + while (len > 0) { + + p = (char)XTOLOWER(*pattern++); + if (p == 0) + break; + + if (p == '*') { + while (--len > 0 && (p = (char)XTOLOWER(*pattern++)) == '*') + ; + + if (len == 0) + p = '\0'; + + while ( (s = (char)XTOLOWER(*str)) != '\0') { + if (s == p) + break; + if (s == '.') + return 0; + str++; + } + } + else { + if (p != (char)XTOLOWER(*str)) + return 0; + } + + if (*str != '\0') + str++; + + if (len > 0) + len--; + } + + return *str == '\0'; +} + + +/* try to find an altName match to domain, return 1 on success */ +static int CheckAltNames(DecodedCert* dCert, char* domain) +{ + int match = 0; + DNS_entry* altName = NULL; + + CYASSL_MSG("Checking AltNames"); + + if (dCert) + altName = dCert->altNames; + + while (altName) { + CYASSL_MSG(" individual AltName check"); + + if (MatchDomainName(altName->name,(int)XSTRLEN(altName->name), domain)){ + match = 1; + break; + } + + altName = altName->next; + } + + return match; +} + + +#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) + +/* Copy parts X509 needs from Decoded cert, 0 on success */ +int CopyDecodedToX509(CYASSL_X509* x509, DecodedCert* dCert) +{ + int ret = 0; + + if (x509 == NULL || dCert == NULL) + return BAD_FUNC_ARG; + + x509->version = dCert->version + 1; + + XSTRNCPY(x509->issuer.name, dCert->issuer, ASN_NAME_MAX); + x509->issuer.name[ASN_NAME_MAX - 1] = '\0'; + x509->issuer.sz = (int)XSTRLEN(x509->issuer.name) + 1; +#ifdef OPENSSL_EXTRA + if (dCert->issuerName.fullName != NULL) { + XMEMCPY(&x509->issuer.fullName, + &dCert->issuerName, sizeof(DecodedName)); + x509->issuer.fullName.fullName = (char*)XMALLOC( + dCert->issuerName.fullNameLen, NULL, DYNAMIC_TYPE_X509); + if (x509->issuer.fullName.fullName != NULL) + XMEMCPY(x509->issuer.fullName.fullName, + dCert->issuerName.fullName, dCert->issuerName.fullNameLen); + } +#endif /* OPENSSL_EXTRA */ + + XSTRNCPY(x509->subject.name, dCert->subject, ASN_NAME_MAX); + x509->subject.name[ASN_NAME_MAX - 1] = '\0'; + x509->subject.sz = (int)XSTRLEN(x509->subject.name) + 1; +#ifdef OPENSSL_EXTRA + if (dCert->subjectName.fullName != NULL) { + XMEMCPY(&x509->subject.fullName, + &dCert->subjectName, sizeof(DecodedName)); + x509->subject.fullName.fullName = (char*)XMALLOC( + dCert->subjectName.fullNameLen, NULL, DYNAMIC_TYPE_X509); + if (x509->subject.fullName.fullName != NULL) + XMEMCPY(x509->subject.fullName.fullName, + dCert->subjectName.fullName, dCert->subjectName.fullNameLen); + } +#endif /* OPENSSL_EXTRA */ + + XMEMCPY(x509->serial, dCert->serial, EXTERNAL_SERIAL_SIZE); + x509->serialSz = dCert->serialSz; + if (dCert->subjectCNLen < ASN_NAME_MAX) { + XMEMCPY(x509->subjectCN, dCert->subjectCN, dCert->subjectCNLen); + x509->subjectCN[dCert->subjectCNLen] = '\0'; + } + else + x509->subjectCN[0] = '\0'; + +#ifdef CYASSL_SEP + { + int minSz = min(dCert->deviceTypeSz, EXTERNAL_SERIAL_SIZE); + if (minSz > 0) { + x509->deviceTypeSz = minSz; + XMEMCPY(x509->deviceType, dCert->deviceType, minSz); + } + else + x509->deviceTypeSz = 0; + minSz = min(dCert->hwTypeSz, EXTERNAL_SERIAL_SIZE); + if (minSz != 0) { + x509->hwTypeSz = minSz; + XMEMCPY(x509->hwType, dCert->hwType, minSz); + } + else + x509->hwTypeSz = 0; + minSz = min(dCert->hwSerialNumSz, EXTERNAL_SERIAL_SIZE); + if (minSz != 0) { + x509->hwSerialNumSz = minSz; + XMEMCPY(x509->hwSerialNum, dCert->hwSerialNum, minSz); + } + else + x509->hwSerialNumSz = 0; + } +#endif /* CYASSL_SEP */ + { + int minSz = min(dCert->beforeDateLen, MAX_DATE_SZ); + if (minSz != 0) { + x509->notBeforeSz = minSz; + XMEMCPY(x509->notBefore, dCert->beforeDate, minSz); + } + else + x509->notBeforeSz = 0; + minSz = min(dCert->afterDateLen, MAX_DATE_SZ); + if (minSz != 0) { + x509->notAfterSz = minSz; + XMEMCPY(x509->notAfter, dCert->afterDate, minSz); + } + else + x509->notAfterSz = 0; + } + + if (dCert->publicKey != NULL && dCert->pubKeySize != 0) { + x509->pubKey.buffer = (byte*)XMALLOC( + dCert->pubKeySize, NULL, DYNAMIC_TYPE_PUBLIC_KEY); + if (x509->pubKey.buffer != NULL) { + x509->pubKeyOID = dCert->keyOID; + x509->pubKey.length = dCert->pubKeySize; + XMEMCPY(x509->pubKey.buffer, dCert->publicKey, dCert->pubKeySize); + } + else + ret = MEMORY_E; + } + + if (dCert->signature != NULL && dCert->sigLength != 0) { + x509->sig.buffer = (byte*)XMALLOC( + dCert->sigLength, NULL, DYNAMIC_TYPE_SIGNATURE); + if (x509->sig.buffer == NULL) { + ret = MEMORY_E; + } + else { + XMEMCPY(x509->sig.buffer, dCert->signature, dCert->sigLength); + x509->sig.length = dCert->sigLength; + x509->sigOID = dCert->signatureOID; + } + } + + /* store cert for potential retrieval */ + x509->derCert.buffer = (byte*)XMALLOC(dCert->maxIdx, NULL, + DYNAMIC_TYPE_CERT); + if (x509->derCert.buffer == NULL) { + ret = MEMORY_E; + } + else { + XMEMCPY(x509->derCert.buffer, dCert->source, dCert->maxIdx); + x509->derCert.length = dCert->maxIdx; + } + + x509->altNames = dCert->altNames; + dCert->altNames = NULL; /* takes ownership */ + x509->altNamesNext = x509->altNames; /* index hint */ + + x509->isCa = dCert->isCA; +#ifdef OPENSSL_EXTRA + x509->pathLength = dCert->pathLength; + x509->keyUsage = dCert->extKeyUsage; + + x509->basicConstSet = dCert->extBasicConstSet; + x509->basicConstCrit = dCert->extBasicConstCrit; + x509->basicConstPlSet = dCert->extBasicConstPlSet; + x509->subjAltNameSet = dCert->extSubjAltNameSet; + x509->subjAltNameCrit = dCert->extSubjAltNameCrit; + x509->authKeyIdSet = dCert->extAuthKeyIdSet; + x509->authKeyIdCrit = dCert->extAuthKeyIdCrit; + if (dCert->extAuthKeyIdSrc != NULL && dCert->extAuthKeyIdSz != 0) { + x509->authKeyId = (byte*)XMALLOC(dCert->extAuthKeyIdSz, NULL, 0); + if (x509->authKeyId != NULL) { + XMEMCPY(x509->authKeyId, + dCert->extAuthKeyIdSrc, dCert->extAuthKeyIdSz); + x509->authKeyIdSz = dCert->extAuthKeyIdSz; + } + else + ret = MEMORY_E; + } + x509->subjKeyIdSet = dCert->extSubjKeyIdSet; + x509->subjKeyIdCrit = dCert->extSubjKeyIdCrit; + if (dCert->extSubjKeyIdSrc != NULL && dCert->extSubjKeyIdSz != 0) { + x509->subjKeyId = (byte*)XMALLOC(dCert->extSubjKeyIdSz, NULL, 0); + if (x509->subjKeyId != NULL) { + XMEMCPY(x509->subjKeyId, + dCert->extSubjKeyIdSrc, dCert->extSubjKeyIdSz); + x509->subjKeyIdSz = dCert->extSubjKeyIdSz; + } + else + ret = MEMORY_E; + } + x509->keyUsageSet = dCert->extKeyUsageSet; + x509->keyUsageCrit = dCert->extKeyUsageCrit; + #ifdef CYASSL_SEP + x509->certPolicySet = dCert->extCertPolicySet; + x509->certPolicyCrit = dCert->extCertPolicyCrit; + #endif /* CYASSL_SEP */ +#endif /* OPENSSL_EXTRA */ +#ifdef HAVE_ECC + x509->pkCurveOID = dCert->pkCurveOID; +#endif /* HAVE_ECC */ + + return ret; +} + +#endif /* KEEP_PEER_CERT || SESSION_CERTS */ + + +static int DoCertificate(CYASSL* ssl, byte* input, word32* inOutIdx, + word32 size) +{ + word32 listSz, begin = *inOutIdx; + int ret = 0; + int anyError = 0; + int totalCerts = 0; /* number of certs in certs buffer */ + int count; + char domain[ASN_NAME_MAX]; + buffer certs[MAX_CHAIN_DEPTH]; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("Certificate", &ssl->handShakeInfo); + if (ssl->toInfoOn) AddLateName("Certificate", &ssl->timeoutInfo); + #endif + + if ((*inOutIdx - begin) + OPAQUE24_LEN > size) + return BUFFER_ERROR; + + c24to32(input + *inOutIdx, &listSz); + *inOutIdx += OPAQUE24_LEN; + +#ifdef HAVE_MAX_FRAGMENT + if (listSz > ssl->max_fragment) + return BUFFER_E; +#else + if (listSz > MAX_RECORD_SIZE) + return BUFFER_E; +#endif + + if ((*inOutIdx - begin) + listSz != size) + return BUFFER_ERROR; + + CYASSL_MSG("Loading peer's cert chain"); + /* first put cert chain into buffer so can verify top down + we're sent bottom up */ + while (listSz) { + word32 certSz; + + if (totalCerts >= MAX_CHAIN_DEPTH) + return MAX_CHAIN_ERROR; + + if ((*inOutIdx - begin) + OPAQUE24_LEN > size) + return BUFFER_ERROR; + + c24to32(input + *inOutIdx, &certSz); + *inOutIdx += OPAQUE24_LEN; + + if ((*inOutIdx - begin) + certSz > size) + return BUFFER_ERROR; + + certs[totalCerts].length = certSz; + certs[totalCerts].buffer = input + *inOutIdx; + +#ifdef SESSION_CERTS + if (ssl->session.chain.count < MAX_CHAIN_DEPTH && + certSz < MAX_X509_SIZE) { + ssl->session.chain.certs[ssl->session.chain.count].length = certSz; + XMEMCPY(ssl->session.chain.certs[ssl->session.chain.count].buffer, + input + *inOutIdx, certSz); + ssl->session.chain.count++; + } else { + CYASSL_MSG("Couldn't store chain cert for session"); + } +#endif + + *inOutIdx += certSz; + listSz -= certSz + CERT_HEADER_SZ; + + totalCerts++; + CYASSL_MSG(" Put another cert into chain"); + } + + count = totalCerts; + + /* verify up to peer's first */ + while (count > 1) { + buffer myCert = certs[count - 1]; + DecodedCert dCert; + byte* subjectHash; + + InitDecodedCert(&dCert, myCert.buffer, myCert.length, ssl->heap); + ret = ParseCertRelative(&dCert, CERT_TYPE, !ssl->options.verifyNone, + ssl->ctx->cm); + #ifndef NO_SKID + subjectHash = dCert.extSubjKeyId; + #else + subjectHash = dCert.subjectHash; + #endif + + if (ret == 0 && dCert.isCA == 0) { + CYASSL_MSG("Chain cert is not a CA, not adding as one"); + } + else if (ret == 0 && ssl->options.verifyNone) { + CYASSL_MSG("Chain cert not verified by option, not adding as CA"); + } + else if (ret == 0 && !AlreadySigner(ssl->ctx->cm, subjectHash)) { + buffer add; + add.length = myCert.length; + add.buffer = (byte*)XMALLOC(myCert.length, ssl->heap, + DYNAMIC_TYPE_CA); + CYASSL_MSG("Adding CA from chain"); + + if (add.buffer == NULL) + return MEMORY_E; + XMEMCPY(add.buffer, myCert.buffer, myCert.length); + + ret = AddCA(ssl->ctx->cm, add, CYASSL_CHAIN_CA, + ssl->ctx->verifyPeer); + if (ret == 1) ret = 0; /* SSL_SUCCESS for external */ + } + else if (ret != 0) { + CYASSL_MSG("Failed to verify CA from chain"); + } + else { + CYASSL_MSG("Verified CA from chain and already had it"); + } + +#ifdef HAVE_CRL + if (ret == 0 && ssl->ctx->cm->crlEnabled && ssl->ctx->cm->crlCheckAll) { + CYASSL_MSG("Doing Non Leaf CRL check"); + ret = CheckCertCRL(ssl->ctx->cm->crl, &dCert); + + if (ret != 0) { + CYASSL_MSG("\tCRL check not ok"); + } + } +#endif /* HAVE_CRL */ + + if (ret != 0 && anyError == 0) + anyError = ret; /* save error from last time */ + + FreeDecodedCert(&dCert); + count--; + } + + /* peer's, may not have one if blank client cert sent by TLSv1.2 */ + if (count) { + buffer myCert = certs[0]; + DecodedCert dCert; + int fatal = 0; + + CYASSL_MSG("Verifying Peer's cert"); + + InitDecodedCert(&dCert, myCert.buffer, myCert.length, ssl->heap); + ret = ParseCertRelative(&dCert, CERT_TYPE, !ssl->options.verifyNone, + ssl->ctx->cm); + if (ret == 0) { + CYASSL_MSG("Verified Peer's cert"); + fatal = 0; + } + else if (ret == ASN_PARSE_E) { + CYASSL_MSG("Got Peer cert ASN PARSE ERROR, fatal"); + fatal = 1; + } + else { + CYASSL_MSG("Failed to verify Peer's cert"); + if (ssl->verifyCallback) { + CYASSL_MSG("\tCallback override available, will continue"); + fatal = 0; + } + else { + CYASSL_MSG("\tNo callback override available, fatal"); + fatal = 1; + } + } + +#ifdef HAVE_OCSP + if (fatal == 0 && ssl->ctx->cm->ocspEnabled) { + ret = CheckCertOCSP(ssl->ctx->cm->ocsp, &dCert); + if (ret != 0) { + CYASSL_MSG("\tOCSP Lookup not ok"); + fatal = 0; + } + } +#endif + +#ifdef HAVE_CRL + if (fatal == 0 && ssl->ctx->cm->crlEnabled) { + int doCrlLookup = 1; + + #ifdef HAVE_OCSP + if (ssl->ctx->cm->ocspEnabled) { + doCrlLookup = (ret == OCSP_CERT_UNKNOWN); + } + #endif /* HAVE_OCSP */ + + if (doCrlLookup) { + CYASSL_MSG("Doing Leaf CRL check"); + ret = CheckCertCRL(ssl->ctx->cm->crl, &dCert); + + if (ret != 0) { + CYASSL_MSG("\tCRL check not ok"); + fatal = 0; + } + } + } + +#endif /* HAVE_CRL */ + +#ifdef KEEP_PEER_CERT + { + /* set X509 format for peer cert even if fatal */ + int copyRet = CopyDecodedToX509(&ssl->peerCert, &dCert); + if (copyRet == MEMORY_E) + fatal = 1; + } +#endif + +#ifndef IGNORE_KEY_EXTENSIONS + if (dCert.extKeyUsageSet) { + if ((ssl->specs.kea == rsa_kea) && + (dCert.extKeyUsage & KEYUSE_KEY_ENCIPHER) == 0) { + ret = KEYUSE_ENCIPHER_E; + } + if ((ssl->specs.sig_algo == rsa_sa_algo || + ssl->specs.sig_algo == ecc_dsa_sa_algo) && + (dCert.extKeyUsage & KEYUSE_DIGITAL_SIG) == 0) { + CYASSL_MSG("KeyUse Digital Sig not set"); + ret = KEYUSE_SIGNATURE_E; + } + } + + if (dCert.extExtKeyUsageSet) { + if (ssl->options.side == CYASSL_CLIENT_END) { + if ((dCert.extExtKeyUsage & + (EXTKEYUSE_ANY | EXTKEYUSE_SERVER_AUTH)) == 0) { + CYASSL_MSG("ExtKeyUse Server Auth not set"); + ret = EXTKEYUSE_AUTH_E; + } + } + else { + if ((dCert.extExtKeyUsage & + (EXTKEYUSE_ANY | EXTKEYUSE_CLIENT_AUTH)) == 0) { + CYASSL_MSG("ExtKeyUse Client Auth not set"); + ret = EXTKEYUSE_AUTH_E; + } + } + } +#endif /* IGNORE_KEY_EXTENSIONS */ + + if (fatal) { + FreeDecodedCert(&dCert); + ssl->error = ret; + return ret; + } + ssl->options.havePeerCert = 1; + + /* store for callback use */ + if (dCert.subjectCNLen < ASN_NAME_MAX) { + XMEMCPY(domain, dCert.subjectCN, dCert.subjectCNLen); + domain[dCert.subjectCNLen] = '\0'; + } + else + domain[0] = '\0'; + + if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) { + if (MatchDomainName(dCert.subjectCN, dCert.subjectCNLen, + (char*)ssl->buffers.domainName.buffer) == 0) { + CYASSL_MSG("DomainName match on common name failed"); + if (CheckAltNames(&dCert, + (char*)ssl->buffers.domainName.buffer) == 0 ) { + CYASSL_MSG("DomainName match on alt names failed too"); + ret = DOMAIN_NAME_MISMATCH; /* try to get peer key still */ + } + } + } + + /* decode peer key */ + switch (dCert.keyOID) { + #ifndef NO_RSA + case RSAk: + { + word32 idx = 0; + if (RsaPublicKeyDecode(dCert.publicKey, &idx, + ssl->peerRsaKey, dCert.pubKeySize) != 0) { + ret = PEER_KEY_ERROR; + } + else { + ssl->peerRsaKeyPresent = 1; + #ifdef HAVE_PK_CALLBACKS + #ifndef NO_RSA + ssl->buffers.peerRsaKey.buffer = + XMALLOC(dCert.pubKeySize, + ssl->heap, DYNAMIC_TYPE_RSA); + if (ssl->buffers.peerRsaKey.buffer == NULL) + ret = MEMORY_ERROR; + else { + XMEMCPY(ssl->buffers.peerRsaKey.buffer, + dCert.publicKey, dCert.pubKeySize); + ssl->buffers.peerRsaKey.length = + dCert.pubKeySize; + } + #endif /* NO_RSA */ + #endif /*HAVE_PK_CALLBACKS */ + } + } + break; + #endif /* NO_RSA */ + #ifdef HAVE_NTRU + case NTRUk: + { + if (dCert.pubKeySize > sizeof(ssl->peerNtruKey)) { + ret = PEER_KEY_ERROR; + } + else { + XMEMCPY(ssl->peerNtruKey, dCert.publicKey, dCert.pubKeySize); + ssl->peerNtruKeyLen = (word16)dCert.pubKeySize; + ssl->peerNtruKeyPresent = 1; + } + } + break; + #endif /* HAVE_NTRU */ + #ifdef HAVE_ECC + case ECDSAk: + { + if (ecc_import_x963(dCert.publicKey, dCert.pubKeySize, + ssl->peerEccDsaKey) != 0) { + ret = PEER_KEY_ERROR; + } + else { + ssl->peerEccDsaKeyPresent = 1; + #ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ssl->buffers.peerEccDsaKey.buffer = + XMALLOC(dCert.pubKeySize, + ssl->heap, DYNAMIC_TYPE_ECC); + if (ssl->buffers.peerEccDsaKey.buffer == NULL) + ret = MEMORY_ERROR; + else { + XMEMCPY(ssl->buffers.peerEccDsaKey.buffer, + dCert.publicKey, dCert.pubKeySize); + ssl->buffers.peerEccDsaKey.length = + dCert.pubKeySize; + } + #endif /* HAVE_ECC */ + #endif /*HAVE_PK_CALLBACKS */ + } + } + break; + #endif /* HAVE_ECC */ + default: + break; + } + + FreeDecodedCert(&dCert); + } + + if (anyError != 0 && ret == 0) + ret = anyError; + + if (ret == 0 && ssl->options.side == CYASSL_CLIENT_END) + ssl->options.serverState = SERVER_CERT_COMPLETE; + + if (ret != 0) { + if (!ssl->options.verifyNone) { + int why = bad_certificate; + if (ret == ASN_AFTER_DATE_E || ret == ASN_BEFORE_DATE_E) + why = certificate_expired; + if (ssl->verifyCallback) { + int ok; + CYASSL_X509_STORE_CTX store; + + store.error = ret; + store.error_depth = totalCerts; + store.discardSessionCerts = 0; + store.domain = domain; + store.userCtx = ssl->verifyCbCtx; +#ifdef KEEP_PEER_CERT + store.current_cert = &ssl->peerCert; +#else + store.current_cert = NULL; +#endif +#ifdef FORTRESS + store.ex_data = ssl; +#endif + ok = ssl->verifyCallback(0, &store); + if (ok) { + CYASSL_MSG("Verify callback overriding error!"); + ret = 0; + } + #ifdef SESSION_CERTS + if (store.discardSessionCerts) { + CYASSL_MSG("Verify callback requested discard sess certs"); + ssl->session.chain.count = 0; + } + #endif + } + if (ret != 0) { + SendAlert(ssl, alert_fatal, why); /* try to send */ + ssl->options.isClosed = 1; + } + } + ssl->error = ret; + } +#ifdef CYASSL_ALWAYS_VERIFY_CB + else { + if (ssl->verifyCallback) { + int ok; + CYASSL_X509_STORE_CTX store; + + store.error = ret; + store.error_depth = totalCerts; + store.discardSessionCerts = 0; + store.domain = domain; + store.userCtx = ssl->verifyCbCtx; +#ifdef KEEP_PEER_CERT + store.current_cert = &ssl->peerCert; +#endif + store.ex_data = ssl; + + ok = ssl->verifyCallback(1, &store); + if (!ok) { + CYASSL_MSG("Verify callback overriding valid certificate!"); + ret = -1; + SendAlert(ssl, alert_fatal, bad_certificate); + ssl->options.isClosed = 1; + } + #ifdef SESSION_CERTS + if (store.discardSessionCerts) { + CYASSL_MSG("Verify callback requested discard sess certs"); + ssl->session.chain.count = 0; + } + #endif + } + } +#endif + + return ret; +} + +#endif /* !NO_CERTS */ + + +static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 size, word32 totalSz) +{ + int ret = 0; + + if (size) /* must be 0 */ + return BUFFER_ERROR; + + if (ssl->keys.encryptionOn) { + byte verify[MAX_DIGEST_SIZE]; + int padSz = ssl->keys.encryptSz - HANDSHAKE_HEADER_SZ - + ssl->specs.hash_size; + + ret = ssl->hmac(ssl, verify, input + *inOutIdx - HANDSHAKE_HEADER_SZ, + HANDSHAKE_HEADER_SZ, handshake, 1); + if (ret != 0) + return ret; + + if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) + padSz -= ssl->specs.block_size; + + /* access beyond input + size should be checked against totalSz */ + if ((word32) (*inOutIdx + ssl->specs.hash_size + padSz) > totalSz) + return INCOMPLETE_DATA; + + /* verify */ + if (XMEMCMP(input + *inOutIdx, verify, ssl->specs.hash_size) != 0) { + CYASSL_MSG(" hello_request verify mac error"); + return VERIFY_MAC_ERROR; + } + + *inOutIdx += ssl->specs.hash_size + padSz; + } + + if (ssl->options.side == CYASSL_SERVER_END) { + SendAlert(ssl, alert_fatal, unexpected_message); /* try */ + return FATAL_ERROR; + } + else + return SendAlert(ssl, alert_warning, no_renegotiation); +} + + +int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, word32 size, + word32 totalSz, int sniff) +{ + word32 finishedSz = (ssl->options.tls ? TLS_FINISHED_SZ : FINISHED_SZ); + + if (finishedSz != size) + return BUFFER_ERROR; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("Finished", &ssl->handShakeInfo); + if (ssl->toInfoOn) AddLateName("Finished", &ssl->timeoutInfo); + #endif + + if (sniff == NO_SNIFF) { + if (XMEMCMP(input + *inOutIdx, &ssl->verifyHashes, size) != 0) { + CYASSL_MSG("Verify finished error on hashes"); + return VERIFY_FINISHED_ERROR; + } + } + + /* increment beyond input + size should be checked against totalSz */ + if (*inOutIdx + size + ssl->keys.padSz > totalSz) + return INCOMPLETE_DATA; + + /* force input exhaustion at ProcessReply consuming padSz */ + *inOutIdx += size + ssl->keys.padSz; + + if (ssl->options.side == CYASSL_CLIENT_END) { + ssl->options.serverState = SERVER_FINISHED_COMPLETE; + if (!ssl->options.resuming) { + ssl->options.handShakeState = HANDSHAKE_DONE; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* Other side has received our Finished, go to next epoch */ + ssl->keys.dtls_epoch++; + ssl->keys.dtls_sequence_number = 1; + } +#endif + } + } + else { + ssl->options.clientState = CLIENT_FINISHED_COMPLETE; + if (ssl->options.resuming) { + ssl->options.handShakeState = HANDSHAKE_DONE; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* Other side has received our Finished, go to next epoch */ + ssl->keys.dtls_epoch++; + ssl->keys.dtls_sequence_number = 1; + } +#endif + } + } + + return 0; +} + + +static int DoHandShakeMsgType(CYASSL* ssl, byte* input, word32* inOutIdx, + byte type, word32 size, word32 totalSz) +{ + int ret = 0; + (void)totalSz; + + CYASSL_ENTER("DoHandShakeMsgType"); + + /* make sure can read the message */ + if (*inOutIdx + size > totalSz) + return INCOMPLETE_DATA; + + ret = HashInput(ssl, input + *inOutIdx, size); + if (ret != 0) + return ret; + +#ifdef CYASSL_CALLBACKS + /* add name later, add on record and handshake header part back on */ + if (ssl->toInfoOn) { + int add = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + AddPacketInfo(0, &ssl->timeoutInfo, input + *inOutIdx - add, + size + add, ssl->heap); + AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo); + } +#endif + + if (ssl->options.handShakeState == HANDSHAKE_DONE && type != hello_request){ + CYASSL_MSG("HandShake message after handshake complete"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + if (ssl->options.side == CYASSL_CLIENT_END && ssl->options.dtls == 0 && + ssl->options.serverState == NULL_STATE && type != server_hello) { + CYASSL_MSG("First server message not server hello"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + if (ssl->options.side == CYASSL_CLIENT_END && ssl->options.dtls && + type == server_hello_done && + ssl->options.serverState < SERVER_HELLO_COMPLETE) { + CYASSL_MSG("Server hello done received before server hello in DTLS"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + if (ssl->options.side == CYASSL_SERVER_END && + ssl->options.clientState == NULL_STATE && type != client_hello) { + CYASSL_MSG("First client message not client hello"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + + switch (type) { + + case hello_request: + CYASSL_MSG("processing hello request"); + ret = DoHelloRequest(ssl, input, inOutIdx, size, totalSz); + break; + +#ifndef NO_CYASSL_CLIENT + case hello_verify_request: + CYASSL_MSG("processing hello verify request"); + ret = DoHelloVerifyRequest(ssl, input,inOutIdx, size); + break; + + case server_hello: + CYASSL_MSG("processing server hello"); + ret = DoServerHello(ssl, input, inOutIdx, size); + break; + +#ifndef NO_CERTS + case certificate_request: + CYASSL_MSG("processing certificate request"); + ret = DoCertificateRequest(ssl, input, inOutIdx, size); + break; +#endif + + case server_key_exchange: + CYASSL_MSG("processing server key exchange"); + ret = DoServerKeyExchange(ssl, input, inOutIdx, size); + break; +#endif + +#ifndef NO_CERTS + case certificate: + CYASSL_MSG("processing certificate"); + ret = DoCertificate(ssl, input, inOutIdx, size); + break; +#endif + + case server_hello_done: + CYASSL_MSG("processing server hello done"); + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerHelloDone", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("ServerHelloDone", &ssl->timeoutInfo); + #endif + ssl->options.serverState = SERVER_HELLODONE_COMPLETE; + break; + + case finished: + CYASSL_MSG("processing finished"); + ret = DoFinished(ssl, input, inOutIdx, size, totalSz, NO_SNIFF); + break; + +#ifndef NO_CYASSL_SERVER + case client_hello: + CYASSL_MSG("processing client hello"); + ret = DoClientHello(ssl, input, inOutIdx, size); + break; + + case client_key_exchange: + CYASSL_MSG("processing client key exchange"); + ret = DoClientKeyExchange(ssl, input, inOutIdx, size); + break; + +#if !defined(NO_RSA) || defined(HAVE_ECC) + case certificate_verify: + CYASSL_MSG("processing certificate verify"); + ret = DoCertificateVerify(ssl, input, inOutIdx, size); + break; +#endif /* !NO_RSA || HAVE_ECC */ + +#endif /* !NO_CYASSL_SERVER */ + + default: + CYASSL_MSG("Unknown handshake message type"); + ret = UNKNOWN_HANDSHAKE_TYPE; + break; + } + + CYASSL_LEAVE("DoHandShakeMsgType()", ret); + return ret; +} + + +static int DoHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx, + word32 totalSz) +{ + byte type; + word32 size; + int ret = 0; + + CYASSL_ENTER("DoHandShakeMsg()"); + + if (GetHandShakeHeader(ssl, input, inOutIdx, &type, &size) != 0) + return PARSE_ERROR; + + ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); + + CYASSL_LEAVE("DoHandShakeMsg()", ret); + return ret; +} + + +#ifdef CYASSL_DTLS + +static INLINE int DtlsCheckWindow(DtlsState* state) +{ + word32 cur; + word32 next; + DtlsSeq window; + + if (state->curEpoch == state->nextEpoch) { + next = state->nextSeq; + window = state->window; + } + else if (state->curEpoch < state->nextEpoch) { + next = state->prevSeq; + window = state->prevWindow; + } + else { + return 0; + } + + cur = state->curSeq; + + if ((next > DTLS_SEQ_BITS) && (cur < next - DTLS_SEQ_BITS)) { + return 0; + } + else if ((cur < next) && (window & (1 << (next - cur - 1)))) { + return 0; + } + + return 1; +} + + +static INLINE int DtlsUpdateWindow(DtlsState* state) +{ + word32 cur; + word32* next; + DtlsSeq* window; + + if (state->curEpoch == state->nextEpoch) { + next = &state->nextSeq; + window = &state->window; + } + else { + next = &state->prevSeq; + window = &state->prevWindow; + } + + cur = state->curSeq; + + if (cur < *next) { + *window |= (1 << (*next - cur - 1)); + } + else { + *window <<= (1 + cur - *next); + *window |= 1; + *next = cur + 1; + } + + return 1; +} + + +static int DtlsMsgDrain(CYASSL* ssl) +{ + DtlsMsg* item = ssl->dtls_msg_list; + int ret = 0; + + /* While there is an item in the store list, and it is the expected + * message, and it is complete, and there hasn't been an error in the + * last messge... */ + while (item != NULL && + ssl->keys.dtls_expected_peer_handshake_number == item->seq && + item->fragSz == item->sz && + ret == 0) { + word32 idx = 0; + ssl->keys.dtls_expected_peer_handshake_number++; + ret = DoHandShakeMsgType(ssl, item->msg, + &idx, item->type, item->sz, item->sz); + ssl->dtls_msg_list = item->next; + DtlsMsgDelete(item, ssl->heap); + item = ssl->dtls_msg_list; + } + + return ret; +} + + +static int DoDtlsHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx, + word32 totalSz) +{ + byte type; + word32 size; + word32 fragOffset, fragSz; + int ret = 0; + + CYASSL_ENTER("DoDtlsHandShakeMsg()"); + if (GetDtlsHandShakeHeader(ssl, input, inOutIdx, &type, + &size, &fragOffset, &fragSz) != 0) + return PARSE_ERROR; + + if (*inOutIdx + fragSz > totalSz) + return INCOMPLETE_DATA; + + /* Check the handshake sequence number first. If out of order, + * add the current message to the list. If the message is in order, + * but it is a fragment, add the current message to the list, then + * check the head of the list to see if it is complete, if so, pop + * it out as the current message. If the message is complete and in + * order, process it. Check the head of the list to see if it is in + * order, if so, process it. (Repeat until list exhausted.) If the + * head is out of order, return for more processing. + */ + if (ssl->keys.dtls_peer_handshake_number > + ssl->keys.dtls_expected_peer_handshake_number) { + /* Current message is out of order. It will get stored in the list. + * Storing also takes care of defragmentation. */ + ssl->dtls_msg_list = DtlsMsgStore(ssl->dtls_msg_list, + ssl->keys.dtls_peer_handshake_number, input + *inOutIdx, + size, type, fragOffset, fragSz, ssl->heap); + *inOutIdx += fragSz; + ret = 0; + } + else if (ssl->keys.dtls_peer_handshake_number < + ssl->keys.dtls_expected_peer_handshake_number) { + /* Already saw this message and processed it. It can be ignored. */ + *inOutIdx += fragSz; + ret = 0; + } + else if (fragSz < size) { + /* Since this branch is in order, but fragmented, dtls_msg_list will be + * pointing to the message with this fragment in it. Check it to see + * if it is completed. */ + ssl->dtls_msg_list = DtlsMsgStore(ssl->dtls_msg_list, + ssl->keys.dtls_peer_handshake_number, input + *inOutIdx, + size, type, fragOffset, fragSz, ssl->heap); + *inOutIdx += fragSz; + ret = 0; + if (ssl->dtls_msg_list != NULL && + ssl->dtls_msg_list->fragSz >= ssl->dtls_msg_list->sz) + ret = DtlsMsgDrain(ssl); + } + else { + /* This branch is in order next, and a complete message. */ + ssl->keys.dtls_expected_peer_handshake_number++; + ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); + if (ret == 0 && ssl->dtls_msg_list != NULL) + ret = DtlsMsgDrain(ssl); + } + + CYASSL_LEAVE("DoDtlsHandShakeMsg()", ret); + return ret; +} +#endif + + +static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) +{ + if (verify) + return ssl->keys.peer_sequence_number++; + else + return ssl->keys.sequence_number++; +} + + +#ifdef HAVE_AEAD +static INLINE void AeadIncrementExpIV(CYASSL* ssl) +{ + int i; + for (i = AEAD_EXP_IV_SZ-1; i >= 0; i--) { + if (++ssl->keys.aead_exp_IV[i]) return; + } +} +#endif + + +static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz) +{ + (void)out; + (void)input; + (void)sz; + + if (ssl->encrypt.setup == 0) { + CYASSL_MSG("Encrypt ciphers not setup"); + return ENCRYPT_ERROR; + } + + switch (ssl->specs.bulk_cipher_algorithm) { + #ifdef BUILD_ARC4 + case cyassl_rc4: + Arc4Process(ssl->encrypt.arc4, out, input, sz); + break; + #endif + + #ifdef BUILD_DES3 + case cyassl_triple_des: + return Des3_CbcEncrypt(ssl->encrypt.des3, out, input, sz); + #endif + + #ifdef BUILD_AES + case cyassl_aes: + return AesCbcEncrypt(ssl->encrypt.aes, out, input, sz); + #endif + + #ifdef BUILD_AESGCM + case cyassl_aes_gcm: + { + byte additional[AES_BLOCK_SIZE]; + byte nonce[AEAD_NONCE_SZ]; + const byte* additionalSrc = input - 5; + + XMEMSET(additional, 0, AES_BLOCK_SIZE); + + /* sequence number field is 64-bits, we only use 32-bits */ + c32toa(GetSEQIncrement(ssl, 0), + additional + AEAD_SEQ_OFFSET); + + /* Store the type, version. Unfortunately, they are in + * the input buffer ahead of the plaintext. */ + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + additionalSrc -= DTLS_HANDSHAKE_EXTRA; + #endif + XMEMCPY(additional + AEAD_TYPE_OFFSET, additionalSrc, 3); + + /* Store the length of the plain text minus the explicit + * IV length minus the authentication tag size. */ + c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + additional + AEAD_LEN_OFFSET); + XMEMCPY(nonce, + ssl->keys.aead_enc_imp_IV, AEAD_IMP_IV_SZ); + XMEMCPY(nonce + AEAD_IMP_IV_SZ, + ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); + AesGcmEncrypt(ssl->encrypt.aes, + out + AEAD_EXP_IV_SZ, input + AEAD_EXP_IV_SZ, + sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + nonce, AEAD_NONCE_SZ, + out + sz - ssl->specs.aead_mac_size, + ssl->specs.aead_mac_size, additional, + AEAD_AUTH_DATA_SZ); + AeadIncrementExpIV(ssl); + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + } + break; + #endif + + #ifdef HAVE_AESCCM + case cyassl_aes_ccm: + { + byte additional[AES_BLOCK_SIZE]; + byte nonce[AEAD_NONCE_SZ]; + const byte* additionalSrc = input - 5; + + XMEMSET(additional, 0, AES_BLOCK_SIZE); + + /* sequence number field is 64-bits, we only use 32-bits */ + c32toa(GetSEQIncrement(ssl, 0), + additional + AEAD_SEQ_OFFSET); + + /* Store the type, version. Unfortunately, they are in + * the input buffer ahead of the plaintext. */ + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + c16toa(ssl->keys.dtls_epoch, additional); + additionalSrc -= DTLS_HANDSHAKE_EXTRA; + } + #endif + XMEMCPY(additional + AEAD_TYPE_OFFSET, additionalSrc, 3); + + /* Store the length of the plain text minus the explicit + * IV length minus the authentication tag size. */ + c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + additional + AEAD_LEN_OFFSET); + XMEMCPY(nonce, + ssl->keys.aead_enc_imp_IV, AEAD_IMP_IV_SZ); + XMEMCPY(nonce + AEAD_IMP_IV_SZ, + ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); + AesCcmEncrypt(ssl->encrypt.aes, + out + AEAD_EXP_IV_SZ, input + AEAD_EXP_IV_SZ, + sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + nonce, AEAD_NONCE_SZ, + out + sz - ssl->specs.aead_mac_size, + ssl->specs.aead_mac_size, + additional, AEAD_AUTH_DATA_SZ); + AeadIncrementExpIV(ssl); + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + + break; + } + #endif + + #ifdef HAVE_CAMELLIA + case cyassl_camellia: + CamelliaCbcEncrypt(ssl->encrypt.cam, out, input, sz); + break; + #endif + + #ifdef HAVE_HC128 + case cyassl_hc128: + return Hc128_Process(ssl->encrypt.hc128, out, input, sz); + #endif + + #ifdef BUILD_RABBIT + case cyassl_rabbit: + return RabbitProcess(ssl->encrypt.rabbit, out, input, sz); + #endif + + #ifdef HAVE_NULL_CIPHER + case cyassl_cipher_null: + if (input != out) { + XMEMMOVE(out, input, sz); + } + break; + #endif + + default: + CYASSL_MSG("CyaSSL Encrypt programming error"); + return ENCRYPT_ERROR; + } + + return 0; +} + + + +static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input, + word16 sz) +{ + (void)plain; + (void)input; + (void)sz; + + if (ssl->decrypt.setup == 0) { + CYASSL_MSG("Decrypt ciphers not setup"); + return DECRYPT_ERROR; + } + + switch (ssl->specs.bulk_cipher_algorithm) { + #ifdef BUILD_ARC4 + case cyassl_rc4: + Arc4Process(ssl->decrypt.arc4, plain, input, sz); + break; + #endif + + #ifdef BUILD_DES3 + case cyassl_triple_des: + return Des3_CbcDecrypt(ssl->decrypt.des3, plain, input, sz); + #endif + + #ifdef BUILD_AES + case cyassl_aes: + return AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz); + #endif + + #ifdef BUILD_AESGCM + case cyassl_aes_gcm: + { + byte additional[AES_BLOCK_SIZE]; + byte nonce[AEAD_NONCE_SZ]; + + XMEMSET(additional, 0, AES_BLOCK_SIZE); + + /* sequence number field is 64-bits, we only use 32-bits */ + c32toa(GetSEQIncrement(ssl, 1), additional + AEAD_SEQ_OFFSET); + + additional[AEAD_TYPE_OFFSET] = ssl->curRL.type; + additional[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor; + additional[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor; + + c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + additional + AEAD_LEN_OFFSET); + XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, AEAD_IMP_IV_SZ); + XMEMCPY(nonce + AEAD_IMP_IV_SZ, input, AEAD_EXP_IV_SZ); + if (AesGcmDecrypt(ssl->decrypt.aes, + plain + AEAD_EXP_IV_SZ, + input + AEAD_EXP_IV_SZ, + sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + nonce, AEAD_NONCE_SZ, + input + sz - ssl->specs.aead_mac_size, + ssl->specs.aead_mac_size, + additional, AEAD_AUTH_DATA_SZ) < 0) { + SendAlert(ssl, alert_fatal, bad_record_mac); + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + return VERIFY_MAC_ERROR; + } + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + break; + } + #endif + + #ifdef HAVE_AESCCM + case cyassl_aes_ccm: + { + byte additional[AES_BLOCK_SIZE]; + byte nonce[AEAD_NONCE_SZ]; + + XMEMSET(additional, 0, AES_BLOCK_SIZE); + + /* sequence number field is 64-bits, we only use 32-bits */ + c32toa(GetSEQIncrement(ssl, 1), additional + AEAD_SEQ_OFFSET); + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + c16toa(ssl->keys.dtls_state.curEpoch, additional); + #endif + + additional[AEAD_TYPE_OFFSET] = ssl->curRL.type; + additional[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor; + additional[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor; + + c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + additional + AEAD_LEN_OFFSET); + XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, AEAD_IMP_IV_SZ); + XMEMCPY(nonce + AEAD_IMP_IV_SZ, input, AEAD_EXP_IV_SZ); + if (AesCcmDecrypt(ssl->decrypt.aes, + plain + AEAD_EXP_IV_SZ, + input + AEAD_EXP_IV_SZ, + sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, + nonce, AEAD_NONCE_SZ, + input + sz - ssl->specs.aead_mac_size, + ssl->specs.aead_mac_size, + additional, AEAD_AUTH_DATA_SZ) < 0) { + SendAlert(ssl, alert_fatal, bad_record_mac); + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + return VERIFY_MAC_ERROR; + } + XMEMSET(nonce, 0, AEAD_NONCE_SZ); + break; + } + #endif + + #ifdef HAVE_CAMELLIA + case cyassl_camellia: + CamelliaCbcDecrypt(ssl->decrypt.cam, plain, input, sz); + break; + #endif + + #ifdef HAVE_HC128 + case cyassl_hc128: + return Hc128_Process(ssl->decrypt.hc128, plain, input, sz); + #endif + + #ifdef BUILD_RABBIT + case cyassl_rabbit: + return RabbitProcess(ssl->decrypt.rabbit, plain, input, sz); + #endif + + #ifdef HAVE_NULL_CIPHER + case cyassl_cipher_null: + if (input != plain) { + XMEMMOVE(plain, input, sz); + } + break; + #endif + + default: + CYASSL_MSG("CyaSSL Decrypt programming error"); + return DECRYPT_ERROR; + } + return 0; +} + + +/* check cipher text size for sanity */ +static int SanityCheckCipherText(CYASSL* ssl, word32 encryptSz) +{ +#ifdef HAVE_TRUNCATED_HMAC + word32 minLength = ssl->truncated_hmac ? TRUNCATED_HMAC_SZ + : ssl->specs.hash_size; +#else + word32 minLength = ssl->specs.hash_size; /* covers stream */ +#endif + + if (ssl->specs.cipher_type == block) { + if (encryptSz % ssl->specs.block_size) { + CYASSL_MSG("Block ciphertext not block size"); + return SANITY_CIPHER_E; + } + + minLength++; /* pad byte */ + + if (ssl->specs.block_size > minLength) + minLength = ssl->specs.block_size; + + if (ssl->options.tls1_1) + minLength += ssl->specs.block_size; /* explicit IV */ + } + else if (ssl->specs.cipher_type == aead) { + minLength = ssl->specs.aead_mac_size + AEAD_EXP_IV_SZ; + /* explicit IV + authTag size */ + } + + if (encryptSz < minLength) { + CYASSL_MSG("Ciphertext not minimum size"); + return SANITY_CIPHER_E; + } + + return 0; +} + + +#ifndef NO_OLD_TLS + +static INLINE void Md5Rounds(int rounds, const byte* data, int sz) +{ + Md5 md5; + int i; + + InitMd5(&md5); + + for (i = 0; i < rounds; i++) + Md5Update(&md5, data, sz); +} + + + +/* do a dummy sha round */ +static INLINE void ShaRounds(int rounds, const byte* data, int sz) +{ + Sha sha; + int i; + + InitSha(&sha); /* no error check on purpose, dummy round */ + + for (i = 0; i < rounds; i++) + ShaUpdate(&sha, data, sz); +} +#endif + + +#ifndef NO_SHA256 + +static INLINE void Sha256Rounds(int rounds, const byte* data, int sz) +{ + Sha256 sha256; + int i; + + InitSha256(&sha256); /* no error check on purpose, dummy round */ + + for (i = 0; i < rounds; i++) { + Sha256Update(&sha256, data, sz); + /* no error check on purpose, dummy round */ + } + +} + +#endif + + +#ifdef CYASSL_SHA384 + +static INLINE void Sha384Rounds(int rounds, const byte* data, int sz) +{ + Sha384 sha384; + int i; + + InitSha384(&sha384); /* no error check on purpose, dummy round */ + + for (i = 0; i < rounds; i++) { + Sha384Update(&sha384, data, sz); + /* no error check on purpose, dummy round */ + } +} + +#endif + + +#ifdef CYASSL_SHA512 + +static INLINE void Sha512Rounds(int rounds, const byte* data, int sz) +{ + Sha512 sha512; + int i; + + InitSha512(&sha512); /* no error check on purpose, dummy round */ + + for (i = 0; i < rounds; i++) { + Sha512Update(&sha512, data, sz); + /* no error check on purpose, dummy round */ + } +} + +#endif + + +#ifdef CYASSL_RIPEMD + +static INLINE void RmdRounds(int rounds, const byte* data, int sz) +{ + RipeMd ripemd; + int i; + + InitRipeMd(&ripemd); + + for (i = 0; i < rounds; i++) + RipeMdUpdate(&ripemd, data, sz); +} + +#endif + + +/* Do dummy rounds */ +static INLINE void DoRounds(int type, int rounds, const byte* data, int sz) +{ + switch (type) { + + case no_mac : + break; + +#ifndef NO_OLD_TLS +#ifndef NO_MD5 + case md5_mac : + Md5Rounds(rounds, data, sz); + break; +#endif + +#ifndef NO_SHA + case sha_mac : + ShaRounds(rounds, data, sz); + break; +#endif +#endif + +#ifndef NO_SHA256 + case sha256_mac : + Sha256Rounds(rounds, data, sz); + break; +#endif + +#ifdef CYASSL_SHA384 + case sha384_mac : + Sha384Rounds(rounds, data, sz); + break; +#endif + +#ifdef CYASSL_SHA512 + case sha512_mac : + Sha512Rounds(rounds, data, sz); + break; +#endif + +#ifdef CYASSL_RIPEMD + case rmd_mac : + RmdRounds(rounds, data, sz); + break; +#endif + + default: + CYASSL_MSG("Bad round type"); + break; + } +} + + +/* do number of compression rounds on dummy data */ +static INLINE void CompressRounds(CYASSL* ssl, int rounds, const byte* dummy) +{ + if (rounds) + DoRounds(ssl->specs.mac_algorithm, rounds, dummy, COMPRESS_LOWER); +} + + +/* check all length bytes for equality, return 0 on success */ +static int ConstantCompare(const byte* a, const byte* b, int length) +{ + int i; + int good = 0; + int bad = 0; + + for (i = 0; i < length; i++) { + if (a[i] == b[i]) + good++; + else + bad++; + } + + if (good == length) + return 0; + else + return 0 - bad; /* compare failed */ +} + + +/* check all length bytes for the pad value, return 0 on success */ +static int PadCheck(const byte* input, byte pad, int length) +{ + int i; + int good = 0; + int bad = 0; + + for (i = 0; i < length; i++) { + if (input[i] == pad) + good++; + else + bad++; + } + + if (good == length) + return 0; + else + return 0 - bad; /* pad check failed */ +} + + +/* get compression extra rounds */ +static INLINE int GetRounds(int pLen, int padLen, int t) +{ + int roundL1 = 1; /* round up flags */ + int roundL2 = 1; + + int L1 = COMPRESS_CONSTANT + pLen - t; + int L2 = COMPRESS_CONSTANT + pLen - padLen - 1 - t; + + L1 -= COMPRESS_UPPER; + L2 -= COMPRESS_UPPER; + + if ( (L1 % COMPRESS_LOWER) == 0) + roundL1 = 0; + if ( (L2 % COMPRESS_LOWER) == 0) + roundL2 = 0; + + L1 /= COMPRESS_LOWER; + L2 /= COMPRESS_LOWER; + + L1 += roundL1; + L2 += roundL2; + + return L1 - L2; +} + + +/* timing resistant pad/verify check, return 0 on success */ +static int TimingPadVerify(CYASSL* ssl, const byte* input, int padLen, int t, + int pLen, int content) +{ + byte verify[MAX_DIGEST_SIZE]; + byte dummy[MAX_PAD_SIZE]; + int ret = 0; + + XMEMSET(dummy, 1, sizeof(dummy)); + + if ( (t + padLen + 1) > pLen) { + CYASSL_MSG("Plain Len not long enough for pad/mac"); + PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE); + ssl->hmac(ssl, verify, input, pLen - t, content, 1); /* still compare */ + ConstantCompare(verify, input + pLen - t, t); + + return VERIFY_MAC_ERROR; + } + + if (PadCheck(input + pLen - (padLen + 1), (byte)padLen, padLen + 1) != 0) { + CYASSL_MSG("PadCheck failed"); + PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1); + ssl->hmac(ssl, verify, input, pLen - t, content, 1); /* still compare */ + ConstantCompare(verify, input + pLen - t, t); + + return VERIFY_MAC_ERROR; + } + + PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1); + ret = ssl->hmac(ssl, verify, input, pLen - padLen - 1 - t, content, 1); + + CompressRounds(ssl, GetRounds(pLen, padLen, t), dummy); + + if (ConstantCompare(verify, input + (pLen - padLen - 1 - t), t) != 0) { + CYASSL_MSG("Verify MAC compare failed"); + return VERIFY_MAC_ERROR; + } + + if (ret != 0) + return VERIFY_MAC_ERROR; + return 0; +} + + +int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx) +{ + word32 msgSz = ssl->keys.encryptSz; + word32 idx = *inOutIdx; + int dataSz; + int ivExtra = 0; + byte* rawData = input + idx; /* keep current for hmac */ +#ifdef HAVE_LIBZ + byte decomp[MAX_RECORD_SIZE + MAX_COMP_EXTRA]; +#endif + + if (ssl->options.handShakeState != HANDSHAKE_DONE) { + CYASSL_MSG("Received App data before handshake complete"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + if (ssl->specs.cipher_type == block) { + if (ssl->options.tls1_1) + ivExtra = ssl->specs.block_size; + } + else if (ssl->specs.cipher_type == aead) { + ivExtra = AEAD_EXP_IV_SZ; + } + + dataSz = msgSz - ivExtra - ssl->keys.padSz; + if (dataSz < 0) { + CYASSL_MSG("App data buffer error, malicious input?"); + return BUFFER_ERROR; + } + + /* read data */ + if (dataSz) { + int rawSz = dataSz; /* keep raw size for idx adjustment */ + +#ifdef HAVE_LIBZ + if (ssl->options.usingCompression) { + dataSz = myDeCompress(ssl, rawData, dataSz, decomp, sizeof(decomp)); + if (dataSz < 0) return dataSz; + } +#endif + idx += rawSz; + + ssl->buffers.clearOutputBuffer.buffer = rawData; + ssl->buffers.clearOutputBuffer.length = dataSz; + } + + idx += ssl->keys.padSz; + +#ifdef HAVE_LIBZ + /* decompress could be bigger, overwrite after verify */ + if (ssl->options.usingCompression) + XMEMMOVE(rawData, decomp, dataSz); +#endif + + *inOutIdx = idx; + return 0; +} + + +/* process alert, return level */ +static int DoAlert(CYASSL* ssl, byte* input, word32* inOutIdx, int* type, + word32 totalSz) +{ + byte level; + byte code; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("Alert", &ssl->handShakeInfo); + if (ssl->toInfoOn) + /* add record header back on to info + 2 byte level, data */ + AddPacketInfo("Alert", &ssl->timeoutInfo, input + *inOutIdx - + RECORD_HEADER_SZ, 2 + RECORD_HEADER_SZ, ssl->heap); + #endif + + /* make sure can read the message */ + if (*inOutIdx + ALERT_SIZE > totalSz) + return BUFFER_E; + + level = input[(*inOutIdx)++]; + code = input[(*inOutIdx)++]; + ssl->alert_history.last_rx.code = code; + ssl->alert_history.last_rx.level = level; + *type = code; + if (level == alert_fatal) { + ssl->options.isClosed = 1; /* Don't send close_notify */ + } + + CYASSL_MSG("Got alert"); + if (*type == close_notify) { + CYASSL_MSG(" close notify"); + ssl->options.closeNotify = 1; + } + CYASSL_ERROR(*type); + + if (ssl->keys.encryptionOn) { + if (*inOutIdx + ssl->keys.padSz > totalSz) + return BUFFER_E; + *inOutIdx += ssl->keys.padSz; + } + + return level; +} + +static int GetInputData(CYASSL *ssl, word32 size) +{ + int in; + int inSz; + int maxLength; + int usedLength; + int dtlsExtra = 0; + + + /* check max input length */ + usedLength = ssl->buffers.inputBuffer.length - ssl->buffers.inputBuffer.idx; + maxLength = ssl->buffers.inputBuffer.bufferSize - usedLength; + inSz = (int)(size - usedLength); /* from last partial read */ + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if (size < ssl->dtls_expected_rx) + dtlsExtra = (int)(ssl->dtls_expected_rx - size); + inSz = ssl->dtls_expected_rx; + } +#endif + + if (inSz > maxLength) { + if (GrowInputBuffer(ssl, size + dtlsExtra, usedLength) < 0) + return MEMORY_E; + } + + if (inSz <= 0) + return BUFFER_ERROR; + + /* Put buffer data at start if not there */ + if (usedLength > 0 && ssl->buffers.inputBuffer.idx != 0) + XMEMMOVE(ssl->buffers.inputBuffer.buffer, + ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx, + usedLength); + + /* remove processed data */ + ssl->buffers.inputBuffer.idx = 0; + ssl->buffers.inputBuffer.length = usedLength; + + /* read data from network */ + do { + in = Receive(ssl, + ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.length, + inSz); + if (in == -1) + return SOCKET_ERROR_E; + + if (in == WANT_READ) + return WANT_READ; + + if (in > inSz) + return RECV_OVERFLOW_E; + + ssl->buffers.inputBuffer.length += in; + inSz -= in; + + } while (ssl->buffers.inputBuffer.length < size); + + return 0; +} + + +static INLINE int VerifyMac(CYASSL* ssl, const byte* input, word32 msgSz, + int content, word32* padSz) +{ + int ivExtra = 0; + int ret; + word32 pad = 0; + word32 padByte = 0; +#ifdef HAVE_TRUNCATED_HMAC + word32 digestSz = ssl->truncated_hmac ? TRUNCATED_HMAC_SZ + : ssl->specs.hash_size; +#else + word32 digestSz = ssl->specs.hash_size; +#endif + byte verify[MAX_DIGEST_SIZE]; + + if (ssl->specs.cipher_type == block) { + if (ssl->options.tls1_1) + ivExtra = ssl->specs.block_size; + pad = *(input + msgSz - ivExtra - 1); + padByte = 1; + + if (ssl->options.tls) { + ret = TimingPadVerify(ssl, input, pad, digestSz, msgSz - ivExtra, + content); + if (ret != 0) + return ret; + } + else { /* sslv3, some implementations have bad padding, but don't + * allow bad read */ + int badPadLen = 0; + byte dummy[MAX_PAD_SIZE]; + + XMEMSET(dummy, 1, sizeof(dummy)); + + if (pad > (msgSz - digestSz - 1)) { + CYASSL_MSG("Plain Len not long enough for pad/mac"); + pad = 0; /* no bad read */ + badPadLen = 1; + } + PadCheck(dummy, (byte)pad, MAX_PAD_SIZE); /* timing only */ + ret = ssl->hmac(ssl, verify, input, msgSz - digestSz - pad - 1, + content, 1); + if (ConstantCompare(verify, input + msgSz - digestSz - pad - 1, + digestSz) != 0) + return VERIFY_MAC_ERROR; + if (ret != 0 || badPadLen) + return VERIFY_MAC_ERROR; + } + } + else if (ssl->specs.cipher_type == stream) { + ret = ssl->hmac(ssl, verify, input, msgSz - digestSz, content, 1); + if (ConstantCompare(verify, input + msgSz - digestSz, digestSz) != 0){ + return VERIFY_MAC_ERROR; + } + if (ret != 0) + return VERIFY_MAC_ERROR; + } + + if (ssl->specs.cipher_type == aead) { + *padSz = ssl->specs.aead_mac_size; + } + else { + *padSz = digestSz + pad + padByte; + } + + return 0; +} + + +/* process input requests, return 0 is done, 1 is call again to complete, and + negative number is error */ +int ProcessReply(CYASSL* ssl) +{ + int ret = 0, type, readSz; + int atomicUser = 0; + word32 startIdx = 0; +#ifndef NO_CYASSL_SERVER + byte b0, b1; +#endif +#ifdef CYASSL_DTLS + int used; +#endif + +#ifdef ATOMIC_USER + if (ssl->ctx->DecryptVerifyCb) + atomicUser = 1; +#endif + + if (ssl->error != 0 && ssl->error != WANT_READ && ssl->error != WANT_WRITE){ + CYASSL_MSG("ProcessReply retry in error state, not allowed"); + return ssl->error; + } + + for (;;) { + switch (ssl->options.processReply) { + + /* in the CYASSL_SERVER case, get the first byte for detecting + * old client hello */ + case doProcessInit: + + readSz = RECORD_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + readSz = DTLS_RECORD_HEADER_SZ; + #endif + + /* get header or return error */ + if (!ssl->options.dtls) { + if ((ret = GetInputData(ssl, readSz)) < 0) + return ret; + } else { + #ifdef CYASSL_DTLS + /* read ahead may already have header */ + used = ssl->buffers.inputBuffer.length - + ssl->buffers.inputBuffer.idx; + if (used < readSz) + if ((ret = GetInputData(ssl, readSz)) < 0) + return ret; + #endif + } + +#ifndef NO_CYASSL_SERVER + + /* see if sending SSLv2 client hello */ + if ( ssl->options.side == CYASSL_SERVER_END && + ssl->options.clientState == NULL_STATE && + ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx] + != handshake) { + ssl->options.processReply = runProcessOldClientHello; + + /* how many bytes need ProcessOldClientHello */ + b0 = + ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++]; + b1 = + ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++]; + ssl->curSize = (word16)(((b0 & 0x7f) << 8) | b1); + } + else { + ssl->options.processReply = getRecordLayerHeader; + continue; + } + + /* in the CYASSL_SERVER case, run the old client hello */ + case runProcessOldClientHello: + + /* get sz bytes or return error */ + if (!ssl->options.dtls) { + if ((ret = GetInputData(ssl, ssl->curSize)) < 0) + return ret; + } else { + #ifdef CYASSL_DTLS + /* read ahead may already have */ + used = ssl->buffers.inputBuffer.length - + ssl->buffers.inputBuffer.idx; + if (used < ssl->curSize) + if ((ret = GetInputData(ssl, ssl->curSize)) < 0) + return ret; + #endif /* CYASSL_DTLS */ + } + + ret = ProcessOldClientHello(ssl, ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx, + ssl->buffers.inputBuffer.length - + ssl->buffers.inputBuffer.idx, + ssl->curSize); + if (ret < 0) + return ret; + + else if (ssl->buffers.inputBuffer.idx == + ssl->buffers.inputBuffer.length) { + ssl->options.processReply = doProcessInit; + return 0; + } + +#endif /* NO_CYASSL_SERVER */ + + /* get the record layer header */ + case getRecordLayerHeader: + + ret = GetRecordHeader(ssl, ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx, + &ssl->curRL, &ssl->curSize); +#ifdef CYASSL_DTLS + if (ssl->options.dtls && ret == SEQUENCE_ERROR) { + ssl->options.processReply = doProcessInit; + ssl->buffers.inputBuffer.length = 0; + ssl->buffers.inputBuffer.idx = 0; + continue; + } +#endif + if (ret != 0) + return ret; + + ssl->options.processReply = getData; + + /* retrieve record layer data */ + case getData: + + /* get sz bytes or return error */ + if (!ssl->options.dtls) { + if ((ret = GetInputData(ssl, ssl->curSize)) < 0) + return ret; + } else { +#ifdef CYASSL_DTLS + /* read ahead may already have */ + used = ssl->buffers.inputBuffer.length - + ssl->buffers.inputBuffer.idx; + if (used < ssl->curSize) + if ((ret = GetInputData(ssl, ssl->curSize)) < 0) + return ret; +#endif + } + + ssl->options.processReply = runProcessingOneMessage; + startIdx = ssl->buffers.inputBuffer.idx; /* in case > 1 msg per */ + + /* the record layer is here */ + case runProcessingOneMessage: + + #ifdef CYASSL_DTLS + if (ssl->options.dtls && + ssl->keys.dtls_state.curEpoch < ssl->keys.dtls_state.nextEpoch) + ssl->keys.decryptedCur = 1; + #endif + + if (ssl->keys.encryptionOn && ssl->keys.decryptedCur == 0) + { + ret = SanityCheckCipherText(ssl, ssl->curSize); + if (ret < 0) + return ret; + + if (atomicUser) { + #ifdef ATOMIC_USER + ret = ssl->ctx->DecryptVerifyCb(ssl, + ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, + ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, + ssl->curSize, ssl->curRL.type, 1, + &ssl->keys.padSz, ssl->DecryptVerifyCtx); + if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) + ssl->buffers.inputBuffer.idx += ssl->specs.block_size; + /* go past TLSv1.1 IV */ + if (ssl->specs.cipher_type == aead) + ssl->buffers.inputBuffer.idx += AEAD_EXP_IV_SZ; + #endif /* ATOMIC_USER */ + } + else { + ret = Decrypt(ssl, ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, + ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, + ssl->curSize); + if (ret < 0) { + CYASSL_ERROR(ret); + return DECRYPT_ERROR; + } + if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) + ssl->buffers.inputBuffer.idx += ssl->specs.block_size; + /* go past TLSv1.1 IV */ + if (ssl->specs.cipher_type == aead) + ssl->buffers.inputBuffer.idx += AEAD_EXP_IV_SZ; + + ret = VerifyMac(ssl, ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx, + ssl->curSize, ssl->curRL.type, + &ssl->keys.padSz); + } + if (ret < 0) { + CYASSL_ERROR(ret); + return DECRYPT_ERROR; + } + ssl->keys.encryptSz = ssl->curSize; + ssl->keys.decryptedCur = 1; + } + + if (ssl->options.dtls) { + #ifdef CYASSL_DTLS + DtlsUpdateWindow(&ssl->keys.dtls_state); + #endif /* CYASSL_DTLS */ + } + + CYASSL_MSG("received record layer msg"); + + switch (ssl->curRL.type) { + case handshake : + /* debugging in DoHandShakeMsg */ + if (!ssl->options.dtls) { + ret = DoHandShakeMsg(ssl, + ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx, + ssl->buffers.inputBuffer.length); + } + else { +#ifdef CYASSL_DTLS + ret = DoDtlsHandShakeMsg(ssl, + ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx, + ssl->buffers.inputBuffer.length); +#endif + } + if (ret != 0) + return ret; + break; + + case change_cipher_spec: + CYASSL_MSG("got CHANGE CIPHER SPEC"); + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ChangeCipher", &ssl->handShakeInfo); + /* add record header back on info */ + if (ssl->toInfoOn) { + AddPacketInfo("ChangeCipher", &ssl->timeoutInfo, + ssl->buffers.inputBuffer.buffer + + ssl->buffers.inputBuffer.idx - RECORD_HEADER_SZ, + 1 + RECORD_HEADER_SZ, ssl->heap); + AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo); + } + #endif + + if (ssl->curSize != 1) { + CYASSL_MSG("Malicious or corrupted ChangeCipher msg"); + return LENGTH_ERROR; + } + #ifndef NO_CERTS + if (ssl->options.side == CYASSL_SERVER_END && + ssl->options.verifyPeer && + ssl->options.havePeerCert) + if (!ssl->options.havePeerVerify) { + CYASSL_MSG("client didn't send cert verify"); + return NO_PEER_VERIFY; + } + #endif + + + ssl->buffers.inputBuffer.idx++; + ssl->keys.encryptionOn = 1; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + DtlsPoolReset(ssl); + ssl->keys.dtls_state.nextEpoch++; + ssl->keys.dtls_state.nextSeq = 0; + } + #endif + + #ifdef HAVE_LIBZ + if (ssl->options.usingCompression) + if ( (ret = InitStreams(ssl)) != 0) + return ret; + #endif + if (ssl->options.resuming && ssl->options.side == + CYASSL_CLIENT_END) + ret = BuildFinished(ssl, &ssl->verifyHashes, server); + else if (!ssl->options.resuming && ssl->options.side == + CYASSL_SERVER_END) + ret = BuildFinished(ssl, &ssl->verifyHashes, client); + if (ret != 0) + return ret; + break; + + case application_data: + CYASSL_MSG("got app DATA"); + if ((ret = DoApplicationData(ssl, + ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx)) + != 0) { + CYASSL_ERROR(ret); + return ret; + } + break; + + case alert: + CYASSL_MSG("got ALERT!"); + ret = DoAlert(ssl, ssl->buffers.inputBuffer.buffer, + &ssl->buffers.inputBuffer.idx, &type, + ssl->buffers.inputBuffer.length); + if (ret == alert_fatal) + return FATAL_ERROR; + else if (ret < 0) + return ret; + + /* catch warnings that are handled as errors */ + if (type == close_notify) + return ssl->error = ZERO_RETURN; + + if (type == decrypt_error) + return FATAL_ERROR; + break; + + default: + CYASSL_ERROR(UNKNOWN_RECORD_TYPE); + return UNKNOWN_RECORD_TYPE; + } + + ssl->options.processReply = doProcessInit; + + /* input exhausted? */ + if (ssl->buffers.inputBuffer.idx == ssl->buffers.inputBuffer.length) + return 0; + /* more messages per record */ + else if ((ssl->buffers.inputBuffer.idx - startIdx) < ssl->curSize) { + CYASSL_MSG("More messages in record"); + #ifdef CYASSL_DTLS + /* read-ahead but dtls doesn't bundle messages per record */ + if (ssl->options.dtls) { + ssl->options.processReply = doProcessInit; + continue; + } + #endif + ssl->options.processReply = runProcessingOneMessage; + continue; + } + /* more records */ + else { + CYASSL_MSG("More records in input"); + ssl->options.processReply = doProcessInit; + continue; + } + + default: + CYASSL_MSG("Bad process input state, programming error"); + return INPUT_CASE_ERROR; + } + } +} + + +int SendChangeCipher(CYASSL* ssl) +{ + byte *output; + int sendSz = RECORD_HEADER_SZ + ENUM_LEN; + int idx = RECORD_HEADER_SZ; + int ret; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA; + idx += DTLS_RECORD_EXTRA; + } + #endif + + /* check for avalaible size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddRecordHeader(output, 1, change_cipher_spec, ssl); + + output[idx] = 1; /* turn it on */ + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("ChangeCipher", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ChangeCipher", &ssl->timeoutInfo, output, sendSz, + ssl->heap); + #endif + ssl->buffers.outputBuffer.length += sendSz; + + if (ssl->options.groupMessages) + return 0; + #ifdef CYASSL_DTLS + else if (ssl->options.dtls) { + /* If using DTLS, force the ChangeCipherSpec message to be in the + * same datagram as the finished message. */ + return 0; + } + #endif + else + return SendBuffered(ssl); +} + + +#ifndef NO_OLD_TLS +static int SSL_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, + int content, int verify) +{ + byte result[MAX_DIGEST_SIZE]; + word32 digestSz = ssl->specs.hash_size; /* actual sizes */ + word32 padSz = ssl->specs.pad_size; + int ret = 0; + + Md5 md5; + Sha sha; + + /* data */ + byte seq[SEQ_SZ]; + byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */ + const byte* macSecret = CyaSSL_GetMacSecret(ssl, verify); + + XMEMSET(seq, 0, SEQ_SZ); + conLen[0] = (byte)content; + c16toa((word16)sz, &conLen[ENUM_LEN]); + c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]); + + if (ssl->specs.mac_algorithm == md5_mac) { + InitMd5(&md5); + /* inner */ + Md5Update(&md5, macSecret, digestSz); + Md5Update(&md5, PAD1, padSz); + Md5Update(&md5, seq, SEQ_SZ); + Md5Update(&md5, conLen, sizeof(conLen)); + /* in buffer */ + Md5Update(&md5, in, sz); + Md5Final(&md5, result); + /* outer */ + Md5Update(&md5, macSecret, digestSz); + Md5Update(&md5, PAD2, padSz); + Md5Update(&md5, result, digestSz); + Md5Final(&md5, digest); + } + else { + ret = InitSha(&sha); + if (ret != 0) + return ret; + /* inner */ + ShaUpdate(&sha, macSecret, digestSz); + ShaUpdate(&sha, PAD1, padSz); + ShaUpdate(&sha, seq, SEQ_SZ); + ShaUpdate(&sha, conLen, sizeof(conLen)); + /* in buffer */ + ShaUpdate(&sha, in, sz); + ShaFinal(&sha, result); + /* outer */ + ShaUpdate(&sha, macSecret, digestSz); + ShaUpdate(&sha, PAD2, padSz); + ShaUpdate(&sha, result, digestSz); + ShaFinal(&sha, digest); + } + return 0; +} + +#ifndef NO_CERTS +static void BuildMD5_CertVerify(CYASSL* ssl, byte* digest) +{ + byte md5_result[MD5_DIGEST_SIZE]; + + /* make md5 inner */ + Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); + Md5Update(&ssl->hashMd5, PAD1, PAD_MD5); + Md5Final(&ssl->hashMd5, md5_result); + + /* make md5 outer */ + Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); + Md5Update(&ssl->hashMd5, PAD2, PAD_MD5); + Md5Update(&ssl->hashMd5, md5_result, MD5_DIGEST_SIZE); + + Md5Final(&ssl->hashMd5, digest); +} + + +static void BuildSHA_CertVerify(CYASSL* ssl, byte* digest) +{ + byte sha_result[SHA_DIGEST_SIZE]; + + /* make sha inner */ + ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); + ShaUpdate(&ssl->hashSha, PAD1, PAD_SHA); + ShaFinal(&ssl->hashSha, sha_result); + + /* make sha outer */ + ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); + ShaUpdate(&ssl->hashSha, PAD2, PAD_SHA); + ShaUpdate(&ssl->hashSha, sha_result, SHA_DIGEST_SIZE); + + ShaFinal(&ssl->hashSha, digest); +} +#endif /* NO_CERTS */ +#endif /* NO_OLD_TLS */ + + +#ifndef NO_CERTS + +static int BuildCertHashes(CYASSL* ssl, Hashes* hashes) +{ + /* store current states, building requires get_digest which resets state */ + #ifndef NO_OLD_TLS + Md5 md5 = ssl->hashMd5; + Sha sha = ssl->hashSha; + #endif + #ifndef NO_SHA256 + Sha256 sha256 = ssl->hashSha256; + #endif + #ifdef CYASSL_SHA384 + Sha384 sha384 = ssl->hashSha384; + #endif + + if (ssl->options.tls) { +#if ! defined( NO_OLD_TLS ) + Md5Final(&ssl->hashMd5, hashes->md5); + ShaFinal(&ssl->hashSha, hashes->sha); +#endif + if (IsAtLeastTLSv1_2(ssl)) { + int ret; + + #ifndef NO_SHA256 + ret = Sha256Final(&ssl->hashSha256, hashes->sha256); + if (ret != 0) + return ret; + #endif + #ifdef CYASSL_SHA384 + ret = Sha384Final(&ssl->hashSha384, hashes->sha384); + if (ret != 0) + return ret; + #endif + } + } +#if ! defined( NO_OLD_TLS ) + else { + BuildMD5_CertVerify(ssl, hashes->md5); + BuildSHA_CertVerify(ssl, hashes->sha); + } + + /* restore */ + ssl->hashMd5 = md5; + ssl->hashSha = sha; +#endif + if (IsAtLeastTLSv1_2(ssl)) { + #ifndef NO_SHA256 + ssl->hashSha256 = sha256; + #endif + #ifdef CYASSL_SHA384 + ssl->hashSha384 = sha384; + #endif + } + + return 0; +} + +#endif /* CYASSL_LEANPSK */ + +/* Build SSL Message, encrypted */ +static int BuildMessage(CYASSL* ssl, byte* output, const byte* input, int inSz, + int type) +{ +#ifdef HAVE_TRUNCATED_HMAC + word32 digestSz = min(ssl->specs.hash_size, + ssl->truncated_hmac ? TRUNCATED_HMAC_SZ : ssl->specs.hash_size); +#else + word32 digestSz = ssl->specs.hash_size; +#endif + word32 sz = RECORD_HEADER_SZ + inSz + digestSz; + word32 pad = 0, i; + word32 idx = RECORD_HEADER_SZ; + word32 ivSz = 0; /* TLSv1.1 IV */ + word32 headerSz = RECORD_HEADER_SZ; + word16 size; + byte iv[AES_BLOCK_SIZE]; /* max size */ + int ret = 0; + int atomicUser = 0; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sz += DTLS_RECORD_EXTRA; + idx += DTLS_RECORD_EXTRA; + headerSz += DTLS_RECORD_EXTRA; + } +#endif + +#ifdef ATOMIC_USER + if (ssl->ctx->MacEncryptCb) + atomicUser = 1; +#endif + + if (ssl->specs.cipher_type == block) { + word32 blockSz = ssl->specs.block_size; + if (ssl->options.tls1_1) { + ivSz = blockSz; + sz += ivSz; + + ret = RNG_GenerateBlock(ssl->rng, iv, ivSz); + if (ret != 0) + return ret; + + } + sz += 1; /* pad byte */ + pad = (sz - headerSz) % blockSz; + pad = blockSz - pad; + sz += pad; + } + +#ifdef HAVE_AEAD + if (ssl->specs.cipher_type == aead) { + ivSz = AEAD_EXP_IV_SZ; + sz += (ivSz + ssl->specs.aead_mac_size - digestSz); + XMEMCPY(iv, ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); + } +#endif + size = (word16)(sz - headerSz); /* include mac and digest */ + AddRecordHeader(output, size, (byte)type, ssl); + + /* write to output */ + if (ivSz) { + XMEMCPY(output + idx, iv, min(ivSz, sizeof(iv))); + idx += ivSz; + } + XMEMCPY(output + idx, input, inSz); + idx += inSz; + + if (type == handshake) { + ret = HashOutput(ssl, output, headerSz + inSz, ivSz); + if (ret != 0) + return ret; + } + + if (ssl->specs.cipher_type == block) { + word32 tmpIdx = idx + digestSz; + + for (i = 0; i <= pad; i++) + output[tmpIdx++] = (byte)pad; /* pad byte gets pad value too */ + } + + if (atomicUser) { /* User Record Layer Callback handling */ +#ifdef ATOMIC_USER + if ( (ret = ssl->ctx->MacEncryptCb(ssl, output + idx, + output + headerSz + ivSz, inSz, type, 0, + output + headerSz, output + headerSz, size, + ssl->MacEncryptCtx)) != 0) + return ret; +#endif + } + else { + if (ssl->specs.cipher_type != aead) { +#ifdef HAVE_TRUNCATED_HMAC + if (ssl->truncated_hmac && ssl->specs.hash_size > digestSz) { + byte hmac[MAX_DIGEST_SIZE]; + + ret = ssl->hmac(ssl, hmac, output + headerSz + ivSz, inSz, + type, 0); + XMEMCPY(output + idx, hmac, digestSz); + } else +#endif + ret = ssl->hmac(ssl, output+idx, output + headerSz + ivSz, inSz, + type, 0); + } + if (ret != 0) + return ret; + + if ( (ret = Encrypt(ssl, output + headerSz, output+headerSz,size)) != 0) + return ret; + } + + return sz; +} + + +int SendFinished(CYASSL* ssl) +{ + int sendSz, + finishedSz = ssl->options.tls ? TLS_FINISHED_SZ : + FINISHED_SZ; + byte input[FINISHED_SZ + DTLS_HANDSHAKE_HEADER_SZ]; /* max */ + byte *output; + Hashes* hashes; + int ret; + int headerSz = HANDSHAKE_HEADER_SZ; + + #ifdef CYASSL_DTLS + word32 sequence_number = ssl->keys.dtls_sequence_number; + word16 epoch = ssl->keys.dtls_epoch; + #endif + + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sizeof(input) + MAX_MSG_EXTRA)) != 0) + return ret; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* Send Finished message with the next epoch, but don't commit that + * change until the other end confirms its reception. */ + headerSz += DTLS_HANDSHAKE_EXTRA; + ssl->keys.dtls_epoch++; + ssl->keys.dtls_sequence_number = 0; /* reset after epoch change */ + } + #endif + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHandShakeHeader(input, finishedSz, finished, ssl); + + /* make finished hashes */ + hashes = (Hashes*)&input[headerSz]; + ret = BuildFinished(ssl, hashes, + ssl->options.side == CYASSL_CLIENT_END ? client : server); + if (ret != 0) return ret; + + sendSz = BuildMessage(ssl, output, input, headerSz + finishedSz, handshake); + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + ssl->keys.dtls_epoch = epoch; + ssl->keys.dtls_sequence_number = sequence_number; + } + #endif + + if (sendSz < 0) + return BUILD_MSG_ERROR; + + if (!ssl->options.resuming) { +#ifndef NO_SESSION_CACHE + AddSession(ssl); /* just try */ +#endif + if (ssl->options.side == CYASSL_CLIENT_END) { + ret = BuildFinished(ssl, &ssl->verifyHashes, server); + if (ret != 0) return ret; + } + else { + ssl->options.handShakeState = HANDSHAKE_DONE; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* Other side will soon receive our Finished, go to next + * epoch. */ + ssl->keys.dtls_epoch++; + ssl->keys.dtls_sequence_number = 1; + } + #endif + } + } + else { + if (ssl->options.side == CYASSL_CLIENT_END) { + ssl->options.handShakeState = HANDSHAKE_DONE; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* Other side will soon receive our Finished, go to next + * epoch. */ + ssl->keys.dtls_epoch++; + ssl->keys.dtls_sequence_number = 1; + } + #endif + } + else { + ret = BuildFinished(ssl, &ssl->verifyHashes, client); + if (ret != 0) return ret; + } + } + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("Finished", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("Finished", &ssl->timeoutInfo, output, sendSz, + ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + + return SendBuffered(ssl); +} + +#ifndef NO_CERTS +int SendCertificate(CYASSL* ssl) +{ + int sendSz, length, ret = 0; + word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + word32 certSz, listSz; + byte* output = 0; + + if (ssl->options.usingPSK_cipher) return 0; /* not needed */ + + if (ssl->options.sendVerify == SEND_BLANK_CERT) { + certSz = 0; + length = CERT_HEADER_SZ; + listSz = 0; + } + else { + certSz = ssl->buffers.certificate.length; + /* list + cert size */ + length = certSz + 2 * CERT_HEADER_SZ; + listSz = certSz + CERT_HEADER_SZ; + + /* may need to send rest of chain, already has leading size(s) */ + if (ssl->buffers.certChain.buffer) { + length += ssl->buffers.certChain.length; + listSz += ssl->buffers.certChain.length; + } + } + sendSz = length + RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + } + #endif + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, length, certificate, ssl); + + /* list total */ + c32to24(listSz, output + i); + i += CERT_HEADER_SZ; + + /* member */ + if (certSz) { + c32to24(certSz, output + i); + i += CERT_HEADER_SZ; + XMEMCPY(output + i, ssl->buffers.certificate.buffer, certSz); + i += certSz; + + /* send rest of chain? */ + if (ssl->buffers.certChain.buffer) { + XMEMCPY(output + i, ssl->buffers.certChain.buffer, + ssl->buffers.certChain.length); + /* if add more to output adjust i + i += ssl->buffers.certChain.length; */ + } + } + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("Certificate", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("Certificate", &ssl->timeoutInfo, output, sendSz, + ssl->heap); + #endif + + if (ssl->options.side == CYASSL_SERVER_END) + ssl->options.serverState = SERVER_CERT_COMPLETE; + + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + return 0; + else + return SendBuffered(ssl); +} + + +int SendCertificateRequest(CYASSL* ssl) +{ + byte *output; + int ret; + int sendSz; + word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + + int typeTotal = 1; /* only rsa for now */ + int reqSz = ENUM_LEN + typeTotal + REQ_HEADER_SZ; /* add auth later */ + + if (IsAtLeastTLSv1_2(ssl)) + reqSz += LENGTH_SZ + ssl->suites->hashSigAlgoSz; + + if (ssl->options.usingPSK_cipher) return 0; /* not needed */ + + sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + reqSz; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + } + #endif + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, reqSz, certificate_request, ssl); + + /* write to output */ + output[i++] = (byte)typeTotal; /* # of types */ + output[i++] = rsa_sign; + + /* supported hash/sig */ + if (IsAtLeastTLSv1_2(ssl)) { + c16toa(ssl->suites->hashSigAlgoSz, &output[i]); + i += LENGTH_SZ; + + XMEMCPY(&output[i], + ssl->suites->hashSigAlgo, ssl->suites->hashSigAlgoSz); + i += ssl->suites->hashSigAlgoSz; + } + + c16toa(0, &output[i]); /* auth's */ + /* if add more to output, adjust i + i += REQ_HEADER_SZ; */ + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("CertificateRequest", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("CertificateRequest", &ssl->timeoutInfo, output, + sendSz, ssl->heap); + #endif + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + return 0; + else + return SendBuffered(ssl); +} +#endif /* !NO_CERTS */ + + +int SendData(CYASSL* ssl, const void* data, int sz) +{ + int sent = 0, /* plainText size */ + sendSz, + ret; + + if (ssl->error == WANT_WRITE) + ssl->error = 0; + + if (ssl->options.handShakeState != HANDSHAKE_DONE) { + int err; + CYASSL_MSG("handshake not complete, trying to finish"); + if ( (err = CyaSSL_negotiate(ssl)) != SSL_SUCCESS) + return err; + } + + /* last time system socket output buffer was full, try again to send */ + if (ssl->buffers.outputBuffer.length > 0) { + CYASSL_MSG("output buffer was full, trying to send again"); + if ( (ssl->error = SendBuffered(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + if (ssl->error == SOCKET_ERROR_E && ssl->options.connReset) + return 0; /* peer reset */ + return ssl->error; + } + else { + /* advance sent to previous sent + plain size just sent */ + sent = ssl->buffers.prevSent + ssl->buffers.plainSz; + CYASSL_MSG("sent write buffered data"); + } + } + + for (;;) { +#ifdef HAVE_MAX_FRAGMENT + int len = min(sz - sent, min(ssl->max_fragment, OUTPUT_RECORD_SIZE)); +#else + int len = min(sz - sent, OUTPUT_RECORD_SIZE); +#endif + byte* out; + byte* sendBuffer = (byte*)data + sent; /* may switch on comp */ + int buffSz = len; /* may switch on comp */ +#ifdef HAVE_LIBZ + byte comp[MAX_RECORD_SIZE + MAX_COMP_EXTRA]; +#endif + + if (sent == sz) break; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + len = min(len, MAX_UDP_SIZE); + buffSz = len; + } +#endif + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, len + COMP_EXTRA + + MAX_MSG_EXTRA)) != 0) + return ssl->error = ret; + + /* get ouput buffer */ + out = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + +#ifdef HAVE_LIBZ + if (ssl->options.usingCompression) { + buffSz = myCompress(ssl, sendBuffer, buffSz, comp, sizeof(comp)); + if (buffSz < 0) { + return buffSz; + } + sendBuffer = comp; + } +#endif + sendSz = BuildMessage(ssl, out, sendBuffer, buffSz, + application_data); + + ssl->buffers.outputBuffer.length += sendSz; + + if ( (ret = SendBuffered(ssl)) < 0) { + CYASSL_ERROR(ret); + /* store for next call if WANT_WRITE or user embedSend() that + doesn't present like WANT_WRITE */ + ssl->buffers.plainSz = len; + ssl->buffers.prevSent = sent; + if (ret == SOCKET_ERROR_E && ssl->options.connReset) + return 0; /* peer reset */ + return ssl->error = ret; + } + + sent += len; + + /* only one message per attempt */ + if (ssl->options.partialWrite == 1) { + CYASSL_MSG("Paritial Write on, only sending one record"); + break; + } + } + + return sent; +} + +/* process input data */ +int ReceiveData(CYASSL* ssl, byte* output, int sz, int peek) +{ + int size; + + CYASSL_ENTER("ReceiveData()"); + + if (ssl->error == WANT_READ) + ssl->error = 0; + + if (ssl->error != 0 && ssl->error != WANT_WRITE) { + CYASSL_MSG("User calling CyaSSL_read in error state, not allowed"); + return ssl->error; + } + + if (ssl->options.handShakeState != HANDSHAKE_DONE) { + int err; + CYASSL_MSG("Handshake not complete, trying to finish"); + if ( (err = CyaSSL_negotiate(ssl)) != SSL_SUCCESS) + return err; + } + + while (ssl->buffers.clearOutputBuffer.length == 0) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + if (ssl->error == ZERO_RETURN) { + CYASSL_MSG("Zero return, no more data coming"); + return 0; /* no more data coming */ + } + if (ssl->error == SOCKET_ERROR_E) { + if (ssl->options.connReset || ssl->options.isClosed) { + CYASSL_MSG("Peer reset or closed, connection done"); + return 0; /* peer reset or closed */ + } + } + return ssl->error; + } + + if (sz < (int)ssl->buffers.clearOutputBuffer.length) + size = sz; + else + size = ssl->buffers.clearOutputBuffer.length; + + XMEMCPY(output, ssl->buffers.clearOutputBuffer.buffer, size); + + if (peek == 0) { + ssl->buffers.clearOutputBuffer.length -= size; + ssl->buffers.clearOutputBuffer.buffer += size; + } + + if (ssl->buffers.clearOutputBuffer.length == 0 && + ssl->buffers.inputBuffer.dynamicFlag) + ShrinkInputBuffer(ssl, NO_FORCED_FREE); + + CYASSL_LEAVE("ReceiveData()", size); + return size; +} + + +/* send alert message */ +int SendAlert(CYASSL* ssl, int severity, int type) +{ + byte input[ALERT_SIZE]; + byte *output; + int sendSz; + int ret; + int dtlsExtra = 0; + + /* if sendalert is called again for nonbloking */ + if (ssl->options.sendAlertState != 0) { + ret = SendBuffered(ssl); + if (ret == 0) + ssl->options.sendAlertState = 0; + return ret; + } + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + dtlsExtra = DTLS_RECORD_EXTRA; + #endif + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, + ALERT_SIZE + MAX_MSG_EXTRA + dtlsExtra)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + input[0] = (byte)severity; + input[1] = (byte)type; + ssl->alert_history.last_tx.code = type; + ssl->alert_history.last_tx.level = severity; + if (severity == alert_fatal) { + ssl->options.isClosed = 1; /* Don't send close_notify */ + } + + /* only send encrypted alert if handshake actually complete, otherwise + other side may not be able to handle it */ + if (ssl->keys.encryptionOn && ssl->options.handShakeState == HANDSHAKE_DONE) + sendSz = BuildMessage(ssl, output, input, ALERT_SIZE, alert); + else { + + AddRecordHeader(output, ALERT_SIZE, alert, ssl); + output += RECORD_HEADER_SZ; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + output += DTLS_RECORD_EXTRA; + #endif + XMEMCPY(output, input, ALERT_SIZE); + + sendSz = RECORD_HEADER_SZ + ALERT_SIZE; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + sendSz += DTLS_RECORD_EXTRA; + #endif + } + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("Alert", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("Alert", &ssl->timeoutInfo, output, sendSz,ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + ssl->options.sendAlertState = 1; + + return SendBuffered(ssl); +} + + + +void SetErrorString(int error, char* str) +{ + const int max = CYASSL_MAX_ERROR_SZ; /* shorthand */ + +#ifdef NO_ERROR_STRINGS + + (void)error; + XSTRNCPY(str, "no support for error strings built in", max); + +#else + + /* pass to CTaoCrypt */ + if (error < MAX_CODE_E && error > MIN_CODE_E) { + CTaoCryptErrorString(error, str); + return; + } + + switch (error) { + + case UNSUPPORTED_SUITE : + XSTRNCPY(str, "unsupported cipher suite", max); + break; + + case INPUT_CASE_ERROR : + XSTRNCPY(str, "input state error", max); + break; + + case PREFIX_ERROR : + XSTRNCPY(str, "bad index to key rounds", max); + break; + + case MEMORY_ERROR : + XSTRNCPY(str, "out of memory", max); + break; + + case VERIFY_FINISHED_ERROR : + XSTRNCPY(str, "verify problem on finished", max); + break; + + case VERIFY_MAC_ERROR : + XSTRNCPY(str, "verify mac problem", max); + break; + + case PARSE_ERROR : + XSTRNCPY(str, "parse error on header", max); + break; + + case SIDE_ERROR : + XSTRNCPY(str, "wrong client/server type", max); + break; + + case NO_PEER_CERT : + XSTRNCPY(str, "peer didn't send cert", max); + break; + + case UNKNOWN_HANDSHAKE_TYPE : + XSTRNCPY(str, "weird handshake type", max); + break; + + case SOCKET_ERROR_E : + XSTRNCPY(str, "error state on socket", max); + break; + + case SOCKET_NODATA : + XSTRNCPY(str, "expected data, not there", max); + break; + + case INCOMPLETE_DATA : + XSTRNCPY(str, "don't have enough data to complete task", max); + break; + + case UNKNOWN_RECORD_TYPE : + XSTRNCPY(str, "unknown type in record hdr", max); + break; + + case DECRYPT_ERROR : + XSTRNCPY(str, "error during decryption", max); + break; + + case FATAL_ERROR : + XSTRNCPY(str, "revcd alert fatal error", max); + break; + + case ENCRYPT_ERROR : + XSTRNCPY(str, "error during encryption", max); + break; + + case FREAD_ERROR : + XSTRNCPY(str, "fread problem", max); + break; + + case NO_PEER_KEY : + XSTRNCPY(str, "need peer's key", max); + break; + + case NO_PRIVATE_KEY : + XSTRNCPY(str, "need the private key", max); + break; + + case NO_DH_PARAMS : + XSTRNCPY(str, "server missing DH params", max); + break; + + case RSA_PRIVATE_ERROR : + XSTRNCPY(str, "error during rsa priv op", max); + break; + + case MATCH_SUITE_ERROR : + XSTRNCPY(str, "can't match cipher suite", max); + break; + + case BUILD_MSG_ERROR : + XSTRNCPY(str, "build message failure", max); + break; + + case BAD_HELLO : + XSTRNCPY(str, "client hello malformed", max); + break; + + case DOMAIN_NAME_MISMATCH : + XSTRNCPY(str, "peer subject name mismatch", max); + break; + + case WANT_READ : + case SSL_ERROR_WANT_READ : + XSTRNCPY(str, "non-blocking socket wants data to be read", max); + break; + + case NOT_READY_ERROR : + XSTRNCPY(str, "handshake layer not ready yet, complete first", max); + break; + + case PMS_VERSION_ERROR : + XSTRNCPY(str, "premaster secret version mismatch error", max); + break; + + case VERSION_ERROR : + XSTRNCPY(str, "record layer version error", max); + break; + + case WANT_WRITE : + case SSL_ERROR_WANT_WRITE : + XSTRNCPY(str, "non-blocking socket write buffer full", max); + break; + + case BUFFER_ERROR : + XSTRNCPY(str, "malformed buffer input error", max); + break; + + case VERIFY_CERT_ERROR : + XSTRNCPY(str, "verify problem on certificate", max); + break; + + case VERIFY_SIGN_ERROR : + XSTRNCPY(str, "verify problem based on signature", max); + break; + + case CLIENT_ID_ERROR : + XSTRNCPY(str, "psk client identity error", max); + break; + + case SERVER_HINT_ERROR: + XSTRNCPY(str, "psk server hint error", max); + break; + + case PSK_KEY_ERROR: + XSTRNCPY(str, "psk key callback error", max); + break; + + case NTRU_KEY_ERROR: + XSTRNCPY(str, "NTRU key error", max); + break; + + case NTRU_DRBG_ERROR: + XSTRNCPY(str, "NTRU drbg error", max); + break; + + case NTRU_ENCRYPT_ERROR: + XSTRNCPY(str, "NTRU encrypt error", max); + break; + + case NTRU_DECRYPT_ERROR: + XSTRNCPY(str, "NTRU decrypt error", max); + break; + + case ZLIB_INIT_ERROR: + XSTRNCPY(str, "zlib init error", max); + break; + + case ZLIB_COMPRESS_ERROR: + XSTRNCPY(str, "zlib compress error", max); + break; + + case ZLIB_DECOMPRESS_ERROR: + XSTRNCPY(str, "zlib decompress error", max); + break; + + case GETTIME_ERROR: + XSTRNCPY(str, "gettimeofday() error", max); + break; + + case GETITIMER_ERROR: + XSTRNCPY(str, "getitimer() error", max); + break; + + case SIGACT_ERROR: + XSTRNCPY(str, "sigaction() error", max); + break; + + case SETITIMER_ERROR: + XSTRNCPY(str, "setitimer() error", max); + break; + + case LENGTH_ERROR: + XSTRNCPY(str, "record layer length error", max); + break; + + case PEER_KEY_ERROR: + XSTRNCPY(str, "cant decode peer key", max); + break; + + case ZERO_RETURN: + case SSL_ERROR_ZERO_RETURN: + XSTRNCPY(str, "peer sent close notify alert", max); + break; + + case ECC_CURVETYPE_ERROR: + XSTRNCPY(str, "Bad ECC Curve Type or unsupported", max); + break; + + case ECC_CURVE_ERROR: + XSTRNCPY(str, "Bad ECC Curve or unsupported", max); + break; + + case ECC_PEERKEY_ERROR: + XSTRNCPY(str, "Bad ECC Peer Key", max); + break; + + case ECC_MAKEKEY_ERROR: + XSTRNCPY(str, "ECC Make Key failure", max); + break; + + case ECC_EXPORT_ERROR: + XSTRNCPY(str, "ECC Export Key failure", max); + break; + + case ECC_SHARED_ERROR: + XSTRNCPY(str, "ECC DHE shared failure", max); + break; + + case NOT_CA_ERROR: + XSTRNCPY(str, "Not a CA by basic constraint error", max); + break; + + case BAD_PATH_ERROR: + XSTRNCPY(str, "Bad path for opendir error", max); + break; + + case BAD_CERT_MANAGER_ERROR: + XSTRNCPY(str, "Bad Cert Manager error", max); + break; + + case OCSP_CERT_REVOKED: + XSTRNCPY(str, "OCSP Cert revoked", max); + break; + + case CRL_CERT_REVOKED: + XSTRNCPY(str, "CRL Cert revoked", max); + break; + + case CRL_MISSING: + XSTRNCPY(str, "CRL missing, not loaded", max); + break; + + case MONITOR_RUNNING_E: + XSTRNCPY(str, "CRL monitor already running", max); + break; + + case THREAD_CREATE_E: + XSTRNCPY(str, "Thread creation problem", max); + break; + + case OCSP_NEED_URL: + XSTRNCPY(str, "OCSP need URL", max); + break; + + case OCSP_CERT_UNKNOWN: + XSTRNCPY(str, "OCSP Cert unknown", max); + break; + + case OCSP_LOOKUP_FAIL: + XSTRNCPY(str, "OCSP Responder lookup fail", max); + break; + + case MAX_CHAIN_ERROR: + XSTRNCPY(str, "Maximum Chain Depth Exceeded", max); + break; + + case COOKIE_ERROR: + XSTRNCPY(str, "DTLS Cookie Error", max); + break; + + case SEQUENCE_ERROR: + XSTRNCPY(str, "DTLS Sequence Error", max); + break; + + case SUITES_ERROR: + XSTRNCPY(str, "Suites Pointer Error", max); + break; + + case SSL_NO_PEM_HEADER: + XSTRNCPY(str, "No PEM Header Error", max); + break; + + case OUT_OF_ORDER_E: + XSTRNCPY(str, "Out of order message, fatal", max); + break; + + case BAD_KEA_TYPE_E: + XSTRNCPY(str, "Bad KEA type found", max); + break; + + case SANITY_CIPHER_E: + XSTRNCPY(str, "Sanity check on ciphertext failed", max); + break; + + case RECV_OVERFLOW_E: + XSTRNCPY(str, "Receive callback returned more than requested", max); + break; + + case GEN_COOKIE_E: + XSTRNCPY(str, "Generate Cookie Error", max); + break; + + case NO_PEER_VERIFY: + XSTRNCPY(str, "Need peer certificate verify Error", max); + break; + + case FWRITE_ERROR: + XSTRNCPY(str, "fwrite Error", max); + break; + + case CACHE_MATCH_ERROR: + XSTRNCPY(str, "Cache restore header match Error", max); + break; + + case UNKNOWN_SNI_HOST_NAME_E: + XSTRNCPY(str, "Unrecognized host name Error", max); + break; + + case KEYUSE_SIGNATURE_E: + XSTRNCPY(str, "Key Use digitalSignature not set Error", max); + break; + + case KEYUSE_ENCIPHER_E: + XSTRNCPY(str, "Key Use keyEncipherment not set Error", max); + break; + + case EXTKEYUSE_AUTH_E: + XSTRNCPY(str, "Ext Key Use server/client auth not set Error", max); + break; + + default : + XSTRNCPY(str, "unknown error number", max); + } + +#endif /* NO_ERROR_STRINGS */ +} + + + +/* be sure to add to cipher_name_idx too !!!! */ +static const char* const cipher_names[] = +{ +#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA + "RC4-SHA", +#endif + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 + "RC4-MD5", +#endif + +#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA + "DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA + "AES128-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA + "AES256-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA + "NULL-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 + "NULL-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA + "DHE-RSA-AES128-SHA", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA + "DHE-RSA-AES256-SHA", +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 + "PSK-AES128-CBC-SHA256", +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA + "PSK-AES128-CBC-SHA", +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA + "PSK-AES256-CBC-SHA", +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 + "PSK-AES128-CCM-8", +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 + "PSK-AES256-CCM-8", +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 + "PSK-NULL-SHA256", +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA + "PSK-NULL-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 + "HC128-MD5", +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA + "HC128-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 + "HC128-B2B256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 + "AES128-B2B256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 + "AES256-B2B256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA + "RABBIT-SHA", +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA + "NTRU-RC4-SHA", +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA + "NTRU-DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA + "NTRU-AES128-SHA", +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA + "NTRU-AES256-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 + "AES128-CCM-8", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 + "AES256-CCM-8", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + "ECDHE-ECDSA-AES128-CCM-8", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 + "ECDHE-ECDSA-AES256-CCM-8", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + "ECDHE-RSA-AES128-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + "ECDHE-RSA-AES256-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + "ECDHE-ECDSA-AES128-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + "ECDHE-ECDSA-AES256-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA + "ECDHE-RSA-RC4-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + "ECDHE-RSA-DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + "ECDHE-ECDSA-RC4-SHA", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA + "ECDHE-ECDSA-DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 + "AES128-SHA256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 + "AES256-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 + "DHE-RSA-AES128-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 + "DHE-RSA-AES256-SHA256", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA + "ECDH-RSA-AES128-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA + "ECDH-RSA-AES256-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA + "ECDH-ECDSA-AES128-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA + "ECDH-ECDSA-AES256-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA + "ECDH-RSA-RC4-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA + "ECDH-RSA-DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA + "ECDH-ECDSA-RC4-SHA", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA + "ECDH-ECDSA-DES-CBC3-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 + "AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 + "AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + "DHE-RSA-AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 + "DHE-RSA-AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + "ECDHE-RSA-AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + "ECDHE-RSA-AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + "ECDHE-ECDSA-AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + "ECDHE-ECDSA-AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 + "ECDH-RSA-AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 + "ECDH-RSA-AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 + "ECDH-ECDSA-AES128-GCM-SHA256", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 + "ECDH-ECDSA-AES256-GCM-SHA384", +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA + "CAMELLIA128-SHA", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA + "DHE-RSA-CAMELLIA128-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA + "CAMELLIA256-SHA", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA + "DHE-RSA-CAMELLIA256-SHA", +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 + "CAMELLIA128-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 + "DHE-RSA-CAMELLIA128-SHA256", +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 + "CAMELLIA256-SHA256", +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 + "DHE-RSA-CAMELLIA256-SHA256", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + "ECDHE-RSA-AES128-SHA256", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 + "ECDHE-ECDSA-AES128-SHA256", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 + "ECDH-RSA-AES128-SHA256", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 + "ECDH-ECDSA-AES128-SHA256", +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 + "ECDHE-RSA-AES256-SHA384", +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 + "ECDHE-ECDSA-AES256-SHA384", +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 + "ECDH-RSA-AES256-SHA384", +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 + "ECDH-ECDSA-AES256-SHA384", +#endif + +}; + + + +/* cipher suite number that matches above name table */ +static int cipher_name_idx[] = +{ + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA + SSL_RSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 + SSL_RSA_WITH_RC4_128_MD5, +#endif + +#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA + SSL_RSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA + TLS_RSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA + TLS_RSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA + TLS_RSA_WITH_NULL_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 + TLS_RSA_WITH_NULL_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA + TLS_DHE_RSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA + TLS_DHE_RSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 + TLS_PSK_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA + TLS_PSK_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA + TLS_PSK_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 + TLS_PSK_WITH_AES_128_CCM_8, +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 + TLS_PSK_WITH_AES_256_CCM_8, +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 + TLS_PSK_WITH_NULL_SHA256, +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA + TLS_PSK_WITH_NULL_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 + TLS_RSA_WITH_HC_128_MD5, +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA + TLS_RSA_WITH_HC_128_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 + TLS_RSA_WITH_HC_128_B2B256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 + TLS_RSA_WITH_AES_128_CBC_B2B256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 + TLS_RSA_WITH_AES_256_CBC_B2B256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA + TLS_RSA_WITH_RABBIT_SHA, +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA + TLS_NTRU_RSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA + TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA + TLS_NTRU_RSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA + TLS_NTRU_RSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 + TLS_RSA_WITH_AES_128_CCM_8, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 + TLS_RSA_WITH_AES_256_CCM_8, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 + TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA + TLS_ECDHE_RSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 + TLS_RSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 + TLS_RSA_WITH_AES_256_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 + TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA + TLS_ECDH_RSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA + TLS_ECDH_ECDSA_WITH_RC4_128_SHA, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 + TLS_RSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 + TLS_RSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 + TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 + TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 + TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 + TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 + TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 +#endif +}; + + +/* return true if set, else false */ +/* only supports full name from cipher_name[] delimited by : */ +int SetCipherList(Suites* s, const char* list) +{ + int ret = 0, i; + char name[MAX_SUITE_NAME]; + + char needle[] = ":"; + char* haystack = (char*)list; + char* prev; + + const int suiteSz = sizeof(cipher_names) / sizeof(cipher_names[0]); + int idx = 0; + int haveRSA = 0, haveECDSA = 0; + + if (s == NULL) { + CYASSL_MSG("SetCipherList suite pointer error"); + return 0; + } + + if (!list) + return 0; + + if (*list == 0) return 1; /* CyaSSL default */ + + if (XSTRNCMP(haystack, "ALL", 3) == 0) return 1; /* CyaSSL defualt */ + + for(;;) { + word32 len; + prev = haystack; + haystack = XSTRSTR(haystack, needle); + + if (!haystack) /* last cipher */ + len = min(sizeof(name), (word32)XSTRLEN(prev)); + else + len = min(sizeof(name), (word32)(haystack - prev)); + + XSTRNCPY(name, prev, len); + name[(len == sizeof(name)) ? len - 1 : len] = 0; + + for (i = 0; i < suiteSz; i++) + if (XSTRNCMP(name, cipher_names[i], sizeof(name)) == 0) { + if (XSTRSTR(name, "EC") || XSTRSTR(name, "CCM")) + s->suites[idx++] = ECC_BYTE; /* ECC suite */ + else + s->suites[idx++] = 0x00; /* normal */ + s->suites[idx++] = (byte)cipher_name_idx[i]; + + /* The suites are either ECDSA, RSA, or PSK. The RSA suites + * don't necessarily have RSA in the name. */ + if ((haveECDSA == 0) && XSTRSTR(name, "ECDSA")) { + haveECDSA = 1; + } + else if ((haveRSA == 0) && (XSTRSTR(name, "PSK") == NULL)) { + haveRSA = 1; + } + + if (!ret) ret = 1; /* found at least one */ + break; + } + if (!haystack) break; + haystack++; + } + + if (ret) { + s->setSuites = 1; + s->suiteSz = (word16)idx; + + idx = 0; + + if (haveECDSA) { + #ifdef CYASSL_SHA384 + s->hashSigAlgo[idx++] = sha384_mac; + s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + #endif + #ifndef NO_SHA256 + s->hashSigAlgo[idx++] = sha256_mac; + s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + #endif + s->hashSigAlgo[idx++] = sha_mac; + s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; + } + + if (haveRSA) { + #ifdef CYASSL_SHA384 + s->hashSigAlgo[idx++] = sha384_mac; + s->hashSigAlgo[idx++] = rsa_sa_algo; + #endif + #ifndef NO_SHA256 + s->hashSigAlgo[idx++] = sha256_mac; + s->hashSigAlgo[idx++] = rsa_sa_algo; + #endif + s->hashSigAlgo[idx++] = sha_mac; + s->hashSigAlgo[idx++] = rsa_sa_algo; + } + + s->hashSigAlgoSz = (word16)idx; + } + + return ret; +} + + +static void PickHashSigAlgo(CYASSL* ssl, + const byte* hashSigAlgo, word32 hashSigAlgoSz) +{ + word32 i; + + ssl->suites->sigAlgo = ssl->specs.sig_algo; + ssl->suites->hashAlgo = sha_mac; + + for (i = 0; i < hashSigAlgoSz; i += 2) { + if (hashSigAlgo[i+1] == ssl->specs.sig_algo) { + if (hashSigAlgo[i] == sha_mac) { + break; + } + #ifndef NO_SHA256 + else if (hashSigAlgo[i] == sha256_mac) { + ssl->suites->hashAlgo = sha256_mac; + break; + } + #endif + #ifdef CYASSL_SHA384 + else if (hashSigAlgo[i] == sha384_mac) { + ssl->suites->hashAlgo = sha384_mac; + break; + } + #endif + } + } +} + + +#ifdef CYASSL_CALLBACKS + + /* Initialisze HandShakeInfo */ + void InitHandShakeInfo(HandShakeInfo* info) + { + int i; + + info->cipherName[0] = 0; + for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) + info->packetNames[i][0] = 0; + info->numberPackets = 0; + info->negotiationError = 0; + } + + /* Set Final HandShakeInfo parameters */ + void FinishHandShakeInfo(HandShakeInfo* info, const CYASSL* ssl) + { + int i; + int sz = sizeof(cipher_name_idx)/sizeof(int); + + for (i = 0; i < sz; i++) + if (ssl->options.cipherSuite == (byte)cipher_name_idx[i]) { + if (ssl->options.cipherSuite0 == ECC_BYTE) + continue; /* ECC suites at end */ + XSTRNCPY(info->cipherName, cipher_names[i], MAX_CIPHERNAME_SZ); + break; + } + + /* error max and min are negative numbers */ + if (ssl->error <= MIN_PARAM_ERR && ssl->error >= MAX_PARAM_ERR) + info->negotiationError = ssl->error; + } + + + /* Add name to info packet names, increase packet name count */ + void AddPacketName(const char* name, HandShakeInfo* info) + { + if (info->numberPackets < MAX_PACKETS_HANDSHAKE) { + XSTRNCPY(info->packetNames[info->numberPackets++], name, + MAX_PACKETNAME_SZ); + } + } + + + /* Initialisze TimeoutInfo */ + void InitTimeoutInfo(TimeoutInfo* info) + { + int i; + + info->timeoutName[0] = 0; + info->flags = 0; + + for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) { + info->packets[i].packetName[0] = 0; + info->packets[i].timestamp.tv_sec = 0; + info->packets[i].timestamp.tv_usec = 0; + info->packets[i].bufferValue = 0; + info->packets[i].valueSz = 0; + } + info->numberPackets = 0; + info->timeoutValue.tv_sec = 0; + info->timeoutValue.tv_usec = 0; + } + + + /* Free TimeoutInfo */ + void FreeTimeoutInfo(TimeoutInfo* info, void* heap) + { + int i; + (void)heap; + for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) + if (info->packets[i].bufferValue) { + XFREE(info->packets[i].bufferValue, heap, DYNAMIC_TYPE_INFO); + info->packets[i].bufferValue = 0; + } + + } + + + /* Add PacketInfo to TimeoutInfo */ + void AddPacketInfo(const char* name, TimeoutInfo* info, const byte* data, + int sz, void* heap) + { + if (info->numberPackets < (MAX_PACKETS_HANDSHAKE - 1)) { + Timeval currTime; + + /* may add name after */ + if (name) + XSTRNCPY(info->packets[info->numberPackets].packetName, name, + MAX_PACKETNAME_SZ); + + /* add data, put in buffer if bigger than static buffer */ + info->packets[info->numberPackets].valueSz = sz; + if (sz < MAX_VALUE_SZ) + XMEMCPY(info->packets[info->numberPackets].value, data, sz); + else { + info->packets[info->numberPackets].bufferValue = + XMALLOC(sz, heap, DYNAMIC_TYPE_INFO); + if (!info->packets[info->numberPackets].bufferValue) + /* let next alloc catch, just don't fill, not fatal here */ + info->packets[info->numberPackets].valueSz = 0; + else + XMEMCPY(info->packets[info->numberPackets].bufferValue, + data, sz); + } + gettimeofday(&currTime, 0); + info->packets[info->numberPackets].timestamp.tv_sec = + currTime.tv_sec; + info->packets[info->numberPackets].timestamp.tv_usec = + currTime.tv_usec; + info->numberPackets++; + } + } + + + /* Add packet name to previsouly added packet info */ + void AddLateName(const char* name, TimeoutInfo* info) + { + /* make sure we have a valid previous one */ + if (info->numberPackets > 0 && info->numberPackets < + MAX_PACKETS_HANDSHAKE) { + XSTRNCPY(info->packets[info->numberPackets - 1].packetName, name, + MAX_PACKETNAME_SZ); + } + } + + /* Add record header to previsouly added packet info */ + void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info) + { + /* make sure we have a valid previous one */ + if (info->numberPackets > 0 && info->numberPackets < + MAX_PACKETS_HANDSHAKE) { + if (info->packets[info->numberPackets - 1].bufferValue) + XMEMCPY(info->packets[info->numberPackets - 1].bufferValue, rl, + RECORD_HEADER_SZ); + else + XMEMCPY(info->packets[info->numberPackets - 1].value, rl, + RECORD_HEADER_SZ); + } + } + +#endif /* CYASSL_CALLBACKS */ + + + +/* client only parts */ +#ifndef NO_CYASSL_CLIENT + + int SendClientHello(CYASSL* ssl) + { + byte *output; + word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int sendSz; + int idSz = ssl->options.resuming ? ID_LEN : 0; + int ret; + + if (ssl->suites == NULL) { + CYASSL_MSG("Bad suites pointer in SendClientHello"); + return SUITES_ERROR; + } + + length = VERSION_SZ + RAN_LEN + + idSz + ENUM_LEN + + ssl->suites->suiteSz + SUITE_LEN + + COMP_LEN + ENUM_LEN; + +#ifdef HAVE_TLS_EXTENSIONS + length += TLSX_GetRequestSize(ssl); +#else + if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) { + length += ssl->suites->hashSigAlgoSz + HELLO_EXT_SZ; + } +#endif + sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + length += ENUM_LEN; /* cookie */ + if (ssl->arrays->cookieSz != 0) length += ssl->arrays->cookieSz; + sendSz = length + DTLS_HANDSHAKE_HEADER_SZ + DTLS_RECORD_HEADER_SZ; + idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; + } +#endif + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, length, client_hello, ssl); + + /* client hello, first version */ + output[idx++] = ssl->version.major; + output[idx++] = ssl->version.minor; + ssl->chVersion = ssl->version; /* store in case changed */ + + /* then random */ + if (ssl->options.connectState == CONNECT_BEGIN) { + ret = RNG_GenerateBlock(ssl->rng, output + idx, RAN_LEN); + if (ret != 0) + return ret; + + /* store random */ + XMEMCPY(ssl->arrays->clientRandom, output + idx, RAN_LEN); + } else { +#ifdef CYASSL_DTLS + /* send same random on hello again */ + XMEMCPY(output + idx, ssl->arrays->clientRandom, RAN_LEN); +#endif + } + idx += RAN_LEN; + + /* then session id */ + output[idx++] = (byte)idSz; + if (idSz) { + XMEMCPY(output + idx, ssl->session.sessionID, ID_LEN); + idx += ID_LEN; + } + + /* then DTLS cookie */ +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + byte cookieSz = ssl->arrays->cookieSz; + + output[idx++] = cookieSz; + if (cookieSz) { + XMEMCPY(&output[idx], ssl->arrays->cookie, cookieSz); + idx += cookieSz; + } + } +#endif + /* then cipher suites */ + c16toa(ssl->suites->suiteSz, output + idx); + idx += 2; + XMEMCPY(output + idx, &ssl->suites->suites, ssl->suites->suiteSz); + idx += ssl->suites->suiteSz; + + /* last, compression */ + output[idx++] = COMP_LEN; + if (ssl->options.usingCompression) + output[idx++] = ZLIB_COMPRESSION; + else + output[idx++] = NO_COMPRESSION; + +#ifdef HAVE_TLS_EXTENSIONS + idx += TLSX_WriteRequest(ssl, output + idx); + + (void)idx; /* suppress analyzer warning, keep idx current */ +#else + if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) + { + int i; + /* add in the extensions length */ + c16toa(HELLO_EXT_LEN + ssl->suites->hashSigAlgoSz, output + idx); + idx += 2; + + c16toa(HELLO_EXT_SIG_ALGO, output + idx); + idx += 2; + c16toa(HELLO_EXT_SIGALGO_SZ+ssl->suites->hashSigAlgoSz, output+idx); + idx += 2; + c16toa(ssl->suites->hashSigAlgoSz, output + idx); + idx += 2; + for (i = 0; i < ssl->suites->hashSigAlgoSz; i++, idx++) { + output[idx] = ssl->suites->hashSigAlgo[i]; + } + } +#endif + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + ssl->options.clientState = CLIENT_HELLO_COMPLETE; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("ClientHello", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ClientHello", &ssl->timeoutInfo, output, sendSz, + ssl->heap); +#endif + + ssl->buffers.outputBuffer.length += sendSz; + + return SendBuffered(ssl); + } + + + static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input, + word32* inOutIdx, word32 size) + { + ProtocolVersion pv; + byte cookieSz; + word32 begin = *inOutIdx; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("HelloVerifyRequest", + &ssl->handShakeInfo); + if (ssl->toInfoOn) AddLateName("HelloVerifyRequest", &ssl->timeoutInfo); +#endif + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + DtlsPoolReset(ssl); + } +#endif + + if ((*inOutIdx - begin) + OPAQUE16_LEN + OPAQUE8_LEN > size) + return BUFFER_ERROR; + + XMEMCPY(&pv, input + *inOutIdx, OPAQUE16_LEN); + *inOutIdx += OPAQUE16_LEN; + + cookieSz = input[(*inOutIdx)++]; + + if (cookieSz) { + if ((*inOutIdx - begin) + cookieSz > size) + return BUFFER_ERROR; + +#ifdef CYASSL_DTLS + if (cookieSz <= MAX_COOKIE_LEN) { + XMEMCPY(ssl->arrays->cookie, input + *inOutIdx, cookieSz); + ssl->arrays->cookieSz = cookieSz; + } +#endif + *inOutIdx += cookieSz; + } + + ssl->options.serverState = SERVER_HELLOVERIFYREQUEST_COMPLETE; + return 0; + } + + + static int DoServerHello(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 helloSz) + { + byte b; + ProtocolVersion pv; + byte compression; + word32 i = *inOutIdx; + word32 begin = i; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("ServerHello", &ssl->handShakeInfo); + if (ssl->toInfoOn) AddLateName("ServerHello", &ssl->timeoutInfo); +#endif + + /* protocol version, random and session id length check */ + if ((i - begin) + OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz) + return BUFFER_ERROR; + + /* protocol version */ + XMEMCPY(&pv, input + i, OPAQUE16_LEN); + i += OPAQUE16_LEN; + + if (pv.minor > ssl->version.minor) { + CYASSL_MSG("Server using higher version, fatal error"); + return VERSION_ERROR; + } + else if (pv.minor < ssl->version.minor) { + CYASSL_MSG("server using lower version"); + + if (!ssl->options.downgrade) { + CYASSL_MSG(" no downgrade allowed, fatal error"); + return VERSION_ERROR; + } + + if (pv.minor == SSLv3_MINOR) { + /* turn off tls */ + CYASSL_MSG(" downgrading to SSLv3"); + ssl->options.tls = 0; + ssl->options.tls1_1 = 0; + ssl->version.minor = SSLv3_MINOR; + } + else if (pv.minor == TLSv1_MINOR) { + /* turn off tls 1.1+ */ + CYASSL_MSG(" downgrading to TLSv1"); + ssl->options.tls1_1 = 0; + ssl->version.minor = TLSv1_MINOR; + } + else if (pv.minor == TLSv1_1_MINOR) { + CYASSL_MSG(" downgrading to TLSv1.1"); + ssl->version.minor = TLSv1_1_MINOR; + } + } + + /* random */ + XMEMCPY(ssl->arrays->serverRandom, input + i, RAN_LEN); + i += RAN_LEN; + + /* session id */ + b = input[i++]; + + if (b == ID_LEN) { + if ((i - begin) + ID_LEN > helloSz) + return BUFFER_ERROR; + + XMEMCPY(ssl->arrays->sessionID, input + i, min(b, ID_LEN)); + i += ID_LEN; + ssl->options.haveSessionId = 1; + } + else if (b) { + CYASSL_MSG("Invalid session ID size"); + return BUFFER_ERROR; /* session ID nor 0 neither 32 bytes long */ + } + + /* suite and compression */ + if ((i - begin) + OPAQUE16_LEN + OPAQUE8_LEN > helloSz) + return BUFFER_ERROR; + + ssl->options.cipherSuite0 = input[i++]; + ssl->options.cipherSuite = input[i++]; + compression = input[i++]; + + if (compression != ZLIB_COMPRESSION && ssl->options.usingCompression) { + CYASSL_MSG("Server refused compression, turning off"); + ssl->options.usingCompression = 0; /* turn off if server refused */ + } + + *inOutIdx = i; + + /* tls extensions */ + if ( (i - begin) < helloSz) { +#ifdef HAVE_TLS_EXTENSIONS + if (IsTLS(ssl)) { + int ret = 0; + word16 totalExtSz; + Suites clSuites; /* just for compatibility right now */ + + if ((i - begin) + OPAQUE16_LEN > helloSz) + return BUFFER_ERROR; + + ato16(&input[i], &totalExtSz); + i += OPAQUE16_LEN; + + if ((i - begin) + totalExtSz > helloSz) + return BUFFER_ERROR; + + if ((ret = TLSX_Parse(ssl, (byte *) input + i, + totalExtSz, 0, &clSuites))) + return ret; + + i += totalExtSz; + *inOutIdx = i; + } + else +#endif + *inOutIdx = begin + helloSz; /* skip extensions */ + } + + ssl->options.serverState = SERVER_HELLO_COMPLETE; + + if (ssl->options.resuming) { + if (ssl->options.haveSessionId && XMEMCMP(ssl->arrays->sessionID, + ssl->session.sessionID, ID_LEN) == 0) { + if (SetCipherSpecs(ssl) == 0) { + int ret = -1; + + XMEMCPY(ssl->arrays->masterSecret, + ssl->session.masterSecret, SECRET_LEN); + #ifdef NO_OLD_TLS + ret = DeriveTlsKeys(ssl); + #else + #ifndef NO_TLS + if (ssl->options.tls) + ret = DeriveTlsKeys(ssl); + #endif + if (!ssl->options.tls) + ret = DeriveKeys(ssl); + #endif + ssl->options.serverState = SERVER_HELLODONE_COMPLETE; + + return ret; + } + else { + CYASSL_MSG("Unsupported cipher suite, DoServerHello"); + return UNSUPPORTED_SUITE; + } + } + else { + CYASSL_MSG("Server denied resumption attempt"); + ssl->options.resuming = 0; /* server denied resumption try */ + } + } + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + DtlsPoolReset(ssl); + } + #endif + + return SetCipherSpecs(ssl); + } + + +#ifndef NO_CERTS + /* just read in and ignore for now TODO: */ + static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32* + inOutIdx, word32 size) + { + word16 len; + word32 begin = *inOutIdx; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("CertificateRequest", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("CertificateRequest", &ssl->timeoutInfo); + #endif + + if ((*inOutIdx - begin) + OPAQUE8_LEN > size) + return BUFFER_ERROR; + + len = input[(*inOutIdx)++]; + + if ((*inOutIdx - begin) + len > size) + return BUFFER_ERROR; + + /* types, read in here */ + *inOutIdx += len; + + /* signature and hash signature algorithm */ + if (IsAtLeastTLSv1_2(ssl)) { + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &len); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + len > size) + return BUFFER_ERROR; + + PickHashSigAlgo(ssl, input + *inOutIdx, len); + *inOutIdx += len; + } + + /* authorities */ + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &len); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + len > size) + return BUFFER_ERROR; + + while (len) { + word16 dnSz; + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &dnSz); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + dnSz > size) + return BUFFER_ERROR; + + *inOutIdx += dnSz; + len -= OPAQUE16_LEN + dnSz; + } + + /* don't send client cert or cert verify if user hasn't provided + cert and private key */ + if (ssl->buffers.certificate.buffer && ssl->buffers.key.buffer) + ssl->options.sendVerify = SEND_CERT; + else if (IsTLS(ssl)) + ssl->options.sendVerify = SEND_BLANK_CERT; + + return 0; + } +#endif /* !NO_CERTS */ + + + static int DoServerKeyExchange(CYASSL* ssl, const byte* input, + word32* inOutIdx, word32 size) + { + word16 length = 0; + word32 begin = *inOutIdx; + int ret = 0; + + (void)length; /* shut up compiler warnings */ + (void)begin; + (void)ssl; + (void)input; + (void)size; + (void)ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("ServerKeyExchange", &ssl->timeoutInfo); + #endif + + #ifndef NO_PSK + if (ssl->specs.kea == psk_kea) { + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &length); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + XMEMCPY(ssl->arrays->server_hint, input + *inOutIdx, + min(length, MAX_PSK_ID_LEN)); + + ssl->arrays->server_hint[min(length, MAX_PSK_ID_LEN - 1)] = 0; + *inOutIdx += length; + + return 0; + } + #endif + #ifdef OPENSSL_EXTRA + if (ssl->specs.kea == diffie_hellman_kea) + { + /* p */ + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &length); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + ssl->buffers.serverDH_P.buffer = (byte*) XMALLOC(length, ssl->heap, + DYNAMIC_TYPE_DH); + + if (ssl->buffers.serverDH_P.buffer) + ssl->buffers.serverDH_P.length = length; + else + return MEMORY_ERROR; + + XMEMCPY(ssl->buffers.serverDH_P.buffer, input + *inOutIdx, length); + *inOutIdx += length; + + /* g */ + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &length); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + ssl->buffers.serverDH_G.buffer = (byte*) XMALLOC(length, ssl->heap, + DYNAMIC_TYPE_DH); + + if (ssl->buffers.serverDH_G.buffer) + ssl->buffers.serverDH_G.length = length; + else + return MEMORY_ERROR; + + XMEMCPY(ssl->buffers.serverDH_G.buffer, input + *inOutIdx, length); + *inOutIdx += length; + + /* pub */ + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &length); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + ssl->buffers.serverDH_Pub.buffer = (byte*) XMALLOC(length, ssl->heap, + DYNAMIC_TYPE_DH); + + if (ssl->buffers.serverDH_Pub.buffer) + ssl->buffers.serverDH_Pub.length = length; + else + return MEMORY_ERROR; + + XMEMCPY(ssl->buffers.serverDH_Pub.buffer, input + *inOutIdx, length); + *inOutIdx += length; + } /* dh_kea */ + #endif /* OPENSSL_EXTRA */ + + #ifdef HAVE_ECC + if (ssl->specs.kea == ecc_diffie_hellman_kea) + { + byte b; + + if ((*inOutIdx - begin) + ENUM_LEN + OPAQUE16_LEN + OPAQUE8_LEN > size) + return BUFFER_ERROR; + + b = input[(*inOutIdx)++]; + + if (b != named_curve) + return ECC_CURVETYPE_ERROR; + + *inOutIdx += 1; /* curve type, eat leading 0 */ + b = input[(*inOutIdx)++]; + + if (b != secp256r1 && b != secp384r1 && b != secp521r1 && b != + secp160r1 && b != secp192r1 && b != secp224r1) + return ECC_CURVE_ERROR; + + length = input[(*inOutIdx)++]; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + if (ecc_import_x963(input + *inOutIdx, length, ssl->peerEccKey) != 0) + return ECC_PEERKEY_ERROR; + + *inOutIdx += length; + ssl->peerEccKeyPresent = 1; + } + #endif /* HAVE_ECC */ + + #if defined(OPENSSL_EXTRA) || defined(HAVE_ECC) + { +#ifndef NO_OLD_TLS + Md5 md5; + Sha sha; +#endif +#ifndef NO_SHA256 + Sha256 sha256; + byte hash256[SHA256_DIGEST_SIZE]; +#endif +#ifdef CYASSL_SHA384 + Sha384 sha384; + byte hash384[SHA384_DIGEST_SIZE]; +#endif + byte hash[FINISHED_SZ]; + byte messageVerify[MAX_DH_SZ]; + byte hashAlgo = sha_mac; + byte sigAlgo = ssl->specs.sig_algo; + word16 verifySz = (word16) (*inOutIdx - begin); + + /* save message for hash verify */ + if (verifySz > sizeof(messageVerify)) + return BUFFER_ERROR; + + XMEMCPY(messageVerify, input + begin, verifySz); + + if (IsAtLeastTLSv1_2(ssl)) { + if ((*inOutIdx - begin) + ENUM_LEN + ENUM_LEN > size) + return BUFFER_ERROR; + + hashAlgo = input[(*inOutIdx)++]; + sigAlgo = input[(*inOutIdx)++]; + } + + /* signature */ + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &length); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + /* inOutIdx updated at the end of the function */ + + /* verify signature */ +#ifndef NO_OLD_TLS + /* md5 */ + InitMd5(&md5); + Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); + Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); + Md5Update(&md5, messageVerify, verifySz); + Md5Final(&md5, hash); + + /* sha */ + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); + ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); + ShaUpdate(&sha, messageVerify, verifySz); + ShaFinal(&sha, hash + MD5_DIGEST_SIZE); +#endif + +#ifndef NO_SHA256 + ret = InitSha256(&sha256); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, messageVerify, verifySz); + if (ret != 0) + return ret; + ret = Sha256Final(&sha256, hash256); + if (ret != 0) + return ret; +#endif + +#ifdef CYASSL_SHA384 + ret = InitSha384(&sha384); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, messageVerify, verifySz); + if (ret != 0) + return ret; + ret = Sha384Final(&sha384, hash384); + if (ret != 0) + return ret; +#endif + +#ifndef NO_RSA + /* rsa */ + if (sigAlgo == rsa_sa_algo) + { + byte* out = NULL; + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaVerifyCb) + doUserRsa = 1; + #endif /*HAVE_PK_CALLBACKS */ + + if (!ssl->peerRsaKeyPresent) + return NO_PEER_KEY; + + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + ret = ssl->ctx->RsaVerifyCb(ssl, (byte *) input + *inOutIdx, + length, &out, + ssl->buffers.peerRsaKey.buffer, + ssl->buffers.peerRsaKey.length, + ssl->RsaVerifyCtx); + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = RsaSSL_VerifyInline((byte *) input + *inOutIdx, length, + &out, ssl->peerRsaKey); + } + + if (IsAtLeastTLSv1_2(ssl)) { + byte encodedSig[MAX_ENCODED_SIG_SZ]; + word32 encSigSz; +#ifndef NO_OLD_TLS + byte* digest = &hash[MD5_DIGEST_SIZE]; + int typeH = SHAh; + int digestSz = SHA_DIGEST_SIZE; +#else + byte* digest = hash256; + int typeH = SHA256h; + int digestSz = SHA256_DIGEST_SIZE; +#endif + + if (hashAlgo == sha_mac) { + #ifndef NO_SHA + digest = &hash[MD5_DIGEST_SIZE]; + typeH = SHAh; + digestSz = SHA_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = hash256; + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = hash384; + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + + encSigSz = EncodeSignature(encodedSig, digest, digestSz, typeH); + + if (encSigSz != (word32)ret || !out || XMEMCMP(out, encodedSig, + min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) + return VERIFY_SIGN_ERROR; + } + else { + if (ret != sizeof(hash) || !out || XMEMCMP(out, + hash, sizeof(hash)) != 0) + return VERIFY_SIGN_ERROR; + } + } else +#endif +#ifdef HAVE_ECC + /* ecdsa */ + if (sigAlgo == ecc_dsa_sa_algo) { + int verify = 0; +#ifndef NO_OLD_TLS + byte* digest = &hash[MD5_DIGEST_SIZE]; + word32 digestSz = SHA_DIGEST_SIZE; +#else + byte* digest = hash256; + word32 digestSz = SHA256_DIGEST_SIZE; +#endif + byte doUserEcc = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->EccVerifyCb) + doUserEcc = 1; + #endif + + if (!ssl->peerEccDsaKeyPresent) + return NO_PEER_KEY; + + if (IsAtLeastTLSv1_2(ssl)) { + if (hashAlgo == sha_mac) { + #ifndef NO_SHA + digest = &hash[MD5_DIGEST_SIZE]; + digestSz = SHA_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = hash256; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = hash384; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + } + if (doUserEcc) { + #ifdef HAVE_PK_CALLBACKS + ret = ssl->ctx->EccVerifyCb(ssl, input + *inOutIdx, length, + digest, digestSz, + ssl->buffers.peerEccDsaKey.buffer, + ssl->buffers.peerEccDsaKey.length, + &verify, ssl->EccVerifyCtx); + #endif + } + else { + ret = ecc_verify_hash(input + *inOutIdx, length, + digest, digestSz, &verify, ssl->peerEccDsaKey); + } + if (ret != 0 || verify == 0) + return VERIFY_SIGN_ERROR; + } + else +#endif /* HAVE_ECC */ + return ALGO_ID_E; + + /* signature length */ + *inOutIdx += length; + + ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; + + return 0; + } +#else /* HAVE_OPENSSL or HAVE_ECC */ + return NOT_COMPILED_IN; /* not supported by build */ +#endif /* HAVE_OPENSSL or HAVE_ECC */ + } + + + int SendClientKeyExchange(CYASSL* ssl) + { + byte encSecret[MAX_ENCRYPT_SZ]; + word32 encSz = 0; + word32 idx = 0; + int ret = 0; + byte doUserRsa = 0; + + (void)doUserRsa; + + #ifdef HAVE_PK_CALLBACKS + #ifndef NO_RSA + if (ssl->ctx->RsaEncCb) + doUserRsa = 1; + #endif /* NO_RSA */ + #endif /*HAVE_PK_CALLBACKS */ + + switch (ssl->specs.kea) { + #ifndef NO_RSA + case rsa_kea: + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->preMasterSecret, + SECRET_LEN); + if (ret != 0) + return ret; + + ssl->arrays->preMasterSecret[0] = ssl->chVersion.major; + ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor; + ssl->arrays->preMasterSz = SECRET_LEN; + + if (ssl->peerRsaKeyPresent == 0) + return NO_PEER_KEY; + + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + #ifndef NO_RSA + encSz = sizeof(encSecret); + ret = ssl->ctx->RsaEncCb(ssl, + ssl->arrays->preMasterSecret, + SECRET_LEN, + encSecret, &encSz, + ssl->buffers.peerRsaKey.buffer, + ssl->buffers.peerRsaKey.length, + ssl->RsaEncCtx); + #endif /* NO_RSA */ + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = RsaPublicEncrypt(ssl->arrays->preMasterSecret, + SECRET_LEN, encSecret, sizeof(encSecret), + ssl->peerRsaKey, ssl->rng); + if (ret > 0) { + encSz = ret; + ret = 0; /* set success to 0 */ + } + } + break; + #endif + #ifdef OPENSSL_EXTRA + case diffie_hellman_kea: + { + buffer serverP = ssl->buffers.serverDH_P; + buffer serverG = ssl->buffers.serverDH_G; + buffer serverPub = ssl->buffers.serverDH_Pub; + byte priv[ENCRYPT_LEN]; + word32 privSz = 0; + DhKey key; + + if (serverP.buffer == 0 || serverG.buffer == 0 || + serverPub.buffer == 0) + return NO_PEER_KEY; + + InitDhKey(&key); + ret = DhSetKey(&key, serverP.buffer, serverP.length, + serverG.buffer, serverG.length); + if (ret == 0) + /* for DH, encSecret is Yc, agree is pre-master */ + ret = DhGenerateKeyPair(&key, ssl->rng, priv, &privSz, + encSecret, &encSz); + if (ret == 0) + ret = DhAgree(&key, ssl->arrays->preMasterSecret, + &ssl->arrays->preMasterSz, priv, privSz, + serverPub.buffer, serverPub.length); + FreeDhKey(&key); + } + break; + #endif /* OPENSSL_EXTRA */ + #ifndef NO_PSK + case psk_kea: + { + byte* pms = ssl->arrays->preMasterSecret; + + ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl, + ssl->arrays->server_hint, ssl->arrays->client_identity, + MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN); + if (ssl->arrays->psk_keySz == 0 || + ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) + return PSK_KEY_ERROR; + encSz = (word32)XSTRLEN(ssl->arrays->client_identity); + if (encSz > MAX_PSK_ID_LEN) return CLIENT_ID_ERROR; + XMEMCPY(encSecret, ssl->arrays->client_identity, encSz); + + /* make psk pre master secret */ + /* length of key + length 0s + length of key + key */ + c16toa((word16)ssl->arrays->psk_keySz, pms); + pms += 2; + XMEMSET(pms, 0, ssl->arrays->psk_keySz); + pms += ssl->arrays->psk_keySz; + c16toa((word16)ssl->arrays->psk_keySz, pms); + pms += 2; + XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz); + ssl->arrays->preMasterSz = ssl->arrays->psk_keySz * 2 + 4; + XMEMSET(ssl->arrays->psk_key, 0, ssl->arrays->psk_keySz); + ssl->arrays->psk_keySz = 0; /* No further need */ + } + break; + #endif /* NO_PSK */ + #ifdef HAVE_NTRU + case ntru_kea: + { + word32 rc; + word16 cipherLen = sizeof(encSecret); + DRBG_HANDLE drbg; + static uint8_t const cyasslStr[] = { + 'C', 'y', 'a', 'S', 'S', 'L', ' ', 'N', 'T', 'R', 'U' + }; + + ret = RNG_GenerateBlock(ssl->rng, + ssl->arrays->preMasterSecret, SECRET_LEN); + if (ret != 0) + return ret; + + ssl->arrays->preMasterSz = SECRET_LEN; + + if (ssl->peerNtruKeyPresent == 0) + return NO_PEER_KEY; + + rc = crypto_drbg_instantiate(MAX_NTRU_BITS, cyasslStr, + sizeof(cyasslStr), GetEntropy, + &drbg); + if (rc != DRBG_OK) + return NTRU_DRBG_ERROR; + + rc = crypto_ntru_encrypt(drbg, ssl->peerNtruKeyLen, + ssl->peerNtruKey, + ssl->arrays->preMasterSz, + ssl->arrays->preMasterSecret, + &cipherLen, encSecret); + crypto_drbg_uninstantiate(drbg); + if (rc != NTRU_OK) + return NTRU_ENCRYPT_ERROR; + + encSz = cipherLen; + ret = 0; + } + break; + #endif /* HAVE_NTRU */ + #ifdef HAVE_ECC + case ecc_diffie_hellman_kea: + { + ecc_key myKey; + ecc_key* peerKey = NULL; + word32 size = sizeof(encSecret); + + if (ssl->specs.static_ecdh) { + /* TODO: EccDsa is really fixed Ecc change naming */ + if (!ssl->peerEccDsaKeyPresent || !ssl->peerEccDsaKey->dp) + return NO_PEER_KEY; + peerKey = ssl->peerEccDsaKey; + } + else { + if (!ssl->peerEccKeyPresent || !ssl->peerEccKey->dp) + return NO_PEER_KEY; + peerKey = ssl->peerEccKey; + } + + if (peerKey == NULL) + return NO_PEER_KEY; + + ecc_init(&myKey); + ret = ecc_make_key(ssl->rng, peerKey->dp->size, &myKey); + if (ret != 0) + return ECC_MAKEKEY_ERROR; + + /* precede export with 1 byte length */ + ret = ecc_export_x963(&myKey, encSecret + 1, &size); + encSecret[0] = (byte)size; + encSz = size + 1; + + if (ret != 0) + ret = ECC_EXPORT_ERROR; + else { + size = sizeof(ssl->arrays->preMasterSecret); + ret = ecc_shared_secret(&myKey, peerKey, + ssl->arrays->preMasterSecret, &size); + if (ret != 0) + ret = ECC_SHARED_ERROR; + } + + ssl->arrays->preMasterSz = size; + ecc_free(&myKey); + } + break; + #endif /* HAVE_ECC */ + default: + return ALGO_ID_E; /* unsupported kea */ + } + + if (ret == 0) { + byte *output; + int sendSz; + word32 tlsSz = 0; + + if (ssl->options.tls || ssl->specs.kea == diffie_hellman_kea) + tlsSz = 2; + + if (ssl->specs.kea == ecc_diffie_hellman_kea) /* always off */ + tlsSz = 0; + + sendSz = encSz + tlsSz + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + idx = HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; + idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; + } + #endif + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, encSz + tlsSz, client_key_exchange, ssl); + + if (tlsSz) { + c16toa((word16)encSz, &output[idx]); + idx += 2; + } + XMEMCPY(output + idx, encSecret, encSz); + /* if add more to output, adjust idx + idx += encSz; */ + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ClientKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ClientKeyExchange", &ssl->timeoutInfo, + output, sendSz, ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + + if (ssl->options.groupMessages) + ret = 0; + else + ret = SendBuffered(ssl); + } + + if (ret == 0 || ret == WANT_WRITE) { + int tmpRet = MakeMasterSecret(ssl); + if (tmpRet != 0) + ret = tmpRet; /* save WANT_WRITE unless more serious */ + ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; + } + /* No further need for PMS */ + XMEMSET(ssl->arrays->preMasterSecret, 0, ssl->arrays->preMasterSz); + ssl->arrays->preMasterSz = 0; + + return ret; + } + +#ifndef NO_CERTS + int SendCertificateVerify(CYASSL* ssl) + { + byte *output; + int sendSz = 0, length, ret; + word32 idx = 0; + word32 sigOutSz = 0; +#ifndef NO_RSA + RsaKey key; + int initRsaKey = 0; +#endif + int usingEcc = 0; +#ifdef HAVE_ECC + ecc_key eccKey; +#endif + + (void)idx; + + if (ssl->options.sendVerify == SEND_BLANK_CERT) + return 0; /* sent blank cert, can't verify */ + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, MAX_CERT_VERIFY_SZ)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + ret = BuildCertHashes(ssl, &ssl->certHashes); + if (ret != 0) + return ret; + +#ifdef HAVE_ECC + ecc_init(&eccKey); +#endif +#ifndef NO_RSA + ret = InitRsaKey(&key, ssl->heap); + if (ret == 0) initRsaKey = 1; + if (ret == 0) + ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &idx, &key, + ssl->buffers.key.length); + if (ret == 0) + sigOutSz = RsaEncryptSize(&key); + else +#endif + { + #ifdef HAVE_ECC + CYASSL_MSG("Trying ECC client cert, RSA didn't work"); + + idx = 0; + ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &idx, &eccKey, + ssl->buffers.key.length); + if (ret == 0) { + CYASSL_MSG("Using ECC client cert"); + usingEcc = 1; + sigOutSz = MAX_ENCODED_SIG_SZ; + } + else { + CYASSL_MSG("Bad client cert type"); + } + #endif + } + if (ret == 0) { + byte* verify = (byte*)&output[RECORD_HEADER_SZ + + HANDSHAKE_HEADER_SZ]; +#ifndef NO_OLD_TLS + byte* signBuffer = ssl->certHashes.md5; +#else + byte* signBuffer = NULL; +#endif + word32 signSz = FINISHED_SZ; + byte encodedSig[MAX_ENCODED_SIG_SZ]; + word32 extraSz = 0; /* tls 1.2 hash/sig */ + + (void)encodedSig; + (void)signSz; + (void)signBuffer; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + verify += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + #endif + length = sigOutSz; + if (IsAtLeastTLSv1_2(ssl)) { + verify[0] = ssl->suites->hashAlgo; + verify[1] = usingEcc ? ecc_dsa_sa_algo : rsa_sa_algo; + extraSz = HASH_SIG_SIZE; + } + + if (usingEcc) { +#ifdef HAVE_ECC + word32 localSz = MAX_ENCODED_SIG_SZ; + word32 digestSz; + byte* digest; + byte doUserEcc = 0; +#ifndef NO_OLD_TLS + /* old tls default */ + digestSz = SHA_DIGEST_SIZE; + digest = ssl->certHashes.sha; +#else + /* new tls default */ + digestSz = SHA256_DIGEST_SIZE; + digest = ssl->certHashes.sha256; +#endif + + #ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + if (ssl->ctx->EccSignCb) + doUserEcc = 1; + #endif /* HAVE_ECC */ + #endif /*HAVE_PK_CALLBACKS */ + + if (IsAtLeastTLSv1_2(ssl)) { + if (ssl->suites->hashAlgo == sha_mac) { + #ifndef NO_SHA + digest = ssl->certHashes.sha; + digestSz = SHA_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = ssl->certHashes.sha256; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = ssl->certHashes.sha384; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + } + + if (doUserEcc) { + #ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ret = ssl->ctx->EccSignCb(ssl, digest, digestSz, + encodedSig, &localSz, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->EccSignCtx); + #endif /* HAVE_ECC */ + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = ecc_sign_hash(digest, digestSz, encodedSig, + &localSz, ssl->rng, &eccKey); + } + if (ret == 0) { + length = localSz; + c16toa((word16)length, verify + extraSz); /* prepend hdr */ + XMEMCPY(verify + extraSz + VERIFY_HEADER,encodedSig,length); + } +#endif + } +#ifndef NO_RSA + else { + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaSignCb) + doUserRsa = 1; + #endif /*HAVE_PK_CALLBACKS */ + + if (IsAtLeastTLSv1_2(ssl)) { +#ifndef NO_OLD_TLS + byte* digest = ssl->certHashes.sha; + int digestSz = SHA_DIGEST_SIZE; + int typeH = SHAh; +#else + byte* digest = ssl->certHashes.sha256; + int digestSz = SHA256_DIGEST_SIZE; + int typeH = SHA256h; +#endif + + if (ssl->suites->hashAlgo == sha_mac) { + #ifndef NO_SHA + digest = ssl->certHashes.sha; + typeH = SHAh; + digestSz = SHA_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = ssl->certHashes.sha256; + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = ssl->certHashes.sha384; + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + + signSz = EncodeSignature(encodedSig, digest,digestSz,typeH); + signBuffer = encodedSig; + } + + c16toa((word16)length, verify + extraSz); /* prepend hdr */ + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + #ifndef NO_RSA + word32 ioLen = ENCRYPT_LEN; + ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, + verify + extraSz + VERIFY_HEADER, + &ioLen, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->RsaSignCtx); + #endif /* NO_RSA */ + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = RsaSSL_Sign(signBuffer, signSz, verify + extraSz + + VERIFY_HEADER, ENCRYPT_LEN, &key, ssl->rng); + } + + if (ret > 0) + ret = 0; /* RSA reset */ + } +#endif + if (ret == 0) { + AddHeaders(output, length + extraSz + VERIFY_HEADER, + certificate_verify, ssl); + + sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + length + + extraSz + VERIFY_HEADER; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + } + } +#ifndef NO_RSA + if (initRsaKey) + FreeRsaKey(&key); +#endif +#ifdef HAVE_ECC + ecc_free(&eccKey); +#endif + + if (ret == 0) { + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("CertificateVerify", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("CertificateVerify", &ssl->timeoutInfo, + output, sendSz, ssl->heap); + #endif + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + return 0; + else + return SendBuffered(ssl); + } + else + return ret; + } +#endif /* NO_CERTS */ + + +#endif /* NO_CYASSL_CLIENT */ + + +#ifndef NO_CYASSL_SERVER + + int SendServerHello(CYASSL* ssl) + { + byte *output; + word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int sendSz; + int ret; + + length = VERSION_SZ + RAN_LEN + + ID_LEN + ENUM_LEN + + SUITE_LEN + + ENUM_LEN; + +#ifdef HAVE_TLS_EXTENSIONS + length += TLSX_GetResponseSize(ssl); +#endif + + /* check for avalaible size */ + if ((ret = CheckAvailableSize(ssl, MAX_HELLO_SZ)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + AddHeaders(output, length, server_hello, ssl); + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + } + #endif + /* now write to output */ + /* first version */ + output[idx++] = ssl->version.major; + output[idx++] = ssl->version.minor; + + /* then random */ + if (!ssl->options.resuming) { + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, + RAN_LEN); + if (ret != 0) + return ret; + } + + XMEMCPY(output + idx, ssl->arrays->serverRandom, RAN_LEN); + idx += RAN_LEN; + +#ifdef SHOW_SECRETS + { + int j; + printf("server random: "); + for (j = 0; j < RAN_LEN; j++) + printf("%02x", ssl->arrays->serverRandom[j]); + printf("\n"); + } +#endif + /* then session id */ + output[idx++] = ID_LEN; + + if (!ssl->options.resuming) { + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->sessionID, ID_LEN); + if (ret != 0) + return ret; + } + + XMEMCPY(output + idx, ssl->arrays->sessionID, ID_LEN); + idx += ID_LEN; + + /* then cipher suite */ + output[idx++] = ssl->options.cipherSuite0; + output[idx++] = ssl->options.cipherSuite; + + /* then compression */ + if (ssl->options.usingCompression) + output[idx++] = ZLIB_COMPRESSION; + else + output[idx++] = NO_COMPRESSION; + + /* last, extensions */ +#ifdef HAVE_TLS_EXTENSIONS + if (IsTLS(ssl)) + TLSX_WriteResponse(ssl, output + idx); +#endif + + ssl->buffers.outputBuffer.length += sendSz; + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerHello", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ServerHello", &ssl->timeoutInfo, output, sendSz, + ssl->heap); + #endif + + ssl->options.serverState = SERVER_HELLO_COMPLETE; + + if (ssl->options.groupMessages) + return 0; + else + return SendBuffered(ssl); + } + + +#ifdef HAVE_ECC + + static byte SetCurveId(int size) + { + switch(size) { + case 20: + return secp160r1; + case 24: + return secp192r1; + case 28: + return secp224r1; + case 32: + return secp256r1; + case 48: + return secp384r1; + case 66: + return secp521r1; + default: + return 0; + } + } + +#endif /* HAVE_ECC */ + + + int SendServerKeyExchange(CYASSL* ssl) + { + int ret = 0; + (void)ssl; + + #ifndef NO_PSK + if (ssl->specs.kea == psk_kea) + { + byte *output; + word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int sendSz; + if (ssl->arrays->server_hint[0] == 0) return 0; /* don't send */ + + /* include size part */ + length = (word32)XSTRLEN(ssl->arrays->server_hint); + if (length > MAX_PSK_ID_LEN) return SERVER_HINT_ERROR; + length += HINT_LEN_SZ; + sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + } + #endif + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, length, server_key_exchange, ssl); + + /* key data */ + c16toa((word16)(length - HINT_LEN_SZ), output + idx); + idx += HINT_LEN_SZ; + XMEMCPY(output + idx, ssl->arrays->server_hint,length -HINT_LEN_SZ); + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, + output, sendSz, ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + ret = 0; + else + ret = SendBuffered(ssl); + ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; + } + #endif /*NO_PSK */ + + #ifdef HAVE_ECC + if (ssl->specs.kea == ecc_diffie_hellman_kea) + { + byte *output; + word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int sendSz; + byte exportBuf[MAX_EXPORT_ECC_SZ]; + word32 expSz = sizeof(exportBuf); + word32 sigSz; + word32 preSigSz, preSigIdx; +#ifndef NO_RSA + RsaKey rsaKey; +#endif + ecc_key dsaKey; + + if (ssl->specs.static_ecdh) { + CYASSL_MSG("Using Static ECDH, not sending ServerKeyExchagne"); + return 0; + } + + /* curve type, named curve, length(1) */ + length = ENUM_LEN + CURVE_LEN + ENUM_LEN; + /* pub key size */ + CYASSL_MSG("Using ephemeral ECDH"); + if (ecc_export_x963(ssl->eccTempKey, exportBuf, &expSz) != 0) + return ECC_EXPORT_ERROR; + length += expSz; + + preSigSz = length; + preSigIdx = idx; + +#ifndef NO_RSA + ret = InitRsaKey(&rsaKey, ssl->heap); + if (ret != 0) return ret; +#endif + ecc_init(&dsaKey); + + /* sig length */ + length += LENGTH_SZ; + + if (!ssl->buffers.key.buffer) { +#ifndef NO_RSA + FreeRsaKey(&rsaKey); +#endif + ecc_free(&dsaKey); + return NO_PRIVATE_KEY; + } + +#ifndef NO_RSA + if (ssl->specs.sig_algo == rsa_sa_algo) { + /* rsa sig size */ + word32 i = 0; + ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, + &rsaKey, ssl->buffers.key.length); + if (ret != 0) return ret; + sigSz = RsaEncryptSize(&rsaKey); + } else +#endif + if (ssl->specs.sig_algo == ecc_dsa_sa_algo) { + /* ecdsa sig size */ + word32 i = 0; + ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &i, + &dsaKey, ssl->buffers.key.length); + if (ret != 0) return ret; + sigSz = ecc_sig_size(&dsaKey); /* worst case estimate */ + } + else { +#ifndef NO_RSA + FreeRsaKey(&rsaKey); +#endif + ecc_free(&dsaKey); + return ALGO_ID_E; /* unsupported type */ + } + length += sigSz; + + if (IsAtLeastTLSv1_2(ssl)) + length += HASH_SIG_SIZE; + + sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + preSigIdx = idx; + } + #endif + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) { +#ifndef NO_RSA + FreeRsaKey(&rsaKey); +#endif + ecc_free(&dsaKey); + return ret; + } + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + /* record and message headers will be added below, when we're sure + of the sig length */ + + /* key exchange data */ + output[idx++] = named_curve; + output[idx++] = 0x00; /* leading zero */ + output[idx++] = SetCurveId(ecc_size(ssl->eccTempKey)); + output[idx++] = (byte)expSz; + XMEMCPY(output + idx, exportBuf, expSz); + idx += expSz; + if (IsAtLeastTLSv1_2(ssl)) { + output[idx++] = ssl->suites->hashAlgo; + output[idx++] = ssl->suites->sigAlgo; + } + + /* Signtaure length will be written later, when we're sure what it + is */ + + /* do signature */ + { +#ifndef NO_OLD_TLS + Md5 md5; + Sha sha; +#endif + byte hash[FINISHED_SZ]; + #ifndef NO_SHA256 + Sha256 sha256; + byte hash256[SHA256_DIGEST_SIZE]; + #endif + #ifdef CYASSL_SHA384 + Sha384 sha384; + byte hash384[SHA384_DIGEST_SIZE]; + #endif + +#ifndef NO_OLD_TLS + /* md5 */ + InitMd5(&md5); + Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); + Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); + Md5Update(&md5, output + preSigIdx, preSigSz); + Md5Final(&md5, hash); + + /* sha */ + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); + ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); + ShaUpdate(&sha, output + preSigIdx, preSigSz); + ShaFinal(&sha, &hash[MD5_DIGEST_SIZE]); +#endif + + #ifndef NO_SHA256 + ret = InitSha256(&sha256); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, output + preSigIdx, preSigSz); + if (ret != 0) + return ret; + ret = Sha256Final(&sha256, hash256); + if (ret != 0) + return ret; + #endif + + #ifdef CYASSL_SHA384 + ret = InitSha384(&sha384); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, output + preSigIdx, preSigSz); + if (ret != 0) + return ret; + ret = Sha384Final(&sha384, hash384); + if (ret != 0) + return ret; + #endif +#ifndef NO_RSA + if (ssl->suites->sigAlgo == rsa_sa_algo) { + byte* signBuffer = hash; + word32 signSz = sizeof(hash); + byte encodedSig[MAX_ENCODED_SIG_SZ]; + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaSignCb) + doUserRsa = 1; + #endif /*HAVE_PK_CALLBACKS */ + + if (IsAtLeastTLSv1_2(ssl)) { + byte* digest = &hash[MD5_DIGEST_SIZE]; + int typeH = SHAh; + int digestSz = SHA_DIGEST_SIZE; + + if (ssl->suites->hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = hash256; + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = hash384; + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + + signSz = EncodeSignature(encodedSig, digest, digestSz, + typeH); + signBuffer = encodedSig; + } + /* write sig size here */ + c16toa((word16)sigSz, output + idx); + idx += LENGTH_SZ; + + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + word32 ioLen = sigSz; + ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, + output + idx, + &ioLen, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->RsaSignCtx); + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = RsaSSL_Sign(signBuffer, signSz, output + idx, + sigSz, &rsaKey, ssl->rng); + if (ret > 0) + ret = 0; /* reset on success */ + } + FreeRsaKey(&rsaKey); + ecc_free(&dsaKey); + if (ret < 0) + return ret; + } else +#endif + if (ssl->suites->sigAlgo == ecc_dsa_sa_algo) { +#ifndef NO_OLD_TLS + byte* digest = &hash[MD5_DIGEST_SIZE]; + word32 digestSz = SHA_DIGEST_SIZE; +#else + byte* digest = hash256; + word32 digestSz = SHA256_DIGEST_SIZE; +#endif + word32 sz = sigSz; + byte doUserEcc = 0; + + #ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + if (ssl->ctx->EccSignCb) + doUserEcc = 1; + #endif /* HAVE_ECC */ + #endif /*HAVE_PK_CALLBACKS */ + + if (IsAtLeastTLSv1_2(ssl)) { + if (ssl->suites->hashAlgo == sha_mac) { + #ifndef NO_SHA + digest = &hash[MD5_DIGEST_SIZE]; + digestSz = SHA_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = hash256; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = hash384; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + } + + if (doUserEcc) { + #ifdef HAVE_PK_CALLBACKS + #ifdef HAVE_ECC + ret = ssl->ctx->EccSignCb(ssl, digest, digestSz, + output + LENGTH_SZ + idx, &sz, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->EccSignCtx); + #endif /* HAVE_ECC */ + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = ecc_sign_hash(digest, digestSz, + output + LENGTH_SZ + idx, &sz, ssl->rng, &dsaKey); + } +#ifndef NO_RSA + FreeRsaKey(&rsaKey); +#endif + ecc_free(&dsaKey); + if (ret < 0) return ret; + + /* Now that we know the real sig size, write it. */ + c16toa((word16)sz, output + idx); + + /* And adjust length and sendSz from estimates */ + length += sz - sigSz; + sendSz += sz - sigSz; + } + } + + AddHeaders(output, length, server_key_exchange, ssl); + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, + output, sendSz, ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + ret = 0; + else + ret = SendBuffered(ssl); + ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; + } + #endif /* HAVE_ECC */ + + #ifdef OPENSSL_EXTRA + if (ssl->specs.kea == diffie_hellman_kea) { + byte *output; + word32 length = 0, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int sendSz; + word32 sigSz = 0, i = 0; + word32 preSigSz = 0, preSigIdx = 0; + RsaKey rsaKey; + DhKey dhKey; + + if (ssl->buffers.serverDH_P.buffer == NULL || + ssl->buffers.serverDH_G.buffer == NULL) + return NO_DH_PARAMS; + + if (ssl->buffers.serverDH_Pub.buffer == NULL) { + ssl->buffers.serverDH_Pub.buffer = (byte*)XMALLOC( + ssl->buffers.serverDH_P.length + 2, ssl->ctx->heap, + DYNAMIC_TYPE_DH); + if (ssl->buffers.serverDH_Pub.buffer == NULL) + return MEMORY_E; + } + + if (ssl->buffers.serverDH_Priv.buffer == NULL) { + ssl->buffers.serverDH_Priv.buffer = (byte*)XMALLOC( + ssl->buffers.serverDH_P.length + 2, ssl->ctx->heap, + DYNAMIC_TYPE_DH); + if (ssl->buffers.serverDH_Priv.buffer == NULL) + return MEMORY_E; + } + + InitDhKey(&dhKey); + ret = DhSetKey(&dhKey, ssl->buffers.serverDH_P.buffer, + ssl->buffers.serverDH_P.length, + ssl->buffers.serverDH_G.buffer, + ssl->buffers.serverDH_G.length); + if (ret == 0) + ret = DhGenerateKeyPair(&dhKey, ssl->rng, + ssl->buffers.serverDH_Priv.buffer, + &ssl->buffers.serverDH_Priv.length, + ssl->buffers.serverDH_Pub.buffer, + &ssl->buffers.serverDH_Pub.length); + FreeDhKey(&dhKey); + + if (ret == 0) { + ret = InitRsaKey(&rsaKey, ssl->heap); + if (ret != 0) return ret; + } + if (ret == 0) { + length = LENGTH_SZ * 3; /* p, g, pub */ + length += ssl->buffers.serverDH_P.length + + ssl->buffers.serverDH_G.length + + ssl->buffers.serverDH_Pub.length; + + preSigIdx = idx; + preSigSz = length; + + /* sig length */ + length += LENGTH_SZ; + + if (!ssl->buffers.key.buffer) + return NO_PRIVATE_KEY; + + ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, &rsaKey, + ssl->buffers.key.length); + if (ret == 0) { + sigSz = RsaEncryptSize(&rsaKey); + length += sigSz; + } + } + if (ret != 0) { + FreeRsaKey(&rsaKey); + return ret; + } + + if (IsAtLeastTLSv1_2(ssl)) + length += HASH_SIG_SIZE; + + sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + preSigIdx = idx; + } + #endif + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) { + FreeRsaKey(&rsaKey); + return ret; + } + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, length, server_key_exchange, ssl); + + /* add p, g, pub */ + c16toa((word16)ssl->buffers.serverDH_P.length, output + idx); + idx += LENGTH_SZ; + XMEMCPY(output + idx, ssl->buffers.serverDH_P.buffer, + ssl->buffers.serverDH_P.length); + idx += ssl->buffers.serverDH_P.length; + + /* g */ + c16toa((word16)ssl->buffers.serverDH_G.length, output + idx); + idx += LENGTH_SZ; + XMEMCPY(output + idx, ssl->buffers.serverDH_G.buffer, + ssl->buffers.serverDH_G.length); + idx += ssl->buffers.serverDH_G.length; + + /* pub */ + c16toa((word16)ssl->buffers.serverDH_Pub.length, output + idx); + idx += LENGTH_SZ; + XMEMCPY(output + idx, ssl->buffers.serverDH_Pub.buffer, + ssl->buffers.serverDH_Pub.length); + idx += ssl->buffers.serverDH_Pub.length; + + /* Add signature */ + if (IsAtLeastTLSv1_2(ssl)) { + output[idx++] = ssl->suites->hashAlgo; + output[idx++] = ssl->suites->sigAlgo; + } + /* size */ + c16toa((word16)sigSz, output + idx); + idx += LENGTH_SZ; + + /* do signature */ + { +#ifndef NO_OLD_TLS + Md5 md5; + Sha sha; +#endif + byte hash[FINISHED_SZ]; + #ifndef NO_SHA256 + Sha256 sha256; + byte hash256[SHA256_DIGEST_SIZE]; + #endif + #ifdef CYASSL_SHA384 + Sha384 sha384; + byte hash384[SHA384_DIGEST_SIZE]; + #endif + +#ifndef NO_OLD_TLS + /* md5 */ + InitMd5(&md5); + Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); + Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); + Md5Update(&md5, output + preSigIdx, preSigSz); + Md5Final(&md5, hash); + + /* sha */ + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); + ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); + ShaUpdate(&sha, output + preSigIdx, preSigSz); + ShaFinal(&sha, &hash[MD5_DIGEST_SIZE]); +#endif + + #ifndef NO_SHA256 + ret = InitSha256(&sha256); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha256Update(&sha256, output + preSigIdx, preSigSz); + if (ret != 0) + return ret; + ret = Sha256Final(&sha256, hash256); + if (ret != 0) + return ret; + #endif + + #ifdef CYASSL_SHA384 + ret = InitSha384(&sha384); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); + if (ret != 0) + return ret; + ret = Sha384Update(&sha384, output + preSigIdx, preSigSz); + if (ret != 0) + return ret; + ret = Sha384Final(&sha384, hash384); + if (ret != 0) + return ret; + #endif +#ifndef NO_RSA + if (ssl->suites->sigAlgo == rsa_sa_algo) { + byte* signBuffer = hash; + word32 signSz = sizeof(hash); + byte encodedSig[MAX_ENCODED_SIG_SZ]; + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaSignCb) + doUserRsa = 1; + #endif /*HAVE_PK_CALLBACKS */ + + if (IsAtLeastTLSv1_2(ssl)) { + byte* digest = &hash[MD5_DIGEST_SIZE]; + int typeH = SHAh; + int digestSz = SHA_DIGEST_SIZE; + + if (ssl->suites->hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = hash256; + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (ssl->suites->hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = hash384; + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + + signSz = EncodeSignature(encodedSig, digest, digestSz, + typeH); + signBuffer = encodedSig; + } + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + word32 ioLen = sigSz; + ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, + output + idx, + &ioLen, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->RsaSignCtx); + #endif /*HAVE_PK_CALLBACKS */ + } + else { + ret = RsaSSL_Sign(signBuffer, signSz, output + idx, + sigSz, &rsaKey, ssl->rng); + } + FreeRsaKey(&rsaKey); + if (ret < 0) + return ret; + } +#endif + } + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, + output, sendSz, ssl->heap); + #endif + + ssl->buffers.outputBuffer.length += sendSz; + if (ssl->options.groupMessages) + ret = 0; + else + ret = SendBuffered(ssl); + ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; + } + #endif /* OPENSSL_EXTRA */ + + return ret; + } + + + /* cipher requirements */ + enum { + REQUIRES_RSA, + REQUIRES_DHE, + REQUIRES_ECC_DSA, + REQUIRES_ECC_STATIC, + REQUIRES_PSK, + REQUIRES_NTRU, + REQUIRES_RSA_SIG + }; + + + + /* Does this cipher suite (first, second) have the requirement + an ephemeral key exchange will still require the key for signing + the key exchange so ECHDE_RSA requires an rsa key thus rsa_kea */ + static int CipherRequires(byte first, byte second, int requirement) + { + /* ECC extensions */ + if (first == ECC_BYTE) { + + switch (second) { + +#ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; + +#ifndef NO_DES3 + case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; +#endif + +#ifndef NO_RC4 + case TLS_ECDHE_RSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDH_RSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; +#endif +#endif /* NO_RSA */ + +#ifndef NO_DES3 + case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; +#endif +#ifndef NO_RC4 + case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; +#endif +#ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; +#endif + + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; + + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; + + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; + +#ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; + + case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_ECC_STATIC) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; + + case TLS_RSA_WITH_AES_128_CCM_8 : + case TLS_RSA_WITH_AES_256_CCM_8 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; + + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + break; + + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : + if (requirement == REQUIRES_RSA_SIG) + return 1; + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; +#endif + + case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 : + case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : + if (requirement == REQUIRES_ECC_DSA) + return 1; + break; + + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : + if (requirement == REQUIRES_ECC_DSA) + return 1; + if (requirement == REQUIRES_ECC_STATIC) + return 1; + break; + + case TLS_PSK_WITH_AES_128_CCM: + case TLS_PSK_WITH_AES_256_CCM: + case TLS_PSK_WITH_AES_128_CCM_8: + case TLS_PSK_WITH_AES_256_CCM_8: + if (requirement == REQUIRES_PSK) + return 1; + break; + + default: + CYASSL_MSG("Unsupported cipher suite, CipherRequires ECC"); + return 0; + } /* switch */ + } /* if */ + if (first != ECC_BYTE) { /* normal suites */ + switch (second) { + +#ifndef NO_RSA + case SSL_RSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_NTRU_RSA_WITH_RC4_128_SHA : + if (requirement == REQUIRES_NTRU) + return 1; + break; + + case SSL_RSA_WITH_RC4_128_MD5 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case SSL_RSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : + if (requirement == REQUIRES_NTRU) + return 1; + break; + + case TLS_RSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_AES_128_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_NTRU) + return 1; + break; + + case TLS_RSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_AES_256_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_NULL_SHA : + case TLS_RSA_WITH_NULL_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_NTRU) + return 1; + break; +#endif + + case TLS_PSK_WITH_AES_128_CBC_SHA256 : + case TLS_PSK_WITH_AES_128_CBC_SHA : + case TLS_PSK_WITH_AES_256_CBC_SHA : + case TLS_PSK_WITH_NULL_SHA256 : + case TLS_PSK_WITH_NULL_SHA : + if (requirement == REQUIRES_PSK) + return 1; + break; + +#ifndef NO_RSA + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; + + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; + + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; + + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; + + case TLS_RSA_WITH_HC_128_MD5 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_HC_128_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_HC_128_B2B256: + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_AES_128_CBC_B2B256: + case TLS_RSA_WITH_AES_256_CBC_B2B256: + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_RABBIT_SHA : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_RSA_WITH_AES_128_GCM_SHA256 : + case TLS_RSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : + case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; + + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + break; + + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + if (requirement == REQUIRES_RSA) + return 1; + if (requirement == REQUIRES_RSA_SIG) + return 1; + if (requirement == REQUIRES_DHE) + return 1; + break; +#endif + + default: + CYASSL_MSG("Unsupported cipher suite, CipherRequires"); + return 0; + } /* switch */ + } /* if ECC / Normal suites else */ + + return 0; + } + + + /* Make sure client setup is valid for this suite, true on success */ + int VerifyClientSuite(CYASSL* ssl) + { + int havePSK = 0; + byte first = ssl->options.cipherSuite0; + byte second = ssl->options.cipherSuite; + + CYASSL_ENTER("VerifyClientSuite"); + + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + + if (CipherRequires(first, second, REQUIRES_PSK)) { + CYASSL_MSG("Requires PSK"); + if (havePSK == 0) { + CYASSL_MSG("Don't have PSK"); + return 0; + } + } + + return 1; /* success */ + } + + + /* Make sure server cert/key are valid for this suite, true on success */ + static int VerifyServerSuite(CYASSL* ssl, word16 idx) + { + int haveRSA = !ssl->options.haveStaticECC; + int havePSK = 0; + byte first; + byte second; + + CYASSL_ENTER("VerifyServerSuite"); + + if (ssl->suites == NULL) { + CYASSL_MSG("Suites pointer error"); + return 0; + } + + first = ssl->suites->suites[idx]; + second = ssl->suites->suites[idx+1]; + + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + + if (ssl->options.haveNTRU) + haveRSA = 0; + + if (CipherRequires(first, second, REQUIRES_RSA)) { + CYASSL_MSG("Requires RSA"); + if (haveRSA == 0) { + CYASSL_MSG("Don't have RSA"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_DHE)) { + CYASSL_MSG("Requires DHE"); + if (ssl->options.haveDH == 0) { + CYASSL_MSG("Don't have DHE"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_ECC_DSA)) { + CYASSL_MSG("Requires ECCDSA"); + if (ssl->options.haveECDSAsig == 0) { + CYASSL_MSG("Don't have ECCDSA"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_ECC_STATIC)) { + CYASSL_MSG("Requires static ECC"); + if (ssl->options.haveStaticECC == 0) { + CYASSL_MSG("Don't have static ECC"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_PSK)) { + CYASSL_MSG("Requires PSK"); + if (havePSK == 0) { + CYASSL_MSG("Don't have PSK"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_NTRU)) { + CYASSL_MSG("Requires NTRU"); + if (ssl->options.haveNTRU == 0) { + CYASSL_MSG("Don't have NTRU"); + return 0; + } + } + + if (CipherRequires(first, second, REQUIRES_RSA_SIG)) { + CYASSL_MSG("Requires RSA Signature"); + if (ssl->options.side == CYASSL_SERVER_END && + ssl->options.haveECDSAsig == 1) { + CYASSL_MSG("Don't have RSA Signature"); + return 0; + } + } + +#ifdef HAVE_SUPPORTED_CURVES + if (!TLSX_ValidateEllipticCurves(ssl, first, second)) { + CYASSL_MSG("Don't have matching curves"); + return 0; + } +#endif + + /* ECCDHE is always supported if ECC on */ + + return 1; + } + + + static int MatchSuite(CYASSL* ssl, Suites* peerSuites) + { + word16 i, j; + + CYASSL_ENTER("MatchSuite"); + + /* & 0x1 equivalent % 2 */ + if (peerSuites->suiteSz == 0 || peerSuites->suiteSz & 0x1) + return MATCH_SUITE_ERROR; + + if (ssl->suites == NULL) + return SUITES_ERROR; + /* start with best, if a match we are good */ + for (i = 0; i < ssl->suites->suiteSz; i += 2) + for (j = 0; j < peerSuites->suiteSz; j += 2) + if (ssl->suites->suites[i] == peerSuites->suites[j] && + ssl->suites->suites[i+1] == peerSuites->suites[j+1] ) { + + if (VerifyServerSuite(ssl, i)) { + int result; + CYASSL_MSG("Verified suite validity"); + ssl->options.cipherSuite0 = ssl->suites->suites[i]; + ssl->options.cipherSuite = ssl->suites->suites[i+1]; + result = SetCipherSpecs(ssl); + if (result == 0) + PickHashSigAlgo(ssl, peerSuites->hashSigAlgo, + peerSuites->hashSigAlgoSz); + return result; + } + else { + CYASSL_MSG("Could not verify suite validity, continue"); + } + } + + return MATCH_SUITE_ERROR; + } + + + /* process old style client hello, deprecate? */ + int ProcessOldClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 inSz, word16 sz) + { + word32 idx = *inOutIdx; + word16 sessionSz; + word16 randomSz; + word16 i, j; + ProtocolVersion pv; + Suites clSuites; + + (void)inSz; + CYASSL_MSG("Got old format client hello"); +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ClientHello", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("ClientHello", &ssl->timeoutInfo); +#endif + + /* manually hash input since different format */ +#ifndef NO_OLD_TLS +#ifndef NO_MD5 + Md5Update(&ssl->hashMd5, input + idx, sz); +#endif +#ifndef NO_SHA + ShaUpdate(&ssl->hashSha, input + idx, sz); +#endif +#endif +#ifndef NO_SHA256 + if (IsAtLeastTLSv1_2(ssl)) { + int shaRet = Sha256Update(&ssl->hashSha256, input + idx, sz); + + if (shaRet != 0) + return shaRet; + } +#endif + + /* does this value mean client_hello? */ + idx++; + + /* version */ + pv.major = input[idx++]; + pv.minor = input[idx++]; + ssl->chVersion = pv; /* store */ + + if (ssl->version.minor > pv.minor) { + byte haveRSA = 0; + byte havePSK = 0; + if (!ssl->options.downgrade) { + CYASSL_MSG("Client trying to connect with lesser version"); + return VERSION_ERROR; + } + if (pv.minor == SSLv3_MINOR) { + /* turn off tls */ + CYASSL_MSG(" downgrading to SSLv3"); + ssl->options.tls = 0; + ssl->options.tls1_1 = 0; + ssl->version.minor = SSLv3_MINOR; + } + else if (pv.minor == TLSv1_MINOR) { + CYASSL_MSG(" downgrading to TLSv1"); + /* turn off tls 1.1+ */ + ssl->options.tls1_1 = 0; + ssl->version.minor = TLSv1_MINOR; + } + else if (pv.minor == TLSv1_1_MINOR) { + CYASSL_MSG(" downgrading to TLSv1.1"); + ssl->version.minor = TLSv1_1_MINOR; + } +#ifndef NO_RSA + haveRSA = 1; +#endif +#ifndef NO_PSK + havePSK = ssl->options.havePSK; +#endif + + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + } + + /* suite size */ + ato16(&input[idx], &clSuites.suiteSz); + idx += 2; + + if (clSuites.suiteSz > MAX_SUITE_SZ) + return BUFFER_ERROR; + clSuites.hashSigAlgoSz = 0; + + /* session size */ + ato16(&input[idx], &sessionSz); + idx += 2; + + if (sessionSz > ID_LEN) + return BUFFER_ERROR; + + /* random size */ + ato16(&input[idx], &randomSz); + idx += 2; + + if (randomSz > RAN_LEN) + return BUFFER_ERROR; + + /* suites */ + for (i = 0, j = 0; i < clSuites.suiteSz; i += 3) { + byte first = input[idx++]; + if (!first) { /* implicit: skip sslv2 type */ + XMEMCPY(&clSuites.suites[j], &input[idx], 2); + j += 2; + } + idx += 2; + } + clSuites.suiteSz = j; + + /* session id */ + if (sessionSz) { + XMEMCPY(ssl->arrays->sessionID, input + idx, sessionSz); + idx += sessionSz; + ssl->options.resuming = 1; + } + + /* random */ + if (randomSz < RAN_LEN) + XMEMSET(ssl->arrays->clientRandom, 0, RAN_LEN - randomSz); + XMEMCPY(&ssl->arrays->clientRandom[RAN_LEN - randomSz], input + idx, + randomSz); + idx += randomSz; + + if (ssl->options.usingCompression) + ssl->options.usingCompression = 0; /* turn off */ + + ssl->options.clientState = CLIENT_HELLO_COMPLETE; + *inOutIdx = idx; + + ssl->options.haveSessionId = 1; + /* DoClientHello uses same resume code */ + if (ssl->options.resuming) { /* let's try */ + int ret = -1; + CYASSL_SESSION* session = GetSession(ssl,ssl->arrays->masterSecret); + if (!session) { + CYASSL_MSG("Session lookup for resume failed"); + ssl->options.resuming = 0; + } else { + if (MatchSuite(ssl, &clSuites) < 0) { + CYASSL_MSG("Unsupported cipher suite, OldClientHello"); + return UNSUPPORTED_SUITE; + } + #ifdef SESSION_CERTS + ssl->session = *session; /* restore session certs. */ + #endif + + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, + RAN_LEN); + if (ret != 0) + return ret; + + #ifdef NO_OLD_TLS + ret = DeriveTlsKeys(ssl); + #else + #ifndef NO_TLS + if (ssl->options.tls) + ret = DeriveTlsKeys(ssl); + #endif + if (!ssl->options.tls) + ret = DeriveKeys(ssl); + #endif + ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; + + return ret; + } + } + + return MatchSuite(ssl, &clSuites); + } + + + static int DoClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, + word32 helloSz) + { + byte b; + ProtocolVersion pv; + Suites clSuites; + word32 i = *inOutIdx; + word32 begin = i; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) AddPacketName("ClientHello", &ssl->handShakeInfo); + if (ssl->toInfoOn) AddLateName("ClientHello", &ssl->timeoutInfo); +#endif + + /* protocol version, random and session id length check */ + if ((i - begin) + OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz) + return BUFFER_ERROR; + + /* protocol version */ + XMEMCPY(&pv, input + i, OPAQUE16_LEN); + ssl->chVersion = pv; /* store */ + i += OPAQUE16_LEN; + + if (ssl->version.minor > pv.minor) { + byte haveRSA = 0; + byte havePSK = 0; + + if (!ssl->options.downgrade) { + CYASSL_MSG("Client trying to connect with lesser version"); + return VERSION_ERROR; + } + + if (pv.minor == SSLv3_MINOR) { + /* turn off tls */ + CYASSL_MSG(" downgrading to SSLv3"); + ssl->options.tls = 0; + ssl->options.tls1_1 = 0; + ssl->version.minor = SSLv3_MINOR; + } + else if (pv.minor == TLSv1_MINOR) { + /* turn off tls 1.1+ */ + CYASSL_MSG(" downgrading to TLSv1"); + ssl->options.tls1_1 = 0; + ssl->version.minor = TLSv1_MINOR; + } + else if (pv.minor == TLSv1_1_MINOR) { + CYASSL_MSG(" downgrading to TLSv1.1"); + ssl->version.minor = TLSv1_1_MINOR; + } +#ifndef NO_RSA + haveRSA = 1; +#endif +#ifndef NO_PSK + havePSK = ssl->options.havePSK; +#endif + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + } + + /* random */ + XMEMCPY(ssl->arrays->clientRandom, input + i, RAN_LEN); + i += RAN_LEN; + +#ifdef SHOW_SECRETS + { + int j; + printf("client random: "); + for (j = 0; j < RAN_LEN; j++) + printf("%02x", ssl->arrays->clientRandom[j]); + printf("\n"); + } +#endif + + /* session id */ + b = input[i++]; + + if (b == ID_LEN) { + if ((i - begin) + ID_LEN > helloSz) + return BUFFER_ERROR; + + XMEMCPY(ssl->arrays->sessionID, input + i, ID_LEN); + i += ID_LEN; + ssl->options.resuming = 1; /* client wants to resume */ + CYASSL_MSG("Client wants to resume session"); + } + else if (b) { + CYASSL_MSG("Invalid session ID size"); + return BUFFER_ERROR; /* session ID nor 0 neither 32 bytes long */ + } + + #ifdef CYASSL_DTLS + /* cookie */ + if (ssl->options.dtls) { + + if ((i - begin) + OPAQUE8_LEN > helloSz) + return BUFFER_ERROR; + + b = input[i++]; + + if (b) { + byte cookie[MAX_COOKIE_LEN]; + + if (b > MAX_COOKIE_LEN) + return BUFFER_ERROR; + + if ((i - begin) + b > helloSz) + return BUFFER_ERROR; + + if (ssl->ctx->CBIOCookie == NULL) { + CYASSL_MSG("Your Cookie callback is null, please set"); + return COOKIE_ERROR; + } + + if ((ssl->ctx->CBIOCookie(ssl, cookie, COOKIE_SZ, + ssl->IOCB_CookieCtx) != COOKIE_SZ) + || (b != COOKIE_SZ) + || (XMEMCMP(cookie, input + i, b) != 0)) { + return COOKIE_ERROR; + } + + i += b; + } + } + #endif + + /* suites */ + if ((i - begin) + OPAQUE16_LEN > helloSz) + return BUFFER_ERROR; + + ato16(&input[i], &clSuites.suiteSz); + i += OPAQUE16_LEN; + + /* suites and compression length check */ + if ((i - begin) + clSuites.suiteSz + OPAQUE8_LEN > helloSz) + return BUFFER_ERROR; + + if (clSuites.suiteSz > MAX_SUITE_SZ) + return BUFFER_ERROR; + + XMEMCPY(clSuites.suites, input + i, clSuites.suiteSz); + i += clSuites.suiteSz; + clSuites.hashSigAlgoSz = 0; + + /* compression length */ + b = input[i++]; + + if ((i - begin) + b > helloSz) + return BUFFER_ERROR; + + if (ssl->options.usingCompression) { + int match = 0; + + while (b--) { + byte comp = input[i++]; + + if (comp == ZLIB_COMPRESSION) + match = 1; + } + + if (!match) { + CYASSL_MSG("Not matching compression, turning off"); + ssl->options.usingCompression = 0; /* turn off */ + } + } + else + i += b; /* ignore, since we're not on */ + + *inOutIdx = i; + + /* tls extensions */ + if ((i - begin) < helloSz) { +#ifdef HAVE_TLS_EXTENSIONS + if (IsTLS(ssl)) { + int ret = 0; +#else + if (IsAtLeastTLSv1_2(ssl)) { +#endif + /* Process the hello extension. Skip unsupported. */ + word16 totalExtSz; + + if ((i - begin) + OPAQUE16_LEN > helloSz) + return BUFFER_ERROR; + + ato16(&input[i], &totalExtSz); + i += OPAQUE16_LEN; + + if ((i - begin) + totalExtSz > helloSz) + return BUFFER_ERROR; + +#ifdef HAVE_TLS_EXTENSIONS + if ((ret = TLSX_Parse(ssl, (byte *) input + i, + totalExtSz, 1, &clSuites))) + return ret; + + i += totalExtSz; +#else + while (totalExtSz) { + word16 extId, extSz; + + if (OPAQUE16_LEN + OPAQUE16_LEN > totalExtSz) + return BUFFER_ERROR; + + ato16(&input[i], &extId); + i += OPAQUE16_LEN; + ato16(&input[i], &extSz); + i += OPAQUE16_LEN; + + if (OPAQUE16_LEN + OPAQUE16_LEN + extSz > totalExtSz) + return BUFFER_ERROR; + + if (extId == HELLO_EXT_SIG_ALGO) { + ato16(&input[i], &clSuites.hashSigAlgoSz); + i += OPAQUE16_LEN; + + if (OPAQUE16_LEN + clSuites.hashSigAlgoSz > extSz) + return BUFFER_ERROR; + + XMEMCPY(clSuites.hashSigAlgo, &input[i], + min(clSuites.hashSigAlgoSz, HELLO_EXT_SIGALGO_MAX)); + i += clSuites.hashSigAlgoSz; + } + else + i += extSz; + + totalExtSz -= OPAQUE16_LEN + OPAQUE16_LEN + extSz; + } +#endif + *inOutIdx = i; + } + else + *inOutIdx = begin + helloSz; /* skip extensions */ + } + + ssl->options.clientState = CLIENT_HELLO_COMPLETE; + ssl->options.haveSessionId = 1; + + /* ProcessOld uses same resume code */ + if (ssl->options.resuming && (!ssl->options.dtls || + ssl->options.acceptState == HELLO_VERIFY_SENT)) { /* let's try */ + int ret = -1; + CYASSL_SESSION* session = GetSession(ssl,ssl->arrays->masterSecret); + + if (!session) { + CYASSL_MSG("Session lookup for resume failed"); + ssl->options.resuming = 0; + } + else { + if (MatchSuite(ssl, &clSuites) < 0) { + CYASSL_MSG("Unsupported cipher suite, ClientHello"); + return UNSUPPORTED_SUITE; + } + #ifdef SESSION_CERTS + ssl->session = *session; /* restore session certs. */ + #endif + + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, + RAN_LEN); + if (ret != 0) + return ret; + + #ifdef NO_OLD_TLS + ret = DeriveTlsKeys(ssl); + #else + #ifndef NO_TLS + if (ssl->options.tls) + ret = DeriveTlsKeys(ssl); + #endif + if (!ssl->options.tls) + ret = DeriveKeys(ssl); + #endif + ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; + + return ret; + } + } + return MatchSuite(ssl, &clSuites); + } + +#if !defined(NO_RSA) || defined(HAVE_ECC) + static int DoCertificateVerify(CYASSL* ssl, byte* input, word32* inOutIdx, + word32 size) + { + word16 sz = 0; + int ret = VERIFY_CERT_ERROR; /* start in error state */ + byte hashAlgo = sha_mac; + byte sigAlgo = anonymous_sa_algo; + word32 begin = *inOutIdx; + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("CertificateVerify", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("CertificateVerify", &ssl->timeoutInfo); + #endif + + + if (IsAtLeastTLSv1_2(ssl)) { + if ((*inOutIdx - begin) + ENUM_LEN + ENUM_LEN > size) + return BUFFER_ERROR; + + hashAlgo = input[(*inOutIdx)++]; + sigAlgo = input[(*inOutIdx)++]; + } + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &sz); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + sz > size || sz > ENCRYPT_LEN) + return BUFFER_ERROR; + + /* RSA */ +#ifndef NO_RSA + if (ssl->peerRsaKeyPresent != 0) { + byte* out = NULL; + int outLen = 0; + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaVerifyCb) + doUserRsa = 1; + #endif /*HAVE_PK_CALLBACKS */ + + CYASSL_MSG("Doing RSA peer cert verify"); + + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + outLen = ssl->ctx->RsaVerifyCb(ssl, input + *inOutIdx, sz, + &out, + ssl->buffers.peerRsaKey.buffer, + ssl->buffers.peerRsaKey.length, + ssl->RsaVerifyCtx); + #endif /*HAVE_PK_CALLBACKS */ + } + else { + outLen = RsaSSL_VerifyInline(input + *inOutIdx, sz, &out, + ssl->peerRsaKey); + } + + if (IsAtLeastTLSv1_2(ssl)) { + byte encodedSig[MAX_ENCODED_SIG_SZ]; + word32 sigSz; + byte* digest = ssl->certHashes.sha; + int typeH = SHAh; + int digestSz = SHA_DIGEST_SIZE; + + if (sigAlgo != rsa_sa_algo) { + CYASSL_MSG("Oops, peer sent RSA key but not in verify"); + } + + if (hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = ssl->certHashes.sha256; + typeH = SHA256h; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = ssl->certHashes.sha384; + typeH = SHA384h; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + + sigSz = EncodeSignature(encodedSig, digest, digestSz, typeH); + + if (outLen == (int)sigSz && out && XMEMCMP(out, encodedSig, + min(sigSz, MAX_ENCODED_SIG_SZ)) == 0) + ret = 0; /* verified */ + } + else { + if (outLen == FINISHED_SZ && out && XMEMCMP(out, + &ssl->certHashes, FINISHED_SZ) == 0) + ret = 0; /* verified */ + } + } +#endif +#ifdef HAVE_ECC + if (ssl->peerEccDsaKeyPresent) { + int verify = 0; + int err = -1; + byte* digest = ssl->certHashes.sha; + word32 digestSz = SHA_DIGEST_SIZE; + byte doUserEcc = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->EccVerifyCb) + doUserEcc = 1; + #endif + + CYASSL_MSG("Doing ECC peer cert verify"); + + if (IsAtLeastTLSv1_2(ssl)) { + if (sigAlgo != ecc_dsa_sa_algo) { + CYASSL_MSG("Oops, peer sent ECC key but not in verify"); + } + + if (hashAlgo == sha256_mac) { + #ifndef NO_SHA256 + digest = ssl->certHashes.sha256; + digestSz = SHA256_DIGEST_SIZE; + #endif + } + else if (hashAlgo == sha384_mac) { + #ifdef CYASSL_SHA384 + digest = ssl->certHashes.sha384; + digestSz = SHA384_DIGEST_SIZE; + #endif + } + } + + if (doUserEcc) { + #ifdef HAVE_PK_CALLBACKS + ret = ssl->ctx->EccVerifyCb(ssl, input + *inOutIdx, sz, digest, + digestSz, + ssl->buffers.peerEccDsaKey.buffer, + ssl->buffers.peerEccDsaKey.length, + &verify, ssl->EccVerifyCtx); + #endif + } + else { + err = ecc_verify_hash(input + *inOutIdx, sz, digest, digestSz, + &verify, ssl->peerEccDsaKey); + } + + if (err == 0 && verify == 1) + ret = 0; /* verified */ + } +#endif + *inOutIdx += sz; + + if (ret == 0) + ssl->options.havePeerVerify = 1; + + return ret; + } +#endif /* !NO_RSA || HAVE_ECC */ + + int SendServerHelloDone(CYASSL* ssl) + { + byte *output; + int sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; + int ret; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; + #endif + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, 0, server_hello_done, ssl); + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return 0; + } + #endif + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ServerHelloDone", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("ServerHelloDone", &ssl->timeoutInfo, output, sendSz, + ssl->heap); +#endif + ssl->options.serverState = SERVER_HELLODONE_COMPLETE; + + ssl->buffers.outputBuffer.length += sendSz; + + return SendBuffered(ssl); + } + +#ifdef CYASSL_DTLS + int SendHelloVerifyRequest(CYASSL* ssl) + { + byte* output; + byte cookieSz = COOKIE_SZ; + int length = VERSION_SZ + ENUM_LEN + cookieSz; + int idx = DTLS_RECORD_HEADER_SZ + DTLS_HANDSHAKE_HEADER_SZ; + int sendSz = length + idx; + int ret; + + /* check for available size */ + if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) + return ret; + + /* get ouput buffer */ + output = ssl->buffers.outputBuffer.buffer + + ssl->buffers.outputBuffer.length; + + AddHeaders(output, length, hello_verify_request, ssl); + + output[idx++] = ssl->chVersion.major; + output[idx++] = ssl->chVersion.minor; + + output[idx++] = cookieSz; + if (ssl->ctx->CBIOCookie == NULL) { + CYASSL_MSG("Your Cookie callback is null, please set"); + return COOKIE_ERROR; + } + if ((ret = ssl->ctx->CBIOCookie(ssl, output + idx, cookieSz, + ssl->IOCB_CookieCtx)) < 0) + return ret; + + ret = HashOutput(ssl, output, sendSz, 0); + if (ret != 0) + return ret; + +#ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("HelloVerifyRequest", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddPacketInfo("HelloVerifyRequest", &ssl->timeoutInfo, output, + sendSz, ssl->heap); +#endif + ssl->options.serverState = SERVER_HELLOVERIFYREQUEST_COMPLETE; + + ssl->buffers.outputBuffer.length += sendSz; + + return SendBuffered(ssl); + } +#endif + + static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32* inOutIdx, + word32 size) + { + int ret = 0; + word32 length = 0; + byte* out = NULL; + word32 begin = *inOutIdx; + + (void)length; /* shut up compiler warnings */ + (void)out; + (void)input; + (void)size; + + if (ssl->options.side != CYASSL_SERVER_END) { + CYASSL_MSG("Client received client keyexchange, attack?"); + CYASSL_ERROR(ssl->error = SIDE_ERROR); + return SSL_FATAL_ERROR; + } + + if (ssl->options.clientState < CLIENT_HELLO_COMPLETE) { + CYASSL_MSG("Client sending keyexchange at wrong time"); + SendAlert(ssl, alert_fatal, unexpected_message); + return OUT_OF_ORDER_E; + } + + #ifndef NO_CERTS + if (ssl->options.verifyPeer && ssl->options.failNoCert) + if (!ssl->options.havePeerCert) { + CYASSL_MSG("client didn't present peer cert"); + return NO_PEER_CERT; + } + #endif + + #ifdef CYASSL_CALLBACKS + if (ssl->hsInfoOn) + AddPacketName("ClientKeyExchange", &ssl->handShakeInfo); + if (ssl->toInfoOn) + AddLateName("ClientKeyExchange", &ssl->timeoutInfo); + #endif + + switch (ssl->specs.kea) { + #ifndef NO_RSA + case rsa_kea: + { + word32 idx = 0; + RsaKey key; + byte doUserRsa = 0; + + #ifdef HAVE_PK_CALLBACKS + if (ssl->ctx->RsaDecCb) + doUserRsa = 1; + #endif + + ret = InitRsaKey(&key, ssl->heap); + if (ret != 0) return ret; + + if (ssl->buffers.key.buffer) + ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &idx, + &key, ssl->buffers.key.length); + else + return NO_PRIVATE_KEY; + + if (ret == 0) { + length = RsaEncryptSize(&key); + ssl->arrays->preMasterSz = SECRET_LEN; + + if (ssl->options.tls) { + word16 check; + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &check); + *inOutIdx += OPAQUE16_LEN; + + if ((word32) check != length) { + CYASSL_MSG("RSA explicit size doesn't match"); + FreeRsaKey(&key); + return RSA_PRIVATE_ERROR; + } + } + + if ((*inOutIdx - begin) + length > size) { + CYASSL_MSG("RSA message too big"); + FreeRsaKey(&key); + return BUFFER_ERROR; + } + + if (doUserRsa) { + #ifdef HAVE_PK_CALLBACKS + ret = ssl->ctx->RsaDecCb(ssl, + input + *inOutIdx, length, &out, + ssl->buffers.key.buffer, + ssl->buffers.key.length, + ssl->RsaDecCtx); + #endif + } + else { + ret = RsaPrivateDecryptInline(input + *inOutIdx, length, + &out, &key); + } + + *inOutIdx += length; + + if (ret == SECRET_LEN) { + XMEMCPY(ssl->arrays->preMasterSecret, out, SECRET_LEN); + if (ssl->arrays->preMasterSecret[0] != + ssl->chVersion.major + || ssl->arrays->preMasterSecret[1] != + ssl->chVersion.minor) + ret = PMS_VERSION_ERROR; + else + ret = MakeMasterSecret(ssl); + } + else { + ret = RSA_PRIVATE_ERROR; + } + } + + FreeRsaKey(&key); + } + break; + #endif + #ifndef NO_PSK + case psk_kea: + { + byte* pms = ssl->arrays->preMasterSecret; + word16 ci_sz; + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &ci_sz); + *inOutIdx += OPAQUE16_LEN; + + if (ci_sz > MAX_PSK_ID_LEN) + return CLIENT_ID_ERROR; + + if ((*inOutIdx - begin) + ci_sz > size) + return BUFFER_ERROR; + + XMEMCPY(ssl->arrays->client_identity, input + *inOutIdx, ci_sz); + *inOutIdx += ci_sz; + + ssl->arrays->client_identity[min(ci_sz, MAX_PSK_ID_LEN-1)] = 0; + ssl->arrays->psk_keySz = ssl->options.server_psk_cb(ssl, + ssl->arrays->client_identity, ssl->arrays->psk_key, + MAX_PSK_KEY_LEN); + + if (ssl->arrays->psk_keySz == 0 || + ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) + return PSK_KEY_ERROR; + + /* make psk pre master secret */ + /* length of key + length 0s + length of key + key */ + c16toa((word16) ssl->arrays->psk_keySz, pms); + pms += OPAQUE16_LEN; + + XMEMSET(pms, 0, ssl->arrays->psk_keySz); + pms += ssl->arrays->psk_keySz; + + c16toa((word16) ssl->arrays->psk_keySz, pms); + pms += OPAQUE16_LEN; + + XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz); + ssl->arrays->preMasterSz = ssl->arrays->psk_keySz * 2 + 4; + + ret = MakeMasterSecret(ssl); + + /* No further need for PSK */ + XMEMSET(ssl->arrays->psk_key, 0, ssl->arrays->psk_keySz); + ssl->arrays->psk_keySz = 0; + } + break; + #endif /* NO_PSK */ + #ifdef HAVE_NTRU + case ntru_kea: + { + word16 cipherLen; + word16 plainLen = sizeof(ssl->arrays->preMasterSecret); + + if (!ssl->buffers.key.buffer) + return NO_PRIVATE_KEY; + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &cipherLen); + *inOutIdx += OPAQUE16_LEN; + + if (cipherLen > MAX_NTRU_ENCRYPT_SZ) + return NTRU_KEY_ERROR; + + if ((*inOutIdx - begin) + cipherLen > size) + return BUFFER_ERROR; + + if (NTRU_OK != crypto_ntru_decrypt( + (word16) ssl->buffers.key.length, + ssl->buffers.key.buffer, cipherLen, + input + *inOutIdx, &plainLen, + ssl->arrays->preMasterSecret)) + return NTRU_DECRYPT_ERROR; + + if (plainLen != SECRET_LEN) + return NTRU_DECRYPT_ERROR; + + *inOutIdx += cipherLen; + + ssl->arrays->preMasterSz = plainLen; + ret = MakeMasterSecret(ssl); + } + break; + #endif /* HAVE_NTRU */ + #ifdef HAVE_ECC + case ecc_diffie_hellman_kea: + { + if ((*inOutIdx - begin) + OPAQUE8_LEN > size) + return BUFFER_ERROR; + + length = input[(*inOutIdx)++]; + + if ((*inOutIdx - begin) + length > size) + return BUFFER_ERROR; + + if (ecc_import_x963(input + *inOutIdx, length, ssl->peerEccKey)) + return ECC_PEERKEY_ERROR; + + *inOutIdx += length; + ssl->peerEccKeyPresent = 1; + + length = sizeof(ssl->arrays->preMasterSecret); + + if (ssl->specs.static_ecdh) { + ecc_key staticKey; + word32 i = 0; + + ecc_init(&staticKey); + ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &i, + &staticKey, ssl->buffers.key.length); + + if (ret == 0) + ret = ecc_shared_secret(&staticKey, ssl->peerEccKey, + ssl->arrays->preMasterSecret, &length); + + ecc_free(&staticKey); + } + else + ret = ecc_shared_secret(ssl->eccTempKey, ssl->peerEccKey, + ssl->arrays->preMasterSecret, &length); + + if (ret != 0) + return ECC_SHARED_ERROR; + + ssl->arrays->preMasterSz = length; + ret = MakeMasterSecret(ssl); + } + break; + #endif /* HAVE_ECC */ + #ifdef OPENSSL_EXTRA + case diffie_hellman_kea: + { + word16 clientPubSz; + DhKey dhKey; + + if ((*inOutIdx - begin) + OPAQUE16_LEN > size) + return BUFFER_ERROR; + + ato16(input + *inOutIdx, &clientPubSz); + *inOutIdx += OPAQUE16_LEN; + + if ((*inOutIdx - begin) + clientPubSz > size) + return BUFFER_ERROR; + + InitDhKey(&dhKey); + ret = DhSetKey(&dhKey, ssl->buffers.serverDH_P.buffer, + ssl->buffers.serverDH_P.length, + ssl->buffers.serverDH_G.buffer, + ssl->buffers.serverDH_G.length); + if (ret == 0) + ret = DhAgree(&dhKey, ssl->arrays->preMasterSecret, + &ssl->arrays->preMasterSz, + ssl->buffers.serverDH_Priv.buffer, + ssl->buffers.serverDH_Priv.length, + input + *inOutIdx, clientPubSz); + FreeDhKey(&dhKey); + + *inOutIdx += clientPubSz; + + if (ret == 0) + ret = MakeMasterSecret(ssl); + } + break; + #endif /* OPENSSL_EXTRA */ + default: + { + CYASSL_MSG("Bad kea type"); + ret = BAD_KEA_TYPE_E; + } + break; + } + + /* No further need for PMS */ + XMEMSET(ssl->arrays->preMasterSecret, 0, ssl->arrays->preMasterSz); + ssl->arrays->preMasterSz = 0; + + if (ret == 0) { + ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; + #ifndef NO_CERTS + if (ssl->options.verifyPeer) + ret = BuildCertHashes(ssl, &ssl->certHashes); + #endif + } + + return ret; + } + +#endif /* NO_CYASSL_SERVER */ diff --git a/project1/cyassl-3.0.0/src/io.c b/project1/cyassl-3.0.0/src/io.c new file mode 100644 index 00000000..0f5ddf30 --- /dev/null +++ b/project1/cyassl-3.0.0/src/io.c @@ -0,0 +1,1050 @@ +/* io.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef _WIN32_WCE + /* On WinCE winsock2.h must be included before windows.h for socket stuff */ + #include +#endif + +#include +#include + +/* if user writes own I/O callbacks they can define CYASSL_USER_IO to remove + automatic setting of default I/O functions EmbedSend() and EmbedReceive() + but they'll still need SetCallback xxx() at end of file +*/ +#ifndef CYASSL_USER_IO + +#ifdef HAVE_LIBZ + #include "zlib.h" +#endif + +#ifndef USE_WINDOWS_API + #ifdef CYASSL_LWIP + /* lwIP needs to be configured to use sockets API in this mode */ + /* LWIP_SOCKET 1 in lwip/opt.h or in build */ + #include "lwip/sockets.h" + #include + #ifndef LWIP_PROVIDE_ERRNO + #define LWIP_PROVIDE_ERRNO 1 + #endif + #elif defined(FREESCALE_MQX) + #include + #include + #elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_MDK5) + #include "cmsis_os.h" + #include "rl_fs.h" + #include "rl_net.h" + #else + #include + #endif + #undef RNG + #include "CYASSL_MDK_ARM.h" + #undef RNG + #define RNG CyaSSL_RNG + /* for avoiding name conflict in "stm32f2xx.h" */ + static int errno; + #else + #include + #include + #ifndef EBSNET + #include + #endif + #include + #if !(defined(DEVKITPRO) || defined(HAVE_RTP_SYS) || defined(EBSNET)) + #include + #include + #include + #include + #ifdef __PPU + #include + #else + #include + #endif + #endif + #ifdef HAVE_RTP_SYS + #include + #endif + #ifdef EBSNET + #include "rtipapi.h" /* errno */ + #include "socket.h" + #endif + #endif +#endif /* USE_WINDOWS_API */ + +#ifdef __sun + #include +#endif + +#ifdef USE_WINDOWS_API + /* no epipe yet */ + #ifndef WSAEPIPE + #define WSAEPIPE -12345 + #endif + #define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK + #define SOCKET_EAGAIN WSAETIMEDOUT + #define SOCKET_ECONNRESET WSAECONNRESET + #define SOCKET_EINTR WSAEINTR + #define SOCKET_EPIPE WSAEPIPE + #define SOCKET_ECONNREFUSED WSAENOTCONN + #define SOCKET_ECONNABORTED WSAECONNABORTED + #define close(s) closesocket(s) +#elif defined(__PPU) + #define SOCKET_EWOULDBLOCK SYS_NET_EWOULDBLOCK + #define SOCKET_EAGAIN SYS_NET_EAGAIN + #define SOCKET_ECONNRESET SYS_NET_ECONNRESET + #define SOCKET_EINTR SYS_NET_EINTR + #define SOCKET_EPIPE SYS_NET_EPIPE + #define SOCKET_ECONNREFUSED SYS_NET_ECONNREFUSED + #define SOCKET_ECONNABORTED SYS_NET_ECONNABORTED +#elif defined(FREESCALE_MQX) + /* RTCS doesn't have an EWOULDBLOCK error */ + #define SOCKET_EWOULDBLOCK EAGAIN + #define SOCKET_EAGAIN EAGAIN + #define SOCKET_ECONNRESET RTCSERR_TCP_CONN_RESET + #define SOCKET_EINTR EINTR + #define SOCKET_EPIPE EPIPE + #define SOCKET_ECONNREFUSED RTCSERR_TCP_CONN_REFUSED + #define SOCKET_ECONNABORTED RTCSERR_TCP_CONN_ABORTED +#elif defined(CYASSL_MDK_ARM) + #if defined(CYASSL_MDK5) + #define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK + #define SOCKET_EAGAIN BSD_ERROR_LOCKED + #define SOCKET_ECONNRESET BSD_ERROR_CLOSED + #define SOCKET_EINTR BSD_ERROR + #define SOCKET_EPIPE BSD_ERROR + #define SOCKET_ECONNREFUSED BSD_ERROR + #define SOCKET_ECONNABORTED BSD_ERROR + #else + #define SOCKET_EWOULDBLOCK SCK_EWOULDBLOCK + #define SOCKET_EAGAIN SCK_ELOCKED + #define SOCKET_ECONNRESET SCK_ECLOSED + #define SOCKET_EINTR SCK_ERROR + #define SOCKET_EPIPE SCK_ERROR + #define SOCKET_ECONNREFUSED SCK_ERROR + #define SOCKET_ECONNABORTED SCK_ERROR + #endif +#else + #define SOCKET_EWOULDBLOCK EWOULDBLOCK + #define SOCKET_EAGAIN EAGAIN + #define SOCKET_ECONNRESET ECONNRESET + #define SOCKET_EINTR EINTR + #define SOCKET_EPIPE EPIPE + #define SOCKET_ECONNREFUSED ECONNREFUSED + #define SOCKET_ECONNABORTED ECONNABORTED +#endif /* USE_WINDOWS_API */ + + +#ifdef DEVKITPRO + /* from network.h */ + int net_send(int, const void*, int, unsigned int); + int net_recv(int, void*, int, unsigned int); + #define SEND_FUNCTION net_send + #define RECV_FUNCTION net_recv +#elif defined(CYASSL_LWIP) + #define SEND_FUNCTION lwip_send + #define RECV_FUNCTION lwip_recv +#else + #define SEND_FUNCTION send + #define RECV_FUNCTION recv +#endif + + +/* Translates return codes returned from + * send() and recv() if need be. + */ +static INLINE int TranslateReturnCode(int old, int sd) +{ + (void)sd; + +#ifdef FREESCALE_MQX + if (old == 0) { + errno = SOCKET_EWOULDBLOCK; + return -1; /* convert to BSD style wouldblock as error */ + } + + if (old < 0) { + errno = RTCS_geterror(sd); + if (errno == RTCSERR_TCP_CONN_CLOSING) + return 0; /* convert to BSD style closing */ + } +#endif + + return old; +} + +static INLINE int LastError(void) +{ +#ifdef USE_WINDOWS_API + return WSAGetLastError(); +#elif defined(EBSNET) + return xn_getlasterror(); +#else + return errno; +#endif +} + +/* The receive embedded callback + * return : nb bytes read, or error + */ +int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx) +{ + int recvd; + int err; + int sd = *(int*)ctx; + +#ifdef CYASSL_DTLS + { + int dtls_timeout = CyaSSL_dtls_get_current_timeout(ssl); + if (CyaSSL_dtls(ssl) + && !CyaSSL_get_using_nonblock(ssl) + && dtls_timeout != 0) { + #ifdef USE_WINDOWS_API + DWORD timeout = dtls_timeout * 1000; + #else + struct timeval timeout; + XMEMSET(&timeout, 0, sizeof(timeout)); + timeout.tv_sec = dtls_timeout; + #endif + if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, + sizeof(timeout)) != 0) { + CYASSL_MSG("setsockopt rcvtimeo failed"); + } + } + } +#endif + + recvd = (int)RECV_FUNCTION(sd, buf, sz, ssl->rflags); + + recvd = TranslateReturnCode(recvd, sd); + + if (recvd < 0) { + err = LastError(); + CYASSL_MSG("Embed Receive error"); + + if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { + if (!CyaSSL_dtls(ssl) || CyaSSL_get_using_nonblock(ssl)) { + CYASSL_MSG(" Would block"); + return CYASSL_CBIO_ERR_WANT_READ; + } + else { + CYASSL_MSG(" Socket timeout"); + return CYASSL_CBIO_ERR_TIMEOUT; + } + } + else if (err == SOCKET_ECONNRESET) { + CYASSL_MSG(" Connection reset"); + return CYASSL_CBIO_ERR_CONN_RST; + } + else if (err == SOCKET_EINTR) { + CYASSL_MSG(" Socket interrupted"); + return CYASSL_CBIO_ERR_ISR; + } + else if (err == SOCKET_ECONNREFUSED) { + CYASSL_MSG(" Connection refused"); + return CYASSL_CBIO_ERR_WANT_READ; + } + else if (err == SOCKET_ECONNABORTED) { + CYASSL_MSG(" Connection aborted"); + return CYASSL_CBIO_ERR_CONN_CLOSE; + } + else { + CYASSL_MSG(" General error"); + return CYASSL_CBIO_ERR_GENERAL; + } + } + else if (recvd == 0) { + CYASSL_MSG("Embed receive connection closed"); + return CYASSL_CBIO_ERR_CONN_CLOSE; + } + + return recvd; +} + +/* The send embedded callback + * return : nb bytes sent, or error + */ +int EmbedSend(CYASSL* ssl, char *buf, int sz, void *ctx) +{ + int sd = *(int*)ctx; + int sent; + int len = sz; + int err; + + sent = (int)SEND_FUNCTION(sd, &buf[sz - len], len, ssl->wflags); + + if (sent < 0) { + err = LastError(); + CYASSL_MSG("Embed Send error"); + + if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { + CYASSL_MSG(" Would Block"); + return CYASSL_CBIO_ERR_WANT_WRITE; + } + else if (err == SOCKET_ECONNRESET) { + CYASSL_MSG(" Connection reset"); + return CYASSL_CBIO_ERR_CONN_RST; + } + else if (err == SOCKET_EINTR) { + CYASSL_MSG(" Socket interrupted"); + return CYASSL_CBIO_ERR_ISR; + } + else if (err == SOCKET_EPIPE) { + CYASSL_MSG(" Socket EPIPE"); + return CYASSL_CBIO_ERR_CONN_CLOSE; + } + else { + CYASSL_MSG(" General error"); + return CYASSL_CBIO_ERR_GENERAL; + } + } + + return sent; +} + + +#ifdef CYASSL_DTLS + +#include + +#ifdef USE_WINDOWS_API + #define XSOCKLENT int +#else + #define XSOCKLENT socklen_t +#endif + +#define SENDTO_FUNCTION sendto +#define RECVFROM_FUNCTION recvfrom + + +/* The receive embedded callback + * return : nb bytes read, or error + */ +int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx) +{ + CYASSL_DTLS_CTX* dtlsCtx = (CYASSL_DTLS_CTX*)ctx; + int recvd; + int err; + int sd = dtlsCtx->fd; + int dtls_timeout = CyaSSL_dtls_get_current_timeout(ssl); + struct sockaddr_storage peer; + XSOCKLENT peerSz = sizeof(peer); + + CYASSL_ENTER("EmbedReceiveFrom()"); + + if (!CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) { + #ifdef USE_WINDOWS_API + DWORD timeout = dtls_timeout * 1000; + #else + struct timeval timeout; + XMEMSET(&timeout, 0, sizeof(timeout)); + timeout.tv_sec = dtls_timeout; + #endif + if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, + sizeof(timeout)) != 0) { + CYASSL_MSG("setsockopt rcvtimeo failed"); + } + } + + recvd = (int)RECVFROM_FUNCTION(sd, buf, sz, ssl->rflags, + (struct sockaddr*)&peer, &peerSz); + + recvd = TranslateReturnCode(recvd, sd); + + if (recvd < 0) { + err = LastError(); + CYASSL_MSG("Embed Receive From error"); + + if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { + if (CyaSSL_get_using_nonblock(ssl)) { + CYASSL_MSG(" Would block"); + return CYASSL_CBIO_ERR_WANT_READ; + } + else { + CYASSL_MSG(" Socket timeout"); + return CYASSL_CBIO_ERR_TIMEOUT; + } + } + else if (err == SOCKET_ECONNRESET) { + CYASSL_MSG(" Connection reset"); + return CYASSL_CBIO_ERR_CONN_RST; + } + else if (err == SOCKET_EINTR) { + CYASSL_MSG(" Socket interrupted"); + return CYASSL_CBIO_ERR_ISR; + } + else if (err == SOCKET_ECONNREFUSED) { + CYASSL_MSG(" Connection refused"); + return CYASSL_CBIO_ERR_WANT_READ; + } + else { + CYASSL_MSG(" General error"); + return CYASSL_CBIO_ERR_GENERAL; + } + } + else { + if (dtlsCtx->peer.sz > 0 + && peerSz != (XSOCKLENT)dtlsCtx->peer.sz + && memcmp(&peer, dtlsCtx->peer.sa, peerSz) != 0) { + CYASSL_MSG(" Ignored packet from invalid peer"); + return CYASSL_CBIO_ERR_WANT_READ; + } + } + + return recvd; +} + + +/* The send embedded callback + * return : nb bytes sent, or error + */ +int EmbedSendTo(CYASSL* ssl, char *buf, int sz, void *ctx) +{ + CYASSL_DTLS_CTX* dtlsCtx = (CYASSL_DTLS_CTX*)ctx; + int sd = dtlsCtx->fd; + int sent; + int len = sz; + int err; + + CYASSL_ENTER("EmbedSendTo()"); + + sent = (int)SENDTO_FUNCTION(sd, &buf[sz - len], len, ssl->wflags, + dtlsCtx->peer.sa, dtlsCtx->peer.sz); + if (sent < 0) { + err = LastError(); + CYASSL_MSG("Embed Send To error"); + + if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { + CYASSL_MSG(" Would Block"); + return CYASSL_CBIO_ERR_WANT_WRITE; + } + else if (err == SOCKET_ECONNRESET) { + CYASSL_MSG(" Connection reset"); + return CYASSL_CBIO_ERR_CONN_RST; + } + else if (err == SOCKET_EINTR) { + CYASSL_MSG(" Socket interrupted"); + return CYASSL_CBIO_ERR_ISR; + } + else if (err == SOCKET_EPIPE) { + CYASSL_MSG(" Socket EPIPE"); + return CYASSL_CBIO_ERR_CONN_CLOSE; + } + else { + CYASSL_MSG(" General error"); + return CYASSL_CBIO_ERR_GENERAL; + } + } + + return sent; +} + + +/* The DTLS Generate Cookie callback + * return : number of bytes copied into buf, or error + */ +int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx) +{ + int sd = ssl->wfd; + struct sockaddr_storage peer; + XSOCKLENT peerSz = sizeof(peer); + Sha sha; + byte digest[SHA_DIGEST_SIZE]; + int ret = 0; + + (void)ctx; + + XMEMSET(&peer, 0, sizeof(peer)); + if (getpeername(sd, (struct sockaddr*)&peer, &peerSz) != 0) { + CYASSL_MSG("getpeername failed in EmbedGenerateCookie"); + return GEN_COOKIE_E; + } + + ret = InitSha(&sha); + if (ret != 0) + return ret; + ShaUpdate(&sha, (byte*)&peer, peerSz); + ShaFinal(&sha, digest); + + if (sz > SHA_DIGEST_SIZE) + sz = SHA_DIGEST_SIZE; + XMEMCPY(buf, digest, sz); + + return sz; +} + +#endif /* CYASSL_DTLS */ + +#ifdef HAVE_OCSP + + +static int tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port) +{ + struct sockaddr_storage addr; + int sockaddr_len = sizeof(struct sockaddr_in); + XMEMSET(&addr, 0, sizeof(addr)); + + #ifdef HAVE_GETADDRINFO + { + struct addrinfo hints; + struct addrinfo* answer = NULL; + char strPort[8]; + + XMEMSET(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + XSNPRINTF(strPort, sizeof(strPort), "%d", port); + strPort[7] = '\0'; + + if (getaddrinfo(ip, strPort, &hints, &answer) < 0 || answer == NULL) { + CYASSL_MSG("no addr info for OCSP responder"); + return -1; + } + + sockaddr_len = answer->ai_addrlen; + XMEMCPY(&addr, answer->ai_addr, sockaddr_len); + freeaddrinfo(answer); + + } + #else /* HAVE_GETADDRINFO */ + { + struct hostent* entry = gethostbyname(ip); + struct sockaddr_in *sin = (struct sockaddr_in *)&addr; + + if (entry) { + sin->sin_family = AF_INET; + sin->sin_port = htons(port); + XMEMCPY(&sin->sin_addr.s_addr, entry->h_addr_list[0], + entry->h_length); + } + else { + CYASSL_MSG("no addr info for OCSP responder"); + return -1; + } + } + #endif /* HAVE_GETADDRINFO */ + + *sockfd = socket(addr.ss_family, SOCK_STREAM, 0); + if (*sockfd < 0) { + CYASSL_MSG("bad socket fd, out of fds?"); + return -1; + } + + if (connect(*sockfd, (struct sockaddr *)&addr, sockaddr_len) != 0) { + CYASSL_MSG("OCSP responder tcp connect failed"); + return -1; + } + + return 0; +} + + +static int build_http_request(const char* domainName, const char* path, + int ocspReqSz, byte* buf, int bufSize) +{ + return XSNPRINTF((char*)buf, bufSize, + "POST %s HTTP/1.1\r\n" + "Host: %s\r\n" + "Content-Length: %d\r\n" + "Content-Type: application/ocsp-request\r\n" + "\r\n", + path, domainName, ocspReqSz); +} + + +static int decode_url(const char* url, int urlSz, + char* outName, char* outPath, word16* outPort) +{ + int result = -1; + + if (outName != NULL && outPath != NULL && outPort != NULL) + { + if (url == NULL || urlSz == 0) + { + *outName = 0; + *outPath = 0; + *outPort = 0; + } + else + { + int i, cur; + + /* need to break the url down into scheme, address, and port */ + /* "http://example.com:8080/" */ + /* "http://[::1]:443/" */ + if (XSTRNCMP(url, "http://", 7) == 0) { + cur = 7; + } else cur = 0; + + i = 0; + if (url[cur] == '[') { + cur++; + /* copy until ']' */ + while (url[cur] != 0 && url[cur] != ']' && cur < urlSz) { + outName[i++] = url[cur++]; + } + cur++; /* skip ']' */ + } + else { + while (url[cur] != 0 && url[cur] != ':' && + url[cur] != '/' && cur < urlSz) { + outName[i++] = url[cur++]; + } + } + outName[i] = 0; + /* Need to pick out the path after the domain name */ + + if (cur < urlSz && url[cur] == ':') { + char port[6]; + int j; + word32 bigPort = 0; + i = 0; + cur++; + while (cur < urlSz && url[cur] != 0 && url[cur] != '/' && + i < 6) { + port[i++] = url[cur++]; + } + + for (j = 0; j < i; j++) { + if (port[j] < '0' || port[j] > '9') return -1; + bigPort = (bigPort * 10) + (port[j] - '0'); + } + *outPort = (word16)bigPort; + } + else + *outPort = 80; + + if (cur < urlSz && url[cur] == '/') { + i = 0; + while (cur < urlSz && url[cur] != 0 && i < 80) { + outPath[i++] = url[cur++]; + } + outPath[i] = 0; + } + else { + outPath[0] = '/'; + outPath[1] = 0; + } + result = 0; + } + } + + return result; +} + + +/* return: >0 OCSP Response Size + * -1 error */ +static int process_http_response(int sfd, byte** respBuf, + byte* httpBuf, int httpBufSz) +{ + int result; + int len = 0; + char *start, *end; + byte *recvBuf = NULL; + int recvBufSz = 0; + enum phr_state { phr_init, phr_http_start, phr_have_length, + phr_have_type, phr_wait_end, phr_http_end + } state = phr_init; + + start = end = NULL; + do { + if (end == NULL) { + result = (int)recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0); + if (result > 0) { + len += result; + start = (char*)httpBuf; + start[len] = 0; + } + else { + CYASSL_MSG("process_http_response recv http from peer failed"); + return -1; + } + } + end = XSTRSTR(start, "\r\n"); + + if (end == NULL) { + if (len != 0) + XMEMMOVE(httpBuf, start, len); + start = end = NULL; + } + else if (end == start) { + if (state == phr_wait_end) { + state = phr_http_end; + len -= 2; + start += 2; + } + else { + CYASSL_MSG("process_http_response header ended early"); + return -1; + } + } + else { + *end = 0; + len -= (int)(end - start) + 2; + /* adjust len to remove the first line including the /r/n */ + + if (XSTRNCASECMP(start, "HTTP/1", 6) == 0) { + start += 9; + if (XSTRNCASECMP(start, "200 OK", 6) != 0 || + state != phr_init) { + CYASSL_MSG("process_http_response not OK"); + return -1; + } + state = phr_http_start; + } + else if (XSTRNCASECMP(start, "Content-Type:", 13) == 0) { + start += 13; + while (*start == ' ' && *start != '\0') start++; + if (XSTRNCASECMP(start, "application/ocsp-response", 25) != 0) { + CYASSL_MSG("process_http_response not ocsp-response"); + return -1; + } + + if (state == phr_http_start) state = phr_have_type; + else if (state == phr_have_length) state = phr_wait_end; + else { + CYASSL_MSG("process_http_response type invalid state"); + return -1; + } + } + else if (XSTRNCASECMP(start, "Content-Length:", 15) == 0) { + start += 15; + while (*start == ' ' && *start != '\0') start++; + recvBufSz = atoi(start); + + if (state == phr_http_start) state = phr_have_length; + else if (state == phr_have_type) state = phr_wait_end; + else { + CYASSL_MSG("process_http_response length invalid state"); + return -1; + } + } + + start = end + 2; + } + } while (state != phr_http_end); + + recvBuf = XMALLOC(recvBufSz, NULL, DYNAMIC_TYPE_IN_BUFFER); + if (recvBuf == NULL) { + CYASSL_MSG("process_http_response couldn't create response buffer"); + return -1; + } + + /* copy the remainder of the httpBuf into the respBuf */ + if (len != 0) + XMEMCPY(recvBuf, start, len); + + /* receive the OCSP response data */ + do { + result = (int)recv(sfd, (char*)recvBuf+len, recvBufSz-len, 0); + if (result > 0) + len += result; + else { + CYASSL_MSG("process_http_response recv ocsp from peer failed"); + return -1; + } + } while (len != recvBufSz); + + *respBuf = recvBuf; + return recvBufSz; +} + + +#define SCRATCH_BUFFER_SIZE 512 + +int EmbedOcspLookup(void* ctx, const char* url, int urlSz, + byte* ocspReqBuf, int ocspReqSz, byte** ocspRespBuf) +{ + char domainName[80], path[80]; + int httpBufSz; + SOCKET_T sfd = 0; + word16 port; + int ocspRespSz = 0; + byte* httpBuf = NULL; + + (void)ctx; + + if (ocspReqBuf == NULL || ocspReqSz == 0) { + CYASSL_MSG("OCSP request is required for lookup"); + return -1; + } + + if (ocspRespBuf == NULL) { + CYASSL_MSG("Cannot save OCSP response"); + return -1; + } + + if (decode_url(url, urlSz, domainName, path, &port) < 0) { + CYASSL_MSG("Unable to decode OCSP URL"); + return -1; + } + + /* Note, the library uses the EmbedOcspRespFree() callback to + * free this buffer. */ + httpBufSz = SCRATCH_BUFFER_SIZE; + httpBuf = (byte*)XMALLOC(httpBufSz, NULL, DYNAMIC_TYPE_IN_BUFFER); + + if (httpBuf == NULL) { + CYASSL_MSG("Unable to create OCSP response buffer"); + return -1; + } + + httpBufSz = build_http_request(domainName, path, ocspReqSz, + httpBuf, httpBufSz); + + if ((tcp_connect(&sfd, domainName, port) == 0) && (sfd > 0)) { + int written; + written = (int)send(sfd, (char*)httpBuf, httpBufSz, 0); + if (written == httpBufSz) { + written = (int)send(sfd, (char*)ocspReqBuf, ocspReqSz, 0); + if (written == ocspReqSz) { + ocspRespSz = process_http_response(sfd, ocspRespBuf, + httpBuf, SCRATCH_BUFFER_SIZE); + } + } + close(sfd); + if (ocspRespSz == 0) { + CYASSL_MSG("OCSP response was not OK, no OCSP response"); + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); + return -1; + } + } else { + CYASSL_MSG("OCSP Responder connection failed"); + close(sfd); + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); + return -1; + } + + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); + return ocspRespSz; +} + + +void EmbedOcspRespFree(void* ctx, byte *resp) +{ + (void)ctx; + + if (resp) + XFREE(resp, NULL, DYNAMIC_TYPE_IN_BUFFER); +} + + +#endif + +#endif /* CYASSL_USER_IO */ + +CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX *ctx, CallbackIORecv CBIORecv) +{ + ctx->CBIORecv = CBIORecv; +} + + +CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX *ctx, CallbackIOSend CBIOSend) +{ + ctx->CBIOSend = CBIOSend; +} + + +CYASSL_API void CyaSSL_SetIOReadCtx(CYASSL* ssl, void *rctx) +{ + ssl->IOCB_ReadCtx = rctx; +} + + +CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *wctx) +{ + ssl->IOCB_WriteCtx = wctx; +} + + +CYASSL_API void* CyaSSL_GetIOReadCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->IOCB_ReadCtx; + + return NULL; +} + + +CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->IOCB_WriteCtx; + + return NULL; +} + + +CYASSL_API void CyaSSL_SetIOReadFlags(CYASSL* ssl, int flags) +{ + ssl->rflags = flags; +} + + +CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags) +{ + ssl->wflags = flags; +} + + +#ifdef CYASSL_DTLS + +CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX* ctx, CallbackGenCookie cb) +{ + ctx->CBIOCookie = cb; +} + + +CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx) +{ + ssl->IOCB_CookieCtx = ctx; +} + + +CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->IOCB_CookieCtx; + + return NULL; +} + +#endif /* CYASSL_DTLS */ + + +#ifdef HAVE_NETX + +/* The NetX receive callback + * return : bytes read, or error + */ +int NetX_Receive(CYASSL *ssl, char *buf, int sz, void *ctx) +{ + NetX_Ctx* nxCtx = (NetX_Ctx*)ctx; + ULONG left; + ULONG total; + ULONG copied = 0; + UINT status; + + if (nxCtx == NULL || nxCtx->nxSocket == NULL) { + CYASSL_MSG("NetX Recv NULL parameters"); + return CYASSL_CBIO_ERR_GENERAL; + } + + if (nxCtx->nxPacket == NULL) { + status = nx_tcp_socket_receive(nxCtx->nxSocket, &nxCtx->nxPacket, + nxCtx->nxWait); + if (status != NX_SUCCESS) { + CYASSL_MSG("NetX Recv receive error"); + return CYASSL_CBIO_ERR_GENERAL; + } + } + + if (nxCtx->nxPacket) { + status = nx_packet_length_get(nxCtx->nxPacket, &total); + if (status != NX_SUCCESS) { + CYASSL_MSG("NetX Recv length get error"); + return CYASSL_CBIO_ERR_GENERAL; + } + + left = total - nxCtx->nxOffset; + status = nx_packet_data_extract_offset(nxCtx->nxPacket, nxCtx->nxOffset, + buf, sz, &copied); + if (status != NX_SUCCESS) { + CYASSL_MSG("NetX Recv data extract offset error"); + return CYASSL_CBIO_ERR_GENERAL; + } + + nxCtx->nxOffset += copied; + + if (copied == left) { + CYASSL_MSG("NetX Recv Drained packet"); + nx_packet_release(nxCtx->nxPacket); + nxCtx->nxPacket = NULL; + nxCtx->nxOffset = 0; + } + } + + return copied; +} + + +/* The NetX send callback + * return : bytes sent, or error + */ +int NetX_Send(CYASSL* ssl, char *buf, int sz, void *ctx) +{ + NetX_Ctx* nxCtx = (NetX_Ctx*)ctx; + NX_PACKET* packet; + NX_PACKET_POOL* pool; /* shorthand */ + UINT status; + + if (nxCtx == NULL || nxCtx->nxSocket == NULL) { + CYASSL_MSG("NetX Send NULL parameters"); + return CYASSL_CBIO_ERR_GENERAL; + } + + pool = nxCtx->nxSocket->nx_tcp_socket_ip_ptr->nx_ip_default_packet_pool; + status = nx_packet_allocate(pool, &packet, NX_TCP_PACKET, + nxCtx->nxWait); + if (status != NX_SUCCESS) { + CYASSL_MSG("NetX Send packet alloc error"); + return CYASSL_CBIO_ERR_GENERAL; + } + + status = nx_packet_data_append(packet, buf, sz, pool, nxCtx->nxWait); + if (status != NX_SUCCESS) { + nx_packet_release(packet); + CYASSL_MSG("NetX Send data append error"); + return CYASSL_CBIO_ERR_GENERAL; + } + + status = nx_tcp_socket_send(nxCtx->nxSocket, packet, nxCtx->nxWait); + if (status != NX_SUCCESS) { + nx_packet_release(packet); + CYASSL_MSG("NetX Send socket send error"); + return CYASSL_CBIO_ERR_GENERAL; + } + + return sz; +} + + +/* like set_fd, but for default NetX context */ +void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxSocket, ULONG waitOption) +{ + if (ssl) { + ssl->nxCtx.nxSocket = nxSocket; + ssl->nxCtx.nxWait = waitOption; + } +} + +#endif /* HAVE_NETX */ + diff --git a/project1/cyassl-3.0.0/src/keys.c b/project1/cyassl-3.0.0/src/keys.c new file mode 100644 index 00000000..463ba9f4 --- /dev/null +++ b/project1/cyassl-3.0.0/src/keys.c @@ -0,0 +1,2012 @@ +/* keys.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include +#ifdef SHOW_SECRETS + #ifdef FREESCALE_MQX + #include + #else + #include + #endif +#endif + + +int SetCipherSpecs(CYASSL* ssl) +{ + if (ssl->options.side == CYASSL_CLIENT_END) { + /* server side verified before SetCipherSpecs call */ + if (VerifyClientSuite(ssl) != 1) { + CYASSL_MSG("SetCipherSpecs() client has an unusuable suite"); + return UNSUPPORTED_SUITE; + } + } + /* ECC extensions, or AES-CCM */ + if (ssl->options.cipherSuite0 == ECC_BYTE) { + + switch (ssl->options.cipherSuite) { + +#ifdef HAVE_ECC + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA + case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA + case TLS_ECDHE_RSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA + case TLS_ECDH_RSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA + case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA + case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA + case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 + case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 + case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 + case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 + case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 1; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 + case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = ecc_diffie_hellman_kea; + ssl->specs.sig_algo = ecc_dsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + break; +#endif +#endif /* HAVE_ECC */ + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 + case TLS_RSA_WITH_AES_128_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 + case TLS_RSA_WITH_AES_256_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 + case TLS_PSK_WITH_AES_128_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 + case TLS_PSK_WITH_AES_256_CCM_8 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + + default: + CYASSL_MSG("Unsupported cipher suite, SetCipherSpecs ECC"); + return UNSUPPORTED_SUITE; + } /* switch */ + } /* if */ + if (ssl->options.cipherSuite0 != ECC_BYTE) { /* normal suites */ + switch (ssl->options.cipherSuite) { + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA + case SSL_RSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA + case TLS_NTRU_RSA_WITH_RC4_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ntru_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 + case SSL_RSA_WITH_RC4_128_MD5 : + ssl->specs.bulk_cipher_algorithm = cyassl_rc4; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = md5_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = MD5_DIGEST_SIZE; + ssl->specs.pad_size = PAD_MD5; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RC4_KEY_SIZE; + ssl->specs.iv_size = 0; + ssl->specs.block_size = 0; + + break; +#endif + +#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA + case SSL_RSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA + case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ntru_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = DES3_KEY_SIZE; + ssl->specs.block_size = DES_BLOCK_SIZE; + ssl->specs.iv_size = DES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA + case TLS_RSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 + case TLS_RSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA + case TLS_RSA_WITH_NULL_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = 0; + ssl->specs.block_size = 0; + ssl->specs.iv_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 + case TLS_RSA_WITH_NULL_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = 0; + ssl->specs.block_size = 0; + ssl->specs.iv_size = 0; + + break; +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA + case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ntru_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA + case TLS_RSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 + case TLS_RSA_WITH_AES_256_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA + case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = ntru_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 + case TLS_PSK_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA + case TLS_PSK_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA + case TLS_PSK_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 + case TLS_PSK_WITH_NULL_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = 0; + ssl->specs.block_size = 0; + ssl->specs.iv_size = 0; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_PSK_WITH_NULL_SHA + case TLS_PSK_WITH_NULL_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = psk_kea; + ssl->specs.sig_algo = anonymous_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = 0; + ssl->specs.block_size = 0; + ssl->specs.iv_size = 0; + + ssl->options.usingPSK_cipher = 1; + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 + case TLS_RSA_WITH_HC_128_MD5 : + ssl->specs.bulk_cipher_algorithm = cyassl_hc128; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = md5_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = MD5_DIGEST_SIZE; + ssl->specs.pad_size = PAD_MD5; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = HC_128_KEY_SIZE; + ssl->specs.block_size = 0; + ssl->specs.iv_size = HC_128_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA + case TLS_RSA_WITH_HC_128_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_hc128; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = HC_128_KEY_SIZE; + ssl->specs.block_size = 0; + ssl->specs.iv_size = HC_128_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 + case TLS_RSA_WITH_HC_128_B2B256: + ssl->specs.bulk_cipher_algorithm = cyassl_hc128; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = blake2b_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = BLAKE2B_256; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = HC_128_KEY_SIZE; + ssl->specs.block_size = 0; + ssl->specs.iv_size = HC_128_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 + case TLS_RSA_WITH_AES_128_CBC_B2B256: + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = blake2b_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = BLAKE2B_256; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 + case TLS_RSA_WITH_AES_256_CBC_B2B256: + ssl->specs.bulk_cipher_algorithm = cyassl_aes; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = blake2b_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = BLAKE2B_256; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.iv_size = AES_IV_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA + case TLS_RSA_WITH_RABBIT_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_rabbit; + ssl->specs.cipher_type = stream; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = RABBIT_KEY_SIZE; + ssl->specs.block_size = 0; + ssl->specs.iv_size = RABBIT_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 + case TLS_RSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 + case TLS_RSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 + case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_128_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 + case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : + ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; + ssl->specs.cipher_type = aead; + ssl->specs.mac_algorithm = sha384_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA384_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = AES_256_KEY_SIZE; + ssl->specs.block_size = AES_BLOCK_SIZE; + ssl->specs.iv_size = AEAD_IMP_IV_SZ; + ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = rsa_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + +#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + ssl->specs.bulk_cipher_algorithm = cyassl_camellia; + ssl->specs.cipher_type = block; + ssl->specs.mac_algorithm = sha256_mac; + ssl->specs.kea = diffie_hellman_kea; + ssl->specs.sig_algo = rsa_sa_algo; + ssl->specs.hash_size = SHA256_DIGEST_SIZE; + ssl->specs.pad_size = PAD_SHA; + ssl->specs.static_ecdh = 0; + ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; + ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; + ssl->specs.iv_size = CAMELLIA_IV_SIZE; + + break; +#endif + + default: + CYASSL_MSG("Unsupported cipher suite, SetCipherSpecs"); + return UNSUPPORTED_SUITE; + } /* switch */ + } /* if ECC / Normal suites else */ + + /* set TLS if it hasn't been turned off */ + if (ssl->version.major == 3 && ssl->version.minor >= 1) { +#ifndef NO_TLS + ssl->options.tls = 1; + ssl->hmac = TLS_hmac; + if (ssl->version.minor >= 2) + ssl->options.tls1_1 = 1; +#endif + } + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) + ssl->hmac = TLS_hmac; +#endif + + return 0; +} + + +enum KeyStuff { + MASTER_ROUNDS = 3, + PREFIX = 3, /* up to three letters for master prefix */ + KEY_PREFIX = 7 /* up to 7 prefix letters for key rounds */ + + +}; + +#ifndef NO_OLD_TLS +/* true or false, zero for error */ +static int SetPrefix(byte* sha_input, int idx) +{ + switch (idx) { + case 0: + XMEMCPY(sha_input, "A", 1); + break; + case 1: + XMEMCPY(sha_input, "BB", 2); + break; + case 2: + XMEMCPY(sha_input, "CCC", 3); + break; + case 3: + XMEMCPY(sha_input, "DDDD", 4); + break; + case 4: + XMEMCPY(sha_input, "EEEEE", 5); + break; + case 5: + XMEMCPY(sha_input, "FFFFFF", 6); + break; + case 6: + XMEMCPY(sha_input, "GGGGGGG", 7); + break; + default: + CYASSL_MSG("Set Prefix error, bad input"); + return 0; + } + return 1; +} +#endif + + +static int SetKeys(Ciphers* enc, Ciphers* dec, Keys* keys, CipherSpecs* specs, + byte side, void* heap, int devId) +{ +#ifdef BUILD_ARC4 + word32 sz = specs->key_size; + if (specs->bulk_cipher_algorithm == cyassl_rc4) { + if (enc->arc4 == NULL) + enc->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER); + if (enc->arc4 == NULL) + return MEMORY_E; + if (dec->arc4 == NULL) + dec->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER); + if (dec->arc4 == NULL) + return MEMORY_E; +#ifdef HAVE_CAVIUM + if (devId != NO_CAVIUM_DEVICE) { + if (Arc4InitCavium(enc->arc4, devId) != 0) { + CYASSL_MSG("Arc4InitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + if (Arc4InitCavium(dec->arc4, devId) != 0) { + CYASSL_MSG("Arc4InitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + } +#endif + if (side == CYASSL_CLIENT_END) { + Arc4SetKey(enc->arc4, keys->client_write_key, sz); + Arc4SetKey(dec->arc4, keys->server_write_key, sz); + } + else { + Arc4SetKey(enc->arc4, keys->server_write_key, sz); + Arc4SetKey(dec->arc4, keys->client_write_key, sz); + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef HAVE_HC128 + if (specs->bulk_cipher_algorithm == cyassl_hc128) { + int hcRet; + if (enc->hc128 == NULL) + enc->hc128 = + (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER); + if (enc->hc128 == NULL) + return MEMORY_E; + if (dec->hc128 == NULL) + dec->hc128 = + (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER); + if (dec->hc128 == NULL) + return MEMORY_E; + if (side == CYASSL_CLIENT_END) { + hcRet = Hc128_SetKey(enc->hc128, keys->client_write_key, + keys->client_write_IV); + if (hcRet != 0) return hcRet; + hcRet = Hc128_SetKey(dec->hc128, keys->server_write_key, + keys->server_write_IV); + if (hcRet != 0) return hcRet; + } + else { + hcRet = Hc128_SetKey(enc->hc128, keys->server_write_key, + keys->server_write_IV); + if (hcRet != 0) return hcRet; + hcRet = Hc128_SetKey(dec->hc128, keys->client_write_key, + keys->client_write_IV); + if (hcRet != 0) return hcRet; + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef BUILD_RABBIT + if (specs->bulk_cipher_algorithm == cyassl_rabbit) { + int rabRet; + if (enc->rabbit == NULL) + enc->rabbit = + (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER); + if (enc->rabbit == NULL) + return MEMORY_E; + if (dec->rabbit == NULL) + dec->rabbit = + (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER); + if (dec->rabbit == NULL) + return MEMORY_E; + if (side == CYASSL_CLIENT_END) { + rabRet = RabbitSetKey(enc->rabbit, keys->client_write_key, + keys->client_write_IV); + if (rabRet != 0) return rabRet; + rabRet = RabbitSetKey(dec->rabbit, keys->server_write_key, + keys->server_write_IV); + if (rabRet != 0) return rabRet; + } + else { + rabRet = RabbitSetKey(enc->rabbit, keys->server_write_key, + keys->server_write_IV); + if (rabRet != 0) return rabRet; + rabRet = RabbitSetKey(dec->rabbit, keys->client_write_key, + keys->client_write_IV); + if (rabRet != 0) return rabRet; + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef BUILD_DES3 + if (specs->bulk_cipher_algorithm == cyassl_triple_des) { + int desRet = 0; + + if (enc->des3 == NULL) + enc->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER); + if (enc->des3 == NULL) + return MEMORY_E; + if (dec->des3 == NULL) + dec->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER); + if (dec->des3 == NULL) + return MEMORY_E; +#ifdef HAVE_CAVIUM + if (devId != NO_CAVIUM_DEVICE) { + if (Des3_InitCavium(enc->des3, devId) != 0) { + CYASSL_MSG("Des3_InitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + if (Des3_InitCavium(dec->des3, devId) != 0) { + CYASSL_MSG("Des3_InitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + } +#endif + if (side == CYASSL_CLIENT_END) { + desRet = Des3_SetKey(enc->des3, keys->client_write_key, + keys->client_write_IV, DES_ENCRYPTION); + if (desRet != 0) + return desRet; + desRet = Des3_SetKey(dec->des3, keys->server_write_key, + keys->server_write_IV, DES_DECRYPTION); + if (desRet != 0) + return desRet; + } + else { + desRet = Des3_SetKey(enc->des3, keys->server_write_key, + keys->server_write_IV, DES_ENCRYPTION); + if (desRet != 0) + return desRet; + desRet = Des3_SetKey(dec->des3, keys->client_write_key, + keys->client_write_IV, DES_DECRYPTION); + if (desRet != 0) + return desRet; + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef BUILD_AES + if (specs->bulk_cipher_algorithm == cyassl_aes) { + int aesRet = 0; + + if (enc->aes == NULL) + enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (enc->aes == NULL) + return MEMORY_E; + if (dec->aes == NULL) + dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (dec->aes == NULL) + return MEMORY_E; +#ifdef HAVE_CAVIUM + if (devId != NO_CAVIUM_DEVICE) { + if (AesInitCavium(enc->aes, devId) != 0) { + CYASSL_MSG("AesInitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + if (AesInitCavium(dec->aes, devId) != 0) { + CYASSL_MSG("AesInitCavium failed in SetKeys"); + return CAVIUM_INIT_E; + } + } +#endif + if (side == CYASSL_CLIENT_END) { + aesRet = AesSetKey(enc->aes, keys->client_write_key, + specs->key_size, keys->client_write_IV, + AES_ENCRYPTION); + if (aesRet != 0) + return aesRet; + aesRet = AesSetKey(dec->aes, keys->server_write_key, + specs->key_size, keys->server_write_IV, + AES_DECRYPTION); + if (aesRet != 0) + return aesRet; + } + else { + aesRet = AesSetKey(enc->aes, keys->server_write_key, + specs->key_size, keys->server_write_IV, + AES_ENCRYPTION); + if (aesRet != 0) + return aesRet; + aesRet = AesSetKey(dec->aes, keys->client_write_key, + specs->key_size, keys->client_write_IV, + AES_DECRYPTION); + if (aesRet != 0) + return aesRet; + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef BUILD_AESGCM + if (specs->bulk_cipher_algorithm == cyassl_aes_gcm) { + if (enc->aes == NULL) + enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (enc->aes == NULL) + return MEMORY_E; + if (dec->aes == NULL) + dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (dec->aes == NULL) + return MEMORY_E; + + if (side == CYASSL_CLIENT_END) { + AesGcmSetKey(enc->aes, keys->client_write_key, specs->key_size); + XMEMCPY(keys->aead_enc_imp_IV, + keys->client_write_IV, AEAD_IMP_IV_SZ); + AesGcmSetKey(dec->aes, keys->server_write_key, specs->key_size); + XMEMCPY(keys->aead_dec_imp_IV, + keys->server_write_IV, AEAD_IMP_IV_SZ); + } + else { + AesGcmSetKey(enc->aes, keys->server_write_key, specs->key_size); + XMEMCPY(keys->aead_enc_imp_IV, + keys->server_write_IV, AEAD_IMP_IV_SZ); + AesGcmSetKey(dec->aes, keys->client_write_key, specs->key_size); + XMEMCPY(keys->aead_dec_imp_IV, + keys->client_write_IV, AEAD_IMP_IV_SZ); + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef HAVE_AESCCM + if (specs->bulk_cipher_algorithm == cyassl_aes_ccm) { + if (enc->aes == NULL) + enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (enc->aes == NULL) + return MEMORY_E; + if (dec->aes == NULL) + dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); + if (dec->aes == NULL) + return MEMORY_E; + + if (side == CYASSL_CLIENT_END) { + AesCcmSetKey(enc->aes, keys->client_write_key, specs->key_size); + XMEMCPY(keys->aead_enc_imp_IV, + keys->client_write_IV, AEAD_IMP_IV_SZ); + AesCcmSetKey(dec->aes, keys->server_write_key, specs->key_size); + XMEMCPY(keys->aead_dec_imp_IV, + keys->server_write_IV, AEAD_IMP_IV_SZ); + } + else { + AesCcmSetKey(enc->aes, keys->server_write_key, specs->key_size); + XMEMCPY(keys->aead_enc_imp_IV, + keys->server_write_IV, AEAD_IMP_IV_SZ); + AesCcmSetKey(dec->aes, keys->client_write_key, specs->key_size); + XMEMCPY(keys->aead_dec_imp_IV, + keys->client_write_IV, AEAD_IMP_IV_SZ); + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef HAVE_CAMELLIA + if (specs->bulk_cipher_algorithm == cyassl_camellia) { + int camRet; + + if (enc->cam == NULL) + enc->cam = + (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER); + if (enc->cam == NULL) + return MEMORY_E; + + if (dec->cam == NULL) + dec->cam = + (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER); + if (dec->cam == NULL) + return MEMORY_E; + + if (side == CYASSL_CLIENT_END) { + camRet = CamelliaSetKey(enc->cam, keys->client_write_key, + specs->key_size, keys->client_write_IV); + if (camRet != 0) + return camRet; + + camRet = CamelliaSetKey(dec->cam, keys->server_write_key, + specs->key_size, keys->server_write_IV); + if (camRet != 0) + return camRet; + } + else { + camRet = CamelliaSetKey(enc->cam, keys->server_write_key, + specs->key_size, keys->server_write_IV); + if (camRet != 0) + return camRet; + + camRet = CamelliaSetKey(dec->cam, keys->client_write_key, + specs->key_size, keys->client_write_IV); + if (camRet != 0) + return camRet; + } + enc->setup = 1; + dec->setup = 1; + } +#endif + +#ifdef HAVE_NULL_CIPHER + if (specs->bulk_cipher_algorithm == cyassl_cipher_null) { + enc->setup = 1; + dec->setup = 1; + } +#endif + + keys->sequence_number = 0; + keys->peer_sequence_number = 0; + keys->encryptionOn = 0; + (void)side; + (void)heap; + (void)enc; + (void)dec; + (void)specs; + (void)devId; + + return 0; +} + + +/* TLS can call too */ +int StoreKeys(CYASSL* ssl, const byte* keyData) +{ + int sz, i = 0; + int devId = NO_CAVIUM_DEVICE; + +#ifdef HAVE_CAVIUM + devId = ssl->devId; +#endif + + if (ssl->specs.cipher_type != aead) { + sz = ssl->specs.hash_size; + XMEMCPY(ssl->keys.client_write_MAC_secret,&keyData[i], sz); + i += sz; + XMEMCPY(ssl->keys.server_write_MAC_secret,&keyData[i], sz); + i += sz; + } + sz = ssl->specs.key_size; + XMEMCPY(ssl->keys.client_write_key, &keyData[i], sz); + i += sz; + XMEMCPY(ssl->keys.server_write_key, &keyData[i], sz); + i += sz; + + sz = ssl->specs.iv_size; + XMEMCPY(ssl->keys.client_write_IV, &keyData[i], sz); + i += sz; + XMEMCPY(ssl->keys.server_write_IV, &keyData[i], sz); + +#ifdef HAVE_AEAD + if (ssl->specs.cipher_type == aead) { + /* Initialize the AES-GCM/CCM explicit IV to a zero. */ + XMEMSET(ssl->keys.aead_exp_IV, 0, AEAD_EXP_IV_SZ); + } +#endif + + return SetKeys(&ssl->encrypt, &ssl->decrypt, &ssl->keys, &ssl->specs, + ssl->options.side, ssl->heap, devId); +} + +#ifndef NO_OLD_TLS +int DeriveKeys(CYASSL* ssl) +{ + int length = 2 * ssl->specs.hash_size + + 2 * ssl->specs.key_size + + 2 * ssl->specs.iv_size; + int rounds = (length + MD5_DIGEST_SIZE - 1 ) / MD5_DIGEST_SIZE, i; + int ret = 0; + + byte shaOutput[SHA_DIGEST_SIZE]; + byte md5Input[SECRET_LEN + SHA_DIGEST_SIZE]; + byte shaInput[KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN]; + + Md5 md5; + Sha sha; + + byte keyData[KEY_PREFIX * MD5_DIGEST_SIZE]; /* max size */ + + InitMd5(&md5); + ret = InitSha(&sha); + if (ret != 0) + return ret; + + XMEMCPY(md5Input, ssl->arrays->masterSecret, SECRET_LEN); + + for (i = 0; i < rounds; ++i) { + int j = i + 1; + int idx = j; + + if (!SetPrefix(shaInput, i)) { + return PREFIX_ERROR; + } + + XMEMCPY(shaInput + idx, ssl->arrays->masterSecret, SECRET_LEN); + idx += SECRET_LEN; + XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN); + idx += RAN_LEN; + XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN); + + ShaUpdate(&sha, shaInput, (word32)sizeof(shaInput) - KEY_PREFIX + j); + ShaFinal(&sha, shaOutput); + + XMEMCPY(&md5Input[SECRET_LEN], shaOutput, SHA_DIGEST_SIZE); + Md5Update(&md5, md5Input, sizeof(md5Input)); + Md5Final(&md5, keyData + i * MD5_DIGEST_SIZE); + } + + return StoreKeys(ssl, keyData); +} + + +static int CleanPreMaster(CYASSL* ssl) +{ + int i, ret, sz = ssl->arrays->preMasterSz; + + for (i = 0; i < sz; i++) + ssl->arrays->preMasterSecret[i] = 0; + + ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->preMasterSecret, sz); + if (ret != 0) + return ret; + + for (i = 0; i < sz; i++) + ssl->arrays->preMasterSecret[i] = 0; + + return 0; +} + + +/* Create and store the master secret see page 32, 6.1 */ +static int MakeSslMasterSecret(CYASSL* ssl) +{ + byte shaOutput[SHA_DIGEST_SIZE]; + byte md5Input[ENCRYPT_LEN + SHA_DIGEST_SIZE]; + byte shaInput[PREFIX + ENCRYPT_LEN + 2 * RAN_LEN]; + int i, ret; + word32 idx; + word32 pmsSz = ssl->arrays->preMasterSz; + + Md5 md5; + Sha sha; + +#ifdef SHOW_SECRETS + { + word32 j; + printf("pre master secret: "); + for (j = 0; j < pmsSz; j++) + printf("%02x", ssl->arrays->preMasterSecret[j]); + printf("\n"); + } +#endif + + InitMd5(&md5); + ret = InitSha(&sha); + if (ret != 0) + return ret; + + XMEMCPY(md5Input, ssl->arrays->preMasterSecret, pmsSz); + + for (i = 0; i < MASTER_ROUNDS; ++i) { + byte prefix[PREFIX]; + if (!SetPrefix(prefix, i)) { + return PREFIX_ERROR; + } + + idx = 0; + XMEMCPY(shaInput, prefix, i + 1); + idx += i + 1; + + XMEMCPY(shaInput + idx, ssl->arrays->preMasterSecret, pmsSz); + idx += pmsSz; + XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN); + idx += RAN_LEN; + XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN); + idx += RAN_LEN; + ShaUpdate(&sha, shaInput, idx); + ShaFinal(&sha, shaOutput); + + idx = pmsSz; /* preSz */ + XMEMCPY(md5Input + idx, shaOutput, SHA_DIGEST_SIZE); + idx += SHA_DIGEST_SIZE; + Md5Update(&md5, md5Input, idx); + Md5Final(&md5, &ssl->arrays->masterSecret[i * MD5_DIGEST_SIZE]); + } + +#ifdef SHOW_SECRETS + { + word32 j; + printf("master secret: "); + for (j = 0; j < SECRET_LEN; j++) + printf("%02x", ssl->arrays->masterSecret[j]); + printf("\n"); + } +#endif + + ret = DeriveKeys(ssl); + if (ret != 0) { + /* always try to clean PreMaster */ + CleanPreMaster(ssl); + return ret; + } + + return CleanPreMaster(ssl); +} +#endif + + +/* Master wrapper, doesn't use SSL stack space in TLS mode */ +int MakeMasterSecret(CYASSL* ssl) +{ +#ifdef NO_OLD_TLS + return MakeTlsMasterSecret(ssl); +#elif !defined(NO_TLS) + if (ssl->options.tls) return MakeTlsMasterSecret(ssl); +#endif + +#ifndef NO_OLD_TLS + return MakeSslMasterSecret(ssl); +#endif +} + diff --git a/project1/cyassl-3.0.0/src/libcyassl.la b/project1/cyassl-3.0.0/src/libcyassl.la new file mode 100644 index 00000000..dcae8a35 --- /dev/null +++ b/project1/cyassl-3.0.0/src/libcyassl.la @@ -0,0 +1,41 @@ +# libcyassl.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libcyassl.so.5' + +# Names of this library. +library_names='libcyassl.so.5.0.5 libcyassl.so.5 libcyassl.so' + +# The name of the static archive. +old_library='' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags=' -pthread' + +# Libraries that this one depends upon. +dependency_libs=' -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libcyassl. +current=5 +age=0 +revision=5 + +# Is this an already installed library? +installed=no + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib' diff --git a/project1/cyassl-3.0.0/src/ocsp.c b/project1/cyassl-3.0.0/src/ocsp.c new file mode 100644 index 00000000..98cbfdb7 --- /dev/null +++ b/project1/cyassl-3.0.0/src/ocsp.c @@ -0,0 +1,269 @@ +/* ocsp.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_OCSP + +#include +#include +#include + + +int InitOCSP(CYASSL_OCSP* ocsp, CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("InitOCSP"); + XMEMSET(ocsp, 0, sizeof(*ocsp)); + ocsp->cm = cm; + if (InitMutex(&ocsp->ocspLock) != 0) + return BAD_MUTEX_E; + + return 0; +} + + +static int InitOCSP_Entry(OCSP_Entry* ocspe, DecodedCert* cert) +{ + CYASSL_ENTER("InitOCSP_Entry"); + + XMEMSET(ocspe, 0, sizeof(*ocspe)); + XMEMCPY(ocspe->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE); + XMEMCPY(ocspe->issuerKeyHash, cert->issuerKeyHash, SHA_DIGEST_SIZE); + + return 0; +} + + +static void FreeOCSP_Entry(OCSP_Entry* ocspe) +{ + CertStatus* tmp = ocspe->status; + + CYASSL_ENTER("FreeOCSP_Entry"); + + while (tmp) { + CertStatus* next = tmp->next; + XFREE(tmp, NULL, DYNAMIC_TYPE_OCSP_STATUS); + tmp = next; + } +} + + +void FreeOCSP(CYASSL_OCSP* ocsp, int dynamic) +{ + OCSP_Entry* tmp = ocsp->ocspList; + + CYASSL_ENTER("FreeOCSP"); + + while (tmp) { + OCSP_Entry* next = tmp->next; + FreeOCSP_Entry(tmp); + XFREE(tmp, NULL, DYNAMIC_TYPE_OCSP_ENTRY); + tmp = next; + } + + FreeMutex(&ocsp->ocspLock); + if (dynamic) + XFREE(ocsp, NULL, DYNAMIC_TYPE_OCSP); +} + + +static int xstat2err(int stat) +{ + switch (stat) { + case CERT_GOOD: + return 0; + case CERT_REVOKED: + return OCSP_CERT_REVOKED; + default: + return OCSP_CERT_UNKNOWN; + } +} + + +int CheckCertOCSP(CYASSL_OCSP* ocsp, DecodedCert* cert) +{ + byte* ocspReqBuf = NULL; + int ocspReqSz = 2048; + byte* ocspRespBuf = NULL; + OcspRequest ocspRequest; + OcspResponse ocspResponse; + int result = -1; + OCSP_Entry* ocspe; + CertStatus* certStatus = NULL; + CertStatus newStatus; + const char *url; + int urlSz; + + CYASSL_ENTER("CheckCertOCSP"); + + if (LockMutex(&ocsp->ocspLock) != 0) { + CYASSL_LEAVE("CheckCertOCSP", BAD_MUTEX_E); + return BAD_MUTEX_E; + } + + ocspe = ocsp->ocspList; + while (ocspe) { + if (XMEMCMP(ocspe->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE) == 0 + && XMEMCMP(ocspe->issuerKeyHash, cert->issuerKeyHash, + SHA_DIGEST_SIZE) == 0) + break; + else + ocspe = ocspe->next; + } + + if (ocspe == NULL) { + ocspe = (OCSP_Entry*)XMALLOC(sizeof(OCSP_Entry), + NULL, DYNAMIC_TYPE_OCSP_ENTRY); + if (ocspe != NULL) { + InitOCSP_Entry(ocspe, cert); + ocspe->next = ocsp->ocspList; + ocsp->ocspList = ocspe; + } + else { + UnLockMutex(&ocsp->ocspLock); + CYASSL_LEAVE("CheckCertOCSP", MEMORY_ERROR); + return MEMORY_ERROR; + } + } + else { + certStatus = ocspe->status; + while (certStatus) { + if (certStatus->serialSz == cert->serialSz && + XMEMCMP(certStatus->serial, cert->serial, cert->serialSz) == 0) + break; + else + certStatus = certStatus->next; + } + } + + if (certStatus != NULL) { + if (!ValidateDate(certStatus->thisDate, + certStatus->thisDateFormat, BEFORE) || + (certStatus->nextDate[0] == 0) || + !ValidateDate(certStatus->nextDate, + certStatus->nextDateFormat, AFTER)) { + CYASSL_MSG("\tinvalid status date, looking up cert"); + } + else { + result = xstat2err(certStatus->status); + UnLockMutex(&ocsp->ocspLock); + CYASSL_LEAVE("CheckCertOCSP", result); + return result; + } + } + + UnLockMutex(&ocsp->ocspLock); + + if (ocsp->cm->ocspUseOverrideURL) { + url = ocsp->cm->ocspOverrideURL; + if (url != NULL && url[0] != '\0') + urlSz = (int)XSTRLEN(url); + else + return OCSP_NEED_URL; + } + else if (cert->extAuthInfoSz != 0 && cert->extAuthInfo != NULL) { + url = (const char *)cert->extAuthInfo; + urlSz = cert->extAuthInfoSz; + } + else { + /* cert doesn't have extAuthInfo, assuming CERT_GOOD */ + return 0; + } + + ocspReqBuf = (byte*)XMALLOC(ocspReqSz, NULL, DYNAMIC_TYPE_IN_BUFFER); + if (ocspReqBuf == NULL) { + CYASSL_LEAVE("CheckCertOCSP", MEMORY_ERROR); + return MEMORY_ERROR; + } + InitOcspRequest(&ocspRequest, cert, ocsp->cm->ocspSendNonce, + ocspReqBuf, ocspReqSz); + ocspReqSz = EncodeOcspRequest(&ocspRequest); + + if (ocsp->cm->ocspIOCb) + result = ocsp->cm->ocspIOCb(ocsp->cm->ocspIOCtx, url, urlSz, + ocspReqBuf, ocspReqSz, &ocspRespBuf); + + if (result >= 0 && ocspRespBuf) { + XMEMSET(&newStatus, 0, sizeof(CertStatus)); + + InitOcspResponse(&ocspResponse, &newStatus, ocspRespBuf, result); + OcspResponseDecode(&ocspResponse); + + if (ocspResponse.responseStatus != OCSP_SUCCESSFUL) + result = OCSP_LOOKUP_FAIL; + else { + if (CompareOcspReqResp(&ocspRequest, &ocspResponse) == 0) { + result = xstat2err(ocspResponse.status->status); + + if (LockMutex(&ocsp->ocspLock) != 0) + result = BAD_MUTEX_E; + else { + if (certStatus != NULL) + /* Replace existing certificate entry with updated */ + XMEMCPY(certStatus, &newStatus, sizeof(CertStatus)); + else { + /* Save new certificate entry */ + certStatus = (CertStatus*)XMALLOC(sizeof(CertStatus), + NULL, DYNAMIC_TYPE_OCSP_STATUS); + if (certStatus != NULL) { + XMEMCPY(certStatus, &newStatus, sizeof(CertStatus)); + certStatus->next = ocspe->status; + ocspe->status = certStatus; + ocspe->totalStatus++; + } + } + + UnLockMutex(&ocsp->ocspLock); + } + } + else + result = OCSP_LOOKUP_FAIL; + } + } + else + result = OCSP_LOOKUP_FAIL; + + if (ocspReqBuf != NULL) + XFREE(ocspReqBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); + + if (ocspRespBuf != NULL && ocsp->cm->ocspRespFreeCb) + ocsp->cm->ocspRespFreeCb(ocsp->cm->ocspIOCtx, ocspRespBuf); + + CYASSL_LEAVE("CheckCertOCSP", result); + return result; +} + + +#else /* HAVE_OCSP */ + + +#ifdef _MSC_VER + /* 4206 warning for blank file */ + #pragma warning(disable: 4206) +#endif + + +#endif /* HAVE_OCSP */ + diff --git a/project1/cyassl-3.0.0/src/sniffer.c b/project1/cyassl-3.0.0/src/sniffer.c new file mode 100644 index 00000000..2c6860c8 --- /dev/null +++ b/project1/cyassl-3.0.0/src/sniffer.c @@ -0,0 +1,2567 @@ +/* sniffer.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + + + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef CYASSL_SNIFFER + +#include +#include + +#ifndef _WIN32 + #include +#endif + +#ifdef _WIN32 + #define SNPRINTF _snprintf +#else + #define SNPRINTF snprintf +#endif + +#include +#include +#include +#include +#include + + +#ifndef min + +static INLINE word32 min(word32 a, word32 b) +{ + return a > b ? b : a; +} + +#endif + + +/* Misc constants */ +enum { + MAX_SERVER_ADDRESS = 128, /* maximum server address length */ + MAX_ERROR_LEN = 80, /* maximum error length */ + ETHER_IF_ADDR_LEN = 6, /* ethernet interface address length */ + LOCAL_IF_ADDR_LEN = 4, /* localhost interface address length, !windows */ + TCP_PROTO = 6, /* TCP_PROTOCOL */ + IP_HDR_SZ = 20, /* IP header legnth, min */ + TCP_HDR_SZ = 20, /* TCP header legnth, min */ + IPV4 = 4, /* IP version 4 */ + TCP_PROTOCOL = 6, /* TCP Protocol id */ + TRACE_MSG_SZ = 80, /* Trace Message buffer size */ + HASH_SIZE = 499, /* Session Hash Table Rows */ + PSEUDO_HDR_SZ = 12, /* TCP Pseudo Header size in bytes */ + FATAL_ERROR_STATE = 1, /* SnifferSession fatal error state */ + SNIFFER_TIMEOUT = 900, /* Cache unclosed Sessions for 15 minutes */ + TICKET_HINT_LEN = 4, /* Session Ticket Hint length */ + EXT_TYPE_SZ = 2, /* Extension length */ + MAX_INPUT_SZ = MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA + + MTU_EXTRA, /* Max input sz of reassembly */ + TICKET_EXT_ID = 0x23 /* Session Ticket Extension ID */ +}; + + +#ifdef _WIN32 + +static HMODULE dllModule; /* for error string resources */ + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + static int didInit = 0; + + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + if (didInit == 0) { + dllModule = hModule; + ssl_InitSniffer(); + didInit = 1; + } + break; + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + case DLL_PROCESS_DETACH: + if (didInit) { + ssl_FreeSniffer(); + didInit = 0; + } + break; + } + return TRUE; +} + +#endif /* _WIN32 */ + + +static int TraceOn = 0; /* Trace is off by default */ +static FILE* TraceFile = 0; + + +/* windows uses .rc table for this */ +#ifndef _WIN32 + +static const char* const msgTable[] = +{ + /* 1 */ + "Out of Memory", + "New SSL Sniffer Server Registered", + "Checking IP Header", + "SSL Sniffer Server Not Registered", + "Checking TCP Header", + + /* 6 */ + "SSL Sniffer Server Port Not Registered", + "RSA Private Decrypt Error", + "RSA Private Decode Error", + "Set Cipher Spec Error", + "Server Hello Input Malformed", + + /* 11 */ + "Couldn't Resume Session Error", + "Server Did Resumption", + "Client Hello Input Malformed", + "Client Trying to Resume", + "Handshake Input Malformed", + + /* 16 */ + "Got Hello Verify msg", + "Got Server Hello msg", + "Got Cert Request msg", + "Got Server Key Exchange msg", + "Got Cert msg", + + /* 21 */ + "Got Server Hello Done msg", + "Got Finished msg", + "Got Client Hello msg", + "Got Client Key Exchange msg", + "Got Cert Verify msg", + + /* 26 */ + "Got Unknown Handshake msg", + "New SSL Sniffer Session created", + "Couldn't create new SSL", + "Got a Packet to decode", + "No data present", + + /* 31 */ + "Session Not Found", + "Got an Old Client Hello msg", + "Old Client Hello Input Malformed", + "Old Client Hello OK", + "Bad Old Client Hello", + + /* 36 */ + "Bad Record Header", + "Record Header Input Malformed", + "Got a HandShake msg", + "Bad HandShake msg", + "Got a Change Cipher Spec msg", + + /* 41 */ + "Got Application Data msg", + "Bad Application Data", + "Got an Alert msg", + "Another msg to Process", + "Removing Session From Table", + + /* 46 */ + "Bad Key File", + "Wrong IP Version", + "Wrong Protocol type", + "Packet Short for header processing", + "Got Unknown Record Type", + + /* 51 */ + "Can't Open Trace File", + "Session in Fatal Error State", + "Partial SSL record received", + "Buffer Error, malformed input", + "Added to Partial Input", + + /* 56 */ + "Received a Duplicate Packet", + "Received an Out of Order Packet", + "Received an Overlap Duplicate Packet", + "Received an Overlap Reassembly Begin Duplicate Packet", + "Received an Overlap Reassembly End Duplicate Packet", + + /* 61 */ + "Missed the Client Hello Entirely", + "Got Hello Request msg", + "Got Session Ticket msg", + "Bad Input", + "Bad Decrypt Type", + + /* 66 */ + "Bad Finished Message Processing", + "Bad Compression Type", + "Bad DeriveKeys Error", + "Saw ACK for Missing Packet Error", + "Bad Decrypt Operation" +}; + + +/* *nix version uses table above */ +static void GetError(int idx, char* str) +{ + XSTRNCPY(str, msgTable[idx - 1], MAX_ERROR_LEN); +} + + +#else /* _WIN32 */ + + +/* Windows version uses .rc table */ +static void GetError(int idx, char* buffer) +{ + if (!LoadStringA(dllModule, idx, buffer, MAX_ERROR_LEN)) + buffer[0] = 0; +} + + +#endif /* _WIN32 */ + + +/* Packet Buffer for reassembly list and ready list */ +typedef struct PacketBuffer { + word32 begin; /* relative sequence begin */ + word32 end; /* relative sequence end */ + byte* data; /* actual data */ + struct PacketBuffer* next; /* next on reassembly list or ready list */ +} PacketBuffer; + + +/* Sniffer Server holds info for each server/port monitored */ +typedef struct SnifferServer { + SSL_CTX* ctx; /* SSL context */ + char address[MAX_SERVER_ADDRESS]; /* passed in server address */ + word32 server; /* netowrk order address */ + int port; /* server port */ + struct SnifferServer* next; /* for list */ +} SnifferServer; + + +/* Session Flags */ +typedef struct Flags { + byte side; /* which end is current packet headed */ + byte serverCipherOn; /* indicates whether cipher is active */ + byte clientCipherOn; /* indicates whether cipher is active */ + byte resuming; /* did this session come from resumption */ + byte cached; /* have we cached this session yet */ + byte clientHello; /* processed client hello yet, for SSLv2 */ + byte finCount; /* get both FINs before removing */ + byte fatalError; /* fatal error state */ +} Flags; + + +/* Out of Order FIN caputre */ +typedef struct FinCaputre { + word32 cliFinSeq; /* client relative sequence FIN 0 is no */ + word32 srvFinSeq; /* server relative sequence FIN, 0 is no */ + byte cliCounted; /* did we count yet, detects duplicates */ + byte srvCounted; /* did we count yet, detects duplicates */ +} FinCaputre; + + +/* Sniffer Session holds info for each client/server SSL/TLS session */ +typedef struct SnifferSession { + SnifferServer* context; /* server context */ + SSL* sslServer; /* SSL server side decode */ + SSL* sslClient; /* SSL client side decode */ + word32 server; /* server address in network byte order */ + word32 client; /* client address in network byte order */ + word16 srvPort; /* server port */ + word16 cliPort; /* client port */ + word32 cliSeqStart; /* client start sequence */ + word32 srvSeqStart; /* server start sequence */ + word32 cliExpected; /* client expected sequence (relative) */ + word32 srvExpected; /* server expected sequence (relative) */ + FinCaputre finCaputre; /* retain out of order FIN s */ + Flags flags; /* session flags */ + time_t lastUsed; /* last used ticks */ + PacketBuffer* cliReassemblyList; /* client out of order packets */ + PacketBuffer* srvReassemblyList; /* server out of order packets */ + struct SnifferSession* next; /* for hash table list */ + byte* ticketID; /* mac ID of session ticket */ +} SnifferSession; + + +/* Sniffer Server List and mutex */ +static SnifferServer* ServerList = 0; +static CyaSSL_Mutex ServerListMutex; + + +/* Session Hash Table, mutex, and count */ +static SnifferSession* SessionTable[HASH_SIZE]; +static CyaSSL_Mutex SessionMutex; +static int SessionCount = 0; + + +/* Initialize overall Sniffer */ +void ssl_InitSniffer(void) +{ + CyaSSL_Init(); + InitMutex(&ServerListMutex); + InitMutex(&SessionMutex); +} + + +/* Free Sniffer Server's resources/self */ +static void FreeSnifferServer(SnifferServer* srv) +{ + if (srv) + SSL_CTX_free(srv->ctx); + free(srv); +} + + +/* free PacketBuffer's resources/self */ +static void FreePacketBuffer(PacketBuffer* del) +{ + if (del) { + free(del->data); + free(del); + } +} + + +/* remove PacketBuffer List */ +static void FreePacketList(PacketBuffer* in) +{ + if (in) { + PacketBuffer* del; + PacketBuffer* packet = in; + + while (packet) { + del = packet; + packet = packet->next; + FreePacketBuffer(del); + } + } +} + + +/* Free Sniffer Session's resources/self */ +static void FreeSnifferSession(SnifferSession* session) +{ + if (session) { + SSL_free(session->sslClient); + SSL_free(session->sslServer); + + FreePacketList(session->cliReassemblyList); + FreePacketList(session->srvReassemblyList); + + free(session->ticketID); + } + free(session); +} + + +/* Free overall Sniffer */ +void ssl_FreeSniffer(void) +{ + SnifferServer* srv; + SnifferServer* removeServer; + SnifferSession* session; + SnifferSession* removeSession; + int i; + + LockMutex(&ServerListMutex); + LockMutex(&SessionMutex); + + srv = ServerList; + while (srv) { + removeServer = srv; + srv = srv->next; + FreeSnifferServer(removeServer); + } + + for (i = 0; i < HASH_SIZE; i++) { + session = SessionTable[i]; + while (session) { + removeSession = session; + session = session->next; + FreeSnifferSession(removeSession); + } + } + + UnLockMutex(&SessionMutex); + UnLockMutex(&ServerListMutex); + + FreeMutex(&SessionMutex); + FreeMutex(&ServerListMutex); + + if (TraceFile) { + TraceOn = 0; + fclose(TraceFile); + TraceFile = NULL; + } + + CyaSSL_Cleanup(); +} + + +/* Initialize a SnifferServer */ +static void InitSnifferServer(SnifferServer* sniffer) +{ + sniffer->ctx = 0; + XMEMSET(sniffer->address, 0, MAX_SERVER_ADDRESS); + sniffer->server = 0; + sniffer->port = 0; + sniffer->next = 0; +} + + +/* Initialize session flags */ +static void InitFlags(Flags* flags) +{ + flags->side = 0; + flags->serverCipherOn = 0; + flags->clientCipherOn = 0; + flags->resuming = 0; + flags->cached = 0; + flags->clientHello = 0; + flags->finCount = 0; + flags->fatalError = 0; +} + + +/* Initialize FIN Capture */ +static void InitFinCapture(FinCaputre* cap) +{ + cap->cliFinSeq = 0; + cap->srvFinSeq = 0; + cap->cliCounted = 0; + cap->srvCounted = 0; +} + + +/* Initialize a Sniffer Session */ +static void InitSession(SnifferSession* session) +{ + session->context = 0; + session->sslServer = 0; + session->sslClient = 0; + session->server = 0; + session->client = 0; + session->srvPort = 0; + session->cliPort = 0; + session->cliSeqStart = 0; + session->srvSeqStart = 0; + session->cliExpected = 0; + session->srvExpected = 0; + session->lastUsed = 0; + session->cliReassemblyList = 0; + session->srvReassemblyList = 0; + session->next = 0; + session->ticketID = 0; + + InitFlags(&session->flags); + InitFinCapture(&session->finCaputre); +} + + +/* IP Info from IP Header */ +typedef struct IpInfo { + int length; /* length of this header */ + int total; /* total length of fragment */ + word32 src; /* network order source address */ + word32 dst; /* network order destination address */ +} IpInfo; + + +/* TCP Info from TCP Header */ +typedef struct TcpInfo { + int srcPort; /* source port */ + int dstPort; /* source port */ + int length; /* length of this header */ + word32 sequence; /* sequence number */ + word32 ackNumber; /* ack number */ + byte fin; /* FIN set */ + byte rst; /* RST set */ + byte syn; /* SYN set */ + byte ack; /* ACK set */ +} TcpInfo; + + +/* Tcp Pseudo Header for Checksum calculation */ +typedef struct TcpPseudoHdr { + word32 src; /* source address */ + word32 dst; /* destination address */ + byte rsv; /* reserved, always 0 */ + byte protocol; /* IP protocol */ + word16 legnth; /* tcp header length + data length (doesn't include */ + /* pseudo header length) network order */ +} TcpPseudoHdr; + + +/* Password Setting Callback */ +static int SetPassword(char* passwd, int sz, int rw, void* userdata) +{ + (void)rw; + XSTRNCPY(passwd, userdata, sz); + return (int)XSTRLEN(userdata); +} + + +/* Ethernet Header */ +typedef struct EthernetHdr { + byte dst[ETHER_IF_ADDR_LEN]; /* destination host address */ + byte src[ETHER_IF_ADDR_LEN]; /* source host address */ + word16 type; /* IP, ARP, etc */ +} EthernetHdr; + + +/* IP Header */ +typedef struct IpHdr { + byte ver_hl; /* version/header length */ + byte tos; /* type of service */ + word16 length; /* total length */ + word16 id; /* identification */ + word16 offset; /* fragment offset field */ + byte ttl; /* time to live */ + byte protocol; /* protocol */ + word16 sum; /* checksum */ + word32 src; /* source address */ + word32 dst; /* destination address */ +} IpHdr; + + +#define IP_HL(ip) ( (((ip)->ver_hl) & 0x0f) * 4) +#define IP_V(ip) ( ((ip)->ver_hl) >> 4) + +/* TCP Header */ +typedef struct TcpHdr { + word16 srcPort; /* source port */ + word16 dstPort; /* destination port */ + word32 sequence; /* sequence number */ + word32 ack; /* acknoledgment number */ + byte offset; /* data offset, reserved */ + byte flags; /* option flags */ + word16 window; /* window */ + word16 sum; /* checksum */ + word16 urgent; /* urgent pointer */ +} TcpHdr; + +#define TCP_LEN(tcp) ( (((tcp)->offset & 0xf0) >> 4) * 4) +#define TCP_FIN 0x01 +#define TCP_SYN 0x02 +#define TCP_RST 0x04 +#define TCP_ACK 0x10 + + + + + +/* Use platform specific GetError to write to tracfile if tracing */ +static void Trace(int idx) +{ + if (TraceOn) { + char myBuffer[MAX_ERROR_LEN]; + GetError(idx, myBuffer); + fprintf(TraceFile, "\t%s\n", myBuffer); +#ifdef DEBUG_SNIFFER + fprintf(stderr, "\t%s\n", myBuffer); +#endif + } +} + + +/* Show TimeStamp for beginning of packet Trace */ +static void TraceHeader(void) +{ + if (TraceOn) { + time_t ticks = time(NULL); + fprintf(TraceFile, "\n%s", ctime(&ticks)); + } +} + + +/* Show Set Server info for Trace */ +static void TraceSetServer(const char* srv, int port, const char* keyFile) +{ + if (TraceOn) { + fprintf(TraceFile, "\tTrying to install a new Sniffer Server with\n"); + fprintf(TraceFile, "\tserver: %s, port: %d, keyFile: %s\n", srv, port, + keyFile); + } +} + + +/* Trace got packet number */ +static void TracePacket(void) +{ + if (TraceOn) { + static word32 packetNumber = 0; + fprintf(TraceFile, "\tGot a Packet to decode, packet %u\n", + ++packetNumber); + } +} + + +/* Convert network byte order address into human readable */ +static char* IpToS(word32 addr, char* str) +{ + byte* p = (byte*)&addr; + + SNPRINTF(str, TRACE_MSG_SZ, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); + + return str; +} + + +/* Show destination and source address from Ip Hdr for packet Trace */ +static void TraceIP(IpHdr* iphdr) +{ + if (TraceOn) { + char src[TRACE_MSG_SZ]; + char dst[TRACE_MSG_SZ]; + fprintf(TraceFile, "\tdst:%s src:%s\n", IpToS(iphdr->dst, dst), + IpToS(iphdr->src, src)); + } +} + + +/* Show destination and source port from Tcp Hdr for packet Trace */ +static void TraceTcp(TcpHdr* tcphdr) +{ + if (TraceOn) { + fprintf(TraceFile, "\tdstPort:%u srcPort:%u\n", ntohs(tcphdr->dstPort), + ntohs(tcphdr->srcPort)); + } +} + + +/* Show sequence and payload length for Trace */ +static void TraceSequence(word32 seq, int len) +{ + if (TraceOn) { + fprintf(TraceFile, "\tSequence:%u, payload length:%d\n", seq, len); + } +} + + +/* Show sequence and payload length for Trace */ +static void TraceAck(word32 ack, word32 expected) +{ + if (TraceOn) { + fprintf(TraceFile, "\tAck:%u Expected:%u\n", ack, expected); + } +} + + +/* Show relative expected and relative received sequences */ +static void TraceRelativeSequence(word32 expected, word32 got) +{ + if (TraceOn) { + fprintf(TraceFile, "\tExpected sequence:%u, received sequence:%u\n", + expected, got); + } +} + + +/* Show server sequence startup from SYN */ +static void TraceServerSyn(word32 seq) +{ + if (TraceOn) { + fprintf(TraceFile, "\tServer SYN, Sequence Start:%u\n", seq); + } +} + + +/* Show client sequence startup from SYN */ +static void TraceClientSyn(word32 seq) +{ + if (TraceOn) { + fprintf(TraceFile, "\tClient SYN, Sequence Start:%u\n", seq); + } +} + + +/* Show client FIN capture */ +static void TraceClientFin(word32 finSeq, word32 relSeq) +{ + if (TraceOn) { + fprintf(TraceFile, "\tClient FIN capture:%u, current SEQ:%u\n", + finSeq, relSeq); + } +} + + +/* Show server FIN capture */ +static void TraceServerFin(word32 finSeq, word32 relSeq) +{ + if (TraceOn) { + fprintf(TraceFile, "\tServer FIN capture:%u, current SEQ:%u\n", + finSeq, relSeq); + } +} + + +/* Show number of SSL data bytes decoded, could be 0 (ok) */ +static void TraceGotData(int bytes) +{ + if (TraceOn) { + fprintf(TraceFile, "\t%d bytes of SSL App data processed\n", bytes); + } +} + + +/* Show bytes added to old SSL App data */ +static void TraceAddedData(int newBytes, int existingBytes) +{ + if (TraceOn) { + fprintf(TraceFile, + "\t%d bytes added to %d exisiting bytes in User Buffer\n", + newBytes, existingBytes); + } +} + + +/* Show Stale Session */ +static void TraceStaleSession(void) +{ + if (TraceOn) { + fprintf(TraceFile, "\tFound a stale session\n"); + } +} + + +/* Show Finding Stale Sessions */ +static void TraceFindingStale(void) +{ + if (TraceOn) { + fprintf(TraceFile, "\tTrying to find Stale Sessions\n"); + } +} + + +/* Show Removed Session */ +static void TraceRemovedSession(void) +{ + if (TraceOn) { + fprintf(TraceFile, "\tRemoved it\n"); + } +} + + +/* Set user error string */ +static void SetError(int idx, char* error, SnifferSession* session, int fatal) +{ + GetError(idx, error); + Trace(idx); + if (session && fatal == FATAL_ERROR_STATE) + session->flags.fatalError = 1; +} + + +/* See if this IPV4 network order address has been registered */ +/* return 1 is true, 0 is false */ +static int IsServerRegistered(word32 addr) +{ + int ret = 0; /* false */ + SnifferServer* sniffer; + + LockMutex(&ServerListMutex); + + sniffer = ServerList; + while (sniffer) { + if (sniffer->server == addr) { + ret = 1; + break; + } + sniffer = sniffer->next; + } + + UnLockMutex(&ServerListMutex); + + return ret; +} + + +/* See if this port has been registered to watch */ +/* return 1 is true, 0 is false */ +static int IsPortRegistered(word32 port) +{ + int ret = 0; /* false */ + SnifferServer* sniffer; + + LockMutex(&ServerListMutex); + + sniffer = ServerList; + while (sniffer) { + if (sniffer->port == (int)port) { + ret = 1; + break; + } + sniffer = sniffer->next; + } + + UnLockMutex(&ServerListMutex); + + return ret; +} + + +/* Get SnifferServer from IP and Port */ +static SnifferServer* GetSnifferServer(IpInfo* ipInfo, TcpInfo* tcpInfo) +{ + SnifferServer* sniffer; + + LockMutex(&ServerListMutex); + + sniffer = ServerList; + while (sniffer) { + if (sniffer->port == tcpInfo->srcPort && sniffer->server == ipInfo->src) + break; + if (sniffer->port == tcpInfo->dstPort && sniffer->server == ipInfo->dst) + break; + sniffer = sniffer->next; + } + + UnLockMutex(&ServerListMutex); + + return sniffer; +} + + +/* Hash the Session Info, return hash row */ +static word32 SessionHash(IpInfo* ipInfo, TcpInfo* tcpInfo) +{ + word32 hash = ipInfo->src * ipInfo->dst; + hash *= tcpInfo->srcPort * tcpInfo->dstPort; + + return hash % HASH_SIZE; +} + + +/* Get Exisiting SnifferSession from IP and Port */ +static SnifferSession* GetSnifferSession(IpInfo* ipInfo, TcpInfo* tcpInfo) +{ + SnifferSession* session; + time_t currTime = time(NULL); + word32 row = SessionHash(ipInfo, tcpInfo); + + assert(row <= HASH_SIZE); + + LockMutex(&SessionMutex); + + session = SessionTable[row]; + while (session) { + if (session->server == ipInfo->src && session->client == ipInfo->dst && + session->srvPort == tcpInfo->srcPort && + session->cliPort == tcpInfo->dstPort) + break; + if (session->client == ipInfo->src && session->server == ipInfo->dst && + session->cliPort == tcpInfo->srcPort && + session->srvPort == tcpInfo->dstPort) + break; + + session = session->next; + } + + if (session) + session->lastUsed= currTime; /* keep session alive, remove stale will */ + /* leave alone */ + UnLockMutex(&SessionMutex); + + /* determine side */ + if (session) { + if (ipInfo->dst == session->context->server && + tcpInfo->dstPort == session->context->port) + session->flags.side = CYASSL_SERVER_END; + else + session->flags.side = CYASSL_CLIENT_END; + } + + return session; +} + + +/* Sets the private key for a specific server and port */ +/* returns 0 on success, -1 on error */ +int ssl_SetPrivateKey(const char* serverAddress, int port, const char* keyFile, + int typeKey, const char* password, char* error) +{ + int ret; + int type = (typeKey == FILETYPE_PEM) ? SSL_FILETYPE_PEM : + SSL_FILETYPE_ASN1; + SnifferServer* sniffer; + + TraceHeader(); + TraceSetServer(serverAddress, port, keyFile); + + sniffer = (SnifferServer*)malloc(sizeof(SnifferServer)); + if (sniffer == NULL) { + SetError(MEMORY_STR, error, NULL, 0); + return -1; + } + InitSnifferServer(sniffer); + + XSTRNCPY(sniffer->address, serverAddress, MAX_SERVER_ADDRESS); + sniffer->server = inet_addr(sniffer->address); + sniffer->port = port; + + /* start in client mode since SSL_new needs a cert for server */ + sniffer->ctx = SSL_CTX_new(SSLv3_client_method()); + if (!sniffer->ctx) { + SetError(MEMORY_STR, error, NULL, 0); + FreeSnifferServer(sniffer); + return -1; + } + + if (password){ + SSL_CTX_set_default_passwd_cb(sniffer->ctx, SetPassword); + SSL_CTX_set_default_passwd_cb_userdata(sniffer->ctx, (void*)password); + } + ret = SSL_CTX_use_PrivateKey_file(sniffer->ctx, keyFile, type); + if (ret != SSL_SUCCESS) { + SetError(KEY_FILE_STR, error, NULL, 0); + FreeSnifferServer(sniffer); + return -1; + } + Trace(NEW_SERVER_STR); + + LockMutex(&ServerListMutex); + + sniffer->next = ServerList; + ServerList = sniffer; + + UnLockMutex(&ServerListMutex); + + return 0; +} + + +/* Check IP Header for IPV4, TCP, and a registered server address */ +/* returns 0 on success, -1 on error */ +static int CheckIpHdr(IpHdr* iphdr, IpInfo* info, int length, char* error) +{ + int version = IP_V(iphdr); + + TraceIP(iphdr); + Trace(IP_CHECK_STR); + + if (version != IPV4) { + SetError(BAD_IPVER_STR, error, NULL, 0); + return -1; + } + + if (iphdr->protocol != TCP_PROTOCOL) { + SetError(BAD_PROTO_STR, error, NULL, 0); + return -1; + } + + if (!IsServerRegistered(iphdr->src) && !IsServerRegistered(iphdr->dst)) { + SetError(SERVER_NOT_REG_STR, error, NULL, 0); + return -1; + } + + info->length = IP_HL(iphdr); + info->total = ntohs(iphdr->length); + info->src = iphdr->src; + info->dst = iphdr->dst; + + if (info->total == 0) + info->total = length; /* reassembled may be off */ + + return 0; +} + + +/* Check TCP Header for a registered port */ +/* returns 0 on success, -1 on error */ +static int CheckTcpHdr(TcpHdr* tcphdr, TcpInfo* info, char* error) +{ + TraceTcp(tcphdr); + Trace(TCP_CHECK_STR); + info->srcPort = ntohs(tcphdr->srcPort); + info->dstPort = ntohs(tcphdr->dstPort); + info->length = TCP_LEN(tcphdr); + info->sequence = ntohl(tcphdr->sequence); + info->fin = tcphdr->flags & TCP_FIN; + info->rst = tcphdr->flags & TCP_RST; + info->syn = tcphdr->flags & TCP_SYN; + info->ack = tcphdr->flags & TCP_ACK; + if (info->ack) + info->ackNumber = ntohl(tcphdr->ack); + + if (!IsPortRegistered(info->srcPort) && !IsPortRegistered(info->dstPort)) { + SetError(SERVER_PORT_NOT_REG_STR, error, NULL, 0); + return -1; + } + + return 0; +} + + +/* Decode Record Layer Header */ +static int GetRecordHeader(const byte* input, RecordLayerHeader* rh, int* size) +{ + XMEMCPY(rh, input, RECORD_HEADER_SZ); + *size = (rh->length[0] << 8) | rh->length[1]; + + if (*size > (MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA)) + return LENGTH_ERROR; + + return 0; +} + + +/* Process Client Key Exchange, RSA only */ +static int ProcessClientKeyExchange(const byte* input, int* sslBytes, + SnifferSession* session, char* error) +{ + word32 idx = 0; + RsaKey key; + int ret; + + ret = InitRsaKey(&key, 0); + if (ret == 0) + ret = RsaPrivateKeyDecode(session->context->ctx->privateKey.buffer, + &idx, &key, session->context->ctx->privateKey.length); + if (ret == 0) { + int length = RsaEncryptSize(&key); + + if (IsTLS(session->sslServer)) + input += 2; /* tls pre length */ + + if (length > *sslBytes) { + SetError(PARTIAL_INPUT_STR, error, session, FATAL_ERROR_STATE); + FreeRsaKey(&key); + return -1; + } + ret = RsaPrivateDecrypt(input, length, + session->sslServer->arrays->preMasterSecret,SECRET_LEN, &key); + + if (ret != SECRET_LEN) { + SetError(RSA_DECRYPT_STR, error, session, FATAL_ERROR_STATE); + FreeRsaKey(&key); + return -1; + } + ret = 0; /* not in error state */ + session->sslServer->arrays->preMasterSz = SECRET_LEN; + + /* store for client side as well */ + XMEMCPY(session->sslClient->arrays->preMasterSecret, + session->sslServer->arrays->preMasterSecret, SECRET_LEN); + session->sslClient->arrays->preMasterSz = SECRET_LEN; + + #ifdef SHOW_SECRETS + { + int i; + printf("pre master secret: "); + for (i = 0; i < SECRET_LEN; i++) + printf("%02x", session->sslServer->arrays->preMasterSecret[i]); + printf("\n"); + } + #endif + } + else { + SetError(RSA_DECODE_STR, error, session, FATAL_ERROR_STATE); + FreeRsaKey(&key); + return -1; + } + + if (SetCipherSpecs(session->sslServer) != 0) { + SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); + FreeRsaKey(&key); + return -1; + } + + if (SetCipherSpecs(session->sslClient) != 0) { + SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); + FreeRsaKey(&key); + return -1; + } + + MakeMasterSecret(session->sslServer); + MakeMasterSecret(session->sslClient); +#ifdef SHOW_SECRETS + { + int i; + printf("server master secret: "); + for (i = 0; i < SECRET_LEN; i++) + printf("%02x", session->sslServer->arrays->masterSecret[i]); + printf("\n"); + + printf("client master secret: "); + for (i = 0; i < SECRET_LEN; i++) + printf("%02x", session->sslClient->arrays->masterSecret[i]); + printf("\n"); + + printf("server suite = %d\n", session->sslServer->options.cipherSuite); + printf("client suite = %d\n", session->sslClient->options.cipherSuite); + } +#endif + + FreeRsaKey(&key); + return ret; +} + + +/* Process Session Ticket */ +static int ProcessSessionTicket(const byte* input, int* sslBytes, + SnifferSession* session, char* error) +{ + word16 len; + + /* make sure can read through hint and len */ + if (TICKET_HINT_LEN + LENGTH_SZ > *sslBytes) { + SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + input += TICKET_HINT_LEN; /* skip over hint */ + *sslBytes -= TICKET_HINT_LEN; + + len = (word16)((input[0] << 8) | input[1]); + input += LENGTH_SZ; + *sslBytes -= LENGTH_SZ; + + /* make sure can read through ticket */ + if (len > *sslBytes || len < ID_LEN) { + SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + /* store session with macID as sessionID */ + session->sslServer->options.haveSessionId = 1; + XMEMCPY(session->sslServer->arrays->sessionID, input + len - ID_LEN,ID_LEN); + + return 0; +} + + +/* Process Server Hello */ +static int ProcessServerHello(const byte* input, int* sslBytes, + SnifferSession* session, char* error) +{ + ProtocolVersion pv; + byte b; + int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN; + int doResume = 0; + + /* make sure we didn't miss ClientHello */ + if (session->flags.clientHello == 0) { + SetError(MISSED_CLIENT_HELLO_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + /* make sure can read through session len */ + if (toRead > *sslBytes) { + SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + XMEMCPY(&pv, input, VERSION_SZ); + input += VERSION_SZ; + *sslBytes -= VERSION_SZ; + + session->sslServer->version = pv; + session->sslClient->version = pv; + + XMEMCPY(session->sslServer->arrays->serverRandom, input, RAN_LEN); + XMEMCPY(session->sslClient->arrays->serverRandom, input, RAN_LEN); + input += RAN_LEN; + *sslBytes -= RAN_LEN; + + b = *input++; + *sslBytes -= 1; + + /* make sure can read through compression */ + if ( (b + SUITE_LEN + ENUM_LEN) > *sslBytes) { + SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + if (b) { + XMEMCPY(session->sslServer->arrays->sessionID, input, ID_LEN); + session->sslServer->options.haveSessionId = 1; + } + input += b; + *sslBytes -= b; + + /* cipher suite */ + b = *input++; /* first byte, ECC or not */ + session->sslServer->options.cipherSuite0 = b; + session->sslClient->options.cipherSuite0 = b; + b = *input++; + session->sslServer->options.cipherSuite = b; + session->sslClient->options.cipherSuite = b; + *sslBytes -= SUITE_LEN; + + /* compression */ + b = *input++; + *sslBytes -= ENUM_LEN; + + if (b) { + SetError(BAD_COMPRESSION_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + if (session->sslServer->options.haveSessionId && + XMEMCMP(session->sslServer->arrays->sessionID, + session->sslClient->arrays->sessionID, ID_LEN) == 0) + doResume = 1; + else if (session->sslClient->options.haveSessionId == 0 && + session->sslServer->options.haveSessionId == 0 && + session->ticketID) + doResume = 1; + + if (session->ticketID && doResume) { + /* use ticketID to retrieve from session, prefer over sessionID */ + XMEMCPY(session->sslServer->arrays->sessionID,session->ticketID,ID_LEN); + session->sslServer->options.haveSessionId = 1; /* may not have + actual sessionID */ + } + + if (doResume ) { + int ret = 0; + SSL_SESSION* resume = GetSession(session->sslServer, + session->sslServer->arrays->masterSecret); + if (resume == NULL) { + SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + /* make sure client has master secret too */ + XMEMCPY(session->sslClient->arrays->masterSecret, + session->sslServer->arrays->masterSecret, SECRET_LEN); + session->flags.resuming = 1; + + Trace(SERVER_DID_RESUMPTION_STR); + if (SetCipherSpecs(session->sslServer) != 0) { + SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + if (SetCipherSpecs(session->sslClient) != 0) { + SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + if (session->sslServer->options.tls) { + ret = DeriveTlsKeys(session->sslServer); + ret += DeriveTlsKeys(session->sslClient); + } + else { + ret = DeriveKeys(session->sslServer); + ret += DeriveKeys(session->sslClient); + } + if (ret != 0) { + SetError(BAD_DERIVE_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + } +#ifdef SHOW_SECRETS + { + int i; + printf("cipher suite = 0x%02x\n", + session->sslServer->options.cipherSuite); + printf("server random: "); + for (i = 0; i < RAN_LEN; i++) + printf("%02x", session->sslServer->arrays->serverRandom[i]); + printf("\n"); + } +#endif + return 0; +} + + +/* Process normal Client Hello */ +static int ProcessClientHello(const byte* input, int* sslBytes, + SnifferSession* session, char* error) +{ + byte bLen; + word16 len; + int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN; + + session->flags.clientHello = 1; /* don't process again */ + + /* make sure can read up to session len */ + if (toRead > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + /* skip, get negotiated one from server hello */ + input += VERSION_SZ; + *sslBytes -= VERSION_SZ; + + XMEMCPY(session->sslServer->arrays->clientRandom, input, RAN_LEN); + XMEMCPY(session->sslClient->arrays->clientRandom, input, RAN_LEN); + + input += RAN_LEN; + *sslBytes -= RAN_LEN; + + /* store session in case trying to resume */ + bLen = *input++; + *sslBytes -= ENUM_LEN; + if (bLen) { + if (ID_LEN > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + Trace(CLIENT_RESUME_TRY_STR); + XMEMCPY(session->sslClient->arrays->sessionID, input, ID_LEN); + session->sslClient->options.haveSessionId = 1; + } +#ifdef SHOW_SECRETS + { + int i; + printf("client random: "); + for (i = 0; i < RAN_LEN; i++) + printf("%02x", session->sslServer->arrays->clientRandom[i]); + printf("\n"); + } +#endif + + input += bLen; + *sslBytes -= bLen; + + /* skip cipher suites */ + /* make sure can read len */ + if (SUITE_LEN > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + len = (word16)((input[0] << 8) | input[1]); + input += SUITE_LEN; + *sslBytes -= SUITE_LEN; + /* make sure can read suites + comp len */ + if (len + ENUM_LEN > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + input += len; + *sslBytes -= len; + + /* skip compression */ + bLen = *input++; + *sslBytes -= ENUM_LEN; + /* make sure can read len */ + if (bLen > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + input += bLen; + *sslBytes -= bLen; + + if (*sslBytes == 0) { + /* no extensions */ + return 0; + } + + /* skip extensions until session ticket */ + /* make sure can read len */ + if (SUITE_LEN > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + len = (word16)((input[0] << 8) | input[1]); + input += SUITE_LEN; + *sslBytes -= SUITE_LEN; + /* make sure can read through all extensions */ + if (len > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + while (len > EXT_TYPE_SZ + LENGTH_SZ) { + byte extType[EXT_TYPE_SZ]; + word16 extLen; + + extType[0] = input[0]; + extType[1] = input[1]; + input += EXT_TYPE_SZ; + *sslBytes -= EXT_TYPE_SZ; + + extLen = (word16)((input[0] << 8) | input[1]); + input += LENGTH_SZ; + *sslBytes -= LENGTH_SZ; + + /* make sure can read through individual extension */ + if (extLen > *sslBytes) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + if (extType[0] == 0x00 && extType[1] == TICKET_EXT_ID) { + + /* make sure can read through ticket if there is a non blank one */ + if (extLen && extLen < ID_LEN) { + SetError(CLIENT_HELLO_INPUT_STR, error, session, + FATAL_ERROR_STATE); + return -1; + } + + if (extLen) { + if (session->ticketID == 0) { + session->ticketID = (byte*)malloc(ID_LEN); + if (session->ticketID == 0) { + SetError(MEMORY_STR, error, session, + FATAL_ERROR_STATE); + return -1; + } + } + XMEMCPY(session->ticketID, input + extLen - ID_LEN, ID_LEN); + } + } + + input += extLen; + *sslBytes -= extLen; + len -= extLen + EXT_TYPE_SZ + LENGTH_SZ; + } + + return 0; +} + + +/* Process Finished */ +static int ProcessFinished(const byte* input, int size, int* sslBytes, + SnifferSession* session, char* error) +{ + SSL* ssl; + word32 inOutIdx = 0; + int ret; + + if (session->flags.side == CYASSL_SERVER_END) + ssl = session->sslServer; + else + ssl = session->sslClient; + + ret = DoFinished(ssl, input, &inOutIdx, (word32) size, (word32) *sslBytes, + SNIFF); + *sslBytes -= (int)inOutIdx; + + if (ret < 0) { + SetError(BAD_FINISHED_MSG, error, session, FATAL_ERROR_STATE); + return ret; + } + + if (ret == 0 && session->flags.cached == 0) { + if (session->sslServer->options.haveSessionId) { + CYASSL_SESSION* sess = GetSession(session->sslServer, NULL); + if (sess == NULL) + AddSession(session->sslServer); /* don't re add */ + session->flags.cached = 1; + } + } + + FreeHandshakeResources(ssl); + + return ret; +} + + +/* Process HandShake input */ +static int DoHandShake(const byte* input, int* sslBytes, + SnifferSession* session, char* error) +{ + byte type; + int size; + int ret = 0; + + if (*sslBytes < HANDSHAKE_HEADER_SZ) { + SetError(HANDSHAKE_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + type = input[0]; + size = (input[1] << 16) | (input[2] << 8) | input[3]; + + input += HANDSHAKE_HEADER_SZ; + *sslBytes -= HANDSHAKE_HEADER_SZ; + + if (*sslBytes < size) { + SetError(HANDSHAKE_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + switch (type) { + case hello_verify_request: + Trace(GOT_HELLO_VERIFY_STR); + break; + case hello_request: + Trace(GOT_HELLO_REQUEST_STR); + break; + case session_ticket: + Trace(GOT_SESSION_TICKET_STR); + ret = ProcessSessionTicket(input, sslBytes, session, error); + break; + case server_hello: + Trace(GOT_SERVER_HELLO_STR); + ret = ProcessServerHello(input, sslBytes, session, error); + break; + case certificate_request: + Trace(GOT_CERT_REQ_STR); + break; + case server_key_exchange: + Trace(GOT_SERVER_KEY_EX_STR); + /* can't know temp key passively */ + SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); + ret = -1; + break; + case certificate: + Trace(GOT_CERT_STR); + break; + case server_hello_done: + Trace(GOT_SERVER_HELLO_DONE_STR); + break; + case finished: + Trace(GOT_FINISHED_STR); + ret = ProcessFinished(input, size, sslBytes, session, error); + break; + case client_hello: + Trace(GOT_CLIENT_HELLO_STR); + ret = ProcessClientHello(input, sslBytes, session, error); + break; + case client_key_exchange: + Trace(GOT_CLIENT_KEY_EX_STR); + ret = ProcessClientKeyExchange(input, sslBytes, session, error); + break; + case certificate_verify: + Trace(GOT_CERT_VER_STR); + break; + default: + SetError(GOT_UNKNOWN_HANDSHAKE_STR, error, session, 0); + return -1; + } + + return ret; +} + + +/* Decrypt input into plain output, 0 on success */ +static int Decrypt(SSL* ssl, byte* output, const byte* input, word32 sz) +{ + int ret = 0; + + switch (ssl->specs.bulk_cipher_algorithm) { + #ifdef BUILD_ARC4 + case cyassl_rc4: + Arc4Process(ssl->decrypt.arc4, output, input, sz); + break; + #endif + + #ifdef BUILD_DES3 + case cyassl_triple_des: + ret = Des3_CbcDecrypt(ssl->decrypt.des3, output, input, sz); + break; + #endif + + #ifdef BUILD_AES + case cyassl_aes: + ret = AesCbcDecrypt(ssl->decrypt.aes, output, input, sz); + break; + #endif + + #ifdef HAVE_HC128 + case cyassl_hc128: + Hc128_Process(ssl->decrypt.hc128, output, input, sz); + break; + #endif + + #ifdef BUILD_RABBIT + case cyassl_rabbit: + RabbitProcess(ssl->decrypt.rabbit, output, input, sz); + break; + #endif + + #ifdef HAVE_CAMELLIA + case cyassl_camellia: + CamelliaCbcDecrypt(ssl->decrypt.cam, output, input, sz); + break; + #endif + + default: + Trace(BAD_DECRYPT_TYPE); + ret = -1; + break; + } + + return ret; +} + + +/* Decrypt input message into output, adjust output steam if needed */ +static const byte* DecryptMessage(SSL* ssl, const byte* input, word32 sz, + byte* output, int* error) +{ + int ivExtra = 0; + + int ret = Decrypt(ssl, output, input, sz); + if (ret != 0) { + *error = ret; + return NULL; + } + ssl->keys.encryptSz = sz; + if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) { + output += ssl->specs.block_size; /* go past TLSv1.1 IV */ + ivExtra = ssl->specs.block_size; + } + + ssl->keys.padSz = ssl->specs.hash_size; + + if (ssl->specs.cipher_type == block) + ssl->keys.padSz += *(output + sz - ivExtra - 1) + 1; + + return output; +} + + +/* remove session from table, use rowHint if no info (means we have a lock) */ +static void RemoveSession(SnifferSession* session, IpInfo* ipInfo, + TcpInfo* tcpInfo, word32 rowHint) +{ + SnifferSession* previous = 0; + SnifferSession* current; + word32 row = rowHint; + int haveLock = 0; + + if (ipInfo && tcpInfo) + row = SessionHash(ipInfo, tcpInfo); + else + haveLock = 1; + + assert(row <= HASH_SIZE); + Trace(REMOVE_SESSION_STR); + + if (!haveLock) + LockMutex(&SessionMutex); + + current = SessionTable[row]; + + while (current) { + if (current == session) { + if (previous) + previous->next = current->next; + else + SessionTable[row] = current->next; + FreeSnifferSession(session); + TraceRemovedSession(); + break; + } + previous = current; + current = current->next; + } + + if (!haveLock) + UnLockMutex(&SessionMutex); +} + + +/* Remove stale sessions from the Session Table, have a lock */ +static void RemoveStaleSessions(void) +{ + word32 i; + SnifferSession* session; + + for (i = 0; i < HASH_SIZE; i++) { + session = SessionTable[i]; + while (session) { + SnifferSession* next = session->next; + if (time(NULL) >= session->lastUsed + SNIFFER_TIMEOUT) { + TraceStaleSession(); + RemoveSession(session, NULL, NULL, i); + } + session = next; + } + } +} + + +/* Create a new Sniffer Session */ +static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo, + char* error) +{ + SnifferSession* session = 0; + int row; + + Trace(NEW_SESSION_STR); + /* create a new one */ + session = (SnifferSession*)malloc(sizeof(SnifferSession)); + if (session == NULL) { + SetError(MEMORY_STR, error, NULL, 0); + return 0; + } + InitSession(session); + session->server = ipInfo->dst; + session->client = ipInfo->src; + session->srvPort = (word16)tcpInfo->dstPort; + session->cliPort = (word16)tcpInfo->srcPort; + session->cliSeqStart = tcpInfo->sequence; + session->cliExpected = 1; /* relative */ + session->lastUsed= time(NULL); + + session->context = GetSnifferServer(ipInfo, tcpInfo); + if (session->context == NULL) { + SetError(SERVER_NOT_REG_STR, error, NULL, 0); + free(session); + return 0; + } + + session->sslServer = SSL_new(session->context->ctx); + if (session->sslServer == NULL) { + SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE); + free(session); + return 0; + } + session->sslClient = SSL_new(session->context->ctx); + if (session->sslClient == NULL) { + SSL_free(session->sslServer); + session->sslServer = 0; + + SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE); + free(session); + return 0; + } + /* put server back into server mode */ + session->sslServer->options.side = CYASSL_SERVER_END; + + row = SessionHash(ipInfo, tcpInfo); + + /* add it to the session table */ + LockMutex(&SessionMutex); + + session->next = SessionTable[row]; + SessionTable[row] = session; + + SessionCount++; + + if ( (SessionCount % HASH_SIZE) == 0) { + TraceFindingStale(); + RemoveStaleSessions(); + } + + UnLockMutex(&SessionMutex); + + /* determine headed side */ + if (ipInfo->dst == session->context->server && + tcpInfo->dstPort == session->context->port) + session->flags.side = CYASSL_SERVER_END; + else + session->flags.side = CYASSL_CLIENT_END; + + return session; +} + + +/* Process Old Client Hello Input */ +static int DoOldHello(SnifferSession* session, const byte* sslFrame, + int* rhSize, int* sslBytes, char* error) +{ + const byte* input = sslFrame; + byte b0, b1; + word32 idx = 0; + int ret; + + Trace(GOT_OLD_CLIENT_HELLO_STR); + session->flags.clientHello = 1; /* don't process again */ + b0 = *input++; + b1 = *input++; + *sslBytes -= 2; + *rhSize = ((b0 & 0x7f) << 8) | b1; + + if (*rhSize > *sslBytes) { + SetError(OLD_CLIENT_INPUT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + ret = ProcessOldClientHello(session->sslServer, input, &idx, *sslBytes, + (word16)*rhSize); + if (ret < 0 && ret != MATCH_SUITE_ERROR) { + SetError(BAD_OLD_CLIENT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + Trace(OLD_CLIENT_OK_STR); + XMEMCPY(session->sslClient->arrays->clientRandom, + session->sslServer->arrays->clientRandom, RAN_LEN); + + *sslBytes -= *rhSize; + return 0; +} + + +#if 0 +/* Calculate the TCP checksum, see RFC 1071 */ +/* return 0 for success, -1 on error */ +/* can be called from decode() with + TcpChecksum(&ipInfo, &tcpInfo, sslBytes, packet + ipInfo.length); + could also add a 64bit version if type available and using this +*/ +int TcpChecksum(IpInfo* ipInfo, TcpInfo* tcpInfo, int dataLen, + const byte* packet) +{ + TcpPseudoHdr pseudo; + int count = PSEUDO_HDR_SZ; + const word16* data = (word16*)&pseudo; + word32 sum = 0; + word16 checksum; + + pseudo.src = ipInfo->src; + pseudo.dst = ipInfo->dst; + pseudo.rsv = 0; + pseudo.protocol = TCP_PROTO; + pseudo.legnth = htons(tcpInfo->length + dataLen); + + /* pseudo header sum */ + while (count >= 2) { + sum += *data++; + count -= 2; + } + + count = tcpInfo->length + dataLen; + data = (word16*)packet; + + /* main sum */ + while (count > 1) { + sum += *data++; + count -=2; + } + + /* get left-over, if any */ + packet = (byte*)data; + if (count > 0) { + sum += *packet; + } + + /* fold 32bit sum into 16 bits */ + while (sum >> 16) + sum = (sum & 0xffff) + (sum >> 16); + + checksum = (word16)~sum; + /* checksum should now equal 0, since included already calcd checksum */ + /* field, but tcp checksum offloading could negate calculation */ + if (checksum == 0) + return 0; + return -1; +} +#endif + + +/* Check IP and TCP headers, set payload */ +/* returns 0 on success, -1 on error */ +static int CheckHeaders(IpInfo* ipInfo, TcpInfo* tcpInfo, const byte* packet, + int length, const byte** sslFrame, int* sslBytes, char* error) +{ + TraceHeader(); + TracePacket(); + + /* ip header */ + if (length < IP_HDR_SZ) { + SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); + return -1; + } + if (CheckIpHdr((IpHdr*)packet, ipInfo, length, error) != 0) + return -1; + + /* tcp header */ + if (length < (ipInfo->length + TCP_HDR_SZ)) { + SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); + return -1; + } + if (CheckTcpHdr((TcpHdr*)(packet + ipInfo->length), tcpInfo, error) != 0) + return -1; + + /* setup */ + *sslFrame = packet + ipInfo->length + tcpInfo->length; + if (*sslFrame > packet + length) { + SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); + return -1; + } + *sslBytes = (int)(packet + length - *sslFrame); + + return 0; +} + + +/* Create or Find existing session */ +/* returns 0 on success (continue), -1 on error, 1 on success (end) */ +static int CheckSession(IpInfo* ipInfo, TcpInfo* tcpInfo, int sslBytes, + SnifferSession** session, char* error) +{ + /* create a new SnifferSession on client SYN */ + if (tcpInfo->syn && !tcpInfo->ack) { + TraceClientSyn(tcpInfo->sequence); + *session = CreateSession(ipInfo, tcpInfo, error); + if (*session == NULL) { + *session = GetSnifferSession(ipInfo, tcpInfo); + /* already had exisiting, so OK */ + if (*session) + return 1; + + SetError(MEMORY_STR, error, NULL, 0); + return -1; + } + return 1; + } + /* get existing sniffer session */ + else { + *session = GetSnifferSession(ipInfo, tcpInfo); + if (*session == NULL) { + /* don't worry about extraneous RST or duplicate FINs */ + if (tcpInfo->fin || tcpInfo->rst) + return 1; + /* don't worry about duplicate ACKs either */ + if (sslBytes == 0 && tcpInfo->ack) + return 1; + + SetError(BAD_SESSION_STR, error, NULL, 0); + return -1; + } + } + return 0; +} + + +/* Create a Packet Buffer from *begin - end, adjust new *begin and bytesLeft */ +static PacketBuffer* CreateBuffer(word32* begin, word32 end, const byte* data, + int* bytesLeft) +{ + PacketBuffer* pb; + + int added = end - *begin + 1; + assert(*begin <= end); + + pb = (PacketBuffer*)malloc(sizeof(PacketBuffer)); + if (pb == NULL) return NULL; + + pb->next = 0; + pb->begin = *begin; + pb->end = end; + pb->data = (byte*)malloc(added); + + if (pb->data == NULL) { + free(pb); + return NULL; + } + XMEMCPY(pb->data, data, added); + + *bytesLeft -= added; + *begin = pb->end + 1; + + return pb; +} + + +/* Add sslFrame to Reassembly List */ +/* returns 1 (end) on success, -1, on error */ +static int AddToReassembly(byte from, word32 seq, const byte* sslFrame, + int sslBytes, SnifferSession* session, char* error) +{ + PacketBuffer* add; + PacketBuffer** front = (from == CYASSL_SERVER_END) ? + &session->cliReassemblyList: &session->srvReassemblyList; + PacketBuffer* curr = *front; + PacketBuffer* prev = curr; + + word32 startSeq = seq; + word32 added; + int bytesLeft = sslBytes; /* could be overlapping fragment */ + + /* if list is empty add full frame to front */ + if (!curr) { + add = CreateBuffer(&seq, seq + sslBytes - 1, sslFrame, &bytesLeft); + if (add == NULL) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + *front = add; + return 1; + } + + /* add to front if before current front, up to next->begin */ + if (seq < curr->begin) { + word32 end = seq + sslBytes - 1; + + if (end >= curr->begin) + end = curr->begin - 1; + + add = CreateBuffer(&seq, end, sslFrame, &bytesLeft); + if (add == NULL) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + add->next = curr; + *front = add; + } + + /* while we have bytes left, try to find a gap to fill */ + while (bytesLeft > 0) { + /* get previous packet in list */ + while (curr && (seq >= curr->begin)) { + prev = curr; + curr = curr->next; + } + + /* don't add duplicate data */ + if (prev->end >= seq) { + if ( (seq + bytesLeft - 1) <= prev->end) + return 1; + seq = prev->end + 1; + bytesLeft = startSeq + sslBytes - seq; + } + + if (!curr) + /* we're at the end */ + added = bytesLeft; + else + /* we're in between two frames */ + added = min((word32)bytesLeft, curr->begin - seq); + + /* data already there */ + if (added == 0) + continue; + + add = CreateBuffer(&seq, seq + added - 1, &sslFrame[seq - startSeq], + &bytesLeft); + if (add == NULL) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + add->next = prev->next; + prev->next = add; + } + return 1; +} + + +/* Add out of order FIN capture */ +/* returns 1 for success (end) */ +static int AddFinCapture(SnifferSession* session, word32 sequence) +{ + if (session->flags.side == CYASSL_SERVER_END) { + if (session->finCaputre.cliCounted == 0) + session->finCaputre.cliFinSeq = sequence; + } + else { + if (session->finCaputre.srvCounted == 0) + session->finCaputre.srvFinSeq = sequence; + } + return 1; +} + + +/* Adjust incoming sequence based on side */ +/* returns 0 on success (continue), -1 on error, 1 on success (end) */ +static int AdjustSequence(TcpInfo* tcpInfo, SnifferSession* session, + int* sslBytes, const byte** sslFrame, char* error) +{ + word32 seqStart = (session->flags.side == CYASSL_SERVER_END) ? + session->cliSeqStart :session->srvSeqStart; + word32 real = tcpInfo->sequence - seqStart; + word32* expected = (session->flags.side == CYASSL_SERVER_END) ? + &session->cliExpected : &session->srvExpected; + PacketBuffer* reassemblyList = (session->flags.side == CYASSL_SERVER_END) ? + session->cliReassemblyList : session->srvReassemblyList; + + /* handle rollover of sequence */ + if (tcpInfo->sequence < seqStart) + real = 0xffffffffU - seqStart + tcpInfo->sequence; + + TraceRelativeSequence(*expected, real); + + if (real < *expected) { + Trace(DUPLICATE_STR); + if (real + *sslBytes > *expected) { + int overlap = *expected - real; + Trace(OVERLAP_DUPLICATE_STR); + + /* adjust to expected, remove duplicate */ + *sslFrame += overlap; + *sslBytes -= overlap; + + if (reassemblyList) { + word32 newEnd = *expected + *sslBytes; + + if (newEnd > reassemblyList->begin) { + Trace(OVERLAP_REASSEMBLY_BEGIN_STR); + + /* remove bytes already on reassembly list */ + *sslBytes -= newEnd - reassemblyList->begin; + } + if (newEnd > reassemblyList->end) { + Trace(OVERLAP_REASSEMBLY_END_STR); + + /* may be past reassembly list end (could have more on list) + so try to add what's past the front->end */ + AddToReassembly(session->flags.side, reassemblyList->end +1, + *sslFrame + reassemblyList->end - *expected + 1, + newEnd - reassemblyList->end, session, error); + } + } + } + else + return 1; + } + else if (real > *expected) { + Trace(OUT_OF_ORDER_STR); + if (*sslBytes > 0) + return AddToReassembly(session->flags.side, real, *sslFrame, + *sslBytes, session, error); + else if (tcpInfo->fin) + return AddFinCapture(session, real); + } + /* got expected sequence */ + *expected += *sslBytes; + if (tcpInfo->fin) + *expected += 1; + + return 0; +} + + +/* Check latest ack number for missing packets + return 0 ok, <0 on error */ +static int CheckAck(TcpInfo* tcpInfo, SnifferSession* session) +{ + if (tcpInfo->ack) { + word32 seqStart = (session->flags.side == CYASSL_SERVER_END) ? + session->srvSeqStart :session->cliSeqStart; + word32 real = tcpInfo->ackNumber - seqStart; + word32 expected = (session->flags.side == CYASSL_SERVER_END) ? + session->srvExpected : session->cliExpected; + + /* handle rollover of sequence */ + if (tcpInfo->ackNumber < seqStart) + real = 0xffffffffU - seqStart + tcpInfo->ackNumber; + + TraceAck(real, expected); + + if (real > expected) + return -1; /* we missed a packet, ACKing data we never saw */ + } + return 0; +} + + +/* Check TCP Sequence status */ +/* returns 0 on success (continue), -1 on error, 1 on success (end) */ +static int CheckSequence(IpInfo* ipInfo, TcpInfo* tcpInfo, + SnifferSession* session, int* sslBytes, + const byte** sslFrame, char* error) +{ + int actualLen; + + /* init SEQ from server to client */ + if (tcpInfo->syn && tcpInfo->ack) { + session->srvSeqStart = tcpInfo->sequence; + session->srvExpected = 1; + TraceServerSyn(tcpInfo->sequence); + return 1; + } + + /* adjust potential ethernet trailer */ + actualLen = ipInfo->total - ipInfo->length - tcpInfo->length; + if (*sslBytes > actualLen) { + *sslBytes = actualLen; + } + + TraceSequence(tcpInfo->sequence, *sslBytes); + if (CheckAck(tcpInfo, session) < 0) { + SetError(ACK_MISSED_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + return AdjustSequence(tcpInfo, session, sslBytes, sslFrame, error); +} + + +/* Check Status before record processing */ +/* returns 0 on success (continue), -1 on error, 1 on success (end) */ +static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo, + const byte** sslFrame, SnifferSession** session, + int* sslBytes, const byte** end, char* error) +{ + word32 length; + SSL* ssl = ((*session)->flags.side == CYASSL_SERVER_END) ? + (*session)->sslServer : (*session)->sslClient; + /* remove SnifferSession on 2nd FIN or RST */ + if (tcpInfo->fin || tcpInfo->rst) { + /* flag FIN and RST */ + if (tcpInfo->fin) + (*session)->flags.finCount += 1; + else if (tcpInfo->rst) + (*session)->flags.finCount += 2; + + if ((*session)->flags.finCount >= 2) { + RemoveSession(*session, ipInfo, tcpInfo, 0); + *session = NULL; + return 1; + } + } + + if ((*session)->flags.fatalError == FATAL_ERROR_STATE) { + SetError(FATAL_ERROR_STR, error, NULL, 0); + return -1; + } + + if (*sslBytes == 0) { + Trace(NO_DATA_STR); + return 1; + } + + /* if current partial data, add to end of partial */ + if ( (length = ssl->buffers.inputBuffer.length) ) { + Trace(PARTIAL_ADD_STR); + + if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) { + if (GrowInputBuffer(ssl, *sslBytes, length) < 0) { + SetError(MEMORY_STR, error, *session, FATAL_ERROR_STATE); + return -1; + } + } + XMEMCPY(&ssl->buffers.inputBuffer.buffer[length], *sslFrame, *sslBytes); + *sslBytes += length; + ssl->buffers.inputBuffer.length = *sslBytes; + *sslFrame = ssl->buffers.inputBuffer.buffer; + *end = *sslFrame + *sslBytes; + } + + if ((*session)->flags.clientHello == 0 && **sslFrame != handshake) { + int rhSize; + int ret = DoOldHello(*session, *sslFrame, &rhSize, sslBytes, error); + if (ret < 0) + return -1; /* error already set */ + if (*sslBytes <= 0) + return 1; + } + + return 0; +} + + +/* See if input on the reassembly list is ready for consuming */ +/* returns 1 for TRUE, 0 for FALSE */ +static int HaveMoreInput(SnifferSession* session, const byte** sslFrame, + int* sslBytes, const byte** end, char* error) +{ + /* sequence and reassembly based on from, not to */ + int moreInput = 0; + PacketBuffer** front = (session->flags.side == CYASSL_SERVER_END) ? + &session->cliReassemblyList : &session->srvReassemblyList; + word32* expected = (session->flags.side == CYASSL_SERVER_END) ? + &session->cliExpected : &session->srvExpected; + /* buffer is on receiving end */ + word32* length = (session->flags.side == CYASSL_SERVER_END) ? + &session->sslServer->buffers.inputBuffer.length : + &session->sslClient->buffers.inputBuffer.length; + byte* myBuffer = (session->flags.side == CYASSL_SERVER_END) ? + session->sslServer->buffers.inputBuffer.buffer : + session->sslClient->buffers.inputBuffer.buffer; + word32 bufferSize = (session->flags.side == CYASSL_SERVER_END) ? + session->sslServer->buffers.inputBuffer.bufferSize : + session->sslClient->buffers.inputBuffer.bufferSize; + SSL* ssl = (session->flags.side == CYASSL_SERVER_END) ? + session->sslServer : session->sslClient; + + while (*front && ((*front)->begin == *expected) ) { + word32 room = bufferSize - *length; + word32 packetLen = (*front)->end - (*front)->begin + 1; + + if (packetLen > room && bufferSize < MAX_INPUT_SZ) { + if (GrowInputBuffer(ssl, packetLen, *length) < 0) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return 0; + } + } + + if (packetLen <= room) { + PacketBuffer* del = *front; + + XMEMCPY(&myBuffer[*length], (*front)->data, packetLen); + *length += packetLen; + *expected += packetLen; + + /* remove used packet */ + *front = (*front)->next; + FreePacketBuffer(del); + + moreInput = 1; + } + else + break; + } + if (moreInput) { + *sslFrame = myBuffer; + *sslBytes = *length; + *end = myBuffer + *length; + } + return moreInput; +} + + + +/* Process Message(s) from sslFrame */ +/* return Number of bytes on success, 0 for no data yet, and -1 on error */ +static int ProcessMessage(const byte* sslFrame, SnifferSession* session, + int sslBytes, byte* data, const byte* end,char* error) +{ + const byte* sslBegin = sslFrame; + const byte* tmp; + RecordLayerHeader rh; + int rhSize = 0; + int ret; + int errCode = 0; + int decoded = 0; /* bytes stored for user in data */ + int notEnough; /* notEnough bytes yet flag */ + SSL* ssl = (session->flags.side == CYASSL_SERVER_END) ? + session->sslServer : session->sslClient; +doMessage: + notEnough = 0; + if (sslBytes < 0) { + SetError(PACKET_HDR_SHORT_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + if (sslBytes >= RECORD_HEADER_SZ) { + if (GetRecordHeader(sslFrame, &rh, &rhSize) != 0) { + SetError(BAD_RECORD_HDR_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + } + else + notEnough = 1; + + if (notEnough || rhSize > (sslBytes - RECORD_HEADER_SZ)) { + /* don't have enough input yet to process full SSL record */ + Trace(PARTIAL_INPUT_STR); + + /* store partial if not there already or we advanced */ + if (ssl->buffers.inputBuffer.length == 0 || sslBegin != sslFrame) { + if (sslBytes > (int)ssl->buffers.inputBuffer.bufferSize) { + if (GrowInputBuffer(ssl, sslBytes, 0) < 0) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + } + XMEMCPY(ssl->buffers.inputBuffer.buffer, sslFrame, sslBytes); + ssl->buffers.inputBuffer.length = sslBytes; + } + if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error)) + goto doMessage; + return decoded; + } + sslFrame += RECORD_HEADER_SZ; + sslBytes -= RECORD_HEADER_SZ; + tmp = sslFrame + rhSize; /* may have more than one record to process */ + + /* decrypt if needed */ + if ((session->flags.side == CYASSL_SERVER_END && + session->flags.serverCipherOn) + || (session->flags.side == CYASSL_CLIENT_END && + session->flags.clientCipherOn)) { + if (CheckAvailableSize(ssl, rhSize) < 0) { + SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + sslFrame = DecryptMessage(ssl, sslFrame, rhSize, + ssl->buffers.outputBuffer.buffer, &errCode); + if (errCode != 0) { + SetError(BAD_DECRYPT, error, session, FATAL_ERROR_STATE); + return -1; + } + } + + switch ((enum ContentType)rh.type) { + case handshake: + Trace(GOT_HANDSHAKE_STR); + ret = DoHandShake(sslFrame, &sslBytes, session, error); + if (ret != 0) { + if (session->flags.fatalError == 0) + SetError(BAD_HANDSHAKE_STR,error,session,FATAL_ERROR_STATE); + return -1; + } + break; + case change_cipher_spec: + if (session->flags.side == CYASSL_SERVER_END) + session->flags.serverCipherOn = 1; + else + session->flags.clientCipherOn = 1; + Trace(GOT_CHANGE_CIPHER_STR); + ssl->options.handShakeState = HANDSHAKE_DONE; + break; + case application_data: + Trace(GOT_APP_DATA_STR); + { + word32 inOutIdx = 0; + + ret = DoApplicationData(ssl, (byte*)sslFrame, &inOutIdx); + if (ret == 0) { + ret = ssl->buffers.clearOutputBuffer.length; + TraceGotData(ret); + if (ret) { /* may be blank message */ + XMEMCPY(&data[decoded], + ssl->buffers.clearOutputBuffer.buffer, ret); + TraceAddedData(ret, decoded); + decoded += ret; + ssl->buffers.clearOutputBuffer.length = 0; + } + } + else { + SetError(BAD_APP_DATA_STR, error,session,FATAL_ERROR_STATE); + return -1; + } + if (ssl->buffers.outputBuffer.dynamicFlag) + ShrinkOutputBuffer(ssl); + } + break; + case alert: + Trace(GOT_ALERT_STR); + break; + case no_type: + default: + SetError(GOT_UNKNOWN_RECORD_STR, error, session, FATAL_ERROR_STATE); + return -1; + } + + if (tmp < end) { + Trace(ANOTHER_MSG_STR); + sslFrame = tmp; + sslBytes = (int)(end - tmp); + goto doMessage; + } + + /* clear used input */ + ssl->buffers.inputBuffer.length = 0; + + /* could have more input ready now */ + if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error)) + goto doMessage; + + if (ssl->buffers.inputBuffer.dynamicFlag) + ShrinkInputBuffer(ssl, NO_FORCED_FREE); + + return decoded; +} + + +/* See if we need to process any pending FIN captures */ +static void CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo, + SnifferSession* session) +{ + if (session->finCaputre.cliFinSeq && session->finCaputre.cliFinSeq <= + session->cliExpected) { + if (session->finCaputre.cliCounted == 0) { + session->flags.finCount += 1; + session->finCaputre.cliCounted = 1; + TraceClientFin(session->finCaputre.cliFinSeq, session->cliExpected); + } + } + + if (session->finCaputre.srvFinSeq && session->finCaputre.srvFinSeq <= + session->srvExpected) { + if (session->finCaputre.srvCounted == 0) { + session->flags.finCount += 1; + session->finCaputre.srvCounted = 1; + TraceServerFin(session->finCaputre.srvFinSeq, session->srvExpected); + } + } + + if (session->flags.finCount >= 2) + RemoveSession(session, ipInfo, tcpInfo, 0); +} + + +/* If session is in fatal error state free resources now + return true if removed, 0 otherwise */ +static int RemoveFatalSession(IpInfo* ipInfo, TcpInfo* tcpInfo, + SnifferSession* session, char* error) +{ + if (session && session->flags.fatalError == FATAL_ERROR_STATE) { + RemoveSession(session, ipInfo, tcpInfo, 0); + SetError(FATAL_ERROR_STR, error, NULL, 0); + return 1; + } + return 0; +} + + +/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */ +/* returns Number of bytes on success, 0 for no data yet, and -1 on error */ +int ssl_DecodePacket(const byte* packet, int length, byte* data, char* error) +{ + TcpInfo tcpInfo; + IpInfo ipInfo; + const byte* sslFrame; + const byte* end = packet + length; + int sslBytes; /* ssl bytes unconsumed */ + int ret; + SnifferSession* session = 0; + + if (CheckHeaders(&ipInfo, &tcpInfo, packet, length, &sslFrame, &sslBytes, + error) != 0) + return -1; + + ret = CheckSession(&ipInfo, &tcpInfo, sslBytes, &session, error); + if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; + else if (ret == -1) return -1; + else if (ret == 1) return 0; /* done for now */ + + ret = CheckSequence(&ipInfo, &tcpInfo, session, &sslBytes, &sslFrame,error); + if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; + else if (ret == -1) return -1; + else if (ret == 1) return 0; /* done for now */ + + ret = CheckPreRecord(&ipInfo, &tcpInfo, &sslFrame, &session, &sslBytes, + &end, error); + if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; + else if (ret == -1) return -1; + else if (ret == 1) return 0; /* done for now */ + + ret = ProcessMessage(sslFrame, session, sslBytes, data, end, error); + if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; + CheckFinCapture(&ipInfo, &tcpInfo, session); + return ret; +} + + +/* Enables (if traceFile)/ Disables debug tracing */ +/* returns 0 on success, -1 on error */ +int ssl_Trace(const char* traceFile, char* error) +{ + if (traceFile) { + TraceFile = fopen(traceFile, "a"); + if (!TraceFile) { + SetError(BAD_TRACE_FILE_STR, error, NULL, 0); + return -1; + } + TraceOn = 1; + } + else + TraceOn = 0; + + return 0; +} + + + + +#endif /* CYASSL_SNIFFER */ diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo new file mode 100644 index 00000000..dfa9c9d3 --- /dev/null +++ b/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo @@ -0,0 +1,12 @@ +# src/src_libcyassl_la-internal.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-internal.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo new file mode 100644 index 00000000..b8febacf --- /dev/null +++ b/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo @@ -0,0 +1,12 @@ +# src/src_libcyassl_la-io.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-io.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo new file mode 100644 index 00000000..79ec5153 --- /dev/null +++ b/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo @@ -0,0 +1,12 @@ +# src/src_libcyassl_la-keys.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-keys.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo new file mode 100644 index 00000000..9da2ff0a --- /dev/null +++ b/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo @@ -0,0 +1,12 @@ +# src/src_libcyassl_la-ssl.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-ssl.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo new file mode 100644 index 00000000..b73cdf38 --- /dev/null +++ b/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo @@ -0,0 +1,12 @@ +# src/src_libcyassl_la-tls.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/src_libcyassl_la-tls.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/project1/cyassl-3.0.0/src/ssl.c b/project1/cyassl-3.0.0/src/ssl.c new file mode 100644 index 00000000..39726a92 --- /dev/null +++ b/project1/cyassl-3.0.0/src/ssl.c @@ -0,0 +1,11553 @@ +/* ssl.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef HAVE_ERRNO_H + #include +#endif + + +#include +#include +#include +#include + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + #include +#endif + +#ifdef OPENSSL_EXTRA + /* openssl headers begin */ + #include + #include + #include + #include + #include + #include + #include + /* openssl headers end, cyassl internal headers next */ + #include + #include + #include + #include + #include + #include + #ifdef CYASSL_SHA512 + #include + #endif +#endif + +#ifndef NO_FILESYSTEM + #if !defined(USE_WINDOWS_API) && !defined(NO_CYASSL_DIR) \ + && !defined(EBSNET) + #include + #include + #endif + #ifdef EBSNET + #include "vfapi.h" + #include "vfile.h" + #endif +#endif /* NO_FILESYSTEM */ + +#ifndef TRUE + #define TRUE 1 +#endif +#ifndef FALSE + #define FALSE 0 +#endif + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + +#ifndef max +#ifdef CYASSL_DTLS + static INLINE word32 max(word32 a, word32 b) + { + return a > b ? a : b; + } +#endif +#endif /* min */ + + +#ifndef CYASSL_LEANPSK +char* mystrnstr(const char* s1, const char* s2, unsigned int n) +{ + unsigned int s2_len = (unsigned int)XSTRLEN(s2); + + if (s2_len == 0) + return (char*)s1; + + while (n >= s2_len && s1[0]) { + if (s1[0] == s2[0]) + if (XMEMCMP(s1, s2, s2_len) == 0) + return (char*)s1; + s1++; + n--; + } + + return NULL; +} +#endif + + +/* prevent multiple mutex initializations */ +static volatile int initRefCount = 0; +static CyaSSL_Mutex count_mutex; /* init ref count mutex */ + + +CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD* method) +{ + CYASSL_CTX* ctx = NULL; + + CYASSL_ENTER("CYASSL_CTX_new"); + + if (initRefCount == 0) + CyaSSL_Init(); /* user no longer forced to call Init themselves */ + + if (method == NULL) + return ctx; + + ctx = (CYASSL_CTX*) XMALLOC(sizeof(CYASSL_CTX), 0, DYNAMIC_TYPE_CTX); + if (ctx) { + if (InitSSL_Ctx(ctx, method) < 0) { + CYASSL_MSG("Init CTX failed"); + CyaSSL_CTX_free(ctx); + ctx = NULL; + } + } + else { + CYASSL_MSG("Alloc CTX failed, method freed"); + XFREE(method, NULL, DYNAMIC_TYPE_METHOD); + } + + CYASSL_LEAVE("CYASSL_CTX_new", 0); + return ctx; +} + + +void CyaSSL_CTX_free(CYASSL_CTX* ctx) +{ + CYASSL_ENTER("SSL_CTX_free"); + if (ctx) + FreeSSL_Ctx(ctx); + CYASSL_LEAVE("SSL_CTX_free", 0); +} + + +CYASSL* CyaSSL_new(CYASSL_CTX* ctx) +{ + CYASSL* ssl = NULL; + int ret = 0; + + (void)ret; + CYASSL_ENTER("SSL_new"); + + if (ctx == NULL) + return ssl; + + ssl = (CYASSL*) XMALLOC(sizeof(CYASSL), ctx->heap,DYNAMIC_TYPE_SSL); + if (ssl) + if ( (ret = InitSSL(ssl, ctx)) < 0) { + FreeSSL(ssl); + ssl = 0; + } + + CYASSL_LEAVE("SSL_new", ret); + return ssl; +} + + +void CyaSSL_free(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_free"); + if (ssl) + FreeSSL(ssl); + CYASSL_LEAVE("SSL_free", 0); +} + + +int CyaSSL_set_fd(CYASSL* ssl, int fd) +{ + CYASSL_ENTER("SSL_set_fd"); + ssl->rfd = fd; /* not used directly to allow IO callbacks */ + ssl->wfd = fd; + + ssl->IOCB_ReadCtx = &ssl->rfd; + ssl->IOCB_WriteCtx = &ssl->wfd; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + ssl->IOCB_ReadCtx = &ssl->buffers.dtlsCtx; + ssl->IOCB_WriteCtx = &ssl->buffers.dtlsCtx; + ssl->buffers.dtlsCtx.fd = fd; + } + #endif + + CYASSL_LEAVE("SSL_set_fd", SSL_SUCCESS); + return SSL_SUCCESS; +} + + +int CyaSSL_get_fd(const CYASSL* ssl) +{ + CYASSL_ENTER("SSL_get_fd"); + CYASSL_LEAVE("SSL_get_fd", ssl->rfd); + return ssl->rfd; +} + + +int CyaSSL_get_using_nonblock(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_get_using_nonblock"); + CYASSL_LEAVE("CyaSSL_get_using_nonblock", ssl->options.usingNonblock); + return ssl->options.usingNonblock; +} + + +int CyaSSL_dtls(CYASSL* ssl) +{ + return ssl->options.dtls; +} + + +#ifndef CYASSL_LEANPSK +void CyaSSL_set_using_nonblock(CYASSL* ssl, int nonblock) +{ + CYASSL_ENTER("CyaSSL_set_using_nonblock"); + ssl->options.usingNonblock = (nonblock != 0); +} + + +int CyaSSL_dtls_set_peer(CYASSL* ssl, void* peer, unsigned int peerSz) +{ +#ifdef CYASSL_DTLS + void* sa = (void*)XMALLOC(peerSz, ssl->heap, DYNAMIC_TYPE_SOCKADDR); + if (sa != NULL) { + XMEMCPY(sa, peer, peerSz); + ssl->buffers.dtlsCtx.peer.sa = sa; + ssl->buffers.dtlsCtx.peer.sz = peerSz; + return SSL_SUCCESS; + } + return SSL_FAILURE; +#else + (void)ssl; + (void)peer; + (void)peerSz; + return SSL_NOT_IMPLEMENTED; +#endif +} + +int CyaSSL_dtls_get_peer(CYASSL* ssl, void* peer, unsigned int* peerSz) +{ +#ifdef CYASSL_DTLS + if (peer != NULL && peerSz != NULL + && *peerSz >= ssl->buffers.dtlsCtx.peer.sz) { + *peerSz = ssl->buffers.dtlsCtx.peer.sz; + XMEMCPY(peer, ssl->buffers.dtlsCtx.peer.sa, *peerSz); + return SSL_SUCCESS; + } + return SSL_FAILURE; +#else + (void)ssl; + (void)peer; + (void)peerSz; + return SSL_NOT_IMPLEMENTED; +#endif +} +#endif /* CYASSL_LEANPSK */ + + +/* return underlyig connect or accept, SSL_SUCCESS on ok */ +int CyaSSL_negotiate(CYASSL* ssl) +{ + int err = SSL_FATAL_ERROR; + + CYASSL_ENTER("CyaSSL_negotiate"); +#ifndef NO_CYASSL_SERVER + if (ssl->options.side == CYASSL_SERVER_END) + err = CyaSSL_accept(ssl); +#endif + +#ifndef NO_CYASSL_CLIENT + if (ssl->options.side == CYASSL_CLIENT_END) + err = CyaSSL_connect(ssl); +#endif + + CYASSL_LEAVE("CyaSSL_negotiate", err); + + return err; +} + + +#ifndef CYASSL_LEANPSK +/* object size based on build */ +int CyaSSL_GetObjectSize(void) +{ +#ifdef SHOW_SIZES + printf("sizeof suites = %lu\n", sizeof(Suites)); + printf("sizeof ciphers(2) = %lu\n", sizeof(Ciphers)); +#ifndef NO_RC4 + printf(" sizeof arc4 = %lu\n", sizeof(Arc4)); +#endif + printf(" sizeof aes = %lu\n", sizeof(Aes)); +#ifndef NO_DES3 + printf(" sizeof des3 = %lu\n", sizeof(Des3)); +#endif +#ifndef NO_RABBIT + printf(" sizeof rabbit = %lu\n", sizeof(Rabbit)); +#endif + printf("sizeof cipher specs = %lu\n", sizeof(CipherSpecs)); + printf("sizeof keys = %lu\n", sizeof(Keys)); + printf("sizeof Hashes(2) = %lu\n", sizeof(Hashes)); +#ifndef NO_MD5 + printf(" sizeof MD5 = %lu\n", sizeof(Md5)); +#endif +#ifndef NO_SHA + printf(" sizeof SHA = %lu\n", sizeof(Sha)); +#endif +#ifndef NO_SHA256 + printf(" sizeof SHA256 = %lu\n", sizeof(Sha256)); +#endif +#ifdef CYASSL_SHA384 + printf(" sizeof SHA384 = %lu\n", sizeof(Sha384)); +#endif +#ifdef CYASSL_SHA384 + printf(" sizeof SHA512 = %lu\n", sizeof(Sha512)); +#endif + printf("sizeof Buffers = %lu\n", sizeof(Buffers)); + printf("sizeof Options = %lu\n", sizeof(Options)); + printf("sizeof Arrays = %lu\n", sizeof(Arrays)); +#ifndef NO_RSA + printf("sizeof RsaKey = %lu\n", sizeof(RsaKey)); +#endif +#ifdef HAVE_ECC + printf("sizeof ecc_key = %lu\n", sizeof(ecc_key)); +#endif + printf("sizeof CYASSL_CIPHER = %lu\n", sizeof(CYASSL_CIPHER)); + printf("sizeof CYASSL_SESSION = %lu\n", sizeof(CYASSL_SESSION)); + printf("sizeof CYASSL = %lu\n", sizeof(CYASSL)); + printf("sizeof CYASSL_CTX = %lu\n", sizeof(CYASSL_CTX)); +#endif + + return sizeof(CYASSL); +} +#endif + +/* XXX should be NO_DH */ +#ifndef NO_CERTS +/* server Diffie-Hellman parameters, SSL_SUCCESS on ok */ +int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz, + const unsigned char* g, int gSz) +{ + byte havePSK = 0; + byte haveRSA = 1; + + CYASSL_ENTER("CyaSSL_SetTmpDH"); + if (ssl == NULL || p == NULL || g == NULL) return BAD_FUNC_ARG; + + if (ssl->options.side != CYASSL_SERVER_END) + return SIDE_ERROR; + + if (ssl->buffers.serverDH_P.buffer && ssl->buffers.weOwnDH) + XFREE(ssl->buffers.serverDH_P.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); + if (ssl->buffers.serverDH_G.buffer && ssl->buffers.weOwnDH) + XFREE(ssl->buffers.serverDH_G.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); + + ssl->buffers.weOwnDH = 1; /* SSL owns now */ + ssl->buffers.serverDH_P.buffer = (byte*)XMALLOC(pSz, ssl->ctx->heap, + DYNAMIC_TYPE_DH); + if (ssl->buffers.serverDH_P.buffer == NULL) + return MEMORY_E; + + ssl->buffers.serverDH_G.buffer = (byte*)XMALLOC(gSz, ssl->ctx->heap, + DYNAMIC_TYPE_DH); + if (ssl->buffers.serverDH_G.buffer == NULL) { + XFREE(ssl->buffers.serverDH_P.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); + return MEMORY_E; + } + + ssl->buffers.serverDH_P.length = pSz; + ssl->buffers.serverDH_G.length = gSz; + + XMEMCPY(ssl->buffers.serverDH_P.buffer, p, pSz); + XMEMCPY(ssl->buffers.serverDH_G.buffer, g, gSz); + + ssl->options.haveDH = 1; + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + #ifdef NO_RSA + haveRSA = 0; + #endif + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, ssl->options.haveDH, + ssl->options.haveNTRU, ssl->options.haveECDSAsig, + ssl->options.haveStaticECC, ssl->options.side); + + CYASSL_LEAVE("CyaSSL_SetTmpDH", 0); + return SSL_SUCCESS; +} +#endif /* !NO_CERTS */ + + +int CyaSSL_write(CYASSL* ssl, const void* data, int sz) +{ + int ret; + + CYASSL_ENTER("SSL_write()"); + + if (ssl == NULL || data == NULL || sz < 0) + return BAD_FUNC_ARG; + +#ifdef HAVE_ERRNO_H + errno = 0; +#endif + + ret = SendData(ssl, data, sz); + + CYASSL_LEAVE("SSL_write()", ret); + + if (ret < 0) + return SSL_FATAL_ERROR; + else + return ret; +} + + +static int CyaSSL_read_internal(CYASSL* ssl, void* data, int sz, int peek) +{ + int ret; + + CYASSL_ENTER("CyaSSL_read_internal()"); + + if (ssl == NULL || data == NULL || sz < 0) + return BAD_FUNC_ARG; + +#ifdef HAVE_ERRNO_H + errno = 0; +#endif +#ifdef CYASSL_DTLS + if (ssl->options.dtls) + ssl->dtls_expected_rx = max(sz + 100, MAX_MTU); +#endif + +#ifdef HAVE_MAX_FRAGMENT + ret = ReceiveData(ssl, (byte*)data, + min(sz, min(ssl->max_fragment, OUTPUT_RECORD_SIZE)), peek); +#else + ret = ReceiveData(ssl, (byte*)data, min(sz, OUTPUT_RECORD_SIZE), peek); +#endif + + CYASSL_LEAVE("CyaSSL_read_internal()", ret); + + if (ret < 0) + return SSL_FATAL_ERROR; + else + return ret; +} + + +int CyaSSL_peek(CYASSL* ssl, void* data, int sz) +{ + CYASSL_ENTER("CyaSSL_peek()"); + + return CyaSSL_read_internal(ssl, data, sz, TRUE); +} + + +int CyaSSL_read(CYASSL* ssl, void* data, int sz) +{ + CYASSL_ENTER("CyaSSL_read()"); + + return CyaSSL_read_internal(ssl, data, sz, FALSE); +} + + +#ifdef HAVE_CAVIUM + +/* let's use cavium, SSL_SUCCESS on ok */ +int CyaSSL_UseCavium(CYASSL* ssl, int devId) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + ssl->devId = devId; + + return SSL_SUCCESS; +} + + +/* let's use cavium, SSL_SUCCESS on ok */ +int CyaSSL_CTX_UseCavium(CYASSL_CTX* ctx, int devId) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + ctx->devId = devId; + + return SSL_SUCCESS; +} + + +#endif /* HAVE_CAVIUM */ + +#ifdef HAVE_SNI + +int CyaSSL_UseSNI(CYASSL* ssl, byte type, const void* data, word16 size) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseSNI(&ssl->extensions, type, data, size); +} + +int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, byte type, const void* data, word16 size) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseSNI(&ctx->extensions, type, data, size); +} + +#ifndef NO_CYASSL_SERVER + +void CyaSSL_SNI_SetOptions(CYASSL* ssl, byte type, byte options) +{ + if (ssl && ssl->extensions) + TLSX_SNI_SetOptions(ssl->extensions, type, options); +} + +void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, byte type, byte options) +{ + if (ctx && ctx->extensions) + TLSX_SNI_SetOptions(ctx->extensions, type, options); +} + +byte CyaSSL_SNI_Status(CYASSL* ssl, byte type) +{ + return TLSX_SNI_Status(ssl ? ssl->extensions : NULL, type); +} + +word16 CyaSSL_SNI_GetRequest(CYASSL* ssl, byte type, void** data) +{ + if (data) + *data = NULL; + + if (ssl && ssl->extensions) + return TLSX_SNI_GetRequest(ssl->extensions, type, data); + + return 0; +} + +int CyaSSL_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, byte type, + byte* sni, word32* inOutSz) +{ + if (clientHello && helloSz > 0 && sni && inOutSz && *inOutSz > 0) + return TLSX_SNI_GetFromBuffer(clientHello, helloSz, type, sni, inOutSz); + + return BAD_FUNC_ARG; +} + +#endif /* NO_CYASSL_SERVER */ + +#endif /* HAVE_SNI */ + + +#ifdef HAVE_MAX_FRAGMENT +#ifndef NO_CYASSL_CLIENT +int CyaSSL_UseMaxFragment(CYASSL* ssl, byte mfl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseMaxFragment(&ssl->extensions, mfl); +} + +int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, byte mfl) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseMaxFragment(&ctx->extensions, mfl); +} +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_MAX_FRAGMENT */ + +#ifdef HAVE_TRUNCATED_HMAC +#ifndef NO_CYASSL_CLIENT +int CyaSSL_UseTruncatedHMAC(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseTruncatedHMAC(&ssl->extensions); +} + +int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + return TLSX_UseTruncatedHMAC(&ctx->extensions); +} +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_TRUNCATED_HMAC */ + +/* Elliptic Curves */ +#ifdef HAVE_SUPPORTED_CURVES +#ifndef NO_CYASSL_CLIENT + +int CyaSSL_UseSupportedCurve(CYASSL* ssl, word16 name) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + switch (name) { + case CYASSL_ECC_SECP160R1: + case CYASSL_ECC_SECP192R1: + case CYASSL_ECC_SECP224R1: + case CYASSL_ECC_SECP256R1: + case CYASSL_ECC_SECP384R1: + case CYASSL_ECC_SECP521R1: + break; + + default: + return BAD_FUNC_ARG; + } + + return TLSX_UseSupportedCurve(&ssl->extensions, name); +} + +int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, word16 name) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + switch (name) { + case CYASSL_ECC_SECP160R1: + case CYASSL_ECC_SECP192R1: + case CYASSL_ECC_SECP224R1: + case CYASSL_ECC_SECP256R1: + case CYASSL_ECC_SECP384R1: + case CYASSL_ECC_SECP521R1: + break; + + default: + return BAD_FUNC_ARG; + } + + return TLSX_UseSupportedCurve(&ctx->extensions, name); +} + +#endif /* NO_CYASSL_CLIENT */ +#endif /* HAVE_SUPPORTED_CURVES */ + + +#ifndef CYASSL_LEANPSK +int CyaSSL_send(CYASSL* ssl, const void* data, int sz, int flags) +{ + int ret; + int oldFlags; + + CYASSL_ENTER("CyaSSL_send()"); + + if (ssl == NULL || data == NULL || sz < 0) + return BAD_FUNC_ARG; + + oldFlags = ssl->wflags; + + ssl->wflags = flags; + ret = CyaSSL_write(ssl, data, sz); + ssl->wflags = oldFlags; + + CYASSL_LEAVE("CyaSSL_send()", ret); + + return ret; +} + + +int CyaSSL_recv(CYASSL* ssl, void* data, int sz, int flags) +{ + int ret; + int oldFlags; + + CYASSL_ENTER("CyaSSL_recv()"); + + if (ssl == NULL || data == NULL || sz < 0) + return BAD_FUNC_ARG; + + oldFlags = ssl->rflags; + + ssl->rflags = flags; + ret = CyaSSL_read(ssl, data, sz); + ssl->rflags = oldFlags; + + CYASSL_LEAVE("CyaSSL_recv()", ret); + + return ret; +} +#endif + + +/* SSL_SUCCESS on ok */ +int CyaSSL_shutdown(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_shutdown()"); + + if (ssl == NULL) + return SSL_FATAL_ERROR; + + if (ssl->options.quietShutdown) { + CYASSL_MSG("quiet shutdown, no close notify sent"); + return SSL_SUCCESS; + } + + /* try to send close notify, not an error if can't */ + if (!ssl->options.isClosed && !ssl->options.connReset && + !ssl->options.sentNotify) { + ssl->error = SendAlert(ssl, alert_warning, close_notify); + if (ssl->error < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.sentNotify = 1; /* don't send close_notify twice */ + } + + CYASSL_LEAVE("SSL_shutdown()", ssl->error); + + ssl->error = SSL_ERROR_SYSCALL; /* simulate OpenSSL behavior */ + + return SSL_SUCCESS; +} + + +int CyaSSL_get_error(CYASSL* ssl, int ret) +{ + CYASSL_ENTER("SSL_get_error"); + + if (ret > 0) + return SSL_ERROR_NONE; + if (ssl == NULL) + return BAD_FUNC_ARG; + + CYASSL_LEAVE("SSL_get_error", ssl->error); + + /* make sure converted types are handled in SetErrorString() too */ + if (ssl->error == WANT_READ) + return SSL_ERROR_WANT_READ; /* convert to OpenSSL type */ + else if (ssl->error == WANT_WRITE) + return SSL_ERROR_WANT_WRITE; /* convert to OpenSSL type */ + else if (ssl->error == ZERO_RETURN) + return SSL_ERROR_ZERO_RETURN; /* convert to OpenSSL type */ + return ssl->error; +} + + +/* retrive alert history, SSL_SUCCESS on ok */ +int CyaSSL_get_alert_history(CYASSL* ssl, CYASSL_ALERT_HISTORY *h) +{ + if (ssl && h) { + *h = ssl->alert_history; + } + return SSL_SUCCESS; +} + + +/* return TRUE if current error is want read */ +int CyaSSL_want_read(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_want_read"); + if (ssl->error == WANT_READ) + return 1; + + return 0; +} + + +/* return TRUE if current error is want write */ +int CyaSSL_want_write(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_want_write"); + if (ssl->error == WANT_WRITE) + return 1; + + return 0; +} + + +char* CyaSSL_ERR_error_string(unsigned long errNumber, char* data) +{ + static const char* msg = "Please supply a buffer for error string"; + + CYASSL_ENTER("ERR_error_string"); + if (data) { + SetErrorString((int)errNumber, data); + return data; + } + + return (char*)msg; +} + + +void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, unsigned long len) +{ + CYASSL_ENTER("CyaSSL_ERR_error_string_n"); + if (len >= CYASSL_MAX_ERROR_SZ) + CyaSSL_ERR_error_string(e, buf); + else { + char tmp[CYASSL_MAX_ERROR_SZ]; + + CYASSL_MSG("Error buffer too short, truncating"); + if (len) { + CyaSSL_ERR_error_string(e, tmp); + XMEMCPY(buf, tmp, len-1); + buf[len-1] = '\0'; + } + } +} + + +/* don't free temporary arrays at end of handshake */ +void CyaSSL_KeepArrays(CYASSL* ssl) +{ + if (ssl) + ssl->options.saveArrays = 1; +} + + +/* user doesn't need temporary arrays anymore, Free */ +void CyaSSL_FreeArrays(CYASSL* ssl) +{ + if (ssl && ssl->options.handShakeState == HANDSHAKE_DONE) { + ssl->options.saveArrays = 0; + FreeArrays(ssl, 1); + } +} + + +const byte* CyaSSL_GetMacSecret(CYASSL* ssl, int verify) +{ + if (ssl == NULL) + return NULL; + + if ( (ssl->options.side == CYASSL_CLIENT_END && !verify) || + (ssl->options.side == CYASSL_SERVER_END && verify) ) + return ssl->keys.client_write_MAC_secret; + else + return ssl->keys.server_write_MAC_secret; +} + + +#ifdef ATOMIC_USER + +void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX* ctx, CallbackMacEncrypt cb) +{ + if (ctx) + ctx->MacEncryptCb = cb; +} + + +void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->MacEncryptCtx = ctx; +} + + +void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->MacEncryptCtx; + + return NULL; +} + + +void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX* ctx, CallbackDecryptVerify cb) +{ + if (ctx) + ctx->DecryptVerifyCb = cb; +} + + +void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->DecryptVerifyCtx = ctx; +} + + +void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->DecryptVerifyCtx; + + return NULL; +} + + +const byte* CyaSSL_GetClientWriteKey(CYASSL* ssl) +{ + if (ssl) + return ssl->keys.client_write_key; + + return NULL; +} + + +const byte* CyaSSL_GetClientWriteIV(CYASSL* ssl) +{ + if (ssl) + return ssl->keys.client_write_IV; + + return NULL; +} + + +const byte* CyaSSL_GetServerWriteKey(CYASSL* ssl) +{ + if (ssl) + return ssl->keys.server_write_key; + + return NULL; +} + + +const byte* CyaSSL_GetServerWriteIV(CYASSL* ssl) +{ + if (ssl) + return ssl->keys.server_write_IV; + + return NULL; +} + + +int CyaSSL_GetKeySize(CYASSL* ssl) +{ + if (ssl) + return ssl->specs.key_size; + + return BAD_FUNC_ARG; +} + + +int CyaSSL_GetIVSize(CYASSL* ssl) +{ + if (ssl) + return ssl->specs.iv_size; + + return BAD_FUNC_ARG; +} + + +int CyaSSL_GetBulkCipher(CYASSL* ssl) +{ + if (ssl) + return ssl->specs.bulk_cipher_algorithm; + + return BAD_FUNC_ARG; +} + + +int CyaSSL_GetCipherType(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + if (ssl->specs.cipher_type == block) + return CYASSL_BLOCK_TYPE; + if (ssl->specs.cipher_type == stream) + return CYASSL_STREAM_TYPE; + if (ssl->specs.cipher_type == aead) + return CYASSL_AEAD_TYPE; + + return -1; +} + + +int CyaSSL_GetCipherBlockSize(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + return ssl->specs.block_size; +} + + +int CyaSSL_GetAeadMacSize(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + return ssl->specs.aead_mac_size; +} + + +int CyaSSL_IsTLSv1_1(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + if (ssl->options.tls1_1) + return 1; + + return 0; +} + + +int CyaSSL_GetSide(CYASSL* ssl) +{ + if (ssl) + return ssl->options.side; + + return BAD_FUNC_ARG; +} + + +int CyaSSL_GetHmacSize(CYASSL* ssl) +{ + /* AEAD ciphers don't have HMAC keys */ + if (ssl) + return (ssl->specs.cipher_type != aead) ? ssl->specs.hash_size : 0; + + return BAD_FUNC_ARG; +} + +#endif /* ATOMIC_USER */ + +#ifndef NO_CERTS + +CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void) +{ + CYASSL_CERT_MANAGER* cm = NULL; + + CYASSL_ENTER("CyaSSL_CertManagerNew"); + + cm = (CYASSL_CERT_MANAGER*) XMALLOC(sizeof(CYASSL_CERT_MANAGER), 0, + DYNAMIC_TYPE_CERT_MANAGER); + if (cm) { + XMEMSET(cm, 0, sizeof(CYASSL_CERT_MANAGER)); + + if (InitMutex(&cm->caLock) != 0) { + CYASSL_MSG("Bad mutex init"); + CyaSSL_CertManagerFree(cm); + return NULL; + } + } + + return cm; +} + + +void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("CyaSSL_CertManagerFree"); + + if (cm) { + #ifdef HAVE_CRL + if (cm->crl) + FreeCRL(cm->crl, 1); + #endif + #ifdef HAVE_OCSP + if (cm->ocsp) + FreeOCSP(cm->ocsp, 1); + #endif + FreeSignerTable(cm->caTable, CA_TABLE_SIZE, NULL); + FreeMutex(&cm->caLock); + XFREE(cm, NULL, DYNAMIC_TYPE_CERT_MANAGER); + } + +} + + +/* Unload the CA signer list */ +int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("CyaSSL_CertManagerUnloadCAs"); + + if (cm == NULL) + return BAD_FUNC_ARG; + + if (LockMutex(&cm->caLock) != 0) + return BAD_MUTEX_E; + + FreeSignerTable(cm->caTable, CA_TABLE_SIZE, NULL); + + UnLockMutex(&cm->caLock); + + + return SSL_SUCCESS; +} + + +/* Return bytes written to buff or < 0 for error */ +int CyaSSL_CertPemToDer(const unsigned char* pem, int pemSz, + unsigned char* buff, int buffSz, + int type) +{ + EncryptedInfo info; + int eccKey = 0; + int ret; + buffer der; + + CYASSL_ENTER("CyaSSL_CertPemToDer"); + + if (pem == NULL || buff == NULL || buffSz <= 0) { + CYASSL_MSG("Bad pem der args"); + return BAD_FUNC_ARG; + } + + if (type != CERT_TYPE && type != CA_TYPE && type != CERTREQ_TYPE) { + CYASSL_MSG("Bad cert type"); + return BAD_FUNC_ARG; + } + + info.set = 0; + info.ctx = NULL; + info.consumed = 0; + der.buffer = NULL; + + ret = PemToDer(pem, pemSz, type, &der, NULL, &info, &eccKey); + if (ret < 0) { + CYASSL_MSG("Bad Pem To Der"); + } + else { + if (der.length <= (word32)buffSz) { + XMEMCPY(buff, der.buffer, der.length); + ret = der.length; + } + else { + CYASSL_MSG("Bad der length"); + ret = BAD_FUNC_ARG; + } + } + + XFREE(der.buffer, NULL, DYNAMIC_TYPE_KEY); + + return ret; +} + + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + +/* our KeyPemToDer password callback, password in userData */ +static INLINE int OurPasswordCb(char* passwd, int sz, int rw, void* userdata) +{ + (void)rw; + + if (userdata == NULL) + return 0; + + XSTRNCPY(passwd, (char*)userdata, sz); + return min((word32)sz, (word32)XSTRLEN((char*)userdata)); +} + +#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ + + +/* Return bytes written to buff or < 0 for error */ +int CyaSSL_KeyPemToDer(const unsigned char* pem, int pemSz, unsigned char* buff, + int buffSz, const char* pass) +{ + EncryptedInfo info; + int eccKey = 0; + int ret; + buffer der; + + (void)pass; + + CYASSL_ENTER("CyaSSL_KeyPemToDer"); + + if (pem == NULL || buff == NULL || buffSz <= 0) { + CYASSL_MSG("Bad pem der args"); + return BAD_FUNC_ARG; + } + + info.set = 0; + info.ctx = NULL; + info.consumed = 0; + der.buffer = NULL; + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + if (pass) { + info.ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + if (info.ctx == NULL) + return MEMORY_E; + CyaSSL_CTX_set_default_passwd_cb(info.ctx, OurPasswordCb); + CyaSSL_CTX_set_default_passwd_cb_userdata(info.ctx, (void*)pass); + } +#endif + + ret = PemToDer(pem, pemSz, PRIVATEKEY_TYPE, &der, NULL, &info, &eccKey); + if (ret < 0) { + CYASSL_MSG("Bad Pem To Der"); + } + else { + if (der.length <= (word32)buffSz) { + XMEMCPY(buff, der.buffer, der.length); + ret = der.length; + } + else { + CYASSL_MSG("Bad der length"); + ret = BAD_FUNC_ARG; + } + } + + XFREE(der.buffer, NULL, DYNAMIC_TYPE_KEY); + + if (info.ctx) + CyaSSL_CTX_free(info.ctx); + + return ret; +} + + +#endif /* !NO_CERTS */ + + + +#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) + +void CyaSSL_ERR_print_errors_fp(FILE* fp, int err) +{ + char data[CYASSL_MAX_ERROR_SZ + 1]; + + CYASSL_ENTER("CyaSSL_ERR_print_errors_fp"); + SetErrorString(err, data); + fprintf(fp, "%s", data); +} + +#endif + + +int CyaSSL_pending(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_pending"); + return ssl->buffers.clearOutputBuffer.length; +} + + +#ifndef CYASSL_LEANPSK +/* trun on handshake group messages for context */ +int CyaSSL_CTX_set_group_messages(CYASSL_CTX* ctx) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + ctx->groupMessages = 1; + + return SSL_SUCCESS; +} +#endif + + +#ifndef NO_CYASSL_CLIENT +/* connect enough to get peer cert chain */ +int CyaSSL_connect_cert(CYASSL* ssl) +{ + int ret; + + if (ssl == NULL) + return SSL_FAILURE; + + ssl->options.certOnly = 1; + ret = CyaSSL_connect(ssl); + ssl->options.certOnly = 0; + + return ret; +} +#endif + + +#ifndef CYASSL_LEANPSK +/* trun on handshake group messages for ssl object */ +int CyaSSL_set_group_messages(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + ssl->options.groupMessages = 1; + + return SSL_SUCCESS; +} + + +int CyaSSL_SetVersion(CYASSL* ssl, int version) +{ + byte haveRSA = 1; + byte havePSK = 0; + + CYASSL_ENTER("CyaSSL_SetVersion"); + + if (ssl == NULL) { + CYASSL_MSG("Bad function argument"); + return BAD_FUNC_ARG; + } + + switch (version) { +#ifndef NO_OLD_TLS + case CYASSL_SSLV3: + ssl->version = MakeSSLv3(); + break; +#endif + +#ifndef NO_TLS + #ifndef NO_OLD_TLS + case CYASSL_TLSV1: + ssl->version = MakeTLSv1(); + break; + + case CYASSL_TLSV1_1: + ssl->version = MakeTLSv1_1(); + break; + #endif + case CYASSL_TLSV1_2: + ssl->version = MakeTLSv1_2(); + break; +#endif + + default: + CYASSL_MSG("Bad function argument"); + return BAD_FUNC_ARG; + } + + #ifdef NO_RSA + haveRSA = 0; + #endif + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, ssl->options.haveDH, + ssl->options.haveNTRU, ssl->options.haveECDSAsig, + ssl->options.haveStaticECC, ssl->options.side); + + return SSL_SUCCESS; +} +#endif /* !leanpsk */ + + +#if !defined(NO_CERTS) || !defined(NO_SESSION_CACHE) + +/* Make a work from the front of random hash */ +static INLINE word32 MakeWordFromHash(const byte* hashID) +{ + return (hashID[0] << 24) | (hashID[1] << 16) | (hashID[2] << 8) | + hashID[3]; +} + +#endif /* !NO_CERTS || !NO_SESSION_CACHE */ + + +#ifndef NO_CERTS + +/* hash is the SHA digest of name, just use first 32 bits as hash */ +static INLINE word32 HashSigner(const byte* hash) +{ + return MakeWordFromHash(hash) % CA_TABLE_SIZE; +} + + +/* does CA already exist on signer list */ +int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash) +{ + Signer* signers; + int ret = 0; + word32 row = HashSigner(hash); + + if (LockMutex(&cm->caLock) != 0) + return ret; + signers = cm->caTable[row]; + while (signers) { + byte* subjectHash; + #ifndef NO_SKID + subjectHash = signers->subjectKeyIdHash; + #else + subjectHash = signers->subjectNameHash; + #endif + if (XMEMCMP(hash, subjectHash, SHA_DIGEST_SIZE) == 0) { + ret = 1; + break; + } + signers = signers->next; + } + UnLockMutex(&cm->caLock); + + return ret; +} + + +/* return CA if found, otherwise NULL */ +Signer* GetCA(void* vp, byte* hash) +{ + CYASSL_CERT_MANAGER* cm = (CYASSL_CERT_MANAGER*)vp; + Signer* ret = NULL; + Signer* signers; + word32 row = HashSigner(hash); + + if (cm == NULL) + return NULL; + + if (LockMutex(&cm->caLock) != 0) + return ret; + + signers = cm->caTable[row]; + while (signers) { + byte* subjectHash; + #ifndef NO_SKID + subjectHash = signers->subjectKeyIdHash; + #else + subjectHash = signers->subjectNameHash; + #endif + if (XMEMCMP(hash, subjectHash, SHA_DIGEST_SIZE) == 0) { + ret = signers; + break; + } + signers = signers->next; + } + UnLockMutex(&cm->caLock); + + return ret; +} + + +#ifndef NO_SKID +/* return CA if found, otherwise NULL. Walk through hash table. */ +Signer* GetCAByName(void* vp, byte* hash) +{ + CYASSL_CERT_MANAGER* cm = (CYASSL_CERT_MANAGER*)vp; + Signer* ret = NULL; + Signer* signers; + word32 row; + + if (cm == NULL) + return NULL; + + if (LockMutex(&cm->caLock) != 0) + return ret; + + for (row = 0; row < CA_TABLE_SIZE && ret == NULL; row++) { + signers = cm->caTable[row]; + while (signers && ret == NULL) { + if (XMEMCMP(hash, signers->subjectNameHash, SHA_DIGEST_SIZE) == 0) { + ret = signers; + } + signers = signers->next; + } + } + UnLockMutex(&cm->caLock); + + return ret; +} +#endif + + +/* owns der, internal now uses too */ +/* type flag ids from user or from chain received during verify + don't allow chain ones to be added w/o isCA extension */ +int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify) +{ + int ret; + DecodedCert cert; + Signer* signer = 0; + word32 row; + byte* subjectHash; + + CYASSL_MSG("Adding a CA"); + InitDecodedCert(&cert, der.buffer, der.length, cm->heap); + ret = ParseCert(&cert, CA_TYPE, verify, cm); + CYASSL_MSG(" Parsed new CA"); + + #ifndef NO_SKID + subjectHash = cert.extSubjKeyId; + #else + subjectHash = cert.subjectHash; + #endif + + if (ret == 0 && cert.isCA == 0 && type != CYASSL_USER_CA) { + CYASSL_MSG(" Can't add as CA if not actually one"); + ret = NOT_CA_ERROR; + } + #ifndef ALLOW_INVALID_CERTSIGN + else if (ret == 0 && cert.isCA == 1 && type != CYASSL_USER_CA && + (cert.extKeyUsage & KEYUSE_KEY_CERT_SIGN) == 0) { + /* Intermediate CA certs are required to have the keyCertSign + * extension set. User loaded root certs are not. */ + CYASSL_MSG(" Doesn't have key usage certificate signing"); + ret = NOT_CA_ERROR; + } + #endif + else if (ret == 0 && AlreadySigner(cm, subjectHash)) { + CYASSL_MSG(" Already have this CA, not adding again"); + (void)ret; + } + else if (ret == 0) { + /* take over signer parts */ + signer = MakeSigner(cm->heap); + if (!signer) + ret = MEMORY_ERROR; + else { + signer->keyOID = cert.keyOID; + signer->publicKey = cert.publicKey; + signer->pubKeySize = cert.pubKeySize; + signer->nameLen = cert.subjectCNLen; + signer->name = cert.subjectCN; + #ifndef IGNORE_NAME_CONSTRAINTS + signer->permittedNames = cert.permittedNames; + signer->excludedNames = cert.excludedNames; + #endif + #ifndef NO_SKID + XMEMCPY(signer->subjectKeyIdHash, + cert.extSubjKeyId, SHA_DIGEST_SIZE); + #endif + XMEMCPY(signer->subjectNameHash, cert.subjectHash, SHA_DIGEST_SIZE); + signer->keyUsage = cert.extKeyUsageSet ? cert.extKeyUsage : 0xFFFF; + /* If Key Usage not set, all uses valid. */ + signer->next = NULL; /* in case lock fails */ + + cert.publicKey = 0; /* don't free here */ + cert.subjectCN = 0; + #ifndef IGNORE_NAME_CONSTRAINTS + cert.permittedNames = NULL; + cert.excludedNames = NULL; + #endif + + #ifndef NO_SKID + row = HashSigner(signer->subjectKeyIdHash); + #else + row = HashSigner(signer->subjectNameHash); + #endif + + if (LockMutex(&cm->caLock) == 0) { + signer->next = cm->caTable[row]; + cm->caTable[row] = signer; /* takes ownership */ + UnLockMutex(&cm->caLock); + if (cm->caCacheCallback) + cm->caCacheCallback(der.buffer, (int)der.length, type); + } + else { + CYASSL_MSG(" CA Mutex Lock failed"); + ret = BAD_MUTEX_E; + FreeSigner(signer, cm->heap); + } + } + } + + CYASSL_MSG(" Freeing Parsed CA"); + FreeDecodedCert(&cert); + CYASSL_MSG(" Freeing der CA"); + XFREE(der.buffer, cm->heap, DYNAMIC_TYPE_CA); + CYASSL_MSG(" OK Freeing der CA"); + + CYASSL_LEAVE("AddCA", ret); + if (ret == 0) return SSL_SUCCESS; + return ret; +} + +#endif /* !NO_CERTS */ + + +#ifndef NO_SESSION_CACHE + + /* basic config gives a cache with 33 sessions, adequate for clients and + embedded servers + + MEDIUM_SESSION_CACHE allows 1055 sessions, adequate for servers that + aren't under heavy load, basically allows 200 new sessions per minute + + BIG_SESSION_CACHE yields 20,027 sessions + + HUGE_SESSION_CACHE yields 65,791 sessions, for servers under heavy load, + allows over 13,000 new sessions per minute or over 200 new sessions per + second + + SMALL_SESSION_CACHE only stores 6 sessions, good for embedded clients + or systems where the default of nearly 3kB is too much RAM, this define + uses less than 500 bytes RAM + + default SESSION_CACHE stores 33 sessions (no XXX_SESSION_CACHE defined) + */ + #ifdef HUGE_SESSION_CACHE + #define SESSIONS_PER_ROW 11 + #define SESSION_ROWS 5981 + #elif defined(BIG_SESSION_CACHE) + #define SESSIONS_PER_ROW 7 + #define SESSION_ROWS 2861 + #elif defined(MEDIUM_SESSION_CACHE) + #define SESSIONS_PER_ROW 5 + #define SESSION_ROWS 211 + #elif defined(SMALL_SESSION_CACHE) + #define SESSIONS_PER_ROW 2 + #define SESSION_ROWS 3 + #else + #define SESSIONS_PER_ROW 3 + #define SESSION_ROWS 11 + #endif + + typedef struct SessionRow { + int nextIdx; /* where to place next one */ + int totalCount; /* sessions ever on this row */ + CYASSL_SESSION Sessions[SESSIONS_PER_ROW]; + } SessionRow; + + static SessionRow SessionCache[SESSION_ROWS]; + + static CyaSSL_Mutex session_mutex; /* SessionCache mutex */ + + #ifndef NO_CLIENT_CACHE + + typedef struct ClientSession { + word16 serverRow; /* SessionCache Row id */ + word16 serverIdx; /* SessionCache Idx (column) */ + } ClientSession; + + typedef struct ClientRow { + int nextIdx; /* where to place next one */ + int totalCount; /* sessions ever on this row */ + ClientSession Clients[SESSIONS_PER_ROW]; + } ClientRow; + + static ClientRow ClientCache[SESSION_ROWS]; /* Client Cache */ + /* uses session mutex */ + #endif /* NO_CLIENT_CACHE */ + +#endif /* NO_SESSION_CACHE */ + + +int CyaSSL_Init(void) +{ + int ret = SSL_SUCCESS; + + CYASSL_ENTER("CyaSSL_Init"); + + if (initRefCount == 0) { +#ifndef NO_SESSION_CACHE + if (InitMutex(&session_mutex) != 0) + ret = BAD_MUTEX_E; +#endif + if (InitMutex(&count_mutex) != 0) + ret = BAD_MUTEX_E; + } + if (ret == SSL_SUCCESS) { + if (LockMutex(&count_mutex) != 0) { + CYASSL_MSG("Bad Lock Mutex count"); + return BAD_MUTEX_E; + } + initRefCount++; + UnLockMutex(&count_mutex); + } + + return ret; +} + + +#ifndef NO_CERTS + + /* Remove PEM header/footer, convert to ASN1, store any encrypted data + info->consumed tracks of PEM bytes consumed in case multiple parts */ + int PemToDer(const unsigned char* buff, long longSz, int type, + buffer* der, void* heap, EncryptedInfo* info, int* eccKey) + { + char header[PEM_LINE_LEN]; + char footer[PEM_LINE_LEN]; + char* headerEnd; + char* footerEnd; + char* consumedEnd; + char* bufferEnd = (char*)(buff + longSz); + long neededSz; + int ret = 0; + int pkcs8 = 0; + int pkcs8Enc = 0; + int dynamicType = 0; + int sz = (int)longSz; + + (void)heap; + (void)dynamicType; + + if (type == CERT_TYPE || type == CA_TYPE) { + XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header)); + XSTRNCPY(footer, "-----END CERTIFICATE-----", sizeof(footer)); + dynamicType = (type == CA_TYPE) ? DYNAMIC_TYPE_CA : + DYNAMIC_TYPE_CERT; + } else if (type == CERTREQ_TYPE) { + XSTRNCPY(header, "-----BEGIN CERTIFICATE REQUEST-----", + sizeof(header)); + XSTRNCPY(footer, "-----END CERTIFICATE REQUEST-----", + sizeof(footer)); + dynamicType = DYNAMIC_TYPE_KEY; + } else if (type == DH_PARAM_TYPE) { + XSTRNCPY(header, "-----BEGIN DH PARAMETERS-----", sizeof(header)); + XSTRNCPY(footer, "-----END DH PARAMETERS-----", sizeof(footer)); + dynamicType = DYNAMIC_TYPE_KEY; + } else if (type == CRL_TYPE) { + XSTRNCPY(header, "-----BEGIN X509 CRL-----", sizeof(header)); + XSTRNCPY(footer, "-----END X509 CRL-----", sizeof(footer)); + dynamicType = DYNAMIC_TYPE_CRL; + } else { + XSTRNCPY(header, "-----BEGIN RSA PRIVATE KEY-----", sizeof(header)); + XSTRNCPY(footer, "-----END RSA PRIVATE KEY-----", sizeof(footer)); + dynamicType = DYNAMIC_TYPE_KEY; + } + + /* find header */ + headerEnd = XSTRNSTR((char*)buff, header, sz); + if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be pkcs8 */ + XSTRNCPY(header, "-----BEGIN PRIVATE KEY-----", sizeof(header)); + XSTRNCPY(footer, "-----END PRIVATE KEY-----", sizeof(footer)); + + headerEnd = XSTRNSTR((char*)buff, header, sz); + if (headerEnd) + pkcs8 = 1; + else { + XSTRNCPY(header, "-----BEGIN ENCRYPTED PRIVATE KEY-----", + sizeof(header)); + XSTRNCPY(footer, "-----END ENCRYPTED PRIVATE KEY-----", + sizeof(footer)); + + headerEnd = XSTRNSTR((char*)buff, header, sz); + if (headerEnd) { + pkcs8Enc = 1; + (void)pkcs8Enc; /* only opensslextra will read */ + } + } + } + if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be ecc */ + XSTRNCPY(header, "-----BEGIN EC PRIVATE KEY-----", sizeof(header)); + XSTRNCPY(footer, "-----END EC PRIVATE KEY-----", sizeof(footer)); + + headerEnd = XSTRNSTR((char*)buff, header, sz); + if (headerEnd) + *eccKey = 1; + } + if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be dsa */ + XSTRNCPY(header, "-----BEGIN DSA PRIVATE KEY-----", sizeof(header)); + XSTRNCPY(footer, "-----END DSA PRIVATE KEY-----", sizeof(footer)); + + headerEnd = XSTRNSTR((char*)buff, header, sz); + } + if (!headerEnd) { + CYASSL_MSG("Couldn't find PEM header"); + return SSL_NO_PEM_HEADER; + } + headerEnd += XSTRLEN(header); + + /* eat end of line */ + if (headerEnd[0] == '\n') + headerEnd++; + else if (headerEnd[1] == '\n') + headerEnd += 2; + else + return SSL_BAD_FILE; + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + { + /* remove encrypted header if there */ + char encHeader[] = "Proc-Type"; + char* line = XSTRNSTR((char*)buff, encHeader, PEM_LINE_LEN); + if (line) { + char* newline; + char* finish; + char* start = XSTRNSTR(line, "DES", PEM_LINE_LEN); + + if (!start) + start = XSTRNSTR(line, "AES", PEM_LINE_LEN); + + if (!start) return SSL_BAD_FILE; + if (!info) return SSL_BAD_FILE; + + finish = XSTRNSTR(start, ",", PEM_LINE_LEN); + + if (start && finish && (start < finish)) { + newline = XSTRNSTR(finish, "\r", PEM_LINE_LEN); + + XMEMCPY(info->name, start, finish - start); + info->name[finish - start] = 0; + XMEMCPY(info->iv, finish + 1, sizeof(info->iv)); + + if (!newline) newline = XSTRNSTR(finish, "\n", PEM_LINE_LEN); + if (newline && (newline > finish)) { + info->ivSz = (word32)(newline - (finish + 1)); + info->set = 1; + } + else + return SSL_BAD_FILE; + } + else + return SSL_BAD_FILE; + + /* eat blank line */ + while (*newline == '\r' || *newline == '\n') + newline++; + headerEnd = newline; + } + } +#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ + + /* find footer */ + footerEnd = XSTRNSTR((char*)buff, footer, sz); + if (!footerEnd) return SSL_BAD_FILE; + + consumedEnd = footerEnd + XSTRLEN(footer); + + if (consumedEnd < bufferEnd) { /* handle no end of line on last line */ + /* eat end of line */ + if (consumedEnd[0] == '\n') + consumedEnd++; + else if (consumedEnd[1] == '\n') + consumedEnd += 2; + else + return SSL_BAD_FILE; + } + + if (info) + info->consumed = (long)(consumedEnd - (char*)buff); + + /* set up der buffer */ + neededSz = (long)(footerEnd - headerEnd); + if (neededSz > sz || neededSz < 0) return SSL_BAD_FILE; + der->buffer = (byte*) XMALLOC(neededSz, heap, dynamicType); + if (!der->buffer) return MEMORY_ERROR; + der->length = (word32)neededSz; + + if (Base64_Decode((byte*)headerEnd, (word32)neededSz, der->buffer, + &der->length) < 0) + return SSL_BAD_FILE; + + if (pkcs8) { + /* convert and adjust length */ + if ( (ret = ToTraditional(der->buffer, der->length)) < 0 ) { + return ret; + } else { + der->length = ret; + return 0; + } + } + +#if (defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)) && !defined(NO_PWDBASED) + if (pkcs8Enc) { + int passwordSz; + char password[80]; + + if (!info || !info->ctx || !info->ctx->passwd_cb) + return SSL_BAD_FILE; /* no callback error */ + passwordSz = info->ctx->passwd_cb(password, sizeof(password), 0, + info->ctx->userdata); + /* convert and adjust length */ + if ( (ret = ToTraditionalEnc(der->buffer, der->length, password, + passwordSz)) < 0 ) { + return ret; + } else { + der->length = ret; + return 0; + } + } +#endif + + return 0; + } + + + /* process the buffer buff, legnth sz, into ctx of format and type + used tracks bytes consumed, userChain specifies a user cert chain + to pass during the handshake */ + static int ProcessBuffer(CYASSL_CTX* ctx, const unsigned char* buff, + long sz, int format, int type, CYASSL* ssl, + long* used, int userChain) + { + EncryptedInfo info; + buffer der; /* holds DER or RAW (for NTRU) */ + int ret; + int dynamicType = 0; + int eccKey = 0; + int rsaKey = 0; + void* heap = ctx ? ctx->heap : NULL; + + info.set = 0; + info.ctx = ctx; + info.consumed = 0; + der.buffer = 0; + + (void)dynamicType; + (void)rsaKey; + + if (used) + *used = sz; /* used bytes default to sz, PEM chain may shorten*/ + + if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM + && format != SSL_FILETYPE_RAW) + return SSL_BAD_FILETYPE; + + if (type == CA_TYPE) + dynamicType = DYNAMIC_TYPE_CA; + else if (type == CERT_TYPE) + dynamicType = DYNAMIC_TYPE_CERT; + else + dynamicType = DYNAMIC_TYPE_KEY; + + if (format == SSL_FILETYPE_PEM) { + ret = PemToDer(buff, sz, type, &der, heap, &info, &eccKey); + if (ret < 0) { + XFREE(der.buffer, heap, dynamicType); + return ret; + } + if (used) + *used = info.consumed; + /* we may have a user cert chain, try to consume */ + if (userChain && type == CERT_TYPE && info.consumed < sz) { + byte staticBuffer[FILE_BUFFER_SIZE]; /* tmp chain buffer */ + byte* chainBuffer = staticBuffer; + int dynamicBuffer = 0; + word32 bufferSz = sizeof(staticBuffer); + long consumed = info.consumed; + word32 idx = 0; + int gotOne = 0; + + if ( (sz - consumed) > (int)bufferSz) { + CYASSL_MSG("Growing Tmp Chain Buffer"); + bufferSz = (word32)(sz - consumed); + /* will shrink to actual size */ + chainBuffer = (byte*)XMALLOC(bufferSz, heap, + DYNAMIC_TYPE_FILE); + if (chainBuffer == NULL) { + XFREE(der.buffer, heap, dynamicType); + return MEMORY_E; + } + dynamicBuffer = 1; + } + + CYASSL_MSG("Processing Cert Chain"); + while (consumed < sz) { + buffer part; + info.consumed = 0; + part.buffer = 0; + + ret = PemToDer(buff + consumed, sz - consumed, type, &part, + heap, &info, &eccKey); + if (ret == 0) { + gotOne = 1; + if ( (idx + part.length) > bufferSz) { + CYASSL_MSG(" Cert Chain bigger than buffer"); + ret = BUFFER_E; + } + else { + c32to24(part.length, &chainBuffer[idx]); + idx += CERT_HEADER_SZ; + XMEMCPY(&chainBuffer[idx], part.buffer,part.length); + idx += part.length; + consumed += info.consumed; + if (used) + *used += info.consumed; + } + } + + XFREE(part.buffer, heap, dynamicType); + + if (ret == SSL_NO_PEM_HEADER && gotOne) { + CYASSL_MSG("We got one good PEM so stuff at end ok"); + break; + } + + if (ret < 0) { + CYASSL_MSG(" Error in Cert in Chain"); + XFREE(der.buffer, heap, dynamicType); + return ret; + } + CYASSL_MSG(" Consumed another Cert in Chain"); + } + CYASSL_MSG("Finished Processing Cert Chain"); + + if (ctx == NULL) { + CYASSL_MSG("certChain needs context"); + return BAD_FUNC_ARG; + } + ctx->certChain.buffer = (byte*)XMALLOC(idx, heap, + dynamicType); + if (ctx->certChain.buffer) { + ctx->certChain.length = idx; + XMEMCPY(ctx->certChain.buffer, chainBuffer, idx); + } + if (dynamicBuffer) + XFREE(chainBuffer, heap, DYNAMIC_TYPE_FILE); + if (ctx->certChain.buffer == NULL) { + XFREE(der.buffer, heap, dynamicType); + return MEMORY_E; + } + } + } + else { /* ASN1 (DER) or RAW (NTRU) */ + der.buffer = (byte*) XMALLOC(sz, heap, dynamicType); + if (!der.buffer) return MEMORY_ERROR; + XMEMCPY(der.buffer, buff, sz); + der.length = (word32)sz; + } + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + if (info.set) { + /* decrypt */ + char password[80]; + int passwordSz; + + byte key[AES_256_KEY_SIZE]; + byte iv[AES_IV_SIZE]; + + if (!ctx || !ctx->passwd_cb) { + XFREE(der.buffer, heap, dynamicType); + return NO_PASSWORD; + } + + /* use file's salt for key derivation, hex decode first */ + if (Base16_Decode(info.iv, info.ivSz, info.iv, &info.ivSz) != 0) { + XFREE(der.buffer, heap, dynamicType); + return ASN_INPUT_E; + } + + passwordSz = ctx->passwd_cb(password, sizeof(password), 0, + ctx->userdata); + if ( (ret = EVP_BytesToKey(info.name, "MD5", info.iv, + (byte*)password, passwordSz, 1, key, iv)) <= 0) { + XFREE(der.buffer, heap, dynamicType); + return ret; + } + + if (XSTRNCMP(info.name, "DES-CBC", 7) == 0) { + Des enc; + + ret = Des_SetKey(&enc, key, info.iv, DES_DECRYPTION); + if (ret != 0) + return ret; + + Des_CbcDecrypt(&enc, der.buffer, der.buffer, der.length); + } + else if (XSTRNCMP(info.name, "DES-EDE3-CBC", 13) == 0) { + Des3 enc; + + ret = Des3_SetKey(&enc, key, info.iv, DES_DECRYPTION); + if (ret != 0) + return ret; + + ret = Des3_CbcDecrypt(&enc, der.buffer, der.buffer, der.length); + if (ret != 0) + return ret; + } + else if (XSTRNCMP(info.name, "AES-128-CBC", 13) == 0) { + Aes enc; + ret = AesSetKey(&enc, key, AES_128_KEY_SIZE, info.iv, + AES_DECRYPTION); + if (ret == 0) + ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); + } + else if (XSTRNCMP(info.name, "AES-192-CBC", 13) == 0) { + Aes enc; + ret = AesSetKey(&enc, key, AES_192_KEY_SIZE, info.iv, + AES_DECRYPTION); + if (ret == 0) + ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); + } + else if (XSTRNCMP(info.name, "AES-256-CBC", 13) == 0) { + Aes enc; + ret = AesSetKey(&enc, key, AES_256_KEY_SIZE, info.iv, + AES_DECRYPTION); + if (ret == 0) + ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); + } + else { + XFREE(der.buffer, heap, dynamicType); + return SSL_BAD_FILE; + } + + if (ret != 0) { + XFREE(der.buffer, heap, dynamicType); + return ret; + } + } +#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ + + if (type == CA_TYPE) { + if (ctx == NULL) { + CYASSL_MSG("Need context for CA load"); + XFREE(der.buffer, heap, dynamicType); + return BAD_FUNC_ARG; + } + return AddCA(ctx->cm, der, CYASSL_USER_CA, ctx->verifyPeer); + /* takes der over */ + } + else if (type == CERT_TYPE) { + if (ssl) { + if (ssl->buffers.weOwnCert && ssl->buffers.certificate.buffer) + XFREE(ssl->buffers.certificate.buffer, heap, + dynamicType); + ssl->buffers.certificate = der; + ssl->buffers.weOwnCert = 1; + } + else if (ctx) { + if (ctx->certificate.buffer) + XFREE(ctx->certificate.buffer, heap, dynamicType); + ctx->certificate = der; /* takes der over */ + } + } + else if (type == PRIVATEKEY_TYPE) { + if (ssl) { + if (ssl->buffers.weOwnKey && ssl->buffers.key.buffer) + XFREE(ssl->buffers.key.buffer, heap, dynamicType); + ssl->buffers.key = der; + ssl->buffers.weOwnKey = 1; + } + else if (ctx) { + if (ctx->privateKey.buffer) + XFREE(ctx->privateKey.buffer, heap, dynamicType); + ctx->privateKey = der; /* takes der over */ + } + } + else { + XFREE(der.buffer, heap, dynamicType); + return SSL_BAD_CERTTYPE; + } + + if (type == PRIVATEKEY_TYPE && format != SSL_FILETYPE_RAW) { +#ifndef NO_RSA + if (!eccKey) { + /* make sure RSA key can be used */ + RsaKey key; + word32 idx = 0; + + ret = InitRsaKey(&key, 0); + if (ret != 0) return ret; + if (RsaPrivateKeyDecode(der.buffer,&idx,&key,der.length) != 0) { +#ifdef HAVE_ECC + /* could have DER ECC (or pkcs8 ecc), no easy way to tell */ + eccKey = 1; /* so try it out */ +#endif + if (!eccKey) { + FreeRsaKey(&key); + return SSL_BAD_FILE; + } + } else { + rsaKey = 1; + (void)rsaKey; /* for no ecc builds */ + } + FreeRsaKey(&key); + } +#endif +#ifdef HAVE_ECC + if (!rsaKey) { + /* make sure ECC key can be used */ + word32 idx = 0; + ecc_key key; + + ecc_init(&key); + if (EccPrivateKeyDecode(der.buffer,&idx,&key,der.length) != 0) { + ecc_free(&key); + return SSL_BAD_FILE; + } + ecc_free(&key); + eccKey = 1; + if (ctx) + ctx->haveStaticECC = 1; + if (ssl) + ssl->options.haveStaticECC = 1; + } +#endif /* HAVE_ECC */ + } + else if (type == CERT_TYPE) { + DecodedCert cert; + + CYASSL_MSG("Checking cert signature type"); + InitDecodedCert(&cert, der.buffer, der.length, heap); + + if (DecodeToKey(&cert, 0) < 0) { + CYASSL_MSG("Decode to key failed"); + return SSL_BAD_FILE; + } + switch (cert.signatureOID) { + case CTC_SHAwECDSA: + case CTC_SHA256wECDSA: + case CTC_SHA384wECDSA: + case CTC_SHA512wECDSA: + CYASSL_MSG("ECDSA cert signature"); + if (ctx) + ctx->haveECDSAsig = 1; + if (ssl) + ssl->options.haveECDSAsig = 1; + break; + default: + CYASSL_MSG("Not ECDSA cert signature"); + break; + } + +#ifdef HAVE_ECC + if (ctx) + ctx->pkCurveOID = cert.pkCurveOID; + if (ssl) + ssl->pkCurveOID = cert.pkCurveOID; +#endif + + FreeDecodedCert(&cert); + } + + return SSL_SUCCESS; + } + + + + +/* CA PEM file for verification, may have multiple/chain certs to process */ +static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff, + long sz, int format, int type, CYASSL* ssl) +{ + long used = 0; + int ret = 0; + int gotOne = 0; + + CYASSL_MSG("Processing CA PEM file"); + while (used < sz) { + long consumed = 0; + + ret = ProcessBuffer(ctx, buff + used, sz - used, format, type, ssl, + &consumed, 0); + + if (ret == SSL_NO_PEM_HEADER && gotOne) { + CYASSL_MSG("We got one good PEM file so stuff at end ok"); + ret = SSL_SUCCESS; + break; + } + + if (ret < 0) + break; + + CYASSL_MSG(" Processed a CA"); + gotOne = 1; + used += consumed; + } + + return ret; +} + + +/* Verify the ceritficate, SSL_SUCCESS for ok, < 0 for error */ +int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, const byte* buff, + long sz, int format) +{ + int ret = 0; + int eccKey = 0; /* not used */ + + DecodedCert cert; + buffer der; + + CYASSL_ENTER("CyaSSL_CertManagerVerifyBuffer"); + + der.buffer = NULL; + der.length = 0; + + if (format == SSL_FILETYPE_PEM) { + EncryptedInfo info; + + info.set = 0; + info.ctx = NULL; + info.consumed = 0; + ret = PemToDer(buff, sz, CERT_TYPE, &der, cm->heap, &info, &eccKey); + InitDecodedCert(&cert, der.buffer, der.length, cm->heap); + } + else + InitDecodedCert(&cert, (byte*)buff, (word32)sz, cm->heap); + + if (ret == 0) + ret = ParseCertRelative(&cert, CERT_TYPE, 1, cm); +#ifdef HAVE_CRL + if (ret == 0 && cm->crlEnabled) + ret = CheckCertCRL(cm->crl, &cert); +#endif + + FreeDecodedCert(&cert); + XFREE(der.buffer, cm->heap, DYNAMIC_TYPE_CERT); + + if (ret == 0) + return SSL_SUCCESS; + return ret; +} + + +#ifndef NO_FILESYSTEM + + #if defined(CYASSL_MDK_ARM) + extern FILE * CyaSSL_fopen(const char *name, const char *mode) ; + #define XFOPEN CyaSSL_fopen + #else + #define XFOPEN fopen + #endif + +/* process a file with name fname into ctx of format and type + userChain specifies a user certificate chain to pass during handshake */ +int ProcessFile(CYASSL_CTX* ctx, const char* fname, int format, int type, + CYASSL* ssl, int userChain, CYASSL_CRL* crl) +{ + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* myBuffer = staticBuffer; + int dynamic = 0; + int ret; + long sz = 0; + XFILE file; + void* heapHint = ctx ? ctx->heap : NULL; + + (void)crl; + (void)heapHint; + + if (fname == NULL) return SSL_BAD_FILE; + + file = XFOPEN(fname, "rb"); + if (file == XBADFILE) return SSL_BAD_FILE; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + if (sz > (long)sizeof(staticBuffer)) { + CYASSL_MSG("Getting dynamic buffer"); + myBuffer = (byte*)XMALLOC(sz, heapHint, DYNAMIC_TYPE_FILE); + if (myBuffer == NULL) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + dynamic = 1; + } + else if (sz < 0) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + + if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) + ret = SSL_BAD_FILE; + else { + if (type == CA_TYPE && format == SSL_FILETYPE_PEM) + ret = ProcessChainBuffer(ctx, myBuffer, sz, format, type, ssl); +#ifdef HAVE_CRL + else if (type == CRL_TYPE) + ret = BufferLoadCRL(crl, myBuffer, sz, format); +#endif + else + ret = ProcessBuffer(ctx, myBuffer, sz, format, type, ssl, NULL, + userChain); + } + + XFCLOSE(file); + if (dynamic) XFREE(myBuffer, heapHint, DYNAMIC_TYPE_FILE); + + return ret; +} + + +/* loads file then loads each file in path, no c_rehash */ +int CyaSSL_CTX_load_verify_locations(CYASSL_CTX* ctx, const char* file, + const char* path) +{ + int ret = SSL_SUCCESS; + + CYASSL_ENTER("CyaSSL_CTX_load_verify_locations"); + (void)path; + + if (ctx == NULL || (file == NULL && path == NULL) ) + return SSL_FAILURE; + + if (file) + ret = ProcessFile(ctx, file, SSL_FILETYPE_PEM, CA_TYPE, NULL, 0, NULL); + + if (ret == SSL_SUCCESS && path) { + /* try to load each regular file in path */ + #ifdef USE_WINDOWS_API + WIN32_FIND_DATAA FindFileData; + HANDLE hFind; + char name[MAX_FILENAME_SZ]; + + XMEMSET(name, 0, sizeof(name)); + XSTRNCPY(name, path, MAX_FILENAME_SZ - 4); + XSTRNCAT(name, "\\*", 3); + + hFind = FindFirstFileA(name, &FindFileData); + if (hFind == INVALID_HANDLE_VALUE) { + CYASSL_MSG("FindFirstFile for path verify locations failed"); + return BAD_PATH_ERROR; + } + + do { + if (FindFileData.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY) { + XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 3); + XSTRNCAT(name, "\\", 2); + XSTRNCAT(name, FindFileData.cFileName, MAX_FILENAME_SZ/2); + + ret = ProcessFile(ctx, name, SSL_FILETYPE_PEM, CA_TYPE, NULL,0, + NULL); + } + } while (ret == SSL_SUCCESS && FindNextFileA(hFind, &FindFileData)); + + FindClose(hFind); + #elif !defined(NO_CYASSL_DIR) + struct dirent* entry; + DIR* dir = opendir(path); + + if (dir == NULL) { + CYASSL_MSG("opendir path verify locations failed"); + return BAD_PATH_ERROR; + } + while ( ret == SSL_SUCCESS && (entry = readdir(dir)) != NULL) { + char name[MAX_FILENAME_SZ]; + struct stat s; + + XMEMSET(name, 0, sizeof(name)); + XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 2); + XSTRNCAT(name, "/", 1); + XSTRNCAT(name, entry->d_name, MAX_FILENAME_SZ/2); + + if (stat(name, &s) != 0) { + CYASSL_MSG("stat on name failed"); + closedir(dir); + return BAD_PATH_ERROR; + } + if (s.st_mode & S_IFREG) { + ret = ProcessFile(ctx, name, SSL_FILETYPE_PEM, CA_TYPE, NULL,0, + NULL); + } + } + closedir(dir); + #endif + } + + return ret; +} + + +/* Verify the ceritficate, SSL_SUCCESS for ok, < 0 for error */ +int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER* cm, const char* fname, + int format) +{ + int ret = SSL_FATAL_ERROR; + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* myBuffer = staticBuffer; + int dynamic = 0; + long sz = 0; + XFILE file = XFOPEN(fname, "rb"); + + CYASSL_ENTER("CyaSSL_CertManagerVerify"); + + if (file == XBADFILE) return SSL_BAD_FILE; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + if (sz > MAX_CYASSL_FILE_SIZE || sz < 0) { + CYASSL_MSG("CertManagerVerify file bad size"); + XFCLOSE(file); + return SSL_BAD_FILE; + } + + if (sz > (long)sizeof(staticBuffer)) { + CYASSL_MSG("Getting dynamic buffer"); + myBuffer = (byte*) XMALLOC(sz, cm->heap, DYNAMIC_TYPE_FILE); + if (myBuffer == NULL) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + dynamic = 1; + } + + if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) + ret = SSL_BAD_FILE; + else + ret = CyaSSL_CertManagerVerifyBuffer(cm, myBuffer, sz, format); + + XFCLOSE(file); + if (dynamic) XFREE(myBuffer, cm->heap, DYNAMIC_TYPE_FILE); + + return ret; +} + + +static INLINE CYASSL_METHOD* cm_pick_method(void) +{ + #ifndef NO_CYASSL_CLIENT + #ifdef NO_OLD_TLS + return CyaTLSv1_2_client_method(); + #else + return CyaSSLv3_client_method(); + #endif + #elif !defined(NO_CYASSL_SERVER) + #ifdef NO_OLD_TLS + return CyaTLSv1_2_server_method(); + #else + return CyaSSLv3_server_method(); + #endif + #else + return NULL; + #endif +} + + +/* like load verify locations, 1 for success, < 0 for error */ +int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER* cm, const char* file, + const char* path) +{ + int ret = SSL_FATAL_ERROR; + CYASSL_CTX* tmp; + + CYASSL_ENTER("CyaSSL_CertManagerLoadCA"); + + if (cm == NULL) { + CYASSL_MSG("No CertManager error"); + return ret; + } + tmp = CyaSSL_CTX_new(cm_pick_method()); + + if (tmp == NULL) { + CYASSL_MSG("CTX new failed"); + return ret; + } + + /* for tmp use */ + CyaSSL_CertManagerFree(tmp->cm); + tmp->cm = cm; + + ret = CyaSSL_CTX_load_verify_locations(tmp, file, path); + + /* don't loose our good one */ + tmp->cm = NULL; + CyaSSL_CTX_free(tmp); + + return ret; +} + + + +/* turn on CRL if off and compiled in, set options */ +int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER* cm, int options) +{ + int ret = SSL_SUCCESS; + + (void)options; + + CYASSL_ENTER("CyaSSL_CertManagerEnableCRL"); + if (cm == NULL) + return BAD_FUNC_ARG; + + #ifdef HAVE_CRL + if (cm->crl == NULL) { + cm->crl = (CYASSL_CRL*)XMALLOC(sizeof(CYASSL_CRL), cm->heap, + DYNAMIC_TYPE_CRL); + if (cm->crl == NULL) + return MEMORY_E; + + if (InitCRL(cm->crl, cm) != 0) { + CYASSL_MSG("Init CRL failed"); + FreeCRL(cm->crl, 1); + cm->crl = NULL; + return SSL_FAILURE; + } + } + cm->crlEnabled = 1; + if (options & CYASSL_CRL_CHECKALL) + cm->crlCheckAll = 1; + #else + ret = NOT_COMPILED_IN; + #endif + + return ret; +} + + +int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("CyaSSL_CertManagerDisableCRL"); + if (cm == NULL) + return BAD_FUNC_ARG; + + cm->crlEnabled = 0; + + return SSL_SUCCESS; +} + + +/* turn on OCSP if off and compiled in, set options */ +int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER* cm, int options) +{ + int ret = SSL_SUCCESS; + + (void)options; + + CYASSL_ENTER("CyaSSL_CertManagerEnableOCSP"); + if (cm == NULL) + return BAD_FUNC_ARG; + + #ifdef HAVE_OCSP + if (cm->ocsp == NULL) { + cm->ocsp = (CYASSL_OCSP*)XMALLOC(sizeof(CYASSL_OCSP), cm->heap, + DYNAMIC_TYPE_OCSP); + if (cm->ocsp == NULL) + return MEMORY_E; + + if (InitOCSP(cm->ocsp, cm) != 0) { + CYASSL_MSG("Init OCSP failed"); + FreeOCSP(cm->ocsp, 1); + cm->ocsp = NULL; + return SSL_FAILURE; + } + } + cm->ocspEnabled = 1; + if (options & CYASSL_OCSP_URL_OVERRIDE) + cm->ocspUseOverrideURL = 1; + if (options & CYASSL_OCSP_NO_NONCE) + cm->ocspSendNonce = 0; + else + cm->ocspSendNonce = 1; + #ifndef CYASSL_USER_IO + cm->ocspIOCb = EmbedOcspLookup; + cm->ocspRespFreeCb = EmbedOcspRespFree; + #endif /* CYASSL_USER_IO */ + #else + ret = NOT_COMPILED_IN; + #endif + + return ret; +} + + +int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER* cm) +{ + CYASSL_ENTER("CyaSSL_CertManagerDisableOCSP"); + if (cm == NULL) + return BAD_FUNC_ARG; + + cm->ocspEnabled = 0; + + return SSL_SUCCESS; +} + + +int CyaSSL_CTX_check_private_key(CYASSL_CTX* ctx) +{ + /* TODO: check private against public for RSA match */ + (void)ctx; + CYASSL_ENTER("SSL_CTX_check_private_key"); + return SSL_SUCCESS; +} + + +#ifdef HAVE_CRL + + +/* check CRL if enabled, SSL_SUCCESS */ +int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER* cm, byte* der, int sz) +{ + int ret; + DecodedCert cert; + + CYASSL_ENTER("CyaSSL_CertManagerCheckCRL"); + + if (cm == NULL) + return BAD_FUNC_ARG; + + if (cm->crlEnabled == 0) + return SSL_SUCCESS; + + InitDecodedCert(&cert, der, sz, NULL); + + ret = ParseCertRelative(&cert, CERT_TYPE, NO_VERIFY, cm); + if (ret != 0) { + CYASSL_MSG("ParseCert failed"); + return ret; + } + else { + ret = CheckCertCRL(cm->crl, &cert); + if (ret != 0) { + CYASSL_MSG("CheckCertCRL failed"); + } + } + + FreeDecodedCert(&cert); + + if (ret == 0) + return SSL_SUCCESS; /* convert */ + + return ret; +} + + +int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER* cm, CbMissingCRL cb) +{ + CYASSL_ENTER("CyaSSL_CertManagerSetCRL_Cb"); + if (cm == NULL) + return BAD_FUNC_ARG; + + cm->cbMissingCRL = cb; + + return SSL_SUCCESS; +} + + +int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER* cm, const char* path, + int type, int monitor) +{ + CYASSL_ENTER("CyaSSL_CertManagerLoadCRL"); + if (cm == NULL) + return BAD_FUNC_ARG; + + if (cm->crl == NULL) { + if (CyaSSL_CertManagerEnableCRL(cm, 0) != SSL_SUCCESS) { + CYASSL_MSG("Enable CRL failed"); + return SSL_FATAL_ERROR; + } + } + + return LoadCRL(cm->crl, path, type, monitor); +} + + +int CyaSSL_EnableCRL(CYASSL* ssl, int options) +{ + CYASSL_ENTER("CyaSSL_EnableCRL"); + if (ssl) + return CyaSSL_CertManagerEnableCRL(ssl->ctx->cm, options); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_DisableCRL(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_DisableCRL"); + if (ssl) + return CyaSSL_CertManagerDisableCRL(ssl->ctx->cm); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_LoadCRL(CYASSL* ssl, const char* path, int type, int monitor) +{ + CYASSL_ENTER("CyaSSL_LoadCRL"); + if (ssl) + return CyaSSL_CertManagerLoadCRL(ssl->ctx->cm, path, type, monitor); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_SetCRL_Cb(CYASSL* ssl, CbMissingCRL cb) +{ + CYASSL_ENTER("CyaSSL_SetCRL_Cb"); + if (ssl) + return CyaSSL_CertManagerSetCRL_Cb(ssl->ctx->cm, cb); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options) +{ + CYASSL_ENTER("CyaSSL_CTX_EnableCRL"); + if (ctx) + return CyaSSL_CertManagerEnableCRL(ctx->cm, options); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx) +{ + CYASSL_ENTER("CyaSSL_CTX_DisableCRL"); + if (ctx) + return CyaSSL_CertManagerDisableCRL(ctx->cm); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_LoadCRL(CYASSL_CTX* ctx, const char* path, int type, int monitor) +{ + CYASSL_ENTER("CyaSSL_CTX_LoadCRL"); + if (ctx) + return CyaSSL_CertManagerLoadCRL(ctx->cm, path, type, monitor); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX* ctx, CbMissingCRL cb) +{ + CYASSL_ENTER("CyaSSL_CTX_SetCRL_Cb"); + if (ctx) + return CyaSSL_CertManagerSetCRL_Cb(ctx->cm, cb); + else + return BAD_FUNC_ARG; +} + + +#endif /* HAVE_CRL */ + + +#ifdef HAVE_OCSP + + +/* check CRL if enabled, SSL_SUCCESS */ +int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER* cm, byte* der, int sz) +{ + int ret; + DecodedCert cert; + + CYASSL_ENTER("CyaSSL_CertManagerCheckOCSP"); + + if (cm == NULL) + return BAD_FUNC_ARG; + + if (cm->ocspEnabled == 0) + return SSL_SUCCESS; + + InitDecodedCert(&cert, der, sz, NULL); + + ret = ParseCertRelative(&cert, CERT_TYPE, NO_VERIFY, cm); + if (ret != 0) { + CYASSL_MSG("ParseCert failed"); + return ret; + } + else { + ret = CheckCertOCSP(cm->ocsp, &cert); + if (ret != 0) { + CYASSL_MSG("CheckCertOCSP failed"); + } + } + + FreeDecodedCert(&cert); + + if (ret == 0) + return SSL_SUCCESS; /* convert */ + + return ret; +} + + +int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER* cm, + const char* url) +{ + CYASSL_ENTER("CyaSSL_CertManagerSetOCSPOverrideURL"); + if (cm == NULL) + return BAD_FUNC_ARG; + + XFREE(cm->ocspOverrideURL, cm->heap, 0); + if (url != NULL) { + int urlSz = (int)XSTRLEN(url) + 1; + cm->ocspOverrideURL = (char*)XMALLOC(urlSz, cm->heap, 0); + if (cm->ocspOverrideURL != NULL) { + XMEMCPY(cm->ocspOverrideURL, url, urlSz); + } + else + return MEMORY_E; + } + else + cm->ocspOverrideURL = NULL; + + return SSL_SUCCESS; +} + + +int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER* cm, + CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) +{ + CYASSL_ENTER("CyaSSL_CertManagerSetOCSP_Cb"); + if (cm == NULL) + return BAD_FUNC_ARG; + + cm->ocspIOCb = ioCb; + cm->ocspRespFreeCb = respFreeCb; + cm->ocspIOCtx = ioCbCtx; + + return SSL_SUCCESS; +} + + +int CyaSSL_EnableOCSP(CYASSL* ssl, int options) +{ + CYASSL_ENTER("CyaSSL_EnableOCSP"); + if (ssl) + return CyaSSL_CertManagerEnableOCSP(ssl->ctx->cm, options); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_DisableOCSP(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_DisableOCSP"); + if (ssl) + return CyaSSL_CertManagerDisableOCSP(ssl->ctx->cm); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_SetOCSP_OverrideURL(CYASSL* ssl, const char* url) +{ + CYASSL_ENTER("CyaSSL_SetOCSP_OverrideURL"); + if (ssl) + return CyaSSL_CertManagerSetOCSPOverrideURL(ssl->ctx->cm, url); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_SetOCSP_Cb(CYASSL* ssl, + CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) +{ + CYASSL_ENTER("CyaSSL_SetOCSP_Cb"); + if (ssl) + return CyaSSL_CertManagerSetOCSP_Cb(ssl->ctx->cm, + ioCb, respFreeCb, ioCbCtx); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_EnableOCSP(CYASSL_CTX* ctx, int options) +{ + CYASSL_ENTER("CyaSSL_CTX_EnableOCSP"); + if (ctx) + return CyaSSL_CertManagerEnableOCSP(ctx->cm, options); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_DisableOCSP(CYASSL_CTX* ctx) +{ + CYASSL_ENTER("CyaSSL_CTX_DisableOCSP"); + if (ctx) + return CyaSSL_CertManagerDisableOCSP(ctx->cm); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX* ctx, const char* url) +{ + CYASSL_ENTER("CyaSSL_SetOCSP_OverrideURL"); + if (ctx) + return CyaSSL_CertManagerSetOCSPOverrideURL(ctx->cm, url); + else + return BAD_FUNC_ARG; +} + + +int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX* ctx, + CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) +{ + CYASSL_ENTER("CyaSSL_CTX_SetOCSP_Cb"); + if (ctx) + return CyaSSL_CertManagerSetOCSP_Cb(ctx->cm, ioCb, respFreeCb, ioCbCtx); + else + return BAD_FUNC_ARG; +} + + +#endif /* HAVE_OCSP */ + + +#ifdef CYASSL_DER_LOAD + +/* Add format parameter to allow DER load of CA files */ +int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX* ctx, const char* file, + int format) +{ + CYASSL_ENTER("CyaSSL_CTX_der_load_verify_locations"); + if (ctx == NULL || file == NULL) + return SSL_FAILURE; + + if (ProcessFile(ctx, file, format, CA_TYPE, NULL, 0, NULL) == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + +#endif /* CYASSL_DER_LOAD */ + + +#ifdef CYASSL_CERT_GEN + +/* load pem cert from file into der buffer, return der size or error */ +int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) +{ + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* fileBuf = staticBuffer; + int dynamic = 0; + int ret; + int ecc = 0; + long sz = 0; + XFILE file = XFOPEN(fileName, "rb"); + EncryptedInfo info; + buffer converted; + + CYASSL_ENTER("CyaSSL_PemCertToDer"); + converted.buffer = 0; + + if (file == XBADFILE) return SSL_BAD_FILE; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + if (sz > (long)sizeof(staticBuffer)) { + fileBuf = (byte*) XMALLOC(sz, 0, DYNAMIC_TYPE_FILE); + if (fileBuf == NULL) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + dynamic = 1; + } + else if (sz < 0) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + + if ( (ret = (int)XFREAD(fileBuf, sz, 1, file)) < 0) + ret = SSL_BAD_FILE; + else + ret = PemToDer(fileBuf, sz, CA_TYPE, &converted, 0, &info, &ecc); + + if (ret == 0) { + if (converted.length < (word32)derSz) { + XMEMCPY(derBuf, converted.buffer, converted.length); + ret = converted.length; + } + else + ret = BUFFER_E; + } + + XFREE(converted.buffer, 0, DYNAMIC_TYPE_CA); + if (dynamic) + XFREE(fileBuf, 0, DYNAMIC_TYPE_FILE); + XFCLOSE(file); + + return ret; +} + +#endif /* CYASSL_CERT_GEN */ + + +int CyaSSL_CTX_use_certificate_file(CYASSL_CTX* ctx, const char* file, + int format) +{ + CYASSL_ENTER("CyaSSL_CTX_use_certificate_file"); + if (ProcessFile(ctx, file, format, CERT_TYPE, NULL, 0, NULL) == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX* ctx, const char* file,int format) +{ + CYASSL_ENTER("CyaSSL_CTX_use_PrivateKey_file"); + if (ProcessFile(ctx, file, format, PRIVATEKEY_TYPE, NULL, 0, NULL) + == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX* ctx, const char* file) +{ + /* procces up to MAX_CHAIN_DEPTH plus subject cert */ + CYASSL_ENTER("CyaSSL_CTX_use_certificate_chain_file"); + if (ProcessFile(ctx, file, SSL_FILETYPE_PEM,CERT_TYPE,NULL,1, NULL) + == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +#ifdef OPENSSL_EXTRA +/* put SSL type in extra for now, not very common */ + +int CyaSSL_use_certificate_file(CYASSL* ssl, const char* file, int format) +{ + CYASSL_ENTER("CyaSSL_use_certificate_file"); + if (ProcessFile(ssl->ctx, file, format, CERT_TYPE, ssl, 0, NULL) + == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +int CyaSSL_use_PrivateKey_file(CYASSL* ssl, const char* file, int format) +{ + CYASSL_ENTER("CyaSSL_use_PrivateKey_file"); + if (ProcessFile(ssl->ctx, file, format, PRIVATEKEY_TYPE, ssl, 0, NULL) + == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +int CyaSSL_use_certificate_chain_file(CYASSL* ssl, const char* file) +{ + /* procces up to MAX_CHAIN_DEPTH plus subject cert */ + CYASSL_ENTER("CyaSSL_use_certificate_chain_file"); + if (ProcessFile(ssl->ctx, file, SSL_FILETYPE_PEM, CERT_TYPE, ssl, 1, NULL) + == SSL_SUCCESS) + return SSL_SUCCESS; + + return SSL_FAILURE; +} + + +/* server wrapper for ctx or ssl Diffie-Hellman parameters */ +static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl, + const unsigned char* buf, long sz, int format) +{ + buffer der; + int ret; + int weOwnDer = 0; + byte p[MAX_DH_SIZE]; + byte g[MAX_DH_SIZE]; + word32 pSz = sizeof(p); + word32 gSz = sizeof(g); + + der.buffer = (byte*)buf; + der.length = (word32)sz; + + if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) + return SSL_BAD_FILETYPE; + + if (format == SSL_FILETYPE_PEM) { + der.buffer = NULL; + ret = PemToDer(buf, sz, DH_PARAM_TYPE, &der, ctx->heap, NULL,NULL); + if (ret < 0) { + XFREE(der.buffer, ctx->heap, DYNAMIC_TYPE_KEY); + return ret; + } + weOwnDer = 1; + } + + if (DhParamsLoad(der.buffer, der.length, p, &pSz, g, &gSz) < 0) + ret = SSL_BAD_FILETYPE; + else { + if (ssl) + ret = CyaSSL_SetTmpDH(ssl, p, pSz, g, gSz); + else + ret = CyaSSL_CTX_SetTmpDH(ctx, p, pSz, g, gSz); + } + + if (weOwnDer) + XFREE(der.buffer, ctx->heap, DYNAMIC_TYPE_KEY); + + return ret; +} + +/* server Diffie-Hellman parameters, SSL_SUCCESS on ok */ +int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, const unsigned char* buf, long sz, + int format) +{ + return CyaSSL_SetTmpDH_buffer_wrapper(ssl->ctx, ssl, buf, sz, format); +} + + +/* server ctx Diffie-Hellman parameters, SSL_SUCCESS on ok */ +int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, const unsigned char* buf, + long sz, int format) +{ + return CyaSSL_SetTmpDH_buffer_wrapper(ctx, NULL, buf, sz, format); +} + + +#ifdef HAVE_ECC + +/* Set Temp CTX EC-DHE size in octets, should be 20 - 66 for 160 - 521 bit */ +int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX* ctx, word16 sz) +{ + if (ctx == NULL || sz < ECC_MINSIZE || sz > ECC_MAXSIZE) + return BAD_FUNC_ARG; + + ctx->eccTempKeySz = sz; + + return SSL_SUCCESS; +} + + +/* Set Temp SSL EC-DHE size in octets, should be 20 - 66 for 160 - 521 bit */ +int CyaSSL_SetTmpEC_DHE_Sz(CYASSL* ssl, word16 sz) +{ + if (ssl == NULL || sz < ECC_MINSIZE || sz > ECC_MAXSIZE) + return BAD_FUNC_ARG; + + ssl->eccTempKeySz = sz; + + return SSL_SUCCESS; +} + +#endif /* HAVE_ECC */ + + +#if !defined(NO_FILESYSTEM) + +/* server Diffie-Hellman parameters */ +static int CyaSSL_SetTmpDH_file_wrapper(CYASSL_CTX* ctx, CYASSL* ssl, + const char* fname, int format) +{ + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* myBuffer = staticBuffer; + int dynamic = 0; + int ret; + long sz = 0; + XFILE file = XFOPEN(fname, "rb"); + + if (file == XBADFILE) return SSL_BAD_FILE; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + if (sz > (long)sizeof(staticBuffer)) { + CYASSL_MSG("Getting dynamic buffer"); + myBuffer = (byte*) XMALLOC(sz, ctx->heap, DYNAMIC_TYPE_FILE); + if (myBuffer == NULL) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + dynamic = 1; + } + else if (sz < 0) { + XFCLOSE(file); + return SSL_BAD_FILE; + } + + if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) + ret = SSL_BAD_FILE; + else { + if (ssl) + ret = CyaSSL_SetTmpDH_buffer(ssl, myBuffer, sz, format); + else + ret = CyaSSL_CTX_SetTmpDH_buffer(ctx, myBuffer, sz, format); + } + + XFCLOSE(file); + if (dynamic) XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE); + + return ret; +} + +/* server Diffie-Hellman parameters */ +int CyaSSL_SetTmpDH_file(CYASSL* ssl, const char* fname, int format) +{ + return CyaSSL_SetTmpDH_file_wrapper(ssl->ctx, ssl, fname, format); +} + + +/* server Diffie-Hellman parameters */ +int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX* ctx, const char* fname, int format) +{ + return CyaSSL_SetTmpDH_file_wrapper(ctx, NULL, fname, format); +} + + +#endif /* !NO_FILESYSTEM */ +#endif /* OPENSSL_EXTRA */ + +#ifdef HAVE_NTRU + +int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX* ctx, const char* file) +{ + CYASSL_ENTER("CyaSSL_CTX_use_NTRUPrivateKey_file"); + if (ctx == NULL) + return SSL_FAILURE; + + if (ProcessFile(ctx, file, SSL_FILETYPE_RAW, PRIVATEKEY_TYPE, NULL, 0, NULL) + == SSL_SUCCESS) { + ctx->haveNTRU = 1; + return SSL_SUCCESS; + } + + return SSL_FAILURE; +} + +#endif /* HAVE_NTRU */ + + + +#if defined(OPENSSL_EXTRA) + + int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX* ctx,const char* file, + int format) + { + CYASSL_ENTER("SSL_CTX_use_RSAPrivateKey_file"); + + return CyaSSL_CTX_use_PrivateKey_file(ctx, file, format); + } + + int CyaSSL_use_RSAPrivateKey_file(CYASSL* ssl, const char* file, int format) + { + CYASSL_ENTER("CyaSSL_use_RSAPrivateKey_file"); + + return CyaSSL_use_PrivateKey_file(ssl, file, format); + } + +#endif /* OPENSSL_EXTRA */ + +#endif /* NO_FILESYSTEM */ + + +void CyaSSL_CTX_set_verify(CYASSL_CTX* ctx, int mode, VerifyCallback vc) +{ + CYASSL_ENTER("CyaSSL_CTX_set_verify"); + if (mode & SSL_VERIFY_PEER) { + ctx->verifyPeer = 1; + ctx->verifyNone = 0; /* in case perviously set */ + } + + if (mode == SSL_VERIFY_NONE) { + ctx->verifyNone = 1; + ctx->verifyPeer = 0; /* in case previously set */ + } + + if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) + ctx->failNoCert = 1; + + ctx->verifyCallback = vc; +} + + +void CyaSSL_set_verify(CYASSL* ssl, int mode, VerifyCallback vc) +{ + CYASSL_ENTER("CyaSSL_set_verify"); + if (mode & SSL_VERIFY_PEER) { + ssl->options.verifyPeer = 1; + ssl->options.verifyNone = 0; /* in case perviously set */ + } + + if (mode == SSL_VERIFY_NONE) { + ssl->options.verifyNone = 1; + ssl->options.verifyPeer = 0; /* in case previously set */ + } + + if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) + ssl->options.failNoCert = 1; + + ssl->verifyCallback = vc; +} + + +/* store user ctx for verify callback */ +void CyaSSL_SetCertCbCtx(CYASSL* ssl, void* ctx) +{ + CYASSL_ENTER("CyaSSL_SetCertCbCtx"); + if (ssl) + ssl->verifyCbCtx = ctx; +} + + +/* store context CA Cache addition callback */ +void CyaSSL_CTX_SetCACb(CYASSL_CTX* ctx, CallbackCACache cb) +{ + if (ctx && ctx->cm) + ctx->cm->caCacheCallback = cb; +} + + +#if defined(PERSIST_CERT_CACHE) + +#if !defined(NO_FILESYSTEM) + +/* Persist cert cache to file */ +int CyaSSL_CTX_save_cert_cache(CYASSL_CTX* ctx, const char* fname) +{ + CYASSL_ENTER("CyaSSL_CTX_save_cert_cache"); + + if (ctx == NULL || fname == NULL) + return BAD_FUNC_ARG; + + return CM_SaveCertCache(ctx->cm, fname); +} + + +/* Persist cert cache from file */ +int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX* ctx, const char* fname) +{ + CYASSL_ENTER("CyaSSL_CTX_restore_cert_cache"); + + if (ctx == NULL || fname == NULL) + return BAD_FUNC_ARG; + + return CM_RestoreCertCache(ctx->cm, fname); +} + +#endif /* NO_FILESYSTEM */ + +/* Persist cert cache to memory */ +int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX* ctx, void* mem, int sz, int* used) +{ + CYASSL_ENTER("CyaSSL_CTX_memsave_cert_cache"); + + if (ctx == NULL || mem == NULL || used == NULL || sz <= 0) + return BAD_FUNC_ARG; + + return CM_MemSaveCertCache(ctx->cm, mem, sz, used); +} + + +/* Restore cert cache from memory */ +int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX* ctx, const void* mem, int sz) +{ + CYASSL_ENTER("CyaSSL_CTX_memrestore_cert_cache"); + + if (ctx == NULL || mem == NULL || sz <= 0) + return BAD_FUNC_ARG; + + return CM_MemRestoreCertCache(ctx->cm, mem, sz); +} + + +/* get how big the the cert cache save buffer needs to be */ +int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX* ctx) +{ + CYASSL_ENTER("CyaSSL_CTX_get_cert_cache_memsize"); + + if (ctx == NULL) + return BAD_FUNC_ARG; + + return CM_GetCertCacheMemSize(ctx->cm); +} + +#endif /* PERSISTE_CERT_CACHE */ +#endif /* !NO_CERTS */ + + +#ifndef NO_SESSION_CACHE + +CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl) +{ + CYASSL_ENTER("SSL_get_session"); + if (ssl) + return GetSession(ssl, 0); + + return NULL; +} + + +int CyaSSL_set_session(CYASSL* ssl, CYASSL_SESSION* session) +{ + CYASSL_ENTER("SSL_set_session"); + if (session) + return SetSession(ssl, session); + + return SSL_FAILURE; +} + + +#ifndef NO_CLIENT_CACHE + +/* Associate client session with serverID, find existing or store for saving + if newSession flag on, don't reuse existing session + SSL_SUCCESS on ok */ +int CyaSSL_SetServerID(CYASSL* ssl, const byte* id, int len, int newSession) +{ + CYASSL_SESSION* session = NULL; + + CYASSL_ENTER("CyaSSL_SetServerID"); + + if (ssl == NULL || id == NULL || len <= 0) + return BAD_FUNC_ARG; + + if (newSession == 0) { + session = GetSessionClient(ssl, id, len); + if (session) { + if (SetSession(ssl, session) != SSL_SUCCESS) { + CYASSL_MSG("SetSession failed"); + session = NULL; + } + } + } + + if (session == NULL) { + CYASSL_MSG("Valid ServerID not cached already"); + + ssl->session.idLen = (word16)min(SERVER_ID_LEN, (word32)len); + XMEMCPY(ssl->session.serverID, id, ssl->session.idLen); + } + + return SSL_SUCCESS; +} + +#endif /* NO_CLIENT_CACHE */ + +#if defined(PERSIST_SESSION_CACHE) + +/* for persistance, if changes to layout need to increment and modify + save_session_cache() and restore_session_cache and memory versions too */ +#define CYASSL_CACHE_VERSION 2 + +/* Session Cache Header information */ +typedef struct { + int version; /* cache layout version id */ + int rows; /* session rows */ + int columns; /* session columns */ + int sessionSz; /* sizeof CYASSL_SESSION */ +} cache_header_t; + +/* current persistence layout is: + + 1) cache_header_t + 2) SessionCache + 3) ClientCache + + update CYASSL_CACHE_VERSION if change layout for the following + PERSISTENT_SESSION_CACHE functions +*/ + + +/* get how big the the session cache save buffer needs to be */ +int CyaSSL_get_session_cache_memsize(void) +{ + int sz = (int)(sizeof(SessionCache) + sizeof(cache_header_t)); + + #ifndef NO_CLIENT_CACHE + sz += (int)(sizeof(ClientCache)); + #endif + + return sz; +} + + +/* Persist session cache to memory */ +int CyaSSL_memsave_session_cache(void* mem, int sz) +{ + int i; + cache_header_t cache_header; + SessionRow* row = (SessionRow*)((byte*)mem + sizeof(cache_header)); +#ifndef NO_CLIENT_CACHE + ClientRow* clRow; +#endif + + CYASSL_ENTER("CyaSSL_memsave_session_cache"); + + if (sz < CyaSSL_get_session_cache_memsize()) { + CYASSL_MSG("Memory buffer too small"); + return BUFFER_E; + } + + cache_header.version = CYASSL_CACHE_VERSION; + cache_header.rows = SESSION_ROWS; + cache_header.columns = SESSIONS_PER_ROW; + cache_header.sessionSz = (int)sizeof(CYASSL_SESSION); + XMEMCPY(mem, &cache_header, sizeof(cache_header)); + + if (LockMutex(&session_mutex) != 0) { + CYASSL_MSG("Session cache mutex lock failed"); + return BAD_MUTEX_E; + } + + for (i = 0; i < cache_header.rows; ++i) + XMEMCPY(row++, SessionCache + i, sizeof(SessionRow)); + +#ifndef NO_CLIENT_CACHE + clRow = (ClientRow*)row; + for (i = 0; i < cache_header.rows; ++i) + XMEMCPY(clRow++, ClientCache + i, sizeof(ClientRow)); +#endif + + UnLockMutex(&session_mutex); + + CYASSL_LEAVE("CyaSSL_memsave_session_cache", SSL_SUCCESS); + + return SSL_SUCCESS; +} + + +/* Restore the persistant session cache from memory */ +int CyaSSL_memrestore_session_cache(const void* mem, int sz) +{ + int i; + cache_header_t cache_header; + SessionRow* row = (SessionRow*)((byte*)mem + sizeof(cache_header)); +#ifndef NO_CLIENT_CACHE + ClientRow* clRow; +#endif + + CYASSL_ENTER("CyaSSL_memrestore_session_cache"); + + if (sz < CyaSSL_get_session_cache_memsize()) { + CYASSL_MSG("Memory buffer too small"); + return BUFFER_E; + } + + XMEMCPY(&cache_header, mem, sizeof(cache_header)); + if (cache_header.version != CYASSL_CACHE_VERSION || + cache_header.rows != SESSION_ROWS || + cache_header.columns != SESSIONS_PER_ROW || + cache_header.sessionSz != (int)sizeof(CYASSL_SESSION)) { + + CYASSL_MSG("Session cache header match failed"); + return CACHE_MATCH_ERROR; + } + + if (LockMutex(&session_mutex) != 0) { + CYASSL_MSG("Session cache mutex lock failed"); + return BAD_MUTEX_E; + } + + for (i = 0; i < cache_header.rows; ++i) + XMEMCPY(SessionCache + i, row++, sizeof(SessionRow)); + +#ifndef NO_CLIENT_CACHE + clRow = (ClientRow*)row; + for (i = 0; i < cache_header.rows; ++i) + XMEMCPY(ClientCache + i, clRow++, sizeof(ClientRow)); +#endif + + UnLockMutex(&session_mutex); + + CYASSL_LEAVE("CyaSSL_memrestore_session_cache", SSL_SUCCESS); + + return SSL_SUCCESS; +} + +#if !defined(NO_FILESYSTEM) + +/* Persist session cache to file */ +/* doesn't use memsave because of additional memory use */ +int CyaSSL_save_session_cache(const char *fname) +{ + XFILE file; + int ret; + int rc = SSL_SUCCESS; + int i; + cache_header_t cache_header; + + CYASSL_ENTER("CyaSSL_save_session_cache"); + + file = XFOPEN(fname, "w+b"); + if (file == XBADFILE) { + CYASSL_MSG("Couldn't open session cache save file"); + return SSL_BAD_FILE; + } + cache_header.version = CYASSL_CACHE_VERSION; + cache_header.rows = SESSION_ROWS; + cache_header.columns = SESSIONS_PER_ROW; + cache_header.sessionSz = (int)sizeof(CYASSL_SESSION); + + /* cache header */ + ret = (int)XFWRITE(&cache_header, sizeof cache_header, 1, file); + if (ret != 1) { + CYASSL_MSG("Session cache header file write failed"); + XFCLOSE(file); + return FWRITE_ERROR; + } + + if (LockMutex(&session_mutex) != 0) { + CYASSL_MSG("Session cache mutex lock failed"); + XFCLOSE(file); + return BAD_MUTEX_E; + } + + /* session cache */ + for (i = 0; i < cache_header.rows; ++i) { + ret = (int)XFWRITE(SessionCache + i, sizeof(SessionRow), 1, file); + if (ret != 1) { + CYASSL_MSG("Session cache member file write failed"); + rc = FWRITE_ERROR; + break; + } + } + +#ifndef NO_CLIENT_CACHE + /* client cache */ + for (i = 0; i < cache_header.rows; ++i) { + ret = (int)XFWRITE(ClientCache + i, sizeof(ClientRow), 1, file); + if (ret != 1) { + CYASSL_MSG("Client cache member file write failed"); + rc = FWRITE_ERROR; + break; + } + } +#endif /* NO_CLIENT_CACHE */ + + UnLockMutex(&session_mutex); + + XFCLOSE(file); + CYASSL_LEAVE("CyaSSL_save_session_cache", rc); + + return rc; +} + + +/* Restore the persistant session cache from file */ +/* doesn't use memstore because of additional memory use */ +int CyaSSL_restore_session_cache(const char *fname) +{ + XFILE file; + int rc = SSL_SUCCESS; + int ret; + int i; + cache_header_t cache_header; + + CYASSL_ENTER("CyaSSL_restore_session_cache"); + + file = XFOPEN(fname, "rb"); + if (file == XBADFILE) { + CYASSL_MSG("Couldn't open session cache save file"); + return SSL_BAD_FILE; + } + /* cache header */ + ret = (int)XFREAD(&cache_header, sizeof cache_header, 1, file); + if (ret != 1) { + CYASSL_MSG("Session cache header file read failed"); + XFCLOSE(file); + return FREAD_ERROR; + } + if (cache_header.version != CYASSL_CACHE_VERSION || + cache_header.rows != SESSION_ROWS || + cache_header.columns != SESSIONS_PER_ROW || + cache_header.sessionSz != (int)sizeof(CYASSL_SESSION)) { + + CYASSL_MSG("Session cache header match failed"); + XFCLOSE(file); + return CACHE_MATCH_ERROR; + } + + if (LockMutex(&session_mutex) != 0) { + CYASSL_MSG("Session cache mutex lock failed"); + XFCLOSE(file); + return BAD_MUTEX_E; + } + + /* session cache */ + for (i = 0; i < cache_header.rows; ++i) { + ret = (int)XFREAD(SessionCache + i, sizeof(SessionRow), 1, file); + if (ret != 1) { + CYASSL_MSG("Session cache member file read failed"); + XMEMSET(SessionCache, 0, sizeof SessionCache); + rc = FREAD_ERROR; + break; + } + } + +#ifndef NO_CLIENT_CACHE + /* client cache */ + for (i = 0; i < cache_header.rows; ++i) { + ret = (int)XFREAD(ClientCache + i, sizeof(ClientRow), 1, file); + if (ret != 1) { + CYASSL_MSG("Client cache member file read failed"); + XMEMSET(ClientCache, 0, sizeof ClientCache); + rc = FREAD_ERROR; + break; + } + } + +#endif /* NO_CLIENT_CACHE */ + + UnLockMutex(&session_mutex); + + XFCLOSE(file); + CYASSL_LEAVE("CyaSSL_restore_session_cache", rc); + + return rc; +} + +#endif /* !NO_FILESYSTEM */ +#endif /* PERSIST_SESSION_CACHE */ +#endif /* NO_SESSION_CACHE */ + + +void CyaSSL_load_error_strings(void) /* compatibility only */ +{} + + +int CyaSSL_library_init(void) +{ + CYASSL_ENTER("SSL_library_init"); + if (CyaSSL_Init() == SSL_SUCCESS) + return SSL_SUCCESS; + else + return SSL_FATAL_ERROR; +} + + +#ifndef NO_SESSION_CACHE + +/* on by default if built in but allow user to turn off */ +long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX* ctx, long mode) +{ + CYASSL_ENTER("SSL_CTX_set_session_cache_mode"); + if (mode == SSL_SESS_CACHE_OFF) + ctx->sessionCacheOff = 1; + + if (mode == SSL_SESS_CACHE_NO_AUTO_CLEAR) + ctx->sessionCacheFlushOff = 1; + + return SSL_SUCCESS; +} + +#endif /* NO_SESSION_CACHE */ + + +#if !defined(NO_CERTS) +#if defined(PERSIST_CERT_CACHE) + + +#define CYASSL_CACHE_CERT_VERSION 1 + +typedef struct { + int version; /* cache cert layout version id */ + int rows; /* hash table rows, CA_TABLE_SIZE */ + int columns[CA_TABLE_SIZE]; /* columns per row on list */ + int signerSz; /* sizeof Signer object */ +} CertCacheHeader; + +/* current cert persistance layout is: + + 1) CertCacheHeader + 2) caTable + + update CYASSL_CERT_CACHE_VERSION if change layout for the following + PERSIST_CERT_CACHE functions +*/ + + +/* Return memory needed to persist this signer, have lock */ +static INLINE int GetSignerMemory(Signer* signer) +{ + int sz = sizeof(signer->pubKeySize) + sizeof(signer->keyOID) + + sizeof(signer->nameLen) + sizeof(signer->subjectNameHash); + +#if !defined(NO_SKID) + sz += (int)sizeof(signer->subjectKeyIdHash); +#endif + + /* add dynamic bytes needed */ + sz += signer->pubKeySize; + sz += signer->nameLen; + + return sz; +} + + +/* Return memory needed to persist this row, have lock */ +static INLINE int GetCertCacheRowMemory(Signer* row) +{ + int sz = 0; + + while (row) { + sz += GetSignerMemory(row); + row = row->next; + } + + return sz; +} + + +/* get the size of persist cert cache, have lock */ +static INLINE int GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm) +{ + int sz; + int i; + + sz = sizeof(CertCacheHeader); + + for (i = 0; i < CA_TABLE_SIZE; i++) + sz += GetCertCacheRowMemory(cm->caTable[i]); + + return sz; +} + + +/* Store cert cache header columns with number of items per list, have lock */ +static INLINE void SetCertHeaderColumns(CYASSL_CERT_MANAGER* cm, int* columns) +{ + int i; + Signer* row; + + for (i = 0; i < CA_TABLE_SIZE; i++) { + int count = 0; + row = cm->caTable[i]; + + while (row) { + ++count; + row = row->next; + } + columns[i] = count; + } +} + + +/* Restore whole cert row from memory, have lock, return bytes consumed, + < 0 on error, have lock */ +static INLINE int RestoreCertRow(CYASSL_CERT_MANAGER* cm, byte* current, + int row, int listSz, const byte* end) +{ + int idx = 0; + + if (listSz < 0) { + CYASSL_MSG("Row header corrupted, negative value"); + return PARSE_ERROR; + } + + while (listSz) { + Signer* signer; + byte* start = current + idx; /* for end checks on this signer */ + int minSz = sizeof(signer->pubKeySize) + sizeof(signer->keyOID) + + sizeof(signer->nameLen) + sizeof(signer->subjectNameHash); + #ifndef NO_SKID + minSz += (int)sizeof(signer->subjectKeyIdHash); + #endif + + if (start + minSz > end) { + CYASSL_MSG("Would overread restore buffer"); + return BUFFER_E; + } + signer = MakeSigner(cm->heap); + if (signer == NULL) + return MEMORY_E; + + /* pubKeySize */ + XMEMCPY(&signer->pubKeySize, current + idx, sizeof(signer->pubKeySize)); + idx += (int)sizeof(signer->pubKeySize); + + /* keyOID */ + XMEMCPY(&signer->keyOID, current + idx, sizeof(signer->keyOID)); + idx += (int)sizeof(signer->keyOID); + + /* pulicKey */ + if (start + minSz + signer->pubKeySize > end) { + CYASSL_MSG("Would overread restore buffer"); + FreeSigner(signer, cm->heap); + return BUFFER_E; + } + signer->publicKey = (byte*)XMALLOC(signer->pubKeySize, cm->heap, + DYNAMIC_TYPE_KEY); + if (signer->publicKey == NULL) { + FreeSigner(signer, cm->heap); + return MEMORY_E; + } + + XMEMCPY(signer->publicKey, current + idx, signer->pubKeySize); + idx += signer->pubKeySize; + + /* nameLen */ + XMEMCPY(&signer->nameLen, current + idx, sizeof(signer->nameLen)); + idx += (int)sizeof(signer->nameLen); + + /* name */ + if (start + minSz + signer->pubKeySize + signer->nameLen > end) { + CYASSL_MSG("Would overread restore buffer"); + FreeSigner(signer, cm->heap); + return BUFFER_E; + } + signer->name = (char*)XMALLOC(signer->nameLen, cm->heap, + DYNAMIC_TYPE_SUBJECT_CN); + if (signer->name == NULL) { + FreeSigner(signer, cm->heap); + return MEMORY_E; + } + + XMEMCPY(signer->name, current + idx, signer->nameLen); + idx += signer->nameLen; + + /* subjectNameHash */ + XMEMCPY(signer->subjectNameHash, current + idx, SIGNER_DIGEST_SIZE); + idx += SIGNER_DIGEST_SIZE; + + #ifndef NO_SKID + /* subjectKeyIdHash */ + XMEMCPY(signer->subjectKeyIdHash, current + idx,SIGNER_DIGEST_SIZE); + idx += SIGNER_DIGEST_SIZE; + #endif + + signer->next = cm->caTable[row]; + cm->caTable[row] = signer; + + --listSz; + } + + return idx; +} + + +/* Store whole cert row into memory, have lock, return bytes added */ +static INLINE int StoreCertRow(CYASSL_CERT_MANAGER* cm, byte* current, int row) +{ + int added = 0; + Signer* list = cm->caTable[row]; + + while (list) { + XMEMCPY(current + added, &list->pubKeySize, sizeof(list->pubKeySize)); + added += (int)sizeof(list->pubKeySize); + + XMEMCPY(current + added, &list->keyOID, sizeof(list->keyOID)); + added += (int)sizeof(list->keyOID); + + XMEMCPY(current + added, list->publicKey, list->pubKeySize); + added += list->pubKeySize; + + XMEMCPY(current + added, &list->nameLen, sizeof(list->nameLen)); + added += (int)sizeof(list->nameLen); + + XMEMCPY(current + added, list->name, list->nameLen); + added += list->nameLen; + + XMEMCPY(current + added, list->subjectNameHash, SIGNER_DIGEST_SIZE); + added += SIGNER_DIGEST_SIZE; + + #ifndef NO_SKID + XMEMCPY(current + added, list->subjectKeyIdHash,SIGNER_DIGEST_SIZE); + added += SIGNER_DIGEST_SIZE; + #endif + + list = list->next; + } + + return added; +} + + +/* Persist cert cache to memory, have lock */ +static INLINE int DoMemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz) +{ + int realSz; + int ret = SSL_SUCCESS; + int i; + + CYASSL_ENTER("DoMemSaveCertCache"); + + realSz = GetCertCacheMemSize(cm); + if (realSz > sz) { + CYASSL_MSG("Mem output buffer too small"); + ret = BUFFER_E; + } + else { + byte* current; + CertCacheHeader hdr; + + hdr.version = CYASSL_CACHE_CERT_VERSION; + hdr.rows = CA_TABLE_SIZE; + SetCertHeaderColumns(cm, hdr.columns); + hdr.signerSz = (int)sizeof(Signer); + + XMEMCPY(mem, &hdr, sizeof(CertCacheHeader)); + current = (byte*)mem + sizeof(CertCacheHeader); + + for (i = 0; i < CA_TABLE_SIZE; ++i) + current += StoreCertRow(cm, current, i); + } + + return ret; +} + + +#if !defined(NO_FILESYSTEM) + +/* Persist cert cache to file */ +int CM_SaveCertCache(CYASSL_CERT_MANAGER* cm, const char* fname) +{ + XFILE file; + int rc = SSL_SUCCESS; + int memSz; + byte* mem; + + CYASSL_ENTER("CM_SaveCertCache"); + + file = XFOPEN(fname, "w+b"); + if (file == XBADFILE) { + CYASSL_MSG("Couldn't open cert cache save file"); + return SSL_BAD_FILE; + } + + if (LockMutex(&cm->caLock) != 0) { + CYASSL_MSG("LockMutex on caLock failed"); + XFCLOSE(file); + return BAD_MUTEX_E; + } + + memSz = GetCertCacheMemSize(cm); + mem = (byte*)XMALLOC(memSz, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); + if (mem == NULL) { + CYASSL_MSG("Alloc for tmp buffer failed"); + rc = MEMORY_E; + } else { + rc = DoMemSaveCertCache(cm, mem, memSz); + if (rc == SSL_SUCCESS) { + int ret = (int)XFWRITE(mem, memSz, 1, file); + if (ret != 1) { + CYASSL_MSG("Cert cache file write failed"); + rc = FWRITE_ERROR; + } + } + XFREE(mem, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); + } + + UnLockMutex(&cm->caLock); + XFCLOSE(file); + + return rc; +} + + +/* Restore cert cache from file */ +int CM_RestoreCertCache(CYASSL_CERT_MANAGER* cm, const char* fname) +{ + XFILE file; + int rc = SSL_SUCCESS; + int ret; + int memSz; + byte* mem; + + CYASSL_ENTER("CM_RestoreCertCache"); + + file = XFOPEN(fname, "rb"); + if (file == XBADFILE) { + CYASSL_MSG("Couldn't open cert cache save file"); + return SSL_BAD_FILE; + } + + XFSEEK(file, 0, XSEEK_END); + memSz = (int)XFTELL(file); + XREWIND(file); + + if (memSz <= 0) { + CYASSL_MSG("Bad file size"); + XFCLOSE(file); + return SSL_BAD_FILE; + } + + mem = (byte*)XMALLOC(memSz, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); + if (mem == NULL) { + CYASSL_MSG("Alloc for tmp buffer failed"); + XFCLOSE(file); + return MEMORY_E; + } + + ret = (int)XFREAD(mem, memSz, 1, file); + if (ret != 1) { + CYASSL_MSG("Cert file read error"); + rc = FREAD_ERROR; + } else { + rc = CM_MemRestoreCertCache(cm, mem, memSz); + if (rc != SSL_SUCCESS) { + CYASSL_MSG("Mem restore cert cache failed"); + } + } + + XFREE(mem, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); + XFCLOSE(file); + + return rc; +} + +#endif /* NO_FILESYSTEM */ + + +/* Persist cert cache to memory */ +int CM_MemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz, int* used) +{ + int ret = SSL_SUCCESS; + + CYASSL_ENTER("CM_MemSaveCertCache"); + + if (LockMutex(&cm->caLock) != 0) { + CYASSL_MSG("LockMutex on caLock failed"); + return BAD_MUTEX_E; + } + + ret = DoMemSaveCertCache(cm, mem, sz); + if (ret == SSL_SUCCESS) + *used = GetCertCacheMemSize(cm); + + UnLockMutex(&cm->caLock); + + return ret; +} + + +/* Restore cert cache from memory */ +int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER* cm, const void* mem, int sz) +{ + int ret = SSL_SUCCESS; + int i; + CertCacheHeader* hdr = (CertCacheHeader*)mem; + byte* current = (byte*)mem + sizeof(CertCacheHeader); + byte* end = (byte*)mem + sz; /* don't go over */ + + CYASSL_ENTER("CM_MemRestoreCertCache"); + + if (current > end) { + CYASSL_MSG("Cert Cache Memory buffer too small"); + return BUFFER_E; + } + + if (hdr->version != CYASSL_CACHE_CERT_VERSION || + hdr->rows != CA_TABLE_SIZE || + hdr->signerSz != (int)sizeof(Signer)) { + + CYASSL_MSG("Cert Cache Memory header mismatch"); + return CACHE_MATCH_ERROR; + } + + if (LockMutex(&cm->caLock) != 0) { + CYASSL_MSG("LockMutex on caLock failed"); + return BAD_MUTEX_E; + } + + FreeSignerTable(cm->caTable, CA_TABLE_SIZE, cm->heap); + + for (i = 0; i < CA_TABLE_SIZE; ++i) { + int added = RestoreCertRow(cm, current, i, hdr->columns[i], end); + if (added < 0) { + CYASSL_MSG("RestoreCertRow error"); + ret = added; + break; + } + current += added; + } + + UnLockMutex(&cm->caLock); + + return ret; +} + + +/* get how big the the cert cache save buffer needs to be */ +int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm) +{ + int sz; + + CYASSL_ENTER("CM_GetCertCacheMemSize"); + + if (LockMutex(&cm->caLock) != 0) { + CYASSL_MSG("LockMutex on caLock failed"); + return BAD_MUTEX_E; + } + + sz = GetCertCacheMemSize(cm); + + UnLockMutex(&cm->caLock); + + return sz; +} + +#endif /* PERSIST_CERT_CACHE */ +#endif /* NO_CERTS */ + + +int CyaSSL_CTX_set_cipher_list(CYASSL_CTX* ctx, const char* list) +{ + CYASSL_ENTER("CyaSSL_CTX_set_cipher_list"); + if (SetCipherList(&ctx->suites, list)) + return SSL_SUCCESS; + else + return SSL_FAILURE; +} + + +int CyaSSL_set_cipher_list(CYASSL* ssl, const char* list) +{ + CYASSL_ENTER("CyaSSL_set_cipher_list"); + if (SetCipherList(ssl->suites, list)) { + byte haveRSA = 1; + byte havePSK = 0; + + #ifdef NO_RSA + haveRSA = 0; + #endif + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + + return SSL_SUCCESS; + } + else + return SSL_FAILURE; +} + + +#ifndef CYASSL_LEANPSK +#ifdef CYASSL_DTLS + +int CyaSSL_dtls_get_current_timeout(CYASSL* ssl) +{ + (void)ssl; + + return ssl->dtls_timeout; +} + + +/* user may need to alter init dtls recv timeout, SSL_SUCCESS on ok */ +int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int timeout) +{ + if (ssl == NULL || timeout < 0) + return BAD_FUNC_ARG; + + if (timeout > ssl->dtls_timeout_max) { + CYASSL_MSG("Can't set dtls timeout init greater than dtls timeout max"); + return BAD_FUNC_ARG; + } + + ssl->dtls_timeout_init = timeout; + ssl->dtls_timeout = timeout; + + return SSL_SUCCESS; +} + + +/* user may need to alter max dtls recv timeout, SSL_SUCCESS on ok */ +int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int timeout) +{ + if (ssl == NULL || timeout < 0) + return BAD_FUNC_ARG; + + if (timeout < ssl->dtls_timeout_init) { + CYASSL_MSG("Can't set dtls timeout max less than dtls timeout init"); + return BAD_FUNC_ARG; + } + + ssl->dtls_timeout_max = timeout; + + return SSL_SUCCESS; +} + + +int CyaSSL_dtls_got_timeout(CYASSL* ssl) +{ + int result = SSL_SUCCESS; + + DtlsMsgListDelete(ssl->dtls_msg_list, ssl->heap); + ssl->dtls_msg_list = NULL; + if (DtlsPoolTimeout(ssl) < 0 || DtlsPoolSend(ssl) < 0) { + result = SSL_FATAL_ERROR; + } + return result; +} + +#endif /* DTLS */ +#endif /* LEANPSK */ + + +/* client only parts */ +#ifndef NO_CYASSL_CLIENT + + #ifndef NO_OLD_TLS + CYASSL_METHOD* CyaSSLv3_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("SSLv3_client_method"); + if (method) + InitSSL_Method(method, MakeSSLv3()); + return method; + } + #endif + + #ifdef CYASSL_DTLS + CYASSL_METHOD* CyaDTLSv1_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("DTLSv1_client_method"); + if (method) + InitSSL_Method(method, MakeDTLSv1()); + return method; + } + + CYASSL_METHOD* CyaDTLSv1_2_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("DTLSv1_2_client_method"); + if (method) + InitSSL_Method(method, MakeDTLSv1_2()); + return method; + } + #endif + + + /* please see note at top of README if you get an error from connect */ + int CyaSSL_connect(CYASSL* ssl) + { + int neededState; + + CYASSL_ENTER("SSL_connect()"); + + #ifdef HAVE_ERRNO_H + errno = 0; + #endif + + if (ssl->options.side != CYASSL_CLIENT_END) { + CYASSL_ERROR(ssl->error = SIDE_ERROR); + return SSL_FATAL_ERROR; + } + + #ifdef CYASSL_DTLS + if (ssl->version.major == DTLS_MAJOR) { + ssl->options.dtls = 1; + ssl->options.tls = 1; + ssl->options.tls1_1 = 1; + + if (DtlsPoolInit(ssl) != 0) { + ssl->error = MEMORY_ERROR; + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + #endif + + if (ssl->buffers.outputBuffer.length > 0) { + if ( (ssl->error = SendBuffered(ssl)) == 0) { + ssl->options.connectState++; + CYASSL_MSG("connect state: Advanced from buffered send"); + } + else { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + + switch (ssl->options.connectState) { + + case CONNECT_BEGIN : + /* always send client hello first */ + if ( (ssl->error = SendClientHello(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.connectState = CLIENT_HELLO_SENT; + CYASSL_MSG("connect state: CLIENT_HELLO_SENT"); + + case CLIENT_HELLO_SENT : + neededState = ssl->options.resuming ? SERVER_FINISHED_COMPLETE : + SERVER_HELLODONE_COMPLETE; + #ifdef CYASSL_DTLS + /* In DTLS, when resuming, we can go straight to FINISHED, + * or do a cookie exchange and then skip to FINISHED, assume + * we need the cookie exchange first. */ + if (ssl->options.dtls) + neededState = SERVER_HELLOVERIFYREQUEST_COMPLETE; + #endif + /* get response */ + while (ssl->options.serverState < neededState) { + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + /* if resumption failed, reset needed state */ + else if (neededState == SERVER_FINISHED_COMPLETE) + if (!ssl->options.resuming) { + if (!ssl->options.dtls) + neededState = SERVER_HELLODONE_COMPLETE; + else + neededState = SERVER_HELLOVERIFYREQUEST_COMPLETE; + } + } + + ssl->options.connectState = HELLO_AGAIN; + CYASSL_MSG("connect state: HELLO_AGAIN"); + + case HELLO_AGAIN : + if (ssl->options.certOnly) + return SSL_SUCCESS; + + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + /* re-init hashes, exclude first hello and verify request */ +#ifndef NO_OLD_TLS + InitMd5(&ssl->hashMd5); + if ( (ssl->error = InitSha(&ssl->hashSha)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } +#endif + if (IsAtLeastTLSv1_2(ssl)) { + #ifndef NO_SHA256 + if ( (ssl->error = + InitSha256(&ssl->hashSha256)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + #ifdef CYASSL_SHA384 + if ( (ssl->error = + InitSha384(&ssl->hashSha384)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + } + if ( (ssl->error = SendClientHello(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + #endif + + ssl->options.connectState = HELLO_AGAIN_REPLY; + CYASSL_MSG("connect state: HELLO_AGAIN_REPLY"); + + case HELLO_AGAIN_REPLY : + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + neededState = ssl->options.resuming ? + SERVER_FINISHED_COMPLETE : SERVER_HELLODONE_COMPLETE; + + /* get response */ + while (ssl->options.serverState < neededState) { + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + /* if resumption failed, reset needed state */ + else if (neededState == SERVER_FINISHED_COMPLETE) + if (!ssl->options.resuming) + neededState = SERVER_HELLODONE_COMPLETE; + } + } + #endif + + ssl->options.connectState = FIRST_REPLY_DONE; + CYASSL_MSG("connect state: FIRST_REPLY_DONE"); + + case FIRST_REPLY_DONE : + #ifndef NO_CERTS + if (ssl->options.sendVerify) { + if ( (ssl->error = SendCertificate(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + CYASSL_MSG("sent: certificate"); + } + + #endif + ssl->options.connectState = FIRST_REPLY_FIRST; + CYASSL_MSG("connect state: FIRST_REPLY_FIRST"); + + case FIRST_REPLY_FIRST : + if (!ssl->options.resuming) { + if ( (ssl->error = SendClientKeyExchange(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + CYASSL_MSG("sent: client key exchange"); + } + + ssl->options.connectState = FIRST_REPLY_SECOND; + CYASSL_MSG("connect state: FIRST_REPLY_SECOND"); + + case FIRST_REPLY_SECOND : + #ifndef NO_CERTS + if (ssl->options.sendVerify) { + if ( (ssl->error = SendCertificateVerify(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + CYASSL_MSG("sent: certificate verify"); + } + #endif + ssl->options.connectState = FIRST_REPLY_THIRD; + CYASSL_MSG("connect state: FIRST_REPLY_THIRD"); + + case FIRST_REPLY_THIRD : + if ( (ssl->error = SendChangeCipher(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + CYASSL_MSG("sent: change cipher spec"); + ssl->options.connectState = FIRST_REPLY_FOURTH; + CYASSL_MSG("connect state: FIRST_REPLY_FOURTH"); + + case FIRST_REPLY_FOURTH : + if ( (ssl->error = SendFinished(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + CYASSL_MSG("sent: finished"); + ssl->options.connectState = FINISHED_DONE; + CYASSL_MSG("connect state: FINISHED_DONE"); + + case FINISHED_DONE : + /* get response */ + while (ssl->options.serverState < SERVER_FINISHED_COMPLETE) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + + ssl->options.connectState = SECOND_REPLY_DONE; + CYASSL_MSG("connect state: SECOND_REPLY_DONE"); + + case SECOND_REPLY_DONE: + FreeHandshakeResources(ssl); + CYASSL_LEAVE("SSL_connect()", SSL_SUCCESS); + return SSL_SUCCESS; + + default: + CYASSL_MSG("Unknown connect state ERROR"); + return SSL_FATAL_ERROR; /* unknown connect state */ + } + } + +#endif /* NO_CYASSL_CLIENT */ + + +/* server only parts */ +#ifndef NO_CYASSL_SERVER + + #ifndef NO_OLD_TLS + CYASSL_METHOD* CyaSSLv3_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("SSLv3_server_method"); + if (method) { + InitSSL_Method(method, MakeSSLv3()); + method->side = CYASSL_SERVER_END; + } + return method; + } + #endif + + + #ifdef CYASSL_DTLS + CYASSL_METHOD* CyaDTLSv1_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("DTLSv1_server_method"); + if (method) { + InitSSL_Method(method, MakeDTLSv1()); + method->side = CYASSL_SERVER_END; + } + return method; + } + + CYASSL_METHOD* CyaDTLSv1_2_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + CYASSL_ENTER("DTLSv1_2_server_method"); + if (method) { + InitSSL_Method(method, MakeDTLSv1_2()); + method->side = CYASSL_SERVER_END; + } + return method; + } + #endif + + + int CyaSSL_accept(CYASSL* ssl) + { + byte havePSK = 0; + CYASSL_ENTER("SSL_accept()"); + + #ifdef HAVE_ERRNO_H + errno = 0; + #endif + + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + (void)havePSK; + + if (ssl->options.side != CYASSL_SERVER_END) { + CYASSL_ERROR(ssl->error = SIDE_ERROR); + return SSL_FATAL_ERROR; + } + + #ifndef NO_CERTS + /* in case used set_accept_state after init */ + if (!havePSK && (ssl->buffers.certificate.buffer == NULL || + ssl->buffers.key.buffer == NULL)) { + CYASSL_MSG("accept error: don't have server cert and key"); + ssl->error = NO_PRIVATE_KEY; + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + + #ifdef HAVE_ECC + /* in case used set_accept_state after init */ + if (ssl->eccTempKeyPresent == 0) { + if (ecc_make_key(ssl->rng, ssl->eccTempKeySz, + ssl->eccTempKey) != 0) { + ssl->error = ECC_MAKEKEY_ERROR; + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->eccTempKeyPresent = 1; + } + #endif + + #ifdef CYASSL_DTLS + if (ssl->version.major == DTLS_MAJOR) { + ssl->options.dtls = 1; + ssl->options.tls = 1; + ssl->options.tls1_1 = 1; + + if (DtlsPoolInit(ssl) != 0) { + ssl->error = MEMORY_ERROR; + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + #endif + + if (ssl->buffers.outputBuffer.length > 0) { + if ( (ssl->error = SendBuffered(ssl)) == 0) { + ssl->options.acceptState++; + CYASSL_MSG("accept state: Advanced from buffered send"); + } + else { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + + switch (ssl->options.acceptState) { + + case ACCEPT_BEGIN : + /* get response */ + while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.acceptState = ACCEPT_CLIENT_HELLO_DONE; + CYASSL_MSG("accept state ACCEPT_CLIENT_HELLO_DONE"); + + case ACCEPT_CLIENT_HELLO_DONE : + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + if ( (ssl->error = SendHelloVerifyRequest(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + ssl->options.acceptState = HELLO_VERIFY_SENT; + CYASSL_MSG("accept state HELLO_VERIFY_SENT"); + + case HELLO_VERIFY_SENT: + #ifdef CYASSL_DTLS + if (ssl->options.dtls) { + ssl->options.clientState = NULL_STATE; /* get again */ + /* re-init hashes, exclude first hello and verify request */ +#ifndef NO_OLD_TLS + InitMd5(&ssl->hashMd5); + if ( (ssl->error = InitSha(&ssl->hashSha)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } +#endif + if (IsAtLeastTLSv1_2(ssl)) { + #ifndef NO_SHA256 + if ( (ssl->error = + InitSha256(&ssl->hashSha256)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + #ifdef CYASSL_SHA384 + if ( (ssl->error = + InitSha384(&ssl->hashSha384)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + } + + while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + #endif + ssl->options.acceptState = ACCEPT_FIRST_REPLY_DONE; + CYASSL_MSG("accept state ACCEPT_FIRST_REPLY_DONE"); + + case ACCEPT_FIRST_REPLY_DONE : + if ( (ssl->error = SendServerHello(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.acceptState = SERVER_HELLO_SENT; + CYASSL_MSG("accept state SERVER_HELLO_SENT"); + + case SERVER_HELLO_SENT : + #ifndef NO_CERTS + if (!ssl->options.resuming) + if ( (ssl->error = SendCertificate(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + ssl->options.acceptState = CERT_SENT; + CYASSL_MSG("accept state CERT_SENT"); + + case CERT_SENT : + if (!ssl->options.resuming) + if ( (ssl->error = SendServerKeyExchange(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.acceptState = KEY_EXCHANGE_SENT; + CYASSL_MSG("accept state KEY_EXCHANGE_SENT"); + + case KEY_EXCHANGE_SENT : + #ifndef NO_CERTS + if (!ssl->options.resuming) + if (ssl->options.verifyPeer) + if ( (ssl->error = SendCertificateRequest(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + #endif + ssl->options.acceptState = CERT_REQ_SENT; + CYASSL_MSG("accept state CERT_REQ_SENT"); + + case CERT_REQ_SENT : + if (!ssl->options.resuming) + if ( (ssl->error = SendServerHelloDone(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.acceptState = SERVER_HELLO_DONE; + CYASSL_MSG("accept state SERVER_HELLO_DONE"); + + case SERVER_HELLO_DONE : + if (!ssl->options.resuming) { + while (ssl->options.clientState < CLIENT_FINISHED_COMPLETE) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + } + ssl->options.acceptState = ACCEPT_SECOND_REPLY_DONE; + CYASSL_MSG("accept state ACCEPT_SECOND_REPLY_DONE"); + + case ACCEPT_SECOND_REPLY_DONE : + if ( (ssl->error = SendChangeCipher(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + ssl->options.acceptState = CHANGE_CIPHER_SENT; + CYASSL_MSG("accept state CHANGE_CIPHER_SENT"); + + case CHANGE_CIPHER_SENT : + if ( (ssl->error = SendFinished(ssl)) != 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + + ssl->options.acceptState = ACCEPT_FINISHED_DONE; + CYASSL_MSG("accept state ACCEPT_FINISHED_DONE"); + + case ACCEPT_FINISHED_DONE : + if (ssl->options.resuming) + while (ssl->options.clientState < CLIENT_FINISHED_COMPLETE) + if ( (ssl->error = ProcessReply(ssl)) < 0) { + CYASSL_ERROR(ssl->error); + return SSL_FATAL_ERROR; + } + + ssl->options.acceptState = ACCEPT_THIRD_REPLY_DONE; + CYASSL_MSG("accept state ACCEPT_THIRD_REPLY_DONE"); + + case ACCEPT_THIRD_REPLY_DONE : + FreeHandshakeResources(ssl); + CYASSL_LEAVE("SSL_accept()", SSL_SUCCESS); + return SSL_SUCCESS; + + default : + CYASSL_MSG("Unknown accept state ERROR"); + return SSL_FATAL_ERROR; + } + } + +#endif /* NO_CYASSL_SERVER */ + + +int CyaSSL_Cleanup(void) +{ + int ret = SSL_SUCCESS; + int release = 0; + + CYASSL_ENTER("CyaSSL_Cleanup"); + + if (initRefCount == 0) + return ret; /* possibly no init yet, but not failure either way */ + + if (LockMutex(&count_mutex) != 0) { + CYASSL_MSG("Bad Lock Mutex count"); + return BAD_MUTEX_E; + } + + release = initRefCount-- == 1; + if (initRefCount < 0) + initRefCount = 0; + + UnLockMutex(&count_mutex); + + if (!release) + return ret; + +#ifndef NO_SESSION_CACHE + if (FreeMutex(&session_mutex) != 0) + ret = BAD_MUTEX_E; +#endif + if (FreeMutex(&count_mutex) != 0) + ret = BAD_MUTEX_E; + +#if defined(HAVE_ECC) && defined(FP_ECC) + ecc_fp_free(); +#endif + + return ret; +} + + +#ifndef NO_SESSION_CACHE + +#ifndef NO_MD5 + +/* some session IDs aren't random afterall, let's make them random */ + +static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) +{ + byte digest[MD5_DIGEST_SIZE]; + Md5 md5; + + (void)error; + + InitMd5(&md5); + Md5Update(&md5, sessionID, len); + Md5Final(&md5, digest); + + return MakeWordFromHash(digest); +} + +#elif !defined(NO_SHA) + +/* 0 on failure */ +static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) +{ + byte digest[SHA_DIGEST_SIZE]; + Sha sha; + int ret = 0; + + ret = InitSha(&sha); + if (ret != 0) { + *error = ret; + return 0; + } + ShaUpdate(&sha, sessionID, len); + ShaFinal(&sha, digest); + + return MakeWordFromHash(digest); +} + +#elif !defined(NO_SHA256) + +static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) +{ + byte digest[SHA256_DIGEST_SIZE]; + Sha256 sha256; + int ret; + + ret = InitSha256(&sha256); + if (ret != 0) { + *error = ret; + return 0; + } + + ret = Sha256Update(&sha256, sessionID, len); + if (ret != 0) { + *error = ret; + return 0; + } + + ret = Sha256Final(&sha256, digest); + if (ret != 0) { + *error = ret; + return 0; + } + + return MakeWordFromHash(digest); +} + +#else + +#error "We need a digest to hash the session IDs" + +#endif /* NO_MD5 */ + + +void CyaSSL_flush_sessions(CYASSL_CTX* ctx, long tm) +{ + /* static table now, no flusing needed */ + (void)ctx; + (void)tm; +} + + +/* set ssl session timeout in seconds */ +int CyaSSL_set_timeout(CYASSL* ssl, unsigned int to) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + ssl->timeout = to; + + return SSL_SUCCESS; +} + + +/* set ctx session timeout in seconds */ +int CyaSSL_CTX_set_timeout(CYASSL_CTX* ctx, unsigned int to) +{ + if (ctx == NULL) + return BAD_FUNC_ARG; + + ctx->timeout = to; + + return SSL_SUCCESS; +} + + +#ifndef NO_CLIENT_CACHE + +/* Get Session from Client cache based on id/len, return NULL on failure */ +CYASSL_SESSION* GetSessionClient(CYASSL* ssl, const byte* id, int len) +{ + CYASSL_SESSION* ret = NULL; + word32 row; + int idx; + int count; + int error = 0; + + CYASSL_ENTER("GetSessionClient"); + + if (ssl->options.side == CYASSL_SERVER_END) + return NULL; + + len = min(SERVER_ID_LEN, (word32)len); + row = HashSession(id, len, &error) % SESSION_ROWS; + if (error != 0) { + CYASSL_MSG("Hash session failed"); + return NULL; + } + + if (LockMutex(&session_mutex) != 0) { + CYASSL_MSG("Lock session mutex failed"); + return NULL; + } + + /* start from most recently used */ + count = min((word32)ClientCache[row].totalCount, SESSIONS_PER_ROW); + idx = ClientCache[row].nextIdx - 1; + if (idx < 0) + idx = SESSIONS_PER_ROW - 1; /* if back to front, the previous was end */ + + for (; count > 0; --count, idx = idx ? idx - 1 : SESSIONS_PER_ROW - 1) { + CYASSL_SESSION* current; + ClientSession clSess; + + if (idx >= SESSIONS_PER_ROW || idx < 0) { /* sanity check */ + CYASSL_MSG("Bad idx"); + break; + } + + clSess = ClientCache[row].Clients[idx]; + + current = &SessionCache[clSess.serverRow].Sessions[clSess.serverIdx]; + if (XMEMCMP(current->serverID, id, len) == 0) { + CYASSL_MSG("Found a serverid match for client"); + if (LowResTimer() < (current->bornOn + current->timeout)) { + CYASSL_MSG("Session valid"); + ret = current; + break; + } else { + CYASSL_MSG("Session timed out"); /* could have more for id */ + } + } else { + CYASSL_MSG("ServerID not a match from client table"); + } + } + + UnLockMutex(&session_mutex); + + return ret; +} + +#endif /* NO_CLIENT_CACHE */ + + +CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret) +{ + CYASSL_SESSION* ret = 0; + const byte* id = NULL; + word32 row; + int idx; + int count; + int error = 0; + + if (ssl->options.sessionCacheOff) + return NULL; + + if (ssl->options.haveSessionId == 0) + return NULL; + + if (ssl->arrays) + id = ssl->arrays->sessionID; + else + id = ssl->session.sessionID; + + row = HashSession(id, ID_LEN, &error) % SESSION_ROWS; + if (error != 0) { + CYASSL_MSG("Hash session failed"); + return NULL; + } + + if (LockMutex(&session_mutex) != 0) + return 0; + + /* start from most recently used */ + count = min((word32)SessionCache[row].totalCount, SESSIONS_PER_ROW); + idx = SessionCache[row].nextIdx - 1; + if (idx < 0) + idx = SESSIONS_PER_ROW - 1; /* if back to front, the previous was end */ + + for (; count > 0; --count, idx = idx ? idx - 1 : SESSIONS_PER_ROW - 1) { + CYASSL_SESSION* current; + + if (idx >= SESSIONS_PER_ROW || idx < 0) { /* sanity check */ + CYASSL_MSG("Bad idx"); + break; + } + + current = &SessionCache[row].Sessions[idx]; + if (XMEMCMP(current->sessionID, id, ID_LEN) == 0) { + CYASSL_MSG("Found a session match"); + if (LowResTimer() < (current->bornOn + current->timeout)) { + CYASSL_MSG("Session valid"); + ret = current; + if (masterSecret) + XMEMCPY(masterSecret, current->masterSecret, SECRET_LEN); + } else { + CYASSL_MSG("Session timed out"); + } + break; /* no more sessionIDs whether valid or not that match */ + } else { + CYASSL_MSG("SessionID not a match at this idx"); + } + } + + UnLockMutex(&session_mutex); + + return ret; +} + + +int SetSession(CYASSL* ssl, CYASSL_SESSION* session) +{ + if (ssl->options.sessionCacheOff) + return SSL_FAILURE; + + if (LowResTimer() < (session->bornOn + session->timeout)) { + ssl->session = *session; + ssl->options.resuming = 1; + +#ifdef SESSION_CERTS + ssl->version = session->version; + ssl->options.cipherSuite0 = session->cipherSuite0; + ssl->options.cipherSuite = session->cipherSuite; +#endif + + return SSL_SUCCESS; + } + return SSL_FAILURE; /* session timed out */ +} + + +int AddSession(CYASSL* ssl) +{ + word32 row, idx; + int error = 0; + + if (ssl->options.sessionCacheOff) + return 0; + + if (ssl->options.haveSessionId == 0) + return 0; + + row = HashSession(ssl->arrays->sessionID, ID_LEN, &error) % SESSION_ROWS; + if (error != 0) { + CYASSL_MSG("Hash session failed"); + return error; + } + + if (LockMutex(&session_mutex) != 0) + return BAD_MUTEX_E; + + idx = SessionCache[row].nextIdx++; +#ifdef SESSION_INDEX + ssl->sessionIndex = (row << SESSIDX_ROW_SHIFT) | idx; +#endif + + XMEMCPY(SessionCache[row].Sessions[idx].masterSecret, + ssl->arrays->masterSecret, SECRET_LEN); + XMEMCPY(SessionCache[row].Sessions[idx].sessionID, ssl->arrays->sessionID, + ID_LEN); + + SessionCache[row].Sessions[idx].timeout = ssl->timeout; + SessionCache[row].Sessions[idx].bornOn = LowResTimer(); + +#ifdef SESSION_CERTS + SessionCache[row].Sessions[idx].chain.count = ssl->session.chain.count; + XMEMCPY(SessionCache[row].Sessions[idx].chain.certs, + ssl->session.chain.certs, sizeof(x509_buffer) * MAX_CHAIN_DEPTH); + + SessionCache[row].Sessions[idx].version = ssl->version; + SessionCache[row].Sessions[idx].cipherSuite0 = ssl->options.cipherSuite0; + SessionCache[row].Sessions[idx].cipherSuite = ssl->options.cipherSuite; +#endif /* SESSION_CERTS */ + + SessionCache[row].totalCount++; + if (SessionCache[row].nextIdx == SESSIONS_PER_ROW) + SessionCache[row].nextIdx = 0; + +#ifndef NO_CLIENT_CACHE + if (ssl->options.side == CYASSL_CLIENT_END && ssl->session.idLen) { + word32 clientRow, clientIdx; + + CYASSL_MSG("Adding client cache entry"); + + SessionCache[row].Sessions[idx].idLen = ssl->session.idLen; + XMEMCPY(SessionCache[row].Sessions[idx].serverID, ssl->session.serverID, + ssl->session.idLen); + + clientRow = HashSession(ssl->session.serverID, ssl->session.idLen, + &error) % SESSION_ROWS; + if (error != 0) { + CYASSL_MSG("Hash session failed"); + return error; + } + clientIdx = ClientCache[clientRow].nextIdx++; + + ClientCache[clientRow].Clients[clientIdx].serverRow = (word16)row; + ClientCache[clientRow].Clients[clientIdx].serverIdx = (word16)idx; + + ClientCache[clientRow].totalCount++; + if (ClientCache[clientRow].nextIdx == SESSIONS_PER_ROW) + ClientCache[clientRow].nextIdx = 0; + } + else + SessionCache[row].Sessions[idx].idLen = 0; +#endif /* NO_CLIENT_CACHE */ + + if (UnLockMutex(&session_mutex) != 0) + return BAD_MUTEX_E; + + return 0; +} + + +#ifdef SESSION_INDEX + +int CyaSSL_GetSessionIndex(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_GetSessionIndex"); + CYASSL_LEAVE("CyaSSL_GetSessionIndex", ssl->sessionIndex); + return ssl->sessionIndex; +} + + +int CyaSSL_GetSessionAtIndex(int idx, CYASSL_SESSION* session) +{ + int row, col, result = SSL_FAILURE; + + CYASSL_ENTER("CyaSSL_GetSessionAtIndex"); + + row = idx >> SESSIDX_ROW_SHIFT; + col = idx & SESSIDX_IDX_MASK; + + if (LockMutex(&session_mutex) != 0) { + return BAD_MUTEX_E; + } + + if (row < SESSION_ROWS && + col < (int)min(SessionCache[row].totalCount, SESSIONS_PER_ROW)) { + XMEMCPY(session, + &SessionCache[row].Sessions[col], sizeof(CYASSL_SESSION)); + result = SSL_SUCCESS; + } + + if (UnLockMutex(&session_mutex) != 0) + result = BAD_MUTEX_E; + + CYASSL_LEAVE("CyaSSL_GetSessionAtIndex", result); + return result; +} + +#endif /* SESSION_INDEX */ + +#if defined(SESSION_INDEX) && defined(SESSION_CERTS) + +CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session) +{ + CYASSL_X509_CHAIN* chain = NULL; + + CYASSL_ENTER("CyaSSL_SESSION_get_peer_chain"); + if (session) + chain = &session->chain; + + CYASSL_LEAVE("CyaSSL_SESSION_get_peer_chain", chain ? 1 : 0); + return chain; +} + +#endif /* SESSION_INDEX && SESSION_CERTS */ + + + #ifdef SESSION_STATS + + CYASSL_API + void PrintSessionStats(void) + { + word32 totalSessionsSeen = 0; + word32 totalSessionsNow = 0; + word32 rowNow; + int i; + double E; /* expected freq */ + double chiSquare = 0; + + for (i = 0; i < SESSION_ROWS; i++) { + totalSessionsSeen += SessionCache[i].totalCount; + + if (SessionCache[i].totalCount >= SESSIONS_PER_ROW) + rowNow = SESSIONS_PER_ROW; + else if (SessionCache[i].nextIdx == 0) + rowNow = 0; + else + rowNow = SessionCache[i].nextIdx; + + totalSessionsNow += rowNow; + } + + printf("Total Sessions Seen = %d\n", totalSessionsSeen); + printf("Total Sessions Now = %d\n", totalSessionsNow); + + E = (double)totalSessionsSeen / SESSION_ROWS; + + for (i = 0; i < SESSION_ROWS; i++) { + double diff = SessionCache[i].totalCount - E; + diff *= diff; /* square */ + diff /= E; /* normalize */ + + chiSquare += diff; + } + printf(" chi-square = %5.1f, d.f. = %d\n", chiSquare, + SESSION_ROWS - 1); + if (SESSION_ROWS == 11) + printf(" .05 p value = 18.3, chi-square should be less\n"); + else if (SESSION_ROWS == 211) + printf(".05 p value = 244.8, chi-square should be less\n"); + else if (SESSION_ROWS == 5981) + printf(".05 p value = 6161.0, chi-square should be less\n"); + else if (SESSION_ROWS == 3) + printf(".05 p value = 6.0, chi-square should be less\n"); + else if (SESSION_ROWS == 2861) + printf(".05 p value = 2985.5, chi-square should be less\n"); + printf("\n"); + } + + #endif /* SESSION_STATS */ + +#else /* NO_SESSION_CACHE */ + +/* No session cache version */ +CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret) +{ + (void)ssl; + (void)masterSecret; + + return NULL; +} + +#endif /* NO_SESSION_CACHE */ + + +/* call before SSL_connect, if verifying will add name check to + date check and signature check */ +int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn) +{ + CYASSL_ENTER("CyaSSL_check_domain_name"); + if (ssl->buffers.domainName.buffer) + XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN); + + ssl->buffers.domainName.length = (word32)XSTRLEN(dn) + 1; + ssl->buffers.domainName.buffer = (byte*) XMALLOC( + ssl->buffers.domainName.length, ssl->heap, DYNAMIC_TYPE_DOMAIN); + + if (ssl->buffers.domainName.buffer) { + XSTRNCPY((char*)ssl->buffers.domainName.buffer, dn, + ssl->buffers.domainName.length); + return SSL_SUCCESS; + } + else { + ssl->error = MEMORY_ERROR; + return SSL_FAILURE; + } +} + + +/* turn on CyaSSL zlib compression + returns SSL_SUCCESS for success, else error (not built in) +*/ +int CyaSSL_set_compression(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_set_compression"); + (void)ssl; +#ifdef HAVE_LIBZ + ssl->options.usingCompression = 1; + return SSL_SUCCESS; +#else + return NOT_COMPILED_IN; +#endif +} + + +#ifndef USE_WINDOWS_API + #ifndef NO_WRITEV + + /* simulate writev semantics, doesn't actually do block at a time though + because of SSL_write behavior and because front adds may be small */ + int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, int iovcnt) + { + byte tmp[FILE_BUFFER_SIZE]; + byte* myBuffer = tmp; + int sending = 0; + int newBuffer = 0; + int idx = 0; + int i; + int ret; + + CYASSL_ENTER("CyaSSL_writev"); + + for (i = 0; i < iovcnt; i++) + sending += (int)iov[i].iov_len; + + if (sending > (int)sizeof(tmp)) { + byte* tmp2 = (byte*) XMALLOC(sending, ssl->heap, + DYNAMIC_TYPE_WRITEV); + if (!tmp2) + return MEMORY_ERROR; + myBuffer = tmp2; + newBuffer = 1; + } + + for (i = 0; i < iovcnt; i++) { + XMEMCPY(&myBuffer[idx], iov[i].iov_base, iov[i].iov_len); + idx += (int)iov[i].iov_len; + } + + ret = CyaSSL_write(ssl, myBuffer, sending); + + if (newBuffer) XFREE(myBuffer, ssl->heap, DYNAMIC_TYPE_WRITEV); + + return ret; + } + #endif +#endif + + +#ifdef CYASSL_CALLBACKS + + typedef struct itimerval Itimerval; + + /* don't keep calling simple functions while setting up timer and singals + if no inlining these are the next best */ + + #define AddTimes(a, b, c) \ + do { \ + c.tv_sec = a.tv_sec + b.tv_sec; \ + c.tv_usec = a.tv_usec + b.tv_usec; \ + if (c.tv_usec >= 1000000) { \ + c.tv_sec++; \ + c.tv_usec -= 1000000; \ + } \ + } while (0) + + + #define SubtractTimes(a, b, c) \ + do { \ + c.tv_sec = a.tv_sec - b.tv_sec; \ + c.tv_usec = a.tv_usec - b.tv_usec; \ + if (c.tv_usec < 0) { \ + c.tv_sec--; \ + c.tv_usec += 1000000; \ + } \ + } while (0) + + #define CmpTimes(a, b, cmp) \ + ((a.tv_sec == b.tv_sec) ? \ + (a.tv_usec cmp b.tv_usec) : \ + (a.tv_sec cmp b.tv_sec)) \ + + + /* do nothing handler */ + static void myHandler(int signo) + { + (void)signo; + return; + } + + + static int CyaSSL_ex_wrapper(CYASSL* ssl, HandShakeCallBack hsCb, + TimeoutCallBack toCb, Timeval timeout) + { + int ret = SSL_FATAL_ERROR; + int oldTimerOn = 0; /* was timer already on */ + Timeval startTime; + Timeval endTime; + Timeval totalTime; + Itimerval myTimeout; + Itimerval oldTimeout; /* if old timer adjust from total time to reset */ + struct sigaction act, oact; + + #define ERR_OUT(x) { ssl->hsInfoOn = 0; ssl->toInfoOn = 0; return x; } + + if (hsCb) { + ssl->hsInfoOn = 1; + InitHandShakeInfo(&ssl->handShakeInfo); + } + if (toCb) { + ssl->toInfoOn = 1; + InitTimeoutInfo(&ssl->timeoutInfo); + + if (gettimeofday(&startTime, 0) < 0) + ERR_OUT(GETTIME_ERROR); + + /* use setitimer to simulate getitimer, init 0 myTimeout */ + myTimeout.it_interval.tv_sec = 0; + myTimeout.it_interval.tv_usec = 0; + myTimeout.it_value.tv_sec = 0; + myTimeout.it_value.tv_usec = 0; + if (setitimer(ITIMER_REAL, &myTimeout, &oldTimeout) < 0) + ERR_OUT(SETITIMER_ERROR); + + if (oldTimeout.it_value.tv_sec || oldTimeout.it_value.tv_usec) { + oldTimerOn = 1; + + /* is old timer going to expire before ours */ + if (CmpTimes(oldTimeout.it_value, timeout, <)) { + timeout.tv_sec = oldTimeout.it_value.tv_sec; + timeout.tv_usec = oldTimeout.it_value.tv_usec; + } + } + myTimeout.it_value.tv_sec = timeout.tv_sec; + myTimeout.it_value.tv_usec = timeout.tv_usec; + + /* set up signal handler, don't restart socket send/recv */ + act.sa_handler = myHandler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; +#ifdef SA_INTERRUPT + act.sa_flags |= SA_INTERRUPT; +#endif + if (sigaction(SIGALRM, &act, &oact) < 0) + ERR_OUT(SIGACT_ERROR); + + if (setitimer(ITIMER_REAL, &myTimeout, 0) < 0) + ERR_OUT(SETITIMER_ERROR); + } + + /* do main work */ +#ifndef NO_CYASSL_CLIENT + if (ssl->options.side == CYASSL_CLIENT_END) + ret = CyaSSL_connect(ssl); +#endif +#ifndef NO_CYASSL_SERVER + if (ssl->options.side == CYASSL_SERVER_END) + ret = CyaSSL_accept(ssl); +#endif + + /* do callbacks */ + if (toCb) { + if (oldTimerOn) { + gettimeofday(&endTime, 0); + SubtractTimes(endTime, startTime, totalTime); + /* adjust old timer for elapsed time */ + if (CmpTimes(totalTime, oldTimeout.it_value, <)) + SubtractTimes(oldTimeout.it_value, totalTime, + oldTimeout.it_value); + else { + /* reset value to interval, may be off */ + oldTimeout.it_value.tv_sec = oldTimeout.it_interval.tv_sec; + oldTimeout.it_value.tv_usec =oldTimeout.it_interval.tv_usec; + } + /* keep iter the same whether there or not */ + } + /* restore old handler */ + if (sigaction(SIGALRM, &oact, 0) < 0) + ret = SIGACT_ERROR; /* more pressing error, stomp */ + else + /* use old settings which may turn off (expired or not there) */ + if (setitimer(ITIMER_REAL, &oldTimeout, 0) < 0) + ret = SETITIMER_ERROR; + + /* if we had a timeout call callback */ + if (ssl->timeoutInfo.timeoutName[0]) { + ssl->timeoutInfo.timeoutValue.tv_sec = timeout.tv_sec; + ssl->timeoutInfo.timeoutValue.tv_usec = timeout.tv_usec; + (toCb)(&ssl->timeoutInfo); + } + /* clean up */ + FreeTimeoutInfo(&ssl->timeoutInfo, ssl->heap); + ssl->toInfoOn = 0; + } + if (hsCb) { + FinishHandShakeInfo(&ssl->handShakeInfo, ssl); + (hsCb)(&ssl->handShakeInfo); + ssl->hsInfoOn = 0; + } + return ret; + } + + +#ifndef NO_CYASSL_CLIENT + + int CyaSSL_connect_ex(CYASSL* ssl, HandShakeCallBack hsCb, + TimeoutCallBack toCb, Timeval timeout) + { + CYASSL_ENTER("CyaSSL_connect_ex"); + return CyaSSL_ex_wrapper(ssl, hsCb, toCb, timeout); + } + +#endif + + +#ifndef NO_CYASSL_SERVER + + int CyaSSL_accept_ex(CYASSL* ssl, HandShakeCallBack hsCb, + TimeoutCallBack toCb,Timeval timeout) + { + CYASSL_ENTER("CyaSSL_accept_ex"); + return CyaSSL_ex_wrapper(ssl, hsCb, toCb, timeout); + } + +#endif + +#endif /* CYASSL_CALLBACKS */ + + +#ifndef NO_PSK + + void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX* ctx, + psk_client_callback cb) + { + CYASSL_ENTER("SSL_CTX_set_psk_client_callback"); + ctx->havePSK = 1; + ctx->client_psk_cb = cb; + } + + + void CyaSSL_set_psk_client_callback(CYASSL* ssl, psk_client_callback cb) + { + byte haveRSA = 1; + + CYASSL_ENTER("SSL_set_psk_client_callback"); + ssl->options.havePSK = 1; + ssl->options.client_psk_cb = cb; + + #ifdef NO_RSA + haveRSA = 0; + #endif + InitSuites(ssl->suites, ssl->version, haveRSA, TRUE, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + } + + + void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX* ctx, + psk_server_callback cb) + { + CYASSL_ENTER("SSL_CTX_set_psk_server_callback"); + ctx->havePSK = 1; + ctx->server_psk_cb = cb; + } + + + void CyaSSL_set_psk_server_callback(CYASSL* ssl, psk_server_callback cb) + { + byte haveRSA = 1; + + CYASSL_ENTER("SSL_set_psk_server_callback"); + ssl->options.havePSK = 1; + ssl->options.server_psk_cb = cb; + + #ifdef NO_RSA + haveRSA = 0; + #endif + InitSuites(ssl->suites, ssl->version, haveRSA, TRUE, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + } + + + const char* CyaSSL_get_psk_identity_hint(const CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_psk_identity_hint"); + + if (ssl == NULL || ssl->arrays == NULL) + return NULL; + + return ssl->arrays->server_hint; + } + + + const char* CyaSSL_get_psk_identity(const CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_psk_identity"); + + if (ssl == NULL || ssl->arrays == NULL) + return NULL; + + return ssl->arrays->client_identity; + } + + + int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX* ctx, const char* hint) + { + CYASSL_ENTER("SSL_CTX_use_psk_identity_hint"); + if (hint == 0) + ctx->server_hint[0] = 0; + else { + XSTRNCPY(ctx->server_hint, hint, MAX_PSK_ID_LEN); + ctx->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; + } + return SSL_SUCCESS; + } + + + int CyaSSL_use_psk_identity_hint(CYASSL* ssl, const char* hint) + { + CYASSL_ENTER("SSL_use_psk_identity_hint"); + + if (ssl == NULL || ssl->arrays == NULL) + return SSL_FAILURE; + + if (hint == 0) + ssl->arrays->server_hint[0] = 0; + else { + XSTRNCPY(ssl->arrays->server_hint, hint, MAX_PSK_ID_LEN); + ssl->arrays->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; + } + return SSL_SUCCESS; + } + +#endif /* NO_PSK */ + + +#ifndef NO_CERTS +/* used to be defined on NO_FILESYSTEM only, but are generally useful */ + + /* CyaSSL extension allows DER files to be loaded from buffers as well */ + int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX* ctx, const unsigned char* in, + long sz, int format) + { + CYASSL_ENTER("CyaSSL_CTX_load_verify_buffer"); + if (format == SSL_FILETYPE_PEM) + return ProcessChainBuffer(ctx, in, sz, format, CA_TYPE, NULL); + else + return ProcessBuffer(ctx, in, sz, format, CA_TYPE, NULL,NULL,0); + } + + + int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX* ctx, + const unsigned char* in, long sz, int format) + { + CYASSL_ENTER("CyaSSL_CTX_use_certificate_buffer"); + return ProcessBuffer(ctx, in, sz, format, CERT_TYPE, NULL, NULL, 0); + } + + + int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX* ctx, + const unsigned char* in, long sz, int format) + { + CYASSL_ENTER("CyaSSL_CTX_use_PrivateKey_buffer"); + return ProcessBuffer(ctx, in, sz, format, PRIVATEKEY_TYPE, NULL,NULL,0); + } + + + int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX* ctx, + const unsigned char* in, long sz) + { + CYASSL_ENTER("CyaSSL_CTX_use_certificate_chain_buffer"); + return ProcessBuffer(ctx, in, sz, SSL_FILETYPE_PEM, CERT_TYPE, NULL, + NULL, 1); + } + + int CyaSSL_use_certificate_buffer(CYASSL* ssl, + const unsigned char* in, long sz, int format) + { + CYASSL_ENTER("CyaSSL_use_certificate_buffer"); + return ProcessBuffer(ssl->ctx, in, sz, format,CERT_TYPE,ssl,NULL,0); + } + + + int CyaSSL_use_PrivateKey_buffer(CYASSL* ssl, + const unsigned char* in, long sz, int format) + { + CYASSL_ENTER("CyaSSL_use_PrivateKey_buffer"); + return ProcessBuffer(ssl->ctx, in, sz, format, PRIVATEKEY_TYPE, + ssl, NULL, 0); + } + + + int CyaSSL_use_certificate_chain_buffer(CYASSL* ssl, + const unsigned char* in, long sz) + { + CYASSL_ENTER("CyaSSL_use_certificate_chain_buffer"); + return ProcessBuffer(ssl->ctx, in, sz, SSL_FILETYPE_PEM, CERT_TYPE, + ssl, NULL, 1); + } + + + /* unload any certs or keys that SSL owns, leave CTX as is + SSL_SUCCESS on ok */ + int CyaSSL_UnloadCertsKeys(CYASSL* ssl) + { + if (ssl == NULL) { + CYASSL_MSG("Null function arg"); + return BAD_FUNC_ARG; + } + + if (ssl->buffers.weOwnCert) { + CYASSL_MSG("Unloading cert"); + XFREE(ssl->buffers.certificate.buffer, ssl->heap,DYNAMIC_TYPE_CERT); + ssl->buffers.weOwnCert = 0; + ssl->buffers.certificate.length = 0; + ssl->buffers.certificate.buffer = NULL; + } + + if (ssl->buffers.weOwnKey) { + CYASSL_MSG("Unloading key"); + XFREE(ssl->buffers.key.buffer, ssl->heap, DYNAMIC_TYPE_KEY); + ssl->buffers.weOwnKey = 0; + ssl->buffers.key.length = 0; + ssl->buffers.key.buffer = NULL; + } + + return SSL_SUCCESS; + } + + + int CyaSSL_CTX_UnloadCAs(CYASSL_CTX* ctx) + { + CYASSL_ENTER("CyaSSL_CTX_UnloadCAs"); + + if (ctx == NULL) + return BAD_FUNC_ARG; + + return CyaSSL_CertManagerUnloadCAs(ctx->cm); + } + +/* old NO_FILESYSTEM end */ +#endif /* !NO_CERTS */ + + +#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) + + + int CyaSSL_add_all_algorithms(void) + { + CYASSL_ENTER("CyaSSL_add_all_algorithms"); + CyaSSL_Init(); + return SSL_SUCCESS; + } + + + long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX* ctx, long sz) + { + /* cache size fixed at compile time in CyaSSL */ + (void)ctx; + (void)sz; + return 0; + } + + + void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX* ctx, int mode) + { + CYASSL_ENTER("CyaSSL_CTX_set_quiet_shutdown"); + if (mode) + ctx->quietShutdown = 1; + } + + + void CyaSSL_set_quiet_shutdown(CYASSL* ssl, int mode) + { + CYASSL_ENTER("CyaSSL_CTX_set_quiet_shutdown"); + if (mode) + ssl->options.quietShutdown = 1; + } + + + void CyaSSL_set_bio(CYASSL* ssl, CYASSL_BIO* rd, CYASSL_BIO* wr) + { + CYASSL_ENTER("SSL_set_bio"); + CyaSSL_set_rfd(ssl, rd->fd); + CyaSSL_set_wfd(ssl, wr->fd); + + ssl->biord = rd; + ssl->biowr = wr; + } + + + void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX* ctx, + STACK_OF(CYASSL_X509_NAME)* names) + { + (void)ctx; + (void)names; + } + + + STACK_OF(CYASSL_X509_NAME)* CyaSSL_load_client_CA_file(const char* fname) + { + (void)fname; + return 0; + } + + + int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX* ctx) + { + /* TODO:, not needed in goahead */ + (void)ctx; + return SSL_NOT_IMPLEMENTED; + } + + + /* keyblock size in bytes or -1 */ + int CyaSSL_get_keyblock_size(CYASSL* ssl) + { + if (ssl == NULL) + return SSL_FATAL_ERROR; + + return 2 * (ssl->specs.key_size + ssl->specs.iv_size + + ssl->specs.hash_size); + } + + + /* store keys returns SSL_SUCCESS or -1 on error */ + int CyaSSL_get_keys(CYASSL* ssl, unsigned char** ms, unsigned int* msLen, + unsigned char** sr, unsigned int* srLen, + unsigned char** cr, unsigned int* crLen) + { + if (ssl == NULL || ssl->arrays == NULL) + return SSL_FATAL_ERROR; + + *ms = ssl->arrays->masterSecret; + *sr = ssl->arrays->serverRandom; + *cr = ssl->arrays->clientRandom; + + *msLen = SECRET_LEN; + *srLen = RAN_LEN; + *crLen = RAN_LEN; + + return SSL_SUCCESS; + } + + + void CyaSSL_set_accept_state(CYASSL* ssl) + { + byte haveRSA = 1; + byte havePSK = 0; + + CYASSL_ENTER("SSL_set_accept_state"); + ssl->options.side = CYASSL_SERVER_END; + /* reset suites in case user switched */ + + #ifdef NO_RSA + haveRSA = 0; + #endif + #ifndef NO_PSK + havePSK = ssl->options.havePSK; + #endif + InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, + ssl->options.haveDH, ssl->options.haveNTRU, + ssl->options.haveECDSAsig, ssl->options.haveStaticECC, + ssl->options.side); + } +#endif + + /* return true if connection established */ + int CyaSSL_is_init_finished(CYASSL* ssl) + { + if (ssl == NULL) + return 0; + + if (ssl->options.handShakeState == HANDSHAKE_DONE) + return 1; + + return 0; + } + +#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) + void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX* ctx, + CYASSL_RSA*(*f)(CYASSL*, int, int)) + { + /* CyaSSL verifies all these internally */ + (void)ctx; + (void)f; + } + + + void CyaSSL_set_shutdown(CYASSL* ssl, int opt) + { + (void)ssl; + (void)opt; + } + + + long CyaSSL_CTX_set_options(CYASSL_CTX* ctx, long opt) + { + /* goahead calls with 0, do nothing */ + CYASSL_ENTER("SSL_CTX_set_options"); + (void)ctx; + return opt; + } + + + int CyaSSL_set_rfd(CYASSL* ssl, int rfd) + { + CYASSL_ENTER("SSL_set_rfd"); + ssl->rfd = rfd; /* not used directly to allow IO callbacks */ + + ssl->IOCB_ReadCtx = &ssl->rfd; + + return SSL_SUCCESS; + } + + + int CyaSSL_set_wfd(CYASSL* ssl, int wfd) + { + CYASSL_ENTER("SSL_set_wfd"); + ssl->wfd = wfd; /* not used directly to allow IO callbacks */ + + ssl->IOCB_WriteCtx = &ssl->wfd; + + return SSL_SUCCESS; + } + + + CYASSL_RSA* CyaSSL_RSA_generate_key(int len, unsigned long bits, + void(*f)(int, int, void*), void* data) + { + /* no tmp key needed, actual generation not supported */ + CYASSL_ENTER("RSA_generate_key"); + (void)len; + (void)bits; + (void)f; + (void)data; + return NULL; + } + + + + CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert( + CYASSL_X509_STORE_CTX* ctx) + { + (void)ctx; + return 0; + } + + + int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX* ctx) + { + if (ctx != NULL) + return ctx->error; + return 0; + } + + + int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX* ctx) + { + (void)ctx; + return 0; + } + + + CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void) + { + static CYASSL_BIO_METHOD meth; + + CYASSL_ENTER("BIO_f_buffer"); + meth.type = BIO_BUFFER; + + return &meth; + } + + + long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO* bio, long size) + { + /* CyaSSL has internal buffer, compatibility only */ + CYASSL_ENTER("BIO_set_write_buffer_size"); + (void)bio; + return size; + } + + + CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void) + { + static CYASSL_BIO_METHOD meth; + + CYASSL_ENTER("BIO_f_ssl"); + meth.type = BIO_SSL; + + return &meth; + } + + + CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int closeF) + { + CYASSL_BIO* bio = (CYASSL_BIO*) XMALLOC(sizeof(CYASSL_BIO), 0, + DYNAMIC_TYPE_OPENSSL); + + CYASSL_ENTER("BIO_new_socket"); + if (bio) { + bio->type = BIO_SOCKET; + bio->close = (byte)closeF; + bio->eof = 0; + bio->ssl = 0; + bio->fd = sfd; + bio->prev = 0; + bio->next = 0; + bio->mem = NULL; + bio->memLen = 0; + } + return bio; + } + + + int CyaSSL_BIO_eof(CYASSL_BIO* b) + { + CYASSL_ENTER("BIO_eof"); + if (b->eof) + return 1; + + return 0; + } + + + long CyaSSL_BIO_set_ssl(CYASSL_BIO* b, CYASSL* ssl, int closeF) + { + CYASSL_ENTER("BIO_set_ssl"); + b->ssl = ssl; + b->close = (byte)closeF; + /* add to ssl for bio free if SSL_free called before/instead of free_all? */ + + return 0; + } + + + CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD* method) + { + CYASSL_BIO* bio = (CYASSL_BIO*) XMALLOC(sizeof(CYASSL_BIO), 0, + DYNAMIC_TYPE_OPENSSL); + CYASSL_ENTER("BIO_new"); + if (bio) { + bio->type = method->type; + bio->close = 0; + bio->eof = 0; + bio->ssl = NULL; + bio->mem = NULL; + bio->memLen = 0; + bio->fd = 0; + bio->prev = NULL; + bio->next = NULL; + } + return bio; + } + + + int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio, const byte** p) + { + if (bio == NULL || p == NULL) + return SSL_FATAL_ERROR; + + *p = bio->mem; + + return bio->memLen; + } + + + CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len) + { + CYASSL_BIO* bio = NULL; + if (buf == NULL) + return bio; + + bio = CyaSSL_BIO_new(CyaSSL_BIO_s_mem()); + if (bio == NULL) + return bio; + + bio->memLen = len; + bio->mem = (byte*)XMALLOC(len, 0, DYNAMIC_TYPE_OPENSSL); + if (bio->mem == NULL) { + XFREE(bio, 0, DYNAMIC_TYPE_OPENSSL); + return NULL; + } + + XMEMCPY(bio->mem, buf, len); + + return bio; + } + + +#ifdef USE_WINDOWS_API + #define CloseSocket(s) closesocket(s) +#elif defined(CYASSL_MDK_ARM) + #define CloseSocket(s) closesocket(s) + extern int closesocket(int) ; +#else + #define CloseSocket(s) close(s) +#endif + + int CyaSSL_BIO_free(CYASSL_BIO* bio) + { + /* unchain?, doesn't matter in goahead since from free all */ + CYASSL_ENTER("BIO_free"); + if (bio) { + if (bio->close) { + if (bio->ssl) + CyaSSL_free(bio->ssl); + if (bio->fd) + CloseSocket(bio->fd); + } + if (bio->mem) + XFREE(bio->mem, 0, DYNAMIC_TYPE_OPENSSL); + XFREE(bio, 0, DYNAMIC_TYPE_OPENSSL); + } + return 0; + } + + + int CyaSSL_BIO_free_all(CYASSL_BIO* bio) + { + CYASSL_ENTER("BIO_free_all"); + while (bio) { + CYASSL_BIO* next = bio->next; + CyaSSL_BIO_free(bio); + bio = next; + } + return 0; + } + + + int CyaSSL_BIO_read(CYASSL_BIO* bio, void* buf, int len) + { + int ret; + CYASSL* ssl = 0; + CYASSL_BIO* front = bio; + + CYASSL_ENTER("BIO_read"); + /* already got eof, again is error */ + if (front->eof) + return SSL_FATAL_ERROR; + + while(bio && ((ssl = bio->ssl) == 0) ) + bio = bio->next; + + if (ssl == 0) return BAD_FUNC_ARG; + + ret = CyaSSL_read(ssl, buf, len); + if (ret == 0) + front->eof = 1; + else if (ret < 0) { + int err = CyaSSL_get_error(ssl, 0); + if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) + front->eof = 1; + } + return ret; + } + + + int CyaSSL_BIO_write(CYASSL_BIO* bio, const void* data, int len) + { + int ret; + CYASSL* ssl = 0; + CYASSL_BIO* front = bio; + + CYASSL_ENTER("BIO_write"); + /* already got eof, again is error */ + if (front->eof) + return SSL_FATAL_ERROR; + + while(bio && ((ssl = bio->ssl) == 0) ) + bio = bio->next; + + if (ssl == 0) return BAD_FUNC_ARG; + + ret = CyaSSL_write(ssl, data, len); + if (ret == 0) + front->eof = 1; + else if (ret < 0) { + int err = CyaSSL_get_error(ssl, 0); + if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) + front->eof = 1; + } + + return ret; + } + + + CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO* top, CYASSL_BIO* append) + { + CYASSL_ENTER("BIO_push"); + top->next = append; + append->prev = top; + + return top; + } + + + int CyaSSL_BIO_flush(CYASSL_BIO* bio) + { + /* for CyaSSL no flushing needed */ + CYASSL_ENTER("BIO_flush"); + (void)bio; + return 1; + } + + +#endif /* OPENSSL_EXTRA || GOAHEAD_WS */ + + +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + + void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX* ctx, + void* userdata) + { + CYASSL_ENTER("SSL_CTX_set_default_passwd_cb_userdata"); + ctx->userdata = userdata; + } + + + void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX* ctx, pem_password_cb cb) + { + CYASSL_ENTER("SSL_CTX_set_default_passwd_cb"); + ctx->passwd_cb = cb; + } + + int CyaSSL_num_locks(void) + { + return 0; + } + + void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, int)) + { + (void)f; + } + + void CyaSSL_set_id_callback(unsigned long (*f)(void)) + { + (void)f; + } + + unsigned long CyaSSL_ERR_get_error(void) + { + /* TODO: */ + return 0; + } + + int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER* type, + const CYASSL_EVP_MD* md, const byte* salt, + const byte* data, int sz, int count, byte* key, byte* iv) + { + int keyLen = 0; + int ivLen = 0; + + Md5 myMD; + byte digest[MD5_DIGEST_SIZE]; + + int j; + int keyLeft; + int ivLeft; + int keyOutput = 0; + + CYASSL_ENTER("EVP_BytesToKey"); + InitMd5(&myMD); + + /* only support MD5 for now */ + if (XSTRNCMP(md, "MD5", 3) != 0) return 0; + + /* only support CBC DES and AES for now */ + if (XSTRNCMP(type, "DES-CBC", 7) == 0) { + keyLen = DES_KEY_SIZE; + ivLen = DES_IV_SIZE; + } + else if (XSTRNCMP(type, "DES-EDE3-CBC", 12) == 0) { + keyLen = DES3_KEY_SIZE; + ivLen = DES_IV_SIZE; + } + else if (XSTRNCMP(type, "AES-128-CBC", 11) == 0) { + keyLen = AES_128_KEY_SIZE; + ivLen = AES_IV_SIZE; + } + else if (XSTRNCMP(type, "AES-192-CBC", 11) == 0) { + keyLen = AES_192_KEY_SIZE; + ivLen = AES_IV_SIZE; + } + else if (XSTRNCMP(type, "AES-256-CBC", 11) == 0) { + keyLen = AES_256_KEY_SIZE; + ivLen = AES_IV_SIZE; + } + else + return 0; + + keyLeft = keyLen; + ivLeft = ivLen; + + while (keyOutput < (keyLen + ivLen)) { + int digestLeft = MD5_DIGEST_SIZE; + /* D_(i - 1) */ + if (keyOutput) /* first time D_0 is empty */ + Md5Update(&myMD, digest, MD5_DIGEST_SIZE); + /* data */ + Md5Update(&myMD, data, sz); + /* salt */ + if (salt) + Md5Update(&myMD, salt, EVP_SALT_SIZE); + Md5Final(&myMD, digest); + /* count */ + for (j = 1; j < count; j++) { + Md5Update(&myMD, digest, MD5_DIGEST_SIZE); + Md5Final(&myMD, digest); + } + + if (keyLeft) { + int store = min(keyLeft, MD5_DIGEST_SIZE); + XMEMCPY(&key[keyLen - keyLeft], digest, store); + + keyOutput += store; + keyLeft -= store; + digestLeft -= store; + } + + if (ivLeft && digestLeft) { + int store = min(ivLeft, digestLeft); + XMEMCPY(&iv[ivLen - ivLeft], &digest[MD5_DIGEST_SIZE - + digestLeft], store); + keyOutput += store; + ivLeft -= store; + } + } + if (keyOutput != (keyLen + ivLen)) + return 0; + return keyOutput; + } + +#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ + + +#ifdef OPENSSL_EXTRA + + unsigned long CyaSSLeay(void) + { + return SSLEAY_VERSION_NUMBER; + } + + + const char* CyaSSLeay_version(int type) + { + static const char* version = "SSLeay CyaSSL compatibility"; + (void)type; + return version; + } + + + void CyaSSL_MD5_Init(CYASSL_MD5_CTX* md5) + { + typedef char md5_test[sizeof(MD5_CTX) >= sizeof(Md5) ? 1 : -1]; + (void)sizeof(md5_test); + + CYASSL_ENTER("MD5_Init"); + InitMd5((Md5*)md5); + } + + + void CyaSSL_MD5_Update(CYASSL_MD5_CTX* md5, const void* input, + unsigned long sz) + { + CYASSL_ENTER("CyaSSL_MD5_Update"); + Md5Update((Md5*)md5, (const byte*)input, (word32)sz); + } + + + void CyaSSL_MD5_Final(byte* input, CYASSL_MD5_CTX* md5) + { + CYASSL_ENTER("MD5_Final"); + Md5Final((Md5*)md5, input); + } + + + void CyaSSL_SHA_Init(CYASSL_SHA_CTX* sha) + { + typedef char sha_test[sizeof(SHA_CTX) >= sizeof(Sha) ? 1 : -1]; + (void)sizeof(sha_test); + + CYASSL_ENTER("SHA_Init"); + InitSha((Sha*)sha); /* OpenSSL compat, no ret */ + } + + + void CyaSSL_SHA_Update(CYASSL_SHA_CTX* sha, const void* input, + unsigned long sz) + { + CYASSL_ENTER("SHA_Update"); + ShaUpdate((Sha*)sha, (const byte*)input, (word32)sz); + } + + + void CyaSSL_SHA_Final(byte* input, CYASSL_SHA_CTX* sha) + { + CYASSL_ENTER("SHA_Final"); + ShaFinal((Sha*)sha, input); + } + + + void CyaSSL_SHA1_Init(CYASSL_SHA_CTX* sha) + { + CYASSL_ENTER("SHA1_Init"); + SHA_Init(sha); + } + + + void CyaSSL_SHA1_Update(CYASSL_SHA_CTX* sha, const void* input, + unsigned long sz) + { + CYASSL_ENTER("SHA1_Update"); + SHA_Update(sha, input, sz); + } + + + void CyaSSL_SHA1_Final(byte* input, CYASSL_SHA_CTX* sha) + { + CYASSL_ENTER("SHA1_Final"); + SHA_Final(input, sha); + } + + + void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX* sha256) + { + typedef char sha_test[sizeof(SHA256_CTX) >= sizeof(Sha256) ? 1 : -1]; + (void)sizeof(sha_test); + + CYASSL_ENTER("SHA256_Init"); + InitSha256((Sha256*)sha256); /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX* sha, const void* input, + unsigned long sz) + { + CYASSL_ENTER("SHA256_Update"); + Sha256Update((Sha256*)sha, (const byte*)input, (word32)sz); + /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA256_Final(byte* input, CYASSL_SHA256_CTX* sha) + { + CYASSL_ENTER("SHA256_Final"); + Sha256Final((Sha256*)sha, input); + /* OpenSSL compat, no error */ + } + + + #ifdef CYASSL_SHA384 + + void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX* sha) + { + typedef char sha_test[sizeof(SHA384_CTX) >= sizeof(Sha384) ? 1 : -1]; + (void)sizeof(sha_test); + + CYASSL_ENTER("SHA384_Init"); + InitSha384((Sha384*)sha); /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX* sha, const void* input, + unsigned long sz) + { + CYASSL_ENTER("SHA384_Update"); + Sha384Update((Sha384*)sha, (const byte*)input, (word32)sz); + /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA384_Final(byte* input, CYASSL_SHA384_CTX* sha) + { + CYASSL_ENTER("SHA384_Final"); + Sha384Final((Sha384*)sha, input); + /* OpenSSL compat, no error */ + } + + #endif /* CYASSL_SHA384 */ + + + #ifdef CYASSL_SHA512 + + void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX* sha) + { + typedef char sha_test[sizeof(SHA512_CTX) >= sizeof(Sha512) ? 1 : -1]; + (void)sizeof(sha_test); + + CYASSL_ENTER("SHA512_Init"); + InitSha512((Sha512*)sha); /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX* sha, const void* input, + unsigned long sz) + { + CYASSL_ENTER("SHA512_Update"); + Sha512Update((Sha512*)sha, (const byte*)input, (word32)sz); + /* OpenSSL compat, no error */ + } + + + void CyaSSL_SHA512_Final(byte* input, CYASSL_SHA512_CTX* sha) + { + CYASSL_ENTER("SHA512_Final"); + Sha512Final((Sha512*)sha, input); + /* OpenSSL compat, no error */ + } + + #endif /* CYASSL_SHA512 */ + + + const CYASSL_EVP_MD* CyaSSL_EVP_md5(void) + { + static const char* type = "MD5"; + CYASSL_ENTER("EVP_md5"); + return type; + } + + + const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void) + { + static const char* type = "SHA"; + CYASSL_ENTER("EVP_sha1"); + return type; + } + + + const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void) + { + static const char* type = "SHA256"; + CYASSL_ENTER("EVP_sha256"); + return type; + } + + #ifdef CYASSL_SHA384 + + const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void) + { + static const char* type = "SHA384"; + CYASSL_ENTER("EVP_sha384"); + return type; + } + + #endif /* CYASSL_SHA384 */ + + #ifdef CYASSL_SHA512 + + const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void) + { + static const char* type = "SHA512"; + CYASSL_ENTER("EVP_sha512"); + return type; + } + + #endif /* CYASSL_SHA512 */ + + + void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx) + { + CYASSL_ENTER("EVP_CIPHER_MD_CTX_init"); + (void)ctx; + /* do nothing */ + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void) + { + static const char* type = "AES128-CBC"; + CYASSL_ENTER("CyaSSL_EVP_aes_128_cbc"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void) + { + static const char* type = "AES192-CBC"; + CYASSL_ENTER("CyaSSL_EVP_aes_192_cbc"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void) + { + static const char* type = "AES256-CBC"; + CYASSL_ENTER("CyaSSL_EVP_aes_256_cbc"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void) + { + static const char* type = "AES128-CTR"; + CYASSL_ENTER("CyaSSL_EVP_aes_128_ctr"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void) + { + static const char* type = "AES192-CTR"; + CYASSL_ENTER("CyaSSL_EVP_aes_192_ctr"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void) + { + static const char* type = "AES256-CTR"; + CYASSL_ENTER("CyaSSL_EVP_aes_256_ctr"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void) + { + static const char* type = "DES-CBC"; + CYASSL_ENTER("CyaSSL_EVP_des_cbc"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void) + { + static const char* type = "DES-EDE3-CBC"; + CYASSL_ENTER("CyaSSL_EVP_des_ede3_cbc"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void) + { + static const char* type = "ARC4"; + CYASSL_ENTER("CyaSSL_EVP_rc4"); + return type; + } + + + const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void) + { + static const char* type = "NULL"; + CYASSL_ENTER("CyaSSL_EVP_enc_null"); + return type; + } + + + int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx) + { + CYASSL_ENTER("EVP_MD_CTX_cleanup"); + (void)ctx; + return 0; + } + + + + void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_ENTER("EVP_CIPHER_CTX_init"); + if (ctx) { + ctx->cipherType = 0xff; /* no init */ + ctx->keyLen = 0; + ctx->enc = 1; /* start in encrypt mode */ + } + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_ENTER("EVP_CIPHER_CTX_cleanup"); + if (ctx) { + ctx->cipherType = 0xff; /* no more init */ + ctx->keyLen = 0; + } + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx, + const CYASSL_EVP_CIPHER* type, byte* key, + byte* iv, int enc) + { + int ret = 0; + + CYASSL_ENTER("CyaSSL_EVP_CipherInit"); + if (ctx == NULL) { + CYASSL_MSG("no ctx"); + return 0; /* failure */ + } + + if (type == NULL && ctx->cipherType == 0xff) { + CYASSL_MSG("no type set"); + return 0; /* failure */ + } + + if (ctx->cipherType == AES_128_CBC_TYPE || (type && + XSTRNCMP(type, "AES128-CBC", 10) == 0)) { + CYASSL_MSG("AES-128-CBC"); + ctx->cipherType = AES_128_CBC_TYPE; + ctx->keyLen = 16; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } + else if (ctx->cipherType == AES_192_CBC_TYPE || (type && + XSTRNCMP(type, "AES192-CBC", 10) == 0)) { + CYASSL_MSG("AES-192-CBC"); + ctx->cipherType = AES_192_CBC_TYPE; + ctx->keyLen = 24; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } + else if (ctx->cipherType == AES_256_CBC_TYPE || (type && + XSTRNCMP(type, "AES256-CBC", 10) == 0)) { + CYASSL_MSG("AES-256-CBC"); + ctx->cipherType = AES_256_CBC_TYPE; + ctx->keyLen = 32; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } +#ifdef CYASSL_AES_COUNTER + else if (ctx->cipherType == AES_128_CTR_TYPE || (type && + XSTRNCMP(type, "AES128-CTR", 10) == 0)) { + CYASSL_MSG("AES-128-CTR"); + ctx->cipherType = AES_128_CTR_TYPE; + ctx->keyLen = 16; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + AES_ENCRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } + else if (ctx->cipherType == AES_192_CTR_TYPE || (type && + XSTRNCMP(type, "AES192-CTR", 10) == 0)) { + CYASSL_MSG("AES-192-CTR"); + ctx->cipherType = AES_192_CTR_TYPE; + ctx->keyLen = 24; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + AES_ENCRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } + else if (ctx->cipherType == AES_256_CTR_TYPE || (type && + XSTRNCMP(type, "AES256-CTR", 10) == 0)) { + CYASSL_MSG("AES-256-CTR"); + ctx->cipherType = AES_256_CTR_TYPE; + ctx->keyLen = 32; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, + AES_ENCRYPTION); + if (ret != 0) + return ret; + } + if (iv && key == NULL) { + ret = AesSetIV(&ctx->cipher.aes, iv); + if (ret != 0) + return ret; + } + } +#endif /* CYASSL_AES_CTR */ + else if (ctx->cipherType == DES_CBC_TYPE || (type && + XSTRNCMP(type, "DES-CBC", 7) == 0)) { + CYASSL_MSG("DES-CBC"); + ctx->cipherType = DES_CBC_TYPE; + ctx->keyLen = 8; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = Des_SetKey(&ctx->cipher.des, key, iv, + ctx->enc ? DES_ENCRYPTION : DES_DECRYPTION); + if (ret != 0) + return ret; + } + + if (iv && key == NULL) + Des_SetIV(&ctx->cipher.des, iv); + } + else if (ctx->cipherType == DES_EDE3_CBC_TYPE || (type && + XSTRNCMP(type, "DES-EDE3-CBC", 11) == 0)) { + CYASSL_MSG("DES-EDE3-CBC"); + ctx->cipherType = DES_EDE3_CBC_TYPE; + ctx->keyLen = 24; + if (enc == 0 || enc == 1) + ctx->enc = enc ? 1 : 0; + if (key) { + ret = Des3_SetKey(&ctx->cipher.des3, key, iv, + ctx->enc ? DES_ENCRYPTION : DES_DECRYPTION); + if (ret != 0) + return ret; + } + + if (iv && key == NULL) { + ret = Des3_SetIV(&ctx->cipher.des3, iv); + if (ret != 0) + return ret; + } + } + else if (ctx->cipherType == ARC4_TYPE || (type && + XSTRNCMP(type, "ARC4", 4) == 0)) { + CYASSL_MSG("ARC4"); + ctx->cipherType = ARC4_TYPE; + if (ctx->keyLen == 0) /* user may have already set */ + ctx->keyLen = 16; /* default to 128 */ + if (key) + Arc4SetKey(&ctx->cipher.arc4, key, ctx->keyLen); + } + else if (ctx->cipherType == NULL_CIPHER_TYPE || (type && + XSTRNCMP(type, "NULL", 4) == 0)) { + CYASSL_MSG("NULL cipher"); + ctx->cipherType = NULL_CIPHER_TYPE; + ctx->keyLen = 0; + } + else + return 0; /* failure */ + + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_ENTER("CyaSSL_EVP_CIPHER_CTX_key_length"); + if (ctx) + return ctx->keyLen; + + return 0; /* failure */ + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx, + int keylen) + { + CYASSL_ENTER("CyaSSL_EVP_CIPHER_CTX_set_key_length"); + if (ctx) + ctx->keyLen = keylen; + else + return 0; /* failure */ + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src, + word32 len) + { + int ret = 0; + CYASSL_ENTER("CyaSSL_EVP_Cipher"); + + if (ctx == NULL || dst == NULL || src == NULL) { + CYASSL_MSG("Bad function argument"); + return 0; /* failure */ + } + + if (ctx->cipherType == 0xff) { + CYASSL_MSG("no init"); + return 0; /* failure */ + } + + switch (ctx->cipherType) { + + case AES_128_CBC_TYPE : + case AES_192_CBC_TYPE : + case AES_256_CBC_TYPE : + CYASSL_MSG("AES CBC"); + if (ctx->enc) + ret = AesCbcEncrypt(&ctx->cipher.aes, dst, src, len); + else + ret = AesCbcDecrypt(&ctx->cipher.aes, dst, src, len); + break; + +#ifdef CYASSL_AES_COUNTER + case AES_128_CTR_TYPE : + case AES_192_CTR_TYPE : + case AES_256_CTR_TYPE : + CYASSL_MSG("AES CTR"); + AesCtrEncrypt(&ctx->cipher.aes, dst, src, len); + break; +#endif + + case DES_CBC_TYPE : + if (ctx->enc) + Des_CbcEncrypt(&ctx->cipher.des, dst, src, len); + else + Des_CbcDecrypt(&ctx->cipher.des, dst, src, len); + break; + + case DES_EDE3_CBC_TYPE : + if (ctx->enc) + ret = Des3_CbcEncrypt(&ctx->cipher.des3, dst, src, len); + else + ret = Des3_CbcDecrypt(&ctx->cipher.des3, dst, src, len); + break; + + case ARC4_TYPE : + Arc4Process(&ctx->cipher.arc4, dst, src, len); + break; + + case NULL_CIPHER_TYPE : + XMEMCPY(dst, src, len); + break; + + default: { + CYASSL_MSG("bad type"); + return 0; /* failure */ + } + } + + if (ret != 0) { + CYASSL_MSG("CyaSSL_EVP_Cipher failure"); + return 0; /* failuer */ + } + + CYASSL_MSG("CyaSSL_EVP_Cipher success"); + return SSL_SUCCESS; /* success */ + } + + + /* store for external read of iv, SSL_SUCCESS on success */ + int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_ENTER("CyaSSL_StoreExternalIV"); + + if (ctx == NULL) { + CYASSL_MSG("Bad function argument"); + return SSL_FATAL_ERROR; + } + + switch (ctx->cipherType) { + + case AES_128_CBC_TYPE : + case AES_192_CBC_TYPE : + case AES_256_CBC_TYPE : + CYASSL_MSG("AES CBC"); + memcpy(ctx->iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); + break; + +#ifdef CYASSL_AES_COUNTER + case AES_128_CTR_TYPE : + case AES_192_CTR_TYPE : + case AES_256_CTR_TYPE : + CYASSL_MSG("AES CTR"); + memcpy(ctx->iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); + break; +#endif + + case DES_CBC_TYPE : + CYASSL_MSG("DES CBC"); + memcpy(ctx->iv, &ctx->cipher.des.reg, DES_BLOCK_SIZE); + break; + + case DES_EDE3_CBC_TYPE : + CYASSL_MSG("DES EDE3 CBC"); + memcpy(ctx->iv, &ctx->cipher.des.reg, DES_BLOCK_SIZE); + break; + + case ARC4_TYPE : + CYASSL_MSG("ARC4"); + break; + + case NULL_CIPHER_TYPE : + CYASSL_MSG("NULL"); + break; + + default: { + CYASSL_MSG("bad type"); + return SSL_FATAL_ERROR; + } + } + return SSL_SUCCESS; + } + + + /* set internal IV from external, SSL_SUCCESS on success */ + int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx) + { + + CYASSL_ENTER("CyaSSL_SetInternalIV"); + + if (ctx == NULL) { + CYASSL_MSG("Bad function argument"); + return SSL_FATAL_ERROR; + } + + switch (ctx->cipherType) { + + case AES_128_CBC_TYPE : + case AES_192_CBC_TYPE : + case AES_256_CBC_TYPE : + CYASSL_MSG("AES CBC"); + memcpy(&ctx->cipher.aes.reg, ctx->iv, AES_BLOCK_SIZE); + break; + +#ifdef CYASSL_AES_COUNTER + case AES_128_CTR_TYPE : + case AES_192_CTR_TYPE : + case AES_256_CTR_TYPE : + CYASSL_MSG("AES CTR"); + memcpy(&ctx->cipher.aes.reg, ctx->iv, AES_BLOCK_SIZE); + break; +#endif + + case DES_CBC_TYPE : + CYASSL_MSG("DES CBC"); + memcpy(&ctx->cipher.des.reg, ctx->iv, DES_BLOCK_SIZE); + break; + + case DES_EDE3_CBC_TYPE : + CYASSL_MSG("DES EDE3 CBC"); + memcpy(&ctx->cipher.des.reg, ctx->iv, DES_BLOCK_SIZE); + break; + + case ARC4_TYPE : + CYASSL_MSG("ARC4"); + break; + + case NULL_CIPHER_TYPE : + CYASSL_MSG("NULL"); + break; + + default: { + CYASSL_MSG("bad type"); + return SSL_FATAL_ERROR; + } + } + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, const CYASSL_EVP_MD* type) + { + CYASSL_ENTER("EVP_DigestInit"); + if (XSTRNCMP(type, "MD5", 3) == 0) { + ctx->macType = MD5; + CyaSSL_MD5_Init((MD5_CTX*)&ctx->hash); + } + else if (XSTRNCMP(type, "SHA256", 6) == 0) { + ctx->macType = SHA256; + CyaSSL_SHA256_Init((SHA256_CTX*)&ctx->hash); + } + #ifdef CYASSL_SHA384 + else if (XSTRNCMP(type, "SHA384", 6) == 0) { + ctx->macType = SHA384; + CyaSSL_SHA384_Init((SHA384_CTX*)&ctx->hash); + } + #endif + #ifdef CYASSL_SHA512 + else if (XSTRNCMP(type, "SHA512", 6) == 0) { + ctx->macType = SHA512; + CyaSSL_SHA512_Init((SHA512_CTX*)&ctx->hash); + } + #endif + /* has to be last since would pick or 256, 384, or 512 too */ + else if (XSTRNCMP(type, "SHA", 3) == 0) { + ctx->macType = SHA; + CyaSSL_SHA_Init((SHA_CTX*)&ctx->hash); + } + else + return BAD_FUNC_ARG; + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data, + unsigned long sz) + { + CYASSL_ENTER("EVP_DigestUpdate"); + if (ctx->macType == MD5) + CyaSSL_MD5_Update((MD5_CTX*)&ctx->hash, data, (unsigned long)sz); + else if (ctx->macType == SHA) + CyaSSL_SHA_Update((SHA_CTX*)&ctx->hash, data, (unsigned long)sz); + else if (ctx->macType == SHA256) + CyaSSL_SHA256_Update((SHA256_CTX*)&ctx->hash, data, + (unsigned long)sz); + #ifdef CYASSL_SHA384 + else if (ctx->macType == SHA384) + CyaSSL_SHA384_Update((SHA384_CTX*)&ctx->hash, data, + (unsigned long)sz); + #endif + #ifdef CYASSL_SHA512 + else if (ctx->macType == SHA512) + CyaSSL_SHA512_Update((SHA512_CTX*)&ctx->hash, data, + (unsigned long)sz); + #endif + else + return BAD_FUNC_ARG; + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, + unsigned int* s) + { + CYASSL_ENTER("EVP_DigestFinal"); + if (ctx->macType == MD5) { + CyaSSL_MD5_Final(md, (MD5_CTX*)&ctx->hash); + if (s) *s = MD5_DIGEST_SIZE; + } + else if (ctx->macType == SHA) { + CyaSSL_SHA_Final(md, (SHA_CTX*)&ctx->hash); + if (s) *s = SHA_DIGEST_SIZE; + } + else if (ctx->macType == SHA256) { + CyaSSL_SHA256_Final(md, (SHA256_CTX*)&ctx->hash); + if (s) *s = SHA256_DIGEST_SIZE; + } + #ifdef CYASSL_SHA384 + else if (ctx->macType == SHA384) { + CyaSSL_SHA384_Final(md, (SHA384_CTX*)&ctx->hash); + if (s) *s = SHA384_DIGEST_SIZE; + } + #endif + #ifdef CYASSL_SHA512 + else if (ctx->macType == SHA512) { + CyaSSL_SHA512_Final(md, (SHA512_CTX*)&ctx->hash); + if (s) *s = SHA512_DIGEST_SIZE; + } + #endif + else + return BAD_FUNC_ARG; + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, + unsigned int* s) + { + CYASSL_ENTER("EVP_DigestFinal_ex"); + return EVP_DigestFinal(ctx, md, s); + } + + + unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, const void* key, + int key_len, const unsigned char* d, int n, + unsigned char* md, unsigned int* md_len) + { + Hmac hmac; + + CYASSL_ENTER("HMAC"); + if (!md) return NULL; /* no static buffer support */ + + if (XSTRNCMP(evp_md, "MD5", 3) == 0) { + if (HmacSetKey(&hmac, MD5, (const byte*)key, key_len) != 0) + return NULL; + + if (md_len) *md_len = MD5_DIGEST_SIZE; + } + else if (XSTRNCMP(evp_md, "SHA", 3) == 0) { + if (HmacSetKey(&hmac, SHA, (const byte*)key, key_len) != 0) + return NULL; + + if (md_len) *md_len = SHA_DIGEST_SIZE; + } + else + return NULL; + + if (HmacUpdate(&hmac, d, n) != 0) + return NULL; + + if (HmacFinal(&hmac, md) != 0) + return NULL; + + return md; + } + + void CyaSSL_ERR_clear_error(void) + { + /* TODO: */ + } + + + int CyaSSL_RAND_status(void) + { + return SSL_SUCCESS; /* CTaoCrypt provides enough seed internally */ + } + + + + void CyaSSL_RAND_add(const void* add, int len, double entropy) + { + (void)add; + (void)len; + (void)entropy; + + /* CyaSSL seeds/adds internally, use explicit RNG if you want + to take control */ + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key, + CYASSL_DES_key_schedule* schedule) + { + CYASSL_ENTER("DES_key_sched"); + XMEMCPY(schedule, key, sizeof(const_DES_cblock)); + return SSL_SUCCESS; + } + + + void CyaSSL_DES_cbc_encrypt(const unsigned char* input, + unsigned char* output, long length, + CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, + int enc) + { + Des myDes; + + CYASSL_ENTER("DES_cbc_encrypt"); + + /* OpenSSL compat, no ret */ + Des_SetKey(&myDes, (const byte*)schedule, (const byte*)ivec, !enc); + + if (enc) + Des_CbcEncrypt(&myDes, output, input, (word32)length); + else + Des_CbcDecrypt(&myDes, output, input, (word32)length); + } + + + /* correctly sets ivec for next call */ + void CyaSSL_DES_ncbc_encrypt(const unsigned char* input, + unsigned char* output, long length, + CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, + int enc) + { + Des myDes; + + CYASSL_ENTER("DES_ncbc_encrypt"); + + /* OpenSSL compat, no ret */ + Des_SetKey(&myDes, (const byte*)schedule, (const byte*)ivec, !enc); + + if (enc) + Des_CbcEncrypt(&myDes, output, input, (word32)length); + else + Des_CbcDecrypt(&myDes, output, input, (word32)length); + + XMEMCPY(ivec, output + length - sizeof(DES_cblock), sizeof(DES_cblock)); + } + + + void CyaSSL_ERR_free_strings(void) + { + /* handled internally */ + } + + + void CyaSSL_ERR_remove_state(unsigned long state) + { + /* TODO: GetErrors().Remove(); */ + (void)state; + } + + + void CyaSSL_EVP_cleanup(void) + { + /* nothing to do here */ + } + + + void CyaSSL_cleanup_all_ex_data(void) + { + /* nothing to do here */ + } + + + long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode) + { + /* SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER is CyaSSL default mode */ + + CYASSL_ENTER("SSL_CTX_set_mode"); + if (mode == SSL_MODE_ENABLE_PARTIAL_WRITE) + ctx->partialWrite = 1; + + return mode; + } + + + long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx) + { + /* TODO: */ + (void)ctx; + return 0; + } + + + void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m) + { + /* TODO: maybe? */ + (void)ctx; + (void)m; + } + + + int CyaSSL_CTX_set_session_id_context(CYASSL_CTX* ctx, + const unsigned char* sid_ctx, + unsigned int sid_ctx_len) + { + /* No application specific context needed for cyaSSL */ + (void)ctx; + (void)sid_ctx; + (void)sid_ctx_len; + return SSL_SUCCESS; + } + + + long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX* ctx) + { + /* TODO: maybe? */ + (void)ctx; + return (~0); + } + + unsigned long CyaSSL_ERR_get_error_line_data(const char** file, int* line, + const char** data, int *flags) + { + /* Not implemented */ + (void)file; + (void)line; + (void)data; + (void)flags; + return 0; + } + +#endif /* OPENSSL_EXTRA */ + + +#if defined(KEEP_PEER_CERT) + + CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_peer_certificate"); + if (ssl->peerCert.issuer.sz) + return &ssl->peerCert; + else + return 0; + } + +#endif /* KEEP_PEER_CERT */ + + +#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) + + void CyaSSL_FreeX509(CYASSL_X509* x509) + { + CYASSL_ENTER("CyaSSL_FreeX509"); + FreeX509(x509); + } + + + /* return the next, if any, altname from the peer cert */ + char* CyaSSL_X509_get_next_altname(CYASSL_X509* cert) + { + char* ret = NULL; + CYASSL_ENTER("CyaSSL_X509_get_next_altname"); + + /* don't have any to work with */ + if (cert == NULL || cert->altNames == NULL) + return NULL; + + /* already went through them */ + if (cert->altNamesNext == NULL) + return NULL; + + ret = cert->altNamesNext->name; + cert->altNamesNext = cert->altNamesNext->next; + + return ret; + } + + + CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509* cert) + { + CYASSL_ENTER("X509_get_issuer_name"); + return &cert->issuer; + } + + + CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509* cert) + { + CYASSL_ENTER("X509_get_subject_name"); + return &cert->subject; + } + + + int CyaSSL_X509_get_isCA(CYASSL_X509* x509) + { + int isCA = 0; + + CYASSL_ENTER("CyaSSL_X509_get_isCA"); + + if (x509 != NULL) + isCA = x509->isCa; + + CYASSL_LEAVE("CyaSSL_X509_get_isCA", isCA); + + return isCA; + } + + +#ifdef OPENSSL_EXTRA + int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509* x509, int nid) + { + int isSet = 0; + + CYASSL_ENTER("CyaSSL_X509_ext_isSet_by_NID"); + + if (x509 != NULL) { + switch (nid) { + case BASIC_CA_OID: isSet = x509->basicConstSet; break; + case ALT_NAMES_OID: isSet = x509->subjAltNameSet; break; + case AUTH_KEY_OID: isSet = x509->authKeyIdSet; break; + case SUBJ_KEY_OID: isSet = x509->subjKeyIdSet; break; + case KEY_USAGE_OID: isSet = x509->keyUsageSet; break; + #ifdef CYASSL_SEP + case CERT_POLICY_OID: isSet = x509->certPolicySet; break; + #endif /* CYASSL_SEP */ + } + } + + CYASSL_LEAVE("CyaSSL_X509_ext_isSet_by_NID", isSet); + + return isSet; + } + + + int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509* x509, int nid) + { + int crit = 0; + + CYASSL_ENTER("CyaSSL_X509_ext_get_critical_by_NID"); + + if (x509 != NULL) { + switch (nid) { + case BASIC_CA_OID: crit = x509->basicConstCrit; break; + case ALT_NAMES_OID: crit = x509->subjAltNameCrit; break; + case AUTH_KEY_OID: crit = x509->authKeyIdCrit; break; + case SUBJ_KEY_OID: crit = x509->subjKeyIdCrit; break; + case KEY_USAGE_OID: crit = x509->keyUsageCrit; break; + #ifdef CYASSL_SEP + case CERT_POLICY_OID: crit = x509->certPolicyCrit; break; + #endif /* CYASSL_SEP */ + } + } + + CYASSL_LEAVE("CyaSSL_X509_ext_get_critical_by_NID", crit); + + return crit; + } + + + int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509* x509) + { + int isSet = 0; + + CYASSL_ENTER("CyaSSL_X509_get_isSet_pathLength"); + + if (x509 != NULL) + isSet = x509->basicConstPlSet; + + CYASSL_LEAVE("CyaSSL_X509_get_isSet_pathLength", isSet); + + return isSet; + } + + + word32 CyaSSL_X509_get_pathLength(CYASSL_X509* x509) + { + word32 pathLength = 0; + + CYASSL_ENTER("CyaSSL_X509_get_pathLength"); + + if (x509 != NULL) + pathLength = x509->pathLength; + + CYASSL_LEAVE("CyaSSL_X509_get_pathLength", pathLength); + + return pathLength; + } + + + unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509* x509) + { + word16 usage = 0; + + CYASSL_ENTER("CyaSSL_X509_get_keyUsage"); + + if (x509 != NULL) + usage = x509->keyUsage; + + CYASSL_LEAVE("CyaSSL_X509_get_keyUsage", usage); + + return usage; + } + + + byte* CyaSSL_X509_get_authorityKeyID( + CYASSL_X509* x509, byte* dst, int* dstLen) + { + byte *id = NULL; + int copySz = 0; + + CYASSL_ENTER("CyaSSL_X509_get_authorityKeyID"); + + if (x509 != NULL) { + if (x509->authKeyIdSet) { + copySz = min(dstLen != NULL ? *dstLen : 0, + (int)x509->authKeyIdSz); + id = x509->authKeyId; + } + + if (dst != NULL && dstLen != NULL && id != NULL && copySz > 0) { + XMEMCPY(dst, id, copySz); + id = dst; + *dstLen = copySz; + } + } + + CYASSL_LEAVE("CyaSSL_X509_get_authorityKeyID", copySz); + + return id; + } + + + byte* CyaSSL_X509_get_subjectKeyID( + CYASSL_X509* x509, byte* dst, int* dstLen) + { + byte *id = NULL; + int copySz = 0; + + CYASSL_ENTER("CyaSSL_X509_get_subjectKeyID"); + + if (x509 != NULL) { + if (x509->subjKeyIdSet) { + copySz = min(dstLen != NULL ? *dstLen : 0, + (int)x509->subjKeyIdSz); + id = x509->subjKeyId; + } + + if (dst != NULL && dstLen != NULL && id != NULL && copySz > 0) { + XMEMCPY(dst, id, copySz); + id = dst; + *dstLen = copySz; + } + } + + CYASSL_LEAVE("CyaSSL_X509_get_subjectKeyID", copySz); + + return id; + } + + + int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME* name) + { + int count = 0; + + CYASSL_ENTER("CyaSSL_X509_NAME_entry_count"); + + if (name != NULL) + count = name->fullName.entryCount; + + CYASSL_LEAVE("CyaSSL_X509_NAME_entry_count", count); + return count; + } + + + int CyaSSL_X509_NAME_get_text_by_NID(CYASSL_X509_NAME* name, + int nid, char* buf, int len) + { + char *text = NULL; + int textSz = 0; + + CYASSL_ENTER("CyaSSL_X509_NAME_get_text_by_NID"); + + switch (nid) { + case ASN_COMMON_NAME: + text = name->fullName.fullName + name->fullName.cnIdx; + textSz = name->fullName.cnLen; + break; + case ASN_SUR_NAME: + text = name->fullName.fullName + name->fullName.snIdx; + textSz = name->fullName.snLen; + break; + case ASN_SERIAL_NUMBER: + text = name->fullName.fullName + name->fullName.serialIdx; + textSz = name->fullName.serialLen; + break; + case ASN_COUNTRY_NAME: + text = name->fullName.fullName + name->fullName.cIdx; + textSz = name->fullName.cLen; + break; + case ASN_LOCALITY_NAME: + text = name->fullName.fullName + name->fullName.lIdx; + textSz = name->fullName.lLen; + break; + case ASN_STATE_NAME: + text = name->fullName.fullName + name->fullName.stIdx; + textSz = name->fullName.stLen; + break; + case ASN_ORG_NAME: + text = name->fullName.fullName + name->fullName.oIdx; + textSz = name->fullName.oLen; + break; + case ASN_ORGUNIT_NAME: + text = name->fullName.fullName + name->fullName.ouIdx; + textSz = name->fullName.ouLen; + break; + default: + break; + } + + if (buf != NULL && text != NULL) { + textSz = min(textSz, len); + XMEMCPY(buf, text, textSz); + buf[textSz] = '\0'; + } + + CYASSL_LEAVE("CyaSSL_X509_NAME_get_text_by_NID", textSz); + return textSz; + } +#endif + + + /* copy name into in buffer, at most sz bytes, if buffer is null will + malloc buffer, call responsible for freeing */ + char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME* name, char* in, int sz) + { + int copySz = min(sz, name->sz); + + CYASSL_ENTER("CyaSSL_X509_NAME_oneline"); + if (!name->sz) return in; + + if (!in) { + in = (char*)XMALLOC(name->sz, 0, DYNAMIC_TYPE_OPENSSL); + if (!in ) return in; + copySz = name->sz; + } + + if (copySz == 0) + return in; + + XMEMCPY(in, name->name, copySz - 1); + in[copySz - 1] = 0; + + return in; + } + + + int CyaSSL_X509_get_signature_type(CYASSL_X509* x509) + { + int type = 0; + + CYASSL_ENTER("CyaSSL_X509_get_signature_type"); + + if (x509 != NULL) + type = x509->sigOID; + + return type; + } + + + int CyaSSL_X509_get_signature(CYASSL_X509* x509, + unsigned char* buf, int* bufSz) + { + CYASSL_ENTER("CyaSSL_X509_get_signature"); + if (x509 == NULL || bufSz == NULL || *bufSz < (int)x509->sig.length) + return SSL_FATAL_ERROR; + + if (buf != NULL) + XMEMCPY(buf, x509->sig.buffer, x509->sig.length); + *bufSz = x509->sig.length; + + return SSL_SUCCESS; + } + + + /* write X509 serial number in unsigned binary to buffer + buffer needs to be at least EXTERNAL_SERIAL_SIZE (32) for all cases + return SSL_SUCCESS on success */ + int CyaSSL_X509_get_serial_number(CYASSL_X509* x509, byte* in, int* inOutSz) + { + CYASSL_ENTER("CyaSSL_X509_get_serial_number"); + if (x509 == NULL || in == NULL || + inOutSz == NULL || *inOutSz < x509->serialSz) + return BAD_FUNC_ARG; + + XMEMCPY(in, x509->serial, x509->serialSz); + *inOutSz = x509->serialSz; + + return SSL_SUCCESS; + } + + + const byte* CyaSSL_X509_get_der(CYASSL_X509* x509, int* outSz) + { + CYASSL_ENTER("CyaSSL_X509_get_der"); + + if (x509 == NULL || outSz == NULL) + return NULL; + + *outSz = (int)x509->derCert.length; + return x509->derCert.buffer; + } + + + int CyaSSL_X509_version(CYASSL_X509* x509) + { + CYASSL_ENTER("CyaSSL_X509_version"); + + if (x509 == NULL) + return 0; + + return x509->version; + } + + + const byte* CyaSSL_X509_notBefore(CYASSL_X509* x509) + { + CYASSL_ENTER("CyaSSL_X509_notBefore"); + + if (x509 == NULL) + return NULL; + + return x509->notBefore; + } + + + const byte* CyaSSL_X509_notAfter(CYASSL_X509* x509) + { + CYASSL_ENTER("CyaSSL_X509_notAfter"); + + if (x509 == NULL) + return NULL; + + return x509->notAfter; + } + + +#ifdef CYASSL_SEP + +/* copy oid into in buffer, at most *inOutSz bytes, if buffer is null will + malloc buffer, call responsible for freeing. Actual size returned in + *inOutSz. Requires inOutSz be non-null */ +byte* CyaSSL_X509_get_device_type(CYASSL_X509* x509, byte* in, int *inOutSz) +{ + int copySz; + + CYASSL_ENTER("CyaSSL_X509_get_dev_type"); + if (inOutSz == NULL) return NULL; + if (!x509->deviceTypeSz) return in; + + copySz = min(*inOutSz, x509->deviceTypeSz); + + if (!in) { + in = (byte*)XMALLOC(x509->deviceTypeSz, 0, DYNAMIC_TYPE_OPENSSL); + if (!in) return in; + copySz = x509->deviceTypeSz; + } + + XMEMCPY(in, x509->deviceType, copySz); + *inOutSz = copySz; + + return in; +} + + +byte* CyaSSL_X509_get_hw_type(CYASSL_X509* x509, byte* in, int* inOutSz) +{ + int copySz; + + CYASSL_ENTER("CyaSSL_X509_get_hw_type"); + if (inOutSz == NULL) return NULL; + if (!x509->hwTypeSz) return in; + + copySz = min(*inOutSz, x509->hwTypeSz); + + if (!in) { + in = (byte*)XMALLOC(x509->hwTypeSz, 0, DYNAMIC_TYPE_OPENSSL); + if (!in) return in; + copySz = x509->hwTypeSz; + } + + XMEMCPY(in, x509->hwType, copySz); + *inOutSz = copySz; + + return in; +} + + +byte* CyaSSL_X509_get_hw_serial_number(CYASSL_X509* x509,byte* in,int* inOutSz) +{ + int copySz; + + CYASSL_ENTER("CyaSSL_X509_get_hw_serial_number"); + if (inOutSz == NULL) return NULL; + if (!x509->hwTypeSz) return in; + + copySz = min(*inOutSz, x509->hwSerialNumSz); + + if (!in) { + in = (byte*)XMALLOC(x509->hwSerialNumSz, 0, DYNAMIC_TYPE_OPENSSL); + if (!in) return in; + copySz = x509->hwSerialNumSz; + } + + XMEMCPY(in, x509->hwSerialNum, copySz); + *inOutSz = copySz; + + return in; +} + +#endif /* CYASSL_SEP */ + + +CYASSL_X509* CyaSSL_X509_d2i(CYASSL_X509** x509, const byte* in, int len) +{ + CYASSL_X509 *newX509 = NULL; + + CYASSL_ENTER("CyaSSL_X509_d2i"); + + if (in != NULL && len != 0) { + DecodedCert cert; + + InitDecodedCert(&cert, (byte*)in, len, NULL); + if (ParseCertRelative(&cert, CERT_TYPE, 0, NULL) == 0) { + newX509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), + NULL, DYNAMIC_TYPE_X509); + if (newX509 != NULL) { + InitX509(newX509, 1); + if (CopyDecodedToX509(newX509, &cert) != 0) { + XFREE(newX509, NULL, DYNAMIC_TYPE_X509); + newX509 = NULL; + } + } + } + FreeDecodedCert(&cert); + } + + if (x509 != NULL) + *x509 = newX509; + + return newX509; +} + + +#ifndef NO_FILESYSTEM + +#ifndef NO_STDIO_FILESYSTEM + +CYASSL_X509* CyaSSL_X509_d2i_fp(CYASSL_X509** x509, XFILE file) +{ + CYASSL_X509* newX509 = NULL; + + CYASSL_ENTER("CyaSSL_X509_d2i_fp"); + + if (file != XBADFILE) { + byte* fileBuffer = NULL; + long sz = 0; + + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + fileBuffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_FILE); + if (fileBuffer != NULL) { + if ((int)XFREAD(fileBuffer, sz, 1, file) > 0) { + newX509 = CyaSSL_X509_d2i(NULL, fileBuffer, (int)sz); + } + XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); + } + } + + if (x509 != NULL) + *x509 = newX509; + + return newX509; +} + +#endif /* NO_STDIO_FILESYSTEM */ + +CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format) +{ + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* fileBuffer = staticBuffer; + int dynamic = 0; + long sz = 0; + XFILE file; + CYASSL_X509* x509 = NULL; + buffer der; + + CYASSL_ENTER("CyaSSL_X509_load_certificate"); + + /* Check the inputs */ + if ((fname == NULL) || + (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)) + return NULL; + + file = XFOPEN(fname, "rb"); + if (file == XBADFILE) return NULL; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + + if (sz > (long)sizeof(staticBuffer)) { + fileBuffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_FILE); + if (fileBuffer == NULL) { + XFCLOSE(file); + return NULL; + } + dynamic = 1; + } + if ((int)XFREAD(fileBuffer, sz, 1, file) < 0) { + XFCLOSE(file); + if (dynamic) XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); + return NULL; + } + XFCLOSE(file); + + der.buffer = NULL; + der.length = 0; + + if (format == SSL_FILETYPE_PEM) { + EncryptedInfo info; + int ecc = 0; + + info.set = 0; + info.ctx = NULL; + info.consumed = 0; + + if (PemToDer(fileBuffer, sz, CERT_TYPE, &der, NULL, &info, &ecc) != 0) + { + /* Only time this should fail, and leave `der` with a buffer + is when the Base64 Decode fails. Release `der.buffer` in + that case. */ + if (der.buffer != NULL) { + XFREE(der.buffer, NULL, DYNAMIC_TYPE_CERT); + der.buffer = NULL; + } + } + } + else { + der.buffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_CERT); + if (der.buffer != NULL) { + XMEMCPY(der.buffer, fileBuffer, sz); + der.length = (word32)sz; + } + } + if (dynamic) XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); + + /* At this point we want `der` to have the certificate in DER format */ + /* ready to be decoded. */ + if (der.buffer != NULL) { + DecodedCert cert; + + InitDecodedCert(&cert, der.buffer, der.length, NULL); + if (ParseCertRelative(&cert, CERT_TYPE, 0, NULL) == 0) { + x509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), + NULL, DYNAMIC_TYPE_X509); + if (x509 != NULL) { + InitX509(x509, 1); + if (CopyDecodedToX509(x509, &cert) != 0) { + XFREE(x509, NULL, DYNAMIC_TYPE_X509); + x509 = NULL; + } + } + } + FreeDecodedCert(&cert); + + XFREE(der.buffer, NULL, DYNAMIC_TYPE_CERT); + } + + return x509; +} + +#endif /* NO_FILESYSTEM */ + +#endif /* KEEP_PEER_CERT || SESSION_CERTS */ + + +#ifdef OPENSSL_EXTRA + int CyaSSL_set_ex_data(CYASSL* ssl, int idx, void* data) + { +#ifdef FORTRESS + if (ssl != NULL && idx < MAX_EX_DATA) + { + ssl->ex_data[idx] = data; + return SSL_SUCCESS; + } +#else + (void)ssl; + (void)idx; + (void)data; +#endif + return SSL_FAILURE; + } + + + int CyaSSL_set_session_id_context(CYASSL* ssl, const unsigned char* id, + unsigned int len) + { + (void)ssl; + (void)id; + (void)len; + return 0; + } + + + void CyaSSL_set_connect_state(CYASSL* ssl) + { + (void)ssl; + /* client by default */ + } +#endif + + int CyaSSL_get_shutdown(const CYASSL* ssl) + { + return (ssl->options.isClosed || + ssl->options.connReset || + ssl->options.sentNotify); + } + + + int CyaSSL_session_reused(CYASSL* ssl) + { + return ssl->options.resuming; + } + +#ifdef OPENSSL_EXTRA + void CyaSSL_SESSION_free(CYASSL_SESSION* session) + { + (void)session; + } +#endif + + const char* CyaSSL_get_version(CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_version"); + if (ssl->version.major == SSLv3_MAJOR) { + switch (ssl->version.minor) { + case SSLv3_MINOR : + return "SSLv3"; + case TLSv1_MINOR : + return "TLSv1"; + case TLSv1_1_MINOR : + return "TLSv1.1"; + case TLSv1_2_MINOR : + return "TLSv1.2"; + default: + return "unknown"; + } + } + else if (ssl->version.major == DTLS_MAJOR) { + switch (ssl->version.minor) { + case DTLS_MINOR : + return "DTLS"; + case DTLSv1_2_MINOR : + return "DTLSv1.2"; + default: + return "unknown"; + } + } + return "unknown"; + } + + int CyaSSL_get_current_cipher_suite(CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_current_cipher_suite"); + if (ssl) + return (ssl->options.cipherSuite0 << 8) | ssl->options.cipherSuite; + return 0; + } + + CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL* ssl) + { + CYASSL_ENTER("SSL_get_current_cipher"); + if (ssl) + return &ssl->cipher; + else + return NULL; + } + + + const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher) + { + (void)cipher; + + CYASSL_ENTER("SSL_CIPHER_get_name"); +#ifndef NO_ERROR_STRINGS + if (cipher) { +#ifdef HAVE_ECC + if (cipher->ssl->options.cipherSuite0 == ECC_BYTE) { + /* ECC suites */ + switch (cipher->ssl->options.cipherSuite) { +#ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : + return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"; +#endif + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : + return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"; +#ifndef NO_RSA + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : + return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256"; +#endif + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : + return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"; +#ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : + return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"; +#endif + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : + return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"; +#ifndef NO_RSA + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : + return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384"; +#endif + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : + return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384"; +#ifndef NO_SHA + #ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : + return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"; + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : + return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"; + #endif + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : + return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"; + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : + return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"; + #ifndef NO_RC4 + #ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_RC4_128_SHA : + return "TLS_ECDHE_RSA_WITH_RC4_128_SHA"; + #endif + case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : + return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"; + #endif + #ifndef NO_DES3 + #ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : + return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"; + #endif + case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : + return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"; + #endif + + #ifndef NO_RSA + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : + return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA"; + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : + return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA"; + #endif + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : + return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA"; + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : + return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA"; + #ifndef NO_RC4 + #ifndef NO_RSA + case TLS_ECDH_RSA_WITH_RC4_128_SHA : + return "TLS_ECDH_RSA_WITH_RC4_128_SHA"; + #endif + case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : + return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA"; + #endif + #ifndef NO_DES3 + #ifndef NO_RSA + case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : + return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA"; + #endif + case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : + return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA"; + #endif +#endif /* NO_SHA */ + +#ifdef HAVE_AESGCM + #ifndef NO_RSA + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : + return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; + case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : + return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; + #endif + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : + return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"; + case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : + return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"; + #ifndef NO_RSA + case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : + return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"; + case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : + return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384"; + #endif + case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : + return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256"; + case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : + return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384"; +#endif + +#ifdef HAVE_AESCCM + #ifndef NO_RSA + case TLS_RSA_WITH_AES_128_CCM_8 : + return "TLS_RSA_WITH_AES_128_CCM_8"; + case TLS_RSA_WITH_AES_256_CCM_8 : + return "TLS_RSA_WITH_AES_256_CCM_8"; + #endif + case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: + return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"; + case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : + return "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8"; +#endif + + default: + return "NONE"; + } + } +#endif /* ECC */ + if (cipher->ssl->options.cipherSuite0 != ECC_BYTE) { + /* normal suites */ + switch (cipher->ssl->options.cipherSuite) { +#ifndef NO_RSA + #ifndef NO_RC4 + #ifndef NO_SHA + case SSL_RSA_WITH_RC4_128_SHA : + return "SSL_RSA_WITH_RC4_128_SHA"; + #endif + #ifndef NO_MD5 + case SSL_RSA_WITH_RC4_128_MD5 : + return "SSL_RSA_WITH_RC4_128_MD5"; + #endif + #endif + #ifndef NO_SHA + #ifndef NO_DES3 + case SSL_RSA_WITH_3DES_EDE_CBC_SHA : + return "SSL_RSA_WITH_3DES_EDE_CBC_SHA"; + #endif + case TLS_RSA_WITH_AES_128_CBC_SHA : + return "TLS_RSA_WITH_AES_128_CBC_SHA"; + case TLS_RSA_WITH_AES_256_CBC_SHA : + return "TLS_RSA_WITH_AES_256_CBC_SHA"; + #endif + case TLS_RSA_WITH_AES_128_CBC_SHA256 : + return "TLS_RSA_WITH_AES_128_CBC_SHA256"; + case TLS_RSA_WITH_AES_256_CBC_SHA256 : + return "TLS_RSA_WITH_AES_256_CBC_SHA256"; + #ifdef HAVE_BLAKE2 + case TLS_RSA_WITH_AES_128_CBC_B2B256: + return "TLS_RSA_WITH_AES_128_CBC_B2B256"; + case TLS_RSA_WITH_AES_256_CBC_B2B256: + return "TLS_RSA_WITH_AES_256_CBC_B2B256"; + #endif + #ifndef NO_SHA + case TLS_RSA_WITH_NULL_SHA : + return "TLS_RSA_WITH_NULL_SHA"; + #endif + case TLS_RSA_WITH_NULL_SHA256 : + return "TLS_RSA_WITH_NULL_SHA256"; +#endif /* NO_RSA */ +#ifndef NO_PSK + case TLS_PSK_WITH_AES_128_CBC_SHA256 : + return "TLS_PSK_WITH_AES_128_CBC_SHA256"; + #ifndef NO_SHA + case TLS_PSK_WITH_AES_128_CBC_SHA : + return "TLS_PSK_WITH_AES_128_CBC_SHA"; + case TLS_PSK_WITH_AES_256_CBC_SHA : + return "TLS_PSK_WITH_AES_256_CBC_SHA"; + #endif + #ifndef NO_SHA256 + #ifdef HAVE_AESCCM + case TLS_PSK_WITH_AES_128_CCM_8 : + return "TLS_PSK_WITH_AES_128_CCM_8"; + case TLS_PSK_WITH_AES_256_CCM_8 : + return "TLS_PSK_WITH_AES_256_CCM_8"; + #endif + case TLS_PSK_WITH_NULL_SHA256 : + return "TLS_PSK_WITH_NULL_SHA256"; + #endif + #ifndef NO_SHA + case TLS_PSK_WITH_NULL_SHA : + return "TLS_PSK_WITH_NULL_SHA"; + #endif +#endif /* NO_PSK */ +#ifndef NO_RSA + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : + return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"; + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : + return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"; + #ifndef NO_SHA + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : + return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"; + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : + return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"; + #endif + #ifndef NO_HC128 + #ifndef NO_MD5 + case TLS_RSA_WITH_HC_128_MD5 : + return "TLS_RSA_WITH_HC_128_MD5"; + #endif + #ifndef NO_SHA + case TLS_RSA_WITH_HC_128_SHA : + return "TLS_RSA_WITH_HC_128_SHA"; + #endif + #ifdef HAVE_BLAKE2 + case TLS_RSA_WITH_HC_128_B2B256: + return "TLS_RSA_WITH_HC_128_B2B256"; + #endif + #endif /* NO_HC128 */ + #ifndef NO_SHA + #ifndef NO_RABBIT + case TLS_RSA_WITH_RABBIT_SHA : + return "TLS_RSA_WITH_RABBIT_SHA"; + #endif + #ifdef HAVE_NTRU + #ifndef NO_RC4 + case TLS_NTRU_RSA_WITH_RC4_128_SHA : + return "TLS_NTRU_RSA_WITH_RC4_128_SHA"; + #endif + #ifndef NO_DES3 + case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : + return "TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA"; + #endif + case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : + return "TLS_NTRU_RSA_WITH_AES_128_CBC_SHA"; + case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : + return "TLS_NTRU_RSA_WITH_AES_256_CBC_SHA"; + #endif /* HAVE_NTRU */ + #endif /* NO_SHA */ + case TLS_RSA_WITH_AES_128_GCM_SHA256 : + return "TLS_RSA_WITH_AES_128_GCM_SHA256"; + case TLS_RSA_WITH_AES_256_GCM_SHA384 : + return "TLS_RSA_WITH_AES_256_GCM_SHA384"; + case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : + return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"; + case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : + return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"; + #ifndef NO_SHA + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : + return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA"; + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : + return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA"; + #endif + case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256"; + case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256"; + #ifndef NO_SHA + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : + return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA"; + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : + return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA"; + #endif + case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : + return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"; + case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : + return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256"; +#endif /* NO_RSA */ + default: + return "NONE"; + } /* switch */ + } /* normal / ECC */ + } +#endif /* NO_ERROR_STRINGS */ + return "NONE"; + } + + + const char* CyaSSL_get_cipher(CYASSL* ssl) + { + CYASSL_ENTER("CyaSSL_get_cipher"); + return CyaSSL_CIPHER_get_name(CyaSSL_get_current_cipher(ssl)); + } + +#ifdef OPENSSL_EXTRA + +/* XXX shuld be NO_DH */ +#ifndef NO_CERTS + /* server ctx Diffie-Hellman parameters, SSL_SUCCESS on ok */ + int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, const unsigned char* p, int pSz, + const unsigned char* g, int gSz) + { + CYASSL_ENTER("CyaSSL_CTX_SetTmpDH"); + if (ctx == NULL || p == NULL || g == NULL) return BAD_FUNC_ARG; + + XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); + XFREE(ctx->serverDH_G.buffer, ctx->heap, DYNAMIC_TYPE_DH); + + ctx->serverDH_P.buffer = (byte*)XMALLOC(pSz, ctx->heap,DYNAMIC_TYPE_DH); + if (ctx->serverDH_P.buffer == NULL) + return MEMORY_E; + + ctx->serverDH_G.buffer = (byte*)XMALLOC(gSz, ctx->heap,DYNAMIC_TYPE_DH); + if (ctx->serverDH_G.buffer == NULL) { + XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); + return MEMORY_E; + } + + ctx->serverDH_P.length = pSz; + ctx->serverDH_G.length = gSz; + + XMEMCPY(ctx->serverDH_P.buffer, p, pSz); + XMEMCPY(ctx->serverDH_G.buffer, g, gSz); + + ctx->haveDH = 1; + + CYASSL_LEAVE("CyaSSL_CTX_SetTmpDH", 0); + return SSL_SUCCESS; + } +#endif /* !NO_CERTS */ + + + char* CyaSSL_CIPHER_description(CYASSL_CIPHER* cipher, char* in, int len) + { + (void)cipher; + (void)in; + (void)len; + return 0; + } + + + CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl) /* what's ref count */ + { + (void)ssl; + return 0; + } + + + void CyaSSL_X509_free(CYASSL_X509* buf) + { + (void)buf; + } + + + /* was do nothing */ + /* + void OPENSSL_free(void* buf) + { + (void)buf; + } + */ + + + int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, char** path, + int* ssl) + { + (void)url; + (void)host; + (void)port; + (void)path; + (void)ssl; + return 0; + } + + + CYASSL_METHOD* CyaSSLv2_client_method(void) + { + return 0; + } + + + CYASSL_METHOD* CyaSSLv2_server_method(void) + { + return 0; + } + + +#ifndef NO_MD4 + + void CyaSSL_MD4_Init(CYASSL_MD4_CTX* md4) + { + /* make sure we have a big enough buffer */ + typedef char ok[sizeof(md4->buffer) >= sizeof(Md4) ? 1 : -1]; + (void) sizeof(ok); + + CYASSL_ENTER("MD4_Init"); + InitMd4((Md4*)md4); + } + + + void CyaSSL_MD4_Update(CYASSL_MD4_CTX* md4, const void* data, + unsigned long len) + { + CYASSL_ENTER("MD4_Update"); + Md4Update((Md4*)md4, (const byte*)data, (word32)len); + } + + + void CyaSSL_MD4_Final(unsigned char* digest, CYASSL_MD4_CTX* md4) + { + CYASSL_ENTER("MD4_Final"); + Md4Final((Md4*)md4, digest); + } + +#endif /* NO_MD4 */ + + + CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO* top) + { + (void)top; + return 0; + } + + + int CyaSSL_BIO_pending(CYASSL_BIO* bio) + { + (void)bio; + return 0; + } + + + + CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void) + { + static CYASSL_BIO_METHOD meth; + + CYASSL_ENTER("BIO_s_mem"); + meth.type = BIO_MEMORY; + + return &meth; + } + + + CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void) + { + return 0; + } + + + void CyaSSL_BIO_set_flags(CYASSL_BIO* bio, int flags) + { + (void)bio; + (void)flags; + } + + + + void CyaSSL_RAND_screen(void) + { + + } + + + const char* CyaSSL_RAND_file_name(char* fname, unsigned long len) + { + (void)fname; + (void)len; + return 0; + } + + + int CyaSSL_RAND_write_file(const char* fname) + { + (void)fname; + return 0; + } + + + int CyaSSL_RAND_load_file(const char* fname, long len) + { + (void)fname; + /* CTaoCrypt provides enough entropy internally or will report error */ + if (len == -1) + return 1024; + else + return (int)len; + } + + + int CyaSSL_RAND_egd(const char* path) + { + (void)path; + return 0; + } + + + + CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void) + { + return 0; + } + + + CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void) + { + return 0; + } + + + int CyaSSL_COMP_add_compression_method(int method, void* data) + { + (void)method; + (void)data; + return 0; + } + + + + int CyaSSL_get_ex_new_index(long idx, void* data, void* cb1, void* cb2, + void* cb3) + { + (void)idx; + (void)data; + (void)cb1; + (void)cb2; + (void)cb3; + return 0; + } + + + void CyaSSL_set_dynlock_create_callback(CYASSL_dynlock_value* (*f)( + const char*, int)) + { + (void)f; + } + + + void CyaSSL_set_dynlock_lock_callback( + void (*f)(int, CYASSL_dynlock_value*, const char*, int)) + { + (void)f; + } + + + void CyaSSL_set_dynlock_destroy_callback( + void (*f)(CYASSL_dynlock_value*, const char*, int)) + { + (void)f; + } + + + + const char* CyaSSL_X509_verify_cert_error_string(long err) + { + (void)err; + return 0; + } + + + + int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP* lookup, const char* dir, + long len) + { + (void)lookup; + (void)dir; + (void)len; + return 0; + } + + + int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP* lookup, + const char* file, long len) + { + (void)lookup; + (void)file; + (void)len; + return 0; + } + + + CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void) + { + return 0; + } + + + CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void) + { + return 0; + } + + + + CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE* store, + CYASSL_X509_LOOKUP_METHOD* m) + { + (void)store; + (void)m; + return 0; + } + + + int CyaSSL_X509_STORE_add_cert(CYASSL_X509_STORE* store, CYASSL_X509* x509) + { + int result = SSL_FATAL_ERROR; + + CYASSL_ENTER("CyaSSL_X509_STORE_add_cert"); + if (store != NULL && store->cm != NULL && x509 != NULL) { + buffer derCert; + derCert.buffer = (byte*)XMALLOC(x509->derCert.length, + NULL, DYNAMIC_TYPE_CERT); + if (derCert.buffer != NULL) { + derCert.length = x509->derCert.length; + // AddCA() frees the buffer. + XMEMCPY(derCert.buffer, + x509->derCert.buffer, x509->derCert.length); + result = AddCA(store->cm, derCert, CYASSL_USER_CA, 1); + if (result != SSL_SUCCESS) result = SSL_FATAL_ERROR; + } + } + + CYASSL_LEAVE("CyaSSL_X509_STORE_add_cert", result); + return result; + } + + + CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void) + { + CYASSL_X509_STORE* store = NULL; + + store = (CYASSL_X509_STORE*)XMALLOC(sizeof(CYASSL_X509_STORE), NULL, 0); + if (store != NULL) { + store->cm = CyaSSL_CertManagerNew(); + if (store->cm == NULL) { + XFREE(store, NULL, 0); + store = NULL; + } + } + + return store; + } + + + void CyaSSL_X509_STORE_free(CYASSL_X509_STORE* store) + { + if (store != NULL) { + if (store->cm != NULL) + CyaSSL_CertManagerFree(store->cm); + XFREE(store, NULL, 0); + } + } + + + int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE* store) + { + (void)store; + return SSL_SUCCESS; + } + + + int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX* ctx, int idx, + CYASSL_X509_NAME* name, CYASSL_X509_OBJECT* obj) + { + (void)ctx; + (void)idx; + (void)name; + (void)obj; + return 0; + } + + + CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void) + { + CYASSL_X509_STORE_CTX* ctx = (CYASSL_X509_STORE_CTX*)XMALLOC( + sizeof(CYASSL_X509_STORE_CTX), NULL, 0); + + if (ctx != NULL) + CyaSSL_X509_STORE_CTX_init(ctx, NULL, NULL, NULL); + + return ctx; + } + + + int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX* ctx, + CYASSL_X509_STORE* store, CYASSL_X509* x509, STACK_OF(CYASSL_X509)* sk) + { + (void)sk; + if (ctx != NULL) { + ctx->store = store; + ctx->current_cert = x509; + ctx->domain = NULL; + ctx->ex_data = NULL; + ctx->userCtx = NULL; + ctx->error = 0; + ctx->error_depth = 0; + ctx->discardSessionCerts = 0; + return SSL_SUCCESS; + } + return SSL_FATAL_ERROR; + } + + + void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX* ctx) + { + if (ctx != NULL) { + if (ctx->store != NULL) + CyaSSL_X509_STORE_free(ctx->store); + if (ctx->current_cert != NULL) + CyaSSL_FreeX509(ctx->current_cert); + XFREE(ctx, NULL, 0); + } + } + + + void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX* ctx) + { + (void)ctx; + } + + + int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX* ctx) + { + if (ctx != NULL && ctx->store != NULL && ctx->store->cm != NULL + && ctx->current_cert != NULL) { + return CyaSSL_CertManagerVerifyBuffer(ctx->store->cm, + ctx->current_cert->derCert.buffer, + ctx->current_cert->derCert.length, + SSL_FILETYPE_ASN1); + } + return SSL_FATAL_ERROR; + } + + + CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL* crl) + { + (void)crl; + return 0; + } + + + CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL* crl) + { + (void)crl; + return 0; + } + + + + CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509* x509) + { + CYASSL_EVP_PKEY* key = NULL; + if (x509 != NULL) { + key = (CYASSL_EVP_PKEY*)XMALLOC( + sizeof(CYASSL_EVP_PKEY), NULL, DYNAMIC_TYPE_PUBLIC_KEY); + if (key != NULL) { + key->type = x509->pubKeyOID; + key->save_type = 0; + key->pkey.ptr = (char*)XMALLOC( + x509->pubKey.length, NULL, DYNAMIC_TYPE_PUBLIC_KEY); + if (key->pkey.ptr == NULL) { + XFREE(key, NULL, DYNAMIC_TYPE_PUBLIC_KEY); + return NULL; + } + XMEMCPY(key->pkey.ptr, + x509->pubKey.buffer, x509->pubKey.length); + key->pkey_sz = x509->pubKey.length; + #ifdef HAVE_ECC + key->pkey_curve = (int)x509->pkCurveOID; + #endif /* HAVE_ECC */ + } + } + return key; + } + + + int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL* crl, CYASSL_EVP_PKEY* key) + { + (void)crl; + (void)key; + return 0; + } + + + void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX* ctx, int err) + { + (void)ctx; + (void)err; + } + + + void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT* obj) + { + (void)obj; + } + + + void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY* key) + { + if (key != NULL) { + if (key->pkey.ptr != NULL) + XFREE(key->pkey.ptr, NULL, 0); + XFREE(key, NULL, 0); + } + } + + + int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME* asnTime) + { + (void)asnTime; + return 0; + } + + + int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED* revoked) + { + (void)revoked; + return 0; + } + + + + CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL* crl) + { + (void)crl; + return 0; + } + + + CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value( + CYASSL_X509_REVOKED* revoked, int value) + { + (void)revoked; + (void)value; + return 0; + } + + + + CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509* x509) + { + (void)x509; + return 0; + } + + + int CyaSSL_ASN1_TIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_TIME* asnTime) + { + (void)bio; + (void)asnTime; + return 0; + } + + + + int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER* a, + const CYASSL_ASN1_INTEGER* b) + { + (void)a; + (void)b; + return 0; + } + + + long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER* i) + { + (void)i; + return 0; + } + + + + void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX* ctx, int idx) + { +#ifdef FORTRESS + if (ctx != NULL && idx == 0) + return ctx->ex_data; +#else + (void)ctx; + (void)idx; +#endif + return 0; + } + + + int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void) + { + return 0; + } + + + void* CyaSSL_get_ex_data(const CYASSL* ssl, int idx) + { +#ifdef FORTRESS + if (ssl != NULL && idx < MAX_EX_DATA) + return ssl->ex_data[idx]; +#else + (void)ssl; + (void)idx; +#endif + return 0; + } + + + void CyaSSL_CTX_set_info_callback(CYASSL_CTX* ctx, void (*f)(void)) + { + (void)ctx; + (void)f; + } + + + unsigned long CyaSSL_ERR_peek_error(void) + { + return 0; + } + + + int CyaSSL_ERR_GET_REASON(int err) + { + (void)err; + return 0; + } + + + char* CyaSSL_alert_type_string_long(int alertID) + { + (void)alertID; + return 0; + } + + + char* CyaSSL_alert_desc_string_long(int alertID) + { + (void)alertID; + return 0; + } + + + char* CyaSSL_state_string_long(CYASSL* ssl) + { + (void)ssl; + return 0; + } + + + int CyaSSL_PEM_def_callback(char* name, int num, int w, void* key) + { + (void)name; + (void)num; + (void)w; + (void)key; + return 0; + } + + + long CyaSSL_CTX_sess_accept(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_connect(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_accept_good(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_connect_good(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_hits(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_cache_full(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_misses(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_timeouts(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + long CyaSSL_CTX_sess_number(CYASSL_CTX* ctx) + { + (void)ctx; + return 0; + } + + + void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock* myDes, + CYASSL_DES_key_schedule* key) + { + (void)myDes; + (void)key; + } + + + void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock* myDes) + { + (void)myDes; + } + + + void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock* desa, + CYASSL_DES_cblock* desb, CYASSL_DES_key_schedule* key, int len) + { + (void)desa; + (void)desb; + (void)key; + (void)len; + } + + int CyaSSL_BIO_printf(CYASSL_BIO* bio, const char* format, ...) + { + (void)bio; + (void)format; + return 0; + } + + + int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_UTCTIME* a) + { + (void)bio; + (void)a; + return 0; + } + + + int CyaSSL_sk_num(CYASSL_X509_REVOKED* rev) + { + (void)rev; + return 0; + } + + + void* CyaSSL_sk_value(CYASSL_X509_REVOKED* rev, int i) + { + (void)rev; + (void)i; + return 0; + } + + + /* stunnel 4.28 needs */ + void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX* ctx, int d) + { + (void)ctx; + (void)d; + return 0; + } + + + int CyaSSL_CTX_set_ex_data(CYASSL_CTX* ctx, int d, void* p) + { + (void)ctx; + (void)d; + (void)p; + return SSL_SUCCESS; + } + + + void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX* ctx, + CYASSL_SESSION*(*f)(CYASSL*, unsigned char*, int, int*)) + { + (void)ctx; + (void)f; + } + + + void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX* ctx, + int (*f)(CYASSL*, CYASSL_SESSION*)) + { + (void)ctx; + (void)f; + } + + + void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX* ctx, void (*f)(CYASSL_CTX*, + CYASSL_SESSION*)) + { + (void)ctx; + (void)f; + } + + + int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION* sess, unsigned char** p) + { + (void)sess; + (void)p; + return sizeof(CYASSL_SESSION); + } + + + CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION** sess, + const unsigned char** p, long i) + { + (void)p; + (void)i; + if (sess) + return *sess; + return NULL; + } + + + long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION* sess) + { + CYASSL_ENTER("CyaSSL_SESSION_get_timeout"); + return sess->timeout; + } + + + long CyaSSL_SESSION_get_time(const CYASSL_SESSION* sess) + { + CYASSL_ENTER("CyaSSL_SESSION_get_time"); + return sess->bornOn; + } + + + int CyaSSL_CTX_get_ex_new_index(long idx, void* arg, void* a, void* b, + void* c) + { + (void)idx; + (void)arg; + (void)a; + (void)b; + (void)c; + return 0; + } + +#endif /* OPENSSL_EXTRA */ + + +#ifdef KEEP_PEER_CERT + char* CyaSSL_X509_get_subjectCN(CYASSL_X509* x509) + { + if (x509 == NULL) + return NULL; + + return x509->subjectCN; + } +#endif /* KEEP_PEER_CERT */ + +#ifdef OPENSSL_EXTRA + +#ifdef FORTRESS + int CyaSSL_cmp_peer_cert_to_file(CYASSL* ssl, const char *fname) + { + int ret = SSL_FATAL_ERROR; + + CYASSL_ENTER("CyaSSL_cmp_peer_cert_to_file"); + if (ssl != NULL && fname != NULL) + { + XFILE file = XBADFILE; + long sz = 0; + byte staticBuffer[FILE_BUFFER_SIZE]; + byte* myBuffer = staticBuffer; + CYASSL_CTX* ctx = ssl->ctx; + EncryptedInfo info; + buffer fileDer; + int eccKey = 0; + CYASSL_X509* peer_cert = &ssl->peerCert; + + info.set = 0; + info.ctx = ctx; + info.consumed = 0; + fileDer.buffer = 0; + + file = XFOPEN(fname, "rb"); + if (file == XBADFILE) return SSL_BAD_FILE; + XFSEEK(file, 0, XSEEK_END); + sz = XFTELL(file); + XREWIND(file); + if (sz > (long)sizeof(staticBuffer)) { + CYASSL_MSG("Getting dynamic buffer"); + myBuffer = (byte*) XMALLOC(sz, ctx->heap, DYNAMIC_TYPE_FILE); + } + + if ((myBuffer != NULL) && + (sz > 0) && + (XFREAD(myBuffer, sz, 1, file) > 0) && + (PemToDer(myBuffer, sz, CERT_TYPE, + &fileDer, ctx->heap, &info, &eccKey) == 0) && + (fileDer.length != 0) && + (fileDer.length == peer_cert->derCert.length) && + (XMEMCMP(peer_cert->derCert.buffer, fileDer.buffer, + fileDer.length) == 0)) + { + ret = 0; + } + + XFCLOSE(file); + if (fileDer.buffer) + XFREE(fileDer.buffer, ctx->heap, DYNAMIC_TYPE_CERT); + if (myBuffer && (myBuffer != staticBuffer)) + XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE); + } + + return ret; + } +#endif + + +static RNG globalRNG; +static int initGlobalRNG = 0; + + /* SSL_SUCCESS on ok */ + int CyaSSL_RAND_seed(const void* seed, int len) + { + + CYASSL_MSG("CyaSSL_RAND_seed"); + + (void)seed; + (void)len; + + if (initGlobalRNG == 0) { + if (InitRng(&globalRNG) < 0) { + CYASSL_MSG("CyaSSL Init Global RNG failed"); + return 0; + } + initGlobalRNG = 1; + } + + return SSL_SUCCESS; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_RAND_bytes(unsigned char* buf, int num) + { + RNG tmpRNG; + RNG* rng = &tmpRNG; + + CYASSL_ENTER("RAND_bytes"); + if (InitRng(&tmpRNG) != 0) { + CYASSL_MSG("Bad RNG Init, trying global"); + if (initGlobalRNG == 0) { + CYASSL_MSG("Global RNG no Init"); + return 0; + } + rng = &globalRNG; + } + + if (RNG_GenerateBlock(rng, buf, num) != 0) { + CYASSL_MSG("Bad RNG_GenerateBlock"); + return 0; + } + + return SSL_SUCCESS; + } + + CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void) + { + static int ctx; /* ctaocrypt doesn't now need ctx */ + + CYASSL_MSG("CyaSSL_BN_CTX_new"); + + return (CYASSL_BN_CTX*)&ctx; + } + + void CyaSSL_BN_CTX_init(CYASSL_BN_CTX* ctx) + { + (void)ctx; + CYASSL_MSG("CyaSSL_BN_CTX_init"); + } + + + void CyaSSL_BN_CTX_free(CYASSL_BN_CTX* ctx) + { + (void)ctx; + CYASSL_MSG("CyaSSL_BN_CTX_free"); + + /* do free since static ctx that does nothing */ + } + + + static void InitCyaSSL_BigNum(CYASSL_BIGNUM* bn) + { + CYASSL_MSG("InitCyaSSL_BigNum"); + if (bn) { + bn->neg = 0; + bn->internal = NULL; + } + } + + + CYASSL_BIGNUM* CyaSSL_BN_new(void) + { + CYASSL_BIGNUM* external; + mp_int* mpi; + + CYASSL_MSG("CyaSSL_BN_new"); + + mpi = (mp_int*) XMALLOC(sizeof(mp_int), NULL, DYNAMIC_TYPE_BIGINT); + if (mpi == NULL) { + CYASSL_MSG("CyaSSL_BN_new malloc mpi failure"); + return NULL; + } + + external = (CYASSL_BIGNUM*) XMALLOC(sizeof(CYASSL_BIGNUM), NULL, + DYNAMIC_TYPE_BIGINT); + if (external == NULL) { + CYASSL_MSG("CyaSSL_BN_new malloc CYASSL_BIGNUM failure"); + XFREE(mpi, NULL, DYNAMIC_TYPE_BIGINT); + return NULL; + } + + InitCyaSSL_BigNum(external); + external->internal = mpi; + if (mp_init(mpi) != MP_OKAY) { + CyaSSL_BN_free(external); + return NULL; + } + + return external; + } + + + void CyaSSL_BN_free(CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_free"); + if (bn) { + if (bn->internal) { + mp_clear((mp_int*)bn->internal); + XFREE(bn->internal, NULL, DYNAMIC_TYPE_BIGINT); + bn->internal = NULL; + } + XFREE(bn, NULL, DYNAMIC_TYPE_BIGINT); + } + } + + + void CyaSSL_BN_clear_free(CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_clear_free"); + + CyaSSL_BN_free(bn); + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_BN_sub(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a, + const CYASSL_BIGNUM* b) + { + CYASSL_MSG("CyaSSL_BN_sub"); + + if (r == NULL || a == NULL || b == NULL) + return 0; + + if (mp_sub((mp_int*)a->internal,(mp_int*)b->internal, + (mp_int*)r->internal) == MP_OKAY) + return SSL_SUCCESS; + + CYASSL_MSG("CyaSSL_BN_sub mp_sub failed"); + return 0; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_BN_mod(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a, + const CYASSL_BIGNUM* b, const CYASSL_BN_CTX* c) + { + (void)c; + CYASSL_MSG("CyaSSL_BN_mod"); + + if (r == NULL || a == NULL || b == NULL) + return 0; + + if (mp_mod((mp_int*)a->internal,(mp_int*)b->internal, + (mp_int*)r->internal) == MP_OKAY) + return SSL_SUCCESS; + + CYASSL_MSG("CyaSSL_BN_mod mp_mod failed"); + return 0; + } + + + const CYASSL_BIGNUM* CyaSSL_BN_value_one(void) + { + static CYASSL_BIGNUM* bn_one = NULL; + + CYASSL_MSG("CyaSSL_BN_value_one"); + + if (bn_one == NULL) { + bn_one = CyaSSL_BN_new(); + if (bn_one) + mp_set_int((mp_int*)bn_one->internal, 1); + } + + return bn_one; + } + + + int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_num_bytes"); + + if (bn == NULL || bn->internal == NULL) + return 0; + + return mp_unsigned_bin_size((mp_int*)bn->internal); + } + + + int CyaSSL_BN_num_bits(const CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_num_bits"); + + if (bn == NULL || bn->internal == NULL) + return 0; + + return mp_count_bits((mp_int*)bn->internal); + } + + + int CyaSSL_BN_is_zero(const CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_is_zero"); + + if (bn == NULL || bn->internal == NULL) + return 0; + + return mp_iszero((mp_int*)bn->internal); + } + + + int CyaSSL_BN_is_one(const CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_is_one"); + + if (bn == NULL || bn->internal == NULL) + return 0; + + if (mp_cmp_d((mp_int*)bn->internal, 1) == 0) + return 1; + + return 0; + } + + + int CyaSSL_BN_is_odd(const CYASSL_BIGNUM* bn) + { + CYASSL_MSG("CyaSSL_BN_is_odd"); + + if (bn == NULL || bn->internal == NULL) + return 0; + + return mp_isodd((mp_int*)bn->internal); + } + + + int CyaSSL_BN_cmp(const CYASSL_BIGNUM* a, const CYASSL_BIGNUM* b) + { + CYASSL_MSG("CyaSSL_BN_cmp"); + + if (a == NULL || a->internal == NULL || b == NULL || b->internal ==NULL) + return 0; + + return mp_cmp((mp_int*)a->internal, (mp_int*)b->internal); + } + + + int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM* bn, unsigned char* r) + { + CYASSL_MSG("CyaSSL_BN_bn2bin"); + + if (bn == NULL || bn->internal == NULL) { + CYASSL_MSG("NULL bn error"); + return SSL_FATAL_ERROR; + } + + if (r == NULL) + return mp_unsigned_bin_size((mp_int*)bn->internal); + + if (mp_to_unsigned_bin((mp_int*)bn->internal, r) != MP_OKAY) { + CYASSL_MSG("mp_to_unsigned_bin error"); + return SSL_FATAL_ERROR; + } + + return mp_unsigned_bin_size((mp_int*)bn->internal); + } + + + CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char* str, int len, + CYASSL_BIGNUM* ret) + { + CYASSL_MSG("CyaSSL_BN_bin2bn"); + + if (ret && ret->internal) { + if (mp_read_unsigned_bin((mp_int*)ret->internal, str, len) != 0) { + CYASSL_MSG("mp_read_unsigned_bin failure"); + return NULL; + } + } + else { + CYASSL_MSG("CyaSSL_BN_bin2bn wants return bignum"); + } + + return ret; + } + + + int CyaSSL_mask_bits(CYASSL_BIGNUM* bn, int n) + { + (void)bn; + (void)n; + CYASSL_MSG("CyaSSL_BN_mask_bits"); + + return SSL_FATAL_ERROR; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_BN_rand(CYASSL_BIGNUM* bn, int bits, int top, int bottom) + { + byte buff[1024]; + RNG tmpRNG; + RNG* rng = &tmpRNG; + int len = bits/8; + + (void)top; + (void)bottom; + CYASSL_MSG("CyaSSL_BN_rand"); + + if (bn == NULL || bn->internal == NULL) { + CYASSL_MSG("Bad function arguments"); + return 0; + } + + if (bits % 8) + len++; + + if ( (InitRng(&tmpRNG)) != 0) { + CYASSL_MSG("Bad RNG Init, trying global"); + if (initGlobalRNG == 0) { + CYASSL_MSG("Global RNG no Init"); + return 0; + } + rng = &globalRNG; + } + + if (RNG_GenerateBlock(rng, buff, len) != 0) { + CYASSL_MSG("Bad RNG_GenerateBlock"); + return 0; + } + + buff[0] |= 0x80 | 0x40; + buff[len-1] |= 0x01; + + if (mp_read_unsigned_bin((mp_int*)bn->internal,buff,len) != MP_OKAY) { + CYASSL_MSG("mp read bin failed"); + return 0; + } + + return SSL_SUCCESS; + } + + + int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM* bn, int n) + { + (void)bn; + (void)n; + + CYASSL_MSG("CyaSSL_BN_is_bit_set"); + + return 0; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_BN_hex2bn(CYASSL_BIGNUM** bn, const char* str) + { + byte decoded[1024]; + word32 decSz = sizeof(decoded); + + CYASSL_MSG("CyaSSL_BN_hex2bn"); + + if (str == NULL) { + CYASSL_MSG("Bad function argument"); + return 0; + } + + if (Base16_Decode((byte*)str, (int)XSTRLEN(str), decoded, &decSz) < 0) { + CYASSL_MSG("Bad Base16_Decode error"); + return 0; + } + + if (bn == NULL) + return decSz; + + if (*bn == NULL) { + *bn = CyaSSL_BN_new(); + if (*bn == NULL) { + CYASSL_MSG("BN new failed"); + return 0; + } + } + + if (CyaSSL_BN_bin2bn(decoded, decSz, *bn) == NULL) { + CYASSL_MSG("Bad bin2bn error"); + return 0; + } + + return SSL_SUCCESS; + } + + + CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM* bn) + { + CYASSL_BIGNUM* ret; + + CYASSL_MSG("CyaSSL_BN_dup"); + + if (bn == NULL || bn->internal == NULL) { + CYASSL_MSG("bn NULL error"); + return NULL; + } + + ret = CyaSSL_BN_new(); + if (ret == NULL) { + CYASSL_MSG("bn new error"); + return NULL; + } + + if (mp_copy((mp_int*)bn->internal, (mp_int*)ret->internal) != MP_OKAY) { + CYASSL_MSG("mp_copy error"); + CyaSSL_BN_free(ret); + return NULL; + } + + return ret; + } + + + CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* bn) + { + (void)r; + (void)bn; + + CYASSL_MSG("CyaSSL_BN_copy"); + + return NULL; + } + + + int CyaSSL_BN_set_word(CYASSL_BIGNUM* bn, unsigned long w) + { + (void)bn; + (void)w; + + CYASSL_MSG("CyaSSL_BN_set_word"); + + return SSL_FATAL_ERROR; + } + + + int CyaSSL_BN_dec2bn(CYASSL_BIGNUM** bn, const char* str) + { + (void)bn; + (void)str; + + CYASSL_MSG("CyaSSL_BN_dec2bn"); + + return SSL_FATAL_ERROR; + } + + + char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM* bn) + { + (void)bn; + + CYASSL_MSG("CyaSSL_BN_bn2dec"); + + return NULL; + } + + + static void InitCyaSSL_DH(CYASSL_DH* dh) + { + if (dh) { + dh->p = NULL; + dh->g = NULL; + dh->pub_key = NULL; + dh->priv_key = NULL; + dh->internal = NULL; + dh->inSet = 0; + dh->exSet = 0; + } + } + + + CYASSL_DH* CyaSSL_DH_new(void) + { + CYASSL_DH* external; + DhKey* key; + + CYASSL_MSG("CyaSSL_DH_new"); + + key = (DhKey*) XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_DH); + if (key == NULL) { + CYASSL_MSG("CyaSSL_DH_new malloc DhKey failure"); + return NULL; + } + + external = (CYASSL_DH*) XMALLOC(sizeof(CYASSL_DH), NULL, + DYNAMIC_TYPE_DH); + if (external == NULL) { + CYASSL_MSG("CyaSSL_DH_new malloc CYASSL_DH failure"); + XFREE(key, NULL, DYNAMIC_TYPE_DH); + return NULL; + } + + InitCyaSSL_DH(external); + InitDhKey(key); + external->internal = key; + + return external; + } + + + void CyaSSL_DH_free(CYASSL_DH* dh) + { + CYASSL_MSG("CyaSSL_DH_free"); + + if (dh) { + if (dh->internal) { + FreeDhKey((DhKey*)dh->internal); + XFREE(dh->internal, NULL, DYNAMIC_TYPE_DH); + dh->internal = NULL; + } + CyaSSL_BN_free(dh->priv_key); + CyaSSL_BN_free(dh->pub_key); + CyaSSL_BN_free(dh->g); + CyaSSL_BN_free(dh->p); + InitCyaSSL_DH(dh); /* set back to NULLs for safety */ + + XFREE(dh, NULL, DYNAMIC_TYPE_DH); + } + } + + + static int SetDhInternal(CYASSL_DH* dh) + { + unsigned char p[1024]; + unsigned char g[1024]; + int pSz = sizeof(p); + int gSz = sizeof(g); + + CYASSL_ENTER("SetDhInternal"); + + if (dh == NULL || dh->p == NULL || dh->g == NULL) { + CYASSL_MSG("Bad function arguments"); + return SSL_FATAL_ERROR; + } + + if (CyaSSL_BN_bn2bin(dh->p, NULL) > pSz) { + CYASSL_MSG("Bad p internal size"); + return SSL_FATAL_ERROR; + } + + if (CyaSSL_BN_bn2bin(dh->g, NULL) > gSz) { + CYASSL_MSG("Bad g internal size"); + return SSL_FATAL_ERROR; + } + + pSz = CyaSSL_BN_bn2bin(dh->p, p); + gSz = CyaSSL_BN_bn2bin(dh->g, g); + + if (pSz <= 0 || gSz <= 0) { + CYASSL_MSG("Bad BN2bin set"); + return SSL_FATAL_ERROR; + } + + if (DhSetKey((DhKey*)dh->internal, p, pSz, g, gSz) < 0) { + CYASSL_MSG("Bad DH SetKey"); + return SSL_FATAL_ERROR; + } + + dh->inSet = 1; + + return 0; + } + + + int CyaSSL_DH_size(CYASSL_DH* dh) + { + CYASSL_MSG("CyaSSL_DH_size"); + + if (dh == NULL) + return 0; + + return CyaSSL_BN_num_bytes(dh->p); + } + + + /* return SSL_SUCCESS on ok, else 0 */ + int CyaSSL_DH_generate_key(CYASSL_DH* dh) + { + unsigned char pub [768]; + unsigned char priv[768]; + word32 pubSz = sizeof(pub); + word32 privSz = sizeof(priv); + RNG tmpRNG; + RNG* rng = &tmpRNG; + + CYASSL_MSG("CyaSSL_DH_generate_key"); + + if (dh == NULL || dh->p == NULL || dh->g == NULL) { + CYASSL_MSG("Bad function arguments"); + return 0; + } + + if (dh->inSet == 0) { + if (SetDhInternal(dh) < 0) { + CYASSL_MSG("Bad DH set internal"); + return 0; + } + } + + if ( (InitRng(&tmpRNG)) != 0) { + CYASSL_MSG("Bad RNG Init, trying global"); + if (initGlobalRNG == 0) { + CYASSL_MSG("Global RNG no Init"); + return 0; + } + rng = &globalRNG; + } + + if (DhGenerateKeyPair((DhKey*)dh->internal, rng, priv, &privSz, + pub, &pubSz) < 0) { + CYASSL_MSG("Bad DhGenerateKeyPair"); + return 0; + } + + if (dh->pub_key) + CyaSSL_BN_free(dh->pub_key); + dh->pub_key = CyaSSL_BN_new(); + if (dh->pub_key == NULL) { + CYASSL_MSG("Bad DH new pub"); + return 0; + } + + if (dh->priv_key) + CyaSSL_BN_free(dh->priv_key); + dh->priv_key = CyaSSL_BN_new(); + if (dh->priv_key == NULL) { + CYASSL_MSG("Bad DH new priv"); + return 0; + } + + if (CyaSSL_BN_bin2bn(pub, pubSz, dh->pub_key) == NULL) { + CYASSL_MSG("Bad DH bn2bin error pub"); + return 0; + } + + if (CyaSSL_BN_bin2bn(priv, privSz, dh->priv_key) == NULL) { + CYASSL_MSG("Bad DH bn2bin error priv"); + return 0; + } + + CYASSL_MSG("CyaSSL_generate_key success"); + return SSL_SUCCESS; + } + + + /* return key size on ok, 0 otherwise */ + int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* otherPub, + CYASSL_DH* dh) + { + unsigned char pub [1024]; + unsigned char priv[1024]; + word32 pubSz = sizeof(pub); + word32 privSz = sizeof(priv); + word32 keySz; + + CYASSL_MSG("CyaSSL_DH_compute_key"); + + if (dh == NULL || dh->priv_key == NULL || otherPub == NULL) { + CYASSL_MSG("Bad function arguments"); + return 0; + } + + keySz = (word32)DH_size(dh); + if (keySz == 0) { + CYASSL_MSG("Bad DH_size"); + return 0; + } + + if (CyaSSL_BN_bn2bin(dh->priv_key, NULL) > (int)privSz) { + CYASSL_MSG("Bad priv internal size"); + return 0; + } + + if (CyaSSL_BN_bn2bin(otherPub, NULL) > (int)pubSz) { + CYASSL_MSG("Bad otherPub size"); + return 0; + } + + privSz = CyaSSL_BN_bn2bin(dh->priv_key, priv); + pubSz = CyaSSL_BN_bn2bin(otherPub, pub); + + if (privSz <= 0 || pubSz <= 0) { + CYASSL_MSG("Bad BN2bin set"); + return 0; + } + + if (DhAgree((DhKey*)dh->internal, key, &keySz, priv, privSz, pub, + pubSz) < 0) { + CYASSL_MSG("DhAgree failed"); + return 0; + } + + CYASSL_MSG("CyaSSL_compute_key success"); + return (int)keySz; + } + + +#ifndef NO_DSA + static void InitCyaSSL_DSA(CYASSL_DSA* dsa) + { + if (dsa) { + dsa->p = NULL; + dsa->q = NULL; + dsa->g = NULL; + dsa->pub_key = NULL; + dsa->priv_key = NULL; + dsa->internal = NULL; + dsa->inSet = 0; + dsa->exSet = 0; + } + } + + + CYASSL_DSA* CyaSSL_DSA_new(void) + { + CYASSL_DSA* external; + DsaKey* key; + + CYASSL_MSG("CyaSSL_DSA_new"); + + key = (DsaKey*) XMALLOC(sizeof(DsaKey), NULL, DYNAMIC_TYPE_DSA); + if (key == NULL) { + CYASSL_MSG("CyaSSL_DSA_new malloc DsaKey failure"); + return NULL; + } + + external = (CYASSL_DSA*) XMALLOC(sizeof(CYASSL_DSA), NULL, + DYNAMIC_TYPE_DSA); + if (external == NULL) { + CYASSL_MSG("CyaSSL_DSA_new malloc CYASSL_DSA failure"); + XFREE(key, NULL, DYNAMIC_TYPE_DSA); + return NULL; + } + + InitCyaSSL_DSA(external); + InitDsaKey(key); + external->internal = key; + + return external; + } + + + void CyaSSL_DSA_free(CYASSL_DSA* dsa) + { + CYASSL_MSG("CyaSSL_DSA_free"); + + if (dsa) { + if (dsa->internal) { + FreeDsaKey((DsaKey*)dsa->internal); + XFREE(dsa->internal, NULL, DYNAMIC_TYPE_DSA); + dsa->internal = NULL; + } + CyaSSL_BN_free(dsa->priv_key); + CyaSSL_BN_free(dsa->pub_key); + CyaSSL_BN_free(dsa->g); + CyaSSL_BN_free(dsa->q); + CyaSSL_BN_free(dsa->p); + InitCyaSSL_DSA(dsa); /* set back to NULLs for safety */ + + XFREE(dsa, NULL, DYNAMIC_TYPE_DSA); + } + } + + + int CyaSSL_DSA_generate_key(CYASSL_DSA* dsa) + { + (void)dsa; + + CYASSL_MSG("CyaSSL_DSA_generate_key"); + + return 0; /* key gen not needed by server */ + } + + + int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA* dsa, int bits, + unsigned char* seed, int seedLen, int* counterRet, + unsigned long* hRet, void* cb) + { + (void)dsa; + (void)bits; + (void)seed; + (void)seedLen; + (void)counterRet; + (void)hRet; + (void)cb; + + CYASSL_MSG("CyaSSL_DSA_generate_parameters_ex"); + + return 0; /* key gen not needed by server */ + } +#endif /* NO_DSA */ + + static void InitCyaSSL_Rsa(CYASSL_RSA* rsa) + { + if (rsa) { + rsa->n = NULL; + rsa->e = NULL; + rsa->d = NULL; + rsa->p = NULL; + rsa->q = NULL; + rsa->dmp1 = NULL; + rsa->dmq1 = NULL; + rsa->iqmp = NULL; + rsa->internal = NULL; + rsa->inSet = 0; + rsa->exSet = 0; + } + } + + + CYASSL_RSA* CyaSSL_RSA_new(void) + { + CYASSL_RSA* external; + RsaKey* key; + + CYASSL_MSG("CyaSSL_RSA_new"); + + key = (RsaKey*) XMALLOC(sizeof(RsaKey), NULL, DYNAMIC_TYPE_RSA); + if (key == NULL) { + CYASSL_MSG("CyaSSL_RSA_new malloc RsaKey failure"); + return NULL; + } + + external = (CYASSL_RSA*) XMALLOC(sizeof(CYASSL_RSA), NULL, + DYNAMIC_TYPE_RSA); + if (external == NULL) { + CYASSL_MSG("CyaSSL_RSA_new malloc CYASSL_RSA failure"); + XFREE(key, NULL, DYNAMIC_TYPE_RSA); + return NULL; + } + + InitCyaSSL_Rsa(external); + if (InitRsaKey(key, NULL) != 0) { + CYASSL_MSG("InitRsaKey CYASSL_RSA failure"); + XFREE(external, NULL, DYNAMIC_TYPE_RSA); + XFREE(key, NULL, DYNAMIC_TYPE_RSA); + return NULL; + } + external->internal = key; + + return external; + } + + + void CyaSSL_RSA_free(CYASSL_RSA* rsa) + { + CYASSL_MSG("CyaSSL_RSA_free"); + + if (rsa) { + if (rsa->internal) { + FreeRsaKey((RsaKey*)rsa->internal); + XFREE(rsa->internal, NULL, DYNAMIC_TYPE_RSA); + rsa->internal = NULL; + } + CyaSSL_BN_free(rsa->iqmp); + CyaSSL_BN_free(rsa->dmq1); + CyaSSL_BN_free(rsa->dmp1); + CyaSSL_BN_free(rsa->q); + CyaSSL_BN_free(rsa->p); + CyaSSL_BN_free(rsa->d); + CyaSSL_BN_free(rsa->e); + CyaSSL_BN_free(rsa->n); + InitCyaSSL_Rsa(rsa); /* set back to NULLs for safety */ + + XFREE(rsa, NULL, DYNAMIC_TYPE_RSA); + } + } + + + static int SetIndividualExternal(CYASSL_BIGNUM** bn, mp_int* mpi) + { + CYASSL_MSG("Entering SetIndividualExternal"); + + if (mpi == NULL) { + CYASSL_MSG("mpi NULL error"); + return SSL_FATAL_ERROR; + } + + if (*bn == NULL) { + *bn = CyaSSL_BN_new(); + if (*bn == NULL) { + CYASSL_MSG("SetIndividualExternal alloc failed"); + return SSL_FATAL_ERROR; + } + } + + if (mp_copy(mpi, (mp_int*)((*bn)->internal)) != MP_OKAY) { + CYASSL_MSG("mp_copy error"); + return SSL_FATAL_ERROR; + } + + return 0; + } + + +#ifndef NO_DSA + static int SetDsaExternal(CYASSL_DSA* dsa) + { + DsaKey* key; + CYASSL_MSG("Entering SetDsaExternal"); + + if (dsa == NULL || dsa->internal == NULL) { + CYASSL_MSG("dsa key NULL error"); + return SSL_FATAL_ERROR; + } + + key = (DsaKey*)dsa->internal; + + if (SetIndividualExternal(&dsa->p, &key->p) < 0) { + CYASSL_MSG("dsa p key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&dsa->q, &key->q) < 0) { + CYASSL_MSG("dsa q key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&dsa->g, &key->g) < 0) { + CYASSL_MSG("dsa g key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&dsa->pub_key, &key->y) < 0) { + CYASSL_MSG("dsa y key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&dsa->priv_key, &key->x) < 0) { + CYASSL_MSG("dsa x key error"); + return SSL_FATAL_ERROR; + } + + dsa->exSet = 1; + + return 0; + } +#endif /* NO_DSA */ + + + static int SetRsaExternal(CYASSL_RSA* rsa) + { + RsaKey* key; + CYASSL_MSG("Entering SetRsaExternal"); + + if (rsa == NULL || rsa->internal == NULL) { + CYASSL_MSG("rsa key NULL error"); + return SSL_FATAL_ERROR; + } + + key = (RsaKey*)rsa->internal; + + if (SetIndividualExternal(&rsa->n, &key->n) < 0) { + CYASSL_MSG("rsa n key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->e, &key->e) < 0) { + CYASSL_MSG("rsa e key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->d, &key->d) < 0) { + CYASSL_MSG("rsa d key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->p, &key->p) < 0) { + CYASSL_MSG("rsa p key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->q, &key->q) < 0) { + CYASSL_MSG("rsa q key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->dmp1, &key->dP) < 0) { + CYASSL_MSG("rsa dP key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->dmq1, &key->dQ) < 0) { + CYASSL_MSG("rsa dQ key error"); + return SSL_FATAL_ERROR; + } + + if (SetIndividualExternal(&rsa->iqmp, &key->u) < 0) { + CYASSL_MSG("rsa u key error"); + return SSL_FATAL_ERROR; + } + + rsa->exSet = 1; + + return 0; + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_RSA_generate_key_ex(CYASSL_RSA* rsa, int bits, CYASSL_BIGNUM* bn, + void* cb) + { + RNG rng; + + CYASSL_MSG("CyaSSL_RSA_generate_key_ex"); + + (void)rsa; + (void)bits; + (void)cb; + (void)bn; + + if (InitRng(&rng) < 0) { + CYASSL_MSG("RNG init failed"); + return SSL_FATAL_ERROR; + } + +#ifdef CYASSL_KEY_GEN + if (MakeRsaKey((RsaKey*)rsa->internal, bits, 65537, &rng) < 0) { + CYASSL_MSG("MakeRsaKey failed"); + return SSL_FATAL_ERROR; + } + + if (SetRsaExternal(rsa) < 0) { + CYASSL_MSG("SetRsaExternal failed"); + return SSL_FATAL_ERROR; + } + + rsa->inSet = 1; + + return SSL_SUCCESS; +#else + CYASSL_MSG("No Key Gen built in"); + return SSL_FATAL_ERROR; +#endif + + } + + + /* SSL_SUCCESS on ok */ + int CyaSSL_RSA_blinding_on(CYASSL_RSA* rsa, CYASSL_BN_CTX* bn) + { + (void)rsa; + (void)bn; + + CYASSL_MSG("CyaSSL_RSA_blinding_on"); + + return SSL_SUCCESS; /* on by default */ + } + + + int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr, + unsigned char* to, CYASSL_RSA* rsa, int padding) + { + (void)len; + (void)fr; + (void)to; + (void)rsa; + (void)padding; + + CYASSL_MSG("CyaSSL_RSA_public_encrypt"); + + return SSL_FATAL_ERROR; + } + + + int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr, + unsigned char* to, CYASSL_RSA* rsa, int padding) + { + (void)len; + (void)fr; + (void)to; + (void)rsa; + (void)padding; + + CYASSL_MSG("CyaSSL_RSA_private_decrypt"); + + return SSL_FATAL_ERROR; + } + + + int CyaSSL_RSA_size(const CYASSL_RSA* rsa) + { + CYASSL_MSG("CyaSSL_RSA_size"); + + if (rsa == NULL) + return 0; + + return CyaSSL_BN_num_bytes(rsa->n); + } + + +#ifndef NO_DSA + /* return SSL_SUCCESS on success, < 0 otherwise */ + int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet, + CYASSL_DSA* dsa) + { + RNG tmpRNG; + RNG* rng = &tmpRNG; + + CYASSL_MSG("CyaSSL_DSA_do_sign"); + + if (d == NULL || sigRet == NULL || dsa == NULL) { + CYASSL_MSG("Bad function arguments"); + return SSL_FATAL_ERROR; + } + + if (dsa->inSet == 0) { + CYASSL_MSG("No DSA internal set"); + return SSL_FATAL_ERROR; + } + + if (InitRng(&tmpRNG) != 0) { + CYASSL_MSG("Bad RNG Init, trying global"); + if (initGlobalRNG == 0) { + CYASSL_MSG("Global RNG no Init"); + return SSL_FATAL_ERROR; + } + rng = &globalRNG; + } + + if (DsaSign(d, sigRet, (DsaKey*)dsa->internal, rng) < 0) { + CYASSL_MSG("DsaSign failed"); + return SSL_FATAL_ERROR; + } + + return SSL_SUCCESS; + } +#endif /* NO_DSA */ + + + /* return SSL_SUCCES on ok, 0 otherwise */ + int CyaSSL_RSA_sign(int type, const unsigned char* m, + unsigned int mLen, unsigned char* sigRet, + unsigned int* sigLen, CYASSL_RSA* rsa) + { + byte encodedSig[MAX_ENCODED_SIG_SZ]; + word32 outLen; + word32 signSz; + RNG tmpRNG; + RNG* rng = &tmpRNG; + + CYASSL_MSG("CyaSSL_RSA_sign"); + + if (m == NULL || sigRet == NULL || sigLen == NULL || rsa == NULL) { + CYASSL_MSG("Bad function arguments"); + return 0; + } + + if (rsa->inSet == 0) { + CYASSL_MSG("No RSA internal set"); + return 0; + } + + outLen = (word32)CyaSSL_BN_num_bytes(rsa->n); + if (outLen == 0) { + CYASSL_MSG("Bad RSA size"); + return 0; + } + + if (InitRng(&tmpRNG) != 0) { + CYASSL_MSG("Bad RNG Init, trying global"); + if (initGlobalRNG == 0) { + CYASSL_MSG("Global RNG no Init"); + return 0; + } + rng = &globalRNG; + } + + switch (type) { + case NID_md5: + type = MD5h; + break; + + case NID_sha1: + type = SHAh; + break; + + default: + CYASSL_MSG("Bad md type"); + return 0; + } + + signSz = EncodeSignature(encodedSig, m, mLen, type); + if (signSz == 0) { + CYASSL_MSG("Bad Encode Signature"); + return 0; + } + + *sigLen = RsaSSL_Sign(encodedSig, signSz, sigRet, outLen, + (RsaKey*)rsa->internal, rng); + if (*sigLen <= 0) { + CYASSL_MSG("Bad Rsa Sign"); + return 0; + } + + CYASSL_MSG("CyaSSL_RSA_sign success"); + return SSL_SUCCESS; + } + + + int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from, + unsigned char* to, CYASSL_RSA* rsa, int padding) + { + (void)flen; + (void)from; + (void)to; + (void)rsa; + (void)padding; + + CYASSL_MSG("CyaSSL_RSA_public_decrypt"); + + return SSL_FATAL_ERROR; + } + + + /* generate p-1 and q-1, SSL_SUCCESS on ok */ + int CyaSSL_RSA_GenAdd(CYASSL_RSA* rsa) + { + int err; + mp_int tmp; + + CYASSL_MSG("CyaSSL_RsaGenAdd"); + + if (rsa == NULL || rsa->p == NULL || rsa->q == NULL || rsa->d == NULL || + rsa->dmp1 == NULL || rsa->dmq1 == NULL) { + CYASSL_MSG("rsa no init error"); + return SSL_FATAL_ERROR; + } + + if (mp_init(&tmp) != MP_OKAY) { + CYASSL_MSG("mp_init error"); + return SSL_FATAL_ERROR; + } + + err = mp_sub_d((mp_int*)rsa->p->internal, 1, &tmp); + if (err != MP_OKAY) { + CYASSL_MSG("mp_sub_d error"); + } + else + err = mp_mod((mp_int*)rsa->d->internal, &tmp, + (mp_int*)rsa->dmp1->internal); + + if (err != MP_OKAY) { + CYASSL_MSG("mp_mod error"); + } + else + err = mp_sub_d((mp_int*)rsa->q->internal, 1, &tmp); + if (err != MP_OKAY) { + CYASSL_MSG("mp_sub_d error"); + } + else + err = mp_mod((mp_int*)rsa->d->internal, &tmp, + (mp_int*)rsa->dmq1->internal); + + mp_clear(&tmp); + + if (err == MP_OKAY) + return SSL_SUCCESS; + else + return SSL_FATAL_ERROR; + } + + + void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen, + const EVP_MD* type) + { + CYASSL_MSG("CyaSSL_HMAC_Init"); + + if (ctx == NULL) { + CYASSL_MSG("no ctx on init"); + return; + } + + if (type) { + CYASSL_MSG("init has type"); + + if (XSTRNCMP(type, "MD5", 3) == 0) { + CYASSL_MSG("md5 hmac"); + ctx->type = MD5; + } + else if (XSTRNCMP(type, "SHA256", 6) == 0) { + CYASSL_MSG("sha256 hmac"); + ctx->type = SHA256; + } + + /* has to be last since would pick or 256, 384, or 512 too */ + else if (XSTRNCMP(type, "SHA", 3) == 0) { + CYASSL_MSG("sha hmac"); + ctx->type = SHA; + } + else { + CYASSL_MSG("bad init type"); + } + } + + if (key && keylen) { + CYASSL_MSG("keying hmac"); + HmacSetKey(&ctx->hmac, ctx->type, (const byte*)key, (word32)keylen); + /* OpenSSL compat, no error */ + } + } + + + void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, const unsigned char* data, + int len) + { + CYASSL_MSG("CyaSSL_HMAC_Update"); + + if (ctx && data) { + CYASSL_MSG("updating hmac"); + HmacUpdate(&ctx->hmac, data, (word32)len); + /* OpenSSL compat, no error */ + } + } + + + void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash, + unsigned int* len) + { + CYASSL_MSG("CyaSSL_HMAC_Final"); + + if (ctx && hash) { + CYASSL_MSG("final hmac"); + HmacFinal(&ctx->hmac, hash); + /* OpenSSL compat, no error */ + + if (len) { + CYASSL_MSG("setting output len"); + switch (ctx->type) { + case MD5: + *len = MD5_DIGEST_SIZE; + break; + + case SHA: + *len = SHA_DIGEST_SIZE; + break; + + case SHA256: + *len = SHA256_DIGEST_SIZE; + break; + + default: + CYASSL_MSG("bad hmac type"); + } + } + } + } + + + void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx) + { + (void)ctx; + + CYASSL_MSG("CyaSSL_HMAC_cleanup"); + } + + + const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int id) + { + CYASSL_MSG("CyaSSL_get_digestbynid"); + + switch(id) { + case NID_md5: + return CyaSSL_EVP_md5(); + + case NID_sha1: + return CyaSSL_EVP_sha1(); + + default: + CYASSL_MSG("Bad digest id value"); + } + + return NULL; + } + + + CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY* key) + { + (void)key; + CYASSL_MSG("CyaSSL_EVP_PKEY_get1_RSA"); + + return NULL; + } + + + CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY* key) + { + (void)key; + CYASSL_MSG("CyaSSL_EVP_PKEY_get1_DSA"); + + return NULL; + } + + + void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_MSG("CyaSSL_EVP_X_STATE"); + + if (ctx) { + switch (ctx->cipherType) { + case ARC4_TYPE: + CYASSL_MSG("returning arc4 state"); + return (void*)&ctx->cipher.arc4.x; + + default: + CYASSL_MSG("bad x state type"); + return 0; + } + } + + return NULL; + } + + + int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_MSG("CyaSSL_EVP_X_STATE_LEN"); + + if (ctx) { + switch (ctx->cipherType) { + case ARC4_TYPE: + CYASSL_MSG("returning arc4 state size"); + return sizeof(Arc4); + + default: + CYASSL_MSG("bad x state type"); + return 0; + } + } + + return 0; + } + + + void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, + unsigned char* iv, int len) + { + (void)len; + + CYASSL_MSG("CyaSSL_3des_iv"); + + if (ctx == NULL || iv == NULL) { + CYASSL_MSG("Bad function argument"); + return; + } + + if (doset) + Des3_SetIV(&ctx->cipher.des3, iv); /* OpenSSL compat, no ret */ + else + memcpy(iv, &ctx->cipher.des3.reg, DES_BLOCK_SIZE); + } + + + void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, + unsigned char* iv, int len) + { + (void)len; + + CYASSL_MSG("CyaSSL_aes_ctr_iv"); + + if (ctx == NULL || iv == NULL) { + CYASSL_MSG("Bad function argument"); + return; + } + + if (doset) + AesSetIV(&ctx->cipher.aes, iv); /* OpenSSL compat, no ret */ + else + memcpy(iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); + } + + + const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void) + { + CYASSL_MSG("CyaSSL_ripemd160"); + + return NULL; + } + + + int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* type) + { + CYASSL_MSG("CyaSSL_EVP_MD_size"); + + if (type == NULL) { + CYASSL_MSG("No md type arg"); + return BAD_FUNC_ARG; + } + + if (XSTRNCMP(type, "MD5", 3) == 0) { + return MD5_DIGEST_SIZE; + } + else if (XSTRNCMP(type, "SHA256", 6) == 0) { + return SHA256_DIGEST_SIZE; + } + #ifdef CYASSL_SHA384 + else if (XSTRNCMP(type, "SHA384", 6) == 0) { + return SHA384_DIGEST_SIZE; + } + #endif + #ifdef CYASSL_SHA512 + else if (XSTRNCMP(type, "SHA512", 6) == 0) { + return SHA512_DIGEST_SIZE; + } + #endif + /* has to be last since would pick or 256, 384, or 512 too */ + else if (XSTRNCMP(type, "SHA", 3) == 0) { + return SHA_DIGEST_SIZE; + } + + return BAD_FUNC_ARG; + } + + + int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX* ctx) + { + CYASSL_MSG("CyaSSL_EVP_CIPHER_CTX_iv_length"); + + switch (ctx->cipherType) { + + case AES_128_CBC_TYPE : + case AES_192_CBC_TYPE : + case AES_256_CBC_TYPE : + CYASSL_MSG("AES CBC"); + return AES_BLOCK_SIZE; + +#ifdef CYASSL_AES_COUNTER + case AES_128_CTR_TYPE : + case AES_192_CTR_TYPE : + case AES_256_CTR_TYPE : + CYASSL_MSG("AES CTR"); + return AES_BLOCK_SIZE; +#endif + + case DES_CBC_TYPE : + CYASSL_MSG("DES CBC"); + return DES_BLOCK_SIZE; + + case DES_EDE3_CBC_TYPE : + CYASSL_MSG("DES EDE3 CBC"); + return DES_BLOCK_SIZE; + + case ARC4_TYPE : + CYASSL_MSG("ARC4"); + return 0; + + case NULL_CIPHER_TYPE : + CYASSL_MSG("NULL"); + return 0; + + default: { + CYASSL_MSG("bad type"); + } + } + return 0; + } + + + void CyaSSL_OPENSSL_free(void* p) + { + CYASSL_MSG("CyaSSL_OPENSSL_free"); + + XFREE(p, NULL, 0); + } + + + int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa, + const EVP_CIPHER* cipher, + unsigned char* passwd, int len, + pem_password_cb cb, void* arg) + { + (void)bio; + (void)rsa; + (void)cipher; + (void)passwd; + (void)len; + (void)cb; + (void)arg; + + CYASSL_MSG("CyaSSL_PEM_write_bio_RSAPrivateKey"); + + return SSL_FATAL_ERROR; + } + + + + int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa, + const EVP_CIPHER* cipher, + unsigned char* passwd, int len, + pem_password_cb cb, void* arg) + { + (void)bio; + (void)rsa; + (void)cipher; + (void)passwd; + (void)len; + (void)cb; + (void)arg; + + CYASSL_MSG("CyaSSL_PEM_write_bio_DSAPrivateKey"); + + return SSL_FATAL_ERROR; + } + + + + CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio, + CYASSL_EVP_PKEY** key, pem_password_cb cb, void* arg) + { + (void)bio; + (void)key; + (void)cb; + (void)arg; + + CYASSL_MSG("CyaSSL_PEM_read_bio_PrivateKey"); + + return NULL; + } + + + + +/* Load RSA from Der, SSL_SUCCESS on success < 0 on error */ +int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz) +{ + word32 idx = 0; + int ret; + + CYASSL_ENTER("CyaSSL_RSA_LoadDer"); + + if (rsa == NULL || rsa->internal == NULL || der == NULL || derSz <= 0) { + CYASSL_MSG("Bad function arguments"); + return BAD_FUNC_ARG; + } + + ret = RsaPrivateKeyDecode(der, &idx, (RsaKey*)rsa->internal, derSz); + if (ret < 0) { + CYASSL_MSG("RsaPrivateKeyDecode failed"); + return ret; + } + + if (SetRsaExternal(rsa) < 0) { + CYASSL_MSG("SetRsaExternal failed"); + return SSL_FATAL_ERROR; + } + + rsa->inSet = 1; + + return SSL_SUCCESS; +} + + +#ifndef NO_DSA +/* Load DSA from Der, SSL_SUCCESS on success < 0 on error */ +int CyaSSL_DSA_LoadDer(CYASSL_DSA* dsa, const unsigned char* der, int derSz) +{ + word32 idx = 0; + int ret; + + CYASSL_ENTER("CyaSSL_DSA_LoadDer"); + + if (dsa == NULL || dsa->internal == NULL || der == NULL || derSz <= 0) { + CYASSL_MSG("Bad function arguments"); + return BAD_FUNC_ARG; + } + + ret = DsaPrivateKeyDecode(der, &idx, (DsaKey*)dsa->internal, derSz); + if (ret < 0) { + CYASSL_MSG("DsaPrivateKeyDecode failed"); + return ret; + } + + if (SetDsaExternal(dsa) < 0) { + CYASSL_MSG("SetDsaExternal failed"); + return SSL_FATAL_ERROR; + } + + dsa->inSet = 1; + + return SSL_SUCCESS; +} +#endif /* NO_DSA */ + + + + +#endif /* OPENSSL_EXTRA */ + + +#ifdef SESSION_CERTS + + +/* Get peer's certificate chain */ +CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl) +{ + CYASSL_ENTER("CyaSSL_get_peer_chain"); + if (ssl) + return &ssl->session.chain; + + return 0; +} + + +/* Get peer's certificate chain total count */ +int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain) +{ + CYASSL_ENTER("CyaSSL_get_chain_count"); + if (chain) + return chain->count; + + return 0; +} + + +/* Get peer's ASN.1 DER ceritifcate at index (idx) length in bytes */ +int CyaSSL_get_chain_length(CYASSL_X509_CHAIN* chain, int idx) +{ + CYASSL_ENTER("CyaSSL_get_chain_length"); + if (chain) + return chain->certs[idx].length; + + return 0; +} + + +/* Get peer's ASN.1 DER ceritifcate at index (idx) */ +byte* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN* chain, int idx) +{ + CYASSL_ENTER("CyaSSL_get_chain_cert"); + if (chain) + return chain->certs[idx].buffer; + + return 0; +} + + +/* Get peer's CyaSSL X509 ceritifcate at index (idx) */ +CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN* chain, int idx) +{ + int ret; + CYASSL_X509* x509; + DecodedCert dCert; + + CYASSL_ENTER("CyaSSL_get_chain_X509"); + if (chain == NULL) + return NULL; + + InitDecodedCert(&dCert, chain->certs[idx].buffer, chain->certs[idx].length, + NULL); + ret = ParseCertRelative(&dCert, CERT_TYPE, 0, NULL); + if (ret != 0) { + CYASSL_MSG("Failed to parse cert"); + FreeDecodedCert(&dCert); + return NULL; + } + + x509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), NULL, DYNAMIC_TYPE_X509); + if (x509 == NULL) { + CYASSL_MSG("Failed alloc X509"); + FreeDecodedCert(&dCert); + return NULL; + } + InitX509(x509, 1); + + ret = CopyDecodedToX509(x509, &dCert); + if (ret != 0) { + CYASSL_MSG("Failed to copy decoded"); + XFREE(x509, NULL, DYNAMIC_TYPE_X509); + x509 = NULL; + } + FreeDecodedCert(&dCert); + + return x509; +} + + +/* Get peer's PEM ceritifcate at index (idx), output to buffer if inLen big + enough else return error (-1), output length is in *outLen + SSL_SUCCESS on ok */ +int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN* chain, int idx, + unsigned char* buf, int inLen, int* outLen) +{ + const char header[] = "-----BEGIN CERTIFICATE-----\n"; + const char footer[] = "-----END CERTIFICATE-----\n"; + + int headerLen = sizeof(header) - 1; + int footerLen = sizeof(footer) - 1; + int i; + int err; + + CYASSL_ENTER("CyaSSL_get_chain_cert_pem"); + if (!chain || !outLen || !buf) + return BAD_FUNC_ARG; + + /* don't even try if inLen too short */ + if (inLen < headerLen + footerLen + chain->certs[idx].length) + return BAD_FUNC_ARG; + + /* header */ + XMEMCPY(buf, header, headerLen); + i = headerLen; + + /* body */ + *outLen = inLen; /* input to Base64_Encode */ + if ( (err = Base64_Encode(chain->certs[idx].buffer, + chain->certs[idx].length, buf + i, (word32*)outLen)) < 0) + return err; + i += *outLen; + + /* footer */ + if ( (i + footerLen) > inLen) + return BAD_FUNC_ARG; + XMEMCPY(buf + i, footer, footerLen); + *outLen += headerLen + footerLen; + + return SSL_SUCCESS; +} + + +/* get session ID */ +const byte* CyaSSL_get_sessionID(const CYASSL_SESSION* session) +{ + CYASSL_ENTER("CyaSSL_get_sessionID"); + if (session) + return session->sessionID; + + return NULL; +} + + +#endif /* SESSION_CERTS */ + + +#ifndef NO_CERTS +#ifdef HAVE_PK_CALLBACKS + +#ifdef HAVE_ECC + +void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX* ctx, CallbackEccSign cb) +{ + if (ctx) + ctx->EccSignCb = cb; +} + + +void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->EccSignCtx = ctx; +} + + +void* CyaSSL_GetEccSignCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->EccSignCtx; + + return NULL; +} + + +void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX* ctx, CallbackEccVerify cb) +{ + if (ctx) + ctx->EccVerifyCb = cb; +} + + +void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->EccVerifyCtx = ctx; +} + + +void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->EccVerifyCtx; + + return NULL; +} + +#endif /* HAVE_ECC */ + +#ifndef NO_RSA + +void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX* ctx, CallbackRsaSign cb) +{ + if (ctx) + ctx->RsaSignCb = cb; +} + + +void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->RsaSignCtx = ctx; +} + + +void* CyaSSL_GetRsaSignCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->RsaSignCtx; + + return NULL; +} + + +void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX* ctx, CallbackRsaVerify cb) +{ + if (ctx) + ctx->RsaVerifyCb = cb; +} + + +void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->RsaVerifyCtx = ctx; +} + + +void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->RsaVerifyCtx; + + return NULL; +} + +void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX* ctx, CallbackRsaEnc cb) +{ + if (ctx) + ctx->RsaEncCb = cb; +} + + +void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->RsaEncCtx = ctx; +} + + +void* CyaSSL_GetRsaEncCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->RsaEncCtx; + + return NULL; +} + +void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX* ctx, CallbackRsaDec cb) +{ + if (ctx) + ctx->RsaDecCb = cb; +} + + +void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx) +{ + if (ssl) + ssl->RsaDecCtx = ctx; +} + + +void* CyaSSL_GetRsaDecCtx(CYASSL* ssl) +{ + if (ssl) + return ssl->RsaDecCtx; + + return NULL; +} + + +#endif /* NO_RSA */ + +#endif /* HAVE_PK_CALLBACKS */ +#endif /* NO_CERTS */ + + +#ifdef CYASSL_HAVE_WOLFSCEP + /* Used by autoconf to see if wolfSCEP is available */ + void CyaSSL_wolfSCEP(void) {} +#endif + + +#ifdef CYASSL_HAVE_CERT_SERVICE + /* Used by autoconf to see if cert service is available */ + void CyaSSL_cert_service(void) {} +#endif + diff --git a/project1/cyassl-3.0.0/src/tls.c b/project1/cyassl-3.0.0/src/tls.c new file mode 100644 index 00000000..420ea15b --- /dev/null +++ b/project1/cyassl-3.0.0/src/tls.c @@ -0,0 +1,1973 @@ +/* tls.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include +#include +#include + + + +#ifndef NO_TLS + + +#ifndef min + + static INLINE word32 min(word32 a, word32 b) + { + return a > b ? b : a; + } + +#endif /* min */ + + +#ifdef CYASSL_SHA384 + #define PHASH_MAX_DIGEST_SIZE SHA384_DIGEST_SIZE +#else + #define PHASH_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE +#endif + +/* compute p_hash for MD5, SHA-1, SHA-256, or SHA-384 for TLSv1 PRF */ +static int p_hash(byte* result, word32 resLen, const byte* secret, + word32 secLen, const byte* seed, word32 seedLen, int hash) +{ + word32 len = PHASH_MAX_DIGEST_SIZE; + word32 times; + word32 lastLen; + word32 lastTime; + word32 i; + word32 idx = 0; + int ret; + byte previous[PHASH_MAX_DIGEST_SIZE]; /* max size */ + byte current[PHASH_MAX_DIGEST_SIZE]; /* max size */ + + Hmac hmac; + + switch (hash) { + #ifndef NO_MD5 + case md5_mac: + { + len = MD5_DIGEST_SIZE; + hash = MD5; + } + break; + #endif + #ifndef NO_SHA256 + case sha256_mac: + { + len = SHA256_DIGEST_SIZE; + hash = SHA256; + } + break; + #endif + #ifdef CYASSL_SHA384 + case sha384_mac: + { + len = SHA384_DIGEST_SIZE; + hash = SHA384; + } + break; + #endif +#ifndef NO_SHA + case sha_mac: + default: + { + len = SHA_DIGEST_SIZE; + hash = SHA; + } + break; +#endif + } + + times = resLen / len; + lastLen = resLen % len; + if (lastLen) times += 1; + lastTime = times - 1; + + ret = HmacSetKey(&hmac, hash, secret, secLen); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, seed, seedLen); /* A0 = seed */ + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, previous); /* A1 */ + if (ret != 0) + return ret; + + for (i = 0; i < times; i++) { + ret = HmacUpdate(&hmac, previous, len); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, seed, seedLen); + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, current); + if (ret != 0) + return ret; + + if ( (i == lastTime) && lastLen) + XMEMCPY(&result[idx], current, min(lastLen, sizeof(current))); + else { + XMEMCPY(&result[idx], current, len); + idx += len; + ret = HmacUpdate(&hmac, previous, len); + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, previous); + if (ret != 0) + return ret; + } + } + XMEMSET(previous, 0, sizeof previous); + XMEMSET(current, 0, sizeof current); + XMEMSET(&hmac, 0, sizeof hmac); + + return 0; +} + + + +#ifndef NO_OLD_TLS + +/* calculate XOR for TLSv1 PRF */ +static INLINE void get_xor(byte *digest, word32 digLen, byte* md5, byte* sha) +{ + word32 i; + + for (i = 0; i < digLen; i++) + digest[i] = md5[i] ^ sha[i]; +} + + +/* compute TLSv1 PRF (pseudo random function using HMAC) */ +static int doPRF(byte* digest, word32 digLen, const byte* secret,word32 secLen, + const byte* label, word32 labLen, const byte* seed, + word32 seedLen) +{ + int ret; + word32 half = (secLen + 1) / 2; + + byte md5_half[MAX_PRF_HALF]; /* half is real size */ + byte sha_half[MAX_PRF_HALF]; /* half is real size */ + byte labelSeed[MAX_PRF_LABSEED]; /* labLen + seedLen is real size */ + byte md5_result[MAX_PRF_DIG]; /* digLen is real size */ + byte sha_result[MAX_PRF_DIG]; /* digLen is real size */ + + if (half > MAX_PRF_HALF) + return BUFFER_E; + if (labLen + seedLen > MAX_PRF_LABSEED) + return BUFFER_E; + if (digLen > MAX_PRF_DIG) + return BUFFER_E; + + XMEMSET(md5_result, 0, digLen); + XMEMSET(sha_result, 0, digLen); + + XMEMCPY(md5_half, secret, half); + XMEMCPY(sha_half, secret + half - secLen % 2, half); + + XMEMCPY(labelSeed, label, labLen); + XMEMCPY(labelSeed + labLen, seed, seedLen); + + ret = p_hash(md5_result, digLen, md5_half, half, labelSeed, + labLen + seedLen, md5_mac); + if (ret != 0) + return ret; + ret = p_hash(sha_result, digLen, sha_half, half, labelSeed, + labLen + seedLen, sha_mac); + if (ret != 0) + return ret; + get_xor(digest, digLen, md5_result, sha_result); + + return 0; +} + +#endif + + +/* Wrapper to call straight thru to p_hash in TSL 1.2 cases to remove stack + use */ +static int PRF(byte* digest, word32 digLen, const byte* secret, word32 secLen, + const byte* label, word32 labLen, const byte* seed, word32 seedLen, + int useAtLeastSha256, int hash_type) +{ + int ret = 0; + + if (useAtLeastSha256) { + byte labelSeed[MAX_PRF_LABSEED]; /* labLen + seedLen is real size */ + + if (labLen + seedLen > MAX_PRF_LABSEED) + return BUFFER_E; + + XMEMCPY(labelSeed, label, labLen); + XMEMCPY(labelSeed + labLen, seed, seedLen); + + /* If a cipher suite wants an algorithm better than sha256, it + * should use better. */ + if (hash_type < sha256_mac) + hash_type = sha256_mac; + ret = p_hash(digest, digLen, secret, secLen, labelSeed, + labLen + seedLen, hash_type); + } +#ifndef NO_OLD_TLS + else { + ret = doPRF(digest, digLen, secret, secLen, label, labLen, seed, + seedLen); + } +#endif + + return ret; +} + + +#ifdef CYASSL_SHA384 + #define HSHASH_SZ SHA384_DIGEST_SIZE +#else + #define HSHASH_SZ FINISHED_SZ +#endif + + +int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) +{ + const byte* side; + byte handshake_hash[HSHASH_SZ]; + word32 hashSz = FINISHED_SZ; + +#ifndef NO_OLD_TLS + Md5Final(&ssl->hashMd5, handshake_hash); + ShaFinal(&ssl->hashSha, &handshake_hash[MD5_DIGEST_SIZE]); +#endif + + if (IsAtLeastTLSv1_2(ssl)) { +#ifndef NO_SHA256 + if (ssl->specs.mac_algorithm <= sha256_mac) { + int ret = Sha256Final(&ssl->hashSha256, handshake_hash); + + if (ret != 0) + return ret; + + hashSz = SHA256_DIGEST_SIZE; + } +#endif +#ifdef CYASSL_SHA384 + if (ssl->specs.mac_algorithm == sha384_mac) { + int ret = Sha384Final(&ssl->hashSha384, handshake_hash); + + if (ret != 0) + return ret; + + hashSz = SHA384_DIGEST_SIZE; + } +#endif + } + + if ( XSTRNCMP((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0) + side = tls_client; + else + side = tls_server; + + return PRF((byte*)hashes, TLS_FINISHED_SZ, ssl->arrays->masterSecret, + SECRET_LEN, side, FINISHED_LABEL_SZ, handshake_hash, hashSz, + IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); +} + + +#ifndef NO_OLD_TLS + +ProtocolVersion MakeTLSv1(void) +{ + ProtocolVersion pv; + pv.major = SSLv3_MAJOR; + pv.minor = TLSv1_MINOR; + + return pv; +} + + +ProtocolVersion MakeTLSv1_1(void) +{ + ProtocolVersion pv; + pv.major = SSLv3_MAJOR; + pv.minor = TLSv1_1_MINOR; + + return pv; +} + +#endif + + +ProtocolVersion MakeTLSv1_2(void) +{ + ProtocolVersion pv; + pv.major = SSLv3_MAJOR; + pv.minor = TLSv1_2_MINOR; + + return pv; +} + + +static const byte master_label[MASTER_LABEL_SZ + 1] = "master secret"; +static const byte key_label [KEY_LABEL_SZ + 1] = "key expansion"; + + +int DeriveTlsKeys(CYASSL* ssl) +{ + int ret; + int length = 2 * ssl->specs.hash_size + + 2 * ssl->specs.key_size + + 2 * ssl->specs.iv_size; + byte seed[SEED_LEN]; + byte key_data[MAX_PRF_DIG]; + + XMEMCPY(seed, ssl->arrays->serverRandom, RAN_LEN); + XMEMCPY(&seed[RAN_LEN], ssl->arrays->clientRandom, RAN_LEN); + + ret = PRF(key_data, length, ssl->arrays->masterSecret, SECRET_LEN, + key_label, KEY_LABEL_SZ, seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), + ssl->specs.mac_algorithm); + if (ret != 0) + return ret; + + return StoreKeys(ssl, key_data); +} + + +int MakeTlsMasterSecret(CYASSL* ssl) +{ + int ret; + byte seed[SEED_LEN]; + + XMEMCPY(seed, ssl->arrays->clientRandom, RAN_LEN); + XMEMCPY(&seed[RAN_LEN], ssl->arrays->serverRandom, RAN_LEN); + + ret = PRF(ssl->arrays->masterSecret, SECRET_LEN, + ssl->arrays->preMasterSecret, ssl->arrays->preMasterSz, + master_label, MASTER_LABEL_SZ, + seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); + if (ret != 0) + return ret; + +#ifdef SHOW_SECRETS + { + int i; + printf("master secret: "); + for (i = 0; i < SECRET_LEN; i++) + printf("%02x", ssl->arrays->masterSecret[i]); + printf("\n"); + } +#endif + + return DeriveTlsKeys(ssl); +} + + +/* Used by EAP-TLS and EAP-TTLS to derive keying material from + * the master_secret. */ +int CyaSSL_make_eap_keys(CYASSL* ssl, void* msk, unsigned int len, + const char* label) +{ + byte seed[SEED_LEN]; + + /* + * As per RFC-5281, the order of the client and server randoms is reversed + * from that used by the TLS protocol to derive keys. + */ + XMEMCPY(seed, ssl->arrays->clientRandom, RAN_LEN); + XMEMCPY(&seed[RAN_LEN], ssl->arrays->serverRandom, RAN_LEN); + + return PRF((byte*)msk, len, + ssl->arrays->masterSecret, SECRET_LEN, + (const byte *)label, (word32)strlen(label), + seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); + +} + + +/*** next for static INLINE s copied internal.c ***/ + +/* convert 16 bit integer to opaque */ +static INLINE void c16toa(word16 u16, byte* c) +{ + c[0] = (u16 >> 8) & 0xff; + c[1] = u16 & 0xff; +} + +#ifdef HAVE_TLS_EXTENSIONS +/* convert opaque to 16 bit integer */ +static INLINE void ato16(const byte* c, word16* u16) +{ + *u16 = (c[0] << 8) | (c[1]); +} + +#ifdef HAVE_SNI +/* convert a 24 bit integer into a 32 bit one */ +static INLINE void c24to32(const word24 u24, word32* u32) +{ + *u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; +} +#endif +#endif + +/* convert 32 bit integer to opaque */ +static INLINE void c32toa(word32 u32, byte* c) +{ + c[0] = (u32 >> 24) & 0xff; + c[1] = (u32 >> 16) & 0xff; + c[2] = (u32 >> 8) & 0xff; + c[3] = u32 & 0xff; +} + + +static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) +{ +#ifdef CYASSL_DTLS + if (ssl->options.dtls) { + if (verify) + return ssl->keys.dtls_state.curSeq; /* explicit from peer */ + else + return ssl->keys.dtls_sequence_number - 1; /* already incremented */ + } +#endif + if (verify) + return ssl->keys.peer_sequence_number++; + else + return ssl->keys.sequence_number++; +} + + +#ifdef CYASSL_DTLS + +static INLINE word32 GetEpoch(CYASSL* ssl, int verify) +{ + if (verify) + return ssl->keys.dtls_state.curEpoch; + else + return ssl->keys.dtls_epoch; +} + +#endif /* CYASSL_DTLS */ + + +/*** end copy ***/ + + +/* return HMAC digest type in CyaSSL format */ +int CyaSSL_GetHmacType(CYASSL* ssl) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + + switch (ssl->specs.mac_algorithm) { + #ifndef NO_MD5 + case md5_mac: + { + return MD5; + } + #endif + #ifndef NO_SHA256 + case sha256_mac: + { + return SHA256; + } + #endif + #ifdef CYASSL_SHA384 + case sha384_mac: + { + return SHA384; + } + + #endif + #ifndef NO_SHA + case sha_mac: + { + return SHA; + } + #endif + #ifdef HAVE_BLAKE2 + case blake2b_mac: + { + return BLAKE2B_ID; + } + #endif + default: + { + return SSL_FATAL_ERROR; + } + } +} + + +int CyaSSL_SetTlsHmacInner(CYASSL* ssl, byte* inner, word32 sz, int content, + int verify) +{ + if (ssl == NULL || inner == NULL) + return BAD_FUNC_ARG; + + XMEMSET(inner, 0, CYASSL_TLS_HMAC_INNER_SZ); + +#ifdef CYASSL_DTLS + if (ssl->options.dtls) + c16toa((word16)GetEpoch(ssl, verify), inner); +#endif + c32toa(GetSEQIncrement(ssl, verify), &inner[sizeof(word32)]); + inner[SEQ_SZ] = (byte)content; + inner[SEQ_SZ + ENUM_LEN] = ssl->version.major; + inner[SEQ_SZ + ENUM_LEN + ENUM_LEN] = ssl->version.minor; + c16toa((word16)sz, inner + SEQ_SZ + ENUM_LEN + VERSION_SZ); + + return 0; +} + + +/* TLS type HMAC */ +int TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, + int content, int verify) +{ + Hmac hmac; + int ret; + byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; + + if (ssl == NULL) + return BAD_FUNC_ARG; + + CyaSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify); + + ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), + CyaSSL_GetMacSecret(ssl, verify), ssl->specs.hash_size); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); + if (ret != 0) + return ret; + ret = HmacUpdate(&hmac, in, sz); /* content */ + if (ret != 0) + return ret; + ret = HmacFinal(&hmac, digest); + if (ret != 0) + return ret; + + return 0; +} + +#ifdef HAVE_TLS_EXTENSIONS + +#define IS_OFF(semaphore, light) \ + ((semaphore)[(light) / 8] ^ (byte) (0x01 << ((light) % 8))) + +#define TURN_ON(semaphore, light) \ + ((semaphore)[(light) / 8] |= (byte) (0x01 << ((light) % 8))) + +static int TLSX_Append(TLSX** list, TLSX_Type type) +{ + TLSX* extension; + + if (list == NULL) /* won't check type since this function is static */ + return BAD_FUNC_ARG; + + if ((extension = XMALLOC(sizeof(TLSX), 0, DYNAMIC_TYPE_TLSX)) == NULL) + return MEMORY_E; + + extension->type = type; + extension->data = NULL; + extension->resp = 0; + extension->next = *list; + *list = extension; + + return 0; +} + +#ifndef NO_CYASSL_SERVER + +void TLSX_SetResponse(CYASSL* ssl, TLSX_Type type); + +void TLSX_SetResponse(CYASSL* ssl, TLSX_Type type) +{ + TLSX *ext = TLSX_Find(ssl->extensions, type); + + if (ext) + ext->resp = 1; +} + +#endif + +/* SNI - Server Name Indication */ + +#ifdef HAVE_SNI + +static void TLSX_SNI_Free(SNI* sni) +{ + if (sni) { + switch (sni->type) { + case CYASSL_SNI_HOST_NAME: + XFREE(sni->data.host_name, 0, DYNAMIC_TYPE_TLSX); + break; + } + + XFREE(sni, 0, DYNAMIC_TYPE_TLSX); + } +} + +static void TLSX_SNI_FreeAll(SNI* list) +{ + SNI* sni; + + while ((sni = list)) { + list = sni->next; + TLSX_SNI_Free(sni); + } +} + +static int TLSX_SNI_Append(SNI** list, byte type, const void* data, word16 size) +{ + SNI* sni; + + if (list == NULL) + return BAD_FUNC_ARG; + + if ((sni = XMALLOC(sizeof(SNI), 0, DYNAMIC_TYPE_TLSX)) == NULL) + return MEMORY_E; + + switch (type) { + case CYASSL_SNI_HOST_NAME: { + sni->data.host_name = XMALLOC(size + 1, 0, DYNAMIC_TYPE_TLSX); + + if (sni->data.host_name) { + XSTRNCPY(sni->data.host_name, (const char*) data, size); + sni->data.host_name[size] = 0; + } else { + XFREE(sni, 0, DYNAMIC_TYPE_TLSX); + return MEMORY_E; + } + } + break; + + default: /* invalid type */ + XFREE(sni, 0, DYNAMIC_TYPE_TLSX); + return BAD_FUNC_ARG; + } + + sni->type = type; + sni->next = *list; + +#ifndef NO_CYASSL_SERVER + sni->options = 0; + sni->status = CYASSL_SNI_NO_MATCH; +#endif + + *list = sni; + + return 0; +} + +static word16 TLSX_SNI_GetSize(SNI* list) +{ + SNI* sni; + word16 length = OPAQUE16_LEN; /* list length */ + + while ((sni = list)) { + list = sni->next; + + length += ENUM_LEN + OPAQUE16_LEN; /* sni type + sni length */ + + switch (sni->type) { + case CYASSL_SNI_HOST_NAME: + length += XSTRLEN((char*) sni->data.host_name); + break; + } + } + + return length; +} + +static word16 TLSX_SNI_Write(SNI* list, byte* output) +{ + SNI* sni; + word16 length = 0; + word16 offset = OPAQUE16_LEN; /* list length offset */ + + while ((sni = list)) { + list = sni->next; + + output[offset++] = sni->type; /* sni type */ + + switch (sni->type) { + case CYASSL_SNI_HOST_NAME: + length = XSTRLEN((char*) sni->data.host_name); + + c16toa(length, output + offset); /* sni length */ + offset += OPAQUE16_LEN; + + XMEMCPY(output + offset, sni->data.host_name, length); + + offset += length; + break; + } + } + + c16toa(offset - OPAQUE16_LEN, output); /* writing list length */ + + return offset; +} + +static SNI* TLSX_SNI_Find(SNI *list, byte type) +{ + SNI *sni = list; + + while (sni && sni->type != type) + sni = sni->next; + + return sni; +} + +#ifndef NO_CYASSL_SERVER +static void TLSX_SNI_SetStatus(TLSX* extensions, byte type, byte status) +{ + TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); + SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); + + if (sni) { + sni->status = status; + CYASSL_MSG("SNI did match!"); + } +} + +byte TLSX_SNI_Status(TLSX* extensions, byte type) +{ + TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); + SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); + + if (sni) + return sni->status; + + return 0; +} +#endif + +static int TLSX_SNI_Parse(CYASSL* ssl, byte* input, word16 length, + byte isRequest) +{ +#ifndef NO_CYASSL_SERVER + word16 size = 0; + word16 offset = 0; +#endif + + TLSX *extension = TLSX_Find(ssl->extensions, SERVER_NAME_INDICATION); + + if (!extension) + extension = TLSX_Find(ssl->ctx->extensions, SERVER_NAME_INDICATION); + + if (!extension || !extension->data) + return isRequest ? 0 : BUFFER_ERROR; /* not using SNI OR unexpected + SNI response from server. */ + + if (!isRequest) + return length ? BUFFER_ERROR : 0; /* SNI response must be empty! + Nothing else to do. */ + +#ifndef NO_CYASSL_SERVER + + if (OPAQUE16_LEN > length) + return BUFFER_ERROR; + + ato16(input, &size); + offset += OPAQUE16_LEN; + + /* validating sni list length */ + if (length != OPAQUE16_LEN + size) + return BUFFER_ERROR; + + for (size = 0; offset < length; offset += size) { + SNI *sni; + byte type = input[offset++]; + + if (offset + OPAQUE16_LEN > length) + return BUFFER_ERROR; + + ato16(input + offset, &size); + offset += OPAQUE16_LEN; + + if (offset + size > length) + return BUFFER_ERROR; + + if (!(sni = TLSX_SNI_Find((SNI *) extension->data, type))) { + continue; /* not using this SNI type */ + } + + switch(type) { + case CYASSL_SNI_HOST_NAME: { + byte matched = (XSTRLEN(sni->data.host_name) == size) + && (XSTRNCMP(sni->data.host_name, + (const char *) input + offset, size) == 0); + + if (matched || sni->options & CYASSL_SNI_ANSWER_ON_MISMATCH) { + int r = TLSX_UseSNI(&ssl->extensions, + type, input + offset, size); + + if (r != SSL_SUCCESS) return r; /* throw error */ + + TLSX_SNI_SetStatus(ssl->extensions, type, + matched ? CYASSL_SNI_REAL_MATCH : CYASSL_SNI_FAKE_MATCH); + + } else if (!(sni->options & CYASSL_SNI_CONTINUE_ON_MISMATCH)) { + SendAlert(ssl, alert_fatal, unrecognized_name); + + return UNKNOWN_SNI_HOST_NAME_E; + } + break; + } + } + + TLSX_SetResponse(ssl, SERVER_NAME_INDICATION); + } + +#endif + + return 0; +} + +int TLSX_UseSNI(TLSX** extensions, byte type, const void* data, word16 size) +{ + TLSX* extension = NULL; + SNI* sni = NULL; + int ret = 0; + + if (extensions == NULL || data == NULL) + return BAD_FUNC_ARG; + + if ((ret = TLSX_SNI_Append(&sni, type, data, size)) != 0) + return ret; + + extension = *extensions; + + /* find SNI extension if it already exists. */ + while (extension && extension->type != SERVER_NAME_INDICATION) + extension = extension->next; + + /* push new SNI extension if it doesn't exists. */ + if (!extension) { + if ((ret = TLSX_Append(extensions, SERVER_NAME_INDICATION)) != 0) { + TLSX_SNI_Free(sni); + return ret; + } + + extension = *extensions; + } + + /* push new SNI object to extension data. */ + sni->next = (SNI*) extension->data; + extension->data = (void*) sni; + + /* look for another server name of the same type to remove (replacement) */ + do { + if (sni->next && sni->next->type == type) { + SNI *next = sni->next; + + sni->next = next->next; + TLSX_SNI_Free(next); + + break; + } + } while ((sni = sni->next)); + + return SSL_SUCCESS; +} + +#ifndef NO_CYASSL_SERVER +word16 TLSX_SNI_GetRequest(TLSX* extensions, byte type, void** data) +{ + TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); + SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); + + if (sni && sni->status != CYASSL_SNI_NO_MATCH) { + switch (sni->type) { + case CYASSL_SNI_HOST_NAME: + *data = sni->data.host_name; + return XSTRLEN(*data); + } + } + + return 0; +} + +void TLSX_SNI_SetOptions(TLSX* extensions, byte type, byte options) +{ + TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); + SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); + + if (sni) + sni->options = options; +} + +int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, + byte type, byte* sni, word32* inOutSz) +{ + word32 offset = 0; + word32 len32 = 0; + word16 len16 = 0; + + if (helloSz < RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + CLIENT_HELLO_FIRST) + return INCOMPLETE_DATA; + + /* TLS record header */ + if ((enum ContentType) clientHello[offset++] != handshake) + return BUFFER_ERROR; + + if (clientHello[offset++] != SSLv3_MAJOR) + return BUFFER_ERROR; + + if (clientHello[offset++] < TLSv1_MINOR) + return BUFFER_ERROR; + + ato16(clientHello + offset, &len16); + offset += OPAQUE16_LEN; + + if (offset + len16 > helloSz) + return INCOMPLETE_DATA; + + /* Handshake header */ + if ((enum HandShakeType) clientHello[offset] != client_hello) + return BUFFER_ERROR; + + c24to32(clientHello + offset + 1, &len32); + offset += HANDSHAKE_HEADER_SZ; + + if (offset + len32 > helloSz) + return BUFFER_ERROR; + + /* client hello */ + offset += VERSION_SZ + RAN_LEN; /* version, random */ + + if (helloSz < offset + clientHello[offset]) + return BUFFER_ERROR; + + offset += ENUM_LEN + clientHello[offset]; /* skip session id */ + + /* cypher suites */ + if (helloSz < offset + OPAQUE16_LEN) + return BUFFER_ERROR; + + ato16(clientHello + offset, &len16); + offset += OPAQUE16_LEN; + + if (helloSz < offset + len16) + return BUFFER_ERROR; + + offset += len16; /* skip cypher suites */ + + /* compression methods */ + if (helloSz < offset + 1) + return BUFFER_ERROR; + + if (helloSz < offset + clientHello[offset]) + return BUFFER_ERROR; + + offset += ENUM_LEN + clientHello[offset]; /* skip compression methods */ + + /* extensions */ + if (helloSz < offset + OPAQUE16_LEN) + return 0; /* no extensions in client hello. */ + + ato16(clientHello + offset, &len16); + offset += OPAQUE16_LEN; + + if (helloSz < offset + len16) + return BUFFER_ERROR; + + while (len16 > OPAQUE16_LEN + OPAQUE16_LEN) { + word16 extType; + word16 extLen; + + ato16(clientHello + offset, &extType); + offset += OPAQUE16_LEN; + + ato16(clientHello + offset, &extLen); + offset += OPAQUE16_LEN; + + if (helloSz < offset + extLen) + return BUFFER_ERROR; + + if (extType != SERVER_NAME_INDICATION) { + offset += extLen; /* skip extension */ + } else { + word16 listLen; + + ato16(clientHello + offset, &listLen); + offset += OPAQUE16_LEN; + + if (helloSz < offset + listLen) + return BUFFER_ERROR; + + while (listLen > ENUM_LEN + OPAQUE16_LEN) { + byte sniType = clientHello[offset++]; + word16 sniLen; + + ato16(clientHello + offset, &sniLen); + offset += OPAQUE16_LEN; + + if (helloSz < offset + sniLen) + return BUFFER_ERROR; + + if (sniType != type) { + offset += sniLen; + listLen -= min(ENUM_LEN + OPAQUE16_LEN + sniLen, listLen); + continue; + } + + *inOutSz = min(sniLen, *inOutSz); + XMEMCPY(sni, clientHello + offset, *inOutSz); + + return SSL_SUCCESS; + } + } + + len16 -= min(2 * OPAQUE16_LEN + extLen, len16); + } + + return len16 ? BUFFER_ERROR : SSL_SUCCESS; +} + +#endif + +#define SNI_FREE_ALL TLSX_SNI_FreeAll +#define SNI_GET_SIZE TLSX_SNI_GetSize +#define SNI_WRITE TLSX_SNI_Write +#define SNI_PARSE TLSX_SNI_Parse + +#else + +#define SNI_FREE_ALL(list) +#define SNI_GET_SIZE(list) 0 +#define SNI_WRITE(a, b) 0 +#define SNI_PARSE(a, b, c, d) 0 + +#endif /* HAVE_SNI */ + +#ifdef HAVE_MAX_FRAGMENT + +static word16 TLSX_MFL_Write(byte* data, byte* output) +{ + output[0] = data[0]; + + return ENUM_LEN; +} + +static int TLSX_MFL_Parse(CYASSL* ssl, byte* input, word16 length, + byte isRequest) +{ + if (length != ENUM_LEN) + return BUFFER_ERROR; + + switch (*input) { + case CYASSL_MFL_2_9 : ssl->max_fragment = 512; break; + case CYASSL_MFL_2_10: ssl->max_fragment = 1024; break; + case CYASSL_MFL_2_11: ssl->max_fragment = 2048; break; + case CYASSL_MFL_2_12: ssl->max_fragment = 4096; break; + case CYASSL_MFL_2_13: ssl->max_fragment = 8192; break; + + default: + SendAlert(ssl, alert_fatal, illegal_parameter); + + return UNKNOWN_MAX_FRAG_LEN_E; + } + +#ifndef NO_CYASSL_SERVER + if (isRequest) { + int r = TLSX_UseMaxFragment(&ssl->extensions, *input); + + if (r != SSL_SUCCESS) return r; /* throw error */ + + TLSX_SetResponse(ssl, MAX_FRAGMENT_LENGTH); + } +#endif + + return 0; +} + +int TLSX_UseMaxFragment(TLSX** extensions, byte mfl) +{ + TLSX* extension = NULL; + byte* data = NULL; + int ret = 0; + + if (extensions == NULL) + return BAD_FUNC_ARG; + + if (mfl < CYASSL_MFL_2_9 || CYASSL_MFL_2_13 < mfl) + return BAD_FUNC_ARG; + + if ((data = XMALLOC(ENUM_LEN, 0, DYNAMIC_TYPE_TLSX)) == NULL) + return MEMORY_E; + + data[0] = mfl; + + /* push new MFL extension. */ + if ((ret = TLSX_Append(extensions, MAX_FRAGMENT_LENGTH)) != 0) { + XFREE(data, 0, DYNAMIC_TYPE_TLSX); + return ret; + } + + /* place new mfl to extension data. */ + extension = *extensions; + extension->data = (void*) data; + + /* remove duplicated extensions */ + do { + if (extension->next && extension->next->type == MAX_FRAGMENT_LENGTH) { + TLSX *next = extension->next; + + extension->next = next->next; + next->next = NULL; + + TLSX_FreeAll(next); + + break; + } + } while ((extension = extension->next)); + + return SSL_SUCCESS; +} + + +#define MFL_FREE_ALL(data) XFREE(data, 0, DYNAMIC_TYPE_TLSX) +#define MFL_GET_SIZE(data) ENUM_LEN +#define MFL_WRITE TLSX_MFL_Write +#define MFL_PARSE TLSX_MFL_Parse + +#else + +#define MFL_FREE_ALL(a) +#define MFL_GET_SIZE(a) 0 +#define MFL_WRITE(a, b) 0 +#define MFL_PARSE(a, b, c, d) 0 + +#endif /* HAVE_MAX_FRAGMENT */ + +#ifdef HAVE_TRUNCATED_HMAC + +int TLSX_UseTruncatedHMAC(TLSX** extensions) +{ + int ret = 0; + + if (extensions == NULL) + return BAD_FUNC_ARG; + + if (!TLSX_Find(*extensions, TRUNCATED_HMAC)) + if ((ret = TLSX_Append(extensions, TRUNCATED_HMAC)) != 0) + return ret; + + return SSL_SUCCESS; +} + +static int TLSX_THM_Parse(CYASSL* ssl, byte* input, word16 length, + byte isRequest) +{ + if (length != 0 || input == NULL) + return BUFFER_ERROR; + +#ifndef NO_CYASSL_SERVER + if (isRequest) { + int r = TLSX_UseTruncatedHMAC(&ssl->extensions); + + if (r != SSL_SUCCESS) return r; /* throw error */ + + TLSX_SetResponse(ssl, TRUNCATED_HMAC); + } +#endif + + ssl->truncated_hmac = 1; + + return 0; +} + +#define THM_PARSE TLSX_THM_Parse + +#else + +#define THM_PARSE(a, b, c, d) 0 + +#endif /* HAVE_TRUNCATED_HMAC */ + +#ifdef HAVE_SUPPORTED_CURVES + +#ifndef HAVE_ECC +#error "Elliptic Curves Extension requires Elliptic Curve Cryptography. \ +Use --enable-ecc in the configure script or define HAVE_ECC." +#endif + +static void TLSX_EllipticCurve_FreeAll(EllipticCurve* list) +{ + EllipticCurve* curve; + + while ((curve = list)) { + list = curve->next; + XFREE(curve, 0, DYNAMIC_TYPE_TLSX); + } +} + +static int TLSX_EllipticCurve_Append(EllipticCurve** list, word16 name) +{ + EllipticCurve* curve; + + if (list == NULL) + return BAD_FUNC_ARG; + + if ((curve = XMALLOC(sizeof(EllipticCurve), 0, DYNAMIC_TYPE_TLSX)) == NULL) + return MEMORY_E; + + curve->name = name; + curve->next = *list; + + *list = curve; + + return 0; +} + +#ifndef NO_CYASSL_CLIENT + +static void TLSX_EllipticCurve_ValidateRequest(CYASSL* ssl, byte* semaphore) +{ + int i; + + for (i = 0; i < ssl->suites->suiteSz; i+= 2) + if (ssl->suites->suites[i] == ECC_BYTE) + return; + + /* No elliptic curve suite found */ + TURN_ON(semaphore, ELLIPTIC_CURVES); +} + +static word16 TLSX_EllipticCurve_GetSize(EllipticCurve* list) +{ + EllipticCurve* curve; + word16 length = OPAQUE16_LEN; /* list length */ + + while ((curve = list)) { + list = curve->next; + length += OPAQUE16_LEN; /* curve length */ + } + + return length; +} + +static word16 TLSX_EllipticCurve_WriteR(EllipticCurve* curve, byte* output); +static word16 TLSX_EllipticCurve_WriteR(EllipticCurve* curve, byte* output) +{ + word16 offset = 0; + + if (!curve) + return offset; + + offset = TLSX_EllipticCurve_WriteR(curve->next, output); + c16toa(curve->name, output + offset); + + return OPAQUE16_LEN + offset; +} + +static word16 TLSX_EllipticCurve_Write(EllipticCurve* list, byte* output) +{ + word16 length = TLSX_EllipticCurve_WriteR(list, output + OPAQUE16_LEN); + + c16toa(length, output); /* writing list length */ + + return OPAQUE16_LEN + length; +} + +#endif /* NO_CYASSL_CLIENT */ +#ifndef NO_CYASSL_SERVER + +static int TLSX_EllipticCurve_Parse(CYASSL* ssl, byte* input, word16 length, + byte isRequest) +{ + word16 offset; + word16 name; + int r; + + (void) isRequest; /* shut up compiler! */ + + if (OPAQUE16_LEN > length || length % OPAQUE16_LEN) + return BUFFER_ERROR; + + ato16(input, &offset); + + /* validating curve list length */ + if (length != OPAQUE16_LEN + offset) + return BUFFER_ERROR; + + while (offset) { + ato16(input + offset, &name); + offset -= OPAQUE16_LEN; + + r = TLSX_UseSupportedCurve(&ssl->extensions, name); + + if (r != SSL_SUCCESS) return r; /* throw error */ + } + + return 0; +} + +int TLSX_ValidateEllipticCurves(CYASSL* ssl, byte first, byte second) { + TLSX* extension = (first == ECC_BYTE) + ? TLSX_Find(ssl->extensions, ELLIPTIC_CURVES) + : NULL; + EllipticCurve* curve = NULL; + word32 oid = 0; + word16 octets = 0; /* acording to 'ecc_set_type ecc_sets[];' */ + int sig = 0; /* valitade signature */ + int key = 0; /* validate key */ + + if (!extension) + return 1; /* no suite restriction */ + + for (curve = extension->data; curve && !(sig && key); curve = curve->next) { + + switch (curve->name) { + case CYASSL_ECC_SECP160R1: oid = ECC_160R1; octets = 20; break; + case CYASSL_ECC_SECP192R1: oid = ECC_192R1; octets = 24; break; + case CYASSL_ECC_SECP224R1: oid = ECC_224R1; octets = 28; break; + case CYASSL_ECC_SECP256R1: oid = ECC_256R1; octets = 32; break; + case CYASSL_ECC_SECP384R1: oid = ECC_384R1; octets = 48; break; + case CYASSL_ECC_SECP521R1: oid = ECC_521R1; octets = 66; break; + default: continue; /* unsupported curve */ + } + + switch (second) { +#ifndef NO_DSA + /* ECDHE_ECDSA */ + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: + case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: + case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: + case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: + case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: + case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: + case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8: + sig |= ssl->pkCurveOID == oid; + key |= ssl->eccTempKeySz == octets; + break; + + /* ECDH_ECDSA */ + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: + case TLS_ECDH_ECDSA_WITH_RC4_128_SHA: + case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: + case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: + case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: + case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: + sig |= ssl->pkCurveOID == oid; + key |= ssl->pkCurveOID == oid; + break; +#endif +#ifndef NO_RSA + /* ECDHE_RSA */ + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: + case TLS_ECDHE_RSA_WITH_RC4_128_SHA: + case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: + case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: + case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: + sig = 1; + key |= ssl->eccTempKeySz == octets; + break; + + /* ECDH_RSA */ + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: + case TLS_ECDH_RSA_WITH_RC4_128_SHA: + case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: + case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: + case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: + case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: + sig = 1; + key |= ssl->pkCurveOID == oid; + break; +#endif + default: + sig = 1; + key = 1; + break; + } + } + + return sig && key; +} + +#endif /* NO_CYASSL_SERVER */ + +int TLSX_UseSupportedCurve(TLSX** extensions, word16 name) +{ + TLSX* extension = NULL; + EllipticCurve* curve = NULL; + int ret = 0; + + if (extensions == NULL) + return BAD_FUNC_ARG; + + if ((ret = TLSX_EllipticCurve_Append(&curve, name)) != 0) + return ret; + + extension = *extensions; + + /* find EllipticCurve extension if it already exists. */ + while (extension && extension->type != ELLIPTIC_CURVES) + extension = extension->next; + + /* push new EllipticCurve extension if it doesn't exists. */ + if (!extension) { + if ((ret = TLSX_Append(extensions, ELLIPTIC_CURVES)) != 0) { + XFREE(curve, 0, DYNAMIC_TYPE_TLSX); + return ret; + } + + extension = *extensions; + } + + /* push new EllipticCurve object to extension data. */ + curve->next = (EllipticCurve*) extension->data; + extension->data = (void*) curve; + + /* look for another curve of the same name to remove (replacement) */ + do { + if (curve->next && curve->next->name == name) { + EllipticCurve *next = curve->next; + + curve->next = next->next; + XFREE(next, 0, DYNAMIC_TYPE_TLSX); + + break; + } + } while ((curve = curve->next)); + + return SSL_SUCCESS; +} + +#define EC_FREE_ALL TLSX_EllipticCurve_FreeAll +#define EC_VALIDATE_REQUEST TLSX_EllipticCurve_ValidateRequest + +#ifndef NO_CYASSL_CLIENT +#define EC_GET_SIZE TLSX_EllipticCurve_GetSize +#define EC_WRITE TLSX_EllipticCurve_Write +#else +#define EC_GET_SIZE(list) 0 +#define EC_WRITE(a, b) 0 +#endif + +#ifndef NO_CYASSL_SERVER +#define EC_PARSE TLSX_EllipticCurve_Parse +#else +#define EC_PARSE(a, b, c, d) 0 +#endif + +#else + +#define EC_FREE_ALL(list) +#define EC_GET_SIZE(list) 0 +#define EC_WRITE(a, b) 0 +#define EC_PARSE(a, b, c, d) 0 +#define EC_VALIDATE_REQUEST(a, b) + +#endif /* HAVE_SUPPORTED_CURVES */ + +TLSX* TLSX_Find(TLSX* list, TLSX_Type type) +{ + TLSX* extension = list; + + while (extension && extension->type != type) + extension = extension->next; + + return extension; +} + +void TLSX_FreeAll(TLSX* list) +{ + TLSX* extension; + + while ((extension = list)) { + list = extension->next; + + switch (extension->type) { + case SERVER_NAME_INDICATION: + SNI_FREE_ALL((SNI *) extension->data); + break; + + case MAX_FRAGMENT_LENGTH: + MFL_FREE_ALL(extension->data); + break; + + case TRUNCATED_HMAC: + /* Nothing to do. */ + break; + + case ELLIPTIC_CURVES: + EC_FREE_ALL(extension->data); + break; + } + + XFREE(extension, 0, DYNAMIC_TYPE_TLSX); + } +} + +static word16 TLSX_GetSize(TLSX* list, byte* semaphore, byte isRequest) +{ + TLSX* extension; + word16 length = 0; + + while ((extension = list)) { + list = extension->next; + + if (!isRequest && !extension->resp) + continue; /* skip! */ + + if (IS_OFF(semaphore, extension->type)) { + /* type + data length */ + length += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN; + + switch (extension->type) { + case SERVER_NAME_INDICATION: + if (isRequest) + length += SNI_GET_SIZE((SNI *) extension->data); + break; + case MAX_FRAGMENT_LENGTH: + length += MFL_GET_SIZE(extension->data); + break; + + case TRUNCATED_HMAC: + /* empty extension. */ + break; + + case ELLIPTIC_CURVES: + length += EC_GET_SIZE((EllipticCurve *) extension->data); + break; + } + + TURN_ON(semaphore, extension->type); + } + } + + return length; +} + +static word16 TLSX_Write(TLSX* list, byte* output, byte* semaphore, + byte isRequest) +{ + TLSX* extension; + word16 offset = 0; + word16 length_offset = 0; + + while ((extension = list)) { + list = extension->next; + + if (!isRequest && !extension->resp) + continue; /* skip! */ + + if (IS_OFF(semaphore, extension->type)) { + /* extension type */ + c16toa(extension->type, output + offset); + offset += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN; + length_offset = offset; + + /* extension data should be written internally */ + switch (extension->type) { + case SERVER_NAME_INDICATION: + if (isRequest) + offset += SNI_WRITE((SNI *) extension->data, + output + offset); + break; + + case MAX_FRAGMENT_LENGTH: + offset += MFL_WRITE((byte *) extension->data, + output + offset); + break; + + case TRUNCATED_HMAC: + /* empty extension. */ + break; + + case ELLIPTIC_CURVES: + offset += EC_WRITE((EllipticCurve *) extension->data, + output + offset); + break; + } + + /* writing extension data length */ + c16toa(offset - length_offset, + output + length_offset - OPAQUE16_LEN); + + TURN_ON(semaphore, extension->type); + } + } + + return offset; +} + +#ifndef NO_CYASSL_CLIENT + +word16 TLSX_GetRequestSize(CYASSL* ssl) +{ + word16 length = 0; + + if (ssl && IsTLS(ssl)) { + byte semaphore[16] = {0}; + + EC_VALIDATE_REQUEST(ssl, semaphore); + + if (ssl->extensions) + length += TLSX_GetSize(ssl->extensions, semaphore, 1); + + if (ssl->ctx && ssl->ctx->extensions) + length += TLSX_GetSize(ssl->ctx->extensions, semaphore, 1); + + if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) + length += ssl->suites->hashSigAlgoSz + HELLO_EXT_LEN; + } + + if (length) + length += OPAQUE16_LEN; /* for total length storage */ + + return length; +} + +word16 TLSX_WriteRequest(CYASSL* ssl, byte* output) +{ + word16 offset = 0; + + if (ssl && IsTLS(ssl) && output) { + byte semaphore[16] = {0}; + + offset += OPAQUE16_LEN; /* extensions length */ + + EC_VALIDATE_REQUEST(ssl, semaphore); + + if (ssl->extensions) + offset += TLSX_Write(ssl->extensions, output + offset, + semaphore, 1); + + if (ssl->ctx && ssl->ctx->extensions) + offset += TLSX_Write(ssl->ctx->extensions, output + offset, + semaphore, 1); + + if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) + { + int i; + /* extension type */ + c16toa(HELLO_EXT_SIG_ALGO, output + offset); + offset += HELLO_EXT_TYPE_SZ; + + /* extension data length */ + c16toa(OPAQUE16_LEN + ssl->suites->hashSigAlgoSz, output + offset); + offset += OPAQUE16_LEN; + + /* sig algos length */ + c16toa(ssl->suites->hashSigAlgoSz, output + offset); + offset += OPAQUE16_LEN; + + /* sig algos */ + for (i = 0; i < ssl->suites->hashSigAlgoSz; i++, offset++) + output[offset] = ssl->suites->hashSigAlgo[i]; + } + + if (offset > OPAQUE16_LEN) + c16toa(offset - OPAQUE16_LEN, output); /* extensions length */ + } + + return offset; +} + +#endif /* NO_CYASSL_CLIENT */ + +#ifndef NO_CYASSL_SERVER + +word16 TLSX_GetResponseSize(CYASSL* ssl) +{ + word16 length = 0; + byte semaphore[16] = {0}; + + if (ssl && IsTLS(ssl)) + length += TLSX_GetSize(ssl->extensions, semaphore, 0); + + /* All the response data is set at the ssl object only, so no ctx here. */ + + if (length) + length += OPAQUE16_LEN; /* for total length storage */ + + return length; +} + +word16 TLSX_WriteResponse(CYASSL *ssl, byte* output) +{ + word16 offset = 0; + + if (ssl && IsTLS(ssl) && output) { + byte semaphore[16] = {0}; + + offset += OPAQUE16_LEN; /* extensions length */ + + offset += TLSX_Write(ssl->extensions, output + offset, semaphore, 0); + + if (offset > OPAQUE16_LEN) + c16toa(offset - OPAQUE16_LEN, output); /* extensions length */ + } + + return offset; +} + +#endif /* NO_CYASSL_SERVER */ + +int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, byte isRequest, + Suites *suites) +{ + int ret = 0; + word16 offset = 0; + + if (!ssl || !input || !suites) + return BAD_FUNC_ARG; + + while (ret == 0 && offset < length) { + word16 type; + word16 size; + + if (length - offset < HELLO_EXT_TYPE_SZ + OPAQUE16_LEN) + return BUFFER_ERROR; + + ato16(input + offset, &type); + offset += HELLO_EXT_TYPE_SZ; + + ato16(input + offset, &size); + offset += OPAQUE16_LEN; + + if (offset + size > length) + return BUFFER_ERROR; + + switch (type) { + case SERVER_NAME_INDICATION: + CYASSL_MSG("SNI extension received"); + + ret = SNI_PARSE(ssl, input + offset, size, isRequest); + break; + + case MAX_FRAGMENT_LENGTH: + CYASSL_MSG("Max Fragment Length extension received"); + + ret = MFL_PARSE(ssl, input + offset, size, isRequest); + break; + + case TRUNCATED_HMAC: + CYASSL_MSG("Truncated HMAC extension received"); + + ret = THM_PARSE(ssl, input + offset, size, isRequest); + break; + + case ELLIPTIC_CURVES: + CYASSL_MSG("Elliptic Curves extension received"); + + ret = EC_PARSE(ssl, input + offset, size, isRequest); + break; + + case HELLO_EXT_SIG_ALGO: + if (isRequest) { + /* do not mess with offset inside the switch! */ + if (IsAtLeastTLSv1_2(ssl)) { + ato16(input + offset, &suites->hashSigAlgoSz); + + if (suites->hashSigAlgoSz > size - OPAQUE16_LEN) + return BUFFER_ERROR; + + XMEMCPY(suites->hashSigAlgo, + input + offset + OPAQUE16_LEN, + min(suites->hashSigAlgoSz, + HELLO_EXT_SIGALGO_MAX)); + } + } else { + CYASSL_MSG("Servers MUST NOT send SIG ALGO extension."); + } + + break; + } + + /* offset should be updated here! */ + offset += size; + } + + return ret; +} + +/* undefining semaphore macros */ +#undef IS_OFF +#undef TURN_ON + +#elif defined(HAVE_SNI) \ + || defined(HAVE_MAX_FRAGMENT) \ + || defined(HAVE_TRUNCATED_HMAC) \ + || defined(HAVE_SUPPORTED_CURVES) + +#error "Using TLS extensions requires HAVE_TLS_EXTENSIONS to be defined." + +#endif /* HAVE_TLS_EXTENSIONS */ + + +#ifndef NO_CYASSL_CLIENT + +#ifndef NO_OLD_TLS + + CYASSL_METHOD* CyaTLSv1_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) + InitSSL_Method(method, MakeTLSv1()); + return method; + } + + + CYASSL_METHOD* CyaTLSv1_1_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) + InitSSL_Method(method, MakeTLSv1_1()); + return method; + } + +#endif /* !NO_OLD_TLS */ + +#ifndef NO_SHA256 /* can't use without SHA256 */ + + CYASSL_METHOD* CyaTLSv1_2_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) + InitSSL_Method(method, MakeTLSv1_2()); + return method; + } + +#endif + + + CYASSL_METHOD* CyaSSLv23_client_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) { +#ifndef NO_SHA256 /* 1.2 requires SHA256 */ + InitSSL_Method(method, MakeTLSv1_2()); +#else + InitSSL_Method(method, MakeTLSv1_1()); +#endif +#ifndef NO_OLD_TLS + method->downgrade = 1; +#endif + } + return method; + } + + +#endif /* NO_CYASSL_CLIENT */ + + + +#ifndef NO_CYASSL_SERVER + +#ifndef NO_OLD_TLS + + CYASSL_METHOD* CyaTLSv1_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) { + InitSSL_Method(method, MakeTLSv1()); + method->side = CYASSL_SERVER_END; + } + return method; + } + + + CYASSL_METHOD* CyaTLSv1_1_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) { + InitSSL_Method(method, MakeTLSv1_1()); + method->side = CYASSL_SERVER_END; + } + return method; + } + +#endif /* !NO_OLD_TLS */ + +#ifndef NO_SHA256 /* can't use without SHA256 */ + + CYASSL_METHOD* CyaTLSv1_2_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) { + InitSSL_Method(method, MakeTLSv1_2()); + method->side = CYASSL_SERVER_END; + } + return method; + } + +#endif + + + CYASSL_METHOD* CyaSSLv23_server_method(void) + { + CYASSL_METHOD* method = + (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, + DYNAMIC_TYPE_METHOD); + if (method) { +#ifndef NO_SHA256 /* 1.2 requires SHA256 */ + InitSSL_Method(method, MakeTLSv1_2()); +#else + InitSSL_Method(method, MakeTLSv1_1()); +#endif + method->side = CYASSL_SERVER_END; +#ifndef NO_OLD_TLS + method->downgrade = 1; +#endif /* !NO_OLD_TLS */ + } + return method; + } + + + +#endif /* NO_CYASSL_SERVER */ +#endif /* NO_TLS */ + diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj b/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj new file mode 100755 index 00000000..b0b8c78b --- /dev/null +++ b/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po @@ -0,0 +1 @@ +# dummy diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am new file mode 100644 index 00000000..d4c90acc --- /dev/null +++ b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am @@ -0,0 +1,13 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +if BUILD_SNIFFTEST +noinst_PROGRAMS += sslSniffer/sslSnifferTest/snifftest +sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c +sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap +sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la +endif +EXTRA_DIST += sslSniffer/sslSniffer.vcproj +EXTRA_DIST += sslSniffer/sslSnifferTest/sslSniffTest.vcproj +DISTCLEANFILES+= sslSniffer/sslSnifferTest/.libs/snifftest diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c new file mode 100755 index 00000000..60c80ad4 --- /dev/null +++ b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c @@ -0,0 +1,301 @@ +/* snifftest.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef _WIN32 + #define CYASSL_SNIFFER +#endif + +#ifndef CYASSL_SNIFFER + +/* blank build */ +#include +#include +int main(void) +{ + printf("do ./configure --enable-sniffer to enable build support\n"); + return EXIT_SUCCESS; +} + +#else +/* do a full build */ + +#ifdef _MSC_VER + /* builds on *nix too, for scanf device and port */ + #define _CRT_SECURE_NO_WARNINGS +#endif + +#include /* pcap stuff */ +#include /* printf */ +#include /* EXIT_SUCCESS */ +#include /* strcmp */ +#include /* signal */ + +#include + + +#ifndef _WIN32 + #include +#endif + +typedef unsigned char byte; + +enum { + ETHER_IF_FRAME_LEN = 14, /* ethernet interface frame length */ + NULL_IF_FRAME_LEN = 4, /* no link interface frame length */ +}; + + +pcap_t* pcap = NULL; +pcap_if_t* alldevs = NULL; + + +static void FreeAll(void) +{ + if (pcap) + pcap_close(pcap); + if (alldevs) + pcap_freealldevs(alldevs); +#ifndef _WIN32 + ssl_FreeSniffer(); +#endif +} + +static void sig_handler(const int sig) +{ + printf("SIGINT handled = %d.\n", sig); + FreeAll(); + if (sig) + exit(EXIT_SUCCESS); +} + + +static void err_sys(const char* msg) +{ + fprintf(stderr, "%s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + + +#ifdef _WIN32 + #define SNPRINTF _snprintf +#else + #define SNPRINTF snprintf +#endif + + +static char* iptos(unsigned int addr) +{ + static char output[32]; + byte *p = (byte*)&addr; + + SNPRINTF(output, sizeof(output), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); + + return output; +} + + +int main(int argc, char** argv) +{ + int ret = 0; + int inum; + int port; + int saveFile = 0; + int i = 0; + int frame = ETHER_IF_FRAME_LEN; + char err[PCAP_ERRBUF_SIZE]; + char filter[32]; + const char *server = NULL; + struct bpf_program fp; + pcap_if_t *d; + pcap_addr_t *a; + + signal(SIGINT, sig_handler); + +#ifndef _WIN32 + ssl_InitSniffer(); /* dll load on Windows */ +#endif + ssl_Trace("./tracefile.txt", err); + + if (argc == 1) { + /* normal case, user chooses device and port */ + + if (pcap_findalldevs(&alldevs, err) == -1) + err_sys("Error in pcap_findalldevs"); + + for (d = alldevs; d; d=d->next) { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if (i == 0) + err_sys("No interfaces found! Make sure pcap or WinPcap is" + " installed correctly and you have sufficient permissions"); + + printf("Enter the interface number (1-%d): ", i); + ret = scanf("%d", &inum); + if (ret != 1) + printf("scanf port failed\n"); + + if (inum < 1 || inum > i) + err_sys("Interface number out of range"); + + /* Jump to the selected adapter */ + for (d = alldevs, i = 0; i < inum - 1; d = d->next, i++); + + pcap = pcap_create(d->name, err); + + if (pcap == NULL) printf("pcap_create failed %s\n", err); + + /* get an IPv4 address */ + for (a = d->addresses; a; a = a->next) { + switch(a->addr->sa_family) + { + case AF_INET: + server = + iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr); + printf("server = %s\n", server); + break; + + default: + break; + } + } + if (server == NULL) + err_sys("Unable to get device IPv4 address"); + + ret = pcap_set_snaplen(pcap, 65536); + if (ret != 0) printf("pcap_set_snaplen failed %s\n", pcap_geterr(pcap)); + + ret = pcap_set_timeout(pcap, 1000); + if (ret != 0) printf("pcap_set_timeout failed %s\n", pcap_geterr(pcap)); + + ret = pcap_set_buffer_size(pcap, 1000000); + if (ret != 0) + printf("pcap_set_buffer_size failed %s\n", pcap_geterr(pcap)); + + ret = pcap_set_promisc(pcap, 1); + if (ret != 0) printf("pcap_set_promisc failed %s\n", pcap_geterr(pcap)); + + + ret = pcap_activate(pcap); + if (ret != 0) printf("pcap_activate failed %s\n", pcap_geterr(pcap)); + + printf("Enter the port to scan: "); + ret = scanf("%d", &port); + if (ret != 1) + printf("scanf port failed\n"); + + SNPRINTF(filter, sizeof(filter), "tcp and port %d", port); + + ret = pcap_compile(pcap, &fp, filter, 0, 0); + if (ret != 0) printf("pcap_compile failed %s\n", pcap_geterr(pcap)); + + ret = pcap_setfilter(pcap, &fp); + if (ret != 0) printf("pcap_setfilter failed %s\n", pcap_geterr(pcap)); + + ret = ssl_SetPrivateKey(server, port, "../../certs/server-key.pem", + FILETYPE_PEM, NULL, err); + if (ret != 0) { + printf("Please run directly from sslSniffer/sslSnifferTest dir\n"); + } + } + else if (argc >= 3) { + saveFile = 1; + pcap = pcap_open_offline(argv[1], err); + if (pcap == NULL) { + printf("pcap_open_offline failed %s\n", err); + ret = -1; + } + else { + const char* passwd = NULL; + /* defaults for server and port */ + port = 443; + server = "127.0.0.1"; + + if (argc >= 4) + server = argv[3]; + + if (argc >= 5) + port = atoi(argv[4]); + + if (argc >= 6) + passwd = argv[5]; + + ret = ssl_SetPrivateKey(server, port, argv[2], + FILETYPE_PEM, passwd, err); + } + } + else { + /* usage error */ + printf( "usage: ./snifftest or ./snifftest dump pemKey" + " [server] [port] [password]\n"); + exit(EXIT_FAILURE); + } + + if (ret != 0) + err_sys(err); + + if (pcap_datalink(pcap) == DLT_NULL) + frame = NULL_IF_FRAME_LEN; + + while (1) { + static int packetNumber = 0; + struct pcap_pkthdr header; + const unsigned char* packet = pcap_next(pcap, &header); + packetNumber++; + if (packet) { + + byte data[65535+16384]; /* may have a partial 16k record cached */ + + if (header.caplen > 40) { /* min ip(20) + min tcp(20) */ + packet += frame; + header.caplen -= frame; + } + else + continue; + + ret = ssl_DecodePacket(packet, header.caplen, data, err); + if (ret < 0) + printf("ssl_Decode ret = %d, %s\n", ret, err); + if (ret > 0) { + data[ret] = 0; + printf("SSL App Data(%d:%d):%s\n", packetNumber, ret, data); + } + } + else if (saveFile) + break; /* we're done reading file */ + } + FreeAll(); + + return EXIT_SUCCESS; +} + +#endif /* full build */ diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj new file mode 100755 index 00000000..ff9977fa --- /dev/null +++ b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/stamp-h b/project1/cyassl-3.0.0/stamp-h new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/project1/cyassl-3.0.0/stamp-h @@ -0,0 +1 @@ +timestamp diff --git a/project1/cyassl-3.0.0/stamp-h.in b/project1/cyassl-3.0.0/stamp-h.in new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/stamp-h1 b/project1/cyassl-3.0.0/stamp-h1 new file mode 100644 index 00000000..4547fe1b --- /dev/null +++ b/project1/cyassl-3.0.0/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/project1/cyassl-3.0.0/support/cyassl.pc b/project1/cyassl-3.0.0/support/cyassl.pc new file mode 100644 index 00000000..ca23e375 --- /dev/null +++ b/project1/cyassl-3.0.0/support/cyassl.pc @@ -0,0 +1,10 @@ +prefix=/usr/local +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: cyassl +Description: cyassl C library. +Version: 3.0.0 +Libs: -L${libdir} -lcyassl +Cflags: -I${includedir} diff --git a/project1/cyassl-3.0.0/support/cyassl.pc.in b/project1/cyassl-3.0.0/support/cyassl.pc.in new file mode 100644 index 00000000..ad469bc4 --- /dev/null +++ b/project1/cyassl-3.0.0/support/cyassl.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: cyassl +Description: cyassl C library. +Version: @VERSION@ +Libs: -L${libdir} -lcyassl +Cflags: -I${includedir} diff --git a/project1/cyassl-3.0.0/support/include.am b/project1/cyassl-3.0.0/support/include.am new file mode 100644 index 00000000..b0b4e494 --- /dev/null +++ b/project1/cyassl-3.0.0/support/include.am @@ -0,0 +1,10 @@ +# vim:ft=automake +# All paths should be given relative to the root +# + +EXTRA_DIST += support/cyassl.pc + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = support/cyassl.pc + + diff --git a/project1/cyassl-3.0.0/swig/PythonBuild.sh b/project1/cyassl-3.0.0/swig/PythonBuild.sh new file mode 100755 index 00000000..7f0939c4 --- /dev/null +++ b/project1/cyassl-3.0.0/swig/PythonBuild.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo +swig -python cyassl.i +pythonIncludes=`python-config --includes` +pythonLibs=`python-config --libs` +gcc -c -fpic cyassl_wrap.c -I$pythonIncludes +gcc -c -fpic cyassl_adds.c +gcc -shared -flat_namespace cyassl_adds.o cyassl_wrap.o -lcyassl $pythonLibs -o _cyassl.so +python runme.py diff --git a/project1/cyassl-3.0.0/swig/README b/project1/cyassl-3.0.0/swig/README new file mode 100644 index 00000000..302bc6be --- /dev/null +++ b/project1/cyassl-3.0.0/swig/README @@ -0,0 +1,44 @@ + + +Initial swig interface file + +Please send questions to support@yassl.com + + + +**Python Support** + + For Linux, OS X, or *nix + +1) build CyaSSL with fpic on Linux, not needed on OS X + ./configure --disable-shared CFLAGS=-fpic + make + sudo make install + + +2) start the example echoserver from the examples/echoserver directory + ./echoserver + +3) run ./PtyonBuild.sh from this directory it will + a) build the swig wrapper file + b) compile the swig wrapper and cyassl wrapper files + c) place them into a cyassl shared library for python + d) run runme.py which will connect to the CyaSSL echo server, write a + string, then read the result and output it + + + Windows only + +1) Make sure the install path to cyassl doesn't have any spaces anywhere in the + directory path because swig doesn't like that +2) Have python for Windows installed, note install directory +3) Have swigwin installed, note install directory +4) Make sure swigwin install direcotry is added to PATH env. variable +5) Make sure env. variables PYTHON_INCLUDE and PYTHON_LIB are set correctly e.g. + PYTHON_INCLUE="c:\Python26\include" + PYTHON_LIB="c:\Python26\libs\python26.lib" +6) Build python_cyassl in Release mode only, Debug build fails to find a debug + python library that isn't included by default +7) The outputs _cyassl.pyd and cyassl.py are the cyassl import library +8) Can now run python runme.py from the swig directory + diff --git a/project1/cyassl-3.0.0/swig/cyassl.i b/project1/cyassl-3.0.0/swig/cyassl.i new file mode 100644 index 00000000..f9dc7d38 --- /dev/null +++ b/project1/cyassl-3.0.0/swig/cyassl.i @@ -0,0 +1,63 @@ +/* cyassl.i + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +%module cyassl +%{ + #include + #include + + /* defn adds */ + char* CyaSSL_error_string(int err); + int CyaSSL_swig_connect(CYASSL*, const char* server, int port); + RNG* GetRng(void); + RsaKey* GetRsaPrivateKey(const char* file); + void FillSignStr(unsigned char*, const char*, int); +%} + + +CYASSL_METHOD* CyaTLSv1_client_method(void); +CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD*); +int CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, const char*); +CYASSL* CyaSSL_new(CYASSL_CTX*); +int CyaSSL_get_error(CYASSL*, int); +int CyaSSL_write(CYASSL*, const char*, int); +int CyaSSL_Debugging_ON(void); +int CyaSSL_Init(void); +char* CyaSSL_error_string(int); +int CyaSSL_swig_connect(CYASSL*, const char* server, int port); + +int RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng); + +int RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key); + +RNG* GetRng(void); +RsaKey* GetRsaPrivateKey(const char* file); +void FillSignStr(unsigned char*, const char*, int); + +%include carrays.i +%include cdata.i +%array_class(unsigned char, byteArray); +int CyaSSL_read(CYASSL*, unsigned char*, int); + + +#define SSL_FAILURE 0 +#define SSL_SUCCESS 1 + diff --git a/project1/cyassl-3.0.0/swig/cyassl_adds.c b/project1/cyassl-3.0.0/swig/cyassl_adds.c new file mode 100644 index 00000000..4733815d --- /dev/null +++ b/project1/cyassl-3.0.0/swig/cyassl_adds.c @@ -0,0 +1,234 @@ +/* cyassl_adds.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifndef _WIN32 + #define HAVE_CONFIG_H +#endif + +#include +#include +#include + +#include +#include +#include +#include + +#ifdef _WIN32 + #include + #include + #ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */ + #include + #include + #endif + #define SOCKET_T int +#else + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #ifdef NON_BLOCKING + #include + #endif + #ifdef TEST_IPV6 + #include + #endif + #define SOCKET_T unsigned int +#endif /* _WIN32 */ + +#ifdef _MSC_VER + /* disable conversion warning */ + /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ + #pragma warning(disable:4244 4996) +#endif + +#if defined(__MACH__) || defined(_WIN32) + #ifndef _SOCKLEN_T + typedef int socklen_t; + #endif +#endif + + +/* HPUX doesn't use socklent_t for third parameter to accept */ +#if !defined(__hpux__) + typedef socklen_t* ACCEPT_THIRD_T; +#else + typedef int* ACCEPT_THIRD_T; +#endif + + +#ifdef _WIN32 + #define CloseSocket(s) closesocket(s) + #define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); } +#else + #define CloseSocket(s) close(s) + #define StartTCP() +#endif + + +#ifdef TEST_IPV6 + typedef struct sockaddr_in6 SOCKADDR_IN_T; + #define AF_INET_V AF_INET6 +#else + typedef struct sockaddr_in SOCKADDR_IN_T; + #define AF_INET_V AF_INET +#endif + + +enum { + SSL_BLOCKING = 2, + SSL_NONBLOCKING = 4 +}; + + +static int tcp_socket(SOCKET_T* sockfd, SOCKADDR_IN_T* addr, const char* peer, + short port) +{ + const char* host = peer; + + /* peer could be in human readable form */ + if (isalpha(peer[0])) { + struct hostent* entry = gethostbyname(peer); + + if (entry) { + struct sockaddr_in tmp; + memset(&tmp, 0, sizeof(struct sockaddr_in)); + memcpy(&tmp.sin_addr.s_addr, entry->h_addr_list[0],entry->h_length); + host = inet_ntoa(tmp.sin_addr); + } + else + return -1; /* no entry for host */ + } + + *sockfd = socket(AF_INET, SOCK_STREAM, 0); + memset(addr, 0, sizeof(SOCKADDR_IN_T)); + + addr->sin_family = AF_INET; + addr->sin_port = htons(port); + addr->sin_addr.s_addr = inet_addr(host); + +#ifdef SO_NOSIGPIPE + { + int on = 1; + socklen_t len = sizeof(on); + setsockopt(*sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, len); + } +#endif + + return 0; +} + + +static int tcp_connect(SOCKET_T* sockfd, const char* ip, short port) +{ + SOCKADDR_IN_T addr; + int ret = tcp_socket(sockfd, &addr, ip, port); + if (ret != 0) return ret; + + if (connect(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) + return -2; /* can't connect */ + + return 0; +} + + +int CyaSSL_swig_connect(CYASSL* ssl, const char* server, int port) +{ + SOCKET_T sockfd; + int ret = tcp_connect(&sockfd, server, port); + if (ret != 0) return ret; + + CyaSSL_set_fd(ssl, sockfd); + + return CyaSSL_connect(ssl); +} + + +char* CyaSSL_error_string(int err) +{ + static char buffer[CYASSL_MAX_ERROR_SZ]; + + return CyaSSL_ERR_error_string(err, buffer); +} + + +RNG* GetRng(void) +{ + RNG* rng = (RNG*)malloc(sizeof(RNG)); + + if (rng) + if (InitRng(rng) != 0) { + free(rng); + rng = 0; + } + + return rng; +} + + +RsaKey* GetRsaPrivateKey(const char* keyFile) +{ + RsaKey* key = (RsaKey*)malloc(sizeof(RsaKey)); + + if (key) { + byte tmp[1024]; + size_t bytes; + int ret; + word32 idx = 0; + FILE* file = fopen(keyFile, "rb"); + + if (!file) { + free(key); + return 0; + } + + bytes = fread(tmp, 1, sizeof(tmp), file); + fclose(file); + InitRsaKey(key, 0); + + ret = RsaPrivateKeyDecode(tmp, &idx, key, (word32)bytes); + if (ret != 0) { + FreeRsaKey(key); + free(key); + return 0; + } + } + return key; +} + + +void FillSignStr(unsigned char* dst, const char* src, int size) +{ + memcpy(dst, src, size); +} + diff --git a/project1/cyassl-3.0.0/swig/include.am b/project1/cyassl-3.0.0/swig/include.am new file mode 100644 index 00000000..32adb5b8 --- /dev/null +++ b/project1/cyassl-3.0.0/swig/include.am @@ -0,0 +1,12 @@ +# vim:ft=automake +# All paths should be given relative to the root + +EXTRA_DIST+= \ + swig/PythonBuild.sh \ + swig/README \ + swig/cyassl.i \ + swig/cyassl_adds.c \ + swig/python_cyassl.vcproj \ + swig/rsasign.py \ + swig/runme.py + diff --git a/project1/cyassl-3.0.0/swig/python_cyassl.vcproj b/project1/cyassl-3.0.0/swig/python_cyassl.vcproj new file mode 100755 index 00000000..d4373a94 --- /dev/null +++ b/project1/cyassl-3.0.0/swig/python_cyassl.vcproj @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/swig/rsasign.py b/project1/cyassl-3.0.0/swig/rsasign.py new file mode 100644 index 00000000..ad2e114f --- /dev/null +++ b/project1/cyassl-3.0.0/swig/rsasign.py @@ -0,0 +1,35 @@ +# file: rsasign.py + +import cyassl + + +# start Random Number Generator +rng = cyassl.GetRng() +if rng == None: + print "Couldn't get an RNG" + exit(-1) + +# load RSA private key in DER format +key = cyassl.GetRsaPrivateKey("../certs/client-key.der") +if key == None: + print "Couldn't load DER private key file" + exit(-1) + +# Make byte Arrays and fill input +signOutput = cyassl.byteArray(128) # 128 allows 1024 bit private key +signStr = cyassl.byteArray(25) # input can't be larger then key size + # 64 for 512 bit 128 for 1024 bit +cyassl.FillSignStr(signStr, "Everybody gets Friday off", 25) + +# Do RSA Sign +signedSize = cyassl.RsaSSL_Sign(signStr, 25, signOutput, 128, key, rng) + +# Show output +print "Signed Size = ", signedSize, " signed array = ", cyassl.cdata(signOutput, signedSize) + +# let's verify this worked +signVerify = cyassl.byteArray(signedSize) +verifySize = cyassl.RsaSSL_Verify(signOutput, signedSize, signVerify, signedSize, key) + +print "Verify Size = ", verifySize, " verify array = ", cyassl.cdata(signVerify, verifySize) + diff --git a/project1/cyassl-3.0.0/swig/runme.py b/project1/cyassl-3.0.0/swig/runme.py new file mode 100644 index 00000000..42cbdb45 --- /dev/null +++ b/project1/cyassl-3.0.0/swig/runme.py @@ -0,0 +1,40 @@ +# file: runme.py + +import cyassl + +print "" +print "Trying to connect to the echo server..." + +cyassl.CyaSSL_Init() +#cyassl.CyaSSL_Debugging_ON() +ctx = cyassl.CyaSSL_CTX_new(cyassl.CyaTLSv1_client_method()) +if ctx == None: + print "Couldn't get SSL CTX for TLSv1" + exit(-1) + +ret = cyassl.CyaSSL_CTX_load_verify_locations(ctx, "../certs/ca-cert.pem", None) +if ret != cyassl.SSL_SUCCESS: + print "Couldn't do SSL_CTX_load_verify_locations " + print "error string = ", ret + exit(-1) + +ssl = cyassl.CyaSSL_new(ctx) +ret = cyassl.CyaSSL_swig_connect(ssl, "localhost", 11111) + +if ret != cyassl.SSL_SUCCESS: + print "Couldn't do SSL connect" + err = cyassl.CyaSSL_get_error(ssl, 0) + print "error string = ", cyassl.CyaSSL_error_string(err) + exit(-1) + +print "...Connected" +written = cyassl.CyaSSL_write(ssl, "hello from python\r\n", 19) + +if written > 0: + print "Wrote ", written, " bytes" + +byteArray = cyassl.byteArray(100) +readBytes = cyassl.CyaSSL_read(ssl, byteArray, 100) + +print "server reply: ", cyassl.cdata(byteArray, readBytes) + diff --git a/project1/cyassl-3.0.0/tags b/project1/cyassl-3.0.0/tags new file mode 100644 index 00000000..dc12d3ba --- /dev/null +++ b/project1/cyassl-3.0.0/tags @@ -0,0 +1,17768 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +ACCEPT_BEGIN cyassl/internal.h /^ ACCEPT_BEGIN = 0,$/;" e enum:AcceptState +ACCEPT_CLIENT_HELLO_DONE cyassl/internal.h /^ ACCEPT_CLIENT_HELLO_DONE,$/;" e enum:AcceptState +ACCEPT_FINISHED_DONE cyassl/internal.h /^ ACCEPT_FINISHED_DONE,$/;" e enum:AcceptState +ACCEPT_FIRST_REPLY_DONE cyassl/internal.h /^ ACCEPT_FIRST_REPLY_DONE,$/;" e enum:AcceptState +ACCEPT_SECOND_REPLY_DONE cyassl/internal.h /^ ACCEPT_SECOND_REPLY_DONE,$/;" e enum:AcceptState +ACCEPT_THIRD_REPLY_DONE cyassl/internal.h /^ ACCEPT_THIRD_REPLY_DONE$/;" e enum:AcceptState +ACCEPT_THIRD_T cyassl/test.h /^ typedef int* ACCEPT_THIRD_T;$/;" t +ACCEPT_THIRD_T cyassl/test.h /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t +ACCEPT_THIRD_T cyassl/test.h /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t +ACCEPT_THIRD_T swig/cyassl_adds.c /^ typedef int* ACCEPT_THIRD_T;$/;" t file: +ACCEPT_THIRD_T swig/cyassl_adds.c /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t file: +ACK_MISSED_STR cyassl/sniffer_error.h 103;" d +ACLOCAL Makefile /^ACLOCAL = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing aclocal-1.14$/;" m +ACLOCAL_AMFLAGS Makefile /^ACLOCAL_AMFLAGS = -I m4$/;" m +ACLOCAL_M4 Makefile /^ACLOCAL_M4 = $(top_srcdir)\/aclocal.m4$/;" m +ADC0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ADC0_IRQHandler$/;" l +ADC1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ADC1_IRQHandler$/;" l +ADC_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +ADC_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l +AEAD_AUTH_DATA_SZ cyassl/internal.h /^ AEAD_AUTH_DATA_SZ = 13, \/* Size of the data to authenticate *\/$/;" e enum:Misc +AEAD_EXP_IV_SZ cyassl/internal.h /^ AEAD_EXP_IV_SZ = 8, \/* Size of the explicit IV *\/$/;" e enum:Misc +AEAD_IMP_IV_SZ cyassl/internal.h /^ AEAD_IMP_IV_SZ = 4, \/* Size of the implicit IV *\/$/;" e enum:Misc +AEAD_LEN_OFFSET cyassl/internal.h /^ AEAD_LEN_OFFSET = 11, \/* Auth Data: Length *\/$/;" e enum:Misc +AEAD_NONCE_SZ cyassl/internal.h /^ AEAD_NONCE_SZ = AEAD_EXP_IV_SZ + AEAD_IMP_IV_SZ,$/;" e enum:Misc +AEAD_SEQ_OFFSET cyassl/internal.h /^ AEAD_SEQ_OFFSET = 4, \/* Auth Data: Sequence number *\/$/;" e enum:Misc +AEAD_TYPE_OFFSET cyassl/internal.h /^ AEAD_TYPE_OFFSET = 8, \/* Auth Data: Type *\/$/;" e enum:Misc +AEAD_VMAJ_OFFSET cyassl/internal.h /^ AEAD_VMAJ_OFFSET = 9, \/* Auth Data: Major Version *\/$/;" e enum:Misc +AEAD_VMIN_OFFSET cyassl/internal.h /^ AEAD_VMIN_OFFSET = 10, \/* Auth Data: Minor Version *\/$/;" e enum:Misc +AESBuffer ctaocrypt/src/aes.c /^static unsigned char *AESBuffer = NULL ;$/;" v file: +AES_128_CBC_TYPE cyassl/openssl/evp.h /^ AES_128_CBC_TYPE = 1,$/;" e enum:__anon36 +AES_128_CTR_TYPE cyassl/openssl/evp.h /^ AES_128_CTR_TYPE = 4,$/;" e enum:__anon36 +AES_128_KEY_SIZE cyassl/internal.h /^ AES_128_KEY_SIZE = 16, \/* for 128 bit *\/$/;" e enum:Misc +AES_128_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_128_Key_Expansion:$/;" l +AES_192_CBC_TYPE cyassl/openssl/evp.h /^ AES_192_CBC_TYPE = 2,$/;" e enum:__anon36 +AES_192_CTR_TYPE cyassl/openssl/evp.h /^ AES_192_CTR_TYPE = 5,$/;" e enum:__anon36 +AES_192_KEY_SIZE cyassl/internal.h /^ AES_192_KEY_SIZE = 24, \/* for 192 bit *\/$/;" e enum:Misc +AES_192_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_192_Key_Expansion:$/;" l +AES_256_CBC_TYPE cyassl/openssl/evp.h /^ AES_256_CBC_TYPE = 3,$/;" e enum:__anon36 +AES_256_CTR_TYPE cyassl/openssl/evp.h /^ AES_256_CTR_TYPE = 6,$/;" e enum:__anon36 +AES_256_KEY_SIZE cyassl/internal.h /^ AES_256_KEY_SIZE = 32, \/* for 256 bit *\/$/;" e enum:Misc +AES_256_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_256_Key_Expansion:$/;" l +AES_BLOCK_LENGTH ctaocrypt/src/aes.c 620;" d file: +AES_BLOCK_SIZE cyassl/ctaocrypt/aes.h /^ AES_BLOCK_SIZE = 16$/;" e enum:__anon65 +AES_BLOCK_SIZE cyassl/internal.h 416;" d +AES_BUFFER_SIZE ctaocrypt/src/aes.c 615;" d file: +AES_CBC_decrypt ctaocrypt/src/aes_asm.s /^AES_CBC_decrypt:$/;" l +AES_CBC_encrypt ctaocrypt/src/aes_asm.s /^AES_CBC_encrypt:$/;" l +AES_CCM_16_AUTH_SZ cyassl/internal.h /^ AES_CCM_16_AUTH_SZ = 16, \/* AES-CCM-16 Auth Tag length *\/$/;" e enum:Misc +AES_CCM_8_AUTH_SZ cyassl/internal.h /^ AES_CCM_8_AUTH_SZ = 8, \/* AES-CCM-8 Auth Tag Length *\/$/;" e enum:Misc +AES_CCM_AUTH_E cyassl/ctaocrypt/error-crypt.h /^ AES_CCM_AUTH_E = -181, \/* AES-CCM Authentication check failure *\/$/;" e enum:__anon61 +AES_DECRYPTION cyassl/ctaocrypt/aes.h /^ AES_DECRYPTION = 1,$/;" e enum:__anon65 +AES_ECB_decrypt ctaocrypt/src/aes_asm.s /^AES_ECB_decrypt:$/;" l +AES_ECB_encrypt ctaocrypt/src/aes_asm.s /^AES_ECB_encrypt:$/;" l +AES_ENCRYPTION cyassl/ctaocrypt/aes.h /^ AES_ENCRYPTION = 0,$/;" e enum:__anon65 +AES_ENC_TYPE cyassl/ctaocrypt/aes.h /^ AES_ENC_TYPE = 1, \/* cipher unique type *\/$/;" e enum:__anon65 +AES_GCM_AUTH_E cyassl/ctaocrypt/error-crypt.h /^ AES_GCM_AUTH_E = -180, \/* AES-GCM Authentication check failure *\/$/;" e enum:__anon61 +AES_GCM_AUTH_SZ cyassl/internal.h /^ AES_GCM_AUTH_SZ = 16, \/* AES-GCM Auth Tag length *\/$/;" e enum:Misc +AES_IV_SIZE cyassl/internal.h /^ AES_IV_SIZE = 16, \/* always block size *\/$/;" e enum:Misc +AES_TEST_SIZE mcapi/mcapi_test.c 749;" d file: +AES_set_decrypt_key ctaocrypt/src/aes.c /^static int AES_set_decrypt_key(const unsigned char* userKey, const int bits,$/;" f file: +AES_set_encrypt_key ctaocrypt/src/aes.c /^static int AES_set_encrypt_key(const unsigned char *userKey, const int bits,$/;" f file: +AFTER cyassl/ctaocrypt/asn.h /^ AFTER = 1$/;" e enum:__anon60 +AF_INET_V cyassl/test.h 132;" d +AF_INET_V cyassl/test.h 135;" d +AF_INET_V swig/cyassl_adds.c 101;" d file: +AF_INET_V swig/cyassl_adds.c 104;" d file: +AHBPrescTable IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AHBPrescTable IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v +AIA_CA_ISSUER_OID cyassl/ctaocrypt/asn.h /^ AIA_CA_ISSUER_OID = 117 \/* 1.3.6.1.5.5.7.48.2 *\/$/;" e enum:AuthInfo_Sum +AIA_OCSP_OID cyassl/ctaocrypt/asn.h /^ AIA_OCSP_OID = 116, \/* 1.3.6.1.5.5.7.48.1 *\/$/;" e enum:AuthInfo_Sum +ALERT_SIZE cyassl/internal.h /^ ALERT_SIZE = 2, \/* level + description *\/$/;" e enum:Misc +ALGO_ID_E cyassl/ctaocrypt/error-crypt.h /^ ALGO_ID_E = -133, \/* setting algo id error *\/$/;" e enum:__anon61 +ALIGN cyassl/ctaocrypt/blake2-int.h 43;" d +ALIGN cyassl/ctaocrypt/blake2-int.h 45;" d +ALIGN cyassl/ctaocrypt/blake2-int.h 47;" d +ALIGN16 cyassl/ctaocrypt/aes.h 42;" d +ALIGN16 cyassl/ctaocrypt/aes.h 44;" d +ALIGN16 cyassl/ctaocrypt/aes.h 46;" d +ALIGN16 cyassl/ctaocrypt/aes.h 53;" d +ALIGN16 cyassl/internal.h 122;" d +ALT_NAMES_OID cyassl/ctaocrypt/asn.h /^ ALT_NAMES_OID = 131,$/;" e enum:Extensions_Sum +ALT_NAME_E cyassl/ctaocrypt/error-crypt.h /^ ALT_NAME_E = -177, \/* alt name size problem, too big *\/$/;" e enum:__anon61 +AMINCLUDE Makefile /^AMINCLUDE = aminclude.am$/;" m +AMTAR Makefile /^AMTAR = $${TAR-tar}$/;" m +AM_CFLAGS Makefile /^AM_CFLAGS = -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DHAVE_WEBSERVER -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer$/;" m +AM_CPPFLAGS Makefile /^AM_CPPFLAGS = -fvisibility=hidden$/;" m +AM_DEFAULT_VERBOSITY Makefile /^AM_DEFAULT_VERBOSITY = 0$/;" m +AM_LDFLAGS Makefile /^AM_LDFLAGS = $/;" m +AM_RECURSIVE_TARGETS Makefile /^AM_RECURSIVE_TARGETS = cscope check recheck$/;" m +AM_V_CC Makefile /^AM_V_CC = $(am__v_CC_$(V))$/;" m +AM_V_CCAS Makefile /^AM_V_CCAS = $(am__v_CCAS_$(V))$/;" m +AM_V_CCLD Makefile /^AM_V_CCLD = $(am__v_CCLD_$(V))$/;" m +AM_V_GEN Makefile /^AM_V_GEN = $(am__v_GEN_$(V))$/;" m +AM_V_P Makefile /^AM_V_P = $(am__v_P_$(V))$/;" m +AM_V_at Makefile /^AM_V_at = $(am__v_at_$(V))$/;" m +AM_V_lt Makefile /^AM_V_lt = $(am__v_lt_$(V))$/;" m +ANOTHER_MSG_STR cyassl/sniffer_error.h 76;" d +AR Makefile /^AR = ar$/;" m +ARC4_ENC_TYPE cyassl/ctaocrypt/arc4.h /^ ARC4_ENC_TYPE = 4, \/* cipher unique type *\/$/;" e enum:__anon59 +ARC4_STATE_SIZE cyassl/ctaocrypt/arc4.h /^ ARC4_STATE_SIZE = 256$/;" e enum:__anon59 +ARC4_TYPE cyassl/openssl/evp.h /^ ARC4_TYPE = 9,$/;" e enum:__anon36 +ARP_MAXRETRY IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 195;" d file: +ARP_NOTIFY IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 207;" d file: +ARP_RESEND IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 200;" d file: +ARP_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 184;" d file: +ARP_TIMEOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 189;" d file: +ASN1_GENERALIZEDTIME cyassl/ssl.h /^ ASN1_GENERALIZEDTIME = 4,$/;" e enum:__anon19 +ASN1_INTEGER cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_INTEGER ASN1_INTEGER;$/;" t +ASN1_INTEGER_cmp cyassl/openssl/ssl.h 267;" d +ASN1_INTEGER_get cyassl/openssl/ssl.h 268;" d +ASN1_OBJECT cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_OBJECT ASN1_OBJECT;$/;" t +ASN1_STRING cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_STRING ASN1_STRING;$/;" t +ASN1_TIME cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_TIME ASN1_TIME;$/;" t +ASN1_TIME_pr cyassl/openssl/ssl.h 265;" d +ASN1_UTCTIME cyassl/openssl/ssl.h 73;" d +ASN1_UTCTIME_pr cyassl/openssl/ssl.h 356;" d +ASN_AFTER_DATE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_AFTER_DATE_E = -151, \/* ASN date error, current date after *\/$/;" e enum:__anon61 +ASN_BEFORE_DATE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_BEFORE_DATE_E = -150, \/* ASN date error, current date before *\/$/;" e enum:__anon61 +ASN_BITSTR_E cyassl/ctaocrypt/error-crypt.h /^ ASN_BITSTR_E = -147, \/* ASN bit string error, wrong id *\/$/;" e enum:__anon61 +ASN_BIT_STRING cyassl/ctaocrypt/asn.h /^ ASN_BIT_STRING = 0x03,$/;" e enum:ASN_Tags +ASN_BOOLEAN cyassl/ctaocrypt/asn.h /^ ASN_BOOLEAN = 0x01,$/;" e enum:ASN_Tags +ASN_BOOL_SIZE cyassl/ctaocrypt/asn.h /^ ASN_BOOL_SIZE = 2, \/* including type *\/$/;" e enum:Misc_ASN +ASN_COMMON_NAME cyassl/ctaocrypt/asn.h /^ ASN_COMMON_NAME = 0x03, \/* CN *\/$/;" e enum:DN_Tags +ASN_CONSTRUCTED cyassl/ctaocrypt/asn.h /^ ASN_CONSTRUCTED = 0x20,$/;" e enum:ASN_Flags +ASN_CONTEXT_SPECIFIC cyassl/ctaocrypt/asn.h /^ ASN_CONTEXT_SPECIFIC = 0x80$/;" e enum:ASN_Flags +ASN_COUNTRY_NAME cyassl/ctaocrypt/asn.h /^ ASN_COUNTRY_NAME = 0x06, \/* C *\/$/;" e enum:DN_Tags +ASN_CRIT_EXT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRIT_EXT_E = -160, \/* ASN unsupported critical extension *\/$/;" e enum:__anon61 +ASN_CRL_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRL_CONFIRM_E = -189, \/* ASN CRL signature confirm failure *\/$/;" e enum:__anon61 +ASN_CRL_NO_SIGNER_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRL_NO_SIGNER_E = -190, \/* ASN CRL no signer to confirm failure *\/$/;" e enum:__anon61 +ASN_DATE_SZ_E cyassl/ctaocrypt/error-crypt.h /^ ASN_DATE_SZ_E = -149, \/* ASN date error, bad size *\/$/;" e enum:__anon61 +ASN_DH_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_DH_KEY_E = -158, \/* ASN key init error, invalid input *\/$/;" e enum:__anon61 +ASN_DIR_TYPE cyassl/ctaocrypt/asn.h /^ ASN_DIR_TYPE = 0x04,$/;" e enum:ASN_Tags +ASN_DNS_TYPE cyassl/ctaocrypt/asn.h /^ ASN_DNS_TYPE = 0x02,$/;" e enum:ASN_Tags +ASN_ECC_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_ECC_KEY_E = -171, \/* ASN ECC bad input *\/$/;" e enum:__anon61 +ASN_ENUMERATED cyassl/ctaocrypt/asn.h /^ ASN_ENUMERATED = 0x0a,$/;" e enum:ASN_Tags +ASN_EXPECT_0_E cyassl/ctaocrypt/error-crypt.h /^ ASN_EXPECT_0_E = -146, \/* ASN expect error, not zero *\/$/;" e enum:__anon61 +ASN_EXTENSIONS cyassl/ctaocrypt/asn.h /^ ASN_EXTENSIONS = 0xa3,$/;" e enum:ASN_Tags +ASN_Flags cyassl/ctaocrypt/asn.h /^enum ASN_Flags{$/;" g +ASN_GENERALIZED_TIME cyassl/ctaocrypt/asn.h /^ ASN_GENERALIZED_TIME = 0x18,$/;" e enum:ASN_Tags +ASN_GEN_TIME_SZ cyassl/ctaocrypt/asn.h /^ ASN_GEN_TIME_SZ = 15, \/* 7 numbers * 2 + Zulu tag *\/$/;" e enum:Misc_ASN +ASN_GETINT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_GETINT_E = -142, \/* ASN get big int error, invalid data *\/$/;" e enum:__anon61 +ASN_INPUT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_INPUT_E = -154, \/* ASN input error, not enough data *\/$/;" e enum:__anon61 +ASN_INTEGER cyassl/ctaocrypt/asn.h /^ ASN_INTEGER = 0x02,$/;" e enum:ASN_Tags +ASN_LOCALITY_NAME cyassl/ctaocrypt/asn.h /^ ASN_LOCALITY_NAME = 0x07, \/* L *\/$/;" e enum:DN_Tags +ASN_LONG_LENGTH cyassl/ctaocrypt/asn.h /^ ASN_LONG_LENGTH = 0x80$/;" e enum:ASN_Tags +ASN_NAME_INVALID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NAME_INVALID_E = -198, \/* ASN name constraint error *\/$/;" e enum:__anon61 +ASN_NAME_MAX cyassl/ctaocrypt/asn.h /^ ASN_NAME_MAX = 256,$/;" e enum:Misc_ASN +ASN_NAME_MAX cyassl/internal.h 1674;" d +ASN_NO_SIGNER_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NO_SIGNER_E = -188, \/* ASN no signer to confirm failure *\/$/;" e enum:__anon61 +ASN_NTRU_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NTRU_KEY_E = -159, \/* ASN ntru key decode error, invalid input *\/$/;" e enum:__anon61 +ASN_OBJECT_ID cyassl/ctaocrypt/asn.h /^ ASN_OBJECT_ID = 0x06,$/;" e enum:ASN_Tags +ASN_OBJECT_ID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_OBJECT_ID_E = -144, \/* ASN object id error, invalid id *\/$/;" e enum:__anon61 +ASN_OCSP_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_OCSP_CONFIRM_E = -191, \/* ASN OCSP signature confirm failure *\/$/;" e enum:__anon61 +ASN_OCTET_STRING cyassl/ctaocrypt/asn.h /^ ASN_OCTET_STRING = 0x04,$/;" e enum:ASN_Tags +ASN_ORGUNIT_NAME cyassl/ctaocrypt/asn.h /^ ASN_ORGUNIT_NAME = 0x0b \/* OU *\/$/;" e enum:DN_Tags +ASN_ORG_NAME cyassl/ctaocrypt/asn.h /^ ASN_ORG_NAME = 0x0a, \/* O *\/$/;" e enum:DN_Tags +ASN_OTHER_TYPE cyassl/ctaocrypt/asn.h /^ ASN_OTHER_TYPE = 0x00,$/;" e enum:ASN_Tags +ASN_PARSE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_PARSE_E = -140, \/* ASN parsing error, invalid input *\/$/;" e enum:__anon61 +ASN_RFC822_TYPE cyassl/ctaocrypt/asn.h /^ ASN_RFC822_TYPE = 0x01,$/;" e enum:ASN_Tags +ASN_RSA_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_RSA_KEY_E = -143, \/* ASN key init error, invalid input *\/$/;" e enum:__anon61 +ASN_SEQUENCE cyassl/ctaocrypt/asn.h /^ ASN_SEQUENCE = 0x10,$/;" e enum:ASN_Tags +ASN_SERIAL_NUMBER cyassl/ctaocrypt/asn.h /^ ASN_SERIAL_NUMBER = 0x05, \/* serialNumber *\/$/;" e enum:DN_Tags +ASN_SET cyassl/ctaocrypt/asn.h /^ ASN_SET = 0x11,$/;" e enum:ASN_Tags +ASN_SIG_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_CONFIRM_E = -155, \/* ASN sig error, confirm failure *\/$/;" e enum:__anon61 +ASN_SIG_HASH_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_HASH_E = -156, \/* ASN sig error, unsupported hash type *\/$/;" e enum:__anon61 +ASN_SIG_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_KEY_E = -157, \/* ASN sig error, unsupported key type *\/$/;" e enum:__anon61 +ASN_SIG_OID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_OID_E = -152, \/* ASN signature error, mismatched oid *\/$/;" e enum:__anon61 +ASN_STATE_NAME cyassl/ctaocrypt/asn.h /^ ASN_STATE_NAME = 0x08, \/* ST *\/$/;" e enum:DN_Tags +ASN_SUR_NAME cyassl/ctaocrypt/asn.h /^ ASN_SUR_NAME = 0x04, \/* SN *\/$/;" e enum:DN_Tags +ASN_TAG_NULL cyassl/ctaocrypt/asn.h /^ ASN_TAG_NULL = 0x05,$/;" e enum:ASN_Tags +ASN_TAG_NULL_E cyassl/ctaocrypt/error-crypt.h /^ ASN_TAG_NULL_E = -145, \/* ASN tag error, not null *\/$/;" e enum:__anon61 +ASN_TIME_E cyassl/ctaocrypt/error-crypt.h /^ ASN_TIME_E = -153, \/* ASN time error, unknown time type *\/$/;" e enum:__anon61 +ASN_Tags cyassl/ctaocrypt/asn.h /^enum ASN_Tags { $/;" g +ASN_UNKNOWN_OID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_UNKNOWN_OID_E = -148, \/* ASN oid error, unknown sum id *\/$/;" e enum:__anon61 +ASN_UTC_TIME cyassl/ctaocrypt/asn.h /^ ASN_UTC_TIME = 0x17,$/;" e enum:ASN_Tags +ASN_UTF8STRING cyassl/ctaocrypt/asn.h /^ ASN_UTF8STRING = 0x0c,$/;" e enum:ASN_Tags +ASN_VERSION_E cyassl/ctaocrypt/error-crypt.h /^ ASN_VERSION_E = -141, \/* ASN version error, invalid number *\/$/;" e enum:__anon61 +ASSISTS ctaocrypt/src/aes_asm.s /^ASSISTS:$/;" l +ATIMER_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ATIMER_IRQHandler$/;" l +ATOMIC_USER cyassl/ctaocrypt/settings.h 600;" d +AUTH_INFO_OID cyassl/ctaocrypt/asn.h /^ AUTH_INFO_OID = 69,$/;" e enum:Extensions_Sum +AUTH_KEY_OID cyassl/ctaocrypt/asn.h /^ AUTH_KEY_OID = 149,$/;" e enum:Extensions_Sum +AUTOCONF Makefile /^AUTOCONF = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing autoconf$/;" m +AUTOHEADER Makefile /^AUTOHEADER = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing autoheader$/;" m +AUTOMAKE Makefile /^AUTOMAKE = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing automake-1.14$/;" m +AWK Makefile /^AWK = mawk$/;" m +AcceptState cyassl/internal.h /^enum AcceptState {$/;" g +AddCA src/ssl.c /^int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)$/;" f +AddCRL src/crl.c /^static int AddCRL(CYASSL_CRL* crl, DecodedCRL* dcrl)$/;" f file: +AddFinCapture src/sniffer.c /^static int AddFinCapture(SnifferSession* session, word32 sequence)$/;" f file: +AddHandShakeHeader src/internal.c /^static void AddHandShakeHeader(byte* output, word32 length, byte type,$/;" f file: +AddHeaders src/internal.c /^static void AddHeaders(byte* output, word32 length, byte type, CYASSL* ssl)$/;" f file: +AddLateName src/internal.c /^ void AddLateName(const char* name, TimeoutInfo* info)$/;" f +AddLateRecordHeader src/internal.c /^ void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info)$/;" f +AddLength ctaocrypt/src/md4.c /^static INLINE void AddLength(Md4* md4, word32 len)$/;" f file: +AddLength ctaocrypt/src/md5.c /^static INLINE void AddLength(Md5* md5, word32 len)$/;" f file: +AddLength ctaocrypt/src/ripemd.c /^static INLINE void AddLength(RipeMd* ripemd, word32 len)$/;" f file: +AddLength ctaocrypt/src/sha.c /^static INLINE void AddLength(Sha* sha, word32 len)$/;" f file: +AddLength ctaocrypt/src/sha256.c /^static INLINE void AddLength(Sha256* sha256, word32 len)$/;" f file: +AddLength ctaocrypt/src/sha512.c /^static INLINE void AddLength(Sha512* sha512, word32 len)$/;" f file: +AddLength384 ctaocrypt/src/sha512.c /^static INLINE void AddLength384(Sha384* sha384, word32 len)$/;" f file: +AddPacketInfo src/internal.c /^ void AddPacketInfo(const char* name, TimeoutInfo* info, const byte* data,$/;" f +AddPacketName src/internal.c /^ void AddPacketName(const char* name, HandShakeInfo* info)$/;" f +AddRecordHeader src/internal.c /^static void AddRecordHeader(byte* output, word32 length, byte type, CYASSL* ssl)$/;" f file: +AddSession src/ssl.c /^int AddSession(CYASSL* ssl)$/;" f +AddSignature ctaocrypt/src/asn.c /^static int AddSignature(byte* buffer, int bodySz, const byte* sig, int sigSz,$/;" f file: +AddTimes src/ssl.c 5506;" d file: +AddToReassembly src/sniffer.c /^static int AddToReassembly(byte from, word32 seq, const byte* sslFrame,$/;" f file: +AdjustSequence src/sniffer.c /^static int AdjustSequence(TcpInfo* tcpInfo, SnifferSession* session,$/;" f file: +AeadIncrementExpIV src/internal.c /^static INLINE void AeadIncrementExpIV(CYASSL* ssl)$/;" f file: +Aes cyassl/ctaocrypt/aes.h /^typedef struct Aes {$/;" s +Aes cyassl/ctaocrypt/aes.h /^} Aes;$/;" t typeref:struct:Aes +AesCaviumCbcDecrypt ctaocrypt/src/aes.c /^static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in,$/;" f file: +AesCaviumCbcEncrypt ctaocrypt/src/aes.c /^static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in,$/;" f file: +AesCaviumSetKey ctaocrypt/src/aes.c /^static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length,$/;" f file: +AesCbcCrypt ctaocrypt/src/aes.c /^static int AesCbcCrypt(Aes* aes, byte* po, const byte* pi, word32 sz, word32 descHeader)$/;" f file: +AesCbcDecrypt ctaocrypt/src/aes.c /^ int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesCbcDecrypt ctaocrypt/src/aes.c /^int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesCbcDecrypt ctaocrypt/src/aes.c /^int AesCbcDecrypt(Aes* aes, byte* po, const byte* pi, word32 sz)$/;" f +AesCbcDecrypt cyassl/ctaocrypt/aes.h 167;" d +AesCbcEncrypt ctaocrypt/src/aes.c /^ int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesCbcEncrypt ctaocrypt/src/aes.c /^int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesCbcEncrypt ctaocrypt/src/aes.c /^int AesCbcEncrypt(Aes* aes, byte* po, const byte* pi, word32 sz)$/;" f +AesCbcEncrypt cyassl/ctaocrypt/aes.h 166;" d +AesCcmCtrInc ctaocrypt/src/aes.c /^static INLINE void AesCcmCtrInc(byte* B, word32 lenSz)$/;" f file: +AesCcmDecrypt ctaocrypt/src/aes.c /^int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,$/;" f +AesCcmEncrypt ctaocrypt/src/aes.c /^void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,$/;" f +AesCcmSetKey ctaocrypt/src/aes.c /^void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz)$/;" f +AesCrypt ctaocrypt/src/aes.c /^ static void AesCrypt(Aes *aes, byte* out, const byte* in, word32 sz,$/;" f file: +AesCtrEncrypt ctaocrypt/src/aes.c /^ void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesCtrEncrypt ctaocrypt/src/aes.c /^void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f +AesDecrypt ctaocrypt/src/aes.c /^static void AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)$/;" f file: +AesDecryptDirect ctaocrypt/src/aes.c /^void AesDecryptDirect(Aes* aes, byte* out, const byte* in)$/;" f +AesEncrypt ctaocrypt/src/aes.c /^static void AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)$/;" f file: +AesEncryptDirect ctaocrypt/src/aes.c /^void AesEncryptDirect(Aes* aes, byte* out, const byte* in)$/;" f +AesFreeCavium ctaocrypt/src/aes.c /^void AesFreeCavium(Aes* aes)$/;" f +AesGcmDecrypt ctaocrypt/src/aes.c /^int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,$/;" f +AesGcmEncrypt ctaocrypt/src/aes.c /^void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,$/;" f +AesGcmSetKey ctaocrypt/src/aes.c /^void AesGcmSetKey(Aes* aes, const byte* key, word32 len)$/;" f +AesInitCavium ctaocrypt/src/aes.c /^int AesInitCavium(Aes* aes, int devId)$/;" f +AesSetIV ctaocrypt/src/aes.c /^int AesSetIV(Aes* aes, const byte* iv)$/;" f +AesSetIV cyassl/ctaocrypt/aes.h 165;" d +AesSetKey ctaocrypt/src/aes.c /^ int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv,$/;" f +AesSetKey ctaocrypt/src/aes.c /^int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv,$/;" f +AesSetKey cyassl/ctaocrypt/aes.h 164;" d +AesSetKeyDirect ctaocrypt/src/aes.c /^ int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen,$/;" f +AesSetKeyDirect ctaocrypt/src/aes.c /^int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen,$/;" f +AesSetKeyLocal ctaocrypt/src/aes.c /^static int AesSetKeyLocal(Aes* aes, const byte* userKey, word32 keylen,$/;" f file: +AlertDescription cyassl/ssl.h /^enum AlertDescription {$/;" g +AlertLevel cyassl/ssl.h /^enum AlertLevel {$/;" g +AlreadySigner src/ssl.c /^int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash)$/;" f +ApiTest tests/api.c /^int ApiTest(void)$/;" f +Arc4 cyassl/ctaocrypt/arc4.h /^typedef struct Arc4 {$/;" s +Arc4 cyassl/ctaocrypt/arc4.h /^} Arc4;$/;" t typeref:struct:Arc4 +Arc4CaviumProcess ctaocrypt/src/arc4.c /^static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in,$/;" f file: +Arc4CaviumSetKey ctaocrypt/src/arc4.c /^static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length)$/;" f file: +Arc4FreeCavium ctaocrypt/src/arc4.c /^void Arc4FreeCavium(Arc4* arc4)$/;" f +Arc4InitCavium ctaocrypt/src/arc4.c /^int Arc4InitCavium(Arc4* arc4, int devId)$/;" f +Arc4Process ctaocrypt/src/arc4.c /^void Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length)$/;" f +Arc4SetKey ctaocrypt/src/arc4.c /^void Arc4SetKey(Arc4* arc4, const byte* key, word32 length)$/;" f +Arrays cyassl/internal.h /^typedef struct Arrays {$/;" s +Arrays cyassl/internal.h /^} Arrays;$/;" t typeref:struct:Arrays +Assert tests/unit.h 15;" d +AssertFalse tests/unit.h 18;" d +AssertInt tests/unit.h 27;" d +AssertIntEQ tests/unit.h 34;" d +AssertIntGE tests/unit.h 38;" d +AssertIntGT tests/unit.h 36;" d +AssertIntLE tests/unit.h 39;" d +AssertIntLT tests/unit.h 37;" d +AssertIntNE tests/unit.h 35;" d +AssertNotNull tests/unit.h 19;" d +AssertNull tests/unit.h 21;" d +AssertStr tests/unit.h 41;" d +AssertStrEQ tests/unit.h 50;" d +AssertStrGE tests/unit.h 54;" d +AssertStrGT tests/unit.h 52;" d +AssertStrLE tests/unit.h 55;" d +AssertStrLT tests/unit.h 53;" d +AssertStrNE tests/unit.h 51;" d +AssertTrue tests/unit.h 17;" d +AtomicDecCtx cyassl/test.h /^typedef struct AtomicDecCtx {$/;" s +AtomicDecCtx cyassl/test.h /^} AtomicDecCtx;$/;" t typeref:struct:AtomicDecCtx +AtomicEncCtx cyassl/test.h /^typedef struct AtomicEncCtx {$/;" s +AtomicEncCtx cyassl/test.h /^} AtomicEncCtx;$/;" t typeref:struct:AtomicEncCtx +AuthInfo_Sum cyassl/ctaocrypt/asn.h /^enum AuthInfo_Sum {$/;" g +BACKGROUND IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: +BACKGROUND IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: +BAD ctaocrypt/src/coding.c /^ BAD = 0xFF, \/* invalid encoding *\/$/;" e enum:__anon4 file: +BAD_ALIGN_E cyassl/ctaocrypt/error-crypt.h /^ BAD_ALIGN_E = -187, \/* Bad alignment for operation, no alloc *\/$/;" e enum:__anon61 +BAD_APP_DATA_STR cyassl/sniffer_error.h 74;" d +BAD_CERT_MANAGER_ERROR cyassl/error-ssl.h /^ BAD_CERT_MANAGER_ERROR = -259, \/* Bad Cert Manager *\/$/;" e enum:CyaSSL_ErrorCodes +BAD_CIPHER_SPEC_STR cyassl/sniffer_error.h 37;" d +BAD_COMPRESSION_STR cyassl/sniffer_error.h 101;" d +BAD_DECRYPT cyassl/sniffer_error.h 104;" d +BAD_DECRYPT_TYPE cyassl/sniffer_error.h 99;" d +BAD_DERIVE_STR cyassl/sniffer_error.h 102;" d +BAD_ENC_STATE_E cyassl/ctaocrypt/error-crypt.h /^ BAD_ENC_STATE_E = -192, \/* Bad ecc enc state operation *\/$/;" e enum:__anon61 +BAD_FINISHED_MSG cyassl/sniffer_error.h 100;" d +BAD_FUNC_ARG cyassl/ctaocrypt/error-crypt.h /^ BAD_FUNC_ARG = -173, \/* Bad function argument provided *\/$/;" e enum:__anon61 +BAD_HANDSHAKE_STR cyassl/sniffer_error.h 70;" d +BAD_HELLO cyassl/error-ssl.h /^ BAD_HELLO = -221, \/* client hello malformed *\/$/;" e enum:CyaSSL_ErrorCodes +BAD_INPUT_STR cyassl/sniffer_error.h 98;" d +BAD_IPVER_STR cyassl/sniffer_error.h 79;" d +BAD_KEA_TYPE_E cyassl/error-ssl.h /^ BAD_KEA_TYPE_E = -274, \/* bad KEA type found *\/$/;" e enum:CyaSSL_ErrorCodes +BAD_MUTEX_E cyassl/ctaocrypt/error-crypt.h /^ BAD_MUTEX_E = -106, \/* Bad mutex operation *\/$/;" e enum:__anon61 +BAD_NEW_SSL_STR cyassl/sniffer_error.h 58;" d +BAD_OLD_CLIENT_STR cyassl/sniffer_error.h 66;" d +BAD_PADDING_E cyassl/ctaocrypt/error-crypt.h /^ BAD_PADDING_E = -193, \/* Bad padding, msg not correct length *\/$/;" e enum:__anon61 +BAD_PATH_ERROR cyassl/error-ssl.h /^ BAD_PATH_ERROR = -258, \/* Bad path for opendir *\/$/;" e enum:CyaSSL_ErrorCodes +BAD_PROTO_STR cyassl/sniffer_error.h 80;" d +BAD_RECORD_HDR_STR cyassl/sniffer_error.h 67;" d +BAD_SESSION_RESUME_STR cyassl/sniffer_error.h 40;" d +BAD_SESSION_STR cyassl/sniffer_error.h 62;" d +BAD_TRACE_FILE_STR cyassl/sniffer_error.h 84;" d +BASIC_CA_OID cyassl/ctaocrypt/asn.h /^ BASIC_CA_OID = 133,$/;" e enum:Extensions_Sum +BEFORE cyassl/ctaocrypt/asn.h /^ BEFORE = 0,$/;" e enum:__anon60 +BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 74;" d +BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 69;" d +BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 32;" d +BG_JOB_STACK_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 470;" d file: +BG_JOB_STACK_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 495;" d file: +BIGNUM cyassl/openssl/bn.h /^typedef CYASSL_BIGNUM BIGNUM;$/;" t +BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 282;" d +BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 286;" d +BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 306;" d +BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 515;" d +BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 517;" d +BIG_ENDIAN_ORDER cyassl/ctaocrypt/types.h 35;" d +BIO cyassl/openssl/ssl.h /^typedef CYASSL_BIO BIO;$/;" t +BIO_BUFFER cyassl/internal.h /^ BIO_BUFFER = 1,$/;" e enum:BIO_TYPE +BIO_CLOSE cyassl/ssl.h /^ BIO_CLOSE = 1,$/;" e enum:__anon19 +BIO_FLAGS_BASE64_NO_NL cyassl/ssl.h /^ BIO_FLAGS_BASE64_NO_NL = 1,$/;" e enum:__anon19 +BIO_MEMORY cyassl/internal.h /^ BIO_MEMORY = 4$/;" e enum:BIO_TYPE +BIO_METHOD cyassl/openssl/ssl.h /^typedef CYASSL_BIO_METHOD BIO_METHOD;$/;" t +BIO_NOCLOSE cyassl/ssl.h /^ BIO_NOCLOSE = 0,$/;" e enum:__anon19 +BIO_SOCKET cyassl/internal.h /^ BIO_SOCKET = 2,$/;" e enum:BIO_TYPE +BIO_SSL cyassl/internal.h /^ BIO_SSL = 3,$/;" e enum:BIO_TYPE +BIO_TYPE cyassl/internal.h /^enum BIO_TYPE {$/;" g +BIO_eof cyassl/openssl/ssl.h 198;" d +BIO_f_base64 cyassl/openssl/ssl.h 202;" d +BIO_f_buffer cyassl/openssl/ssl.h 193;" d +BIO_f_ssl cyassl/openssl/ssl.h 195;" d +BIO_flush cyassl/openssl/ssl.h 187;" d +BIO_free cyassl/openssl/ssl.h 181;" d +BIO_free_all cyassl/openssl/ssl.h 182;" d +BIO_get_mem_data cyassl/openssl/ssl.h 190;" d +BIO_new cyassl/openssl/ssl.h 180;" d +BIO_new_mem_buf cyassl/openssl/ssl.h 191;" d +BIO_new_socket cyassl/openssl/ssl.h 196;" d +BIO_pending cyassl/openssl/ssl.h 188;" d +BIO_pop cyassl/openssl/ssl.h 186;" d +BIO_prf cyassl/openssl/ssl.h 355;" d +BIO_push cyassl/openssl/ssl.h 185;" d +BIO_read cyassl/openssl/ssl.h 183;" d +BIO_s_mem cyassl/openssl/ssl.h 201;" d +BIO_set_flags cyassl/openssl/ssl.h 203;" d +BIO_set_ss cyassl/openssl/ssl.h 199;" d +BIO_set_write_buffer_size cyassl/openssl/ssl.h 194;" d +BIO_write cyassl/openssl/ssl.h 184;" d +BLAKE2B_256 cyassl/ctaocrypt/blake2.h /^ BLAKE2B_256 = 32 \/* 256 bit type, SSL default *\/$/;" e enum:__anon76 +BLAKE2B_BLOCKBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_BLOCKBYTES = 128,$/;" e enum:blake2b_constant +BLAKE2B_ID cyassl/ctaocrypt/blake2.h /^ BLAKE2B_ID = 7, \/* hash type unique *\/$/;" e enum:__anon76 +BLAKE2B_ID cyassl/ctaocrypt/hmac.h /^ BLAKE2B_ID = 7,$/;" e enum:__anon66 +BLAKE2B_KEYBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_KEYBYTES = 64,$/;" e enum:blake2b_constant +BLAKE2B_OUTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_OUTBYTES = 64,$/;" e enum:blake2b_constant +BLAKE2B_PERSONALBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_PERSONALBYTES = 16$/;" e enum:blake2b_constant +BLAKE2B_SALTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_SALTBYTES = 16,$/;" e enum:blake2b_constant +BLAKE2S_BLOCKBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_BLOCKBYTES = 64,$/;" e enum:blake2s_constant +BLAKE2S_KEYBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_KEYBYTES = 32,$/;" e enum:blake2s_constant +BLAKE2S_OUTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_OUTBYTES = 32,$/;" e enum:blake2s_constant +BLAKE2S_PERSONALBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_PERSONALBYTES = 8$/;" e enum:blake2s_constant +BLAKE2S_SALTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_SALTBYTES = 8,$/;" e enum:blake2s_constant +BLAKE2_TESTS IDE/MDK5-ARM/Projects/CryptTest/test.c 844;" d file: +BLAKE2_TESTS IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c 818;" d file: +BLAKE2_TESTS ctaocrypt/test/test.c 879;" d file: +BNCORE_C cyassl/ctaocrypt/mpi_class.h 151;" d +BN_CTX cyassl/openssl/bn.h /^typedef CYASSL_BN_CTX BN_CTX;$/;" t +BN_CTX_free cyassl/openssl/bn.h 72;" d +BN_CTX_init cyassl/openssl/bn.h 71;" d +BN_CTX_new cyassl/openssl/bn.h 70;" d +BN_ERROR_C cyassl/ctaocrypt/mpi_class.h 33;" d +BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 34;" d +BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 459;" d +BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_superclass.h 82;" d +BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 35;" d +BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 367;" d +BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 565;" d +BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 36;" d +BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 579;" d +BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 980;" d +BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 37;" d +BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 735;" d +BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 988;" d +BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 81;" d +BN_FAST_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 38;" d +BN_FAST_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 823;" d +BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 39;" d +BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 557;" d +BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 773;" d +BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 780;" d +BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 795;" d +BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 272;" d +BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 352;" d +BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 40;" d +BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 411;" d +BN_MP_ADDMOD_C cyassl/ctaocrypt/mpi_class.h 43;" d +BN_MP_ADDMOD_C cyassl/ctaocrypt/mpi_superclass.h 46;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 170;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 221;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 276;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 41;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 472;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 507;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 519;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 541;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 742;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 841;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 895;" d +BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 912;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 400;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 42;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 674;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 688;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 705;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 714;" d +BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 856;" d +BN_MP_AND_C cyassl/ctaocrypt/mpi_class.h 44;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 1004;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 178;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 185;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 190;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 195;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 216;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 228;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 286;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 292;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 302;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 308;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 319;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 329;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 45;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 505;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 514;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 548;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 567;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 592;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 597;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 629;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 726;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 810;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 857;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 944;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 960;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 982;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 990;" d +BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 997;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 222;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 230;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 240;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 287;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 300;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 310;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 321;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 344;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 351;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 365;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 420;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 439;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 46;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 489;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 499;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 509;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 520;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 540;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 603;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 619;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 631;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 639;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 652;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 664;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 676;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 696;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 745;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 756;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 767;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 774;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 783;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 830;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 845;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 863;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 880;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 926;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 934;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 946;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 966;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 984;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 992;" d +BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 999;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 172;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 279;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 353;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 393;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 478;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 47;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 529;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 902;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 919;" d +BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_superclass.h 50;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 167;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 274;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 474;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 48;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 616;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 638;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 662;" d +BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 743;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 169;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 401;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 475;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 493;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 49;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 635;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 647;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 656;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 668;" d +BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 739;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 179;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 209;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 244;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 266;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 330;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 416;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 476;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 488;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 50;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 526;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 560;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 569;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 754;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 765;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 843;" d +BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 850;" d +BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 414;" d +BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 496;" d +BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 51;" d +BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 659;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 161;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 204;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 267;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 296;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 315;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 377;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 386;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 433;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 467;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 52;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 547;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 589;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 610;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 623;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 891;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 908;" d +BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 972;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 271;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 363;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 53;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 556;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 692;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 750;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 761;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 772;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 781;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 788;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 939;" d +BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 964;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 277;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 316;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 415;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 497;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 56;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 660;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 751;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 762;" d +BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 879;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 164;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 470;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 55;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 686;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 842;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 897;" d +BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 914;" d +BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 317;" d +BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 57;" d +BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 900;" d +BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 917;" d +BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_superclass.h 79;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 388;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 527;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 539;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 54;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 615;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 796;" d +BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 840;" d +BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 552;" d +BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 58;" d +BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 695;" d +BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 925;" d +BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 933;" d +BN_MP_DIV_SMALL cyassl/ctaocrypt/mpi_superclass.h 59;" d +BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_class.h 356;" d +BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_class.h 59;" d +BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_superclass.h 72;" d +BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_class.h 370;" d +BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_class.h 60;" d +BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 74;" d +BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_class.h 369;" d +BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_class.h 61;" d +BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 73;" d +BN_MP_ERROR_TO_STRING_C cyassl/ctaocrypt/mpi_class.h 155;" d +BN_MP_ERR_C cyassl/ctaocrypt/mpi_class.h 437;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 171;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 229;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 278;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 303;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 309;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 320;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 380;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 392;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 417;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 477;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 542;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 618;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 62;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 630;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 844;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 945;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 976;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 983;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 991;" d +BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 998;" d +BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 637;" d +BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 64;" d +BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 661;" d +BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_superclass.h 47;" d +BN_MP_EXPTMOD_FAST_C cyassl/ctaocrypt/mpi_class.h 359;" d +BN_MP_EXPTMOD_FAST_C cyassl/ctaocrypt/mpi_class.h 65;" d +BN_MP_EXPT_D_C cyassl/ctaocrypt/mpi_class.h 611;" d +BN_MP_EXPT_D_C cyassl/ctaocrypt/mpi_class.h 63;" d +BN_MP_EXTEUCLID_C cyassl/ctaocrypt/mpi_class.h 66;" d +BN_MP_FREAD_C cyassl/ctaocrypt/mpi_class.h 67;" d +BN_MP_FWRITE_C cyassl/ctaocrypt/mpi_class.h 68;" d +BN_MP_GCD_C cyassl/ctaocrypt/mpi_class.h 525;" d +BN_MP_GCD_C cyassl/ctaocrypt/mpi_class.h 69;" d +BN_MP_GCD_C cyassl/ctaocrypt/mpi_superclass.h 43;" d +BN_MP_GET_INT_C cyassl/ctaocrypt/mpi_class.h 485;" d +BN_MP_GET_INT_C cyassl/ctaocrypt/mpi_class.h 70;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 1003;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 176;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 184;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 189;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 194;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 200;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 214;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 258;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 291;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 328;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 533;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 566;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 585;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 590;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 596;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 71;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 723;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 855;" d +BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 959;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 220;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 281;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 298;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 349;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 364;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 438;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 443;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 448;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 453;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 538;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 601;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 608;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 636;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 649;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 673;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 72;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 749;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 760;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 771;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 779;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 828;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 861;" d +BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 965;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 227;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 282;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 341;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 413;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 495;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 628;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 657;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 693;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 731;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 73;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 838;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 877;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 924;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 932;" d +BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 943;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 160;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 269;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 384;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 465;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 524;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 74;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 889;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 906;" d +BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_superclass.h 49;" d +BN_MP_INIT_SET_C cyassl/ctaocrypt/mpi_class.h 75;" d +BN_MP_INIT_SET_INT_C cyassl/ctaocrypt/mpi_class.h 483;" d +BN_MP_INIT_SET_INT_C cyassl/ctaocrypt/mpi_class.h 76;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 280;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 307;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 318;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 504;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 513;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 77;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 981;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 989;" d +BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 996;" d +BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 350;" d +BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 78;" d +BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_superclass.h 42;" d +BN_MP_INVMOD_SLOW_C cyassl/ctaocrypt/mpi_class.h 460;" d +BN_MP_INVMOD_SLOW_C cyassl/ctaocrypt/mpi_class.h 79;" d +BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 159;" d +BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 468;" d +BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 671;" d +BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 165;" d +BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 358;" d +BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 458;" d +BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 471;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 168;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 254;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 265;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 314;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 387;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 410;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 457;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 464;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 494;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 624;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 694;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 715;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 836;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 878;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 923;" d +BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 931;" d +BN_MP_IS_SQUARE_C cyassl/ctaocrypt/mpi_class.h 80;" d +BN_MP_JACOBI_C cyassl/ctaocrypt/mpi_class.h 81;" d +BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_class.h 578;" d +BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_class.h 82;" d +BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_superclass.h 68;" d +BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_class.h 822;" d +BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_class.h 83;" d +BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_superclass.h 69;" d +BN_MP_LCM_C cyassl/ctaocrypt/mpi_class.h 84;" d +BN_MP_LCM_C cyassl/ctaocrypt/mpi_superclass.h 40;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 283;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 508;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 518;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 591;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 706;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 741;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 85;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 901;" d +BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 918;" d +BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 299;" d +BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 736;" d +BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 87;" d +BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 890;" d +BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 907;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 162;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 223;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 376;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 466;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 484;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 498;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 604;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 831;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 864;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 86;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 971;" d +BN_MP_MOD_C cyassl/ctaocrypt/mpi_superclass.h 44;" d +BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 482;" d +BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 643;" d +BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 672;" d +BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 88;" d +BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_superclass.h 53;" d +BN_MP_MONTGOMERY_CALC_NORMALIZATION_C cyassl/ctaocrypt/mpi_class.h 373;" d +BN_MP_MONTGOMERY_CALC_NORMALIZATION_C cyassl/ctaocrypt/mpi_class.h 89;" d +BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 368;" d +BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 90;" d +BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 91;" d +BN_MP_MONTGOMERY_SETUP_C cyassl/ctaocrypt/mpi_class.h 366;" d +BN_MP_MONTGOMERY_SETUP_C cyassl/ctaocrypt/mpi_class.h 91;" d +BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_class.h 374;" d +BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_class.h 96;" d +BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_superclass.h 45;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 273;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 419;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 725;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 809;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 898;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 915;" d +BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 94;" d +BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 559;" d +BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 687;" d +BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 894;" d +BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 911;" d +BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 93;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 345;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 379;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 389;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 503;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 528;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 602;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 612;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 733;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 763;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 893;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 92;" d +BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 974;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 285;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 399;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 614;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 713;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 752;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 899;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 916;" d +BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 95;" d +BN_MP_NEG_C cyassl/ctaocrypt/mpi_class.h 391;" d +BN_MP_NEG_C cyassl/ctaocrypt/mpi_class.h 98;" d +BN_MP_N_ROOT_C cyassl/ctaocrypt/mpi_class.h 835;" d +BN_MP_N_ROOT_C cyassl/ctaocrypt/mpi_class.h 97;" d +BN_MP_OR_C cyassl/ctaocrypt/mpi_class.h 99;" d +BN_MP_PRIME_FERMAT_C cyassl/ctaocrypt/mpi_class.h 100;" d +BN_MP_PRIME_IS_DIVISIBLE_C cyassl/ctaocrypt/mpi_class.h 101;" d +BN_MP_PRIME_IS_DIVISIBLE_C cyassl/ctaocrypt/mpi_class.h 648;" d +BN_MP_PRIME_IS_PRIME_C cyassl/ctaocrypt/mpi_class.h 102;" d +BN_MP_PRIME_IS_PRIME_C cyassl/ctaocrypt/mpi_class.h 684;" d +BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 103;" d +BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 651;" d +BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 675;" d +BN_MP_PRIME_NEXT_PRIME_C cyassl/ctaocrypt/mpi_class.h 104;" d +BN_MP_PRIME_RABIN_MILLER_TRIALS_C cyassl/ctaocrypt/mpi_class.h 105;" d +BN_MP_PRIME_RABIN_MILLER_TRIALS_C cyassl/ctaocrypt/mpi_superclass.h 54;" d +BN_MP_PRIME_RANDOM_EX_C cyassl/ctaocrypt/mpi_class.h 106;" d +BN_MP_PRIME_RANDOM_EX_C cyassl/ctaocrypt/mpi_superclass.h 41;" d +BN_MP_RADIX_SIZE_C cyassl/ctaocrypt/mpi_class.h 107;" d +BN_MP_RADIX_SIZE_C cyassl/ctaocrypt/mpi_class.h 405;" d +BN_MP_RADIX_SMAP_C cyassl/ctaocrypt/mpi_class.h 108;" d +BN_MP_RADIX_SMAP_C cyassl/ctaocrypt/mpi_class.h 712;" d +BN_MP_RAND_C cyassl/ctaocrypt/mpi_class.h 109;" d +BN_MP_READ_RADIX_C cyassl/ctaocrypt/mpi_class.h 110;" d +BN_MP_READ_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 111;" d +BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 112;" d +BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 683;" d +BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 719;" d +BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 114;" d +BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 372;" d +BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 787;" d +BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_superclass.h 77;" d +BN_MP_REDUCE_2K_L_C cyassl/ctaocrypt/mpi_class.h 115;" d +BN_MP_REDUCE_2K_L_C cyassl/ctaocrypt/mpi_class.h 970;" d +BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_class.h 116;" d +BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_class.h 371;" d +BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 76;" d +BN_MP_REDUCE_2K_SETUP_L_C cyassl/ctaocrypt/mpi_class.h 117;" d +BN_MP_REDUCE_2K_SETUP_L_C cyassl/ctaocrypt/mpi_class.h 969;" d +BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_class.h 113;" d +BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_class.h 968;" d +BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 70;" d +BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_class.h 118;" d +BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_class.h 357;" d +BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_superclass.h 75;" d +BN_MP_REDUCE_IS_2K_L_C cyassl/ctaocrypt/mpi_class.h 119;" d +BN_MP_REDUCE_IS_2K_L_C cyassl/ctaocrypt/mpi_class.h 354;" d +BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 120;" d +BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 730;" d +BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 967;" d +BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 71;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 121;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 177;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 284;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 301;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 534;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 568;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 732;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 839;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 892;" d +BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 909;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 122;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 163;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 270;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 342;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 375;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 385;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 444;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 469;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 558;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 609;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 650;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 669;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 740;" d +BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 975;" d +BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_class.h 123;" d +BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_class.h 449;" d +BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_superclass.h 48;" d +BN_MP_SHRINK_C cyassl/ctaocrypt/mpi_class.h 124;" d +BN_MP_SHRINK_C cyassl/ctaocrypt/mpi_superclass.h 39;" d +BN_MP_SIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 125;" d +BN_MP_SIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 872;" d +BN_MP_SQRMOD_C cyassl/ctaocrypt/mpi_class.h 127;" d +BN_MP_SQRMOD_C cyassl/ctaocrypt/mpi_class.h 663;" d +BN_MP_SQRT_C cyassl/ctaocrypt/mpi_class.h 128;" d +BN_MP_SQRT_C cyassl/ctaocrypt/mpi_class.h 486;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 126;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 343;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 378;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 487;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 515;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 829;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 910;" d +BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 973;" d +BN_MP_SUBMOD_C cyassl/ctaocrypt/mpi_class.h 131;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 129;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 166;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 275;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 390;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 473;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 506;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 516;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 613;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 738;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 862;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 896;" d +BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 913;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 130;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 215;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 617;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 658;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 670;" d +BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 685;" d +BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 398;" d +BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 700;" d +BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 711;" d +BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 927;" d +BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 935;" d +BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_class.h 136;" d +BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_class.h 577;" d +BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_superclass.h 66;" d +BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_class.h 137;" d +BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_class.h 821;" d +BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_superclass.h 67;" d +BN_MP_TORADIX_C cyassl/ctaocrypt/mpi_class.h 138;" d +BN_MP_TORADIX_C cyassl/ctaocrypt/mpi_class.h 406;" d +BN_MP_TORADIX_N_C cyassl/ctaocrypt/mpi_class.h 139;" d +BN_MP_TO_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 132;" d +BN_MP_TO_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 873;" d +BN_MP_TO_SIGNED_BIN_N_C cyassl/ctaocrypt/mpi_class.h 133;" d +BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 134;" d +BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 868;" d +BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 885;" d +BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_superclass.h 52;" d +BN_MP_TO_UNSIGNED_BIN_N_C cyassl/ctaocrypt/mpi_class.h 135;" d +BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 140;" d +BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 817;" d +BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 884;" d +BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_superclass.h 51;" d +BN_MP_XOR_C cyassl/ctaocrypt/mpi_class.h 141;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 142;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 199;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 268;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 297;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 397;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 412;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 546;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 704;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 710;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 724;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 800;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 804;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 808;" d +BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 837;" d +BN_PRIME_TAB_C cyassl/ctaocrypt/mpi_class.h 143;" d +BN_PRIME_TAB_C cyassl/ctaocrypt/mpi_superclass.h 56;" d +BN_REVERSE_C cyassl/ctaocrypt/mpi_class.h 144;" d +BN_REVERSE_C cyassl/ctaocrypt/mpi_superclass.h 55;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 145;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 208;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 517;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 753;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 764;" d +BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 849;" d +BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 146;" d +BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 355;" d +BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_superclass.h 78;" d +BN_S_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 580;" d +BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 147;" d +BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 581;" d +BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 737;" d +BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 89;" d +BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 148;" d +BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 734;" d +BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 80;" d +BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 149;" d +BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 824;" d +BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_superclass.h 90;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 150;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 180;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 210;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 331;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 418;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 561;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 570;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 744;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 755;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 766;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 775;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 782;" d +BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 851;" d +BN_bin2bn cyassl/openssl/bn.h 88;" d +BN_bn2bin cyassl/openssl/bn.h 87;" d +BN_bn2dec cyassl/openssl/bn.h 106;" d +BN_clear_free cyassl/openssl/bn.h 76;" d +BN_cmp cyassl/openssl/bn.h 85;" d +BN_copy cyassl/openssl/bn.h 101;" d +BN_dec2bn cyassl/openssl/bn.h 105;" d +BN_dup cyassl/openssl/bn.h 100;" d +BN_free cyassl/openssl/bn.h 75;" d +BN_hex2bn cyassl/openssl/bn.h 98;" d +BN_is_bit_set cyassl/openssl/bn.h 97;" d +BN_is_odd cyassl/openssl/bn.h 83;" d +BN_is_one cyassl/openssl/bn.h 82;" d +BN_is_zero cyassl/openssl/bn.h 81;" d +BN_mask_bits cyassl/openssl/bn.h 94;" d +BN_mod cyassl/openssl/bn.h 90;" d +BN_new cyassl/openssl/bn.h 74;" d +BN_num_bits cyassl/openssl/bn.h 79;" d +BN_num_bytes cyassl/openssl/bn.h 78;" d +BN_rand cyassl/openssl/bn.h 96;" d +BN_set_word cyassl/openssl/bn.h 103;" d +BN_sub cyassl/openssl/bn.h 91;" d +BN_value_one cyassl/openssl/bn.h 92;" d +BSD_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 810;" d file: +BSD_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 13;" d +BSD_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 13;" d +BSD_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 13;" d +BSD_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 13;" d +BSD_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 13;" d +BSD_GETHOSTEN IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 831;" d file: +BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 34;" d +BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 34;" d +BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 34;" d +BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 34;" d +BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 34;" d +BSD_NUMSOCKS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 815;" d file: +BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 18;" d +BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 18;" d +BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 18;" d +BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 18;" d +BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 18;" d +BSD_RCVTOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 827;" d file: +BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 30;" d +BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 30;" d +BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 30;" d +BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 30;" d +BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 30;" d +BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 24;" d +BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 24;" d +BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 24;" d +BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 24;" d +BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 24;" d +BSD_SRVSOCKS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 821;" d file: +BUFFER_E cyassl/ctaocrypt/error-crypt.h /^ BUFFER_E = -132, \/* output buffer too small or input too large *\/$/;" e enum:__anon61 +BUFFER_ERROR cyassl/error-ssl.h /^ BUFFER_ERROR = -228, \/* malformed buffer input *\/$/;" e enum:CyaSSL_ErrorCodes +BUFFER_ERROR_STR cyassl/sniffer_error.h 87;" d +BUILD_AES cyassl/internal.h 389;" d +BUILD_AES cyassl/internal.h 390;" d +BUILD_AES cyassl/internal.h 418;" d +BUILD_AES cyassl/internal.h 419;" d +BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 213;" d +BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 251;" d +BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 273;" d +BUILD_AESGCM cyassl/internal.h 395;" d +BUILD_ARC4 cyassl/internal.h 379;" d +BUILD_ARC4 cyassl/internal.h 423;" d +BUILD_ARC4 cyassl/internal.h 424;" d +BUILD_DES3 cyassl/internal.h 383;" d +BUILD_DES3 cyassl/internal.h 411;" d +BUILD_DES3 cyassl/internal.h 412;" d +BUILD_HC128 cyassl/internal.h 401;" d +BUILD_MSG_ERROR cyassl/error-ssl.h /^ BUILD_MSG_ERROR = -220, \/* build message failure *\/$/;" e enum:CyaSSL_ErrorCodes +BUILD_RABBIT cyassl/internal.h 405;" d +BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 171;" d +BUILD_SSL_RSA_WITH_RC4_128_MD5 cyassl/internal.h 162;" d +BUILD_SSL_RSA_WITH_RC4_128_SHA cyassl/internal.h 159;" d +BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 282;" d +BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 286;" d +BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 289;" d +BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 283;" d +BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 cyassl/internal.h 287;" d +BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 291;" d +BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA cyassl/internal.h 219;" d +BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 cyassl/internal.h 223;" d +BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA cyassl/internal.h 220;" d +BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 cyassl/internal.h 224;" d +BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 371;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA cyassl/internal.h 307;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 318;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 cyassl/internal.h 350;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 341;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA cyassl/internal.h 308;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 327;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 cyassl/internal.h 351;" d +BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 345;" d +BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA cyassl/internal.h 361;" d +BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 367;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 301;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 315;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 333;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 302;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 324;" d +BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 336;" d +BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA cyassl/internal.h 357;" d +BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 372;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA cyassl/internal.h 310;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 319;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 342;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA cyassl/internal.h 311;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 328;" d +BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 346;" d +BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA cyassl/internal.h 362;" d +BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 368;" d +BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 303;" d +BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 316;" d +BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 334;" d +BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 304;" d +BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 325;" d +BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 337;" d +BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA cyassl/internal.h 358;" d +BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 173;" d +BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 183;" d +BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 184;" d +BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA cyassl/internal.h 165;" d +BUILD_TLS_PSK_WITH_AES_128_CBC_SHA cyassl/internal.h 232;" d +BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 cyassl/internal.h 236;" d +BUILD_TLS_PSK_WITH_AES_128_CCM_8 cyassl/internal.h 238;" d +BUILD_TLS_PSK_WITH_AES_256_CBC_SHA cyassl/internal.h 233;" d +BUILD_TLS_PSK_WITH_AES_256_CCM_8 cyassl/internal.h 239;" d +BUILD_TLS_PSK_WITH_NULL_SHA cyassl/internal.h 255;" d +BUILD_TLS_PSK_WITH_NULL_SHA256 cyassl/internal.h 258;" d +BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 cyassl/internal.h 202;" d +BUILD_TLS_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 180;" d +BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 188;" d +BUILD_TLS_RSA_WITH_AES_128_CCM_8 cyassl/internal.h 198;" d +BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 192;" d +BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 cyassl/internal.h 203;" d +BUILD_TLS_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 181;" d +BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 cyassl/internal.h 189;" d +BUILD_TLS_RSA_WITH_AES_256_CCM_8 cyassl/internal.h 199;" d +BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 194;" d +BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA cyassl/internal.h 210;" d +BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 cyassl/internal.h 214;" d +BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA cyassl/internal.h 211;" d +BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 cyassl/internal.h 215;" d +BUILD_TLS_RSA_WITH_HC_128_B2B256 cyassl/internal.h 269;" d +BUILD_TLS_RSA_WITH_HC_128_MD5 cyassl/internal.h 264;" d +BUILD_TLS_RSA_WITH_HC_128_SHA cyassl/internal.h 266;" d +BUILD_TLS_RSA_WITH_NULL_SHA cyassl/internal.h 247;" d +BUILD_TLS_RSA_WITH_NULL_SHA256 cyassl/internal.h 250;" d +BUILD_TLS_RSA_WITH_RABBIT_SHA cyassl/internal.h 275;" d +BUILT_SOURCES Makefile /^BUILT_SOURCES = $/;" m +BYTE3_LEN cyassl/internal.h /^ BYTE3_LEN = 3, \/* up to 24 bit byte lengths *\/$/;" e enum:Misc +BackGround IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^static int BackGround = 0 ; \/* 1: background job is running *\/$/;" v file: +BackGround IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^static int BackGround = 0 ; \/* 1: background job is running *\/$/;" v file: +Base16_Decode ctaocrypt/src/coding.c /^int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f +Base64_Decode ctaocrypt/src/coding.c /^int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f +Base64_Encode ctaocrypt/src/coding.c /^int Base64_Encode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f +Base64_EncodeEsc ctaocrypt/src/coding.c /^int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f +Base_entry cyassl/ctaocrypt/asn.h /^struct Base_entry {$/;" s +Base_entry cyassl/ctaocrypt/asn.h /^typedef struct Base_entry Base_entry;$/;" t typeref:struct:Base_entry +Bcd2ToByte IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 38;" d file: +Bcd2ToByte IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 38;" d file: +BenchmarkBounds ctaocrypt/benchmark/benchmark.c /^enum BenchmarkBounds {$/;" g file: +Bf cyassl/ctaocrypt/ecc.h /^ const char* Bf; \/* fields B param (hex) *\/$/;" m struct:__anon72 +Blake2b cyassl/ctaocrypt/blake2.h /^typedef struct Blake2b {$/;" s +Blake2b cyassl/ctaocrypt/blake2.h /^} Blake2b;$/;" t typeref:struct:Blake2b +Blake2bFinal ctaocrypt/src/blake2b.c /^int Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz)$/;" f +Blake2bUpdate ctaocrypt/src/blake2b.c /^int Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz)$/;" f +Block_Sum cyassl/ctaocrypt/asn.h /^enum Block_Sum {$/;" g +BufferLoadCRL src/crl.c /^int BufferLoadCRL(CYASSL_CRL* crl, const byte* buff, long sz, int type)$/;" f +Buffers cyassl/internal.h /^typedef struct Buffers {$/;" s +Buffers cyassl/internal.h /^} Buffers;$/;" t typeref:struct:Buffers +BuildCertHashes src/internal.c /^static int BuildCertHashes(CYASSL* ssl, Hashes* hashes)$/;" f file: +BuildFinished src/internal.c /^static int BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: +BuildMD5 src/internal.c /^static void BuildMD5(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: +BuildMD5_CertVerify src/internal.c /^static void BuildMD5_CertVerify(CYASSL* ssl, byte* digest)$/;" f file: +BuildMessage src/internal.c /^static int BuildMessage(CYASSL* ssl, byte* output, const byte* input, int inSz,$/;" f file: +BuildSHA src/internal.c /^static void BuildSHA(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: +BuildSHA_CertVerify src/internal.c /^static void BuildSHA_CertVerify(CYASSL* ssl, byte* digest)$/;" f file: +BuildTlsFinished src/tls.c /^int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f +BulkCipherAlgorithm cyassl/ssl.h /^enum BulkCipherAlgorithm { $/;" g +BytePrecision ctaocrypt/src/asn.c /^static word32 BytePrecision(word32 value)$/;" f file: +ByteReverseWord32 ctaocrypt/src/misc.c /^STATIC INLINE word32 ByteReverseWord32(word32 value)$/;" f +ByteReverseWord64 ctaocrypt/src/misc.c /^STATIC INLINE word64 ByteReverseWord64(word64 value)$/;" f +ByteReverseWords ctaocrypt/src/misc.c /^STATIC INLINE void ByteReverseWords(word32* out, const word32* in,$/;" f +ByteReverseWords64 ctaocrypt/src/misc.c /^STATIC INLINE void ByteReverseWords64(word64* out, const word64* in,$/;" f +ByteToBcd2 IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static uint32_t ByteToBcd2(uint8_t Value)$/;" f file: +ByteToBcd2 IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static uint32_t ByteToBcd2(uint8_t Value)$/;" f file: +C cyassl/ctaocrypt/md2.h /^ byte C[MD2_BLOCK_SIZE];$/;" m struct:Md2 +C cyassl/ctaocrypt/random.h /^ byte C[DBRG_SEED_LEN];$/;" m struct:RNG +CACHE_MATCH_ERROR cyassl/error-ssl.h /^ CACHE_MATCH_ERROR = -280, \/* chache hdr match error *\/$/;" e enum:CyaSSL_ErrorCodes +CAMELLIA_128_KEY_SIZE cyassl/internal.h /^ CAMELLIA_128_KEY_SIZE = 16, \/* for 128 bit *\/$/;" e enum:Misc +CAMELLIA_192_KEY_SIZE cyassl/internal.h /^ CAMELLIA_192_KEY_SIZE = 24, \/* for 192 bit *\/$/;" e enum:Misc +CAMELLIA_256_KEY_SIZE cyassl/internal.h /^ CAMELLIA_256_KEY_SIZE = 32, \/* for 256 bit *\/$/;" e enum:Misc +CAMELLIA_BLOCK_SIZE cyassl/ctaocrypt/camellia.h /^ CAMELLIA_BLOCK_SIZE = 16$/;" e enum:__anon58 +CAMELLIA_F ctaocrypt/src/camellia.c 153;" d file: +CAMELLIA_FLS ctaocrypt/src/camellia.c 177;" d file: +CAMELLIA_IV_SIZE cyassl/internal.h /^ CAMELLIA_IV_SIZE = 16, \/* always block size *\/$/;" e enum:Misc +CAMELLIA_RL1 ctaocrypt/src/camellia.c 125;" d file: +CAMELLIA_RL8 ctaocrypt/src/camellia.c 127;" d file: +CAMELLIA_ROLDQ ctaocrypt/src/camellia.c 129;" d file: +CAMELLIA_ROLDQo32 ctaocrypt/src/camellia.c 138;" d file: +CAMELLIA_ROUNDSM ctaocrypt/src/camellia.c 194;" d file: +CAMELLIA_RR8 ctaocrypt/src/camellia.c 123;" d file: +CAMELLIA_SIGMA1L ctaocrypt/src/camellia.c 79;" d file: +CAMELLIA_SIGMA1R ctaocrypt/src/camellia.c 80;" d file: +CAMELLIA_SIGMA2L ctaocrypt/src/camellia.c 81;" d file: +CAMELLIA_SIGMA2R ctaocrypt/src/camellia.c 82;" d file: +CAMELLIA_SIGMA3L ctaocrypt/src/camellia.c 83;" d file: +CAMELLIA_SIGMA3R ctaocrypt/src/camellia.c 84;" d file: +CAMELLIA_SIGMA4L ctaocrypt/src/camellia.c 85;" d file: +CAMELLIA_SIGMA4R ctaocrypt/src/camellia.c 86;" d file: +CAMELLIA_SIGMA5L ctaocrypt/src/camellia.c 87;" d file: +CAMELLIA_SIGMA5R ctaocrypt/src/camellia.c 88;" d file: +CAMELLIA_SIGMA6L ctaocrypt/src/camellia.c 89;" d file: +CAMELLIA_SIGMA6R ctaocrypt/src/camellia.c 90;" d file: +CAMELLIA_SP0222 ctaocrypt/src/camellia.c 149;" d file: +CAMELLIA_SP1110 ctaocrypt/src/camellia.c 148;" d file: +CAMELLIA_SP3033 ctaocrypt/src/camellia.c 150;" d file: +CAMELLIA_SP4404 ctaocrypt/src/camellia.c 151;" d file: +CAMELLIA_TABLE_BYTE_LEN cyassl/ctaocrypt/camellia.h 66;" d +CAMELLIA_TABLE_WORD_LEN cyassl/ctaocrypt/camellia.h 67;" d +CAM_CBC_DEC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: +CAM_CBC_DEC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: +CAM_CBC_DEC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: +CAM_CBC_ENC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: +CAM_CBC_ENC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: +CAM_CBC_ENC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: +CAM_ECB_DEC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: +CAM_ECB_DEC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: +CAM_ECB_DEC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: +CAM_ECB_ENC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: +CAM_ECB_ENC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: +CAM_ECB_ENC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: +CAN0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CAN0_IRQHandler$/;" l +CAN1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CAN1_IRQHandler$/;" l +CAN1_RX0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l +CARRY_FORWARD ctaocrypt/src/asm.c 1007;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 507;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 577;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 647;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 732;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 799;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 867;" d file: +CARRY_FORWARD ctaocrypt/src/asm.c 937;" d file: +CAVIUM_INIT_E cyassl/ctaocrypt/error-crypt.h /^ CAVIUM_INIT_E = -182, \/* Cavium Init type error *\/$/;" e enum:__anon61 +CA_ISSUER_OID cyassl/ctaocrypt/asn.h /^ CA_ISSUER_OID = 117,$/;" e enum:Extensions_Sum +CA_TABLE_SIZE cyassl/internal.h 1070;" d +CA_TRUE_E cyassl/ctaocrypt/error-crypt.h /^ CA_TRUE_E = -138, \/* setting CA basic constraint true error *\/$/;" e enum:__anon61 +CA_TYPE cyassl/ctaocrypt/asn_public.h /^ CA_TYPE,$/;" e enum:CertType +CBIOCookie cyassl/internal.h /^ CallbackGenCookie CBIOCookie; \/* gen cookie callback *\/$/;" m struct:CYASSL_CTX +CBIORecv cyassl/internal.h /^ CallbackIORecv CBIORecv;$/;" m struct:CYASSL_CTX +CBIOSend cyassl/internal.h /^ CallbackIOSend CBIOSend;$/;" m struct:CYASSL_CTX +CC Makefile /^CC = clang$/;" m +CCADMIN mcapi/ctaocrypt_mcapi.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mcapi/ctaocrypt_test.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mcapi/cyassl.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mcapi/zlib.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mplabx/ctaocrypt_benchmark.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mplabx/ctaocrypt_test.X/Makefile /^CCADMIN=CCadmin$/;" m +CCADMIN mplabx/cyassl.X/Makefile /^CCADMIN=CCadmin$/;" m +CCAS Makefile /^CCAS = clang$/;" m +CCASCOMPILE Makefile /^CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)$/;" m +CCASDEPMODE Makefile /^CCASDEPMODE = depmode=gcc3$/;" m +CCASFLAGS Makefile /^CCASFLAGS = -g -O2$/;" m +CCDEPMODE Makefile /^CCDEPMODE = depmode=gcc3$/;" m +CCLD Makefile /^CCLD = $(CC)$/;" m +CERTREQ_TYPE cyassl/ctaocrypt/asn_public.h /^ CERTREQ_TYPE$/;" e enum:CertType +CERT_GOOD cyassl/ctaocrypt/asn.h /^ CERT_GOOD = 0,$/;" e enum:Ocsp_Cert_Status +CERT_HEADER_SZ cyassl/internal.h /^ CERT_HEADER_SZ = 3, \/* always 3 bytes *\/$/;" e enum:Misc +CERT_MIN_SIZE cyassl/internal.h /^ CERT_MIN_SIZE = 256, \/* min PEM cert size with header\/footer *\/$/;" e enum:Misc +CERT_POLICY_OID cyassl/ctaocrypt/asn.h /^ CERT_POLICY_OID = 146,$/;" e enum:Extensions_Sum +CERT_REQ_SENT cyassl/internal.h /^ CERT_REQ_SENT,$/;" e enum:AcceptState +CERT_REVOKED cyassl/ctaocrypt/asn.h /^ CERT_REVOKED = 1,$/;" e enum:Ocsp_Cert_Status +CERT_SENT cyassl/internal.h /^ CERT_SENT,$/;" e enum:AcceptState +CERT_TYPE cyassl/ctaocrypt/asn_public.h /^ CERT_TYPE = 0, $/;" e enum:CertType +CERT_UNKNOWN cyassl/ctaocrypt/asn.h /^ CERT_UNKNOWN = 2$/;" e enum:Ocsp_Cert_Status +CEscape ctaocrypt/src/coding.c /^static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max,$/;" f file: +CFLAGS Makefile /^CFLAGS = -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE $/;" m +CFLAG_VISIBILITY Makefile /^CFLAG_VISIBILITY = -fvisibility=hidden$/;" m +CHANGE_CIPHER_SENT cyassl/internal.h /^ CHANGE_CIPHER_SENT,$/;" e enum:AcceptState +CLEANFILES Makefile /^CLEANFILES = $/;" m +CLEAR_CARRY ctaocrypt/src/asm.c 498;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 568;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 638;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 723;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 790;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 858;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 928;" d file: +CLEAR_CARRY ctaocrypt/src/asm.c 998;" d file: +CLIENT_DEFAULT_VERSION cyassl/test.h 142;" d +CLIENT_DTLS_DEFAULT_VERSION cyassl/test.h 143;" d +CLIENT_FINISHED_COMPLETE cyassl/internal.h /^ CLIENT_FINISHED_COMPLETE,$/;" e enum:states +CLIENT_HELLO_COMPLETE cyassl/internal.h /^ CLIENT_HELLO_COMPLETE,$/;" e enum:states +CLIENT_HELLO_FIRST cyassl/internal.h /^ CLIENT_HELLO_FIRST = 35, \/* Protocol + RAN_LEN + sizeof(id_len) *\/$/;" e enum:Misc +CLIENT_HELLO_INPUT_STR cyassl/sniffer_error.h 42;" d +CLIENT_HELLO_SENT cyassl/internal.h /^ CLIENT_HELLO_SENT,$/;" e enum:ConnectState +CLIENT_ID_ERROR cyassl/error-ssl.h /^ CLIENT_ID_ERROR = -231, \/* psk client identity error *\/$/;" e enum:CyaSSL_ErrorCodes +CLIENT_INVALID_VERSION cyassl/test.h 144;" d +CLIENT_KEYEXCHANGE_COMPLETE cyassl/internal.h /^ CLIENT_KEYEXCHANGE_COMPLETE,$/;" e enum:states +CLIENT_RESUME_TRY_STR cyassl/sniffer_error.h 43;" d +CLOCK ctaocrypt/benchmark/benchmark.c 1169;" d file: +CLOCK ctaocrypt/benchmark/benchmark.c 1172;" d file: +CMSIS_NMUTEX ctaocrypt/src/port.c 359;" d file: +CMSIS_mutex ctaocrypt/src/port.c /^ static const osMutexDef_t *CMSIS_mutex[] = { osMutex(CyaSSL_mt0), $/;" v file: +CMSIS_mutexID ctaocrypt/src/port.c /^ static osMutexId CMSIS_mutexID[CMSIS_NMUTEX] = {0} ;$/;" v file: +CM_GetCertCacheMemSize src/ssl.c /^int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm)$/;" f +CM_MemRestoreCertCache src/ssl.c /^int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER* cm, const void* mem, int sz)$/;" f +CM_MemSaveCertCache src/ssl.c /^int CM_MemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz, int* used)$/;" f +CM_RestoreCertCache src/ssl.c /^int CM_RestoreCertCache(CYASSL_CERT_MANAGER* cm, const char* fname)$/;" f +CM_SaveCertCache src/ssl.c /^int CM_SaveCertCache(CYASSL_CERT_MANAGER* cm, const char* fname)$/;" f +COMBA_CLEAR ctaocrypt/src/asm.c 1113;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1148;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1183;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1221;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1248;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1277;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1307;" d file: +COMBA_CLEAR ctaocrypt/src/asm.c 1334;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1010;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1129;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1164;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1199;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1233;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1260;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1289;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1319;" d file: +COMBA_FINI ctaocrypt/src/asm.c 1346;" d file: +COMBA_FINI ctaocrypt/src/asm.c 510;" d file: +COMBA_FINI ctaocrypt/src/asm.c 580;" d file: +COMBA_FINI ctaocrypt/src/asm.c 650;" d file: +COMBA_FINI ctaocrypt/src/asm.c 735;" d file: +COMBA_FINI ctaocrypt/src/asm.c 802;" d file: +COMBA_FINI ctaocrypt/src/asm.c 870;" d file: +COMBA_FINI ctaocrypt/src/asm.c 940;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1117;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1152;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1187;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1224;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1251;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1280;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1310;" d file: +COMBA_FORWARD ctaocrypt/src/asm.c 1337;" d file: +COMBA_START ctaocrypt/src/asm.c 1110;" d file: +COMBA_START ctaocrypt/src/asm.c 1145;" d file: +COMBA_START ctaocrypt/src/asm.c 1180;" d file: +COMBA_START ctaocrypt/src/asm.c 1219;" d file: +COMBA_START ctaocrypt/src/asm.c 1246;" d file: +COMBA_START ctaocrypt/src/asm.c 1275;" d file: +COMBA_START ctaocrypt/src/asm.c 1305;" d file: +COMBA_START ctaocrypt/src/asm.c 1332;" d file: +COMBA_START ctaocrypt/src/asm.c 496;" d file: +COMBA_START ctaocrypt/src/asm.c 566;" d file: +COMBA_START ctaocrypt/src/asm.c 636;" d file: +COMBA_START ctaocrypt/src/asm.c 721;" d file: +COMBA_START ctaocrypt/src/asm.c 788;" d file: +COMBA_START ctaocrypt/src/asm.c 856;" d file: +COMBA_START ctaocrypt/src/asm.c 926;" d file: +COMBA_START ctaocrypt/src/asm.c 996;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1001;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1121;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1156;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1191;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1227;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1254;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1283;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1313;" d file: +COMBA_STORE ctaocrypt/src/asm.c 1340;" d file: +COMBA_STORE ctaocrypt/src/asm.c 501;" d file: +COMBA_STORE ctaocrypt/src/asm.c 571;" d file: +COMBA_STORE ctaocrypt/src/asm.c 641;" d file: +COMBA_STORE ctaocrypt/src/asm.c 726;" d file: +COMBA_STORE ctaocrypt/src/asm.c 793;" d file: +COMBA_STORE ctaocrypt/src/asm.c 861;" d file: +COMBA_STORE ctaocrypt/src/asm.c 931;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1004;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1125;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1160;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1195;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1230;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1257;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1286;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1316;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 1343;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 504;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 574;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 644;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 729;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 796;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 864;" d file: +COMBA_STORE2 ctaocrypt/src/asm.c 934;" d file: +COMMAND_STACK_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 476;" d file: +COMMAND_STACK_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 504;" d file: +COMPILE Makefile /^COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \\$/;" m +COMPRESS_CONSTANT cyassl/internal.h /^ COMPRESS_CONSTANT = 13, \/* compression calc constant *\/$/;" e enum:Misc +COMPRESS_DUMMY_SIZE cyassl/internal.h /^ COMPRESS_DUMMY_SIZE = 64, \/* compression dummy round size *\/$/;" e enum:Misc +COMPRESS_E cyassl/ctaocrypt/error-crypt.h /^ COMPRESS_E = -184, \/* Compress error *\/$/;" e enum:__anon61 +COMPRESS_FIXED cyassl/ctaocrypt/compress.h 37;" d +COMPRESS_INIT_E cyassl/ctaocrypt/error-crypt.h /^ COMPRESS_INIT_E = -183, \/* Compress init error *\/$/;" e enum:__anon61 +COMPRESS_LOWER cyassl/internal.h /^ COMPRESS_LOWER = 64, \/* compression calc denominator *\/$/;" e enum:Misc +COMPRESS_UPPER cyassl/internal.h /^ COMPRESS_UPPER = 55, \/* compression calc numerator *\/$/;" e enum:Misc +COMP_EXTRA cyassl/internal.h 843;" d +COMP_EXTRA cyassl/internal.h 845;" d +COMP_LEN cyassl/internal.h /^ COMP_LEN = 1, \/* compression length *\/$/;" e enum:Misc +COMP_METHOD cyassl/openssl/ssl.h /^typedef CYASSL_COMP_METHOD COMP_METHOD;$/;" t +COMP_rle cyassl/openssl/ssl.h 218;" d +COMP_zlib cyassl/openssl/ssl.h 217;" d +CONFIG_CLEAN_FILES Makefile /^CONFIG_CLEAN_FILES = stamp-h cyassl\/version.h cyassl\/options.h \\$/;" m +CONFIG_CLEAN_VPATH_FILES Makefile /^CONFIG_CLEAN_VPATH_FILES =$/;" m +CONFIG_HEADER Makefile /^CONFIG_HEADER = config.h$/;" m +CONNECT_BEGIN cyassl/internal.h /^ CONNECT_BEGIN = 0,$/;" e enum:ConnectState +COOKIE_ERROR cyassl/error-ssl.h /^ COOKIE_ERROR = -269, \/* dtls cookie error *\/$/;" e enum:CyaSSL_ErrorCodes +COOKIE_SZ cyassl/internal.h /^ COOKIE_SZ = 20, \/* use a 20 byte cookie *\/$/;" e enum:Misc +COPY cyassl/internal.h /^ COPY = 1 \/* should we copy static buffer for write *\/$/;" e enum:Misc +CP mcapi/ctaocrypt_mcapi.X/Makefile /^CP=cp$/;" m +CP mcapi/ctaocrypt_test.X/Makefile /^CP=cp$/;" m +CP mcapi/cyassl.X/Makefile /^CP=cp$/;" m +CP mcapi/zlib.X/Makefile /^CP=cp$/;" m +CP mplabx/ctaocrypt_benchmark.X/Makefile /^CP=cp$/;" m +CP mplabx/ctaocrypt_test.X/Makefile /^CP=cp$/;" m +CP mplabx/cyassl.X/Makefile /^CP=cp$/;" m +CPP Makefile /^CPP = clang -E$/;" m +CPPFLAGS Makefile /^CPPFLAGS = -fvisibility=hidden$/;" m +CPU_CLK IDE/MDK-ARM/MDK-ARM/config/File_Config.c 43;" d file: +CP_ANY_OID cyassl/ctaocrypt/asn.h /^ CP_ANY_OID = 146 \/* id-ce 32 0 *\/$/;" e enum:CertificatePolicy_Sum +CRLDP_FULL_NAME ctaocrypt/src/asn.c 3348;" d file: +CRL_CERT_REVOKED cyassl/error-ssl.h /^ CRL_CERT_REVOKED = -261, \/* CRL Certificate revoked *\/$/;" e enum:CyaSSL_ErrorCodes +CRL_CallBack cyassl/test.h /^static INLINE void CRL_CallBack(const char* url)$/;" f +CRL_DIGEST_SIZE cyassl/internal.h 1015;" d +CRL_DIGEST_SIZE cyassl/internal.h 1017;" d +CRL_DIST_OID cyassl/ctaocrypt/asn.h /^ CRL_DIST_OID = 145,$/;" e enum:Extensions_Sum +CRL_EXTENSIONS cyassl/ctaocrypt/asn.h /^ CRL_EXTENSIONS = 0xa0,$/;" e enum:ASN_Tags +CRL_Entry cyassl/internal.h /^struct CRL_Entry {$/;" s +CRL_Entry cyassl/internal.h /^typedef struct CRL_Entry CRL_Entry;$/;" t typeref:struct:CRL_Entry +CRL_MISSING cyassl/error-ssl.h /^ CRL_MISSING = -262, \/* CRL Not loaded *\/$/;" e enum:CyaSSL_ErrorCodes +CRL_Monitor cyassl/internal.h /^struct CRL_Monitor {$/;" s +CRL_Monitor cyassl/internal.h /^typedef struct CRL_Monitor CRL_Monitor;$/;" t typeref:struct:CRL_Monitor +CRL_TYPE cyassl/ctaocrypt/asn_public.h /^ CRL_TYPE,$/;" e enum:CertType +CRP_Key IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CRP_Key DCD 0xFFFFFFFF$/;" l +CRYPTGEN_E cyassl/ctaocrypt/error-crypt.h /^ CRYPTGEN_E = -104, \/* windows crypt generation error *\/$/;" e enum:__anon61 +CRYPTO_LOCK cyassl/ssl.h /^ CRYPTO_LOCK = 1,$/;" e enum:__anon19 +CRYPTO_NUM_LOCKS cyassl/ssl.h /^ CRYPTO_NUM_LOCKS = 10$/;" e enum:__anon19 +CRYPTO_cleanup_all_ex_data cyassl/openssl/ssl.h 341;" d +CRYPTO_dynlock_value cyassl/openssl/ssl.h /^typedef CYASSL_dynlock_value CRYPTO_dynlock_value;$/;" t +CRYPTO_num_locks cyassl/openssl/ssl.h 228;" d +CRYPTO_set_dynlock_create_callback cyassl/openssl/ssl.h 225;" d +CRYPTO_set_dynlock_destroy_callback cyassl/openssl/ssl.h 227;" d +CRYPTO_set_dynlock_lock_callback cyassl/openssl/ssl.h 226;" d +CRYPTO_set_id_callback cyassl/openssl/ssl.h 223;" d +CRYPTO_set_locking_callback cyassl/openssl/ssl.h 224;" d +CRYPT_AES_BLOCK_SIZE mcapi/crypto.h /^ CRYPT_AES_BLOCK_SIZE = 16$/;" e enum:__anon91 +CRYPT_AES_CBC_Decrypt mcapi/crypto.c /^int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f +CRYPT_AES_CBC_Encrypt mcapi/crypto.c /^int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f +CRYPT_AES_CTR_Encrypt mcapi/crypto.c /^int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f +CRYPT_AES_CTX mcapi/crypto.h /^typedef struct CRYPT_AES_CTX {$/;" s +CRYPT_AES_CTX mcapi/crypto.h /^} CRYPT_AES_CTX;$/;" t typeref:struct:CRYPT_AES_CTX +CRYPT_AES_DECRYPTION mcapi/crypto.h /^ CRYPT_AES_DECRYPTION = 1,$/;" e enum:__anon91 +CRYPT_AES_DIRECT_Decrypt mcapi/crypto.c /^int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f +CRYPT_AES_DIRECT_Encrypt mcapi/crypto.c /^int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f +CRYPT_AES_ENCRYPTION mcapi/crypto.h /^ CRYPT_AES_ENCRYPTION = 0,$/;" e enum:__anon91 +CRYPT_AES_IvSet mcapi/crypto.c /^int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv)$/;" f +CRYPT_AES_KeySet mcapi/crypto.c /^int CRYPT_AES_KeySet(CRYPT_AES_CTX* aes, const unsigned char* key,$/;" f +CRYPT_ECC_CTX mcapi/crypto.h /^typedef struct CRYPT_ECC_CTX {$/;" s +CRYPT_ECC_CTX mcapi/crypto.h /^} CRYPT_ECC_CTX;$/;" t typeref:struct:CRYPT_ECC_CTX +CRYPT_ECC_DHE_KeyMake mcapi/crypto.c /^int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, int keySz)$/;" f +CRYPT_ECC_DHE_SharedSecretMake mcapi/crypto.c /^int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX* priv, CRYPT_ECC_CTX* pub,$/;" f +CRYPT_ECC_DSA_HashSign mcapi/crypto.c /^int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng,$/;" f +CRYPT_ECC_DSA_HashVerify mcapi/crypto.c /^int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX* ecc, const unsigned char* sig,$/;" f +CRYPT_ECC_Free mcapi/crypto.c /^int CRYPT_ECC_Free(CRYPT_ECC_CTX* ecc)$/;" f +CRYPT_ECC_Initialize mcapi/crypto.c /^int CRYPT_ECC_Initialize(CRYPT_ECC_CTX* ecc)$/;" f +CRYPT_ECC_KeySizeGet mcapi/crypto.c /^int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX* ecc)$/;" f +CRYPT_ECC_PrivateImport mcapi/crypto.c /^int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX* ecc, const unsigned char* priv,$/;" f +CRYPT_ECC_PublicExport mcapi/crypto.c /^int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX* ecc, unsigned char* out,$/;" f +CRYPT_ECC_PublicImport mcapi/crypto.c /^int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX* ecc, const unsigned char* in,$/;" f +CRYPT_ECC_SignatureSizeGet mcapi/crypto.c /^int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX* ecc)$/;" f +CRYPT_ERROR_StringGet mcapi/crypto.c /^int CRYPT_ERROR_StringGet(int err, char* str)$/;" f +CRYPT_HMAC_CTX mcapi/crypto.h /^typedef struct CRYPT_HMAC_CTX {$/;" s +CRYPT_HMAC_CTX mcapi/crypto.h /^} CRYPT_HMAC_CTX;$/;" t typeref:struct:CRYPT_HMAC_CTX +CRYPT_HMAC_DataAdd mcapi/crypto.c /^int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX* hmac, const unsigned char* input,$/;" f +CRYPT_HMAC_Finalize mcapi/crypto.c /^int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX* hmac, unsigned char* digest)$/;" f +CRYPT_HMAC_SHA mcapi/crypto.h /^ CRYPT_HMAC_SHA = 1, $/;" e enum:__anon88 +CRYPT_HMAC_SHA256 mcapi/crypto.h /^ CRYPT_HMAC_SHA256 = 2, $/;" e enum:__anon88 +CRYPT_HMAC_SHA384 mcapi/crypto.h /^ CRYPT_HMAC_SHA384 = 5, $/;" e enum:__anon88 +CRYPT_HMAC_SHA512 mcapi/crypto.h /^ CRYPT_HMAC_SHA512 = 4 $/;" e enum:__anon88 +CRYPT_HMAC_SetKey mcapi/crypto.c /^int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX* hmac, int type, const unsigned char* key,$/;" f +CRYPT_HUFFMAN_COMPRESS_STATIC mcapi/crypto.h /^ CRYPT_HUFFMAN_COMPRESS_STATIC = 1 $/;" e enum:__anon89 +CRYPT_HUFFMAN_Compress mcapi/crypto.c /^int CRYPT_HUFFMAN_Compress(unsigned char* out, unsigned int outSz,$/;" f +CRYPT_HUFFMAN_DeCompress mcapi/crypto.c /^int CRYPT_HUFFMAN_DeCompress(unsigned char* out, unsigned int outSz,$/;" f +CRYPT_MD5_CTX mcapi/crypto.h /^typedef struct CRYPT_MD5_CTX {$/;" s +CRYPT_MD5_CTX mcapi/crypto.h /^} CRYPT_MD5_CTX;$/;" t typeref:struct:CRYPT_MD5_CTX +CRYPT_MD5_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_MD5_DIGEST_SIZE = 16 $/;" e enum:__anon83 +CRYPT_MD5_DataAdd mcapi/crypto.c /^int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX* md5, const unsigned char* input,$/;" f +CRYPT_MD5_Finalize mcapi/crypto.c /^int CRYPT_MD5_Finalize(CRYPT_MD5_CTX* md5, unsigned char* digest)$/;" f +CRYPT_MD5_Initialize mcapi/crypto.c /^int CRYPT_MD5_Initialize(CRYPT_MD5_CTX* md5)$/;" f +CRYPT_RNG_BlockGenerate mcapi/crypto.c /^int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b,$/;" f +CRYPT_RNG_CTX mcapi/crypto.h /^typedef struct CRYPT_RNG_CTX {$/;" s +CRYPT_RNG_CTX mcapi/crypto.h /^} CRYPT_RNG_CTX;$/;" t typeref:struct:CRYPT_RNG_CTX +CRYPT_RNG_Get mcapi/crypto.c /^int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b)$/;" f +CRYPT_RNG_Initialize mcapi/crypto.c /^int CRYPT_RNG_Initialize(CRYPT_RNG_CTX* rng)$/;" f +CRYPT_RSA_CTX mcapi/crypto.h /^typedef struct CRYPT_RSA_CTX {$/;" s +CRYPT_RSA_CTX mcapi/crypto.h /^} CRYPT_RSA_CTX;$/;" t typeref:struct:CRYPT_RSA_CTX +CRYPT_RSA_EncryptSizeGet mcapi/crypto.c /^int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX* rsa) $/;" f +CRYPT_RSA_Free mcapi/crypto.c /^int CRYPT_RSA_Free(CRYPT_RSA_CTX* rsa)$/;" f +CRYPT_RSA_Initialize mcapi/crypto.c /^int CRYPT_RSA_Initialize(CRYPT_RSA_CTX* rsa)$/;" f +CRYPT_RSA_PrivateDecrypt mcapi/crypto.c /^int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,$/;" f +CRYPT_RSA_PrivateKeyDecode mcapi/crypto.c /^int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,$/;" f +CRYPT_RSA_PublicEncrypt mcapi/crypto.c /^int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,$/;" f +CRYPT_RSA_PublicKeyDecode mcapi/crypto.c /^int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,$/;" f +CRYPT_SHA256_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA256_CTX {$/;" s +CRYPT_SHA256_CTX mcapi/crypto.h /^} CRYPT_SHA256_CTX;$/;" t typeref:struct:CRYPT_SHA256_CTX +CRYPT_SHA256_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA256_DIGEST_SIZE = 32 $/;" e enum:__anon85 +CRYPT_SHA256_DataAdd mcapi/crypto.c /^int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX* sha256, const unsigned char* input,$/;" f +CRYPT_SHA256_Finalize mcapi/crypto.c /^int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX* sha256, unsigned char* digest)$/;" f +CRYPT_SHA256_Initialize mcapi/crypto.c /^int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX* sha256)$/;" f +CRYPT_SHA384_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA384_CTX {$/;" s +CRYPT_SHA384_CTX mcapi/crypto.h /^} CRYPT_SHA384_CTX;$/;" t typeref:struct:CRYPT_SHA384_CTX +CRYPT_SHA384_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA384_DIGEST_SIZE = 48$/;" e enum:__anon86 +CRYPT_SHA384_DataAdd mcapi/crypto.c /^int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX* sha384, const unsigned char* input,$/;" f +CRYPT_SHA384_Finalize mcapi/crypto.c /^int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX* sha384, unsigned char* digest)$/;" f +CRYPT_SHA384_Initialize mcapi/crypto.c /^int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX* sha384)$/;" f +CRYPT_SHA512_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA512_CTX {$/;" s +CRYPT_SHA512_CTX mcapi/crypto.h /^} CRYPT_SHA512_CTX;$/;" t typeref:struct:CRYPT_SHA512_CTX +CRYPT_SHA512_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA512_DIGEST_SIZE = 64 $/;" e enum:__anon87 +CRYPT_SHA512_DataAdd mcapi/crypto.c /^int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX* sha512, const unsigned char* input,$/;" f +CRYPT_SHA512_Finalize mcapi/crypto.c /^int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX* sha512, unsigned char* digest)$/;" f +CRYPT_SHA512_Initialize mcapi/crypto.c /^int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX* sha512)$/;" f +CRYPT_SHA_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA_CTX {$/;" s +CRYPT_SHA_CTX mcapi/crypto.h /^} CRYPT_SHA_CTX;$/;" t typeref:struct:CRYPT_SHA_CTX +CRYPT_SHA_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA_DIGEST_SIZE = 20$/;" e enum:__anon84 +CRYPT_SHA_DataAdd mcapi/crypto.c /^int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX* sha, const unsigned char* input,$/;" f +CRYPT_SHA_Finalize mcapi/crypto.c /^int CRYPT_SHA_Finalize(CRYPT_SHA_CTX* sha, unsigned char* digest)$/;" f +CRYPT_SHA_Initialize mcapi/crypto.c /^int CRYPT_SHA_Initialize(CRYPT_SHA_CTX* sha)$/;" f +CRYPT_TDES_CBC_Decrypt mcapi/crypto.c /^int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,$/;" f +CRYPT_TDES_CBC_Encrypt mcapi/crypto.c /^int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,$/;" f +CRYPT_TDES_CTX mcapi/crypto.h /^typedef struct CRYPT_TDES_CTX {$/;" s +CRYPT_TDES_CTX mcapi/crypto.h /^} CRYPT_TDES_CTX;$/;" t typeref:struct:CRYPT_TDES_CTX +CRYPT_TDES_DECRYPTION mcapi/crypto.h /^ CRYPT_TDES_DECRYPTION = 1 $/;" e enum:__anon90 +CRYPT_TDES_ENCRYPTION mcapi/crypto.h /^ CRYPT_TDES_ENCRYPTION = 0,$/;" e enum:__anon90 +CRYPT_TDES_IvSet mcapi/crypto.c /^int CRYPT_TDES_IvSet(CRYPT_TDES_CTX* tdes, const unsigned char* iv)$/;" f +CRYPT_TDES_KeySet mcapi/crypto.c /^int CRYPT_TDES_KeySet(CRYPT_TDES_CTX* tdes, const unsigned char* key,$/;" f +CRYP_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CRYP_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l +CR_DBP_BB IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 47;" d file: +CR_DBP_BB IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 47;" d file: +CR_OFFSET IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 45;" d file: +CR_OFFSET IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 45;" d file: +CSCOPE Makefile /^CSCOPE = cscope$/;" m +CTAGS Makefile /^CTAGS = ctags$/;" m +CTAOCRYPT_BLAKE2_H cyassl/ctaocrypt/blake2.h 26;" d +CTAOCRYPT_BLAKE2_IMPL_H cyassl/ctaocrypt/blake2-impl.h 36;" d +CTAOCRYPT_BLAKE2_INT_H cyassl/ctaocrypt/blake2-int.h 37;" d +CTAOCRYPT_SLOW_WORD64 cyassl/ctaocrypt/types.h 95;" d +CTAO_CRYPT_AES_H cyassl/ctaocrypt/aes.h 26;" d +CTAO_CRYPT_ARC4_H cyassl/ctaocrypt/arc4.h 24;" d +CTAO_CRYPT_ASN_H cyassl/ctaocrypt/asn.h 25;" d +CTAO_CRYPT_ASN_PUBLIC_H cyassl/ctaocrypt/asn_public.h 24;" d +CTAO_CRYPT_CAMELLIA_H cyassl/ctaocrypt/camellia.h 52;" d +CTAO_CRYPT_CODING_H cyassl/ctaocrypt/coding.h 24;" d +CTAO_CRYPT_COMPRESS_H cyassl/ctaocrypt/compress.h 26;" d +CTAO_CRYPT_DES3_H cyassl/ctaocrypt/des3.h 26;" d +CTAO_CRYPT_DH_H cyassl/ctaocrypt/dh.h 26;" d +CTAO_CRYPT_DSA_H cyassl/ctaocrypt/dsa.h 26;" d +CTAO_CRYPT_ECC_H cyassl/ctaocrypt/ecc.h 25;" d +CTAO_CRYPT_ERROR_H cyassl/ctaocrypt/error-crypt.h 24;" d +CTAO_CRYPT_FIPS_TEST_H cyassl/ctaocrypt/fips_test.h 24;" d +CTAO_CRYPT_HC128_H cyassl/ctaocrypt/hc128.h 26;" d +CTAO_CRYPT_HMAC_H cyassl/ctaocrypt/hmac.h 26;" d +CTAO_CRYPT_INTEGER_H cyassl/ctaocrypt/integer.h 29;" d +CTAO_CRYPT_MD2_H cyassl/ctaocrypt/md2.h 26;" d +CTAO_CRYPT_MD4_H cyassl/ctaocrypt/md4.h 26;" d +CTAO_CRYPT_MD5_H cyassl/ctaocrypt/md5.h 25;" d +CTAO_CRYPT_MISC_H cyassl/ctaocrypt/misc.h 24;" d +CTAO_CRYPT_PKCS7_H cyassl/ctaocrypt/pkcs7.h 26;" d +CTAO_CRYPT_PORT_H cyassl/ctaocrypt/port.h 24;" d +CTAO_CRYPT_PWDBASED_H cyassl/ctaocrypt/pwdbased.h 26;" d +CTAO_CRYPT_RABBIT_H cyassl/ctaocrypt/rabbit.h 26;" d +CTAO_CRYPT_RANDOM_H cyassl/ctaocrypt/random.h 24;" d +CTAO_CRYPT_RIPEME_H cyassl/ctaocrypt/ripemd.h 26;" d +CTAO_CRYPT_RSA_H cyassl/ctaocrypt/rsa.h 25;" d +CTAO_CRYPT_SETTINGS_H cyassl/ctaocrypt/settings.h 27;" d +CTAO_CRYPT_SHA256_H cyassl/ctaocrypt/sha256.h 29;" d +CTAO_CRYPT_SHA512_H cyassl/ctaocrypt/sha512.h 26;" d +CTAO_CRYPT_SHA_H cyassl/ctaocrypt/sha.h 26;" d +CTAO_CRYPT_TFM_H cyassl/ctaocrypt/tfm.h 36;" d +CTAO_CRYPT_TYPES_H cyassl/ctaocrypt/types.h 24;" d +CTAO_CRYPT_VISIBILITY_H cyassl/ctaocrypt/visibility.h 26;" d +CTC_DATE_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_DATE_SIZE = 32,$/;" e enum:Ctc_Misc +CTC_MAX_ALT_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_MAX_ALT_SIZE = 8192, \/* may be huge *\/$/;" e enum:Ctc_Misc +CTC_MD2wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_MD2wRSA = 646,$/;" e enum:Ctc_SigType +CTC_MD5wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_MD5wRSA = 648,$/;" e enum:Ctc_SigType +CTC_NAME_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_NAME_SIZE = 64,$/;" e enum:Ctc_Misc +CTC_SERIAL_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_SERIAL_SIZE = 8$/;" e enum:Ctc_Misc +CTC_SETTINGS cyassl/ctaocrypt/types.h /^ CTC_SETTINGS = 0x0$/;" e enum:__anon51 +CTC_SHA256wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA256wECDSA = 524,$/;" e enum:Ctc_SigType +CTC_SHA256wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA256wRSA = 655,$/;" e enum:Ctc_SigType +CTC_SHA384wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA384wECDSA = 525,$/;" e enum:Ctc_SigType +CTC_SHA384wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA384wRSA = 656,$/;" e enum:Ctc_SigType +CTC_SHA512wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA512wECDSA = 526$/;" e enum:Ctc_SigType +CTC_SHA512wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA512wRSA = 657,$/;" e enum:Ctc_SigType +CTC_SHAwDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwDSA = 517,$/;" e enum:Ctc_SigType +CTC_SHAwECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwECDSA = 520,$/;" e enum:Ctc_SigType +CTC_SHAwRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwRSA = 649,$/;" e enum:Ctc_SigType +CTR_SZ ctaocrypt/src/aes.c /^ CTR_SZ = 4$/;" e enum:__anon1 file: +CTaoCryptErrorString ctaocrypt/src/error.c /^void CTaoCryptErrorString(int error, char* buffer)$/;" f +CURVE_LEN cyassl/internal.h /^ CURVE_LEN = 2, \/* ecc named curve length *\/$/;" e enum:Misc +CXX Makefile /^CXX = g++$/;" m +CXXCPP Makefile /^CXXCPP = g++ -E$/;" m +CXXDEPMODE Makefile /^CXXDEPMODE = depmode=gcc3$/;" m +CXXFLAGS Makefile /^CXXFLAGS = -g -O2$/;" m +CYASSL cyassl/internal.h /^struct CYASSL {$/;" s +CYASSL cyassl/ssl.h /^typedef struct CYASSL CYASSL; $/;" t typeref:struct:CYASSL +CYASSL_3DES_CAVIUM_MAGIC cyassl/ctaocrypt/des3.h 36;" d +CYASSL_AEAD_TYPE cyassl/ssl.h /^ CYASSL_AEAD_TYPE = 4,$/;" e enum:__anon23 +CYASSL_AES_CAVIUM_MAGIC cyassl/ctaocrypt/aes.h 61;" d +CYASSL_AES_COUNTER cyassl/ctaocrypt/settings.h 156;" d +CYASSL_ALERT cyassl/ssl.h /^typedef struct CYASSL_ALERT {$/;" s +CYASSL_ALERT cyassl/ssl.h /^} CYASSL_ALERT;$/;" t typeref:struct:CYASSL_ALERT +CYASSL_ALERT_HISTORY cyassl/ssl.h /^typedef struct CYASSL_ALERT_HISTORY {$/;" s +CYASSL_ALERT_HISTORY cyassl/ssl.h /^} CYASSL_ALERT_HISTORY;$/;" t typeref:struct:CYASSL_ALERT_HISTORY +CYASSL_API cyassl/ctaocrypt/visibility.h 37;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 40;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 44;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 46;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 50;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 56;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 58;" d +CYASSL_API cyassl/ctaocrypt/visibility.h 62;" d +CYASSL_ARC4_CAVIUM_MAGIC cyassl/ctaocrypt/arc4.h 35;" d +CYASSL_ASN1_INTEGER cyassl/ssl.h /^typedef struct CYASSL_ASN1_INTEGER CYASSL_ASN1_INTEGER;$/;" t typeref:struct:CYASSL_ASN1_INTEGER +CYASSL_ASN1_OBJECT cyassl/ssl.h /^typedef struct CYASSL_ASN1_OBJECT CYASSL_ASN1_OBJECT;$/;" t typeref:struct:CYASSL_ASN1_OBJECT +CYASSL_ASN1_STRING cyassl/ssl.h /^typedef struct CYASSL_ASN1_STRING CYASSL_ASN1_STRING;$/;" t typeref:struct:CYASSL_ASN1_STRING +CYASSL_ASN1_TIME cyassl/ssl.h /^typedef struct CYASSL_ASN1_TIME CYASSL_ASN1_TIME;$/;" t typeref:struct:CYASSL_ASN1_TIME +CYASSL_ASN1_UTCTIME cyassl/ssl.h 93;" d +CYASSL_BIGNUM cyassl/openssl/bn.h /^typedef struct CYASSL_BIGNUM {$/;" s +CYASSL_BIGNUM cyassl/openssl/bn.h /^} CYASSL_BIGNUM; $/;" t typeref:struct:CYASSL_BIGNUM +CYASSL_BIO cyassl/internal.h /^struct CYASSL_BIO {$/;" s +CYASSL_BIO cyassl/ssl.h /^typedef struct CYASSL_BIO CYASSL_BIO;$/;" t typeref:struct:CYASSL_BIO +CYASSL_BIO_H_ cyassl/openssl/bio.h 5;" d +CYASSL_BIO_METHOD cyassl/internal.h /^struct CYASSL_BIO_METHOD {$/;" s +CYASSL_BIO_METHOD cyassl/ssl.h /^typedef struct CYASSL_BIO_METHOD CYASSL_BIO_METHOD;$/;" t typeref:struct:CYASSL_BIO_METHOD +CYASSL_BIT_SIZE cyassl/ctaocrypt/types.h /^ CYASSL_BIT_SIZE = 8,$/;" e enum:__anon47 +CYASSL_BLOCK_TYPE cyassl/ssl.h /^ CYASSL_BLOCK_TYPE = 2,$/;" e enum:__anon23 +CYASSL_BN_CTX cyassl/openssl/bn.h /^typedef struct CYASSL_BN_CTX CYASSL_BN_CTX;$/;" t typeref:struct:CYASSL_BN_CTX +CYASSL_BN_H_ cyassl/openssl/bn.h 5;" d +CYASSL_CA cyassl/test.h /^ CYASSL_CA = 1,$/;" e enum:__anon32 +CYASSL_CACHE_CERT_VERSION src/ssl.c 3818;" d file: +CYASSL_CACHE_VERSION src/ssl.c 3508;" d file: +CYASSL_CALLBACKS cyassl/ctaocrypt/settings.h 566;" d +CYASSL_CALLBACKS cyassl/ctaocrypt/settings.h 568;" d +CYASSL_CALLBACKS_H cyassl/callbacks.h 24;" d +CYASSL_CBIO_ERR_CONN_CLOSE cyassl/ssl.h /^ CYASSL_CBIO_ERR_CONN_CLOSE = -5, \/* connection closed or epipe *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_CONN_RST cyassl/ssl.h /^ CYASSL_CBIO_ERR_CONN_RST = -3, \/* connection reset *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_GENERAL cyassl/ssl.h /^ CYASSL_CBIO_ERR_GENERAL = -1, \/* general unexpected err *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_ISR cyassl/ssl.h /^ CYASSL_CBIO_ERR_ISR = -4, \/* interrupt *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_TIMEOUT cyassl/ssl.h /^ CYASSL_CBIO_ERR_TIMEOUT = -6 \/* socket timeout *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_WANT_READ cyassl/ssl.h /^ CYASSL_CBIO_ERR_WANT_READ = -2, \/* need to call read again *\/$/;" e enum:IOerrors +CYASSL_CBIO_ERR_WANT_WRITE cyassl/ssl.h /^ CYASSL_CBIO_ERR_WANT_WRITE = -2, \/* need to call write again *\/$/;" e enum:IOerrors +CYASSL_CERT cyassl/test.h /^ CYASSL_CERT = 2,$/;" e enum:__anon32 +CYASSL_CERTS_TEST_H cyassl/certs_test.h 4;" d +CYASSL_CERT_DATA_H IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h 2;" d +CYASSL_CERT_DATA_H IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h 2;" d +CYASSL_CERT_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 109;" d +CYASSL_CERT_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 132;" d +CYASSL_CERT_MANAGER cyassl/internal.h /^struct CYASSL_CERT_MANAGER {$/;" s +CYASSL_CERT_MANAGER cyassl/ssl.h /^typedef struct CYASSL_CERT_MANAGER CYASSL_CERT_MANAGER;$/;" t typeref:struct:CYASSL_CERT_MANAGER +CYASSL_CHAIN_CA cyassl/ssl.h /^ CYASSL_CHAIN_CA = 2 \/* added to cache from trusted chain *\/$/;" e enum:__anon22 +CYASSL_CIPHER cyassl/internal.h /^struct CYASSL_CIPHER {$/;" s +CYASSL_CIPHER cyassl/ssl.h /^typedef struct CYASSL_CIPHER CYASSL_CIPHER;$/;" t typeref:struct:CYASSL_CIPHER +CYASSL_CLIENT_END cyassl/ssl.h /^ CYASSL_CLIENT_END = 1,$/;" e enum:__anon23 +CYASSL_CMSIS_RTOS cyassl/ctaocrypt/settings.h 190;" d +CYASSL_COMP_METHOD cyassl/ssl.h /^typedef struct CYASSL_COMP_METHOD {$/;" s +CYASSL_COMP_METHOD cyassl/ssl.h /^} CYASSL_COMP_METHOD;$/;" t typeref:struct:CYASSL_COMP_METHOD +CYASSL_CRL cyassl/crl.h /^typedef struct CYASSL_CRL CYASSL_CRL;$/;" t typeref:struct:CYASSL_CRL +CYASSL_CRL cyassl/internal.h /^ typedef struct CYASSL_CRL CYASSL_CRL;$/;" t typeref:struct:CYASSL_CRL +CYASSL_CRL cyassl/internal.h /^struct CYASSL_CRL {$/;" s +CYASSL_CRL_CHECKALL cyassl/ssl.h /^ CYASSL_CRL_CHECKALL = 1,$/;" e enum:__anon19 +CYASSL_CRL_H cyassl/crl.h 24;" d +CYASSL_CRL_MONITOR cyassl/ssl.h 1268;" d +CYASSL_CRL_START_MON cyassl/ssl.h 1269;" d +CYASSL_CRYPTO_H_ cyassl/openssl/crypto.h 4;" d +CYASSL_CTX cyassl/internal.h /^struct CYASSL_CTX {$/;" s +CYASSL_CTX cyassl/ssl.h /^typedef struct CYASSL_CTX CYASSL_CTX;$/;" t typeref:struct:CYASSL_CTX +CYASSL_Cipher cyassl/openssl/evp.h /^} CYASSL_Cipher;$/;" t typeref:union:__anon35 +CYASSL_DEFAULT_CIPHER_LIST cyassl/ssl.h 524;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 31;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 121;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 32;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 144;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 32;" d +CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 34;" d +CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 554;" d +CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 556;" d +CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 603;" d +CYASSL_DES_H_ cyassl/openssl/des.h 29;" d +CYASSL_DES_cblock cyassl/openssl/des.h /^typedef unsigned char CYASSL_DES_cblock[8];$/;" t +CYASSL_DES_key_schedule cyassl/openssl/des.h /^typedef CYASSL_DES_cblock CYASSL_DES_key_schedule;$/;" t +CYASSL_DH cyassl/openssl/dh.h /^typedef struct CYASSL_DH {$/;" s +CYASSL_DH cyassl/openssl/dh.h /^} CYASSL_DH;$/;" t typeref:struct:CYASSL_DH +CYASSL_DH_H_ cyassl/openssl/dh.h 5;" d +CYASSL_DSA cyassl/openssl/dsa.h /^struct CYASSL_DSA {$/;" s +CYASSL_DSA cyassl/ssl.h /^typedef struct CYASSL_DSA CYASSL_DSA;$/;" t typeref:struct:CYASSL_DSA +CYASSL_DSA_H_ cyassl/openssl/dsa.h 5;" d +CYASSL_DTLS cyassl/ctaocrypt/settings.h 560;" d +CYASSL_DTLS cyassl/ctaocrypt/settings.h 562;" d +CYASSL_DTLS_CTX cyassl/internal.h /^typedef struct CYASSL_DTLS_CTX {$/;" s +CYASSL_DTLS_CTX cyassl/internal.h /^} CYASSL_DTLS_CTX;$/;" t typeref:struct:CYASSL_DTLS_CTX +CYASSL_ECC_SECP160R1 cyassl/ssl.h /^ CYASSL_ECC_SECP160R1 = 0x10,$/;" e enum:__anon28 +CYASSL_ECC_SECP192R1 cyassl/ssl.h /^ CYASSL_ECC_SECP192R1 = 0x13,$/;" e enum:__anon28 +CYASSL_ECC_SECP224R1 cyassl/ssl.h /^ CYASSL_ECC_SECP224R1 = 0x15,$/;" e enum:__anon28 +CYASSL_ECC_SECP256R1 cyassl/ssl.h /^ CYASSL_ECC_SECP256R1 = 0x17,$/;" e enum:__anon28 +CYASSL_ECC_SECP384R1 cyassl/ssl.h /^ CYASSL_ECC_SECP384R1 = 0x18,$/;" e enum:__anon28 +CYASSL_ECC_SECP521R1 cyassl/ssl.h /^ CYASSL_ECC_SECP521R1 = 0x19$/;" e enum:__anon28 +CYASSL_ENTER ctaocrypt/src/logging.c /^void CYASSL_ENTER(const char* msg)$/;" f +CYASSL_ENTER cyassl/ctaocrypt/logging.h 58;" d +CYASSL_ERROR ctaocrypt/src/logging.c /^void CYASSL_ERROR(int error)$/;" f +CYASSL_ERROR cyassl/ctaocrypt/logging.h 61;" d +CYASSL_ERROR_H cyassl/error-ssl.h 24;" d +CYASSL_EVP_CIPHER cyassl/openssl/evp.h /^typedef char CYASSL_EVP_CIPHER;$/;" t +CYASSL_EVP_CIPHER_CTX cyassl/openssl/evp.h /^typedef struct CYASSL_EVP_CIPHER_CTX {$/;" s +CYASSL_EVP_CIPHER_CTX cyassl/openssl/evp.h /^} CYASSL_EVP_CIPHER_CTX;$/;" t typeref:struct:CYASSL_EVP_CIPHER_CTX +CYASSL_EVP_H_ cyassl/openssl/evp.h 29;" d +CYASSL_EVP_MD cyassl/openssl/evp.h /^typedef char CYASSL_EVP_MD;$/;" t +CYASSL_EVP_MD_CTX cyassl/openssl/evp.h /^typedef struct CYASSL_EVP_MD_CTX {$/;" s +CYASSL_EVP_MD_CTX cyassl/openssl/evp.h /^} CYASSL_EVP_MD_CTX;$/;" t typeref:struct:CYASSL_EVP_MD_CTX +CYASSL_EVP_PKEY cyassl/ssl.h /^typedef struct CYASSL_EVP_PKEY {$/;" s +CYASSL_EVP_PKEY cyassl/ssl.h /^} CYASSL_EVP_PKEY;$/;" t typeref:struct:CYASSL_EVP_PKEY +CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 644;" d +CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 646;" d +CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 648;" d +CYASSL_HMAC_CAVIUM_MAGIC cyassl/ctaocrypt/hmac.h 60;" d +CYASSL_HMAC_CTX cyassl/openssl/hmac.h /^typedef struct CYASSL_HMAC_CTX {$/;" s +CYASSL_HMAC_CTX cyassl/openssl/hmac.h /^} CYASSL_HMAC_CTX;$/;" t typeref:struct:CYASSL_HMAC_CTX +CYASSL_HMAC_H_ cyassl/openssl/hmac.h 29;" d +CYASSL_Hasher cyassl/openssl/evp.h /^} CYASSL_Hasher;$/;" t typeref:union:__anon34 +CYASSL_INT_H cyassl/internal.h 24;" d +CYASSL_KEIL_RL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 26;" d +CYASSL_KEIL_RL_H IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 26;" d +CYASSL_KEIL_RL_H IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 26;" d +CYASSL_KEIL_TCP_NET IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 36;" d +CYASSL_KEY cyassl/test.h /^ CYASSL_KEY = 3$/;" e enum:__anon32 +CYASSL_KEY_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 115;" d +CYASSL_KEY_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 138;" d +CYASSL_LEANPSK cyassl/ctaocrypt/settings.h 199;" d +CYASSL_LEAVE ctaocrypt/src/logging.c /^void CYASSL_LEAVE(const char* msg, int ret)$/;" f +CYASSL_LEAVE cyassl/ctaocrypt/logging.h 59;" d +CYASSL_LIBRARY_VERSION Makefile /^CYASSL_LIBRARY_VERSION = 5:5:0$/;" m +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 38;" d +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 41;" d +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 48;" d +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 51;" d +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 60;" d +CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 63;" d +CYASSL_LOGGING_H cyassl/ctaocrypt/logging.h 26;" d +CYASSL_LOW_MEMORY cyassl/ctaocrypt/settings.h 313;" d +CYASSL_LWIP cyassl/ctaocrypt/settings.h 131;" d +CYASSL_LWIP cyassl/ctaocrypt/settings.h 327;" d +CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 242;" d +CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 280;" d +CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 302;" d +CYASSL_MAX_16BIT cyassl/ctaocrypt/types.h 106;" d +CYASSL_MAX_ERROR_SZ cyassl/ctaocrypt/types.h /^ CYASSL_MAX_ERROR_SZ = 80$/;" e enum:__anon49 +CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 105;" d +CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 143;" d +CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 165;" d +CYASSL_MD4_CTX cyassl/ssl.h /^typedef struct CYASSL_MD4_CTX {$/;" s +CYASSL_MD4_CTX cyassl/ssl.h /^} CYASSL_MD4_CTX;$/;" t typeref:struct:CYASSL_MD4_CTX +CYASSL_MD5_CTX cyassl/openssl/md5.h /^typedef struct CYASSL_MD5_CTX {$/;" s +CYASSL_MD5_CTX cyassl/openssl/md5.h /^} CYASSL_MD5_CTX;$/;" t typeref:struct:CYASSL_MD5_CTX +CYASSL_MD5_H_ cyassl/openssl/md5.h 5;" d +CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 26;" d +CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 26;" d +CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 26;" d +CYASSL_MDK_ARM IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c 25;" d file: +CYASSL_MDK_ARM IDE/MDK5-ARM/Projects/SimpleClient/client.c 25;" d file: +CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 51;" d +CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 50;" d +CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 46;" d +CYASSL_MEMORY_H cyassl/ctaocrypt/memory.h 26;" d +CYASSL_METHOD cyassl/internal.h /^struct CYASSL_METHOD {$/;" s +CYASSL_METHOD cyassl/ssl.h /^typedef struct CYASSL_METHOD CYASSL_METHOD;$/;" t typeref:struct:CYASSL_METHOD +CYASSL_MFL_2_10 cyassl/ssl.h /^ CYASSL_MFL_2_10 = 2, \/* 1024 bytes *\/$/;" e enum:__anon27 +CYASSL_MFL_2_11 cyassl/ssl.h /^ CYASSL_MFL_2_11 = 3, \/* 2048 bytes *\/$/;" e enum:__anon27 +CYASSL_MFL_2_12 cyassl/ssl.h /^ CYASSL_MFL_2_12 = 4, \/* 4096 bytes *\/$/;" e enum:__anon27 +CYASSL_MFL_2_13 cyassl/ssl.h /^ CYASSL_MFL_2_13 = 5 \/* 8192 bytes *\/\/* CyaSSL ONLY!!! *\/$/;" e enum:__anon27 +CYASSL_MFL_2_9 cyassl/ssl.h /^ CYASSL_MFL_2_9 = 1, \/* 512 bytes *\/$/;" e enum:__anon27 +CYASSL_MSG ctaocrypt/src/logging.c /^void CYASSL_MSG(const char* msg)$/;" f +CYASSL_MSG cyassl/ctaocrypt/logging.h 62;" d +CYASSL_OCSP cyassl/internal.h /^ typedef struct CYASSL_OCSP CYASSL_OCSP;$/;" t typeref:struct:CYASSL_OCSP +CYASSL_OCSP cyassl/internal.h /^struct CYASSL_OCSP {$/;" s +CYASSL_OCSP cyassl/ocsp.h /^typedef struct CYASSL_OCSP CYASSL_OCSP;$/;" t typeref:struct:CYASSL_OCSP +CYASSL_OCSP_H cyassl/ocsp.h 26;" d +CYASSL_OCSP_NO_NONCE cyassl/ssl.h /^ CYASSL_OCSP_NO_NONCE = 2,$/;" e enum:__anon19 +CYASSL_OCSP_URL_OVERRIDE cyassl/ssl.h /^ CYASSL_OCSP_URL_OVERRIDE = 1,$/;" e enum:__anon19 +CYASSL_OPENSSLV_H_ cyassl/openssl/opensslv.h 4;" d +CYASSL_OPENSSL_H_ cyassl/openssl/ssl.h 29;" d +CYASSL_PACK cyassl/internal.h 760;" d +CYASSL_PACK cyassl/internal.h 762;" d +CYASSL_PEM_H_ cyassl/openssl/pem.h 5;" d +CYASSL_PIC32MZ_CE cyassl/ctaocrypt/settings.h 151;" d +CYASSL_PIC32MZ_CRYPT cyassl/ctaocrypt/settings.h 152;" d +CYASSL_PIC32MZ_RNG cyassl/ctaocrypt/settings.h 154;" d +CYASSL_PTHREADS cyassl/ctaocrypt/port.h 67;" d +CYASSL_PTHREADS cyassl/internal.h 102;" d +CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 130;" d +CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 168;" d +CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 190;" d +CYASSL_RIPEMD_CTX cyassl/openssl/ripemd.h /^typedef struct CYASSL_RIPEMD_CTX {$/;" s +CYASSL_RIPEMD_CTX cyassl/openssl/ripemd.h /^} CYASSL_RIPEMD_CTX;$/;" t typeref:struct:CYASSL_RIPEMD_CTX +CYASSL_RIPEMD_H_ cyassl/openssl/ripemd.h 5;" d +CYASSL_RNG_CAVIUM_MAGIC cyassl/ctaocrypt/random.h 69;" d +CYASSL_RSA cyassl/openssl/rsa.h /^struct CYASSL_RSA {$/;" s +CYASSL_RSA cyassl/ssl.h /^typedef struct CYASSL_RSA CYASSL_RSA;$/;" t typeref:struct:CYASSL_RSA +CYASSL_RSA_CAVIUM_MAGIC cyassl/ctaocrypt/rsa.h 35;" d +CYASSL_RSA_F4 cyassl/ssl.h 525;" d +CYASSL_RSA_H_ cyassl/openssl/rsa.h 5;" d +CYASSL_SAFERTOS cyassl/ctaocrypt/settings.h 329;" d +CYASSL_SEP cyassl/ctaocrypt/settings.h 588;" d +CYASSL_SERVER_END cyassl/ssl.h /^ CYASSL_SERVER_END = 0,$/;" e enum:__anon23 +CYASSL_SESSION cyassl/internal.h /^struct CYASSL_SESSION {$/;" s +CYASSL_SESSION cyassl/ssl.h /^typedef struct CYASSL_SESSION CYASSL_SESSION;$/;" t typeref:struct:CYASSL_SESSION +CYASSL_SHA256_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA256_CTX {$/;" s +CYASSL_SHA256_CTX cyassl/openssl/sha.h /^} CYASSL_SHA256_CTX;$/;" t typeref:struct:CYASSL_SHA256_CTX +CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 118;" d +CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 156;" d +CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 178;" d +CYASSL_SHA384_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA384_CTX {$/;" s +CYASSL_SHA384_CTX cyassl/openssl/sha.h /^} CYASSL_SHA384_CTX;$/;" t typeref:struct:CYASSL_SHA384_CTX +CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 124;" d +CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 162;" d +CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 184;" d +CYASSL_SHA512_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA512_CTX {$/;" s +CYASSL_SHA512_CTX cyassl/openssl/sha.h /^} CYASSL_SHA512_CTX;$/;" t typeref:struct:CYASSL_SHA512_CTX +CYASSL_SHA_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA_CTX {$/;" s +CYASSL_SHA_CTX cyassl/openssl/sha.h /^} CYASSL_SHA_CTX;$/;" t typeref:struct:CYASSL_SHA_CTX +CYASSL_SHA_H_ cyassl/openssl/sha.h 5;" d +CYASSL_SMALL_STACK ctaocrypt/src/integer.c 44;" d file: +CYASSL_SMALL_STACK cyassl/ctaocrypt/settings.h 350;" d +CYASSL_SMALL_STACK cyassl/ctaocrypt/settings.h 351;" d +CYASSL_SMALL_STACK cyassl/options.h 43;" d +CYASSL_SMALL_STACK cyassl/options.h 44;" d +CYASSL_SNIFFER sslSniffer/sslSnifferTest/snifftest.c 29;" d file: +CYASSL_SNIFFER_ERROR_H cyassl/sniffer_error.h 24;" d +CYASSL_SNIFFER_H cyassl/sniffer.h 24;" d +CYASSL_SNI_ANSWER_ON_MISMATCH cyassl/ssl.h /^ CYASSL_SNI_ANSWER_ON_MISMATCH = 0x02 \/* fake match on mismatch flag *\/$/;" e enum:__anon25 +CYASSL_SNI_CONTINUE_ON_MISMATCH cyassl/ssl.h /^ CYASSL_SNI_CONTINUE_ON_MISMATCH = 0x01, \/* do not abort on mismatch flag *\/$/;" e enum:__anon25 +CYASSL_SNI_FAKE_MATCH cyassl/ssl.h /^ CYASSL_SNI_FAKE_MATCH = 1, \/* if CYASSL_SNI_ANSWER_ON_MISMATCH is enabled *\/$/;" e enum:__anon26 +CYASSL_SNI_HOST_NAME cyassl/ssl.h /^ CYASSL_SNI_HOST_NAME = 0$/;" e enum:__anon24 +CYASSL_SNI_NO_MATCH cyassl/ssl.h /^ CYASSL_SNI_NO_MATCH = 0,$/;" e enum:__anon26 +CYASSL_SNI_REAL_MATCH cyassl/ssl.h /^ CYASSL_SNI_REAL_MATCH = 2$/;" e enum:__anon26 +CYASSL_SOCKADDR cyassl/internal.h /^struct CYASSL_SOCKADDR {$/;" s +CYASSL_SOCKADDR cyassl/ssl.h /^typedef struct CYASSL_SOCKADDR CYASSL_SOCKADDR;$/;" t typeref:struct:CYASSL_SOCKADDR +CYASSL_SSLV3 cyassl/ssl.h /^ CYASSL_SSLV3 = 0,$/;" e enum:__anon22 +CYASSL_SSL_H cyassl/ssl.h 26;" d +CYASSL_STREAM_TYPE cyassl/ssl.h /^ CYASSL_STREAM_TYPE = 3,$/;" e enum:__anon23 +CYASSL_TEST_API cyassl/ctaocrypt/asn.h 477;" d +CYASSL_TEST_API cyassl/ctaocrypt/asn.h 479;" d +CYASSL_THREAD cyassl/test.h 110;" d +CYASSL_THREAD cyassl/test.h 115;" d +CYASSL_THREAD cyassl/test.h 121;" d +CYASSL_THREAD cyassl/test.h 125;" d +CYASSL_TLSV1 cyassl/ssl.h /^ CYASSL_TLSV1 = 1,$/;" e enum:__anon22 +CYASSL_TLSV1_1 cyassl/ssl.h /^ CYASSL_TLSV1_1 = 2,$/;" e enum:__anon22 +CYASSL_TLSV1_2 cyassl/ssl.h /^ CYASSL_TLSV1_2 = 3,$/;" e enum:__anon22 +CYASSL_TLS_HMAC_INNER_SZ cyassl/ssl.h /^ CYASSL_TLS_HMAC_INNER_SZ = 13 \/* SEQ_SZ + ENUM + VERSION_SZ + LEN_SZ *\/$/;" e enum:__anon23 +CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c 45;" d file: +CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c 30;" d file: +CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/SimpleClient/client.c 45;" d file: +CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/SimpleServer/server.c 30;" d file: +CYASSL_TRACK_MEMORY examples/client/client.c 37;" d file: +CYASSL_TRACK_MEMORY examples/server/server.c 30;" d file: +CYASSL_TYPES cyassl/ctaocrypt/settings.h 397;" d +CYASSL_TYPES_DEFINED cyassl/openssl/ssl.h 54;" d +CYASSL_TYPES_DEFINED cyassl/ssl.h 75;" d +CYASSL_USER_CA cyassl/ssl.h /^ CYASSL_USER_CA = 1, \/* user added as trusted *\/$/;" e enum:__anon22 +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 108;" d +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 134;" d +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 142;" d +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 178;" d +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 540;" d +CYASSL_USER_IO cyassl/ctaocrypt/settings.h 542;" d +CYASSL_VERSION cyassl/ssl.h 47;" d +CYASSL_WORD_BITS cyassl/ctaocrypt/types.h /^ CYASSL_WORD_BITS = CYASSL_WORD_SIZE * CYASSL_BIT_SIZE$/;" e enum:__anon47 +CYASSL_WORD_SIZE cyassl/ctaocrypt/types.h /^ CYASSL_WORD_SIZE = sizeof(word),$/;" e enum:__anon47 +CYASSL_X509 cyassl/internal.h /^struct CYASSL_X509 {$/;" s +CYASSL_X509 cyassl/ssl.h /^typedef struct CYASSL_X509 CYASSL_X509;$/;" t typeref:struct:CYASSL_X509 +CYASSL_X509_CHAIN cyassl/internal.h /^struct CYASSL_X509_CHAIN {$/;" s +CYASSL_X509_CHAIN cyassl/ssl.h /^typedef struct CYASSL_X509_CHAIN CYASSL_X509_CHAIN;$/;" t typeref:struct:CYASSL_X509_CHAIN +CYASSL_X509_CRL cyassl/ssl.h /^typedef struct CYASSL_X509_CRL CYASSL_X509_CRL;$/;" t typeref:struct:CYASSL_X509_CRL +CYASSL_X509_EXTENSION cyassl/ssl.h /^typedef struct CYASSL_X509_EXTENSION CYASSL_X509_EXTENSION;$/;" t typeref:struct:CYASSL_X509_EXTENSION +CYASSL_X509_LOOKUP cyassl/ssl.h /^typedef struct CYASSL_X509_LOOKUP CYASSL_X509_LOOKUP;$/;" t typeref:struct:CYASSL_X509_LOOKUP +CYASSL_X509_LOOKUP_METHOD cyassl/ssl.h /^typedef struct CYASSL_X509_LOOKUP_METHOD CYASSL_X509_LOOKUP_METHOD;$/;" t typeref:struct:CYASSL_X509_LOOKUP_METHOD +CYASSL_X509_NAME cyassl/internal.h /^struct CYASSL_X509_NAME {$/;" s +CYASSL_X509_NAME cyassl/ssl.h /^typedef struct CYASSL_X509_NAME CYASSL_X509_NAME;$/;" t typeref:struct:CYASSL_X509_NAME +CYASSL_X509_OBJECT cyassl/ssl.h /^typedef struct CYASSL_X509_OBJECT {$/;" s +CYASSL_X509_OBJECT cyassl/ssl.h /^} CYASSL_X509_OBJECT;$/;" t typeref:struct:CYASSL_X509_OBJECT +CYASSL_X509_REVOKED cyassl/ssl.h /^typedef struct CYASSL_X509_REVOKED {$/;" s +CYASSL_X509_REVOKED cyassl/ssl.h /^} CYASSL_X509_REVOKED;$/;" t typeref:struct:CYASSL_X509_REVOKED +CYASSL_X509_STORE cyassl/ssl.h /^typedef struct CYASSL_X509_STORE {$/;" s +CYASSL_X509_STORE cyassl/ssl.h /^} CYASSL_X509_STORE;$/;" t typeref:struct:CYASSL_X509_STORE +CYASSL_X509_STORE_CTX cyassl/ssl.h /^typedef struct CYASSL_X509_STORE_CTX {$/;" s +CYASSL_X509_STORE_CTX cyassl/ssl.h /^} CYASSL_X509_STORE_CTX;$/;" t typeref:struct:CYASSL_X509_STORE_CTX +CYASSL_const_DES_cblock cyassl/openssl/des.h /^typedef \/* const *\/ CYASSL_DES_cblock CYASSL_const_DES_cblock;$/;" t +CYASSL_dynlock_value cyassl/ssl.h /^typedef struct CYASSL_dynlock_value CYASSL_dynlock_value;$/;" t typeref:struct:CYASSL_dynlock_value +CYA_Log_Levels cyassl/ctaocrypt/logging.h /^enum CYA_Log_Levels {$/;" g +CYGPATH_W Makefile /^CYGPATH_W = echo$/;" m +CaCb cyassl/test.h /^static INLINE void CaCb(unsigned char* der, int sz, int type)$/;" f +CallbackCACache cyassl/ssl.h /^typedef void (*CallbackCACache)(unsigned char* der, int sz, int type);$/;" t +CallbackDecryptVerify cyassl/ssl.h /^typedef int (*CallbackDecryptVerify)(CYASSL* ssl, $/;" t +CallbackEccSign cyassl/ssl.h /^typedef int (*CallbackEccSign)(CYASSL* ssl, $/;" t +CallbackEccVerify cyassl/ssl.h /^typedef int (*CallbackEccVerify)(CYASSL* ssl, $/;" t +CallbackGenCookie cyassl/ssl.h /^typedef int (*CallbackGenCookie)(CYASSL* ssl, unsigned char* buf, int sz,$/;" t +CallbackIORecv cyassl/ssl.h /^typedef int (*CallbackIORecv)(CYASSL *ssl, char *buf, int sz, void *ctx);$/;" t +CallbackIOSend cyassl/ssl.h /^typedef int (*CallbackIOSend)(CYASSL *ssl, char *buf, int sz, void *ctx);$/;" t +CallbackMacEncrypt cyassl/ssl.h /^typedef int (*CallbackMacEncrypt)(CYASSL* ssl, unsigned char* macOut, $/;" t +CallbackRsaDec cyassl/ssl.h /^typedef int (*CallbackRsaDec)(CYASSL* ssl, $/;" t +CallbackRsaEnc cyassl/ssl.h /^typedef int (*CallbackRsaEnc)(CYASSL* ssl, $/;" t +CallbackRsaSign cyassl/ssl.h /^typedef int (*CallbackRsaSign)(CYASSL* ssl, $/;" t +CallbackRsaVerify cyassl/ssl.h /^typedef int (*CallbackRsaVerify)(CYASSL* ssl, $/;" t +Camellia cyassl/ctaocrypt/camellia.h /^typedef struct Camellia {$/;" s +Camellia cyassl/ctaocrypt/camellia.h /^} Camellia;$/;" t typeref:struct:Camellia +CamelliaCbcDecrypt ctaocrypt/src/camellia.c /^void CamelliaCbcDecrypt(Camellia* cam, byte* out, const byte* in, word32 sz)$/;" f +CamelliaCbcEncrypt ctaocrypt/src/camellia.c /^void CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz)$/;" f +CamelliaDecryptDirect ctaocrypt/src/camellia.c /^void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in)$/;" f +CamelliaEncryptDirect ctaocrypt/src/camellia.c /^void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in)$/;" f +CamelliaSetIV ctaocrypt/src/camellia.c /^int CamelliaSetIV(Camellia* cam, const byte* iv)$/;" f +CamelliaSetKey ctaocrypt/src/camellia.c /^int CamelliaSetKey(Camellia* cam, const byte* key, word32 len, const byte* iv)$/;" f +CamelliaSubkeyL ctaocrypt/src/camellia.c 119;" d file: +CamelliaSubkeyR ctaocrypt/src/camellia.c 120;" d file: +Camellia_DecryptBlock ctaocrypt/src/camellia.c /^static void Camellia_DecryptBlock(const int keyBitLength, $/;" f file: +Camellia_EncryptBlock ctaocrypt/src/camellia.c /^static void Camellia_EncryptBlock(const int keyBitLength, $/;" f file: +CaviumRNG_GenerateBlock ctaocrypt/src/random.c /^static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz)$/;" f file: +CaviumRsaPrivateDecrypt ctaocrypt/src/rsa.c /^static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,$/;" f file: +CaviumRsaPrivateKeyDecode ctaocrypt/src/asn.c /^static int CaviumRsaPrivateKeyDecode(const byte* input, word32* inOutIdx,$/;" f file: +CaviumRsaPublicEncrypt ctaocrypt/src/rsa.c /^static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out,$/;" f file: +CaviumRsaSSL_Sign ctaocrypt/src/rsa.c /^static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out,$/;" f file: +CaviumRsaSSL_Verify ctaocrypt/src/rsa.c /^static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out,$/;" f file: +CbMissingCRL cyassl/ssl.h /^typedef void (*CbMissingCRL)(const char* url);$/;" t +CbOCSPIO cyassl/ssl.h /^typedef int (*CbOCSPIO)(void*, const char*, int,$/;" t +CbOCSPRespFree cyassl/ssl.h /^typedef void (*CbOCSPRespFree)(void*,unsigned char*);$/;" t +Cert cyassl/ctaocrypt/asn_public.h /^typedef struct Cert {$/;" s +Cert cyassl/ctaocrypt/asn_public.h /^} Cert;$/;" t typeref:struct:Cert +CertCacheHeader src/ssl.c /^} CertCacheHeader;$/;" t typeref:struct:__anon93 file: +CertName cyassl/ctaocrypt/asn_public.h /^typedef struct CertName {$/;" s +CertName cyassl/ctaocrypt/asn_public.h /^} CertName;$/;" t typeref:struct:CertName +CertStatus cyassl/ctaocrypt/asn.h /^struct CertStatus {$/;" s +CertStatus cyassl/ctaocrypt/asn.h /^typedef struct CertStatus CertStatus;$/;" t typeref:struct:CertStatus +CertStatus cyassl/internal.h /^ typedef struct CertStatus CertStatus;$/;" t typeref:struct:CertStatus +CertType cyassl/ctaocrypt/asn_public.h /^enum CertType {$/;" g +CertificatePolicy_Sum cyassl/ctaocrypt/asn.h /^enum CertificatePolicy_Sum {$/;" g +Ch ctaocrypt/src/sha256.c 117;" d file: +Ch ctaocrypt/src/sha512.c 120;" d file: +ChangeDirBack cyassl/test.h /^static INLINE void ChangeDirBack(int x)$/;" f +CheckAck src/sniffer.c /^static int CheckAck(TcpInfo* tcpInfo, SnifferSession* session)$/;" f file: +CheckAlgo ctaocrypt/src/asn.c /^static int CheckAlgo(int first, int second, int* id, int* version)$/;" f file: +CheckAlgoV2 ctaocrypt/src/asn.c /^static int CheckAlgoV2(int oid, int* id)$/;" f file: +CheckAltNames src/internal.c /^static int CheckAltNames(DecodedCert* dCert, char* domain)$/;" f file: +CheckAvailableSize src/internal.c /^int CheckAvailableSize(CYASSL *ssl, int size)$/;" f +CheckCertCRL src/crl.c /^int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert)$/;" f +CheckCertOCSP src/ocsp.c /^int CheckCertOCSP(CYASSL_OCSP* ocsp, DecodedCert* cert)$/;" f +CheckCtcSettings cyassl/ctaocrypt/types.h 319;" d +CheckCurve ctaocrypt/src/asn.c /^ static int CheckCurve(word32 oid)$/;" f file: +CheckFastMathSettings cyassl/ctaocrypt/tfm.h 688;" d +CheckFinCapture src/sniffer.c /^static void CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo, $/;" f file: +CheckHeaders src/sniffer.c /^static int CheckHeaders(IpInfo* ipInfo, TcpInfo* tcpInfo, const byte* packet,$/;" f file: +CheckIpHdr src/sniffer.c /^static int CheckIpHdr(IpHdr* iphdr, IpInfo* info, int length, char* error)$/;" f file: +CheckPreRecord src/sniffer.c /^static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: +CheckRunTimeFastMath ctaocrypt/src/tfm.c /^word32 CheckRunTimeFastMath(void)$/;" f +CheckRunTimeSettings ctaocrypt/src/integer.c /^word32 CheckRunTimeSettings(void)$/;" f +CheckRunTimeSettings ctaocrypt/src/tfm.c /^word32 CheckRunTimeSettings(void)$/;" f +CheckSequence src/sniffer.c /^static int CheckSequence(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: +CheckSession src/sniffer.c /^static int CheckSession(IpInfo* ipInfo, TcpInfo* tcpInfo, int sslBytes,$/;" f file: +CheckTcpHdr src/sniffer.c /^static int CheckTcpHdr(TcpHdr* tcphdr, TcpInfo* info, char* error)$/;" f file: +Check_CPU_support_AES ctaocrypt/src/aes.c /^static int Check_CPU_support_AES(void)$/;" f file: +CipherRequires src/internal.c /^ static int CipherRequires(byte first, byte second, int requirement)$/;" f file: +CipherSpecs cyassl/internal.h /^typedef struct CipherSpecs {$/;" s +CipherSpecs cyassl/internal.h /^} CipherSpecs;$/;" t typeref:struct:CipherSpecs +CipherType cyassl/internal.h /^enum CipherType { stream, block, aead };$/;" g +Ciphers cyassl/internal.h /^typedef struct Ciphers {$/;" s +Ciphers cyassl/internal.h /^} Ciphers;$/;" t typeref:struct:Ciphers +CleanPreMaster src/keys.c /^static int CleanPreMaster(CYASSL* ssl)$/;" f file: +ClientCache src/ssl.c /^ static ClientRow ClientCache[SESSION_ROWS]; \/* Client Cache *\/$/;" v file: +ClientCertificateType cyassl/internal.h /^enum ClientCertificateType { $/;" g +ClientRow src/ssl.c /^ typedef struct ClientRow {$/;" s file: +ClientRow src/ssl.c /^ } ClientRow;$/;" t typeref:struct:ClientRow file: +ClientSession src/ssl.c /^ typedef struct ClientSession {$/;" s file: +ClientSession src/ssl.c /^ } ClientSession;$/;" t typeref:struct:ClientSession file: +Clients src/ssl.c /^ ClientSession Clients[SESSIONS_PER_ROW];$/;" m struct:ClientRow file: +CloseSocket cyassl/test.h 102;" d +CloseSocket cyassl/test.h 96;" d +CloseSocket cyassl/test.h 99;" d +CloseSocket src/ssl.c 6245;" d file: +CloseSocket src/ssl.c 6247;" d file: +CloseSocket src/ssl.c 6250;" d file: +CloseSocket swig/cyassl_adds.c 91;" d file: +CloseSocket swig/cyassl_adds.c 94;" d file: +CmpTimes src/ssl.c 5527;" d file: +CompareOcspReqResp ctaocrypt/src/asn.c /^int CompareOcspReqResp(OcspRequest* req, OcspResponse* resp)$/;" f +Compress ctaocrypt/src/compress.c /^int Compress(byte* out, word32 outSz, const byte* in, word32 inSz, word32 flags)$/;" f +CompressRounds src/internal.c /^static INLINE void CompressRounds(CYASSL* ssl, int rounds, const byte* dummy)$/;" f file: +ConfirmNameConstraints ctaocrypt/src/asn.c /^static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert)$/;" f file: +ConfirmSignature ctaocrypt/src/asn.c /^static int ConfirmSignature(const byte* buf, word32 bufSz,$/;" f file: +ConnectState cyassl/internal.h /^enum ConnectState {$/;" g +ConstantCompare src/internal.c /^static int ConstantCompare(const byte* a, const byte* b, int length)$/;" f file: +ContentType cyassl/internal.h /^enum ContentType {$/;" g +CopyDecodedToX509 src/internal.c /^int CopyDecodedToX509(CYASSL_X509* x509, DecodedCert* dCert)$/;" f +CopyValidity ctaocrypt/src/asn.c /^static int CopyValidity(byte* output, Cert* cert)$/;" f file: +CreateBuffer src/sniffer.c /^static PacketBuffer* CreateBuffer(word32* begin, word32 end, const byte* data,$/;" f file: +CreateProcess build-aux/ltmain.sh /^ CreateProcess(). We must quote the arguments since Win32 CreateProcess()$/;" f +CreateProcess libtool /^ CreateProcess(). We must quote the arguments since Win32 CreateProcess()$/;" f +CreateRecipientInfo ctaocrypt/src/pkcs7.c /^CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz,$/;" f +CreateSession src/sniffer.c /^static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: +Ctc_Misc cyassl/ctaocrypt/asn_public.h /^enum Ctc_Misc {$/;" g +Ctc_SigType cyassl/ctaocrypt/asn_public.h /^enum Ctc_SigType {$/;" g +CurrentDir cyassl/test.h /^static INLINE int CurrentDir(const char* str)$/;" f +CyaDTLSv1_2_client_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_2_client_method(void)$/;" f +CyaDTLSv1_2_server_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_2_server_method(void)$/;" f +CyaDTLSv1_client_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_client_method(void)$/;" f +CyaDTLSv1_server_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_server_method(void)$/;" f +CyaSSL_3des_iv src/ssl.c /^ void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset,$/;" f +CyaSSL_ASN1_INTEGER_cmp src/ssl.c /^ int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER* a,$/;" f +CyaSSL_ASN1_INTEGER_get src/ssl.c /^ long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER* i)$/;" f +CyaSSL_ASN1_TIME_print src/ssl.c /^ int CyaSSL_ASN1_TIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_TIME* asnTime)$/;" f +CyaSSL_ASN1_UTCTIME_print src/ssl.c /^ int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_UTCTIME* a)$/;" f +CyaSSL_BIO_eof src/ssl.c /^ int CyaSSL_BIO_eof(CYASSL_BIO* b)$/;" f +CyaSSL_BIO_f_base64 src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void)$/;" f +CyaSSL_BIO_f_buffer src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void)$/;" f +CyaSSL_BIO_f_ssl src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void)$/;" f +CyaSSL_BIO_flush src/ssl.c /^ int CyaSSL_BIO_flush(CYASSL_BIO* bio)$/;" f +CyaSSL_BIO_free src/ssl.c /^ int CyaSSL_BIO_free(CYASSL_BIO* bio)$/;" f +CyaSSL_BIO_free_all src/ssl.c /^ int CyaSSL_BIO_free_all(CYASSL_BIO* bio)$/;" f +CyaSSL_BIO_get_mem_data src/ssl.c /^ int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio, const byte** p)$/;" f +CyaSSL_BIO_new src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD* method)$/;" f +CyaSSL_BIO_new_mem_buf src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len)$/;" f +CyaSSL_BIO_new_socket src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int closeF)$/;" f +CyaSSL_BIO_pending src/ssl.c /^ int CyaSSL_BIO_pending(CYASSL_BIO* bio)$/;" f +CyaSSL_BIO_pop src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO* top)$/;" f +CyaSSL_BIO_printf src/ssl.c /^ int CyaSSL_BIO_printf(CYASSL_BIO* bio, const char* format, ...)$/;" f +CyaSSL_BIO_push src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO* top, CYASSL_BIO* append)$/;" f +CyaSSL_BIO_read src/ssl.c /^ int CyaSSL_BIO_read(CYASSL_BIO* bio, void* buf, int len)$/;" f +CyaSSL_BIO_s_mem src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void)$/;" f +CyaSSL_BIO_set_flags src/ssl.c /^ void CyaSSL_BIO_set_flags(CYASSL_BIO* bio, int flags)$/;" f +CyaSSL_BIO_set_ssl src/ssl.c /^ long CyaSSL_BIO_set_ssl(CYASSL_BIO* b, CYASSL* ssl, int closeF)$/;" f +CyaSSL_BIO_set_write_buffer_size src/ssl.c /^ long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO* bio, long size)$/;" f +CyaSSL_BIO_write src/ssl.c /^ int CyaSSL_BIO_write(CYASSL_BIO* bio, const void* data, int len)$/;" f +CyaSSL_BN_CTX_free src/ssl.c /^ void CyaSSL_BN_CTX_free(CYASSL_BN_CTX* ctx)$/;" f +CyaSSL_BN_CTX_init src/ssl.c /^ void CyaSSL_BN_CTX_init(CYASSL_BN_CTX* ctx)$/;" f +CyaSSL_BN_CTX_new src/ssl.c /^ CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void)$/;" f +CyaSSL_BN_bin2bn src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char* str, int len,$/;" f +CyaSSL_BN_bn2bin src/ssl.c /^ int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM* bn, unsigned char* r)$/;" f +CyaSSL_BN_bn2dec src/ssl.c /^ char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_clear_free src/ssl.c /^ void CyaSSL_BN_clear_free(CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_cmp src/ssl.c /^ int CyaSSL_BN_cmp(const CYASSL_BIGNUM* a, const CYASSL_BIGNUM* b)$/;" f +CyaSSL_BN_copy src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_dec2bn src/ssl.c /^ int CyaSSL_BN_dec2bn(CYASSL_BIGNUM** bn, const char* str)$/;" f +CyaSSL_BN_dup src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_free src/ssl.c /^ void CyaSSL_BN_free(CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_hex2bn src/ssl.c /^ int CyaSSL_BN_hex2bn(CYASSL_BIGNUM** bn, const char* str)$/;" f +CyaSSL_BN_is_bit_set src/ssl.c /^ int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM* bn, int n)$/;" f +CyaSSL_BN_is_odd src/ssl.c /^ int CyaSSL_BN_is_odd(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_is_one src/ssl.c /^ int CyaSSL_BN_is_one(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_is_zero src/ssl.c /^ int CyaSSL_BN_is_zero(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_mod src/ssl.c /^ int CyaSSL_BN_mod(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a,$/;" f +CyaSSL_BN_new src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_new(void)$/;" f +CyaSSL_BN_num_bits src/ssl.c /^ int CyaSSL_BN_num_bits(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_num_bytes src/ssl.c /^ int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM* bn)$/;" f +CyaSSL_BN_rand src/ssl.c /^ int CyaSSL_BN_rand(CYASSL_BIGNUM* bn, int bits, int top, int bottom)$/;" f +CyaSSL_BN_set_word src/ssl.c /^ int CyaSSL_BN_set_word(CYASSL_BIGNUM* bn, unsigned long w)$/;" f +CyaSSL_BN_sub src/ssl.c /^ int CyaSSL_BN_sub(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a,$/;" f +CyaSSL_BN_value_one src/ssl.c /^ const CYASSL_BIGNUM* CyaSSL_BN_value_one(void)$/;" f +CyaSSL_CIPHER_description src/ssl.c /^ char* CyaSSL_CIPHER_description(CYASSL_CIPHER* cipher, char* in, int len)$/;" f +CyaSSL_CIPHER_get_name src/ssl.c /^ const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher)$/;" f +CyaSSL_COMP_add_compression_method src/ssl.c /^ int CyaSSL_COMP_add_compression_method(int method, void* data)$/;" f +CyaSSL_COMP_rle src/ssl.c /^ CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void)$/;" f +CyaSSL_COMP_zlib src/ssl.c /^ CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void)$/;" f +CyaSSL_CTX_DisableCRL src/ssl.c /^int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_DisableOCSP src/ssl.c /^int CyaSSL_CTX_DisableOCSP(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_EnableCRL src/ssl.c /^int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options)$/;" f +CyaSSL_CTX_EnableOCSP src/ssl.c /^int CyaSSL_CTX_EnableOCSP(CYASSL_CTX* ctx, int options)$/;" f +CyaSSL_CTX_LoadCRL src/ssl.c /^int CyaSSL_CTX_LoadCRL(CYASSL_CTX* ctx, const char* path, int type, int monitor)$/;" f +CyaSSL_CTX_SNI_SetOptions src/ssl.c /^void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, byte type, byte options)$/;" f +CyaSSL_CTX_SetCACb src/ssl.c /^void CyaSSL_CTX_SetCACb(CYASSL_CTX* ctx, CallbackCACache cb)$/;" f +CyaSSL_CTX_SetCRL_Cb src/ssl.c /^int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX* ctx, CbMissingCRL cb)$/;" f +CyaSSL_CTX_SetDecryptVerifyCb src/ssl.c /^void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX* ctx, CallbackDecryptVerify cb)$/;" f +CyaSSL_CTX_SetEccSignCb src/ssl.c /^void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX* ctx, CallbackEccSign cb)$/;" f +CyaSSL_CTX_SetEccVerifyCb src/ssl.c /^void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX* ctx, CallbackEccVerify cb)$/;" f +CyaSSL_CTX_SetGenCookie src/io.c /^CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX* ctx, CallbackGenCookie cb)$/;" f +CyaSSL_CTX_SetMacEncryptCb src/ssl.c /^void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX* ctx, CallbackMacEncrypt cb)$/;" f +CyaSSL_CTX_SetOCSP_Cb src/ssl.c /^int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_SetOCSP_OverrideURL src/ssl.c /^int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX* ctx, const char* url)$/;" f +CyaSSL_CTX_SetRsaDecCb src/ssl.c /^void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX* ctx, CallbackRsaDec cb)$/;" f +CyaSSL_CTX_SetRsaEncCb src/ssl.c /^void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX* ctx, CallbackRsaEnc cb)$/;" f +CyaSSL_CTX_SetRsaSignCb src/ssl.c /^void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX* ctx, CallbackRsaSign cb)$/;" f +CyaSSL_CTX_SetRsaVerifyCb src/ssl.c /^void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX* ctx, CallbackRsaVerify cb)$/;" f +CyaSSL_CTX_SetTmpDH src/ssl.c /^ int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, const unsigned char* p, int pSz,$/;" f +CyaSSL_CTX_SetTmpDH_buffer src/ssl.c /^int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, const unsigned char* buf,$/;" f +CyaSSL_CTX_SetTmpDH_file src/ssl.c /^int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX* ctx, const char* fname, int format)$/;" f +CyaSSL_CTX_SetTmpEC_DHE_Sz src/ssl.c /^int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX* ctx, word16 sz)$/;" f +CyaSSL_CTX_UnloadCAs src/ssl.c /^ int CyaSSL_CTX_UnloadCAs(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_UseCavium src/ssl.c /^int CyaSSL_CTX_UseCavium(CYASSL_CTX* ctx, int devId)$/;" f +CyaSSL_CTX_UseMaxFragment src/ssl.c /^int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, byte mfl)$/;" f +CyaSSL_CTX_UseSNI src/ssl.c /^int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, byte type, const void* data, word16 size)$/;" f +CyaSSL_CTX_UseSupportedCurve src/ssl.c /^int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, word16 name)$/;" f +CyaSSL_CTX_UseTruncatedHMAC src/ssl.c /^int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_check_private_key src/ssl.c /^int CyaSSL_CTX_check_private_key(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_der_load_verify_locations src/ssl.c /^int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX* ctx, const char* file,$/;" f +CyaSSL_CTX_free src/ssl.c /^void CyaSSL_CTX_free(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_get_cert_cache_memsize src/ssl.c /^int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_get_ex_data src/ssl.c /^ void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX* ctx, int d)$/;" f +CyaSSL_CTX_get_ex_new_index src/ssl.c /^ int CyaSSL_CTX_get_ex_new_index(long idx, void* arg, void* a, void* b,$/;" f +CyaSSL_CTX_get_mode src/ssl.c /^ long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_load_verify_buffer src/ssl.c /^ int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX* ctx, const unsigned char* in,$/;" f +CyaSSL_CTX_load_verify_locations src/ssl.c /^int CyaSSL_CTX_load_verify_locations(CYASSL_CTX* ctx, const char* file,$/;" f +CyaSSL_CTX_memrestore_cert_cache src/ssl.c /^int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX* ctx, const void* mem, int sz)$/;" f +CyaSSL_CTX_memsave_cert_cache src/ssl.c /^int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX* ctx, void* mem, int sz, int* used)$/;" f +CyaSSL_CTX_new src/ssl.c /^CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD* method)$/;" f +CyaSSL_CTX_restore_cert_cache src/ssl.c /^int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX* ctx, const char* fname)$/;" f +CyaSSL_CTX_save_cert_cache src/ssl.c /^int CyaSSL_CTX_save_cert_cache(CYASSL_CTX* ctx, const char* fname)$/;" f +CyaSSL_CTX_sess_accept src/ssl.c /^ long CyaSSL_CTX_sess_accept(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_accept_good src/ssl.c /^ long CyaSSL_CTX_sess_accept_good(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_accept_renegotiate src/ssl.c /^ long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_cache_full src/ssl.c /^ long CyaSSL_CTX_sess_cache_full(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_cb_hits src/ssl.c /^ long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_connect src/ssl.c /^ long CyaSSL_CTX_sess_connect(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_connect_good src/ssl.c /^ long CyaSSL_CTX_sess_connect_good(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_connect_renegotiate src/ssl.c /^ long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_get_cache_size src/ssl.c /^ long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_hits src/ssl.c /^ long CyaSSL_CTX_sess_hits(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_misses src/ssl.c /^ long CyaSSL_CTX_sess_misses(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_number src/ssl.c /^ long CyaSSL_CTX_sess_number(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_sess_set_cache_size src/ssl.c /^ long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX* ctx, long sz)$/;" f +CyaSSL_CTX_sess_set_get_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_sess_set_new_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_sess_set_remove_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX* ctx, void (*f)(CYASSL_CTX*,$/;" f +CyaSSL_CTX_sess_timeouts src/ssl.c /^ long CyaSSL_CTX_sess_timeouts(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_set_cipher_list src/ssl.c /^int CyaSSL_CTX_set_cipher_list(CYASSL_CTX* ctx, const char* list)$/;" f +CyaSSL_CTX_set_client_CA_list src/ssl.c /^ void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_default_passwd_cb src/ssl.c /^ void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX* ctx, pem_password_cb cb)$/;" f +CyaSSL_CTX_set_default_passwd_cb_userdata src/ssl.c /^ void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_default_read_ahead src/ssl.c /^ void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m)$/;" f +CyaSSL_CTX_set_default_verify_paths src/ssl.c /^ int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_set_ex_data src/ssl.c /^ int CyaSSL_CTX_set_ex_data(CYASSL_CTX* ctx, int d, void* p)$/;" f +CyaSSL_CTX_set_group_messages src/ssl.c /^int CyaSSL_CTX_set_group_messages(CYASSL_CTX* ctx)$/;" f +CyaSSL_CTX_set_info_callback src/ssl.c /^ void CyaSSL_CTX_set_info_callback(CYASSL_CTX* ctx, void (*f)(void))$/;" f +CyaSSL_CTX_set_mode src/ssl.c /^ long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode)$/;" f +CyaSSL_CTX_set_options src/ssl.c /^ long CyaSSL_CTX_set_options(CYASSL_CTX* ctx, long opt)$/;" f +CyaSSL_CTX_set_psk_client_callback src/ssl.c /^ void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_psk_server_callback src/ssl.c /^ void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_quiet_shutdown src/ssl.c /^ void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX* ctx, int mode)$/;" f +CyaSSL_CTX_set_session_cache_mode src/ssl.c /^long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX* ctx, long mode)$/;" f +CyaSSL_CTX_set_session_id_context src/ssl.c /^ int CyaSSL_CTX_set_session_id_context(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_timeout src/ssl.c /^int CyaSSL_CTX_set_timeout(CYASSL_CTX* ctx, unsigned int to)$/;" f +CyaSSL_CTX_set_tmp_rsa_callback src/ssl.c /^ void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_set_verify src/ssl.c /^void CyaSSL_CTX_set_verify(CYASSL_CTX* ctx, int mode, VerifyCallback vc)$/;" f +CyaSSL_CTX_use_NTRUPrivateKey_file src/ssl.c /^int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX* ctx, const char* file)$/;" f +CyaSSL_CTX_use_PrivateKey_buffer src/ssl.c /^ int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_use_PrivateKey_file src/ssl.c /^int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX* ctx, const char* file,int format)$/;" f +CyaSSL_CTX_use_RSAPrivateKey_file src/ssl.c /^ int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX* ctx,const char* file,$/;" f +CyaSSL_CTX_use_certificate_buffer src/ssl.c /^ int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_use_certificate_chain_buffer src/ssl.c /^ int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX* ctx,$/;" f +CyaSSL_CTX_use_certificate_chain_file src/ssl.c /^int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX* ctx, const char* file)$/;" f +CyaSSL_CTX_use_certificate_file src/ssl.c /^int CyaSSL_CTX_use_certificate_file(CYASSL_CTX* ctx, const char* file,$/;" f +CyaSSL_CTX_use_psk_identity_hint src/ssl.c /^ int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX* ctx, const char* hint)$/;" f +CyaSSL_CertManagerCheckCRL src/ssl.c /^int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER* cm, byte* der, int sz)$/;" f +CyaSSL_CertManagerCheckOCSP src/ssl.c /^int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER* cm, byte* der, int sz)$/;" f +CyaSSL_CertManagerDisableCRL src/ssl.c /^int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER* cm)$/;" f +CyaSSL_CertManagerDisableOCSP src/ssl.c /^int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER* cm)$/;" f +CyaSSL_CertManagerEnableCRL src/ssl.c /^int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER* cm, int options)$/;" f +CyaSSL_CertManagerEnableOCSP src/ssl.c /^int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER* cm, int options)$/;" f +CyaSSL_CertManagerFree src/ssl.c /^void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER* cm)$/;" f +CyaSSL_CertManagerLoadCA src/ssl.c /^int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER* cm, const char* file,$/;" f +CyaSSL_CertManagerLoadCRL src/ssl.c /^int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER* cm, const char* path,$/;" f +CyaSSL_CertManagerNew src/ssl.c /^CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void)$/;" f +CyaSSL_CertManagerSetCRL_Cb src/ssl.c /^int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER* cm, CbMissingCRL cb)$/;" f +CyaSSL_CertManagerSetOCSPOverrideURL src/ssl.c /^int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER* cm,$/;" f +CyaSSL_CertManagerSetOCSP_Cb src/ssl.c /^int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER* cm,$/;" f +CyaSSL_CertManagerUnloadCAs src/ssl.c /^int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm)$/;" f +CyaSSL_CertManagerVerify src/ssl.c /^int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER* cm, const char* fname,$/;" f +CyaSSL_CertManagerVerifyBuffer src/ssl.c /^int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, const byte* buff,$/;" f +CyaSSL_CertPemToDer src/ssl.c /^int CyaSSL_CertPemToDer(const unsigned char* pem, int pemSz,$/;" f +CyaSSL_Cleanup src/ssl.c /^int CyaSSL_Cleanup(void)$/;" f +CyaSSL_DES_cbc_encrypt src/ssl.c /^ void CyaSSL_DES_cbc_encrypt(const unsigned char* input,$/;" f +CyaSSL_DES_ecb_encrypt src/ssl.c /^ void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock* desa,$/;" f +CyaSSL_DES_key_sched src/ssl.c /^ int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key,$/;" f +CyaSSL_DES_ncbc_encrypt src/ssl.c /^ void CyaSSL_DES_ncbc_encrypt(const unsigned char* input,$/;" f +CyaSSL_DES_set_key_unchecked src/ssl.c /^ void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock* myDes,$/;" f +CyaSSL_DES_set_odd_parity src/ssl.c /^ void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock* myDes)$/;" f +CyaSSL_DH_compute_key src/ssl.c /^ int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* otherPub,$/;" f +CyaSSL_DH_free src/ssl.c /^ void CyaSSL_DH_free(CYASSL_DH* dh)$/;" f +CyaSSL_DH_generate_key src/ssl.c /^ int CyaSSL_DH_generate_key(CYASSL_DH* dh)$/;" f +CyaSSL_DH_new src/ssl.c /^ CYASSL_DH* CyaSSL_DH_new(void)$/;" f +CyaSSL_DH_size src/ssl.c /^ int CyaSSL_DH_size(CYASSL_DH* dh)$/;" f +CyaSSL_DSA_LoadDer src/ssl.c /^int CyaSSL_DSA_LoadDer(CYASSL_DSA* dsa, const unsigned char* der, int derSz)$/;" f +CyaSSL_DSA_do_sign src/ssl.c /^ int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet,$/;" f +CyaSSL_DSA_free src/ssl.c /^ void CyaSSL_DSA_free(CYASSL_DSA* dsa)$/;" f +CyaSSL_DSA_generate_key src/ssl.c /^ int CyaSSL_DSA_generate_key(CYASSL_DSA* dsa)$/;" f +CyaSSL_DSA_generate_parameters_ex src/ssl.c /^ int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA* dsa, int bits,$/;" f +CyaSSL_DSA_new src/ssl.c /^ CYASSL_DSA* CyaSSL_DSA_new(void)$/;" f +CyaSSL_Debugging_OFF ctaocrypt/src/logging.c /^void CyaSSL_Debugging_OFF(void)$/;" f +CyaSSL_Debugging_ON ctaocrypt/src/logging.c /^int CyaSSL_Debugging_ON(void)$/;" f +CyaSSL_DisableCRL src/ssl.c /^int CyaSSL_DisableCRL(CYASSL* ssl)$/;" f +CyaSSL_DisableOCSP src/ssl.c /^int CyaSSL_DisableOCSP(CYASSL* ssl)$/;" f +CyaSSL_ERR_GET_REASON src/ssl.c /^ int CyaSSL_ERR_GET_REASON(int err)$/;" f +CyaSSL_ERR_clear_error src/ssl.c /^ void CyaSSL_ERR_clear_error(void)$/;" f +CyaSSL_ERR_error_string src/ssl.c /^char* CyaSSL_ERR_error_string(unsigned long errNumber, char* data)$/;" f +CyaSSL_ERR_error_string_n src/ssl.c /^void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, unsigned long len)$/;" f +CyaSSL_ERR_free_strings src/ssl.c /^ void CyaSSL_ERR_free_strings(void)$/;" f +CyaSSL_ERR_get_error src/ssl.c /^ unsigned long CyaSSL_ERR_get_error(void)$/;" f +CyaSSL_ERR_get_error_line_data src/ssl.c /^ unsigned long CyaSSL_ERR_get_error_line_data(const char** file, int* line,$/;" f +CyaSSL_ERR_peek_error src/ssl.c /^ unsigned long CyaSSL_ERR_peek_error(void)$/;" f +CyaSSL_ERR_print_errors_fp src/ssl.c /^void CyaSSL_ERR_print_errors_fp(FILE* fp, int err)$/;" f +CyaSSL_ERR_remove_state src/ssl.c /^ void CyaSSL_ERR_remove_state(unsigned long state)$/;" f +CyaSSL_EVP_BytesToKey src/ssl.c /^ int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER* type,$/;" f +CyaSSL_EVP_CIPHER_CTX_cleanup src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_CIPHER_CTX_init src/ssl.c /^ void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_CIPHER_CTX_iv_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_CIPHER_CTX_key_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_CIPHER_CTX_set_key_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx,$/;" f +CyaSSL_EVP_Cipher src/ssl.c /^ int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src,$/;" f +CyaSSL_EVP_CipherInit src/ssl.c /^ int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx,$/;" f +CyaSSL_EVP_DigestFinal src/ssl.c /^ int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md,$/;" f +CyaSSL_EVP_DigestFinal_ex src/ssl.c /^ int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, unsigned char* md,$/;" f +CyaSSL_EVP_DigestInit src/ssl.c /^ int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, const CYASSL_EVP_MD* type)$/;" f +CyaSSL_EVP_DigestUpdate src/ssl.c /^ int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data,$/;" f +CyaSSL_EVP_MD_CTX_cleanup src/ssl.c /^ int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx)$/;" f +CyaSSL_EVP_MD_CTX_init src/ssl.c /^ void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx)$/;" f +CyaSSL_EVP_MD_size src/ssl.c /^ int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* type)$/;" f +CyaSSL_EVP_PKEY_free src/ssl.c /^ void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY* key)$/;" f +CyaSSL_EVP_PKEY_get1_DSA src/ssl.c /^ CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY* key)$/;" f +CyaSSL_EVP_PKEY_get1_RSA src/ssl.c /^ CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY* key)$/;" f +CyaSSL_EVP_X_STATE src/ssl.c /^ void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_X_STATE_LEN src/ssl.c /^ int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_EVP_aes_128_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void)$/;" f +CyaSSL_EVP_aes_128_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void)$/;" f +CyaSSL_EVP_aes_192_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void)$/;" f +CyaSSL_EVP_aes_192_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void)$/;" f +CyaSSL_EVP_aes_256_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void)$/;" f +CyaSSL_EVP_aes_256_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void)$/;" f +CyaSSL_EVP_cleanup src/ssl.c /^ void CyaSSL_EVP_cleanup(void)$/;" f +CyaSSL_EVP_des_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void)$/;" f +CyaSSL_EVP_des_ede3_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void)$/;" f +CyaSSL_EVP_enc_null src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void)$/;" f +CyaSSL_EVP_get_digestbynid src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int id)$/;" f +CyaSSL_EVP_md5 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_md5(void)$/;" f +CyaSSL_EVP_rc4 src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void)$/;" f +CyaSSL_EVP_ripemd160 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void)$/;" f +CyaSSL_EVP_sha1 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void)$/;" f +CyaSSL_EVP_sha256 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void)$/;" f +CyaSSL_EVP_sha384 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void)$/;" f +CyaSSL_EVP_sha512 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void)$/;" f +CyaSSL_EnableCRL src/ssl.c /^int CyaSSL_EnableCRL(CYASSL* ssl, int options)$/;" f +CyaSSL_EnableOCSP src/ssl.c /^int CyaSSL_EnableOCSP(CYASSL* ssl, int options)$/;" f +CyaSSL_ErrorCodes cyassl/error-ssl.h /^enum CyaSSL_ErrorCodes {$/;" g +CyaSSL_Free ctaocrypt/src/memory.c /^void CyaSSL_Free(void *ptr)$/;" f +CyaSSL_FreeArrays src/ssl.c /^void CyaSSL_FreeArrays(CYASSL* ssl)$/;" f +CyaSSL_FreeX509 src/ssl.c /^ void CyaSSL_FreeX509(CYASSL_X509* x509)$/;" f +CyaSSL_Free_cb cyassl/ctaocrypt/memory.h /^typedef void (*CyaSSL_Free_cb)(void *ptr);$/;" t +CyaSSL_GetAeadMacSize src/ssl.c /^int CyaSSL_GetAeadMacSize(CYASSL* ssl)$/;" f +CyaSSL_GetBulkCipher src/ssl.c /^int CyaSSL_GetBulkCipher(CYASSL* ssl)$/;" f +CyaSSL_GetCipherBlockSize src/ssl.c /^int CyaSSL_GetCipherBlockSize(CYASSL* ssl)$/;" f +CyaSSL_GetCipherType src/ssl.c /^int CyaSSL_GetCipherType(CYASSL* ssl)$/;" f +CyaSSL_GetClientWriteIV src/ssl.c /^const byte* CyaSSL_GetClientWriteIV(CYASSL* ssl)$/;" f +CyaSSL_GetClientWriteKey src/ssl.c /^const byte* CyaSSL_GetClientWriteKey(CYASSL* ssl)$/;" f +CyaSSL_GetCookieCtx src/io.c /^CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl)$/;" f +CyaSSL_GetDecryptVerifyCtx src/ssl.c /^void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl)$/;" f +CyaSSL_GetEccSignCtx src/ssl.c /^void* CyaSSL_GetEccSignCtx(CYASSL* ssl)$/;" f +CyaSSL_GetEccVerifyCtx src/ssl.c /^void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl)$/;" f +CyaSSL_GetHmacMaxSize ctaocrypt/src/hmac.c /^int CyaSSL_GetHmacMaxSize(void)$/;" f +CyaSSL_GetHmacSize src/ssl.c /^int CyaSSL_GetHmacSize(CYASSL* ssl)$/;" f +CyaSSL_GetHmacType src/tls.c /^int CyaSSL_GetHmacType(CYASSL* ssl)$/;" f +CyaSSL_GetIOReadCtx src/io.c /^CYASSL_API void* CyaSSL_GetIOReadCtx(CYASSL* ssl)$/;" f +CyaSSL_GetIOWriteCtx src/io.c /^CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl)$/;" f +CyaSSL_GetIVSize src/ssl.c /^int CyaSSL_GetIVSize(CYASSL* ssl)$/;" f +CyaSSL_GetKeySize src/ssl.c /^int CyaSSL_GetKeySize(CYASSL* ssl)$/;" f +CyaSSL_GetMacEncryptCtx src/ssl.c /^void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl)$/;" f +CyaSSL_GetMacSecret src/ssl.c /^const byte* CyaSSL_GetMacSecret(CYASSL* ssl, int verify)$/;" f +CyaSSL_GetObjectSize src/ssl.c /^int CyaSSL_GetObjectSize(void)$/;" f +CyaSSL_GetRsaDecCtx src/ssl.c /^void* CyaSSL_GetRsaDecCtx(CYASSL* ssl)$/;" f +CyaSSL_GetRsaEncCtx src/ssl.c /^void* CyaSSL_GetRsaEncCtx(CYASSL* ssl)$/;" f +CyaSSL_GetRsaSignCtx src/ssl.c /^void* CyaSSL_GetRsaSignCtx(CYASSL* ssl)$/;" f +CyaSSL_GetRsaVerifyCtx src/ssl.c /^void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl)$/;" f +CyaSSL_GetServerWriteIV src/ssl.c /^const byte* CyaSSL_GetServerWriteIV(CYASSL* ssl)$/;" f +CyaSSL_GetServerWriteKey src/ssl.c /^const byte* CyaSSL_GetServerWriteKey(CYASSL* ssl)$/;" f +CyaSSL_GetSessionAtIndex src/ssl.c /^int CyaSSL_GetSessionAtIndex(int idx, CYASSL_SESSION* session)$/;" f +CyaSSL_GetSessionIndex src/ssl.c /^int CyaSSL_GetSessionIndex(CYASSL* ssl)$/;" f +CyaSSL_GetSide src/ssl.c /^int CyaSSL_GetSide(CYASSL* ssl)$/;" f +CyaSSL_HMAC src/ssl.c /^ unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, const void* key,$/;" f +CyaSSL_HMAC_Final src/ssl.c /^ void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash,$/;" f +CyaSSL_HMAC_Init src/ssl.c /^ void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen,$/;" f +CyaSSL_HMAC_Update src/ssl.c /^ void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, const unsigned char* data,$/;" f +CyaSSL_HMAC_cleanup src/ssl.c /^ void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx)$/;" f +CyaSSL_Init src/ssl.c /^int CyaSSL_Init(void)$/;" f +CyaSSL_IsTLSv1_1 src/ssl.c /^int CyaSSL_IsTLSv1_1(CYASSL* ssl)$/;" f +CyaSSL_KeepArrays src/ssl.c /^void CyaSSL_KeepArrays(CYASSL* ssl)$/;" f +CyaSSL_KeyPemToDer src/ssl.c /^int CyaSSL_KeyPemToDer(const unsigned char* pem, int pemSz, unsigned char* buff,$/;" f +CyaSSL_LoadCRL src/ssl.c /^int CyaSSL_LoadCRL(CYASSL* ssl, const char* path, int type, int monitor)$/;" f +CyaSSL_Logging_cb cyassl/ctaocrypt/logging.h /^typedef void (*CyaSSL_Logging_cb)(const int logLevel,$/;" t +CyaSSL_MD4_Final src/ssl.c /^ void CyaSSL_MD4_Final(unsigned char* digest, CYASSL_MD4_CTX* md4)$/;" f +CyaSSL_MD4_Init src/ssl.c /^ void CyaSSL_MD4_Init(CYASSL_MD4_CTX* md4)$/;" f +CyaSSL_MD4_Update src/ssl.c /^ void CyaSSL_MD4_Update(CYASSL_MD4_CTX* md4, const void* data,$/;" f +CyaSSL_MD5_Final src/ssl.c /^ void CyaSSL_MD5_Final(byte* input, CYASSL_MD5_CTX* md5)$/;" f +CyaSSL_MD5_Init src/ssl.c /^ void CyaSSL_MD5_Init(CYASSL_MD5_CTX* md5)$/;" f +CyaSSL_MD5_Update src/ssl.c /^ void CyaSSL_MD5_Update(CYASSL_MD5_CTX* md5, const void* input,$/;" f +CyaSSL_Malloc ctaocrypt/src/memory.c /^void* CyaSSL_Malloc(size_t size)$/;" f +CyaSSL_Malloc_cb cyassl/ctaocrypt/memory.h /^typedef void *(*CyaSSL_Malloc_cb)(size_t size);$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef OS_MUT CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef osMutexId CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef CRITICAL_SECTION CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef MUTEX_STRUCT CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef OS_MUTEX CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef RTP_MUTEX CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef TX_MUTEX CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef osMutexId CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef pthread_mutex_t CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef struct CyaSSL_Mutex {$/;" s +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef xSemaphoreHandle CyaSSL_Mutex;$/;" t +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ } CyaSSL_Mutex;$/;" t typeref:struct:CyaSSL_Mutex +CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef int CyaSSL_Mutex;$/;" t +CyaSSL_OCSP_parse_url src/ssl.c /^ int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, char** path,$/;" f +CyaSSL_OPENSSL_free src/ssl.c /^ void CyaSSL_OPENSSL_free(void* p)$/;" f +CyaSSL_PEM_def_callback src/ssl.c /^ int CyaSSL_PEM_def_callback(char* name, int num, int w, void* key)$/;" f +CyaSSL_PEM_read_bio_PrivateKey src/ssl.c /^ CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio,$/;" f +CyaSSL_PEM_write_bio_DSAPrivateKey src/ssl.c /^ int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa,$/;" f +CyaSSL_PEM_write_bio_RSAPrivateKey src/ssl.c /^ int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa,$/;" f +CyaSSL_PemCertToDer IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) $/;" f +CyaSSL_PemCertToDer src/ssl.c /^int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)$/;" f +CyaSSL_RAND_add src/ssl.c /^ void CyaSSL_RAND_add(const void* add, int len, double entropy)$/;" f +CyaSSL_RAND_bytes src/ssl.c /^ int CyaSSL_RAND_bytes(unsigned char* buf, int num)$/;" f +CyaSSL_RAND_egd src/ssl.c /^ int CyaSSL_RAND_egd(const char* path)$/;" f +CyaSSL_RAND_file_name src/ssl.c /^ const char* CyaSSL_RAND_file_name(char* fname, unsigned long len)$/;" f +CyaSSL_RAND_load_file src/ssl.c /^ int CyaSSL_RAND_load_file(const char* fname, long len)$/;" f +CyaSSL_RAND_screen src/ssl.c /^ void CyaSSL_RAND_screen(void)$/;" f +CyaSSL_RAND_seed src/ssl.c /^ int CyaSSL_RAND_seed(const void* seed, int len)$/;" f +CyaSSL_RAND_status src/ssl.c /^ int CyaSSL_RAND_status(void)$/;" f +CyaSSL_RAND_write_file src/ssl.c /^ int CyaSSL_RAND_write_file(const char* fname)$/;" f +CyaSSL_RSA_GenAdd src/ssl.c /^ int CyaSSL_RSA_GenAdd(CYASSL_RSA* rsa)$/;" f +CyaSSL_RSA_LoadDer src/ssl.c /^int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz)$/;" f +CyaSSL_RSA_blinding_on src/ssl.c /^ int CyaSSL_RSA_blinding_on(CYASSL_RSA* rsa, CYASSL_BN_CTX* bn)$/;" f +CyaSSL_RSA_free src/ssl.c /^ void CyaSSL_RSA_free(CYASSL_RSA* rsa)$/;" f +CyaSSL_RSA_generate_key src/ssl.c /^ CYASSL_RSA* CyaSSL_RSA_generate_key(int len, unsigned long bits,$/;" f +CyaSSL_RSA_generate_key_ex src/ssl.c /^ int CyaSSL_RSA_generate_key_ex(CYASSL_RSA* rsa, int bits, CYASSL_BIGNUM* bn,$/;" f +CyaSSL_RSA_new src/ssl.c /^ CYASSL_RSA* CyaSSL_RSA_new(void)$/;" f +CyaSSL_RSA_private_decrypt src/ssl.c /^ int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr,$/;" f +CyaSSL_RSA_public_decrypt src/ssl.c /^ int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from,$/;" f +CyaSSL_RSA_public_encrypt src/ssl.c /^ int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr,$/;" f +CyaSSL_RSA_sign src/ssl.c /^ int CyaSSL_RSA_sign(int type, const unsigned char* m,$/;" f +CyaSSL_RSA_size src/ssl.c /^ int CyaSSL_RSA_size(const CYASSL_RSA* rsa)$/;" f +CyaSSL_Realloc ctaocrypt/src/memory.c /^void* CyaSSL_Realloc(void *ptr, size_t size)$/;" f +CyaSSL_Realloc_cb cyassl/ctaocrypt/memory.h /^typedef void *(*CyaSSL_Realloc_cb)(void *ptr, size_t size);$/;" t +CyaSSL_SESSION_free src/ssl.c /^ void CyaSSL_SESSION_free(CYASSL_SESSION* session)$/;" f +CyaSSL_SESSION_get_peer_chain src/ssl.c /^CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session)$/;" f +CyaSSL_SESSION_get_time src/ssl.c /^ long CyaSSL_SESSION_get_time(const CYASSL_SESSION* sess)$/;" f +CyaSSL_SESSION_get_timeout src/ssl.c /^ long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION* sess)$/;" f +CyaSSL_SHA1_Final src/ssl.c /^ void CyaSSL_SHA1_Final(byte* input, CYASSL_SHA_CTX* sha)$/;" f +CyaSSL_SHA1_Init src/ssl.c /^ void CyaSSL_SHA1_Init(CYASSL_SHA_CTX* sha)$/;" f +CyaSSL_SHA1_Update src/ssl.c /^ void CyaSSL_SHA1_Update(CYASSL_SHA_CTX* sha, const void* input,$/;" f +CyaSSL_SHA256_Final src/ssl.c /^ void CyaSSL_SHA256_Final(byte* input, CYASSL_SHA256_CTX* sha)$/;" f +CyaSSL_SHA256_Init src/ssl.c /^ void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX* sha256)$/;" f +CyaSSL_SHA256_Update src/ssl.c /^ void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX* sha, const void* input,$/;" f +CyaSSL_SHA384_Final src/ssl.c /^ void CyaSSL_SHA384_Final(byte* input, CYASSL_SHA384_CTX* sha)$/;" f +CyaSSL_SHA384_Init src/ssl.c /^ void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX* sha)$/;" f +CyaSSL_SHA384_Update src/ssl.c /^ void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX* sha, const void* input,$/;" f +CyaSSL_SHA512_Final src/ssl.c /^ void CyaSSL_SHA512_Final(byte* input, CYASSL_SHA512_CTX* sha)$/;" f +CyaSSL_SHA512_Init src/ssl.c /^ void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX* sha)$/;" f +CyaSSL_SHA512_Update src/ssl.c /^ void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX* sha, const void* input,$/;" f +CyaSSL_SHA_Final src/ssl.c /^ void CyaSSL_SHA_Final(byte* input, CYASSL_SHA_CTX* sha)$/;" f +CyaSSL_SHA_Init src/ssl.c /^ void CyaSSL_SHA_Init(CYASSL_SHA_CTX* sha)$/;" f +CyaSSL_SHA_Update src/ssl.c /^ void CyaSSL_SHA_Update(CYASSL_SHA_CTX* sha, const void* input,$/;" f +CyaSSL_SNI_GetFromBuffer src/ssl.c /^int CyaSSL_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, byte type,$/;" f +CyaSSL_SNI_GetRequest src/ssl.c /^word16 CyaSSL_SNI_GetRequest(CYASSL* ssl, byte type, void** data)$/;" f +CyaSSL_SNI_SetOptions src/ssl.c /^void CyaSSL_SNI_SetOptions(CYASSL* ssl, byte type, byte options)$/;" f +CyaSSL_SNI_Status src/ssl.c /^byte CyaSSL_SNI_Status(CYASSL* ssl, byte type)$/;" f +CyaSSL_SetAllocators ctaocrypt/src/memory.c /^int CyaSSL_SetAllocators(CyaSSL_Malloc_cb mf,$/;" f +CyaSSL_SetCRL_Cb src/ssl.c /^int CyaSSL_SetCRL_Cb(CYASSL* ssl, CbMissingCRL cb)$/;" f +CyaSSL_SetCertCbCtx src/ssl.c /^void CyaSSL_SetCertCbCtx(CYASSL* ssl, void* ctx)$/;" f +CyaSSL_SetCookieCtx src/io.c /^CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetDecryptVerifyCtx src/ssl.c /^void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetEccSignCtx src/ssl.c /^void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetEccVerifyCtx src/ssl.c /^void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetIOReadCtx src/io.c /^CYASSL_API void CyaSSL_SetIOReadCtx(CYASSL* ssl, void *rctx)$/;" f +CyaSSL_SetIOReadFlags src/io.c /^CYASSL_API void CyaSSL_SetIOReadFlags(CYASSL* ssl, int flags)$/;" f +CyaSSL_SetIORecv src/io.c /^CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX *ctx, CallbackIORecv CBIORecv)$/;" f +CyaSSL_SetIOSend src/io.c /^CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX *ctx, CallbackIOSend CBIOSend)$/;" f +CyaSSL_SetIOWriteCtx src/io.c /^CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *wctx)$/;" f +CyaSSL_SetIOWriteFlags src/io.c /^CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags)$/;" f +CyaSSL_SetIO_NetX src/io.c /^void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxSocket, ULONG waitOption)$/;" f +CyaSSL_SetInternalIV src/ssl.c /^ int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_SetLoggingCb ctaocrypt/src/logging.c /^int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f)$/;" f +CyaSSL_SetMacEncryptCtx src/ssl.c /^void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetOCSP_Cb src/ssl.c /^int CyaSSL_SetOCSP_Cb(CYASSL* ssl,$/;" f +CyaSSL_SetOCSP_OverrideURL src/ssl.c /^int CyaSSL_SetOCSP_OverrideURL(CYASSL* ssl, const char* url)$/;" f +CyaSSL_SetRsaDecCtx src/ssl.c /^void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetRsaEncCtx src/ssl.c /^void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetRsaSignCtx src/ssl.c /^void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetRsaVerifyCtx src/ssl.c /^void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx)$/;" f +CyaSSL_SetServerID src/ssl.c /^int CyaSSL_SetServerID(CYASSL* ssl, const byte* id, int len, int newSession)$/;" f +CyaSSL_SetTlsHmacInner src/tls.c /^int CyaSSL_SetTlsHmacInner(CYASSL* ssl, byte* inner, word32 sz, int content,$/;" f +CyaSSL_SetTmpDH src/ssl.c /^int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz,$/;" f +CyaSSL_SetTmpDH_buffer src/ssl.c /^int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, const unsigned char* buf, long sz,$/;" f +CyaSSL_SetTmpDH_buffer_wrapper src/ssl.c /^static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,$/;" f file: +CyaSSL_SetTmpDH_file src/ssl.c /^int CyaSSL_SetTmpDH_file(CYASSL* ssl, const char* fname, int format)$/;" f +CyaSSL_SetTmpDH_file_wrapper src/ssl.c /^static int CyaSSL_SetTmpDH_file_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,$/;" f file: +CyaSSL_SetTmpEC_DHE_Sz src/ssl.c /^int CyaSSL_SetTmpEC_DHE_Sz(CYASSL* ssl, word16 sz)$/;" f +CyaSSL_SetVersion src/ssl.c /^int CyaSSL_SetVersion(CYASSL* ssl, int version)$/;" f +CyaSSL_StoreExternalIV src/ssl.c /^ int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f +CyaSSL_TEST_H cyassl/test.h 4;" d +CyaSSL_UNIT_H tests/unit.h 4;" d +CyaSSL_UnloadCertsKeys src/ssl.c /^ int CyaSSL_UnloadCertsKeys(CYASSL* ssl)$/;" f +CyaSSL_UseCavium src/ssl.c /^int CyaSSL_UseCavium(CYASSL* ssl, int devId)$/;" f +CyaSSL_UseMaxFragment src/ssl.c /^int CyaSSL_UseMaxFragment(CYASSL* ssl, byte mfl)$/;" f +CyaSSL_UseSNI src/ssl.c /^int CyaSSL_UseSNI(CYASSL* ssl, byte type, const void* data, word16 size)$/;" f +CyaSSL_UseSupportedCurve src/ssl.c /^int CyaSSL_UseSupportedCurve(CYASSL* ssl, word16 name)$/;" f +CyaSSL_UseTruncatedHMAC src/ssl.c /^int CyaSSL_UseTruncatedHMAC(CYASSL* ssl)$/;" f +CyaSSL_X509_CRL_get_REVOKED src/ssl.c /^ CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL* crl)$/;" f +CyaSSL_X509_CRL_get_lastUpdate src/ssl.c /^ CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL* crl)$/;" f +CyaSSL_X509_CRL_get_nextUpdate src/ssl.c /^ CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL* crl)$/;" f +CyaSSL_X509_CRL_verify src/ssl.c /^ int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL* crl, CYASSL_EVP_PKEY* key)$/;" f +CyaSSL_X509_LOOKUP_add_dir src/ssl.c /^ int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP* lookup, const char* dir,$/;" f +CyaSSL_X509_LOOKUP_file src/ssl.c /^ CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void)$/;" f +CyaSSL_X509_LOOKUP_hash_dir src/ssl.c /^ CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void)$/;" f +CyaSSL_X509_LOOKUP_load_file src/ssl.c /^ int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP* lookup,$/;" f +CyaSSL_X509_NAME_entry_count src/ssl.c /^ int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME* name)$/;" f +CyaSSL_X509_NAME_get_text_by_NID src/ssl.c /^ int CyaSSL_X509_NAME_get_text_by_NID(CYASSL_X509_NAME* name,$/;" f +CyaSSL_X509_NAME_oneline src/ssl.c /^ char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME* name, char* in, int sz)$/;" f +CyaSSL_X509_OBJECT_free_contents src/ssl.c /^ void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT* obj)$/;" f +CyaSSL_X509_STORE_CTX_cleanup src/ssl.c /^ void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX* ctx)$/;" f +CyaSSL_X509_STORE_CTX_free src/ssl.c /^ void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX* ctx)$/;" f +CyaSSL_X509_STORE_CTX_get_current_cert src/ssl.c /^ CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert($/;" f +CyaSSL_X509_STORE_CTX_get_error src/ssl.c /^ int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX* ctx)$/;" f +CyaSSL_X509_STORE_CTX_get_error_depth src/ssl.c /^ int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX* ctx)$/;" f +CyaSSL_X509_STORE_CTX_get_ex_data src/ssl.c /^ void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX* ctx, int idx)$/;" f +CyaSSL_X509_STORE_CTX_init src/ssl.c /^ int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX* ctx,$/;" f +CyaSSL_X509_STORE_CTX_new src/ssl.c /^ CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void)$/;" f +CyaSSL_X509_STORE_CTX_set_error src/ssl.c /^ void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX* ctx, int err)$/;" f +CyaSSL_X509_STORE_add_cert src/ssl.c /^ int CyaSSL_X509_STORE_add_cert(CYASSL_X509_STORE* store, CYASSL_X509* x509)$/;" f +CyaSSL_X509_STORE_add_lookup src/ssl.c /^ CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE* store,$/;" f +CyaSSL_X509_STORE_free src/ssl.c /^ void CyaSSL_X509_STORE_free(CYASSL_X509_STORE* store)$/;" f +CyaSSL_X509_STORE_get_by_subject src/ssl.c /^ int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX* ctx, int idx,$/;" f +CyaSSL_X509_STORE_new src/ssl.c /^ CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void)$/;" f +CyaSSL_X509_STORE_set_default_paths src/ssl.c /^ int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE* store)$/;" f +CyaSSL_X509_cmp_current_time src/ssl.c /^ int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME* asnTime)$/;" f +CyaSSL_X509_d2i src/ssl.c /^CYASSL_X509* CyaSSL_X509_d2i(CYASSL_X509** x509, const byte* in, int len)$/;" f +CyaSSL_X509_d2i_fp src/ssl.c /^CYASSL_X509* CyaSSL_X509_d2i_fp(CYASSL_X509** x509, XFILE file)$/;" f +CyaSSL_X509_ext_get_critical_by_NID src/ssl.c /^ int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509* x509, int nid)$/;" f +CyaSSL_X509_ext_isSet_by_NID src/ssl.c /^ int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509* x509, int nid)$/;" f +CyaSSL_X509_free src/ssl.c /^ void CyaSSL_X509_free(CYASSL_X509* buf)$/;" f +CyaSSL_X509_get_authorityKeyID src/ssl.c /^ byte* CyaSSL_X509_get_authorityKeyID($/;" f +CyaSSL_X509_get_der src/ssl.c /^ const byte* CyaSSL_X509_get_der(CYASSL_X509* x509, int* outSz)$/;" f +CyaSSL_X509_get_device_type src/ssl.c /^byte* CyaSSL_X509_get_device_type(CYASSL_X509* x509, byte* in, int *inOutSz)$/;" f +CyaSSL_X509_get_hw_serial_number src/ssl.c /^byte* CyaSSL_X509_get_hw_serial_number(CYASSL_X509* x509,byte* in,int* inOutSz)$/;" f +CyaSSL_X509_get_hw_type src/ssl.c /^byte* CyaSSL_X509_get_hw_type(CYASSL_X509* x509, byte* in, int* inOutSz)$/;" f +CyaSSL_X509_get_isCA src/ssl.c /^ int CyaSSL_X509_get_isCA(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_isSet_pathLength src/ssl.c /^ int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_issuer_name src/ssl.c /^ CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509* cert)$/;" f +CyaSSL_X509_get_keyUsage src/ssl.c /^ unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_next_altname src/ssl.c /^ char* CyaSSL_X509_get_next_altname(CYASSL_X509* cert)$/;" f +CyaSSL_X509_get_pathLength src/ssl.c /^ word32 CyaSSL_X509_get_pathLength(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_pubkey src/ssl.c /^ CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_serialNumber src/ssl.c /^ CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_serial_number src/ssl.c /^ int CyaSSL_X509_get_serial_number(CYASSL_X509* x509, byte* in, int* inOutSz)$/;" f +CyaSSL_X509_get_signature src/ssl.c /^ int CyaSSL_X509_get_signature(CYASSL_X509* x509,$/;" f +CyaSSL_X509_get_signature_type src/ssl.c /^ int CyaSSL_X509_get_signature_type(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_subjectCN src/ssl.c /^ char* CyaSSL_X509_get_subjectCN(CYASSL_X509* x509)$/;" f +CyaSSL_X509_get_subjectKeyID src/ssl.c /^ byte* CyaSSL_X509_get_subjectKeyID($/;" f +CyaSSL_X509_get_subject_name src/ssl.c /^ CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509* cert)$/;" f +CyaSSL_X509_load_certificate_file src/ssl.c /^CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format)$/;" f +CyaSSL_X509_notAfter src/ssl.c /^ const byte* CyaSSL_X509_notAfter(CYASSL_X509* x509)$/;" f +CyaSSL_X509_notBefore src/ssl.c /^ const byte* CyaSSL_X509_notBefore(CYASSL_X509* x509)$/;" f +CyaSSL_X509_verify_cert src/ssl.c /^ int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX* ctx)$/;" f +CyaSSL_X509_verify_cert_error_string src/ssl.c /^ const char* CyaSSL_X509_verify_cert_error_string(long err)$/;" f +CyaSSL_X509_version src/ssl.c /^ int CyaSSL_X509_version(CYASSL_X509* x509)$/;" f +CyaSSL_accept src/ssl.c /^ int CyaSSL_accept(CYASSL* ssl)$/;" f +CyaSSL_accept_ex src/ssl.c /^ int CyaSSL_accept_ex(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f +CyaSSL_add_all_algorithms src/ssl.c /^ int CyaSSL_add_all_algorithms(void)$/;" f +CyaSSL_aes_ctr_iv src/ssl.c /^ void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset,$/;" f +CyaSSL_alert_desc_string_long src/ssl.c /^ char* CyaSSL_alert_desc_string_long(int alertID)$/;" f +CyaSSL_alert_type_string_long src/ssl.c /^ char* CyaSSL_alert_type_string_long(int alertID)$/;" f +CyaSSL_cert_service src/ssl.c /^ void CyaSSL_cert_service(void) {}$/;" f +CyaSSL_check_domain_name src/ssl.c /^int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn)$/;" f +CyaSSL_cleanup_all_ex_data src/ssl.c /^ void CyaSSL_cleanup_all_ex_data(void)$/;" f +CyaSSL_cmp_peer_cert_to_file src/ssl.c /^ int CyaSSL_cmp_peer_cert_to_file(CYASSL* ssl, const char *fname)$/;" f +CyaSSL_connect src/ssl.c /^ int CyaSSL_connect(CYASSL* ssl)$/;" f +CyaSSL_connect_cert src/ssl.c /^int CyaSSL_connect_cert(CYASSL* ssl)$/;" f +CyaSSL_connect_ex src/ssl.c /^ int CyaSSL_connect_ex(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f +CyaSSL_d2i_SSL_SESSION src/ssl.c /^ CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION** sess,$/;" f +CyaSSL_dtls IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f +CyaSSL_dtls IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f +CyaSSL_dtls src/ssl.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f +CyaSSL_dtls_get_current_timeout src/ssl.c /^int CyaSSL_dtls_get_current_timeout(CYASSL* ssl)$/;" f +CyaSSL_dtls_get_peer src/ssl.c /^int CyaSSL_dtls_get_peer(CYASSL* ssl, void* peer, unsigned int* peerSz)$/;" f +CyaSSL_dtls_got_timeout src/ssl.c /^int CyaSSL_dtls_got_timeout(CYASSL* ssl)$/;" f +CyaSSL_dtls_set_peer src/ssl.c /^int CyaSSL_dtls_set_peer(CYASSL* ssl, void* peer, unsigned int peerSz)$/;" f +CyaSSL_dtls_set_timeout_init src/ssl.c /^int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int timeout)$/;" f +CyaSSL_dtls_set_timeout_max src/ssl.c /^int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int timeout)$/;" f +CyaSSL_error_string swig/cyassl_adds.c /^char* CyaSSL_error_string(int err)$/;" f +CyaSSL_ex_wrapper src/ssl.c /^ static int CyaSSL_ex_wrapper(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f file: +CyaSSL_flush_sessions src/ssl.c /^void CyaSSL_flush_sessions(CYASSL_CTX* ctx, long tm)$/;" f +CyaSSL_fopen IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^FILE * CyaSSL_fopen(const char *name, const char *openmode) $/;" f +CyaSSL_fopen IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^FILE * CyaSSL_fopen(const char *name, const char *openmode) $/;" f +CyaSSL_free src/ssl.c /^void CyaSSL_free(CYASSL* ssl)$/;" f +CyaSSL_get1_session src/ssl.c /^ CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl) \/* what's ref count *\/$/;" f +CyaSSL_get_alert_history src/ssl.c /^int CyaSSL_get_alert_history(CYASSL* ssl, CYASSL_ALERT_HISTORY *h)$/;" f +CyaSSL_get_chain_X509 src/ssl.c /^CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN* chain, int idx)$/;" f +CyaSSL_get_chain_cert src/ssl.c /^byte* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN* chain, int idx)$/;" f +CyaSSL_get_chain_cert_pem src/ssl.c /^int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN* chain, int idx,$/;" f +CyaSSL_get_chain_count src/ssl.c /^int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain)$/;" f +CyaSSL_get_chain_length src/ssl.c /^int CyaSSL_get_chain_length(CYASSL_X509_CHAIN* chain, int idx)$/;" f +CyaSSL_get_cipher src/ssl.c /^ const char* CyaSSL_get_cipher(CYASSL* ssl)$/;" f +CyaSSL_get_current_cipher src/ssl.c /^ CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL* ssl)$/;" f +CyaSSL_get_current_cipher_suite src/ssl.c /^ int CyaSSL_get_current_cipher_suite(CYASSL* ssl)$/;" f +CyaSSL_get_error src/ssl.c /^int CyaSSL_get_error(CYASSL* ssl, int ret)$/;" f +CyaSSL_get_ex_data src/ssl.c /^ void* CyaSSL_get_ex_data(const CYASSL* ssl, int idx)$/;" f +CyaSSL_get_ex_data_X509_STORE_CTX_idx src/ssl.c /^ int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void)$/;" f +CyaSSL_get_ex_new_index src/ssl.c /^ int CyaSSL_get_ex_new_index(long idx, void* data, void* cb1, void* cb2,$/;" f +CyaSSL_get_fd src/ssl.c /^int CyaSSL_get_fd(const CYASSL* ssl)$/;" f +CyaSSL_get_keyblock_size src/ssl.c /^ int CyaSSL_get_keyblock_size(CYASSL* ssl)$/;" f +CyaSSL_get_keys src/ssl.c /^ int CyaSSL_get_keys(CYASSL* ssl, unsigned char** ms, unsigned int* msLen,$/;" f +CyaSSL_get_peer_certificate src/ssl.c /^ CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl)$/;" f +CyaSSL_get_peer_chain src/ssl.c /^CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl)$/;" f +CyaSSL_get_psk_identity src/ssl.c /^ const char* CyaSSL_get_psk_identity(const CYASSL* ssl)$/;" f +CyaSSL_get_psk_identity_hint src/ssl.c /^ const char* CyaSSL_get_psk_identity_hint(const CYASSL* ssl)$/;" f +CyaSSL_get_session src/ssl.c /^CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl)$/;" f +CyaSSL_get_sessionID src/ssl.c /^const byte* CyaSSL_get_sessionID(const CYASSL_SESSION* session)$/;" f +CyaSSL_get_session_cache_memsize src/ssl.c /^int CyaSSL_get_session_cache_memsize(void)$/;" f +CyaSSL_get_shutdown src/ssl.c /^ int CyaSSL_get_shutdown(const CYASSL* ssl)$/;" f +CyaSSL_get_using_nonblock IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f +CyaSSL_get_using_nonblock IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f +CyaSSL_get_using_nonblock src/ssl.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f +CyaSSL_get_version src/ssl.c /^ const char* CyaSSL_get_version(CYASSL* ssl)$/;" f +CyaSSL_i2d_SSL_SESSION src/ssl.c /^ int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION* sess, unsigned char** p)$/;" f +CyaSSL_is_init_finished src/ssl.c /^ int CyaSSL_is_init_finished(CYASSL* ssl)$/;" f +CyaSSL_library_init src/ssl.c /^int CyaSSL_library_init(void)$/;" f +CyaSSL_load_error_strings src/ssl.c /^void CyaSSL_load_error_strings(void) \/* compatibility only *\/$/;" f +CyaSSL_make_eap_keys src/tls.c /^int CyaSSL_make_eap_keys(CYASSL* ssl, void* msk, unsigned int len,$/;" f +CyaSSL_mask_bits src/ssl.c /^ int CyaSSL_mask_bits(CYASSL_BIGNUM* bn, int n)$/;" f +CyaSSL_memrestore_session_cache src/ssl.c /^int CyaSSL_memrestore_session_cache(const void* mem, int sz)$/;" f +CyaSSL_memsave_session_cache src/ssl.c /^int CyaSSL_memsave_session_cache(void* mem, int sz)$/;" f +CyaSSL_mt0 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v +CyaSSL_mt1 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v +CyaSSL_mt2 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v +CyaSSL_mt3 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v +CyaSSL_mt4 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v +CyaSSL_mt5 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v +CyaSSL_mt6 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v +CyaSSL_mt7 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v +CyaSSL_mt8 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v +CyaSSL_mt9 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt9) ; $/;" v +CyaSSL_negotiate src/ssl.c /^int CyaSSL_negotiate(CYASSL* ssl)$/;" f +CyaSSL_new src/ssl.c /^CYASSL* CyaSSL_new(CYASSL_CTX* ctx)$/;" f +CyaSSL_num_locks src/ssl.c /^ int CyaSSL_num_locks(void)$/;" f +CyaSSL_peek src/ssl.c /^int CyaSSL_peek(CYASSL* ssl, void* data, int sz)$/;" f +CyaSSL_pending src/ssl.c /^int CyaSSL_pending(CYASSL* ssl)$/;" f +CyaSSL_read src/ssl.c /^int CyaSSL_read(CYASSL* ssl, void* data, int sz)$/;" f +CyaSSL_read_internal src/ssl.c /^static int CyaSSL_read_internal(CYASSL* ssl, void* data, int sz, int peek)$/;" f file: +CyaSSL_recv src/ssl.c /^int CyaSSL_recv(CYASSL* ssl, void* data, int sz, int flags)$/;" f +CyaSSL_restore_session_cache src/ssl.c /^int CyaSSL_restore_session_cache(const char *fname)$/;" f +CyaSSL_save_session_cache src/ssl.c /^int CyaSSL_save_session_cache(const char *fname)$/;" f +CyaSSL_send src/ssl.c /^int CyaSSL_send(CYASSL* ssl, const void* data, int sz, int flags)$/;" f +CyaSSL_session_reused src/ssl.c /^ int CyaSSL_session_reused(CYASSL* ssl)$/;" f +CyaSSL_set_accept_state src/ssl.c /^ void CyaSSL_set_accept_state(CYASSL* ssl)$/;" f +CyaSSL_set_bio src/ssl.c /^ void CyaSSL_set_bio(CYASSL* ssl, CYASSL_BIO* rd, CYASSL_BIO* wr)$/;" f +CyaSSL_set_cipher_list src/ssl.c /^int CyaSSL_set_cipher_list(CYASSL* ssl, const char* list)$/;" f +CyaSSL_set_compression src/ssl.c /^int CyaSSL_set_compression(CYASSL* ssl)$/;" f +CyaSSL_set_connect_state src/ssl.c /^ void CyaSSL_set_connect_state(CYASSL* ssl)$/;" f +CyaSSL_set_dynlock_destroy_callback src/ssl.c /^ void CyaSSL_set_dynlock_destroy_callback($/;" f +CyaSSL_set_dynlock_lock_callback src/ssl.c /^ void CyaSSL_set_dynlock_lock_callback($/;" f +CyaSSL_set_ex_data src/ssl.c /^ int CyaSSL_set_ex_data(CYASSL* ssl, int idx, void* data)$/;" f +CyaSSL_set_fd src/ssl.c /^int CyaSSL_set_fd(CYASSL* ssl, int fd)$/;" f +CyaSSL_set_group_messages src/ssl.c /^int CyaSSL_set_group_messages(CYASSL* ssl)$/;" f +CyaSSL_set_id_callback src/ssl.c /^ void CyaSSL_set_id_callback(unsigned long (*f)(void))$/;" f +CyaSSL_set_locking_callback src/ssl.c /^ void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, int))$/;" f +CyaSSL_set_psk_client_callback src/ssl.c /^ void CyaSSL_set_psk_client_callback(CYASSL* ssl, psk_client_callback cb)$/;" f +CyaSSL_set_psk_server_callback src/ssl.c /^ void CyaSSL_set_psk_server_callback(CYASSL* ssl, psk_server_callback cb)$/;" f +CyaSSL_set_quiet_shutdown src/ssl.c /^ void CyaSSL_set_quiet_shutdown(CYASSL* ssl, int mode)$/;" f +CyaSSL_set_rfd src/ssl.c /^ int CyaSSL_set_rfd(CYASSL* ssl, int rfd)$/;" f +CyaSSL_set_session src/ssl.c /^int CyaSSL_set_session(CYASSL* ssl, CYASSL_SESSION* session)$/;" f +CyaSSL_set_session_id_context src/ssl.c /^ int CyaSSL_set_session_id_context(CYASSL* ssl, const unsigned char* id,$/;" f +CyaSSL_set_shutdown src/ssl.c /^ void CyaSSL_set_shutdown(CYASSL* ssl, int opt)$/;" f +CyaSSL_set_timeout src/ssl.c /^int CyaSSL_set_timeout(CYASSL* ssl, unsigned int to)$/;" f +CyaSSL_set_using_nonblock src/ssl.c /^void CyaSSL_set_using_nonblock(CYASSL* ssl, int nonblock)$/;" f +CyaSSL_set_verify src/ssl.c /^void CyaSSL_set_verify(CYASSL* ssl, int mode, VerifyCallback vc)$/;" f +CyaSSL_set_wfd src/ssl.c /^ int CyaSSL_set_wfd(CYASSL* ssl, int wfd)$/;" f +CyaSSL_shutdown src/ssl.c /^int CyaSSL_shutdown(CYASSL* ssl)$/;" f +CyaSSL_sk_X509_REVOKED_num src/ssl.c /^ int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED* revoked)$/;" f +CyaSSL_sk_X509_REVOKED_value src/ssl.c /^ CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value($/;" f +CyaSSL_sk_num src/ssl.c /^ int CyaSSL_sk_num(CYASSL_X509_REVOKED* rev)$/;" f +CyaSSL_sk_value src/ssl.c /^ void* CyaSSL_sk_value(CYASSL_X509_REVOKED* rev, int i)$/;" f +CyaSSL_state_string_long src/ssl.c /^ char* CyaSSL_state_string_long(CYASSL* ssl)$/;" f +CyaSSL_swig_connect swig/cyassl_adds.c /^int CyaSSL_swig_connect(CYASSL* ssl, const char* server, int port)$/;" f +CyaSSL_use_PrivateKey_buffer src/ssl.c /^ int CyaSSL_use_PrivateKey_buffer(CYASSL* ssl,$/;" f +CyaSSL_use_PrivateKey_file src/ssl.c /^int CyaSSL_use_PrivateKey_file(CYASSL* ssl, const char* file, int format)$/;" f +CyaSSL_use_RSAPrivateKey_file src/ssl.c /^ int CyaSSL_use_RSAPrivateKey_file(CYASSL* ssl, const char* file, int format)$/;" f +CyaSSL_use_certificate_buffer src/ssl.c /^ int CyaSSL_use_certificate_buffer(CYASSL* ssl,$/;" f +CyaSSL_use_certificate_chain_buffer src/ssl.c /^ int CyaSSL_use_certificate_chain_buffer(CYASSL* ssl,$/;" f +CyaSSL_use_certificate_chain_file src/ssl.c /^int CyaSSL_use_certificate_chain_file(CYASSL* ssl, const char* file)$/;" f +CyaSSL_use_certificate_file src/ssl.c /^int CyaSSL_use_certificate_file(CYASSL* ssl, const char* file, int format)$/;" f +CyaSSL_use_psk_identity_hint src/ssl.c /^ int CyaSSL_use_psk_identity_hint(CYASSL* ssl, const char* hint)$/;" f +CyaSSL_want_read src/ssl.c /^int CyaSSL_want_read(CYASSL* ssl)$/;" f +CyaSSL_want_write src/ssl.c /^int CyaSSL_want_write(CYASSL* ssl)$/;" f +CyaSSL_wolfSCEP src/ssl.c /^ void CyaSSL_wolfSCEP(void) {}$/;" f +CyaSSL_write src/ssl.c /^int CyaSSL_write(CYASSL* ssl, const void* data, int sz)$/;" f +CyaSSL_writev src/ssl.c /^ int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, int iovcnt)$/;" f +CyaSSLeay src/ssl.c /^ unsigned long CyaSSLeay(void)$/;" f +CyaSSLeay_version src/ssl.c /^ const char* CyaSSLeay_version(int type)$/;" f +CyaSSLv23_client_method src/tls.c /^ CYASSL_METHOD* CyaSSLv23_client_method(void)$/;" f +CyaSSLv23_server_method src/tls.c /^ CYASSL_METHOD* CyaSSLv23_server_method(void)$/;" f +CyaSSLv2_client_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv2_client_method(void)$/;" f +CyaSSLv2_server_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv2_server_method(void)$/;" f +CyaSSLv3_client_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv3_client_method(void)$/;" f +CyaSSLv3_server_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv3_server_method(void)$/;" f +CyaTLSv1_1_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_1_client_method(void)$/;" f +CyaTLSv1_1_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_1_server_method(void)$/;" f +CyaTLSv1_2_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_2_client_method(void)$/;" f +CyaTLSv1_2_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_2_server_method(void)$/;" f +CyaTLSv1_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_client_method(void)$/;" f +CyaTLSv1_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_server_method(void)$/;" f +CyasslDebug IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^static int CyasslDebug = 1 ;$/;" v file: +CyasslDebug IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^static int CyasslDebug = 1 ;$/;" v file: +Cyassl_MDK_gmtime IDE/MDK-ARM/LPC43xx/time-LCP43xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f +Cyassl_MDK_gmtime IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f +Cyassl_MDK_gmtime IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f +Cyassl_accept IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) $/;" f +Cyassl_accept IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) $/;" f +Cyassl_connect IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) $/;" f +Cyassl_connect IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) $/;" f +Cyassl_fgets IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^char * Cyassl_fgets ( char * str, int num, FILE * f ) $/;" f +Cyassl_fgets IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^char * Cyassl_fgets ( char * str, int num, FILE * f ) $/;" f +Cyassl_recv IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_recv(int sd, void *buf, size_t len, int flags) $/;" f +Cyassl_recv IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_recv(int sd, void *buf, size_t len, int flags) $/;" f +Cyassl_send IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_send(int sd, const void *buf, size_t len, int flags) $/;" f +Cyassl_send IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_send(int sd, const void *buf, size_t len, int flags) $/;" f +Cyassl_sleep IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^void Cyassl_sleep(int t) $/;" f +Cyassl_sleep IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^void Cyassl_sleep(int t) $/;" f +Cyassl_tcp_select IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_tcp_select(int sd, int timeout) $/;" f +Cyassl_tcp_select IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_tcp_select(int sd, int timeout) $/;" f +DAC_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^DAC_IRQHandler$/;" l +DATA Makefile /^DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA)$/;" m +DATA cyassl/ctaocrypt/pkcs7.h /^ DATA = 651, \/* 1.2.840.113549.1.7.1 *\/$/;" e enum:PKCS7_TYPES +DATE_E cyassl/ctaocrypt/error-crypt.h /^ DATE_E = -135, \/* setting date validity error *\/$/;" e enum:__anon61 +DBG_ARP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 41;" d file: +DBG_ARP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 35;" d file: +DBG_ARP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 35;" d file: +DBG_ARP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 35;" d file: +DBG_ARP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 35;" d file: +DBG_ARP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 35;" d file: +DBG_BSD IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 81;" d file: +DBG_BSD IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 79;" d file: +DBG_BSD IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 79;" d file: +DBG_BSD IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 79;" d file: +DBG_BSD IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 79;" d file: +DBG_BSD IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 79;" d file: +DBG_DHCP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 69;" d file: +DBG_DHCP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 63;" d file: +DBG_DHCP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 63;" d file: +DBG_DHCP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 63;" d file: +DBG_DHCP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 63;" d file: +DBG_DHCP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 63;" d file: +DBG_DNS IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 73;" d file: +DBG_DNS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 67;" d file: +DBG_DNS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 67;" d file: +DBG_DNS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 67;" d file: +DBG_DNS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 67;" d file: +DBG_DNS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 67;" d file: +DBG_ETH IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 29;" d file: +DBG_ETH IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 23;" d file: +DBG_ETH IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 23;" d file: +DBG_ETH IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 23;" d file: +DBG_ETH IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 23;" d file: +DBG_ETH IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 23;" d file: +DBG_FTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 92;" d file: +DBG_FTPC IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 96;" d file: +DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 93;" d file: +DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 93;" d file: +DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 93;" d file: +DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 93;" d file: +DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 93;" d file: +DBG_FTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 89;" d file: +DBG_FTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 89;" d file: +DBG_FTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 89;" d file: +DBG_FTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 89;" d file: +DBG_FTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 89;" d file: +DBG_HTTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 88;" d file: +DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 85;" d file: +DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 85;" d file: +DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 85;" d file: +DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 85;" d file: +DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 85;" d file: +DBG_ICMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 49;" d file: +DBG_ICMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 43;" d file: +DBG_ICMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 43;" d file: +DBG_ICMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 43;" d file: +DBG_ICMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 43;" d file: +DBG_ICMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 43;" d file: +DBG_IGMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 53;" d file: +DBG_IGMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 47;" d file: +DBG_IGMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 47;" d file: +DBG_IGMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 47;" d file: +DBG_IGMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 47;" d file: +DBG_IGMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 47;" d file: +DBG_IP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 45;" d file: +DBG_IP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 39;" d file: +DBG_IP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 39;" d file: +DBG_IP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 39;" d file: +DBG_IP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 39;" d file: +DBG_IP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 39;" d file: +DBG_MEM IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 25;" d file: +DBG_MEM IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 19;" d file: +DBG_MEM IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 19;" d file: +DBG_MEM IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 19;" d file: +DBG_MEM IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 19;" d file: +DBG_MEM IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 19;" d file: +DBG_NBNS IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 65;" d file: +DBG_NBNS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 59;" d file: +DBG_NBNS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 59;" d file: +DBG_NBNS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 59;" d file: +DBG_NBNS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 59;" d file: +DBG_NBNS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 59;" d file: +DBG_PPP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 33;" d file: +DBG_PPP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 27;" d file: +DBG_PPP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 27;" d file: +DBG_PPP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 27;" d file: +DBG_PPP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 27;" d file: +DBG_PPP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 27;" d file: +DBG_SLIP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 37;" d file: +DBG_SLIP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 31;" d file: +DBG_SLIP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 31;" d file: +DBG_SLIP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 31;" d file: +DBG_SLIP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 31;" d file: +DBG_SLIP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 31;" d file: +DBG_SMTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 112;" d file: +DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 109;" d file: +DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 109;" d file: +DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 109;" d file: +DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 109;" d file: +DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 109;" d file: +DBG_SNMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 77;" d file: +DBG_SNMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 71;" d file: +DBG_SNMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 71;" d file: +DBG_SNMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 71;" d file: +DBG_SNMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 71;" d file: +DBG_SNMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 71;" d file: +DBG_SNTP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 75;" d file: +DBG_SNTP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 75;" d file: +DBG_SNTP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 75;" d file: +DBG_SNTP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 75;" d file: +DBG_SNTP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 75;" d file: +DBG_TCP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 61;" d file: +DBG_TCP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 55;" d file: +DBG_TCP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 55;" d file: +DBG_TCP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 55;" d file: +DBG_TCP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 55;" d file: +DBG_TCP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 55;" d file: +DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 97;" d file: +DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 97;" d file: +DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 97;" d file: +DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 97;" d file: +DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 97;" d file: +DBG_TFTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 104;" d file: +DBG_TFTPC IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 108;" d file: +DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 105;" d file: +DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 105;" d file: +DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 105;" d file: +DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 105;" d file: +DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 105;" d file: +DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 101;" d file: +DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 101;" d file: +DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 101;" d file: +DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 101;" d file: +DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 101;" d file: +DBG_TIME IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 19;" d file: +DBG_TIME IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 14;" d file: +DBG_TIME IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 14;" d file: +DBG_TIME IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 14;" d file: +DBG_TIME IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 14;" d file: +DBG_TIME IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 14;" d file: +DBG_TNET IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 100;" d file: +DBG_UDP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 57;" d file: +DBG_UDP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 51;" d file: +DBG_UDP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 51;" d file: +DBG_UDP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 51;" d file: +DBG_UDP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 51;" d file: +DBG_UDP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 51;" d file: +DBP_BitNumber IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 46;" d file: +DBP_BitNumber IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 46;" d file: +DBRG_ERROR ctaocrypt/src/random.c 77;" d file: +DBRG_NEED_RESEED ctaocrypt/src/random.c 78;" d file: +DBRG_SEED_LEN cyassl/ctaocrypt/random.h 90;" d +DBRG_SUCCESS ctaocrypt/src/random.c 76;" d file: +DCMI_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DCMI_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l +DEBUG config.h 8;" d +DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 236;" d +DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 274;" d +DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 296;" d +DEBUG_CYASSL ctaocrypt/src/aes.c 67;" d file: +DEBUG_CYASSL cyassl/ctaocrypt/settings.h 449;" d +DEBUG_CYASSL cyassl/ctaocrypt/settings.h 451;" d +DECB_END_4 ctaocrypt/src/aes_asm.s /^DECB_END_4:$/;" l +DECB_LAST_4 ctaocrypt/src/aes_asm.s /^DECB_LAST_4:$/;" l +DECB_LAST_4_2 ctaocrypt/src/aes_asm.s /^DECB_LAST_4_2:$/;" l +DECB_LOOP_4 ctaocrypt/src/aes_asm.s /^DECB_LOOP_4:$/;" l +DECB_LOOP_4_2 ctaocrypt/src/aes_asm.s /^DECB_LOOP_4_2:$/;" l +DECB_NO_PARTS_4 ctaocrypt/src/aes_asm.s /^DECB_NO_PARTS_4:$/;" l +DECB_REMAINDER_4 ctaocrypt/src/aes_asm.s /^DECB_REMAINDER_4:$/;" l +DECOMPRESS_E cyassl/ctaocrypt/error-crypt.h /^ DECOMPRESS_E = -186, \/* DeCompress error *\/$/;" e enum:__anon61 +DECOMPRESS_INIT_E cyassl/ctaocrypt/error-crypt.h /^ DECOMPRESS_INIT_E = -185, \/* DeCompress init error *\/$/;" e enum:__anon61 +DECRYPT_ERROR cyassl/error-ssl.h /^ DECRYPT_ERROR = -212, \/* error during decryption *\/$/;" e enum:CyaSSL_ErrorCodes +DEFAULT_INCLUDES Makefile /^DEFAULT_INCLUDES = -I.$/;" m +DEFAULT_TIMEOUT cyassl/internal.h /^ DEFAULT_TIMEOUT = 500, \/* default resumption timeout in seconds *\/$/;" e enum:Misc +DEFLATE_DEFAULT_MEMLEVEL ctaocrypt/src/compress.c 61;" d file: +DEFLATE_DEFAULT_MEMLEVEL ctaocrypt/src/compress.c 64;" d file: +DEFLATE_DEFAULT_WINDOWBITS ctaocrypt/src/compress.c 60;" d file: +DEFLATE_DEFAULT_WINDOWBITS ctaocrypt/src/compress.c 63;" d file: +DEFS Makefile /^DEFS = -DHAVE_CONFIG_H$/;" m +DEND_4 ctaocrypt/src/aes_asm.s /^DEND_4:$/;" l +DEPDIR Makefile /^DEPDIR = .deps$/;" m +DES3_ENC_TYPE cyassl/ctaocrypt/des3.h /^ DES3_ENC_TYPE = 3, \/* cipher unique type *\/$/;" e enum:__anon56 +DES3_IVLEN cyassl/ctaocrypt/des3.h 50;" d +DES3_KEYLEN cyassl/ctaocrypt/des3.h 51;" d +DES3_KEY_SIZE cyassl/internal.h /^ DES3_KEY_SIZE = 24, \/* 3 des ede *\/$/;" e enum:Misc +DES3_TYPE cyassl/ctaocrypt/asn.h /^ DES3_TYPE = 1,$/;" e enum:ENCRYPTION_TYPES +DES3b cyassl/ctaocrypt/asn.h /^ DES3b = 652$/;" e enum:Block_Sum +DES_BLOCK_SIZE cyassl/ctaocrypt/des3.h /^ DES_BLOCK_SIZE = 8,$/;" e enum:__anon56 +DES_BLOCK_SIZE cyassl/internal.h 409;" d +DES_BUFFER_SIZE ctaocrypt/src/des3.c 284;" d file: +DES_CBC cyassl/ctaocrypt/des3.h /^ DES_CBC = 0,$/;" e enum:__anon57 +DES_CBC_TYPE cyassl/openssl/evp.h /^ DES_CBC_TYPE = 7,$/;" e enum:__anon36 +DES_DECRYPT cyassl/openssl/des.h /^ DES_DECRYPT = 0$/;" e enum:__anon37 +DES_DECRYPTION cyassl/ctaocrypt/des3.h /^ DES_DECRYPTION = 1$/;" e enum:__anon56 +DES_ECB cyassl/ctaocrypt/des3.h /^ DES_ECB = 1$/;" e enum:__anon57 +DES_EDE3_CBC_TYPE cyassl/openssl/evp.h /^ DES_EDE3_CBC_TYPE = 8,$/;" e enum:__anon36 +DES_ENCRYPT cyassl/openssl/des.h /^ DES_ENCRYPT = 1,$/;" e enum:__anon37 +DES_ENCRYPTION cyassl/ctaocrypt/des3.h /^ DES_ENCRYPTION = 0,$/;" e enum:__anon56 +DES_ENC_TYPE cyassl/ctaocrypt/des3.h /^ DES_ENC_TYPE = 2, \/* cipher unique type *\/$/;" e enum:__anon56 +DES_IVLEN cyassl/ctaocrypt/des3.h 48;" d +DES_IV_SIZE cyassl/internal.h /^ DES_IV_SIZE = DES_BLOCK_SIZE,$/;" e enum:Misc +DES_KEYLEN cyassl/ctaocrypt/des3.h 49;" d +DES_KEY_SIZE cyassl/internal.h /^ DES_KEY_SIZE = 8, \/* des *\/$/;" e enum:Misc +DES_KS_SIZE cyassl/ctaocrypt/des3.h /^ DES_KS_SIZE = 32,$/;" e enum:__anon56 +DES_TYPE cyassl/ctaocrypt/asn.h /^ DES_TYPE = 0,$/;" e enum:ENCRYPTION_TYPES +DES_cbc_encrypt cyassl/openssl/des.h 77;" d +DES_cblock cyassl/openssl/des.h /^typedef CYASSL_DES_cblock DES_cblock;$/;" t +DES_ecb_encrypt cyassl/openssl/des.h 80;" d +DES_key_sched cyassl/openssl/des.h 76;" d +DES_key_schedule cyassl/openssl/des.h /^typedef CYASSL_DES_key_schedule DES_key_schedule;$/;" t +DES_ncbc_encrypt cyassl/openssl/des.h 78;" d +DES_set_key_unchecked cyassl/openssl/des.h 75;" d +DES_set_odd_parity cyassl/openssl/des.h 79;" d +DESb cyassl/ctaocrypt/asn.h /^ DESb = 69,$/;" e enum:Block_Sum +DH cyassl/openssl/dh.h /^typedef CYASSL_DH DH;$/;" t +DHCP_BOOTF IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 248;" d file: +DHCP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 236;" d file: +DHCP_VCID IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 242;" d file: +DH_PARAM_TYPE cyassl/ctaocrypt/asn_public.h /^ DH_PARAM_TYPE,$/;" e enum:CertType +DH_compute_key cyassl/openssl/dh.h 45;" d +DH_free cyassl/openssl/dh.h 41;" d +DH_generate_key cyassl/openssl/dh.h 44;" d +DH_new cyassl/openssl/dh.h 40;" d +DH_size cyassl/openssl/dh.h 43;" d +DIGESTED_DATA cyassl/ctaocrypt/pkcs7.h /^ DIGESTED_DATA = 655, \/* 1.2.840.113549.1.7.5 *\/$/;" e enum:PKCS7_TYPES +DIGIT cyassl/ctaocrypt/integer.h 179;" d +DIGIT_BIT cyassl/ctaocrypt/integer.h 108;" d +DIGIT_BIT cyassl/ctaocrypt/integer.h 111;" d +DIGIT_BIT cyassl/ctaocrypt/integer.h 120;" d +DIGIT_BIT cyassl/ctaocrypt/integer.h 93;" d +DIGIT_BIT cyassl/ctaocrypt/tfm.h 224;" d +DISTCLEANFILES Makefile /^DISTCLEANFILES = aminclude.am ctaocrypt\/benchmark\/.libs\/benchmark \\$/;" m +DISTFILES Makefile /^DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)$/;" m +DIST_ARCHIVES Makefile /^DIST_ARCHIVES = $(distdir).tar.gz$/;" m +DIST_COMMON Makefile /^DIST_COMMON = $(srcdir)\/cyassl\/include.am \\$/;" m +DIST_SOURCES Makefile /^DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \\$/;" m +DIST_TARGETS Makefile /^DIST_TARGETS = dist-gzip$/;" m +DLAST_4 ctaocrypt/src/aes_asm.s /^DLAST_4:$/;" l +DLAST_4_2 ctaocrypt/src/aes_asm.s /^DLAST_4_2:$/;" l +DLLTOOL Makefile /^DLLTOOL = false$/;" m +DLOOP_4 ctaocrypt/src/aes_asm.s /^DLOOP_4:$/;" l +DLOOP_4_2 ctaocrypt/src/aes_asm.s /^DLOOP_4_2:$/;" l +DMA1_Stream0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l +DMA_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^DMA_IRQHandler$/;" l +DNO_PARTS_4 ctaocrypt/src/aes_asm.s /^DNO_PARTS_4:$/;" l +DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h 13;" d +DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h 13;" d +DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h 13;" d +DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h 13;" d +DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h 13;" d +DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h 18;" d +DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h 18;" d +DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h 18;" d +DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h 18;" d +DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h 18;" d +DNS_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 746;" d file: +DNS_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 751;" d file: +DNS_entry cyassl/ctaocrypt/asn.h /^struct DNS_entry {$/;" s +DNS_entry cyassl/ctaocrypt/asn.h /^typedef struct DNS_entry DNS_entry;$/;" t typeref:struct:DNS_entry +DNS_entry cyassl/internal.h /^ typedef struct DNS_entry DNS_entry;$/;" t typeref:struct:DNS_entry +DN_Tags cyassl/ctaocrypt/asn.h /^enum DN_Tags {$/;" g +DOMAIN_NAME_MISMATCH cyassl/error-ssl.h /^ DOMAIN_NAME_MISMATCH = -222, \/* peer subject name mismatch *\/$/;" e enum:CyaSSL_ErrorCodes +DO_MEM_STATS cyassl/test.h 1112;" d +DREMAINDER_4 ctaocrypt/src/aes_asm.s /^DREMAINDER_4:$/;" l +DSA cyassl/openssl/ssl.h /^typedef CYASSL_DSA DSA;$/;" t +DSA_HALF_SIZE ctaocrypt/src/dsa.c /^ DSA_HALF_SIZE = 20, \/* r and s size *\/$/;" e enum:__anon5 file: +DSA_PRIVATE cyassl/ctaocrypt/dsa.h /^ DSA_PRIVATE = 1$/;" e enum:__anon43 +DSA_PUBLIC cyassl/ctaocrypt/dsa.h /^ DSA_PUBLIC = 0,$/;" e enum:__anon43 +DSA_SIG_SIZE ctaocrypt/src/dsa.c /^ DSA_SIG_SIZE = 40 \/* signature size *\/$/;" e enum:__anon5 file: +DSA_free cyassl/openssl/dsa.h 43;" d +DSA_generate_key cyassl/openssl/dsa.h 45;" d +DSA_generate_parameters_ex cyassl/openssl/dsa.h 46;" d +DSA_new cyassl/openssl/dsa.h 42;" d +DSAk cyassl/ctaocrypt/asn.h /^ DSAk = 515,$/;" e enum:Key_Sum +DSYMUTIL Makefile /^DSYMUTIL = $/;" m +DTLS_HANDSHAKE_EXTRA cyassl/internal.h /^ DTLS_HANDSHAKE_EXTRA = 8, \/* diff from normal *\/$/;" e enum:Misc +DTLS_HANDSHAKE_FRAG_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_FRAG_SZ = 3, \/* fragment offset and length are 24 bit *\/$/;" e enum:Misc +DTLS_HANDSHAKE_HEADER_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_HEADER_SZ = 12, \/* normal + seq(2) + offset(3) + length(3) *\/$/;" e enum:Misc +DTLS_HANDSHAKE_SEQ_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_SEQ_SZ = 2, \/* handshake header sequence number *\/$/;" e enum:Misc +DTLS_MAJOR cyassl/internal.h /^ DTLS_MAJOR = 0xfe, \/* DTLS major version number *\/$/;" e enum:Misc +DTLS_MINOR cyassl/internal.h /^ DTLS_MINOR = 0xff, \/* DTLS minor version number *\/$/;" e enum:Misc +DTLS_POOL_SZ cyassl/internal.h /^ DTLS_POOL_SZ = 5, \/* buffers to hold in the retry pool *\/$/;" e enum:Misc +DTLS_RECORD_EXTRA cyassl/internal.h /^ DTLS_RECORD_EXTRA = 8, \/* diff from normal *\/$/;" e enum:Misc +DTLS_RECORD_HEADER_SZ cyassl/internal.h /^ DTLS_RECORD_HEADER_SZ = 13, \/* normal + epoch(2) + seq_num(6) *\/$/;" e enum:Misc +DTLS_SEQ_BITS cyassl/internal.h 1397;" d +DTLS_TIMEOUT_INIT cyassl/internal.h /^ DTLS_TIMEOUT_INIT = 1, \/* default timeout init for DTLS receive *\/$/;" e enum:Misc +DTLS_TIMEOUT_MAX cyassl/internal.h /^ DTLS_TIMEOUT_MAX = 64, \/* default max timeout for DTLS receive *\/$/;" e enum:Misc +DTLS_TIMEOUT_MULTIPLIER cyassl/internal.h /^ DTLS_TIMEOUT_MULTIPLIER = 2, \/* default timeout multiplier for DTLS recv *\/$/;" e enum:Misc +DTLSv1_2_MINOR cyassl/internal.h /^ DTLSv1_2_MINOR = 0xfd, \/* DTLS minor version number *\/$/;" e enum:Misc +DTLSv1_2_client_method cyassl/openssl/ssl.h 95;" d +DTLSv1_2_server_method cyassl/openssl/ssl.h 96;" d +DTLSv1_client_method cyassl/openssl/ssl.h 93;" d +DTLSv1_server_method cyassl/openssl/ssl.h 94;" d +DUMPBIN Makefile /^DUMPBIN = $/;" m +DUPLICATE_STR cyassl/sniffer_error.h 89;" d +DYNAMIC_TYPE_ALTNAME cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ALTNAME = 29,$/;" e enum:__anon48 +DYNAMIC_TYPE_ARRAYS cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ARRAYS = 33,$/;" e enum:__anon48 +DYNAMIC_TYPE_BIGINT cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_BIGINT = 9,$/;" e enum:__anon48 +DYNAMIC_TYPE_CA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CA = 1,$/;" e enum:__anon48 +DYNAMIC_TYPE_CAVIUM_RSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CAVIUM_RSA = 41,$/;" e enum:__anon48 +DYNAMIC_TYPE_CAVIUM_TMP cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CAVIUM_TMP = 40,$/;" e enum:__anon48 +DYNAMIC_TYPE_CERT cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CERT = 2,$/;" e enum:__anon48 +DYNAMIC_TYPE_CERT_MANAGER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CERT_MANAGER = 25,$/;" e enum:__anon48 +DYNAMIC_TYPE_CIPHER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CIPHER = 31,$/;" e enum:__anon48 +DYNAMIC_TYPE_CRL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL = 22,$/;" e enum:__anon48 +DYNAMIC_TYPE_CRL_ENTRY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL_ENTRY = 24,$/;" e enum:__anon48 +DYNAMIC_TYPE_CRL_MONITOR cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL_MONITOR = 26,$/;" e enum:__anon48 +DYNAMIC_TYPE_CTX cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CTX = 18,$/;" e enum:__anon48 +DYNAMIC_TYPE_DH cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DH = 15,$/;" e enum:__anon48 +DYNAMIC_TYPE_DOMAIN cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DOMAIN = 16,$/;" e enum:__anon48 +DYNAMIC_TYPE_DSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DSA = 21,$/;" e enum:__anon48 +DYNAMIC_TYPE_DTLS_MSG cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DTLS_MSG = 39,$/;" e enum:__anon48 +DYNAMIC_TYPE_DTLS_POOL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DTLS_POOL = 34,$/;" e enum:__anon48 +DYNAMIC_TYPE_ECC cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ECC = 37,$/;" e enum:__anon48 +DYNAMIC_TYPE_FILE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_FILE = 4,$/;" e enum:__anon48 +DYNAMIC_TYPE_INFO cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_INFO = 14,$/;" e enum:__anon48 +DYNAMIC_TYPE_IN_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_IN_BUFFER = 13,$/;" e enum:__anon48 +DYNAMIC_TYPE_KEY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_KEY = 3,$/;" e enum:__anon48 +DYNAMIC_TYPE_LIBZ cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_LIBZ = 36,$/;" e enum:__anon48 +DYNAMIC_TYPE_METHOD cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_METHOD = 11,$/;" e enum:__anon48 +DYNAMIC_TYPE_NONE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_NONE = 8,$/;" e enum:__anon48 +DYNAMIC_TYPE_OCSP cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP = 44,$/;" e enum:__anon48 +DYNAMIC_TYPE_OCSP_ENTRY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP_ENTRY = 28,$/;" e enum:__anon48 +DYNAMIC_TYPE_OCSP_STATUS cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP_STATUS = 27,$/;" e enum:__anon48 +DYNAMIC_TYPE_OPENSSL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OPENSSL = 20,$/;" e enum:__anon48 +DYNAMIC_TYPE_OUT_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OUT_BUFFER = 12,$/;" e enum:__anon48 +DYNAMIC_TYPE_PUBLIC_KEY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_PUBLIC_KEY = 6,$/;" e enum:__anon48 +DYNAMIC_TYPE_REVOKED cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_REVOKED = 23,$/;" e enum:__anon48 +DYNAMIC_TYPE_RNG cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_RNG = 32,$/;" e enum:__anon48 +DYNAMIC_TYPE_RSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_RSA = 10,$/;" e enum:__anon48 +DYNAMIC_TYPE_SIGNATURE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SIGNATURE = 45$/;" e enum:__anon48 +DYNAMIC_TYPE_SIGNER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SIGNER = 7,$/;" e enum:__anon48 +DYNAMIC_TYPE_SOCKADDR cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SOCKADDR = 35,$/;" e enum:__anon48 +DYNAMIC_TYPE_SSL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SSL = 17,$/;" e enum:__anon48 +DYNAMIC_TYPE_SUBJECT_CN cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SUBJECT_CN = 5,$/;" e enum:__anon48 +DYNAMIC_TYPE_SUITES cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SUITES = 30,$/;" e enum:__anon48 +DYNAMIC_TYPE_TLSX cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_TLSX = 43,$/;" e enum:__anon48 +DYNAMIC_TYPE_TMP_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_TMP_BUFFER = 38,$/;" e enum:__anon48 +DYNAMIC_TYPE_WRITEV cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_WRITEV = 19,$/;" e enum:__anon48 +DYNAMIC_TYPE_X509 cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_X509 = 42,$/;" e enum:__anon48 +DateGreaterThan ctaocrypt/src/asn.c /^static int DateGreaterThan(const struct tm* a, const struct tm* b)$/;" f file: +DateLessThan ctaocrypt/src/asn.c /^static INLINE int DateLessThan(const struct tm* a, const struct tm* b)$/;" f file: +DeCompress ctaocrypt/src/compress.c /^int DeCompress(byte* out, word32 outSz, const byte* in, word32 inSz)$/;" f +DecodeAltNames ctaocrypt/src/asn.c /^static int DecodeAltNames(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeAuthInfo ctaocrypt/src/asn.c /^static int DecodeAuthInfo(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeAuthKeyId ctaocrypt/src/asn.c /^static int DecodeAuthKeyId(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeBasicCaConstraint ctaocrypt/src/asn.c /^static int DecodeBasicCaConstraint(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeBasicOcspResponse ctaocrypt/src/asn.c /^static int DecodeBasicOcspResponse(byte* source,$/;" f file: +DecodeCertExtensions ctaocrypt/src/asn.c /^static int DecodeCertExtensions(DecodedCert* cert)$/;" f file: +DecodeCertPolicy ctaocrypt/src/asn.c /^ static int DecodeCertPolicy(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeCerts ctaocrypt/src/asn.c /^static int DecodeCerts(byte* source,$/;" f file: +DecodeCrlDist ctaocrypt/src/asn.c /^static int DecodeCrlDist(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeECC_DSA_Sig ctaocrypt/src/asn.c /^int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, mp_int* r, mp_int* s)$/;" f +DecodeExtKeyUsage ctaocrypt/src/asn.c /^static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeKeyUsage ctaocrypt/src/asn.c /^static int DecodeKeyUsage(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeNameConstraints ctaocrypt/src/asn.c /^static int DecodeNameConstraints(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeOcspRespExtensions ctaocrypt/src/asn.c /^static int DecodeOcspRespExtensions(byte* source,$/;" f file: +DecodeResponseData ctaocrypt/src/asn.c /^static int DecodeResponseData(byte* source,$/;" f file: +DecodeSingleResponse ctaocrypt/src/asn.c /^static int DecodeSingleResponse(byte* source,$/;" f file: +DecodeSubjKeyId ctaocrypt/src/asn.c /^static int DecodeSubjKeyId(byte* input, int sz, DecodedCert* cert)$/;" f file: +DecodeSubtree ctaocrypt/src/asn.c /^static int DecodeSubtree(byte* input, int sz, Base_entry** head, void* heap)$/;" f file: +DecodeToKey ctaocrypt/src/asn.c /^int DecodeToKey(DecodedCert* cert, int verify)$/;" f +DecodedCRL cyassl/ctaocrypt/asn.h /^struct DecodedCRL {$/;" s +DecodedCRL cyassl/ctaocrypt/asn.h /^typedef struct DecodedCRL DecodedCRL;$/;" t typeref:struct:DecodedCRL +DecodedCert cyassl/ctaocrypt/asn.h /^struct DecodedCert {$/;" s +DecodedCert cyassl/ctaocrypt/asn.h /^typedef struct DecodedCert DecodedCert;$/;" t typeref:struct:DecodedCert +DecodedName cyassl/ctaocrypt/asn.h /^struct DecodedName {$/;" s +DecodedName cyassl/ctaocrypt/asn.h /^typedef struct DecodedName DecodedName;$/;" t typeref:struct:DecodedName +Decrypt src/internal.c /^static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input,$/;" f file: +Decrypt src/sniffer.c /^static int Decrypt(SSL* ssl, byte* output, const byte* input, word32 sz)$/;" f file: +DecryptKey ctaocrypt/src/asn.c /^static int DecryptKey(const char* password, int passwordSz, byte* salt,$/;" f file: +DecryptMessage src/sniffer.c /^static const byte* DecryptMessage(SSL* ssl, const byte* input, word32 sz,$/;" f file: +DecryptVerifyCb cyassl/internal.h /^ CallbackDecryptVerify DecryptVerifyCb; \/* Atomic User Decrypt\/Verify Cb *\/$/;" m struct:CYASSL_CTX +DecryptVerifyCtx cyassl/internal.h /^ void* DecryptVerifyCtx; \/* Atomic User Decrypt\/Verify Callback Context *\/$/;" m struct:CYASSL +Default_Handler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +Default_Handler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l +DerCert ctaocrypt/src/asn.c /^typedef struct DerCert {$/;" s file: +DerCert ctaocrypt/src/asn.c /^} DerCert;$/;" t typeref:struct:DerCert file: +DerToPem ctaocrypt/src/asn.c /^int DerToPem(const byte* der, word32 derSz, byte* output, word32 outSz,$/;" f +DeriveKeys src/keys.c /^int DeriveKeys(CYASSL* ssl)$/;" f +DeriveTlsKeys src/tls.c /^int DeriveTlsKeys(CYASSL* ssl)$/;" f +Des cyassl/ctaocrypt/des3.h /^typedef struct Des {$/;" s +Des cyassl/ctaocrypt/des3.h /^} Des;$/;" t typeref:struct:Des +Des3 cyassl/ctaocrypt/des3.h /^typedef struct Des3 {$/;" s +Des3 cyassl/ctaocrypt/des3.h /^} Des3;$/;" t typeref:struct:Des3 +Des3Crypt ctaocrypt/src/des3.c /^ void Des3Crypt(Des3* des, byte* out, const byte* in, word32 sz,$/;" f +Des3ProcessBlock ctaocrypt/src/des3.c /^static void Des3ProcessBlock(Des3* des, const byte* in, byte* out)$/;" f file: +Des3_CaviumCbcDecrypt ctaocrypt/src/des3.c /^static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in,$/;" f file: +Des3_CaviumCbcEncrypt ctaocrypt/src/des3.c /^static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in,$/;" f file: +Des3_CaviumSetKey ctaocrypt/src/des3.c /^static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv)$/;" f file: +Des3_CbcDecrypt ctaocrypt/src/des3.c /^ int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcDecrypt ctaocrypt/src/des3.c /^int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcDecrypt ctaocrypt/src/des3.c /^int Des3_CbcDecrypt(Des3* des3, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcDecrypt cyassl/ctaocrypt/des3.h 125;" d +Des3_CbcEncrypt ctaocrypt/src/des3.c /^ int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcEncrypt ctaocrypt/src/des3.c /^int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcEncrypt ctaocrypt/src/des3.c /^int Des3_CbcEncrypt(Des3* des3, byte* out, const byte* in, word32 sz)$/;" f +Des3_CbcEncrypt cyassl/ctaocrypt/des3.h 124;" d +Des3_FreeCavium ctaocrypt/src/des3.c /^void Des3_FreeCavium(Des3* des3)$/;" f +Des3_InitCavium ctaocrypt/src/des3.c /^int Des3_InitCavium(Des3* des3, int devId)$/;" f +Des3_SetIV ctaocrypt/src/des3.c /^int Des3_SetIV(Des3* des, const byte* iv)$/;" f +Des3_SetIV cyassl/ctaocrypt/des3.h 123;" d +Des3_SetKey ctaocrypt/src/des3.c /^ int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir)$/;" f +Des3_SetKey ctaocrypt/src/des3.c /^int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir)$/;" f +Des3_SetKey ctaocrypt/src/des3.c /^int Des3_SetKey(Des3* des3, const byte* key, const byte* iv, int dir)$/;" f +Des3_SetKey cyassl/ctaocrypt/des3.h 122;" d +DesBuffer ctaocrypt/src/des3.c /^static unsigned char *DesBuffer = NULL ;$/;" v file: +DesCrypt ctaocrypt/src/des3.c /^ void DesCrypt(Des* des, byte* out, const byte* in, word32 sz,$/;" f +DesCrypt ctaocrypt/src/des3.c /^ void DesCrypt(word32 *key, word32 *iv, byte* out, const byte* in, word32 sz,$/;" f +DesProcessBlock ctaocrypt/src/des3.c /^static void DesProcessBlock(Des* des, const byte* in, byte* out)$/;" f file: +DesRawProcessBlock ctaocrypt/src/des3.c /^static void DesRawProcessBlock(word32* lIn, word32* rIn, const word32* kptr)$/;" f file: +DesSetKey ctaocrypt/src/des3.c /^static int DesSetKey(const byte* key, int dir, word32* out)$/;" f file: +Des_Cbc ctaocrypt/src/des3.c /^static void Des_Cbc(Des* des, byte* out, const byte* in, word32 sz, word32 desc)$/;" f file: +Des_CbcDecrypt ctaocrypt/src/des3.c /^ void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_CbcDecrypt ctaocrypt/src/des3.c /^void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_CbcEncrypt ctaocrypt/src/des3.c /^ void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_CbcEncrypt ctaocrypt/src/des3.c /^void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_EcbEncrypt ctaocrypt/src/des3.c /^ void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_EcbEncrypt ctaocrypt/src/des3.c /^void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f +Des_SetIV ctaocrypt/src/des3.c /^void Des_SetIV(Des* des, const byte* iv)$/;" f +Des_SetKey ctaocrypt/src/des3.c /^ int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir)$/;" f +Des_SetKey ctaocrypt/src/des3.c /^int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir)$/;" f +DhAgree ctaocrypt/src/dh.c /^int DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv,$/;" f +DhGenerateKeyPair ctaocrypt/src/dh.c /^int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, word32* privSz,$/;" f +DhKey cyassl/ctaocrypt/dh.h /^typedef struct DhKey {$/;" s +DhKey cyassl/ctaocrypt/dh.h /^} DhKey;$/;" t typeref:struct:DhKey +DhKeyDecode ctaocrypt/src/asn.c /^int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)$/;" f +DhParamsLoad ctaocrypt/src/asn.c /^int DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz,$/;" f +DhSetKey ctaocrypt/src/asn.c /^int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, word32 gSz)$/;" f +DiscreteLogWorkFactor ctaocrypt/src/dh.c /^static word32 DiscreteLogWorkFactor(word32 n)$/;" f file: +DllMain src/sniffer.c /^BOOL APIENTRY DllMain( HMODULE hModule,$/;" f +DoAlert src/internal.c /^static int DoAlert(CYASSL* ssl, byte* input, word32* inOutIdx, int* type,$/;" f file: +DoApplicationData src/internal.c /^int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx)$/;" f +DoBase64_Encode ctaocrypt/src/coding.c /^static int DoBase64_Encode(const byte* in, word32 inLen, byte* out,$/;" f file: +DoCertificate src/internal.c /^static int DoCertificate(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoCertificateRequest src/internal.c /^ static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32*$/;" f file: +DoCertificateVerify src/internal.c /^ static int DoCertificateVerify(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoClientHello src/internal.c /^ static int DoClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: +DoClientKeyExchange src/internal.c /^ static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoDtlsHandShakeMsg src/internal.c /^static int DoDtlsHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoFinished src/internal.c /^int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, word32 size,$/;" f +DoHandShake src/sniffer.c /^static int DoHandShake(const byte* input, int* sslBytes,$/;" f file: +DoHandShakeMsg src/internal.c /^static int DoHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoHandShakeMsgType src/internal.c /^static int DoHandShakeMsgType(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: +DoHelloRequest src/internal.c /^static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: +DoHelloVerifyRequest src/internal.c /^ static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input,$/;" f file: +DoKey ctaocrypt/src/hc128.c /^static INLINE int DoKey(HC128* ctx, const byte* key, const byte* iv)$/;" f file: +DoKey ctaocrypt/src/rabbit.c /^static INLINE int DoKey(Rabbit* ctx, const byte* key, const byte* iv)$/;" f file: +DoMemSaveCertCache src/ssl.c /^static INLINE int DoMemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz)$/;" f file: +DoMonitor src/crl.c /^static void* DoMonitor(void* arg)$/;" f file: +DoOldHello src/sniffer.c /^static int DoOldHello(SnifferSession* session, const byte* sslFrame,$/;" f file: +DoProcess ctaocrypt/src/hc128.c /^static INLINE int DoProcess(HC128* ctx, byte* output, const byte* input,$/;" f file: +DoProcess ctaocrypt/src/rabbit.c /^static INLINE int DoProcess(Rabbit* ctx, byte* output, const byte* input,$/;" f file: +DoRounds src/internal.c /^static INLINE void DoRounds(int type, int rounds, const byte* data, int sz)$/;" f file: +DoServerHello src/internal.c /^ static int DoServerHello(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: +DoServerKeyExchange src/internal.c /^ static int DoServerKeyExchange(CYASSL* ssl, const byte* input,$/;" f file: +DsaKey cyassl/ctaocrypt/dsa.h /^typedef struct DsaKey {$/;" s +DsaKey cyassl/ctaocrypt/dsa.h /^} DsaKey;$/;" t typeref:struct:DsaKey +DsaPrivateKeyDecode ctaocrypt/src/asn.c /^int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key,$/;" f +DsaPublicKeyDecode ctaocrypt/src/asn.c /^int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key,$/;" f +DsaSign ctaocrypt/src/dsa.c /^int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng)$/;" f +DsaVerify ctaocrypt/src/dsa.c /^int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, int* answer)$/;" f +DtlsCheckWindow src/internal.c /^static INLINE int DtlsCheckWindow(DtlsState* state)$/;" f file: +DtlsHandShakeHeader cyassl/internal.h /^typedef struct DtlsHandShakeHeader {$/;" s +DtlsHandShakeHeader cyassl/internal.h /^} DtlsHandShakeHeader;$/;" t typeref:struct:DtlsHandShakeHeader +DtlsMsg cyassl/internal.h /^typedef struct DtlsMsg {$/;" s +DtlsMsg cyassl/internal.h /^} DtlsMsg;$/;" t typeref:struct:DtlsMsg +DtlsMsgDelete src/internal.c /^void DtlsMsgDelete(DtlsMsg* item, void* heap)$/;" f +DtlsMsgDrain src/internal.c /^static int DtlsMsgDrain(CYASSL* ssl)$/;" f file: +DtlsMsgFind src/internal.c /^DtlsMsg* DtlsMsgFind(DtlsMsg* head, word32 seq)$/;" f +DtlsMsgInsert src/internal.c /^DtlsMsg* DtlsMsgInsert(DtlsMsg* head, DtlsMsg* item)$/;" f +DtlsMsgListDelete src/internal.c /^void DtlsMsgListDelete(DtlsMsg* head, void* heap)$/;" f +DtlsMsgNew src/internal.c /^DtlsMsg* DtlsMsgNew(word32 sz, void* heap)$/;" f +DtlsMsgSet src/internal.c /^void DtlsMsgSet(DtlsMsg* msg, word32 seq, const byte* data, byte type,$/;" f +DtlsMsgStore src/internal.c /^DtlsMsg* DtlsMsgStore(DtlsMsg* head, word32 seq, const byte* data, $/;" f +DtlsPool cyassl/internal.h /^typedef struct DtlsPool {$/;" s +DtlsPool cyassl/internal.h /^} DtlsPool;$/;" t typeref:struct:DtlsPool +DtlsPoolInit src/internal.c /^int DtlsPoolInit(CYASSL* ssl)$/;" f +DtlsPoolReset src/internal.c /^void DtlsPoolReset(CYASSL* ssl)$/;" f +DtlsPoolSave src/internal.c /^int DtlsPoolSave(CYASSL* ssl, const byte *src, int sz)$/;" f +DtlsPoolSend src/internal.c /^int DtlsPoolSend(CYASSL* ssl)$/;" f +DtlsPoolTimeout src/internal.c /^int DtlsPoolTimeout(CYASSL* ssl)$/;" f +DtlsRecordLayerHeader cyassl/internal.h /^typedef struct DtlsRecordLayerHeader {$/;" s +DtlsRecordLayerHeader cyassl/internal.h /^} DtlsRecordLayerHeader;$/;" t typeref:struct:DtlsRecordLayerHeader +DtlsSeq cyassl/internal.h /^ typedef word32 DtlsSeq;$/;" t +DtlsSeq cyassl/internal.h /^ typedef word64 DtlsSeq;$/;" t +DtlsState cyassl/internal.h /^ typedef struct DtlsState {$/;" s +DtlsState cyassl/internal.h /^ } DtlsState;$/;" t typeref:struct:DtlsState +DtlsUpdateWindow src/internal.c /^static INLINE int DtlsUpdateWindow(DtlsState* state)$/;" f file: +ECC112 ctaocrypt/src/ecc.c 48;" d file: +ECC128 ctaocrypt/src/ecc.c 49;" d file: +ECC160 ctaocrypt/src/ecc.c 50;" d file: +ECC192 ctaocrypt/src/ecc.c 51;" d file: +ECC224 ctaocrypt/src/ecc.c 52;" d file: +ECC256 ctaocrypt/src/ecc.c 53;" d file: +ECC384 ctaocrypt/src/ecc.c 54;" d file: +ECC521 ctaocrypt/src/ecc.c 55;" d file: +ECC_160R1 cyassl/ctaocrypt/asn.h /^ ECC_160R1 = 184,$/;" e enum:Ecc_Sum +ECC_192R1 cyassl/ctaocrypt/asn.h /^ ECC_192R1 = 520,$/;" e enum:Ecc_Sum +ECC_224R1 cyassl/ctaocrypt/asn.h /^ ECC_224R1 = 209$/;" e enum:Ecc_Sum +ECC_256R1 cyassl/ctaocrypt/asn.h /^ ECC_256R1 = 526,$/;" e enum:Ecc_Sum +ECC_384R1 cyassl/ctaocrypt/asn.h /^ ECC_384R1 = 210,$/;" e enum:Ecc_Sum +ECC_521R1 cyassl/ctaocrypt/asn.h /^ ECC_521R1 = 211,$/;" e enum:Ecc_Sum +ECC_BAD_ARG_E cyassl/ctaocrypt/error-crypt.h /^ ECC_BAD_ARG_E = -170, \/* ECC input argument of wrong type *\/$/;" e enum:__anon61 +ECC_BUFSIZE cyassl/ctaocrypt/ecc.h /^ ECC_BUFSIZE = 256, \/* for exported keys temp buffer *\/$/;" e enum:__anon71 +ECC_BYTE cyassl/internal.h /^ ECC_BYTE = 0xC0, \/* ECC first cipher suite byte *\/$/;" e enum:Misc +ECC_CURVETYPE_ERROR cyassl/error-ssl.h /^ ECC_CURVETYPE_ERROR = -250, \/* Bad ECC Curve Type *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_CURVE_ERROR cyassl/error-ssl.h /^ ECC_CURVE_ERROR = -251, \/* Bad ECC Curve *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_CURVE_OID_E cyassl/ctaocrypt/error-crypt.h /^ ECC_CURVE_OID_E = -172, \/* Unsupported ECC OID curve type *\/$/;" e enum:__anon61 +ECC_EXPORT_ERROR cyassl/error-ssl.h /^ ECC_EXPORT_ERROR = -254, \/* Bad ECC Export Key *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_KEY cyassl/ctaocrypt/asn.h /^ ECC_KEY = 12$/;" e enum:cert_enums +ECC_MAKEKEY_ERROR cyassl/error-ssl.h /^ ECC_MAKEKEY_ERROR = -253, \/* Bad Make ECC Key *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_MAXNAME cyassl/ctaocrypt/ecc.h /^ ECC_MAXNAME = 16, \/* MAX CURVE NAME LENGTH *\/$/;" e enum:__anon71 +ECC_MAXSIZE cyassl/ctaocrypt/ecc.h /^ ECC_MAXSIZE = 66 \/* MAX Private Key size *\/$/;" e enum:__anon71 +ECC_MINSIZE cyassl/ctaocrypt/ecc.h /^ ECC_MINSIZE = 20, \/* MIN Private Key size *\/$/;" e enum:__anon71 +ECC_PEERKEY_ERROR cyassl/error-ssl.h /^ ECC_PEERKEY_ERROR = -252, \/* Bad Peer ECC Key *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_PREFIX_0 cyassl/ctaocrypt/asn.h /^ ECC_PREFIX_0 = 160,$/;" e enum:ECC_TYPES +ECC_PREFIX_1 cyassl/ctaocrypt/asn.h /^ ECC_PREFIX_1 = 161$/;" e enum:ECC_TYPES +ECC_PRIVATEKEY cyassl/ctaocrypt/ecc.h /^ ECC_PRIVATEKEY = 2,$/;" e enum:__anon71 +ECC_PRIVATEKEY_TYPE cyassl/ctaocrypt/asn_public.h /^ ECC_PRIVATEKEY_TYPE,$/;" e enum:CertType +ECC_PUBLICKEY cyassl/ctaocrypt/ecc.h /^ ECC_PUBLICKEY = 1,$/;" e enum:__anon71 +ECC_SHARED_ERROR cyassl/error-ssl.h /^ ECC_SHARED_ERROR = -255, \/* Bad ECC Shared Secret *\/$/;" e enum:CyaSSL_ErrorCodes +ECC_TYPES cyassl/ctaocrypt/asn.h /^enum ECC_TYPES {$/;" g +ECDHE_SIZE cyassl/internal.h /^ ECDHE_SIZE = 32, \/* ECHDE server size defaults to 256 bit *\/$/;" e enum:Misc +ECDSAk cyassl/ctaocrypt/asn.h /^ ECDSAk = 518$/;" e enum:Key_Sum +ECHO_C Makefile /^ECHO_C = $/;" m +ECHO_N Makefile /^ECHO_N = -n$/;" m +ECHO_OUT IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c 47;" d file: +ECHO_OUT IDE/MDK5-ARM/Projects/EchoServer/echoserver.c 47;" d file: +ECHO_OUT examples/echoserver/echoserver.c 39;" d file: +ECHO_T Makefile /^ECHO_T = $/;" m +EC_FREE_ALL src/tls.c 1473;" d file: +EC_FREE_ALL src/tls.c 1492;" d file: +EC_GET_SIZE src/tls.c 1477;" d file: +EC_GET_SIZE src/tls.c 1480;" d file: +EC_GET_SIZE src/tls.c 1493;" d file: +EC_PARSE src/tls.c 1485;" d file: +EC_PARSE src/tls.c 1487;" d file: +EC_PARSE src/tls.c 1495;" d file: +EC_VALIDATE_REQUEST src/tls.c 1474;" d file: +EC_VALIDATE_REQUEST src/tls.c 1496;" d file: +EC_WRITE src/tls.c 1478;" d file: +EC_WRITE src/tls.c 1481;" d file: +EC_WRITE src/tls.c 1494;" d file: +EECB_END_4 ctaocrypt/src/aes_asm.s /^EECB_END_4:$/;" l +EECB_LAST_4 ctaocrypt/src/aes_asm.s /^EECB_LAST_4:$/;" l +EECB_LAST_4_2 ctaocrypt/src/aes_asm.s /^EECB_LAST_4_2:$/;" l +EECB_LOOP_4 ctaocrypt/src/aes_asm.s /^EECB_LOOP_4:$/;" l +EECB_LOOP_4_2 ctaocrypt/src/aes_asm.s /^EECB_LOOP_4_2:$/;" l +EECB_NO_PARTS_4 ctaocrypt/src/aes_asm.s /^EECB_NO_PARTS_4:$/;" l +EECB_REMAINDER_4 ctaocrypt/src/aes_asm.s /^EECB_REMAINDER_4:$/;" l +EGREP Makefile /^EGREP = \/bin\/grep -E$/;" m +EIGHTK_BUF cyassl/ctaocrypt/asn.h /^ EIGHTK_BUF = 8192, \/* Tmp buffer size *\/$/;" e enum:Misc_ASN +EKU_ANY_OID cyassl/ctaocrypt/asn.h /^ EKU_ANY_OID = 151, \/* 2.5.29.37.0, anyExtendedKeyUsage *\/$/;" e enum:ExtKeyUsage_Sum +EKU_CLIENT_AUTH_OID cyassl/ctaocrypt/asn.h /^ EKU_CLIENT_AUTH_OID = 72, \/* 1.3.6.1.5.5.7.3.2, id-kp-clientAuth *\/$/;" e enum:ExtKeyUsage_Sum +EKU_OCSP_SIGN_OID cyassl/ctaocrypt/asn.h /^ EKU_OCSP_SIGN_OID = 79, \/* 1.3.6.1.5.5.7.3.9, OCSPSigning *\/$/;" e enum:ExtKeyUsage_Sum +EKU_SERVER_AUTH_OID cyassl/ctaocrypt/asn.h /^ EKU_SERVER_AUTH_OID = 71, \/* 1.3.6.1.5.5.7.3.1, id-kp-serverAuth *\/$/;" e enum:ExtKeyUsage_Sum +ELLIPTIC_CURVES cyassl/internal.h /^ ELLIPTIC_CURVES = 10$/;" e enum:__anon13 +EMAIL_JOINT_LEN cyassl/ctaocrypt/asn.h /^ EMAIL_JOINT_LEN = 9,$/;" e enum:cert_enums +ENCRYPTED_DATA cyassl/ctaocrypt/pkcs7.h /^ ENCRYPTED_DATA = 656 \/* 1.2.840.113549.1.7.6 *\/$/;" e enum:PKCS7_TYPES +ENCRYPTION_TYPES cyassl/ctaocrypt/asn.h /^enum ENCRYPTION_TYPES {$/;" g +ENCRYPT_ERROR cyassl/error-ssl.h /^ ENCRYPT_ERROR = -214, \/* error during encryption *\/$/;" e enum:CyaSSL_ErrorCodes +ENCRYPT_LEN cyassl/internal.h /^ ENCRYPT_LEN = 512, \/* allow 4096 bit static buffer *\/$/;" e enum:Misc +ENET_IPADDR mqx/cyassl_client/Sources/main.h 51;" d +ENET_IPMASK mqx/cyassl_client/Sources/main.h 55;" d +ENTER_LOG cyassl/ctaocrypt/logging.h /^ ENTER_LOG,$/;" e enum:CYA_Log_Levels +ENTROPY_SZ ctaocrypt/src/random.c 74;" d file: +ENUM_LEN cyassl/internal.h /^ ENUM_LEN = 1, \/* always a byte *\/$/;" e enum:Misc +ENVELOPED_DATA cyassl/ctaocrypt/pkcs7.h /^ ENVELOPED_DATA = 653, \/* 1.2.840.113549.1.7.3 *\/$/;" e enum:PKCS7_TYPES +EPOCH_YEAR ctaocrypt/src/asn.c 201;" d file: +ERROR_LOG cyassl/ctaocrypt/logging.h /^ ERROR_LOG = 0,$/;" e enum:CYA_Log_Levels +ERROR_OUT ctaocrypt/src/rsa.c 199;" d file: +ERR_GET_REASON cyassl/openssl/ssl.h 284;" d +ERR_OUT src/ssl.c 5553;" d file: +ERR_TXT_STRING cyassl/ssl.h /^ ERR_TXT_STRING = 1$/;" e enum:__anon21 +ERR_clear_error cyassl/openssl/ssl.h 329;" d +ERR_error_string cyassl/openssl/ssl.h 143;" d +ERR_error_string_n cyassl/openssl/ssl.h 144;" d +ERR_free_strings cyassl/openssl/ssl.h 337;" d +ERR_get_error cyassl/openssl/ssl.h 328;" d +ERR_get_error_line_data cyassl/openssl/ssl.h 326;" d +ERR_peek_error cyassl/openssl/ssl.h 283;" d +ERR_remove_state cyassl/openssl/ssl.h 338;" d +ESD ctaocrypt/src/pkcs7.c /^typedef struct ESD {$/;" s file: +ESD ctaocrypt/src/pkcs7.c /^} ESD;$/;" t typeref:struct:ESD file: +ETAGS Makefile /^ETAGS = etags$/;" m +ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 157;" d +ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 157;" d +ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 157;" d +ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 157;" d +ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 157;" d +ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 163;" d +ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 163;" d +ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 163;" d +ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 163;" d +ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 163;" d +ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 175;" d +ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 175;" d +ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 175;" d +ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 175;" d +ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 175;" d +ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 168;" d +ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 168;" d +ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 168;" d +ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 168;" d +ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 168;" d +ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 152;" d +ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 152;" d +ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 152;" d +ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 152;" d +ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 152;" d +ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 213;" d +ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 213;" d +ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 213;" d +ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 213;" d +ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 213;" d +ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 201;" d +ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 201;" d +ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 201;" d +ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 201;" d +ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 201;" d +ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 219;" d +ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 219;" d +ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 219;" d +ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 219;" d +ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 219;" d +ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 207;" d +ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 207;" d +ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 207;" d +ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 207;" d +ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 207;" d +ETH0_DRIVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 17;" d +ETH0_DRIVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 17;" d +ETH0_DRIVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 17;" d +ETH0_DRIVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 17;" d +ETH0_DRIVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 17;" d +ETH0_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 13;" d +ETH0_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 13;" d +ETH0_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 13;" d +ETH0_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 13;" d +ETH0_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 13;" d +ETH0_GW1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 94;" d +ETH0_GW1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 94;" d +ETH0_GW1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 94;" d +ETH0_GW1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 94;" d +ETH0_GW1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 94;" d +ETH0_GW2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 98;" d +ETH0_GW2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 98;" d +ETH0_GW2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 98;" d +ETH0_GW2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 98;" d +ETH0_GW2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 98;" d +ETH0_GW3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 102;" d +ETH0_GW3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 102;" d +ETH0_GW3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 102;" d +ETH0_GW3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 102;" d +ETH0_GW3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 102;" d +ETH0_GW4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 106;" d +ETH0_GW4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 106;" d +ETH0_GW4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 106;" d +ETH0_GW4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 106;" d +ETH0_GW4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 106;" d +ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 180;" d +ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 180;" d +ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 180;" d +ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 180;" d +ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 180;" d +ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 185;" d +ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 185;" d +ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 185;" d +ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 185;" d +ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 185;" d +ETH0_IP1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 56;" d +ETH0_IP1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 56;" d +ETH0_IP1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 56;" d +ETH0_IP1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 56;" d +ETH0_IP1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 56;" d +ETH0_IP2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 60;" d +ETH0_IP2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 60;" d +ETH0_IP2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 60;" d +ETH0_IP2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 60;" d +ETH0_IP2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 60;" d +ETH0_IP3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 64;" d +ETH0_IP3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 64;" d +ETH0_IP3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 64;" d +ETH0_IP3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 64;" d +ETH0_IP3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 64;" d +ETH0_IP4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 68;" d +ETH0_IP4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 68;" d +ETH0_IP4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 68;" d +ETH0_IP4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 68;" d +ETH0_IP4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 68;" d +ETH0_MAC1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 27;" d +ETH0_MAC1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 27;" d +ETH0_MAC1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 27;" d +ETH0_MAC1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 27;" d +ETH0_MAC1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 27;" d +ETH0_MAC2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 31;" d +ETH0_MAC2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 31;" d +ETH0_MAC2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 31;" d +ETH0_MAC2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 31;" d +ETH0_MAC2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 31;" d +ETH0_MAC3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 35;" d +ETH0_MAC3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 35;" d +ETH0_MAC3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 35;" d +ETH0_MAC3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 35;" d +ETH0_MAC3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 35;" d +ETH0_MAC4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 39;" d +ETH0_MAC4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 39;" d +ETH0_MAC4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 39;" d +ETH0_MAC4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 39;" d +ETH0_MAC4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 39;" d +ETH0_MAC5 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 43;" d +ETH0_MAC5 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 43;" d +ETH0_MAC5 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 43;" d +ETH0_MAC5 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 43;" d +ETH0_MAC5 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 43;" d +ETH0_MAC6 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 47;" d +ETH0_MAC6 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 47;" d +ETH0_MAC6 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 47;" d +ETH0_MAC6 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 47;" d +ETH0_MAC6 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 47;" d +ETH0_MASK1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 75;" d +ETH0_MASK1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 75;" d +ETH0_MASK1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 75;" d +ETH0_MASK1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 75;" d +ETH0_MASK1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 75;" d +ETH0_MASK2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 79;" d +ETH0_MASK2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 79;" d +ETH0_MASK2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 79;" d +ETH0_MASK2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 79;" d +ETH0_MASK2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 79;" d +ETH0_MASK3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 83;" d +ETH0_MASK3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 83;" d +ETH0_MASK3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 83;" d +ETH0_MASK3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 83;" d +ETH0_MASK3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 83;" d +ETH0_MASK4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 87;" d +ETH0_MASK4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 87;" d +ETH0_MASK4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 87;" d +ETH0_MASK4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 87;" d +ETH0_MASK4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 87;" d +ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 193;" d +ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 193;" d +ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 193;" d +ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 193;" d +ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 193;" d +ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 113;" d +ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 113;" d +ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 113;" d +ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 113;" d +ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 113;" d +ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 117;" d +ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 117;" d +ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 117;" d +ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 117;" d +ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 117;" d +ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 121;" d +ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 121;" d +ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 121;" d +ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 121;" d +ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 121;" d +ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 125;" d +ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 125;" d +ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 125;" d +ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 125;" d +ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 125;" d +ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 132;" d +ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 132;" d +ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 132;" d +ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 132;" d +ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 132;" d +ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 136;" d +ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 136;" d +ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 136;" d +ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 136;" d +ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 136;" d +ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 140;" d +ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 140;" d +ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 140;" d +ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 140;" d +ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 140;" d +ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 144;" d +ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 144;" d +ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 144;" d +ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 144;" d +ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 144;" d +ETHER_IF_ADDR_LEN src/sniffer.c /^ ETHER_IF_ADDR_LEN = 6, \/* ethernet interface address length *\/$/;" e enum:__anon96 file: +ETHER_IF_FRAME_LEN sslSniffer/sslSnifferTest/snifftest.c /^ ETHER_IF_FRAME_LEN = 14, \/* ethernet interface frame length *\/$/;" e enum:__anon97 file: +ETH_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 42;" d file: +ETH_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ETH_IRQHandler$/;" l +ETH_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l +EVP_BytesToKey cyassl/openssl/evp.h 217;" d +EVP_CIPHER cyassl/openssl/evp.h /^typedef CYASSL_EVP_CIPHER EVP_CIPHER;$/;" t +EVP_CIPHER_CTX cyassl/openssl/evp.h /^typedef CYASSL_EVP_CIPHER_CTX EVP_CIPHER_CTX;$/;" t +EVP_CIPHER_CTX_cleanup cyassl/openssl/evp.h 220;" d +EVP_CIPHER_CTX_init cyassl/openssl/evp.h 219;" d +EVP_CIPHER_CTX_iv_length cyassl/openssl/evp.h 221;" d +EVP_CIPHER_CTX_key_length cyassl/openssl/evp.h 222;" d +EVP_CIPHER_CTX_set_key_length cyassl/openssl/evp.h 223;" d +EVP_Cipher cyassl/openssl/evp.h 225;" d +EVP_CipherInit cyassl/openssl/evp.h 224;" d +EVP_DigestFinal cyassl/openssl/evp.h 215;" d +EVP_DigestFinal_ex cyassl/openssl/evp.h 216;" d +EVP_DigestInit cyassl/openssl/evp.h 213;" d +EVP_DigestUpdate cyassl/openssl/evp.h 214;" d +EVP_MAX_MD_SIZE cyassl/openssl/evp.h 233;" d +EVP_MD cyassl/openssl/evp.h /^typedef CYASSL_EVP_MD EVP_MD;$/;" t +EVP_MD_CTX cyassl/openssl/evp.h /^typedef CYASSL_EVP_MD_CTX EVP_MD_CTX;$/;" t +EVP_MD_CTX_cleanup cyassl/openssl/evp.h 212;" d +EVP_MD_CTX_init cyassl/openssl/evp.h 211;" d +EVP_MD_size cyassl/openssl/evp.h 210;" d +EVP_PKEY cyassl/openssl/ssl.h /^typedef CYASSL_EVP_PKEY EVP_PKEY;$/;" t +EVP_PKEY_DSA cyassl/openssl/evp.h /^ EVP_PKEY_DSA = 12,$/;" e enum:__anon36 +EVP_PKEY_RSA cyassl/openssl/evp.h /^ EVP_PKEY_RSA = 11,$/;" e enum:__anon36 +EVP_PKEY_free cyassl/openssl/ssl.h 257;" d +EVP_PKEY_get1_DSA cyassl/openssl/evp.h 230;" d +EVP_PKEY_get1_RSA cyassl/openssl/evp.h 229;" d +EVP_R_BAD_DECRYPT cyassl/ssl.h /^ EVP_R_BAD_DECRYPT = 2,$/;" e enum:__anon19 +EVP_SALT_SIZE cyassl/internal.h /^ EVP_SALT_SIZE = 8, \/* evp salt size 64 bits *\/$/;" e enum:Misc +EVP_aes_128_cbc cyassl/openssl/evp.h 199;" d +EVP_aes_128_ctr cyassl/openssl/evp.h 202;" d +EVP_aes_192_cbc cyassl/openssl/evp.h 200;" d +EVP_aes_192_ctr cyassl/openssl/evp.h 203;" d +EVP_aes_256_cbc cyassl/openssl/evp.h 201;" d +EVP_aes_256_ctr cyassl/openssl/evp.h 204;" d +EVP_cleanup cyassl/openssl/ssl.h 339;" d +EVP_des_cbc cyassl/openssl/evp.h 205;" d +EVP_des_ede3_cbc cyassl/openssl/evp.h 206;" d +EVP_enc_null cyassl/openssl/evp.h 208;" d +EVP_get_digestbynid cyassl/openssl/evp.h 227;" d +EVP_md5 cyassl/openssl/evp.h 192;" d +EVP_rc4 cyassl/openssl/evp.h 207;" d +EVP_ripemd160 cyassl/openssl/evp.h 197;" d +EVP_sha1 cyassl/openssl/evp.h 193;" d +EVP_sha256 cyassl/openssl/evp.h 194;" d +EVP_sha384 cyassl/openssl/evp.h 195;" d +EVP_sha512 cyassl/openssl/evp.h 196;" d +EVRT_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^EVRT_IRQHandler$/;" l +EXCHANGE_INFO_SZ cyassl/ctaocrypt/ecc.h /^ EXCHANGE_INFO_SZ = 23 $/;" e enum:__anon75 +EXCHANGE_SALT_SZ cyassl/ctaocrypt/ecc.h /^ EXCHANGE_SALT_SZ = 16, $/;" e enum:__anon75 +EXEEXT Makefile /^EXEEXT = $/;" m +EXTENSIONS_E cyassl/ctaocrypt/error-crypt.h /^ EXTENSIONS_E = -139, \/* setting extensions error *\/$/;" e enum:__anon61 +EXTERNAL_SERIAL_SIZE cyassl/ctaocrypt/asn.h /^ EXTERNAL_SERIAL_SIZE = 32,$/;" e enum:__anon60 +EXTERNAL_SERIAL_SIZE cyassl/internal.h 1692;" d +EXTI0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l +EXTKEYUSE_ANY cyassl/ctaocrypt/asn.h 265;" d +EXTKEYUSE_AUTH_E cyassl/error-ssl.h /^ EXTKEYUSE_AUTH_E = -286, \/* ExtKeyUse server|client_auth *\/$/;" e enum:CyaSSL_ErrorCodes +EXTKEYUSE_CLIENT_AUTH cyassl/ctaocrypt/asn.h 267;" d +EXTKEYUSE_OCSP_SIGN cyassl/ctaocrypt/asn.h 266;" d +EXTKEYUSE_SERVER_AUTH cyassl/ctaocrypt/asn.h 268;" d +EXTRA_DIST Makefile /^EXTRA_DIST = lib\/dummy cyassl-ntru.vcproj cyassl.vcproj \\$/;" m +EXTRA_HEADERS Makefile /^EXTRA_HEADERS = $/;" m +EXT_ID_SZ cyassl/internal.h /^ EXT_ID_SZ = 2, \/* always use 2 bytes *\/$/;" e enum:Misc +EXT_KEY_USAGE_OID cyassl/ctaocrypt/asn.h /^ EXT_KEY_USAGE_OID = 151, \/* 2.5.29.37 *\/$/;" e enum:Extensions_Sum +EXT_TYPE_SZ src/sniffer.c /^ EXT_TYPE_SZ = 2, \/* Extension length *\/$/;" e enum:__anon96 file: +EZH_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^EZH_IRQHandler$/;" l +EccCurves cyassl/internal.h /^enum EccCurves {$/;" g +EccNamedCurves cyassl/internal.h /^enum EccNamedCurves {$/;" g +EccPrivateKeyDecode ctaocrypt/src/asn.c /^int EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,$/;" f +EccSignCb cyassl/internal.h /^ CallbackEccSign EccSignCb; \/* User EccSign Callback handler *\/$/;" m struct:CYASSL_CTX +EccSignCtx cyassl/internal.h /^ void* EccSignCtx; \/* Ecc Sign Callback Context *\/$/;" m struct:CYASSL +EccVerifyCb cyassl/internal.h /^ CallbackEccVerify EccVerifyCb; \/* User EccVerify Callback handler *\/$/;" m struct:CYASSL_CTX +EccVerifyCtx cyassl/internal.h /^ void* EccVerifyCtx; \/* Ecc Verify Callback Context *\/$/;" m struct:CYASSL +Ecc_Sum cyassl/ctaocrypt/asn.h /^enum Ecc_Sum {$/;" g +EllipticCurve cyassl/internal.h /^typedef struct EllipticCurve {$/;" s +EllipticCurve cyassl/internal.h /^} EllipticCurve;$/;" t typeref:struct:EllipticCurve +EmbedGenerateCookie src/io.c /^int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx)$/;" f +EmbedOcspLookup src/io.c /^int EmbedOcspLookup(void* ctx, const char* url, int urlSz,$/;" f +EmbedOcspRespFree src/io.c /^void EmbedOcspRespFree(void* ctx, byte *resp)$/;" f +EmbedReceive src/io.c /^int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx)$/;" f +EmbedReceiveFrom src/io.c /^int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx)$/;" f +EmbedSend src/io.c /^int EmbedSend(CYASSL* ssl, char *buf, int sz, void *ctx)$/;" f +EmbedSendTo src/io.c /^int EmbedSendTo(CYASSL* ssl, char *buf, int sz, void *ctx)$/;" f +EncodeAttributes ctaocrypt/src/pkcs7.c /^static int EncodeAttributes(EncodedAttrib* ea, int eaSz,$/;" f file: +EncodeCert ctaocrypt/src/asn.c /^static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey,$/;" f file: +EncodeCertReq ctaocrypt/src/asn.c /^static int EncodeCertReq(Cert* cert, DerCert* der,$/;" f file: +EncodeOcspRequest ctaocrypt/src/asn.c /^int EncodeOcspRequest(OcspRequest* req)$/;" f +EncodeSignature ctaocrypt/src/asn.c /^word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, int hashOID)$/;" f +EncodedAttrib ctaocrypt/src/pkcs7.c /^typedef struct EncodedAttrib {$/;" s file: +EncodedAttrib ctaocrypt/src/pkcs7.c /^} EncodedAttrib;$/;" t typeref:struct:EncodedAttrib file: +EncodedName ctaocrypt/src/asn.c /^typedef struct EncodedName {$/;" s file: +EncodedName ctaocrypt/src/asn.c /^} EncodedName;$/;" t typeref:struct:EncodedName file: +Encrypt src/internal.c /^static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz)$/;" f file: +EncryptedInfo cyassl/internal.h /^typedef struct EncryptedInfo {$/;" s +EncryptedInfo cyassl/internal.h /^} EncryptedInfo;$/;" t typeref:struct:EncryptedInfo +EthernetHdr src/sniffer.c /^typedef struct EthernetHdr {$/;" s file: +EthernetHdr src/sniffer.c /^} EthernetHdr;$/;" t typeref:struct:EthernetHdr file: +ExtKeyUsage_Sum cyassl/ctaocrypt/asn.h /^enum ExtKeyUsage_Sum { \/* From RFC 5280 *\/$/;" g +Extensions_Sum cyassl/ctaocrypt/asn.h /^enum Extensions_Sum {$/;" g +F ctaocrypt/src/md4.c 63;" d file: +F ctaocrypt/src/ripemd.c 64;" d file: +F1 ctaocrypt/src/md5.c 194;" d file: +F2 ctaocrypt/src/md5.c 195;" d file: +F3 ctaocrypt/src/md5.c 196;" d file: +F4 ctaocrypt/src/md5.c 197;" d file: +FALSE ctaocrypt/src/asn.c 81;" d file: +FALSE src/internal.c 57;" d file: +FALSE src/ssl.c 79;" d file: +FAST_ROTATE cyassl/ctaocrypt/types.h 131;" d +FAST_ROTATE cyassl/ctaocrypt/types.h 134;" d +FAST_ROTATE cyassl/ctaocrypt/types.h 138;" d +FATAL_ERROR cyassl/error-ssl.h /^ FATAL_ERROR = -213, \/* recvd alert fatal error *\/$/;" e enum:CyaSSL_ErrorCodes +FATAL_ERROR_STATE src/sniffer.c /^ FATAL_ERROR_STATE = 1, \/* SnifferSession fatal error state *\/$/;" e enum:__anon96 file: +FATAL_ERROR_STR cyassl/sniffer_error.h 85;" d +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 32;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 28;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 24;" d file: +FAT_NAME_CACNT IDE/MDK-ARM/MDK-ARM/config/File_Config.c 29;" d file: +FAT_NAME_CADR IDE/MDK-ARM/MDK-ARM/config/File_Config.c 37;" d file: +FAT_NAME_RELOC IDE/MDK-ARM/MDK-ARM/config/File_Config.c 33;" d file: +FD_SETSIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 40;" d +FD_SETSIZE IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 40;" d +FGREP Makefile /^FGREP = \/bin\/grep -F$/;" m +FILETYPE_DER cyassl/sniffer.h /^ FILETYPE_DER = 2,$/;" e enum:__anon29 +FILETYPE_PEM cyassl/sniffer.h /^ FILETYPE_PEM = 1,$/;" e enum:__anon29 +FILE_BUFFER_SIZE cyassl/internal.h /^ FILE_BUFFER_SIZE = 1024, \/* default static file buffer size for input,$/;" e enum:Misc +FILL_PATTERN IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 403;" d file: +FILL_PATTERN IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 410;" d file: +FINISHED_DONE cyassl/internal.h /^ FINISHED_DONE,$/;" e enum:ConnectState +FINISHED_LABEL_SZ cyassl/internal.h /^ FINISHED_LABEL_SZ = 15, \/* TLS finished label size *\/$/;" e enum:Misc +FINISHED_SZ cyassl/internal.h /^ FINISHED_SZ = 36, \/* MD5_DIGEST_SIZE + SHA_DIGEST_SIZE *\/$/;" e enum:Misc +FIPS_NOT_ALLOWED_E cyassl/ctaocrypt/error-crypt.h /^ FIPS_NOT_ALLOWED_E = -197, \/* FIPS not allowed error *\/$/;" e enum:__anon61 +FIPS_NO_WRAPPERS ctaocrypt/src/aes.c 32;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/des3.c 32;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/hmac.c 48;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/rsa.c 33;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/sha.c 39;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/sha256.c 41;" d file: +FIPS_NO_WRAPPERS ctaocrypt/src/sha512.c 32;" d file: +FIRST_REPLY_DONE cyassl/internal.h /^ FIRST_REPLY_DONE,$/;" e enum:ConnectState +FIRST_REPLY_FIRST cyassl/internal.h /^ FIRST_REPLY_FIRST,$/;" e enum:ConnectState +FIRST_REPLY_FOURTH cyassl/internal.h /^ FIRST_REPLY_FOURTH,$/;" e enum:ConnectState +FIRST_REPLY_SECOND cyassl/internal.h /^ FIRST_REPLY_SECOND,$/;" e enum:ConnectState +FIRST_REPLY_THIRD cyassl/internal.h /^ FIRST_REPLY_THIRD,$/;" e enum:ConnectState +FL0_BADR IDE/MDK-ARM/MDK-ARM/config/File_Config.c 54;" d file: +FL0_DEF IDE/MDK-ARM/MDK-ARM/config/File_Config.c 73;" d file: +FL0_EN IDE/MDK-ARM/MDK-ARM/config/File_Config.c 49;" d file: +FL0_HFILE IDE/MDK-ARM/MDK-ARM/config/File_Config.c 69;" d file: +FL0_INITV IDE/MDK-ARM/MDK-ARM/config/File_Config.c 64;" d file: +FL0_SIZE IDE/MDK-ARM/MDK-ARM/config/File_Config.c 59;" d file: +FLASH_EEPROM_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^FLASH_EEPROM_IRQHandler$/;" l +FLASH_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FLASH_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l +FORCED_FREE cyassl/internal.h /^ FORCED_FREE = 1,$/;" e enum:__anon11 +FORGROUND IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: +FORGROUND IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: +FOURK_BUF IDE/MDK5-ARM/Projects/CryptTest/test.c 2505;" d file: +FOURK_BUF IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c 2276;" d file: +FOURK_BUF ctaocrypt/test/test.c 2678;" d file: +FPERM ctaocrypt/src/des3.c /^static INLINE void FPERM(word32* left, word32* right)$/;" f file: +FP_64BIT cyassl/ctaocrypt/tfm.h 69;" d +FP_64BIT cyassl/ctaocrypt/tfm.h 74;" d +FP_64BIT cyassl/ctaocrypt/tfm.h 91;" d +FP_ENTRIES ctaocrypt/src/ecc.c 2167;" d file: +FP_EQ cyassl/ctaocrypt/tfm.h 258;" d +FP_GT cyassl/ctaocrypt/tfm.h 259;" d +FP_LT cyassl/ctaocrypt/tfm.h 257;" d +FP_LUT ctaocrypt/src/ecc.c 2172;" d file: +FP_MASK cyassl/ctaocrypt/tfm.h 244;" d +FP_MAX_BITS cyassl/ctaocrypt/tfm.h 232;" d +FP_MAX_SIZE cyassl/ctaocrypt/tfm.h 234;" d +FP_MEM cyassl/ctaocrypt/tfm.h 254;" d +FP_NEG cyassl/ctaocrypt/tfm.h 249;" d +FP_NO cyassl/ctaocrypt/tfm.h 263;" d +FP_OKAY cyassl/ctaocrypt/tfm.h 252;" d +FP_SIZE cyassl/ctaocrypt/tfm.h 245;" d +FP_VAL cyassl/ctaocrypt/tfm.h 253;" d +FP_YES cyassl/ctaocrypt/tfm.h 262;" d +FP_ZPOS cyassl/ctaocrypt/tfm.h 248;" d +FREAD_ERROR cyassl/error-ssl.h /^ FREAD_ERROR = -215, \/* fread problem *\/$/;" e enum:CyaSSL_ErrorCodes +FREERTOS cyassl/ctaocrypt/settings.h 218;" d +FREESCALE_K70_RNGA cyassl/ctaocrypt/settings.h 364;" d +FREESCALE_MMCAU cyassl/ctaocrypt/settings.h 196;" d +FREESCALE_MQX cyassl/ctaocrypt/settings.h 195;" d +FSMC_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FSMC_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l +FTPC_DEFTOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 735;" d file: +FTPC_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 729;" d file: +FTPC_PASVMODE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 740;" d file: +FTP_AUTHPASSW IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 722;" d file: +FTP_AUTHUSER IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 718;" d file: +FTP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 686;" d file: +FTP_ENAUTH IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 714;" d file: +FTP_IDLETOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 708;" d file: +FTP_NUMSESS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 691;" d file: +FTP_PORTNUM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 696;" d file: +FTP_WELMSG IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 702;" d file: +FWRITE_ERROR cyassl/error-ssl.h /^ FWRITE_ERROR = -279, \/* fwrite problem *\/$/;" e enum:CyaSSL_ErrorCodes +Fail tests/unit.h 8;" d +FillSignStr swig/cyassl_adds.c /^void FillSignStr(unsigned char* dst, const char* src, int size)$/;" f +FinCaputre src/sniffer.c /^typedef struct FinCaputre {$/;" s file: +FinCaputre src/sniffer.c /^} FinCaputre;$/;" t typeref:struct:FinCaputre file: +FinishHandShakeInfo src/internal.c /^ void FinishHandShakeInfo(HandShakeInfo* info, const CYASSL* ssl)$/;" f +Flags src/sniffer.c /^typedef struct Flags {$/;" s file: +Flags src/sniffer.c /^} Flags;$/;" t typeref:struct:Flags file: +FlattenAttributes ctaocrypt/src/pkcs7.c /^static int FlattenAttributes(byte* output, EncodedAttrib* ea, int eaSz)$/;" f file: +FlattenSzInBits ctaocrypt/src/aes.c /^static INLINE void FlattenSzInBits(byte* buf, word32 sz)$/;" f file: +FreeAll sslSniffer/sslSnifferTest/snifftest.c /^static void FreeAll(void)$/;" f file: +FreeAltNames ctaocrypt/src/asn.c /^void FreeAltNames(DNS_entry* altNames, void* heap)$/;" f +FreeArrays src/internal.c /^void FreeArrays(CYASSL* ssl, int keep)$/;" f +FreeAtomicUser cyassl/test.h /^static INLINE void FreeAtomicUser(CYASSL* ssl)$/;" f +FreeCRL src/crl.c /^void FreeCRL(CYASSL_CRL* crl, int dynamic)$/;" f +FreeCRL_Entry src/crl.c /^static void FreeCRL_Entry(CRL_Entry* crle)$/;" f file: +FreeCaviumRsaKey ctaocrypt/src/rsa.c /^static int FreeCaviumRsaKey(RsaKey* key)$/;" f file: +FreeCiphers src/internal.c /^void FreeCiphers(CYASSL* ssl)$/;" f +FreeDecodedCRL ctaocrypt/src/asn.c /^void FreeDecodedCRL(DecodedCRL* dcrl)$/;" f +FreeDecodedCert ctaocrypt/src/asn.c /^void FreeDecodedCert(DecodedCert* cert)$/;" f +FreeDhKey ctaocrypt/src/dh.c /^void FreeDhKey(DhKey* key)$/;" f +FreeDsaKey ctaocrypt/src/dsa.c /^void FreeDsaKey(DsaKey* key)$/;" f +FreeHandshakeResources src/internal.c /^void FreeHandshakeResources(CYASSL* ssl)$/;" f +FreeMutex ctaocrypt/src/port.c /^ int FreeMutex(CyaSSL_Mutex* m)$/;" f +FreeMutex ctaocrypt/src/port.c /^ int FreeMutex(CyaSSL_Mutex* m)$/;" f +FreeMutex ctaocrypt/src/port.c /^int FreeMutex(CyaSSL_Mutex *m)$/;" f +FreeNameSubtrees ctaocrypt/src/asn.c /^void FreeNameSubtrees(Base_entry* names, void* heap)$/;" f +FreeOCSP src/ocsp.c /^void FreeOCSP(CYASSL_OCSP* ocsp, int dynamic)$/;" f +FreeOCSP_Entry src/ocsp.c /^static void FreeOCSP_Entry(OCSP_Entry* ocspe)$/;" f file: +FreePacketBuffer src/sniffer.c /^static void FreePacketBuffer(PacketBuffer* del)$/;" f file: +FreePacketList src/sniffer.c /^static void FreePacketList(PacketBuffer* in)$/;" f file: +FreeRng ctaocrypt/src/random.c /^void FreeRng(RNG* rng)$/;" f +FreeRsaKey ctaocrypt/src/rsa.c /^int FreeRsaKey(RsaKey* key)$/;" f +FreeRsaKey cyassl/ctaocrypt/rsa.h 122;" d +FreeSSL src/internal.c /^void FreeSSL(CYASSL* ssl)$/;" f +FreeSSL_Ctx src/internal.c /^void FreeSSL_Ctx(CYASSL_CTX* ctx)$/;" f +FreeSigner ctaocrypt/src/asn.c /^void FreeSigner(Signer* signer, void* heap)$/;" f +FreeSignerTable ctaocrypt/src/asn.c /^void FreeSignerTable(Signer** table, int rows, void* heap)$/;" f +FreeSnifferServer src/sniffer.c /^static void FreeSnifferServer(SnifferServer* srv)$/;" f file: +FreeSnifferSession src/sniffer.c /^static void FreeSnifferSession(SnifferSession* session)$/;" f file: +FreeStreams src/internal.c /^ static void FreeStreams(CYASSL* ssl)$/;" f file: +FreeTcpReady tests/unit.c /^void FreeTcpReady(tcp_ready* ready)$/;" f +FreeTcpReady testsuite/testsuite.c /^void FreeTcpReady(tcp_ready* ready)$/;" f +FreeTimeoutInfo src/internal.c /^ void FreeTimeoutInfo(TimeoutInfo* info, void* heap)$/;" f +FreeTmpRsas ctaocrypt/src/asn.c /^static INLINE void FreeTmpRsas(byte** tmps, void* heap)$/;" f file: +FreeX509 src/internal.c /^void FreeX509(CYASSL_X509* x509)$/;" f +FreeX509Name src/internal.c /^void FreeX509Name(CYASSL_X509_NAME* name)$/;" f +G ctaocrypt/src/blake2b.c 228;" d file: +G ctaocrypt/src/blake2b.c 266;" d file: +G ctaocrypt/src/md4.c 64;" d file: +G ctaocrypt/src/ripemd.c 65;" d file: +GATE_IPADDR mqx/cyassl_client/Sources/main.h 58;" d +GENERALNAME_URI ctaocrypt/src/asn.c 3350;" d file: +GENERIC_CONFIG Makefile /^GENERIC_CONFIG = cyassl-config$/;" m +GEN_COOKIE_E cyassl/error-ssl.h /^ GEN_COOKIE_E = -277, \/* Generate Cookie Error *\/$/;" e enum:CyaSSL_ErrorCodes +GEN_MEM_ERR ctaocrypt/src/ecc.c 1551;" d file: +GEN_MEM_ERR ctaocrypt/src/ecc.c 1553;" d file: +GETBYTE ctaocrypt/src/aes.c 1507;" d file: +GETITIMER_ERROR cyassl/error-ssl.h /^ GETITIMER_ERROR = -238, \/* getitimer failed ??? *\/$/;" e enum:CyaSSL_ErrorCodes +GETTIME_ERROR cyassl/error-ssl.h /^ GETTIME_ERROR = -237, \/* gettimeofday failed ??? *\/$/;" e enum:CyaSSL_ErrorCodes +GETU32 ctaocrypt/src/camellia.c 100;" d file: +GETU32 ctaocrypt/src/camellia.c 105;" d file: +GHASH ctaocrypt/src/aes.c /^static void GHASH(Aes* aes, const byte* a, word32 aSz,$/;" f file: +GINT0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GINT0_IRQHandler$/;" l +GINT1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GINT1_IRQHandler$/;" l +GMULT ctaocrypt/src/aes.c /^static void GMULT(byte *x, byte m[256][AES_BLOCK_SIZE])$/;" f file: +GMULT ctaocrypt/src/aes.c /^static void GMULT(byte* X, byte* Y)$/;" f file: +GMULT ctaocrypt/src/aes.c /^static void GMULT(word32* X, word32* Y)$/;" f file: +GMULT ctaocrypt/src/aes.c /^static void GMULT(word64* X, word64* Y)$/;" f file: +GOT_ALERT_STR cyassl/sniffer_error.h 75;" d +GOT_APP_DATA_STR cyassl/sniffer_error.h 73;" d +GOT_CERT_REQ_STR cyassl/sniffer_error.h 47;" d +GOT_CERT_STR cyassl/sniffer_error.h 49;" d +GOT_CERT_VER_STR cyassl/sniffer_error.h 55;" d +GOT_CHANGE_CIPHER_STR cyassl/sniffer_error.h 71;" d +GOT_CLIENT_HELLO_STR cyassl/sniffer_error.h 53;" d +GOT_CLIENT_KEY_EX_STR cyassl/sniffer_error.h 54;" d +GOT_FINISHED_STR cyassl/sniffer_error.h 52;" d +GOT_HANDSHAKE_STR cyassl/sniffer_error.h 69;" d +GOT_HELLO_REQUEST_STR cyassl/sniffer_error.h 96;" d +GOT_HELLO_VERIFY_STR cyassl/sniffer_error.h 45;" d +GOT_OLD_CLIENT_HELLO_STR cyassl/sniffer_error.h 63;" d +GOT_PACKET_STR cyassl/sniffer_error.h 59;" d +GOT_SERVER_HELLO_DONE_STR cyassl/sniffer_error.h 51;" d +GOT_SERVER_HELLO_STR cyassl/sniffer_error.h 46;" d +GOT_SERVER_KEY_EX_STR cyassl/sniffer_error.h 48;" d +GOT_SESSION_TICKET_STR cyassl/sniffer_error.h 97;" d +GOT_UNKNOWN_HANDSHAKE_STR cyassl/sniffer_error.h 56;" d +GOT_UNKNOWN_RECORD_STR cyassl/sniffer_error.h 82;" d +GPIO0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO0_IRQHandler$/;" l +GPIO1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO1_IRQHandler$/;" l +GPIO2_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO2_IRQHandler$/;" l +GPIO3_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO3_IRQHandler$/;" l +GPIO4_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO4_IRQHandler$/;" l +GPIO5_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO5_IRQHandler$/;" l +GPIO6_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO6_IRQHandler$/;" l +GPIO7_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO7_IRQHandler$/;" l +GPIO_PORT IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GPIO_PORT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h 16;" d +GREP Makefile /^GREP = \/bin\/grep$/;" m +GZIP_ENV Makefile /^GZIP_ENV = --best$/;" m +Gamma0 ctaocrypt/src/sha256.c 123;" d file: +Gamma1 ctaocrypt/src/sha256.c 124;" d file: +GenerateM0 ctaocrypt/src/aes.c /^static void GenerateM0(Aes* aes)$/;" f file: +GeneratePrivate ctaocrypt/src/dh.c /^static int GeneratePrivate(DhKey* key, RNG* rng, byte* priv, word32* privSz)$/;" f file: +GeneratePublic ctaocrypt/src/dh.c /^static int GeneratePublic(DhKey* key, const byte* priv, word32 privSz,$/;" f file: +GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f +GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f +GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f +GenerateSeed ctaocrypt/src/random.c /^int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f +GetAlgoId ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid,$/;" f +GetBasicDate ctaocrypt/src/asn.c /^static int GetBasicDate(const byte* source, word32* idx, byte* date,$/;" f file: +GetCA IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCA(void* vp, byte* hash) $/;" f +GetCA IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCA(void* vp, byte* hash) $/;" f +GetCA src/ssl.c /^Signer* GetCA(void* vp, byte* hash)$/;" f +GetCAByName IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f +GetCAByName IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f +GetCAByName src/ssl.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f +GetCRL_Signature ctaocrypt/src/asn.c /^static int GetCRL_Signature(const byte* source, word32* idx, DecodedCRL* dcrl,$/;" f file: +GetCaviumInt ctaocrypt/src/asn.c /^static int GetCaviumInt(byte** buff, word16* buffSz, const byte* input,$/;" f file: +GetCertCacheMemSize src/ssl.c /^static INLINE int GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm)$/;" f file: +GetCertCacheRowMemory src/ssl.c /^static INLINE int GetCertCacheRowMemory(Signer* row)$/;" f file: +GetCertHeader ctaocrypt/src/asn.c /^static int GetCertHeader(DecodedCert* cert)$/;" f file: +GetContentType ctaocrypt/src/pkcs7.c /^int GetContentType(const byte* input, word32* inOutIdx, word32* oid,$/;" f +GetDate IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)$/;" f file: +GetDate IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)$/;" f file: +GetDate ctaocrypt/src/asn.c /^static int GetDate(DecodedCert* cert, int dateType)$/;" f file: +GetDtlsHandShakeHeader src/internal.c /^static int GetDtlsHandShakeHeader(CYASSL* ssl, const byte* input,$/;" f file: +GetEntropy IDE/MDK5-ARM/Projects/CryptTest/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f +GetEntropy IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f +GetEntropy ctaocrypt/test/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f +GetEntropy src/internal.c /^static byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f file: +GetEnumerated ctaocrypt/src/asn.c /^static int GetEnumerated(const byte* input, word32* inOutIdx, int *value)$/;" f file: +GetEpoch src/tls.c /^static INLINE word32 GetEpoch(CYASSL* ssl, int verify)$/;" f file: +GetError src/sniffer.c /^static void GetError(int idx, char* buffer)$/;" f file: +GetError src/sniffer.c /^static void GetError(int idx, char* str)$/;" f file: +GetExplicitVersion ctaocrypt/src/asn.c /^static int GetExplicitVersion(const byte* input, word32* inOutIdx, int* version)$/;" f file: +GetHandShakeHeader src/internal.c /^static int GetHandShakeHeader(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: +GetHashSizeByType ctaocrypt/src/hmac.c /^static INLINE int GetHashSizeByType(int type)$/;" f file: +GetInputData src/internal.c /^static int GetInputData(CYASSL *ssl, word32 size)$/;" f file: +GetInt ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx,$/;" f +GetKey ctaocrypt/src/asn.c /^static int GetKey(DecodedCert* cert)$/;" f file: +GetLength ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len,$/;" f +GetMyVersion ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, int* version)$/;" f +GetName ctaocrypt/src/asn.c /^static int GetName(DecodedCert* cert, int nameType)$/;" f file: +GetNameHash ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash,$/;" f +GetNameId ctaocrypt/src/asn.c /^static byte GetNameId(int idx)$/;" f file: +GetObjectId ctaocrypt/src/asn.c /^static int GetObjectId(const byte* input, word32* inOutIdx, word32* oid,$/;" f file: +GetOneName ctaocrypt/src/asn.c /^static const char* GetOneName(CertName* name, int idx)$/;" f file: +GetRecordHeader src/internal.c /^static int GetRecordHeader(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: +GetRecordHeader src/sniffer.c /^static int GetRecordHeader(const byte* input, RecordLayerHeader* rh, int* size)$/;" f file: +GetRevoked ctaocrypt/src/asn.c /^static int GetRevoked(const byte* buff, word32* idx, DecodedCRL* dcrl,$/;" f file: +GetRng swig/cyassl_adds.c /^RNG* GetRng(void)$/;" f +GetRounds src/internal.c /^static INLINE int GetRounds(int pLen, int padLen, int t)$/;" f file: +GetRsaInt ctaocrypt/src/asn.c /^static mp_int* GetRsaInt(RsaKey* key, int idx)$/;" f file: +GetRsaPrivateKey swig/cyassl_adds.c /^RsaKey* GetRsaPrivateKey(const char* keyFile)$/;" f +GetSEQIncrement src/internal.c /^static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify)$/;" f file: +GetSEQIncrement src/tls.c /^static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify)$/;" f file: +GetSequence ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len,$/;" f +GetSession src/ssl.c /^CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret)$/;" f +GetSessionClient src/ssl.c /^CYASSL_SESSION* GetSessionClient(CYASSL* ssl, const byte* id, int len)$/;" f +GetSet ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len,$/;" f +GetShortInt ctaocrypt/src/asn.c /^static int GetShortInt(const byte* input, word32* inOutIdx, int* number)$/;" f file: +GetSignature ctaocrypt/src/asn.c /^static int GetSignature(DecodedCert* cert)$/;" f file: +GetSignerMemory src/ssl.c /^static INLINE int GetSignerMemory(Signer* signer)$/;" f file: +GetSnifferServer src/sniffer.c /^static SnifferServer* GetSnifferServer(IpInfo* ipInfo, TcpInfo* tcpInfo)$/;" f file: +GetSnifferSession src/sniffer.c /^static SnifferSession* GetSnifferSession(IpInfo* ipInfo, TcpInfo* tcpInfo)$/;" f file: +GetTime IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)$/;" f file: +GetTime IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)$/;" f file: +GetTime ctaocrypt/src/asn.c /^static INLINE void GetTime(int* value, const byte* date, int* idx)$/;" f file: +GetValidity ctaocrypt/src/asn.c /^static int GetValidity(DecodedCert* cert, int verify)$/;" f file: +Gmac cyassl/ctaocrypt/aes.h /^typedef struct Gmac {$/;" s +Gmac cyassl/ctaocrypt/aes.h /^} Gmac;$/;" t typeref:struct:Gmac +GmacSetKey ctaocrypt/src/aes.c /^CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len)$/;" f +GmacUpdate ctaocrypt/src/aes.c /^CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,$/;" f +GrowInputBuffer src/internal.c /^int GrowInputBuffer(CYASSL* ssl, int size, int usedLength)$/;" f +GrowOutputBuffer src/internal.c /^static INLINE int GrowOutputBuffer(CYASSL* ssl, int size)$/;" f file: +Gx cyassl/ctaocrypt/ecc.h /^ const char* Gx; \/* x coordinate of the base point on curve (hex) *\/$/;" m struct:__anon72 +Gy cyassl/ctaocrypt/ecc.h /^ const char* Gy; \/* y coordinate of the base point on curve (hex) *\/$/;" m struct:__anon72 +H ctaocrypt/src/md4.c 65;" d file: +H ctaocrypt/src/ripemd.c 66;" d file: +H cyassl/ctaocrypt/aes.h /^ ALIGN16 byte H[AES_BLOCK_SIZE];$/;" m struct:Aes +HANDSHAKE_DONE cyassl/internal.h /^ HANDSHAKE_DONE$/;" e enum:states +HANDSHAKE_HEADER_SZ cyassl/internal.h /^ HANDSHAKE_HEADER_SZ = 4, \/* type + length(3) *\/$/;" e enum:Misc +HANDSHAKE_INPUT_STR cyassl/sniffer_error.h 44;" d +HASH_RNG_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l +HASH_SIG_SIZE cyassl/internal.h /^ HASH_SIG_SIZE = 2, \/* default SHA1 RSA *\/$/;" e enum:Misc +HASH_SIZE src/sniffer.c /^ HASH_SIZE = 499, \/* Session Hash Table Rows *\/$/;" e enum:__anon96 file: +HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 155;" d +HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 193;" d +HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 215;" d +HAVE_AEAD cyassl/internal.h 430;" d +HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 206;" d +HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 244;" d +HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 266;" d +HAVE_AESCCM cyassl/ctaocrypt/settings.h 597;" d +HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 212;" d +HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 250;" d +HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 272;" d +HAVE_AESGCM cyassl/ctaocrypt/settings.h 157;" d +HAVE_AES_ENGINE ctaocrypt/src/aes.c 236;" d file: +HAVE_AES_ENGINE cyassl/ctaocrypt/settings.h 153;" d +HAVE_ARPA_INET_H config.h 11;" d +HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 167;" d +HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 205;" d +HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 227;" d +HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 263;" d +HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 301;" d +HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 323;" d +HAVE_CONFIG_H swig/cyassl_adds.c 29;" d file: +HAVE_DLFCN_H config.h 14;" d +HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 194;" d +HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 232;" d +HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 254;" d +HAVE_ECC cyassl/ctaocrypt/settings.h 118;" d +HAVE_ECC cyassl/ctaocrypt/settings.h 188;" d +HAVE_ECC cyassl/ctaocrypt/settings.h 609;" d +HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 251;" d +HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 289;" d +HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 311;" d +HAVE_ERRNO_H config.h 17;" d +HAVE_FCNTL_H config.h 20;" d +HAVE_GETADDRINFO config.h 23;" d +HAVE_GETHOSTBYNAME config.h 26;" d +HAVE_GETTIMEOFDAY config.h 29;" d +HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 142;" d +HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 180;" d +HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 202;" d +HAVE_INET_NTOA config.h 32;" d +HAVE_INTTYPES_H config.h 35;" d +HAVE_KEIL_RTX IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 35;" d +HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 257;" d +HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 295;" d +HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 317;" d +HAVE_LIMITS_H config.h 44;" d +HAVE_MEMORY_H config.h 47;" d +HAVE_MEMSET config.h 50;" d +HAVE_NETDB_H config.h 53;" d +HAVE_NETINET_IN_H config.h 56;" d +HAVE_NETX cyassl/ctaocrypt/settings.h 107;" d +HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 219;" d +HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 257;" d +HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 279;" d +HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 32;" d +HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 33;" d +HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 33;" d +HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 35;" d +HAVE_NULL_CIPHER cyassl/ctaocrypt/settings.h 200;" d +HAVE_OPENSSL_CMD Makefile /^HAVE_OPENSSL_CMD = $/;" m +HAVE_OPENSSL_ENGINE_H cyassl/openssl/engine.h 3;" d +HAVE_PTHREAD config.h 62;" d +HAVE_PTHREAD_PRIO_INHERIT config.h 65;" d +HAVE_SOCKET config.h 68;" d +HAVE_STDDEF_H config.h 71;" d +HAVE_STDINT_H config.h 74;" d +HAVE_STDLIB_H config.h 77;" d +HAVE_STRINGS_H config.h 80;" d +HAVE_STRING_H config.h 83;" d +HAVE_SYS_IOCTL_H config.h 86;" d +HAVE_SYS_SOCKET_H config.h 89;" d +HAVE_SYS_STAT_H config.h 92;" d +HAVE_SYS_TIME_H config.h 95;" d +HAVE_SYS_TYPES_H config.h 98;" d +HAVE_THREAD_LS cyassl/options.h 19;" d +HAVE_THREAD_LS cyassl/options.h 20;" d +HAVE_UNISTD_H config.h 101;" d +HAVE_VALGRIND Makefile /^HAVE_VALGRIND = $/;" m +HAVE_VISIBILITY Makefile /^HAVE_VISIBILITY = 1$/;" m +HAVE_VISIBILITY config.h 105;" d +HAVE_WEBSERVER cyassl/ctaocrypt/settings.h 311;" d +HAVE_WEBSERVER cyassl/options.h 34;" d +HAVE_WEBSERVER cyassl/options.h 35;" d +HC128 cyassl/ctaocrypt/hc128.h /^typedef struct HC128 {$/;" s +HC128 cyassl/ctaocrypt/hc128.h /^} HC128;$/;" t typeref:struct:HC128 +HC128_ENC_TYPE cyassl/ctaocrypt/hc128.h /^ HC128_ENC_TYPE = 6 \/* cipher unique type *\/$/;" e enum:__anon44 +HC_128_IV_SIZE cyassl/internal.h /^ HC_128_IV_SIZE = 16, \/* also 128 bits *\/$/;" e enum:Misc +HC_128_KEY_SIZE cyassl/internal.h /^ HC_128_KEY_SIZE = 16, \/* 128 bits *\/$/;" e enum:Misc +HEADERS Makefile /^HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \\$/;" m +HELLO_AGAIN cyassl/internal.h /^ HELLO_AGAIN, \/* HELLO_AGAIN s for DTLS case *\/$/;" e enum:ConnectState +HELLO_AGAIN_REPLY cyassl/internal.h /^ HELLO_AGAIN_REPLY,$/;" e enum:ConnectState +HELLO_EXT_LEN cyassl/internal.h /^ HELLO_EXT_LEN = 6, \/* length of the lazy hello extensions *\/$/;" e enum:Misc +HELLO_EXT_SIGALGO_MAX cyassl/internal.h /^ HELLO_EXT_SIGALGO_MAX = 32, \/* number of items in the signature algo list *\/$/;" e enum:Misc +HELLO_EXT_SIGALGO_SZ cyassl/internal.h /^ HELLO_EXT_SIGALGO_SZ = 2, \/* length of signature algo extension *\/$/;" e enum:Misc +HELLO_EXT_SIG_ALGO cyassl/internal.h /^ HELLO_EXT_SIG_ALGO = 13, \/* ID for the sig_algo hello extension *\/$/;" e enum:Misc +HELLO_EXT_SZ cyassl/internal.h /^ HELLO_EXT_SZ = 8, \/* total length of the lazy hello extensions *\/$/;" e enum:Misc +HELLO_EXT_TYPE_SZ cyassl/internal.h /^ HELLO_EXT_TYPE_SZ = 2, \/* length of a hello extension type *\/$/;" e enum:Misc +HELLO_VERIFY_SENT cyassl/internal.h /^ HELLO_VERIFY_SENT,$/;" e enum:AcceptState +HEX_VERSION Makefile /^HEX_VERSION = 0x03000000$/;" m +HINT_LEN_SZ cyassl/internal.h /^ HINT_LEN_SZ = 2, \/* length of hint size field *\/$/;" e enum:Misc +HKDF ctaocrypt/src/hmac.c /^int HKDF(int type, const byte* inKey, word32 inKeySz,$/;" f +HMAC cyassl/openssl/hmac.h 68;" d +HMAC_BLOCK_SIZE cyassl/ctaocrypt/hmac.h /^ HMAC_BLOCK_SIZE = SHA512_BLOCK_SIZE$/;" e enum:__anon66 +HMAC_CTX cyassl/openssl/hmac.h /^typedef struct CYASSL_HMAC_CTX HMAC_CTX;$/;" t typeref:struct:CYASSL_HMAC_CTX +HMAC_Final cyassl/openssl/hmac.h 72;" d +HMAC_Init cyassl/openssl/hmac.h 70;" d +HMAC_Update cyassl/openssl/hmac.h 71;" d +HMAC_cleanup cyassl/openssl/hmac.h 73;" d +HSHASH_SZ src/tls.c 248;" d file: +HSHASH_SZ src/tls.c 250;" d file: +HTTP_AUTHPASSW IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 578;" d file: +HTTP_AUTHREALM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 570;" d file: +HTTP_AUTHUSER IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 574;" d file: +HTTP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 544;" d file: +HTTP_ENAUTH IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 566;" d file: +HTTP_NUMSESS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 549;" d file: +HTTP_PORTNUM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 554;" d file: +HTTP_SRVID IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 560;" d file: +HW_NAME_OID cyassl/ctaocrypt/asn.h /^ HW_NAME_OID = 79 \/* 1.3.6.1.5.5.7.8.4 from RFC 4108*\/$/;" e enum:SepHardwareName_Sum +HandShakeCallBack cyassl/ssl.h /^typedef int (*HandShakeCallBack)(HandShakeInfo*);$/;" t +HandShakeHeader cyassl/internal.h /^typedef struct HandShakeHeader {$/;" s +HandShakeHeader cyassl/internal.h /^} HandShakeHeader;$/;" t typeref:struct:HandShakeHeader +HandShakeInfo cyassl/callbacks.h /^} HandShakeInfo;$/;" t typeref:struct:handShakeInfo_st +HandShakeType cyassl/internal.h /^enum HandShakeType {$/;" g +Hash cyassl/ctaocrypt/hmac.h /^} Hash;$/;" t typeref:union:__anon67 +HashInput src/internal.c /^static int HashInput(CYASSL* ssl, const byte* input, int sz)$/;" f file: +HashOutput src/internal.c /^static int HashOutput(CYASSL* ssl, const byte* output, int sz, int ivSz)$/;" f file: +HashSession src/ssl.c /^static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error)$/;" f file: +HashSigner src/ssl.c /^static INLINE word32 HashSigner(const byte* hash)$/;" f file: +HashTest tests/hash.c /^int HashTest(void)$/;" f +Hash_DBRG_Generate ctaocrypt/src/random.c /^static int Hash_DBRG_Generate(RNG* rng, byte* out, word32 outSz)$/;" f file: +Hash_DBRG_Instantiate ctaocrypt/src/random.c /^static int Hash_DBRG_Instantiate(RNG* rng, byte* seed, word32 seedSz)$/;" f file: +Hash_DBRG_Reseed ctaocrypt/src/random.c /^static int Hash_DBRG_Reseed(RNG* rng, byte* entropy, word32 entropySz)$/;" f file: +Hash_DBRG_Uninstantiate ctaocrypt/src/random.c /^static int Hash_DBRG_Uninstantiate(RNG* rng)$/;" f file: +Hash_Sum cyassl/ctaocrypt/asn.h /^enum Hash_Sum {$/;" g +Hash_df ctaocrypt/src/random.c /^static int Hash_df(RNG* rng, byte* out, word32 outSz, byte type, byte* inA, word32 inASz,$/;" f file: +Hash_gen ctaocrypt/src/random.c /^static int Hash_gen(RNG* rng, byte* out, word32 outSz, byte* V)$/;" f file: +Hashes cyassl/internal.h /^typedef struct Hashes {$/;" s +Hashes cyassl/internal.h /^} Hashes;$/;" t typeref:struct:Hashes +HaveMoreInput src/sniffer.c /^static int HaveMoreInput(SnifferSession* session, const byte** sslFrame,$/;" f file: +Hc128_Process ctaocrypt/src/hc128.c /^int Hc128_Process(HC128* ctx, byte* output, const byte* input, word32 msglen)$/;" f +Hc128_SetIV ctaocrypt/src/hc128.c /^static void Hc128_SetIV(HC128* ctx, const byte* inIv)$/;" f file: +Hc128_SetKey ctaocrypt/src/hc128.c /^int Hc128_SetKey(HC128* ctx, const byte* key, const byte* iv)$/;" f +Heap_Mem IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Mem IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l +Heap_Size IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Heap_Size EQU 0x0000a000$/;" d +Heap_Size IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x0000F000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d +Heap_Size IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x0000A000$/;" d +Hmac cyassl/ctaocrypt/hmac.h /^typedef struct Hmac {$/;" s +Hmac cyassl/ctaocrypt/hmac.h /^} Hmac;$/;" t typeref:struct:Hmac +HmacCaviumFinal ctaocrypt/src/hmac.c /^static void HmacCaviumFinal(Hmac* hmac, byte* hash)$/;" f file: +HmacCaviumSetKey ctaocrypt/src/hmac.c /^static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key,$/;" f file: +HmacCaviumUpdate ctaocrypt/src/hmac.c /^static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length)$/;" f file: +HmacFinal ctaocrypt/src/hmac.c /^int HmacFinal(Hmac* hmac, byte* hash)$/;" f +HmacFinal cyassl/ctaocrypt/hmac.h 186;" d +HmacFreeCavium ctaocrypt/src/hmac.c /^void HmacFreeCavium(Hmac* hmac)$/;" f +HmacInitCavium ctaocrypt/src/hmac.c /^int HmacInitCavium(Hmac* hmac, int devId)$/;" f +HmacKeyInnerHash ctaocrypt/src/hmac.c /^static int HmacKeyInnerHash(Hmac* hmac)$/;" f file: +HmacSetKey ctaocrypt/src/hmac.c /^int HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length)$/;" f +HmacSetKey cyassl/ctaocrypt/hmac.h 184;" d +HmacUpdate ctaocrypt/src/hmac.c /^int HmacUpdate(Hmac* hmac, const byte* msg, word32 length)$/;" f +HmacUpdate cyassl/ctaocrypt/hmac.h 185;" d +I ctaocrypt/src/ripemd.c 67;" d file: +I2C0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2C0_IRQHandler$/;" l +I2C1_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l +I2C1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2C1_IRQHandler$/;" l +I2C2_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l +I2S0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2S0_IRQHandler$/;" l +I2S1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2S1_IRQHandler$/;" l +ID_LEN cyassl/internal.h /^ ID_LEN = 32, \/* session id length *\/$/;" e enum:Misc +IF_DELIMITER IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 320;" d file: +IF_DELIMITER IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 325;" d file: +IGMP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 213;" d file: +IGMP_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 218;" d file: +INCOMPLETE_DATA cyassl/error-ssl.h /^ INCOMPLETE_DATA = -210, \/* don't have enough data to$/;" e enum:CyaSSL_ErrorCodes +INC_AMINCLUDE Makefile /^INC_AMINCLUDE = include $(top_builddir)\/aminclude.am$/;" m +INFINITE cyassl/test.h 116;" d +INFO_LOG cyassl/ctaocrypt/logging.h /^ INFO_LOG,$/;" e enum:CYA_Log_Levels +INHIBIT_ANY_OID cyassl/ctaocrypt/asn.h /^ INHIBIT_ANY_OID = 168, \/* 2.5.29.54 *\/$/;" e enum:Extensions_Sum +INITMODE_TIMEOUT IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 49;" d file: +INITMODE_TIMEOUT IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 49;" d file: +INLINE cyassl/ctaocrypt/types.h 112;" d +INLINE cyassl/ctaocrypt/types.h 114;" d +INLINE cyassl/ctaocrypt/types.h 116;" d +INLINE cyassl/ctaocrypt/types.h 118;" d +INLINE cyassl/ctaocrypt/types.h 120;" d +INLINE cyassl/ctaocrypt/types.h 123;" d +INNERMUL ctaocrypt/src/asm.c 218;" d file: +INNERMUL ctaocrypt/src/asm.c 324;" d file: +INNERMUL ctaocrypt/src/asm.c 351;" d file: +INNERMUL ctaocrypt/src/asm.c 381;" d file: +INNERMUL ctaocrypt/src/asm.c 411;" d file: +INNERMUL ctaocrypt/src/asm.c 443;" d file: +INNERMUL ctaocrypt/src/asm.c 45;" d file: +INNERMUL ctaocrypt/src/asm.c 472;" d file: +INNERMUL ctaocrypt/src/asm.c 77;" d file: +INNERMUL8 ctaocrypt/src/asm.c 229;" d file: +INNERMUL8 ctaocrypt/src/asm.c 90;" d file: +INPUT_CASE_ERROR cyassl/error-ssl.h /^ INPUT_CASE_ERROR = -201, \/* process input state error *\/$/;" e enum:CyaSSL_ErrorCodes +INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m +INSTALL_DATA Makefile /^INSTALL_DATA = ${INSTALL} -m 644$/;" m +INSTALL_HEADER Makefile /^INSTALL_HEADER = $(INSTALL_DATA)$/;" m +INSTALL_PROGRAM Makefile /^INSTALL_PROGRAM = ${INSTALL}$/;" m +INSTALL_SCRIPT Makefile /^INSTALL_SCRIPT = ${INSTALL}$/;" m +INSTALL_STRIP_PROGRAM Makefile /^INSTALL_STRIP_PROGRAM = $(install_sh) -c -s$/;" m +INTEL_INTRINSICS cyassl/ctaocrypt/types.h 130;" d +INVALID_BYTE cyassl/internal.h /^ INVALID_BYTE = 0xff, \/* Used to initialize cipher specs values *\/$/;" e enum:Misc +IOCB_CookieCtx cyassl/internal.h /^ void* IOCB_CookieCtx; \/* gen cookie ctx *\/$/;" m struct:CYASSL +IOCB_ReadCtx cyassl/internal.h /^ void* IOCB_ReadCtx;$/;" m struct:CYASSL +IOCB_WriteCtx cyassl/internal.h /^ void* IOCB_WriteCtx;$/;" m struct:CYASSL +IOerrors cyassl/ssl.h /^enum IOerrors {$/;" g +IPAD cyassl/ctaocrypt/hmac.h /^ IPAD = 0x36,$/;" e enum:__anon66 +IPERM ctaocrypt/src/des3.c /^static INLINE void IPERM(word32* left, word32* right)$/;" f file: +IPV4 src/sniffer.c /^ IPV4 = 4, \/* IP version 4 *\/$/;" e enum:__anon96 file: +IP_CHECK_STR cyassl/sniffer_error.h 31;" d +IP_HDR_SZ src/sniffer.c /^ IP_HDR_SZ = 20, \/* IP header legnth, min *\/$/;" e enum:__anon96 file: +IP_HL src/sniffer.c 558;" d file: +IP_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 363;" d file: +IP_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 370;" d file: +IP_V src/sniffer.c 559;" d file: +ISSUER cyassl/ctaocrypt/asn.h /^ ISSUER = 0,$/;" e enum:__anon60 +ISSUER_E cyassl/ctaocrypt/error-crypt.h /^ ISSUER_E = -137, \/* setting issuer name error *\/$/;" e enum:__anon61 +IS_OFF src/tls.c 1824;" d file: +IS_OFF src/tls.c 578;" d file: +IV_SIZE_64 cyassl/ctaocrypt/ecc.h /^ IV_SIZE_64 = 8,$/;" e enum:__anon75 +IV_SZ cyassl/internal.h /^ IV_SZ = 32, \/* max iv sz *\/$/;" e enum:__anon15 +IncrementAesCounter ctaocrypt/src/aes.c /^static INLINE void IncrementAesCounter(byte* inOutCtr)$/;" f file: +IncrementGcmCounter ctaocrypt/src/aes.c /^static INLINE void IncrementGcmCounter(byte* inOutCtr)$/;" f file: +InitBlake2b ctaocrypt/src/blake2b.c /^int InitBlake2b(Blake2b* b2b, word32 digestSz)$/;" f +InitCRL src/crl.c /^int InitCRL(CYASSL_CRL* crl, CYASSL_CERT_MANAGER* cm)$/;" f +InitCRL_Entry src/crl.c /^static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl)$/;" f file: +InitCaviumRsaKey ctaocrypt/src/rsa.c /^static int InitCaviumRsaKey(RsaKey* key, void* heap)$/;" f file: +InitCert ctaocrypt/src/asn.c /^void InitCert(Cert* cert)$/;" f +InitCipherSpecs src/internal.c /^void InitCipherSpecs(CipherSpecs* cs)$/;" f +InitCiphers src/internal.c /^void InitCiphers(CYASSL* ssl)$/;" f +InitCyaSSL_BigNum src/ssl.c /^ static void InitCyaSSL_BigNum(CYASSL_BIGNUM* bn)$/;" f file: +InitCyaSSL_DH src/ssl.c /^ static void InitCyaSSL_DH(CYASSL_DH* dh)$/;" f file: +InitCyaSSL_DSA src/ssl.c /^ static void InitCyaSSL_DSA(CYASSL_DSA* dsa)$/;" f file: +InitCyaSSL_Rsa src/ssl.c /^ static void InitCyaSSL_Rsa(CYASSL_RSA* rsa)$/;" f file: +InitDecodedCRL ctaocrypt/src/asn.c /^void InitDecodedCRL(DecodedCRL* dcrl)$/;" f +InitDecodedCert ctaocrypt/src/asn.c /^void InitDecodedCert(DecodedCert* cert, byte* source, word32 inSz, void* heap)$/;" f +InitDhKey ctaocrypt/src/dh.c /^void InitDhKey(DhKey* key)$/;" f +InitDsaKey ctaocrypt/src/dsa.c /^void InitDsaKey(DsaKey* key)$/;" f +InitFinCapture src/sniffer.c /^static void InitFinCapture(FinCaputre* cap)$/;" f file: +InitFlags src/sniffer.c /^static void InitFlags(Flags* flags)$/;" f file: +InitGcmCounter ctaocrypt/src/aes.c /^static INLINE void InitGcmCounter(byte* inOutCtr)$/;" f file: +InitHandShakeInfo src/internal.c /^ void InitHandShakeInfo(HandShakeInfo* info)$/;" f +InitHmac ctaocrypt/src/hmac.c /^static int InitHmac(Hmac* hmac, int type)$/;" f file: +InitMd2 ctaocrypt/src/md2.c /^void InitMd2(Md2* md2)$/;" f +InitMd4 ctaocrypt/src/md4.c /^void InitMd4(Md4* md4)$/;" f +InitMd5 ctaocrypt/src/hmac.c 32;" d file: +InitMd5 ctaocrypt/src/md5.c /^ void InitMd5(Md5* md5)$/;" f +InitMd5 ctaocrypt/src/md5.c /^void InitMd5(Md5* md5)$/;" f +InitMd5 ctaocrypt/src/md5.c 32;" d file: +InitMd5 ctaocrypt/src/pwdbased.c 32;" d file: +InitMemoryTracker cyassl/test.h /^ static INLINE void InitMemoryTracker(void) $/;" f +InitMutex ctaocrypt/src/port.c /^ int InitMutex(CyaSSL_Mutex* m)$/;" f +InitMutex ctaocrypt/src/port.c /^ int InitMutex(CyaSSL_Mutex* m)$/;" f +InitMutex ctaocrypt/src/port.c /^int InitMutex(CyaSSL_Mutex* m)$/;" f +InitOCSP src/ocsp.c /^int InitOCSP(CYASSL_OCSP* ocsp, CYASSL_CERT_MANAGER* cm)$/;" f +InitOCSP_Entry src/ocsp.c /^static int InitOCSP_Entry(OCSP_Entry* ocspe, DecodedCert* cert)$/;" f file: +InitOcspRequest ctaocrypt/src/asn.c /^void InitOcspRequest(OcspRequest* req, DecodedCert* cert, byte useNonce,$/;" f +InitOcspResponse ctaocrypt/src/asn.c /^void InitOcspResponse(OcspResponse* resp, CertStatus* status,$/;" f +InitRipeMd ctaocrypt/src/ripemd.c /^void InitRipeMd(RipeMd* ripemd)$/;" f +InitRng ctaocrypt/src/random.c /^int InitRng(RNG* rng)$/;" f +InitRngCavium ctaocrypt/src/random.c /^int InitRngCavium(RNG* rng, int devId)$/;" f +InitRsaKey ctaocrypt/src/rsa.c /^int InitRsaKey(RsaKey* key, void* heap)$/;" f +InitRsaKey cyassl/ctaocrypt/rsa.h 121;" d +InitSSL src/internal.c /^int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx)$/;" f +InitSSL_Ctx src/internal.c /^int InitSSL_Ctx(CYASSL_CTX* ctx, CYASSL_METHOD* method)$/;" f +InitSSL_Method src/internal.c /^void InitSSL_Method(CYASSL_METHOD* method, ProtocolVersion pv)$/;" f +InitSession src/sniffer.c /^static void InitSession(SnifferSession* session)$/;" f file: +InitSha ctaocrypt/src/hmac.c 36;" d file: +InitSha ctaocrypt/src/pwdbased.c 36;" d file: +InitSha ctaocrypt/src/sha.c /^ int InitSha(Sha* sha)$/;" f +InitSha ctaocrypt/src/sha.c /^int InitSha(Sha* sha)$/;" f +InitSha ctaocrypt/src/sha.c 32;" d file: +InitSha cyassl/ctaocrypt/sha.h 77;" d +InitSha256 ctaocrypt/src/hmac.c 40;" d file: +InitSha256 ctaocrypt/src/pwdbased.c 40;" d file: +InitSha256 ctaocrypt/src/sha256.c /^int InitSha256(Sha256* sha256)$/;" f +InitSha256 ctaocrypt/src/sha256.c 34;" d file: +InitSha256 cyassl/ctaocrypt/sha256.h 76;" d +InitSha384 ctaocrypt/src/sha512.c /^int InitSha384(Sha384* sha384)$/;" f +InitSha384 cyassl/ctaocrypt/sha512.h 103;" d +InitSha512 ctaocrypt/src/sha512.c /^int InitSha512(Sha512* sha512)$/;" f +InitSha512 cyassl/ctaocrypt/sha512.h 92;" d +InitSnifferServer src/sniffer.c /^static void InitSnifferServer(SnifferServer* sniffer)$/;" f file: +InitStreams src/internal.c /^ static int InitStreams(CYASSL* ssl)$/;" f file: +InitSuites src/internal.c /^void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK,$/;" f +InitTcpReady tests/unit.c /^void InitTcpReady(tcp_ready* ready)$/;" f +InitTcpReady testsuite/testsuite.c /^void InitTcpReady(tcp_ready* ready)$/;" f +InitTimeoutInfo src/internal.c /^ void InitTimeoutInfo(TimeoutInfo* info)$/;" f +InitX509 src/internal.c /^void InitX509(CYASSL_X509* x509, int dynamicFlag)$/;" f +InitX509Name src/internal.c /^void InitX509Name(CYASSL_X509_NAME* name, int dynamicFlag)$/;" f +IpHdr src/sniffer.c /^typedef struct IpHdr {$/;" s file: +IpHdr src/sniffer.c /^} IpHdr;$/;" t typeref:struct:IpHdr file: +IpInfo src/sniffer.c /^typedef struct IpInfo {$/;" s file: +IpInfo src/sniffer.c /^} IpInfo;$/;" t typeref:struct:IpInfo file: +IpToS src/sniffer.c /^static char* IpToS(word32 addr, char* str)$/;" f file: +IsAtLeastTLSv1_2 src/internal.c /^int IsAtLeastTLSv1_2(const CYASSL* ssl)$/;" f +IsOldTlsVersion tests/suites.c /^static int IsOldTlsVersion(const char* line)$/;" f file: +IsPortRegistered src/sniffer.c /^static int IsPortRegistered(word32 port)$/;" f file: +IsServerRegistered src/sniffer.c /^static int IsServerRegistered(word32 addr)$/;" f file: +IsTLS src/internal.c /^int IsTLS(const CYASSL* ssl)$/;" f +IsValidCipherSuite tests/suites.c /^static int IsValidCipherSuite(const char* line, char* suite)$/;" f file: +Itimerval src/ssl.c /^ typedef struct itimerval Itimerval;$/;" t typeref:struct:itimerval file: +J ctaocrypt/src/ripemd.c 68;" d file: +JOINT_LEN cyassl/ctaocrypt/asn.h /^ JOINT_LEN = 2,$/;" e enum:cert_enums +K ctaocrypt/src/sha256.c /^static const word32 K[64] = {$/;" v file: +K512 ctaocrypt/src/sha512.c /^static const word64 K512[80] = {$/;" v file: +KB_SIZE ctaocrypt/src/ecc.c 2969;" d file: +KB_SIZE ctaocrypt/src/ecc.c 3110;" d file: +KB_SIZE ctaocrypt/src/ecc.c 3121;" d file: +KB_SIZE ctaocrypt/src/ecc.c 3350;" d file: +KDF_Sum cyassl/ctaocrypt/asn.h /^enum KDF_Sum {$/;" g +KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 606;" d +KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 624;" d +KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 625;" d +KEIL_FS_open IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c /^static int KEIL_FS_open(const char *name, int openmode) $/;" f file: +KEIL_INTRINSICS cyassl/ctaocrypt/settings.h 387;" d +KEYUSE_CONTENT_COMMIT cyassl/ctaocrypt/asn.h 256;" d +KEYUSE_CRL_SIGN cyassl/ctaocrypt/asn.h 261;" d +KEYUSE_DATA_ENCIPHER cyassl/ctaocrypt/asn.h 258;" d +KEYUSE_DECIPHER_ONLY cyassl/ctaocrypt/asn.h 263;" d +KEYUSE_DIGITAL_SIG cyassl/ctaocrypt/asn.h 255;" d +KEYUSE_ENCIPHER_E cyassl/error-ssl.h /^ KEYUSE_ENCIPHER_E = -285, \/* KeyUse keyEncipher error *\/$/;" e enum:CyaSSL_ErrorCodes +KEYUSE_ENCIPHER_ONLY cyassl/ctaocrypt/asn.h 262;" d +KEYUSE_KEY_AGREE cyassl/ctaocrypt/asn.h 259;" d +KEYUSE_KEY_CERT_SIGN cyassl/ctaocrypt/asn.h 260;" d +KEYUSE_KEY_ENCIPHER cyassl/ctaocrypt/asn.h 257;" d +KEYUSE_SIGNATURE_E cyassl/error-ssl.h /^ KEYUSE_SIGNATURE_E = -283, \/* KeyUse digSignature error *\/$/;" e enum:CyaSSL_ErrorCodes +KEY_EXCHANGE_SENT cyassl/internal.h /^ KEY_EXCHANGE_SENT,$/;" e enum:AcceptState +KEY_FILE_STR cyassl/sniffer_error.h 78;" d +KEY_LABEL_SZ cyassl/internal.h /^ KEY_LABEL_SZ = 13, \/* TLS key block expansion sz *\/$/;" e enum:Misc +KEY_PREFIX src/keys.c /^ KEY_PREFIX = 7 \/* up to 7 prefix letters for key rounds *\/$/;" e enum:KeyStuff file: +KEY_SIZE_128 cyassl/ctaocrypt/ecc.h /^ KEY_SIZE_128 = 16, $/;" e enum:__anon75 +KEY_SIZE_256 cyassl/ctaocrypt/ecc.h /^ KEY_SIZE_256 = 32, $/;" e enum:__anon75 +KEY_TABLE_TYPE cyassl/ctaocrypt/camellia.h /^typedef word32 KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN];$/;" t +KEY_USAGE_OID cyassl/ctaocrypt/asn.h /^ KEY_USAGE_OID = 129, \/* 2.5.29.15 *\/$/;" e enum:Extensions_Sum +KeyExchangeAlgorithm cyassl/internal.h /^enum KeyExchangeAlgorithm { $/;" g +KeyStuff src/keys.c /^enum KeyStuff {$/;" g file: +Key_Sum cyassl/ctaocrypt/asn.h /^enum Key_Sum {$/;" g +Keys cyassl/internal.h /^typedef struct Keys {$/;" s +Keys cyassl/internal.h /^} Keys;$/;" t typeref:struct:Keys +LARGE_STATIC_BUFFERS cyassl/ctaocrypt/settings.h 546;" d +LARGE_STATIC_BUFFERS cyassl/ctaocrypt/settings.h 549;" d +LARGE_STATIC_BUFFERS cyassl/internal.h 858;" d +LARGE_STATIC_BUFFERS cyassl/internal.h 859;" d +LAST ctaocrypt/src/aes_asm.s /^LAST:$/;" l +LCD_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^LCD_IRQHandler$/;" l +LD Makefile /^LD = \/usr\/bin\/ld$/;" m +LDFLAGS Makefile /^LDFLAGS = $/;" m +LEAPYEAR ctaocrypt/src/asn.c 203;" d file: +LEAVE_LOG cyassl/ctaocrypt/logging.h /^ LEAVE_LOG,$/;" e enum:CYA_Log_Levels +LENGTH_ERROR cyassl/error-ssl.h /^ LENGTH_ERROR = -241, \/* record layer length error *\/$/;" e enum:CyaSSL_ErrorCodes +LENGTH_SZ cyassl/internal.h /^ LENGTH_SZ = 2, \/* length field for HMAC, data only *\/$/;" e enum:Misc +LHOST_NAME IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 23;" d file: +LIBCYASSL_VERSION_HEX cyassl/version.h 30;" d +LIBCYASSL_VERSION_STRING cyassl/version.h 29;" d +LIBM Makefile /^LIBM = -lm$/;" m +LIBOBJS Makefile /^LIBOBJS = $/;" m +LIBS Makefile /^LIBS = $/;" m +LIBTOOL Makefile /^LIBTOOL = $(SHELL) $(top_builddir)\/libtool$/;" m +LINESIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 536;" d file: +LINESIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 588;" d file: +LINK Makefile /^LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\$/;" m +LIPO Makefile /^LIPO = $/;" m +LITTLE32 ctaocrypt/src/hc128.c 42;" d file: +LITTLE32 ctaocrypt/src/hc128.c 44;" d file: +LITTLE32 ctaocrypt/src/rabbit.c 41;" d file: +LITTLE32 ctaocrypt/src/rabbit.c 43;" d file: +LITTLE_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 518;" d +LITTLE_ENDIAN_ORDER cyassl/ctaocrypt/types.h 39;" d +LN_S Makefile /^LN_S = ln -s$/;" m +LO ctaocrypt/src/asm.c 487;" d file: +LOCAL_IF_ADDR_LEN src/sniffer.c /^ LOCAL_IF_ADDR_LEN = 4, \/* localhost interface address length, !windows *\/$/;" e enum:__anon96 file: +LOG_COMPILE Makefile /^LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)$/;" m +LOG_DRIVER Makefile /^LOG_DRIVER = $(SHELL) $(top_srcdir)\/build-aux\/test-driver$/;" m +LOOP ctaocrypt/src/aes_asm.s /^LOOP:$/;" l +LOOP_END ctaocrypt/src/asm.c 299;" d file: +LOOP_END ctaocrypt/src/asm.c 317;" d file: +LOOP_END ctaocrypt/src/asm.c 377;" d file: +LOOP_END ctaocrypt/src/asm.c 407;" d file: +LOOP_END ctaocrypt/src/asm.c 41;" d file: +LOOP_END ctaocrypt/src/asm.c 439;" d file: +LOOP_END ctaocrypt/src/asm.c 468;" d file: +LOOP_END ctaocrypt/src/asm.c 73;" d file: +LOOP_START ctaocrypt/src/asm.c 210;" d file: +LOOP_START ctaocrypt/src/asm.c 318;" d file: +LOOP_START ctaocrypt/src/asm.c 378;" d file: +LOOP_START ctaocrypt/src/asm.c 408;" d file: +LOOP_START ctaocrypt/src/asm.c 42;" d file: +LOOP_START ctaocrypt/src/asm.c 440;" d file: +LOOP_START ctaocrypt/src/asm.c 469;" d file: +LOOP_START ctaocrypt/src/asm.c 74;" d file: +LSR_FS cyassl/ctaocrypt/settings.h 323;" d +LTCCASCOMPILE Makefile /^LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \\$/;" m +LTCOMPILE Makefile /^LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\$/;" m +LTLIBOBJS Makefile /^LTLIBOBJS = $/;" m +LTLIBRARIES Makefile /^LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)$/;" m +LTM1 cyassl/ctaocrypt/mpi_class.h 30;" d +LTM2 cyassl/ctaocrypt/mpi_class.h 28;" d +LTM3 cyassl/ctaocrypt/mpi_class.h 25;" d +LTM_ALL cyassl/ctaocrypt/mpi_superclass.h 26;" d +LTM_LAST cyassl/ctaocrypt/mpi_class.h 1011;" d +LTM_LAST cyassl/ctaocrypt/mpi_class.h 1016;" d +LTM_PRIME_2MSB_ON cyassl/ctaocrypt/integer.h 147;" d +LTM_PRIME_BBS cyassl/ctaocrypt/integer.h 145;" d +LTM_PRIME_SAFE cyassl/ctaocrypt/integer.h 146;" d +LT_OBJDIR config.h 109;" d +LUT ctaocrypt/src/ecc.c /^ ecc_point* LUT[1U<$(distdir).tar.bz2$/;" m +tardir Makefile /^ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz$/;" m +tardir Makefile /^ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz$/;" m +tardir Makefile /^ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z$/;" m +tardir Makefile /^ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz$/;" m +target_alias Makefile /^target_alias = $/;" m +tcp_accept cyassl/test.h /^static INLINE void tcp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd,$/;" f +tcp_connect IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 77;" d +tcp_connect IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 77;" d +tcp_connect cyassl/test.h /^static INLINE void tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port,$/;" f +tcp_connect src/io.c /^static int tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port)$/;" f file: +tcp_connect swig/cyassl_adds.c /^static int tcp_connect(SOCKET_T* sockfd, const char* ip, short port)$/;" f file: +tcp_listen IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 79;" d +tcp_listen IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 79;" d +tcp_listen cyassl/test.h /^static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr,$/;" f +tcp_poll IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c /^__task void tcp_poll (void)$/;" f +tcp_poll IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c /^void tcp_poll (void const *arg)$/;" f +tcp_poll IDE/MDK5-ARM/Projects/EchoClient/main.c /^void tcp_poll (void const *arg)$/;" f +tcp_poll IDE/MDK5-ARM/Projects/EchoServer/main.c /^void tcp_poll (void const *arg)$/;" f +tcp_poll IDE/MDK5-ARM/Projects/SimpleClient/main.c /^void tcp_poll (void const *arg)$/;" f +tcp_poll IDE/MDK5-ARM/Projects/SimpleServer/main.c /^void tcp_poll (void const *arg)$/;" f +tcp_ready cyassl/test.h /^typedef struct tcp_ready {$/;" s +tcp_ready cyassl/test.h /^} tcp_ready; $/;" t typeref:struct:tcp_ready +tcp_select IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 80;" d +tcp_select IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 80;" d +tcp_select cyassl/test.h /^static INLINE int tcp_select(SOCKET_T socketfd, int to_sec)$/;" f +tcp_set_nonblocking cyassl/test.h /^static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)$/;" f +tcp_socket IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 78;" d +tcp_socket IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 78;" d +tcp_socket cyassl/test.h /^static INLINE void tcp_socket(SOCKET_T* sockfd, int udp)$/;" f +tcp_socket swig/cyassl_adds.c /^static int tcp_socket(SOCKET_T* sockfd, SOCKADDR_IN_T* addr, const char* peer,$/;" f file: +tcp_tick IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c /^__task void tcp_tick (void) $/;" f +terma ctaocrypt/src/ecc.c /^ int ham, terma, termb;$/;" m struct:__anon3 file: +termb ctaocrypt/src/ecc.c /^ int ham, terma, termb;$/;" m struct:__anon3 file: +testVector IDE/MDK5-ARM/Projects/CryptTest/test.c /^typedef struct testVector {$/;" s file: +testVector IDE/MDK5-ARM/Projects/CryptTest/test.c /^} testVector;$/;" t typeref:struct:testVector file: +testVector IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^typedef struct testVector {$/;" s file: +testVector IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^} testVector;$/;" t typeref:struct:testVector file: +testVector ctaocrypt/test/test.c /^typedef struct testVector {$/;" s file: +testVector ctaocrypt/test/test.c /^} testVector;$/;" t typeref:struct:testVector file: +testVector tests/hash.c /^typedef struct testVector {$/;" s file: +testVector tests/hash.c /^} testVector;$/;" t typeref:struct:testVector file: +test_CyaSSL_CTX_load_verify_locations tests/api.c /^int test_CyaSSL_CTX_load_verify_locations(void)$/;" f +test_CyaSSL_CTX_new tests/api.c /^int test_CyaSSL_CTX_new(CYASSL_METHOD *method)$/;" f +test_CyaSSL_CTX_use_PrivateKey_file tests/api.c /^int test_CyaSSL_CTX_use_PrivateKey_file(void)$/;" f +test_CyaSSL_CTX_use_certificate_file tests/api.c /^int test_CyaSSL_CTX_use_certificate_file(void)$/;" f +test_CyaSSL_Cleanup tests/api.c /^static int test_CyaSSL_Cleanup(void)$/;" f file: +test_CyaSSL_Init tests/api.c /^int test_CyaSSL_Init(void)$/;" f +test_CyaSSL_Method_Allocators tests/api.c /^int test_CyaSSL_Method_Allocators(void)$/;" f +test_CyaSSL_SNI_GetFromBuffer tests/api.c /^static void test_CyaSSL_SNI_GetFromBuffer(void)$/;" f file: +test_CyaSSL_UseMaxFragment tests/api.c /^static void test_CyaSSL_UseMaxFragment(void)$/;" f file: +test_CyaSSL_UseSNI tests/api.c /^void test_CyaSSL_UseSNI(void)$/;" f +test_CyaSSL_UseSupportedCurve tests/api.c /^static void test_CyaSSL_UseSupportedCurve(void)$/;" f file: +test_CyaSSL_UseTruncatedHMAC tests/api.c /^static void test_CyaSSL_UseTruncatedHMAC(void)$/;" f file: +test_CyaSSL_client_server tests/api.c /^void test_CyaSSL_client_server(callback_functions* client_callbacks,$/;" f +test_CyaSSL_read_write tests/api.c /^static int test_CyaSSL_read_write(void)$/;" f file: +test_client_CyaSSL_new tests/api.c /^int test_client_CyaSSL_new(void)$/;" f +test_client_nofail tests/api.c /^void test_client_nofail(void* args)$/;" f +test_harness tests/suites.c /^static void test_harness(void* vargs)$/;" f file: +test_lvl tests/api.c /^int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, int cond,$/;" f +test_method tests/api.c /^int test_method(CYASSL_METHOD *method, const char *name)$/;" f +test_method2 tests/api.c /^int test_method2(CYASSL_METHOD *method, const char *name)$/;" f +test_server_CyaSSL_new tests/api.c /^int test_server_CyaSSL_new(void)$/;" f +test_server_nofail tests/api.c /^THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args)$/;" f +test_ucf tests/api.c /^int test_ucf(CYASSL_CTX *ctx, const char* file, int type, int cond,$/;" f +test_upkf tests/api.c /^int test_upkf(CYASSL_CTX *ctx, const char* file, int type, int cond,$/;" f +test_vector_t IDE/MDK5-ARM/Projects/CryptTest/test.c /^} test_vector_t;$/;" t typeref:struct:__anon78 file: +test_vector_t IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^} test_vector_t;$/;" t typeref:struct:__anon81 file: +test_vector_t ctaocrypt/test/test.c /^} test_vector_t;$/;" t typeref:struct:__anon9 file: +testingFmt tests/api.c 90;" d file: +tests_unit_test_CFLAGS Makefile /^tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)$/;" m +tests_unit_test_DEPENDENCIES Makefile /^tests_unit_test_DEPENDENCIES = src\/libcyassl.la$/;" m +tests_unit_test_LDADD Makefile /^tests_unit_test_LDADD = src\/libcyassl.la$/;" m +tests_unit_test_LINK Makefile /^tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \\$/;" m +tests_unit_test_OBJECTS Makefile /^tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS)$/;" m +tests_unit_test_SOURCES Makefile /^tests_unit_test_SOURCES = \\$/;" m +testsuite_testsuite_test_CFLAGS Makefile /^testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)$/;" m +testsuite_testsuite_test_DEPENDENCIES Makefile /^testsuite_testsuite_test_DEPENDENCIES = src\/libcyassl.la$/;" m +testsuite_testsuite_test_LDADD Makefile /^testsuite_testsuite_test_LDADD = src\/libcyassl.la$/;" m +testsuite_testsuite_test_LINK Makefile /^testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \\$/;" m +testsuite_testsuite_test_OBJECTS Makefile /^testsuite_testsuite_test_OBJECTS = \\$/;" m +testsuite_testsuite_test_SOURCES Makefile /^testsuite_testsuite_test_SOURCES = \\$/;" m +thisDate cyassl/ctaocrypt/asn.h /^ byte thisDate[MAX_DATE_SIZE];$/;" m struct:CertStatus +thisDateFormat cyassl/ctaocrypt/asn.h /^ byte thisDateFormat;$/;" m struct:CertStatus +thisMemory cyassl/test.h /^ void* thisMemory; \/* actual memory for user *\/$/;" m struct:memHint +thisSize cyassl/test.h /^ size_t thisSize; \/* size of this memory *\/$/;" m struct:memHint +thread_func cyassl/test.h /^typedef THREAD_RETURN CYASSL_THREAD (*thread_func)(void* args);$/;" t +ticketID src/sniffer.c /^ byte* ticketID; \/* mac ID of session ticket *\/$/;" m struct:SnifferSession file: +tid cyassl/internal.h /^ pthread_t tid; \/* monitoring thread *\/$/;" m struct:CYASSL_CRL +time IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^time_t time(time_t * t) { return 0 ; }$/;" f +time IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^time_t time(time_t * t) { return 0 ; }$/;" f +time ctaocrypt/src/asn.c /^time_t time(time_t* timer)$/;" f +time_main IDE/MDK-ARM/LPC43xx/time-LCP43xx.c /^void time_main(void *args) $/;" f +time_main IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^void time_main(void *args) $/;" f +time_main IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^void time_main(void *args) $/;" f +time_t ctaocrypt/src/asn.c /^ typedef long time_t;$/;" t file: +timeout IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c /^ Timeval timeout;$/;" v +timeout IDE/MDK5-ARM/Projects/SimpleClient/client.c /^ Timeval timeout;$/;" v +timeout cyassl/internal.h /^ word32 timeout; \/* session timeout *\/$/;" m struct:CYASSL +timeout cyassl/internal.h /^ word32 timeout; \/* session timeout *\/$/;" m struct:CYASSL_CTX +timeout cyassl/internal.h /^ word32 timeout; \/* timeout in seconds *\/$/;" m struct:CYASSL_SESSION +timeout examples/client/client.c /^ Timeval timeout;$/;" v +timeoutCB IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f +timeoutCB IDE/MDK5-ARM/Projects/SimpleClient/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f +timeoutCB examples/client/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f +timeoutInfo cyassl/internal.h /^ TimeoutInfo timeoutInfo; \/* info saved during handshake *\/$/;" m struct:CYASSL +timeoutInfo_st cyassl/callbacks.h /^typedef struct timeoutInfo_st {$/;" s +timeoutName cyassl/callbacks.h /^ char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; \/* timeout Name *\/$/;" m struct:timeoutInfo_st +timeoutValue cyassl/callbacks.h /^ Timeval timeoutValue; \/* timer that caused it *\/$/;" m struct:timeoutInfo_st +times IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c /^const int times = 100;$/;" v +times IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c /^const int times = 1; \/* public key iterations *\/$/;" v +times IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c /^const int times = 100;$/;" v +times IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c /^const int times = 1; \/* public key iterations *\/$/;" v +timestamp cyassl/callbacks.h /^ Timeval timestamp; \/* when it occured *\/$/;" m struct:packetInfo_st +timeval IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^struct timeval {$/;" s +timeval IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^struct timeval {$/;" s +tls cyassl/internal.h /^ byte tls; \/* using TLS ? *\/$/;" m struct:Options +tls1_1 cyassl/internal.h /^ byte tls1_1; \/* using TLSv1.1+ ? *\/$/;" m struct:Options +tls_client cyassl/internal.h /^static const byte tls_client[FINISHED_LABEL_SZ + 1] = "client finished";$/;" v +tls_server cyassl/internal.h /^static const byte tls_server[FINISHED_LABEL_SZ + 1] = "server finished";$/;" v +tm ctaocrypt/src/asn.c /^ struct tm {$/;" s file: +tm_gmtoff ctaocrypt/src/asn.c /^ long tm_gmtoff; \/* offset from CUT in seconds *\/$/;" m struct:tm file: +tm_hour ctaocrypt/src/asn.c /^ int tm_hour; \/* hours since midnight [0-23] *\/$/;" m struct:tm file: +tm_isdst ctaocrypt/src/asn.c /^ int tm_isdst; \/* Daylight Savings Time flag *\/$/;" m struct:tm file: +tm_mday ctaocrypt/src/asn.c /^ int tm_mday; \/* day of the month [1-31] *\/$/;" m struct:tm file: +tm_min ctaocrypt/src/asn.c /^ int tm_min; \/* minutes after the hour [0-59] *\/$/;" m struct:tm file: +tm_mon ctaocrypt/src/asn.c /^ int tm_mon; \/* months since January [0-11] *\/$/;" m struct:tm file: +tm_sec ctaocrypt/src/asn.c /^ int tm_sec; \/* seconds after the minute [0-60] *\/$/;" m struct:tm file: +tm_wday ctaocrypt/src/asn.c /^ int tm_wday; \/* days since Sunday [0-6] *\/$/;" m struct:tm file: +tm_yday ctaocrypt/src/asn.c /^ int tm_yday; \/* days since January 1 [0-365] *\/$/;" m struct:tm file: +tm_year ctaocrypt/src/asn.c /^ int tm_year; \/* years since 1900 *\/$/;" m struct:tm file: +tm_zone ctaocrypt/src/asn.c /^ char *tm_zone; \/* timezone abbreviation *\/$/;" m struct:tm file: +tmp cyassl/ctaocrypt/aes.h /^ ALIGN16 word32 tmp[AES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Aes +tmp cyassl/ctaocrypt/camellia.h /^ word32 tmp[CAMELLIA_BLOCK_SIZE \/ sizeof(word32)]; \/* for CBC mode *\/$/;" m struct:Camellia +tmp cyassl/ctaocrypt/des3.h /^ word32 tmp[DES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Des +tmp cyassl/ctaocrypt/des3.h /^ word32 tmp[DES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Des3 +toInfoOn cyassl/internal.h /^ byte toInfoOn; \/* track timeout info *\/$/;" m struct:CYASSL +tolower cyassl/ctaocrypt/types.h 223;" d +top_build_prefix Makefile /^top_build_prefix = $/;" m +top_builddir Makefile /^top_builddir = .$/;" m +top_distdir Makefile /^top_distdir = $(distdir)$/;" m +top_srcdir Makefile /^top_srcdir = .$/;" m +tos src/sniffer.c /^ byte tos; \/* type of service *\/$/;" m struct:IpHdr file: +total ctaocrypt/src/asn.c /^ int total; \/* total encoded lengths *\/$/;" m struct:DerCert file: +total src/sniffer.c /^ int total; \/* total length of fragment *\/$/;" m struct:IpInfo file: +totalAllocs cyassl/test.h /^ size_t totalAllocs; \/* number of allocations *\/$/;" m struct:memoryStats +totalBytes cyassl/test.h /^ size_t totalBytes; \/* total number of bytes allocated *\/$/;" m struct:memoryStats +totalCerts cyassl/ctaocrypt/asn.h /^ int totalCerts; \/* number on list *\/$/;" m struct:DecodedCRL +totalCerts cyassl/internal.h /^ int totalCerts; \/* number on list *\/$/;" m struct:CRL_Entry +totalCount src/ssl.c /^ int totalCount; \/* sessions ever on this row *\/$/;" m struct:ClientRow file: +totalCount src/ssl.c /^ int totalCount; \/* sessions ever on this row *\/$/;" m struct:SessionRow file: +totalLen ctaocrypt/src/asn.c /^ int totalLen; \/* total encoded length *\/$/;" m struct:EncodedName file: +totalStatus cyassl/internal.h /^ int totalStatus; \/* number on list *\/$/;" m struct:OCSP_Entry +totalSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: +totrot ctaocrypt/src/des3.c /^static const byte totrot[] = {$/;" v file: +transform Makefile /^transform = $(program_transform_name)$/;" m +truncated_hmac cyassl/internal.h /^ byte truncated_hmac;$/;" m struct:CYASSL +ttl src/sniffer.c /^ byte ttl; \/* time to live *\/$/;" m struct:IpHdr file: +tv_sec IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_sec; \/* seconds *\/$/;" m struct:timeval +tv_sec IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_sec; \/* seconds *\/$/;" m struct:timeval +tv_usec IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_usec; \/* microseconds *\/$/;" m struct:timeval +tv_usec IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_usec; \/* microseconds *\/$/;" m struct:timeval +type IDE/MDK5-ARM/Projects/CryptTest/test.c /^ int type;$/;" m struct:__anon78 file: +type IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ int type;$/;" m struct:__anon81 file: +type ctaocrypt/src/asn.c /^ int type; \/* type of name *\/$/;" m struct:EncodedName file: +type ctaocrypt/test/test.c /^ int type;$/;" m struct:__anon9 file: +type cyassl/ctaocrypt/aes.h /^ AesType type; \/* aes key type *\/$/;" m struct:Aes +type cyassl/ctaocrypt/asn.h /^ byte type; \/* Name base type (DNS or RFC822) *\/$/;" m struct:Base_entry +type cyassl/ctaocrypt/dsa.h /^ int type; \/* public or private *\/$/;" m struct:DsaKey +type cyassl/ctaocrypt/ecc.h /^ int type; \/* Public or Private *\/$/;" m struct:__anon74 +type cyassl/ctaocrypt/hmac.h /^ HashType type; \/* hmac key type *\/$/;" m struct:Hmac +type cyassl/ctaocrypt/rsa.h /^ int type; \/* public or private *\/$/;" m struct:RsaKey +type cyassl/internal.h /^ TLSX_Type type; \/* Extension Type *\/$/;" m struct:TLSX +type cyassl/internal.h /^ byte type; \/* SNI Type *\/$/;" m struct:SNI +type cyassl/internal.h /^ byte type;$/;" m struct:DtlsHandShakeHeader +type cyassl/internal.h /^ byte type;$/;" m struct:DtlsMsg +type cyassl/internal.h /^ byte type;$/;" m struct:DtlsRecordLayerHeader +type cyassl/internal.h /^ byte type;$/;" m struct:HandShakeHeader +type cyassl/internal.h /^ byte type;$/;" m struct:RecordLayerHeader +type cyassl/internal.h /^ byte type; \/* method type *\/$/;" m struct:CYASSL_BIO +type cyassl/internal.h /^ byte type; \/* method type *\/$/;" m struct:CYASSL_BIO_METHOD +type cyassl/internal.h /^ int type; \/* PEM or ASN1 type *\/$/;" m struct:CRL_Monitor +type cyassl/openssl/hmac.h /^ int type;$/;" m struct:CYASSL_HMAC_CTX +type cyassl/ssl.h /^ int type; \/* stunnel dereference *\/$/;" m struct:CYASSL_COMP_METHOD +type cyassl/ssl.h /^ int type; \/* openssh dereference *\/$/;" m struct:CYASSL_EVP_PKEY +type src/sniffer.c /^ word16 type; \/* IP, ARP, etc *\/ $/;" m struct:EthernetHdr file: +u cyassl/ctaocrypt/rsa.h /^ mp_int n, e, d, p, q, dP, dQ, u;$/;" m struct:RsaKey +u cyassl/test.h /^ } u;$/;" m struct:memoryTrack typeref:union:memoryTrack::__anon33 +u32 ctaocrypt/src/camellia.c /^typedef unsigned int u32;$/;" t file: +u8 ctaocrypt/src/camellia.c /^typedef unsigned char u8;$/;" t file: +udp_accept cyassl/test.h /^static INLINE void udp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd,$/;" f +udp_connect cyassl/test.h /^static INLINE void udp_connect(SOCKET_T* sockfd, void* addr, int addrSz)$/;" f +udp_read_connect cyassl/test.h /^static INLINE int udp_read_connect(SOCKET_T sockfd)$/;" f +uidIdx cyassl/ctaocrypt/asn.h /^ int uidIdx;$/;" m struct:DecodedName +uidLen cyassl/ctaocrypt/asn.h /^ int uidLen;$/;" m struct:DecodedName +ulong64 cyassl/ctaocrypt/integer.h /^ typedef unsigned __int64 ulong64;$/;" t +ulong64 cyassl/ctaocrypt/integer.h /^ typedef unsigned long long ulong64;$/;" t +ulong64 cyassl/ctaocrypt/tfm.h /^ typedef unsigned __int64 ulong64;$/;" t +ulong64 cyassl/ctaocrypt/tfm.h /^ typedef unsigned long long ulong64;$/;" t +unexpected_message cyassl/ssl.h /^ unexpected_message = 10,$/;" e enum:AlertDescription +unit cyassl/ctaocrypt/asn_public.h /^ char unit[CTC_NAME_SIZE];$/;" m struct:CertName +unrecognized_name cyassl/ssl.h /^ unrecognized_name = 112$/;" e enum:AlertDescription +unsupported_certificate cyassl/ssl.h /^ unsupported_certificate = 43,$/;" e enum:AlertDescription +update_P ctaocrypt/src/hc128.c 143;" d file: +update_Q ctaocrypt/src/hc128.c 154;" d file: +urgent src/sniffer.c /^ word16 urgent; \/* urgent pointer *\/$/;" m struct:TcpHdr file: +usage_error build-aux/test-driver /^usage_error ()$/;" f +useNonce cyassl/ctaocrypt/asn.h /^ byte useNonce;$/;" m struct:OcspRequest +use_SNI_WITH_CONTINUE_at_ssl tests/api.c /^static void use_SNI_WITH_CONTINUE_at_ssl(CYASSL* ssl)$/;" f file: +use_SNI_WITH_FAKE_ANSWER_at_ssl tests/api.c /^static void use_SNI_WITH_FAKE_ANSWER_at_ssl(CYASSL* ssl)$/;" f file: +use_SNI_at_ctx tests/api.c /^static void use_SNI_at_ctx(CYASSL_CTX* ctx)$/;" f file: +use_SNI_at_ssl tests/api.c /^static void use_SNI_at_ssl(CYASSL* ssl)$/;" f file: +use_aesni cyassl/ctaocrypt/aes.h /^ byte use_aesni;$/;" m struct:Aes +used ctaocrypt/src/asn.c /^ int used; \/* are we actually using this one *\/$/;" m struct:EncodedName file: +used cyassl/ctaocrypt/integer.h /^ int used, alloc, sign;$/;" m struct:__anon53 +used cyassl/ctaocrypt/tfm.h /^ int used, $/;" m struct:__anon70 +used cyassl/internal.h /^ int used;$/;" m struct:DtlsPool +userCtx cyassl/ssl.h /^ void* userCtx; \/* user ctx *\/$/;" m struct:CYASSL_X509_STORE_CTX +userdata cyassl/internal.h /^ void* userdata;$/;" m struct:CYASSL_CTX +usingCompression cyassl/internal.h /^ byte usingCompression; \/* are we using compression *\/$/;" m struct:Options +usingNonblock cyassl/internal.h /^ byte usingNonblock; \/* set when using nonblocking socket *\/$/;" m struct:Options +usingPSK_cipher cyassl/internal.h /^ byte usingPSK_cipher; \/* whether we're using psk as cipher *\/$/;" m struct:Options +validity ctaocrypt/src/asn.c /^ byte validity[MAX_DATE_SIZE*2 + MAX_SEQ_SZ*2]; \/* before and after dates *\/$/;" m struct:DerCert file: +validitySz ctaocrypt/src/asn.c /^ int validitySz; \/* encoded validity length *\/$/;" m struct:DerCert file: +value ctaocrypt/src/pkcs7.c /^ const byte* value;$/;" m struct:EncodedAttrib file: +value cyassl/callbacks.h /^ unsigned char value[MAX_VALUE_SZ]; \/* if fits, it's here *\/ $/;" m struct:packetInfo_st +value cyassl/ctaocrypt/pkcs7.h /^ byte* value;$/;" m struct:PKCS7Attrib +valueSeq ctaocrypt/src/pkcs7.c /^ byte valueSeq[MAX_SEQ_SZ];$/;" m struct:EncodedAttrib file: +valueSeqSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: +valueSet ctaocrypt/src/pkcs7.c /^ byte valueSet[MAX_SET_SZ];$/;" m struct:EncodedAttrib file: +valueSetSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: +valueSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: +valueSz cyassl/callbacks.h /^ int valueSz; \/* sz of value or buffer *\/$/;" m struct:packetInfo_st +valueSz cyassl/ctaocrypt/pkcs7.h /^ word32 valueSz;$/;" m struct:PKCS7Attrib +ver_hl src/sniffer.c /^ byte ver_hl; \/* version\/header length *\/$/;" m struct:IpHdr file: +verify cyassl/ctaocrypt/asn.h /^ int verify; \/* Default to yes, but could be off *\/$/;" m struct:DecodedCert +verifyCallback cyassl/internal.h /^ VerifyCallback verifyCallback; \/* cert verification callback *\/$/;" m struct:CYASSL +verifyCallback cyassl/internal.h /^ VerifyCallback verifyCallback; \/* cert verification callback *\/$/;" m struct:CYASSL_CTX +verifyCbCtx cyassl/internal.h /^ void* verifyCbCtx; \/* cert verify callback user ctx*\/$/;" m struct:CYASSL +verifyHashes cyassl/internal.h /^ Hashes verifyHashes;$/;" m struct:CYASSL +verifyNone cyassl/internal.h /^ byte verifyNone;$/;" m struct:Options +verifyNone cyassl/internal.h /^ byte verifyNone;$/;" m struct:CYASSL_CTX +verifyPeer cyassl/internal.h /^ byte verifyPeer;$/;" m struct:Options +verifyPeer cyassl/internal.h /^ byte verifyPeer;$/;" m struct:CYASSL_CTX +verifySize swig/rsasign.py /^verifySize = cyassl.RsaSSL_Verify(signOutput, signedSize, signVerify, signedSize, key)$/;" v +verify_SNI_abort_on_client tests/api.c /^static void verify_SNI_abort_on_client(CYASSL* ssl)$/;" f file: +verify_SNI_abort_on_server tests/api.c /^static void verify_SNI_abort_on_server(CYASSL* ssl)$/;" f file: +verify_SNI_fake_matching tests/api.c /^static void verify_SNI_fake_matching(CYASSL* ssl)$/;" f file: +verify_SNI_no_matching tests/api.c /^static void verify_SNI_no_matching(CYASSL* ssl)$/;" f file: +verify_SNI_real_matching tests/api.c /^static void verify_SNI_real_matching(CYASSL* ssl)$/;" f file: +version ctaocrypt/src/asn.c /^ byte version[MAX_VERSION_SZ]; \/* version encoded *\/$/;" m struct:DerCert file: +version ctaocrypt/src/pkcs7.c /^ byte version[MAX_VERSION_SZ];$/;" m struct:ESD file: +version cyassl/ctaocrypt/asn.h /^ int version; \/* cert version, 1 or 3 *\/$/;" m struct:DecodedCert +version cyassl/ctaocrypt/asn_public.h /^ int version; \/* x509 version *\/$/;" m struct:Cert +version cyassl/internal.h /^ ProtocolVersion version; \/* which version was used *\/$/;" m struct:CYASSL_SESSION +version cyassl/internal.h /^ ProtocolVersion version; \/* negotiated version *\/$/;" m struct:CYASSL +version cyassl/internal.h /^ ProtocolVersion version;$/;" m struct:CYASSL_METHOD +version cyassl/internal.h /^ int version;$/;" m struct:CYASSL_X509 +version src/ssl.c /^ int version; \/* cache cert layout version id *\/$/;" m struct:__anon93 file: +version src/ssl.c /^ int version; \/* cache layout version id *\/$/;" m struct:__anon92 file: +versionSz ctaocrypt/src/asn.c /^ int versionSz; \/* encoded version length *\/$/;" m struct:DerCert file: +versionSz ctaocrypt/src/pkcs7.c /^ word32 outerSeqSz, outerContentSz, innerSeqSz, versionSz, digAlgoIdSetSz,$/;" m struct:ESD file: +wait_tcp_ready tests/unit.c /^void wait_tcp_ready(func_args* args)$/;" f +wait_tcp_ready testsuite/testsuite.c /^void wait_tcp_ready(func_args* args)$/;" f +weOwnCert cyassl/internal.h /^ byte weOwnCert; \/* SSL own cert flag *\/$/;" m struct:Buffers +weOwnDH cyassl/internal.h /^ byte weOwnDH; \/* SSL own dh (p,g) flag *\/$/;" m struct:Buffers +weOwnKey cyassl/internal.h /^ byte weOwnKey; \/* SSL own key flag *\/$/;" m struct:Buffers +wfd cyassl/internal.h /^ int wfd; \/* write file descriptor *\/$/;" m struct:CYASSL +wflags cyassl/internal.h /^ int wflags; \/* user write flags *\/$/;" m struct:CYASSL +window cyassl/internal.h /^ DtlsSeq window; \/* Sliding window for current epoch *\/$/;" m struct:DtlsState +window src/sniffer.c /^ word16 window; \/* window *\/$/;" m struct:TcpHdr file: +word cyassl/ctaocrypt/types.h /^ typedef word32 word;$/;" t +word cyassl/ctaocrypt/types.h /^ typedef word64 word;$/;" t +word16 cyassl/ctaocrypt/settings.h /^ typedef CPU_INT16U word16;$/;" t +word16 cyassl/ctaocrypt/types.h /^ typedef unsigned short word16;$/;" t +word24 cyassl/internal.h /^typedef byte word24[3];$/;" t +word32 cyassl/ctaocrypt/settings.h /^ typedef CPU_INT32U word32;$/;" t +word32 cyassl/ctaocrypt/types.h /^ typedef unsigned int word32;$/;" t +word64 cyassl/ctaocrypt/types.h /^ typedef unsigned __int64 word64;$/;" t +word64 cyassl/ctaocrypt/types.h /^ typedef unsigned long long word64;$/;" t +word64 cyassl/ctaocrypt/types.h /^ typedef unsigned long word64;$/;" t +workCtx cyassl/ctaocrypt/rabbit.h /^ RabbitCtx workCtx;$/;" m struct:Rabbit +written swig/runme.py /^written = cyassl.CyaSSL_write(ssl, "hello from python\\r\\n", 19)$/;" v +x cyassl/ctaocrypt/arc4.h /^ byte x;$/;" m struct:Arc4 +x cyassl/ctaocrypt/dsa.h /^ mp_int p, q, g, y, x;$/;" m struct:DsaKey +x cyassl/ctaocrypt/ecc.h /^ mp_int x; \/* The x coordinate *\/$/;" m struct:__anon73 +x cyassl/ctaocrypt/rabbit.h /^ word32 x[8];$/;" m struct:RabbitCtx +x509_buffer cyassl/internal.h /^typedef struct x509_buffer {$/;" s +x509_buffer cyassl/internal.h /^} x509_buffer;$/;" t typeref:struct:x509_buffer +xorbuf ctaocrypt/src/misc.c /^STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count)$/;" f +xstat2err src/ocsp.c /^static int xstat2err(int stat)$/;" f file: +y cyassl/ctaocrypt/arc4.h /^ byte y;$/;" m struct:Arc4 +y cyassl/ctaocrypt/dsa.h /^ mp_int p, q, g, y, x;$/;" m struct:DsaKey +y cyassl/ctaocrypt/ecc.h /^ mp_int y; \/* The y coordinate *\/$/;" m struct:__anon73 +yasslIP cyassl/test.h /^ static const char* const yasslIP = "127.0.0.1";$/;" v +yasslIP cyassl/test.h /^ static const char* const yasslIP = "::1";$/;" v +yasslPort cyassl/test.h /^static const word16 yasslPort = 11111;$/;" v +z cyassl/ctaocrypt/ecc.h /^ mp_int z; \/* The z coordinate *\/$/;" m struct:__anon73 diff --git a/project1/cyassl-3.0.0/tests/.deps/.dirstamp b/project1/cyassl-3.0.0/tests/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po new file mode 100644 index 00000000..2dbf4339 --- /dev/null +++ b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po @@ -0,0 +1,270 @@ +tests/tests_unit_test-api.o: tests/api.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/stdlib.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h cyassl/ssl.h \ + cyassl/version.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ + /usr/include/assert.h /usr/include/ctype.h /usr/include/xlocale.h \ + cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h tests/unit.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/test.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +tests/unit.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po new file mode 100644 index 00000000..63bf199a --- /dev/null +++ b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po @@ -0,0 +1,285 @@ +tests/tests_unit_test-hash.o: tests/hash.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/ctaocrypt/md4.h \ + cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ + /usr/include/time.h /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h \ + /usr/include/i386-linux-gnu/sys/types.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ + /usr/include/ctype.h cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/sha256.h \ + cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/ripemd.h \ + cyassl/ctaocrypt/hmac.h tests/unit.h cyassl/test.h \ + /usr/include/assert.h cyassl/ssl.h cyassl/version.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +cyassl/ctaocrypt/md4.h: + +cyassl/ctaocrypt/md5.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/sha.h: + +cyassl/ctaocrypt/sha256.h: + +cyassl/ctaocrypt/sha512.h: + +cyassl/ctaocrypt/ripemd.h: + +cyassl/ctaocrypt/hmac.h: + +tests/unit.h: + +cyassl/test.h: + +/usr/include/assert.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po new file mode 100644 index 00000000..7c82770b --- /dev/null +++ b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po @@ -0,0 +1,273 @@ +tests/tests_unit_test-suites.o: tests/suites.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/stdlib.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h /usr/include/string.h \ + /usr/include/xlocale.h cyassl/ssl.h cyassl/version.h \ + /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h tests/unit.h cyassl/test.h \ + /usr/include/assert.h /usr/include/ctype.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/unistd.h /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h \ + examples/server/server.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +tests/unit.h: + +cyassl/test.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +examples/client/client.h: + +examples/server/server.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po new file mode 100644 index 00000000..755c1cad --- /dev/null +++ b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po @@ -0,0 +1,269 @@ +tests/tests_unit_test-unit.o: tests/unit.c config.h \ + cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h tests/unit.h \ + cyassl/test.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ssl.h \ + cyassl/version.h /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +tests/unit.h: + +cyassl/test.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: diff --git a/project1/cyassl-3.0.0/tests/.dirstamp b/project1/cyassl-3.0.0/tests/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/tests/.libs/unit.test b/project1/cyassl-3.0.0/tests/.libs/unit.test new file mode 100755 index 0000000000000000000000000000000000000000..d5134b39914e249ccc21163796a5375febe6a695 GIT binary patch literal 52399 zcmeFadwf*I`9FRF3$7U1D4?jQi!K^8gai-)5fca@Xn>RiL`9b+*^o$XO?H9UsKHH; zby=mAdTG_7wN@)u{74nWYLJ_FrCunl7pO(MF;Kw^#vA#*-_Ok1J$ne+e!hSFe!ti2 zcVIH-J@d>n&pgjFb7tn8v**Uih50EdDTaCUFnSt9S-){OMBgDH zAfq>um^Z2!Gze}KVCaQ32SQJT65x`h4ktrDU zqpKt&a(n;{RF!OScAC{WgX52_#3%gNwD z9)p?x6XXLPagaZ%H)bN=DqjZbVqkf;Z+KPZ{NYt)!>TH4f=eQP5`7S# z&C2yb{0m$8fozyQm|uL1i424ITQ*Q1#K+spQ#a<}#>pTX{YV?X1D5h9fWC)~zR4!f z*)}}XM!&_@z6}=sl=mxJe#EA)uWkBz(N_LG8-1}&p65}Ad9c2dZ2S(}=-;&Qd&ew{ znC1UqtN#?6{_<_O&PKoAR{w*x{7Y>4Z8qFtldr{AzTT$)Z*24_Hhte`EB}!#{}x;Q z#Wp;`roU8M`=w)Q9a4Yq+Uo0PqyMRm|9l(&LR-m> zc1CW5NjCa`On9 zUmw}-!1{B&D;e`BLxW8?oPoBb+n z@=Ukkh^_pUw)&>p_@&u!Z=3%eVX2Sy z!R0@G5RbRD-)F0TsZGCswbfT^lYd5>yXsHdEtvH^VXJSk4PR-~-&eN$^K9~D+vqph z=v!>B=6D-WYLUObvb@olR(3&tWsR@O%&zzQr1m@|SF%)7Ybpc96}}M{j5f(j zYinx!r2!L?c~z~iOmoM1sV`7jThm}Aur&&TG=RjUD6jX&BCh(P(`s?C^lcp9GOr9y$tMOIG+gn=UFJ0&@tF87`)_5%$i$>Z+ z)b2r1f(?FeQGMkinENt+qqn>gKB==Id2W@Mptjz$z@iaH;l)-P+Q24*NmYJdO|Z^{ zbT;_2)mo+mrT+RrWqBp6?e~^eP<*Q(%2jIr*tZOwdWd?6Xc zo$&}arJPgzff@6!Mc*l|yiP1;I%6_5s!OU1u8>T?-mZEuNUdF&mQE&xQz!8f|AW7( zCRxjxR`J&R;a}p>O1y4WK6&O$H8f!qtcMmjd{%Sh9L=-3Km`XC;w(c0FUE~BjHsZm zZA>JB4n4-Cxwf{lCJw5D0sj&&tQ3eR36I4-ONt^2)`$g6HbT}=xqyRQQkpQU_m?gz zudl5(%1dhk2?E6_iH}M$W#$z^HPJhD2HIT)mlstv!214x;a>u|%4_TVH3k}4Us_Rb zln4A(RYWzVb!c=j&;a$|dIAc66$eq@{M!0}QSGlLb-jOaWlb5$s}v8M8S|M`-r)By zG)gPVD(i)~y3VMqfd~4^%2WclmzP%6Hu%9fKzV90@>Kgc6p$Y}DXvH_FfhRJs_osbLI#5*G%f$yKJj%-3l60=1RGk8P`i;REF)V1>e< zp~~;CBSC|TN+GBhg7BJ^TIU7XiR^`5PcwHOw0ry9l>#+b5=XY4{-8AIqi#@IY5V2nv^A!BUR6*0zUR0-n&hB1fnNth2Z zKG`tlF~+7<8RJv1&&K#vObHpEW*Bvh2N_0y@#%)Kgz*`M(Zu*n!)Rvg#(ov!!Pv)Q ze3oIXV0^Y=tYqvlj8%+>7{*!+4nSd4{ou@%h-xVvGgx zI>y5cV?EVt#;c6cM|LpA2It$1FEETlkr5@ zpYbHvpK%`S&v-KI&p03UXFLV=XIudLGoA|jGrkn|XM7p#&$tlwXFLt|XFMJDXN-kS z4&x%&pYcy%f5tOmf5yeIKjRYEpE0&7=P;fP`!l{A_Gdf?_Gf$r?9cd0*q`xLus`Fu zus`FgVSmQg!2XQAus`E@us>rT?9X^U?9aFq_GerM`!g-cF2jg~zU%7hYHbVjifu)& z4sCW`waMtZzyYu58sfxXc!tq6Bo$|9q+zu00eRPuG-Bqp?-1Od7`@kMZxcL_cp&jw z!Gnn1#H$6niPMQ!3ic4g`;GQy!Rf?fi0cGr5a$rj6P!g{KwKnv6fwNVXwMNmhIkHf zmf-Qk^N8JobBNiX_B6qH#IS#ndiFXKIMVv<5CipI5 zZojv$6?_k|n|QV0)x_zF_^mlN+0{5J7Q;x@s% zi0>j^EBHO))x@g>?;(Dec%|UI#A}J01;>cj6W0meN8Cm{Pw)Zamxzl5e?h#1I7e_N z@h;*l!QT<@A$AKkFd9_Eh|>f+hz}4Of}O;j#0S1*`%{TImucT4IE~mzyhCt*;xytm z!2^j060a3Jh}ccMTCkfqop_~S4{;W8v*2{%F~oI(Gl+AD=LyatE+8%vJc_u8I7jdp z;yJ`wg2xljBX$eUA+8`!6P!m}M{Ec#AYMXz;2Y`x#LdKe1Q!u6C*C2rgm@)!o8URb zcM-1@JePPi@oK^Ih#w|iDY%SyEpfBp3gY#|b%Lvi+lc20t|NYlxJYn-cn5Kg;3dSn zh_eJY5$_>(3vMQk5vK`mAwEEC2wqOyNqpdI>Hox-S)%=dR}wpkcL-iZ%jbYM&LN&Bcr9@OagpG4#6`q8g4Ywz zA1e={79Qo<28j$3 zPDM9I4Ou#EILgJgKvS)4(VP@l-qvWOfTasP4sy8YE9L}ecJz&g-q2hZgR7O}SHR#n z*2=LViQ{w&$M!=)eM&U+G*a6+6-cliWMh4gVx1)Hz$DhQEUa%8*2%)Y46n8dd#U1B zVHI|(sKjjkRThrpm9PcT&=X9B4pljM$RYM`C2j0uQBvbs;ef{x4Q(JLR5uT0t!iWc zjNJwkgtxXH3ZyFHQV@3xh%JG4Nb(sfxk>XF1Rmi7OE=TR*Lbhm6#Ee%o|C*~dVfH-GpMvnw+wWB=Pcx;Ab>9AzO8FgAJ`|caRLbp4Nt2YAN?FR3KSG%3?L8^! z##k*=s?g5p?PsWztC@11a2~5tE@R3Pp(#-*W0|rDCW+o&qf*Xg%3k5TT%`5)D;b_@0Oq7(DheVhlECkqh~@DikoO(NLV+U08b zBP0!v_r!k63eX@|%NnFaLv?Qg=Xso_*P&4^^wR9@*>A=k97u`>j-)_0HDKGnpyx zZX(i^6+5w+7TpjdMN^WUh2l+Ea3?6b$%}57kA`J$hwavpN9a_orf5h^pBSpddMkyd z*rH0^c-A8nHLM5ry&8=Y`|8FYPfYu2{5=hbRt`CU#y5Wo01d4NP))uY{GuW8EA~dY z=sQ_g%mbR%Hdo6nLLp|cQTzg`M868ehHADxvW0E~mC;be4xFnF9Qt(U~AbNs#G}Nr+LN2cG3Y0V8bzivkdq|SE2Mx-o4~lEzn$x2$c={X zvvIwXWgyI%R<23X1U1)clWS6)mopbq-ALaApT&qHRO4YXgxH5jz_E03G(^u5RV(YE z=|(IcrhskgVz21}TUbEbroYWL?fVn9p**68Id(m40u}YJ0kU*Vr%|J!oLxwRICrAD z_RmqVN;Z(((MO%PX%hxW!air$;6m_?hBCBF$Q8THVr|gC`_uq^g?35O;7Bdc`ILut zNz&i|;d-f!Yu7$-gFbIQD%bZ(fmXf)agXHs0&^kNzv!pnvztCuG zi*?Wh8%YikUWTh=w=Lbw`3+`}S8r0&ofQuF6_PmJxitid*LhYWX{|5?Lcza0dqsJ_*#(suRS{E+{6}4<6ducEf2~^BmQNNe~T9e-&jRLVqYWs&yZ) zM(Mv1+6Z-?9IWY>plTPR#YS+5z-%g7=sDe7%-yQeoDt5lz$O}+p!u(BS2Es13ds5( zyCW3!Dr9DND1mrdUE6ZRqVy>`QQW6O`{ssshTkxqYV1-`fhUc|yu8gdG|!V0yO?Z@ zLpi06Kz=kdjJ}S>ZG(b%aoRy8VzB~|^CCs5k({)Mfu)60bd`!e2_eg&)|?&&qlt#m z;URr;T7vH-RD7N%kCuQGw1`72mMC2IA zGzV(rloN?*)G=bYxUwKuDX};HCGA)~P;na{FFC%Ol9YfYNfi5~F8MJ4>Z#IVcq;O!QF=AiqoM!>Ra16;K$6zoR1ewR6W~b&AtA$Z<8F6Iq?>M$R zQstRgzHtkEp)OLF8ofdMx=B>rJH;pu*Yr?JtXKg%HGIN=kf0tEF~HbE#)#7q%ewLx zC>iSP;*v0&5*QQOJXbs;8VbY89huS4Rg5vQyO!}8(a>XzF)Y5u7*l}v8Dk3YYsAVq zFXb8h<78B7l!hJJtiFy6fa6TzrKxe#`49NUL<$ZN@+xb`dwa&Bkrca=6A>9cS57 z5|;6Sa#A zkQ?%+L$-^M75pjcSR!@Ec&&!um2e6S!Lu*~FQE`Z0DpwtI>sn3LZjeCe}yN6H^T7; z#YM&FlueOPr>+}=Ym^p;S6$8x0aQPOsv%*4BgS(#`a0YsWzck&c57 zA{_@E$~qH_rL<-ZK19dSL?E)_K!QsQ4!r~?;04-)8Qp* z)pA&@EZiOhAvBv2$#Gx^I~K!CdN|e7wIedw+D)=z@1n?&-NcVnUSZy4b%mZ$-F1@_ zAQd}BR-&7XP~F6ulISM?pf&S6qbM!i0&&vS#m9W3|PxeLnH-Gry$ z_k-P}`X8#BoXvJXRGQ4%O`@oi-Q+l>t#o={C7eFdRelBvrAKTtM*<#CpcjnWwSyMk z4ep$v%!Coxb;J{N*Xaj&$8L4CzQYc>&Vv~vFV%X!qxw$~90dKRaBGW$*^;ljPnL2h zv=9z;7ky-FTzqthLrj4h$uTh}aYGy>YO08uZV}bN5-6EL|3z0?hq}>~=-=_KbPs^; zN*|l<9onM$B#p+AA+});Cvup(ZeXby zNu_cHwV@Q79u4(TXHY;2&tSPTg<`fwCjepS2Blx6m@XCjYB#3d^I>LvvHg$6j2BVJ zyr}N{5UjTyMf9Ij^i`lvsA-v?{;!*&r>QfG=w(7-iar~NqAUAq@nbnijXerO9ywfn zhsQl4&#B>R3Wuw7HC(+$Mq72ip)=uh73AY#S){D-T#rQEF=UZ4iUr{(bJ%T7c&L44odXnCBS=Gs#8! zZ%je8lprxU^kgO4LqvNRBTV_hcrQ%_Ev6zy`#fQ&Y9&O5-C2z+h*9AW4G(S9_C4=e z{r*-#Q{e4K9UeBZRC!XVIf5cAb+qAOD@$c1l{!n%`|&<@TY=0 zg`C(Vy3^rkM8-5s*`pB|2~)-Y+fjXZTkLTVCOY~3f_|uz-zXHO06ztSjclF#Dx}7? z!h~{@WhG5a17O!-U;`Y##q%IgWQAunBFw19uyf*$We$zk!Cn%;OfKLV1&`p45cgox zlqY<-9Jw%SDXDPv;w1r8a?Se|`!O)P+#qOTKDg~gymT`qfYoIeB(yKpx?;T<&z?o9 za7T+w;C#`L-049Tcl;eJpj(b#tm-Lf9+%nQw7H&Y!+g>c#GuUkKU}`Z-5)6}H-1oh z4oZhMr;4v}sIyg@cGPOmv{m~locYJAYyaC1R(C(1wClc=Yf;eJ$^*bZUfp$;>f{by z_;u65qfr&s?-oT)12MKac|SUqE8cT-wG9@=y!FWY+_=rnZD5o2yLB9YMPg|9W3p1K zhJkRNIyw#Tz;KIaGYWB5mmc7t=kb^L8xXsTgO!2UnJ^+=miGaX^4>Wy1QUq~5}_c5uXE^43RL)8rIN+?(yf z_O`3#DY6QnBeVC(T1{=31i)r&%+>lb^TA{l#M$Z?&MQ%RgnJY@j)*h7!Xw)yoK|Pt z!Yz@3Em#D6h?dg_D9^KE;^!1yp=aRp#IEPt!taDShXqa#b)Fr(EE<}|Stk3m9$uEA z_Ksn=Yr)1?(rbXRqw6+;imR%J}gZtJ-C$h!N)>qs^0K$&B78MHmUd5qy&MTVin>DWrj2=ono zlO8x0PjOt>z6&x%uuTKElEp?ebT-?dHkv3A4K)NY#PY;GfL8VWeGe?)2>0jZA{E)B zb266OSF2FcY$&R!A}u80RhRUdZ-TxIDK;9DCuxOe&XF`GpE%7RoQVa+Y+MuGk^&32 zUW6w(QNP?t{sy~2I3J{!1?}&n0^HoyJ!cL3#$;J-wr@gCTsNF(N8X~d>;0{XI5#PI zpDmg4V+-X#oOhfT&xZn{q0gD0tYtTt#F};@9sc_^r0f`%T&Dk#mN|}P3Ury(+~-2a z8<=PzHM4XxyLS9)vvl7+K$vqNS`vRQ@ffvy#SP+|*DLo+Rprv0Q0CmH;<~6q-_kVGFmHizq%69Xn_vDMJJpG&2bN_HH zM-&Vme-px=Q+cXuHZir~O<=6XQT_SG`c`xRSIgTN??YR9>glH&)x`!;x4aW~=FoqK z4*#TSL^SkEWro;N@Rfq?e3_c=i{apWZPX$b-i^W?r$AuYan-r8XHfIjyiw<~DD5AgG_86M^=z8y*l;TXyi74aN)BK_$-?j2{j`DN^XLZ<@P}|G*z4N zWn8kv2k{Km{u>r#b1@~|AY(loA$AdU5$N4x>0xod5!%j8xK<%|KWu4{6)Eo`Wr`Ma z?59ot(=h;-crEG-h^n*V%Dg**E`7jRf`T@k&$N2qHk?XyFVs8>R!j$AOpsJBpUX*kh_vsFiN z@FEafMgxb$g7L-*P2M98_y|WI2qc3L>fVDg(4UM#!AzJ-Bt^yp5C$1C-ULr)i#WOB z3~3)Y=(XKiBynE8Qp@-3UlOyS4{%e8-tEJlChFB7+1yx%?slI#HX> z=!cB(fsj0+hKhCS_i)}Af2#tz2e;MahPLJC><^fIHSR^J>}H)kPiMb?Y}|(C1_i2q z0x0`X$FJ0M@IBfEfh)5c{M5p0^kPhtqM^U2GY`gW?#-s7J-l3Gq#=%mK2*6`(a=G4 z#vRcyeHG1kMbm>bZQQtvhPqh0x+hnF$H>S>emf-^I$hBeMMHDdSqbvyOi(m)6`yLA zGcOu?UY(VJM&5owTqQIuo@Nwb19!mt{tR7lQaC6wr8DA+j|Q4(8(q4c-3m9s(8=`j z?sDj!m!e4Sci}f6tT~G(|JWbE6?2^a(P=56E#HNMRfC3z`*8q3~()R8SAO*aJnw>cR)GgmQx_ zwGTN|c}l_?JNiWW^7@e)+L{*0??hEjxqPA6ui!=;B*}vQ7s>xZR3>{mPF4_GtT?A( zxK52;`V|!RbS|rev?@)BjO>p8fYt^d-;mi=3` zXCO8u)!86zAh%NqF8A1@A*bqE>Cloo%Rr;D1}U0RssoKyIb))sN_93KG&v&_O&)1p z5TAH-&taG~fC;Aznr=zEUPw*7EN zcvDx8@EfjMr*~m6bbPft+W+r;l}CA?QyJW}PBZ#J7jd1Ui#@3H zC4-yR>3G!*wN7)Qp=T70bTO?{>0(-^`;<-xnL3r{>ERXVKF%<8%1w(3ty73>#G)^W zQf73kQ&PrWQ54fnot9|5N#^s?@zzhX>9j=aR66J1g~5NIQ!3Hor&gU#!&{_QKfOxn z^awvq(kcA3Nzo(& zqnK|iujX@1f_0uk5?BVF91w6)RDq5Om5hn#$uWoSd65DKqN?&|7H}a_7mdi{30N&e zBl2(-S7H%)77vJM2`DC%SCeM;_u9hJ@U6L{`IHCD^5ou2FENryS3vYBqk3}AZ48I<6tc^z8 zs3e?{A0E+hB4&XE>4_$Xx+b`8y&BC9ZQB^?y2y3&tEnj5vY`mG(3D+WdsGS8=<&3_ zioplg7)33$zW@-=b$B3Xh)(hu8XvegccRO1-EJA;1e@DaS=>QTwIIi38imCMV>yrz;+A;c=QZS7h8R$^@^v_QT&xYqEs$paT4j zQ=@&a0(k=dssP6-qy1%oxKP6IR+C{tsMF!P=@AgLFUKAW^pq|wyb~!Qtaw`MnabhA zz%X49I(%=iKi1z(#(D_ZCBFpfntY(6pQHs+Lx+3HmfnHT>xYq)X9Ui}mJ^p!TwjF> z)EV~0Q}yy{%O-KQ)_dV>p{+eahkLnh-i4`aq~*yR_!Ny9^KF6u4~|_4zw9_Q7DDIl z=ofpHQEKc@DBsa5HXS7NH6Pf(4`cVeh$>|t^-83`t#Yt17yu!}!&f6$_IL|eYm;X@ z?+X+KxX&8fj1dg@CPKI19zKAF zcHl*F2R{%T0v;X)>`dqE=f%rI#DZzn|gWO1hSWPkpL1w<9(FR+f&s9ZR zJS&kOw#-9L0m)~s^Hj!Xt`pF)1g-*|z&T)W>)#f!6BT{%%yR5tk!26+ ztFC-w8y=Wy@%#cQ?Rd4&^OLaRkpldI8RxHgFKeO==YFn8Sp>BY`&h zJv=H>pdWHHcPSJhS`!Pki2+1_*8Pb(Oksk@K~8ezq1^67tG4K?9ck7SS_QWOJNWHA@2<|$N`sw~s}lUy%9FYR0Y1Q?@;SV#E` zg-Ij-e$ z9E_lW@RzO?97H~IrD4wbnd_QR4#q+tT=710&3Os-$C)XX#cB4U8jI7Mw?cFa1`)-8 zMdu2W^H2@afv<=ZfO#~u@1Kyw;St`B*tKXsqd~6{rEVfVJvYQfs+vx8Ue0@IUkTmRsIZxAbFG#xDtKZ zR9CEg1DcUM`eW*2#6Hkt%b950@dn%we9YT|4ifxX6L1z4ZjUVoNyiBsEgaw|*Sg!4 zY)hCp1GOs~{C=;T1;QAI9zlDV`vha)Q>at1)U%3e9#cceh2$AV0Bh;BA1l&pzz|z5 zip<M04dXOC9o!!Qcc zOCowy+@)ye$mOYoRif%SjHQ;KlgjAFLWoZTF$ykW``&=aB9E(OFhmtg*^Fe2l9tY{QG9ZLo{d1S1#Ewa6ndfo#o0vj94Xop%9mSifa^mv-ec`f zv@5$8Z6(N+XurUjtK~&4+7>O^*-A8WZGQr399$6bh@y8RqR&HpoV3vYq=ygV2m*j? z8QiQx-%n{)>|(o?^G-g!3A||;nNt))%=UjFA)23pEA>1qrFvLLI9K%EFJNho>4i@? zFsR=O7@Lo_n`2uxYzrwVF%PR4x*|#w`-HwOVsNTs7vt5Zk2(a(%DMYF&7nWB+ff-9 z|4`S5wubqGE%O?PykVue+f|%Bc%{J;Oa)~c1^IGvbM*rK`Av- z{vB$t92Dbhf`!KMb8XvXf?o)&#DU@*%M2KM2ghHICP&PVLg|VNJ8KnFt+QYbm zdc}bBTQEcsnT8#MwB%_R?-8wmWU`;7p0IDP>Ez(ehwR%+<&@9ax6hGNzQfW!O-{dn zOzjip^mSar+b@*UfATa#PQT>oU^(rNnPK}$a(V?%kCW5i@zjvhQ^@SguS9gZDs32B zvL1LV+NrP3^fA+4^wV|bn+4xLNtypfhL3{_UKA$72j%olp585||K#bda@xq#ketro z=@OjE52LYaY`EWa8QeRxLt8is?c(mjzaS9IaHAmE0)nj3(BO|$`eKn{nnG;Gg7eV~ zpQJV?QpGVZlhho|ahPy4-v*3^Uep|i2$lK9Of)19h(m(oCEa{QHX1rl%lYO1NaHov zzrtN`b4;V{g4#6NAn1Tbj|obPsdoHEP>x1F7qn8Nkf1h=f`Sfcv_Mc=yW(<%pd5`Z z0}An{<>YK0F-yrbqZoY#zH^t#>0$o`hMx@vRT}>`r*&#;?!Z*nV2dM*OS^`puw?U-!ax zU3zq#htIBI&m0dewyuPf=+UipO4@Ko?ANFW{U!tU28uq-ZutyFbrtaUEV3ZoD8lTv zXWWRwpNDsU_xYo^vy&dF@_3G2vx?kxCbrbagug=eu~n&;_(LO}))g(}{R~I>;DC5)Vau3j=vl!Y+1n3o z>=B$E`Wla|-Gvm8=w_TF&3J(&T`ehH))pQoS%HNK;&xaJLudGJhoPHdOwuwi6@_3M z*TNiMLwr1P5T7g|eLFOUw^{IT8O;+oG29v2bC~m|mOIG-CTiIpJZ|Y`nqG}Jt?aO1 zyYKfEu>!j{dLXkA*k&cQpz zX{dz1))N2GmB(2UTF2hcaiO*YEceml7O%wfsAeTCsuE99B};6TfR`J*&c#yk>`1|Z zv0u9;QZ0^X#Q{1iX0)*_;Lp+cdd84RJ^YI2I8`tB?ih>@Fa`&l6Huk)(ft3VC+32i5IX*+fD}OqjC>qia;NvM7 z{mTe${doUwlwv)3AT!F>V<#N@PQdes5ohRljE=|aI7`O`I+hO6ks7_38?H4^Yt zV1N3wZ8v977#z@A**4ioQG3*Bk;j>Z$!Txy0tbJBP3j_7^tWs#C(9XYk&IpHmC#l5 z_1vXihO_XumR)Kn__@c#SzG>uU9-vIN69g~JD+uhv(U>bqQR8#x8Wz5e#>M7o7Hn% z&&TAMme9aYU>l`pu0~=fh?!k2zX2<3RL{Xi^(vlnqk3}l1Oty=;7$tWZjh4u!Xjmf zry}B58NE&IQ}Y&ag;bt~{c2H1I4hxo(D&G{9tWd@zW3eOFZBJi8%Kn`&vmtILO*Fg z8!SUx?hAe2-*xkFvTu2O4MwGu&aOQ$MFCCO{tyVGlb>Mcy6IOq4}Cv9csz2)NbYh; zDR#BoNPZpIFS1y~-Cl`Q(5BNE?Q<2#l7ce;ETn_lCnP6~Y9FS^)#f&TN0N5X)<$>A zhwA7%?Y$ITp0MrwUMf`E;~fgjlbjC#k~ugOhaB05eu3GC!=K0QhaU9w7buIJ_Iqqb zr=e-o@-{ZbfUD)08`AT-*^r)RByUKEzr|QJUbdvishee(+MTG*a8cj69hIX^Ba~;g zK7~y>b4&U|EC{hBZNPJ6OM3brF~ALuO@Z*(l5R!`Y)L=D#MD?lq{WtW2Zl9_rY+ZT zuMgLh4`RozK?SlY{Zpi&9iwDwofkM6D&*cWn%WCAG6}tcwaXH;kIFg!3Gmw=JR9ZQ znjS`VQmrU=@uRw22Fe|aXJ3WT+_bh3J_t5a!EverY;fm-?Zv2sRMabCnM;H1Ltu*v zJ(dbdfyS&c1$_lORZ7CI(S8tCu+@KND*6)EEpMX$R|#m%Jhr+pa85R7^aYSR`Xnb+ zuE}3n_Wc4EhTm_Gu$Cv!NHo)cVK0j1JjVXv4>zqn5*?9kV0LB zSU#F3 zhA0t31jg&qaIIH#+26yIFhl@RH>-T`s7G_e5ar=mk{##-$`1873(yYa!Xx~7$0@MG z=fQru!dM2KQxRBgp|wr@#U4R7R<<|;Z0xp(Kn&Cn!yc8k1y8%Ng|LJzkZZ*L^pLW} zUxDZ+iPAjnrgV}e7wggwf)oguKEfQ|d^-GdH@-*}>%?3Us$Q zy^4bAO}2+2tW^W@L#5@BH6Hq({G^1Qt)bzcS{m+#Q1*uJLmC_Y;Dg|)21(igr~INI zPR%C9Mv!uA=x~>kdkfaeGL!~62#8|W!p72At>~4&Ajva=8PQOG&Wtc(L_@3KTV#xC zp|3RUr_N@mGJWS*xZlc(YXD?_g_c@5+k;hK7c_MY2n?me}ckX@I46`(Za&;-_1pztMz`QSr>eG zcp!PfSELqvWub3-1p9EZF>fC($WET|hlj$r#6M0cAkFVF##>f-s&}Jv?1Kq-n9I2} zs_T8K7JOxqD$hJD_}Cpyign6tvgTW}iYA05^#CEOK0xWdG_1PmL!V_Ov87P3x$ql- zg^l*YzbSIeY<0CQhA${i30t@yVRmDd?38V z)xw#mTKEM#cfC&bLe>$%%e1WlXMF<9=&&q?0= z{}zpv&3_lhSJubO^&0J^4$N<@l<$gq?t)?=K1VgR+*PY79uE zi=9lxeH&{~Nwjm!fuv|i_UcA{%Tw8_OXuk_*{iz^RMBOlXc&4*bXhS@JDQ@)?qVE> zF5@m;M^$v$Ug9z+3`3;+RLvaqmVNuX81D7f;SM>Kt-~#H`WU8j?a#_7%d|g^Q^i7l zb5-y0}J=+VZKm3}f zvU~VfoLaXU@-BobL-Wu!ntq0qF?SDh1)Z<*IO@qR;YF-JWZxwmBB|ys;W1Lu{8_`q zE@9VwENi}BpV%e*m!v0l70q43Hza+vmhK65ozM=Aek;h_GyJ6>bI6r$e`HJlq32M(3*E(MHWqT0RE-VMG@|c(QFar2c7d~S+KUi5+ zX5{(j2NxJK@yRM5zA)vht8_ElUGBq|=gQoRD+3koA!U7x3SUD-_c;xCTiD-yR%YgK z^`xrH~Zv8PfH@hO6)zv5Pb4}_tO^5sdll5()o2cK7)G1EPan!rc5{gB71>~V%zXE+Rz zS!(p@O)f4rzir14<8}M3#`My_k_`7*-8Aj240qO0 zT?Zr&R-qOH;tZyetbF-VLhC01`N2IqThV4*YhXF8>50|%^UM_0;RFTi`SCk`12hiNABHrHGYx@{kfu+cRaiLG ztx8$b;s5xMBmMU%x$)#We&99k`3at?>Z9@OHg~A*@MfW-dmF{ha3}sIIoA*L=>NV% zsc#aLkl~(RyCB$*k3RgLR%I51;}0+MFB)DG#Fr0$#9WC5WN1J#=2^ot2n>KdO0U|3)cB|MQDf5HvjQhORyi8Od zGB%B9|AKA0B|~*U{jFY=(apz3tr*t@{?M)>rM~$gULf~mjCZ+3Q{5#p1GCN#2J1Q6e-pVU;>*-E7KXOMoHuwa z-IR93Scfl%>X{urFOB(+e4&~}?eyJV_Q{~8rZ(U%mCw8K%7Rb12L9LOf24l#udXJh*-VpJH7?_aRqv+Rf2@4%`~W`D>c*@= zmG}?oE#rw<(|=ap?jcg2?lRgf|NHj+KzZH1AC~tA%G>1S&mi$9k?{3jeyH8e?+Uvc zO6x1@0+=875qD`A&PEO67qK(Z6Ur@#3Zth~mSR01-;;Ki`OAHnX1h6o#`L9+5v<`? z=eaQAw}mAMll;mCx4*hB&}hw<@BLz-r3IKDEHC%h_rZ6CePwQuuaDt|OtrP{YF|yG z+gHCJSdB?qLk1^lrCe1}Qg?l@22}NpOwco`(%NbiDU;R6RYS_IRx?6Pqtpd&>yBnv zmD|wEKh#@QTeBc(7}Mj^B>A$s{Hl~+k9^91;_E$AE$W-x?!<}`zk+5t67*2F8-q^0 z&;3J1WVk(Q?S_GY?A(AG-#AX@f{V1OG|2DMk8@Y}>TB?sboW(U&EUnu_@TS1=vA$k z<5_Z|UG3=kY9Pgjp51{8KkT-kveaFNk4C#|g4Odm*RArwY*<3d62$1n7RXhKXN7uT z{&9YK##-;M!xy^at|4oEeDT~ZpFC%BEj~zUIl7}aWx~V~tKXjn>0`C!(l>nBR_ZDK%HYhU;+Ex*9$AJZ+iOn=*%mJXaC`#ZwEf9 zT?$`WP*Hj9!m8?;+Pa_CHw1!<7B6YM&d8lODQ|NAl!B?3URF45`i!EV%q%XMHT&{8 zS6q4YLRr}(Mvl5*^o3)_8h;5qde@ta|MunYe1kH6lY8%PjCfXp=>O`>xP1Q?51jwc z?X%WQ{d?x%W1hOsc;xO0qo?#X}H*22#D^ib;-N0%v`YK#n8RO z2b}Ty;=8XoXSLypUh8|a_n7q`wViW&>V$b?e>;Bf6=hw67aZER|Ls%W?Y+^s)L-s5 z3M$^OJ{bvin^9^cds)|N1ayKR;^b>HQ0rzq@|h$OEw_4;jaGa~OZ<<}g0} zZuhkxbqs&t&A>_T9BkQr&yZg=H5w;g-7xW)H7C6G^WXmJi(Bsh*^JVI!MBXX6COEZ zbaUVQ)@kcIcKm$l?}uJ-Y-B>`# z?%g-%nX-LjCb7fo@!le`W$<9W+dVDs0{q1xgQ8k*$FCVkE-uKG>>tPOALrfPq(d`IR(G)w!s&9~_1$oype z+VW|Q=9bJ{#zxLgtPUeWqc%nDKuS&cmG+(p`fxJU21ZOl(d2Pk54MA^7n& z4DWRlKY{ppgjY0X+8&%AMCgG#X~e9@rOz`Ek44BwC`OovK$>Mb9t_%3aVKstLOQ~5 zgwY5WBmCGpjC-TiydIXyzS&@7@#4jqa*8=#wQ9vIl;r+PfcRgblD=gxp4IQxkR?@Q0n!8nd)1_iBRoA%uUB+jx2XqS5`p*eq@&=&7!GF zD!F$4wf@q8F=cXzdpI^3{Yx?{0@YRSf|8P=;n|s4$M-qDk8GmLzOlLCsOyv|wdy+Z z3fDqXa%&$GYLm1$zTeNp=uno&l-w*8`$v4&K!|G za_CSShf?==u6WpWc`to7suvDr~y z88Epd)iX@SMa!SE$}%nx>iyUV!D6X_-PT=MHh8eUVo64sCC5^hr($(er3*7aSX0Jf z1YXJeT4vWC$$fhF^cf|S$GKr-X=Lu>Ft@*|F2jv(i}?^{ zLJe4OVj`U^5SDA>8v^xWa=k3#C=w?cHa}tCiT;|>ifUgylrLVQT>~0uaC0nCHDN`D zJBj8otRW%KEU2um-tR8P>Iu6|7)Kh6VSz+`iTJH-<<3 z$+!l73ljOo(5<(yZ z{Y*9dXfISuhm|Mt^ZkpVm^uswe%vZuP+uFY!>AyusW{JJOA_>^KF!MuBpuGdo>vn1 zs8j$aH7_cQYlBs|8;q{wSIa{Z9FZ?0r?kizfLF|>BX|+`qe4|W=D8Ufk#>tt|25*5 z@S57g7P?J1-+}Nx!Y2ri;kCbY2pbSyMA(k71L2ag`3-@Z>A~_M>$SId9Iv|O8uZ66 zpC;x1)#Xz&`QKkYlP3TeLF6)(d}}ROcEk<6dVlF6*`LyvjqXNweRu6BgFEc0h5z4= zN8R*Si+`zZE1sqPV7!SR6L~8Tmmuz4VGQ%vm-|ZDhZ+Lh;HoW$V`Af)7dPxmRH+Tj zVa18@jQvS2dDGeVredJQg@w~B%RztDZ9J+!C*@oGnQT%{>v@qIF`uI_e%95+S6;F{ zz+4mYYQ*;-?vKDD<+_)S(bt*ZH}z82aRGc! z>5@|~I&XyMEWS#UgTUYD^C32J`#M{D>OC3(IFvi^CaDoM%Fm*WbwukXFd=qcb$P?E5VSXOs?^(U%XP0*X(8u{AGoN={ zal6CG^CrY6BBmeqLtumOz*6mZzi>Fa5Ys0QAU^PO)mFg&`shR(%tCjdy$>Ngg|HQ2 zC&I@FhY)(-<#3*aa1O#~gnWeA2;~Ti5SAg_f$$K*QwUoTb|QR?a0sFI-6)T64#H@J ze1zEu@)2eulp`!cScY&1!b1p8 zA#6q1iSRMPA%x!dp*+Gl2%{155oRNlBP>E#hHwYMLkLeHY(?0K@G-(6gx=^6Cn21p z`vqSC>%JNAz!k5&bM`|I zeR}NXtb%tQ7=GuO*(*+$cWR4h?JvJyXd#FkGSbaAg;eP?!v;^(^zIG z=6wx~)dAmp#DRJhSD0sV>8>*}v3m4p=1!bC416_OP!r6QM-GQomKm8ue5TOIENiR* zKNSb+RgSqwB4iqPk%vVQ>D5VHRlvxs#GQ2`Q|>@#Lgq?j)t31JJ|oj#;VrMnWWZZd zhLR>yCA_}+dS9aQcHcUNaU-oEQLt5r~`j8rAozqenW%7?H}G`qa*x> z2ghXk5&fwIV{Qom$4m2I9*?sTI87j31?Vb};l{an$P>)~*$5`xa?o+E;W3F2n{;_N zKcvTDj{W?Bhw(_`HGl`{7^Wj|{AazqCd5Ejgi)8*2%HKH$N1R@ye^QA*N`!|c<|a` z9;D@Q4MKeU$Jl=W7mGf~H0xz~hJ^^cUhtgPjPGzUX~sG0Wg2DUaUB9)%ab%-bDE$$ z%46~)9WN3g1e1=}s1=~&wTpDTUYc|(a86lS53iwfaZ#i0&BLtsW+a$&&7f-roy_Aj zA!Q&fe+$o~%fk4TbtZmT?8OJo(B*(GXD}($ zVe)$jko-v3JgAqm`JV3mV4a2TLC`%2x|K*X53^p}6EONB(8iogybVFjJkpxyFXP;W zKswGbb{&OoC-NyD>D~j~dq<&r*Fv`kbbCNI5NYON)*C|tZAN~a7j%M-6)=ql>F5Us z5zKl!hlB1nDjmskkdEOHf=Op!u4Ak=j4zm=50kD7*rfX+yO;Be`we5TjgCcnA&vD@ zzJViqIS2f<`*yG|uy_^%57O1EQ~Aq02F|g_%RFudT|Z{%!#rh7A25%=Bj63+KLZK3 zBCs9w8TJh;zXzW~zc-x;c_u%c9&vEoVq#BC#qmjDRWrvSg;fn4Zxm+jYFtrR^;(V} z3M=cGbHtu9vZ?Vv#JB2yZSN^3iXZnewr*T@69UaEOE^5G(Cj}!8In-%=^ngAxfmd5_ zF0i>iVgBX7^k@1<3RV{7h}rKE0rxYaJi(fV5$W$n%<+Rb#W>Me&l7!6o-HOoO#Bzb zI~={7If(JQ4#p>ln?{)Ronm|j{2kigEcvGx-ynYaj}B)IT#xm!-&OwE;arS#;=aJo zKksl-ZeqTuIs>>?!z{Dt9W$fxp8 zF@nG?!0ZVr&@O(Q!dM2(oT$ecw&s8NkoKoxpQ|AGBZ}aPd2d{A+>7T5tn!z6Cb{ z_psnr;AIwkEASH*{`{u$D;B&O*kz%A1bChW{||8Ae8M}f`5^skrN6YZz{$9|Q-w6C`#fmZ_$uwdGE zlLgbhJ1m&?{j~+tzVBNw?OSERwC}?fO#6Of!L;Ws7Q7klnQpI-OV_yn2@byD=Yt*+30{w&j~2RAv#< zuR(rbJNCGUdtiLF(Z6fM`)#<>hWp^UGUN$|b1?M`ey6J`604K?M%r+R1-n602Rskg zZ?a|iWx(cq!43QU+(J+J@3Y~xzzr`uoL9myEdPuppR=7;ESTj#vf(dnSbpLHbUa9Z zhB-mkc!CWV0eAkz;k+KitbeX8e}N6R0uO*ck$)Q6$KSXx57xKJh99!wEjIkN4ez$$ zZ)~`SWzEa_`rGh%Hay;jOKjM0!;5V=WW%d~&H3wzn7{tYmd~F~F%Qc39B}?Rhx2hb z2=)8AE&oH{w;pgfhk};*|F-3GQ4{#B!}%#<<~v36ss{2OY{Qq>@N^sY+VDafz6p5X z3l3+Y_Qw^r{QGS91snd04Y%9yx4_?_y;F31omf(Q_nO+5Vf#)}OAKis+jp)F=h$$u z4f|~PCg5M8zOlN#+khuQpTjl2$437L8{TZgJAuvqP5=KV@E%-W-@?*`@_%Zh@3P?& z)RIZs=f+<=Lmofa-Ynowz1}#X$0^3ew)|-}jK@Uc2g~08oQLt0EZFT3pY3LVvu`V9Rf@;k#}45gY!K4Zm)~yKVS@4Ldjy*9YYv0Gt&c|4ubd zwdH5n@Fk?z>pNcG@`1UpWZGw%jlK+ckVT)>z=`qpRHM;G-vXS4^x-y4jcX7ZTJfdc7sP>j8mm+P+t4XU|{oLdxzODKED$`m|twe z*V=H%hVKC8J};S^h@I|xZ25n%;SDy-an(Fn|7SLAl;Wof0(dzGZ|{4(mrk1LEu30h z;`JJ3c$9qsp0@JWdjr*Yd9fDnlo;J4dA((|-UU^)^L}l|SGw z%N%{d*er1FhRDnNAL?#~S6b|O)VcV$;3PM1|CVwE66nCI=%w#RnMtNd2iLCDs`eCZ51}bQuT_IH(0k&oiz-X z*M0E%l%bxGl-I5%;mKG35`Sqh;PdQjrqU; zHS#Eu0KQctCwO(1Pdh5f^qW1py}TU-DKZOrUn_g8J{d7apN!1bC!tI4JQ2 zFjFpwrqlmGeuzr42#p@aC2YVz|Hq zo^WnvmR8qUGgY^hH`nm<3mi7gdh|n#UiJK}P5d$lRA1X@<>Z}OGR>P9KTD=f;^|R}XAIR1jCa>a5*&Rr3b~jPeG*zniY?mBCIm$o^9dhFm{I26Z*IN~d*j z)E^@;%0)f4BKl_#v@7b%IXk>B$p%z@NogI1+_FX^>1xOh<4aPL7DOK8#$1L^O?&y& zv}qW2I`bhAO{?b?=3pnTYxgxeuXKCUKvYy*Ce4Vv%jH*Ibi-^v7-3Y)HN&a|%(oIF ziXKEcz8Q7FK!cSKT4_l3Rj+qJb#09rjBtVQFR^wunaMTOdMofqJq9z2c{s!nck|O3 zOpZ&QY!vU*8K?;laAV+6KV+lIk1*$NrtuOp5*fKGk_J8~sC03XxiEu~t1yZ2(@NGB zS2yD7gtyJrj7qmaOQkerUayp4XliTu@*~IOBokLAjcqir!F)F~uL4 zA+G@yS6=5g_*+BW5GCu`_Jbovc>q7*Wi3_C*Ypz!*+xUnk@D;M>1Xn0zJcj@nT&VI zdWJGsx z=kviXGZ()_rbGl2ygIUg>B?i0YqX4v+NRRK<8Hw#QxfBbieTXXv~eyw2*N-V?I&UU z1T;Zcgt(swxG?cS6gB+4_qH?8R(A%0&I9h8NtpKc&&`F8&XBLSbTQO*j&GrM^CC-Ba2LKAiJ04AY~;_? z%y||F%03VK=@3AmPKStqsFYtVt=6ybiOEv~yT-`nmGgXNt!zSPo&i-aQwF3%4%^?M z3+?+veU2^qvp)`%ySmyo!UX$Dfgc +#endif + +#include + +#include +#include +#include +#include + +#define TEST_FAIL (-1) +#define TEST_SUCCESS (0) + +static int test_CyaSSL_Init(void); +static int test_CyaSSL_Cleanup(void); +static int test_CyaSSL_Method_Allocators(void); +static int test_CyaSSL_CTX_new(CYASSL_METHOD *method); +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) +static int test_CyaSSL_CTX_use_certificate_file(void); +static int test_CyaSSL_CTX_use_PrivateKey_file(void); +static int test_CyaSSL_CTX_load_verify_locations(void); +#ifndef NO_RSA +static int test_server_CyaSSL_new(void); +static int test_client_CyaSSL_new(void); +#ifndef SINGLE_THREADED +static int test_CyaSSL_read_write(void); +#endif /* SINGLE_THREADED */ +#endif /* NO_RSA */ +#endif /* NO_FILESYSTEM */ +#ifdef HAVE_SNI +static void test_CyaSSL_UseSNI(void); +#endif /* HAVE_SNI */ +#ifdef HAVE_MAX_FRAGMENT +static void test_CyaSSL_UseMaxFragment(void); +#endif /* HAVE_MAX_FRAGMENT */ +#ifdef HAVE_TRUNCATED_HMAC +static void test_CyaSSL_UseTruncatedHMAC(void); +#endif /* HAVE_TRUNCATED_HMAC */ +#ifdef HAVE_SUPPORTED_CURVES +static void test_CyaSSL_UseSupportedCurve(void); +#endif /* HAVE_SUPPORTED_CURVES */ + +/* test function helpers */ +static int test_method(CYASSL_METHOD *method, const char *name); +#ifdef OPENSSL_EXTRA +static int test_method2(CYASSL_METHOD *method, const char *name); +#endif +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) +static int test_ucf(CYASSL_CTX *ctx, const char* file, int type, + int cond, const char* name); +static int test_upkf(CYASSL_CTX *ctx, const char* file, int type, + int cond, const char* name); +static int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, + int cond, const char* name); + +THREAD_RETURN CYASSL_THREAD test_server_nofail(void*); +void test_client_nofail(void*); + +void run_cyassl_client(void* args); +THREAD_RETURN CYASSL_THREAD run_cyassl_server(void* args); + +void test_CyaSSL_client_server(callback_functions* client_callbacks, + callback_functions* server_callbacks); + +static const char* bogusFile = "/dev/null"; +#endif + +#define testingFmt " %s:" +#define resultFmt " %s\n" +static const char* passed = "passed"; +static const char* failed = "failed"; + +/* List of methods found in echoserver.c that I'm skipping for the moment: + * - CyaSSL_CTX_set_session_cache_mode() + */ + +int ApiTest(void) +{ + printf(" Begin API Tests\n"); + test_CyaSSL_Init(); + test_CyaSSL_Method_Allocators(); + test_CyaSSL_CTX_new(CyaSSLv23_server_method()); +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + test_CyaSSL_CTX_use_certificate_file(); + test_CyaSSL_CTX_use_PrivateKey_file(); + test_CyaSSL_CTX_load_verify_locations(); +#ifndef NO_RSA + test_server_CyaSSL_new(); + test_client_CyaSSL_new(); +#ifndef SINGLE_THREADED + test_CyaSSL_read_write(); +#endif /* SINGLE_THREADED */ +#endif /* NO_RSA */ +#endif /* NO_FILESYSTEM */ +#ifdef HAVE_SNI + test_CyaSSL_UseSNI(); +#endif /* HAVE_SNI */ +#ifdef HAVE_MAX_FRAGMENT + test_CyaSSL_UseMaxFragment(); +#endif /* HAVE_MAX_FRAGMENT */ +#ifdef HAVE_TRUNCATED_HMAC + test_CyaSSL_UseTruncatedHMAC(); +#endif /* HAVE_TRUNCATED_HMAC */ +#ifdef HAVE_SUPPORTED_CURVES + test_CyaSSL_UseSupportedCurve(); +#endif /* HAVE_SUPPORTED_CURVES */ + test_CyaSSL_Cleanup(); + printf(" End API Tests\n"); + + return TEST_SUCCESS; +} + +int test_CyaSSL_Init(void) +{ + int result; + + printf(testingFmt, "CyaSSL_Init()"); + result = CyaSSL_Init(); + printf(resultFmt, result == SSL_SUCCESS ? passed : failed); + + return result; +} + +static int test_CyaSSL_Cleanup(void) +{ + int result; + + printf(testingFmt, "CyaSSL_Cleanup()"); + result = CyaSSL_Cleanup(); + printf(resultFmt, result == SSL_SUCCESS ? passed : failed); + + return result; +} + +int test_method(CYASSL_METHOD *method, const char *name) +{ + printf(testingFmt, name); + if (method == NULL) + { + printf(resultFmt, failed); + return TEST_FAIL; + } + XFREE(method, 0, DYNAMIC_TYPE_METHOD); + printf(resultFmt, passed); + return TEST_SUCCESS; +} + +#ifdef OPENSSL_EXTRA +int test_method2(CYASSL_METHOD *method, const char *name) +{ + printf(testingFmt, name); + if (method != NULL) + { + XFREE(method, 0, DYNAMIC_TYPE_METHOD); + printf(resultFmt, failed); + return TEST_FAIL; + } + printf(resultFmt, passed); + return TEST_SUCCESS; +} +#endif + +int test_CyaSSL_Method_Allocators(void) +{ +#ifndef NO_OLD_TLS + test_method(CyaSSLv3_server_method(), "CyaSSLv3_server_method()"); + test_method(CyaSSLv3_client_method(), "CyaSSLv3_client_method()"); + test_method(CyaTLSv1_server_method(), "CyaTLSv1_server_method()"); + test_method(CyaTLSv1_client_method(), "CyaTLSv1_client_method()"); + test_method(CyaTLSv1_1_server_method(), "CyaTLSv1_1_server_method()"); + test_method(CyaTLSv1_1_client_method(), "CyaTLSv1_1_client_method()"); +#endif /* NO_OLD_TLS */ + test_method(CyaTLSv1_2_server_method(), "CyaTLSv1_2_server_method()"); + test_method(CyaTLSv1_2_client_method(), "CyaTLSv1_2_client_method()"); + test_method(CyaSSLv23_client_method(), "CyaSSLv23_client_method()"); + +#ifdef CYASSL_DTLS + test_method(CyaDTLSv1_server_method(), "CyaDTLSv1_server_method()"); + test_method(CyaDTLSv1_client_method(), "CyaDTLSv1_client_method()"); +#endif /* CYASSL_DTLS */ + +#ifdef OPENSSL_EXTRA + test_method2(CyaSSLv2_server_method(), "CyaSSLv2_server_method()"); + test_method2(CyaSSLv2_client_method(), "CyaSSLv2_client_method()"); +#endif /* OPENSSL_EXTRA */ + + return TEST_SUCCESS; +} + +int test_CyaSSL_CTX_new(CYASSL_METHOD *method) +{ + if (method != NULL) + { + CYASSL_CTX *ctx; + + printf(testingFmt, "CyaSSL_CTX_new(NULL)"); + ctx = CyaSSL_CTX_new(NULL); + if (ctx != NULL) + { + CyaSSL_CTX_free(ctx); + printf(resultFmt, failed); + } + else + printf(resultFmt, passed); + + printf(testingFmt, "CyaSSL_CTX_new(method)"); + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + { + printf(resultFmt, failed); + XFREE(method, 0, DYNAMIC_TYPE_METHOD); + /* free the method data. if this was successful, freeing + the CTX frees the method. */ + } + else + { + CyaSSL_CTX_free(ctx); + printf(resultFmt, passed); + } + } + else + printf("test_CyaSSL_CTX_new() called without method\n"); + + return TEST_SUCCESS; +} + +#ifdef HAVE_SNI +static void use_SNI_at_ctx(CYASSL_CTX* ctx) +{ + byte type = CYASSL_SNI_HOST_NAME; + char name[] = "www.yassl.com"; + + AssertIntEQ(1, CyaSSL_CTX_UseSNI(ctx, type, (void *) name, XSTRLEN(name))); +} + +static void use_SNI_at_ssl(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + char name[] = "www.yassl.com"; + + AssertIntEQ(1, CyaSSL_UseSNI(ssl, type, (void *) name, XSTRLEN(name))); +} + +static void different_SNI_at_ssl(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + char name[] = "ww2.yassl.com"; + + AssertIntEQ(1, CyaSSL_UseSNI(ssl, type, (void *) name, XSTRLEN(name))); +} + +static void use_SNI_WITH_CONTINUE_at_ssl(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + + use_SNI_at_ssl(ssl); + + CyaSSL_SNI_SetOptions(ssl, type, CYASSL_SNI_CONTINUE_ON_MISMATCH); +} + +static void use_SNI_WITH_FAKE_ANSWER_at_ssl(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + + use_SNI_at_ssl(ssl); + + CyaSSL_SNI_SetOptions(ssl, type, CYASSL_SNI_ANSWER_ON_MISMATCH); +} + +static void verify_SNI_abort_on_client(CYASSL* ssl) +{ + /* FATAL_ERROR */ + AssertIntEQ(-213, CyaSSL_get_error(ssl, 0)); +} + +static void verify_SNI_abort_on_server(CYASSL* ssl) +{ + /* UNKNOWN_SNI_HOST_NAME_E */ + AssertIntEQ(-281, CyaSSL_get_error(ssl, 0)); +} + +static void verify_SNI_no_matching(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + char* request = (char*) &type; /* to be overwriten */ + + AssertIntEQ(CYASSL_SNI_NO_MATCH, CyaSSL_SNI_Status(ssl, type)); + + AssertNotNull(request); + AssertIntEQ(0, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); + AssertNull(request); +} + +static void verify_SNI_real_matching(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + char* request = NULL; + char name[] = "www.yassl.com"; + word16 length = XSTRLEN(name); + + AssertIntEQ(CYASSL_SNI_REAL_MATCH, CyaSSL_SNI_Status(ssl, type)); + + AssertIntEQ(length, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); + AssertNotNull(request); + AssertStrEQ(name, request); +} + +static void verify_SNI_fake_matching(CYASSL* ssl) +{ + byte type = CYASSL_SNI_HOST_NAME; + char* request = NULL; + char name[] = "ww2.yassl.com"; + word16 length = XSTRLEN(name); + + AssertIntEQ(CYASSL_SNI_FAKE_MATCH, CyaSSL_SNI_Status(ssl, type)); + + AssertIntEQ(length, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); + AssertNotNull(request); + AssertStrEQ(name, request); +} + +static void test_CyaSSL_SNI_GetFromBuffer(void) +{ + byte buffer[] = { /* www.paypal.com */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x60, 0x03, 0x03, 0x5c, + 0xc4, 0xb3, 0x8c, 0x87, 0xef, 0xa4, 0x09, 0xe0, 0x02, 0xab, 0x86, 0xca, + 0x76, 0xf0, 0x9e, 0x01, 0x65, 0xf6, 0xa6, 0x06, 0x13, 0x1d, 0x0f, 0xa5, + 0x79, 0xb0, 0xd4, 0x77, 0x22, 0xeb, 0x1a, 0x00, 0x00, 0x16, 0x00, 0x6b, + 0x00, 0x67, 0x00, 0x39, 0x00, 0x33, 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x35, + 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x21, + 0x00, 0x00, 0x00, 0x13, 0x00, 0x11, 0x00, 0x00, 0x0e, 0x77, 0x77, 0x77, + 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x00, + 0x0d, 0x00, 0x06, 0x00, 0x04, 0x04, 0x01, 0x02, 0x01 + }; + + byte buffer2[] = { /* api.textmate.org */ + 0x16, 0x03, 0x01, 0x00, 0xc6, 0x01, 0x00, 0x00, 0xc2, 0x03, 0x03, 0x52, + 0x8b, 0x7b, 0xca, 0x69, 0xec, 0x97, 0xd5, 0x08, 0x03, 0x50, 0xfe, 0x3b, + 0x99, 0xc3, 0x20, 0xce, 0xa5, 0xf6, 0x99, 0xa5, 0x71, 0xf9, 0x57, 0x7f, + 0x04, 0x38, 0xf6, 0x11, 0x0b, 0xb8, 0xd3, 0x00, 0x00, 0x5e, 0x00, 0xff, + 0xc0, 0x24, 0xc0, 0x23, 0xc0, 0x0a, 0xc0, 0x09, 0xc0, 0x07, 0xc0, 0x08, + 0xc0, 0x28, 0xc0, 0x27, 0xc0, 0x14, 0xc0, 0x13, 0xc0, 0x11, 0xc0, 0x12, + 0xc0, 0x26, 0xc0, 0x25, 0xc0, 0x2a, 0xc0, 0x29, 0xc0, 0x05, 0xc0, 0x04, + 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x0f, 0xc0, 0x0e, 0xc0, 0x0c, 0xc0, 0x0d, + 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x35, + 0x00, 0x0a, 0x00, 0x67, 0x00, 0x6b, 0x00, 0x33, 0x00, 0x39, 0x00, 0x16, + 0x00, 0xaf, 0x00, 0xae, 0x00, 0x8d, 0x00, 0x8c, 0x00, 0x8a, 0x00, 0x8b, + 0x00, 0xb1, 0x00, 0xb0, 0x00, 0x2c, 0x00, 0x3b, 0x01, 0x00, 0x00, 0x3b, + 0x00, 0x00, 0x00, 0x15, 0x00, 0x13, 0x00, 0x00, 0x10, 0x61, 0x70, 0x69, + 0x2e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x6f, 0x72, + 0x67, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x06, 0x00, 0x17, 0x00, 0x18, 0x00, + 0x19, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x0c, 0x00, + 0x0a, 0x05, 0x01, 0x04, 0x01, 0x02, 0x01, 0x04, 0x03, 0x02, 0x03 + }; + + byte buffer3[] = { /* no sni extension */ + 0x16, 0x03, 0x03, 0x00, 0x4d, 0x01, 0x00, 0x00, 0x49, 0x03, 0x03, 0xea, + 0xa1, 0x9f, 0x60, 0xdd, 0x52, 0x12, 0x13, 0xbd, 0x84, 0x34, 0xd5, 0x1c, + 0x38, 0x25, 0xa8, 0x97, 0xd2, 0xd5, 0xc6, 0x45, 0xaf, 0x1b, 0x08, 0xe4, + 0x1e, 0xbb, 0xdf, 0x9d, 0x39, 0xf0, 0x65, 0x00, 0x00, 0x16, 0x00, 0x6b, + 0x00, 0x67, 0x00, 0x39, 0x00, 0x33, 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x35, + 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x0a, + 0x00, 0x0d, 0x00, 0x06, 0x00, 0x04, 0x04, 0x01, 0x02, 0x01 + }; + + byte result[32] = {0}; + word32 length = 32; + + AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3), + 0, result, &length)); + + AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), + 1, result, &length)); + + AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, + result, &length)); + buffer[0] = 0x16; + + AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, + result, &length)); + buffer[1] = 0x03; + + AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, + result, &length)); + buffer[2] = 0x03; + + AssertIntEQ(-210, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, + result, &length)); + buffer[4] = 0x64; + + AssertIntEQ(1, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, + result, &length)); + result[length] = 0; + AssertStrEQ("www.paypal.com", (const char*) result); + + length = 32; + + AssertIntEQ(1, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), 0, + result, &length)); + result[length] = 0; + AssertStrEQ("api.textmate.org", (const char*) result); +} + +void test_CyaSSL_UseSNI(void) +{ + callback_functions client_callbacks = {CyaSSLv23_client_method, 0, 0, 0}; + callback_functions server_callbacks = {CyaSSLv23_server_method, 0, 0, 0}; + + CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + CYASSL *ssl = CyaSSL_new(ctx); + + AssertNotNull(ctx); + AssertNotNull(ssl); + + /* error cases */ + AssertIntNE(1, CyaSSL_CTX_UseSNI(NULL, 0, (void *) "ctx", XSTRLEN("ctx"))); + AssertIntNE(1, CyaSSL_UseSNI( NULL, 0, (void *) "ssl", XSTRLEN("ssl"))); + AssertIntNE(1, CyaSSL_CTX_UseSNI(ctx, -1, (void *) "ctx", XSTRLEN("ctx"))); + AssertIntNE(1, CyaSSL_UseSNI( ssl, -1, (void *) "ssl", XSTRLEN("ssl"))); + AssertIntNE(1, CyaSSL_CTX_UseSNI(ctx, 0, (void *) NULL, XSTRLEN("ctx"))); + AssertIntNE(1, CyaSSL_UseSNI( ssl, 0, (void *) NULL, XSTRLEN("ssl"))); + + /* success case */ + AssertIntEQ(1, CyaSSL_CTX_UseSNI(ctx, 0, (void *) "ctx", XSTRLEN("ctx"))); + AssertIntEQ(1, CyaSSL_UseSNI( ssl, 0, (void *) "ssl", XSTRLEN("ssl"))); + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) + + /* Testing success case at ctx */ + client_callbacks.ctx_ready = server_callbacks.ctx_ready = use_SNI_at_ctx; + server_callbacks.on_result = verify_SNI_real_matching; + + test_CyaSSL_client_server(&client_callbacks, &server_callbacks); + + /* Testing success case at ssl */ + client_callbacks.ctx_ready = server_callbacks.ctx_ready = NULL; + client_callbacks.ssl_ready = server_callbacks.ssl_ready = use_SNI_at_ssl; + + test_CyaSSL_client_server(&client_callbacks, &server_callbacks); + + /* Testing default mismatch behaviour */ + client_callbacks.ssl_ready = different_SNI_at_ssl; + client_callbacks.on_result = verify_SNI_abort_on_client; + server_callbacks.on_result = verify_SNI_abort_on_server; + + test_CyaSSL_client_server(&client_callbacks, &server_callbacks); + client_callbacks.on_result = NULL; + + /* Testing continue on mismatch */ + client_callbacks.ssl_ready = different_SNI_at_ssl; + server_callbacks.ssl_ready = use_SNI_WITH_CONTINUE_at_ssl; + server_callbacks.on_result = verify_SNI_no_matching; + + test_CyaSSL_client_server(&client_callbacks, &server_callbacks); + + /* Testing fake answer on mismatch */ + server_callbacks.ssl_ready = use_SNI_WITH_FAKE_ANSWER_at_ssl; + server_callbacks.on_result = verify_SNI_fake_matching; + + test_CyaSSL_client_server(&client_callbacks, &server_callbacks); + +#endif + + test_CyaSSL_SNI_GetFromBuffer(); +} +#endif /* HAVE_SNI */ + +#ifdef HAVE_MAX_FRAGMENT +static void test_CyaSSL_UseMaxFragment(void) +{ + CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + CYASSL *ssl = CyaSSL_new(ctx); + + AssertNotNull(ctx); + AssertNotNull(ssl); + + /* error cases */ + AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(NULL, CYASSL_MFL_2_9)); + AssertIntNE(1, CyaSSL_UseMaxFragment( NULL, CYASSL_MFL_2_9)); + AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(ctx, 0)); + AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(ctx, 6)); + AssertIntNE(1, CyaSSL_UseMaxFragment(ssl, 0)); + AssertIntNE(1, CyaSSL_UseMaxFragment(ssl, 6)); + + /* success case */ + AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_9)); + AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_10)); + AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_11)); + AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_12)); + AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_13)); + AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_9)); + AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_10)); + AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_11)); + AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_12)); + AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_13)); + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); +} +#endif /* HAVE_MAX_FRAGMENT */ + +#ifdef HAVE_TRUNCATED_HMAC +static void test_CyaSSL_UseTruncatedHMAC(void) +{ + CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + CYASSL *ssl = CyaSSL_new(ctx); + + AssertNotNull(ctx); + AssertNotNull(ssl); + + /* error cases */ + AssertIntNE(1, CyaSSL_CTX_UseTruncatedHMAC(NULL)); + AssertIntNE(1, CyaSSL_UseTruncatedHMAC(NULL)); + + /* success case */ + AssertIntEQ(1, CyaSSL_CTX_UseTruncatedHMAC(ctx)); + AssertIntEQ(1, CyaSSL_UseTruncatedHMAC(ssl)); + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); +} +#endif /* HAVE_TRUNCATED_HMAC */ + +#ifdef HAVE_SUPPORTED_CURVES +static void test_CyaSSL_UseSupportedCurve(void) +{ + CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + CYASSL *ssl = CyaSSL_new(ctx); + + AssertNotNull(ctx); + AssertNotNull(ssl); + +#ifndef NO_CYASSL_CLIENT + /* error cases */ + AssertIntNE(1, CyaSSL_CTX_UseSupportedCurve(NULL, CYASSL_ECC_SECP160R1)); + AssertIntNE(1, CyaSSL_CTX_UseSupportedCurve(ctx, 0)); + + AssertIntNE(1, CyaSSL_UseSupportedCurve(NULL, CYASSL_ECC_SECP160R1)); + AssertIntNE(1, CyaSSL_UseSupportedCurve(ssl, 0)); + + /* success case */ + AssertIntEQ(1, CyaSSL_CTX_UseSupportedCurve(ctx, CYASSL_ECC_SECP160R1)); + AssertIntEQ(1, CyaSSL_UseSupportedCurve(ssl, CYASSL_ECC_SECP160R1)); +#endif + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); +} +#endif /* HAVE_SUPPORTED_CURVES */ + +#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) +/* Helper for testing CyaSSL_CTX_use_certificate_file() */ +int test_ucf(CYASSL_CTX *ctx, const char* file, int type, int cond, + const char* name) +{ + int result; + + printf(testingFmt, name); + result = CyaSSL_CTX_use_certificate_file(ctx, file, type); + if (result != cond) + { + printf(resultFmt, failed); + return TEST_FAIL; + } + printf(resultFmt, passed); + return TEST_SUCCESS; +} + +int test_CyaSSL_CTX_use_certificate_file(void) +{ + CYASSL_METHOD *method; + CYASSL_CTX *ctx; + + method = CyaSSLv23_server_method(); + if (method == NULL) + { + printf("test_CyaSSL_CTX_use_certificate_file() cannot create method\n"); + return TEST_FAIL; + } + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + { + printf("test_CyaSSL_CTX_use_certificate_file() cannot create context\n"); + XFREE(method, 0, DYNAMIC_TYPE_METHOD); + return TEST_FAIL; + } + + /* setting all parameters to garbage. this should succeed with + failure */ + /* Then set the parameters to legit values but set each item to + bogus and call again. Finish with a successful success. */ + /* If the build is configured to not have RSA, loading the + certificate files will fail. */ + + test_ucf(NULL, NULL, 9999, SSL_FAILURE, + "CyaSSL_CTX_use_certificate_file(NULL, NULL, 9999)"); +/* test_ucf(NULL, svrCert, SSL_FILETYPE_PEM, SSL_FAILURE, + "CyaSSL_CTX_use_certificate_file(NULL, svrCert, SSL_FILETYPE_PEM)");*/ + test_ucf(ctx, bogusFile, SSL_FILETYPE_PEM, SSL_FAILURE, + "CyaSSL_CTX_use_certificate_file(ctx, bogusFile, SSL_FILETYPE_PEM)"); + test_ucf(ctx, svrCert, 9999, SSL_FAILURE, + "CyaSSL_CTX_use_certificate_file(ctx, svrCert, 9999)"); +#ifndef NO_RSA + test_ucf(ctx, svrCert, SSL_FILETYPE_PEM, SSL_SUCCESS, + "CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)"); +#else + test_ucf(ctx, svrCert, SSL_FILETYPE_PEM, SSL_FAILURE, + "NO_RSA: CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)"); +#endif + + CyaSSL_CTX_free(ctx); + return TEST_SUCCESS; +} + +/* Helper for testing CyaSSL_CTX_use_PrivateKey_file() */ +int test_upkf(CYASSL_CTX *ctx, const char* file, int type, int cond, + const char* name) +{ + int result; + + printf(testingFmt, name); + result = CyaSSL_CTX_use_PrivateKey_file(ctx, file, type); + if (result != cond) + { + printf(resultFmt, failed); + return TEST_FAIL; + } + printf(resultFmt, passed); + return TEST_SUCCESS; +} + +int test_CyaSSL_CTX_use_PrivateKey_file(void) +{ + CYASSL_METHOD *method; + CYASSL_CTX *ctx; + + method = CyaSSLv23_server_method(); + if (method == NULL) + { + printf("test_CyaSSL_CTX_use_PrivateKey_file() cannot create method\n"); + return TEST_FAIL; + } + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + { + printf("test_CyaSSL_CTX_use_PrivateKey_file() cannot create context\n"); + XFREE(method, 0, DYNAMIC_TYPE_METHOD); + return TEST_FAIL; + } + + test_upkf(NULL, NULL, 9999, SSL_FAILURE, + "CyaSSL_CTX_use_PrivateKey_file(NULL, NULL, 9999)"); +/* test_upkf(NULL, svrKey, SSL_FILETYPE_PEM, SSL_FAILURE, + "CyaSSL_CTX_use_PrivateKey_file(NULL, svrKey, SSL_FILETYPE_PEM)");*/ + test_upkf(ctx, bogusFile, SSL_FILETYPE_PEM, SSL_FAILURE, + "CyaSSL_CTX_use_PrivateKey_file(ctx, bogusFile, SSL_FILETYPE_PEM)"); + test_upkf(ctx, svrKey, 9999, SSL_FAILURE, + "CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, 9999)"); + test_upkf(ctx, svrKey, SSL_FILETYPE_PEM, SSL_SUCCESS, + "CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM)"); + + CyaSSL_CTX_free(ctx); + return TEST_SUCCESS; +} + +/* Helper for testing CyaSSL_CTX_load_verify_locations() */ +int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, int cond, + const char* name) +{ + int result; + + printf(testingFmt, name); + /* + * CyaSSL_CTX_load_verify_locations() returns SSL_SUCCESS (1) for + * success, SSL_FAILURE (0) for a non-specific failure, or a specific + * failure code (<0). Need to normalize the return code to 1 or 0. + */ + result = CyaSSL_CTX_load_verify_locations(ctx, file, path) >= SSL_SUCCESS; + if (result != cond) + { + printf(resultFmt, failed); + return TEST_FAIL; + } + printf(resultFmt, passed); + return TEST_SUCCESS; +} + +int test_CyaSSL_CTX_load_verify_locations(void) +{ + CYASSL_METHOD *method; + CYASSL_CTX *ctx; + + method = CyaSSLv23_client_method(); + if (method == NULL) + { + printf("test_CyaSSL_CTX_load_verify_locations() cannot create method\n"); + return TEST_FAIL; + } + + ctx = CyaSSL_CTX_new(method); + if (ctx == NULL) + { + printf("test_CyaSSL_CTX_load_verify_locations() cannot create context\n"); + free(method); + return TEST_FAIL; + } + + test_lvl(NULL, NULL, NULL, SSL_FAILURE, + "CyaSSL_CTX_load_verify_locations(NULL, NULL, NULL)"); + test_lvl(ctx, NULL, NULL, SSL_FAILURE, + "CyaSSL_CTX_load_verify_locations(ctx, NULL, NULL)"); + test_lvl(NULL, caCert, NULL, SSL_FAILURE, + "CyaSSL_CTX_load_verify_locations(ctx, NULL, NULL)"); + test_lvl(ctx, caCert, bogusFile, SSL_FAILURE, + "CyaSSL_CTX_load_verify_locations(ctx, caCert, bogusFile)"); + /* Add a test for the certs directory path loading. */ + /* There is a leak here. If you load a second cert, the first one + is lost. */ +#ifndef NO_RSA + test_lvl(ctx, caCert, 0, SSL_SUCCESS, + "CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)"); +#else + test_lvl(ctx, caCert, 0, SSL_FAILURE, + "NO_RSA: CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)"); +#endif + + CyaSSL_CTX_free(ctx); + return TEST_SUCCESS; +} + +#ifndef NO_RSA + +int test_server_CyaSSL_new(void) +{ + int result; + CYASSL_CTX *ctx; + CYASSL_CTX *ctx_nocert; + CYASSL *ssl; + + ctx = CyaSSL_CTX_new(CyaSSLv23_server_method()); + if (ctx == NULL) + { + printf("test_server_CyaSSL_new() cannot create context\n"); + return TEST_FAIL; + } + + result = CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM); + if (result == SSL_FAILURE) + { + printf("test_server_CyaSSL_new() cannot obtain certificate\n"); + CyaSSL_CTX_free(ctx); + return TEST_FAIL; + } + + result = CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM); + if (result == SSL_FAILURE) + { + printf("test_server_CyaSSL_new() cannot obtain key\n"); + CyaSSL_CTX_free(ctx); + return TEST_FAIL; + } + + ctx_nocert = CyaSSL_CTX_new(CyaSSLv23_server_method()); + if (ctx_nocert == NULL) + { + printf("test_server_CyaSSL_new() cannot create bogus context\n"); + CyaSSL_CTX_free(ctx); + return TEST_FAIL; + } + + printf(testingFmt, "CyaSSL_new(NULL) server"); + ssl = CyaSSL_new(NULL); + if (ssl != NULL) + { + printf(resultFmt, failed); + CyaSSL_free(ssl); + } + else + printf(resultFmt, passed); + + printf(testingFmt, "CyaSSL_new(ctx_nocert) server"); + ssl = CyaSSL_new(ctx_nocert); + if (ssl != NULL) + { + printf(resultFmt, failed); + CyaSSL_free(ssl); + } + else + printf(resultFmt, passed); + + printf(testingFmt, "CyaSSL_new(ctx) server"); + ssl = CyaSSL_new(ctx); + if (ssl == NULL) + printf(resultFmt, failed); + else + { + printf(resultFmt, passed); + CyaSSL_free(ssl); + } + + CyaSSL_CTX_free(ctx_nocert); + CyaSSL_CTX_free(ctx); + return TEST_SUCCESS; +} + +int test_client_CyaSSL_new(void) +{ + int result; + CYASSL_CTX *ctx; + CYASSL_CTX *ctx_nocert; + CYASSL *ssl; + + ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + if (ctx == NULL) + { + printf("test_client_CyaSSL_new() cannot create context\n"); + return TEST_FAIL; + } + + result = CyaSSL_CTX_load_verify_locations(ctx, caCert, 0); + if (result == SSL_FAILURE) + { + printf("test_client_CyaSSL_new() cannot obtain certificate\n"); + CyaSSL_CTX_free(ctx); + return TEST_FAIL; + } + + ctx_nocert = CyaSSL_CTX_new(CyaSSLv23_client_method()); + if (ctx_nocert == NULL) + { + printf("test_client_CyaSSL_new() cannot create bogus context\n"); + CyaSSL_CTX_free(ctx); + return TEST_FAIL; + } + + printf(testingFmt, "CyaSSL_new(NULL) client"); + ssl = CyaSSL_new(NULL); + if (ssl != NULL) + { + printf(resultFmt, failed); + CyaSSL_free(ssl); + } + else + printf(resultFmt, passed); + + printf(testingFmt, "CyaSSL_new(ctx_nocert) client"); + ssl = CyaSSL_new(ctx_nocert); + if (ssl == NULL) + printf(resultFmt, failed); + else + { + printf(resultFmt, passed); + CyaSSL_free(ssl); + } + + printf(testingFmt, "CyaSSL_new(ctx) client"); + ssl = CyaSSL_new(ctx); + if (ssl == NULL) + printf(resultFmt, failed); + else + { + printf(resultFmt, passed); + CyaSSL_free(ssl); + } + + CyaSSL_CTX_free(ctx_nocert); + CyaSSL_CTX_free(ctx); + return TEST_SUCCESS; +} + + +#ifndef SINGLE_THREADED + +static int test_CyaSSL_read_write(void) +{ + /* The unit testing for read and write shall happen simutaneously, since + * one can't do anything with one without the other. (Except for a failure + * test case.) This function will call all the others that will set up, + * execute, and report their test findings. + * + * Set up the success case first. This function will become the template + * for the other tests. This should eventually be renamed + * + * The success case isn't interesting, how can this fail? + * - Do not give the client context a CA certificate. The connect should + * fail. Do not need server for this? + * - Using NULL for the ssl object on server. Do not need client for this. + * - Using NULL for the ssl object on client. Do not need server for this. + * - Good ssl objects for client and server. Client write() without server + * read(). + * - Good ssl objects for client and server. Server write() without client + * read(). + * - Forgetting the password callback? + */ + int test_result = TEST_SUCCESS; + tcp_ready ready; + func_args client_args; + func_args server_args; + THREAD_TYPE serverThread; + + StartTCP(); + + InitTcpReady(&ready); + server_args.signal = &ready; + client_args.signal = &ready; + start_thread(test_server_nofail, &server_args, &serverThread); + wait_tcp_ready(&server_args); + test_client_nofail(&client_args); + join_thread(serverThread); + + if (client_args.return_code != TEST_SUCCESS) + { + printf(resultFmt, "client failure"); + test_result = TEST_FAIL; + } + if (server_args.return_code != TEST_SUCCESS) + { + printf(resultFmt, "server failure"); + test_result = TEST_FAIL; + } + + FreeTcpReady(&ready); + + return test_result; +} + +#endif + +THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args) +{ + SOCKET_T sockfd = 0; + SOCKET_T clientfd = 0; + word16 port = yasslPort; + + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + CYASSL* ssl = 0; + + char msg[] = "I hear you fa shizzle!"; + char input[1024]; + int idx; + + ((func_args*)args)->return_code = TEST_FAIL; + method = CyaSSLv23_server_method(); + ctx = CyaSSL_CTX_new(method); + +#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ + !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) + port = 0; +#endif + + CyaSSL_CTX_set_verify(ctx, + SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + if (CyaSSL_CTX_load_verify_locations(ctx, cliCert, 0) != SSL_SUCCESS) + { + /*err_sys("can't load ca file, Please run from CyaSSL home dir");*/ + goto done; + } + if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + { + /*err_sys("can't load server cert chain file, " + "Please run from CyaSSL home dir");*/ + goto done; + } + if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + { + /*err_sys("can't load server key file, " + "Please run from CyaSSL home dir");*/ + goto done; + } + ssl = CyaSSL_new(ctx); + tcp_accept(&sockfd, &clientfd, (func_args*)args, port, 0, 0); + CloseSocket(sockfd); + + CyaSSL_set_fd(ssl, clientfd); + +#ifdef NO_PSK + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #else + SetDH(ssl); /* will repick suites with DHE, higher priority than PSK */ + #endif +#endif + if (CyaSSL_accept(ssl) != SSL_SUCCESS) + { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + /*err_sys("SSL_accept failed");*/ + goto done; + } + + idx = CyaSSL_read(ssl, input, sizeof(input)-1); + if (idx > 0) { + input[idx] = 0; + printf("Client message: %s\n", input); + } + + if (CyaSSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) + { + /*err_sys("SSL_write failed");*/ + return 0; + } + +done: + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + + CloseSocket(clientfd); + ((func_args*)args)->return_code = TEST_SUCCESS; + return 0; +} + +void test_client_nofail(void* args) +{ + SOCKET_T sockfd = 0; + + CYASSL_METHOD* method = 0; + CYASSL_CTX* ctx = 0; + CYASSL* ssl = 0; + + char msg[64] = "hello cyassl!"; + char reply[1024]; + int input; + int msgSz = (int)strlen(msg); + + ((func_args*)args)->return_code = TEST_FAIL; + method = CyaSSLv23_client_method(); + ctx = CyaSSL_CTX_new(method); + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + if (CyaSSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) + { + /* err_sys("can't load ca file, Please run from CyaSSL home dir");*/ + goto done2; + } + if (CyaSSL_CTX_use_certificate_file(ctx, cliCert, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + { + /*err_sys("can't load client cert file, " + "Please run from CyaSSL home dir");*/ + goto done2; + } + if (CyaSSL_CTX_use_PrivateKey_file(ctx, cliKey, SSL_FILETYPE_PEM) + != SSL_SUCCESS) + { + /*err_sys("can't load client key file, " + "Please run from CyaSSL home dir");*/ + goto done2; + } + + tcp_connect(&sockfd, yasslIP, ((func_args*)args)->signal->port, 0); + + ssl = CyaSSL_new(ctx); + CyaSSL_set_fd(ssl, sockfd); + if (CyaSSL_connect(ssl) != SSL_SUCCESS) + { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("err = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + /*printf("SSL_connect failed");*/ + goto done2; + } + + if (CyaSSL_write(ssl, msg, msgSz) != msgSz) + { + /*err_sys("SSL_write failed");*/ + goto done2; + } + + input = CyaSSL_read(ssl, reply, sizeof(reply)-1); + if (input > 0) + { + reply[input] = 0; + printf("Server response: %s\n", reply); + } + +done2: + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + + CloseSocket(sockfd); + ((func_args*)args)->return_code = TEST_SUCCESS; + return; +} + +void run_cyassl_client(void* args) +{ + callback_functions* callbacks = ((func_args*)args)->callbacks; + + CYASSL_CTX* ctx = CyaSSL_CTX_new(callbacks->method()); + CYASSL* ssl = NULL; + SOCKET_T sfd = 0; + + char msg[] = "hello cyassl server!"; + int len = (int) XSTRLEN(msg); + char input[1024]; + int idx; + + ((func_args*)args)->return_code = TEST_FAIL; + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + AssertIntEQ(SSL_SUCCESS, CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)); + + AssertIntEQ(SSL_SUCCESS, + CyaSSL_CTX_use_certificate_file(ctx, cliCert, SSL_FILETYPE_PEM)); + + AssertIntEQ(SSL_SUCCESS, + CyaSSL_CTX_use_PrivateKey_file(ctx, cliKey, SSL_FILETYPE_PEM)); + + if (callbacks->ctx_ready) + callbacks->ctx_ready(ctx); + + tcp_connect(&sfd, yasslIP, ((func_args*)args)->signal->port, 0); + + ssl = CyaSSL_new(ctx); + CyaSSL_set_fd(ssl, sfd); + + if (callbacks->ssl_ready) + callbacks->ssl_ready(ssl); + + if (CyaSSL_connect(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + + } else { + AssertIntEQ(len, CyaSSL_write(ssl, msg, len)); + + if (0 < (idx = CyaSSL_read(ssl, input, sizeof(input)-1))) { + input[idx] = 0; + printf("Server response: %s\n", input); + } + } + + if (callbacks->on_result) + callbacks->on_result(ssl); + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + CloseSocket(sfd); + ((func_args*)args)->return_code = TEST_SUCCESS; +} + +THREAD_RETURN CYASSL_THREAD run_cyassl_server(void* args) +{ + callback_functions* callbacks = ((func_args*)args)->callbacks; + + CYASSL_CTX* ctx = CyaSSL_CTX_new(callbacks->method()); + CYASSL* ssl = NULL; + SOCKET_T sfd = 0; + SOCKET_T cfd = 0; + word16 port = yasslPort; + + char msg[] = "I hear you fa shizzle!"; + int len = (int) XSTRLEN(msg); + char input[1024]; + int idx; + + ((func_args*)args)->return_code = TEST_FAIL; + +#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ + !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) + port = 0; +#endif + + CyaSSL_CTX_set_verify(ctx, + SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); + +#ifdef OPENSSL_EXTRA + CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); +#endif + + + AssertIntEQ(SSL_SUCCESS, CyaSSL_CTX_load_verify_locations(ctx, cliCert, 0)); + + AssertIntEQ(SSL_SUCCESS, + CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)); + + AssertIntEQ(SSL_SUCCESS, + CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM)); + + if (callbacks->ctx_ready) + callbacks->ctx_ready(ctx); + + ssl = CyaSSL_new(ctx); + + tcp_accept(&sfd, &cfd, (func_args*)args, port, 0, 0); + CloseSocket(sfd); + + CyaSSL_set_fd(ssl, cfd); + +#ifdef NO_PSK + #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) + CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); + #else + SetDH(ssl); /* will repick suites with DHE, higher priority than PSK */ + #endif +#endif + + if (callbacks->ssl_ready) + callbacks->ssl_ready(ssl); + + /* AssertIntEQ(SSL_SUCCESS, CyaSSL_accept(ssl)); */ + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + + } else { + if (0 < (idx = CyaSSL_read(ssl, input, sizeof(input)-1))) { + input[idx] = 0; + printf("Client message: %s\n", input); + } + + AssertIntEQ(len, CyaSSL_write(ssl, msg, len)); + + CyaSSL_shutdown(ssl); + } + + if (callbacks->on_result) + callbacks->on_result(ssl); + + CyaSSL_free(ssl); + CyaSSL_CTX_free(ctx); + CloseSocket(cfd); + + ((func_args*)args)->return_code = TEST_SUCCESS; + + return 0; +} + +void test_CyaSSL_client_server(callback_functions* client_callbacks, + callback_functions* server_callbacks) +{ + tcp_ready ready; + func_args client_args; + func_args server_args; + THREAD_TYPE serverThread; + + StartTCP(); + + client_args.callbacks = client_callbacks; + server_args.callbacks = server_callbacks; + + /* RUN Server side */ + InitTcpReady(&ready); + server_args.signal = &ready; + client_args.signal = &ready; + start_thread(run_cyassl_server, &server_args, &serverThread); + wait_tcp_ready(&server_args); + + /* RUN Client side */ + run_cyassl_client(&client_args); + join_thread(serverThread); + + FreeTcpReady(&ready); +} + +#endif /* SINGLE_THREADED*/ + +#endif /* NO_FILESYSTEM */ diff --git a/project1/cyassl-3.0.0/tests/hash.c b/project1/cyassl-3.0.0/tests/hash.c new file mode 100644 index 00000000..03bf4bcb --- /dev/null +++ b/project1/cyassl-3.0.0/tests/hash.c @@ -0,0 +1,837 @@ +/* hash.c has unit tests + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +typedef struct testVector { + const char* input; + const char* output; + size_t inLen; + size_t outLen; +} testVector; + +int md4_test(void); +int md5_test(void); +int sha_test(void); +int sha256_test(void); +int sha512_test(void); +int sha384_test(void); +int ripemd_test(void); +int hmac_md5_test(void); +int hmac_sha_test(void); +int hmac_sha256_test(void); +int hmac_sha384_test(void); + +int HashTest(void) +{ + int ret = 0; + + printf(" Begin HASH Tests\n"); + +#ifndef NO_MD4 + if ( (ret = md4_test()) ) { + printf( " MD4 test failed!\n"); + return ret; + } else + printf( " MD4 test passed!\n"); +#endif + +#ifndef NO_MD5 + if ( (ret = md5_test()) ) { + printf( " MD5 test failed!\n"); + return ret; + } else + printf( " MD5 test passed!\n"); +#endif + +#ifndef NO_SHA + if ( (ret = sha_test()) ) { + printf( " SHA test failed!\n"); + return ret; + } else + printf( " SHA test passed!\n"); +#endif + +#ifndef NO_SHA256 + if ( (ret = sha256_test()) ) { + printf( " SHA-256 test failed!\n"); + return ret; + } else + printf( " SHA-256 test passed!\n"); +#endif + +#ifdef CYASSL_SHA512 + if ( (ret = sha512_test()) ) { + printf( " SHA-512 test failed!\n"); + return ret; + } else + printf( " SHA-512 test passed!\n"); +#endif + +#ifdef CYASSL_SHA384 + if ( (ret = sha384_test()) ) { + printf( " SHA-384 test failed!\n"); + return ret; + } else + printf( " SHA-384 test passed!\n"); +#endif + +#ifdef CYASSL_RIPEMD + if ( (ret = ripemd_test()) ) { + printf( " RIPEMD test failed!\n"); + return ret; + } else + printf( " RIPEMD test passed!\n"); +#endif + +#ifndef NO_HMAC + #ifndef NO_MD5 + if ( (ret = hmac_md5_test()) ) { + printf( " HMAC-MD5 test failed!\n"); + return ret; + } else + printf( " HMAC-MD5 test passed!\n"); + #endif + + if ( (ret = hmac_sha_test()) ) + printf( " HMAC-SHA test failed!\n"); + else + printf( " HMAC-SHA test passed!\n"); + + #ifndef NO_SHA256 + if ( (ret = hmac_sha256_test()) ) + printf( " HMAC-SHA256 test failed!\n"); + else + printf( " HMAC-SHA256 test passed!\n"); + #endif + + #ifdef CYASSL_SHA384 + if ( (ret = hmac_sha384_test()) ) + printf( " HMAC-SHA384 test failed!\n"); + else + printf( " HMAC-SHA384 test passed!\n"); + #endif +#endif + + printf(" End HASH Tests\n"); + + return 0; +} + +#ifndef NO_MD4 + +int md4_test(void) +{ + Md4 md4; + byte hash[MD4_DIGEST_SIZE]; + + testVector a, b, c, d, e, f, g; + testVector test_md4[7]; + int times = sizeof(test_md4) / sizeof(testVector), i; + + a.input = ""; + a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" + "\xc0"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "a"; + b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" + "\x24"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "abc"; + c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" + "\x9d"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + d.input = "message digest"; + d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" + "\x4b"; + d.inLen = strlen(d.input); + d.outLen = strlen(d.output); + + e.input = "abcdefghijklmnopqrstuvwxyz"; + e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" + "\xa9"; + e.inLen = strlen(e.input); + e.outLen = strlen(e.output); + + f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" + "\xe4"; + f.inLen = strlen(f.input); + f.outLen = strlen(f.output); + + g.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" + "\x36"; + g.inLen = strlen(g.input); + g.outLen = strlen(g.output); + + test_md4[0] = a; + test_md4[1] = b; + test_md4[2] = c; + test_md4[3] = d; + test_md4[4] = e; + test_md4[5] = f; + test_md4[6] = g; + + InitMd4(&md4); + + for (i = 0; i < times; ++i) { + Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); + Md4Final(&md4, hash); + + if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) + return -205 - i; + } + + return 0; +} + +#endif /* NO_MD4 */ + +#ifndef NO_MD5 + +int md5_test(void) +{ + Md5 md5; + byte hash[MD5_DIGEST_SIZE]; + + testVector a, b, c, d, e; + testVector test_md5[5]; + int times = sizeof(test_md5) / sizeof(testVector), i; + + a.input = "abc"; + a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" + "\x72"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "message digest"; + b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" + "\xd0"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "abcdefghijklmnopqrstuvwxyz"; + c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" + "\x3b"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" + "6789"; + d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" + "\x9f"; + d.inLen = strlen(d.input); + d.outLen = strlen(d.output); + + e.input = "1234567890123456789012345678901234567890123456789012345678" + "9012345678901234567890"; + e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" + "\x7a"; + e.inLen = strlen(e.input); + e.outLen = strlen(e.output); + + test_md5[0] = a; + test_md5[1] = b; + test_md5[2] = c; + test_md5[3] = d; + test_md5[4] = e; + + InitMd5(&md5); + + for (i = 0; i < times; ++i) { + Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); + Md5Final(&md5, hash); + + if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) + return -5 - i; + } + + return 0; +} + +#endif /* NO_MD5 */ + +#ifndef NO_SHA +int sha_test(void) +{ + Sha sha; + byte hash[SHA_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_sha[4]; + int ret = 0; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" + "\x6C\x9C\xD0\xD8\x9D"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" + "\xE5\xE5\x46\x70\xF1"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaa"; + c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" + "\x2A\x25\xEC\x64\x4D"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaa"; + d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" + "\x53\x99\x5E\x26\xA0"; + d.inLen = strlen(d.input); + d.outLen = strlen(d.output); + + test_sha[0] = a; + test_sha[1] = b; + test_sha[2] = c; + test_sha[3] = d; + + ret = InitSha(&sha); + if (ret != 0) + return ret; + + for (i = 0; i < times; ++i) { + ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); + ShaFinal(&sha, hash); + + if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* NO_SHA */ + +#ifndef NO_SHA256 +int sha256_test(void) +{ + Sha256 sha; + byte hash[SHA256_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int ret; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" + "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" + "\x15\xAD"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha256(&sha); + if (ret != 0) + return ret; + + for (i = 0; i < times; ++i) { + ret = Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return ret; + + ret = Sha256Final(&sha, hash); + if (ret != 0) + return ret; + + if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + +#ifdef CYASSL_SHA512 +int sha512_test(void) +{ + Sha512 sha; + byte hash[SHA512_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + int ret; + + a.input = "abc"; + a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" + "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" + "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" + "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" + "\xa5\x4c\xa4\x9f"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha512(&sha); + if (ret != 0) + return ret; + + for (i = 0; i < times; ++i) { + ret = Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return ret; + + ret = Sha512Final(&sha, hash); + if (ret != 0) + return ret; + + if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + +#ifdef CYASSL_SHA384 +int sha384_test() +{ + Sha384 sha; + byte hash[SHA384_DIGEST_SIZE]; + + testVector a, b; + testVector test_sha[2]; + int times = sizeof(test_sha) / sizeof(struct testVector), i; + int ret; + + a.input = "abc"; + a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" + "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" + "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" + "\xc8\x25\xa7"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; + b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + test_sha[0] = a; + test_sha[1] = b; + + ret = InitSha384(&sha); + if (ret != 0) + return ret; + + for (i = 0; i < times; ++i) { + ret = Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); + if (ret != 0) + return ret; + + ret = Sha384Final(&sha, hash); + if (ret != 0) + return ret; + + if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif + +#ifdef CYASSL_RIPEMD +int ripemd_test(void) +{ + RipeMd ripemd; + byte hash[RIPEMD_DIGEST_SIZE]; + + testVector a, b, c, d; + testVector test_ripemd[4]; + int times = sizeof(test_ripemd) / sizeof(struct testVector), i; + + a.input = "abc"; + a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" + "\xb0\x87\xf1\x5a\x0b\xfc"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "message digest"; + b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" + "\x5f\xfa\x21\x59\x5f\x36"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" + "\xf4\x9a\xda\x62\xeb\x2b"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + d.input = "12345678901234567890123456789012345678901234567890123456" + "789012345678901234567890"; + d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" + "\x82\xbf\x63\x32\x6b\xfb"; + d.inLen = strlen(d.input); + d.outLen = strlen(d.output); + + test_ripemd[0] = a; + test_ripemd[1] = b; + test_ripemd[2] = c; + test_ripemd[3] = d; + + InitRipeMd(&ripemd); + + for (i = 0; i < times; ++i) { + RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, + (word32)test_ripemd[i].inLen); + RipeMdFinal(&ripemd, hash); + + if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) + return -10 - i; + } + + return 0; +} +#endif /* CYASSL_RIPEMD */ + +#if !defined(NO_HMAC) && !defined(NO_MD5) +int hmac_md5_test(void) +{ + Hmac hmac; + byte hash[MD5_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" + "\x9d"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "what do ya want for nothing?"; + b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" + "\x38"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" + "\xf6"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4014; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4015; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4016; + + if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + +#ifndef NO_HMAC +int hmac_sha_test(void) +{ + Hmac hmac; + byte hash[SHA_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" + "\x8e\xf1\x46\xbe\x00"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "what do ya want for nothing?"; + b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" + "\x9c\x25\x9a\x7c\x79"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" + "\x4f\x63\xf1\x75\xd3"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4017; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4018; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4019; + + if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + +#if !defined(NO_HMAC) && !defined(NO_SHA256) +int hmac_sha256_test(void) +{ + Hmac hmac; + byte hash[SHA256_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" + "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" + "\xcf\xf7"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "what do ya want for nothing?"; + b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" + "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" + "\x38\x43"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" + "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" + "\x65\xfe"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac,SHA256, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4020; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4021; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4022; + + if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + + +#if !defined(NO_HMAC) && defined(CYASSL_SHA384) +int hmac_sha384_test(void) +{ + Hmac hmac; + byte hash[SHA384_DIGEST_SIZE]; + + const char* keys[]= + { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b", + "Jefe", + "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" + "\xAA\xAA\xAA" + }; + + testVector a, b, c; + testVector test_hmac[3]; + + int ret; + int times = sizeof(test_hmac) / sizeof(testVector), i; + + a.input = "Hi There"; + a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" + "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" + "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" + "\xfa\x9c\xb6"; + a.inLen = strlen(a.input); + a.outLen = strlen(a.output); + + b.input = "what do ya want for nothing?"; + b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" + "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" + "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" + "\xb2\x16\x49"; + b.inLen = strlen(b.input); + b.outLen = strlen(b.output); + + c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" + "\xDD\xDD\xDD\xDD\xDD\xDD"; + c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" + "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" + "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" + "\xa3\x4f\x27"; + c.inLen = strlen(c.input); + c.outLen = strlen(c.output); + + test_hmac[0] = a; + test_hmac[1] = b; + test_hmac[2] = c; + + for (i = 0; i < times; ++i) { + ret = HmacSetKey(&hmac,SHA384, (byte*)keys[i], (word32)strlen(keys[i])); + if (ret != 0) + return -4023; + ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, + (word32)test_hmac[i].inLen); + if (ret != 0) + return -4024; + ret = HmacFinal(&hmac, hash); + if (ret != 0) + return -4025; + + if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) + return -20 - i; + } + + return 0; +} +#endif + diff --git a/project1/cyassl-3.0.0/tests/include.am b/project1/cyassl-3.0.0/tests/include.am new file mode 100644 index 00000000..8fcc542c --- /dev/null +++ b/project1/cyassl-3.0.0/tests/include.am @@ -0,0 +1,23 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + +if BUILD_EXAMPLES +check_PROGRAMS += tests/unit.test +noinst_PROGRAMS += tests/unit.test +tests_unit_test_SOURCES = \ + tests/unit.c \ + tests/api.c \ + tests/suites.c \ + tests/hash.c \ + examples/client/client.c \ + examples/server/server.c +tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +tests_unit_test_LDADD = src/libcyassl.la +tests_unit_test_DEPENDENCIES = src/libcyassl.la +endif +EXTRA_DIST += tests/unit.h +EXTRA_DIST += tests/test.conf \ + tests/test-dtls.conf +DISTCLEANFILES+= tests/.libs/unit.test diff --git a/project1/cyassl-3.0.0/tests/suites.c b/project1/cyassl-3.0.0/tests/suites.c new file mode 100644 index 00000000..aeb4fd24 --- /dev/null +++ b/project1/cyassl-3.0.0/tests/suites.c @@ -0,0 +1,451 @@ +/* suites.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include +#include +#include +#include + + +#define MAX_ARGS 40 +#define MAX_COMMAND_SZ 240 +#define MAX_SUITE_SZ 80 +#define NOT_BUILT_IN -123 +#ifdef NO_OLD_TLS + #define VERSION_TOO_OLD -124 +#endif + +#include "examples/client/client.h" +#include "examples/server/server.h" + + +static CYASSL_CTX* cipherSuiteCtx = NULL; +static char nonblockFlag[] = "-N"; +static char noVerifyFlag[] = "-d"; +static char portFlag[] = "-p"; +static char flagSep[] = " "; +static char svrPort[] = "0"; + + +#ifdef NO_OLD_TLS +/* if the protocol version is less than tls 1.2 return 1, else 0 */ +static int IsOldTlsVersion(const char* line) +{ + const char* find = "-v "; + char* begin = strstr(line, find); + + if (begin) { + int version = -1; + + begin += 3; + + version = atoi(begin); + + if (version < 3) + return 1; + } + + return 0; +} +#endif /* NO_OLD_TLS */ + + +/* if the cipher suite on line is valid store in suite and return 1, else 0 */ +static int IsValidCipherSuite(const char* line, char* suite) +{ + int found = 0; + int valid = 0; + + const char* find = "-l "; + const char* begin = strstr(line, find); + const char* end; + + suite[0] = '\0'; + + if (begin) { + begin += 3; + + end = strstr(begin, " "); + + if (end) { + long len = end - begin; + if (len > MAX_SUITE_SZ) { + printf("suite too long!\n"); + return 0; + } + memcpy(suite, begin, len); + suite[len] = '\0'; + } + else + strncpy(suite, begin, MAX_SUITE_SZ); + + suite[MAX_SUITE_SZ] = '\0'; + found = 1; + } + + if (found) { + if (CyaSSL_CTX_set_cipher_list(cipherSuiteCtx, suite) == SSL_SUCCESS) + valid = 1; + } + + return valid; +} + + +static int execute_test_case(int svr_argc, char** svr_argv, + int cli_argc, char** cli_argv, + int addNoVerify, int addNonBlocking) +{ + func_args cliArgs = {cli_argc, cli_argv, 0, NULL, NULL}; + func_args svrArgs = {svr_argc, svr_argv, 0, NULL, NULL}; + + tcp_ready ready; + THREAD_TYPE serverThread; + char commandLine[MAX_COMMAND_SZ]; + char cipherSuite[MAX_SUITE_SZ+1]; + int i; + size_t added = 0; + static int tests = 1; + + commandLine[0] = '\0'; + for (i = 0; i < svr_argc; i++) { + added += strlen(svr_argv[i]) + 2; + if (added >= MAX_COMMAND_SZ) { + printf("server command line too long\n"); + break; + } + strcat(commandLine, svr_argv[i]); + strcat(commandLine, flagSep); + } + + if (IsValidCipherSuite(commandLine, cipherSuite) == 0) { + #ifdef DEBUG_SUITE_TESTS + printf("cipher suite %s not supported in build\n", cipherSuite); + #endif + return NOT_BUILT_IN; + } + +#ifdef NO_OLD_TLS + if (IsOldTlsVersion(commandLine) == 1) { + #ifdef DEBUG_SUITE_TESTS + printf("protocol version on line %s is too old\n", commandLine); + #endif + return VERSION_TOO_OLD; + } +#endif + + if (addNoVerify) { + printf("repeating test with client cert request off\n"); + added += 4; /* -d plus space plus terminator */ + if (added >= MAX_COMMAND_SZ || svr_argc >= MAX_ARGS) + printf("server command line too long\n"); + else { + svr_argv[svr_argc++] = noVerifyFlag; + svrArgs.argc = svr_argc; + strcat(commandLine, noVerifyFlag); + strcat(commandLine, flagSep); + } + } + if (addNonBlocking) { + printf("repeating test with non blocking on\n"); + added += 4; /* -N plus terminator */ + if (added >= MAX_COMMAND_SZ || svr_argc >= MAX_ARGS) + printf("server command line too long\n"); + else { + svr_argv[svr_argc++] = nonblockFlag; + svrArgs.argc = svr_argc; + strcat(commandLine, nonblockFlag); + strcat(commandLine, flagSep); + } + } + #ifndef USE_WINDOWS_API + /* add port 0 */ + if (svr_argc + 2 > MAX_ARGS) + printf("cannot add the magic port number flag to server\n"); + else + { + svr_argv[svr_argc++] = portFlag; + svr_argv[svr_argc++] = svrPort; + svrArgs.argc = svr_argc; + } + #endif + printf("trying server command line[%d]: %s\n", tests, commandLine); + + commandLine[0] = '\0'; + added = 0; + for (i = 0; i < cli_argc; i++) { + added += strlen(cli_argv[i]) + 2; + if (added >= MAX_COMMAND_SZ) { + printf("client command line too long\n"); + break; + } + strcat(commandLine, cli_argv[i]); + strcat(commandLine, flagSep); + } + if (addNonBlocking) { + added += 4; /* -N plus space plus terminator */ + if (added >= MAX_COMMAND_SZ) + printf("client command line too long\n"); + else { + cli_argv[cli_argc++] = nonblockFlag; + strcat(commandLine, nonblockFlag); + strcat(commandLine, flagSep); + cliArgs.argc = cli_argc; + } + } + printf("trying client command line[%d]: %s\n", tests++, commandLine); + + InitTcpReady(&ready); + + /* start server */ + svrArgs.signal = &ready; + start_thread(server_test, &svrArgs, &serverThread); + wait_tcp_ready(&svrArgs); + #ifndef USE_WINDOWS_API + if (ready.port != 0) + { + if (cli_argc + 2 > MAX_ARGS) + printf("cannot add the magic port number flag to client\n"); + else { + char portNumber[8]; + snprintf(portNumber, sizeof(portNumber), "%d", ready.port); + cli_argv[cli_argc++] = portFlag; + cli_argv[cli_argc++] = portNumber; + cliArgs.argc = cli_argc; + } + } + #endif + /* start client */ + client_test(&cliArgs); + + /* verify results */ + if (cliArgs.return_code != 0) { + printf("client_test failed\n"); + exit(EXIT_FAILURE); + } + + join_thread(serverThread); + if (svrArgs.return_code != 0) { + printf("server_test failed\n"); + exit(EXIT_FAILURE); + } + + FreeTcpReady(&ready); + + return 0; +} + +static void test_harness(void* vargs) +{ + func_args* args = (func_args*)vargs; + char* script; + long sz, len; + int cliMode = 0; /* server or client command flag, server first */ + int ret; + FILE* file; + char* svrArgs[MAX_ARGS]; + int svrArgsSz; + char* cliArgs[MAX_ARGS]; + int cliArgsSz; + char* cursor; + char* comment; + const char* fname = "tests/test.conf"; + + if (args->argc == 1) { + printf("notice: using default file %s\n", fname); + } + else if(args->argc != 2) { + printf("usage: harness [FILE]\n"); + args->return_code = 1; + return; + } + else { + fname = args->argv[1]; + } + + file = fopen(fname, "r"); + if (file == NULL) { + fprintf(stderr, "unable to open %s\n", fname); + args->return_code = 1; + return; + } + fseek(file, 0, SEEK_END); + sz = ftell(file); + rewind(file); + if (sz <= 0) { + fprintf(stderr, "%s is empty\n", fname); + fclose(file); + args->return_code = 1; + return; + } + + script = (char*)malloc(sz+1); + if (script == 0) { + fprintf(stderr, "unable to allocte script buffer\n"); + fclose(file); + args->return_code = 1; + return; + } + + len = fread(script, 1, sz, file); + if (len != sz) { + fprintf(stderr, "read error\n"); + fclose(file); + free(script); + args->return_code = 1; + return; + } + + fclose(file); + script[sz] = 0; + + cursor = script; + svrArgsSz = 1; + svrArgs[0] = args->argv[0]; + cliArgsSz = 1; + cliArgs[0] = args->argv[0]; + + while (*cursor != 0) { + int do_it = 0; + + switch (*cursor) { + case '\n': + /* A blank line triggers test case execution or switches + to client mode if we don't have the client command yet */ + if (cliMode == 0) + cliMode = 1; /* switch to client mode processing */ + else + do_it = 1; /* Do It, we have server and client */ + cursor++; + break; + case '#': + /* Ignore lines that start with a #. */ + comment = strsep(&cursor, "\n"); +#ifdef DEBUG_SUITE_TESTS + printf("%s\n", comment); +#else + (void)comment; +#endif + break; + case '-': + /* Parameters start with a -. They end in either a newline + * or a space. Capture until either, save in Args list. */ + if (cliMode) + cliArgs[cliArgsSz++] = strsep(&cursor, " \n"); + else + svrArgs[svrArgsSz++] = strsep(&cursor, " \n"); + break; + default: + /* Anything from cursor until end of line that isn't the above + * is data for a paramter. Just up until the next newline in + * the Args list. */ + if (cliMode) + cliArgs[cliArgsSz++] = strsep(&cursor, "\n"); + else + svrArgs[svrArgsSz++] = strsep(&cursor, "\n"); + if (*cursor == 0) /* eof */ + do_it = 1; + } + + if (svrArgsSz == MAX_ARGS || cliArgsSz == MAX_ARGS) { + fprintf(stderr, "too many arguments, forcing test run\n"); + do_it = 1; + } + + if (do_it) { + ret = execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs,0,0); + /* don't repeat if not supported in build */ + if (ret == 0) { + execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 0, 1); + execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 1, 0); + execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 1, 1); + } + svrArgsSz = 1; + cliArgsSz = 1; + cliMode = 0; + } + } + + free(script); + args->return_code = 0; +} + + +int SuiteTest(void) +{ + func_args args; + char argv0[2][80]; + char* myArgv[2]; + + printf(" Begin Cipher Suite Tests\n"); + + /* setup */ + myArgv[0] = argv0[0]; + myArgv[1] = argv0[1]; + args.argv = myArgv; + strcpy(argv0[0], "SuiteTest"); + + (void)test_harness; + + cipherSuiteCtx = CyaSSL_CTX_new(CyaTLSv1_2_client_method()); + if (cipherSuiteCtx == NULL) { + printf("can't get cipher suite ctx\n"); + exit(EXIT_FAILURE); + } + + /* default case */ + args.argc = 1; + printf("starting default cipher suite tests\n"); + test_harness(&args); + if (args.return_code != 0) { + printf("error from script %d\n", args.return_code); + exit(EXIT_FAILURE); + } + + /* any extra cases will need another argument */ + args.argc = 2; + +#ifdef CYASSL_DTLS + /* add dtls extra suites */ + strcpy(argv0[1], "tests/test-dtls.conf"); + printf("starting dtls extra cipher suite tests\n"); + test_harness(&args); + if (args.return_code != 0) { + printf("error from script %d\n", args.return_code); + exit(EXIT_FAILURE); + } +#endif + + printf(" End Cipher Suite Tests\n"); + + CyaSSL_CTX_free(cipherSuiteCtx); + + return args.return_code; +} + + diff --git a/project1/cyassl-3.0.0/tests/test-dtls.conf b/project1/cyassl-3.0.0/tests/test-dtls.conf new file mode 100644 index 00000000..59891690 --- /dev/null +++ b/project1/cyassl-3.0.0/tests/test-dtls.conf @@ -0,0 +1,782 @@ +# server DTLSv1 RC4-SHA +-u +-v 2 +-l RC4-SHA + +# client DTLSv1 RC4-SHA +-u +-v 2 +-l RC4-SHA + +# server DTLSv1.2 RC4-SHA +-u +-v 3 +-l RC4-SHA + +# client DTLSv1.2 RC4-SHA +-u +-v 3 +-l RC4-SHA + +# server DTLSv1 DES-CBC3-SHA +-u +-v 2 +-l DES-CBC3-SHA + +# client DTLSv1 DES-CBC3-SHA +-u +-v 2 +-l DES-CBC3-SHA + +# server DTLSv1.2 DES-CBC3-SHA +-u +-v 3 +-l DES-CBC3-SHA + +# client DTLSv1.2 DES-CBC3-SHA +-u +-v 3 +-l DES-CBC3-SHA + +# server DTLSv1 AES128-SHA +-u +-v 2 +-l AES128-SHA + +# client DTLSv1 AES128-SHA +-u +-v 2 +-l AES128-SHA + +# server DTLSv1.2 AES128-SHA +-u +-v 3 +-l AES128-SHA + +# client DTLSv1.2 AES128-SHA +-u +-v 3 +-l AES128-SHA + +# server DTLSv1 AES256-SHA +-u +-v 2 +-l AES256-SHA + +# client DTLSv1 AES256-SHA +-u +-v 2 +-l AES256-SHA + +# server DTLSv1.2 AES256-SHA +-u +-v 3 +-l AES256-SHA + +# client DTLSv1.2 AES256-SHA +-u +-v 3 +-l AES256-SHA + +# server DTLSv1 AES128-SHA256 +-u +-v 2 +-l AES128-SHA256 + +# client DTLSv1 AES128-SHA256 +-u +-v 2 +-l AES128-SHA256 + +# server DTLSv1.2 AES128-SHA256 +-u +-v 3 +-l AES128-SHA256 + +# client DTLSv1.2 AES128-SHA256 +-u +-v 3 +-l AES128-SHA256 + +# server DTLSv1 AES256-SHA256 +-u +-v 2 +-l AES256-SHA256 + +# client DTLSv1 AES256-SHA256 +-u +-v 2 +-l AES256-SHA256 + +# server DTLSv1.2 AES256-SHA256 +-u +-v 3 +-l AES256-SHA256 + +# client DTLSv1.2 AES256-SHA256 +-u +-v 3 +-l AES256-SHA256 + +# server DTLSv1 ECDHE-RSA-RC4 +-u +-v 2 +-l ECDHE-RSA-RC4-SHA + +# client DTLSv1 ECDHE-RSA-RC4 +-u +-v 2 +-l ECDHE-RSA-RC4-SHA + +# server DTLSv1.1 ECDHE-RSA-DES3 +-u +-v 2 +-l ECDHE-RSA-DES-CBC3-SHA + +# client DTLSv1.1 ECDHE-RSA-DES3 +-u +-v 2 +-l ECDHE-RSA-DES-CBC3-SHA + +# server DTLSv1.1 ECDHE-RSA-AES128 +-u +-v 2 +-l ECDHE-RSA-AES128-SHA + +# client DTLSv1.1 ECDHE-RSA-AES128 +-u +-v 2 +-l ECDHE-RSA-AES128-SHA + +# server DTLSv1.1 ECDHE-RSA-AES256 +-u +-v 2 +-l ECDHE-RSA-AES256-SHA + +# client DTLSv1.1 ECDHE-RSA-AES256 +-u +-v 2 +-l ECDHE-RSA-AES256-SHA + +# server DTLSv1.2 ECDHE-RSA-RC4 +-u +-v 3 +-l ECDHE-RSA-RC4-SHA + +# client DTLSv1.2 ECDHE-RSA-RC4 +-u +-v 3 +-l ECDHE-RSA-RC4-SHA + +# server DTLSv1.2 ECDHE-RSA-DES3 +-u +-v 3 +-l ECDHE-RSA-DES-CBC3-SHA + +# client DTLSv1.2 ECDHE-RSA-DES3 +-u +-v 3 +-l ECDHE-RSA-DES-CBC3-SHA + +# server DTLSv1.2 ECDHE-RSA-AES128 +-u +-v 3 +-l ECDHE-RSA-AES128-SHA + +# client DTLSv1.2 ECDHE-RSA-AES128 +-u +-v 3 +-l ECDHE-RSA-AES128-SHA + +# server DTLSv1.2 ECDHE-RSA-AES128-SHA256 +-u +-v 3 +-l ECDHE-RSA-AES128-SHA256 + +# client DTLSv1.2 ECDHE-RSA-AES128-SHA256 +-u +-v 3 +-l ECDHE-RSA-AES128-SHA256 + +# server DTLSv1.2 ECDHE-RSA-AES256 +-u +-v 3 +-l ECDHE-RSA-AES256-SHA + +# client DTLSv1.2 ECDHE-RSA-AES256 +-u +-v 3 +-l ECDHE-RSA-AES256-SHA + +# server DTLSv1.1 ECDHE-EDCSA-RC4 +-u +-v 2 +-l ECDHE-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDHE-ECDSA-RC4 +-u +-v 2 +-l ECDHE-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDHE-ECDSA-DES3 +-u +-v 2 +-l ECDHE-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDHE-ECDSA-DES3 +-u +-v 2 +-l ECDHE-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDHE-ECDSA-AES128 +-u +-v 2 +-l ECDHE-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDHE-ECDSA-AES128 +-u +-v 2 +-l ECDHE-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDHE-ECDSA-AES256 +-u +-v 2 +-l ECDHE-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDHE-ECDSA-AES256 +-u +-v 2 +-l ECDHE-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-RC4 +-u +-v 3 +-l ECDHE-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-RC4 +-u +-v 3 +-l ECDHE-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-DES3 +-u +-v 3 +-l ECDHE-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-DES3 +-u +-v 3 +-l ECDHE-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-AES128 +-u +-v 3 +-l ECDHE-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES128 +-u +-v 3 +-l ECDHE-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-AES128-SHA256 +-u +-v 3 +-l ECDHE-ECDSA-AES128-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES128-SHA256 +-u +-v 3 +-l ECDHE-ECDSA-AES128-SHA256 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-AES256 +-u +-v 3 +-l ECDHE-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES256 +-u +-v 3 +-l ECDHE-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDH-RSA-RC4 +-u +-v 2 +-l ECDH-RSA-RC4-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-RSA-RC4 +-u +-v 2 +-l ECDH-RSA-RC4-SHA + +# server DTLSv1.1 ECDH-RSA-DES3 +-u +-v 2 +-l ECDH-RSA-DES-CBC3-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-RSA-DES3 +-u +-v 2 +-l ECDH-RSA-DES-CBC3-SHA + +# server DTLSv1.1 ECDH-RSA-AES128 +-u +-v 2 +-l ECDH-RSA-AES128-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-RSA-AES128 +-u +-v 2 +-l ECDH-RSA-AES128-SHA + +# server DTLSv1.1 ECDH-RSA-AES256 +-u +-v 2 +-l ECDH-RSA-AES256-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-RSA-AES256 +-u +-v 2 +-l ECDH-RSA-AES256-SHA + +# server DTLSv1.2 ECDH-RSA-RC4 +-u +-v 3 +-l ECDH-RSA-RC4-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-RC4 +-u +-v 3 +-l ECDH-RSA-RC4-SHA + +# server DTLSv1.2 ECDH-RSA-DES3 +-u +-v 3 +-l ECDH-RSA-DES-CBC3-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-DES3 +-u +-v 3 +-l ECDH-RSA-DES-CBC3-SHA + +# server DTLSv1.2 ECDH-RSA-AES128 +-u +-v 3 +-l ECDH-RSA-AES128-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES128 +-u +-v 3 +-l ECDH-RSA-AES128-SHA + +# server DTLSv1.2 ECDH-RSA-AES128-SHA256 +-u +-v 3 +-l ECDH-RSA-AES128-SHA256 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES128-SHA256 +-u +-v 3 +-l ECDH-RSA-AES128-SHA256 + +# server DTLSv1.2 ECDH-RSA-AES256 +-u +-v 3 +-l ECDH-RSA-AES256-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES256 +-u +-v 3 +-l ECDH-RSA-AES256-SHA + +# server DTLSv1.1 ECDH-EDCSA-RC4 +-u +-v 2 +-l ECDH-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-ECDSA-RC4 +-u +-v 2 +-l ECDH-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDH-ECDSA-DES3 +-u +-v 2 +-l ECDH-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-ECDSA-DES3 +-u +-v 2 +-l ECDH-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDH-ECDSA-AES128 +-u +-v 2 +-l ECDH-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-ECDSA-AES128 +-u +-v 2 +-l ECDH-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.1 ECDH-ECDSA-AES256 +-u +-v 2 +-l ECDH-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.1 ECDH-ECDSA-AES256 +-u +-v 2 +-l ECDH-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-RC4 +-u +-v 3 +-l ECDH-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-RC4 +-u +-v 3 +-l ECDH-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-DES3 +-u +-v 3 +-l ECDH-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-DES3 +-u +-v 3 +-l ECDH-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-AES128 +-u +-v 3 +-l ECDH-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES128 +-u +-v 3 +-l ECDH-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-AES128-SHA256 +-u +-v 3 +-l ECDH-ECDSA-AES128-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES128-SHA256 +-u +-v 3 +-l ECDH-ECDSA-AES128-SHA256 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-AES256 +-u +-v 3 +-l ECDH-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES256 +-u +-v 3 +-l ECDH-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-RSA-AES256-SHA384 +-u +-v 3 +-l ECDHE-RSA-AES256-SHA384 + +# client DTLSv1.2 ECDHE-RSA-AES256-SHA384 +-u +-v 3 +-l ECDHE-RSA-AES256-SHA384 + +# server DTLSv1.2 ECDHE-ECDSA-AES256-SHA384 +-u +-v 3 +-l ECDHE-ECDSA-AES256-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES256-SHA384 +-u +-v 3 +-l ECDHE-ECDSA-AES256-SHA384 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-RSA-AES256-SHA384 +-u +-v 3 +-l ECDH-RSA-AES256-SHA384 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES256-SHA384 +-u +-v 3 +-l ECDH-RSA-AES256-SHA384 + +# server DTLSv1.2 ECDH-ECDSA-AES256-SHA384 +-u +-v 3 +-l ECDH-ECDSA-AES256-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES256-SHA384 +-u +-v 3 +-l ECDH-ECDSA-AES256-SHA384 +-A ./certs/server-ecc.pem + +# server DTLSv1 PSK-AES128 +-s +-u +-v 2 +-l PSK-AES128-CBC-SHA + +# client DTLSv1 PSK-AES128 +-s +-u +-v 2 +-l PSK-AES128-CBC-SHA + +# server DTLSv1 PSK-AES256 +-s +-u +-v 2 +-l PSK-AES256-CBC-SHA + +# client DTLSv1 PSK-AES256 +-s +-u +-v 2 +-l PSK-AES256-CBC-SHA + +# server DTLSv1.2 PSK-AES128 +-s +-u +-v 3 +-l PSK-AES128-CBC-SHA + +# client DTLSv1.2 PSK-AES128 +-s +-u +-v 3 +-l PSK-AES128-CBC-SHA + +# server DTLSv1.2 PSK-AES256 +-s +-u +-v 3 +-l PSK-AES256-CBC-SHA + +# client DTLSv1.2 PSK-AES256 +-s +-u +-v 3 +-l PSK-AES256-CBC-SHA + +# server DTLSv1.2 PSK-AES128-SHA256 +-s +-u +-v 3 +-l PSK-AES128-CBC-SHA256 + +# client DTLSv1.2 PSK-AES128-SHA256 +-s +-u +-v 3 +-l PSK-AES128-CBC-SHA256 + +# server DTLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDHE-ECDSA-AES128-GCM-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDHE-ECDSA-AES128-GCM-SHA256 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDHE-ECDSA-AES256-GCM-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDHE-ECDSA-AES256-GCM-SHA384 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDH-ECDSA-AES128-GCM-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDH-ECDSA-AES128-GCM-SHA256 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDH-ECDSA-AES256-GCM-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDH-ECDSA-AES256-GCM-SHA384 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDHE-RSA-AES128-GCM-SHA256 + +# client DTLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDHE-RSA-AES128-GCM-SHA256 + +# server DTLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDHE-RSA-AES256-GCM-SHA384 + +# client DTLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDHE-RSA-AES256-GCM-SHA384 + +# server DTLSv1.2 ECDH-RSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDH-RSA-AES128-GCM-SHA256 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES128-GCM-SHA256 +-u +-v 3 +-l ECDH-RSA-AES128-GCM-SHA256 + +# server DTLSv1.2 ECDH-RSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDH-RSA-AES256-GCM-SHA384 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDH-RSA-AES256-GCM-SHA384 +-u +-v 3 +-l ECDH-RSA-AES256-GCM-SHA384 + +# server DTLSv1.2 ECDHE-ECDSA-AES128-CCM-8 +-u +-v 3 +-l ECDHE-ECDSA-AES128-CCM-8 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES128-CCM-8 +-u +-v 3 +-l ECDHE-ECDSA-AES128-CCM-8 +-A ./certs/server-ecc.pem + +# server DTLSv1.2 ECDHE-ECDSA-AES256-CCM-8 +-u +-v 3 +-l ECDHE-ECDSA-AES256-CCM-8 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client DTLSv1.2 ECDHE-ECDSA-AES256-CCM-8 +-u +-v 3 +-l ECDHE-ECDSA-AES256-CCM-8 +-A ./certs/server-ecc.pem + diff --git a/project1/cyassl-3.0.0/tests/test.conf b/project1/cyassl-3.0.0/tests/test.conf new file mode 100644 index 00000000..6a646e55 --- /dev/null +++ b/project1/cyassl-3.0.0/tests/test.conf @@ -0,0 +1,1664 @@ +# server SSLv3 RC4-SHA +-v 0 +-l RC4-SHA + +# client SSLv3 RC4-SHA +-v 0 +-l RC4-SHA + +# server SSLv3 RC4-MD5 +-v 0 +-l RC4-MD5 + +# client SSLv3 RC4-MD5 +-v 0 +-l RC4-MD5 + +# server SSLv3 DES-CBC3-SHA +-v 0 +-l DES-CBC3-SHA + +# client SSLv3 DES-CBC3-SHA +-v 0 +-l DES-CBC3-SHA + +# server TLSv1 RC4-SHA +-v 1 +-l RC4-SHA + +# client TLSv1 RC4-SHA +-v 1 +-l RC4-SHA + +# server TLSv1 RC4-MD5 +-v 1 +-l RC4-MD5 + +# client TLSv1 RC4-MD5 +-v 1 +-l RC4-MD5 + +# server TLSv1 DES-CBC3-SHA +-v 1 +-l DES-CBC3-SHA + +# client TLSv1 DES-CBC3-SHA +-v 1 +-l DES-CBC3-SHA + +# server TLSv1 AES128-SHA +-v 1 +-l AES128-SHA + +# client TLSv1 AES128-SHA +-v 1 +-l AES128-SHA + +# server TLSv1 AES256-SHA +-v 1 +-l AES256-SHA + +# client TLSv1 AES256-SHA +-v 1 +-l AES256-SHA + +# server TLSv1 AES128-SHA256 +-v 1 +-l AES128-SHA256 + +# client TLSv1 AES128-SHA256 +-v 1 +-l AES128-SHA256 + +# server TLSv1 AES256-SHA256 +-v 1 +-l AES256-SHA256 + +# client TLSv1 AES256-SHA256 +-v 1 +-l AES256-SHA256 + +# server TLSv1.1 RC4-SHA +-v 2 +-l RC4-SHA + +# client TLSv1.1 RC4-SHA +-v 2 +-l RC4-SHA + +# server TLSv1.1 RC4-MD5 +-v 2 +-l RC4-MD5 + +# client TLSv1.1 RC4-MD5 +-v 2 +-l RC4-MD5 + +# server TLSv1.1 DES-CBC3-SHA +-v 2 +-l DES-CBC3-SHA + +# client TLSv1.1 DES-CBC3-SHA +-v 2 +-l DES-CBC3-SHA + +# server TLSv1.1 AES128-SHA +-v 2 +-l AES128-SHA + +# client TLSv1.1 AES128-SHA +-v 2 +-l AES128-SHA + +# server TLSv1.1 AES256-SHA +-v 2 +-l AES256-SHA + +# client TLSv1.1 AES256-SHA +-v 2 +-l AES256-SHA + +# server TLSv1.1 AES128-SHA256 +-v 2 +-l AES128-SHA256 + +# client TLSv1.1 AES128-SHA256 +-v 2 +-l AES128-SHA256 + +# server TLSv1.1 AES256-SHA256 +-v 2 +-l AES256-SHA256 + +# client TLSv1.1 AES256-SHA256 +-v 2 +-l AES256-SHA256 + +# server TLSv1.2 RC4-SHA +-v 3 +-l RC4-SHA + +# client TLSv1.2 RC4-SHA +-v 3 +-l RC4-SHA + +# server TLSv1.2 RC4-MD5 +-v 3 +-l RC4-MD5 + +# client TLSv1.2 RC4-MD5 +-v 3 +-l RC4-MD5 + +# server TLSv1.2 DES-CBC3-SHA +-v 3 +-l DES-CBC3-SHA + +# client TLSv1.2 DES-CBC3-SHA +-v 3 +-l DES-CBC3-SHA + +# server TLSv1.2 AES128-SHA +-v 3 +-l AES128-SHA + +# client TLSv1.2 AES128-SHA +-v 3 +-l AES128-SHA + +# server TLSv1.2 AES256-SHA +-v 3 +-l AES256-SHA + +# client TLSv1.2 AES256-SHA +-v 3 +-l AES256-SHA + +# server TLSv1.2 AES128-SHA256 +-v 3 +-l AES128-SHA256 + +# client TLSv1.2 AES128-SHA256 +-v 3 +-l AES128-SHA256 + +# server TLSv1.2 AES256-SHA256 +-v 3 +-l AES256-SHA256 + +# client TLSv1.2 AES256-SHA256 +-v 3 +-l AES256-SHA256 + +# server TLSv1 ECDHE-RSA-RC4 +-v 1 +-l ECDHE-RSA-RC4-SHA + +# client TLSv1 ECDHE-RSA-RC4 +-v 1 +-l ECDHE-RSA-RC4-SHA + +# server TLSv1 ECDHE-RSA-DES3 +-v 1 +-l ECDHE-RSA-DES-CBC3-SHA + +# client TLSv1 ECDHE-RSA-DES3 +-v 1 +-l ECDHE-RSA-DES-CBC3-SHA + +# server TLSv1 ECDHE-RSA-AES128 +-v 1 +-l ECDHE-RSA-AES128-SHA + +# client TLSv1 ECDHE-RSA-AES128 +-v 1 +-l ECDHE-RSA-AES128-SHA + +# server TLSv1 ECDHE-RSA-AES256 +-v 1 +-l ECDHE-RSA-AES256-SHA + +# client TLSv1 ECDHE-RSA-AES256 +-v 1 +-l ECDHE-RSA-AES256-SHA + +# server TLSv1.1 ECDHE-RSA-RC4 +-v 2 +-l ECDHE-RSA-RC4-SHA + +# client TLSv1.1 ECDHE-RSA-RC4 +-v 2 +-l ECDHE-RSA-RC4-SHA + +# server TLSv1.1 ECDHE-RSA-DES3 +-v 2 +-l ECDHE-RSA-DES-CBC3-SHA + +# client TLSv1.1 ECDHE-RSA-DES3 +-v 2 +-l ECDHE-RSA-DES-CBC3-SHA + +# server TLSv1.1 ECDHE-RSA-AES128 +-v 2 +-l ECDHE-RSA-AES128-SHA + +# client TLSv1.1 ECDHE-RSA-AES128 +-v 2 +-l ECDHE-RSA-AES128-SHA + +# server TLSv1.1 ECDHE-RSA-AES256 +-v 2 +-l ECDHE-RSA-AES256-SHA + +# client TLSv1.1 ECDHE-RSA-AES256 +-v 2 +-l ECDHE-RSA-AES256-SHA + +# server TLSv1.2 ECDHE-RSA-RC4 +-v 3 +-l ECDHE-RSA-RC4-SHA + +# client TLSv1.2 ECDHE-RSA-RC4 +-v 3 +-l ECDHE-RSA-RC4-SHA + +# server TLSv1.2 ECDHE-RSA-DES3 +-v 3 +-l ECDHE-RSA-DES-CBC3-SHA + +# client TLSv1.2 ECDHE-RSA-DES3 +-v 3 +-l ECDHE-RSA-DES-CBC3-SHA + +# server TLSv1.2 ECDHE-RSA-AES128 +-v 3 +-l ECDHE-RSA-AES128-SHA + +# client TLSv1.2 ECDHE-RSA-AES128 +-v 3 +-l ECDHE-RSA-AES128-SHA + +# server TLSv1.2 ECDHE-RSA-AES128-SHA256 +-v 3 +-l ECDHE-RSA-AES128-SHA256 + +# client TLSv1.2 ECDHE-RSA-AES128-SHA256 +-v 3 +-l ECDHE-RSA-AES128-SHA256 + +# server TLSv1.2 ECDHE-RSA-AES256 +-v 3 +-l ECDHE-RSA-AES256-SHA + +# client TLSv1.2 ECDHE-RSA-AES256 +-v 3 +-l ECDHE-RSA-AES256-SHA + +# server TLSv1 ECDHE-ECDSA-RC4 +-v 1 +-l ECDHE-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDHE-ECDSA-RC4 +-v 1 +-l ECDHE-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDHE-ECDSA-DES3 +-v 1 +-l ECDHE-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDHE-ECDSA-DES3 +-v 1 +-l ECDHE-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDHE-ECDSA-AES128 +-v 1 +-l ECDHE-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDHE-ECDSA-AES128 +-v 1 +-l ECDHE-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDHE-ECDSA-AES256 +-v 1 +-l ECDHE-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDHE-ECDSA-AES256 +-v 1 +-l ECDHE-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDHE-EDCSA-RC4 +-v 2 +-l ECDHE-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDHE-ECDSA-RC4 +-v 2 +-l ECDHE-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDHE-ECDSA-DES3 +-v 2 +-l ECDHE-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDHE-ECDSA-DES3 +-v 2 +-l ECDHE-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDHE-ECDSA-AES128 +-v 2 +-l ECDHE-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDHE-ECDSA-AES128 +-v 2 +-l ECDHE-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDHE-ECDSA-AES256 +-v 2 +-l ECDHE-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDHE-ECDSA-AES256 +-v 2 +-l ECDHE-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-RC4 +-v 3 +-l ECDHE-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-RC4 +-v 3 +-l ECDHE-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-DES3 +-v 3 +-l ECDHE-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-DES3 +-v 3 +-l ECDHE-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-AES128 +-v 3 +-l ECDHE-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES128 +-v 3 +-l ECDHE-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-AES128-SHA256 +-v 3 +-l ECDHE-ECDSA-AES128-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES128-SHA256 +-v 3 +-l ECDHE-ECDSA-AES128-SHA256 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-AES256 +-v 3 +-l ECDHE-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES256 +-v 3 +-l ECDHE-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDH-RSA-RC4 +-v 1 +-l ECDH-RSA-RC4-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-RSA-RC4 +-v 1 +-l ECDH-RSA-RC4-SHA + +# server TLSv1 ECDH-RSA-DES3 +-v 1 +-l ECDH-RSA-DES-CBC3-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-RSA-DES3 +-v 1 +-l ECDH-RSA-DES-CBC3-SHA + +# server TLSv1 ECDH-RSA-AES128 +-v 1 +-l ECDH-RSA-AES128-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-RSA-AES128 +-v 1 +-l ECDH-RSA-AES128-SHA + +# server TLSv1 ECDH-RSA-AES256 +-v 1 +-l ECDH-RSA-AES256-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-RSA-AES256 +-v 1 +-l ECDH-RSA-AES256-SHA + +# server TLSv1.1 ECDH-RSA-RC4 +-v 2 +-l ECDH-RSA-RC4-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-RSA-RC4 +-v 2 +-l ECDH-RSA-RC4-SHA + +# server TLSv1.1 ECDH-RSA-DES3 +-v 2 +-l ECDH-RSA-DES-CBC3-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-RSA-DES3 +-v 2 +-l ECDH-RSA-DES-CBC3-SHA + +# server TLSv1.1 ECDH-RSA-AES128 +-v 2 +-l ECDH-RSA-AES128-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-RSA-AES128 +-v 2 +-l ECDH-RSA-AES128-SHA + +# server TLSv1.1 ECDH-RSA-AES256 +-v 2 +-l ECDH-RSA-AES256-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-RSA-AES256 +-v 2 +-l ECDH-RSA-AES256-SHA + +# server TLSv1.2 ECDH-RSA-RC4 +-v 3 +-l ECDH-RSA-RC4-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-RC4 +-v 3 +-l ECDH-RSA-RC4-SHA + +# server TLSv1.2 ECDH-RSA-DES3 +-v 3 +-l ECDH-RSA-DES-CBC3-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-DES3 +-v 3 +-l ECDH-RSA-DES-CBC3-SHA + +# server TLSv1.2 ECDH-RSA-AES128 +-v 3 +-l ECDH-RSA-AES128-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES128 +-v 3 +-l ECDH-RSA-AES128-SHA + +# server TLSv1.2 ECDH-RSA-AES128-SHA256 +-v 3 +-l ECDH-RSA-AES128-SHA256 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES128-SHA256 +-v 3 +-l ECDH-RSA-AES128-SHA256 + +# server TLSv1.2 ECDH-RSA-AES256 +-v 3 +-l ECDH-RSA-AES256-SHA +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES256 +-v 3 +-l ECDH-RSA-AES256-SHA + +# server TLSv1 ECDH-ECDSA-RC4 +-v 1 +-l ECDH-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-ECDSA-RC4 +-v 1 +-l ECDH-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDH-ECDSA-DES3 +-v 1 +-l ECDH-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-ECDSA-DES3 +-v 1 +-l ECDH-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDH-ECDSA-AES128 +-v 1 +-l ECDH-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-ECDSA-AES128 +-v 1 +-l ECDH-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1 ECDH-ECDSA-AES256 +-v 1 +-l ECDH-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1 ECDH-ECDSA-AES256 +-v 1 +-l ECDH-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDH-EDCSA-RC4 +-v 2 +-l ECDH-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-ECDSA-RC4 +-v 2 +-l ECDH-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDH-ECDSA-DES3 +-v 2 +-l ECDH-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-ECDSA-DES3 +-v 2 +-l ECDH-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDH-ECDSA-AES128 +-v 2 +-l ECDH-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-ECDSA-AES128 +-v 2 +-l ECDH-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.1 ECDH-ECDSA-AES256 +-v 2 +-l ECDH-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.1 ECDH-ECDSA-AES256 +-v 2 +-l ECDH-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-RC4 +-v 3 +-l ECDH-ECDSA-RC4-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-RC4 +-v 3 +-l ECDH-ECDSA-RC4-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-DES3 +-v 3 +-l ECDH-ECDSA-DES-CBC3-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-DES3 +-v 3 +-l ECDH-ECDSA-DES-CBC3-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-AES128 +-v 3 +-l ECDH-ECDSA-AES128-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES128 +-v 3 +-l ECDH-ECDSA-AES128-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-AES128-SHA256 +-v 3 +-l ECDH-ECDSA-AES128-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES128-SHA256 +-v 3 +-l ECDH-ECDSA-AES128-SHA256 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-AES256 +-v 3 +-l ECDH-ECDSA-AES256-SHA +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES256 +-v 3 +-l ECDH-ECDSA-AES256-SHA +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-RSA-AES256-SHA384 +-v 3 +-l ECDHE-RSA-AES256-SHA384 + +# client TLSv1.2 ECDHE-RSA-AES256-SHA384 +-v 3 +-l ECDHE-RSA-AES256-SHA384 + +# server TLSv1.2 ECDHE-ECDSA-AES256-SHA384 +-v 3 +-l ECDHE-ECDSA-AES256-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES256-SHA384 +-v 3 +-l ECDHE-ECDSA-AES256-SHA384 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-RSA-AES256-SHA384 +-v 3 +-l ECDH-RSA-AES256-SHA384 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES256-SHA384 +-v 3 +-l ECDH-RSA-AES256-SHA384 + +# server TLSv1.2 ECDH-ECDSA-AES256-SHA384 +-v 3 +-l ECDH-ECDSA-AES256-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES256-SHA384 +-v 3 +-l ECDH-ECDSA-AES256-SHA384 +-A ./certs/server-ecc.pem + +# server TLSv1 HC128-SHA +-v 1 +-l HC128-SHA + +# client TLSv1 HC128-SHA +-v 1 +-l HC128-SHA + +# server TLSv1 HC128-MD5 +-v 1 +-l HC128-MD5 + +# client TLSv1 HC128-MD5 +-v 1 +-l HC128-MD5 + +# server TLSv1 HC128-B2B256 +-v 1 +-l HC128-B2B256 + +# client TLSv1 HC128-B2B256 +-v 1 +-l HC128-B2B256 + +# server TLSv1 AES128-B2B256 +-v 1 +-l AES128-B2B256 + +# client TLSv1 AES128-B2B256 +-v 1 +-l AES128-B2B256 + +# server TLSv1 AES256-B2B256 +-v 1 +-l AES256-B2B256 + +# client TLSv1 AES256-B2B256 +-v 1 +-l AES256-B2B256 + +# server TLSv1.1 HC128-SHA +-v 2 +-l HC128-SHA + +# client TLSv1.1 HC128-SHA +-v 2 +-l HC128-SHA + +# server TLSv1.1 HC128-MD5 +-v 2 +-l HC128-MD5 + +# client TLSv1.1 HC128-MD5 +-v 2 +-l HC128-MD5 + +# server TLSv1.1 HC128-B2B256 +-v 2 +-l HC128-B2B256 + +# client TLSv1.1 HC128-B2B256 +-v 2 +-l HC128-B2B256 + +# server TLSv1.1 AES128-B2B256 +-v 2 +-l AES128-B2B256 + +# client TLSv1.1 AES128-B2B256 +-v 2 +-l AES128-B2B256 + +# server TLSv1.1 AES256-B2B256 +-v 2 +-l AES256-B2B256 + +# client TLSv1.1 AES256-B2B256 +-v 2 +-l AES256-B2B256 + +# server TLSv1.2 HC128-SHA +-v 3 +-l HC128-SHA + +# client TLSv1.2 HC128-SHA +-v 3 +-l HC128-SHA + +# server TLSv1.2 HC128-MD5 +-v 3 +-l HC128-MD5 + +# client TLSv1.2 HC128-MD5 +-v 3 +-l HC128-MD5 + +# server TLSv1.2 HC128-B2B256 +-v 3 +-l HC128-B2B256 + +# client TLSv1.2 HC128-B2B256 +-v 3 +-l HC128-B2B256 + +# server TLSv1.2 AES128-B2B256 +-v 3 +-l AES128-B2B256 + +# client TLSv1.2 AES128-B2B256 +-v 3 +-l AES128-B2B256 + +# server TLSv1.2 AES256-B2B256 +-v 3 +-l AES256-B2B256 + +# client TLSv1.2 AES256-B2B256 +-v 3 +-l AES256-B2B256 + +# server TLSv1 RABBIT-SHA +-v 1 +-l RABBIT-SHA + +# client TLSv1 RABBIT-SHA +-v 1 +-l RABBIT-SHA + +# server TLSv1.1 RABBIT-SHA +-v 2 +-l RABBIT-SHA + +# client TLSv1.1 RABBIT-SHA +-v 2 +-l RABBIT-SHA + +# server TLSv1.2 RABBIT-SHA +-v 3 +-l RABBIT-SHA + +# client TLSv1.2 RABBIT-SHA +-v 3 +-l RABBIT-SHA + +# server TLSv1 NTRU_RC4 +-v 1 +-l NTRU-RC4-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1 NTRU_RC4 +-v 1 +-l NTRU-RC4-SHA + +# server TLSv1 NTRU_DES3 +-v 1 +-l NTRU-DES-CBC3-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1 NTRU_DES3 +-v 1 +-l NTRU-DES-CBC3-SHA + +# server TLSv1 NTRU_AES128 +-v 1 +-l NTRU-AES128-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1 NTRU_AES128 +-v 1 +-l NTRU-AES128-SHA + +# server TLSv1 NTRU_AES256 +-v 1 +-l NTRU-AES256-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1 NTRU_AES256 +-v 1 +-l NTRU-AES256-SHA + +# server TLSv1.1 NTRU_RC4 +-v 2 +-l NTRU-RC4-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.1 NTRU_RC4 +-v 2 +-l NTRU-RC4-SHA + +# server TLSv1.1 NTRU_DES3 +-v 2 +-l NTRU-DES-CBC3-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.1 NTRU_DES3 +-v 2 +-l NTRU-DES-CBC3-SHA + +# server TLSv1.1 NTRU_AES128 +-v 2 +-l NTRU-AES128-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.1 NTRU_AES128 +-v 2 +-l NTRU-AES128-SHA + +# server TLSv1.1 NTRU_AES256 +-v 2 +-l NTRU-AES256-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.1 NTRU_AES256 +-v 2 +-l NTRU-AES256-SHA + +# server TLSv1.2 NTRU_RC4 +-v 3 +-l NTRU-RC4-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.2 NTRU_RC4 +-v 3 +-l NTRU-RC4-SHA + +# server TLSv1.2 NTRU_DES3 +-v 3 +-l NTRU-DES-CBC3-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.2 NTRU_DES3 +-v 3 +-l NTRU-DES-CBC3-SHA + +# server TLSv1.2 NTRU_AES128 +-v 3 +-l NTRU-AES128-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.2 NTRU_AES128 +-v 3 +-l NTRU-AES128-SHA + +# server TLSv1.2 NTRU_AES256 +-v 3 +-l NTRU-AES256-SHA +-n +-c ./certs/ntru-cert.pem +-k ./certs/ntru-key.raw + +# client TLSv1.2 NTRU_AES256 +-v 3 +-l NTRU-AES256-SHA + +# server TLSv1 DHE AES128 +-v 1 +-l DHE-RSA-AES128-SHA + +# client TLSv1 DHE AES128 +-v 1 +-l DHE-RSA-AES128-SHA + +# server TLSv1 DHE AES256 +-v 1 +-l DHE-RSA-AES256-SHA + +# client TLSv1 DHE AES256 +-v 1 +-l DHE-RSA-AES256-SHA + +# server TLSv1 DHE AES128-SHA256 +-v 1 +-l DHE-RSA-AES128-SHA256 + +# client TLSv1 DHE AES128-SHA256 +-v 1 +-l DHE-RSA-AES128-SHA256 + +# server TLSv1 DHE AES256-SHA256 +-v 1 +-l DHE-RSA-AES256-SHA256 + +# client TLSv1 DHE AES256-SHA256 +-v 1 +-l DHE-RSA-AES256-SHA256 + +# server TLSv1.1 DHE AES128 +-v 2 +-l DHE-RSA-AES128-SHA + +# client TLSv1.1 DHE AES128 +-v 2 +-l DHE-RSA-AES128-SHA + +# server TLSv1.1 DHE AES256 +-v 2 +-l DHE-RSA-AES256-SHA + +# client TLSv1.1 DHE AES256 +-v 2 +-l DHE-RSA-AES256-SHA + +# server TLSv1.1 DHE AES128-SHA256 +-v 2 +-l DHE-RSA-AES128-SHA256 + +# client TLSv1.1 DHE AES128-SHA256 +-v 2 +-l DHE-RSA-AES128-SHA256 + +# server TLSv1.1 DHE AES256-SHA256 +-v 2 +-l DHE-RSA-AES256-SHA256 + +# client TLSv1.1 DHE AES256-SHA256 +-v 2 +-l DHE-RSA-AES256-SHA256 + +# server TLSv1.2 DHE AES128 +-v 3 +-l DHE-RSA-AES128-SHA + +# client TLSv1.2 DHE AES128 +-v 3 +-l DHE-RSA-AES128-SHA + +# server TLSv1.2 DHE AES256 +-v 3 +-l DHE-RSA-AES256-SHA + +# client TLSv1.2 DHE AES256 +-v 3 +-l DHE-RSA-AES256-SHA + +# server TLSv1.2 DHE AES128-SHA256 +-v 3 +-l DHE-RSA-AES128-SHA256 + +# client TLSv1.2 DHE AES128-SHA256 +-v 3 +-l DHE-RSA-AES128-SHA256 + +# server TLSv1.2 DHE AES256-SHA256 +-v 3 +-l DHE-RSA-AES256-SHA256 + +# client TLSv1.2 DHE AES256-SHA256 +-v 3 +-l DHE-RSA-AES256-SHA256 + +# server TLSv1 PSK-AES128 +-s +-v 1 +-l PSK-AES128-CBC-SHA + +# client TLSv1 PSK-AES128 +-s +-v 1 +-l PSK-AES128-CBC-SHA + +# server TLSv1 PSK-AES256 +-s +-v 1 +-l PSK-AES256-CBC-SHA + +# client TLSv1 PSK-AES256 +-s +-v 1 +-l PSK-AES256-CBC-SHA + +# server TLSv1.1 PSK-AES128 +-s +-v 2 +-l PSK-AES128-CBC-SHA + +# client TLSv1.1 PSK-AES128 +-s +-v 2 +-l PSK-AES128-CBC-SHA + +# server TLSv1.1 PSK-AES256 +-s +-v 2 +-l PSK-AES256-CBC-SHA + +# client TLSv1.1 PSK-AES256 +-s +-v 2 +-l PSK-AES256-CBC-SHA + +# server TLSv1.2 PSK-AES128 +-s +-v 3 +-l PSK-AES128-CBC-SHA + +# client TLSv1.2 PSK-AES128 +-s +-v 3 +-l PSK-AES128-CBC-SHA + +# server TLSv1.2 PSK-AES256 +-s +-v 3 +-l PSK-AES256-CBC-SHA + +# client TLSv1.2 PSK-AES256 +-s +-v 3 +-l PSK-AES256-CBC-SHA + +# server TLSv1.2 PSK-AES128-SHA256 +-s +-v 3 +-l PSK-AES128-CBC-SHA256 + +# client TLSv1.2 PSK-AES128-SHA256 +-s +-v 3 +-l PSK-AES128-CBC-SHA256 + +# server TLSv1.0 PSK-NULL +-s +-v 1 +-l PSK-NULL-SHA + +# client TLSv1.0 PSK-NULL +-s +-v 1 +-l PSK-NULL-SHA + +# server TLSv1.1 PSK-NULL +-s +-v 2 +-l PSK-NULL-SHA + +# client TLSv1.1 PSK-NULL +-s +-v 2 +-l PSK-NULL-SHA + +# server TLSv1.2 PSK-NULL +-s +-v 3 +-l PSK-NULL-SHA + +# client TLSv1.2 PSK-NULL +-s +-v 3 +-l PSK-NULL-SHA + +# server TLSv1.2 PSK-NULL-SHA256 +-s +-v 3 +-l PSK-NULL-SHA256 + +# client TLSv1.2 PSK-NULL-SHA256 +-s +-v 3 +-l PSK-NULL-SHA256 + +# server TLSv1.2 PSK-NULL +-s +-v 3 +-l PSK-NULL-SHA + +# client TLSv1.2 PSK-NULL +-s +-v 3 +-l PSK-NULL-SHA + +# server TLSv1.2 PSK-NULL-SHA256 +-s +-v 3 +-l PSK-NULL-SHA256 + +# client TLSv1.2 PSK-NULL-SHA256 +-s +-v 3 +-l PSK-NULL-SHA256 + +# server TLSv1.0 RSA-NULL-SHA +-v 1 +-l NULL-SHA + +# client TLSv1.0 RSA-NULL-SHA +-v 1 +-l NULL-SHA + +# server TLSv1.1 RSA-NULL-SHA +-v 2 +-l NULL-SHA + +# client TLSv1.1 RSA-NULL-SHA +-v 2 +-l NULL-SHA + +# server TLSv1.2 RSA-NULL-SHA +-v 3 +-l NULL-SHA + +# client TLSv1.2 RSA-NULL-SHA +-v 3 +-l NULL-SHA + +# server TLSv1.0 RSA-NULL-SHA256 +-v 1 +-l NULL-SHA256 + +# client TLSv1.0 RSA-NULL-SHA256 +-v 1 +-l NULL-SHA256 + +# server TLSv1.1 RSA-NULL-SHA256 +-v 2 +-l NULL-SHA256 + +# client TLSv1.1 RSA-NULL-SHA256 +-v 2 +-l NULL-SHA256 + +# server TLSv1.2 RSA-NULL-SHA256 +-v 3 +-l NULL-SHA256 + +# client TLSv1.2 RSA-NULL-SHA256 +-v 3 +-l NULL-SHA256 + +# server TLSv1 CAMELLIA128-SHA +-v 1 +-l CAMELLIA128-SHA + +# client TLSv1 CAMELLIA128-SHA +-v 1 +-l CAMELLIA128-SHA + +# server TLSv1 CAMELLIA256-SHA +-v 1 +-l CAMELLIA256-SHA + +# client TLSv1 CAMELLIA256-SHA +-v 1 +-l CAMELLIA256-SHA + +# server TLSv1 CAMELLIA128-SHA256 +-v 1 +-l CAMELLIA128-SHA256 + +# client TLSv1 CAMELLIA128-SHA256 +-v 1 +-l CAMELLIA128-SHA256 + +# server TLSv1 CAMELLIA256-SHA256 +-v 1 +-l CAMELLIA256-SHA256 + +# client TLSv1 CAMELLIA256-SHA256 +-v 1 +-l CAMELLIA256-SHA256 + +# server TLSv1.1 CAMELLIA128-SHA +-v 2 +-l CAMELLIA128-SHA + +# client TLSv1.1 CAMELLIA128-SHA +-v 2 +-l CAMELLIA128-SHA + +# server TLSv1.1 CAMELLIA256-SHA +-v 2 +-l CAMELLIA256-SHA + +# client TLSv1.1 CAMELLIA256-SHA +-v 2 +-l CAMELLIA256-SHA + +# server TLSv1.1 CAMELLIA128-SHA256 +-v 2 +-l CAMELLIA128-SHA256 + +# client TLSv1.1 CAMELLIA128-SHA256 +-v 2 +-l CAMELLIA128-SHA256 + +# server TLSv1.1 CAMELLIA256-SHA256 +-v 2 +-l CAMELLIA256-SHA256 + +# client TLSv1.1 CAMELLIA256-SHA256 +-v 2 +-l CAMELLIA256-SHA256 + +# server TLSv1.2 CAMELLIA128-SHA +-v 3 +-l CAMELLIA128-SHA + +# client TLSv1.2 CAMELLIA128-SHA +-v 3 +-l CAMELLIA128-SHA + +# server TLSv1.2 CAMELLIA256-SHA +-v 3 +-l CAMELLIA256-SHA + +# client TLSv1.2 CAMELLIA256-SHA +-v 3 +-l CAMELLIA256-SHA + +# server TLSv1.2 CAMELLIA128-SHA256 +-v 3 +-l CAMELLIA128-SHA256 + +# client TLSv1.2 CAMELLIA128-SHA256 +-v 3 +-l CAMELLIA128-SHA256 + +# server TLSv1.2 CAMELLIA256-SHA256 +-v 3 +-l CAMELLIA256-SHA256 + +# client TLSv1.2 CAMELLIA256-SHA256 +-v 3 +-l CAMELLIA256-SHA256 + +# server TLSv1 DHE-RSA-CAMELLIA128-SHA +-v 1 +-l DHE-RSA-CAMELLIA128-SHA + +# client TLSv1 DHE-RSA-CAMELLIA128-SHA +-v 1 +-l DHE-RSA-CAMELLIA128-SHA + +# server TLSv1 DHE-RSA-CAMELLIA256-SHA +-v 1 +-l DHE-RSA-CAMELLIA256-SHA + +# client TLSv1 DHE-RSA-CAMELLIA256-SHA +-v 1 +-l DHE-RSA-CAMELLIA256-SHA + +# server TLSv1 DHE-RSA-CAMELLIA128-SHA256 +-v 1 +-l DHE-RSA-CAMELLIA128-SHA256 + +# client TLSv1 DHE-RSA-CAMELLIA128-SHA256 +-v 1 +-l DHE-RSA-CAMELLIA128-SHA256 + +# server TLSv1 DHE-RSA-CAMELLIA256-SHA256 +-v 1 +-l DHE-RSA-CAMELLIA256-SHA256 + +# client TLSv1 DHE-RSA-CAMELLIA256-SHA256 +-v 1 +-l DHE-RSA-CAMELLIA256-SHA256 + +# server TLSv1.1 DHE-RSA-CAMELLIA128-SHA +-v 2 +-l DHE-RSA-CAMELLIA128-SHA + +# client TLSv1.1 DHE-RSA-CAMELLIA128-SHA +-v 2 +-l DHE-RSA-CAMELLIA128-SHA + +# server TLSv1.1 DHE-RSA-CAMELLIA256-SHA +-v 2 +-l DHE-RSA-CAMELLIA256-SHA + +# client TLSv1.1 DHE-RSA-CAMELLIA256-SHA +-v 2 +-l DHE-RSA-CAMELLIA256-SHA + +# server TLSv1.1 DHE-RSA-CAMELLIA128-SHA256 +-v 2 +-l DHE-RSA-CAMELLIA128-SHA256 + +# client TLSv1.1 DHE-RSA-CAMELLIA128-SHA256 +-v 2 +-l DHE-RSA-CAMELLIA128-SHA256 + +# server TLSv1.1 DHE-RSA-CAMELLIA256-SHA256 +-v 2 +-l DHE-RSA-CAMELLIA256-SHA256 + +# client TLSv1.1 DHE-RSA-CAMELLIA256-SHA256 +-v 2 +-l DHE-RSA-CAMELLIA256-SHA256 + +# server TLSv1.2 DHE-RSA-CAMELLIA128-SHA +-v 3 +-l DHE-RSA-CAMELLIA128-SHA + +# client TLSv1.2 DHE-RSA-CAMELLIA128-SHA +-v 3 +-l DHE-RSA-CAMELLIA128-SHA + +# server TLSv1.2 DHE-RSA-CAMELLIA256-SHA +-v 3 +-l DHE-RSA-CAMELLIA256-SHA + +# client TLSv1.2 DHE-RSA-CAMELLIA256-SHA +-v 3 +-l DHE-RSA-CAMELLIA256-SHA + +# server TLSv1.2 DHE-RSA-CAMELLIA128-SHA256 +-v 3 +-l DHE-RSA-CAMELLIA128-SHA256 + +# client TLSv1.2 DHE-RSA-CAMELLIA128-SHA256 +-v 3 +-l DHE-RSA-CAMELLIA128-SHA256 + +# server TLSv1.2 DHE-RSA-CAMELLIA256-SHA256 +-v 3 +-l DHE-RSA-CAMELLIA256-SHA256 + +# client TLSv1.2 DHE-RSA-CAMELLIA256-SHA256 +-v 3 +-l DHE-RSA-CAMELLIA256-SHA256 + +# server TLSv1.2 RSA-AES128-GCM-SHA256 +-v 3 +-l AES128-GCM-SHA256 + +# client TLSv1.2 RSA-AES128-GCM-SHA256 +-v 3 +-l AES128-GCM-SHA256 + +# server TLSv1.2 RSA-AES256-GCM-SHA384 +-v 3 +-l AES256-GCM-SHA384 + +# client TLSv1.2 RSA-AES256-GCM-SHA384 +-v 3 +-l AES256-GCM-SHA384 + +# server TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 +-v 3 +-l ECDHE-ECDSA-AES128-GCM-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 +-v 3 +-l ECDHE-ECDSA-AES128-GCM-SHA256 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 +-v 3 +-l ECDHE-ECDSA-AES256-GCM-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 +-v 3 +-l ECDHE-ECDSA-AES256-GCM-SHA384 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 +-v 3 +-l ECDH-ECDSA-AES128-GCM-SHA256 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 +-v 3 +-l ECDH-ECDSA-AES128-GCM-SHA256 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 +-v 3 +-l ECDH-ECDSA-AES256-GCM-SHA384 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 +-v 3 +-l ECDH-ECDSA-AES256-GCM-SHA384 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 +-v 3 +-l ECDHE-RSA-AES128-GCM-SHA256 + +# client TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 +-v 3 +-l ECDHE-RSA-AES128-GCM-SHA256 + +# server TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 +-v 3 +-l ECDHE-RSA-AES256-GCM-SHA384 + +# client TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 +-v 3 +-l ECDHE-RSA-AES256-GCM-SHA384 + +# server TLSv1.2 ECDH-RSA-AES128-GCM-SHA256 +-v 3 +-l ECDH-RSA-AES128-GCM-SHA256 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES128-GCM-SHA256 +-v 3 +-l ECDH-RSA-AES128-GCM-SHA256 + +# server TLSv1.2 ECDH-RSA-AES256-GCM-SHA384 +-v 3 +-l ECDH-RSA-AES256-GCM-SHA384 +-c ./certs/server-ecc-rsa.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDH-RSA-AES256-GCM-SHA384 +-v 3 +-l ECDH-RSA-AES256-GCM-SHA384 + +# server TLSv1.2 DHE-RSA-AES128-GCM-SHA256 +-v 3 +-l DHE-RSA-AES128-GCM-SHA256 + +# client TLSv1.2 DHE-RSA-AES128-GCM-SHA256 +-v 3 +-l DHE-RSA-AES128-GCM-SHA256 + +# server TLSv1.2 DHE-RSA-AES256-GCM-SHA384 +-v 3 +-l DHE-RSA-AES256-GCM-SHA384 + +# client TLSv1.2 DHE-RSA-AES256-GCM-SHA384 +-v 3 +-l DHE-RSA-AES256-GCM-SHA384 + +# server TLSv1.2 AES128-CCM-8 +-v 3 +-l AES128-CCM-8 + +# client TLSv1.2 AES128-CCM-8 +-v 3 +-l AES128-CCM-8 + +# server TLSv1.2 AES256-CCM-8 +-v 3 +-l AES256-CCM-8 + +# client TLSv1.2 AES256-CCM-8 +-v 3 +-l AES256-CCM-8 + +# server TLSv1.2 ECDHE-ECDSA-AES128-CCM-8 +-v 3 +-l ECDHE-ECDSA-AES128-CCM-8 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES128-CCM-8 +-v 3 +-l ECDHE-ECDSA-AES128-CCM-8 +-A ./certs/server-ecc.pem + +# server TLSv1.2 ECDHE-ECDSA-AES256-CCM-8 +-v 3 +-l ECDHE-ECDSA-AES256-CCM-8 +-c ./certs/server-ecc.pem +-k ./certs/ecc-key.pem + +# client TLSv1.2 ECDHE-ECDSA-AES256-CCM-8 +-v 3 +-l ECDHE-ECDSA-AES256-CCM-8 +-A ./certs/server-ecc.pem + +# server TLSv1.2 PSK-AES128-CCM-8 +-s +-v 3 +-l PSK-AES128-CCM-8 + +# client TLSv1.2 AES128-CCM-8 +-s +-v 3 +-l PSK-AES128-CCM-8 + +# server TLSv1.2 PSK-AES256-CCM-8 +-s +-v 3 +-l PSK-AES256-CCM-8 + +# client TLSv1.2 AES256-CCM-8 +-s +-v 3 +-l PSK-AES256-CCM-8 + diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-api.o b/project1/cyassl-3.0.0/tests/tests_unit_test-api.o new file mode 100644 index 0000000000000000000000000000000000000000..1c38234fc67b3cd22c1484d00d8d84339899b909 GIT binary patch literal 19712 zcmd5@eSB2Kxt>6PY>WmG1O;V*Re}v6n}m>1v4JFfXoQ#qg@PTPS)>dk$gIWuR^p4|l0{&5e# z+4gj#FgB&N0w(A<+8H<eVkr$Fiden zO^IuaR%PhBO-da+apYWdD|^r-PsWuz99ME%T*;=mlBT$ltK&*8iz_LNE14WuGD??( zyE{J$Wt&4x4lA$pB)d2~Ij+tFp^19v;q|WM-f{Sy7VF*KK%~SqlI{YUj*8bC&NI9& zbwZ2Qo2a$yCz*X&b!rXLv~W*nUwX%5urz$Jp_l_o@7RkHv-6Z5n8ndxQ0bF}a368M zd}7y_ek2%cUB*m)cw$3;Qq-g3qZ;%_2vZ^t6590M3vJFjJC^IQe8nMF zj6RhiX7(p#8)9;toPCI|pZ%4F_yS!OGmG7v3Y~q{Swy)piyx0Nr(wM-PU7Y8hbN9f z0wH9tGv>~H1T(XbI?P_onb1KaXK!na46D@OX^E8ZvmX`QUu=HW`eX#|4(KzDNrpo7 zmBPMMCZ>1Xd=iOJ$Os#)78w$%x2Vi?g&SPMrHnPn!_RlV7g~-)OS31jUJ`mMOy9`X z@AR3L^qyf<^$v{{(GGd%6^JHE@u*#>9Uj&;>nNa2=MQMp$SnXkJ zK&pVQSusR^OUjfjp>2fwx@T4VL83mQ~yZVr^-MIzNH0yRJvd{GZih4R+TjbMD-gcLL% zJO`56Md6-Eha58o({+m+cGq?nhkRlx#8633pi){E*(<9M4$0<(>t$c>W-vz7VW`7t zCLOd9XgEcsKZe(`6p_-%b4RgWQ0IXSW4lX|8-*5#oki{YXiL-o?H`YB@%LV0 zD3p_C^ore7SDEX)a2Yz&>kQ0_aF+!&vHJD6Ow_5RmI>vqo}v_tN-(AvL}pC2zq>qq zEc}u+sNe$EaLA@#bs&98iL1!)r1+?)Iyp2qw)4&d=^aNoJ0X`7CYMCY(;`K~BO+Yo zN|C-wGv=WdI*SGg!WCXlDF+@gQl~_9t1_CY z^CB8@Rt8ENC(`C%Pf9I9V`A?_CXKZuRwvR%uJCZ08Ksy4Gi|sHO5d^)z3Lc7Z8U8< zTu)&LbViqP3w>#LltFml)H$2ufMGJ_rF=?E`2R0dnlag9U5)j$a)qs6m_kJgdY2)9 zXwdavM^($U=wqGiL$22`OYmYW!Ru&*6foSGy)uOuTFr(UJ)aTcfQI5-RI)g2U3Z)FlF5x$;QqI^(uX`jex=kbwG8S=IeyO7^pGU z!G@`6($ox_spdKm-JdYN%~WFiTT+R>GL_R~Tp47%n57ohdyOi!x4M47R(buj+AvTn zSeBBYoy8h+9&r|7TB}1!%2|Yaztox$?nz(*-L&oBXL|hnO0(4gEc;=Ar~}x@eq*_s z$K@)+x?JHUg~`GTx7*dN#r(al8&Iec!`vi;%kH4g*)vZrVwRcCL$R7#vuy( zG8#YM{y7%67nlY{lt+b_$X21>or=(3AcQE-Fc!8U=nu)LbK-gA4c<*STD+TZq$jrh zy{|7~I6y}QJjE*c{-?%h+Gc$>F`mD)lJmMzTWj==YWJX&6SJ-PeP~VJh=guS(1i zT43u$MTqns)(CCCo@eDnjL)TAg?VQ;@`V^34zxTRptmh&|7v803H>e)hX!ob-}2Bs zP%94JoKKqzVjY70kd~CM4$+qjBP{>d{7jLo?$YG5;~jJ#?&){1U%&vYPyHmh{K&GE zQ_Km_Io{#g1s1u*^#A}nssi-o>$WF1ZNB2^AuBF&)@;4B?R$YwN9|nt%U37u-u;2&aQ6IH zcTT%w{Kd`@ch47R`2R3;-2Ne#%s8)YVddmMdC!0P*|B@?UcR#Ar9rb=Ut95)yC2;# z_N?6(-?8w%58Lni$?*|afWNxqO4Nd;B58<15N&*(ze>y(9q#PR?ie6Ul4=!2I{k_MQW-O7fWUW1)9vl0D_{jvdmMtxVX5q zvQiYcc}a__mUtSPyfq&9qQ15b_toA|J&ehy4z0^{PE0VgiJ8vqDXI@x-qL_x1k9O0 zCt3Bj1brU5y}q^{N`0PMm}^%XJ2_BIqvkFsE3H~uUg{|?y?lyYV|jCZE3{qaYa2kJ za(6;~4L-ltxwg4J@>i z8yTEtar!AZ#}=Up2V>JXuyd5cft=&cnUR%^e{K<~4mhiu{C;0`NJW}3LQ-ag5%|HT z>NP%HohpL95KEc@A!k)_xo6>`lG3u-OI7Ps;cs#x6Pw$dwaBQ|O~H`t!&_bLLjxn2 zttu)Pc`8a5SC-B$DXB1Z(5hASejWT$LqmNqY({HPs{(H(v z)Cvx1&B;wvQ_`>DswROAbZ>Ek&+Bgqm|pQL@YjdHoTXU%W|uE;R`Gc+tb2tC*z|nG z%Q?qaSMRszx9Q`S!ee>la9XhfdK>gUq^Tu@tr6#0wzSJ9eCSbu-`^B+RyX_bVCO?8 zmf0nE|>_*#F7eTe^>HpLi|q-vayiPpy5_0@+@rndOmW?@%t8R=?|M zKUw>xRUt3p1se*Z#VN{LmKWXAskOI9i0n^g(3c+H0PWTI2DW#A_I7(0uWIp!TCmUX z`s<;C{G3GuSB zD=%jo{ApxXv#%jb=1Nv|Q)44GS0ZawFetK+O}?yo3l~ofhP>5lL{@NhFw`9KuEL$h zwnoXDn`*ovugEff8;nBkEO$Qi%UZ=_r)ogPFP%6u68z4}i+{iQ;8=Mpf8hW_UX*dD zd&0&`@NigmXEUt;a1CeaZmj@s+w|t zWFZsl*v z@aG(bvJk&6QGW-kIc0dU*wT%Z3&$W{H&h_t?=+?UnW#U4`f|lv z!OwxiD8~L9!OsI{IFWAyF9$DC{4VhA;9CDf;BSFzeUBg^^5NK2CI8>>PZ9W8imwN+ z1V2;px!^V6dOT~Pi?(We7ok3g`teGB7Wj9-M<^Zy-(}%Tz<&zvRP|o)W8j=~j^`Ti zw=D9FDE}DT$m1cR36A(2T-);u?8$}<59`^U-)7SAqwBwc^0DA>gRK7}+D-)5_7B4S zO#Ga$>QBS{68va=%TUffb^99dRtw(@!{(t(+g}I$Jh;~S_ke#FTM31XyH4->%sAt>$3eJ@OBG-6Z~Eae;M}P4p}@pr2MUzyC+ev z^9jqCcmZ73{{!+IllI4BkS~N!^mw^E@-o^F6FV{A{Bx)2C`&?A?f@SSdCHM*1up_O z;%S(;349~?G*$lz_~YQZ{a?WuV_N=g@NE2O`Q5PR80^*gG!?Q==*ranfpcw{rT7-` zt+>Bf@nhgeE&N4r{*~L;RsC4>RSs^%+c0q!_*QVO?`HUiR}p@a@Dxu)>~56zSjqjvk>Y{zEngGdNHhD~$d9i-AjnB35*G*|d-_LD) zlWjaBZJg_pzS!Sgw(->=-t@)#e4D>tx5^4 z{k?6g=Lb}MvA_A60Lf3c+4HHb{RCS*pTqiM`~R}ZAGPr#HlAm*=OLT^*|vK5Vz0lp z%nsC7;ao&`=9Mj)GrP>QXztv~(kf5Y>^Wtn9+6dswU5g~n-vdigirh9MhszNBOevZ*V<$&{{lN9z-| z&xzLC4%oDYT&qMv9eGg++i{!LG2JSWP)9x`5*@y26*DN1=nPH^NUtV3iqisxmM&rr zES10vZG-%jh66DrFKKPF&j&fqdajn2Cdm_2qmnT(BgdG$mg-t9rsebX&5S%%Wfn|V zsx@kX{CuS?utuxPpP?G(n}MYZ7+^Gz5=6ZA%Q&5`0;-|4L5pUq8&jDM<@_AgSSu?K za_GkFNLM5}`m?$!!Fj$mL`DidX7O&+v+is<1eUwAl@;!6+9gZ0#nb5{dU|@ybR|4b zQ<8bgt?q1kL~1ijw5Rj5v+`yLW^Yw>pu*>^X*2w5!jdwRjzr%g>Cu0AIh20uLsl-e0H8lPd&=99-QJs%cv57amV_ zs4d|0tm2n!J&1e(h5X>Ss?G0h^a*@F4|%*bHO<2KfGL9YbvR|Se0&uA#wd&ri)>6e z*)(8Gpr^3~=Wgs{jnG9nx32LhO}fkwYw=4#TMvULiPC7dsb6>K)&q0vp}O_r;w}*0RZYzyJz%Xr$8ELE$T2OWd(6?=a;6)p zr~*%=m}-Q*IQ9yucsb#@fn%W%PGIu)g}9LXGUJTHF;R#DmOpH~A0^|(crNQ9R8E|X zvnL`B8`dbf01+?M+*dmAQni`<79qBf<8Wj<`EA(OkrxTEoBTUM>?NO#^Eq<7Ogu|I z2WJ)Jw;Jzsj$$ExPrglv*I8d8#QWr1h4?#pDSlx;ntU_PUx5x7JA%9g<0PMF>~E7p zLR>_S%~w9_BREeW$4lZua*X$z#C3SLA!0DCtj9~-26FgmI}vhsu^ca-yA^+oh<48s z(e7ncenR12i5u{aNJPKG1{w0BfsPr*ySM{RuOP?f&OjCscRTqqA?_nbf4j-QDa2!n^Q?{iJx#Bz!)4fd6ee7rjo zrwMU65&hQ@v+x z|Bz!mLx+H0hw}v@=fcX#s5J>Kc@{fXo=#S?{ zR}90@4po@+zFu5Gygis{C>y+EudLB}BF2YlzU>sdyI=dU<|K`R@ZA z7vQW)@qK5O#5Zv#-e-Z1@yIW7 z^xH)~0cV1WKS{2Gz~o){ zoAAmil1HXs(BkmR=gZK!ZQ^XxuKY@;Ou&xl##V{z6?90$J>&%-$u@m$P5aTLDY0XgnRiT7fC1#)~xS-%4Rv6JN(&)F!xi0CIJ-6$Up zq~EfMd-2>N!fzc!_-z;Q9_S$=PJT{AeEfpA8S_iTeDlBKFdoJO9e5_V$ua-)h?xJS zEMI{2g&cmUCt}{OCAMOIiJ130f%NkOMELm;BK-U~aikDGBf_6Q2U5?AMELVfApQ9n zIsBD;CgjRs50K-XOneOc5SGJ_W#sVV)#UKwwdC;QW^(xPE^_$s*F^a7ILqP3H^||~ zVc7Uk?=&FGXOP2>R}taI79#w(hX_CZk_bQki3mTwM}!~QmVUf|2tUpz!jCI}^kaY= ze%wriAGfj`d2}Z^#=nmUKkg^OkB5oy;~PLnGWsD7#(K+g$Pb1O9YYXTK=L!mQ}Eq_ z2>D4w$mgp1LUPE@R(u{ga%>S1@=J-3uUGX=6?hdgxE$Lio8(u_mexY zE-L;6d8!Zx74IhADa5Z>j<|S*h`9JY5pnS*5kKz}5f>i;Ij%vtXI!KLY3E2H>~ygl z^%s%D&K$)H$PvqPh{%yLBJ8YE_1`3iovRcNki*V(ir+wloworQhkM8ohev>1x8Ee+ zCB(Z##9=zd!1a0*knuN#9Pv1ld^GZq9P#KOcVb;9M?Bt6?8JFC5%YYMh&Vb1c_g8Y1HEdg2y5w}>4=+)qTjJql#J{e&FyuMpee ze_|{Ca|01}48mN{&uK*Xc^r`P6Um3b-->6GBS#B}ke@?@e1)oCLJs+rir11O=ln#- zuOmW!i>kks9P+m-eh)cvYc~<`_Bavq_>`)DmK^igt@u%L%;Rf{|Cx9v@`mN;@1I2U z$Jpa|(t+%6wBqNHBW@-W5jSok`YTlR-ylbS^Aul9j{dGzd=(M>tpze}c94G;`vagO zfaetXqj+u;e~9&ixKoI?iQBR6;u*ts=K}ejH4#WVbBJs4{9^fqh$rG?d?O~F5C5_r zayJ6mejCfteupamKJhxtJIm4j86w*E5Yhf6AlttWWP35zXrBUP`55B$$TyaweI^m@ q^NDDG36OG2foxyRa`eAOm9Hgkz&B}@qkSh4?Y~V#`#V^V_WuWoB(|9V literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-hash.o b/project1/cyassl-3.0.0/tests/tests_unit_test-hash.o new file mode 100644 index 0000000000000000000000000000000000000000..677484123a0c362d9835b8e18f317d54687efc53 GIT binary patch literal 7408 zcmbtY4_H)H7C*#@V5VsPtEiqe8XAtk42s1f;D7@Tg8cEn;S)wchk=+O#n2?Qnr5l3 zv`<|z%WeB(ncub**;e=`-P%f5x6LwZ+wxlrD%sD}zD)La-h21)W)$5%@Ao}^=XcM! z=iGDNz4zVWo=j&}SXfv%X)TPxDNGRH%Kj>`DG*EjsV@~y&p*y|PUCJK*WAR!Z!#Z0 z+tt-|{3w&Xt55kNRYkiTVld>25QDT3gOTtWe_f+vO$;JPqj%2vJsWBo9(c1T&vnRdmH`a>wb!0Gc#4SnH%J1zHUJFef|{nEjQcEHU7PRpV=gO0#1xcKkMJm z_I{fgaU$8jvM5%!)eUOS4QqPmY}3Bzgtn$%O#Tm6tZz4+KI%W-xQ9!5N6DOdyVc6R z&!h0@>+5AEh!w48F$ms=X;qCG1g)--bctsWn+zQ=F32XN@@c9~3ZUChn(jxb{7Tiv zsrYFySBR{USdITgv(GFcO5Z;0!EG+`?`-cA=$GLyGWTuT8y(0xgPKI5mU^-L?ru4d zby6u=oKi9lAW9Y;fP?0o(fj{=#GM=mmR&30`6k1-l+v zJ-r?ZCb5m(oG;eJ>bCx?8@bPIj&0Q{ujcDB$G2Yu{hwhdS{LF4N( zdAWr2B?K}%3=4*%c4rT7%?>5|uoauSv*&aT*}HLE1!dm^J;CWPJ;xaB1xb<6;6<5( zHb<;(7YAK@jA~;GvPsr$QecyosM^@s=51w7Y=y*Ybddl1fW;rD?h;I*FJ5(||Hl9{ zNPQ;CiSanT^gLS&PIPtEEyp4W^wYPSYN=JCbsAgD!EgtcN^>KW`K(M0WS!M?4mCv3 z-n*_j4|~tlwC_7CN35o!Y6*S1xaO?Xl*9*<%x)@01S^29>!MmRD3RTI{a!RM*^D>-E*$wPb1iGD^>wWY5f+ z?8wfU;>?|zmp`qbu&8+YjG41$_dF;*A<=3}8aF<90{z{$b=|=wpZxf=9256Mddm}} ztGbOYOQIRyoqX!nuih!!ty-6AkGcJzXUDdjCx4nY>e#WYnog20vt71>%ZxA6 zi*qI(`CCEx(p^n0V+Y^xOyT-FMs6l^^CJ0RL~`q~wvmtZO`ShsOUl=?%DRS^pX&JT zAJ-g-*hyE0G|F);bkXx6jU1IyQH874MUSqjT{bTHjhL%XK6GYq;A{&msgQkAS+!Iz zOG{*rPg+=AD|xDY6_uXyiB#8jY3icwuY`a5tS6z*yw{TH=&x=x{ViL;^@E%b9BJKW zJ#qZyQ|C>YGdOR?oB;iB_KQWw+Q&Y1&^P3x&Q)J*9I>IHo(9hIX1xBwfDazovf<=| zPu`tZ+F5sqmZUy+!?>0GvR3D|wjX$;@tIMxq5`RBcHZmv)~$^s)Tt*R=fSZ1;QRU*1l%ZpXb-<_^iY`{O4Ej-G8FJ))y5mv$^2^7g}F z`@c<3Py2k{wwrF=9xiWreCV=`e~#{w|4V~kq*sR~+*jPIw(Q@5wpV{1|J#Q;v)&@w zZga|qk0ck)efFgfU%ImM)(5WNMejEK=9!V-jCWfS_n)RYpY6s9;9WS^`U)K**E)upnVEZDv-%jBuWW4u1ObTL`H6<%MhPhJ2? zV11RsYpZ!US=7HOW1|F1!Z^5Bv>F$y=F-SN%lL+a->OQp;qNNGdTC9$QbJ~%DA5Vr zd=1_i*7#MLj_r8Z0*#C1-)is$6$yWQ>nSa_ zFVQAVW?&m`{2PU3;i3a}!&sp;F+Zdily4iZn(^r4eEDax$hQJA`xEnvhQWFf4E=nQ zXL_ZE?1S5L_+6f-ippQM;fM8x;dF+7zZ;s+rJ+ycz-qR;p9QT6y8>`g6ILC@wJsVj zo!#Dshx6b$=HM~N_!w5A4a5_MEVF?U z9^PNf7XZ@?dM;v3&$xVj*BjI55z*h5BLB!U=ilbd>42;4lu$00R9=KAvphIi^tB^>=!|P z5NVtP@_61?v+&LnG<^wV(YWT>A-pJrXJVXaY|nc~H0Fmw_>2&q8^YT|_~#+KHH2>q z;X_4mAjju-EgEy)SE4b`2+4=|vf&+DA$uz0$4Rz>{Dhk>{!ioRA`L z%8Fp6Y)_>xw=9Y96xZN-<654Hz%4*>}pC8AqJbgPJN713=Xa~p>UdQq0eu6i$_I&PPT z9C(F=F5eVay&`Hcxz`xcCMsYP6|nIf6t~{)1)_RZQ?rS=*~Hvz_}KA%q))E;or$_x zJr7N|kc>uuRJ?khiNc3jxg(%|3ippCDr6jie+dKG-p$-XW{$&ut;V-7 zzlCV4#`zqNiX-Jbii#zAPwW4L`)?)sk`dSGZ?yg&m}7FMH9i3Ql;_XiZvI9NXT&)* zkrC%zHY3ipQpO0PDn^`p_cP)S`3NIEx?36h5WT{Pq8tXA>^K7%9jFg{njX;j`6p-V*z<4#$UPi<@z=%uq37{zpXF75=#2O-97|lo4^xF(OU|-XX_v z069(p;|)YLjEJ+0@kXLGjEJ*|QG!24#Q6ZoaeiP#oB>!19LK_lI0cM|!!67PSwnOy P9IskIyix`63KaYw8SLO^ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-suites.o b/project1/cyassl-3.0.0/tests/tests_unit_test-suites.o new file mode 100644 index 0000000000000000000000000000000000000000..51ae29ae8b38becbf7cfad2c54ce7306b2439784 GIT binary patch literal 7408 zcma)A3vgUj89qsF(f=K+nbI-{>c;1=2 z|M|}UJpXz9cW?3e`ztCcs)TwfM3tz}0Ce989_W^&Rn&`GF>vMhtIq)+V&A6my;Ppe z61awS=-ru_naMuObo;EPNyi#>9jh6*$(^wFK_qgp&uVo9el2^@PJx;O>8K;sw0dsJ zmF5~I?uW*~32O?3QI&bQLoyES1}8sZJqD7SYRKh5l}=?rr_VCnZVT>ePC=&^WogXH z+6`dOT1)qoy3CiTbWV-$VnS2}Zp>;{gJ(vN1cOGr z@Vb@sen`lk+|h`={)& zc4uDp*!=XRg<)b%wd(k$+dsHJn}Ox@N_S!>efMieom1|S>3H^7UAiqlXqmZZcS}!w zPrE=3-<)dLHPz$#VgAVU#qJTeZ+lyB=hXCtALXN7`+&||rGv4z-nvXQY^TBOd##f( ztIatf`%bG!cB~_h{Qs!D6i}mKs?Dqc@%!A#IQEku;X< z_X*3u_Q~(G1PDTFhPKE(?(Vdnr^I)guJ&2-SMzN&Sd~pdqezjSWo&kC z(#Z*nrv@C>OsYx3b?+I)68H9ny5t)kny``(&P_SjOn#{{JG1b8^V0)E`qZPzK5IU# zV51m3guNuoH0EaqD`ol~G_Xc^`XC^A2r1vlpFD-q9hfc|X@McnoAf+AB34MR!h$>j zy_8N@mrhD?t>jgCrf3g~_I09tRGi1@Wqrt6(GhksnMj(EWMafjg_6-x$7~7L2?wmy zBL23Aomi?Pl!!-)Iz1duIMI;3!c3>4@gXy8M}p~?V@9Ge+iXeIiKIx!gPQ@Igqaw% zQy)fMrBu~;JH*gAyG=}5#*!h{_Rn=-;WQ725ql}MN)!T6XNOb(?- z?6{L^Gb4#)hygHKGntMRN;$!#Q=FlYC#lR9NqPze zd1T(Sw>in6`B5sS4}<$q??Qxv@db`KWMh=Yjzi8i&tEzf9KtLP2a|C-l`=Q=ul4(` zD;l7e#(+$3B#7A!7ctTFQuq=4U>qyO42Hv|Gi+n}hN2;JG?8@7czR?rQWl8?F?$Kq zGo9~`|*n;qc<(P`Xbyr7sduLj5y3AH5IFwp+h0pKn8Sn+V zx)(*F@nCGB*}6HHvcrhZ^!u;8j5-U2=t$bJ4hM@uU=NOP2Z)Z%sg&qIO6-m`>o&Gy z`Gjs19jW1zlXQZc(b9BmMB;GJ3Bpc-l+4bK&ZT9zBp)9I=75Q_NK`8!e$!rCrvQlj zC<3KSZJ}E{-6VtwCPm4k9FNY`3ZqJp&(|Svl4_G^dyQyQUd!DFIn67Uy9R*v7qb%& z4KQOR ze;F|Ub2wY!brAd;+Lpor;7Z77d_VBnz*_&8XfMReJkZ`=P_C_06}}DB#LGV_$bS}e z30`kr=ZL?c?ZbN}Uh?()en#SI+-07==f7Iq4ZH#G0>%Fx=&g9Mtf5~mc7fiD_jH8= zh;0gOFP>`g3gUkW*vn_Nco7(iv-rEfCNSfmy{mvX0MApHYm;S;=Chu@7g)#lFSPkZ z(x&7eM4QRi`m8D1@t!F8b3_P~kC#6~Tnye)tS<|1B_db~-2%T#d>?$uvYY>J{TH|z zZErrR#ED>VziZqA%(b9#2XF(h*8d{fe%Lqy0s1R`s@{ibrSMeANQyCnE_$kDWQC3@ zF}DEFs=`UaJn&%*Cu5;K;6eFI-e4JK?WP~{xj*$o{6`K+yxU($2Z99W36OthnSWIa%MuRNaZx=TSmR&c z+v5+c@9!V*4F(2#di}nD=m>5qMe;0!rEO#Qnr1gh&XmEhJtEqG#(ZsvS=5u91M#{D3(akgRCf) z3WSxiM>RelIE*@8<7FbUHHo4ck=UWMW6R<(5JJ5}b2`xTwfJHYDT%VPOLI6@>2V1? z#tz!&FdgnDLOkoG{J|7R^D*b^_iU1Y%KqD0!kwMLcn( zos34t`r$!!cB3;c%gLh7F2NdCcBHl>H=zCg(V~*$cY-&D#T*sGS*$yjh_&&kGZ-4Z z0x2F7MTIy5#z#fK8J5Z48jPYH8VwMsWzc<|wu0oxRr-obb#X%?8rKH;k@Q(N-b&*N zKrmg)<43w5F1HxiSk>)K;dD7*5bm+km6#SU_a!3L5#zGAF)q} zCx}tN@eU^cbz)r1JcEdNHqg!->`7xW{DRiv;yi;G{BuZG2+_@c)JrRg`-Qx-*#CK8 z#(N9-*t{+&ipaZ^+_#9apMOZaQi#V%R|)Y9X^#*ukX|grYovWRA0ca8B!o$dgZ^gF z+PU7DU|cT5-NYzHA0Qw29mTK1HATD*w91dV7_=6b;uiMz3b6tgsPS3c>!7ut7UF7R zjPC|e%5PymWWUV*3x(LO`tM~w-W{rcr|O?#Kd!##*$?|Kks{thivMr&aY@%hhWtiS z@S8~)2PpIQGVyxc!;m#DL!Av;Ye8P&`NSxc&Lu{?ox~^vdx)>VT}Qf3h@04N;_p6U z$lXu6L5PP*eL_4*KIZuaVthEfO^n4=f!tEw1f`!=g}aGcu-=FfSBMyKB^17ec%Bfq z5wAh5PYnGX3hyC48~%u){|{p5A62*#b6AW2i0eS9e=_j`)P$t1sI^Gv3(-r8;_?zu zuDd8H@^u?2>`syoyZ0#kGvd=x?-IlApB4VQ!v7>jTn5$#_3J>Xf2zXsiQ%_R(Thk? z`1g|!{~Jlq7h)S|)mkBLCB9UMuaXW3@dMCW6dXSxhW}l}^+NoC_!1$WBgQ!2C0>pi g8Dle6qqZf*#k~Tw79TXdq$qGNVL$9#Ns9gUe<-BG@Bjb+ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-unit.o b/project1/cyassl-3.0.0/tests/tests_unit_test-unit.o new file mode 100644 index 0000000000000000000000000000000000000000..acfbe44b08054d5bd8466e6863cf5858e50e4c9b GIT binary patch literal 3432 zcmb_eU2IfE6h2G0(k&H>Km-K5;-UrZ?Js}vK?~giaRJko5+z~1-M#JJ+U{=d-lfzS z4OvUFY5G9oi|C8d1Wino_+pGEXp!C1)w+pCvm zT_)qc2g&Gd4D$W)3BGpU)c^lv(+@P+Lu!VoVG!3)E+x1s-_*8}7Y#36OKsVFY3b_p zg4a|L-(FuaZ>^Yh`Ac`tUf~v>N}QYvg!3H>(~I8kr8jFoSNi+*PXj~6JL{^C!;BX- zX8M|nm&+RpHd5Rxh4r(CHq*>yH3iF{YaUxtr7m7sck1NaK=ICoC0To;Ei-Xs9*jmy zgVCl^JlcR6`^QWlsp6FleqcjQVDrC)4G=Cj@%e{%8fW`B_ocb7ZdO}JfnOIj(V>@@ zd=AGy2oE%Vn39LFE)mbpdwEF=7o72w^xDIPQR%nGZ7Xk!m2(WbjS_yUcpF?TkxH>-Mo{{7+q#}Ye&KNbQvw4HJWehkHup>1F=L` zciV`QvBq~8EyGx3%78o`A3DOA9U`V{kDH!-#uGD{otVH}#2n7&#mr*P^e9 zz^B_6t3+70fZ{sE89jiVP3K#OG4Dqby{|>eNB?0p z);a?T9;?zdD?g^~=WAEKJcwC;KE71{{A zfr2+9`Dq+Z?tPM`<-RWIi; zokD z*pIFVNk8~?Y}i4?_kn)|&Uw?nT7|ELjr<4rISckRE5h;(IGg5Mz{jB72OIT20~vcl z@ehHzu?Ckk0g``T!?_o_(a+lHM$Wy^jr@WpK=O-fel(N2HGF{%)#%?@BHYACD!(jN{IfTmi4rsO=>uQv&WL(=I&zbxKZ&FYMT*%$*AND(q6&t+1n=ahYUp zDtLRexl3}clkrBRC+7^}u~YV4atM!Hm0`CG@NKKI?2$>!@e*D#mvC(>H6=MO%|T+K zfCnTop2ahvP04H~m7u(A2}FgAFY_O_L=aw9B$3RsWi0DtYF)I+VU%((nd@KX+YVfn zJp8tA>2q!SKO$0Cx|^-6!Jn`;PE2KUczaXg4=i^S+qnk4(FpE`NR!AD;NjNbehhC5 zewSe!n&YrX@H?{TZx8Oc2rjOI(oYkie~$?LMPLNi!U*00e{}tzmPl~)tJ1&V2 z$e$AVm>hXOBS+p##4RG<(T>aa8u?a{U&tevCpqHo5mBT%)FOgQeie{*1IRjdl0PeQ xg!nY(MSM==wDMmde@5hU#plRdM1EC#fqW-&V-4Z$B3psX+e(g0aW63{@(-7d$BX~~ literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/tests/unit.c b/project1/cyassl-3.0.0/tests/unit.c new file mode 100644 index 00000000..287ad3cf --- /dev/null +++ b/project1/cyassl-3.0.0/tests/unit.c @@ -0,0 +1,132 @@ +/* unit.c unit tests driver */ +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include + + +int myoptind = 0; +char* myoptarg = NULL; + + +int main(int argc, char** argv) +{ + int ret; + + (void)argc; + (void)argv; + printf("starting unit tests...\n"); + +#ifdef HAVE_CAVIUM + ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + if (CurrentDir("tests") || CurrentDir("_build")) + ChangeDirBack(1); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); + + if ( (ret = ApiTest()) != 0) { + printf("api test failed with %d\n", ret); + return ret; + } + + if ( (ret = HashTest()) != 0){ + printf("hash test failed with %d\n", ret); + return ret; + } + +#ifndef SINGLE_THREADED + if ( (ret = SuiteTest()) != 0){ + printf("suite test failed with %d\n", ret); + return ret; + } +#endif + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + + return 0; +} + + + +void wait_tcp_ready(func_args* args) +{ +#ifdef SINGLE_THREADED + (void)args; +#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_lock(&args->signal->mutex); + + if (!args->signal->ready) + pthread_cond_wait(&args->signal->cond, &args->signal->mutex); + args->signal->ready = 0; /* reset */ + + pthread_mutex_unlock(&args->signal->mutex); +#else + (void)args; +#endif +} + + +void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread) +{ +#ifdef SINGLE_THREADED + (void)fun; + (void)args; + (void)thread; +#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_create(thread, 0, fun, args); + return; +#else + *thread = (THREAD_TYPE)_beginthreadex(0, 0, fun, args, 0, 0); +#endif +} + + +void join_thread(THREAD_TYPE thread) +{ +#ifdef SINGLE_THREADED + (void)thread; +#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_join(thread, 0); +#else + int res = WaitForSingleObject((HANDLE)thread, INFINITE); + assert(res == WAIT_OBJECT_0); + res = CloseHandle((HANDLE)thread); + assert(res); +#endif +} + + +void InitTcpReady(tcp_ready* ready) +{ + ready->ready = 0; + ready->port = 0; +#ifdef SINGLE_THREADED +#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_init(&ready->mutex, 0); + pthread_cond_init(&ready->cond, 0); +#endif +} + + +void FreeTcpReady(tcp_ready* ready) +{ +#ifdef SINGLE_THREADED + (void)ready; +#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_destroy(&ready->mutex); + pthread_cond_destroy(&ready->cond); +#else + (void)ready; +#endif +} + diff --git a/project1/cyassl-3.0.0/tests/unit.h b/project1/cyassl-3.0.0/tests/unit.h new file mode 100644 index 00000000..f20f52ff --- /dev/null +++ b/project1/cyassl-3.0.0/tests/unit.h @@ -0,0 +1,64 @@ +/* unit.h unit tests driver */ + +#ifndef CyaSSL_UNIT_H +#define CyaSSL_UNIT_H + +#include /* thread and tcp stuff */ + +#define Fail(description, result) do { \ + printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \ + printf("\n\n test: "); printf description; \ + printf("\n\n result: "); printf result; \ + abort(); \ +} while(0) + +#define Assert(test, description, result) if (!(test)) Fail(description, result) + +#define AssertTrue(x) Assert( (x), ("%s is true", #x), (#x " => FALSE")) +#define AssertFalse(x) Assert(!(x), ("%s is false", #x), (#x " => TRUE")) +#define AssertNotNull(x) Assert( (x), ("%s is not null", #x), (#x " => NULL")) + +#define AssertNull(x) do { \ + void* _x = (void *) (x); \ + \ + Assert(!_x, ("%s is null", #x), (#x " => %p", _x)); \ +} while(0) + +#define AssertInt(x, y, op, er) do { \ + int _x = x; \ + int _y = y; \ + \ + Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%d " #er " %d", _x, _y)); \ +} while(0) + +#define AssertIntEQ(x, y) AssertInt(x, y, ==, !=) +#define AssertIntNE(x, y) AssertInt(x, y, !=, ==) +#define AssertIntGT(x, y) AssertInt(x, y, >, <=) +#define AssertIntLT(x, y) AssertInt(x, y, <, >=) +#define AssertIntGE(x, y) AssertInt(x, y, >=, <) +#define AssertIntLE(x, y) AssertInt(x, y, <=, >) + +#define AssertStr(x, y, op, er) do { \ + const char* _x = x; \ + const char* _y = y; \ + int _z = strcmp(_x, _y); \ + \ + Assert(_z op 0, ("%s " #op " %s", #x, #y), \ + ("\"%s\" " #er " \"%s\"", _x, _y));\ +} while(0) + +#define AssertStrEQ(x, y) AssertStr(x, y, ==, !=) +#define AssertStrNE(x, y) AssertStr(x, y, !=, ==) +#define AssertStrGT(x, y) AssertStr(x, y, >, <=) +#define AssertStrLT(x, y) AssertStr(x, y, <, >=) +#define AssertStrGE(x, y) AssertStr(x, y, >=, <) +#define AssertStrLE(x, y) AssertStr(x, y, <=, >) + + +int ApiTest(void); +int SuiteTest(void); +int HashTest(void); + + +#endif /* CyaSSL_UNIT_H */ + diff --git a/project1/cyassl-3.0.0/tests/unit.test b/project1/cyassl-3.0.0/tests/unit.test new file mode 100755 index 00000000..bec2df7f --- /dev/null +++ b/project1/cyassl-3.0.0/tests/unit.test @@ -0,0 +1,228 @@ +#! /bin/bash + +# tests/unit.test - temporary wrapper script for .libs/unit.test +# Generated by libtool (GNU libtool) 2.4.2 +# +# The tests/unit.test program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DNO_MAIN_DRIVER -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file tests/tests_unit_test-unit.o tests/tests_unit_test-api.o tests/tests_unit_test-suites.o tests/tests_unit_test-hash.o examples/client/tests_unit_test-client.o examples/server/tests_unit_test-server.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "unit.test:tests/unit.test:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "unit.test:tests/unit.test:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "unit.test:tests/unit.test:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'unit.test' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/testsuite/.deps/.dirstamp b/project1/cyassl-3.0.0/testsuite/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po b/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po new file mode 100644 index 00000000..dbe9f075 --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po @@ -0,0 +1,283 @@ +testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c \ + config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ + cyassl/test.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ + /usr/include/i386-linux-gnu/bits/wordsize.h \ + /usr/include/i386-linux-gnu/gnu/stubs.h \ + /usr/include/i386-linux-gnu/gnu/stubs-32.h \ + /usr/bin/../lib/clang/3.4/include/stddef.h \ + /usr/include/i386-linux-gnu/bits/types.h \ + /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/bin/../lib/clang/3.4/include/stdarg.h \ + /usr/include/i386-linux-gnu/bits/stdio_lim.h \ + /usr/include/i386-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/i386-linux-gnu/bits/waitflags.h \ + /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/i386-linux-gnu/bits/endian.h \ + /usr/include/i386-linux-gnu/bits/byteswap.h \ + /usr/include/i386-linux-gnu/bits/byteswap-16.h \ + /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/i386-linux-gnu/sys/select.h \ + /usr/include/i386-linux-gnu/bits/select.h \ + /usr/include/i386-linux-gnu/bits/sigset.h \ + /usr/include/i386-linux-gnu/bits/time.h \ + /usr/include/i386-linux-gnu/sys/sysmacros.h \ + /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/ctype.h /usr/include/xlocale.h cyassl/ssl.h \ + cyassl/version.h /usr/include/i386-linux-gnu/sys/uio.h \ + /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/types.h \ + cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/i386-linux-gnu/bits/sched.h \ + /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ + /usr/include/string.h /usr/include/unistd.h \ + /usr/include/i386-linux-gnu/bits/posix_opt.h \ + /usr/include/i386-linux-gnu/bits/environments.h \ + /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/netdb.h /usr/include/netinet/in.h \ + /usr/bin/../lib/clang/3.4/include/stdint.h \ + /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ + /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ + /usr/include/i386-linux-gnu/sys/socket.h \ + /usr/include/i386-linux-gnu/bits/socket.h \ + /usr/include/i386-linux-gnu/bits/socket_type.h \ + /usr/include/i386-linux-gnu/bits/sockaddr.h \ + /usr/include/i386-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/i386-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctls.h \ + /usr/include/i386-linux-gnu/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/i386-linux-gnu/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/i386-linux-gnu/bits/ioctl-types.h \ + /usr/include/i386-linux-gnu/sys/ttydefaults.h \ + /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl.h \ + /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ + /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ + /usr/include/i386-linux-gnu/bits/signum.h \ + /usr/include/i386-linux-gnu/bits/siginfo.h \ + /usr/include/i386-linux-gnu/bits/sigaction.h \ + /usr/include/i386-linux-gnu/bits/sigcontext.h \ + /usr/include/i386-linux-gnu/bits/sigstack.h \ + /usr/include/i386-linux-gnu/sys/ucontext.h \ + /usr/include/i386-linux-gnu/bits/sigthread.h ctaocrypt/test/test.h \ + cyassl/openssl/ssl.h cyassl/ctaocrypt/sha256.h \ + examples/echoclient/echoclient.h examples/echoserver/echoserver.h \ + examples/server/server.h examples/client/client.h + +config.h: + +cyassl/ctaocrypt/settings.h: + +cyassl/ctaocrypt/visibility.h: + +cyassl/test.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/stdc-predef.h: + +/usr/include/i386-linux-gnu/sys/cdefs.h: + +/usr/include/i386-linux-gnu/bits/wordsize.h: + +/usr/include/i386-linux-gnu/gnu/stubs.h: + +/usr/include/i386-linux-gnu/gnu/stubs-32.h: + +/usr/bin/../lib/clang/3.4/include/stddef.h: + +/usr/include/i386-linux-gnu/bits/types.h: + +/usr/include/i386-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/bin/../lib/clang/3.4/include/stdarg.h: + +/usr/include/i386-linux-gnu/bits/stdio_lim.h: + +/usr/include/i386-linux-gnu/bits/sys_errlist.h: + +/usr/include/stdlib.h: + +/usr/include/i386-linux-gnu/bits/waitflags.h: + +/usr/include/i386-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/i386-linux-gnu/bits/endian.h: + +/usr/include/i386-linux-gnu/bits/byteswap.h: + +/usr/include/i386-linux-gnu/bits/byteswap-16.h: + +/usr/include/i386-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/i386-linux-gnu/sys/select.h: + +/usr/include/i386-linux-gnu/bits/select.h: + +/usr/include/i386-linux-gnu/bits/sigset.h: + +/usr/include/i386-linux-gnu/bits/time.h: + +/usr/include/i386-linux-gnu/sys/sysmacros.h: + +/usr/include/i386-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/i386-linux-gnu/bits/stdlib-float.h: + +/usr/include/assert.h: + +/usr/include/ctype.h: + +/usr/include/xlocale.h: + +cyassl/ssl.h: + +cyassl/version.h: + +/usr/include/i386-linux-gnu/sys/uio.h: + +/usr/include/i386-linux-gnu/bits/uio.h: + +cyassl/ctaocrypt/types.h: + +cyassl/ctaocrypt/port.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/i386-linux-gnu/bits/sched.h: + +/usr/include/i386-linux-gnu/bits/setjmp.h: + +cyassl/ctaocrypt/memory.h: + +/usr/include/string.h: + +/usr/include/unistd.h: + +/usr/include/i386-linux-gnu/bits/posix_opt.h: + +/usr/include/i386-linux-gnu/bits/environments.h: + +/usr/include/i386-linux-gnu/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/bin/../lib/clang/3.4/include/stdint.h: + +/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/i386-linux-gnu/bits/wchar.h: + +/usr/include/i386-linux-gnu/sys/socket.h: + +/usr/include/i386-linux-gnu/bits/socket.h: + +/usr/include/i386-linux-gnu/bits/socket_type.h: + +/usr/include/i386-linux-gnu/bits/sockaddr.h: + +/usr/include/i386-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/i386-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/i386-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/i386-linux-gnu/bits/netdb.h: + +/usr/include/netinet/tcp.h: + +/usr/include/arpa/inet.h: + +/usr/include/i386-linux-gnu/sys/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctls.h: + +/usr/include/i386-linux-gnu/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/i386-linux-gnu/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/i386-linux-gnu/bits/ioctl-types.h: + +/usr/include/i386-linux-gnu/sys/ttydefaults.h: + +/usr/include/i386-linux-gnu/sys/time.h: + +/usr/include/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl.h: + +/usr/include/i386-linux-gnu/bits/fcntl-linux.h: + +/usr/include/i386-linux-gnu/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/i386-linux-gnu/bits/signum.h: + +/usr/include/i386-linux-gnu/bits/siginfo.h: + +/usr/include/i386-linux-gnu/bits/sigaction.h: + +/usr/include/i386-linux-gnu/bits/sigcontext.h: + +/usr/include/i386-linux-gnu/bits/sigstack.h: + +/usr/include/i386-linux-gnu/sys/ucontext.h: + +/usr/include/i386-linux-gnu/bits/sigthread.h: + +ctaocrypt/test/test.h: + +cyassl/openssl/ssl.h: + +cyassl/ctaocrypt/sha256.h: + +examples/echoclient/echoclient.h: + +examples/echoserver/echoserver.h: + +examples/server/server.h: + +examples/client/client.h: diff --git a/project1/cyassl-3.0.0/testsuite/.dirstamp b/project1/cyassl-3.0.0/testsuite/.dirstamp new file mode 100644 index 00000000..e69de29b diff --git a/project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test b/project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test new file mode 100755 index 0000000000000000000000000000000000000000..c20502cc98205f16fc8e2cf4c72ca65a30e41197 GIT binary patch literal 53262 zcmeEvdtg+>+4lqjt{B;XsHj+1Tr}7a5{MWnVgexq4G>90yl$54hK=U3Cc6-9w4s|I z+hsMah*-77OTARASSg}X41yr77raw%P;cEBtavG6Rr39Q&zzGzd&IZj`@VmC-yg0H zGryTR$(A>5MF+?X>?m$5F(r_Z_o|LSp& z=Wqnp9fm;JvHYl)KRK@S*JbxQi|^Wc{sK%P95t3lC@B%?Q6n zm@@6vy-&RNtJXE=z1Owts(B+Gi+?(}=jBfZqbT*~NW!5=zD9<|kN7xt$oLUIb(o2i zA};1Yj305mjo%(y`N=l^<8AyX8}sKvB1?=x=aBz08~<8c{eRo~yVlnJR}`A@BfktA zo^7K)!`A)|8~@L2?QgWz|AVdk6I=a})}N)e@!V>Y&%L(#F&lo| z#_vr_Imh?1Z9G^G`+gj6o2~y}^_6P>GRr34**5y+HvS*k@Om5lV>Wxa(b8Y`Ct|}7 z+xWHF`g4wr-)lDg544qc+4}Q^jsH(9<98u_x2?Tj+4zmKwRee4pGVv354Dxgwc%53 z{QBAO8cY8uulY84U1;my5ZidawT<^CTmNQT_`8sP-GbTP6Sn&A+S>oA4Ue_8KgwpW zr`g8;fUW;~ZT#li0w)Q95>K|w8&kexy#t)F(Om&>P6REmBe7vea zd+&dVy)9%jL^;*U6#C=U5iI{T_P_WIRY$095N-v%#@Mc54_Up~+uU5o4dfZhGox~* z$LDYIFQ{z}`I{7kewqDi-E>#(ApiYW)o%PrW}BX!Nn5qN2>x;9q1W7x+US ze^XOqlbPWQ)iryVTODp{V%1P>y}vOWQl<6Y>I;HCZ^&;YHPcfo=Xsh@YoWiXwq~)K z={uvOw!vFx7B~65(t5G(S8A_{1Lye{7yGLleSS5k*<0RJyAZ7)Lk2UWp*Bq=JB4?VRLlsN?oJZXY>W>YHz5vv7uSbnKj)r-QVDE0{bb*zS88# zDin%vtni1>AEwFN>_$nG-;d6*1j06H0wz1;mwRjbq(}im6wPSXY@-GY%(N-31x=0N zAe7VG>|Fr;a;QcdQv?3$E9Zn8Dj|I|7OHJn(9GJ0k{_}SxsHPln$WII-=b4$C+PP} z7d4kW8#SAU;uMD}Ix)M84pi0$i%U&xcE7qd7(ionFlMuetY^AYDt0F}P6pk<{Z)&WD!bDlHOH~{wT3}Ueo!{FK z4vP60?HN6zO<)#VZNltqwZAD;TT=@=^?RxV9I5o#sHmr8V{$4Q`IPk`7@CG=*u-}% z!gLL(1+Y6xVXmIPW($FE$k({2&xQ}xU+F3O+fXYm;=5xu9f`IU%M6Duj9IVecdB>c z=)%pgdrw1S!+dkL_8EGr3o-gT-5;7g{|fkqirTB8a&e001U3d(QM*8fV@`ooKIn+i z3)8un)n#rrEHLaG)|Xn5-cfrzu+RxirPLA805CW7U{lcb&_ ziw8Ol^<@cZfK^0%OSHH|@kgTh!Fs_TP{o2mm%8V46cL|A!I z?62bzBAisczn&yDP*5`o>p*}!SRfJpSMzHde5yL&gNG-v@bz(3tZjf&y*?jm2g9h% zQnXT2UDw#`M=K$Aun}Ia-b?4An*8;R3%S@=hZYC@p7~sz6xt0mHizaf7XJoRy~w9( zw6DZ$#?pyAS%+(U-o?rrYOG}rSxb%PI=^2=%8q&9kLOn#`v`hX)!Yz-orG$X$B*UP z3yS&8&6)sN7}(fAW4(Xul>w|Z&0`leHeES3*wn~rlsC3ob}wVb=j7((j%{wL9-9O1 z&1!ntj44w+<8t!)QsZ$xX6EMhrN(n7#M4N9-lex=dXv^qPQY|I|4mY`JYAn7rsT5* zIas-v8$PoIRxmexdNZ4>ku1?v!H7Wp>VGkIfMeh^r4BHjqtrKyt8nI)JHT-m_UW07 zF}z`nF^J)evHu;x7=m#zM*rQ6(T^;~XgixRdY;Sp2%JAN&QPj=F-ACvF}BWyjGZ{6 zWQ;+SGR8%38Dm_mlrzSGbR}aPy3S*Kv{IKcK1Qi3#>Xn*M zpj3$Q2&GyWpQuzT;~(MLnej*lL#ekIPr#W!<1=x6!ni=G1mm-C-p+WUQu`R=g7^!@lb~nD zXG717C&R$<5TApY$hZ(^^Nfq2f5uawf5uaxf5yeoKjUf8KjRYUpYe3)pK&Sl&v*v( z&-h&EpYeInKjSj!pYcrSpYbf{pD`|2iy4CXIu;YGrj`)XM82}&$tfyXIu~cGj4$X88<@zjDyfWqNFXF4=-k>tF8~>9FG7Q4ajeoZe9xNI@w|b?-s7-cgyvEbHDWco=aeahKrX#PAxb zd#&IR#4h61f?dQ}#GQiO#JR+6g0qM*>r{78a5ixvah2d);!@&r!TH4H#D#(jh+(~| zJ6G@|;woa7;6h>!s5?_|F>#Ps2`(juHK^`=2az$VjJS<>kKl6RWyCuLR}yy;cL|HcM>~@cM4uXoJrgzcop$* z;g0^mkVA;Tuxjlcmwe~ z;#|QSiK~cRg1d+V#F>J(5(kNu;Ae)_ zQsULbs|8mP-$&dj*hjpUxJ__?cmr`za2;_Mah2d8@iWBbfB z*9zvYCg37oEttETKo)VQVD54Pxx{UPx!Va85C;Ww*Apltt`f}MPoR{zTrhV*fpX$P z!Q2f6<`L%#=B_AEMeGvH-BBPwoGF;Qq(G2Z0q1>udGzm*_xF`o&Ixqkeng-g|C~QJ z(E87GN8%wkh%ah7t^dVFxVKpGhD&f0WDM_&L=FsGl(vNnxx!v+{{_(xB728#Pj|Dd zcjt~R@%1d)Kq&N^5A=&ZwfUoy(ssUhAe^@4ajE!{SutAdPB$yRv|~$je|#gZkd$gW zTkgVyj}rclL@QLbZ2j+EGk?zH)(%IdNe``8BD=wTH z*_+Ajfx2YLmJhHSjkUU6+owBF+?&{h9YW+lKWE2vSRWDrIEm=Cj{VM#y8+{oJ{ zM$_GiXE2Wve1Jh0u9QOcf-Zc3g_|I5UC4zr9&s6k*R${s1I)rjQdnpdUd6%>2AYL6 zQdngaR&?+`__@gUv!Eg)XD;9u~gPSNI8}9gh?mg;5qhGQ_O;juciI zg>@)|HmIM-*38R2mu!hg65G)v>?0nT`7mBk3m8jE3Bfc*OBc zZ*MoQ7nFu45&panP5|s#sEcMYeT7c@n7&-6f6DY6oxX|b5}jVd^hBNB!gP*KzrplK zo&J>RV|3cF1L;9JeG<|sqe!^W`)Iy9u>te)0vP6!y>FqHrftqxMxjm6wOsMYM4fWS zTisa@Ko;yzAJmRMui`~U2D?MJ*lxdo! znx;G+d0M9`K{JmR{fIBsG_UEBs(9qIzX%^6%H$FSah=e#yW3EOljWxvjD%$EE z5u1J>=8TrP9U=&WXnS;$J5h|aIbQ4zMz=v)>CBlAea6aAr|6sL3#5mrz~4dsi3`BB zqboctJ~J)y^f!_1nR#82Z_}gCU3*JU`j>A<6HB&IlrW#mwrI&d%UTGW^`GDxHU5Z5 zHssEXM+)>PhJpKVL#iWiYy_#!)FrNXWT{TE2U!IuL!7N?-qa0}zY@0u_mM!H%MJIz5ciEBQj?mMwB)D~S_77rAA|z#x9^myp_5{jdE) z&%hYk_;S~htrU|*Y8zPxfl_;{16_DRq}EEQ#q?-Xq~-#tRcd*9v?)>(nqqf3jbjsr ziP2ty$k~At0gf??djrZ>4?5(|?Kv`b&4Ji7)r-8y)0r~lR=5L$$qvorVv6isT8~*! z1$lt`MJ&jRP1|cRB6cE?DY6b{a`5p|5k}gzE0V(C=q5T|(*MKNif6gzof zE7mBCa#-}Av7BhOJMj@zijieN^N#4hVkp7*=Rvxthh+$TZqWidpK`bcHWM4%Hw86i zV!fs)C&eYGUP@6JY!b))OT;*vg_C0?-xy`3x(PiWpB4t;6XLTmAJZe-KZbR}xO)3V zUvOSO3rj1e&XK&G7` zQ)Aj0GR3qTscDKKlTt&bGVKhR?$k0JVajwREF(pxBOr``Ayaf&CETBgP-amm-;pUP z6Z192OjD+nhTNp^X_J%nHhfDi%JQ*>yWu-rSbwr3|321vQe(T)y{{~3!st2QOJ)?r!&bwi@As$sCOH>!g+$4(QS!yU=RikT4(ukmOm|x7<^6; zntidKeIu=~E}Y^Sdub@)iC~={EBvCb2pu|JiqI7|d}Wq%+Lz%GSPiq|=YA}!q4WAL zAt|h~Sm3|h)zdG!Z^>3_-!j3h3&CADCyzgHCS?!*8-HXhQ(S{Ky6=Nfu%yG~V1Ets zNz)GD@6ds><0<6CBgc}u7`|MOeiEg|5$IaOS?d9Gm#l?p$UPjAAxCjS5B*c7!ya%9 zhaerJz5|W({S1uS*feDbtMZQ^PTiW(ghTQjJ;G);*^G%t&e5Hs8ik>(B%1OaaENa1 z*sz!@rjy{BX)M&OBp_Lq1gbsi`MP(`&!h!K?b*&L(()NBPJ;$-GInquT~Prr#BP2 zn|k=Wb?a}l5Q6%xMNnjA5!9bRDS~>7JrzNL!eT>vVN#}`Jgu~a<_iq$ZC^dje8XdEZe#o5I|fRhUM{eRQH?v25unqD*b|Xu*c#Y)Yb+9SpuW`Q% z8;JslH4)H#{2RHu(Z}I32rX|H2XUBb=DSS3WOex^#5$@)7fqYB9whW`)fN2cNonTmQe2trLm6+m$Ao~pXH5$h@_IfWmKm(=_ z0guGkA+203)5Jk?4q+0|bT>*Tkdz(3je3%!3o!95)K#*RtYUJZtr=CSbQK5#RXS0H zSECf+nOY&ZE<=GF+F}2M0Yfjtz$Z9Bk~I8wolEX~LPsoF?}%gsu*x1Ra?x!lZ?Q1o z^emQ{(`qu<=;oO%2L=UmDwt#bJsE7?@E3F@?Net5^$^ny$ChiRW$xke_n{|=BwOUo1gp4YXdQyb$NG;12;(RlhH9$AZ- zB~zx|-N-)4gDoby+y#;t9a2@SG#yc0 z&0`CGj5rvNeN9G`P3%3L8WE4Zpi|tXRmzNrRl`SusyrUstjl<2!iH(^rMF|~@f&^6 z7Em^8APyNZb_Rl7Mx1ZNxkg-U#90QnNd_*IxX=OKy*-CVUrV?-p3h?AI`)T;-5$9V ztqFy^X0nNudz`T+nBCDE8qju*3YYyPrn6Yg?OH~bx2>yCzq|Yx?3hX+eb0kk~T3sxefbDbZK6A|TG-hFOr=J4*bQZov>vosHv@HoL*Dt-K^2ot=5 z-3M|1AETioQQeCT_u4}xxbe{jx1 zb=7?{aw7DUP0WRZfqX;m(#XNv!^0x2?pCz{o$TF26Le17*K?HQg)$-s`^)v@zR2?j zkyWfh*!fl7A;yJ6{cN4Wva)Zr7);{Dcf{B_Zilf&w)Kk~9N@fe7d%v~{gD>TGb%F? z$CX0Q$%(nU5gnh{jmh0}R3ZyLrzaz^8TESxB(4StZOzLY9dOXUejDs%i*+$_U{-~= zy>v7LC>DMjN+So-oE@cXwbeaI#p>MUAqTBLh_wpzmALSnhN3JLnjGDRj1gw#hu$C(9F%q<2eJkC=ssu1L0C~o7X%jyj{*<3!2?ppj09;ldJj^z=j?b3#7DrV zgomRaCJAEMoFs;$&$x@#-lZ4bx_G<06D*?Q7d6Q!kbLGmT^D@j9D<1@a0TcD&I5z% z-#{nxy3muBj*p!eb~#6D`tV6LSX{}nALSLS+1%x*!O;aC)l%KK!={{@u2G35N=NN4 zZb?fI|M>eWaJ^jw1))A0@0rJpdt{Yxw%-ejij`)>3NtZ5v2mhMFd7nKGzkynYj&XH z<769VXTnFIpCsl_o83^Wv}mh6nbsU?1^XWsB(CDpK*Lzpi-QwN*C>TDRpKt{mew8i zq7h!;vJ{<@Yh9ktie@q?Z?+(H!2`Pll~{S%7Uh1|YoC6USiu=#LEP@wbrHtM2wfv2|W2Q3RbRiT;!QKb7Nn8b;XuG46V5 zP1YI~xd)_qJ817GLdFnHopaOV#21+5c{>dIbG8p;5tjLx#^j#`HrO-0kGipP!@erD zeMK|eiGk?fW7JspbNEMiYV&VHCL0S)XCpUQ8wusJfxVDCz01cK2^wez{h=E89d_8# z0Hh%Er(-|Om+bo~n(xn%a<=E--;N#5jy$r#@&E}Y&ZTa#0Yp~!arh@OA7e2^b{VWv zyYKDjI4WWL63civ>gcY<4L1%XwZT20(G9+fRLIq_Bd+&I;nU3a-k|K;MN~aQ(MQUR zKZ7vd?%o3=?n<9fi21fdch-r;8D&na;p8Y2>mDrR_K9^aMAOaQ#3N^MtH3EA`2bgd z9Q@nZe1Hvxjrj?4w2oDtw?PLf8UC!zGs|rL7SrJ`JM9q7{}mU%V8SWMN*JCoJO9fG z{X1OMc61pcaW4BCW;tq7ogx_Rq(v}a(>Y^aZ|3EKF^|7Q9*o+hLdPO1Q=!b5d2EMC zyaNJ3cD@Q-j5%$JD=~%puvG8QB{p$9#6sV45(al9&!y1=E?2BbXO#HLa6a5cMY|LH zOB_8z=q>hO5VF?YsQcE!%uCR^*1`Lk)pKG;*W%;QK7~l0iDC#*o*a1)I}q^8RiU|vTJaD$Co(TsxBc_+;ts}{ z$kn1Oz_|Oyv)2%0KD37X%9!C5^T8i@o-9w5Y!Xe+V=S$N9Tdh5Btm>47^7kf#ruR_ zmvZ4fPDWRS8Ve~I81v>VG->$GHe|y~Vn@^Qaj4X}DXgTvcAUYqboex|A1+dGw)1bu z(5Io&p?unlkZ`I`lO>sL7(NXtXZxf0mp<)r#N>W8M~+zw*nJNvjEx2aXX}~^{jhcI z8g1g1T>C#XE&h*X#-#pI+ppX)rAZvd?jhdI zIZFu}US~I&VE&hkVe5^g)8*oCo zlrI_~f#H)gxEJ2TsMg}e$aNW`g2h}q$9tj%mE`~8c6ml>@QD{Sv z!-;+9SLDDDXU9$8qWhg;PSO?ZvtAykL~(3gU%^^!c6$%rI(k+ua%dFg~r*zg-VX3B>#Ys|Cr>< zv6SRz8~waP@~aH4pTlBtkI6tE2>w@+fXosN8U3wf(2r4wtgMvB@^jkq)2KuF- zeFlmM%B25;G{S-k4YU9#!q;~637_1Bd>+mrJ7EZXj2B9V!A`~yaQUOBD9aKXY1-S7 z6MZMa=NKd3ra5og>}-F46Z7AZcMnGX-7oqt9C^BMDTTbp5!ABHFTaah+V1G)&0n3g zx%-5)&GEuC7|w{zUk$)zW>$QidjrVuI7`?O@90D?F{3+zy0_7u#G`tuWn&~jXTd}| zx*lV9oTZz=CKu|>C(P@5%!MfWd35(TpFe=R&RMZKxBKulE6Cj_l$%svqWJK-6$L1E z#lZkfGBN&)=%w%&@5Fedpbs@sPoc@BkOP|JSVCjr5=Mh03+sZrV|hDyKSnPfKDsZr zti9kdT2{DU-j4m7`-NvkzJl{wg&dF=!*~gkucPZp)^xU~^@?XOiXN4s(3MGIKg15# z8T}isBYP^aNz29#6CJx9XXeqb(EZ`jjK0kh^64L=+u`GeQ$3-f(F2h^2f2T0znL7M zqV^r(BbIEX>b1Y=;DiOE^mvD{`3IYKa0+gCNT47lPwMl%1Ms#UI^)XQk7Lba%>vNyvt#?>Un;{+*< zwA&his9fN68ZH%2iIwg<>nrCJiX}ZB*hgc8{LphFco*spa~tR+4AbZmNhJT{6`2RGR` zvgr^U+29DS^^DkbM?AKMwyjH1e*_IHak8f3GeIt9;OY-WWZg5!B#I`WQ#TAI1LlQf zHj;-U87s`Fi3R&5o})dW#WOg@?YOhc=?XExTEGI`Mmtf^$YRQuJW!A*V8c(#J`i&u zF&cGnAzxUX9x9GU#Iu4U{Ru3vo%^VG8J_w$#AW>w0{g9;DdBo|QG3Ng3Y;urG+Y^w@Qc4b`vcGFY ze`HZ_#cdk6vtCjoUVz&nltBAN5F1NXH!9LPzNQ4X(_nbthSZON3on5-gCZVzlbWMM z^~Qp$W8zHkrEFFTyCHg2G%0Ysq7p|N6gLB4s!Ydd&l4`jHVJGJ=ZhLTKE8JJw&Lvb zR1E$YqTub;^Qh91y7S1+O3dBf+dKM`@MExgH`wq_QyEz3KBX&idl@9?Q%4qzv}Xng zvq6}FhwQair9eeg7|LnrRL{vt5(lpkwEr_nMsW~TqF!8Vfxo`kLP9RKAh#{FI50J( z7J-Z@y&prKU_BfR6X$?NnnC);ZO{Q8SyrJ8WVu;fg)Sq@rDE%3ieb_ZlTy0H#1xd$ zTF-@;wwH)0FWJgTYwVZ)fPwX#8joyc{3E;*0DsnVOgzGEQqN$$pW;T5I}D0GdB}0# z={_%)SdKAjf3Ojk>j?~-8;}z(hEcVjkD$y>r7}=3K2yyB_eQ)7ztx*HRd^|13%Rs%B+$LDa9Q^=G;%s&&vJ>pl7_7Nmrwsp= ziB8BhSR1A4rA1;W$I+~K@o)^L0vP4yb)kz~`FIK2g$Vb{^2Hk)UJ^yxo}XTuhC|Tn z{|OqjR{-OjlolSz+Q?DZ`xp$uWoy&gHVUul;liGW_Vb>WQ5M1@v|pMUl||YC^{GTZ zObpz~;E{P3@bqbwW_K)3CP^QCKCu%6!Wvf>kMy}1ElF`Pf7GS5@yIu3Yq}KTQ;8M2 z^zv=(*=&tBrS+Kz1hflQaaJPwsk5Dr=5-I&GA-z)h~g1tSjISL5hE{P?e3GMXeSN` zXf(&7sGEPm6V%M&>}q%84RVE2)NzbKGI8=2>TZllQ0%TZN>62Je<`gKpi{ zC5xoZ7g?n3l4Hb!N-7b@C?W^0c6RJwGmvdIh+^DfLQI`7X`7394P@UtlRLr8K9etn zt~fo`bqU{s_AX;~Iy+9s9tGZjvzo1qL~CeSeCIaQN;)mHiQVv$t@Ln)^X!CVdvfBD zYZ$|cz6KMb6HPFN6Q$Fn6D=Wz6aBSeVo4|Z2s&h5OixF1bfS^HlcKLhUogGs>o`}d ziRBm@4OgNIzUI3djpLEa#q@aE6Smlg+GxCn#<;C;aij4xHX3#Ak$R(H%}H)FmO{x; zaNiyXRa3SR`=O8qF+ z_$2wYTmfoaVaSrGCxZAq2gHM!Us)5Gtim~9GMw4Mc{n)hB@`Omhh+hD*x41kN9vn? z10!1}87h-?4XWWe0ade_s)K5}%t_LBh(8>?F;%k$6Gg9Y-&oeSvnx1v*K(%ox%+2y zNDt5<^Un_!FrZ8vEvUMeNlt~c z{b%IYgZrZvjkvmNkqg=^kgD!WHOQ5UvjHrmBf2N2X5@E|(d5}e&c8)LJs8@?Z21hL zqwRDL&~(K@ci>xTP*(fy9u2CbIcne$j1QQZk=TUZ;t`DN;J|2A zSM%OB&QRV-9K8_@$nNSYToOB{Z8zxnjHR>PIC}R*-|5~1IXE{BMDxDr+le8`P5f<}Do3DtpPw@VYBL5sBY zV?YXVmDTX3)!E>NR(FAjglLsXv?`ldh{G36cgI+L3oM@6?nUqNc64)jcW&ZSg}loF zwIt?n$3)JRqKMEWqc%+IUW}Y|`A5N_h!CPfDdL^PHlaUfVCSZ3L%C8fF={)))Orq`MCsj9xK` zUJb*zcd~lp>6;A6%c@3RDN;n(Sxx%cfct}$gz<7()d#D zzq?yd;ZP4_l(S>TP38A70ILM#kDb)S*0^bZ+!I>{{)uJalh7&qz#ZVlfmf{qPwgbB z10?rpb(lj;Oh)bKHe9Fcem|XVxY974fCzRC6eWW-1ic&>-l|xIvvJVIosnF(zXIDr z$~YrSy>7oBo(5G4;8o8jnH;o6K$|J)flzqu7;l7m>hed0{+a~7sf;VpXeJL zJ}9CJH#j&QO^S6|ZE}xe%?hdznlv1Q+~ok2=?lTc^g~XjKohq^z~+sPak$Zu4FVs0 zW)*I9u#UdbG2D_%{weo5W=418ZU_1maCWq#;}~4@>%{w*Tpe9c(52vEt%EXVWIrd_ zA&(~d8Kf^H&}H-)5cQN`S_GhsL?vuL`YDtpCnD4*_SlIWs&I=|QD|6nm%hmn-G|fc zcJ4&=jgF8zdN989Pj6#tok)X%QLsJe7o(L8$YgD2=+IlVFbF0dk;iYKpf?_t&L%!% z415LMgiy$%H^|w565Lj*H|(Cml>5hRVsO`Y{PFsqSAhCrQXYROhn{`WG`**e?%qxrD`))Jf1xf`P2&*=2VmsebHYbK zSWD3~91`gg6%^dpiDsQeJtqp06_3ch>G5APDfgzcm|QCNrf&dMeCc~{K{2$H_|kq5 zPfu%n>2$`S_)(Rg-%*{k}pdFUaUU25I|`#ka1Lw!CM8-)f49giBkf@)r2EH|;|BB@oQ z?egoyN(zH7p_uaw3W0EFZ)iZ@FTd`0=mnI6{6%OaejN=|n!nC${_DhLmgc`seDX&& zpT_3j{fbGsTmCwd)>~`AsSstv^^R~){8Z|gcgyPqeXLuiXOz3*U;cs2?03cgF1hAi z@$pjAJiU%b%)8=G2$gwc9gmoI#qW~*8Aig6H#Ovn7bCmu%{ob*xqv_m1Cid$-<-$y96l1|H@e~w}M=T4| zoW*03Zzho?>h_h_LH0|%qFaJ*Y{Jj=>4n8LBd!f~K*3>_Db{1ds| z_t6>jv3?A5z{+~YAv$|>3hS8`)(<@J-Oetsar_b(>f}PxH~cMP3+C`EEF3Qqj-k?c zB*9$zWn)W1Q9hvsk!Xgl@DL;aXb~2Z&qxVJ97kQN*xsf-jEkCfc@KtHb-c#GE)JNbG_&e{!^Ty)u zzay?38>$b+BgfDLF(J|0#M_WQMwZVJwY#4MD>UAPh=s#Ih{9(8DUH7|8zWkVJ{rA+ zTqqcJGgg?stuS3}S678=Ll!14K$8|G>@DCc+BQ=I0+=xbz z%a@S&#DLNLYmh4kgQV9d#x8J9Z2LWpX#+;3!lM$aU_`KmgzJ99xW`Zc^Ti!JV&9x|c%cBajgJIz&Jrjo4$LN{u#Zl&?{jM#D7Ps?iseqrSO_dLmV*QJ1aL zWwchdr_n1!v^toHA>|fBuC1V2hhp%13lUVj2N8cDpvAT$iQHw9Cx*G21jxD#F~8=5 zCuSM z;v8Z-`qY=@z~wNTcRo6!A8%a5V^JC*Z#3veU0{%S8AgS^v>}b`gyMZGEgQJ{kx1Hm zITDtEY|0eAvwyV2v1BXF12(q>+mYd>nf!gCjDn9#x$sDqn}1u&(m2{viS=S-!%@*{ ztM{@dY!woWbkR@~*WQOVOEPLA1$f#jUOIx=oIn}w#Q1x45x1=dbtk-;VY~bb)@%uD zy$!Z+l8*#=e2qI7S#%b4;ECZn*)0C11O(X~2jAF6_gYXS z-_EA~$}wyC)Gr>R!RaX$0^_L6p+L&EAuW|S7h~d;7L5U>!A*W*u5RU7-O5_D(sMe? z@F*zLKZ?^|aNwYQLoY`sYTE5oEhOazhb3D%5b*)>?ok%h#qYr4rJ%y$lH+1BQW3K>PVro+GJzk+$eg?YVmD-s_-AxpOW4%H%iN5t^gapI3` zJcwtnueyt_jxRWl-nRK*Kgjkp{dX{9d=eKIbr2$w;%s|YJVC<9_O!FU4DXI?9dXI! zp3AoM9NB68eZIx``{vEk;&`@b{e$M5TxoD|Q^K`%KG(u#S5vrw-ve>gdqV+NeQh)1 z>cAj1v-k{`{6hHFi>tdM+{S|7bJKIh`GdB6YEyHlZ(&tJ13P>*mdO*Q4_tD^#J8e)3Yo<9|5!j<3!i{lNz%!B3U<|M5>fc*!|${&miRmZu`Ok3ITF_g36;`Khaw zJAQ@trGW(-KIl62#*E2TXWcdF{fm6PCokB)_v2TNdvoAsb*{h0uS#oOmH5D!U;S!D z)729So)~e|7uO#+I`+-&YEi%&a`_rvi@mNz-Udvy#wJ%oV<>>nG2yNHjF!n)to>8} zkM3*88+6&D1?uhp_D{{-lt1UhVP(tS+^~K8zQiN@)e(pIsox*sr#|^+_Z1)XjJ@-v z&@r!m+P?d?QNM0otcG6JJms-9L!SHPUBCX~7kB)0cJ-&>m(`-l_y1@@+u)LpnHzd` z{&LB^qc1uHD5KJeTp>Jy|?_|fayZrStnN)=l1)IT!M zb1YWx438Gwb>?Lg)oXVY-Me>E!R|kM@m&woqP5jy>RBu~nKunPo5lG0p^INKa+NgI z;?qX1#+sTO)ihsKdmBy*x%eR`SI$^|9j$q+{@&J@EB%Xe@CC(eS2;ek*6gPzbn%N) zF8y^Z7e8f$$=jsNdcMH8-24L8>B}-$k?*1MjV9EnW|w>#(RH?Kly8vQ^3BVydw=!5 zy5{Q{b$?m#cYHc!)#E=u@6uzY{PguZhMs^`=dwSH zJY{Wv?_Dd8z52FwnZ4f6)X@*B^~dHdyxy*usg9e%+b>qJmR*KJ1xlFYV&7a%S3H8QW=d4ZpaovX5 z&YsV|_AG5ay5o_N=Pmv5d9(gQ{e$m3zG`9RxJ;S|d7Aw2DSG)0IXSQBeD76Drmh}+ z?ThUP21kAExUbFW5`ghZcUtQ>#vZNyW+1pDN-8ufRwskGYuVMO5 zwv0D*fjeZmWu^OWdFqn)J>`9C-}jgIErK?Z)TPi?h;gK@iH9t=ERNqTPhBOyTb{aH z9-=&D-TZEO>H?Zt-qxN|B&sO9q42XC@vitSxblnZnCbr%1~1n%Q&5L#6SJO)t$F{6 zpIJT|{1zcBGx~B9;yV!@GBD}3BK<1DhejUT`P@inUfvT==#0+^j#!BXMr!=TtBNRRMT=nd0=92;=+k_6N@HRPrP#C{E1grOe~vN z**JTmn&S1j@YzQfe6f6>gv#(Yiv7^vW*dtFft>)u9$SB*Chuy)-^@=hEMHbn)YQ zt~|qg^Bb%#?P^^dhKpZ{%yw1tgPxLhc^iD+@4q#3D-(Rhjvt0~VT}I^US6Z_e_B8I zHB946v&K%^{Kl!7>s`12l4`tiqH9z^&iESa!|Nabe8;xI*E~q2N{vEpluuJCtSPdh zWV=RzZ2GiH*Vx(ypT8w15UQ_pl~z`kkIl=;J#x^I*tnaYOf`E@A)j}3!G41HpsgP* zgN5;3NPZ~Lq~r7OSF$=u!&njZwSY?2XJ#rJQX6)_RfC+FWvI3p2T*=9U%uWbCSvf_ z8MFi=Lw}diK!YqFLUdJ5E%(ftT|BL<=%T*jhDH~T6`G({tWf+Eq6$?9U8bB3mNGx| zifkRXtHS!>R)eK53N?9QY4{>zW7A?aCg7Sx&XchpDMd^hHya2wX1lP{^@i(0GVC!y z*QADUJxN{Vjj&t`ZDT_=cY3Z|OBHMm#w<)$u?q5%+%e-X%jO(gI6fb53&X zrT)5LwoAT%iJcG(JIs$Qr*>#eoof<4^C=3SDjzi#SJp=~W`0t;Q~V9pfqHKfL@zdC z7!f}(Ee=h$gwJ^6YoO+DOmnh77huyGZ1TJC8Q3PjkIt-FjR_^oE5&M!fobDKms2}D z#+Rfou5A{d&2Kwv=L&uclI0bUEd)9urQ|vws&9m%I3--E0>=ZR&z; zkCO?dKfdeAGE4&ojH2eq-vB{ATiK0@q6X6se1!D|I2}dSEt=c+9LMJ=>qv z*f3^3zKnV$jY7MUq%cX}l%$`d9h~_gWZiyEvb@B<2qO=|72rB!tbB1BKEe3nw$X<% zElGM)o|ctsELR+^MCgvxfRUOj+oHxWj%4IptuE;@3BFSTqo`PN&t+}|d z(3j1Fe`U@OLygVGXPM!^>g%zHPIQq92R(K={k3Uy6(6IW=#oVNROa?Vb4zX|EGw?j zkY(BaPs^o^DI_NQkni%OEcH&{Ke6N*puZ7rt}5^w{7$CSh_; z9;En9Z~5xF_3CnvnlzU6CQlM}lZ9W{_noE6{LHc0(d2i4T@|xEbEaKTF|DY$c#cs# zNLD+3V%VfNY!B)TX{{wSO=?e35!TDT-xS(4Hc;M%#qj(ge^ZUOnri?)!;SrFV+|Z@wYQF2Ggo6n z9X?#j`W4CbnCpRT*k*C_}(Id6w+h zg+`a_Z^T=uEZ>Kh+)=sXT9ivRra3ud_5b=?0e?t`_topFG z*Na#c4R&<&D;k_}UH_?rGnb|p4IUO5Fl%sbztX|Oina{SEZR0WqiFkJN72)R)A=-P zE5fs=%RA*i{C<$Y4-)u60zXLL2MPQjfgdFBg9Lt%zz-7mK>|NW;QxOK?72JL(S^XC z{^RR(#~g%j5Z*J=2N2KuMu+|f(;Z%@xr`%|JUgb z{td3J`26*8h&SM4(I+6rGlS}QgpI(wRwe$|!QRF-OVS+!kX{u_ckt2V1TfwTSN(Av zi#P4%P0XVa^T%srl{>(}YtR-j;Po*7z$f2}s#}>ZUm~eQJQR310{>bI2a1OQ8(+C8 z-O-Dfb@w5@ZH1Nr;Q#2i7vnH1o_cG#V*)}6!d!$JgoOx85mqAHgRmZ98^UV{A0q5W z7rK>0zwJGT!b2gg$PR#RwCSkupVI>!fOa0 zBJ4*Pcqi&3oQg03p#)(rLJh(~grx{85$-`)kFX8lHG~fl_9G0u3-u9BMVNq4f-o1M z24Nw>QiPQV_aLlC*oN>L!iNa^5e6FbkaqOp%G=MLamjnxt)I4S`SUA_um9zvOMZU- z69X zaq+B*({_7*^u(qU*4%n&Rq+e`&R)3Z@{ewP@Rk#fx@XeOvwrhww@`s+BWRU&nd_mHzx0_u)w_0 zIzt(y)pcH+vYYqM$LHja$!^8geaJf>ai~eh0W&41r$Lp2+t2=-qA4@RfUkiTG=y{H^m0tC zPvsB=yv+fX<6GPSemV}}0XUWzeM|u!l;OTA>2)Gl7g9O3IK)&rynCW@(C1ndHTt|E zugdWUJT*-?kM#t6sA(cy!{cpg@-Egj%=8u2AY)Z&rKwSR$Mxg_1eS0Lzj%^%D7I|Ttth0p~+7eIjv*!*!l;Ey-E zO}b^Ent(#HUDju~5`pUu(_DLA!6Md%G}~n! z`^MkZ2yBLVT)Qfd(QB8ULJ{Dcd-u#*E zUWW{mE)#1}CKYKJFJ(eneru+W4*n|Bt<)bYkZJr#$KNUhla6cu)|)&ulk=4C;*hxVP8~ zI&Qp}#~#cwK`Ka;K(875unxB-sR zJF(|thVdgEe*=)m_SwIA;|DnA-F0aF4gwvk=OXY&x+a~Je_6)BeH(e1zrTR)C>9t$ zGs)P}ZMETk*bU~~kC1;o0{fSVK-0DITeV54g>1z5nfy#_jp?_D`%BN1qJPp@w@g2z zv2KC>Mq@1<`W21!tfl|ZSZmMRYxWnW`!g?NSOizaKV!mq3 znGbC2Bl_cSVDQKJ$GE>(yq;$o)3TM~eA1Yb!=J6`!&+dRAG(}7X*~}#)}EdAt}zsW zAMILWy;C>$#{CtX6n?Z*UCy04ezZsY`pYgIb_u)Fm{$zizBJ|)L-N;OonUB4=cTJp zdnp04KWVrkAct~89{nJX9N;z!E+V}JUkFTlrhTO03Z(`y=RG3eqZD8A;x!X7`Q3up zluw!(sy48|__06FBkliIUyI=H#;MnV7Xni<#Cs6OfKN7XH{vyx^3Q-bTgtx%e%FHe z?ijDjXes1(Bya{WEra+N;J46!YBo(Bt@y_)sUOOTcoOhV3+8(LDC*M%v%VMj1z=s@ zsjdRP&Qks};6@9+9{55F{w?rtE%;&JGl3~U^8YjNSPT9O@Ua&9H-OKv;E#aKALZL0 zQ*!V|tq=aqmm`2b+mgh?fbaZs67vs#EVJNKfzRBOEFTMeq6HTKpKifLz#m%bp9_42 zrMv?8CQJFHzzR~mRRs0;2SKM_EMaYv=7?LDhsB5D*ODm*3T;z{m@=M{5aKKeh+N5m%;x`wU_Jm zraMlt*h`hgUXIdBzL*T{Wi;?HSULb;ow({3)_*)xx zninEcAHKkbvu${?4OiN5*n(Z)`AgtJtgmc#Xul)Xy};&vz=iqtM+-g2^P~;GXv6OT z-*<1i<6h7R^E>n)5eeO53}L%Hax|KXWDQ8_*akM zjLVSkRkrfQHXO6zJ8bw78{TZgf3x9_Y?yz`%KUMBve7Uyh>wG0%>D3C?1xVhNofL> zXWMX*4PO9!&%e?gqd`mkcx~m4z?r|pc>yLE%dfSS-)zHwvf<6ZMGxW3+^GLo;Ez5_ zcVrv*bsPPMHvFv(JGn75ejFeF#;Exto?^on+irc3+0Kd%oFWJiX*l-#yfsTRv&obH{415Co*;oUgpf8btzz<=x4NtY< z3v9Rw*z`A?KlQ-t-b#18j7ufg2_J(u^_o19Wci74|0N=7E=|8sF%3reKw`}-B8{Tij4j%Fu zKaT$d8y;oD({0#e!?iZtYQxKI_$CW>q5b=T53Iv|A*3mfKUvDzzvpcDLmNI|!%lsK zgPMB&p8z}?{)p!osEzgZn3%j5AidKT0*&iB@Ne4)ms zW{)?F*N+?PgLVFp-lW&odMGM&gV!jl_gpGhxz9Fli>7g(7cLb-stJ zbL92EoHD#nSna9zo$=kw=71M}Rlt((^*3u&-@HKe0o>H9tyv7YHjme(wF}2v5Sp>V zh5l*?(^9Uh3yE2srG3pNL9(hYG#d7|c&QWf&vY1ntwV%1WlFAxVqiRu5|TuLnV>wF zGoCV&gh?!tmYnfs5v3?OXPAizX2Rr*Kb~aJn4I%X&Z03^&!-M0VRFtlIp>?4^G(kA zCg(HE9MLnYpJBFjhS`>Ao<$Sb#JQC-ay@Ka5*(L)l|+k<3dEa^Q;ZiK`92WdTWf%B zl)MC5f>+RVY9{__M`N{4&+%(;fxO0AzZfs-HwHsF4ZKU+rv?7$LfzEZWD?p)A<%Ec z2!T$5054M)m*y-m;vnBl^XQk0l68%GeRT{`nzG36lZC0s38s`MoT2(&w~<*TFW#V8 z{gw*f@WIq9nNu`#nrGUqVmJ!zHOzF%MD;08@kO(WX3m%jDoY7oy~WF=p6O+?rxcZW zW|x#yOsn)%7ELLe=D~|lA-+xuffW``FPkxCs%Kmd9Y|g6{Ay2ib6C8F3WfrFLC8}d z#=UP(xPc0?(i<<_PpzEi2{-#ad`q&nhOZ?d9l&d@;8N#T@D=#qT5m?*OF=BGt`AxZ ziv!dB4gMxDInTei+>5_pV>DyD+3L|RRogm;Ng8TuTx@0JnNc~@lXS3^GpEwMR`Mlb zjI^a-LJmyE6Rh@x0^x=$bLO`w-gNh9v02|qQt~Qujg@yzO&(*uC{twgE(AxX}{mf-w=ZFmbJ+hdW7ilUZba> zu|dCA`(G$U)PYy2tAivGj8f-nZc9_hE$ zto8LgGf3p+X|sb6GG0!@D}h|?u_dTp$iMDnt$RfyW|*F#O83^ZoxWwe&jRrd`@%d= z9(EY~yOkc}51OQE&_271usD}DHCE#VTh+HvL!w;Y`WTC|#v6hS;h@p;h2uTiBbu$~ z7i_IPx9FB{lY6uhJThAT{Qy-XqOeubZ{6F5VA!rXa!Pp)UQTCRSslb0;ajXyHWi#$ zUZ0IMMzohFjq|XIL;g!df=}Qlw2SA6T|Beh8VCpye z{3=kLH?F`ao;BTL`e9j^(Z+)M#s=*ku^{z68_Er7ZwqVu0PJEe#@>fxrM^S+_Mb;zDn$u7Z$mo*!S1FXW+KPUFex(TzyWh$ObG{&1c7 zKV@7&3c^4P?3ctR6hUuN#Op!@p@-Is3jMt^$)wG$Hz{t&W+$1+W%4BuFq*M$=Y6Dv zlmJ{PGdWFj1f+mn&a)u%7piNH}Y_-OH(W=T7EW{6!4f_Qc8h{lpqgi#8OJEwGWBB-svuf&LnB9_mv=3F3f(LAW_9> zK`Jny`ERsZvKaX}At+pbxt>o$Vb>a?;Rg){#EuTn^=BoO1 yOSJ{9HR8`yn0T&+P~@$RVrM8{C3B&2>YnLo@!jwHzJL6_pYO-f zqUxzSb*k!|Q>Ut{yVKW9DJn=xO45v9FRiym)Ok;`Et~PZsw7);XoqWQ+DY0FtuL}z zmfZpx1P3ZG^g&)SLT`jp;L^p(Hin~t8CZsF35YZebs64l*E9y!*HTq^$6qw9BcqRv zVFfC#Mqs-v?}ca|%J-p+!C=aAw!z>-Lq4?4kPpmYlofyC_c+j=Bejo>!HF^kqx@Wy z1ODPi{%BsCjdFAUa?ut8>vMdgsw(G?s`8Ais;mh#W;E1hj8{sKODXk_a}Q_UEeL-`m^9_B zJx_o1r{>k?eAKb?@_9p^jC|F<`;9OAqbTubi^Bm(zDD=qz9VdOR-(eP9VbS*ymiAt>@c+Uh zuYs2S-e93mH_6|Dbe*OCr51ZX!_vQ57XFJ&{Aj;n%Xr6H`oGrFp5Id5V`=XaOaDK% z@W0E%?$opms4p``)w%{Kv{aIoe&utd@JYcCGw&15M{N6K_ zb9`@D#)IWB_TzY4EdBpJR;v8VOpAPHS?I5`@c-O`*IDSFwAjl{rv9=&K?{D=!mq{B zpR+Ce-nQt!ucf@h(w}`6{=YYk-+}bKmiGQ+;WygS-h~!@4zkoAU@4z#!NV>5dRg#l zQ~xNh`4)MdXX)Qjmht{<8Sl-O{>?J+cOdZ|T$*e8Lf34aZgLe^cpFspLsri7 zHcXyhKBcC-zNyZyO>T0R7L_c_a*cMCS5_(&cV{Wo=D^Hhbn&*Hmwfw;t>#A^S3eBdbs- z!m-5bM}L?mbE6vt^i6rWF@XnJuPQSi_JD+bhg}E@2{+=gq?a_||`Vb5aL(^^I7Zzc- zhQtEc9i=c=&0nJhU%>CFT@mwti?3Lp$mQ1tNESiT{yZx z1MJ>aQ(H6Nn5{8GPjn%Af2Vr=v*uq4-%wI{1yn9h(U`#c081(t$Z(7)kjMue(R*Py z7o)n&&6)+eox}PPE7ChEj|UbifvJ=@A{qeZh8k>wd(^e)s`tWl#Zjv6C8|gtvqTkIFLo%ym=^ z(KT%r#_hor5m7b3i+lZAMMYJh!KZl}(Y=b=I&Y1JvDTDV*DWn>5)qIwLEV8iUg=BR4aa8pC}J&lc6`mD*gXEmto&&r;?5H%`Iw zWOXW-kk1AxXP2+s+XemET+p5zme#tR@s(!Cn{e7eQ*!oVJ%cYEQfI5%yAWgf7@iCfK#`suG^DxFitB>(< z*j_U}9_JQ}PtY_!;~|>X$oND}Yi9gATn95gNz+;xJ8%xk_+(AHj`2`UYiE24_U??G znzn-RFipFi@o-IB$@o-UFEUQkvrKWul;6pCtfuW^JPzmgjL*=tj~VA^T9ombnzo1W zcum{O7#Fwu7*Bwn8J`6`GoA#$g8ms#hW;7nL;sAYK>v&j zpnt|wp?}7O&_Cm8&_Cnp&_CmIpnt|i&_ClD&_Cmu&_82beC9JQhW;6!3;i=Lf&Lkn zLjR2CK>v*ALjR1%MgZ>$x5B)Q~0QzTqA@tAqBIuv-#n3v)r&_Ck}=%4Wd=%29<`e$4T{WHE4`e%F@^v}2o`e$4X{WGqC{u$Ro z|BUOPf5w+X|BUOQf5r{aKjQ%O&v+s9&v+5^&$to#XWRt+Grj`)XM82}&$t=-XM7d( z&-iNSpYb)&KjRkYpYdYoe>CDhK>v(`&_Clg=%4Wt=%4Ym&_Cm)&_Cl4^w0Q@&_Cla z^w0P@=$~-}`e%GS^w0PP=$~;r^w0Q4=%4YQpnt|ULH~@GXnP)6>(|;qMcj4X+d2Y`bt1IvxM@j7^3m_YAY)U*`4?ehJcQUmyi%}(IE}bnu#-5GxJ7UpF=n3DRVO%|IG4Cga3*mf zak1cR;$q@l!8ydRV67`t@C4#AVu#>dVh*S)Rd7CW9kC|3kQf%Bb?rTfjA2E@EySII zi;0&K?+{!{+)msfcpmWz;x&RVB3?TLk-v*Av$Xt|IOrE)!fw zyp6b6u%CDbajxJ-;+@2qf}4pui5-Glh@-@*f?J9A5^I8&5+5Mm`!mOX9WmBLj9+j& zv5k0#;AO7Fyi#x{@q@(efJBBJL!12-e`Kd{N?5!O6sXi8aAC;seBcf8_X6h_zn8oq|(| zZNxhS4xebMg~W}-dw-DmPuxP>DY%$;De(@$ zrNr&T9fIc(uOMC{_#)z!#481t5kE-WF4#l7hPXwrk9a+Co!~0s4&pMwb;R3@MoGQ4LcrURgcq#D#;=SL?{3qsayQ@=hJF$&;hu~$z zsl*+ER}c>-UL*K+Vh8a`!7GW=h}#9E+j4%yq36_ zI9Kp`;(5fGf;SMC5jzBT5c`Nz1#c#7Fyi#x{@q@(efJBBJL!12<8sO7bQ*=%$<=I~Lyo;=SL={3phBCB`q9I~X6&>AQ9a z=1#_!O57osI~w0$;x&S~v++5IR|@71$CpOjE|@zVUnX&jVD5N)ImC5>x%2Vm5|;_) z4#-zXTr8M7Azv|Zu3+wneDjDi1#@TQDm*H`rKWLxwRIEZ}}?dJc&L!6t;c>RUAsWFmwI)VrKE=t#rpP)LttS-vjR$&#p5OTSNl80iI}k|P^psS5-KZGKcP1N^ zU*Endv_G-|S4o=Ia+cgx2^=l_ZP8|^Y)c>JC2ju(J-cfg9{54~Cm9_%Ce{&_pd(#P zsM6lmfPX96+e^-y8{Cu1?SXdT;!T6F6Ad>z9b2c`P}~!J7CVICfnN5uYq35=eQ*+? zEp7YlZTA93f@@ys=?Nt}quVf#qI@7h6)u;;9eUv^7CsAct3ocMk>Fmv@Ol>ht&dT- zND5P5RctS3;U|5K!U`$O)C)^lIK*ZY&XK}mz3>bcmS7XC+T^o1kzk!(csvUyA7K=Z zk-~Pp@MlbkXkLm@I8+MP=!KmuoN=U4c$5_G&ql}s#NMWX4ScO7pgZc?>PQAo+;igD%{Z>?jeMEx8UltZy^PRQ~*lP3x z?Dk*?uUsESTx`cjq7X8ID9K8NYqD(z*u zK&6|R9=gTDBBrbk9j!Vp*_j3bq{03)#ObMsBf%3?X=WsNno4D(EC(7O%>+gBdsUJf z367;4^PTx9D?DD&6e*gyil#Ucyji76K{JmR{)jJ9H215LvPkedmGYoWE>RFy2~DfB z1ywj%uEZdpfyHZ~X6KOb)B|CAsK{v(LFhzVLld0Qe5}opd}m!~3#66IocYjaxCnLf zehR%xdWZ`AZR8)F1Fmfyfq{`3Nx>I>3T{o!>InXv9D4ccTf39Ldp{IiyqThe`CPn7 zN%keyLg1`F3D>8Q$3?P!XKEy9`-ezlAh-|Kr8)#hN091?s>Bfq&Q&S)AT0-Fh|?9# zDpdl>7bvNUUF61Aq9=YM za!U<^L1g-OklOdXul`$i-!R(vZs+376q8A68(0T{QtN6%7oHZWHB)LAs?jD$%>h!g z)RJBl$tFlmX!4!KG>&I6OpNwIMD{lLVvaG5djrZ>4chO_>^?Gl)q(I7tp|C*7gA-& z&2R@glkJMh1r*tIT8~js26=${`7Fo^PuXKKB6cF0DzXlwa`2Ht5k}J0%i_Y|=uN_? zf{QbRv8$B>Jyi{Fa3q+iQbTloIc#bOPBmfjRB2iyc!^4-V|bZE6iv3GsZ}L8k>K4b zH32laIMJgh@=5cY*vYDwuts5&14I7~XN1z7(a)h$j4TD3w}rk9qXgrh2kD|7mLc@H zQ3>c=%Hb;5Ot^n+3M$IzIz>@TiVIP_kfPGrM34Jc#5jwE6T<~R>1Bng2{j*I5C(x0 zBC{|blY?8ofOW#SdU}OkwO>CIODm@3?$Ck7n<+$-Oq)$IT^cmW6jQEQ8JH6?6^EzG zRG)UbOfl`=SMri+r^{5IcDhV4?Y>qtGVOGk%CysEx>Lz?h#}MEu#5zm4uLRyx=hh! zE$aMIgff#t`GrhL8J({vW*9Op)#WCIFUUMxUu2PKsV-BQtCtId{{xv)h`%D!Y^-}` zJH1iK^cQyOz?dSzxSc+x=o0Ky(Zucau$M$g33f`FM486ybkbKAnbJ-TnPR7FXzuH-d zf=F;2L94R}U~8+h7?BujtFu&3M%Fs#3FR9UY^ws{vsvvr=S8YoS-hG@PlA%0&`7XQ zHBhA}>*ADtJsAn^Qk)xw{#-@h4Dgh=jqt}X@#j9nOoSPxp_45r;;MpVtDfv048M{V z&Ua>q(!-4fDJ@~`1_M1EG>pCJ6+URG(BT#DN z`V(n&=E5Yglw)&qI;_|zz*ajOO3#5tqDLb?JeAHQ1ubSGwxQnb=nCfvYKFE%&xS$h zG-#dW*RlKsX+-C9g3#;@U-Of+!n$yZWB1Td0^`9tJDj^OR)h{6FGc8z6TULdKIOZ> z5Uhsjk?CK^YG}XyJ4gzvEEf3hc6Rp)?OnW?+BZ!w^Fr_j&dMXJ4&(kF{x|Y?54FHG zXoK@X2n9)#xWsY8-*8HJG(lp}S-)O#RNm zkPJDB6M95VhfZ(|_#qv=z737@eG80Q-!!ENtK!cgPSu*;giZ2o-7>3olg-FT(9Xfo z|LY88B~g?gfJ10w+xGPza1i+$f8o!ouyz~sWIb*tL>@nn+^D=&XDcCzXxKZGXbQTd z2TC+MFl^QkEmvX0vVTz{K2Z^J#P+raD8t83H5x#7(YjTBKZ?57%ix+gBt;`KVv;ga z4TvoEC?#=xYBQm_sfNE>wf;T}A*foDpvcN3sK0|!1htDj6+wZ*WJ7ykQih;zXr?V( z^pY<2wa(R)fZFZKN^oryo8w@eL9p7nf&`{*T?Ggrt`yz!csi>3&3ywm5Nefv6>|j} zqGNFmYHxd$Jd8T4ogIY2GL^O!t8<&GbBxrv4JDDsuQepj-9y}5*;e!-C8DE29;lNY z1WmgcT8s-?2=76c(U$=voXURdf|kOCs&F#}eOe@Vry=Or#zu{27Kcr9++;|ZVihTu z;A)E3!G?@a$Gt9WByu3us899rpXBaD9|y}Il)N1r#9@Y+?=<+5)g>3|*Ajd;!{GY{ z?xn$n=A&KyBEeQeOKY8{AyZc)FS4Q?pQ5{HKZoq|olac2@;-cY9*qU(4C|%2RyV3e zf`3tb9PAtBBpn63<{hlMwXMhAT0rK_P`T!Iq zsU6`srBq75-u4yhh#|mzV}fufxRH>ZrJdHJZO=B=J)v8vm>P@MWgF1Q( z?6|Z*X^{nFm4&gx!rqV$(tTi%|BVg~FpS`JY3xO6mz-bFCmu&Zi6dV_Z=KPjs78z* z%_Iz*Et`h$Ifftue+_&a7jY|Y>O3Xe2+^S9J5U}tFPx9%R&3xqS_H;*t7y0Fi}kO9 zz&}n@cL*c+6Ri#0{`xUum_jcs{MGtzRx!BH z*7Pc6stS6ID($Gkt5J&Z45biUL!dwo?XZ8sfT5Rx;8WK}k~I8Ql}qk?N=GbN?TBOq z&|WtdxzHArH<}o5dgjZ_X*L*aaPrKS1A~G&6^t?el?*nn{|7pg^p(AhdI+nA!`CUM zMb5#I>zs9DS|oc5_Dt^%d*)Yd*r)*NBC&(-itNFXT>(oOsLqlD)mfrvGD?FN`b(ui zl%~F3PhK0>Z3MS+mQKnABwGS14Y1rnueIx(s9KHeIFo=mX;^}J*#6=yE4Yr zXx1>sDR=@R5^TZDk}1>btYx2M^4W0Us723$@FKx7gJ7+*hy*6rKZMf7ELp}`gDoby z+yRm>9a34iFd0!*#ghw8M_d;Pzeq-uP55z@8WIWLsZ!jfmCB3=kAaT_RdFPIqblQ> z2^*%t7v6!PM{e>!TR`cof!MFd*ck|R=yA3lXXH6;8BLZ635W5Ugg)Fy>i zv4uY#wlv?_Xn*#A7)$U&%0#K?RP+OVwMk#eCzGu;I~&K_TZb{(m^3~xu?71|bZK5- z=4}+xyUt9^$n8o~JRHK~ z1aqnM@k$XUc-3_s#QlGahK@w*`bq&_Cum(CE5Kcj*7c48JXO%T{s9o{lrTKaU|1MD zkZk|MLm=p)_Xp=R)X=(aK~9jKvYxqcFp#g`Sr|NcM_^#E+1aeEM<;upr3u=n?Cm~U z^86{mgT3W?a&PdJgUHI){Mh+9?-Jv}q5e-Rm6=6?9ZbQKzV?9_TiYElw&0dt!GnG5 z*Y1Re3b#I92%DlZqY+#wbe|lZyBpE*(cPHb-A6~$;B&fDq8m}ayHE5AkkHoLywL%+ ze|{hAWs7wIa$r`uxV);~*`B>^7l@C5PYDc0KMWGYvN?$kMxSvPtCcs|G3TlxtVB*Q@Rwf!_z z@U{IYOe}%RKqqh>7+n7@I+@jho;0?7VLz|KK0?t4PO8A-N|wDSueyqj9kvP_UEpyo ztqae5Y4&HY(xUa0jS@ivUk1dc#INz9)zy8&it(N?=t%{kNx_CG9$Ue2X~hOx8< z2Pc%SUJ7Mu(R-*{T6e&WMjk{FOVK$d(a#j6nN-S~El6GPz%D_HF2qh8Hn{XrFh&*8 z4$5?8rjq0hv<{NCTS0qNF- z5LOIW^&(+%8k#{q@cH3lFpmV!z_uI%5Z=krV=#X7M~3v&E~M3}yERvAo!3beK|4x9 z|7QP(a~vv|dg2v24HEy!eJ{;6!_26H3+Y&Nh5lBak1 z0wX~Kt)M?t1NUKvEe${lGJo3k(|pOkmqzpb15)=5$EBD|`QYDi1<1j_kIe_zVAz?0{7C1FdA*UB3;I0%4tX$Y zhvq*PQIY0P4I9UHn8e#55M*a-{tGat4RJ*$aUYiG{kgwr8ku<^T30$4L>$rNxmeynzOL-*tq;f#f+t5Gh zQ(!>%)EEhT%!g3CmDNmPbw8wf8cqtJe9IZG(C^8v=XpU z7&njz@p)j3ij5TS(`sGHg!ecZT@`99q-3Dan={d*?mJtM4KIluP1_g#Li@7;P3kMh zS(lUyp9c1WMGE#-{!JMAG*mj2PkRj#PV{NAB(n|Ory*r;eFFc|r}2Rxa=(Hj$E*eH zx}OyKMgxMgbj^W&Sh{wVGWOQ1VfyIWGE_QL*Tx;XYwaLcUHcPK_SWb1uDzglZ8znM z9Rv!y9z`CV3nKm^nB9nI!Vn)fEwn$G;URhu02GUJGrPVM$&rs3EnS6dS`&CvGqR_c zg>H6zhKxu-5?1OmTuSvadpLXKj(yNHeR|QO$#Ck|14id#?1pc<7`jC-*<=39-Ow9i zZ=%a-iP8;jb*$ak2Db|)hjM{3TMxabxf|;|Hn0!|{2v;FgeYH1NT1}&|DkE|e=O4{ z^>@mC<&G&$;xKj(@ovspN?7+gyU_&mzhewruO*!-7k~2{@?r2+PdS)Zocf8G5=ydo z%Dr#}^pxMCD{)ULgvwLCsuS#HU%R50pqBEK>(~&l3U;srJsN}zTsGjkr3?Osst}Myr z5panFUt#iIN#?Snw@UI{Ca;&|XCw$p@yKp|1QbT)VY2Gi^V-A9epCGT}ST->d?`4L7h5!T2Sgv z)whQQmFehCLG3!aQBa4Df`U4A6cCh3ZwT2e01EQe9d*Jdw>4jZb4ZWs0>9V|CBtAR zVhFhWQB#y<(G4{1t;h*|5beYa2>zU8zj>p*brmP(55W%)27l-k`W8o?4qQqh?Bcuc#4T-SXyeB3PukdZLej=aZW0V<$j0yc;4(8UvevmCWO$q$i)$ybQQRth{?w`I{g}csa;VP%|@YT!6 zT`!cIRNtZa@Tz4wD0W1^08COb{*=%~@E9M2d8D9D%ur85lS?26G|92}N5LhG07)9w z1!voJt>pbAy?kI$EVrmN=Sf;tpjX!R{Tq7)W(L29^ICx%km$pB9W$=2<2lx}wrf>ei<^!C9>mCxQ4wEPG`QEX3 zV-KBiWbMbX=CP5fsUcWbmk0|-HaU^H)KFb=Xs`aHsd-BOc!|g&6;Aw!V8>q8+laAN_n!H^eGD=Iz{%}hzye#jkBSuGsgFZk#-EKF5fx}B z6Pvt^TX06@caH8JYR!rB{1WpTz2jpqgY{{ci~|TfHlkdP+TT3{RU4g0oXigzEpLgBCX>`N^mO;hWBkq z{Uo^X5@;hRBEePE93`qY7F->pXMitdvs~EyOP@$O1+G`L=pdcq7643@sTl1!!bRUE zflc&WQA67oSC80|pMH)OhChZVc)Rr+s&uI8JhIcGbGP>NjQBF}B&^;EHoVhR1Qx2r zWR2Y3015ikmIfp3o(95n5T@WEd*xLrP!Sb|awXpaVRztoc)rJBC)#~XB*<-2cYn2? z;zp4>42nJyJLEX4w3T_=jnGL5hproreV-tcWr_gy+ zXJ5lr&h+kKk)Xx{1$48Bl&In7)PeeT!HwxPFwAYJ!K;dhN@5(w4gZ%=5+7EI%u)1v z7pyUVk$jl}tx9bh$j?Q#mx##q?(farc^UO0lc=umf_NU?FqV11!)Ps z6e)XtVNDVaL9hQeXwY5`jB`R#U?^)NN5kGnXAme_lhm?7cufuDc0aP8_q6mfKOUjo zYG_mzX}2Q|zmeNzm zk&`puIae<|mZhIO&${E|rITaNi5$)H7g(-08J}Fz>}gOx*i{SLR_7j&o7+7?70=a+ z`4Wz~;XRzT>IVL)@giySH5Mtmm*xR5f7_^XJ7T zJ)G`5%OKhAj7V?>V>r?Kp(Q%e^^D;}=``s?k0FK=z0}ZR%!xjZ4jC8IQ_&oqXmHPj z(A%L`4KK>S7f}(;&^H>6Xa{`FFE<*;BbSTm@w6vwu@AM;cpHszTjAhF;{|Lqs+>dB zM#G#F-)Jm>lA++(9tc$vwh{ZGrM8aHVfLk~p%9j$@z^#ZZKGJe?9#%Ap-)5LEK(q2 z5XR1CFlk~HqkW$vzs5^JjVlaU64gWypJ#)3F!M_*f)lks2AB+Hws0N{&T0vT2KQoF z03CLA`Ocy0reELS<_WsWWL<-5cuqjo)KPU%O}jBkVyYR8-WaM`jftYxx1UVwTXhNN zZi{iK-0FM=9a00d$^7$z1q>(^%dI@BQLG--DAkuh92(F`=Q};JU-n^4xpX^-(c106HQ;xy0VB>m?s#TE%)i`GNbas8>deI9-p$?*NPEMVzVU7wWNG0CuNDuH^#> z`mWvY^x=7o6SiJk#?IgeL3*~zeFpVRMr!yG7U3|qFQ0k{oQsDtitUkmI7}W6r>{Xa zp2}#4tXi((QyEK;3jJt$Dg$%T_YC!9Z~Z&&5>E-OBFE6~0=5<6Q{BEuASv`?=yB%% zaS9ikdG=?c;#7jSsAU)9v2mv#t%iEY>Q1o2gBkPiV8${g`C!JB7Mcs#`fyf>Uh+8z z>1C!=I53{yZ~qBue?T zpw_iia!Ty2*N|T~?vI)@;^?YGE@;z0s&!qYK&Dij1z;i_(ls$LBfD#)B2O1`{w)gX zLDx2B%hwPcZKtb`qRSV$13ycHvf6ibD^MmS9{?nBSfe=P%5xXbvG`!ULooAq4d0gSRkJb+P#ZLawNjL?tVOUNS_A3P)d#!==vmBP;S z3Z^ionTWYNT8Ep`#v>RXVztL37(VKSk6>K-Eav^m(aBgW@Ce3rsDVc?K4E4`^jY*4 zk6>I22S%&9g7>y@hVnsl&;~RhyQ|BQhjC=fQF6ZjScs6jDGc=}(8#{&e6}vPT>7b! z&&cnKz$vKb(CKNx6f5eDcv`QQj(Ue#?OAAqRFo@X zIXed1$G{d1I!z6d0)ts^bo52snN>ZczXG9;qke|Dm`m7by@?9+wHQqqM_uF}p2bU! zLi9WGI4^bazJh*3q!V=hGeYlog^>uo5T}z%V*8Y>Ivt;}w72R<@1D>HU7e7F{n@@~ z-V=I1`W|Ez*1|`^ylHh7xS`dZAR-}JWfHB*<`v@bgp!?MR^J4Rr?z|0yR7Y9T;A=^ z@~J}J<$zkEv$Hsu%fl0#a>F)V;7Y_ zU}uP@YClA7#m0>`W7ATX5_&aK!wY1wma&jv#a29}QW3hkS8&S^PLU+cGH$KU|GP+c zFF5GEViLU?h;i>=2l-ZWt8<^qO%7w6%4H>9_THsz|N3PRfK^mpaqOXk;VP%kE=R~= zzw@HV67Ijd8d2d;4`URwWBN_yk1+tV1musMRD@SMX@A@kn+E=+Y2XvkDeJ&(;KhNL ztp!izB&h==_bPQ5LyS&D?a&rnr>lOykgU7X0G)scb~O|wgVhCn9WcCAz7|N21WUOy zlI!+2VOvP)r)Y`S?GM4zph^zB>bWG7gEq1M=(Fe{RArtuV2S&y7y&GAX&E|XzO#s) zl+uwQ8}_dg6##L#NgT|-6K`+4Pf@_hqLI+fN!>xnT@FB*z7R}UJ>+BvG!=$YgH5^QpKz~ZMrb$gcA#HAds{0yj=_a~jDC#C)zLy2MFHW;txf4}4I{ePi!N`)f_c66jq(Q+b*dFwY(aHv7qOvn|XcsLEf{6s>@f#@U z-AARf(XSZ;UrIM26!Pc|a@L~+x0R}OyQeVa{&9;K+|?&;$xp5p4-g67f=-Z08>(Pv z^SV!#XHe%QKJ0QH?T&vY#g2YO^s6y6iC&YrT#=pfIBAZxx9x`!q9FRUZb(m2Qjpl| z7zy-L%I1zipLK^|y8h=Cpt_ip#~+HJXHO_e?Wse%w^GKMJ#y@~sEbuoe+0q?82tI{ zz|j!a5;P5mM7n4R1@~jLL1j_T(OhIjf^u(q%#TdUz3DV2m&m>88$cCV^7t+&hL#dp z@;Z{;&5DBTruEyI^H#GYFq@}NZ!;feFc2K{+QRW(#qmrt$GQZL$CxX)5eVBz>3Fx1I~CN}&{VhhIbPcd;k zUpV>;aXQLe`el7fLQy`g1QBh3uJ8~e|7Z~wljlhZF-1_4hI&%6BcgFKSRvyELemo zdk3@erg9{B?|m{LZvA+vj2=@S!ue=Om~}4zMDa2fw>sA%ituT%R(XO0$xICF3-av2`;b0Hmdz2hI$r`SG~R&-Lx~RTl)`O*l*T`qjS($H zANAfsE))#A8O}}KlAEk;)h-WI`b|t;MQb22n6S5iZ<3cuT76VMl;8vP5gf3HYY&do z4dEsg#3u&ePuRn&kShm+q*o`#4secc`74cSJw~MkhDBGvh+qp*$3uv5k0A%< zi#vE29eMl_mci3~`UP3tOK=W9(C`q!v(R7u(IeSbMhcQuGfKzLfuXt>f^=0@3d}gT zc_7}+mOr4i7hNz|<&f1{C$4)bWIh53k*`GrT+!c)mjvT-!4Q@aVH}FKtPLaMH0D7B~J`< zB?*vqJ7RvF1<4giR^h`gNG?ONq_VmW7QB#zoS=RrM%E#*6A2nSGfR=q)byLw;er&j z^)a$AUrB}QVobGGs0p3sRNKQ$lkq$Vr$D`a33g$0bxUpv?=|!DKwEQ@tGtt|wn{(H zQVU4fYFLd%j27n*ThXUjmJOG~Y~KFFv|hY%5ec79Bjk++)u;muqHn;c(3cjZksZ}| z-%7~_u6`(z)?N;UWgwd}h41VgDzGiyO!I)vZNheBuwf=g{a!}F$E6&2B+JRatz~K) z?P<|lj7Lq_DkK=}prJ;ueh_UIq*MfR@U&H=a0s(Gfl{2&F%PIBZd-Ng zc6c-0cKKJV*%H>s#pJ5yTg=MmLK(3IeDR*!VfzO8Y>-D*J2R0*XHf;77_Obo;%`bo zkX;e*4R3I+0Y&`nZ0fHVvzAZ&;xQVWo?;=;kIHNsNZB@|rA4P>OuW*fF~Bsq$&b!e zt-PdKX+bO9r?Cu=f-?QP2>Z{0gZ5pu9G$3WZ=q@-DJM8A-pqlB50H0{(x9%j$iYiN zxq~Ig!DOl=`7hqIMMj|w|7ck~_I3Faq?JhUVV&zM_xAKm4fZ$!AAuDItQvhxFMb5Y zbWFFP@$SVXbBhfj9(kr{GFADT=mOB`hc3;KQE+oI{EPZ4m~+m{>X};-{R9eGyy>kR z=yK1HF#bAD<h6B^BdG|(R#lHzQ8mOV|v;MSxw zzYFXRZXR;sC9aD%bsyPo{(ZAa{~PBG(qcJVH2+a^POc=lxJiM^Dvx7fgQGrB!|!`I zs@;B{qq?#Iak;ObHY0zmLw7z3iEy?dn7)SI|~S9D+LU(A2Z@X6DbD0s6!yXO|pup!tQWMGLii ze!143RJ>xs>$BFpz5MK}(*AV~Ki483*K&9&@r5nF_Wfm*S2aIzQ)Ko9qq6?`m3xPV zN*-^;0$=5&msM5Q)Ye^&@4W;TE^2JLLd%;pIe$vQ)WT`g&ncQQb5`-Wvr9_n%sp@3 z`4{|prOd3+W3tDNJ0s^z?KS_Z6|XP)=ePH{hos+`cgLMttSCmbMk`yd%k${xcB;Q)TVnYyjo$U zqZA)3^J;%uR)58~oTrBzz3=)1gTg=Ep)K;c{SHs9qsi@96*Xy{`|q3tbP|ik)yr;-~MTHpUs|q;=rP%@2%fDW^eTI{n`axbbZd!=jbdW9peKIi5EKJDVna z&CtOw6FCa%EAgo!M{Pw#hE_jcD|gqN>UZ$NOpc6E{MuQ=DE0lUk(YU!GVn#jbVo5h zoYvr_Cv@-&Q4aOBD~GQZZjs+zGU|DJqcgK}SSOaHvm)O^c^V#QN`IOn2cCSCc?T?0eI@WAv-vX&3I=Snym~VCJRC&f&J3 z16wc9&bHlg>Y2ei_RM?IvnOXV7KmT|YHAlbDjOVrpVuL)1+5gHm2wzr9gsb@u^s9S zH_u*^bb8hLS@!O4esnEq7}WOo&~uiYe$LGQQ2*cuPpw#3Iy#jmLY@Xcd|F<9N1dFN zcdq;L#gkW#xcar$1N}pu*3kprvaJ}rY>@xj0ava0wf^0_>`&*pCM_;Wf9Z~bMR$*R z(Xy`9@#~hJlTG7IT;L8_Zd&PnS)RD${YrUk?fdoe*dk~lNn8pog&0TTns~@^)8hEc z^2Am0m*t7e~o(F{Nx zrVY$`1~%vYCw@lxN#HjXVV>R>FXDQHYjjMyWk}zLuujioJDc=$C*m&BdRL`vUS2WHk_KmL_zi@oj_`LDu<1ZUO zfBY3C%o2_>7|izF5998K~j6WgY%ndS!?H71+ega(|;7l3>+SUK$^* zbEt1MI{2|XN0#or`At=aaPSOBYM0G8o#p^ROkqxPJJK(B8&dkzP+kgWo zuaPfbV-yq7`KkyJ2bg!eVWGlQz=lm_W`Gu^%Z!OdB^E@Ykk0 zu+w!1s{AtSk#&vunUyg*ZOn)f77pc(37jEpb#nasuDZ3dE9#ff(aYj>&WX(mgEAf`)X9t2 zF}IT!z(*zVxm{y!CDa*-E!-IynfNb@KFm|;;r>iMKkCpwM(U{aoP4tG?9_KjO(llo z(_^tK^;Kp^?Pcj8ticyL7dS8(GBPsMAuRmM7`Et`IjeNacn7|~? z%DU;(`Hwt1KK4RyRb9G6zG#V^5DYuOk0&Q~Xk?XR0zTU*3ZE<=DHc~2BN{nBuH8xA znsQ&YyB?w!8_|u3AB+}^GW}Kew&#bK(IUip-y^KboTuEG*q_2P-IUTh3o>|G4kN?uKUxYUlS$B}|sRz2TkICWn(ieS_LCjzjHEbc$cu zoEXCUpRcEfSZ_@JQ7t>VFJ*-FGWMH9yT%5}UDE{5@AuYMxXZZ);IrD;uhv$;v6j25 zxHWUs)>Pr+rL12PUyr#S$cAku*N$n}DB!dASZ#$+|A+oo*VwQ6*fB`QG_~1=?(U@Ehk#auZk$RTF0|_q=#3jteSoaOqg7P8)`gv5STB^Y7}z?Q(Xc zGUYr=cI-l<%GEdDO;o1uy-V(}%+ZaSLpG)v8Kczy>f7QJD-NmD{lt-v8QJOV(qh@o-#yrhJ3Z3i}Vt+tfcbZ%hA_ysiCh zc`x)&=F_mv2rr>7@09=c`%MDBN#HjL{3e0lB=DOAev`m&68KF5ze(UX3H&C3|92&@ z=H6smI|4`e#E;3gp$IP_Jg%p=Ax`^Ag*Sdqwq+rWOH<7V6?pEL={h~0hIf$gg1xrp z&&f9a&8}tmT=sE@JMeMo6AG6)WA1xfvh5gz;Rxdp3J~TZR3I!wSc0$|;eLd5 z2wM=|M)(wAKSJNzQ6FJA!Z?Higt-V62n!LGAS_3?A7LHB7KFDEK1JA%(Dx41M;MMU z4xs>HEVI9I2gtrksMc9wf_b${&7>+Owp#WhnLIuJ?ge3^e5$;D= zhp+|VZG=w|_9OJY8}$)}BaA~RK$weAfv^x^3Bq!O`w`Y5Y(aP%;ZubD2z~ECeT3l% z;}8lE<|0%eEJRp>upHrjgmnm85Z*>GZ0OVFcbqlt!jICMziQd^%$rTu-}uDhKb-q? zpG!`2c-p5oJy7?-zii_JmJn6`{wq3?~@qa@frcRzb-jOzEKAz4EII=TxGDeTgIx`?JYlOgvPWhq!ZD6Czk5N$sM%ABrsS1OagE6yRZ&^vt{UM;n~wuY9GTWQ zii+mWz}?a85xCXV&{XYr&qwU9SFz7X$!TkymVw*V-i*9S(?)`?juzAeGUT*#WTi*T zAo95zd|HO5sRsO1?8gIhEYbUz09+`;eOS_~L|v6%%c#Vmr4FpA2bIv7g`2 zpk?r87|uQooBThC>D##u(0)o6C)@bS1pTh@V;O&^AYh3QIv?nKC~yE9KduM-@#eTe zw-j_d4|Ph3`p2Nl2i&jwbFLw)K{o+;Tub;P9m7lnt|ROp*On;g*5FK)YYmb@!}HL& z2wY!C$F*n$Dsc@mex&6Oe^692))B5DmtqkbheD%W)@Qg3f$I*_Tzghx5oy9V8LNVBhOhimZ~EV`7v@iW@J z78wRzC+Ir4II{u$N12e8-=>Mt!C!TP*<&R-5hBv@w*tYSSx|cwghCJhEv>QbRbw+;NTkHcJ z8(JAHksGo=ID&Y5WGW@iXXpkYUgjj_zYCyc;@Y zhW;ZRe|?b0_SwIAWBSCmqztY$6!hr&vG#$L0xcsAt^RJoAJyjNIFK+bQ4xf53NSYdiHj34t=Va|MD zeIL;qe=~zW&OgSz#p2aGQ<#>mX`D|AQ*wBAHinhJI6qW5chYJeD6Bj??OkCg0zcZd z!fK~(?2UVCa8mfuPE|Q~>iE$f@#`(Sbl4^APGMd#DEm^FPAUHDt(~B2NaZDKU-eJ| zMt_oUML-S?{ko{`Lg;If-^BxiK(HdV02F1B z$R|k~psiRJSUXHI(uxB!@vA?`$cA@IpM?n2ybD*qbzMpOBZz>k?Q z-!CguTFrYkB+qTYADR018t~^P{4VfUCj1fWn=n5t{fY^H3%tvO z4+78A)coQ~dl+15VNx8Y0+#_hpmf^9P~hudNw$qfJzSDDazVqv^#*g-OqXj<(yaWD;W|#!;@)U3} zaEp$g2kv?|*>;=G|7A;k+H2MOasASs-v2y~X)nEZ$1&~Y$q(X~_OifKPJ8j2a0~F+ zCQN%-Y{ImcR1>DX6qzvX<$4pQePo#Mrx?%Irv7{he4?qG`mgAW_m}#wHsJ%H_nR>7 zVV(&mK@sPga6e#|3DaH%ro`=o_Tn>P>Zdg3zm=zson6ecGyV#$MS5H@6gxRB$9@1}1oe^H6PEIKEcj;& zwi_2BQXgk{7MyOu6D_#Zf&(V(0M8qNQ?b6X*#W(d)E)pf_5%*gx5rHM9M5wW{F()S z1l;&Qvh4yWg8cRXFM~fwMFYe?S?G^3HrQ+*VW4`7NQJz9u$1@W#kBro`vWa_j0I1!;29R|1D^jl z&b4&;UT!IGvf!`<-(|s%Tku8;{-*_hZo&N9SH_RylZ}O*L3|t}W9)|qU_X44NJ{=nV)lWqLdMy!8=xFAA6~5vGhxbOoCTj_!53Qa0t;@j;2SOY9t-}P1wU`WZva=t{PXeJ zPD}ac7W^}?aXruVIvJPrJSQ{sc?7WW<9G*|Fy(Qo3A216u*am2slf5|;&`pZLVpQx z(Z7>zr|Rovxuv|(f)`uxt-vR(PquL%%K3AbrF=bbD{M9bJ15@K|&<>I1a(QZ93#w}8yQ^Ft ze{Fq(%N@Y$%C*&XRbIc>lQC}WnVH~x2qG76SgG4jF5E@J8>8xml_yYL-GnM8xx0(L9UBv5D!W(=uIbT@oCZdi6w!jtaz^k(2ZnBl-Ri-gB#g zZZvsmv;eQHsniVom5+)S+r>R6Gf7BoL@K zXoNr|L4cR9^9wT;=y4t2WOJ#Pk>Yjrda*jXC=FR;$7EqBa-1RMabvaE>p3#3?I-=mRHxA z3-f(by*1u?FgeHDRP4rIywRJ{--LCkm#{6J!zA_B*EX3Mxu%uQaK#;L>5R#Aucdsc z7$a@W8J7W*an+T({JucVWf}7uHQsc0DY2Q~VbbK)=L$3Lii)a0gU_5}I4#qQRbt&n z@7b3A7L!Z;=>fcu1t$eV!#K6s4esK={Hn_GDK+A7;ibJ^Gk;wO`dirsSLhL<$9s^j zn%Wxm9`1jk6j29Wy)Lgy5ET01nmoTe->X_SO-&7dCClGn?nWUTwBF@J>!9J830+=! zgh5xeRw3`|#tE`w`ooAku0?Kh?J;=Y+B6Kj8LP2f^+uVwgu_?Dl*t)e1~fK1!!uTE zs9b^DZwS9<=-37Dnt~PD(WqL%Mf(iHAYS;&&JE_j7!Vwuts>Aw1iCs zCzjh|Va-v<-*3SVitqEg_&&d(3C>*fQ2vfgeShE_TgSl3Z@?;Ru-6O z8RpR@TBd8-EVP8bOTdLi#G>ktwy58h;f(zpztMd4*Tw>-6SYx~LPyoMkbd3cjHmua%|2-@$jrb28a&V=Zc^`Q?JA zH$yX(_q{b-OnAtq+?TMlL#Q>D=vg2rt**;2)X<>nxNG`C*KGajb8;15m&Q7S`CD79WMcG( z>x_92U}#Ln#OWM&DaKX;=E7|zy{VZ4x`1mr)eEltF7B@BmYcB9Ro5;|AjSe%X|61? z)*Y5UHdZxMtb_vtFg9C;kkp@BF>}&u(^@RT;*OTt@>f-`j{SdST)PT@Fc9l6iJwpe z-K2A5l~QA^M7cqWnuA4f*`-M%Q{ca)2n4g!v_@-gtxyD3P-hW2-WwTrV}O3 zUQfi1)>BQ}t(q-ltuue@!bIm<3Mp<$6h)y@l(5vX=AO90i-FMGV}h-4P#ua7WFQKX F(R|L@1+oAD literal 0 HcmV?d00001 diff --git a/project1/cyassl-3.0.0/testsuite/include.am b/project1/cyassl-3.0.0/testsuite/include.am new file mode 100644 index 00000000..900ee8d9 --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/include.am @@ -0,0 +1,25 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + +if BUILD_EXAMPLES +check_PROGRAMS += testsuite/testsuite.test +noinst_PROGRAMS += testsuite/testsuite.test +testsuite_testsuite_test_SOURCES = \ + ctaocrypt/test/test.c \ + examples/client/client.c \ + examples/echoclient/echoclient.c \ + examples/echoserver/echoserver.c \ + examples/server/server.c \ + testsuite/testsuite.c +testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) +testsuite_testsuite_test_LDADD = src/libcyassl.la +testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la +endif +EXTRA_DIST += testsuite/testsuite.sln +EXTRA_DIST += testsuite/testsuite-ntru.vcproj +EXTRA_DIST += testsuite/testsuite.vcproj +EXTRA_DIST += input +EXTRA_DIST += quit +DISTCLEANFILES+= testsuite/.libs/testsuite.test diff --git a/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj b/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj new file mode 100755 index 00000000..6ed108a2 --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.c b/project1/cyassl-3.0.0/testsuite/testsuite.c new file mode 100644 index 00000000..419704f0 --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/testsuite.c @@ -0,0 +1,380 @@ +/* testsuite.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#include +#include "ctaocrypt/test/test.h" + +#ifndef SINGLE_THREADED + +#include +#include + +#include "examples/echoclient/echoclient.h" +#include "examples/echoserver/echoserver.h" +#include "examples/server/server.h" +#include "examples/client/client.h" + + +void file_test(const char* file, byte* hash); + +void simple_test(func_args*); + +enum { + NUMARGS = 3 +}; + +#ifndef USE_WINDOWS_API + static const char outputName[] = "/tmp/output"; +#else + static const char outputName[] = "output"; +#endif + + +int myoptind = 0; +char* myoptarg = NULL; + +int main(int argc, char** argv) +{ + func_args server_args; + + tcp_ready ready; + THREAD_TYPE serverThread; + +#ifdef HAVE_CAVIUM + int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); + if (ret != 0) + err_sys("Cavium OpenNitroxDevice failed"); +#endif /* HAVE_CAVIUM */ + + StartTCP(); + + server_args.argc = argc; + server_args.argv = argv; + + CyaSSL_Init(); +#if defined(DEBUG_CYASSL) && !defined(HAVE_VALGRIND) + CyaSSL_Debugging_ON(); +#endif + + if (CurrentDir("testsuite") || CurrentDir("_build")) + ChangeDirBack(1); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/ + /* Derived Data Advanced -> Custom */ + /* Relative to Workspace, Build/Products */ + /* Debug or Release */ + server_args.signal = &ready; + InitTcpReady(&ready); + + /* CTaoCrypt test */ + ctaocrypt_test(&server_args); + if (server_args.return_code != 0) return server_args.return_code; + + /* Simple CyaSSL client server test */ + simple_test(&server_args); + if (server_args.return_code != 0) return server_args.return_code; + + /* Echo input yaSSL client server test */ + start_thread(echoserver_test, &server_args, &serverThread); + wait_tcp_ready(&server_args); + { + func_args echo_args; + char* myArgv[NUMARGS]; + + char argc0[32]; + char argc1[32]; + char argc2[32]; + + myArgv[0] = argc0; + myArgv[1] = argc1; + myArgv[2] = argc2; + + echo_args.argc = 3; + echo_args.argv = myArgv; + + strcpy(echo_args.argv[0], "echoclient"); + strcpy(echo_args.argv[1], "input"); + strcpy(echo_args.argv[2], outputName); + remove(outputName); + + /* Share the signal, it has the new port number in it. */ + echo_args.signal = server_args.signal; + + /* make sure OK */ + echoclient_test(&echo_args); + if (echo_args.return_code != 0) return echo_args.return_code; + +#ifdef CYASSL_DTLS + wait_tcp_ready(&server_args); +#endif + /* send quit to echoserver */ + echo_args.argc = 2; + strcpy(echo_args.argv[1], "quit"); + + echoclient_test(&echo_args); + if (echo_args.return_code != 0) return echo_args.return_code; + join_thread(serverThread); + if (server_args.return_code != 0) return server_args.return_code; + } + + /* validate output equals input */ + { + byte input[SHA256_DIGEST_SIZE]; + byte output[SHA256_DIGEST_SIZE]; + + file_test("input", input); + file_test(outputName, output); + if (memcmp(input, output, sizeof(input)) != 0) + return EXIT_FAILURE; + } + + CyaSSL_Cleanup(); + FreeTcpReady(&ready); + +#ifdef HAVE_CAVIUM + CspShutdown(CAVIUM_DEV_ID); +#endif + printf("\nAll tests passed!\n"); + return EXIT_SUCCESS; +} + +void simple_test(func_args* args) +{ + THREAD_TYPE serverThread; + + func_args svrArgs; + char *svrArgv[9]; + char argc0s[32]; + char argc1s[32]; + char argc2s[32]; + char argc3s[32]; + char argc4s[32]; + char argc5s[32]; + char argc6s[32]; + char argc7s[32]; + char argc8s[32]; + + func_args cliArgs; + char *cliArgv[NUMARGS]; + char argc0c[32]; + char argc1c[32]; + char argc2c[32]; + + svrArgv[0] = argc0s; + svrArgv[1] = argc1s; + svrArgv[2] = argc2s; + svrArgv[3] = argc3s; + svrArgv[4] = argc4s; + svrArgv[5] = argc5s; + svrArgv[6] = argc6s; + svrArgv[7] = argc7s; + svrArgv[8] = argc8s; + cliArgv[0] = argc0c; + cliArgv[1] = argc1c; + cliArgv[2] = argc2c; + + svrArgs.argc = 1; + svrArgs.argv = svrArgv; + svrArgs.return_code = 0; + cliArgs.argc = 1; + cliArgs.argv = cliArgv; + cliArgs.return_code = 0; + + strcpy(svrArgs.argv[0], "SimpleServer"); + #if !defined(USE_WINDOWS_API) && !defined(CYASSL_SNIFFER) + strcpy(svrArgs.argv[svrArgs.argc++], "-p"); + strcpy(svrArgs.argv[svrArgs.argc++], "0"); + #endif + #ifdef HAVE_NTRU + strcpy(svrArgs.argv[svrArgs.argc++], "-d"); + strcpy(svrArgs.argv[svrArgs.argc++], "-n"); + strcpy(svrArgs.argv[svrArgs.argc++], "-c"); + strcpy(svrArgs.argv[svrArgs.argc++], "./certs/ntru-cert.pem"); + strcpy(svrArgs.argv[svrArgs.argc++], "-k"); + strcpy(svrArgs.argv[svrArgs.argc++], "./certs/ntru-key.raw"); + #endif + /* Set the last arg later, when it is known. */ + + args->return_code = 0; + svrArgs.signal = args->signal; + start_thread(server_test, &svrArgs, &serverThread); + wait_tcp_ready(&svrArgs); + + /* Setting the actual port number. */ + strcpy(cliArgs.argv[0], "SimpleClient"); + #ifndef USE_WINDOWS_API + cliArgs.argc = NUMARGS; + strcpy(cliArgs.argv[1], "-p"); + snprintf(cliArgs.argv[2], sizeof(argc2c), "%d", svrArgs.signal->port); + #endif + + client_test(&cliArgs); + if (cliArgs.return_code != 0) { + args->return_code = cliArgs.return_code; + return; + } + join_thread(serverThread); + if (svrArgs.return_code != 0) args->return_code = svrArgs.return_code; +} + + +void wait_tcp_ready(func_args* args) +{ +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_lock(&args->signal->mutex); + + if (!args->signal->ready) + pthread_cond_wait(&args->signal->cond, &args->signal->mutex); + args->signal->ready = 0; /* reset */ + + pthread_mutex_unlock(&args->signal->mutex); +#else + (void)args; +#endif +} + + +void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread) +{ +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_create(thread, 0, fun, args); + return; +#else + *thread = (THREAD_TYPE)_beginthreadex(0, 0, fun, args, 0, 0); +#endif +} + + +void join_thread(THREAD_TYPE thread) +{ +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_join(thread, 0); +#else + int res = WaitForSingleObject((HANDLE)thread, INFINITE); + assert(res == WAIT_OBJECT_0); + res = CloseHandle((HANDLE)thread); + assert(res); +#endif +} + + +void InitTcpReady(tcp_ready* ready) +{ + ready->ready = 0; + ready->port = 0; +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_init(&ready->mutex, 0); + pthread_cond_init(&ready->cond, 0); +#endif +} + + +void FreeTcpReady(tcp_ready* ready) +{ +#if defined(_POSIX_THREADS) && !defined(__MINGW32__) + pthread_mutex_destroy(&ready->mutex); + pthread_cond_destroy(&ready->cond); +#else + (void)ready; +#endif +} + + +void file_test(const char* file, byte* check) +{ + FILE* f; + int i = 0, j, ret; + Sha256 sha256; + byte buf[1024]; + byte shasum[SHA256_DIGEST_SIZE]; + + ret = InitSha256(&sha256); + if (ret != 0) { + printf("Can't InitSha256 %d\n", ret); + return; + } + if( !( f = fopen( file, "rb" ) )) { + printf("Can't open %s\n", file); + return; + } + while( ( i = (int)fread(buf, 1, sizeof(buf), f )) > 0 ) { + ret = Sha256Update(&sha256, buf, i); + if (ret != 0) { + printf("Can't Sha256Update %d\n", ret); + return; + } + } + + ret = Sha256Final(&sha256, shasum); + if (ret != 0) { + printf("Can't Sha256Final %d\n", ret); + return; + } + + memcpy(check, shasum, sizeof(shasum)); + + for(j = 0; j < SHA256_DIGEST_SIZE; ++j ) + printf( "%02x", shasum[j] ); + + printf(" %s\n", file); + + fclose(f); +} + + +#else /* SINGLE_THREADED */ + + +int myoptind = 0; +char* myoptarg = NULL; + + +int main(int argc, char** argv) +{ + func_args server_args; + + server_args.argc = argc; + server_args.argv = argv; + + if (CurrentDir("testsuite") || CurrentDir("_build")) + ChangeDirBack(1); + else if (CurrentDir("Debug") || CurrentDir("Release")) + ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/ + /* Derived Data Advanced -> Custom */ + /* Relative to Workspace, Build/Products */ + /* Debug or Release */ + + ctaocrypt_test(&server_args); + if (server_args.return_code != 0) return server_args.return_code; + + printf("\nAll tests passed!\n"); + return EXIT_SUCCESS; +} + + +#endif /* SINGLE_THREADED */ + diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.sln b/project1/cyassl-3.0.0/testsuite/testsuite.sln new file mode 100755 index 00000000..b89dcc1f --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/testsuite.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsuite", "testsuite.vcproj", "{9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Debug|Win32.Build.0 = Debug|Win32 + {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Release|Win32.ActiveCfg = Release|Win32 + {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.test b/project1/cyassl-3.0.0/testsuite/testsuite.test new file mode 100755 index 00000000..4069765e --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/testsuite.test @@ -0,0 +1,228 @@ +#! /bin/bash + +# testsuite/testsuite.test - temporary wrapper script for .libs/testsuite.test +# Generated by libtool (GNU libtool) 2.4.2 +# +# The testsuite/testsuite.test program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DNO_MAIN_DRIVER -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/test/testsuite_testsuite_test-test.o examples/client/testsuite_testsuite_test-client.o examples/echoclient/testsuite_testsuite_test-echoclient.o examples/echoserver/testsuite_testsuite_test-echoserver.o examples/server/testsuite_testsuite_test-server.o testsuite/testsuite_testsuite_test-testsuite.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.2' + notinst_deplibs=' src/libcyassl.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ./libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "testsuite.test:testsuite/testsuite.test:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "testsuite.test:testsuite/testsuite.test:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "testsuite.test:testsuite/testsuite.test:${LINENO}: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program=lt-'testsuite.test' + progdir="$thisdir/.libs" + + if test ! -f "$progdir/$program" || + { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ + test "X$file" != "X$progdir/$program"; }; then + + file="$$-$program" + + if test ! -d "$progdir"; then + mkdir "$progdir" + else + rm -f "$progdir/$file" + fi + + # relink executable if necessary + if test -n "$relink_command"; then + if relink_command_output=`eval $relink_command 2>&1`; then : + else + printf %s\n "$relink_command_output" >&2 + rm -f "$progdir/$file" + exit 1 + fi + fi + + mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || + { rm -f "$progdir/$program"; + mv -f "$progdir/$file" "$progdir/$program"; } + rm -f "$progdir/$file" + fi + + if test -f "$progdir/$program"; then + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.vcproj b/project1/cyassl-3.0.0/testsuite/testsuite.vcproj new file mode 100755 index 00000000..a569b131 --- /dev/null +++ b/project1/cyassl-3.0.0/testsuite/testsuite.vcproj @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o b/project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o new file mode 100644 index 0000000000000000000000000000000000000000..0cd98a3991f49d72c34a930ce41acdf276a5593a GIT binary patch literal 5852 zcmb_gZEREL6+R&boHP(9v;&D&9=eE+fs>H%wX!uKPJqsoHcsd^Xf4OSA*TMCeGNon zZL_c9rXMo^#H7-gD0TdGmBnxVNsZu3pSjC-qY20?;ds8gwYKNtQ{Y3`8C~GJ13G zB9ZqfJvutY=H+qg5r|6T)+RUr>epy1(0d=w&COLNti9k%9oB5f^05~sK0E2O8d(e6 z7+IyWt~oSQDYJu8*z%QpmeCaZZY-~iDY=o|!Q-A!;?Y^F{k{Kvc>P${|NmfzKT)s; zOoXVRZs)I-64(@JWPQo8d<%2&maQ^wU1fF0tqzRE(5!}Vd3^UsfYu+Ny)V3}}Vlvy;td-{r7F+=dxZBmOPLDXXchM>Ayk5z-ZU_AT_x zwqN!ko^k6O)#KI#NF`)BU@vL5AM9nYNMjO&GZN;sgJK$FX59K7h)VQ4XvTr*3t-}@ zqz#sy?f7tZ2($CFBlvZanOqU{Sgxq>7hAGL2e`k*N$0AgumaJlvLG`S65YKCSLl2a zq(=EVAgl2wijmQ?h|xrgy09<|v)t*M>Ga90e5IIl{WNoO33Oc zVWP}Wgy+#Iq^l_{y;crcD*UfPijnXsd*#j_fM+wAE+H!^ZcxabVi+2zEx&>{q$V!Z9-q~K!o*5tI`?IQoBi^XBarH ze`jliI@8%Cvz`8=jiu7*OWED2SrrF*eFi4%wXCyIlXekeKulGUzx^d!;_AyyC`Sevtx#r0tC6eYy0DUOc%Qm=n>n$rVwZYnZ%bIpQj60$ax z!&ac&Z&{^&s|jJaoudQY`PlRtG`!PXMFqzut0xc8(AaJ%-cvcSj$$sLCKE7Jv+!4A zZRYOSO}{4|uD68~f7*X^N*}4`u^ej6D=%BE5OK5M0g7~+=U4Ol74%rXY`p@D>Sp9~ z*JWwu>_44Q<&4#egP;jg^ywFvvTsz&UE5D>g-1W8hOefVH|Kk~v4uMA|Hl0l?iWma zKBD{PZQb!3on|6x54hF5f0m-fAm7QypBtUkBV)+}kAYOUEj~{89YyL@Suj*xf z*JAej$L0dXzrqz0{%EJ}#&lyea^#WPB9q&t?`=mZXCl1^ke zwtdIWz=lMl-}Z zd^nNJ2b?TafuUG3Wuvc5HV`l7^9VZt<%7aQiw77pn133(QmKF{Kp+<@6zs&OMFs|o z8K)SCr(&7o0i;(*W;22IV8^z$qSCYnHaW55g_gdaa8FmHC)(c8GQ=1+2R03&V2J?C z!{H-`*k-dxFmI=Vj*T-l7|*8DtYdJnP>^6I>)65l4-afBII;MX5-bcCoV*ho1n1I` zw8Hr;Dif2S{?&*^ZNavk@UOH6&!_gW++tX8DX1d}v;*&N{P-~s=9zkE(_nZKYqiKF zoIZDfr;c`P_638vG4k=%HX>G15j0o!wRSb#R_$W2qyO!u9sT{y@Fdjn?KYIR2tLSHE4bM0cQXWTuGG;k z=Nf^!b`OAebD;Vfl6VG1V=njMW&IdqJKkD<$5x8GR@2b+2eSoFt=uR7m^);&47*Mi z%P=VUr3U{B4f?>dFX|sa9|Pd;F*pQ#qDG$uP6Ia^{SfdO@Siex9Qb+g_ZnOQ{sDMB z4;Ra~fPW0k`N;l8K#^J%vt|=`SqJJ%puGLM@m~P{YrLFa)Q^I)Z_X{^L&#?fc-Q|0 zQxML9I%Itm^pAL1W7^+u^sIkfb(H|%S@@MmTstDf?reAMndSUb{}F$z`utO`qOQda zauM};3CZv?@$N-+auM-uL^t~l9srKOO&FAV3-()pIsb@R3qEW^d>ML1$#>-5TakNswk{i`0#uL1XAJl}8uC~=Pm_j~aC#iFHp#R$eF z9ZO~;x<7n)UspJKxVJab(;w~c+86GLO7}=C5(!6nYmno%6F-#@oO1d2a9)C89&m&t z!7zTe?-Cs5I7pSM&Cuj`D z5Uwbm%_OuW?!>b3{7BA;GAAkEyCh|6o?p)ebs^HY+8ADOxjGd~qES2-WhWz|uObh} z(zfL7boONJMQdUE6Im2YC%Hq0aJ$j!w4IKpb8gMLaaqe0bJd7-5(&hZ&yG~3Di2qv ziYP30e>~Txf~pPQloeIWm;&irpza-amORo?6|1_}ou;z5%~X?T<(PU^qK%3fWyaiG zFY}j0lWm(jbZs3n#4Do=v362>U35)x57N_Mhf%9*qbuCyGP_-7j||0A7%u6}+jceo z^hh>`e|scEF|qt{PU*YxHg47Du5XjbL%_ZrxZ#ub;xiSr0c-6vF*f6IVjL>Z5qF93 zzb&-qdZqm@smF2g1~Kff5HAz?3n|*YOF7#8ixlnd!a8KTwV(|+j5ZLXT^lj%_Yil9 z93+MPO+b{58WY9 zUr6K_X;9=TQp9l)l>XizhW*C&x!;{J4JSa(*7Z0w6_g*h;hh%4YUD$ zpCg5j3zWBu%#e17yhZvMe0oxkbNn_b-X-9DxR|U4ZD valgrind.tmp + +result="$?" + +# verify no errors + +output="`cat valgrind.tmp`" + +if [ "$output" != "" ]; then + cat valgrind.tmp >&2 + result=1 +fi + +rm valgrind.tmp + +exit $result + diff --git a/project1/server-dtls b/project1/server-dtls index 0f572e79f72d793cb78037c26714ed55e6309481..1c9e62e711f31cb115d06abebbedd87ff02862c1 100755 GIT binary patch literal 12351 zcmeHNe{fXSb-pXD$Qty^Saxu%glDoOIDtiA@W`<}m5>&YBS1j{JLBTVYWGQR!)jOE z_f|+QY0${B*{JKPPRKZkr$hgU9T9ORZZi+2}aGP;ynov*TX{n7ftC&ob#HJ*{ z-hSV`@5)aLcH94THAnY;_ndpqz32XTZ{Iy%h<0uc1Oh^*3Q;MDjvfkzHXtwFsyG{j zA+8gv#7D#}ViBsy+i(yvAOj6ZRj3PsDnUKKJ)^-8=>}jDd8n3zObE0ky?nh8B(@jz z9)CH?e*->f5RDFiXqWs7WYyqTgGZVLCXr7YBpdQJY?Io7Nt)O7x|;~YUidGAAxYqc zef-aW4|r9gewY_K$@le74~qIZzO|`j@7h#iO)8nr4M&_zWWBP@w&ZWwz6<}=IH+?O zh;17{^d0%(=->YGg@4$8tTTP?8&7Y&;rrD)Uc5lwEg+7c?GDlFueU5=-G@Q9f;L5e za`D;M9zW3hn~BC}KKTV;4#nZ5_g@Sm2+ul8XB= z`7rf$m&qr~_;;1@50&8^K6wM><33FN&p>|gDE0tSJyyv-0w0*eH;Yk^&$V;CxLK?Q zUi}xrkivE1*u3^PiyY)ak1Bmj#S+m7egovGf2qLoz`Bi(#2hEZMY~a$9X;F3gq5}W zla6a;d$zTuGHI(P)|;|~Y4#6f(x&6avaV?g^WGtIrzh8zf(pw~&9B+GZ6wy+-Dzg6 zSVEY|bkY@GO+w)ShdKbv$d4cIv6SY}r?ITUlP zPg^5qUlLvQba!}mdOEv@)|u-~$I8NrIbgYVCZUD2j<}U|lYL28x0Dk6PbZ~==$kt* zxE&aLBAKSigm5zPeU>Y%VT{FgGwGE4?+9lwn@qcXV$jNFGg;xd*_4$QPO{$`7<5M* zG#Ri4nDr*p(Bi_|kV^K);vBZ<^O~C`r^fU4KrERSrj>}fF-$|RXXSDN}nPV=?c!@MT^xst->Kx zjrI8fn5t)v1FL~K7UVMKIN%$ZwK<@fdWq>_dyrU2Oi$ax z#Ix_9VkJFpA0$36F+Fb|B0eiIXTY8$J}EJ0!hVAIsKlHR`v~z7i8(X&)5Mb!bB64r z#0P=b{qn*5e~n$3?dsWS*W>K6k31F(eP*|PJ|7Gfm!m&#_D%Z#CK|(2etg`4x;2CN zH+Ff^{=n36C>EIKOS|%~k6m0g9SoCKI{V^O;d^8qCzSHfU#`f%@cb{92hRTMIu z?`6Xu>4y3Ca8Nh?(Th|0ONHk?PKkr}xKJQ+H%R@V;sJE=bQS9YFa8!i`|A)k5bQ74 z9l2?)BjlhXGb3m+Ipg4e-{hp?PDDe6nkEcCAH9;V4i|^sE|sRMhN%@c^U=#=rH(&s&&j&)Qf%}E zK1%Wp;bIlg37#Nc`|oz4VtPD*PEi~qCo|s@4(8o(C_lax?0lge|BIhsalD1a5;j$S z{B9P1j2`EM;o>W@suNZBP*L6ZM*J^SZNk_lYUq0mkG?H-qrnM|4z}bV$D66Ruz}hZ zfmx{fEE=7lmWjhuh)ni>tGhD zzD-lqa+N9Bw?dervwtWvHFcG#&tGNAkfs{hzDb&@nS6g!%P9I2h|U|;3bdNTyn?^q)7K)9^d%kSh<4SIZV5wrGR8eDsHE)(SX5F>9ZLQBLX>X!91= z%nE3bYx@M3S7FzAObZnQNX4wpj|Zht3k9ip*U8fl-^h}Hlk=U}6n}3~`}+1dV1M z!>mt4FOQz$DfQr+FA`MqW=2@R~v&VE9O{6+_vKT4A-^{zQ@k#R4=aYrB`w1 z=`L&Vf7HLv8o5TdJ@sHZUe7)4p7{GHkEPQY*NEe--?a?yg_*CtMqdoWONjlkq)X5A z!AtQ}(n`C=faN%`e#^+DjloRTHC84T3)_li6DS$IBd+Bv79EDFaqXn@DPzS-XT@TX z$~dlcTs)IbTk>7na5J9P#bTSM_M^~}wc=KC$b#amHJBPP9NJY{P)xWP%=;~scVQjK z-{#eqN~OC|K7fV37dbaIe;0H6F$EslDFO#Vfm^DBLH^z|P}c}L^H!;J5LncPHrH0) zTerjw4vRnf&|RNcA70Un>K0G~bj6U1*4of`MQd&Kqm^y7^^XKwYa7O@w%0aQY^`l* zovN*GJzZPfI$axT{XuPzXWRkMR~(Y$Zv_bYz%3Ig-@9r0W5lrqoY zzM1#f)eqxd1o=f^TxW=vpbys>@*V}(5i;?cf;bus@pl_Pk?}Vqt}q0yCq&mH!4S(W z$axpY-+8=4XGih9Bx9f+A2TxS?=144j;k>M{=X9M&vk>%xEtIJ>H`gd9szv?^c3iO zpwpmppr3;-ffgY~;3m+=KzD#PgLZ@ZKtrHMKwkkp1=2RQw6%T8ShcG+mv(c;hDdW{ z{hD=m<|JHqo2n2VH=c^&YXI)(99)GNw?{UtS*HYVH&(f^erN5@XlJywJ8Is(VJ&Xw zVyWAVRlWFblHlip&d%N2*yc7NBF@Nw8|y{xW>s$M67J@#?4XF?!-N%S-PExLdOg&i z&P952NnGP66Cy%n#~fQk5+iBoQ@NW}9Iub_fC*mKN>N@F22-wx$ji=%YYn3;Zxkch zjJ(K;Shm@hjSX0)oj^;CR0}hf&BjJl3tj$P9AZ!&8%V}sI0J?F7m-$!M%)aFNIWwz zfG--_{r_vuwaqofH7Vma0J!dSB9G~#AY9)`IT>dGh5@XT{JsmY4y5G{VK4BTi2SPS z32M1^V0>E1&@T57@4j15mN6m7DM#84;y$7r_tr()1>jyoQOa;`dvQI31D8jZOJ zb<)KLQNevgIqspK!XW#i?XsS<55#@PGWVXrJ4}@Qb^*mhAY5b0Hr%@{5MY0_K8}H# zVGN|@xYxTN$1{L(Ja@F*pQFsa(hl$LLvSX2uM_2%9tCN+Cdf5G?w}qdcI z#^)$H(@W)Eq8!r`Agzxv0u8up)!(?t*LMHPlcQf&L2eb~{@}B#<(~4%$(S1)Zei5v zq~*SY3O1*{t@uj36>^hW2)UN~KFa)-%sG~ELWsxFJXY!QKcS2+NjaX?!S|3m2N~L> zK3=?q-b3zZ;L}}{lkrE8oAv6DNxPii3m~nJcjQ;Dp^ts!eS?qlp*~F zq~&bL*@jw2sFsN`OqW5l&;IfHY|v2a2~Z|2_cjpqHK}SrxvW=aMji?7m%5P2^s0gJ zli?*@WX?I$>4}dCaRiI`!>Hgz2JLcfam}-DIyJAx`Jg+6O07@x{W;GgVilpL;=2@9 zmU+G?tSs;xQCJz^d7-e{jXW0=RvSP+Lo4NpCFDL=d?_ZM#R_v2>KUytpYUpbD$ElK zzQsONm^)g<)G5q23iVE*FjunLKMHfjVt-)$D@@O+{h%;s1qthlS*485f{*90IJ5bJQt=TO!Nm24R4Ly;;NLmCjMa0oNR@~+@~29?3Hj$OD1Keyh_(Fy zP7b!1_1*(2M2%b%hWFk@+zP&a4A-3R`8_>28rT2Uhgfc1PBhy@#_J}>e8@Qc9Q z@04dO*ptA#Y_^R5b{Veq9R}2Al;Kuj zJs#TM?&BMf-{Zq8laf0rUB%{9h;PfjJ-KQ@#=SJm%vV1UTQf0_(*7G?(EH zA2z_>*qy|I*uTehrY#&W{~udBHHbaAnI z$HqIGp!pg?G89j}1|#In&5j85;+)7042+@oc%#3@r|{YVotWBpM^zS0 z$}md5GRQg^Z%9`~UdoWl`O;;g_o{!dE)OH;>nft^FUtPiI&F literal 7755 zcmeHMeQ;FO6~CKoaK#WJM2kY}D=Z_lW(g1(RGcOx8$R3sLV|Ww9-G~lyp_%Fy6-I# z2Q4uKd4|>WgHD}kt+u0o*%>>EgNhw!DAA72pmi9=c1En)*;G2ksz@!8{(kqq2agq} z)Bm|UXYc*pbMCq4-h1xn`$06;76=4{7b--hkZ3R%YDDJ#%N3_lXyQ^aM|?|67ZZ?0 zUgI{%fHV{!RUt13sswcack~BCq^ZCp@{lbFkq{^==`y52EH7#mKQvj0&@Y1_QWFZb zf>>4+le}FnA=7e=GQaUkTKY z>cv{{{q~(g9*O1IzIo|X*SvJHKAp-GwnVIKWP#$bEcwe;b>d&OgF2^yShfztz9YZ= z?w223^2WNyN1ilrhS*n^3pfD!Il=y2B=i-l zb<0ksGJ3%>lETU+HW{`s?QAA3|1DwV@~Mp7EpkRapUn%)&Zmux=rwvR2zI41Ns%`a zo4fPbUSS!Tq@5MIPW@0D&)a%$Je5ICPj5Ek=ICNsY{k+ReLF^w@AJ%cgiG{$h8Fyl*vn8P?E z#C41>6{3ML{JW7cI&CrIYK$La)Vyxsc&M}x74?r)&Jbc~;Pm+T_~3rKs*yI zF(U2a-}v=Glp3EM!oS3`X{E{J*fA6vpG|8`^2QEJOsh@0`q+MnX}w7oAA43}w!+ki zpOBcXG3O8uOUzc8?9#Dq60>#YV&a^{Y^B*myisDd)?7}!Mq;+wTtnO>F5=!|4rz)J^ANcz~MT)el9hhuT9gahdrYtr?A;VC1wPccP`y=zb3B zXjCeOX%riUm2ONA5YFx-)H-`OGNm7$K{9&qW-=xhIhl)9!{}Wn7%qMI<@mU(erzK& zNTn~bf@0@Ur!GvzEQdJ6Txal3DlXnm#ivlXdo+5qLck14l_sF77kj=7x#(YzCsV}^ z%BCUf>Fsu+?+g_VI*nnc1HJ31F4AvGKZf9WratAGdZW+OJ(x6Otg%@2Td-A?L20e3 zGe%WMF`r&s11UMC#lrsL{jU~(VS?ohF30~+^dS1cxl`FdLD+)%3G=sxYaKgW=j?8! zbderhdJO7{laA7y=)R%oKBqcN?0592lTiWJ!j^%%9Yy%j@mb%g6mpQDgFcHAF}RZC$N-RuD{ z#@4_&hN36>57Ngs=y%-Zo4~`Jx6L14zpgYJjp-lx>`E+u$7c+s!wtpfs%g%fU!ai# zAtdJ>I&h|9@T7gMn#V(};l<8%9EcE-jU15ipS(=LfziMXpBLU8I5^{u4f$Y(~pv^R_lSIZ>EKJfB2L>*})&Yob`8sT|u(SvP7kXInET zigebpHQO|_L^hK#5_Sp-?5wMGqG)&3&Vm-~jYev-0mXSEm+sTBMcS?wcekYd(<^V% z5VI|B|9gCV3F7C``5O^)M1PK$KF1KaZ>xJ7*L>YKi^AUtz1vYS9L=!_#4%{8IHisqW?hbmiYYIg*iYw8B7R@F3AEU&3+ z9;vBqK2%fPJX#ZK{zFZWi^x{cHk9RxbunD*fr~wGu?M^!I6N2(Jqse{W=GlX26XU4P7;J(Sb*}eyHrbqlbFplElVG!>xT!*dz zF>sv}IJt2>GC^D$dENd7Xcy{bdOKp?wP+ac(2TK!Ws}IqlA5KRClI#*Bl&*^-k-ff zi?#Wj`OIOrGuZwyzg-BN+h3k1L zDI!E>+%iQZ*_VMn72A2macw*g=-}mzH04zym$pSDl}X{>Hn!j&HmAVKCgXNoL=02! z&c}NV-AtmShg1nYp3leoR0%JAcLHKi9`8*hP;nLt@fVS`D2-i~B_fGzZ!h*>ulxUJ zOrNE%(AVU<3;_Mf3*<4(0^v$2<>dPb7#gq_B@0E@#J$gtkSC{MzG+|_Bf|~s6UzPw}@#GmE-J#z9@XX`sptzU*Bhp|=Ij+IgUn6$}GOU;Scmb~c8o57%&#|DK zd{=~A$<0F~>*e@<0P^(l-RATK^wGvKpB&eC4nPy~yg(V!zd)Y8Cdf5Gj`etfG7P6c z%%^?4?JtL%$3xcH^p{9eUjs7{D3@1B`A;5+dkb}W;U&mTAj1t_k}=2D3prd^4x{34 zB7^UBv;jq>&-?W?VZph~m*MGy=vM;QBWAiU&+^??VO2BN7loBVt|JPo9^iVRu$qlr z7Zm1*s`;-lS1dKp6_#Rhk5!m6SM9wD!$}c1KNaQ*B?RZ8!t&CN_Z|=Pq@d0Uice2g z^G9Jg3j*hf!t6OAI3E<|s3^Zzm^;5ZV<@avZ2GanYUX--c%^%?pkFFJ28)6Ihfpa` z7VyKfcp9^%KQXQpJmH)Rl{n$}$1Ny69%qZa`U6-wSfa^oe}$MNBEUHxZU*+wRpj3W zEMKb-2T-~jG3PHL;HjdBm}fC!%0GsfXD;G^n4%tv2oPvbxqXL_f7LBuzcY|x)yu~nCmnk^w)?-%jADuhMzCPe7W)JqrN}+_!@Nn z6}Z)H&*c@<#6N-kZ|rA$^0cqkw-^xD6T`kZBDVkLGJbm*)`4SgeYF_>B>C=mv-~Dt z?l63rM$7lI>fxY_JA0PSn zEMJ8s$XgGl@WhhH+m>DE?v5nzd0=JBT0OR6U5BoVq>(pzQWnmky4|ZM(%Fn*;ql}v zS-PIg>OJXfS3Irbt3%$>0hO+`gg(Qa+CS zNFwxQvDHhPWBTg0wsp}Cy`y<)EJ}6qJ4(VTNQ?2UrlVay*F7EWE$p0*cvsqh?3Trg zB0Yw!=MuVY7BZV6U0Vdtz3QurP+xJHn$CTD(G7VlR=T}!IDP?s1+x4Z>JyMZ2mO1l zin6af;8|JSjAxRxuk1UM{EBqGrm~Ml7htj{*mv@?lb^4?M)`9vu;_BPce``Cc`v#M z7XUX)ew9)WaQ;&AyO%#hU%6Rd>-t_xI&N9;MfZc4UraqW`g3$0!{fOH$IbKL^G8j# F=D%8vw&MT* diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 775af47e..9ba7c680 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -5,65 +5,114 @@ #include /* used for all socket calls */ #include /* used for sockaddr_in */ #include +#include /* include the dtls library */ +#include /* used to implement sigaction */ - -#define SERV_PORT 11111 /* define our server port number */ +#define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 80 /* limit incoming message size */ +static int cleanup; /* handles shutdown */ + +void sig_handler(const int sig) +{ + printf("\nSIGINT handled.\n"); + cleanup = 1; + return; +} + int main(int argc, char** argv) { -/* CREATE THE SOCKET */ + /* CREATE THE SOCKET */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int sockfd; /* Initialize our socket */ - socklen_t addrlen = sizeof(cliaddr);/* length of address' */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int sockfd; /* Initialize our socket */ + CYASSL* cyasockfd; /* sockfd for cyassl */ + socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; -/* create a UDP/IP socket */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); - if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - perror("cannot create socket"); - return 0; - } - -/* printf("created socket descriptor = %d\n", sockfd); */ + CyaSSL_Init(); /* initialize cyassl */ + CYASSL_CTX* ctx; /* initialize the context */ -/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + /* Create and initialize CYASSL_CTX structure */ + if ( (ctx = CyaSSL_CTX_new(CyaTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + + /* Load CA certificates into CYASSL_CTX */ + if (CyaSSL_CTX_load_verify_locations(ctx,"certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading CA certs certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + + /* Load server certificate into CYASSL_CTX */ + if (CyaSSL_CTX_use_certificate_file(ctx,"certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading server certs certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + + /* Load server key into CYASSL_CTX */ + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading server keys certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + + /* create a UDP/IP socket */ + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + { + perror("cannot create socket"); + return 0; + } + + /* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* Use Datagram Service */ + servaddr.sin_family = AF_INET; + + /* host-to-network-long conversion (htonl) */ + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + + /* host-to-network-short conversion (htons) */ + servaddr.sin_port = htons(SERV_PORT); - servaddr.sin_family = AF_INET; - /* host-to-network-long conversion (htonl) */ - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - /* host-to-network-short conversion (htons) */ - servaddr.sin_port = htons(SERV_PORT); + if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } - - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - perror("bind failed"); - return 0; - } - -/* loop, listen for client, print received, reply to client */ - for(;;) { - printf("waiting for client message on port %d\n", SERV_PORT); - recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); - printf("heard %d bytes\n", recvlen); - if (recvlen > 0) { - buf[recvlen] = 0; - printf("I heard this: \"%s\"\n", buf); - } - else - printf("lost the connection to client\n"); - sprintf(buf, "Message #%d received\n", msgnum++); - printf("reply sent \"%s\"\n", buf); - if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) - perror("sendto"); - /* continues to loop, use "Ctrl+C" to terminate listening */ - } + /* loop, listen for client, print received, reply to client */ + while(cleanup != 1) { + printf("waiting for client message on port %d\n", SERV_PORT); + recvlen = CyaSSL_read(cyasockfd, buf, MSGLEN); + printf("heard %d bytes\n", recvlen); + if (recvlen > 0) { + buf[recvlen] = 0; + printf("I heard this: \"%s\"\n", buf); + } + else + printf("lost the connection to client\n"); + sprintf(buf, "Message #%d received\n", msgnum++); + printf("reply sent \"%s\"\n", buf); + if (CyaSSL_write(cyasockfd, buf, strlen(buf)) < 0) + perror("sendto"); + /* continues to loop, use "Ctrl+C" to terminate listening */ + } } From 5ce649749735c0e9752ba2ee784737efb9fde0ae Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 19 May 2014 19:30:32 -0600 Subject: [PATCH 007/103] P1 v1.3 --- project1/Makefile | 20 ++++++---- project1/server-dtls | Bin 12351 -> 0 bytes project1/server-dtls.c | 88 ++++++++++++++++++++++++++++------------- project1/server-udp | Bin 7754 -> 7762 bytes 4 files changed, 74 insertions(+), 34 deletions(-) delete mode 100755 project1/server-dtls diff --git a/project1/Makefile b/project1/Makefile index af303313..915d3c61 100644 --- a/project1/Makefile +++ b/project1/Makefile @@ -1,17 +1,23 @@ -all: server-udp -all: server-dtls - +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include +OBJ = echoserver.o #if you are on a sunOS (System V) machine, you'll need to uncomment #the next line. #LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) -server-udp: server-udp.c - $(CC) -o server-udp server-udp.c $(LIBS) +%.0: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) -server-dtls: server-dtls.c - $(CC) -o server-dtls server-dtls.c $(LIBS) -lcyassl +server-udp: server-udp.c + $(CC) -Wall -o server-udp server-udp.c -I ../include -lcyassl + +server-dtls: server-dtls.c + $(CC) -Wall -o server-dtls server-dtls.c -I ../include -lcyassl .PHONY: clean diff --git a/project1/server-dtls b/project1/server-dtls deleted file mode 100755 index 1c9e62e711f31cb115d06abebbedd87ff02862c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12351 zcmeHNe{fXSb-pXD$Qty^Saxu%glDoOIDtiA@W`<}m5>&YBS1j{JLBTVYWGQR!)jOE z_f|+QY0${B*{JKPPRKZkr$hgU9T9ORZZi+2}aGP;ynov*TX{n7ftC&ob#HJ*{ z-hSV`@5)aLcH94THAnY;_ndpqz32XTZ{Iy%h<0uc1Oh^*3Q;MDjvfkzHXtwFsyG{j zA+8gv#7D#}ViBsy+i(yvAOj6ZRj3PsDnUKKJ)^-8=>}jDd8n3zObE0ky?nh8B(@jz z9)CH?e*->f5RDFiXqWs7WYyqTgGZVLCXr7YBpdQJY?Io7Nt)O7x|;~YUidGAAxYqc zef-aW4|r9gewY_K$@le74~qIZzO|`j@7h#iO)8nr4M&_zWWBP@w&ZWwz6<}=IH+?O zh;17{^d0%(=->YGg@4$8tTTP?8&7Y&;rrD)Uc5lwEg+7c?GDlFueU5=-G@Q9f;L5e za`D;M9zW3hn~BC}KKTV;4#nZ5_g@Sm2+ul8XB= z`7rf$m&qr~_;;1@50&8^K6wM><33FN&p>|gDE0tSJyyv-0w0*eH;Yk^&$V;CxLK?Q zUi}xrkivE1*u3^PiyY)ak1Bmj#S+m7egovGf2qLoz`Bi(#2hEZMY~a$9X;F3gq5}W zla6a;d$zTuGHI(P)|;|~Y4#6f(x&6avaV?g^WGtIrzh8zf(pw~&9B+GZ6wy+-Dzg6 zSVEY|bkY@GO+w)ShdKbv$d4cIv6SY}r?ITUlP zPg^5qUlLvQba!}mdOEv@)|u-~$I8NrIbgYVCZUD2j<}U|lYL28x0Dk6PbZ~==$kt* zxE&aLBAKSigm5zPeU>Y%VT{FgGwGE4?+9lwn@qcXV$jNFGg;xd*_4$QPO{$`7<5M* zG#Ri4nDr*p(Bi_|kV^K);vBZ<^O~C`r^fU4KrERSrj>}fF-$|RXXSDN}nPV=?c!@MT^xst->Kx zjrI8fn5t)v1FL~K7UVMKIN%$ZwK<@fdWq>_dyrU2Oi$ax z#Ix_9VkJFpA0$36F+Fb|B0eiIXTY8$J}EJ0!hVAIsKlHR`v~z7i8(X&)5Mb!bB64r z#0P=b{qn*5e~n$3?dsWS*W>K6k31F(eP*|PJ|7Gfm!m&#_D%Z#CK|(2etg`4x;2CN zH+Ff^{=n36C>EIKOS|%~k6m0g9SoCKI{V^O;d^8qCzSHfU#`f%@cb{92hRTMIu z?`6Xu>4y3Ca8Nh?(Th|0ONHk?PKkr}xKJQ+H%R@V;sJE=bQS9YFa8!i`|A)k5bQ74 z9l2?)BjlhXGb3m+Ipg4e-{hp?PDDe6nkEcCAH9;V4i|^sE|sRMhN%@c^U=#=rH(&s&&j&)Qf%}E zK1%Wp;bIlg37#Nc`|oz4VtPD*PEi~qCo|s@4(8o(C_lax?0lge|BIhsalD1a5;j$S z{B9P1j2`EM;o>W@suNZBP*L6ZM*J^SZNk_lYUq0mkG?H-qrnM|4z}bV$D66Ruz}hZ zfmx{fEE=7lmWjhuh)ni>tGhD zzD-lqa+N9Bw?dervwtWvHFcG#&tGNAkfs{hzDb&@nS6g!%P9I2h|U|;3bdNTyn?^q)7K)9^d%kSh<4SIZV5wrGR8eDsHE)(SX5F>9ZLQBLX>X!91= z%nE3bYx@M3S7FzAObZnQNX4wpj|Zht3k9ip*U8fl-^h}Hlk=U}6n}3~`}+1dV1M z!>mt4FOQz$DfQr+FA`MqW=2@R~v&VE9O{6+_vKT4A-^{zQ@k#R4=aYrB`w1 z=`L&Vf7HLv8o5TdJ@sHZUe7)4p7{GHkEPQY*NEe--?a?yg_*CtMqdoWONjlkq)X5A z!AtQ}(n`C=faN%`e#^+DjloRTHC84T3)_li6DS$IBd+Bv79EDFaqXn@DPzS-XT@TX z$~dlcTs)IbTk>7na5J9P#bTSM_M^~}wc=KC$b#amHJBPP9NJY{P)xWP%=;~scVQjK z-{#eqN~OC|K7fV37dbaIe;0H6F$EslDFO#Vfm^DBLH^z|P}c}L^H!;J5LncPHrH0) zTerjw4vRnf&|RNcA70Un>K0G~bj6U1*4of`MQd&Kqm^y7^^XKwYa7O@w%0aQY^`l* zovN*GJzZPfI$axT{XuPzXWRkMR~(Y$Zv_bYz%3Ig-@9r0W5lrqoY zzM1#f)eqxd1o=f^TxW=vpbys>@*V}(5i;?cf;bus@pl_Pk?}Vqt}q0yCq&mH!4S(W z$axpY-+8=4XGih9Bx9f+A2TxS?=144j;k>M{=X9M&vk>%xEtIJ>H`gd9szv?^c3iO zpwpmppr3;-ffgY~;3m+=KzD#PgLZ@ZKtrHMKwkkp1=2RQw6%T8ShcG+mv(c;hDdW{ z{hD=m<|JHqo2n2VH=c^&YXI)(99)GNw?{UtS*HYVH&(f^erN5@XlJywJ8Is(VJ&Xw zVyWAVRlWFblHlip&d%N2*yc7NBF@Nw8|y{xW>s$M67J@#?4XF?!-N%S-PExLdOg&i z&P952NnGP66Cy%n#~fQk5+iBoQ@NW}9Iub_fC*mKN>N@F22-wx$ji=%YYn3;Zxkch zjJ(K;Shm@hjSX0)oj^;CR0}hf&BjJl3tj$P9AZ!&8%V}sI0J?F7m-$!M%)aFNIWwz zfG--_{r_vuwaqofH7Vma0J!dSB9G~#AY9)`IT>dGh5@XT{JsmY4y5G{VK4BTi2SPS z32M1^V0>E1&@T57@4j15mN6m7DM#84;y$7r_tr()1>jyoQOa;`dvQI31D8jZOJ zb<)KLQNevgIqspK!XW#i?XsS<55#@PGWVXrJ4}@Qb^*mhAY5b0Hr%@{5MY0_K8}H# zVGN|@xYxTN$1{L(Ja@F*pQFsa(hl$LLvSX2uM_2%9tCN+Cdf5G?w}qdcI z#^)$H(@W)Eq8!r`Agzxv0u8up)!(?t*LMHPlcQf&L2eb~{@}B#<(~4%$(S1)Zei5v zq~*SY3O1*{t@uj36>^hW2)UN~KFa)-%sG~ELWsxFJXY!QKcS2+NjaX?!S|3m2N~L> zK3=?q-b3zZ;L}}{lkrE8oAv6DNxPii3m~nJcjQ;Dp^ts!eS?qlp*~F zq~&bL*@jw2sFsN`OqW5l&;IfHY|v2a2~Z|2_cjpqHK}SrxvW=aMji?7m%5P2^s0gJ zli?*@WX?I$>4}dCaRiI`!>Hgz2JLcfam}-DIyJAx`Jg+6O07@x{W;GgVilpL;=2@9 zmU+G?tSs;xQCJz^d7-e{jXW0=RvSP+Lo4NpCFDL=d?_ZM#R_v2>KUytpYUpbD$ElK zzQsONm^)g<)G5q23iVE*FjunLKMHfjVt-)$D@@O+{h%;s1qthlS*485f{*90IJ5bJQt=TO!Nm24R4Ly;;NLmCjMa0oNR@~+@~29?3Hj$OD1Keyh_(Fy zP7b!1_1*(2M2%b%hWFk@+zP&a4A-3R`8_>28rT2Uhgfc1PBhy@#_J}>e8@Qc9Q z@04dO*ptA#Y_^R5b{Veq9R}2Al;Kuj zJs#TM?&BMf-{Zq8laf0rUB%{9h;PfjJ-KQ@#=SJm%vV1UTQf0_(*7G?(EH zA2z_>*qy|I*uTehrY#&W{~udBHHbaAnI z$HqIGp!pg?G89j}1|#In&5j85;+)7042+@oc%#3@r|{YVotWBpM^zS0 z$}md5GRQg^Z%9`~UdoWl`O;;g_o{!dE)OH;>nft^FUtPiI&F diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 9ba7c680..786a273b 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -1,12 +1,12 @@ #include /* standard in/out procedures */ #include /* defines system calls */ #include /* necessary for memset */ -#include +#include #include /* used for all socket calls */ #include /* used for sockaddr_in */ #include #include /* include the dtls library */ -#include /* used to implement sigaction */ +#include "unp.h" #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 80 /* limit incoming message size */ @@ -20,6 +20,24 @@ void sig_handler(const int sig) return; } +str_echo(CYASSL* ssl) +{ + int n; + char buf[MSGLEN]; + + while ( (n = CyaSSL_read(ssl, buf, MSGLEN)) > 0) { + if (CyaSSL_write(ssl, buf, n) != n { + err_sys("CyaSSL_write failed"); + } + } + + if ( n < 0 ) + printf("CyaSSL_read error = %d\n", CyaSSL_get_error(ssl,n)); + + else if ( n == 0 ) + printf("The peer has closed the connection.\n"); +} + int main(int argc, char** argv) { @@ -32,7 +50,7 @@ main(int argc, char** argv) socklen_t addrlen = sizeof(cliaddr);/* length of address' */ int recvlen; /* number of bytes recieved */ int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ + char buff[MSGLEN]; /* the incoming message */ struct sigaction act, oact; act.sa_handler = sig_handler; @@ -74,14 +92,13 @@ main(int argc, char** argv) } /* create a UDP/IP socket */ - if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - perror("cannot create socket"); - return 0; - } + sockfd = Socket(AF_INET, SOCK_DGRAM, 0); + /* setsockopt: Eliminates "ERROR on bind: Addr in use" error. */ + optval = 1; + setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const void *)&optval , sizeof(int)); /* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + memset(&servaddr, sizeof(servaddr)); /* Use Datagram Service */ servaddr.sin_family = AF_INET; @@ -93,26 +110,43 @@ main(int argc, char** argv) servaddr.sin_port = htons(SERV_PORT); - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - perror("bind failed"); - return 0; - } + Bind(sockfd, (SA *) &servaddr, sizeof(servaddr)); + Listen(sockfd, LISTENQ); /* loop, listen for client, print received, reply to client */ - while(cleanup != 1) { + while (cleanup != 1) { printf("waiting for client message on port %d\n", SERV_PORT); - recvlen = CyaSSL_read(cyasockfd, buf, MSGLEN); - printf("heard %d bytes\n", recvlen); - if (recvlen > 0) { - buf[recvlen] = 0; - printf("I heard this: \"%s\"\n", buf); + + + + if ( ( recvlen = accept(sockfd, (SA *)&cliaddr, &addrlen)) < 0 ) + { + if (errno == EINTR) + continue; /* back to while() */ + else + err_sys("accept error\n"); } - else - printf("lost the connection to client\n"); - sprintf(buf, "Message #%d received\n", msgnum++); - printf("reply sent \"%s\"\n", buf); - if (CyaSSL_write(cyasockfd, buf, strlen(buf)) < 0) - perror("sendto"); - /* continues to loop, use "Ctrl+C" to terminate listening */ - } + printf("heard on port %d, a message from %s\n", + ntohs(cliaddr.sin_port), inet_ntop(AF_INET, &cliaddr.sin_addr, buff, sizeof(buff)); + + printf("made it this far"); + if ( (ssl = CyaSSL_new(ctx)) == NULL) { + printf("got into the if"); + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + CyaSSL_set_fd(ssl, recvlen); + str_echo(ssl); + CyasSSL_free(ssl); + Close(recvlen); + printf("reset recvlen in the buf to zero"); + printf("I heard this: \"%s\"\n", buff); + } + + CyaSSL_CTX_free(ctx); + printf("CyaSSL_CTX freed up\n"); + CyaSSL_Cleanup(); + printf("CyaSSL freed up"); + exit(EXIT_SUCCESS); } diff --git a/project1/server-udp b/project1/server-udp index f0142d498503d48818f347d4c38e41a865ed893d..b502159e49ee1b1d0432e65dcf776969311905b7 100755 GIT binary patch delta 2548 zcmZ8jeN0nV6u+;1h1c@cQa)N>w%X^wS+OW%IGLiNqG7REKRwWVeXSJW=ZcfenTKQ&*YeyUK#ux_T0#7t{!OkzyUdLuHuf>rETL_c{{l;Yxf zr~0*prN=}mKAEvH;wg+(ddH>UIs|JE9L;8|%R3ngg?xj}n&4Y-_I@pG3h-=kbWvzF zdAi*Yj_F|%noSYhy9hJDf{9oBx4pmKbGp{Mt=Iy0-vLp2X@h$oH*4~WDq%a%iGSXQ zaeIWod8!LZ9#r{9z2l}UqD;Eb^`Sub0IALsoaf|wGx1i!9+NDSa+FR;uqy$F1#C{ zEm2WGiXSWt2P_4CbuRGxh}3`#OQJy(-!fV3LRN}#69&FPC3O|0-u)!CEu31UI0(0m zwCT`#5WOq?2g0kw?v>X2;K1j!q(C46#OpPfrt_^i`Sr3GGkGtC^K3G{O*un4Y}3G z_NdK8V1Er(;le6hQ>&nOQD3A{nsgnuXp#Z3{`6NPm=l7rU(oBZpYX5ipt9}t3zO&& z;8YtZ*XGHgK*Qmwzp9M|p$(P6zo2Umtjxr@AJ6I9fpzpJ;&26h|MHpI>UjDz+5lI0Q>(5h04I&VM?FMIh1e^Tt=90_)eW|O))H#Z#P+5 zm7KUXC81etWlOUbKeIrdWrbxah-%EGL%1wi@~M_5Y1VqxYP0H6AW;;HA>IbE@-KDI zX^vs$>c6kc6uCY@p6TomB?kynB?sLRwExxnMF|%Kllh#K`G%2qa2o(!Z5JinqwF+q zOtF|-F{2(CK_Km(x5pdUeZ zK@UK2K2gd5Jq;=XtpaTTHGtmm@g@5F{tNnif!{R@sPqE=ICX}W${WGzPxDKu7A+;} zP%}1*PXJLFCxIM1-DuGa0}b;P|kOz zTQudkg35VMx~+gNBPZ?vN)jE^B^r-FG*>PfaI%y6Xu3^k=Gu&0jXeY1b@Jsw&Y0fhfK=w6n&*1HqLxPnz0BXm;M?RMDVIEdkI_G#hOO{V!eOk4*c((PmIaJUUa7~x zQrH~&R3iiVJZ$m*1*{sFp2IpArDCP-7=3FD?gVx{DbUOg0Y|rq{Ck0ESEwOWz!Bi7 zR(QF7(Tb$i?>*Wwjf1O>bORn%7+kVCT?|FC0m*J0h;Ml1S>crD6RgOu2$&c zwcf3G#t-+A&29eh&o+ZBYH-1TqKiw!n8g_5B-5lUY+;FC+hE=E-rG9lHs|Ac-{-vN zJ+vydp4GRC^wX4EFLiReviJ2FLb35+dkJGIj4Nny-$M3kv0@G9Ia ze3)(f<*R8M{GZ$(Sibk074O)-t!sUF*97k*ep;{#llUcJmavkK3Wck7!(-Caxt-Qv`;bS$dqG-q4T=4?7sgBcF?M zvc&Hu?U=QuWk`;efE?^e%3&iNN`25W^2M%S?a{s` z*I9z|%J~y1KVSFUxZ0yW*1Beq^Wb7KF~40OEJybvsmoG1Uy-~Z;EhCJU9+w_I5Yxk z*lh_{$mdD$A82Twdzc!vVn}sI``q26L7!XC200L|ZJ*CD*xxdnB!?O$}= zy^G0_rcFVuNf9hl6_x0N(O9f6V8kEXf)IMtb2NiibxX}qC^8L1E0a|XZKTNBdW!rM zqrH9ZTPB7)h!su7T<5mW0ndF0Hod2}EiIII2~yiBiw>OUKw8w$$NFTvMRi;3B;uMT-ZSv6FI5Ye0eKn2Q8tGc3f>d74F zRex1W)X-e`)qs{yO}j#Mr<3XnIjEyU7#P;b9IomPcajZz7QUcU_9H$td#0BMdaYG5 zqE9d=zI~JQMZJc!=&Zd5$6zH6NZ36b?4^UgY4e7+d%Tesy%FOVsajVYt6meGiRA=) z9!&tSeSXlW6j@|h`l$q{(&G5%)CWb;BeTqqvimhzIcAH9PeKc!@eGp>h3`8yO? z^jn7{r&IB;MU-*vFdv_tR%q=yggXc5T2Pd6jj|)WAuTt%9zEJkD@qp1QH-H}D?gEz zl~D(TR2nJbFxut7yg#M%Sh~frpjDKYqg11KQTC#|kHRhKIlMf5Zbj8r|1O{3S-Z1l z*LLULZF`y<8h1HM3QFe{`*lx=Gv8OUy}59;+v8rc#=W_uw9wnIt7hkHXa3fj=52LO z&^?~&3K}!JqdC1$;9pzMn1&gD%QoFi%jv=uaD)eKxn@diIh35vPXSTdbwEzuZ_AZh zfm-<^Tb`K~cNF$|KEs}CCV3tLT<~xzT6Bo!mEI0AcH9~jFF%*)4B&5$2 zlNj40@{jG)B_G}cAHQJFGap9pu$i%oddLyG#jJm=Ah*J;8M)>r9Ihsyi0=1f+!0({ z$h7maOpD~gh3n!KnR#Zqddo4dNUY4!_{2ptF&^^l;U_Zlg!BAT<}9fR2k$!nGc!+e zO=T>FXHVW2AaRJBWTeYT9s^IHhLJ!9)*D6=85qgqA)yRRC&f5P2BvQ^goRKB)^8s} z5Ezmeoi{e0kt7Cz-YUjO7z3y2m}D_9>C0FXUy{{mB?%0xL${Xmi&?K0yW&UNgy3{f zHI2bbfD=cb{Of?rd9fqcbUnmZJ6;h+c$=e9XyQV4uC)jQX)A4}R91(*bn#+X^$#7a z>CC|n!|LNT*>eINwAb;6{ux{%emp&5-WcO|!ao4KEbh0O9PAI^qgXV}XJu(@bPS*3 zrO^j4{t%u^82lPEHkKM-W#b5*ad;E3=UGD8td{(7We|Yv04CKF3G4>`f2rB*0P)`! zTf66DtP5=M^ From a13f8b84670e82d719488beaac866ebf545c64f3 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 20 May 2014 16:52:19 -0600 Subject: [PATCH 008/103] P1 v1.4 --- project1/Makefile | 9 +- project1/cyassl-3.0.0/aminclude.am | 2 +- project1/cyassl-3.0.0/config.log | 2 +- .../examples/echoclient/.libs/lt-echoclient | Bin 0 -> 12910 bytes project1/server-dtls | Bin 0 -> 12695 bytes project1/server-dtls.c | 259 +++++++++++------- 6 files changed, 158 insertions(+), 114 deletions(-) create mode 100755 project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient create mode 100755 project1/server-dtls diff --git a/project1/Makefile b/project1/Makefile index 915d3c61..b5a7f921 100644 --- a/project1/Makefile +++ b/project1/Makefile @@ -1,6 +1,6 @@ DEPS = ../include/unp.h CC=gcc -CFLAGS=-Wall -I ../include +CFLAGS=-Wall -I ../include -DCYASSL_DTLS OBJ = echoserver.o #if you are on a sunOS (System V) machine, you'll need to uncomment @@ -9,15 +9,12 @@ OBJ = echoserver.o #LIBS=-lsocket %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) - -%.0: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) - +all: server-udp server-dtls server-udp: server-udp.c $(CC) -Wall -o server-udp server-udp.c -I ../include -lcyassl server-dtls: server-dtls.c - $(CC) -Wall -o server-dtls server-dtls.c -I ../include -lcyassl + $(CC) -Wall -DCYASSL_DTLS -o server-dtls server-dtls.c -I ../include -lcyassl .PHONY: clean diff --git a/project1/cyassl-3.0.0/aminclude.am b/project1/cyassl-3.0.0/aminclude.am index b6865f31..f0d56bb7 100644 --- a/project1/cyassl-3.0.0/aminclude.am +++ b/project1/cyassl-3.0.0/aminclude.am @@ -1,5 +1,5 @@ # generated automatically by configure from AX_AUTOMAKE_MACROS -# on Mon May 19 14:54:12 MDT 2014 +# on Tue May 20 10:37:37 MDT 2014 AM_MAKEFLAGS += -j5 diff --git a/project1/cyassl-3.0.0/config.log b/project1/cyassl-3.0.0/config.log index 62f6ad64..b5382469 100644 --- a/project1/cyassl-3.0.0/config.log +++ b/project1/cyassl-3.0.0/config.log @@ -1079,7 +1079,7 @@ configure: failed program was: configure:18379: result: no configure:18277: checking whether pthreads work without any flags configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -/tmp/conftest-c6ef02.o: In function `main': +/tmp/conftest-c8fdce.o: In function `main': /home/khimes/work/project1/cyassl-3.0.0/conftest.c:49: undefined reference to `pthread_create' /home/khimes/work/project1/cyassl-3.0.0/conftest.c:50: undefined reference to `pthread_join' /home/khimes/work/project1/cyassl-3.0.0/conftest.c:52: undefined reference to `__pthread_register_cancel' diff --git a/project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient b/project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient new file mode 100755 index 0000000000000000000000000000000000000000..b247a976c2856c7f70a34da8efc3e1c9ca8d2271 GIT binary patch literal 12910 zcmeHNe{fV)mcE@d*kVW`vP@70pW0wh=p+zX@W)O<0*FS9N%*nl43AFtYr3V=-FCm0 z#9~*dCQ7F1nv9C2JC22xqgE~BP&K=jv$!)jQ5a{eUDlap-P&@(Qq%ke`H%6o8CGIm;l$f#WEf)DBG2vd-Vz(E!Q|>_J{o5HgaM z-wrw8mjdmhc+my9yMAmtiTS}qLo(6Zkc=)$CQ|wSP%a%>tYpkf`RZHO;;(84ZPtO9 zcP5B^NBNI)%isIef}?vj-hS2cCmQei;+1(rgOn`pR<9N16A^+|N z{Q<6{3q_4+pQJxqJc9HWhgAL<;sVhQeH;3;H$z}~V9iDb!ns_M3-%geuIahOj9OW1 zb0TM3*`8b4lIfJy6Yfn~!ZbJcrBi0k4rguC6y{BLn_Z4xTM{O$oXURI%xweV?(PmV zWo;EsG;4*UjJNl6bl=@%Mv@6DWt)AL9ZyGvnMfsUtrQBq|@Ohn?*1ajHY zblw(;6q*-~MzbQ8$wRfz>WjcgERsy;IH(bOAY+-m>_!1w@pR7a9Y}@yETYKPsEDZ^ zF-^`DXZZWVsDWuk!*&=ZdUNPhP75TZqM{+5?z0-U#1nm1u3>9ByQLwMP2Y(TY-&(* zZPAiYW2mtqmyI-pU^FLIcdS{_W-dl&>DZF-7`J!1_g9Sn}ML9&&t?H<07J z@J;erLTn=cnh;TPe7xi27h?+{zeI=(`5f#oNZ;tj-& z5?@ceiP(_1g_sQ*t(CZ)I72KXzLB_}_=7KyFt3AnJMl4zJBfD@ACb6+c$oO0#2bho zA>J?XH;MNW@0EBH@w3Fk5=V*m6K|I|PW%FKM&cy#LE=pkXNZ46+$ph5e1y0~;(p>c zh#Mu|MtqFeka#bGCmsG1f5JFYz!jkI$n=Bz}mvmiVB= zj}X@p@0a*7VuN_E#CwVBiHCuk-rG3zpM~QeboO+`Gx)y71^(Q=E}r_XKTv)P6*?6g zcK<8R368k&3qOLnMf>olaAxXO-v~QSU{0T2JM{a)$-2Y-AZ24mUL7etPtgm6Qvanh z6+=IN>D^0xNB-qZ-Z%0OGUMwy<4}9huQR{?>d4UP(u-JOSc^B%fXH7Y?FY)+&_#!) zFwOVsN2u8oWn3^&{-wGiv&Jhz2`Vx=fGoqKIsAAsW|-hxRw@{AEfpn8l~=u00q+gwqU)e**O>c>)>g{ z%m0QNv4q>m50?r*qdj!k(DgxNLnYCg2O%q*@zo5T!iEDuxr+t7GL#H1tXY4sWeXH~JK7M;-(49HTdg5@84hTcP2 zjTM4y@ztA87?bgYy#*||J=i?7EjXuyEYik8S<_n9^i|YUR~y`qVg-htto){I;ow-! zE*>Z;W$!?W&x0tNs0FP0L3Kk5gXJ-5gMad=)Am|qDq;vwWT5n7umc|_)kl7O9!2?m z=&_|uFv>1^i}pr`J|8*^ive_%e+X?|fYjw@Y6gD=ty1A?_7eMAwE$*Bc|FRdoreKR zg$0kXn2%yhd-wg;j+Rgxi!7*#t!t@X43%MIwAiDig7i5)L<>25Ud_|{0N@Bo&< ziBPHVEcyIW;n(DIONHN{K__OF3J1umONH~ur zv>ST^k=`2yaXLT+c$qBj4mN^evDd=J%<|jFTC#&d)R)tg8+Q3#n804N+(~Po*%LCY z)Z(jYKU6C2WWmmUaUm=~dv>X?7pbGqLc3J>#HraS2;HWG%5JWD#i+Ds-&iVqpQ&iE$`_CgKdNk(eGT@Ql-z zWk_|`qz>Ac<+U7vBqm1rFcdHy>UO-$&fj>4>x;8?ebd;w?s6U#+cEMn4sC^#b1)kl zOFur2k5&26(=b&yhUkJrFMUxlc-p>FeRp7P873j;C8Eu&@Yq8Ks8~4cTmDJ@t-{N5 z?$~I4YvjcAVR!gw#5uQB$`T7Kkq0$w$7pGV*eW97)Rnfu>yMF0;i6*161a1^QgN3V zPYyLitgM}Dh=dn063SS8jw&yPMkFkAFEl!FWy@JcHlH$L*>s2$FH@l=kxCo5L1zbySUQU)=4>G^_J)tqu%Uv{qN$U)fe&d!N6xdS+qDt<{YcH&)MV z9jUHuJyc!Qdbm2!`bxE*U$t$Zmyws|&xLb6aIOc=^}x9vIM)N`df;3Soa=$F?g68O zUw23dII4})O#sAvrzVf$4}KCBYjMEBPsZ}Ch`$N&jR-$c%eQF!w99M0z)!v6IDY)$ znUDD6FUHdQ@XpMed0-H~WrLT2@l&+;0qo(YX!*N1enOUkXH0=#n0S`sosZ{AzTx2~ zWwCpgKft&R&Udjo5Z}((031WpGm(xPc$#@X0Dta&)i%KYSK#}(&UhN{V^hEF56lA1 z2Q3Ay0<8nZKzD=g13e6S8uUEq5a=lA9nfje)FSeO=7W}kR)N-mVxYT0_kkV;Jq>yu zbO>}5^bY7WXe#^;W`X8|mV#D+bp2MhwOwn}ukFpJ?7Yz&S{7QosA+j#!lnf(K{(P# zGK@y(r@b({oD$g)?n@c@U1Dl?A9 zt#PDsnBiIM?q?%;-&svs|XJZVdN;@QfwXxc+VEas6w1)Z=0(fV3X>i`_`%K0-b2 zU0QE9;;bvn;oJ9%$aDqbI_PrmM}pQn2EAj@llNFhk$pnl2V8pe59&l=mvexeKs|;> zK-wPnPaBg!-<>Jfze8N>Eregs zLg)>jMenCb!!w{9W9egrU*WV3s_XbK5$897bAkK)@vqQ33OUQA9v=nDU!nIOkaH}k zCw-To#~)6a#=vqpzQ;k@9^Xn&;q8#)ssr^%qadxv?};#kcnWDcXubbIg4TNqdQTau z9Je0hXFx2U_2Uc3K4YRUkTl*epCe9tjZ8$KURK7`AIeDlj?tD5b1y?%DR6?0l5=cz z_|1Hb8#)C~!eSAK?cm(voOj!cLO4w?4#>1UM86ccA2G4g(c-?Nuqv7Ri^8e|?js7b zbhTe7tP145ps*S}{T;59JC<7KN-ovp_grDNLVf2I<|$#qH>FbUP&jWmzABZ@$aB3Z z{pnI)`>s^VnXJ~2l5@sl95MeDR;!ZhL1B&x>^tB6O6eV>=C_io9h>u5VYPDgIiXUh zQw-;&lFuTO=NYm}d5Xb2!Y9dtPH02&QzxZ&Bb6uD3!_L7R!%q7v z#B}NFcF=`eY0f$0QNA8fzTkoTkUIv>^$P}kktl)7b0IkO9|hO_;X{AC0IUP+NzpFYg;{{nW`SLY>X{*ST@OJbMXYP!O>EheKdOQq#QTDj>ng1CN{t0j=`g1M}F#oF_`5PYm zt_RbXOTMbYHhr}!T#K9K&Gg_aJop+9ZuQ_UU_JloyS2e1w>;SP;5{Dvj0gV=Soas} z|C&esTNgIao)a$2_I(EYtTTQWR@8}rYty2<4%qFhcBMzY+=FlS;5aenLl}(nq2DFv z>K<}ombb@)p9bFV)UOun<8M9kp91UshW1|p=J%QNiN1BOx%64y?|>)9d$xGjC1?2` z1M~f#=Qqx$Pd)M)wZ%e{?ZKJCg$>}PE=>6f5AFfh<+Hyxx#Y}$j|(&ZcRct>4?f_* zuK~M#2VeKdk9qKi9xNhwqOtR_SSSJ?v76eu%#JnPJ@6cy@Gms&J~;lt!!Reb*PtuO zG^1&Ab28l`kZYKDpm9ZIV^(#w-m=nMd22iUAZ62ZoVS&6Yw%-i|I1rjZ&}j@ zEtkacm0R6$+ltl>^R`v1x>xp?J*_J`R??hwvy0^N%C8XjF8pt4(T;Iw@gMck>|eGt z1jjuy6EW?0KD8y(+b?*zaUArN*Pz>+azAvZOtjmyEj%MR4x8EyQ#la2Ge{pqcY@;? zsC*131WnqM_Rv(0jS~uuT44?SE+cefbPH9FIMq>Ji4Hi6Z|2!uM3pn6+bArY-38Tj zcN;t>-I+YTu=L%WERN>VW*jerc*E3H9QPNU>;iCjQlDoVgTnBpFnB=KE?(*u+D%;qXaVJf3cXbP-r>r|c X^{i7j$6r`J=T1^``_fJbmWclYIuri9 literal 0 HcmV?d00001 diff --git a/project1/server-dtls b/project1/server-dtls new file mode 100755 index 0000000000000000000000000000000000000000..240b335bac6496a429438d4da02035e0fc7df1c5 GIT binary patch literal 12695 zcmeHNe{fXSb-pVtcmqNROb8e?ekO|zFLIb)5s?F>(`nVjb(l$}C1aD3Y;`OLhY%NA z{l0tOm7X55C+*+dowMhD_ndp~@B7|;_xwp+V|^eH5IPiyLP0eAXTeYf`5j79Aq?>; zu~vLmtP=B)L|MgQ=zt7lAk9Ns5L5_i1#UeO43TaHCQ*iDNnk=CFX`1!3qfLjQR2#P zNBp~xgNBglB#7lwUI11Ec@bo!NnjG?EQ4f2-$vP_T40ivHC=Y%L(7C18iH-mX2?id z{sqVZZwR!H;zcv%p8DxVF+baPPcqSVPcmMXOr-J$Be`^Bqq5DslyBX!3;(Jew7CMr zyr`1wJIcR(>*YsFA1M!HTAwdJdp=ftdF(%H*{@*`+s}L_*z1?87BcNl(C0y0>i%Qm zl{cS0RQapE(ib0jbNJ#P?RyC{a<+Gw70+~ zFN3|I(^!)TC788Uz$d5iN>S*_IhU7+mEtSNU-Wb^r0`-Pbhm!#X_+Q z`tLubF{UflQLHvl74Wvz}x&atws+iQ~Pl+_w-OIpG-JG#;-Gv`FJ zj%f<>;r(W_t5=hR2`i_v&zZTVJKECHXr`8wu3TG6;L6RCuwQ)*iG zn8|cBZtl0TiS};9V^JrOPUXA`uF2Zg#+LmX%#CKw%0k`jvK%`d*NQn5);^66WD}01 zMbTKy%FHS%SY+`@Zu^zFy&GrNu?^e3OS39c4tgMr0PoQd+(#3x&p>xzVH>+l% z9iCm(?>dH9XXtwCGy2#oRDHLHjEG3QhX06!%_H4Qf zSuoyN(XKiLIioT5F^b^aaEH4qnm~#bk2+BZ+HyISjwD#!+SstA#@raGn2wcm{$eUh zVw|x;&`g?&F-4^+9i~!uMlXQMT*tF( z{t~sO=3xUb!dkk8`N^@_FC)j|SwW76V<|Z{euMlLJPXLN8rPD4N{IF33xp^qUx?>3 zd65v6!q93@|k=NS3tglOrR2#xJU=NuX7 zyi16_p6gRnQ^$s#d1Ld@D?P7;_Kt|D`-0G(S`)%QM`LOYd(CEa{1Vis*0A?%%Em_} zW-r?8{_$an*_$>Wx#OoLX0O@?@kxoFrkC3p2qh=o_ zz9cb6&ptssDltdV9wZ)?n4@VwLws6dj;ei<_@u-fUHb*%L5btUr-=_sY!ja$&PdEr zw}*-MNzBo=|B1LsV$K44l(AFz2rB>b=}EvEqC%Oxe`vg^_`mDLO+a_0L`_=>6f@w{H)O{`<9jVB`lf z0BVuVPAL?mzSl42b-#(tc>{5QgyFJf;OMTtUrFg|I20{M&U! zmQPoN5>#Zo8(9X&bNE-HzPgZG+G;#($3DQS>G?`XI7KKQ>qd-SL_b{^nYME;wVp%T z`FYQ>T&O^kl^gq8q*Cv#$s-fPSmAwjMKE1zo#Lx$@6qt9NZT-czBat)?Y>}W0K8{7 z*c%Lw{hH>EhJQ{g2m?pMZ-F7NRC24wZEtKL#$@a`>NvIpd6+i=0F8>CL*WXM-*AdO z3|xd_LfCBtc+jn6Evx>0=Nre`pY~XM)MxQSkHs?d!Hsp~i=M~gvaiD82+G#2zQwf& zHL1srg-rJEUqOc6t3+>Bitgn|ZesR0vdbwop23raT~^{|rV)%+1`TGfy#vK|3?*^F z^u$<0t4G5Q5@E69ZVY4r6_J)@T5Y%-jC?cS_AmsSQHc`Fka9hgvXbslLSD(j{@?>y z*(y}FN_2C=+N^Atv&pUEfLk@>)VV5A^08srwi8r80V}F)LnvhY5dM%m$XdeU5LGV! zR$5%oMx#>eQK@CHd>EBxJ)vIY)-UvPJZT}iq(sw&UV#Ou*23Z|v=~F7sCKP*qS8}U z*Wh%nGFjEdN5|Mn!SL(MS&zOP=es@<#+a}IrqDJyY5P@=Y=h}-{>8v|ayATEnfD6w zzQ~5T>wFS%*+;6cw)MjPtID>F4?@n#)Nb#;XyXNH7pl)krHuH zHKO_4)8^yIJT`Pqmb;wsJQ~S9;7iT`HVM3%P*q$1t?IcZG^t4}{_}rU1vk0Y*3m*e ztV!_`ccFY5K<1{v=($-2QTF}RUZJ(S@AkLkAyrl@jI|cX9dJ8y`~&-wlXB-na~Qocjk>hg``v5RngCjkL|}i zmJ_qDUv8b&y^FY!;)Uk#k^cg=`@vmb+%UDfWz0gokBsE;lGHO%+LsKM54;q_20u1_ z6~*`P!N2a@*^dg2U3KnK&mr_rW$*ehTY+c=J9BF26)N_e58VHo{D1YlR=W3b^Rbb4 z77cpCl@a$n>k2A-WTcQK^2G|9g5bOChK;`;DaUUEa0xc5j=SXn%#g474;X853&et! zhOG@dS`9mziYKjjL?0%2Ai{Y^sYVtE9zAmR#G+-4L^4(vOo}=lstlf+aNIC%P+4ze zl2$Zl88O?6bsCOs89d=kTT|yJkHxv{`ILS~o1Ip-Tggwb=_-AK$!IE-c8nO#i;iWu zrzW&}=5S-Q>@=I}cD2-1*VZ;0JRe!{1@Z*s0&yUkaM(NT=&4vTVWk|S%gW`V9hQ+! z8JTp}G1ef9d*;G%$cQ=)k5ooiG;T#iKAtgL;k11hTk$*eaCwJHj;`?#%&wP1%+s(s zdQKa#t!Oq51*5Iou`ml743*;8iQEIm>NUC53k0+ApsX8`!vV}m<208^b{hbWtCvjY z967e0COB!gt(b?a3LoTS8b=*b`u@~ZEBHDrn1kTE!Jh$t0{na66WB~&2mcb5S_$?o zt}lkbmzzc4P$;mfC>T6}bOULnpy4af<5piBsxK~jc=19fcu@S|Z4Z8aV|X>?RiJNS z(UpOV>f+F`f-Q^YC4K}e>O0*&B)<&#TCW^&<~;=ZA!MC+f=uTv?3l;gY|pcx64W;e zuH@ClMNbyi6qg(iRu?bpnYW|3ykJ}Lvg(oIlInBCMb+nvL)AYj4)URO5mbx3toqGx zvj=YWz|9`G*#kFw;ARip?17s-@c-|DL43!`fM@})iPOaI`1o`#@2BwTT;5CJ6SusR z#;0w0UyD!OB8ZQ2eD~vd`qv*#rC-E-GhhFnJ&JGp;1j_3BrhJtiyJ=4%XqW{TYi19<T?Q4Cinc_Xg;fpsS$yy}{6O(4C-7pnA}5P&;Tp=s4)>pyxp^gU*580R0kl6*M0{ z1j|8pf;NHbLAycip#7lZps$0T2fYl^_1Icd^MJ8-S6e>is2s<$+hInfRmb)@o< zgn@db9U!g`>T%6XK<_jF*ASvohihOri0g)WTw~87GuM_5)Ma=a#PvZD*Tz*C zVqRS?(@C8mt|!L1rW(Tvm0*Wt#aK$F`a7`Y99_yp+u??KSJs_>eHQdimLZzt3 z{Y2~at7KUY@4)+!nSHMV^%$N6u}!ScY3QAXo;<$-Gq4WSeHx_o=({tFO=ly^b_4Yo zcy`u$yla0Sn~Xj)Q?ASXrmM$(3E?{sH=#ZPH)y@*foYE-=}!Y=n_V3;t@k~|wcaQ` zn2kbjVh+83L>jIrX3c~()RkH*KeqKgk%}0 z!*C76@>xG#kPI1WJ^{+0^*#imy>gW-s26tQWR#KkY@sb3&KPJv1#Zw$a?h}f%$-8) zLr39SSMC8Umvf7A-fM4kJ-<;S(GA+3#$L|-h*)`^DZed+Rmt366jmj0A5mBp!2LpD zwHmoED9jO6>tA8DAh^yImP|fl6=o~cvsYn0xz#&>!rYwP2#w(aS?bA~TpB--~6t~H_qSJ!ny(zX>mmfg+GKc&AR3H|K2;}7+Tn((> zuPFZ_u)OUA4f8tCCU`O~@ za08e#hxj7+KfqoYIPF~m=l6M~zY;n#f%e7#&wNdlAHXWP3hZs~j5gQrds784pzBYs zvs;1ncmyyWr7Xa$KjrrjyZs-)c+?TQf$w?r3FAFB>%SEB?exeEq&-PF<{Rt3v|y3= zYhXQ|27Iz!@aWUt4}iH}P@g_o{{qar+qKLO`xkxs*Ia#wv94E$DWAO9vl-C-ZNOfi zEyE|L&zKI>ulC``d^qL9hkf{z55MHYXMOl*z`B3fo-v>Nng<)GAN_80V0}LWJm`+s zl7bZ?4D9u3yVs{*=fiElbV-Q97W+HvlmDp?5Bc!l0H1WrFTwbI8(8l*wD)(wd_Jr3 zT`bN3bG+FG>c0l81Kaa&!1RsaH)`g8-6x;$;X)dA1M@HQU;}uq2UA|*!}Y+rKJ33{ zpS;6^Y43;!)7}uU*GKR#eexH4Sj2GY(~PIhj%2zmnly2FkP8k1l8%J4RNXtPxRcDG=JL+1p-J&3T=)pw(3rXIoQUCiES1l|Tzzx( z_Byj}M=jkQWlMFO$B}8{@LH^WbVv2}h8k#jB+^q-m|GinZmDiGch=Xp)U}$e)ms|t zOwVOiRh9OiW22?dT`ZSZK7^m_j(MS~~44d=f`-9V$yl~4~~{zBR>CE`f1J<$8%}7GjDM1lx~@`wSC@| za|k&NGY=D;8QCdGqsaud&aa6U~ /* standard in/out procedures */ #include /* defines system calls */ #include /* necessary for memset */ -#include +#include #include /* used for all socket calls */ #include /* used for sockaddr_in */ #include -#include /* include the dtls library */ -#include "unp.h" +#include +#include +#include -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 -static int cleanup; /* handles shutdown */ +static int cleanup; /* To handle shutdown */ -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - return; -} - -str_echo(CYASSL* ssl) +void sig_handler(const int sig) { - int n; - char buf[MSGLEN]; - - while ( (n = CyaSSL_read(ssl, buf, MSGLEN)) > 0) { - if (CyaSSL_write(ssl, buf, n) != n { - err_sys("CyaSSL_write failed"); - } - } - - if ( n < 0 ) - printf("CyaSSL_read error = %d\n", CyaSSL_get_error(ssl,n)); - - else if ( n == 0 ) - printf("The peer has closed the connection.\n"); + printf("\nSIGINT handled.\n"); + cleanup = 1; + exit(0); } int @@ -43,110 +26,174 @@ main(int argc, char** argv) { /* CREATE THE SOCKET */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int sockfd; /* Initialize our socket */ - CYASSL* cyasockfd; /* sockfd for cyassl */ - socklen_t addrlen = sizeof(cliaddr);/* length of address' */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen; /* length of message */ +// int connfd; /* the connection the client makes */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ + + /* Define a signal handler for when the user closes the program + with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + restart the call to accept() after the signal is handled. */ act.sa_handler = sig_handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - CyaSSL_Init(); /* initialize cyassl */ - CYASSL_CTX* ctx; /* initialize the context */ + CyaSSL_Init(); // Initialize CyaSSL + CYASSL_CTX* ctx; - /* Create and initialize CYASSL_CTX structure */ - if ( (ctx = CyaSSL_CTX_new(CyaTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } + /* Create and initialize CYASSL_CTX structure */ + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } - /* Load CA certificates into CYASSL_CTX */ - if (CyaSSL_CTX_load_verify_locations(ctx,"certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading CA certs certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } + /* Load CA certificates into CYASSL_CTX */ + if (CyaSSL_CTX_load_verify_locations(ctx,"certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } - /* Load server certificate into CYASSL_CTX */ - if (CyaSSL_CTX_use_certificate_file(ctx,"certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading server certs certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } + /* Load server certificate into CYASSL_CTX */ + if (CyaSSL_CTX_use_certificate_file(ctx,"certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } - /* Load server key into CYASSL_CTX */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading server keys certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } + /* Load server key into CYASSL_CTX */ + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } /* create a UDP/IP socket */ - sockfd = Socket(AF_INET, SOCK_DGRAM, 0); - /* setsockopt: Eliminates "ERROR on bind: Addr in use" error. */ - optval = 1; - setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const void *)&optval , sizeof(int)); - /* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ - memset(&servaddr, sizeof(servaddr)); + if((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + { + perror("cannot create socket"); + return 0; + } + + /* printf("created socket descriptor = %d\n", sockfd); */ + + /* INADDR_ANY=IP address and socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + - /* Use Datagram Service */ servaddr.sin_family = AF_INET; - /* host-to-network-long conversion (htonl) */ servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - /* host-to-network-short conversion (htons) */ servaddr.sin_port = htons(SERV_PORT); - - Bind(sockfd, (SA *) &servaddr, sizeof(servaddr)); - Listen(sockfd, LISTENQ); + /* Eliminate socket already in use error */ + int res, on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if(res<0){ + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + /* bind the socket */ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } /* loop, listen for client, print received, reply to client */ - while (cleanup != 1) { + while (cleanup != 1) { + printf("waiting for client message on port %d\n", SERV_PORT); - + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int n; - if ( ( recvlen = accept(sockfd, (SA *)&cliaddr, &addrlen)) < 0 ) - { - if (errno == EINTR) - continue; /* back to while() */ - else - err_sys("accept error\n"); - } - printf("heard on port %d, a message from %s\n", - ntohs(cliaddr.sin_port), inet_ntop(AF_INET, &cliaddr.sin_addr, buff, sizeof(buff)); + n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + printf("connection attempt made.\n"); + if(n > 0) { + if(connect(listenfd, (const struct sockaddr*)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed\n"); - printf("made it this far"); - if ( (ssl = CyaSSL_new(ctx)) == NULL) { - printf("got into the if"); - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); } - - CyaSSL_set_fd(ssl, recvlen); - str_echo(ssl); - CyasSSL_free(ssl); - Close(recvlen); - printf("reset recvlen in the buf to zero"); - printf("I heard this: \"%s\"\n", buff); +// else +// err_sys("recvfrom failed\n"); + + // connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen); + // + // if ( connfd == -1 ){ + // printf("connfd = %d\n", connfd); + // printf("accept error\n"); + // } + + else{ + + printf("connected!\n"); + + /* Create the CYASSL Object */ + if((ssl = CyaSSL_new(ctx))== NULL){ + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + /* set the session ssl to clientfd */ + CyaSSL_set_fd(ssl, listenfd); + + + for(;;){ + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_accept failed\n"); + } + + + if( (recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ + printf("heard %d bytes\n", recvlen); + + + + if (recvlen > 0) { + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + if (recvlen < 0){ + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + if (CyaSSL_write(ssl, buff, strlen(buff)) < 0){ + perror("sendto"); + printf("reply sent \"%s\"\n", buff); + } + /* continues to loop, use "Ctrl+C" to terminate listening */ + } + else{ + printf("lost the connection to client\n"); + break; + } + + } } - - CyaSSL_CTX_free(ctx); - printf("CyaSSL_CTX freed up\n"); - CyaSSL_Cleanup(); - printf("CyaSSL freed up"); - exit(EXIT_SUCCESS); + + } + return(0); } + From 99b4244dcae3dadd3779b558e439f5a15e49b1e7 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 20 May 2014 22:05:35 -0600 Subject: [PATCH 009/103] rm cyassl --- project1/server-dtls-v2.c | 110 ++++++++++++++++++++++++++++++++++++++ project1/server-dtls.c | 7 ++- 2 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 project1/server-dtls-v2.c diff --git a/project1/server-dtls-v2.c b/project1/server-dtls-v2.c new file mode 100644 index 00000000..57be2658 --- /dev/null +++ b/project1/server-dtls-v2.c @@ -0,0 +1,110 @@ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include + + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ + +int +dtle_handle_read(struct dtls_context_t *ctx) { + int *fd; + session_t session; + static uint8 buf[DTLS_MAX_BUF]; + int len; + + fd = dtls_get_app_data(ctx); + + assert(fd); + + session.size = sizeof(session.addr); + len = recvfrom(*fd, buf, sizeof(buf), 0, &session.addr.sa, + &session.size); + + return len < 0 ? len : dtls_handle_message(ctx, &session, buf, len); +} + + +int +read_from_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) { +return dtls_write(ctx, session, data, len); +} + + +int +send_to_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) { + return sendto(fd, data, len, MSG_DONTWAIT, &session->addr.sa, session->size); +} + +int get_key(struct dtls_context_t *ctx, const session_t *session, + const unsigned char *id, size_t id_len, + const dtls_key_t **result){ + static const dtls_key_t psk = { + .type = DTLS_KEY_PSK, + .key.psk.id = (unsigned char *)"my identity", + .key.psk.id_length = 11, + .key.psk.key = (unsigned char *)"secret", + .key.psk.key_length = 6 + }; + + *result = &psk; + return 0; +} + +int +handle_event(struct dtls_context_t *ctx, session_t *session, + dtls_alert_level_t level, unsigned short code) { + /* do something with event */ + return 0; +} + + + + + + + + + + int +main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + struct sockaddr_in servaddr, cliaddr; + socklen_t addrlen = sizeof(cliaddr); + char buf[MSGLEN]; + dtls_context_t* the_context = NULL; + int fd, result; + + + static dtls_handler_t cb = { + .write = send_to_peer, + .read = read_from_peer, + .event = NULL, + .get_key = get_key + }; + + + /* create a UDP/IP socket */ + + fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd < 0 || bind(fd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) + exit(-1); + + the_context = dtls_new_context(&fd); + dtls_set_handler(the_context, &cb); + + while (1) { + /* initialize fd_set rfds and timeout */ + result = select(fd+1, &rfds, NULL, 0, NULL); + + if (FD_ISSET(fd, &rfds)) + dtls_handle_read(the_context); + } + dtls_free_context(the_context); +} diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 4ebb9824..ebaeb975 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -91,11 +91,14 @@ main(int argc, char** argv) memset((char *)&servaddr, 0, sizeof(servaddr)); - servaddr.sin_family = AF_INET; + servaddr.sin_family = AF_INET; + /* host-to-network-long conversion (htonl) */ servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + /* host-to-network-short conversion (htons) */ - servaddr.sin_port = htons(SERV_PORT); + servaddr.sin_port = htons(SERV_PORT); + /* Eliminate socket already in use error */ int res, on = 1; From a0a2fe31c77191f7b70c857eaa5e13b1a8e3f52e Mon Sep 17 00:00:00 2001 From: Kaleb Joseph Himes Date: Tue, 20 May 2014 21:09:34 -0700 Subject: [PATCH 010/103] Initial commit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..a36a0955 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +wolfSSL_Interns +=============== + +Internship summer 2014 From 1053c4e01cfa7a1e1ba27a354a54e06cc3e5712e Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 20 May 2014 22:15:53 -0600 Subject: [PATCH 011/103] p1 v1.4 --- project1/cyassl-3.0.0/AUTHORS | 0 project1/cyassl-3.0.0/COPYING | 339 - project1/cyassl-3.0.0/ChangeLog | 0 .../IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s | 338 - .../IDE/MDK-ARM/LPC43xx/time-LCP43xx.c | 166 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c | 261 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c | 28 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h | 39 - .../MDK-ARM/CyaSSL/config-BARE-METAL.h | 291 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h | 329 - .../MDK-ARM/CyaSSL/config-RTX-TCP-FS.h | 351 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h | 46 - .../MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c | 249 - .../MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h | 103 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c | 172 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c | 595 - .../IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c | 53 - .../IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini | 22 - .../IDE/MDK-ARM/MDK-ARM/config/File_Config.c | 401 - .../IDE/MDK-ARM/MDK-ARM/config/Net_Config.c | 892 - .../IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c | 139 - .../IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c | 205 - .../IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini | 36 - .../MDK-ARM/config/startup_stm32f2xx.s | 419 - .../MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt | 1757 - .../MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj | 3510 -- .../MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt | 1656 - .../MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj | 3964 --- .../STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c | 299 - .../IDE/MDK5-ARM/Docs/CyaSSL-License.txt | 292 - .../Docs/CyaSSLManual-TableofContents.htm | 1 - .../CyaSSLManual-wolfCryptUsageReference.htm | 1 - .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c | 28 - .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h | 39 - .../MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c | 247 - .../MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h | 106 - .../IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c | 52 - .../Projects/CryptBenchmark/Abstract.txt | 15 - .../CryptBenchmark/CryptBenchmark.uvoptx | 1094 - .../CryptBenchmark/CryptBenchmark.uvprojx | 917 - .../CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../CryptBenchmark/RTE/RTE_Components.h | 19 - .../Projects/CryptBenchmark/STM32_SWO.ini | 36 - .../Projects/CryptBenchmark/benchmark.c | 1106 - .../MDK5-ARM/Projects/CryptBenchmark/main.c | 71 - .../MDK5-ARM/Projects/CryptTest/Abstract.txt | 16 - .../Projects/CryptTest/CryptTest.uvoptx | 1094 - .../Projects/CryptTest/CryptTest.uvprojx | 919 - .../CryptTest/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../CryptTest/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../Projects/CryptTest/RTE/RTE_Components.h | 19 - .../MDK5-ARM/Projects/CryptTest/STM32_SWO.ini | 36 - .../IDE/MDK5-ARM/Projects/CryptTest/main.c | 71 - .../IDE/MDK5-ARM/Projects/CryptTest/test.c | 3712 --- .../Projects/CyaSSL-Full/Abstract.txt | 89 - .../Projects/CyaSSL-Full/CyaSSL-Full.uvoptx | 1530 - .../Projects/CyaSSL-Full/CyaSSL-Full.uvprojx | 1122 - .../CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../CyaSSL-Full/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../CyaSSL-Full/RTE/Network/Net_Config.c | 153 - .../CyaSSL-Full/RTE/Network/Net_Config_BSD.h | 36 - .../RTE/Network/Net_Config_DNS_Client.h | 20 - .../RTE/Network/Net_Config_ETH_0.h | 222 - .../CyaSSL-Full/RTE/Network/Net_Config_TCP.h | 61 - .../CyaSSL-Full/RTE/Network/Net_Config_UDP.h | 20 - .../CyaSSL-Full/RTE/Network/Net_Debug.c | 125 - .../Projects/CyaSSL-Full/RTE/RTE_Components.h | 28 - .../Projects/CyaSSL-Full/STM32_SWO.ini | 36 - .../MDK5-ARM/Projects/CyaSSL-Full/benchmark.c | 1064 - .../MDK5-ARM/Projects/CyaSSL-Full/cert_data.c | 28 - .../MDK5-ARM/Projects/CyaSSL-Full/client.c | 756 - .../Projects/CyaSSL-Full/echoclient.c | 287 - .../Projects/CyaSSL-Full/echoserver.c | 370 - .../IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c | 94 - .../MDK5-ARM/Projects/CyaSSL-Full/server.c | 561 - .../IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c | 661 - .../IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c | 3393 -- .../MDK5-ARM/Projects/EchoClient/Abstract.txt | 22 - .../Projects/EchoClient/EchoClient.uvoptx | 1422 - .../Projects/EchoClient/EchoClient.uvprojx | 1106 - .../EchoClient/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../EchoClient/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../EchoClient/RTE/Network/Net_Config.c | 153 - .../EchoClient/RTE/Network/Net_Config_BSD.h | 36 - .../RTE/Network/Net_Config_DNS_Client.h | 20 - .../EchoClient/RTE/Network/Net_Config_ETH_0.h | 222 - .../EchoClient/RTE/Network/Net_Config_TCP.h | 61 - .../EchoClient/RTE/Network/Net_Config_UDP.h | 20 - .../EchoClient/RTE/Network/Net_Debug.c | 125 - .../Projects/EchoClient/RTE/RTE_Components.h | 28 - .../Projects/EchoClient/STM32_SWO.ini | 36 - .../MDK5-ARM/Projects/EchoClient/echoclient.c | 287 - .../IDE/MDK5-ARM/Projects/EchoClient/main.c | 101 - .../MDK5-ARM/Projects/EchoServer/Abstract.txt | 24 - .../Projects/EchoServer/EchoServer.uvoptx | 1406 - .../Projects/EchoServer/EchoServer.uvprojx | 1101 - .../EchoServer/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../EchoServer/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../EchoServer/RTE/Network/Net_Config.c | 153 - .../EchoServer/RTE/Network/Net_Config_BSD.h | 36 - .../RTE/Network/Net_Config_DNS_Client.h | 20 - .../EchoServer/RTE/Network/Net_Config_ETH_0.h | 222 - .../EchoServer/RTE/Network/Net_Config_TCP.h | 61 - .../EchoServer/RTE/Network/Net_Config_UDP.h | 20 - .../EchoServer/RTE/Network/Net_Debug.c | 125 - .../Projects/EchoServer/RTE/RTE_Components.h | 28 - .../Projects/EchoServer/STM32_SWO.ini | 36 - .../MDK5-ARM/Projects/EchoServer/echoserver.c | 370 - .../IDE/MDK5-ARM/Projects/EchoServer/main.c | 99 - .../Projects/SimpleClient/Abstract.txt | 22 - .../SimpleClient/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../SimpleClient/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../SimpleClient/RTE/Network/Net_Config.c | 153 - .../SimpleClient/RTE/Network/Net_Config_BSD.h | 36 - .../RTE/Network/Net_Config_DNS_Client.h | 20 - .../RTE/Network/Net_Config_ETH_0.h | 222 - .../SimpleClient/RTE/Network/Net_Config_TCP.h | 61 - .../SimpleClient/RTE/Network/Net_Config_UDP.h | 20 - .../SimpleClient/RTE/Network/Net_Debug.c | 125 - .../SimpleClient/RTE/RTE_Components.h | 28 - .../Projects/SimpleClient/STM32_SWO.ini | 36 - .../Projects/SimpleClient/SimpleClient.uvoptx | 1422 - .../MDK5-ARM/Projects/SimpleClient/client.c | 758 - .../IDE/MDK5-ARM/Projects/SimpleClient/main.c | 115 - .../SimpleClient/simpleClient.uvprojx | 1106 - .../Projects/SimpleServer/Abstract.txt | 23 - .../SimpleServer/RTE/CMSIS/RTX_Conf_CM.c | 276 - .../RTE/Device/STM32F207IG/RTE_Device.h | 3127 -- .../Device/STM32F207IG/startup_stm32f2xx.s | 419 - .../RTE/Device/STM32F207IG/system_stm32f2xx.c | 536 - .../SimpleServer/RTE/File_System/FS_Config.c | 72 - .../RTE/File_System/FS_Config_MC_0.h | 57 - .../SimpleServer/RTE/Network/Net_Config.c | 153 - .../SimpleServer/RTE/Network/Net_Config_BSD.h | 36 - .../RTE/Network/Net_Config_DNS_Client.h | 20 - .../RTE/Network/Net_Config_ETH_0.h | 222 - .../SimpleServer/RTE/Network/Net_Config_TCP.h | 61 - .../SimpleServer/RTE/Network/Net_Config_UDP.h | 20 - .../SimpleServer/RTE/Network/Net_Debug.c | 125 - .../SimpleServer/RTE/RTE_Components.h | 28 - .../Projects/SimpleServer/STM32_SWO.ini | 36 - .../Projects/SimpleServer/SimpleServer.uvoptx | 1406 - .../SimpleServer/SimpleServer.uvprojx | 1101 - .../IDE/MDK5-ARM/Projects/SimpleServer/main.c | 104 - .../MDK5-ARM/Projects/SimpleServer/server.c | 560 - .../STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c | 299 - .../IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc | 281 - project1/cyassl-3.0.0/Makefile | 3049 -- project1/cyassl-3.0.0/Makefile.am | 142 - project1/cyassl-3.0.0/Makefile.in | 3049 -- project1/cyassl-3.0.0/NEWS | 0 project1/cyassl-3.0.0/README | 996 - project1/cyassl-3.0.0/aclocal.m4 | 1195 - project1/cyassl-3.0.0/aminclude.am | 5 - project1/cyassl-3.0.0/autom4te.cache/output.0 | 27349 ---------------- project1/cyassl-3.0.0/autom4te.cache/requests | 80 - project1/cyassl-3.0.0/autom4te.cache/traces.0 | 1332 - project1/cyassl-3.0.0/build-aux/compile | 347 - project1/cyassl-3.0.0/build-aux/config.guess | 1568 - project1/cyassl-3.0.0/build-aux/config.sub | 1793 - project1/cyassl-3.0.0/build-aux/depcomp | 791 - project1/cyassl-3.0.0/build-aux/install-sh | 527 - project1/cyassl-3.0.0/build-aux/ltmain.sh | 9655 ------ project1/cyassl-3.0.0/build-aux/missing | 215 - project1/cyassl-3.0.0/build-aux/test-driver | 139 - .../cyassl-3.0.0/certs/1024/client-cert.der | Bin 752 -> 0 bytes .../cyassl-3.0.0/certs/1024/client-cert.pem | 59 - .../cyassl-3.0.0/certs/1024/client-key.der | Bin 608 -> 0 bytes .../cyassl-3.0.0/certs/1024/client-key.pem | 15 - project1/cyassl-3.0.0/certs/1024/dh1024.der | Bin 138 -> 0 bytes project1/cyassl-3.0.0/certs/1024/dh1024.pem | 17 - project1/cyassl-3.0.0/certs/1024/dsa1024.der | Bin 448 -> 0 bytes project1/cyassl-3.0.0/certs/1024/dsa1024.pem | 12 - project1/cyassl-3.0.0/certs/1024/include.am | 17 - project1/cyassl-3.0.0/certs/1024/rsa1024.der | Bin 609 -> 0 bytes project1/cyassl-3.0.0/certs/ca-cert.pem | 87 - project1/cyassl-3.0.0/certs/ca-key.der | Bin 1192 -> 0 bytes project1/cyassl-3.0.0/certs/ca-key.pem | 27 - project1/cyassl-3.0.0/certs/client-cert.der | Bin 1180 -> 0 bytes project1/cyassl-3.0.0/certs/client-cert.pem | 87 - .../cyassl-3.0.0/certs/client-ecc-cert.pem | 54 - project1/cyassl-3.0.0/certs/client-key.der | Bin 1192 -> 0 bytes project1/cyassl-3.0.0/certs/client-key.pem | 27 - project1/cyassl-3.0.0/certs/client-keyEnc.pem | 12 - project1/cyassl-3.0.0/certs/crl/cliCrl.pem | 41 - project1/cyassl-3.0.0/certs/crl/crl.pem | 39 - project1/cyassl-3.0.0/certs/crl/crl.revoked | 41 - project1/cyassl-3.0.0/certs/crl/eccCliCRL.pem | 26 - project1/cyassl-3.0.0/certs/crl/eccSrvCRL.pem | 26 - project1/cyassl-3.0.0/certs/crl/include.am | 14 - project1/cyassl-3.0.0/certs/dh2048.der | Bin 268 -> 0 bytes project1/cyassl-3.0.0/certs/dh2048.pem | 29 - project1/cyassl-3.0.0/certs/dsa2048.der | Bin 835 -> 0 bytes .../cyassl-3.0.0/certs/ecc-client-key.pem | 9 - project1/cyassl-3.0.0/certs/ecc-key.der | Bin 121 -> 0 bytes project1/cyassl-3.0.0/certs/ecc-key.pem | 9 - project1/cyassl-3.0.0/certs/ecc-keyPkcs8.pem | 5 - project1/cyassl-3.0.0/certs/include.am | 40 - project1/cyassl-3.0.0/certs/ntru-cert.pem | 28 - project1/cyassl-3.0.0/certs/ntru-key.raw | Bin 607 -> 0 bytes project1/cyassl-3.0.0/certs/rsa2048.der | Bin 1191 -> 0 bytes project1/cyassl-3.0.0/certs/server-cert.pem | 158 - .../cyassl-3.0.0/certs/server-ecc-rsa.pem | 54 - project1/cyassl-3.0.0/certs/server-ecc.pem | 55 - project1/cyassl-3.0.0/certs/server-key.pem | 27 - project1/cyassl-3.0.0/certs/server-keyEnc.pem | 30 - .../cyassl-3.0.0/certs/server-keyPkcs8.pem | 28 - .../cyassl-3.0.0/certs/server-keyPkcs8Enc.pem | 29 - .../certs/server-keyPkcs8Enc12.pem | 29 - .../certs/server-keyPkcs8Enc2.pem | 30 - project1/cyassl-3.0.0/certs/taoCert.txt | 173 - project1/cyassl-3.0.0/config.h | 176 - project1/cyassl-3.0.0/config.in | 175 - project1/cyassl-3.0.0/config.log | 2438 -- project1/cyassl-3.0.0/config.status | 2415 -- project1/cyassl-3.0.0/configure | 27349 ---------------- project1/cyassl-3.0.0/configure.ac | 1782 - .../ctaocrypt/benchmark/.deps/.dirstamp | 0 .../ctaocrypt/benchmark/.deps/benchmark.Po | 194 - .../ctaocrypt/benchmark/.dirstamp | 0 .../ctaocrypt/benchmark/.libs/benchmark | Bin 17091 -> 0 bytes .../ctaocrypt/benchmark/benchmark | 228 - .../ctaocrypt/benchmark/benchmark.c | 1222 - .../ctaocrypt/benchmark/benchmark.o | Bin 10084 -> 0 bytes .../ctaocrypt/benchmark/benchmark.sln | 20 - .../ctaocrypt/benchmark/benchmark.vcproj | 195 - .../ctaocrypt/benchmark/include.am | 10 - .../ctaocrypt/src/.deps/.dirstamp | 0 .../src/.deps/src_libcyassl_la-aes.Plo | 117 - .../src/.deps/src_libcyassl_la-arc4.Plo | 107 - .../src/.deps/src_libcyassl_la-asn.Plo | 173 - .../src/.deps/src_libcyassl_la-blake2b.Plo | 1 - .../src/.deps/src_libcyassl_la-camellia.Plo | 1 - .../src/.deps/src_libcyassl_la-coding.Plo | 112 - .../src/.deps/src_libcyassl_la-compress.Plo | 1 - .../src/.deps/src_libcyassl_la-des3.Plo | 114 - .../src/.deps/src_libcyassl_la-dh.Plo | 162 - .../src/.deps/src_libcyassl_la-dsa.Plo | 1 - .../src/.deps/src_libcyassl_la-ecc.Plo | 169 - .../src/.deps/src_libcyassl_la-error.Plo | 107 - .../src/.deps/src_libcyassl_la-fips.Plo | 1 - .../src/.deps/src_libcyassl_la-fips_test.Plo | 1 - .../src/.deps/src_libcyassl_la-hc128.Plo | 1 - .../src/.deps/src_libcyassl_la-hmac.Plo | 116 - .../src/.deps/src_libcyassl_la-integer.Plo | 128 - .../src/.deps/src_libcyassl_la-logging.Plo | 110 - .../src/.deps/src_libcyassl_la-md2.Plo | 1 - .../src/.deps/src_libcyassl_la-md4.Plo | 1 - .../src/.deps/src_libcyassl_la-md5.Plo | 111 - .../src/.deps/src_libcyassl_la-memory.Plo | 109 - .../src/.deps/src_libcyassl_la-misc.Plo | 1 - .../src/.deps/src_libcyassl_la-pkcs7.Plo | 1 - .../src/.deps/src_libcyassl_la-port.Plo | 107 - .../src/.deps/src_libcyassl_la-pwdbased.Plo | 148 - .../src/.deps/src_libcyassl_la-rabbit.Plo | 1 - .../src/.deps/src_libcyassl_la-random.Plo | 136 - .../src/.deps/src_libcyassl_la-ripemd.Plo | 1 - .../src/.deps/src_libcyassl_la-rsa.Plo | 141 - .../src/.deps/src_libcyassl_la-sha.Plo | 111 - .../src/.deps/src_libcyassl_la-sha256.Plo | 114 - .../src/.deps/src_libcyassl_la-sha512.Plo | 1 - .../src/.deps/src_libcyassl_la-tfm.Plo | 1 - project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp | 0 .../src/.libs/src_libcyassl_la-aes.o | Bin 16548 -> 0 bytes .../src/.libs/src_libcyassl_la-arc4.o | Bin 1228 -> 0 bytes .../src/.libs/src_libcyassl_la-asn.o | Bin 21760 -> 0 bytes .../src/.libs/src_libcyassl_la-coding.o | Bin 1640 -> 0 bytes .../src/.libs/src_libcyassl_la-des3.o | Bin 6292 -> 0 bytes .../ctaocrypt/src/.libs/src_libcyassl_la-dh.o | Bin 2456 -> 0 bytes .../src/.libs/src_libcyassl_la-error.o | Bin 9992 -> 0 bytes .../src/.libs/src_libcyassl_la-hmac.o | Bin 2680 -> 0 bytes .../src/.libs/src_libcyassl_la-integer.o | Bin 24188 -> 0 bytes .../src/.libs/src_libcyassl_la-logging.o | Bin 822 -> 0 bytes .../src/.libs/src_libcyassl_la-md5.o | Bin 3048 -> 0 bytes .../src/.libs/src_libcyassl_la-memory.o | Bin 1348 -> 0 bytes .../src/.libs/src_libcyassl_la-port.o | Bin 1280 -> 0 bytes .../src/.libs/src_libcyassl_la-random.o | Bin 1924 -> 0 bytes .../src/.libs/src_libcyassl_la-rsa.o | Bin 4128 -> 0 bytes .../src/.libs/src_libcyassl_la-sha.o | Bin 5448 -> 0 bytes .../src/.libs/src_libcyassl_la-sha256.o | Bin 3352 -> 0 bytes project1/cyassl-3.0.0/ctaocrypt/src/aes.c | 3496 -- project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s | 814 - project1/cyassl-3.0.0/ctaocrypt/src/arc4.c | 179 - project1/cyassl-3.0.0/ctaocrypt/src/asm.c | 1406 - project1/cyassl-3.0.0/ctaocrypt/src/asn.c | 6981 ---- project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c | 433 - .../cyassl-3.0.0/ctaocrypt/src/camellia.c | 1621 - project1/cyassl-3.0.0/ctaocrypt/src/coding.c | 399 - .../cyassl-3.0.0/ctaocrypt/src/compress.c | 169 - project1/cyassl-3.0.0/ctaocrypt/src/des3.c | 1422 - project1/cyassl-3.0.0/ctaocrypt/src/dh.c | 178 - project1/cyassl-3.0.0/ctaocrypt/src/dsa.c | 226 - project1/cyassl-3.0.0/ctaocrypt/src/ecc.c | 4140 --- project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c | 1 - project1/cyassl-3.0.0/ctaocrypt/src/error.c | 365 - project1/cyassl-3.0.0/ctaocrypt/src/fips.c | 0 .../cyassl-3.0.0/ctaocrypt/src/fips_test.c | 0 .../ctaocrypt/src/fp_mont_small.i | 3860 --- .../ctaocrypt/src/fp_mul_comba_12.i | 130 - .../ctaocrypt/src/fp_mul_comba_17.i | 170 - .../ctaocrypt/src/fp_mul_comba_20.i | 193 - .../ctaocrypt/src/fp_mul_comba_24.i | 226 - .../ctaocrypt/src/fp_mul_comba_28.i | 258 - .../ctaocrypt/src/fp_mul_comba_3.i | 58 - .../ctaocrypt/src/fp_mul_comba_32.i | 304 - .../ctaocrypt/src/fp_mul_comba_4.i | 66 - .../ctaocrypt/src/fp_mul_comba_48.i | 418 - .../ctaocrypt/src/fp_mul_comba_6.i | 82 - .../ctaocrypt/src/fp_mul_comba_64.i | 546 - .../ctaocrypt/src/fp_mul_comba_7.i | 90 - .../ctaocrypt/src/fp_mul_comba_8.i | 98 - .../ctaocrypt/src/fp_mul_comba_9.i | 106 - .../ctaocrypt/src/fp_mul_comba_small_set.i | 1250 - .../ctaocrypt/src/fp_sqr_comba_12.i | 159 - .../ctaocrypt/src/fp_sqr_comba_17.i | 210 - .../ctaocrypt/src/fp_sqr_comba_20.i | 240 - .../ctaocrypt/src/fp_sqr_comba_24.i | 280 - .../ctaocrypt/src/fp_sqr_comba_28.i | 320 - .../ctaocrypt/src/fp_sqr_comba_3.i | 70 - .../ctaocrypt/src/fp_sqr_comba_32.i | 360 - .../ctaocrypt/src/fp_sqr_comba_4.i | 80 - .../ctaocrypt/src/fp_sqr_comba_48.i | 520 - .../ctaocrypt/src/fp_sqr_comba_6.i | 100 - .../ctaocrypt/src/fp_sqr_comba_64.i | 680 - .../ctaocrypt/src/fp_sqr_comba_7.i | 110 - .../ctaocrypt/src/fp_sqr_comba_8.i | 120 - .../ctaocrypt/src/fp_sqr_comba_9.i | 130 - .../ctaocrypt/src/fp_sqr_comba_small_set.i | 1540 - project1/cyassl-3.0.0/ctaocrypt/src/hc128.c | 399 - project1/cyassl-3.0.0/ctaocrypt/src/hmac.c | 820 - .../cyassl-3.0.0/ctaocrypt/src/include.am | 39 - project1/cyassl-3.0.0/ctaocrypt/src/integer.c | 4488 --- project1/cyassl-3.0.0/ctaocrypt/src/logging.c | 162 - project1/cyassl-3.0.0/ctaocrypt/src/md2.c | 131 - project1/cyassl-3.0.0/ctaocrypt/src/md4.c | 219 - project1/cyassl-3.0.0/ctaocrypt/src/md5.c | 364 - project1/cyassl-3.0.0/ctaocrypt/src/memory.c | 183 - project1/cyassl-3.0.0/ctaocrypt/src/misc.c | 170 - project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c | 1391 - project1/cyassl-3.0.0/ctaocrypt/src/port.c | 436 - .../cyassl-3.0.0/ctaocrypt/src/pwdbased.c | 474 - project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c | 310 - project1/cyassl-3.0.0/ctaocrypt/src/random.c | 845 - project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c | 354 - project1/cyassl-3.0.0/ctaocrypt/src/rsa.c | 834 - project1/cyassl-3.0.0/ctaocrypt/src/sha.c | 395 - project1/cyassl-3.0.0/ctaocrypt/src/sha256.c | 287 - project1/cyassl-3.0.0/ctaocrypt/src/sha512.c | 475 - .../ctaocrypt/src/src_libcyassl_la-aes.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-arc4.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-asn.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-coding.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-des3.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-dh.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-error.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-hmac.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-integer.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-logging.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-md5.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-memory.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-port.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-random.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-rsa.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-sha.lo | 12 - .../ctaocrypt/src/src_libcyassl_la-sha256.lo | 12 - project1/cyassl-3.0.0/ctaocrypt/src/tfm.c | 2514 -- .../ctaocrypt/test/.deps/.dirstamp | 0 .../cyassl-3.0.0/ctaocrypt/test/.deps/test.Po | 202 - .../.deps/testsuite_testsuite_test-test.Po | 202 - .../cyassl-3.0.0/ctaocrypt/test/.dirstamp | 0 .../ctaocrypt/test/.libs/testctaocrypt | Bin 22418 -> 0 bytes .../cyassl-3.0.0/ctaocrypt/test/include.am | 11 - project1/cyassl-3.0.0/ctaocrypt/test/test.c | 4758 --- project1/cyassl-3.0.0/ctaocrypt/test/test.h | 33 - project1/cyassl-3.0.0/ctaocrypt/test/test.o | Bin 15008 -> 0 bytes project1/cyassl-3.0.0/ctaocrypt/test/test.sln | 20 - .../cyassl-3.0.0/ctaocrypt/test/test.vcproj | 195 - .../cyassl-3.0.0/ctaocrypt/test/testctaocrypt | 228 - .../test/testsuite_testsuite_test-test.o | Bin 14932 -> 0 bytes project1/cyassl-3.0.0/cyassl-config | 117 - .../cyassl-ios.xcodeproj/project.pbxproj | 383 - .../cyassl-iphone.xcodeproj/project.pbxproj | 379 - project1/cyassl-3.0.0/cyassl-ntru.sln | 65 - project1/cyassl-3.0.0/cyassl-ntru.vcproj | 313 - project1/cyassl-3.0.0/cyassl.sln | 74 - project1/cyassl-3.0.0/cyassl.vcproj | 306 - project1/cyassl-3.0.0/cyassl/callbacks.h | 80 - project1/cyassl-3.0.0/cyassl/certs_test.h | 800 - project1/cyassl-3.0.0/cyassl/crl.h | 51 - project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h | 180 - project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h | 68 - project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h | 704 - .../cyassl/ctaocrypt/asn_public.h | 177 - .../cyassl/ctaocrypt/blake2-impl.h | 154 - .../cyassl/ctaocrypt/blake2-int.h | 183 - .../cyassl-3.0.0/cyassl/ctaocrypt/blake2.h | 60 - .../cyassl-3.0.0/cyassl/ctaocrypt/camellia.h | 96 - .../cyassl-3.0.0/cyassl/ctaocrypt/coding.h | 58 - .../cyassl-3.0.0/cyassl/ctaocrypt/compress.h | 52 - project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h | 137 - project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h | 67 - project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h | 67 - project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h | 182 - .../cyassl/ctaocrypt/error-crypt.h | 141 - .../cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h | 43 - .../cyassl-3.0.0/cyassl/ctaocrypt/hc128.h | 60 - project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h | 199 - .../cyassl-3.0.0/cyassl/ctaocrypt/include.am | 45 - .../cyassl-3.0.0/cyassl/ctaocrypt/integer.h | 317 - .../cyassl-3.0.0/cyassl/ctaocrypt/logging.h | 70 - project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h | 64 - project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h | 65 - project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h | 72 - .../cyassl-3.0.0/cyassl/ctaocrypt/memory.h | 55 - project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h | 72 - .../cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h | 1018 - .../cyassl/ctaocrypt/mpi_superclass.h | 95 - .../cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h | 123 - project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h | 194 - .../cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h | 53 - .../cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h | 65 - .../cyassl-3.0.0/cyassl/ctaocrypt/random.h | 119 - .../cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h | 64 - project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h | 142 - .../cyassl-3.0.0/cyassl/ctaocrypt/settings.h | 667 - project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h | 91 - .../cyassl-3.0.0/cyassl/ctaocrypt/sha256.h | 90 - .../cyassl-3.0.0/cyassl/ctaocrypt/sha512.h | 118 - project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h | 694 - .../cyassl-3.0.0/cyassl/ctaocrypt/types.h | 328 - .../cyassl/ctaocrypt/visibility.h | 69 - project1/cyassl-3.0.0/cyassl/error-ssl.h | 149 - project1/cyassl-3.0.0/cyassl/include.am | 25 - project1/cyassl-3.0.0/cyassl/internal.h | 2143 -- project1/cyassl-3.0.0/cyassl/ocsp.h | 52 - project1/cyassl-3.0.0/cyassl/openssl/asn1.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/bio.h | 23 - project1/cyassl-3.0.0/cyassl/openssl/bn.h | 115 - project1/cyassl-3.0.0/cyassl/openssl/conf.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/crypto.h | 26 - project1/cyassl-3.0.0/cyassl/openssl/des.h | 87 - project1/cyassl-3.0.0/cyassl/openssl/dh.h | 52 - project1/cyassl-3.0.0/cyassl/openssl/dsa.h | 53 - project1/cyassl-3.0.0/cyassl/openssl/ec.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/engine.h | 5 - project1/cyassl-3.0.0/cyassl/openssl/err.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/evp.h | 241 - project1/cyassl-3.0.0/cyassl/openssl/hmac.h | 81 - .../cyassl-3.0.0/cyassl/openssl/include.am | 36 - project1/cyassl-3.0.0/cyassl/openssl/lhash.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/md4.h | 1 - project1/cyassl-3.0.0/cyassl/openssl/md5.h | 39 - project1/cyassl-3.0.0/cyassl/openssl/ocsp.h | 1 - .../cyassl-3.0.0/cyassl/openssl/opensslconf.h | 8 - .../cyassl-3.0.0/cyassl/openssl/opensslv.h | 12 - .../cyassl-3.0.0/cyassl/openssl/ossl_typ.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/pem.h | 41 - project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/rand.h | 4 - project1/cyassl-3.0.0/cyassl/openssl/ripemd.h | 37 - project1/cyassl-3.0.0/cyassl/openssl/rsa.h | 75 - project1/cyassl-3.0.0/cyassl/openssl/sha.h | 125 - project1/cyassl-3.0.0/cyassl/openssl/ssl.h | 380 - project1/cyassl-3.0.0/cyassl/openssl/stack.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/ui.h | 2 - project1/cyassl-3.0.0/cyassl/openssl/x509.h | 3 - project1/cyassl-3.0.0/cyassl/openssl/x509v3.h | 2 - project1/cyassl-3.0.0/cyassl/options.h | 53 - project1/cyassl-3.0.0/cyassl/options.h.in | 34 - project1/cyassl-3.0.0/cyassl/sniffer.h | 74 - project1/cyassl-3.0.0/cyassl/sniffer_error.h | 110 - project1/cyassl-3.0.0/cyassl/sniffer_error.rc | 88 - project1/cyassl-3.0.0/cyassl/ssl.h | 1304 - project1/cyassl-3.0.0/cyassl/test.h | 1730 - project1/cyassl-3.0.0/cyassl/version.h | 35 - project1/cyassl-3.0.0/cyassl/version.h.in | 35 - project1/cyassl-3.0.0/doc/README.txt | 3 - project1/cyassl-3.0.0/doc/include.am | 5 - .../examples/client/.deps/.dirstamp | 0 .../examples/client/.deps/client.Po | 268 - .../client/.deps/tests_unit_test-client.Po | 269 - .../.deps/testsuite_testsuite_test-client.Po | 269 - .../cyassl-3.0.0/examples/client/.dirstamp | 0 .../cyassl-3.0.0/examples/client/.libs/client | Bin 23479 -> 0 bytes project1/cyassl-3.0.0/examples/client/client | 228 - .../examples/client/client-ntru.vcproj | 199 - .../cyassl-3.0.0/examples/client/client.c | 851 - .../cyassl-3.0.0/examples/client/client.h | 25 - .../cyassl-3.0.0/examples/client/client.o | Bin 18448 -> 0 bytes .../cyassl-3.0.0/examples/client/client.sln | 20 - .../examples/client/client.vcproj | 197 - .../cyassl-3.0.0/examples/client/include.am | 16 - .../examples/client/tests_unit_test-client.o | Bin 16512 -> 0 bytes .../client/testsuite_testsuite_test-client.o | Bin 16512 -> 0 bytes .../examples/echoclient/.deps/.dirstamp | 0 .../examples/echoclient/.deps/echoclient.Po | 272 - .../testsuite_testsuite_test-echoclient.Po | 272 - .../examples/echoclient/.dirstamp | 0 .../examples/echoclient/.libs/echoclient | Bin 12910 -> 0 bytes .../examples/echoclient/.libs/lt-echoclient | Bin 12910 -> 0 bytes .../examples/echoclient/echoclient | 228 - .../echoclient/echoclient-ntru.vcproj | 199 - .../examples/echoclient/echoclient.c | 274 - .../examples/echoclient/echoclient.h | 23 - .../examples/echoclient/echoclient.o | Bin 4976 -> 0 bytes .../examples/echoclient/echoclient.sln | 20 - .../examples/echoclient/echoclient.vcproj | 197 - .../examples/echoclient/include.am | 19 - .../testsuite_testsuite_test-echoclient.o | Bin 3872 -> 0 bytes .../examples/echoserver/.deps/.dirstamp | 0 .../examples/echoserver/.deps/echoserver.Po | 270 - .../testsuite_testsuite_test-echoserver.Po | 270 - .../examples/echoserver/.dirstamp | 0 .../examples/echoserver/.libs/echoserver | Bin 13134 -> 0 bytes .../examples/echoserver/echoserver | 228 - .../echoserver/echoserver-ntru.vcproj | 199 - .../examples/echoserver/echoserver.c | 360 - .../examples/echoserver/echoserver.h | 24 - .../examples/echoserver/echoserver.o | Bin 6876 -> 0 bytes .../examples/echoserver/echoserver.sln | 20 - .../examples/echoserver/echoserver.vcproj | 197 - .../examples/echoserver/include.am | 18 - .../testsuite_testsuite_test-echoserver.o | Bin 5868 -> 0 bytes .../examples/server/.deps/.dirstamp | 0 .../examples/server/.deps/server.Po | 271 - .../server/.deps/tests_unit_test-server.Po | 271 - .../.deps/testsuite_testsuite_test-server.Po | 271 - .../cyassl-3.0.0/examples/server/.dirstamp | 0 .../cyassl-3.0.0/examples/server/.libs/server | Bin 23201 -> 0 bytes .../cyassl-3.0.0/examples/server/include.am | 19 - project1/cyassl-3.0.0/examples/server/server | 228 - .../examples/server/server-ntru.vcproj | 199 - .../cyassl-3.0.0/examples/server/server.c | 602 - .../cyassl-3.0.0/examples/server/server.h | 24 - .../cyassl-3.0.0/examples/server/server.o | Bin 14940 -> 0 bytes .../cyassl-3.0.0/examples/server/server.sln | 20 - .../examples/server/server.vcproj | 197 - .../examples/server/tests_unit_test-server.o | Bin 13432 -> 0 bytes .../server/testsuite_testsuite_test-server.o | Bin 13432 -> 0 bytes project1/cyassl-3.0.0/gencertbuf.pl | 110 - project1/cyassl-3.0.0/input | 87 - project1/cyassl-3.0.0/lib/dummy | 2 - project1/cyassl-3.0.0/libtool | 10240 ------ project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 | 29 - project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 | 55 - project1/cyassl-3.0.0/m4/ax_am_macros.m4 | 44 - .../m4/ax_append_compile_flags.m4 | 65 - project1/cyassl-3.0.0/m4/ax_append_flag.m4 | 69 - project1/cyassl-3.0.0/m4/ax_append_to_file.m4 | 27 - .../cyassl-3.0.0/m4/ax_check_compile_flag.m4 | 72 - .../cyassl-3.0.0/m4/ax_check_link_flag.m4 | 71 - project1/cyassl-3.0.0/m4/ax_count_cpus.m4 | 57 - .../m4/ax_create_generic_config.m4 | 195 - project1/cyassl-3.0.0/m4/ax_debug.m4 | 61 - project1/cyassl-3.0.0/m4/ax_file_escapes.m4 | 30 - .../m4/ax_harden_compiler_flags.m4 | 238 - project1/cyassl-3.0.0/m4/ax_print_to_file.m4 | 27 - project1/cyassl-3.0.0/m4/ax_pthread.m4 | 320 - project1/cyassl-3.0.0/m4/ax_tls.m4 | 92 - project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 | 75 - project1/cyassl-3.0.0/m4/hexversion.m4 | 6 - project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 | 25 - project1/cyassl-3.0.0/m4/libtool.m4 | 7982 ----- project1/cyassl-3.0.0/m4/ltoptions.m4 | 384 - project1/cyassl-3.0.0/m4/ltsugar.m4 | 123 - project1/cyassl-3.0.0/m4/ltversion.m4 | 23 - project1/cyassl-3.0.0/m4/lt~obsolete.m4 | 98 - project1/cyassl-3.0.0/m4/visibility.m4 | 77 - .../cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 | 37 - project1/cyassl-3.0.0/mcapi/.deps/crypto.Po | 1 - .../cyassl-3.0.0/mcapi/.deps/mcapi_test.Po | 1 - project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h | 28 - project1/cyassl-3.0.0/mcapi/README | 79 - project1/cyassl-3.0.0/mcapi/crypto.c | 703 - project1/cyassl-3.0.0/mcapi/crypto.h | 268 - .../mcapi/ctaocrypt_mcapi.X/Makefile | 108 - .../nbproject/configurations.xml | 175 - .../ctaocrypt_mcapi.X/nbproject/include.am | 11 - .../ctaocrypt_mcapi.X/nbproject/project.xml | 18 - .../mcapi/ctaocrypt_test.X/Makefile | 108 - .../nbproject/configurations.xml | 192 - .../ctaocrypt_test.X/nbproject/include.am | 11 - .../ctaocrypt_test.X/nbproject/project.xml | 18 - project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile | 108 - .../cyassl.X/nbproject/configurations.xml | 192 - .../mcapi/cyassl.X/nbproject/include.am | 11 - .../mcapi/cyassl.X/nbproject/project.xml | 15 - project1/cyassl-3.0.0/mcapi/include.am | 19 - project1/cyassl-3.0.0/mcapi/mcapi_test.c | 1482 - project1/cyassl-3.0.0/mcapi/zlib.X/Makefile | 108 - .../mcapi/zlib.X/nbproject/configurations.xml | 157 - .../mcapi/zlib.X/nbproject/include.am | 11 - .../mcapi/zlib.X/nbproject/project.xml | 15 - project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h | 28 - project1/cyassl-3.0.0/mplabx/README | 55 - project1/cyassl-3.0.0/mplabx/benchmark_main.c | 133 - .../mplabx/ctaocrypt_benchmark.X/Makefile | 108 - .../nbproject/configurations.xml | 193 - .../nbproject/include.am | 11 - .../nbproject/project.xml | 17 - .../mplabx/ctaocrypt_test.X/Makefile | 108 - .../nbproject/configurations.xml | 194 - .../ctaocrypt_test.X/nbproject/include.am | 11 - .../ctaocrypt_test.X/nbproject/project.xml | 17 - .../cyassl-3.0.0/mplabx/cyassl.X/Makefile | 108 - .../cyassl.X/nbproject/configurations.xml | 208 - .../mplabx/cyassl.X/nbproject/include.am | 11 - .../mplabx/cyassl.X/nbproject/project.xml | 15 - project1/cyassl-3.0.0/mplabx/include.am | 10 - project1/cyassl-3.0.0/mplabx/test_main.c | 77 - project1/cyassl-3.0.0/mqx/README | 37 - .../cyassl-3.0.0/mqx/ctaocrypt_test/.cproject | 2542 -- .../cyassl-3.0.0/mqx/ctaocrypt_test/.project | 98 - .../ctaocrypt_test/ReferencedRSESystems.xml | 144 - .../mqx/ctaocrypt_test/Sources/include.am | 15 - .../mqx/ctaocrypt_test/Sources/main.c | 103 - .../mqx/ctaocrypt_test/Sources/main.h | 21 - ...lash_SramData_Debug_PnE_U-MultiLink.launch | 162 - ...sh_SramData_Release_PnE_U-MultiLink.launch | 158 - project1/cyassl-3.0.0/mqx/cyassl/.cproject | 2579 -- project1/cyassl-3.0.0/mqx/cyassl/.project | 103 - project1/cyassl-3.0.0/mqx/cyassl/include.am | 11 - .../cyassl-3.0.0/mqx/cyassl_client/.cproject | 2585 -- .../cyassl-3.0.0/mqx/cyassl_client/.project | 80 - .../cyassl_client/ReferencedRSESystems.xml | 144 - .../mqx/cyassl_client/Sources/include.am | 15 - .../mqx/cyassl_client/Sources/main.c | 239 - .../mqx/cyassl_client/Sources/main.h | 61 - ...lash_SramData_Debug_PnE_U-MultiLink.launch | 162 - ...sh_SramData_Release_PnE_U-MultiLink.launch | 164 - project1/cyassl-3.0.0/mqx/util_lib/.cproject | 2538 -- project1/cyassl-3.0.0/mqx/util_lib/.project | 76 - .../mqx/util_lib/Sources/include.am | 12 - .../cyassl-3.0.0/mqx/util_lib/Sources/util.c | 178 - .../cyassl-3.0.0/mqx/util_lib/Sources/util.h | 14 - project1/cyassl-3.0.0/quit | 2 - project1/cyassl-3.0.0/rpm/include.am | 37 - project1/cyassl-3.0.0/rpm/spec | 166 - project1/cyassl-3.0.0/rpm/spec.in | 166 - project1/cyassl-3.0.0/src/.deps/.dirstamp | 0 .../src/.deps/src_libcyassl_la-crl.Plo | 255 - .../src/.deps/src_libcyassl_la-internal.Plo | 211 - .../src/.deps/src_libcyassl_la-io.Plo | 325 - .../src/.deps/src_libcyassl_la-keys.Plo | 211 - .../src/.deps/src_libcyassl_la-ocsp.Plo | 227 - .../src/.deps/src_libcyassl_la-sniffer.Plo | 277 - .../src/.deps/src_libcyassl_la-ssl.Plo | 240 - .../src/.deps/src_libcyassl_la-tls.Plo | 211 - project1/cyassl-3.0.0/src/.dirstamp | 0 project1/cyassl-3.0.0/src/.libs/libcyassl.la | 1 - project1/cyassl-3.0.0/src/.libs/libcyassl.lai | 41 - project1/cyassl-3.0.0/src/.libs/libcyassl.so | 1 - .../cyassl-3.0.0/src/.libs/libcyassl.so.5 | 1 - .../cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 | Bin 179656 -> 0 bytes .../src/.libs/src_libcyassl_la-internal.o | Bin 51424 -> 0 bytes .../src/.libs/src_libcyassl_la-io.o | Bin 3336 -> 0 bytes .../src/.libs/src_libcyassl_la-keys.o | Bin 4968 -> 0 bytes .../src/.libs/src_libcyassl_la-ssl.o | Bin 34088 -> 0 bytes .../src/.libs/src_libcyassl_la-tls.o | Bin 6116 -> 0 bytes project1/cyassl-3.0.0/src/crl.c | 600 - project1/cyassl-3.0.0/src/include.am | 147 - project1/cyassl-3.0.0/src/internal.c | 11300 ------- project1/cyassl-3.0.0/src/io.c | 1050 - project1/cyassl-3.0.0/src/keys.c | 2012 -- project1/cyassl-3.0.0/src/libcyassl.la | 41 - project1/cyassl-3.0.0/src/ocsp.c | 269 - project1/cyassl-3.0.0/src/sniffer.c | 2567 -- .../src/src_libcyassl_la-internal.lo | 12 - .../cyassl-3.0.0/src/src_libcyassl_la-io.lo | 12 - .../cyassl-3.0.0/src/src_libcyassl_la-keys.lo | 12 - .../cyassl-3.0.0/src/src_libcyassl_la-ssl.lo | 12 - .../cyassl-3.0.0/src/src_libcyassl_la-tls.lo | 12 - project1/cyassl-3.0.0/src/ssl.c | 11553 ------- project1/cyassl-3.0.0/src/tls.c | 1973 -- .../cyassl-3.0.0/sslSniffer/sslSniffer.vcproj | 206 - .../sslSnifferTest/.deps/snifftest.Po | 1 - .../sslSniffer/sslSnifferTest/include.am | 13 - .../sslSniffer/sslSnifferTest/snifftest.c | 301 - .../sslSnifferTest/sslSniffTest.vcproj | 199 - project1/cyassl-3.0.0/stamp-h | 1 - project1/cyassl-3.0.0/stamp-h.in | 0 project1/cyassl-3.0.0/stamp-h1 | 1 - project1/cyassl-3.0.0/support/cyassl.pc | 10 - project1/cyassl-3.0.0/support/cyassl.pc.in | 10 - project1/cyassl-3.0.0/support/include.am | 10 - project1/cyassl-3.0.0/swig/PythonBuild.sh | 9 - project1/cyassl-3.0.0/swig/README | 44 - project1/cyassl-3.0.0/swig/cyassl.i | 63 - project1/cyassl-3.0.0/swig/cyassl_adds.c | 234 - project1/cyassl-3.0.0/swig/include.am | 12 - .../cyassl-3.0.0/swig/python_cyassl.vcproj | 225 - project1/cyassl-3.0.0/swig/rsasign.py | 35 - project1/cyassl-3.0.0/swig/runme.py | 40 - project1/cyassl-3.0.0/tags | 17768 ---------- project1/cyassl-3.0.0/tests/.deps/.dirstamp | 0 .../tests/.deps/tests_unit_test-api.Po | 270 - .../tests/.deps/tests_unit_test-hash.Po | 285 - .../tests/.deps/tests_unit_test-suites.Po | 273 - .../tests/.deps/tests_unit_test-unit.Po | 269 - project1/cyassl-3.0.0/tests/.dirstamp | 0 project1/cyassl-3.0.0/tests/.libs/unit.test | Bin 52399 -> 0 bytes project1/cyassl-3.0.0/tests/api.c | 1303 - project1/cyassl-3.0.0/tests/hash.c | 837 - project1/cyassl-3.0.0/tests/include.am | 23 - project1/cyassl-3.0.0/tests/suites.c | 451 - project1/cyassl-3.0.0/tests/test-dtls.conf | 782 - project1/cyassl-3.0.0/tests/test.conf | 1664 - .../cyassl-3.0.0/tests/tests_unit_test-api.o | Bin 19712 -> 0 bytes .../cyassl-3.0.0/tests/tests_unit_test-hash.o | Bin 7408 -> 0 bytes .../tests/tests_unit_test-suites.o | Bin 7408 -> 0 bytes .../cyassl-3.0.0/tests/tests_unit_test-unit.o | Bin 3432 -> 0 bytes project1/cyassl-3.0.0/tests/unit.c | 132 - project1/cyassl-3.0.0/tests/unit.h | 64 - project1/cyassl-3.0.0/tests/unit.test | 228 - .../cyassl-3.0.0/testsuite/.deps/.dirstamp | 0 .../testsuite_testsuite_test-testsuite.Po | 283 - project1/cyassl-3.0.0/testsuite/.dirstamp | 0 .../testsuite/.libs/lt-testsuite.test | Bin 53262 -> 0 bytes .../testsuite/.libs/testsuite.test | Bin 53262 -> 0 bytes project1/cyassl-3.0.0/testsuite/include.am | 25 - .../testsuite/testsuite-ntru.vcproj | 219 - project1/cyassl-3.0.0/testsuite/testsuite.c | 380 - project1/cyassl-3.0.0/testsuite/testsuite.sln | 20 - .../cyassl-3.0.0/testsuite/testsuite.test | 228 - .../cyassl-3.0.0/testsuite/testsuite.vcproj | 217 - .../testsuite_testsuite_test-testsuite.o | Bin 5852 -> 0 bytes project1/cyassl-3.0.0/valgrind-error.sh | 22 - 753 files changed, 356412 deletions(-) delete mode 100644 project1/cyassl-3.0.0/AUTHORS delete mode 100644 project1/cyassl-3.0.0/COPYING delete mode 100644 project1/cyassl-3.0.0/ChangeLog delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj delete mode 100644 project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c delete mode 100644 project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc delete mode 100644 project1/cyassl-3.0.0/Makefile delete mode 100644 project1/cyassl-3.0.0/Makefile.am delete mode 100644 project1/cyassl-3.0.0/Makefile.in delete mode 100644 project1/cyassl-3.0.0/NEWS delete mode 100644 project1/cyassl-3.0.0/README delete mode 100644 project1/cyassl-3.0.0/aclocal.m4 delete mode 100644 project1/cyassl-3.0.0/aminclude.am delete mode 100644 project1/cyassl-3.0.0/autom4te.cache/output.0 delete mode 100644 project1/cyassl-3.0.0/autom4te.cache/requests delete mode 100644 project1/cyassl-3.0.0/autom4te.cache/traces.0 delete mode 100755 project1/cyassl-3.0.0/build-aux/compile delete mode 100755 project1/cyassl-3.0.0/build-aux/config.guess delete mode 100755 project1/cyassl-3.0.0/build-aux/config.sub delete mode 100755 project1/cyassl-3.0.0/build-aux/depcomp delete mode 100755 project1/cyassl-3.0.0/build-aux/install-sh delete mode 100644 project1/cyassl-3.0.0/build-aux/ltmain.sh delete mode 100755 project1/cyassl-3.0.0/build-aux/missing delete mode 100755 project1/cyassl-3.0.0/build-aux/test-driver delete mode 100644 project1/cyassl-3.0.0/certs/1024/client-cert.der delete mode 100644 project1/cyassl-3.0.0/certs/1024/client-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/1024/client-key.der delete mode 100644 project1/cyassl-3.0.0/certs/1024/client-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/1024/dh1024.der delete mode 100644 project1/cyassl-3.0.0/certs/1024/dh1024.pem delete mode 100644 project1/cyassl-3.0.0/certs/1024/dsa1024.der delete mode 100644 project1/cyassl-3.0.0/certs/1024/dsa1024.pem delete mode 100644 project1/cyassl-3.0.0/certs/1024/include.am delete mode 100644 project1/cyassl-3.0.0/certs/1024/rsa1024.der delete mode 100644 project1/cyassl-3.0.0/certs/ca-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/ca-key.der delete mode 100644 project1/cyassl-3.0.0/certs/ca-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/client-cert.der delete mode 100644 project1/cyassl-3.0.0/certs/client-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/client-ecc-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/client-key.der delete mode 100644 project1/cyassl-3.0.0/certs/client-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/client-keyEnc.pem delete mode 100644 project1/cyassl-3.0.0/certs/crl/cliCrl.pem delete mode 100644 project1/cyassl-3.0.0/certs/crl/crl.pem delete mode 100644 project1/cyassl-3.0.0/certs/crl/crl.revoked delete mode 100644 project1/cyassl-3.0.0/certs/crl/eccCliCRL.pem delete mode 100644 project1/cyassl-3.0.0/certs/crl/eccSrvCRL.pem delete mode 100644 project1/cyassl-3.0.0/certs/crl/include.am delete mode 100644 project1/cyassl-3.0.0/certs/dh2048.der delete mode 100644 project1/cyassl-3.0.0/certs/dh2048.pem delete mode 100644 project1/cyassl-3.0.0/certs/dsa2048.der delete mode 100644 project1/cyassl-3.0.0/certs/ecc-client-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/ecc-key.der delete mode 100644 project1/cyassl-3.0.0/certs/ecc-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/ecc-keyPkcs8.pem delete mode 100644 project1/cyassl-3.0.0/certs/include.am delete mode 100644 project1/cyassl-3.0.0/certs/ntru-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/ntru-key.raw delete mode 100644 project1/cyassl-3.0.0/certs/rsa2048.der delete mode 100644 project1/cyassl-3.0.0/certs/server-cert.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-ecc-rsa.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-ecc.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-key.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-keyEnc.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem delete mode 100644 project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem delete mode 100644 project1/cyassl-3.0.0/certs/taoCert.txt delete mode 100644 project1/cyassl-3.0.0/config.h delete mode 100644 project1/cyassl-3.0.0/config.in delete mode 100644 project1/cyassl-3.0.0/config.log delete mode 100755 project1/cyassl-3.0.0/config.status delete mode 100755 project1/cyassl-3.0.0/configure delete mode 100644 project1/cyassl-3.0.0/configure.ac delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.sln delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.vcproj delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-coding.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-integer.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-logging.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/aes.c delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/arc4.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/asm.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/asn.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/camellia.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/coding.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/compress.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/des3.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/dh.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/dsa.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ecc.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/error.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fips.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/hc128.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/hmac.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/include.am delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/integer.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/logging.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md2.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md4.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/md5.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/memory.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/misc.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/port.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/pwdbased.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/random.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/rsa.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha256.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/sha512.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/src/tfm.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/include.am delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.c delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.h delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/test.o delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/test.sln delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj delete mode 100755 project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt delete mode 100644 project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o delete mode 100644 project1/cyassl-3.0.0/cyassl-config delete mode 100644 project1/cyassl-3.0.0/cyassl-ios.xcodeproj/project.pbxproj delete mode 100644 project1/cyassl-3.0.0/cyassl-iphone.xcodeproj/project.pbxproj delete mode 100755 project1/cyassl-3.0.0/cyassl-ntru.sln delete mode 100755 project1/cyassl-3.0.0/cyassl-ntru.vcproj delete mode 100755 project1/cyassl-3.0.0/cyassl.sln delete mode 100755 project1/cyassl-3.0.0/cyassl.vcproj delete mode 100644 project1/cyassl-3.0.0/cyassl/callbacks.h delete mode 100644 project1/cyassl-3.0.0/cyassl/certs_test.h delete mode 100644 project1/cyassl-3.0.0/cyassl/crl.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h delete mode 100644 project1/cyassl-3.0.0/cyassl/error-ssl.h delete mode 100644 project1/cyassl-3.0.0/cyassl/include.am delete mode 100644 project1/cyassl-3.0.0/cyassl/internal.h delete mode 100644 project1/cyassl-3.0.0/cyassl/ocsp.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/asn1.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/bio.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/bn.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/conf.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/crypto.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/des.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/dh.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/dsa.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ec.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/engine.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/err.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/evp.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/hmac.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/include.am delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/lhash.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/md4.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/md5.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ocsp.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/opensslv.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/pem.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/rand.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ripemd.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/rsa.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/sha.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ssl.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/stack.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/ui.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/x509.h delete mode 100644 project1/cyassl-3.0.0/cyassl/openssl/x509v3.h delete mode 100644 project1/cyassl-3.0.0/cyassl/options.h delete mode 100644 project1/cyassl-3.0.0/cyassl/options.h.in delete mode 100644 project1/cyassl-3.0.0/cyassl/sniffer.h delete mode 100644 project1/cyassl-3.0.0/cyassl/sniffer_error.h delete mode 100644 project1/cyassl-3.0.0/cyassl/sniffer_error.rc delete mode 100644 project1/cyassl-3.0.0/cyassl/ssl.h delete mode 100644 project1/cyassl-3.0.0/cyassl/test.h delete mode 100644 project1/cyassl-3.0.0/cyassl/version.h delete mode 100644 project1/cyassl-3.0.0/cyassl/version.h.in delete mode 100644 project1/cyassl-3.0.0/doc/README.txt delete mode 100644 project1/cyassl-3.0.0/doc/include.am delete mode 100644 project1/cyassl-3.0.0/examples/client/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/examples/client/.deps/client.Po delete mode 100644 project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po delete mode 100644 project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po delete mode 100644 project1/cyassl-3.0.0/examples/client/.dirstamp delete mode 100755 project1/cyassl-3.0.0/examples/client/.libs/client delete mode 100755 project1/cyassl-3.0.0/examples/client/client delete mode 100755 project1/cyassl-3.0.0/examples/client/client-ntru.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/client/client.c delete mode 100644 project1/cyassl-3.0.0/examples/client/client.h delete mode 100644 project1/cyassl-3.0.0/examples/client/client.o delete mode 100755 project1/cyassl-3.0.0/examples/client/client.sln delete mode 100755 project1/cyassl-3.0.0/examples/client/client.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/client/include.am delete mode 100644 project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o delete mode 100644 project1/cyassl-3.0.0/examples/client/testsuite_testsuite_test-client.o delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/echoclient.Po delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/.deps/testsuite_testsuite_test-echoclient.Po delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/.dirstamp delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/.libs/echoclient delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.c delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.h delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/echoclient.o delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient.sln delete mode 100755 project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/include.am delete mode 100644 project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/.dirstamp delete mode 100755 project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver delete mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver delete mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.c delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.h delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/echoserver.o delete mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver.sln delete mode 100755 project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/include.am delete mode 100644 project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o delete mode 100644 project1/cyassl-3.0.0/examples/server/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/examples/server/.deps/server.Po delete mode 100644 project1/cyassl-3.0.0/examples/server/.deps/tests_unit_test-server.Po delete mode 100644 project1/cyassl-3.0.0/examples/server/.deps/testsuite_testsuite_test-server.Po delete mode 100644 project1/cyassl-3.0.0/examples/server/.dirstamp delete mode 100755 project1/cyassl-3.0.0/examples/server/.libs/server delete mode 100644 project1/cyassl-3.0.0/examples/server/include.am delete mode 100755 project1/cyassl-3.0.0/examples/server/server delete mode 100755 project1/cyassl-3.0.0/examples/server/server-ntru.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/server/server.c delete mode 100644 project1/cyassl-3.0.0/examples/server/server.h delete mode 100644 project1/cyassl-3.0.0/examples/server/server.o delete mode 100755 project1/cyassl-3.0.0/examples/server/server.sln delete mode 100755 project1/cyassl-3.0.0/examples/server/server.vcproj delete mode 100644 project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o delete mode 100644 project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o delete mode 100755 project1/cyassl-3.0.0/gencertbuf.pl delete mode 100644 project1/cyassl-3.0.0/input delete mode 100644 project1/cyassl-3.0.0/lib/dummy delete mode 100755 project1/cyassl-3.0.0/libtool delete mode 100644 project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_am_macros.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_append_flag.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_append_to_file.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_count_cpus.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_debug.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_file_escapes.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_print_to_file.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_pthread.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_tls.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 delete mode 100644 project1/cyassl-3.0.0/m4/hexversion.m4 delete mode 100644 project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 delete mode 100644 project1/cyassl-3.0.0/m4/libtool.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ltoptions.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ltsugar.m4 delete mode 100644 project1/cyassl-3.0.0/m4/ltversion.m4 delete mode 100644 project1/cyassl-3.0.0/m4/lt~obsolete.m4 delete mode 100644 project1/cyassl-3.0.0/m4/visibility.m4 delete mode 100644 project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 delete mode 100644 project1/cyassl-3.0.0/mcapi/.deps/crypto.Po delete mode 100644 project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po delete mode 100644 project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h delete mode 100644 project1/cyassl-3.0.0/mcapi/README delete mode 100644 project1/cyassl-3.0.0/mcapi/crypto.c delete mode 100644 project1/cyassl-3.0.0/mcapi/crypto.h delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/include.am delete mode 100644 project1/cyassl-3.0.0/mcapi/mcapi_test.c delete mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h delete mode 100644 project1/cyassl-3.0.0/mplabx/README delete mode 100644 project1/cyassl-3.0.0/mplabx/benchmark_main.c delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile delete mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am delete mode 100644 project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml delete mode 100644 project1/cyassl-3.0.0/mplabx/include.am delete mode 100644 project1/cyassl-3.0.0/mplabx/test_main.c delete mode 100644 project1/cyassl-3.0.0/mqx/README delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch delete mode 100644 project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl/.cproject delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl/.project delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl/include.am delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/.cproject delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/.project delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch delete mode 100644 project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch delete mode 100644 project1/cyassl-3.0.0/mqx/util_lib/.cproject delete mode 100644 project1/cyassl-3.0.0/mqx/util_lib/.project delete mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am delete mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c delete mode 100644 project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h delete mode 100644 project1/cyassl-3.0.0/quit delete mode 100644 project1/cyassl-3.0.0/rpm/include.am delete mode 100644 project1/cyassl-3.0.0/rpm/spec delete mode 100644 project1/cyassl-3.0.0/rpm/spec.in delete mode 100644 project1/cyassl-3.0.0/src/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo delete mode 100644 project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo delete mode 100644 project1/cyassl-3.0.0/src/.dirstamp delete mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.la delete mode 100644 project1/cyassl-3.0.0/src/.libs/libcyassl.lai delete mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.so delete mode 120000 project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 delete mode 100755 project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 delete mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-internal.o delete mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-io.o delete mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o delete mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-ssl.o delete mode 100644 project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-tls.o delete mode 100644 project1/cyassl-3.0.0/src/crl.c delete mode 100644 project1/cyassl-3.0.0/src/include.am delete mode 100644 project1/cyassl-3.0.0/src/internal.c delete mode 100644 project1/cyassl-3.0.0/src/io.c delete mode 100644 project1/cyassl-3.0.0/src/keys.c delete mode 100644 project1/cyassl-3.0.0/src/libcyassl.la delete mode 100644 project1/cyassl-3.0.0/src/ocsp.c delete mode 100644 project1/cyassl-3.0.0/src/sniffer.c delete mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo delete mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo delete mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo delete mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo delete mode 100644 project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo delete mode 100644 project1/cyassl-3.0.0/src/ssl.c delete mode 100644 project1/cyassl-3.0.0/src/tls.c delete mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj delete mode 100644 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po delete mode 100644 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am delete mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c delete mode 100755 project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj delete mode 100644 project1/cyassl-3.0.0/stamp-h delete mode 100644 project1/cyassl-3.0.0/stamp-h.in delete mode 100644 project1/cyassl-3.0.0/stamp-h1 delete mode 100644 project1/cyassl-3.0.0/support/cyassl.pc delete mode 100644 project1/cyassl-3.0.0/support/cyassl.pc.in delete mode 100644 project1/cyassl-3.0.0/support/include.am delete mode 100755 project1/cyassl-3.0.0/swig/PythonBuild.sh delete mode 100644 project1/cyassl-3.0.0/swig/README delete mode 100644 project1/cyassl-3.0.0/swig/cyassl.i delete mode 100644 project1/cyassl-3.0.0/swig/cyassl_adds.c delete mode 100644 project1/cyassl-3.0.0/swig/include.am delete mode 100755 project1/cyassl-3.0.0/swig/python_cyassl.vcproj delete mode 100644 project1/cyassl-3.0.0/swig/rsasign.py delete mode 100644 project1/cyassl-3.0.0/swig/runme.py delete mode 100644 project1/cyassl-3.0.0/tags delete mode 100644 project1/cyassl-3.0.0/tests/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po delete mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po delete mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po delete mode 100644 project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po delete mode 100644 project1/cyassl-3.0.0/tests/.dirstamp delete mode 100755 project1/cyassl-3.0.0/tests/.libs/unit.test delete mode 100644 project1/cyassl-3.0.0/tests/api.c delete mode 100644 project1/cyassl-3.0.0/tests/hash.c delete mode 100644 project1/cyassl-3.0.0/tests/include.am delete mode 100644 project1/cyassl-3.0.0/tests/suites.c delete mode 100644 project1/cyassl-3.0.0/tests/test-dtls.conf delete mode 100644 project1/cyassl-3.0.0/tests/test.conf delete mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-api.o delete mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-hash.o delete mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-suites.o delete mode 100644 project1/cyassl-3.0.0/tests/tests_unit_test-unit.o delete mode 100644 project1/cyassl-3.0.0/tests/unit.c delete mode 100644 project1/cyassl-3.0.0/tests/unit.h delete mode 100755 project1/cyassl-3.0.0/tests/unit.test delete mode 100644 project1/cyassl-3.0.0/testsuite/.deps/.dirstamp delete mode 100644 project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po delete mode 100644 project1/cyassl-3.0.0/testsuite/.dirstamp delete mode 100755 project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test delete mode 100755 project1/cyassl-3.0.0/testsuite/.libs/testsuite.test delete mode 100644 project1/cyassl-3.0.0/testsuite/include.am delete mode 100755 project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj delete mode 100644 project1/cyassl-3.0.0/testsuite/testsuite.c delete mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.sln delete mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.test delete mode 100755 project1/cyassl-3.0.0/testsuite/testsuite.vcproj delete mode 100644 project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o delete mode 100755 project1/cyassl-3.0.0/valgrind-error.sh diff --git a/project1/cyassl-3.0.0/AUTHORS b/project1/cyassl-3.0.0/AUTHORS deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/COPYING b/project1/cyassl-3.0.0/COPYING deleted file mode 100644 index d159169d..00000000 --- a/project1/cyassl-3.0.0/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/project1/cyassl-3.0.0/ChangeLog b/project1/cyassl-3.0.0/ChangeLog deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s deleted file mode 100644 index 6fdb7ab7..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s +++ /dev/null @@ -1,338 +0,0 @@ -;/*********************************************************************** -; * $Id: startup_LPC43xx.s 6473 2011-02-16 17:40:54Z nxp27266 $ -; * -; * Project: LPC43xx CMSIS Package -; * -; * Description: Cortex-M3 Core Device Startup File for the NXP LPC43xx -; * Device Series. -; * -; * Copyright(C) 2011, NXP Semiconductor -; * All rights reserved. -; * -; * modified by KEIL -; *********************************************************************** -; * Software that is described herein is for illustrative purposes only -; * which provides customers with programming information regarding the -; * products. This software is supplied "AS IS" without any warranties. -; * NXP Semiconductors assumes no responsibility or liability for the -; * use of the software, conveys no license or title under any patent, -; * copyright, or mask work right to the product. NXP Semiconductors -; * reserves the right to make changes in the software without -; * notification. NXP Semiconductors also make no representation or -; * warranty that such application will be suitable for the specified -; * use without further testing or modification. -; **********************************************************************/ - -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00003000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x0000a000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - -; Vector Table Mapped to Address 0 at Reset - - AREA RESET, DATA, READONLY - EXPORT __Vectors - -Sign_Value EQU 0x5A5A5A5A - -__Vectors DCD __initial_sp ; 0 Top of Stack - DCD Reset_Handler ; 1 Reset Handler - DCD NMI_Handler ; 2 NMI Handler - DCD HardFault_Handler ; 3 Hard Fault Handler - DCD MemManage_Handler ; 4 MPU Fault Handler - DCD BusFault_Handler ; 5 Bus Fault Handler - DCD UsageFault_Handler ; 6 Usage Fault Handler - DCD Sign_Value ; 7 Reserved - DCD 0 ; 8 Reserved - DCD 0 ; 9 Reserved - DCD 0 ; 10 Reserved - DCD SVC_Handler ; 11 SVCall Handler - DCD DebugMon_Handler ; 12 Debug Monitor Handler - DCD 0 ; 13 Reserved - DCD PendSV_Handler ; 14 PendSV Handler - DCD SysTick_Handler ; 15 SysTick Handler - - ; External Interrupts - DCD DAC_IRQHandler ; 16 D/A Converter - DCD M0CORE_IRQHandler ; 17 M0 Core - DCD DMA_IRQHandler ; 18 General Purpose DMA - DCD EZH_IRQHandler ; 19 EZH/EDM - DCD FLASH_EEPROM_IRQHandler ; 20 Reserved for Typhoon - DCD ETH_IRQHandler ; 21 Ethernet - DCD SDIO_IRQHandler ; 22 SD/MMC - DCD LCD_IRQHandler ; 23 LCD - DCD USB0_IRQHandler ; 24 USB0 - DCD USB1_IRQHandler ; 25 USB1 - DCD SCT_IRQHandler ; 26 State Configurable Timer - DCD RIT_IRQHandler ; 27 Repetitive Interrupt Timer - DCD TIMER0_IRQHandler ; 28 Timer0 - DCD TIMER1_IRQHandler ; 29 Timer1 - DCD TIMER2_IRQHandler ; 30 Timer2 - DCD TIMER3_IRQHandler ; 31 Timer3 - DCD MCPWM_IRQHandler ; 32 Motor Control PWM - DCD ADC0_IRQHandler ; 33 A/D Converter 0 - DCD I2C0_IRQHandler ; 34 I2C0 - DCD I2C1_IRQHandler ; 35 I2C1 - DCD SPI_IRQHandler ; 36 SPI - DCD ADC1_IRQHandler ; 37 A/D Converter 1 - DCD SSP0_IRQHandler ; 38 SSP0 - DCD SSP1_IRQHandler ; 39 SSP1 - DCD UART0_IRQHandler ; 40 UART0 - DCD UART1_IRQHandler ; 41 UART1 - DCD UART2_IRQHandler ; 42 UART2 - DCD UART3_IRQHandler ; 43 UART3 - DCD I2S0_IRQHandler ; 44 I2S0 - DCD I2S1_IRQHandler ; 45 I2S1 - DCD SPIFI_IRQHandler ; 46 SPI Flash Interface - DCD SGPIO_IRQHandler ; 47 SGPIO - DCD GPIO0_IRQHandler ; 48 GPIO0 - DCD GPIO1_IRQHandler ; 49 GPIO1 - DCD GPIO2_IRQHandler ; 50 GPIO2 - DCD GPIO3_IRQHandler ; 51 GPIO3 - DCD GPIO4_IRQHandler ; 52 GPIO4 - DCD GPIO5_IRQHandler ; 53 GPIO5 - DCD GPIO6_IRQHandler ; 54 GPIO6 - DCD GPIO7_IRQHandler ; 55 GPIO7 - DCD GINT0_IRQHandler ; 56 GINT0 - DCD GINT1_IRQHandler ; 57 GINT1 - DCD EVRT_IRQHandler ; 58 Event Router - DCD CAN1_IRQHandler ; 59 C_CAN1 - DCD 0 ; 60 Reserved - DCD VADC_IRQHandler ; 61 VADC - DCD ATIMER_IRQHandler ; 62 ATIMER - DCD RTC_IRQHandler ; 63 RTC - DCD 0 ; 64 Reserved - DCD WDT_IRQHandler ; 65 WDT - DCD M0s_IRQHandler ; 66 M0s - DCD CAN0_IRQHandler ; 67 C_CAN0 - DCD QEI_IRQHandler ; 68 QEI - - -;CRP address at offset 0x2FC relative to the BOOT Bank address - IF :LNOT::DEF:NO_CRP - SPACE (0x2FC - (. - __Vectors)) -; EXPORT CRP_Key -CRP_Key DCD 0xFFFFFFFF -; 0xFFFFFFFF => CRP Disabled -; 0x12345678 => CRP Level 1 -; 0x87654321 => CRP Level 2 -; 0x43218765 => CRP Level 3 (ARE YOU SURE?) -; 0x4E697370 => NO ISP (ARE YOU SURE?) - ENDIF - - AREA |.text|, CODE, READONLY - -; Reset Handler - -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT DAC_IRQHandler [WEAK] - EXPORT M0CORE_IRQHandler [WEAK] - EXPORT DMA_IRQHandler [WEAK] - EXPORT EZH_IRQHandler [WEAK] - EXPORT FLASH_EEPROM_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT LCD_IRQHandler [WEAK] - EXPORT USB0_IRQHandler [WEAK] - EXPORT USB1_IRQHandler [WEAK] - EXPORT SCT_IRQHandler [WEAK] - EXPORT RIT_IRQHandler [WEAK] - EXPORT TIMER0_IRQHandler [WEAK] - EXPORT TIMER1_IRQHandler [WEAK] - EXPORT TIMER2_IRQHandler [WEAK] - EXPORT TIMER3_IRQHandler [WEAK] - EXPORT MCPWM_IRQHandler [WEAK] - EXPORT ADC0_IRQHandler [WEAK] - EXPORT I2C0_IRQHandler [WEAK] - EXPORT I2C1_IRQHandler [WEAK] - EXPORT SPI_IRQHandler [WEAK] - EXPORT ADC1_IRQHandler [WEAK] - EXPORT SSP0_IRQHandler [WEAK] - EXPORT SSP1_IRQHandler [WEAK] - EXPORT UART0_IRQHandler [WEAK] - EXPORT UART1_IRQHandler [WEAK] - EXPORT UART2_IRQHandler [WEAK] - EXPORT UART3_IRQHandler [WEAK] - EXPORT I2S0_IRQHandler [WEAK] - EXPORT I2S1_IRQHandler [WEAK] - EXPORT SPIFI_IRQHandler [WEAK] - EXPORT SGPIO_IRQHandler [WEAK] - EXPORT GPIO0_IRQHandler [WEAK] - EXPORT GPIO1_IRQHandler [WEAK] - EXPORT GPIO2_IRQHandler [WEAK] - EXPORT GPIO3_IRQHandler [WEAK] - EXPORT GPIO4_IRQHandler [WEAK] - EXPORT GPIO5_IRQHandler [WEAK] - EXPORT GPIO6_IRQHandler [WEAK] - EXPORT GPIO7_IRQHandler [WEAK] - EXPORT GINT0_IRQHandler [WEAK] - EXPORT GINT1_IRQHandler [WEAK] - EXPORT EVRT_IRQHandler [WEAK] - EXPORT CAN1_IRQHandler [WEAK] - EXPORT VADC_IRQHandler [WEAK] - EXPORT ATIMER_IRQHandler [WEAK] - EXPORT RTC_IRQHandler [WEAK] - EXPORT WDT_IRQHandler [WEAK] - EXPORT M0s_IRQHandler [WEAK] - EXPORT CAN0_IRQHandler [WEAK] - EXPORT QEI_IRQHandler [WEAK] - -DAC_IRQHandler -M0CORE_IRQHandler -DMA_IRQHandler -EZH_IRQHandler -FLASH_EEPROM_IRQHandler -ETH_IRQHandler -SDIO_IRQHandler -LCD_IRQHandler -USB0_IRQHandler -USB1_IRQHandler -SCT_IRQHandler -RIT_IRQHandler -TIMER0_IRQHandler -TIMER1_IRQHandler -TIMER2_IRQHandler -TIMER3_IRQHandler -MCPWM_IRQHandler -ADC0_IRQHandler -I2C0_IRQHandler -I2C1_IRQHandler -SPI_IRQHandler -ADC1_IRQHandler -SSP0_IRQHandler -SSP1_IRQHandler -UART0_IRQHandler -UART1_IRQHandler -UART2_IRQHandler -UART3_IRQHandler -I2S0_IRQHandler -I2S1_IRQHandler -SPIFI_IRQHandler -SGPIO_IRQHandler -GPIO0_IRQHandler -GPIO1_IRQHandler -GPIO2_IRQHandler -GPIO3_IRQHandler -GPIO4_IRQHandler -GPIO5_IRQHandler -GPIO6_IRQHandler -GPIO7_IRQHandler -GINT0_IRQHandler -GINT1_IRQHandler -EVRT_IRQHandler -CAN1_IRQHandler -VADC_IRQHandler -ATIMER_IRQHandler -RTC_IRQHandler -WDT_IRQHandler -M0s_IRQHandler -CAN0_IRQHandler -QEI_IRQHandler - - B . - - ENDP - - ALIGN - -; User Initial Stack & Heap - - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - - END diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c deleted file mode 100644 index 4b1a5aba..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c +++ /dev/null @@ -1,166 +0,0 @@ -/* time.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - - -/*----------------------------------------------------------------------------- - * initialize RTC - *----------------------------------------------------------------------------*/ -#include -#include "lpc43xx_rtc.h" -#include "lpc43xx_cgu.h" - -static void init_RTC() -{ - /* Enable GPIO register interface clock */ - LPC_CCU1->CLK_M4_GPIO_CFG |= 1; - while (!(LPC_CCU1->CLK_M4_GPIO_STAT & 1)) ; - - /* RTC Block section ------------------------------------------------------ */ - /* Init RTC module */ - RTC_Init(LPC_RTC); - - /* Set ALARM time for second */ - RTC_SetAlarmTime (LPC_RTC, RTC_TIMETYPE_SECOND, 30); - - /* Set the AMR for 30s match alarm interrupt */ - RTC_AlarmIntConfig (LPC_RTC, RTC_TIMETYPE_SECOND, ENABLE); - - /* Set the CIIR for minute counter interrupt*/ - RTC_CntIncrIntConfig (LPC_RTC, RTC_TIMETYPE_MINUTE, ENABLE); - - /* Enable rtc (starts increase the tick counter and second counter register) */ - RTC_Cmd(LPC_RTC, ENABLE); - -} - -/*----------------------------------------------------------------------------- - * initialize TIM - *----------------------------------------------------------------------------*/ - -#include "lpc43xx_timer.h" - -static void init_TIM() -{ - TIM_TIMERCFG_Type TIM_ConfigStruct; - /* Initialize timer 0, prescale count time of 1uS */ - TIM_ConfigStruct.PrescaleOption = TIM_PRESCALE_TICKVAL; - TIM_ConfigStruct.PrescaleValue = 204; /* 204MHz */ - /* Set configuration for Tim_config and Tim_MatchConfig */ - TIM_Init(LPC_TIMER2, TIM_TIMER_MODE,&TIM_ConfigStruct); - TIM_ResetCounter(LPC_TIMER2); - /* To start timer 2 */ - TIM_Cmd(LPC_TIMER2,ENABLE); -} - -double current_time() -{ - return (double)LPC_TIMER2->TC/1000000.0; -} - - -void init_time(void) { - init_RTC() ; - init_TIM() ; -} - -#include - -struct tm *Cyassl_MDK_gmtime(const time_t *c) -{ - static struct tm date ; - - RTC_TIME_Type RTCFullTime; - RTC_GetFullTime (LPC_RTC, &RTCFullTime); - - date.tm_year = RTCFullTime.YEAR + 100 ; - date.tm_mon = RTCFullTime.MONTH - 1 ; - date.tm_mday = RTCFullTime.DOM ; - date.tm_hour = RTCFullTime.HOUR ; - date.tm_min = RTCFullTime.MIN ; - date.tm_sec = RTCFullTime.SEC ; - - #if defined(DEBUG_CYASSL) - { - extern void CYASSL_MSG(char *msg) ; - char msg[100] ; - sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n", - RTCFullTime.YEAR+2000, RTCFullTime.MONTH, RTCFullTime.DOM, - RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ; - CYASSL_MSG(msg) ; - } - #endif - - return(&date) ; -} - -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - -#include - -void time_main(void *args) -{ - char * datetime ; - int year ; - RTC_TIME_Type RTCFullTime; - - if( args == NULL || ((func_args *)args)->argc == 1) { - RTC_GetFullTime (LPC_RTC, &RTCFullTime); - printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", - RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000, - RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 'd' ) { - - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d/%d/%d", - (int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ; - RTCFullTime.YEAR = year - 2000 ; - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH); - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR); - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM); - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 't' ) { - RTC_GetFullTime (LPC_RTC, &RTCFullTime); - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d:%d:%d", - (int *)&RTCFullTime.HOUR, - (int *)&RTCFullTime.MIN, - (int *)&RTCFullTime.SEC - ) ; - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC); - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN); - RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR); - } else printf("Invalid argument\n") ; -} - - - - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c deleted file mode 100644 index bb59c8ce..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c +++ /dev/null @@ -1,261 +0,0 @@ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include -#include -#include -#include - - -#include - -#pragma import(__use_no_semihosting_swi) - -/* The following macro definitions may be used to translate this file: - - STDIO - use standard Input/Output device - (default is NOT used) - */ - -/* Standard IO device handles. */ -#define STDIN 0x8001 -#define STDOUT 0x8002 -#define STDERR 0x8003 - -/* Standard IO device name defines. */ -const char __stdin_name[] = "STDIN"; -const char __stdout_name[] = "STDOUT"; -const char __stderr_name[] = "STDERR"; - -struct __FILE { int handle; /* Add whatever you need here */ }; - -#ifdef STDIO -extern int SER_GetChar (void); -extern int SER_PutChar (int ch); - -/*----------------------------------------------------------------------------- - Write character to the Serial Port - *----------------------------------------------------------------------------*/ -int sendchar (int c) -{ - if (c == '\n') { - SER_PutChar ('\r'); - } - SER_PutChar (c); - return (c); -} - - -/*----------------------------------------------------------------------------- - Read character from the Serial Port - *----------------------------------------------------------------------------*/ -int getkey (void) -{ - int ch = SER_GetChar(); - - if (ch < 0) { - return 0; - } - return ch; -} -#endif - -/*--------------------------- _ttywrch ---------------------------------------*/ - -void _ttywrch (int ch) -{ -#ifdef STDIO - sendchar (ch); -#endif -} - -/*--------------------------- _sys_open --------------------------------------*/ -#ifndef NO_FILESYSTEM -static int KEIL_FS_open(const char *name, int openmode) -{ - int i ; int ret ; - #define PATHSIZE 100 - char path[PATHSIZE] ; char *p ; - - if(strlen(name) > PATHSIZE)return(-1) ; - - for(i = 0; i<= strlen(name); i++) { - if(name[i] == '/')path[i] = '\\' ; - else path[i] = name[i] ; - } - if(path[0] == '.' && path[1] == '\\') p = path + 2 ; - else p = path ; - - ret = __sys_open (p, openmode) ; - - return(ret) ; -} -#endif - -FILEHANDLE _sys_open (const char *name, int openmode) -{ - /* Register standard Input Output devices. */ - if (strcmp(name, "STDIN") == 0) { - return (STDIN); - } - if (strcmp(name, "STDOUT") == 0) { - return (STDOUT); - } - if (strcmp(name, "STDERR") == 0) { - return (STDERR); - } - #ifndef NO_FILESYSTEM - return (KEIL_FS_open(name, openmode)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_close -------------------------------------*/ - -int _sys_close (FILEHANDLE fh) -{ - if (fh > 0x8000) { - return (0); - } - #ifndef NO_FILESYSTEM - return (__sys_close (fh)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_write -------------------------------------*/ - -int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode) -{ -#ifdef STDIO - if (fh == STDOUT) { - /* Standard Output device. */ - for ( ; len; len--) { - sendchar (*buf++); - } - return (0); - } -#endif - if (fh > 0x8000) { - return (-1); - } - #ifndef NO_FILESYSTEM - return (__sys_write (fh, buf, len)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_read --------------------------------------*/ - -int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode) -{ -#ifdef STDIO - if (fh == STDIN) { - /* Standard Input device. */ - int sz ; - while((buf[0] = getkey()) == 0) ; - ; - for (sz = 0 ; sz <= len ; sz ++ ) { - if(buf[sz] == 0) break ; - else sz++ ; - buf[sz] = getkey (); - } - return (sz); - } -#endif - if (fh > 0x8000) { - return (-1); - } - #ifndef NO_FILESYSTEM - return (__sys_read (fh, buf, len)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_istty -------------------------------------*/ - -int _sys_istty (FILEHANDLE fh) -{ - if (fh > 0x8000) { - return (1); - } - return (0); -} - -/*--------------------------- _sys_seek --------------------------------------*/ - -int _sys_seek (FILEHANDLE fh, long pos) -{ - if (fh > 0x8000) { - return (-1); - } - #ifndef NO_FILESYSTEM - return (__sys_seek (fh, pos)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_ensure ------------------------------------*/ - -int _sys_ensure (FILEHANDLE fh) -{ - if (fh > 0x8000) { - return (-1); - } - #ifndef NO_FILESYSTEM - return (__sys_ensure (fh)); - #else - return(0) ; - #endif -} - -/*--------------------------- _sys_flen --------------------------------------*/ - -long _sys_flen (FILEHANDLE fh) -{ - if (fh > 0x8000) { - return (0); - } - #ifndef NO_FILESYSTEM - return (__sys_flen (fh)); - #else - return(0) ; - #endif -} - - -/*--------------------------- _sys_tmpnam ------------------------------------*/ - -int _sys_tmpnam (char *name, int sig, unsigned maxlen) -{ - return (1); -} - -/*--------------------------- _sys_command_string ----------------------------*/ - -char *_sys_command_string (char *cmd, int len) -{ - return (cmd); -} - -/*--------------------------- _sys_exit --------------------------------------*/ - -void _sys_exit (int return_code) -{ -#ifdef CYASSL_MDK_SHELL - return ; -#else - /* Endless loop. */ - while (1); -#endif - -} - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c deleted file mode 100644 index d29fbf3b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.c +++ /dev/null @@ -1,28 +0,0 @@ -/* certs_test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* Define initial data for cert buffers */ -#include - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h deleted file mode 100644 index 6629ee05..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef CYASSL_CERT_DATA_H -#define CYASSL_CERT_DATA_H - -#ifdef USE_CERT_BUFFERS_1024 -extern const unsigned char client_key_der_1024[] ; -extern int sizeof_client_key_der_1024 ; -/* ./certs/1024/client-cert.der, 1024-bit */ -extern const unsigned char client_cert_der_1024[] ; -extern int sizeof_client_cert_der_1024 ; -/* ./certs/1024/dh1024.der, 1024-bit */ -extern const unsigned char dh_key_der_1024[] ; -extern int sizeof_dh_key_der_1024 ; -/* ./certs/1024/dsa1024.der, 1024-bit */ -extern const unsigned char dsa_key_der_1024[] ; -extern int sizeof_dsa_key_der_1024 ; -/* ./certs/1024/rsa1024.der, 1024-bit */ -extern const unsigned char rsa_key_der_1024[] ; -extern int sizeof_rsa_key_der_1024 ; - -#elif defined(USE_CERT_BUFFERS_2048) -/* ./certs/client-key.der, 2048-bit */ -extern const unsigned char client_key_der_2048[] ; -extern int sizeof_client_key_der_2048 ; -/* ./certs/client-cert.der, 2048-bit */ -extern const unsigned char client_cert_der_2048[] ; -extern int sizeof_client_cert_der_2048 ; -/* ./certs/dh2048.der, 2048-bit */ -extern const unsigned char dh_key_der_2048[] ; -extern int sizeof_dh_key_der_2048 ; -/* ./certs/dsa2048.der, 2048-bit */ -extern const unsigned char dsa_key_der_2048[] ; -extern int sizeof_dsa_key_der_2048; -/* ./certs/rsa2048.der, 2048-bit */ -extern const unsigned char rsa_key_der_2048[] ; -extern int sizeof_rsa_key_der_2048 ; -#endif - -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h deleted file mode 100644 index 8bd713cd..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h +++ /dev/null @@ -1,291 +0,0 @@ -/* config-BEREFOOT.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/**** CyaSSL for KEIL-RL Configuration ****/ - -#define __CORTEX_M3__ -#define CYASSL_MDK_ARM -#define NO_WRITEV -#define NO_CYASSL_DIR -#define NO_MAIN_DRIVER - -#define CYASSL_DER_LOAD -#define HAVE_NULL_CIPHER - -#define SINGLE_THREADED -#define NO_FILESYSTEM -#define NO_TLS - -#define NO_ECHOSERVER -#define NO_ECHOCLIENT -#define NO_SIMPLE_SERVER -#define NO_SIMPLE_CLIENT - -// <<< Use Configuration Wizard in Context Menu >>> - -// Build Target: KEIL-BAREFOOT -// Single Threaded, No File System, No TCP-net -// -// Command Shell -#define MDK_CONF_SHELL 1 -#if MDK_CONF_SHELL == 1 -#define CYASSL_MDK_SHELL -#endif -// -// CyaSSL Apps -// Crypt/Cipher -// Cert Storage <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) -#define MDK_CONF_CERT_BUFF 1 -#if MDK_CONF_CERT_BUFF == 1 -#define USE_CERT_BUFFERS_1024 -#elif MDK_CONF_CERT_BUFF == 2 -#define USE_CERT_BUFFERS_2048 -#endif - -// Crypt/Cipher Test Suite -#define MDK_CONF_CTaoCryptTest 1 -#if MDK_CONF_CTaoCryptTest == 0 -#define NO_CRYPT_TEST -#endif -// -// Crypt/Cipher Benchmark -#define MDK_CONF_CTaoCryptBenchmark 1 -#if MDK_CONF_CTaoCryptBenchmark == 0 -#define NO_CRYPT_BENCHMARK -#define BENCH_EMBEDDED -#endif -// -// - -// STM32 Hardware Crypt -// STM32F2 Hardware RNG -#define MDK_CONF_STM32F2_RNG 0 -#if MDK_CONF_STM32F2_RNG == 1 -#define STM32F2_RNG -#else -#define NO_DEV_RANDOM -#endif -// -// STM32F2 Hardware Crypt -#define MDK_CONF_STM32F2_CRYPTO 0 -#if MDK_CONF_STM32F2_CRYPTO == 1 -#define STM32F2_CRYPTO -#endif -// - -// - - -// CTaoCrypt Library - -// MD5, SHA, SHA-256, AES, RC4, ASN, RSA -// -// MD2 -#define MDK_CONF_MD2 0 -#if MDK_CONF_MD2 == 1 -#define CYASSL_MD2 -#endif -// -// MD4 -#define MDK_CONF_MD4 1 -#if MDK_CONF_MD4 == 0 -#define NO_MD4 -#endif -// -// SHA-384 -// This has to be with SHA512 -#define MDK_CONF_SHA384 0 -#if MDK_CONF_SHA384 == 1 -#define CYASSL_SHA384 -#endif -// -// SHA-512 -#define MDK_CONF_SHA512 0 -#if MDK_CONF_SHA512 == 1 -#define CYASSL_SHA512 -#endif -// -// RIPEMD -#define MDK_CONF_RIPEMD 0 -#if MDK_CONF_RIPEMD == 1 -#define CYASSL_RIPEMD -#endif -// -// HMAC -#define MDK_CONF_HMAC 1 -#if MDK_CONF_HMAC == 0 -#define NO_HMAC -#endif -// -// HC128 -#define MDK_CONF_HC128 0 -#if MDK_CONF_HC128 == 1 -#define HAVE_HC128 -#endif -// -// RABBIT -#define MDK_CONF_RABBIT 1 -#if MDK_CONF_RABBI == 0 -#define NO_RABBIT -#endif -// - -// AEAD -#define MDK_CONF_AEAD 0 -#if MDK_CONF_AEAD == 1 -#define HAVE_AEAD -#endif -// -// DES3 -#define MDK_CONF_DES3 1 -#if MDK_CONF_DES3 == 0 -#define NO_DES3 -#endif -// -// CAMELLIA -#define MDK_CONF_CAMELLIA 0 -#if MDK_CONF_CAMELLIA == 1 -#define HAVE_CAMELLIA -#endif -// - -// DH -// need this for CYASSL_SERVER, OPENSSL_EXTRA -#define MDK_CONF_DH 1 -#if MDK_CONF_DH == 0 -#define NO_DH -#endif -// -// DSA -#define MDK_CONF_DSA 1 -#if MDK_CONF_DSA == 0 -#define NO_DSA -#endif -// -// PWDBASED -#define MDK_CONF_PWDBASED 1 -#if MDK_CONF_PWDBASED == 0 -#define NO_PWDBASED -#endif -// - -// ECC -#define MDK_CONF_ECC 0 -#if MDK_CONF_ECC == 1 -#define HAVE_ECC -#endif -// -// PSK -#define MDK_CONF_PSK 1 -#if MDK_CONF_PSK == 0 -#define NO_PSK -#endif -// -// AESCCM (Turn off Hardware Crypt) -#define MDK_CONF_AESCCM 0 -#if MDK_CONF_AESCCM == 1 -#define HAVE_AESCCM -#endif -// -// AESGCM (Turn off Hardware Crypt) -#define MDK_CONF_AESGCM 0 -#if MDK_CONF_AESGCM == 1 -#define HAVE_AESGCM -#define BUILD_AESGCM -#endif -// -// NTRU (need License, "crypto_ntru.h") -#define MDK_CONF_NTRU 0 -#if MDK_CONF_NTRU == 1 -#define HAVE_NTRU -#endif -// -// - -// Others - -// Inline -#define MDK_CONF_INLINE 0 -#if MDK_CONF_INLINE == 0 -#define NO_INLINE -#endif -// -// Debug -// Debug Message -#define MDK_CONF_DebugMessage 0 -#if MDK_CONF_DebugMessage == 1 -#define DEBUG_CYASSL -#endif -// -// Check malloc -#define MDK_CONF_CheckMalloc 1 -#if MDK_CONF_CheckMalloc == 1 -#define CYASSL_MALLOC_CHECK -#endif -// - - -// -// ErrNo.h -#define MDK_CONF_ErrNo 0 -#if MDK_CONF_ErrNo == 1 -#define HAVE_ERRNO -#endif -// -// zlib (need "zlib.h") -#define MDK_CONF_LIBZ 0 -#if MDK_CONF_LIBZ == 1 -#define HAVE_LIBZ -#endif -// -// CAVIUM (need CAVIUM headers) -#define MDK_CONF_CAVIUM 0 -#if MDK_CONF_CAVIUM == 1 -#define HAVE_CAVIUM -#endif -// - -// Error Strings -#define MDK_CONF_ErrorStrings 1 -#if MDK_CONF_ErrorStrings == 0 -#define NO_ERROR_STRINGS -#endif -// - -// Small Stack -#define MDK_CONF_SmallStack 1 -#if MDK_CONF_SmallStack == 0 -#define NO_CYASSL_SMALL_STACK -#endif -// -// Use Fast Math -#define MDK_CONF_FASTMATH 0 -#if MDK_CONF_FASTMATH == 1 -#define USE_FAST_MATH -#endif -// - - -// - -// -// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h deleted file mode 100644 index c05fba66..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h +++ /dev/null @@ -1,329 +0,0 @@ -/* config-FS.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/**** CyaSSL for KEIL-RL Configuration ****/ - -#define __CORTEX_M3__ -#define CYASSL_KEIL_RL -#define NO_WRITEV -#define NO_CYASSL_DIR -#define NO_MAIN_DRIVER - - -#define CYASSL_DER_LOAD -#define HAVE_NULL_CIPHER - -#define SINGLE_THREADED - -#define NO_ECHOSERVER -#define NO_ECHOCLIENT -#define NO_SIMPLE_SERVER -#define NO_SIMPLE_CLIENT - -// <<< Use Configuration Wizard in Context Menu >>> - -// Build Target: KEIL-FS -// Single Threaded, With File System, No TCP-net -// -// Command Shell -#define MDK_CONF_SHELL 1 -#if MDK_CONF_SHELL == 1 -#define CYASSL_MDK_SHELL -#endif -// -// CyaSSL Apps -// Crypt/Cipher -// Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) -#define MDK_CONF_CERT_BUFF 0 -#if MDK_CONF_CERT_BUFF== 1 -#define USE_CERT_BUFFERS_1024 -#elif MDK_CONF_CERT_BUFF == 2 -#define USE_CERT_BUFFERS_2048 -#endif - -// Crypt/Cipher Test Suite -#define MDK_CONF_CTaoCryptTest 1 -#if MDK_CONF_CTaoCryptTest == 0 -#define NO_CRYPT_TEST -#endif -// -// Crypt/Cipher Benchmark -#define MDK_CONF_CTaoCryptBenchmark 1 -#if MDK_CONF_CTaoCryptBenchmark == 0 -#define NO_CRYPT_BENCHMARK -#endif -// -// - -// STM32 Hardware Crypt -// STM32F2 Hardware RNG -#define MDK_CONF_STM32F2_RNG 0 -#if MDK_CONF_STM32F2_RNG == 1 -#define STM32F2_RNG -#else -#define NO_DEV_RANDOM -#endif -// -// STM32F2 Hardware Crypt -#define MDK_CONF_STM32F2_CRYPTO 0 -#if MDK_CONF_STM32F2_CRYPTO == 1 -#define STM32F2_CRYPTO -#endif -// - -// - -// CyaSSL Library -// SSL (Included by default) -// - -// TLS -#define MDK_CONF_TLS 1 -#if MDK_CONF_TLS == 0 -#define NO_TLS -#endif -// - -// CertGen -#define MDK_CONF_CERT_GEN 0 -#if MDK_CONF_CERT_GEN == 1 -#define CYASSL_CERT_GEN -#endif -// -// KeyGen -#define MDK_CONF_KEY_GEN 0 -#if MDK_CONF_KEY_GEN == 1 -#define CYASSL_KEY_GEN -#endif -// -// CRL -#define MDK_CONF_DER_LOAD 0 -#if MDK_CONF_DER_LOAD == 1 -#define CYASSL_DER_LOAD -#endif -// -// OpenSSL Extra -#define MDK_CONF_OPENSSL_EXTRA 0 -#if MDK_CONF_OPENSSL_EXTRA == 1 -#define OPENSSL_EXTRA -#endif -// -// CRL Monitor, OCSP (not supported with KEIL) -// - -// - -// CTaoCrypt Library - -// MD5, SHA, SHA-256, AES, RC4, ASN, RSA -// - -// MD2 -#define MDK_CONF_MD2 0 -#if MDK_CONF_MD2 == 1 -#define CYASSL_MD2 -#endif -// -// MD4 -#define MDK_CONF_MD4 1 -#if MDK_CONF_MD4 == 0 -#define NO_MD4 -#endif -// -// SHA-384 -// This has to be with SHA512 -#define MDK_CONF_SHA384 0 -#if MDK_CONF_SHA384 == 1 -#define CYASSL_SHA384 -#endif -// -// SHA-512 -#define MDK_CONF_SHA512 0 -#if MDK_CONF_SHA512 == 1 -#define CYASSL_SHA512 -#endif -// -// RIPEMD -#define MDK_CONF_RIPEMD 0 -#if MDK_CONF_RIPEMD == 1 -#define CYASSL_RIPEMD -#endif -// -// HMAC -#define MDK_CONF_HMAC 1 -#if MDK_CONF_HMAC == 0 -#define NO_HMAC -#endif -// -// HC128 -#define MDK_CONF_HC128 0 -#if MDK_CONF_HC128 == 1 -#define HAVE_HC128 -#endif -// -// RABBIT -#define MDK_CONF_RABBIT 1 -#if MDK_CONF_RABBI == 0 -#define NO_RABBIT -#endif -// - -// AEAD -#define MDK_CONF_AEAD 0 -#if MDK_CONF_AEAD == 1 -#define HAVE_AEAD -#endif -// -// DES3 -#define MDK_CONF_DES3 1 -#if MDK_CONF_DES3 == 0 -#define NO_DES3 -#endif -// -// CAMELLIA -#define MDK_CONF_CAMELLIA 0 -#if MDK_CONF_CAMELLIA == 1 -#define HAVE_CAMELLIA -#endif -// - -// DH -// need this for CYASSL_SERVER, OPENSSL_EXTRA -#define MDK_CONF_DH 1 -#if MDK_CONF_DH == 0 -#define NO_DH -#endif -// -// DSA -#define MDK_CONF_DSA 1 -#if MDK_CONF_DSA == 0 -#define NO_DSA -#endif -// -// PWDBASED -#define MDK_CONF_PWDBASED 1 -#if MDK_CONF_PWDBASED == 0 -#define NO_PWDBASED -#endif -// - -// ECC -#define MDK_CONF_ECC 0 -#if MDK_CONF_ECC == 1 -#define HAVE_ECC -#endif -// -// PSK -#define MDK_CONF_PSK 1 -#if MDK_CONF_PSK == 0 -#define NO_PSK -#endif -// -// AESCCM (Turn off Hardware Crypt) -#define MDK_CONF_AESCCM 0 -#if MDK_CONF_AESCCM == 1 -#define HAVE_AESCCM -#endif -// -// AESGCM (Turn off Hardware Crypt) -#define MDK_CONF_AESGCM 0 -#if MDK_CONF_AESGCM == 1 -#define HAVE_AESGCM -#define BUILD_AESGCM -#endif -// -// NTRU (need License, "crypto_ntru.h") -#define MDK_CONF_NTRU 0 -#if MDK_CONF_NTRU == 1 -#define HAVE_NTRU -#endif -// -// - -// Others - -// Inline -#define MDK_CONF_INLINE 0 -#if MDK_CONF_INLINE == 0 -#define NO_INLINE -#endif -// -// Debug -// Debug Message -#define MDK_CONF_DebugMessage 0 -#if MDK_CONF_DebugMessage == 1 -#define DEBUG_CYASSL -#endif -// -// Check malloc -#define MDK_CONF_CheckMalloc 1 -#if MDK_CONF_CheckMalloc == 1 -#define CYASSL_MALLOC_CHECK -#endif -// - - -// -// ErrNo.h -#define MDK_CONF_ErrNo 0 -#if MDK_CONF_ErrNo == 1 -#define HAVE_ERRNO -#endif -// -// zlib (need "zlib.h") -#define MDK_CONF_LIBZ 0 -#if MDK_CONF_LIBZ == 1 -#define HAVE_LIBZ -#endif -// -// CAVIUM (need CAVIUM headers) -#define MDK_CONF_CAVIUM 0 -#if MDK_CONF_CAVIUM == 1 -#define HAVE_CAVIUM -#endif -// - -// Error Strings -#define MDK_CONF_ErrorStrings 1 -#if MDK_CONF_ErrorStrings == 0 -#define NO_ERROR_STRINGS -#endif -// - -// Small Stack -#define MDK_CONF_SmallStack 1 -#if MDK_CONF_SmallStack == 0 -#define NO_CYASSL_SMALL_STACK -#endif -// -// Use Fast Math -#define MDK_CONF_FASTMATH 0 -#if MDK_CONF_FASTMATH == 1 -#define USE_FAST_MATH -#endif -// - - -// - -// -// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h deleted file mode 100644 index 106e7718..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h +++ /dev/null @@ -1,351 +0,0 @@ -/* config-RTX-TCP-FS.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/**** CyaSSL for KEIL-RL Configuration ****/ - -#define __CORTEX_M3__ -#define CYASSL_MDK_ARM -#define NO_WRITEV -#define NO_CYASSL_DIR -#define NO_MAIN_DRIVER - - -#define CYASSL_DER_LOAD -#define HAVE_NULL_CIPHER - -#define HAVE_KEIL_RTX -#define CYASSL_KEIL_TCP_NET - - -// <<< Use Configuration Wizard in Context Menu >>> -// Build Target: KEIL-RTX-TCP-FS -// RTOS, File System and TCP-net -// -// Command Shell -#define MDK_CONF_SHELL 1 -#if MDK_CONF_SHELL == 1 -#define CYASSL_MDK_SHELL -#endif -// -// CyaSSL Apps -// Crypt/Cipher -// Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes) -#define MDK_CONF_CERT_BUFF 0 -#if MDK_CONF_CERT_BUFF== 1 -#define USE_CERT_BUFFERS_1024 -#elif MDK_CONF_CERT_BUFF == 2 -#define USE_CERT_BUFFERS_2048 -#endif - -// Crypt/Cipher Test Suite -#define MDK_CONF_CTaoCryptTest 1 -#if MDK_CONF_CTaoCryptTest == 0 -#define NO_CRYPT_TEST -#endif -// -// Crypt/Cipher Benchmark -#define MDK_CONF_CTaoCryptBenchmark 1 -#if MDK_CONF_CTaoCryptBenchmark == 0 -#define NO_CRYPT_BENCHMARK -#define BENCH_EMBEDDED -#endif -// -// -// SSL/TLS Server/Client -// echoServer -#define MDK_CONF_echoServer 1 -#if MDK_CONF_echoServer == 0 -#define NO_ECHOSERVER -#endif -// -// echoClient -#define MDK_CONF_echoClient 1 -#if MDK_CONF_echoClient == 0 -#define NO_ECHOCLIENT -#endif -// -// SimpleServer -#define MDK_CONF_simpleServer 1 -#if MDK_CONF_simpleServer == 0 -#define NO_SIMPLE_SERVER -#endif -// -// SimpleCliet -#define MDK_CONF_simpleClient 1 -#if MDK_CONF_simpleClient == 0 -#define NO_SIMPLE_CLIENT -#endif -// -// -// -// STM32 Hardware Crypt -// STM32F2 Hardware RNG -#define MDK_CONF_STM32F2_RNG 0 -#if MDK_CONF_STM32F2_RNG == 1 -#define STM32F2_RNG -#else -#define NO_DEV_RANDOM -#endif -// -// STM32F2 Hardware Crypt -#define MDK_CONF_STM32F2_CRYPTO 0 -#if MDK_CONF_STM32F2_CRYPTO == 1 -#define STM32F2_CRYPTO -#endif -// - -// - -// CyaSSL Library -// SSL (Included by default) -// - -// TLS -#define MDK_CONF_TLS 1 -#if MDK_CONF_TLS == 0 -#define NO_TLS -#endif -// - -// CertGen -#define MDK_CONF_CERT_GEN 0 -#if MDK_CONF_CERT_GEN == 1 -#define CYASSL_CERT_GEN -#endif -// -// KeyGen -#define MDK_CONF_KEY_GEN 0 -#if MDK_CONF_KEY_GEN == 1 -#define CYASSL_KEY_GEN -#endif -// -// CRL -#define MDK_CONF_DER_LOAD 0 -#if MDK_CONF_DER_LOAD == 1 -#define CYASSL_DER_LOAD -#endif -// -// OpenSSL Extra -#define MDK_CONF_OPENSSL_EXTRA 1 -#if MDK_CONF_OPENSSL_EXTRA == 1 -#define OPENSSL_EXTRA -#endif -// -// CRL Monitor, OCSP (not supported with KEIL) -// - -// - -// CTaoCrypt Library - -// MD5, SHA, SHA-256, AES, RC4, ASN, RSA -// -// MD2 -#define MDK_CONF_MD2 0 -#if MDK_CONF_MD2 == 1 -#define CYASSL_MD2 -#endif -// -// MD4 -#define MDK_CONF_MD4 1 -#if MDK_CONF_MD4 == 0 -#define NO_MD4 -#endif -// -// SHA-384 -// This has to be with SHA512 -#define MDK_CONF_SHA384 0 -#if MDK_CONF_SHA384 == 1 -#define CYASSL_SHA384 -#endif -// -// SHA-512 -#define MDK_CONF_SHA512 0 -#if MDK_CONF_SHA512 == 1 -#define CYASSL_SHA512 -#endif -// -// RIPEMD -#define MDK_CONF_RIPEMD 1 -#if MDK_CONF_RIPEMD == 1 -#define CYASSL_RIPEMD -#endif -// -// HMAC -#define MDK_CONF_HMAC 1 -#if MDK_CONF_HMAC == 0 -#define NO_HMAC -#endif -// -// HC128 -#define MDK_CONF_HC128 0 -#if MDK_CONF_HC128 == 1 -#define HAVE_HC128 -#endif -// -// RABBIT -#define MDK_CONF_RABBIT 1 -#if MDK_CONF_RABBI == 0 -#define NO_RABBIT -#endif -// - -// AEAD -#define MDK_CONF_AEAD 0 -#if MDK_CONF_AEAD == 1 -#define HAVE_AEAD -#endif -// -// DES3 -#define MDK_CONF_DES3 1 -#if MDK_CONF_DES3 == 0 -#define NO_DES3 -#endif -// -// CAMELLIA -#define MDK_CONF_CAMELLIA 0 -#if MDK_CONF_CAMELLIA == 1 -#define HAVE_CAMELLIA -#endif -// - -// DH -// need this for CYASSL_SERVER, OPENSSL_EXTRA -#define MDK_CONF_DH 1 -#if MDK_CONF_DH == 0 -#define NO_DH -#endif -// -// DSA -#define MDK_CONF_DSA 1 -#if MDK_CONF_DSA == 0 -#define NO_DSA -#endif -// -// PWDBASED -#define MDK_CONF_PWDBASED 1 -#if MDK_CONF_PWDBASED == 0 -#define NO_PWDBASED -#endif -// - -// ECC -#define MDK_CONF_ECC 1 -#if MDK_CONF_ECC == 1 -#define HAVE_ECC -#endif -// -// PSK -#define MDK_CONF_PSK 1 -#if MDK_CONF_PSK == 0 -#define NO_PSK -#endif -// -// AESCCM (Turn off Hardware Crypt) -#define MDK_CONF_AESCCM 0 -#if MDK_CONF_AESCCM == 1 -#define HAVE_AESCCM -#endif -// -// AESGCM (Turn off Hardware Crypt) -#define MDK_CONF_AESGCM 0 -#if MDK_CONF_AESGCM == 1 -#define HAVE_AESGCM -#define BUILD_AESGCM -#endif -// -// NTRU (need License, "crypto_ntru.h") -#define MDK_CONF_NTRU 0 -#if MDK_CONF_NTRU == 1 -#define HAVE_NTRU -#endif -// -// - -// Others - -// Inline -#define MDK_CONF_INLINE 0 -#if MDK_CONF_INLINE == 0 -#define NO_INLINE -#endif -// -// Debug -// Debug Message -#define MDK_CONF_DEBUG_MSG 0 -#if MDK_CONF_DEBUG_MSG == 1 -#define DEBUG_CYASSL -#endif -// -// Check malloc -#define MDK_CONF_CHECK_MALLOC 1 -#if MDK_CONF_CHECK_MALLOC == 1 -#define CYASSL_MALLOC_CHECK -#endif -// - - -// -// ErrNo.h -#define MDK_CONF_ERR_NO 0 -#if MDK_CONF_ERR_NO == 1 -#define HAVE_ERRNO -#endif -// -// zlib (need "zlib.h") -#define MDK_CONF_LIBZ 0 -#if MDK_CONF_LIBZ == 1 -#define HAVE_LIBZ -#endif -// -// CAVIUM (need CAVIUM headers) -#define MDK_CONF_CAVIUM 0 -#if MDK_CONF_CAVIUM == 1 -#define HAVE_CAVIUM -#endif -// - -// Error Strings -#define MDK_CONF_ErrorStrings 1 -#if MDK_CONF_ErrorStrings == 0 -#define NO_ERROR_STRINGS -#endif -// - -// Small Stack -#define MDK_CONF_SMALL_STACK 1 -#if MDK_CONF_SMALL_STACK == 0 -#define NO_CYASSL_SMALL_STACK -#endif -// -// Use Fast Math -#define MDK_CONF_FASTMATH 0 -#if MDK_CONF_FASTMATH == 1 -#define USE_FAST_MATH -#endif -// - - -// - -// -// <<< end of configuration section >>> diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h deleted file mode 100644 index 4d89d8fc..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h +++ /dev/null @@ -1,46 +0,0 @@ -/* config.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/**** CyaSSL for KEIL-RL Configuration ****/ - -#define __CORTEX_M3__ -#define CYASSL_MDK_ARM -#define NO_WRITEV -#define NO_CYASSL_DIR - -/* for Retarget.c */ -#define STDIO -#define BENCH_EMBEDDED - -#define CYASSL_DER_LOAD -#define HAVE_NULL_CIPHER - -#if defined(MDK_CONF_RTX_TCP_FS) -#include "config-RTX-TCP-FS.h" -#elif defined(MDK_CONF_TCP_FS) -#include "config-TCP-FS.h" -#elif defined(MDK_CONF_FS) -#include "config-FS.h" -#elif defined(MDK_CONF_BARE_METAL) -#include "config-BARE-METAL.h" -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c deleted file mode 100644 index b8e3d59a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c +++ /dev/null @@ -1,249 +0,0 @@ -/* cyassl_MDK_ARM.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/***************************************************************************************/ -/** This file is for defining functions for specific to KEIL-RL. **/ -/***************************************************************************************/ -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#if defined (CYASSL_MDK5) - #include "cmsis_os.h" - #if defined(CYASSL_KEIL_TCP_NET) - #include "rl_net.h" - #endif -#else - #include -#endif - -#include "cyassl_MDK_ARM.h" - -#include -#include - -#if defined (CYASSL_CMSIS_RTOS) - #define os_dly_wait(t) osDelay(10*t) -#endif - - -/** KEIL-RL TCPnet ****/ -/** TCPnet BSD socket does not have following functions. **/ - -#if defined(CYASSL_KEIL_TCP_NET) -char *inet_ntoa(struct in_addr in) -{ - #define NAMESIZE 16 - static char name[NAMESIZE] ; - sprintf(name, "%d.%d.%d.%d", (in.s_addr>>24)&0xff, (in.s_addr>>16)&0xff, (in.s_addr>>8)&0xff, in.s_addr&0xff) ; - return name ; -} - -unsigned long inet_addr(const char *cp) -{ - unsigned int a[4] ; unsigned long ret ; - sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) ; - ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ; - return(ret) ; -} - - -/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/ -int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) -{ - int ret = 0 ; - #if defined(CYASSL_KEIL_TCP_NET) - - SOCKADDR_IN addr ; - - addr = *(SOCKADDR_IN *)sa ; - - do { - #undef connect /* Go to KEIL TCPnet connect */ - ret = connect(sd, (SOCKADDR *)&addr, sizeof(addr)) ; - os_dly_wait(50); - } while(ret == SCK_EWOULDBLOCK) ; - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Connect return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; -} - - -int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) -{ - int ret = 0 ; - - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef accept /* Go to KEIL TCPnet accept */ - ret = accept(sd, addr, addrlen) ; - if(ret != SCK_EWOULDBLOCK) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Accept return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; - -} - -int Cyassl_recv(int sd, void *buf, size_t len, int flags) -{ - int ret = 0; - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef recv /* Go to KEIL TCPnet recv */ - ret = recv(sd, buf, len, flags) ; - if((ret != SCK_EWOULDBLOCK) &&( ret != SCK_ETIMEOUT)) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Recv return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; -} - -int Cyassl_send(int sd, const void *buf, size_t len, int flags) -{ - int ret = 0 ; - - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef send /* Go to KEIL TCPnet send */ - ret = send(sd, buf, len, flags) ; - if(ret != SCK_EWOULDBLOCK) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Send return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - -#endif /* CYASSL_KEIL_TCP_NET */ - return(ret) ; - -} - -#endif /* CYASSL_KEIL_TCP_NET */ - -#if defined(CYASSL_KEIL_TCP_NET) -void Cyassl_sleep(int t) -{ - #if defined(HAVE_KEIL_RTX) - os_dly_wait(t/1000+1) ; - #endif -} - -int Cyassl_tcp_select(int sd, int timeout) -{ - - return 0 ; - -} -#endif - -extern int strlen(const char *s) ; - -FILE * CyaSSL_fopen(const char *name, const char *openmode) -{ - int i ; FILE * ret ; - #define PATHSIZE 100 - char path[PATHSIZE] ; char *p ; - - if(strlen(name) > PATHSIZE)return(NULL) ; - - for(i = 0; i<= strlen(name); i++) { - if(name[i] == '/')path[i] = '\\' ; - else path[i] = name[i] ; - } - if(path[0] == '.' && path[1] == '\\') p = path + 2 ; - else p = path ; - - ret = fopen (p, openmode) ; - - return(ret) ; -} - -#if defined (CYASSL_MDK5) -#define getkey getchar -#define sendchar putchar -#else -extern int getkey(void) ; -extern int sendchar(int c) ; -#endif - -char * Cyassl_fgets ( char * str, int num, FILE * f ) -{ - int i ; - - for(i = 0 ; i< num ; i++) { - while((str[i] = getkey()) == 0) { - #if defined (HAVE_KEIL_RTX) - #if !defined(CYASSL_CMSIS_RTOS) - os_tsk_pass (); - #else - osThreadYield (); - #endif - #endif - } - if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') { - sendchar('\n') ; - str[i++] = '\n' ; - str[i] = '\0' ; - break ; - } else if(str[i] == '\010') { /* BS */ - if(i) { /* erace one char */ - sendchar('\010') ; sendchar(' ') ; sendchar('\010') ; - i = (i>0 ? (i-2) : -1 ) ; - continue ; - } - } else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */ - str[i] = '\0' ; - return(0) ; - } - sendchar(str[i]) ; - } - return(str) ; -} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h deleted file mode 100644 index b2616433..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h +++ /dev/null @@ -1,103 +0,0 @@ -/* cyassl_KEIL_RL.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/******************************************************************************/ -/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/ -/******************************************************************************/ -#ifndef CYASSL_KEIL_RL_H -#define CYASSL_KEIL_RL_H - - - -#include - -/* Go to STDIN */ -#define fgets(buff, sz, fd) Cyassl_fgets(buff, sz, fd) -extern char * Cyassl_fgets ( char * str, int num, FILE * f ) ; - -#define SOCKET_T int - -/*** #include ***/ -#define NUMBITSPERBYTE 8 -#define FD_SETSIZE 10 - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ - -typedef struct fd_set { - fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; -} fd_set; - -/*** #include ***/ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* microseconds */ -}; - - -/*** #include **/ -/* - int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, const struct timeval *timeout); - void FD_CLR(int fd, fd_set *set); - int FD_ISSET(int fd, fd_set *set); - void FD_SET(int fd, fd_set *set); - void FD_ZERO(fd_set *set); -*/ -typedef int socklen_t ; - -/* for avoiding conflict with KEIL-TCPnet BSD socket */ -/* Bodies are in cyassl_KEIL_RL.c */ -#define connect Cyassl_connect -#define accept Cyassl_accept -#define recv Cyassl_recv -#define send Cyassl_send -#define sleep Cyassl_sleep - -/* for avoiding conflicting with KEIL-TCPnet TCP socket */ -/* Bodies are in test.h */ -#define tcp_connect Cyassl_tcp_connect -#define tcp_socket Cyassl_tcp_soket -#define tcp_listen Cyassl_tcp_listen -#define tcp_select Cyassl_tcp_select - -extern int Cyassl_connect(int sd, const struct sockaddr * sa, int sz) ; -extern int Cyassl_accept(int sd, struct sockaddr *addr, socklen_t *addrlen); -extern int Cyassl_recv(int sd, void *buf, size_t len, int flags); -extern int Cyassl_send(int sd, const void *buf, size_t len, int flags); -extern void Cyassl_sleep(int sec) ; -extern int Cyassl_tcp_select(int sd, int timeout) ; - -/** KEIL-RL TCPnet ****/ -/* TCPnet BSD socket does not have following functions. */ -extern char *inet_ntoa(struct in_addr in); -extern unsigned long inet_addr(const char *cp); -extern int setsockopt(int sockfd, int level, int optname, - const void *optval, socklen_t optlen); -extern int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, const struct timeval *timeout); - -/* CyaSSL MDK-ARM time functions */ -#include -struct tm *Cyassl_MDK_gmtime(const time_t *c) ; -extern double current_time(void) ; - -#endif /* CYASSL_KEIL_RL_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c deleted file mode 100644 index 635267e3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c +++ /dev/null @@ -1,172 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include -#include -#include "cyassl_MDK_ARM.h" - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -#if !defined(NO_FILESYSTEM) -static void init_card (void) -{ - U32 retv; - - while ((retv = finit (NULL)) != 0) { /* Wait until the Card is ready */ - if (retv == 1) { - printf ("\nSD/MMC Init Failed"); - printf ("\nInsert Memory card and press key...\n"); - } else { - printf ("\nSD/MMC Card is Unformatted"); - } - } -} -#endif - - -/*----------------------------------------------------------------------------- - * TCP/IP tasks - *----------------------------------------------------------------------------*/ -#ifdef CYASSL_KEIL_TCP_NET -__task void tcp_tick (void) -{ - - CYASSL_MSG("Time tick started.") ; - #if defined (HAVE_KEIL_RTX) - os_itv_set (10); - #endif - - while (1) { - #if defined (HAVE_KEIL_RTX) - os_itv_wait (); - #endif - /* Timer tick every 100 ms */ - timer_tick (); - } -} - -__task void tcp_poll (void) -{ - CYASSL_MSG("TCP polling started.\n") ; - while (1) { - main_TcpNet (); - #if defined (HAVE_KEIL_RTX) - os_tsk_pass (); - #endif - } -} -#endif - -#if defined(HAVE_KEIL_RTX) && defined(CYASSL_MDK_SHELL) -#define SHELL_STACKSIZE 1000 -static unsigned char Shell_stack[SHELL_STACKSIZE] ; -#endif - - -#if defined(CYASSL_MDK_SHELL) -extern void shell_main(void) ; -#endif - -extern void time_main(int) ; -extern void benchmark_test(void) ; -extern void SER_Init(void) ; - -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ - -/*** This is the parent task entry ***/ -void main_task (void) -{ - #ifdef CYASSL_KEIL_TCP_NET - init_TcpNet (); - - os_tsk_create (tcp_tick, 2); - os_tsk_create (tcp_poll, 1); - #endif - - #ifdef CYASSL_MDK_SHELL - #ifdef HAVE_KEIL_RTX - os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ; - #else - shell_main() ; - #endif - #else - - /************************************/ - /*** USER APPLICATION HERE ***/ - /************************************/ - printf("USER LOGIC STARTED\n") ; - - #endif - - #ifdef HAVE_KEIL_RTX - CYASSL_MSG("Terminating tcp_main\n") ; - os_tsk_delete_self (); - #endif - -} - - - int myoptind = 0; - char* myoptarg = NULL; - -#if defined(DEBUG_CYASSL) - extern void CyaSSL_Debugging_ON(void) ; -#endif - - -/*** main entry ***/ -extern void init_time(void) ; -extern void SystemInit(void); - -int main() { - - SystemInit(); - SER_Init() ; - #if !defined(NO_FILESYSTEM) - init_card () ; /* initializing SD card */ - #endif - - init_time() ; - - #if defined(DEBUG_CYASSL) - printf("Turning ON Debug message\n") ; - CyaSSL_Debugging_ON() ; - #endif - - #ifdef HAVE_KEIL_RTX - os_sys_init (main_task) ; - #else - main_task() ; - #endif - - return 0 ; /* There should be no return here */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c deleted file mode 100644 index 7b76c1d2..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c +++ /dev/null @@ -1,595 +0,0 @@ -/*shell.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - /*** tiny Shell for CyaSSL apps ***/ - - #ifdef HAVE_CONFIG_H - #include -#endif - -#include "cyassl/internal.h" -#undef RNG -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - #include - #include - #include "cyassl_MDK_ARM.h" -#endif - -#ifdef CYASSL_KEIL_NET -#include "cyassl/test.h" -#else -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; -#endif - -#ifdef NO_ECHOCLIENT -#define echoclient_test command_not_found -#endif -#ifdef NO_ECHOSERVER -#define echoserver_test command_not_found -#endif -#ifdef NO_SIMPLE_CLIENT -#define client_test command_not_found -#endif -#ifdef NO_SIMPLE_SERVER -#define server_test command_not_found -#endif -#ifdef NO_CRYPT_BENCHMARK -#define benchmark_test command_not_found -#endif -#ifdef NO_CRYPT_TEST -#define ctaocrypt_test command_not_found -#endif - -#ifndef CYASSL_KEIL_NET -#define ipaddr_comm command_not_found -#endif - -#if !defined(HAVE_KEIL_RTX) -#define stack_comm command_not_found -#endif - - -#if !defined(DEBUG_CYASSL) -#define dbg_comm command_not_found -#endif - - -void command_not_found(void *argv) { - printf("Command not found\n") ; -} - -extern void echoclient_test(void *args) ; -extern void echoserver_test(void *args) ; -extern void benchmark_test(void *args) ; -extern void ctaocrypt_test(void *args) ; -extern void client_test(void *args) ; -extern void server_test(void *args) ; -extern void kill_task(void *args) ; -extern void time_main(void *args) ; -extern void ipaddr_comm(void *args) ; -extern void stack_comm(void *args) ; -extern void for_command(void *args) ; -extern void dbg_comm(void *arg) ; -extern void help_comm(void *arg) ; - -#if !defined(NO_CRYPT_TEST) - -#ifndef NO_MD5 -extern void md5_test(void *arg) ; -#endif -#ifdef CYASSL_MD2 -extern void md2_test(void *arg) ; -#endif -#ifndef NO_MD4 -extern void md4_test(void *arg) ; -#endif - -extern void sha_test(void *arg) ; - -#ifndef NO_SHA256 -extern void sha256_test(void *arg) ; -#endif -#ifdef CYASSL_SHA384 -extern void sha384_test(void *arg) ; -#endif - -#ifdef CYASSL_SHA512 -extern void sha512_test(void *arg) ; -#endif - -#ifdef CYASSL_RIPEMD -extern void ripemd_test(void *arg) ; -#endif -#ifndef NO_HMAC - #ifndef NO_MD5 -extern void hmac_md5_test(void *arg) ; - #endif -extern void hmac_sha_test(void *arg) ; - - #ifndef NO_SHA256 -extern void hmac_sha256_test(void *arg) ; - #endif - - #ifdef CYASSL_SHA384 -extern void hmac_sha384_test(void *arg) ; - #endif -#endif -#ifndef NO_RC4 -extern void arc4_test(void *arg) ; -#endif - -#ifndef NO_HC128 -extern void hc128_test(void *arg) ; -#endif - -#ifndef NO_RABBIT -extern void rabbit_test(void *arg) ; -#endif - -#ifndef NO_DES3 -extern void des_test(void *arg) ; -extern void des3_test(void *arg) ; -#endif - -#ifndef NO_AES -extern void aes_test(void *arg) ; -#ifdef HAVE_AESGCM -extern void aesgcm_test(void *arg) ; -#endif - -#ifdef HAVE_AESCCM -extern void aesccm_test(void *arg) ; -#endif -#endif - -#ifdef HAVE_CAMELLIA -extern void camellia_test(void *arg) ; -#endif -extern void random_test(void *arg) ; - -#ifndef NO_RSA -extern void rsa_test(void *arg) ; -#endif - -#ifndef NO_DH -extern void dh_test(void *arg) ; -#endif - -#ifndef NO_DSA -extern void dsa_test(void *arg) ; -#endif - -#ifndef NO_PWDBASED -extern void pwdbased_test(void *arg) ; -#endif - -#ifdef HAVE_ECC -extern void openssl_test(void *arg) ; -#endif - -#ifdef HAVE_ECC -extern void ecc_test(void *arg) ; -#endif - -#endif /* NO_CRYPT_TEST */ - -static struct { - const char *command ; - void (*func)(void *args) ; -} commandTable[] = { - "echoclient", echoclient_test, - "echoserver", echoserver_test, - "benchmark", benchmark_test, - "test", ctaocrypt_test, - "client", client_test, - "server", server_test, - "time", time_main, /* get/set RTC: [-d yy/mm/dd] [-t hh:mm:ss]*/ - "ipaddr", ipaddr_comm, /* TBD */ - "stack", stack_comm, /* On/Off check stack size */ - "for", for_command, /* iterate next command X times */ - "debug", dbg_comm, /* On/Off debug message */ - "help", help_comm, /* Breif description about the commands */ - - /** short name **/ - "ec", echoclient_test, - "es", echoserver_test, - "bm", benchmark_test, - "te", ctaocrypt_test, - "cl", client_test, - "sv", server_test, - "ip", ipaddr_comm, - "st", stack_comm, - "dbg", dbg_comm, - "?", help_comm, - -/*** test suites ****/ -#if !defined(NO_CRYPT_TEST) -#ifndef NO_MD5 - "md5", md5_test, -#endif -#ifdef CYASSL_MD2 - "md2", md2_test, -#endif -#ifndef NO_MD4 - "md4", md4_test, -#endif - "sha", sha_test, -#ifndef NO_SHA256 - "sha256", sha256_test, -#endif -#ifdef CYASSL_SHA384 - "sha384", sha384_test, -#endif -#ifdef CYASSL_SHA512 - "sha512", sha512_test, -#endif -#ifdef CYASSL_RIPEMD - "ripemd", ripemd_test, -#endif -#ifndef NO_HMAC - #ifndef NO_MD5 - "hmac_md5", hmac_md5_test, - #endif - "hmac_sha", hmac_sha_test, - #ifndef NO_SHA256 - "hmac_sha256", hmac_sha256_test, - #endif - #ifdef CYASSL_SHA384 - "hmac_sha384", hmac_sha384_test, - #endif -#endif -#ifndef NO_RC4 - "arc4", arc4_test, -#endif -#ifndef NO_HC128 - "hc128", hc128_test, -#endif -#ifndef NO_RABBIT - "rabbit", rabbit_test, -#endif -#ifndef NO_DES3 - "des", des_test, - "des3", des3_test, -#endif -#ifndef NO_AES - "aes", aes_test, - #ifdef HAVE_AESGCM - "aesgcm", aesgcm_test, - #endif - #ifdef HAVE_AESCCM - "aesccm", aesccm_test, - #endif -#endif - -#ifdef HAVE_CAMELLIA - "camellia", camellia_test, -#endif - "random", random_test, -#ifndef NO_RSA - "rsa", rsa_test, -#endif -#ifndef NO_DH - "dh", dh_test, -#endif -#ifndef NO_DSA - "dsa", dsa_test, -#endif -#ifndef NO_PWDBASED - "pwdbased", pwdbased_test, -#endif -#ifdef OPENSSL_EXTRA - "openssl", openssl_test, -#endif -#ifdef HAVE_ECC - "ecc", ecc_test, -#endif - -#endif /* NO_CRYPT_TEST */ - - "", NULL -} ; - -enum jobtype { FORGROUND, BACKGROUND } ; - -#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n') - -/******* Get Command Line *****************************/ -static int getline(char * line, int sz, func_args *args, int*bf_flg) -{ - char * ret ; - int i ; - - #define MAXARGS 10 - #define MAXARGLEN 30 - static char *argv[MAXARGS] ; - args->argv = argv ; - - putchar('>') ; - fflush(stdout) ; - ret = fgets(line, sz, stdin) ; - #define SHELL_ERROR_FGETS -102 - if(ret != line) return(SHELL_ERROR_FGETS) ; - - if(line[strlen(line)-2] == '&') { - (*bf_flg) = BACKGROUND ; - line[strlen(line)-2] = '\n' ; - } else { - (*bf_flg) = FORGROUND ; - } - args->argc = 0 ; - for(i=0; iargv[args->argc] = &(line[i]) ; - while(!IF_DELIMITER(line[i])) i++ ; - args->argc++ ; - if(line[i] == '\n') { - line[i] = '\0' ; - break ; - } else { - line[i] = '\0' ; - } - } - return i ; -} - -static int BackGround = 0 ; /* 1: background job is running */ - -/************* Embedded Shell Commands **********************************/ -#define IP_SIZE 16 - -#ifdef CYASSL_KEIL_NET -static void ipaddr_comm(void *args) -{ - if(((func_args *)args)->argc == 1) { - printf("IP addr: %s, port %d\n", yasslIP, yasslPort) ; - } else { - if(BackGround != 0) { - printf("Cannot change IP addr while background server is running\n") ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-'&& - ((func_args *)args)->argv[1][1] == 'a' ) { -/* strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */ - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 'p' ) { -/* yasslPort = atoi(((func_args *)args)->argv[2]) ; */ - } else printf("Invalid argument\n") ; - } -} - -#endif - - - -#if defined(HAVE_KEIL_RTX) -static int stack_ck = 0 ; - -static void stack_comm(void *args) -{ - if(stack_ck) { - printf("Stack Check: Off\n") ; - stack_ck = 0 ; - } else { - printf("Stack Check: On\n") ; - stack_ck = 1 ; - } -} - -#define FILL_PATTERN 0xa596695a -void stack_fill(char * stack, int size) -{ - int i ; - - if(stack_ck == 0)return ; - for(i=1; iargc == 1) { - printf("For %d times\n", for_iteration) ; - } else if( args == NULL || ((func_args *)args)->argc == 2) { - for_iteration = atoi(((func_args *)args)->argv[1]) ; - } else printf("Invalid argument\n") ; -} - - -#if defined(DEBUG_CYASSL) - -static int CyasslDebug = 1 ; - -static void dbg_comm(void *args) -{ - if(CyasslDebug == 1) { - CyasslDebug = 0 ; - printf("Turning OFF Debug message\n") ; - CyaSSL_Debugging_OFF() ; - } else { - CyasslDebug = 1 ; - printf("Turning ON Debug message\n") ; - CyaSSL_Debugging_ON() ; - } -} -#endif - -static void help_comm(void *args) -{ - -} - - - -#define BG_JOB_STACK_SIZE 12000 -#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \ - defined(HAVE_KEIL_RTX) -static char bg_job_stack[BG_JOB_STACK_SIZE] ; -#endif - -#define COMMAND_STACK_SIZE 12000 -#if defined(HAVE_KEIL_RTX) -static char command_stack[COMMAND_STACK_SIZE] ; -#endif - - -#ifdef HAVE_KEIL_RTX -static CyaSSL_Mutex command_mutex ; -#endif - -/*********** Invoke Forground Command *********************/ -static void command_invoke(void *args) -{ - void (*func)(void * ) ; - int i,iteration ; - - func = (void(*)(void *))((func_args *)args)->argv[0] ; - #ifdef HAVE_KEIL_RTX - LockMutex((CyaSSL_Mutex *)&command_mutex) ; - #endif - iteration = for_iteration ; - for(i=0; i< iteration; i++) { - if(iteration > 1) printf("--- Start for %d ---->\n", i) ; - #if defined(HAVE_KEIL_RTX) - stack_fill(command_stack, COMMAND_STACK_SIZE) ; - #endif - - func(args) ; /* invoke command */ - - #if defined(HAVE_KEIL_RTX) - stack_check(command_stack, COMMAND_STACK_SIZE) ; - #endif - } - if(iteration > 1) - for_iteration = 1 ; - #ifdef HAVE_KEIL_RTX - UnLockMutex((CyaSSL_Mutex *)&command_mutex) ; - os_tsk_delete_self() ; - #endif -} - -#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \ - defined(HAVE_KEIL_RTX) -/******* Invoke Background Job *******************************/ -static void bg_job_invoke(void *args) -{ - void (*func)(void * ) ; - BackGround = 1 ; - stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ; - func = (void(*)(void *))((func_args *)args)->argv[0] ; - func(args) ; /* invoke command */ - stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ; - #ifdef CYASSL_KEIL_NET - init_TcpNet (); - #endif - BackGround = 0 ; - os_tsk_delete_self() ; ; -} -#endif - -#define LINESIZE 100 -static char line[LINESIZE] ; - - -/********* SHEULL MAIN LOOP ***********************************/ -void shell_main(void) { - int i ; - func_args args ; - int bf_flg ; - - i = BackGround ; - /* Dummy for avoiding warning: BackGround is defined but not used. */ - - - #if defined(HAVE_KEIL_RTX) - InitMutex(&command_mutex) ; -#endif - time_main(NULL) ; - printf("Starting Shell\n") ; - while(1) { - if(getline(line, LINESIZE, &args, &bf_flg) > 0) { - for(i=0; commandTable[i].func != NULL; i++) { - if(strcmp(commandTable[i].command, args.argv[0]) == 0) { - args.argv[0] = (char *) commandTable[i].func ; - if(bf_flg == FORGROUND) { - #ifdef HAVE_KEIL_RTX - UnLockMutex((CyaSSL_Mutex *)&command_mutex) ; - os_tsk_create_user_ex( (void(*)(void *))&command_invoke, 7, - command_stack, COMMAND_STACK_SIZE, &args) ; - #else - command_invoke(&args) ; - #endif - #ifdef HAVE_KEIL_RTX - LockMutex((CyaSSL_Mutex *)&command_mutex) ; - #endif - } else { - #if (!defined(NO_SIMPLE_SERVER) && \ - !defined(NO_ECHOSERVER)) && \ - defined(HAVE_KEIL_RTX) - if(BackGround != 0) { - printf("Multiple background servers not supported.\n") ; - } else { - printf("\"%s\" is running with the background mode.\n", - commandTable[i].command) ; - os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, - 6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ; - } - #else - printf("Invalid Command: no background job\n") ; - #endif - } - break ; - } - } - if(commandTable[i].func == NULL) - printf("Command not found\n") ; - } - } -} - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c deleted file mode 100644 index 47f0b201..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c +++ /dev/null @@ -1,53 +0,0 @@ -/* ssl-dummy.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include -#include -#include - -Signer* GetCA(void* vp, byte* hash) -{ - Signer*s ; - return s ; -} - -int CyaSSL_dtls(CYASSL* ssl) -{ - return ssl->options.dtls; -} - -int CyaSSL_get_using_nonblock(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_get_using_nonblock"); - CYASSL_LEAVE("CyaSSL_get_using_nonblock", ssl->options.usingNonblock); - return ssl->options.usingNonblock; -} - -Signer* GetCAByName(void* vp, byte* hash) -{ - Signer * ca ; - return(ca) ; -} diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini deleted file mode 100644 index 5f72e110..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Dbg_Flash.ini +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************/ -/* Dbg_Flash.ini Initialization File for Debugging from Internal */ -/* Flash for NXP LPC18xx/LPC43xx */ -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2005-2012 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - -FUNC void Per_Reset (void) { - // Reset peripherals: LCD, USB0, USB1, DMA, SDIO, ETHERNET - _WDWORD(0x40053100, 0x005F0000); // Issue reset - _sleep_(1); -} - -Per_Reset(); // Reset some peripherals - -KILL BUTTON * // Kill all buttons -DEFINE BUTTON "Reset Peripherals", "Per_Reset()" // Create peripheral reset button - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c deleted file mode 100644 index 9a162ba8..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/File_Config.c +++ /dev/null @@ -1,401 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - FlashFS - *---------------------------------------------------------------------------- - * Name: FILE_CONFIG.C - * Purpose: Configuration of RL FlashFS by user - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * This code is part of the RealView Run-Time Library. - * Copyright (c) 2004-2013 KEIL - An ARM Company. All rights reserved. - *---------------------------------------------------------------------------*/ - -#include - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// File System -// ============== -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define N_FILES 6 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACNT 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CADR 0x60000000 - -// -// CPU Clock Frequency [Hz]<0-1000000000> -// Define the CPU Clock frequency used for -// flash programming and erasing. -#define CPU_CLK 180000000 - -// -// Flash Drive -// ============== -// Enable Embedded Flash Drive [F:] -#define FL0_EN 0 - -// Base address <0x0-0xFFFFF000:0x1000> -// Define the target device Base address -// Default: 0x80000000 -#define FL0_BADR 0x80000000 - -// Device Size <0x4000-0xFFFFF000:0x4000> -// Define the size of Flash device in bytes -// Default: 0x100000 (1MB) -#define FL0_SIZE 0x0200000 - -// Content of Erased Memory <0=>0x00 <0xFF=>0xFF -// Define the initial value for erased Flash data -// Default: 0xFF -#define FL0_INITV 0xFF - -// Device Description file -// Specify a file name with a relative path -// Default: FS_FlashDev.h -#define FL0_HFILE "FS_FlashDev.h" - -// Default Drive [F:] -// Used when Drive letter not specified -#define FL0_DEF 1 - -// -// SPI Flash Drive -// ================== -// Enable SPI Flash Drive [S:] -#define SF0_EN 0 - -// Device Size <0x10000-0xFFFFF000:0x8000> -// Define the size of SPI Flash device in bytes -// Default: 0x100000 (1MB) -#define SF0_SIZE 0x0200000 - -// Content of Erased Memory <0=>0x00 <0xFF=>0xFF -// Define the initial value for erased Flash data -// Default: 0xFF -#define SF0_INITV 0xFF - -// Device Description file -// Specify a file name with a relative path -// Default: FS_SPI_FlashDev.h -#define SF0_HFILE "FS_SPI_FlashDev.h" - -// Default Drive [S:] -// Used when Drive letter not specified -#define SF0_DEF 0 - -// -// RAM Drive -// ============ -// Enable Embedded RAM Drive [R:] -#define RAM0_EN 0 - -// Device Size <0x4000-0xFFFFF000:0x4000> -// Define the size of RAM device in bytes -// Default: 0x40000 -#define RAM0_SIZE 0x004000 - -// Number of Sectors <8=>8 <16=>16 <32=>32 <64=>64 <128=>128 -// Define number of virtual sectors for RAM device -// Default: 32 -#define RAM0_NSECT 64 - -// Relocate Device Buffer -// Locate RAM Device Buffer at a specific address. -// If not enabled, the linker selects base address. -#define RAM0_RELOC 1 - -// Base address <0x0-0xFFFFF000:0x1000> -// Define the target device Base address. -// Default: 0x81000000 -#define RAM0_BADR 0x81010000 - -// -// Default Drive [R:] -// Used when Drive letter not specified -#define RAM0_DEF 0 - -// -// Memory Card Drive 0 -// ====================== -// Enable Memory Card Drive [M0:] -#define MC0_EN 1 - -// Bus Mode <0=>SD-Native <1=>SPI -// Define Memory Card bus interface mode. -// SD-Native mode needs MCI peripheral. -// SPI mode uses SD Card in SPI mode. -#define MC0_SPI 0 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define MC0_CASZ 4 - -// Relocate Cache Buffer -// Locate Cache Buffer at a specific address. -// Some devices like NXP LPC23xx require a Cache buffer -// for DMA transfer located at specific address. -#define MC0_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -// For LPC23xx/24xx devices this is USB RAM -// starting at 0x7FD00000. -#define MC0_CADR 0x7FD00000 - -// -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define MC0_FSJ 0 - -// Default Drive [M0:] -// Used when Drive letter not specified -#define MC0_DEF 1 - -// -// Memory Card Drive 1 -// ====================== -// Enable Memory Card Drive [M1:] -#define MC1_EN 0 - -// Bus Mode <0=>SD-Native <1=>SPI -// Define Memory Card bus interface mode. -// SD-Native mode needs MCI peripheral. -// SPI mode uses SD Card in SPI mode. -#define MC1_SPI 1 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define MC1_CASZ 0 - -// Relocate Cache Buffer -// Locate Cache Buffer at a specific address. -// Some devices like NXP LPC23xx require a Cache buffer -// for DMA transfer located at specific address. -#define MC1_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -// For LPC23xx/24xx devices this is USB RAM -// starting at 0x7FD00000. -#define MC1_CADR 0x7FD00000 - -// -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define MC1_FSJ 0 - -// Default Drive [M1:] -// Used when Drive letter not specified -#define MC1_DEF 0 - -// -// USB Flash Drive 0 -// ==================== -// Enable USB Flash Drive [U0:] -#define USB0_EN 0 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define USB0_CASZ 8 - -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define USB0_FSJ 0 - -// Default Drive [U0:] -// Used when Drive letter not specified -#define USB0_DEF 0 - -// -// USB Flash Drive 1 -// ==================== -// Enable USB Flash Drive [U1:] -#define USB1_EN 0 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define USB1_CASZ 8 - -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define USB1_FSJ 0 - -// Default Drive [U1:] -// Used when Drive letter not specified -#define USB1_DEF 0 - -// -// NAND Flash Drive 0 -// =================== -// Enable NAND Flash Drive [N0:] -#define NAND0_EN 0 - -// Page size <528=> 512 + 16 bytes -// <2112=>2048 + 64 bytes -// <4224=>4096 + 128 bytes -// <8448=>8192 + 256 bytes -// Define program Page size in bytes (User + Spare area). -#define NAND0_PGSZ 2112 - -// Block Size <8=>8 pages <16=>16 pages <32=>32 pages -// <64=>64 pages <128=>128 pages <256=>256 pages -// Define number of pages in a block. -#define NAND0_PGCNT 64 - -// Device Size [blocks] <512-32768> -// Define number of blocks in NAND Flash device. -#define NAND0_BLCNT 4096 - -// Page Caching <0=>OFF <1=>1 page <2=>2 pages <4=>4 pages -// <8=>8 pages <16=>16 pages <32=>32 pages -// Define number of cached Pages. -// Default: 4 pages -#define NAND0_CAPG 2 - -// Block Indexing <0=>OFF <1=>1 block <2=>2 blocks <4=>4 blocks -// <8=>8 blocks <16=>16 blocks <32=>32 blocks -// <64=>64 blocks <128=>128 blocks <256=>256 blocks -// Define number of indexed Flash Blocks. -// Increase this number for better performance. -// Default: 16 blocks -#define NAND0_CABL 16 - -// Software ECC <0=>None <1=>Hamming (SLC) -// Enable software ECC calculation only, -// if not supported by hardware. -#define NAND0_SWECC 1 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define NAND0_CASZ 4 - -// Relocate Cache Buffers -// Use this option to locate Cache buffers -// at specific address in RAM or SDRAM. -#define NAND0_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define base address for Cache Buffers. -#define NAND0_CADR 0x80000000 - -// -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define NAND0_FSJ 0 - -// Default Drive [N0:] -// Used when Drive letter not specified -#define NAND0_DEF 0 - -// -// NAND Flash Drive 1 -// =================== -// Enable NAND Flash Drive [N1:] -#define NAND1_EN 0 - -// Page size <528=> 512 + 16 bytes -// <2112=>2048 + 64 bytes -// <4224=>4096 + 128 bytes -// <8448=>8192 + 256 bytes -// Define program Page size in bytes (User + Spare area). -#define NAND1_PGSZ 2112 - -// Block Size <8=>8 pages <16=>16 pages <32=>32 pages -// <64=>64 pages <128=>128 pages <256=>256 pages -// Define number of pages in a block. -#define NAND1_PGCNT 32 - -// Device Size [blocks] <512-32768> -// Define number of blocks in NAND Flash device. -#define NAND1_BLCNT 512 - -// Page Caching <0=>OFF <1=>1 page <2=>2 pages <4=>4 pages -// <8=>8 pages <16=>16 pages <32=>32 pages -// Define number of cached Pages. -// Default: 4 pages -#define NAND1_CAPG 4 - -// Block Indexing <0=>OFF <1=>1 block <2=>2 blocks <4=>4 blocks -// <8=>8 blocks <16=>16 blocks <32=>32 blocks -// <64=>64 blocks <128=>128 blocks <256=>256 blocks -// Define number of indexed Flash Blocks. -// Increase this number for better performance. -// Default: 16 blocks -#define NAND1_CABL 16 - -// Software ECC <0=>None <1=>Hamming (SLC) -// Enable software ECC calculation only, -// if not supported by hardware. -#define NAND1_SWECC 0 - -// File System Cache <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Define System Cache buffer size for file IO. -// Increase this number for faster r/w access. -// Default: 4 kB -#define NAND1_CASZ 4 - -// Relocate Cache Buffers -// Use this option to locate Cache buffers -// at specific address in RAM or SDRAM. -#define NAND1_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define base address for Cache Buffers. -#define NAND1_CADR 0x80000000 - -// -// FAT Journal -// Enable FAT Journal in order to guarantee -// fail-safe FAT file system operation. -#define NAND1_FSJ 0 - -// Default Drive [N1:] -// Used when Drive letter not specified -#define NAND1_DEF 0 - -// - -//------------- <<< end of configuration section >>> ----------------------- - -#ifndef __NO_FILE_LIB_C -#include -#endif - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c deleted file mode 100644 index dc092230..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Config.c +++ /dev/null @@ -1,892 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - TCPnet - *---------------------------------------------------------------------------- - * Name: NET_CONFIG.C - * Purpose: Configuration of RL TCPnet by user. - * Rev.: V4.60 - *---------------------------------------------------------------------------- - * This code is part of the RealView Run-Time Library. - * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. - *---------------------------------------------------------------------------*/ - -#include - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// System Definitions -// ===================== -// Global TCPnet System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "mcb2300" -#define LHOST_NAME "mcb2300" - -// Memory Pool size <1500-64000:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// TCPnet packets are allocated from this memory pool. -// Default: 8000 bytes -#define MEM_SIZE 4000 - -// Tick Timer interval <10=> 10 ms <20=> 20 ms <25=> 25 ms -// <40=> 40 ms <50=> 50 ms <100=> 100 ms -// <200=> 200 ms -// System Tick Timer interval for software timers -// Default: 100 ms -#define TICK_INTERVAL 10 - -// -// Ethernet Network Interface -// ============================= -// Enable or disable Ethernet Network Interface -#define ETH_ENABLE 1 - -// MAC Address -// ============== -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x00 -#define _MAC1 0x30 - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define _MAC2 0x06 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define _MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0x00 -#define _MAC4 0x00 - -// Address byte 5 <0x00-0xff> -// Default: 0x00 -#define _MAC5 0x00 - -// Address byte 6 <0x00-0xff> -// Default: 0x01 -#define _MAC6 0x01 - -// -// IP Address -// ============= -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define _IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define _IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define _IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define _IP4 100 - -// -// Subnet mask -// ============== -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define _MSK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define _MSK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define _MSK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define _MSK4 0 - -// -// Default Gateway -// ================== -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define _GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define _GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define _GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define _GW4 254 - -// -// Primary DNS Server -// ===================== -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _pDNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _pDNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _pDNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define _pDNS4 129 - -// -// Secondary DNS Server -// ======================= -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _sDNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _sDNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _sDNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define _sDNS4 130 - -// -// ARP Definitions -// ================== -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ARP_TABSIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ARP_TIMEOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ARP_MAXRETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ARP_RESEND 10 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ARP_NOTIFY 1 - -// -// IGMP Group Management -// ======================== -// Enable or disable Internet Group Management Protocol -#define IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define IGMP_TABSIZE 5 - -// -// NetBIOS Name Service -// ======================= -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define NBNS_ENABLE 0 - -// Dynamic Host Configuration -// ============================= -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define DHCP_ENABLE 1 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define DHCP_BOOTF 1 - -// -// - -// PPP Network Interface -// ======================== -// Enable or disable PPP Network Interface -#define PPP_ENABLE 0 - -// IP Address -// ============= -// Local Static IP Address -// Address byte 1 <0-255> -// Default: 192 -#define _IP1P 192 - -// Address byte 2 <0-255> -// Default: 168 -#define _IP2P 168 - -// Address byte 3 <0-255> -// Default: 125 -#define _IP3P 125 - -// Address byte 4 <0-255> -// Default: 1 -#define _IP4P 1 - -// -// Subnet mask -// ============== -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define _MSK1P 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define _MSK2P 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define _MSK3P 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define _MSK4P 0 - -// -// Primary DNS Server -// ===================== -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _pDNS1P 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _pDNS2P 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _pDNS3P 2 - -// Address byte 4 <0-255> -// Default: 129 -#define _pDNS4P 129 - -// -// Secondary DNS Server -// ======================= -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _sDNS1P 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _sDNS2P 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _sDNS3P 2 - -// Address byte 4 <0-255> -// Default: 130 -#define _sDNS4P 130 - -// -// Logon Authentication -// ======================= -// Enable or disable user authentication -#define PPP_AUTHEN 1 - -// Unsecured password (PAP) -// Allow or use Password Authentication Protocol. -#define PPP_PAPEN 1 - -// Secured password (CHAP-MD5) -// Request or use Challenge Handshake Authentication -// Protocol with MD5 digest algorithm. -#define PPP_CHAPEN 1 - -// -// Obtain Client IP address automatically -// ========================================= -// This option only applies when PPP Dial-up is used to dial -// to remote PPP Server. If checked, network connection -// dynamically obtains an IP address from remote PPP Server. -#define PPP_GETIP 1 - -// Use Default Gateway on remote Network -// ======================================== -// This option only applies when both Ethernet and PPP Dial-up -// are used. If checked, data that cannot be sent to local LAN -// is forwarded to Dial-up network instead. -#define PPP_DEFGW 1 - -// Async Control Character Map <0x0-0xffffffff> -// A bit-map of control characters 0-31, which are -// transmitted escaped as a 2 byte sequence. -// For XON/XOFF set this value to: 0x000A 0000 -// Default: 0x00000000 -#define PPP_ACCM 0x00000000 - -// LCP Echo Interval in seconds <0-3600> -// If no frames are received within this interval, PPP sends an -// Echo Request and expects an Echo Response from the peer. -// If the response is not received, the link is terminated. -// A value of 0 disables the LCP Echo test. -// Default: 30 -#define PPP_ECHOTOUT 30 - -// Number of Retries <0-20> -// How many times PPP will try to retransmit data -// before giving up. Increase this value for links -// with low baud rates or high latency. -// Default: 3 -#define PPP_MAXRETRY 3 - -// Retry Timeout in seconds <1-10> -// If no response received within this time frame, -// PPP module will try to resend the data again. -// Default: 2 -#define PPP_RETRYTOUT 2 - -// -// SLIP Network Interface -// ======================== -// Enable or disable SLIP Network Interface -#define SLIP_ENABLE 0 - -// IP Address -// ============= -// Local Static IP Address -// Address byte 1 <0-255> -// Default: 192 -#define _IP1S 192 - -// Address byte 2 <0-255> -// Default: 168 -#define _IP2S 168 - -// Address byte 3 <0-255> -// Default: 225 -#define _IP3S 225 - -// Address byte 4 <0-255> -// Default: 1 -#define _IP4S 1 - -// -// Subnet mask -// ============== -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define _MSK1S 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define _MSK2S 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define _MSK3S 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define _MSK4S 0 - -// -// Primary DNS Server -// ===================== -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _pDNS1S 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _pDNS2S 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _pDNS3S 2 - -// Address byte 4 <0-255> -// Default: 129 -#define _pDNS4S 129 - -// -// Secondary DNS Server -// ======================= -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define _sDNS1S 194 - -// Address byte 2 <0-255> -// Default: 25 -#define _sDNS2S 25 - -// Address byte 3 <0-255> -// Default: 2 -#define _sDNS3S 2 - -// Address byte 4 <0-255> -// Default: 130 -#define _sDNS4S 130 - -// -// Use Default Gateway on remote Network -// ======================================== -// This option only applies when both Ethernet and SLIP Dial-up -// are used. If checked, data that cannot be sent to local LAN -// is forwarded to Dial-up network instead. -#define SLIP_DEFGW 1 - -// -// UDP Sockets -// ============== -// Enable or disable UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-20> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUMSOCKS 20 - -// -// TCP Sockets -// ============== -// Enable or disable TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUMSOCKS 10 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAXRETRY 20 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRYTOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFTOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAXSEGSZ 1460 - -/* TCP fixed timeouts */ -#define TCP_INIT_RETRY_TOUT 1 /* TCP initial Retransmit period in sec. */ -#define TCP_SYN_RETRY_TOUT 2 /* TCP SYN frame retransmit period in sec. */ -#define TCP_CONRETRY 7 /* Number of retries to establish a conn. */ - -// -// HTTP Server -// ============== -// Enable or disable HTTP Server -#define HTTP_ENABLE 0 - -// Number of HTTP Sessions <1-10> -// Number of simultaneously active HTTP Sessions. -// Default: 3 -#define HTTP_NUMSESS 3 - -// Port Number <1-65535> -// Listening port number. -// Default: 80 -#define HTTP_PORTNUM 80 - -// Server-Id header -// This value is optional. If specified, it overrides -// the default HTTP Server header from the library. -// Default: "" -#define HTTP_SRVID "" - -// Enable User Authentication -// When enabled, the user will have to authenticate -// himself by username and password before accessing -// any page on this Embedded WEB server. -#define HTTP_ENAUTH 1 - -// Authentication Realm -// Default: "Embedded WEB Server" -#define HTTP_AUTHREALM "Embedded WEB Server" - -// Authentication Username -// Default: "admin" -#define HTTP_AUTHUSER "admin" - -// Authentication Password -// Default: "" -#define HTTP_AUTHPASSW "" - -// -// -// Telnet Server -// ================ -// Enable or disable Telnet Server -#define TNET_ENABLE 0 - -// Number of Telnet Connections <1-10> -// Number of simultaneously active Telnet Connections. -// Default: 1 -#define TNET_NUMSESS 1 - -// Port Number <1-65535> -// Listening port number. -// Default: 23 -#define TNET_PORTNUM 23 - -// Idle Connection Timeout in seconds <0-3600> -// When timeout expires, the connection is closed. -// A value of 0 disables disconnection on timeout. -// Default: 120 -#define TNET_IDLETOUT 120 - -// Disable Echo -// When disabled, the server will not echo -// characters it receives. -// Default: Not disabled -#define TNET_NOECHO 0 - -// Enable User Authentication -// When enabled, the user will have to authenticate -// himself by username and password before access -// to the system is allowed. -#define TNET_ENAUTH 1 - -// Authentication Username -// Default: "admin" -#define TNET_AUTHUSER "admin" - -// Authentication Password -// Default: "" -#define TNET_AUTHPASSW "" - -// -// -// TFTP Server -// ============== -// Enable or disable TFTP Server -#define TFTP_ENABLE 0 - -// Number of TFTP Sessions <1-10> -// Number of simultaneously active TFTP Sessions -// Default: 1 -#define TFTP_NUMSESS 1 - -// Port Number <1-65535> -// Listening port number. -// Default: 69 -#define TFTP_PORTNUM 69 - -// Enable Firewall Support -// Use the same Port Number to receive -// requests and send answers to clients. -// Default: Not Enabled -#define TFTP_ENFWALL 0 - -// Inactive Session Timeout in seconds <5-120> -// When timeout expires TFTP Session is closed. -// Default: 15 -#define TFTP_DEFTOUT 15 - -// Number of Retries <1-10> -// How many times TFTP Server will try to -// retransmit the data before giving up. -// Default: 4 -#define TFTP_MAXRETRY 4 - -// -// TFTP Client -// ============== -// Enable or disable TFTP Client -#define TFTPC_ENABLE 0 - -// Block Size <128=>128 <256=>256 <512=>512 -// <1024=>1024 <1428=>1428 -// Size of transfer block in bytes. -// Default: 512 -#define TFTPC_BLOCKSZ 512 - -// Number of Retries <1-10> -// How many times TFTP Client will try to -// retransmit the data before giving up. -// Default: 4 -#define TFTPC_MAXRETRY 4 - -// Retry Timeout <2=>200 ms <5=>500 ms <10=>1 sec -// <20=>2 sec <50=>5 sec <100=>10 sec -// If data frame not acknowledged within this time frame, -// TFTP Client will try to resend the data again. -// Default: 500 ms -#define TFTPC_RETRYTO 5 - -// -// FTP Server -// ============== -// Enable or disable FTP Server -#define FTP_ENABLE 0 - -// Number of FTP Sessions <1-10> -// Number of simultaneously active FTP Sessions -// Default: 1 -#define FTP_NUMSESS 1 - -// Port Number <1-65535> -// Listening port number. -// Default: 21 -#define FTP_PORTNUM 21 - -// Welcome Message -// This value is optional. If specified, -// it overrides the default welcome message. -// Default: "" -#define FTP_WELMSG "" - -// Idle Session Timeout in seconds <0-3600> -// When timeout expires, the connection is closed. -// A value of 0 disables disconnection on timeout. -// Default: 120 -#define FTP_IDLETOUT 120 - -// Enable User Authentication -// When enabled, the user will have to authenticate -// himself by username and password before access -// to the system is allowed. -#define FTP_ENAUTH 1 - -// Authentication Username -// Default: "admin" -#define FTP_AUTHUSER "admin" - -// Authentication Password -// Default: "" -#define FTP_AUTHPASSW "" - -// -// -// FTP Client -// ============= -// Enable or disable FTP Client -#define FTPC_ENABLE 0 - -// Response Timeout in seconds <1-120> -// This is a time for FTP Client to wait for a response from -// the Server. If timeout expires, Client aborts operation. -// Default: 10 -#define FTPC_DEFTOUT 10 - -// Passive mode (PASV) -// The client initiates a data connection to the server. -// Default: Not passive (Active) -#define FTPC_PASVMODE 0 - -// -// DNS Client -// ============= -// Enable or disable DNS Client -#define DNS_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_TABSIZE 20 - -// -// SMTP Client -// ============== -// Enable or disable SMTP Client -#define SMTP_ENABLE 0 - -// Response Timeout in seconds <5-120> -// This is a time for SMTP Client to wait for a response from -// SMTP Server. If timeout expires, Client aborts operation. -// Default: 20 -#define SMTP_DEFTOUT 20 - -// -// SNMP Agent -// ============= -// Enable or disable SNMP Agent -#define SNMP_ENABLE 0 - -// Community Name -// Defines where an SNMP message is destined for. -// Default: "public" -#define SNMP_COMMUNITY "public" - -// Port Number <1-65535> -// Listening port number. -// Default: 161 -#define SNMP_PORTNUM 161 - -// Trap Port Number <1-65535> -// Port number for Trap operations. -// Default: 162 -#define SNMP_TRAPPORT 162 - -// Trap Server -// ============== -// Trap Server IP Address -// Address byte 1 <0-255> -// Default: 192 -#define SNMP_TRAPIP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define SNMP_TRAPIP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define SNMP_TRAPIP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define SNMP_TRAPIP4 100 - -// -// -// BSD Socket Interface -// ======================= -// Enable or disable Berkeley Socket Programming Interface -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUMSOCKS 10 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SRVSOCKS 2 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RCVTOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_GETHOSTEN 1 - -// -//------------- <<< end of configuration section >>> ----------------------- - -/*---------------------------------------------------------------------------- - * Fatal Error Handler - *---------------------------------------------------------------------------*/ - -void sys_error (ERROR_CODE code) { - /* This function is called when a fatal error is encountered. The normal */ - /* program execution is not possible anymore. Add your crytical error .*/ - /* handler code here. */ - - switch (code) { - case ERR_MEM_ALLOC: - /* Out of memory. */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block. */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer is Corrupted. */ - /* More data written than the size of allocated mem block. */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered. */ - /* RTX multithread protection malfunctioning, not implemented */ - /* or interrupt disable is not functioning correctly. */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets. */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets. */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state. */ - break; - } - - /* End-less loop */ - while (1); -} - -/*---------------------------------------------------------------------------- - * TCPnet Config Functions - *---------------------------------------------------------------------------*/ - -#define __NET_CONFIG__ - -#include - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c deleted file mode 100644 index f7a5c9af..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - TCPnet - *---------------------------------------------------------------------------- - * Name: NET_DEBUG.C - * Purpose: Debug Module - * Rev.: V4.60 - *---------------------------------------------------------------------------- - * This code is part of the RealView Run-Time Library. - * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. - *---------------------------------------------------------------------------*/ - -#include - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- - -// Print Time Stamp -// =================== -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// =========================== -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 1 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 1 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 2 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 2 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 2 - -// -// Application Debug Definitions -// ================================ -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTPC 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TNET 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTPC 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP 1 - -// - -//------------- <<< end of configuration section >>> ----------------------- - - -/*--------------------------- init_debug ------------------------------------*/ - -void init_debug (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} - - -/*---------------------------------------------------------------------------- - * TCPnet Debug Functions - *---------------------------------------------------------------------------*/ - -#define __NET_DEBUG__ - -#include - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c deleted file mode 100644 index a0389204..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c +++ /dev/null @@ -1,205 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_CONFIG.C - * Purpose: Configuration of RTX Kernel for Cortex-M - * Rev.: V4.60 - *---------------------------------------------------------------------------- - * This code is part of the RealView Run-Time Library. - * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. - *---------------------------------------------------------------------------*/ - -#include - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Task Configuration -// ===================== -// -// Number of concurrent running tasks <0-250> -// Define max. number of tasks that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 6 -#endif - -// Number of tasks with user-provided stack <0-250> -// Define the number of tasks that will use a bigger stack. -// The memory space for the stack is provided by the user. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 2 -#endif - -// Task stack size [bytes] <20-4096:8><#/4> -// Set the stack size for tasks which is assigned by the system. -// Default: 512 -#ifndef OS_STKSIZE - #define OS_STKSIZE 499 -#endif - -// Check for the stack overflow -// =============================== -// Include the stack checking code for a stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Run in privileged mode -// ========================= -// Run all Tasks in privileged mode. -// Default: Unprivileged -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// -// Tick Timer Configuration -// ============================= -// Hardware timer <0=> Core SysTick <1=> Peripheral Timer -// Define the on-chip timer used as a time-base for RTX. -// Default: Core SysTick -#ifndef OS_TIMER - #define OS_TIMER 0 -#endif - -// Timer clock value [Hz] <1-1000000000> -// Set the timer clock value for selected timer. -// Default: 6000000 (6MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 120000000 -#endif - -// Timer tick value [us] <1-1000000> -// Set the timer tick value for selected timer. -// Default: 10000 (10ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// Round-Robin Task switching -// ============================= -// Enable Round-Robin Task switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Define how long a task will execute before a task switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// Number of user timers <0-250> -// Define max. number of user timers that will run at the same time. -// Default: 0 (User timers disabled) -#ifndef OS_TIMERCNT - #define OS_TIMERCNT 1 -#endif - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the iterrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((U32)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -__task void os_idle_demon (void) { - /* The idle demon is a system task, running when no other task is ready */ - /* to run. The 'os_xxx' function calls are not allowed from this task. */ - - for (;;) { - /* HERE: include optional user code to be executed when no task runs.*/ - } -} - -/*--------------------------- os_tick_init ----------------------------------*/ - -#if (OS_TIMER != 0) -int os_tick_init (void) { - /* Initialize hardware timer as system tick timer. */ - /* ... */ - return (-1); /* Return IRQ number of timer (0..239) */ -} -#endif - -/*--------------------------- os_tick_irqack --------------------------------*/ - -#if (OS_TIMER != 0) -void os_tick_irqack (void) { - /* Acknowledge timer interrupt. */ - /* ... */ -} -#endif - -/*--------------------------- os_tmr_call -----------------------------------*/ - -void os_tmr_call (U16 info) { - /* This function is called when the user timer has expired. Parameter */ - /* 'info' holds the value, defined when the timer was created. */ - - /* HERE: include optional user code to be executed on timeout. */ -} - - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (U32 err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini deleted file mode 100644 index c6512217..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2005-2009 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s deleted file mode 100644 index c31ce199..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00001000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00009000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt deleted file mode 100644 index 4814980e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvopt +++ /dev/null @@ -1,1757 +0,0 @@ - - - - 1.0 - -

### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - MDK-RTX-TCP-FS - 0x4 - ARM-ADS - - 12000000 - - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Lst\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 8 - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O974 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 - - - - - - 1 - 0 - 0x10005960 - - - - - 0 - Reset Peripherals - Per_Reset() - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - MDK-FS - 0x4 - ARM-ADS - - 12000000 - - 1 - 1 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Lst\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 0 - - 8 - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O974 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 - - - - - - 1 - 0 - 0x10005960 - - - - - 0 - Reset Peripherals - Per_Reset() - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - MDK-BARE-METAL - 0x4 - ARM-ADS - - 12000000 - - 1 - 1 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Lst\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 0 - - 8 - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O975 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC120000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP9 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000 - - - - - - 1 - 0 - 0x10005960 - - - - - 0 - Reset Peripherals - Per_Reset() - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - CyaSSL Apps - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\echoclient\echoclient.c - echoclient.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\echoserver\echoserver.c - echoserver.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\test\test.c - test.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\benchmark\benchmark.c - benchmark.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\client\client.c - client.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\server\server.c - server.c - 0 - 0 - - - 1 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\shell.c - shell.c - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\main.c - main.c - 0 - 0 - - - 1 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\cert_data.c - cert_data.c - 0 - 0 - - - - - LPC43xx - 1 - 0 - 0 - 0 - - 2 - 10 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\Drivers\source\lpc43xx_rtc.c - lpc43xx_rtc.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\Drivers\source\lpc43xx_timer.c - lpc43xx_timer.c - 0 - 0 - - - 2 - 12 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\Drivers\source\lpc43xx_cgu.c - lpc43xx_cgu.c - 0 - 0 - - - 2 - 13 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\Drivers\source\lpc43xx_scu.c - lpc43xx_scu.c - 0 - 0 - - - - - MDK-ARM - 1 - 0 - 0 - 0 - - 3 - 14 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - FS_CM3.lib - 0 - 0 - - - 3 - 15 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - RTX_CM3.lib - 0 - 0 - - - 3 - 16 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - TCPD_CM3.lib - 0 - 0 - - - 3 - 17 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - TCP_CM3.lib - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c - Serial.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c - ETH_LPC43xx.c - 0 - 0 - - - 3 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c - SDIO_LPC43xx.c - 0 - 0 - - - 3 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c - system_LPC43xx.c - 0 - 0 - - - - - CyaSSL Library - 0 - 0 - 0 - 0 - - 4 - 22 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\crl.c - crl.c - 0 - 0 - - - 4 - 23 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\internal.c - internal.c - 0 - 0 - - - 4 - 24 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\io.c - io.c - 0 - 0 - - - 4 - 25 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\keys.c - keys.c - 0 - 0 - - - 4 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\ocsp.c - ocsp.c - 0 - 0 - - - 4 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\sniffer.c - sniffer.c - 0 - 0 - - - 4 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\ssl.c - ssl.c - 0 - 0 - - - 4 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\tls.c - tls.c - 0 - 0 - - - 4 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - ssl-dummy.c - 0 - 0 - - - - - Crypt/Cipher Library - 1 - 0 - 0 - 0 - - 5 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\aes.c - aes.c - 0 - 0 - - - 5 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\arc4.c - arc4.c - 0 - 0 - - - 5 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\asm.c - asm.c - 0 - 0 - - - 5 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\asn.c - asn.c - 0 - 0 - - - 5 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\camellia.c - camellia.c - 0 - 0 - - - 5 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\coding.c - coding.c - 0 - 0 - - - 5 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\des3.c - des3.c - 0 - 0 - - - 5 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\dh.c - dh.c - 0 - 0 - - - 5 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\dsa.c - dsa.c - 0 - 0 - - - 5 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ecc.c - ecc.c - 0 - 0 - - - 5 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 0 - 0 - - - 5 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\error.c - error.c - 0 - 0 - - - 5 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\hc128.c - hc128.c - 0 - 0 - - - 5 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\hmac.c - hmac.c - 0 - 0 - - - 5 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\integer.c - integer.c - 0 - 0 - - - 5 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\logging.c - logging.c - 0 - 0 - - - 5 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md2.c - md2.c - 0 - 0 - - - 5 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md4.c - md4.c - 0 - 0 - - - 5 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md5.c - md5.c - 0 - 0 - - - 5 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\memory.c - memory.c - 0 - 0 - - - 5 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\misc.c - misc.c - 0 - 0 - - - 5 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\pwdbased.c - pwdbased.c - 0 - 0 - - - 5 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\rabbit.c - rabbit.c - 0 - 0 - - - 5 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\random.c - random.c - 0 - 0 - - - 5 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ripemd.c - ripemd.c - 0 - 0 - - - 5 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\rsa.c - rsa.c - 0 - 0 - - - 5 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha.c - sha.c - 0 - 0 - - - 5 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha256.c - sha256.c - 0 - 0 - - - 5 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha512.c - sha512.c - 0 - 0 - - - 5 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\tfm.c - tfm.c - 0 - 0 - - - 5 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\port.c - port.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 6 - 62 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\File_Config.c - File_Config.c - 0 - 0 - - - 6 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\Net_Config.c - Net_Config.c - 0 - 0 - - - 6 - 64 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config.h - config.h - 0 - 0 - - - 6 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\RTX_Conf_CM.c - RTX_Conf_CM.c - 0 - 0 - - - 6 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\Net_Debug.c - Net_Debug.c - 0 - 0 - - - 6 - 67 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config-FS.h - config-FS.h - 0 - 0 - - - 6 - 68 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - config-RTX-TCP-FS.h - 0 - 0 - - - 6 - 69 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - config-BARE-METAL.h - 0 - 0 - - - 6 - 70 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\startup_LPC43xx.s - startup_LPC43xx.s - 0 - 0 - - - - - CyaSSL-MDK - 1 - 0 - 0 - 0 - - 7 - 71 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 0 - 0 - - - 7 - 72 - 1 - 0 - 0 - 8 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\Retarget.c - Retarget.c - 0 - 0 - - - 7 - 73 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\LPC43xx\time-LCP43xx.c - time-LCP43xx.c - 0 - 0 - - - - diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj deleted file mode 100644 index eefd970e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-LPC43xx.uvproj +++ /dev/null @@ -1,3510 +0,0 @@ - - - - 1.1 - -
### uVision Project, (C) Keil Software
- - - - MDK-RTX-TCP-FS - 0x4 - ARM-ADS - - - LPC4357 - NXP (founded by Philips) - IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 - - "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") - UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) - 6414 - LPC43xx.H - - - - - - - - - - SFD\NXP\LPC43xx\LPC43xx.SFR - 0 - - - - NXP\LPC43xx\ - NXP\LPC43xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-RTX-TCP-FS\ - LCP43xx-MDK-RTX-TCP-FS - 1 - 0 - 0 - 1 - 1 - .\Lst\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 1 - 0 - $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 1 - 0 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 8 - 0 - 0 - 0 - 3 - 3 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 1 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 1 - 0x1a000000 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x1a000000 - 0x80000 - - - 1 - 0x1b000000 - 0x80000 - - - 0 - 0x10080000 - 0xa000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 0 - 0x20000000 - 0x10000 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_RTX_TCP_FS - - ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include - - - - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - - - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - server.c - 1 - ..\..\..\examples\server\server.c - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - LPC43xx - - - lpc43xx_rtc.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_rtc.c - - - lpc43xx_timer.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_timer.c - - - lpc43xx_cgu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_cgu.c - - - lpc43xx_scu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_scu.c - - - - - MDK-ARM - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - Serial.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c - - - ETH_LPC43xx.c - 1 - C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c - - - SDIO_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c - - - system_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - internal.c - 1 - ..\..\..\src\internal.c - - - io.c - 1 - ..\..\..\src\io.c - - - keys.c - 1 - ..\..\..\src\keys.c - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - tls.c - 1 - ..\..\..\src\tls.c - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_LPC43xx.s - 2 - ..\LPC43xx\startup_LPC43xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-LCP43xx.c - 1 - ..\LPC43xx\time-LCP43xx.c - - - - - - - MDK-FS - 0x4 - ARM-ADS - - - LPC4357 - NXP (founded by Philips) - IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 - - "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") - UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) - 6414 - LPC43xx.H - - - - - - - - - - SFD\NXP\LPC43xx\LPC43xx.SFR - 0 - - - - NXP\LPC43xx\ - NXP\LPC43xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-FS\ - LCP43xx-MDK-FS - 1 - 0 - 0 - 1 - 1 - .\Lst\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 1 - 0 - $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 8 - 0 - 0 - 0 - 3 - 3 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 1 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 1 - 0x1a000000 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x1a000000 - 0x80000 - - - 1 - 0x1b000000 - 0x80000 - - - 0 - 0x10080000 - 0xa000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 0 - 0x20000000 - 0x10000 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_FS - - ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include - - - - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - - - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - server.c - 1 - ..\..\..\examples\server\server.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - LPC43xx - - - lpc43xx_rtc.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_rtc.c - - - lpc43xx_timer.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_timer.c - - - lpc43xx_cgu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_cgu.c - - - lpc43xx_scu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_scu.c - - - - - MDK-ARM - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - Serial.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c - - - ETH_LPC43xx.c - 1 - C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - SDIO_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c - - - system_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - internal.c - 1 - ..\..\..\src\internal.c - - - io.c - 1 - ..\..\..\src\io.c - - - keys.c - 1 - ..\..\..\src\keys.c - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - tls.c - 1 - ..\..\..\src\tls.c - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_LPC43xx.s - 2 - ..\LPC43xx\startup_LPC43xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-LCP43xx.c - 1 - ..\LPC43xx\time-LCP43xx.c - - - - - - - MDK-BARE-METAL - 0x4 - ARM-ADS - - - LPC4357 - NXP (founded by Philips) - IRAM(0x10000000-0x10007FFF) IRAM2(0x20000000-0x2000FFFF) IROM(0x1A000000-0x1A07FFFF) IROM2(0x1B000000-0x1B07FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FPU2 - - "STARTUP\NXP\LPC43xx\startup_LPC43xx.s" ("NXP LPC43xx Startup Code") - UL2CM3(-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000) - 6414 - LPC43xx.H - - - - - - - - - - SFD\NXP\LPC43xx\LPC43xx.SFR - 0 - - - - NXP\LPC43xx\ - NXP\LPC43xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-BARE-METAL\ - LCP43xx-MDK-BARE-METAL - 1 - 0 - 0 - 1 - 1 - .\Lst\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 1 - 0 - $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU - TCM.DLL - -pCM4 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\Dbg_Flash.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 8 - 0 - 0 - 0 - 3 - 3 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 1 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 1 - 0x1a000000 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x1a000000 - 0x80000 - - - 1 - 0x1b000000 - 0x80000 - - - 0 - 0x10080000 - 0xa000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x10000000 - 0x8000 - - - 0 - 0x20000000 - 0x10000 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_LPC43xx __DBG_ITM CORE_M4 __RTX USE_STDPERIPH_DRIVER MDK_CONF_BARE_METAL - - ..\MDK-ARM\CyaSSL;../../..;..\LPC43xx\Drivers\include;..\LPC43xx\LPC43xx\Include - - - - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - - - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - server.c - 1 - ..\..\..\examples\server\server.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - LPC43xx - - - lpc43xx_rtc.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_rtc.c - - - lpc43xx_timer.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_timer.c - - - lpc43xx_cgu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_cgu.c - - - lpc43xx_scu.c - 1 - ..\LPC43xx\Drivers\source\lpc43xx_scu.c - - - - - MDK-ARM - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - Serial.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\Serial.c - - - ETH_LPC43xx.c - 1 - C:\Keil\ARM\RL\TCPnet\Drivers\ETH_LPC43xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - SDIO_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\SDIO_LPC43xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - system_LPC43xx.c - 1 - C:\Keil\ARM\Boards\Keil\MCB4300\RL\FlashFS\SD_File\system_LPC43xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - internal.c - 1 - ..\..\..\src\internal.c - - - io.c - 1 - ..\..\..\src\io.c - - - keys.c - 1 - ..\..\..\src\keys.c - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - tls.c - 1 - ..\..\..\src\tls.c - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_LPC43xx.s - 2 - ..\LPC43xx\startup_LPC43xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-LCP43xx.c - 1 - ..\LPC43xx\time-LCP43xx.c - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt deleted file mode 100644 index ddc1a500..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt +++ /dev/null @@ -1,1656 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - MDK-RTX-TCP-FS - 0x4 - ARM-ADS - - 25000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Flash\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 0 - - 255 - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 - - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - - - - - - MDK-FS - 0x4 - ARM-ADS - - 25000000 - - 1 - 1 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Flash\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 - - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - MDK-BARE-METAL - 0x4 - ARM-ADS - - 25000000 - - 1 - 1 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Flash\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 0 - - 255 - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 9 - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO23 -TC10000000 -TP18 -TDX0 -TDD0 -TDS7 -TDT0 -TDC1F -TIEFFFFFFFF -TIP0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 - - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - CyaSSL Apps - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\echoclient\echoclient.c - echoclient.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\echoserver\echoserver.c - echoserver.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 5 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\test\test.c - test.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 21 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\benchmark\benchmark.c - benchmark.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\client\client.c - client.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\examples\server\server.c - server.c - 0 - 0 - - - 1 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\shell.c - shell.c - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - 0 - 106 - 149 - 0 - ..\MDK-ARM\CyaSSL\main.c - main.c - 0 - 0 - - - 1 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\cert_data.c - cert_data.c - 0 - 0 - - - - - STM32F2xx_StdPeriph_Lib - 1 - 0 - 0 - 0 - - - - MDK-ARM - 1 - 0 - 0 - 0 - - 3 - 10 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c - Serial.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c - SDIO_STM32F2xx.c - 0 - 0 - - - 3 - 12 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - FS_CM3.lib - 0 - 0 - - - 3 - 13 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - RTX_CM3.lib - 0 - 0 - - - 3 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c - ETH_STM32F2xx.c - 0 - 0 - - - 3 - 15 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - TCPD_CM3.lib - 0 - 0 - - - 3 - 16 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - TCP_CM3.lib - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c - system_stm32f2xx.c - 0 - 0 - - - - - CyaSSL Library - 1 - 0 - 0 - 0 - - 4 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\crl.c - crl.c - 0 - 0 - - - 4 - 19 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\internal.c - internal.c - 0 - 0 - - - 4 - 20 - 1 - 0 - 0 - 23 - 0 - 0 - 0 - 0 - ..\..\..\src\io.c - io.c - 0 - 0 - - - 4 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\keys.c - keys.c - 0 - 0 - - - 4 - 22 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\ocsp.c - ocsp.c - 0 - 0 - - - 4 - 23 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\sniffer.c - sniffer.c - 0 - 0 - - - 4 - 24 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\ssl.c - ssl.c - 0 - 0 - - - 4 - 25 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\src\tls.c - tls.c - 0 - 0 - - - 4 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - ssl-dummy.c - 0 - 0 - - - - - Crypt/Cipher Library - 1 - 0 - 0 - 0 - - 5 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\aes.c - aes.c - 0 - 0 - - - 5 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\arc4.c - arc4.c - 0 - 0 - - - 5 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\asm.c - asm.c - 0 - 0 - - - 5 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\asn.c - asn.c - 0 - 0 - - - 5 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\camellia.c - camellia.c - 0 - 0 - - - 5 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\coding.c - coding.c - 0 - 0 - - - 5 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\des3.c - des3.c - 0 - 0 - - - 5 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\dh.c - dh.c - 0 - 0 - - - 5 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\dsa.c - dsa.c - 0 - 0 - - - 5 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ecc.c - ecc.c - 0 - 0 - - - 5 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 0 - 0 - - - 5 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\error.c - error.c - 0 - 0 - - - 5 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\hc128.c - hc128.c - 0 - 0 - - - 5 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\hmac.c - hmac.c - 0 - 0 - - - 5 - 41 - 1 - 0 - 0 - 19 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\integer.c - integer.c - 0 - 0 - - - 5 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\logging.c - logging.c - 0 - 0 - - - 5 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md2.c - md2.c - 0 - 0 - - - 5 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md4.c - md4.c - 0 - 0 - - - 5 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\md5.c - md5.c - 0 - 0 - - - 5 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\memory.c - memory.c - 0 - 0 - - - 5 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\misc.c - misc.c - 0 - 0 - - - 5 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\port.c - port.c - 0 - 0 - - - 5 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\pwdbased.c - pwdbased.c - 0 - 0 - - - 5 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\rabbit.c - rabbit.c - 0 - 0 - - - 5 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\random.c - random.c - 0 - 0 - - - 5 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\ripemd.c - ripemd.c - 0 - 0 - - - 5 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\rsa.c - rsa.c - 0 - 0 - - - 5 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha.c - sha.c - 0 - 0 - - - 5 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha256.c - sha256.c - 0 - 0 - - - 5 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\sha512.c - sha512.c - 0 - 0 - - - 5 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\ctaocrypt\src\tfm.c - tfm.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 6 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\File_Config.c - File_Config.c - 0 - 0 - - - 6 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\Net_Config.c - Net_Config.c - 0 - 0 - - - 6 - 60 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config.h - config.h - 0 - 0 - - - 6 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\RTX_Conf_CM.c - RTX_Conf_CM.c - 0 - 0 - - - 6 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\config\Net_Debug.c - Net_Debug.c - 0 - 0 - - - 6 - 63 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - ..\MDK-ARM\CyaSSL\config-FS.h - config-FS.h - 0 - 0 - - - 6 - 64 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - config-RTX-TCP-FS.h - 0 - 0 - - - 6 - 65 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - config-BARE-METAL.h - 0 - 0 - - - 6 - 66 - 2 - 0 - 0 - 0 - 0 - 152 - 169 - 0 - ..\MDK-ARM\config\startup_stm32f2xx.s - startup_stm32f2xx.s - 0 - 0 - - - - - CyaSSL-MDK - 1 - 0 - 0 - 0 - - 7 - 67 - 1 - 0 - 0 - 0 - 0 - 182 - 222 - 0 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 0 - 0 - - - 7 - 68 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - ..\MDK-ARM\CyaSSL\Retarget.c - Retarget.c - 0 - 0 - - - 7 - 69 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 0 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj b/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj deleted file mode 100644 index 833dc0d1..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj +++ /dev/null @@ -1,3964 +0,0 @@ - - - - 1.1 - -
### uVision Project, (C) Keil Software
- - - - MDK-RTX-TCP-FS - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") - - "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") - UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) - 5124 - stm32f2xx.h - - - - - - - - - - SFD\ST\STM32F2xx\STM32F20x.sfr - 0 - - - - ST\STM32F2xx\ - ST\STM32F2xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-RTX-TCP-FS\ - STM32F2xx-MDK-RTX-TCP-FS - 1 - 0 - 0 - 1 - 1 - .\Flash\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 1 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM __RTX MDK_CONF_RTX_TCP_FS - - ..\MDK-ARM\CyaSSL;C:..\STM32F2xx_StdPeriph_Lib\inc;..\..\..\ - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - server.c - 1 - ..\..\..\examples\server\server.c - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - STM32F2xx_StdPeriph_Lib - - - MDK-ARM - - - Serial.c - 1 - c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c - - - SDIO_STM32F2xx.c - 1 - c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - ETH_STM32F2xx.c - 1 - c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - system_stm32f2xx.c - 1 - C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - internal.c - 1 - ..\..\..\src\internal.c - - - io.c - 1 - ..\..\..\src\io.c - - - keys.c - 1 - ..\..\..\src\keys.c - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - tls.c - 1 - ..\..\..\src\tls.c - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_stm32f2xx.s - 2 - ..\MDK-ARM\config\startup_stm32f2xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-STM32F2xx.c - 1 - ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - - - - - MDK-FS - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") - - "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") - UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) - 5124 - stm32f2xx.h - - - - - - - - - - SFD\ST\STM32F2xx\STM32F20x.sfr - 0 - - - - ST\STM32F2xx\ - ST\STM32F2xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-FS\ - STM32F2xx-MDK-FS - 1 - 0 - 0 - 1 - 1 - .\Flash\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM MDK_CONF_FS - - ..\MDK-ARM\CyaSSL;..\MDK-ARM\inc;..\STM32F2xx_StdPeriph_Lib\inc;..\POSIX\..\..\..\ - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - server.c - 1 - ..\..\..\examples\server\server.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - STM32F2xx_StdPeriph_Lib - - - MDK-ARM - - - Serial.c - 1 - c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c - - - SDIO_STM32F2xx.c - 1 - c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - ETH_STM32F2xx.c - 1 - c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - system_stm32f2xx.c - 1 - C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - internal.c - 1 - ..\..\..\src\internal.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - io.c - 1 - ..\..\..\src\io.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - keys.c - 1 - ..\..\..\src\keys.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - tls.c - 1 - ..\..\..\src\tls.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_stm32f2xx.s - 2 - ..\MDK-ARM\config\startup_stm32f2xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-STM32F2xx.c - 1 - ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - - - - - MDK-BARE-METAL - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M3") - - "STARTUP\ST\STM32F2xx\startup_stm32f2xx.s" ("STM32F2xx Startup Code") - UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000) - 5124 - stm32f2xx.h - - - - - - - - - - SFD\ST\STM32F2xx\STM32F20x.sfr - 0 - - - - ST\STM32F2xx\ - ST\STM32F2xx\ - - 0 - 0 - 0 - 0 - 1 - - .\MDK-BARE-METAL\ - STM32F2xx-MDK-BARE-METAL - 1 - 0 - 0 - 1 - 1 - .\Flash\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARMCM3.DLL - -MPU - DARMSTM.DLL - -pSTM32F207IG - SARMCM3.DLL - -MPU - TARMSTM.DLL - -pSTM32F207IG - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 0 - - 0 - 9 - - - - - - - - - - - - - ..\MDK-ARM\config\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H CYASSL_STM32F2xx __DBG_ITM MDK_CONF_BARE_METAL - - ..\MDK-ARM\CyaSSL;..\MDK-ARM\inc;..\STM32F2xx_StdPeriph_Lib\inc;..\POSIX;..\..\..\ - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - CyaSSL Apps - - - echoclient.c - 1 - ..\..\..\examples\echoclient\echoclient.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - echoserver.c - 1 - ..\..\..\examples\echoserver\echoserver.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - test.c - 1 - ..\..\..\ctaocrypt\test\test.c - - - benchmark.c - 1 - ..\..\..\ctaocrypt\benchmark\benchmark.c - - - client.c - 1 - ..\..\..\examples\client\client.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - server.c - 1 - ..\..\..\examples\server\server.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - shell.c - 1 - ..\MDK-ARM\CyaSSL\shell.c - - - main.c - 1 - ..\MDK-ARM\CyaSSL\main.c - - - cert_data.c - 1 - ..\MDK-ARM\CyaSSL\cert_data.c - - - - - STM32F2xx_StdPeriph_Lib - - - MDK-ARM - - - Serial.c - 1 - c:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\FlashFS\SD_File\Serial.c - - - SDIO_STM32F2xx.c - 1 - c:\Keil\ARM\RL\FlashFS\Drivers\SDIO_STM32F2xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - FS_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\FS_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - RTX_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\\RTX_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - ETH_STM32F2xx.c - 1 - c:\Keil\ARM\RL\TCPnet\Drivers\ETH_STM32F2xx.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - TCPD_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCPD_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - TCP_CM3.lib - 4 - c:\Keil\ARM\RV31\LIB\TCP_CM3.lib - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - - - system_stm32f2xx.c - 1 - C:\Keil\ARM\Startup\ST\STM32F2xx\system_stm32f2xx.c - - - - - CyaSSL Library - - - crl.c - 1 - ..\..\..\src\crl.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - internal.c - 1 - ..\..\..\src\internal.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - io.c - 1 - ..\..\..\src\io.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - keys.c - 1 - ..\..\..\src\keys.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ocsp.c - 1 - ..\..\..\src\ocsp.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - sniffer.c - 1 - ..\..\..\src\sniffer.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ssl.c - 1 - ..\..\..\src\ssl.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - tls.c - 1 - ..\..\..\src\tls.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - ssl-dummy.c - 1 - ..\MDK-ARM\CyaSSL\ssl-dummy.c - - - - - Crypt/Cipher Library - - - aes.c - 1 - ..\..\..\ctaocrypt\src\aes.c - - - arc4.c - 1 - ..\..\..\ctaocrypt\src\arc4.c - - - asm.c - 1 - ..\..\..\ctaocrypt\src\asm.c - - - asn.c - 1 - ..\..\..\ctaocrypt\src\asn.c - - - camellia.c - 1 - ..\..\..\ctaocrypt\src\camellia.c - - - coding.c - 1 - ..\..\..\ctaocrypt\src\coding.c - - - des3.c - 1 - ..\..\..\ctaocrypt\src\des3.c - - - dh.c - 1 - ..\..\..\ctaocrypt\src\dh.c - - - dsa.c - 1 - ..\..\..\ctaocrypt\src\dsa.c - - - ecc.c - 1 - ..\..\..\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - ..\..\..\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - ..\..\..\ctaocrypt\src\error.c - - - hc128.c - 1 - ..\..\..\ctaocrypt\src\hc128.c - - - hmac.c - 1 - ..\..\..\ctaocrypt\src\hmac.c - - - integer.c - 1 - ..\..\..\ctaocrypt\src\integer.c - - - logging.c - 1 - ..\..\..\ctaocrypt\src\logging.c - - - md2.c - 1 - ..\..\..\ctaocrypt\src\md2.c - - - md4.c - 1 - ..\..\..\ctaocrypt\src\md4.c - - - md5.c - 1 - ..\..\..\ctaocrypt\src\md5.c - - - memory.c - 1 - ..\..\..\ctaocrypt\src\memory.c - - - misc.c - 1 - ..\..\..\ctaocrypt\src\misc.c - - - port.c - 1 - ..\..\..\ctaocrypt\src\port.c - - - pwdbased.c - 1 - ..\..\..\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - ..\..\..\ctaocrypt\src\rabbit.c - - - random.c - 1 - ..\..\..\ctaocrypt\src\random.c - - - ripemd.c - 1 - ..\..\..\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - ..\..\..\ctaocrypt\src\rsa.c - - - sha.c - 1 - ..\..\..\ctaocrypt\src\sha.c - - - sha256.c - 1 - ..\..\..\ctaocrypt\src\sha256.c - - - sha512.c - 1 - ..\..\..\ctaocrypt\src\sha512.c - - - tfm.c - 1 - ..\..\..\ctaocrypt\src\tfm.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - - - Configuration - - - File_Config.c - 1 - ..\MDK-ARM\config\File_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Config.c - 1 - ..\MDK-ARM\config\Net_Config.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config.h - 5 - ..\MDK-ARM\CyaSSL\config.h - - - RTX_Conf_CM.c - 1 - ..\MDK-ARM\config\RTX_Conf_CM.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - Net_Debug.c - 1 - ..\MDK-ARM\config\Net_Debug.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - - - config-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-FS.h - - - config-RTX-TCP-FS.h - 5 - ..\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h - - - config-BARE-METAL.h - 5 - ..\MDK-ARM\CyaSSL\config-BARE-METAL.h - - - startup_stm32f2xx.s - 2 - ..\MDK-ARM\config\startup_stm32f2xx.s - - - - - CyaSSL-MDK - - - cyassl_MDK_ARM.c - 1 - ..\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - Retarget.c - 1 - ..\MDK-ARM\CyaSSL\Retarget.c - - - time-STM32F2xx.c - 1 - ..\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c b/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c deleted file mode 100644 index e2912d19..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c +++ /dev/null @@ -1,299 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include "time.h" - -#define PERIPH_BASE ((uint32_t)0x40000000) -/*----------------------------------------------------------------------------- - * initialize RTC - *----------------------------------------------------------------------------*/ -#include "stm32f2xx.h" - -#define assert_param(a) - -#define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F) -#define SYNCHRO_TIMEOUT ((uint32_t) 0x00008000) -#define Bcd2ToByte(v) \ - ((((uint8_t)(v & (uint8_t)0xF0) >> (uint8_t)0x4) * 10) + (v & (uint8_t)0x0F)) -#define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F) -#define RTC_TR_MNT ((uint32_t)0x00007000) -#define RTC_TR_MNU ((uint32_t)0x00000F00) - -#define PWR_OFFSET (PWR_BASE - PERIPH_BASE) -#define CR_OFFSET (PWR_OFFSET + 0x00) -#define DBP_BitNumber 0x08 -#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4)) -#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF) -#define INITMODE_TIMEOUT ((uint32_t) 0x00010000) - -static void init_RTC() -{ - __IO uint32_t initcounter = 0x00 ; - uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */ - ((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ; - - /* Allow access to RTC */ - *(__IO uint32_t *) CR_DBP_BB = ENABLE ; - /* RCC_LSEConfig(RCC_LSE_ON) */ - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); - /* Reset LSEBYP bit */ - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01); - /* Wait till LSE is ready */ - while((RCC->BDCR << 0x2) == 0x0) { } - /* Select the RTC clock source: RCC_RTCCLKSource_LSE */ - ((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100; - - /* Enable the RTC Clock */ - *(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE; - - *(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE; - RTC->ISR = (uint32_t) RTC_INIT_MASK; - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - - RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); /* Clear RTC CR FMT Bit */ - /* Set RTC_CR register */ - RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */ - - /* Configure the RTC PRER */ - RTC->PRER = 0x7f ; - RTC->PRER |= (uint32_t)(0xff << 16); - - /* Exit Initialization mode */ - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - /* Enable the write protection for RTC registers */ - RTC->WPR = 0xFF; -} - -/*----------------------------------------------------------------------------- - * initialize TIM - *----------------------------------------------------------------------------*/ -#define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001) - -static void init_TIM() -{ - uint16_t tmpcr1 = 0; - - ((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ; - - tmpcr1 = TIM2->CR1 ; - tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) )); - /* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */ - tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */ - TIM2->CR1= tmpcr1 ; - - TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */ - TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */ - TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */ - - *(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ; - /* TIM_Cmd(TIM2, ENABLE) ; */ -} - -void init_time(void) { - init_RTC() ; - init_TIM() ; -} - -static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s) -{ - uint32_t tmpreg = 0; - tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); - *h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16)); - *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8)); - *s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU))); -} - -static uint32_t ByteToBcd2(uint8_t Value) -{ - uint8_t bcdhigh = 0; - while (Value >= 10) { - bcdhigh++; - Value -= 10; - } - return ((uint8_t)(bcdhigh << 4) | Value); -} - -static void SetTime(uint8_t h, uint8_t m, uint8_t s) -{ - __IO uint32_t synchrocounter = 0; - uint32_t synchrostatus = 0x00; - __IO uint32_t initcounter = 0; - uint32_t initstatus = 0x00; - uint32_t tmpreg ; - - tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ; - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - RTC->ISR = (uint32_t)RTC_INIT_MASK; - - /* Wait till RTC is in INIT state and if Time out is reached exit */ - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); - - RTC->ISR &= (uint32_t)RTC_RSF_MASK; - /* Wait the registers to be synchronised */ - do { - synchrostatus = RTC->ISR & RTC_ISR_RSF; - synchrocounter++; - } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); - - RTC->WPR = 0xFF; -} - -static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d) -{ - uint32_t tmpreg = 0; - tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK); - *y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16)); - *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8)); - *d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU))); -} - -static void SetDate(uint8_t y, uint8_t m, uint8_t d) -{ - __IO uint32_t synchrocounter = 0; - uint32_t synchrostatus = 0x00; - __IO uint32_t initcounter = 0; - uint32_t initstatus = 0x00; - uint32_t tmpreg = 0 ; - - tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ; - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - RTC->ISR = (uint32_t)RTC_INIT_MASK; - - /* Wait till RTC is in INIT state and if Time out is reached exit */ - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); - - RTC->ISR &= (uint32_t)RTC_RSF_MASK; - /* Wait the registers to be synchronised */ - do { - synchrostatus = RTC->ISR & RTC_ISR_RSF; - synchrocounter++; - } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); - - RTC->WPR = 0xFF; -} - - -#include -void CYASSL_MSG(const char *msg) ; - -struct tm *Cyassl_MDK_gmtime(const time_t *c) -{ - uint8_t h, m, s ; - uint8_t y, mo, d ; - static struct tm date ; - - GetTime(&h, &m, &s) ; - GetDate(&y, &mo, &d) ; - - date.tm_year = y + 100 ; - date.tm_mon = mo - 1 ; - date.tm_mday = d ; - date.tm_hour = h ; - date.tm_min = m ; - date.tm_sec = s ; - - #if defined(DEBUG_CYASSL) - { - char msg[100] ; - sprintf(msg, - "Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n", - d, mo, y+2000, h, m, s) ; - CYASSL_MSG(msg) ; - } - #endif - - return(&date) ; -} - -double current_time() -{ - return ((double)TIM2->CNT/1000000.0) ; -} - -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - -void time_main(void *args) -{ - char * datetime ; - uint8_t h, m, s ; - uint8_t y, mo, d ; - - if( args == NULL || ((func_args *)args)->argc == 1) { - GetTime(&h, &m, &s) ; - GetDate(&y, &mo, &d) ; - printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", - mo, d, y+2000, h, m, s) ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 'd' ) { - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ; - SetDate(y-2000, mo, d) ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 't' ) { - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d:%d:%d", - (int *)&h, (int *)&m, (int *)&s) ; - SetTime(h, m, s) ; - } else printf("Invalid argument\n") ; -} - - -/******************************************************************* - time() -********************************************************************/ -time_t time(time_t * t) { return 0 ; } diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt deleted file mode 100644 index 3a01f342..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSL-License.txt +++ /dev/null @@ -1,292 +0,0 @@ -LICENSE AGREEMENT - -The wolfSSL source code is subject to the U.S. Export Administration -Regulations and other U.S. law, and may not be exported or re-exported to -certain countries (currently Afghanistan, Cuba, Iran, Iraq, Libya, North -Korea, Sudan and Syria) or to persons or entities prohibited from receiving -U.S. exports (including Denied Parties, entities on the Bureau of Export -Administration Entity List, and Specially Designated Nationals). - ---- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm deleted file mode 100644 index 2f90e297..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-TableofContents.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm deleted file mode 100644 index d860715f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Docs/CyaSSLManual-wolfCryptUsageReference.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c deleted file mode 100644 index d29fbf3b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.c +++ /dev/null @@ -1,28 +0,0 @@ -/* certs_test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* Define initial data for cert buffers */ -#include - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h deleted file mode 100644 index 6629ee05..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef CYASSL_CERT_DATA_H -#define CYASSL_CERT_DATA_H - -#ifdef USE_CERT_BUFFERS_1024 -extern const unsigned char client_key_der_1024[] ; -extern int sizeof_client_key_der_1024 ; -/* ./certs/1024/client-cert.der, 1024-bit */ -extern const unsigned char client_cert_der_1024[] ; -extern int sizeof_client_cert_der_1024 ; -/* ./certs/1024/dh1024.der, 1024-bit */ -extern const unsigned char dh_key_der_1024[] ; -extern int sizeof_dh_key_der_1024 ; -/* ./certs/1024/dsa1024.der, 1024-bit */ -extern const unsigned char dsa_key_der_1024[] ; -extern int sizeof_dsa_key_der_1024 ; -/* ./certs/1024/rsa1024.der, 1024-bit */ -extern const unsigned char rsa_key_der_1024[] ; -extern int sizeof_rsa_key_der_1024 ; - -#elif defined(USE_CERT_BUFFERS_2048) -/* ./certs/client-key.der, 2048-bit */ -extern const unsigned char client_key_der_2048[] ; -extern int sizeof_client_key_der_2048 ; -/* ./certs/client-cert.der, 2048-bit */ -extern const unsigned char client_cert_der_2048[] ; -extern int sizeof_client_cert_der_2048 ; -/* ./certs/dh2048.der, 2048-bit */ -extern const unsigned char dh_key_der_2048[] ; -extern int sizeof_dh_key_der_2048 ; -/* ./certs/dsa2048.der, 2048-bit */ -extern const unsigned char dsa_key_der_2048[] ; -extern int sizeof_dsa_key_der_2048; -/* ./certs/rsa2048.der, 2048-bit */ -extern const unsigned char rsa_key_der_2048[] ; -extern int sizeof_rsa_key_der_2048 ; -#endif - -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c deleted file mode 100644 index cca8ad61..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c +++ /dev/null @@ -1,247 +0,0 @@ -/* cyassl_KEIL_RL.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/***************************************************************************************/ -/** This file is for defining functions for specific to KEIL-RL. **/ -/***************************************************************************************/ -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#if defined (CYASSL_MDK5) - #include "cmsis_os.h" - #if defined(CYASSL_KEIL_TCP_NET) - #include "rl_net.h" - #endif -#else - #include -#endif - -#include "cyassl_MDK_ARM.h" - -#include -#include - -#if defined (CYASSL_CMSIS_RTOS) - #define os_dly_wait(t) osDelay(10*t) -#endif - - -/** KEIL-RL TCPnet ****/ -/** TCPnet BSD socket does not have following functions. **/ - -#if defined(CYASSL_KEIL_TCP_NET) -char *inet_ntoa(struct in_addr in) -{ - #define NAMESIZE 16 - static char name[NAMESIZE] ; - sprintf(name, "%d.%d.%d.%d", (in.s_addr>>24)&0xff, (in.s_addr>>16)&0xff, (in.s_addr>>8)&0xff, in.s_addr&0xff) ; - return name ; -} - -unsigned long inet_addr(const char *cp) -{ - unsigned int a[4] ; unsigned long ret ; - sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) ; - ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ; - return(ret) ; -} - - -/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/ -int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) -{ - int ret = 0 ; - #if defined(CYASSL_KEIL_TCP_NET) - - SOCKADDR_IN addr ; - - addr = *(SOCKADDR_IN *)sa ; - - do { - #undef connect /* Go to KEIL TCPnet connect */ - ret = connect(sd, (SOCKADDR *)&addr, sizeof(addr)) ; - os_dly_wait(50); - } while(ret == SCK_EWOULDBLOCK) ; - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Connect return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; -} - - -int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) -{ - int ret = 0 ; - - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef accept /* Go to KEIL TCPnet accept */ - ret = accept(sd, addr, addrlen) ; - if(ret != SCK_EWOULDBLOCK) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Accept return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; - -} - -int Cyassl_recv(int sd, void *buf, size_t len, int flags) -{ - int ret = 0; - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef recv /* Go to KEIL TCPnet recv */ - ret = recv(sd, buf, len, flags) ; - if((ret != SCK_EWOULDBLOCK) &&( ret != SCK_ETIMEOUT)) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Recv return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - - #endif /* CYASSL_KEIL_TCP_NET */ - return(ret ) ; -} - -int Cyassl_send(int sd, const void *buf, size_t len, int flags) -{ - int ret = 0 ; - - #if defined(CYASSL_KEIL_TCP_NET) - while(1) { - #undef send /* Go to KEIL TCPnet send */ - ret = send(sd, buf, len, flags) ; - if(ret != SCK_EWOULDBLOCK) break ; - os_dly_wait(1); - } - #ifdef DEBUG_CYASSL - { - char msg[50] ; - sprintf(msg, "BSD Send return code: %d\n", ret) ; - CYASSL_MSG(msg) ; - } - #endif - -#endif /* CYASSL_KEIL_TCP_NET */ - return(ret) ; - -} - -#endif /* CYASSL_KEIL_TCP_NET */ - -#if defined(CYASSL_KEIL_TCP_NET) -void Cyassl_sleep(int t) -{ - #if defined(HAVE_KEIL_RTX) - os_dly_wait(t/1000+1) ; - #endif -} - -int Cyassl_tcp_select(int sd, int timeout) -{ - - return 0 ; - -} -#endif - -extern int strlen(const char *s) ; - -FILE * CyaSSL_fopen(const char *name, const char *openmode) -{ - int i ; FILE * ret ; - #define PATHSIZE 100 - char path[PATHSIZE] ; char *p ; - - if(strlen(name) > PATHSIZE)return(NULL) ; - - for(i = 0; i<= strlen(name); i++) { - if(name[i] == '/')path[i] = '\\' ; - else path[i] = name[i] ; - } - if(path[0] == '.' && path[1] == '\\') p = path + 2 ; - else p = path ; - - ret = fopen (p, openmode) ; - - return(ret) ; -} - -#if defined (CYASSL_MDK5) -#define getkey getchar -#define sendchar putchar -#else -extern int getkey(void) ; -extern int sendchar(int c) ; -#endif - -char * Cyassl_fgets ( char * str, int num, FILE * f ) -{ - int i ; - - for(i = 0 ; i< num ; i++) { - while((str[i] = getkey()) == 0) { - #if defined (HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS) - os_tsk_pass (); - #else - osThreadYield (); - #endif - } - if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') { - sendchar('\n') ; - str[i++] = '\n' ; - str[i] = '\0' ; - break ; - } else if(str[i] == '\010') { /* BS */ - if(i) { /* erace one char */ - sendchar('\010') ; sendchar(' ') ; sendchar('\010') ; - i = (i>0 ? (i-2) : -1 ) ; - continue ; - } - } else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */ - str[i] = '\0' ; - return(0) ; - } - sendchar(str[i]) ; - } - return(str) ; -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h deleted file mode 100644 index e99e9b8b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h +++ /dev/null @@ -1,106 +0,0 @@ -/* cyassl_KEIL_RL.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/******************************************************************************/ -/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/ -/******************************************************************************/ -#ifndef CYASSL_KEIL_RL_H -#define CYASSL_KEIL_RL_H - - - -#include - -/* Go to STDIN */ -#define fgets(buff, sz, fd) Cyassl_fgets(buff, sz, fd) -extern char * Cyassl_fgets ( char * str, int num, FILE * f ) ; - -#define SOCKET_T int - -/*** #include ***/ -#define NUMBITSPERBYTE 8 -#define FD_SETSIZE 10 - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ - -typedef struct fd_set { - fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; -} fd_set; - -/*** #include ***/ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* microseconds */ -}; - - -#if defined(CYASSL_KEIL_TCP_NET) - - -#if defined(CYASSL_MDK5) -#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK -#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT -#include "rl_net.h" -#endif - -typedef int socklen_t ; - -/* for avoiding conflict with KEIL-TCPnet BSD socket */ -/* Bodies are in cyassl_KEIL_RL.c */ -#define connect Cyassl_connect -#define accept Cyassl_accept -#define recv Cyassl_recv -#define send Cyassl_send -#define sleep Cyassl_sleep - -/* for avoiding conflicting with KEIL-TCPnet TCP socket */ -/* Bodies are in test.h */ -#define tcp_connect Cyassl_tcp_connect -#define tcp_socket Cyassl_tcp_soket -#define tcp_listen Cyassl_tcp_listen -#define tcp_select Cyassl_tcp_select - -extern int Cyassl_connect(int sd, const struct sockaddr * sa, int sz) ; -extern int Cyassl_accept(int sd, struct sockaddr *addr, socklen_t *addrlen); -extern int Cyassl_recv(int sd, void *buf, size_t len, int flags); -extern int Cyassl_send(int sd, const void *buf, size_t len, int flags); -extern void Cyassl_sleep(int sec) ; -extern int Cyassl_tcp_select(int sd, int timeout) ; - -/** KEIL-RL TCPnet ****/ -/* TCPnet BSD socket does not have following functions. */ -extern char *inet_ntoa(struct in_addr in); -extern unsigned long inet_addr(const char *cp); -extern int setsockopt(int sockfd, int level, int optname, - const void *optval, socklen_t optlen); -extern int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, const struct timeval *timeout); - -#endif /* CYASSL_KEIL_TCP_NET */ - - -/* CyaSSL MDK-ARM time functions */ -#include -struct tm *Cyassl_MDK_gmtime(const time_t *c) ; -extern double current_time(void) ; - -#endif /* CYASSL_KEIL_RL_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c deleted file mode 100644 index 47f4a6cd..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c +++ /dev/null @@ -1,52 +0,0 @@ -/* ssl-dummy.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -Signer* GetCA(void* vp, byte* hash) -{ - return NULL ; -} - -int CyaSSL_dtls(CYASSL* ssl) -{ - return NULL ; -} - -int CyaSSL_get_using_nonblock(CYASSL* ssl) -{ - return NULL ; -} - -Signer* GetCAByName(void* vp, byte* hash) -{ - return NULL ; -} - -int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) -{ - return NULL ; -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt deleted file mode 100644 index e19c5640..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/Abstract.txt +++ /dev/null @@ -1,15 +0,0 @@ -This program is a simple benchmark of wolfCrypt library. - -In order to run this benchmark, copy -{PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. - -For benchmark configuration, refer config-Crypt.h. - -For the hardware crypt on config-Crypt.h, download -STSW-STM32062: STM32F2xx standard peripherals library at -http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to - {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib - -Support -------- -Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx deleted file mode 100644 index 88827158..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvoptx +++ /dev/null @@ -1,1094 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - CryptBenchmark - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - 0x20000408 - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 32 - 0 - 0 - 0 - 0 - .\benchmark.c - benchmark.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 4 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 5 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 6 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 9 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 10 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 11 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 12 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 13 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 15 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 8 - 16 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 8 - 17 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 8 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c - ssl-dummy.c - 1 - 0 - - - 8 - 19 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 8 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 8 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 8 - 22 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 8 - 23 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 8 - 24 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 8 - 25 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 8 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 8 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 8 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 8 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 8 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 8 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 8 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 8 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 8 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 8 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 8 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 8 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 8 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 8 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 8 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 8 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 8 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 8 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c - port.c - 1 - 0 - - - 8 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 8 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 8 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 8 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 8 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 8 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 8 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 8 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 8 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx deleted file mode 100644 index 1c54758b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/CryptBenchmark.uvprojx +++ /dev/null @@ -1,917 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - CryptBenchmark - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - CryptBenchmark - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_Benchmark CYASSL_STM32F2xx - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - benchmark.c - 1 - .\benchmark.c - - - - - Configuration - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::wolfSSL - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - ssl-dummy.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c - - - port.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - RTE\Network\Net_Debug.c - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-FS.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index af8fdc4d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 6 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 50 -#endif - -// Main Thread stack size [bytes] <64-10000:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 1500 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 0 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-4096:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 0 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-4096:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 2648e44d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 0 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index eae6859d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00002000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00009000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h deleted file mode 100644 index aa51462a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/RTE_Components.h +++ /dev/null @@ -1,19 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'CryptBenchmark' - * Target: 'CryptBenchmark' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c deleted file mode 100644 index 50351faf..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c +++ /dev/null @@ -1,1106 +0,0 @@ -/* benchmark.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* CTaoCrypt benchmark */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif - -#if defined(CYASSL_MDK_ARM) - extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; - #define fopen CyaSSL_fopen -#endif - -#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) - /* include test cert and key buffers for use with NO_FILESYSTEM */ - #if defined(CYASSL_MDK_ARM) - #include "cert_data.h" /* use certs_test.c for initial data, - so other commands can share the data. */ - #else - #include - #endif -#endif - - -#ifdef HAVE_BLAKE2 - #include - void bench_blake2(void); -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -void bench_des(void); -void bench_arc4(void); -void bench_hc128(void); -void bench_rabbit(void); -void bench_aes(int); -void bench_aesgcm(void); -void bench_aesccm(void); -void bench_camellia(void); - -void bench_md5(void); -void bench_sha(void); -void bench_sha256(void); -void bench_sha512(void); -void bench_ripemd(void); - -void bench_rsa(void); -void bench_rsaKeyGen(void); -void bench_dh(void); -#ifdef HAVE_ECC -void bench_eccKeyGen(void); -void bench_eccKeyAgree(void); -#endif - -double current_time(int); - - -#ifdef HAVE_CAVIUM - -static int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif - - -/* so embedded projects can pull in tests on their own */ -#if !defined(NO_MAIN_DRIVER) - -int main(int argc, char** argv) - -{ - (void)argc; - (void)argv; -#else -int benchmark_test(void *args) -{ -#endif - - #ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) { - printf("Cavium OpenNitroxDevice failed\n"); - exit(-1); - } -#endif /* HAVE_CAVIUM */ -#ifndef NO_AES - bench_aes(0); - bench_aes(1); -#endif -#ifdef HAVE_AESGCM - bench_aesgcm(); -#endif -#ifdef HAVE_AESCCM - bench_aesccm(); -#endif -#ifdef HAVE_CAMELLIA - bench_camellia(); -#endif -#ifndef NO_RC4 - bench_arc4(); -#endif -#ifdef HAVE_HC128 - bench_hc128(); -#endif -#ifndef NO_RABBIT - bench_rabbit(); -#endif -#ifndef NO_DES3 - bench_des(); -#endif - - printf("\n"); - -#ifndef NO_MD5 - bench_md5(); -#endif -#ifndef NO_SHA - bench_sha(); -#endif -#ifndef NO_SHA256 - bench_sha256(); -#endif -#ifdef CYASSL_SHA512 - bench_sha512(); -#endif -#ifdef CYASSL_RIPEMD - bench_ripemd(); -#endif -#ifdef HAVE_BLAKE2 - bench_blake2(); -#endif - - printf("\n"); - -#ifndef NO_RSA - bench_rsa(); -#endif - -#ifndef NO_DH - bench_dh(); -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) - bench_rsaKeyGen(); -#endif - -#ifdef HAVE_ECC - bench_eccKeyGen(); - bench_eccKeyAgree(); -#endif - - return 0; -} - - -#ifdef BENCH_EMBEDDED -const int numBlocks = 25; /* how many kB/megs to test (en/de)cryption */ -const char blockType[] = "kB"; /* used in printf output */ -const int times = 1; /* public key iterations */ -#else -const int numBlocks = 5; -const char blockType[] = "megs"; -const int times = 100; -#endif - -const byte key[] = -{ - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, - 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 -}; - -const byte iv[] = -{ - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 - -}; - - -/* use kB instead of mB for embedded benchmarking */ -#ifdef BENCH_EMBEDDED -byte plain [1024]; -byte cipher[1024]; -#else -byte plain [1024*1024]; -byte cipher[1024*1024]; -#endif - - -#ifndef NO_AES -void bench_aes(int show) -{ - Aes enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("aes init cavium failed\n"); -#endif - - AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - if (show) - printf("AES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - AesFreeCavium(&enc); -#endif -} -#endif - - -byte additional[13]; -byte tag[16]; - - -#ifdef HAVE_AESGCM -void bench_aesgcm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesGcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-GCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_AESCCM -void bench_aesccm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesCcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-CCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_CAMELLIA -void bench_camellia(void) -{ - Camellia cam; - double start, total, persec; - int i; - - CamelliaSetKey(&cam, key, 16, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("Camellia %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifndef NO_DES3 -void bench_des(void) -{ - Des3 enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("des3 init cavium failed\n"); -#endif - Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("3DES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Des3_FreeCavium(&enc); -#endif -} -#endif - - -#ifndef NO_RC4 -void bench_arc4(void) -{ - Arc4 enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("arc4 init cavium failed\n"); -#endif - - Arc4SetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Arc4Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("ARC4 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Arc4FreeCavium(&enc); -#endif -} -#endif - - -#ifdef HAVE_HC128 -void bench_hc128(void) -{ - HC128 enc; - double start, total, persec; - int i; - - Hc128_SetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Hc128_Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("HC128 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* HAVE_HC128 */ - - -#ifndef NO_RABBIT -void bench_rabbit(void) -{ - Rabbit enc; - double start, total, persec; - int i; - - RabbitSetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RabbitProcess(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RABBIT %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_RABBIT */ - - -#ifndef NO_MD5 -void bench_md5(void) -{ - Md5 hash; - byte digest[MD5_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitMd5(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Md5Update(&hash, plain, sizeof(plain)); - - Md5Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("MD5 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_MD5 */ - - -#ifndef NO_SHA -void bench_sha(void) -{ - Sha hash; - byte digest[SHA_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - ShaUpdate(&hash, plain, sizeof(plain)); - - ShaFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_SHA */ - - -#ifndef NO_SHA256 -void bench_sha256(void) -{ - Sha256 hash; - byte digest[SHA256_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha256(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Sha256Update(&hash, plain, sizeof(plain)); - - Sha256Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-256 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_SHA512 -void bench_sha512(void) -{ - Sha512 hash; - byte digest[SHA512_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha512(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Sha512Update(&hash, plain, sizeof(plain)); - - Sha512Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-512 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_RIPEMD -void bench_ripemd(void) -{ - RipeMd hash; - byte digest[RIPEMD_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitRipeMd(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RipeMdUpdate(&hash, plain, sizeof(plain)); - - RipeMdFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RIPEMD %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_BLAKE2 -void bench_blake2(void) -{ - Blake2b b2b; - byte digest[64]; - double start, total, persec; - int i; - - InitBlake2b(&b2b, 64); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Blake2bUpdate(&b2b, plain, sizeof(plain)); - - Blake2bFinal(&b2b, digest, 64); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("BLAKE2b %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#if !defined(NO_RSA) || !defined(NO_DH) \ - || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) -RNG rng; -#endif - -#ifndef NO_RSA - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certRSAname = "certs/rsa2048.der" ; -void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certRSAname = "certs/rsa2048.der" ; -#endif - -void bench_rsa(void) -{ - int i; - int ret; - byte tmp[3072]; - size_t bytes; - word32 idx = 0; - - byte message[] = "Everyone gets Friday off."; - byte enc[512]; /* for up to 4096 bit */ - const int len = (int)strlen((char*)message); - double start, total, each, milliEach; - - RsaKey rsaKey; - int rsaKeySz = 2048; /* used in printf */ - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); - bytes = sizeof_rsa_key_der_1024; - rsaKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); - bytes = sizeof_rsa_key_der_2048; -#else - FILE* file = fopen(certRSAname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); - return; - } - - bytes = fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - -#ifdef HAVE_CAVIUM - if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) - printf("RSA init cavium failed\n"); -#endif - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - InitRsaKey(&rsaKey, 0); - ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); - - start = current_time(1); - - for (i = 0; i < times; i++) - ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d encryption took %6.2f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, times); - - if (ret < 0) { - printf("Rsa Public Encrypt failed\n"); - return; - } - - start = current_time(1); - - for (i = 0; i < times; i++) { - byte out[512]; /* for up to 4096 bit */ - RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); - } - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d decryption took %6.2f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, times); - - FreeRsaKey(&rsaKey); -#ifdef HAVE_CAVIUM - RsaFreeCavium(&rsaKey); -#endif -} -#endif - - -#ifndef NO_DH - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certDHname = "certs/dh2048.der" ; -void set_Bench_DH_File(char * cert) { certDHname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certDHname = "certs/dh2048.der" ; -#endif - -void bench_dh(void) -{ - int i, ret; - byte tmp[1024]; - size_t bytes; - word32 idx = 0, pubSz, privSz, pubSz2, privSz2, agreeSz; - - byte pub[256]; /* for 2048 bit */ - byte priv[256]; /* for 2048 bit */ - byte pub2[256]; /* for 2048 bit */ - byte priv2[256]; /* for 2048 bit */ - byte agree[256]; /* for 2048 bit */ - - double start, total, each, milliEach; - DhKey dhKey; - int dhKeySz = 2048; /* used in printf */ - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); - bytes = sizeof_dh_key_der_1024; - dhKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); - bytes = sizeof_dh_key_der_2048; -#else - FILE* file = fopen(certDHname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); - return; - } - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - bytes = fread(tmp, 1, sizeof(tmp), file); -#endif /* USE_CERT_BUFFERS */ - - - InitDhKey(&dhKey); - bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); - if (bytes != 0) { - printf("dhekydecode failed, can't benchmark\n"); - #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); - #endif - return; - } - - start = current_time(1); - - for (i = 0; i < times; i++) - DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key generation %6.2f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, times); - - DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); - start = current_time(1); - - for (i = 0; i < times; i++) - DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key agreement %6.2f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, times); - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); -#endif - FreeDhKey(&dhKey); -} -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) -void bench_rsaKeyGen(void) -{ - RsaKey genKey; - double start, total, each, milliEach; - int i; - const int genTimes = 5; - - /* 1024 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 1024, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("RSA 1024 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); - - /* 2048 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 2048, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("RSA 2048 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} -#endif /* CYASSL_KEY_GEN */ - -#ifdef HAVE_ECC -void bench_eccKeyGen(void) -{ - ecc_key genKey; - double start, total, each, milliEach; - int i, ret; - const int genTimes = 5; - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - ecc_make_key(&rng, 32, &genKey); - ecc_free(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("ECC 256 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} - - -void bench_eccKeyAgree(void) -{ - ecc_key genKey, genKey2; - double start, total, each, milliEach; - int i, ret; - const int agreeTimes = 5; - byte shared[1024]; - byte sig[1024]; - byte digest[32]; - word32 x; - - ecc_init(&genKey); - ecc_init(&genKey2); - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - - ret = ecc_make_key(&rng, 32, &genKey); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - ret = ecc_make_key(&rng, 32, &genKey2); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(shared); - ret = ecc_shared_secret(&genKey, &genKey2, shared, &x); - if (ret != 0) { - printf("ecc_shared_secret failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DHE key agreement %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - /* make dummy digest */ - for (i = 0; i < (int)sizeof(digest); i++) - digest[i] = i; - - - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(sig); - ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); - if (ret != 0) { - printf("ecc_sign_hash failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DSA sign time %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - int verify = 0; - ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &genKey); - if (ret != 0) { - printf("ecc_verify_hash failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DSA verify time %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - ecc_free(&genKey2); - ecc_free(&genKey); -} -#endif /* HAVE_ECC */ - - -#ifdef _WIN32 - - #define WIN32_LEAN_AND_MEAN - #include - - double current_time(int reset) - { - (void)reset; - - static int init = 0; - static LARGE_INTEGER freq; - - LARGE_INTEGER count; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = 1; - } - - QueryPerformanceCounter(&count); - - return (double)count.QuadPart / freq.QuadPart; - } - -#elif defined MICROCHIP_PIC32 - - #include - - double current_time(int reset) - { - /* NOTE: core timer tick rate = 40 Mhz, 1 tick = 25 ns */ - - unsigned int ns; - - /* should we reset our timer back to zero? Helps prevent timer - rollover */ - - if (reset) { - WriteCoreTimer(0); - } - - /* get timer in ns */ - ns = ReadCoreTimer() * 25; - - /* return seconds as a double */ - return ( ns / 1000000000.0 ); - } - -#elif defined CYASSL_MDK_ARM - extern double current_time(int reset) ; -#else - - #include - - double current_time(int reset) - { - (void) reset; - - struct timeval tv; - gettimeofday(&tv, 0); - - return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; - } - -#endif /* _WIN32 */ - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c deleted file mode 100644 index 2786027b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c +++ /dev/null @@ -1,71 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include "cmsis_os.h" -#include "rl_fs.h" - -#include - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -static void init_filesystem (void) { - int32_t retv; - - retv = finit ("M0:"); - if (retv == 0) { - retv = fmount ("M0:"); - if (retv == 0) { - printf ("Drive M0 ready!\n"); - } - else { - printf ("Drive M0 mount failed!\n"); - } - } - else { - printf ("Drive M0 initialization failed!\n"); - } -} -extern void benchmark_test(void * arg) ; -extern void init_time(void) ; - -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ - -int main() -{ - void * arg = NULL ; - - init_time() ; - init_filesystem (); - printf("=== Start: Crypt Benchmark ===\n") ; - benchmark_test(arg) ; - printf("=== End: Crypt Benchmark ===\n") ; - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt deleted file mode 100644 index 5d4a8312..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/Abstract.txt +++ /dev/null @@ -1,16 +0,0 @@ -This program is a simple test suite of wolfCrypt library. - -In order to run this test suite, copy -{PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. - -For test configuration, refer config-Crypt.h. - -For the hardware crypt on config-Crypt.h, download -STSW-STM32062: STM32F2xx standard peripherals library at -http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to - {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib - - - Support -------- -Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx deleted file mode 100644 index a7474ba7..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvoptx +++ /dev/null @@ -1,1094 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - CryptTest - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - tmp - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\test.c - test.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 4 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 5 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 6 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 9 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 10 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 11 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 12 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 13 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 15 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 8 - 16 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 8 - 17 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c - ssl-dummy.c - 1 - 0 - - - 8 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 8 - 19 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 8 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 8 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 8 - 22 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 8 - 23 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 8 - 24 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 8 - 25 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 8 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 8 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 8 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 8 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 8 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 8 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 8 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 8 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 8 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 8 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 8 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 8 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 8 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 8 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 8 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 8 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 8 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 8 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 8 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 8 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 8 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 8 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 8 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 8 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 8 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 8 - 51 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 8 - 52 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config.h - config.h - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx deleted file mode 100644 index 6db3f16f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/CryptTest.uvprojx +++ /dev/null @@ -1,919 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - CryptTest - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - CryptTest - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_CryptTest CYASSL_STM32F2xx __DBG_ITM - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - test.c - 1 - .\test.c - - - - - Configuration - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::wolfSSL - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - ssl-dummy.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\ssl-dummy.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config.h - 5 - RTE\wolfSSL\config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - RTE\Network\Net_Debug.c - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-FS.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index 31dd53c7..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 6 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 50 -#endif - -// Main Thread stack size [bytes] <64-10000:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 2000 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 0 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-4096:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 0 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-4096:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 2648e44d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 0 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index c31ce199..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00001000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00009000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h deleted file mode 100644 index 4d1a6372..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/RTE/RTE_Components.h +++ /dev/null @@ -1,19 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'CryptTest' - * Target: 'CryptTest' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c deleted file mode 100644 index 8684553c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/main.c +++ /dev/null @@ -1,71 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include "cmsis_os.h" -#include "rl_fs.h" - -#include - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -static void init_filesystem (void) { - int32_t retv; - - retv = finit ("M0:"); - if (retv == 0) { - retv = fmount ("M0:"); - if (retv == 0) { - printf ("Drive M0 ready!\n"); - } - else { - printf ("Drive M0 mount failed!\n"); - } - } - else { - printf ("Drive M0 initialization failed!\n"); - } -} -extern void ctaocrypt_test(void * arg) ; -extern void init_time(void) ; - -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ - -int main() -{ - void * arg = NULL ; - - init_time() ; - init_filesystem (); - printf("=== Start: Crypt test ===\n") ; - ctaocrypt_test(arg) ; - printf("=== End: Crypt test ===\n") ; - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c deleted file mode 100644 index 44d043b3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CryptTest/test.c +++ /dev/null @@ -1,3712 +0,0 @@ -/* test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_CRYPT_TEST - -#ifdef CYASSL_TEST_CERT - #include -#else - #include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_ECC - #include -#endif -#ifdef HAVE_BLAKE2 - #include -#endif -#ifdef HAVE_LIBZ - #include -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -#ifdef OPENSSL_EXTRA - #include - #include - #include - #include -#endif - - -#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) - /* include test cert and key buffers for use with NO_FILESYSTEM */ - #if defined(CYASSL_MDK_ARM) - #include "cert_data.h" - /* use certs_test.c for initial data, so other - commands can share the data. */ - #else - #include - #endif -#endif - -#if defined(CYASSL_MDK_ARM) - #include - #include - extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; - #define fopen CyaSSL_fopen -#endif - -#ifdef HAVE_NTRU - #include "crypto_ntru.h" -#endif -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif - -#ifdef FREESCALE_MQX - #include - #include - #include -#else - #include -#endif - - -#ifdef THREADX - /* since just testing, use THREADX log printf instead */ - int dc_log_printf(char*, ...); - #undef printf - #define printf dc_log_printf -#endif - -#include "ctaocrypt/test/test.h" - - -typedef struct testVector { - const char* input; - const char* output; - size_t inLen; - size_t outLen; -} testVector; - -int md2_test(void); -int md5_test(void); -int md4_test(void); -int sha_test(void); -int sha256_test(void); -int sha512_test(void); -int sha384_test(void); -int hmac_md5_test(void); -int hmac_sha_test(void); -int hmac_sha256_test(void); -int hmac_sha384_test(void); -int hmac_sha512_test(void); -int hmac_blake2b_test(void); -int hkdf_test(void); -int arc4_test(void); -int hc128_test(void); -int rabbit_test(void); -int des_test(void); -int des3_test(void); -int aes_test(void); -int aesgcm_test(void); -int gmac_test(void); -int aesccm_test(void); -int camellia_test(void); -int rsa_test(void); -int dh_test(void); -int dsa_test(void); -int random_test(void); -int pwdbased_test(void); -int ripemd_test(void); -int openssl_test(void); /* test mini api */ -int pbkdf1_test(void); -int pkcs12_test(void); -int pbkdf2_test(void); -#ifdef HAVE_ECC - int ecc_test(void); -#endif -#ifdef HAVE_BLAKE2 - int blake2b_test(void); -#endif -#ifdef HAVE_LIBZ - int compress_test(void); -#endif - - - -static void err_sys(const char* msg, int es) -{ - printf("%s error = %d\n", msg, es); - #if !defined(THREADX) && !defined(CYASSL_MDK_ARM) - if (msg) - exit(es); - #endif - return; -} - -/* func_args from test.h, so don't have to pull in other junk */ -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - - - -void ctaocrypt_test(void* args) -{ - int ret = 0; - - ((func_args*)args)->return_code = -1; /* error state */ - -#if !defined(NO_BIG_INT) - if (CheckCtcSettings() != 1) - err_sys("Build vs runtime math mismatch\n", -1234); - -#ifdef USE_FAST_MATH - if (CheckFastMathSettings() != 1) - err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235); -#endif /* USE_FAST_MATH */ -#endif /* !NO_BIG_INT */ - - -#ifndef NO_MD5 - if ( (ret = md5_test()) != 0) - err_sys("MD5 test failed!\n", ret); - else - printf( "MD5 test passed!\n"); -#endif - -#ifdef CYASSL_MD2 - if ( (ret = md2_test()) != 0) - err_sys("MD2 test failed!\n", ret); - else - printf( "MD2 test passed!\n"); -#endif - -#ifndef NO_MD4 - if ( (ret = md4_test()) != 0) - err_sys("MD4 test failed!\n", ret); - else - printf( "MD4 test passed!\n"); -#endif - -#ifndef NO_SHA - if ( (ret = sha_test()) != 0) - err_sys("SHA test failed!\n", ret); - else - printf( "SHA test passed!\n"); -#endif - -#ifndef NO_SHA256 - if ( (ret = sha256_test()) != 0) - err_sys("SHA-256 test failed!\n", ret); - else - printf( "SHA-256 test passed!\n"); -#endif - -#ifdef CYASSL_SHA384 - if ( (ret = sha384_test()) != 0) - err_sys("SHA-384 test failed!\n", ret); - else - printf( "SHA-384 test passed!\n"); -#endif - -#ifdef CYASSL_SHA512 - if ( (ret = sha512_test()) != 0) - err_sys("SHA-512 test failed!\n", ret); - else - printf( "SHA-512 test passed!\n"); -#endif - -#ifdef CYASSL_RIPEMD - if ( (ret = ripemd_test()) != 0) - err_sys("RIPEMD test failed!\n", ret); - else - printf( "RIPEMD test passed!\n"); -#endif - -#ifdef HAVE_BLAKE2 - if ( (ret = blake2b_test()) != 0) - err_sys("BLAKE2b test failed!\n", ret); - else - printf( "BLAKE2b test passed!\n"); -#endif - -#ifndef NO_HMAC - #ifndef NO_MD5 - if ( (ret = hmac_md5_test()) != 0) - err_sys("HMAC-MD5 test failed!\n", ret); - else - printf( "HMAC-MD5 test passed!\n"); - #endif - - #ifndef NO_SHA - if ( (ret = hmac_sha_test()) != 0) - err_sys("HMAC-SHA test failed!\n", ret); - else - printf( "HMAC-SHA test passed!\n"); - #endif - - #ifndef NO_SHA256 - if ( (ret = hmac_sha256_test()) != 0) - err_sys("HMAC-SHA256 test failed!\n", ret); - else - printf( "HMAC-SHA256 test passed!\n"); - #endif - - #ifdef CYASSL_SHA384 - if ( (ret = hmac_sha384_test()) != 0) - err_sys("HMAC-SHA384 test failed!\n", ret); - else - printf( "HMAC-SHA384 test passed!\n"); - #endif - - #ifdef CYASSL_SHA512 - if ( (ret = hmac_sha512_test()) != 0) - err_sys("HMAC-SHA512 test failed!\n", ret); - else - printf( "HMAC-SHA512 test passed!\n"); - #endif - - #ifdef HAVE_BLAKE2 - if ( (ret = hmac_blake2b_test()) != 0) - err_sys("HMAC-BLAKE2 test failed!\n", ret); - else - printf( "HMAC-BLAKE2 test passed!\n"); - #endif - - #ifdef HAVE_HKDF - if ( (ret = hkdf_test()) != 0) - err_sys("HMAC-KDF test failed!\n", ret); - else - printf( "HMAC-KDF test passed!\n"); - #endif - -#endif - -#ifdef HAVE_AESGCM - if ( (ret = gmac_test()) != 0) - err_sys("GMAC test passed!\n", ret); - else - printf( "GMAC test passed!\n"); -#endif - -#ifndef NO_RC4 - if ( (ret = arc4_test()) != 0) - err_sys("ARC4 test failed!\n", ret); - else - printf( "ARC4 test passed!\n"); -#endif - -#ifndef NO_HC128 - if ( (ret = hc128_test()) != 0) - err_sys("HC-128 test failed!\n", ret); - else - printf( "HC-128 test passed!\n"); -#endif - -#ifndef NO_RABBIT - if ( (ret = rabbit_test()) != 0) - err_sys("Rabbit test failed!\n", ret); - else - printf( "Rabbit test passed!\n"); -#endif - -#ifndef NO_DES3 - if ( (ret = des_test()) != 0) - err_sys("DES test failed!\n", ret); - else - printf( "DES test passed!\n"); -#endif - -#ifndef NO_DES3 - if ( (ret = des3_test()) != 0) - err_sys("DES3 test failed!\n", ret); - else - printf( "DES3 test passed!\n"); -#endif - -#ifndef NO_AES - if ( (ret = aes_test()) != 0) - err_sys("AES test failed!\n", ret); - else - printf( "AES test passed!\n"); - -#ifdef HAVE_AESGCM - if ( (ret = aesgcm_test()) != 0) - err_sys("AES-GCM test failed!\n", ret); - else - printf( "AES-GCM test passed!\n"); -#endif - -#ifdef HAVE_AESCCM - if ( (ret = aesccm_test()) != 0) - err_sys("AES-CCM test failed!\n", ret); - else - printf( "AES-CCM test passed!\n"); -#endif -#endif - -#ifdef HAVE_CAMELLIA - if ( (ret = camellia_test()) != 0) - err_sys("CAMELLIA test failed!\n", ret); - else - printf( "CAMELLIA test passed!\n"); -#endif - - if ( (ret = random_test()) != 0) - err_sys("RANDOM test failed!\n", ret); - else - printf( "RANDOM test passed!\n"); - -#ifndef NO_RSA - if ( (ret = rsa_test()) != 0) - err_sys("RSA test failed!\n", ret); - else - printf( "RSA test passed!\n"); -#endif - -#ifndef NO_DH - if ( (ret = dh_test()) != 0) - err_sys("DH test failed!\n", ret); - else - printf( "DH test passed!\n"); -#endif - -#ifndef NO_DSA - if ( (ret = dsa_test()) != 0) - err_sys("DSA test failed!\n", ret); - else - printf( "DSA test passed!\n"); -#endif - -#ifndef NO_PWDBASED - if ( (ret = pwdbased_test()) != 0) - err_sys("PWDBASED test failed!\n", ret); - else - printf( "PWDBASED test passed!\n"); -#endif - -#ifdef OPENSSL_EXTRA - if ( (ret = openssl_test()) != 0) - err_sys("OPENSSL test failed!\n", ret); - else - printf( "OPENSSL test passed!\n"); -#endif - -#ifdef HAVE_ECC - if ( (ret = ecc_test()) != 0) - err_sys("ECC test failed!\n", ret); - else - printf( "ECC test passed!\n"); -#endif - -#ifdef HAVE_LIBZ - if ( (ret = compress_test()) != 0) - err_sys("COMPRESS test failed!\n", ret); - else - printf( "COMPRESS test passed!\n"); -#endif - - ((func_args*)args)->return_code = ret; -} - - -#ifndef NO_MAIN_DRIVER - -#ifdef HAVE_CAVIUM - -static int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif /* HAVE_CAVIUM */ - - /* so overall tests can pull in test function */ - - int main(int argc, char** argv) - { - - func_args args; - - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed", -1236); -#endif /* HAVE_CAVIUM */ - - args.argc = argc; - args.argv = argv; - - ctaocrypt_test(&args); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - - return args.return_code; - } - -#endif /* NO_MAIN_DRIVER */ - - -#ifdef CYASSL_MD2 -int md2_test() -{ - Md2 md2; - byte hash[MD2_DIGEST_SIZE]; - - testVector a, b, c, d, e, f, g; - testVector test_md2[7]; - int times = sizeof(test_md2) / sizeof(testVector), i; - - a.input = ""; - a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69" - "\x27\x73"; - a.inLen = strlen(a.input); - a.outLen = MD2_DIGEST_SIZE; - - b.input = "a"; - b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0" - "\xb5\xd1"; - b.inLen = strlen(b.input); - b.outLen = MD2_DIGEST_SIZE; - - c.input = "abc"; - c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde" - "\xd6\xbb"; - c.inLen = strlen(c.input); - c.outLen = MD2_DIGEST_SIZE; - - d.input = "message digest"; - d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe" - "\x06\xb0"; - d.inLen = strlen(d.input); - d.outLen = MD2_DIGEST_SIZE; - - e.input = "abcdefghijklmnopqrstuvwxyz"; - e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47" - "\x94\x0b"; - e.inLen = strlen(e.input); - e.outLen = MD2_DIGEST_SIZE; - - f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03" - "\x38\xcd"; - f.inLen = strlen(f.input); - f.outLen = MD2_DIGEST_SIZE; - - g.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3" - "\xef\xd8"; - g.inLen = strlen(g.input); - g.outLen = MD2_DIGEST_SIZE; - - test_md2[0] = a; - test_md2[1] = b; - test_md2[2] = c; - test_md2[3] = d; - test_md2[4] = e; - test_md2[5] = f; - test_md2[6] = g; - - InitMd2(&md2); - - for (i = 0; i < times; ++i) { - Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen); - Md2Final(&md2, hash); - - if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0) - return -155 - i; - } - - return 0; -} -#endif - -#ifndef NO_MD5 -int md5_test(void) -{ - Md5 md5; - byte hash[MD5_DIGEST_SIZE]; - - testVector a, b, c, d, e; - testVector test_md5[5]; - int times = sizeof(test_md5) / sizeof(testVector), i; - - a.input = "abc"; - a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" - "\x72"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - b.input = "message digest"; - b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" - "\xd0"; - b.inLen = strlen(b.input); - b.outLen = MD5_DIGEST_SIZE; - - c.input = "abcdefghijklmnopqrstuvwxyz"; - c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" - "\x3b"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" - "\x9f"; - d.inLen = strlen(d.input); - d.outLen = MD5_DIGEST_SIZE; - - e.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" - "\x7a"; - e.inLen = strlen(e.input); - e.outLen = MD5_DIGEST_SIZE; - - test_md5[0] = a; - test_md5[1] = b; - test_md5[2] = c; - test_md5[3] = d; - test_md5[4] = e; - - InitMd5(&md5); - - for (i = 0; i < times; ++i) { - Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); - Md5Final(&md5, hash); - - if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) - return -5 - i; - } - - return 0; -} -#endif /* NO_MD5 */ - - -#ifndef NO_MD4 - -int md4_test(void) -{ - Md4 md4; - byte hash[MD4_DIGEST_SIZE]; - - testVector a, b, c, d, e, f, g; - testVector test_md4[7]; - int times = sizeof(test_md4) / sizeof(testVector), i; - - a.input = ""; - a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" - "\xc0"; - a.inLen = strlen(a.input); - a.outLen = MD4_DIGEST_SIZE; - - b.input = "a"; - b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" - "\x24"; - b.inLen = strlen(b.input); - b.outLen = MD4_DIGEST_SIZE; - - c.input = "abc"; - c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" - "\x9d"; - c.inLen = strlen(c.input); - c.outLen = MD4_DIGEST_SIZE; - - d.input = "message digest"; - d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" - "\x4b"; - d.inLen = strlen(d.input); - d.outLen = MD4_DIGEST_SIZE; - - e.input = "abcdefghijklmnopqrstuvwxyz"; - e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" - "\xa9"; - e.inLen = strlen(e.input); - e.outLen = MD4_DIGEST_SIZE; - - f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" - "\xe4"; - f.inLen = strlen(f.input); - f.outLen = MD4_DIGEST_SIZE; - - g.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" - "\x36"; - g.inLen = strlen(g.input); - g.outLen = MD4_DIGEST_SIZE; - - test_md4[0] = a; - test_md4[1] = b; - test_md4[2] = c; - test_md4[3] = d; - test_md4[4] = e; - test_md4[5] = f; - test_md4[6] = g; - - InitMd4(&md4); - - for (i = 0; i < times; ++i) { - Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); - Md4Final(&md4, hash); - - if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) - return -205 - i; - } - - return 0; -} - -#endif /* NO_MD4 */ - -#ifndef NO_SHA - -int sha_test(void) -{ - Sha sha; - byte hash[SHA_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_sha[4]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" - "\x6C\x9C\xD0\xD8\x9D"; - a.inLen = strlen(a.input); - a.outLen = SHA_DIGEST_SIZE; - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" - "\xE5\xE5\x46\x70\xF1"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaa"; - c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" - "\x2A\x25\xEC\x64\x4D"; - c.inLen = strlen(c.input); - c.outLen = SHA_DIGEST_SIZE; - - d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaa"; - d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" - "\x53\x99\x5E\x26\xA0"; - d.inLen = strlen(d.input); - d.outLen = SHA_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - test_sha[2] = c; - test_sha[3] = d; - - InitSha(&sha); - - for (i = 0; i < times; ++i) { - ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); - ShaFinal(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} - -#endif /* NO_SHA */ - -#ifdef CYASSL_RIPEMD -int ripemd_test(void) -{ - RipeMd ripemd; - byte hash[RIPEMD_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_ripemd[4]; - int times = sizeof(test_ripemd) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" - "\xb0\x87\xf1\x5a\x0b\xfc"; - a.inLen = strlen(a.input); - a.outLen = RIPEMD_DIGEST_SIZE; - - b.input = "message digest"; - b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" - "\x5f\xfa\x21\x59\x5f\x36"; - b.inLen = strlen(b.input); - b.outLen = RIPEMD_DIGEST_SIZE; - - c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" - "\xf4\x9a\xda\x62\xeb\x2b"; - c.inLen = strlen(c.input); - c.outLen = RIPEMD_DIGEST_SIZE; - - d.input = "12345678901234567890123456789012345678901234567890123456" - "789012345678901234567890"; - d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" - "\x82\xbf\x63\x32\x6b\xfb"; - d.inLen = strlen(d.input); - d.outLen = RIPEMD_DIGEST_SIZE; - - test_ripemd[0] = a; - test_ripemd[1] = b; - test_ripemd[2] = c; - test_ripemd[3] = d; - - InitRipeMd(&ripemd); - - for (i = 0; i < times; ++i) { - RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, - (word32)test_ripemd[i].inLen); - RipeMdFinal(&ripemd, hash); - - if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* CYASSL_RIPEMD */ - - -#ifdef HAVE_BLAKE2 - - -#define BLAKE2_TESTS 3 - -static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] = -{ - { - 0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03, - 0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72, - 0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61, - 0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19, - 0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53, - 0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B, - 0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55, - 0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE - }, - { - 0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95, - 0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7, - 0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44, - 0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C, - 0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB, - 0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4, - 0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48, - 0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B - }, - { - 0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9, - 0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72, - 0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF, - 0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15, - 0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB, - 0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04, - 0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1, - 0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5 - } -}; - - - -int blake2b_test(void) -{ - Blake2b b2b; - byte digest[64]; - byte input[64]; - int i; - - for (i = 0; i < (int)sizeof(input); i++) - input[i] = (byte)i; - - for (i = 0; i < BLAKE2_TESTS; i++) { - InitBlake2b(&b2b, 64); - Blake2bUpdate(&b2b, input, i); - Blake2bFinal(&b2b, digest, 64); - - if (memcmp(digest, blake2b_vec[i], 64) != 0) { - return -300 - i; - } - } - - return 0; -} -#endif /* HAVE_BLAKE2 */ - - -#ifndef NO_SHA256 -int sha256_test(void) -{ - Sha256 sha; - byte hash[SHA256_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" - "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" - "\x15\xAD"; - a.inLen = strlen(a.input); - a.outLen = SHA256_DIGEST_SIZE; - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" - "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" - "\x06\xC1"; - b.inLen = strlen(b.input); - b.outLen = SHA256_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - InitSha256(&sha); - - for (i = 0; i < times; ++i) { - Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - Sha256Final(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - - -#ifdef CYASSL_SHA512 -int sha512_test(void) -{ - Sha512 sha; - byte hash[SHA512_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" - "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" - "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" - "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" - "\xa5\x4c\xa4\x9f"; - a.inLen = strlen(a.input); - a.outLen = SHA512_DIGEST_SIZE; - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" - "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" - "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" - "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" - "\x87\x4b\xe9\x09"; - b.inLen = strlen(b.input); - b.outLen = SHA512_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - InitSha512(&sha); - - for (i = 0; i < times; ++i) { - Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - Sha512Final(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - - -#ifdef CYASSL_SHA384 -int sha384_test(void) -{ - Sha384 sha; - byte hash[SHA384_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" - "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" - "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" - "\xc8\x25\xa7"; - a.inLen = strlen(a.input); - a.outLen = SHA384_DIGEST_SIZE; - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" - "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" - "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" - "\x74\x60\x39"; - b.inLen = strlen(b.input); - b.outLen = SHA384_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - InitSha384(&sha); - - for (i = 0; i < times; ++i) { - Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - Sha384Final(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* CYASSL_SHA384 */ - - -#if !defined(NO_HMAC) && !defined(NO_MD5) -int hmac_md5_test(void) -{ - Hmac hmac; - byte hash[MD5_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" - "\x9d"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" - "\x38"; - b.inLen = strlen(b.input); - b.outLen = MD5_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" - "\xf6"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20009; -#endif - HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif /* NO_HMAC && NO_MD5 */ - -#if !defined(NO_HMAC) && !defined(NO_SHA) -int hmac_sha_test(void) -{ - Hmac hmac; - byte hash[SHA_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" - "\x8e\xf1\x46\xbe\x00"; - a.inLen = strlen(a.input); - a.outLen = SHA_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" - "\x9c\x25\x9a\x7c\x79"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" - "\x4f\x63\xf1\x75\xd3"; - c.inLen = strlen(c.input); - c.outLen = SHA_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20010; -#endif - HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && !defined(NO_SHA256) -int hmac_sha256_test(void) -{ - Hmac hmac; - byte hash[SHA256_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" - "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" - "\xcf\xf7"; - a.inLen = strlen(a.input); - a.outLen = SHA256_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" - "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" - "\x38\x43"; - b.inLen = strlen(b.input); - b.outLen = SHA256_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" - "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" - "\x65\xfe"; - c.inLen = strlen(c.input); - c.outLen = SHA256_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20011; -#endif - HmacSetKey(&hmac, SHA256, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(HAVE_BLAKE2) -int hmac_blake2b_test(void) -{ - Hmac hmac; - byte hash[BLAKE2B_256]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x72\x93\x0d\xdd\xf5\xf7\xe1\x78\x38\x07\x44\x18\x0b\x3f\x51" - "\x37\x25\xb5\x82\xc2\x08\x83\x2f\x1c\x99\xfd\x03\xa0\x16\x75" - "\xac\xfd"; - a.inLen = strlen(a.input); - a.outLen = BLAKE2B_256; - - b.input = "what do ya want for nothing?"; - b.output = "\x3d\x20\x50\x71\x05\xc0\x8c\x0c\x38\x44\x1e\xf7\xf9\xd1\x67" - "\x21\xff\x64\xf5\x94\x00\xcf\xf9\x75\x41\xda\x88\x61\x9d\x7c" - "\xda\x2b"; - b.inLen = strlen(b.input); - b.outLen = BLAKE2B_256; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\xda\xfe\x2a\x24\xfc\xe7\xea\x36\x34\xbe\x41\x92\xc7\x11\xa7" - "\x00\xae\x53\x9c\x11\x9c\x80\x74\x55\x22\x25\x4a\xb9\x55\xd3" - "\x0f\x87"; - c.inLen = strlen(c.input); - c.outLen = BLAKE2B_256; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20011; -#endif - HmacSetKey(&hmac, BLAKE2B_ID, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, BLAKE2B_256) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(CYASSL_SHA384) -int hmac_sha384_test(void) -{ - Hmac hmac; - byte hash[SHA384_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" - "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" - "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" - "\xfa\x9c\xb6"; - a.inLen = strlen(a.input); - a.outLen = SHA384_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" - "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" - "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" - "\xb2\x16\x49"; - b.inLen = strlen(b.input); - b.outLen = SHA384_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" - "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" - "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" - "\xa3\x4f\x27"; - c.inLen = strlen(c.input); - c.outLen = SHA384_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - HmacSetKey(&hmac, SHA384, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(CYASSL_SHA512) -int hmac_sha512_test(void) -{ - Hmac hmac; - byte hash[SHA512_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c" - "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1" - "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae" - "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20" - "\x3a\x12\x68\x54"; - a.inLen = strlen(a.input); - a.outLen = SHA512_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0" - "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25" - "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8" - "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a" - "\x38\xbc\xe7\x37"; - b.inLen = strlen(b.input); - b.outLen = SHA512_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b" - "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27" - "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e" - "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59" - "\xe1\x32\x92\xfb"; - c.inLen = strlen(c.input); - c.outLen = SHA512_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - HmacSetKey(&hmac, SHA512, (byte*)keys[i], (word32)strlen(keys[i])); - HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - HmacFinal(&hmac, hash); - - if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - - -#ifndef NO_RC4 -int arc4_test(void) -{ - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x01\x23\x45\x67\x89\xab\xcd\xef", - "\x01\x23\x45\x67\x89\xab\xcd\xef", - "\x00\x00\x00\x00\x00\x00\x00\x00", - "\xef\x01\x23\x45" - }; - - testVector a, b, c, d; - testVector test_arc4[4]; - - int times = sizeof(test_arc4) / sizeof(testVector), i; - - a.input = "\x01\x23\x45\x67\x89\xab\xcd\xef"; - a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a"; - c.inLen = 8; - c.outLen = 8; - - d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61"; - d.inLen = 10; - d.outLen = 10; - - test_arc4[0] = a; - test_arc4[1] = b; - test_arc4[2] = c; - test_arc4[3] = d; - - for (i = 0; i < times; ++i) { - Arc4 enc; - Arc4 dec; - int keylen = 8; /* strlen with key 0x00 not good */ - if (i == 3) - keylen = 4; - -#ifdef HAVE_CAVIUM - if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20001; - if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20002; -#endif - - Arc4SetKey(&enc, (byte*)keys[i], keylen); - Arc4SetKey(&dec, (byte*)keys[i], keylen); - - Arc4Process(&enc, cipher, (byte*)test_arc4[i].input, - (word32)test_arc4[i].outLen); - Arc4Process(&dec, plain, cipher, (word32)test_arc4[i].outLen); - - if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen)) - return -20 - i; - - if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen)) - return -20 - 5 - i; - -#ifdef HAVE_CAVIUM - Arc4FreeCavium(&enc); - Arc4FreeCavium(&dec); -#endif - } - - return 0; -} -#endif - - -int hc128_test(void) -{ -#ifdef HAVE_HC128 - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD", - "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC" - }; - - const char* ivs[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16", - "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31" - }; - - - testVector a, b, c, d; - testVector test_hc128[4]; - - int times = sizeof(test_hc128) / sizeof(testVector), i; - - a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A"; - c.inLen = 8; - c.outLen = 8; - - d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29"; - d.inLen = 15; - d.outLen = 15; - - test_hc128[0] = a; - test_hc128[1] = b; - test_hc128[2] = c; - test_hc128[3] = d; - - for (i = 0; i < times; ++i) { - HC128 enc; - HC128 dec; - - /* align keys/ivs in plain/cipher buffers */ - memcpy(plain, keys[i], 16); - memcpy(cipher, ivs[i], 16); - - Hc128_SetKey(&enc, plain, cipher); - Hc128_SetKey(&dec, plain, cipher); - - /* align input */ - memcpy(plain, test_hc128[i].input, test_hc128[i].outLen); - Hc128_Process(&enc, cipher, plain, (word32)test_hc128[i].outLen); - Hc128_Process(&dec, plain, cipher, (word32)test_hc128[i].outLen); - - if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen)) - return -120 - i; - - if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen)) - return -120 - 5 - i; - } - -#endif /* HAVE_HC128 */ - return 0; -} - - -#ifndef NO_RABBIT -int rabbit_test(void) -{ - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91" - }; - - const char* ivs[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00", - "\x59\x7E\x26\xC1\x75\xF5\x73\xC3", - 0 - }; - - testVector a, b, c; - testVector test_rabbit[3]; - - int times = sizeof(test_rabbit) / sizeof(testVector), i; - - a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\x04\xCE\xCA\x7A\x1A\x86\x6E\x77"; - c.inLen = 8; - c.outLen = 8; - - test_rabbit[0] = a; - test_rabbit[1] = b; - test_rabbit[2] = c; - - for (i = 0; i < times; ++i) { - Rabbit enc; - Rabbit dec; - byte* iv; - - /* align keys/ivs in plain/cipher buffers */ - memcpy(plain, keys[i], 16); - if (ivs[i]) { - memcpy(cipher, ivs[i], 8); - iv = cipher; - } else - iv = NULL; - RabbitSetKey(&enc, plain, iv); - RabbitSetKey(&dec, plain, iv); - - /* align input */ - memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen); - RabbitProcess(&enc, cipher, plain, (word32)test_rabbit[i].outLen); - RabbitProcess(&dec, plain, cipher, (word32)test_rabbit[i].outLen); - - if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen)) - return -130 - i; - - if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen)) - return -130 - 5 - i; - } - - return 0; -} -#endif /* NO_RABBIT */ - - -#ifndef NO_DES3 -int des_test(void) -{ - const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - Des enc; - Des dec; - - const byte key[] = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef - }; - - const byte iv[] = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef - }; - - const byte verify[] = - { - 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, - 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, - 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b - }; - - - Des_SetKey(&enc, key, iv, DES_ENCRYPTION); - Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); - Des_SetKey(&dec, key, iv, DES_DECRYPTION); - Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); - - if (memcmp(plain, vector, sizeof(plain))) - return -31; - - if (memcmp(cipher, verify, sizeof(cipher))) - return -32; - - return 0; -} -#endif /* NO_DES3 */ - - -#ifndef NO_DES3 -int des3_test(void) -{ - const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - Des3 enc; - Des3 dec; - - const byte key3[] = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, - 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 - }; - const byte iv3[] = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 - - }; - - const byte verify3[] = - { - 0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e, - 0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98, - 0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0 - }; - - -#ifdef HAVE_CAVIUM - if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20005; - if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20006; -#endif - Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION); - Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION); - Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); - Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); - - if (memcmp(plain, vector, sizeof(plain))) - return -33; - - if (memcmp(cipher, verify3, sizeof(cipher))) - return -34; - -#ifdef HAVE_CAVIUM - Des3_FreeCavium(&enc); - Des3_FreeCavium(&dec); -#endif - return 0; -} -#endif /* NO_DES */ - - -#ifndef NO_AES -int aes_test(void) -{ - Aes enc; - Aes dec; - - const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - const byte verify[] = - { - 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, - 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb - }; - - byte key[] = "0123456789abcdef "; /* align */ - byte iv[] = "1234567890abcdef "; /* align */ - - byte cipher[AES_BLOCK_SIZE * 4]; - byte plain [AES_BLOCK_SIZE * 4]; - -#ifdef HAVE_CAVIUM - if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20003; - if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20004; -#endif - AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); - AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION); - - AesCbcEncrypt(&enc, cipher, msg, AES_BLOCK_SIZE); - AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE); - - if (memcmp(plain, msg, AES_BLOCK_SIZE)) - return -60; - - if (memcmp(cipher, verify, AES_BLOCK_SIZE)) - return -61; - -#ifdef HAVE_CAVIUM - AesFreeCavium(&enc); - AesFreeCavium(&dec); -#endif -#ifdef CYASSL_AES_COUNTER - { - const byte ctrKey[] = - { - 0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6, - 0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c - }; - - const byte ctrIv[] = - { - 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, - 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff - }; - - - const byte ctrPlain[] = - { - 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, - 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, - 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, - 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, - 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11, - 0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef, - 0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17, - 0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10 - }; - - const byte ctrCipher[] = - { - 0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26, - 0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce, - 0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff, - 0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff, - 0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e, - 0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab, - 0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1, - 0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee - }; - - AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - /* Ctr only uses encrypt, even on key setup */ - AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - - AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4); - AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4); - - if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4)) - return -66; - - if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4)) - return -67; - } -#endif /* CYASSL_AES_COUNTER */ - -#if defined(CYASSL_AESNI) && defined(CYASSL_AES_DIRECT) - { - const byte niPlain[] = - { - 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, - 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a - }; - - const byte niCipher[] = - { - 0xf3,0xee,0xd1,0xbd,0xb5,0xd2,0xa0,0x3c, - 0x06,0x4b,0x5a,0x7e,0x3d,0xb1,0x81,0xf8 - }; - - const byte niKey[] = - { - 0x60,0x3d,0xeb,0x10,0x15,0xca,0x71,0xbe, - 0x2b,0x73,0xae,0xf0,0x85,0x7d,0x77,0x81, - 0x1f,0x35,0x2c,0x07,0x3b,0x61,0x08,0xd7, - 0x2d,0x98,0x10,0xa3,0x09,0x14,0xdf,0xf4 - }; - - XMEMSET(cipher, 0, AES_BLOCK_SIZE); - AesSetKey(&enc, niKey, sizeof(niKey), cipher, AES_ENCRYPTION); - AesEncryptDirect(&enc, cipher, niPlain); - if (XMEMCMP(cipher, niCipher, AES_BLOCK_SIZE) != 0) - return -20006; - - XMEMSET(plain, 0, AES_BLOCK_SIZE); - AesSetKey(&dec, niKey, sizeof(niKey), plain, AES_DECRYPTION); - AesDecryptDirect(&dec, plain, niCipher); - if (XMEMCMP(plain, niPlain, AES_BLOCK_SIZE) != 0) - return -20007; - } -#endif /* CYASSL_AESNI && CYASSL_AES_DIRECT */ - - return 0; -} - -#ifdef HAVE_AESGCM -int aesgcm_test(void) -{ - Aes enc; - - /* - * This is Test Case 16 from the document Galois/ - * Counter Mode of Operation (GCM) by McGrew and - * Viega. - */ - const byte k[] = - { - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 - }; - - const byte iv[] = - { - 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, - 0xde, 0xca, 0xf8, 0x88 - }; - - const byte p[] = - { - 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, - 0xba, 0x63, 0x7b, 0x39 - }; - - const byte a[] = - { - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xab, 0xad, 0xda, 0xd2 - }; - - const byte c[] = - { - 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62 - }; - - const byte t[] = - { - 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, - 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b - }; - - byte t2[sizeof(t)]; - byte p2[sizeof(c)]; - byte c2[sizeof(p)]; - - int result; - - memset(t2, 0, sizeof(t2)); - memset(c2, 0, sizeof(c2)); - memset(p2, 0, sizeof(p2)); - - AesGcmSetKey(&enc, k, sizeof(k)); - /* AES-GCM encrypt and decrypt both use AES encrypt internally */ - AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (memcmp(c, c2, sizeof(c2))) - return -68; - if (memcmp(t, t2, sizeof(t2))) - return -69; - - result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result != 0) - return -70; - if (memcmp(p, p2, sizeof(p2))) - return -71; - - return 0; -} - -int gmac_test(void) -{ - Gmac gmac; - - const byte k1[] = - { - 0x89, 0xc9, 0x49, 0xe9, 0xc8, 0x04, 0xaf, 0x01, - 0x4d, 0x56, 0x04, 0xb3, 0x94, 0x59, 0xf2, 0xc8 - }; - const byte iv1[] = - { - 0xd1, 0xb1, 0x04, 0xc8, 0x15, 0xbf, 0x1e, 0x94, - 0xe2, 0x8c, 0x8f, 0x16 - }; - const byte a1[] = - { - 0x82, 0xad, 0xcd, 0x63, 0x8d, 0x3f, 0xa9, 0xd9, - 0xf3, 0xe8, 0x41, 0x00, 0xd6, 0x1e, 0x07, 0x77 - }; - const byte t1[] = - { - 0x88, 0xdb, 0x9d, 0x62, 0x17, 0x2e, 0xd0, 0x43, - 0xaa, 0x10, 0xf1, 0x6d, 0x22, 0x7d, 0xc4, 0x1b - }; - - const byte k2[] = - { - 0x40, 0xf7, 0xec, 0xb2, 0x52, 0x6d, 0xaa, 0xd4, - 0x74, 0x25, 0x1d, 0xf4, 0x88, 0x9e, 0xf6, 0x5b - }; - const byte iv2[] = - { - 0xee, 0x9c, 0x6e, 0x06, 0x15, 0x45, 0x45, 0x03, - 0x1a, 0x60, 0x24, 0xa7 - }; - const byte a2[] = - { - 0x94, 0x81, 0x2c, 0x87, 0x07, 0x4e, 0x15, 0x18, - 0x34, 0xb8, 0x35, 0xaf, 0x1c, 0xa5, 0x7e, 0x56 - }; - const byte t2[] = - { - 0xc6, 0x81, 0x79, 0x8e, 0x3d, 0xda, 0xb0, 0x9f, - 0x8d, 0x83, 0xb0, 0xbb, 0x14, 0xb6, 0x91 - }; - - const byte k3[] = - { - 0xb8, 0xe4, 0x9a, 0x5e, 0x37, 0xf9, 0x98, 0x2b, - 0xb9, 0x6d, 0xd0, 0xc9, 0xb6, 0xab, 0x26, 0xac - }; - const byte iv3[] = - { - 0xe4, 0x4a, 0x42, 0x18, 0x8c, 0xae, 0x94, 0x92, - 0x6a, 0x9c, 0x26, 0xb0 - }; - const byte a3[] = - { - 0x9d, 0xb9, 0x61, 0x68, 0xa6, 0x76, 0x7a, 0x31, - 0xf8, 0x29, 0xe4, 0x72, 0x61, 0x68, 0x3f, 0x8a - }; - const byte t3[] = - { - 0x23, 0xe2, 0x9f, 0x66, 0xe4, 0xc6, 0x52, 0x48 - }; - - byte tag[16]; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k1, sizeof(k1)); - GmacUpdate(&gmac, iv1, sizeof(iv1), a1, sizeof(a1), tag, sizeof(t1)); - if (memcmp(t1, tag, sizeof(t1)) != 0) - return -126; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k2, sizeof(k2)); - GmacUpdate(&gmac, iv2, sizeof(iv2), a2, sizeof(a2), tag, sizeof(t2)); - if (memcmp(t2, tag, sizeof(t2)) != 0) - return -127; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k3, sizeof(k3)); - GmacUpdate(&gmac, iv3, sizeof(iv3), a3, sizeof(a3), tag, sizeof(t3)); - if (memcmp(t3, tag, sizeof(t3)) != 0) - return -128; - - return 0; -} -#endif /* HAVE_AESGCM */ - -#ifdef HAVE_AESCCM -int aesccm_test(void) -{ - Aes enc; - - /* key */ - const byte k[] = - { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf - }; - - /* nonce */ - const byte iv[] = - { - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0, - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5 - }; - - /* plaintext */ - const byte p[] = - { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e - }; - - const byte a[] = - { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - - const byte c[] = - { - 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2, - 0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80, - 0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84 - }; - - const byte t[] = - { - 0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 - }; - - byte t2[sizeof(t)]; - byte p2[sizeof(p)]; - byte c2[sizeof(c)]; - - int result; - - memset(t2, 0, sizeof(t2)); - memset(c2, 0, sizeof(c2)); - memset(p2, 0, sizeof(p2)); - - AesCcmSetKey(&enc, k, sizeof(k)); - /* AES-CCM encrypt and decrypt both use AES encrypt internally */ - AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (memcmp(c, c2, sizeof(c2))) - return -107; - if (memcmp(t, t2, sizeof(t2))) - return -108; - - result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result != 0) - return -109; - if (memcmp(p, p2, sizeof(p2))) - return -110; - - /* Test the authentication failure */ - t2[0]++; /* Corrupt the authentication tag. */ - result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result == 0) - return -111; - - /* Clear c2 to compare against p2. p2 should be set to zero in case of - * authentication fail. */ - memset(c2, 0, sizeof(c2)); - if (memcmp(p2, c2, sizeof(p2))) - return -112; - - return 0; -} -#endif /* HAVE_AESCCM */ - - -#endif /* NO_AES */ - - -#ifdef HAVE_CAMELLIA - -enum { - CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC -}; - -typedef struct { - int type; - const byte* plaintext; - const byte* iv; - const byte* ciphertext; - const byte* key; - word32 keySz; - int errorCode; -} test_vector_t; - -int camellia_test(void) -{ - /* Camellia ECB Test Plaintext */ - static const byte pte[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 - }; - - /* Camellia ECB Test Initialization Vector */ - static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - - /* Test 1: Camellia ECB 128-bit key */ - static const byte k1[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 - }; - static const byte c1[] = - { - 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, - 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 - }; - - /* Test 2: Camellia ECB 192-bit key */ - static const byte k2[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 - }; - static const byte c2[] = - { - 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, - 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 - }; - - /* Test 3: Camellia ECB 256-bit key */ - static const byte k3[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff - }; - static const byte c3[] = - { - 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, - 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 - }; - - /* Camellia CBC Test Plaintext */ - static const byte ptc[] = - { - 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A - }; - - /* Camellia CBC Test Initialization Vector */ - static const byte ivc[] = - { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F - }; - - /* Test 4: Camellia-CBC 128-bit key */ - static const byte k4[] = - { - 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C - }; - static const byte c4[] = - { - 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, - 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB - }; - - /* Test 5: Camellia-CBC 192-bit key */ - static const byte k5[] = - { - 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B - }; - static const byte c5[] = - { - 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, - 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 - }; - - /* Test 6: CBC 256-bit key */ - static const byte k6[] = - { - 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 - }; - static const byte c6[] = - { - 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, - 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA - }; - - byte out[CAMELLIA_BLOCK_SIZE]; - Camellia cam; - int i, testsSz; - const test_vector_t testVectors[] = - { - {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114}, - {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115}, - {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116}, - {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117}, - {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118}, - {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119}, - {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120}, - {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121}, - {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122}, - {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123}, - {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124}, - {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125} - }; - - if ((sizeof(pte) != CAMELLIA_BLOCK_SIZE) || - (sizeof(ptc) != CAMELLIA_BLOCK_SIZE)) - return -113; - - testsSz = sizeof(testVectors)/sizeof(test_vector_t); - for (i = 0; i < testsSz; i++) { - CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz, - testVectors[i].iv); - - switch (testVectors[i].type) { - case CAM_ECB_ENC: - CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext); - if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_ECB_DEC: - CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext); - if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_CBC_ENC: - CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext, - CAMELLIA_BLOCK_SIZE); - if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_CBC_DEC: - CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext, - CAMELLIA_BLOCK_SIZE); - if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - default: - break; - } - } - - /* Setting the IV and checking it was actually set. */ - CamelliaSetIV(&cam, ivc); - if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE)) - return -1; - - /* Setting the IV to NULL should be same as all zeros IV */ - if (CamelliaSetIV(&cam, NULL) != 0 || - XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE)) - return -1; - - /* First parameter should never be null */ - if (CamelliaSetIV(NULL, NULL) == 0) - return -1; - - /* First parameter should never be null, check it fails */ - if (CamelliaSetKey(NULL, k1, sizeof(k1), NULL) == 0) - return -1; - - /* Key should have a size of 16, 24, or 32 */ - if (CamelliaSetKey(&cam, k1, 0, NULL) == 0) - return -1; - - return 0; -} -#endif /* HAVE_CAMELLIA */ - - -int random_test(void) -{ - RNG rng; - byte block[32]; - int ret; - -#ifdef HAVE_CAVIUM - ret = InitRngCavium(&rng, CAVIUM_DEV_ID); - if (ret != 0) return -2007; -#endif - ret = InitRng(&rng); - if (ret != 0) return -39; - - RNG_GenerateBlock(&rng, block, sizeof(block)); - - return 0; -} - - -#ifdef HAVE_NTRU - -byte GetEntropy(ENTROPY_CMD cmd, byte* out); - -byte GetEntropy(ENTROPY_CMD cmd, byte* out) -{ - static RNG rng; - - if (cmd == INIT) { - int ret = InitRng(&rng); - if (ret == 0) - return 1; - else - return 0; - } - - if (out == NULL) - return 0; - - if (cmd == GET_BYTE_OF_ENTROPY) { - RNG_GenerateBlock(&rng, out, 1); - return 1; - } - - if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { - *out = 1; - return 1; - } - - return 0; -} - -#endif /* HAVE_NTRU */ - -#ifndef NO_RSA - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* clientKey = "a:\\certs\\client-key.der"; - static const char* clientCert = "a:\\certs\\client-cert.der"; - #ifdef CYASSL_CERT_GEN - static const char* caKeyFile = "a:\\certs\\ca-key.der"; - static const char* caCertFile = "a:\\certs\\ca-cert.pem"; - #endif - #elif defined(CYASSL_MKD_SHELL) - static char* clientKey = "certs/client-key.der"; - static char* clientCert = "certs/client-cert.der"; - void set_clientKey(char *key) { clientKey = key ; } /* set by shell command */ - void set_clientCert(char *cert) { clientCert = cert ; } /* set by shell command */ - #ifdef CYASSL_CERT_GEN - static char* caKeyFile = "certs/ca-key.der"; - static char* caCertFile = "certs/ca-cert.pem"; - void set_caKeyFile (char * key) { caKeyFile = key ; } /* set by shell command */ - void set_caCertFile(char * cert) { caCertFile = cert ; } /* set by shell command */ - #endif - #else - static const char* clientKey = "./certs/client-key.der"; - static const char* clientCert = "./certs/client-cert.der"; - #ifdef CYASSL_CERT_GEN - static const char* caKeyFile = "./certs/ca-key.der"; - static const char* caCertFile = "./certs/ca-cert.pem"; - #endif - #endif -#endif - - - -#define FOURK_BUF 4096 - -int rsa_test(void) -{ - byte* tmp; - size_t bytes; - RsaKey key; - RNG rng; - word32 idx = 0; - int ret; - byte in[] = "Everyone gets Friday off."; - word32 inLen = (word32)strlen((char*)in); - byte out[256]; - byte plain[256]; -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - FILE* file, * file2; -#endif -#ifdef CYASSL_TEST_CERT - DecodedCert cert; -#endif - - tmp = (byte*)malloc(FOURK_BUF); - if (tmp == NULL) - return -40; - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024); - bytes = sizeof_client_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048); - bytes = sizeof_client_key_der_2048; -#else - file = fopen(clientKey, "rb"); - - if (!file) - err_sys("can't open ./certs/client-key.der, " - "Please run from CyaSSL home dir", -40); - - bytes = fread(tmp, 1, FOURK_BUF, file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - -#ifdef HAVE_CAVIUM - RsaInitCavium(&key, CAVIUM_DEV_ID); -#endif - InitRsaKey(&key, 0); - ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes); - if (ret != 0) return -41; - - ret = InitRng(&rng); - if (ret != 0) return -42; - - ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng); - if (ret < 0) return -43; - - ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key); - if (ret < 0) return -44; - - if (memcmp(plain, in, inLen)) return -45; - - ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng); - if (ret < 0) return -46; - - memset(plain, 0, sizeof(plain)); - ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key); - if (ret < 0) return -47; - - if (memcmp(plain, in, ret)) return -48; - -#if defined(CYASSL_MDK_ARM) - #define sizeof(s) strlen((char *)(s)) -#endif - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024); - bytes = sizeof_client_cert_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048); - bytes = sizeof_client_cert_der_2048; -#else - file2 = fopen(clientCert, "rb"); - if (!file2) - return -49; - - bytes = fread(tmp, 1, FOURK_BUF, file2); - fclose(file2); -#endif - -#ifdef sizeof - #undef sizeof -#endif - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&cert, tmp, (word32)bytes, 0); - - ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) return -491; - - FreeDecodedCert(&cert); -#else - (void)bytes; -#endif - - -#ifdef CYASSL_KEY_GEN - { - byte* der; - byte* pem; - int derSz = 0; - int pemSz = 0; - RsaKey derIn; - RsaKey genKey; - FILE* keyFile; - FILE* pemFile; - - InitRsaKey(&genKey, 0); - ret = MakeRsaKey(&genKey, 1024, 65537, &rng); - if (ret != 0) - return -301; - - der = (byte*)malloc(FOURK_BUF); - if (der == NULL) - return -307; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) - return -308; - - derSz = RsaKeyToDer(&genKey, der, FOURK_BUF); - if (derSz < 0) - return -302; - - keyFile = fopen("./key.der", "wb"); - if (!keyFile) - return -303; - ret = (int)fwrite(der, derSz, 1, keyFile); - fclose(keyFile); - - pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE); - if (pemSz < 0) - return -304; - - pemFile = fopen("./key.pem", "wb"); - if (!pemFile) - return -305; - ret = (int)fwrite(pem, pemSz, 1, pemFile); - fclose(pemFile); - - InitRsaKey(&derIn, 0); - idx = 0; - ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz); - if (ret != 0) - return -306; - - FreeRsaKey(&derIn); - FreeRsaKey(&genKey); - free(pem); - free(der); - } -#endif /* CYASSL_KEY_GEN */ - - -#ifdef CYASSL_CERT_GEN - /* self signed */ - { - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - int certSz; - int pemSz; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -309; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) - return -310; - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - myCert.isCA = 1; - myCert.sigType = CTC_SHA256wRSA; - - certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); - if (certSz < 0) - return -401; - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) - return -402; - FreeDecodedCert(&decode); -#endif - derFile = fopen("./cert.der", "wb"); - if (!derFile) - return -403; - ret = (int)fwrite(derCert, certSz, 1, derFile); - fclose(derFile); - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) - return -404; - - pemFile = fopen("./cert.pem", "wb"); - if (!pemFile) - return -405; - ret = (int)fwrite(pem, pemSz, 1, pemFile); - fclose(pemFile); - free(pem); - free(derCert); - } - /* CA style */ - { - RsaKey caKey; - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - int certSz; - int pemSz; - size_t bytes3; - word32 idx3 = 0; - FILE* file3 ; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -311; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) - return -312; - - file3 = fopen(caKeyFile, "rb"); - - if (!file3) - return -412; - - bytes3 = fread(tmp, 1, FOURK_BUF, file3); - fclose(file3); - - InitRsaKey(&caKey, 0); - ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); - if (ret != 0) return -413; - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - - ret = SetIssuer(&myCert, caCertFile); - if (ret < 0) - return -405; - - certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, &rng); - if (certSz < 0) - return -407; - - certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, - &caKey, &rng); - if (certSz < 0) - return -408; - - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) - return -409; - FreeDecodedCert(&decode); -#endif - - derFile = fopen("./othercert.der", "wb"); - if (!derFile) - return -410; - ret = (int)fwrite(derCert, certSz, 1, derFile); - fclose(derFile); - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) - return -411; - - pemFile = fopen("./othercert.pem", "wb"); - if (!pemFile) - return -412; - ret = (int)fwrite(pem, pemSz, 1, pemFile); - fclose(pemFile); - free(pem); - free(derCert); - FreeRsaKey(&caKey); - } -#ifdef HAVE_NTRU - { - RsaKey caKey; - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - FILE* caFile; - FILE* ntruPrivFile; - int certSz; - int pemSz; - size_t bytes; - word32 idx = 0; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -311; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) - return -312; - - byte public_key[557]; /* sized for EES401EP2 */ - word16 public_key_len; /* no. of octets in public key */ - byte private_key[607]; /* sized for EES401EP2 */ - word16 private_key_len; /* no. of octets in private key */ - DRBG_HANDLE drbg; - static uint8_t const pers_str[] = { - 'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't' - }; - word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str), - GetEntropy, &drbg); - if (rc != DRBG_OK) - return -450; - - rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, - NULL, &private_key_len, NULL); - if (rc != NTRU_OK) - return -451; - - rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, - public_key, &private_key_len, private_key); - crypto_drbg_uninstantiate(drbg); - - if (rc != NTRU_OK) - return -452; - - caFile = fopen(caKeyFile, "rb"); - - if (!caFile) - return -453; - - bytes = fread(tmp, 1, FOURK_BUF, caFile); - fclose(caFile); - - InitRsaKey(&caKey, 0); - ret = RsaPrivateKeyDecode(tmp, &idx, &caKey, (word32)bytes); - if (ret != 0) return -454; - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - - ret = SetIssuer(&myCert, caCertFile); - if (ret < 0) - return -455; - - certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key, - public_key_len, &rng); - if (certSz < 0) - return -456; - - certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, - &caKey, &rng); - if (certSz < 0) - return -457; - - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) - return -458; - FreeDecodedCert(&decode); -#endif - derFile = fopen("./ntru-cert.der", "wb"); - if (!derFile) - return -459; - ret = fwrite(derCert, certSz, 1, derFile); - fclose(derFile); - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) - return -460; - - pemFile = fopen("./ntru-cert.pem", "wb"); - if (!pemFile) - return -461; - ret = fwrite(pem, pemSz, 1, pemFile); - fclose(pemFile); - - ntruPrivFile = fopen("./ntru-key.raw", "wb"); - if (!ntruPrivFile) - return -462; - ret = fwrite(private_key, private_key_len, 1, ntruPrivFile); - fclose(ntruPrivFile); - free(pem); - free(derCert); - FreeRsaKey(&caKey); - } -#endif /* HAVE_NTRU */ -#endif /* CYASSL_CERT_GEN */ - - FreeRsaKey(&key); -#ifdef HAVE_CAVIUM - RsaFreeCavium(&key); -#endif - free(tmp); - - return 0; -} - -#endif - - -#ifndef NO_DH - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* dhKey = "a:\certs\\dh2048.der"; - #else - static const char* dhKey = "./certs/dh2048.der"; - #endif -#endif - -int dh_test(void) -{ - int ret; - word32 bytes; - word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2; - byte tmp[1024]; - byte priv[256]; - byte pub[256]; - byte priv2[256]; - byte pub2[256]; - byte agree[256]; - byte agree2[256]; - DhKey key; - DhKey key2; - RNG rng; - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); - bytes = sizeof_dh_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); - bytes = sizeof_dh_key_der_2048; -#else - FILE* file = fopen(dhKey, "rb"); - - if (!file) - return -50; - - bytes = (word32) fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - InitDhKey(&key); - InitDhKey(&key2); - ret = DhKeyDecode(tmp, &idx, &key, bytes); - if (ret != 0) - return -51; - - idx = 0; - ret = DhKeyDecode(tmp, &idx, &key2, bytes); - if (ret != 0) - return -52; - - ret = InitRng(&rng); - if (ret != 0) - return -53; - - ret = DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz); - ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2); - if (ret != 0) - return -54; - - ret = DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2); - ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz); - if (ret != 0) - return -55; - - if (memcmp(agree, agree2, agreeSz)) - return -56; - - FreeDhKey(&key); - FreeDhKey(&key2); - - return 0; -} - -#endif /* NO_DH */ - - -#ifndef NO_DSA - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* dsaKey = "a:\\certs\\dsa2048.der"; - #else - static const char* dsaKey = "./certs/dsa2048.der"; - #endif -#endif - -int dsa_test(void) -{ - int ret, answer; - word32 bytes; - word32 idx = 0; - byte tmp[1024]; - DsaKey key; - RNG rng; - Sha sha; - byte hash[SHA_DIGEST_SIZE]; - byte signature[40]; - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024); - bytes = sizeof_dsa_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048); - bytes = sizeof_dsa_key_der_2048; -#else - FILE* file = fopen(dsaKey, "rb"); - - if (!file) - return -60; - - bytes = (word32) fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - InitSha(&sha); - ShaUpdate(&sha, tmp, bytes); - ShaFinal(&sha, hash); - - InitDsaKey(&key); - ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes); - if (ret != 0) return -61; - - ret = InitRng(&rng); - if (ret != 0) return -62; - - ret = DsaSign(hash, signature, &key, &rng); - if (ret != 0) return -63; - - ret = DsaVerify(hash, signature, &key, &answer); - if (ret != 0) return -64; - if (answer != 1) return -65; - - FreeDsaKey(&key); - - return 0; -} - -#endif /* NO_DSA */ - - -#ifdef OPENSSL_EXTRA - -int openssl_test(void) -{ - EVP_MD_CTX md_ctx; - testVector a, b, c, d, e, f; - byte hash[SHA_DIGEST_SIZE*4]; /* max size */ - - (void)e; - (void)f; - - a.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" - "\x7a"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_md5()); - - EVP_DigestUpdate(&md_ctx, a.input, a.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0) - return -71; - - b.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaa"; - b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" - "\x53\x99\x5E\x26\xA0"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha1()); - - EVP_DigestUpdate(&md_ctx, b.input, b.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0) - return -72; - - - d.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" - "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" - "\x06\xC1"; - d.inLen = strlen(d.input); - d.outLen = SHA256_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha256()); - - EVP_DigestUpdate(&md_ctx, d.input, d.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0) - return -78; - -#ifdef CYASSL_SHA384 - - e.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" - "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" - "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" - "\x74\x60\x39"; - e.inLen = strlen(e.input); - e.outLen = SHA384_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha384()); - - EVP_DigestUpdate(&md_ctx, e.input, e.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0) - return -79; - -#endif /* CYASSL_SHA384 */ - - -#ifdef CYASSL_SHA512 - - f.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" - "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" - "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" - "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" - "\x87\x4b\xe9\x09"; - f.inLen = strlen(f.input); - f.outLen = SHA512_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha512()); - - EVP_DigestUpdate(&md_ctx, f.input, f.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0) - return -80; - -#endif /* CYASSL_SHA512 */ - - - if (RAND_bytes(hash, sizeof(hash)) != 1) - return -73; - - c.input = "what do ya want for nothing?"; - c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" - "\x38"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0); - - if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0) - return -74; - - { /* des test */ - const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - const_DES_cblock key = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef - }; - - DES_cblock iv = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef - }; - - DES_key_schedule sched; - - const byte verify[] = - { - 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, - 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, - 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b - }; - - DES_key_sched(&key, &sched); - - DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT); - DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT); - - if (memcmp(plain, vector, sizeof(vector)) != 0) - return -75; - - if (memcmp(cipher, verify, sizeof(verify)) != 0) - return -76; - - /* test changing iv */ - DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT); - DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT); - - if (memcmp(cipher, verify, sizeof(verify)) != 0) - return -77; - - } /* end des test */ - - { /* evp_cipher test */ - EVP_CIPHER_CTX ctx; - - - const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - const byte verify[] = - { - 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, - 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb - }; - - byte key[] = "0123456789abcdef "; /* align */ - byte iv[] = "1234567890abcdef "; /* align */ - - byte cipher[AES_BLOCK_SIZE * 4]; - byte plain [AES_BLOCK_SIZE * 4]; - - EVP_CIPHER_CTX_init(&ctx); - if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0) - return -81; - - if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0) - return -82; - - if (memcmp(cipher, verify, AES_BLOCK_SIZE)) - return -83; - - EVP_CIPHER_CTX_init(&ctx); - if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0) - return -84; - - if (EVP_Cipher(&ctx, plain, cipher, 16) == 0) - return -85; - - if (memcmp(plain, msg, AES_BLOCK_SIZE)) - return -86; - - - } /* end evp_cipher test */ - - return 0; -} - -#endif /* OPENSSL_EXTRA */ - - -#ifndef NO_PWDBASED - -int pkcs12_test(void) -{ - const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67, - 0x00, 0x00 }; - const byte salt[] = { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f }; - - const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65, - 0x00, 0x67, 0x00, 0x00 }; - const byte salt2[] = { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 }; - byte derived[64]; - - const byte verify[] = { - 0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46, - 0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E, - 0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3 - }; - - const byte verify2[] = { - 0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E, - 0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB, - 0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F - }; - - int id = 1; - int kLen = 24; - int iterations = 1; - int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations, - kLen, SHA, id); - - if (ret < 0) - return -103; - - if ( (ret = memcmp(derived, verify, kLen)) != 0) - return -104; - - iterations = 1000; - ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, - kLen, SHA, id); - if (ret < 0) - return -105; - - if ( (ret = memcmp(derived, verify2, 24)) != 0) - return -106; - - return 0; -} - - -int pbkdf2_test(void) -{ - char passwd[] = "password"; - const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; - int iterations = 2048; - int kLen = 24; - byte derived[64]; - - const byte verify[] = { - 0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2, - 0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43 - - }; - - PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, - kLen, SHA); - - if (memcmp(derived, verify, sizeof(verify)) != 0) - return -102; - - return 0; -} - - -int pbkdf1_test(void) -{ - char passwd[] = "password"; - const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; - int iterations = 1000; - int kLen = 16; - byte derived[16]; - - const byte verify[] = { - 0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB, - 0x4A, 0x3D, 0x2A, 0x20 - }; - - PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, - kLen, SHA); - - if (memcmp(derived, verify, sizeof(verify)) != 0) - return -101; - - return 0; -} - - -int pwdbased_test(void) -{ - int ret = pbkdf1_test(); - ret += pbkdf2_test(); - - return ret + pkcs12_test(); -} - -#endif /* NO_PWDBASED */ - -#if defined(HAVE_HKDF) && (!defined(NO_SHA) || !defined(NO_SHA256)) - -int hkdf_test(void) -{ - int ret; - int L = 42; - byte okm1[42]; - byte ikm1[22] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b }; - byte salt1[13] ={ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c }; - byte info1[10] ={ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9 }; - byte res1[42] = { 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, - 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, - 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, - 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, - 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, - 0x49, 0x18 }; - byte res2[42] = { 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, - 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, - 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, - 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, - 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, - 0xf8, 0x96 }; - byte res3[42] = { 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, - 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, - 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, - 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, - 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, - 0x96, 0xc8 }; - byte res4[42] = { 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, - 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, - 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, - 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, - 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, - 0x58, 0x65 }; - - (void)res1; - (void)res2; - (void)res3; - (void)res4; - -#ifndef NO_SHA - ret = HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L); - if (ret != 0) - return -2001; - - if (memcmp(okm1, res1, L) != 0) - return -2002; - - ret = HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L); - if (ret != 0) - return -2003; - - if (memcmp(okm1, res2, L) != 0) - return -2004; -#endif /* NO_SHA */ - -#ifndef NO_SHA256 - ret = HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L); - if (ret != 0) - return -2005; - - if (memcmp(okm1, res3, L) != 0) - return -2006; - - ret = HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L); - if (ret != 0) - return -2007; - - if (memcmp(okm1, res4, L) != 0) - return -2007; -#endif /* NO_SHA256 */ - - return 0; -} - -#endif /* HAVE_HKDF */ - - -#ifdef HAVE_ECC - -int ecc_test(void) -{ - RNG rng; - byte sharedA[1024]; - byte sharedB[1024]; - byte sig[1024]; - byte digest[20]; - byte exportBuf[1024]; - word32 x, y; - int i, verify, ret; - ecc_key userA, userB, pubKey; - - ret = InitRng(&rng); - if (ret != 0) - return -1001; - - ecc_init(&userA); - ecc_init(&userB); - ecc_init(&pubKey); - - ret = ecc_make_key(&rng, 32, &userA); - ret = ecc_make_key(&rng, 32, &userB); - - if (ret != 0) - return -1002; - - x = sizeof(sharedA); - ret = ecc_shared_secret(&userA, &userB, sharedA, &x); - - y = sizeof(sharedB); - ret = ecc_shared_secret(&userB, &userA, sharedB, &y); - - if (ret != 0) - return -1003; - - if (y != x) - return -1004; - - if (memcmp(sharedA, sharedB, x)) - return -1005; - - x = sizeof(exportBuf); - ret = ecc_export_x963(&userA, exportBuf, &x); - if (ret != 0) - return -1006; - - ret = ecc_import_x963(exportBuf, x, &pubKey); - - if (ret != 0) - return -1007; - - y = sizeof(sharedB); - ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y); - - if (ret != 0) - return -1008; - - if (memcmp(sharedA, sharedB, y)) - return -1010; - - /* test DSA sign hash */ - for (i = 0; i < (int)sizeof(digest); i++) - digest[i] = i; - - x = sizeof(sig); - ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA); - - verify = 0; - ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA); - - if (ret != 0) - return -1011; - - if (verify != 1) - return -1012; - - x = sizeof(exportBuf); - ret = ecc_export_private_only(&userA, exportBuf, &x); - if (ret != 0) - return -1013; - - ecc_free(&pubKey); - ecc_free(&userB); - ecc_free(&userA); - - return 0; -} - -#endif /* HAVE_ECC */ - -#ifdef HAVE_LIBZ - -const byte sample_text[] = - "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" - "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" - "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" - "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" - "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" - "small batch meggings kogi dolore food truck bespoke gastropub.\n" - "\n" - "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" - "four loko you probably haven't heard of them high life. Messenger bag\n" - "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" - "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" - "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" - "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" - "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" - "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n" - "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n" - "four loko whatever street art yr farm-to-table.\n" - "\n" - "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n" - "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n" - "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n" - "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n" - "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n" - "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n" - "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n" - "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n" - "locavore.\n" - "\n" - "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n" - "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n" - "cillum pickled velit, YOLO officia you probably haven't heard of them\n" - "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n" - "small batch american apparel. Put a bird on it cosby sweater before they\n" - "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n" - "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n" - "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n" - "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n" - "neutra PBR selvage.\n" - "\n" - "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n" - "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n" - "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n" - "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n" - "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n" - "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n" - "incididunt flannel sustainable helvetica pork belly pug banksy you\n" - "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n" - "mollit magna, sriracha sartorial helvetica.\n" - "\n" - "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n" - "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n" - "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n" - "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n" - "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n" - "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n" - "Veniam sunt food truck leggings, sint vinyl fap.\n" - "\n" - "Hella dolore pork belly, truffaut carles you probably haven't heard of\n" - "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n" - "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n" - "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n" - "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n" - "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n" - "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n" - "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n" - "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n" - "\n" - "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n" - "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n" - "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n" - "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n" - "tousled beard mollit mustache leggings portland next level. Nihil esse\n" - "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n" - "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n" - "bag dolor terry richardson sapiente.\n"; - - -int compress_test(void) -{ - int ret = 0; - word32 dSz = sizeof(sample_text); - word32 cSz = (dSz + (word32)(dSz * 0.001) + 12); - byte *c = NULL; - byte *d = NULL; - - c = calloc(cSz, sizeof(byte)); - d = calloc(dSz, sizeof(byte)); - - if (c == NULL || d == NULL) - ret = -300; - - if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0) - ret = -301; - - if (ret > 0) { - cSz = (word32)ret; - ret = 0; - } - - if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz) - ret = -302; - - if (ret == 0 && memcmp(d, sample_text, dSz)) - ret = -303; - - if (c) free(c); - if (d) free(d); - - return ret; -} - -#endif /* HAVE_LIBZ */ - -#endif /* NO_CRYPT_TEST */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt deleted file mode 100644 index b541cb66..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/Abstract.txt +++ /dev/null @@ -1,89 +0,0 @@ -This program gives wolfCrypt and CyaSSL library demo. - -In order to run the demo, -Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. -For demo configuration, refer config-Crypt.h and config-CyaSSL.h. - -After download and start the execution, you can type in commands through the -Debug(printf) viewer. - -time [-d date][-t time] Set/Get RTC: The time is used for certificate validation. -test wolfCrypt Simple test suite -benchmark wolfCrypt Simple benchmark -server& simple server in background mode -client simple client -echoserver& echo server in background mode -echoclient echo client -server/client -h help for server/client command - - -=== Typical Command Usage Scenario === - -Starting Shell ->time -d 9/23/2013 ->time -Date: 9/23/2013, Time: 00:38:31 ->test -MD5 test passed! -MD4 test passed! -SHA test passed! -... - ->benchmark -AES 25 kB took 0.025 seconds, 0.96 MB/s -ARC4 25 kB took 0.006 seconds, 3.83 MB/s -... - -DH 2048 key agreement 685.93 milliseconds, avg over 1 iterations - ->echoserver& -"echoserver" is running with the background mode. - ->echoclient -ABCDEFG -ABCDEFG -WXYZ -WXYZ -quit -sending server shutdown command: quit! -client sent quit command: shutting down! - ->server& -"server" is running with the background mode. - ->client -peer's cert info: - issuer : /C=... - subject: /C=... - serial number:02 -SSL version is TLSv1.2 -SSL cipher suite is TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 -peer's cert info: - issuer : /C=... - subject: /C=... - serial number:... -SSL version is TLSv1.2 -SSL cipher suite is TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 -Client message: hello cyassl! -Server response: I hear you fa shizzle! - ->client -h 192.168.2.100 -p 443 -g -v 0 -peer's cert info: - issuer : /CN=... - subject: /CN=... - serial number:44:39:... -SSL version is SSLv3 -SSL cipher suite is SSL_RSA_WITH_RC4_128_SHA -SSL connect ok, sending GET... -... -=== - -For the hardware crypt on config-Crypt.h, download -STSW-STM32062: STM32F2xx standard peripherals library at -http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to - {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib - - -Support -------- -Please send questions or comments to support@wolfssl.com diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx deleted file mode 100644 index 4084d9ab..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvoptx +++ /dev/null @@ -1,1530 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - CyaSSL-Full - 0x4 - ARM-ADS - - 25000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGUARM - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32F2xx_1024 -FL0100000 -FS08000000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - - - - 0 - 1 - str[i] - - - 1 - 1 - str - - - - - 1 - 3 - 0x20003d9e - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 57 - 80 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 13 - 0 - 0 - 0 - 0 - .\shell.c - shell.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\test.c - test.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\benchmark.c - benchmark.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\client.c - client.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 2 - 0 - 0 - 0 - 0 - .\echoclient.c - echoclient.c - 0 - 0 - - - 1 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\echoserver.c - echoserver.c - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\server.c - server.c - 0 - 0 - - - 1 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\cert_data.c - cert_data.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 10 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 0 - 0 - - - 2 - 11 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 12 - 5 - 0 - 0 - 10 - 0 - 1 - 32 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 13 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 15 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 16 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 17 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 18 - 2 - 0 - 0 - 0 - 0 - 163 - 169 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 19 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - PHY_ST802RT1.c - 1 - 0 - - - 6 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - EMAC_STM32F2xx.c - 1 - 0 - - - 6 - 22 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 23 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 24 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 25 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::Network - 1 - 0 - 0 - 1 - - 8 - 26 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - Net_Dbg_CM3_L.lib - 1 - 0 - - - 8 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config.c - Net_Config.c - 1 - 0 - - - 8 - 28 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_BSD.h - Net_Config_BSD.h - 1 - 0 - - - 8 - 29 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_DNS_Client.h - Net_Config_DNS_Client.h - 1 - 0 - - - 8 - 30 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_ETH_0.h - Net_Config_ETH_0.h - 1 - 0 - - - 8 - 31 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_TCP.h - Net_Config_TCP.h - 1 - 0 - - - 8 - 32 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_UDP.h - Net_Config_UDP.h - 1 - 0 - - - 8 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Debug.c - Net_Debug.c - 1 - 0 - - - - - ::wolfSSL - 1 - 0 - 0 - 1 - - 9 - 34 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 9 - 35 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 1 - 0 - - - 9 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 9 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 9 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 9 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 9 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 9 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 9 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 9 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 9 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 9 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 9 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 9 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 9 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 9 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 9 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 9 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 9 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 9 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 9 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 9 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 9 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 9 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 9 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 9 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 9 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 9 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c - port.c - 1 - 0 - - - 9 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 9 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 9 - 64 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 9 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 9 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 9 - 67 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 9 - 69 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 9 - 70 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 9 - 71 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\crl.c - crl.c - 1 - 0 - - - 9 - 72 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\internal.c - internal.c - 1 - 0 - - - 9 - 73 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\io.c - io.c - 1 - 0 - - - 9 - 74 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\keys.c - keys.c - 1 - 0 - - - 9 - 75 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ocsp.c - ocsp.c - 1 - 0 - - - 9 - 76 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\sniffer.c - sniffer.c - 1 - 0 - - - 9 - 77 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ssl.c - ssl.c - 1 - 0 - - - 9 - 78 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\tls.c - tls.c - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx deleted file mode 100644 index 83d2df29..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/CyaSSL-Full.uvprojx +++ /dev/null @@ -1,1122 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - CyaSSL-Full - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - CyaSSL-Full - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 0 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_CYASSL - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - shell.c - 1 - .\shell.c - - - test.c - 1 - .\test.c - - - benchmark.c - 1 - .\benchmark.c - - - client.c - 1 - .\client.c - - - echoclient.c - 1 - .\echoclient.c - - - echoserver.c - 1 - .\echoserver.c - - - server.c - 1 - .\server.c - - - cert_data.c - 1 - .\cert_data.c - - - - - Configuration - - - config-CyaSSL.h - 5 - .\RTE\wolfSSL\config-CyaSSL.h - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - PHY_ST802RT1.c - 1 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - - - EMAC_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::Network - - - Net_Dbg_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - - - Net_Config.c - 1 - RTE\Network\Net_Config.c - - - Net_Config_BSD.h - 5 - RTE\Network\Net_Config_BSD.h - - - Net_Config_DNS_Client.h - 5 - RTE\Network\Net_Config_DNS_Client.h - - - Net_Config_ETH_0.h - 5 - RTE\Network\Net_Config_ETH_0.h - - - Net_Config_TCP.h - 5 - RTE\Network\Net_Config_TCP.h - - - Net_Config_UDP.h - 5 - RTE\Network\Net_Config_UDP.h - - - Net_Debug.c - 1 - RTE\Network\Net_Debug.c - - - - - ::wolfSSL - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config-CyaSSL.h - 5 - RTE\wolfSSL\config-CyaSSL.h - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\misc.c - - - port.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\port.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\ctaocrypt\src\tfm.c - - - crl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\crl.c - - - internal.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\internal.c - - - io.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\io.c - - - keys.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\keys.c - - - ocsp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ocsp.c - - - sniffer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\sniffer.c - - - ssl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\ssl.c - - - tls.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.1\cyassl\src\tls.c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - - - RTE\Network\Net_Debug.c - - - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config-CyaSSL.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index 3ff6766f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 6 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 250 -#endif - -// Main Thread stack size [bytes] <64-4096:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 250 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 2 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 4500 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-64000:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 4a09246f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 1 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index 205f9ffb..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00001000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x0000F000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c deleted file mode 100644 index 6b9dc8e0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config.c +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config.c - * Purpose: Network Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Definitions -// Global Network System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "my_host" -#define NET_HOST_NAME "my_host" - -// Memory Pool size <1536-262144:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// Network packets are allocated from this memory pool. -// Default: 12000 bytes -#define NET_MEM_SIZE 3000 - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_Network_Interface_ETH_0 -#include "Net_Config_ETH_0.h" -#endif -#ifdef RTE_Network_Interface_ETH_1 -#include "Net_Config_ETH_1.h" -#endif - -#ifdef RTE_Network_Interface_PPP_0 -#include "Net_Config_PPP_0.h" -#endif -#ifdef RTE_Network_Interface_PPP_1 -#include "Net_Config_PPP_1.h" -#endif - -#ifdef RTE_Network_Interface_SLIP_0 -#include "Net_Config_SLIP_0.h" -#endif -#ifdef RTE_Network_Interface_SLIP_1 -#include "Net_Config_SLIP_1.h" -#endif - -#ifdef RTE_Network_Socket_UDP -#include "Net_Config_UDP.h" -#endif -#ifdef RTE_Network_Socket_TCP -#include "Net_Config_TCP.h" -#endif -#ifdef RTE_Network_Socket_BSD -#include "Net_Config_BSD.h" -#endif - -#ifdef RTE_Network_Web_Server_RO -#include "Net_Config_HTTP_Server.h" -#endif -#ifdef RTE_Network_Web_Server_FS -#include "Net_Config_HTTP_Server.h" -#endif - -#ifdef RTE_Network_Telnet_Server -#include "Net_Config_Telnet_Server.h" -#endif - -#ifdef RTE_Network_TFTP_Server -#include "Net_Config_TFTP_Server.h" -#endif -#ifdef RTE_Network_TFTP_Client -#include "Net_Config_TFTP_Client.h" -#endif - -#ifdef RTE_Network_FTP_Server -#include "Net_Config_FTP_Server.h" -#endif -#ifdef RTE_Network_FTP_Client -#include "Net_Config_FTP_Client.h" -#endif - -#ifdef RTE_Network_DNS_Client -#include "Net_Config_DNS_Client.h" -#endif - -#ifdef RTE_Network_SMTP_Client -#include "Net_Config_SMTP_Client.h" -#endif - -#ifdef RTE_Network_SNMP_Agent -#include "Net_Config_SNMP_Agent.h" -#endif - -#ifdef RTE_Network_SNTP_Client -#include "Net_Config_SNTP_Client.h" -#endif - -#include "net_config.h" - -/** -\addtogroup net_genFunc -@{ -*/ -/** - \fn void net_sys_error (ERROR_CODE error) - \ingroup net_cores - \brief Network system error handler. -*/ -void net_sys_error (ERROR_CODE error) { - /* This function is called when a fatal error is encountered. */ - /* The normal program execution is not possible anymore. */ - - switch (error) { - case ERR_MEM_ALLOC: - /* Out of memory */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer Corrupted */ - /* More data written than the size of allocated mem block */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state */ - break; - } - - /* End-less loop */ - while (1); -} -/** -@} -*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h deleted file mode 100644 index 7d515a50..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_BSD.h - * Purpose: Network Configuration BSD Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Berkley (BSD) Sockets -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUM_SOCKS 10 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SERVER_SOCKS 1 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RECEIVE_TOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_HOSTNAME_ENABLE 0 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h deleted file mode 100644 index d30b7180..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Service - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_DNS_Client.h - * Purpose: Network Configuration DNS Client - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// DNS Client -#define DNS_CLIENT_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_CLIENT_TAB_SIZE 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h deleted file mode 100644 index 7be57ad6..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Interface - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_ETH_0.h - * Purpose: Network Configuration ETH Interface - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Ethernet Network Interface 0 -#define ETH0_ENABLE 1 - -// Connect to hardware via Driver_ETH# <0-255> -// Select driver control block for MAC and PHY interface -#define ETH0_DRIVER 1 - -// MAC Address -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x1E -#define ETH0_MAC1 0x1E - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define ETH0_MAC2 0x30 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define ETH0_MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0xA2 -#define ETH0_MAC4 0xA2 - -// Address byte 5 <0x00-0xff> -// Default: 0x45 -#define ETH0_MAC5 0x45 - -// Address byte 6 <0x00-0xff> -// Default: 0x5E -#define ETH0_MAC6 0x5E -// - -// IP Address -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define ETH0_IP4 100 -// - -// Subnet mask -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define ETH0_MASK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define ETH0_MASK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define ETH0_MASK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define ETH0_MASK4 0 -// - -// Default Gateway -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define ETH0_GW4 254 -// - -// Primary DNS Server -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_PRI_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_PRI_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_PRI_DNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define ETH0_PRI_DNS4 129 -// - -// Secondary DNS Server -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_SEC_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_SEC_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_SEC_DNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define ETH0_SEC_DNS4 130 -// - -// ARP Definitions -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ETH0_ARP_TAB_SIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ETH0_ARP_CACHE_TOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ETH0_ARP_MAX_RETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ETH0_ARP_RESEND_TOUT 2 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ETH0_ARP_NOTIFY 0 -// - -// IGMP Group Management -// Enable or disable Internet Group Management Protocol -#define ETH0_IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define ETH0_IGMP_TAB_SIZE 5 -// - -// NetBIOS Name Service -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define ETH0_NBNS_ENABLE 1 - -// Dynamic Host Configuration -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define ETH0_DHCP_ENABLE 1 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define ETH0_DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_BOOTFILE 0 - -// NTP Servers -// This value is optional. If enabled, a list of NTP Servers -// (option 42) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_NTP_SERVERS 0 -// - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h deleted file mode 100644 index e659ce92..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_TCP.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_TCP.h - * Purpose: Network Configuration TCP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUM_SOCKS 10 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAX_RETRY 5 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRY_TOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFAULT_TOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAX_SEG_SIZE 1460 - -// Receive Window Size <536-65535> -// Receive Window Size specifies the size of data, -// that the socket is able to buffer in flow-control mode. -// Default: 4380 -#define TCP_RECEIVE_WIN_SIZE 4380 - -// - -// TCP Initial Retransmit period in seconds -#define TCP_INITIAL_RETRY_TOUT 1 - -// TCP SYN frame retransmit period in seconds -#define TCP_SYN_RETRY_TOUT 2 - -// Number of retries to establish a connection -#define TCP_CONNECT_RETRY 7 - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h deleted file mode 100644 index 55e7f21b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_UDP.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_UDP.h - * Purpose: Network Configuration UDP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-30> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUM_SOCKS 15 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c deleted file mode 100644 index 735089a4..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Debug.c - * Purpose: Network Debug Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Print Time Stamp -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 0 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 0 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 1 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 1 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Time debug messages -#define DBG_SNTP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 1 -// - -// Application Debug Definitions -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP_SERVER 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP_SERVER 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTP_CLIENT 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TELNET_SERVER 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP_SERVER 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTP_CLIENT 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP_CLIENT 1 -// - - -#include "net_debug.h" - - -/** - \fn void net_debug_init (void) - \brief Initialize Network Debug Interface. -*/ -void net_debug_init (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h deleted file mode 100644 index 07fef4e5..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/RTE_Components.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'CyaSSL-Full' - * Target: 'CyaSSL-Full' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ -#define RTE_Network_Core /* Network Core */ - #define RTE_Network_Debug /* Network Debug Version */ -#define RTE_Network_DNS_Client /* Network DNS Client */ -#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ -#define RTE_Network_Socket_BSD /* Network Socket BSD */ -#define RTE_Network_Socket_TCP /* Network Socket TCP */ -#define RTE_Network_Socket_UDP /* Network Socket UDP */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c deleted file mode 100644 index 5e5b14f0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c +++ /dev/null @@ -1,1064 +0,0 @@ -/* benchmark.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* CTaoCrypt benchmark */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif -#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) - /* include test cert and key buffers for use with NO_FILESYSTEM */ - #if defined(CYASSL_MDK_ARM) && !defined(SINGLE_THREADED) - #include "cert_data.h" /* use certs_test.c for initial data, - so other commands can share the data. */ - #else - #include - #endif -#endif - -#if defined(CYASSL_MDK_ARM) - #include - extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; - #define fopen CyaSSL_fopen -#endif - -#ifdef HAVE_BLAKE2 - #include - void bench_blake2(void); -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -void bench_des(void); -void bench_arc4(void); -void bench_hc128(void); -void bench_rabbit(void); -void bench_aes(int); -void bench_aesgcm(void); -void bench_aesccm(void); -void bench_camellia(void); - -void bench_md5(void); -void bench_sha(void); -void bench_sha256(void); -void bench_sha512(void); -void bench_ripemd(void); - -void bench_rsa(void); -void bench_rsaKeyGen(void); -void bench_dh(void); -#ifdef HAVE_ECC -void bench_eccKeyGen(void); -void bench_eccKeyAgree(void); -#endif - -double current_time(int); - - -#ifdef HAVE_CAVIUM - -static int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif - - -/* so embedded projects can pull in tests on their own */ -#if !defined(NO_MAIN_DRIVER) - -int main(int argc, char** argv) - -{ - (void)argc; - (void)argv; -#else -int benchmark_test(void *args) -{ -#endif - - #ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) { - printf("Cavium OpenNitroxDevice failed\n"); - exit(-1); - } -#endif /* HAVE_CAVIUM */ -#ifndef NO_AES - bench_aes(0); - bench_aes(1); -#endif -#ifdef HAVE_AESGCM - bench_aesgcm(); -#endif -#ifdef HAVE_AESCCM - bench_aesccm(); -#endif -#ifdef HAVE_CAMELLIA - bench_camellia(); -#endif -#ifndef NO_RC4 - bench_arc4(); -#endif -#ifdef HAVE_HC128 - bench_hc128(); -#endif -#ifndef NO_RABBIT - bench_rabbit(); -#endif -#ifndef NO_DES3 - bench_des(); -#endif - - printf("\n"); - -#ifndef NO_MD5 - bench_md5(); -#endif -#ifndef NO_SHA - bench_sha(); -#endif -#ifndef NO_SHA256 - bench_sha256(); -#endif -#ifdef CYASSL_SHA512 - bench_sha512(); -#endif -#ifdef CYASSL_RIPEMD - bench_ripemd(); -#endif -#ifdef HAVE_BLAKE2 - bench_blake2(); -#endif - - printf("\n"); - -#ifndef NO_RSA - bench_rsa(); -#endif - -#ifndef NO_DH - bench_dh(); -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) - bench_rsaKeyGen(); -#endif - -#ifdef HAVE_ECC - bench_eccKeyGen(); - bench_eccKeyAgree(); -#endif - - return 0; -} - - -#ifdef BENCH_EMBEDDED -const int numBlocks = 25; /* how many kB/megs to test (en/de)cryption */ -const char blockType[] = "kB"; /* used in printf output */ -const int times = 1; /* public key iterations */ -#else -const int numBlocks = 5; -const char blockType[] = "megs"; -const int times = 100; -#endif - -const byte key[] = -{ - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, - 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 -}; - -const byte iv[] = -{ - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 - -}; - - -/* use kB instead of mB for embedded benchmarking */ -#ifdef BENCH_EMBEDDED -byte plain [1024]; -byte cipher[1024]; -#else -byte plain [1024*1024]; -byte cipher[1024*1024]; -#endif - - -#ifndef NO_AES -void bench_aes(int show) -{ - Aes enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("aes init cavium failed\n"); -#endif - - AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - if (show) - printf("AES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - AesFreeCavium(&enc); -#endif -} -#endif - - -byte additional[13]; -byte tag[16]; - - -#ifdef HAVE_AESGCM -void bench_aesgcm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesGcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-GCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_AESCCM -void bench_aesccm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesCcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-CCM %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_CAMELLIA -void bench_camellia(void) -{ - Camellia cam; - double start, total, persec; - int i; - - CamelliaSetKey(&cam, key, 16, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("Camellia %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifndef NO_DES3 -void bench_des(void) -{ - Des3 enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("des3 init cavium failed\n"); -#endif - Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("3DES %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Des3_FreeCavium(&enc); -#endif -} -#endif - - -#ifndef NO_RC4 -void bench_arc4(void) -{ - Arc4 enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("arc4 init cavium failed\n"); -#endif - - Arc4SetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Arc4Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("ARC4 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Arc4FreeCavium(&enc); -#endif -} -#endif - - -#ifdef HAVE_HC128 -void bench_hc128(void) -{ - HC128 enc; - double start, total, persec; - int i; - - Hc128_SetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Hc128_Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("HC128 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* HAVE_HC128 */ - - -#ifndef NO_RABBIT -void bench_rabbit(void) -{ - Rabbit enc; - double start, total, persec; - int i; - - RabbitSetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RabbitProcess(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RABBIT %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_RABBIT */ - - -#ifndef NO_MD5 -void bench_md5(void) -{ - Md5 hash; - byte digest[MD5_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitMd5(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Md5Update(&hash, plain, sizeof(plain)); - - Md5Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("MD5 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_MD5 */ - - -#ifndef NO_SHA -void bench_sha(void) -{ - Sha hash; - byte digest[SHA_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - ShaUpdate(&hash, plain, sizeof(plain)); - - ShaFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_SHA */ - - -#ifndef NO_SHA256 -void bench_sha256(void) -{ - Sha256 hash; - byte digest[SHA256_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha256(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Sha256Update(&hash, plain, sizeof(plain)); - - Sha256Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-256 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_SHA512 -void bench_sha512(void) -{ - Sha512 hash; - byte digest[SHA512_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitSha512(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Sha512Update(&hash, plain, sizeof(plain)); - - Sha512Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-512 %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_RIPEMD -void bench_ripemd(void) -{ - RipeMd hash; - byte digest[RIPEMD_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitRipeMd(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RipeMdUpdate(&hash, plain, sizeof(plain)); - - RipeMdFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RIPEMD %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_BLAKE2 -void bench_blake2(void) -{ - Blake2b b2b; - byte digest[64]; - double start, total, persec; - int i; - - InitBlake2b(&b2b, 64); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Blake2bUpdate(&b2b, plain, sizeof(plain)); - - Blake2bFinal(&b2b, digest, 64); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("BLAKE2b %d %s took %5.3f seconds, %6.2f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#if !defined(NO_RSA) || !defined(NO_DH) \ - || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) -RNG rng; -#endif - -#ifndef NO_RSA - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certRSAname = "certs/rsa2048.der" ; -void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certRSAname = "certs/rsa2048.der" ; -#endif - -void bench_rsa(void) -{ - int i; - int ret; - byte tmp[3072]; - size_t bytes; - word32 idx = 0; - - byte message[] = "Everyone gets Friday off."; - byte enc[512]; /* for up to 4096 bit */ - const int len = (int)strlen((char*)message); - double start, total, each, milliEach; - - RsaKey rsaKey; - int rsaKeySz = 2048; /* used in printf */ - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); - bytes = sizeof_rsa_key_der_1024; - rsaKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); - bytes = sizeof_rsa_key_der_2048; -#else - FILE* file = fopen(certRSAname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); - return; - } - - bytes = fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - -#ifdef HAVE_CAVIUM - if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) - printf("RSA init cavium failed\n"); -#endif - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - InitRsaKey(&rsaKey, 0); - ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); - - start = current_time(1); - - for (i = 0; i < times; i++) - ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d encryption took %6.2f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, times); - - if (ret < 0) { - printf("Rsa Public Encrypt failed\n"); - return; - } - - start = current_time(1); - - for (i = 0; i < times; i++) { - byte out[512]; /* for up to 4096 bit */ - RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); - } - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d decryption took %6.2f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, times); - - FreeRsaKey(&rsaKey); -#ifdef HAVE_CAVIUM - RsaFreeCavium(&rsaKey); -#endif -} -#endif - - -#ifndef NO_DH - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certDHname = "certs/dh2048.der" ; -void set_Bench_DH_File(char * cert) { certDHname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certDHname = "certs/dh2048.der" ; -#endif - -void bench_dh(void) -{ - int i; - byte tmp[1024]; - size_t bytes; - word32 idx = 0, pubSz, privSz, pubSz2, privSz2, agreeSz; - - byte pub[256]; /* for 2048 bit */ - byte priv[256]; /* for 2048 bit */ - byte pub2[256]; /* for 2048 bit */ - byte priv2[256]; /* for 2048 bit */ - byte agree[256]; /* for 2048 bit */ - - double start, total, each, milliEach; - DhKey dhKey; - int dhKeySz = 2048; /* used in printf */ - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); - bytes = sizeof_dh_key_der_1024; - dhKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); - bytes = sizeof_dh_key_der_2048; -#else - FILE* file = fopen(certDHname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); - return; - } - - bytes = fread(tmp, 1, sizeof(tmp), file); -#endif /* USE_CERT_BUFFERS */ - - - InitDhKey(&dhKey); - bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); - if (bytes != 0) { - printf("dhekydecode failed, can't benchmark\n"); - #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); - #endif - return; - } - - start = current_time(1); - - for (i = 0; i < times; i++) - DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key generation %6.2f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, times); - - DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); - start = current_time(1); - - for (i = 0; i < times; i++) - DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); - - total = current_time(0) - start; - each = total / times; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key agreement %6.2f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, times); - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); -#endif - FreeDhKey(&dhKey); -} -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) -void bench_rsaKeyGen(void) -{ - RsaKey genKey; - double start, total, each, milliEach; - int i; - const int genTimes = 5; - - /* 1024 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 1024, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("RSA 1024 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); - - /* 2048 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 2048, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("RSA 2048 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} -#endif /* CYASSL_KEY_GEN */ - -#ifdef HAVE_ECC -void bench_eccKeyGen(void) -{ - ecc_key genKey; - double start, total, each, milliEach; - int i; - const int genTimes = 5; - - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - ecc_make_key(&rng, 32, &genKey); - ecc_free(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("ECC 256 key generation %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} - - -void bench_eccKeyAgree(void) -{ - ecc_key genKey, genKey2; - double start, total, each, milliEach; - int i, ret; - const int agreeTimes = 5; - byte shared[1024]; - byte sig[1024]; - byte digest[32]; - word32 x; - - ecc_init(&genKey); - ecc_init(&genKey2); - - ret = ecc_make_key(&rng, 32, &genKey); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - ret = ecc_make_key(&rng, 32, &genKey2); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(shared); - ecc_shared_secret(&genKey, &genKey2, shared, &x); - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DHE key agreement %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - /* make dummy digest */ - for (i = 0; i < (int)sizeof(digest); i++) - digest[i] = i; - - - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(sig); - ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DSA sign time %6.2f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - ecc_free(&genKey2); - ecc_free(&genKey); -} -#endif /* HAVE_ECC */ - - -#ifdef _WIN32 - - #define WIN32_LEAN_AND_MEAN - #include - - double current_time(int reset) - { - (void)reset; - - static int init = 0; - static LARGE_INTEGER freq; - - LARGE_INTEGER count; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = 1; - } - - QueryPerformanceCounter(&count); - - return (double)count.QuadPart / freq.QuadPart; - } - -#elif defined MICROCHIP_PIC32 - - #include - - double current_time(int reset) - { - /* NOTE: core timer tick rate = 40 Mhz, 1 tick = 25 ns */ - - unsigned int ns; - - /* should we reset our timer back to zero? Helps prevent timer - rollover */ - - if (reset) { - WriteCoreTimer(0); - } - - /* get timer in ns */ - ns = ReadCoreTimer() * 25; - - /* return seconds as a double */ - return ( ns / 1000000000.0 ); - } - -#elif defined CYASSL_MDK_ARM - extern double current_time(int reset) ; -#else - - #include - - double current_time(int reset) - { - (void) reset; - - struct timeval tv; - gettimeofday(&tv, 0); - - return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; - } - -#endif /* _WIN32 */ - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c deleted file mode 100644 index d29fbf3b..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/cert_data.c +++ /dev/null @@ -1,28 +0,0 @@ -/* certs_test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* Define initial data for cert buffers */ -#include - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c deleted file mode 100644 index e446583e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c +++ /dev/null @@ -1,756 +0,0 @@ -/* client.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - #define CYASSL_MDK_ARM -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) - /* in case memory tracker wants stats */ - #define CYASSL_TRACK_MEMORY -#endif - -#include - -#ifdef CYASSL_MDK_SHELL -extern void exit_command(void) ; -#define exit(code) exit_command() -#endif - -#include - -#include "examples/client/client.h" - -#define USE_CYASSL_MEMORY - -#ifdef CYASSL_CALLBACKS - int handShakeCB(HandShakeInfo*); - int timeoutCB(TimeoutInfo*); - Timeval timeout; -#endif - - -static void NonBlockingSSL_Connect(CYASSL* ssl) -{ -#ifndef CYASSL_CALLBACKS - int ret = CyaSSL_connect(ssl); -#else - int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); -#endif - int error = CyaSSL_get_error(ssl, 0); - SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); - int select_ret; - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; - - if (error == SSL_ERROR_WANT_READ) - printf("... client would read block\n"); - else - printf("... client would write block\n"); - -#ifdef CYASSL_DTLS - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); -#endif - select_ret = tcp_select(sockfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - #ifndef CYASSL_CALLBACKS - ret = CyaSSL_connect(ssl); - #else - ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); - #endif - error = CyaSSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } -#ifdef CYASSL_DTLS - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } -#endif - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) - err_sys("SSL_connect failed"); -} - - -static void Usage(void) -{ - printf("client " LIBCYASSL_VERSION_STRING - " NOTE: All files relative to CyaSSL home dir\n"); - printf("-? Help, print this usage\n"); - printf("-h Host to connect to, default %s\n", yasslIP); - printf("-p Port to connect on, not 0, default %d\n", yasslPort); - printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", - CLIENT_DEFAULT_VERSION); - printf("-l Cipher list\n"); - printf("-c Certificate file, default %s\n", cliCert); - printf("-k Key file, default %s\n", cliKey); - printf("-A Certificate Authority file, default %s\n", caCert); - printf("-b Benchmark connections and print stats\n"); - printf("-s Use pre Shared keys\n"); - printf("-t Track CyaSSL memory use\n"); - printf("-d Disable peer checks\n"); - printf("-g Send server HTTP GET\n"); - printf("-u Use UDP DTLS," - " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); - printf("-m Match domain name in cert\n"); - printf("-N Use Non-blocking sockets\n"); - printf("-r Resume session\n"); - printf("-f Fewer packets/group messages\n"); - printf("-x Disable client cert/key loading\n"); -#ifdef SHOW_SIZES - printf("-z Print structure sizes\n"); -#endif - printf("-S Use Host Name Indication\n"); -} - - -THREAD_RETURN CYASSL_THREAD client_test(void* args) -{ - SOCKET_T sockfd = 0; - - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - CYASSL* ssl = 0; - - CYASSL* sslResume = 0; - CYASSL_SESSION* session = 0; - char resumeMsg[] = "resuming cyassl!"; - int resumeSz = sizeof(resumeMsg); - - char msg[32] = "hello cyassl!"; /* GET may make bigger */ - char reply[80]; - int input; - int msgSz = (int)strlen(msg); - - int port = yasslPort; - char* host = (char*)yasslIP; - char* domain = (char*)"www.yassl.com"; - - int ch; - int version = CLIENT_INVALID_VERSION; - int usePsk = 0; - int sendGET = 0; - int benchmark = 0; - int doDTLS = 0; - int matchName = 0; - int doPeerCheck = 1; - int nonBlocking = 0; - int resumeSession = 0; - int trackMemory = 0; - int useClientCert = 1; - int fewerPackets = 0; - char* cipherList = NULL; - char* verifyCert = (char*)caCert; - char* ourCert = (char*)cliCert; - char* ourKey = (char*)cliKey; - -#ifdef HAVE_SNI - char* sniHostName = NULL; -#endif - - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef NO_RSA - verifyCert = (char*)eccCert; - ourCert = (char*)cliEccCert; - ourKey = (char*)cliEccKey; -#endif - (void)resumeSz; - (void)session; - (void)sslResume; - (void)trackMemory; - - while ((ch = mygetopt(argc, argv, "?gdusmNrtfxh:p:v:l:A:c:k:b:zS:")) != -1){ - switch (ch) { - case '?' : - Usage(); - exit(EXIT_SUCCESS); - - case 'g' : - sendGET = 1; - break; - - case 'd' : - doPeerCheck = 0; - break; - - case 'u' : - doDTLS = 1; - break; - - case 's' : - usePsk = 1; - break; - - case 't' : - #ifdef USE_CYASSL_MEMORY - trackMemory = 1; - #endif - break; - - case 'm' : - matchName = 1; - break; - - case 'x' : - useClientCert = 0; - break; - - case 'f' : - fewerPackets = 1; - break; - - case 'h' : - host = myoptarg; - domain = myoptarg; - break; - - case 'p' : - port = atoi(myoptarg); - #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) - if (port == 0) - err_sys("port number cannot be 0"); - #endif - break; - - case 'v' : - version = atoi(myoptarg); - if (version < 0 || version > 3) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'l' : - cipherList = myoptarg; - break; - - case 'A' : - verifyCert = myoptarg; - break; - - case 'c' : - ourCert = myoptarg; - break; - - case 'k' : - ourKey = myoptarg; - break; - - case 'b' : - benchmark = atoi(myoptarg); - if (benchmark < 0 || benchmark > 1000000) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'N' : - nonBlocking = 1; - break; - - case 'r' : - resumeSession = 1; - break; - - case 'z' : - #ifndef CYASSL_LEANPSK - CyaSSL_GetObjectSize(); - #endif - break; - - case 'S' : - #ifdef HAVE_SNI - sniHostName = myoptarg; - #endif - break; - - default: - Usage(); - exit(MY_EX_USAGE); - } - } - - myoptind = 0; /* reset for test cases */ - - /* sort out DTLS versus TLS versions */ - if (version == CLIENT_INVALID_VERSION) { - if (doDTLS) - version = CLIENT_DTLS_DEFAULT_VERSION; - else - version = CLIENT_DEFAULT_VERSION; - } - else { - if (doDTLS) { - if (version == 3) - version = -2; - else - version = -1; - } - } - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - InitMemoryTracker(); -#endif - - switch (version) { -#ifndef NO_OLD_TLS - case 0: - method = CyaSSLv3_client_method(); - break; - - - #ifndef NO_TLS - case 1: - method = CyaTLSv1_client_method(); - break; - - case 2: - method = CyaTLSv1_1_client_method(); - break; - #endif /* NO_TLS */ - -#endif /* NO_OLD_TLS */ - -#ifndef NO_TLS - case 3: - method = CyaTLSv1_2_client_method(); - break; -#endif - -#ifdef CYASSL_DTLS - case -1: - method = CyaDTLSv1_client_method(); - break; - - case -2: - method = CyaDTLSv1_2_client_method(); - break; -#endif - - default: - err_sys("Bad SSL version"); - break; - } - - if (method == NULL) - err_sys("unable to get method"); - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - err_sys("unable to get ctx"); - - if (cipherList) - if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) - err_sys("client can't set cipher list 1"); - -#ifdef CYASSL_LEANPSK - usePsk = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - usePsk = 1; -#endif - - if (fewerPackets) - CyaSSL_CTX_set_group_messages(ctx); - - if (usePsk) { -#ifndef NO_PSK - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - if (cipherList == NULL) { - const char *defaultCipherList; - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); - } -#endif - useClientCert = 0; - } - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - if (cipherList == NULL) { - /* don't use EDH, can't sniff tmp keys */ - if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { - err_sys("client can't set cipher list 3"); - } - } -#endif - -#ifdef USER_CA_CB - CyaSSL_CTX_SetCACb(ctx, CaCb); -#endif - -#ifdef VERIFY_CALLBACK - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); -#endif -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (useClientCert){ - if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) - err_sys("can't load client cert file, check file and run from" - " CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load client private key file, check file and run " - "from CyaSSL home dir"); - } - - if (!usePsk) { - if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - } -#endif -#if !defined(NO_CERTS) - if (!usePsk && doPeerCheck == 0) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); -#endif - -#ifdef HAVE_CAVIUM - CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); -#endif - -#ifdef HAVE_SNI - if (sniHostName) - if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) - != SSL_SUCCESS) - err_sys("UseSNI failed"); -#endif - - if (benchmark) { - /* time passed in number of connects give average */ - int times = benchmark; - int i = 0; - - double start = current_time(), avg; - - for (i = 0; i < times; i++) { - tcp_connect(&sockfd, host, port, doDTLS); - - ssl = CyaSSL_new(ctx); - CyaSSL_set_fd(ssl, sockfd); - if (CyaSSL_connect(ssl) != SSL_SUCCESS) - err_sys("SSL_connect failed"); - - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - CloseSocket(sockfd); - } - avg = current_time() - start; - avg /= times; - avg *= 1000; /* milliseconds */ - printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); - - CyaSSL_CTX_free(ctx); - ((func_args*)args)->return_code = 0; - - exit(EXIT_SUCCESS); - } - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) - err_sys("unable to get SSL object"); - - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(ssl, sockfd); -#ifdef HAVE_CRL - if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) - err_sys("can't enable crl check"); - if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) - err_sys("can't load crl, check crlfile and date validity"); - if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) - err_sys("can't set crl callback"); -#endif - if (matchName && doPeerCheck) - CyaSSL_check_domain_name(ssl, domain); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(ssl); - } - else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { - /* see note at top of README */ - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("err = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); - err_sys("SSL_connect failed"); - /* if you're getting an error here */ - } -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - showPeer(ssl); - - if (sendGET) { - printf("SSL connect ok, sending GET...\n"); - msgSz = 28; - strncpy(msg, "GET / HTTP/1.0\r\n\r\n", msgSz); - msg[msgSz] = '\0'; - } - if (CyaSSL_write(ssl, msg, msgSz) != msgSz) - err_sys("SSL_write failed"); - - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server response: %s", reply); - - if (sendGET && (input == (sizeof(reply)-1))) { /* get html */ - while (1) { - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("%s", reply); - if(input < sizeof(reply)-1) - break ; - } - else - break; - } - } - printf("\n"); - } - else if (input < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("CyaSSL_read failed"); - } - -#ifdef CYASSL_CMSIS_RTOS - osDelay(5000) ; -#endif - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - strncpy(msg, "break", 6); - msgSz = (int)strlen(msg); - /* try to send session close */ - CyaSSL_write(ssl, msg, msgSz); - } - session = CyaSSL_get_session(ssl); - sslResume = CyaSSL_new(ctx); - } -#endif - - if (doDTLS == 0) /* don't send alert after "break" command */ - CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ - CyaSSL_free(ssl); - CloseSocket(sockfd); - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - SOCKADDR_IN_T addr; - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(sslResume, sockfd); - CyaSSL_set_session(sslResume, session); - - showPeer(sslResume); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(sslResume, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(sslResume); - } - else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) - err_sys("SSL resume failed"); -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - - if (CyaSSL_session_reused(sslResume)) - printf("reused session id\n"); - else - printf("didn't reuse session id!!!\n"); - - if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) - err_sys("SSL_write failed"); - - if (nonBlocking) { - /* give server a chance to bounce a message back to client */ - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - } - - input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server resume response: %s\n", reply); - } - - /* try to send session break */ - CyaSSL_write(sslResume, msg, msgSz); - - CyaSSL_shutdown(sslResume); - CyaSSL_free(sslResume); - CloseSocket(sockfd); - } -#endif /* NO_SESSION_CACHE */ - - CyaSSL_CTX_free(ctx); - - ((func_args*)args)->return_code = 0; - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - ShowMemoryTracker(); -#endif /* USE_CYASSL_MEMORY */ - - return 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - if (CurrentDir("client") || CurrentDir("build")) - ChangeDirBack(2); - -#ifdef HAVE_STACK_SIZE - StackSizeCheck(&args, client_test); -#else - client_test(&args); -#endif - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - - int myoptind = 0; - char* myoptarg = NULL; - -#endif /* NO_MAIN_DRIVER */ - - - -#ifdef CYASSL_CALLBACKS - - int handShakeCB(HandShakeInfo* info) - { - (void)info; - return 0; - } - - - int timeoutCB(TimeoutInfo* info) - { - (void)info; - return 0; - } - -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c deleted file mode 100644 index 3793d6dd..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoclient.c +++ /dev/null @@ -1,287 +0,0 @@ -/* echoclient.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#include "examples/echoclient/echoclient.h" - -void echoclient_test(void* args) -{ - SOCKET_T sockfd = 0; - - FILE* fin = stdin ; - FILE* fout = stdout; - - int inCreated = 0; - int outCreated = 0; - - char msg[1024]; - char reply[1024+1]; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - - int doDTLS = 0; - int doPSK = 0; - int sendSz; - int argc = 0; - char** argv = 0; - int port = yasslPort; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifndef CYASSL_MDK_ARM - argc = ((func_args*)args)->argc; - argv = ((func_args*)args)->argv; -#endif - - if (argc >= 2) { - fin = fopen(argv[1], "r"); - inCreated = 1; - } - if (argc >= 3) { - fout = fopen(argv[2], "w"); - outCreated = 1; - } - - if (!fin) err_sys("can't open input file"); - if (!fout) err_sys("can't open output file"); - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - -#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) - port = ((func_args*)args)->signal->port; -#endif -#if defined (CYASSL_CALLEE_PORT) - port = CYASSL_CALLEE_PORT ; -#endif - -#if defined(CYASSL_DTLS) - method = DTLSv1_client_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_client_method(); -#else - method = SSLv3_client_method(); -#endif - ctx = SSL_CTX_new(method); - -#ifndef NO_FILESYSTEM - #ifndef NO_RSA - if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif - #ifdef HAVE_ECC - if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif -#elif !defined(NO_CERTS) - if (!doPSK) - load_buffer(ctx, caCert, CYASSL_CA); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); -#endif - } - -#ifdef OPENSSL_EXTRA - SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = SSL_new(ctx); - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, yasslIP, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, yasslIP, port, 0); - } - - SSL_set_fd(ssl, sockfd); -#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) - /* let echoserver bind first, TODO: add Windows signal like pthreads does */ - Sleep(100); -#endif - - if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); - - while (fgets(msg, sizeof(msg), fin) != 0) { - - sendSz = (int)strlen(msg); - - if (SSL_write(ssl, msg, sendSz) != sendSz) - err_sys("SSL_write failed"); - - if (strncmp(msg, "quit", 4) == 0) { - fputs("sending server shutdown command: quit!\n", fout); - break; - } - - if (strncmp(msg, "break", 5) == 0) { - fputs("sending server session close: break!\n", fout); - break; - } - - #ifndef CYASSL_MDK_SHELL - while (sendSz) { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - else - break; - } - #else - { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - } - #endif - } - -#ifdef CYASSL_CMSIS_RTOS - osDelay(5000) ; -#endif - - -#ifdef CYASSL_DTLS - strncpy(msg, "break", 6); - sendSz = (int)strlen(msg); - /* try to tell server done */ - SSL_write(ssl, msg, sendSz); -#else - SSL_shutdown(ssl); -#endif - - SSL_free(ssl); - SSL_CTX_free(ctx); - - fflush(fout); - if (inCreated) fclose(fin); - if (outCreated) fclose(fout); - - CloseSocket(sockfd); - ((func_args*)args)->return_code = 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - - if (CurrentDir("echoclient") || CurrentDir("build")) - ChangeDirBack(2); - echoclient_test(&args); - - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - -#endif /* NO_MAIN_DRIVER */ - - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c deleted file mode 100644 index 132e4c6d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c +++ /dev/null @@ -1,370 +0,0 @@ -/* echoserver.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include -#include - -#ifndef NO_MAIN_DRIVER - #define ECHO_OUT -#endif - -#include "examples/echoserver/echoserver.h" - - -#ifdef SESSION_STATS - CYASSL_API void PrintSessionStats(void); -#endif - -#define SVR_COMMAND_SIZE 256 - -static void SignalReady(void* args, int port) -{ -#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) - /* signal ready to tcp_accept */ - func_args* server_args = (func_args*)args; - tcp_ready* ready = server_args->signal; - pthread_mutex_lock(&ready->mutex); - ready->ready = 1; - ready->port = port; - pthread_cond_signal(&ready->cond); - pthread_mutex_unlock(&ready->mutex); -#endif - (void)args; - (void)port; -} - - -THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) -{ - SOCKET_T sockfd = 0; - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - - int doDTLS = 0; - int doPSK = 0; - int outCreated = 0; - int shutDown = 0; - int useAnyAddr = 0; - int port = yasslPort; - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - -#ifdef ECHO_OUT - FILE* fout = stdout; - if (argc >= 2) { - fout = fopen(argv[1], "w"); - outCreated = 1; - } - if (!fout) err_sys("can't open output file"); -#endif - (void)outCreated; - (void)argc; - (void)argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - - #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ - !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_ARM) - port = 0; - #endif - #if defined(USE_ANY_ADDR) - useAnyAddr = 1; - #endif - tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); - -#if defined(CYASSL_DTLS) - method = CyaDTLSv1_server_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_server_method(); -#else - method = CyaSSLv3_server_method(); -#endif - ctx = CyaSSL_CTX_new(method); - /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#ifndef NO_FILESYSTEM - if (doPSK == 0) { - #ifdef HAVE_NTRU - /* ntru */ - if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load ntru cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) - != SSL_SUCCESS) - err_sys("can't load ntru key file, " - "Please run from CyaSSL home dir"); - #elif defined(HAVE_ECC) - /* ecc */ - if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #elif defined(NO_CERTS) - /* do nothing, just don't load cert files */ - #else - /* normal */ - if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #endif - } /* doPSK */ -#elif !defined(NO_CERTS) - if (!doPSK) { - load_buffer(ctx, svrCert, CYASSL_CERT); - load_buffer(ctx, svrKey, CYASSL_KEY); - } -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 2"); -#endif - } - - SignalReady(args, port); - - while (!shutDown) { - CYASSL* ssl = 0; - char command[SVR_COMMAND_SIZE+1]; - int echoSz = 0; - int clientfd; - int firstRead = 1; - int gotFirstG = 0; - -#ifndef CYASSL_DTLS - SOCKADDR_IN_T client; - socklen_t client_len = sizeof(client); - clientfd = accept(sockfd, (struct sockaddr*)&client, - (ACCEPT_THIRD_T)&client_len); -#else - clientfd = udp_read_connect(sockfd); -#endif - if (clientfd == -1) err_sys("tcp accept failed"); - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) err_sys("SSL_new failed"); - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - CyaSSL_set_fd(ssl, clientfd); - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #elif !defined(NO_CERTS) - SetDH(ssl); /* will repick suites with DHE, higher than PSK */ - #endif - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - printf("SSL_accept failed\n"); - CyaSSL_free(ssl); - CloseSocket(clientfd); - continue; - } -#if defined(PEER_INFO) - showPeer(ssl); -#endif - - while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { - - if (firstRead == 1) { - firstRead = 0; /* browser may send 1 byte 'G' to start */ - if (echoSz == 1 && command[0] == 'G') { - gotFirstG = 1; - continue; - } - } - else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { - strncpy(command, "GET", 4); - /* fall through to normal GET */ - } - - if ( strncmp(command, "quit", 4) == 0) { - printf("client sent quit command: shutting down!\n"); - shutDown = 1; - break; - } - if ( strncmp(command, "break", 5) == 0) { - printf("client sent break command: closing session!\n"); - break; - } -#ifdef SESSION_STATS - if ( strncmp(command, "printstats", 10) == 0) { - PrintSessionStats(); - break; - } -#endif - if ( strncmp(command, "GET", 3) == 0) { - char type[] = "HTTP/1.0 200 ok\r\nContent-type:" - " text/html\r\n\r\n"; - char header[] = "\n
\n";
-                char body[]   = "greetings from CyaSSL\n";
-                char footer[] = "\r\n\r\n";
-            
-                strncpy(command, type, sizeof(type));
-                echoSz = sizeof(type) - 1;
-
-                strncpy(&command[echoSz], header, sizeof(header));
-                echoSz += (int)sizeof(header) - 1;
-                strncpy(&command[echoSz], body, sizeof(body));
-                echoSz += (int)sizeof(body) - 1;
-                strncpy(&command[echoSz], footer, sizeof(footer));
-                echoSz += (int)sizeof(footer);
-
-                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                    err_sys("SSL_write failed");
-                break;
-            }
-            command[echoSz] = 0;
-
-            #ifdef ECHO_OUT
-                fputs(command, fout);
-            #endif
-
-            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                err_sys("SSL_write failed");
-        }
-#ifndef CYASSL_DTLS
-        CyaSSL_shutdown(ssl);
-#endif
-        CyaSSL_free(ssl);
-        CloseSocket(clientfd);
-#ifdef CYASSL_DTLS
-        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
-        SignalReady(args, port);
-#endif
-    }
-#ifdef CYASSL_CMSIS_RTOS
-    osDelay(5000) ;
-#endif
-    CloseSocket(sockfd);
-    CyaSSL_CTX_free(ctx);
-
-#ifdef ECHO_OUT
-    if (outCreated)
-        fclose(fout);
-#endif
-
-    ((func_args*)args)->return_code = 0;
-    return 0;
-}
-
-
-/* so overall tests can pull in test function */
-#ifndef NO_MAIN_DRIVER
-
-    int main(int argc, char** argv)
-    {
-        func_args args;
-
-#ifdef HAVE_CAVIUM
-        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
-        if (ret != 0)
-            err_sys("Cavium OpenNitroxDevice failed");
-#endif /* HAVE_CAVIUM */
-
-        StartTCP();
-
-        args.argc = argc;
-        args.argv = argv;
-
-        CyaSSL_Init();
-#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
-        CyaSSL_Debugging_ON();
-#endif
-        if (CurrentDir("echoserver") || CurrentDir("build"))
-            ChangeDirBack(2);
-        echoserver_test(&args);
-        CyaSSL_Cleanup();
-
-#ifdef HAVE_CAVIUM
-        CspShutdown(CAVIUM_DEV_ID);
-#endif
-        return args.return_code;
-    }
-
-        
-#endif /* NO_MAIN_DRIVER */
-
-
-
-
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c
deleted file mode 100644
index f1b84913..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* main.c
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
- 
-#ifdef HAVE_CONFIG_H
-    #include 
-#endif
-
-#include 
-#include 
-
-#include "cmsis_os.h"
-#include "rl_fs.h" 
-#include "rl_net.h" 
-#include 
-#include "cyassl_MDK_ARM.h"
-#include 
-
-/*-----------------------------------------------------------------------------
- *        Initialize a Flash Memory Card
- *----------------------------------------------------------------------------*/
-static void init_filesystem (void) {
-  int32_t retv;
-
-  retv = finit ("M0:");
-  if (retv == 0) {
-    retv = fmount ("M0:");
-    if (retv == 0) {
-      printf ("Drive M0 ready!\n");
-    }
-    else {
-      printf ("Drive M0 mount failed!\n");
-    }
-  }
-  else {
-    printf ("Drive M0 initialization failed!\n");
-  }
-}
-
-/*-----------------------------------------------------------------------------
- *        TCP/IP tasks
- *----------------------------------------------------------------------------*/
-void tcp_poll (void const *arg)
-{
-    CYASSL_MSG("TCP polling started.\n") ;
-    while (1) {
-        net_main ();
-        osDelay(1) ;
-    }
-}
-
-extern void shell_main(void * args) ;
-extern void init_time(void) ;
-
-osThreadDef (tcp_poll, osPriorityHigh, 1, 0) ;
-/*-----------------------------------------------------------------------------
- *       mian entry 
- *----------------------------------------------------------------------------*/
-int myoptind = 0;
-char* myoptarg = NULL;
-
-int main() 
-{
-    void *arg = NULL ;
-    init_time() ;
-    init_filesystem ();
-    net_initialize() ;
-    osThreadCreate (osThread (tcp_poll), NULL); 
-    osDelay(10000) ;  /* wait for DHCP */
-    #if defined(DEBUG_CYASSL)
-         printf("Turning ON Debug message\n") ;
-         CyaSSL_Debugging_ON() ;
-    #endif
-
-    shell_main(arg) ;   
-
-}
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c
deleted file mode 100644
index 28b6e8c9..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/* server.c
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
-
-#ifdef HAVE_CONFIG_H
-    #include 
-#endif
-
-#include 
-
-#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER)
-    /* in case memory tracker wants stats */
-    #define CYASSL_TRACK_MEMORY
-#endif
-
-#if defined(CYASSL_MDK_ARM)
-    #include 
-    #include 
-    
-    #if defined(CYASSL_MDK5)
-        #include "cmsis_os.h"
-        #include "rl_fs.h" 
-        #include "rl_net.h" 
-    #else
-        #include "rtl.h"
-    #endif
-    
-    #include "cyassl_MDK_ARM.h"
-#endif
-
-#include 
-
-#ifdef CYASSL_MDK_SHELL
-extern void exit_command(void) ;
-#define exit(code) exit_command() 
-#endif
-
-#include 
-
-#include "examples/server/server.h"
-
-
-#ifdef CYASSL_CALLBACKS
-    int srvHandShakeCB(HandShakeInfo*);
-    int srvTimeoutCB(TimeoutInfo*);
-    Timeval srvTo;
-#endif
-
-static void NonBlockingSSL_Accept(SSL* ssl)
-{
-#ifndef CYASSL_CALLBACKS
-    int ret = SSL_accept(ssl);
-#else
-    int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo);
-#endif
-    int error = SSL_get_error(ssl, 0);
-    SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl);
-    int select_ret;
-
-    while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ ||
-                                  error == SSL_ERROR_WANT_WRITE)) {
-        int currTimeout = 1;
-
-        if (error == SSL_ERROR_WANT_READ)
-            printf("... server would read block\n");
-        else
-            printf("... server would write block\n");
-
-#ifdef CYASSL_DTLS
-        currTimeout = CyaSSL_dtls_get_current_timeout(ssl);
-#endif
-        select_ret = tcp_select(sockfd, currTimeout);
-
-        if ((select_ret == TEST_RECV_READY) ||
-                                        (select_ret == TEST_ERROR_READY)) {
-            #ifndef CYASSL_CALLBACKS
-                ret = SSL_accept(ssl);
-            #else
-                ret = CyaSSL_accept_ex(ssl,
-                                    srvHandShakeCB, srvTimeoutCB, srvTo);
-            #endif
-            error = SSL_get_error(ssl, 0);
-        }
-        else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) {
-            error = SSL_ERROR_WANT_READ;
-        }
-#ifdef CYASSL_DTLS
-        else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) &&
-                                            CyaSSL_dtls_got_timeout(ssl) >= 0) {
-            error = SSL_ERROR_WANT_READ;
-        }
-#endif
-        else {
-            error = SSL_FATAL_ERROR;
-        }
-    }
-    if (ret != SSL_SUCCESS)
-        err_sys("SSL_accept failed");
-}
-
-
-static void Usage(void)
-{
-    printf("server "    LIBCYASSL_VERSION_STRING
-           " NOTE: All files relative to CyaSSL home dir\n");
-    printf("-?          Help, print this usage\n");
-    printf("-p     Port to listen on, not 0, default %d\n", yasslPort);
-    printf("-v     SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n",
-                                 SERVER_DEFAULT_VERSION);
-    printf("-l     Cipher list\n");
-    printf("-c    Certificate file,           default %s\n", svrCert);
-    printf("-k    Key file,                   default %s\n", svrKey);
-    printf("-A    Certificate Authority file, default %s\n", cliCert);
-    printf("-d          Disable client cert check\n");
-    printf("-b          Bind to any interface instead of localhost only\n");
-    printf("-s          Use pre Shared keys\n");
-    printf("-t          Track CyaSSL memory use\n");
-    printf("-u          Use UDP DTLS,"
-           " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n");
-    printf("-f          Fewer packets/group messages\n");
-    printf("-N          Use Non-blocking sockets\n");
-    printf("-S     Use Host Name Indication\n");
-}
-
-THREAD_RETURN CYASSL_THREAD server_test(void* args)
-{
-    SOCKET_T sockfd   = 0;
-    SOCKET_T clientfd = 0;
-
-    SSL_METHOD* method = 0;
-    SSL_CTX*    ctx    = 0;
-    SSL*        ssl    = 0;
-
-    char   msg[] = "I hear you fa shizzle!";
-    char   input[80];
-    int    idx;
-    int    ch;
-    int    version = SERVER_DEFAULT_VERSION;
-    int    doCliCertCheck = 1;
-    int    useAnyAddr = 0;
-    int    port = yasslPort;
-    int    usePsk = 0;
-    int    doDTLS = 0;
-    int    useNtruKey   = 0;
-    int    nonBlocking  = 0;
-    int    trackMemory  = 0;
-    int    fewerPackets = 0;
-    char*  cipherList = NULL;
-    char*  verifyCert = (char*)cliCert;
-    char*  ourCert    = (char*)svrCert;
-    char*  ourKey     = (char*)svrKey;
-    int    argc = ((func_args*)args)->argc;
-    char** argv = ((func_args*)args)->argv;
-
-#ifdef HAVE_SNI
-    char*  sniHostName = NULL;
-#endif
-
-    ((func_args*)args)->return_code = -1; /* error state */
-
-#ifdef NO_RSA
-    verifyCert = (char*)cliEccCert;
-    ourCert    = (char*)eccCert;
-    ourKey     = (char*)eccKey;
-#endif
-    (void)trackMemory;
-
-    while ((ch = mygetopt(argc, argv, "?dbstnNufp:v:l:A:c:k:S:")) != -1) {
-        switch (ch) {
-            case '?' :
-                Usage();
-                exit(EXIT_SUCCESS);
-
-            case 'd' :
-                doCliCertCheck = 0;
-                break;
-
-            case 'b' :
-                useAnyAddr = 1;
-                break;
-
-            case 's' :
-                usePsk = 1;
-                break;
-
-            case 't' :
-            #ifdef USE_CYASSL_MEMORY
-                trackMemory = 1;
-            #endif
-                break;
-
-            case 'n' :
-                useNtruKey = 1;
-                break;
-
-            case 'u' :
-                doDTLS  = 1;
-                break;
-
-            case 'f' :
-                fewerPackets = 1;
-                break;
-
-            case 'p' :
-                port = atoi(myoptarg);
-                #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API)
-                    if (port == 0)
-                        err_sys("port number cannot be 0");
-                #endif
-                break;
-
-            case 'v' :
-                version = atoi(myoptarg);
-                if (version < 0 || version > 3) {
-                    Usage();
-                    exit(MY_EX_USAGE);
-                }
-                break;
-
-            case 'l' :
-                cipherList = myoptarg;
-                break;
-
-            case 'A' :
-                verifyCert = myoptarg;
-                break;
-
-            case 'c' :
-                ourCert = myoptarg;
-                break;
-
-            case 'k' :
-                ourKey = myoptarg;
-                break;
-
-            case 'N':
-                nonBlocking = 1;
-                break;
-
-            case 'S' :
-                #ifdef HAVE_SNI
-                    sniHostName = myoptarg;
-                #endif
-                break;
-
-            default:
-                Usage();
-                exit(MY_EX_USAGE);
-        }
-    }
-
-    myoptind = 0;      /* reset for test cases */
-
-    /* sort out DTLS versus TLS versions */
-    if (version == CLIENT_INVALID_VERSION) {
-        if (doDTLS)
-            version = CLIENT_DTLS_DEFAULT_VERSION;
-        else
-            version = CLIENT_DEFAULT_VERSION;
-    }
-    else {
-        if (doDTLS) {
-            if (version == 3)
-                version = -2;
-            else
-                version = -1;
-        }
-    }
-
-#ifdef USE_CYASSL_MEMORY
-    if (trackMemory)
-        InitMemoryTracker(); 
-#endif
-
-    switch (version) {
-#ifndef NO_OLD_TLS
-        case 0:
-            method = SSLv3_server_method();
-            break;
-
-    #ifndef NO_TLS
-        case 1:
-            method = TLSv1_server_method();
-            break;
-
-
-        case 2:
-            method = TLSv1_1_server_method();
-            break;
-
-        #endif
-#endif
-
-#ifndef NO_TLS
-        case 3:
-            method = TLSv1_2_server_method();
-            break;
-#endif
-                
-#ifdef CYASSL_DTLS
-        case -1:
-            method = DTLSv1_server_method();
-            break;
-
-        case -2:
-            method = DTLSv1_2_server_method();
-            break;
-#endif
-
-        default:
-            err_sys("Bad SSL version");
-    }
-
-    if (method == NULL)
-        err_sys("unable to get method");
-
-    ctx = SSL_CTX_new(method);
-    if (ctx == NULL)
-        err_sys("unable to get ctx");
-
-    if (cipherList)
-        if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS)
-            err_sys("server can't set cipher list 1");
-
-#ifdef CYASSL_LEANPSK
-    usePsk = 1;
-#endif
-
-#if defined(NO_RSA) && !defined(HAVE_ECC)
-    usePsk = 1;
-#endif
-
-#ifdef OPENSSL_EXTRA
-    SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
-#endif
-
-    if (fewerPackets)
-        CyaSSL_CTX_set_group_messages(ctx);
-
-#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
-    if (!usePsk) {
-        if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM)
-                                         != SSL_SUCCESS)
-            err_sys("can't load server cert file, check file and run from"
-                    " CyaSSL home dir");
-    }
-#endif
-
-#ifdef HAVE_NTRU
-    if (useNtruKey) {
-        if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey)
-                                               != SSL_SUCCESS)
-            err_sys("can't load ntru key file, "
-                    "Please run from CyaSSL home dir");
-    }
-#endif
-
-#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
-    if (!useNtruKey && !usePsk) {
-        if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM)
-                                         != SSL_SUCCESS)
-            err_sys("can't load server cert file, check file and run from"
-                " CyaSSL home dir");
-    }
-#endif
-
-    if (usePsk) {
-#ifndef NO_PSK
-        SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb);
-        SSL_CTX_use_psk_identity_hint(ctx, "cyassl server");
-        if (cipherList == NULL) {
-            const char *defaultCipherList;
-            #ifdef HAVE_NULL_CIPHER
-                defaultCipherList = "PSK-NULL-SHA256";
-            #else
-                defaultCipherList = "PSK-AES128-CBC-SHA256";
-            #endif
-            if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS)
-                err_sys("server can't set cipher list 2");
-        }
-#endif
-    }
-
-#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
-    /* if not using PSK, verify peer with certs */
-    if (doCliCertCheck && usePsk == 0) {
-        SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER |
-                                SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0);
-        if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS)
-            err_sys("can't load ca file, Please run from CyaSSL home dir");
-    }
-#endif
-
-#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC)
-    /* don't use EDH, can't sniff tmp keys */
-    if (cipherList == NULL) {
-        if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS)
-            err_sys("server can't set cipher list 3");
-    }
-#endif
-
-#ifdef HAVE_SNI
-    if (sniHostName) {
-        if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName,
-                                           XSTRLEN(sniHostName)) != SSL_SUCCESS)
-            err_sys("UseSNI failed");
-        else
-            CyaSSL_CTX_SNI_SetOptions(ctx, CYASSL_SNI_HOST_NAME,
-                                                  CYASSL_SNI_ABORT_ON_MISMATCH);
-    }
-#endif
-
-    ssl = SSL_new(ctx);
-    if (ssl == NULL)
-        err_sys("unable to get SSL");
-    CyaSSL_set_quiet_shutdown(ssl, 1) ;
-#ifdef HAVE_CRL
-    CyaSSL_EnableCRL(ssl, 0);
-    CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR |
-                                                     CYASSL_CRL_START_MON);
-    CyaSSL_SetCRL_Cb(ssl, CRL_CallBack);
-#endif
-        osDelay(5000) ;
-    tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS);
-    if (!doDTLS) 
-        CloseSocket(sockfd);
-
-    SSL_set_fd(ssl, clientfd);
-    if (usePsk == 0) {
-        #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA)
-            CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM);
-        #elif !defined(NO_CERTS)
-            SetDH(ssl);  /* repick suites with DHE, higher priority than PSK */
-        #endif
-    }
-        osDelay(5000) ;
-#ifndef CYASSL_CALLBACKS
-    if (nonBlocking) {
-        CyaSSL_set_using_nonblock(ssl, 1);
-        tcp_set_nonblocking(&clientfd);
-        NonBlockingSSL_Accept(ssl);
-    } else if (SSL_accept(ssl) != SSL_SUCCESS) {
-        int err = SSL_get_error(ssl, 0);
-        char buffer[80];
-        printf("error = %d, %s\n", err, ERR_error_string(err, buffer));
-        err_sys("SSL_accept failed");
-    }
-#else
-    NonBlockingSSL_Accept(ssl);
-#endif
-    showPeer(ssl);
-        osDelay(5000) ;
-    idx = SSL_read(ssl, input, sizeof(input)-1);
-    if (idx > 0) {
-        input[idx] = 0;
-        printf("Client message: %s\n", input);
-
-    }
-    else if (idx < 0) {
-        int readErr = SSL_get_error(ssl, 0);
-        if (readErr != SSL_ERROR_WANT_READ)
-            err_sys("SSL_read failed");
-    }
-
-    if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
-        err_sys("SSL_write failed");
-        
-    SSL_shutdown(ssl);
-    SSL_free(ssl);
-    SSL_CTX_free(ctx);
-    
-    CloseSocket(clientfd);
-    ((func_args*)args)->return_code = 0;
-
-#ifdef USE_CYASSL_MEMORY
-    if (trackMemory)
-        ShowMemoryTracker();
-#endif /* USE_CYASSL_MEMORY */
-
-    return 0;
-}
-
-
-/* so overall tests can pull in test function */
-#ifndef NO_MAIN_DRIVER
-
-    int main(int argc, char** argv)
-    {
-        func_args args;
-
-#ifdef HAVE_CAVIUM
-        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
-        if (ret != 0)
-            err_sys("Cavium OpenNitroxDevice failed");
-#endif /* HAVE_CAVIUM */
-
-        StartTCP();
-
-        args.argc = argc;
-        args.argv = argv;
-
-        CyaSSL_Init();
-#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
-        CyaSSL_Debugging_ON();
-#endif
-        if (CurrentDir("server") || CurrentDir("build"))
-            ChangeDirBack(2);
-   
-#ifdef HAVE_STACK_SIZE
-        StackSizeCheck(&args, server_test);
-#else 
-        server_test(&args);
-#endif
-        CyaSSL_Cleanup();
-
-#ifdef HAVE_CAVIUM
-        CspShutdown(CAVIUM_DEV_ID);
-#endif
-        return args.return_code;
-    }
-
-    int myoptind = 0;
-    char* myoptarg = NULL;
-
-#endif /* NO_MAIN_DRIVER */
-
-
-#ifdef CYASSL_CALLBACKS
-
-    int srvHandShakeCB(HandShakeInfo* info)
-    {
-        (void)info;
-        return 0;
-    }
-
-
-    int srvTimeoutCB(TimeoutInfo* info)
-    {
-        (void)info;
-        return 0;
-    }
-
-#endif
-
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c
deleted file mode 100644
index ff24d7ed..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c
+++ /dev/null
@@ -1,661 +0,0 @@
-/*shell.c
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
- 
- /*** tiny Shell for CyaSSL apps ***/
- 
- #ifdef HAVE_CONFIG_H
-    #include 
-#endif
-
-#include "cyassl/internal.h"
-#undef RNG
-#include 
-
-#if defined(CYASSL_MDK_ARM)
-    #include 
-    #include 
-    #include 
-        #if defined(CYASSL_MDK5)
-            #include "cmsis_os.h"
-        #include "rl_fs.h" 
-    #else
-            #include 
-        #endif
-    #include "cyassl_MDK_ARM.h"
-#endif
-
-#ifdef CYASSL_KEIL_NET
-#include "cyassl/test.h"
-#else
-typedef struct func_args {
-    int    argc;
-    char** argv;
-    int    return_code;
-} func_args;
-#endif
-
-#ifdef NO_ECHOCLIENT
-#define echoclient_test command_not_found
-#endif
-#ifdef NO_ECHOSERVER
-#define echoserver_test command_not_found
-#endif
-#ifdef NO_SIMPLE_CLIENT
-#define client_test command_not_found
-#endif
-#ifdef NO_SIMPLE_SERVER
-#define server_test command_not_found
-#endif
-#ifdef NO_CRYPT_BENCHMARK
-#define benchmark_test command_not_found
-#endif
-#ifdef NO_CRYPT_TEST
-#define ctaocrypt_test command_not_found
-#endif
-
-#ifndef CYASSL_KEIL_NET
-#define ipaddr_comm command_not_found
-#endif
-
-#if !defined(HAVE_KEIL_RTX)
-#define stack_comm command_not_found
-#endif
-
-
-#if !defined(DEBUG_CYASSL)
-#define dbg_comm command_not_found
-#endif
-
-
-void command_not_found(void *argv) {
-        printf("Command not found\n") ;
-}
-
-extern void echoclient_test(void *args) ;
-extern void echoserver_test(void *args) ;
-extern void benchmark_test(void *args) ;
-extern void ctaocrypt_test(void *args) ;
-extern void client_test(void *args) ;
-extern void server_test(void *args) ;
-extern void kill_task(void *args) ;
-extern void time_main(void *args) ;
-extern void ipaddr_comm(void *args) ;
-extern void stack_comm(void *args) ;
-extern void for_command(void *args) ;
-extern void dbg_comm(void *arg) ;
-extern void help_comm(void *arg) ;
-
-#if !defined(NO_CRYPT_TEST)
-
-#ifndef NO_MD5
-extern void md5_test(void *arg) ;
-#endif
-#ifdef CYASSL_MD2
-extern void md2_test(void *arg) ;
-#endif
-#ifndef NO_MD4
-extern void md4_test(void *arg) ;
-#endif
-
-extern void sha_test(void *arg) ;
-
-#ifndef NO_SHA256
-extern void sha256_test(void *arg) ;
-#endif
-#ifdef CYASSL_SHA384
-extern void sha384_test(void *arg) ;
-#endif
-
-#ifdef CYASSL_SHA512
-extern void sha512_test(void *arg) ;
-#endif
-
-#ifdef CYASSL_RIPEMD
-extern void ripemd_test(void *arg) ;
-#endif
-#ifndef NO_HMAC
-    #ifndef NO_MD5
-extern void hmac_md5_test(void *arg) ;
-    #endif
-extern void hmac_sha_test(void *arg) ;
-
-    #ifndef NO_SHA256
-extern void hmac_sha256_test(void *arg) ;
-    #endif
-
-    #ifdef CYASSL_SHA384
-extern void hmac_sha384_test(void *arg) ;
-    #endif
-#endif
-#ifndef NO_RC4
-extern void arc4_test(void *arg) ;
-#endif
-
-#ifndef NO_HC128
-extern void hc128_test(void *arg) ;
-#endif
-
-#ifndef NO_RABBIT
-extern void rabbit_test(void *arg) ;
-#endif
-
-#ifndef NO_DES3
-extern void des_test(void *arg) ;
-extern void des3_test(void *arg) ;
-#endif
-
-#ifndef NO_AES
-extern void aes_test(void *arg) ;
-#ifdef HAVE_AESGCM
-extern void aesgcm_test(void *arg) ;
-#endif
-
-#ifdef HAVE_AESCCM
-extern void aesccm_test(void *arg) ;
-#endif
-#endif
-
-#ifdef HAVE_CAMELLIA
-extern void camellia_test(void *arg) ;
-#endif
-extern void random_test(void *arg) ;
-
-#ifndef NO_RSA
-extern void rsa_test(void *arg) ;
-#endif
-
-#ifndef NO_DH
-extern void dh_test(void *arg) ;
-#endif
-
-#ifndef NO_DSA
-extern void dsa_test(void *arg) ;
-#endif
-    
-#ifndef NO_PWDBASED
-extern void pwdbased_test(void *arg) ;
-#endif
-
-#ifdef OPENSSL_EXTRA
-extern void openssl_test(void *arg) ;
-#endif
-
-#ifdef HAVE_ECC
-extern void ecc_test(void *arg) ;
-#endif
-
-#endif /* NO_CRYPT_TEST */
-
-static struct {
-  const char *command ;
-    void (*func)(void *args) ;
-}   commandTable[] = {
-    "echoclient", echoclient_test,
-    "echoserver", echoserver_test,
-    "benchmark", benchmark_test,
-    "test", ctaocrypt_test,
-    "client", client_test,
-    "server", server_test,
-    "time", time_main,          /* get/set RTC:  [-d mm/dd/yyyy] [-t hh:mm:ss]*/
-    "ipaddr", ipaddr_comm,      /* TBD */
-    "stack", stack_comm,        /* On/Off check stack size */
-    "for", for_command,         /* iterate next command X times */
-    "debug", dbg_comm,          /* On/Off debug message  */
-    "help", help_comm,          /* Breif description about the commands */
-
-    /** short name **/
-    "ec", echoclient_test,
-    "es", echoserver_test,
-    "bm", benchmark_test,
-    "te", ctaocrypt_test,
-    "cl", client_test,
-    "sv", server_test,
-    "ip", ipaddr_comm,
-    "st", stack_comm,
-  "dbg", dbg_comm,
-    "?",    help_comm,
-
-/*** test suites ****/
-#if !defined(NO_CRYPT_TEST)
-#ifndef NO_MD5
-  "md5",  md5_test,
-#endif
-#ifdef CYASSL_MD2
-  "md2",  md2_test,
-#endif
-#ifndef NO_MD4
-  "md4",  md4_test,
-#endif
-  "sha",  sha_test,
-#ifndef NO_SHA256
-  "sha256",  sha256_test,
-#endif
-#ifdef CYASSL_SHA384
-  "sha384",  sha384_test,
-#endif
-#ifdef CYASSL_SHA512
-  "sha512",  sha512_test,
-#endif
-#ifdef CYASSL_RIPEMD
-  "ripemd",  ripemd_test,
-#endif
-#ifndef NO_HMAC
-  #ifndef NO_MD5
-  "hmac_md5",  hmac_md5_test,
-    #endif
-  "hmac_sha",  hmac_sha_test,
-    #ifndef NO_SHA256
-  "hmac_sha256",  hmac_sha256_test,
-    #endif
-    #ifdef CYASSL_SHA384
-  "hmac_sha384",  hmac_sha384_test,
-  #endif
-#endif
-#ifndef NO_RC4
-    "arc4",  arc4_test,
-#endif
-#ifndef NO_HC128
-  "hc128",  hc128_test,
-#endif
-#ifndef NO_RABBIT
-  "rabbit",  rabbit_test,
-#endif
-#ifndef NO_DES3
-  "des",  des_test,
-  "des3",  des3_test,
-#endif  
-#ifndef NO_AES  
-  "aes",  aes_test,
-    #ifdef HAVE_AESGCM
-  "aesgcm",  aesgcm_test,
-    #endif
-    #ifdef HAVE_AESCCM
-  "aesccm",  aesccm_test,
-    #endif
-#endif
-
-#ifdef HAVE_CAMELLIA
-  "camellia",  camellia_test,
-#endif
-  "random",  random_test,
-#ifndef NO_RSA
-  "rsa",  rsa_test,
-#endif
-#ifndef NO_DH
-  "dh",  dh_test,
-#endif
-#ifndef NO_DSA
-    "dsa",  dsa_test,
-#endif 
-#ifndef NO_PWDBASED
-  "pwdbased",  pwdbased_test,
-#endif  
-#ifdef OPENSSL_EXTRA
-  "openssl",  openssl_test,
-#endif
-#ifdef HAVE_ECC
-  "ecc",  ecc_test,
-#endif
-
-#endif /* NO_CRYPT_TEST */
-
-    "",  NULL
-} ;
-
-enum jobtype { FORGROUND, BACKGROUND }  ;
-
-#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n')
-
-static int BackGround = 0 ; /* 1: background job is running */
-
-/*******  Get Command Line *****************************/
-static int getline(char * line, int sz, func_args *args, int*bf_flg) 
-{
-    char * ret ;
-    int i ;
-    
-    #define MAXARGS 10
-    #define MAXARGLEN 30
-    static char *argv[MAXARGS] ;
-    args->argv = argv ;
-    
-    putchar('>') ;
-    fflush(stdout) ;
-    ret = fgets(line, sz, stdin) ;
-    
-    #define SHELL_ERROR_FGETS -102
-    if(ret != line) return(SHELL_ERROR_FGETS) ;
-    
-    if(line[strlen(line)-2] == '&') {
-        (*bf_flg) = BACKGROUND ;
-        line[strlen(line)-2] = '\n' ;
-    } else {
-        (*bf_flg) = FORGROUND ;
-    }
-    args->argc = 0 ;
-    for(i=0; iargv[args->argc] = &(line[i]) ;
-        while(!IF_DELIMITER(line[i])) i++ ;
-        args->argc++ ;
-        if(line[i] == '\n') {
-            line[i]  = '\0' ;
-            break ;
-        } else {
-            line[i]  = '\0' ;
-        }
-    }
-    return i ;
-}
-
-
-/************* Embedded Shell Commands **********************************/
-#define IP_SIZE 16
-
-#ifdef CYASSL_KEIL_NET
-static void ipaddr_comm(void *args) 
-{
-    if(((func_args *)args)->argc == 1) {
-            printf("IP addr: %s, port %d\n", yasslIP, yasslPort) ;
-    } else {
-        if(BackGround != 0) {
-        printf("Cannot change IP addr while background server is running\n") ;
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-'&& 
-                  ((func_args *)args)->argv[1][1] == 'a' ) {
-/*          strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-' && 
-                  ((func_args *)args)->argv[1][1] == 'p' ) {
-/*          yasslPort = atoi(((func_args *)args)->argv[2]) ; */
-        } else printf("Invalid argument\n") ; 
-    }
-}
-
-#endif
-
-
-
-#if defined(HAVE_KEIL_RTX)
-static int stack_ck = 0 ;
-
-void stack_comm(void *args) 
-{
-    if(stack_ck) {
-        printf("Stack Check: Off\n") ;
-        stack_ck = 0 ;
-    } else {
-        printf("Stack Check: On\n") ;
-        stack_ck = 1 ;
-    }
-}
-    
-#define FILL_PATTERN 0xa596695a
-void stack_fill(char * stack, int size)
-{
-    int i ;
-
-    if(stack_ck == 0)return ;
-    for(i=1; iargc == 1) {
-        printf("For %d times\n", for_iteration) ;
-    } else if( args == NULL || ((func_args *)args)->argc == 2) {
-        for_iteration = atoi(((func_args *)args)->argv[1]) ;
-    } else printf("Invalid argument\n") ;
-}
-
-
-#if defined(DEBUG_CYASSL)
-
-static int CyasslDebug = 1 ;
-
-static void dbg_comm(void *args) 
-{
-    if(CyasslDebug == 1) {
-        CyasslDebug = 0 ;
-        printf("Turning OFF Debug message\n") ;
-        CyaSSL_Debugging_OFF() ;
-    } else {
-        CyasslDebug = 1 ;
-        printf("Turning ON Debug message\n") ;
-        CyaSSL_Debugging_ON() ;
-    }
-}
-#endif
-
-static void help_comm(void *args) 
-{
-    static char *commands[] = {
-        "time [-d mm/dd/yyyy][-t hh:mm:ss]  : set/get time, for cert validation",
-        "test", 
-        "benchmark",
-        "echoserver&            : simple echo server in background mode",
-        "echoclient             : simple echo client followed by any input string, or \"quit\", \"break\"",
-        "server&                : simple server in background mode",
-        "client                 : simple client",
-        "client -g -v [0123] -h xxx.xxx.xxx.xxx -p 443  : usage example",
-        "server/client -h        :  help for server/client command",
-        "help",
-        ""  
-    } ;
-
-    int i ;
-    printf("Commands:\n") ;
-    for(i=0; commands[i][0] ; i++)
-        printf("    %s\n", commands[i]) ;
-
-}
-
-
-
-#define BG_JOB_STACK_SIZE 8000
-#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
-                                                   defined(HAVE_KEIL_RTX)
-#if !defined(CYASSL_CMSIS_RTOS)
-static char bg_job_stack[BG_JOB_STACK_SIZE] ;
-#endif
-
-#endif
-
-#define COMMAND_STACK_SIZE 10000
-#if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
-static char command_stack[COMMAND_STACK_SIZE] ;
-#endif
-
-
-#ifdef  HAVE_KEIL_RTX
-static   CyaSSL_Mutex command_mutex ;
-#endif
-
-void exit_command(void) {
-	  printf("Command Aborted\n") ;
-    #ifdef CYASSL_CMSIS_RTOS
-        osThreadTerminate(osThreadGetId()) ;
-    #else
-        os_tsk_delete_self() ;
-    #endif
-}
-
-
-/***********    Invoke Forground Command  *********************/
-static void command_invoke(void const *args) 
-{
-    void (*func)(void const * ) ;
-    int i,iteration ;
-    
-    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
-    #ifdef  HAVE_KEIL_RTX
-    LockMutex((CyaSSL_Mutex *)&command_mutex) ;
-    #endif
-    iteration = for_iteration ;
-    for(i=0; i< iteration; i++) {
-        if(iteration > 1) printf("--- Start for %d ---->\n", i) ;
-        #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
-        stack_fill(command_stack, COMMAND_STACK_SIZE) ;
-        #endif
-                
-        func(args) ;        /* invoke command */
-                
-        #if defined(HAVE_KEIL_RTX)&& !defined(CYASSL_CMSIS_RTOS)
-        stack_check(command_stack, COMMAND_STACK_SIZE) ;
-        #endif
-    }
-
-    if(iteration > 1) 
-    for_iteration = 1 ;
-    osDelay(20000) ;
-    #ifdef HAVE_KEIL_RTX
-        UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
-        #ifdef CYASSL_CMSIS_RTOS
-            osThreadTerminate(osThreadGetId()) ;
-        #else
-            os_tsk_delete_self() ;
-        #endif
-    #endif
-}
-
-#if defined(HAVE_KEIL_RTX)
-/*******  Invoke Background Job   *******************************/
-static void bg_job_invoke(void const *args) 
-{
-    void (*func)(void const * ) ;
-    BackGround = 1 ; 
-    #if defined(HAVE_KEIL_RTX)&& !defined(CYASSL_CMSIS_RTOS)
-    stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
-    #endif
-
-    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
-    func(args) ;        /* invoke command */
-    #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
-    stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
-    #endif
-    
-    osDelay(20000) ;
-    BackGround = 0 ;
-
-    #ifdef CYASSL_CMSIS_RTOS
-        osThreadTerminate(osThreadGetId()) ;
-    #else   
-        os_tsk_delete_self() ; ;
-    #endif
-}
-#endif
-
-#define LINESIZE 100
-static char line[LINESIZE] ;
-
-#if defined(CYASSL_CMSIS_RTOS)
-    osThreadDef (command_invoke, osPriorityAboveNormal , 1, COMMAND_STACK_SIZE) ;
-    osThreadDef (bg_job_invoke, osPriorityNormal , 1 , BG_JOB_STACK_SIZE) ;
-#endif
-/********* SHEULL MAIN LOOP ***********************************/
-void shell_main(void *arg) {
-    int i ; 
-    func_args args ;
-    int bf_flg ;
-   
-    i = BackGround ; 
-        /* Dummy for avoiding warning: BackGround is defined but not used. */
-    
- #if defined(HAVE_KEIL_RTX)
-    InitMutex(&command_mutex) ;
-#endif
-    time_main(NULL) ;
-    help_comm(NULL) ;
-    
-    printf("Starting Shell\n") ;
-    while(1) {
-        if(getline(line,  LINESIZE, &args, &bf_flg) > 0) {
-        for(i=0; commandTable[i].func != NULL; i++) {
-            if(strcmp(commandTable[i].command, args.argv[0]) == 0) {
-            args.argv[0] = (char *) commandTable[i].func ;
-                if(bf_flg == FORGROUND) {
-                    #if defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
-                        UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
-                        os_tsk_create_user_ex( (void(*)(void *))&command_invoke, 7,
-                             command_stack, COMMAND_STACK_SIZE, &args) ;
-                                      #else
-                                            #if defined(CYASSL_CMSIS_RTOS)
-                                UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
-                          osThreadCreate (osThread (command_invoke) , &args);   
-                          #else
-                          command_invoke(&args) ;
-                                            #endif
-                    #endif
-                    #ifdef  HAVE_KEIL_RTX
-                    LockMutex((CyaSSL_Mutex *)&command_mutex) ;
-                    #endif
-                } else {
-                    #if (!defined(NO_SIMPLE_SERVER) && \
-                         !defined(NO_ECHOSERVER)) && \
-                         defined(HAVE_KEIL_RTX)
-                    if(BackGround != 0) {
-                        printf("Multiple background servers not supported.\n") ;
-                    } else {
-                        printf("\"%s\" is running with the background mode.\n", 
-                                                     commandTable[i].command) ;
-                        #if  defined(HAVE_KEIL_RTX) && !defined(CYASSL_CMSIS_RTOS)
-                             os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, 
-                                   6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
-                        #else
-                                osThreadCreate (osThread (bg_job_invoke),  &args); 
-                                osDelay (500) ;
-                        #endif
-                    }
-                    #else
-                    printf("Invalid Command: no background job\n") ;
-                    #endif
-                }
-                break ;
-            }
-        }
-        if(commandTable[i].func == NULL)
-            printf("Command not found\n") ;
-        }
-    }
-}
-
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c
deleted file mode 100644
index 9c0201a6..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c
+++ /dev/null
@@ -1,3393 +0,0 @@
-/* test.c
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
-
-#ifdef HAVE_CONFIG_H
-    #include 
-#endif
-
-#include 
-
-#ifndef NO_CRYPT_TEST
-
-#ifdef CYASSL_TEST_CERT
-    #include 
-#else
-    #include 
-#endif
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#ifdef HAVE_ECC
-    #include 
-#endif    
-#ifdef HAVE_BLAKE2
-    #include 
-#endif    
-#ifdef HAVE_LIBZ
-    #include 
-#endif
-
-#ifdef _MSC_VER
-    /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */
-    #pragma warning(disable: 4996)
-#endif
-
-#ifdef OPENSSL_EXTRA
-    #include 
-    #include 
-    #include 
-    #include 
-#endif
-
-#if defined(CYASSL_MDK_ARM)
-        #include 
-        #include 
-    extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ;
-    #define fopen CyaSSL_fopen
-#endif
-
-#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048)
-    /* include test cert and key buffers for use with NO_FILESYSTEM */
-    #if defined(CYASSL_MDK_ARM) && !defined(SINGLE_THREADED)
-        #include "cert_data.h" 
-                        /* use certs_test.c for initial data, so other 
-                                               commands can share the data. */
-    #else
-        #include 
-    #endif
-#endif
-
-#ifdef HAVE_NTRU
-    #include "crypto_ntru.h"
-#endif
-#ifdef HAVE_CAVIUM
-    #include "cavium_sysdep.h"
-    #include "cavium_common.h"
-    #include "cavium_ioctl.h"
-#endif
-
-#ifdef FREESCALE_MQX
-    #include 
-    #include 
-#else
-    #include 
-#endif
-
-
-#ifdef THREADX
-    /* since just testing, use THREADX log printf instead */
-    int dc_log_printf(char*, ...);
-        #undef printf
-        #define printf dc_log_printf
-#endif
-
-#include "ctaocrypt/test/test.h"
-
-
-typedef struct testVector {
-    const char*  input;
-    const char*  output; 
-    size_t inLen;
-    size_t outLen;
-} testVector;
-
-int  md2_test(void);
-int  md5_test(void);
-int  md4_test(void);
-int  sha_test(void);
-int  sha256_test(void);
-int  sha512_test(void);
-int  sha384_test(void);
-int  hmac_md5_test(void);
-int  hmac_sha_test(void);
-int  hmac_sha256_test(void);
-int  hmac_sha384_test(void);
-int  hmac_sha512_test(void);
-int  arc4_test(void);
-int  hc128_test(void);
-int  rabbit_test(void);
-int  des_test(void);
-int  des3_test(void);
-int  aes_test(void);
-int  aesgcm_test(void);
-int  aesccm_test(void);
-int  camellia_test(void);
-int  rsa_test(void);
-int  dh_test(void);
-int  dsa_test(void);
-int  random_test(void);
-int  pwdbased_test(void);
-int  ripemd_test(void);
-int  openssl_test(void);   /* test mini api */
-int pbkdf1_test(void);
-int pkcs12_test(void);
-int pbkdf2_test(void);
-#ifdef HAVE_ECC
-    int  ecc_test(void);
-#endif
-#ifdef HAVE_BLAKE2
-    int  blake2b_test(void);
-#endif
-#ifdef HAVE_LIBZ
-    int compress_test(void);
-#endif
-
-
-
-static void err_sys(const char* msg, int es)
-{
-    printf("%s error = %d\n", msg, es);
-    #if !defined(THREADX) && !defined(CYASSL_MDK_ARM)
-    if (msg)
-        exit(es);
-    #endif
-    return;
-}
-
-/* func_args from test.h, so don't have to pull in other junk */
-typedef struct func_args {
-    int    argc;
-    char** argv;
-    int    return_code;
-} func_args;
-
-
-
-void ctaocrypt_test(void* args)
-{
-    int ret = 0;
-
-    ((func_args*)args)->return_code = -1; /* error state */
-
-#if !defined(NO_BIG_INT)
-    if (CheckCtcSettings() != 1)
-        err_sys("Build vs runtime math mismatch\n", -1234);
-
-#ifdef USE_FAST_MATH
-    if (CheckFastMathSettings() != 1)
-        err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235);
-#endif /* USE_FAST_MATH */
-#endif /* !NO_BIG_INT */
-
-
-#ifndef NO_MD5
-    if ( (ret = md5_test()) != 0) 
-        err_sys("MD5      test failed!\n", ret);
-    else
-        printf( "MD5      test passed!\n");
-#endif
-
-#ifdef CYASSL_MD2
-    if ( (ret = md2_test()) != 0) 
-        err_sys("MD2      test failed!\n", ret);
-    else
-        printf( "MD2      test passed!\n");
-#endif
-
-#ifndef NO_MD4
-    if ( (ret = md4_test()) != 0) 
-        err_sys("MD4      test failed!\n", ret);
-    else
-        printf( "MD4      test passed!\n");
-#endif
-
-#ifndef NO_SHA
-    if ( (ret = sha_test()) != 0) 
-        err_sys("SHA      test failed!\n", ret);
-    else
-        printf( "SHA      test passed!\n");
-#endif
-
-#ifndef NO_SHA256
-    if ( (ret = sha256_test()) != 0) 
-        err_sys("SHA-256  test failed!\n", ret);
-    else
-        printf( "SHA-256  test passed!\n");
-#endif
-
-#ifdef CYASSL_SHA384
-    if ( (ret = sha384_test()) != 0) 
-        err_sys("SHA-384  test failed!\n", ret);
-    else
-        printf( "SHA-384  test passed!\n");
-#endif
-
-#ifdef CYASSL_SHA512
-    if ( (ret = sha512_test()) != 0) 
-        err_sys("SHA-512  test failed!\n", ret);
-    else
-        printf( "SHA-512  test passed!\n");
-#endif
-
-#ifdef CYASSL_RIPEMD
-    if ( (ret = ripemd_test()) != 0) 
-        err_sys("RIPEMD   test failed!\n", ret);
-    else
-        printf( "RIPEMD   test passed!\n");
-#endif
-
-#ifdef HAVE_BLAKE2 
-    if ( (ret = blake2b_test()) != 0) 
-        err_sys("BLAKE2b  test failed!\n", ret);
-    else
-        printf( "BLAKE2b  test passed!\n");
-#endif
-
-#ifndef NO_HMAC
-    #ifndef NO_MD5
-        if ( (ret = hmac_md5_test()) != 0) 
-            err_sys("HMAC-MD5 test failed!\n", ret);
-        else
-            printf( "HMAC-MD5 test passed!\n");
-    #endif
-
-    #ifndef NO_SHA
-    if ( (ret = hmac_sha_test()) != 0) 
-        err_sys("HMAC-SHA test failed!\n", ret);
-    else
-        printf( "HMAC-SHA test passed!\n");
-    #endif
-
-    #ifndef NO_SHA256
-        if ( (ret = hmac_sha256_test()) != 0) 
-            err_sys("HMAC-SHA256 test failed!\n", ret);
-        else
-            printf( "HMAC-SHA256 test passed!\n");
-    #endif
-
-    #ifdef CYASSL_SHA384
-        if ( (ret = hmac_sha384_test()) != 0) 
-            err_sys("HMAC-SHA384 test failed!\n", ret);
-        else
-            printf( "HMAC-SHA384 test passed!\n");
-    #endif
-
-    #ifdef CYASSL_SHA512
-        if ( (ret = hmac_sha512_test()) != 0) 
-            err_sys("HMAC-SHA512 test failed!\n", ret);
-        else
-            printf( "HMAC-SHA512 test passed!\n");
-    #endif
-
-#endif
-
-#ifndef NO_RC4
-    if ( (ret = arc4_test()) != 0)
-        err_sys("ARC4     test failed!\n", ret);
-    else
-        printf( "ARC4     test passed!\n");
-#endif
-
-#ifndef HAVE_HC128
-    if ( (ret = hc128_test()) != 0)
-        err_sys("HC-128   test failed!\n", ret);
-    else
-        printf( "HC-128   test passed!\n");
-#endif
-
-#ifndef NO_RABBIT
-    if ( (ret = rabbit_test()) != 0)
-        err_sys("Rabbit   test failed!\n", ret);
-    else
-        printf( "Rabbit   test passed!\n");
-#endif
-
-#ifndef NO_DES3
-    if ( (ret = des_test()) != 0)
-        err_sys("DES      test failed!\n", ret);
-    else
-        printf( "DES      test passed!\n");
-#endif
-
-#ifndef NO_DES3
-    if ( (ret = des3_test()) != 0)
-        err_sys("DES3     test failed!\n", ret);
-    else
-        printf( "DES3     test passed!\n");
-#endif
-
-#ifndef NO_AES
-    if ( (ret = aes_test()) != 0)
-        err_sys("AES      test failed!\n", ret);
-    else
-        printf( "AES      test passed!\n");
-
-#ifdef HAVE_AESGCM
-    if ( (ret = aesgcm_test()) != 0)
-        err_sys("AES-GCM  test failed!\n", ret);
-    else
-        printf( "AES-GCM  test passed!\n");
-#endif
-
-#ifdef HAVE_AESCCM
-    if ( (ret = aesccm_test()) != 0)
-        err_sys("AES-CCM  test failed!\n", ret);
-    else
-        printf( "AES-CCM  test passed!\n");
-#endif
-#endif
-
-#ifdef HAVE_CAMELLIA
-    if ( (ret = camellia_test()) != 0)
-        err_sys("CAMELLIA test failed!\n", ret);
-    else
-        printf( "CAMELLIA test passed!\n");
-#endif
-
-    if ( (ret = random_test()) != 0)
-        err_sys("RANDOM   test failed!\n", ret);
-    else
-        printf( "RANDOM   test passed!\n");
-
-#ifndef NO_RSA
-    if ( (ret = rsa_test()) != 0) 
-        err_sys("RSA      test failed!\n", ret);
-    else
-        printf( "RSA      test passed!\n");
-#endif
-
-#ifndef NO_DH
-    if ( (ret = dh_test()) != 0) 
-        err_sys("DH       test failed!\n", ret);
-    else
-        printf( "DH       test passed!\n");
-#endif
-
-#ifndef NO_DSA
-    if ( (ret = dsa_test()) != 0) 
-        err_sys("DSA      test failed!\n", ret);
-    else
-        printf( "DSA      test passed!\n");
-#endif
-    
-#ifndef NO_PWDBASED
-    if ( (ret = pwdbased_test()) != 0) 
-        err_sys("PWDBASED test failed!\n", ret);
-    else
-        printf( "PWDBASED test passed!\n");
-#endif
-    
-#ifdef OPENSSL_EXTRA
-    if ( (ret = openssl_test()) != 0) 
-        err_sys("OPENSSL  test failed!\n", ret);
-    else
-        printf( "OPENSSL  test passed!\n");
-#endif
-
-#ifdef HAVE_ECC
-    if ( (ret = ecc_test()) != 0) 
-        err_sys("ECC      test failed!\n", ret);
-    else
-        printf( "ECC      test passed!\n");
-#endif
-
-#ifdef HAVE_LIBZ
-    if ( (ret = compress_test()) != 0) 
-        err_sys("COMPRESS test failed!\n", ret);
-    else
-        printf( "COMPRESS test passed!\n");
-#endif
-
-    ((func_args*)args)->return_code = ret;
-}
-
-
-#ifndef NO_MAIN_DRIVER
-
-#ifdef HAVE_CAVIUM
-
-static int OpenNitroxDevice(int dma_mode,int dev_id)
-{
-   Csp1CoreAssignment core_assign;
-   Uint32             device;
-
-   if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID))
-      return -1;
-   if (Csp1GetDevType(&device))
-      return -1;
-   if (device != NPX_DEVICE) {
-      if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT,
-                (Uint32 *)&core_assign)!= 0)
-         return -1;
-   }
-   CspShutdown(CAVIUM_DEV_ID);
-
-   return CspInitialize(dma_mode, dev_id);
-}
-
-#endif /* HAVE_CAVIUM */
-
-    /* so overall tests can pull in test function */
-
-    int main(int argc, char** argv)
-    {
-
-        func_args args;
-
-            
-#ifdef HAVE_CAVIUM
-        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
-        if (ret != 0)
-            err_sys("Cavium OpenNitroxDevice failed", -1236);
-#endif /* HAVE_CAVIUM */
-
-        args.argc = argc;
-        args.argv = argv;
-
-        ctaocrypt_test(&args);
-
-#ifdef HAVE_CAVIUM
-        CspShutdown(CAVIUM_DEV_ID);
-#endif
-                
-        return args.return_code;
-    }
-
-#endif /* NO_MAIN_DRIVER */
-
-
-#ifdef CYASSL_MD2
-int md2_test()
-{
-    Md2  md2;
-    byte hash[MD2_DIGEST_SIZE];
-
-    testVector a, b, c, d, e, f, g;
-    testVector test_md2[7];
-    int times = sizeof(test_md2) / sizeof(testVector), i;
-
-    a.input  = "";
-    a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69"
-               "\x27\x73";
-    a.inLen  = strlen(a.input);
-    a.outLen = MD2_DIGEST_SIZE;
-
-    b.input  = "a";
-    b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0"
-               "\xb5\xd1";
-    b.inLen  = strlen(b.input);
-    b.outLen = MD2_DIGEST_SIZE;
-
-    c.input  = "abc";
-    c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde"
-               "\xd6\xbb";
-    c.inLen  = strlen(c.input);
-    c.outLen = MD2_DIGEST_SIZE;
-
-    d.input  = "message digest";
-    d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe"
-               "\x06\xb0";
-    d.inLen  = strlen(d.input);
-    d.outLen = MD2_DIGEST_SIZE;
-
-    e.input  = "abcdefghijklmnopqrstuvwxyz";
-    e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47"
-               "\x94\x0b";
-    e.inLen  = strlen(e.input);
-    e.outLen = MD2_DIGEST_SIZE;
-
-    f.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
-               "6789";
-    f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03"
-               "\x38\xcd";
-    f.inLen  = strlen(f.input);
-    f.outLen = MD2_DIGEST_SIZE;
-
-    g.input  = "1234567890123456789012345678901234567890123456789012345678"
-               "9012345678901234567890";
-    g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3"
-               "\xef\xd8";
-    g.inLen  = strlen(g.input);
-    g.outLen = MD2_DIGEST_SIZE;
-
-    test_md2[0] = a;
-    test_md2[1] = b;
-    test_md2[2] = c;
-    test_md2[3] = d;
-    test_md2[4] = e;
-    test_md2[5] = f;
-    test_md2[6] = g;
-
-    InitMd2(&md2);
-
-    for (i = 0; i < times; ++i) {
-        Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen);
-        Md2Final(&md2, hash);
-
-        if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0)
-            return -155 - i;
-    }
-
-    return 0;
-}
-#endif 
-
-#ifndef NO_MD5
-int md5_test(void)
-{
-    Md5  md5;
-    byte hash[MD5_DIGEST_SIZE];
-
-    testVector a, b, c, d, e;
-    testVector test_md5[5];
-    int times = sizeof(test_md5) / sizeof(testVector), i;
-
-    a.input  = "abc";
-    a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f"
-               "\x72";
-    a.inLen  = strlen(a.input);
-    a.outLen = MD5_DIGEST_SIZE;
-
-    b.input  = "message digest";
-    b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61"
-               "\xd0";
-    b.inLen  = strlen(b.input);
-    b.outLen = MD5_DIGEST_SIZE;
-
-    c.input  = "abcdefghijklmnopqrstuvwxyz";
-    c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1"
-               "\x3b";
-    c.inLen  = strlen(c.input);
-    c.outLen = MD5_DIGEST_SIZE; 
-
-    d.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
-               "6789";
-    d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d"
-               "\x9f";
-    d.inLen  = strlen(d.input);
-    d.outLen = MD5_DIGEST_SIZE; 
-
-    e.input  = "1234567890123456789012345678901234567890123456789012345678"
-               "9012345678901234567890";
-    e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6"
-               "\x7a";
-    e.inLen  = strlen(e.input);
-    e.outLen = MD5_DIGEST_SIZE; 
-
-    test_md5[0] = a;
-    test_md5[1] = b;
-    test_md5[2] = c;
-    test_md5[3] = d;
-    test_md5[4] = e;
-
-    InitMd5(&md5);
-
-    for (i = 0; i < times; ++i) {
-        Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen);
-        Md5Final(&md5, hash);
-
-        if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0)
-            return -5 - i;
-    }
-
-    return 0;
-}
-#endif /* NO_MD5 */
-
-
-#ifndef NO_MD4
-
-int md4_test(void)
-{
-    Md4  md4;
-    byte hash[MD4_DIGEST_SIZE];
-
-    testVector a, b, c, d, e, f, g;
-    testVector test_md4[7];
-    int times = sizeof(test_md4) / sizeof(testVector), i;
-
-    a.input  = "";
-    a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" 
-               "\xc0";
-    a.inLen  = strlen(a.input);
-    a.outLen = MD4_DIGEST_SIZE;
-
-    b.input  = "a";
-    b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" 
-               "\x24";
-    b.inLen  = strlen(b.input);
-    b.outLen = MD4_DIGEST_SIZE; 
-
-    c.input  = "abc";
-    c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" 
-               "\x9d";
-    c.inLen  = strlen(c.input);
-    c.outLen = MD4_DIGEST_SIZE;
-
-    d.input  = "message digest";
-    d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" 
-               "\x4b";
-    d.inLen  = strlen(d.input);
-    d.outLen = MD4_DIGEST_SIZE;
-
-    e.input  = "abcdefghijklmnopqrstuvwxyz";
-    e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" 
-               "\xa9";
-    e.inLen  = strlen(e.input);
-    e.outLen = MD4_DIGEST_SIZE;
-
-    f.input  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
-               "6789";
-    f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" 
-               "\xe4";
-    f.inLen  = strlen(f.input);
-    f.outLen = MD4_DIGEST_SIZE;
-
-    g.input  = "1234567890123456789012345678901234567890123456789012345678"
-               "9012345678901234567890";
-    g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" 
-               "\x36";
-    g.inLen  = strlen(g.input);
-    g.outLen = MD4_DIGEST_SIZE;
-
-    test_md4[0] = a;
-    test_md4[1] = b;
-    test_md4[2] = c;
-    test_md4[3] = d;
-    test_md4[4] = e;
-    test_md4[5] = f;
-    test_md4[6] = g;
-
-    InitMd4(&md4);
-
-    for (i = 0; i < times; ++i) {
-        Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen);
-        Md4Final(&md4, hash);
-
-        if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0)
-            return -205 - i;
-    }
-
-    return 0;
-}
-
-#endif /* NO_MD4 */
-
-#ifndef NO_SHA
-
-int sha_test(void)
-{
-    Sha  sha;
-    byte hash[SHA_DIGEST_SIZE];
-
-    testVector a, b, c, d;
-    testVector test_sha[4];
-    int times = sizeof(test_sha) / sizeof(struct testVector), i;
-
-    a.input  = "abc";
-    a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2"
-               "\x6C\x9C\xD0\xD8\x9D";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA_DIGEST_SIZE;
-
-    b.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
-    b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29"
-               "\xE5\xE5\x46\x70\xF1";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA_DIGEST_SIZE;
-
-    c.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-               "aaaaaa";
-    c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44"
-               "\x2A\x25\xEC\x64\x4D";
-    c.inLen  = strlen(c.input);
-    c.outLen = SHA_DIGEST_SIZE; 
-
-    d.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-               "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-               "aaaaaaaaaa";
-    d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7"
-               "\x53\x99\x5E\x26\xA0";
-    d.inLen  = strlen(d.input);
-    d.outLen = SHA_DIGEST_SIZE;
-
-    test_sha[0] = a;
-    test_sha[1] = b;
-    test_sha[2] = c;
-    test_sha[3] = d;
-
-    InitSha(&sha);
-
-    for (i = 0; i < times; ++i) {
-        ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen);
-        ShaFinal(&sha, hash);
-
-        if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0)
-            return -10 - i;
-    }
-
-    return 0;
-}
-
-#endif /* NO_SHA */
-
-#ifdef CYASSL_RIPEMD
-int ripemd_test(void)
-{
-    RipeMd  ripemd;
-    byte hash[RIPEMD_DIGEST_SIZE];
-
-    testVector a, b, c, d;
-    testVector test_ripemd[4];
-    int times = sizeof(test_ripemd) / sizeof(struct testVector), i;
-
-    a.input  = "abc";
-    a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6"
-               "\xb0\x87\xf1\x5a\x0b\xfc";
-    a.inLen  = strlen(a.input);
-    a.outLen = RIPEMD_DIGEST_SIZE;
-
-    b.input  = "message digest";
-    b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8"
-               "\x5f\xfa\x21\x59\x5f\x36";
-    b.inLen  = strlen(b.input);
-    b.outLen = RIPEMD_DIGEST_SIZE;
-
-    c.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; 
-    c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc"
-               "\xf4\x9a\xda\x62\xeb\x2b";
-    c.inLen  = strlen(c.input);
-    c.outLen = RIPEMD_DIGEST_SIZE;
-
-    d.input  = "12345678901234567890123456789012345678901234567890123456"
-               "789012345678901234567890";
-    d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab"
-               "\x82\xbf\x63\x32\x6b\xfb"; 
-    d.inLen  = strlen(d.input);
-    d.outLen = RIPEMD_DIGEST_SIZE;
-
-    test_ripemd[0] = a;
-    test_ripemd[1] = b;
-    test_ripemd[2] = c;
-    test_ripemd[3] = d;
-
-    InitRipeMd(&ripemd);
-
-    for (i = 0; i < times; ++i) {
-        RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input,
-                     (word32)test_ripemd[i].inLen);
-        RipeMdFinal(&ripemd, hash);
-
-        if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0)
-            return -10 - i;
-    }
-
-    return 0;
-}
-#endif /* CYASSL_RIPEMD */
-
-
-#ifdef HAVE_BLAKE2
-
-
-#define BLAKE2_TESTS 3
-
-static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] =
-{
-  {
-    0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03,
-    0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72,
-    0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61,
-    0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19,
-    0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53,
-    0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B,
-    0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55,
-    0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE
-  },
-  {
-    0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95,
-    0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7,
-    0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44,
-    0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C,
-    0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB,
-    0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4,
-    0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48,
-    0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B
-  },
-  {
-    0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9,
-    0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72,
-    0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF,
-    0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15,
-    0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB,
-    0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04,
-    0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1,
-    0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5
-  }
-};
-
-
-
-int blake2b_test(void)
-{
-    Blake2b b2b;
-    byte    digest[64];
-    byte    input[64];
-    int     i;
-
-    for (i = 0; i < (int)sizeof(input); i++)
-        input[i] = (byte)i;
-
-    for (i = 0; i < BLAKE2_TESTS; i++) {
-        InitBlake2b(&b2b, 64);
-        Blake2bUpdate(&b2b, input, i);
-        Blake2bFinal(&b2b, digest, 64);
-
-        if (memcmp(digest, blake2b_vec[i], 64) != 0) {
-            return -300 - i;
-        }
-    }
-
-    return 0;
-}
-#endif /* HAVE_BLAKE2 */
-
-
-#ifndef NO_SHA256
-int sha256_test(void)
-{
-    Sha256 sha;
-    byte   hash[SHA256_DIGEST_SIZE];
-
-    testVector a, b;
-    testVector test_sha[2];
-    int times = sizeof(test_sha) / sizeof(struct testVector), i;
-
-    a.input  = "abc";
-    a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22"
-               "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00"
-               "\x15\xAD";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA256_DIGEST_SIZE;
-
-    b.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
-    b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
-               "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
-               "\x06\xC1";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA256_DIGEST_SIZE;
-
-    test_sha[0] = a;
-    test_sha[1] = b;
-
-    InitSha256(&sha);
-
-    for (i = 0; i < times; ++i) {
-        Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
-        Sha256Final(&sha, hash);
-
-        if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0)
-            return -10 - i;
-    }
-
-    return 0;
-}
-#endif
-
-
-#ifdef CYASSL_SHA512
-int sha512_test(void)
-{
-    Sha512 sha;
-    byte   hash[SHA512_DIGEST_SIZE];
-
-    testVector a, b;
-    testVector test_sha[2];
-    int times = sizeof(test_sha) / sizeof(struct testVector), i;
-
-    a.input  = "abc";
-    a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41"
-               "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55"
-               "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3"
-               "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f"
-               "\xa5\x4c\xa4\x9f";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA512_DIGEST_SIZE;
-
-    b.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
-               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
-    b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
-               "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
-               "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
-               "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
-               "\x87\x4b\xe9\x09"; 
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA512_DIGEST_SIZE;
-
-    test_sha[0] = a;
-    test_sha[1] = b;
-
-    InitSha512(&sha);
-
-    for (i = 0; i < times; ++i) {
-        Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
-        Sha512Final(&sha, hash);
-
-        if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0)
-            return -10 - i;
-    }
-
-    return 0;
-}
-#endif
-
-
-#ifdef CYASSL_SHA384
-int sha384_test(void)
-{
-    Sha384 sha;
-    byte   hash[SHA384_DIGEST_SIZE];
-
-    testVector a, b;
-    testVector test_sha[2];
-    int times = sizeof(test_sha) / sizeof(struct testVector), i;
-
-    a.input  = "abc";
-    a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50"
-               "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff"
-               "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34"
-               "\xc8\x25\xa7";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA384_DIGEST_SIZE;
-
-    b.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
-               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
-    b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
-               "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
-               "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
-               "\x74\x60\x39";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA384_DIGEST_SIZE; 
-
-    test_sha[0] = a;
-    test_sha[1] = b;
-
-    InitSha384(&sha);
-
-    for (i = 0; i < times; ++i) {
-        Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen);
-        Sha384Final(&sha, hash);
-
-        if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0)
-            return -10 - i;
-    }
-
-    return 0;
-}
-#endif /* CYASSL_SHA384 */
-
-
-#if !defined(NO_HMAC) && !defined(NO_MD5)
-int hmac_md5_test(void)
-{
-    Hmac hmac;
-    byte hash[MD5_DIGEST_SIZE];
-
-    const char* keys[]=
-    {
-        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
-        "Jefe",
-        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
-    };
-
-    testVector a, b, c;
-    testVector test_hmac[3];
-
-    int times = sizeof(test_hmac) / sizeof(testVector), i;
-
-    a.input  = "Hi There";
-    a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc"
-               "\x9d";
-    a.inLen  = strlen(a.input);
-    a.outLen = MD5_DIGEST_SIZE;
-
-    b.input  = "what do ya want for nothing?";
-    b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7"
-               "\x38";
-    b.inLen  = strlen(b.input);
-    b.outLen = MD5_DIGEST_SIZE;
-
-    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD";
-    c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3"
-               "\xf6";
-    c.inLen  = strlen(c.input);
-    c.outLen = MD5_DIGEST_SIZE;
-
-    test_hmac[0] = a;
-    test_hmac[1] = b;
-    test_hmac[2] = c;
-
-    for (i = 0; i < times; ++i) {
-#ifdef HAVE_CAVIUM
-        if (i == 1)
-            continue; /* driver can't handle keys <= bytes */
-        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
-            return -20009; 
-#endif
-        HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i]));
-        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
-                   (word32)test_hmac[i].inLen);
-        HmacFinal(&hmac, hash);
-
-        if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0)
-            return -20 - i;
-#ifdef HAVE_CAVIUM
-        HmacFreeCavium(&hmac);
-#endif
-    }
-
-    return 0;
-}
-#endif /* NO_HMAC && NO_MD5 */
-
-#if !defined(NO_HMAC) && !defined(NO_SHA)
-int hmac_sha_test(void)
-{
-    Hmac hmac;
-    byte hash[SHA_DIGEST_SIZE];
-
-    const char* keys[]=
-    {
-        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
-                                                                "\x0b\x0b\x0b",
-        "Jefe",
-        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
-                                                                "\xAA\xAA\xAA"
-    };
-
-    testVector a, b, c;
-    testVector test_hmac[3];
-
-    int times = sizeof(test_hmac) / sizeof(testVector), i;
-
-    a.input  = "Hi There";
-    a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c"
-               "\x8e\xf1\x46\xbe\x00";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA_DIGEST_SIZE;
-
-    b.input  = "what do ya want for nothing?";
-    b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf"
-               "\x9c\x25\x9a\x7c\x79";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA_DIGEST_SIZE;
-
-    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD";
-    c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b"
-               "\x4f\x63\xf1\x75\xd3";
-    c.inLen  = strlen(c.input);
-    c.outLen = SHA_DIGEST_SIZE;
-
-    test_hmac[0] = a;
-    test_hmac[1] = b;
-    test_hmac[2] = c;
-
-    for (i = 0; i < times; ++i) {
-#ifdef HAVE_CAVIUM
-        if (i == 1)
-            continue; /* driver can't handle keys <= bytes */
-        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
-            return -20010; 
-#endif
-        HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i]));
-        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
-                   (word32)test_hmac[i].inLen);
-        HmacFinal(&hmac, hash);
-
-        if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0)
-            return -20 - i;
-#ifdef HAVE_CAVIUM
-        HmacFreeCavium(&hmac);
-#endif
-    }
-
-    return 0;
-}
-#endif
-
-
-#if !defined(NO_HMAC) && !defined(NO_SHA256)
-int hmac_sha256_test(void)
-{
-    Hmac hmac;
-    byte hash[SHA256_DIGEST_SIZE];
-
-    const char* keys[]=
-    {
-        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
-                                                                "\x0b\x0b\x0b",
-        "Jefe",
-        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
-                                                                "\xAA\xAA\xAA"
-    };
-
-    testVector a, b, c;
-    testVector test_hmac[3];
-
-    int times = sizeof(test_hmac) / sizeof(testVector), i;
-
-    a.input  = "Hi There";
-    a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1"
-               "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32"
-               "\xcf\xf7";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA256_DIGEST_SIZE;
-
-    b.input  = "what do ya want for nothing?";
-    b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75"
-               "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec"
-               "\x38\x43";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA256_DIGEST_SIZE;
-
-    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD";
-    c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81"
-               "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5"
-               "\x65\xfe";
-    c.inLen  = strlen(c.input);
-    c.outLen = SHA256_DIGEST_SIZE;
-
-    test_hmac[0] = a;
-    test_hmac[1] = b;
-    test_hmac[2] = c;
-
-    for (i = 0; i < times; ++i) {
-#ifdef HAVE_CAVIUM
-        if (i == 1)
-            continue; /* driver can't handle keys <= bytes */
-        if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0)
-            return -20011; 
-#endif
-        HmacSetKey(&hmac, SHA256, (byte*)keys[i], (word32)strlen(keys[i]));
-        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
-                   (word32)test_hmac[i].inLen);
-        HmacFinal(&hmac, hash);
-
-        if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0)
-            return -20 - i;
-#ifdef HAVE_CAVIUM
-        HmacFreeCavium(&hmac);
-#endif
-    }
-
-    return 0;
-}
-#endif
-
-
-#if !defined(NO_HMAC) && defined(CYASSL_SHA384)
-int hmac_sha384_test(void)
-{
-    Hmac hmac;
-    byte hash[SHA384_DIGEST_SIZE];
-
-    const char* keys[]=
-    {
-        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
-                                                                "\x0b\x0b\x0b",
-        "Jefe",
-        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
-                                                                "\xAA\xAA\xAA"
-    };
-
-    testVector a, b, c;
-    testVector test_hmac[3];
-
-    int times = sizeof(test_hmac) / sizeof(testVector), i;
-
-    a.input  = "Hi There";
-    a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90"
-               "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb"
-               "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2"
-               "\xfa\x9c\xb6";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA384_DIGEST_SIZE;
-
-    b.input  = "what do ya want for nothing?";
-    b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b"
-               "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22"
-               "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa"
-               "\xb2\x16\x49";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA384_DIGEST_SIZE;
-
-    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD";
-    c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8"
-               "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66"
-               "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01"
-               "\xa3\x4f\x27";
-    c.inLen  = strlen(c.input);
-    c.outLen = SHA384_DIGEST_SIZE;
-
-    test_hmac[0] = a;
-    test_hmac[1] = b;
-    test_hmac[2] = c;
-
-    for (i = 0; i < times; ++i) {
-        HmacSetKey(&hmac, SHA384, (byte*)keys[i], (word32)strlen(keys[i]));
-        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
-                   (word32)test_hmac[i].inLen);
-        HmacFinal(&hmac, hash);
-
-        if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0)
-            return -20 - i;
-    }
-
-    return 0;
-}
-#endif
-
-
-#if !defined(NO_HMAC) && defined(CYASSL_SHA512)
-int hmac_sha512_test(void)
-{
-    Hmac hmac;
-    byte hash[SHA512_DIGEST_SIZE];
-
-    const char* keys[]=
-    {
-        "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
-                                                                "\x0b\x0b\x0b",
-        "Jefe",
-        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
-                                                                "\xAA\xAA\xAA"
-    };
-
-    testVector a, b, c;
-    testVector test_hmac[3];
-
-    int times = sizeof(test_hmac) / sizeof(testVector), i;
-
-    a.input  = "Hi There";
-    a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c"
-               "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1"
-               "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae"
-               "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20"
-               "\x3a\x12\x68\x54";
-    a.inLen  = strlen(a.input);
-    a.outLen = SHA512_DIGEST_SIZE;
-
-    b.input  = "what do ya want for nothing?";
-    b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0"
-               "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25"
-               "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8"
-               "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a"
-               "\x38\xbc\xe7\x37";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA512_DIGEST_SIZE;
-
-    c.input  = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
-               "\xDD\xDD\xDD\xDD\xDD\xDD";
-    c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b"
-               "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27"
-               "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e"
-               "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59"
-               "\xe1\x32\x92\xfb";
-    c.inLen  = strlen(c.input);
-    c.outLen = SHA512_DIGEST_SIZE;
-
-    test_hmac[0] = a;
-    test_hmac[1] = b;
-    test_hmac[2] = c;
-
-    for (i = 0; i < times; ++i) {
-        HmacSetKey(&hmac, SHA512, (byte*)keys[i], (word32)strlen(keys[i]));
-        HmacUpdate(&hmac, (byte*)test_hmac[i].input,
-                   (word32)test_hmac[i].inLen);
-        HmacFinal(&hmac, hash);
-
-        if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0)
-            return -20 - i;
-    }
-
-    return 0;
-}
-#endif
-
-
-#ifndef NO_RC4
-int arc4_test(void)
-{
-    byte cipher[16];
-    byte plain[16];
-
-    const char* keys[] = 
-    {           
-        "\x01\x23\x45\x67\x89\xab\xcd\xef",
-        "\x01\x23\x45\x67\x89\xab\xcd\xef",
-        "\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\xef\x01\x23\x45"
-    };
-
-    testVector a, b, c, d;
-    testVector test_arc4[4];
-
-    int times = sizeof(test_arc4) / sizeof(testVector), i;
-
-    a.input  = "\x01\x23\x45\x67\x89\xab\xcd\xef";
-    a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96";
-    a.inLen  = 8;
-    a.outLen = 8;
-
-    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79";
-    b.inLen  = 8;
-    b.outLen = 8;
-
-    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a";
-    c.inLen  = 8;
-    c.outLen = 8;
-
-    d.input  = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
-    d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61";
-    d.inLen  = 10;
-    d.outLen = 10;
-
-    test_arc4[0] = a;
-    test_arc4[1] = b;
-    test_arc4[2] = c;
-    test_arc4[3] = d;
-
-    for (i = 0; i < times; ++i) {
-        Arc4 enc;
-        Arc4 dec;
-        int  keylen = 8;  /* strlen with key 0x00 not good */
-        if (i == 3)
-            keylen = 4;
-
-#ifdef HAVE_CAVIUM
-        if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0)
-            return -20001; 
-        if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0)
-            return -20002; 
-#endif
-
-        Arc4SetKey(&enc, (byte*)keys[i], keylen);
-        Arc4SetKey(&dec, (byte*)keys[i], keylen);
-
-        Arc4Process(&enc, cipher, (byte*)test_arc4[i].input,
-                    (word32)test_arc4[i].outLen);
-        Arc4Process(&dec, plain,  cipher, (word32)test_arc4[i].outLen);
-
-        if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen))
-            return -20 - i;
-
-        if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen))
-            return -20 - 5 - i;
-
-#ifdef HAVE_CAVIUM
-        Arc4FreeCavium(&enc);
-        Arc4FreeCavium(&dec);
-#endif
-    }
-
-    return 0;
-}
-#endif
-
-
-int hc128_test(void)
-{
-#ifdef HAVE_HC128
-    byte cipher[16];
-    byte plain[16];
-
-    const char* keys[] = 
-    {           
-        "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD",
-        "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC"
-    };
-
-    const char* ivs[] =
-    {
-        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16",
-        "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31"
-    };
-
-
-    testVector a, b, c, d;
-    testVector test_hc128[4];
-
-    int times = sizeof(test_hc128) / sizeof(testVector), i;
-
-    a.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48";
-    a.inLen  = 8;
-    a.outLen = 8;
-
-    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F";
-    b.inLen  = 8;
-    b.outLen = 8;
-
-    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A";
-    c.inLen  = 8;
-    c.outLen = 8;
-
-    d.input  = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
-    d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29";
-    d.inLen  = 15;
-    d.outLen = 15;
-
-    test_hc128[0] = a;
-    test_hc128[1] = b;
-    test_hc128[2] = c;
-    test_hc128[3] = d;
-
-    for (i = 0; i < times; ++i) {
-        HC128 enc;
-        HC128 dec;
-
-        /* align keys/ivs in plain/cipher buffers */
-        memcpy(plain,  keys[i], 16); 
-        memcpy(cipher, ivs[i],  16); 
-
-        Hc128_SetKey(&enc, plain, cipher);
-        Hc128_SetKey(&dec, plain, cipher);
-
-        /* align input */
-        memcpy(plain, test_hc128[i].input, test_hc128[i].outLen);
-        Hc128_Process(&enc, cipher, plain,  (word32)test_hc128[i].outLen);
-        Hc128_Process(&dec, plain,  cipher, (word32)test_hc128[i].outLen);
-
-        if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen))
-            return -120 - i;
-
-        if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen))
-            return -120 - 5 - i;
-    }
-
-#endif /* HAVE_HC128 */
-    return 0;
-}
-
-
-#ifndef NO_RABBIT
-int rabbit_test(void)
-{
-    byte cipher[16];
-    byte plain[16];
-
-    const char* keys[] = 
-    {           
-        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91"
-    };
-
-    const char* ivs[] =
-    {
-        "\x00\x00\x00\x00\x00\x00\x00\x00",
-        "\x59\x7E\x26\xC1\x75\xF5\x73\xC3",
-        0
-    };
-
-    testVector a, b, c;
-    testVector test_rabbit[3];
-
-    int times = sizeof(test_rabbit) / sizeof(testVector), i;
-
-    a.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C";
-    a.inLen  = 8;
-    a.outLen = 8;
-
-    b.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0";
-    b.inLen  = 8;
-    b.outLen = 8;
-
-    c.input  = "\x00\x00\x00\x00\x00\x00\x00\x00";
-    c.output = "\x9C\x51\xE2\x87\x84\xC3\x7F\xE9";
-    c.inLen  = 8;
-    c.outLen = 8;
-
-    test_rabbit[0] = a;
-    test_rabbit[1] = b;
-    test_rabbit[2] = c;
-
-    for (i = 0; i < times; ++i) {
-        Rabbit enc;
-        Rabbit dec;
-        byte*  iv;
-
-        /* align keys/ivs in plain/cipher buffers */
-        memcpy(plain,  keys[i], 16);
-        if (ivs[i]) {
-            memcpy(cipher, ivs[i],   8);
-            iv = cipher;
-        } else
-            iv = NULL;
-        RabbitSetKey(&enc, plain, iv);
-        RabbitSetKey(&dec, plain, iv);
-
-        /* align input */
-        memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen);
-        RabbitProcess(&enc, cipher, plain,  (word32)test_rabbit[i].outLen);
-        RabbitProcess(&dec, plain,  cipher, (word32)test_rabbit[i].outLen);
-
-        if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen))
-            return -130 - i;
-
-        if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen))
-            return -130 - 5 - i;
-    }
-
-    return 0;
-}
-#endif /* NO_RABBIT */
-
-
-#ifndef NO_DES3
-int des_test(void)
-{
-    const byte vector[] = { /* "now is the time for all " w/o trailing 0 */
-        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
-        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
-        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-    };
-
-    byte plain[24];
-    byte cipher[24];
-
-    Des enc;
-    Des dec;
-
-    const byte key[] = 
-    {
-        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef
-    };
-
-    const byte iv[] = 
-    {
-        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef
-    };
-
-    const byte verify[] = 
-    {
-        0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8,
-        0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73,
-        0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
-    };
-
-
-    Des_SetKey(&enc, key, iv, DES_ENCRYPTION);
-    Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector));
-    Des_SetKey(&dec, key, iv, DES_DECRYPTION);
-    Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher));
-
-    if (memcmp(plain, vector, sizeof(plain)))
-        return -31;
-
-    if (memcmp(cipher, verify, sizeof(cipher)))
-        return -32;
-
-    return 0;
-}
-#endif /* NO_DES3 */
-
-
-#ifndef NO_DES3
-int des3_test(void)
-{
-    const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */
-        0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
-        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
-        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-    };
-
-    byte plain[24];
-    byte cipher[24];
-
-    Des3 enc;
-    Des3 dec;
-
-    const byte key3[] = 
-    {
-        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
-        0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10,
-        0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67
-    };
-    const byte iv3[] = 
-    {
-        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef,
-        0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-        0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81
-        
-    };
-
-    const byte verify3[] = 
-    {
-        0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e,
-        0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98,
-        0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0
-    };
-
-
-#ifdef HAVE_CAVIUM
-    if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0)
-        return -20005; 
-    if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0)
-        return -20006; 
-#endif
-    Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION);
-    Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION);
-    Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector));
-    Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher));
-
-    if (memcmp(plain, vector, sizeof(plain)))
-        return -33;
-
-    if (memcmp(cipher, verify3, sizeof(cipher)))
-        return -34;
-
-#ifdef HAVE_CAVIUM
-    Des3_FreeCavium(&enc);
-    Des3_FreeCavium(&dec);
-#endif
-    return 0;
-}
-#endif /* NO_DES */
-
-
-#ifndef NO_AES
-int aes_test(void)
-{
-    Aes enc;
-    Aes dec;
-
-    const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */
-        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
-        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
-        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-    };
-
-    const byte verify[] = 
-    {
-        0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
-        0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
-    };
-
-    byte key[] = "0123456789abcdef   ";  /* align */
-    byte iv[]  = "1234567890abcdef   ";  /* align */
-
-    byte cipher[AES_BLOCK_SIZE * 4];
-    byte plain [AES_BLOCK_SIZE * 4];
-
-#ifdef HAVE_CAVIUM
-        if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0)
-            return -20003; 
-        if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0)
-            return -20004; 
-#endif
-    AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
-    AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION);
-
-    AesCbcEncrypt(&enc, cipher, msg,   AES_BLOCK_SIZE);
-    AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE);
-
-    if (memcmp(plain, msg, AES_BLOCK_SIZE))
-        return -60;
-
-    if (memcmp(cipher, verify, AES_BLOCK_SIZE))
-        return -61;
-
-#ifdef HAVE_CAVIUM
-        AesFreeCavium(&enc);
-        AesFreeCavium(&dec);
-#endif
-#ifdef CYASSL_AES_COUNTER
-    {
-        const byte ctrKey[] = 
-        {
-            0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6,
-            0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c
-        };
-
-        const byte ctrIv[] =
-        {
-            0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
-            0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
-        };
-
-
-        const byte ctrPlain[] =
-        {
-            0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96,
-            0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a,
-            0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c,
-            0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51,
-            0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11,
-            0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef,
-            0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17,
-            0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10
-        };
-
-        const byte ctrCipher[] =
-        {
-            0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26,
-            0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce,
-            0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff,
-            0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff,
-            0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e,
-            0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab,
-            0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1,
-            0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee
-        };
-
-        AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION);
-        /* Ctr only uses encrypt, even on key setup */
-        AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION);
-
-        AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4);
-        AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4);
-
-        if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4))
-            return -66;
-
-        if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4))
-            return -67;
-    }
-#endif /* CYASSL_AES_COUNTER */
-
-    return 0;
-}
-
-#ifdef HAVE_AESGCM
-int aesgcm_test(void)
-{
-    Aes enc;
-
-    /*
-     * This is Test Case 16 from the document Galois/
-     * Counter Mode of Operation (GCM) by McGrew and
-     * Viega.
-     */
-    const byte k[] =
-    {
-        0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
-        0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
-        0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
-        0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08
-    };
-
-    const byte iv[] =
-    {
-        0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
-        0xde, 0xca, 0xf8, 0x88
-    };
-    
-    const byte p[] =
-    {
-        0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
-        0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
-        0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
-        0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
-        0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
-        0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
-        0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
-        0xba, 0x63, 0x7b, 0x39
-    };
-    
-    const byte a[] =
-    {
-        0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
-        0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
-        0xab, 0xad, 0xda, 0xd2
-    };
-    
-    const byte c[] =
-    {
-        0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07,
-        0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d,
-        0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9,
-        0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa,
-        0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d,
-        0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38,
-        0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a,
-        0xbc, 0xc9, 0xf6, 0x62
-    };
-
-    const byte t[] =
-    {
-        0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68,
-        0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b
-    };
-
-    byte t2[sizeof(t)];
-    byte p2[sizeof(c)];
-    byte c2[sizeof(p)];
-
-    int result;
-
-    memset(t2, 0, sizeof(t2));
-    memset(c2, 0, sizeof(c2));
-    memset(p2, 0, sizeof(p2));
-
-    AesGcmSetKey(&enc, k, sizeof(k));
-    /* AES-GCM encrypt and decrypt both use AES encrypt internally */
-    AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv),
-                                                 t2, sizeof(t2), a, sizeof(a));
-    if (memcmp(c, c2, sizeof(c2)))
-        return -68;
-    if (memcmp(t, t2, sizeof(t2)))
-        return -69;
-
-    result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv),
-                                                 t2, sizeof(t2), a, sizeof(a));
-    if (result != 0)
-        return -70;
-    if (memcmp(p, p2, sizeof(p2)))
-        return -71;
-
-    return 0;
-}
-#endif /* HAVE_AESGCM */
-
-#ifdef HAVE_AESCCM
-int aesccm_test(void)
-{
-    Aes enc;
-
-    /* key */
-    const byte k[] =
-    {
-        0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
-        0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf
-    };
-
-    /* nonce */
-    const byte iv[] =
-    {
-        0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
-        0xa1, 0xa2, 0xa3, 0xa4, 0xa5
-    };
-
-    /* plaintext */
-    const byte p[] =
-    {
-        0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-        0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e
-    };
-
-    const byte a[] =
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
-    };
-
-    const byte c[] =
-    {
-        0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2,
-        0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80,
-        0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84
-    };
-
-    const byte t[] =
-    {
-        0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 
-    };
-
-    byte t2[sizeof(t)];
-    byte p2[sizeof(p)];
-    byte c2[sizeof(c)];
-
-    int result;
-
-    memset(t2, 0, sizeof(t2));
-    memset(c2, 0, sizeof(c2));
-    memset(p2, 0, sizeof(p2));
-
-    AesCcmSetKey(&enc, k, sizeof(k));
-    /* AES-CCM encrypt and decrypt both use AES encrypt internally */
-    AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv),
-                                                 t2, sizeof(t2), a, sizeof(a));
-    if (memcmp(c, c2, sizeof(c2)))
-        return -107;
-    if (memcmp(t, t2, sizeof(t2)))
-        return -108;
-
-    result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv),
-                                                 t2, sizeof(t2), a, sizeof(a));
-    if (result != 0)
-        return -109;
-    if (memcmp(p, p2, sizeof(p2)))
-        return -110;
-
-    /* Test the authentication failure */
-    t2[0]++; /* Corrupt the authentication tag. */
-    result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv),
-                                                 t2, sizeof(t2), a, sizeof(a));
-    if (result == 0)
-        return -111;
-
-    /* Clear c2 to compare against p2. p2 should be set to zero in case of
-     * authentication fail. */
-    memset(c2, 0, sizeof(c2));
-    if (memcmp(p2, c2, sizeof(p2)))
-        return -112;
-
-    return 0;
-}
-#endif /* HAVE_AESCCM */
-
-
-#endif /* NO_AES */
-
-
-#ifdef HAVE_CAMELLIA
-
-enum {
-    CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC
-};
-
-typedef struct {
-    int type;
-    const byte* plaintext;
-    const byte* iv;
-    const byte* ciphertext;
-    const byte* key;
-    word32 keySz;
-    int errorCode;
-} test_vector_t;
-
-int camellia_test(void)
-{
-    /* Camellia ECB Test Plaintext */
-    static const byte pte[] = 
-    {
-        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
-        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10
-    };
-
-    /* Camellia ECB Test Initialization Vector */
-    static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-
-    /* Test 1: Camellia ECB 128-bit key */
-    static const byte k1[] =
-    {
-        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
-        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10
-    };
-    static const byte c1[] =
-    {
-        0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73,
-        0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43
-    };
-
-    /* Test 2: Camellia ECB 192-bit key */
-    static const byte k2[] =
-    {
-        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
-        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
-        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
-    };
-    static const byte c2[] =
-    {
-        0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8,
-        0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9
-    };
-
-    /* Test 3: Camellia ECB 256-bit key */
-    static const byte k3[] =
-    {
-        0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
-        0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
-        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-        0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
-    };
-    static const byte c3[] =
-    {
-        0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c,
-        0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09
-    };
-
-    /* Camellia CBC Test Plaintext */
-    static const byte ptc[] =
-    {
-        0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,
-        0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A 
-    };
-
-    /* Camellia CBC Test Initialization Vector */
-    static const byte ivc[] =
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F 
-    };
-
-    /* Test 4: Camellia-CBC 128-bit key */
-    static const byte k4[] =
-    {
-        0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
-        0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C 
-    };
-    static const byte c4[] =
-    {
-        0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0,
-        0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB 
-    };
-
-    /* Test 5: Camellia-CBC 192-bit key */
-    static const byte k5[] =
-    {
-        0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52,
-        0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5,
-        0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B 
-    };
-    static const byte c5[] =
-    {
-        0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2,
-        0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 
-    };
-
-    /* Test 6: CBC 256-bit key */
-    static const byte k6[] =
-    {
-        0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE,
-        0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81,
-        0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7,
-        0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 
-    };
-    static const byte c6[] =
-    {
-        0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A,
-        0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA 
-    };
-
-    byte out[CAMELLIA_BLOCK_SIZE];
-    Camellia cam;
-    int i, testsSz;
-    const test_vector_t testVectors[] =
-    {
-        {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114},
-        {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115},
-        {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116},
-        {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117},
-        {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118},
-        {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119},
-        {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120},
-        {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121},
-        {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122},
-        {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123},
-        {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124},
-        {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125}
-    };
-
-    if ((sizeof(pte) != CAMELLIA_BLOCK_SIZE) ||
-                                          (sizeof(ptc) != CAMELLIA_BLOCK_SIZE))
-        return -113;
-
-    testsSz = sizeof(testVectors)/sizeof(test_vector_t);
-    for (i = 0; i < testsSz; i++) {
-        CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz,
-                                                             testVectors[i].iv);
-
-        switch (testVectors[i].type) {
-            case CAM_ECB_ENC:
-                CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext);
-                if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE))
-                    return testVectors[i].errorCode;
-                break;
-            case CAM_ECB_DEC:
-                CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext);
-                if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE))
-                    return testVectors[i].errorCode;
-                break;
-            case CAM_CBC_ENC:
-                CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext,
-                                                           CAMELLIA_BLOCK_SIZE);
-                if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE))
-                    return testVectors[i].errorCode;
-                break;
-            case CAM_CBC_DEC:
-                CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext,
-                                                           CAMELLIA_BLOCK_SIZE);
-                if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE))
-                    return testVectors[i].errorCode;
-                break;
-            default:
-                break;
-        }
-    }
-
-    /* Setting the IV and checking it was actually set. */
-    CamelliaSetIV(&cam, ivc);
-    if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE))
-        return -1;
-
-    /* Setting the IV to NULL should leave the IV unchanged */
-    if (CamelliaSetIV(&cam, NULL) != 0 ||
-                                    XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE))
-        return -1;
-    
-    /* First parameter should never be null */
-    if (CamelliaSetIV(NULL, NULL) == 0)
-        return -1;
-
-    /* Key should have a size of 16, 24, or 32 */
-    if (CamelliaSetKey(&cam, k1, 0, NULL) == 0)
-        return -1;
-
-    return 0;
-}
-#endif /* HAVE_CAMELLIA */
-
-
-int random_test(void)
-{
-    RNG  rng;
-    byte block[32];
-    int ret;
-
-#ifdef HAVE_CAVIUM
-    ret = InitRngCavium(&rng, CAVIUM_DEV_ID);
-    if (ret != 0) return -2007;
-#endif
-    ret = InitRng(&rng);
-    if (ret != 0) return -39;
-
-    RNG_GenerateBlock(&rng, block, sizeof(block));
-
-    return 0;
-}
-
-
-#ifdef HAVE_NTRU
-
-byte GetEntropy(ENTROPY_CMD cmd, byte* out);
-
-byte GetEntropy(ENTROPY_CMD cmd, byte* out)
-{
-    static RNG rng;
-
-    if (cmd == INIT) {
-        int ret = InitRng(&rng);
-        if (ret == 0)
-            return 1;
-        else
-            return 0;
-    }
-
-    if (out == NULL)
-        return 0;
-
-    if (cmd == GET_BYTE_OF_ENTROPY) {
-        RNG_GenerateBlock(&rng, out, 1);
-        return 1;
-    }
-
-    if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
-        *out = 1;
-        return 1;
-    }
-
-    return 0;
-}
-
-#endif /* HAVE_NTRU */
-
-#ifndef NO_RSA
-
-#ifdef FREESCALE_MQX
-    static const char* clientKey  = "a:\\certs\\client-key.der";
-    static const char* clientCert = "a:\\certs\\client-cert.der";
-    #ifdef CYASSL_CERT_GEN
-        static const char* caKeyFile  = "a:\\certs\\ca-key.der";
-        static const char* caCertFile = "a:\\certs\\ca-cert.pem";
-    #endif
-#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && defined(CYASSL_MKD_SHELL) 
-    static char* clientKey = "certs/client-key.der";
-    static char* clientCert = "certs/client-cert.der";
-    void set_clientKey(char *key) {  clientKey = key ; }      /* set by shell command */
-    void set_clientCert(char *cert) {  clientCert = cert ; }  /* set by shell command */        
-    #ifdef CYASSL_CERT_GEN
-        static char* caKeyFile  = "certs/ca-key.der";
-        static char* caCertFile = "certs/ca-cert.pem";
-        void set_caKeyFile (char * key)  { caKeyFile   = key ; }     /* set by shell command */
-        void set_caCertFile(char * cert) { caCertFile = cert ; }     /* set by shell command */
-    #endif
-#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) 
-    static const char* clientKey  = "./certs/client-key.der";
-    static const char* clientCert = "./certs/client-cert.der";
-    #ifdef CYASSL_CERT_GEN
-        static const char* caKeyFile  = "./certs/ca-key.der";
-        static const char* caCertFile = "./certs/ca-cert.pem";
-    #endif
-#endif
-
-
-
-#define FOURK_BUF 4096
-
-int rsa_test(void)
-{
-    byte*   tmp;
-    size_t bytes;
-    RsaKey key;
-    RNG    rng;
-    word32 idx = 0;
-    int    ret;
-    byte   in[] = "Everyone gets Friday off.";
-    word32 inLen = (word32)strlen((char*)in);
-    byte   out[256];
-    byte   plain[256];
-#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
-    FILE*  file, * file2;
-#endif
-#ifdef CYASSL_TEST_CERT
-    DecodedCert cert;
-#endif
-
-    tmp = (byte*)malloc(FOURK_BUF);
-    if (tmp == NULL)
-        return -40;
-
-#ifdef USE_CERT_BUFFERS_1024
-    XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024);
-    bytes = sizeof_client_key_der_1024;
-#elif defined(USE_CERT_BUFFERS_2048)
-    XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048);
-    bytes = sizeof_client_key_der_2048;
-#else
-    file = fopen(clientKey, "rb");
-
-    if (!file)
-        err_sys("can't open ./certs/client-key.der, "
-                "Please run from CyaSSL home dir", -40);
-
-    bytes = fread(tmp, 1, FOURK_BUF, file);
-    fclose(file);
-#endif /* USE_CERT_BUFFERS */
- 
-#ifdef HAVE_CAVIUM
-    RsaInitCavium(&key, CAVIUM_DEV_ID);
-#endif 
-    InitRsaKey(&key, 0);  
-    ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes);
-    if (ret != 0) return -41;
-
-    ret = InitRng(&rng);
-    if (ret != 0) return -42;
-
-    ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng);
-    if (ret < 0) return -43;
-
-    ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key);
-    if (ret < 0) return -44;
-
-    if (memcmp(plain, in, inLen)) return -45;
-
-    ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng);
-    if (ret < 0) return -46;
-
-    memset(plain, 0, sizeof(plain));
-    ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key);
-    if (ret < 0) return -47;
-
-    if (memcmp(plain, in, ret)) return -48;
-
-#if defined(CYASSL_MDK_ARM)
-    #define sizeof(s) strlen((char *)(s))
-#endif
-
-#ifdef USE_CERT_BUFFERS_1024
-    XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024);
-    bytes = sizeof_client_cert_der_1024;
-#elif defined(USE_CERT_BUFFERS_2048)
-    XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048);
-    bytes = sizeof_client_cert_der_2048;
-#else
-    file2 = fopen(clientCert, "rb");
-    if (!file2)
-        return -49;
-
-    bytes = fread(tmp, 1, FOURK_BUF, file2);
-    fclose(file2);
-#endif
-
-#ifdef sizeof
-        #undef sizeof
-#endif      
-
-#ifdef CYASSL_TEST_CERT
-    InitDecodedCert(&cert, tmp, (word32)bytes, 0);
-
-    ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0);
-    if (ret != 0) return -491;
-
-    FreeDecodedCert(&cert);
-#else
-    (void)bytes;
-#endif
-
-
-#ifdef CYASSL_KEY_GEN
-    {
-        byte*  der;
-        byte*  pem;
-        int    derSz = 0;
-        int    pemSz = 0;
-        RsaKey derIn;
-        RsaKey genKey;
-        FILE* keyFile;
-        FILE* pemFile;
-
-        InitRsaKey(&genKey, 0);
-        ret = MakeRsaKey(&genKey, 1024, 65537, &rng);
-        if (ret != 0)
-            return -301;
-
-        der = (byte*)malloc(FOURK_BUF);
-        if (der == NULL)
-            return -307;
-        pem = (byte*)malloc(FOURK_BUF);
-        if (pem == NULL)
-            return -308;
-
-        derSz = RsaKeyToDer(&genKey, der, FOURK_BUF);
-        if (derSz < 0)
-            return -302;
-
-        keyFile = fopen("./key.der", "wb");
-        if (!keyFile)
-            return -303;
-        ret = (int)fwrite(der, derSz, 1, keyFile);
-        fclose(keyFile);
-
-        pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE);
-        if (pemSz < 0)
-            return -304;
-
-        pemFile = fopen("./key.pem", "wb");
-        if (!pemFile) 
-            return -305;
-        ret = (int)fwrite(pem, pemSz, 1, pemFile);
-        fclose(pemFile);
-
-        InitRsaKey(&derIn, 0);
-        idx = 0;
-        ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz);
-        if (ret != 0)
-            return -306;
-
-        FreeRsaKey(&derIn);
-        FreeRsaKey(&genKey);
-        free(pem);
-        free(der);
-    }
-#endif /* CYASSL_KEY_GEN */
-
-
-#ifdef CYASSL_CERT_GEN
-    /* self signed */
-    {
-        Cert        myCert;
-        byte*       derCert;
-        byte*       pem;
-        FILE*       derFile;
-        FILE*       pemFile;
-        int         certSz;
-        int         pemSz;
-#ifdef CYASSL_TEST_CERT
-        DecodedCert decode;
-#endif
-
-        derCert = (byte*)malloc(FOURK_BUF);
-        if (derCert == NULL)
-            return -309;
-        pem = (byte*)malloc(FOURK_BUF);
-        if (pem == NULL)
-            return -310;
-
-        InitCert(&myCert);
-
-        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
-        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
-        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
-        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
-        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
-        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
-        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
-        myCert.isCA    = 1;
-        myCert.sigType = CTC_SHA256wRSA;
-
-        certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); 
-        if (certSz < 0)
-            return -401;
-
-#ifdef CYASSL_TEST_CERT
-        InitDecodedCert(&decode, derCert, certSz, 0);
-        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
-        if (ret != 0)
-            return -402;
-        FreeDecodedCert(&decode);
-#endif
-        derFile = fopen("./cert.der", "wb");
-        if (!derFile)
-            return -403;
-        ret = (int)fwrite(derCert, certSz, 1, derFile);
-        fclose(derFile);
-
-        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
-        if (pemSz < 0)
-            return -404;
-
-        pemFile = fopen("./cert.pem", "wb");
-        if (!pemFile)
-            return -405;
-        ret = (int)fwrite(pem, pemSz, 1, pemFile);
-        fclose(pemFile);
-        free(pem);
-        free(derCert);
-    }
-    /* CA style */
-    {
-        RsaKey      caKey;
-        Cert        myCert;
-        byte*       derCert;
-        byte*       pem;
-        FILE*       derFile;
-        FILE*       pemFile;
-        int         certSz;
-        int         pemSz;
-        size_t      bytes3;
-        word32      idx3 = 0;
-              FILE* file3 ;
-#ifdef CYASSL_TEST_CERT
-        DecodedCert decode;
-#endif
-
-        derCert = (byte*)malloc(FOURK_BUF);
-        if (derCert == NULL)
-            return -311;
-        pem = (byte*)malloc(FOURK_BUF);
-        if (pem == NULL)
-            return -312;
-
-        file3 = fopen(caKeyFile, "rb");
-
-        if (!file3)
-            return -412;
-
-        bytes3 = fread(tmp, 1, FOURK_BUF, file3);
-        fclose(file3);
-  
-        InitRsaKey(&caKey, 0);  
-        ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3);
-        if (ret != 0) return -413;
-
-        InitCert(&myCert);
-
-        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
-        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
-        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
-        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
-        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
-        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
-        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
-
-        ret = SetIssuer(&myCert, caCertFile);
-        if (ret < 0)
-            return -405;
-
-        certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, &rng); 
-        if (certSz < 0)
-            return -407;
-
-        certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF,
-                          &caKey, &rng);
-        if (certSz < 0)
-            return -408;
-
-
-#ifdef CYASSL_TEST_CERT
-        InitDecodedCert(&decode, derCert, certSz, 0);
-        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
-        if (ret != 0)
-            return -409;
-        FreeDecodedCert(&decode);
-#endif
-
-        derFile = fopen("./othercert.der", "wb");
-        if (!derFile)
-            return -410;
-        ret = (int)fwrite(derCert, certSz, 1, derFile);
-        fclose(derFile);
-
-        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
-        if (pemSz < 0)
-            return -411;
-
-        pemFile = fopen("./othercert.pem", "wb");
-        if (!pemFile)
-            return -412;
-        ret = (int)fwrite(pem, pemSz, 1, pemFile);
-        fclose(pemFile);
-        free(pem);
-        free(derCert);
-        FreeRsaKey(&caKey);
-    }
-#ifdef HAVE_NTRU
-    {
-        RsaKey      caKey;
-        Cert        myCert;
-        byte*       derCert;
-        byte*       pem;
-        FILE*       derFile;
-        FILE*       pemFile;
-        FILE*       caFile;
-        FILE*       ntruPrivFile;
-        int         certSz;
-        int         pemSz;
-        size_t      bytes;
-        word32      idx = 0;
-#ifdef CYASSL_TEST_CERT
-        DecodedCert decode;
-#endif
-        derCert = (byte*)malloc(FOURK_BUF);
-        if (derCert == NULL)
-            return -311;
-        pem = (byte*)malloc(FOURK_BUF);
-        if (pem == NULL)
-            return -312;
-
-        byte   public_key[557];          /* sized for EES401EP2 */
-        word16 public_key_len;           /* no. of octets in public key */
-        byte   private_key[607];         /* sized for EES401EP2 */
-        word16 private_key_len;          /* no. of octets in private key */
-        DRBG_HANDLE drbg;
-        static uint8_t const pers_str[] = {
-                'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't'
-        };
-        word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str),
-                                            GetEntropy, &drbg);
-        if (rc != DRBG_OK)
-            return -450;
-
-        rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len,
-                                        NULL, &private_key_len, NULL);
-        if (rc != NTRU_OK)
-            return -451;
-
-        rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len,
-                                     public_key, &private_key_len, private_key);
-        crypto_drbg_uninstantiate(drbg);
-
-        if (rc != NTRU_OK)
-            return -452;
-
-        caFile = fopen(caKeyFile, "rb");
-
-        if (!caFile)
-            return -453;
-
-        bytes = fread(tmp, 1, FOURK_BUF, caFile);
-        fclose(caFile);
-  
-        InitRsaKey(&caKey, 0);  
-        ret = RsaPrivateKeyDecode(tmp, &idx, &caKey, (word32)bytes);
-        if (ret != 0) return -454;
-
-        InitCert(&myCert);
-
-        strncpy(myCert.subject.country, "US", CTC_NAME_SIZE);
-        strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE);
-        strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE);
-        strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE);
-        strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE);
-        strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE);
-        strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE);
-
-        ret = SetIssuer(&myCert, caCertFile);
-        if (ret < 0)
-            return -455;
-
-        certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key,
-                              public_key_len, &rng); 
-        if (certSz < 0)
-            return -456;
-
-        certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF,
-                          &caKey, &rng);
-        if (certSz < 0)
-            return -457;
-
-
-#ifdef CYASSL_TEST_CERT
-        InitDecodedCert(&decode, derCert, certSz, 0);
-        ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
-        if (ret != 0)
-            return -458;
-        FreeDecodedCert(&decode);
-#endif
-        derFile = fopen("./ntru-cert.der", "wb");
-        if (!derFile)
-            return -459;
-        ret = fwrite(derCert, certSz, 1, derFile);
-        fclose(derFile);
-
-        pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE);
-        if (pemSz < 0)
-            return -460;
-
-        pemFile = fopen("./ntru-cert.pem", "wb");
-        if (!pemFile)
-            return -461;
-        ret = fwrite(pem, pemSz, 1, pemFile);
-        fclose(pemFile);
-
-        ntruPrivFile = fopen("./ntru-key.raw", "wb");
-        if (!ntruPrivFile)
-            return -462;
-        ret = fwrite(private_key, private_key_len, 1, ntruPrivFile);
-        fclose(ntruPrivFile);
-        free(pem);
-        free(derCert);
-        FreeRsaKey(&caKey);
-    }
-#endif /* HAVE_NTRU */
-#endif /* CYASSL_CERT_GEN */
-
-    FreeRsaKey(&key);
-#ifdef HAVE_CAVIUM
-    RsaFreeCavium(&key);
-#endif 
-    free(tmp);
-
-    return 0;
-}
-
-#endif
-
-
-#ifndef NO_DH
-
-#ifdef FREESCALE_MQX
-    static const char* dhKey = "a:\certs\\dh2048.der";
-#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
-    static const char* dhKey = "./certs/dh2048.der";
-#endif
-
-int dh_test(void)
-{
-    int    ret;
-    word32 bytes;
-    word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2;
-    byte   tmp[1024];
-    byte   priv[256];
-    byte   pub[256];
-    byte   priv2[256];
-    byte   pub2[256];
-    byte   agree[256];
-    byte   agree2[256];
-    DhKey  key;
-    DhKey  key2;
-    RNG    rng;
-    
-        
-#ifdef USE_CERT_BUFFERS_1024
-    XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024);
-    bytes = sizeof_dh_key_der_1024;
-#elif defined(USE_CERT_BUFFERS_2048)
-    XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048);
-    bytes = sizeof_dh_key_der_2048;
-#else
-    FILE*  file = fopen(dhKey, "rb");
-
-    if (!file)
-        return -50;
-
-    bytes = (word32) fread(tmp, 1, sizeof(tmp), file);
-    fclose(file);
-#endif /* USE_CERT_BUFFERS */
-
-    InitDhKey(&key);  
-    InitDhKey(&key2);  
-    ret = DhKeyDecode(tmp, &idx, &key, bytes);
-    if (ret != 0)
-        return -51;
-
-    idx = 0;
-    ret = DhKeyDecode(tmp, &idx, &key2, bytes);
-    if (ret != 0)
-        return -52;
-
-    ret = InitRng(&rng);
-    if (ret != 0)
-        return -53;
-    
-    ret =  DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz);
-    ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2);
-    if (ret != 0)
-        return -54;
-
-    ret =  DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2);
-    ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz);
-    if (ret != 0)
-        return -55;
-
-    if (memcmp(agree, agree2, agreeSz))
-        return -56;
-
-    FreeDhKey(&key);
-    FreeDhKey(&key2);
-
-    return 0;
-}
-
-#endif /* NO_DH */
-
-
-#ifndef NO_DSA
-
-#ifdef FREESCALE_MQX
-    static const char* dsaKey = "a:\\certs\\dsa2048.der";
-#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
-    static const char* dsaKey = "./certs/dsa2048.der";
-#endif
-
-int dsa_test(void)
-{
-    int    ret, answer;
-    word32 bytes;
-    word32 idx = 0;
-    byte   tmp[1024];
-    DsaKey key;
-    RNG    rng;
-    Sha    sha;
-    byte   hash[SHA_DIGEST_SIZE];
-    byte   signature[40];
-
-        
-#ifdef USE_CERT_BUFFERS_1024
-    XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024);
-    bytes = sizeof_dsa_key_der_1024;
-#elif defined(USE_CERT_BUFFERS_2048)
-    XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048);
-    bytes = sizeof_dsa_key_der_2048;
-#else
-    FILE*  file = fopen(dsaKey, "rb");
-
-    if (!file)
-        return -60;
-
-    bytes = (word32) fread(tmp, 1, sizeof(tmp), file);
-    fclose(file);
-#endif /* USE_CERT_BUFFERS */
-  
-    InitSha(&sha);
-    ShaUpdate(&sha, tmp, bytes);
-    ShaFinal(&sha, hash);
-
-    InitDsaKey(&key);
-    ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes);
-    if (ret != 0) return -61;
-
-    ret = InitRng(&rng);
-    if (ret != 0) return -62;
-
-    ret = DsaSign(hash, signature, &key, &rng);
-    if (ret != 0) return -63;
-
-    ret = DsaVerify(hash, signature, &key, &answer);
-    if (ret != 0) return -64;
-    if (answer != 1) return -65;
-    
-    FreeDsaKey(&key);
-    
-    return 0;
-}
-
-#endif /* NO_DSA */
-
-
-#ifdef OPENSSL_EXTRA
-
-int openssl_test(void)
-{
-    EVP_MD_CTX md_ctx;
-    testVector a, b, c, d, e, f;
-    byte       hash[SHA_DIGEST_SIZE*4];  /* max size */
-
-    (void)e;
-    (void)f;
-
-    a.input  = "1234567890123456789012345678901234567890123456789012345678"
-               "9012345678901234567890";
-    a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6"
-               "\x7a";
-    a.inLen  = strlen(a.input);
-    a.outLen = MD5_DIGEST_SIZE;
-
-    EVP_MD_CTX_init(&md_ctx);
-    EVP_DigestInit(&md_ctx, EVP_md5());
-
-    EVP_DigestUpdate(&md_ctx, a.input, a.inLen);
-    EVP_DigestFinal(&md_ctx, hash, 0);
-
-    if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0)
-        return -71;
-
-    b.input  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-               "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-               "aaaaaaaaaa";
-    b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7"
-               "\x53\x99\x5E\x26\xA0";
-    b.inLen  = strlen(b.input);
-    b.outLen = SHA_DIGEST_SIZE;
-
-    EVP_MD_CTX_init(&md_ctx);
-    EVP_DigestInit(&md_ctx, EVP_sha1());
-
-    EVP_DigestUpdate(&md_ctx, b.input, b.inLen);
-    EVP_DigestFinal(&md_ctx, hash, 0);
-
-    if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0)
-        return -72;
-
-
-    d.input  = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
-    d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
-               "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
-               "\x06\xC1";
-    d.inLen  = strlen(d.input);
-    d.outLen = SHA256_DIGEST_SIZE;
-
-    EVP_MD_CTX_init(&md_ctx);
-    EVP_DigestInit(&md_ctx, EVP_sha256());
-
-    EVP_DigestUpdate(&md_ctx, d.input, d.inLen);
-    EVP_DigestFinal(&md_ctx, hash, 0);
-
-    if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0)
-        return -78;
-
-#ifdef CYASSL_SHA384
-
-    e.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
-               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
-    e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
-               "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
-               "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
-               "\x74\x60\x39";    
-    e.inLen  = strlen(e.input);
-    e.outLen = SHA384_DIGEST_SIZE;
-
-    EVP_MD_CTX_init(&md_ctx);
-    EVP_DigestInit(&md_ctx, EVP_sha384());
-
-    EVP_DigestUpdate(&md_ctx, e.input, e.inLen);
-    EVP_DigestFinal(&md_ctx, hash, 0);
-
-    if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0)
-        return -79;
-
-#endif /* CYASSL_SHA384 */
-
-
-#ifdef CYASSL_SHA512
-
-    f.input  = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
-               "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
-    f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
-               "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
-               "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
-               "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
-               "\x87\x4b\xe9\x09"; 
-    f.inLen  = strlen(f.input);
-    f.outLen = SHA512_DIGEST_SIZE; 
-
-    EVP_MD_CTX_init(&md_ctx);
-    EVP_DigestInit(&md_ctx, EVP_sha512());
-
-    EVP_DigestUpdate(&md_ctx, f.input, f.inLen);
-    EVP_DigestFinal(&md_ctx, hash, 0);
-
-    if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0)
-        return -80;
-
-#endif /* CYASSL_SHA512 */
-
-
-    if (RAND_bytes(hash, sizeof(hash)) != 1)
-        return -73;
-            
-    c.input  = "what do ya want for nothing?";
-    c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7"
-               "\x38";
-    c.inLen  = strlen(c.input);
-    c.outLen = MD5_DIGEST_SIZE;
-
-    HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0);
-
-    if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0)
-        return -74;
-
-    { /* des test */
-    const byte vector[] = { /* "now is the time for all " w/o trailing 0 */
-        0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
-        0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
-        0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-    };
-
-    byte plain[24];
-    byte cipher[24];
-
-    const_DES_cblock key = 
-    {
-        0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef
-    };
-
-    DES_cblock iv = 
-    {
-        0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef
-    };
-
-    DES_key_schedule sched;
-
-    const byte verify[] = 
-    {
-        0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8,
-        0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73,
-        0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
-    };
-
-    DES_key_sched(&key, &sched);
-
-    DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT);
-    DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT);
-
-    if (memcmp(plain, vector, sizeof(vector)) != 0)
-        return -75;
-
-    if (memcmp(cipher, verify, sizeof(verify)) != 0)
-        return -76;
-
-        /* test changing iv */
-    DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT);
-    DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT);
-
-    if (memcmp(cipher, verify, sizeof(verify)) != 0)
-        return -77;
-
-    }  /* end des test */
-
-    {  /* evp_cipher test */
-        EVP_CIPHER_CTX ctx;
-
-
-        const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */
-            0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
-            0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
-            0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-        };
-
-        const byte verify[] = 
-        {
-            0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
-            0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
-        };
-
-        byte key[] = "0123456789abcdef   ";  /* align */
-        byte iv[]  = "1234567890abcdef   ";  /* align */
-
-        byte cipher[AES_BLOCK_SIZE * 4];
-        byte plain [AES_BLOCK_SIZE * 4];
-
-        EVP_CIPHER_CTX_init(&ctx);
-        if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0)
-            return -81;
-
-        if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0)
-            return -82;
-
-        if (memcmp(cipher, verify, AES_BLOCK_SIZE))
-            return -83;
-
-        EVP_CIPHER_CTX_init(&ctx);
-        if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0)
-            return -84;
-
-        if (EVP_Cipher(&ctx, plain, cipher, 16) == 0)
-            return -85;
-
-        if (memcmp(plain, msg, AES_BLOCK_SIZE))
-            return -86;
-
-
-    }  /* end evp_cipher test */
-
-    return 0;
-}
-
-#endif /* OPENSSL_EXTRA */
-
-
-#ifndef NO_PWDBASED
-
-int pkcs12_test(void)
-{
-    const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67,
-                            0x00, 0x00 }; 
-    const byte salt[] =   { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f };
-
-    const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65,
-                             0x00, 0x67, 0x00, 0x00 }; 
-    const byte salt2[] =   { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 };
-    byte  derived[64];
-
-    const byte verify[] = {
-        0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46,
-        0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E,
-        0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3
-    };
-
-    const byte verify2[] = {
-        0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E,
-        0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB,
-        0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F
-    };
-
-    int id         =  1;
-    int kLen       = 24;
-    int iterations =  1;
-    int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations,
-                           kLen, SHA, id);
-
-    if (ret < 0)
-        return -103;
-
-    if ( (ret = memcmp(derived, verify, kLen)) != 0)
-        return -104;
-
-    iterations = 1000;
-    ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, 
-                       kLen, SHA, id);
-    if (ret < 0)
-        return -105;
-
-    if ( (ret = memcmp(derived, verify2, 24)) != 0)
-        return -106;
-
-    return 0;
-}
-
-
-int pbkdf2_test(void)
-{
-    char passwd[] = "password";
-    const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 };
-    int   iterations = 2048;
-    int   kLen = 24;
-    byte  derived[64];
-
-    const byte verify[] = {
-        0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2,
-        0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43
-
-    };
-
-    PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations,
-           kLen, SHA);
-
-    if (memcmp(derived, verify, sizeof(verify)) != 0)
-        return -102;
-
-    return 0;
-}
-
-
-int pbkdf1_test(void)
-{
-    char passwd[] = "password";
-    const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 };
-    int   iterations = 1000;
-    int   kLen = 16;
-    byte  derived[16];
-
-    const byte verify[] = {
-        0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB,
-        0x4A, 0x3D, 0x2A, 0x20
-    };
-
-    PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations,
-           kLen, SHA);
-
-    if (memcmp(derived, verify, sizeof(verify)) != 0)
-        return -101;
-
-    return 0;
-}
-
-
-int pwdbased_test(void)
-{
-   int ret =  pbkdf1_test();
-   ret += pbkdf2_test();
-
-   return ret + pkcs12_test();
-}
-
-#endif /* NO_PWDBASED */
-
-
-#ifdef HAVE_ECC
-
-int ecc_test(void)
-{
-    RNG     rng;
-    byte    sharedA[1024];
-    byte    sharedB[1024];
-    byte    sig[1024];
-    byte    digest[20];
-    byte    exportBuf[1024];
-    word32  x, y;
-    int     i, verify, ret;
-    ecc_key userA, userB, pubKey;
-
-    ret = InitRng(&rng);
-    if (ret != 0)
-        return -1001;
-
-    ecc_init(&userA);
-    ecc_init(&userB);
-    ecc_init(&pubKey);
-
-    ret = ecc_make_key(&rng, 32, &userA);
-    ret = ecc_make_key(&rng, 32, &userB);
-
-    if (ret != 0)
-        return -1002;
-
-    x = sizeof(sharedA);
-    ret = ecc_shared_secret(&userA, &userB, sharedA, &x);
-   
-    y = sizeof(sharedB);
-    ret = ecc_shared_secret(&userB, &userA, sharedB, &y);
-    
-    if (ret != 0)
-        return -1003;
-
-    if (y != x)
-        return -1004;
-
-    if (memcmp(sharedA, sharedB, x))
-        return -1005;
-
-    x = sizeof(exportBuf);
-    ret = ecc_export_x963(&userA, exportBuf, &x);
-    if (ret != 0)
-        return -1006;
-
-    ret = ecc_import_x963(exportBuf, x, &pubKey);
-
-    if (ret != 0) 
-        return -1007;
-
-    y = sizeof(sharedB);
-    ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y);
-   
-    if (ret != 0)
-        return -1008;
-
-    if (memcmp(sharedA, sharedB, y))
-        return -1010;
-
-    /* test DSA sign hash */
-    for (i = 0; i < (int)sizeof(digest); i++)
-        digest[i] = i;
-
-    x = sizeof(sig);
-    ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA);
-    
-    verify = 0;
-    ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA);
-
-    if (ret != 0)
-        return -1011;
-
-    if (verify != 1)
-        return -1012;
-
-    ecc_free(&pubKey);
-    ecc_free(&userB);
-    ecc_free(&userA);
-
-    return 0;
-}
-
-#endif /* HAVE_ECC */
-
-#ifdef HAVE_LIBZ
-
-const byte sample_text[] =
-    "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n"
-    "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n"
-    "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n"
-    "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n"
-    "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n"
-    "small batch meggings kogi dolore food truck bespoke gastropub.\n"
-    "\n"
-    "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n"
-    "four loko you probably haven't heard of them high life. Messenger bag\n"
-    "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n"
-    "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n"
-    "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n"
-    "food truck next level, tousled irony non semiotics PBR ethical anim cred\n"
-    "readymade. Mumblecore brunch lomo odd future, portland organic terry\n"
-    "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n"
-    "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n"
-    "four loko whatever street art yr farm-to-table.\n"
-    "\n"
-    "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n"
-    "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n"
-    "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n"
-    "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n"
-    "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n"
-    "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n"
-    "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n"
-    "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n"
-    "locavore.\n"
-    "\n"
-    "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n"
-    "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n"
-    "cillum pickled velit, YOLO officia you probably haven't heard of them\n"
-    "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n"
-    "small batch american apparel. Put a bird on it cosby sweater before they\n"
-    "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n"
-    "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n"
-    "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n"
-    "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n"
-    "neutra PBR selvage.\n"
-    "\n"
-    "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n"
-    "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n"
-    "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n"
-    "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n"
-    "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n"
-    "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n"
-    "incididunt flannel sustainable helvetica pork belly pug banksy you\n"
-    "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n"
-    "mollit magna, sriracha sartorial helvetica.\n"
-    "\n"
-    "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n"
-    "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n"
-    "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n"
-    "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n"
-    "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n"
-    "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n"
-    "Veniam sunt food truck leggings, sint vinyl fap.\n"
-    "\n"
-    "Hella dolore pork belly, truffaut carles you probably haven't heard of\n"
-    "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n"
-    "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n"
-    "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n"
-    "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n"
-    "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n"
-    "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n"
-    "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n"
-    "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n"
-    "\n"
-    "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n"
-    "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n"
-    "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n"
-    "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n"
-    "tousled beard mollit mustache leggings portland next level. Nihil esse\n"
-    "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n"
-    "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n"
-    "bag dolor terry richardson sapiente.\n";
-
-
-int compress_test(void)
-{
-    int ret = 0;
-    word32 dSz = sizeof(sample_text);
-    word32 cSz = (dSz + (word32)(dSz * 0.001) + 12);
-    byte *c = NULL;
-    byte *d = NULL;
-
-    c = calloc(cSz, sizeof(byte));
-    d = calloc(dSz, sizeof(byte));
-
-    if (c == NULL || d == NULL)
-        ret = -300;
-
-    if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0)
-        ret = -301;
-
-    if (ret > 0) {
-        cSz = (word32)ret;
-        ret = 0;
-    }
-
-    if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz)
-        ret = -302;
-
-    if (ret == 0 && memcmp(d, sample_text, dSz))
-        ret = -303;
-    
-    if (c) free(c);
-    if (d) free(d);
-
-    return ret;
-}
-
-#endif /* HAVE_LIBZ */
-
-#endif /* NO_CRYPT_TEST */
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt
deleted file mode 100644
index 2656e403..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/Abstract.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This program is echo client with CyaSSL/wolfCrypt library.
-
-In order to run this program, 
-Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory.
-Set config-EchoClient.h configuration file for the Callee IP or Port number.
-
-For further configuration, refer config-Crypt.h and config-CyaSSL.h.
-
-When testing this client, it is recommended to test against one of the standard 
-CyaSSL example applications running on a desktop machine.  The standard CyaSSL 
-example applications are located in the CyaSSL root directory under the 
-/examples directory.
-
-For the hardware crypt on config-Crypt.h, download 
-STSW-STM32062: STM32F2xx standard peripherals library at 
-http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to 
- {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
-
-
-Support
--------
-Please send questions or comments to support@wolfssl.com
\ No newline at end of file
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx
deleted file mode 100644
index 7e61facf..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvoptx
+++ /dev/null
@@ -1,1422 +0,0 @@
-
-
-
-  1.0
-
-  
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - EchoClient - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - ((func_args*)args)->signal->port - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 28 - 0 - 0 - 0 - 0 - .\echoclient.c - echoclient.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 24 - 0 - 0 - 0 - 0 - .\config-EchoClient.h - config-EchoClient.h - 0 - 0 - - - 2 - 4 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 0 - 0 - - - 2 - 5 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Dcumentation - 1 - 0 - 0 - 0 - - 3 - 6 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 7 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 10 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 11 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 12 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 13 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - PHY_ST802RT1.c - 1 - 0 - - - 6 - 15 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - EMAC_STM32F2xx.c - 1 - 0 - - - 6 - 16 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 17 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 19 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::Network - 0 - 0 - 0 - 1 - - 8 - 20 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - Net_Dbg_CM3_L.lib - 1 - 0 - - - 8 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config.c - Net_Config.c - 1 - 0 - - - 8 - 22 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_BSD.h - Net_Config_BSD.h - 1 - 0 - - - 8 - 23 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_DNS_Client.h - Net_Config_DNS_Client.h - 1 - 0 - - - 8 - 24 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_ETH_0.h - Net_Config_ETH_0.h - 1 - 0 - - - 8 - 25 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_TCP.h - Net_Config_TCP.h - 1 - 0 - - - 8 - 26 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_UDP.h - Net_Config_UDP.h - 1 - 0 - - - 8 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Debug.c - Net_Debug.c - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 9 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 9 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 9 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 9 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 9 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 9 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 9 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 9 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 9 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 9 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 9 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 9 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 9 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 9 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 9 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 9 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 9 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 9 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 9 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 9 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 9 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 9 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 9 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 9 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 9 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 9 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 9 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 9 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 9 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 9 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 9 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 9 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 9 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 9 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 9 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - crl.c - 1 - 0 - - - 9 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - internal.c - 1 - 0 - - - 9 - 64 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - io.c - 1 - 0 - - - 9 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - keys.c - 1 - 0 - - - 9 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - ocsp.c - 1 - 0 - - - 9 - 67 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - sniffer.c - 1 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - ssl.c - 1 - 0 - - - 9 - 69 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - tls.c - 1 - 0 - - - 9 - 70 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 9 - 71 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 1 - 0 - - - 9 - 72 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config.h - config.h - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx deleted file mode 100644 index 7b4076c6..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/EchoClient.uvprojx +++ /dev/null @@ -1,1106 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - EchoClient - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - EchoClient - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_EchoClient CYASSL_STM32F2xx - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - echoclient.c - 1 - .\echoclient.c - - - - - Configuration - - - config-EchoClient.h - 5 - .\config-EchoClient.h - - - config-CyaSSL.h - 5 - .\RTE\wolfSSL\config-CyaSSL.h - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Dcumentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - PHY_ST802RT1.c - 1 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - - - EMAC_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::Network - - - Net_Dbg_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - - - Net_Config.c - 1 - RTE\Network\Net_Config.c - - - Net_Config_BSD.h - 5 - RTE\Network\Net_Config_BSD.h - - - Net_Config_DNS_Client.h - 5 - RTE\Network\Net_Config_DNS_Client.h - - - Net_Config_ETH_0.h - 5 - RTE\Network\Net_Config_ETH_0.h - - - Net_Config_TCP.h - 5 - RTE\Network\Net_Config_TCP.h - - - Net_Config_UDP.h - 5 - RTE\Network\Net_Config_UDP.h - - - Net_Debug.c - 1 - RTE\Network\Net_Debug.c - - - - - ::wolfSSL - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - - - crl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - - - internal.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - - - io.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - - - keys.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - - - ocsp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - - - sniffer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - - - ssl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - - - tls.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config-CyaSSL.h - 5 - RTE\wolfSSL\config-CyaSSL.h - - - config.h - 5 - RTE\wolfSSL\config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - - - RTE\Network\Net_Debug.c - - - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-CyaSSL.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config-CyaSSL.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index 54b3e0bf..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 5 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 250 -#endif - -// Main Thread stack size [bytes] <64-20000:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 2000 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 2 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 2500 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-64000:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 4a09246f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 1 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index d398143e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00000400 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00007000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c deleted file mode 100644 index 6b9dc8e0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config.c +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config.c - * Purpose: Network Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Definitions -// Global Network System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "my_host" -#define NET_HOST_NAME "my_host" - -// Memory Pool size <1536-262144:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// Network packets are allocated from this memory pool. -// Default: 12000 bytes -#define NET_MEM_SIZE 3000 - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_Network_Interface_ETH_0 -#include "Net_Config_ETH_0.h" -#endif -#ifdef RTE_Network_Interface_ETH_1 -#include "Net_Config_ETH_1.h" -#endif - -#ifdef RTE_Network_Interface_PPP_0 -#include "Net_Config_PPP_0.h" -#endif -#ifdef RTE_Network_Interface_PPP_1 -#include "Net_Config_PPP_1.h" -#endif - -#ifdef RTE_Network_Interface_SLIP_0 -#include "Net_Config_SLIP_0.h" -#endif -#ifdef RTE_Network_Interface_SLIP_1 -#include "Net_Config_SLIP_1.h" -#endif - -#ifdef RTE_Network_Socket_UDP -#include "Net_Config_UDP.h" -#endif -#ifdef RTE_Network_Socket_TCP -#include "Net_Config_TCP.h" -#endif -#ifdef RTE_Network_Socket_BSD -#include "Net_Config_BSD.h" -#endif - -#ifdef RTE_Network_Web_Server_RO -#include "Net_Config_HTTP_Server.h" -#endif -#ifdef RTE_Network_Web_Server_FS -#include "Net_Config_HTTP_Server.h" -#endif - -#ifdef RTE_Network_Telnet_Server -#include "Net_Config_Telnet_Server.h" -#endif - -#ifdef RTE_Network_TFTP_Server -#include "Net_Config_TFTP_Server.h" -#endif -#ifdef RTE_Network_TFTP_Client -#include "Net_Config_TFTP_Client.h" -#endif - -#ifdef RTE_Network_FTP_Server -#include "Net_Config_FTP_Server.h" -#endif -#ifdef RTE_Network_FTP_Client -#include "Net_Config_FTP_Client.h" -#endif - -#ifdef RTE_Network_DNS_Client -#include "Net_Config_DNS_Client.h" -#endif - -#ifdef RTE_Network_SMTP_Client -#include "Net_Config_SMTP_Client.h" -#endif - -#ifdef RTE_Network_SNMP_Agent -#include "Net_Config_SNMP_Agent.h" -#endif - -#ifdef RTE_Network_SNTP_Client -#include "Net_Config_SNTP_Client.h" -#endif - -#include "net_config.h" - -/** -\addtogroup net_genFunc -@{ -*/ -/** - \fn void net_sys_error (ERROR_CODE error) - \ingroup net_cores - \brief Network system error handler. -*/ -void net_sys_error (ERROR_CODE error) { - /* This function is called when a fatal error is encountered. */ - /* The normal program execution is not possible anymore. */ - - switch (error) { - case ERR_MEM_ALLOC: - /* Out of memory */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer Corrupted */ - /* More data written than the size of allocated mem block */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state */ - break; - } - - /* End-less loop */ - while (1); -} -/** -@} -*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h deleted file mode 100644 index d7e6a614..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_BSD.h - * Purpose: Network Configuration BSD Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Berkley (BSD) Sockets -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUM_SOCKS 7 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SERVER_SOCKS 1 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RECEIVE_TOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_HOSTNAME_ENABLE 0 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h deleted file mode 100644 index d30b7180..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Service - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_DNS_Client.h - * Purpose: Network Configuration DNS Client - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// DNS Client -#define DNS_CLIENT_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_CLIENT_TAB_SIZE 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h deleted file mode 100644 index 7be57ad6..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Interface - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_ETH_0.h - * Purpose: Network Configuration ETH Interface - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Ethernet Network Interface 0 -#define ETH0_ENABLE 1 - -// Connect to hardware via Driver_ETH# <0-255> -// Select driver control block for MAC and PHY interface -#define ETH0_DRIVER 1 - -// MAC Address -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x1E -#define ETH0_MAC1 0x1E - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define ETH0_MAC2 0x30 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define ETH0_MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0xA2 -#define ETH0_MAC4 0xA2 - -// Address byte 5 <0x00-0xff> -// Default: 0x45 -#define ETH0_MAC5 0x45 - -// Address byte 6 <0x00-0xff> -// Default: 0x5E -#define ETH0_MAC6 0x5E -// - -// IP Address -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define ETH0_IP4 100 -// - -// Subnet mask -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define ETH0_MASK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define ETH0_MASK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define ETH0_MASK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define ETH0_MASK4 0 -// - -// Default Gateway -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define ETH0_GW4 254 -// - -// Primary DNS Server -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_PRI_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_PRI_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_PRI_DNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define ETH0_PRI_DNS4 129 -// - -// Secondary DNS Server -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_SEC_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_SEC_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_SEC_DNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define ETH0_SEC_DNS4 130 -// - -// ARP Definitions -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ETH0_ARP_TAB_SIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ETH0_ARP_CACHE_TOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ETH0_ARP_MAX_RETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ETH0_ARP_RESEND_TOUT 2 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ETH0_ARP_NOTIFY 0 -// - -// IGMP Group Management -// Enable or disable Internet Group Management Protocol -#define ETH0_IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define ETH0_IGMP_TAB_SIZE 5 -// - -// NetBIOS Name Service -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define ETH0_NBNS_ENABLE 1 - -// Dynamic Host Configuration -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define ETH0_DHCP_ENABLE 1 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define ETH0_DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_BOOTFILE 0 - -// NTP Servers -// This value is optional. If enabled, a list of NTP Servers -// (option 42) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_NTP_SERVERS 0 -// - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h deleted file mode 100644 index e659ce92..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_TCP.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_TCP.h - * Purpose: Network Configuration TCP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUM_SOCKS 10 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAX_RETRY 5 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRY_TOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFAULT_TOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAX_SEG_SIZE 1460 - -// Receive Window Size <536-65535> -// Receive Window Size specifies the size of data, -// that the socket is able to buffer in flow-control mode. -// Default: 4380 -#define TCP_RECEIVE_WIN_SIZE 4380 - -// - -// TCP Initial Retransmit period in seconds -#define TCP_INITIAL_RETRY_TOUT 1 - -// TCP SYN frame retransmit period in seconds -#define TCP_SYN_RETRY_TOUT 2 - -// Number of retries to establish a connection -#define TCP_CONNECT_RETRY 7 - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h deleted file mode 100644 index b7995c22..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_UDP.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_UDP.h - * Purpose: Network Configuration UDP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-20> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUM_SOCKS 10 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c deleted file mode 100644 index 735089a4..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Debug.c - * Purpose: Network Debug Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Print Time Stamp -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 0 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 0 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 1 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 1 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Time debug messages -#define DBG_SNTP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 1 -// - -// Application Debug Definitions -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP_SERVER 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP_SERVER 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTP_CLIENT 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TELNET_SERVER 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP_SERVER 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTP_CLIENT 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP_CLIENT 1 -// - - -#include "net_debug.h" - - -/** - \fn void net_debug_init (void) - \brief Initialize Network Debug Interface. -*/ -void net_debug_init (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h deleted file mode 100644 index 631a7714..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/RTE/RTE_Components.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'EchoClient' - * Target: 'EchoClient' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ -#define RTE_Network_Core /* Network Core */ - #define RTE_Network_Debug /* Network Debug Version */ -#define RTE_Network_DNS_Client /* Network DNS Client */ -#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ -#define RTE_Network_Socket_BSD /* Network Socket BSD */ -#define RTE_Network_Socket_TCP /* Network Socket TCP */ -#define RTE_Network_Socket_UDP /* Network Socket UDP */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c deleted file mode 100644 index 3793d6dd..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/echoclient.c +++ /dev/null @@ -1,287 +0,0 @@ -/* echoclient.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#include "examples/echoclient/echoclient.h" - -void echoclient_test(void* args) -{ - SOCKET_T sockfd = 0; - - FILE* fin = stdin ; - FILE* fout = stdout; - - int inCreated = 0; - int outCreated = 0; - - char msg[1024]; - char reply[1024+1]; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - - int doDTLS = 0; - int doPSK = 0; - int sendSz; - int argc = 0; - char** argv = 0; - int port = yasslPort; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifndef CYASSL_MDK_ARM - argc = ((func_args*)args)->argc; - argv = ((func_args*)args)->argv; -#endif - - if (argc >= 2) { - fin = fopen(argv[1], "r"); - inCreated = 1; - } - if (argc >= 3) { - fout = fopen(argv[2], "w"); - outCreated = 1; - } - - if (!fin) err_sys("can't open input file"); - if (!fout) err_sys("can't open output file"); - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - -#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) - port = ((func_args*)args)->signal->port; -#endif -#if defined (CYASSL_CALLEE_PORT) - port = CYASSL_CALLEE_PORT ; -#endif - -#if defined(CYASSL_DTLS) - method = DTLSv1_client_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_client_method(); -#else - method = SSLv3_client_method(); -#endif - ctx = SSL_CTX_new(method); - -#ifndef NO_FILESYSTEM - #ifndef NO_RSA - if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif - #ifdef HAVE_ECC - if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif -#elif !defined(NO_CERTS) - if (!doPSK) - load_buffer(ctx, caCert, CYASSL_CA); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); -#endif - } - -#ifdef OPENSSL_EXTRA - SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = SSL_new(ctx); - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, yasslIP, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, yasslIP, port, 0); - } - - SSL_set_fd(ssl, sockfd); -#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) - /* let echoserver bind first, TODO: add Windows signal like pthreads does */ - Sleep(100); -#endif - - if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); - - while (fgets(msg, sizeof(msg), fin) != 0) { - - sendSz = (int)strlen(msg); - - if (SSL_write(ssl, msg, sendSz) != sendSz) - err_sys("SSL_write failed"); - - if (strncmp(msg, "quit", 4) == 0) { - fputs("sending server shutdown command: quit!\n", fout); - break; - } - - if (strncmp(msg, "break", 5) == 0) { - fputs("sending server session close: break!\n", fout); - break; - } - - #ifndef CYASSL_MDK_SHELL - while (sendSz) { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - else - break; - } - #else - { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - } - #endif - } - -#ifdef CYASSL_CMSIS_RTOS - osDelay(5000) ; -#endif - - -#ifdef CYASSL_DTLS - strncpy(msg, "break", 6); - sendSz = (int)strlen(msg); - /* try to tell server done */ - SSL_write(ssl, msg, sendSz); -#else - SSL_shutdown(ssl); -#endif - - SSL_free(ssl); - SSL_CTX_free(ctx); - - fflush(fout); - if (inCreated) fclose(fin); - if (outCreated) fclose(fout); - - CloseSocket(sockfd); - ((func_args*)args)->return_code = 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - - if (CurrentDir("echoclient") || CurrentDir("build")) - ChangeDirBack(2); - echoclient_test(&args); - - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - -#endif /* NO_MAIN_DRIVER */ - - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c deleted file mode 100644 index ccfb92fc..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoClient/main.c +++ /dev/null @@ -1,101 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include "cmsis_os.h" -#include "rl_fs.h" -#include "rl_net.h" -#include -#include "cyassl_MDK_ARM.h" -#include - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -static void init_filesystem (void) { - int32_t retv; - - retv = finit ("M0:"); - if (retv == 0) { - retv = fmount ("M0:"); - if (retv == 0) { - printf ("Drive M0 ready!\n"); - } - else { - printf ("Drive M0 mount failed!\n"); - } - } - else { - printf ("Drive M0 initialization failed!\n"); - } -} - -/*----------------------------------------------------------------------------- - * TCP/IP tasks - *----------------------------------------------------------------------------*/ -void tcp_poll (void const *arg) -{ - CYASSL_MSG("TCP polling started.\n") ; - while (1) { - net_main (); - osDelay(1) ; - } -} - -typedef struct func_args { - int argc; - char** argv; -} func_args; - -extern void echoclient_test(func_args * args) ; -extern void init_time(void) ; - - osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ -int myoptind = 0; -char* myoptarg = NULL; - -#include "config-EchoClient.h" - -int main() -{ - void *args = NULL ; - init_time() ; - init_filesystem (); - net_initialize() ; - osThreadCreate (osThread (tcp_poll), NULL); - osDelay(30000) ; /* wait for DHCP */ - #if defined(DEBUG_CYASSL) - printf("Turning ON Debug message\n") ; - CyaSSL_Debugging_ON() ; - #endif - - echoclient_test(args) ; - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt deleted file mode 100644 index d43c94a3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/Abstract.txt +++ /dev/null @@ -1,24 +0,0 @@ -This program is echo server with CyaSSL/wolfCrypt library. - -In order to run this program, -Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. -Set the server IP address in Net_Config_ETH_0.h -The server default port is 11111, defined in test.h. - -For further configuration, refer config-Crypt.h and config-CyaSSL.h. - -When testing this server, it is recommended to test against one of the standard -CyaSSL example applications running on a desktop machine. The standard CyaSSL -example applications are located in the CyaSSL root directory under the -/examples directory. - -For the hardware crypt on config-Crypt.h, download -STSW-STM32062: STM32F2xx standard peripherals library at -http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to - {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib - - -Support -------- -Please send questions or comments to support@wolfssl.com - \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx deleted file mode 100644 index ba35f0f5..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvoptx +++ /dev/null @@ -1,1406 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - EchoServer - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - 0x20000408 - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 17 - 0 - 0 - 0 - 0 - .\echoserver.c - echoserver.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 0 - 0 - - - 2 - 4 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 5 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 6 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 10 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 11 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 12 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 13 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - PHY_ST802RT1.c - 1 - 0 - - - 6 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - EMAC_STM32F2xx.c - 1 - 0 - - - 6 - 15 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 16 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 17 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 18 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::Network - 0 - 0 - 0 - 1 - - 8 - 19 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - Net_Dbg_CM3_L.lib - 1 - 0 - - - 8 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config.c - Net_Config.c - 1 - 0 - - - 8 - 21 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_BSD.h - Net_Config_BSD.h - 1 - 0 - - - 8 - 22 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_DNS_Client.h - Net_Config_DNS_Client.h - 1 - 0 - - - 8 - 23 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_ETH_0.h - Net_Config_ETH_0.h - 1 - 0 - - - 8 - 24 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_TCP.h - Net_Config_TCP.h - 1 - 0 - - - 8 - 25 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_UDP.h - Net_Config_UDP.h - 1 - 0 - - - 8 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Debug.c - Net_Debug.c - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 9 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 9 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 9 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 9 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 9 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 9 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 9 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 9 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 9 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 9 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 9 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 9 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 9 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 9 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 9 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 9 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 9 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 9 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 9 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 9 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 9 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 9 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 9 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 9 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 9 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 9 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 9 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 9 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 9 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 9 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 9 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 9 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 9 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 9 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 9 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - crl.c - 1 - 0 - - - 9 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - internal.c - 1 - 0 - - - 9 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - io.c - 1 - 0 - - - 9 - 64 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - keys.c - 1 - 0 - - - 9 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - ocsp.c - 1 - 0 - - - 9 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - sniffer.c - 1 - 0 - - - 9 - 67 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - ssl.c - 1 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - tls.c - 1 - 0 - - - 9 - 69 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 9 - 70 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 1 - 0 - - - 9 - 71 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config.h - config.h - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx deleted file mode 100644 index b8ce12e1..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/EchoServer.uvprojx +++ /dev/null @@ -1,1101 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - EchoServer - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - EchoServer - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_SimpleClient CYASSL_STM32F2xx - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - echoserver.c - 1 - .\echoserver.c - - - - - Configuration - - - config-CyaSSL.h - 5 - .\RTE\wolfSSL\config-CyaSSL.h - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - PHY_ST802RT1.c - 1 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - - - EMAC_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::Network - - - Net_Dbg_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - - - Net_Config.c - 1 - RTE\Network\Net_Config.c - - - Net_Config_BSD.h - 5 - RTE\Network\Net_Config_BSD.h - - - Net_Config_DNS_Client.h - 5 - RTE\Network\Net_Config_DNS_Client.h - - - Net_Config_ETH_0.h - 5 - RTE\Network\Net_Config_ETH_0.h - - - Net_Config_TCP.h - 5 - RTE\Network\Net_Config_TCP.h - - - Net_Config_UDP.h - 5 - RTE\Network\Net_Config_UDP.h - - - Net_Debug.c - 1 - RTE\Network\Net_Debug.c - - - - - ::wolfSSL - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - - - crl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - - - internal.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - - - io.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - - - keys.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - - - ocsp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - - - sniffer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - - - ssl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - - - tls.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config-CyaSSL.h - 5 - RTE\wolfSSL\config-CyaSSL.h - - - config.h - 5 - RTE\wolfSSL\config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - - - RTE\Network\Net_Debug.c - - - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-CyaSSL.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config-CyaSSL.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index 54b3e0bf..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 5 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 250 -#endif - -// Main Thread stack size [bytes] <64-20000:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 2000 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 2 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 2500 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-64000:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 4a09246f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 1 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index c4e2ab9f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00002000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00007000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c deleted file mode 100644 index 6b9dc8e0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config.c +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config.c - * Purpose: Network Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Definitions -// Global Network System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "my_host" -#define NET_HOST_NAME "my_host" - -// Memory Pool size <1536-262144:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// Network packets are allocated from this memory pool. -// Default: 12000 bytes -#define NET_MEM_SIZE 3000 - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_Network_Interface_ETH_0 -#include "Net_Config_ETH_0.h" -#endif -#ifdef RTE_Network_Interface_ETH_1 -#include "Net_Config_ETH_1.h" -#endif - -#ifdef RTE_Network_Interface_PPP_0 -#include "Net_Config_PPP_0.h" -#endif -#ifdef RTE_Network_Interface_PPP_1 -#include "Net_Config_PPP_1.h" -#endif - -#ifdef RTE_Network_Interface_SLIP_0 -#include "Net_Config_SLIP_0.h" -#endif -#ifdef RTE_Network_Interface_SLIP_1 -#include "Net_Config_SLIP_1.h" -#endif - -#ifdef RTE_Network_Socket_UDP -#include "Net_Config_UDP.h" -#endif -#ifdef RTE_Network_Socket_TCP -#include "Net_Config_TCP.h" -#endif -#ifdef RTE_Network_Socket_BSD -#include "Net_Config_BSD.h" -#endif - -#ifdef RTE_Network_Web_Server_RO -#include "Net_Config_HTTP_Server.h" -#endif -#ifdef RTE_Network_Web_Server_FS -#include "Net_Config_HTTP_Server.h" -#endif - -#ifdef RTE_Network_Telnet_Server -#include "Net_Config_Telnet_Server.h" -#endif - -#ifdef RTE_Network_TFTP_Server -#include "Net_Config_TFTP_Server.h" -#endif -#ifdef RTE_Network_TFTP_Client -#include "Net_Config_TFTP_Client.h" -#endif - -#ifdef RTE_Network_FTP_Server -#include "Net_Config_FTP_Server.h" -#endif -#ifdef RTE_Network_FTP_Client -#include "Net_Config_FTP_Client.h" -#endif - -#ifdef RTE_Network_DNS_Client -#include "Net_Config_DNS_Client.h" -#endif - -#ifdef RTE_Network_SMTP_Client -#include "Net_Config_SMTP_Client.h" -#endif - -#ifdef RTE_Network_SNMP_Agent -#include "Net_Config_SNMP_Agent.h" -#endif - -#ifdef RTE_Network_SNTP_Client -#include "Net_Config_SNTP_Client.h" -#endif - -#include "net_config.h" - -/** -\addtogroup net_genFunc -@{ -*/ -/** - \fn void net_sys_error (ERROR_CODE error) - \ingroup net_cores - \brief Network system error handler. -*/ -void net_sys_error (ERROR_CODE error) { - /* This function is called when a fatal error is encountered. */ - /* The normal program execution is not possible anymore. */ - - switch (error) { - case ERR_MEM_ALLOC: - /* Out of memory */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer Corrupted */ - /* More data written than the size of allocated mem block */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state */ - break; - } - - /* End-less loop */ - while (1); -} -/** -@} -*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h deleted file mode 100644 index 4166a0a2..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_BSD.h - * Purpose: Network Configuration BSD Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Berkley (BSD) Sockets -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUM_SOCKS 15 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SERVER_SOCKS 1 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RECEIVE_TOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_HOSTNAME_ENABLE 0 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h deleted file mode 100644 index d30b7180..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Service - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_DNS_Client.h - * Purpose: Network Configuration DNS Client - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// DNS Client -#define DNS_CLIENT_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_CLIENT_TAB_SIZE 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h deleted file mode 100644 index 9a49f382..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Interface - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_ETH_0.h - * Purpose: Network Configuration ETH Interface - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Ethernet Network Interface 0 -#define ETH0_ENABLE 1 - -// Connect to hardware via Driver_ETH# <0-255> -// Select driver control block for MAC and PHY interface -#define ETH0_DRIVER 1 - -// MAC Address -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x1E -#define ETH0_MAC1 0x1E - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define ETH0_MAC2 0x30 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define ETH0_MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0xA2 -#define ETH0_MAC4 0xA2 - -// Address byte 5 <0x00-0xff> -// Default: 0x45 -#define ETH0_MAC5 0x45 - -// Address byte 6 <0x00-0xff> -// Default: 0x5E -#define ETH0_MAC6 0x5E -// - -// IP Address -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define ETH0_IP4 100 -// - -// Subnet mask -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define ETH0_MASK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define ETH0_MASK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define ETH0_MASK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define ETH0_MASK4 0 -// - -// Default Gateway -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define ETH0_GW4 254 -// - -// Primary DNS Server -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_PRI_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_PRI_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_PRI_DNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define ETH0_PRI_DNS4 129 -// - -// Secondary DNS Server -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_SEC_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_SEC_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_SEC_DNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define ETH0_SEC_DNS4 130 -// - -// ARP Definitions -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ETH0_ARP_TAB_SIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ETH0_ARP_CACHE_TOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ETH0_ARP_MAX_RETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ETH0_ARP_RESEND_TOUT 2 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ETH0_ARP_NOTIFY 0 -// - -// IGMP Group Management -// Enable or disable Internet Group Management Protocol -#define ETH0_IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define ETH0_IGMP_TAB_SIZE 5 -// - -// NetBIOS Name Service -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define ETH0_NBNS_ENABLE 1 - -// Dynamic Host Configuration -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define ETH0_DHCP_ENABLE 0 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define ETH0_DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_BOOTFILE 0 - -// NTP Servers -// This value is optional. If enabled, a list of NTP Servers -// (option 42) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_NTP_SERVERS 0 -// - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h deleted file mode 100644 index 9d5b419e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_TCP.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_TCP.h - * Purpose: Network Configuration TCP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUM_SOCKS 15 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAX_RETRY 5 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRY_TOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFAULT_TOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAX_SEG_SIZE 1460 - -// Receive Window Size <536-65535> -// Receive Window Size specifies the size of data, -// that the socket is able to buffer in flow-control mode. -// Default: 4380 -#define TCP_RECEIVE_WIN_SIZE 4380 - -// - -// TCP Initial Retransmit period in seconds -#define TCP_INITIAL_RETRY_TOUT 1 - -// TCP SYN frame retransmit period in seconds -#define TCP_SYN_RETRY_TOUT 2 - -// Number of retries to establish a connection -#define TCP_CONNECT_RETRY 7 - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h deleted file mode 100644 index 113f314a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_UDP.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_UDP.h - * Purpose: Network Configuration UDP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-20> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUM_SOCKS 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c deleted file mode 100644 index 735089a4..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Debug.c - * Purpose: Network Debug Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Print Time Stamp -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 0 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 0 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 1 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 1 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Time debug messages -#define DBG_SNTP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 1 -// - -// Application Debug Definitions -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP_SERVER 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP_SERVER 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTP_CLIENT 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TELNET_SERVER 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP_SERVER 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTP_CLIENT 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP_CLIENT 1 -// - - -#include "net_debug.h" - - -/** - \fn void net_debug_init (void) - \brief Initialize Network Debug Interface. -*/ -void net_debug_init (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h deleted file mode 100644 index 20773df0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/RTE/RTE_Components.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'EchoServer' - * Target: 'EchoServer' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ -#define RTE_Network_Core /* Network Core */ - #define RTE_Network_Debug /* Network Debug Version */ -#define RTE_Network_DNS_Client /* Network DNS Client */ -#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ -#define RTE_Network_Socket_BSD /* Network Socket BSD */ -#define RTE_Network_Socket_TCP /* Network Socket TCP */ -#define RTE_Network_Socket_UDP /* Network Socket UDP */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c deleted file mode 100644 index 132e4c6d..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/echoserver.c +++ /dev/null @@ -1,370 +0,0 @@ -/* echoserver.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include -#include - -#ifndef NO_MAIN_DRIVER - #define ECHO_OUT -#endif - -#include "examples/echoserver/echoserver.h" - - -#ifdef SESSION_STATS - CYASSL_API void PrintSessionStats(void); -#endif - -#define SVR_COMMAND_SIZE 256 - -static void SignalReady(void* args, int port) -{ -#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) - /* signal ready to tcp_accept */ - func_args* server_args = (func_args*)args; - tcp_ready* ready = server_args->signal; - pthread_mutex_lock(&ready->mutex); - ready->ready = 1; - ready->port = port; - pthread_cond_signal(&ready->cond); - pthread_mutex_unlock(&ready->mutex); -#endif - (void)args; - (void)port; -} - - -THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) -{ - SOCKET_T sockfd = 0; - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - - int doDTLS = 0; - int doPSK = 0; - int outCreated = 0; - int shutDown = 0; - int useAnyAddr = 0; - int port = yasslPort; - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - -#ifdef ECHO_OUT - FILE* fout = stdout; - if (argc >= 2) { - fout = fopen(argv[1], "w"); - outCreated = 1; - } - if (!fout) err_sys("can't open output file"); -#endif - (void)outCreated; - (void)argc; - (void)argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - - #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ - !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_ARM) - port = 0; - #endif - #if defined(USE_ANY_ADDR) - useAnyAddr = 1; - #endif - tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); - -#if defined(CYASSL_DTLS) - method = CyaDTLSv1_server_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_server_method(); -#else - method = CyaSSLv3_server_method(); -#endif - ctx = CyaSSL_CTX_new(method); - /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#ifndef NO_FILESYSTEM - if (doPSK == 0) { - #ifdef HAVE_NTRU - /* ntru */ - if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load ntru cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) - != SSL_SUCCESS) - err_sys("can't load ntru key file, " - "Please run from CyaSSL home dir"); - #elif defined(HAVE_ECC) - /* ecc */ - if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #elif defined(NO_CERTS) - /* do nothing, just don't load cert files */ - #else - /* normal */ - if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #endif - } /* doPSK */ -#elif !defined(NO_CERTS) - if (!doPSK) { - load_buffer(ctx, svrCert, CYASSL_CERT); - load_buffer(ctx, svrKey, CYASSL_KEY); - } -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 2"); -#endif - } - - SignalReady(args, port); - - while (!shutDown) { - CYASSL* ssl = 0; - char command[SVR_COMMAND_SIZE+1]; - int echoSz = 0; - int clientfd; - int firstRead = 1; - int gotFirstG = 0; - -#ifndef CYASSL_DTLS - SOCKADDR_IN_T client; - socklen_t client_len = sizeof(client); - clientfd = accept(sockfd, (struct sockaddr*)&client, - (ACCEPT_THIRD_T)&client_len); -#else - clientfd = udp_read_connect(sockfd); -#endif - if (clientfd == -1) err_sys("tcp accept failed"); - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) err_sys("SSL_new failed"); - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - CyaSSL_set_fd(ssl, clientfd); - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #elif !defined(NO_CERTS) - SetDH(ssl); /* will repick suites with DHE, higher than PSK */ - #endif - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - printf("SSL_accept failed\n"); - CyaSSL_free(ssl); - CloseSocket(clientfd); - continue; - } -#if defined(PEER_INFO) - showPeer(ssl); -#endif - - while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { - - if (firstRead == 1) { - firstRead = 0; /* browser may send 1 byte 'G' to start */ - if (echoSz == 1 && command[0] == 'G') { - gotFirstG = 1; - continue; - } - } - else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { - strncpy(command, "GET", 4); - /* fall through to normal GET */ - } - - if ( strncmp(command, "quit", 4) == 0) { - printf("client sent quit command: shutting down!\n"); - shutDown = 1; - break; - } - if ( strncmp(command, "break", 5) == 0) { - printf("client sent break command: closing session!\n"); - break; - } -#ifdef SESSION_STATS - if ( strncmp(command, "printstats", 10) == 0) { - PrintSessionStats(); - break; - } -#endif - if ( strncmp(command, "GET", 3) == 0) { - char type[] = "HTTP/1.0 200 ok\r\nContent-type:" - " text/html\r\n\r\n"; - char header[] = "\n
\n";
-                char body[]   = "greetings from CyaSSL\n";
-                char footer[] = "\r\n\r\n";
-            
-                strncpy(command, type, sizeof(type));
-                echoSz = sizeof(type) - 1;
-
-                strncpy(&command[echoSz], header, sizeof(header));
-                echoSz += (int)sizeof(header) - 1;
-                strncpy(&command[echoSz], body, sizeof(body));
-                echoSz += (int)sizeof(body) - 1;
-                strncpy(&command[echoSz], footer, sizeof(footer));
-                echoSz += (int)sizeof(footer);
-
-                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                    err_sys("SSL_write failed");
-                break;
-            }
-            command[echoSz] = 0;
-
-            #ifdef ECHO_OUT
-                fputs(command, fout);
-            #endif
-
-            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                err_sys("SSL_write failed");
-        }
-#ifndef CYASSL_DTLS
-        CyaSSL_shutdown(ssl);
-#endif
-        CyaSSL_free(ssl);
-        CloseSocket(clientfd);
-#ifdef CYASSL_DTLS
-        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
-        SignalReady(args, port);
-#endif
-    }
-#ifdef CYASSL_CMSIS_RTOS
-    osDelay(5000) ;
-#endif
-    CloseSocket(sockfd);
-    CyaSSL_CTX_free(ctx);
-
-#ifdef ECHO_OUT
-    if (outCreated)
-        fclose(fout);
-#endif
-
-    ((func_args*)args)->return_code = 0;
-    return 0;
-}
-
-
-/* so overall tests can pull in test function */
-#ifndef NO_MAIN_DRIVER
-
-    int main(int argc, char** argv)
-    {
-        func_args args;
-
-#ifdef HAVE_CAVIUM
-        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
-        if (ret != 0)
-            err_sys("Cavium OpenNitroxDevice failed");
-#endif /* HAVE_CAVIUM */
-
-        StartTCP();
-
-        args.argc = argc;
-        args.argv = argv;
-
-        CyaSSL_Init();
-#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
-        CyaSSL_Debugging_ON();
-#endif
-        if (CurrentDir("echoserver") || CurrentDir("build"))
-            ChangeDirBack(2);
-        echoserver_test(&args);
-        CyaSSL_Cleanup();
-
-#ifdef HAVE_CAVIUM
-        CspShutdown(CAVIUM_DEV_ID);
-#endif
-        return args.return_code;
-    }
-
-        
-#endif /* NO_MAIN_DRIVER */
-
-
-
-
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c
deleted file mode 100644
index 3947b13a..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/EchoServer/main.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* main.c
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
- 
-#ifdef HAVE_CONFIG_H
-    #include 
-#endif
-
-#include 
-#include 
-
-#include "cmsis_os.h"
-#include "rl_fs.h" 
-#include "rl_net.h" 
-#include 
-#include "cyassl_MDK_ARM.h"
-#include 
-
-/*-----------------------------------------------------------------------------
- *        Initialize a Flash Memory Card
- *----------------------------------------------------------------------------*/
-static void init_filesystem (void) {
-    int32_t retv;
-
-    retv = finit ("M0:");
-    if (retv == 0) {
-        retv = fmount ("M0:");
-        if (retv == 0) {
-            printf ("Drive M0 ready!\n");
-        }
-        else {
-          printf ("Drive M0 mount failed!\n");
-        }
-    } else {
-        printf ("Drive M0 initialization failed!\n");
-    }
-}
-
-/*-----------------------------------------------------------------------------
- *        TCP/IP tasks
- *----------------------------------------------------------------------------*/
-void tcp_poll (void const *arg)
-{
-    CYASSL_MSG("TCP polling started.\n") ;
-    while (1) {
-        net_main ();
-        osDelay(1) ;
-    }
-}
-
-typedef struct func_args {
-    int    argc;
-    char** argv;
-} func_args;
-
-extern void echoserver_test(func_args * args) ;
-extern void init_time(void) ;
-
-    osThreadDef (tcp_poll, osPriorityHigh, 1, 0) ;
-/*-----------------------------------------------------------------------------
- *       mian entry 
- *----------------------------------------------------------------------------*/
-int myoptind = 0;
-char* myoptarg = NULL;
-
-int main() 
-{
-    void *args = NULL ;
-    init_time() ;
-    init_filesystem ();
-    net_initialize() ;
-    osThreadCreate (osThread (tcp_poll), NULL); 
-    osDelay(10000) ;  /* wait for DHCP */
-    #if defined(DEBUG_CYASSL)
-        printf("Turning ON Debug message\n") ;
-        CyaSSL_Debugging_ON() ;
-    #endif
-
-        printf("echoserver: Started\n") ;
-    echoserver_test(args) ;
-    printf("echoserver: Terminated\n") ;
-}
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt
deleted file mode 100644
index 39ab9e9e..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/Abstract.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This program is a simple client example with CyaSSL/wolfCrypt library.
-
-In order to run this program,
-Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory.
-Set config-SimpleClient.h configuration file for the Callee IP or Port number.
-
-For further configuration, refer config-Crypt.h and config-CyaSSL.h.
-
-When testing this client, it is recommended to test against one of the standard 
-CyaSSL example applications running on a desktop machine.  The standard CyaSSL 
-example applications are located in the CyaSSL root directory under the 
-/examples directory.
-
-For the hardware crypt on config-Crypt.h, download 
-STSW-STM32062: STM32F2xx standard peripherals library at 
-http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to 
- {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
-
-
-Support
--------
-Please send questions or comments to support@wolfssl.com
\ No newline at end of file
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c
deleted file mode 100644
index 54b3e0bf..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/CMSIS/RTX_Conf_CM.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*----------------------------------------------------------------------------
- *      RL-ARM - RTX
- *----------------------------------------------------------------------------
- *      Name:    RTX_Conf_CM.C
- *      Purpose: Configuration of CMSIS RTX Kernel for Cortex-M
- *      Rev.:    V4.70
- *----------------------------------------------------------------------------
- *
- * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *  - Neither the name of ARM  nor the names of its contributors may be used 
- *    to endorse or promote products derived from this software without 
- *    specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *---------------------------------------------------------------------------*/
-
-#include "cmsis_os.h"
-
-
-/*----------------------------------------------------------------------------
- *      RTX User configuration part BEGIN
- *---------------------------------------------------------------------------*/
-
-//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
-//
-// Thread Configuration
-// =======================
-//
-//   Number of concurrent running threads <0-250>
-//    Defines max. number of threads that will run at the same time.
-//    Default: 6
-#ifndef OS_TASKCNT
- #define OS_TASKCNT     5
-#endif
-
-//   Default Thread stack size [bytes] <64-4096:8><#/4>
-//    Defines default stack size for threads with osThreadDef stacksz = 0
-//    Default: 200
-#ifndef OS_STKSIZE
- #define OS_STKSIZE     250
-#endif
-
-//   Main Thread stack size [bytes] <64-20000:8><#/4>
-//    Defines stack size for main thread.
-//    Default: 200
-#ifndef OS_MAINSTKSIZE
- #define OS_MAINSTKSIZE 2000
-#endif
-
-//   Number of threads with user-provided stack size <0-250>
-//    Defines the number of threads with user-provided stack size.
-//    Default: 0
-#ifndef OS_PRIVCNT
- #define OS_PRIVCNT     2
-#endif
-
-//   Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4>
-//    Defines the combined stack size for threads with user-provided stack size.
-//    Default: 0
-#ifndef OS_PRIVSTKSIZE
- #define OS_PRIVSTKSIZE 2500
-#endif
-
-// Check for stack overflow
-//  Includes the stack checking code for stack overflow.
-//  Note that additional code reduces the Kernel performance.
-#ifndef OS_STKCHECK
- #define OS_STKCHECK    1
-#endif
-
-// Processor mode for thread execution 
-//   <0=> Unprivileged mode 
-//   <1=> Privileged mode
-//  Default: Privileged mode
-#ifndef OS_RUNPRIV
- #define OS_RUNPRIV     1
-#endif
-
-// 
-
-// RTX Kernel Timer Tick Configuration
-// ======================================
-//  Use Cortex-M SysTick timer as RTX Kernel Timer
-//  Use the Cortex-M SysTick timer as a time-base for RTX.
-#ifndef OS_SYSTICK
- #define OS_SYSTICK     1
-#endif
-//
-//   Timer clock value [Hz] <1-1000000000>
-//    Defines the timer clock value.
-//    Default: 12000000  (12MHz)
-#ifndef OS_CLOCK
- #define OS_CLOCK       12000000
-#endif
-
-//   Timer tick value [us] <1-1000000>
-//    Defines the timer tick value.
-//    Default: 1000  (1ms)
-#ifndef OS_TICK
- #define OS_TICK        1000
-#endif
-
-// 
-
-// System Configuration
-// =======================
-//
-// Round-Robin Thread switching
-// ===============================
-//
-//  Enables Round-Robin Thread switching.
-#ifndef OS_ROBIN
- #define OS_ROBIN       1
-#endif
-
-//   Round-Robin Timeout [ticks] <1-1000>
-//    Defines how long a thread will execute before a thread switch.
-//    Default: 5
-#ifndef OS_ROBINTOUT
- #define OS_ROBINTOUT   5
-#endif
-
-// 
-
-// User Timers
-// ==============
-//    Enables user Timers
-#ifndef OS_TIMERS
- #define OS_TIMERS      1
-#endif
-
-//   Timer Thread Priority
-//                        <1=> Low
-//     <2=> Below Normal  <3=> Normal  <4=> Above Normal
-//                        <5=> High
-//                        <6=> Realtime (highest)
-//    Defines priority for Timer Thread
-//    Default: High
-#ifndef OS_TIMERPRIO
- #define OS_TIMERPRIO   5
-#endif
-
-//   Timer Thread stack size [bytes] <64-64000:8><#/4>
-//    Defines stack size for Timer thread.
-//    Default: 200
-#ifndef OS_TIMERSTKSZ
- #define OS_TIMERSTKSZ  50
-#endif
-
-//   Timer Callback Queue size <1-32>
-//    Number of concurrent active timer callback functions.
-//    Default: 4
-#ifndef OS_TIMERCBQS
- #define OS_TIMERCBQS   4
-#endif
-
-// 
-
-//   ISR FIFO Queue size<4=>   4 entries  <8=>   8 entries
-//                         <12=> 12 entries  <16=> 16 entries
-//                         <24=> 24 entries  <32=> 32 entries
-//                         <48=> 48 entries  <64=> 64 entries
-//                         <96=> 96 entries
-//    ISR functions store requests to this buffer,
-//    when they are called from the interrupt handler.
-//    Default: 16 entries
-#ifndef OS_FIFOSZ
- #define OS_FIFOSZ      16
-#endif
-
-// 
-
-//------------- <<< end of configuration section >>> -----------------------
-
-// Standard library system mutexes
-// ===============================
-//  Define max. number system mutexes that are used to protect 
-//  the arm standard runtime library. For microlib they are not used.
-#ifndef OS_MUTEXCNT
- #define OS_MUTEXCNT    8
-#endif
-
-/*----------------------------------------------------------------------------
- *      RTX User configuration part END
- *---------------------------------------------------------------------------*/
-
-#define OS_TRV          ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1)
-
-
-/*----------------------------------------------------------------------------
- *      Global Functions
- *---------------------------------------------------------------------------*/
-
-/*--------------------------- os_idle_demon ---------------------------------*/
-
-void os_idle_demon (void) {
-  /* The idle demon is a system thread, running when no other thread is      */
-  /* ready to run.                                                           */
-
-  for (;;) {
-    /* HERE: include optional user code to be executed when no thread runs.*/
-  }
-}
-
-#if (OS_SYSTICK == 0)   // Functions for alternative timer as RTX kernel timer
-
-/*--------------------------- os_tick_init ----------------------------------*/
-
-// Initialize alternative hardware timer as RTX kernel timer
-// Return: IRQ number of the alternative hardware timer
-int os_tick_init (void) {
-  return (-1);  /* Return IRQ number of timer (0..239) */
-}
-
-/*--------------------------- os_tick_val -----------------------------------*/
-
-// Get alternative hardware timer current value (0 .. OS_TRV)
-uint32_t os_tick_val (void) {
-  return (0);
-}
-
-/*--------------------------- os_tick_ovf -----------------------------------*/
-
-// Get alternative hardware timer overflow flag
-// Return: 1 - overflow, 0 - no overflow
-uint32_t os_tick_ovf (void) {
-  return (0);
-}
-
-/*--------------------------- os_tick_irqack --------------------------------*/
-
-// Acknowledge alternative hardware timer interrupt
-void os_tick_irqack (void) {
-  /* ... */
-}
-
-#endif   // (OS_SYSTICK == 0)
-
-/*--------------------------- os_error --------------------------------------*/
-
-void os_error (uint32_t err_code) {
-  /* This function is called when a runtime error is detected. Parameter */
-  /* 'err_code' holds the runtime error code (defined in RTL.H).         */
-
-  /* HERE: include optional code to be executed on runtime error. */
-  for (;;);
-}
-
-
-/*----------------------------------------------------------------------------
- *      RTX Configuration Functions
- *---------------------------------------------------------------------------*/
-
-#include "RTX_CM_lib.h"
-
-/*----------------------------------------------------------------------------
- * end of file
- *---------------------------------------------------------------------------*/
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h
deleted file mode 100644
index 4a09246f..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h
+++ /dev/null
@@ -1,3127 +0,0 @@
-/* -----------------------------------------------------------------------------
- * Copyright (C) 2013 ARM Limited. All rights reserved.
- *  
- * $Date:        27. June 2013
- * $Revision:    V1.01
- *  
- * Project:      RTE Device Configuration for ST STM32F2xx
- * -------------------------------------------------------------------------- */
-
-//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
-
-#ifndef __RTE_DEVICE_H
-#define __RTE_DEVICE_H
-
-
-#define GPIO_PORT(num) \
- ((num == 0) ? GPIOA : \
-  (num == 1) ? GPIOB : \
-  (num == 2) ? GPIOC : \
-  (num == 3) ? GPIOD : \
-  (num == 4) ? GPIOE : \
-  (num == 5) ? GPIOF : \
-  (num == 6) ? GPIOG : \
-  (num == 7) ? GPIOH : \
-  (num == 8) ? GPIOI : \
-  NULL)
-
-
-//  Clock Configuration
-//    High-speed Internal Clock <1-999999999>
-#define RTE_HSI                         16000000
-//    High-speed External Clock <1-999999999>
-#define RTE_HSE                         25000000
-//    System Clock <1-999999999>
-#define RTE_SYSCLK                      120000000
-//    AHB Clock    <1-999999999>
-#define RTE_HCLK                        120000000
-//    APB1 Clock   <1-999999999>
-#define RTE_PCLK1                       30000000
-//    APB2 Clock   <1-999999999>
-#define RTE_PCLK2                       60000000
-//       48MHz Clock
-#define RTE_PLL48CK                     48000000
-// 
-
-
-//  USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1]
-//  Configuration settings for Driver_UART1 in component ::Drivers:UART
-#define RTE_USART1                      0
-
-//    USART1_TX Pin <0=>PA9 <1=>PB6
-#define RTE_USART1_TX_ID                0
-#if    (RTE_USART1_TX_ID == 0)
-#define RTE_USART1_TX_PORT              GPIOA
-#define RTE_USART1_TX_BIT               9
-#elif  (RTE_USART1_TX_ID == 1)
-#define RTE_USART1_TX_PORT              GPIOB
-#define RTE_USART1_TX_BIT               6
-#else
-#error "Invalid USART1_TX Pin Configuration!"
-#endif
-
-//    USART1_RX Pin <0=>PA10 <1=>PB7
-#define RTE_USART1_RX_ID                0
-#if    (RTE_USART1_RX_ID == 0)
-#define RTE_USART1_RX_PORT              GPIOA
-#define RTE_USART1_RX_BIT               10
-#elif  (RTE_USART1_RX_ID == 1)
-#define RTE_USART1_RX_PORT              GPIOB
-#define RTE_USART1_RX_BIT               7
-#else
-#error "Invalid USART1_RX Pin Configuration!"
-#endif
-
-//      Synchronous
-//        USART1_CK Pin <0=>PA8
-//     
-#define RTE_USART1_CK                   0
-#define RTE_USART1_CK_ID                0
-#if    (RTE_USART1_CK_ID == 0)
-#define RTE_USART1_CK_PORT              GPIOA
-#define RTE_USART1_CK_BIT               8
-#else
-#error "Invalid USART1_CK Pin Configuration!"
-#endif
-
-//      Hardware flow control
-//        USART1_CTS Pin <0=>PA11
-//        USART1_RTS Pin <0=>PA12
-//        Manual CTS/RTS
-//     
-#define RTE_USART1_HW_FLOW              0
-#define RTE_USART1_CTS_ID               0
-#define RTE_USART1_RTS_ID               0
-#define RTE_USART1_MANUAL_FLOW          0
-#if    (RTE_USART1_CTS_ID == 0)
-#define RTE_USART1_CTS_PORT             GPIOA
-#define RTE_USART1_CTS_BIT              11
-#else
-#error "Invalid USART1_CTS Pin Configuration!"
-#endif
-#if    (RTE_USART1_RTS_ID == 0)
-#define RTE_USART1_RTS_PORT             GPIOA
-#define RTE_USART1_RTS_BIT              12
-#else
-#error "Invalid USART1_RTS Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <2=>2 <5=>5
-//       Selects DMA Stream (only Stream 2 or 5 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART1_RX_DMA               1
-#define RTE_USART1_RX_DMA_NUMBER        2
-#define RTE_USART1_RX_DMA_STREAM        2
-#define RTE_USART1_RX_DMA_CHANNEL       4
-#define RTE_USART1_RX_DMA_PRIORITY      0
-
-//    DMA Tx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <7=>7
-//       Selects DMA Stream (only Stream 7 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART1_TX_DMA               1
-#define RTE_USART1_TX_DMA_NUMBER        2
-#define RTE_USART1_TX_DMA_STREAM        7
-#define RTE_USART1_TX_DMA_CHANNEL       4
-#define RTE_USART1_TX_DMA_PRIORITY      0
-
-// 
-
-
-//  USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2]
-//  Configuration settings for Driver_UART2 in component ::Drivers:UART
-#define RTE_USART2                      0
-
-//    USART2_TX Pin <0=>PA2 <1=>PD5
-#define RTE_USART2_TX_ID                0
-#if    (RTE_USART2_TX_ID == 0)
-#define RTE_USART2_TX_PORT              GPIOA
-#define RTE_USART2_TX_BIT               2
-#elif  (RTE_USART2_TX_ID == 1)
-#define RTE_USART2_TX_PORT              GPIOD
-#define RTE_USART2_TX_BIT               5
-#else
-#error "Invalid USART2_TX Pin Configuration!"
-#endif
-
-//    USART2_RX Pin <0=>PA3 <1=>PD6
-#define RTE_USART2_RX_ID                0
-#if    (RTE_USART2_RX_ID == 0)
-#define RTE_USART2_RX_PORT              GPIOA
-#define RTE_USART2_RX_BIT               3
-#elif  (RTE_USART2_RX_ID == 1)
-#define RTE_USART2_RX_PORT              GPIOD
-#define RTE_USART2_RX_BIT               6
-#else
-#error "Invalid USART2_RX Pin Configuration!"
-#endif
-
-//      Synchronous
-//        USART2_CK Pin <0=>PA4 <1=>PD7
-//     
-#define RTE_USART2_CK                   0
-#define RTE_USART2_CK_ID                0
-#if    (RTE_USART2_CK_ID == 0)
-#define RTE_USART2_CK_PORT              GPIOA
-#define RTE_USART2_CK_BIT               4
-#elif  (RTE_USART2_CK_ID == 1)
-#define RTE_USART2_CK_PORT              GPIOD
-#define RTE_USART2_CK_BIT               7
-#else
-#error "Invalid USART2_CK Pin Configuration!"
-#endif
-
-//      Hardware flow control
-//        USART2_CTS Pin <0=>PA0 <1=>PD3
-//        USART2_RTS Pin <0=>PA1 <1=>PD4
-//        Manual CTS/RTS
-//     
-#define RTE_USART2_HW_FLOW              0
-#define RTE_USART2_CTS_ID               0
-#define RTE_USART2_RTS_ID               0
-#define RTE_USART2_MANUAL_FLOW          0
-#if    (RTE_USART2_CTS_ID == 0)
-#define RTE_USART2_CTS_PORT             GPIOA
-#define RTE_USART2_CTS_BIT              0
-#elif  (RTE_USART2_CTS_ID == 1)
-#define RTE_USART2_CTS_PORT             GPIOD
-#define RTE_USART2_CTS_BIT              3
-#else
-#error "Invalid USART2_CTS Pin Configuration!"
-#endif
-#if    (RTE_USART2_RTS_ID == 0)
-#define RTE_USART2_RTS_PORT             GPIOA
-#define RTE_USART2_RTS_BIT              1
-#elif  (RTE_USART2_RTS_ID == 1)
-#define RTE_USART2_RTS_PORT             GPIOD
-#define RTE_USART2_RTS_BIT              4
-#else
-#error "Invalid USART2_RTS Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <5=>5
-//       Selects DMA Stream (only Stream 5 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART2_RX_DMA               1
-#define RTE_USART2_RX_DMA_NUMBER        1
-#define RTE_USART2_RX_DMA_STREAM        5
-#define RTE_USART2_RX_DMA_CHANNEL       4
-#define RTE_USART2_RX_DMA_PRIORITY      0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <6=>6
-//       Selects DMA Stream (only Stream 6 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART2_TX_DMA               1
-#define RTE_USART2_TX_DMA_NUMBER        1
-#define RTE_USART2_TX_DMA_STREAM        6
-#define RTE_USART2_TX_DMA_CHANNEL       4
-#define RTE_USART2_TX_DMA_PRIORITY      0
-
-// 
-
-
-//  USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3]
-//  Configuration settings for Driver_UART3 in component ::Drivers:UART
-#define RTE_USART3                      0
-
-//    USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8
-#define RTE_USART3_TX_ID                0
-#if    (RTE_USART3_TX_ID == 0)
-#define RTE_USART3_TX_PORT              GPIOB
-#define RTE_USART3_TX_BIT               10
-#elif  (RTE_USART3_TX_ID == 1)
-#define RTE_USART3_TX_PORT              GPIOC
-#define RTE_USART3_TX_BIT               10
-#elif  (RTE_USART3_TX_ID == 2)
-#define RTE_USART3_TX_PORT              GPIOD
-#define RTE_USART3_TX_BIT               8
-#else
-#error "Invalid USART3_TX Pin Configuration!"
-#endif
-
-//    USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9
-#define RTE_USART3_RX_ID                0
-#if    (RTE_USART3_RX_ID == 0)
-#define RTE_USART3_RX_PORT              GPIOB
-#define RTE_USART3_RX_BIT               11
-#elif  (RTE_USART3_RX_ID == 1)
-#define RTE_USART3_RX_PORT              GPIOC
-#define RTE_USART3_RX_BIT               11
-#elif  (RTE_USART3_RX_ID == 2)
-#define RTE_USART3_RX_PORT              GPIOD
-#define RTE_USART3_RX_BIT               9
-#else
-#error "Invalid USART3_RX Pin Configuration!"
-#endif
-
-//      Synchronous
-//        USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10
-//     
-#define RTE_USART3_CK                   0
-#define RTE_USART3_CK_ID                0
-#if    (RTE_USART3_CK_ID == 0)
-#define RTE_USART3_CK_PORT              GPIOB
-#define RTE_USART3_CK_BIT               12
-#elif  (RTE_USART3_CK_ID == 1)
-#define RTE_USART3_CK_PORT              GPIOC
-#define RTE_USART3_CK_BIT               12
-#elif  (RTE_USART3_CK_ID == 2)
-#define RTE_USART3_CK_PORT              GPIOD
-#define RTE_USART3_CK_BIT               10
-#else
-#error "Invalid USART3_CK Pin Configuration!"
-#endif
-
-//      Hardware flow control
-//        USART3_CTS Pin <0=>PB13 <1=>PD11
-//        USART3_RTS Pin <0=>PB14 <1=>PD12
-//        Manual CTS/RTS
-//     
-#define RTE_USART3_HW_FLOW              0
-#define RTE_USART3_CTS_ID               0
-#define RTE_USART3_RTS_ID               0
-#define RTE_USART3_MANUAL_FLOW          0
-#if    (RTE_USART3_CTS_ID == 0)
-#define RTE_USART3_CTS_PORT             GPIOB
-#define RTE_USART3_CTS_BIT              13
-#elif  (RTE_USART3_CTS_ID == 1)
-#define RTE_USART3_CTS_PORT             GPIOD
-#define RTE_USART3_CTS_BIT              11
-#else
-#error "Invalid USART3_CTS Pin Configuration!"
-#endif
-#if    (RTE_USART3_RTS_ID == 0)
-#define RTE_USART3_RTS_PORT             GPIOB
-#define RTE_USART3_RTS_BIT              14
-#elif  (RTE_USART3_RTS_ID == 1)
-#define RTE_USART3_RTS_PORT             GPIOD
-#define RTE_USART3_RTS_BIT              12
-#else
-#error "Invalid USART3_RTS Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <1=>1
-//       Selects DMA Stream (only Stream 1 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART3_RX_DMA               1
-#define RTE_USART3_RX_DMA_NUMBER        1
-#define RTE_USART3_RX_DMA_STREAM        1
-#define RTE_USART3_RX_DMA_CHANNEL       4
-#define RTE_USART3_RX_DMA_PRIORITY      0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <3=>3
-//       Selects DMA Stream (only Stream 3 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART3_TX_DMA               1
-#define RTE_USART3_TX_DMA_NUMBER        1
-#define RTE_USART3_TX_DMA_STREAM        3
-#define RTE_USART3_TX_DMA_CHANNEL       4
-#define RTE_USART3_TX_DMA_PRIORITY      0
-
-// 
-
-
-//  UART4 (Universal asynchronous receiver transmitter) [Driver_UART4]
-//  Configuration settings for Driver_UART4 in component ::Drivers:UART
-#define RTE_UART4                       0
-
-//    UART4_TX Pin <0=>PA0 <1=>PC10
-#define RTE_UART4_TX_ID                 0
-#if    (RTE_UART4_TX_ID == 0)
-#define RTE_UART4_TX_PORT               GPIOA
-#define RTE_UART4_TX_BIT                0
-#elif  (RTE_UART4_TX_ID == 1)
-#define RTE_UART4_TX_PORT               GPIOC
-#define RTE_UART4_TX_BIT                10
-#else
-#error "Invalid UART4_TX Pin Configuration!"
-#endif
-
-//    UART4_RX Pin <0=>PA1 <1=>PC11
-#define RTE_UART4_RX_ID                 0
-#if    (RTE_UART4_RX_ID == 0)
-#define RTE_UART4_RX_PORT               GPIOA
-#define RTE_UART4_RX_BIT                1
-#elif  (RTE_UART4_RX_ID == 1)
-#define RTE_UART4_RX_PORT               GPIOC
-#define RTE_UART4_RX_BIT                11
-#else
-#error "Invalid UART4_RX Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <2=>2
-//       Selects DMA Stream (only Stream 2 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_UART4_RX_DMA                1
-#define RTE_UART4_RX_DMA_NUMBER         1
-#define RTE_UART4_RX_DMA_STREAM         2
-#define RTE_UART4_RX_DMA_CHANNEL        4
-#define RTE_UART4_RX_DMA_PRIORITY       0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <4=>4
-//       Selects DMA Stream (only Stream 4 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_UART4_TX_DMA                1
-#define RTE_UART4_TX_DMA_NUMBER         1
-#define RTE_UART4_TX_DMA_STREAM         4
-#define RTE_UART4_TX_DMA_CHANNEL        4
-#define RTE_UART4_TX_DMA_PRIORITY       0
-
-// 
-
-
-//  UART5 (Universal asynchronous receiver transmitter) [Driver_UART5]
-//  Configuration settings for Driver_UART5 in component ::Drivers:UART
-#define RTE_UART5                       0
-
-//    UART5_TX Pin <0=>PC12
-#define RTE_UART5_TX_ID                 0
-#if    (RTE_UART5_TX_ID == 0)
-#define RTE_UART5_TX_PORT               GPIOC
-#define RTE_UART5_TX_BIT                12
-#else
-#error "Invalid UART5_TX Pin Configuration!"
-#endif
-
-//    UART5_RX Pin <0=>PD2
-#define RTE_UART5_RX_ID                 0
-#if    (RTE_UART5_RX_ID == 0)
-#define RTE_UART5_RX_PORT               GPIOD
-#define RTE_UART5_RX_BIT                2
-#else
-#error "Invalid UART5_RX Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <0=>0
-//       Selects DMA Stream (only Stream 0 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_UART5_RX_DMA                1
-#define RTE_UART5_RX_DMA_NUMBER         1
-#define RTE_UART5_RX_DMA_STREAM         0
-#define RTE_UART5_RX_DMA_CHANNEL        4
-#define RTE_UART5_RX_DMA_PRIORITY       0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <7=>7
-//       Selects DMA Stream (only Stream 7 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_UART5_TX_DMA                1
-#define RTE_UART5_TX_DMA_NUMBER         1
-#define RTE_UART5_TX_DMA_STREAM         7
-#define RTE_UART5_TX_DMA_CHANNEL        4
-#define RTE_UART5_TX_DMA_PRIORITY       0
-
-// 
-
-
-//  USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6]
-//  Configuration settings for Driver_UART6 in component ::Drivers:UART
-#define RTE_USART6                      0
-
-//    USART6_TX Pin <0=>PC6 <1=>PG14
-#define RTE_USART6_TX_ID                0
-#if    (RTE_USART6_TX_ID == 0)
-#define RTE_USART6_TX_PORT              GPIOC
-#define RTE_USART6_TX_BIT               6
-#elif  (RTE_USART6_TX_ID == 1)
-#define RTE_USART6_TX_PORT              GPIOG
-#define RTE_USART6_TX_BIT               14
-#else
-#error "Invalid USART6_TX Pin Configuration!"
-#endif
-
-//    USART6_RX Pin <0=>PC7 <1=>PG9
-#define RTE_USART6_RX_ID                0
-#if    (RTE_USART6_RX_ID == 0)
-#define RTE_USART6_RX_PORT              GPIOC
-#define RTE_USART6_RX_BIT               7
-#elif  (RTE_USART6_RX_ID == 1)
-#define RTE_USART6_RX_PORT              GPIOG
-#define RTE_USART6_RX_BIT               9
-#else
-#error "Invalid USART6_RX Pin Configuration!"
-#endif
-
-//      Synchronous
-//        USART6_CK Pin <0=>PC8 <1=>PG7
-//     
-#define RTE_USART6_CK                   0
-#define RTE_USART6_CK_ID                0
-#if    (RTE_USART6_CK_ID == 0)
-#define RTE_USART6_CK_PORT              GPIOC
-#define RTE_USART6_CK_BIT               8
-#elif  (RTE_USART6_CK_ID == 1)
-#define RTE_USART6_CK_PORT              GPIOG
-#define RTE_USART6_CK_BIT               7
-#else
-#error "Invalid USART6_CK Pin Configuration!"
-#endif
-
-//      Hardware flow control
-//        USART6_CTS Pin <0=>PG13 <1=>PG15
-//        USART6_RTS Pin <0=>PG8  <1=>PG12
-//        Manual CTS/RTS
-//     
-#define RTE_USART6_HW_FLOW              0
-#define RTE_USART6_CTS_ID               0
-#define RTE_USART6_RTS_ID               0
-#define RTE_USART6_MANUAL_FLOW          0
-#if    (RTE_USART6_CTS_ID == 0)
-#define RTE_USART6_CTS_PORT             GPIOG
-#define RTE_USART6_CTS_BIT              13
-#elif  (RTE_USART6_CTS_ID == 1)
-#define RTE_USART6_CTS_PORT             GPIOG
-#define RTE_USART6_CTS_BIT              15
-#else
-#error "Invalid USART6_CTS Pin Configuration!"
-#endif
-#if    (RTE_USART6_RTS_ID == 0)
-#define RTE_USART6_RTS_PORT             GPIOG
-#define RTE_USART6_RTS_BIT              8
-#elif  (RTE_USART6_RTS_ID == 1)
-#define RTE_USART6_RTS_PORT             GPIOG
-#define RTE_USART6_RTS_BIT              12
-#else
-#error "Invalid USART6_RTS Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <1=>1 <2=>2
-//       Selects DMA Stream (only Stream 1 or 2 can be used)
-//      Channel <5=>5
-//       Selects DMA Channel (only Channel 5 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART6_RX_DMA               1
-#define RTE_USART6_RX_DMA_NUMBER        2
-#define RTE_USART6_RX_DMA_STREAM        1
-#define RTE_USART6_RX_DMA_CHANNEL       5
-#define RTE_USART6_RX_DMA_PRIORITY      0
-
-//    DMA Tx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <6=>6 <7=>7
-//       Selects DMA Stream (only Stream 6 or 7 can be used)
-//      Channel <5=>5
-//       Selects DMA Channel (only Channel 5 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_USART6_TX_DMA               1
-#define RTE_USART6_TX_DMA_NUMBER        2
-#define RTE_USART6_TX_DMA_STREAM        6
-#define RTE_USART6_TX_DMA_CHANNEL       5
-#define RTE_USART6_TX_DMA_PRIORITY      0
-
-// 
-
-
-//  I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1]
-//  Configuration settings for Driver_I2C1 in component ::Drivers:I2C
-#define RTE_I2C1                        0
-
-//    I2C1_SCL Pin <0=>PB6 <1=>PB8
-#define RTE_I2C1_SCL_PORT_ID            0
-#if    (RTE_I2C1_SCL_PORT_ID == 0)
-#define RTE_I2C1_SCL_PORT               GPIOB
-#define RTE_I2C1_SCL_BIT                6
-#elif  (RTE_I2C1_SCL_PORT_ID == 1)
-#define RTE_I2C1_SCL_PORT               GPIOB
-#define RTE_I2C1_SCL_BIT                8
-#else
-#error "Invalid I2C1_SCL Pin Configuration!"
-#endif
-
-//    I2C1_SDA Pin <0=>PB7 <1=>PB9
-#define RTE_I2C1_SDA_PORT_ID            0
-#if    (RTE_I2C1_SDA_PORT_ID == 0)
-#define RTE_I2C1_SDA_PORT               GPIOB
-#define RTE_I2C1_SDA_BIT                7
-#elif  (RTE_I2C1_SDA_PORT_ID == 1)
-#define RTE_I2C1_SDA_PORT               GPIOB
-#define RTE_I2C1_SDA_BIT                9
-#else
-#error "Invalid I2C1_SDA Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <0=>0 <5=>5
-//       Selects DMA Stream (only Stream 0 or 5 can be used)
-//      Channel <1=>1
-//       Selects DMA Channel (only Channel 1 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C1_RX_DMA                 1
-#define RTE_I2C1_RX_DMA_NUMBER          1
-#define RTE_I2C1_RX_DMA_STREAM          0
-#define RTE_I2C1_RX_DMA_CHANNEL         1
-#define RTE_I2C1_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <6=>6 <7=>7
-//       Selects DMA Stream (only Stream 6 or 7 can be used)
-//      Channel <1=>1
-//       Selects DMA Channel (only Channel 1 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C1_TX_DMA                 1
-#define RTE_I2C1_TX_DMA_NUMBER          1
-#define RTE_I2C1_TX_DMA_STREAM          6
-#define RTE_I2C1_TX_DMA_CHANNEL         1
-#define RTE_I2C1_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2]
-//  Configuration settings for Driver_I2C2 in component ::Drivers:I2C
-#define RTE_I2C2                        0
-
-//    I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10
-#define RTE_I2C2_SCL_PORT_ID            0
-#if    (RTE_I2C2_SCL_PORT_ID == 0)
-#define RTE_I2C2_SCL_PORT               GPIOF
-#define RTE_I2C2_SCL_BIT                1
-#elif  (RTE_I2C2_SCL_PORT_ID == 1)
-#define RTE_I2C2_SCL_PORT               GPIOH
-#define RTE_I2C2_SCL_BIT                4
-#elif  (RTE_I2C2_SCL_PORT_ID == 2)
-#define RTE_I2C2_SCL_PORT               GPIOB
-#define RTE_I2C2_SCL_BIT                10
-#else
-#error "Invalid I2C2_SCL Pin Configuration!"
-#endif
-
-//    I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11
-#define RTE_I2C2_SDA_PORT_ID            0
-#if    (RTE_I2C2_SDA_PORT_ID == 0)
-#define RTE_I2C2_SDA_PORT               GPIOF
-#define RTE_I2C2_SDA_BIT                0
-#elif  (RTE_I2C2_SDA_PORT_ID == 1)
-#define RTE_I2C2_SDA_PORT               GPIOH
-#define RTE_I2C2_SDA_BIT                5
-#elif  (RTE_I2C2_SDA_PORT_ID == 2)
-#define RTE_I2C2_SDA_PORT               GPIOB
-#define RTE_I2C2_SDA_BIT                11
-#else
-#error "Invalid I2C2_SCL Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <2=>2 <3=>3
-//       Selects DMA Stream (only Stream 2 or 3 can be used)
-//      Channel <7=>7
-//       Selects DMA Channel (only Channel 7 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C2_RX_DMA                 1
-#define RTE_I2C2_RX_DMA_NUMBER          1
-#define RTE_I2C2_RX_DMA_STREAM          2
-#define RTE_I2C2_RX_DMA_CHANNEL         7
-#define RTE_I2C2_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <7=>7
-//       Selects DMA Stream (only Stream 7 can be used)
-//      Channel <7=>7
-//       Selects DMA Channel (only Channel 1 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C2_TX_DMA                 1
-#define RTE_I2C2_TX_DMA_NUMBER          1
-#define RTE_I2C2_TX_DMA_STREAM          7
-#define RTE_I2C2_TX_DMA_CHANNEL         7
-#define RTE_I2C2_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3]
-//  Configuration settings for Driver_I2C3 in component ::Drivers:I2C
-#define RTE_I2C3                        0
-
-//    I2C3_SCL Pin <0=>PH7 <1=>PA8
-#define RTE_I2C3_SCL_PORT_ID            0
-#if    (RTE_I2C3_SCL_PORT_ID == 0)
-#define RTE_I2C3_SCL_PORT               GPIOH
-#define RTE_I2C3_SCL_BIT                7
-#elif  (RTE_I2C3_SCL_PORT_ID == 1)
-#define RTE_I2C3_SCL_PORT               GPIOA
-#define RTE_I2C3_SCL_BIT                8
-#else
-#error "Invalid I2C3_SCL Pin Configuration!"
-#endif
-
-//    I2C3_SDA Pin <0=>PH8 <1=>PC9
-#define RTE_I2C3_SDA_PORT_ID            0
-#if    (RTE_I2C3_SDA_PORT_ID == 0)
-#define RTE_I2C3_SDA_PORT               GPIOH
-#define RTE_I2C3_SDA_BIT                8
-#elif  (RTE_I2C3_SDA_PORT_ID == 1)
-#define RTE_I2C3_SDA_PORT               GPIOC
-#define RTE_I2C3_SDA_BIT                9
-#else
-#error "Invalid I2C3_SCL Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <2=>2
-//       Selects DMA Stream (only Stream 2 can be used)
-//      Channel <3=>3
-//       Selects DMA Channel (only Channel 3 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C3_RX_DMA                 1
-#define RTE_I2C3_RX_DMA_NUMBER          1
-#define RTE_I2C3_RX_DMA_STREAM          2
-#define RTE_I2C3_RX_DMA_CHANNEL         3
-#define RTE_I2C3_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <4=>4
-//       Selects DMA Stream (only Stream 4 can be used)
-//      Channel <3=>3
-//       Selects DMA Channel (only Channel 3 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_I2C3_TX_DMA                 1
-#define RTE_I2C3_TX_DMA_NUMBER          1
-#define RTE_I2C3_TX_DMA_STREAM          4
-#define RTE_I2C3_TX_DMA_CHANNEL         3
-#define RTE_I2C3_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  SPI1 (Serial Peripheral Interface 1) [Driver_SPI1]
-//  Configuration settings for Driver_SPI1 in component ::Drivers:SPI
-#define RTE_SPI1                        0
-
-//    SPI1_NSS Pin
-//    Configure Pin if exists
-//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//       Selects Port Name
-//      Bit <0-15>
-//       Selects Port Bit
-//   
-#define RTE_SPI1_NSS_PIN                1
-#define RTE_SPI1_NSS_PORT               GPIO_PORT(0)
-#define RTE_SPI1_NSS_BIT                4
-
-//    SPI1_SCK Pin <0=>PA5 <1=>PB3
-#define RTE_SPI1_SCL_PORT_ID            0
-#if    (RTE_SPI1_SCL_PORT_ID == 0)
-#define RTE_SPI1_SCL_PORT               GPIOA
-#define RTE_SPI1_SCL_BIT                5
-#elif  (RTE_SPI1_SCL_PORT_ID == 1)
-#define RTE_SPI1_SCL_PORT               GPIOB
-#define RTE_SPI1_SCL_BIT                3
-#else
-#error "Invalid SPI1_SCK Pin Configuration!"
-#endif
-
-//    SPI1_MISO Pin <0=>PA6 <1=>PB4
-#define RTE_SPI1_MISO_PORT_ID           0
-#if    (RTE_SPI1_MISO_PORT_ID == 0)
-#define RTE_SPI1_MISO_PORT              GPIOA
-#define RTE_SPI1_MISO_BIT               6
-#elif  (RTE_SPI1_MISO_PORT_ID == 1)
-#define RTE_SPI1_MISO_PORT              GPIOB
-#define RTE_SPI1_MISO_BIT               4
-#else
-#error "Invalid SPI1_MISO Pin Configuration!"
-#endif
-
-//    SPI1_MOSI Pin <0=>PA7 <1=>PB5
-#define RTE_SPI1_MOSI_PORT_ID           0
-#if    (RTE_SPI1_MOSI_PORT_ID == 0)
-#define RTE_SPI1_MOSI_PORT              GPIOA
-#define RTE_SPI1_MOSI_BIT               7
-#elif  (RTE_SPI1_MOSI_PORT_ID == 1)
-#define RTE_SPI1_MOSI_PORT              GPIOB
-#define RTE_SPI1_MOSI_BIT               5
-#else
-#error "Invalid SPI1_MISO Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <0=>0 <2=>2
-//       Selects DMA Stream (only Stream 0 or 2 can be used)
-//      Channel <3=>3
-//       Selects DMA Channel (only Channel 3 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI1_RX_DMA                 1
-#define RTE_SPI1_RX_DMA_NUMBER          2
-#define RTE_SPI1_RX_DMA_STREAM          0
-#define RTE_SPI1_RX_DMA_CHANNEL         3
-#define RTE_SPI1_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <3=>3 <5=>5
-//       Selects DMA Stream (only Stream 3 or 5 can be used)
-//      Channel <3=>3
-//       Selects DMA Channel (only Channel 3 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI1_TX_DMA                 1
-#define RTE_SPI1_TX_DMA_NUMBER          2
-#define RTE_SPI1_TX_DMA_STREAM          5
-#define RTE_SPI1_TX_DMA_CHANNEL         3
-#define RTE_SPI1_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  SPI2 (Serial Peripheral Interface 2) [Driver_SPI2]
-//  Configuration settings for Driver_SPI2 in component ::Drivers:SPI
-#define RTE_SPI2                        0
-
-//    SPI2_NSS Pin
-//    Configure Pin if exists
-//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//       Selects Port Name
-//      Bit <0-15>
-//       Selects Port Bit
-//   
-#define RTE_SPI2_NSS_PIN                1
-#define RTE_SPI2_NSS_PORT               GPIO_PORT(1)
-#define RTE_SPI2_NSS_BIT                12
-
-//    SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1
-#define RTE_SPI2_SCL_PORT_ID            0
-#if    (RTE_SPI2_SCL_PORT_ID == 0)
-#define RTE_SPI2_SCL_PORT               GPIOB
-#define RTE_SPI2_SCL_BIT                10
-#elif  (RTE_SPI2_SCL_PORT_ID == 1)
-#define RTE_SPI2_SCL_PORT               GPIOB
-#define RTE_SPI2_SCL_BIT                13
-#elif  (RTE_SPI2_SCL_PORT_ID == 2)
-#define RTE_SPI2_SCL_PORT               GPIOI
-#define RTE_SPI2_SCL_BIT                1
-#else
-#error "Invalid SPI2_SCK Pin Configuration!"
-#endif
-
-//    SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2
-#define RTE_SPI2_MISO_PORT_ID           0
-#if    (RTE_SPI2_MISO_PORT_ID == 0)
-#define RTE_SPI2_MISO_PORT              GPIOB
-#define RTE_SPI2_MISO_BIT               14
-#elif  (RTE_SPI2_MISO_PORT_ID == 1)
-#define RTE_SPI2_MISO_PORT              GPIOC
-#define RTE_SPI2_MISO_BIT               2
-#elif  (RTE_SPI2_MISO_PORT_ID == 2)
-#define RTE_SPI2_MISO_PORT              GPIOI
-#define RTE_SPI2_MISO_BIT               2
-#else
-#error "Invalid SPI2_MISO Pin Configuration!"
-#endif
-
-//    SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3
-#define RTE_SPI2_MOSI_PORT_ID           0
-#if    (RTE_SPI2_MOSI_PORT_ID == 0)
-#define RTE_SPI2_MOSI_PORT              GPIOB
-#define RTE_SPI2_MOSI_BIT               15
-#elif  (RTE_SPI2_MOSI_PORT_ID == 1)
-#define RTE_SPI2_MOSI_PORT              GPIOC
-#define RTE_SPI2_MOSI_BIT               3
-#elif  (RTE_SPI2_MOSI_PORT_ID == 2)
-#define RTE_SPI2_MOSI_PORT              GPIOI
-#define RTE_SPI2_MOSI_BIT               3
-#else
-#error "Invalid SPI2_MISO Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <2=>2
-//       Selects DMA Stream (only Stream 2 can be used)
-//      Channel <0=>0
-//       Selects DMA Channel (only Channel 0 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI2_RX_DMA                 1
-#define RTE_SPI2_RX_DMA_NUMBER          1
-#define RTE_SPI2_RX_DMA_STREAM          2
-#define RTE_SPI2_RX_DMA_CHANNEL         0
-#define RTE_SPI2_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <3=>3
-//       Selects DMA Stream (only Stream 3 can be used)
-//      Channel <0=>0
-//       Selects DMA Channel (only Channel 0 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI2_TX_DMA                 1
-#define RTE_SPI2_TX_DMA_NUMBER          1
-#define RTE_SPI2_TX_DMA_STREAM          3
-#define RTE_SPI2_TX_DMA_CHANNEL         0
-#define RTE_SPI2_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  SPI3 (Serial Peripheral Interface 3) [Driver_SPI3]
-//  Configuration settings for Driver_SPI3 in component ::Drivers:SPI
-#define RTE_SPI3                        0
-
-//    SPI3_NSS Pin
-//    Configure Pin if exists
-//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//       Selects Port Name
-//      Bit <0-15>
-//       Selects Port Bit
-//   
-#define RTE_SPI3_NSS_PIN                1
-#define RTE_SPI3_NSS_PORT               GPIO_PORT(0)
-#define RTE_SPI3_NSS_BIT                15
-
-//    SPI3_SCK Pin <0=>PB3 <1=>PC10
-#define RTE_SPI3_SCL_PORT_ID            0
-#if    (RTE_SPI3_SCL_PORT_ID == 0)
-#define RTE_SPI3_SCL_PORT               GPIOB
-#define RTE_SPI3_SCL_BIT                3
-#elif  (RTE_SPI3_SCL_PORT_ID == 1)
-#define RTE_SPI3_SCL_PORT               GPIOC
-#define RTE_SPI3_SCL_BIT                10
-#else
-#error "Invalid SPI3_SCK Pin Configuration!"
-#endif
-
-//    SPI3_MISO Pin <0=>PB4 <1=>PC11
-#define RTE_SPI3_MISO_PORT_ID           0
-#if    (RTE_SPI3_MISO_PORT_ID == 0)
-#define RTE_SPI3_MISO_PORT              GPIOB
-#define RTE_SPI3_MISO_BIT               4
-#elif  (RTE_SPI3_MISO_PORT_ID == 1)
-#define RTE_SPI3_MISO_PORT              GPIOC
-#define RTE_SPI3_MISO_BIT               11
-#else
-#error "Invalid SPI3_MISO Pin Configuration!"
-#endif
-
-//    SPI3_MOSI Pin <0=>PB5 <1=>PC12
-#define RTE_SPI3_MOSI_PORT_ID           0
-#if    (RTE_SPI3_MOSI_PORT_ID == 0)
-#define RTE_SPI3_MOSI_PORT              GPIOB
-#define RTE_SPI3_MOSI_BIT               5
-#elif  (RTE_SPI3_MOSI_PORT_ID == 1)
-#define RTE_SPI3_MOSI_PORT              GPIOC
-#define RTE_SPI3_MOSI_BIT               12
-#else
-#error "Invalid SPI3_MISO Pin Configuration!"
-#endif
-
-//    DMA Rx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <0=>0 <2=>2
-//       Selects DMA Stream (only Stream 0 or 2 can be used)
-//      Channel <0=>0
-//       Selects DMA Channel (only Channel 0 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI3_RX_DMA                 1
-#define RTE_SPI3_RX_DMA_NUMBER          1
-#define RTE_SPI3_RX_DMA_STREAM          0
-#define RTE_SPI3_RX_DMA_CHANNEL         0
-#define RTE_SPI3_RX_DMA_PRIORITY        0
-
-//    DMA Tx
-//      Number <1=>1
-//       Selects DMA Number (only DMA1 can be used)
-//      Stream <5=>5 <7=>7
-//       Selects DMA Stream (only Stream 5 or 7 can be used)
-//      Channel <0=>0
-//       Selects DMA Channel (only Channel 0 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SPI3_TX_DMA                 1
-#define RTE_SPI3_TX_DMA_NUMBER          1
-#define RTE_SPI3_TX_DMA_STREAM          5
-#define RTE_SPI3_TX_DMA_CHANNEL         0
-#define RTE_SPI3_TX_DMA_PRIORITY        0
-
-// 
-
-
-//  SDIO (Secure Digital Input/Output) [Driver_MCI0]
-//  Configuration settings for Driver_MCI0 in component ::Drivers:MCI
-#define RTE_SDIO                        1
-
-//    SDIO_CD (Card Detect) Pin
-//    Configure Pin if exists
-//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//      Active State <0=>Low <1=>High
-//       Selects Active State Logical Level
-//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//       Selects Port Name
-//      Bit <0-15>
-//       Selects Port Bit
-//   
-#define RTE_SDIO_CD_PIN                 1
-#define RTE_SDIO_CD_ACTIVE              0
-#define RTE_SDIO_CD_PORT                GPIO_PORT(7)
-#define RTE_SDIO_CD_BIT                 15
-
-//    SDIO_WP (Write Protect) Pin
-//    Configure Pin if exists
-//    GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//      Active State <0=>Low <1=>High
-//       Selects Active State Logical Level
-//      Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//               <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//       Selects Port Name
-//      Bit <0-15>
-//       Selects Port Bit
-//   
-#define RTE_SDIO_WP_PIN                 0
-#define RTE_SDIO_WP_ACTIVE              0
-#define RTE_SDIO_WP_PORT                GPIO_PORT(7)
-#define RTE_SDIO_WP_BIT                 16
-
-//    SDIO Bus
-//      SDIO_CK Pin <0=>PC12
-#define RTE_SDIO_CK_PORT_ID             0
-#if    (RTE_SDIO_CK_PORT_ID == 0)
-#define RTE_SDIO_CK_PORT                GPIOC
-#define RTE_SDIO_CK_PIN                 12
-#else
-#error "Invalid SDIO_CK Pin Configuration!"
-#endif
-//      SDIO_CMD Pin <0=>PD2
-#define RTE_SDIO_CMD_PORT_ID            0
-#if    (RTE_SDIO_CMD_PORT_ID == 0)
-#define RTE_SDIO_CMD_PORT               GPIOD
-#define RTE_SDIO_CMD_PIN                2
-#else
-#error "Invalid SDIO_CDM Pin Configuration!"
-#endif
-//      SDIO_D0 Pin <0=>PC8
-#define RTE_SDIO_D0_PORT_ID             0
-#if    (RTE_SDIO_D0_PORT_ID == 0)
-#define RTE_SDIO_D0_PORT                GPIOC
-#define RTE_SDIO_D0_PIN                 8
-#else
-#error "Invalid SDIO_D0 Pin Configuration!"
-#endif
-//      SDIO_D1 Pin <0=>PC9
-#define RTE_SDIO_D1_PORT_ID             0
-#if    (RTE_SDIO_D1_PORT_ID == 0)
-#define RTE_SDIO_D1_PORT                GPIOC
-#define RTE_SDIO_D1_PIN                 9
-#else
-#error "Invalid SDIO_D1 Pin Configuration!"
-#endif
-//      SDIO_D2 Pin <0=>PC10
-#define RTE_SDIO_D2_PORT_ID             0
-#if    (RTE_SDIO_D2_PORT_ID == 0)
-#define RTE_SDIO_D2_PORT                GPIOC
-#define RTE_SDIO_D2_PIN                 10
-#else
-#error "Invalid SDIO_D2 Pin Configuration!"
-#endif
-//      SDIO_D3 Pin <0=>PC11
-#define RTE_SDIO_D3_PORT_ID             0
-#if    (RTE_SDIO_D3_PORT_ID == 0)
-#define RTE_SDIO_D3_PORT                GPIOC
-#define RTE_SDIO_D3_PIN                 11
-#else
-#error "Invalid SDIO_D3 Pin Configuration!"
-#endif
-//      SDIO_D4 Pin <0=>PB8
-#define RTE_SDIO_D4_PORT_ID             0
-#if    (RTE_SDIO_D4_PORT_ID == 0)
-#define RTE_SDIO_D4_PORT                GPIOB
-#define RTE_SDIO_D4_PIN                 8
-#else
-#error "Invalid SDIO_D4 Pin Configuration!"
-#endif
-//      SDIO_D5 Pin <0=>PB9
-#define RTE_SDIO_D5_PORT_ID             0
-#if    (RTE_SDIO_D5_PORT_ID == 0)
-#define RTE_SDIO_D5_PORT                GPIOB
-#define RTE_SDIO_D5_PIN                 9
-#else
-#error "Invalid SDIO_D5 Pin Configuration!"
-#endif
-//      SDIO_D6 Pin <0=>PC6
-#define RTE_SDIO_D6_PORT_ID             0
-#if    (RTE_SDIO_D6_PORT_ID == 0)
-#define RTE_SDIO_D6_PORT                GPIOC
-#define RTE_SDIO_D6_PIN                 6
-#else
-#error "Invalid SDIO_D6 Pin Configuration!"
-#endif
-//      SDIO_D7 Pin <0=>PC7
-#define RTE_SDIO_D7_PORT_ID             0
-#if    (RTE_SDIO_D7_PORT_ID == 0)
-#define RTE_SDIO_D7_PORT                GPIOC
-#define RTE_SDIO_D7_PIN                 7
-#else
-#error "Invalid SDIO_D7 Pin Configuration!"
-#endif
-//   
-
-//    DMA
-//      Number <2=>2
-//       Selects DMA Number (only DMA2 can be used)
-//      Stream <3=>3 <6=>6
-//       Selects DMA Stream (only Stream 3 or 6 can be used)
-//      Channel <4=>4
-//       Selects DMA Channel (only Channel 4 can be used)
-//      Priority <0=>Low <1=>Medium <2=>High <3=>Very High
-//       Selects DMA Priority
-//   
-#define RTE_SDIO_DMA                    1
-#define RTE_SDIO_DMA_NUMBER             2
-#define RTE_SDIO_DMA_STREAM             3
-#define RTE_SDIO_DMA_CHANNEL            4
-#define RTE_SDIO_DMA_PRIORITY           0
-
-// 
-
-
-//  ETH (Ethernet Interface) [Driver_ETH_MAC0]
-//  Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC
-#define RTE_ETH                         1
-
-//    MII (Media Independent Interface)
-#define RTE_ETH_MII                     0
-
-//      ETH_MII_TX_CLK Pin <0=>PC3
-#define RTE_ETH_MII_TX_CLK_PORT_ID      0
-#if    (RTE_ETH_MII_TX_CLK_PORT_ID == 0)
-#define RTE_ETH_MII_TX_CLK_PORT         GPIOC
-#define RTE_ETH_MII_TX_CLK_PIN          3
-#else
-#error "Invalid ETH_MII_TX_CLK Pin Configuration!"
-#endif
-//      ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13
-#define RTE_ETH_MII_TXD0_PORT_ID        0
-#if    (RTE_ETH_MII_TXD0_PORT_ID == 0)
-#define RTE_ETH_MII_TXD0_PORT           GPIOB
-#define RTE_ETH_MII_TXD0_PIN            12
-#elif  (RTE_ETH_MII_TXD0_PORT_ID == 1)
-#define RTE_ETH_MII_TXD0_PORT           GPIOG
-#define RTE_ETH_MII_TXD0_PIN            13
-#else
-#error "Invalid ETH_MII_TXD0 Pin Configuration!"
-#endif
-//      ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14
-#define RTE_ETH_MII_TXD1_PORT_ID        0
-#if    (RTE_ETH_MII_TXD1_PORT_ID == 0)
-#define RTE_ETH_MII_TXD1_PORT           GPIOB
-#define RTE_ETH_MII_TXD1_PIN            13
-#elif  (RTE_ETH_MII_TXD1_PORT_ID == 1)
-#define RTE_ETH_MII_TXD1_PORT           GPIOG
-#define RTE_ETH_MII_TXD1_PIN            14
-#else
-#error "Invalid ETH_MII_TXD1 Pin Configuration!"
-#endif
-//      ETH_MII_TXD2 Pin <0=>PC2
-#define RTE_ETH_MII_TXD2_PORT_ID        0
-#if    (RTE_ETH_MII_TXD2_PORT_ID == 0)
-#define RTE_ETH_MII_TXD2_PORT           GPIOC
-#define RTE_ETH_MII_TXD2_PIN            2
-#else
-#error "Invalid ETH_MII_TXD2 Pin Configuration!"
-#endif
-//      ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2
-#define RTE_ETH_MII_TXD3_PORT_ID        0
-#if    (RTE_ETH_MII_TXD3_PORT_ID == 0)
-#define RTE_ETH_MII_TXD3_PORT           GPIOB
-#define RTE_ETH_MII_TXD3_PIN            8
-#elif  (RTE_ETH_MII_TXD3_PORT_ID == 1)
-#define RTE_ETH_MII_TXD3_PORT           GPIOE
-#define RTE_ETH_MII_TXD3_PIN            2
-#else
-#error "Invalid ETH_MII_TXD3 Pin Configuration!"
-#endif
-//      ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11
-#define RTE_ETH_MII_TX_EN_PORT_ID       0
-#if    (RTE_ETH_MII_TX_EN_PORT_ID == 0)
-#define RTE_ETH_MII_TX_EN_PORT          GPIOB
-#define RTE_ETH_MII_TX_EN_PIN           11
-#elif  (RTE_ETH_MII_TX_EN_PORT_ID == 1)
-#define RTE_ETH_MII_TX_EN_PORT          GPIOG
-#define RTE_ETH_MII_TX_EN_PIN           11
-#else
-#error "Invalid ETH_MII_TX_EN Pin Configuration!"
-#endif
-//      ETH_MII_RX_CLK Pin <0=>PA1
-#define RTE_ETH_MII_RX_CLK_PORT_ID        0
-#if    (RTE_ETH_MII_RX_CLK_PORT_ID == 0)
-#define RTE_ETH_MII_RX_CLK_PORT         GPIOA
-#define RTE_ETH_MII_RX_CLK_PIN          1
-#else
-#error "Invalid ETH_MII_RX_CLK Pin Configuration!"
-#endif
-//      ETH_MII_RXD0 Pin <0=>PC4
-#define RTE_ETH_MII_RXD0_PORT_ID        0
-#if    (RTE_ETH_MII_RXD0_PORT_ID == 0)
-#define RTE_ETH_MII_RXD0_PORT           GPIOC
-#define RTE_ETH_MII_RXD0_PIN            4
-#else
-#error "Invalid ETH_MII_RXD0 Pin Configuration!"
-#endif
-//      ETH_MII_RXD1 Pin <0=>PC5
-#define RTE_ETH_MII_RXD1_PORT_ID        0
-#if    (RTE_ETH_MII_RXD1_PORT_ID == 0)
-#define RTE_ETH_MII_RXD1_PORT           GPIOC
-#define RTE_ETH_MII_RXD1_PIN            5
-#else
-#error "Invalid ETH_MII_RXD1 Pin Configuration!"
-#endif
-//      ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6
-#define RTE_ETH_MII_RXD2_PORT_ID        0
-#if    (RTE_ETH_MII_RXD2_PORT_ID == 0)
-#define RTE_ETH_MII_RXD2_PORT           GPIOB
-#define RTE_ETH_MII_RXD2_PIN            0
-#elif  (RTE_ETH_MII_RXD2_PORT_ID == 1)
-#define RTE_ETH_MII_RXD2_PORT           GPIOH
-#define RTE_ETH_MII_RXD2_PIN            6
-#else
-#error "Invalid ETH_MII_RXD2 Pin Configuration!"
-#endif
-//      ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7
-#define RTE_ETH_MII_RXD3_PORT_ID        0
-#if    (RTE_ETH_MII_RXD3_PORT_ID == 0)
-#define RTE_ETH_MII_RXD3_PORT           GPIOB
-#define RTE_ETH_MII_RXD3_PIN            1
-#elif  (RTE_ETH_MII_RXD3_PORT_ID == 1)
-#define RTE_ETH_MII_RXD3_PORT           GPIOH
-#define RTE_ETH_MII_RXD3_PIN            7
-#else
-#error "Invalid ETH_MII_RXD3 Pin Configuration!"
-#endif
-//      ETH_MII_RX_DV Pin <0=>PA7
-#define RTE_ETH_MII_RX_DV_PORT_ID       0
-#if    (RTE_ETH_MII_RX_DV_PORT_ID == 0)
-#define RTE_ETH_MII_RX_DV_PORT          GPIOA
-#define RTE_ETH_MII_RX_DV_PIN           7
-#else
-#error "Invalid ETH_MII_RX_DV Pin Configuration!"
-#endif
-//      ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10
-#define RTE_ETH_MII_RX_ER_PORT_ID       0
-#if    (RTE_ETH_MII_RX_ER_PORT_ID == 0)
-#define RTE_ETH_MII_RX_ER_PORT          GPIOB
-#define RTE_ETH_MII_RX_ER_PIN           10
-#elif  (RTE_ETH_MII_RXD3_PORT_ID == 1)
-#define RTE_ETH_MII_RX_ER_PORT          GPIOI
-#define RTE_ETH_MII_RX_ER_PIN           10
-#else
-#error "Invalid ETH_MII_RX_ER Pin Configuration!"
-#endif
-//      ETH_MII_CRS Pin <0=>PA0 <1=>PH2
-#define RTE_ETH_MII_CRS_PORT_ID       0
-#if    (RTE_ETH_MII_CRS_PORT_ID == 0)
-#define RTE_ETH_MII_CRS_PORT            GPIOA
-#define RTE_ETH_MII_CRS_PIN             0
-#elif  (RTE_ETH_MII_CRS_PORT_ID == 1)
-#define RTE_ETH_MII_CRS_PORT            GPIOH
-#define RTE_ETH_MII_CRS_PIN             2
-#else
-#error "Invalid ETH_MII_CRS Pin Configuration!"
-#endif
-//      ETH_MII_COL Pin <0=>PA3 <1=>PH3
-#define RTE_ETH_MII_COL_PORT_ID       0
-#if    (RTE_ETH_MII_COL_PORT_ID == 0)
-#define RTE_ETH_MII_COL_PORT            GPIOA
-#define RTE_ETH_MII_COL_PIN             3
-#elif  (RTE_ETH_MII_COL_PORT_ID == 1)
-#define RTE_ETH_MII_COL_PORT            GPIOH
-#define RTE_ETH_MII_COL_PIN             3
-#else
-#error "Invalid ETH_MII_COL Pin Configuration!"
-#endif
-
-//   
-
-//    RMII (Reduced Media Independent Interface)
-#define RTE_ETH_RMII                    1
-
-//      ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13
-#define RTE_ETH_RMII_TXD0_PORT_ID       1
-#if    (RTE_ETH_RMII_TXD0_PORT_ID == 0)
-#define RTE_ETH_RMII_TXD0_PORT          GPIOB
-#define RTE_ETH_RMII_TXD0_PIN           12
-#elif  (RTE_ETH_RMII_TXD0_PORT_ID == 1)
-#define RTE_ETH_RMII_TXD0_PORT          GPIOG
-#define RTE_ETH_RMII_TXD0_PIN           13
-#else
-#error "Invalid ETH_RMII_TXD0 Pin Configuration!"
-#endif
-//      ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14
-#define RTE_ETH_RMII_TXD1_PORT_ID       1
-#if    (RTE_ETH_RMII_TXD1_PORT_ID == 0)
-#define RTE_ETH_RMII_TXD1_PORT          GPIOB
-#define RTE_ETH_RMII_TXD1_PIN           13
-#elif  (RTE_ETH_RMII_TXD1_PORT_ID == 1)
-#define RTE_ETH_RMII_TXD1_PORT          GPIOG
-#define RTE_ETH_RMII_TXD1_PIN           14
-#else
-#error "Invalid ETH_RMII_TXD1 Pin Configuration!"
-#endif
-//      ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11
-#define RTE_ETH_RMII_TX_EN_PORT_ID      1
-#if    (RTE_ETH_RMII_TX_EN_PORT_ID == 0)
-#define RTE_ETH_RMII_TX_EN_PORT         GPIOB
-#define RTE_ETH_RMII_TX_EN_PIN          11
-#elif  (RTE_ETH_RMII_TX_EN_PORT_ID == 1)
-#define RTE_ETH_RMII_TX_EN_PORT         GPIOG
-#define RTE_ETH_RMII_TX_EN_PIN          11
-#else
-#error "Invalid ETH_RMII_TX_EN Pin Configuration!"
-#endif
-//      ETH_RMII_RXD0 Pin <0=>PC4
-#define RTE_ETH_RMII_RXD0_PORT_ID       0
-#if    (RTE_ETH_RMII_RXD0_PORT_ID == 0)
-#define RTE_ETH_RMII_RXD0_PORT          GPIOC
-#define RTE_ETH_RMII_RXD0_PIN           4
-#else
-#error "Invalid ETH_RMII_RXD0 Pin Configuration!"
-#endif
-//      ETH_RMII_RXD1 Pin <0=>PC5
-#define RTE_ETH_RMII_RXD1_PORT_ID       0
-#if    (RTE_ETH_RMII_RXD1_PORT_ID == 0)
-#define RTE_ETH_RMII_RXD1_PORT          GPIOC
-#define RTE_ETH_RMII_RXD1_PIN           5
-#else
-#error "Invalid ETH_RMII_RXD1 Pin Configuration!"
-#endif
-//      ETH_RMII_REF_CLK Pin <0=>PA1
-#define RTE_ETH_RMII_REF_CLK_PORT_ID    0
-#if    (RTE_ETH_RMII_REF_CLK_PORT_ID == 0)
-#define RTE_ETH_RMII_REF_CLK_PORT       GPIOA
-#define RTE_ETH_RMII_REF_CLK_PIN        1
-#else
-#error "Invalid ETH_RMII_REF_CLK Pin Configuration!"
-#endif
-//      ETH_RMII_CRS_DV Pin <0=>PA7
-#define RTE_ETH_RMII_CRS_DV_PORT_ID     0
-#if    (RTE_ETH_RMII_CRS_DV_PORT_ID == 0)
-#define RTE_ETH_RMII_CRS_DV_PORT        GPIOA
-#define RTE_ETH_RMII_CRS_DV_PIN         7
-#else
-#error "Invalid ETH_RMII_CRS_DV Pin Configuration!"
-#endif
-
-//   
-
-//    Management Data Interface
-//      ETH_MDC Pin <0=>PC1
-#define RTE_ETH_MDI_MDC_PORT_ID         0
-#if    (RTE_ETH_MDI_MDC_PORT_ID == 0)
-#define RTE_ETH_MDI_MDC_PORT            GPIOC
-#define RTE_ETH_MDI_MDC_PIN             1
-#else
-#error "Invalid ETH_MDC Pin Configuration!"
-#endif
-//      ETH_MDIO Pin <0=>PA2
-#define RTE_ETH_MDI_MDIO_PORT_ID        0
-#if    (RTE_ETH_MDI_MDIO_PORT_ID == 0)
-#define RTE_ETH_MDI_MDIO_PORT           GPIOA
-#define RTE_ETH_MDI_MDIO_PIN            2
-#else
-#error "Invalid ETH_MDIO Pin Configuration!"
-#endif
-//   
-
-//    Reference 25MHz/50MHz Clock generation
-#define RTE_ETH_REF_CLOCK               0
-
-//      MCO Pin <0=>PA2 <1=>PC9
-#define RTE_ETH_REF_CLOCK_PORT_ID       0
-#if    (RTE_ETH_REF_CLOCK_PORT_ID == 0)
-#define RTE_ETH_REF_CLOCK_PORT          GPIOA
-#define RTE_ETH_REF_CLOCK_PIN           8
-#elif  (RTE_ETH_REF_CLOCK_PORT_ID == 1)
-#define RTE_ETH_REF_CLOCK_PORT          GPIOC
-#define RTE_ETH_REF_CLOCK_PIN           9
-#else
-#error "Invalid MCO Pin Configuration!"
-#endif
-
-//   
-
-// 
-
-
-//  USB OTG Full-speed
-#define RTE_USB_OTG_FS                  0
-
-//    Device [Driver_USBD0]
-//    Configuration settings for Driver_USBD0 in component ::Drivers:USB Device
-#define RTE_USB_OTG_FS_DEV              1
-
-//      Endpoints
-//      Reduce memory requirements of Driver by disabling unused endpoints
-//        Endpoint 1
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 2
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 3
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//     
-#define RTE_USB_OTG_FS_DEV_EP           0x0000000F
-#define RTE_USB_OTG_FS_DEV_EP_BULK      0x000E000E
-#define RTE_USB_OTG_FS_DEV_EP_INT       0x000E000E
-#define RTE_USB_OTG_FS_DEV_EP_ISO       0x000E000E
-
-//   
-
-//    Host [Driver_USBH0]
-//    Configuration settings for Driver_USBH0 in component ::Drivers:USB Host
-
-#define RTE_USB_OTG_FS_HOST             1
-
-//      VBUS Power On/Off Pin
-//      Configure Pin for driving VBUS
-//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//        Active State <0=>Low <1=>High
-//         Selects Active State Logical Level
-//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//         Selects Port Name
-//        Bit <0-15>
-//         Selects Port Bit
-//     
-#define RTE_OTG_FS_VBUS_PIN             1
-#define RTE_OTG_FS_VBUS_ACTIVE          0
-#define RTE_OTG_FS_VBUS_PORT            GPIO_PORT(7)
-#define RTE_OTG_FS_VBUS_BIT             5
-
-//      Overcurrent Detection Pin
-//      Configure Pin for overcurrent detection
-//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//        Active State <0=>Low <1=>High
-//         Selects Active State Logical Level
-//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//         Selects Port Name
-//        Bit <0-15>
-//         Selects Port Bit
-//     
-#define RTE_OTG_FS_OC_PIN               1
-#define RTE_OTG_FS_OC_ACTIVE            0
-#define RTE_OTG_FS_OC_PORT              GPIO_PORT(5)
-#define RTE_OTG_FS_OC_BIT               11
-//   
-
-// 
-
-
-//  USB OTG High-speed
-#define RTE_USB_OTG_HS                  0
-
-//    PHY (Physical Layer)
-
-//      PHY Interface
-//       <0=>On-chip full-speed PHY
-//       <1=>External ULPI high-speed PHY
-#define RTE_USB_OTG_HS_PHY              1
-
-//      External ULPI Pins (UTMI+ Low Pin Interface)
-
-//        OTG_HS_ULPI_CK Pin <0=>PA5
-#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_CK_PORT     GPIOA
-#define RTE_USB_OTG_HS_ULPI_CK_PIN      5
-#else
-#error "Invalid OTG_HS_ULPI_CK Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2
-#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0
-#if    (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOI
-#define RTE_USB_OTG_HS_ULPI_DIR_PIN     11
-#elif  (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1)
-#define RTE_USB_OTG_HS_ULPI_DIR_PORT    GPIOC
-#define RTE_USB_OTG_HS_ULPI_DIR_PIN     2
-#else
-#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_STP Pin <0=>PC0
-#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0
-#if    (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_STP_PORT    GPIOC
-#define RTE_USB_OTG_HS_ULPI_STP_PIN     0
-#else
-#error "Invalid OTG_HS_ULPI_STP Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4
-#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1
-#if    (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOC
-#define RTE_USB_OTG_HS_ULPI_NXT_PIN     2
-#elif  (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1)
-#define RTE_USB_OTG_HS_ULPI_NXT_PORT    GPIOH
-#define RTE_USB_OTG_HS_ULPI_NXT_PIN     4
-#else
-#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D0 Pin <0=>PA3
-#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D0_PORT     GPIOA
-#define RTE_USB_OTG_HS_ULPI_D0_PIN      3
-#else
-#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D1 Pin <0=>PB0
-#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D1_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D1_PIN      0
-#else
-#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D2 Pin <0=>PB1
-#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D2_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D2_PIN      1
-#else
-#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D3 Pin <0=>PB10
-#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D3_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D3_PIN      10
-#else
-#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D4 Pin <0=>PB11
-#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D4_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D4_PIN      11
-#else
-#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D5 Pin <0=>PB12
-#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D5_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D5_PIN      12
-#else
-#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D6 Pin <0=>PB13
-#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D6_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D6_PIN      13
-#else
-#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!"
-#endif
-//        OTG_HS_ULPI_D7 Pin <0=>PB5
-#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID  0
-#if    (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0)
-#define RTE_USB_OTG_HS_ULPI_D7_PORT     GPIOB
-#define RTE_USB_OTG_HS_ULPI_D7_PIN      5
-#else
-#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!"
-#endif
-
-//     
-
-//   
-
-//    Device [Driver_USBD1]
-//    Configuration settings for Driver_USBD1 in component ::Drivers:USB Device
-#define RTE_USB_OTG_HS_DEV              1
-
-//      Endpoints
-//      Reduce memory requirements of Driver by disabling unused endpoints
-//        Endpoint 1
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 2
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 3
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 4
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//        Endpoint 5
-//           Bulk OUT
-//          Bulk IN
-//           Interrupt OUT
-//          Interrupt IN
-//           Isochronous OUT
-//          Isochronous IN
-//       
-//     
-#define RTE_USB_OTG_HS_DEV_EP           0x0000003F
-#define RTE_USB_OTG_HS_DEV_EP_BULK      0x003E003E
-#define RTE_USB_OTG_HS_DEV_EP_INT       0x003E003E
-#define RTE_USB_OTG_HS_DEV_EP_ISO       0x003E003E
-
-//   
-
-//    Host [Driver_USBH1]
-//    Configuration settings for Driver_USBH1 in component ::Drivers:USB Host
-#define RTE_USB_OTG_HS_HOST             1
-
-//      VBUS Power On/Off Pin
-//      Configure Pin for driving VBUS
-//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//        Active State <0=>Low <1=>High
-//         Selects Active State Logical Level
-//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//         Selects Port Name
-//        Bit <0-15>
-//         Selects Port Bit
-//     
-#define RTE_OTG_HS_VBUS_PIN             1
-#define RTE_OTG_HS_VBUS_ACTIVE          0
-#define RTE_OTG_HS_VBUS_PORT            GPIO_PORT(2)
-#define RTE_OTG_HS_VBUS_BIT             2
-
-//      Overcurrent Detection Pin
-//      Configure Pin for overcurrent detection
-//      GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11)
-//        Active State <0=>Low <1=>High
-//         Selects Active State Logical Level
-//        Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD
-//                 <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI
-//         Selects Port Name
-//        Bit <0-15>
-//         Selects Port Bit
-//     
-#define RTE_OTG_HS_OC_PIN               1
-#define RTE_OTG_HS_OC_ACTIVE            0
-#define RTE_OTG_HS_OC_PORT              GPIO_PORT(5)
-#define RTE_OTG_HS_OC_BIT               12
-//   
-
-// 
-
-
-//  EXTI (External Interrupt/Event Controller)
-#define RTE_EXTI                        0
-
-//    EXTI0 Line
-#define RTE_EXTI0                       0
-//      Pin   <0=>PA0  <1=>PB0  <2=>PC0  <3=>PD0  <4=>PE0  <5=>PF0  <6=>PG0  <7=>PH0  <8=>PI0
-#define RTE_EXTI0_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI0_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI0_TRIGGER               0
-//   
-
-//    EXTI1 Line
-#define RTE_EXTI1                       0
-//      Pin   <0=>PA1  <1=>PB1  <2=>PC1  <3=>PD1  <4=>PE1  <5=>PF1  <6=>PG1  <7=>PH1  <8=>PI1
-#define RTE_EXTI1_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI1_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI1_TRIGGER               0
-//   
-
-//    EXTI2 Line
-#define RTE_EXTI2                       0
-//      Pin   <0=>PA2  <1=>PB2  <2=>PC2  <3=>PD2  <4=>PE2  <5=>PF2  <6=>PG2  <7=>PH2  <8=>PI2
-#define RTE_EXTI2_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI2_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI2_TRIGGER               0
-//   
-
-//    EXTI3 Line
-#define RTE_EXTI3                       0
-//      Pin   <0=>PA3  <1=>PB3  <2=>PC3  <3=>PD3  <4=>PE3  <5=>PF3  <6=>PG3  <7=>PH3  <8=>PI3
-#define RTE_EXTI3_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI3_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI3_TRIGGER               0
-//   
-
-//    EXTI4 Line
-#define RTE_EXTI4                       0
-//      Pin   <0=>PA4  <1=>PB4  <2=>PC4  <3=>PD4  <4=>PE4  <5=>PF4  <6=>PG4  <7=>PH4  <8=>PI4
-#define RTE_EXTI4_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI4_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI4_TRIGGER               0
-//   
-
-//    EXTI5 Line
-#define RTE_EXTI5                       0
-//      Pin   <0=>PA5  <1=>PB5  <2=>PC5  <3=>PD5  <4=>PE5  <5=>PF5  <6=>PG5  <7=>PH5  <8=>PI5
-#define RTE_EXTI5_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI5_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI5_TRIGGER               0
-//   
-
-//    EXTI6 Line
-#define RTE_EXTI6                       0
-//      Pin   <0=>PA6  <1=>PB6  <2=>PC6  <3=>PD6  <4=>PE6  <5=>PF6  <6=>PG6  <7=>PH6  <8=>PI6
-#define RTE_EXTI6_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI6_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI6_TRIGGER               0
-//   
-
-//    EXTI7 Line
-#define RTE_EXTI7                       0
-//      Pin   <0=>PA7  <1=>PB7  <2=>PC7  <3=>PD7  <4=>PE7  <5=>PF7  <6=>PG7  <7=>PH7  <8=>PI7
-#define RTE_EXTI7_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI7_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI7_TRIGGER               0
-//   
-
-//    EXTI8 Line
-#define RTE_EXTI8                       0
-//      Pin   <0=>PA8  <1=>PB8  <2=>PC8  <3=>PD8  <4=>PE8  <5=>PF8  <6=>PG8  <7=>PH8  <8=>PI8
-#define RTE_EXTI8_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI8_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI8_TRIGGER               0
-//   
-
-//    EXTI9 Line
-#define RTE_EXTI9                       0
-//      Pin   <0=>PA9  <1=>PB9  <2=>PC9  <3=>PD9  <4=>PE9  <5=>PF9  <6=>PG9  <7=>PH9  <8=>PI9
-#define RTE_EXTI9_PIN                   0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI9_MODE                  0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI9_TRIGGER               0
-//   
-
-//    EXTI10 Line
-#define RTE_EXTI10                      0
-//      Pin   <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10
-#define RTE_EXTI10_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI10_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI10_TRIGGER              0
-//   
-
-//    EXTI11 Line
-#define RTE_EXTI11                      0
-//      Pin   <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11
-#define RTE_EXTI11_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI11_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI11_TRIGGER              0
-//   
-
-//    EXTI12 Line
-#define RTE_EXTI12                      0
-//      Pin   <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12
-#define RTE_EXTI12_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI12_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI12_TRIGGER              0
-//   
-
-//    EXTI13 Line
-#define RTE_EXTI13                      0
-//      Pin   <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13
-#define RTE_EXTI13_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI13_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI13_TRIGGER              0
-//   
-
-//    EXTI14 Line
-#define RTE_EXTI14                      0
-//      Pin   <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14
-#define RTE_EXTI14_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI14_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI14_TRIGGER              0
-//   
-
-//    EXTI15 Line
-#define RTE_EXTI15                      0
-//      Pin   <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15
-#define RTE_EXTI15_PIN                  0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI15_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI15_TRIGGER              0
-//   
-
-//    EXTI16 Line: PVD Output
-#define RTE_EXTI16                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI16_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI16_TRIGGER              0
-//   
-
-//    EXTI17 Line: RTC Alarm
-#define RTE_EXTI17                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI17_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI17_TRIGGER              0
-//   
-
-//    EXTI18 Line: USB OTG FS Wakeup
-#define RTE_EXTI18                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI18_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI18_TRIGGER              0
-//   
-
-//    EXTI19 Line: Ethernet Wakeup
-#define RTE_EXTI19                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI19_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI19_TRIGGER              0
-//   
-
-//    EXTI20 Line: USB OTG HS Wakeup
-#define RTE_EXTI20                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI20_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI20_TRIGGER              0
-//   
-
-//    EXTI21 Line: RTC Tamper and TimeStamp
-#define RTE_EXTI21                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI21_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI21_TRIGGER              0
-//   
-
-//    EXTI22 Line: RTC Wakeup
-#define RTE_EXTI22                      0
-//      Mode  <0=>Interrupt  <1=>Event
-#define RTE_EXTI22_MODE                 0
-//      Trigger  <0=>None  <1=>Raising edge <2=>Falling edge <3=>Any edge
-#define RTE_EXTI22_TRIGGER              0
-//   
-
-// 
-
-
-//  FSMC (Flexible Static Memory Controller)
-#define RTE_FSMC                        0
-
-//    Pin Configuration
-//    Configure Pins
-#define RTE_FSMC_PINS                   0
-
-//      Address Bus Pins
-//       <0=>A[17:16]
-//       <1=>A[10:0]   <2=>A[15:0]   <3=>A[16:0]   <4=>A[17:0]
-//       <5=>A[18:0]   <6=>A[19:0]   <7=>A[20:0]   <8=>A[21:0]
-//       <9=>A[22:0]  <10=>A[23:0]  <11=>A[24:0]  <12=>A[25:0]
-#define RTE_FSMC_ABUS_PINS              10
-//      Data Bus Pins  <0=>D[7:0] <1=>D[15:0]
-#define RTE_FSMC_DBUS_PINS              0
-//      FSMC_NOE Pin
-#define RTE_FSMC_NOE_PIN                0
-//      FSMC_NWE Pin
-#define RTE_FSMC_NWE_PIN                0
-//      FSMC_NBL0 Pin
-#define RTE_FSMC_NBL0_PIN               0
-//      FSMC_NBL1 Pin
-#define RTE_FSMC_NBL1_PIN               0
-//      FSMC_NL Pin
-#define RTE_FSMC_NL_PIN                 0
-//      FSMC_NWAIT Pin
-#define RTE_FSMC_NWAIT_PIN              0
-//      FSMC_CLK Pin
-#define RTE_FSMC_CLK_PIN                0
-//      FSMC_NE1/NCE2 Pin
-#define RTE_FSMC_NE1_PIN                0
-//      FSMC_NE2/NCE3 Pin
-#define RTE_FSMC_NE2_PIN                0
-//      FSMC_NE3/NCE4_1 Pin
-#define RTE_FSMC_NE3_PIN                0
-//      FSMC_NE4 Pin
-#define RTE_FSMC_NE4_PIN                0
-//      FSMC_NCE4_2 Pin
-#define RTE_FSMC_NCE42_PIN              0
-//      FSMC_INT2 Pin
-#define RTE_FSMC_INT2_PIN               0
-//      FSMC_INT3 Pin
-#define RTE_FSMC_INT3_PIN               0
-//      FSMC_INTR Pin
-#define RTE_FSMC_INTR_PIN               0
-//      FSMC_NIORD Pin
-#define RTE_FSMC_NIORD_PIN              0
-//      FSMC_NIOWR Pin
-#define RTE_FSMC_NIOWR_PIN              0
-//      FSMC_NREG Pin
-#define RTE_FSMC_NREG_PIN               0
-//      FSMC_CD Pin
-#define RTE_FSMC_CD_PIN                 0
-
-//   
-
-//    NOR Flash / PSRAM Controller
-
-//      FSMC_NE1 Chip Select
-//      Configure Device on Chip Select FSMC_NE1
-#define RTE_FSMC_NE1                    0
-
-//        Chip-select control
-//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
-//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
-//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
-//          ASYNCWAIT: Wait signal during asynchronous transfer
-//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
-//          EXTMOD: Extended mode enable
-//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
-//          WAITEN: Wait enable
-//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
-//          WREN: Write enable
-//          Enable/disable write operations in the current bank by the FSMC
-//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
-//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
-//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
-//          by the memory one clock cycle before the wait state or during the wait state
-//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
-//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
-//          BURSTEN: Burst enable
-//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
-//          FACCEN: Flash access enable
-//          Enables NOR Flash memory access operations.
-//          MWID: Memory databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width, valid for all type of memories.
-//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
-//          Defines the type of external memory attached to the corresponding memory bank.
-//          MUXEN: Address/data multiplexing enable
-//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
-//          MBKEN: Memory bank enable
-//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
-//          disabled bank causes an ERROR on AHB bus.
-#define RTE_FSMC_BCR1_CBURSTRW          0
-#define RTE_FSMC_BCR1_ASYNCWAIT         0
-#define RTE_FSMC_BCR1_EXTMOD            0
-#define RTE_FSMC_BCR1_WAITEN            1
-#define RTE_FSMC_BCR1_WREN              1
-#define RTE_FSMC_BCR1_WAITCFG           0
-#define RTE_FSMC_BCR1_WRAPMOD           0
-#define RTE_FSMC_BCR1_WAITPOL           0
-#define RTE_FSMC_BCR1_BURSTEN           0
-#define RTE_FSMC_BCR1_FACCEN            1
-#define RTE_FSMC_BCR1_MWID              1
-#define RTE_FSMC_BCR1_MTYP              2
-#define RTE_FSMC_BCR1_MUXEN             1
-#define RTE_FSMC_BCR1_MBKEN             1
-//       
-
-//        Chip-select timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
-//          cycles (+2) to issue to the memory before getting the first data:
-//          0000: Data latency of 2 CLK clock cycles for first burst access
-//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
-//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
-//          In the case of CRAM, this field must be set to ‘0’.
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
-//          0000: Reserved
-//          0001: CLK period = 2 × HCLK periods
-//          0010: CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Define the bus turnaround delay after a read access only
-//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
-//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
-//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
-//          databus in Hi-Z state.
-//          These bits are written by software to add a delay at the end of a write/read transaction. This
-//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
-//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
-//          read access (tEHQZ):
-//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
-//          EXTMOD = ‘0’
-//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration =1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
-//          memory clock period duration.
-//          ADDSET: Address setup phase duration <0-15>
-//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don’t care.
-#define RTE_FSMC_BTR1_ACCMOD            0
-#define RTE_FSMC_BTR1_DATLAT            15
-#define RTE_FSMC_BTR1_CLKDIV            15
-#define RTE_FSMC_BTR1_BUSTURN           15
-#define RTE_FSMC_BTR1_DATAST            255
-#define RTE_FSMC_BTR1_ADDHLD            15
-#define RTE_FSMC_BTR1_ADDSET            15
-//       
-
-//        Write timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
-//          (+2) to issue to the memory before getting the first data.
-//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
-//          ...
-//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
-//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
-//          CRAM, this field must be set to 0
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
-//          0000: Reserved
-//          0001 CLK period = 2 × HCLK periods
-//          0010 CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
-//          (BUSTRUN + 1) HCLK period = tEHELmin.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
-//          ADDSET: Address setup phase duration <1-15>
-//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is don’t care.
-#define RTE_FSMC_BWTR1_ACCMOD        0
-#define RTE_FSMC_BWTR1_DATLAT        15
-#define RTE_FSMC_BWTR1_CLKDIV        15
-#define RTE_FSMC_BWTR1_BUSTURN       15
-#define RTE_FSMC_BWTR1_DATAST        255
-#define RTE_FSMC_BWTR1_ADDHLD        15
-#define RTE_FSMC_BWTR1_ADDSET        15
-//       
-//     
-
-//      FSMC_NE2 Chip Select
-//      Configure Device on Chip Select FSMC_NE2
-#define RTE_FSMC_NE2                    0
-
-//        Chip-select control
-//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
-//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
-//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
-//          ASYNCWAIT: Wait signal during asynchronous transfer
-//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
-//          EXTMOD: Extended mode enable
-//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
-//          WAITEN: Wait enable
-//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
-//          WREN: Write enable
-//          Enable/disable write operations in the current bank by the FSMC
-//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
-//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
-//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
-//          by the memory one clock cycle before the wait state or during the wait state
-//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
-//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
-//          BURSTEN: Burst enable
-//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
-//          FACCEN: Flash access enable
-//          Enables NOR Flash memory access operations.
-//          MWID: Memory databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width, valid for all type of memories.
-//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
-//          Defines the type of external memory attached to the corresponding memory bank.
-//          MUXEN: Address/data multiplexing enable
-//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
-//          MBKEN: Memory bank enable
-//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
-//          disabled bank causes an ERROR on AHB bus.
-#define RTE_FSMC_BCR2_CBURSTRW          0
-#define RTE_FSMC_BCR2_ASYNCWAIT         0
-#define RTE_FSMC_BCR2_EXTMOD            0
-#define RTE_FSMC_BCR2_WAITEN            1
-#define RTE_FSMC_BCR2_WREN              1
-#define RTE_FSMC_BCR2_WAITCFG           0
-#define RTE_FSMC_BCR2_WRAPMOD           0
-#define RTE_FSMC_BCR2_WAITPOL           0
-#define RTE_FSMC_BCR2_BURSTEN           0
-#define RTE_FSMC_BCR2_FACCEN            1
-#define RTE_FSMC_BCR2_MWID              1
-#define RTE_FSMC_BCR2_MTYP              0
-#define RTE_FSMC_BCR2_MUXEN             1
-#define RTE_FSMC_BCR2_MBKEN             0
-//       
-
-//        Chip-select timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
-//          cycles (+2) to issue to the memory before getting the first data:
-//          0000: Data latency of 2 CLK clock cycles for first burst access
-//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
-//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
-//          In the case of CRAM, this field must be set to ‘0’.
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
-//          0000: Reserved
-//          0001: CLK period = 2 × HCLK periods
-//          0010: CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Define the bus turnaround delay after a read access only
-//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
-//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
-//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
-//          databus in Hi-Z state.
-//          These bits are written by software to add a delay at the end of a write/read transaction. This
-//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
-//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
-//          read access (tEHQZ):
-//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
-//          EXTMOD = ‘0’
-//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration =1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
-//          memory clock period duration.
-//          ADDSET: Address setup phase duration <0-15>
-//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don’t care.
-#define RTE_FSMC_BTR2_ACCMOD            0
-#define RTE_FSMC_BTR2_DATLAT            15
-#define RTE_FSMC_BTR2_CLKDIV            15
-#define RTE_FSMC_BTR2_BUSTURN           15
-#define RTE_FSMC_BTR2_DATAST            255
-#define RTE_FSMC_BTR2_ADDHLD            15
-#define RTE_FSMC_BTR2_ADDSET            15
-//       
-
-//        Write timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
-//          (+2) to issue to the memory before getting the first data.
-//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
-//          ...
-//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
-//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
-//          CRAM, this field must be set to 0
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
-//          0000: Reserved
-//          0001 CLK period = 2 × HCLK periods
-//          0010 CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
-//          (BUSTRUN + 1) HCLK period = tEHELmin.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
-//          ADDSET: Address setup phase duration <1-15>
-//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is don’t care.
-#define RTE_FSMC_BWTR2_ACCMOD        0
-#define RTE_FSMC_BWTR2_DATLAT        15
-#define RTE_FSMC_BWTR2_CLKDIV        15
-#define RTE_FSMC_BWTR2_BUSTURN       15
-#define RTE_FSMC_BWTR2_DATAST        255
-#define RTE_FSMC_BWTR2_ADDHLD        15
-#define RTE_FSMC_BWTR2_ADDSET        15
-//       
-//     
-
-//      FSMC_NE3 Chip Select
-//      Configure Device on Chip Select FSMC_NE3
-#define RTE_FSMC_NE3                    0
-
-//        Chip-select control
-//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
-//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
-//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
-//          ASYNCWAIT: Wait signal during asynchronous transfer
-//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
-//          EXTMOD: Extended mode enable
-//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
-//          WAITEN: Wait enable
-//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
-//          WREN: Write enable
-//          Enable/disable write operations in the current bank by the FSMC
-//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
-//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
-//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
-//          by the memory one clock cycle before the wait state or during the wait state
-//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
-//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
-//          BURSTEN: Burst enable
-//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
-//          FACCEN: Flash access enable
-//          Enables NOR Flash memory access operations.
-//          MWID: Memory databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width, valid for all type of memories.
-//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
-//          Defines the type of external memory attached to the corresponding memory bank.
-//          MUXEN: Address/data multiplexing enable
-//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
-//          MBKEN: Memory bank enable
-//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
-//          disabled bank causes an ERROR on AHB bus.
-#define RTE_FSMC_BCR3_CBURSTRW          0
-#define RTE_FSMC_BCR3_ASYNCWAIT         0
-#define RTE_FSMC_BCR3_EXTMOD            0
-#define RTE_FSMC_BCR3_WAITEN            1
-#define RTE_FSMC_BCR3_WREN              1
-#define RTE_FSMC_BCR3_WAITCFG           0
-#define RTE_FSMC_BCR3_WRAPMOD           0
-#define RTE_FSMC_BCR3_WAITPOL           0
-#define RTE_FSMC_BCR3_BURSTEN           0
-#define RTE_FSMC_BCR3_FACCEN            1
-#define RTE_FSMC_BCR3_MWID              1
-#define RTE_FSMC_BCR3_MTYP              0
-#define RTE_FSMC_BCR3_MUXEN             1
-#define RTE_FSMC_BCR3_MBKEN             0
-//       
-
-//        Chip-select timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
-//          cycles (+2) to issue to the memory before getting the first data:
-//          0000: Data latency of 2 CLK clock cycles for first burst access
-//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
-//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
-//          In the case of CRAM, this field must be set to ‘0’.
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
-//          0000: Reserved
-//          0001: CLK period = 2 × HCLK periods
-//          0010: CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Define the bus turnaround delay after a read access only
-//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
-//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
-//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
-//          databus in Hi-Z state.
-//          These bits are written by software to add a delay at the end of a write/read transaction. This
-//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
-//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
-//          read access (tEHQZ):
-//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
-//          EXTMOD = ‘0’
-//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration =1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
-//          memory clock period duration.
-//          ADDSET: Address setup phase duration <0-15>
-//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don’t care.
-#define RTE_FSMC_BTR3_ACCMOD            0
-#define RTE_FSMC_BTR3_DATLAT            15
-#define RTE_FSMC_BTR3_CLKDIV            15
-#define RTE_FSMC_BTR3_BUSTURN           15
-#define RTE_FSMC_BTR3_DATAST            255
-#define RTE_FSMC_BTR3_ADDHLD            15
-#define RTE_FSMC_BTR3_ADDSET            15
-//       
-
-//        Write timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
-//          (+2) to issue to the memory before getting the first data.
-//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
-//          ...
-//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
-//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
-//          CRAM, this field must be set to 0
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
-//          0000: Reserved
-//          0001 CLK period = 2 × HCLK periods
-//          0010 CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
-//          (BUSTRUN + 1) HCLK period = tEHELmin.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
-//          ADDSET: Address setup phase duration <1-15>
-//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is don’t care.
-#define RTE_FSMC_BWTR3_ACCMOD        0
-#define RTE_FSMC_BWTR3_DATLAT        15
-#define RTE_FSMC_BWTR3_CLKDIV        15
-#define RTE_FSMC_BWTR3_BUSTURN       15
-#define RTE_FSMC_BWTR3_DATAST        255
-#define RTE_FSMC_BWTR3_ADDHLD        15
-#define RTE_FSMC_BWTR3_ADDSET        15
-//       
-//     
-
-//      FSMC_NE4 Chip Select
-//      Configure Device on Chip Select FSMC_NE4
-#define RTE_FSMC_NE4                    0
-
-//        Chip-select control
-//          CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write
-//          For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash
-//          memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal.
-//          ASYNCWAIT: Wait signal during asynchronous transfer
-//          Enables the FSMC to use the wait signal even during an asynchronous protocol.
-//          EXTMOD: Extended mode enable
-//          Enables the FSMC to program inside the write timing register, so it allows different timings for read and write.
-//          WAITEN: Wait enable
-//          For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal.
-//          WREN: Write enable
-//          Enable/disable write operations in the current bank by the FSMC
-//          WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state
-//          For memory access in burst mode, the NWAIT signal indicates whether the data from the memory
-//          are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted
-//          by the memory one clock cycle before the wait state or during the wait state
-//          WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high
-//          Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode.
-//          BURSTEN: Burst enable
-//          Enables the burst access mode for the memory. Valid only with synchronous burst memories.
-//          FACCEN: Flash access enable
-//          Enables NOR Flash memory access operations.
-//          MWID: Memory databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width, valid for all type of memories.
-//          MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash
-//          Defines the type of external memory attached to the corresponding memory bank.
-//          MUXEN: Address/data multiplexing enable
-//          When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories.
-//          MBKEN: Memory bank enable
-//          Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a
-//          disabled bank causes an ERROR on AHB bus.
-#define RTE_FSMC_BCR4_CBURSTRW          0
-#define RTE_FSMC_BCR4_ASYNCWAIT         0
-#define RTE_FSMC_BCR4_EXTMOD            0
-#define RTE_FSMC_BCR4_WAITEN            1
-#define RTE_FSMC_BCR4_WREN              1
-#define RTE_FSMC_BCR4_WAITCFG           0
-#define RTE_FSMC_BCR4_WRAPMOD           0
-#define RTE_FSMC_BCR4_WAITPOL           0
-#define RTE_FSMC_BCR4_BURSTEN           0
-#define RTE_FSMC_BCR4_FACCEN            1
-#define RTE_FSMC_BCR4_MWID              1
-#define RTE_FSMC_BCR4_MTYP              0
-#define RTE_FSMC_BCR4_MUXEN             1
-#define RTE_FSMC_BCR4_MBKEN             0
-//       
-
-//        Chip-select timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with synchronous burst mode enabled, defines the number of memory clock
-//          cycles (+2) to issue to the memory before getting the first data:
-//          0000: Data latency of 2 CLK clock cycles for first burst access
-//          1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK)
-//          periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care.
-//          In the case of CRAM, this field must be set to ‘0’.
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles:
-//          0000: Reserved
-//          0001: CLK period = 2 × HCLK periods
-//          0010: CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Define the bus turnaround delay after a read access only
-//          from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive
-//          addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the
-//          minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the
-//          databus in Hi-Z state.
-//          These bits are written by software to add a delay at the end of a write/read transaction. This
-//          delay allows to match the minimum time between consecutive transactions (tEHEL from NEx
-//          high to NEx low) and the maximum time needed by the memory to free the data bus after a
-//          read access (tEHQZ):
-//          (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if
-//          EXTMOD = ‘0’
-//          (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Define the duration of the address hold phase used in mode D and multiplexed accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration =1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is not used, the address hold phase is always 1
-//          memory clock period duration.
-//          ADDSET: Address setup phase duration <0-15>
-//          Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don’t care.
-#define RTE_FSMC_BTR4_ACCMOD            0
-#define RTE_FSMC_BTR4_DATLAT            15
-#define RTE_FSMC_BTR4_CLKDIV            15
-#define RTE_FSMC_BTR4_BUSTURN           15
-#define RTE_FSMC_BTR4_DATAST            255
-#define RTE_FSMC_BTR4_ADDHLD            15
-#define RTE_FSMC_BTR4_ADDSET            15
-//       
-
-//        Write timing
-//          ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D
-//          Specifies the asynchronous access modes. Access mode is taken into account only when
-//          Extended mode is enabled in the Chip-select control register.
-//          DATLAT: Data latency <0-15>
-//          For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles
-//          (+2) to issue to the memory before getting the first data.
-//          0000: (0x0) Data latency of 2 CLK clock cycles for first burst access
-//          ...
-//          1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset)
-//          Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In
-//          asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of
-//          CRAM, this field must be set to 0
-//          CLKDIV: Clock divide ratio (for CLK signal) <1-15>
-//          Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
-//          0000: Reserved
-//          0001 CLK period = 2 × HCLK periods
-//          0010 CLK period = 3 × HCLK periods
-//          1111: CLK period = 16 × HCLK periods (default value after reset)
-//          In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care.
-//          BUSTURN: Bus turnaround phase duration <0-15>
-//          Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low).
-//          (BUSTRUN + 1) HCLK period = tEHELmin.
-//          0000: BUSTURN phase duration = 0 HCLK clock cycle added
-//          ...
-//          1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset)
-//          DATAST: Data phase duration <1-255>
-//          Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses.
-//          0000 0000: Reserved
-//          0000 0001: DATAST phase duration = 1 × HCLK clock cycles
-//          0000 0010: DATAST phase duration = 2 × HCLK clock cycles
-//          ...
-//          1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous accesses, this value is don't care.
-//          ADDHLD: Address hold phase duration <1-15>
-//          Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses.
-//          0000: Reserved
-//          0001: ADDHLD phase duration = 1 × HCLK clock cycle
-//          0010: ADDHLD phase duration = 2 × HCLK clock cycle
-//          ...
-//          1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.
-//          ADDSET: Address setup phase duration <1-15>
-//          Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed.
-//          0000: ADDSET phase duration = 0 × HCLK clock cycle
-//          ...
-//          1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset)
-//          Note: In synchronous NOR Flash accesses, this value is don’t care.
-#define RTE_FSMC_BWTR4_ACCMOD        0
-#define RTE_FSMC_BWTR4_DATLAT        15
-#define RTE_FSMC_BWTR4_CLKDIV        15
-#define RTE_FSMC_BWTR4_BUSTURN       15
-#define RTE_FSMC_BWTR4_DATAST        255
-#define RTE_FSMC_BWTR4_ADDHLD        15
-#define RTE_FSMC_BWTR4_ADDSET        15
-//       
-//     
-
-//   
-
-//    NAND Flash Controller
-
-//      FSMC_NCE2 Chip Select
-//      Configure NAND Device on Chip Select FSMC_NCE2
-#define RTE_FSMC_NCE2                   0
-
-//        NAND Flash Control
-//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
-//          Defines the page size for the extended ECC.
-//          TAR: ALE to RE delay <0-15>
-//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          TCLR: CLE to RE delay <0-15>
-//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          ECCEN: ECC computation logic enable 
-//         PWID: Databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width.
-//          PTYP: Memory type <1=>NAND Flash
-//          Defines the type of device attached to the corresponding memory bank.
-//          PBKEN: NAND Flash memory bank enable
-//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
-//          PWAITEN: Wait feature enable
-//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
-#define RTE_FSMC_PCR2_ECCPS             0
-#define RTE_FSMC_PCR2_TAR               0
-#define RTE_FSMC_PCR2_TCLR              0
-#define RTE_FSMC_PCR2_ECCEN             0
-#define RTE_FSMC_PCR2_PWID              0
-#define RTE_FSMC_PCR2_PTYP              1
-#define RTE_FSMC_PCR2_PBKEN             0
-#define RTE_FSMC_PCR2_PWAITEN           0
-
-//       
-
-//        Interrupt configuration
-//         IFEN: Falling edge detection enable
-//         ILEN: High-level detection enable
-//         IREN: Rising edge detection enable
-#define RTE_FSMC_SR2_IFEN               0
-#define RTE_FSMC_SR2_ILEN               0
-#define RTE_FSMC_SR2_IREN               0
-
-//       
-
-//       Common memory space timing
-//          MEMHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access to. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
-//          MEMSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 2 HCLK cycles (for NAND Flash)
-//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
-#define RTE_FSMC_PMEM2_MEMHIZ           255
-#define RTE_FSMC_PMEM2_MEMHOLD          255
-#define RTE_FSMC_PMEM2_MEMWAIT          255
-#define RTE_FSMC_PMEM2_MEMSET           255
-
-//       
-
-//       Attribute memory space timing
-//          ATTHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
-//          ATTSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 1 HCLK cycle
-//           1111 1111: 256 HCLK cycles (default value after reset)
-#define RTE_FSMC_PATT2_ATTHIZ           255
-#define RTE_FSMC_PATT2_ATTHOLD          255
-#define RTE_FSMC_PATT2_ATTWAIT          255
-#define RTE_FSMC_PATT2_ATTSET           255
-
-//       
-
-//     
-
-//      FSMC_NCE3 Chip Select
-//      Configure NAND Device on Chip Select FSMC_NCE3
-#define RTE_FSMC_NCE3                   0
-
-//        NAND Flash Control
-//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
-//          Defines the page size for the extended ECC.
-//          TAR: ALE to RE delay <0-15>
-//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          TCLR: CLE to RE delay <0-15>
-//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          ECCEN: ECC computation logic enable 
-//         PWID: Databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width.
-//          PTYP: Memory type <1=>NAND Flash
-//          Defines the type of device attached to the corresponding memory bank.
-//          PBKEN: NAND Flash memory bank enable
-//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
-//          PWAITEN: Wait feature enable
-//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
-#define RTE_FSMC_PCR3_ECCPS             0
-#define RTE_FSMC_PCR3_TAR               0
-#define RTE_FSMC_PCR3_TCLR              0
-#define RTE_FSMC_PCR3_ECCEN             0
-#define RTE_FSMC_PCR3_PWID              0
-#define RTE_FSMC_PCR3_PTYP              1
-#define RTE_FSMC_PCR3_PBKEN             0
-#define RTE_FSMC_PCR3_PWAITEN           0
-
-//       
-
-//        Interrupt configuration
-//         IFEN: Falling edge detection enable
-//         ILEN: High-level detection enable
-//         IREN: Rising edge detection enable
-#define RTE_FSMC_SR3_IFEN               0
-#define RTE_FSMC_SR3_ILEN               0
-#define RTE_FSMC_SR3_IREN               0
-
-//       
-
-//       Common memory space timing
-//          MEMHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access to. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
-//          MEMSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 2 HCLK cycles (for NAND Flash)
-//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
-#define RTE_FSMC_PMEM3_MEMHIZ           255
-#define RTE_FSMC_PMEM3_MEMHOLD          255
-#define RTE_FSMC_PMEM3_MEMWAIT          255
-#define RTE_FSMC_PMEM3_MEMSET           255
-
-//       
-
-//       Attribute memory space timing
-//          ATTHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
-//          ATTSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 1 HCLK cycle
-//           1111 1111: 256 HCLK cycles (default value after reset)
-#define RTE_FSMC_PATT3_ATTHIZ           255
-#define RTE_FSMC_PATT3_ATTHOLD          255
-#define RTE_FSMC_PATT3_ATTWAIT          255
-#define RTE_FSMC_PATT3_ATTSET           255
-
-//       
-
-//     
-
-//   
-
-//    PC Card Controller
-
-//      FSMC_NCE4_x Chip Select
-//      Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2
-#define RTE_FSMC_NCE4              0
-
-//        PC Card Control
-//          ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes
-//          Defines the page size for the extended ECC.
-//          TAR: ALE to RE delay <0-15>
-//          Sets time from ALE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          TCLR: CLE to RE delay <0-15>
-//          Sets time from CLE low to RE low in number of AHB clock cycles (HCLK).
-//          Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period
-//          0000: 1 HCLK cycle (default)
-//          1111: 16 HCLK cycles
-//          Note: SET is MEMSET or ATTSET according to the addressed space.
-//          ECCEN: ECC computation logic enable
-//         PWID: Databus width <0=>8 bits <1=>16 bits
-//          Defines the external memory device width.
-//          PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA
-//          Defines the type of device attached to the corresponding memory bank.
-//          PBKEN: PC Card memory bank enable
-//          Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
-//          PWAITEN: Wait feature enable
-//          Enables the Wait feature for the PC Card/NAND Flash memory bank.
-#define RTE_FSMC_PCR4_ECCPS             0
-#define RTE_FSMC_PCR4_TAR               0
-#define RTE_FSMC_PCR4_TCLR              0
-#define RTE_FSMC_PCR4_ECCEN             0
-#define RTE_FSMC_PCR4_PWID              0
-#define RTE_FSMC_PCR4_PTYP              0
-#define RTE_FSMC_PCR4_PBKEN             0
-#define RTE_FSMC_PCR4_PWAITEN           0
-
-//       
-
-//        Interrupt configuration
-//         IFEN: Falling edge detection enable
-//         ILEN: High-level detection enable
-//         IREN: Rising edge detection enable
-#define RTE_FSMC_SR4_IFEN               0
-#define RTE_FSMC_SR4_ILEN               0
-#define RTE_FSMC_SR4_IREN               0
-
-//       
-
-//        Common memory space timing
-//          MEMHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          MEMWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access to. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset)
-//          MEMSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 2 HCLK cycles (for NAND Flash)
-//           1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset)
-#define RTE_FSMC_PMEM4_MEMHIZ           255
-#define RTE_FSMC_PMEM4_MEMHOLD          255
-#define RTE_FSMC_PMEM4_MEMWAIT          255
-#define RTE_FSMC_PMEM4_MEMSET           255
-
-//       
-
-//        Attribute memory space timing
-//          ATTHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a NAND Flash write access.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          ATTWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE,
-//           NOE), for NAND Flash read or write access. The duration for command assertion
-//           is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value.
-//           0000 0000: reserved
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
-//           1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT)
-//          ATTSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up address before the command
-//           assertion (NWE, NOE), for NAND Flash read or write access.
-//           0000 0000: 1 HCLK cycle
-//           1111 1111: 256 HCLK cycles (default value after reset)
-#define RTE_FSMC_PATT4_ATTHIZ           255
-#define RTE_FSMC_PATT4_ATTHOLD          255
-#define RTE_FSMC_PATT4_ATTWAIT          255
-#define RTE_FSMC_PATT4_ATTSET           255
-
-//       
-
-//        I/O space timing
-//          IOHIZ: Databus HiZ time <0-255>
-//           Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the
-//           start of a PC Card write access. Only valid for write transaction.
-//           0000 0000: 0 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          IOHOLD: Hold time <1-255>
-//           Defines the number of HCLK clock cycles to hold address (and data for write access) after
-//           the command deassertion (NWE, NOE), for PC Card read or write access.
-//           0000 0000: reserved
-//           0000 0001: 1 HCLK cycle
-//           1111 1111: 255 HCLK cycles (default value after reset)
-//          IOWAIT: Wait time <1-255>
-//           Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE,
-//           SMNOE), for PC Card read or write access. The duration for command assertion is
-//           extended if the wait signal (NWAIT) is active (low) at the end of the
-//           programmed value of HCLK.
-//           0000 0000: reserved, do not use this value
-//           0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT)
-//           1111 1111: 256 HCLK cycles
-//          IOSET: Setup time <0-255>
-//           Defines the number of HCLK (+1) clock cycles to set up the address before the command
-//           assertion (NWE, NOE), for PC Card read or write access.
-//           0000 0000: 1 HCLK cycle
-//           1111 1111: 256 HCLK cycles (default value after reset)
-#define RTE_FSMC_PIO4_IOHIZ             255
-#define RTE_FSMC_PIO4_IOHOLD            255
-#define RTE_FSMC_PIO4_IOWAIT            255
-#define RTE_FSMC_PIO4_IOSET             255
-
-//       
-
-//     
-
-//   
-
-// 
-
-
-#endif  /* __RTE_DEVICE_H */
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s
deleted file mode 100644
index d398143e..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s
+++ /dev/null
@@ -1,419 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f2xx.s
-;* Author             : MCD Application Team
-;* Version            : V1.0.0
-;* Date               : 18-April-2011
-;* Description        : STM32F2xx devices vector table for MDK-ARM toolchain. 
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Set the initial PC == Reset_Handler
-;*                      - Set the vector table entries with the exceptions ISR address
-;*                      - Branches to __main in the C library (which eventually
-;*                        calls main()).
-;*                      After Reset the CortexM3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;* <<< Use Configuration Wizard in Context Menu >>>   
-;*******************************************************************************
-; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-
-; Amount of memory (in bytes) allocated for Stack
-; Tailor this value to your application needs
-;  Stack Configuration
-;    Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; 
-
-Stack_Size      EQU     0x00000400
-
-                AREA    STACK, NOINIT, READWRITE, ALIGN=3
-Stack_Mem       SPACE   Stack_Size
-__initial_sp
-
-
-;  Heap Configuration
-;     Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; 
-
-Heap_Size       EQU     0x00007000
-
-                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
-__heap_base
-Heap_Mem        SPACE   Heap_Size
-__heap_limit
-
-                PRESERVE8
-                THUMB
-
-
-; Vector Table Mapped to Address 0 at Reset
-                AREA    RESET, DATA, READONLY
-                EXPORT  __Vectors
-                EXPORT  __Vectors_End
-                EXPORT  __Vectors_Size
-
-__Vectors       DCD     __initial_sp               ; Top of Stack
-                DCD     Reset_Handler              ; Reset Handler
-                DCD     NMI_Handler                ; NMI Handler
-                DCD     HardFault_Handler          ; Hard Fault Handler
-                DCD     MemManage_Handler          ; MPU Fault Handler
-                DCD     BusFault_Handler           ; Bus Fault Handler
-                DCD     UsageFault_Handler         ; Usage Fault Handler
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     SVC_Handler                ; SVCall Handler
-                DCD     DebugMon_Handler           ; Debug Monitor Handler
-                DCD     0                          ; Reserved
-                DCD     PendSV_Handler             ; PendSV Handler
-                DCD     SysTick_Handler            ; SysTick Handler
-
-                ; External Interrupts
-                DCD     WWDG_IRQHandler                   ; Window WatchDog                                        
-                DCD     PVD_IRQHandler                    ; PVD through EXTI Line detection                        
-                DCD     TAMP_STAMP_IRQHandler             ; Tamper and TimeStamps through the EXTI line            
-                DCD     RTC_WKUP_IRQHandler               ; RTC Wakeup through the EXTI line                       
-                DCD     FLASH_IRQHandler                  ; FLASH                                           
-                DCD     RCC_IRQHandler                    ; RCC                                             
-                DCD     EXTI0_IRQHandler                  ; EXTI Line0                                             
-                DCD     EXTI1_IRQHandler                  ; EXTI Line1                                             
-                DCD     EXTI2_IRQHandler                  ; EXTI Line2                                             
-                DCD     EXTI3_IRQHandler                  ; EXTI Line3                                             
-                DCD     EXTI4_IRQHandler                  ; EXTI Line4                                             
-                DCD     DMA1_Stream0_IRQHandler           ; DMA1 Stream 0                                   
-                DCD     DMA1_Stream1_IRQHandler           ; DMA1 Stream 1                                   
-                DCD     DMA1_Stream2_IRQHandler           ; DMA1 Stream 2                                   
-                DCD     DMA1_Stream3_IRQHandler           ; DMA1 Stream 3                                   
-                DCD     DMA1_Stream4_IRQHandler           ; DMA1 Stream 4                                   
-                DCD     DMA1_Stream5_IRQHandler           ; DMA1 Stream 5                                   
-                DCD     DMA1_Stream6_IRQHandler           ; DMA1 Stream 6                                   
-                DCD     ADC_IRQHandler                    ; ADC1, ADC2 and ADC3s                            
-                DCD     CAN1_TX_IRQHandler                ; CAN1 TX                                                
-                DCD     CAN1_RX0_IRQHandler               ; CAN1 RX0                                               
-                DCD     CAN1_RX1_IRQHandler               ; CAN1 RX1                                               
-                DCD     CAN1_SCE_IRQHandler               ; CAN1 SCE                                               
-                DCD     EXTI9_5_IRQHandler                ; External Line[9:5]s                                    
-                DCD     TIM1_BRK_TIM9_IRQHandler          ; TIM1 Break and TIM9                   
-                DCD     TIM1_UP_TIM10_IRQHandler          ; TIM1 Update and TIM10                 
-                DCD     TIM1_TRG_COM_TIM11_IRQHandler     ; TIM1 Trigger and Commutation and TIM11
-                DCD     TIM1_CC_IRQHandler                ; TIM1 Capture Compare                                   
-                DCD     TIM2_IRQHandler                   ; TIM2                                            
-                DCD     TIM3_IRQHandler                   ; TIM3                                            
-                DCD     TIM4_IRQHandler                   ; TIM4                                            
-                DCD     I2C1_EV_IRQHandler                ; I2C1 Event                                             
-                DCD     I2C1_ER_IRQHandler                ; I2C1 Error                                             
-                DCD     I2C2_EV_IRQHandler                ; I2C2 Event                                             
-                DCD     I2C2_ER_IRQHandler                ; I2C2 Error                                               
-                DCD     SPI1_IRQHandler                   ; SPI1                                            
-                DCD     SPI2_IRQHandler                   ; SPI2                                            
-                DCD     USART1_IRQHandler                 ; USART1                                          
-                DCD     USART2_IRQHandler                 ; USART2                                          
-                DCD     USART3_IRQHandler                 ; USART3                                          
-                DCD     EXTI15_10_IRQHandler              ; External Line[15:10]s                                  
-                DCD     RTC_Alarm_IRQHandler              ; RTC Alarm (A and B) through EXTI Line                  
-                DCD     OTG_FS_WKUP_IRQHandler            ; USB OTG FS Wakeup through EXTI line                        
-                DCD     TIM8_BRK_TIM12_IRQHandler         ; TIM8 Break and TIM12                  
-                DCD     TIM8_UP_TIM13_IRQHandler          ; TIM8 Update and TIM13                 
-                DCD     TIM8_TRG_COM_TIM14_IRQHandler     ; TIM8 Trigger and Commutation and TIM14
-                DCD     TIM8_CC_IRQHandler                ; TIM8 Capture Compare                                   
-                DCD     DMA1_Stream7_IRQHandler           ; DMA1 Stream7                                           
-                DCD     FSMC_IRQHandler                   ; FSMC                                            
-                DCD     SDIO_IRQHandler                   ; SDIO                                            
-                DCD     TIM5_IRQHandler                   ; TIM5                                            
-                DCD     SPI3_IRQHandler                   ; SPI3                                            
-                DCD     UART4_IRQHandler                  ; UART4                                           
-                DCD     UART5_IRQHandler                  ; UART5                                           
-                DCD     TIM6_DAC_IRQHandler               ; TIM6 and DAC1&2 underrun errors                   
-                DCD     TIM7_IRQHandler                   ; TIM7                   
-                DCD     DMA2_Stream0_IRQHandler           ; DMA2 Stream 0                                   
-                DCD     DMA2_Stream1_IRQHandler           ; DMA2 Stream 1                                   
-                DCD     DMA2_Stream2_IRQHandler           ; DMA2 Stream 2                                   
-                DCD     DMA2_Stream3_IRQHandler           ; DMA2 Stream 3                                   
-                DCD     DMA2_Stream4_IRQHandler           ; DMA2 Stream 4                                   
-                DCD     ETH_IRQHandler                    ; Ethernet                                        
-                DCD     ETH_WKUP_IRQHandler               ; Ethernet Wakeup through EXTI line                      
-                DCD     CAN2_TX_IRQHandler                ; CAN2 TX                                                
-                DCD     CAN2_RX0_IRQHandler               ; CAN2 RX0                                               
-                DCD     CAN2_RX1_IRQHandler               ; CAN2 RX1                                               
-                DCD     CAN2_SCE_IRQHandler               ; CAN2 SCE                                               
-                DCD     OTG_FS_IRQHandler                 ; USB OTG FS                                      
-                DCD     DMA2_Stream5_IRQHandler           ; DMA2 Stream 5                                   
-                DCD     DMA2_Stream6_IRQHandler           ; DMA2 Stream 6                                   
-                DCD     DMA2_Stream7_IRQHandler           ; DMA2 Stream 7                                   
-                DCD     USART6_IRQHandler                 ; USART6                                           
-                DCD     I2C3_EV_IRQHandler                ; I2C3 event                                             
-                DCD     I2C3_ER_IRQHandler                ; I2C3 error                                             
-                DCD     OTG_HS_EP1_OUT_IRQHandler         ; USB OTG HS End Point 1 Out                      
-                DCD     OTG_HS_EP1_IN_IRQHandler          ; USB OTG HS End Point 1 In                       
-                DCD     OTG_HS_WKUP_IRQHandler            ; USB OTG HS Wakeup through EXTI                         
-                DCD     OTG_HS_IRQHandler                 ; USB OTG HS                                      
-                DCD     DCMI_IRQHandler                   ; DCMI                                            
-                DCD     CRYP_IRQHandler                   ; CRYP crypto                                     
-                DCD     HASH_RNG_IRQHandler               ; Hash and Rng 
-__Vectors_End
-
-__Vectors_Size  EQU  __Vectors_End - __Vectors
-
-                AREA    |.text|, CODE, READONLY
-
-; Reset handler
-Reset_Handler    PROC
-                 EXPORT  Reset_Handler             [WEAK]
-        IMPORT  SystemInit
-        IMPORT  __main
-                 LDR     R0, =SystemInit
-                 BLX     R0
-                 LDR     R0, =__main
-                 BX      R0
-                 ENDP
-
-; Dummy Exception Handlers (infinite loops which can be modified)
-
-NMI_Handler     PROC
-                EXPORT  NMI_Handler                [WEAK]
-                B       .
-                ENDP
-HardFault_Handler\
-                PROC
-                EXPORT  HardFault_Handler          [WEAK]
-                B       .
-                ENDP
-MemManage_Handler\
-                PROC
-                EXPORT  MemManage_Handler          [WEAK]
-                B       .
-                ENDP
-BusFault_Handler\
-                PROC
-                EXPORT  BusFault_Handler           [WEAK]
-                B       .
-                ENDP
-UsageFault_Handler\
-                PROC
-                EXPORT  UsageFault_Handler         [WEAK]
-                B       .
-                ENDP
-SVC_Handler     PROC
-                EXPORT  SVC_Handler                [WEAK]
-                B       .
-                ENDP
-DebugMon_Handler\
-                PROC
-                EXPORT  DebugMon_Handler           [WEAK]
-                B       .
-                ENDP
-PendSV_Handler  PROC
-                EXPORT  PendSV_Handler             [WEAK]
-                B       .
-                ENDP
-SysTick_Handler PROC
-                EXPORT  SysTick_Handler            [WEAK]
-                B       .
-                ENDP
-
-Default_Handler PROC
-
-                EXPORT  WWDG_IRQHandler                   [WEAK]                                        
-                EXPORT  PVD_IRQHandler                    [WEAK]                      
-                EXPORT  TAMP_STAMP_IRQHandler             [WEAK]         
-                EXPORT  RTC_WKUP_IRQHandler               [WEAK]                     
-                EXPORT  FLASH_IRQHandler                  [WEAK]                                         
-                EXPORT  RCC_IRQHandler                    [WEAK]                                            
-                EXPORT  EXTI0_IRQHandler                  [WEAK]                                            
-                EXPORT  EXTI1_IRQHandler                  [WEAK]                                             
-                EXPORT  EXTI2_IRQHandler                  [WEAK]                                            
-                EXPORT  EXTI3_IRQHandler                  [WEAK]                                           
-                EXPORT  EXTI4_IRQHandler                  [WEAK]                                            
-                EXPORT  DMA1_Stream0_IRQHandler           [WEAK]                                
-                EXPORT  DMA1_Stream1_IRQHandler           [WEAK]                                   
-                EXPORT  DMA1_Stream2_IRQHandler           [WEAK]                                   
-                EXPORT  DMA1_Stream3_IRQHandler           [WEAK]                                   
-                EXPORT  DMA1_Stream4_IRQHandler           [WEAK]                                   
-                EXPORT  DMA1_Stream5_IRQHandler           [WEAK]                                   
-                EXPORT  DMA1_Stream6_IRQHandler           [WEAK]                                   
-                EXPORT  ADC_IRQHandler                    [WEAK]                         
-                EXPORT  CAN1_TX_IRQHandler                [WEAK]                                                
-                EXPORT  CAN1_RX0_IRQHandler               [WEAK]                                               
-                EXPORT  CAN1_RX1_IRQHandler               [WEAK]                                                
-                EXPORT  CAN1_SCE_IRQHandler               [WEAK]                                                
-                EXPORT  EXTI9_5_IRQHandler                [WEAK]                                    
-                EXPORT  TIM1_BRK_TIM9_IRQHandler          [WEAK]                  
-                EXPORT  TIM1_UP_TIM10_IRQHandler          [WEAK]                
-                EXPORT  TIM1_TRG_COM_TIM11_IRQHandler     [WEAK] 
-                EXPORT  TIM1_CC_IRQHandler                [WEAK]                                   
-                EXPORT  TIM2_IRQHandler                   [WEAK]                                            
-                EXPORT  TIM3_IRQHandler                   [WEAK]                                            
-                EXPORT  TIM4_IRQHandler                   [WEAK]                                            
-                EXPORT  I2C1_EV_IRQHandler                [WEAK]                                             
-                EXPORT  I2C1_ER_IRQHandler                [WEAK]                                             
-                EXPORT  I2C2_EV_IRQHandler                [WEAK]                                            
-                EXPORT  I2C2_ER_IRQHandler                [WEAK]                                               
-                EXPORT  SPI1_IRQHandler                   [WEAK]                                           
-                EXPORT  SPI2_IRQHandler                   [WEAK]                                            
-                EXPORT  USART1_IRQHandler                 [WEAK]                                          
-                EXPORT  USART2_IRQHandler                 [WEAK]                                          
-                EXPORT  USART3_IRQHandler                 [WEAK]                                         
-                EXPORT  EXTI15_10_IRQHandler              [WEAK]                                  
-                EXPORT  RTC_Alarm_IRQHandler              [WEAK]                  
-                EXPORT  OTG_FS_WKUP_IRQHandler            [WEAK]                        
-                EXPORT  TIM8_BRK_TIM12_IRQHandler         [WEAK]                 
-                EXPORT  TIM8_UP_TIM13_IRQHandler          [WEAK]                 
-                EXPORT  TIM8_TRG_COM_TIM14_IRQHandler     [WEAK] 
-                EXPORT  TIM8_CC_IRQHandler                [WEAK]                                   
-                EXPORT  DMA1_Stream7_IRQHandler           [WEAK]                                          
-                EXPORT  FSMC_IRQHandler                   [WEAK]                                             
-                EXPORT  SDIO_IRQHandler                   [WEAK]                                             
-                EXPORT  TIM5_IRQHandler                   [WEAK]                                             
-                EXPORT  SPI3_IRQHandler                   [WEAK]                                             
-                EXPORT  UART4_IRQHandler                  [WEAK]                                            
-                EXPORT  UART5_IRQHandler                  [WEAK]                                            
-                EXPORT  TIM6_DAC_IRQHandler               [WEAK]                   
-                EXPORT  TIM7_IRQHandler                   [WEAK]                    
-                EXPORT  DMA2_Stream0_IRQHandler           [WEAK]                                  
-                EXPORT  DMA2_Stream1_IRQHandler           [WEAK]                                   
-                EXPORT  DMA2_Stream2_IRQHandler           [WEAK]                                    
-                EXPORT  DMA2_Stream3_IRQHandler           [WEAK]                                    
-                EXPORT  DMA2_Stream4_IRQHandler           [WEAK]                                 
-                EXPORT  ETH_IRQHandler                    [WEAK]                                         
-                EXPORT  ETH_WKUP_IRQHandler               [WEAK]                     
-                EXPORT  CAN2_TX_IRQHandler                [WEAK]                                               
-                EXPORT  CAN2_RX0_IRQHandler               [WEAK]                                               
-                EXPORT  CAN2_RX1_IRQHandler               [WEAK]                                               
-                EXPORT  CAN2_SCE_IRQHandler               [WEAK]                                               
-                EXPORT  OTG_FS_IRQHandler                 [WEAK]                                       
-                EXPORT  DMA2_Stream5_IRQHandler           [WEAK]                                   
-                EXPORT  DMA2_Stream6_IRQHandler           [WEAK]                                   
-                EXPORT  DMA2_Stream7_IRQHandler           [WEAK]                                   
-                EXPORT  USART6_IRQHandler                 [WEAK]                                           
-                EXPORT  I2C3_EV_IRQHandler                [WEAK]                                              
-                EXPORT  I2C3_ER_IRQHandler                [WEAK]                                              
-                EXPORT  OTG_HS_EP1_OUT_IRQHandler         [WEAK]                      
-                EXPORT  OTG_HS_EP1_IN_IRQHandler          [WEAK]                      
-                EXPORT  OTG_HS_WKUP_IRQHandler            [WEAK]                        
-                EXPORT  OTG_HS_IRQHandler                 [WEAK]                                      
-                EXPORT  DCMI_IRQHandler                   [WEAK]                                             
-                EXPORT  CRYP_IRQHandler                   [WEAK]                                     
-                EXPORT  HASH_RNG_IRQHandler               [WEAK]
-
-WWDG_IRQHandler                                                       
-PVD_IRQHandler                                      
-TAMP_STAMP_IRQHandler                  
-RTC_WKUP_IRQHandler                                
-FLASH_IRQHandler                                                       
-RCC_IRQHandler                                                            
-EXTI0_IRQHandler                                                          
-EXTI1_IRQHandler                                                           
-EXTI2_IRQHandler                                                          
-EXTI3_IRQHandler                                                         
-EXTI4_IRQHandler                                                          
-DMA1_Stream0_IRQHandler                                       
-DMA1_Stream1_IRQHandler                                          
-DMA1_Stream2_IRQHandler                                          
-DMA1_Stream3_IRQHandler                                          
-DMA1_Stream4_IRQHandler                                          
-DMA1_Stream5_IRQHandler                                          
-DMA1_Stream6_IRQHandler                                          
-ADC_IRQHandler                                         
-CAN1_TX_IRQHandler                                                            
-CAN1_RX0_IRQHandler                                                          
-CAN1_RX1_IRQHandler                                                           
-CAN1_SCE_IRQHandler                                                           
-EXTI9_5_IRQHandler                                                
-TIM1_BRK_TIM9_IRQHandler                        
-TIM1_UP_TIM10_IRQHandler                      
-TIM1_TRG_COM_TIM11_IRQHandler  
-TIM1_CC_IRQHandler                                               
-TIM2_IRQHandler                                                           
-TIM3_IRQHandler                                                           
-TIM4_IRQHandler                                                           
-I2C1_EV_IRQHandler                                                         
-I2C1_ER_IRQHandler                                                         
-I2C2_EV_IRQHandler                                                        
-I2C2_ER_IRQHandler                                                           
-SPI1_IRQHandler                                                          
-SPI2_IRQHandler                                                           
-USART1_IRQHandler                                                       
-USART2_IRQHandler                                                       
-USART3_IRQHandler                                                      
-EXTI15_10_IRQHandler                                            
-RTC_Alarm_IRQHandler                            
-OTG_FS_WKUP_IRQHandler                                
-TIM8_BRK_TIM12_IRQHandler                      
-TIM8_UP_TIM13_IRQHandler                       
-TIM8_TRG_COM_TIM14_IRQHandler  
-TIM8_CC_IRQHandler                                               
-DMA1_Stream7_IRQHandler                                                 
-FSMC_IRQHandler                                                            
-SDIO_IRQHandler                                                            
-TIM5_IRQHandler                                                            
-SPI3_IRQHandler                                                            
-UART4_IRQHandler                                                          
-UART5_IRQHandler                                                          
-TIM6_DAC_IRQHandler                            
-TIM7_IRQHandler                              
-DMA2_Stream0_IRQHandler                                         
-DMA2_Stream1_IRQHandler                                          
-DMA2_Stream2_IRQHandler                                           
-DMA2_Stream3_IRQHandler                                           
-DMA2_Stream4_IRQHandler                                        
-ETH_IRQHandler                                                         
-ETH_WKUP_IRQHandler                                
-CAN2_TX_IRQHandler                                                           
-CAN2_RX0_IRQHandler                                                          
-CAN2_RX1_IRQHandler                                                          
-CAN2_SCE_IRQHandler                                                          
-OTG_FS_IRQHandler                                                    
-DMA2_Stream5_IRQHandler                                          
-DMA2_Stream6_IRQHandler                                          
-DMA2_Stream7_IRQHandler                                          
-USART6_IRQHandler                                                        
-I2C3_EV_IRQHandler                                                          
-I2C3_ER_IRQHandler                                                          
-OTG_HS_EP1_OUT_IRQHandler                           
-OTG_HS_EP1_IN_IRQHandler                            
-OTG_HS_WKUP_IRQHandler                                
-OTG_HS_IRQHandler                                                   
-DCMI_IRQHandler                                                            
-CRYP_IRQHandler                                                    
-HASH_RNG_IRQHandler                                               
-
-                B       .
-
-                ENDP
-
-                ALIGN
-
-;*******************************************************************************
-; User Stack and Heap initialization
-;*******************************************************************************
-                 IF      :DEF:__MICROLIB
-                
-                 EXPORT  __initial_sp
-                 EXPORT  __heap_base
-                 EXPORT  __heap_limit
-                
-                 ELSE
-                
-                 IMPORT  __use_two_region_memory
-                 EXPORT  __user_initial_stackheap
-                 
-__user_initial_stackheap
-
-                 LDR     R0, =  Heap_Mem
-                 LDR     R1, =(Stack_Mem + Stack_Size)
-                 LDR     R2, = (Heap_Mem +  Heap_Size)
-                 LDR     R3, = Stack_Mem
-                 BX      LR
-
-                 ALIGN
-
-                 ENDIF
-
-                 END
-
-;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE*****
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c
deleted file mode 100644
index da0e189c..00000000
--- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c
+++ /dev/null
@@ -1,536 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    system_stm32f2xx.c
-  * @author  MCD Application Team
-  * @version V1.0.0
-  * @date    18-April-2011
-  * @brief   CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
-  *          This file contains the system clock configuration for STM32F2xx devices,
-  *          and is generated by the clock configuration tool
-  *          "STM32f2xx_Clock_Configuration_V1.0.0.xls"
-  *             
-  * 1.  This file provides two functions and one global variable to be called from 
-  *     user application:
-  *      - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
-  *                      and Divider factors, AHB/APBx prescalers and Flash settings),
-  *                      depending on the configuration made in the clock xls tool. 
-  *                      This function is called at startup just after reset and 
-  *                      before branch to main program. This call is made inside
-  *                      the "startup_stm32f2xx.s" file.
-  *
-  *      - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
-  *                                  by the user application to setup the SysTick 
-  *                                  timer or configure other parameters.
-  *                                     
-  *      - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
-  *                                 be called whenever the core clock is changed
-  *                                 during program execution.
-  *
-  * 2. After each device reset the HSI (16 MHz) is used as system clock source.
-  *    Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to
-  *    configure the system clock before to branch to main program.
-  *
-  * 3. If the system clock source selected by user fails to startup, the SystemInit()
-  *    function will do nothing and HSI still used as system clock source. User can 
-  *    add some code to deal with this issue inside the SetSysClock() function.
-  *
-  * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define
-  *    in "stm32f2xx.h" file. When HSE is used as system clock source, directly or
-  *    through PLL, and you are using different crystal you have to adapt the HSE
-  *    value to your own configuration.
-  *
-  * 5. This file configures the system clock as follows:
-  *=============================================================================
-  *=============================================================================
-  *        Supported STM32F2xx device revision    | Rev B and Y
-  *-----------------------------------------------------------------------------
-  *        System Clock source                    | PLL (HSE)
-  *-----------------------------------------------------------------------------
-  *        SYSCLK(Hz)                             | 120000000
-  *-----------------------------------------------------------------------------
-  *        HCLK(Hz)                               | 120000000
-  *-----------------------------------------------------------------------------
-  *        AHB Prescaler                          | 1
-  *-----------------------------------------------------------------------------
-  *        APB1 Prescaler                         | 4
-  *-----------------------------------------------------------------------------
-  *        APB2 Prescaler                         | 2
-  *-----------------------------------------------------------------------------
-  *        HSE Frequency(Hz)                      | 25000000
-  *-----------------------------------------------------------------------------
-  *        PLL_M                                  | 25
-  *-----------------------------------------------------------------------------
-  *        PLL_N                                  | 240
-  *-----------------------------------------------------------------------------
-  *        PLL_P                                  | 2
-  *-----------------------------------------------------------------------------
-  *        PLL_Q                                  | 5
-  *-----------------------------------------------------------------------------
-  *        PLLI2S_N                               | NA
-  *-----------------------------------------------------------------------------
-  *        PLLI2S_R                               | NA
-  *-----------------------------------------------------------------------------
-  *        I2S input clock                        | NA
-  *-----------------------------------------------------------------------------
-  *        VDD(V)                                 | 3.3
-  *-----------------------------------------------------------------------------
-  *        Flash Latency(WS)                      | 3
-  *-----------------------------------------------------------------------------
-  *        Prefetch Buffer                        | ON
-  *-----------------------------------------------------------------------------
-  *        Instruction cache                      | ON
-  *-----------------------------------------------------------------------------
-  *        Data cache                             | ON
-  *-----------------------------------------------------------------------------
-  *        Require 48MHz for USB OTG FS,          | Enabled
-  *        SDIO and RNG clock                     |
-  *-----------------------------------------------------------------------------
-  *=============================================================================
-  ****************************************************************************** 
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * 

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c deleted file mode 100644 index 6b9dc8e0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config.c +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config.c - * Purpose: Network Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Definitions -// Global Network System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "my_host" -#define NET_HOST_NAME "my_host" - -// Memory Pool size <1536-262144:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// Network packets are allocated from this memory pool. -// Default: 12000 bytes -#define NET_MEM_SIZE 3000 - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_Network_Interface_ETH_0 -#include "Net_Config_ETH_0.h" -#endif -#ifdef RTE_Network_Interface_ETH_1 -#include "Net_Config_ETH_1.h" -#endif - -#ifdef RTE_Network_Interface_PPP_0 -#include "Net_Config_PPP_0.h" -#endif -#ifdef RTE_Network_Interface_PPP_1 -#include "Net_Config_PPP_1.h" -#endif - -#ifdef RTE_Network_Interface_SLIP_0 -#include "Net_Config_SLIP_0.h" -#endif -#ifdef RTE_Network_Interface_SLIP_1 -#include "Net_Config_SLIP_1.h" -#endif - -#ifdef RTE_Network_Socket_UDP -#include "Net_Config_UDP.h" -#endif -#ifdef RTE_Network_Socket_TCP -#include "Net_Config_TCP.h" -#endif -#ifdef RTE_Network_Socket_BSD -#include "Net_Config_BSD.h" -#endif - -#ifdef RTE_Network_Web_Server_RO -#include "Net_Config_HTTP_Server.h" -#endif -#ifdef RTE_Network_Web_Server_FS -#include "Net_Config_HTTP_Server.h" -#endif - -#ifdef RTE_Network_Telnet_Server -#include "Net_Config_Telnet_Server.h" -#endif - -#ifdef RTE_Network_TFTP_Server -#include "Net_Config_TFTP_Server.h" -#endif -#ifdef RTE_Network_TFTP_Client -#include "Net_Config_TFTP_Client.h" -#endif - -#ifdef RTE_Network_FTP_Server -#include "Net_Config_FTP_Server.h" -#endif -#ifdef RTE_Network_FTP_Client -#include "Net_Config_FTP_Client.h" -#endif - -#ifdef RTE_Network_DNS_Client -#include "Net_Config_DNS_Client.h" -#endif - -#ifdef RTE_Network_SMTP_Client -#include "Net_Config_SMTP_Client.h" -#endif - -#ifdef RTE_Network_SNMP_Agent -#include "Net_Config_SNMP_Agent.h" -#endif - -#ifdef RTE_Network_SNTP_Client -#include "Net_Config_SNTP_Client.h" -#endif - -#include "net_config.h" - -/** -\addtogroup net_genFunc -@{ -*/ -/** - \fn void net_sys_error (ERROR_CODE error) - \ingroup net_cores - \brief Network system error handler. -*/ -void net_sys_error (ERROR_CODE error) { - /* This function is called when a fatal error is encountered. */ - /* The normal program execution is not possible anymore. */ - - switch (error) { - case ERR_MEM_ALLOC: - /* Out of memory */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer Corrupted */ - /* More data written than the size of allocated mem block */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state */ - break; - } - - /* End-less loop */ - while (1); -} -/** -@} -*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h deleted file mode 100644 index d7e6a614..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_BSD.h - * Purpose: Network Configuration BSD Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Berkley (BSD) Sockets -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUM_SOCKS 7 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SERVER_SOCKS 1 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RECEIVE_TOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_HOSTNAME_ENABLE 0 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h deleted file mode 100644 index d30b7180..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Service - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_DNS_Client.h - * Purpose: Network Configuration DNS Client - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// DNS Client -#define DNS_CLIENT_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_CLIENT_TAB_SIZE 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h deleted file mode 100644 index 7be57ad6..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Interface - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_ETH_0.h - * Purpose: Network Configuration ETH Interface - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Ethernet Network Interface 0 -#define ETH0_ENABLE 1 - -// Connect to hardware via Driver_ETH# <0-255> -// Select driver control block for MAC and PHY interface -#define ETH0_DRIVER 1 - -// MAC Address -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x1E -#define ETH0_MAC1 0x1E - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define ETH0_MAC2 0x30 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define ETH0_MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0xA2 -#define ETH0_MAC4 0xA2 - -// Address byte 5 <0x00-0xff> -// Default: 0x45 -#define ETH0_MAC5 0x45 - -// Address byte 6 <0x00-0xff> -// Default: 0x5E -#define ETH0_MAC6 0x5E -// - -// IP Address -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define ETH0_IP4 100 -// - -// Subnet mask -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define ETH0_MASK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define ETH0_MASK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define ETH0_MASK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define ETH0_MASK4 0 -// - -// Default Gateway -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define ETH0_GW4 254 -// - -// Primary DNS Server -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_PRI_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_PRI_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_PRI_DNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define ETH0_PRI_DNS4 129 -// - -// Secondary DNS Server -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_SEC_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_SEC_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_SEC_DNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define ETH0_SEC_DNS4 130 -// - -// ARP Definitions -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ETH0_ARP_TAB_SIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ETH0_ARP_CACHE_TOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ETH0_ARP_MAX_RETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ETH0_ARP_RESEND_TOUT 2 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ETH0_ARP_NOTIFY 0 -// - -// IGMP Group Management -// Enable or disable Internet Group Management Protocol -#define ETH0_IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define ETH0_IGMP_TAB_SIZE 5 -// - -// NetBIOS Name Service -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define ETH0_NBNS_ENABLE 1 - -// Dynamic Host Configuration -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define ETH0_DHCP_ENABLE 1 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define ETH0_DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_BOOTFILE 0 - -// NTP Servers -// This value is optional. If enabled, a list of NTP Servers -// (option 42) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_NTP_SERVERS 0 -// - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h deleted file mode 100644 index e659ce92..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_TCP.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_TCP.h - * Purpose: Network Configuration TCP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUM_SOCKS 10 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAX_RETRY 5 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRY_TOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFAULT_TOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAX_SEG_SIZE 1460 - -// Receive Window Size <536-65535> -// Receive Window Size specifies the size of data, -// that the socket is able to buffer in flow-control mode. -// Default: 4380 -#define TCP_RECEIVE_WIN_SIZE 4380 - -// - -// TCP Initial Retransmit period in seconds -#define TCP_INITIAL_RETRY_TOUT 1 - -// TCP SYN frame retransmit period in seconds -#define TCP_SYN_RETRY_TOUT 2 - -// Number of retries to establish a connection -#define TCP_CONNECT_RETRY 7 - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h deleted file mode 100644 index b7995c22..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_UDP.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_UDP.h - * Purpose: Network Configuration UDP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-20> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUM_SOCKS 10 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c deleted file mode 100644 index 735089a4..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Debug.c - * Purpose: Network Debug Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Print Time Stamp -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 0 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 0 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 1 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 1 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Time debug messages -#define DBG_SNTP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 1 -// - -// Application Debug Definitions -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP_SERVER 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP_SERVER 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTP_CLIENT 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TELNET_SERVER 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP_SERVER 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTP_CLIENT 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP_CLIENT 1 -// - - -#include "net_debug.h" - - -/** - \fn void net_debug_init (void) - \brief Initialize Network Debug Interface. -*/ -void net_debug_init (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h deleted file mode 100644 index 938bd18e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/RTE/RTE_Components.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'simpleClient' - * Target: 'SimpleClient' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ -#define RTE_Network_Core /* Network Core */ - #define RTE_Network_Debug /* Network Debug Version */ -#define RTE_Network_DNS_Client /* Network DNS Client */ -#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ -#define RTE_Network_Socket_BSD /* Network Socket BSD */ -#define RTE_Network_Socket_TCP /* Network Socket TCP */ -#define RTE_Network_Socket_UDP /* Network Socket UDP */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx deleted file mode 100644 index 93fced47..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/SimpleClient.uvoptx +++ /dev/null @@ -1,1422 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - SimpleClient - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - 0x20000408 - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 3 - 0 - 0 - 0 - 0 - .\client.c - client.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\config-SimpleClient.h - config-SimpleClient.h - 0 - 0 - - - 2 - 4 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 0 - 0 - - - 2 - 5 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 6 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 7 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 10 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 11 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 12 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 13 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - PHY_ST802RT1.c - 1 - 0 - - - 6 - 15 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - EMAC_STM32F2xx.c - 1 - 0 - - - 6 - 16 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 17 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 18 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 19 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::Network - 0 - 0 - 0 - 1 - - 8 - 20 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - Net_Dbg_CM3_L.lib - 1 - 0 - - - 8 - 21 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config.c - Net_Config.c - 1 - 0 - - - 8 - 22 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_BSD.h - Net_Config_BSD.h - 1 - 0 - - - 8 - 23 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_DNS_Client.h - Net_Config_DNS_Client.h - 1 - 0 - - - 8 - 24 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_ETH_0.h - Net_Config_ETH_0.h - 1 - 0 - - - 8 - 25 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_TCP.h - Net_Config_TCP.h - 1 - 0 - - - 8 - 26 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_UDP.h - Net_Config_UDP.h - 1 - 0 - - - 8 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Debug.c - Net_Debug.c - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 9 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 9 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 9 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 9 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 9 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 9 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 9 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 9 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 9 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 9 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 9 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 9 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 9 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 9 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 9 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 9 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 9 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 9 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 9 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 9 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 9 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 9 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 9 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 9 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 9 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 9 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 9 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 9 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 9 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 9 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 9 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 9 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 9 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 9 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 9 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - crl.c - 1 - 0 - - - 9 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - internal.c - 1 - 0 - - - 9 - 64 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - io.c - 1 - 0 - - - 9 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - keys.c - 1 - 0 - - - 9 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - ocsp.c - 1 - 0 - - - 9 - 67 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - sniffer.c - 1 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - ssl.c - 1 - 0 - - - 9 - 69 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - tls.c - 1 - 0 - - - 9 - 70 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 9 - 71 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 1 - 0 - - - 9 - 72 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config.h - config.h - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c deleted file mode 100644 index 1d1720dc..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/client.c +++ /dev/null @@ -1,758 +0,0 @@ -/* client.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - #define CYASSL_MDK_ARM -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) - /* in case memory tracker wants stats */ - #define CYASSL_TRACK_MEMORY -#endif - -#include -#include - -#include "examples/client/client.h" - -#define USE_CYASSL_MEMORY - -#ifdef CYASSL_CALLBACKS - int handShakeCB(HandShakeInfo*); - int timeoutCB(TimeoutInfo*); - Timeval timeout; -#endif - - -static void NonBlockingSSL_Connect(CYASSL* ssl) -{ -#ifndef CYASSL_CALLBACKS - int ret = CyaSSL_connect(ssl); -#else - int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); -#endif - int error = CyaSSL_get_error(ssl, 0); - SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); - int select_ret; - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; - - if (error == SSL_ERROR_WANT_READ) - printf("... client would read block\n"); - else - printf("... client would write block\n"); - -#ifdef CYASSL_DTLS - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); -#endif - select_ret = tcp_select(sockfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - #ifndef CYASSL_CALLBACKS - ret = CyaSSL_connect(ssl); - #else - ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); - #endif - error = CyaSSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } -#ifdef CYASSL_DTLS - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } -#endif - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) - err_sys("SSL_connect failed"); -} - - -static void Usage(void) -{ - printf("client " LIBCYASSL_VERSION_STRING - " NOTE: All files relative to CyaSSL home dir\n"); - printf("-? Help, print this usage\n"); - printf("-h Host to connect to, default %s\n", yasslIP); - printf("-p Port to connect on, not 0, default %d\n", yasslPort); - printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", - CLIENT_DEFAULT_VERSION); - printf("-l Cipher list\n"); - printf("-c Certificate file, default %s\n", cliCert); - printf("-k Key file, default %s\n", cliKey); - printf("-A Certificate Authority file, default %s\n", caCert); - printf("-b Benchmark connections and print stats\n"); - printf("-s Use pre Shared keys\n"); - printf("-t Track CyaSSL memory use\n"); - printf("-d Disable peer checks\n"); - printf("-g Send server HTTP GET\n"); - printf("-u Use UDP DTLS," - " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); - printf("-m Match domain name in cert\n"); - printf("-N Use Non-blocking sockets\n"); - printf("-r Resume session\n"); - printf("-f Fewer packets/group messages\n"); - printf("-x Disable client cert/key loading\n"); -#ifdef SHOW_SIZES - printf("-z Print structure sizes\n"); -#endif - printf("-S Use Host Name Indication\n"); -} - -#ifdef CYASSL_MDK_SHELL -#define exit(code) return(code) -#endif - -#ifdef CYASSL_MDK_SHELL - #define exit(code) return(code) -#endif - - -THREAD_RETURN CYASSL_THREAD client_test(void* args) -{ - SOCKET_T sockfd = 0; - - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - CYASSL* ssl = 0; - - CYASSL* sslResume = 0; - CYASSL_SESSION* session = 0; - char resumeMsg[] = "resuming cyassl!"; - int resumeSz = sizeof(resumeMsg); - - char msg[32] = "hello cyassl!"; /* GET may make bigger */ - char reply[80]; - int input; - int msgSz = (int)strlen(msg); - - int port = yasslPort; - char* host = (char*)yasslIP; - char* domain = (char*)"www.yassl.com"; - - int ch; - int version = CLIENT_INVALID_VERSION; - int usePsk = 0; - int sendGET = 0; - int benchmark = 0; - int doDTLS = 0; - int matchName = 0; - int doPeerCheck = 1; - int nonBlocking = 0; - int resumeSession = 0; - int trackMemory = 0; - int useClientCert = 1; - int fewerPackets = 0; - char* cipherList = NULL; - char* verifyCert = (char*)caCert; - char* ourCert = (char*)cliCert; - char* ourKey = (char*)cliKey; - -#ifdef HAVE_SNI - char* sniHostName = NULL; -#endif - - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef NO_RSA - verifyCert = (char*)eccCert; - ourCert = (char*)cliEccCert; - ourKey = (char*)cliEccKey; -#endif - (void)resumeSz; - (void)session; - (void)sslResume; - (void)trackMemory; - - while ((ch = mygetopt(argc, argv, "?gdusmNrtfxh:p:v:l:A:c:k:b:zS:")) != -1){ - switch (ch) { - case '?' : - Usage(); - exit(EXIT_SUCCESS); - - case 'g' : - sendGET = 1; - break; - - case 'd' : - doPeerCheck = 0; - break; - - case 'u' : - doDTLS = 1; - break; - - case 's' : - usePsk = 1; - break; - - case 't' : - #ifdef USE_CYASSL_MEMORY - trackMemory = 1; - #endif - break; - - case 'm' : - matchName = 1; - break; - - case 'x' : - useClientCert = 0; - break; - - case 'f' : - fewerPackets = 1; - break; - - case 'h' : - host = myoptarg; - domain = myoptarg; - break; - - case 'p' : - port = atoi(myoptarg); - #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) - if (port == 0) - err_sys("port number cannot be 0"); - #endif - break; - - case 'v' : - version = atoi(myoptarg); - if (version < 0 || version > 3) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'l' : - cipherList = myoptarg; - break; - - case 'A' : - verifyCert = myoptarg; - break; - - case 'c' : - ourCert = myoptarg; - break; - - case 'k' : - ourKey = myoptarg; - break; - - case 'b' : - benchmark = atoi(myoptarg); - if (benchmark < 0 || benchmark > 1000000) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'N' : - nonBlocking = 1; - break; - - case 'r' : - resumeSession = 1; - break; - - case 'z' : - #ifndef CYASSL_LEANPSK - CyaSSL_GetObjectSize(); - #endif - break; - - case 'S' : - #ifdef HAVE_SNI - sniHostName = myoptarg; - #endif - break; - - default: - Usage(); - exit(MY_EX_USAGE); - } - } - - myoptind = 0; /* reset for test cases */ - - /* sort out DTLS versus TLS versions */ - if (version == CLIENT_INVALID_VERSION) { - if (doDTLS) - version = CLIENT_DTLS_DEFAULT_VERSION; - else - version = CLIENT_DEFAULT_VERSION; - } - else { - if (doDTLS) { - if (version == 3) - version = -2; - else - version = -1; - } - } - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - InitMemoryTracker(); -#endif - - switch (version) { -#ifndef NO_OLD_TLS - case 0: - method = CyaSSLv3_client_method(); - break; - - - #ifndef NO_TLS - case 1: - method = CyaTLSv1_client_method(); - break; - - case 2: - method = CyaTLSv1_1_client_method(); - break; - #endif /* NO_TLS */ - -#endif /* NO_OLD_TLS */ - -#ifndef NO_TLS - case 3: - method = CyaTLSv1_2_client_method(); - break; -#endif - -#ifdef CYASSL_DTLS - case -1: - method = CyaDTLSv1_client_method(); - break; - - case -2: - method = CyaDTLSv1_2_client_method(); - break; -#endif - - default: - err_sys("Bad SSL version"); - break; - } - - if (method == NULL) - err_sys("unable to get method"); - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - err_sys("unable to get ctx"); - - if (cipherList) - if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) - err_sys("client can't set cipher list 1"); - -#ifdef CYASSL_LEANPSK - usePsk = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - usePsk = 1; -#endif - - if (fewerPackets) - CyaSSL_CTX_set_group_messages(ctx); - - if (usePsk) { -#ifndef NO_PSK - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - if (cipherList == NULL) { - const char *defaultCipherList; - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); - } -#endif - useClientCert = 0; - } - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - if (cipherList == NULL) { - /* don't use EDH, can't sniff tmp keys */ - if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { - err_sys("client can't set cipher list 3"); - } - } -#endif - -#ifdef USER_CA_CB - CyaSSL_CTX_SetCACb(ctx, CaCb); -#endif - -#ifdef VERIFY_CALLBACK - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); -#endif -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (useClientCert){ - if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) - err_sys("can't load client cert file, check file and run from" - " CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load client private key file, check file and run " - "from CyaSSL home dir"); - } - - if (!usePsk) { - if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - } -#endif -#if !defined(NO_CERTS) - if (!usePsk && doPeerCheck == 0) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); -#endif - -#ifdef HAVE_CAVIUM - CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); -#endif - -#ifdef HAVE_SNI - if (sniHostName) - if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) - != SSL_SUCCESS) - err_sys("UseSNI failed"); -#endif - - if (benchmark) { - /* time passed in number of connects give average */ - int times = benchmark; - int i = 0; - - double start = current_time(), avg; - - for (i = 0; i < times; i++) { - tcp_connect(&sockfd, host, port, doDTLS); - - ssl = CyaSSL_new(ctx); - CyaSSL_set_fd(ssl, sockfd); - if (CyaSSL_connect(ssl) != SSL_SUCCESS) - err_sys("SSL_connect failed"); - - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - CloseSocket(sockfd); - } - avg = current_time() - start; - avg /= times; - avg *= 1000; /* milliseconds */ - printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); - - CyaSSL_CTX_free(ctx); - ((func_args*)args)->return_code = 0; - - exit(EXIT_SUCCESS); - } - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) - err_sys("unable to get SSL object"); - - CyaSSL_set_quiet_shutdown(ssl, 1) ; - - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(ssl, sockfd); -#ifdef HAVE_CRL - if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) - err_sys("can't enable crl check"); - if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) - err_sys("can't load crl, check crlfile and date validity"); - if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) - err_sys("can't set crl callback"); -#endif - if (matchName && doPeerCheck) - CyaSSL_check_domain_name(ssl, domain); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(ssl); - } - else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { - /* see note at top of README */ - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("err = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); - err_sys("SSL_connect failed"); - /* if you're getting an error here */ - } -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - showPeer(ssl); - - if (sendGET) { - printf("SSL connect ok, sending GET...\n"); - msgSz = 28; - strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); - msg[msgSz] = '\0'; - } - if (CyaSSL_write(ssl, msg, msgSz) != msgSz) - err_sys("SSL_write failed"); - - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server response: %s", reply); - - if (sendGET && (input == (sizeof(reply)-1))) { /* get html */ - while (1) { - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("%s", reply); - if(input < sizeof(reply)-1) - break ; - } - else - break; - } - } - printf("\n"); - } - else if (input < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("CyaSSL_read failed"); - } - -#ifdef CYASSL_CMSIS_RTOS - osDelay(5000) ; -#endif - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - strncpy(msg, "break", 6); - msgSz = (int)strlen(msg); - /* try to send session close */ - CyaSSL_write(ssl, msg, msgSz); - } - session = CyaSSL_get_session(ssl); - sslResume = CyaSSL_new(ctx); - } -#endif - - if (doDTLS == 0) /* don't send alert after "break" command */ - CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ - CyaSSL_free(ssl); - CloseSocket(sockfd); - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - SOCKADDR_IN_T addr; - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(sslResume, sockfd); - CyaSSL_set_session(sslResume, session); - - showPeer(sslResume); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(sslResume, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(sslResume); - } - else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) - err_sys("SSL resume failed"); -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - - if (CyaSSL_session_reused(sslResume)) - printf("reused session id\n"); - else - printf("didn't reuse session id!!!\n"); - - if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) - err_sys("SSL_write failed"); - - if (nonBlocking) { - /* give server a chance to bounce a message back to client */ - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - } - - input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server resume response: %s\n", reply); - } - - /* try to send session break */ - CyaSSL_write(sslResume, msg, msgSz); - - CyaSSL_shutdown(sslResume); - CyaSSL_free(sslResume); - CloseSocket(sockfd); - } -#endif /* NO_SESSION_CACHE */ - - CyaSSL_CTX_free(ctx); - - ((func_args*)args)->return_code = 0; - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - ShowMemoryTracker(); -#endif /* USE_CYASSL_MEMORY */ - - return 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - if (CurrentDir("client") || CurrentDir("build")) - ChangeDirBack(2); - -#ifdef HAVE_STACK_SIZE - StackSizeCheck(&args, client_test); -#else - client_test(&args); -#endif - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - - int myoptind = 0; - char* myoptarg = NULL; - -#endif /* NO_MAIN_DRIVER */ - - - -#ifdef CYASSL_CALLBACKS - - int handShakeCB(HandShakeInfo* info) - { - (void)info; - return 0; - } - - - int timeoutCB(TimeoutInfo* info) - { - (void)info; - return 0; - } - -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c deleted file mode 100644 index f6f9ff35..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/main.c +++ /dev/null @@ -1,115 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include "cmsis_os.h" -#include "rl_fs.h" -#include "rl_net.h" -#include -#include "cyassl_MDK_ARM.h" -#include - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -static void init_filesystem (void) { - int32_t retv; - - retv = finit ("M0:"); - if (retv == 0) { - retv = fmount ("M0:"); - if (retv == 0) { - printf ("Drive M0 ready!\n"); - } - else { - printf ("Drive M0 mount failed!\n"); - } - } else { - printf ("Drive M0 initialization failed!\n"); - } -} - -/*----------------------------------------------------------------------------- - * TCP/IP tasks - *----------------------------------------------------------------------------*/ -void tcp_poll (void const *arg) -{ - CYASSL_MSG("TCP polling started.\n") ; - while (1) { - net_main (); - osDelay(100) ; - } -} - -typedef struct func_args { - int argc; - char** argv; -} func_args; - -extern void client_test(func_args * args) ; -extern void init_time(void) ; - - osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ -int myoptind = 0; -char* myoptarg = NULL; - -#include "config-SimpleClient.h" - -int main() -{ - static char *argv[] = - { "client", "-h", CYASSL_CALLEE_IP, "-p", CYASSL_CALLEE_PORT, - "-v", CYASSL_SSL_VER, CYASSL_HTTP_GET } ; - static func_args args = - { 7 + CYASSL_HTTP_GET_COUNT, argv } ; - - init_time() ; - init_filesystem (); - net_initialize() ; - osThreadCreate (osThread (tcp_poll), NULL); - osDelay(50000) ; /* wait for DHCP */ - #if defined(DEBUG_CYASSL) - printf("Turning ON Debug message\n") ; - CyaSSL_Debugging_ON() ; - #endif - - if(args.argc == 7) - printf("Simple SSL/TLS, ") ; - else - printf("HTTP GET, ") ; - - printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ; - - while(1) { - client_test(&args) ; - printf("Enter any key to iterate.\n") ; - getchar() ; - } -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx deleted file mode 100644 index fb0174c7..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleClient/simpleClient.uvprojx +++ /dev/null @@ -1,1106 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - SimpleClient - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - SimpleClient - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_SimpleClient CYASSL_STM32F2xx - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - client.c - 1 - .\client.c - - - - - Configuration - - - config-SimpleClient.h - 5 - .\config-SimpleClient.h - - - config-CyaSSL.h - 5 - .\RTE\wolfSSL\config-CyaSSL.h - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - PHY_ST802RT1.c - 1 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - - - EMAC_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::Network - - - Net_Dbg_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - - - Net_Config.c - 1 - RTE\Network\Net_Config.c - - - Net_Config_BSD.h - 5 - RTE\Network\Net_Config_BSD.h - - - Net_Config_DNS_Client.h - 5 - RTE\Network\Net_Config_DNS_Client.h - - - Net_Config_ETH_0.h - 5 - RTE\Network\Net_Config_ETH_0.h - - - Net_Config_TCP.h - 5 - RTE\Network\Net_Config_TCP.h - - - Net_Config_UDP.h - 5 - RTE\Network\Net_Config_UDP.h - - - Net_Debug.c - 1 - RTE\Network\Net_Debug.c - - - - - ::wolfSSL - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - - - crl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - - - internal.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - - - io.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - - - keys.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - - - ocsp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - - - sniffer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - - - ssl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - - - tls.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config-CyaSSL.h - 5 - RTE\wolfSSL\config-CyaSSL.h - - - config.h - 5 - RTE\wolfSSL\config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - - - RTE\Network\Net_Debug.c - - - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-CyaSSL.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config-CyaSSL.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt deleted file mode 100644 index ea3ec641..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/Abstract.txt +++ /dev/null @@ -1,23 +0,0 @@ -This program is a simple server example with CyaSSL/wolfCrypt library. - -In order to run this program, -Copy {PACK}\wolfSSL\CyaSSL\2.8.0\cyassl\certs folder and files to the SD memory. -Set the server IP address in Net_Config_ETH_0.h -The default server listning port is 11111, defined in test.h - -For further configuration, refer config-Crypt.h and config-CyaSSL.h. - -When testing this server, it is recommended to test against one of the standard -CyaSSL example applications running on a desktop machine. The standard CyaSSL -example applications are located in the CyaSSL root directory under the -/examples directory. - -For the hardware crypt on config-Crypt.h, download -STSW-STM32062: STM32F2xx standard peripherals library at -http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to - {PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib - - -Support -------- -Please send questions or comments to support@wolfssl.com \ No newline at end of file diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c deleted file mode 100644 index 2298f7dd..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/CMSIS/RTX_Conf_CM.c +++ /dev/null @@ -1,276 +0,0 @@ -/*---------------------------------------------------------------------------- - * RL-ARM - RTX - *---------------------------------------------------------------------------- - * Name: RTX_Conf_CM.C - * Purpose: Configuration of CMSIS RTX Kernel for Cortex-M - * Rev.: V4.70 - *---------------------------------------------------------------------------- - * - * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *---------------------------------------------------------------------------*/ - -#include "cmsis_os.h" - - -/*---------------------------------------------------------------------------- - * RTX User configuration part BEGIN - *---------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- -// -// Thread Configuration -// ======================= -// -// Number of concurrent running threads <0-250> -// Defines max. number of threads that will run at the same time. -// Default: 6 -#ifndef OS_TASKCNT - #define OS_TASKCNT 5 -#endif - -// Default Thread stack size [bytes] <64-4096:8><#/4> -// Defines default stack size for threads with osThreadDef stacksz = 0 -// Default: 200 -#ifndef OS_STKSIZE - #define OS_STKSIZE 250 -#endif - -// Main Thread stack size [bytes] <64-20000:8><#/4> -// Defines stack size for main thread. -// Default: 200 -#ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 3000 -#endif - -// Number of threads with user-provided stack size <0-250> -// Defines the number of threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVCNT - #define OS_PRIVCNT 0 -#endif - -// Total stack size [bytes] for threads with user-provided stack size <0-0x10000:8><#/4> -// Defines the combined stack size for threads with user-provided stack size. -// Default: 0 -#ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE 4500 -#endif - -// Check for stack overflow -// Includes the stack checking code for stack overflow. -// Note that additional code reduces the Kernel performance. -#ifndef OS_STKCHECK - #define OS_STKCHECK 1 -#endif - -// Processor mode for thread execution -// <0=> Unprivileged mode -// <1=> Privileged mode -// Default: Privileged mode -#ifndef OS_RUNPRIV - #define OS_RUNPRIV 1 -#endif - -// - -// RTX Kernel Timer Tick Configuration -// ====================================== -// Use Cortex-M SysTick timer as RTX Kernel Timer -// Use the Cortex-M SysTick timer as a time-base for RTX. -#ifndef OS_SYSTICK - #define OS_SYSTICK 1 -#endif -// -// Timer clock value [Hz] <1-1000000000> -// Defines the timer clock value. -// Default: 12000000 (12MHz) -#ifndef OS_CLOCK - #define OS_CLOCK 12000000 -#endif - -// Timer tick value [us] <1-1000000> -// Defines the timer tick value. -// Default: 1000 (1ms) -#ifndef OS_TICK - #define OS_TICK 1000 -#endif - -// - -// System Configuration -// ======================= -// -// Round-Robin Thread switching -// =============================== -// -// Enables Round-Robin Thread switching. -#ifndef OS_ROBIN - #define OS_ROBIN 1 -#endif - -// Round-Robin Timeout [ticks] <1-1000> -// Defines how long a thread will execute before a thread switch. -// Default: 5 -#ifndef OS_ROBINTOUT - #define OS_ROBINTOUT 5 -#endif - -// - -// User Timers -// ============== -// Enables user Timers -#ifndef OS_TIMERS - #define OS_TIMERS 1 -#endif - -// Timer Thread Priority -// <1=> Low -// <2=> Below Normal <3=> Normal <4=> Above Normal -// <5=> High -// <6=> Realtime (highest) -// Defines priority for Timer Thread -// Default: High -#ifndef OS_TIMERPRIO - #define OS_TIMERPRIO 5 -#endif - -// Timer Thread stack size [bytes] <64-64000:8><#/4> -// Defines stack size for Timer thread. -// Default: 200 -#ifndef OS_TIMERSTKSZ - #define OS_TIMERSTKSZ 50 -#endif - -// Timer Callback Queue size <1-32> -// Number of concurrent active timer callback functions. -// Default: 4 -#ifndef OS_TIMERCBQS - #define OS_TIMERCBQS 4 -#endif - -// - -// ISR FIFO Queue size<4=> 4 entries <8=> 8 entries -// <12=> 12 entries <16=> 16 entries -// <24=> 24 entries <32=> 32 entries -// <48=> 48 entries <64=> 64 entries -// <96=> 96 entries -// ISR functions store requests to this buffer, -// when they are called from the interrupt handler. -// Default: 16 entries -#ifndef OS_FIFOSZ - #define OS_FIFOSZ 16 -#endif - -// - -//------------- <<< end of configuration section >>> ----------------------- - -// Standard library system mutexes -// =============================== -// Define max. number system mutexes that are used to protect -// the arm standard runtime library. For microlib they are not used. -#ifndef OS_MUTEXCNT - #define OS_MUTEXCNT 8 -#endif - -/*---------------------------------------------------------------------------- - * RTX User configuration part END - *---------------------------------------------------------------------------*/ - -#define OS_TRV ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1) - - -/*---------------------------------------------------------------------------- - * Global Functions - *---------------------------------------------------------------------------*/ - -/*--------------------------- os_idle_demon ---------------------------------*/ - -void os_idle_demon (void) { - /* The idle demon is a system thread, running when no other thread is */ - /* ready to run. */ - - for (;;) { - /* HERE: include optional user code to be executed when no thread runs.*/ - } -} - -#if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer - -/*--------------------------- os_tick_init ----------------------------------*/ - -// Initialize alternative hardware timer as RTX kernel timer -// Return: IRQ number of the alternative hardware timer -int os_tick_init (void) { - return (-1); /* Return IRQ number of timer (0..239) */ -} - -/*--------------------------- os_tick_val -----------------------------------*/ - -// Get alternative hardware timer current value (0 .. OS_TRV) -uint32_t os_tick_val (void) { - return (0); -} - -/*--------------------------- os_tick_ovf -----------------------------------*/ - -// Get alternative hardware timer overflow flag -// Return: 1 - overflow, 0 - no overflow -uint32_t os_tick_ovf (void) { - return (0); -} - -/*--------------------------- os_tick_irqack --------------------------------*/ - -// Acknowledge alternative hardware timer interrupt -void os_tick_irqack (void) { - /* ... */ -} - -#endif // (OS_SYSTICK == 0) - -/*--------------------------- os_error --------------------------------------*/ - -void os_error (uint32_t err_code) { - /* This function is called when a runtime error is detected. Parameter */ - /* 'err_code' holds the runtime error code (defined in RTL.H). */ - - /* HERE: include optional code to be executed on runtime error. */ - for (;;); -} - - -/*---------------------------------------------------------------------------- - * RTX Configuration Functions - *---------------------------------------------------------------------------*/ - -#include "RTX_CM_lib.h" - -/*---------------------------------------------------------------------------- - * end of file - *---------------------------------------------------------------------------*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h deleted file mode 100644 index 4a09246f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h +++ /dev/null @@ -1,3127 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Copyright (C) 2013 ARM Limited. All rights reserved. - * - * $Date: 27. June 2013 - * $Revision: V1.01 - * - * Project: RTE Device Configuration for ST STM32F2xx - * -------------------------------------------------------------------------- */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - - -#define GPIO_PORT(num) \ - ((num == 0) ? GPIOA : \ - (num == 1) ? GPIOB : \ - (num == 2) ? GPIOC : \ - (num == 3) ? GPIOD : \ - (num == 4) ? GPIOE : \ - (num == 5) ? GPIOF : \ - (num == 6) ? GPIOG : \ - (num == 7) ? GPIOH : \ - (num == 8) ? GPIOI : \ - NULL) - - -// Clock Configuration -// High-speed Internal Clock <1-999999999> -#define RTE_HSI 16000000 -// High-speed External Clock <1-999999999> -#define RTE_HSE 25000000 -// System Clock <1-999999999> -#define RTE_SYSCLK 120000000 -// AHB Clock <1-999999999> -#define RTE_HCLK 120000000 -// APB1 Clock <1-999999999> -#define RTE_PCLK1 30000000 -// APB2 Clock <1-999999999> -#define RTE_PCLK2 60000000 -// 48MHz Clock -#define RTE_PLL48CK 48000000 -// - - -// USART1 (Universal synchronous asynchronous receiver transmitter) [Driver_UART1] -// Configuration settings for Driver_UART1 in component ::Drivers:UART -#define RTE_USART1 0 - -// USART1_TX Pin <0=>PA9 <1=>PB6 -#define RTE_USART1_TX_ID 0 -#if (RTE_USART1_TX_ID == 0) -#define RTE_USART1_TX_PORT GPIOA -#define RTE_USART1_TX_BIT 9 -#elif (RTE_USART1_TX_ID == 1) -#define RTE_USART1_TX_PORT GPIOB -#define RTE_USART1_TX_BIT 6 -#else -#error "Invalid USART1_TX Pin Configuration!" -#endif - -// USART1_RX Pin <0=>PA10 <1=>PB7 -#define RTE_USART1_RX_ID 0 -#if (RTE_USART1_RX_ID == 0) -#define RTE_USART1_RX_PORT GPIOA -#define RTE_USART1_RX_BIT 10 -#elif (RTE_USART1_RX_ID == 1) -#define RTE_USART1_RX_PORT GPIOB -#define RTE_USART1_RX_BIT 7 -#else -#error "Invalid USART1_RX Pin Configuration!" -#endif - -// Synchronous -// USART1_CK Pin <0=>PA8 -// -#define RTE_USART1_CK 0 -#define RTE_USART1_CK_ID 0 -#if (RTE_USART1_CK_ID == 0) -#define RTE_USART1_CK_PORT GPIOA -#define RTE_USART1_CK_BIT 8 -#else -#error "Invalid USART1_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART1_CTS Pin <0=>PA11 -// USART1_RTS Pin <0=>PA12 -// Manual CTS/RTS -// -#define RTE_USART1_HW_FLOW 0 -#define RTE_USART1_CTS_ID 0 -#define RTE_USART1_RTS_ID 0 -#define RTE_USART1_MANUAL_FLOW 0 -#if (RTE_USART1_CTS_ID == 0) -#define RTE_USART1_CTS_PORT GPIOA -#define RTE_USART1_CTS_BIT 11 -#else -#error "Invalid USART1_CTS Pin Configuration!" -#endif -#if (RTE_USART1_RTS_ID == 0) -#define RTE_USART1_RTS_PORT GPIOA -#define RTE_USART1_RTS_BIT 12 -#else -#error "Invalid USART1_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <2=>2 <5=>5 -// Selects DMA Stream (only Stream 2 or 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_RX_DMA 1 -#define RTE_USART1_RX_DMA_NUMBER 2 -#define RTE_USART1_RX_DMA_STREAM 2 -#define RTE_USART1_RX_DMA_CHANNEL 4 -#define RTE_USART1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART1_TX_DMA 1 -#define RTE_USART1_TX_DMA_NUMBER 2 -#define RTE_USART1_TX_DMA_STREAM 7 -#define RTE_USART1_TX_DMA_CHANNEL 4 -#define RTE_USART1_TX_DMA_PRIORITY 0 - -// - - -// USART2 (Universal synchronous asynchronous receiver transmitter) [Driver_UART2] -// Configuration settings for Driver_UART2 in component ::Drivers:UART -#define RTE_USART2 0 - -// USART2_TX Pin <0=>PA2 <1=>PD5 -#define RTE_USART2_TX_ID 0 -#if (RTE_USART2_TX_ID == 0) -#define RTE_USART2_TX_PORT GPIOA -#define RTE_USART2_TX_BIT 2 -#elif (RTE_USART2_TX_ID == 1) -#define RTE_USART2_TX_PORT GPIOD -#define RTE_USART2_TX_BIT 5 -#else -#error "Invalid USART2_TX Pin Configuration!" -#endif - -// USART2_RX Pin <0=>PA3 <1=>PD6 -#define RTE_USART2_RX_ID 0 -#if (RTE_USART2_RX_ID == 0) -#define RTE_USART2_RX_PORT GPIOA -#define RTE_USART2_RX_BIT 3 -#elif (RTE_USART2_RX_ID == 1) -#define RTE_USART2_RX_PORT GPIOD -#define RTE_USART2_RX_BIT 6 -#else -#error "Invalid USART2_RX Pin Configuration!" -#endif - -// Synchronous -// USART2_CK Pin <0=>PA4 <1=>PD7 -// -#define RTE_USART2_CK 0 -#define RTE_USART2_CK_ID 0 -#if (RTE_USART2_CK_ID == 0) -#define RTE_USART2_CK_PORT GPIOA -#define RTE_USART2_CK_BIT 4 -#elif (RTE_USART2_CK_ID == 1) -#define RTE_USART2_CK_PORT GPIOD -#define RTE_USART2_CK_BIT 7 -#else -#error "Invalid USART2_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART2_CTS Pin <0=>PA0 <1=>PD3 -// USART2_RTS Pin <0=>PA1 <1=>PD4 -// Manual CTS/RTS -// -#define RTE_USART2_HW_FLOW 0 -#define RTE_USART2_CTS_ID 0 -#define RTE_USART2_RTS_ID 0 -#define RTE_USART2_MANUAL_FLOW 0 -#if (RTE_USART2_CTS_ID == 0) -#define RTE_USART2_CTS_PORT GPIOA -#define RTE_USART2_CTS_BIT 0 -#elif (RTE_USART2_CTS_ID == 1) -#define RTE_USART2_CTS_PORT GPIOD -#define RTE_USART2_CTS_BIT 3 -#else -#error "Invalid USART2_CTS Pin Configuration!" -#endif -#if (RTE_USART2_RTS_ID == 0) -#define RTE_USART2_RTS_PORT GPIOA -#define RTE_USART2_RTS_BIT 1 -#elif (RTE_USART2_RTS_ID == 1) -#define RTE_USART2_RTS_PORT GPIOD -#define RTE_USART2_RTS_BIT 4 -#else -#error "Invalid USART2_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 -// Selects DMA Stream (only Stream 5 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_RX_DMA 1 -#define RTE_USART2_RX_DMA_NUMBER 1 -#define RTE_USART2_RX_DMA_STREAM 5 -#define RTE_USART2_RX_DMA_CHANNEL 4 -#define RTE_USART2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 -// Selects DMA Stream (only Stream 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART2_TX_DMA 1 -#define RTE_USART2_TX_DMA_NUMBER 1 -#define RTE_USART2_TX_DMA_STREAM 6 -#define RTE_USART2_TX_DMA_CHANNEL 4 -#define RTE_USART2_TX_DMA_PRIORITY 0 - -// - - -// USART3 (Universal synchronous asynchronous receiver transmitter) [Driver_UART3] -// Configuration settings for Driver_UART3 in component ::Drivers:UART -#define RTE_USART3 0 - -// USART3_TX Pin <0=>PB10 <1=>PC10 <2=>PD8 -#define RTE_USART3_TX_ID 0 -#if (RTE_USART3_TX_ID == 0) -#define RTE_USART3_TX_PORT GPIOB -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 1) -#define RTE_USART3_TX_PORT GPIOC -#define RTE_USART3_TX_BIT 10 -#elif (RTE_USART3_TX_ID == 2) -#define RTE_USART3_TX_PORT GPIOD -#define RTE_USART3_TX_BIT 8 -#else -#error "Invalid USART3_TX Pin Configuration!" -#endif - -// USART3_RX Pin <0=>PB11 <1=>PC11 <2=>PD9 -#define RTE_USART3_RX_ID 0 -#if (RTE_USART3_RX_ID == 0) -#define RTE_USART3_RX_PORT GPIOB -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 1) -#define RTE_USART3_RX_PORT GPIOC -#define RTE_USART3_RX_BIT 11 -#elif (RTE_USART3_RX_ID == 2) -#define RTE_USART3_RX_PORT GPIOD -#define RTE_USART3_RX_BIT 9 -#else -#error "Invalid USART3_RX Pin Configuration!" -#endif - -// Synchronous -// USART3_CK Pin <0=>PB12 <1=>PC12 <2=>PD10 -// -#define RTE_USART3_CK 0 -#define RTE_USART3_CK_ID 0 -#if (RTE_USART3_CK_ID == 0) -#define RTE_USART3_CK_PORT GPIOB -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 1) -#define RTE_USART3_CK_PORT GPIOC -#define RTE_USART3_CK_BIT 12 -#elif (RTE_USART3_CK_ID == 2) -#define RTE_USART3_CK_PORT GPIOD -#define RTE_USART3_CK_BIT 10 -#else -#error "Invalid USART3_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART3_CTS Pin <0=>PB13 <1=>PD11 -// USART3_RTS Pin <0=>PB14 <1=>PD12 -// Manual CTS/RTS -// -#define RTE_USART3_HW_FLOW 0 -#define RTE_USART3_CTS_ID 0 -#define RTE_USART3_RTS_ID 0 -#define RTE_USART3_MANUAL_FLOW 0 -#if (RTE_USART3_CTS_ID == 0) -#define RTE_USART3_CTS_PORT GPIOB -#define RTE_USART3_CTS_BIT 13 -#elif (RTE_USART3_CTS_ID == 1) -#define RTE_USART3_CTS_PORT GPIOD -#define RTE_USART3_CTS_BIT 11 -#else -#error "Invalid USART3_CTS Pin Configuration!" -#endif -#if (RTE_USART3_RTS_ID == 0) -#define RTE_USART3_RTS_PORT GPIOB -#define RTE_USART3_RTS_BIT 14 -#elif (RTE_USART3_RTS_ID == 1) -#define RTE_USART3_RTS_PORT GPIOD -#define RTE_USART3_RTS_BIT 12 -#else -#error "Invalid USART3_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <1=>1 -// Selects DMA Stream (only Stream 1 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_RX_DMA 1 -#define RTE_USART3_RX_DMA_NUMBER 1 -#define RTE_USART3_RX_DMA_STREAM 1 -#define RTE_USART3_RX_DMA_CHANNEL 4 -#define RTE_USART3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART3_TX_DMA 1 -#define RTE_USART3_TX_DMA_NUMBER 1 -#define RTE_USART3_TX_DMA_STREAM 3 -#define RTE_USART3_TX_DMA_CHANNEL 4 -#define RTE_USART3_TX_DMA_PRIORITY 0 - -// - - -// UART4 (Universal asynchronous receiver transmitter) [Driver_UART4] -// Configuration settings for Driver_UART4 in component ::Drivers:UART -#define RTE_UART4 0 - -// UART4_TX Pin <0=>PA0 <1=>PC10 -#define RTE_UART4_TX_ID 0 -#if (RTE_UART4_TX_ID == 0) -#define RTE_UART4_TX_PORT GPIOA -#define RTE_UART4_TX_BIT 0 -#elif (RTE_UART4_TX_ID == 1) -#define RTE_UART4_TX_PORT GPIOC -#define RTE_UART4_TX_BIT 10 -#else -#error "Invalid UART4_TX Pin Configuration!" -#endif - -// UART4_RX Pin <0=>PA1 <1=>PC11 -#define RTE_UART4_RX_ID 0 -#if (RTE_UART4_RX_ID == 0) -#define RTE_UART4_RX_PORT GPIOA -#define RTE_UART4_RX_BIT 1 -#elif (RTE_UART4_RX_ID == 1) -#define RTE_UART4_RX_PORT GPIOC -#define RTE_UART4_RX_BIT 11 -#else -#error "Invalid UART4_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_RX_DMA 1 -#define RTE_UART4_RX_DMA_NUMBER 1 -#define RTE_UART4_RX_DMA_STREAM 2 -#define RTE_UART4_RX_DMA_CHANNEL 4 -#define RTE_UART4_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART4_TX_DMA 1 -#define RTE_UART4_TX_DMA_NUMBER 1 -#define RTE_UART4_TX_DMA_STREAM 4 -#define RTE_UART4_TX_DMA_CHANNEL 4 -#define RTE_UART4_TX_DMA_PRIORITY 0 - -// - - -// UART5 (Universal asynchronous receiver transmitter) [Driver_UART5] -// Configuration settings for Driver_UART5 in component ::Drivers:UART -#define RTE_UART5 0 - -// UART5_TX Pin <0=>PC12 -#define RTE_UART5_TX_ID 0 -#if (RTE_UART5_TX_ID == 0) -#define RTE_UART5_TX_PORT GPIOC -#define RTE_UART5_TX_BIT 12 -#else -#error "Invalid UART5_TX Pin Configuration!" -#endif - -// UART5_RX Pin <0=>PD2 -#define RTE_UART5_RX_ID 0 -#if (RTE_UART5_RX_ID == 0) -#define RTE_UART5_RX_PORT GPIOD -#define RTE_UART5_RX_BIT 2 -#else -#error "Invalid UART5_RX Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 -// Selects DMA Stream (only Stream 0 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_RX_DMA 1 -#define RTE_UART5_RX_DMA_NUMBER 1 -#define RTE_UART5_RX_DMA_STREAM 0 -#define RTE_UART5_RX_DMA_CHANNEL 4 -#define RTE_UART5_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_UART5_TX_DMA 1 -#define RTE_UART5_TX_DMA_NUMBER 1 -#define RTE_UART5_TX_DMA_STREAM 7 -#define RTE_UART5_TX_DMA_CHANNEL 4 -#define RTE_UART5_TX_DMA_PRIORITY 0 - -// - - -// USART6 (Universal synchronous asynchronous receiver transmitter) [Driver_UART6] -// Configuration settings for Driver_UART6 in component ::Drivers:UART -#define RTE_USART6 0 - -// USART6_TX Pin <0=>PC6 <1=>PG14 -#define RTE_USART6_TX_ID 0 -#if (RTE_USART6_TX_ID == 0) -#define RTE_USART6_TX_PORT GPIOC -#define RTE_USART6_TX_BIT 6 -#elif (RTE_USART6_TX_ID == 1) -#define RTE_USART6_TX_PORT GPIOG -#define RTE_USART6_TX_BIT 14 -#else -#error "Invalid USART6_TX Pin Configuration!" -#endif - -// USART6_RX Pin <0=>PC7 <1=>PG9 -#define RTE_USART6_RX_ID 0 -#if (RTE_USART6_RX_ID == 0) -#define RTE_USART6_RX_PORT GPIOC -#define RTE_USART6_RX_BIT 7 -#elif (RTE_USART6_RX_ID == 1) -#define RTE_USART6_RX_PORT GPIOG -#define RTE_USART6_RX_BIT 9 -#else -#error "Invalid USART6_RX Pin Configuration!" -#endif - -// Synchronous -// USART6_CK Pin <0=>PC8 <1=>PG7 -// -#define RTE_USART6_CK 0 -#define RTE_USART6_CK_ID 0 -#if (RTE_USART6_CK_ID == 0) -#define RTE_USART6_CK_PORT GPIOC -#define RTE_USART6_CK_BIT 8 -#elif (RTE_USART6_CK_ID == 1) -#define RTE_USART6_CK_PORT GPIOG -#define RTE_USART6_CK_BIT 7 -#else -#error "Invalid USART6_CK Pin Configuration!" -#endif - -// Hardware flow control -// USART6_CTS Pin <0=>PG13 <1=>PG15 -// USART6_RTS Pin <0=>PG8 <1=>PG12 -// Manual CTS/RTS -// -#define RTE_USART6_HW_FLOW 0 -#define RTE_USART6_CTS_ID 0 -#define RTE_USART6_RTS_ID 0 -#define RTE_USART6_MANUAL_FLOW 0 -#if (RTE_USART6_CTS_ID == 0) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 13 -#elif (RTE_USART6_CTS_ID == 1) -#define RTE_USART6_CTS_PORT GPIOG -#define RTE_USART6_CTS_BIT 15 -#else -#error "Invalid USART6_CTS Pin Configuration!" -#endif -#if (RTE_USART6_RTS_ID == 0) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 8 -#elif (RTE_USART6_RTS_ID == 1) -#define RTE_USART6_RTS_PORT GPIOG -#define RTE_USART6_RTS_BIT 12 -#else -#error "Invalid USART6_RTS Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <1=>1 <2=>2 -// Selects DMA Stream (only Stream 1 or 2 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_RX_DMA 1 -#define RTE_USART6_RX_DMA_NUMBER 2 -#define RTE_USART6_RX_DMA_STREAM 1 -#define RTE_USART6_RX_DMA_CHANNEL 5 -#define RTE_USART6_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <5=>5 -// Selects DMA Channel (only Channel 5 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_USART6_TX_DMA 1 -#define RTE_USART6_TX_DMA_NUMBER 2 -#define RTE_USART6_TX_DMA_STREAM 6 -#define RTE_USART6_TX_DMA_CHANNEL 5 -#define RTE_USART6_TX_DMA_PRIORITY 0 - -// - - -// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] -// Configuration settings for Driver_I2C1 in component ::Drivers:I2C -#define RTE_I2C1 0 - -// I2C1_SCL Pin <0=>PB6 <1=>PB8 -#define RTE_I2C1_SCL_PORT_ID 0 -#if (RTE_I2C1_SCL_PORT_ID == 0) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 6 -#elif (RTE_I2C1_SCL_PORT_ID == 1) -#define RTE_I2C1_SCL_PORT GPIOB -#define RTE_I2C1_SCL_BIT 8 -#else -#error "Invalid I2C1_SCL Pin Configuration!" -#endif - -// I2C1_SDA Pin <0=>PB7 <1=>PB9 -#define RTE_I2C1_SDA_PORT_ID 0 -#if (RTE_I2C1_SDA_PORT_ID == 0) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 7 -#elif (RTE_I2C1_SDA_PORT_ID == 1) -#define RTE_I2C1_SDA_PORT GPIOB -#define RTE_I2C1_SDA_BIT 9 -#else -#error "Invalid I2C1_SDA Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <5=>5 -// Selects DMA Stream (only Stream 0 or 5 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_RX_DMA 1 -#define RTE_I2C1_RX_DMA_NUMBER 1 -#define RTE_I2C1_RX_DMA_STREAM 0 -#define RTE_I2C1_RX_DMA_CHANNEL 1 -#define RTE_I2C1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <6=>6 <7=>7 -// Selects DMA Stream (only Stream 6 or 7 can be used) -// Channel <1=>1 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C1_TX_DMA 1 -#define RTE_I2C1_TX_DMA_NUMBER 1 -#define RTE_I2C1_TX_DMA_STREAM 6 -#define RTE_I2C1_TX_DMA_CHANNEL 1 -#define RTE_I2C1_TX_DMA_PRIORITY 0 - -// - - -// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] -// Configuration settings for Driver_I2C2 in component ::Drivers:I2C -#define RTE_I2C2 0 - -// I2C2_SCL Pin <0=>PF1 <1=>PH4 <2=>PB10 -#define RTE_I2C2_SCL_PORT_ID 0 -#if (RTE_I2C2_SCL_PORT_ID == 0) -#define RTE_I2C2_SCL_PORT GPIOF -#define RTE_I2C2_SCL_BIT 1 -#elif (RTE_I2C2_SCL_PORT_ID == 1) -#define RTE_I2C2_SCL_PORT GPIOH -#define RTE_I2C2_SCL_BIT 4 -#elif (RTE_I2C2_SCL_PORT_ID == 2) -#define RTE_I2C2_SCL_PORT GPIOB -#define RTE_I2C2_SCL_BIT 10 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// I2C2_SDA Pin <0=>PF0 <1=>PH5 <2=>PB11 -#define RTE_I2C2_SDA_PORT_ID 0 -#if (RTE_I2C2_SDA_PORT_ID == 0) -#define RTE_I2C2_SDA_PORT GPIOF -#define RTE_I2C2_SDA_BIT 0 -#elif (RTE_I2C2_SDA_PORT_ID == 1) -#define RTE_I2C2_SDA_PORT GPIOH -#define RTE_I2C2_SDA_BIT 5 -#elif (RTE_I2C2_SDA_PORT_ID == 2) -#define RTE_I2C2_SDA_PORT GPIOB -#define RTE_I2C2_SDA_BIT 11 -#else -#error "Invalid I2C2_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 <3=>3 -// Selects DMA Stream (only Stream 2 or 3 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 7 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_RX_DMA 1 -#define RTE_I2C2_RX_DMA_NUMBER 1 -#define RTE_I2C2_RX_DMA_STREAM 2 -#define RTE_I2C2_RX_DMA_CHANNEL 7 -#define RTE_I2C2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <7=>7 -// Selects DMA Stream (only Stream 7 can be used) -// Channel <7=>7 -// Selects DMA Channel (only Channel 1 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C2_TX_DMA 1 -#define RTE_I2C2_TX_DMA_NUMBER 1 -#define RTE_I2C2_TX_DMA_STREAM 7 -#define RTE_I2C2_TX_DMA_CHANNEL 7 -#define RTE_I2C2_TX_DMA_PRIORITY 0 - -// - - -// I2C3 (Inter-integrated Circuit Interface 3) [Driver_I2C3] -// Configuration settings for Driver_I2C3 in component ::Drivers:I2C -#define RTE_I2C3 0 - -// I2C3_SCL Pin <0=>PH7 <1=>PA8 -#define RTE_I2C3_SCL_PORT_ID 0 -#if (RTE_I2C3_SCL_PORT_ID == 0) -#define RTE_I2C3_SCL_PORT GPIOH -#define RTE_I2C3_SCL_BIT 7 -#elif (RTE_I2C3_SCL_PORT_ID == 1) -#define RTE_I2C3_SCL_PORT GPIOA -#define RTE_I2C3_SCL_BIT 8 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// I2C3_SDA Pin <0=>PH8 <1=>PC9 -#define RTE_I2C3_SDA_PORT_ID 0 -#if (RTE_I2C3_SDA_PORT_ID == 0) -#define RTE_I2C3_SDA_PORT GPIOH -#define RTE_I2C3_SDA_BIT 8 -#elif (RTE_I2C3_SDA_PORT_ID == 1) -#define RTE_I2C3_SDA_PORT GPIOC -#define RTE_I2C3_SDA_BIT 9 -#else -#error "Invalid I2C3_SCL Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_RX_DMA 1 -#define RTE_I2C3_RX_DMA_NUMBER 1 -#define RTE_I2C3_RX_DMA_STREAM 2 -#define RTE_I2C3_RX_DMA_CHANNEL 3 -#define RTE_I2C3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <4=>4 -// Selects DMA Stream (only Stream 4 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_I2C3_TX_DMA 1 -#define RTE_I2C3_TX_DMA_NUMBER 1 -#define RTE_I2C3_TX_DMA_STREAM 4 -#define RTE_I2C3_TX_DMA_CHANNEL 3 -#define RTE_I2C3_TX_DMA_PRIORITY 0 - -// - - -// SPI1 (Serial Peripheral Interface 1) [Driver_SPI1] -// Configuration settings for Driver_SPI1 in component ::Drivers:SPI -#define RTE_SPI1 0 - -// SPI1_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI1_NSS_PIN 1 -#define RTE_SPI1_NSS_PORT GPIO_PORT(0) -#define RTE_SPI1_NSS_BIT 4 - -// SPI1_SCK Pin <0=>PA5 <1=>PB3 -#define RTE_SPI1_SCL_PORT_ID 0 -#if (RTE_SPI1_SCL_PORT_ID == 0) -#define RTE_SPI1_SCL_PORT GPIOA -#define RTE_SPI1_SCL_BIT 5 -#elif (RTE_SPI1_SCL_PORT_ID == 1) -#define RTE_SPI1_SCL_PORT GPIOB -#define RTE_SPI1_SCL_BIT 3 -#else -#error "Invalid SPI1_SCK Pin Configuration!" -#endif - -// SPI1_MISO Pin <0=>PA6 <1=>PB4 -#define RTE_SPI1_MISO_PORT_ID 0 -#if (RTE_SPI1_MISO_PORT_ID == 0) -#define RTE_SPI1_MISO_PORT GPIOA -#define RTE_SPI1_MISO_BIT 6 -#elif (RTE_SPI1_MISO_PORT_ID == 1) -#define RTE_SPI1_MISO_PORT GPIOB -#define RTE_SPI1_MISO_BIT 4 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// SPI1_MOSI Pin <0=>PA7 <1=>PB5 -#define RTE_SPI1_MOSI_PORT_ID 0 -#if (RTE_SPI1_MOSI_PORT_ID == 0) -#define RTE_SPI1_MOSI_PORT GPIOA -#define RTE_SPI1_MOSI_BIT 7 -#elif (RTE_SPI1_MOSI_PORT_ID == 1) -#define RTE_SPI1_MOSI_PORT GPIOB -#define RTE_SPI1_MOSI_BIT 5 -#else -#error "Invalid SPI1_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_RX_DMA 1 -#define RTE_SPI1_RX_DMA_NUMBER 2 -#define RTE_SPI1_RX_DMA_STREAM 0 -#define RTE_SPI1_RX_DMA_CHANNEL 3 -#define RTE_SPI1_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <5=>5 -// Selects DMA Stream (only Stream 3 or 5 can be used) -// Channel <3=>3 -// Selects DMA Channel (only Channel 3 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI1_TX_DMA 1 -#define RTE_SPI1_TX_DMA_NUMBER 2 -#define RTE_SPI1_TX_DMA_STREAM 5 -#define RTE_SPI1_TX_DMA_CHANNEL 3 -#define RTE_SPI1_TX_DMA_PRIORITY 0 - -// - - -// SPI2 (Serial Peripheral Interface 2) [Driver_SPI2] -// Configuration settings for Driver_SPI2 in component ::Drivers:SPI -#define RTE_SPI2 0 - -// SPI2_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI2_NSS_PIN 1 -#define RTE_SPI2_NSS_PORT GPIO_PORT(1) -#define RTE_SPI2_NSS_BIT 12 - -// SPI2_SCK Pin <0=>PB10 <1=>PB13 <2=>PI1 -#define RTE_SPI2_SCL_PORT_ID 0 -#if (RTE_SPI2_SCL_PORT_ID == 0) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 10 -#elif (RTE_SPI2_SCL_PORT_ID == 1) -#define RTE_SPI2_SCL_PORT GPIOB -#define RTE_SPI2_SCL_BIT 13 -#elif (RTE_SPI2_SCL_PORT_ID == 2) -#define RTE_SPI2_SCL_PORT GPIOI -#define RTE_SPI2_SCL_BIT 1 -#else -#error "Invalid SPI2_SCK Pin Configuration!" -#endif - -// SPI2_MISO Pin <0=>PB14 <1=>PC2 <2=>PI2 -#define RTE_SPI2_MISO_PORT_ID 0 -#if (RTE_SPI2_MISO_PORT_ID == 0) -#define RTE_SPI2_MISO_PORT GPIOB -#define RTE_SPI2_MISO_BIT 14 -#elif (RTE_SPI2_MISO_PORT_ID == 1) -#define RTE_SPI2_MISO_PORT GPIOC -#define RTE_SPI2_MISO_BIT 2 -#elif (RTE_SPI2_MISO_PORT_ID == 2) -#define RTE_SPI2_MISO_PORT GPIOI -#define RTE_SPI2_MISO_BIT 2 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// SPI2_MOSI Pin <0=>PB15 <1=>PC3 <2=>OI3 -#define RTE_SPI2_MOSI_PORT_ID 0 -#if (RTE_SPI2_MOSI_PORT_ID == 0) -#define RTE_SPI2_MOSI_PORT GPIOB -#define RTE_SPI2_MOSI_BIT 15 -#elif (RTE_SPI2_MOSI_PORT_ID == 1) -#define RTE_SPI2_MOSI_PORT GPIOC -#define RTE_SPI2_MOSI_BIT 3 -#elif (RTE_SPI2_MOSI_PORT_ID == 2) -#define RTE_SPI2_MOSI_PORT GPIOI -#define RTE_SPI2_MOSI_BIT 3 -#else -#error "Invalid SPI2_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <2=>2 -// Selects DMA Stream (only Stream 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_RX_DMA 1 -#define RTE_SPI2_RX_DMA_NUMBER 1 -#define RTE_SPI2_RX_DMA_STREAM 2 -#define RTE_SPI2_RX_DMA_CHANNEL 0 -#define RTE_SPI2_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <3=>3 -// Selects DMA Stream (only Stream 3 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI2_TX_DMA 1 -#define RTE_SPI2_TX_DMA_NUMBER 1 -#define RTE_SPI2_TX_DMA_STREAM 3 -#define RTE_SPI2_TX_DMA_CHANNEL 0 -#define RTE_SPI2_TX_DMA_PRIORITY 0 - -// - - -// SPI3 (Serial Peripheral Interface 3) [Driver_SPI3] -// Configuration settings for Driver_SPI3 in component ::Drivers:SPI -#define RTE_SPI3 0 - -// SPI3_NSS Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SPI3_NSS_PIN 1 -#define RTE_SPI3_NSS_PORT GPIO_PORT(0) -#define RTE_SPI3_NSS_BIT 15 - -// SPI3_SCK Pin <0=>PB3 <1=>PC10 -#define RTE_SPI3_SCL_PORT_ID 0 -#if (RTE_SPI3_SCL_PORT_ID == 0) -#define RTE_SPI3_SCL_PORT GPIOB -#define RTE_SPI3_SCL_BIT 3 -#elif (RTE_SPI3_SCL_PORT_ID == 1) -#define RTE_SPI3_SCL_PORT GPIOC -#define RTE_SPI3_SCL_BIT 10 -#else -#error "Invalid SPI3_SCK Pin Configuration!" -#endif - -// SPI3_MISO Pin <0=>PB4 <1=>PC11 -#define RTE_SPI3_MISO_PORT_ID 0 -#if (RTE_SPI3_MISO_PORT_ID == 0) -#define RTE_SPI3_MISO_PORT GPIOB -#define RTE_SPI3_MISO_BIT 4 -#elif (RTE_SPI3_MISO_PORT_ID == 1) -#define RTE_SPI3_MISO_PORT GPIOC -#define RTE_SPI3_MISO_BIT 11 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// SPI3_MOSI Pin <0=>PB5 <1=>PC12 -#define RTE_SPI3_MOSI_PORT_ID 0 -#if (RTE_SPI3_MOSI_PORT_ID == 0) -#define RTE_SPI3_MOSI_PORT GPIOB -#define RTE_SPI3_MOSI_BIT 5 -#elif (RTE_SPI3_MOSI_PORT_ID == 1) -#define RTE_SPI3_MOSI_PORT GPIOC -#define RTE_SPI3_MOSI_BIT 12 -#else -#error "Invalid SPI3_MISO Pin Configuration!" -#endif - -// DMA Rx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <0=>0 <2=>2 -// Selects DMA Stream (only Stream 0 or 2 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_RX_DMA 1 -#define RTE_SPI3_RX_DMA_NUMBER 1 -#define RTE_SPI3_RX_DMA_STREAM 0 -#define RTE_SPI3_RX_DMA_CHANNEL 0 -#define RTE_SPI3_RX_DMA_PRIORITY 0 - -// DMA Tx -// Number <1=>1 -// Selects DMA Number (only DMA1 can be used) -// Stream <5=>5 <7=>7 -// Selects DMA Stream (only Stream 5 or 7 can be used) -// Channel <0=>0 -// Selects DMA Channel (only Channel 0 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SPI3_TX_DMA 1 -#define RTE_SPI3_TX_DMA_NUMBER 1 -#define RTE_SPI3_TX_DMA_STREAM 5 -#define RTE_SPI3_TX_DMA_CHANNEL 0 -#define RTE_SPI3_TX_DMA_PRIORITY 0 - -// - - -// SDIO (Secure Digital Input/Output) [Driver_MCI0] -// Configuration settings for Driver_MCI0 in component ::Drivers:MCI -#define RTE_SDIO 1 - -// SDIO_CD (Card Detect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_CD_PIN 1 -#define RTE_SDIO_CD_ACTIVE 0 -#define RTE_SDIO_CD_PORT GPIO_PORT(7) -#define RTE_SDIO_CD_BIT 15 - -// SDIO_WP (Write Protect) Pin -// Configure Pin if exists -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_SDIO_WP_PIN 0 -#define RTE_SDIO_WP_ACTIVE 0 -#define RTE_SDIO_WP_PORT GPIO_PORT(7) -#define RTE_SDIO_WP_BIT 16 - -// SDIO Bus -// SDIO_CK Pin <0=>PC12 -#define RTE_SDIO_CK_PORT_ID 0 -#if (RTE_SDIO_CK_PORT_ID == 0) -#define RTE_SDIO_CK_PORT GPIOC -#define RTE_SDIO_CK_PIN 12 -#else -#error "Invalid SDIO_CK Pin Configuration!" -#endif -// SDIO_CMD Pin <0=>PD2 -#define RTE_SDIO_CMD_PORT_ID 0 -#if (RTE_SDIO_CMD_PORT_ID == 0) -#define RTE_SDIO_CMD_PORT GPIOD -#define RTE_SDIO_CMD_PIN 2 -#else -#error "Invalid SDIO_CDM Pin Configuration!" -#endif -// SDIO_D0 Pin <0=>PC8 -#define RTE_SDIO_D0_PORT_ID 0 -#if (RTE_SDIO_D0_PORT_ID == 0) -#define RTE_SDIO_D0_PORT GPIOC -#define RTE_SDIO_D0_PIN 8 -#else -#error "Invalid SDIO_D0 Pin Configuration!" -#endif -// SDIO_D1 Pin <0=>PC9 -#define RTE_SDIO_D1_PORT_ID 0 -#if (RTE_SDIO_D1_PORT_ID == 0) -#define RTE_SDIO_D1_PORT GPIOC -#define RTE_SDIO_D1_PIN 9 -#else -#error "Invalid SDIO_D1 Pin Configuration!" -#endif -// SDIO_D2 Pin <0=>PC10 -#define RTE_SDIO_D2_PORT_ID 0 -#if (RTE_SDIO_D2_PORT_ID == 0) -#define RTE_SDIO_D2_PORT GPIOC -#define RTE_SDIO_D2_PIN 10 -#else -#error "Invalid SDIO_D2 Pin Configuration!" -#endif -// SDIO_D3 Pin <0=>PC11 -#define RTE_SDIO_D3_PORT_ID 0 -#if (RTE_SDIO_D3_PORT_ID == 0) -#define RTE_SDIO_D3_PORT GPIOC -#define RTE_SDIO_D3_PIN 11 -#else -#error "Invalid SDIO_D3 Pin Configuration!" -#endif -// SDIO_D4 Pin <0=>PB8 -#define RTE_SDIO_D4_PORT_ID 0 -#if (RTE_SDIO_D4_PORT_ID == 0) -#define RTE_SDIO_D4_PORT GPIOB -#define RTE_SDIO_D4_PIN 8 -#else -#error "Invalid SDIO_D4 Pin Configuration!" -#endif -// SDIO_D5 Pin <0=>PB9 -#define RTE_SDIO_D5_PORT_ID 0 -#if (RTE_SDIO_D5_PORT_ID == 0) -#define RTE_SDIO_D5_PORT GPIOB -#define RTE_SDIO_D5_PIN 9 -#else -#error "Invalid SDIO_D5 Pin Configuration!" -#endif -// SDIO_D6 Pin <0=>PC6 -#define RTE_SDIO_D6_PORT_ID 0 -#if (RTE_SDIO_D6_PORT_ID == 0) -#define RTE_SDIO_D6_PORT GPIOC -#define RTE_SDIO_D6_PIN 6 -#else -#error "Invalid SDIO_D6 Pin Configuration!" -#endif -// SDIO_D7 Pin <0=>PC7 -#define RTE_SDIO_D7_PORT_ID 0 -#if (RTE_SDIO_D7_PORT_ID == 0) -#define RTE_SDIO_D7_PORT GPIOC -#define RTE_SDIO_D7_PIN 7 -#else -#error "Invalid SDIO_D7 Pin Configuration!" -#endif -// - -// DMA -// Number <2=>2 -// Selects DMA Number (only DMA2 can be used) -// Stream <3=>3 <6=>6 -// Selects DMA Stream (only Stream 3 or 6 can be used) -// Channel <4=>4 -// Selects DMA Channel (only Channel 4 can be used) -// Priority <0=>Low <1=>Medium <2=>High <3=>Very High -// Selects DMA Priority -// -#define RTE_SDIO_DMA 1 -#define RTE_SDIO_DMA_NUMBER 2 -#define RTE_SDIO_DMA_STREAM 3 -#define RTE_SDIO_DMA_CHANNEL 4 -#define RTE_SDIO_DMA_PRIORITY 0 - -// - - -// ETH (Ethernet Interface) [Driver_ETH_MAC0] -// Configuration settings for Driver_ETH_MAC0 in component ::Drivers:Ethernet MAC -#define RTE_ETH 1 - -// MII (Media Independent Interface) -#define RTE_ETH_MII 0 - -// ETH_MII_TX_CLK Pin <0=>PC3 -#define RTE_ETH_MII_TX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_TX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_TX_CLK_PORT GPIOC -#define RTE_ETH_MII_TX_CLK_PIN 3 -#else -#error "Invalid ETH_MII_TX_CLK Pin Configuration!" -#endif -// ETH_MII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_MII_TXD0_PORT_ID 0 -#if (RTE_ETH_MII_TXD0_PORT_ID == 0) -#define RTE_ETH_MII_TXD0_PORT GPIOB -#define RTE_ETH_MII_TXD0_PIN 12 -#elif (RTE_ETH_MII_TXD0_PORT_ID == 1) -#define RTE_ETH_MII_TXD0_PORT GPIOG -#define RTE_ETH_MII_TXD0_PIN 13 -#else -#error "Invalid ETH_MII_TXD0 Pin Configuration!" -#endif -// ETH_MII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_MII_TXD1_PORT_ID 0 -#if (RTE_ETH_MII_TXD1_PORT_ID == 0) -#define RTE_ETH_MII_TXD1_PORT GPIOB -#define RTE_ETH_MII_TXD1_PIN 13 -#elif (RTE_ETH_MII_TXD1_PORT_ID == 1) -#define RTE_ETH_MII_TXD1_PORT GPIOG -#define RTE_ETH_MII_TXD1_PIN 14 -#else -#error "Invalid ETH_MII_TXD1 Pin Configuration!" -#endif -// ETH_MII_TXD2 Pin <0=>PC2 -#define RTE_ETH_MII_TXD2_PORT_ID 0 -#if (RTE_ETH_MII_TXD2_PORT_ID == 0) -#define RTE_ETH_MII_TXD2_PORT GPIOC -#define RTE_ETH_MII_TXD2_PIN 2 -#else -#error "Invalid ETH_MII_TXD2 Pin Configuration!" -#endif -// ETH_MII_TXD3 Pin <0=>PB8 <1=>PE2 -#define RTE_ETH_MII_TXD3_PORT_ID 0 -#if (RTE_ETH_MII_TXD3_PORT_ID == 0) -#define RTE_ETH_MII_TXD3_PORT GPIOB -#define RTE_ETH_MII_TXD3_PIN 8 -#elif (RTE_ETH_MII_TXD3_PORT_ID == 1) -#define RTE_ETH_MII_TXD3_PORT GPIOE -#define RTE_ETH_MII_TXD3_PIN 2 -#else -#error "Invalid ETH_MII_TXD3 Pin Configuration!" -#endif -// ETH_MII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_MII_TX_EN_PORT_ID 0 -#if (RTE_ETH_MII_TX_EN_PORT_ID == 0) -#define RTE_ETH_MII_TX_EN_PORT GPIOB -#define RTE_ETH_MII_TX_EN_PIN 11 -#elif (RTE_ETH_MII_TX_EN_PORT_ID == 1) -#define RTE_ETH_MII_TX_EN_PORT GPIOG -#define RTE_ETH_MII_TX_EN_PIN 11 -#else -#error "Invalid ETH_MII_TX_EN Pin Configuration!" -#endif -// ETH_MII_RX_CLK Pin <0=>PA1 -#define RTE_ETH_MII_RX_CLK_PORT_ID 0 -#if (RTE_ETH_MII_RX_CLK_PORT_ID == 0) -#define RTE_ETH_MII_RX_CLK_PORT GPIOA -#define RTE_ETH_MII_RX_CLK_PIN 1 -#else -#error "Invalid ETH_MII_RX_CLK Pin Configuration!" -#endif -// ETH_MII_RXD0 Pin <0=>PC4 -#define RTE_ETH_MII_RXD0_PORT_ID 0 -#if (RTE_ETH_MII_RXD0_PORT_ID == 0) -#define RTE_ETH_MII_RXD0_PORT GPIOC -#define RTE_ETH_MII_RXD0_PIN 4 -#else -#error "Invalid ETH_MII_RXD0 Pin Configuration!" -#endif -// ETH_MII_RXD1 Pin <0=>PC5 -#define RTE_ETH_MII_RXD1_PORT_ID 0 -#if (RTE_ETH_MII_RXD1_PORT_ID == 0) -#define RTE_ETH_MII_RXD1_PORT GPIOC -#define RTE_ETH_MII_RXD1_PIN 5 -#else -#error "Invalid ETH_MII_RXD1 Pin Configuration!" -#endif -// ETH_MII_RXD2 Pin <0=>PB0 <1=>PH6 -#define RTE_ETH_MII_RXD2_PORT_ID 0 -#if (RTE_ETH_MII_RXD2_PORT_ID == 0) -#define RTE_ETH_MII_RXD2_PORT GPIOB -#define RTE_ETH_MII_RXD2_PIN 0 -#elif (RTE_ETH_MII_RXD2_PORT_ID == 1) -#define RTE_ETH_MII_RXD2_PORT GPIOH -#define RTE_ETH_MII_RXD2_PIN 6 -#else -#error "Invalid ETH_MII_RXD2 Pin Configuration!" -#endif -// ETH_MII_RXD3 Pin <0=>PB1 <1=>PH7 -#define RTE_ETH_MII_RXD3_PORT_ID 0 -#if (RTE_ETH_MII_RXD3_PORT_ID == 0) -#define RTE_ETH_MII_RXD3_PORT GPIOB -#define RTE_ETH_MII_RXD3_PIN 1 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RXD3_PORT GPIOH -#define RTE_ETH_MII_RXD3_PIN 7 -#else -#error "Invalid ETH_MII_RXD3 Pin Configuration!" -#endif -// ETH_MII_RX_DV Pin <0=>PA7 -#define RTE_ETH_MII_RX_DV_PORT_ID 0 -#if (RTE_ETH_MII_RX_DV_PORT_ID == 0) -#define RTE_ETH_MII_RX_DV_PORT GPIOA -#define RTE_ETH_MII_RX_DV_PIN 7 -#else -#error "Invalid ETH_MII_RX_DV Pin Configuration!" -#endif -// ETH_MII_RX_ER Pin <0=>PB10 <1=>PI10 -#define RTE_ETH_MII_RX_ER_PORT_ID 0 -#if (RTE_ETH_MII_RX_ER_PORT_ID == 0) -#define RTE_ETH_MII_RX_ER_PORT GPIOB -#define RTE_ETH_MII_RX_ER_PIN 10 -#elif (RTE_ETH_MII_RXD3_PORT_ID == 1) -#define RTE_ETH_MII_RX_ER_PORT GPIOI -#define RTE_ETH_MII_RX_ER_PIN 10 -#else -#error "Invalid ETH_MII_RX_ER Pin Configuration!" -#endif -// ETH_MII_CRS Pin <0=>PA0 <1=>PH2 -#define RTE_ETH_MII_CRS_PORT_ID 0 -#if (RTE_ETH_MII_CRS_PORT_ID == 0) -#define RTE_ETH_MII_CRS_PORT GPIOA -#define RTE_ETH_MII_CRS_PIN 0 -#elif (RTE_ETH_MII_CRS_PORT_ID == 1) -#define RTE_ETH_MII_CRS_PORT GPIOH -#define RTE_ETH_MII_CRS_PIN 2 -#else -#error "Invalid ETH_MII_CRS Pin Configuration!" -#endif -// ETH_MII_COL Pin <0=>PA3 <1=>PH3 -#define RTE_ETH_MII_COL_PORT_ID 0 -#if (RTE_ETH_MII_COL_PORT_ID == 0) -#define RTE_ETH_MII_COL_PORT GPIOA -#define RTE_ETH_MII_COL_PIN 3 -#elif (RTE_ETH_MII_COL_PORT_ID == 1) -#define RTE_ETH_MII_COL_PORT GPIOH -#define RTE_ETH_MII_COL_PIN 3 -#else -#error "Invalid ETH_MII_COL Pin Configuration!" -#endif - -// - -// RMII (Reduced Media Independent Interface) -#define RTE_ETH_RMII 1 - -// ETH_RMII_TXD0 Pin <0=>PB12 <1=>PG13 -#define RTE_ETH_RMII_TXD0_PORT_ID 1 -#if (RTE_ETH_RMII_TXD0_PORT_ID == 0) -#define RTE_ETH_RMII_TXD0_PORT GPIOB -#define RTE_ETH_RMII_TXD0_PIN 12 -#elif (RTE_ETH_RMII_TXD0_PORT_ID == 1) -#define RTE_ETH_RMII_TXD0_PORT GPIOG -#define RTE_ETH_RMII_TXD0_PIN 13 -#else -#error "Invalid ETH_RMII_TXD0 Pin Configuration!" -#endif -// ETH_RMII_TXD1 Pin <0=>PB13 <1=>PG14 -#define RTE_ETH_RMII_TXD1_PORT_ID 1 -#if (RTE_ETH_RMII_TXD1_PORT_ID == 0) -#define RTE_ETH_RMII_TXD1_PORT GPIOB -#define RTE_ETH_RMII_TXD1_PIN 13 -#elif (RTE_ETH_RMII_TXD1_PORT_ID == 1) -#define RTE_ETH_RMII_TXD1_PORT GPIOG -#define RTE_ETH_RMII_TXD1_PIN 14 -#else -#error "Invalid ETH_RMII_TXD1 Pin Configuration!" -#endif -// ETH_RMII_TX_EN Pin <0=>PB11 <1=>PG11 -#define RTE_ETH_RMII_TX_EN_PORT_ID 1 -#if (RTE_ETH_RMII_TX_EN_PORT_ID == 0) -#define RTE_ETH_RMII_TX_EN_PORT GPIOB -#define RTE_ETH_RMII_TX_EN_PIN 11 -#elif (RTE_ETH_RMII_TX_EN_PORT_ID == 1) -#define RTE_ETH_RMII_TX_EN_PORT GPIOG -#define RTE_ETH_RMII_TX_EN_PIN 11 -#else -#error "Invalid ETH_RMII_TX_EN Pin Configuration!" -#endif -// ETH_RMII_RXD0 Pin <0=>PC4 -#define RTE_ETH_RMII_RXD0_PORT_ID 0 -#if (RTE_ETH_RMII_RXD0_PORT_ID == 0) -#define RTE_ETH_RMII_RXD0_PORT GPIOC -#define RTE_ETH_RMII_RXD0_PIN 4 -#else -#error "Invalid ETH_RMII_RXD0 Pin Configuration!" -#endif -// ETH_RMII_RXD1 Pin <0=>PC5 -#define RTE_ETH_RMII_RXD1_PORT_ID 0 -#if (RTE_ETH_RMII_RXD1_PORT_ID == 0) -#define RTE_ETH_RMII_RXD1_PORT GPIOC -#define RTE_ETH_RMII_RXD1_PIN 5 -#else -#error "Invalid ETH_RMII_RXD1 Pin Configuration!" -#endif -// ETH_RMII_REF_CLK Pin <0=>PA1 -#define RTE_ETH_RMII_REF_CLK_PORT_ID 0 -#if (RTE_ETH_RMII_REF_CLK_PORT_ID == 0) -#define RTE_ETH_RMII_REF_CLK_PORT GPIOA -#define RTE_ETH_RMII_REF_CLK_PIN 1 -#else -#error "Invalid ETH_RMII_REF_CLK Pin Configuration!" -#endif -// ETH_RMII_CRS_DV Pin <0=>PA7 -#define RTE_ETH_RMII_CRS_DV_PORT_ID 0 -#if (RTE_ETH_RMII_CRS_DV_PORT_ID == 0) -#define RTE_ETH_RMII_CRS_DV_PORT GPIOA -#define RTE_ETH_RMII_CRS_DV_PIN 7 -#else -#error "Invalid ETH_RMII_CRS_DV Pin Configuration!" -#endif - -// - -// Management Data Interface -// ETH_MDC Pin <0=>PC1 -#define RTE_ETH_MDI_MDC_PORT_ID 0 -#if (RTE_ETH_MDI_MDC_PORT_ID == 0) -#define RTE_ETH_MDI_MDC_PORT GPIOC -#define RTE_ETH_MDI_MDC_PIN 1 -#else -#error "Invalid ETH_MDC Pin Configuration!" -#endif -// ETH_MDIO Pin <0=>PA2 -#define RTE_ETH_MDI_MDIO_PORT_ID 0 -#if (RTE_ETH_MDI_MDIO_PORT_ID == 0) -#define RTE_ETH_MDI_MDIO_PORT GPIOA -#define RTE_ETH_MDI_MDIO_PIN 2 -#else -#error "Invalid ETH_MDIO Pin Configuration!" -#endif -// - -// Reference 25MHz/50MHz Clock generation -#define RTE_ETH_REF_CLOCK 0 - -// MCO Pin <0=>PA2 <1=>PC9 -#define RTE_ETH_REF_CLOCK_PORT_ID 0 -#if (RTE_ETH_REF_CLOCK_PORT_ID == 0) -#define RTE_ETH_REF_CLOCK_PORT GPIOA -#define RTE_ETH_REF_CLOCK_PIN 8 -#elif (RTE_ETH_REF_CLOCK_PORT_ID == 1) -#define RTE_ETH_REF_CLOCK_PORT GPIOC -#define RTE_ETH_REF_CLOCK_PIN 9 -#else -#error "Invalid MCO Pin Configuration!" -#endif - -// - -// - - -// USB OTG Full-speed -#define RTE_USB_OTG_FS 0 - -// Device [Driver_USBD0] -// Configuration settings for Driver_USBD0 in component ::Drivers:USB Device -#define RTE_USB_OTG_FS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_FS_DEV_EP 0x0000000F -#define RTE_USB_OTG_FS_DEV_EP_BULK 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_INT 0x000E000E -#define RTE_USB_OTG_FS_DEV_EP_ISO 0x000E000E - -// - -// Host [Driver_USBH0] -// Configuration settings for Driver_USBH0 in component ::Drivers:USB Host - -#define RTE_USB_OTG_FS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_VBUS_PIN 1 -#define RTE_OTG_FS_VBUS_ACTIVE 0 -#define RTE_OTG_FS_VBUS_PORT GPIO_PORT(7) -#define RTE_OTG_FS_VBUS_BIT 5 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_FS_OC_PIN 1 -#define RTE_OTG_FS_OC_ACTIVE 0 -#define RTE_OTG_FS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_FS_OC_BIT 11 -// - -// - - -// USB OTG High-speed -#define RTE_USB_OTG_HS 0 - -// PHY (Physical Layer) - -// PHY Interface -// <0=>On-chip full-speed PHY -// <1=>External ULPI high-speed PHY -#define RTE_USB_OTG_HS_PHY 1 - -// External ULPI Pins (UTMI+ Low Pin Interface) - -// OTG_HS_ULPI_CK Pin <0=>PA5 -#define RTE_USB_OTG_HS_ULPI_CK_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_CK_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_CK_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_CK_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_CK Pin Configuration!" -#endif -// OTG_HS_ULPI_DIR Pin <0=>PI11 <1=>PC2 -#define RTE_USB_OTG_HS_ULPI_DIR_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOI -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 11 -#elif (RTE_USB_OTG_HS_ULPI_DIR_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_DIR_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_DIR_PIN 2 -#else -#error "Invalid OTG_HS_ULPI_DIR Pin Configuration!" -#endif -// OTG_HS_ULPI_STP Pin <0=>PC0 -#define RTE_USB_OTG_HS_ULPI_STP_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_STP_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_STP_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_STP_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_STP Pin Configuration!" -#endif -// OTG_HS_ULPI_NXT Pin <0=>PC2 <1=>PH4 -#define RTE_USB_OTG_HS_ULPI_NXT_PORT_ID 1 -#if (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOC -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 2 -#elif (RTE_USB_OTG_HS_ULPI_NXT_PORT_ID == 1) -#define RTE_USB_OTG_HS_ULPI_NXT_PORT GPIOH -#define RTE_USB_OTG_HS_ULPI_NXT_PIN 4 -#else -#error "Invalid OTG_HS_ULPI_NXT Pin Configuration!" -#endif -// OTG_HS_ULPI_D0 Pin <0=>PA3 -#define RTE_USB_OTG_HS_ULPI_D0_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D0_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D0_PORT GPIOA -#define RTE_USB_OTG_HS_ULPI_D0_PIN 3 -#else -#error "Invalid OTG_HS_ULPI_D0 Pin Configuration!" -#endif -// OTG_HS_ULPI_D1 Pin <0=>PB0 -#define RTE_USB_OTG_HS_ULPI_D1_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D1_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D1_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D1_PIN 0 -#else -#error "Invalid OTG_HS_ULPI_D1 Pin Configuration!" -#endif -// OTG_HS_ULPI_D2 Pin <0=>PB1 -#define RTE_USB_OTG_HS_ULPI_D2_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D2_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D2_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D2_PIN 1 -#else -#error "Invalid OTG_HS_ULPI_D2 Pin Configuration!" -#endif -// OTG_HS_ULPI_D3 Pin <0=>PB10 -#define RTE_USB_OTG_HS_ULPI_D3_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D3_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D3_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D3_PIN 10 -#else -#error "Invalid OTG_HS_ULPI_D3 Pin Configuration!" -#endif -// OTG_HS_ULPI_D4 Pin <0=>PB11 -#define RTE_USB_OTG_HS_ULPI_D4_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D4_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D4_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D4_PIN 11 -#else -#error "Invalid OTG_HS_ULPI_D4 Pin Configuration!" -#endif -// OTG_HS_ULPI_D5 Pin <0=>PB12 -#define RTE_USB_OTG_HS_ULPI_D5_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D5_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D5_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D5_PIN 12 -#else -#error "Invalid OTG_HS_ULPI_D5 Pin Configuration!" -#endif -// OTG_HS_ULPI_D6 Pin <0=>PB13 -#define RTE_USB_OTG_HS_ULPI_D6_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D6_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D6_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D6_PIN 13 -#else -#error "Invalid OTG_HS_ULPI_D6 Pin Configuration!" -#endif -// OTG_HS_ULPI_D7 Pin <0=>PB5 -#define RTE_USB_OTG_HS_ULPI_D7_PORT_ID 0 -#if (RTE_USB_OTG_HS_ULPI_D7_PORT_ID == 0) -#define RTE_USB_OTG_HS_ULPI_D7_PORT GPIOB -#define RTE_USB_OTG_HS_ULPI_D7_PIN 5 -#else -#error "Invalid OTG_HS_ULPI_D7 Pin Configuration!" -#endif - -// - -// - -// Device [Driver_USBD1] -// Configuration settings for Driver_USBD1 in component ::Drivers:USB Device -#define RTE_USB_OTG_HS_DEV 1 - -// Endpoints -// Reduce memory requirements of Driver by disabling unused endpoints -// Endpoint 1 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 2 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 3 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 4 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// Endpoint 5 -// Bulk OUT -// Bulk IN -// Interrupt OUT -// Interrupt IN -// Isochronous OUT -// Isochronous IN -// -// -#define RTE_USB_OTG_HS_DEV_EP 0x0000003F -#define RTE_USB_OTG_HS_DEV_EP_BULK 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_INT 0x003E003E -#define RTE_USB_OTG_HS_DEV_EP_ISO 0x003E003E - -// - -// Host [Driver_USBH1] -// Configuration settings for Driver_USBH1 in component ::Drivers:USB Host -#define RTE_USB_OTG_HS_HOST 1 - -// VBUS Power On/Off Pin -// Configure Pin for driving VBUS -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_VBUS_PIN 1 -#define RTE_OTG_HS_VBUS_ACTIVE 0 -#define RTE_OTG_HS_VBUS_PORT GPIO_PORT(2) -#define RTE_OTG_HS_VBUS_BIT 2 - -// Overcurrent Detection Pin -// Configure Pin for overcurrent detection -// GPIO Pxy (x = A..H, y = 0..15) or (x = I, y = 0..11) -// Active State <0=>Low <1=>High -// Selects Active State Logical Level -// Port <0=>GPIOA <1=>GPIOB <2=>GPIOC <3=>GPIOD -// <4=>GPIOE <5=>GPIOF <6=>GPIOG <7=>GPIOH <8=>GPIOI -// Selects Port Name -// Bit <0-15> -// Selects Port Bit -// -#define RTE_OTG_HS_OC_PIN 1 -#define RTE_OTG_HS_OC_ACTIVE 0 -#define RTE_OTG_HS_OC_PORT GPIO_PORT(5) -#define RTE_OTG_HS_OC_BIT 12 -// - -// - - -// EXTI (External Interrupt/Event Controller) -#define RTE_EXTI 0 - -// EXTI0 Line -#define RTE_EXTI0 0 -// Pin <0=>PA0 <1=>PB0 <2=>PC0 <3=>PD0 <4=>PE0 <5=>PF0 <6=>PG0 <7=>PH0 <8=>PI0 -#define RTE_EXTI0_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI0_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI0_TRIGGER 0 -// - -// EXTI1 Line -#define RTE_EXTI1 0 -// Pin <0=>PA1 <1=>PB1 <2=>PC1 <3=>PD1 <4=>PE1 <5=>PF1 <6=>PG1 <7=>PH1 <8=>PI1 -#define RTE_EXTI1_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI1_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI1_TRIGGER 0 -// - -// EXTI2 Line -#define RTE_EXTI2 0 -// Pin <0=>PA2 <1=>PB2 <2=>PC2 <3=>PD2 <4=>PE2 <5=>PF2 <6=>PG2 <7=>PH2 <8=>PI2 -#define RTE_EXTI2_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI2_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI2_TRIGGER 0 -// - -// EXTI3 Line -#define RTE_EXTI3 0 -// Pin <0=>PA3 <1=>PB3 <2=>PC3 <3=>PD3 <4=>PE3 <5=>PF3 <6=>PG3 <7=>PH3 <8=>PI3 -#define RTE_EXTI3_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI3_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI3_TRIGGER 0 -// - -// EXTI4 Line -#define RTE_EXTI4 0 -// Pin <0=>PA4 <1=>PB4 <2=>PC4 <3=>PD4 <4=>PE4 <5=>PF4 <6=>PG4 <7=>PH4 <8=>PI4 -#define RTE_EXTI4_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI4_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI4_TRIGGER 0 -// - -// EXTI5 Line -#define RTE_EXTI5 0 -// Pin <0=>PA5 <1=>PB5 <2=>PC5 <3=>PD5 <4=>PE5 <5=>PF5 <6=>PG5 <7=>PH5 <8=>PI5 -#define RTE_EXTI5_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI5_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI5_TRIGGER 0 -// - -// EXTI6 Line -#define RTE_EXTI6 0 -// Pin <0=>PA6 <1=>PB6 <2=>PC6 <3=>PD6 <4=>PE6 <5=>PF6 <6=>PG6 <7=>PH6 <8=>PI6 -#define RTE_EXTI6_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI6_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI6_TRIGGER 0 -// - -// EXTI7 Line -#define RTE_EXTI7 0 -// Pin <0=>PA7 <1=>PB7 <2=>PC7 <3=>PD7 <4=>PE7 <5=>PF7 <6=>PG7 <7=>PH7 <8=>PI7 -#define RTE_EXTI7_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI7_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI7_TRIGGER 0 -// - -// EXTI8 Line -#define RTE_EXTI8 0 -// Pin <0=>PA8 <1=>PB8 <2=>PC8 <3=>PD8 <4=>PE8 <5=>PF8 <6=>PG8 <7=>PH8 <8=>PI8 -#define RTE_EXTI8_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI8_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI8_TRIGGER 0 -// - -// EXTI9 Line -#define RTE_EXTI9 0 -// Pin <0=>PA9 <1=>PB9 <2=>PC9 <3=>PD9 <4=>PE9 <5=>PF9 <6=>PG9 <7=>PH9 <8=>PI9 -#define RTE_EXTI9_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI9_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI9_TRIGGER 0 -// - -// EXTI10 Line -#define RTE_EXTI10 0 -// Pin <0=>PA10 <1=>PB10 <2=>PC10 <3=>PD10 <4=>PE10 <5=>PF10 <6=>PG10 <7=>PH10 <8=>PI10 -#define RTE_EXTI10_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI10_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI10_TRIGGER 0 -// - -// EXTI11 Line -#define RTE_EXTI11 0 -// Pin <0=>PA11 <1=>PB11 <2=>PC11 <3=>PD11 <4=>PE11 <5=>PF11 <6=>PG11 <7=>PH11 <8=>PI11 -#define RTE_EXTI11_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI11_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI11_TRIGGER 0 -// - -// EXTI12 Line -#define RTE_EXTI12 0 -// Pin <0=>PA12 <1=>PB12 <2=>PC12 <3=>PD12 <4=>PE12 <5=>PF12 <6=>PG12 <7=>PH12 -#define RTE_EXTI12_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI12_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI12_TRIGGER 0 -// - -// EXTI13 Line -#define RTE_EXTI13 0 -// Pin <0=>PA13 <1=>PB13 <2=>PC13 <3=>PD13 <4=>PE13 <5=>PF13 <6=>PG13 <7=>PH13 -#define RTE_EXTI13_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI13_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI13_TRIGGER 0 -// - -// EXTI14 Line -#define RTE_EXTI14 0 -// Pin <0=>PA14 <1=>PB14 <2=>PC14 <3=>PD14 <4=>PE14 <5=>PF14 <6=>PG14 <7=>PH14 -#define RTE_EXTI14_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI14_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI14_TRIGGER 0 -// - -// EXTI15 Line -#define RTE_EXTI15 0 -// Pin <0=>PA15 <1=>PB15 <2=>PC15 <3=>PD15 <4=>PE15 <5=>PF15 <6=>PG15 <7=>PH15 -#define RTE_EXTI15_PIN 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI15_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI15_TRIGGER 0 -// - -// EXTI16 Line: PVD Output -#define RTE_EXTI16 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI16_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI16_TRIGGER 0 -// - -// EXTI17 Line: RTC Alarm -#define RTE_EXTI17 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI17_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI17_TRIGGER 0 -// - -// EXTI18 Line: USB OTG FS Wakeup -#define RTE_EXTI18 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI18_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI18_TRIGGER 0 -// - -// EXTI19 Line: Ethernet Wakeup -#define RTE_EXTI19 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI19_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI19_TRIGGER 0 -// - -// EXTI20 Line: USB OTG HS Wakeup -#define RTE_EXTI20 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI20_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI20_TRIGGER 0 -// - -// EXTI21 Line: RTC Tamper and TimeStamp -#define RTE_EXTI21 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI21_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI21_TRIGGER 0 -// - -// EXTI22 Line: RTC Wakeup -#define RTE_EXTI22 0 -// Mode <0=>Interrupt <1=>Event -#define RTE_EXTI22_MODE 0 -// Trigger <0=>None <1=>Raising edge <2=>Falling edge <3=>Any edge -#define RTE_EXTI22_TRIGGER 0 -// - -// - - -// FSMC (Flexible Static Memory Controller) -#define RTE_FSMC 0 - -// Pin Configuration -// Configure Pins -#define RTE_FSMC_PINS 0 - -// Address Bus Pins -// <0=>A[17:16] -// <1=>A[10:0] <2=>A[15:0] <3=>A[16:0] <4=>A[17:0] -// <5=>A[18:0] <6=>A[19:0] <7=>A[20:0] <8=>A[21:0] -// <9=>A[22:0] <10=>A[23:0] <11=>A[24:0] <12=>A[25:0] -#define RTE_FSMC_ABUS_PINS 10 -// Data Bus Pins <0=>D[7:0] <1=>D[15:0] -#define RTE_FSMC_DBUS_PINS 0 -// FSMC_NOE Pin -#define RTE_FSMC_NOE_PIN 0 -// FSMC_NWE Pin -#define RTE_FSMC_NWE_PIN 0 -// FSMC_NBL0 Pin -#define RTE_FSMC_NBL0_PIN 0 -// FSMC_NBL1 Pin -#define RTE_FSMC_NBL1_PIN 0 -// FSMC_NL Pin -#define RTE_FSMC_NL_PIN 0 -// FSMC_NWAIT Pin -#define RTE_FSMC_NWAIT_PIN 0 -// FSMC_CLK Pin -#define RTE_FSMC_CLK_PIN 0 -// FSMC_NE1/NCE2 Pin -#define RTE_FSMC_NE1_PIN 0 -// FSMC_NE2/NCE3 Pin -#define RTE_FSMC_NE2_PIN 0 -// FSMC_NE3/NCE4_1 Pin -#define RTE_FSMC_NE3_PIN 0 -// FSMC_NE4 Pin -#define RTE_FSMC_NE4_PIN 0 -// FSMC_NCE4_2 Pin -#define RTE_FSMC_NCE42_PIN 0 -// FSMC_INT2 Pin -#define RTE_FSMC_INT2_PIN 0 -// FSMC_INT3 Pin -#define RTE_FSMC_INT3_PIN 0 -// FSMC_INTR Pin -#define RTE_FSMC_INTR_PIN 0 -// FSMC_NIORD Pin -#define RTE_FSMC_NIORD_PIN 0 -// FSMC_NIOWR Pin -#define RTE_FSMC_NIOWR_PIN 0 -// FSMC_NREG Pin -#define RTE_FSMC_NREG_PIN 0 -// FSMC_CD Pin -#define RTE_FSMC_CD_PIN 0 - -// - -// NOR Flash / PSRAM Controller - -// FSMC_NE1 Chip Select -// Configure Device on Chip Select FSMC_NE1 -#define RTE_FSMC_NE1 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR1_CBURSTRW 0 -#define RTE_FSMC_BCR1_ASYNCWAIT 0 -#define RTE_FSMC_BCR1_EXTMOD 0 -#define RTE_FSMC_BCR1_WAITEN 1 -#define RTE_FSMC_BCR1_WREN 1 -#define RTE_FSMC_BCR1_WAITCFG 0 -#define RTE_FSMC_BCR1_WRAPMOD 0 -#define RTE_FSMC_BCR1_WAITPOL 0 -#define RTE_FSMC_BCR1_BURSTEN 0 -#define RTE_FSMC_BCR1_FACCEN 1 -#define RTE_FSMC_BCR1_MWID 1 -#define RTE_FSMC_BCR1_MTYP 2 -#define RTE_FSMC_BCR1_MUXEN 1 -#define RTE_FSMC_BCR1_MBKEN 1 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR1_ACCMOD 0 -#define RTE_FSMC_BTR1_DATLAT 15 -#define RTE_FSMC_BTR1_CLKDIV 15 -#define RTE_FSMC_BTR1_BUSTURN 15 -#define RTE_FSMC_BTR1_DATAST 255 -#define RTE_FSMC_BTR1_ADDHLD 15 -#define RTE_FSMC_BTR1_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR1_ACCMOD 0 -#define RTE_FSMC_BWTR1_DATLAT 15 -#define RTE_FSMC_BWTR1_CLKDIV 15 -#define RTE_FSMC_BWTR1_BUSTURN 15 -#define RTE_FSMC_BWTR1_DATAST 255 -#define RTE_FSMC_BWTR1_ADDHLD 15 -#define RTE_FSMC_BWTR1_ADDSET 15 -// -// - -// FSMC_NE2 Chip Select -// Configure Device on Chip Select FSMC_NE2 -#define RTE_FSMC_NE2 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR2_CBURSTRW 0 -#define RTE_FSMC_BCR2_ASYNCWAIT 0 -#define RTE_FSMC_BCR2_EXTMOD 0 -#define RTE_FSMC_BCR2_WAITEN 1 -#define RTE_FSMC_BCR2_WREN 1 -#define RTE_FSMC_BCR2_WAITCFG 0 -#define RTE_FSMC_BCR2_WRAPMOD 0 -#define RTE_FSMC_BCR2_WAITPOL 0 -#define RTE_FSMC_BCR2_BURSTEN 0 -#define RTE_FSMC_BCR2_FACCEN 1 -#define RTE_FSMC_BCR2_MWID 1 -#define RTE_FSMC_BCR2_MTYP 0 -#define RTE_FSMC_BCR2_MUXEN 1 -#define RTE_FSMC_BCR2_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR2_ACCMOD 0 -#define RTE_FSMC_BTR2_DATLAT 15 -#define RTE_FSMC_BTR2_CLKDIV 15 -#define RTE_FSMC_BTR2_BUSTURN 15 -#define RTE_FSMC_BTR2_DATAST 255 -#define RTE_FSMC_BTR2_ADDHLD 15 -#define RTE_FSMC_BTR2_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR2_ACCMOD 0 -#define RTE_FSMC_BWTR2_DATLAT 15 -#define RTE_FSMC_BWTR2_CLKDIV 15 -#define RTE_FSMC_BWTR2_BUSTURN 15 -#define RTE_FSMC_BWTR2_DATAST 255 -#define RTE_FSMC_BWTR2_ADDHLD 15 -#define RTE_FSMC_BWTR2_ADDSET 15 -// -// - -// FSMC_NE3 Chip Select -// Configure Device on Chip Select FSMC_NE3 -#define RTE_FSMC_NE3 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR3_CBURSTRW 0 -#define RTE_FSMC_BCR3_ASYNCWAIT 0 -#define RTE_FSMC_BCR3_EXTMOD 0 -#define RTE_FSMC_BCR3_WAITEN 1 -#define RTE_FSMC_BCR3_WREN 1 -#define RTE_FSMC_BCR3_WAITCFG 0 -#define RTE_FSMC_BCR3_WRAPMOD 0 -#define RTE_FSMC_BCR3_WAITPOL 0 -#define RTE_FSMC_BCR3_BURSTEN 0 -#define RTE_FSMC_BCR3_FACCEN 1 -#define RTE_FSMC_BCR3_MWID 1 -#define RTE_FSMC_BCR3_MTYP 0 -#define RTE_FSMC_BCR3_MUXEN 1 -#define RTE_FSMC_BCR3_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR3_ACCMOD 0 -#define RTE_FSMC_BTR3_DATLAT 15 -#define RTE_FSMC_BTR3_CLKDIV 15 -#define RTE_FSMC_BTR3_BUSTURN 15 -#define RTE_FSMC_BTR3_DATAST 255 -#define RTE_FSMC_BTR3_ADDHLD 15 -#define RTE_FSMC_BTR3_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR3_ACCMOD 0 -#define RTE_FSMC_BWTR3_DATLAT 15 -#define RTE_FSMC_BWTR3_CLKDIV 15 -#define RTE_FSMC_BWTR3_BUSTURN 15 -#define RTE_FSMC_BWTR3_DATAST 255 -#define RTE_FSMC_BWTR3_ADDHLD 15 -#define RTE_FSMC_BWTR3_ADDSET 15 -// -// - -// FSMC_NE4 Chip Select -// Configure Device on Chip Select FSMC_NE4 -#define RTE_FSMC_NE4 0 - -// Chip-select control -// CBURSTRW: Write burst enable <0=>Asynchronous write <1=>Synchronous write -// For Cellular RAM, this enables synchronous burst protocol during write operations. For Flash -// memory access in burst mode, this enables/disables the wait state insertion via the NWAIT signal. -// ASYNCWAIT: Wait signal during asynchronous transfer -// Enables the FSMC to use the wait signal even during an asynchronous protocol. -// EXTMOD: Extended mode enable -// Enables the FSMC to program inside the write timing register, so it allows different timings for read and write. -// WAITEN: Wait enable -// For Flash memory access in burst mode, this enables/disables wait-state insertion via the NWAIT signal. -// WREN: Write enable -// Enable/disable write operations in the current bank by the FSMC -// WAITCFG: Wait timing configuration <0=> NWAIT active before wait state <1=>NWAIT active during wait state -// For memory access in burst mode, the NWAIT signal indicates whether the data from the memory -// are valid or if a wait state must be inserted. This configuration bit determines if NWAIT is asserted -// by the memory one clock cycle before the wait state or during the wait state -// WAITPOL: Wait signal polarity <0=>NWAIT active low <1=>NWAIT active high -// Defines the polarity of the wait signal from memory. Valid only when accessing the memory in burst mode. -// BURSTEN: Burst enable -// Enables the burst access mode for the memory. Valid only with synchronous burst memories. -// FACCEN: Flash access enable -// Enables NOR Flash memory access operations. -// MWID: Memory databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width, valid for all type of memories. -// MTYP: Memory type <0=>SRAM, ROM <1=>PSRAM (Cellular RAM: CRAM) <2=>NOR Flash/OneNAND Flash -// Defines the type of external memory attached to the corresponding memory bank. -// MUXEN: Address/data multiplexing enable -// When enabled, the address and data values are multiplexed on the databus, valid only with NOR and PSRAM memories. -// MBKEN: Memory bank enable -// Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a -// disabled bank causes an ERROR on AHB bus. -#define RTE_FSMC_BCR4_CBURSTRW 0 -#define RTE_FSMC_BCR4_ASYNCWAIT 0 -#define RTE_FSMC_BCR4_EXTMOD 0 -#define RTE_FSMC_BCR4_WAITEN 1 -#define RTE_FSMC_BCR4_WREN 1 -#define RTE_FSMC_BCR4_WAITCFG 0 -#define RTE_FSMC_BCR4_WRAPMOD 0 -#define RTE_FSMC_BCR4_WAITPOL 0 -#define RTE_FSMC_BCR4_BURSTEN 0 -#define RTE_FSMC_BCR4_FACCEN 1 -#define RTE_FSMC_BCR4_MWID 1 -#define RTE_FSMC_BCR4_MTYP 0 -#define RTE_FSMC_BCR4_MUXEN 1 -#define RTE_FSMC_BCR4_MBKEN 0 -// - -// Chip-select timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with synchronous burst mode enabled, defines the number of memory clock -// cycles (+2) to issue to the memory before getting the first data: -// 0000: Data latency of 2 CLK clock cycles for first burst access -// 1111: Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) -// periods. In asynchronous NOR Flash, SRAM or ROM accesses, this value is don't care. -// In the case of CRAM, this field must be set to ‘0’. -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles: -// 0000: Reserved -// 0001: CLK period = 2 × HCLK periods -// 0010: CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Define the bus turnaround delay after a read access only -// from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive -// addresses on the databus for the next side-by-side transaction. BUSTURN can be set to the -// minimum if the slowest memory does not take more than 6 HCLK clock cycles to put the -// databus in Hi-Z state. -// These bits are written by software to add a delay at the end of a write/read transaction. This -// delay allows to match the minimum time between consecutive transactions (tEHEL from NEx -// high to NEx low) and the maximum time needed by the memory to free the data bus after a -// read access (tEHQZ): -// (BUSTRUN + 1)HCLK period = tEHELmin and (BUSTRUN + 2)HCLK period = tEHQZmax if -// EXTMOD = ‘0’ -// (BUSTRUN + 2)HCLK period = max (tEHELmin, tEHQZmax) if EXTMOD = ‘1’. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 × HCLK clock cycles (default value after reset) -// DATAST: Data phase duration <1-255> -// Define the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Define the duration of the address hold phase used in mode D and multiplexed accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration =1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is not used, the address hold phase is always 1 -// memory clock period duration. -// ADDSET: Address setup phase duration <0-15> -// Define the duration of the address setup phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 1615 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don’t care. -#define RTE_FSMC_BTR4_ACCMOD 0 -#define RTE_FSMC_BTR4_DATLAT 15 -#define RTE_FSMC_BTR4_CLKDIV 15 -#define RTE_FSMC_BTR4_BUSTURN 15 -#define RTE_FSMC_BTR4_DATAST 255 -#define RTE_FSMC_BTR4_ADDHLD 15 -#define RTE_FSMC_BTR4_ADDSET 15 -// - -// Write timing -// ACCMOD: Access mode <0=>Mode A <1=>Mode B <2=>Mode C <3=>Mode D -// Specifies the asynchronous access modes. Access mode is taken into account only when -// Extended mode is enabled in the Chip-select control register. -// DATLAT: Data latency <0-15> -// For NOR Flash with Synchronous burst mode enabled, defines the number of memory clock cycles -// (+2) to issue to the memory before getting the first data. -// 0000: (0x0) Data latency of 2 CLK clock cycles for first burst access -// ... -// 1111: (0xF) Data latency of 17 CLK clock cycles for first burst access (default value after reset) -// Note: This timing parameter is not expressed in HCLK periods, but in Flash clock (CLK) periods. In -// asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. In case of -// CRAM, this field must be set to 0 -// CLKDIV: Clock divide ratio (for CLK signal) <1-15> -// Defines the period of CLK clock output signal, expressed in number of HCLK cycles. -// 0000: Reserved -// 0001 CLK period = 2 × HCLK periods -// 0010 CLK period = 3 × HCLK periods -// 1111: CLK period = 16 × HCLK periods (default value after reset) -// In asynchronous NOR Flash, SRAM or ROM accesses, this value is don’t care. -// BUSTURN: Bus turnaround phase duration <0-15> -// Defines a delay at the end of a write transaction to match the minimum time between consecutive transactions (tEHEL from ENx high to ENx low). -// (BUSTRUN + 1) HCLK period = tEHELmin. -// 0000: BUSTURN phase duration = 0 HCLK clock cycle added -// ... -// 1111: BUSTURN phase duration = 15 HCLK clock cycles added (default value after reset) -// DATAST: Data phase duration <1-255> -// Defines the duration of the data phase used in SRAMs, ROMs and asynchronous NOR Flash accesses. -// 0000 0000: Reserved -// 0000 0001: DATAST phase duration = 1 × HCLK clock cycles -// 0000 0010: DATAST phase duration = 2 × HCLK clock cycles -// ... -// 1111 1111: DATAST phase duration = 255 × HCLK clock cycles (default value after reset) -// Note: In synchronous accesses, this value is don't care. -// ADDHLD: Address hold phase duration <1-15> -// Defines the duration of the address hold phase used in SRAMs, ROMs and asynchronous multiplexed NOR Flash accesses. -// 0000: Reserved -// 0001: ADDHLD phase duration = 1 × HCLK clock cycle -// 0010: ADDHLD phase duration = 2 × HCLK clock cycle -// ... -// 1111: ADDHLD phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration. -// ADDSET: Address setup phase duration <1-15> -// Defines the duration of the address setup phase in HCLK cycles used in SRAMs, ROMs and asynchronous NOR Flash accessed. -// 0000: ADDSET phase duration = 0 × HCLK clock cycle -// ... -// 1111: ADDSET phase duration = 15 × HCLK clock cycles (default value after reset) -// Note: In synchronous NOR Flash accesses, this value is don’t care. -#define RTE_FSMC_BWTR4_ACCMOD 0 -#define RTE_FSMC_BWTR4_DATLAT 15 -#define RTE_FSMC_BWTR4_CLKDIV 15 -#define RTE_FSMC_BWTR4_BUSTURN 15 -#define RTE_FSMC_BWTR4_DATAST 255 -#define RTE_FSMC_BWTR4_ADDHLD 15 -#define RTE_FSMC_BWTR4_ADDSET 15 -// -// - -// - -// NAND Flash Controller - -// FSMC_NCE2 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE2 -#define RTE_FSMC_NCE2 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR2_ECCPS 0 -#define RTE_FSMC_PCR2_TAR 0 -#define RTE_FSMC_PCR2_TCLR 0 -#define RTE_FSMC_PCR2_ECCEN 0 -#define RTE_FSMC_PCR2_PWID 0 -#define RTE_FSMC_PCR2_PTYP 1 -#define RTE_FSMC_PCR2_PBKEN 0 -#define RTE_FSMC_PCR2_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR2_IFEN 0 -#define RTE_FSMC_SR2_ILEN 0 -#define RTE_FSMC_SR2_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM2_MEMHIZ 255 -#define RTE_FSMC_PMEM2_MEMHOLD 255 -#define RTE_FSMC_PMEM2_MEMWAIT 255 -#define RTE_FSMC_PMEM2_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT2_ATTHIZ 255 -#define RTE_FSMC_PATT2_ATTHOLD 255 -#define RTE_FSMC_PATT2_ATTWAIT 255 -#define RTE_FSMC_PATT2_ATTSET 255 - -// - -// - -// FSMC_NCE3 Chip Select -// Configure NAND Device on Chip Select FSMC_NCE3 -#define RTE_FSMC_NCE3 0 - -// NAND Flash Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <1=>NAND Flash -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: NAND Flash memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR3_ECCPS 0 -#define RTE_FSMC_PCR3_TAR 0 -#define RTE_FSMC_PCR3_TCLR 0 -#define RTE_FSMC_PCR3_ECCEN 0 -#define RTE_FSMC_PCR3_PWID 0 -#define RTE_FSMC_PCR3_PTYP 1 -#define RTE_FSMC_PCR3_PBKEN 0 -#define RTE_FSMC_PCR3_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR3_IFEN 0 -#define RTE_FSMC_SR3_ILEN 0 -#define RTE_FSMC_SR3_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM3_MEMHIZ 255 -#define RTE_FSMC_PMEM3_MEMHOLD 255 -#define RTE_FSMC_PMEM3_MEMWAIT 255 -#define RTE_FSMC_PMEM3_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT3_ATTHIZ 255 -#define RTE_FSMC_PATT3_ATTHOLD 255 -#define RTE_FSMC_PATT3_ATTWAIT 255 -#define RTE_FSMC_PATT3_ATTSET 255 - -// - -// - -// - -// PC Card Controller - -// FSMC_NCE4_x Chip Select -// Configure PC Card/CompactFlash Device on Chip Select FSMC_NCE4_1/FSMC_NCE4_2 -#define RTE_FSMC_NCE4 0 - -// PC Card Control -// ECCPS: ECC page size <0=> 256 bytes <1=> 512 bytes <2=> 1024 bytes <3=> 2048 bytes <4=> 4096 bytes <5=> 8192 bytes -// Defines the page size for the extended ECC. -// TAR: ALE to RE delay <0-15> -// Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). -// Time is: t_ar = (TAR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// TCLR: CLE to RE delay <0-15> -// Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). -// Time is t_clr = (TCLR + SET + 2) × THCLK where THCLK is the HCLK clock period -// 0000: 1 HCLK cycle (default) -// 1111: 16 HCLK cycles -// Note: SET is MEMSET or ATTSET according to the addressed space. -// ECCEN: ECC computation logic enable -// PWID: Databus width <0=>8 bits <1=>16 bits -// Defines the external memory device width. -// PTYP: Memory type <0=>PC Card, CompactFlash, CF+ or PCMCIOA -// Defines the type of device attached to the corresponding memory bank. -// PBKEN: PC Card memory bank enable -// Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus. -// PWAITEN: Wait feature enable -// Enables the Wait feature for the PC Card/NAND Flash memory bank. -#define RTE_FSMC_PCR4_ECCPS 0 -#define RTE_FSMC_PCR4_TAR 0 -#define RTE_FSMC_PCR4_TCLR 0 -#define RTE_FSMC_PCR4_ECCEN 0 -#define RTE_FSMC_PCR4_PWID 0 -#define RTE_FSMC_PCR4_PTYP 0 -#define RTE_FSMC_PCR4_PBKEN 0 -#define RTE_FSMC_PCR4_PWAITEN 0 - -// - -// Interrupt configuration -// IFEN: Falling edge detection enable -// ILEN: High-level detection enable -// IREN: Rising edge detection enable -#define RTE_FSMC_SR4_IFEN 0 -#define RTE_FSMC_SR4_ILEN 0 -#define RTE_FSMC_SR4_IREN 0 - -// - -// Common memory space timing -// MEMHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// MEMWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access to. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deasserting NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the Card deasserting NWAIT) (default value after reset) -// MEMSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 2 HCLK cycles (for NAND Flash) -// 1111 1111: 257 HCLK cycles (for NAND Flash) (default value after reset) -#define RTE_FSMC_PMEM4_MEMHIZ 255 -#define RTE_FSMC_PMEM4_MEMHOLD 255 -#define RTE_FSMC_PMEM4_MEMWAIT 255 -#define RTE_FSMC_PMEM4_MEMSET 255 - -// - -// Attribute memory space timing -// ATTHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a NAND Flash write access. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// ATTWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, -// NOE), for NAND Flash read or write access. The duration for command assertion -// is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value. -// 0000 0000: reserved -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles (+ wait cycle introduced by the card deasserting NWAIT) -// ATTSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up address before the command -// assertion (NWE, NOE), for NAND Flash read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PATT4_ATTHIZ 255 -#define RTE_FSMC_PATT4_ATTHOLD 255 -#define RTE_FSMC_PATT4_ATTWAIT 255 -#define RTE_FSMC_PATT4_ATTSET 255 - -// - -// I/O space timing -// IOHIZ: Databus HiZ time <0-255> -// Defines the number of HCLK clock cycles during which the databus is kept in HiZ after the -// start of a PC Card write access. Only valid for write transaction. -// 0000 0000: 0 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOHOLD: Hold time <1-255> -// Defines the number of HCLK clock cycles to hold address (and data for write access) after -// the command deassertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: reserved -// 0000 0001: 1 HCLK cycle -// 1111 1111: 255 HCLK cycles (default value after reset) -// IOWAIT: Wait time <1-255> -// Defines the minimum number of HCLK (+1) clock cycles to assert the command (SMNWE, -// SMNOE), for PC Card read or write access. The duration for command assertion is -// extended if the wait signal (NWAIT) is active (low) at the end of the -// programmed value of HCLK. -// 0000 0000: reserved, do not use this value -// 0000 0001: 2 HCLK cycles (+ wait cycle introduced by deassertion of NWAIT) -// 1111 1111: 256 HCLK cycles -// IOSET: Setup time <0-255> -// Defines the number of HCLK (+1) clock cycles to set up the address before the command -// assertion (NWE, NOE), for PC Card read or write access. -// 0000 0000: 1 HCLK cycle -// 1111 1111: 256 HCLK cycles (default value after reset) -#define RTE_FSMC_PIO4_IOHIZ 255 -#define RTE_FSMC_PIO4_IOHOLD 255 -#define RTE_FSMC_PIO4_IOWAIT 255 -#define RTE_FSMC_PIO4_IOSET 255 - -// - -// - -// - -// - - -#endif /* __RTE_DEVICE_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s deleted file mode 100644 index b2a3fc40..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s +++ /dev/null @@ -1,419 +0,0 @@ -;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** -;* File Name : startup_stm32f2xx.s -;* Author : MCD Application Team -;* Version : V1.0.0 -;* Date : 18-April-2011 -;* Description : STM32F2xx devices vector table for MDK-ARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Set the initial PC == Reset_Handler -;* - Set the vector table entries with the exceptions ISR address -;* - Branches to __main in the C library (which eventually -;* calls main()). -;* After Reset the CortexM3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;* <<< Use Configuration Wizard in Context Menu >>> -;******************************************************************************* -; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -;******************************************************************************* - -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00004000 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x0000A000 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - - -; Vector Table Mapped to Address 0 at Reset - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window WatchDog - DCD PVD_IRQHandler ; PVD through EXTI Line detection - DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line - DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line - DCD FLASH_IRQHandler ; FLASH - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line0 - DCD EXTI1_IRQHandler ; EXTI Line1 - DCD EXTI2_IRQHandler ; EXTI Line2 - DCD EXTI3_IRQHandler ; EXTI Line3 - DCD EXTI4_IRQHandler ; EXTI Line4 - DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0 - DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1 - DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2 - DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3 - DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4 - DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5 - DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6 - DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s - DCD CAN1_TX_IRQHandler ; CAN1 TX - DCD CAN1_RX0_IRQHandler ; CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; External Line[9:5]s - DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9 - DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10 - DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11 - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; External Line[15:10]s - DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line - DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line - DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12 - DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13 - DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14 - DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare - DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7 - DCD FSMC_IRQHandler ; FSMC - DCD SDIO_IRQHandler ; SDIO - DCD TIM5_IRQHandler ; TIM5 - DCD SPI3_IRQHandler ; SPI3 - DCD UART4_IRQHandler ; UART4 - DCD UART5_IRQHandler ; UART5 - DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors - DCD TIM7_IRQHandler ; TIM7 - DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0 - DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1 - DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2 - DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3 - DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4 - DCD ETH_IRQHandler ; Ethernet - DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line - DCD CAN2_TX_IRQHandler ; CAN2 TX - DCD CAN2_RX0_IRQHandler ; CAN2 RX0 - DCD CAN2_RX1_IRQHandler ; CAN2 RX1 - DCD CAN2_SCE_IRQHandler ; CAN2 SCE - DCD OTG_FS_IRQHandler ; USB OTG FS - DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5 - DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6 - DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7 - DCD USART6_IRQHandler ; USART6 - DCD I2C3_EV_IRQHandler ; I2C3 event - DCD I2C3_ER_IRQHandler ; I2C3 error - DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out - DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In - DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI - DCD OTG_HS_IRQHandler ; USB OTG HS - DCD DCMI_IRQHandler ; DCMI - DCD CRYP_IRQHandler ; CRYP crypto - DCD HASH_RNG_IRQHandler ; Hash and Rng -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -; Reset handler -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -; Dummy Exception Handlers (infinite loops which can be modified) - -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC - - EXPORT WWDG_IRQHandler [WEAK] - EXPORT PVD_IRQHandler [WEAK] - EXPORT TAMP_STAMP_IRQHandler [WEAK] - EXPORT RTC_WKUP_IRQHandler [WEAK] - EXPORT FLASH_IRQHandler [WEAK] - EXPORT RCC_IRQHandler [WEAK] - EXPORT EXTI0_IRQHandler [WEAK] - EXPORT EXTI1_IRQHandler [WEAK] - EXPORT EXTI2_IRQHandler [WEAK] - EXPORT EXTI3_IRQHandler [WEAK] - EXPORT EXTI4_IRQHandler [WEAK] - EXPORT DMA1_Stream0_IRQHandler [WEAK] - EXPORT DMA1_Stream1_IRQHandler [WEAK] - EXPORT DMA1_Stream2_IRQHandler [WEAK] - EXPORT DMA1_Stream3_IRQHandler [WEAK] - EXPORT DMA1_Stream4_IRQHandler [WEAK] - EXPORT DMA1_Stream5_IRQHandler [WEAK] - EXPORT DMA1_Stream6_IRQHandler [WEAK] - EXPORT ADC_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - EXPORT EXTI9_5_IRQHandler [WEAK] - EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK] - EXPORT TIM1_UP_TIM10_IRQHandler [WEAK] - EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK] - EXPORT TIM1_CC_IRQHandler [WEAK] - EXPORT TIM2_IRQHandler [WEAK] - EXPORT TIM3_IRQHandler [WEAK] - EXPORT TIM4_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT USART2_IRQHandler [WEAK] - EXPORT USART3_IRQHandler [WEAK] - EXPORT EXTI15_10_IRQHandler [WEAK] - EXPORT RTC_Alarm_IRQHandler [WEAK] - EXPORT OTG_FS_WKUP_IRQHandler [WEAK] - EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK] - EXPORT TIM8_UP_TIM13_IRQHandler [WEAK] - EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK] - EXPORT TIM8_CC_IRQHandler [WEAK] - EXPORT DMA1_Stream7_IRQHandler [WEAK] - EXPORT FSMC_IRQHandler [WEAK] - EXPORT SDIO_IRQHandler [WEAK] - EXPORT TIM5_IRQHandler [WEAK] - EXPORT SPI3_IRQHandler [WEAK] - EXPORT UART4_IRQHandler [WEAK] - EXPORT UART5_IRQHandler [WEAK] - EXPORT TIM6_DAC_IRQHandler [WEAK] - EXPORT TIM7_IRQHandler [WEAK] - EXPORT DMA2_Stream0_IRQHandler [WEAK] - EXPORT DMA2_Stream1_IRQHandler [WEAK] - EXPORT DMA2_Stream2_IRQHandler [WEAK] - EXPORT DMA2_Stream3_IRQHandler [WEAK] - EXPORT DMA2_Stream4_IRQHandler [WEAK] - EXPORT ETH_IRQHandler [WEAK] - EXPORT ETH_WKUP_IRQHandler [WEAK] - EXPORT CAN2_TX_IRQHandler [WEAK] - EXPORT CAN2_RX0_IRQHandler [WEAK] - EXPORT CAN2_RX1_IRQHandler [WEAK] - EXPORT CAN2_SCE_IRQHandler [WEAK] - EXPORT OTG_FS_IRQHandler [WEAK] - EXPORT DMA2_Stream5_IRQHandler [WEAK] - EXPORT DMA2_Stream6_IRQHandler [WEAK] - EXPORT DMA2_Stream7_IRQHandler [WEAK] - EXPORT USART6_IRQHandler [WEAK] - EXPORT I2C3_EV_IRQHandler [WEAK] - EXPORT I2C3_ER_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK] - EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK] - EXPORT OTG_HS_WKUP_IRQHandler [WEAK] - EXPORT OTG_HS_IRQHandler [WEAK] - EXPORT DCMI_IRQHandler [WEAK] - EXPORT CRYP_IRQHandler [WEAK] - EXPORT HASH_RNG_IRQHandler [WEAK] - -WWDG_IRQHandler -PVD_IRQHandler -TAMP_STAMP_IRQHandler -RTC_WKUP_IRQHandler -FLASH_IRQHandler -RCC_IRQHandler -EXTI0_IRQHandler -EXTI1_IRQHandler -EXTI2_IRQHandler -EXTI3_IRQHandler -EXTI4_IRQHandler -DMA1_Stream0_IRQHandler -DMA1_Stream1_IRQHandler -DMA1_Stream2_IRQHandler -DMA1_Stream3_IRQHandler -DMA1_Stream4_IRQHandler -DMA1_Stream5_IRQHandler -DMA1_Stream6_IRQHandler -ADC_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler -EXTI9_5_IRQHandler -TIM1_BRK_TIM9_IRQHandler -TIM1_UP_TIM10_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler -TIM1_CC_IRQHandler -TIM2_IRQHandler -TIM3_IRQHandler -TIM4_IRQHandler -I2C1_EV_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -SPI1_IRQHandler -SPI2_IRQHandler -USART1_IRQHandler -USART2_IRQHandler -USART3_IRQHandler -EXTI15_10_IRQHandler -RTC_Alarm_IRQHandler -OTG_FS_WKUP_IRQHandler -TIM8_BRK_TIM12_IRQHandler -TIM8_UP_TIM13_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler -TIM8_CC_IRQHandler -DMA1_Stream7_IRQHandler -FSMC_IRQHandler -SDIO_IRQHandler -TIM5_IRQHandler -SPI3_IRQHandler -UART4_IRQHandler -UART5_IRQHandler -TIM6_DAC_IRQHandler -TIM7_IRQHandler -DMA2_Stream0_IRQHandler -DMA2_Stream1_IRQHandler -DMA2_Stream2_IRQHandler -DMA2_Stream3_IRQHandler -DMA2_Stream4_IRQHandler -ETH_IRQHandler -ETH_WKUP_IRQHandler -CAN2_TX_IRQHandler -CAN2_RX0_IRQHandler -CAN2_RX1_IRQHandler -CAN2_SCE_IRQHandler -OTG_FS_IRQHandler -DMA2_Stream5_IRQHandler -DMA2_Stream6_IRQHandler -DMA2_Stream7_IRQHandler -USART6_IRQHandler -I2C3_EV_IRQHandler -I2C3_ER_IRQHandler -OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_IN_IRQHandler -OTG_HS_WKUP_IRQHandler -OTG_HS_IRQHandler -DCMI_IRQHandler -CRYP_IRQHandler -HASH_RNG_IRQHandler - - B . - - ENDP - - ALIGN - -;******************************************************************************* -; User Stack and Heap initialization -;******************************************************************************* - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap - - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - - ALIGN - - ENDIF - - END - -;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE***** diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c deleted file mode 100644 index da0e189c..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c +++ /dev/null @@ -1,536 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f2xx.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-April-2011 - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * This file contains the system clock configuration for STM32F2xx devices, - * and is generated by the clock configuration tool - * "STM32f2xx_Clock_Configuration_V1.0.0.xls" - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * and Divider factors, AHB/APBx prescalers and Flash settings), - * depending on the configuration made in the clock xls tool. - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f2xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f2xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. If the system clock source selected by user fails to startup, the SystemInit() - * function will do nothing and HSI still used as system clock source. User can - * add some code to deal with this issue inside the SetSysClock() function. - * - * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define - * in "stm32f2xx.h" file. When HSE is used as system clock source, directly or - * through PLL, and you are using different crystal you have to adapt the HSE - * value to your own configuration. - * - * 5. This file configures the system clock as follows: - *============================================================================= - *============================================================================= - * Supported STM32F2xx device revision | Rev B and Y - *----------------------------------------------------------------------------- - * System Clock source | PLL (HSE) - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 120000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 4 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 2 - *----------------------------------------------------------------------------- - * HSE Frequency(Hz) | 25000000 - *----------------------------------------------------------------------------- - * PLL_M | 25 - *----------------------------------------------------------------------------- - * PLL_N | 240 - *----------------------------------------------------------------------------- - * PLL_P | 2 - *----------------------------------------------------------------------------- - * PLL_Q | 5 - *----------------------------------------------------------------------------- - * PLLI2S_N | NA - *----------------------------------------------------------------------------- - * PLLI2S_R | NA - *----------------------------------------------------------------------------- - * I2S input clock | NA - *----------------------------------------------------------------------------- - * VDD(V) | 3.3 - *----------------------------------------------------------------------------- - * Flash Latency(WS) | 3 - *----------------------------------------------------------------------------- - * Prefetch Buffer | ON - *----------------------------------------------------------------------------- - * Instruction cache | ON - *----------------------------------------------------------------------------- - * Data cache | ON - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Enabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS - * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE - * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY - * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING - * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE - * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. - * - *

© COPYRIGHT 2011 STMicroelectronics

- ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f2xx_system - * @{ - */ - -/** @addtogroup STM32F2xx_System_Private_Includes - * @{ - */ - -#include "stm32f2xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Defines - * @{ - */ - -/*!< Uncomment the following line if you need to use external SRAM mounted - on STM322xG_EVAL board as data memory */ -/* #define DATA_IN_ExtSRAM */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ - - -/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ -#define PLL_M 25 -#define PLL_N 240 - -/* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 2 - -/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ -#define PLL_Q 5 - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Variables - * @{ - */ - - uint32_t SystemCoreClock = 120000000; - - __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_FunctionPrototypes - * @{ - */ - -static void SetSysClock(void); -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F2xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000; - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFF; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x24003010; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFF; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000; - -#ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM */ - - /* Configure the System clock source, PLL Multiplier and Divider factors, - AHB/APBx prescalers and Flash settings ----------------------------------*/ - SetSysClock(); - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value - * 25 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - SystemCoreClock = pllvco/pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @Note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ -static void SetSysClock(void) -{ -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ - __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - - /* Enable HSE */ - RCC->CR |= ((uint32_t)RCC_CR_HSEON); - - /* Wait till HSE is ready and if Time out is reached exit */ - do - { - HSEStatus = RCC->CR & RCC_CR_HSERDY; - StartUpCounter++; - } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - - if ((RCC->CR & RCC_CR_HSERDY) != RESET) - { - HSEStatus = (uint32_t)0x01; - } - else - { - HSEStatus = (uint32_t)0x00; - } - - if (HSEStatus == (uint32_t)0x01) - { - /* HCLK = SYSCLK / 1*/ - RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - - /* PCLK2 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - - /* PCLK1 = HCLK / 4*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - - /* Configure the main PLL */ - RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); - - /* Enable the main PLL */ - RCC->CR |= RCC_CR_PLLON; - - /* Wait till the main PLL is ready */ - while((RCC->CR & RCC_CR_PLLRDY) == 0) - { - } - - /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_3WS; - - /* Select the main PLL as system clock source */ - RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - RCC->CFGR |= RCC_CFGR_SW_PLL; - - /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { - } - } - else - { /* If HSE fails to start-up, the application will have wrong clock - configuration. User can add here some code to deal with this error */ - } - -} - -/** - * @brief Setup the external memory controller. Called in startup_stm32f2xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f2xx.s before jump to main. - * This function configures the external SRAM mounted on STM322xG_EVAL board - * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ -/*-- GPIOs Configuration -----------------------------------------------------*/ -/* - +-------------------+--------------------+------------------+------------------+ - + SRAM pins assignment + - +-------------------+--------------------+------------------+------------------+ - | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 | - | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 | - | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 | - | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 | - | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 | - | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 | - | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 | - | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+ - | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 | - | PD14 <-> FSMC_D0 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 | - | PD15 <-> FSMC_D1 | PE15 <-> FSMC_D12 |------------------+ - +-------------------+--------------------+ -*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR = 0x00000078; - - /* Connect PDx pins to FSMC Alternate function */ - GPIOD->AFR[0] = 0x00cc00cc; - GPIOD->AFR[1] = 0xcc0ccccc; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xa2aa0a0a; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xf3ff0f0f; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FSMC Alternate function */ - GPIOE->AFR[0] = 0xc00000cc; - GPIOE->AFR[1] = 0xcccccccc; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xaaaa800a; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xffffc00f; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FSMC Alternate function */ - GPIOF->AFR[0] = 0x00cccccc; - GPIOF->AFR[1] = 0xcccc0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xaa000aaa; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xff000fff; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FSMC Alternate function */ - GPIOG->AFR[0] = 0x00cccccc; - GPIOG->AFR[1] = 0x000000c0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00080aaa; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000c0fff; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -/*-- FSMC Configuration ------------------------------------------------------*/ - /* Enable the FSMC interface clock */ - RCC->AHB3ENR = 0x00000001; - - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001015; - FSMC_Bank1->BTCR[3] = 0x00010400; - FSMC_Bank1E->BWTR[2] = 0x0fffffff; -/* - Bank1_SRAM2 is configured as follow: - - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 4; - p.FSMC_BusTurnAroundDuration = 1; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; -*/ - -} -#endif /* DATA_IN_ExtSRAM */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c deleted file mode 100644 index 78564b08..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config.c - * Purpose: File System Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// File System -// Define File System global parameters - -// Number of open files <4-16> -// Define number of files that can be -// opened at the same time. -// Default: 8 -#define NUM_FILES 8 - -// FAT Name Cache Size <0-1000000> -// Define number of cached FAT file or directory names. -// 48 bytes of RAM is required for each cached name. -#define FAT_NAME_CACHE_SIZE 0 - -// Relocate FAT Name Cache Buffer -// Locate Cache Buffer at a specific address. -#define FAT_NAME_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Define the Cache buffer base address. -#define FAT_NAME_CACHE_ADDR 0x60000000 - -// - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_FileSystem_Drive_RAM -#include "FS_Config_RAM.h" -#endif - -#ifdef RTE_FileSystem_Drive_NOR_0 -#include "FS_Config_NOR_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NOR_1 -#include "FS_Config_NOR_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_NAND_0 -#include "FS_Config_NAND_0.h" -#endif -#ifdef RTE_FileSystem_Drive_NAND_1 -#include "FS_Config_NAND_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_MC_0 -#include "FS_Config_MC_0.h" -#endif -#ifdef RTE_FileSystem_Drive_MC_1 -#include "FS_Config_MC_1.h" -#endif - -#ifdef RTE_FileSystem_Drive_USB_0 -#include "FS_Config_USB_0.h" -#endif -#ifdef RTE_FileSystem_Drive_USB_1 -#include "FS_Config_USB_1.h" -#endif - -#include "fs_config.h" diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h deleted file mode 100644 index 0b1c6d3a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config_MC_0.h +++ /dev/null @@ -1,57 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::File System:Drive - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: FS_Config_MC_0.h - * Purpose: File System Configuration for Memory Card Drive - * Rev.: V5.01 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Memory Card Drive 0 -// Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:" -#define MC0_ENABLE 1 - -// Connect to hardware via Driver_MCI# <0-255> -// Select driver control block for hardware interface -#define MC0_MCI_DRIVER 0 - -// Connect to hardware via Driver_SPI# <0-255> -// Select driver control block for hardware interface when in SPI mode -#define MC0_SPI_DRIVER 0 - -// Memory Card Interface Mode <0=>Native <1=>SPI -// Native uses a SD Bus with up to 8 data lines, CLK, and CMD -// SPI uses 2 data lines (MOSI and MISO), SCLK and CS -// When using SPI both Driver_SPI# and Driver_MCI# must be specified -// since the MCI driver provides the control interface lines. -#define MC0_SPI 0 - -// Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB -// <8=>8 KB <16=>16 KB <32=>32 KB -// Drive Cache stores data sectors and may be increased to speed-up -// file read/write operations on this drive (default: 4 KB) -#define MC0_CACHE_SIZE 4 - -// Locate Drive Cache and Drive Buffer -// Some microcontrollers support DMA only in specific memory areas and -// require to locate the drive buffers at a fixed address. -#define MC0_CACHE_RELOC 0 - -// Base address <0x0000-0xFFFFFE00:0x200> -// Set buffer base address to RAM areas that support DMA with the drive. -#define MC0_CACHE_ADDR 0x7FD00000 - -// - -// Use FAT Journal -// Protect File Allocation Table and Directory Entries for -// fail-safe operation. -#define MC0_FAT_JOURNAL 0 - -// Default Drive "M0:" -// Use this drive when no drive letter is specified. -#define MC0_DEFAULT_DRIVE 1 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c deleted file mode 100644 index 6b9dc8e0..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config.c +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config.c - * Purpose: Network Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// System Definitions -// Global Network System definitions -// Local Host Name -// This is the name under which embedded host can be -// accessed on a local area network. -// Default: "my_host" -#define NET_HOST_NAME "my_host" - -// Memory Pool size <1536-262144:4><#/4> -// This is the size of a memory pool in bytes. Buffers for -// Network packets are allocated from this memory pool. -// Default: 12000 bytes -#define NET_MEM_SIZE 3000 - -// - -#include "..\RTE_Components.h" - -#ifdef RTE_Network_Interface_ETH_0 -#include "Net_Config_ETH_0.h" -#endif -#ifdef RTE_Network_Interface_ETH_1 -#include "Net_Config_ETH_1.h" -#endif - -#ifdef RTE_Network_Interface_PPP_0 -#include "Net_Config_PPP_0.h" -#endif -#ifdef RTE_Network_Interface_PPP_1 -#include "Net_Config_PPP_1.h" -#endif - -#ifdef RTE_Network_Interface_SLIP_0 -#include "Net_Config_SLIP_0.h" -#endif -#ifdef RTE_Network_Interface_SLIP_1 -#include "Net_Config_SLIP_1.h" -#endif - -#ifdef RTE_Network_Socket_UDP -#include "Net_Config_UDP.h" -#endif -#ifdef RTE_Network_Socket_TCP -#include "Net_Config_TCP.h" -#endif -#ifdef RTE_Network_Socket_BSD -#include "Net_Config_BSD.h" -#endif - -#ifdef RTE_Network_Web_Server_RO -#include "Net_Config_HTTP_Server.h" -#endif -#ifdef RTE_Network_Web_Server_FS -#include "Net_Config_HTTP_Server.h" -#endif - -#ifdef RTE_Network_Telnet_Server -#include "Net_Config_Telnet_Server.h" -#endif - -#ifdef RTE_Network_TFTP_Server -#include "Net_Config_TFTP_Server.h" -#endif -#ifdef RTE_Network_TFTP_Client -#include "Net_Config_TFTP_Client.h" -#endif - -#ifdef RTE_Network_FTP_Server -#include "Net_Config_FTP_Server.h" -#endif -#ifdef RTE_Network_FTP_Client -#include "Net_Config_FTP_Client.h" -#endif - -#ifdef RTE_Network_DNS_Client -#include "Net_Config_DNS_Client.h" -#endif - -#ifdef RTE_Network_SMTP_Client -#include "Net_Config_SMTP_Client.h" -#endif - -#ifdef RTE_Network_SNMP_Agent -#include "Net_Config_SNMP_Agent.h" -#endif - -#ifdef RTE_Network_SNTP_Client -#include "Net_Config_SNTP_Client.h" -#endif - -#include "net_config.h" - -/** -\addtogroup net_genFunc -@{ -*/ -/** - \fn void net_sys_error (ERROR_CODE error) - \ingroup net_cores - \brief Network system error handler. -*/ -void net_sys_error (ERROR_CODE error) { - /* This function is called when a fatal error is encountered. */ - /* The normal program execution is not possible anymore. */ - - switch (error) { - case ERR_MEM_ALLOC: - /* Out of memory */ - break; - - case ERR_MEM_FREE: - /* Trying to release non existing memory block */ - break; - - case ERR_MEM_CORRUPT: - /* Memory Link pointer Corrupted */ - /* More data written than the size of allocated mem block */ - break; - - case ERR_MEM_LOCK: - /* Locked Memory management function (alloc/free) re-entered */ - break; - - case ERR_UDP_ALLOC: - /* Out of UDP Sockets */ - break; - - case ERR_TCP_ALLOC: - /* Out of TCP Sockets */ - break; - - case ERR_TCP_STATE: - /* TCP State machine in undefined state */ - break; - } - - /* End-less loop */ - while (1); -} -/** -@} -*/ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h deleted file mode 100644 index 4166a0a2..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_BSD.h - * Purpose: Network Configuration BSD Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Berkley (BSD) Sockets -#define BSD_ENABLE 1 - -// Number of BSD Sockets <1-20> -// Number of available Berkeley Sockets -// Default: 2 -#define BSD_NUM_SOCKS 15 - -// Number of Streaming Server Sockets <0-20> -// Defines a number of Streaming (TCP) Server sockets, -// that listen for an incoming connection from the client. -// Default: 1 -#define BSD_SERVER_SOCKS 1 - -// Receive Timeout in seconds <0-600> -// A timeout for socket receive in blocking mode. -// Timeout value of 0 means indefinite timeout. -// Default: 20 -#define BSD_RECEIVE_TOUT 20 - -// Hostname Resolver -// Enable or disable Berkeley style hostname resolver. -#define BSD_HOSTNAME_ENABLE 0 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h deleted file mode 100644 index d30b7180..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Service - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_DNS_Client.h - * Purpose: Network Configuration DNS Client - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// DNS Client -#define DNS_CLIENT_ENABLE 1 - -// Cache Table size <5-100> -// Number of cached DNS host names/IP addresses -// Default: 20 -#define DNS_CLIENT_TAB_SIZE 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h deleted file mode 100644 index 9a49f382..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Interface - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_ETH_0.h - * Purpose: Network Configuration ETH Interface - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Ethernet Network Interface 0 -#define ETH0_ENABLE 1 - -// Connect to hardware via Driver_ETH# <0-255> -// Select driver control block for MAC and PHY interface -#define ETH0_DRIVER 1 - -// MAC Address -// Local Ethernet MAC Address -// Value FF:FF:FF:FF:FF:FF is not allowed. -// It is an ethernet Broadcast MAC address. -// Address byte 1 <0x00-0xff:2> -// LSB is an ethernet Multicast bit. -// Must be 0 for local MAC address. -// Default: 0x1E -#define ETH0_MAC1 0x1E - -// Address byte 2 <0x00-0xff> -// Default: 0x30 -#define ETH0_MAC2 0x30 - -// Address byte 3 <0x00-0xff> -// Default: 0x6C -#define ETH0_MAC3 0x6C - -// Address byte 4 <0x00-0xff> -// Default: 0xA2 -#define ETH0_MAC4 0xA2 - -// Address byte 5 <0x00-0xff> -// Default: 0x45 -#define ETH0_MAC5 0x45 - -// Address byte 6 <0x00-0xff> -// Default: 0x5E -#define ETH0_MAC6 0x5E -// - -// IP Address -// Local Static IP Address -// Value 255.255.255.255 is not allowed. -// It is a Broadcast IP address. -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_IP1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_IP2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_IP3 0 - -// Address byte 4 <0-255> -// Default: 100 -#define ETH0_IP4 100 -// - -// Subnet mask -// Local Subnet mask -// Mask byte 1 <0-255> -// Default: 255 -#define ETH0_MASK1 255 - -// Mask byte 2 <0-255> -// Default: 255 -#define ETH0_MASK2 255 - -// Mask byte 3 <0-255> -// Default: 255 -#define ETH0_MASK3 255 - -// Mask byte 4 <0-255> -// Default: 0 -#define ETH0_MASK4 0 -// - -// Default Gateway -// Default Gateway IP Address -// Address byte 1 <0-255> -// Default: 192 -#define ETH0_GW1 192 - -// Address byte 2 <0-255> -// Default: 168 -#define ETH0_GW2 168 - -// Address byte 3 <0-255> -// Default: 0 -#define ETH0_GW3 0 - -// Address byte 4 <0-255> -// Default: 254 -#define ETH0_GW4 254 -// - -// Primary DNS Server -// Primary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_PRI_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_PRI_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_PRI_DNS3 2 - -// Address byte 4 <0-255> -// Default: 129 -#define ETH0_PRI_DNS4 129 -// - -// Secondary DNS Server -// Secondary DNS Server IP Address -// Address byte 1 <0-255> -// Default: 194 -#define ETH0_SEC_DNS1 194 - -// Address byte 2 <0-255> -// Default: 25 -#define ETH0_SEC_DNS2 25 - -// Address byte 3 <0-255> -// Default: 2 -#define ETH0_SEC_DNS3 2 - -// Address byte 4 <0-255> -// Default: 130 -#define ETH0_SEC_DNS4 130 -// - -// ARP Definitions -// Address Resolution Protocol Definitions -// Cache Table size <5-100> -// Number of cached hardware/IP addresses -// Default: 10 -#define ETH0_ARP_TAB_SIZE 10 - -// Cache Timeout in seconds <5-255> -// A timeout for a cached hardware/IP addresses -// Default: 150 -#define ETH0_ARP_CACHE_TOUT 150 - -// Number of Retries <0-20> -// Number of Retries to resolve an IP address -// before ARP module gives up -// Default: 4 -#define ETH0_ARP_MAX_RETRY 4 - -// Resend Timeout in seconds <1-10> -// A timeout to resend the ARP Request -// Default: 2 -#define ETH0_ARP_RESEND_TOUT 2 - -// Send Notification on Address changes -// When this option is enabled, the embedded host -// will send a Gratuitous ARP notification at startup, -// or when the device IP address has changed. -// Default: Disabled -#define ETH0_ARP_NOTIFY 0 -// - -// IGMP Group Management -// Enable or disable Internet Group Management Protocol -#define ETH0_IGMP_ENABLE 0 - -// Membership Table size <2-50> -// Number of Groups this host can join -// Default: 5 -#define ETH0_IGMP_TAB_SIZE 5 -// - -// NetBIOS Name Service -// When this option is enabled, the embedded host can be -// accessed by his name on the local LAN using NBNS protocol. -// You need to modify also the number of UDP Sockets, -// because NBNS protocol uses one UDP socket to run. -#define ETH0_NBNS_ENABLE 1 - -// Dynamic Host Configuration -// When this option is enabled, local IP address, Net Mask -// and Default Gateway are obtained automatically from -// the DHCP Server on local LAN. -// You need to modify also the number of UDP Sockets, -// because DHCP protocol uses one UDP socket to run. -#define ETH0_DHCP_ENABLE 0 - -// Vendor Class Identifier -// This value is optional. If specified, it is added -// to DHCP request message, identifying vendor type. -// Default: "" -#define ETH0_DHCP_VCID "" - -// Bootfile Name -// This value is optional. If enabled, the Bootfile Name -// (option 67) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_BOOTFILE 0 - -// NTP Servers -// This value is optional. If enabled, a list of NTP Servers -// (option 42) is also requested from DHCP server. -// Default: disabled -#define ETH0_DHCP_NTP_SERVERS 0 -// - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h deleted file mode 100644 index 9d5b419e..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_TCP.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_TCP.h - * Purpose: Network Configuration TCP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// TCP Sockets -#define TCP_ENABLE 1 - -// Number of TCP Sockets <1-20> -// Number of available TCP sockets -// Default: 5 -#define TCP_NUM_SOCKS 15 - -// Number of Retries <0-20> -// How many times TCP module will try to retransmit data -// before giving up. Increase this value for high-latency -// and low_throughput networks. -// Default: 5 -#define TCP_MAX_RETRY 5 - -// Retry Timeout in seconds <1-10> -// If data frame not acknowledged within this time frame, -// TCP module will try to resend the data again. -// Default: 4 -#define TCP_RETRY_TOUT 4 - -// Default Connect Timeout in seconds <1-600> -// Default TCP Socket Keep Alive timeout. When it expires -// with no TCP data frame send, TCP Connection is closed. -// Default: 120 -#define TCP_DEFAULT_TOUT 120 - -// Maximum Segment Size <536-1460> -// The Maximum Segment Size specifies the maximum -// number of bytes in the TCP segment's Data field. -// Default: 1460 -#define TCP_MAX_SEG_SIZE 1460 - -// Receive Window Size <536-65535> -// Receive Window Size specifies the size of data, -// that the socket is able to buffer in flow-control mode. -// Default: 4380 -#define TCP_RECEIVE_WIN_SIZE 4380 - -// - -// TCP Initial Retransmit period in seconds -#define TCP_INITIAL_RETRY_TOUT 1 - -// TCP SYN frame retransmit period in seconds -#define TCP_SYN_RETRY_TOUT 2 - -// Number of retries to establish a connection -#define TCP_CONNECT_RETRY 7 - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h deleted file mode 100644 index 113f314a..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_UDP.h +++ /dev/null @@ -1,20 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network:Socket - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Config_UDP.h - * Purpose: Network Configuration UDP Sockets - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// UDP Sockets -#define UDP_ENABLE 1 - -// Number of UDP Sockets <1-20> -// Number of available UDP sockets -// Default: 5 -#define UDP_NUM_SOCKS 20 - -// diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c deleted file mode 100644 index 735089a4..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*------------------------------------------------------------------------------ - * MDK Middleware - Component ::Network - * Copyright (c) 2004-2013 ARM Germany GmbH. All rights reserved. - *------------------------------------------------------------------------------ - * Name: Net_Debug.c - * Purpose: Network Debug Configuration - * Rev.: V5.00 - *----------------------------------------------------------------------------*/ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Print Time Stamp -// Enable printing the time-info in debug messages -#define DBG_TIME 1 - -// TCPnet Debug Definitions -// Memory Management Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Memory debug messages -#define DBG_MEM 1 - -// Ethernet Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Ethernet debug messages -#define DBG_ETH 0 - -// PPP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off PPP debug messages -#define DBG_PPP 0 - -// SLIP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SLIP debug messages -#define DBG_SLIP 0 - -// ARP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ARP debug messages -#define DBG_ARP 0 - -// IP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IP debug messages -#define DBG_IP 1 - -// ICMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off ICMP debug messages -#define DBG_ICMP 1 - -// IGMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off IGMP debug messages -#define DBG_IGMP 1 - -// UDP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off UDP debug messages -#define DBG_UDP 1 - -// TCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TCP debug messages -#define DBG_TCP 1 - -// NBNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off NetBIOS Name Service debug messages -#define DBG_NBNS 1 - -// DHCP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Dynamic Host Configuration debug messages -#define DBG_DHCP 1 - -// DNS Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Domain Name Service debug messages -#define DBG_DNS 1 - -// SNMP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Management debug messages -#define DBG_SNMP 1 - -// SNTP Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Simple Network Time debug messages -#define DBG_SNTP 1 - -// BSD Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off BSD Interface debug messages -#define DBG_BSD 1 -// - -// Application Debug Definitions -// HTTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Web Server debug messages -#define DBG_HTTP_SERVER 1 - -// FTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Server debug messages -#define DBG_FTP_SERVER 1 - -// FTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off FTP Client debug messages -#define DBG_FTP_CLIENT 1 - -// Telnet Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off Telnet Server debug messages -#define DBG_TELNET_SERVER 1 - -// TFTP Server Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Server debug messages -#define DBG_TFTP_SERVER 1 - -// TFTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off TFTP Client debug messages -#define DBG_TFTP_CLIENT 1 - -// SMTP Client Debug <0=> Off <1=> Errors only <2=> Full debug -// Turn On/Off SMTP Client debug messages -#define DBG_SMTP_CLIENT 1 -// - - -#include "net_debug.h" - - -/** - \fn void net_debug_init (void) - \brief Initialize Network Debug Interface. -*/ -void net_debug_init (void) { - /* Add your code to initialize the Debug output. This is usually the */ - /* serial interface. The function is called at TCPnet system startup. */ - /* You may need to customize also the 'putchar()' function. */ - -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h deleted file mode 100644 index dc29d6c5..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/RTE/RTE_Components.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'SimpleServer' - * Target: 'SimpleServer' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - -#define RTE_DEVICE_STARTUP_STM32F2xx /* Device Startup for STM32F2 */ -#define RTE_Drivers_ETH_MAC0 /* Driver ETH_MAC0 */ -#define RTE_Drivers_MCI0 /* Driver MCI0 */ -#define RTE_Drivers_PHY_ST802RT1 /* Driver PHY ST802RT1 */ -#define RTE_FileSystem_Core /* File System Core */ - #define RTE_FileSystem_LFN /* File System with Long Filename support */ -#define RTE_FileSystem_Drive_MC_0 /* File System Memory Card Drive 0 */ -#define RTE_Network_Core /* Network Core */ - #define RTE_Network_Debug /* Network Debug Version */ -#define RTE_Network_DNS_Client /* Network DNS Client */ -#define RTE_Network_Interface_ETH_0 /* Network Interface ETH 0 */ -#define RTE_Network_Socket_BSD /* Network Socket BSD */ -#define RTE_Network_Socket_TCP /* Network Socket TCP */ -#define RTE_Network_Socket_UDP /* Network Socket UDP */ - -#endif /* RTE_COMPONENTS_H */ diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini deleted file mode 100644 index 239abce3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/STM32_SWO.ini +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -/* STM32_SWO.ini: STM32 Debugger Initialization File */ -/******************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> // -/******************************************************************************/ -/* This file is part of the uVision/ARM development tools. */ -/* Copyright (c) 2004-2013 Keil Software. All rights reserved. */ -/* This software may only be used under the terms of a valid, current, */ -/* end user licence from KEIL for a compatible version of KEIL software */ -/* development tools. Nothing else gives you the right to use this software. */ -/******************************************************************************/ - - -FUNC void DebugSetup (void) { -// Debug MCU Configuration -// DBG_SLEEP Debug Sleep Mode -// DBG_STOP Debug Stop Mode -// DBG_STANDBY Debug Standby Mode -// TRACE_IOEN Trace I/O Enable -// TRACE_MODE Trace Mode -// <0=> Asynchronous -// <1=> Synchronous: TRACEDATA Size 1 -// <2=> Synchronous: TRACEDATA Size 2 -// <3=> Synchronous: TRACEDATA Size 4 -// DBG_IWDG_STOP Independant Watchdog Stopped when Core is halted -// DBG_WWDG_STOP Window Watchdog Stopped when Core is halted -// DBG_TIM1_STOP Timer 1 Stopped when Core is halted -// DBG_TIM2_STOP Timer 2 Stopped when Core is halted -// DBG_TIM3_STOP Timer 3 Stopped when Core is halted -// DBG_TIM4_STOP Timer 4 Stopped when Core is halted -// DBG_CAN_STOP CAN Stopped when Core is halted -// - _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR -} - -DebugSetup(); // Debugger Setup diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx deleted file mode 100644 index b3a8b8db..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvoptx +++ /dev/null @@ -1,1406 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - - - - 0 - 0 - - - - SimpleServer - 0x4 - ARM-ADS - - 120000000 - - 1 - 1 - 0 - 1 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\Object\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 8 - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - ULP2CM3 - -UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.flm -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm) - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - - - - - - 1 - 8 - 0x20000408 - - - - - 2 - 8 - 0x8004dc8 - - - - 0 - - - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - - - - - - - - Source - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 4 - 0 - 0 - 0 - 0 - .\main.c - main.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 4 - 0 - 0 - 0 - 0 - .\server.c - server.c - 0 - 0 - - - - - Configuration - 1 - 0 - 0 - 0 - - 2 - 3 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 0 - 0 - - - 2 - 4 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - .\RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 0 - 0 - - - - - Documentation - 1 - 0 - 0 - 0 - - 3 - 5 - 5 - 0 - 0 - 0 - 0 - 1 - 1 - 0 - .\Abstract.txt - Abstract.txt - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - 4 - 6 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - RTX_CM3.lib - 1 - 0 - - - 4 - 7 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\CMSIS\RTX_Conf_CM.c - RTX_Conf_CM.c - 1 - 0 - - - - - ::Device - 0 - 0 - 0 - 1 - - 5 - 8 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - DMA_STM32F2xx.c - 1 - 0 - - - 5 - 9 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - GPIO_STM32F2xx.c - 1 - 0 - - - 5 - 10 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\RTE_Device.h - RTE_Device.h - 1 - 0 - - - 5 - 11 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - startup_stm32f2xx.s - 1 - 0 - - - 5 - 12 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Device\STM32F207IG\system_stm32f2xx.c - system_stm32f2xx.c - 1 - 0 - - - - - ::Drivers - 0 - 0 - 0 - 1 - - 6 - 13 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - PHY_ST802RT1.c - 1 - 0 - - - 6 - 14 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - EMAC_STM32F2xx.c - 1 - 0 - - - 6 - 15 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - MCI_STM32F2xx.c - 1 - 0 - - - - - ::File System - 0 - 0 - 0 - 1 - - 7 - 16 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - FS_LFN_CM3_L.lib - 1 - 0 - - - 7 - 17 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config.c - FS_Config.c - 1 - 0 - - - 7 - 18 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\File_System\FS_Config_MC_0.h - FS_Config_MC_0.h - 1 - 0 - - - - - ::Network - 0 - 0 - 0 - 1 - - 8 - 19 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - Net_Dbg_CM3_L.lib - 1 - 0 - - - 8 - 20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config.c - Net_Config.c - 1 - 0 - - - 8 - 21 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_BSD.h - Net_Config_BSD.h - 1 - 0 - - - 8 - 22 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_DNS_Client.h - Net_Config_DNS_Client.h - 1 - 0 - - - 8 - 23 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_ETH_0.h - Net_Config_ETH_0.h - 1 - 0 - - - 8 - 24 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_TCP.h - Net_Config_TCP.h - 1 - 0 - - - 8 - 25 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Config_UDP.h - Net_Config_UDP.h - 1 - 0 - - - 8 - 26 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\Network\Net_Debug.c - Net_Debug.c - 1 - 0 - - - - - ::wolfSSL - 0 - 0 - 0 - 1 - - 9 - 27 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - cyassl_MDK_ARM.c - 1 - 0 - - - 9 - 28 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - time-STM32F2xx.c - 1 - 0 - - - 9 - 29 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - aes.c - 1 - 0 - - - 9 - 30 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - arc4.c - 1 - 0 - - - 9 - 31 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - asm.c - 1 - 0 - - - 9 - 32 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - asn.c - 1 - 0 - - - 9 - 33 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - blake2b.c - 1 - 0 - - - 9 - 34 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - camellia.c - 1 - 0 - - - 9 - 35 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - coding.c - 1 - 0 - - - 9 - 36 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - compress.c - 1 - 0 - - - 9 - 37 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - des3.c - 1 - 0 - - - 9 - 38 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - dh.c - 1 - 0 - - - 9 - 39 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - dsa.c - 1 - 0 - - - 9 - 40 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - ecc.c - 1 - 0 - - - 9 - 41 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - ecc_fp.c - 1 - 0 - - - 9 - 42 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - error.c - 1 - 0 - - - 9 - 43 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - hc128.c - 1 - 0 - - - 9 - 44 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - hmac.c - 1 - 0 - - - 9 - 45 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - integer.c - 1 - 0 - - - 9 - 46 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - logging.c - 1 - 0 - - - 9 - 47 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - md2.c - 1 - 0 - - - 9 - 48 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - md4.c - 1 - 0 - - - 9 - 49 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - md5.c - 1 - 0 - - - 9 - 50 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - memory.c - 1 - 0 - - - 9 - 51 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - misc.c - 1 - 0 - - - 9 - 52 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - pwdbased.c - 1 - 0 - - - 9 - 53 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - rabbit.c - 1 - 0 - - - 9 - 54 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - random.c - 1 - 0 - - - 9 - 55 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - ripemd.c - 1 - 0 - - - 9 - 56 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - rsa.c - 1 - 0 - - - 9 - 57 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - sha.c - 1 - 0 - - - 9 - 58 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - sha256.c - 1 - 0 - - - 9 - 59 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - sha512.c - 1 - 0 - - - 9 - 60 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - tfm.c - 1 - 0 - - - 9 - 61 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - crl.c - 1 - 0 - - - 9 - 62 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - internal.c - 1 - 0 - - - 9 - 63 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - io.c - 1 - 0 - - - 9 - 64 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - keys.c - 1 - 0 - - - 9 - 65 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - ocsp.c - 1 - 0 - - - 9 - 66 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - sniffer.c - 1 - 0 - - - 9 - 67 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - ssl.c - 1 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - tls.c - 1 - 0 - - - 9 - 69 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-Crypt.h - config-Crypt.h - 1 - 0 - - - 9 - 70 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config-CyaSSL.h - config-CyaSSL.h - 1 - 0 - - - 9 - 71 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - RTE\wolfSSL\config.h - config.h - 1 - 0 - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx deleted file mode 100644 index d354efbe..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/SimpleServer.uvprojx +++ /dev/null @@ -1,1101 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - SimpleServer - 0x4 - ARM-ADS - - - STM32F207IG - STMicroelectronics - IRAM(0x20000000,0x20000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M3") CLOCK(120000000) ELITTLE - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$Flash\STM32F2xx_1024.flm)) - 0 - $$Device:STM32F207IG$Device\Include\stm32f2xx.h - - - - - - - - - - $$Device:STM32F207IG$SVD\STM32F20x.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\Object\ - SimpleServer - 1 - 0 - 0 - 1 - 1 - .\Object\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - -REMAP -MPU - DCM.DLL - -pCM3 - SARMCM3.DLL - -REMAP -MPU - TCM.DLL - -pCM3 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 8 - - - - - - - - - - - - - .\STM32_SWO.ini - BIN\ULP2CM3.DLL - - - - - 1 - 0 - 0 - 1 - 1 - 4100 - - 1 - BIN\ULP2CM3.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M3" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x8000000 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - HAVE_CONFIG_H MDK_CONF_SimpleServer CYASSL_STM32F2xx - - - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0x08000000 - 0x20000000 - - - - - - - - - - - - Source - - - main.c - 1 - .\main.c - - - server.c - 1 - .\server.c - - - - - Configuration - - - config-CyaSSL.h - 5 - .\RTE\wolfSSL\config-CyaSSL.h - - - config-Crypt.h - 5 - .\RTE\wolfSSL\config-Crypt.h - - - - - Documentation - - - Abstract.txt - 5 - .\Abstract.txt - - - - - ::CMSIS - - - RTX_CM3.lib - 4 - C:\Keil5\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS_RTX\Lib\ARM\RTX_CM3.lib - - - RTX_Conf_CM.c - 1 - RTE\CMSIS\RTX_Conf_CM.c - - - - - ::Device - - - DMA_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\DMA_STM32F2xx.c - - - GPIO_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\GPIO_STM32F2xx.c - - - RTE_Device.h - 5 - RTE\Device\STM32F207IG\RTE_Device.h - - - startup_stm32f2xx.s - 2 - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - system_stm32f2xx.c - 1 - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - ::Drivers - - - PHY_ST802RT1.c - 1 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Driver\PHY_ST802RT1.c - - - EMAC_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\EMAC_STM32F2xx.c - - - MCI_STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\Keil\STM32F2xx_DFP\1.0.4\RTE_Driver\MCI_STM32F2xx.c - - - - - ::File System - - - FS_LFN_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\FileSystem\Lib\ARM\FS_LFN_CM3_L.lib - - - FS_Config.c - 1 - RTE\File_System\FS_Config.c - - - FS_Config_MC_0.h - 5 - RTE\File_System\FS_Config_MC_0.h - - - - - ::Network - - - Net_Dbg_CM3_L.lib - 4 - C:\Keil5\ARM\PACK\Keil\MDK-Middleware\5.1.2\Network\Lib\ARM\Net_Dbg_CM3_L.lib - - - Net_Config.c - 1 - RTE\Network\Net_Config.c - - - Net_Config_BSD.h - 5 - RTE\Network\Net_Config_BSD.h - - - Net_Config_DNS_Client.h - 5 - RTE\Network\Net_Config_DNS_Client.h - - - Net_Config_ETH_0.h - 5 - RTE\Network\Net_Config_ETH_0.h - - - Net_Config_TCP.h - 5 - RTE\Network\Net_Config_TCP.h - - - Net_Config_UDP.h - 5 - RTE\Network\Net_Config_UDP.h - - - Net_Debug.c - 1 - RTE\Network\Net_Debug.c - - - - - ::wolfSSL - - - cyassl_MDK_ARM.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\cyassl_MDK_ARM.c - - - time-STM32F2xx.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib\time-STM32F2xx.c - - - aes.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\aes.c - - - arc4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\arc4.c - - - asm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asm.c - - - asn.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\asn.c - - - blake2b.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\blake2b.c - - - camellia.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\camellia.c - - - coding.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\coding.c - - - compress.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\compress.c - - - des3.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\des3.c - - - dh.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dh.c - - - dsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\dsa.c - - - ecc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc.c - - - ecc_fp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ecc_fp.c - - - error.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\error.c - - - hc128.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hc128.c - - - hmac.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\hmac.c - - - integer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\integer.c - - - logging.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\logging.c - - - md2.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md2.c - - - md4.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md4.c - - - md5.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\md5.c - - - memory.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\memory.c - - - misc.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\misc.c - - - pwdbased.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\pwdbased.c - - - rabbit.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rabbit.c - - - random.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\random.c - - - ripemd.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\ripemd.c - - - rsa.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\rsa.c - - - sha.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha.c - - - sha256.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha256.c - - - sha512.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\sha512.c - - - tfm.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\ctaocrypt\src\tfm.c - - - crl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\crl.c - - - internal.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\internal.c - - - io.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\io.c - - - keys.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\keys.c - - - ocsp.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ocsp.c - - - sniffer.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\sniffer.c - - - ssl.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\ssl.c - - - tls.c - 1 - C:\Keil5\ARM\PACK\wolfSSL\CyaSSL\2.8.0\cyassl\src\tls.c - - - config-Crypt.h - 5 - RTE\wolfSSL\config-Crypt.h - - - config-CyaSSL.h - 5 - RTE\wolfSSL\config-CyaSSL.h - - - config.h - 5 - RTE\wolfSSL\config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RTE\CMSIS\RTX_Conf_CM.c - - - - - - - - RTE\Device\STM32F207IG\RTE_Device.h - - - - - - - - RTE\Device\STM32F207IG\startup_stm32f2xx.s - - - - - - - - RTE\Device\STM32F207IG\system_stm32f2xx.c - - - - - - - - RTE\File_System\FS_Config.c - - - - - - - - RTE\File_System\FS_Config_MC_0.h - - - - - - - - RTE\Network\Net_Config.c - - - - - - - - RTE\Network\Net_Config_BSD.h - - - - - - - - RTE\Network\Net_Config_DNS_Client.h - - - - - - - - RTE\Network\Net_Config_ETH_0.h - - - - - - - - RTE\Network\Net_Config_TCP.h - - - - - - - - RTE\Network\Net_Config_UDP.h - - - - - - - - RTE\Network\Net_Debug.c - - - - - - - - RTE\Other\config-Crypt.h - - - - - - RTE\Other\config-CyaSSL.h - - - - - - RTE\Other\config-RTX-TCP-FS.h - - - - - - RTE\Other\config.h - - - - - - RTE\wolfSSL\config-Crypt.h - - - - - - - - RTE\wolfSSL\config-CyaSSL.h - - - - - - - - RTE\wolfSSL\config.h - - - - - - - - - -
diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c deleted file mode 100644 index 76c1d72f..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/main.c +++ /dev/null @@ -1,104 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include - -#include "cmsis_os.h" -#include "rl_fs.h" -#include "rl_net.h" -#include -#include "cyassl_MDK_ARM.h" -#include - -/*----------------------------------------------------------------------------- - * Initialize a Flash Memory Card - *----------------------------------------------------------------------------*/ -static void init_filesystem (void) { - int32_t retv; - - retv = finit ("M0:"); - if (retv == 0) { - retv = fmount ("M0:"); - if (retv == 0) { - printf ("Drive M0 ready!\n"); - } - else { - printf ("Drive M0 mount failed!\n"); - } - } else { - printf ("Drive M0 initialization failed!\n"); - } -} - -/*----------------------------------------------------------------------------- - * TCP/IP tasks - *----------------------------------------------------------------------------*/ -void tcp_poll (void const *arg) -{ - CYASSL_MSG("TCP polling started.\n") ; - while (1) { - net_main (); - osDelay(1) ; - } -} - -typedef struct func_args { - int argc; - char** argv; -} func_args; - -extern void server_test(func_args * args) ; -extern void init_time(void) ; - - osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ; -/*----------------------------------------------------------------------------- - * mian entry - *----------------------------------------------------------------------------*/ -int myoptind = 0; -char* myoptarg = NULL; - -int main() -{ - static char *argv[] = { "client", ""} ; - static func_args args = { 2, argv } ; - - init_time() ; - init_filesystem (); - net_initialize() ; - osThreadCreate (osThread (tcp_poll), NULL); - osDelay(10000) ; /* wait for DHCP */ - #if defined(DEBUG_CYASSL) - printf("Turning ON Debug message\n") ; - CyaSSL_Debugging_ON() ; - #endif - - printf("Simple Server: Started\n") ; - while(1) { - server_test(&args) ; - printf("Enter any key to iterate.\n") ; - getchar() ; - } -} diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c deleted file mode 100644 index bcb9f047..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/Projects/SimpleServer/server.c +++ /dev/null @@ -1,560 +0,0 @@ -/* server.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) - /* in case memory tracker wants stats */ - #define CYASSL_TRACK_MEMORY -#endif - -#if defined(CYASSL_MDK_ARM) - #include - #include - - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include "rtl.h" - #endif - - #include "cyassl_MDK_ARM.h" -#endif - -#include -#include - -#include "examples/server/server.h" - - -#ifdef CYASSL_CALLBACKS - int srvHandShakeCB(HandShakeInfo*); - int srvTimeoutCB(TimeoutInfo*); - Timeval srvTo; -#endif - -static void NonBlockingSSL_Accept(SSL* ssl) -{ -#ifndef CYASSL_CALLBACKS - int ret = SSL_accept(ssl); -#else - int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo); -#endif - int error = SSL_get_error(ssl, 0); - SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); - int select_ret; - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; - - if (error == SSL_ERROR_WANT_READ) - printf("... server would read block\n"); - else - printf("... server would write block\n"); - -#ifdef CYASSL_DTLS - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); -#endif - select_ret = tcp_select(sockfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - #ifndef CYASSL_CALLBACKS - ret = SSL_accept(ssl); - #else - ret = CyaSSL_accept_ex(ssl, - srvHandShakeCB, srvTimeoutCB, srvTo); - #endif - error = SSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } -#ifdef CYASSL_DTLS - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } -#endif - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) - err_sys("SSL_accept failed"); -} - - -static void Usage(void) -{ - printf("server " LIBCYASSL_VERSION_STRING - " NOTE: All files relative to CyaSSL home dir\n"); - printf("-? Help, print this usage\n"); - printf("-p Port to listen on, not 0, default %d\n", yasslPort); - printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", - SERVER_DEFAULT_VERSION); - printf("-l Cipher list\n"); - printf("-c Certificate file, default %s\n", svrCert); - printf("-k Key file, default %s\n", svrKey); - printf("-A Certificate Authority file, default %s\n", cliCert); - printf("-d Disable client cert check\n"); - printf("-b Bind to any interface instead of localhost only\n"); - printf("-s Use pre Shared keys\n"); - printf("-t Track CyaSSL memory use\n"); - printf("-u Use UDP DTLS," - " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); - printf("-f Fewer packets/group messages\n"); - printf("-N Use Non-blocking sockets\n"); - printf("-S Use Host Name Indication\n"); -} - -#ifdef CYASSL_MDK_SHELL -#define exit(code) return(code) -#endif - - -THREAD_RETURN CYASSL_THREAD server_test(void* args) -{ - SOCKET_T sockfd = 0; - SOCKET_T clientfd = 0; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - - char msg[] = "I hear you fa shizzle!"; - char input[80]; - int idx; - int ch; - int version = SERVER_DEFAULT_VERSION; - int doCliCertCheck = 1; - int useAnyAddr = 0; - int port = yasslPort; - int usePsk = 0; - int doDTLS = 0; - int useNtruKey = 0; - int nonBlocking = 0; - int trackMemory = 0; - int fewerPackets = 0; - char* cipherList = NULL; - char* verifyCert = (char*)cliCert; - char* ourCert = (char*)svrCert; - char* ourKey = (char*)svrKey; - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - -#ifdef HAVE_SNI - char* sniHostName = NULL; -#endif - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef NO_RSA - verifyCert = (char*)cliEccCert; - ourCert = (char*)eccCert; - ourKey = (char*)eccKey; -#endif - (void)trackMemory; - - while ((ch = mygetopt(argc, argv, "?dbstnNufp:v:l:A:c:k:S:")) != -1) { - switch (ch) { - case '?' : - Usage(); - exit(EXIT_SUCCESS); - - case 'd' : - doCliCertCheck = 0; - break; - - case 'b' : - useAnyAddr = 1; - break; - - case 's' : - usePsk = 1; - break; - - case 't' : - #ifdef USE_CYASSL_MEMORY - trackMemory = 1; - #endif - break; - - case 'n' : - useNtruKey = 1; - break; - - case 'u' : - doDTLS = 1; - break; - - case 'f' : - fewerPackets = 1; - break; - - case 'p' : - port = atoi(myoptarg); - #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) - if (port == 0) - err_sys("port number cannot be 0"); - #endif - break; - - case 'v' : - version = atoi(myoptarg); - if (version < 0 || version > 3) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'l' : - cipherList = myoptarg; - break; - - case 'A' : - verifyCert = myoptarg; - break; - - case 'c' : - ourCert = myoptarg; - break; - - case 'k' : - ourKey = myoptarg; - break; - - case 'N': - nonBlocking = 1; - break; - - case 'S' : - #ifdef HAVE_SNI - sniHostName = myoptarg; - #endif - break; - - default: - Usage(); - exit(MY_EX_USAGE); - } - } - - myoptind = 0; /* reset for test cases */ - - /* sort out DTLS versus TLS versions */ - if (version == CLIENT_INVALID_VERSION) { - if (doDTLS) - version = CLIENT_DTLS_DEFAULT_VERSION; - else - version = CLIENT_DEFAULT_VERSION; - } - else { - if (doDTLS) { - if (version == 3) - version = -2; - else - version = -1; - } - } - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - InitMemoryTracker(); -#endif - - switch (version) { -#ifndef NO_OLD_TLS - case 0: - method = SSLv3_server_method(); - break; - - #ifndef NO_TLS - case 1: - method = TLSv1_server_method(); - break; - - - case 2: - method = TLSv1_1_server_method(); - break; - - #endif -#endif - -#ifndef NO_TLS - case 3: - method = TLSv1_2_server_method(); - break; -#endif - -#ifdef CYASSL_DTLS - case -1: - method = DTLSv1_server_method(); - break; - - case -2: - method = DTLSv1_2_server_method(); - break; -#endif - - default: - err_sys("Bad SSL version"); - } - - if (method == NULL) - err_sys("unable to get method"); - - ctx = SSL_CTX_new(method); - if (ctx == NULL) - err_sys("unable to get ctx"); - - if (cipherList) - if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 1"); - -#ifdef CYASSL_LEANPSK - usePsk = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - usePsk = 1; -#endif - - if (fewerPackets) - CyaSSL_CTX_set_group_messages(ctx); - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (!usePsk) { - if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, check file and run from" - " CyaSSL home dir"); - } -#endif - -#ifdef HAVE_NTRU - if (useNtruKey) { - if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey) - != SSL_SUCCESS) - err_sys("can't load ntru key file, " - "Please run from CyaSSL home dir"); - } -#endif - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (!useNtruKey && !usePsk) { - if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, check file and run from" - " CyaSSL home dir"); - } -#endif - - if (usePsk) { -#ifndef NO_PSK - SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - SSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); - if (cipherList == NULL) { - const char *defaultCipherList; - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 2"); - } -#endif - } - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - /* if not using PSK, verify peer with certs */ - if (doCliCertCheck && usePsk == 0) { - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | - SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0); - if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - } -#endif - -#ifdef OPENSSL_EXTRA - SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - if (cipherList == NULL) { - if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) - err_sys("server can't set cipher list 3"); - } -#endif - -#ifdef HAVE_SNI - if (sniHostName) { - if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName, - XSTRLEN(sniHostName)) != SSL_SUCCESS) - err_sys("UseSNI failed"); - else - CyaSSL_CTX_SNI_SetOptions(ctx, CYASSL_SNI_HOST_NAME, - CYASSL_SNI_ABORT_ON_MISMATCH); - } -#endif - - ssl = SSL_new(ctx); - if (ssl == NULL) - err_sys("unable to get SSL"); - CyaSSL_set_quiet_shutdown(ssl, 1) ; -#ifdef HAVE_CRL - CyaSSL_EnableCRL(ssl, 0); - CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR | - CYASSL_CRL_START_MON); - CyaSSL_SetCRL_Cb(ssl, CRL_CallBack); -#endif - osDelay(5000) ; - tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS); - if (!doDTLS) - CloseSocket(sockfd); - - SSL_set_fd(ssl, clientfd); - if (usePsk == 0) { - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #elif !defined(NO_CERTS) - SetDH(ssl); /* repick suites with DHE, higher priority than PSK */ - #endif - } - osDelay(5000) ; -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&clientfd); - NonBlockingSSL_Accept(ssl); - } else if (SSL_accept(ssl) != SSL_SUCCESS) { - int err = SSL_get_error(ssl, 0); - char buffer[80]; - printf("error = %d, %s\n", err, ERR_error_string(err, buffer)); - err_sys("SSL_accept failed"); - } -#else - NonBlockingSSL_Accept(ssl); -#endif - showPeer(ssl); - osDelay(5000) ; - idx = SSL_read(ssl, input, sizeof(input)-1); - if (idx > 0) { - input[idx] = 0; - printf("Client message: %s\n", input); - - } - else if (idx < 0) { - int readErr = SSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) - err_sys("SSL_write failed"); - - SSL_shutdown(ssl); - SSL_free(ssl); - SSL_CTX_free(ctx); - - CloseSocket(clientfd); - ((func_args*)args)->return_code = 0; - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - ShowMemoryTracker(); -#endif /* USE_CYASSL_MEMORY */ - - return 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - if (CurrentDir("server") || CurrentDir("build")) - ChangeDirBack(2); - -#ifdef HAVE_STACK_SIZE - StackSizeCheck(&args, server_test); -#else - server_test(&args); -#endif - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - - int myoptind = 0; - char* myoptarg = NULL; - -#endif /* NO_MAIN_DRIVER */ - - -#ifdef CYASSL_CALLBACKS - - int srvHandShakeCB(HandShakeInfo* info) - { - (void)info; - return 0; - } - - - int srvTimeoutCB(TimeoutInfo* info) - { - (void)info; - return 0; - } - -#endif - diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c b/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c deleted file mode 100644 index e2912d19..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c +++ /dev/null @@ -1,299 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include "time.h" - -#define PERIPH_BASE ((uint32_t)0x40000000) -/*----------------------------------------------------------------------------- - * initialize RTC - *----------------------------------------------------------------------------*/ -#include "stm32f2xx.h" - -#define assert_param(a) - -#define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F) -#define SYNCHRO_TIMEOUT ((uint32_t) 0x00008000) -#define Bcd2ToByte(v) \ - ((((uint8_t)(v & (uint8_t)0xF0) >> (uint8_t)0x4) * 10) + (v & (uint8_t)0x0F)) -#define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F) -#define RTC_TR_MNT ((uint32_t)0x00007000) -#define RTC_TR_MNU ((uint32_t)0x00000F00) - -#define PWR_OFFSET (PWR_BASE - PERIPH_BASE) -#define CR_OFFSET (PWR_OFFSET + 0x00) -#define DBP_BitNumber 0x08 -#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4)) -#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF) -#define INITMODE_TIMEOUT ((uint32_t) 0x00010000) - -static void init_RTC() -{ - __IO uint32_t initcounter = 0x00 ; - uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */ - ((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ; - - /* Allow access to RTC */ - *(__IO uint32_t *) CR_DBP_BB = ENABLE ; - /* RCC_LSEConfig(RCC_LSE_ON) */ - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); - /* Reset LSEBYP bit */ - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00); - *(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01); - /* Wait till LSE is ready */ - while((RCC->BDCR << 0x2) == 0x0) { } - /* Select the RTC clock source: RCC_RTCCLKSource_LSE */ - ((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100; - - /* Enable the RTC Clock */ - *(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE; - - *(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE; - RTC->ISR = (uint32_t) RTC_INIT_MASK; - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - - RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); /* Clear RTC CR FMT Bit */ - /* Set RTC_CR register */ - RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */ - - /* Configure the RTC PRER */ - RTC->PRER = 0x7f ; - RTC->PRER |= (uint32_t)(0xff << 16); - - /* Exit Initialization mode */ - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - /* Enable the write protection for RTC registers */ - RTC->WPR = 0xFF; -} - -/*----------------------------------------------------------------------------- - * initialize TIM - *----------------------------------------------------------------------------*/ -#define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001) - -static void init_TIM() -{ - uint16_t tmpcr1 = 0; - - ((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ; - - tmpcr1 = TIM2->CR1 ; - tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) )); - /* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */ - tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */ - TIM2->CR1= tmpcr1 ; - - TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */ - TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */ - TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */ - - *(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ; - /* TIM_Cmd(TIM2, ENABLE) ; */ -} - -void init_time(void) { - init_RTC() ; - init_TIM() ; -} - -static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s) -{ - uint32_t tmpreg = 0; - tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); - *h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16)); - *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8)); - *s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU))); -} - -static uint32_t ByteToBcd2(uint8_t Value) -{ - uint8_t bcdhigh = 0; - while (Value >= 10) { - bcdhigh++; - Value -= 10; - } - return ((uint8_t)(bcdhigh << 4) | Value); -} - -static void SetTime(uint8_t h, uint8_t m, uint8_t s) -{ - __IO uint32_t synchrocounter = 0; - uint32_t synchrostatus = 0x00; - __IO uint32_t initcounter = 0; - uint32_t initstatus = 0x00; - uint32_t tmpreg ; - - tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ; - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - RTC->ISR = (uint32_t)RTC_INIT_MASK; - - /* Wait till RTC is in INIT state and if Time out is reached exit */ - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); - - RTC->ISR &= (uint32_t)RTC_RSF_MASK; - /* Wait the registers to be synchronised */ - do { - synchrostatus = RTC->ISR & RTC_ISR_RSF; - synchrocounter++; - } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); - - RTC->WPR = 0xFF; -} - -static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d) -{ - uint32_t tmpreg = 0; - tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK); - *y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16)); - *m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8)); - *d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU))); -} - -static void SetDate(uint8_t y, uint8_t m, uint8_t d) -{ - __IO uint32_t synchrocounter = 0; - uint32_t synchrostatus = 0x00; - __IO uint32_t initcounter = 0; - uint32_t initstatus = 0x00; - uint32_t tmpreg = 0 ; - - tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ; - /* Disable the write protection for RTC registers */ - RTC->WPR = 0xCA; - RTC->WPR = 0x53; - RTC->ISR &= (uint32_t)~RTC_ISR_INIT; - - RTC->ISR = (uint32_t)RTC_INIT_MASK; - - /* Wait till RTC is in INIT state and if Time out is reached exit */ - do { - initstatus = RTC->ISR & RTC_ISR_INITF; - initcounter++; - } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); - - RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); - - RTC->ISR &= (uint32_t)RTC_RSF_MASK; - /* Wait the registers to be synchronised */ - do { - synchrostatus = RTC->ISR & RTC_ISR_RSF; - synchrocounter++; - } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); - - RTC->WPR = 0xFF; -} - - -#include -void CYASSL_MSG(const char *msg) ; - -struct tm *Cyassl_MDK_gmtime(const time_t *c) -{ - uint8_t h, m, s ; - uint8_t y, mo, d ; - static struct tm date ; - - GetTime(&h, &m, &s) ; - GetDate(&y, &mo, &d) ; - - date.tm_year = y + 100 ; - date.tm_mon = mo - 1 ; - date.tm_mday = d ; - date.tm_hour = h ; - date.tm_min = m ; - date.tm_sec = s ; - - #if defined(DEBUG_CYASSL) - { - char msg[100] ; - sprintf(msg, - "Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n", - d, mo, y+2000, h, m, s) ; - CYASSL_MSG(msg) ; - } - #endif - - return(&date) ; -} - -double current_time() -{ - return ((double)TIM2->CNT/1000000.0) ; -} - -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - -void time_main(void *args) -{ - char * datetime ; - uint8_t h, m, s ; - uint8_t y, mo, d ; - - if( args == NULL || ((func_args *)args)->argc == 1) { - GetTime(&h, &m, &s) ; - GetDate(&y, &mo, &d) ; - printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", - mo, d, y+2000, h, m, s) ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 'd' ) { - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ; - SetDate(y-2000, mo, d) ; - } else if(((func_args *)args)->argc == 3 && - ((func_args *)args)->argv[1][0] == '-' && - ((func_args *)args)->argv[1][1] == 't' ) { - datetime = ((func_args *)args)->argv[2]; - sscanf(datetime, "%d:%d:%d", - (int *)&h, (int *)&m, (int *)&s) ; - SetTime(h, m, s) ; - } else printf("Invalid argument\n") ; -} - - -/******************************************************************* - time() -********************************************************************/ -time_t time(time_t * t) { return 0 ; } diff --git a/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc b/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc deleted file mode 100644 index b0a7a6b3..00000000 --- a/project1/cyassl-3.0.0/IDE/MDK5-ARM/wolfSSL.CyaSSL.pdsc +++ /dev/null @@ -1,281 +0,0 @@ - - - - CyaSSL - Light weight SSL/TLS and Crypt Library for Embedded Systems - wolfSSL - http://www.wolfSSL.com/files/ide - cyassl\IDE\MDK5-ARM\Docs\CyaSSL-License.txt - - wolfSSL: SSL/TLS and Crypt Library - CyaSSL: SSL/TLS Library - wolfCrypt: Crypt Library - - - - - Oct/7/2013, Initial release of CyaSSL pack - - - - - CyaSSL - wolfSSL - Security - Crypt - Cipher - SSL - TLS - - - - - - - - The condition is true if the package is used with a Cortex-Mx based device - - - - - - - CMSIS Core with Cortex-M processor - - - - - - CMSIS Core with RTOS for Cortex-M processor - - - - - - File System on Memory Card - - - - - Network UDP/TCP and CORE component - - - - - - - - - - - - - - - - - - - - - - - - wolfSSL: SSL/TLS and Crypt Library - cyassl\IDE\MDK5-ARM\Docs\CyaSSLManual-TableofContents.htm - - CyaSSL, Light weight SSL/TLS library - - - - - - - - - - - - - - - - - - - - wolfCrypt Core, Light weight Crypt/Cipher Library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Dummy file for Crypt alone use - - - - - - - - Device depend Timer functions - - - - - - - - - - - - CyaSSL Demo, SSL/TLS Server/Client Examples, Simple test suites, Benchmark - - - - - - - Middleware - Security - SSL - TLS - - - - wolfCrypt Simple Test Suite - - - - - - - Middleware - Security - Crypt - Cipher - - - - wolfCrypt Benchmark Suite - - - - - - - Middleware - Security - Crypt - Cipher - - - - CyaSSL Simple Client Example - - - - - - - Middleware - Security - Crypt - Cipher - - - - CyaSSL Simple Server Example - - - - - - - Middleware - Security - Crypt - Cipher - - - - CyaSSL Echo Client Example - - - - - - - Middleware - Security - Crypt - Cipher - - - - CyaSSL Echo Server Example - - - - - - - Middleware - Security - Crypt - Cipher - - - - diff --git a/project1/cyassl-3.0.0/Makefile b/project1/cyassl-3.0.0/Makefile deleted file mode 100644 index 25bf8c0e..00000000 --- a/project1/cyassl-3.0.0/Makefile +++ /dev/null @@ -1,3049 +0,0 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. -# Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994-2013 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - - - - - -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/cyassl -pkgincludedir = $(includedir)/cyassl -pkglibdir = $(libdir)/cyassl -pkglibexecdir = $(libexecdir)/cyassl -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = i686-pc-linux-gnu -host_triplet = i686-pc-linux-gnu -bin_PROGRAMS = -noinst_PROGRAMS = ctaocrypt/benchmark/benchmark$(EXEEXT) \ - ctaocrypt/test/testctaocrypt$(EXEEXT) $(am__EXEEXT_3) \ - $(am__EXEEXT_4) $(am__EXEEXT_2) -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -DIST_COMMON = $(srcdir)/cyassl/include.am \ - $(srcdir)/cyassl/ctaocrypt/include.am \ - $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am \ - $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am \ - $(srcdir)/doc/include.am $(srcdir)/swig/include.am \ - $(srcdir)/src/include.am $(srcdir)/support/include.am \ - $(srcdir)/ctaocrypt/benchmark/include.am \ - $(srcdir)/ctaocrypt/src/include.am \ - $(srcdir)/ctaocrypt/test/include.am \ - $(srcdir)/examples/client/include.am \ - $(srcdir)/examples/server/include.am \ - $(srcdir)/examples/echoclient/include.am \ - $(srcdir)/examples/echoserver/include.am \ - $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am \ - $(srcdir)/sslSniffer/sslSnifferTest/include.am \ - $(srcdir)/rpm/include.am \ - $(srcdir)/mqx/ctaocrypt_test/Sources/include.am \ - $(srcdir)/mqx/cyassl/include.am \ - $(srcdir)/mqx/cyassl_client/Sources/include.am \ - $(srcdir)/mqx/util_lib/Sources/include.am \ - $(srcdir)/mplabx/include.am \ - $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am \ - $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am \ - $(srcdir)/mplabx/cyassl.X/nbproject/include.am \ - $(srcdir)/mcapi/include.am \ - $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am \ - $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am \ - $(srcdir)/mcapi/cyassl.X/nbproject/include.am \ - $(srcdir)/mcapi/zlib.X/nbproject/include.am \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.in $(srcdir)/stamp-h.in \ - $(top_srcdir)/cyassl/version.h.in \ - $(top_srcdir)/cyassl/options.h.in \ - $(top_srcdir)/support/cyassl.pc.in $(top_srcdir)/rpm/spec.in \ - $(top_srcdir)/build-aux/depcomp $(dist_doc_DATA) \ - $(dist_example_DATA) $(include_HEADERS) \ - $(nobase_include_HEADERS) $(am__noinst_HEADERS_DIST) \ - $(top_srcdir)/build-aux/test-driver AUTHORS COPYING ChangeLog \ - NEWS README build-aux/compile build-aux/config.guess \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/missing build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/compile \ - $(top_srcdir)/build-aux/config.guess \ - $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/missing -am__append_1 = ctaocrypt/src/memory.c -am__append_2 = ctaocrypt/src/rsa.c -am__append_3 = ctaocrypt/src/dh.c -am__append_4 = ctaocrypt/src/asn.c -#am__append_5 = ctaocrypt/src/fips.c \ -# ctaocrypt/src/fips_test.c -am__append_6 = ctaocrypt/src/coding.c -am__append_7 = ctaocrypt/src/aes.c -am__append_8 = ctaocrypt/src/des3.c -am__append_9 = ctaocrypt/src/sha.c -am__append_10 = ctaocrypt/src/arc4.c -#am__append_11 = ctaocrypt/src/md4.c -am__append_12 = ctaocrypt/src/md5.c -#am__append_13 = ctaocrypt/src/pwdbased.c -#am__append_14 = ctaocrypt/src/dsa.c -#am__append_15 = ctaocrypt/src/aes_asm.s -#am__append_16 = ctaocrypt/src/camellia.c -#am__append_17 = ctaocrypt/src/md2.c -#am__append_18 = ctaocrypt/src/ripemd.c -#am__append_19 = ctaocrypt/src/sha512.c -#am__append_20 = ctaocrypt/src/blake2b.c -#am__append_21 = src/sniffer.c -#am__append_22 = ctaocrypt/src/hc128.c -#am__append_23 = ctaocrypt/src/rabbit.c -#am__append_24 = ctaocrypt/src/misc.c -#am__append_25 = ctaocrypt/src/tfm.c -am__append_26 = ctaocrypt/src/integer.c -#am__append_27 = ctaocrypt/src/ecc.c -#am__append_28 = src/ocsp.c -#am__append_29 = src/crl.c -#am__append_30 = ctaocrypt/src/compress.c -#am__append_31 = ctaocrypt/src/pkcs7.c -am__append_32 = examples/client/client \ - examples/server/server \ - examples/echoclient/echoclient \ - examples/echoserver/echoserver \ - testsuite/testsuite.test tests/unit.test -am__append_33 = examples/client/client.h \ - examples/server/server.h \ - examples/echoclient/echoclient.h \ - examples/echoserver/echoserver.h -am__append_34 = testsuite/testsuite.test \ - tests/unit.test -#am__append_35 = sslSniffer/sslSnifferTest/snifftest -#am__append_36 = mcapi/test -#am__append_37 = mcapi/test -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \ - $(top_srcdir)/m4/ax_am_jobserver.m4 \ - $(top_srcdir)/m4/ax_am_macros.m4 \ - $(top_srcdir)/m4/ax_append_compile_flags.m4 \ - $(top_srcdir)/m4/ax_append_flag.m4 \ - $(top_srcdir)/m4/ax_append_to_file.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_link_flag.m4 \ - $(top_srcdir)/m4/ax_count_cpus.m4 \ - $(top_srcdir)/m4/ax_create_generic_config.m4 \ - $(top_srcdir)/m4/ax_debug.m4 \ - $(top_srcdir)/m4/ax_file_escapes.m4 \ - $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_print_to_file.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \ - $(top_srcdir)/m4/ax_vcs_checkout.m4 \ - $(top_srcdir)/m4/hexversion.m4 \ - $(top_srcdir)/m4/lib_socket_nsl.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wolfssl_darwin_clang.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = stamp-h cyassl/version.h cyassl/options.h \ - support/cyassl.pc rpm/spec -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -src_libcyassl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__src_libcyassl_la_SOURCES_DIST = src/internal.c src/io.c src/keys.c \ - src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ - ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ - ctaocrypt/src/logging.c ctaocrypt/src/port.c \ - ctaocrypt/src/error.c ctaocrypt/src/memory.c \ - ctaocrypt/src/rsa.c ctaocrypt/src/dh.c ctaocrypt/src/asn.c \ - ctaocrypt/src/fips.c ctaocrypt/src/fips_test.c \ - ctaocrypt/src/coding.c ctaocrypt/src/aes.c \ - ctaocrypt/src/des3.c ctaocrypt/src/sha.c ctaocrypt/src/arc4.c \ - ctaocrypt/src/md4.c ctaocrypt/src/md5.c \ - ctaocrypt/src/pwdbased.c ctaocrypt/src/dsa.c \ - ctaocrypt/src/aes_asm.s ctaocrypt/src/camellia.c \ - ctaocrypt/src/md2.c ctaocrypt/src/ripemd.c \ - ctaocrypt/src/sha512.c ctaocrypt/src/blake2b.c src/sniffer.c \ - ctaocrypt/src/hc128.c ctaocrypt/src/rabbit.c \ - ctaocrypt/src/misc.c ctaocrypt/src/tfm.c \ - ctaocrypt/src/integer.c ctaocrypt/src/ecc.c src/ocsp.c \ - src/crl.c ctaocrypt/src/compress.c ctaocrypt/src/pkcs7.c -am__dirstamp = $(am__leading_dot)dirstamp -am__objects_1 = \ - ctaocrypt/src/src_libcyassl_la-memory.lo -am__objects_2 = ctaocrypt/src/src_libcyassl_la-rsa.lo -am__objects_3 = ctaocrypt/src/src_libcyassl_la-dh.lo -am__objects_4 = ctaocrypt/src/src_libcyassl_la-asn.lo -#am__objects_5 = \ -# ctaocrypt/src/src_libcyassl_la-fips.lo \ -# ctaocrypt/src/src_libcyassl_la-fips_test.lo -am__objects_6 = \ - ctaocrypt/src/src_libcyassl_la-coding.lo -am__objects_7 = ctaocrypt/src/src_libcyassl_la-aes.lo -am__objects_8 = \ - ctaocrypt/src/src_libcyassl_la-des3.lo -am__objects_9 = ctaocrypt/src/src_libcyassl_la-sha.lo -am__objects_10 = \ - ctaocrypt/src/src_libcyassl_la-arc4.lo -#am__objects_11 = \ -# ctaocrypt/src/src_libcyassl_la-md4.lo -am__objects_12 = \ - ctaocrypt/src/src_libcyassl_la-md5.lo -#am__objects_13 = ctaocrypt/src/src_libcyassl_la-pwdbased.lo -#am__objects_14 = \ -# ctaocrypt/src/src_libcyassl_la-dsa.lo -#am__objects_15 = ctaocrypt/src/aes_asm.lo -#am__objects_16 = ctaocrypt/src/src_libcyassl_la-camellia.lo -#am__objects_17 = \ -# ctaocrypt/src/src_libcyassl_la-md2.lo -#am__objects_18 = \ -# ctaocrypt/src/src_libcyassl_la-ripemd.lo -#am__objects_19 = \ -# ctaocrypt/src/src_libcyassl_la-sha512.lo -#am__objects_20 = \ -# ctaocrypt/src/src_libcyassl_la-blake2b.lo -#am__objects_21 = src/src_libcyassl_la-sniffer.lo -#am__objects_22 = \ -# ctaocrypt/src/src_libcyassl_la-hc128.lo -#am__objects_23 = \ -# ctaocrypt/src/src_libcyassl_la-rabbit.lo -#am__objects_24 = \ -# ctaocrypt/src/src_libcyassl_la-misc.lo -#am__objects_25 = \ -# ctaocrypt/src/src_libcyassl_la-tfm.lo -am__objects_26 = ctaocrypt/src/src_libcyassl_la-integer.lo -#am__objects_27 = \ -# ctaocrypt/src/src_libcyassl_la-ecc.lo -#am__objects_28 = src/src_libcyassl_la-ocsp.lo -#am__objects_29 = src/src_libcyassl_la-crl.lo -#am__objects_30 = \ -# ctaocrypt/src/src_libcyassl_la-compress.lo -#am__objects_31 = \ -# ctaocrypt/src/src_libcyassl_la-pkcs7.lo -am_src_libcyassl_la_OBJECTS = src/src_libcyassl_la-internal.lo \ - src/src_libcyassl_la-io.lo src/src_libcyassl_la-keys.lo \ - src/src_libcyassl_la-ssl.lo src/src_libcyassl_la-tls.lo \ - ctaocrypt/src/src_libcyassl_la-hmac.lo \ - ctaocrypt/src/src_libcyassl_la-random.lo \ - ctaocrypt/src/src_libcyassl_la-sha256.lo \ - ctaocrypt/src/src_libcyassl_la-logging.lo \ - ctaocrypt/src/src_libcyassl_la-port.lo \ - ctaocrypt/src/src_libcyassl_la-error.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) $(am__objects_6) $(am__objects_7) \ - $(am__objects_8) $(am__objects_9) $(am__objects_10) \ - $(am__objects_11) $(am__objects_12) $(am__objects_13) \ - $(am__objects_14) $(am__objects_15) $(am__objects_16) \ - $(am__objects_17) $(am__objects_18) $(am__objects_19) \ - $(am__objects_20) $(am__objects_21) $(am__objects_22) \ - $(am__objects_23) $(am__objects_24) $(am__objects_25) \ - $(am__objects_26) $(am__objects_27) $(am__objects_28) \ - $(am__objects_29) $(am__objects_30) $(am__objects_31) -src_libcyassl_la_OBJECTS = $(am_src_libcyassl_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -am__v_lt_1 = -src_libcyassl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(src_libcyassl_la_CFLAGS) $(CFLAGS) \ - $(src_libcyassl_la_LDFLAGS) $(LDFLAGS) -o $@ -am__EXEEXT_1 = testsuite/testsuite.test$(EXEEXT) \ - tests/unit.test$(EXEEXT) -#am__EXEEXT_2 = mcapi/test$(EXEEXT) -am__EXEEXT_3 = examples/client/client$(EXEEXT) \ - examples/server/server$(EXEEXT) \ - examples/echoclient/echoclient$(EXEEXT) \ - examples/echoserver/echoserver$(EXEEXT) \ - testsuite/testsuite.test$(EXEEXT) \ - tests/unit.test$(EXEEXT) -#am__EXEEXT_4 = sslSniffer/sslSnifferTest/snifftest$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_ctaocrypt_benchmark_benchmark_OBJECTS = \ - ctaocrypt/benchmark/benchmark.$(OBJEXT) -ctaocrypt_benchmark_benchmark_OBJECTS = \ - $(am_ctaocrypt_benchmark_benchmark_OBJECTS) -am_ctaocrypt_test_testctaocrypt_OBJECTS = \ - ctaocrypt/test/test.$(OBJEXT) -ctaocrypt_test_testctaocrypt_OBJECTS = \ - $(am_ctaocrypt_test_testctaocrypt_OBJECTS) -am__examples_client_client_SOURCES_DIST = examples/client/client.c -am_examples_client_client_OBJECTS = \ - examples/client/client.$(OBJEXT) -examples_client_client_OBJECTS = $(am_examples_client_client_OBJECTS) -am__examples_echoclient_echoclient_SOURCES_DIST = \ - examples/echoclient/echoclient.c -am_examples_echoclient_echoclient_OBJECTS = \ - examples/echoclient/echoclient.$(OBJEXT) -examples_echoclient_echoclient_OBJECTS = \ - $(am_examples_echoclient_echoclient_OBJECTS) -am__examples_echoserver_echoserver_SOURCES_DIST = \ - examples/echoserver/echoserver.c -am_examples_echoserver_echoserver_OBJECTS = \ - examples/echoserver/echoserver.$(OBJEXT) -examples_echoserver_echoserver_OBJECTS = \ - $(am_examples_echoserver_echoserver_OBJECTS) -am__examples_server_server_SOURCES_DIST = examples/server/server.c -am_examples_server_server_OBJECTS = \ - examples/server/server.$(OBJEXT) -examples_server_server_OBJECTS = $(am_examples_server_server_OBJECTS) -am__mcapi_test_SOURCES_DIST = mcapi/crypto.c mcapi/mcapi_test.c -#am_mcapi_test_OBJECTS = mcapi/crypto.$(OBJEXT) \ -# mcapi/mcapi_test.$(OBJEXT) -mcapi_test_OBJECTS = $(am_mcapi_test_OBJECTS) -am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST = \ - sslSniffer/sslSnifferTest/snifftest.c -#am_sslSniffer_sslSnifferTest_snifftest_OBJECTS = sslSniffer/sslSnifferTest/snifftest.$(OBJEXT) -sslSniffer_sslSnifferTest_snifftest_OBJECTS = \ - $(am_sslSniffer_sslSnifferTest_snifftest_OBJECTS) -am__tests_unit_test_SOURCES_DIST = tests/unit.c tests/api.c \ - tests/suites.c tests/hash.c examples/client/client.c \ - examples/server/server.c -am_tests_unit_test_OBJECTS = \ - tests/tests_unit_test-unit.$(OBJEXT) \ - tests/tests_unit_test-api.$(OBJEXT) \ - tests/tests_unit_test-suites.$(OBJEXT) \ - tests/tests_unit_test-hash.$(OBJEXT) \ - examples/client/tests_unit_test-client.$(OBJEXT) \ - examples/server/tests_unit_test-server.$(OBJEXT) -tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS) -tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(tests_unit_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -am__testsuite_testsuite_test_SOURCES_DIST = ctaocrypt/test/test.c \ - examples/client/client.c examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c examples/server/server.c \ - testsuite/testsuite.c -am_testsuite_testsuite_test_OBJECTS = ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT) \ - examples/client/testsuite_testsuite_test-client.$(OBJEXT) \ - examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT) \ - examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT) \ - examples/server/testsuite_testsuite_test-server.$(OBJEXT) \ - testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT) -testsuite_testsuite_test_OBJECTS = \ - $(am_testsuite_testsuite_test_OBJECTS) -testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_$(V)) -am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I. -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ - $(CCASFLAGS) -AM_V_CCAS = $(am__v_CCAS_$(V)) -am__v_CCAS_ = $(am__v_CCAS_$(AM_DEFAULT_VERBOSITY)) -am__v_CCAS_0 = @echo " CCAS " $@; -am__v_CCAS_1 = -SOURCES = $(src_libcyassl_la_SOURCES) \ - $(ctaocrypt_benchmark_benchmark_SOURCES) \ - $(ctaocrypt_test_testctaocrypt_SOURCES) \ - $(examples_client_client_SOURCES) \ - $(examples_echoclient_echoclient_SOURCES) \ - $(examples_echoserver_echoserver_SOURCES) \ - $(examples_server_server_SOURCES) $(mcapi_test_SOURCES) \ - $(sslSniffer_sslSnifferTest_snifftest_SOURCES) \ - $(tests_unit_test_SOURCES) $(testsuite_testsuite_test_SOURCES) -DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \ - $(ctaocrypt_benchmark_benchmark_SOURCES) \ - $(ctaocrypt_test_testctaocrypt_SOURCES) \ - $(am__examples_client_client_SOURCES_DIST) \ - $(am__examples_echoclient_echoclient_SOURCES_DIST) \ - $(am__examples_echoserver_echoserver_SOURCES_DIST) \ - $(am__examples_server_server_SOURCES_DIST) \ - $(am__mcapi_test_SOURCES_DIST) \ - $(am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST) \ - $(am__tests_unit_test_SOURCES_DIST) \ - $(am__testsuite_testsuite_test_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA) -am__noinst_HEADERS_DIST = cyassl/internal.h ctaocrypt/test/test.h \ - examples/client/client.h examples/server/server.h \ - examples/echoclient/echoclient.h \ - examples/echoserver/echoserver.h mcapi/crypto.h -HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ - $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope check recheck -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -DIST_TARGETS = dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14 -AMINCLUDE = aminclude.am -AMTAR = $${TAR-tar} -AM_CFLAGS = -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -AM_CPPFLAGS = -fvisibility=hidden -AM_DEFAULT_VERBOSITY = 0 -AM_LDFLAGS = -AR = ar -AUTOCONF = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf -AUTOHEADER = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader -AUTOMAKE = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14 -AWK = mawk -CC = clang -CCAS = clang -CCASDEPMODE = depmode=gcc3 -CCASFLAGS = -g -O2 -CCDEPMODE = depmode=gcc3 -CFLAGS = -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -CFLAG_VISIBILITY = -fvisibility=hidden -CPP = clang -E -CPPFLAGS = -fvisibility=hidden -CXX = g++ -CXXCPP = g++ -E -CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -O2 -CYASSL_LIBRARY_VERSION = 5:5:0 -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DLLTOOL = false -DSYMUTIL = -DUMPBIN = -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /bin/grep -E -EXEEXT = -FGREP = /bin/grep -F -GENERIC_CONFIG = cyassl-config -GREP = /bin/grep -HAVE_OPENSSL_CMD = -HAVE_VALGRIND = -HAVE_VISIBILITY = 1 -HEX_VERSION = 0x03000000 -INC_AMINCLUDE = include $(top_builddir)/aminclude.am -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LD = /usr/bin/ld -LDFLAGS = -LIBM = -lm -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -MAKEINFO = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo -MANIFEST_TOOL = : -MCHECK = -MKDIR_P = /bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -OBJDUMP = objdump -OBJEXT = o -OTOOL = -OTOOL64 = -PACKAGE = cyassl -PACKAGE_BUGREPORT = https://github.com/cyassl/cyassl/issues -PACKAGE_NAME = cyassl -PACKAGE_STRING = cyassl 3.0.0 -PACKAGE_TARNAME = cyassl -PACKAGE_URL = http://www.wolfssl.com -PACKAGE_VERSION = 3.0.0 -PATH_SEPARATOR = : -PTHREAD_CC = clang -PTHREAD_CFLAGS = -pthread -PTHREAD_LIBS = -RANLIB = ranlib -SED = /bin/sed -SET_MAKE = -SHELL = /bin/bash -STRIP = strip -VERSION = 3.0.0 -abs_builddir = /home/khimes/work/project1/cyassl-3.0.0 -abs_srcdir = /home/khimes/work/project1/cyassl-3.0.0 -abs_top_builddir = /home/khimes/work/project1/cyassl-3.0.0 -abs_top_srcdir = /home/khimes/work/project1/cyassl-3.0.0 -ac_ct_AR = ar -ac_ct_CC = clang -ac_ct_CXX = g++ -ac_ct_DUMPBIN = -am__include = include -am__leading_dot = . -am__quote = -am__tar = tar --format=ustar -chf - "$$tardir" -am__untar = tar -xf - -ax_pthread_config = -bindir = ${exec_prefix}/bin -build = i686-pc-linux-gnu -build_alias = -build_cpu = i686 -build_os = linux-gnu -build_vendor = pc -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = i686-pc-linux-gnu -host_alias = -host_cpu = i686 -host_os = linux-gnu -host_vendor = pc -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = $(MKDIR_P) -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /usr/local -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = -top_builddir = . -top_srcdir = . - -# includes append to these: -SUFFIXES = -TESTS = $(check_PROGRAMS) -CLEANFILES = -DISTCLEANFILES = aminclude.am ctaocrypt/benchmark/.libs/benchmark \ - ctaocrypt/test/.libs/testctaocrypt \ - examples/client/.libs/client examples/server/.libs/server \ - examples/echoclient/.libs/echoclient \ - examples/echoserver/.libs/echoserver \ - testsuite/.libs/testsuite.test tests/.libs/unit.test \ - sslSniffer/sslSnifferTest/.libs/snifftest cyassl-config -noinst_HEADERS = cyassl/internal.h ctaocrypt/test/test.h \ - $(am__append_33) mcapi/crypto.h -lib_LTLIBRARIES = src/libcyassl.la -man_MANS = -noinst_LTLIBRARIES = -include_HEADERS = -nobase_include_HEADERS = cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/camellia.h \ - cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/compress.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/dh.h \ - cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/ecc.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/fips_test.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/md2.h \ - cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/md5.h \ - cyassl/ctaocrypt/misc.h cyassl/ctaocrypt/pkcs7.h \ - cyassl/ctaocrypt/port.h cyassl/ctaocrypt/pwdbased.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/blake2.h cyassl/ctaocrypt/blake2-int.h \ - cyassl/ctaocrypt/blake2-impl.h cyassl/ctaocrypt/tfm.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/memory.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/openssl/asn1.h cyassl/openssl/bio.h cyassl/openssl/bn.h \ - cyassl/openssl/conf.h cyassl/openssl/crypto.h \ - cyassl/openssl/des.h cyassl/openssl/dh.h cyassl/openssl/dsa.h \ - cyassl/openssl/ecdsa.h cyassl/openssl/ec.h \ - cyassl/openssl/engine.h cyassl/openssl/err.h \ - cyassl/openssl/evp.h cyassl/openssl/hmac.h \ - cyassl/openssl/lhash.h cyassl/openssl/md4.h \ - cyassl/openssl/md5.h cyassl/openssl/ripemd.h \ - cyassl/openssl/ocsp.h cyassl/openssl/opensslconf.h \ - cyassl/openssl/opensslv.h cyassl/openssl/ossl_typ.h \ - cyassl/openssl/pem.h cyassl/openssl/pkcs12.h \ - cyassl/openssl/rand.h cyassl/openssl/rsa.h \ - cyassl/openssl/sha.h cyassl/openssl/ssl.h \ - cyassl/openssl/stack.h cyassl/openssl/ui.h \ - cyassl/openssl/x509.h cyassl/openssl/x509v3.h \ - cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \ - cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \ - cyassl/test.h cyassl/version.h cyassl/options.h cyassl/ocsp.h \ - cyassl/crl.h -EXTRA_HEADERS = -BUILT_SOURCES = -EXTRA_DIST = lib/dummy cyassl-ntru.vcproj cyassl.vcproj \ - cyassl-iphone.xcodeproj/project.pbxproj \ - cyassl-ios.xcodeproj/project.pbxproj cyassl-ntru.sln \ - cyassl.sln valgrind-error.sh gencertbuf.pl IDE \ - cyassl/sniffer_error.rc certs/ca-cert.pem certs/ca-key.pem \ - certs/client-cert.pem certs/client-keyEnc.pem \ - certs/client-key.pem certs/ecc-key.pem certs/ecc-keyPkcs8.pem \ - certs/ecc-client-key.pem certs/client-ecc-cert.pem \ - certs/ntru-cert.pem certs/dh2048.pem certs/server-cert.pem \ - certs/server-ecc.pem certs/server-ecc-rsa.pem \ - certs/server-keyEnc.pem certs/server-key.pem \ - certs/server-keyPkcs8Enc12.pem certs/server-keyPkcs8Enc2.pem \ - certs/server-keyPkcs8Enc.pem certs/server-keyPkcs8.pem \ - certs/ca-key.der certs/client-cert.der certs/client-key.der \ - certs/dh2048.der certs/rsa2048.der certs/dsa2048.der \ - certs/ecc-key.der certs/ntru-key.raw \ - certs/1024/client-cert.pem certs/1024/client-key.pem \ - certs/1024/dh1024.pem certs/1024/dsa1024.pem \ - certs/1024/client-cert.der certs/1024/client-key.der \ - certs/1024/dh1024.der certs/1024/dsa1024.der \ - certs/1024/rsa1024.der certs/crl/crl.pem certs/crl/cliCrl.pem \ - certs/crl/eccSrvCRL.pem certs/crl/eccCliCRL.pem \ - certs/crl/crl.revoked swig/PythonBuild.sh swig/README \ - swig/cyassl.i swig/cyassl_adds.c swig/python_cyassl.vcproj \ - swig/rsasign.py swig/runme.py support/cyassl.pc \ - ctaocrypt/benchmark/benchmark.sln \ - ctaocrypt/benchmark/benchmark.vcproj ctaocrypt/src/misc.c \ - ctaocrypt/src/asm.c ctaocrypt/src/ecc_fp.c \ - ctaocrypt/src/fp_mont_small.i ctaocrypt/src/fp_mul_comba_12.i \ - ctaocrypt/src/fp_mul_comba_17.i \ - ctaocrypt/src/fp_mul_comba_20.i \ - ctaocrypt/src/fp_mul_comba_24.i \ - ctaocrypt/src/fp_mul_comba_28.i \ - ctaocrypt/src/fp_mul_comba_32.i ctaocrypt/src/fp_mul_comba_3.i \ - ctaocrypt/src/fp_mul_comba_48.i ctaocrypt/src/fp_mul_comba_4.i \ - ctaocrypt/src/fp_mul_comba_64.i ctaocrypt/src/fp_mul_comba_6.i \ - ctaocrypt/src/fp_mul_comba_7.i ctaocrypt/src/fp_mul_comba_8.i \ - ctaocrypt/src/fp_mul_comba_9.i \ - ctaocrypt/src/fp_mul_comba_small_set.i \ - ctaocrypt/src/fp_sqr_comba_12.i \ - ctaocrypt/src/fp_sqr_comba_17.i \ - ctaocrypt/src/fp_sqr_comba_20.i \ - ctaocrypt/src/fp_sqr_comba_24.i \ - ctaocrypt/src/fp_sqr_comba_28.i \ - ctaocrypt/src/fp_sqr_comba_32.i ctaocrypt/src/fp_sqr_comba_3.i \ - ctaocrypt/src/fp_sqr_comba_48.i ctaocrypt/src/fp_sqr_comba_4.i \ - ctaocrypt/src/fp_sqr_comba_64.i ctaocrypt/src/fp_sqr_comba_6.i \ - ctaocrypt/src/fp_sqr_comba_7.i ctaocrypt/src/fp_sqr_comba_8.i \ - ctaocrypt/src/fp_sqr_comba_9.i \ - ctaocrypt/src/fp_sqr_comba_small_set.i ctaocrypt/test/test.sln \ - ctaocrypt/test/test.vcproj examples/client/client.sln \ - examples/client/client-ntru.vcproj \ - examples/client/client.vcproj examples/server/server.sln \ - examples/server/server-ntru.vcproj \ - examples/server/server.vcproj \ - examples/echoclient/echoclient.sln \ - examples/echoclient/echoclient-ntru.vcproj \ - examples/echoclient/echoclient.vcproj \ - examples/echoserver/echoserver.sln \ - examples/echoserver/echoserver-ntru.vcproj \ - examples/echoserver/echoserver.vcproj testsuite/testsuite.sln \ - testsuite/testsuite-ntru.vcproj testsuite/testsuite.vcproj \ - input quit tests/unit.h tests/test.conf tests/test-dtls.conf \ - sslSniffer/sslSniffer.vcproj \ - sslSniffer/sslSnifferTest/sslSniffTest.vcproj \ - mqx/ctaocrypt_test/.cproject mqx/ctaocrypt_test/.project \ - mqx/ctaocrypt_test/ReferencedRSESystems.xml \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ - mqx/ctaocrypt_test/Sources/main.c \ - mqx/ctaocrypt_test/Sources/main.h mqx/README \ - mqx/cyassl/.cproject mqx/cyassl/.project \ - mqx/cyassl_client/.cproject mqx/cyassl_client/.project \ - mqx/cyassl_client/ReferencedRSESystems.xml \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ - mqx/cyassl_client/Sources/main.c \ - mqx/cyassl_client/Sources/main.h mqx/util_lib/.cproject \ - mqx/util_lib/.project mqx/util_lib/Sources/util.c \ - mqx/util_lib/Sources/util.h mplabx/PIC32MZ-serial.h \ - mplabx/README mplabx/benchmark_main.c mplabx/test_main.c \ - mplabx/ctaocrypt_benchmark.X/Makefile \ - mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_benchmark.X/nbproject/project.xml \ - mplabx/ctaocrypt_test.X/Makefile \ - mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_test.X/nbproject/project.xml \ - mplabx/cyassl.X/Makefile \ - mplabx/cyassl.X/nbproject/configurations.xml \ - mplabx/cyassl.X/nbproject/project.xml mcapi/README \ - mcapi/PIC32MZ-serial.h mcapi/ctaocrypt_mcapi.X/Makefile \ - mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_mcapi.X/nbproject/project.xml \ - mcapi/ctaocrypt_test.X/Makefile \ - mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_test.X/nbproject/project.xml \ - mcapi/cyassl.X/Makefile \ - mcapi/cyassl.X/nbproject/configurations.xml \ - mcapi/cyassl.X/nbproject/project.xml mcapi/zlib.X/Makefile \ - mcapi/zlib.X/nbproject/configurations.xml \ - mcapi/zlib.X/nbproject/project.xml -dist_doc_DATA = certs/taoCert.txt doc/README.txt -exampledir = $(docdir)/example -dist_example_DATA = examples/client/client.c examples/server/server.c \ - examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c -ACLOCAL_AMFLAGS = -I m4 -src_libcyassl_la_SOURCES = src/internal.c src/io.c src/keys.c \ - src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ - ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ - ctaocrypt/src/logging.c ctaocrypt/src/port.c \ - ctaocrypt/src/error.c $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) \ - $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_10) $(am__append_11) \ - $(am__append_12) $(am__append_13) $(am__append_14) \ - $(am__append_15) $(am__append_16) $(am__append_17) \ - $(am__append_18) $(am__append_19) $(am__append_20) \ - $(am__append_21) $(am__append_22) $(am__append_23) \ - $(am__append_24) $(am__append_25) $(am__append_26) \ - $(am__append_27) $(am__append_28) $(am__append_29) \ - $(am__append_30) $(am__append_31) -src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} -src_libcyassl_la_LIBADD = $(LIBM) -src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) -src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = support/cyassl.pc -ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c -ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la -ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la -ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c -ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la -ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la -examples_client_client_SOURCES = examples/client/client.c -examples_client_client_LDADD = src/libcyassl.la -examples_client_client_DEPENDENCIES = src/libcyassl.la -examples_server_server_SOURCES = examples/server/server.c -examples_server_server_LDADD = src/libcyassl.la -examples_server_server_DEPENDENCIES = src/libcyassl.la -examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c -examples_echoclient_echoclient_LDADD = src/libcyassl.la -examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la -examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c -examples_echoserver_echoserver_LDADD = src/libcyassl.la -examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la -testsuite_testsuite_test_SOURCES = \ - ctaocrypt/test/test.c \ - examples/client/client.c \ - examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c \ - examples/server/server.c \ - testsuite/testsuite.c - -testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -testsuite_testsuite_test_LDADD = src/libcyassl.la -testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la -tests_unit_test_SOURCES = \ - tests/unit.c \ - tests/api.c \ - tests/suites.c \ - tests/hash.c \ - examples/client/client.c \ - examples/server/server.c - -tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -tests_unit_test_LDADD = src/libcyassl.la -tests_unit_test_DEPENDENCIES = src/libcyassl.la -#sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c -#sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap -#sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la -#mcapi_test_SOURCES = mcapi/crypto.c \ -# mcapi/mcapi_test.c - -#mcapi_test_LDADD = src/libcyassl.la -#mcapi_test_DEPENDENCIES = src/libcyassl.la -#TESTS_ENVIRONMENT = ./valgrind-error.sh -TEST_EXTENSIONS = .test -all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .s .test .test$(EXEEXT) .trs -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -stamp-h: $(top_builddir)/config.status $(srcdir)/stamp-h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -cyassl/version.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/version.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -cyassl/options.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/options.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -support/cyassl.pc: $(top_builddir)/config.status $(top_srcdir)/support/cyassl.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -rpm/spec: $(top_builddir)/config.status $(top_srcdir)/rpm/spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -src/$(am__dirstamp): - @$(MKDIR_P) src - @: > src/$(am__dirstamp) -src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/$(DEPDIR) - @: > src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-internal.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-io.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-keys.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-ssl.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-tls.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/src - @: > ctaocrypt/src/$(am__dirstamp) -ctaocrypt/src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/src/$(DEPDIR) - @: > ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-random.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha256.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-logging.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-error.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-memory.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-fips_test.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-coding.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-pwdbased.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/aes_asm.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-camellia.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-ripemd.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha512.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-blake2b.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-sniffer.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-hc128.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-rabbit.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-integer.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-ocsp.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-crl.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-compress.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-pkcs7.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) - -src/libcyassl.la: $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_DEPENDENCIES) $(EXTRA_src_libcyassl_la_DEPENDENCIES) src/$(am__dirstamp) - $(AM_V_CCLD)$(src_libcyassl_la_LINK) -rpath $(libdir) $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -ctaocrypt/benchmark/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/benchmark - @: > ctaocrypt/benchmark/$(am__dirstamp) -ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/benchmark/$(DEPDIR) - @: > ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/benchmark/benchmark.$(OBJEXT): \ - ctaocrypt/benchmark/$(am__dirstamp) \ - ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) - -ctaocrypt/benchmark/benchmark$(EXEEXT): $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_DEPENDENCIES) $(EXTRA_ctaocrypt_benchmark_benchmark_DEPENDENCIES) ctaocrypt/benchmark/$(am__dirstamp) - @rm -f ctaocrypt/benchmark/benchmark$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_LDADD) $(LIBS) -ctaocrypt/test/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/test - @: > ctaocrypt/test/$(am__dirstamp) -ctaocrypt/test/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/test/$(DEPDIR) - @: > ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/test/test.$(OBJEXT): ctaocrypt/test/$(am__dirstamp) \ - ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) - -ctaocrypt/test/testctaocrypt$(EXEEXT): $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_DEPENDENCIES) $(EXTRA_ctaocrypt_test_testctaocrypt_DEPENDENCIES) ctaocrypt/test/$(am__dirstamp) - @rm -f ctaocrypt/test/testctaocrypt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_LDADD) $(LIBS) -examples/client/$(am__dirstamp): - @$(MKDIR_P) examples/client - @: > examples/client/$(am__dirstamp) -examples/client/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/client/$(DEPDIR) - @: > examples/client/$(DEPDIR)/$(am__dirstamp) -examples/client/client.$(OBJEXT): examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) - -examples/client/client$(EXEEXT): $(examples_client_client_OBJECTS) $(examples_client_client_DEPENDENCIES) $(EXTRA_examples_client_client_DEPENDENCIES) examples/client/$(am__dirstamp) - @rm -f examples/client/client$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_client_client_OBJECTS) $(examples_client_client_LDADD) $(LIBS) -examples/echoclient/$(am__dirstamp): - @$(MKDIR_P) examples/echoclient - @: > examples/echoclient/$(am__dirstamp) -examples/echoclient/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/echoclient/$(DEPDIR) - @: > examples/echoclient/$(DEPDIR)/$(am__dirstamp) -examples/echoclient/echoclient.$(OBJEXT): \ - examples/echoclient/$(am__dirstamp) \ - examples/echoclient/$(DEPDIR)/$(am__dirstamp) - -examples/echoclient/echoclient$(EXEEXT): $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_DEPENDENCIES) $(EXTRA_examples_echoclient_echoclient_DEPENDENCIES) examples/echoclient/$(am__dirstamp) - @rm -f examples/echoclient/echoclient$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_LDADD) $(LIBS) -examples/echoserver/$(am__dirstamp): - @$(MKDIR_P) examples/echoserver - @: > examples/echoserver/$(am__dirstamp) -examples/echoserver/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/echoserver/$(DEPDIR) - @: > examples/echoserver/$(DEPDIR)/$(am__dirstamp) -examples/echoserver/echoserver.$(OBJEXT): \ - examples/echoserver/$(am__dirstamp) \ - examples/echoserver/$(DEPDIR)/$(am__dirstamp) - -examples/echoserver/echoserver$(EXEEXT): $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_DEPENDENCIES) $(EXTRA_examples_echoserver_echoserver_DEPENDENCIES) examples/echoserver/$(am__dirstamp) - @rm -f examples/echoserver/echoserver$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_LDADD) $(LIBS) -examples/server/$(am__dirstamp): - @$(MKDIR_P) examples/server - @: > examples/server/$(am__dirstamp) -examples/server/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/server/$(DEPDIR) - @: > examples/server/$(DEPDIR)/$(am__dirstamp) -examples/server/server.$(OBJEXT): examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) - -examples/server/server$(EXEEXT): $(examples_server_server_OBJECTS) $(examples_server_server_DEPENDENCIES) $(EXTRA_examples_server_server_DEPENDENCIES) examples/server/$(am__dirstamp) - @rm -f examples/server/server$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_server_server_OBJECTS) $(examples_server_server_LDADD) $(LIBS) -mcapi/$(am__dirstamp): - @$(MKDIR_P) mcapi - @: > mcapi/$(am__dirstamp) -mcapi/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) mcapi/$(DEPDIR) - @: > mcapi/$(DEPDIR)/$(am__dirstamp) -mcapi/crypto.$(OBJEXT): mcapi/$(am__dirstamp) \ - mcapi/$(DEPDIR)/$(am__dirstamp) -mcapi/mcapi_test.$(OBJEXT): mcapi/$(am__dirstamp) \ - mcapi/$(DEPDIR)/$(am__dirstamp) - -mcapi/test$(EXEEXT): $(mcapi_test_OBJECTS) $(mcapi_test_DEPENDENCIES) $(EXTRA_mcapi_test_DEPENDENCIES) mcapi/$(am__dirstamp) - @rm -f mcapi/test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mcapi_test_OBJECTS) $(mcapi_test_LDADD) $(LIBS) -sslSniffer/sslSnifferTest/$(am__dirstamp): - @$(MKDIR_P) sslSniffer/sslSnifferTest - @: > sslSniffer/sslSnifferTest/$(am__dirstamp) -sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) sslSniffer/sslSnifferTest/$(DEPDIR) - @: > sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) -sslSniffer/sslSnifferTest/snifftest.$(OBJEXT): \ - sslSniffer/sslSnifferTest/$(am__dirstamp) \ - sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) - -sslSniffer/sslSnifferTest/snifftest$(EXEEXT): $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) $(EXTRA_sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) sslSniffer/sslSnifferTest/$(am__dirstamp) - @rm -f sslSniffer/sslSnifferTest/snifftest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_LDADD) $(LIBS) -tests/$(am__dirstamp): - @$(MKDIR_P) tests - @: > tests/$(am__dirstamp) -tests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/$(DEPDIR) - @: > tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-unit.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-api.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-suites.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-hash.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -examples/client/tests_unit_test-client.$(OBJEXT): \ - examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) -examples/server/tests_unit_test-server.$(OBJEXT): \ - examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) - -tests/unit.test$(EXEEXT): $(tests_unit_test_OBJECTS) $(tests_unit_test_DEPENDENCIES) $(EXTRA_tests_unit_test_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/unit.test$(EXEEXT) - $(AM_V_CCLD)$(tests_unit_test_LINK) $(tests_unit_test_OBJECTS) $(tests_unit_test_LDADD) $(LIBS) -ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT): \ - ctaocrypt/test/$(am__dirstamp) \ - ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) -examples/client/testsuite_testsuite_test-client.$(OBJEXT): \ - examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) -examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT): \ - examples/echoclient/$(am__dirstamp) \ - examples/echoclient/$(DEPDIR)/$(am__dirstamp) -examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT): \ - examples/echoserver/$(am__dirstamp) \ - examples/echoserver/$(DEPDIR)/$(am__dirstamp) -examples/server/testsuite_testsuite_test-server.$(OBJEXT): \ - examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) -testsuite/$(am__dirstamp): - @$(MKDIR_P) testsuite - @: > testsuite/$(am__dirstamp) -testsuite/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) testsuite/$(DEPDIR) - @: > testsuite/$(DEPDIR)/$(am__dirstamp) -testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT): \ - testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp) - -testsuite/testsuite.test$(EXEEXT): $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_DEPENDENCIES) $(EXTRA_testsuite_testsuite_test_DEPENDENCIES) testsuite/$(am__dirstamp) - @rm -f testsuite/testsuite.test$(EXEEXT) - $(AM_V_CCLD)$(testsuite_testsuite_test_LINK) $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f ctaocrypt/benchmark/*.$(OBJEXT) - -rm -f ctaocrypt/src/*.$(OBJEXT) - -rm -f ctaocrypt/src/*.lo - -rm -f ctaocrypt/test/*.$(OBJEXT) - -rm -f examples/client/*.$(OBJEXT) - -rm -f examples/echoclient/*.$(OBJEXT) - -rm -f examples/echoserver/*.$(OBJEXT) - -rm -f examples/server/*.$(OBJEXT) - -rm -f mcapi/*.$(OBJEXT) - -rm -f src/*.$(OBJEXT) - -rm -f src/*.lo - -rm -f sslSniffer/sslSnifferTest/*.$(OBJEXT) - -rm -f tests/*.$(OBJEXT) - -rm -f testsuite/*.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -include ctaocrypt/benchmark/$(DEPDIR)/benchmark.Po -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo -include ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo -include ctaocrypt/test/$(DEPDIR)/test.Po -include ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po -include examples/client/$(DEPDIR)/client.Po -include examples/client/$(DEPDIR)/tests_unit_test-client.Po -include examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po -include examples/echoclient/$(DEPDIR)/echoclient.Po -include examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po -include examples/echoserver/$(DEPDIR)/echoserver.Po -include examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po -include examples/server/$(DEPDIR)/server.Po -include examples/server/$(DEPDIR)/tests_unit_test-server.Po -include examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po -include mcapi/$(DEPDIR)/crypto.Po -include mcapi/$(DEPDIR)/mcapi_test.Po -include src/$(DEPDIR)/src_libcyassl_la-crl.Plo -include src/$(DEPDIR)/src_libcyassl_la-internal.Plo -include src/$(DEPDIR)/src_libcyassl_la-io.Plo -include src/$(DEPDIR)/src_libcyassl_la-keys.Plo -include src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo -include src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo -include src/$(DEPDIR)/src_libcyassl_la-ssl.Plo -include src/$(DEPDIR)/src_libcyassl_la-tls.Plo -include sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po -include tests/$(DEPDIR)/tests_unit_test-api.Po -include tests/$(DEPDIR)/tests_unit_test-hash.Po -include tests/$(DEPDIR)/tests_unit_test-suites.Po -include tests/$(DEPDIR)/tests_unit_test-unit.Po -include testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po - -.c.o: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ - $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Plo -# $(AM_V_CC)source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< - -src/src_libcyassl_la-internal.lo: src/internal.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-internal.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-internal.Tpo -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-internal.Tpo src/$(DEPDIR)/src_libcyassl_la-internal.Plo -# $(AM_V_CC)source='src/internal.c' object='src/src_libcyassl_la-internal.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c - -src/src_libcyassl_la-io.lo: src/io.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-io.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-io.Tpo -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-io.Tpo src/$(DEPDIR)/src_libcyassl_la-io.Plo -# $(AM_V_CC)source='src/io.c' object='src/src_libcyassl_la-io.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c - -src/src_libcyassl_la-keys.lo: src/keys.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-keys.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-keys.Tpo -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-keys.Tpo src/$(DEPDIR)/src_libcyassl_la-keys.Plo -# $(AM_V_CC)source='src/keys.c' object='src/src_libcyassl_la-keys.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c - -src/src_libcyassl_la-ssl.lo: src/ssl.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ssl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo src/$(DEPDIR)/src_libcyassl_la-ssl.Plo -# $(AM_V_CC)source='src/ssl.c' object='src/src_libcyassl_la-ssl.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c - -src/src_libcyassl_la-tls.lo: src/tls.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-tls.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-tls.Tpo -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-tls.Tpo src/$(DEPDIR)/src_libcyassl_la-tls.Plo -# $(AM_V_CC)source='src/tls.c' object='src/src_libcyassl_la-tls.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c - -ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hmac.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo -# $(AM_V_CC)source='ctaocrypt/src/hmac.c' object='ctaocrypt/src/src_libcyassl_la-hmac.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c - -ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-random.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo -# $(AM_V_CC)source='ctaocrypt/src/random.c' object='ctaocrypt/src/src_libcyassl_la-random.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c - -ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha256.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo -# $(AM_V_CC)source='ctaocrypt/src/sha256.c' object='ctaocrypt/src/src_libcyassl_la-sha256.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c - -ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-logging.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo -# $(AM_V_CC)source='ctaocrypt/src/logging.c' object='ctaocrypt/src/src_libcyassl_la-logging.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c - -ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-port.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo -# $(AM_V_CC)source='ctaocrypt/src/port.c' object='ctaocrypt/src/src_libcyassl_la-port.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c - -ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-error.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo -# $(AM_V_CC)source='ctaocrypt/src/error.c' object='ctaocrypt/src/src_libcyassl_la-error.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c - -ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-memory.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo -# $(AM_V_CC)source='ctaocrypt/src/memory.c' object='ctaocrypt/src/src_libcyassl_la-memory.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c - -ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo -# $(AM_V_CC)source='ctaocrypt/src/rsa.c' object='ctaocrypt/src/src_libcyassl_la-rsa.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c - -ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dh.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo -# $(AM_V_CC)source='ctaocrypt/src/dh.c' object='ctaocrypt/src/src_libcyassl_la-dh.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c - -ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-asn.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo -# $(AM_V_CC)source='ctaocrypt/src/asn.c' object='ctaocrypt/src/src_libcyassl_la-asn.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c - -ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/fips.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo -# $(AM_V_CC)source='ctaocrypt/src/fips.c' object='ctaocrypt/src/src_libcyassl_la-fips.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c - -ctaocrypt/src/src_libcyassl_la-fips_test.lo: ctaocrypt/src/fips_test.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips_test.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo -# $(AM_V_CC)source='ctaocrypt/src/fips_test.c' object='ctaocrypt/src/src_libcyassl_la-fips_test.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c - -ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-coding.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo -# $(AM_V_CC)source='ctaocrypt/src/coding.c' object='ctaocrypt/src/src_libcyassl_la-coding.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c - -ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-aes.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo -# $(AM_V_CC)source='ctaocrypt/src/aes.c' object='ctaocrypt/src/src_libcyassl_la-aes.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c - -ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-des3.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo -# $(AM_V_CC)source='ctaocrypt/src/des3.c' object='ctaocrypt/src/src_libcyassl_la-des3.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c - -ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo -# $(AM_V_CC)source='ctaocrypt/src/sha.c' object='ctaocrypt/src/src_libcyassl_la-sha.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c - -ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-arc4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo -# $(AM_V_CC)source='ctaocrypt/src/arc4.c' object='ctaocrypt/src/src_libcyassl_la-arc4.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c - -ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/md4.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo -# $(AM_V_CC)source='ctaocrypt/src/md4.c' object='ctaocrypt/src/src_libcyassl_la-md4.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c - -ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md5.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo -# $(AM_V_CC)source='ctaocrypt/src/md5.c' object='ctaocrypt/src/src_libcyassl_la-md5.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c - -ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pwdbased.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo -# $(AM_V_CC)source='ctaocrypt/src/pwdbased.c' object='ctaocrypt/src/src_libcyassl_la-pwdbased.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c - -ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/dsa.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo -# $(AM_V_CC)source='ctaocrypt/src/dsa.c' object='ctaocrypt/src/src_libcyassl_la-dsa.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c - -ctaocrypt/src/src_libcyassl_la-camellia.lo: ctaocrypt/src/camellia.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-camellia.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo -# $(AM_V_CC)source='ctaocrypt/src/camellia.c' object='ctaocrypt/src/src_libcyassl_la-camellia.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c - -ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/md2.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md2.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo -# $(AM_V_CC)source='ctaocrypt/src/md2.c' object='ctaocrypt/src/src_libcyassl_la-md2.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c - -ctaocrypt/src/src_libcyassl_la-ripemd.lo: ctaocrypt/src/ripemd.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ripemd.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo -# $(AM_V_CC)source='ctaocrypt/src/ripemd.c' object='ctaocrypt/src/src_libcyassl_la-ripemd.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c - -ctaocrypt/src/src_libcyassl_la-sha512.lo: ctaocrypt/src/sha512.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha512.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo -# $(AM_V_CC)source='ctaocrypt/src/sha512.c' object='ctaocrypt/src/src_libcyassl_la-sha512.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c - -ctaocrypt/src/src_libcyassl_la-blake2b.lo: ctaocrypt/src/blake2b.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-blake2b.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo -# $(AM_V_CC)source='ctaocrypt/src/blake2b.c' object='ctaocrypt/src/src_libcyassl_la-blake2b.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c - -src/src_libcyassl_la-sniffer.lo: src/sniffer.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-sniffer.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo -# $(AM_V_CC)source='src/sniffer.c' object='src/src_libcyassl_la-sniffer.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c - -ctaocrypt/src/src_libcyassl_la-hc128.lo: ctaocrypt/src/hc128.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hc128.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo -# $(AM_V_CC)source='ctaocrypt/src/hc128.c' object='ctaocrypt/src/src_libcyassl_la-hc128.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c - -ctaocrypt/src/src_libcyassl_la-rabbit.lo: ctaocrypt/src/rabbit.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rabbit.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo -# $(AM_V_CC)source='ctaocrypt/src/rabbit.c' object='ctaocrypt/src/src_libcyassl_la-rabbit.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c - -ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/misc.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-misc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo -# $(AM_V_CC)source='ctaocrypt/src/misc.c' object='ctaocrypt/src/src_libcyassl_la-misc.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c - -ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/tfm.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-tfm.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo -# $(AM_V_CC)source='ctaocrypt/src/tfm.c' object='ctaocrypt/src/src_libcyassl_la-tfm.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c - -ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-integer.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo -# $(AM_V_CC)source='ctaocrypt/src/integer.c' object='ctaocrypt/src/src_libcyassl_la-integer.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c - -ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ecc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo -# $(AM_V_CC)source='ctaocrypt/src/ecc.c' object='ctaocrypt/src/src_libcyassl_la-ecc.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c - -src/src_libcyassl_la-ocsp.lo: src/ocsp.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ocsp.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo -# $(AM_V_CC)source='src/ocsp.c' object='src/src_libcyassl_la-ocsp.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c - -src/src_libcyassl_la-crl.lo: src/crl.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-crl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-crl.Tpo -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c - $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-crl.Tpo src/$(DEPDIR)/src_libcyassl_la-crl.Plo -# $(AM_V_CC)source='src/crl.c' object='src/src_libcyassl_la-crl.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c - -ctaocrypt/src/src_libcyassl_la-compress.lo: ctaocrypt/src/compress.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-compress.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo -# $(AM_V_CC)source='ctaocrypt/src/compress.c' object='ctaocrypt/src/src_libcyassl_la-compress.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c - -ctaocrypt/src/src_libcyassl_la-pkcs7.lo: ctaocrypt/src/pkcs7.c - $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pkcs7.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c - $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo -# $(AM_V_CC)source='ctaocrypt/src/pkcs7.c' object='ctaocrypt/src/src_libcyassl_la-pkcs7.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c - -tests/tests_unit_test-unit.o: tests/unit.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po -# $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c - -tests/tests_unit_test-unit.obj: tests/unit.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po -# $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` - -tests/tests_unit_test-api.o: tests/api.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po -# $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c - -tests/tests_unit_test-api.obj: tests/api.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po -# $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` - -tests/tests_unit_test-suites.o: tests/suites.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po -# $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c - -tests/tests_unit_test-suites.obj: tests/suites.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po -# $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` - -tests/tests_unit_test-hash.o: tests/hash.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po -# $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c - -tests/tests_unit_test-hash.obj: tests/hash.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` - $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po -# $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` - -examples/client/tests_unit_test-client.o: examples/client/client.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po -# $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - -examples/client/tests_unit_test-client.obj: examples/client/client.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po -# $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - -examples/server/tests_unit_test-server.o: examples/server/server.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po -# $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - -examples/server/tests_unit_test-server.obj: examples/server/server.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po -# $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - -ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.o -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c - $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po -# $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c - -ctaocrypt/test/testsuite_testsuite_test-test.obj: ctaocrypt/test/test.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.obj -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` - $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po -# $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` - -examples/client/testsuite_testsuite_test-client.o: examples/client/client.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po -# $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - -examples/client/testsuite_testsuite_test-client.obj: examples/client/client.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po -# $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - -examples/echoclient/testsuite_testsuite_test-echoclient.o: examples/echoclient/echoclient.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.o -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c - $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po -# $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c - -examples/echoclient/testsuite_testsuite_test-echoclient.obj: examples/echoclient/echoclient.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.obj -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` - $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po -# $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` - -examples/echoserver/testsuite_testsuite_test-echoserver.o: examples/echoserver/echoserver.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.o -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c - $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po -# $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c - -examples/echoserver/testsuite_testsuite_test-echoserver.obj: examples/echoserver/echoserver.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.obj -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` - $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po -# $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` - -examples/server/testsuite_testsuite_test-server.o: examples/server/server.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po -# $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - -examples/server/testsuite_testsuite_test-server.obj: examples/server/server.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po -# $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - -testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.o -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c - $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po -# $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.o' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c - -testsuite/testsuite_testsuite_test-testsuite.obj: testsuite/testsuite.c - $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.obj -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` - $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po -# $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.obj' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` - -.s.o: - $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $< - -.s.obj: - $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.s.lo: - $(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf ctaocrypt/benchmark/.libs ctaocrypt/benchmark/_libs - -rm -rf ctaocrypt/src/.libs ctaocrypt/src/_libs - -rm -rf ctaocrypt/test/.libs ctaocrypt/test/_libs - -rm -rf examples/client/.libs examples/client/_libs - -rm -rf examples/echoclient/.libs examples/echoclient/_libs - -rm -rf examples/echoserver/.libs examples/echoserver/_libs - -rm -rf examples/server/.libs examples/server/_libs - -rm -rf mcapi/.libs mcapi/_libs - -rm -rf src/.libs src/_libs - -rm -rf sslSniffer/sslSnifferTest/.libs sslSniffer/sslSnifferTest/_libs - -rm -rf tests/.libs tests/_libs - -rm -rf testsuite/.libs testsuite/_libs - -distclean-libtool: - -rm -f libtool config.lt -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) -install-dist_exampleDATA: $(dist_example_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \ - done - -uninstall-dist_exampleDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - $(am__nobase_list) | while read dir files; do \ - xfiles=; for file in $$files; do \ - if test -f "$$file"; then xfiles="$$xfiles $$file"; \ - else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ - test -z "$$xfiles" || { \ - test "x$$dir" = x. || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ - echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ - $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ - $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - else \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -mcapi/test.log: mcapi/test$(EXEEXT) - @p='mcapi/test$(EXEEXT)'; \ - b='mcapi/test'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -#.test$(EXEEXT).log: -# @p='$<'; \ -# $(am__set_b); \ -# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -# --log-file $$b.log --trs-file $$b.trs \ -# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -# "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ - config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/benchmark/$(am__dirstamp) - -rm -f ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/src/$(am__dirstamp) - -rm -f ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/test/$(am__dirstamp) - -rm -f examples/client/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/client/$(am__dirstamp) - -rm -f examples/echoclient/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/echoclient/$(am__dirstamp) - -rm -f examples/echoserver/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/echoserver/$(am__dirstamp) - -rm -f examples/server/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/server/$(am__dirstamp) - -rm -f mcapi/$(DEPDIR)/$(am__dirstamp) - -rm -f mcapi/$(am__dirstamp) - -rm -f src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/$(am__dirstamp) - -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) - -rm -f sslSniffer/sslSnifferTest/$(am__dirstamp) - -rm -f tests/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/$(am__dirstamp) - -rm -f testsuite/$(DEPDIR)/$(am__dirstamp) - -rm -f testsuite/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_docDATA install-dist_exampleDATA \ - install-includeHEADERS install-nobase_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-exec-local \ - install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-dist_exampleDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA - -.MAKE: all check check-am install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ - check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ - cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ - install-data-am install-dist_docDATA install-dist_exampleDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-local install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nobase_includeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic maintainer-clean-local mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-dist_exampleDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA - - -#includes additional rules from aminclude.am -include $(top_builddir)/aminclude.am - -rpm-build: rpm/spec dist - @rm -f *.rpm - @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm - @mkdir -p ~/rpmbuild/BUILD/ - @mkdir -p ~/rpmbuild/RPMS/i386/ - @mkdir -p ~/rpmbuild/RPMS/i686/ - @mkdir -p ~/rpmbuild/RPMS/noarch/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/SPECS/ - @mkdir -p ~/rpmbuild/SRPMS/ - @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba --clean rpm/spec - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . - -rpm-sign: rpm-build - @rpm --addsign *.rpm - @rpm --checksig *.rpm - -clean-rpm: - @rm -f *.tar.gz - @rm -f *.src.rpm - @rm -f *.rpm - -rpm: rpm-build - -release: rpm-sign - -auto-rpmbuild: - @auto-br-rpmbuild -ba rpm/spec -test: check -tests/unit.log: testsuite/testsuite.log - -maintainer-clean-local: - -rm Makefile.in - -rm aclocal.m4 - -rm build-aux/compile - -rm build-aux/config.guess - -rm build-aux/config.sub - -rm build-aux/depcomp - -rm build-aux/install-sh - -rm build-aux/ltmain.sh - -rm build-aux/missing - -rm cyassl-config - -rmdir build-aux - -rm configure - -rm config.log - -rm config.status - -rm config.in - -rm m4/libtool.m4 - -rm m4/ltoptions.m4 - -rm m4/ltsugar.m4 - -rm m4/ltversion.m4 - -rm m4/lt~obsolete.m4 - -rm support/cyassl.pc - find . -type f -name '*~' -exec rm -f '{}' \; - -rm -f cyassl-*.tar.gz - -rm -f cyassl-*.rpm - -# !!!! first line of rule has to start with a hard (real) tab, not spaces -egs: - $(MAKE) examples/client/client; \ - $(MAKE) examples/echoclient/echoclient;\ - $(MAKE) examples/server/server; \ - $(MAKE) examples/echoserver/echoserver; - -ctc: - $(MAKE) ctaocrypt/test/testctaocrypt; \ - $(MAKE) ctaocrypt/benchmark/benchmark; - -install-exec-local: install-generic-config - -install-generic-config: - $(mkinstalldirs) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) cyassl-config $(DESTDIR)$(bindir) - -uninstall-local: - -rm -f $(DESTDIR)$(bindir)/cyassl-config - -merge-clean: - @find ./ | $(GREP) \.gcda | xargs rm -f - @find ./ | $(GREP) \.gcno | xargs rm -f - @find ./ | $(GREP) \.gz | xargs rm -f - @find ./ | $(GREP) \.orig | xargs rm -f - @find ./ | $(GREP) \.rej | xargs rm -f - @find ./ | $(GREP) \.rpm | xargs rm -f - @find ./ | $(GREP) \.THIS | xargs rm -f - @find ./ | $(GREP) \.OTHER | xargs rm -f - @find ./ | $(GREP) \.BASE | xargs rm -f - @find ./ | $(GREP) \~$$ | xargs rm -f - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/project1/cyassl-3.0.0/Makefile.am b/project1/cyassl-3.0.0/Makefile.am deleted file mode 100644 index 72cf64cb..00000000 --- a/project1/cyassl-3.0.0/Makefile.am +++ /dev/null @@ -1,142 +0,0 @@ -# includes append to these: -SUFFIXES = -TESTS = -CLEANFILES = -DISTCLEANFILES = -bin_PROGRAMS = -noinst_HEADERS = -lib_LTLIBRARIES = -man_MANS = -noinst_LTLIBRARIES = -noinst_PROGRAMS = -include_HEADERS = -nobase_include_HEADERS = -check_PROGRAMS = -EXTRA_HEADERS = -BUILT_SOURCES= -EXTRA_DIST= -dist_doc_DATA= - -#includes additional rules from aminclude.am -@INC_AMINCLUDE@ -DISTCLEANFILES+= aminclude.am - -exampledir = $(docdir)/example -dist_example_DATA= - -ACLOCAL_AMFLAGS= -I m4 - -EXTRA_DIST+= lib/dummy - -EXTRA_DIST+= cyassl-ntru.vcproj -EXTRA_DIST+= cyassl.vcproj -EXTRA_DIST+= cyassl-iphone.xcodeproj/project.pbxproj -EXTRA_DIST+= cyassl-ios.xcodeproj/project.pbxproj -EXTRA_DIST+= cyassl-ntru.sln -EXTRA_DIST+= cyassl.sln -EXTRA_DIST+= valgrind-error.sh -EXTRA_DIST+= gencertbuf.pl -EXTRA_DIST+= IDE - -include cyassl/include.am -include certs/include.am -include certs/1024/include.am -include certs/crl/include.am -include doc/include.am -include swig/include.am - -include src/include.am -include support/include.am -include ctaocrypt/benchmark/include.am -include ctaocrypt/src/include.am -include ctaocrypt/test/include.am -include examples/client/include.am -include examples/server/include.am -include examples/echoclient/include.am -include examples/echoserver/include.am -include testsuite/include.am -include tests/include.am -include sslSniffer/sslSnifferTest/include.am -include rpm/include.am -include mqx/ctaocrypt_test/Sources/include.am -include mqx/cyassl/include.am -include mqx/cyassl_client/Sources/include.am -include mqx/util_lib/Sources/include.am -include mplabx/include.am -include mplabx/ctaocrypt_benchmark.X/nbproject/include.am -include mplabx/ctaocrypt_test.X/nbproject/include.am -include mplabx/cyassl.X/nbproject/include.am -include mcapi/include.am -include mcapi/ctaocrypt_mcapi.X/nbproject/include.am -include mcapi/ctaocrypt_test.X/nbproject/include.am -include mcapi/cyassl.X/nbproject/include.am -include mcapi/zlib.X/nbproject/include.am - -if USE_VALGRIND -TESTS_ENVIRONMENT=./valgrind-error.sh -endif - -TEST_EXTENSIONS=.test -TESTS += $(check_PROGRAMS) -test: check -tests/unit.log: testsuite/testsuite.log - -DISTCLEANFILES+= cyassl-config - -maintainer-clean-local: - -rm Makefile.in - -rm aclocal.m4 - -rm build-aux/compile - -rm build-aux/config.guess - -rm build-aux/config.sub - -rm build-aux/depcomp - -rm build-aux/install-sh - -rm build-aux/ltmain.sh - -rm build-aux/missing - -rm cyassl-config - -rmdir build-aux - -rm configure - -rm config.log - -rm config.status - -rm config.in - -rm m4/libtool.m4 - -rm m4/ltoptions.m4 - -rm m4/ltsugar.m4 - -rm m4/ltversion.m4 - -rm m4/lt~obsolete.m4 - -rm support/cyassl.pc - find . -type f -name '*~' -exec rm -f '{}' \; - -rm -f @PACKAGE@-*.tar.gz - -rm -f @PACKAGE@-*.rpm - -# !!!! first line of rule has to start with a hard (real) tab, not spaces -egs: - $(MAKE) examples/client/client; \ - $(MAKE) examples/echoclient/echoclient;\ - $(MAKE) examples/server/server; \ - $(MAKE) examples/echoserver/echoserver; - -ctc: - $(MAKE) ctaocrypt/test/testctaocrypt; \ - $(MAKE) ctaocrypt/benchmark/benchmark; - -install-exec-local: install-generic-config - -install-generic-config: - $(mkinstalldirs) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) - -uninstall-local: - -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@ - -merge-clean: - @find ./ | $(GREP) \.gcda | xargs rm -f - @find ./ | $(GREP) \.gcno | xargs rm -f - @find ./ | $(GREP) \.gz | xargs rm -f - @find ./ | $(GREP) \.orig | xargs rm -f - @find ./ | $(GREP) \.rej | xargs rm -f - @find ./ | $(GREP) \.rpm | xargs rm -f - @find ./ | $(GREP) \.THIS | xargs rm -f - @find ./ | $(GREP) \.OTHER | xargs rm -f - @find ./ | $(GREP) \.BASE | xargs rm -f - @find ./ | $(GREP) \~$$ | xargs rm -f diff --git a/project1/cyassl-3.0.0/Makefile.in b/project1/cyassl-3.0.0/Makefile.in deleted file mode 100644 index 08fb010a..00000000 --- a/project1/cyassl-3.0.0/Makefile.in +++ /dev/null @@ -1,3049 +0,0 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2013 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - -# vim:ft=automake -# All paths should be given relative to the root -# - - - - -VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = -noinst_PROGRAMS = ctaocrypt/benchmark/benchmark$(EXEEXT) \ - ctaocrypt/test/testctaocrypt$(EXEEXT) $(am__EXEEXT_3) \ - $(am__EXEEXT_4) $(am__EXEEXT_2) -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -DIST_COMMON = $(srcdir)/cyassl/include.am \ - $(srcdir)/cyassl/ctaocrypt/include.am \ - $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am \ - $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am \ - $(srcdir)/doc/include.am $(srcdir)/swig/include.am \ - $(srcdir)/src/include.am $(srcdir)/support/include.am \ - $(srcdir)/ctaocrypt/benchmark/include.am \ - $(srcdir)/ctaocrypt/src/include.am \ - $(srcdir)/ctaocrypt/test/include.am \ - $(srcdir)/examples/client/include.am \ - $(srcdir)/examples/server/include.am \ - $(srcdir)/examples/echoclient/include.am \ - $(srcdir)/examples/echoserver/include.am \ - $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am \ - $(srcdir)/sslSniffer/sslSnifferTest/include.am \ - $(srcdir)/rpm/include.am \ - $(srcdir)/mqx/ctaocrypt_test/Sources/include.am \ - $(srcdir)/mqx/cyassl/include.am \ - $(srcdir)/mqx/cyassl_client/Sources/include.am \ - $(srcdir)/mqx/util_lib/Sources/include.am \ - $(srcdir)/mplabx/include.am \ - $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am \ - $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am \ - $(srcdir)/mplabx/cyassl.X/nbproject/include.am \ - $(srcdir)/mcapi/include.am \ - $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am \ - $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am \ - $(srcdir)/mcapi/cyassl.X/nbproject/include.am \ - $(srcdir)/mcapi/zlib.X/nbproject/include.am \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.in $(srcdir)/stamp-h.in \ - $(top_srcdir)/cyassl/version.h.in \ - $(top_srcdir)/cyassl/options.h.in \ - $(top_srcdir)/support/cyassl.pc.in $(top_srcdir)/rpm/spec.in \ - $(top_srcdir)/build-aux/depcomp $(dist_doc_DATA) \ - $(dist_example_DATA) $(include_HEADERS) \ - $(nobase_include_HEADERS) $(am__noinst_HEADERS_DIST) \ - $(top_srcdir)/build-aux/test-driver AUTHORS COPYING ChangeLog \ - NEWS README build-aux/compile build-aux/config.guess \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/missing build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/compile \ - $(top_srcdir)/build-aux/config.guess \ - $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/missing -@BUILD_MEMORY_TRUE@am__append_1 = ctaocrypt/src/memory.c -@BUILD_RSA_TRUE@am__append_2 = ctaocrypt/src/rsa.c -@BUILD_DH_TRUE@am__append_3 = ctaocrypt/src/dh.c -@BUILD_ASN_TRUE@am__append_4 = ctaocrypt/src/asn.c -@BUILD_FIPS_TRUE@am__append_5 = ctaocrypt/src/fips.c \ -@BUILD_FIPS_TRUE@ ctaocrypt/src/fips_test.c -@BUILD_CODING_TRUE@am__append_6 = ctaocrypt/src/coding.c -@BUILD_AES_TRUE@am__append_7 = ctaocrypt/src/aes.c -@BUILD_DES3_TRUE@am__append_8 = ctaocrypt/src/des3.c -@BUILD_SHA_TRUE@am__append_9 = ctaocrypt/src/sha.c -@BUILD_RC4_TRUE@am__append_10 = ctaocrypt/src/arc4.c -@BUILD_MD4_TRUE@am__append_11 = ctaocrypt/src/md4.c -@BUILD_MD5_TRUE@am__append_12 = ctaocrypt/src/md5.c -@BUILD_PWDBASED_TRUE@am__append_13 = ctaocrypt/src/pwdbased.c -@BUILD_DSA_TRUE@am__append_14 = ctaocrypt/src/dsa.c -@BUILD_AESNI_TRUE@am__append_15 = ctaocrypt/src/aes_asm.s -@BUILD_CAMELLIA_TRUE@am__append_16 = ctaocrypt/src/camellia.c -@BUILD_MD2_TRUE@am__append_17 = ctaocrypt/src/md2.c -@BUILD_RIPEMD_TRUE@am__append_18 = ctaocrypt/src/ripemd.c -@BUILD_SHA512_TRUE@am__append_19 = ctaocrypt/src/sha512.c -@BUILD_BLAKE2_TRUE@am__append_20 = ctaocrypt/src/blake2b.c -@BUILD_SNIFFER_TRUE@am__append_21 = src/sniffer.c -@BUILD_HC128_TRUE@am__append_22 = ctaocrypt/src/hc128.c -@BUILD_RABBIT_TRUE@am__append_23 = ctaocrypt/src/rabbit.c -@BUILD_INLINE_FALSE@am__append_24 = ctaocrypt/src/misc.c -@BUILD_FASTMATH_TRUE@am__append_25 = ctaocrypt/src/tfm.c -@BUILD_SLOWMATH_TRUE@am__append_26 = ctaocrypt/src/integer.c -@BUILD_ECC_TRUE@am__append_27 = ctaocrypt/src/ecc.c -@BUILD_OCSP_TRUE@am__append_28 = src/ocsp.c -@BUILD_CRL_TRUE@am__append_29 = src/crl.c -@BUILD_LIBZ_TRUE@am__append_30 = ctaocrypt/src/compress.c -@BUILD_PKCS7_TRUE@am__append_31 = ctaocrypt/src/pkcs7.c -@BUILD_EXAMPLES_TRUE@am__append_32 = examples/client/client \ -@BUILD_EXAMPLES_TRUE@ examples/server/server \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver \ -@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.test tests/unit.test -@BUILD_EXAMPLES_TRUE@am__append_33 = examples/client/client.h \ -@BUILD_EXAMPLES_TRUE@ examples/server/server.h \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.h \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.h -@BUILD_EXAMPLES_TRUE@am__append_34 = testsuite/testsuite.test \ -@BUILD_EXAMPLES_TRUE@ tests/unit.test -@BUILD_SNIFFTEST_TRUE@am__append_35 = sslSniffer/sslSnifferTest/snifftest -@BUILD_MCAPI_TRUE@am__append_36 = mcapi/test -@BUILD_MCAPI_TRUE@am__append_37 = mcapi/test -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \ - $(top_srcdir)/m4/ax_am_jobserver.m4 \ - $(top_srcdir)/m4/ax_am_macros.m4 \ - $(top_srcdir)/m4/ax_append_compile_flags.m4 \ - $(top_srcdir)/m4/ax_append_flag.m4 \ - $(top_srcdir)/m4/ax_append_to_file.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_link_flag.m4 \ - $(top_srcdir)/m4/ax_count_cpus.m4 \ - $(top_srcdir)/m4/ax_create_generic_config.m4 \ - $(top_srcdir)/m4/ax_debug.m4 \ - $(top_srcdir)/m4/ax_file_escapes.m4 \ - $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_print_to_file.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \ - $(top_srcdir)/m4/ax_vcs_checkout.m4 \ - $(top_srcdir)/m4/hexversion.m4 \ - $(top_srcdir)/m4/lib_socket_nsl.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wolfssl_darwin_clang.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = stamp-h cyassl/version.h cyassl/options.h \ - support/cyassl.pc rpm/spec -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -src_libcyassl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__src_libcyassl_la_SOURCES_DIST = src/internal.c src/io.c src/keys.c \ - src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ - ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ - ctaocrypt/src/logging.c ctaocrypt/src/port.c \ - ctaocrypt/src/error.c ctaocrypt/src/memory.c \ - ctaocrypt/src/rsa.c ctaocrypt/src/dh.c ctaocrypt/src/asn.c \ - ctaocrypt/src/fips.c ctaocrypt/src/fips_test.c \ - ctaocrypt/src/coding.c ctaocrypt/src/aes.c \ - ctaocrypt/src/des3.c ctaocrypt/src/sha.c ctaocrypt/src/arc4.c \ - ctaocrypt/src/md4.c ctaocrypt/src/md5.c \ - ctaocrypt/src/pwdbased.c ctaocrypt/src/dsa.c \ - ctaocrypt/src/aes_asm.s ctaocrypt/src/camellia.c \ - ctaocrypt/src/md2.c ctaocrypt/src/ripemd.c \ - ctaocrypt/src/sha512.c ctaocrypt/src/blake2b.c src/sniffer.c \ - ctaocrypt/src/hc128.c ctaocrypt/src/rabbit.c \ - ctaocrypt/src/misc.c ctaocrypt/src/tfm.c \ - ctaocrypt/src/integer.c ctaocrypt/src/ecc.c src/ocsp.c \ - src/crl.c ctaocrypt/src/compress.c ctaocrypt/src/pkcs7.c -am__dirstamp = $(am__leading_dot)dirstamp -@BUILD_MEMORY_TRUE@am__objects_1 = \ -@BUILD_MEMORY_TRUE@ ctaocrypt/src/src_libcyassl_la-memory.lo -@BUILD_RSA_TRUE@am__objects_2 = ctaocrypt/src/src_libcyassl_la-rsa.lo -@BUILD_DH_TRUE@am__objects_3 = ctaocrypt/src/src_libcyassl_la-dh.lo -@BUILD_ASN_TRUE@am__objects_4 = ctaocrypt/src/src_libcyassl_la-asn.lo -@BUILD_FIPS_TRUE@am__objects_5 = \ -@BUILD_FIPS_TRUE@ ctaocrypt/src/src_libcyassl_la-fips.lo \ -@BUILD_FIPS_TRUE@ ctaocrypt/src/src_libcyassl_la-fips_test.lo -@BUILD_CODING_TRUE@am__objects_6 = \ -@BUILD_CODING_TRUE@ ctaocrypt/src/src_libcyassl_la-coding.lo -@BUILD_AES_TRUE@am__objects_7 = ctaocrypt/src/src_libcyassl_la-aes.lo -@BUILD_DES3_TRUE@am__objects_8 = \ -@BUILD_DES3_TRUE@ ctaocrypt/src/src_libcyassl_la-des3.lo -@BUILD_SHA_TRUE@am__objects_9 = ctaocrypt/src/src_libcyassl_la-sha.lo -@BUILD_RC4_TRUE@am__objects_10 = \ -@BUILD_RC4_TRUE@ ctaocrypt/src/src_libcyassl_la-arc4.lo -@BUILD_MD4_TRUE@am__objects_11 = \ -@BUILD_MD4_TRUE@ ctaocrypt/src/src_libcyassl_la-md4.lo -@BUILD_MD5_TRUE@am__objects_12 = \ -@BUILD_MD5_TRUE@ ctaocrypt/src/src_libcyassl_la-md5.lo -@BUILD_PWDBASED_TRUE@am__objects_13 = ctaocrypt/src/src_libcyassl_la-pwdbased.lo -@BUILD_DSA_TRUE@am__objects_14 = \ -@BUILD_DSA_TRUE@ ctaocrypt/src/src_libcyassl_la-dsa.lo -@BUILD_AESNI_TRUE@am__objects_15 = ctaocrypt/src/aes_asm.lo -@BUILD_CAMELLIA_TRUE@am__objects_16 = ctaocrypt/src/src_libcyassl_la-camellia.lo -@BUILD_MD2_TRUE@am__objects_17 = \ -@BUILD_MD2_TRUE@ ctaocrypt/src/src_libcyassl_la-md2.lo -@BUILD_RIPEMD_TRUE@am__objects_18 = \ -@BUILD_RIPEMD_TRUE@ ctaocrypt/src/src_libcyassl_la-ripemd.lo -@BUILD_SHA512_TRUE@am__objects_19 = \ -@BUILD_SHA512_TRUE@ ctaocrypt/src/src_libcyassl_la-sha512.lo -@BUILD_BLAKE2_TRUE@am__objects_20 = \ -@BUILD_BLAKE2_TRUE@ ctaocrypt/src/src_libcyassl_la-blake2b.lo -@BUILD_SNIFFER_TRUE@am__objects_21 = src/src_libcyassl_la-sniffer.lo -@BUILD_HC128_TRUE@am__objects_22 = \ -@BUILD_HC128_TRUE@ ctaocrypt/src/src_libcyassl_la-hc128.lo -@BUILD_RABBIT_TRUE@am__objects_23 = \ -@BUILD_RABBIT_TRUE@ ctaocrypt/src/src_libcyassl_la-rabbit.lo -@BUILD_INLINE_FALSE@am__objects_24 = \ -@BUILD_INLINE_FALSE@ ctaocrypt/src/src_libcyassl_la-misc.lo -@BUILD_FASTMATH_TRUE@am__objects_25 = \ -@BUILD_FASTMATH_TRUE@ ctaocrypt/src/src_libcyassl_la-tfm.lo -@BUILD_SLOWMATH_TRUE@am__objects_26 = ctaocrypt/src/src_libcyassl_la-integer.lo -@BUILD_ECC_TRUE@am__objects_27 = \ -@BUILD_ECC_TRUE@ ctaocrypt/src/src_libcyassl_la-ecc.lo -@BUILD_OCSP_TRUE@am__objects_28 = src/src_libcyassl_la-ocsp.lo -@BUILD_CRL_TRUE@am__objects_29 = src/src_libcyassl_la-crl.lo -@BUILD_LIBZ_TRUE@am__objects_30 = \ -@BUILD_LIBZ_TRUE@ ctaocrypt/src/src_libcyassl_la-compress.lo -@BUILD_PKCS7_TRUE@am__objects_31 = \ -@BUILD_PKCS7_TRUE@ ctaocrypt/src/src_libcyassl_la-pkcs7.lo -am_src_libcyassl_la_OBJECTS = src/src_libcyassl_la-internal.lo \ - src/src_libcyassl_la-io.lo src/src_libcyassl_la-keys.lo \ - src/src_libcyassl_la-ssl.lo src/src_libcyassl_la-tls.lo \ - ctaocrypt/src/src_libcyassl_la-hmac.lo \ - ctaocrypt/src/src_libcyassl_la-random.lo \ - ctaocrypt/src/src_libcyassl_la-sha256.lo \ - ctaocrypt/src/src_libcyassl_la-logging.lo \ - ctaocrypt/src/src_libcyassl_la-port.lo \ - ctaocrypt/src/src_libcyassl_la-error.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) $(am__objects_6) $(am__objects_7) \ - $(am__objects_8) $(am__objects_9) $(am__objects_10) \ - $(am__objects_11) $(am__objects_12) $(am__objects_13) \ - $(am__objects_14) $(am__objects_15) $(am__objects_16) \ - $(am__objects_17) $(am__objects_18) $(am__objects_19) \ - $(am__objects_20) $(am__objects_21) $(am__objects_22) \ - $(am__objects_23) $(am__objects_24) $(am__objects_25) \ - $(am__objects_26) $(am__objects_27) $(am__objects_28) \ - $(am__objects_29) $(am__objects_30) $(am__objects_31) -src_libcyassl_la_OBJECTS = $(am_src_libcyassl_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -src_libcyassl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(src_libcyassl_la_CFLAGS) $(CFLAGS) \ - $(src_libcyassl_la_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = testsuite/testsuite.test$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ tests/unit.test$(EXEEXT) -@BUILD_MCAPI_TRUE@am__EXEEXT_2 = mcapi/test$(EXEEXT) -@BUILD_EXAMPLES_TRUE@am__EXEEXT_3 = examples/client/client$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/server/server$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.test$(EXEEXT) \ -@BUILD_EXAMPLES_TRUE@ tests/unit.test$(EXEEXT) -@BUILD_SNIFFTEST_TRUE@am__EXEEXT_4 = sslSniffer/sslSnifferTest/snifftest$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_ctaocrypt_benchmark_benchmark_OBJECTS = \ - ctaocrypt/benchmark/benchmark.$(OBJEXT) -ctaocrypt_benchmark_benchmark_OBJECTS = \ - $(am_ctaocrypt_benchmark_benchmark_OBJECTS) -am_ctaocrypt_test_testctaocrypt_OBJECTS = \ - ctaocrypt/test/test.$(OBJEXT) -ctaocrypt_test_testctaocrypt_OBJECTS = \ - $(am_ctaocrypt_test_testctaocrypt_OBJECTS) -am__examples_client_client_SOURCES_DIST = examples/client/client.c -@BUILD_EXAMPLES_TRUE@am_examples_client_client_OBJECTS = \ -@BUILD_EXAMPLES_TRUE@ examples/client/client.$(OBJEXT) -examples_client_client_OBJECTS = $(am_examples_client_client_OBJECTS) -am__examples_echoclient_echoclient_SOURCES_DIST = \ - examples/echoclient/echoclient.c -@BUILD_EXAMPLES_TRUE@am_examples_echoclient_echoclient_OBJECTS = \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.$(OBJEXT) -examples_echoclient_echoclient_OBJECTS = \ - $(am_examples_echoclient_echoclient_OBJECTS) -am__examples_echoserver_echoserver_SOURCES_DIST = \ - examples/echoserver/echoserver.c -@BUILD_EXAMPLES_TRUE@am_examples_echoserver_echoserver_OBJECTS = \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.$(OBJEXT) -examples_echoserver_echoserver_OBJECTS = \ - $(am_examples_echoserver_echoserver_OBJECTS) -am__examples_server_server_SOURCES_DIST = examples/server/server.c -@BUILD_EXAMPLES_TRUE@am_examples_server_server_OBJECTS = \ -@BUILD_EXAMPLES_TRUE@ examples/server/server.$(OBJEXT) -examples_server_server_OBJECTS = $(am_examples_server_server_OBJECTS) -am__mcapi_test_SOURCES_DIST = mcapi/crypto.c mcapi/mcapi_test.c -@BUILD_MCAPI_TRUE@am_mcapi_test_OBJECTS = mcapi/crypto.$(OBJEXT) \ -@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.$(OBJEXT) -mcapi_test_OBJECTS = $(am_mcapi_test_OBJECTS) -am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST = \ - sslSniffer/sslSnifferTest/snifftest.c -@BUILD_SNIFFTEST_TRUE@am_sslSniffer_sslSnifferTest_snifftest_OBJECTS = sslSniffer/sslSnifferTest/snifftest.$(OBJEXT) -sslSniffer_sslSnifferTest_snifftest_OBJECTS = \ - $(am_sslSniffer_sslSnifferTest_snifftest_OBJECTS) -am__tests_unit_test_SOURCES_DIST = tests/unit.c tests/api.c \ - tests/suites.c tests/hash.c examples/client/client.c \ - examples/server/server.c -@BUILD_EXAMPLES_TRUE@am_tests_unit_test_OBJECTS = \ -@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-unit.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-api.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-suites.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ tests/tests_unit_test-hash.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/client/tests_unit_test-client.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/server/tests_unit_test-server.$(OBJEXT) -tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS) -tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(tests_unit_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -am__testsuite_testsuite_test_SOURCES_DIST = ctaocrypt/test/test.c \ - examples/client/client.c examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c examples/server/server.c \ - testsuite/testsuite.c -@BUILD_EXAMPLES_TRUE@am_testsuite_testsuite_test_OBJECTS = ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/client/testsuite_testsuite_test-client.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ examples/server/testsuite_testsuite_test-server.$(OBJEXT) \ -@BUILD_EXAMPLES_TRUE@ testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT) -testsuite_testsuite_test_OBJECTS = \ - $(am_testsuite_testsuite_test_OBJECTS) -testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ - $(CCASFLAGS) -AM_V_CCAS = $(am__v_CCAS_@AM_V@) -am__v_CCAS_ = $(am__v_CCAS_@AM_DEFAULT_V@) -am__v_CCAS_0 = @echo " CCAS " $@; -am__v_CCAS_1 = -SOURCES = $(src_libcyassl_la_SOURCES) \ - $(ctaocrypt_benchmark_benchmark_SOURCES) \ - $(ctaocrypt_test_testctaocrypt_SOURCES) \ - $(examples_client_client_SOURCES) \ - $(examples_echoclient_echoclient_SOURCES) \ - $(examples_echoserver_echoserver_SOURCES) \ - $(examples_server_server_SOURCES) $(mcapi_test_SOURCES) \ - $(sslSniffer_sslSnifferTest_snifftest_SOURCES) \ - $(tests_unit_test_SOURCES) $(testsuite_testsuite_test_SOURCES) -DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \ - $(ctaocrypt_benchmark_benchmark_SOURCES) \ - $(ctaocrypt_test_testctaocrypt_SOURCES) \ - $(am__examples_client_client_SOURCES_DIST) \ - $(am__examples_echoclient_echoclient_SOURCES_DIST) \ - $(am__examples_echoserver_echoserver_SOURCES_DIST) \ - $(am__examples_server_server_SOURCES_DIST) \ - $(am__mcapi_test_SOURCES_DIST) \ - $(am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST) \ - $(am__tests_unit_test_SOURCES_DIST) \ - $(am__testsuite_testsuite_test_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA) -am__noinst_HEADERS_DIST = cyassl/internal.h ctaocrypt/test/test.h \ - examples/client/client.h examples/server/server.h \ - examples/echoclient/echoclient.h \ - examples/echoserver/echoserver.h mcapi/crypto.h -HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ - $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope check recheck -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -DIST_TARGETS = dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMINCLUDE = @AMINCLUDE@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_LDFLAGS = @AM_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYASSL_LIBRARY_VERSION = @CYASSL_LIBRARY_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GENERIC_CONFIG = @GENERIC_CONFIG@ -GREP = @GREP@ -HAVE_OPENSSL_CMD = @HAVE_OPENSSL_CMD@ -HAVE_VALGRIND = @HAVE_VALGRIND@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HEX_VERSION = @HEX_VERSION@ -INC_AMINCLUDE = @INC_AMINCLUDE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBM = @LIBM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MCHECK = @MCHECK@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# includes append to these: -SUFFIXES = -TESTS = $(check_PROGRAMS) -CLEANFILES = -DISTCLEANFILES = aminclude.am ctaocrypt/benchmark/.libs/benchmark \ - ctaocrypt/test/.libs/testctaocrypt \ - examples/client/.libs/client examples/server/.libs/server \ - examples/echoclient/.libs/echoclient \ - examples/echoserver/.libs/echoserver \ - testsuite/.libs/testsuite.test tests/.libs/unit.test \ - sslSniffer/sslSnifferTest/.libs/snifftest cyassl-config -noinst_HEADERS = cyassl/internal.h ctaocrypt/test/test.h \ - $(am__append_33) mcapi/crypto.h -lib_LTLIBRARIES = src/libcyassl.la -man_MANS = -noinst_LTLIBRARIES = -include_HEADERS = -nobase_include_HEADERS = cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/camellia.h \ - cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/compress.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/dh.h \ - cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/ecc.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/fips_test.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/md2.h \ - cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/md5.h \ - cyassl/ctaocrypt/misc.h cyassl/ctaocrypt/pkcs7.h \ - cyassl/ctaocrypt/port.h cyassl/ctaocrypt/pwdbased.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/blake2.h cyassl/ctaocrypt/blake2-int.h \ - cyassl/ctaocrypt/blake2-impl.h cyassl/ctaocrypt/tfm.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/memory.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/openssl/asn1.h cyassl/openssl/bio.h cyassl/openssl/bn.h \ - cyassl/openssl/conf.h cyassl/openssl/crypto.h \ - cyassl/openssl/des.h cyassl/openssl/dh.h cyassl/openssl/dsa.h \ - cyassl/openssl/ecdsa.h cyassl/openssl/ec.h \ - cyassl/openssl/engine.h cyassl/openssl/err.h \ - cyassl/openssl/evp.h cyassl/openssl/hmac.h \ - cyassl/openssl/lhash.h cyassl/openssl/md4.h \ - cyassl/openssl/md5.h cyassl/openssl/ripemd.h \ - cyassl/openssl/ocsp.h cyassl/openssl/opensslconf.h \ - cyassl/openssl/opensslv.h cyassl/openssl/ossl_typ.h \ - cyassl/openssl/pem.h cyassl/openssl/pkcs12.h \ - cyassl/openssl/rand.h cyassl/openssl/rsa.h \ - cyassl/openssl/sha.h cyassl/openssl/ssl.h \ - cyassl/openssl/stack.h cyassl/openssl/ui.h \ - cyassl/openssl/x509.h cyassl/openssl/x509v3.h \ - cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \ - cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \ - cyassl/test.h cyassl/version.h cyassl/options.h cyassl/ocsp.h \ - cyassl/crl.h -EXTRA_HEADERS = -BUILT_SOURCES = -EXTRA_DIST = lib/dummy cyassl-ntru.vcproj cyassl.vcproj \ - cyassl-iphone.xcodeproj/project.pbxproj \ - cyassl-ios.xcodeproj/project.pbxproj cyassl-ntru.sln \ - cyassl.sln valgrind-error.sh gencertbuf.pl IDE \ - cyassl/sniffer_error.rc certs/ca-cert.pem certs/ca-key.pem \ - certs/client-cert.pem certs/client-keyEnc.pem \ - certs/client-key.pem certs/ecc-key.pem certs/ecc-keyPkcs8.pem \ - certs/ecc-client-key.pem certs/client-ecc-cert.pem \ - certs/ntru-cert.pem certs/dh2048.pem certs/server-cert.pem \ - certs/server-ecc.pem certs/server-ecc-rsa.pem \ - certs/server-keyEnc.pem certs/server-key.pem \ - certs/server-keyPkcs8Enc12.pem certs/server-keyPkcs8Enc2.pem \ - certs/server-keyPkcs8Enc.pem certs/server-keyPkcs8.pem \ - certs/ca-key.der certs/client-cert.der certs/client-key.der \ - certs/dh2048.der certs/rsa2048.der certs/dsa2048.der \ - certs/ecc-key.der certs/ntru-key.raw \ - certs/1024/client-cert.pem certs/1024/client-key.pem \ - certs/1024/dh1024.pem certs/1024/dsa1024.pem \ - certs/1024/client-cert.der certs/1024/client-key.der \ - certs/1024/dh1024.der certs/1024/dsa1024.der \ - certs/1024/rsa1024.der certs/crl/crl.pem certs/crl/cliCrl.pem \ - certs/crl/eccSrvCRL.pem certs/crl/eccCliCRL.pem \ - certs/crl/crl.revoked swig/PythonBuild.sh swig/README \ - swig/cyassl.i swig/cyassl_adds.c swig/python_cyassl.vcproj \ - swig/rsasign.py swig/runme.py support/cyassl.pc \ - ctaocrypt/benchmark/benchmark.sln \ - ctaocrypt/benchmark/benchmark.vcproj ctaocrypt/src/misc.c \ - ctaocrypt/src/asm.c ctaocrypt/src/ecc_fp.c \ - ctaocrypt/src/fp_mont_small.i ctaocrypt/src/fp_mul_comba_12.i \ - ctaocrypt/src/fp_mul_comba_17.i \ - ctaocrypt/src/fp_mul_comba_20.i \ - ctaocrypt/src/fp_mul_comba_24.i \ - ctaocrypt/src/fp_mul_comba_28.i \ - ctaocrypt/src/fp_mul_comba_32.i ctaocrypt/src/fp_mul_comba_3.i \ - ctaocrypt/src/fp_mul_comba_48.i ctaocrypt/src/fp_mul_comba_4.i \ - ctaocrypt/src/fp_mul_comba_64.i ctaocrypt/src/fp_mul_comba_6.i \ - ctaocrypt/src/fp_mul_comba_7.i ctaocrypt/src/fp_mul_comba_8.i \ - ctaocrypt/src/fp_mul_comba_9.i \ - ctaocrypt/src/fp_mul_comba_small_set.i \ - ctaocrypt/src/fp_sqr_comba_12.i \ - ctaocrypt/src/fp_sqr_comba_17.i \ - ctaocrypt/src/fp_sqr_comba_20.i \ - ctaocrypt/src/fp_sqr_comba_24.i \ - ctaocrypt/src/fp_sqr_comba_28.i \ - ctaocrypt/src/fp_sqr_comba_32.i ctaocrypt/src/fp_sqr_comba_3.i \ - ctaocrypt/src/fp_sqr_comba_48.i ctaocrypt/src/fp_sqr_comba_4.i \ - ctaocrypt/src/fp_sqr_comba_64.i ctaocrypt/src/fp_sqr_comba_6.i \ - ctaocrypt/src/fp_sqr_comba_7.i ctaocrypt/src/fp_sqr_comba_8.i \ - ctaocrypt/src/fp_sqr_comba_9.i \ - ctaocrypt/src/fp_sqr_comba_small_set.i ctaocrypt/test/test.sln \ - ctaocrypt/test/test.vcproj examples/client/client.sln \ - examples/client/client-ntru.vcproj \ - examples/client/client.vcproj examples/server/server.sln \ - examples/server/server-ntru.vcproj \ - examples/server/server.vcproj \ - examples/echoclient/echoclient.sln \ - examples/echoclient/echoclient-ntru.vcproj \ - examples/echoclient/echoclient.vcproj \ - examples/echoserver/echoserver.sln \ - examples/echoserver/echoserver-ntru.vcproj \ - examples/echoserver/echoserver.vcproj testsuite/testsuite.sln \ - testsuite/testsuite-ntru.vcproj testsuite/testsuite.vcproj \ - input quit tests/unit.h tests/test.conf tests/test-dtls.conf \ - sslSniffer/sslSniffer.vcproj \ - sslSniffer/sslSnifferTest/sslSniffTest.vcproj \ - mqx/ctaocrypt_test/.cproject mqx/ctaocrypt_test/.project \ - mqx/ctaocrypt_test/ReferencedRSESystems.xml \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ - mqx/ctaocrypt_test/Sources/main.c \ - mqx/ctaocrypt_test/Sources/main.h mqx/README \ - mqx/cyassl/.cproject mqx/cyassl/.project \ - mqx/cyassl_client/.cproject mqx/cyassl_client/.project \ - mqx/cyassl_client/ReferencedRSESystems.xml \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \ - mqx/cyassl_client/Sources/main.c \ - mqx/cyassl_client/Sources/main.h mqx/util_lib/.cproject \ - mqx/util_lib/.project mqx/util_lib/Sources/util.c \ - mqx/util_lib/Sources/util.h mplabx/PIC32MZ-serial.h \ - mplabx/README mplabx/benchmark_main.c mplabx/test_main.c \ - mplabx/ctaocrypt_benchmark.X/Makefile \ - mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_benchmark.X/nbproject/project.xml \ - mplabx/ctaocrypt_test.X/Makefile \ - mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_test.X/nbproject/project.xml \ - mplabx/cyassl.X/Makefile \ - mplabx/cyassl.X/nbproject/configurations.xml \ - mplabx/cyassl.X/nbproject/project.xml mcapi/README \ - mcapi/PIC32MZ-serial.h mcapi/ctaocrypt_mcapi.X/Makefile \ - mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_mcapi.X/nbproject/project.xml \ - mcapi/ctaocrypt_test.X/Makefile \ - mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_test.X/nbproject/project.xml \ - mcapi/cyassl.X/Makefile \ - mcapi/cyassl.X/nbproject/configurations.xml \ - mcapi/cyassl.X/nbproject/project.xml mcapi/zlib.X/Makefile \ - mcapi/zlib.X/nbproject/configurations.xml \ - mcapi/zlib.X/nbproject/project.xml -dist_doc_DATA = certs/taoCert.txt doc/README.txt -exampledir = $(docdir)/example -dist_example_DATA = examples/client/client.c examples/server/server.c \ - examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c -ACLOCAL_AMFLAGS = -I m4 -src_libcyassl_la_SOURCES = src/internal.c src/io.c src/keys.c \ - src/ssl.c src/tls.c ctaocrypt/src/hmac.c \ - ctaocrypt/src/random.c ctaocrypt/src/sha256.c \ - ctaocrypt/src/logging.c ctaocrypt/src/port.c \ - ctaocrypt/src/error.c $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) \ - $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_10) $(am__append_11) \ - $(am__append_12) $(am__append_13) $(am__append_14) \ - $(am__append_15) $(am__append_16) $(am__append_17) \ - $(am__append_18) $(am__append_19) $(am__append_20) \ - $(am__append_21) $(am__append_22) $(am__append_23) \ - $(am__append_24) $(am__append_25) $(am__append_26) \ - $(am__append_27) $(am__append_28) $(am__append_29) \ - $(am__append_30) $(am__append_31) -src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} -src_libcyassl_la_LIBADD = $(LIBM) -src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) -src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = support/cyassl.pc -ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c -ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la -ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la -ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c -ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la -ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_client_client_SOURCES = examples/client/client.c -@BUILD_EXAMPLES_TRUE@examples_client_client_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_client_client_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_server_server_SOURCES = examples/server/server.c -@BUILD_EXAMPLES_TRUE@examples_server_server_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_server_server_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c -@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c -@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_SOURCES = \ -@BUILD_EXAMPLES_TRUE@ ctaocrypt/test/test.c \ -@BUILD_EXAMPLES_TRUE@ examples/client/client.c \ -@BUILD_EXAMPLES_TRUE@ examples/echoclient/echoclient.c \ -@BUILD_EXAMPLES_TRUE@ examples/echoserver/echoserver.c \ -@BUILD_EXAMPLES_TRUE@ examples/server/server.c \ -@BUILD_EXAMPLES_TRUE@ testsuite/testsuite.c - -@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@tests_unit_test_SOURCES = \ -@BUILD_EXAMPLES_TRUE@ tests/unit.c \ -@BUILD_EXAMPLES_TRUE@ tests/api.c \ -@BUILD_EXAMPLES_TRUE@ tests/suites.c \ -@BUILD_EXAMPLES_TRUE@ tests/hash.c \ -@BUILD_EXAMPLES_TRUE@ examples/client/client.c \ -@BUILD_EXAMPLES_TRUE@ examples/server/server.c - -@BUILD_EXAMPLES_TRUE@tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -@BUILD_EXAMPLES_TRUE@tests_unit_test_LDADD = src/libcyassl.la -@BUILD_EXAMPLES_TRUE@tests_unit_test_DEPENDENCIES = src/libcyassl.la -@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c -@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap -@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la -@BUILD_MCAPI_TRUE@mcapi_test_SOURCES = mcapi/crypto.c \ -@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.c - -@BUILD_MCAPI_TRUE@mcapi_test_LDADD = src/libcyassl.la -@BUILD_MCAPI_TRUE@mcapi_test_DEPENDENCIES = src/libcyassl.la -@USE_VALGRIND_TRUE@TESTS_ENVIRONMENT = ./valgrind-error.sh -TEST_EXTENSIONS = .test -all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .s .test .test$(EXEEXT) .trs -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/crl/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/ctaocrypt/benchmark/include.am $(srcdir)/ctaocrypt/src/include.am $(srcdir)/ctaocrypt/test/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/ctaocrypt_test/Sources/include.am $(srcdir)/mqx/cyassl/include.am $(srcdir)/mqx/cyassl_client/Sources/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/ctaocrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mplabx/cyassl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/ctaocrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/ctaocrypt_test.X/nbproject/include.am $(srcdir)/mcapi/cyassl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -stamp-h: $(top_builddir)/config.status $(srcdir)/stamp-h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -cyassl/version.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/version.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -cyassl/options.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/options.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -support/cyassl.pc: $(top_builddir)/config.status $(top_srcdir)/support/cyassl.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -rpm/spec: $(top_builddir)/config.status $(top_srcdir)/rpm/spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -src/$(am__dirstamp): - @$(MKDIR_P) src - @: > src/$(am__dirstamp) -src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/$(DEPDIR) - @: > src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-internal.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-io.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-keys.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-ssl.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-tls.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/src - @: > ctaocrypt/src/$(am__dirstamp) -ctaocrypt/src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/src/$(DEPDIR) - @: > ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-random.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha256.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-logging.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-error.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-memory.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-fips_test.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-coding.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-pwdbased.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/aes_asm.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-camellia.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-ripemd.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-sha512.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-blake2b.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-sniffer.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-hc128.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-rabbit.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-integer.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-ocsp.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/src_libcyassl_la-crl.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-compress.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/src/src_libcyassl_la-pkcs7.lo: \ - ctaocrypt/src/$(am__dirstamp) \ - ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) - -src/libcyassl.la: $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_DEPENDENCIES) $(EXTRA_src_libcyassl_la_DEPENDENCIES) src/$(am__dirstamp) - $(AM_V_CCLD)$(src_libcyassl_la_LINK) -rpath $(libdir) $(src_libcyassl_la_OBJECTS) $(src_libcyassl_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -ctaocrypt/benchmark/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/benchmark - @: > ctaocrypt/benchmark/$(am__dirstamp) -ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/benchmark/$(DEPDIR) - @: > ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/benchmark/benchmark.$(OBJEXT): \ - ctaocrypt/benchmark/$(am__dirstamp) \ - ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) - -ctaocrypt/benchmark/benchmark$(EXEEXT): $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_DEPENDENCIES) $(EXTRA_ctaocrypt_benchmark_benchmark_DEPENDENCIES) ctaocrypt/benchmark/$(am__dirstamp) - @rm -f ctaocrypt/benchmark/benchmark$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ctaocrypt_benchmark_benchmark_OBJECTS) $(ctaocrypt_benchmark_benchmark_LDADD) $(LIBS) -ctaocrypt/test/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/test - @: > ctaocrypt/test/$(am__dirstamp) -ctaocrypt/test/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ctaocrypt/test/$(DEPDIR) - @: > ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) -ctaocrypt/test/test.$(OBJEXT): ctaocrypt/test/$(am__dirstamp) \ - ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) - -ctaocrypt/test/testctaocrypt$(EXEEXT): $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_DEPENDENCIES) $(EXTRA_ctaocrypt_test_testctaocrypt_DEPENDENCIES) ctaocrypt/test/$(am__dirstamp) - @rm -f ctaocrypt/test/testctaocrypt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ctaocrypt_test_testctaocrypt_OBJECTS) $(ctaocrypt_test_testctaocrypt_LDADD) $(LIBS) -examples/client/$(am__dirstamp): - @$(MKDIR_P) examples/client - @: > examples/client/$(am__dirstamp) -examples/client/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/client/$(DEPDIR) - @: > examples/client/$(DEPDIR)/$(am__dirstamp) -examples/client/client.$(OBJEXT): examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) - -examples/client/client$(EXEEXT): $(examples_client_client_OBJECTS) $(examples_client_client_DEPENDENCIES) $(EXTRA_examples_client_client_DEPENDENCIES) examples/client/$(am__dirstamp) - @rm -f examples/client/client$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_client_client_OBJECTS) $(examples_client_client_LDADD) $(LIBS) -examples/echoclient/$(am__dirstamp): - @$(MKDIR_P) examples/echoclient - @: > examples/echoclient/$(am__dirstamp) -examples/echoclient/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/echoclient/$(DEPDIR) - @: > examples/echoclient/$(DEPDIR)/$(am__dirstamp) -examples/echoclient/echoclient.$(OBJEXT): \ - examples/echoclient/$(am__dirstamp) \ - examples/echoclient/$(DEPDIR)/$(am__dirstamp) - -examples/echoclient/echoclient$(EXEEXT): $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_DEPENDENCIES) $(EXTRA_examples_echoclient_echoclient_DEPENDENCIES) examples/echoclient/$(am__dirstamp) - @rm -f examples/echoclient/echoclient$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_LDADD) $(LIBS) -examples/echoserver/$(am__dirstamp): - @$(MKDIR_P) examples/echoserver - @: > examples/echoserver/$(am__dirstamp) -examples/echoserver/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/echoserver/$(DEPDIR) - @: > examples/echoserver/$(DEPDIR)/$(am__dirstamp) -examples/echoserver/echoserver.$(OBJEXT): \ - examples/echoserver/$(am__dirstamp) \ - examples/echoserver/$(DEPDIR)/$(am__dirstamp) - -examples/echoserver/echoserver$(EXEEXT): $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_DEPENDENCIES) $(EXTRA_examples_echoserver_echoserver_DEPENDENCIES) examples/echoserver/$(am__dirstamp) - @rm -f examples/echoserver/echoserver$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_LDADD) $(LIBS) -examples/server/$(am__dirstamp): - @$(MKDIR_P) examples/server - @: > examples/server/$(am__dirstamp) -examples/server/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) examples/server/$(DEPDIR) - @: > examples/server/$(DEPDIR)/$(am__dirstamp) -examples/server/server.$(OBJEXT): examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) - -examples/server/server$(EXEEXT): $(examples_server_server_OBJECTS) $(examples_server_server_DEPENDENCIES) $(EXTRA_examples_server_server_DEPENDENCIES) examples/server/$(am__dirstamp) - @rm -f examples/server/server$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(examples_server_server_OBJECTS) $(examples_server_server_LDADD) $(LIBS) -mcapi/$(am__dirstamp): - @$(MKDIR_P) mcapi - @: > mcapi/$(am__dirstamp) -mcapi/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) mcapi/$(DEPDIR) - @: > mcapi/$(DEPDIR)/$(am__dirstamp) -mcapi/crypto.$(OBJEXT): mcapi/$(am__dirstamp) \ - mcapi/$(DEPDIR)/$(am__dirstamp) -mcapi/mcapi_test.$(OBJEXT): mcapi/$(am__dirstamp) \ - mcapi/$(DEPDIR)/$(am__dirstamp) - -mcapi/test$(EXEEXT): $(mcapi_test_OBJECTS) $(mcapi_test_DEPENDENCIES) $(EXTRA_mcapi_test_DEPENDENCIES) mcapi/$(am__dirstamp) - @rm -f mcapi/test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mcapi_test_OBJECTS) $(mcapi_test_LDADD) $(LIBS) -sslSniffer/sslSnifferTest/$(am__dirstamp): - @$(MKDIR_P) sslSniffer/sslSnifferTest - @: > sslSniffer/sslSnifferTest/$(am__dirstamp) -sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) sslSniffer/sslSnifferTest/$(DEPDIR) - @: > sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) -sslSniffer/sslSnifferTest/snifftest.$(OBJEXT): \ - sslSniffer/sslSnifferTest/$(am__dirstamp) \ - sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) - -sslSniffer/sslSnifferTest/snifftest$(EXEEXT): $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) $(EXTRA_sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) sslSniffer/sslSnifferTest/$(am__dirstamp) - @rm -f sslSniffer/sslSnifferTest/snifftest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_LDADD) $(LIBS) -tests/$(am__dirstamp): - @$(MKDIR_P) tests - @: > tests/$(am__dirstamp) -tests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/$(DEPDIR) - @: > tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-unit.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-api.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-suites.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -tests/tests_unit_test-hash.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) -examples/client/tests_unit_test-client.$(OBJEXT): \ - examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) -examples/server/tests_unit_test-server.$(OBJEXT): \ - examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) - -tests/unit.test$(EXEEXT): $(tests_unit_test_OBJECTS) $(tests_unit_test_DEPENDENCIES) $(EXTRA_tests_unit_test_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/unit.test$(EXEEXT) - $(AM_V_CCLD)$(tests_unit_test_LINK) $(tests_unit_test_OBJECTS) $(tests_unit_test_LDADD) $(LIBS) -ctaocrypt/test/testsuite_testsuite_test-test.$(OBJEXT): \ - ctaocrypt/test/$(am__dirstamp) \ - ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) -examples/client/testsuite_testsuite_test-client.$(OBJEXT): \ - examples/client/$(am__dirstamp) \ - examples/client/$(DEPDIR)/$(am__dirstamp) -examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT): \ - examples/echoclient/$(am__dirstamp) \ - examples/echoclient/$(DEPDIR)/$(am__dirstamp) -examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT): \ - examples/echoserver/$(am__dirstamp) \ - examples/echoserver/$(DEPDIR)/$(am__dirstamp) -examples/server/testsuite_testsuite_test-server.$(OBJEXT): \ - examples/server/$(am__dirstamp) \ - examples/server/$(DEPDIR)/$(am__dirstamp) -testsuite/$(am__dirstamp): - @$(MKDIR_P) testsuite - @: > testsuite/$(am__dirstamp) -testsuite/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) testsuite/$(DEPDIR) - @: > testsuite/$(DEPDIR)/$(am__dirstamp) -testsuite/testsuite_testsuite_test-testsuite.$(OBJEXT): \ - testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp) - -testsuite/testsuite.test$(EXEEXT): $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_DEPENDENCIES) $(EXTRA_testsuite_testsuite_test_DEPENDENCIES) testsuite/$(am__dirstamp) - @rm -f testsuite/testsuite.test$(EXEEXT) - $(AM_V_CCLD)$(testsuite_testsuite_test_LINK) $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f ctaocrypt/benchmark/*.$(OBJEXT) - -rm -f ctaocrypt/src/*.$(OBJEXT) - -rm -f ctaocrypt/src/*.lo - -rm -f ctaocrypt/test/*.$(OBJEXT) - -rm -f examples/client/*.$(OBJEXT) - -rm -f examples/echoclient/*.$(OBJEXT) - -rm -f examples/echoserver/*.$(OBJEXT) - -rm -f examples/server/*.$(OBJEXT) - -rm -f mcapi/*.$(OBJEXT) - -rm -f src/*.$(OBJEXT) - -rm -f src/*.lo - -rm -f sslSniffer/sslSnifferTest/*.$(OBJEXT) - -rm -f tests/*.$(OBJEXT) - -rm -f testsuite/*.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/benchmark/$(DEPDIR)/benchmark.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/test/$(DEPDIR)/test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/tests_unit_test-client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/echoclient.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/echoserver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/tests_unit_test-server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/crypto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/mcapi_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-crl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-internal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-keys.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-ssl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_libcyassl_la-tls.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-api.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-suites.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_unit_test-unit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -src/src_libcyassl_la-internal.lo: src/internal.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-internal.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-internal.Tpo -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-internal.Tpo src/$(DEPDIR)/src_libcyassl_la-internal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/internal.c' object='src/src_libcyassl_la-internal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c - -src/src_libcyassl_la-io.lo: src/io.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-io.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-io.Tpo -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-io.Tpo src/$(DEPDIR)/src_libcyassl_la-io.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/io.c' object='src/src_libcyassl_la-io.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-io.lo `test -f 'src/io.c' || echo '$(srcdir)/'`src/io.c - -src/src_libcyassl_la-keys.lo: src/keys.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-keys.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-keys.Tpo -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-keys.Tpo src/$(DEPDIR)/src_libcyassl_la-keys.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/keys.c' object='src/src_libcyassl_la-keys.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c - -src/src_libcyassl_la-ssl.lo: src/ssl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ssl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ssl.Tpo src/$(DEPDIR)/src_libcyassl_la-ssl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ssl.c' object='src/src_libcyassl_la-ssl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c - -src/src_libcyassl_la-tls.lo: src/tls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-tls.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-tls.Tpo -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-tls.Tpo src/$(DEPDIR)/src_libcyassl_la-tls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tls.c' object='src/src_libcyassl_la-tls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c - -ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hmac.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hmac.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/hmac.c' object='ctaocrypt/src/src_libcyassl_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c - -ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-random.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-random.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/random.c' object='ctaocrypt/src/src_libcyassl_la-random.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c - -ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha256.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha256.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha256.c' object='ctaocrypt/src/src_libcyassl_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c - -ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-logging.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-logging.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/logging.c' object='ctaocrypt/src/src_libcyassl_la-logging.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-logging.lo `test -f 'ctaocrypt/src/logging.c' || echo '$(srcdir)/'`ctaocrypt/src/logging.c - -ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-port.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-port.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/port.c' object='ctaocrypt/src/src_libcyassl_la-port.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-port.lo `test -f 'ctaocrypt/src/port.c' || echo '$(srcdir)/'`ctaocrypt/src/port.c - -ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-error.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/error.c' object='ctaocrypt/src/src_libcyassl_la-error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-error.lo `test -f 'ctaocrypt/src/error.c' || echo '$(srcdir)/'`ctaocrypt/src/error.c - -ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-memory.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-memory.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/memory.c' object='ctaocrypt/src/src_libcyassl_la-memory.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-memory.lo `test -f 'ctaocrypt/src/memory.c' || echo '$(srcdir)/'`ctaocrypt/src/memory.c - -ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rsa.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/rsa.c' object='ctaocrypt/src/src_libcyassl_la-rsa.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c - -ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dh.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dh.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/dh.c' object='ctaocrypt/src/src_libcyassl_la-dh.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dh.lo `test -f 'ctaocrypt/src/dh.c' || echo '$(srcdir)/'`ctaocrypt/src/dh.c - -ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-asn.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-asn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/asn.c' object='ctaocrypt/src/src_libcyassl_la-asn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-asn.lo `test -f 'ctaocrypt/src/asn.c' || echo '$(srcdir)/'`ctaocrypt/src/asn.c - -ctaocrypt/src/src_libcyassl_la-fips.lo: ctaocrypt/src/fips.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips.c' object='ctaocrypt/src/src_libcyassl_la-fips.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c - -ctaocrypt/src/src_libcyassl_la-fips_test.lo: ctaocrypt/src/fips_test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-fips_test.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-fips_test.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips_test.c' object='ctaocrypt/src/src_libcyassl_la-fips_test.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c - -ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-coding.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-coding.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/coding.c' object='ctaocrypt/src/src_libcyassl_la-coding.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-coding.lo `test -f 'ctaocrypt/src/coding.c' || echo '$(srcdir)/'`ctaocrypt/src/coding.c - -ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-aes.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-aes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/aes.c' object='ctaocrypt/src/src_libcyassl_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c - -ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-des3.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-des3.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/des3.c' object='ctaocrypt/src/src_libcyassl_la-des3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c - -ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha.c' object='ctaocrypt/src/src_libcyassl_la-sha.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c - -ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-arc4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-arc4.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/arc4.c' object='ctaocrypt/src/src_libcyassl_la-arc4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-arc4.lo `test -f 'ctaocrypt/src/arc4.c' || echo '$(srcdir)/'`ctaocrypt/src/arc4.c - -ctaocrypt/src/src_libcyassl_la-md4.lo: ctaocrypt/src/md4.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md4.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md4.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md4.c' object='ctaocrypt/src/src_libcyassl_la-md4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md4.lo `test -f 'ctaocrypt/src/md4.c' || echo '$(srcdir)/'`ctaocrypt/src/md4.c - -ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md5.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md5.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md5.c' object='ctaocrypt/src/src_libcyassl_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md5.lo `test -f 'ctaocrypt/src/md5.c' || echo '$(srcdir)/'`ctaocrypt/src/md5.c - -ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pwdbased.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pwdbased.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/pwdbased.c' object='ctaocrypt/src/src_libcyassl_la-pwdbased.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pwdbased.lo `test -f 'ctaocrypt/src/pwdbased.c' || echo '$(srcdir)/'`ctaocrypt/src/pwdbased.c - -ctaocrypt/src/src_libcyassl_la-dsa.lo: ctaocrypt/src/dsa.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-dsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-dsa.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/dsa.c' object='ctaocrypt/src/src_libcyassl_la-dsa.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-dsa.lo `test -f 'ctaocrypt/src/dsa.c' || echo '$(srcdir)/'`ctaocrypt/src/dsa.c - -ctaocrypt/src/src_libcyassl_la-camellia.lo: ctaocrypt/src/camellia.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-camellia.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-camellia.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/camellia.c' object='ctaocrypt/src/src_libcyassl_la-camellia.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-camellia.lo `test -f 'ctaocrypt/src/camellia.c' || echo '$(srcdir)/'`ctaocrypt/src/camellia.c - -ctaocrypt/src/src_libcyassl_la-md2.lo: ctaocrypt/src/md2.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-md2.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-md2.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/md2.c' object='ctaocrypt/src/src_libcyassl_la-md2.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-md2.lo `test -f 'ctaocrypt/src/md2.c' || echo '$(srcdir)/'`ctaocrypt/src/md2.c - -ctaocrypt/src/src_libcyassl_la-ripemd.lo: ctaocrypt/src/ripemd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ripemd.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ripemd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/ripemd.c' object='ctaocrypt/src/src_libcyassl_la-ripemd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ripemd.lo `test -f 'ctaocrypt/src/ripemd.c' || echo '$(srcdir)/'`ctaocrypt/src/ripemd.c - -ctaocrypt/src/src_libcyassl_la-sha512.lo: ctaocrypt/src/sha512.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-sha512.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-sha512.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha512.c' object='ctaocrypt/src/src_libcyassl_la-sha512.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c - -ctaocrypt/src/src_libcyassl_la-blake2b.lo: ctaocrypt/src/blake2b.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-blake2b.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-blake2b.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/blake2b.c' object='ctaocrypt/src/src_libcyassl_la-blake2b.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-blake2b.lo `test -f 'ctaocrypt/src/blake2b.c' || echo '$(srcdir)/'`ctaocrypt/src/blake2b.c - -src/src_libcyassl_la-sniffer.lo: src/sniffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-sniffer.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-sniffer.Tpo src/$(DEPDIR)/src_libcyassl_la-sniffer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sniffer.c' object='src/src_libcyassl_la-sniffer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c - -ctaocrypt/src/src_libcyassl_la-hc128.lo: ctaocrypt/src/hc128.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-hc128.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-hc128.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/hc128.c' object='ctaocrypt/src/src_libcyassl_la-hc128.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-hc128.lo `test -f 'ctaocrypt/src/hc128.c' || echo '$(srcdir)/'`ctaocrypt/src/hc128.c - -ctaocrypt/src/src_libcyassl_la-rabbit.lo: ctaocrypt/src/rabbit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-rabbit.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-rabbit.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/rabbit.c' object='ctaocrypt/src/src_libcyassl_la-rabbit.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-rabbit.lo `test -f 'ctaocrypt/src/rabbit.c' || echo '$(srcdir)/'`ctaocrypt/src/rabbit.c - -ctaocrypt/src/src_libcyassl_la-misc.lo: ctaocrypt/src/misc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-misc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-misc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/misc.c' object='ctaocrypt/src/src_libcyassl_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-misc.lo `test -f 'ctaocrypt/src/misc.c' || echo '$(srcdir)/'`ctaocrypt/src/misc.c - -ctaocrypt/src/src_libcyassl_la-tfm.lo: ctaocrypt/src/tfm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-tfm.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-tfm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/tfm.c' object='ctaocrypt/src/src_libcyassl_la-tfm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-tfm.lo `test -f 'ctaocrypt/src/tfm.c' || echo '$(srcdir)/'`ctaocrypt/src/tfm.c - -ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-integer.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-integer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/integer.c' object='ctaocrypt/src/src_libcyassl_la-integer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-integer.lo `test -f 'ctaocrypt/src/integer.c' || echo '$(srcdir)/'`ctaocrypt/src/integer.c - -ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-ecc.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-ecc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/ecc.c' object='ctaocrypt/src/src_libcyassl_la-ecc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-ecc.lo `test -f 'ctaocrypt/src/ecc.c' || echo '$(srcdir)/'`ctaocrypt/src/ecc.c - -src/src_libcyassl_la-ocsp.lo: src/ocsp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-ocsp.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-ocsp.Tpo src/$(DEPDIR)/src_libcyassl_la-ocsp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ocsp.c' object='src/src_libcyassl_la-ocsp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c - -src/src_libcyassl_la-crl.lo: src/crl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT src/src_libcyassl_la-crl.lo -MD -MP -MF src/$(DEPDIR)/src_libcyassl_la-crl.Tpo -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_libcyassl_la-crl.Tpo src/$(DEPDIR)/src_libcyassl_la-crl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/crl.c' object='src/src_libcyassl_la-crl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o src/src_libcyassl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c - -ctaocrypt/src/src_libcyassl_la-compress.lo: ctaocrypt/src/compress.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-compress.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-compress.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/compress.c' object='ctaocrypt/src/src_libcyassl_la-compress.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-compress.lo `test -f 'ctaocrypt/src/compress.c' || echo '$(srcdir)/'`ctaocrypt/src/compress.c - -ctaocrypt/src/src_libcyassl_la-pkcs7.lo: ctaocrypt/src/pkcs7.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libcyassl_la-pkcs7.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Tpo ctaocrypt/src/$(DEPDIR)/src_libcyassl_la-pkcs7.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/pkcs7.c' object='ctaocrypt/src/src_libcyassl_la-pkcs7.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libcyassl_la_CPPFLAGS) $(CPPFLAGS) $(src_libcyassl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libcyassl_la-pkcs7.lo `test -f 'ctaocrypt/src/pkcs7.c' || echo '$(srcdir)/'`ctaocrypt/src/pkcs7.c - -tests/tests_unit_test-unit.o: tests/unit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c - -tests/tests_unit_test-unit.obj: tests/unit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-unit.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-unit.Tpo -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-unit.Tpo tests/$(DEPDIR)/tests_unit_test-unit.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/tests_unit_test-unit.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi` - -tests/tests_unit_test-api.o: tests/api.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c - -tests/tests_unit_test-api.obj: tests/api.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-api.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-api.Tpo -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-api.Tpo tests/$(DEPDIR)/tests_unit_test-api.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/tests_unit_test-api.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi` - -tests/tests_unit_test-suites.o: tests/suites.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c - -tests/tests_unit_test-suites.obj: tests/suites.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-suites.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-suites.Tpo -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-suites.Tpo tests/$(DEPDIR)/tests_unit_test-suites.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/tests_unit_test-suites.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi` - -tests/tests_unit_test-hash.o: tests/hash.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.o -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c - -tests/tests_unit_test-hash.obj: tests/hash.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/tests_unit_test-hash.obj -MD -MP -MF tests/$(DEPDIR)/tests_unit_test-hash.Tpo -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_unit_test-hash.Tpo tests/$(DEPDIR)/tests_unit_test-hash.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/tests_unit_test-hash.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/tests_unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi` - -examples/client/tests_unit_test-client.o: examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - -examples/client/tests_unit_test-client.obj: examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - -examples/server/tests_unit_test-server.o: examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - -examples/server/tests_unit_test-server.obj: examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - -ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.o -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.o `test -f 'ctaocrypt/test/test.c' || echo '$(srcdir)/'`ctaocrypt/test/test.c - -ctaocrypt/test/testsuite_testsuite_test-test.obj: ctaocrypt/test/test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT ctaocrypt/test/testsuite_testsuite_test-test.obj -MD -MP -MF ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo ctaocrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/test/test.c' object='ctaocrypt/test/testsuite_testsuite_test-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o ctaocrypt/test/testsuite_testsuite_test-test.obj `if test -f 'ctaocrypt/test/test.c'; then $(CYGPATH_W) 'ctaocrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/ctaocrypt/test/test.c'; fi` - -examples/client/testsuite_testsuite_test-client.o: examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c - -examples/client/testsuite_testsuite_test-client.obj: examples/client/client.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi` - -examples/echoclient/testsuite_testsuite_test-echoclient.o: examples/echoclient/echoclient.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.o -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c - -examples/echoclient/testsuite_testsuite_test-echoclient.obj: examples/echoclient/echoclient.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.obj -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi` - -examples/echoserver/testsuite_testsuite_test-echoserver.o: examples/echoserver/echoserver.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.o -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c - -examples/echoserver/testsuite_testsuite_test-echoserver.obj: examples/echoserver/echoserver.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.obj -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi` - -examples/server/testsuite_testsuite_test-server.o: examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c - -examples/server/testsuite_testsuite_test-server.obj: examples/server/server.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi` - -testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.o -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c - -testsuite/testsuite_testsuite_test-testsuite.obj: testsuite/testsuite.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_testsuite_test-testsuite.obj -MD -MP -MF testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_testsuite_test-testsuite.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_testsuite_test-testsuite.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi` - -.s.o: - $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $< - -.s.obj: - $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.s.lo: - $(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf ctaocrypt/benchmark/.libs ctaocrypt/benchmark/_libs - -rm -rf ctaocrypt/src/.libs ctaocrypt/src/_libs - -rm -rf ctaocrypt/test/.libs ctaocrypt/test/_libs - -rm -rf examples/client/.libs examples/client/_libs - -rm -rf examples/echoclient/.libs examples/echoclient/_libs - -rm -rf examples/echoserver/.libs examples/echoserver/_libs - -rm -rf examples/server/.libs examples/server/_libs - -rm -rf mcapi/.libs mcapi/_libs - -rm -rf src/.libs src/_libs - -rm -rf sslSniffer/sslSnifferTest/.libs sslSniffer/sslSnifferTest/_libs - -rm -rf tests/.libs tests/_libs - -rm -rf testsuite/.libs testsuite/_libs - -distclean-libtool: - -rm -f libtool config.lt -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) -install-dist_exampleDATA: $(dist_example_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \ - done - -uninstall-dist_exampleDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -install-nobase_includeHEADERS: $(nobase_include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - $(am__nobase_list) | while read dir files; do \ - xfiles=; for file in $$files; do \ - if test -f "$$file"; then xfiles="$$xfiles $$file"; \ - else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ - test -z "$$xfiles" || { \ - test "x$$dir" = x. || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ - echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ - $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ - done - -uninstall-nobase_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ - $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - else \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -mcapi/test.log: mcapi/test$(EXEEXT) - @p='mcapi/test$(EXEEXT)'; \ - b='mcapi/test'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ - config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f ctaocrypt/benchmark/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/benchmark/$(am__dirstamp) - -rm -f ctaocrypt/src/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/src/$(am__dirstamp) - -rm -f ctaocrypt/test/$(DEPDIR)/$(am__dirstamp) - -rm -f ctaocrypt/test/$(am__dirstamp) - -rm -f examples/client/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/client/$(am__dirstamp) - -rm -f examples/echoclient/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/echoclient/$(am__dirstamp) - -rm -f examples/echoserver/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/echoserver/$(am__dirstamp) - -rm -f examples/server/$(DEPDIR)/$(am__dirstamp) - -rm -f examples/server/$(am__dirstamp) - -rm -f mcapi/$(DEPDIR)/$(am__dirstamp) - -rm -f mcapi/$(am__dirstamp) - -rm -f src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/$(am__dirstamp) - -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp) - -rm -f sslSniffer/sslSnifferTest/$(am__dirstamp) - -rm -f tests/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/$(am__dirstamp) - -rm -f testsuite/$(DEPDIR)/$(am__dirstamp) - -rm -f testsuite/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_docDATA install-dist_exampleDATA \ - install-includeHEADERS install-nobase_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-exec-local \ - install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ctaocrypt/benchmark/$(DEPDIR) ctaocrypt/src/$(DEPDIR) ctaocrypt/test/$(DEPDIR) examples/client/$(DEPDIR) examples/echoclient/$(DEPDIR) examples/echoserver/$(DEPDIR) examples/server/$(DEPDIR) mcapi/$(DEPDIR) src/$(DEPDIR) sslSniffer/sslSnifferTest/$(DEPDIR) tests/$(DEPDIR) testsuite/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-dist_exampleDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA - -.MAKE: all check check-am install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ - check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ - cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ - install-data-am install-dist_docDATA install-dist_exampleDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-local install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nobase_includeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic maintainer-clean-local mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-dist_exampleDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA - - -#includes additional rules from aminclude.am -@INC_AMINCLUDE@ - -rpm-build: rpm/spec dist - @rm -f *.rpm - @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm - @mkdir -p ~/rpmbuild/BUILD/ - @mkdir -p ~/rpmbuild/RPMS/i386/ - @mkdir -p ~/rpmbuild/RPMS/i686/ - @mkdir -p ~/rpmbuild/RPMS/noarch/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/SPECS/ - @mkdir -p ~/rpmbuild/SRPMS/ - @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba --clean rpm/spec - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . - -rpm-sign: rpm-build - @rpm --addsign *.rpm - @rpm --checksig *.rpm - -clean-rpm: - @rm -f *.tar.gz - @rm -f *.src.rpm - @rm -f *.rpm - -rpm: rpm-build - -release: rpm-sign - -auto-rpmbuild: - @auto-br-rpmbuild -ba rpm/spec -test: check -tests/unit.log: testsuite/testsuite.log - -maintainer-clean-local: - -rm Makefile.in - -rm aclocal.m4 - -rm build-aux/compile - -rm build-aux/config.guess - -rm build-aux/config.sub - -rm build-aux/depcomp - -rm build-aux/install-sh - -rm build-aux/ltmain.sh - -rm build-aux/missing - -rm cyassl-config - -rmdir build-aux - -rm configure - -rm config.log - -rm config.status - -rm config.in - -rm m4/libtool.m4 - -rm m4/ltoptions.m4 - -rm m4/ltsugar.m4 - -rm m4/ltversion.m4 - -rm m4/lt~obsolete.m4 - -rm support/cyassl.pc - find . -type f -name '*~' -exec rm -f '{}' \; - -rm -f @PACKAGE@-*.tar.gz - -rm -f @PACKAGE@-*.rpm - -# !!!! first line of rule has to start with a hard (real) tab, not spaces -egs: - $(MAKE) examples/client/client; \ - $(MAKE) examples/echoclient/echoclient;\ - $(MAKE) examples/server/server; \ - $(MAKE) examples/echoserver/echoserver; - -ctc: - $(MAKE) ctaocrypt/test/testctaocrypt; \ - $(MAKE) ctaocrypt/benchmark/benchmark; - -install-exec-local: install-generic-config - -install-generic-config: - $(mkinstalldirs) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) - -uninstall-local: - -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@ - -merge-clean: - @find ./ | $(GREP) \.gcda | xargs rm -f - @find ./ | $(GREP) \.gcno | xargs rm -f - @find ./ | $(GREP) \.gz | xargs rm -f - @find ./ | $(GREP) \.orig | xargs rm -f - @find ./ | $(GREP) \.rej | xargs rm -f - @find ./ | $(GREP) \.rpm | xargs rm -f - @find ./ | $(GREP) \.THIS | xargs rm -f - @find ./ | $(GREP) \.OTHER | xargs rm -f - @find ./ | $(GREP) \.BASE | xargs rm -f - @find ./ | $(GREP) \~$$ | xargs rm -f - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/project1/cyassl-3.0.0/NEWS b/project1/cyassl-3.0.0/NEWS deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/README b/project1/cyassl-3.0.0/README deleted file mode 100644 index 9e3c58ea..00000000 --- a/project1/cyassl-3.0.0/README +++ /dev/null @@ -1,996 +0,0 @@ -*** Notes, Please read *** - -Note 1) -CyaSSL now needs all examples and tests to be run from the CyaSSL home -directory. This is because it finds certs and keys from ./certs/. Trying to -maintain the ability to run each program from its own directory, the testsuite -directory, the main directory (for make check/test), and for the various -different project layouts (with or without config) was becoming harder and -harder. Now to run testsuite just do: - -./testsuite/testsuite - -or - -make check (when using autoconf) - -On *nix or Windows the examples and testsuite will check to see if the current -directory is the source directory and if so, attempt to change to the CyaSSL -home directory. This should work in most setup cases, if not, just follow the -beginning of the note and specify the full path. - - -Note 2) -CyaSSL takes a different approach to certificate verification than OpenSSL does. -The default policy for the client is to verify the server, this means that if -you don't load CAs to verify the server you'll get a connect error, no signer -error to confirm failure (-188). If you want to mimic OpenSSL behavior of -having SSL_connect succeed even if verifying the server fails and reducing -security you can do this by calling: - -SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - -before calling SSL_new(); Though it's not recommended. - -*** end Notes *** - - -CyaSSL Release 3.0.0 (04/29/2014) - -Release 3.0.0 CyaSSL has bug fixes and new features including: - -- FIPS release candidate -- X.509 improvements that address items reported by Suman Jana with security - researchers at UT Austin and UC Davis -- Small stack size improvements, --enable-smallstack. Offloads large local - variables to the heap. (Note this is not complete.) -- Updated AES-CCM-8 cipher suites to use approved suite numbers. - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - -************ CyaSSL Release 2.9.4 (04/09/2014) - -Release 2.9.4 CyaSSL has bug fixes and new features including: - -- Security fixes that address items reported by Ivan Fratric of the Google - Security Team -- X.509 Unknown critical extensions treated as errors, report by Suman Jana with - security researchers at UT Austin and UC Davis -- Sniffer fixes for corrupted packet length and Jumbo frames -- ARM thumb mode assembly fixes -- Xcode 5.1 support including new clang -- PIC32 MZ hardware support -- CyaSSL Object has enough room to read the Record Header now w/o allocs -- FIPS wrappers for AES, 3DES, SHA1, SHA256, SHA384, HMAC, and RSA. -- A sample I/O pool is demonstrated with --enable-iopool to overtake memory - handling and reduce memory fragmentation on I/O large sizes - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - -************ CyaSSL Release 2.9.0 (02/07/2014) - -Release 2.9.0 CyaSSL has bug fixes and new features including: -- Freescale Kinetis RNGB support -- Freescale Kinetis mmCAU support -- TLS Hello extensions - - ECC - - Secure Renegotiation (null) - - Truncated HMAC -- SCEP support - - PKCS #7 Enveloped data and signed data - - PKCS #10 Certificate Signing Request generation -- DTLS sliding window -- OCSP Improvements - - API change to integrate into Certificate Manager - - IPv4/IPv6 agnostic - - example client/server support for OCSP - - OCSP nonces are optional -- GMAC hashing -- Windows build additions -- Windows CYGWIN build fixes -- Updated test certificates -- Microchip MPLAB Harmony support -- Update autoconf scripts -- Additional X.509 inspection functions -- ECC encrypt/decrypt primitives -- ECC Certificate generation - -The Freescale Kinetis K53 RNGB documentation can be found in Chapter 33 of the -K53 Sub-Family Reference Manual: -http://cache.freescale.com/files/32bit/doc/ref_manual/K53P144M100SF2RM.pdf - -Freescale Kinetis K60 mmCAU (AES, DES, 3DES, MD5, SHA, SHA256) documentation -can be found in the "ColdFire/ColdFire+ CAU and Kinetis mmCAU Software Library -User Guide": -http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf - - -*****************CyaSSL Release 2.8.0 (8/30/2013) - -Release 2.8.0 CyaSSL has bug fixes and new features including: -- AES-GCM and AES-CCM use AES-NI -- NetX default IO callback handlers -- IPv6 fixes for DTLS Hello Cookies -- The ability to unload Certs/Keys after the handshake, CyaSSL_UnloadCertsKeys() -- SEP certificate extensions -- Callback getters for easier resource freeing -- External CYASSL_MAX_ERROR_SZ for correct error buffer sizing -- MacEncrypt and DecryptVerify Callbacks for User Atomic Record Layer Processing -- Public Key Callbacks for ECC and RSA -- Client now sends blank cert upon request if doesn't have one with TLS <= 1.2 - - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - -*****************CyaSSL Release 2.7.0 (6/17/2013) - -Release 2.7.0 CyaSSL has bug fixes and new features including: -- SNI support for client and server -- KEIL MDK-ARM projects -- Wildcard check to domain name match, and Subject altnames are checked too -- Better error messages for certificate verification errors -- Ability to discard session during handshake verify -- More consistent error returns across all APIs -- Ability to unload CAs at the CTX or CertManager level -- Authority subject id support for Certificate matching -- Persistent session cache functionality -- Persistent CA cache functionality -- Client session table lookups to push serverID table to library level -- Camellia support to sniffer -- User controllable settings for DTLS timeout values -- Sniffer fixes for caching long lived sessions -- DTLS reliability enhancements for the handshake -- Better ThreadX support - -When compiling with Mingw, libtool may give the following warning due to -path conversion errors: - -libtool: link: Could not determine host file name corresponding to ** -libtool: link: Continuing, but uninstalled executables may not work. - -If so, examples and testsuite will have problems when run, showing an -error while loading shared libraries. To resolve, please run "make install". - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - -************** CyaSSL Release 2.6.0 (04/15/2013) - -Release 2.6.0 CyaSSL has bug fixes and new features including: -- DTLS 1.2 support including AEAD ciphers -- SHA-3 finalist Blake2 support, it's fast and uses little resources -- SHA-384 cipher suites including ECC ones -- HMAC now supports SHA-512 -- Track memory use for example client/server with -t option -- Better IPv6 examples with --enable-ipv6, before if ipv6 examples/tests were - turned on, localhost only was used. Now link-local (with scope ids) and ipv6 - hosts can be used as well. -- Xcode v4.6 project for iOS v6.1 update -- settings.h is now checked in all *.c files for true one file setting detection -- Better alignment at SSL layer for hardware crypto alignment needs - * Note, SSL itself isn't friendly to alignment with 5 byte TLS headers and - 13 bytes DTLS headers, but every effort is now made to align with the - CYASSL_GENERAL_ALIGNMENT flag which sets desired alignment requirement -- NO_64BIT flag to turn off 64bit data type accumulators in public key code - * Note, some systems are faster with 32bit accumulators -- --enable-stacksize for example client/server stack use - * Note, modern desktop Operating Systems may add bytes to each stack frame -- Updated compression/decompression with direct crypto access -- All ./configure options are now lowercase only for consistency -- ./configure builds default to fastmath option - * Note, if on ia32 and building in shared mode this may produce a problem - with a missing register being available because of PIC, there are at least - 5 solutions to this: - 1) --disable-fastmath , don't use fastmath - 2) --disable-shared, don't build a shared library - 3) C_EXTRA_FLAGS=-DTFM_NO_ASM , turn off assembly use - 4) use clang, it just seems to work - 5) play around with no PIC options to force all registers being open -- Many new ./configure switches for option enable/disable for example - * rsa - * dh - * dsa - * md5 - * sha - * arc4 - * null (allow NULL ciphers) - * oldtls (only use TLS 1.2) - * asn (no certs or public keys allowed) -- ./configure generates cyassl/options.h which allows a header the user can - include in their app to make sure the same options are set at the app and - CyaSSL level. -- autoconf no longer needs serial-tests which lowers version requirements of - automake to 1.11 and autoconf to 2.63 - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -************** CyaSSL Release 2.5.0 (02/04/2013) - -Release 2.5.0 CyaSSL has bug fixes and new features including: -- Fix for TLS CBC padding timing attack identified by Nadhem Alfardan and - Kenny Paterson: http://www.isg.rhul.ac.uk/tls/ -- Microchip PIC32 (MIPS16, MIPS32) support -- Microchip MPLAB X example projects for PIC32 Ethernet Starter Kit -- Updated CTaoCrypt benchmark app for embedded systems -- 1024-bit test certs/keys and cert/key buffers -- AES-CCM-8 crypto and cipher suites -- Camellia crypto and cipher suites -- Bumped minimum autoconf version to 2.65, automake version to 1.12 -- Addition of OCSP callbacks -- STM32F2 support with hardware crypto and RNG -- Cavium NITROX support - -CTaoCrypt now has support for the Microchip PIC32 and has been tested with -the Microchip PIC32 Ethernet Starter Kit, the XC32 compiler and -MPLAB X IDE in both MIPS16 and MIPS32 instruction set modes. See the README -located under the /mplabx directory for more details. - -To add Cavium NITROX support do: - -./configure --with-cavium=/home/user/cavium/software - -pointing to your licensed cavium/software directory. Since Cavium doesn't -build a library we pull in the cavium_common.o file which gives a libtool -warning about the portability of this. Also, if you're using the github source -tree you'll need to remove the -Wredundant-decls warning from the generated -Makefile because the cavium headers don't conform to this warning. Currently -CyaSSL supports Cavium RNG, AES, 3DES, RC4, HMAC, and RSA directly at the crypto -layer. Support at the SSL level is partial and currently just does AES, 3DES, -and RC4. RSA and HMAC are slower until the Cavium calls can be utilized in non -blocking mode. The example client turns on cavium support as does the crypto -test and benchmark. Please see the HAVE_CAVIUM define. - -CyaSSL is able to use the STM32F2 hardware-based cryptography and random number -generator through the STM32F2 Standard Peripheral Library. For necessary -defines, see the CYASSL_STM32F2 define in settings.h. Documentation for the -STM32F2 Standard Peripheral Library can be found in the following document: -http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00023896.pdf - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -*************** CyaSSL Release 2.4.6 (12/20/2012) - -Release 2.4.6 CyaSSL has bug fixes and a few new features including: -- ECC into main version -- Lean PSK build (reduced code size, RAM usage, and stack usage) -- FreeBSD CRL monitor support -- CyaSSL_peek() -- CyaSSL_send() and CyaSSL_recv() for I/O flag setting -- CodeWarrior Support -- MQX Support -- Freescale Kinetis support including Hardware RNG -- autoconf builds use jobserver -- cyassl-config -- Sniffer memory reductions - -Thanks to Brian Aker for the improved autoconf system, make rpm, cyassl-config, -warning system, and general good ideas for improving CyaSSL! - -The Freescale Kinetis K70 RNGA documentation can be found in Chapter 37 of the -K70 Sub-Family Reference Manual: -http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K70P256M150SF3RM.pdf - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - -*************** CyaSSL Release 2.4.0 (10/10/2012) - -Release 2.4.0 CyaSSL has bug fixes and a few new features including: -- DTLS reliability -- Reduced memory usage after handshake -- Updated build process - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -*************** CyaSSL Release 2.3.0 (8/10/2012) - -Release 2.3.0 CyaSSL has bug fixes and a few new features including: -- AES-GCM crypto and cipher suites -- make test cipher suite checks -- Subject AltName processing -- Command line support for client/server examples -- Sniffer SessionTicket support -- SHA-384 cipher suites -- Verify cipher suite validity when user overrides -- CRL dir monitoring -- DTLS Cookie support, reliability coming soon - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -***************CyaSSL Release 2.2.0 (5/18/2012) - -Release 2.2.0 CyaSSL has bug fixes and a few new features including: -- Initial CRL support (--enable-crl) -- Initial OCSP support (--enable-ocsp) -- Add static ECDH suites -- SHA-384 support -- ECC client certificate support -- Add medium session cache size (1055 sessions) -- Updated unit tests -- Protection against mutex reinitialization - - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -***************CyaSSL Release 2.0.8 (2/24/2012) - -Release 2.0.8 CyaSSL has bug fixes and a few new features including: -- A fix for malicious certificates pointed out by Remi Gacogne (thanks) - resulting in NULL pointer use. -- Respond to renegotiation attempt with no_renegoatation alert -- Add basic path support for load_verify_locations() -- Add set Temp EC-DHE key size -- Extra checks on rsa test when porting into - - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -************* CyaSSL Release 2.0.6 (1/27/2012) - -Release 2.0.6 CyaSSL has bug fixes and a few new features including: -- Fixes for CA basis constraint check -- CTX reference counting -- Initial unit test additions -- Lean and Mean Windows fix -- ECC benchmarking -- SSMTP build support -- Ability to group handshake messages with set_group_messages(ctx/ssl) -- CA cache addition callback -- Export Base64_Encode for general use - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -************* CyaSSL Release 2.0.2 (12/05/2011) - -Release 2.0.2 CyaSSL has bug fixes and a few new features including: -- CTaoCrypt Runtime library detection settings when directly using the crypto - library -- Default certificate generation now uses SHAwRSA and adds SHA256wRSA generation -- All test certificates now use 2048bit and SHA-1 for better modern browser - support -- Direct AES block access and AES-CTR (counter) mode -- Microchip pic32 support - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - - - -************* CyaSSL Release 2.0.0rc3 (9/28/2011) - -Release 2.0.0rc3 for CyaSSL has bug fixes and a few new features including: -- updated autoconf support -- better make install and uninstall (uses system directories) -- make test / make check -- CyaSSL headers now in -- CTaocrypt headers now in -- OpenSSL compatibility headers now in -- examples and tests all run from home directory so can use certs in ./certs - (see note 1) - -So previous applications that used the OpenSSL compatibility header - now need to include instead, no other -changes are required. - -Special Thanks to Brian Aker for his autoconf, install, and header patches. - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - -************CyaSSL Release 2.0.0rc2 (6/6/2011) - -Release 2.0.0rc2 for CyaSSL has bug fixes and a few new features including: -- bug fixes (Alerts, DTLS with DHE) -- FreeRTOS support -- lwIP support -- Wshadow warnings removed -- asn public header -- CTaoCrypt public headers now all have ctc_ prefix (the manual is still being - updated to reflect this change) -- and more. - -This is the 2nd and perhaps final release candidate for version 2. -Please send any comments or questions to support@yassl.com. - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - -***********CyaSSL Release 2.0.0rc1 (5/2/2011) - -Release 2.0.0rc1 for CyaSSL has many new features including: -- bug fixes -- SHA-256 cipher suites -- Root Certificate Verification (instead of needing all certs in the chain) -- PKCS #8 private key encryption (supports PKCS #5 v1-v2 and PKCS #12) -- Serial number retrieval for x509 -- PBKDF2 and PKCS #12 PBKDF -- UID parsing for x509 -- SHA-256 certificate signatures -- Client and server can send chains (SSL_CTX_use_certificate_chain_file) -- CA loading can now parse multiple certificates per file -- Dynamic memory runtime hooks -- Runtime hooks for logging -- EDH on server side -- More informative error codes -- More informative logging messages -- Version downgrade more robust (use SSL_v23*) -- Shared build only by default through ./configure -- Compiler visibility is now used, internal functions not polluting namespace -- Single Makefile, no recursion, for faster and simpler building -- Turn on all warnings possible build option, warning fixes -- and more. - -Because of all the new features and the multiple OS, compiler, feature-set -options that CyaSSL allows, there may be some configuration fixes needed. -Please send any comments or questions to support@yassl.com. - -The CyaSSL manual is available at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions -and comments about the new features please check the manual. - -****************** CyaSSL Release 1.9.0 (3/2/2011) - -Release 1.9.0 for CyaSSL adds bug fixes, improved TLSv1.2 through testing and -better hash/sig algo ids, --enable-webServer for the yaSSL embedded web server, -improper AES key setup detection, user cert verify callback improvements, and -more. - -The CyaSSL manual offering is included in the doc/ directory. For build -instructions and comments about the new features please check the manual. - -Please send any comments or questions to support@yassl.com. - -****************** CyaSSL Release 1.8.0 (12/23/2010) - -Release 1.8.0 for CyaSSL adds bug fixes, x509 v3 CA signed certificate -generation, a C standard library abstraction layer, lower memory use, increased -portability through the os_settings.h file, and the ability to use NTRU cipher -suites when used in conjunction with an NTRU license and library. - -The initial CyaSSL manual offering is included in the doc/ directory. For -build instructions and comments about the new features please check the manual. - -Please send any comments or questions to support@yassl.com. - -Happy Holidays. - - -********************* CyaSSL Release 1.6.5 (9/9/2010) - -Release 1.6.5 for CyaSSL adds bug fixes and x509 v3 self signed certificate -generation. - -For general build instructions see doc/Building_CyaSSL.pdf. - -To enable certificate generation support add this option to ./configure -./configure --enable-certgen - -An example is included in ctaocrypt/test/test.c and documentation is provided -in doc/CyaSSL_Extensions_Reference.pdf item 11. - -********************** CyaSSL Release 1.6.0 (8/27/2010) - -Release 1.6.0 for CyaSSL adds bug fixes, RIPEMD-160, SHA-512, and RSA key -generation. - -For general build instructions see doc/Building_CyaSSL.pdf. - -To add RIPEMD-160 support add this option to ./configure -./configure --enable-ripemd - -To add SHA-512 support add this option to ./configure -./configure --enable-sha512 - -To add RSA key generation support add this option to ./configure -./configure --enable-keygen - -Please see ctaocrypt/test/test.c for examples and usage. - -For Windows, RIPEMD-160 and SHA-512 are enabled by default but key generation is -off by default. To turn key generation on add the define CYASSL_KEY_GEN to -CyaSSL. - - -************* CyaSSL Release 1.5.6 (7/28/2010) - -Release 1.5.6 for CyaSSL adds bug fixes, compatibility for our JSSE provider, -and a fix for GCC builds on some systems. - -For general build instructions see doc/Building_CyaSSL.pdf. - -To add AES-NI support add this option to ./configure -./configure --enable-aesni - -You'll need GCC 4.4.3 or later to make use of the assembly. - -************** CyaSSL Release 1.5.4 (7/7/2010) - -Release 1.5.4 for CyaSSL adds bug fixes, support for AES-NI, SHA1 speed -improvements from loop unrolling, and support for the Mongoose Web Server. - -For general build instructions see doc/Building_CyaSSL.pdf. - -To add AES-NI support add this option to ./configure -./configure --enable-aesni - -You'll need GCC 4.4.3 or later to make use of the assembly. - -*************** CyaSSL Release 1.5.0 (5/11/2010) - -Release 1.5.0 for CyaSSL adds bug fixes, GoAhead WebServer support, sniffer -support, and initial swig interface support. - -For general build instructions see doc/Building_CyaSSL.pdf. - -To add support for GoAhead WebServer either --enable-opensslExtra or if you -don't want all the features of opensslExtra you can just define GOAHEAD_WS -instead. GOAHEAD_WS can be added to ./configure with CFLAGS=-DGOAHEAD_WS or -you can define it yourself. - -To look at the sniffer support please see the sniffertest app in -sslSniffer/sslSnifferTest. Build with --enable-sniffer on *nix or use the -vcproj files on windows. You'll need to have pcap installed on *nix and -WinPcap on windows. - -A swig interface file is now located in the swig directory for using Python, -Java, Perl, and others with CyaSSL. This is initial support and experimental, -please send questions or comments to support@yassl.com. - -When doing load testing with CyaSSL, on the echoserver example say, the client -machine may run out of tcp ephemeral ports, they will end up in the TIME_WAIT -queue, and can't be reused by default. There are generally two ways to fix -this. 1) Reduce the length sockets remain on the TIME_WAIT queue or 2) Allow -items on the TIME_WAIT queue to be reused. - - -To reduce the TIME_WAIT length in OS X to 3 seconds (3000 milliseconds) - -sudo sysctl -w net.inet.tcp.msl=3000 - -In Linux - -sudo sysctl -w net.ipv4.tcp_tw_reuse=1 - -allows reuse of sockets in TIME_WAIT - -sudo sysctl -w net.ipv4.tcp_tw_recycle=1 - -works but seems to remove sockets from TIME_WAIT entirely? - -sudo sysctl -w net.ipv4.tcp_fin_timeout=1 - -doen't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts - - -******************** CyaSSL Release 1.4.0 (2/18/2010) - -Release 1.3.0 for CyaSSL adds bug fixes, better multi TLS/SSL version support -through SSLv23_server_method(), and improved documentation in the doc/ folder. - -For general build instructions doc/Building_CyaSSL.pdf. - -******************** CyaSSL Release 1.3.0 (1/21/2010) - -Release 1.3.0 for CyaSSL adds bug fixes, a potential security problem fix, -better porting support, removal of assert()s, and a complete THREADX port. - -For general build instructions see rc1 below. - -******************** CyaSSL Release 1.2.0 (11/2/2009) - -Release 1.2.0 for CyaSSL adds bug fixes and session negotiation if first use is -read or write. - -For general build instructions see rc1 below. - -******************** CyaSSL Release 1.1.0 (9/2/2009) - -Release 1.1.0 for CyaSSL adds bug fixes, a check against malicious session -cache use, support for lighttpd, and TLS 1.2. - -To get TLS 1.2 support please use the client and server functions: - -SSL_METHOD *TLSv1_2_server_method(void); -SSL_METHOD *TLSv1_2_client_method(void); - -CyaSSL was tested against lighttpd 1.4.23. To build CyaSSL for use with -lighttpd use the following commands from the CyaSSL install dir : - -./configure --disable-shared --enable-opensslExtra --enable-fastmath --without-zlib - -make -make openssl-links - -Then to build lighttpd with CyaSSL use the following commands from the -lighttpd install dir: - -./configure --with-openssl --with-openssl-includes=/include --with-openssl-libs=/lib LDFLAGS=-lm - -make - -On some systems you may get a linker error about a duplicate symbol for -MD5_Init or other MD5 calls. This seems to be caused by the lighttpd src file -md5.c, which defines MD5_Init(), and is included in liblightcomp_la-md5.o. -When liblightcomp is linked with the SSL_LIBs the linker may complain about -the duplicate symbol. This can be fixed by editing the lighttpd src file md5.c -and adding this line to the beginning of the file: - -#if 0 - -and this line to the end of the file - -#endif - -Then from the lighttpd src dir do a: - -make clean -make - - -If you get link errors about undefined symbols more than likely the actual -OpenSSL libraries are found by the linker before the CyaSSL openssl-links that -point to the CyaSSL library, causing the linker confusion. This can be fixed -by editing the Makefile in the lighttpd src directory and changing the line: - -SSL_LIB = -lssl -lcrypto - -to - -SSL_LIB = -lcyassl - -Then from the lighttpd src dir do a: - -make clean -make - -This should remove any confusion the linker may be having with missing symbols. - -For any questions or concerns please contact support@yassl.com . - -For general build instructions see rc1 below. - -******************CyaSSL Release 1.0.6 (8/03/2009) - -Release 1.0.6 for CyaSSL adds bug fixes, an improved session cache, and faster -math with a huge code option. - -The session cache now defaults to a client mode, also good for embedded servers. -For servers not under heavy load (less than 200 new sessions per minute), define -BIG_SESSION_CACHE. If the server will be under heavy load, define -HUGE_SESSION_CACHE. - -There is now a fasthugemath option for configure. This enables fastmath plus -even faster math by greatly increasing the code size of the math library. Use -the benchmark utility to compare public key operations. - - -For general build instructions see rc1 below. - -******************CyaSSL Release 1.0.3 (5/10/2009) - -Release 1.0.3 for CyaSSL adds bug fixes and add increased support for OpenSSL -compatibility when building other applications. - -Release 1.0.3 includes an alpha release of DTLS for both client and servers. -This is only for testing purposes at this time. Rebroadcast and reordering -aren't fully implemented at this time but will be for the next release. - -For general build instructions see rc1 below. - -******************CyaSSL Release 1.0.2 (4/3/2009) - -Release 1.0.2 for CyaSSL adds bug fixes for a couple I/O issues. Some systems -will send a SIGPIPE on socket recv() at any time and this should be handled by -the application by turning off SIGPIPE through setsockopt() or returning from -the handler. - -Release 1.0.2 includes an alpha release of DTLS for both client and servers. -This is only for testing purposes at this time. Rebroadcast and reordering -aren't fully implemented at this time but will be for the next release. - -For general build instructions see rc1 below. - -*****************CyaSSL Release Candidiate 3 rc3-1.0.0 (2/25/2009) - - -Release Candidate 3 for CyaSSL 1.0.0 adds bug fixes and adds a project file for -iPhone development with Xcode. cyassl-iphone.xcodeproj is located in the root -directory. This release also includes a fix for supporting other -implementations that bundle multiple messages at the record layer, this was -lost when cyassl i/o was re-implemented but is now fixed. - -For general build instructions see rc1 below. - -*****************CyaSSL Release Candidiate 2 rc2-1.0.0 (1/21/2009) - - -Release Candidate 2 for CyaSSL 1.0.0 adds bug fixes and adds two new stream -ciphers along with their respective cipher suites. CyaSSL adds support for -HC-128 and RABBIT stream ciphers. The new suites are: - -TLS_RSA_WITH_HC_128_SHA -TLS_RSA_WITH_RABBIT_SHA - -And the corresponding cipher names are - -HC128-SHA -RABBIT-SHA - -CyaSSL also adds support for building with devkitPro for PPC by changing the -library proper to use libogc. The examples haven't been changed yet but if -there's interest they can be. Here's an example ./configure to build CyaSSL -for devkitPro: - -./configure --disable-shared CC=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-gcc --host=ppc --without-zlib --enable-singleThreaded RANLIB=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-ranlib CFLAGS="-DDEVKITPRO -DGEKKO" - -For linking purposes you'll need - -LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map" - -For general build instructions see rc1 below. - - -********************CyaSSL Release Candidiate 1 rc1-1.0.0 (12/17/2008) - - -Release Candidate 1 for CyaSSL 1.0.0 contains major internal changes. Several -areas have optimization improvements, less dynamic memory use, and the I/O -strategy has been refactored to allow alternate I/O handling or Library use. -Many thanks to Thierry Fournier for providing these ideas and most of the work. - -Because of these changes, this release is only a candidate since some problems -are probably inevitable on some platform with some I/O use. Please report any -problems and we'll try to resolve them as soon as possible. You can contact us -at support@yassl.com or todd@yassl.com. - -Using TomsFastMath by passing --enable-fastmath to ./configure now uses assembly -on some platforms. This is new so please report any problems as every compiler, -mode, OS combination hasn't been tested. On ia32 all of the registers need to -be available so be sure to pass these options to CFLAGS: - -CFLAGS="-O3 -fomit-frame-pointer" - -OS X will also need -mdynamic-no-pic added to CFLAGS - -Also if you're building in shared mode for ia32 you'll need to pass options to -LDFLAGS as well on OS X: - -LDFLAGS=-Wl,-read_only_relocs,warning - -This gives warnings for some symbols but seems to work. - - ---To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin: - - ./configure - make - - from the ./testsuite/ directory run ./testsuite - -to make a debug build: - - ./configure --enable-debug --disable-shared - make - - - ---To build on Win32 - -Choose (Re)Build All from the project workspace - -Run the testsuite program - - - - - -*************************CyaSSL version 0.9.9 (7/25/2008) - -This release of CyaSSL adds bug fixes, Pre-Shared Keys, over-rideable memory -handling, and optionally TomsFastMath. Thanks to Moisés Guimarães for the -work on TomsFastMath. - -To optionally use TomsFastMath pass --enable-fastmath to ./configure -Or define USE_FAST_MATH in each project from CyaSSL for MSVC. - -Please use the benchmark routine before and after to see the performance -difference, on some platforms the gains will be little but RSA encryption -always seems to be faster. On x86-64 machines with GCC the normal math library -may outperform the fast one when using CFLAGS=-m64 because TomsFastMath can't -yet use -m64 because of GCCs inability to do 128bit division. - - **** UPDATE GCC 4.2.1 can now do 128bit division *** - -See notes below (0.2.0) for complete build instructions. - - -****************CyaSSL version 0.9.8 (5/7/2008) - -This release of CyaSSL adds bug fixes, client side Diffie-Hellman, and better -socket handling. - -See notes below (0.2.0) for complete build instructions. - - -****************CyaSSL version 0.9.6 (1/31/2008) - -This release of CyaSSL adds bug fixes, increased session management, and a fix -for gnutls. - -See notes below (0.2.0) for complete build instructions. - - -****************CyaSSL version 0.9.0 (10/15/2007) - -This release of CyaSSL adds bug fixes, MSVC 2005 support, GCC 4.2 support, -IPV6 support and test, and new test certificates. - -See notes below (0.2.0) for complete build instructions. - - -****************CyaSSL version 0.8.0 (1/10/2007) - -This release of CyaSSL adds increased socket support, for non-blocking writes, -connects, and interrupted system calls. - -See notes below (0.2.0) for complete build instructions. - - -****************CyaSSL version 0.6.3 (10/30/2006) - -This release of CyaSSL adds debug logging to stderr to aid in the debugging of -CyaSSL on systems that may not provide the best support. - -If CyaSSL is built with debugging support then you need to call -CyaSSL_Debugging_ON() to turn logging on. - -On Unix use ./configure --enable-debug - -On Windows define DEBUG_CYASSL when building CyaSSL - - -To turn logging back off call CyaSSL_Debugging_OFF() - -See notes below (0.2.0) for complete build instructions. - - -*****************CyaSSL version 0.6.2 (10/29/2006) - -This release of CyaSSL adds TLS 1.1. - -Note that CyaSSL has certificate verification on by default, unlike OpenSSL. -To emulate OpenSSL behavior, you must call SSL_CTX_set_verify() with -SSL_VERIFY_NONE. In order to have full security you should never do this, -provide CyaSSL with the proper certificates to eliminate impostors and call -CyaSSL_check_domain_name() to prevent man in the middle attacks. - -See notes below (0.2.0) for build instructions. - -*****************CyaSSL version 0.6.0 (10/25/2006) - -This release of CyaSSL adds more SSL functions, better autoconf, nonblocking -I/O for accept, connect, and read. There is now an --enable-small configure -option that turns off TLS, AES, DES3, HMAC, and ERROR_STRINGS, see configure.in -for the defines. Note that TLS requires HMAC and AES requires TLS. - -See notes below (0.2.0) for build instructions. - - -*****************CyaSSL version 0.5.5 (09/27/2006) - -This mini release of CyaSSL adds better input processing through buffered input -and big message support. Added SSL_pending() and some sanity checks on user -settings. - -See notes below (0.2.0) for build instructions. - - -*****************CyaSSL version 0.5.0 (03/27/2006) - -This release of CyaSSL adds AES support and minor bug fixes. - -See notes below (0.2.0) for build instructions. - - -*****************CyaSSL version 0.4.0 (03/15/2006) - -This release of CyaSSL adds TLSv1 client/server support and libtool. - -See notes below for build instructions. - - -*****************CyaSSL version 0.3.0 (02/26/2006) - -This release of CyaSSL adds SSLv3 server support and session resumption. - -See notes below for build instructions. - - -*****************CyaSSL version 0.2.0 (02/19/2006) - - -This is the first release of CyaSSL and its crypt brother, CTaoCrypt. CyaSSL -is written in ANSI C with the idea of a small code size, footprint, and memory -usage in mind. CTaoCrypt can be as small as 32K, and the current client -version of CyaSSL can be as small as 12K. - - -The first release of CTaoCrypt supports MD5, SHA-1, 3DES, ARC4, Big Integer -Support, RSA, ASN parsing, and basic x509 (en/de)coding. - -The first release of CyaSSL supports normal client RSA mode SSLv3 connections -with support for SHA-1 and MD5 digests. Ciphers include 3DES and RC4. - - ---To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin: - - ./configure - make - - from the ./testsuite/ directory run ./testsuite - -to make a debug build: - - ./configure --enable-debug --disable-shared - make - - - ---To build on Win32 - -Choose (Re)Build All from the project workspace - -Run the testsuite program - - - -*** The next release of CyaSSL will support a server and more OpenSSL -compatibility functions. - - -Please send questions or comments to todd@yassl.com - diff --git a/project1/cyassl-3.0.0/aclocal.m4 b/project1/cyassl-3.0.0/aclocal.m4 deleted file mode 100644 index 64fd2c65..00000000 --- a/project1/cyassl-3.0.0/aclocal.m4 +++ /dev/null @@ -1,1195 +0,0 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- - -# Copyright (C) 1996-2013 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# Copyright (C) 2002-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# Figure out how to run the assembler. -*- Autoconf -*- - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_AS -# ---------- -AC_DEFUN([AM_PROG_AS], -[# By default we simply use the C compiler to build assembly code. -AC_REQUIRE([AC_PROG_CC]) -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS -AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) -AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) -_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl -]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ax_add_am_macro.m4]) -m4_include([m4/ax_am_jobserver.m4]) -m4_include([m4/ax_am_macros.m4]) -m4_include([m4/ax_append_compile_flags.m4]) -m4_include([m4/ax_append_flag.m4]) -m4_include([m4/ax_append_to_file.m4]) -m4_include([m4/ax_check_compile_flag.m4]) -m4_include([m4/ax_check_link_flag.m4]) -m4_include([m4/ax_count_cpus.m4]) -m4_include([m4/ax_create_generic_config.m4]) -m4_include([m4/ax_debug.m4]) -m4_include([m4/ax_file_escapes.m4]) -m4_include([m4/ax_harden_compiler_flags.m4]) -m4_include([m4/ax_print_to_file.m4]) -m4_include([m4/ax_pthread.m4]) -m4_include([m4/ax_tls.m4]) -m4_include([m4/ax_vcs_checkout.m4]) -m4_include([m4/hexversion.m4]) -m4_include([m4/lib_socket_nsl.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) -m4_include([m4/visibility.m4]) -m4_include([m4/wolfssl_darwin_clang.m4]) diff --git a/project1/cyassl-3.0.0/aminclude.am b/project1/cyassl-3.0.0/aminclude.am deleted file mode 100644 index f0d56bb7..00000000 --- a/project1/cyassl-3.0.0/aminclude.am +++ /dev/null @@ -1,5 +0,0 @@ - -# generated automatically by configure from AX_AUTOMAKE_MACROS -# on Tue May 20 10:37:37 MDT 2014 - -AM_MAKEFLAGS += -j5 diff --git a/project1/cyassl-3.0.0/autom4te.cache/output.0 b/project1/cyassl-3.0.0/autom4te.cache/output.0 deleted file mode 100644 index 624e3a5f..00000000 --- a/project1/cyassl-3.0.0/autom4te.cache/output.0 +++ /dev/null @@ -1,27349 +0,0 @@ -@%:@! /bin/sh -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for cyassl 3.0.0. -@%:@ -@%:@ Report bugs to . -@%:@ -@%:@ -@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in @%:@( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://github.com/cyassl/cyassl/issues about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cyassl' -PACKAGE_TARNAME='cyassl' -PACKAGE_VERSION='3.0.0' -PACKAGE_STRING='cyassl 3.0.0' -PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' -PACKAGE_URL='http://www.wolfssl.com' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIB@&t@OBJS -INC_AMINCLUDE -AMINCLUDE -GENERIC_CONFIG -AM_LDFLAGS -AM_CFLAGS -AM_CPPFLAGS -HEX_VERSION -IS_VCS_CHECKOUT_FALSE -IS_VCS_CHECKOUT_TRUE -BUILD_MCAPI_FALSE -BUILD_MCAPI_TRUE -BUILD_LIBZ_FALSE -BUILD_LIBZ_TRUE -BUILD_EXAMPLES_FALSE -BUILD_EXAMPLES_TRUE -BUILD_SLOWMATH_FALSE -BUILD_SLOWMATH_TRUE -BUILD_FASTMATH_FALSE -BUILD_FASTMATH_TRUE -USE_VALGRIND_FALSE -USE_VALGRIND_TRUE -HAVE_VALGRIND -BUILD_PKCS7_FALSE -BUILD_PKCS7_TRUE -BUILD_NTRU_FALSE -BUILD_NTRU_TRUE -BUILD_CRL_MONITOR_FALSE -BUILD_CRL_MONITOR_TRUE -BUILD_CRL_FALSE -BUILD_CRL_TRUE -HAVE_OPENSSL_CMD -BUILD_OCSP_FALSE -BUILD_OCSP_TRUE -BUILD_INLINE_FALSE -BUILD_INLINE_TRUE -BUILD_FIPS_FALSE -BUILD_FIPS_TRUE -BUILD_RABBIT_FALSE -BUILD_RABBIT_TRUE -BUILD_HC128_FALSE -BUILD_HC128_TRUE -BUILD_PWDBASED_FALSE -BUILD_PWDBASED_TRUE -BUILD_MD4_FALSE -BUILD_MD4_TRUE -BUILD_SHA_FALSE -BUILD_SHA_TRUE -BUILD_MD5_FALSE -BUILD_MD5_TRUE -BUILD_RC4_FALSE -BUILD_RC4_TRUE -BUILD_DES3_FALSE -BUILD_DES3_TRUE -BUILD_CODING_FALSE -BUILD_CODING_TRUE -BUILD_AES_FALSE -BUILD_AES_TRUE -BUILD_ASN_FALSE -BUILD_ASN_TRUE -BUILD_DH_FALSE -BUILD_DH_TRUE -BUILD_RSA_FALSE -BUILD_RSA_TRUE -BUILD_MEMORY_FALSE -BUILD_MEMORY_TRUE -BUILD_ECC_FALSE -BUILD_ECC_TRUE -BUILD_DSA_FALSE -BUILD_DSA_TRUE -BUILD_SHA512_FALSE -BUILD_SHA512_TRUE -BUILD_BLAKE2_FALSE -BUILD_BLAKE2_TRUE -BUILD_RIPEMD_FALSE -BUILD_RIPEMD_TRUE -BUILD_MD2_FALSE -BUILD_MD2_TRUE -BUILD_CAMELLIA_FALSE -BUILD_CAMELLIA_TRUE -BUILD_AESNI_FALSE -BUILD_AESNI_TRUE -BUILD_AESCCM_FALSE -BUILD_AESCCM_TRUE -BUILD_AESGCM_FALSE -BUILD_AESGCM_TRUE -BUILD_SNIFFTEST_FALSE -BUILD_SNIFFTEST_TRUE -BUILD_SNIFFER_FALSE -BUILD_SNIFFER_TRUE -BUILD_LEANPSK_FALSE -BUILD_LEANPSK_TRUE -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -DEBUG_FALSE -DEBUG_TRUE -MCHECK -LIBM -am__fastdepCCAS_FALSE -am__fastdepCCAS_TRUE -CCASDEPMODE -CCASFLAGS -CCAS -HAVE_VISIBILITY -CFLAG_VISIBILITY -CXXCPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LIBTOOL -CYASSL_LIBRARY_VERSION -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_static -enable_shared -with_pic -enable_fast_install -enable_dependency_tracking -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_debug -enable_singlethreaded -enable_dtls -enable_opensslextra -enable_ipv6 -enable_fortress -enable_bump -enable_leanpsk -enable_bigcache -enable_hugecache -enable_smallcache -enable_savesession -enable_savecert -enable_atomicuser -enable_pkcallbacks -enable_sniffer -enable_aesgcm -enable_aesccm -enable_aesni -enable_camellia -enable_md2 -enable_nullcipher -enable_ripemd -enable_blake2 -enable_sha512 -enable_sessioncerts -enable_keygen -enable_certgen -enable_certreq -enable_sep -enable_hkdf -enable_dsa -enable_ecc -enable_fpecc -enable_eccencrypt -enable_psk -enable_errorstrings -enable_oldtls -enable_stacksize -enable_memory -enable_rsa -enable_dh -enable_asn -enable_aes -enable_coding -enable_des3 -enable_arc4 -enable_md5 -enable_sha -enable_md4 -enable_webserver -enable_pwdbased -enable_hc128 -enable_rabbit -enable_fips -enable_filesystem -enable_inline -enable_ocsp -enable_crl -enable_crl_monitor -enable_ntru -enable_sni -enable_maxfragment -enable_truncatedhmac -enable_renegotiation_indication -enable_supportedcurves -enable_tlsx -enable_pkcs7 -enable_scep -enable_smallstack -enable_valgrind -enable_testcert -enable_iopool -enable_certservice -enable_fastmath -enable_fasthugemath -enable_examples -with_libz -with_cavium -enable_mcapi -enable_jobserver -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -CCAS -CCASFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cyassl 3.0.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/cyassl@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cyassl 3.0.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=no@:>@ - --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ - --enable-fast-install@<:@=PKGS@:>@ - optimize for fast installation @<:@default=yes@:>@ - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-debug Add debug code/turns off optimizations (yes|no) - @<:@default=no@:>@ - --enable-singlethreaded Enable CyaSSL single threaded (default: disabled) - --enable-dtls Enable CyaSSL DTLS (default: disabled) - --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled) - --enable-ipv6 Enable testing of IPV6 (default: disabled) - --enable-fortress Enable SSL fortress build (default: disabled) - --enable-bump Enable SSL Bump build (default: disabled) - --enable-leanpsk Enable Lean PSK build (default: disabled) - --enable-bigcache Enable big session cache (default: disabled) - --enable-hugecache Enable huge session cache (default: disabled) - --enable-smallcache Enable small session cache (default: disabled) - --enable-savesession Enable persistent session cache (default: disabled) - --enable-savecert Enable persistent cert cache (default: disabled) - --enable-atomicuser Enable Atomic User Record Layer (default: disabled) - --enable-pkcallbacks Enable Public Key Callbacks (default: disabled) - --enable-sniffer Enable CyaSSL sniffer support (default: disabled) - --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled) - --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled) - --enable-aesni Enable CyaSSL AES-NI support (default: disabled) - --enable-camellia Enable CyaSSL Camellia support (default: disabled) - --enable-md2 Enable CyaSSL MD2 support (default: disabled) - --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled) - --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled) - --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled) - --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled) - --enable-sessioncerts Enable session cert storing (default: disabled) - --enable-keygen Enable key generation (default: disabled) - --enable-certgen Enable cert generation (default: disabled) - --enable-certreq Enable cert request generation (default: disabled) - --enable-sep Enable sep extensions (default: disabled) - --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled) - --enable-dsa Enable DSA (default: disabled) - --enable-ecc Enable ECC (default: disabled) - --enable-fpecc Enable Fixed Point cache ECC (default: disabled) - --enable-eccencrypt Enable ECC encrypt (default: disabled) - --enable-psk Enable PSK (default: disabled) - --enable-errorstrings Enable error strings table (default: enabled) - --enable-oldtls Enable old TLS versions < 1.2 (default: enabled) - --enable-stacksize Enable stack size info on examples (default: disabled) - --enable-memory Enable memory callbacks (default: enabled) - --enable-rsa Enable RSA (default: enabled) - --enable-dh Enable DH (default: enabled) - --enable-asn Enable ASN (default: enabled) - --enable-aes Enable AES (default: enabled) - --enable-coding Enable Coding base 16/64 (default: enabled) - --enable-des3 Enable DES3 (default: enabled) - --enable-arc4 Enable ARC4 (default: enabled) - --enable-md5 Enable MD5 (default: enabled) - --enable-sha Enable SHA (default: enabled) - --enable-md4 Enable MD4 (default: disabled) - --enable-webserver Enable Web Server (default: disabled) - --enable-pwdbased Enable PWDBASED (default: disabled) - --enable-hc128 Enable HC-128 (default: disabled) - --enable-rabbit Enable RABBIT (default: disabled) - --enable-fips Enable FIPS 140-2 (default: disabled) - --enable-filesystem Enable Filesystem support (default: enabled) - --enable-inline Enable inline functions (default: enabled) - --enable-ocsp Enable OCSP (default: disabled) - --enable-crl Enable CRL (default: disabled) - --enable-crl-monitor Enable CRL Monitor (default: disabled) - --enable-ntru Enable NTRU (default: disabled) - --enable-sni Enable SNI (default: disabled) - --enable-maxfragment Enable Maximum Fragment Length (default: disabled) - --enable-truncatedhmac Enable Truncated HMAC (default: disabled) - --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled) - --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled) - --enable-tlsx Enable all TLS Extensions (default: disabled) - --enable-pkcs7 Enable PKCS7 (default: disabled) - --enable-scep Enable wolfSCEP (default: disabled) - --enable-smallstack Enable Small Stack Usage (default: enabled) - --enable-valgrind Enable valgrind for unit tests (default: disabled) - --enable-testcert Enable Test Cert (default: disabled) - --enable-iopool Enable I/O Pool example (default: disabled) - --enable-certservice Enable cert service (default: disabled) - --enable-fastmath Enable fast math ops (default: enabled on x86_64) - --enable-fasthugemath Enable fast math + huge code (default: disabled) - --enable-examples Enable Examples (default: enabled) - --enable-mcapi Enable Microchip API (default: disabled) - --enable-jobserver@<:@=no/yes/@%:@@:>@ default=yes - Enable up to @%:@ make jobs - yes: enable one more than CPU count - - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic@<:@=PKGS@:>@ try to use only PIC/non-PIC objects @<:@default=use - both@:>@ - --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - --with-libz=PATH PATH to libz install (default /usr/) - --with-cavium=PATH PATH to cavium/software dir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - CCAS assembler compiler command (defaults to CC) - CCASFLAGS assembler compiler flags (defaults to CFLAGS) - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -cyassl home page: . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cyassl configure 3.0.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_compile - -@%:@ ac_fn_c_try_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_link - -@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists and can be compiled using the include files in -@%:@ INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_compile - -@%:@ ac_fn_c_try_cpp LINENO -@%:@ ---------------------- -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_cpp - -@%:@ ac_fn_c_try_run LINENO -@%:@ ---------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes -@%:@ that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_run - -@%:@ ac_fn_c_check_func LINENO FUNC VAR -@%:@ ---------------------------------- -@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_func - -@%:@ ac_fn_cxx_try_compile LINENO -@%:@ ---------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_compile - -@%:@ ac_fn_cxx_try_cpp LINENO -@%:@ ------------------------ -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_cpp - -@%:@ ac_fn_cxx_try_link LINENO -@%:@ ------------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_link - -@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using -@%:@ the include files in INCLUDES and setting the cache variable VAR -@%:@ accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------------ ## -## Report this to https://github.com/cyassl/cyassl/issues ## -## ------------------------------------------------------ ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_mongrel - -@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -@%:@ -------------------------------------------- -@%:@ Tries to find the compile-time value of EXPR in a program that includes -@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be -@%:@ computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in @%:@(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -@%:@include -@%:@include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_type - -@%:@ ac_fn_c_find_uintX_t LINENO BITS VAR -@%:@ ------------------------------------ -@%:@ Finds an unsigned integer type with width BITS, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_find_uintX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 -$as_echo_n "checking for uint$2_t... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - # Order is important - never check a type that is potentially smaller - # than half of the expected target width. - for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - case $ac_type in @%:@( - uint$2_t) : - eval "$3=yes" ;; @%:@( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_find_uintX_t -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cyassl $as_me 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in @%:@(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in build-aux "$srcdir"/build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - -am__api_version='1.14' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in @%:@(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cyassl' - VERSION='3.0.0' - - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' - -# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } - if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } - if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_ustar-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 - (cat conftest.dir/file) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - - - -#PROTECT_AC_USE_SYSTEM_EXTENSIONS - - - -ac_config_headers="$ac_config_headers config.h:config.in" - -#shared library versioning -CYASSL_LIBRARY_VERSION=5:5:0 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# | or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed - - -# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even -# if user doesn't override, no way to tell -USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -@%:@ Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -@%:@ Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -@%:@ Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -@%:@ Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no -fi - - - - - - - - - - - enable_dlopen=no - - - enable_win32_dll=no - - - @%:@ Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - - -@%:@ Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - @%:@ Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -@%:@define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - - -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf - - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 -$as_echo_n "checking whether the -Werror option is usable... " >&6; } - if ${gl_cv_cc_vis_werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_cc_vis_werror=yes -else - gl_cv_cc_vis_werror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 -$as_echo "$gl_cv_cc_vis_werror" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 -$as_echo_n "checking for simple visibility declarations... " >&6; } - if ${gl_cv_cc_visibility+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_cc_visibility=yes -else - gl_cv_cc_visibility=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 -$as_echo "$gl_cv_cc_visibility" >&6; } - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - - - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_VISIBILITY $HAVE_VISIBILITY -_ACEOF - - -if test -n "$CFLAG_VISIBILITY" ; then : - - AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" - CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" - -fi - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -for ac_func in gethostbyname -do : - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_GETHOSTBYNAME 1 -_ACEOF - -fi -done - -for ac_func in getaddrinfo -do : - ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_GETADDRINFO 1 -_ACEOF - -fi -done - -for ac_func in gettimeofday -do : - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_GETTIMEOFDAY 1 -_ACEOF - -fi -done - -for ac_func in inet_ntoa -do : - ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" -if test "x$ac_cv_func_inet_ntoa" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_INET_NTOA 1 -_ACEOF - -fi -done - -for ac_func in memset -do : - ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_MEMSET 1 -_ACEOF - -fi -done - -for ac_func in socket -do : - ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SOCKET 1 -_ACEOF - -fi -done - -for ac_header in arpa/inet.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_ARPA_INET_H 1 -_ACEOF - -fi - -done - -for ac_header in fcntl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" -if test "x$ac_cv_header_fcntl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_FCNTL_H 1 -_ACEOF - -fi - -done - -for ac_header in limits.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIMITS_H 1 -_ACEOF - -fi - -done - -for ac_header in netdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NETDB_H 1 -_ACEOF - -fi - -done - -for ac_header in netinet/in.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NETINET_IN_H 1 -_ACEOF - -fi - -done - -for ac_header in stddef.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_STDDEF_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/ioctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_IOCTL_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_TIME_H 1 -_ACEOF - -fi - -done - -for ac_header in errno.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_errno_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_ERRNO_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 -$as_echo_n "checking for socket in -lnetwork... " >&6; } -if ${ac_cv_lib_network_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnetwork $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_network_socket=yes -else - ac_cv_lib_network_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 -$as_echo "$ac_cv_lib_network_socket" >&6; } -if test "x$ac_cv_lib_network_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBNETWORK 1 -_ACEOF - - LIBS="-lnetwork $LIBS" - -fi - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - -# mktime check takes forever on some systems, if time supported it would be -# highly unusual for mktime to be missing -#AC_FUNC_MKTIME - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -@%:@define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "@%:@define _UINT8_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -@%:@define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - -# By default we simply use the C compiler to build assembly code. - -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS - - - -depcc="$CCAS" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CCAS_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CCAS_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CCAS_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } -CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then - am__fastdepCCAS_TRUE= - am__fastdepCCAS_FALSE='#' -else - am__fastdepCCAS_TRUE='#' - am__fastdepCCAS_FALSE= -fi - - - -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 -$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmw $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _mwvalidcheckl (); -int -main () -{ -return _mwvalidcheckl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mw__mwvalidcheckl=yes -else - ac_cv_lib_mw__mwvalidcheckl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 -$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : - LIBM="-lmw" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="$LIBM -lm" -fi - - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="-lm" -fi - - ;; -esac - - - -OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" -OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" -OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" -DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" - -thread_ls_on=no -# Thread local storage - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 -$as_echo_n "checking for thread local storage (TLS) class... " >&6; } - if ${ac_cv_tls+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_tls_keywords="__thread __declspec(thread) none" - for ax_tls_keyword in $ax_tls_keywords; do - case $ax_tls_keyword in @%:@( - none) : - ac_cv_tls=none ; break ;; @%:@( - *) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void - foo(void) { - static $ax_tls_keyword int bar; - exit(1); - } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_tls=$ax_tls_keyword ; break -else - ac_cv_tls=none - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; -esac - done - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 -$as_echo "$ac_cv_tls" >&6; } - - if test "$ac_cv_tls" != "none"; then : - -cat >>confdefs.h <<_ACEOF -@%:@define TLS $ac_cv_tls -_ACEOF - - - AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS" - thread_ls_on=yes - -else - : - -fi - - - -# DEBUG - @%:@ Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; ax_enable_debug=yes - -$as_echo "@%:@define DEBUG 1" >>confdefs.h - -else - ax_enable_debug=no - - -$as_echo "@%:@define DEBUG 0" >>confdefs.h - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5 -$as_echo_n "checking for debug... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5 -$as_echo "$ax_enable_debug" >&6; } - if test "x${ax_enable_debug}" = "xyes"; then - DEBUG_TRUE= - DEBUG_FALSE='#' -else - DEBUG_TRUE='#' - DEBUG_FALSE= -fi - -if test "$ax_enable_debug" = "yes"; then : - AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS" -else - AM_CFLAGS="$AM_CFLAGS -DNDEBUG" -fi - - -# SINGLE THREADED -@%:@ Check whether --enable-singlethreaded was given. -if test "${enable_singlethreaded+set}" = set; then : - enableval=$enable_singlethreaded; ENABLED_SINGLETHREADED=$enableval -else - ENABLED_SINGLETHREADED=no -fi - - - - if test x"$CC" = xclang; then - wolfssl_darwin_clang=yes - elif test x"$CC" = x || test x"$CC" = xgcc; then - if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then - wolfssl_darwin_clang=yes - fi - fi - -if test "x$ENABLED_SINGLETHREADED" = "xno" ; then : - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case ${host_os} in - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - darwin*) - - if test x"$wolfssl_darwin_clang" = x"yes"; then : - ax_pthread_flags="$ax_pthread_flags" -else - ax_pthread_flags="-pthread $ax_pthread_flags" -fi - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ax_pthread_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } -int -main () -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr = $attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -$as_echo "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -@%:@define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -$as_echo "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main () -{ -int i = PTHREAD_PRIO_INHERIT; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_PRIO_INHERIT=yes -else - ax_cv_PTHREAD_PRIO_INHERIT=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : - -$as_echo "@%:@define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h - -fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - case "x/$CC" in @%:@( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in @%:@( - x/*) : - if as_fn_executable_p ${CC}_r; then : - PTHREAD_CC="${CC}_r" -fi ;; @%:@( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; @%:@( - *) : - ;; -esac - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - - -$as_echo "@%:@define HAVE_PTHREAD 1" >>confdefs.h - - AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" - LIBS="$LIBS $PTHREAD_LIBS" - - : -else - ax_pthread_ok=no - - ENABLED_SINGLETHREADED=yes - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -fi - -if test "x$ENABLED_SINGLETHREADED" = "xyes" ; then : - AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" -fi - - -# DTLS -@%:@ Check whether --enable-dtls was given. -if test "${enable_dtls+set}" = set; then : - enableval=$enable_dtls; ENABLED_DTLS=$enableval -else - ENABLED_DTLS=no - -fi - -if test "$ENABLED_DTLS" = "yes" -then - AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" -fi - - -# OPENSSL Extra Compatibility -@%:@ Check whether --enable-opensslextra was given. -if test "${enable_opensslextra+set}" = set; then : - enableval=$enable_opensslextra; ENABLED_OPENSSLEXTRA=$enableval -else - ENABLED_OPENSSLEXTRA=no - -fi - -if test "$ENABLED_OPENSSLEXTRA" = "yes" -then - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" -fi - -if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable small and opensslextra, only one or the other." "$LINENO" 5 -fi - - -# IPv6 Test Apps -@%:@ Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : - enableval=$enable_ipv6; ENABLED_IPV6=$enableval -else - ENABLED_IPV6=no - -fi - - -if test "$ENABLED_IPV6" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" -fi - - -# Fortress build -@%:@ Check whether --enable-fortress was given. -if test "${enable_fortress+set}" = set; then : - enableval=$enable_fortress; ENABLED_FORTRESS=$enableval -else - ENABLED_FORTRESS=no - -fi - - -if test "$ENABLED_FORTRESS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" -fi - - -# ssl bump build -@%:@ Check whether --enable-bump was given. -if test "${enable_bump+set}" = set; then : - enableval=$enable_bump; ENABLED_BUMP=$enableval -else - ENABLED_BUMP=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" -fi - -ENABLED_SLOWMATH="yes" - -# lean psk build -@%:@ Check whether --enable-leanpsk was given. -if test "${enable_leanpsk+set}" = set; then : - enableval=$enable_leanpsk; ENABLED_LEANPSK=$enableval -else - ENABLED_LEANPSK=no - -fi - - -if test "$ENABLED_LEANPSK" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" - ENABLED_SLOWMATH="no" - ENABLED_SINGLETHREADED="yes" -fi - - if test "x$ENABLED_LEANPSK" = "xyes"; then - BUILD_LEANPSK_TRUE= - BUILD_LEANPSK_FALSE='#' -else - BUILD_LEANPSK_TRUE='#' - BUILD_LEANPSK_FALSE= -fi - - - -# big cache -@%:@ Check whether --enable-bigcache was given. -if test "${enable_bigcache+set}" = set; then : - enableval=$enable_bigcache; ENABLED_BIGCACHE=$enableval -else - ENABLED_BIGCACHE=no - -fi - - -if test "$ENABLED_BIGCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" -fi - - -# HUGE cache -@%:@ Check whether --enable-hugecache was given. -if test "${enable_hugecache+set}" = set; then : - enableval=$enable_hugecache; ENABLED_HUGECACHE=$enableval -else - ENABLED_HUGECACHE=no - -fi - - -if test "$ENABLED_HUGECACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" -fi - - -# SMALL cache -@%:@ Check whether --enable-smallcache was given. -if test "${enable_smallcache+set}" = set; then : - enableval=$enable_smallcache; ENABLED_SMALLCACHE=$enableval -else - ENABLED_SMALLCACHE=no - -fi - - -if test "$ENABLED_SMALLCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" -fi - - -# Persistent session cache -@%:@ Check whether --enable-savesession was given. -if test "${enable_savesession+set}" = set; then : - enableval=$enable_savesession; ENABLED_SAVESESSION=$enableval -else - ENABLED_SAVESESSION=no - -fi - - -if test "$ENABLED_SAVESESSION" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" -fi - - -# Persistent cert cache -@%:@ Check whether --enable-savecert was given. -if test "${enable_savecert+set}" = set; then : - enableval=$enable_savecert; ENABLED_SAVECERT=$enableval -else - ENABLED_SAVECERT=no - -fi - - -if test "$ENABLED_SAVECERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" -fi - - -# Atomic User Record Layer -@%:@ Check whether --enable-atomicuser was given. -if test "${enable_atomicuser+set}" = set; then : - enableval=$enable_atomicuser; ENABLED_ATOMICUSER=$enableval -else - ENABLED_ATOMICUSER=no - -fi - - -if test "$ENABLED_ATOMICUSER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" -fi - - -# Public Key Callbacks -@%:@ Check whether --enable-pkcallbacks was given. -if test "${enable_pkcallbacks+set}" = set; then : - enableval=$enable_pkcallbacks; ENABLED_PKCALLBACKS=$enableval -else - ENABLED_PKCALLBACKS=no - -fi - - -if test "$ENABLED_PKCALLBACKS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" -fi - - -# SNIFFER -ENABLED_SNIFFTEST=no -@%:@ Check whether --enable-sniffer was given. -if test "${enable_sniffer+set}" = set; then : - enableval=$enable_sniffer; - ENABLED_SNIFFER=yes - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" - if test "x$enableval" = "xyes" ; then : - for ac_header in pcap/pcap.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" -if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_PCAP_PCAP_H 1 -_ACEOF - - ENABLED_SNIFFTEST=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable sniffer test without having libpcap available." >&5 -$as_echo "$as_me: WARNING: cannot enable sniffer test without having libpcap available." >&2;} -fi - -done - -fi - -else - - ENABLED_SNIFFER=no - -fi - - - if test "x$ENABLED_SNIFFER" = "xyes" ; then - BUILD_SNIFFER_TRUE= - BUILD_SNIFFER_FALSE='#' -else - BUILD_SNIFFER_TRUE='#' - BUILD_SNIFFER_FALSE= -fi - - if test "x$ENABLED_SNIFFTEST" = "xyes" ; then - BUILD_SNIFFTEST_TRUE= - BUILD_SNIFFTEST_FALSE='#' -else - BUILD_SNIFFTEST_TRUE='#' - BUILD_SNIFFTEST_FALSE= -fi - - -# AES-GCM -@%:@ Check whether --enable-aesgcm was given. -if test "${enable_aesgcm+set}" = set; then : - enableval=$enable_aesgcm; ENABLED_AESGCM=$enableval -else - ENABLED_AESGCM=no - -fi - - -if test "$ENABLED_AESGCM" = "word32" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "small" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "table" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" -fi - - if test "x$ENABLED_AESGCM" = "xyes"; then - BUILD_AESGCM_TRUE= - BUILD_AESGCM_FALSE='#' -else - BUILD_AESGCM_TRUE='#' - BUILD_AESGCM_FALSE= -fi - - - -# AES-CCM -@%:@ Check whether --enable-aesccm was given. -if test "${enable_aesccm+set}" = set; then : - enableval=$enable_aesccm; ENABLED_AESCCM=$enableval -else - ENABLED_AESCCM=no - -fi - - -if test "$ENABLED_AESCCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" -fi - - if test "x$ENABLED_AESCCM" = "xyes"; then - BUILD_AESCCM_TRUE= - BUILD_AESCCM_FALSE='#' -else - BUILD_AESCCM_TRUE='#' - BUILD_AESCCM_FALSE= -fi - - - -# AES-NI -@%:@ Check whether --enable-aesni was given. -if test "${enable_aesni+set}" = set; then : - enableval=$enable_aesni; ENABLED_AESNI=$enableval -else - ENABLED_AESNI=no - -fi - - -if test "$ENABLED_AESNI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" - if test "$GCC" = "yes" - then - # GCC needs these flags, icc doesn't - # opt levels greater than 2 may cause problems on systems w/o aesni - AM_CFLAGS="$AM_CFLAGS -maes -msse4" - fi -fi - - if test "x$ENABLED_AESNI" = "xyes"; then - BUILD_AESNI_TRUE= - BUILD_AESNI_FALSE='#' -else - BUILD_AESNI_TRUE='#' - BUILD_AESNI_FALSE= -fi - - - -# Camellia -@%:@ Check whether --enable-camellia was given. -if test "${enable_camellia+set}" = set; then : - enableval=$enable_camellia; ENABLED_CAMELLIA=$enableval -else - ENABLED_CAMELLIA=no - -fi - - -if test "$ENABLED_CAMELLIA" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" -fi - - if test "x$ENABLED_CAMELLIA" = "xyes"; then - BUILD_CAMELLIA_TRUE= - BUILD_CAMELLIA_FALSE='#' -else - BUILD_CAMELLIA_TRUE='#' - BUILD_CAMELLIA_FALSE= -fi - - - -# MD2 -@%:@ Check whether --enable-md2 was given. -if test "${enable_md2+set}" = set; then : - enableval=$enable_md2; ENABLED_MD2=$enableval -else - ENABLED_MD2=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_MD2="yes" -fi - -if test "$ENABLED_MD2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" -fi - - if test "x$ENABLED_MD2" = "xyes"; then - BUILD_MD2_TRUE= - BUILD_MD2_FALSE='#' -else - BUILD_MD2_TRUE='#' - BUILD_MD2_FALSE= -fi - - - -# NULL CIPHER -@%:@ Check whether --enable-nullcipher was given. -if test "${enable_nullcipher+set}" = set; then : - enableval=$enable_nullcipher; ENABLED_NULL_CIPHER=$enableval -else - ENABLED_NULL_CIPHER=no - -fi - - -if test "$ENABLED_NULL_CIPHER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" -fi - -# RIPEMD -@%:@ Check whether --enable-ripemd was given. -if test "${enable_ripemd+set}" = set; then : - enableval=$enable_ripemd; ENABLED_RIPEMD=$enableval -else - ENABLED_RIPEMD=no - -fi - - -if test "$ENABLED_RIPEMD" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" -fi - - if test "x$ENABLED_RIPEMD" = "xyes"; then - BUILD_RIPEMD_TRUE= - BUILD_RIPEMD_FALSE='#' -else - BUILD_RIPEMD_TRUE='#' - BUILD_RIPEMD_FALSE= -fi - - - -# BLAKE2 -@%:@ Check whether --enable-blake2 was given. -if test "${enable_blake2+set}" = set; then : - enableval=$enable_blake2; ENABLED_BLAKE2=$enableval -else - ENABLED_BLAKE2=no - -fi - - -if test "$ENABLED_BLAKE2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" -fi - - if test "x$ENABLED_BLAKE2" = "xyes"; then - BUILD_BLAKE2_TRUE= - BUILD_BLAKE2_FALSE='#' -else - BUILD_BLAKE2_TRUE='#' - BUILD_BLAKE2_FALSE= -fi - - - -# SHA512 -@%:@ Check whether --enable-sha512 was given. -if test "${enable_sha512+set}" = set; then : - enableval=$enable_sha512; ENABLED_SHA512=$enableval -else - ENABLED_SHA512=no - -fi - - -if test "$ENABLED_SHA512" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" -fi - -if test "$ENABLED_FORTRESS" = "yes" -then - ENABLED_SHA512="yes" -fi - - - if test "x$ENABLED_SHA512" = "xyes"; then - BUILD_SHA512_TRUE= - BUILD_SHA512_FALSE='#' -else - BUILD_SHA512_TRUE='#' - BUILD_SHA512_FALSE= -fi - - - -# SESSION CERTS -@%:@ Check whether --enable-sessioncerts was given. -if test "${enable_sessioncerts+set}" = set; then : - enableval=$enable_sessioncerts; ENABLED_SESSIONCERTS=$enableval -else - ENABLED_SESSIONCERTS=no - -fi - - -if test "$ENABLED_SESSIONCERTS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" -fi - - -# KEY GENERATION -@%:@ Check whether --enable-keygen was given. -if test "${enable_keygen+set}" = set; then : - enableval=$enable_keygen; ENABLED_KEYGEN=$enableval -else - ENABLED_KEYGEN=no - -fi - - -if test "$ENABLED_KEYGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" -fi - - -# CERT GENERATION -@%:@ Check whether --enable-certgen was given. -if test "${enable_certgen+set}" = set; then : - enableval=$enable_certgen; ENABLED_CERTGEN=$enableval -else - ENABLED_CERTGEN=no - -fi - - -if test "$ENABLED_CERTGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" -fi - - -# CERT REQUEST GENERATION -@%:@ Check whether --enable-certreq was given. -if test "${enable_certreq+set}" = set; then : - enableval=$enable_certreq; ENABLED_CERTREQ=$enableval -else - ENABLED_CERTREQ=no - -fi - - -if test "$ENABLED_CERTREQ" = "yes" -then - if test "$ENABLED_CERTGEN" = "no" - then - as_fn_error $? "cannot enable certreq without enabling certgen." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" -fi - - -# SEP -@%:@ Check whether --enable-sep was given. -if test "${enable_sep+set}" = set; then : - enableval=$enable_sep; ENABLED_SEP=$enableval -else - ENABLED_SEP=no - -fi - -if test "$ENABLED_SEP" = "yes" -then - AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" -fi - - -# HKDF -@%:@ Check whether --enable-hkdf was given. -if test "${enable_hkdf+set}" = set; then : - enableval=$enable_hkdf; ENABLED_HKDF=$enableval -else - ENABLED_HKDF=no - -fi - -if test "$ENABLED_HKDF" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" -fi - - -# DSA -@%:@ Check whether --enable-dsa was given. -if test "${enable_dsa+set}" = set; then : - enableval=$enable_dsa; ENABLED_DSA=$enableval -else - ENABLED_DSA=no - -fi - - -if test "$ENABLED_DSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DSA" -fi - - if test "x$ENABLED_DSA" = "xyes"; then - BUILD_DSA_TRUE= - BUILD_DSA_FALSE='#' -else - BUILD_DSA_TRUE='#' - BUILD_DSA_FALSE= -fi - - - -# ECC -@%:@ Check whether --enable-ecc was given. -if test "${enable_ecc+set}" = set; then : - enableval=$enable_ecc; ENABLED_ECC=$enableval -else - ENABLED_ECC=no - -fi - - -if test "$ENABLED_ECC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" -fi - - if test "x$ENABLED_ECC" = "xyes"; then - BUILD_ECC_TRUE= - BUILD_ECC_FALSE='#' -else - BUILD_ECC_TRUE='#' - BUILD_ECC_FALSE= -fi - - - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable ecc and small, ecc requires TLS which small turns off." "$LINENO" 5 -fi - - -# FP ECC, Fixed Point cache ECC -@%:@ Check whether --enable-fpecc was given. -if test "${enable_fpecc+set}" = set; then : - enableval=$enable_fpecc; ENABLED_FPECC=$enableval -else - ENABLED_FPECC=no - -fi - - -if test "$ENABLED_FPECC" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - as_fn_error $? "cannot enable fpecc without enabling ecc." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DFP_ECC" -fi - - -# ECC encrypt -@%:@ Check whether --enable-eccencrypt was given. -if test "${enable_eccencrypt+set}" = set; then : - enableval=$enable_eccencrypt; ENABLED_ECC_ENCRYPT=$enableval -else - ENABLED_ECC_ENCRYPT=no - -fi - - -if test "$ENABLED_ECC_ENCRYPT" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - as_fn_error $? "cannot enable eccencrypt without enabling ecc." "$LINENO" 5 - fi - if test "$ENABLED_HKDF" = "no" - then - as_fn_error $? "cannot enable eccencrypt without enabling hkdf." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" -fi - - -# PSK -@%:@ Check whether --enable-psk was given. -if test "${enable_psk+set}" = set; then : - enableval=$enable_psk; ENABLED_PSK=$enableval -else - ENABLED_PSK=no - -fi - - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_PSK" -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" -then - ENABLED_PSK=yes -fi - - -# ERROR STRINGS -@%:@ Check whether --enable-errorstrings was given. -if test "${enable_errorstrings+set}" = set; then : - enableval=$enable_errorstrings; ENABLED_ERROR_STRINGS=$enableval -else - ENABLED_ERROR_STRINGS=yes - -fi - - -if test "$ENABLED_ERROR_STRINGS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" -else - # turn off error strings if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" - ENABLED_ERROR_STRINGS=no - fi -fi - - -# OLD TLS -@%:@ Check whether --enable-oldtls was given. -if test "${enable_oldtls+set}" = set; then : - enableval=$enable_oldtls; ENABLED_OLD_TLS=$enableval -else - ENABLED_OLD_TLS=yes - -fi - - -if test "$ENABLED_OLD_TLS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" -else - # turn off old if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" - ENABLED_OLD_TLS=no - fi -fi - - -# STACK SIZE info for examples -@%:@ Check whether --enable-stacksize was given. -if test "${enable_stacksize+set}" = set; then : - enableval=$enable_stacksize; ENABLED_STACKSIZE=$enableval -else - ENABLED_STACKSIZE=no - -fi - - -if test "$ENABLED_STACKSIZE" = "yes" -then - ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" -if test "x$ac_cv_func_posix_memalign" = xyes; then : - -else - as_fn_error $? "stacksize needs posix_memalign" "$LINENO" 5 -fi - - ac_fn_c_check_func "$LINENO" "pthread_attr_setstack" "ac_cv_func_pthread_attr_setstack" -if test "x$ac_cv_func_pthread_attr_setstack" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstack in -lpthread" >&5 -$as_echo_n "checking for pthread_attr_setstack in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_attr_setstack+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_attr_setstack (); -int -main () -{ -return pthread_attr_setstack (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_attr_setstack=yes -else - ac_cv_lib_pthread_pthread_attr_setstack=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstack" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_attr_setstack" >&6; } -if test "x$ac_cv_lib_pthread_pthread_attr_setstack" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -fi - -fi - - AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" -fi - - -# MEMORY -@%:@ Check whether --enable-memory was given. -if test "${enable_memory+set}" = set; then : - enableval=$enable_memory; ENABLED_MEMORY=$enableval -else - ENABLED_MEMORY=yes - -fi - - -if test "$ENABLED_MEMORY" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" -else - # turn off memory cb if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - # but don't turn on NO_CYASSL_MEMORY because using own - ENABLED_MEMORY=no - fi -fi - - if test "x$ENABLED_MEMORY" = "xyes"; then - BUILD_MEMORY_TRUE= - BUILD_MEMORY_FALSE='#' -else - BUILD_MEMORY_TRUE='#' - BUILD_MEMORY_FALSE= -fi - - - -# RSA -@%:@ Check whether --enable-rsa was given. -if test "${enable_rsa+set}" = set; then : - enableval=$enable_rsa; ENABLED_RSA=$enableval -else - ENABLED_RSA=yes - -fi - - -if test "$ENABLED_RSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" -else - # turn off RSA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" - ENABLED_RSA=no - fi -fi - - if test "x$ENABLED_RSA" = "xyes"; then - BUILD_RSA_TRUE= - BUILD_RSA_FALSE='#' -else - BUILD_RSA_TRUE='#' - BUILD_RSA_FALSE= -fi - - - -# DH -@%:@ Check whether --enable-dh was given. -if test "${enable_dh+set}" = set; then : - enableval=$enable_dh; ENABLED_DH=$enableval -else - ENABLED_DH=yes - -fi - - -if test "$ENABLED_DH" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" -else - # turn off DH if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" - ENABLED_DH=no - fi -fi - - if test "x$ENABLED_DH" = "xyes"; then - BUILD_DH_TRUE= - BUILD_DH_FALSE='#' -else - BUILD_DH_TRUE='#' - BUILD_DH_FALSE= -fi - - - -# ASN -# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, -# and no big int, use this to disable all public key stuff -@%:@ Check whether --enable-asn was given. -if test "${enable_asn+set}" = set; then : - enableval=$enable_asn; ENABLED_ASN=$enableval -else - ENABLED_ASN=yes - -fi - - -if test "$ENABLED_ASN" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" -else - # turn off ASN if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" - ENABLED_ASN=no - fi -fi - -if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable rsa if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable dsa if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable dh if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable ecc if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please enable psk if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_ASN" = "no" -then - ENABLED_FASTMATH=no - ENABLED_SLOWMATH=no -fi - - if test "x$ENABLED_ASN" = "xyes"; then - BUILD_ASN_TRUE= - BUILD_ASN_FALSE='#' -else - BUILD_ASN_TRUE='#' - BUILD_ASN_FALSE= -fi - - - -# AES -@%:@ Check whether --enable-aes was given. -if test "${enable_aes+set}" = set; then : - enableval=$enable_aes; ENABLED_AES=$enableval -else - ENABLED_AES=yes - -fi - - -if test "$ENABLED_AES" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" -else - # turn off AES if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" - ENABLED_AES=no - fi -fi - - if test "x$ENABLED_AES" = "xyes"; then - BUILD_AES_TRUE= - BUILD_AES_FALSE='#' -else - BUILD_AES_TRUE='#' - BUILD_AES_FALSE= -fi - - - -# CODING -@%:@ Check whether --enable-coding was given. -if test "${enable_coding+set}" = set; then : - enableval=$enable_coding; ENABLED_CODING=$enableval -else - ENABLED_CODING=yes - -fi - - -if test "$ENABLED_CODING" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" -else - # turn off CODING if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" - ENABLED_CODING=no - fi -fi - - if test "x$ENABLED_CODING" = "xyes"; then - BUILD_CODING_TRUE= - BUILD_CODING_FALSE='#' -else - BUILD_CODING_TRUE='#' - BUILD_CODING_FALSE= -fi - - - -# DES3 -@%:@ Check whether --enable-des3 was given. -if test "${enable_des3+set}" = set; then : - enableval=$enable_des3; ENABLED_DES3=$enableval -else - ENABLED_DES3=yes - -fi - - -if test "$ENABLED_DES3" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" -else - # turn off DES3 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" - ENABLED_DES3=no - fi -fi - - if test "x$ENABLED_DES3" = "xyes"; then - BUILD_DES3_TRUE= - BUILD_DES3_FALSE='#' -else - BUILD_DES3_TRUE='#' - BUILD_DES3_FALSE= -fi - - - -# ARC4 -@%:@ Check whether --enable-arc4 was given. -if test "${enable_arc4+set}" = set; then : - enableval=$enable_arc4; ENABLED_ARC4=$enableval -else - ENABLED_ARC4=yes - -fi - - -if test "$ENABLED_ARC4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" -else - # turn off ARC4 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" - ENABLED_ARC4=no - fi -fi - - if test "x$ENABLED_ARC4" = "xyes"; then - BUILD_RC4_TRUE= - BUILD_RC4_FALSE='#' -else - BUILD_RC4_TRUE='#' - BUILD_RC4_FALSE= -fi - - - -# MD5 -@%:@ Check whether --enable-md5 was given. -if test "${enable_md5+set}" = set; then : - enableval=$enable_md5; ENABLED_MD5=$enableval -else - ENABLED_MD5=yes - -fi - - -if test "$ENABLED_MD5" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" -else - # turn off MD5 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" - ENABLED_MD5=no - fi -fi - - if test "x$ENABLED_MD5" = "xyes"; then - BUILD_MD5_TRUE= - BUILD_MD5_FALSE='#' -else - BUILD_MD5_TRUE='#' - BUILD_MD5_FALSE= -fi - - - -# SHA -@%:@ Check whether --enable-sha was given. -if test "${enable_sha+set}" = set; then : - enableval=$enable_sha; ENABLED_SHA=$enableval -else - ENABLED_SHA=yes - -fi - - -if test "$ENABLED_SHA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" -else - # turn off SHA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" - ENABLED_SHA=no - fi -fi - - if test "x$ENABLED_SHA" = "xyes"; then - BUILD_SHA_TRUE= - BUILD_SHA_FALSE='#' -else - BUILD_SHA_TRUE='#' - BUILD_SHA_FALSE= -fi - - - -# MD4 -@%:@ Check whether --enable-md4 was given. -if test "${enable_md4+set}" = set; then : - enableval=$enable_md4; ENABLED_MD4=$enableval -else - ENABLED_MD4=no - -fi - - -if test "$ENABLED_MD4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD4" -fi - - if test "x$ENABLED_MD4" = "xyes"; then - BUILD_MD4_TRUE= - BUILD_MD4_FALSE='#' -else - BUILD_MD4_TRUE='#' - BUILD_MD4_FALSE= -fi - - - -# Web Server Build -@%:@ Check whether --enable-webserver was given. -if test "${enable_webserver+set}" = set; then : - enableval=$enable_webserver; ENABLED_WEBSERVER=$enableval -else - ENABLED_WEBSERVER=no - -fi - - -if test "$ENABLED_WEBSERVER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" -fi - - -# PWDBASED -@%:@ Check whether --enable-pwdbased was given. -if test "${enable_pwdbased+set}" = set; then : - enableval=$enable_pwdbased; ENABLED_PWDBASED=$enableval -else - ENABLED_PWDBASED=no - -fi - - -if test "$ENABLED_PWDBASED" = "no" -then - if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" - then - # opensslextra and webserver needs pwdbased - ENABLED_PWDBASED=yes - else - AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" - fi -fi - - if test "x$ENABLED_PWDBASED" = "xyes"; then - BUILD_PWDBASED_TRUE= - BUILD_PWDBASED_FALSE='#' -else - BUILD_PWDBASED_TRUE='#' - BUILD_PWDBASED_FALSE= -fi - - - -# HC128 -@%:@ Check whether --enable-hc128 was given. -if test "${enable_hc128+set}" = set; then : - enableval=$enable_hc128; ENABLED_HC128=$enableval -else - ENABLED_HC128=no - -fi - - -if test "$ENABLED_HC128" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_HC128" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" -fi - - if test "x$ENABLED_HC128" = "xyes"; then - BUILD_HC128_TRUE= - BUILD_HC128_FALSE='#' -else - BUILD_HC128_TRUE='#' - BUILD_HC128_FALSE= -fi - - - -# RABBIT -@%:@ Check whether --enable-rabbit was given. -if test "${enable_rabbit+set}" = set; then : - enableval=$enable_rabbit; ENABLED_RABBIT=$enableval -else - ENABLED_RABBIT=no - -fi - - -if test "$ENABLED_RABBIT" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" -fi - - if test "x$ENABLED_RABBIT" = "xyes"; then - BUILD_RABBIT_TRUE= - BUILD_RABBIT_FALSE='#' -else - BUILD_RABBIT_TRUE='#' - BUILD_RABBIT_FALSE= -fi - - - -# FIPS -@%:@ Check whether --enable-fips was given. -if test "${enable_fips+set}" = set; then : - enableval=$enable_fips; ENABLED_FIPS=$enableval -else - ENABLED_FIPS=no - -fi - - -if test "x$ENABLED_FIPS" = "xyes" -then - # requires thread local storage - if test "$thread_ls_on" = "no" - then - as_fn_error $? "FIPS requires Thread Local Storage" "$LINENO" 5 - fi - # requires SHA512 - if test "x$ENABLED_SHA512" = "xno" - then - ENABLED_SHA512="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" - if test "x$ENABLED_SHA512" = "xyes"; then - BUILD_SHA512_TRUE= - BUILD_SHA512_FALSE='#' -else - BUILD_SHA512_TRUE='#' - BUILD_SHA512_FALSE= -fi - - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" -fi - - if test "x$ENABLED_FIPS" = "xyes"; then - BUILD_FIPS_TRUE= - BUILD_FIPS_FALSE='#' -else - BUILD_FIPS_TRUE='#' - BUILD_FIPS_FALSE= -fi - - - -# Filesystem Build -@%:@ Check whether --enable-filesystem was given. -if test "${enable_filesystem+set}" = set; then : - enableval=$enable_filesystem; ENABLED_FILESYSTEM=$enableval -else - ENABLED_FILESYSTEM=yes - -fi - - -if test "$ENABLED_FILESYSTEM" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" -else - # turn off filesystem if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" - ENABLED_FILESYSTEM=no - fi -fi - - -# inline Build -@%:@ Check whether --enable-inline was given. -if test "${enable_inline+set}" = set; then : - enableval=$enable_inline; ENABLED_INLINE=$enableval -else - ENABLED_INLINE=yes - -fi - - -if test "$ENABLED_INLINE" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" -fi - - if test "x$ENABLED_INLINE" = "xyes"; then - BUILD_INLINE_TRUE= - BUILD_INLINE_FALSE='#' -else - BUILD_INLINE_TRUE='#' - BUILD_INLINE_FALSE= -fi - - - -# OCSP -@%:@ Check whether --enable-ocsp was given. -if test "${enable_ocsp+set}" = set; then : - enableval=$enable_ocsp; ENABLED_OCSP=$enableval -else - ENABLED_OCSP=no -fi - - -if test "$ENABLED_OCSP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" -fi - - if test "x$ENABLED_OCSP" = "xyes"; then - BUILD_OCSP_TRUE= - BUILD_OCSP_FALSE='#' -else - BUILD_OCSP_TRUE='#' - BUILD_OCSP_FALSE= -fi - - - -if test "$ENABLED_OCSP" = "yes" -then - # check openssl command tool for testing ocsp - # Extract the first word of "openssl", so it can be a program name with args. -set dummy openssl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_OPENSSL_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_OPENSSL_CMD"; then - ac_cv_prog_HAVE_OPENSSL_CMD="$HAVE_OPENSSL_CMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_OPENSSL_CMD="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_OPENSSL_CMD" && ac_cv_prog_HAVE_OPENSSL_CMD="no" -fi -fi -HAVE_OPENSSL_CMD=$ac_cv_prog_HAVE_OPENSSL_CMD -if test -n "$HAVE_OPENSSL_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OPENSSL_CMD" >&5 -$as_echo "$HAVE_OPENSSL_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$HAVE_OPENSSL_CMD" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl command line tool not available for testing ocsp" >&5 -$as_echo "$as_me: WARNING: openssl command line tool not available for testing ocsp" >&2;} - fi -fi - - -# CRL -@%:@ Check whether --enable-crl was given. -if test "${enable_crl+set}" = set; then : - enableval=$enable_crl; ENABLED_CRL=$enableval -else - ENABLED_CRL=no -fi - - -if test "$ENABLED_CRL" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" -fi - - if test "x$ENABLED_CRL" = "xyes"; then - BUILD_CRL_TRUE= - BUILD_CRL_FALSE='#' -else - BUILD_CRL_TRUE='#' - BUILD_CRL_FALSE= -fi - - - -# CRL Monitor -@%:@ Check whether --enable-crl-monitor was given. -if test "${enable_crl_monitor+set}" = set; then : - enableval=$enable_crl_monitor; ENABLED_CRL_MONITOR=$enableval -else - ENABLED_CRL_MONITOR=no -fi - - -if test "$ENABLED_CRL_MONITOR" = "yes" -then - case $host_os in - *linux* | *darwin* | *freebsd*) - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; - *) - as_fn_error $? "crl monitor only allowed on linux, OS X, or freebsd" "$LINENO" 5 ;; - esac -fi - - if test "x$ENABLED_CRL_MONITOR" = "xyes"; then - BUILD_CRL_MONITOR_TRUE= - BUILD_CRL_MONITOR_FALSE='#' -else - BUILD_CRL_MONITOR_TRUE='#' - BUILD_CRL_MONITOR_FALSE= -fi - - - -# NTRU -ntruHome=`pwd`/NTRU_algorithm -ntruInclude=$ntruHome/cryptolib -ntruLib=$ntruHome -@%:@ Check whether --enable-ntru was given. -if test "${enable_ntru+set}" = set; then : - enableval=$enable_ntru; ENABLED_NTRU=$enableval -else - ENABLED_NTRU=no - -fi - - -if test "$ENABLED_NTRU" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" - AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" - LIBS="$LIBS -lntru_encrypt" -fi - - if test "x$ENABLED_NTRU" = "xyes"; then - BUILD_NTRU_TRUE= - BUILD_NTRU_FALSE='#' -else - BUILD_NTRU_TRUE='#' - BUILD_NTRU_FALSE= -fi - - -if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable ntru and small, ntru requires TLS which small turns off." "$LINENO" 5 -fi - -# SNI -@%:@ Check whether --enable-sni was given. -if test "${enable_sni+set}" = set; then : - enableval=$enable_sni; ENABLED_SNI=$enableval -else - ENABLED_SNI=no - -fi - - -if test "x$ENABLED_SNI" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" -fi - -# Maximum Fragment Length -@%:@ Check whether --enable-maxfragment was given. -if test "${enable_maxfragment+set}" = set; then : - enableval=$enable_maxfragment; ENABLED_MAX_FRAGMENT=$enableval -else - ENABLED_MAX_FRAGMENT=no - -fi - - -if test "x$ENABLED_MAX_FRAGMENT" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" -fi - -# Truncated HMAC -@%:@ Check whether --enable-truncatedhmac was given. -if test "${enable_truncatedhmac+set}" = set; then : - enableval=$enable_truncatedhmac; ENABLED_TRUNCATED_HMAC=$enableval -else - ENABLED_TRUNCATED_HMAC=no - -fi - - -if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" -fi - -# Renegotiation Indication -@%:@ Check whether --enable-renegotiation-indication was given. -if test "${enable_renegotiation_indication+set}" = set; then : - enableval=$enable_renegotiation_indication; ENABLED_RENEGOTIATION_INDICATION=$enableval -else - ENABLED_RENEGOTIATION_INDICATION=no - -fi - - -if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" -fi - -# Supported Elliptic Curves Extensions -@%:@ Check whether --enable-supportedcurves was given. -if test "${enable_supportedcurves+set}" = set; then : - enableval=$enable_supportedcurves; ENABLED_SUPPORTED_CURVES=$enableval -else - ENABLED_SUPPORTED_CURVES=no - -fi - - -if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" -fi - -# TLS Extensions -@%:@ Check whether --enable-tlsx was given. -if test "${enable_tlsx+set}" = set; then : - enableval=$enable_tlsx; ENABLED_TLSX=$enableval -else - ENABLED_TLSX=no - -fi - - -if test "x$ENABLED_TLSX" = "xyes" -then - ENABLED_SNI=yes - ENABLED_MAX_FRAGMENT=yes - ENABLED_TRUNCATED_HMAC=yes - ENABLED_RENEGOTIATION_INDICATION=yes - ENABLED_SUPPORTED_CURVES=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" -fi - -# PKCS7 -@%:@ Check whether --enable-pkcs7 was given. -if test "${enable_pkcs7+set}" = set; then : - enableval=$enable_pkcs7; ENABLED_PKCS7=$enableval -else - ENABLED_PKCS7=no -fi - - -if test "$ENABLED_PKCS7" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" -fi - - if test "x$ENABLED_PKCS7" = "xyes"; then - BUILD_PKCS7_TRUE= - BUILD_PKCS7_FALSE='#' -else - BUILD_PKCS7_TRUE='#' - BUILD_PKCS7_FALSE= -fi - - - -# Simple Certificate Enrollment Protocol (SCEP) -@%:@ Check whether --enable-scep was given. -if test "${enable_scep+set}" = set; then : - enableval=$enable_scep; ENABLED_WOLFSCEP=$enableval -else - ENABLED_WOLFSCEP=no - -fi - -if test "$ENABLED_WOLFSCEP" = "yes" -then - # Enable prereqs if not already enabled - if test "x$ENABLED_KEYGEN" = "xno" - then - ENABLED_KEYGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" - fi - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_CERTREQ" = "xno" - then - ENABLED_CERTREQ="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" - fi - if test "x$ENABLED_PKCS7" = "xno" - then - ENABLED_PKCS7="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" - if test "x$ENABLED_PKCS7" = "xyes"; then - BUILD_PKCS7_TRUE= - BUILD_PKCS7_FALSE='#' -else - BUILD_PKCS7_TRUE='#' - BUILD_PKCS7_FALSE= -fi - - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" -fi - - -# Small Stack -@%:@ Check whether --enable-smallstack was given. -if test "${enable_smallstack+set}" = set; then : - enableval=$enable_smallstack; ENABLED_SMALL_STACK=$enableval -else - ENABLED_SMALL_STACK=yes - -fi - - -if test "x$ENABLED_SMALL_STACK" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" -fi - - -#valgrind -@%:@ Check whether --enable-valgrind was given. -if test "${enable_valgrind+set}" = set; then : - enableval=$enable_valgrind; ENABLED_VALGRIND=$enableval -else - ENABLED_VALGRIND=no - -fi - - -if test "$ENABLED_VALGRIND" = "yes" -then - # Extract the first word of "valgrind", so it can be a program name with args. -set dummy valgrind; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_VALGRIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_VALGRIND"; then - ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_VALGRIND="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no" -fi -fi -HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND -if test -n "$HAVE_VALGRIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5 -$as_echo "$HAVE_VALGRIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$HAVE_VALGRIND" = "no" - then - as_fn_error $? "Valgrind not found." "$LINENO" 5 - fi - enable_shared=no - enable_static=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" -fi - - if test "x$ENABLED_VALGRIND" = "xyes"; then - USE_VALGRIND_TRUE= - USE_VALGRIND_FALSE='#' -else - USE_VALGRIND_TRUE='#' - USE_VALGRIND_FALSE= -fi - - - -# Test certs, use internal cert functions for extra testing -@%:@ Check whether --enable-testcert was given. -if test "${enable_testcert+set}" = set; then : - enableval=$enable_testcert; ENABLED_TESTCERT=$enableval -else - ENABLED_TESTCERT=no - -fi - - -if test "$ENABLED_TESTCERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" -fi - - -# I/O Pool, an example to show user how to override memory handler and use -# a pool for the input/output buffer requests -@%:@ Check whether --enable-iopool was given. -if test "${enable_iopool+set}" = set; then : - enableval=$enable_iopool; ENABLED_IOPOOL=$enableval -else - ENABLED_IOPOOL=no - -fi - - -if test "$ENABLED_IOPOOL" = "yes" -then - if test "$thread_ls_on" = "no" - then - as_fn_error $? "I/O Pool example requires Thread Local Storage" "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" -fi - - -# Certificate Service Support -@%:@ Check whether --enable-certservice was given. -if test "${enable_certservice+set}" = set; then : - enableval=$enable_certservice; ENABLED_CERT_SERVICE=$enableval -else - ENABLED_CERT_SERVICE=no - -fi - -if test "$ENABLED_CERT_SERVICE" = "yes" -then - # Requires ecc,certgen, and opensslextra make sure on - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_ECC" = "xno" - then - ENABLED_ECC="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" - if test "x$ENABLED_ECC" = "xyes"; then - BUILD_ECC_TRUE= - BUILD_ECC_FALSE='#' -else - BUILD_ECC_TRUE='#' - BUILD_ECC_FALSE= -fi - - fi - if test "x$ENABLED_OPENSSLEXTRA" = "xno" - then - ENABLED_OPENSSLEXTRA="yes" - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" -fi - - -# set fastmath default -FASTMATH_DEFAULT=no - -if test "$host_cpu" = "x86_64" -then -FASTMATH_DEFAULT=yes -fi - -# fastmath -@%:@ Check whether --enable-fastmath was given. -if test "${enable_fastmath+set}" = set; then : - enableval=$enable_fastmath; ENABLED_FASTMATH=$enableval -else - ENABLED_FASTMATH=$FASTMATH_DEFAULT - -fi - - -if test "x$ENABLED_FASTMATH" = "xyes" -then - # turn off fastmth if leanpsk on or asn off - if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" - then - ENABLED_FASTMATH=no - else - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" - fi -fi - - -# fast HUGE math -@%:@ Check whether --enable-fasthugemath was given. -if test "${enable_fasthugemath+set}" = set; then : - enableval=$enable_fasthugemath; ENABLED_FASTHUGEMATH=$enableval -else - ENABLED_FASTHUGEMATH=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_FASTHUGEMATH="yes" -fi - -if test "$ENABLED_FASTHUGEMATH" = "yes" -then - ENABLED_FASTMATH="yes" - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" -fi - - if test "x$ENABLED_FASTMATH" = "xyes"; then - BUILD_FASTMATH_TRUE= - BUILD_FASTMATH_FALSE='#' -else - BUILD_FASTMATH_TRUE='#' - BUILD_FASTMATH_FALSE= -fi - - if test "x$ENABLED_SLOWMATH" = "xyes"; then - BUILD_SLOWMATH_TRUE= - BUILD_SLOWMATH_FALSE='#' -else - BUILD_SLOWMATH_TRUE='#' - BUILD_SLOWMATH_FALSE= -fi - - - -# Enable Examples, used to disable examples -@%:@ Check whether --enable-examples was given. -if test "${enable_examples+set}" = set; then : - enableval=$enable_examples; ENABLED_EXAMPLES=$enableval -else - ENABLED_EXAMPLES=yes - -fi - - -if test "x$ENABLED_FILESYSTEM" = "xno"; then : - ENABLED_EXAMPLES="no" -fi -if test "x$ENABLED_INLINE" = "xno"; then : - ENABLED_EXAMPLES="no" -fi -# certs still have sha signatures for now -if test "x$ENABLED_SHA" = "xno"; then : - ENABLED_EXAMPLES="no" -fi - if test "x$ENABLED_EXAMPLES" = "xyes"; then - BUILD_EXAMPLES_TRUE= - BUILD_EXAMPLES_FALSE='#' -else - BUILD_EXAMPLES_TRUE='#' - BUILD_EXAMPLES_FALSE= -fi - - - -# LIBZ -ENABLED_LIBZ="no" -trylibzdir="" - -@%:@ Check whether --with-libz was given. -if test "${with_libz+set}" = set; then : - withval=$with_libz; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz" >&5 -$as_echo_n "checking for libz... " >&6; } - CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" - LIBS="$LIBS -lz" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - deflateInit(0, 8); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - libz_linked=yes -else - libz_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$libz_linked" == "xno" ; then - if test "x$withval" != "xno" ; then - trylibzdir=$withval - fi - if test "x$withval" == "xyes" ; then - trylibzdir="/usr" - fi - - AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" - CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - deflateInit(0, 8); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - libz_linked=yes -else - libz_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$libz_linked" == "xno" ; then - as_fn_error $? "libz isn't found. - If it's already installed, specify its path using --with-libz=/dir/" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - ENABLED_LIBZ="yes" - - -fi - - if test "x$ENABLED_LIBZ" = "xyes"; then - BUILD_LIBZ_TRUE= - BUILD_LIBZ_FALSE='#' -else - BUILD_LIBZ_TRUE='#' - BUILD_LIBZ_FALSE= -fi - - - -# cavium -trycaviumdir="" - -@%:@ Check whether --with-cavium was given. -if test "${with_cavium+set}" = set; then : - withval=$with_cavium; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5 -$as_echo_n "checking for cavium... " >&6; } - CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" - - if test "x$withval" == "xyes" ; then - as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5 - fi - if test "x$withval" != "xno" ; then - trycaviumdir=$withval - fi - - LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" - CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "cavium_common.h" -int -main () -{ - CspShutdown(CAVIUM_DEV_ID); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - cavium_linked=yes -else - cavium_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$cavium_linked" == "xno" ; then - as_fn_error $? "cavium isn't found. - If it's already installed, specify its path using --with-cavium=/dir/" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - enable_shared=no - enable_static=yes - - -fi - - - -# microchip api -@%:@ Check whether --enable-mcapi was given. -if test "${enable_mcapi+set}" = set; then : - enableval=$enable_mcapi; ENABLED_MCAPI=$enableval -else - ENABLED_MCAPI=no - -fi - - -if test "$ENABLED_MCAPI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" -then - as_fn_error $? "please enable sha512 if enabling mcapi." "$LINENO" 5 -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" -then - as_fn_error $? "please enable ecc if enabling mcapi." "$LINENO" 5 -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" -then - as_fn_error $? "please use --with-libz if enabling mcapi." "$LINENO" 5 -fi - - if test "x$ENABLED_MCAPI" = "xyes"; then - BUILD_MCAPI_TRUE= - BUILD_MCAPI_FALSE='#' -else - BUILD_MCAPI_TRUE='#' - BUILD_MCAPI_FALSE= -fi - - - - -# OPTIMIZE FLAGS -if test "$GCC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" - if test "$ax_enable_debug" = "no" - then - if test "$ENABLED_FASTMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" - if test "$ENABLED_FASTHUGEMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" - fi - else - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" - fi - fi -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if ${ac_cv_search_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : - break -fi -done -if ${ac_cv_search_gethostbyname+:} false; then : - -else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if ${ac_cv_search_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : - break -fi -done -if ${ac_cv_search_socket+:} false; then : - -else - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket -lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - LIBS="-lsocket -lnsl $LIBS" -fi - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts " >&5 -$as_echo_n "checking whether C compiler accepts ... " >&6; } -if ${ax_cv_check_cflags__+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS " - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__=yes -else - ax_cv_check_cflags__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__" >&5 -$as_echo "$ax_cv_check_cflags__" >&6; } -if test x"$ax_cv_check_cflags__" = xyes; then : - : -else - : -fi - -if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains "; } >&5 - (: CFLAGS already contains ) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \""; } >&5 - (: CFLAGS="$CFLAGS ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS " - ;; - esac -else - CFLAGS="" -fi - - - -for flag in ; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts " >&5 -$as_echo_n "checking whether the linker accepts ... " >&6; } -if ${ax_cv_check_ldflags__+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS " - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags__=yes -else - ax_cv_check_ldflags__=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__" >&5 -$as_echo "$ax_cv_check_ldflags__" >&6; } -if test x"$ax_cv_check_ldflags__" = xyes; then : - : -else - : -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5 -$as_echo_n "checking for vcs system... " >&6; } -if ${ac_cv_vcs_system+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_vcs_system="none" - if test -d ".bzr"; then : - ac_cv_vcs_system="bazaar" -fi - if test -d ".svn"; then : - ac_cv_vcs_system="svn" -fi - if test -d ".hg"; then : - ac_cv_vcs_system="mercurial" -fi - if test -d ".git"; then : - ac_cv_vcs_system="git" -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5 -$as_echo "$ac_cv_vcs_system" >&6; } - -cat >>confdefs.h <<_ACEOF -@%:@define VCS_SYSTEM "$ac_cv_vcs_system" -_ACEOF - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5 -$as_echo_n "checking for vcs checkout... " >&6; } -if ${ac_cv_vcs_checkout+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$ac_cv_vcs_system" != "xnone"; then : - ac_cv_vcs_checkout=yes -else - ac_cv_vcs_checkout=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5 -$as_echo "$ac_cv_vcs_checkout" >&6; } - - if test "x$ac_cv_vcs_checkout" = "xyes"; then - IS_VCS_CHECKOUT_TRUE= - IS_VCS_CHECKOUT_FALSE='#' -else - IS_VCS_CHECKOUT_TRUE='#' - IS_VCS_CHECKOUT_FALSE= -fi - - if test "x$ac_cv_vcs_checkout" = "xyes"; then : - -$as_echo "@%:@define VCS_CHECKOUT 1" >>confdefs.h - -else - -$as_echo "@%:@define VCS_CHECKOUT 0" >>confdefs.h - -fi - - - - - - - AX_HARDEN_LIB= - ax_append_compile_link_flags_extra= - if test "x$ac_cv_vcs_checkout" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 -$as_echo_n "checking whether the linker accepts -Werror... " >&6; } -if ${ax_cv_check_ldflags___Werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags___Werror=yes -else - ax_cv_check_ldflags___Werror=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 -$as_echo "$ax_cv_check_ldflags___Werror" >&6; } -if test x"$ax_cv_check_ldflags___Werror" = xyes; then : - - AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" - -else - : -fi - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 -$as_echo_n "checking whether the linker accepts -Werror... " >&6; } -if ${ax_cv_check_ldflags___Werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags___Werror=yes -else - ax_cv_check_ldflags___Werror=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 -$as_echo "$ax_cv_check_ldflags___Werror" >&6; } -if test x"$ax_cv_check_ldflags___Werror" = xyes; then : - - ax_append_compile_link_flags_extra='-Werror' - -else - : -fi - - -fi - - as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-z relro -z now" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5 -$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -z relro -z now" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - - AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" - -else - : -fi - - - as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-pie" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5 -$as_echo_n "checking whether the linker accepts -pie... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -pie" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - - AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" - -else - : -fi - - - LIB="$LIB $AX_HARDEN_LIB" - - - - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - CFLAGS= - ac_cv_warnings_as_errors=no - ax_append_compile_cflags_extra= - if test "$ac_cv_vcs_checkout" = "yes"; then : - - - -for flag in -Werror; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - ac_cv_warnings_as_errors=yes - -else - - - -for flag in -Werror; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${ax_append_compile_cflags_extra+:} false; then : - case " $ax_append_compile_cflags_extra " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra already contains \$flag"; } >&5 - (: ax_append_compile_cflags_extra already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra \$flag\""; } >&5 - (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" - ;; - esac -else - ax_append_compile_cflags_extra="$flag" -fi - -else - : -fi - -done - - -fi - - if test "$ax_enable_debug" = "yes"; then : - - - -for flag in -g; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -ggdb; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -O0; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - -fi - - - -for flag in -Wno-pragmas; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - - -for flag in -Wall; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wno-strict-aliasing; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wextra; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunknown-pragmas; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wthis-test-should-fail; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - if test "$CC" = "clang"; then : - -else - - - -for flag in --param=ssp-buffer-size=1; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - -fi - - -for flag in -Waddress; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Warray-bounds; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wbad-function-cast; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wchar-subscripts; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wcomment; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wfloat-equal; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wformat-security; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wformat=2; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmaybe-uninitialized; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-field-initializers; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-noreturn; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-prototypes; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wnested-externs; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wnormalized=id; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Woverride-init; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wpointer-arith; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wpointer-sign; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wredundant-decls; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wshadow; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wshorten-64-to-32; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wsign-compare; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wstrict-overflow=1; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wstrict-prototypes; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wswitch-enum; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wundef; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused-result; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused-variable; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wwrite-strings; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -fwrapv; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -fPIE; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# link to ws2_32 if on mingw -case $host_os in - *mingw32) - LDFLAGS="$LDFLAGS -lws2_32" ;; -esac - -# add user C_EXTRA_FLAGS back -CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" -OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" - - - - HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \ - awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` - - - - - - -# FINAL -ac_config_files="$ac_config_files stamp-h" - -ac_config_files="$ac_config_files Makefile" - -ac_config_files="$ac_config_files cyassl/version.h" - -ac_config_files="$ac_config_files cyassl/options.h" - -ac_config_files="$ac_config_files support/cyassl.pc" - -ac_config_files="$ac_config_files rpm/spec" - - -# create a generic PACKAGE-config file -L=`echo $PACKAGE $LIBS` -P=`echo $L | sed -e 's/ -.*//'` -P=`echo $P` -V=`echo $VERSION` -F=`echo $P-config` -L=`echo -l$L | sed -e 's/^-llib/-l/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: creating $F - generic $V for $L" >&5 -$as_echo "creating $F - generic $V for $L" >&6; } -test "x$prefix" = xNONE && prefix="$ac_default_prefix" -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -echo '#! /bin/sh' >$F -echo ' ' >>$F -echo 'package="'$P'"' >>$F -echo 'version="'$V'"' >>$F -echo 'libs="'$L'"' >>$F -echo ' ' >>$F -# in the order of occurence a standard automake Makefile -echo 'prefix="'$prefix'"' >>$F -echo 'exec_prefix="'$exec_prefix'"' >>$F -echo 'bindir="'$bindir'"' >>$F -echo 'sbindir="'$sbindir'"' >>$F -echo 'libexecdir="'$libexecdir'"' >>$F -echo 'datadir="'$datadir'"' >>$F -echo 'sysconfdir="'$sysconfdir'"' >>$F -echo 'sharedstatedir="'$sharedstatedir'"' >>$F -echo 'localstatedir="'$localstatedir'"' >>$F -echo 'libdir="'$libdir'"' >>$F -echo 'infodir="'$infodir'"' >>$F -echo 'mandir="'$mandir'"' >>$F -echo 'includedir="'$includedir'"' >>$F -echo 'target="'$target'"' >>$F -echo 'host="'$host'"' >>$F -echo 'build="'$build'"' >>$F -echo ' ' >>$F -echo 'if test "'"\$""#"'" -eq 0; then' >>$F -echo ' cat <>$F -echo 'Usage: $package-config OPTIONS' >>$F -echo 'Options:' >>$F -echo ' --prefix=DIR) : \$prefix' >>$F -echo ' --package) : \$package' >>$F -echo ' --version) : \$version' >>$F -echo ' --cflags) : -I\$includedir' >>$F -echo ' --libs) : -L\$libdir -l\$package' >>$F -echo ' --help) print all the options (not just these)' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -echo ' ' >>$F -echo 'o=""' >>$F -echo 'h=""' >>$F -echo 'for i in "$@"; do' >>$F -echo ' case $i in' >>$F -echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F -echo ' --prefix) o="$o $prefix" ;;' >>$F -echo ' --package) o="$o $package" ;;' >>$F -echo ' --version) o="$o $version" ;;' >>$F -echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F -echo ' then o="$o -I$includedir" ; fi' >>$F -echo ' ;;' >>$F -echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F -echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F -echo ' --bindir) o="$o $bindir" ;;' >>$F -echo ' --sbindir) o="$o $sbindir" ;;' >>$F -echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F -echo ' --datadir) o="$o $datadir" ;;' >>$F -echo ' --datainc) o="$o -I$datadir" ;;' >>$F -echo ' --datalib) o="$o -L$datadir" ;;' >>$F -echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F -echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F -echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F -echo ' --libdir) o="$o $libdir" ;;' >>$F -echo ' --libadd) o="$o -L$libdir" ;;' >>$F -echo ' --infodir) o="$o $infodir" ;;' >>$F -echo ' --mandir) o="$o $mandir" ;;' >>$F -echo ' --target) o="$o $target" ;;' >>$F -echo ' --host) o="$o $host" ;;' >>$F -echo ' --build) o="$o $build" ;;' >>$F -echo ' --data) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F -echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F -echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F -echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F -echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F -echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F -echo ' --help) h="1" ;;' >>$F -echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F -echo ' v=`echo $i | sed -e s://:\$:g`' >>$F -echo ' v=`eval "echo $v"` ' >>$F -echo ' o="$o $v" ;; ' >>$F -echo ' esac' >>$F -echo 'done' >>$F -echo ' ' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'eval "echo $o"' >>$F -echo ' ' >>$F -echo 'if test ! -z "$h" ; then ' >>$F -echo 'cat <>$F -echo ' --prefix=xxx) (what is that for anyway?)' >>$F -echo ' --prefix) \$prefix $prefix' >>$F -echo ' --package) \$package $package' >>$F -echo ' --version) \$version $version' >>$F -echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F -echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F -echo ' --exec_prefix) or... ' >>$F -echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F -echo ' --bindir) \$bindir $bindir' >>$F -echo ' --sbindir) \$sbindir $sbindir' >>$F -echo ' --libexecdir) \$libexecdir $libexecdir' >>$F -echo ' --datadir) \$datadir $datadir' >>$F -echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F -echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F -echo ' --localstatedir) \$localstatedir $localstatedir' >>$F -echo ' --libdir) \$libdir $libdir' >>$F -echo ' --infodir) \$infodir $infodir' >>$F -echo ' --mandir) \$mandir $mandir' >>$F -echo ' --target) \$target $target' >>$F -echo ' --host) \$host $host' >>$F -echo ' --build) \$build $build' >>$F -echo ' --data) -I\$datadir/\$package' >>$F -echo ' --pkgdatadir) \$datadir/\$package' >>$F -echo ' --pkglibdir) \$libdir/\$package' >>$F -echo ' --pkgincludedir) \$includedir/\$package' >>$F -echo ' --help) generated by ax_create_generic_config.m4' >>$F -echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F -echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -GENERIC_CONFIG="$F" - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 -$as_echo_n "checking the number of available CPUs... " >&6; } - CPU_COUNT="0" - - case $host_os in @%:@( - - *darwin*) : - - if test -x /usr/sbin/sysctl; then : - - sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` - if test sysctl_a; then : - - CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` - -fi - -fi ;; @%:@( - - *linux*) : - - if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : - - if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : - - CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` - -fi - -fi - ;; @%:@( - *) : - ;; -esac - - if test "x$CPU_COUNT" = "x0"; then : - - CPU_COUNT="1" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1) " >&5 -$as_echo "unable to detect (assuming 1) " >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT " >&5 -$as_echo "$CPU_COUNT " >&6; } - -fi - - -AX_DOLLAR="\$" -AX_SRB="\\135" -AX_SLB="\\133" -AX_BS="\\\\" -AX_DQ="\"" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5 -$as_echo "$as_me: adding automake macro support" >&6;} -AMINCLUDE="aminclude.am" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5 -$as_echo "$as_me: creating $AMINCLUDE" >&6;} -AMINCLUDE_TIME=`date` - - -printf " -# generated automatically by configure from AX_AUTOMAKE_MACROS -# on $AMINCLUDE_TIME - -" > "$AMINCLUDE" - - -INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" - - - - - - @%:@ Check whether --enable-jobserver was given. -if test "${enable_jobserver+set}" = set; then : - enableval=$enable_jobserver; -else - enable_jobserver=yes -fi - - if test "x$enable_jobserver" = "xyes"; then - enable_jobserver=$CPU_COUNT - ((enable_jobserver++)) - fi - - if test "x$enable_jobserver" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5 -$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;} - - - - -printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE" - - - fi - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then - as_fn_error $? "conditional \"DEBUG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_LEANPSK_TRUE}" && test -z "${BUILD_LEANPSK_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LEANPSK\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SNIFFER_TRUE}" && test -z "${BUILD_SNIFFER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SNIFFER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SNIFFTEST_TRUE}" && test -z "${BUILD_SNIFFTEST_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SNIFFTEST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESGCM_TRUE}" && test -z "${BUILD_AESGCM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESGCM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESCCM_TRUE}" && test -z "${BUILD_AESCCM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESCCM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESNI_TRUE}" && test -z "${BUILD_AESNI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESNI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CAMELLIA_TRUE}" && test -z "${BUILD_CAMELLIA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CAMELLIA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD2_TRUE}" && test -z "${BUILD_MD2_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RIPEMD_TRUE}" && test -z "${BUILD_RIPEMD_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RIPEMD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_BLAKE2_TRUE}" && test -z "${BUILD_BLAKE2_FALSE}"; then - as_fn_error $? "conditional \"BUILD_BLAKE2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DSA_TRUE}" && test -z "${BUILD_DSA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ECC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MEMORY_TRUE}" && test -z "${BUILD_MEMORY_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MEMORY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RSA_TRUE}" && test -z "${BUILD_RSA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DH_TRUE}" && test -z "${BUILD_DH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ASN_TRUE}" && test -z "${BUILD_ASN_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ASN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AES_TRUE}" && test -z "${BUILD_AES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CODING_TRUE}" && test -z "${BUILD_CODING_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CODING\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DES3_TRUE}" && test -z "${BUILD_DES3_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DES3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RC4_TRUE}" && test -z "${BUILD_RC4_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RC4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD5_TRUE}" && test -z "${BUILD_MD5_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD5\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA_TRUE}" && test -z "${BUILD_SHA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD4_TRUE}" && test -z "${BUILD_MD4_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PWDBASED_TRUE}" && test -z "${BUILD_PWDBASED_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PWDBASED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_HC128_TRUE}" && test -z "${BUILD_HC128_FALSE}"; then - as_fn_error $? "conditional \"BUILD_HC128\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RABBIT_TRUE}" && test -z "${BUILD_RABBIT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RABBIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_FIPS_TRUE}" && test -z "${BUILD_FIPS_FALSE}"; then - as_fn_error $? "conditional \"BUILD_FIPS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_INLINE_TRUE}" && test -z "${BUILD_INLINE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_INLINE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_OCSP_TRUE}" && test -z "${BUILD_OCSP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_OCSP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CRL_TRUE}" && test -z "${BUILD_CRL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CRL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CRL_MONITOR_TRUE}" && test -z "${BUILD_CRL_MONITOR_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CRL_MONITOR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_NTRU_TRUE}" && test -z "${BUILD_NTRU_FALSE}"; then - as_fn_error $? "conditional \"BUILD_NTRU\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${USE_VALGRIND_TRUE}" && test -z "${USE_VALGRIND_FALSE}"; then - as_fn_error $? "conditional \"USE_VALGRIND\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ECC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_FASTMATH_TRUE}" && test -z "${BUILD_FASTMATH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_FASTMATH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SLOWMATH_TRUE}" && test -z "${BUILD_SLOWMATH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SLOWMATH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_LIBZ_TRUE}" && test -z "${BUILD_LIBZ_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LIBZ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MCAPI_TRUE}" && test -z "${BUILD_MCAPI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MCAPI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then - as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cyassl $as_me 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to . -cyassl home page: ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cyassl config.status 3.0.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; - "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; - "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; - "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - "stamp-h":F) echo timestamp > stamp-h ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -# force make clean -echo "---" -echo "Running make clean..." -make clean >/dev/null 2>&1 -echo - -# generate user options header -echo "---" -echo "Generating user options header..." -OPTION_FILE="cyassl/options.h" -rm -f $OPTION_FILE - -echo "/* cyassl options.h" >> $OPTION_FILE -echo " * generated from configure options" >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * This file is part of CyaSSL." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " */" >> $OPTION_FILE - -echo "" >> $OPTION_FILE -echo "#pragma once" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "extern \"C\" {" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE - -for option in $OPTION_FLAGS; do - defonly=`echo $option | sed 's/-D//'` - if test "$defonly" != "$option" - then - noequalsign=`echo $defonly | sed 's/=/ /'` - echo "#undef $noequalsign" >> $OPTION_FILE - echo "#define $noequalsign" >> $OPTION_FILE - echo "" >> $OPTION_FILE - else - echo "option w/o begin -D is $option, not saving to $OPTION_FILE" - fi -done - -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "}" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo - -# output config summary -echo "---" -echo "Configuration summary for $PACKAGE_NAME version $VERSION" -echo "" -echo " * Installation prefix: $prefix" -echo " * System type: $host_vendor-$host_os" -echo " * Host CPU: $host_cpu" -echo " * C Compiler: $CC" -echo " * C Flags: $CFLAGS" -echo " * C++ Compiler: $CXX" -echo " * C++ Flags: $CXXFLAGS" -echo " * CPP Flags: $CPPFLAGS" -echo " * LIB Flags: $LIB" -echo " * Debug enabled: $ax_enable_debug" -echo " * Warnings as failure: $ac_cv_warnings_as_errors" -echo " * make -j: $enable_jobserver" -echo " * VCS checkout: $ac_cv_vcs_checkout" -echo -echo " Features " -echo " * Single threaded: $ENABLED_SINGLETHREADED" -echo " * Filesystem: $ENABLED_FILESYSTEM" -echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" -echo " * fastmath: $ENABLED_FASTMATH" -echo " * sniffer: $ENABLED_SNIFFER" -echo " * snifftest: $ENABLED_SNIFFTEST" -echo " * ARC4: $ENABLED_ARC4" -echo " * AES: $ENABLED_AES" -echo " * AES-NI: $ENABLED_AESNI" -echo " * AES-GCM: $ENABLED_AESGCM" -echo " * AES-CCM: $ENABLED_AESCCM" -echo " * DES3: $ENABLED_DES3" -echo " * Camellia: $ENABLED_CAMELLIA" -echo " * NULL Cipher: $ENABLED_NULL_CIPHER" -echo " * MD5: $ENABLED_MD5" -echo " * RIPEMD: $ENABLED_RIPEMD" -echo " * SHA: $ENABLED_SHA" -echo " * SHA-512: $ENABLED_SHA512" -echo " * BLAKE2: $ENABLED_BLAKE2" -echo " * keygen: $ENABLED_KEYGEN" -echo " * certgen: $ENABLED_CERTGEN" -echo " * certreq: $ENABLED_CERTREQ" -echo " * HC-128: $ENABLED_HC128" -echo " * RABBIT: $ENABLED_RABBIT" -echo " * PWDBASED: $ENABLED_PWDBASED" -echo " * HKDF: $ENABLED_HKDF" -echo " * MD4: $ENABLED_MD4" -echo " * PSK: $ENABLED_PSK" -echo " * LEANPSK: $ENABLED_LEANPSK" -echo " * RSA: $ENABLED_RSA" -echo " * DSA: $ENABLED_DSA" -echo " * DH: $ENABLED_DH" -echo " * ECC: $ENABLED_ECC" -echo " * FPECC: $ENABLED_FPECC" -echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" -echo " * ASN: $ENABLED_ASN" -echo " * CODING: $ENABLED_CODING" -echo " * MEMORY: $ENABLED_MEMORY" -echo " * I/O POOL: $ENABLED_IOPOOL" -echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" -echo " * DTLS: $ENABLED_DTLS" -echo " * Old TLS Versions: $ENABLED_OLD_TLS" -echo " * OCSP: $ENABLED_OCSP" -echo " * CRL: $ENABLED_CRL" -echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" -echo " * Persistent session cache: $ENABLED_SAVESESSION" -echo " * Persistent cert cache: $ENABLED_SAVECERT" -echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" -echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" -echo " * NTRU: $ENABLED_NTRU" -echo " * SNI: $ENABLED_SNI" -echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" -echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" -echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" -echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" -echo " * All TLS Extensions: $ENABLED_TLSX" -echo " * PKCS#7 $ENABLED_PKCS7" -echo " * wolfSCEP $ENABLED_WOLFSCEP" -echo " * Small Stack: $ENABLED_SMALL_STACK" -echo " * valgrind unit tests: $ENABLED_VALGRIND" -echo " * LIBZ: $ENABLED_LIBZ" -echo " * Examples: $ENABLED_EXAMPLES" -echo "" -echo "---" - diff --git a/project1/cyassl-3.0.0/autom4te.cache/requests b/project1/cyassl-3.0.0/autom4te.cache/requests deleted file mode 100644 index 283cef37..00000000 --- a/project1/cyassl-3.0.0/autom4te.cache/requests +++ /dev/null @@ -1,80 +0,0 @@ -# This file was generated by Autom4te Thu Apr 10 10:06:43 UTC 2014. -# It contains the lists of macros which have been traced. -# It can be safely removed. - -@request = ( - bless( [ - '0', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - 'aclocal.m4', - 'configure.ac' - ], - { - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_POT_TOOLS' => 1, - 'AC_LIBSOURCE' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AM_NLS' => 1, - 'AM_CONDITIONAL' => 1, - '_AM_COND_IF' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AC_SUBST_TRACE' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AM_PROG_AR' => 1, - 'AC_CONFIG_LINKS' => 1, - '_AM_COND_ENDIF' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_FC_FREEFORM' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AM_PROG_MOC' => 1, - 'm4_pattern_allow' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - '_AM_COND_ELSE' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AM_PROG_MKDIR_P' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AM_PROG_CXX_C_O' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'AC_FC_SRCEXT' => 1, - 'include' => 1, - 'LT_INIT' => 1, - 'm4_include' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_CONFIG_FILES' => 1, - 'm4_pattern_forbid' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'm4_sinclude' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AM_PROG_F77_C_O' => 1, - 'AC_SUBST' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'AM_SILENT_RULES' => 1, - '_m4_warn' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_FC_PP_SRCEXT' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_INIT' => 1, - 'AH_OUTPUT' => 1, - 'AM_ENABLE_MULTILIB' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'sinclude' => 1 - } - ], 'Autom4te::Request' ) - ); - diff --git a/project1/cyassl-3.0.0/autom4te.cache/traces.0 b/project1/cyassl-3.0.0/autom4te.cache/traces.0 deleted file mode 100644 index db8f6f5d..00000000 --- a/project1/cyassl-3.0.0/autom4te.cache/traces.0 +++ /dev/null @@ -1,1332 +0,0 @@ -m4trace:aclocal.m4:1170: -1- m4_include([m4/ax_add_am_macro.m4]) -m4trace:aclocal.m4:1171: -1- m4_include([m4/ax_am_jobserver.m4]) -m4trace:aclocal.m4:1172: -1- m4_include([m4/ax_am_macros.m4]) -m4trace:aclocal.m4:1173: -1- m4_include([m4/ax_append_compile_flags.m4]) -m4trace:aclocal.m4:1174: -1- m4_include([m4/ax_append_flag.m4]) -m4trace:aclocal.m4:1175: -1- m4_include([m4/ax_append_to_file.m4]) -m4trace:aclocal.m4:1176: -1- m4_include([m4/ax_check_compile_flag.m4]) -m4trace:aclocal.m4:1177: -1- m4_include([m4/ax_check_link_flag.m4]) -m4trace:aclocal.m4:1178: -1- m4_include([m4/ax_count_cpus.m4]) -m4trace:aclocal.m4:1179: -1- m4_include([m4/ax_create_generic_config.m4]) -m4trace:aclocal.m4:1180: -1- m4_include([m4/ax_debug.m4]) -m4trace:aclocal.m4:1181: -1- m4_include([m4/ax_file_escapes.m4]) -m4trace:aclocal.m4:1182: -1- m4_include([m4/ax_harden_compiler_flags.m4]) -m4trace:aclocal.m4:1183: -1- m4_include([m4/ax_print_to_file.m4]) -m4trace:aclocal.m4:1184: -1- m4_include([m4/ax_pthread.m4]) -m4trace:aclocal.m4:1185: -1- m4_include([m4/ax_tls.m4]) -m4trace:aclocal.m4:1186: -1- m4_include([m4/ax_vcs_checkout.m4]) -m4trace:aclocal.m4:1187: -1- m4_include([m4/hexversion.m4]) -m4trace:aclocal.m4:1188: -1- m4_include([m4/lib_socket_nsl.m4]) -m4trace:aclocal.m4:1189: -1- m4_include([m4/libtool.m4]) -m4trace:aclocal.m4:1190: -1- m4_include([m4/ltoptions.m4]) -m4trace:aclocal.m4:1191: -1- m4_include([m4/ltsugar.m4]) -m4trace:aclocal.m4:1192: -1- m4_include([m4/ltversion.m4]) -m4trace:aclocal.m4:1193: -1- m4_include([m4/lt~obsolete.m4]) -m4trace:aclocal.m4:1194: -1- m4_include([m4/visibility.m4]) -m4trace:aclocal.m4:1195: -1- m4_include([m4/wolfssl_darwin_clang.m4]) -m4trace:configure.ac:9: -1- AC_INIT([cyassl], [3.0.0], [https://github.com/cyassl/cyassl/issues], [cyassl], [http://www.wolfssl.com]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:9: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:9: -1- AC_SUBST([SHELL]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([SHELL]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:9: -1- AC_SUBST([PATH_SEPARATOR]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_NAME]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_STRING]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:9: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([PACKAGE_URL]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:9: -1- AC_SUBST([exec_prefix], [NONE]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([exec_prefix]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:9: -1- AC_SUBST([prefix], [NONE]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([prefix]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:9: -1- AC_SUBST([program_transform_name], [s,x,x,]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([program_transform_name]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:9: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([bindir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:9: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sbindir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:9: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([libexecdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([datarootdir], ['${prefix}/share']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([datarootdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([datadir], ['${datarootdir}']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([datadir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:9: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sysconfdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([sharedstatedir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:9: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([localstatedir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:9: -1- AC_SUBST([includedir], ['${prefix}/include']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([includedir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:9: -1- AC_SUBST([oldincludedir], ['/usr/include']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([oldincludedir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:9: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([docdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([infodir], ['${datarootdir}/info']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([infodir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:9: -1- AC_SUBST([htmldir], ['${docdir}']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([htmldir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:9: -1- AC_SUBST([dvidir], ['${docdir}']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([dvidir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:9: -1- AC_SUBST([pdfdir], ['${docdir}']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([pdfdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([psdir], ['${docdir}']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([psdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([libdir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:9: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([localedir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:9: -1- AC_SUBST([mandir], ['${datarootdir}/man']) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([mandir]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -@%:@undef PACKAGE_NAME]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -@%:@undef PACKAGE_TARNAME]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -@%:@undef PACKAGE_VERSION]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -@%:@undef PACKAGE_STRING]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -@%:@undef PACKAGE_BUGREPORT]) -m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:9: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ -@%:@undef PACKAGE_URL]) -m4trace:configure.ac:9: -1- AC_SUBST([DEFS]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DEFS]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:9: -1- AC_SUBST([ECHO_C]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_C]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:9: -1- AC_SUBST([ECHO_N]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_N]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:9: -1- AC_SUBST([ECHO_T]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ECHO_T]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:9: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:9: -1- AC_SUBST([build_alias]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build_alias]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:9: -1- AC_SUBST([host_alias]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host_alias]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:9: -1- AC_SUBST([target_alias]) -m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target_alias]) -m4trace:configure.ac:9: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:11: -1- AC_CONFIG_AUX_DIR([build-aux]) -m4trace:configure.ac:13: -1- AC_CANONICAL_HOST -m4trace:configure.ac:13: -1- AC_CANONICAL_BUILD -m4trace:configure.ac:13: -1- AC_REQUIRE_AUX_FILE([config.sub]) -m4trace:configure.ac:13: -1- AC_REQUIRE_AUX_FILE([config.guess]) -m4trace:configure.ac:13: -1- AC_SUBST([build], [$ac_cv_build]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^build$]) -m4trace:configure.ac:13: -1- AC_SUBST([build_cpu], [$[1]]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_cpu]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^build_cpu$]) -m4trace:configure.ac:13: -1- AC_SUBST([build_vendor], [$[2]]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_vendor]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^build_vendor$]) -m4trace:configure.ac:13: -1- AC_SUBST([build_os]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([build_os]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^build_os$]) -m4trace:configure.ac:13: -1- AC_SUBST([host], [$ac_cv_host]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^host$]) -m4trace:configure.ac:13: -1- AC_SUBST([host_cpu], [$[1]]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_cpu]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^host_cpu$]) -m4trace:configure.ac:13: -1- AC_SUBST([host_vendor], [$[2]]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_vendor]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^host_vendor$]) -m4trace:configure.ac:13: -1- AC_SUBST([host_os]) -m4trace:configure.ac:13: -1- AC_SUBST_TRACE([host_os]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^host_os$]) -m4trace:configure.ac:14: -1- AC_CANONICAL_BUILD -m4trace:configure.ac:16: -1- AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:16: -1- AM_AUTOMAKE_VERSION([1.14.1]) -m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_PROGRAM]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) -m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_SCRIPT]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) -m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_DATA]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_DATA]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_DATA$]) -m4trace:configure.ac:16: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__isrc]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^am__isrc$]) -m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([am__isrc]) -m4trace:configure.ac:16: -1- AC_SUBST([CYGPATH_W]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CYGPATH_W]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^CYGPATH_W$]) -m4trace:configure.ac:16: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([PACKAGE]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:16: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([VERSION]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([missing]) -m4trace:configure.ac:16: -1- AC_SUBST([ACLOCAL]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ACLOCAL]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^ACLOCAL$]) -m4trace:configure.ac:16: -1- AC_SUBST([AUTOCONF]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOCONF]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOCONF$]) -m4trace:configure.ac:16: -1- AC_SUBST([AUTOMAKE]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOMAKE]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOMAKE$]) -m4trace:configure.ac:16: -1- AC_SUBST([AUTOHEADER]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOHEADER]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOHEADER$]) -m4trace:configure.ac:16: -1- AC_SUBST([MAKEINFO]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MAKEINFO]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^MAKEINFO$]) -m4trace:configure.ac:16: -1- AC_SUBST([install_sh]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([install_sh]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^install_sh$]) -m4trace:configure.ac:16: -1- AC_SUBST([STRIP]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) -m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:16: -1- AC_SUBST([MKDIR_P]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^MKDIR_P$]) -m4trace:configure.ac:16: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([mkdir_p]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^mkdir_p$]) -m4trace:configure.ac:16: -1- AC_SUBST([AWK]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AWK]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:16: -1- AC_SUBST([SET_MAKE]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SET_MAKE]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:16: -1- AC_SUBST([am__leading_dot]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__leading_dot]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^am__leading_dot$]) -m4trace:configure.ac:16: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AMTAR]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AMTAR$]) -m4trace:configure.ac:16: -1- AC_SUBST([am__tar]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__tar]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^am__tar$]) -m4trace:configure.ac:16: -1- AC_SUBST([am__untar]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__untar]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^am__untar$]) -m4trace:configure.ac:16: -1- AM_SILENT_RULES -m4trace:configure.ac:16: -1- AC_SUBST([AM_V]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_V]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:16: -1- AC_SUBST([AM_DEFAULT_V]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:16: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:16: -1- AC_SUBST([AM_BACKSLASH]) -m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AM_BACKSLASH]) -m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:31: -1- AC_CONFIG_HEADERS([config.h:config.in]) -m4trace:configure.ac:46: -1- AC_SUBST([CYASSL_LIBRARY_VERSION]) -m4trace:configure.ac:46: -1- AC_SUBST_TRACE([CYASSL_LIBRARY_VERSION]) -m4trace:configure.ac:46: -1- m4_pattern_allow([^CYASSL_LIBRARY_VERSION$]) -m4trace:configure.ac:53: -1- LT_INIT([disable-static], [win32-dll]) -m4trace:configure.ac:53: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) -m4trace:configure.ac:53: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) -m4trace:configure.ac:53: -1- AC_SUBST([LIBTOOL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIBTOOL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LIBTOOL$]) -m4trace:configure.ac:53: -1- AC_SUBST([CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([CFLAGS]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:53: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:53: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:53: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:53: -1- AC_SUBST([CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:53: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([EXEEXT]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:53: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJEXT]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:53: -1- AC_REQUIRE_AUX_FILE([compile]) -m4trace:configure.ac:53: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DEPDIR]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DEPDIR$]) -m4trace:configure.ac:53: -1- AC_SUBST([am__include]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__include]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^am__include$]) -m4trace:configure.ac:53: -1- AC_SUBST([am__quote]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__quote]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^am__quote$]) -m4trace:configure.ac:53: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -m4trace:configure.ac:53: -1- AC_SUBST([AMDEP_TRUE]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEP_TRUE]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEP_TRUE$]) -m4trace:configure.ac:53: -1- AC_SUBST([AMDEP_FALSE]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEP_FALSE]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEP_FALSE$]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) -m4trace:configure.ac:53: -1- AC_SUBST([AMDEPBACKSLASH]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) -m4trace:configure.ac:53: -1- AC_SUBST([am__nodep]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__nodep]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^am__nodep$]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__nodep]) -m4trace:configure.ac:53: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CCDEPMODE]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CCDEPMODE$]) -m4trace:configure.ac:53: -1- AM_CONDITIONAL([am__fastdepCC], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:53: -1- AC_SUBST([am__fastdepCC_TRUE]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) -m4trace:configure.ac:53: -1- AC_SUBST([am__fastdepCC_FALSE]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) -m4trace:configure.ac:53: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) -m4trace:configure.ac:53: -1- AC_SUBST([SED]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([SED]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^SED$]) -m4trace:configure.ac:53: -1- AC_SUBST([GREP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:53: -1- AC_SUBST([EGREP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([EGREP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.ac:53: -1- AC_SUBST([FGREP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([FGREP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^FGREP$]) -m4trace:configure.ac:53: -1- AC_SUBST([GREP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:53: -1- AC_SUBST([LD]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:53: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_DUMPBIN]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.ac:53: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:53: -1- AC_SUBST([NM]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([NM]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^NM$]) -m4trace:configure.ac:53: -1- AC_SUBST([LN_S], [$as_ln_s]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LN_S]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.ac:53: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:53: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:53: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:53: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:53: -1- AC_SUBST([AR]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([AR]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^AR$]) -m4trace:configure.ac:53: -1- AC_SUBST([ac_ct_AR]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([ac_ct_AR]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^ac_ct_AR$]) -m4trace:configure.ac:53: -1- AC_SUBST([STRIP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:53: -1- AC_SUBST([RANLIB]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([RANLIB]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.ac:53: -1- m4_pattern_allow([LT_OBJDIR]) -m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LT_OBJDIR$]) -m4trace:configure.ac:53: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -@%:@undef LT_OBJDIR]) -m4trace:configure.ac:53: -1- LT_SUPPORTED_TAG([CC]) -m4trace:configure.ac:53: -1- AC_SUBST([MANIFEST_TOOL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([MANIFEST_TOOL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^MANIFEST_TOOL$]) -m4trace:configure.ac:53: -1- AC_SUBST([DSYMUTIL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([DSYMUTIL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^DSYMUTIL$]) -m4trace:configure.ac:53: -1- AC_SUBST([NMEDIT]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([NMEDIT]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^NMEDIT$]) -m4trace:configure.ac:53: -1- AC_SUBST([LIPO]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([LIPO]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LIPO$]) -m4trace:configure.ac:53: -1- AC_SUBST([OTOOL]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OTOOL]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^OTOOL$]) -m4trace:configure.ac:53: -1- AC_SUBST([OTOOL64]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([OTOOL64]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^OTOOL64$]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_DLFCN_H]) -m4trace:configure.ac:53: -1- AC_SUBST([CPP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:53: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:53: -1- AC_SUBST([CPP]) -m4trace:configure.ac:53: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:53: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -@%:@undef STDC_HEADERS]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_TYPES_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_STAT_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STRING_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_MEMORY_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STRINGS_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_INTTYPES_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDINT_H]) -m4trace:configure.ac:53: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:53: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.ac:54: -1- LT_SUPPORTED_TAG([CXX]) -m4trace:configure.ac:54: -1- AC_SUBST([CXX]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:54: -1- AC_SUBST([CXXFLAGS]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXFLAGS]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.ac:54: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:54: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:54: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:54: -1- AC_SUBST([CXX]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:54: -1- AC_SUBST([ac_ct_CXX]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([ac_ct_CXX]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.ac:54: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXDEPMODE]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXDEPMODE$]) -m4trace:configure.ac:54: -1- AM_CONDITIONAL([am__fastdepCXX], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:54: -1- AC_SUBST([am__fastdepCXX_TRUE]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) -m4trace:configure.ac:54: -1- AC_SUBST([am__fastdepCXX_FALSE]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) -m4trace:configure.ac:54: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) -m4trace:configure.ac:54: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) -m4trace:configure.ac:54: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:54: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:54: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:54: -1- AC_SUBST([LD]) -m4trace:configure.ac:54: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.ac:54: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:57: -1- AC_SUBST([CFLAG_VISIBILITY]) -m4trace:configure.ac:57: -1- AC_SUBST_TRACE([CFLAG_VISIBILITY]) -m4trace:configure.ac:57: -1- m4_pattern_allow([^CFLAG_VISIBILITY$]) -m4trace:configure.ac:57: -1- AC_SUBST([HAVE_VISIBILITY]) -m4trace:configure.ac:57: -1- AC_SUBST_TRACE([HAVE_VISIBILITY]) -m4trace:configure.ac:57: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) -m4trace:configure.ac:57: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VISIBILITY]) -m4trace:configure.ac:57: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) -m4trace:configure.ac:57: -1- AH_OUTPUT([HAVE_VISIBILITY], [/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -@%:@undef HAVE_VISIBILITY]) -m4trace:configure.ac:63: -1- AM_SILENT_RULES([yes]) -m4trace:configure.ac:63: -1- AC_SUBST([AM_V]) -m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_V]) -m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:63: -1- AC_SUBST([AM_DEFAULT_V]) -m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) -m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:63: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:63: -1- AC_SUBST([AM_BACKSLASH]) -m4trace:configure.ac:63: -1- AC_SUBST_TRACE([AM_BACKSLASH]) -m4trace:configure.ac:63: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:63: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:65: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ -@%:@undef HAVE_GETHOSTBYNAME]) -m4trace:configure.ac:65: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME$]) -m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Define to 1 if you have the `getaddrinfo\' function. */ -@%:@undef HAVE_GETADDRINFO]) -m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) -m4trace:configure.ac:66: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) -m4trace:configure.ac:67: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ -@%:@undef HAVE_GETTIMEOFDAY]) -m4trace:configure.ac:67: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTIMEOFDAY]) -m4trace:configure.ac:67: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY$]) -m4trace:configure.ac:68: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */ -@%:@undef HAVE_INET_NTOA]) -m4trace:configure.ac:68: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOA]) -m4trace:configure.ac:68: -1- m4_pattern_allow([^HAVE_INET_NTOA$]) -m4trace:configure.ac:69: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ -@%:@undef HAVE_MEMSET]) -m4trace:configure.ac:69: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMSET]) -m4trace:configure.ac:69: -1- m4_pattern_allow([^HAVE_MEMSET$]) -m4trace:configure.ac:70: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ -@%:@undef HAVE_SOCKET]) -m4trace:configure.ac:70: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKET]) -m4trace:configure.ac:70: -1- m4_pattern_allow([^HAVE_SOCKET$]) -m4trace:configure.ac:71: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_ARPA_INET_H]) -m4trace:configure.ac:71: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ARPA_INET_H]) -m4trace:configure.ac:71: -1- m4_pattern_allow([^HAVE_ARPA_INET_H$]) -m4trace:configure.ac:72: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_FCNTL_H]) -m4trace:configure.ac:72: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FCNTL_H]) -m4trace:configure.ac:72: -1- m4_pattern_allow([^HAVE_FCNTL_H$]) -m4trace:configure.ac:73: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_LIMITS_H]) -m4trace:configure.ac:73: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMITS_H]) -m4trace:configure.ac:73: -1- m4_pattern_allow([^HAVE_LIMITS_H$]) -m4trace:configure.ac:74: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_NETDB_H]) -m4trace:configure.ac:74: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETDB_H]) -m4trace:configure.ac:74: -1- m4_pattern_allow([^HAVE_NETDB_H$]) -m4trace:configure.ac:75: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_NETINET_IN_H]) -m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETINET_IN_H]) -m4trace:configure.ac:75: -1- m4_pattern_allow([^HAVE_NETINET_IN_H$]) -m4trace:configure.ac:76: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDDEF_H]) -m4trace:configure.ac:76: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDDEF_H]) -m4trace:configure.ac:76: -1- m4_pattern_allow([^HAVE_STDDEF_H$]) -m4trace:configure.ac:77: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_IOCTL_H]) -m4trace:configure.ac:77: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_IOCTL_H]) -m4trace:configure.ac:77: -1- m4_pattern_allow([^HAVE_SYS_IOCTL_H$]) -m4trace:configure.ac:78: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_SOCKET_H]) -m4trace:configure.ac:78: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SOCKET_H]) -m4trace:configure.ac:78: -1- m4_pattern_allow([^HAVE_SYS_SOCKET_H$]) -m4trace:configure.ac:79: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_TIME_H]) -m4trace:configure.ac:79: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIME_H]) -m4trace:configure.ac:79: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$]) -m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_ERRNO_H]) -m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ERRNO_H]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ERRNO_H$]) -m4trace:configure.ac:81: -1- AH_OUTPUT([HAVE_LIBNETWORK], [/* Define to 1 if you have the `network\' library (-lnetwork). */ -@%:@undef HAVE_LIBNETWORK]) -m4trace:configure.ac:81: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNETWORK]) -m4trace:configure.ac:81: -1- m4_pattern_allow([^HAVE_LIBNETWORK$]) -m4trace:configure.ac:82: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^SIZEOF_LONG_LONG$]) -m4trace:configure.ac:82: -1- AH_OUTPUT([SIZEOF_LONG_LONG], [/* The size of `long long\', as computed by sizeof. */ -@%:@undef SIZEOF_LONG_LONG]) -m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG]) -m4trace:configure.ac:83: -1- m4_pattern_allow([^SIZEOF_LONG$]) -m4trace:configure.ac:83: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */ -@%:@undef SIZEOF_LONG]) -m4trace:configure.ac:84: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif]) -m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN]) -m4trace:configure.ac:84: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) -m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.ac:84: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) -m4trace:configure.ac:84: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ -@%:@undef AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.ac:89: -1- AC_SUBST([CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:89: -1- AC_SUBST([CFLAGS]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:89: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:89: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:89: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:89: -1- AC_SUBST([CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:89: -1- AC_SUBST([CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:89: -1- AC_SUBST([CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:89: -1- AC_SUBST([CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:89: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:89: -1- AC_REQUIRE_AUX_FILE([compile]) -m4trace:configure.ac:89: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([CCDEPMODE]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^CCDEPMODE$]) -m4trace:configure.ac:89: -1- AM_CONDITIONAL([am__fastdepCC], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:89: -1- AC_SUBST([am__fastdepCC_TRUE]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) -m4trace:configure.ac:89: -1- AC_SUBST([am__fastdepCC_FALSE]) -m4trace:configure.ac:89: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) -m4trace:configure.ac:89: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) -m4trace:configure.ac:89: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) -m4trace:configure.ac:89: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) -m4trace:configure.ac:90: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O]) -m4trace:configure.ac:90: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) -m4trace:configure.ac:90: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */ -@%:@undef NO_MINUS_C_MINUS_O]) -m4trace:configure.ac:91: -1- AC_SUBST([CXX]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:91: -1- AC_SUBST([CXXFLAGS]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXXFLAGS]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.ac:91: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:91: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:91: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:91: -1- AC_SUBST([CXX]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:91: -1- AC_SUBST([ac_ct_CXX]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([ac_ct_CXX]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.ac:91: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([CXXDEPMODE]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^CXXDEPMODE$]) -m4trace:configure.ac:91: -1- AM_CONDITIONAL([am__fastdepCXX], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:91: -1- AC_SUBST([am__fastdepCXX_TRUE]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) -m4trace:configure.ac:91: -1- AC_SUBST([am__fastdepCXX_FALSE]) -m4trace:configure.ac:91: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) -m4trace:configure.ac:91: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) -m4trace:configure.ac:91: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) -m4trace:configure.ac:91: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) -m4trace:configure.ac:93: -1- AC_DEFINE_TRACE_LITERAL([size_t]) -m4trace:configure.ac:93: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:93: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ -@%:@undef size_t]) -m4trace:configure.ac:94: -1- AC_DEFINE_TRACE_LITERAL([_UINT8_T]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^_UINT8_T$]) -m4trace:configure.ac:94: -1- AH_OUTPUT([_UINT8_T], [/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - @%:@define below would cause a syntax error. */ -@%:@undef _UINT8_T]) -m4trace:configure.ac:94: -1- AC_DEFINE_TRACE_LITERAL([uint8_t]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^uint8_t$]) -m4trace:configure.ac:94: -1- AH_OUTPUT([uint8_t], [/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -@%:@undef uint8_t]) -m4trace:configure.ac:95: -1- AC_SUBST([CCAS]) -m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCAS]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^CCAS$]) -m4trace:configure.ac:95: -1- AC_SUBST([CCASFLAGS]) -m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCASFLAGS]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^CCASFLAGS$]) -m4trace:configure.ac:95: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type]) -m4trace:configure.ac:95: -1- AC_SUBST_TRACE([CCASDEPMODE]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^CCASDEPMODE$]) -m4trace:configure.ac:95: -1- AM_CONDITIONAL([am__fastdepCCAS], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:95: -1- AC_SUBST([am__fastdepCCAS_TRUE]) -m4trace:configure.ac:95: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) -m4trace:configure.ac:95: -1- AC_SUBST([am__fastdepCCAS_FALSE]) -m4trace:configure.ac:95: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) -m4trace:configure.ac:95: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) -m4trace:configure.ac:95: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) -m4trace:configure.ac:96: -1- AM_PROG_CC_C_O -m4trace:configure.ac:97: -1- AC_SUBST([LIBM]) -m4trace:configure.ac:97: -1- AC_SUBST_TRACE([LIBM]) -m4trace:configure.ac:97: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.ac:106: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:550: AS_CASE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -m4/ax_tls.m4:65: AX_TLS is expanded from... -configure.ac:106: the top level]) -m4trace:configure.ac:106: -2- AC_DEFINE_TRACE_LITERAL([TLS]) -m4trace:configure.ac:106: -2- m4_pattern_allow([^TLS$]) -m4trace:configure.ac:106: -2- AH_OUTPUT([TLS], [/* If the compiler supports a TLS storage class define it to that here */ -@%:@undef TLS]) -m4trace:configure.ac:113: -1- AC_DEFINE_TRACE_LITERAL([DEBUG]) -m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG$]) -m4trace:configure.ac:113: -1- AH_OUTPUT([DEBUG], [/* Define to 1 to enable debugging code. */ -@%:@undef DEBUG]) -m4trace:configure.ac:113: -1- AC_SUBST([MCHECK]) -m4trace:configure.ac:113: -1- AC_SUBST_TRACE([MCHECK]) -m4trace:configure.ac:113: -1- m4_pattern_allow([^MCHECK$]) -m4trace:configure.ac:113: -1- AC_DEFINE_TRACE_LITERAL([DEBUG]) -m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG$]) -m4trace:configure.ac:113: -1- AH_OUTPUT([DEBUG], [/* Define to 1 to enable debugging code. */ -@%:@undef DEBUG]) -m4trace:configure.ac:113: -1- AM_CONDITIONAL([DEBUG], [test "x${ax_enable_debug}" = "xyes"]) -m4trace:configure.ac:113: -1- AC_SUBST([DEBUG_TRUE]) -m4trace:configure.ac:113: -1- AC_SUBST_TRACE([DEBUG_TRUE]) -m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG_TRUE$]) -m4trace:configure.ac:113: -1- AC_SUBST([DEBUG_FALSE]) -m4trace:configure.ac:113: -1- AC_SUBST_TRACE([DEBUG_FALSE]) -m4trace:configure.ac:113: -1- m4_pattern_allow([^DEBUG_FALSE$]) -m4trace:configure.ac:113: -1- _AM_SUBST_NOTMAKE([DEBUG_TRUE]) -m4trace:configure.ac:113: -1- _AM_SUBST_NOTMAKE([DEBUG_FALSE]) -m4trace:configure.ac:125: -1- AC_SUBST([ax_pthread_config]) -m4trace:configure.ac:125: -1- AC_SUBST_TRACE([ax_pthread_config]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^ax_pthread_config$]) -m4trace:configure.ac:125: -1- AC_DEFINE_TRACE_LITERAL([PTHREAD_CREATE_JOINABLE]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CREATE_JOINABLE$]) -m4trace:configure.ac:125: -1- AH_OUTPUT([PTHREAD_CREATE_JOINABLE], [/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -@%:@undef PTHREAD_CREATE_JOINABLE]) -m4trace:configure.ac:125: -2- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_PRIO_INHERIT]) -m4trace:configure.ac:125: -2- m4_pattern_allow([^HAVE_PTHREAD_PRIO_INHERIT$]) -m4trace:configure.ac:125: -2- AH_OUTPUT([HAVE_PTHREAD_PRIO_INHERIT], [/* Have PTHREAD_PRIO_INHERIT. */ -@%:@undef HAVE_PTHREAD_PRIO_INHERIT]) -m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CC]) -m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CC]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CC$]) -m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_LIBS]) -m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_LIBS]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_LIBS$]) -m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CFLAGS]) -m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CFLAGS]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CFLAGS$]) -m4trace:configure.ac:125: -1- AC_SUBST([PTHREAD_CC]) -m4trace:configure.ac:125: -1- AC_SUBST_TRACE([PTHREAD_CC]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^PTHREAD_CC$]) -m4trace:configure.ac:125: -2- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD]) -m4trace:configure.ac:125: -2- m4_pattern_allow([^HAVE_PTHREAD$]) -m4trace:configure.ac:125: -2- AH_OUTPUT([HAVE_PTHREAD], [/* Define if you have POSIX threads libraries and header files. */ -@%:@undef HAVE_PTHREAD]) -m4trace:configure.ac:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_PTHREAD$]) -m4trace:configure.ac:125: -1- AH_OUTPUT([HAVE_PTHREAD], [/* Define if you have POSIX threads libraries and header files. */ -@%:@undef HAVE_PTHREAD]) -m4trace:configure.ac:221: -1- AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"]) -m4trace:configure.ac:221: -1- AC_SUBST([BUILD_LEANPSK_TRUE]) -m4trace:configure.ac:221: -1- AC_SUBST_TRACE([BUILD_LEANPSK_TRUE]) -m4trace:configure.ac:221: -1- m4_pattern_allow([^BUILD_LEANPSK_TRUE$]) -m4trace:configure.ac:221: -1- AC_SUBST([BUILD_LEANPSK_FALSE]) -m4trace:configure.ac:221: -1- AC_SUBST_TRACE([BUILD_LEANPSK_FALSE]) -m4trace:configure.ac:221: -1- m4_pattern_allow([^BUILD_LEANPSK_FALSE$]) -m4trace:configure.ac:221: -1- _AM_SUBST_NOTMAKE([BUILD_LEANPSK_TRUE]) -m4trace:configure.ac:221: -1- _AM_SUBST_NOTMAKE([BUILD_LEANPSK_FALSE]) -m4trace:configure.ac:317: -1- AH_OUTPUT([HAVE_PCAP_PCAP_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_PCAP_PCAP_H]) -m4trace:configure.ac:317: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PCAP_PCAP_H]) -m4trace:configure.ac:317: -1- m4_pattern_allow([^HAVE_PCAP_PCAP_H$]) -m4trace:configure.ac:328: -1- AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" ]) -m4trace:configure.ac:328: -1- AC_SUBST([BUILD_SNIFFER_TRUE]) -m4trace:configure.ac:328: -1- AC_SUBST_TRACE([BUILD_SNIFFER_TRUE]) -m4trace:configure.ac:328: -1- m4_pattern_allow([^BUILD_SNIFFER_TRUE$]) -m4trace:configure.ac:328: -1- AC_SUBST([BUILD_SNIFFER_FALSE]) -m4trace:configure.ac:328: -1- AC_SUBST_TRACE([BUILD_SNIFFER_FALSE]) -m4trace:configure.ac:328: -1- m4_pattern_allow([^BUILD_SNIFFER_FALSE$]) -m4trace:configure.ac:328: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFER_TRUE]) -m4trace:configure.ac:328: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFER_FALSE]) -m4trace:configure.ac:329: -1- AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ]) -m4trace:configure.ac:329: -1- AC_SUBST([BUILD_SNIFFTEST_TRUE]) -m4trace:configure.ac:329: -1- AC_SUBST_TRACE([BUILD_SNIFFTEST_TRUE]) -m4trace:configure.ac:329: -1- m4_pattern_allow([^BUILD_SNIFFTEST_TRUE$]) -m4trace:configure.ac:329: -1- AC_SUBST([BUILD_SNIFFTEST_FALSE]) -m4trace:configure.ac:329: -1- AC_SUBST_TRACE([BUILD_SNIFFTEST_FALSE]) -m4trace:configure.ac:329: -1- m4_pattern_allow([^BUILD_SNIFFTEST_FALSE$]) -m4trace:configure.ac:329: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFTEST_TRUE]) -m4trace:configure.ac:329: -1- _AM_SUBST_NOTMAKE([BUILD_SNIFFTEST_FALSE]) -m4trace:configure.ac:361: -1- AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"]) -m4trace:configure.ac:361: -1- AC_SUBST([BUILD_AESGCM_TRUE]) -m4trace:configure.ac:361: -1- AC_SUBST_TRACE([BUILD_AESGCM_TRUE]) -m4trace:configure.ac:361: -1- m4_pattern_allow([^BUILD_AESGCM_TRUE$]) -m4trace:configure.ac:361: -1- AC_SUBST([BUILD_AESGCM_FALSE]) -m4trace:configure.ac:361: -1- AC_SUBST_TRACE([BUILD_AESGCM_FALSE]) -m4trace:configure.ac:361: -1- m4_pattern_allow([^BUILD_AESGCM_FALSE$]) -m4trace:configure.ac:361: -1- _AM_SUBST_NOTMAKE([BUILD_AESGCM_TRUE]) -m4trace:configure.ac:361: -1- _AM_SUBST_NOTMAKE([BUILD_AESGCM_FALSE]) -m4trace:configure.ac:376: -1- AM_CONDITIONAL([BUILD_AESCCM], [test "x$ENABLED_AESCCM" = "xyes"]) -m4trace:configure.ac:376: -1- AC_SUBST([BUILD_AESCCM_TRUE]) -m4trace:configure.ac:376: -1- AC_SUBST_TRACE([BUILD_AESCCM_TRUE]) -m4trace:configure.ac:376: -1- m4_pattern_allow([^BUILD_AESCCM_TRUE$]) -m4trace:configure.ac:376: -1- AC_SUBST([BUILD_AESCCM_FALSE]) -m4trace:configure.ac:376: -1- AC_SUBST_TRACE([BUILD_AESCCM_FALSE]) -m4trace:configure.ac:376: -1- m4_pattern_allow([^BUILD_AESCCM_FALSE$]) -m4trace:configure.ac:376: -1- _AM_SUBST_NOTMAKE([BUILD_AESCCM_TRUE]) -m4trace:configure.ac:376: -1- _AM_SUBST_NOTMAKE([BUILD_AESCCM_FALSE]) -m4trace:configure.ac:397: -1- AM_CONDITIONAL([BUILD_AESNI], [test "x$ENABLED_AESNI" = "xyes"]) -m4trace:configure.ac:397: -1- AC_SUBST([BUILD_AESNI_TRUE]) -m4trace:configure.ac:397: -1- AC_SUBST_TRACE([BUILD_AESNI_TRUE]) -m4trace:configure.ac:397: -1- m4_pattern_allow([^BUILD_AESNI_TRUE$]) -m4trace:configure.ac:397: -1- AC_SUBST([BUILD_AESNI_FALSE]) -m4trace:configure.ac:397: -1- AC_SUBST_TRACE([BUILD_AESNI_FALSE]) -m4trace:configure.ac:397: -1- m4_pattern_allow([^BUILD_AESNI_FALSE$]) -m4trace:configure.ac:397: -1- _AM_SUBST_NOTMAKE([BUILD_AESNI_TRUE]) -m4trace:configure.ac:397: -1- _AM_SUBST_NOTMAKE([BUILD_AESNI_FALSE]) -m4trace:configure.ac:412: -1- AM_CONDITIONAL([BUILD_CAMELLIA], [test "x$ENABLED_CAMELLIA" = "xyes"]) -m4trace:configure.ac:412: -1- AC_SUBST([BUILD_CAMELLIA_TRUE]) -m4trace:configure.ac:412: -1- AC_SUBST_TRACE([BUILD_CAMELLIA_TRUE]) -m4trace:configure.ac:412: -1- m4_pattern_allow([^BUILD_CAMELLIA_TRUE$]) -m4trace:configure.ac:412: -1- AC_SUBST([BUILD_CAMELLIA_FALSE]) -m4trace:configure.ac:412: -1- AC_SUBST_TRACE([BUILD_CAMELLIA_FALSE]) -m4trace:configure.ac:412: -1- m4_pattern_allow([^BUILD_CAMELLIA_FALSE$]) -m4trace:configure.ac:412: -1- _AM_SUBST_NOTMAKE([BUILD_CAMELLIA_TRUE]) -m4trace:configure.ac:412: -1- _AM_SUBST_NOTMAKE([BUILD_CAMELLIA_FALSE]) -m4trace:configure.ac:432: -1- AM_CONDITIONAL([BUILD_MD2], [test "x$ENABLED_MD2" = "xyes"]) -m4trace:configure.ac:432: -1- AC_SUBST([BUILD_MD2_TRUE]) -m4trace:configure.ac:432: -1- AC_SUBST_TRACE([BUILD_MD2_TRUE]) -m4trace:configure.ac:432: -1- m4_pattern_allow([^BUILD_MD2_TRUE$]) -m4trace:configure.ac:432: -1- AC_SUBST([BUILD_MD2_FALSE]) -m4trace:configure.ac:432: -1- AC_SUBST_TRACE([BUILD_MD2_FALSE]) -m4trace:configure.ac:432: -1- m4_pattern_allow([^BUILD_MD2_FALSE$]) -m4trace:configure.ac:432: -1- _AM_SUBST_NOTMAKE([BUILD_MD2_TRUE]) -m4trace:configure.ac:432: -1- _AM_SUBST_NOTMAKE([BUILD_MD2_FALSE]) -m4trace:configure.ac:459: -1- AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"]) -m4trace:configure.ac:459: -1- AC_SUBST([BUILD_RIPEMD_TRUE]) -m4trace:configure.ac:459: -1- AC_SUBST_TRACE([BUILD_RIPEMD_TRUE]) -m4trace:configure.ac:459: -1- m4_pattern_allow([^BUILD_RIPEMD_TRUE$]) -m4trace:configure.ac:459: -1- AC_SUBST([BUILD_RIPEMD_FALSE]) -m4trace:configure.ac:459: -1- AC_SUBST_TRACE([BUILD_RIPEMD_FALSE]) -m4trace:configure.ac:459: -1- m4_pattern_allow([^BUILD_RIPEMD_FALSE$]) -m4trace:configure.ac:459: -1- _AM_SUBST_NOTMAKE([BUILD_RIPEMD_TRUE]) -m4trace:configure.ac:459: -1- _AM_SUBST_NOTMAKE([BUILD_RIPEMD_FALSE]) -m4trace:configure.ac:474: -1- AM_CONDITIONAL([BUILD_BLAKE2], [test "x$ENABLED_BLAKE2" = "xyes"]) -m4trace:configure.ac:474: -1- AC_SUBST([BUILD_BLAKE2_TRUE]) -m4trace:configure.ac:474: -1- AC_SUBST_TRACE([BUILD_BLAKE2_TRUE]) -m4trace:configure.ac:474: -1- m4_pattern_allow([^BUILD_BLAKE2_TRUE$]) -m4trace:configure.ac:474: -1- AC_SUBST([BUILD_BLAKE2_FALSE]) -m4trace:configure.ac:474: -1- AC_SUBST_TRACE([BUILD_BLAKE2_FALSE]) -m4trace:configure.ac:474: -1- m4_pattern_allow([^BUILD_BLAKE2_FALSE$]) -m4trace:configure.ac:474: -1- _AM_SUBST_NOTMAKE([BUILD_BLAKE2_TRUE]) -m4trace:configure.ac:474: -1- _AM_SUBST_NOTMAKE([BUILD_BLAKE2_FALSE]) -m4trace:configure.ac:495: -1- AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) -m4trace:configure.ac:495: -1- AC_SUBST([BUILD_SHA512_TRUE]) -m4trace:configure.ac:495: -1- AC_SUBST_TRACE([BUILD_SHA512_TRUE]) -m4trace:configure.ac:495: -1- m4_pattern_allow([^BUILD_SHA512_TRUE$]) -m4trace:configure.ac:495: -1- AC_SUBST([BUILD_SHA512_FALSE]) -m4trace:configure.ac:495: -1- AC_SUBST_TRACE([BUILD_SHA512_FALSE]) -m4trace:configure.ac:495: -1- m4_pattern_allow([^BUILD_SHA512_FALSE$]) -m4trace:configure.ac:495: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_TRUE]) -m4trace:configure.ac:495: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_FALSE]) -m4trace:configure.ac:590: -1- AM_CONDITIONAL([BUILD_DSA], [test "x$ENABLED_DSA" = "xyes"]) -m4trace:configure.ac:590: -1- AC_SUBST([BUILD_DSA_TRUE]) -m4trace:configure.ac:590: -1- AC_SUBST_TRACE([BUILD_DSA_TRUE]) -m4trace:configure.ac:590: -1- m4_pattern_allow([^BUILD_DSA_TRUE$]) -m4trace:configure.ac:590: -1- AC_SUBST([BUILD_DSA_FALSE]) -m4trace:configure.ac:590: -1- AC_SUBST_TRACE([BUILD_DSA_FALSE]) -m4trace:configure.ac:590: -1- m4_pattern_allow([^BUILD_DSA_FALSE$]) -m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([BUILD_DSA_TRUE]) -m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([BUILD_DSA_FALSE]) -m4trace:configure.ac:605: -1- AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) -m4trace:configure.ac:605: -1- AC_SUBST([BUILD_ECC_TRUE]) -m4trace:configure.ac:605: -1- AC_SUBST_TRACE([BUILD_ECC_TRUE]) -m4trace:configure.ac:605: -1- m4_pattern_allow([^BUILD_ECC_TRUE$]) -m4trace:configure.ac:605: -1- AC_SUBST([BUILD_ECC_FALSE]) -m4trace:configure.ac:605: -1- AC_SUBST_TRACE([BUILD_ECC_FALSE]) -m4trace:configure.ac:605: -1- m4_pattern_allow([^BUILD_ECC_FALSE$]) -m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_TRUE]) -m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_FALSE]) -m4trace:configure.ac:720: -2- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ -@%:@undef HAVE_LIBPTHREAD]) -m4trace:configure.ac:720: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) -m4trace:configure.ac:720: -2- m4_pattern_allow([^HAVE_LIBPTHREAD$]) -m4trace:configure.ac:744: -1- AM_CONDITIONAL([BUILD_MEMORY], [test "x$ENABLED_MEMORY" = "xyes"]) -m4trace:configure.ac:744: -1- AC_SUBST([BUILD_MEMORY_TRUE]) -m4trace:configure.ac:744: -1- AC_SUBST_TRACE([BUILD_MEMORY_TRUE]) -m4trace:configure.ac:744: -1- m4_pattern_allow([^BUILD_MEMORY_TRUE$]) -m4trace:configure.ac:744: -1- AC_SUBST([BUILD_MEMORY_FALSE]) -m4trace:configure.ac:744: -1- AC_SUBST_TRACE([BUILD_MEMORY_FALSE]) -m4trace:configure.ac:744: -1- m4_pattern_allow([^BUILD_MEMORY_FALSE$]) -m4trace:configure.ac:744: -1- _AM_SUBST_NOTMAKE([BUILD_MEMORY_TRUE]) -m4trace:configure.ac:744: -1- _AM_SUBST_NOTMAKE([BUILD_MEMORY_FALSE]) -m4trace:configure.ac:766: -1- AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"]) -m4trace:configure.ac:766: -1- AC_SUBST([BUILD_RSA_TRUE]) -m4trace:configure.ac:766: -1- AC_SUBST_TRACE([BUILD_RSA_TRUE]) -m4trace:configure.ac:766: -1- m4_pattern_allow([^BUILD_RSA_TRUE$]) -m4trace:configure.ac:766: -1- AC_SUBST([BUILD_RSA_FALSE]) -m4trace:configure.ac:766: -1- AC_SUBST_TRACE([BUILD_RSA_FALSE]) -m4trace:configure.ac:766: -1- m4_pattern_allow([^BUILD_RSA_FALSE$]) -m4trace:configure.ac:766: -1- _AM_SUBST_NOTMAKE([BUILD_RSA_TRUE]) -m4trace:configure.ac:766: -1- _AM_SUBST_NOTMAKE([BUILD_RSA_FALSE]) -m4trace:configure.ac:788: -1- AM_CONDITIONAL([BUILD_DH], [test "x$ENABLED_DH" = "xyes"]) -m4trace:configure.ac:788: -1- AC_SUBST([BUILD_DH_TRUE]) -m4trace:configure.ac:788: -1- AC_SUBST_TRACE([BUILD_DH_TRUE]) -m4trace:configure.ac:788: -1- m4_pattern_allow([^BUILD_DH_TRUE$]) -m4trace:configure.ac:788: -1- AC_SUBST([BUILD_DH_FALSE]) -m4trace:configure.ac:788: -1- AC_SUBST_TRACE([BUILD_DH_FALSE]) -m4trace:configure.ac:788: -1- m4_pattern_allow([^BUILD_DH_FALSE$]) -m4trace:configure.ac:788: -1- _AM_SUBST_NOTMAKE([BUILD_DH_TRUE]) -m4trace:configure.ac:788: -1- _AM_SUBST_NOTMAKE([BUILD_DH_FALSE]) -m4trace:configure.ac:843: -1- AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"]) -m4trace:configure.ac:843: -1- AC_SUBST([BUILD_ASN_TRUE]) -m4trace:configure.ac:843: -1- AC_SUBST_TRACE([BUILD_ASN_TRUE]) -m4trace:configure.ac:843: -1- m4_pattern_allow([^BUILD_ASN_TRUE$]) -m4trace:configure.ac:843: -1- AC_SUBST([BUILD_ASN_FALSE]) -m4trace:configure.ac:843: -1- AC_SUBST_TRACE([BUILD_ASN_FALSE]) -m4trace:configure.ac:843: -1- m4_pattern_allow([^BUILD_ASN_FALSE$]) -m4trace:configure.ac:843: -1- _AM_SUBST_NOTMAKE([BUILD_ASN_TRUE]) -m4trace:configure.ac:843: -1- _AM_SUBST_NOTMAKE([BUILD_ASN_FALSE]) -m4trace:configure.ac:865: -1- AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"]) -m4trace:configure.ac:865: -1- AC_SUBST([BUILD_AES_TRUE]) -m4trace:configure.ac:865: -1- AC_SUBST_TRACE([BUILD_AES_TRUE]) -m4trace:configure.ac:865: -1- m4_pattern_allow([^BUILD_AES_TRUE$]) -m4trace:configure.ac:865: -1- AC_SUBST([BUILD_AES_FALSE]) -m4trace:configure.ac:865: -1- AC_SUBST_TRACE([BUILD_AES_FALSE]) -m4trace:configure.ac:865: -1- m4_pattern_allow([^BUILD_AES_FALSE$]) -m4trace:configure.ac:865: -1- _AM_SUBST_NOTMAKE([BUILD_AES_TRUE]) -m4trace:configure.ac:865: -1- _AM_SUBST_NOTMAKE([BUILD_AES_FALSE]) -m4trace:configure.ac:887: -1- AM_CONDITIONAL([BUILD_CODING], [test "x$ENABLED_CODING" = "xyes"]) -m4trace:configure.ac:887: -1- AC_SUBST([BUILD_CODING_TRUE]) -m4trace:configure.ac:887: -1- AC_SUBST_TRACE([BUILD_CODING_TRUE]) -m4trace:configure.ac:887: -1- m4_pattern_allow([^BUILD_CODING_TRUE$]) -m4trace:configure.ac:887: -1- AC_SUBST([BUILD_CODING_FALSE]) -m4trace:configure.ac:887: -1- AC_SUBST_TRACE([BUILD_CODING_FALSE]) -m4trace:configure.ac:887: -1- m4_pattern_allow([^BUILD_CODING_FALSE$]) -m4trace:configure.ac:887: -1- _AM_SUBST_NOTMAKE([BUILD_CODING_TRUE]) -m4trace:configure.ac:887: -1- _AM_SUBST_NOTMAKE([BUILD_CODING_FALSE]) -m4trace:configure.ac:909: -1- AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"]) -m4trace:configure.ac:909: -1- AC_SUBST([BUILD_DES3_TRUE]) -m4trace:configure.ac:909: -1- AC_SUBST_TRACE([BUILD_DES3_TRUE]) -m4trace:configure.ac:909: -1- m4_pattern_allow([^BUILD_DES3_TRUE$]) -m4trace:configure.ac:909: -1- AC_SUBST([BUILD_DES3_FALSE]) -m4trace:configure.ac:909: -1- AC_SUBST_TRACE([BUILD_DES3_FALSE]) -m4trace:configure.ac:909: -1- m4_pattern_allow([^BUILD_DES3_FALSE$]) -m4trace:configure.ac:909: -1- _AM_SUBST_NOTMAKE([BUILD_DES3_TRUE]) -m4trace:configure.ac:909: -1- _AM_SUBST_NOTMAKE([BUILD_DES3_FALSE]) -m4trace:configure.ac:931: -1- AM_CONDITIONAL([BUILD_RC4], [test "x$ENABLED_ARC4" = "xyes"]) -m4trace:configure.ac:931: -1- AC_SUBST([BUILD_RC4_TRUE]) -m4trace:configure.ac:931: -1- AC_SUBST_TRACE([BUILD_RC4_TRUE]) -m4trace:configure.ac:931: -1- m4_pattern_allow([^BUILD_RC4_TRUE$]) -m4trace:configure.ac:931: -1- AC_SUBST([BUILD_RC4_FALSE]) -m4trace:configure.ac:931: -1- AC_SUBST_TRACE([BUILD_RC4_FALSE]) -m4trace:configure.ac:931: -1- m4_pattern_allow([^BUILD_RC4_FALSE$]) -m4trace:configure.ac:931: -1- _AM_SUBST_NOTMAKE([BUILD_RC4_TRUE]) -m4trace:configure.ac:931: -1- _AM_SUBST_NOTMAKE([BUILD_RC4_FALSE]) -m4trace:configure.ac:953: -1- AM_CONDITIONAL([BUILD_MD5], [test "x$ENABLED_MD5" = "xyes"]) -m4trace:configure.ac:953: -1- AC_SUBST([BUILD_MD5_TRUE]) -m4trace:configure.ac:953: -1- AC_SUBST_TRACE([BUILD_MD5_TRUE]) -m4trace:configure.ac:953: -1- m4_pattern_allow([^BUILD_MD5_TRUE$]) -m4trace:configure.ac:953: -1- AC_SUBST([BUILD_MD5_FALSE]) -m4trace:configure.ac:953: -1- AC_SUBST_TRACE([BUILD_MD5_FALSE]) -m4trace:configure.ac:953: -1- m4_pattern_allow([^BUILD_MD5_FALSE$]) -m4trace:configure.ac:953: -1- _AM_SUBST_NOTMAKE([BUILD_MD5_TRUE]) -m4trace:configure.ac:953: -1- _AM_SUBST_NOTMAKE([BUILD_MD5_FALSE]) -m4trace:configure.ac:975: -1- AM_CONDITIONAL([BUILD_SHA], [test "x$ENABLED_SHA" = "xyes"]) -m4trace:configure.ac:975: -1- AC_SUBST([BUILD_SHA_TRUE]) -m4trace:configure.ac:975: -1- AC_SUBST_TRACE([BUILD_SHA_TRUE]) -m4trace:configure.ac:975: -1- m4_pattern_allow([^BUILD_SHA_TRUE$]) -m4trace:configure.ac:975: -1- AC_SUBST([BUILD_SHA_FALSE]) -m4trace:configure.ac:975: -1- AC_SUBST_TRACE([BUILD_SHA_FALSE]) -m4trace:configure.ac:975: -1- m4_pattern_allow([^BUILD_SHA_FALSE$]) -m4trace:configure.ac:975: -1- _AM_SUBST_NOTMAKE([BUILD_SHA_TRUE]) -m4trace:configure.ac:975: -1- _AM_SUBST_NOTMAKE([BUILD_SHA_FALSE]) -m4trace:configure.ac:990: -1- AM_CONDITIONAL([BUILD_MD4], [test "x$ENABLED_MD4" = "xyes"]) -m4trace:configure.ac:990: -1- AC_SUBST([BUILD_MD4_TRUE]) -m4trace:configure.ac:990: -1- AC_SUBST_TRACE([BUILD_MD4_TRUE]) -m4trace:configure.ac:990: -1- m4_pattern_allow([^BUILD_MD4_TRUE$]) -m4trace:configure.ac:990: -1- AC_SUBST([BUILD_MD4_FALSE]) -m4trace:configure.ac:990: -1- AC_SUBST_TRACE([BUILD_MD4_FALSE]) -m4trace:configure.ac:990: -1- m4_pattern_allow([^BUILD_MD4_FALSE$]) -m4trace:configure.ac:990: -1- _AM_SUBST_NOTMAKE([BUILD_MD4_TRUE]) -m4trace:configure.ac:990: -1- _AM_SUBST_NOTMAKE([BUILD_MD4_FALSE]) -m4trace:configure.ac:1024: -1- AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"]) -m4trace:configure.ac:1024: -1- AC_SUBST([BUILD_PWDBASED_TRUE]) -m4trace:configure.ac:1024: -1- AC_SUBST_TRACE([BUILD_PWDBASED_TRUE]) -m4trace:configure.ac:1024: -1- m4_pattern_allow([^BUILD_PWDBASED_TRUE$]) -m4trace:configure.ac:1024: -1- AC_SUBST([BUILD_PWDBASED_FALSE]) -m4trace:configure.ac:1024: -1- AC_SUBST_TRACE([BUILD_PWDBASED_FALSE]) -m4trace:configure.ac:1024: -1- m4_pattern_allow([^BUILD_PWDBASED_FALSE$]) -m4trace:configure.ac:1024: -1- _AM_SUBST_NOTMAKE([BUILD_PWDBASED_TRUE]) -m4trace:configure.ac:1024: -1- _AM_SUBST_NOTMAKE([BUILD_PWDBASED_FALSE]) -m4trace:configure.ac:1041: -1- AM_CONDITIONAL([BUILD_HC128], [test "x$ENABLED_HC128" = "xyes"]) -m4trace:configure.ac:1041: -1- AC_SUBST([BUILD_HC128_TRUE]) -m4trace:configure.ac:1041: -1- AC_SUBST_TRACE([BUILD_HC128_TRUE]) -m4trace:configure.ac:1041: -1- m4_pattern_allow([^BUILD_HC128_TRUE$]) -m4trace:configure.ac:1041: -1- AC_SUBST([BUILD_HC128_FALSE]) -m4trace:configure.ac:1041: -1- AC_SUBST_TRACE([BUILD_HC128_FALSE]) -m4trace:configure.ac:1041: -1- m4_pattern_allow([^BUILD_HC128_FALSE$]) -m4trace:configure.ac:1041: -1- _AM_SUBST_NOTMAKE([BUILD_HC128_TRUE]) -m4trace:configure.ac:1041: -1- _AM_SUBST_NOTMAKE([BUILD_HC128_FALSE]) -m4trace:configure.ac:1058: -1- AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"]) -m4trace:configure.ac:1058: -1- AC_SUBST([BUILD_RABBIT_TRUE]) -m4trace:configure.ac:1058: -1- AC_SUBST_TRACE([BUILD_RABBIT_TRUE]) -m4trace:configure.ac:1058: -1- m4_pattern_allow([^BUILD_RABBIT_TRUE$]) -m4trace:configure.ac:1058: -1- AC_SUBST([BUILD_RABBIT_FALSE]) -m4trace:configure.ac:1058: -1- AC_SUBST_TRACE([BUILD_RABBIT_FALSE]) -m4trace:configure.ac:1058: -1- m4_pattern_allow([^BUILD_RABBIT_FALSE$]) -m4trace:configure.ac:1058: -1- _AM_SUBST_NOTMAKE([BUILD_RABBIT_TRUE]) -m4trace:configure.ac:1058: -1- _AM_SUBST_NOTMAKE([BUILD_RABBIT_FALSE]) -m4trace:configure.ac:1080: -1- AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) -m4trace:configure.ac:1080: -1- AC_SUBST([BUILD_SHA512_TRUE]) -m4trace:configure.ac:1080: -1- AC_SUBST_TRACE([BUILD_SHA512_TRUE]) -m4trace:configure.ac:1080: -1- m4_pattern_allow([^BUILD_SHA512_TRUE$]) -m4trace:configure.ac:1080: -1- AC_SUBST([BUILD_SHA512_FALSE]) -m4trace:configure.ac:1080: -1- AC_SUBST_TRACE([BUILD_SHA512_FALSE]) -m4trace:configure.ac:1080: -1- m4_pattern_allow([^BUILD_SHA512_FALSE$]) -m4trace:configure.ac:1080: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_TRUE]) -m4trace:configure.ac:1080: -1- _AM_SUBST_NOTMAKE([BUILD_SHA512_FALSE]) -m4trace:configure.ac:1085: -1- AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"]) -m4trace:configure.ac:1085: -1- AC_SUBST([BUILD_FIPS_TRUE]) -m4trace:configure.ac:1085: -1- AC_SUBST_TRACE([BUILD_FIPS_TRUE]) -m4trace:configure.ac:1085: -1- m4_pattern_allow([^BUILD_FIPS_TRUE$]) -m4trace:configure.ac:1085: -1- AC_SUBST([BUILD_FIPS_FALSE]) -m4trace:configure.ac:1085: -1- AC_SUBST_TRACE([BUILD_FIPS_FALSE]) -m4trace:configure.ac:1085: -1- m4_pattern_allow([^BUILD_FIPS_FALSE$]) -m4trace:configure.ac:1085: -1- _AM_SUBST_NOTMAKE([BUILD_FIPS_TRUE]) -m4trace:configure.ac:1085: -1- _AM_SUBST_NOTMAKE([BUILD_FIPS_FALSE]) -m4trace:configure.ac:1120: -1- AM_CONDITIONAL([BUILD_INLINE], [test "x$ENABLED_INLINE" = "xyes"]) -m4trace:configure.ac:1120: -1- AC_SUBST([BUILD_INLINE_TRUE]) -m4trace:configure.ac:1120: -1- AC_SUBST_TRACE([BUILD_INLINE_TRUE]) -m4trace:configure.ac:1120: -1- m4_pattern_allow([^BUILD_INLINE_TRUE$]) -m4trace:configure.ac:1120: -1- AC_SUBST([BUILD_INLINE_FALSE]) -m4trace:configure.ac:1120: -1- AC_SUBST_TRACE([BUILD_INLINE_FALSE]) -m4trace:configure.ac:1120: -1- m4_pattern_allow([^BUILD_INLINE_FALSE$]) -m4trace:configure.ac:1120: -1- _AM_SUBST_NOTMAKE([BUILD_INLINE_TRUE]) -m4trace:configure.ac:1120: -1- _AM_SUBST_NOTMAKE([BUILD_INLINE_FALSE]) -m4trace:configure.ac:1135: -1- AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"]) -m4trace:configure.ac:1135: -1- AC_SUBST([BUILD_OCSP_TRUE]) -m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([BUILD_OCSP_TRUE]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^BUILD_OCSP_TRUE$]) -m4trace:configure.ac:1135: -1- AC_SUBST([BUILD_OCSP_FALSE]) -m4trace:configure.ac:1135: -1- AC_SUBST_TRACE([BUILD_OCSP_FALSE]) -m4trace:configure.ac:1135: -1- m4_pattern_allow([^BUILD_OCSP_FALSE$]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([BUILD_OCSP_TRUE]) -m4trace:configure.ac:1135: -1- _AM_SUBST_NOTMAKE([BUILD_OCSP_FALSE]) -m4trace:configure.ac:1141: -1- AC_SUBST([HAVE_OPENSSL_CMD]) -m4trace:configure.ac:1141: -1- AC_SUBST_TRACE([HAVE_OPENSSL_CMD]) -m4trace:configure.ac:1141: -1- m4_pattern_allow([^HAVE_OPENSSL_CMD$]) -m4trace:configure.ac:1164: -1- AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"]) -m4trace:configure.ac:1164: -1- AC_SUBST([BUILD_CRL_TRUE]) -m4trace:configure.ac:1164: -1- AC_SUBST_TRACE([BUILD_CRL_TRUE]) -m4trace:configure.ac:1164: -1- m4_pattern_allow([^BUILD_CRL_TRUE$]) -m4trace:configure.ac:1164: -1- AC_SUBST([BUILD_CRL_FALSE]) -m4trace:configure.ac:1164: -1- AC_SUBST_TRACE([BUILD_CRL_FALSE]) -m4trace:configure.ac:1164: -1- m4_pattern_allow([^BUILD_CRL_FALSE$]) -m4trace:configure.ac:1164: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_TRUE]) -m4trace:configure.ac:1164: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_FALSE]) -m4trace:configure.ac:1184: -1- AM_CONDITIONAL([BUILD_CRL_MONITOR], [test "x$ENABLED_CRL_MONITOR" = "xyes"]) -m4trace:configure.ac:1184: -1- AC_SUBST([BUILD_CRL_MONITOR_TRUE]) -m4trace:configure.ac:1184: -1- AC_SUBST_TRACE([BUILD_CRL_MONITOR_TRUE]) -m4trace:configure.ac:1184: -1- m4_pattern_allow([^BUILD_CRL_MONITOR_TRUE$]) -m4trace:configure.ac:1184: -1- AC_SUBST([BUILD_CRL_MONITOR_FALSE]) -m4trace:configure.ac:1184: -1- AC_SUBST_TRACE([BUILD_CRL_MONITOR_FALSE]) -m4trace:configure.ac:1184: -1- m4_pattern_allow([^BUILD_CRL_MONITOR_FALSE$]) -m4trace:configure.ac:1184: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_MONITOR_TRUE]) -m4trace:configure.ac:1184: -1- _AM_SUBST_NOTMAKE([BUILD_CRL_MONITOR_FALSE]) -m4trace:configure.ac:1204: -1- AM_CONDITIONAL([BUILD_NTRU], [test "x$ENABLED_NTRU" = "xyes"]) -m4trace:configure.ac:1204: -1- AC_SUBST([BUILD_NTRU_TRUE]) -m4trace:configure.ac:1204: -1- AC_SUBST_TRACE([BUILD_NTRU_TRUE]) -m4trace:configure.ac:1204: -1- m4_pattern_allow([^BUILD_NTRU_TRUE$]) -m4trace:configure.ac:1204: -1- AC_SUBST([BUILD_NTRU_FALSE]) -m4trace:configure.ac:1204: -1- AC_SUBST_TRACE([BUILD_NTRU_FALSE]) -m4trace:configure.ac:1204: -1- m4_pattern_allow([^BUILD_NTRU_FALSE$]) -m4trace:configure.ac:1204: -1- _AM_SUBST_NOTMAKE([BUILD_NTRU_TRUE]) -m4trace:configure.ac:1204: -1- _AM_SUBST_NOTMAKE([BUILD_NTRU_FALSE]) -m4trace:configure.ac:1300: -1- AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) -m4trace:configure.ac:1300: -1- AC_SUBST([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1300: -1- AC_SUBST_TRACE([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1300: -1- m4_pattern_allow([^BUILD_PKCS7_TRUE$]) -m4trace:configure.ac:1300: -1- AC_SUBST([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1300: -1- AC_SUBST_TRACE([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1300: -1- m4_pattern_allow([^BUILD_PKCS7_FALSE$]) -m4trace:configure.ac:1300: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1300: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1331: -1- AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) -m4trace:configure.ac:1331: -1- AC_SUBST([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1331: -1- AC_SUBST_TRACE([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1331: -1- m4_pattern_allow([^BUILD_PKCS7_TRUE$]) -m4trace:configure.ac:1331: -1- AC_SUBST([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1331: -1- AC_SUBST_TRACE([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1331: -1- m4_pattern_allow([^BUILD_PKCS7_FALSE$]) -m4trace:configure.ac:1331: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_TRUE]) -m4trace:configure.ac:1331: -1- _AM_SUBST_NOTMAKE([BUILD_PKCS7_FALSE]) -m4trace:configure.ac:1359: -1- AC_SUBST([HAVE_VALGRIND]) -m4trace:configure.ac:1359: -1- AC_SUBST_TRACE([HAVE_VALGRIND]) -m4trace:configure.ac:1359: -1- m4_pattern_allow([^HAVE_VALGRIND$]) -m4trace:configure.ac:1370: -1- AM_CONDITIONAL([USE_VALGRIND], [test "x$ENABLED_VALGRIND" = "xyes"]) -m4trace:configure.ac:1370: -1- AC_SUBST([USE_VALGRIND_TRUE]) -m4trace:configure.ac:1370: -1- AC_SUBST_TRACE([USE_VALGRIND_TRUE]) -m4trace:configure.ac:1370: -1- m4_pattern_allow([^USE_VALGRIND_TRUE$]) -m4trace:configure.ac:1370: -1- AC_SUBST([USE_VALGRIND_FALSE]) -m4trace:configure.ac:1370: -1- AC_SUBST_TRACE([USE_VALGRIND_FALSE]) -m4trace:configure.ac:1370: -1- m4_pattern_allow([^USE_VALGRIND_FALSE$]) -m4trace:configure.ac:1370: -1- _AM_SUBST_NOTMAKE([USE_VALGRIND_TRUE]) -m4trace:configure.ac:1370: -1- _AM_SUBST_NOTMAKE([USE_VALGRIND_FALSE]) -m4trace:configure.ac:1422: -1- AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) -m4trace:configure.ac:1422: -1- AC_SUBST([BUILD_ECC_TRUE]) -m4trace:configure.ac:1422: -1- AC_SUBST_TRACE([BUILD_ECC_TRUE]) -m4trace:configure.ac:1422: -1- m4_pattern_allow([^BUILD_ECC_TRUE$]) -m4trace:configure.ac:1422: -1- AC_SUBST([BUILD_ECC_FALSE]) -m4trace:configure.ac:1422: -1- AC_SUBST_TRACE([BUILD_ECC_FALSE]) -m4trace:configure.ac:1422: -1- m4_pattern_allow([^BUILD_ECC_FALSE$]) -m4trace:configure.ac:1422: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_TRUE]) -m4trace:configure.ac:1422: -1- _AM_SUBST_NOTMAKE([BUILD_ECC_FALSE]) -m4trace:configure.ac:1480: -1- AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"]) -m4trace:configure.ac:1480: -1- AC_SUBST([BUILD_FASTMATH_TRUE]) -m4trace:configure.ac:1480: -1- AC_SUBST_TRACE([BUILD_FASTMATH_TRUE]) -m4trace:configure.ac:1480: -1- m4_pattern_allow([^BUILD_FASTMATH_TRUE$]) -m4trace:configure.ac:1480: -1- AC_SUBST([BUILD_FASTMATH_FALSE]) -m4trace:configure.ac:1480: -1- AC_SUBST_TRACE([BUILD_FASTMATH_FALSE]) -m4trace:configure.ac:1480: -1- m4_pattern_allow([^BUILD_FASTMATH_FALSE$]) -m4trace:configure.ac:1480: -1- _AM_SUBST_NOTMAKE([BUILD_FASTMATH_TRUE]) -m4trace:configure.ac:1480: -1- _AM_SUBST_NOTMAKE([BUILD_FASTMATH_FALSE]) -m4trace:configure.ac:1481: -1- AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"]) -m4trace:configure.ac:1481: -1- AC_SUBST([BUILD_SLOWMATH_TRUE]) -m4trace:configure.ac:1481: -1- AC_SUBST_TRACE([BUILD_SLOWMATH_TRUE]) -m4trace:configure.ac:1481: -1- m4_pattern_allow([^BUILD_SLOWMATH_TRUE$]) -m4trace:configure.ac:1481: -1- AC_SUBST([BUILD_SLOWMATH_FALSE]) -m4trace:configure.ac:1481: -1- AC_SUBST_TRACE([BUILD_SLOWMATH_FALSE]) -m4trace:configure.ac:1481: -1- m4_pattern_allow([^BUILD_SLOWMATH_FALSE$]) -m4trace:configure.ac:1481: -1- _AM_SUBST_NOTMAKE([BUILD_SLOWMATH_TRUE]) -m4trace:configure.ac:1481: -1- _AM_SUBST_NOTMAKE([BUILD_SLOWMATH_FALSE]) -m4trace:configure.ac:1495: -1- AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"]) -m4trace:configure.ac:1495: -1- AC_SUBST([BUILD_EXAMPLES_TRUE]) -m4trace:configure.ac:1495: -1- AC_SUBST_TRACE([BUILD_EXAMPLES_TRUE]) -m4trace:configure.ac:1495: -1- m4_pattern_allow([^BUILD_EXAMPLES_TRUE$]) -m4trace:configure.ac:1495: -1- AC_SUBST([BUILD_EXAMPLES_FALSE]) -m4trace:configure.ac:1495: -1- AC_SUBST_TRACE([BUILD_EXAMPLES_FALSE]) -m4trace:configure.ac:1495: -1- m4_pattern_allow([^BUILD_EXAMPLES_FALSE$]) -m4trace:configure.ac:1495: -1- _AM_SUBST_NOTMAKE([BUILD_EXAMPLES_TRUE]) -m4trace:configure.ac:1495: -1- _AM_SUBST_NOTMAKE([BUILD_EXAMPLES_FALSE]) -m4trace:configure.ac:1534: -1- AM_CONDITIONAL([BUILD_LIBZ], [test "x$ENABLED_LIBZ" = "xyes"]) -m4trace:configure.ac:1534: -1- AC_SUBST([BUILD_LIBZ_TRUE]) -m4trace:configure.ac:1534: -1- AC_SUBST_TRACE([BUILD_LIBZ_TRUE]) -m4trace:configure.ac:1534: -1- m4_pattern_allow([^BUILD_LIBZ_TRUE$]) -m4trace:configure.ac:1534: -1- AC_SUBST([BUILD_LIBZ_FALSE]) -m4trace:configure.ac:1534: -1- AC_SUBST_TRACE([BUILD_LIBZ_FALSE]) -m4trace:configure.ac:1534: -1- m4_pattern_allow([^BUILD_LIBZ_FALSE$]) -m4trace:configure.ac:1534: -1- _AM_SUBST_NOTMAKE([BUILD_LIBZ_TRUE]) -m4trace:configure.ac:1534: -1- _AM_SUBST_NOTMAKE([BUILD_LIBZ_FALSE]) -m4trace:configure.ac:1595: -1- AM_CONDITIONAL([BUILD_MCAPI], [test "x$ENABLED_MCAPI" = "xyes"]) -m4trace:configure.ac:1595: -1- AC_SUBST([BUILD_MCAPI_TRUE]) -m4trace:configure.ac:1595: -1- AC_SUBST_TRACE([BUILD_MCAPI_TRUE]) -m4trace:configure.ac:1595: -1- m4_pattern_allow([^BUILD_MCAPI_TRUE$]) -m4trace:configure.ac:1595: -1- AC_SUBST([BUILD_MCAPI_FALSE]) -m4trace:configure.ac:1595: -1- AC_SUBST_TRACE([BUILD_MCAPI_FALSE]) -m4trace:configure.ac:1595: -1- m4_pattern_allow([^BUILD_MCAPI_FALSE$]) -m4trace:configure.ac:1595: -1- _AM_SUBST_NOTMAKE([BUILD_MCAPI_TRUE]) -m4trace:configure.ac:1595: -1- _AM_SUBST_NOTMAKE([BUILD_MCAPI_FALSE]) -m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_SYSTEM]) -m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_SYSTEM$]) -m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_SYSTEM], [/* VCS system */ -@%:@undef VCS_SYSTEM]) -m4trace:configure.ac:1619: -1- AM_CONDITIONAL([IS_VCS_CHECKOUT], [test "x$ac_cv_vcs_checkout" = "xyes"]) -m4trace:configure.ac:1619: -1- AC_SUBST([IS_VCS_CHECKOUT_TRUE]) -m4trace:configure.ac:1619: -1- AC_SUBST_TRACE([IS_VCS_CHECKOUT_TRUE]) -m4trace:configure.ac:1619: -1- m4_pattern_allow([^IS_VCS_CHECKOUT_TRUE$]) -m4trace:configure.ac:1619: -1- AC_SUBST([IS_VCS_CHECKOUT_FALSE]) -m4trace:configure.ac:1619: -1- AC_SUBST_TRACE([IS_VCS_CHECKOUT_FALSE]) -m4trace:configure.ac:1619: -1- m4_pattern_allow([^IS_VCS_CHECKOUT_FALSE$]) -m4trace:configure.ac:1619: -1- _AM_SUBST_NOTMAKE([IS_VCS_CHECKOUT_TRUE]) -m4trace:configure.ac:1619: -1- _AM_SUBST_NOTMAKE([IS_VCS_CHECKOUT_FALSE]) -m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_CHECKOUT]) -m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_CHECKOUT$]) -m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_CHECKOUT], [/* Define if the code was built from VCS. */ -@%:@undef VCS_CHECKOUT]) -m4trace:configure.ac:1619: -1- AC_DEFINE_TRACE_LITERAL([VCS_CHECKOUT]) -m4trace:configure.ac:1619: -1- m4_pattern_allow([^VCS_CHECKOUT$]) -m4trace:configure.ac:1619: -1- AH_OUTPUT([VCS_CHECKOUT], [/* Define if the code was built from VCS. */ -@%:@undef VCS_CHECKOUT]) -m4trace:configure.ac:1631: -1- AC_SUBST([HEX_VERSION]) -m4trace:configure.ac:1631: -1- AC_SUBST_TRACE([HEX_VERSION]) -m4trace:configure.ac:1631: -1- m4_pattern_allow([^HEX_VERSION$]) -m4trace:configure.ac:1632: -1- AC_SUBST([AM_CPPFLAGS]) -m4trace:configure.ac:1632: -1- AC_SUBST_TRACE([AM_CPPFLAGS]) -m4trace:configure.ac:1632: -1- m4_pattern_allow([^AM_CPPFLAGS$]) -m4trace:configure.ac:1633: -1- AC_SUBST([AM_CFLAGS]) -m4trace:configure.ac:1633: -1- AC_SUBST_TRACE([AM_CFLAGS]) -m4trace:configure.ac:1633: -1- m4_pattern_allow([^AM_CFLAGS$]) -m4trace:configure.ac:1634: -1- AC_SUBST([AM_LDFLAGS]) -m4trace:configure.ac:1634: -1- AC_SUBST_TRACE([AM_LDFLAGS]) -m4trace:configure.ac:1634: -1- m4_pattern_allow([^AM_LDFLAGS$]) -m4trace:configure.ac:1637: -1- AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) -m4trace:configure.ac:1638: -1- AC_CONFIG_FILES([Makefile]) -m4trace:configure.ac:1639: -1- AC_CONFIG_FILES([cyassl/version.h]) -m4trace:configure.ac:1640: -1- AC_CONFIG_FILES([cyassl/options.h]) -m4trace:configure.ac:1641: -1- AC_CONFIG_FILES([support/cyassl.pc]) -m4trace:configure.ac:1642: -1- AC_CONFIG_FILES([rpm/spec]) -m4trace:configure.ac:1644: -1- AC_SUBST([GENERIC_CONFIG]) -m4trace:configure.ac:1644: -1- AC_SUBST_TRACE([GENERIC_CONFIG]) -m4trace:configure.ac:1644: -1- m4_pattern_allow([^GENERIC_CONFIG$]) -m4trace:configure.ac:1645: -1- AC_SUBST([AMINCLUDE]) -m4trace:configure.ac:1645: -1- AC_SUBST_TRACE([AMINCLUDE]) -m4trace:configure.ac:1645: -1- m4_pattern_allow([^AMINCLUDE$]) -m4trace:configure.ac:1645: -1- AC_SUBST([INC_AMINCLUDE]) -m4trace:configure.ac:1645: -1- AC_SUBST_TRACE([INC_AMINCLUDE]) -m4trace:configure.ac:1645: -1- m4_pattern_allow([^INC_AMINCLUDE$]) -m4trace:configure.ac:1645: -1- m4_pattern_allow([AM_MAKEFLAGS]) -m4trace:configure.ac:1647: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:1647: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:1647: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:1647: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:1647: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:1647: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.ac:1647: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:1647: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.ac:1647: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:1647: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:1647: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.ac:1647: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:1647: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff --git a/project1/cyassl-3.0.0/build-aux/compile b/project1/cyassl-3.0.0/build-aux/compile deleted file mode 100755 index 531136b0..00000000 --- a/project1/cyassl-3.0.0/build-aux/compile +++ /dev/null @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program 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, or (at your option) -# any later version. -# -# This program 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/config.guess b/project1/cyassl-3.0.0/build-aux/config.guess deleted file mode 100755 index 9afd6762..00000000 --- a/project1/cyassl-3.0.0/build-aux/config.guess +++ /dev/null @@ -1,1568 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. - -timestamp='2013-11-29' - -# This file 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 3 of the License, or -# (at your option) any later version. -# -# This program 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, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -# -# Please send patches with a ChangeLog entry to config-patches@gnu.org. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi - else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/config.sub b/project1/cyassl-3.0.0/build-aux/config.sub deleted file mode 100755 index 61cb4bc2..00000000 --- a/project1/cyassl-3.0.0/build-aux/config.sub +++ /dev/null @@ -1,1793 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. - -timestamp='2013-10-01' - -# This file 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 3 of the License, or -# (at your option) any later version. -# -# This program 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, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches with a ChangeLog entry to config-patches@gnu.org. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2013 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or1k-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/depcomp b/project1/cyassl-3.0.0/build-aux/depcomp deleted file mode 100755 index 4ebd5b3a..00000000 --- a/project1/cyassl-3.0.0/build-aux/depcomp +++ /dev/null @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2013-05-30.07; # UTC - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. - -# This program 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, or (at your option) -# any later version. - -# This program 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/install-sh b/project1/cyassl-3.0.0/build-aux/install-sh deleted file mode 100755 index 377bb868..00000000 --- a/project1/cyassl-3.0.0/build-aux/install-sh +++ /dev/null @@ -1,527 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2011-11-20.07; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/ltmain.sh b/project1/cyassl-3.0.0/build-aux/ltmain.sh deleted file mode 100644 index 63ae69dc..00000000 --- a/project1/cyassl-3.0.0/build-aux/ltmain.sh +++ /dev/null @@ -1,9655 +0,0 @@ - -# libtool (GNU libtool) 2.4.2 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation - - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation - - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $opt_debug - - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $opt_debug - - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $opt_debug - - func_error "missing argument for $1." - exit_cmd=exit -} - - -# func_split_short_opt shortopt -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () -{ - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' - - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation - - -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () -{ - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' - - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation - -exit_cmd=: - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation - -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation - - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation - - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation - - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation - - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation - - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - - - -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false - - -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE -} - - - - -## ----------- ## -## Main. ## -## ----------- ## - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case "$lt_sysroot:$1" in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $opt_debug - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $opt_debug - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $opt_debug - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $opt_debug - if test -z "$2" && test -n "$1" ; then - func_error "Could not determine host file name corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result="$1" - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $opt_debug - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " \`$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result="$3" - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $opt_debug - case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via `$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $opt_debug - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $opt_debug - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result="$1" -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via `$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $opt_debug - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $opt_debug - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result="$1" -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_mode_compile arg... -func_mode_compile () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "\`$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument \`$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $opt_debug - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $opt_debug - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result="" - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib="$l" - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - case "$host" in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - func_append verstring ":${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd1 in $cmds; do - IFS="$save_ifs" - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test "$try_normal_branch" = yes \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=${output_objdir}/${output_la}.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" - else - odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" - - # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case "$opt_mode" in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/project1/cyassl-3.0.0/build-aux/missing b/project1/cyassl-3.0.0/build-aux/missing deleted file mode 100755 index db98974f..00000000 --- a/project1/cyassl-3.0.0/build-aux/missing +++ /dev/null @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2013-10-28.13; # UTC - -# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program 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, or (at your option) -# any later version. - -# This program 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/project1/cyassl-3.0.0/build-aux/test-driver b/project1/cyassl-3.0.0/build-aux/test-driver deleted file mode 100755 index d3060566..00000000 --- a/project1/cyassl-3.0.0/build-aux/test-driver +++ /dev/null @@ -1,139 +0,0 @@ -#! /bin/sh -# test-driver - basic testsuite driver script. - -scriptversion=2013-07-13.22; # UTC - -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This program 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, or (at your option) -# any later version. -# -# This program 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -usage_error () -{ - echo "$0: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat <$log_file 2>&1 -estatus=$? -if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 -fi - -case $estatus:$expect_failure in - 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; - 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; - 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; - *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; - *:*) col=$red res=FAIL recheck=yes gcopy=yes;; -esac - -# Report outcome to console. -echo "${col}${res}${std}: $test_name" - -# Register the test result, and other relevant metadata. -echo ":test-result: $res" > $trs_file -echo ":global-test-result: $res" >> $trs_file -echo ":recheck: $recheck" >> $trs_file -echo ":copy-in-global-log: $gcopy" >> $trs_file - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/project1/cyassl-3.0.0/certs/1024/client-cert.der b/project1/cyassl-3.0.0/certs/1024/client-cert.der deleted file mode 100644 index 6b796b6388254e6f5ff20f1f81425410acda814b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 752 zcmXqLVtQlH#1y)KnTe5!iIbt1cg??JGhEdSc-c6$+C196^D;8BvN9Mn_8D>;aI!In zvaks=g$5h)0~G){96W6PMXBled4_@p{2&2#9*%(gqLQ4%yc9z|10IkN7Y}P?VsNmJ zp@@MHh|kT#9Z-~?UX+-do0*qxC}to65@qJ$EiW(Et4u5|&e2QG&oz`akcK;flTnN> zGcPUQ0WNJIC(dhVY+z_;VPt4xWMUZwX}S5Ei-{BB?QTA~dVk8PgDbB~-fBDf z!uLp`S<}DOYwOBYclQb|-IHXs!s3kOB9^o*-@kueb<3BDZ+Bd8rpKM~lNx+VFSD1Z z?eckX@UK_Cw*339b>Ai=Jx!5&t!rKk420{ zq%o8K$NjtKO*F5jmln1jFBQm)d}AOFl2&GsFc53Nt^gF{vcfE^2F#3%|B*cmOhn8; zpBAO@XDw`<%J!^X>aF&zw=EMoml^sde5y|7xij0v=US4ZN{K;%AG-jnP@Kr-yXPa+ zC!b&C->PHE_dj|?_SUIJSI-n@L`xs}(HUp^gUQmUmTigA%gyhT7C6WH|2}8SVZ7e9 jUg&gJ)S=|tc6VPzrwe$_kDey&7rV!AR*n4XFn2Ei&;$A< diff --git a/project1/cyassl-3.0.0/certs/1024/client-cert.pem b/project1/cyassl-3.0.0/certs/1024/client-cert.pem deleted file mode 100644 index 09d603a3..00000000 --- a/project1/cyassl-3.0.0/certs/1024/client-cert.pem +++ /dev/null @@ -1,59 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 10163970144298616102 (0x8d0dacfec6984526) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Jan 18 21:42:49 2013 GMT - Not After : Oct 15 21:42:49 2015 GMT - Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:bc:73:0e:a8:49:f3:74:a2:a9:ef:18:a5:da:55: - 99:21:f9:c8:ec:b3:6d:48:e5:35:35:75:77:37:ec: - d1:61:90:5f:3e:d9:e4:d5:df:94:ca:c1:a9:d7:19: - da:86:c9:e8:4d:c4:61:36:82:fe:ab:ad:7e:77:25: - bb:8d:11:a5:bc:62:3a:a8:38:cc:39:a2:04:66:b4: - f7:f7:f3:aa:da:4d:02:0e:bb:5e:8d:69:48:dc:77: - c9:28:0e:22:e9:6b:a4:26:ba:4c:e8:c1:fd:4a:6f: - 2b:1f:ef:8a:ae:f6:90:62:e5:64:1e:eb:2b:3c:67: - c8:dc:27:00:f6:91:68:65:a9 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC - X509v3 Authority Key Identifier: - keyid:81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 72:66:0f:6a:a1:85:95:06:e6:87:1a:ed:2b:da:ed:84:90:89: - a6:31:4d:60:f2:7b:63:0c:dc:9b:44:4c:d6:62:41:24:74:30: - 70:4e:07:10:05:12:5e:14:b3:dd:cf:58:27:93:cf:aa:4f:85: - 2c:35:0e:ff:5b:a8:6b:b5:95:32:d5:cc:73:68:5b:1b:c4:f8: - 89:5e:3d:f8:02:39:32:7d:06:a4:32:e9:b3:ef:62:a0:43:5d: - 4f:fb:ce:3d:08:33:af:3d:7f:12:cb:8a:5a:c2:63:db:3e:dd: - ea:5b:67:10:49:9f:5b:96:1b:4e:5d:bc:4e:9a:7c:1f:ab:56: - 47:4a ------BEGIN CERTIFICATE----- -MIIC7DCCAlWgAwIBAgIJAI0NrP7GmEUmMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD -VQQGEwJVUzEPMA0GA1UECAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwG -A1UECgwFeWFTU0wxFDASBgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cu -eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMzAx -MTgyMTQyNDlaFw0xNTEwMTUyMTQyNDlaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE -CAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwGA1UECgwFeWFTU0wxFDAS -BgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cueWFzc2wuY29tMR0wGwYJ -KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw -gYkCgYEAvHMOqEnzdKKp7xil2lWZIfnI7LNtSOU1NXV3N+zRYZBfPtnk1d+UysGp -1xnahsnoTcRhNoL+q61+dyW7jRGlvGI6qDjMOaIEZrT39/Oq2k0CDrtejWlI3HfJ -KA4i6WukJrpM6MH9Sm8rH++KrvaQYuVkHusrPGfI3CcA9pFoZakCAwEAAaNQME4w -HQYDVR0OBBYEFIFpD/jf3c80KdVndXGFx3UQaVnsMB8GA1UdIwQYMBaAFIFpD/jf -3c80KdVndXGFx3UQaVnsMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA -cmYPaqGFlQbmhxrtK9rthJCJpjFNYPJ7Ywzcm0RM1mJBJHQwcE4HEAUSXhSz3c9Y -J5PPqk+FLDUO/1uoa7WVMtXMc2hbG8T4iV49+AI5Mn0GpDLps+9ioENdT/vOPQgz -rz1/EsuKWsJj2z7d6ltnEEmfW5YbTl28Tpp8H6tWR0o= ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/1024/client-key.der b/project1/cyassl-3.0.0/certs/1024/client-key.der deleted file mode 100644 index 1c47c253221fdee6708c0f855dfb21ecd6fa63af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 608 zcmV-m0-yabf&yFu0RRGlfdIU74yZ}>eQVK##PtF3-_CA*CgrMzM~s5s0yq6B8N_xJOv+D!ruyIzfH zNZfbHC=Md&YosQ+Oz6S=N^dJ4?~1PWkYeRz9_uSSXUNgYIlC8Ase&J93(G3CT?&6|QdSP6zZW?$SfknvB|+ZEm3*E^MyF&HrpUZd8c8gXuc zNE}Pg+m3pMVKUtNRlyc*Cz2#Zi}AQfu}dAS-rC)cFT#=grKxWCI%@I#P#Eu@=flc) z>Q>X!a$A<&P6kdo!`Z%awq*wgOaTHx0QyJNdVG>RRquiDK`-g7 zf*LXD>GwyK8BkM+Ot_bau`J;ql#3>#EI z0zm+seg)p`^tZD6{4h&Z9pf(nN0w;?%?>Usy@O-6t9-X@%3EZo&c247!qBXyiRM6GEOR_*{{WEN)Ad~_=nw4(mM2x}T$Kadi!1%@#x+u7ou9V*2D diff --git a/project1/cyassl-3.0.0/certs/1024/client-key.pem b/project1/cyassl-3.0.0/certs/1024/client-key.pem deleted file mode 100644 index 79e398cc..00000000 --- a/project1/cyassl-3.0.0/certs/1024/client-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC8cw6oSfN0oqnvGKXaVZkh+cjss21I5TU1dXc37NFhkF8+2eTV -35TKwanXGdqGyehNxGE2gv6rrX53JbuNEaW8YjqoOMw5ogRmtPf386raTQIOu16N -aUjcd8koDiLpa6Qmukzowf1Kbysf74qu9pBi5WQe6ys8Z8jcJwD2kWhlqQIDAQAB -AoGAE5fq6Dh4JaJcBM4NQHwx5cRwzZuCO1gJhjtmX9wxkPFP1dsV3d7XO5WTMRgx -Dl6j1qIacW6BSBxLz9uOeoZhMtz7VcEWbSeSJEWL8bhIsUsdrN7a3Y4vwpH7palu -+Dpq8f1QGO+f58PKeOpW09NyW5bdTgZOOsPZvnK2ZQcHTAECQQD6R9R6fJI8Ve+B -8EEwLaPPjxzmhycFcA3fmDXW8Ys4LyS10IS2eU9xKZRa8GRqrOdyxu1NWZg+Zzrz -dCz5YRdpAkEAwMGCDQzrxi/ckvmdghox6en3S/KChxzuFmrRHRiCcPPAti/28/cd -8YYjyE7rj1aOj/W/8fcrtcw9xlc5DBtUQQJBAJ1+Bd7t9Ley+/wwS1Ud4y8BR5Zp -Bc0OLiy9g2O2q3y3bcpbZKfOvobfO1PeYdIe66X2N+2sq3jZTOdV+9cRmcECQBiY -GCnmHic5cCForAovoXLBIYaVOMZYkKBXnLrjp7EVyN72G8JhI3bvsJ0cRL4TQzln -F8idyvv1RWSLOIIs8oECQDmJ5ZwZVTC6t0iMSBQO9J9+d5dD4bQZNTEjdZw7RK1p -ElbuAGFkFmbTfHQrFbSi/r8IaxpdP5ASsQWGMSnb2eI= ------END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/1024/dh1024.der b/project1/cyassl-3.0.0/certs/1024/dh1024.der deleted file mode 100644 index f29e6dc0448fdc367f4adc816c98018f6a4cf3fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 138 zcmV;50CoQ`frkQtfdHh^xNdm$+3hWS-L@8nT1y3XklkisxouLX9Is-=X-9iG^81wR zym|j5UhjFkS+e}f2iElIH23H@=hrht9iwD+8ibcrbU=h375;oBDk~-Zp23MTj5#GM sK<3T(sG*8e#z(TC*N^KiU)qZSPH~8Z^0&I;O4@cn&1p!UgM1P9Wifd5 zB`x>2_)N3HGmI|ljic}# z$dC4Z_|Fpcw4o7i4Ak%jt;GBkMaPsCyctWb?~`gz%oNy1i#cY80@Nr9xb6uz^Z=j) zr+KH+Johw1R*uko!q`m@iR~1@ESyXko1WZL37_9B@C+wZI(HN;-U5Mv0O%ilx4=|U zrzkC0eBRVt-PLx4JT@S}!zI@`IN?;t{Xl3MAyg(g6u0_sJ!?013-~3`!*Z z6&4jp%?naQKzop5E07|^7zKb+uY(^{;;^C%T9PE;Vkkei%DIWwptr5A1>wP2K=wu+BQLI06(UI6I*kb>Exya#K$^;T-G}gn}5VDAub0 diff --git a/project1/cyassl-3.0.0/certs/1024/dsa1024.pem b/project1/cyassl-3.0.0/certs/1024/dsa1024.pem deleted file mode 100644 index c5bb0675..00000000 --- a/project1/cyassl-3.0.0/certs/1024/dsa1024.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBvAIBAAKBgQD3S/m7FZjr3d4eTnGIhfK3uuJK2nZAzWlInoN8EfdlMXj1JS33 -t/hSP77YtsX+GBVbudWShryyF3zYsL6gfPLVc3pYj43lSgCZg0rAnhYJoRA01Rm7 -Y+Pdg3R/EMpzde4xSt2f4AJqne6yS6drKmzHhnfoBBXckrR6KR9Og2OFVQIVANIF -5HP7wZnF3GikjZInPeJSX4mLAoGBAKohAglDbvuiVBSFCvQofMvM2/UeohipId6I -iDOMLuuNo/AdyI/2fvjPEvW0oRFvDNTwBq3E/BRFx5QVvBlLru+Tak/MFNhHizlm -hwLUKAq47gk39ACgBKd5p9I89zRDVo7QfMLYTQ+J7RTBLJxMGZue3FMJn98t8Awn -VDp3FC3eAoGBAOgffLfAVFGnKC1YfN7UXN3VdoQ8NiDAwyXXOjjhVMj9QGgaIVQm -ORS/9qOcXtkr98klugAJy38MSiT9FRYVSM0LUkRAe5BjK5AixRgFgFOvgx9U4rCi -C1qSJOFiKD+3yrmJ1qC3ra4F4cFZQO1KG2ine/vDIIHvS/NpkbDOOrA4AhQlODuh -GXXfm/VyU0854RzsE4SCGA== ------END DSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/1024/include.am b/project1/cyassl-3.0.0/certs/1024/include.am deleted file mode 100644 index c9684978..00000000 --- a/project1/cyassl-3.0.0/certs/1024/include.am +++ /dev/null @@ -1,17 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - certs/1024/client-cert.pem \ - certs/1024/client-key.pem \ - certs/1024/dh1024.pem \ - certs/1024/dsa1024.pem - -EXTRA_DIST += \ - certs/1024/client-cert.der \ - certs/1024/client-key.der \ - certs/1024/dh1024.der \ - certs/1024/dsa1024.der \ - certs/1024/rsa1024.der - diff --git a/project1/cyassl-3.0.0/certs/1024/rsa1024.der b/project1/cyassl-3.0.0/certs/1024/rsa1024.der deleted file mode 100644 index 173d32bce3b9bc4fdf64d3771cc412d8cb22579e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmV-n0-pUaf&yIv0RRGlfdIa6aJU2*MDTJQLr_y2lMh>BsxonR!AE>B%0cAfW17614;~o zao*ztaH6+h2^(I=J)mS@flJf!s0RRC4fq)L~ z9mp?w3@t>Ir;*)BRcZvz5KW>ScFh+%RFZI;f^c#&BnLk{Y+t-griLe!twP<0+`wx@ ziSs`iJ`qHOE@@1=N^u&yno>M#-n_DWQSVQWI^0kMPPQ>-sE!6ZQK`X-%fx}oEotnC z{4x{)AL2&{>0R0!3LR1_h_}5+UNl&lYHE#&U$3R?uScbx~ z7C9uv2CzM^0@8Xw{Njp7uPtM2>z2;Z~ns*NeC7Tr%h)7QZZ*EPMGac zMIE^W*$eF0D6>nw?KXJ=0|5X50)hbmJ#J258iaqHg?!;l2YlexnJV6$`8G5TcMd)X z>QChcCe-#g_umZ<94-c;^eSkaV{+p)<^++EwZXBZRIJy=`$3@Ab#J{3PQS5I=wC@D zm{v!}-s$Q*U;)1<+%dmNUz16PdVyP(OHImLI8V3XveU;Q+B_162jm;vL+t46RAJ}# z?WPMZ_1}Vj#vfrBoTP&}-ywyGZ+EYT6*35-S_>v&`)~}(oH%{FBJS&>s1^YEihv#f zgs4hE_=E#zFC$won`%rvXL$JO;FFoh2=BRNw4JjL0)c@5;dVuUS+>(j-wN*%)(`Nv%PKd&r}(u^^)WTA zw5tsL;n*Cwp*?YEX}_weM=&jFZE z+;mi`ZC+YIG5-IWwx9*wsSs57YtX8L0)c=b(*%k{>rl6RX1|9k<|t0;gW~Bm;qnnj z|DpB#pDpD&f&2jjZ&R&QC$>`VR%;d67!vbzew(y z4#ABO|7Dt;EgFiHTFAhqrG#Og)Fip@sh!Dp3&(I~J-WzL-_kST^?&&%VZK*I-M2*- zB=sZYI1Z5~?&BcX6v&iEcR+VV7@iHzc|TV%RtZUGzLZ!`_Qb2=iR0snzy(z-B*03S G1Sgsk)I)m! diff --git a/project1/cyassl-3.0.0/certs/ca-key.pem b/project1/cyassl-3.0.0/certs/ca-key.pem deleted file mode 100644 index 774feba0..00000000 --- a/project1/cyassl-3.0.0/certs/ca-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAvwzKLRSyHoRCW804H0ryTXUQ8bY1n9/KfQOY06zeA2buKvHY -sH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQu2lSEAMvqPOVxfGLYlYb72dvpBBB -la0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkcrMft8nyVsJWCfUlcOM13Je+9gHVT -lDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfaQG/YIdxzG0ItU5z+Gvx9q3o2P5je -hHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+jJtK3b7FaF9c4mQj+k1hv/sMTSQgW -C6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02eQIDAQABAoIBAD1uTmAahH+dhXzh -Swd84NaZKt6d+TY0DncOPgjqT+UGJtT2OPffDQ8cLgai9CponGNy4zXmBJGRtcGx -pFSs18b7QaDWdW+9C06/sVLoX0kmmFZHx97p6jxgAb8o3DG/SV+TSYd6gVuWS03K -XDhPt+Gy08ch2jwShwfkG9xD7OjsVGHn9u2mCy7134J/xh9hGZykgznfIYWJb3ev -hhUyCKJaCyZh+3AMypw4fbwi7uujqBYA+YqAHgCEqEpB+IQDZy8jWy+baybDBzSU -owM7ctWfcuCtzDSrvcfV9SYwhQ8wIzlS/zzLmSFNiKWr7mK5x+C7R4fBac9z8zC+ -zjkEnOUCgYEA4XZFgFm200nfCu8S1g/wt8sqN7+n+LVN9TE1reSjlKHb8ZattQVk -hYP8G1spqr74Jj92fq0c8MvXJrQbBY5Whn4IYiHBhtZHeT63XaTGOtexdCD2UJdB -BFPtPybWb5H6aCbsKtya8efc+3PweUMbIaNZBGNSB8nX5tEbXV6W+lMCgYEA2O1O -ZGFrkQxhAbUPu0RnUx7cB8Qkfp5shCORDOQSBBZNeJjMlj0gTg9Fmrb4s5MNsqIb -KfImecjF0nh+XnPy13Bhu0DOYQX+aR6CKeYUuKHnltAjPwWTAPLhTX7tt5Zs9/Dk -0c8BmE/cdFSqbV5aQTH+/5q2oAXdqRBU+GvQqoMCgYAh0wSKROtQt3xmv4cr5ihO -6oPi6TXh8hFH/6H1/J8t5TqB/AEDb1OtVCe2Uu7lVtETq+GzD3WQCoS0ocCMDNae -RrorPrUx7WO7pNUNj3LN0R4mNeu+G3L9mzm0h7cT9eqDRZOYuo/kSsy0TKh/CLpB -SahJKD1ePcHONwDL+SzdUQKBgQChV58+udavg22DP4/70NyozgMJI7GhG2PKxElW -NSvRLmVglQVVmRE1/dXfRMeliHJfsoJRqHFFkzbPXB9hUQwFgOivxXu6XiLjPHXD -hAVVbdY6LYSJkzPLONqqMQXNzmwt3VXTVwvwpTVqsK4xukOWygDHS+MZEkPTQvpv -6oDA0QKBgQC524kgNCdwYjTqXyViEvOdgb9I7poOwY0Q/2WanS0aipRayMClpYRh -ntQkue+pncl3C8dwZj26yFTf0jPh9X/5J2G+V0Xdt0UXJPUj5DgOkSfu4yDYFMiU -R3dAd0UYng3OeT9XMVYJSWe+lFhP9sSr4onj44rABVUsJMBKlwQnmg== ------END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/client-cert.der b/project1/cyassl-3.0.0/certs/client-cert.der deleted file mode 100644 index a656ff91f3e20281d2ce8fa5154bb4dcfb1291c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1180 zcmXqLVwqvk#N4oenTe5!iIbt-t90MQv>Ubtylk9WZ60mkc^Mg5Ss4r(`wY1aIN6v( zS=fY`LW2$YfeL^e4q-O`qSW;KJVQYPevkmWFh@XsQAti>UWy@~0S`!sOPIAXF*w-A zP{cq8#OD^~4k*e`FG|eK&CE+T6f+P3i82fGmY0|7RVEe}=jbKp=NifyNW-1L$tcE` znU|LD0GBq96X!KFG&C?WF|;r;G&PL^a!m}(jSQgN!RO#6MkVAxWn^VwZerwTFlb`r zVrpV!WH`)xQTw0e5+hgZ;1ey{S~VrJ_O8+jVt2o`%xn|8QQw7KnbpS*yUe@N=AC3D#ek45Sjcn zz1pg(;vr*L*u-VRPQ90G9On4Ezu0!)JW!fvq4n2~i@i*rJUln;zI5Gwzv&kQUaa6S zXk4$r?JRP%Bz=ofQ+{vTp$>+VrFDuT-^B0pz*VTEHFjL^0A1qh#22+O}n1aE>Rc4TcAGi zxZ3sB)B^^Mhe7hnERDMj8h12cRkN^h%96&3gDw>`A>}Yo=8zR;VKrc8Wc-huG=TXH zm^2s}WNMrmHRmawzi{JVNdB31BAgcgGiJ=18eAq({mh{3jRtS&@_P@?_FWBC&T`lG z>-|&9w)h7B+PG^hCmD=?m#bgi%DlN+vBZ$uYrU@2=E;3$KF8Zmus`!SRB~cZxE7d9>?p{#_Hf@*Ic3oTUnBRBLyPa|T?+Kkv=sdRNHi{Dy4kmvY;0|O zy>q8B7j5d6ta&Mtx3Hr)BO|* z50VzSf0^v8<((79rT_E!Gq2>f4QsR(zTOg@e%9#8HbL)MMQOZ?yvq9jDeYm)_(YS{Q&^Gkff0S diff --git a/project1/cyassl-3.0.0/certs/client-cert.pem b/project1/cyassl-3.0.0/certs/client-cert.pem deleted file mode 100644 index 278b43fe..00000000 --- a/project1/cyassl-3.0.0/certs/client-cert.pem +++ /dev/null @@ -1,87 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 87:4a:75:be:91:66:d8:3d - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:21:55 2011 GMT - Not After : Jul 20 18:21:55 2014 GMT - Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c3:03:d1:2b:fe:39:a4:32:45:3b:53:c8:84:2b: - 2a:7c:74:9a:bd:aa:2a:52:07:47:d6:a6:36:b2:07: - 32:8e:d0:ba:69:7b:c6:c3:44:9e:d4:81:48:fd:2d: - 68:a2:8b:67:bb:a1:75:c8:36:2c:4a:d2:1b:f7:8b: - ba:cf:0d:f9:ef:ec:f1:81:1e:7b:9b:03:47:9a:bf: - 65:cc:7f:65:24:69:a6:e8:14:89:5b:e4:34:f7:c5: - b0:14:93:f5:67:7b:3a:7a:78:e1:01:56:56:91:a6: - 13:42:8d:d2:3c:40:9c:4c:ef:d1:86:df:37:51:1b: - 0c:a1:3b:f5:f1:a3:4a:35:e4:e1:ce:96:df:1b:7e: - bf:4e:97:d0:10:e8:a8:08:30:81:af:20:0b:43:14: - c5:74:67:b4:32:82:6f:8d:86:c2:88:40:99:36:83: - ba:1e:40:72:22:17:d7:52:65:24:73:b0:ce:ef:19: - cd:ae:ff:78:6c:7b:c0:12:03:d4:4e:72:0d:50:6d: - 3b:a3:3b:a3:99:5e:9d:c8:d9:0c:85:b3:d9:8a:d9: - 54:26:db:6d:fa:ac:bb:ff:25:4c:c4:d1:79:f4:71: - d3:86:40:18:13:b0:63:b5:72:4e:30:c4:97:84:86: - 2d:56:2f:d7:15:f7:7f:c0:ae:f5:fc:5b:e5:fb:a1: - ba:d3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 - X509v3 Authority Key Identifier: - keyid:33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 - DirName:/C=US/ST=Oregon/L=Portland/O=yaSSL/OU=Programming/CN=www.yassl.com/emailAddress=info@yassl.com - serial:87:4A:75:BE:91:66:D8:3D - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 1c:7c:42:81:29:9e:21:cf:d0:d8:c1:54:6f:cc:ae:14:09:38: - ff:68:98:9a:95:53:76:18:7b:e6:30:76:ec:28:0d:75:a7:de: - e0:cd:8e:d5:55:23:6a:47:2b:4e:8d:fc:7d:06:a3:d8:0f:ad: - 5e:d6:04:c9:00:33:fb:77:27:d3:b5:03:b3:7b:21:74:31:0b: - 4a:af:2d:1a:b3:93:8e:cc:f3:5f:3d:90:3f:cc:e3:55:19:91: - 7b:78:24:2e:4a:09:bb:18:4e:61:2d:9c:c6:0a:a0:34:91:88: - 70:6b:3b:48:47:bc:79:94:a2:a0:4d:32:47:54:c2:a3:dc:2e: - d2:51:4c:29:39:11:ff:e2:15:5e:58:97:36:f6:e9:06:06:86: - 0e:8d:9d:95:03:72:b2:8b:19:7c:e9:14:6e:a1:88:73:68:58: - 6d:71:5e:c2:d5:d3:13:d2:5f:de:ea:03:be:e2:00:40:e5:ce: - fd:e6:92:31:57:c3:eb:bb:66:ac:cb:2f:1a:fa:e0:62:a2:47: - f4:93:43:2a:4b:6c:5e:0a:2f:f9:e7:e6:4a:63:86:b0:ac:2a: - a1:eb:b4:5b:67:cd:32:e4:b6:11:4b:9a:72:66:0d:a2:4a:76: - 8f:fe:22:bc:83:fd:db:b7:d5:a9:ee:05:c9:b1:71:7e:1b:2b: - e1:e3:af:c0 ------BEGIN CERTIFICATE----- -MIIEmDCCA4CgAwIBAgIJAIdKdb6RZtg9MA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD -VQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwG -A1UEChMFeWFTU0wxFDASBgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cu -eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMTEw -MjQxODIxNTVaFw0xNDA3MjAxODIxNTVaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE -CBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFTU0wxFDAS -BgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJ -KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9amNrIHMo7Quml7xsNE -ntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/Zcx/ZSRppugUiVvk -NPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE79fGjSjXk4c6W3xt+ -v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX11JlJHOwzu8Zza7/ -eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8lTMTRefRx04ZAGBOw -Y7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB9jCB8zAdBgNVHQ4EFgQU -M9hFZtdohxh+VA1wJ5HHJteFZcAwgcMGA1UdIwSBuzCBuIAUM9hFZtdohxh+VA1w -J5HHJteFZcChgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24x -ETAPBgNVBAcTCFBvcnRsYW5kMQ4wDAYDVQQKEwV5YVNTTDEUMBIGA1UECxMLUHJv -Z3JhbW1pbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW -DmluZm9AeWFzc2wuY29tggkAh0p1vpFm2D0wDAYDVR0TBAUwAwEB/zANBgkqhkiG -9w0BAQUFAAOCAQEAHHxCgSmeIc/Q2MFUb8yuFAk4/2iYmpVTdhh75jB27CgNdafe -4M2O1VUjakcrTo38fQaj2A+tXtYEyQAz+3cn07UDs3shdDELSq8tGrOTjszzXz2Q -P8zjVRmRe3gkLkoJuxhOYS2cxgqgNJGIcGs7SEe8eZSioE0yR1TCo9wu0lFMKTkR -/+IVXliXNvbpBgaGDo2dlQNysosZfOkUbqGIc2hYbXFewtXTE9Jf3uoDvuIAQOXO -/eaSMVfD67tmrMsvGvrgYqJH9JNDKktsXgov+efmSmOGsKwqoeu0W2fNMuS2EUua -cmYNokp2j/4ivIP927fVqe4FybFxfhsr4eOvwA== ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/client-ecc-cert.pem b/project1/cyassl-3.0.0/certs/client-ecc-cert.pem deleted file mode 100644 index 4d0448fc..00000000 --- a/project1/cyassl-3.0.0/certs/client-ecc-cert.pem +++ /dev/null @@ -1,54 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - bf:cc:cb:7a:0a:07:42:82 - Signature Algorithm: ecdsa-with-SHA1 - Issuer: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: May 1 23:51:33 2012 GMT - Not After : Jan 26 23:51:33 2015 GMT - Subject: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: id-ecPublicKey - EC Public Key: - pub: - 04:55:bf:f4:0f:44:50:9a:3d:ce:9b:b7:f0:c5:4d: - f5:70:7b:d4:ec:24:8e:19:80:ec:5a:4c:a2:24:03: - 62:2c:9b:da:ef:a2:35:12:43:84:76:16:c6:56:95: - 06:cc:01:a9:bd:f6:75:1a:42:f7:bd:a9:b2:36:22: - 5f:c7:5d:7f:b4 - ASN1 OID: prime256v1 - X509v3 extensions: - X509v3 Subject Key Identifier: - EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2 - X509v3 Authority Key Identifier: - keyid:EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2 - DirName:/C=US/ST=Oregon/L=Salem/O=Client ECC/OU=Fast/CN=www.yassl.com/emailAddress=info@yassl.com - serial:BF:CC:CB:7A:0A:07:42:82 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: ecdsa-with-SHA1 - 30:44:02:20:26:08:44:95:35:2e:fa:9d:20:01:a6:79:60:ed: - 35:a7:0a:dd:7a:0e:75:c5:80:d2:0b:9f:6a:90:d6:31:76:75: - 02:20:2d:87:a2:bb:d5:e2:42:61:35:19:59:40:1d:fd:71:4f: - 28:65:96:99:e6:85:1b:09:ad:d4:58:71:56:63:0b:c7 ------BEGIN CERTIFICATE----- -MIIC+jCCAqKgAwIBAgIJAL/My3oKB0KCMAkGByqGSM49BAEwgYkxCzAJBgNVBAYT -AlVTMQ8wDQYDVQQIEwZPcmVnb24xDjAMBgNVBAcTBVNhbGVtMRMwEQYDVQQKEwpD -bGllbnQgRUNDMQ0wCwYDVQQLEwRGYXN0MRYwFAYDVQQDEw13d3cueWFzc2wuY29t -MR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMjA1MDEyMzUxMzNa -Fw0xNTAxMjYyMzUxMzNaMIGJMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29u -MQ4wDAYDVQQHEwVTYWxlbTETMBEGA1UEChMKQ2xpZW50IEVDQzENMAsGA1UECxME -RmFzdDEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEdMBsGCSqGSIb3DQEJARYOaW5m -b0B5YXNzbC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARVv/QPRFCaPc6b -t/DFTfVwe9TsJI4ZgOxaTKIkA2Ism9rvojUSQ4R2FsZWlQbMAam99nUaQve9qbI2 -Il/HXX+0o4HxMIHuMB0GA1UdDgQWBBTr1EtZa5VhP1FXtgRNiUGIRFyr8jCBvgYD -VR0jBIG2MIGzgBTr1EtZa5VhP1FXtgRNiUGIRFyr8qGBj6SBjDCBiTELMAkGA1UE -BhMCVVMxDzANBgNVBAgTBk9yZWdvbjEOMAwGA1UEBxMFU2FsZW0xEzARBgNVBAoT -CkNsaWVudCBFQ0MxDTALBgNVBAsTBEZhc3QxFjAUBgNVBAMTDXd3dy55YXNzbC5j -b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkAv8zLegoHQoIwDAYD -VR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCICYIRJU1LvqdIAGmeWDtNacK3XoO -dcWA0gufapDWMXZ1AiAth6K71eJCYTUZWUAd/XFPKGWWmeaFGwmt1FhxVmMLxw== ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/client-key.der b/project1/cyassl-3.0.0/certs/client-key.der deleted file mode 100644 index 94dc253a2bd214f1c2c9a99c5d7c649e5da5ded9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1192 zcmV;Z1Xueof&`=j0RRGm0RaHR1JNt~Iixa0J5$JnD=K_+n!TzjQU^!YrZ%z%GLF!? zX?w=QM4r@vNc}BnqKjv{p>@bMEK1TF_lvsE4f*fv@qr$Dn*&Fhzh%sSWh7~)=oE=t zIH zQ{ItG9c}7ad-8Xx*~Zz5tJvWdb z-nWk2K-Hq|;2xp$zL(pEW0n-nmX;qbG(B&l8|4j%w5{vn!ETW!-TtCWIhLpIp) zLTDrqMbuE_7dc4KHH(yO5#Eo=SptE90O};C`DruhaokdUh#@F1N#4407U|4KdWa2_ zSA;rXjg**Jr2>J0 z0M$4f!;i(23`YxZHIl`!jYi0l7?1UU3it1!{(!l)D!R%TuwA7G(36eWoCF-yVveRJ zfdT){iYj9?H9)FufZmBCYFAC3Zmp9}R*(yAopXx}t|vX-PVlP5Yqng$pj6Bem*@U z62lmK^C|OR4t8u=b>u;WX`M3j%_6I?HM&Z&JmuL~wqj3R-sPSO%2To|_nxzB3R`() z>~4`xk|6f{{1)xgb`0X|f3j&4Yj_S?Mr5>Jwmw{U*2|#F+}3bH2kF z0)c@5x|*!YeY|8%B0LWA)=~9`*qOi)AYBhB{afO$*&Nv+R&D%* z&|mEk6&x5L=fpir*U+A7mCqu{1ACt1U;+Fu0)c=L&`Zx7XStscbw`F}t}(*KFsxYy zP}vW)a0d7A)5v0csM>D!AwSc9U+RjhKiMi?^HI{mFgN2Zqje1)O(8VZS8!a3zjEwK zZfMob7<4mEj5lu%QSBoCp)TSq413FxB+{!B0e|*6&KjB_|x{(w0*ST#?

NKo6^CG#lCV}r{|I8)Sq()guZ%{Rkgw9F; z=@NcgG1oKvArp4Y7BJfk{KaCYHMsA$u&lr~_SwlsNcljJ04p1+Y~vck3j>}T!baps zP9k$}!(Y^z)-VT1){Ky=)b{b?NYhwLrn${2zi1x_OJjyFTx-_024(lA+yG~5yThqL SgZsz&$l@M;uK+)j0s#Vkbb);U diff --git a/project1/cyassl-3.0.0/certs/dh2048.pem b/project1/cyassl-3.0.0/certs/dh2048.pem deleted file mode 100644 index 1e2b848d..00000000 --- a/project1/cyassl-3.0.0/certs/dh2048.pem +++ /dev/null @@ -1,29 +0,0 @@ -Diffie-Hellman-Parameters: (2048 bit) - prime: - 00:b0:a1:08:06:9c:08:13:ba:59:06:3c:bc:30:d5: - f5:00:c1:4f:44:a7:d6:ef:4a:c6:25:27:1c:e8:d2: - 96:53:0a:5c:91:dd:a2:c2:94:84:bf:7d:b2:44:9f: - 9b:d2:c1:8a:c5:be:72:5c:a7:e7:91:e6:d4:9f:73: - 07:85:5b:66:48:c7:70:fa:b4:ee:02:c9:3d:9a:4a: - da:3d:c1:46:3e:19:69:d1:17:46:07:a3:4d:9f:2b: - 96:17:39:6d:30:8d:2a:f3:94:d3:75:cf:a0:75:e6: - f2:92:1f:1a:70:05:aa:04:83:57:30:fb:da:76:93: - 38:50:e8:27:fd:63:ee:3c:e5:b7:c8:09:ae:6f:50: - 35:8e:84:ce:4a:00:e9:12:7e:5a:31:d7:33:fc:21: - 13:76:cc:16:30:db:0c:fc:c5:62:a7:35:b8:ef:b7: - b0:ac:c0:36:f6:d9:c9:46:48:f9:40:90:00:2b:1b: - aa:6c:e3:1a:c3:0b:03:9e:1b:c2:46:e4:48:4e:22: - 73:6f:c3:5f:d4:9a:d6:30:07:48:d6:8c:90:ab:d4: - f6:f1:e3:48:d3:58:4b:a6:b9:cd:29:bf:68:1f:08: - 4b:63:86:2f:5c:6b:d6:b6:06:65:f7:a6:dc:00:67: - 6b:bb:c3:a9:41:83:fb:c7:fa:c8:e2:1e:7e:af:00: - 3f:93 - generator: 2 (0x2) ------BEGIN DH PARAMETERS----- -MIIBCAKCAQEAsKEIBpwIE7pZBjy8MNX1AMFPRKfW70rGJScc6NKWUwpckd2iwpSE -v32yRJ+b0sGKxb5yXKfnkebUn3MHhVtmSMdw+rTuAsk9mkraPcFGPhlp0RdGB6NN -nyuWFzltMI0q85TTdc+gdebykh8acAWqBINXMPvadpM4UOgn/WPuPOW3yAmub1A1 -joTOSgDpEn5aMdcz/CETdswWMNsM/MVipzW477ewrMA29tnJRkj5QJAAKxuqbOMa -wwsDnhvCRuRITiJzb8Nf1JrWMAdI1oyQq9T28eNI01hLprnNKb9oHwhLY4YvXGvW -tgZl96bcAGdru8OpQYP7x/rI4h5+rwA/kwIBAg== ------END DH PARAMETERS----- diff --git a/project1/cyassl-3.0.0/certs/dsa2048.der b/project1/cyassl-3.0.0/certs/dsa2048.der deleted file mode 100644 index 0bcb0b44d95d1ce20ee8b9e5feb2718bc9050334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 835 zcmV-J1HAk&f&)JS0RRGm0RaHaj>(|ankO9EQs2kG<_4rbie^dBSu;^-#GGDag~#!$ z)!AaK{h{C+SO1pp44=qEhwEIC&_+TDP--K~iEmZuY7wcZGOIHUQMGwdw5y^e5sl>} zzS!}dP7-gdL{xyOw1H?&L=Lz)^S*-!bfU(3*J^zVh*yJ1+|OQb?r046{{sY&s`m$& z_-9&!BW6cn!$WQZk*p|Y%ka|$$O)IVt^r!=JKK zVF4+smdhYuLLItwOJl(T6#(a@In-)5UX=zp2X_kVpabi8f|~+@0RaG-)J$Zc>(ONG>2zTDS)UuhxX{9=*=4(hB)@o3`Q=<;K?v1)hvI( z2*1o)f{xVGNvfjy=E0rt*_N>X3|ljf2Hl+~sp)`0JJ@=ZA&*w^qO>cC9CZJFk=!4V z6PT~Z2GUHBqP^M{x@E8}Xooy*C5@2BybY;C1IfP6g>TyjdyM$8!buQmV^%lCFw*;R zn&^TDEBWF``PpYf&l<#OS`wpNR}oZ1T=q#Gc6>xDVO5}caw<|+Z&U(ERY%rJ0{s#^C}5g+^i+EsYN@YI&5Kt zzi8Czo5d+eU=aDt)L(`Zq zgV+>j==jx7tl&Gpr&JbRNn|Eeq-$w>x{8C@E@cX$C-0e=2-mfrpaJiG7r%pRF5SR6 zI3sAZc5CIz_k8ZaQsUjMSvo=nMX<-gcLlNxGC)SE+Ie>bao>6Z6#$s-xluPhbrTZ? NkCfBq=>W@OZJIn>m1zI~ diff --git a/project1/cyassl-3.0.0/certs/ecc-client-key.pem b/project1/cyassl-3.0.0/certs/ecc-client-key.pem deleted file mode 100644 index cf9812d8..00000000 --- a/project1/cyassl-3.0.0/certs/ecc-client-key.pem +++ /dev/null @@ -1,9 +0,0 @@ -ASN1 OID: prime256v1 ------BEGIN EC PARAMETERS----- -BggqhkjOPQMBBw== ------END EC PARAMETERS----- ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIPjPkmu9HijxqKuhI08ydBiIUK1+x+yS+I+XTa9WiWXHoAoGCCqGSM49 -AwEHoUQDQgAEVb/0D0RQmj3Om7fwxU31cHvU7CSOGYDsWkyiJANiLJva76I1EkOE -dhbGVpUGzAGpvfZ1GkL3vamyNiJfx11/tA== ------END EC PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/ecc-key.der b/project1/cyassl-3.0.0/certs/ecc-key.der deleted file mode 100644 index a88d141e08cceb829f2bc756ffcabd7d8e8c0b79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 121 zcmV-<0EYiCcLD(c1RzDWX##VcY=xmXTXN{=$E?HyjZ-xQ`fMoNG>ze?35=i$1_&yK zNX|V20SBQ(13~}x++j1?=l2(Pj8`LPkYu4B+&MFH`^#;L)q0{s)EB3rD zNgoiMhqn~H@g;e$B`^lq%Q0rH*ztTy;s@5L)UIt#!p$F~w*2rc6Z&((N zD7XK7yL9jY)3seF8b5^?e-jEw)y@^%5vMPO3OTItzfiJICQ3fmR{lN}TJ+bq9{VA3 z6G8`iE0MbPenA@As{+Ve=fJ+5zddQCqW5I%@_-CfmHCh}p1Q~`1n zDS|5+PIv8j|58I1t6SUQ)$MOK=YxUoOY_ZIJ$YQ`^fed*P6r)|jrL|cL>-(Ro@FJi z+Q6X_mJZtNg&zkk<@&FMbV<#&EcCDi?rVApfXrHemk4i>QdGcl@%}V=yIbj4Ll*gG zisMVfO^gC+;w9l)CnL78aY+Xu&cIADkB_Uh=ajBw-wCO)%WE7O-hzR@2wgwGwy~(CoPltsPBMoT9C!}!82;-^H!JDk_xe%B zSh?5+1MR>A7*&gy{;~GZJ^Ew7I2p$P?@gItw7SmY&e>}%c9j47cNj|kW$+4-TstC^ zh0q`vSuUkB1FRcgcrpem4c0 zAaiT4V@o42+&5+viM-(Wpj|CjW#Govn`S3s?8CT>*sit7zYhL{a%j~@4i5OPomQ+* zt%#ta_WU@_mRnwawwSx~itPHxw~%$94tHz)Sw&h5|CNo-{+sq0jtij-?#6lDoneJs z8Ei+)2>+#G+vF`R-4timN@OZ#NmQKUg&5~CLgLUYAfR*)A0UaktAN-z*+yx*@63y# zbEop;I9=9tpNI}t&DexlDRcFqdD?m(zjK4YZJ&!Y6~Jw2Y9QuO&qZ#`1;jeQo~pqH zFRPg_;clHpdjF};aJUv44j}r$0)c@5|1c54JZrSpo@>FA(MZmKExxb!y0X{9#8Yk+ z0;*xT>IIv5XA92R`gt0#il^MkUBGJB(i{k60GBUCS%Wtx&L${H&XD#CtXD!0)c@5 z>PV;Eb3s-i7573#O{w8#TfHTH_o!tPt}Qqb&6E5vqbx+b&(I-{`@#9G9qyLTmq}n# zfTg1N?zz=>MBV)vD)E8z**xrX&??wGCx>|whUZrdS+IT<7V;efA7YDlT4ZM0)c@5#kL@fH1pl?N?n3wTu9_~I{W&n9OPqn zF|5)hMI&tk_2kk>g(e8)s-Vs;9c}!s()mJu>TOwivyn?4R}pRYvqa zkMayKeq7y%Njq7&hrGtcB#IDYAs=QMKJ-}8Yz;uNz#U^k4#ZXtz|6wdW)8%wwKMin z0)c=Te&(gN(K%{JRjeeIn-VB(dt3!2T5<(`LiK|hcq~n>v^JKhy5OuPovCUmgSl_J~C96*EXSytDnPOGkPXVIhaY}b#L4vnmM|4$&zeC3fq-{EwiJ!U69|6E#Ol<#4Wyp4Zr&Pt z_=$+`Haro$gXl19fqX~vP0H$40b*4yONptyZvpmn0;=PLW(Jisq2kJA{-Z5Jmz8X9 z)wDSF`IRvG_?#sxwiHp!F0)(K+#2jH30prp(6~+~AKWVLtf^UD2V)U~3)FOgwtZqn FzgDSPO>O`H diff --git a/project1/cyassl-3.0.0/certs/server-cert.pem b/project1/cyassl-3.0.0/certs/server-cert.pem deleted file mode 100644 index 8381265e..00000000 --- a/project1/cyassl-3.0.0/certs/server-cert.pem +++ /dev/null @@ -1,158 +0,0 @@ -Certificate: - Data: - Version: 1 (0x0) - Serial Number: 2 (0x2) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:27:13 2011 GMT - Not After : Jul 20 18:27:13 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=yaSSL, OU=Support, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27: - 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6: - f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75: - f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab: - 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e: - 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25: - 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c: - 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6: - 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc: - 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8: - dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3: - e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9: - 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0: - c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77: - ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4: - b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22: - a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f: - ad:d7 - Exponent: 65537 (0x10001) - Signature Algorithm: sha1WithRSAEncryption - 71:4e:d3:62:df:cc:4c:f7:cd:b7:6e:52:0b:6c:6e:e0:bd:c2: - 2d:07:d7:c0:b0:6e:43:1e:35:bc:30:01:50:f0:ff:99:23:6c: - 18:1a:41:b6:11:d6:d4:19:61:fd:e4:77:97:1c:39:e1:57:ab: - c5:15:63:77:11:36:5e:74:e2:24:0b:1f:41:78:ad:b7:81:e7: - b4:40:66:80:f0:4b:91:a0:6d:a8:6e:3d:53:d9:8b:ce:2a:e1: - 0b:45:65:87:a1:96:ae:ee:3e:88:d5:12:1f:78:17:ae:2c:c5: - 73:44:d8:dc:f4:af:d8:cc:ae:4c:e1:0c:be:55:a4:99:f7:6e: - 96:c0:c8:45:87:bf:dc:51:57:ff:9e:73:37:6a:18:9c:c3:f9: - 22:7a:f4:b0:52:bd:fc:21:30:f8:c5:ff:1e:87:7d:ad:a2:5a: - 35:f5:22:a8:b4:0a:76:38:e6:76:b0:98:af:1b:ec:8a:0a:43: - 74:d2:85:34:37:84:07:e1:f6:23:b2:29:de:a6:b6:b7:4c:57: - 7e:96:06:cb:a9:16:25:29:3a:03:2d:55:7d:a6:8c:a4:f7:9e: - 81:c9:95:b6:7c:c1:4a:ce:94:66:0c:ca:88:eb:d2:09:f5:5b: - 19:58:82:df:27:fd:67:95:78:b7:02:06:d5:a7:61:bd:ef:3a: - fc:b2:61:cd ------BEGIN CERTIFICATE----- -MIIDkDCCAngCAQIwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTExMDI0MTgyNzEzWhcN -MTQwNzIwMTgyNzEzWjCBijELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB01vbnRhbmEx -EDAOBgNVBAcTB0JvemVtYW4xDjAMBgNVBAoTBXlhU1NMMRAwDgYDVQQLEwdTdXBw -b3J0MRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZv -QHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCVCOFX -QfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hnf/5cnFF194rKB+c1L4/h -vXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/XGQ0lT+FjY1GLC2Q/rUO4 -pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bMQLRpo0YzaYduxLsXpvPo -3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq0KGWSrzh1Bpbx6DAwWN4 -D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ6dgIvDMgs1gip6rrxOHm -YYPF0pbf2dBPrdcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAcU7TYt/MTPfNt25S -C2xu4L3CLQfXwLBuQx41vDABUPD/mSNsGBpBthHW1Blh/eR3lxw54VerxRVjdxE2 -XnTiJAsfQXitt4HntEBmgPBLkaBtqG49U9mLzirhC0Vlh6GWru4+iNUSH3gXrizF -c0TY3PSv2MyuTOEMvlWkmfdulsDIRYe/3FFX/55zN2oYnMP5Inr0sFK9/CEw+MX/ -Hod9raJaNfUiqLQKdjjmdrCYrxvsigpDdNKFNDeEB+H2I7Ip3qa2t0xXfpYGy6kW -JSk6Ay1VfaaMpPeegcmVtnzBSs6UZgzKiOvSCfVbGViC3yf9Z5V4twIG1adhve86 -/LJhzQ== ------END CERTIFICATE----- -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - e9:d0:a7:5f:79:25:f4:3c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:18:15 2011 GMT - Not After : Jul 20 18:18:15 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: - f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: - de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: - 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: - 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: - 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: - a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: - a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: - 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: - 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: - 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: - 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: - de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: - cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: - b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: - 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: - ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: - 36:79 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - X509v3 Authority Key Identifier: - keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com - serial:E9:D0:A7:5F:79:25:F4:3C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: - 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: - e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: - f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: - af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: - 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: - 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: - 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: - 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: - 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: - 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: - 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: - f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: - b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: - 5a:1f:7f:ca ------BEGIN CERTIFICATE----- -MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD -VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G -A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 -dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx -MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q -8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k -EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A -dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ -mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ -CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O -BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd -P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u -dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV -BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG -9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 -PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH -Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr -G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m -ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi -rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem b/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem deleted file mode 100644 index 5f25d9df..00000000 --- a/project1/cyassl-3.0.0/certs/server-ecc-rsa.pem +++ /dev/null @@ -1,54 +0,0 @@ -Certificate: - Data: - Version: 1 (0x0) - Serial Number: 9 (0x9) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Aug 8 21:58:29 2012 GMT - Not After : May 5 21:58:29 2015 GMT - Subject: C=US, ST=Washington, L=Seattle, O=Elliptic - RSAsig, OU=ECC-RSAsig, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: id-ecPublicKey - EC Public Key: - pub: - 04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de: - 9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c: - 16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92: - 21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33: - 0b:80:34:89:d8 - ASN1 OID: prime256v1 - Signature Algorithm: sha1WithRSAEncryption - a0:1c:de:98:e8:61:c8:fb:0a:0e:af:ea:99:4b:c0:49:e6:66: - 68:5e:7a:18:b8:0c:e3:0f:16:86:bc:b5:86:79:02:69:1c:b7: - e7:ff:53:d9:05:5d:27:39:24:54:67:14:de:ef:8e:c2:a0:11: - ca:c8:27:99:b9:d6:e9:71:1f:86:c9:8f:b1:74:a2:9f:93:6a: - 0c:74:cf:17:77:8c:26:08:6e:a8:ac:69:d4:55:15:a2:95:87: - 43:7a:ab:72:93:73:40:58:c2:bb:9c:89:f2:73:20:69:df:f1: - f3:65:08:9c:00:67:97:a6:71:00:2b:31:84:10:ac:bd:54:ac: - fd:b3:eb:12:36:77:f6:0a:e3:9a:96:d2:a6:22:bc:1d:6b:ce: - 3c:0d:7b:d9:1c:1d:f1:ee:ec:ce:83:c8:98:c9:65:3e:06:31: - c3:b2:87:da:09:b4:90:0b:e2:6b:29:0e:d6:ae:53:1d:10:98: - e2:dc:f9:63:38:a1:a2:af:46:23:a4:4c:ab:0c:0b:08:be:cd: - a4:a6:6d:46:f0:f8:e0:31:99:85:39:10:4a:a0:04:54:3b:21: - e1:e9:b4:f3:a5:06:cd:37:ae:2c:ca:5d:ac:90:b5:ab:92:81: - aa:bf:2d:3f:8e:ee:4d:12:81:0a:8e:a4:ca:87:93:af:b0:25: - 7e:e2:07:f7 ------BEGIN CERTIFICATE----- -MIIC1zCCAb8CAQkwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTIwODA4MjE1ODI5WhcN -MTUwNTA1MjE1ODI5WjCBnDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0 -b24xEDAOBgNVBAcTB1NlYXR0bGUxGjAYBgNVBAoTEUVsbGlwdGljIC0gUlNBc2ln -MRMwEQYDVQQLEwpFQ0MtUlNBc2lnMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0w -GwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 -AwEHA0IABLszrEwnUErGSqUEwzzenzbbci3OlOor+ssgCTksFuhhAumvTdMCk5ox -W5eSIX/wzxjakRECNIboIFgzC4A0idgwDQYJKoZIhvcNAQEFBQADggEBAKAc3pjo -Ycj7Cg6v6plLwEnmZmheehi4DOMPFoa8tYZ5Amkct+f/U9kFXSc5JFRnFN7vjsKg -EcrIJ5m51ulxH4bJj7F0op+Tagx0zxd3jCYIbqisadRVFaKVh0N6q3KTc0BYwruc -ifJzIGnf8fNlCJwAZ5emcQArMYQQrL1UrP2z6xI2d/YK45qW0qYivB1rzjwNe9kc -HfHu7M6DyJjJZT4GMcOyh9oJtJAL4mspDtauUx0QmOLc+WM4oaKvRiOkTKsMCwi+ -zaSmbUbw+OAxmYU5EEqgBFQ7IeHptPOlBs03rizKXayQtauSgaq/LT+O7k0SgQqO -pMqHk6+wJX7iB/c= ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-ecc.pem b/project1/cyassl-3.0.0/certs/server-ecc.pem deleted file mode 100644 index 3d7db6a1..00000000 --- a/project1/cyassl-3.0.0/certs/server-ecc.pem +++ /dev/null @@ -1,55 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - f9:ec:48:2d:d0:a4:49:6c - Signature Algorithm: ecdsa-with-SHA1 - Issuer: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 22 04:02:45 2013 GMT - Not After : Jul 18 04:02:45 2016 GMT - Subject: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: id-ecPublicKey - EC Public Key: - pub: - 04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de: - 9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c: - 16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92: - 21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33: - 0b:80:34:89:d8 - ASN1 OID: prime256v1 - X509v3 extensions: - X509v3 Subject Key Identifier: - 5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30 - X509v3 Authority Key Identifier: - keyid:5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30 - DirName:/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC/CN=www.yassl.com/emailAddress=info@yassl.com - serial:F9:EC:48:2D:D0:A4:49:6C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: ecdsa-with-SHA1 - 30:44:02:20:36:14:3b:c8:19:43:87:b9:3d:aa:32:6f:18:9a: - 4e:07:0c:47:6c:e1:dc:87:fd:ad:f4:2c:71:ec:04:ba:c9:58: - 02:20:65:4e:67:ee:68:26:ed:1c:03:11:0e:31:91:69:f6:16: - 27:06:f7:33:68:18:0b:5d:63:5f:8b:e8:bc:d6:00:57 ------BEGIN CERTIFICATE----- -MIIDADCCAqigAwIBAgIJAPnsSC3QpElsMAkGByqGSM49BAEwgYsxCzAJBgNVBAYT -AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYD -VQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5j -b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEzMTAyMjA0MDI0 -NVoXDTE2MDcxODA0MDI0NVowgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNo -aW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYDVQQKEwdFbGlwdGljMQwwCgYD -VQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW -DmluZm9AeWFzc2wuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuzOsTCdQ -SsZKpQTDPN6fNttyLc6U6iv6yyAJOSwW6GEC6a9N0wKTmjFbl5Ihf/DPGNqREQI0 -huggWDMLgDSJ2KOB8zCB8DAdBgNVHQ4EFgQUXV0m76x+NvmbdhUrSiUCI++yiTAw -gcAGA1UdIwSBuDCBtYAUXV0m76x+NvmbdhUrSiUCI++yiTChgZGkgY4wgYsxCzAJ -BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxl -MRAwDgYDVQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55 -YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkA+exILdCk -SWwwDAYDVR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCIDYUO8gZQ4e5Paoybxia -TgcMR2zh3If9rfQscewEuslYAiBlTmfuaCbtHAMRDjGRafYWJwb3M2gYC11jX4vo -vNYAVw== ------END CERTIFICATE----- diff --git a/project1/cyassl-3.0.0/certs/server-key.pem b/project1/cyassl-3.0.0/certs/server-key.pem deleted file mode 100644 index d1627f4d..00000000 --- a/project1/cyassl-3.0.0/certs/server-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7 -qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf -P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj -xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk -wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC -Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv -n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd -x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y -oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz -0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB -QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD -LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8 -ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8 -yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT -3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N -zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB -hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv -VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB -qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf -H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza -1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ -c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe -9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY -dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n -WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA= ------END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyEnc.pem b/project1/cyassl-3.0.0/certs/server-keyEnc.pem deleted file mode 100644 index e5ab57d4..00000000 --- a/project1/cyassl-3.0.0/certs/server-keyEnc.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-CBC,136C7D8A69656668 - -jvNTyPaztxPIoAzbdmZnD0Zw2+60tMxNc0GMHNmeOyG25aHP/dT+TWiKFpFVkkkY -uoCIhYUyw7gmpw+CnRJwWd+ans4nrvAjwy5oWJvarvsyUpjqvnPoIlAqd+d4TDKN -eESzcI76+gHdisAtCrQD+fGqgTZhli5TgDbnpasL/QnY2qDlutvakkVw7gPXe156 -2Phy8WN+efr65J6wt3K/dj7Datl9u4JeHQK81gYyWBVX+EagEjPGDzkFQCj9Z0q7 -8K3iB5GW1JAqJS0IfZPB40AnSTF/n1TL1SN3qfU3l7hTGNrx9o7580bgDEoAR7pI -F8eZlS15KHtZmh11AnU1KTKZ6kmgnNqeMTGMN6N0ct2wMKW1dV87eTDlF0oiR2ol -XwtFgKmrIjfpmzkdWjbJmWnGMjD56KdiFZga/ZyKMsPrVoYLgfJEpn36iQspfygx -HCGNTf0PjIsjEWU0WyQiF86t+c45W3wNFsv/AxVyfMl+su02yrd6u2ecuQDir3Cs -b2k8IKtQgVe/NIpEWLKuiHG5oedIPPQyDYK5uq+gHxCGeOoKnWlsWFEHZRiza4X5 -tbgTrJB8Sw0ENWrvVGGmQZN4pSImlsMwzQ2qik5CQ00N1b3+56/obn0z75I3bUSb -tC5g8DRjl6oclAenNgh/MYMT287y5W2dD4npxHcekX4O3J2CDXNfg4vV2j5GRxtg -LVJdYE2p7bpYePCDHrYng8b9ubBprx0CrEnkIvvtUjzNPf6VDL0+MBKl+XgR2/nz -iRqTuZnlGGOyM+KYDwXpgwfs/HfvFGksxTAlO/40GkGh+WGPaIoNyCK0SgQKhyb4 -JIkR0vd2/yLg3lWMJrGwh7A0Gm07Z/781oURP3uWd+PaCOgGcd5ipcAjcEyuxNly -AthipWqmQWUcbf6Z2N9j3OA22Hv2Uzk8HSfi9VOZtL9svdEEZ0NnOekJgnc6stQp -bXiknlK/T5WdrWxSyCfgUq68Vf6DFfIRAVuFdJ3WHT2wVXHrDfft6D+Ne/XCxPoE -8zGmkyusaph33UHQ1oNyUbLbwcDCDSmOo8gYoedD3IwxtMA3wJRugomqosItwV8X -vkgmcy8eSE/+gZUxJEN2gnLcfKFhCkC80J6oFhmoDD6vuUnPHcFdKZgVPw2rzPk5 -Vb1kX+gpORplYmKpq1vz/ujscL4T0TmYLz02hkIS4edpW55ncTTv7JWefpRiTB1J -RB3td3me4htqR+YIDWJ+emrOmqsCG2WvpAS+MTw2mj1jYk9LL/ZYobTjSCEWmuwT -yVK6m303irR7HQDauxhslRFgoK21w63viOyj5NKIU1gQtaAANGDxcgORC1XLjjgt -oNutSQA+7P42vfHSHK4cnTBXl6V32H/GyVpdHQOZqSrqIjgLmUZodSmRPROxosZF -a46B1O7m/rJFxkiKW4vod+/WqjoE0Hhfrb8rRrkRjzGeCqqSSnQ3vrunVkvF8hlA -b6FOv4ZBJL4piC1GKH+rscqke9NEiDqXN8C3iYz86jbck/Ha21yUS8T3X7N52sg+ -B3AmOGnLK6BebYeto9vZxQjacChJZSixSxLV+l9/nVQ0+mW42azHdzk0ru59TGAj ------END RSA PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem deleted file mode 100644 index a24c5a26..00000000 --- a/project1/cyassl-3.0.0/certs/server-keyPkcs8.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDAlQjhV0HycW23 -0kVBJwFlxkWu8rwkMLiVzi9O1vYciLx8n/uoZ3/+XJxRdfeKygfnNS+P4b17wC98 -q2SoF/zKXXu64CHlci5vLobYlXParBtTuV8/1xkNJU/hY2NRiwtkP61DuKUcXDSz -rgCgY8X2fwtZaHhzpowYqQJtr8MZAS64EOPGzEC0aaNGM2mHbsS7F6bz6N2tc7x7 -LyG1/WZRDL1Us+FtXxy8I3PRCQOJFNIQuWTDKtChlkq84dQaW8egwMFjeA9ENzAy -loAyI5Whd7oT0pdz4l0lyWoNwzlgpLSwaUJCCenYCLwzILNYIqeq68Th5mGDxdKW -39nQT63XAgMBAAECggEBAJrQNA9SYgVQAe+f7WRuwsTaGvKE15IQSJLE6Wrri3Vs -xnk48slySoZkVJV3y8OanbfUHaQAyJ5O5N3HumcWwXS8qdaUjyswGvvt3yEFI9lK -Ob2Ya2WauNzEfe6mQxUuPb4dImAqczDVPtiirIZDLsT1ZF4/iXUPEdhRJU6f2Kqj -zmCz4orZfhvwZMqaWwULW6rL5eM/bjIiBfPQ+u90UoHiX3TTvf8xg0V1+mN6ly7W -thnGkibkKAZQUA54Lql4DRSXtBLYMUCroQFBwjD4B18W5GF30mDyn43o9LrrY94q -l4HvTGzmVTRRKyg09FMcxFgKP7uvtfdKhUMtPPFYWIECgYEA8ixUdjkjY8kQMreT -ra++GXWWgWTmtbiJQkHRbdAcG/gbrGnLNjxkfdz0GbjDYLFXSF9ST1k6VX8ywBlD -UD+uzm8X8w6fQMpOrRU7yXnpwFk4c3CcCnzJOkgyp9hJdQqFwsL9FXPamQkqaZqf -CnG/sASmjHpab0haVDvGsVMX3+cCgYEAy5PedxVdt1xcfNiQqZgt1mkOY7Oj3KbM -i2qkohKMjntILLJLN9wGGH3q/nah1KHpPw3NG1+vX56WW1sPoXyvs5uQ21dzOu2w -I0SuQU8fB0ITI0zL+vQUpNX3njZ8W5+oPMGFX3TSOS3/0ITf+7Mgei6bF67muguu -X1OkUu0bxJECgYEA7Jjau9X++VJKfQJVSW9VblIvhKMrs4Zis1TSY1La44h2oO+L -FaXTGBRyd17HowQfnhlitRsbnsPytTL5TMGq6wwmfdRfSlFcpEUGcESnVsDUIhR2 -nthjUImQ0+K/gZWSMUGHORpDCxilUx85Gl8fQ7yHat9u0yIA/iKYcE4aGSkCgYEA -ikFWKFGeX9SeCzuYo1TybFbUqulpM4UkDNrUDC3Ev08CaTh81ObcTO3XFhHDPgDn -wybAUQLeu3Wcb1acevOO78+KxSvS2gZqRMlz/m6Zh/hbvvF85mW1T2zwycX/FsqL -GxfiWD2iN6sBvL9AzlOMju3v7lmd4GPmfF71jkvxO8ECgYBNRflAjMVb9CoairTy -HKxr6QxWNrdOcpbV5YrS4v/x8RgTPYYJuNh2p8kccVKUMEPg8Xh0/WEbTAnM5mgq -ca0c30O8VtulpL41cKRez0/8AFWZOj0jz2da9SL4tSnQRBHrNS5Gvv2OGLJfqL8Z -MqH13APmfJofDHypsA4hNzvxsA== ------END PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem deleted file mode 100644 index 4be31a32..00000000 --- a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc.pem +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIE6TAbBgkqhkiG9w0BBQMwDgQIr3AyvPqfFRQCAggABIIEyPUs6wCboqtKmExH -zfez3vfHn2cp6s3X563Bz73hYn/8vXtI/q0oDNOpgav60/N7rMy50fno3LmW0/6E -+UN4MwofmBS3lp1ZVY3KmzDy6lz5vcFo4GCCj+X6dacsyBQ4lFOge5BihQ3R9cKt -dSrd1EFKwGGu3qTDG7ajTZukmYjxuRqpyHqPO5OJO7yXxHOB7B7sSKIyJRCkkucd -oBC86kQdWraweSYj+Klza6VjKzmNzDBx9Fyhrj9XGXJ3rJLhjgNpelwX+PIMU31i -/yklI4jm0aMSoAvXgdBXZuOsnsI27GXxy//i7AOgLLWi+Bu4dJSSl5PMtespf83u -5jSysJymXiNcN6vEautGyjCujdMs5c/FEMbgubAMXymCI9DsAN+5dNMDY8Zrfqdl -hFKfctcu8BxFa+0tavJ28fOEBuEyJLsQ9OvvS7dn4AV502JRKWObfsw7fi+mMzMu -oxhYo99MRqic6a9uDmYB3SPeU31eOHiEi0n51D7Gtcn++F+IaDFwSHMirThzakGn -go3nj0yq62euzVcEuhIfTTAe3F2tqzpzznVFbs1XgrGVREJ6gp5vRgMUUGYIqQir -p5oW0HVRI4iuoSjdN4/wNAxIP9zakwYx+vWx1VXhDVEJfgNmxDRvEbF+OOz+iJCf -7A2e8L+kZ/5oC3HO8h7GdHNTUjRRdh8FUM8lGo+HbMYDznMy/bJlIP2bx9hIIha7 -U70i09glS2Z7Ei+VecJbvFzdro0vdYyGO2ef8bWwCc5JMucxDcRklWdUxK6amKJN -VpXL3TW0VYCfr1rLmZXUfBGk/KXM20/BoM04WLjeR3oiV/2b7SYK7GnJ7kBmAHHx -gnrwMDO3JvH89CwlHRizVSQl59ViqEMGLmbHThcMqkEOkFphB2xox7/IOVyp6cFn -mY0ZCrbhdX+L6t5jiyq/4us5bzF7FOBYsJr6n1Rm9b8eeOL693y/6uM3CvTJcTOb -5RqWiHgTgmefeOeUQ0/dVgvEOIWz2yqBQmHKiB4+0CGGIRwUOXBrTKSLilumsjQe -qGhJ6yw25VIpdXsMD1WVviczgRTNYjdldIJoHQdvpCEAhQ1RR3rkuIPniTumJFmY -CnjfNqjtkaZWIN1nOCmcu50tswksWEEFEfkcP1xyzhr3EVCYAoFncLTp5vHBtdmg -6KBdar40/OFGAcbDGDX1g3XEEi6jHmy0Lyz7M3DwESgaMgwzscsQLr+wMITk1IUN -yfiXHl1CQjGxhDj8KoAhdDjjPENkSlCSd1vEO+lg1/IFb1dtnL2DJp6BQt9/VLHo -Fp3pdZ7r95H20+pEhCZp0HXLNo1o8xjJQ5RWUCs1Zc1cauDOAh8lAjps6MBxTa3a -LOgTW9lgiAQ+S1g2jK4BmqbLvZUF+Z6xupc8uE3E3HhJolmDRYojMNFNmmvODa8M -CneWmj3T1KvqEToAIq46mStlTfQufSMpaJ73Wds4gmIiGwn5hIuUN6f3kybbt4f2 -4DLZXMcjYweLi9tJtFC+JaO0rS5gtX/k/ys1QSblSU5qfRu1XfwNAcZO1ReKgGYN -ymI78cSACGIcEvAwin8CdRu3W99NbMqHW9AcCETFlTsC3wNlQxyYSem75sjPaWVF -sxLy7YxEJ8tDEJZbSQ== ------END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem deleted file mode 100644 index a1e43887..00000000 --- a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc12.pem +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIE5TAcBgoqhkiG9w0BDAEBMA4ECFytdly5R2o9AgIIAASCBMOa6fgAUIR5GokK -Z81YZMxC3sNqAwjLEkOwmez2za2fq+2mw6T8tB5W75lFpWyXD1MDPa1PpLzyw27c -d2C8nipCzp37yYLmXr+aS519CBJR80ily/WLcdv+ScsA6pjOEW2p+VDY55jFp2pr -n94/K2nFQpMxAdjxnqQCF5ewMLqzy3o3s6U3V9zIxy/xlLYi//UWFI8fqtOikqs4 -apWLNqJONRZq95OITKO/Nhz7GyEfjrewJmv4zVToEnSagSwbR4IVFn5Lok8rSpI9 -qwey9wsB1CguVwR0O2NjDVKUGXinfhdr+zMQlCoz+xY/Q1TkH4gEY5wpln4cBvtm -PL/BnD4wEWHh8vS61wfOQ7wPgY+cdCe75stTrKzc6amVJB+40Qi3Vt4TEPGwcP16 -/qGl0zpYuAgilPtuEBw3GX3LiigpHmSt43D3DiYNGzv+Aran2Ei9iGSGeI2zHz8r -WFZEnptAwlqeyL7+MZjAOXlu6QG1yix8HvZLmtBHrE2MhuR4KbS3fAUCNQpn8OKu -zxYzs1ti5F2V4c9yK63gSz3H1ObRNsM2OkpUbSVGqLUN6a8HsI6yYh4we6q0gxKD -VGdzEz4S1BFEBfXWVSPnRNMR4YD8kiQEPutUZFLiWWZ7WliH5yNfHZUia8dovxFa -MWmAbSjMKRGvV+LvAGQHYBVfJSQO6VvBfBDtu0H4rLr8urmcPY+hbw1XxGfKSQp1 -iIdvVwjefl8wM9LSRsvqY5l4mu+XDPanQlFbzKBOSyLQts97ys3AR+jkK8Bmv14l -xmCF8bJzzz5a2wAqbPhWIbk4J4VfcJEXNMzd19w4SxGv9fUXNiZZElUdNE+wtRsQ -YvACYn9sZ6JUwg9hNTLXuXZY47LuQrrdTDHupoVA9zLvUYMKgO+pjwS8uy1dLQao -0aztHLZEXuVJvpiRoMtYZl37ZNoLHQJeZUNyNATshAoD1+uSc7aywl8yqdTzXRR2 -g0rkExXEVJ5OPyzbFdOQSC5HoOC7dInIBmkrSFEJMKDkMzwYI+uSoIbn+8i+Gjzy -Vh3/lftts/BIvr4NAh1ZAq/215jZSdAGo+1VZeuBeybwh3RBdBl8PhDBviTvbxSk -P+F1T+UcbAz9bgjQJgNvDb9XHNI8rfEhfDPX/Pr4VvxBZNndmRJVQDKi23YD/7yF -WAwXy418M7DPqp7NYmUHFe7JRm9bHk41EeknLZaZGW5qHwQKA10RoJCgjoOIFTsd -kD3Qq/0mEuOiuJn5UPE19xtUpvFWamDf3s3zSHM7VJ+gGNrS/WbQ+KmTimj0Wucd -2vWiNCGbhWwmp3LLKQlB5xDwXJy099SZUUkgcxGmfcT7FOpd3QSLYnwtPz8uLW0N -76zbiUTYCQ/ASLrwcKFGCKKBz62DlRreK23E/RjqkKKCVFzzg8AzQTa02ml+wQyG -+5EOwEF2yIrhV0p4hY/GDAIe3cdchiy1EQf6xH/IxPF/QsKNp0CfHVPgdFwLzjM2 -oFD3analGblxp9CMiDbiKTOdFPL8XcguufqpWra2jtUbe07HQaeU2NcM2TeB2KsU -PhgBwgdNxW69K55iHReaZtuLw0GhD+KBrm7gSteVniiYLzLKzxmMycGGtoNwpbGi -MMJBE+BYZylG ------END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem b/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem deleted file mode 100644 index 297f2a02..00000000 --- a/project1/cyassl-3.0.0/certs/server-keyPkcs8Enc2.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIxaI9IblN3acCAggA -MBQGCCqGSIb3DQMHBAi7kwdRvCrqMgSCBMjkSOSVfmu42O0q2GzFrJVr3cam9ZKe -InQsxqtgADdBxMgJJVnr360tUNPQyyvfCH//Duhz+aJIC0MQZkWR3ZSy5pfHX+vr -C3wd741VOlI44uEdzRktlPc11saMDyKS04/K9aaYIDqspOiobt9WZLQildXl1n8j -N+7Laj7A/vxJ5GUJ4hdPwQOIeuJXTDDzn+Ld12XXGH+Iw1M5Cx3tBw1TNizSnmXQ -vf/MsfsWsZbHBppCXZbF27jJA+6Bg7dGT0OZM0pI+ZQvyHr+qjog0hollY9KjwTG -h+hsM7umWFJdeRMrmkTrX/R9HY/c5I4ExNSp1AtMmFeeU8h2VTJtYcoykUU1q2pF -KHfjPghwmYromQGR4nPA9sqa9s+VMq9OaqoJDoBwNobdFr7sEtMLT08vTa0+rMX7 -bmjAF44/dVBYpBxXjTQ0pXVeb24Q00Sn6NOI4fTsBnkR+WTtuwz/L0qaGnJlh10y -sQ3+95cUtZc3SZS67yYUx5auswqT3V4JCmhJcHNi+/jHyrj9D8nVWibQ2TBmgUf+ -0NzvdKb7sraEx7PSgFWDMLoQrd2+cqsJArpY9TbLSLhBDrOVc8v/lXYuK6QI0gMd -HIwAZARUZMoI3WS6icTLYyLdQPMsFzI6U0arkbrdhjNNd3kVqeFEJ+oF0rkuAcJJ -K8eUcsby1AIBS/9tuW1gSYubmuXsZX8xbYbJnHUqGOTAVa7jo8eVUTiyUfPXa+0N -s1tTpZXtOOlqncZ08mPHppshdKF2cpuh0JNjiR6fHvXytGWFGMsKtxdwKs/14UCg -qoTW0EQU4ONfBxR2PtX8PlNV4bOt704HP8Vc0H9JV2uWpJaLRzY2bBiPgKcrO9Eh -83zFrPu/0obBQTxnP3mMihxvCndflHQqeJ0V1YYw9n4+XbgBqULXDQs7OetRohnY -gYyc//NdC2I8mbdabFYvUTWSH6oMA6lqkwTjTTwtn5E8BJkRi1sIq4jNFUekpm2T -5AwP7xWn//PM+B12CPoIgYtYT6Yhbf8arXuGU28y1Ahhi/hKcpR9HRPQeyaR62vi -skjjycfn38wcj0WrIVnOceGgPa3EBrkkTaPUHvMQ5G/xzMZ82o3CnmwdnH+lp3eg -TLcLm8Yp9InkMJNVOrGLxFvmTljl3h9x2JVuE0wtuWt91QVmfCZo0k3Cx46ad7xB -eK20veTy+PySy2U3W1twGfsXXXRwaQiXXRrgPciK0LcGXZneShZuebk04U31sq4F -rYaMAzIDDmvwbjh+UpNcl1VdBDGGePxzzOD3HHYPbm240HVMPuS85P2kFjak3PdJ -GqsRUS1SRp1e451aFGjzggPLXFjAfDMaxrgjSWapRzu78i+xvcvf69979oX0KO9Y -KMSC14RnmnT1+UdKxX+p9r1AwfH/vJxM34AOSva1uLiSJckRGYGOzuaYsTT9ZAx/ -q3CNALF4qFUMWmJnvQDYmCUnw6lJl3CazbtV5RI2ILQX6ZHR6YAHT5hYY43k+AnZ -mFW6BGKoX/f4iVqYtjQWiGWAJAf6C9+548O2t9MiVcgQf4Nvj6lFLM00pzFn7jW4 -DsDFUBmmrSF8wfR7SRpOc/ViVZBRleYPLsMu0tmD29fowqqBY0MEkxqSahFAGTgk -sao= ------END ENCRYPTED PRIVATE KEY----- diff --git a/project1/cyassl-3.0.0/certs/taoCert.txt b/project1/cyassl-3.0.0/certs/taoCert.txt deleted file mode 100644 index 15a12c05..00000000 --- a/project1/cyassl-3.0.0/certs/taoCert.txt +++ /dev/null @@ -1,173 +0,0 @@ - -***** Create a self signed cert ************ - -1) openssl genrsa 512 > client-key.pem - -2) openssl req -new -x509 -nodes -md5 -days 1000 -key client-key.pem > client-cert.pem - -3) note sha1 would be -sha1 - --- adding metadata to beginning - -3) openssl x509 -in client-cert.pem -text > tmp.pem - -4) mv tmp.pem client-cert.pem - - -***** Create a CA, signing authority ********** - -same as self signed, use ca prefix instead of client - - -***** Create a cert signed by CA ************** - -1) openssl req -newkey rsa:512 -md5 -days 1000 -nodes -keyout server-key.pem > server-req.pem - -* note if using exisitng key do: -new -key keyName - -2) copy ca-key.pem ca-cert.srl (why ????) - -3) openssl x509 -req -in server-req.pem -days 1000 -md5 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem - - -***** Adding Subject Key ID and Authentication Key ID extensions to a cert ***** - -Create a config file for OpenSSL with the example contents: - - [skidakid] - subjectKeyIdentifier=hash - authorityKeyIdentifier=keyid - -Add to the openssl command for creating a cert signed by a CA step 3 the -following options: - - -extfile -extensions skidakid - -anywhere before the redirect. This will add the cert's public key hash as the -Subject Key Identifier, and the signer's SKID as the Authentication Key ID. - - -***** To create a dsa cert ******************** - -1) openssl dsaparam 512 > dsa512.param # creates group params - -2) openssl gendsa dsa512.param > dsa512.pem # creates private key - -3) openssl req -new -x509 -nodes -days 1000 -key dsa512.pem > dsa-cert.pem - - - - -***** To convert from PEM to DER ************** - -a) openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER - -to convert rsa private PEM to DER : - -b) openssl rsa -in key.pem -outform DER -out key.der - - -**** To encrypt rsa key already in pem ********** - -a) openssl rsa server-keyEnc.pem - -note location of des, pass = yassl123 - - -*** To make a public key from a private key ****** - - -openssl rsa -in 1024rsa.priv -pubout -out 1024rsa.pub - - -**** To convert to pkcs8 ******* - -openssl pkcs8 -nocrypt -topk8 -in server-key.pem -out server-keyPkcs8.pem - - -**** To convert to pkcs8 encrypted ******* - -openssl pkcs8 -topk8 -in server-key.pem -out server-keyPkcs8Enc.pem - -passwd: yassl123 - -to use PKCS#5 v2 instead of v1.5 which is default add - --v2 des3 # file Pkcs8Enc2 - -to use PKCS#12 instead use -v1 witch a 12 algo like - --v1 PBE-SHA1-RC4-128 # file Pkcs8Enc12 , see man pkcs8 for more info - - -**** To convert from pkcs8 to traditional **** - -openssl pkcs8 -nocrypt -in server-keyPkcs8.pem -out server-key.pem - - -*** DH paramters *** - -openssl dhparam 2048 > dh2048.param - -to add metadata - -openssl dhparam -in dh2048.param -text > dh2048.pem - -**** ECC ****** - -1) make a key - - to see types available do - openssl ecparam -list_curves - - make a new key - openssl ecparam -genkey -text -name secp256r1 -out ecc-key.pem - - -*** CRL *** - -1) create a crl - -a) openssl ca -gencrl -crldays 120 -out crl.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem - -Error No ./CA root/index.txt so: - -b) touch ./CA root/index.txt - -a) again - -Error No ./CA root/crlnumber so: - -c) touch ./CA root/crlnumber - -a) again - -Error unable to load CRL number - -d) add '01' to crlnumber file - -a) again - -2) view crl file - -openssl crl -in crl.pem -text - -3) revoke - -openssl ca -revoke server-cert.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem - -Then regenerate crl with a) - -4) verify - -openssl verify -CAfile ./ca-cert.pem ./server-cert.pem - -OK - -Make file with both ca and crl - -cat ca-cert.pem crl.pem > ca-crl.pem - -openssl verify -CAfile ./ca-crl.pem -crl_check ./ca-cert.pem - -revoked diff --git a/project1/cyassl-3.0.0/config.h b/project1/cyassl-3.0.0/config.h deleted file mode 100644 index e2a524e7..00000000 --- a/project1/cyassl-3.0.0/config.h +++ /dev/null @@ -1,176 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to 1 to enable debugging code. */ -#define DEBUG 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntoa' function. */ -#define HAVE_INET_NTOA 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `network' library (-lnetwork). */ -/* #undef HAVE_LIBNETWORK */ - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -/* #undef HAVE_LIBPTHREAD */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PCAP_PCAP_H */ - -/* Define if you have POSIX threads libraries and header files. */ -#define HAVE_PTHREAD 1 - -/* Have PTHREAD_PRIO_INHERIT. */ -#define HAVE_PTHREAD_PRIO_INHERIT 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "cyassl" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "cyassl 3.0.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "cyassl" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.wolfssl.com" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "3.0.0" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* If the compiler supports a TLS storage class define it to that here */ -#define TLS __thread - -/* Define if the code was built from VCS. */ -#define VCS_CHECKOUT 0 - -/* VCS system */ -#define VCS_SYSTEM "none" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ diff --git a/project1/cyassl-3.0.0/config.in b/project1/cyassl-3.0.0/config.in deleted file mode 100644 index b61290fe..00000000 --- a/project1/cyassl-3.0.0/config.in +++ /dev/null @@ -1,175 +0,0 @@ -/* config.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Define to 1 to enable debugging code. */ -#undef DEBUG - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `getaddrinfo' function. */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `gethostbyname' function. */ -#undef HAVE_GETHOSTBYNAME - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the `inet_ntoa' function. */ -#undef HAVE_INET_NTOA - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `network' library (-lnetwork). */ -#undef HAVE_LIBNETWORK - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_PCAP_PCAP_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if you have the `socket' function. */ -#undef HAVE_SOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#undef HAVE_VISIBILITY - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* If the compiler supports a TLS storage class define it to that here */ -#undef TLS - -/* Define if the code was built from VCS. */ -#undef VCS_CHECKOUT - -/* VCS system */ -#undef VCS_SYSTEM - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -#undef _UINT8_T - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -#undef uint8_t diff --git a/project1/cyassl-3.0.0/config.log b/project1/cyassl-3.0.0/config.log deleted file mode 100644 index b5382469..00000000 --- a/project1/cyassl-3.0.0/config.log +++ /dev/null @@ -1,2438 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cyassl configure 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ ./configure --enable-dtls - -## --------- ## -## Platform. ## -## --------- ## - -hostname = khimes-TravelMate-X483 -uname -m = i686 -uname -r = 3.13.0-24-generic -uname -s = Linux -uname -v = #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 - -/usr/bin/uname -p = unknown -/bin/uname -X = unknown - -/bin/arch = unknown -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /usr/local/sbin -PATH: /usr/local/bin -PATH: /usr/sbin -PATH: /usr/bin -PATH: /sbin -PATH: /bin -PATH: /usr/games -PATH: /usr/local/games - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2943: checking build system type -configure:2957: result: i686-pc-linux-gnu -configure:2977: checking host system type -configure:2990: result: i686-pc-linux-gnu -configure:3028: checking for a BSD-compatible install -configure:3096: result: /usr/bin/install -c -configure:3107: checking whether build environment is sane -configure:3162: result: yes -configure:3313: checking for a thread-safe mkdir -p -configure:3352: result: /bin/mkdir -p -configure:3359: checking for gawk -configure:3389: result: no -configure:3359: checking for mawk -configure:3375: found /usr/bin/mawk -configure:3386: result: mawk -configure:3397: checking whether make sets $(MAKE) -configure:3419: result: yes -configure:3448: checking whether make supports nested variables -configure:3465: result: yes -configure:3545: checking whether UID '1000' is supported by ustar format -configure:3548: result: yes -configure:3555: checking whether GID '1000' is supported by ustar format -configure:3558: result: yes -configure:3566: checking how to create a ustar tar archive -configure:3577: tar --version -tar (GNU tar) 1.27.1 -Copyright (C) 2013 Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later . -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -Written by John Gilmore and Jay Fenlason. -configure:3580: $? = 0 -configure:3620: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar -configure:3623: $? = 0 -configure:3627: tar -xf - &5 -Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) -Target: i386-pc-linux-gnu -Thread model: posix -configure:4208: $? = 0 -configure:4197: clang -v >&5 -Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) -Target: i386-pc-linux-gnu -Thread model: posix -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8.2 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9.0 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.2 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 -... rest of stderr output deleted ... -configure:4208: $? = 0 -configure:4197: clang -V >&5 -clang: error: argument to '-V' is missing (expected 1 value) -clang: error: no input files -configure:4208: $? = 1 -configure:4197: clang -qversion >&5 -clang: error: unknown argument: '-qversion' -clang: error: no input files -configure:4208: $? = 1 -configure:4228: checking whether the C compiler works -configure:4250: clang conftest.c >&5 -configure:4254: $? = 0 -configure:4302: result: yes -configure:4305: checking for C compiler default output file name -configure:4307: result: a.out -configure:4313: checking for suffix of executables -configure:4320: clang -o conftest conftest.c >&5 -configure:4324: $? = 0 -configure:4346: result: -configure:4368: checking whether we are cross compiling -configure:4376: clang -o conftest conftest.c >&5 -configure:4380: $? = 0 -configure:4387: ./conftest -configure:4391: $? = 0 -configure:4406: result: no -configure:4411: checking for suffix of object files -configure:4433: clang -c conftest.c >&5 -configure:4437: $? = 0 -configure:4458: result: o -configure:4462: checking whether we are using the GNU C compiler -configure:4481: clang -c conftest.c >&5 -configure:4481: $? = 0 -configure:4490: result: yes -configure:4499: checking whether clang accepts -g -configure:4519: clang -c -g conftest.c >&5 -configure:4519: $? = 0 -configure:4560: result: yes -configure:4577: checking for clang option to accept ISO C89 -configure:4640: clang -c -g -O2 conftest.c >&5 -configure:4640: $? = 0 -configure:4653: result: none needed -configure:4678: checking whether clang understands -c and -o together -configure:4700: clang -c conftest.c -o conftest2.o -configure:4703: $? = 0 -configure:4700: clang -c conftest.c -o conftest2.o -configure:4703: $? = 0 -configure:4715: result: yes -configure:4734: checking dependency style of clang -configure:4845: result: gcc3 -configure:4860: checking for a sed that does not truncate output -configure:4924: result: /bin/sed -configure:4942: checking for grep that handles long lines and -e -configure:5000: result: /bin/grep -configure:5005: checking for egrep -configure:5067: result: /bin/grep -E -configure:5072: checking for fgrep -configure:5134: result: /bin/grep -F -configure:5169: checking for ld used by clang -configure:5236: result: /usr/bin/ld -configure:5243: checking if the linker (/usr/bin/ld) is GNU ld -configure:5258: result: yes -configure:5270: checking for BSD- or MS-compatible name lister (nm) -configure:5319: result: /usr/bin/nm -B -configure:5449: checking the name lister (/usr/bin/nm -B) interface -configure:5456: clang -c -g -O2 conftest.c >&5 -configure:5459: /usr/bin/nm -B "conftest.o" -configure:5462: output -00000000 B some_variable -configure:5469: result: BSD nm -configure:5472: checking whether ln -s works -configure:5476: result: yes -configure:5484: checking the maximum length of command line arguments -configure:5614: result: 1572864 -configure:5631: checking whether the shell understands some XSI constructs -configure:5641: result: yes -configure:5645: checking whether the shell understands "+=" -configure:5651: result: yes -configure:5686: checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format -configure:5726: result: func_convert_file_noop -configure:5733: checking how to convert i686-pc-linux-gnu file names to toolchain format -configure:5753: result: func_convert_file_noop -configure:5760: checking for /usr/bin/ld option to reload object files -configure:5767: result: -r -configure:5841: checking for objdump -configure:5857: found /usr/bin/objdump -configure:5868: result: objdump -configure:5900: checking how to recognize dependent libraries -configure:6102: result: pass_all -configure:6187: checking for dlltool -configure:6217: result: no -configure:6247: checking how to associate runtime and link libraries -configure:6274: result: printf %s\n -configure:6335: checking for ar -configure:6351: found /usr/bin/ar -configure:6362: result: ar -configure:6399: checking for archiver @FILE support -configure:6416: clang -c -g -O2 conftest.c >&5 -configure:6416: $? = 0 -configure:6419: ar cru libconftest.a @conftest.lst >&5 -configure:6422: $? = 0 -configure:6427: ar cru libconftest.a @conftest.lst >&5 -ar: conftest.o: No such file or directory -configure:6430: $? = 1 -configure:6442: result: @ -configure:6500: checking for strip -configure:6516: found /usr/bin/strip -configure:6527: result: strip -configure:6599: checking for ranlib -configure:6615: found /usr/bin/ranlib -configure:6626: result: ranlib -configure:6728: checking command to parse /usr/bin/nm -B output from clang object -configure:6848: clang -c -g -O2 conftest.c >&5 -configure:6851: $? = 0 -configure:6855: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm -configure:6858: $? = 0 -configure:6924: clang -o conftest -g -O2 conftest.c conftstm.o >&5 -configure:6927: $? = 0 -configure:6965: result: ok -configure:7002: checking for sysroot -configure:7032: result: no -configure:7288: checking for mt -configure:7304: found /bin/mt -configure:7315: result: mt -configure:7338: checking if mt is a manifest tool -configure:7344: mt '-?' -configure:7352: result: no -configure:7994: checking how to run the C preprocessor -configure:8025: clang -E conftest.c -configure:8025: $? = 0 -configure:8039: clang -E conftest.c -conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found -#include - ^ -1 error generated. -configure:8039: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| /* end confdefs.h. */ -| #include -configure:8064: result: clang -E -configure:8084: clang -E conftest.c -configure:8084: $? = 0 -configure:8098: clang -E conftest.c -conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found -#include - ^ -1 error generated. -configure:8098: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| /* end confdefs.h. */ -| #include -configure:8127: checking for ANSI C header files -configure:8147: clang -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8220: clang -o conftest -g -O2 conftest.c >&5 -configure:8220: $? = 0 -configure:8220: ./conftest -configure:8220: $? = 0 -configure:8231: result: yes -configure:8244: checking for sys/types.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for sys/stat.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for stdlib.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for string.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for memory.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for strings.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for inttypes.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for stdint.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8244: checking for unistd.h -configure:8244: clang -c -g -O2 conftest.c >&5 -configure:8244: $? = 0 -configure:8244: result: yes -configure:8258: checking for dlfcn.h -configure:8258: clang -c -g -O2 conftest.c >&5 -configure:8258: $? = 0 -configure:8258: result: yes -configure:8463: checking for objdir -configure:8478: result: .libs -configure:8749: checking if clang supports -fno-rtti -fno-exceptions -configure:8767: clang -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 -configure:8771: $? = 0 -configure:8784: result: yes -configure:9111: checking for clang option to produce PIC -configure:9118: result: -fPIC -DPIC -configure:9126: checking if clang PIC flag -fPIC -DPIC works -configure:9144: clang -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 -configure:9148: $? = 0 -configure:9161: result: yes -configure:9190: checking if clang static flag -static works -configure:9218: result: yes -configure:9233: checking if clang supports -c -o file.o -configure:9254: clang -c -g -O2 -o out/conftest2.o conftest.c >&5 -configure:9258: $? = 0 -configure:9280: result: yes -configure:9288: checking if clang supports -c -o file.o -configure:9335: result: yes -configure:9368: checking whether the clang linker (/usr/bin/ld) supports shared libraries -configure:10521: result: yes -configure:10558: checking whether -lc should be explicitly linked in -configure:10566: clang -c -g -O2 conftest.c >&5 -configure:10569: $? = 0 -configure:10584: clang -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep -lc \>/dev/null 2\>\&1 -configure:10587: $? = 0 -configure:10601: result: no -configure:10761: checking dynamic linker characteristics -configure:11272: clang -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 -configure:11272: $? = 0 -configure:11494: result: GNU/Linux ld.so -configure:11601: checking how to hardcode library paths into programs -configure:11626: result: immediate -configure:12166: checking whether stripping libraries is possible -configure:12171: result: yes -configure:12206: checking if libtool supports shared libraries -configure:12208: result: yes -configure:12211: checking whether to build shared libraries -configure:12232: result: yes -configure:12235: checking whether to build static libraries -configure:12239: result: no -configure:12334: checking for g++ -configure:12350: found /usr/bin/g++ -configure:12361: result: g++ -configure:12388: checking for C++ compiler version -configure:12397: g++ --version >&5 -g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 -Copyright (C) 2013 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:12408: $? = 0 -configure:12397: g++ -v >&5 -Using built-in specs. -COLLECT_GCC=g++ -COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper -Target: i686-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu -Thread model: posix -gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) -configure:12408: $? = 0 -configure:12397: g++ -V >&5 -g++: error: unrecognized command line option '-V' -g++: fatal error: no input files -compilation terminated. -configure:12408: $? = 4 -configure:12397: g++ -qversion >&5 -g++: error: unrecognized command line option '-qversion' -g++: fatal error: no input files -compilation terminated. -configure:12408: $? = 4 -configure:12412: checking whether we are using the GNU C++ compiler -configure:12431: g++ -c conftest.cpp >&5 -configure:12431: $? = 0 -configure:12440: result: yes -configure:12449: checking whether g++ accepts -g -configure:12469: g++ -c -g conftest.cpp >&5 -configure:12469: $? = 0 -configure:12510: result: yes -configure:12535: checking dependency style of g++ -configure:12646: result: gcc3 -configure:12680: checking how to run the C++ preprocessor -configure:12707: g++ -E conftest.cpp -configure:12707: $? = 0 -configure:12721: g++ -E conftest.cpp -conftest.cpp:21:28: fatal error: ac_nonexistent.h: No such file or directory - #include - ^ -compilation terminated. -configure:12721: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| /* end confdefs.h. */ -| #include -configure:12746: result: g++ -E -configure:12766: g++ -E conftest.cpp -configure:12766: $? = 0 -configure:12780: g++ -E conftest.cpp -conftest.cpp:21:28: fatal error: ac_nonexistent.h: No such file or directory - #include - ^ -compilation terminated. -configure:12780: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| /* end confdefs.h. */ -| #include -configure:12949: checking for ld used by g++ -configure:13016: result: /usr/bin/ld -configure:13023: checking if the linker (/usr/bin/ld) is GNU ld -configure:13038: result: yes -configure:13093: checking whether the g++ linker (/usr/bin/ld) supports shared libraries -configure:14098: result: yes -configure:14134: g++ -c -g -O2 conftest.cpp >&5 -configure:14137: $? = 0 -configure:14657: checking for g++ option to produce PIC -configure:14664: result: -fPIC -DPIC -configure:14672: checking if g++ PIC flag -fPIC -DPIC works -configure:14690: g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5 -configure:14694: $? = 0 -configure:14707: result: yes -configure:14730: checking if g++ static flag -static works -configure:14758: result: yes -configure:14770: checking if g++ supports -c -o file.o -configure:14791: g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 -configure:14795: $? = 0 -configure:14817: result: yes -configure:14822: checking if g++ supports -c -o file.o -configure:14869: result: yes -configure:14899: checking whether the g++ linker (/usr/bin/ld) supports shared libraries -configure:14935: result: yes -configure:15076: checking dynamic linker characteristics -configure:15743: result: GNU/Linux ld.so -configure:15796: checking how to hardcode library paths into programs -configure:15821: result: immediate -configure:15868: checking whether the -Werror option is usable -configure:15887: clang -c -g -O2 -Werror conftest.c >&5 -configure:15887: $? = 0 -configure:15896: result: yes -configure:15898: checking for simple visibility declarations -configure:15925: clang -c -g -O2 -fvisibility=hidden -Werror conftest.c >&5 -configure:15925: $? = 0 -configure:15934: result: yes -configure:15967: checking whether make supports nested variables -configure:15984: result: yes -configure:15998: checking for gethostbyname -configure:15998: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:15998: $? = 0 -configure:15998: result: yes -configure:16009: checking for getaddrinfo -configure:16009: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16009: $? = 0 -configure:16009: result: yes -configure:16020: checking for gettimeofday -configure:16020: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16020: $? = 0 -configure:16020: result: yes -configure:16031: checking for inet_ntoa -configure:16031: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16031: $? = 0 -configure:16031: result: yes -configure:16042: checking for memset -configure:16042: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -conftest.c:49:6: warning: incompatible redeclaration of library function 'memset' [-Wincompatible-library-redeclaration] -char memset (); - ^ -conftest.c:49:6: note: 'memset' is a builtin with type 'void *(void *, int, unsigned int)' -1 warning generated. -configure:16042: $? = 0 -configure:16042: result: yes -configure:16053: checking for socket -configure:16053: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16053: $? = 0 -configure:16053: result: yes -configure:16064: checking arpa/inet.h usability -configure:16064: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16064: $? = 0 -configure:16064: result: yes -configure:16064: checking arpa/inet.h presence -configure:16064: clang -E -fvisibility=hidden conftest.c -configure:16064: $? = 0 -configure:16064: result: yes -configure:16064: checking for arpa/inet.h -configure:16064: result: yes -configure:16076: checking fcntl.h usability -configure:16076: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16076: $? = 0 -configure:16076: result: yes -configure:16076: checking fcntl.h presence -configure:16076: clang -E -fvisibility=hidden conftest.c -configure:16076: $? = 0 -configure:16076: result: yes -configure:16076: checking for fcntl.h -configure:16076: result: yes -configure:16088: checking limits.h usability -configure:16088: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16088: $? = 0 -configure:16088: result: yes -configure:16088: checking limits.h presence -configure:16088: clang -E -fvisibility=hidden conftest.c -configure:16088: $? = 0 -configure:16088: result: yes -configure:16088: checking for limits.h -configure:16088: result: yes -configure:16100: checking netdb.h usability -configure:16100: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16100: $? = 0 -configure:16100: result: yes -configure:16100: checking netdb.h presence -configure:16100: clang -E -fvisibility=hidden conftest.c -configure:16100: $? = 0 -configure:16100: result: yes -configure:16100: checking for netdb.h -configure:16100: result: yes -configure:16112: checking netinet/in.h usability -configure:16112: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16112: $? = 0 -configure:16112: result: yes -configure:16112: checking netinet/in.h presence -configure:16112: clang -E -fvisibility=hidden conftest.c -configure:16112: $? = 0 -configure:16112: result: yes -configure:16112: checking for netinet/in.h -configure:16112: result: yes -configure:16124: checking stddef.h usability -configure:16124: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16124: $? = 0 -configure:16124: result: yes -configure:16124: checking stddef.h presence -configure:16124: clang -E -fvisibility=hidden conftest.c -configure:16124: $? = 0 -configure:16124: result: yes -configure:16124: checking for stddef.h -configure:16124: result: yes -configure:16136: checking sys/ioctl.h usability -configure:16136: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16136: $? = 0 -configure:16136: result: yes -configure:16136: checking sys/ioctl.h presence -configure:16136: clang -E -fvisibility=hidden conftest.c -configure:16136: $? = 0 -configure:16136: result: yes -configure:16136: checking for sys/ioctl.h -configure:16136: result: yes -configure:16148: checking sys/socket.h usability -configure:16148: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16148: $? = 0 -configure:16148: result: yes -configure:16148: checking sys/socket.h presence -configure:16148: clang -E -fvisibility=hidden conftest.c -configure:16148: $? = 0 -configure:16148: result: yes -configure:16148: checking for sys/socket.h -configure:16148: result: yes -configure:16160: checking sys/time.h usability -configure:16160: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16160: $? = 0 -configure:16160: result: yes -configure:16160: checking sys/time.h presence -configure:16160: clang -E -fvisibility=hidden conftest.c -configure:16160: $? = 0 -configure:16160: result: yes -configure:16160: checking for sys/time.h -configure:16160: result: yes -configure:16172: checking errno.h usability -configure:16172: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16172: $? = 0 -configure:16172: result: yes -configure:16172: checking errno.h presence -configure:16172: clang -E -fvisibility=hidden conftest.c -configure:16172: $? = 0 -configure:16172: result: yes -configure:16172: checking for errno.h -configure:16172: result: yes -configure:16182: checking for socket in -lnetwork -configure:16207: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lnetwork >&5 -/usr/bin/ld: cannot find -lnetwork -clang: error: linker command failed with exit code 1 (use -v to see invocation) -configure:16207: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char socket (); -| int -| main () -| { -| return socket (); -| ; -| return 0; -| } -configure:16216: result: no -configure:16231: checking size of long long -configure:16236: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16236: $? = 0 -configure:16236: ./conftest -configure:16236: $? = 0 -configure:16250: result: 8 -configure:16264: checking size of long -configure:16269: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16269: $? = 0 -configure:16269: ./conftest -configure:16269: $? = 0 -configure:16283: result: 4 -configure:16293: checking whether byte ordering is bigendian -configure:16308: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -conftest.c:41:9: error: unknown type name 'not' - not a universal capable compiler - ^ -conftest.c:41:14: error: expected ';' after top level declarator - not a universal capable compiler - ^ - ; -2 errors generated. -configure:16308: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| /* end confdefs.h. */ -| #ifndef __APPLE_CC__ -| not a universal capable compiler -| #endif -| typedef int dummy; -| -configure:16353: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:16353: $? = 0 -configure:16371: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -conftest.c:47:4: error: use of undeclared identifier 'not' - not big endian - ^ -1 error generated. -configure:16371: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| /* end confdefs.h. */ -| #include -| #include -| -| int -| main () -| { -| #if BYTE_ORDER != BIG_ENDIAN -| not big endian -| #endif -| -| ; -| return 0; -| } -configure:16499: result: no -configure:16569: checking for gcc -configure:16596: result: clang -configure:16825: checking for C compiler version -configure:16834: clang --version >&5 -Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) -Target: i386-pc-linux-gnu -Thread model: posix -configure:16845: $? = 0 -configure:16834: clang -v >&5 -Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) -Target: i386-pc-linux-gnu -Thread model: posix -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.8.2 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9 -Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/4.9.0 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.2 -Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 -... rest of stderr output deleted ... -configure:16845: $? = 0 -configure:16834: clang -V >&5 -clang: error: argument to '-V' is missing (expected 1 value) -clang: error: no input files -configure:16845: $? = 1 -configure:16834: clang -qversion >&5 -clang: error: unknown argument: '-qversion' -clang: error: no input files -configure:16845: $? = 1 -configure:16849: checking whether we are using the GNU C compiler -configure:16877: result: yes -configure:16886: checking whether clang accepts -g -configure:16947: result: yes -configure:16964: checking for clang option to accept ISO C89 -configure:17040: result: none needed -configure:17065: checking whether clang understands -c and -o together -configure:17102: result: yes -configure:17121: checking dependency style of clang -configure:17232: result: gcc3 -configure:17248: checking whether clang and cc understand -c and -o together -configure:17279: clang -c conftest.c -o conftest2.o >&5 -configure:17283: $? = 0 -configure:17289: clang -c conftest.c -o conftest2.o >&5 -configure:17293: $? = 0 -configure:17304: cc -c conftest.c >&5 -configure:17308: $? = 0 -configure:17316: cc -c conftest.c -o conftest2.o >&5 -configure:17320: $? = 0 -configure:17326: cc -c conftest.c -o conftest2.o >&5 -configure:17330: $? = 0 -configure:17348: result: yes -configure:17470: checking for C++ compiler version -configure:17479: g++ --version >&5 -g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 -Copyright (C) 2013 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:17490: $? = 0 -configure:17479: g++ -v >&5 -Using built-in specs. -COLLECT_GCC=g++ -COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper -Target: i686-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu -Thread model: posix -gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) -configure:17490: $? = 0 -configure:17479: g++ -V >&5 -g++: error: unrecognized command line option '-V' -g++: fatal error: no input files -compilation terminated. -configure:17490: $? = 4 -configure:17479: g++ -qversion >&5 -g++: error: unrecognized command line option '-qversion' -g++: fatal error: no input files -compilation terminated. -configure:17490: $? = 4 -configure:17494: checking whether we are using the GNU C++ compiler -configure:17522: result: yes -configure:17531: checking whether g++ accepts -g -configure:17592: result: yes -configure:17617: checking dependency style of g++ -configure:17728: result: gcc3 -configure:17744: checking for size_t -configure:17744: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:17744: $? = 0 -configure:17744: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -conftest.c:76:21: error: expected expression -if (sizeof ((size_t))) - ^ -1 error generated. -configure:17744: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((size_t))) -| return 0; -| ; -| return 0; -| } -configure:17744: result: yes -configure:17755: checking for uint8_t -configure:17755: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:17755: $? = 0 -configure:17755: result: yes -configure:17778: checking dependency style of clang -configure:17887: result: gcc3 -configure:17991: checking for cos in -lm -configure:18016: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lm >&5 -conftest.c:47:6: warning: incompatible redeclaration of library function 'cos' [-Wincompatible-library-redeclaration] -char cos (); - ^ -conftest.c:47:6: note: 'cos' is a builtin with type 'double (double)' -1 warning generated. -configure:18016: $? = 0 -configure:18025: result: yes -configure:18044: checking for thread local storage (TLS) class -configure:18072: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:18072: $? = 0 -configure:18084: result: __thread -configure:18120: checking for debug -configure:18122: result: no -configure:18332: checking for the pthreads library -lpthreads -configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -lpthreads >&5 -/usr/bin/ld: cannot find -lpthreads -clang: error: linker command failed with exit code 1 (use -v to see invocation) -configure:18370: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| /* end confdefs.h. */ -| #include -| static void routine(void *a) { a = 0; } -| static void *start_routine(void *a) { return a; } -| int -| main () -| { -| pthread_t th; pthread_attr_t attr; -| pthread_create(&th, 0, start_routine, 0); -| pthread_join(th, 0); -| pthread_attr_init(&attr); -| pthread_cleanup_push(routine, 0); -| pthread_cleanup_pop(0) /* ; */ -| ; -| return 0; -| } -configure:18379: result: no -configure:18277: checking whether pthreads work without any flags -configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -/tmp/conftest-c8fdce.o: In function `main': -/home/khimes/work/project1/cyassl-3.0.0/conftest.c:49: undefined reference to `pthread_create' -/home/khimes/work/project1/cyassl-3.0.0/conftest.c:50: undefined reference to `pthread_join' -/home/khimes/work/project1/cyassl-3.0.0/conftest.c:52: undefined reference to `__pthread_register_cancel' -/home/khimes/work/project1/cyassl-3.0.0/conftest.c:53: undefined reference to `__pthread_unregister_cancel' -clang: error: linker command failed with exit code 1 (use -v to see invocation) -configure:18370: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| /* end confdefs.h. */ -| #include -| static void routine(void *a) { a = 0; } -| static void *start_routine(void *a) { return a; } -| int -| main () -| { -| pthread_t th; pthread_attr_t attr; -| pthread_create(&th, 0, start_routine, 0); -| pthread_join(th, 0); -| pthread_attr_init(&attr); -| pthread_cleanup_push(routine, 0); -| pthread_cleanup_pop(0) /* ; */ -| ; -| return 0; -| } -configure:18379: result: no -configure:18282: checking whether pthreads work with -Kthread -configure:18370: clang -o conftest -g -O2 -Kthread -fvisibility=hidden conftest.c >&5 -clang: error: unknown argument: '-Kthread' -configure:18370: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| /* end confdefs.h. */ -| #include -| static void routine(void *a) { a = 0; } -| static void *start_routine(void *a) { return a; } -| int -| main () -| { -| pthread_t th; pthread_attr_t attr; -| pthread_create(&th, 0, start_routine, 0); -| pthread_join(th, 0); -| pthread_attr_init(&attr); -| pthread_cleanup_push(routine, 0); -| pthread_cleanup_pop(0) /* ; */ -| ; -| return 0; -| } -configure:18379: result: no -configure:18282: checking whether pthreads work with -kthread -configure:18370: clang -o conftest -g -O2 -kthread -fvisibility=hidden conftest.c >&5 -clang: error: unknown argument: '-kthread' -configure:18370: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| /* end confdefs.h. */ -| #include -| static void routine(void *a) { a = 0; } -| static void *start_routine(void *a) { return a; } -| int -| main () -| { -| pthread_t th; pthread_attr_t attr; -| pthread_create(&th, 0, start_routine, 0); -| pthread_join(th, 0); -| pthread_attr_init(&attr); -| pthread_cleanup_push(routine, 0); -| pthread_cleanup_pop(0) /* ; */ -| ; -| return 0; -| } -configure:18379: result: no -configure:18332: checking for the pthreads library -llthread -configure:18370: clang -o conftest -g -O2 -fvisibility=hidden conftest.c -llthread >&5 -/usr/bin/ld: cannot find -llthread -clang: error: linker command failed with exit code 1 (use -v to see invocation) -configure:18370: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| /* end confdefs.h. */ -| #include -| static void routine(void *a) { a = 0; } -| static void *start_routine(void *a) { return a; } -| int -| main () -| { -| pthread_t th; pthread_attr_t attr; -| pthread_create(&th, 0, start_routine, 0); -| pthread_join(th, 0); -| pthread_attr_init(&attr); -| pthread_cleanup_push(routine, 0); -| pthread_cleanup_pop(0) /* ; */ -| ; -| return 0; -| } -configure:18379: result: no -configure:18282: checking whether pthreads work with -pthread -configure:18370: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 -configure:18370: $? = 0 -configure:18379: result: yes -configure:18398: checking for joinable pthread attribute -configure:18413: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 -configure:18413: $? = 0 -configure:18419: result: PTHREAD_CREATE_JOINABLE -configure:18429: checking if more special flags are required for pthreads -configure:18443: result: no -configure:18449: checking for PTHREAD_PRIO_INHERIT -configure:18467: clang -o conftest -g -O2 -pthread -fvisibility=hidden conftest.c >&5 -configure:18467: $? = 0 -configure:18476: result: yes -configure:20812: checking for library containing gethostbyname -configure:20843: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:20843: $? = 0 -configure:20860: result: none required -configure:20868: checking for library containing socket -configure:20899: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:20899: $? = 0 -configure:20916: result: none required -configure:20967: checking whether C compiler accepts -configure:20986: clang -c -g -O2 -fvisibility=hidden conftest.c >&5 -configure:20986: $? = 0 -configure:20994: result: yes -configure:21012: : CFLAGS="$CFLAGS " -configure:21015: $? = 0 -configure:21087: checking whether the linker accepts -configure:21106: clang -o conftest -g -O2 -fvisibility=hidden conftest.c >&5 -configure:21106: $? = 0 -configure:21115: result: yes -configure:21123: checking for vcs system -configure:21143: result: none -configure:21152: checking for vcs checkout -configure:21164: result: no -configure:21235: checking whether the linker accepts -Werror -configure:21254: clang -o conftest -g -O2 -fvisibility=hidden -Werror conftest.c >&5 -configure:21254: $? = 0 -configure:21263: result: yes -configure:21277: checking whether the linker accepts -z relro -z now -configure:21296: clang -o conftest -g -O2 -fvisibility=hidden -Werror -z relro -z now conftest.c >&5 -clang: error: unknown argument: '-z' -clang: error: unknown argument: '-z' -clang: error: no such file or directory: 'relro' -clang: error: no such file or directory: 'now' -configure:21296: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:21306: result: no -configure:21318: checking whether the linker accepts -pie -configure:21337: clang -o conftest -g -O2 -fvisibility=hidden -Werror -pie conftest.c >&5 -configure:21337: $? = 0 -configure:21347: result: yes -configure:21447: checking whether C compiler accepts -Werror -configure:21466: clang -c -Werror -fvisibility=hidden conftest.c >&5 -configure:21466: $? = 0 -configure:21475: result: yes -configure:21488: : ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" -configure:21491: $? = 0 -configure:21707: checking whether C compiler accepts -Wno-pragmas -configure:21726: clang -c -Werror -Wno-pragmas -fvisibility=hidden conftest.c >&5 -error: unknown warning option '-Wno-pragmas' [-Werror,-Wunknown-warning-option] -configure:21726: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:21735: result: no -configure:21771: checking whether C compiler accepts -Wall -configure:21790: clang -c -Werror -Wall -fvisibility=hidden conftest.c >&5 -configure:21790: $? = 0 -configure:21799: result: yes -configure:21812: : CFLAGS="$CFLAGS $flag" -configure:21815: $? = 0 -configure:21834: checking whether C compiler accepts -Wno-strict-aliasing -configure:21853: clang -c -Wall -Werror -Wno-strict-aliasing -fvisibility=hidden conftest.c >&5 -configure:21853: $? = 0 -configure:21862: result: yes -configure:21875: : CFLAGS="$CFLAGS $flag" -configure:21878: $? = 0 -configure:21897: checking whether C compiler accepts -Wextra -configure:21916: clang -c -Wall -Wno-strict-aliasing -Werror -Wextra -fvisibility=hidden conftest.c >&5 -configure:21916: $? = 0 -configure:21925: result: yes -configure:21938: : CFLAGS="$CFLAGS $flag" -configure:21941: $? = 0 -configure:21960: checking whether C compiler accepts -Wunknown-pragmas -configure:21979: clang -c -Wall -Wno-strict-aliasing -Wextra -Werror -Wunknown-pragmas -fvisibility=hidden conftest.c >&5 -configure:21979: $? = 0 -configure:21988: result: yes -configure:22001: : CFLAGS="$CFLAGS $flag" -configure:22004: $? = 0 -configure:22023: checking whether C compiler accepts -Wthis-test-should-fail -configure:22042: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Werror -Wthis-test-should-fail -fvisibility=hidden conftest.c >&5 -error: unknown warning option '-Wthis-test-should-fail'; did you mean '-Wmismatched-tags'? [-Werror,-Wunknown-warning-option] -configure:22042: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:22051: result: no -configure:22155: checking whether C compiler accepts -Waddress -configure:22174: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Werror -Waddress -fvisibility=hidden conftest.c >&5 -configure:22174: $? = 0 -configure:22183: result: yes -configure:22196: : CFLAGS="$CFLAGS $flag" -configure:22199: $? = 0 -configure:22218: checking whether C compiler accepts -Warray-bounds -configure:22237: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Werror -Warray-bounds -fvisibility=hidden conftest.c >&5 -configure:22237: $? = 0 -configure:22246: result: yes -configure:22259: : CFLAGS="$CFLAGS $flag" -configure:22262: $? = 0 -configure:22281: checking whether C compiler accepts -Wbad-function-cast -configure:22300: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Werror -Wbad-function-cast -fvisibility=hidden conftest.c >&5 -configure:22300: $? = 0 -configure:22309: result: yes -configure:22322: : CFLAGS="$CFLAGS $flag" -configure:22325: $? = 0 -configure:22344: checking whether C compiler accepts -Wchar-subscripts -configure:22363: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Werror -Wchar-subscripts -fvisibility=hidden conftest.c >&5 -configure:22363: $? = 0 -configure:22372: result: yes -configure:22385: : CFLAGS="$CFLAGS $flag" -configure:22388: $? = 0 -configure:22407: checking whether C compiler accepts -Wcomment -configure:22426: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Werror -Wcomment -fvisibility=hidden conftest.c >&5 -configure:22426: $? = 0 -configure:22435: result: yes -configure:22448: : CFLAGS="$CFLAGS $flag" -configure:22451: $? = 0 -configure:22470: checking whether C compiler accepts -Wfloat-equal -configure:22489: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Werror -Wfloat-equal -fvisibility=hidden conftest.c >&5 -configure:22489: $? = 0 -configure:22498: result: yes -configure:22511: : CFLAGS="$CFLAGS $flag" -configure:22514: $? = 0 -configure:22533: checking whether C compiler accepts -Wformat-security -configure:22552: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Werror -Wformat-security -fvisibility=hidden conftest.c >&5 -configure:22552: $? = 0 -configure:22561: result: yes -configure:22574: : CFLAGS="$CFLAGS $flag" -configure:22577: $? = 0 -configure:22596: checking whether C compiler accepts -Wformat=2 -configure:22615: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Werror -Wformat=2 -fvisibility=hidden conftest.c >&5 -configure:22615: $? = 0 -configure:22624: result: yes -configure:22637: : CFLAGS="$CFLAGS $flag" -configure:22640: $? = 0 -configure:22659: checking whether C compiler accepts -Wmaybe-uninitialized -configure:22678: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Werror -Wmaybe-uninitialized -fvisibility=hidden conftest.c >&5 -error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option] -configure:22678: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:22687: result: no -configure:22722: checking whether C compiler accepts -Wmissing-field-initializers -configure:22741: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Werror -Wmissing-field-initializers -fvisibility=hidden conftest.c >&5 -configure:22741: $? = 0 -configure:22750: result: yes -configure:22763: : CFLAGS="$CFLAGS $flag" -configure:22766: $? = 0 -configure:22785: checking whether C compiler accepts -Wmissing-noreturn -configure:22804: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Werror -Wmissing-noreturn -fvisibility=hidden conftest.c >&5 -configure:22804: $? = 0 -configure:22813: result: yes -configure:22826: : CFLAGS="$CFLAGS $flag" -configure:22829: $? = 0 -configure:22848: checking whether C compiler accepts -Wmissing-prototypes -configure:22867: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Werror -Wmissing-prototypes -fvisibility=hidden conftest.c >&5 -configure:22867: $? = 0 -configure:22876: result: yes -configure:22889: : CFLAGS="$CFLAGS $flag" -configure:22892: $? = 0 -configure:22911: checking whether C compiler accepts -Wnested-externs -configure:22930: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Werror -Wnested-externs -fvisibility=hidden conftest.c >&5 -configure:22930: $? = 0 -configure:22939: result: yes -configure:22952: : CFLAGS="$CFLAGS $flag" -configure:22955: $? = 0 -configure:22974: checking whether C compiler accepts -Wnormalized=id -configure:22993: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Wnormalized=id -fvisibility=hidden conftest.c >&5 -error: unknown warning option '-Wnormalized=id'; did you mean '-Wformat=2'? [-Werror,-Wunknown-warning-option] -configure:22993: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:23002: result: no -configure:23037: checking whether C compiler accepts -Woverride-init -configure:23056: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Woverride-init -fvisibility=hidden conftest.c >&5 -error: unknown warning option '-Woverride-init' [-Werror,-Wunknown-warning-option] -configure:23056: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "cyassl" -| #define PACKAGE_TARNAME "cyassl" -| #define PACKAGE_VERSION "3.0.0" -| #define PACKAGE_STRING "cyassl 3.0.0" -| #define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -| #define PACKAGE_URL "http://www.wolfssl.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_VISIBILITY 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_INET_NTOA 1 -| #define HAVE_MEMSET 1 -| #define HAVE_SOCKET 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_ERRNO_H 1 -| #define SIZEOF_LONG_LONG 8 -| #define SIZEOF_LONG 4 -| #define TLS __thread -| #define DEBUG 0 -| #define HAVE_PTHREAD_PRIO_INHERIT 1 -| #define HAVE_PTHREAD 1 -| #define VCS_SYSTEM "none" -| #define VCS_CHECKOUT 0 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:23065: result: no -configure:23100: checking whether C compiler accepts -Wpointer-arith -configure:23119: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Werror -Wpointer-arith -fvisibility=hidden conftest.c >&5 -configure:23119: $? = 0 -configure:23128: result: yes -configure:23141: : CFLAGS="$CFLAGS $flag" -configure:23144: $? = 0 -configure:23163: checking whether C compiler accepts -Wpointer-sign -configure:23182: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror -Wpointer-sign -fvisibility=hidden conftest.c >&5 -configure:23182: $? = 0 -configure:23191: result: yes -configure:23204: : CFLAGS="$CFLAGS $flag" -configure:23207: $? = 0 -configure:23226: checking whether C compiler accepts -Wredundant-decls -configure:23245: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Werror -Wredundant-decls -fvisibility=hidden conftest.c >&5 -configure:23245: $? = 0 -configure:23254: result: yes -configure:23267: : CFLAGS="$CFLAGS $flag" -configure:23270: $? = 0 -configure:23289: checking whether C compiler accepts -Wshadow -configure:23308: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Werror -Wshadow -fvisibility=hidden conftest.c >&5 -configure:23308: $? = 0 -configure:23317: result: yes -configure:23330: : CFLAGS="$CFLAGS $flag" -configure:23333: $? = 0 -configure:23352: checking whether C compiler accepts -Wshorten-64-to-32 -configure:23371: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Werror -Wshorten-64-to-32 -fvisibility=hidden conftest.c >&5 -configure:23371: $? = 0 -configure:23380: result: yes -configure:23393: : CFLAGS="$CFLAGS $flag" -configure:23396: $? = 0 -configure:23415: checking whether C compiler accepts -Wsign-compare -configure:23434: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Werror -Wsign-compare -fvisibility=hidden conftest.c >&5 -configure:23434: $? = 0 -configure:23443: result: yes -configure:23456: : CFLAGS="$CFLAGS $flag" -configure:23459: $? = 0 -configure:23478: checking whether C compiler accepts -Wstrict-overflow=1 -configure:23497: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Werror -Wstrict-overflow=1 -fvisibility=hidden conftest.c >&5 -configure:23497: $? = 0 -configure:23506: result: yes -configure:23519: : CFLAGS="$CFLAGS $flag" -configure:23522: $? = 0 -configure:23541: checking whether C compiler accepts -Wstrict-prototypes -configure:23560: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Werror -Wstrict-prototypes -fvisibility=hidden conftest.c >&5 -configure:23560: $? = 0 -configure:23569: result: yes -configure:23582: : CFLAGS="$CFLAGS $flag" -configure:23585: $? = 0 -configure:23604: checking whether C compiler accepts -Wswitch-enum -configure:23623: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Werror -Wswitch-enum -fvisibility=hidden conftest.c >&5 -configure:23623: $? = 0 -configure:23632: result: yes -configure:23645: : CFLAGS="$CFLAGS $flag" -configure:23648: $? = 0 -configure:23667: checking whether C compiler accepts -Wundef -configure:23686: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Werror -Wundef -fvisibility=hidden conftest.c >&5 -configure:23686: $? = 0 -configure:23695: result: yes -configure:23708: : CFLAGS="$CFLAGS $flag" -configure:23711: $? = 0 -configure:23730: checking whether C compiler accepts -Wunused -configure:23749: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Werror -Wunused -fvisibility=hidden conftest.c >&5 -configure:23749: $? = 0 -configure:23758: result: yes -configure:23771: : CFLAGS="$CFLAGS $flag" -configure:23774: $? = 0 -configure:23793: checking whether C compiler accepts -Wunused-result -configure:23812: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Werror -Wunused-result -fvisibility=hidden conftest.c >&5 -configure:23812: $? = 0 -configure:23821: result: yes -configure:23834: : CFLAGS="$CFLAGS $flag" -configure:23837: $? = 0 -configure:23856: checking whether C compiler accepts -Wunused-variable -configure:23875: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Werror -Wunused-variable -fvisibility=hidden conftest.c >&5 -configure:23875: $? = 0 -configure:23884: result: yes -configure:23897: : CFLAGS="$CFLAGS $flag" -configure:23900: $? = 0 -configure:23919: checking whether C compiler accepts -Wwrite-strings -configure:23938: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Werror -Wwrite-strings -fvisibility=hidden conftest.c >&5 -configure:23938: $? = 0 -configure:23947: result: yes -configure:23960: : CFLAGS="$CFLAGS $flag" -configure:23963: $? = 0 -configure:23982: checking whether C compiler accepts -fwrapv -configure:24001: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -Werror -fwrapv -fvisibility=hidden conftest.c >&5 -configure:24001: $? = 0 -configure:24010: result: yes -configure:24023: : CFLAGS="$CFLAGS $flag" -configure:24026: $? = 0 -configure:24045: checking whether C compiler accepts -fPIE -configure:24064: clang -c -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -Werror -fPIE -fvisibility=hidden conftest.c >&5 -configure:24064: $? = 0 -configure:24073: result: yes -configure:24086: : CFLAGS="$CFLAGS $flag" -configure:24089: $? = 0 -configure:24153: result: creating cyassl-config - generic 3.0.0 for -lcyassl -configure:24281: checking the number of available CPUs -configure:24324: result: 4 -configure:24337: adding automake macro support -configure:24341: creating aminclude.am -configure:24372: added jobserver support to make for 5 jobs -configure:24493: checking that generated files are newer than configure -configure:24499: result: done -configure:24719: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by cyassl config.status 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on khimes-TravelMate-X483 - -config.status:1283: creating stamp-h -config.status:1283: creating Makefile -config.status:1283: creating cyassl/version.h -config.status:1283: creating cyassl/options.h -config.status:1283: creating support/cyassl.pc -config.status:1283: creating rpm/spec -config.status:1283: creating config.h -config.status:1464: config.h is unchanged -config.status:1512: executing depfiles commands -config.status:1512: executing libtool commands - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=i686-pc-linux-gnu -ac_cv_c_bigendian=no -ac_cv_c_compiler_gnu=yes -ac_cv_c_uint8_t=yes -ac_cv_cxx_compiler_gnu=yes -ac_cv_env_CCASFLAGS_set= -ac_cv_env_CCASFLAGS_value= -ac_cv_env_CCAS_set= -ac_cv_env_CCAS_value= -ac_cv_env_CCC_set= -ac_cv_env_CCC_value= -ac_cv_env_CC_set=set -ac_cv_env_CC_value=clang -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_CXXCPP_set= -ac_cv_env_CXXCPP_value= -ac_cv_env_CXXFLAGS_set= -ac_cv_env_CXXFLAGS_value= -ac_cv_env_CXX_set= -ac_cv_env_CXX_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_func_getaddrinfo=yes -ac_cv_func_gethostbyname=yes -ac_cv_func_gettimeofday=yes -ac_cv_func_inet_ntoa=yes -ac_cv_func_memset=yes -ac_cv_func_socket=yes -ac_cv_header_arpa_inet_h=yes -ac_cv_header_dlfcn_h=yes -ac_cv_header_errno_h=yes -ac_cv_header_fcntl_h=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_limits_h=yes -ac_cv_header_memory_h=yes -ac_cv_header_netdb_h=yes -ac_cv_header_netinet_in_h=yes -ac_cv_header_stdc=yes -ac_cv_header_stddef_h=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_ioctl_h=yes -ac_cv_header_sys_socket_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_time_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_unistd_h=yes -ac_cv_host=i686-pc-linux-gnu -ac_cv_lib_m_cos=yes -ac_cv_lib_network_socket=no -ac_cv_objext=o -ac_cv_path_EGREP='/bin/grep -E' -ac_cv_path_FGREP='/bin/grep -F' -ac_cv_path_GREP=/bin/grep -ac_cv_path_SED=/bin/sed -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_mkdir=/bin/mkdir -ac_cv_prog_AWK=mawk -ac_cv_prog_CPP='clang -E' -ac_cv_prog_CXXCPP='g++ -E' -ac_cv_prog_ac_ct_AR=ar -ac_cv_prog_ac_ct_CC=clang -ac_cv_prog_ac_ct_CXX=g++ -ac_cv_prog_ac_ct_MANIFEST_TOOL=mt -ac_cv_prog_ac_ct_OBJDUMP=objdump -ac_cv_prog_ac_ct_RANLIB=ranlib -ac_cv_prog_ac_ct_STRIP=strip -ac_cv_prog_cc_c89= -ac_cv_prog_cc_clang_c_o=yes -ac_cv_prog_cc_g=yes -ac_cv_prog_cxx_g=yes -ac_cv_prog_make_make_set=yes -ac_cv_search_gethostbyname='none required' -ac_cv_search_socket='none required' -ac_cv_sizeof_long=4 -ac_cv_sizeof_long_long=8 -ac_cv_tls=__thread -ac_cv_type_size_t=yes -ac_cv_vcs_checkout=no -ac_cv_vcs_system=none -ac_cv_warnings_as_errors=no -am_cv_CCAS_dependencies_compiler_type=gcc3 -am_cv_CC_dependencies_compiler_type=gcc3 -am_cv_CXX_dependencies_compiler_type=gcc3 -am_cv_make_support_nested_variables=yes -am_cv_prog_cc_c_o=yes -am_cv_prog_tar_ustar=gnutar -ax_cv_PTHREAD_PRIO_INHERIT=yes -ax_cv_check_cflags__=yes -ax_cv_check_cflags__Waddress=yes -ax_cv_check_cflags__Wall=yes -ax_cv_check_cflags__Warray_bounds=yes -ax_cv_check_cflags__Wbad_function_cast=yes -ax_cv_check_cflags__Wchar_subscripts=yes -ax_cv_check_cflags__Wcomment=yes -ax_cv_check_cflags__Wextra=yes -ax_cv_check_cflags__Wfloat_equal=yes -ax_cv_check_cflags__Wformat_2=yes -ax_cv_check_cflags__Wformat_security=yes -ax_cv_check_cflags__Wmaybe_uninitialized=no -ax_cv_check_cflags__Wmissing_field_initializers=yes -ax_cv_check_cflags__Wmissing_noreturn=yes -ax_cv_check_cflags__Wmissing_prototypes=yes -ax_cv_check_cflags__Wnested_externs=yes -ax_cv_check_cflags__Wno_pragmas=no -ax_cv_check_cflags__Wno_strict_aliasing=yes -ax_cv_check_cflags__Wnormalized_id=no -ax_cv_check_cflags__Woverride_init=no -ax_cv_check_cflags__Wpointer_arith=yes -ax_cv_check_cflags__Wpointer_sign=yes -ax_cv_check_cflags__Wredundant_decls=yes -ax_cv_check_cflags__Wshadow=yes -ax_cv_check_cflags__Wshorten_64_to_32=yes -ax_cv_check_cflags__Wsign_compare=yes -ax_cv_check_cflags__Wstrict_overflow_1=yes -ax_cv_check_cflags__Wstrict_prototypes=yes -ax_cv_check_cflags__Wswitch_enum=yes -ax_cv_check_cflags__Wthis_test_should_fail=no -ax_cv_check_cflags__Wundef=yes -ax_cv_check_cflags__Wunknown_pragmas=yes -ax_cv_check_cflags__Wunused=yes -ax_cv_check_cflags__Wunused_result=yes -ax_cv_check_cflags__Wunused_variable=yes -ax_cv_check_cflags__Wwrite_strings=yes -ax_cv_check_cflags___Werror=yes -ax_cv_check_cflags__fPIE=yes -ax_cv_check_cflags__fwrapv=yes -ax_cv_check_ldflags__=yes -ax_cv_check_ldflags___Werror=yes -ax_cv_check_ldflags__pie=yes -ax_cv_check_ldflags__z_relro__z_now=no -gl_cv_cc_vis_werror=yes -gl_cv_cc_visibility=yes -lt_cv_ar_at_file=@ -lt_cv_archive_cmds_need_lc=no -lt_cv_deplibs_check_method=pass_all -lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_ld_reload_flag=-r -lt_cv_nm_interface='BSD nm' -lt_cv_objdir=.libs -lt_cv_path_LD=/usr/bin/ld -lt_cv_path_LDCXX=/usr/bin/ld -lt_cv_path_NM='/usr/bin/nm -B' -lt_cv_path_mainfest_tool=no -lt_cv_prog_compiler_c_o=yes -lt_cv_prog_compiler_c_o_CXX=yes -lt_cv_prog_compiler_pic='-fPIC -DPIC' -lt_cv_prog_compiler_pic_CXX='-fPIC -DPIC' -lt_cv_prog_compiler_pic_works=yes -lt_cv_prog_compiler_pic_works_CXX=yes -lt_cv_prog_compiler_rtti_exceptions=yes -lt_cv_prog_compiler_static_works=yes -lt_cv_prog_compiler_static_works_CXX=yes -lt_cv_prog_gnu_ld=yes -lt_cv_prog_gnu_ldcxx=yes -lt_cv_sharedlib_from_linklib_cmd='printf %s\n' -lt_cv_shlibpath_overrides_runpath=no -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_max_cmd_len=1572864 -lt_cv_to_host_file_cmd=func_convert_file_noop -lt_cv_to_tool_file_cmd=func_convert_file_noop - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14' -AMDEPBACKSLASH='\' -AMDEP_FALSE='#' -AMDEP_TRUE='' -AMINCLUDE='aminclude.am' -AMTAR='$${TAR-tar}' -AM_BACKSLASH='\' -AM_CFLAGS='-DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer' -AM_CPPFLAGS=' -fvisibility=hidden' -AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -AM_DEFAULT_VERBOSITY='0' -AM_LDFLAGS='' -AM_V='$(V)' -AR='ar' -AUTOCONF='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf' -AUTOHEADER='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader' -AUTOMAKE='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14' -AWK='mawk' -BUILD_AESCCM_FALSE='' -BUILD_AESCCM_TRUE='#' -BUILD_AESGCM_FALSE='' -BUILD_AESGCM_TRUE='#' -BUILD_AESNI_FALSE='' -BUILD_AESNI_TRUE='#' -BUILD_AES_FALSE='#' -BUILD_AES_TRUE='' -BUILD_ASN_FALSE='#' -BUILD_ASN_TRUE='' -BUILD_BLAKE2_FALSE='' -BUILD_BLAKE2_TRUE='#' -BUILD_CAMELLIA_FALSE='' -BUILD_CAMELLIA_TRUE='#' -BUILD_CODING_FALSE='#' -BUILD_CODING_TRUE='' -BUILD_CRL_FALSE='' -BUILD_CRL_MONITOR_FALSE='' -BUILD_CRL_MONITOR_TRUE='#' -BUILD_CRL_TRUE='#' -BUILD_DES3_FALSE='#' -BUILD_DES3_TRUE='' -BUILD_DH_FALSE='#' -BUILD_DH_TRUE='' -BUILD_DSA_FALSE='' -BUILD_DSA_TRUE='#' -BUILD_ECC_FALSE='' -BUILD_ECC_TRUE='#' -BUILD_EXAMPLES_FALSE='#' -BUILD_EXAMPLES_TRUE='' -BUILD_FASTMATH_FALSE='' -BUILD_FASTMATH_TRUE='#' -BUILD_FIPS_FALSE='' -BUILD_FIPS_TRUE='#' -BUILD_HC128_FALSE='' -BUILD_HC128_TRUE='#' -BUILD_INLINE_FALSE='#' -BUILD_INLINE_TRUE='' -BUILD_LEANPSK_FALSE='' -BUILD_LEANPSK_TRUE='#' -BUILD_LIBZ_FALSE='' -BUILD_LIBZ_TRUE='#' -BUILD_MCAPI_FALSE='' -BUILD_MCAPI_TRUE='#' -BUILD_MD2_FALSE='' -BUILD_MD2_TRUE='#' -BUILD_MD4_FALSE='' -BUILD_MD4_TRUE='#' -BUILD_MD5_FALSE='#' -BUILD_MD5_TRUE='' -BUILD_MEMORY_FALSE='#' -BUILD_MEMORY_TRUE='' -BUILD_NTRU_FALSE='' -BUILD_NTRU_TRUE='#' -BUILD_OCSP_FALSE='' -BUILD_OCSP_TRUE='#' -BUILD_PKCS7_FALSE='' -BUILD_PKCS7_TRUE='#' -BUILD_PWDBASED_FALSE='' -BUILD_PWDBASED_TRUE='#' -BUILD_RABBIT_FALSE='' -BUILD_RABBIT_TRUE='#' -BUILD_RC4_FALSE='#' -BUILD_RC4_TRUE='' -BUILD_RIPEMD_FALSE='' -BUILD_RIPEMD_TRUE='#' -BUILD_RSA_FALSE='#' -BUILD_RSA_TRUE='' -BUILD_SHA512_FALSE='' -BUILD_SHA512_TRUE='#' -BUILD_SHA_FALSE='#' -BUILD_SHA_TRUE='' -BUILD_SLOWMATH_FALSE='#' -BUILD_SLOWMATH_TRUE='' -BUILD_SNIFFER_FALSE='' -BUILD_SNIFFER_TRUE='#' -BUILD_SNIFFTEST_FALSE='' -BUILD_SNIFFTEST_TRUE='#' -CC='clang' -CCAS='clang' -CCASDEPMODE='depmode=gcc3' -CCASFLAGS='-g -O2' -CCDEPMODE='depmode=gcc3' -CFLAGS=' -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE ' -CFLAG_VISIBILITY='-fvisibility=hidden' -CPP='clang -E' -CPPFLAGS=' -fvisibility=hidden' -CXX='g++' -CXXCPP='g++ -E' -CXXDEPMODE='depmode=gcc3' -CXXFLAGS='-g -O2' -CYASSL_LIBRARY_VERSION='5:5:0' -CYGPATH_W='echo' -DEBUG_FALSE='' -DEBUG_TRUE='#' -DEFS='-DHAVE_CONFIG_H' -DEPDIR='.deps' -DLLTOOL='false' -DSYMUTIL='' -DUMPBIN='' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/bin/grep -E' -EXEEXT='' -FGREP='/bin/grep -F' -GENERIC_CONFIG='cyassl-config' -GREP='/bin/grep' -HAVE_OPENSSL_CMD='' -HAVE_VALGRIND='' -HAVE_VISIBILITY='1' -HEX_VERSION='0x03000000' -INC_AMINCLUDE='include $(top_builddir)/aminclude.am' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -IS_VCS_CHECKOUT_FALSE='' -IS_VCS_CHECKOUT_TRUE='#' -LD='/usr/bin/ld' -LDFLAGS='' -LIBM='-lm' -LIBOBJS='' -LIBS=' ' -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -LIPO='' -LN_S='ln -s' -LTLIBOBJS='' -MAKEINFO='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo' -MANIFEST_TOOL=':' -MCHECK='' -MKDIR_P='/bin/mkdir -p' -NM='/usr/bin/nm -B' -NMEDIT='' -OBJDUMP='objdump' -OBJEXT='o' -OTOOL64='' -OTOOL='' -PACKAGE='cyassl' -PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' -PACKAGE_NAME='cyassl' -PACKAGE_STRING='cyassl 3.0.0' -PACKAGE_TARNAME='cyassl' -PACKAGE_URL='http://www.wolfssl.com' -PACKAGE_VERSION='3.0.0' -PATH_SEPARATOR=':' -PTHREAD_CC='clang' -PTHREAD_CFLAGS='-pthread' -PTHREAD_LIBS='' -RANLIB='ranlib' -SED='/bin/sed' -SET_MAKE='' -SHELL='/bin/bash' -STRIP='strip' -USE_VALGRIND_FALSE='' -USE_VALGRIND_TRUE='#' -VERSION='3.0.0' -ac_ct_AR='ar' -ac_ct_CC='clang' -ac_ct_CXX='g++' -ac_ct_DUMPBIN='' -am__EXEEXT_FALSE='' -am__EXEEXT_TRUE='#' -am__fastdepCCAS_FALSE='#' -am__fastdepCCAS_TRUE='' -am__fastdepCC_FALSE='#' -am__fastdepCC_TRUE='' -am__fastdepCXX_FALSE='#' -am__fastdepCXX_TRUE='' -am__include='include' -am__isrc='' -am__leading_dot='.' -am__nodep='_no' -am__quote='' -am__tar='tar --format=ustar -chf - "$$tardir"' -am__untar='tar -xf -' -ax_pthread_config='' -bindir='${exec_prefix}/bin' -build='i686-pc-linux-gnu' -build_alias='' -build_cpu='i686' -build_os='linux-gnu' -build_vendor='pc' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host='i686-pc-linux-gnu' -host_alias='' -host_cpu='i686' -host_os='linux-gnu' -host_vendor='pc' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -mkdir_p='$(MKDIR_P)' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -/* confdefs.h */ -#define PACKAGE_NAME "cyassl" -#define PACKAGE_TARNAME "cyassl" -#define PACKAGE_VERSION "3.0.0" -#define PACKAGE_STRING "cyassl 3.0.0" -#define PACKAGE_BUGREPORT "https://github.com/cyassl/cyassl/issues" -#define PACKAGE_URL "http://www.wolfssl.com" -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_DLFCN_H 1 -#define LT_OBJDIR ".libs/" -#define HAVE_VISIBILITY 1 -#define HAVE_GETHOSTBYNAME 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_INET_NTOA 1 -#define HAVE_MEMSET 1 -#define HAVE_SOCKET 1 -#define HAVE_ARPA_INET_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_ERRNO_H 1 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_LONG 4 -#define TLS __thread -#define DEBUG 0 -#define HAVE_PTHREAD_PRIO_INHERIT 1 -#define HAVE_PTHREAD 1 -#define VCS_SYSTEM "none" -#define VCS_CHECKOUT 0 - -configure: exit 0 diff --git a/project1/cyassl-3.0.0/config.status b/project1/cyassl-3.0.0/config.status deleted file mode 100755 index 1f9288e2..00000000 --- a/project1/cyassl-3.0.0/config.status +++ /dev/null @@ -1,2415 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cyassl $as_me 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" stamp-h Makefile cyassl/version.h cyassl/options.h support/cyassl.pc rpm/spec" -config_headers=" config.h:config.in" -config_commands=" depfiles libtool" - -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to . -cyassl home page: ." - -ac_cs_config="'--enable-dtls' 'CC=clang'" -ac_cs_version="\ -cyassl config.status 3.0.0 -configured by ./configure, generated by GNU Autoconf 2.69, - with options \"$ac_cs_config\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/khimes/work/project1/cyassl-3.0.0' -srcdir='.' -INSTALL='/usr/bin/install -c' -MKDIR_P='/bin/mkdir -p' -AWK='mawk' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X /bin/bash './configure' '--enable-dtls' 'CC=clang' $ac_configure_extra_args --no-create --no-recursion - shift - $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -# -# INIT-COMMANDS -# -AMDEP_TRUE="" ac_aux_dir="build-aux" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -double_quote_subst='s/\(["`\\]\)/\\\1/g' -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -macro_version='2.4.2' -macro_revision='1.3337' -enable_static='no' -enable_shared='yes' -pic_mode='default' -enable_fast_install='yes' -SHELL='/bin/bash' -ECHO='printf %s\n' -PATH_SEPARATOR=':' -host_alias='' -host='i686-pc-linux-gnu' -host_os='linux-gnu' -build_alias='' -build='i686-pc-linux-gnu' -build_os='linux-gnu' -SED='/bin/sed' -Xsed='/bin/sed -e 1s/^X//' -GREP='/bin/grep' -EGREP='/bin/grep -E' -FGREP='/bin/grep -F' -LD='/usr/bin/ld' -NM='/usr/bin/nm -B' -LN_S='ln -s' -max_cmd_len='1572864' -ac_objext='o' -exeext='' -lt_unset='unset' -lt_SP2NL='tr \040 \012' -lt_NL2SP='tr \015\012 \040\040' -lt_cv_to_host_file_cmd='func_convert_file_noop' -lt_cv_to_tool_file_cmd='func_convert_file_noop' -reload_flag=' -r' -reload_cmds='$LD$reload_flag -o $output$reload_objs' -OBJDUMP='objdump' -deplibs_check_method='pass_all' -file_magic_cmd='$MAGIC_CMD' -file_magic_glob='' -want_nocaseglob='no' -DLLTOOL='false' -sharedlib_from_linklib_cmd='printf %s\n' -AR='ar' -AR_FLAGS='cru' -archiver_list_spec='@' -STRIP='strip' -RANLIB='ranlib' -old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' -old_postuninstall_cmds='' -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' -lock_old_archive_extraction='no' -CC='clang' -CFLAGS=' -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE ' -compiler='g++' -GCC='yes' -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' -nm_file_list_spec='@' -lt_sysroot='' -objdir='.libs' -MAGIC_CMD='file' -lt_prog_compiler_no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -lt_prog_compiler_pic=' -fPIC -DPIC' -lt_prog_compiler_wl='-Wl,' -lt_prog_compiler_static='-static' -lt_cv_prog_compiler_c_o='yes' -need_locks='no' -MANIFEST_TOOL=':' -DSYMUTIL='' -NMEDIT='' -LIPO='' -OTOOL='' -OTOOL64='' -libext='a' -shrext_cmds='.so' -extract_expsyms_cmds='' -archive_cmds_need_lc='no' -enable_shared_with_static_runtimes='no' -export_dynamic_flag_spec='${wl}--export-dynamic' -whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -compiler_needs_object='no' -old_archive_from_new_cmds='' -old_archive_from_expsyms_cmds='' -archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -module_cmds='' -module_expsym_cmds='' -with_gnu_ld='yes' -allow_undefined_flag='' -no_undefined_flag='' -hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -hardcode_libdir_separator='' -hardcode_direct='no' -hardcode_direct_absolute='no' -hardcode_minus_L='no' -hardcode_shlibpath_var='unsupported' -hardcode_automatic='no' -inherit_rpath='no' -link_all_deplibs='unknown' -always_export_symbols='no' -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -include_expsyms='' -prelink_cmds='' -postlink_cmds='' -file_list_spec='' -variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' -need_lib_prefix='no' -need_version='no' -version_type='linux' -runpath_var='LD_RUN_PATH' -shlibpath_var='LD_LIBRARY_PATH' -shlibpath_overrides_runpath='no' -libname_spec='lib$name' -library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -soname_spec='${libname}${release}${shared_ext}$major' -install_override_mode='' -postinstall_cmds='' -postuninstall_cmds='' -finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -finish_eval='' -hardcode_into_libs='yes' -sys_lib_search_path_spec='/usr/lib/clang/3.4 /usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib /lib ' -sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/i386-linux-gnu/libfakeroot /usr/lib/i386-linux-gnu/mesa-egl /usr/lib/i386-linux-gnu/mesa /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib ' -hardcode_action='immediate' -enable_dlopen='unknown' -enable_dlopen_self='unknown' -enable_dlopen_self_static='unknown' -old_striplib='strip --strip-debug' -striplib='strip --strip-unneeded' -compiler_lib_search_dirs='' -predep_objects='' -postdep_objects='' -predeps='' -postdeps='' -compiler_lib_search_path='' -LD_CXX='/usr/bin/ld' -reload_flag_CXX=' -r' -reload_cmds_CXX='$LD$reload_flag -o $output$reload_objs' -old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' -compiler_CXX='g++' -GCC_CXX='yes' -lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -lt_prog_compiler_pic_CXX=' -fPIC -DPIC' -lt_prog_compiler_wl_CXX='-Wl,' -lt_prog_compiler_static_CXX='-static' -lt_cv_prog_compiler_c_o_CXX='yes' -archive_cmds_need_lc_CXX='no' -enable_shared_with_static_runtimes_CXX='no' -export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -compiler_needs_object_CXX='no' -old_archive_from_new_cmds_CXX='' -old_archive_from_expsyms_cmds_CXX='' -archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -module_cmds_CXX='' -module_expsym_cmds_CXX='' -with_gnu_ld_CXX='yes' -allow_undefined_flag_CXX='' -no_undefined_flag_CXX='' -hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' -hardcode_libdir_separator_CXX='' -hardcode_direct_CXX='no' -hardcode_direct_absolute_CXX='no' -hardcode_minus_L_CXX='no' -hardcode_shlibpath_var_CXX='unsupported' -hardcode_automatic_CXX='no' -inherit_rpath_CXX='no' -link_all_deplibs_CXX='unknown' -always_export_symbols_CXX='no' -export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -include_expsyms_CXX='' -prelink_cmds_CXX='' -postlink_cmds_CXX='' -file_list_spec_CXX='' -hardcode_action_CXX='immediate' -compiler_lib_search_dirs_CXX='/usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu /usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /usr/lib/gcc/i686-linux-gnu/4.8/../../..' -predep_objects_CXX='/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.8/crtbeginS.o' -postdep_objects_CXX='/usr/lib/gcc/i686-linux-gnu/4.8/crtendS.o /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o' -predeps_CXX='' -postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s' -compiler_lib_search_path_CXX='-L/usr/lib/gcc/i686-linux-gnu/4.8 -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.8/../../..' - -LTCC='clang' -LTCFLAGS='-g -O2' -compiler='clang' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag OBJDUMP deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob DLLTOOL sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix nm_file_list_spec lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib compiler_lib_search_dirs predep_objects postdep_objects predeps postdeps compiler_lib_search_path LD_CXX reload_flag_CXX compiler_CXX lt_prog_compiler_no_builtin_flag_CXX lt_prog_compiler_pic_CXX lt_prog_compiler_wl_CXX lt_prog_compiler_static_CXX lt_cv_prog_compiler_c_o_CXX export_dynamic_flag_spec_CXX whole_archive_flag_spec_CXX compiler_needs_object_CXX with_gnu_ld_CXX allow_undefined_flag_CXX no_undefined_flag_CXX hardcode_libdir_flag_spec_CXX hardcode_libdir_separator_CXX exclude_expsyms_CXX include_expsyms_CXX file_list_spec_CXX compiler_lib_search_dirs_CXX predep_objects_CXX postdep_objects_CXX predeps_CXX postdeps_CXX compiler_lib_search_path_CXX; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec sys_lib_dlsearch_path_spec reload_cmds_CXX old_archive_cmds_CXX old_archive_from_new_cmds_CXX old_archive_from_expsyms_cmds_CXX archive_cmds_CXX archive_expsym_cmds_CXX module_cmds_CXX module_expsym_cmds_CXX export_symbols_cmds_CXX prelink_cmds_CXX postlink_cmds_CXX; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -ac_aux_dir='build-aux' -xsi_shell='yes' -lt_shell_append='yes' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='cyassl' - VERSION='3.0.0' - TIMESTAMP='' - RM='rm -f' - ofile='libtool' - - - - - - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; - "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; - "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; - "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["am__EXEEXT_FALSE"]="" -S["am__EXEEXT_TRUE"]="#" -S["LTLIBOBJS"]="" -S["LIBOBJS"]="" -S["INC_AMINCLUDE"]="include $(top_builddir)/aminclude.am" -S["AMINCLUDE"]="aminclude.am" -S["GENERIC_CONFIG"]="cyassl-config" -S["AM_LDFLAGS"]="" -S["AM_CFLAGS"]="-DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_ST"\ -"ACK -Wall -Wno-unused -Os -fomit-frame-pointer" -S["AM_CPPFLAGS"]=" -fvisibility=hidden" -S["HEX_VERSION"]="0x03000000" -S["IS_VCS_CHECKOUT_FALSE"]="" -S["IS_VCS_CHECKOUT_TRUE"]="#" -S["BUILD_MCAPI_FALSE"]="" -S["BUILD_MCAPI_TRUE"]="#" -S["BUILD_LIBZ_FALSE"]="" -S["BUILD_LIBZ_TRUE"]="#" -S["BUILD_EXAMPLES_FALSE"]="#" -S["BUILD_EXAMPLES_TRUE"]="" -S["BUILD_SLOWMATH_FALSE"]="#" -S["BUILD_SLOWMATH_TRUE"]="" -S["BUILD_FASTMATH_FALSE"]="" -S["BUILD_FASTMATH_TRUE"]="#" -S["USE_VALGRIND_FALSE"]="" -S["USE_VALGRIND_TRUE"]="#" -S["HAVE_VALGRIND"]="" -S["BUILD_PKCS7_FALSE"]="" -S["BUILD_PKCS7_TRUE"]="#" -S["BUILD_NTRU_FALSE"]="" -S["BUILD_NTRU_TRUE"]="#" -S["BUILD_CRL_MONITOR_FALSE"]="" -S["BUILD_CRL_MONITOR_TRUE"]="#" -S["BUILD_CRL_FALSE"]="" -S["BUILD_CRL_TRUE"]="#" -S["HAVE_OPENSSL_CMD"]="" -S["BUILD_OCSP_FALSE"]="" -S["BUILD_OCSP_TRUE"]="#" -S["BUILD_INLINE_FALSE"]="#" -S["BUILD_INLINE_TRUE"]="" -S["BUILD_FIPS_FALSE"]="" -S["BUILD_FIPS_TRUE"]="#" -S["BUILD_RABBIT_FALSE"]="" -S["BUILD_RABBIT_TRUE"]="#" -S["BUILD_HC128_FALSE"]="" -S["BUILD_HC128_TRUE"]="#" -S["BUILD_PWDBASED_FALSE"]="" -S["BUILD_PWDBASED_TRUE"]="#" -S["BUILD_MD4_FALSE"]="" -S["BUILD_MD4_TRUE"]="#" -S["BUILD_SHA_FALSE"]="#" -S["BUILD_SHA_TRUE"]="" -S["BUILD_MD5_FALSE"]="#" -S["BUILD_MD5_TRUE"]="" -S["BUILD_RC4_FALSE"]="#" -S["BUILD_RC4_TRUE"]="" -S["BUILD_DES3_FALSE"]="#" -S["BUILD_DES3_TRUE"]="" -S["BUILD_CODING_FALSE"]="#" -S["BUILD_CODING_TRUE"]="" -S["BUILD_AES_FALSE"]="#" -S["BUILD_AES_TRUE"]="" -S["BUILD_ASN_FALSE"]="#" -S["BUILD_ASN_TRUE"]="" -S["BUILD_DH_FALSE"]="#" -S["BUILD_DH_TRUE"]="" -S["BUILD_RSA_FALSE"]="#" -S["BUILD_RSA_TRUE"]="" -S["BUILD_MEMORY_FALSE"]="#" -S["BUILD_MEMORY_TRUE"]="" -S["BUILD_ECC_FALSE"]="" -S["BUILD_ECC_TRUE"]="#" -S["BUILD_DSA_FALSE"]="" -S["BUILD_DSA_TRUE"]="#" -S["BUILD_SHA512_FALSE"]="" -S["BUILD_SHA512_TRUE"]="#" -S["BUILD_BLAKE2_FALSE"]="" -S["BUILD_BLAKE2_TRUE"]="#" -S["BUILD_RIPEMD_FALSE"]="" -S["BUILD_RIPEMD_TRUE"]="#" -S["BUILD_MD2_FALSE"]="" -S["BUILD_MD2_TRUE"]="#" -S["BUILD_CAMELLIA_FALSE"]="" -S["BUILD_CAMELLIA_TRUE"]="#" -S["BUILD_AESNI_FALSE"]="" -S["BUILD_AESNI_TRUE"]="#" -S["BUILD_AESCCM_FALSE"]="" -S["BUILD_AESCCM_TRUE"]="#" -S["BUILD_AESGCM_FALSE"]="" -S["BUILD_AESGCM_TRUE"]="#" -S["BUILD_SNIFFTEST_FALSE"]="" -S["BUILD_SNIFFTEST_TRUE"]="#" -S["BUILD_SNIFFER_FALSE"]="" -S["BUILD_SNIFFER_TRUE"]="#" -S["BUILD_LEANPSK_FALSE"]="" -S["BUILD_LEANPSK_TRUE"]="#" -S["PTHREAD_CFLAGS"]="-pthread" -S["PTHREAD_LIBS"]="" -S["PTHREAD_CC"]="clang" -S["ax_pthread_config"]="" -S["DEBUG_FALSE"]="" -S["DEBUG_TRUE"]="#" -S["MCHECK"]="" -S["LIBM"]="-lm" -S["am__fastdepCCAS_FALSE"]="#" -S["am__fastdepCCAS_TRUE"]="" -S["CCASDEPMODE"]="depmode=gcc3" -S["CCASFLAGS"]="-g -O2" -S["CCAS"]="clang" -S["HAVE_VISIBILITY"]="1" -S["CFLAG_VISIBILITY"]="-fvisibility=hidden" -S["CXXCPP"]="g++ -E" -S["am__fastdepCXX_FALSE"]="#" -S["am__fastdepCXX_TRUE"]="" -S["CXXDEPMODE"]="depmode=gcc3" -S["ac_ct_CXX"]="g++" -S["CXXFLAGS"]="-g -O2" -S["CXX"]="g++" -S["CPP"]="clang -E" -S["OTOOL64"]="" -S["OTOOL"]="" -S["LIPO"]="" -S["NMEDIT"]="" -S["DSYMUTIL"]="" -S["MANIFEST_TOOL"]=":" -S["RANLIB"]="ranlib" -S["ac_ct_AR"]="ar" -S["AR"]="ar" -S["DLLTOOL"]="false" -S["OBJDUMP"]="objdump" -S["LN_S"]="ln -s" -S["NM"]="/usr/bin/nm -B" -S["ac_ct_DUMPBIN"]="" -S["DUMPBIN"]="" -S["LD"]="/usr/bin/ld" -S["FGREP"]="/bin/grep -F" -S["EGREP"]="/bin/grep -E" -S["GREP"]="/bin/grep" -S["SED"]="/bin/sed" -S["am__fastdepCC_FALSE"]="#" -S["am__fastdepCC_TRUE"]="" -S["CCDEPMODE"]="depmode=gcc3" -S["am__nodep"]="_no" -S["AMDEPBACKSLASH"]="\\" -S["AMDEP_FALSE"]="#" -S["AMDEP_TRUE"]="" -S["am__quote"]="" -S["am__include"]="include" -S["DEPDIR"]=".deps" -S["OBJEXT"]="o" -S["EXEEXT"]="" -S["ac_ct_CC"]="clang" -S["CPPFLAGS"]=" -fvisibility=hidden" -S["LDFLAGS"]="" -S["CFLAGS"]=" -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wforma"\ -"t-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredunda"\ -"nt-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-"\ -"variable -Wwrite-strings -fwrapv -fPIE " -S["CC"]="clang" -S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" -S["CYASSL_LIBRARY_VERSION"]="5:5:0" -S["AM_BACKSLASH"]="\\" -S["AM_DEFAULT_VERBOSITY"]="0" -S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" -S["AM_V"]="$(V)" -S["am__untar"]="tar -xf -" -S["am__tar"]="tar --format=ustar -chf - \"$$tardir\"" -S["AMTAR"]="$${TAR-tar}" -S["am__leading_dot"]="." -S["SET_MAKE"]="" -S["AWK"]="mawk" -S["mkdir_p"]="$(MKDIR_P)" -S["MKDIR_P"]="/bin/mkdir -p" -S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" -S["STRIP"]="strip" -S["install_sh"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/install-sh" -S["MAKEINFO"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing makeinfo" -S["AUTOHEADER"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoheader" -S["AUTOMAKE"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing automake-1.14" -S["AUTOCONF"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing autoconf" -S["ACLOCAL"]="${SHELL} /home/khimes/work/project1/cyassl-3.0.0/build-aux/missing aclocal-1.14" -S["VERSION"]="3.0.0" -S["PACKAGE"]="cyassl" -S["CYGPATH_W"]="echo" -S["am__isrc"]="" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["host_os"]="linux-gnu" -S["host_vendor"]="pc" -S["host_cpu"]="i686" -S["host"]="i686-pc-linux-gnu" -S["build_os"]="linux-gnu" -S["build_vendor"]="pc" -S["build_cpu"]="i686" -S["build"]="i686-pc-linux-gnu" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]=" " -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/usr/local" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="http://www.wolfssl.com" -S["PACKAGE_BUGREPORT"]="https://github.com/cyassl/cyassl/issues" -S["PACKAGE_STRING"]="cyassl 3.0.0" -S["PACKAGE_VERSION"]="3.0.0" -S["PACKAGE_TARNAME"]="cyassl" -S["PACKAGE_NAME"]="cyassl" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"cyassl\"" -D["PACKAGE_TARNAME"]=" \"cyassl\"" -D["PACKAGE_VERSION"]=" \"3.0.0\"" -D["PACKAGE_STRING"]=" \"cyassl 3.0.0\"" -D["PACKAGE_BUGREPORT"]=" \"https://github.com/cyassl/cyassl/issues\"" -D["PACKAGE_URL"]=" \"http://www.wolfssl.com\"" -D["STDC_HEADERS"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_MEMORY_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_DLFCN_H"]=" 1" -D["LT_OBJDIR"]=" \".libs/\"" -D["HAVE_VISIBILITY"]=" 1" -D["HAVE_GETHOSTBYNAME"]=" 1" -D["HAVE_GETADDRINFO"]=" 1" -D["HAVE_GETTIMEOFDAY"]=" 1" -D["HAVE_INET_NTOA"]=" 1" -D["HAVE_MEMSET"]=" 1" -D["HAVE_SOCKET"]=" 1" -D["HAVE_ARPA_INET_H"]=" 1" -D["HAVE_FCNTL_H"]=" 1" -D["HAVE_LIMITS_H"]=" 1" -D["HAVE_NETDB_H"]=" 1" -D["HAVE_NETINET_IN_H"]=" 1" -D["HAVE_STDDEF_H"]=" 1" -D["HAVE_SYS_IOCTL_H"]=" 1" -D["HAVE_SYS_SOCKET_H"]=" 1" -D["HAVE_SYS_TIME_H"]=" 1" -D["HAVE_ERRNO_H"]=" 1" -D["SIZEOF_LONG_LONG"]=" 8" -D["SIZEOF_LONG"]=" 4" -D["TLS"]=" __thread" -D["DEBUG"]=" 0" -D["HAVE_PTHREAD_PRIO_INHERIT"]=" 1" -D["HAVE_PTHREAD"]=" 1" -D["VCS_SYSTEM"]=" \"none\"" -D["VCS_CHECKOUT"]=" 0" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - "stamp-h":F) echo timestamp > stamp-h ;; - - esac -done # for ac_tag - - -as_fn_exit 0 diff --git a/project1/cyassl-3.0.0/configure b/project1/cyassl-3.0.0/configure deleted file mode 100755 index a738892b..00000000 --- a/project1/cyassl-3.0.0/configure +++ /dev/null @@ -1,27349 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cyassl 3.0.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://github.com/cyassl/cyassl/issues about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cyassl' -PACKAGE_TARNAME='cyassl' -PACKAGE_VERSION='3.0.0' -PACKAGE_STRING='cyassl 3.0.0' -PACKAGE_BUGREPORT='https://github.com/cyassl/cyassl/issues' -PACKAGE_URL='http://www.wolfssl.com' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -INC_AMINCLUDE -AMINCLUDE -GENERIC_CONFIG -AM_LDFLAGS -AM_CFLAGS -AM_CPPFLAGS -HEX_VERSION -IS_VCS_CHECKOUT_FALSE -IS_VCS_CHECKOUT_TRUE -BUILD_MCAPI_FALSE -BUILD_MCAPI_TRUE -BUILD_LIBZ_FALSE -BUILD_LIBZ_TRUE -BUILD_EXAMPLES_FALSE -BUILD_EXAMPLES_TRUE -BUILD_SLOWMATH_FALSE -BUILD_SLOWMATH_TRUE -BUILD_FASTMATH_FALSE -BUILD_FASTMATH_TRUE -USE_VALGRIND_FALSE -USE_VALGRIND_TRUE -HAVE_VALGRIND -BUILD_PKCS7_FALSE -BUILD_PKCS7_TRUE -BUILD_NTRU_FALSE -BUILD_NTRU_TRUE -BUILD_CRL_MONITOR_FALSE -BUILD_CRL_MONITOR_TRUE -BUILD_CRL_FALSE -BUILD_CRL_TRUE -HAVE_OPENSSL_CMD -BUILD_OCSP_FALSE -BUILD_OCSP_TRUE -BUILD_INLINE_FALSE -BUILD_INLINE_TRUE -BUILD_FIPS_FALSE -BUILD_FIPS_TRUE -BUILD_RABBIT_FALSE -BUILD_RABBIT_TRUE -BUILD_HC128_FALSE -BUILD_HC128_TRUE -BUILD_PWDBASED_FALSE -BUILD_PWDBASED_TRUE -BUILD_MD4_FALSE -BUILD_MD4_TRUE -BUILD_SHA_FALSE -BUILD_SHA_TRUE -BUILD_MD5_FALSE -BUILD_MD5_TRUE -BUILD_RC4_FALSE -BUILD_RC4_TRUE -BUILD_DES3_FALSE -BUILD_DES3_TRUE -BUILD_CODING_FALSE -BUILD_CODING_TRUE -BUILD_AES_FALSE -BUILD_AES_TRUE -BUILD_ASN_FALSE -BUILD_ASN_TRUE -BUILD_DH_FALSE -BUILD_DH_TRUE -BUILD_RSA_FALSE -BUILD_RSA_TRUE -BUILD_MEMORY_FALSE -BUILD_MEMORY_TRUE -BUILD_ECC_FALSE -BUILD_ECC_TRUE -BUILD_DSA_FALSE -BUILD_DSA_TRUE -BUILD_SHA512_FALSE -BUILD_SHA512_TRUE -BUILD_BLAKE2_FALSE -BUILD_BLAKE2_TRUE -BUILD_RIPEMD_FALSE -BUILD_RIPEMD_TRUE -BUILD_MD2_FALSE -BUILD_MD2_TRUE -BUILD_CAMELLIA_FALSE -BUILD_CAMELLIA_TRUE -BUILD_AESNI_FALSE -BUILD_AESNI_TRUE -BUILD_AESCCM_FALSE -BUILD_AESCCM_TRUE -BUILD_AESGCM_FALSE -BUILD_AESGCM_TRUE -BUILD_SNIFFTEST_FALSE -BUILD_SNIFFTEST_TRUE -BUILD_SNIFFER_FALSE -BUILD_SNIFFER_TRUE -BUILD_LEANPSK_FALSE -BUILD_LEANPSK_TRUE -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -DEBUG_FALSE -DEBUG_TRUE -MCHECK -LIBM -am__fastdepCCAS_FALSE -am__fastdepCCAS_TRUE -CCASDEPMODE -CCASFLAGS -CCAS -HAVE_VISIBILITY -CFLAG_VISIBILITY -CXXCPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LIBTOOL -CYASSL_LIBRARY_VERSION -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_static -enable_shared -with_pic -enable_fast_install -enable_dependency_tracking -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_debug -enable_singlethreaded -enable_dtls -enable_opensslextra -enable_ipv6 -enable_fortress -enable_bump -enable_leanpsk -enable_bigcache -enable_hugecache -enable_smallcache -enable_savesession -enable_savecert -enable_atomicuser -enable_pkcallbacks -enable_sniffer -enable_aesgcm -enable_aesccm -enable_aesni -enable_camellia -enable_md2 -enable_nullcipher -enable_ripemd -enable_blake2 -enable_sha512 -enable_sessioncerts -enable_keygen -enable_certgen -enable_certreq -enable_sep -enable_hkdf -enable_dsa -enable_ecc -enable_fpecc -enable_eccencrypt -enable_psk -enable_errorstrings -enable_oldtls -enable_stacksize -enable_memory -enable_rsa -enable_dh -enable_asn -enable_aes -enable_coding -enable_des3 -enable_arc4 -enable_md5 -enable_sha -enable_md4 -enable_webserver -enable_pwdbased -enable_hc128 -enable_rabbit -enable_fips -enable_filesystem -enable_inline -enable_ocsp -enable_crl -enable_crl_monitor -enable_ntru -enable_sni -enable_maxfragment -enable_truncatedhmac -enable_renegotiation_indication -enable_supportedcurves -enable_tlsx -enable_pkcs7 -enable_scep -enable_smallstack -enable_valgrind -enable_testcert -enable_iopool -enable_certservice -enable_fastmath -enable_fasthugemath -enable_examples -with_libz -with_cavium -enable_mcapi -enable_jobserver -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -CCAS -CCASFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cyassl 3.0.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/cyassl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cyassl 3.0.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-static[=PKGS] build static libraries [default=no] - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-debug Add debug code/turns off optimizations (yes|no) - [default=no] - --enable-singlethreaded Enable CyaSSL single threaded (default: disabled) - --enable-dtls Enable CyaSSL DTLS (default: disabled) - --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled) - --enable-ipv6 Enable testing of IPV6 (default: disabled) - --enable-fortress Enable SSL fortress build (default: disabled) - --enable-bump Enable SSL Bump build (default: disabled) - --enable-leanpsk Enable Lean PSK build (default: disabled) - --enable-bigcache Enable big session cache (default: disabled) - --enable-hugecache Enable huge session cache (default: disabled) - --enable-smallcache Enable small session cache (default: disabled) - --enable-savesession Enable persistent session cache (default: disabled) - --enable-savecert Enable persistent cert cache (default: disabled) - --enable-atomicuser Enable Atomic User Record Layer (default: disabled) - --enable-pkcallbacks Enable Public Key Callbacks (default: disabled) - --enable-sniffer Enable CyaSSL sniffer support (default: disabled) - --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled) - --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled) - --enable-aesni Enable CyaSSL AES-NI support (default: disabled) - --enable-camellia Enable CyaSSL Camellia support (default: disabled) - --enable-md2 Enable CyaSSL MD2 support (default: disabled) - --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled) - --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled) - --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled) - --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled) - --enable-sessioncerts Enable session cert storing (default: disabled) - --enable-keygen Enable key generation (default: disabled) - --enable-certgen Enable cert generation (default: disabled) - --enable-certreq Enable cert request generation (default: disabled) - --enable-sep Enable sep extensions (default: disabled) - --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled) - --enable-dsa Enable DSA (default: disabled) - --enable-ecc Enable ECC (default: disabled) - --enable-fpecc Enable Fixed Point cache ECC (default: disabled) - --enable-eccencrypt Enable ECC encrypt (default: disabled) - --enable-psk Enable PSK (default: disabled) - --enable-errorstrings Enable error strings table (default: enabled) - --enable-oldtls Enable old TLS versions < 1.2 (default: enabled) - --enable-stacksize Enable stack size info on examples (default: disabled) - --enable-memory Enable memory callbacks (default: enabled) - --enable-rsa Enable RSA (default: enabled) - --enable-dh Enable DH (default: enabled) - --enable-asn Enable ASN (default: enabled) - --enable-aes Enable AES (default: enabled) - --enable-coding Enable Coding base 16/64 (default: enabled) - --enable-des3 Enable DES3 (default: enabled) - --enable-arc4 Enable ARC4 (default: enabled) - --enable-md5 Enable MD5 (default: enabled) - --enable-sha Enable SHA (default: enabled) - --enable-md4 Enable MD4 (default: disabled) - --enable-webserver Enable Web Server (default: disabled) - --enable-pwdbased Enable PWDBASED (default: disabled) - --enable-hc128 Enable HC-128 (default: disabled) - --enable-rabbit Enable RABBIT (default: disabled) - --enable-fips Enable FIPS 140-2 (default: disabled) - --enable-filesystem Enable Filesystem support (default: enabled) - --enable-inline Enable inline functions (default: enabled) - --enable-ocsp Enable OCSP (default: disabled) - --enable-crl Enable CRL (default: disabled) - --enable-crl-monitor Enable CRL Monitor (default: disabled) - --enable-ntru Enable NTRU (default: disabled) - --enable-sni Enable SNI (default: disabled) - --enable-maxfragment Enable Maximum Fragment Length (default: disabled) - --enable-truncatedhmac Enable Truncated HMAC (default: disabled) - --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled) - --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled) - --enable-tlsx Enable all TLS Extensions (default: disabled) - --enable-pkcs7 Enable PKCS7 (default: disabled) - --enable-scep Enable wolfSCEP (default: disabled) - --enable-smallstack Enable Small Stack Usage (default: enabled) - --enable-valgrind Enable valgrind for unit tests (default: disabled) - --enable-testcert Enable Test Cert (default: disabled) - --enable-iopool Enable I/O Pool example (default: disabled) - --enable-certservice Enable cert service (default: disabled) - --enable-fastmath Enable fast math ops (default: enabled on x86_64) - --enable-fasthugemath Enable fast math + huge code (default: disabled) - --enable-examples Enable Examples (default: enabled) - --enable-mcapi Enable Microchip API (default: disabled) - --enable-jobserver[=no/yes/#] default=yes - Enable up to # make jobs - yes: enable one more than CPU count - - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - --with-libz=PATH PATH to libz install (default /usr/) - --with-cavium=PATH PATH to cavium/software dir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - CCAS assembler compiler command (defaults to CC) - CCASFLAGS assembler compiler flags (defaults to CFLAGS) - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -cyassl home page: . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cyassl configure 3.0.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------------ ## -## Report this to https://github.com/cyassl/cyassl/issues ## -## ------------------------------------------------------ ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_find_uintX_t LINENO BITS VAR -# ------------------------------------ -# Finds an unsigned integer type with width BITS, setting cache variable VAR -# accordingly. -ac_fn_c_find_uintX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 -$as_echo_n "checking for uint$2_t... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - # Order is important - never check a type that is potentially smaller - # than half of the expected target width. - for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - case $ac_type in #( - uint$2_t) : - eval "$3=yes" ;; #( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_find_uintX_t -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cyassl $as_me 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in build-aux "$srcdir"/build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - -am__api_version='1.14' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cyassl' - VERSION='3.0.0' - - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' - -# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } - if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } - if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_ustar-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 - (cat conftest.dir/file) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - - - -#PROTECT_AC_USE_SYSTEM_EXTENSIONS - - - -ac_config_headers="$ac_config_headers config.h:config.in" - -#shared library versioning -CYASSL_LIBRARY_VERSION=5:5:0 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# | or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed - - -# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even -# if user doesn't override, no way to tell -USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no -fi - - - - - - - - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - - -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf - - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 -$as_echo_n "checking whether the -Werror option is usable... " >&6; } - if ${gl_cv_cc_vis_werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_cc_vis_werror=yes -else - gl_cv_cc_vis_werror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 -$as_echo "$gl_cv_cc_vis_werror" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 -$as_echo_n "checking for simple visibility declarations... " >&6; } - if ${gl_cv_cc_visibility+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_cc_visibility=yes -else - gl_cv_cc_visibility=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 -$as_echo "$gl_cv_cc_visibility" >&6; } - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - - - -cat >>confdefs.h <<_ACEOF -#define HAVE_VISIBILITY $HAVE_VISIBILITY -_ACEOF - - -if test -n "$CFLAG_VISIBILITY" ; then : - - AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" - CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" - -fi - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -for ac_func in gethostbyname -do : - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME 1 -_ACEOF - -fi -done - -for ac_func in getaddrinfo -do : - ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETADDRINFO 1 -_ACEOF - -fi -done - -for ac_func in gettimeofday -do : - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETTIMEOFDAY 1 -_ACEOF - -fi -done - -for ac_func in inet_ntoa -do : - ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" -if test "x$ac_cv_func_inet_ntoa" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INET_NTOA 1 -_ACEOF - -fi -done - -for ac_func in memset -do : - ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMSET 1 -_ACEOF - -fi -done - -for ac_func in socket -do : - ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKET 1 -_ACEOF - -fi -done - -for ac_header in arpa/inet.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARPA_INET_H 1 -_ACEOF - -fi - -done - -for ac_header in fcntl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" -if test "x$ac_cv_header_fcntl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FCNTL_H 1 -_ACEOF - -fi - -done - -for ac_header in limits.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIMITS_H 1 -_ACEOF - -fi - -done - -for ac_header in netdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDB_H 1 -_ACEOF - -fi - -done - -for ac_header in netinet/in.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETINET_IN_H 1 -_ACEOF - -fi - -done - -for ac_header in stddef.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDDEF_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/ioctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_IOCTL_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TIME_H 1 -_ACEOF - -fi - -done - -for ac_header in errno.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_errno_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ERRNO_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 -$as_echo_n "checking for socket in -lnetwork... " >&6; } -if ${ac_cv_lib_network_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnetwork $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_network_socket=yes -else - ac_cv_lib_network_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 -$as_echo "$ac_cv_lib_network_socket" >&6; } -if test "x$ac_cv_lib_network_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNETWORK 1 -_ACEOF - - LIBS="-lnetwork $LIBS" - -fi - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - -# mktime check takes forever on some systems, if time supported it would be -# highly unusual for mktime to be missing -#AC_FUNC_MKTIME - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "#define _UINT8_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - -# By default we simply use the C compiler to build assembly code. - -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS - - - -depcc="$CCAS" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CCAS_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CCAS_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CCAS_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } -CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then - am__fastdepCCAS_TRUE= - am__fastdepCCAS_FALSE='#' -else - am__fastdepCCAS_TRUE='#' - am__fastdepCCAS_FALSE= -fi - - - -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 -$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmw $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _mwvalidcheckl (); -int -main () -{ -return _mwvalidcheckl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mw__mwvalidcheckl=yes -else - ac_cv_lib_mw__mwvalidcheckl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 -$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : - LIBM="-lmw" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="$LIBM -lm" -fi - - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="-lm" -fi - - ;; -esac - - - -OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" -OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" -OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" -DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" - -thread_ls_on=no -# Thread local storage - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 -$as_echo_n "checking for thread local storage (TLS) class... " >&6; } - if ${ac_cv_tls+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_tls_keywords="__thread __declspec(thread) none" - for ax_tls_keyword in $ax_tls_keywords; do - case $ax_tls_keyword in #( - none) : - ac_cv_tls=none ; break ;; #( - *) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void - foo(void) { - static $ax_tls_keyword int bar; - exit(1); - } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_tls=$ax_tls_keyword ; break -else - ac_cv_tls=none - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; -esac - done - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 -$as_echo "$ac_cv_tls" >&6; } - - if test "$ac_cv_tls" != "none"; then : - -cat >>confdefs.h <<_ACEOF -#define TLS $ac_cv_tls -_ACEOF - - - AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS" - thread_ls_on=yes - -else - : - -fi - - - -# DEBUG - # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; ax_enable_debug=yes - -$as_echo "#define DEBUG 1" >>confdefs.h - -else - ax_enable_debug=no - - -$as_echo "#define DEBUG 0" >>confdefs.h - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5 -$as_echo_n "checking for debug... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5 -$as_echo "$ax_enable_debug" >&6; } - if test "x${ax_enable_debug}" = "xyes"; then - DEBUG_TRUE= - DEBUG_FALSE='#' -else - DEBUG_TRUE='#' - DEBUG_FALSE= -fi - -if test "$ax_enable_debug" = "yes"; then : - AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS" -else - AM_CFLAGS="$AM_CFLAGS -DNDEBUG" -fi - - -# SINGLE THREADED -# Check whether --enable-singlethreaded was given. -if test "${enable_singlethreaded+set}" = set; then : - enableval=$enable_singlethreaded; ENABLED_SINGLETHREADED=$enableval -else - ENABLED_SINGLETHREADED=no -fi - - - - if test x"$CC" = xclang; then - wolfssl_darwin_clang=yes - elif test x"$CC" = x || test x"$CC" = xgcc; then - if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then - wolfssl_darwin_clang=yes - fi - fi - -if test "x$ENABLED_SINGLETHREADED" = "xno" ; then : - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case ${host_os} in - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - darwin*) - - if test x"$wolfssl_darwin_clang" = x"yes"; then : - ax_pthread_flags="$ax_pthread_flags" -else - ax_pthread_flags="-pthread $ax_pthread_flags" -fi - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ax_pthread_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } -int -main () -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr = $attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -$as_echo "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -$as_echo "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main () -{ -int i = PTHREAD_PRIO_INHERIT; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_PRIO_INHERIT=yes -else - ax_cv_PTHREAD_PRIO_INHERIT=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : - -$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h - -fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - if as_fn_executable_p ${CC}_r; then : - PTHREAD_CC="${CC}_r" -fi ;; #( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( - *) : - ;; -esac - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - - AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" - LIBS="$LIBS $PTHREAD_LIBS" - - : -else - ax_pthread_ok=no - - ENABLED_SINGLETHREADED=yes - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -fi - -if test "x$ENABLED_SINGLETHREADED" = "xyes" ; then : - AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" -fi - - -# DTLS -# Check whether --enable-dtls was given. -if test "${enable_dtls+set}" = set; then : - enableval=$enable_dtls; ENABLED_DTLS=$enableval -else - ENABLED_DTLS=no - -fi - -if test "$ENABLED_DTLS" = "yes" -then - AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" -fi - - -# OPENSSL Extra Compatibility -# Check whether --enable-opensslextra was given. -if test "${enable_opensslextra+set}" = set; then : - enableval=$enable_opensslextra; ENABLED_OPENSSLEXTRA=$enableval -else - ENABLED_OPENSSLEXTRA=no - -fi - -if test "$ENABLED_OPENSSLEXTRA" = "yes" -then - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" -fi - -if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable small and opensslextra, only one or the other." "$LINENO" 5 -fi - - -# IPv6 Test Apps -# Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : - enableval=$enable_ipv6; ENABLED_IPV6=$enableval -else - ENABLED_IPV6=no - -fi - - -if test "$ENABLED_IPV6" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" -fi - - -# Fortress build -# Check whether --enable-fortress was given. -if test "${enable_fortress+set}" = set; then : - enableval=$enable_fortress; ENABLED_FORTRESS=$enableval -else - ENABLED_FORTRESS=no - -fi - - -if test "$ENABLED_FORTRESS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" -fi - - -# ssl bump build -# Check whether --enable-bump was given. -if test "${enable_bump+set}" = set; then : - enableval=$enable_bump; ENABLED_BUMP=$enableval -else - ENABLED_BUMP=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" -fi - -ENABLED_SLOWMATH="yes" - -# lean psk build -# Check whether --enable-leanpsk was given. -if test "${enable_leanpsk+set}" = set; then : - enableval=$enable_leanpsk; ENABLED_LEANPSK=$enableval -else - ENABLED_LEANPSK=no - -fi - - -if test "$ENABLED_LEANPSK" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" - ENABLED_SLOWMATH="no" - ENABLED_SINGLETHREADED="yes" -fi - - if test "x$ENABLED_LEANPSK" = "xyes"; then - BUILD_LEANPSK_TRUE= - BUILD_LEANPSK_FALSE='#' -else - BUILD_LEANPSK_TRUE='#' - BUILD_LEANPSK_FALSE= -fi - - - -# big cache -# Check whether --enable-bigcache was given. -if test "${enable_bigcache+set}" = set; then : - enableval=$enable_bigcache; ENABLED_BIGCACHE=$enableval -else - ENABLED_BIGCACHE=no - -fi - - -if test "$ENABLED_BIGCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" -fi - - -# HUGE cache -# Check whether --enable-hugecache was given. -if test "${enable_hugecache+set}" = set; then : - enableval=$enable_hugecache; ENABLED_HUGECACHE=$enableval -else - ENABLED_HUGECACHE=no - -fi - - -if test "$ENABLED_HUGECACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" -fi - - -# SMALL cache -# Check whether --enable-smallcache was given. -if test "${enable_smallcache+set}" = set; then : - enableval=$enable_smallcache; ENABLED_SMALLCACHE=$enableval -else - ENABLED_SMALLCACHE=no - -fi - - -if test "$ENABLED_SMALLCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" -fi - - -# Persistent session cache -# Check whether --enable-savesession was given. -if test "${enable_savesession+set}" = set; then : - enableval=$enable_savesession; ENABLED_SAVESESSION=$enableval -else - ENABLED_SAVESESSION=no - -fi - - -if test "$ENABLED_SAVESESSION" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" -fi - - -# Persistent cert cache -# Check whether --enable-savecert was given. -if test "${enable_savecert+set}" = set; then : - enableval=$enable_savecert; ENABLED_SAVECERT=$enableval -else - ENABLED_SAVECERT=no - -fi - - -if test "$ENABLED_SAVECERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" -fi - - -# Atomic User Record Layer -# Check whether --enable-atomicuser was given. -if test "${enable_atomicuser+set}" = set; then : - enableval=$enable_atomicuser; ENABLED_ATOMICUSER=$enableval -else - ENABLED_ATOMICUSER=no - -fi - - -if test "$ENABLED_ATOMICUSER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" -fi - - -# Public Key Callbacks -# Check whether --enable-pkcallbacks was given. -if test "${enable_pkcallbacks+set}" = set; then : - enableval=$enable_pkcallbacks; ENABLED_PKCALLBACKS=$enableval -else - ENABLED_PKCALLBACKS=no - -fi - - -if test "$ENABLED_PKCALLBACKS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" -fi - - -# SNIFFER -ENABLED_SNIFFTEST=no -# Check whether --enable-sniffer was given. -if test "${enable_sniffer+set}" = set; then : - enableval=$enable_sniffer; - ENABLED_SNIFFER=yes - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" - if test "x$enableval" = "xyes" ; then : - for ac_header in pcap/pcap.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" -if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PCAP_PCAP_H 1 -_ACEOF - - ENABLED_SNIFFTEST=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable sniffer test without having libpcap available." >&5 -$as_echo "$as_me: WARNING: cannot enable sniffer test without having libpcap available." >&2;} -fi - -done - -fi - -else - - ENABLED_SNIFFER=no - -fi - - - if test "x$ENABLED_SNIFFER" = "xyes" ; then - BUILD_SNIFFER_TRUE= - BUILD_SNIFFER_FALSE='#' -else - BUILD_SNIFFER_TRUE='#' - BUILD_SNIFFER_FALSE= -fi - - if test "x$ENABLED_SNIFFTEST" = "xyes" ; then - BUILD_SNIFFTEST_TRUE= - BUILD_SNIFFTEST_FALSE='#' -else - BUILD_SNIFFTEST_TRUE='#' - BUILD_SNIFFTEST_FALSE= -fi - - -# AES-GCM -# Check whether --enable-aesgcm was given. -if test "${enable_aesgcm+set}" = set; then : - enableval=$enable_aesgcm; ENABLED_AESGCM=$enableval -else - ENABLED_AESGCM=no - -fi - - -if test "$ENABLED_AESGCM" = "word32" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "small" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "table" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" -fi - - if test "x$ENABLED_AESGCM" = "xyes"; then - BUILD_AESGCM_TRUE= - BUILD_AESGCM_FALSE='#' -else - BUILD_AESGCM_TRUE='#' - BUILD_AESGCM_FALSE= -fi - - - -# AES-CCM -# Check whether --enable-aesccm was given. -if test "${enable_aesccm+set}" = set; then : - enableval=$enable_aesccm; ENABLED_AESCCM=$enableval -else - ENABLED_AESCCM=no - -fi - - -if test "$ENABLED_AESCCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" -fi - - if test "x$ENABLED_AESCCM" = "xyes"; then - BUILD_AESCCM_TRUE= - BUILD_AESCCM_FALSE='#' -else - BUILD_AESCCM_TRUE='#' - BUILD_AESCCM_FALSE= -fi - - - -# AES-NI -# Check whether --enable-aesni was given. -if test "${enable_aesni+set}" = set; then : - enableval=$enable_aesni; ENABLED_AESNI=$enableval -else - ENABLED_AESNI=no - -fi - - -if test "$ENABLED_AESNI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" - if test "$GCC" = "yes" - then - # GCC needs these flags, icc doesn't - # opt levels greater than 2 may cause problems on systems w/o aesni - AM_CFLAGS="$AM_CFLAGS -maes -msse4" - fi -fi - - if test "x$ENABLED_AESNI" = "xyes"; then - BUILD_AESNI_TRUE= - BUILD_AESNI_FALSE='#' -else - BUILD_AESNI_TRUE='#' - BUILD_AESNI_FALSE= -fi - - - -# Camellia -# Check whether --enable-camellia was given. -if test "${enable_camellia+set}" = set; then : - enableval=$enable_camellia; ENABLED_CAMELLIA=$enableval -else - ENABLED_CAMELLIA=no - -fi - - -if test "$ENABLED_CAMELLIA" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" -fi - - if test "x$ENABLED_CAMELLIA" = "xyes"; then - BUILD_CAMELLIA_TRUE= - BUILD_CAMELLIA_FALSE='#' -else - BUILD_CAMELLIA_TRUE='#' - BUILD_CAMELLIA_FALSE= -fi - - - -# MD2 -# Check whether --enable-md2 was given. -if test "${enable_md2+set}" = set; then : - enableval=$enable_md2; ENABLED_MD2=$enableval -else - ENABLED_MD2=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_MD2="yes" -fi - -if test "$ENABLED_MD2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" -fi - - if test "x$ENABLED_MD2" = "xyes"; then - BUILD_MD2_TRUE= - BUILD_MD2_FALSE='#' -else - BUILD_MD2_TRUE='#' - BUILD_MD2_FALSE= -fi - - - -# NULL CIPHER -# Check whether --enable-nullcipher was given. -if test "${enable_nullcipher+set}" = set; then : - enableval=$enable_nullcipher; ENABLED_NULL_CIPHER=$enableval -else - ENABLED_NULL_CIPHER=no - -fi - - -if test "$ENABLED_NULL_CIPHER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" -fi - -# RIPEMD -# Check whether --enable-ripemd was given. -if test "${enable_ripemd+set}" = set; then : - enableval=$enable_ripemd; ENABLED_RIPEMD=$enableval -else - ENABLED_RIPEMD=no - -fi - - -if test "$ENABLED_RIPEMD" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" -fi - - if test "x$ENABLED_RIPEMD" = "xyes"; then - BUILD_RIPEMD_TRUE= - BUILD_RIPEMD_FALSE='#' -else - BUILD_RIPEMD_TRUE='#' - BUILD_RIPEMD_FALSE= -fi - - - -# BLAKE2 -# Check whether --enable-blake2 was given. -if test "${enable_blake2+set}" = set; then : - enableval=$enable_blake2; ENABLED_BLAKE2=$enableval -else - ENABLED_BLAKE2=no - -fi - - -if test "$ENABLED_BLAKE2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" -fi - - if test "x$ENABLED_BLAKE2" = "xyes"; then - BUILD_BLAKE2_TRUE= - BUILD_BLAKE2_FALSE='#' -else - BUILD_BLAKE2_TRUE='#' - BUILD_BLAKE2_FALSE= -fi - - - -# SHA512 -# Check whether --enable-sha512 was given. -if test "${enable_sha512+set}" = set; then : - enableval=$enable_sha512; ENABLED_SHA512=$enableval -else - ENABLED_SHA512=no - -fi - - -if test "$ENABLED_SHA512" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" -fi - -if test "$ENABLED_FORTRESS" = "yes" -then - ENABLED_SHA512="yes" -fi - - - if test "x$ENABLED_SHA512" = "xyes"; then - BUILD_SHA512_TRUE= - BUILD_SHA512_FALSE='#' -else - BUILD_SHA512_TRUE='#' - BUILD_SHA512_FALSE= -fi - - - -# SESSION CERTS -# Check whether --enable-sessioncerts was given. -if test "${enable_sessioncerts+set}" = set; then : - enableval=$enable_sessioncerts; ENABLED_SESSIONCERTS=$enableval -else - ENABLED_SESSIONCERTS=no - -fi - - -if test "$ENABLED_SESSIONCERTS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" -fi - - -# KEY GENERATION -# Check whether --enable-keygen was given. -if test "${enable_keygen+set}" = set; then : - enableval=$enable_keygen; ENABLED_KEYGEN=$enableval -else - ENABLED_KEYGEN=no - -fi - - -if test "$ENABLED_KEYGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" -fi - - -# CERT GENERATION -# Check whether --enable-certgen was given. -if test "${enable_certgen+set}" = set; then : - enableval=$enable_certgen; ENABLED_CERTGEN=$enableval -else - ENABLED_CERTGEN=no - -fi - - -if test "$ENABLED_CERTGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" -fi - - -# CERT REQUEST GENERATION -# Check whether --enable-certreq was given. -if test "${enable_certreq+set}" = set; then : - enableval=$enable_certreq; ENABLED_CERTREQ=$enableval -else - ENABLED_CERTREQ=no - -fi - - -if test "$ENABLED_CERTREQ" = "yes" -then - if test "$ENABLED_CERTGEN" = "no" - then - as_fn_error $? "cannot enable certreq without enabling certgen." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" -fi - - -# SEP -# Check whether --enable-sep was given. -if test "${enable_sep+set}" = set; then : - enableval=$enable_sep; ENABLED_SEP=$enableval -else - ENABLED_SEP=no - -fi - -if test "$ENABLED_SEP" = "yes" -then - AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" -fi - - -# HKDF -# Check whether --enable-hkdf was given. -if test "${enable_hkdf+set}" = set; then : - enableval=$enable_hkdf; ENABLED_HKDF=$enableval -else - ENABLED_HKDF=no - -fi - -if test "$ENABLED_HKDF" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" -fi - - -# DSA -# Check whether --enable-dsa was given. -if test "${enable_dsa+set}" = set; then : - enableval=$enable_dsa; ENABLED_DSA=$enableval -else - ENABLED_DSA=no - -fi - - -if test "$ENABLED_DSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DSA" -fi - - if test "x$ENABLED_DSA" = "xyes"; then - BUILD_DSA_TRUE= - BUILD_DSA_FALSE='#' -else - BUILD_DSA_TRUE='#' - BUILD_DSA_FALSE= -fi - - - -# ECC -# Check whether --enable-ecc was given. -if test "${enable_ecc+set}" = set; then : - enableval=$enable_ecc; ENABLED_ECC=$enableval -else - ENABLED_ECC=no - -fi - - -if test "$ENABLED_ECC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" -fi - - if test "x$ENABLED_ECC" = "xyes"; then - BUILD_ECC_TRUE= - BUILD_ECC_FALSE='#' -else - BUILD_ECC_TRUE='#' - BUILD_ECC_FALSE= -fi - - - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable ecc and small, ecc requires TLS which small turns off." "$LINENO" 5 -fi - - -# FP ECC, Fixed Point cache ECC -# Check whether --enable-fpecc was given. -if test "${enable_fpecc+set}" = set; then : - enableval=$enable_fpecc; ENABLED_FPECC=$enableval -else - ENABLED_FPECC=no - -fi - - -if test "$ENABLED_FPECC" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - as_fn_error $? "cannot enable fpecc without enabling ecc." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DFP_ECC" -fi - - -# ECC encrypt -# Check whether --enable-eccencrypt was given. -if test "${enable_eccencrypt+set}" = set; then : - enableval=$enable_eccencrypt; ENABLED_ECC_ENCRYPT=$enableval -else - ENABLED_ECC_ENCRYPT=no - -fi - - -if test "$ENABLED_ECC_ENCRYPT" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - as_fn_error $? "cannot enable eccencrypt without enabling ecc." "$LINENO" 5 - fi - if test "$ENABLED_HKDF" = "no" - then - as_fn_error $? "cannot enable eccencrypt without enabling hkdf." "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" -fi - - -# PSK -# Check whether --enable-psk was given. -if test "${enable_psk+set}" = set; then : - enableval=$enable_psk; ENABLED_PSK=$enableval -else - ENABLED_PSK=no - -fi - - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_PSK" -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" -then - ENABLED_PSK=yes -fi - - -# ERROR STRINGS -# Check whether --enable-errorstrings was given. -if test "${enable_errorstrings+set}" = set; then : - enableval=$enable_errorstrings; ENABLED_ERROR_STRINGS=$enableval -else - ENABLED_ERROR_STRINGS=yes - -fi - - -if test "$ENABLED_ERROR_STRINGS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" -else - # turn off error strings if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" - ENABLED_ERROR_STRINGS=no - fi -fi - - -# OLD TLS -# Check whether --enable-oldtls was given. -if test "${enable_oldtls+set}" = set; then : - enableval=$enable_oldtls; ENABLED_OLD_TLS=$enableval -else - ENABLED_OLD_TLS=yes - -fi - - -if test "$ENABLED_OLD_TLS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" -else - # turn off old if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" - ENABLED_OLD_TLS=no - fi -fi - - -# STACK SIZE info for examples -# Check whether --enable-stacksize was given. -if test "${enable_stacksize+set}" = set; then : - enableval=$enable_stacksize; ENABLED_STACKSIZE=$enableval -else - ENABLED_STACKSIZE=no - -fi - - -if test "$ENABLED_STACKSIZE" = "yes" -then - ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" -if test "x$ac_cv_func_posix_memalign" = xyes; then : - -else - as_fn_error $? "stacksize needs posix_memalign" "$LINENO" 5 -fi - - ac_fn_c_check_func "$LINENO" "pthread_attr_setstack" "ac_cv_func_pthread_attr_setstack" -if test "x$ac_cv_func_pthread_attr_setstack" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstack in -lpthread" >&5 -$as_echo_n "checking for pthread_attr_setstack in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_attr_setstack+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_attr_setstack (); -int -main () -{ -return pthread_attr_setstack (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_attr_setstack=yes -else - ac_cv_lib_pthread_pthread_attr_setstack=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstack" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_attr_setstack" >&6; } -if test "x$ac_cv_lib_pthread_pthread_attr_setstack" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -fi - -fi - - AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" -fi - - -# MEMORY -# Check whether --enable-memory was given. -if test "${enable_memory+set}" = set; then : - enableval=$enable_memory; ENABLED_MEMORY=$enableval -else - ENABLED_MEMORY=yes - -fi - - -if test "$ENABLED_MEMORY" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" -else - # turn off memory cb if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - # but don't turn on NO_CYASSL_MEMORY because using own - ENABLED_MEMORY=no - fi -fi - - if test "x$ENABLED_MEMORY" = "xyes"; then - BUILD_MEMORY_TRUE= - BUILD_MEMORY_FALSE='#' -else - BUILD_MEMORY_TRUE='#' - BUILD_MEMORY_FALSE= -fi - - - -# RSA -# Check whether --enable-rsa was given. -if test "${enable_rsa+set}" = set; then : - enableval=$enable_rsa; ENABLED_RSA=$enableval -else - ENABLED_RSA=yes - -fi - - -if test "$ENABLED_RSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" -else - # turn off RSA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" - ENABLED_RSA=no - fi -fi - - if test "x$ENABLED_RSA" = "xyes"; then - BUILD_RSA_TRUE= - BUILD_RSA_FALSE='#' -else - BUILD_RSA_TRUE='#' - BUILD_RSA_FALSE= -fi - - - -# DH -# Check whether --enable-dh was given. -if test "${enable_dh+set}" = set; then : - enableval=$enable_dh; ENABLED_DH=$enableval -else - ENABLED_DH=yes - -fi - - -if test "$ENABLED_DH" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" -else - # turn off DH if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" - ENABLED_DH=no - fi -fi - - if test "x$ENABLED_DH" = "xyes"; then - BUILD_DH_TRUE= - BUILD_DH_FALSE='#' -else - BUILD_DH_TRUE='#' - BUILD_DH_FALSE= -fi - - - -# ASN -# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, -# and no big int, use this to disable all public key stuff -# Check whether --enable-asn was given. -if test "${enable_asn+set}" = set; then : - enableval=$enable_asn; ENABLED_ASN=$enableval -else - ENABLED_ASN=yes - -fi - - -if test "$ENABLED_ASN" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" -else - # turn off ASN if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" - ENABLED_ASN=no - fi -fi - -if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable rsa if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable dsa if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable dh if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please disable ecc if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" -then - as_fn_error $? "please enable psk if disabling asn." "$LINENO" 5 -fi - -if test "$ENABLED_ASN" = "no" -then - ENABLED_FASTMATH=no - ENABLED_SLOWMATH=no -fi - - if test "x$ENABLED_ASN" = "xyes"; then - BUILD_ASN_TRUE= - BUILD_ASN_FALSE='#' -else - BUILD_ASN_TRUE='#' - BUILD_ASN_FALSE= -fi - - - -# AES -# Check whether --enable-aes was given. -if test "${enable_aes+set}" = set; then : - enableval=$enable_aes; ENABLED_AES=$enableval -else - ENABLED_AES=yes - -fi - - -if test "$ENABLED_AES" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" -else - # turn off AES if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" - ENABLED_AES=no - fi -fi - - if test "x$ENABLED_AES" = "xyes"; then - BUILD_AES_TRUE= - BUILD_AES_FALSE='#' -else - BUILD_AES_TRUE='#' - BUILD_AES_FALSE= -fi - - - -# CODING -# Check whether --enable-coding was given. -if test "${enable_coding+set}" = set; then : - enableval=$enable_coding; ENABLED_CODING=$enableval -else - ENABLED_CODING=yes - -fi - - -if test "$ENABLED_CODING" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" -else - # turn off CODING if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" - ENABLED_CODING=no - fi -fi - - if test "x$ENABLED_CODING" = "xyes"; then - BUILD_CODING_TRUE= - BUILD_CODING_FALSE='#' -else - BUILD_CODING_TRUE='#' - BUILD_CODING_FALSE= -fi - - - -# DES3 -# Check whether --enable-des3 was given. -if test "${enable_des3+set}" = set; then : - enableval=$enable_des3; ENABLED_DES3=$enableval -else - ENABLED_DES3=yes - -fi - - -if test "$ENABLED_DES3" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" -else - # turn off DES3 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" - ENABLED_DES3=no - fi -fi - - if test "x$ENABLED_DES3" = "xyes"; then - BUILD_DES3_TRUE= - BUILD_DES3_FALSE='#' -else - BUILD_DES3_TRUE='#' - BUILD_DES3_FALSE= -fi - - - -# ARC4 -# Check whether --enable-arc4 was given. -if test "${enable_arc4+set}" = set; then : - enableval=$enable_arc4; ENABLED_ARC4=$enableval -else - ENABLED_ARC4=yes - -fi - - -if test "$ENABLED_ARC4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" -else - # turn off ARC4 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" - ENABLED_ARC4=no - fi -fi - - if test "x$ENABLED_ARC4" = "xyes"; then - BUILD_RC4_TRUE= - BUILD_RC4_FALSE='#' -else - BUILD_RC4_TRUE='#' - BUILD_RC4_FALSE= -fi - - - -# MD5 -# Check whether --enable-md5 was given. -if test "${enable_md5+set}" = set; then : - enableval=$enable_md5; ENABLED_MD5=$enableval -else - ENABLED_MD5=yes - -fi - - -if test "$ENABLED_MD5" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" -else - # turn off MD5 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" - ENABLED_MD5=no - fi -fi - - if test "x$ENABLED_MD5" = "xyes"; then - BUILD_MD5_TRUE= - BUILD_MD5_FALSE='#' -else - BUILD_MD5_TRUE='#' - BUILD_MD5_FALSE= -fi - - - -# SHA -# Check whether --enable-sha was given. -if test "${enable_sha+set}" = set; then : - enableval=$enable_sha; ENABLED_SHA=$enableval -else - ENABLED_SHA=yes - -fi - - -if test "$ENABLED_SHA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" -else - # turn off SHA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" - ENABLED_SHA=no - fi -fi - - if test "x$ENABLED_SHA" = "xyes"; then - BUILD_SHA_TRUE= - BUILD_SHA_FALSE='#' -else - BUILD_SHA_TRUE='#' - BUILD_SHA_FALSE= -fi - - - -# MD4 -# Check whether --enable-md4 was given. -if test "${enable_md4+set}" = set; then : - enableval=$enable_md4; ENABLED_MD4=$enableval -else - ENABLED_MD4=no - -fi - - -if test "$ENABLED_MD4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD4" -fi - - if test "x$ENABLED_MD4" = "xyes"; then - BUILD_MD4_TRUE= - BUILD_MD4_FALSE='#' -else - BUILD_MD4_TRUE='#' - BUILD_MD4_FALSE= -fi - - - -# Web Server Build -# Check whether --enable-webserver was given. -if test "${enable_webserver+set}" = set; then : - enableval=$enable_webserver; ENABLED_WEBSERVER=$enableval -else - ENABLED_WEBSERVER=no - -fi - - -if test "$ENABLED_WEBSERVER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" -fi - - -# PWDBASED -# Check whether --enable-pwdbased was given. -if test "${enable_pwdbased+set}" = set; then : - enableval=$enable_pwdbased; ENABLED_PWDBASED=$enableval -else - ENABLED_PWDBASED=no - -fi - - -if test "$ENABLED_PWDBASED" = "no" -then - if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" - then - # opensslextra and webserver needs pwdbased - ENABLED_PWDBASED=yes - else - AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" - fi -fi - - if test "x$ENABLED_PWDBASED" = "xyes"; then - BUILD_PWDBASED_TRUE= - BUILD_PWDBASED_FALSE='#' -else - BUILD_PWDBASED_TRUE='#' - BUILD_PWDBASED_FALSE= -fi - - - -# HC128 -# Check whether --enable-hc128 was given. -if test "${enable_hc128+set}" = set; then : - enableval=$enable_hc128; ENABLED_HC128=$enableval -else - ENABLED_HC128=no - -fi - - -if test "$ENABLED_HC128" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_HC128" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" -fi - - if test "x$ENABLED_HC128" = "xyes"; then - BUILD_HC128_TRUE= - BUILD_HC128_FALSE='#' -else - BUILD_HC128_TRUE='#' - BUILD_HC128_FALSE= -fi - - - -# RABBIT -# Check whether --enable-rabbit was given. -if test "${enable_rabbit+set}" = set; then : - enableval=$enable_rabbit; ENABLED_RABBIT=$enableval -else - ENABLED_RABBIT=no - -fi - - -if test "$ENABLED_RABBIT" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" -fi - - if test "x$ENABLED_RABBIT" = "xyes"; then - BUILD_RABBIT_TRUE= - BUILD_RABBIT_FALSE='#' -else - BUILD_RABBIT_TRUE='#' - BUILD_RABBIT_FALSE= -fi - - - -# FIPS -# Check whether --enable-fips was given. -if test "${enable_fips+set}" = set; then : - enableval=$enable_fips; ENABLED_FIPS=$enableval -else - ENABLED_FIPS=no - -fi - - -if test "x$ENABLED_FIPS" = "xyes" -then - # requires thread local storage - if test "$thread_ls_on" = "no" - then - as_fn_error $? "FIPS requires Thread Local Storage" "$LINENO" 5 - fi - # requires SHA512 - if test "x$ENABLED_SHA512" = "xno" - then - ENABLED_SHA512="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" - if test "x$ENABLED_SHA512" = "xyes"; then - BUILD_SHA512_TRUE= - BUILD_SHA512_FALSE='#' -else - BUILD_SHA512_TRUE='#' - BUILD_SHA512_FALSE= -fi - - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" -fi - - if test "x$ENABLED_FIPS" = "xyes"; then - BUILD_FIPS_TRUE= - BUILD_FIPS_FALSE='#' -else - BUILD_FIPS_TRUE='#' - BUILD_FIPS_FALSE= -fi - - - -# Filesystem Build -# Check whether --enable-filesystem was given. -if test "${enable_filesystem+set}" = set; then : - enableval=$enable_filesystem; ENABLED_FILESYSTEM=$enableval -else - ENABLED_FILESYSTEM=yes - -fi - - -if test "$ENABLED_FILESYSTEM" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" -else - # turn off filesystem if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" - ENABLED_FILESYSTEM=no - fi -fi - - -# inline Build -# Check whether --enable-inline was given. -if test "${enable_inline+set}" = set; then : - enableval=$enable_inline; ENABLED_INLINE=$enableval -else - ENABLED_INLINE=yes - -fi - - -if test "$ENABLED_INLINE" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" -fi - - if test "x$ENABLED_INLINE" = "xyes"; then - BUILD_INLINE_TRUE= - BUILD_INLINE_FALSE='#' -else - BUILD_INLINE_TRUE='#' - BUILD_INLINE_FALSE= -fi - - - -# OCSP -# Check whether --enable-ocsp was given. -if test "${enable_ocsp+set}" = set; then : - enableval=$enable_ocsp; ENABLED_OCSP=$enableval -else - ENABLED_OCSP=no -fi - - -if test "$ENABLED_OCSP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" -fi - - if test "x$ENABLED_OCSP" = "xyes"; then - BUILD_OCSP_TRUE= - BUILD_OCSP_FALSE='#' -else - BUILD_OCSP_TRUE='#' - BUILD_OCSP_FALSE= -fi - - - -if test "$ENABLED_OCSP" = "yes" -then - # check openssl command tool for testing ocsp - # Extract the first word of "openssl", so it can be a program name with args. -set dummy openssl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_OPENSSL_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_OPENSSL_CMD"; then - ac_cv_prog_HAVE_OPENSSL_CMD="$HAVE_OPENSSL_CMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_OPENSSL_CMD="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_OPENSSL_CMD" && ac_cv_prog_HAVE_OPENSSL_CMD="no" -fi -fi -HAVE_OPENSSL_CMD=$ac_cv_prog_HAVE_OPENSSL_CMD -if test -n "$HAVE_OPENSSL_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OPENSSL_CMD" >&5 -$as_echo "$HAVE_OPENSSL_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$HAVE_OPENSSL_CMD" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl command line tool not available for testing ocsp" >&5 -$as_echo "$as_me: WARNING: openssl command line tool not available for testing ocsp" >&2;} - fi -fi - - -# CRL -# Check whether --enable-crl was given. -if test "${enable_crl+set}" = set; then : - enableval=$enable_crl; ENABLED_CRL=$enableval -else - ENABLED_CRL=no -fi - - -if test "$ENABLED_CRL" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" -fi - - if test "x$ENABLED_CRL" = "xyes"; then - BUILD_CRL_TRUE= - BUILD_CRL_FALSE='#' -else - BUILD_CRL_TRUE='#' - BUILD_CRL_FALSE= -fi - - - -# CRL Monitor -# Check whether --enable-crl-monitor was given. -if test "${enable_crl_monitor+set}" = set; then : - enableval=$enable_crl_monitor; ENABLED_CRL_MONITOR=$enableval -else - ENABLED_CRL_MONITOR=no -fi - - -if test "$ENABLED_CRL_MONITOR" = "yes" -then - case $host_os in - *linux* | *darwin* | *freebsd*) - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; - *) - as_fn_error $? "crl monitor only allowed on linux, OS X, or freebsd" "$LINENO" 5 ;; - esac -fi - - if test "x$ENABLED_CRL_MONITOR" = "xyes"; then - BUILD_CRL_MONITOR_TRUE= - BUILD_CRL_MONITOR_FALSE='#' -else - BUILD_CRL_MONITOR_TRUE='#' - BUILD_CRL_MONITOR_FALSE= -fi - - - -# NTRU -ntruHome=`pwd`/NTRU_algorithm -ntruInclude=$ntruHome/cryptolib -ntruLib=$ntruHome -# Check whether --enable-ntru was given. -if test "${enable_ntru+set}" = set; then : - enableval=$enable_ntru; ENABLED_NTRU=$enableval -else - ENABLED_NTRU=no - -fi - - -if test "$ENABLED_NTRU" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" - AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" - LIBS="$LIBS -lntru_encrypt" -fi - - if test "x$ENABLED_NTRU" = "xyes"; then - BUILD_NTRU_TRUE= - BUILD_NTRU_FALSE='#' -else - BUILD_NTRU_TRUE='#' - BUILD_NTRU_FALSE= -fi - - -if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" -then - as_fn_error $? "cannot enable ntru and small, ntru requires TLS which small turns off." "$LINENO" 5 -fi - -# SNI -# Check whether --enable-sni was given. -if test "${enable_sni+set}" = set; then : - enableval=$enable_sni; ENABLED_SNI=$enableval -else - ENABLED_SNI=no - -fi - - -if test "x$ENABLED_SNI" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" -fi - -# Maximum Fragment Length -# Check whether --enable-maxfragment was given. -if test "${enable_maxfragment+set}" = set; then : - enableval=$enable_maxfragment; ENABLED_MAX_FRAGMENT=$enableval -else - ENABLED_MAX_FRAGMENT=no - -fi - - -if test "x$ENABLED_MAX_FRAGMENT" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" -fi - -# Truncated HMAC -# Check whether --enable-truncatedhmac was given. -if test "${enable_truncatedhmac+set}" = set; then : - enableval=$enable_truncatedhmac; ENABLED_TRUNCATED_HMAC=$enableval -else - ENABLED_TRUNCATED_HMAC=no - -fi - - -if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" -fi - -# Renegotiation Indication -# Check whether --enable-renegotiation-indication was given. -if test "${enable_renegotiation_indication+set}" = set; then : - enableval=$enable_renegotiation_indication; ENABLED_RENEGOTIATION_INDICATION=$enableval -else - ENABLED_RENEGOTIATION_INDICATION=no - -fi - - -if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" -fi - -# Supported Elliptic Curves Extensions -# Check whether --enable-supportedcurves was given. -if test "${enable_supportedcurves+set}" = set; then : - enableval=$enable_supportedcurves; ENABLED_SUPPORTED_CURVES=$enableval -else - ENABLED_SUPPORTED_CURVES=no - -fi - - -if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" -fi - -# TLS Extensions -# Check whether --enable-tlsx was given. -if test "${enable_tlsx+set}" = set; then : - enableval=$enable_tlsx; ENABLED_TLSX=$enableval -else - ENABLED_TLSX=no - -fi - - -if test "x$ENABLED_TLSX" = "xyes" -then - ENABLED_SNI=yes - ENABLED_MAX_FRAGMENT=yes - ENABLED_TRUNCATED_HMAC=yes - ENABLED_RENEGOTIATION_INDICATION=yes - ENABLED_SUPPORTED_CURVES=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" -fi - -# PKCS7 -# Check whether --enable-pkcs7 was given. -if test "${enable_pkcs7+set}" = set; then : - enableval=$enable_pkcs7; ENABLED_PKCS7=$enableval -else - ENABLED_PKCS7=no -fi - - -if test "$ENABLED_PKCS7" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" -fi - - if test "x$ENABLED_PKCS7" = "xyes"; then - BUILD_PKCS7_TRUE= - BUILD_PKCS7_FALSE='#' -else - BUILD_PKCS7_TRUE='#' - BUILD_PKCS7_FALSE= -fi - - - -# Simple Certificate Enrollment Protocol (SCEP) -# Check whether --enable-scep was given. -if test "${enable_scep+set}" = set; then : - enableval=$enable_scep; ENABLED_WOLFSCEP=$enableval -else - ENABLED_WOLFSCEP=no - -fi - -if test "$ENABLED_WOLFSCEP" = "yes" -then - # Enable prereqs if not already enabled - if test "x$ENABLED_KEYGEN" = "xno" - then - ENABLED_KEYGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" - fi - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_CERTREQ" = "xno" - then - ENABLED_CERTREQ="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" - fi - if test "x$ENABLED_PKCS7" = "xno" - then - ENABLED_PKCS7="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" - if test "x$ENABLED_PKCS7" = "xyes"; then - BUILD_PKCS7_TRUE= - BUILD_PKCS7_FALSE='#' -else - BUILD_PKCS7_TRUE='#' - BUILD_PKCS7_FALSE= -fi - - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" -fi - - -# Small Stack -# Check whether --enable-smallstack was given. -if test "${enable_smallstack+set}" = set; then : - enableval=$enable_smallstack; ENABLED_SMALL_STACK=$enableval -else - ENABLED_SMALL_STACK=yes - -fi - - -if test "x$ENABLED_SMALL_STACK" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" -fi - - -#valgrind -# Check whether --enable-valgrind was given. -if test "${enable_valgrind+set}" = set; then : - enableval=$enable_valgrind; ENABLED_VALGRIND=$enableval -else - ENABLED_VALGRIND=no - -fi - - -if test "$ENABLED_VALGRIND" = "yes" -then - # Extract the first word of "valgrind", so it can be a program name with args. -set dummy valgrind; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_VALGRIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_VALGRIND"; then - ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_VALGRIND="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no" -fi -fi -HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND -if test -n "$HAVE_VALGRIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5 -$as_echo "$HAVE_VALGRIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$HAVE_VALGRIND" = "no" - then - as_fn_error $? "Valgrind not found." "$LINENO" 5 - fi - enable_shared=no - enable_static=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" -fi - - if test "x$ENABLED_VALGRIND" = "xyes"; then - USE_VALGRIND_TRUE= - USE_VALGRIND_FALSE='#' -else - USE_VALGRIND_TRUE='#' - USE_VALGRIND_FALSE= -fi - - - -# Test certs, use internal cert functions for extra testing -# Check whether --enable-testcert was given. -if test "${enable_testcert+set}" = set; then : - enableval=$enable_testcert; ENABLED_TESTCERT=$enableval -else - ENABLED_TESTCERT=no - -fi - - -if test "$ENABLED_TESTCERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" -fi - - -# I/O Pool, an example to show user how to override memory handler and use -# a pool for the input/output buffer requests -# Check whether --enable-iopool was given. -if test "${enable_iopool+set}" = set; then : - enableval=$enable_iopool; ENABLED_IOPOOL=$enableval -else - ENABLED_IOPOOL=no - -fi - - -if test "$ENABLED_IOPOOL" = "yes" -then - if test "$thread_ls_on" = "no" - then - as_fn_error $? "I/O Pool example requires Thread Local Storage" "$LINENO" 5 - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" -fi - - -# Certificate Service Support -# Check whether --enable-certservice was given. -if test "${enable_certservice+set}" = set; then : - enableval=$enable_certservice; ENABLED_CERT_SERVICE=$enableval -else - ENABLED_CERT_SERVICE=no - -fi - -if test "$ENABLED_CERT_SERVICE" = "yes" -then - # Requires ecc,certgen, and opensslextra make sure on - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_ECC" = "xno" - then - ENABLED_ECC="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" - if test "x$ENABLED_ECC" = "xyes"; then - BUILD_ECC_TRUE= - BUILD_ECC_FALSE='#' -else - BUILD_ECC_TRUE='#' - BUILD_ECC_FALSE= -fi - - fi - if test "x$ENABLED_OPENSSLEXTRA" = "xno" - then - ENABLED_OPENSSLEXTRA="yes" - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" -fi - - -# set fastmath default -FASTMATH_DEFAULT=no - -if test "$host_cpu" = "x86_64" -then -FASTMATH_DEFAULT=yes -fi - -# fastmath -# Check whether --enable-fastmath was given. -if test "${enable_fastmath+set}" = set; then : - enableval=$enable_fastmath; ENABLED_FASTMATH=$enableval -else - ENABLED_FASTMATH=$FASTMATH_DEFAULT - -fi - - -if test "x$ENABLED_FASTMATH" = "xyes" -then - # turn off fastmth if leanpsk on or asn off - if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" - then - ENABLED_FASTMATH=no - else - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" - fi -fi - - -# fast HUGE math -# Check whether --enable-fasthugemath was given. -if test "${enable_fasthugemath+set}" = set; then : - enableval=$enable_fasthugemath; ENABLED_FASTHUGEMATH=$enableval -else - ENABLED_FASTHUGEMATH=no - -fi - - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_FASTHUGEMATH="yes" -fi - -if test "$ENABLED_FASTHUGEMATH" = "yes" -then - ENABLED_FASTMATH="yes" - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" -fi - - if test "x$ENABLED_FASTMATH" = "xyes"; then - BUILD_FASTMATH_TRUE= - BUILD_FASTMATH_FALSE='#' -else - BUILD_FASTMATH_TRUE='#' - BUILD_FASTMATH_FALSE= -fi - - if test "x$ENABLED_SLOWMATH" = "xyes"; then - BUILD_SLOWMATH_TRUE= - BUILD_SLOWMATH_FALSE='#' -else - BUILD_SLOWMATH_TRUE='#' - BUILD_SLOWMATH_FALSE= -fi - - - -# Enable Examples, used to disable examples -# Check whether --enable-examples was given. -if test "${enable_examples+set}" = set; then : - enableval=$enable_examples; ENABLED_EXAMPLES=$enableval -else - ENABLED_EXAMPLES=yes - -fi - - -if test "x$ENABLED_FILESYSTEM" = "xno"; then : - ENABLED_EXAMPLES="no" -fi -if test "x$ENABLED_INLINE" = "xno"; then : - ENABLED_EXAMPLES="no" -fi -# certs still have sha signatures for now -if test "x$ENABLED_SHA" = "xno"; then : - ENABLED_EXAMPLES="no" -fi - if test "x$ENABLED_EXAMPLES" = "xyes"; then - BUILD_EXAMPLES_TRUE= - BUILD_EXAMPLES_FALSE='#' -else - BUILD_EXAMPLES_TRUE='#' - BUILD_EXAMPLES_FALSE= -fi - - - -# LIBZ -ENABLED_LIBZ="no" -trylibzdir="" - -# Check whether --with-libz was given. -if test "${with_libz+set}" = set; then : - withval=$with_libz; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz" >&5 -$as_echo_n "checking for libz... " >&6; } - CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" - LIBS="$LIBS -lz" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - deflateInit(0, 8); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - libz_linked=yes -else - libz_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$libz_linked" == "xno" ; then - if test "x$withval" != "xno" ; then - trylibzdir=$withval - fi - if test "x$withval" == "xyes" ; then - trylibzdir="/usr" - fi - - AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" - CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - deflateInit(0, 8); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - libz_linked=yes -else - libz_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$libz_linked" == "xno" ; then - as_fn_error $? "libz isn't found. - If it's already installed, specify its path using --with-libz=/dir/" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - ENABLED_LIBZ="yes" - - -fi - - if test "x$ENABLED_LIBZ" = "xyes"; then - BUILD_LIBZ_TRUE= - BUILD_LIBZ_FALSE='#' -else - BUILD_LIBZ_TRUE='#' - BUILD_LIBZ_FALSE= -fi - - - -# cavium -trycaviumdir="" - -# Check whether --with-cavium was given. -if test "${with_cavium+set}" = set; then : - withval=$with_cavium; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5 -$as_echo_n "checking for cavium... " >&6; } - CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" - - if test "x$withval" == "xyes" ; then - as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5 - fi - if test "x$withval" != "xno" ; then - trycaviumdir=$withval - fi - - LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" - CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "cavium_common.h" -int -main () -{ - CspShutdown(CAVIUM_DEV_ID); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - cavium_linked=yes -else - cavium_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$cavium_linked" == "xno" ; then - as_fn_error $? "cavium isn't found. - If it's already installed, specify its path using --with-cavium=/dir/" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - enable_shared=no - enable_static=yes - - -fi - - - -# microchip api -# Check whether --enable-mcapi was given. -if test "${enable_mcapi+set}" = set; then : - enableval=$enable_mcapi; ENABLED_MCAPI=$enableval -else - ENABLED_MCAPI=no - -fi - - -if test "$ENABLED_MCAPI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" -then - as_fn_error $? "please enable sha512 if enabling mcapi." "$LINENO" 5 -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" -then - as_fn_error $? "please enable ecc if enabling mcapi." "$LINENO" 5 -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" -then - as_fn_error $? "please use --with-libz if enabling mcapi." "$LINENO" 5 -fi - - if test "x$ENABLED_MCAPI" = "xyes"; then - BUILD_MCAPI_TRUE= - BUILD_MCAPI_FALSE='#' -else - BUILD_MCAPI_TRUE='#' - BUILD_MCAPI_FALSE= -fi - - - - -# OPTIMIZE FLAGS -if test "$GCC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" - if test "$ax_enable_debug" = "no" - then - if test "$ENABLED_FASTMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" - if test "$ENABLED_FASTHUGEMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" - fi - else - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" - fi - fi -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if ${ac_cv_search_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : - break -fi -done -if ${ac_cv_search_gethostbyname+:} false; then : - -else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if ${ac_cv_search_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : - break -fi -done -if ${ac_cv_search_socket+:} false; then : - -else - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket -lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - LIBS="-lsocket -lnsl $LIBS" -fi - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts " >&5 -$as_echo_n "checking whether C compiler accepts ... " >&6; } -if ${ax_cv_check_cflags__+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS " - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags__=yes -else - ax_cv_check_cflags__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__" >&5 -$as_echo "$ax_cv_check_cflags__" >&6; } -if test x"$ax_cv_check_cflags__" = xyes; then : - : -else - : -fi - -if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains "; } >&5 - (: CFLAGS already contains ) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \""; } >&5 - (: CFLAGS="$CFLAGS ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS " - ;; - esac -else - CFLAGS="" -fi - - - -for flag in ; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts " >&5 -$as_echo_n "checking whether the linker accepts ... " >&6; } -if ${ax_cv_check_ldflags__+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS " - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags__=yes -else - ax_cv_check_ldflags__=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__" >&5 -$as_echo "$ax_cv_check_ldflags__" >&6; } -if test x"$ax_cv_check_ldflags__" = xyes; then : - : -else - : -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5 -$as_echo_n "checking for vcs system... " >&6; } -if ${ac_cv_vcs_system+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_vcs_system="none" - if test -d ".bzr"; then : - ac_cv_vcs_system="bazaar" -fi - if test -d ".svn"; then : - ac_cv_vcs_system="svn" -fi - if test -d ".hg"; then : - ac_cv_vcs_system="mercurial" -fi - if test -d ".git"; then : - ac_cv_vcs_system="git" -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5 -$as_echo "$ac_cv_vcs_system" >&6; } - -cat >>confdefs.h <<_ACEOF -#define VCS_SYSTEM "$ac_cv_vcs_system" -_ACEOF - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5 -$as_echo_n "checking for vcs checkout... " >&6; } -if ${ac_cv_vcs_checkout+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$ac_cv_vcs_system" != "xnone"; then : - ac_cv_vcs_checkout=yes -else - ac_cv_vcs_checkout=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5 -$as_echo "$ac_cv_vcs_checkout" >&6; } - - if test "x$ac_cv_vcs_checkout" = "xyes"; then - IS_VCS_CHECKOUT_TRUE= - IS_VCS_CHECKOUT_FALSE='#' -else - IS_VCS_CHECKOUT_TRUE='#' - IS_VCS_CHECKOUT_FALSE= -fi - - if test "x$ac_cv_vcs_checkout" = "xyes"; then : - -$as_echo "#define VCS_CHECKOUT 1" >>confdefs.h - -else - -$as_echo "#define VCS_CHECKOUT 0" >>confdefs.h - -fi - - - - - - - AX_HARDEN_LIB= - ax_append_compile_link_flags_extra= - if test "x$ac_cv_vcs_checkout" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 -$as_echo_n "checking whether the linker accepts -Werror... " >&6; } -if ${ax_cv_check_ldflags___Werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags___Werror=yes -else - ax_cv_check_ldflags___Werror=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 -$as_echo "$ax_cv_check_ldflags___Werror" >&6; } -if test x"$ax_cv_check_ldflags___Werror" = xyes; then : - - AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" - -else - : -fi - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5 -$as_echo_n "checking whether the linker accepts -Werror... " >&6; } -if ${ax_cv_check_ldflags___Werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_ldflags___Werror=yes -else - ax_cv_check_ldflags___Werror=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5 -$as_echo "$ax_cv_check_ldflags___Werror" >&6; } -if test x"$ax_cv_check_ldflags___Werror" = xyes; then : - - ax_append_compile_link_flags_extra='-Werror' - -else - : -fi - - -fi - - as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-z relro -z now" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5 -$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -z relro -z now" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - - AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" - -else - : -fi - - - as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-pie" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5 -$as_echo_n "checking whether the linker accepts -pie... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -pie" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - - AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" - -else - : -fi - - - LIB="$LIB $AX_HARDEN_LIB" - - - - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - CFLAGS= - ac_cv_warnings_as_errors=no - ax_append_compile_cflags_extra= - if test "$ac_cv_vcs_checkout" = "yes"; then : - - - -for flag in -Werror; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - ac_cv_warnings_as_errors=yes - -else - - - -for flag in -Werror; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${ax_append_compile_cflags_extra+:} false; then : - case " $ax_append_compile_cflags_extra " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra already contains \$flag"; } >&5 - (: ax_append_compile_cflags_extra already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra \$flag\""; } >&5 - (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra $flag" - ;; - esac -else - ax_append_compile_cflags_extra="$flag" -fi - -else - : -fi - -done - - -fi - - if test "$ax_enable_debug" = "yes"; then : - - - -for flag in -g; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -ggdb; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -O0; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - -fi - - - -for flag in -Wno-pragmas; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - - -for flag in -Wall; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wno-strict-aliasing; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wextra; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunknown-pragmas; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wthis-test-should-fail; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - if test "$CC" = "clang"; then : - -else - - - -for flag in --param=ssp-buffer-size=1; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - -fi - - -for flag in -Waddress; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Warray-bounds; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wbad-function-cast; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wchar-subscripts; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wcomment; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wfloat-equal; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wformat-security; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wformat=2; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmaybe-uninitialized; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-field-initializers; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-noreturn; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wmissing-prototypes; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wnested-externs; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wnormalized=id; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Woverride-init; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wpointer-arith; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wpointer-sign; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wredundant-decls; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wshadow; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wshorten-64-to-32; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wsign-compare; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wstrict-overflow=1; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wstrict-prototypes; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wswitch-enum; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wundef; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused-result; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wunused-variable; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -Wwrite-strings; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -fwrapv; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - - -for flag in -fPIE; do - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : - if ${CFLAGS+:} false; then : - case " $CFLAGS " in - *" $flag "*) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; - *) - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" - ;; - esac -else - CFLAGS="$flag" -fi - -else - : -fi - -done - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# link to ws2_32 if on mingw -case $host_os in - *mingw32) - LDFLAGS="$LDFLAGS -lws2_32" ;; -esac - -# add user C_EXTRA_FLAGS back -CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" -OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" - - - - HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \ - awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` - - - - - - -# FINAL -ac_config_files="$ac_config_files stamp-h" - -ac_config_files="$ac_config_files Makefile" - -ac_config_files="$ac_config_files cyassl/version.h" - -ac_config_files="$ac_config_files cyassl/options.h" - -ac_config_files="$ac_config_files support/cyassl.pc" - -ac_config_files="$ac_config_files rpm/spec" - - -# create a generic PACKAGE-config file -L=`echo $PACKAGE $LIBS` -P=`echo $L | sed -e 's/ -.*//'` -P=`echo $P` -V=`echo $VERSION` -F=`echo $P-config` -L=`echo -l$L | sed -e 's/^-llib/-l/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: creating $F - generic $V for $L" >&5 -$as_echo "creating $F - generic $V for $L" >&6; } -test "x$prefix" = xNONE && prefix="$ac_default_prefix" -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -echo '#! /bin/sh' >$F -echo ' ' >>$F -echo 'package="'$P'"' >>$F -echo 'version="'$V'"' >>$F -echo 'libs="'$L'"' >>$F -echo ' ' >>$F -# in the order of occurence a standard automake Makefile -echo 'prefix="'$prefix'"' >>$F -echo 'exec_prefix="'$exec_prefix'"' >>$F -echo 'bindir="'$bindir'"' >>$F -echo 'sbindir="'$sbindir'"' >>$F -echo 'libexecdir="'$libexecdir'"' >>$F -echo 'datadir="'$datadir'"' >>$F -echo 'sysconfdir="'$sysconfdir'"' >>$F -echo 'sharedstatedir="'$sharedstatedir'"' >>$F -echo 'localstatedir="'$localstatedir'"' >>$F -echo 'libdir="'$libdir'"' >>$F -echo 'infodir="'$infodir'"' >>$F -echo 'mandir="'$mandir'"' >>$F -echo 'includedir="'$includedir'"' >>$F -echo 'target="'$target'"' >>$F -echo 'host="'$host'"' >>$F -echo 'build="'$build'"' >>$F -echo ' ' >>$F -echo 'if test "'"\$""#"'" -eq 0; then' >>$F -echo ' cat <>$F -echo 'Usage: $package-config OPTIONS' >>$F -echo 'Options:' >>$F -echo ' --prefix=DIR) : \$prefix' >>$F -echo ' --package) : \$package' >>$F -echo ' --version) : \$version' >>$F -echo ' --cflags) : -I\$includedir' >>$F -echo ' --libs) : -L\$libdir -l\$package' >>$F -echo ' --help) print all the options (not just these)' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -echo ' ' >>$F -echo 'o=""' >>$F -echo 'h=""' >>$F -echo 'for i in "$@"; do' >>$F -echo ' case $i in' >>$F -echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F -echo ' --prefix) o="$o $prefix" ;;' >>$F -echo ' --package) o="$o $package" ;;' >>$F -echo ' --version) o="$o $version" ;;' >>$F -echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F -echo ' then o="$o -I$includedir" ; fi' >>$F -echo ' ;;' >>$F -echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F -echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F -echo ' --bindir) o="$o $bindir" ;;' >>$F -echo ' --sbindir) o="$o $sbindir" ;;' >>$F -echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F -echo ' --datadir) o="$o $datadir" ;;' >>$F -echo ' --datainc) o="$o -I$datadir" ;;' >>$F -echo ' --datalib) o="$o -L$datadir" ;;' >>$F -echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F -echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F -echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F -echo ' --libdir) o="$o $libdir" ;;' >>$F -echo ' --libadd) o="$o -L$libdir" ;;' >>$F -echo ' --infodir) o="$o $infodir" ;;' >>$F -echo ' --mandir) o="$o $mandir" ;;' >>$F -echo ' --target) o="$o $target" ;;' >>$F -echo ' --host) o="$o $host" ;;' >>$F -echo ' --build) o="$o $build" ;;' >>$F -echo ' --data) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F -echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F -echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F -echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F -echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F -echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F -echo ' --help) h="1" ;;' >>$F -echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F -echo ' v=`echo $i | sed -e s://:\$:g`' >>$F -echo ' v=`eval "echo $v"` ' >>$F -echo ' o="$o $v" ;; ' >>$F -echo ' esac' >>$F -echo 'done' >>$F -echo ' ' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'eval "echo $o"' >>$F -echo ' ' >>$F -echo 'if test ! -z "$h" ; then ' >>$F -echo 'cat <>$F -echo ' --prefix=xxx) (what is that for anyway?)' >>$F -echo ' --prefix) \$prefix $prefix' >>$F -echo ' --package) \$package $package' >>$F -echo ' --version) \$version $version' >>$F -echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F -echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F -echo ' --exec_prefix) or... ' >>$F -echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F -echo ' --bindir) \$bindir $bindir' >>$F -echo ' --sbindir) \$sbindir $sbindir' >>$F -echo ' --libexecdir) \$libexecdir $libexecdir' >>$F -echo ' --datadir) \$datadir $datadir' >>$F -echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F -echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F -echo ' --localstatedir) \$localstatedir $localstatedir' >>$F -echo ' --libdir) \$libdir $libdir' >>$F -echo ' --infodir) \$infodir $infodir' >>$F -echo ' --mandir) \$mandir $mandir' >>$F -echo ' --target) \$target $target' >>$F -echo ' --host) \$host $host' >>$F -echo ' --build) \$build $build' >>$F -echo ' --data) -I\$datadir/\$package' >>$F -echo ' --pkgdatadir) \$datadir/\$package' >>$F -echo ' --pkglibdir) \$libdir/\$package' >>$F -echo ' --pkgincludedir) \$includedir/\$package' >>$F -echo ' --help) generated by ax_create_generic_config.m4' >>$F -echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F -echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -GENERIC_CONFIG="$F" - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 -$as_echo_n "checking the number of available CPUs... " >&6; } - CPU_COUNT="0" - - case $host_os in #( - - *darwin*) : - - if test -x /usr/sbin/sysctl; then : - - sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` - if test sysctl_a; then : - - CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` - -fi - -fi ;; #( - - *linux*) : - - if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : - - if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : - - CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` - -fi - -fi - ;; #( - *) : - ;; -esac - - if test "x$CPU_COUNT" = "x0"; then : - - CPU_COUNT="1" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1) " >&5 -$as_echo "unable to detect (assuming 1) " >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT " >&5 -$as_echo "$CPU_COUNT " >&6; } - -fi - - -AX_DOLLAR="\$" -AX_SRB="\\135" -AX_SLB="\\133" -AX_BS="\\\\" -AX_DQ="\"" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5 -$as_echo "$as_me: adding automake macro support" >&6;} -AMINCLUDE="aminclude.am" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5 -$as_echo "$as_me: creating $AMINCLUDE" >&6;} -AMINCLUDE_TIME=`date` - - -printf " -# generated automatically by configure from AX_AUTOMAKE_MACROS -# on $AMINCLUDE_TIME - -" > "$AMINCLUDE" - - -INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" - - - - - - # Check whether --enable-jobserver was given. -if test "${enable_jobserver+set}" = set; then : - enableval=$enable_jobserver; -else - enable_jobserver=yes -fi - - if test "x$enable_jobserver" = "xyes"; then - enable_jobserver=$CPU_COUNT - ((enable_jobserver++)) - fi - - if test "x$enable_jobserver" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5 -$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;} - - - - -printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE" - - - fi - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then - as_fn_error $? "conditional \"DEBUG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_LEANPSK_TRUE}" && test -z "${BUILD_LEANPSK_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LEANPSK\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SNIFFER_TRUE}" && test -z "${BUILD_SNIFFER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SNIFFER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SNIFFTEST_TRUE}" && test -z "${BUILD_SNIFFTEST_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SNIFFTEST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESGCM_TRUE}" && test -z "${BUILD_AESGCM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESGCM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESCCM_TRUE}" && test -z "${BUILD_AESCCM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESCCM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AESNI_TRUE}" && test -z "${BUILD_AESNI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AESNI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CAMELLIA_TRUE}" && test -z "${BUILD_CAMELLIA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CAMELLIA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD2_TRUE}" && test -z "${BUILD_MD2_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RIPEMD_TRUE}" && test -z "${BUILD_RIPEMD_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RIPEMD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_BLAKE2_TRUE}" && test -z "${BUILD_BLAKE2_FALSE}"; then - as_fn_error $? "conditional \"BUILD_BLAKE2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DSA_TRUE}" && test -z "${BUILD_DSA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ECC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MEMORY_TRUE}" && test -z "${BUILD_MEMORY_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MEMORY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RSA_TRUE}" && test -z "${BUILD_RSA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DH_TRUE}" && test -z "${BUILD_DH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ASN_TRUE}" && test -z "${BUILD_ASN_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ASN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_AES_TRUE}" && test -z "${BUILD_AES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_AES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CODING_TRUE}" && test -z "${BUILD_CODING_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CODING\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DES3_TRUE}" && test -z "${BUILD_DES3_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DES3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RC4_TRUE}" && test -z "${BUILD_RC4_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RC4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD5_TRUE}" && test -z "${BUILD_MD5_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD5\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA_TRUE}" && test -z "${BUILD_SHA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MD4_TRUE}" && test -z "${BUILD_MD4_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MD4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PWDBASED_TRUE}" && test -z "${BUILD_PWDBASED_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PWDBASED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_HC128_TRUE}" && test -z "${BUILD_HC128_FALSE}"; then - as_fn_error $? "conditional \"BUILD_HC128\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_RABBIT_TRUE}" && test -z "${BUILD_RABBIT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_RABBIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHA512\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_FIPS_TRUE}" && test -z "${BUILD_FIPS_FALSE}"; then - as_fn_error $? "conditional \"BUILD_FIPS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_INLINE_TRUE}" && test -z "${BUILD_INLINE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_INLINE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_OCSP_TRUE}" && test -z "${BUILD_OCSP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_OCSP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CRL_TRUE}" && test -z "${BUILD_CRL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CRL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CRL_MONITOR_TRUE}" && test -z "${BUILD_CRL_MONITOR_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CRL_MONITOR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_NTRU_TRUE}" && test -z "${BUILD_NTRU_FALSE}"; then - as_fn_error $? "conditional \"BUILD_NTRU\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${USE_VALGRIND_TRUE}" && test -z "${USE_VALGRIND_FALSE}"; then - as_fn_error $? "conditional \"USE_VALGRIND\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ECC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_FASTMATH_TRUE}" && test -z "${BUILD_FASTMATH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_FASTMATH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SLOWMATH_TRUE}" && test -z "${BUILD_SLOWMATH_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SLOWMATH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_LIBZ_TRUE}" && test -z "${BUILD_LIBZ_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LIBZ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_MCAPI_TRUE}" && test -z "${BUILD_MCAPI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_MCAPI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then - as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cyassl $as_me 3.0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to . -cyassl home page: ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cyassl config.status 3.0.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "cyassl/version.h") CONFIG_FILES="$CONFIG_FILES cyassl/version.h" ;; - "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;; - "support/cyassl.pc") CONFIG_FILES="$CONFIG_FILES support/cyassl.pc" ;; - "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - "stamp-h":F) echo timestamp > stamp-h ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -# force make clean -echo "---" -echo "Running make clean..." -make clean >/dev/null 2>&1 -echo - -# generate user options header -echo "---" -echo "Generating user options header..." -OPTION_FILE="cyassl/options.h" -rm -f $OPTION_FILE - -echo "/* cyassl options.h" >> $OPTION_FILE -echo " * generated from configure options" >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * This file is part of CyaSSL." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " */" >> $OPTION_FILE - -echo "" >> $OPTION_FILE -echo "#pragma once" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "extern \"C\" {" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE - -for option in $OPTION_FLAGS; do - defonly=`echo $option | sed 's/-D//'` - if test "$defonly" != "$option" - then - noequalsign=`echo $defonly | sed 's/=/ /'` - echo "#undef $noequalsign" >> $OPTION_FILE - echo "#define $noequalsign" >> $OPTION_FILE - echo "" >> $OPTION_FILE - else - echo "option w/o begin -D is $option, not saving to $OPTION_FILE" - fi -done - -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "}" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo - -# output config summary -echo "---" -echo "Configuration summary for $PACKAGE_NAME version $VERSION" -echo "" -echo " * Installation prefix: $prefix" -echo " * System type: $host_vendor-$host_os" -echo " * Host CPU: $host_cpu" -echo " * C Compiler: $CC" -echo " * C Flags: $CFLAGS" -echo " * C++ Compiler: $CXX" -echo " * C++ Flags: $CXXFLAGS" -echo " * CPP Flags: $CPPFLAGS" -echo " * LIB Flags: $LIB" -echo " * Debug enabled: $ax_enable_debug" -echo " * Warnings as failure: $ac_cv_warnings_as_errors" -echo " * make -j: $enable_jobserver" -echo " * VCS checkout: $ac_cv_vcs_checkout" -echo -echo " Features " -echo " * Single threaded: $ENABLED_SINGLETHREADED" -echo " * Filesystem: $ENABLED_FILESYSTEM" -echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" -echo " * fastmath: $ENABLED_FASTMATH" -echo " * sniffer: $ENABLED_SNIFFER" -echo " * snifftest: $ENABLED_SNIFFTEST" -echo " * ARC4: $ENABLED_ARC4" -echo " * AES: $ENABLED_AES" -echo " * AES-NI: $ENABLED_AESNI" -echo " * AES-GCM: $ENABLED_AESGCM" -echo " * AES-CCM: $ENABLED_AESCCM" -echo " * DES3: $ENABLED_DES3" -echo " * Camellia: $ENABLED_CAMELLIA" -echo " * NULL Cipher: $ENABLED_NULL_CIPHER" -echo " * MD5: $ENABLED_MD5" -echo " * RIPEMD: $ENABLED_RIPEMD" -echo " * SHA: $ENABLED_SHA" -echo " * SHA-512: $ENABLED_SHA512" -echo " * BLAKE2: $ENABLED_BLAKE2" -echo " * keygen: $ENABLED_KEYGEN" -echo " * certgen: $ENABLED_CERTGEN" -echo " * certreq: $ENABLED_CERTREQ" -echo " * HC-128: $ENABLED_HC128" -echo " * RABBIT: $ENABLED_RABBIT" -echo " * PWDBASED: $ENABLED_PWDBASED" -echo " * HKDF: $ENABLED_HKDF" -echo " * MD4: $ENABLED_MD4" -echo " * PSK: $ENABLED_PSK" -echo " * LEANPSK: $ENABLED_LEANPSK" -echo " * RSA: $ENABLED_RSA" -echo " * DSA: $ENABLED_DSA" -echo " * DH: $ENABLED_DH" -echo " * ECC: $ENABLED_ECC" -echo " * FPECC: $ENABLED_FPECC" -echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" -echo " * ASN: $ENABLED_ASN" -echo " * CODING: $ENABLED_CODING" -echo " * MEMORY: $ENABLED_MEMORY" -echo " * I/O POOL: $ENABLED_IOPOOL" -echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" -echo " * DTLS: $ENABLED_DTLS" -echo " * Old TLS Versions: $ENABLED_OLD_TLS" -echo " * OCSP: $ENABLED_OCSP" -echo " * CRL: $ENABLED_CRL" -echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" -echo " * Persistent session cache: $ENABLED_SAVESESSION" -echo " * Persistent cert cache: $ENABLED_SAVECERT" -echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" -echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" -echo " * NTRU: $ENABLED_NTRU" -echo " * SNI: $ENABLED_SNI" -echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" -echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" -echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" -echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" -echo " * All TLS Extensions: $ENABLED_TLSX" -echo " * PKCS#7 $ENABLED_PKCS7" -echo " * wolfSCEP $ENABLED_WOLFSCEP" -echo " * Small Stack: $ENABLED_SMALL_STACK" -echo " * valgrind unit tests: $ENABLED_VALGRIND" -echo " * LIBZ: $ENABLED_LIBZ" -echo " * Examples: $ENABLED_EXAMPLES" -echo "" -echo "---" - diff --git a/project1/cyassl-3.0.0/configure.ac b/project1/cyassl-3.0.0/configure.ac deleted file mode 100644 index 2de6912a..00000000 --- a/project1/cyassl-3.0.0/configure.ac +++ /dev/null @@ -1,1782 +0,0 @@ -# configure.ac -# -# Copyright (C) 2006-2014 wolfSSL Inc. -# -# This file is part of CyaSSL. -# -# - -AC_INIT([cyassl],[3.0.0],[https://github.com/cyassl/cyassl/issues],[cyassl],[http://www.wolfssl.com]) - -AC_CONFIG_AUX_DIR([build-aux]) - -AC_CANONICAL_HOST -AC_CANONICAL_BUILD - -AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests]) -AC_PREREQ([2.63]) - -AC_ARG_PROGRAM -AC_DEFUN([PROTECT_AC_USE_SYSTEM_EXTENSIONS], - [AX_SAVE_FLAGS - AC_LANG_PUSH([C]) - AC_USE_SYSTEM_EXTENSIONS - AC_LANG_POP([C]) - AX_RESTORE_FLAGS - ]) -#PROTECT_AC_USE_SYSTEM_EXTENSIONS - -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS. - -#shared library versioning -CYASSL_LIBRARY_VERSION=5:5:0 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# | or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed -AC_SUBST([CYASSL_LIBRARY_VERSION]) - -# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even -# if user doesn't override, no way to tell -USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS" - -LT_PREREQ([2.2]) -LT_INIT([disable-static],[win32-dll]) -LT_LANG([C++]) -LT_LANG([C]) - -gl_VISIBILITY -AS_IF([ test -n "$CFLAG_VISIBILITY" ], [ - AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY" - CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" - ]) - -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -AC_CHECK_FUNCS([gethostbyname]) -AC_CHECK_FUNCS([getaddrinfo]) -AC_CHECK_FUNCS([gettimeofday]) -AC_CHECK_FUNCS([inet_ntoa]) -AC_CHECK_FUNCS([memset]) -AC_CHECK_FUNCS([socket]) -AC_CHECK_HEADERS([arpa/inet.h]) -AC_CHECK_HEADERS([fcntl.h]) -AC_CHECK_HEADERS([limits.h]) -AC_CHECK_HEADERS([netdb.h]) -AC_CHECK_HEADERS([netinet/in.h]) -AC_CHECK_HEADERS([stddef.h]) -AC_CHECK_HEADERS([sys/ioctl.h]) -AC_CHECK_HEADERS([sys/socket.h]) -AC_CHECK_HEADERS([sys/time.h]) -AC_CHECK_HEADERS([errno.h]) -AC_CHECK_LIB(network,socket) -AC_CHECK_SIZEOF(long long, 8) -AC_CHECK_SIZEOF(long, 4) -AC_C_BIGENDIAN -# mktime check takes forever on some systems, if time supported it would be -# highly unusual for mktime to be missing -#AC_FUNC_MKTIME - -AC_PROG_CC -AC_PROG_CC_C_O -AC_PROG_CXX -AC_PROG_INSTALL -AC_TYPE_SIZE_T -AC_TYPE_UINT8_T -AM_PROG_AS -AM_PROG_CC_C_O -LT_LIB_M - -OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" -OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" -OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" -DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" - -thread_ls_on=no -# Thread local storage -AX_TLS([ - [AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"] - [thread_ls_on=yes] - ] , [:]) - - -# DEBUG -AX_DEBUG -AS_IF([test "$ax_enable_debug" = "yes"], - [AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS"], - [AM_CFLAGS="$AM_CFLAGS -DNDEBUG"]) - - -# SINGLE THREADED -AC_ARG_ENABLE([singlethreaded], - [ --enable-singlethreaded Enable CyaSSL single threaded (default: disabled)], - [ ENABLED_SINGLETHREADED=$enableval ], - [ ENABLED_SINGLETHREADED=no ]) - -AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xno" ],[ - AX_PTHREAD([ - AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files.]) - AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS" - LIBS="$LIBS $PTHREAD_LIBS" - ],[ - ENABLED_SINGLETHREADED=yes - ]) - ]) - -AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" ]) - - -# DTLS -AC_ARG_ENABLE([dtls], - [ --enable-dtls Enable CyaSSL DTLS (default: disabled)], - [ ENABLED_DTLS=$enableval ], - [ ENABLED_DTLS=no ] - ) -if test "$ENABLED_DTLS" = "yes" -then - AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS" -fi - - -# OPENSSL Extra Compatibility -AC_ARG_ENABLE([opensslextra], - [ --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled)], - [ ENABLED_OPENSSLEXTRA=$enableval ], - [ ENABLED_OPENSSLEXTRA=no ] - ) -if test "$ENABLED_OPENSSLEXTRA" = "yes" -then - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" -fi - -if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes" -then - AC_MSG_ERROR([cannot enable small and opensslextra, only one or the other.]) -fi - - -# IPv6 Test Apps -AC_ARG_ENABLE([ipv6], - [ --enable-ipv6 Enable testing of IPV6 (default: disabled)], - [ ENABLED_IPV6=$enableval ], - [ ENABLED_IPV6=no ] - ) - -if test "$ENABLED_IPV6" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6" -fi - - -# Fortress build -AC_ARG_ENABLE([fortress], - [ --enable-fortress Enable SSL fortress build (default: disabled)], - [ ENABLED_FORTRESS=$enableval ], - [ ENABLED_FORTRESS=no ] - ) - -if test "$ENABLED_FORTRESS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN" -fi - - -# ssl bump build -AC_ARG_ENABLE([bump], - [ --enable-bump Enable SSL Bump build (default: disabled)], - [ ENABLED_BUMP=$enableval ], - [ ENABLED_BUMP=no ] - ) - -if test "$ENABLED_BUMP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT" -fi - -ENABLED_SLOWMATH="yes" - -# lean psk build -AC_ARG_ENABLE([leanpsk], - [ --enable-leanpsk Enable Lean PSK build (default: disabled)], - [ ENABLED_LEANPSK=$enableval ], - [ ENABLED_LEANPSK=no ] - ) - -if test "$ENABLED_LEANPSK" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA" - ENABLED_SLOWMATH="no" - ENABLED_SINGLETHREADED="yes" -fi - -AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"]) - - -# big cache -AC_ARG_ENABLE([bigcache], - [ --enable-bigcache Enable big session cache (default: disabled)], - [ ENABLED_BIGCACHE=$enableval ], - [ ENABLED_BIGCACHE=no ] - ) - -if test "$ENABLED_BIGCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE" -fi - - -# HUGE cache -AC_ARG_ENABLE([hugecache], - [ --enable-hugecache Enable huge session cache (default: disabled)], - [ ENABLED_HUGECACHE=$enableval ], - [ ENABLED_HUGECACHE=no ] - ) - -if test "$ENABLED_HUGECACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE" -fi - - -# SMALL cache -AC_ARG_ENABLE([smallcache], - [ --enable-smallcache Enable small session cache (default: disabled)], - [ ENABLED_SMALLCACHE=$enableval ], - [ ENABLED_SMALLCACHE=no ] - ) - -if test "$ENABLED_SMALLCACHE" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE" -fi - - -# Persistent session cache -AC_ARG_ENABLE([savesession], - [ --enable-savesession Enable persistent session cache (default: disabled)], - [ ENABLED_SAVESESSION=$enableval ], - [ ENABLED_SAVESESSION=no ] - ) - -if test "$ENABLED_SAVESESSION" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE" -fi - - -# Persistent cert cache -AC_ARG_ENABLE([savecert], - [ --enable-savecert Enable persistent cert cache (default: disabled)], - [ ENABLED_SAVECERT=$enableval ], - [ ENABLED_SAVECERT=no ] - ) - -if test "$ENABLED_SAVECERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE" -fi - - -# Atomic User Record Layer -AC_ARG_ENABLE([atomicuser], - [ --enable-atomicuser Enable Atomic User Record Layer (default: disabled)], - [ ENABLED_ATOMICUSER=$enableval ], - [ ENABLED_ATOMICUSER=no ] - ) - -if test "$ENABLED_ATOMICUSER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER" -fi - - -# Public Key Callbacks -AC_ARG_ENABLE([pkcallbacks], - [ --enable-pkcallbacks Enable Public Key Callbacks (default: disabled)], - [ ENABLED_PKCALLBACKS=$enableval ], - [ ENABLED_PKCALLBACKS=no ] - ) - -if test "$ENABLED_PKCALLBACKS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS" -fi - - -# SNIFFER -ENABLED_SNIFFTEST=no -AC_ARG_ENABLE([sniffer], - [AS_HELP_STRING([--enable-sniffer],[ Enable CyaSSL sniffer support (default: disabled) ])],[ - ENABLED_SNIFFER=yes - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA" - AS_IF([ test "x$enableval" = "xyes" ],[ AC_CHECK_HEADERS([pcap/pcap.h],[ - ENABLED_SNIFFTEST=yes - ],[ AC_MSG_WARN([cannot enable sniffer test without having libpcap available.]) ]) ]) - ],[ - ENABLED_SNIFFER=no - ]) - -AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" ]) -AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ]) - -# AES-GCM -AC_ARG_ENABLE([aesgcm], - [ --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled)], - [ ENABLED_AESGCM=$enableval ], - [ ENABLED_AESGCM=no ] - ) - -if test "$ENABLED_AESGCM" = "word32" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "small" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "table" -then - AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE" - ENABLED_AESGCM=yes -fi - -if test "$ENABLED_AESGCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM" -fi - -AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"]) - - -# AES-CCM -AC_ARG_ENABLE([aesccm], - [ --enable-aesccm Enable CyaSSL AES-CCM support (default: disabled)], - [ ENABLED_AESCCM=$enableval ], - [ ENABLED_AESCCM=no ] - ) - -if test "$ENABLED_AESCCM" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM" -fi - -AM_CONDITIONAL([BUILD_AESCCM], [test "x$ENABLED_AESCCM" = "xyes"]) - - -# AES-NI -AC_ARG_ENABLE([aesni], - [ --enable-aesni Enable CyaSSL AES-NI support (default: disabled)], - [ ENABLED_AESNI=$enableval ], - [ ENABLED_AESNI=no ] - ) - -if test "$ENABLED_AESNI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI" - if test "$GCC" = "yes" - then - # GCC needs these flags, icc doesn't - # opt levels greater than 2 may cause problems on systems w/o aesni - AM_CFLAGS="$AM_CFLAGS -maes -msse4" - fi -fi - -AM_CONDITIONAL([BUILD_AESNI], [test "x$ENABLED_AESNI" = "xyes"]) - - -# Camellia -AC_ARG_ENABLE([camellia], - [ --enable-camellia Enable CyaSSL Camellia support (default: disabled)], - [ ENABLED_CAMELLIA=$enableval ], - [ ENABLED_CAMELLIA=no ] - ) - -if test "$ENABLED_CAMELLIA" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA" -fi - -AM_CONDITIONAL([BUILD_CAMELLIA], [test "x$ENABLED_CAMELLIA" = "xyes"]) - - -# MD2 -AC_ARG_ENABLE([md2], - [ --enable-md2 Enable CyaSSL MD2 support (default: disabled)], - [ ENABLED_MD2=$enableval ], - [ ENABLED_MD2=no ] - ) - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_MD2="yes" -fi - -if test "$ENABLED_MD2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2" -fi - -AM_CONDITIONAL([BUILD_MD2], [test "x$ENABLED_MD2" = "xyes"]) - - -# NULL CIPHER -AC_ARG_ENABLE([nullcipher], - [ --enable-nullcipher Enable CyaSSL NULL cipher support (default: disabled)], - [ ENABLED_NULL_CIPHER=$enableval ], - [ ENABLED_NULL_CIPHER=no ] - ) - -if test "$ENABLED_NULL_CIPHER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER" -fi - -# RIPEMD -AC_ARG_ENABLE([ripemd], - [ --enable-ripemd Enable CyaSSL RIPEMD-160 support (default: disabled)], - [ ENABLED_RIPEMD=$enableval ], - [ ENABLED_RIPEMD=no ] - ) - -if test "$ENABLED_RIPEMD" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD" -fi - -AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"]) - - -# BLAKE2 -AC_ARG_ENABLE([blake2], - [ --enable-blake2 Enable CyaSSL BLAKE2 support (default: disabled)], - [ ENABLED_BLAKE2=$enableval ], - [ ENABLED_BLAKE2=no ] - ) - -if test "$ENABLED_BLAKE2" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2" -fi - -AM_CONDITIONAL([BUILD_BLAKE2], [test "x$ENABLED_BLAKE2" = "xyes"]) - - -# SHA512 -AC_ARG_ENABLE([sha512], - [ --enable-sha512 Enable CyaSSL SHA-512 support (default: disabled)], - [ ENABLED_SHA512=$enableval ], - [ ENABLED_SHA512=no ] - ) - -if test "$ENABLED_SHA512" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" -fi - -if test "$ENABLED_FORTRESS" = "yes" -then - ENABLED_SHA512="yes" -fi - - -AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) - - -# SESSION CERTS -AC_ARG_ENABLE([sessioncerts], - [ --enable-sessioncerts Enable session cert storing (default: disabled)], - [ ENABLED_SESSIONCERTS=$enableval ], - [ ENABLED_SESSIONCERTS=no ] - ) - -if test "$ENABLED_SESSIONCERTS" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS" -fi - - -# KEY GENERATION -AC_ARG_ENABLE([keygen], - [ --enable-keygen Enable key generation (default: disabled)], - [ ENABLED_KEYGEN=$enableval ], - [ ENABLED_KEYGEN=no ] - ) - -if test "$ENABLED_KEYGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" -fi - - -# CERT GENERATION -AC_ARG_ENABLE([certgen], - [ --enable-certgen Enable cert generation (default: disabled)], - [ ENABLED_CERTGEN=$enableval ], - [ ENABLED_CERTGEN=no ] - ) - -if test "$ENABLED_CERTGEN" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" -fi - - -# CERT REQUEST GENERATION -AC_ARG_ENABLE([certreq], - [ --enable-certreq Enable cert request generation (default: disabled)], - [ ENABLED_CERTREQ=$enableval ], - [ ENABLED_CERTREQ=no ] - ) - -if test "$ENABLED_CERTREQ" = "yes" -then - if test "$ENABLED_CERTGEN" = "no" - then - AC_MSG_ERROR([cannot enable certreq without enabling certgen.]) - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" -fi - - -# SEP -AC_ARG_ENABLE([sep], - [ --enable-sep Enable sep extensions (default: disabled)], - [ ENABLED_SEP=$enableval ], - [ ENABLED_SEP=no ] - ) -if test "$ENABLED_SEP" = "yes" -then - AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS" -fi - - -# HKDF -AC_ARG_ENABLE([hkdf], - [ --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled)], - [ ENABLED_HKDF=$enableval ], - [ ENABLED_HKDF=no ] - ) -if test "$ENABLED_HKDF" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF" -fi - - -# DSA -AC_ARG_ENABLE([dsa], - [ --enable-dsa Enable DSA (default: disabled)], - [ ENABLED_DSA=$enableval ], - [ ENABLED_DSA=no ] - ) - -if test "$ENABLED_DSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DSA" -fi - -AM_CONDITIONAL([BUILD_DSA], [test "x$ENABLED_DSA" = "xyes"]) - - -# ECC -AC_ARG_ENABLE([ecc], - [ --enable-ecc Enable ECC (default: disabled)], - [ ENABLED_ECC=$enableval ], - [ ENABLED_ECC=no ] - ) - -if test "$ENABLED_ECC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" -fi - -AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) - - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes" -then - AC_MSG_ERROR([cannot enable ecc and small, ecc requires TLS which small turns off.]) -fi - - -# FP ECC, Fixed Point cache ECC -AC_ARG_ENABLE([fpecc], - [ --enable-fpecc Enable Fixed Point cache ECC (default: disabled)], - [ ENABLED_FPECC=$enableval ], - [ ENABLED_FPECC=no ] - ) - -if test "$ENABLED_FPECC" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - AC_MSG_ERROR([cannot enable fpecc without enabling ecc.]) - fi - AM_CFLAGS="$AM_CFLAGS -DFP_ECC" -fi - - -# ECC encrypt -AC_ARG_ENABLE([eccencrypt], - [ --enable-eccencrypt Enable ECC encrypt (default: disabled)], - [ ENABLED_ECC_ENCRYPT=$enableval ], - [ ENABLED_ECC_ENCRYPT=no ] - ) - -if test "$ENABLED_ECC_ENCRYPT" = "yes" -then - if test "$ENABLED_ECC" = "no" - then - AC_MSG_ERROR([cannot enable eccencrypt without enabling ecc.]) - fi - if test "$ENABLED_HKDF" = "no" - then - AC_MSG_ERROR([cannot enable eccencrypt without enabling hkdf.]) - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT" -fi - - -# PSK -AC_ARG_ENABLE([psk], - [ --enable-psk Enable PSK (default: disabled)], - [ ENABLED_PSK=$enableval ], - [ ENABLED_PSK=no ] - ) - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_PSK" -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes" -then - ENABLED_PSK=yes -fi - - -# ERROR STRINGS -AC_ARG_ENABLE([errorstrings], - [ --enable-errorstrings Enable error strings table (default: enabled)], - [ ENABLED_ERROR_STRINGS=$enableval ], - [ ENABLED_ERROR_STRINGS=yes ] - ) - -if test "$ENABLED_ERROR_STRINGS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" -else - # turn off error strings if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS" - ENABLED_ERROR_STRINGS=no - fi -fi - - -# OLD TLS -AC_ARG_ENABLE([oldtls], - [ --enable-oldtls Enable old TLS versions < 1.2 (default: enabled)], - [ ENABLED_OLD_TLS=$enableval ], - [ ENABLED_OLD_TLS=yes ] - ) - -if test "$ENABLED_OLD_TLS" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" -else - # turn off old if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS" - ENABLED_OLD_TLS=no - fi -fi - - -# STACK SIZE info for examples -AC_ARG_ENABLE([stacksize], - [ --enable-stacksize Enable stack size info on examples (default: disabled)], - [ ENABLED_STACKSIZE=$enableval ], - [ ENABLED_STACKSIZE=no ] - ) - -if test "$ENABLED_STACKSIZE" = "yes" -then - AC_CHECK_FUNC([posix_memalign], [], [AC_MSG_ERROR(stacksize needs posix_memalign)]) - AC_CHECK_FUNC([pthread_attr_setstack], [], AC_CHECK_LIB([pthread],[pthread_attr_setstack])) - AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" -fi - - -# MEMORY -AC_ARG_ENABLE([memory], - [ --enable-memory Enable memory callbacks (default: enabled)], - [ ENABLED_MEMORY=$enableval ], - [ ENABLED_MEMORY=yes ] - ) - -if test "$ENABLED_MEMORY" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY" -else - # turn off memory cb if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - # but don't turn on NO_CYASSL_MEMORY because using own - ENABLED_MEMORY=no - fi -fi - -AM_CONDITIONAL([BUILD_MEMORY], [test "x$ENABLED_MEMORY" = "xyes"]) - - -# RSA -AC_ARG_ENABLE([rsa], - [ --enable-rsa Enable RSA (default: enabled)], - [ ENABLED_RSA=$enableval ], - [ ENABLED_RSA=yes ] - ) - -if test "$ENABLED_RSA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" -else - # turn off RSA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RSA" - ENABLED_RSA=no - fi -fi - -AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"]) - - -# DH -AC_ARG_ENABLE([dh], - [ --enable-dh Enable DH (default: enabled)], - [ ENABLED_DH=$enableval ], - [ ENABLED_DH=yes ] - ) - -if test "$ENABLED_DH" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" -else - # turn off DH if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DH" - ENABLED_DH=no - fi -fi - -AM_CONDITIONAL([BUILD_DH], [test "x$ENABLED_DH" = "xyes"]) - - -# ASN -# turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc, -# and no big int, use this to disable all public key stuff -AC_ARG_ENABLE([asn], - [ --enable-asn Enable ASN (default: enabled)], - [ ENABLED_ASN=$enableval ], - [ ENABLED_ASN=yes ] - ) - -if test "$ENABLED_ASN" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" -else - # turn off ASN if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT" - ENABLED_ASN=no - fi -fi - -if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no" -then - AC_MSG_ERROR([please disable rsa if disabling asn.]) -fi - -if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no" -then - AC_MSG_ERROR([please disable dsa if disabling asn.]) -fi - -if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no" -then - AC_MSG_ERROR([please disable dh if disabling asn.]) -fi - -if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no" -then - AC_MSG_ERROR([please disable ecc if disabling asn.]) -fi - -if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no" -then - AC_MSG_ERROR([please enable psk if disabling asn.]) -fi - -if test "$ENABLED_ASN" = "no" -then - ENABLED_FASTMATH=no - ENABLED_SLOWMATH=no -fi - -AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"]) - - -# AES -AC_ARG_ENABLE([aes], - [ --enable-aes Enable AES (default: enabled)], - [ ENABLED_AES=$enableval ], - [ ENABLED_AES=yes ] - ) - -if test "$ENABLED_AES" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" -else - # turn off AES if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_AES" - ENABLED_AES=no - fi -fi - -AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"]) - - -# CODING -AC_ARG_ENABLE([coding], - [ --enable-coding Enable Coding base 16/64 (default: enabled)], - [ ENABLED_CODING=$enableval ], - [ ENABLED_CODING=yes ] - ) - -if test "$ENABLED_CODING" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" -else - # turn off CODING if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_CODING" - ENABLED_CODING=no - fi -fi - -AM_CONDITIONAL([BUILD_CODING], [test "x$ENABLED_CODING" = "xyes"]) - - -# DES3 -AC_ARG_ENABLE([des3], - [ --enable-des3 Enable DES3 (default: enabled)], - [ ENABLED_DES3=$enableval ], - [ ENABLED_DES3=yes ] - ) - -if test "$ENABLED_DES3" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" -else - # turn off DES3 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_DES3" - ENABLED_DES3=no - fi -fi - -AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"]) - - -# ARC4 -AC_ARG_ENABLE([arc4], - [ --enable-arc4 Enable ARC4 (default: enabled)], - [ ENABLED_ARC4=$enableval ], - [ ENABLED_ARC4=yes ] - ) - -if test "$ENABLED_ARC4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" -else - # turn off ARC4 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_RC4" - ENABLED_ARC4=no - fi -fi - -AM_CONDITIONAL([BUILD_RC4], [test "x$ENABLED_ARC4" = "xyes"]) - - -# MD5 -AC_ARG_ENABLE([md5], - [ --enable-md5 Enable MD5 (default: enabled)], - [ ENABLED_MD5=$enableval ], - [ ENABLED_MD5=yes ] - ) - -if test "$ENABLED_MD5" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" -else - # turn off MD5 if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS" - ENABLED_MD5=no - fi -fi - -AM_CONDITIONAL([BUILD_MD5], [test "x$ENABLED_MD5" = "xyes"]) - - -# SHA -AC_ARG_ENABLE([sha], - [ --enable-sha Enable SHA (default: enabled)], - [ ENABLED_SHA=$enableval ], - [ ENABLED_SHA=yes ] - ) - -if test "$ENABLED_SHA" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" -else - # turn off SHA if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS" - ENABLED_SHA=no - fi -fi - -AM_CONDITIONAL([BUILD_SHA], [test "x$ENABLED_SHA" = "xyes"]) - - -# MD4 -AC_ARG_ENABLE([md4], - [ --enable-md4 Enable MD4 (default: disabled)], - [ ENABLED_MD4=$enableval ], - [ ENABLED_MD4=no ] - ) - -if test "$ENABLED_MD4" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_MD4" -fi - -AM_CONDITIONAL([BUILD_MD4], [test "x$ENABLED_MD4" = "xyes"]) - - -# Web Server Build -AC_ARG_ENABLE([webserver], - [ --enable-webserver Enable Web Server (default: disabled)], - [ ENABLED_WEBSERVER=$enableval ], - [ ENABLED_WEBSERVER=no ] - ) - -if test "$ENABLED_WEBSERVER" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER" -fi - - -# PWDBASED -AC_ARG_ENABLE([pwdbased], - [ --enable-pwdbased Enable PWDBASED (default: disabled)], - [ ENABLED_PWDBASED=$enableval ], - [ ENABLED_PWDBASED=no ] - ) - -if test "$ENABLED_PWDBASED" = "no" -then - if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" - then - # opensslextra and webserver needs pwdbased - ENABLED_PWDBASED=yes - else - AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED" - fi -fi - -AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"]) - - -# HC128 -AC_ARG_ENABLE([hc128], - [ --enable-hc128 Enable HC-128 (default: disabled)], - [ ENABLED_HC128=$enableval ], - [ ENABLED_HC128=no ] - ) - -if test "$ENABLED_HC128" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_HC128" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128" -fi - -AM_CONDITIONAL([BUILD_HC128], [test "x$ENABLED_HC128" = "xyes"]) - - -# RABBIT -AC_ARG_ENABLE([rabbit], - [ --enable-rabbit Enable RABBIT (default: disabled)], - [ ENABLED_RABBIT=$enableval ], - [ ENABLED_RABBIT=no ] - ) - -if test "$ENABLED_RABBIT" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT" -else - AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT" -fi - -AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"]) - - -# FIPS -AC_ARG_ENABLE([fips], - [ --enable-fips Enable FIPS 140-2 (default: disabled)], - [ ENABLED_FIPS=$enableval ], - [ ENABLED_FIPS=no ] - ) - -if test "x$ENABLED_FIPS" = "xyes" -then - # requires thread local storage - if test "$thread_ls_on" = "no" - then - AC_MSG_ERROR([FIPS requires Thread Local Storage]) - fi - # requires SHA512 - if test "x$ENABLED_SHA512" = "xno" - then - ENABLED_SHA512="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384" - AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"]) - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS" -fi - -AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"]) - - -# Filesystem Build -AC_ARG_ENABLE([filesystem], - [ --enable-filesystem Enable Filesystem support (default: enabled)], - [ ENABLED_FILESYSTEM=$enableval ], - [ ENABLED_FILESYSTEM=yes ] - ) - -if test "$ENABLED_FILESYSTEM" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" -else - # turn off filesystem if leanpsk on - if test "$ENABLED_LEANPSK" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM" - ENABLED_FILESYSTEM=no - fi -fi - - -# inline Build -AC_ARG_ENABLE([inline], - [ --enable-inline Enable inline functions (default: enabled)], - [ ENABLED_INLINE=$enableval ], - [ ENABLED_INLINE=yes ] - ) - -if test "$ENABLED_INLINE" = "no" -then - AM_CFLAGS="$AM_CFLAGS -DNO_INLINE" -fi - -AM_CONDITIONAL([BUILD_INLINE], [test "x$ENABLED_INLINE" = "xyes"]) - - -# OCSP -AC_ARG_ENABLE([ocsp], - [ --enable-ocsp Enable OCSP (default: disabled)], - [ ENABLED_OCSP=$enableval ], - [ ENABLED_OCSP=no ], - ) - -if test "$ENABLED_OCSP" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP" -fi - -AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"]) - - -if test "$ENABLED_OCSP" = "yes" -then - # check openssl command tool for testing ocsp - AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no]) - - if test "$HAVE_OPENSSL_CMD" = "yes" - then - AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD" - else - AC_MSG_WARN([openssl command line tool not available for testing ocsp]) - fi -fi - - -# CRL -AC_ARG_ENABLE([crl], - [ --enable-crl Enable CRL (default: disabled)], - [ ENABLED_CRL=$enableval ], - [ ENABLED_CRL=no ], - ) - -if test "$ENABLED_CRL" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL" -fi - -AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"]) - - -# CRL Monitor -AC_ARG_ENABLE([crl-monitor], - [ --enable-crl-monitor Enable CRL Monitor (default: disabled)], - [ ENABLED_CRL_MONITOR=$enableval ], - [ ENABLED_CRL_MONITOR=no ], - ) - -if test "$ENABLED_CRL_MONITOR" = "yes" -then - case $host_os in - *linux* | *darwin* | *freebsd*) - AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;; - *) - AC_MSG_ERROR([crl monitor only allowed on linux, OS X, or freebsd]) ;; - esac -fi - -AM_CONDITIONAL([BUILD_CRL_MONITOR], [test "x$ENABLED_CRL_MONITOR" = "xyes"]) - - -# NTRU -ntruHome=`pwd`/NTRU_algorithm -ntruInclude=$ntruHome/cryptolib -ntruLib=$ntruHome -AC_ARG_ENABLE([ntru], - [ --enable-ntru Enable NTRU (default: disabled)], - [ ENABLED_NTRU=$enableval ], - [ ENABLED_NTRU=no ] - ) - -if test "$ENABLED_NTRU" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -I$ntruInclude" - AM_LDFLAGS="$AM_LDFLAGS -L$ntruLib" - LIBS="$LIBS -lntru_encrypt" -fi - -AM_CONDITIONAL([BUILD_NTRU], [test "x$ENABLED_NTRU" = "xyes"]) - -if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes" -then - AC_MSG_ERROR([cannot enable ntru and small, ntru requires TLS which small turns off.]) -fi - -# SNI -AC_ARG_ENABLE([sni], - [ --enable-sni Enable SNI (default: disabled)], - [ ENABLED_SNI=$enableval ], - [ ENABLED_SNI=no ] - ) - -if test "x$ENABLED_SNI" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI" -fi - -# Maximum Fragment Length -AC_ARG_ENABLE([maxfragment], - [ --enable-maxfragment Enable Maximum Fragment Length (default: disabled)], - [ ENABLED_MAX_FRAGMENT=$enableval ], - [ ENABLED_MAX_FRAGMENT=no ] - ) - -if test "x$ENABLED_MAX_FRAGMENT" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT" -fi - -# Truncated HMAC -AC_ARG_ENABLE([truncatedhmac], - [ --enable-truncatedhmac Enable Truncated HMAC (default: disabled)], - [ ENABLED_TRUNCATED_HMAC=$enableval ], - [ ENABLED_TRUNCATED_HMAC=no ] - ) - -if test "x$ENABLED_TRUNCATED_HMAC" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC" -fi - -# Renegotiation Indication -AC_ARG_ENABLE([renegotiation-indication], - [ --enable-renegotiation-indication Enable Renegotiation Indication (default: disabled)], - [ ENABLED_RENEGOTIATION_INDICATION=$enableval ], - [ ENABLED_RENEGOTIATION_INDICATION=no ] - ) - -if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION" -fi - -# Supported Elliptic Curves Extensions -AC_ARG_ENABLE([supportedcurves], - [ --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled)], - [ ENABLED_SUPPORTED_CURVES=$enableval ], - [ ENABLED_SUPPORTED_CURVES=no ] - ) - -if test "x$ENABLED_SUPPORTED_CURVES" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES" -fi - -# TLS Extensions -AC_ARG_ENABLE([tlsx], - [ --enable-tlsx Enable all TLS Extensions (default: disabled)], - [ ENABLED_TLSX=$enableval ], - [ ENABLED_TLSX=no ] - ) - -if test "x$ENABLED_TLSX" = "xyes" -then - ENABLED_SNI=yes - ENABLED_MAX_FRAGMENT=yes - ENABLED_TRUNCATED_HMAC=yes - ENABLED_RENEGOTIATION_INDICATION=yes - ENABLED_SUPPORTED_CURVES=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES" -fi - -# PKCS7 -AC_ARG_ENABLE([pkcs7], - [ --enable-pkcs7 Enable PKCS7 (default: disabled)], - [ ENABLED_PKCS7=$enableval ], - [ ENABLED_PKCS7=no ], - ) - -if test "$ENABLED_PKCS7" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" -fi - -AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) - - -# Simple Certificate Enrollment Protocol (SCEP) -AC_ARG_ENABLE([scep], - [ --enable-scep Enable wolfSCEP (default: disabled)], - [ ENABLED_WOLFSCEP=$enableval ], - [ ENABLED_WOLFSCEP=no ] - ) -if test "$ENABLED_WOLFSCEP" = "yes" -then - # Enable prereqs if not already enabled - if test "x$ENABLED_KEYGEN" = "xno" - then - ENABLED_KEYGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN" - fi - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_CERTREQ" = "xno" - then - ENABLED_CERTREQ="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ" - fi - if test "x$ENABLED_PKCS7" = "xno" - then - ENABLED_PKCS7="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7" - AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"]) - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP" -fi - - -# Small Stack -AC_ARG_ENABLE([smallstack], - [ --enable-smallstack Enable Small Stack Usage (default: enabled)], - [ ENABLED_SMALL_STACK=$enableval ], - [ ENABLED_SMALL_STACK=yes ] - ) - -if test "x$ENABLED_SMALL_STACK" = "xyes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK" -fi - - -#valgrind -AC_ARG_ENABLE([valgrind], - [ --enable-valgrind Enable valgrind for unit tests (default: disabled)], - [ ENABLED_VALGRIND=$enableval ], - [ ENABLED_VALGRIND=no ] - ) - -if test "$ENABLED_VALGRIND" = "yes" -then - AC_CHECK_PROG([HAVE_VALGRIND],[valgrind],[yes],[no]) - - if test "$HAVE_VALGRIND" = "no" - then - AC_MSG_ERROR([Valgrind not found.]) - fi - enable_shared=no - enable_static=yes - AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND" -fi - -AM_CONDITIONAL([USE_VALGRIND], [test "x$ENABLED_VALGRIND" = "xyes"]) - - -# Test certs, use internal cert functions for extra testing -AC_ARG_ENABLE([testcert], - [ --enable-testcert Enable Test Cert (default: disabled)], - [ ENABLED_TESTCERT=$enableval ], - [ ENABLED_TESTCERT=no ] - ) - -if test "$ENABLED_TESTCERT" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT" -fi - - -# I/O Pool, an example to show user how to override memory handler and use -# a pool for the input/output buffer requests -AC_ARG_ENABLE([iopool], - [ --enable-iopool Enable I/O Pool example (default: disabled)], - [ ENABLED_IOPOOL=$enableval ], - [ ENABLED_IOPOOL=no ] - ) - -if test "$ENABLED_IOPOOL" = "yes" -then - if test "$thread_ls_on" = "no" - then - AC_MSG_ERROR([I/O Pool example requires Thread Local Storage]) - fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER" -fi - - -# Certificate Service Support -AC_ARG_ENABLE([certservice], - [ --enable-certservice Enable cert service (default: disabled)], - [ ENABLED_CERT_SERVICE=$enableval ], - [ ENABLED_CERT_SERVICE=no ] - ) -if test "$ENABLED_CERT_SERVICE" = "yes" -then - # Requires ecc,certgen, and opensslextra make sure on - if test "x$ENABLED_CERTGEN" = "xno" - then - ENABLED_CERTGEN="yes" - AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN" - fi - if test "x$ENABLED_ECC" = "xno" - then - ENABLED_ECC="yes" - AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR" - AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"]) - fi - if test "x$ENABLED_OPENSSLEXTRA" = "xno" - then - ENABLED_OPENSSLEXTRA="yes" - AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS" - fi - AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE" -fi - - -# set fastmath default -FASTMATH_DEFAULT=no - -if test "$host_cpu" = "x86_64" -then -FASTMATH_DEFAULT=yes -fi - -# fastmath -AC_ARG_ENABLE([fastmath], - [ --enable-fastmath Enable fast math ops (default: enabled on x86_64)], - [ ENABLED_FASTMATH=$enableval ], - [ ENABLED_FASTMATH=$FASTMATH_DEFAULT] - ) - -if test "x$ENABLED_FASTMATH" = "xyes" -then - # turn off fastmth if leanpsk on or asn off - if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no" - then - ENABLED_FASTMATH=no - else - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" - fi -fi - - -# fast HUGE math -AC_ARG_ENABLE([fasthugemath], - [ --enable-fasthugemath Enable fast math + huge code (default: disabled)], - [ ENABLED_FASTHUGEMATH=$enableval ], - [ ENABLED_FASTHUGEMATH=no ] - ) - -if test "$ENABLED_BUMP" = "yes" -then - ENABLED_FASTHUGEMATH="yes" -fi - -if test "$ENABLED_FASTHUGEMATH" = "yes" -then - ENABLED_FASTMATH="yes" - AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH" - ENABLED_SLOWMATH="no" -fi - -AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"]) -AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"]) - - -# Enable Examples, used to disable examples -AC_ARG_ENABLE([examples], - [ --enable-examples Enable Examples (default: enabled)], - [ ENABLED_EXAMPLES=$enableval ], - [ ENABLED_EXAMPLES=yes ] - ) - -AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"]) -AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"]) -# certs still have sha signatures for now -AS_IF([test "x$ENABLED_SHA" = "xno"], [ENABLED_EXAMPLES="no"]) -AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"]) - - -# LIBZ -ENABLED_LIBZ="no" -trylibzdir="" -AC_ARG_WITH([libz], - [ --with-libz=PATH PATH to libz install (default /usr/) ], - [ - AC_MSG_CHECKING([for libz]) - CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ" - LIBS="$LIBS -lz" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ]) - - if test "x$libz_linked" == "xno" ; then - if test "x$withval" != "xno" ; then - trylibzdir=$withval - fi - if test "x$withval" == "xyes" ; then - trylibzdir="/usr" - fi - - AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib" - CPPFLAGS="$CPPFLAGS -I$trylibzdir/include" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ]) - - if test "x$libz_linked" == "xno" ; then - AC_MSG_ERROR([libz isn't found. - If it's already installed, specify its path using --with-libz=/dir/]) - fi - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([yes]) - fi - ENABLED_LIBZ="yes" - ] -) -AM_CONDITIONAL([BUILD_LIBZ], [test "x$ENABLED_LIBZ" = "xyes"]) - - -# cavium -trycaviumdir="" -AC_ARG_WITH([cavium], - [ --with-cavium=PATH PATH to cavium/software dir ], - [ - AC_MSG_CHECKING([for cavium]) - CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM" - - if test "x$withval" == "xyes" ; then - AC_MSG_ERROR([need a PATH for --with-cavium]) - fi - if test "x$withval" != "xno" ; then - trycaviumdir=$withval - fi - - LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o" - CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cavium_common.h"]], [[ CspShutdown(CAVIUM_DEV_ID); ]])],[ cavium_linked=yes ],[ cavium_linked=no ]) - - if test "x$cavium_linked" == "xno" ; then - AC_MSG_ERROR([cavium isn't found. - If it's already installed, specify its path using --with-cavium=/dir/]) - fi - AC_MSG_RESULT([yes]) - enable_shared=no - enable_static=yes - ] -) - - -# microchip api -AC_ARG_ENABLE([mcapi], - [ --enable-mcapi Enable Microchip API (default: disabled)], - [ ENABLED_MCAPI=$enableval ], - [ ENABLED_MCAPI=no ] - ) - -if test "$ENABLED_MCAPI" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT" -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no" -then - AC_MSG_ERROR([please enable sha512 if enabling mcapi.]) -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no" -then - AC_MSG_ERROR([please enable ecc if enabling mcapi.]) -fi - -if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no" -then - AC_MSG_ERROR([please use --with-libz if enabling mcapi.]) -fi - -AM_CONDITIONAL([BUILD_MCAPI], [test "x$ENABLED_MCAPI" = "xyes"]) - - - -# OPTIMIZE FLAGS -if test "$GCC" = "yes" -then - AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused" - if test "$ax_enable_debug" = "no" - then - if test "$ENABLED_FASTMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS" - if test "$ENABLED_FASTHUGEMATH" = "yes" - then - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS" - fi - else - AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS" - fi - fi -fi - -LIB_SOCKET_NSL -AX_HARDEN_CC_COMPILER_FLAGS - -# link to ws2_32 if on mingw -case $host_os in - *mingw32) - LDFLAGS="$LDFLAGS -lws2_32" ;; -esac - -# add user C_EXTRA_FLAGS back -CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS" -OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS" - -CREATE_HEX_VERSION -AC_SUBST([AM_CPPFLAGS]) -AC_SUBST([AM_CFLAGS]) -AC_SUBST([AM_LDFLAGS]) - -# FINAL -AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([cyassl/version.h]) -AC_CONFIG_FILES([cyassl/options.h]) -AC_CONFIG_FILES([support/cyassl.pc]) -AC_CONFIG_FILES([rpm/spec]) - -AX_CREATE_GENERIC_CONFIG -AX_AM_JOBSERVER([yes]) - -AC_OUTPUT - - -# force make clean -echo "---" -echo "Running make clean..." -make clean >/dev/null 2>&1 -echo - -# generate user options header -echo "---" -echo "Generating user options header..." -OPTION_FILE="cyassl/options.h" -rm -f $OPTION_FILE - -echo "/* cyassl options.h" >> $OPTION_FILE -echo " * generated from configure options" >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " * This file is part of CyaSSL." >> $OPTION_FILE -echo " *" >> $OPTION_FILE -echo " */" >> $OPTION_FILE - -echo "" >> $OPTION_FILE -echo "#pragma once" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "extern \"C\" {" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE - -for option in $OPTION_FLAGS; do - defonly=`echo $option | sed 's/-D//'` - if test "$defonly" != "$option" - then - noequalsign=`echo $defonly | sed 's/=/ /'` - echo "#undef $noequalsign" >> $OPTION_FILE - echo "#define $noequalsign" >> $OPTION_FILE - echo "" >> $OPTION_FILE - else - echo "option w/o begin -D is $option, not saving to $OPTION_FILE" - fi -done - -echo "" >> $OPTION_FILE -echo "#ifdef __cplusplus" >> $OPTION_FILE -echo "}" >> $OPTION_FILE -echo "#endif" >> $OPTION_FILE -echo "" >> $OPTION_FILE -echo - -# output config summary -echo "---" -echo "Configuration summary for $PACKAGE_NAME version $VERSION" -echo "" -echo " * Installation prefix: $prefix" -echo " * System type: $host_vendor-$host_os" -echo " * Host CPU: $host_cpu" -echo " * C Compiler: $CC" -echo " * C Flags: $CFLAGS" -echo " * C++ Compiler: $CXX" -echo " * C++ Flags: $CXXFLAGS" -echo " * CPP Flags: $CPPFLAGS" -echo " * LIB Flags: $LIB" -echo " * Debug enabled: $ax_enable_debug" -echo " * Warnings as failure: $ac_cv_warnings_as_errors" -echo " * make -j: $enable_jobserver" -echo " * VCS checkout: $ac_cv_vcs_checkout" -echo -echo " Features " -echo " * Single threaded: $ENABLED_SINGLETHREADED" -echo " * Filesystem: $ENABLED_FILESYSTEM" -echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA" -echo " * fastmath: $ENABLED_FASTMATH" -echo " * sniffer: $ENABLED_SNIFFER" -echo " * snifftest: $ENABLED_SNIFFTEST" -echo " * ARC4: $ENABLED_ARC4" -echo " * AES: $ENABLED_AES" -echo " * AES-NI: $ENABLED_AESNI" -echo " * AES-GCM: $ENABLED_AESGCM" -echo " * AES-CCM: $ENABLED_AESCCM" -echo " * DES3: $ENABLED_DES3" -echo " * Camellia: $ENABLED_CAMELLIA" -echo " * NULL Cipher: $ENABLED_NULL_CIPHER" -echo " * MD5: $ENABLED_MD5" -echo " * RIPEMD: $ENABLED_RIPEMD" -echo " * SHA: $ENABLED_SHA" -echo " * SHA-512: $ENABLED_SHA512" -echo " * BLAKE2: $ENABLED_BLAKE2" -echo " * keygen: $ENABLED_KEYGEN" -echo " * certgen: $ENABLED_CERTGEN" -echo " * certreq: $ENABLED_CERTREQ" -echo " * HC-128: $ENABLED_HC128" -echo " * RABBIT: $ENABLED_RABBIT" -echo " * PWDBASED: $ENABLED_PWDBASED" -echo " * HKDF: $ENABLED_HKDF" -echo " * MD4: $ENABLED_MD4" -echo " * PSK: $ENABLED_PSK" -echo " * LEANPSK: $ENABLED_LEANPSK" -echo " * RSA: $ENABLED_RSA" -echo " * DSA: $ENABLED_DSA" -echo " * DH: $ENABLED_DH" -echo " * ECC: $ENABLED_ECC" -echo " * FPECC: $ENABLED_FPECC" -echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" -echo " * ASN: $ENABLED_ASN" -echo " * CODING: $ENABLED_CODING" -echo " * MEMORY: $ENABLED_MEMORY" -echo " * I/O POOL: $ENABLED_IOPOOL" -echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS" -echo " * DTLS: $ENABLED_DTLS" -echo " * Old TLS Versions: $ENABLED_OLD_TLS" -echo " * OCSP: $ENABLED_OCSP" -echo " * CRL: $ENABLED_CRL" -echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR" -echo " * Persistent session cache: $ENABLED_SAVESESSION" -echo " * Persistent cert cache: $ENABLED_SAVECERT" -echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER" -echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS" -echo " * NTRU: $ENABLED_NTRU" -echo " * SNI: $ENABLED_SNI" -echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT" -echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC" -echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION" -echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES" -echo " * All TLS Extensions: $ENABLED_TLSX" -echo " * PKCS#7 $ENABLED_PKCS7" -echo " * wolfSCEP $ENABLED_WOLFSCEP" -echo " * Small Stack: $ENABLED_SMALL_STACK" -echo " * valgrind unit tests: $ENABLED_VALGRIND" -echo " * LIBZ: $ENABLED_LIBZ" -echo " * Examples: $ENABLED_EXAMPLES" -echo "" -echo "---" - diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po deleted file mode 100644 index 0c0940dc..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.deps/benchmark.Po +++ /dev/null @@ -1,194 +0,0 @@ -ctaocrypt/benchmark/benchmark.o: ctaocrypt/benchmark/benchmark.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/string.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/xlocale.h \ - /usr/include/stdio.h /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/ctype.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/md5.h \ - cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/dh.h \ - cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/ripemd.h \ - /usr/include/i386-linux-gnu/sys/time.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/string.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/xlocale.h: - -/usr/include/stdio.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/sha512.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/ripemd.h: - -/usr/include/i386-linux-gnu/sys/time.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark b/project1/cyassl-3.0.0/ctaocrypt/benchmark/.libs/benchmark deleted file mode 100755 index 87269476752492de9415865ff061fc2eeb2972ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17091 zcmeHOeRNbsmail&wiuIuk%_|S8|`Qqp$QN$DmrOM0%(9p!iNWkrqkU?w{*JO{=j6G z*$vY{i6I)5$I(N(j*U)6iv zFOQ($->IBR)vxZYTeog~z4yBAKh)IK=H%oEBjk!aLDbQ0vsWP1W+_UA(8M{SOk6A` zi*YC-t)c@wh#D#|o`o_SVjf~6aN{PMo$-8NM$%9$BN8-Xvorp;CIlnviy}oIatbl@ zoXyVoBr5IA)nvP*=Ys7k(7ytW(GW_#*al+&bpmLcu^O1spw+*h@M)S5S|4;rbb!Wa z&~E}A@T5TbXkIJ_-K<{`+G1pVBw|J=*fb;Ln;r^=lWop;#0eXc#=4|0T)G1PRX-@R z1d;S&MB0w@`!ZK2iQt2&2eS0chBVt&p4 z9Qp0L_ifyH@4*&6!0+2?89VRpp`FAXsx*9=4W<3?x1NlF(;O7k@ zQql`8^sg=0Wx+OfN)N36wE>V4Pq5H~7Wy2EykA)Gxt98`SnB`9!oSLbrG`+dc7khzoFza4&9L;`aGt{+3`o;g2;gSrCeZ z{f(ZckYBjnEv=ETJD%{w5^lF}->|{GT<2R5f(Uf%cXRfIB$7j1uawKl> zCm=-B#{7PWU>1$(h1G$D{;)p=nJBOK1Y=T~&PKt|MAnpwNEMPzppOahIvOz5;K#W=Nc zh~{#{qKQDv@9`0r%Mnx*_u^$39bYi)PR9K{(Hx2T!y=kY#QDz~@Wezk77QnvMLZD; zfz;}6^+wx8vo{op`$aQFiWYw&5p4BGnth&jj5w!{SPFL2Lt&dlV>ImPs#7CHZOZ&pa9*}Tf-WvE77bDD#5!T94Dkt+r;pN&0uLNIt9 zTUZ29EGv>YS1i{X`RaL_eH;#te5|LlS&u1b#Z0k)N|@qsox&6chsN}5oOw*KV#=7F zBg8bO?7Vq+#zv*_(|fZ#3AB-;&l>7iC-eFmpDOufVfKHHsXWC zz2$tqgQ*wb|2eLxE$>z2?8}DUJa% ze)2aEH~kU(OPv^Zd(Hq2B`}wdujqO|b);m!%|Y7mftLq*o*?N-Ldn19L~hp$dp^7* z=fEFMBy$FymK9$&Dt1*nY)0kRUmoZ>-t){A5MJe_ukL>=) z+1}Y`uP0?cG(3#n=J%wA-jq38Pr^~wRpHoQ?Iz7oaHhjAI=HibNQ~WfQ9*5&5mMRb;jqE#9wMT>Xcm zg|{3yT3D1iAT?O~!qLK;QwNncjWmJAPDw>v%-I}L&0_Y7nx?1!-|+CJy)@!l_nMy$ zD4Wg$G;F$iCi`=;C6xs~M)jUfM>#4$cE(lGi#xL1#@;zO@2%5W<2;t z(f;4S{H=D&?qnz1Z9BTYEIGn%SXOdfRy(E{cDrx%5xWvCpN8E|bDhpn-L&j#tB#Li zw^v~aV`jZIP1>!VGwaL0NxKzN@1B$o0tdTkv}YXsNV?`_x3wt5szm_;GFTKcv(_}^ z6Y3mgGe5HK`)a=Jk}V}KuStDv`};#Zra5+p8oQ}Vhd$_Vc)ZGQQXNcpqAnH-+LKek ztk$1E`YyGw^PT2eeQq?14sOKht`3JII64h8K5!*Y(@sZPo{%tE>LXUB9Upi69))Vl zv*Q&&q(3_b63qPywC&p8lREp)I_vH&Z!5~Dq`bKKqr%Q89t*lQIx4$D*p)jSM<_}j zFLseH&u<$x4UyKQC>*2dCm_6M_fDa)$@B@J&HaU2uA`WQqXODgF)JSdq^{{23?*4E zRW0R%&5oAX6RCfu(ez=8uEr*0I^SAQ*3GhN2M$!6)zu?Tx3cGaP_H}Ws6YpbAy&4I zrw?R*&jxWIqk5&@lC+eRo{twrk$&nkT4-q!hdD%}0i1hkU#jd0q0x`c9XSMM$ybH{ zby5-2Y{alvLbdL9-Xzz}-D#vfscUF@`6y85u;b7!qPp_%#ym}51c{r63%Br#pSh(N z%AqwoT`@|hE1#tln3_FAM>Bm^RqPng%;C;nreMP*$v31V$U`5YDfW;`tFga4dgeX+ z`M3745)us!ZI1LH;Ne-A0a*UyRmJoLEW5ZT^()NH!v#I515C&Dq;_$xqRxw;Z`#YX zVA`3t;+@-A8h=+Nm&QguWg%ddB=oF#>ff$U{o@d)rvBYv&dy{f$~jH%K`9ih(icPr zL_rG-nVlb+IdpPC6jIE79GQzSaOpin8y)#wpW{DgHDLYO)ewr;bBLvFXp5)Fxtg3I$2>IC0W&D=pc^c5HRyP9mc?== z;~}jRJR{ajxtu=T=p!VwDMh(-0+0cnxpZhiWVs^*@S1?Eow{KwOxHrIB}qIYV!>dk zU^10w9&N1ZJO*AcDus~Qsw-2ZKU7a>WaYKLgP51(BO?S_SJ0>5I=>EnBIj4s=*3P) zKv{>q2$_1p6=v#1hpJ~)_zM)D!hS|StJIF8Y}CEgA)BsqlyLvit*4tzT2HB9$4U!; zDlO=PRhA~7HCYfF3YH^>!>UjK3XNt#^Err}2Lh~it5A~+l1JNl`aYIB%)Bm4s`rrR z$WDP?oAz>L$%Tg3%MxRWm6T!@Vrqb0ZeE;guc4akLlOShIf|)5_W7T!z6FD)_Li*C z-?~?Xe3QHRc;X86-rddp zdzyp8hinDSIK1t*WK8YPx%%_u+o`=%)~t2^bl~uLz2@*4K1IoQRu9^l-hEkta8rKq$$a<}Gj&pXi z7RT4`urEGME4_+v$^04d@#;gj`tUr8u-VnRw9^yjTE3v-4BB2&J?BhR0L>eCk(`??dXy+~SX zy}un+kiVd?U9I#C)HaFm@VAjxe>j2pa3&(W{#YVD!xxxUUQy}9&r(7a#NwVziTwR! z=|X+f)jGy+&vB1dFMr9=^xvFDGRRu;$D)ztMtxtvzrGy?$L~^^`J`;vgpmxidSdGh zR+;8Z&bwAaj{A%l93GyBqzKT$289FexbD{3Y_3P8MDPkH|iza7atrnveh@0Q|< zn!J;at7-gyoE)@qmaVHOH8kpBrZov!cxk&lWimPxk z$aiYooZ-7`8QSA}G_KJJT#Xa2-f6QlzZWU*%Ti(9p=XMZhLLS3A4W=@@ntYl0gUV! z2YG*9uQj*JX0JtDiP(&|0r3vR2M`}dd;)PF;v0w`ARb2?cbCmR3Gs5oxrnuhD-oL! zHz3}D_yFR=h)*EyLwp1A1H|Kq*`i6VV$YCP9JY?O?aA+CSocL7&%-v^~a*Z8IC0UPS^a! z(;-(!E#aiIDH+7||DaDei2|N@KsbHvVaQWyBBm(1jw65@w3t6cewB%a62ck8w@Bek z_}lOwItM|D$P24Zf56=w^R)Wi0Uv4_NY!wAVlmuyl{Jj~tzNJ}xTiJfMZ*yY#6PEO zMM=aBSmE?WTKQSaF#mU^Toas&oXgVh1Az0@2&6GwhKP$^zf$N9?*N8HF zTd;=sJqh2wGr{1iMhSkKjj&y=y`A8jhdkFH1Nj(vpN#8|d|Z=h@C^ZQjUp>~xHeZJ za$S;-Yxp24bL|>|ybNm*x&BDv+N(gPSZ1`#az=hl<9cPDYjzv>%8@s>3n+euh#xIv z9j^Jk;N#>sQOvKsC3{yzEGR6qFo!MDyJ zqRf!@u!&Fl>u96TgU3yL)qU{!0bei5j9`d<4h02>9AoKUgc~sijl4$wcgW+4v*hC* zf9w=|Z-9sWpgdl1JaG!XH$mrEkWcz8fsYkg#=v$tzV9I#@_4WNE8J-^bOK4{i3d%5 zf;TeDh3G?>5y-=M6w#2^2fjY=u^l5AvQMCZ<9LfV(2J*%9 zJQLCwd3I5j5iY`l9!G*6j4V^rbQ1^W3Q>hQjqBb5*E3}wijZ>7o8=WZ^63ZLI$mIz>L1jZ8 zo}kR*W)q(dv&TmJIoLT^qhEgx$Q9>FAGaYBc7bj@&yl_gSl&iPnuFTSNV$HI0G}^< zkn$OjnEVeSlXY0@Y}z#*>8j` zsQ+gsx`wh`Y-v06^*AB7L=*y>{pv0@ZK|~AR13b=f>&EGuZb9e^`pRaVelZ&`P5;d z-)q4;fFIxEkn67q>)}ygK3`BK>+b^Q^8x1*{Q&>VQhyI{cKqQt$od%1TUj6Wc-_MP zrUk!m!Jk<07Z#jrI&(C%G0BA4|1t}%u;41-4ZpP6gOE%876Tjlb9`1<_}wPV_S%8h zY_r)X>-AG6I@`Y+`1-qTcCLHMe-PO0C;2bHPxspFm+JIKfkXG$>`Qely!c@{k;I(< zFP!0SSg_n(x45AZUXfYfNq3^v4bQqT+#(H+NK=v9?TffuLXjp<$n8r+VsW=8*(UHh z5e@khexGyhoU6+rc@!q;VW?hH;Ch#c!GTY{*!YsIt#sKlA?ZIkg4LVwM5J%!jLh%Y z*&O=P6pDD)H?~Lp!W)bR@Pm7BgTNgC5e?D%F9ttFx4U+^Ye|i}W@$B@KxN;JJYT;u z&H048`sSssC5sn;%S4g>qr$zgZrOZSoqJhrZ9`3?yU{hju7={I!=X2xRDP6FNq0Qp zG5jp06X;1ko!{=Y+EzK&iJKhmsMnncB*W{SO>Kg&aJv5@?yf+p?sBOdB&(_nf5vk2 zO`Mb6LzM@mnO%2~T&ym|=)RR%hMBS>bUIaC^I&$ET`sen7=8H$JJNABV-Om`>W4}< zQt8EMmSS>?#dOMcn|`5YKHQkly>GKFtKMWRhAHNzM<~W-r2DVi7mv6Dp0JOu!6Q9S zO/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/benchmark/benchmark.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "benchmark:ctaocrypt/benchmark/benchmark:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'benchmark' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c b/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c deleted file mode 100644 index 2cccd362..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.c +++ /dev/null @@ -1,1222 +0,0 @@ -/* benchmark.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* CTaoCrypt benchmark */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif - -#if defined(CYASSL_MDK_ARM) - extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; - #define fopen CyaSSL_fopen -#endif - -#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) - /* include test cert and key buffers for use with NO_FILESYSTEM */ - #if defined(CYASSL_MDK_ARM) - #include "cert_data.h" /* use certs_test.c for initial data, - so other commands can share the data. */ - #else - #include - #endif -#endif - - -#ifdef HAVE_BLAKE2 - #include - void bench_blake2(void); -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -void bench_des(void); -void bench_arc4(void); -void bench_hc128(void); -void bench_rabbit(void); -void bench_aes(int); -void bench_aesgcm(void); -void bench_aesccm(void); -void bench_aesctr(void); -void bench_camellia(void); - -void bench_md5(void); -void bench_sha(void); -void bench_sha256(void); -void bench_sha512(void); -void bench_ripemd(void); - -void bench_rsa(void); -void bench_rsaKeyGen(void); -void bench_dh(void); -#ifdef HAVE_ECC -void bench_eccKeyGen(void); -void bench_eccKeyAgree(void); -#endif - -double current_time(int); - - -#ifdef HAVE_CAVIUM - -static int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif - - -/* so embedded projects can pull in tests on their own */ -#if !defined(NO_MAIN_DRIVER) - -int main(int argc, char** argv) - -{ - (void)argc; - (void)argv; -#else -int benchmark_test(void *args) -{ -#endif - - #ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) { - printf("Cavium OpenNitroxDevice failed\n"); - exit(-1); - } -#endif /* HAVE_CAVIUM */ -#ifndef NO_AES - bench_aes(0); - bench_aes(1); -#endif -#ifdef HAVE_AESGCM - bench_aesgcm(); -#endif - -#ifdef CYASSL_AES_COUNTER - bench_aesctr(); -#endif - -#ifdef HAVE_AESCCM - bench_aesccm(); -#endif -#ifdef HAVE_CAMELLIA - bench_camellia(); -#endif -#ifndef NO_RC4 - bench_arc4(); -#endif -#ifdef HAVE_HC128 - bench_hc128(); -#endif -#ifndef NO_RABBIT - bench_rabbit(); -#endif -#ifndef NO_DES3 - bench_des(); -#endif - - printf("\n"); - -#ifndef NO_MD5 - bench_md5(); -#endif -#ifndef NO_SHA - bench_sha(); -#endif -#ifndef NO_SHA256 - bench_sha256(); -#endif -#ifdef CYASSL_SHA512 - bench_sha512(); -#endif -#ifdef CYASSL_RIPEMD - bench_ripemd(); -#endif -#ifdef HAVE_BLAKE2 - bench_blake2(); -#endif - - printf("\n"); - -#ifndef NO_RSA - bench_rsa(); -#endif - -#ifndef NO_DH - bench_dh(); -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) - bench_rsaKeyGen(); -#endif - -#ifdef HAVE_ECC - bench_eccKeyGen(); - bench_eccKeyAgree(); -#endif - - return 0; -} - - -#ifdef BENCH_EMBEDDED -enum BenchmarkBounds { - numBlocks = 25, /* how many kB to test (en/de)cryption */ - ntimes = 1, - genTimes = 5, /* public key iterations */ - agreeTimes = 5 -}; -static const char blockType[] = "kB"; /* used in printf output */ -#else -enum BenchmarkBounds { - numBlocks = 5, /* how many megs to test (en/de)cryption */ - ntimes = 100, - genTimes = 100, - agreeTimes = 100 -}; -static const char blockType[] = "megs"; /* used in printf output */ -#endif - -static const byte key[] = -{ - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, - 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 -}; - -static const byte iv[] = -{ - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 - -}; - - -/* use kB instead of mB for embedded benchmarking */ -#ifdef BENCH_EMBEDDED -static byte plain [1024]; -static byte cipher[1024]; -#else -static byte plain [1024*1024]; -static byte cipher[1024*1024]; -#endif - - -#ifndef NO_AES -void bench_aes(int show) -{ - Aes enc; - double start, total, persec; - int i; - int ret; - -#ifdef HAVE_CAVIUM - if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) { - printf("aes init cavium failed\n"); - return; - } -#endif - - ret = AesSetKey(&enc, key, 16, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("AesSetKey failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - if (show) - printf("AES %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - AesFreeCavium(&enc); -#endif -} -#endif - - -#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM) - static byte additional[13]; - static byte tag[16]; -#endif - - -#ifdef HAVE_AESGCM -void bench_aesgcm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesGcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesGcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-GCM %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_AES_COUNTER -void bench_aesctr(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesSetKeyDirect(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCtrEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-CTR %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - - -#ifdef HAVE_AESCCM -void bench_aesccm(void) -{ - Aes enc; - double start, total, persec; - int i; - - AesCcmSetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - AesCcmEncrypt(&enc, cipher, plain, sizeof(plain), iv, 12, - tag, 16, additional, 13); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("AES-CCM %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_CAMELLIA -void bench_camellia(void) -{ - Camellia cam; - double start, total, persec; - int i, ret; - - ret = CamelliaSetKey(&cam, key, 16, iv); - if (ret != 0) { - printf("CamelliaSetKey failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - CamelliaCbcEncrypt(&cam, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("Camellia %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifndef NO_DES3 -void bench_des(void) -{ - Des3 enc; - double start, total, persec; - int i, ret; - -#ifdef HAVE_CAVIUM - if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("des3 init cavium failed\n"); -#endif - ret = Des3_SetKey(&enc, key, iv, DES_ENCRYPTION); - if (ret != 0) { - printf("Des3_SetKey failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Des3_CbcEncrypt(&enc, plain, cipher, sizeof(plain)); - - total = current_time(0) - start; - - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("3DES %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Des3_FreeCavium(&enc); -#endif -} -#endif - - -#ifndef NO_RC4 -void bench_arc4(void) -{ - Arc4 enc; - double start, total, persec; - int i; - -#ifdef HAVE_CAVIUM - if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) - printf("arc4 init cavium failed\n"); -#endif - - Arc4SetKey(&enc, key, 16); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Arc4Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("ARC4 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -#ifdef HAVE_CAVIUM - Arc4FreeCavium(&enc); -#endif -} -#endif - - -#ifdef HAVE_HC128 -void bench_hc128(void) -{ - HC128 enc; - double start, total, persec; - int i; - - Hc128_SetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Hc128_Process(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("HC128 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* HAVE_HC128 */ - - -#ifndef NO_RABBIT -void bench_rabbit(void) -{ - Rabbit enc; - double start, total, persec; - int i; - - RabbitSetKey(&enc, key, iv); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RabbitProcess(&enc, cipher, plain, sizeof(plain)); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RABBIT %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_RABBIT */ - - -#ifndef NO_MD5 -void bench_md5(void) -{ - Md5 hash; - byte digest[MD5_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitMd5(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - Md5Update(&hash, plain, sizeof(plain)); - - Md5Final(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("MD5 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_MD5 */ - - -#ifndef NO_SHA -void bench_sha(void) -{ - Sha hash; - byte digest[SHA_DIGEST_SIZE]; - double start, total, persec; - int i, ret; - - ret = InitSha(&hash); - if (ret != 0) { - printf("InitSha failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - ShaUpdate(&hash, plain, sizeof(plain)); - - ShaFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif /* NO_SHA */ - - -#ifndef NO_SHA256 -void bench_sha256(void) -{ - Sha256 hash; - byte digest[SHA256_DIGEST_SIZE]; - double start, total, persec; - int i, ret; - - ret = InitSha256(&hash); - if (ret != 0) { - printf("InitSha256 failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) { - ret = Sha256Update(&hash, plain, sizeof(plain)); - if (ret != 0) { - printf("Sha256Update failed, ret = %d\n", ret); - return; - } - } - - ret = Sha256Final(&hash, digest); - if (ret != 0) { - printf("Sha256Final failed, ret = %d\n", ret); - return; - } - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-256 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_SHA512 -void bench_sha512(void) -{ - Sha512 hash; - byte digest[SHA512_DIGEST_SIZE]; - double start, total, persec; - int i, ret; - - ret = InitSha512(&hash); - if (ret != 0) { - printf("InitSha512 failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) { - ret = Sha512Update(&hash, plain, sizeof(plain)); - if (ret != 0) { - printf("Sha512Update failed, ret = %d\n", ret); - return; - } - } - - ret = Sha512Final(&hash, digest); - if (ret != 0) { - printf("Sha512Final failed, ret = %d\n", ret); - return; - } - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("SHA-512 %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - -#ifdef CYASSL_RIPEMD -void bench_ripemd(void) -{ - RipeMd hash; - byte digest[RIPEMD_DIGEST_SIZE]; - double start, total, persec; - int i; - - InitRipeMd(&hash); - start = current_time(1); - - for(i = 0; i < numBlocks; i++) - RipeMdUpdate(&hash, plain, sizeof(plain)); - - RipeMdFinal(&hash, digest); - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("RIPEMD %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#ifdef HAVE_BLAKE2 -void bench_blake2(void) -{ - Blake2b b2b; - byte digest[64]; - double start, total, persec; - int i, ret; - - ret = InitBlake2b(&b2b, 64); - if (ret != 0) { - printf("InitBlake2b failed, ret = %d\n", ret); - return; - } - start = current_time(1); - - for(i = 0; i < numBlocks; i++) { - ret = Blake2bUpdate(&b2b, plain, sizeof(plain)); - if (ret != 0) { - printf("Blake2bUpdate failed, ret = %d\n", ret); - return; - } - } - - ret = Blake2bFinal(&b2b, digest, 64); - if (ret != 0) { - printf("Blake2bFinal failed, ret = %d\n", ret); - return; - } - - total = current_time(0) - start; - persec = 1 / total * numBlocks; -#ifdef BENCH_EMBEDDED - /* since using kB, convert to MB/s */ - persec = persec / 1024; -#endif - - printf("BLAKE2b %d %s took %5.3f seconds, %7.3f MB/s\n", numBlocks, - blockType, total, persec); -} -#endif - - -#if !defined(NO_RSA) || !defined(NO_DH) \ - || defined(CYASSL_KEYGEN) || defined(HAVE_ECC) -static RNG rng; -#endif - -#ifndef NO_RSA - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certRSAname = "certs/rsa2048.der" ; -static void set_Bench_RSA_File(char * cert) { certRSAname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certRSAname = "certs/rsa2048.der" ; -#endif - -void bench_rsa(void) -{ - int i; - int ret; - byte tmp[3072]; - size_t bytes; - word32 idx = 0; - - byte message[] = "Everyone gets Friday off."; - byte enc[512]; /* for up to 4096 bit */ - const int len = (int)strlen((char*)message); - double start, total, each, milliEach; - - RsaKey rsaKey; - int rsaKeySz = 2048; /* used in printf */ - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, rsa_key_der_1024, sizeof_rsa_key_der_1024); - bytes = sizeof_rsa_key_der_1024; - rsaKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, rsa_key_der_2048, sizeof_rsa_key_der_2048); - bytes = sizeof_rsa_key_der_2048; -#else - FILE* file = fopen(certRSAname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certRSAname); - return; - } - - bytes = fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - -#ifdef HAVE_CAVIUM - if (RsaInitCavium(&rsaKey, CAVIUM_DEV_ID) != 0) - printf("RSA init cavium failed\n"); -#endif - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - ret = InitRsaKey(&rsaKey, 0); - if (ret < 0) { - printf("InitRsaKey failed\n"); - return; - } - ret = RsaPrivateKeyDecode(tmp, &idx, &rsaKey, (word32)bytes); - - start = current_time(1); - - for (i = 0; i < ntimes; i++) - ret = RsaPublicEncrypt(message,len,enc,sizeof(enc), &rsaKey, &rng); - - total = current_time(0) - start; - each = total / ntimes; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d encryption took %6.3f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, ntimes); - - if (ret < 0) { - printf("Rsa Public Encrypt failed\n"); - return; - } - - start = current_time(1); - - for (i = 0; i < ntimes; i++) { - byte out[512]; /* for up to 4096 bit */ - RsaPrivateDecrypt(enc, (word32)ret, out, sizeof(out), &rsaKey); - } - - total = current_time(0) - start; - each = total / ntimes; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("RSA %d decryption took %6.3f milliseconds, avg over %d" - " iterations\n", rsaKeySz, milliEach, ntimes); - - FreeRsaKey(&rsaKey); -#ifdef HAVE_CAVIUM - RsaFreeCavium(&rsaKey); -#endif -} -#endif - - -#ifndef NO_DH - - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \ - defined(CYASSL_MDK_SHELL) -static char *certDHname = "certs/dh2048.der" ; -void set_Bench_DH_File(char * cert) { certDHname = cert ; } - /* set by shell command */ -#elif defined(CYASSL_MDK_SHELL) - /* nothing */ -#else -static const char *certDHname = "certs/dh2048.der" ; -#endif - -void bench_dh(void) -{ - int i, ret; - byte tmp[1024]; - size_t bytes; - word32 idx = 0, pubSz, privSz = 0, pubSz2, privSz2, agreeSz; - - byte pub[256]; /* for 2048 bit */ - byte priv[256]; /* for 2048 bit */ - byte pub2[256]; /* for 2048 bit */ - byte priv2[256]; /* for 2048 bit */ - byte agree[256]; /* for 2048 bit */ - - double start, total, each, milliEach; - DhKey dhKey; - int dhKeySz = 2048; /* used in printf */ - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); - bytes = sizeof_dh_key_der_1024; - dhKeySz = 1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); - bytes = sizeof_dh_key_der_2048; -#else - FILE* file = fopen(certDHname, "rb"); - - if (!file) { - printf("can't find %s, Please run from CyaSSL home dir\n", certDHname); - return; - } - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - bytes = fread(tmp, 1, sizeof(tmp), file); -#endif /* USE_CERT_BUFFERS */ - - - InitDhKey(&dhKey); - bytes = DhKeyDecode(tmp, &idx, &dhKey, (word32)bytes); - if (bytes != 0) { - printf("dhekydecode failed, can't benchmark\n"); - #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); - #endif - return; - } - - start = current_time(1); - - for (i = 0; i < ntimes; i++) - DhGenerateKeyPair(&dhKey, &rng, priv, &privSz, pub, &pubSz); - - total = current_time(0) - start; - each = total / ntimes; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key generation %6.3f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, ntimes); - - DhGenerateKeyPair(&dhKey, &rng, priv2, &privSz2, pub2, &pubSz2); - start = current_time(1); - - for (i = 0; i < ntimes; i++) - DhAgree(&dhKey, agree, &agreeSz, priv, privSz, pub2, pubSz2); - - total = current_time(0) - start; - each = total / ntimes; /* per second */ - milliEach = each * 1000; /* milliseconds */ - - printf("DH %d key agreement %6.3f milliseconds, avg over %d" - " iterations\n", dhKeySz, milliEach, ntimes); - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - fclose(file); -#endif - FreeDhKey(&dhKey); -} -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) -void bench_rsaKeyGen(void) -{ - RsaKey genKey; - double start, total, each, milliEach; - int i; - - /* 1024 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 1024, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("RSA 1024 key generation %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); - - /* 2048 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - InitRsaKey(&genKey, 0); - MakeRsaKey(&genKey, 2048, 65537, &rng); - FreeRsaKey(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("RSA 2048 key generation %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} -#endif /* CYASSL_KEY_GEN */ - -#ifdef HAVE_ECC -void bench_eccKeyGen(void) -{ - ecc_key genKey; - double start, total, each, milliEach; - int i, ret; - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < genTimes; i++) { - ecc_make_key(&rng, 32, &genKey); - ecc_free(&genKey); - } - - total = current_time(0) - start; - each = total / genTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("\n"); - printf("ECC 256 key generation %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, genTimes); -} - - -void bench_eccKeyAgree(void) -{ - ecc_key genKey, genKey2; - double start, total, each, milliEach; - int i, ret; - byte shared[1024]; - byte sig[1024]; - byte digest[32]; - word32 x = 0; - - ecc_init(&genKey); - ecc_init(&genKey2); - - ret = InitRng(&rng); - if (ret < 0) { - printf("InitRNG failed\n"); - return; - } - - ret = ecc_make_key(&rng, 32, &genKey); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - ret = ecc_make_key(&rng, 32, &genKey2); - if (ret != 0) { - printf("ecc_make_key failed\n"); - return; - } - - /* 256 bit */ - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(shared); - ret = ecc_shared_secret(&genKey, &genKey2, shared, &x); - if (ret != 0) { - printf("ecc_shared_secret failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DHE key agreement %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - /* make dummy digest */ - for (i = 0; i < (int)sizeof(digest); i++) - digest[i] = (byte)i; - - - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - x = sizeof(sig); - ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &genKey); - if (ret != 0) { - printf("ecc_sign_hash failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DSA sign time %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - start = current_time(1); - - for(i = 0; i < agreeTimes; i++) { - int verify = 0; - ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &genKey); - if (ret != 0) { - printf("ecc_verify_hash failed\n"); - return; - } - } - - total = current_time(0) - start; - each = total / agreeTimes; /* per second */ - milliEach = each * 1000; /* millisconds */ - printf("EC-DSA verify time %6.3f milliseconds, avg over %d" - " iterations\n", milliEach, agreeTimes); - - ecc_free(&genKey2); - ecc_free(&genKey); -} -#endif /* HAVE_ECC */ - - -#ifdef _WIN32 - - #define WIN32_LEAN_AND_MEAN - #include - - double current_time(int reset) - { - static int init = 0; - static LARGE_INTEGER freq; - - LARGE_INTEGER count; - - (void)reset; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = 1; - } - - QueryPerformanceCounter(&count); - - return (double)count.QuadPart / freq.QuadPart; - } - -#elif defined MICROCHIP_PIC32 - #if defined(CYASSL_MICROCHIP_PIC32MZ) - #define CLOCK 8000000.0 - #else - #include - #define CLOCK 4000000.0 - #endif - - double current_time(int reset) - { - unsigned int ns; - - if (reset) { - WriteCoreTimer(0); - } - - /* get timer in ns */ - ns = ReadCoreTimer(); - - /* return seconds as a double */ - return ( ns / CLOCK * 2.0); - } - -#elif defined CYASSL_MDK_ARM - - extern double current_time(int reset) ; - -#elif defined FREERTOS - - double current_time(int reset) - { - (void) reset; - - portTickType tickCount; - - /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */ - tickCount = xTaskGetTickCount(); - return (double)tickCount / 1000; - } - -#else - - #include - - double current_time(int reset) - { - struct timeval tv; - - (void)reset; - - gettimeofday(&tv, 0); - - return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; - } - -#endif /* _WIN32 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o b/project1/cyassl-3.0.0/ctaocrypt/benchmark/benchmark.o deleted file mode 100644 index f8c942cee616e845ee44c8568d25a627e9a366a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10084 zcmc&)eQ;b=6+bas*p%9&*lI<@S9pbh?KatLnjl3Ix=G8hZ9~&SYq8;F_a(b#KjQAD zHd=(*6v?y!w2q?A0OKH{c1HXfl>rU3PO74!;|HktjkdNRmJ$C@slVTS_wK&DrellD zcxT@J?(g1n&pG$p@3gmcCAw>BYHCHN8mW~ULxA_q_ee}Zqs*0aq<7b`@L}>TI}fno zRLCYfyw=OJ`QfYi^C4spKl~acF`EVdI&tE};eVjb;rX-hv+Ars)y-$4bRR^UCwCnT zZ#l5B_lE0t9!pRSnj3o)yGX|4_MA#CG*Px2$7A+X+-_hcFwBgyxO=jEE~Gsdqo1jq2c_>#VHbEoudzDpWK4L8Hqf5u@H~r{%{f$o^uW!&EY<>KA z{bu9M244t_BOzP4IiJ0vr^=O`2N}ezeOunCW4Z!##+dpdS&iVtnB9a1oH%n z5~m+6hQ}AJCqQS6mI*p%SJ`f=^h}5Sm~YmX%3ud#|l+zv>ZUNKP|CC(o%D(D;?at-6z)R@|_x z)Vhq@OJ1G0y$b6z5Vt1~iNMV2G2@H4)mKk}BOJnsN9;+!_=@S=TM-IF61ckTLj=>5N%2+T3~aB0Ni}6V z25&l;Ro*CHRRfA#=vkTru`n#LCo1k0qn_$GHlg78#uPS}^nuIZ)mBZcia?QxklqTpyAK@wXkanz#lY;%~_t1E#m)6lJWR;XN9GlDB377UgOCR0=8YBQ5N5cC{EX0LXp zVIRFkvkh##^}A4WNL?AB@XS{boE$d2*l(x3=&%=AUoW`Auow7y0g0I$K1KXYKRdh~ z$BWUPy`JfWy^#Blj-C#gik{~}7%MG}+DZi1jy&p%AT|^%M-InK4$Txn6D1utC@>|b zzw_*g+bhQPq%tGB^B`B2T4;D)F7z)kbfE#_YV$I4P4%GxzX^MO)df0*!#Vs60>10u z!Yv0l+9J1(MLNCQ3s-qKzk~SyFW;>Ekd8Y8{+wK1b5Yme_~*a>*O!0&@ZH-sL>riA z*}1Xnx8KFQPV*KucV6ebduPraEJ>$Z>UGQ4x}(;BlgYZNC05ZbTUT0(Q?sSBtJhL# zamrd;vdV?RkhQoq(lTI`++-o2DlM@Vw~?;7dRb|<#NAR$-zk-~#I?55Q`WhDW$X-W zuZg#wiL2M-Gv(g2Gee(yS9iVwMbXyfGwDh@sMt81a?0*0tGhFKCp%N^>dvK9i;*~; z;CF3vi=&0SYYn>PlGRZpDd0JmotUD9{c4S>|7?B%~U3Uvu)5Sz&7PGWw+>1 z9Fsw-NV%_EMZoL-?sj~&iq;S&^Prp8zM$v~-1ez(28*tnbMs})hci);bc^NEvQ#?S z6l;&9+@g2|#gbDg;q+U-c9kA=?lb{x*54TURN5UH zMc@mm>a6o(*^d!T=bYk@$j1JWe0ju5W}W$?(N zoxNRsEwN>oKTh^itFa%GCuKoAk+^;h+gvIVDZ1H6+1*~2NV1S))FjehDoG??D7%qW zYd0<}m7U~}L`vyWxmb4kkux}&Q@mKfI&mc8{dz2tES1}#Tvf3}bEJ8BfCqYiYKr4d zct65l6jkEiD?c|^6M(v=04almrjm{=65&+@Zw^&QIoy!tTFr3@QR%lnT`VyA_~%i| z`{lwl7D~Ki1nC*bjTtAv zS;udyMk6=;I?N%InS|S|k~>FZldkv)T}ORy)Ok~Nk^cLz;gn&*w5h~|oN_la zqmz-l0^IbKRZqTN#KK>JUyFPkALB-tN*Paio zk+a2t@f#uZ7R`CbeINJ*n!gMDl3C?*%`#Jc+xoiC24W0ov z_TCPDw~rqHpYrkN!CwOBd!G90puYiSrhOauRp1D}s{a_Unr6v;Ae_funkAn_hU4d@ zSuzK07aA(FWC6J4;}?K8`gk|EnUezfb>Qv3`c2>+K0X1y+Q&Z%-s9uWPhl({^zj_{Lq5I@ z{OdmcEcm34-vNDx;IkRO&8TPccv!9jx4^ym5|(?wJHTyxH5j>Tz(?@aD}J`T2yDXV z?XPFaQ^F4Xm7;J<_$Z_@QS@EhTFyRLr^_(yPPtfpk`iBDiynuaRK>bw#?mw(3|5Cu-#nh=2>-m>5 zlgJ+r@IwLqJtGXH{HFr-vjXs%@=k;KZLYnuC-Os3gnqLSGrxb#=wvZzs)MZsgJoXNR`0lbDJnHf&wIzF7G`*`=R z>`&_Zwe)8T$)OFS!>(=_mEmG0UmoyGM2*pCpEerpi%KWD=Dl`Rwx?J~y1el!)2&|1 z7SpoDv}{33-$Pl8w|Hefk32OoPfg6Ii5WF9sNp+c4MK>|dt)-Eo|9TDZpw^Vt7+Y8 zTDR)fcmiwDHbGu%LC&uQ_it)hZnP{nT9#L}aL7E5FQ=l)t5*}hx@Lw@jSfdrWul&i zHe;d9SZITVNWz;_m9*a;0EvAfP z2M?o{Yh;ALxdu2(5Yl$j;dayEcGY19B^p!i#?#cOezkX=QVxm|YeMBJ@3G4+^f;NK zslr4{ck&Ty3R;wxo=WAwVvaa`QIq8KDB6i5hnRS^fcFU7N^W zV!OzG)~^$Jm>m1a)8tu^zmvZKZ!PRabys4a(r5!iYem|KkQ-z<U?S$^OqJ!v4j;P_Iag9Gh`3IrI;a;{v>c z2tRJq_zBjphkhdDe#dgiy-37``~(pXjdO56pdSl}xX8a1NIw!l`mu@p9U=uH^n4Il zXW`yRguVSNze(iB#6FQDM99_RUO~A9#6=>Dh!=`1CBj}C5%0P+K-$X#Y45${@5H^8 z^?0X!h8+6%Uk>Un!nhD&_m3t^!LIcoGgxnQC%B>;VBAbbeMO-567KjT(b^~em z0U+&ui5w5qN!H`t_bYPfdx`vFyd!XLqTTa>Ay;HMF@<*_%hBf^B4WCU<Br0DO?cae(HR#Tq4A|7#ASp(oK#ytR+VrZYB=lUrC9Z zvCfIt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am b/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am deleted file mode 100644 index 47e7bf0c..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/benchmark/include.am +++ /dev/null @@ -1,10 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -noinst_PROGRAMS += ctaocrypt/benchmark/benchmark -ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c -ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la -ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la -EXTRA_DIST += ctaocrypt/benchmark/benchmark.sln -EXTRA_DIST += ctaocrypt/benchmark/benchmark.vcproj -DISTCLEANFILES+= ctaocrypt/benchmark/.libs/benchmark diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo deleted file mode 100644 index 2d819a1a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-aes.Plo +++ /dev/null @@ -1,117 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-aes.lo: ctaocrypt/src/aes.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/aes.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/logging.h ctaocrypt/src/misc.c \ - cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/logging.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo deleted file mode 100644 index 319d6f72..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-arc4.Plo +++ /dev/null @@ -1,107 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-arc4.lo: ctaocrypt/src/arc4.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo deleted file mode 100644 index a181e175..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-asn.Plo +++ /dev/null @@ -1,173 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-asn.lo: ctaocrypt/src/asn.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/coding.h \ - cyassl/ctaocrypt/md2.h cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ - cyassl/ctaocrypt/logging.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/integer.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/coding.h: - -cyassl/ctaocrypt/md2.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/pwdbased.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/sha512.h: - -cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-blake2b.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-camellia.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo deleted file mode 100644 index 2139dd8a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-coding.Plo +++ /dev/null @@ -1,112 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-coding.lo: ctaocrypt/src/coding.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/logging.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/coding.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-compress.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo deleted file mode 100644 index c7328328..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-des3.Plo +++ /dev/null @@ -1,114 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-des3.lo: ctaocrypt/src/des3.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ - ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/error-crypt.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo deleted file mode 100644 index 88edca41..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dh.Plo +++ /dev/null @@ -1,162 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-dh.lo: ctaocrypt/src/dh.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/error-crypt.h /usr/include/math.h \ - /usr/include/i386-linux-gnu/bits/huge_val.h \ - /usr/include/i386-linux-gnu/bits/huge_valf.h \ - /usr/include/i386-linux-gnu/bits/huge_vall.h \ - /usr/include/i386-linux-gnu/bits/inf.h \ - /usr/include/i386-linux-gnu/bits/nan.h \ - /usr/include/i386-linux-gnu/bits/mathdef.h \ - /usr/include/i386-linux-gnu/bits/mathcalls.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/error-crypt.h: - -/usr/include/math.h: - -/usr/include/i386-linux-gnu/bits/huge_val.h: - -/usr/include/i386-linux-gnu/bits/huge_valf.h: - -/usr/include/i386-linux-gnu/bits/huge_vall.h: - -/usr/include/i386-linux-gnu/bits/inf.h: - -/usr/include/i386-linux-gnu/bits/nan.h: - -/usr/include/i386-linux-gnu/bits/mathdef.h: - -/usr/include/i386-linux-gnu/bits/mathcalls.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-dsa.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo deleted file mode 100644 index a39293f2..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ecc.Plo +++ /dev/null @@ -1,169 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-ecc.lo: ctaocrypt/src/ecc.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/dh.h \ - cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/md5.h \ - cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo deleted file mode 100644 index a09f4cd9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-error.Plo +++ /dev/null @@ -1,107 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-error.lo: ctaocrypt/src/error.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-fips_test.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hc128.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo deleted file mode 100644 index 4a55a69f..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-hmac.Plo +++ /dev/null @@ -1,116 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-hmac.lo: ctaocrypt/src/hmac.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo deleted file mode 100644 index 0a569f97..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-integer.Plo +++ /dev/null @@ -1,128 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-integer.lo: ctaocrypt/src/integer.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/integer.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/integer.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo deleted file mode 100644 index 2c76fc91..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-logging.Plo +++ /dev/null @@ -1,110 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-logging.lo: ctaocrypt/src/logging.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md2.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md4.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo deleted file mode 100644 index acdffb28..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-md5.Plo +++ /dev/null @@ -1,111 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-md5.lo: ctaocrypt/src/md5.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo deleted file mode 100644 index daf83fbf..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-memory.Plo +++ /dev/null @@ -1,109 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-memory.lo: ctaocrypt/src/memory.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ - /usr/include/features.h /usr/include/stdc-predef.h \ - /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/string.h \ - /usr/include/ctype.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -/usr/include/string.h: - -/usr/include/ctype.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-misc.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pkcs7.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo deleted file mode 100644 index 9e2bbabf..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-port.Plo +++ /dev/null @@ -1,107 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-port.lo: ctaocrypt/src/port.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo deleted file mode 100644 index 7457b47f..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-pwdbased.Plo +++ /dev/null @@ -1,148 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-pwdbased.lo: ctaocrypt/src/pwdbased.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/error-crypt.h ctaocrypt/src/misc.c \ - cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/pwdbased.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/error-crypt.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rabbit.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo deleted file mode 100644 index 011ef052..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-random.Plo +++ /dev/null @@ -1,136 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-random.lo: ctaocrypt/src/random.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/error-crypt.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/error-crypt.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-ripemd.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo deleted file mode 100644 index 7986d0cc..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-rsa.Plo +++ /dev/null @@ -1,141 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-rsa.lo: ctaocrypt/src/rsa.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/logging.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/logging.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo deleted file mode 100644 index af387a20..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha.Plo +++ /dev/null @@ -1,111 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-sha.lo: ctaocrypt/src/sha.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo deleted file mode 100644 index 7cbbaf27..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha256.Plo +++ /dev/null @@ -1,114 +0,0 @@ -ctaocrypt/src/src_libcyassl_la-sha256.lo: ctaocrypt/src/sha256.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/error-crypt.h \ - ctaocrypt/src/misc.c cyassl/ctaocrypt/misc.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/error-crypt.h: - -ctaocrypt/src/misc.c: - -cyassl/ctaocrypt/misc.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-sha512.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo b/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/.deps/src_libcyassl_la-tfm.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/src/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-aes.o deleted file mode 100644 index 070f968f618066338c89c8ba1357e56808e28243..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16548 zcmcKBd0b5W|Nrr!P^1YVgb+efCWKJPnmv1#Bx^!tUsK7LvS!b|?|XJiWM8uH*_A9s z2+{ZPnmM^#pYQi}`~Cj;Ja4ypopUu1xdrY>_8V9wU{KJSrnqp4=7c zVHd-Sv%c7=3aLy~UAuJe7W&RQMK<*gNswc8!L}|@-O>+t$;rtH{b8Ywu+OJb9pS_( z_4*`rXgSt&&261^lWiTfU*g~AjcS))J2#yJwZXO~+UB;#T36eYYz_{8AFOtY)0su6 zFKEpo-0G(Ueh&R@p$u!e^(O>e$=5=tat= z994x+P7liU%usdeWxU@%ToKmaH;wOoGxm* zs<_Tf83m^#t!G4*#*?e|WT5Ud!l7}-p=XUlvudfshs%XJaiO8VZPej|WT*-_J=CT~ z&DUSB7iYeh8pg7ISZ~IsS?OX{$*UjHU+X0uZ-d7BnuRv$|F{{hI@RgEI`)Zj%nAJ! zr#W3x$8sNryU>1ex-SE(^-OlucqUs?ovE_!qVcq~pt|y|hBmjgG}Z+tTl4H#Xft@8 z{u#T1ay^E(Hp3}io1%_AqYIm%Y~&i!oz81h)v*_Jk+TgOW!&_8#;5T18g|v*aXQb< zSZeZUnxTjuG5!NLap0ibnl|Cj6R(an zJo55Pb1j;fgB+n!$7bg4D_cxtOB_QGE=Ox(!c}IRq-UniJ?p=5-YlJa_J8BN*}6Rc zh0~U58X9lWa7nrh+l&Rg<7uYhIr_;ixJAghOg1ySx$F3ryA!qe-tCwy6__xOD zurr*7iPjtaJ#gX`6)LaH>}eU*)?RC7+eVvV8t)YMHQs29rOcr-og(#nxP@jJk4aCn zm~EEdG15qmVT;9>bX}<2P-vD~9pS;LlTy@Sji}nmOv%BvW?C;>3*9mO%`MDgN8SEx z`L2`S59({`i|VWD3z~+SF23>ewq9w&)+h^Rgt5UNFBZylm~cS$=+*Io^)>j$*4#RL5Rp z!G@`WVvXECkGd|htp5Cw;asYUL9%C>ivMUH@4qQJXpZNe z#8DPysO5UNC3yop8LFNyHJws46W+<{$%Mj%x@eq@7y)O^WFupZr;&-q%g9W9Rl8rN0rfTQF_{SX zXr_~?Kz&iWP$mOTX~Cgp9B0DW{*O5@^qfU#qDA-(b$E}TIXO;op=aFw*KF4>S8)GrL_|?BHXQJ^i`}Tx=9Cenq zC~;1$D@P$n`{d6|p?#}6UR!VP_-rnLDd)0=C7y5X6NcD@IZW2YpSP{8ex~6e{K8q8 z2GS{Z0$<(;b!;jh5wT?zpJHBFKY8xRt3UG&{h1kQ+kZ`c_+cVNgNrVvw1NK&xdgqj z82vS{Xs2P(AdlxjCLVjvWFu$#GfC^GWP{;I!_7qM&!kP^!t6DX`}AIeZLMWd&Lz)H zSngKf=5BS?OwAO1n!Z_@_Su^JQDbemMQ80@?P2ejo>#|y<_K%;Rk`xF<{{7ZBNSayzhksvN11$Cl*y$z7t5lI`#q+UzwTBY zo6K9mnAJ0kS?;0Clevd7X8J=p3u7i1Y{xCzBKnVEK0E1$GR$zLVTY6}wbO*nRc1FE zSu~8ii)KgeR%cD8mpntRnw}|g8QL_ByUc#P`XT+*{?hbJmrvAIGRHSnhetC1X+P>B z=gO3Elvl~Ako4E{r#nzj`2lmu9ho?opOk%NE=e-Y;6x1jC+4U_|IAU$d;ZG2_xG9O z-1R4#Lq6k1$ad4~jI(k4>wFA|7ZRN{*0nYMwVC#6n`oNXHd9~HlQq$5)K|2_jkUL# z_u87M&ug2R<<59*wD$`!4H-Uj71c$C%f#el7W(HCS7bif;%H{1eB%0hc4UC8n6X;R zw3R0`A$Nv!_}2`{PR8LE3?DU{@cfyC#LF4~^P{HWBz)9#XPV>FB@+|h-Fe!i06;!! zCh)!E=FCoA{M@G|Y$#cJao?&9E)Cz_FvDYI`RzS^>{w{@qHWh7jy7LMjNLhZ?B!XN zJ@bCazWb`f-AmQaPH$eP%G~t>4z}*K_sQTgM=LKif9vrq?suQOV`?Q7P4^60zobP} z;`f`w-}IYnv?yjl@wAB}PCe+^c~Q;KlecbG2<}mB=+oBC&tI4`OnZ9F_z80|hd1uA z?D6O$Rbx9mJ6Uq)tn@)UY%UyVaCM4Rn`GY^PNiS<*K}IqF|Eshr{f0h4cj&RnDv^F z-_bQpzV{f?YE-FT9&;o7pF|(Zn$)?{&7kei^R^A_KDYdf>f5^xDqxqk&*=2QTFWP$ zow?DZ-px-Dc8>cto~m?om{DHu871D=u)a2X!GQ^z(?1pXy!QFf_E$0=_}xC4FMs&~ z&PlU>Z#uKGi-Yr;uAkS{el|Pbn6$4O>c0yuwC!VmxBRO|_w8g6aN_&y3XL1(f4q2C zzQ&JRoOs>tV3gPVe0|Q09(gOjaZd4${cV3PEwv=|#GT8{+_d9X-5-3SY092iI&A@$ z-lg6={BV9k%Yu{FrmCAxzECbqewC_1XHGY5^}a^!9ixhrYaiIl|7VW*uWl~k>TFaDB`3!A4 zu2+fDMXd`SUHJS}^)+$Lo>p`%Te3{iLWNDucb?OIIboVSUX7{nj z%Rc<-KW+W$DtW#g{}SkZw&9@W&QpK(9$T%M?onc;OGC2X$NFZxJbdwy(_M>j-==OA zmlU%pk{C9{woQ0eqhmLU)c(F}#M)}-+SXcC_Os)@NAEh%EPVY%{5by-`)e#aGHUCO zR?$T&4oq!%CNg_V=_cuG?%7Z2_Hmx3;<@&%BjS@>?*CqQF|uxJPVcjN^1|yw zx7NHpa(~gv*BUO{aeng@D~kZ%n3PG!8a^}~U*$@sRnLGthnBzFvb;m6U%;Z*Q(xz7 zGr4xW!t0dcAMdYtbM$K6k!^07u6}!G@}6qD_ib=;s??;qWAw(vxIydc)H~ijc+SsB!QS!`(&Bup)-hHw0nIT8)oo!wExvf7Pm{7KaS>@-)b*)|P+!qzj8J%ZK{U`g) zOk!RhxHm7p+d!YNOOr;$*1jF=?cb_t_rurW-x2;@;GY2h#qhrb{|xwVhyOzOcZL5~ z_|J!bW%y^q|1SKe!+$RPTf=`a{FlQ28T|9YzbO3I!#@%JZ{WWO{%P=k0RNiszX|_p z@NW+PVelUh|Kad|4F6d8mxTWy_#c4375rzwzd!sv;QtiD7iz`qpyBjA4s z{*~bW9RA(mUmgAh;BN%~nU-;eQPNzu>R~e7XHrg z9}E9S@E-zyU-(~yzXkl=;BN!}De%vNe-ZePfPY)~e}?}%_+N*=Km3=${|Edl!v75X zOT+&j{6E6~9Q@U&H@C{IA0Q7X0tPe>eP{;O_|k zIQZ9t|0ekFfq!xMw}JmR_?yGO7W|{&-wys>@K1*S3;36T|6%w~gTFES`@la4{toc( z1^>?Q*TBCR{3GE%5&m=FuZ8~y_}78|d-%J;zbE{gz<&b#Pr?5!{CmUS68;e{1+3fd41>KZk!N{7=Gv z0Q`T$zYF}k!v7ik)8PLO{vYAL8vYjWpAG-~@XrVT6Y!6Me;@eYf`4)N|Ac=k{F}jl z75tmRUkCr*@c#h+g78X!+$>f&%)mZ{%zr38vaM&UmgBW;a?K|h2eh={#)R`75=5*UjY7(;ol$rRp9>x z{te+j75>%Wp9ueK_-DZX5&Xm9UlIOA;BO26M)0o<|F!V11%F5QcZUB9_?LkH5%{-) z|3LUh!oLap?cqNU{_WwP1pjsLF9iP(_&a_)meqFZ_?ee?0uH;C~4I%i$jY|JU%p2LBZJuYiAD_?yCiGW_?! zzY_eT;Xere$Kihw{@3Au5B^Kx{{a3S;r|u>ci_JV{_Wsz4F7}hp9TN&@b3iwxA3n6 z|6usL!@n&2Z@|AB{9D4`2mWU8w}ihd{HwzM0{maWe=q!#;U5J5tMIP}|10p{2LF-p ze+d82@IM28XZX9pKLP%g;olnmi{PIJ{`=wo68`b<4}*U!{Jr7d9sZf{cZYvT_*aGh zcKEM^{}1@TfWIUB$HMfR|0D2!2LD;`w}Jmv_$R}^H2gckzYF{a!hbmY zL*Q=$|5ot#fd3QtPlA6C{M*96Jp8-DKMno|;eQtX_26#@|5NZcf`1A4UxWVy_!ofx zQ20N9e?Is-!+#U}9pL{N{E0{=w#w}JmL_-_k;gb_(#G2 z9{lUWKLP%I;C~(dx8YwI{yX4r1^*cMH-vu``1geWa`<i^Km7{71rn zHT?I$e*^rRz<(qB*TKI%{Aa*_9{e}M-x&Vy;C}`F^WonP{vYAL4gQPap9KG5@VAG* zAN>2mKN9{C@Gk`a!SH_we+&5Ef&X3juZ4dW{ENYVEBt-nZw>#J@V^27Pw=;d|2g=7 zga0r1H-dk2`0s}Q5cu1|e?9!m!v8t^UEyCC{#)R02LA)_?*{)%@UIPjfA}BnOialz za+^4kx@049A*YBNSx;7x5b~MaB|phz@`BVSGsp^3i}3%Bb0UZ{nM0b9=Hv`{LQ=^k z;zcHrXi}SOBBx0u(ujN@o@5azM4FNxB!RRiCd7fPC4-0^xle4#J~Ec{ChJIRGJ@zx z5~)lANf!A^29lX%2w6%>kXvK}@g|o^AL2)1$pYd}Mv+#eBl$(%lOyB-=}U@}7Nk4b zOrpq25=Q2cdt^Hi|B>W4xk(C=Z{#KELGqEqWIypB`N?%+Ps)+GHnOO}vNWCsZ*70Da2lhh&M zX8&;O~#O95j6eSj;yd*|>2Zq9#rHTKLnaoD;)`-`P8I zvGv**4GEnChhl%D?c-OiovgKyp1|7+d4es6d0_Ba(2Q|a4=4P6!o z2EOba7q{Z{p+jS=fBky4YvIC1!>UyA>{Yj}zk8D=Q}cfN_NBw+%c0)R&OQ$0SM#lGrqenjvf=d@CrvXih7q4z+Y;4l`+_^=5l`6I9n~<>5&dSPh?c&At)cNui zJh*&$Ez<%8%YTLFBC4T;Vf3{h(nRnZ@Ti#Wp z85A8JUgVmG$83x5-&6DF&1)PoZQAejjvd!DcXb_qboJ`WFScxH`?*u6b-&lI?-S?d zHhuQox%qZ3SkUD7%9Rybxwwon{_-Uw`S@|)_}JKSV;(%%?OUNjQ%4I6o6aiu7p^cnOW5-R;)^`ckdFO_3L+X-I67BE;nyJtA5Fn4&Be3S@>!5=B_iQ zPR(xFsL{k70|%ae)2GkT8l_6rUKAAcdQJcSaZ5u&N+osZuxi?)N9zYwtk`^N_3B>R z=gn&vI%`&;i!EA2R{QYb+|9#>hr3!@+D&-!Wb^aBeUFzdRH($*hYxo)eERfZx7xJ_ zwr|iNxLm=4mJeIEUQjT9elvet+g2~Vy$|;}eR_4k&6_7a?%2_6(|`eIw#=Vjf5W0h zPW4{Cys4Wo;ZyB5Z*Dg`e_q$KUcG=rBSt)kjEc%L@b>M!H`=$4dAfCL>jVD&_kMKi zwxd91=I6?9-(K78=XY_=#EF@yyLPp-GBL5Zee~$aS>wm2kE~p|O`wB=x2?6cOU9;6 z-On935Y#C#aY?0=luMHzKVBOX9Gp_2eEG(Y+qPZ&=)?)1nL1tJ@Y%D~^G1z&+O%=w z$!8889KCJOpv(7KwVIdD$S8lFuV23vH8;0j@8fg2U!6L`zIX4w>-v!+L+8(&S+Ylb z{IaTL%QiT&YE@O2XV2~z%gRdIzjSF0O_3rMj}0AqW7PfoTeWlM6xbXct%+T+qGrW% zeYyxu3fi{x3lXwF*$kT+{j3ythH-c+Oua;wwKqIJI9WVXi%brJ^VMqKMelM z;2#D5!tg%<|Gn_{f`3Q&8^M1o{HMUb6#NIk|26!V!`}n`E8*`3{|NXOhkqLUFTlSL z{NKTUF#LbP|1JDa!T%fl7sJ0d{7=K*8veWBKMel8;O`FqyzuV;e{c9_!rvMGCh%Vf z{~-8xfqxVDo58;`{QcnH7yfqeUkiUV{13w46#jMLzXJY^;9mv)L*ah~{;T0%2L7wy z9}Is7_}7I0KKOrt|4;aTg?~Hv`@sJy{3pS`G5klve+m4*z<-GNhrd1i`@_FH{LjPx zJ^W9?zXkm7!@n*3pTPeX{8QlH2L8k0UmgCh;9mm%XW@Sr{$1f84gYKKw}5|s_=mth z9sbSXe-!>N;Qtx^zu_MT|Jm^03IF5pZv}s2_$R|Z9{ywC?+brN_?L#iIs8Y!-xL0p z@UH{^TJV1c|8?-c4FCG@=QB&!Pw<}s|CaFI0slAfuL1u>@LvP}rSMOJ|1|gyg8x+b zZ-;*<{4c`48vJj<-xdB7;Qt){W#K;-{te;Z4gT%nUk?5c;a?E`{_uYZ|32^!fd5DM zZ-W08_-}xJJ^1V3UmO0-;NKJehu|Lx|AFwo0sp7)KLGz9@Gk)W%JAO}|2gnag})X2 zZ^M5U{71q+5dOCC&w&3q_;-STCHPNL9!2dD)AHjbn{KMft5B^Qze+K^B;C~PP z`QV=i{zc)x9{&B{{~i9<;Xfb#J>Xvz{zu^N0{>$0-w%Hc{ExwZ6#TXD-wgj)_*aDg z0{Gj&zcu`G;6EPz6X8D>{#o#!4*!zye*k|c_$R{uF#HqXzX$%~;9ms(eCFPg4gWjv zZvcN^_)muaIQUP3|0nnlhyO_UpM}38{PVznF#K!4|2O>a!hbvb$HM<2{Aa-b0{o}I z{|Eeg!oMZ_)8W4p{%zYY{J+8fGW?z4 zzY+eg;GY5i(eS?qe<%1ChrcoW&%wVE{1f1B1^>nH&jegMU@{ z?}Pss_?yB%6#n+`FAe`P@DG50FZi#4e`okNg#R7*?}vXi_`iUEE%=AQzYF}6^#0@R z-^1Sq{@L)~3;*8m9|r$R@IMLv`tWZ9e^2=Lfd4i4Ux)uk_-}*%Pxv>3e>?bV;2#cu z5BPtFe_r@cgMUZ(yTX4p{I|fr6a3f1-wpnA;lBX>E8*_~|1a=A4*yvAKY)J)_*=j~ z2mYVoe*^wk;BN;1V(@>;58?k5{KLGzk_@}`CG5mw!UmpH#;eP`DI{43q|0wu3 zhW|nM4}yOy_#46hEBwvj?*soj@b3=)Bk-RI|9JS9h5st}KZAc3{FlPN2>ge_|33WZ zz&{%PE8t%a{t@s`h5uFfcZI(l{FC7y3IDb5*TTOr{7=FEHT;{xe+c~D;lB+2HQ}#@ z{~q{z!T%WiOTgb3{*&Q94*rwi{|WxX;Xe}oXW{P%|2*&?4F4MN{|*1U@ZS#qvGBhL z{~7SV0RJiQ{{jD=@NWtKbolRt|1J2hga2;$$H0FB`~%@12meFx{{{br@UH^@y6|rT z|8MZW41Z_%Z-oCV_-DX>H2m+u-wFQ3;cpE8bMUVO{{;A3!GAIQ^TB^P{0qRpDEz0x z|2h2A;9nK~``|wY{-*E`g}*)gOT)hm`~%?M3;t{1-x>Z5;eQAI`{7>={x9HP3;tp7 z?*f0lfB3(LzYYAe;lCIDz2QF${+Hl?68`n!-v<7k@b3ZtYw*7g|BvwB2LGS%ZwCK% z@YldU9R42g{|^7W@Sg_%j_`Md|7!Sefqy6XuZO=I{O7`d0sL3O-v$0(;C~$cvG9KY z{|fN8fPW7BKg0h9{I9^@4F1L7{|^5B;J*a^&Ea1X{%7F78U9n@-w6H#;ok@TrQja~ z|Nig~fqw`1KZ1Wn_*aMjJowLoe+&43fd66mTf+Yd{QJVc5d0s)|0(=y!@mLi3&OuO z{PV-#7XIGwKMntz@ZSOd0q~y>|3&bB3I7T3e*^#X@UI8|5%7?am!#@)KYvHeje_{Bag8ysyH--NY_`Ab@ z8T@O)Uk(2~@b`lMG5D8|o`Cf5q-P*~IO+9BUr72c(u0wHp!AHSCnS9a>7hvPPx@8T zTa$j1^!=o#A^imD%}Jj``a04pl3tMX(4_w+eJJUBNIy;bZqk#H-j4Llq%R`<3h6yc z|4RB^(r=Ugq4Xl9ha!C8nZKLwYsRFO;63^oFD-CA~7~{YWoI`ZvEB5& zMtX^c&;Re=OV3GqQqnh)zN7S2rOzq-D(R6*Ur73y($ABgn)L6a48DDcRQf>D zi<17C^!cQJCcQlAG0|e|D19L5B}vapdQZ}ul^(71|D-1=y+!HWN)JhTiPEc-UZnJW zq>m-NS?S?QpG`}pwj1({vYkH{?Zec zzM=FCr3WbeE9q-WFHQQM(!-U$rSzbr_bWY7>E%jaPI_O`_mw`R^gE?TD}7Dr-%8I_ zdco2Ql^&z?0Hs$cy(ajnX5N{-X4DrMD`5Z0QY4KTi6y(jSywpY$`OcPqU( z>9a}iSo&qs6O>-C^pT}MDLrWEaY`>ydX~~3l>Vml3Z=&=y;SKTOAl3gztVe@o}cue zr4KB9R_P~8zfyX1(hHT|uk?hazbrjj>2pdyUHWsFxRfey+s;&dZ1O$(<@%8r!7;H1vFED86$N(FS zgL6%%G5ViqZ0v%41_#yZ?BVI*-o>Mz#<|v@p#eVr)oknr_yqY4v|)Eo&u;DHm})AO zL!h6(L$KfYV3mXK$Ppv_0$3Oj6r^$p7#Zy6(6W8knnA%nzQa`xK|_Lq1A~1Au#{UT zjL@$KjvVL{?4xqff9D$izrsH})ZcJ^Wp8Kd5%oWZ>i=9)*~j#s&8l||`L~b!P`1f{ z#|=bSx}O@AH$%3SaP?IYQO`-4-2wEu1T&> z9v}^0x%bMVYB~q{%Yu^J^X0DR*1xwKt1@z$=l*~J%%jSua+h@(Ol93w))^leBKi5> z`S-tEmFxNYiex=^Gz~`?{jcM5pOW047f^L&u?;s{k(VmUE4F0ao8=FjO4fZ@_vaaC zN0s&BREg{(>*Wor`tLGMb^c>rCzsNh;bfxfkT{DK^ORqlR4UHpRE`b|*v zYw6jcsk>*t4lP=A@$l;B<=)iOqn~Po-w5AP6I6k|BLh@kek!klazwKMz8(SkGbwA$ z{r;?Rw$|NL@~9T%TMw!+7ZXV}VN3%6{XNI!CEnl$s%x z{mhtMWWSn9byKRBQe%|5SE-3geWcX294p5kQ0g(M{Oq(+uPEDZDeK9~`fFwVyRvS^ zwa9sjN#*#`O0BGHw^!EdDeH}ub@`_va@;_r4p+7ZDs_soJxp1jtE?|p*0(6@$CP?n z*?vK(x0LM)4IM0r}PmOsTVG)I_BwDfN+3vy_^n z)Pe;J=P#~QYo%6F>UgD2Q|d;g?ojF>rJh#mE2X|u>Nln4Wg?XOsIF8erMfCr{wbvV zyt7h=DK$)~Yn6IZsW+6GqSPFv7G<)Q^Hfo)t5Ultb&yggDs`q(S1NUnQqL>3C+_8a zsK7)g&ySr_Yb&*>QYR^OhEg{ub-Pkyl^UOQ4jRO(Zuep6~e ebHn+|Db-P_EtT3=sewwJs?=zuZdYo8QvU~tz)pq$ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-arc4.o deleted file mode 100644 index b7f43fd5896439e83a1e829a9edbf893a9611ebf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1228 zcmah|T}u>U6nv3l$@_NDrs+VU7r?S7Ga!@Z;S>0V}#w=!eAB@gn_ zctIF?jy>trr_@f}sXV!*++01twd{Tl)R+*4Wehz$qjr$mvmBFa4+NoB5JFWZ`1gjb ztl+C2QhR!U=U!6#nA+K1-pUT})^sn=9Z>sV4;WXn?R@nsH1k`lBsDot?YB>gTxH)1 zTC?2ltAH~S*U=P?_xan}I|7|u-8~n2DOt)@N~{vn3TkORbWbjN~R?xo`~c(N@`&w6waxpz7_(yEH7Wjnh`=oLobL-zt4!Mm5W8a1WwL0 ziC8K#T};g{jhal=?h?_wV={xOIq*EYRdn#0%2eo6Mk{J2i(PH5{#>sO82AL*T_(PR zy6dCyyFPL{T_4RpB!X@XbI1#TPJtr!9$W%Ji+KI|A%^_(cyqwP7JZ;76990oC+MSg zgCZ{qin0h`q2W4T%%NU%trLXLQw+9<2jOb|tPRu1Tlo)f9AbP+{26TM1>i1FJTKfY zt}hPi?G;?I2?-e;SG>6%_H1k1PrlU$yo6)%_L}ndpN;ccCnEMvzft2O|JHl2z{_`# z32+~SnxK7fg2P}@FoyWDgBl;)C()Q%){L!97BLMiq8eI4)QBigEzU)iC`kfN>+G7o rMU<4hFqxE?N?BaLB&_pw+Z1 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-asn.o deleted file mode 100644 index 0709441863a97ba1942507cc116f1018bee7e92d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21760 zcmd6Pe|%KcweLBT2~2R{j2boCC{d?2D1`)qCK7A{lMrl>R01NVO+qr5=n!IZM!*}* zgvpQ`4oAHHYCnD6immUq@7Ail*NfOEG(k;3>kshf)mClmZ4-iuR%yaj^1k1_&zT>A z((8Nwy!nt>d+ojU+H0-7*4}IHbB4~c%5qgz(-ixoDrt)9Ab<~FC6NLFaurSSDl3*> zx6%ywvrLcGteVySoTArvb&QXXZCZA| z7M@(YX{J)AQ{VQ%PphEkgy{sIh;H;6$X!?>wg-%*Wfe^#W}leb4l zO}GGq7aNs+uT|;K2J`@C0lE#he`q!+VtpHZ;8BR7vyD8IvW&^bk?6BIknWkUHe~*P zW5}nE|D7RMLSQe1@tCJaiqCfK5?Wjk>6oLcyV|MI8IaMZ?bPSEqI=U|)YDDnd(UuM zqKC6nj6?j2>IQRAdd_siLN>2J#8Q! znW7%2?TtK4IBcFRJmO@!U=qQp5X1$T^gL662$_Rr^aVxCu9V$l$)Vjwv47|{U((dV zfLiY(QsGQ#i_A#z2G6o8z>>y?>m(-LNEqBA0xxWoIfda2ZS#054{Fk$NIG1n-I(9WaHCFvCCzQ zX|dJ7BON|fwS8b2+jW0ov@gw22e(9E2Sz_xLJ|)oBs=5fp$CN(_S`~q^`6UKm@})y zCn!7Msc;hX5FynrXtmx?rBy+eb273@o9u-+nNS5jmcs4pHrc~*vXYZ=J8o;-6DO-W z8QGhHOz5$3h18)=(0z$-5B&<`3oU*DN@Fb62cqJQmtvVKjP7m49C}G8RL%4c^@6B> zbo$q6myyZBs0k+)ql|ofGGDfRnBD<->B*czAN|e>VJZhJ|gi zON;#qSfry+Rkhe-C~^Y9Ot?-`JUfgYv8~f>^VsU092uJwE-0DMNl4&y$~-34spVjr zl_sUjLPyajGUg6nnKW8T$9Kj=$Me`x9fg1S#8SX@1xi7b@r031ZXHIth;rL9(z$J` z{8g|QLA~)>dara`s1{$(#2neN@PSZc7pG|B#nAz-^diucY5G9p%;TxT4qZ{s9 ztDs~j8>?E%v*uLtzb0nB4L9PUO64XghBSDh{jRXVbA;q}A)dfadbbRw; z+_@1YV@n6Vtt}CJuN~a-k!VEWh$t9tKf>Cx4&;DBF5&WnTSi4Y`F$2IA>9(6!7X3d zbycf)iZ3?yR->pcw`8#j)Je;<9;7tdP$U;3Y5cnlxC zqe%^GW_exm@XEM5ZA({_k;3M_Axs7+)te7ATHAajAHowW{r;^>UDmz6x{>kmU7Vs3jXhtH zJ&&NLF%W%8)pqW`dH)pkfVQ)Go?>mA(l{zRYdb4*U1%}(MxS>hW6MpmwoUsOTN*g$ z82!=x>8LylEgfe~TB|)fsNieB#X1*D>~fZ>3b`>&&$4G-*MJtuzHhR-T>$7v(ivH2+oyLS$6=O-#M^WJN^p(Y_6Tv zeqa7kCX1`XbFeX0IKF0~0aADPn-u-Dp$i~GtS{^v$rw6Q6!r8yB7Hy}S1Iy1o)m7$ zG;hl+I=+i7+V-vdj%~)bdA)D`YF}rEgki6Fy?6d#$o z%$Pr=)0N-HP?4@ylj3T+ztwt_QEzVH3Si2(=MkdAU&RbX?2!n-oBzVC&Q36=GA|N~ zg;DOE*fY7;Jke`oiFv0OBjB%6_Zj6r*~MC!gA{Q`cxJTUWh_;&G{;B#qwMFAgd;vN z?l2efLAqv=oMLms@`K6C;pDxSkaJ@*8nc}Su^T^^zd!orbW~S$7D7Xj1Emo3$M%OW zkSm_xZ0AU#^P@X3cK&{w9=W2Z9mQ6Z%@i~PtyX!Kd8aVs{bB*FMi%AlAvils`;11^ zdf$cp@(&uH4E+uTR=g+-I$;K6rYUWLF{s^teiEOBjV1XX3LaHh?~TD-_)%c6}=bEA0wVgxFhRBIy`BGzfPx#Xb}%o|3j}ouGLl zWwLReO-O;P^oAqSo<<5M?!T$r|@!ApaYTz{C_xv|gPHJt*Pj@x{=14yjhGmYl^ZfmAmH-orD-(xldO z3>ky*KCodfE;|-luJ21KZ6>2-9a`v|tc(zu1 z)ZS|U#gXGHwAho-1Y7&XZY@Tavc8jM+%M>=RTqfzqWx~^hbe;<#vKOpoNEuYjYDj5`{OkV0tN&miA`U*xWXZqMvR*DM(R4OHpX{r=K4-cQM`AhFR@;u0WfW$8IA zZ83sQ5U?OFS<%bdgMC|(4o8k%s>N=AWHiMVEmno1b=|b0=YOeox_bM2EB$BEgS+=L ze-6)}G;0R~9&h^se0v((g6)9r=1^%P1q`mMkM>W41i8q$Jg};hb7dl?qKv8TAVjei ztBf^~fA)cKrcvtFy1z{!#e#1~0(VUNc7UW?Aq(Wd{fD{GJ>V`>kRci_V`Z*>WADD< z?HH{%U5jx$fRz5CecJYeELX#Ra9l|3^0qBt5hYJ}-I}0Xb~o3Dt`TLoYj%6EjYX?! z8mEBkjJDkbn_=1rEi(}gxt2TkRD!C!7Rb%-W8_F1XK1l<^rwyQ)?)Kf?C#TIa{;Zz z>0(kKX6}pw6#9I7pn-tTyb~=FT@dzZ#hPAS$VDIl$B@^uGPyJ0MP$v_evf%5!$n!gTPmd2Ai}#WF^2`ZV zsK`GW9d&CxAJOMK{FN9s08S-lcNErE)VIdp7sscrv3~-Ew*7~wjE=3+V!MIv#%W5i z#PJ43%pT4}U044`9FwAB8CuT|fm(tMq9S|uX&@H7%x$8J`XA%JPwM<8n!CoBP-(F` z^c19tcF}$KUqOT$*0Hj1@ou_9qJ8-L@&27fU1L822d(=e3N-d0%drdbEy+h7>l)jJ zal#iSy6@&%IkK{AYzrGSoABKHqrJG<6b)<#Jpg zS8gkCmCN`X*D2!49%Q+WD|4~7^ebHI=a|zh?(_^+F|>WzqaNpN%}f!RQqbZ1;VNBY zJ7A{pAML6rs-)j^r1;Gv{=1;M`Go%gf^Pr41o!%X002Gay0Lo~K%RM6y*!oj-WsR}EJLZ=d_8w~t#>RJX_to3XvO05VBc%{>+ZU_oFyNky zRkd!gtO+xqblslKPzaYqan+|^X_oQsXzq#pE<##wF69EA!Vk;yU>P1!K&X_5GhK%d zBW9E5(x~z4m_ZMwz7pl@5Mf2V8%<@mgyKc+L`0p-42ztZBK*Fd`uiILjI8YqVd?n=wpl+PyUQ>`y==s z?Dik#F!=0V&R*S{PRAy?PwTz~&~6p_{0^6&Kha_@ff8CbVIt}<<6f)VPqlw#kN8*(9Srkc9k=`5zWNA^CiQ39r+lLui1dXd>&b*C~0m zztXy^PnIgIs+p(=SS5Lop#)~DqB6!y7_Npg7++dX3lWD~!N_`&_5f9gRKt5wCHBnW z%_u?L4_J*4db^<-QB1xuY#bZv$(E<=Z-Wx@&}{I^Cd#?ypMW*N(@P3 ztNlKzXe6p_2KeE=VV892#>9h)BhaYFhUJROP(ES)G|8SX^643?d^1<(K6$6>j^)7 zS&MzflZUNNz+Y|6RMpqvwVZfpEc{&--E^Z3ErDrSjyj*b5jpy$X-`%0Y9pvUzjEt8=n;I!$gs@aol)W+gyzB8U9Cv zc@*(X%JA!$QW4o*Pr&Igk=1GUiVh~kQ1_<6ZH#|>98JT6Qx#>wPobBy7JRO4e;(+9 z?fBBRzl`r_Uj!GiT2B*?Mq=@ZX9@#7uYrkbJ|Z2+Jp<#~b29`%_+ccYNKAT(ff3bL z;89)+#Hi;|h9ap@bi=43g0Ff{+TnW8W8)!Z^mwKgi(nH@!+^krHqX&d&A_Eh?<$N^ z-=~_-eJQ>wFZB#JWftl_#wtL@*Kg1TMJmkRC^Ezg414ar{GC)ONNh)zE zBUTt6#s+br(d+y$|5DEOxb>2DPU@ti^gziNi2f zOEJC9fjA3S6y0ot{x-Z9`vA>3KwNB z)bnX>rm@gNLHt_pLNEAKn<@^KLx?VLN5GCoA+RngK&cG^UeB@;<9EZd#MUUYL_tj8N z{R<>+QlG(hNZaYoQu~atwMG{oxrrdOCB{}zV0rV^1CXKGcpVeL)qTaX7SA8`wDi*W1!seb_dj6S<{ayYQy5`zLIC+D|qq*DgkxTkFnY zOybVS@=kMH3yX;3R>D`!GI`e`QxBuxEX_4=m)o2>On0ZS#hbO*b0{YX&7;@^8#zLM z_8(H{(@rJyrI+# zQ#m?vU6K;szpcb#`Cy>m58wqcEY1{&OEY}5N^WZd)oG+ zjIe{)3!E5AUE)83QTc%n9+4#{J0NP?mqaMWmw3$TdfwNo^YAqoE3$VhHDKNK6K>UbW@*&{1J*rkXpn*h5f^Ii?^;M2#3* z2B{dE1}cz2+Ww{-`_8|^x#%l%KG)`4a4OEYV|@>6!B>;{*KbIf-)087O;{F25lPiE zhWRwt7TW~KuB=QST)Ro+Rrl~7L)|yr4lvL&OyuOg)(xNK2h$j_i*`Ce)b=$JCHvY> zY_S%}#F))8(PT+I;%umqVl{&OA4Gqj+^v~gJg{hce`byj5?8y)ttUce6-cMjv zH|_-JnOgLpq}TH7_k|R|7)DvREg!S$L+^RzG4Q9L1QSv%;4}Zu^P;1R^_kJp3cQLZ z*AU6vHS*8`Ua*9Jm{RQ-*_whQs>G3HnHJ*ogdcmS`njTFQyhPMG{ zfFT&<6Yr0)1vbI}LyZT;Y#MxA%8MXz1%Y|1b1o)gAKC}OO?)LbREMFuzT~$S`xACv zd5dA<-ls>0Rm`4NesAB1Z=`fQ(fyWY;^h<%v@$-BWxj?fOLy9<((AYDwkJO;=(0TJWbh6t7)-I zD1Xzqu|89M!`M)RR6$;1bqks2FV5QCB>XgR`fDU_iuD| zG)BC9to#c1)5+$t#EqQ2>5;_h>7#5iyhXSpKj6(9mX=<01cv7)id*ZxO$^H20tbDo zN8C1{8?^(0ZAifZ4@16TEf#CWNn3XZs6}@n7-Ha6<_51>>oY5Od0AufI=R{`aigWl zyspMv%vb#y&1G45boLnEmP5$Y8NZwHd77|Z*H{ngIxpxNO9#|1?Hc1bMZc(Pj5gO| z^Wfqmde_)?)`q&qIm_?m50M0fjgGWRr!6xJl$}N zuCZR|7G8#4;-H%}R?;}4>C_s~G}OR{F-9sl%J4Rf0lQcFtGf5^7BLnW8eR{Txl|!I zM<$~X7jU==E#!~`4zvlMcy!?nFJ2py-!9Z+PA*3^QVO1M`2j_vSipMhr<`?kN9zfH z7ELE@W4tJAZw$i-v7_i@^0~>AzSqKMm zhb@}80$JN6UDBNr-3cP!+o$auN)Bb3&luVrl+E3I#dG(SL=Z?HljV}^kx3w`F*Eo^ zE>9aDj6MimYs?BRB#mYXZ};o)1}Q+3qbfT>iaKfs*a*lq_9=+Nv6_b7fn7L<^C|P? zc(S@@n6GMbjAESBsgk+DkB1iB{5j44^?2Ye$Gh1c?*&L;kN1XsvthPoahxC18||xc zz(({WUSq>18&=w|j&N%^P1``z4gfWKXiMBwp*uCzy2Z89c46>qJX&lDM_(xy;KZ(D zFP73ckU$IcI~-usD)E@lT#Of9VaX=(9+_75JS^3ubw9;XuOY)4^BT_RDjdR9EFPm~ zDJO(i0r9v*ckwC~U=2vcgxChE9=aNmqeIO|bFnKNG#BG_TW7ZFw6X(OVe0g2}d#dcvD@cL(+qE7~>RP@UL@G>Z|8bv=JpiyE~ zimriSYivLKA*7Y{<2gK@;~&P#EuZ60c#=No20QyT6Fj22Vh{-Cv;?j|P$2=AIbg_$ z2(l#L>J2QLAS#}_pX}{rvmCFkBwm{~%e|>6?(t-6ACeif94{|Q^q0(Sj_Om*sN|2= zv&Y|$inp}oBTerR8|>es!2o{cj+w~BbMikl-H(CG>1JyM%ssRgu@S?MoWdUux*ubg zviTvuKm2y|S+B4NtmQ$tx$#^Y*Z7J)W$mE4BaO#CWx%bvqWe?;y!E82(LUERC%zhw zcYx6KSk8v;z~Z^!mNTHZB1Ou^^Lwk<1ztg?O9H*se*Da99A?jo9#gd*z8)MM!-10Pz}BToWNencKr(*t zxjS+rV^2HYob6NQb7DSW8sxUbJiX?VXQ{XYGN3+uhv*->xFlwUlX zHlNfHvQ}UoUSP!v(!*VUWRlVI85dIg!qmD|HS)JAco=iBd$?HLbt3{%>-l#uGke5= zM{2}0MFt|ySH`n(ZM5F4B*jB1tMo6?(KC15jQ$%o$x-FONj(BHbE9V{)=-r334eHApd|kt!98j6AN&0O__=Ianrkw@&P!M7wp6IWG`CAl6kUm8TDo%S zmWnNZo$5-Dm(VQhRMnj*#@ki(v_!2pQJk76VyxMV7AUhT@wW_rc$ty!Hu7D^HlTPr zlP_xWrOkGrc&~7QJ!0BqWyP9siyqEt2-UaTm~(5et-X1DOU~R`1>ejMiaKZq$`o4eQsf z3$~!JroCO6)v{g>&RTrUif^{-^$j;Gv)Y^5^)|hJ4N4B&v`*mU(6+v@UawbX$#03x zYG~IBF@R_yl7D#|1CRV!`Cr91a968vS-}BBdIG`I|pe|*anr4NmG zAS~KQ=fNMU1&;6#pUNa&tZ?`-{UH6{qgw+Sj(rCH_^ATFJXsXq%x(C$7=NTgIEqgM zbUX_G*+<#cfBNbe$~NABS!}aK|QW`l1B( zfP!30#h)`5C@S71XmgwbxWkWa$)DtUxAMt2&+3_HIuxqHJBpUG68IUw zwrJ@00K=fv26F;P+dM*C=vX)~QM{l-MUyT#5fP=nIqZ7lE%$ z!jA#JHwk|N{a0}k#79-$2Hu#2(_pPh`1xr6NmBo3!0)!Cc3#|TcqPT*$Cqd}bMnMT zRdxVhlVhWh|L4GsZzS*+fFHa#fsX^I@(v?NPa~u@ye@daBq&xt9ZhFliDA_#QpekX*2eJ68MxW z6y+M5eluVLY{+v2+gAYpKFYtb+nuH5A8fn=kWV|nQqX?@eq-SGmW@vbBrSc4{7L~o zO2Xeo`DQrRnBD#m`j>-Qjg2=#-%G!yC~w$!3#TL-G_V2rZ3Eg0+x?pI!d^RpFNOVn zNP6JB0UbXFF$GBa4!{?HbKfT33VaLjG8+#7zvFED+4vyjSp|J&+4yR-UkZ8$zXtdh zpm*@sK)(g_j=s%kUzJ3^1AJzK<^sx#@s|QN!Yu}E998iT*O6lr@GkUqK5UvnRA)I{~klfUli^^I^90p?u$%fWJCny!{jK%bd=D?9U%RJ0Ie; z6XIv;igI>SB zp>0#EKD)iGVRn6c%d7@vaZs-ew%n*Uv9vsROE}ol5L9XxS1wyvT3NfSynK0Cb!~O& z!pgE*Nud)g-Lz8X-9(lkV_w%<+uYJDU|X=hu{PY&-h5+Au(5Vca|;_ALc#hr5|@T< zT)(7IxwgH&s;&9fdOi5<;HE&ZVSQszsa{{*R^QmHBb~1gDeHpk)~&xaC@8~gLd^{c z!a!4Ud3jI=sw~0ql2PNLU>hU}u4@nKN_kr_SQ^r=sb3dtR~BumU%tGumUW_mwade6 zbl~lxBALOg%0*R6^5@m&DNZRrUYetnr|8Y=g368S1YpHt*gy}qRX5eQ zD3WFMdddhxBpar-z4^8vEA{m$^_0D#bra1+2?@n8RB?Gzy@J0LtsI=Cavp6U*usVR zg|%~wP`bK$35pb3)Xm9v^j=yY3axL5*W)Z=Q{aqZ_os@I)7*GzUc7XL0%P0mf>PXF zP+r!cqe5?MZn=>}_(!m0T`Oh|et~k?#za|oK|t`GGp}~;9F!n6ic)G6=CF$-!@;Y5 zLI)`($&%^THO|{`?efyvII-lJATCH{no7KIA^8<1k)-ev&H2Itwpfk9_C;$N?7>o` zom*INLN%!8o{W55*2PbQdQs99u)BxFI^i9)$7fOWVrFNH8%wtbi}{VtFZR+ z0(<5QYwcM=0ds0M=g+bId5+`HDCEzxodiYUIj~S+ZBe|_<aZwFa@egw}5ew$(EB4eSe3kRW_v!+*veLHsQ2-)GA+GE>e{139mr@PMC*tJmJNPazA0AqUeqh%R+W3%-pOG!;R%6aGzK(M!Y@6YSy`UreU1r02Lhx+?4ePhs z@CicHUwnzIUu45u2vOe*+i*S~BE)=t0GklchOLOtBEWjp48bdM8)?ioVReN1>W?s#A;cPs9S2-kxzVH503xDF3x2t&AUA#6~TnR5V} zaXuxy4tfzn?#BsRkl$l2-M1>rC4@oP(Z&xD;_|5!b4WN&2)Z?xBjPXG@LJ3*=iz&R zwA*7gzLz-0KVZW#z%=0JULoo4vEcw9^=Cc-p%H;{ptN4P2(sPqx0<6et!lA>f0q8;v{WMECoA;cQv zCp=Bw7i6F_rdP>0UEcX+oGH&}8B^qaNX8lR9wB3@JnOPOKzhIm8&=w|%7)d1SR+;u zYVu5(0paS1BUTy-Arz)q$v9h4LWGC~xPX8#fsz3wHrhCrP$dJ(L#Y8M! z%7yl$-}b@8f4~op7?(7C&ctm_<`= z4bU(7g&T4l*Jx>2u+Xpk1N_1!K;`xse(76q=ytgU?ic7@mt6^5{~0J}mM6QknkT|+J%czcwH;bP+8Mq!8ZS%REpNJ0$2UHe0yK1n|{8yF3w`* znstQU3Lb?9*7ENr92ig=f3||X!K<{j^hbcqcsOtRn<=bPzHKj^zn}w(vrX~+p$tba zRX2i_c4y@T1MNf|ki?&UyV_jF+VocQeZJABIeS&Km)isK3l{ouOgL!`gC~83ujv2m zbed**jCgJ~bux$UR6gr_HF4tPMM9o|O*!m)V))6Cr=A}52OvTrj7H1q^ajpo>N4-U zi??*|@39`}z1wzhH-FE)efQn}fc?S#hlGa@J>qaaI`G(_%RS_I+)JiXrJPu@r?bi2 zto>A`P@K!>>|U2|&{L8#Ub{m~&KBJ-Mq-iBWF+DBxo75b$*j}vNF|GzX*Z zjgt^pA(M59nYTpZO6TY2GdXZl#UgR#@?yp{{@m1HQB0;^C$8daMX?|zQ{bug^t>Dw z^3zE%NnG+1@8JItJO{WyM6ZzX+nj;VNflOckYiLqut8YhP%z9Pj{`jlim~#klXH7& z0W9;-T0xQjU%Y35gZ0!hSnqj=Rlyue7byBe7=T;@-o&meKQV`TP_Z%yk5P311yJk3 zk^DUyrjYl7!a<|*M!{ESLp%%{`XN{oDDD^Tiv`pRy0_J@z&iq%Dr!A7R_$J#CD%KC zC4qau5Ins*^3T65_S@SLWA!w5*J%H>UcCis-au?hdAt+*H4Hg)r=9#>BrPWM>B8wZ zM0c@}cBk{xbGcbpnvB66AND1}89*{5F&>*33&j!>(dc9(o`{FWVvz*F?_k)cP@pak UYJ!dX1gsJINs7Iq*dG-87lTS}u>b%7 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-des3.o deleted file mode 100644 index 8360b569a29549b54d1620fc0953d39bdf9dc909..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6292 zcma)AZE#f889uwYEW5a{Hy9v7l&f89q7ZV~2&l9MB*BjbltgMPnkI2;9gw8S2BkyW z%`9QKE}3a-Ew*FrOn+*BI30$uEo1ivFvxTus8eR_I2E)Spvu=20nzk%-g7Q2U~Nyh z_x*a_k8|Gl-d*-5jp?RPC{(7*3aK&`3Ix#MiCU-^Qmx`DrkYpWKSJ^0z8&-{v?Qwv z>10J=QPS=&W+xW1$;$rI*>NWmcI0HDTpcZkcKlF-MV}$wRK93?R&vB8yVH8~;T`a` zfGS6vX#X487<@zY-EoEMjt85+wIctoD(`RJzS1g&tmM-OH*$V-bky6`|M9DNFo_M{ z#b&&0(sqjj&oXmj+w7&@iTuH_{ugD5ZS`~ew-!YG+@dk6VPXEvyxw=cmB~u?%|BN` z@3kZ=h8nX(3^jI}O!`)}DLrZ4 z!u+{;y?=K{=``>PT@u?Ox%Jg^RkqGM^T(H8dg5yEe-RSDqW_*1 z8XD;5c*5?Th5zx-#eYu!$Jt68ay6#K#^@-FPJa$Kw|I1_TZFY@sDFbQ>mjl5fb%=! zQa3y~e3Q-aO)$fkV}zrXuv84?E_jQU-frepzq1TP&pel^fsKkUtadJ#}>aGwCs^E*^mx?LFnyC%qHc+;vD|o}sb%p=f?r z6op1{T(1O$%adSVcHT}QTv%=;b|?0D2mFsLf6#J=`aU|2<(_d5c<1~>aepZ84)z^V zYIM{ccF*~P6TAZirLYX>NW>qSO3o2pqH@RGy99!QylTuC!=}a_TtHbbTU5B zl8lc06)y!=>KCWuMC0C|yQlAvcn!OIy#2mE#oNbh68Vg~&;KamA1TWpx-)jp+wb~) z2c?YN?tX8Ne<;E-kB|EPMC~Ls)9F||fXmhZPyGI@m3Sku+lzQht^7_Kz5S{V{Se)$ zMwgP9QDEEw{{^?iQr4NjmpS3bSX;a;69K{O-qLQxmLDT7x3XLwUbsvR>fBtRD(fo45Cp@d_92yu8 zaYE$$b!!jC{lPd}C~ZPde1C$shal;x1|5$0gHs8T0T573gY=NdXhkt9IC(q^1DLRZ z)nLzhM@G7M4#)Ky!aIyDwL;PNx}qA74IxXw^NH5u7yYvF+v~pG_n~Az?(X$J494%| zSB{@J$-e0HNjzrY7su~}j2{NZ@xtD{7{St$tdetlsISP6OguX_YMhTZMPkFxp+Gn0 zq2u+K#kzrCZsK-Y@Ho9_`d-1otTgYXjbg@Z{sYswGHH)Ipr`Y!_u0j%&=YZCMmZIF zA}-A7F%%j{$S|g$j4u~_gku;`7G8P1&s_dmk4iiC;*?7_0;j6NoWkwy$9S;}R;4Ox zytnf2-H&pZARyaqJXR%5hgg4Xy)CkF{^e07mLJiU{wrllsT%h`TKIotnxIWXyR z;_j)`_L6e8Ur`RMmzG03s<>Dcf}x!JF1zpZ9F8H;|2CRcz{gh|XVjaQ-x-z9AZ3Ms z;|eJYyrpni;Ehfg>WPEW0)QAg5Ca)EI`e{>m)PkeSh^8QKiISnb70{HH_0m^V@Lq8 z!3jQsVO+-G4gYi<)QPXSn0&}X4CB)#VDTe}@u(+DKIG)=oYH>^JhZlQaCelQbD#$g zN(?UW@>ha^o>=(8qL*+c7W^fiwh>ECVo7}QAeQ;mg*YZ3vDD+w0S6pw0TwIA8*Ag; z_)<189K*u~09MXmwVrXHu~if!r^4YVAyEYy1|c7Y0lZOwQV#{N)PawRFZANT7&?}= ziJf?c6@&1^GKOFoQ|H!s2%|yUB`igPjgPKFaH3}oQWwMO+Q3NdVxUbhx>oX{XH4c+ zAsk?zqvXmd9u8!c!<681px}azS067?0Ea)ph@Cg$spZnXY+4_AYQT$?)VUaoI>u2Y zI>7aUF7ONDgan7U4&ngSM;VkkltYSmpgGY8yuu=%!<`Fv2Y1Ng7~<*R3aN!WRnaNc zpmkAF>R<=2F$=*fEZCq|f+0^FFj3lZiH%g-6yi%R>V*f9*u-#A-=On~o%sTt_SH2Q zY>-E4p?#tF(keBX98$Z)6^qzd2kOGp;UJ|$tK9$!Ufu$lho~Ir6&Ye}0-=Kfdfc(7 z1MkqJ8Z<94Bo<==13hfo$M8_oN9O}p`w}lPBp-QVh-E&hfweV2V0==_Sg1o{(dD8| z^vEwU0xWQn!$DXTR*r?I!J-%2K|UOXDN4NqJ$S4zUYWSKKxqSKu#h#+*D7q{D}Ll9 zCgO^oakz*np{PS*nb?dEtHc#7@RCF4y;z^AOV=61lpMNt=4KvKM-YoOAzp)xV`H-r zzQMMnZPYbTg`;a=T4mW{v%v!co`jSpHvQ<)EQu)Wi1zMsDpJAuP@mXQI>t1TXX$2<+0H1vv0m(>cny3 zJ5slNZQ9jWmCdi8k-T&6ted7!NsRsGoZ7EnH+e$j8@JB9@!Cn_$5d6st(?;PcR-nl zqrjc8XCYh@%CD*njVY^2L?(@!a&_FA8nwqxs~8`ysh@u1thv`!r)FMXH^aSY-VL|b z-aI>btrH4ck?6Sighct(lcroVtx7%E-n%B->vXJcTl2WHHq+hnMCTeORa-yP?G;PP zsm``N-ZN`?W4ducb7O0&e%AM%Sktz;#;I;^>&ZOk0G>{-SVEr~rE0q~t825Fr?aZI zqw~opGi$)K_w=aRHJ#Z^?c${m&g{vyb*xggJ>T!ic4yn#!3A{PlOlI_KGv3PQ?>f8 zrP_|3tUCw${eKs}w#oV6TdJ&j+*@Ks0O1*O@eE7UYV#DFF_hzsjX0k9eMaWDd#+8T zPLP9m72t{gU%0z~VQ%)3i}5zm(X1fe1CWWEX!JH188{=;M)@jS>vj zB`l(p7dv zJZz+7m7%bIL!Je75p*IdcpLN{gn7Zpn?Q%rklT#B9<&njt47`h`ZCIR(a8MKG=?&B zMqU8gjO!L7qfN4?W4#~{lC$cKrneFb(LNz-8HFak)43Y}c1U%v};$7_>jccSViuZSSc4T^b79#E{ z%FElHx?Dw%MVSj8smmgyF2@TXaA@vo@5GPSd?vU|I8|fB9|Af9$ehBkGdfL!$(iier+Pt=Q=}c4gC+!TN?2I diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-dh.o deleted file mode 100644 index e15adb64039f2db3723d0d7f0c9e2cfbe86cf4d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2456 zcma)7T}&KR6ut{f3+*Pe{ZmXD-6l6?F?4}0ji`;~XLl(&0x7UkX}iwu4zTI4OLk`! znwnA<5+_?Cwv7+IXngX)hdwlYFlrz)fEs^Z^ueS_eQ1I|C6uI1O*HtOnR_X0)5Me9 z`OZ1_JLjHz?wy(QVKw4%xyqRk7b|BjX#o4(j?rj?pY3FotQg|%#bytA7Mu4I%=bjQ zmq{78Fi)w9Cihy6eEFaC_4UHSL-mIH^uT;y&+E~`U&a>xB%eT-<#s}>g}Gbhg$EU1 zQ6Y}=6(@=`;qV_g!l4#g!gjj{gReuD9b z(zZNzr|iOQ?EIPV3oA-wrT8U(4-D%ZcNZu5B&lw08NAXi(^{CiuT1>{FD5TiCdFg< zr$hXhg*F5G!N$h+Vu}I10-g3_!(`i;re?psgjJO(3m(c(E7}Pbts_ojLHPibX@eij zM?vvm%?V;7Phr+e0rCt$odGpp2g-~?aa*+;Y2K%~J;iJM3e5?>wXNa)hAx)0Rtq-fLwvNTa)XjsDyrY8(DaJUDxuYB zl~@0H9^5f-%?)lzQ$WhU0n(dD&d;d%p@KAH@@oUWGPc%M=%-0zZk& zN3Rp{<@Dot9pF&@-54Y@2=LjO^Pn6wc482(9)sj6cwLTaKWUD}Qvz)#9_z9I;UEqP zj%K4avWXWZMTq3R1iMT+fnGH76HM-aPM-+cFMTqC7@L>6x}C9m@JW&Rq%Co?-_7o> zx626|D_A#>_U}jqI{}5(bEJaBp;Swg(P=-Ft$!M-Z*zrY%hPgV${&fBw?@uyXLq1J zkA@sT;k(iCGq8_hJP`KN(Dz`}V$i((SrtCAKY}iW_TiTXkn9gj?3YXIA4}}dOYAR7 z>|aalcS`I_B{oZ#S|*VlA2sW8*+gA(IFMi+>6957epMf5k*uyeTC82|YHd+tU6Dvn zxHs0@(yE4IY-BW+Fmx@;0%}`#$DvrgR2rmmNGd@V8gAFqdR8-ar0&*ISqjgmbE%=U zo{Ys)=~ymxR%fG`x0#U{V#hn%V=|!C$l#j+dJ3h*M)HQ4A}gzF$t@YksgI4CBbg+r zW@hVbXt-qvJE9iQx$W4+*mFQP4v_x2gq^~Fifml8F<=$W|5LK@vRxw^*XkRx@e=^k8S;1lAK{7d*GWBZVs);U0k^=kx1fK=aEvJw9= dA>zLixJHOP3TmM|&k`cfi-gG2D)1G7{{g>ME*$^> diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-error.o deleted file mode 100644 index e4d201461ebd0aa4e3127b93d184bc0844ab1b64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9992 zcmeHNYnU8Wnf``}2^9$f8g2_xBoh+IWRjj+2!hL`GYKJ0GGr!P1R1NlYi62scQxJB znHh*nAb>)+=mLTg1s?v?+K@BO~7PQB-xuTIse3;K&;i(raLe%#*n?yz{vu zpCP~CiZAoTUAYebiUm79X+rfW`YQ-e>Wn7Vorpo5h)I23Mm#1b&Y95uE2d8FxYQFeNOT*7o^QqK)A~hdP%?DHSGpYIU z)VwP-Z%xhXQuFfEj8n6enir+!aB7~Bnx~~^cWN$9&0|vY(A1orn!o*BtMk81&7Y*^ z_fqq*)O;v4{~VupY#vsH$zwxDK!2Pe#ph(a)Eo!d9EK8s17X z4yQVO=(FdK1*LLWluB(hy_(;MgE*wmv}9zbzHq7*SE6FlXzGrm(W$8^*W2kAg6iVf zFGSUCVLfJhjb?s-8F0t-pkPvh;*6%X5xChvrCHuz18~QsT6x;0>?2Rx&@3NulR2{& zt+XUss&0Fgb`a4f3YD6x2d(;-hV{s=hYd*T^s5nOaH(^L~Ga^IHe7RKcH-y@Q8PPQ;9DiF-E)`4heiMe9 z`HL|cel@7*4KbsE^^Haoz1&YYA2e`X6jKAWQmV#&cEFG8&3#)5r{b{Mz@Rm(`hnq% zel4gs*f&$kofs%1F&Qvn0t%Gp?3+++R`OxpWQ>Qgk730*_MS|eDF$(1a<*bn(%UFa zFcV`kqNMjFTjNej(Zu7RC6c96ZI;W%pVW}bV~AyDLU}9_7!s#@Nj;U47Nhi9&Fa=_ zG+Ff<&5CcMkZuRC)6ZjlXp}AuO{;F8(5%-(bldpyA*%EL$O*<`J8F&6cr}Qd_0~ly zC6sGimau?#vxkjhf>V)RT-muA)PO`WP$KD?ZmX zT-KcLgqzhyvsR1hxE=k8pfQnNcQq=_!VVsMzY$%yK%ft8c|BKU*)w zr9yz!O6$?bP+;VWGMLRKmFEZb@n(f1o6H!m<5UFiW|NEp&6wFSmqw@emxM{$7MiKu zgd5lC=f25&4CunrQXp%?WSTgMD$*5j5D-M^JjS=oD>#NnH zZKWbk$WQyt2B*Fp`x|+OBa$zNmCn{_1B1iM)@9G~2b%E&dX6D7k1-Sko>QDOVMg{f zGqS<95=wYIACG3eOdhOR$i}+cNCNx#61pbbUy|cZ(l|s|!^W#-a*U5lIed7W`V(Qf zX6gza*0(Oo=p&b>-z&fD<{a~0t3sLb2e!5;J3RDS%~5+;DEMJDd5JL3^7Mf(jMwlq z#d^_+M^U2@jEA=V%3*apo)BG+3w#jN!%LcBBld$BOH3Yb54x-lZO9HUT$yz06yLe6 zS$J7w!obgLLH^4e7#N5_YZIxMdkex3E>Z8WUK7 z;~)=9ak^qSTc}57rRqxlCX9)huFN0tvidsYa<4txp2I!%#jTyV$Smt;j%RJc)bS!a z4iI@gY{r;(Aby)H*Cy^#1AZRb-kV@EU&F7Kw+=aMAD1!*^WIH|J+!?nxU28Qg(8O_ zm-^U8)wcyUPw&Q$#}Wi5of8@3Py4lkNjUC2IO$u$k{sq8g&$FmUm(vtG=_O^^_6kv z6`e%QdkcKpSB5VBpd%M_(z=ld%zzAUu5IA zfd3Tyjh0^t{u21Hme;@!$AGY2sP7{1lfX}~{3_@>8Fn%cb0mlO5aO(3=AQz76*%XS zd55aPV(}Yky{eKL>uijsF)0c^-bgyV@Q-v&Ps zT>JYa@G~8LFZfn))w3J?I`Bodz3ag51K0MZz#j+a{lobi1AiG@+aCcx7K_(18y`XJ zR@hpesvI-b926Zsmrj?XjTPlIcHeg_<~TJ`i0 z_|f1CY zh--hp0{#W?6KwuxfKP+#_4a_z#(Jyk!(W200N4520iFZb{*8g>!RG_n|An~zcVX-J z9R~hO@I^Mh6#TGu5OcK2(cp6&?t#CIIo9~EXNf%T@SlMH)ZveV|A)gL1pk)9?*o6> z;U5J5M~CkMzt7>jas5$8&ottDocK8S`yIXo{6>do!FM`51I~Ly`*R$4#o_b7^A7(l zu6?e+rk5 zuW|Uz;Fmf43h_n6u;)4a8?X;>co};63`veQ`5a=uR*L@oH8|IZ)$*4H1JP4d@1Og>@H=3K4!;&QpV`ULCX+C>D8=EN*EBghsTBuFil$9rIq)$C7)zhnNvhk=wlWaVy zuv;skTSv89$GKZIcdO=Z)oha4PDVAGWaClICfRsYvq?4{)tu4V$f)Lwj&nveXLOu1 zs@Wu)c2u)THXhY%l8r|-XP8WnO3vsotKy7~vI=G<&rrFlR>i7Tm8wcrXlrck0;40V zB2`iHO=0fc$-BC@JJ}<9coFA*+RNd+5IE}|yf2dDK{QG{Q)HaDK3V&{Gw}U{e4WVU z#I@L864!{_M9hlZM#O{fPT~OGw}_|Xy_optBKH&DD)LXn(?q^OJXPf1iTEJ$G;tNa znGhlFCE`kG!?WGP!}JZrKJ2@Qz1Ry7@quIo5g&TqLd=M8Z{*=az}ZB+lwC+%hW-%o zV5<|C;`vX+28G|5yc0!kCN2^A5OJ}XcOLHqd`BQ(g#8wAA@+&H1tR}OJYM8UqA&6@ z;&CFsB4Xp+b^!2Lj6V?@^&^P*AhCdmjps7r5ts)eHbPnAe36YrY`o4V;)6+%co^n^ zhz;PSL_CzQCSt?*9^yRg&xi+!+(Udl_M61HBA+K>Z}kWfdo=Fdy*VO3AkM~rj3MHc z;{_u25w8$8;)izu?=0*AiG$e76HmdOj<_7(BZwU$rxUSp-atGU--(F$1w^#P!@E8C zrsbhXAVIwMC3WfDntbQ-Zb|l<-p$FL+{1>EdqwZPB0ljw$zIjF5${ptH()er^tE4D^WMZD@5Kw z+>w08^HBT~`#c7 zirhs+qkD*xB7a5PCh`elQ{-=mxcH}u4Ux|h>zH@qCCPiY2aykvN7y$JD2M5ljD97nwn$CCYk7bg31uZaB}{RNR1iFxe5i2?rbet3ty zk4G{8mBe4&nuvf6F^9n)@I5{08E^4f9Vt5A#nv z7xPa%C)rPVTQL9RBba~UFy^1Q8S_s(8}m;bvg^hs%s=@Zn13R!Ghwl8u}1s==AU>I W=AU?#$adni$PQu^-zSOZi~KKlk>!g3 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-hmac.o deleted file mode 100644 index dbf10deb219593513353ca1876f9389472c1bdbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2680 zcmbVNT})g>6rSZrw*`9vQP7&YiJQ6@S)fqTL=yQaP~t_}ZYhbhT`tRQA?z+>_bvs~ z_>*TrO9!ki#X4g-a2jyVM~qHuyxDaErmf(DCGr@>QyaUtQtejOFz# zycGU!{sC^z=w9y|=gT231=iQsGhy%3$=gMimb~psJeF?puKopW&aI?WR!bd#bFL!w zgO>6`QWkA-o>7u(MOI64&6Su;-ff?mO^3bi%t5a&eb8H?Jk#gy$;;Kq;re+jbnn~B zokxBPhx~1+?6Lm97B$g)Nh&m7#)gWwcQF^u_nS6!O{=`P>jv4-PgrzD4Dog%9y zdB>ITrFA5hSJm88g&J(H%~hv|eE>=_nSTiQaPBZx z{ePy;KK)1P^0Q`jolaX~0xOu}M8Rk+7-DcV5w#MYP}qo`@ywX9_{3Dy)9i1lZ%Wvf zW{=M@&cqvzcI(|8f$m^)OT+1js1dI7_(qMmIp%@8t{?B`o;o4?F*EG9%vnqLLsOB6 z8HF$!j|+cv$};`E&kxqeEh983{PFR)6|;;{NDAj7HXk!A197H^{!rX%YUM@#Fq9 zlcOE+JhtR4d|%EoO!_rqa*V)lz!B}0HqJ*R+Da^+6y!%Ajyg=08#(=kD9EAwo&hgX zN?;a+{1nEWkeL(1Grwlc{CLy2{7vZ8Q1KL3n6EDpx7Ht41{+Jo<3PrDMydD`!X6~_ z8nDQ|u`~fT{}YnuXGFfa7{x;VS;`Q_8(rckipBlnSBOQ}#{Q|oc~^lS;QSFJPVRGD z#k-PU2B$nP{ZB|cf%o8ht3iH55g_^d1^hw*=e^aS|5-(V1jAYS8~JMS$cV z7H|==jHys;ZrW;y$3hL`5hLUe3BTTTxUVtTsDvhQ2!?=ZJ!j5|V6Q&V*`WsqdU^ug z$AZT?I`!_L=!;HRfpJ6OzWuGX*gv*kKs`8(uiK>5!ygk0@VKW1aSRbN5}KY9*d~pT zHY{<|vJ;Ue=7fa$qERz;$cT^IHpjVZ&IknbV6SP>so$6lOuT6F>Kf+GS|K`tB`Ana ztQ6uj5k}Ulq(+E~L^SKy#D|3Vg@}*djkhnsNB9KsK_ME5__&V{9~I&xa0mKljEMHU z1mt;t(2lrkM8vCt5BJvtX&)qqJxYZAO=-U@?Q7)7rwTFYw^!mmBJ_Pk^W`5SaV>t+n@L0;v7& zcfWh{eaU+L*MF_`f3L?*du45v!{Nx(tRIJ#sX6Qd(iIJ=P$H88?R+guTbY5vn#p(G zH6{G9JI;o?JJt|`88Y%C$-oWWPQ!^}{A4njjC6@=_Zz2?(>r$nb2s6&?kxGY+R3rH zt6eOaErt;}7#Mp-?@G7cdC@?}N`h+Lm8xf@>KQN!BF6&WGkR8`=eq<}U53bxRjOl^ z>?jVIexoST6}aB&D%QzKi(X879J>GeKzB)%?s2O7ID5v$Uoc~HpyN4b++vh?k3|lW zVtVK61RhMYN_SwMHScrv?|lSaM7fdpKK{gavQT6s=3_Pa!fC|Usn$3VixML-*=~5& zYFMEf;=e>n5+sU=XSpgFMDei77cl>T1;zY#Rlb<{dy$u{6^FxX-S;-#eb1UZr!>S- zo05otk$uL>s@$t64FS&=v&FknYzVJ)-h21C(1Fo6n^kTw?S}9zTH7%1#%|{_4mqxD zSm+m|ShwF$6Gu-9Ts(k3 znBUt(@jj?Xy61!Lpi}tc+(82djQq0*k3nh;4Mc<*8=CXav@V$T5BSGEDD`LH&mDrc(Zg26WhOremY@WM0X?^yp#iyjCRYr=+2hF6xk23Z=Fgedv#U=jB9yCfgIF3`#GdC z7~M*z!mUnCU;aMo%}RHg9Mw5PpZ0D-b@;T$3>i~HSFZZ8G2uyZxUbi7RBVmKN5)P# z9jn0w0V#^#h54NmVD4&9;rf7Ek`)~LH^7-$k*>BJv)&yJb)3|KSv3L`?MERAS(X_D z75qo_Y|sIJYmNM)dQPoTjK6-P05z2w{?xf-E!z~FYEy8su~M@svI^?pO^V~;wdGPn z6)%eh@zQTpNa<_=@r#W3e}af&edJj1fj1!nNeF137AOPJjYl-_+P}>2bBGo&spxDG z?U8+}p`{y$stlti#zc}36Mx&~E5Quyk=h~2M{;jj);J`&%zaC=J?T3ht#E|m1b1_? z$0*iC%AC;0WDlBaz%am*d~cVpFEGWda+)K2TU#$8BVg&`H5h_6k9qw|D19(s9NZGK~Y^4XRgW))8ju6AmYL}>TdAq`Ev!zm5*R}RnoduZ13w8JH?+Jo5f)Y^=YSL{oM5)Urhf=m;Q2><8WCPh}Y`wc7{2Pin1&i z*bT9G#w%A(c+%+GPx+2Xo^Ib)bEWe|Q%{Vxq*yt4kg^?%@j~9cU1`g?3(HAdHbLl- zjcr-ska2J2*l z2J>yL#xqEXT8vUCQ3+O89By-Fw3a}3V2+)nTigj1rlkBFg=m!vmLU&7TDNka%B8js zPkh5_8&of~Zjh))4z^tj3+S>&prG4YT3)BWoKnpQ}ZkMpqNjm#M!ZZF;=# zfY|ByWIzF;ey_t5xWOm1T|z$ zV2;$0Wq;njkF+!?_46P?c`Ky|?LuX)c^4&UuXm4lPi!@Fe=D|QrMcS^;>h;>Lr;KL zrB_We@;dgz9P0wjt1C_2_jaf!vL|psbeuzEnbmILStfDkAfKWg2D4~qI~bdAGD@2sM~>(uj%fj`AlsKm93bB#)2x?F=3eM`FDr9Y=cleH%F4)^c{a99^XG zuzCdD1Tt&+&c=b#Qb=j)@a(qXGQL&>y_-NPGixoCd19t@$=u9Kcetxuo7V z@W;Ecb7Rm2@$00E07UjVd*vGOXE8?a;{-Z%7X6GsZHjE?jLD*n5LocQw_5azcLGyw z&$2l_{WwT|5J3elK#f@{}_7?gNMklJw z;gM}}n;p12I#F&;9&nqD|9CR8jhmAL!Oz3}u298F1e991|LV{UE4kb0=#S!WsBqf85L!)p`kx=SRgA#T3q3ax7M;C`lCy;f!<}!T<*E% zriSr<s_g^veo zUyd*MU8w=+S`5PE>W|I>l@WYH;P4kmA&9;oHSPlkkm)q0B4c(MkIM2u%&y>69|eTY zsctHIhdaUCj(?m?${E3Ke2l#4lQTzYFG`q836ya};X3lhGDYjq08>;KJSvWNtfh~U zq4E>}yG$4T)#ccGNKTVBJT&%AisGweairwufsu}59r6%J|0z6AT%ysd4?7aozAd4>iJ{&u zoHh|S70`El9KxjIs7iB;Pmz-UpB*FgA9Iphe7(~H-@> ztdZ_fhJ)MpOZVvC{sAJq2H%0!M%avfPDoS*I2eFS+;N6I9HMuw1gwN|_go1>r zs1t$Rd6#gTBf9lS621zeOmwCet<@YI{TlN6FJm{;=IX!f>fE3ZMS1?M>6IIRyCMNM zb+hJMC*37iIGgVB$^&Wca*2RA>!^{G?Oj8sm^Ov#E9@zR*b*jkQtJ#V`Hh)Y)G`@h zFf)WBPo`SwG|3ykaUaWpJJ2F?HpC!LGA+%MOl3bzXbA?TZzcthbt20UgOgu|z$#Ih z))oyQg2g&JM{@3ZZf+e!{|alfqSg#^eD4Utd8~d4Q-c11_Qny$Qft(OvC3)an;U zqTgd=Ol!%hOaE?Kh~K9mVBjx89C)qw4T5wUQgt=D;9?M4I%cFLpsGeXA&-zjvZ}~R z5qU}EHOd7SOBYQ4Z(~cjV2Ls1f@@&2N(Q;$66u0Vr3)^l3-$+Zg$pjT$@E=|K^K3; zYV^)|biW^S4gsTx?zbrAeha)w-%)ERr9cGddn=u<#fl-;7|*fumrzWPL;*oo_(N*| zSfCv4Y;pknA_L+VTDWF>DK49&kuKy)0ZKiP#ML|hjn0-17~)e3XUl^gWQ*WzA47IP zg6gH->5=28{qkw^3X1cUF1A3r*mR+RG)}Q_(X)R!F1lcnph$moF=!ZmP1-Rnc*U1> z3*IGN@Kou7?~^WgA^0F&@N6Z7zm(;47fd)<2lVMQ2qayw)y;CjFnkdGsRAm#-~;K1 zrLCHQJf>5d?s}zJn}`O>_4bPm9c$^w(%c$XKgg}UW~@b3_*Ml^C z5(9H9l8cn8lPxC#^MRC+OG+oB&l<~sggfHz;Dks;?_+@g?nQ<-FU9TJT_nY$Mi;<= zMcOkNQ^C%!ccFs}{9go+HHMQ&A4qloC)F~Qf++igEK^gh-$yH?tOCfHN)?7&m6PB8 zw(LRXwLHzdO7R5DY}}1ph%_K6z*`*jo~pIApl&AWf-^9t99v-A+lJcn&BVAAWv%TR zK>E4$=S31}=aM7<^!q7j-a=cg^3?uwYu$k-d+D8}-GK z0-Oq2F}y#;E?!Av`88_!jrQ^>GO6Y7PeD^tfrqW?(jv=&{zKPHr&I>DGDz?A=X>5??bQL8Ws3TRBKvG4YmKp1e8yhr3)VL5VLsZ{-e?UjyRC&1-e^KS7 z9zUbQzSmaLF$#?o33TT~p-%SZ)ZVPR(T{58 zVj7>9>U{*UkJ)MLLoE*wrFvtfAE8>Q_k85irocVMQ~zU+eLEUqaXBfiZ4~hQ0U7Gv zNYrxHTHDu9y8@X3W93m8t@TNpF+PPcsVo_Z;IxOue6CCZ>;(YUv5?4-&SnZ>YN42-9Yv9=V>ji~AW!SV|1RqbtA}wVEZ0v9lGA=wc*~;9kfhx|aZX zq$V|(NB^7}^}4iq*`9^RWNL`7sa8cM4E}2nN40#eL`M+^EkCkbI)m`|y?;S7)awUG zY`eRWRUu;u?Cu-LVyT_1q3Qik)zko;#Dr@|BU{P;X3Zt=UazDA&IKh1hMbB;fZ+ie z=s|sWS;|=kdJ-yzN9dd5|PhRd1<#l-y`d#-9Du9(r*7%<)z(z2YK3U8tRnY4u3r8xyo5P zMZ-E@d^B^wkqj?YlLABVjB53S!#@5=@bXPD7Y<^CWR$%B*v%D(t-BKpd-e+g zydP-O)2`h4f&hCTmvx1hqyHqPzr0bn&UrnI<8%|}$9!F(`!=)=m+A) z+tkg`Vwl)8amfv!NUp&3ByMue1#T|_$)m!4tPSm+9?M{K>jXp;wuRWOyf1CZB!U~hpK$0HMEqv1P$4`{3B znmfZEyQm_mSOIPuU9!#FU1bff;Kkt+j^I_cF{6J;WTR>o>~wM^Wli_T!fRc3ui>BG z-=G4Wo#CY}$4Y_(MudG13D_A#LnzUFAV zE_!=1wm-vs!0p(Xi3{$enNc?6!JI|ItHY~LhS#6O8=ftpM8YkXgd;$%(YhH6e;gV_ z$7iL74!2rS2kwiYb><%o8I!8O1lH+sEW z(@H)!G&Ag{i2WXOVydm0ZJZ{qD6f>$#k5UpsbIryngY3NYsNY;&-*wC0Bg!rR3m%I z#iAF(95Qc3s@E7AmEOXBNCL^wVE2~nrgQ-MpHi`$GWBrv&boJ-kbcz_}Jo#cX3 ztu+=(*E$;&>CQnm5(>cz{wlE46G0x3>;6q*5;jD*`lNo~(zq6Y8Tg%eHsXO36WK_p z!HDmZvzTh0k4I+ym>92iv|wh_e@ovi8GEP7OMhIg@&#mg8S?a0p)|*Ay*-4<@SD&p zlN%w!9FB8mk60&qI@Vl{Q;*uiKlNXrepN& z^c@yQ^}4OT^?lp)+QWT2y$3T#h1WPmJkt@5ImNozLC@6?5?y44yPcDQ`^{-EDxM$X z%H$x>_33qeg*&kbLv)M1z~_7-4cn0LdgplGiO@$t zVnjV*Bza;KI@g%P3OBUnV+yf-8N$O8Ko`^$rW+E4Rm#WCU-n{Zz(uMTmC8j9e*Ot^ zVn9EpY%{~_3p!i#F-l^GURX z6Yrt66z*;F%4Y-l;xxGC;Y%ZDVYfKW?jOnSw}5;Tf*)cu*)LlDBNEV@tQBr;yMlzn zOWnbQD^P@+4CTOE%SybLdK_=fToVOr+K<3}ZNpPM^;$SQ@E8?nv+=mZbRCO1-bPk zz8JS{sYi!{f>zL?5wvJ9hhX+acuERlSK!$}E{gIz>DzEqWJUw9Bf{0PVfSD{lYG=9 zpKt4(*Q1Fxq3wEb%YZ9ZaYp^>sJk2LRVw=7mOXC>Pk*<+Uy4<=@14*=u?5mlic4*D z!W)8q^ByhQc$ouFZ406c9e7V#x3h3{Y=5S}+Z;q9X(FlK-vd6fM_>NWST*cWr5iIY ziR`h)UV~Cz)Y*;1gO@$fOvp;HS%)`QPO(9M4&F{F8I1OuP-iVM)C`<*nzg62YLL5> zNBn&=UpeX6kaJY{PaPMHr%w9b3+(}U%sM9@+j#V6aXks7RS?O{N>@&gZ?C9yi8^<5 zo-6bO)|NL85>}8Hx{CNIR#<7iTw;%S3xjytziGO}4zs}-#qrk8*e4!+#U@PQJ!fX_ zdpSo$?t9{ZK2p1xqV!ncjFu6v{}CC%05vV<}2h; z(N>4AKlE{8h+O_>;*i*jWfc`}5$y#)LGO|sqZvUhrkvU#$1sn`gN|1q1iHFkbc;zvON(>L2`jdG6#Iqu+ z;hoRnrmfw@xeNx41rADa0eCtI`n6wta}rc+cUzj$TMRD^@>cjB?II^sFI9UH>iG=0Ttr|MjNQq9A+KJ=Dk zT0VyN;HGr5w<|L@OZ3EgJ!;1k*(h?eq7{%XX=gBZabz6KG9F7m`Ymvm%QbHV>vHk< zQN6%?p08IYi5nxw@Ur(<>TNSe6ziov z_UIxJU)PT%qFH?EJqSY8yT#_Vx+r`YxPphP?})b~Zy4tF^ciO6DDlZ92g4sY9P4v- zh)w#6&zzREyACv~5ANi=#HVs*Y?#?GYe(k>d;}_LGNuF zcII~zRF)KJEozB(~X z6YoytHx>WQ-4^2X;BcvEDsYL<=OapvlnRrtL4}*b#HD=C#NFY;4N|p)aAJV9!cX9B7Dqs*n{ZZ^e>a! zvMO%9)GP7BeFykzW^DTBKl1CIxiOrl75^3d;UwdqUWD5W@kO zeCh`Qkgp><(I%O}@3P8)L+!BG3Q2en&lK>&7r7fZC_dyf%=yA6xTXtHl%wN>awy^c z_V!^?ox#ZQplU*WMuk!}G^yJ@_Zj#)&6B=TxgfsBD=-^eWw&E@wOW7qgz1eoUT+U^ zjqfvk(q|o~N%HnfVfyI4OEDx5cjUJBcR1llrc1O_*E zIn5!_8i#L_b(#jc{1Q6B=dD{0u4TA5AaBZy=>wErRKTh+psc1XOV0+XHkI8)VnM1BkliCwT|( zNnZLFNpw=q|Kjs)r4Pyg3=XhySp!@RrY~A@t8bwltU$;#Iieof2I-K2J_H3)s6Q4% z1w(CY{Z%Xlmlf%KS#go@b&8TZx_DXb4q3+8{Y&@jW-=y+f;F+@6TX* zk#CD$w8_4e(+?u+9g<~On7JlS^@cedS*Eu!aQ z)Yb+6>PY5nL~l-0zb9CqQ(5Ihps_hqg6o~Sl zAym2zU$qpK!6WMt1M8D(ayd3)ih1%Az($DqFdTffUHb}}b#WRk1qiptT)9JVn=SX$ zM=(%c)cpiwDX3&)Vu+XFbT0OCBe<7?BY+TqhH|%}L>N!V5p+$$HqQF05*5~0mC91c zIfAd;9Z@9IR|iTYrVX+jxQH}Mqk&r;v_A0Or8LBMgWXisMq z9*s^r>Wo%7e8*ewMaKdH%U3lemvrG(F{+9|HGY_eGZVALDAu1lfWb@p_B#$_ULfAS zWMlY!hhtq%kG`VUX>G41ZPz32dK=w}WZadDy&bWm9N7pod4bC^FSw*jY_cv0E(SZm z(eS?Pp|Rix2*JWwixd3ip1#0$T#po!!=M6qlP&3V0Ff`hS@VZO41I@Ak~BKjei(HD z_-yj5f`TiLmLSR9aA`ff=4O7)SQhBGF_x_v#q4LI8B>wzX>X9${SKj5$Vh`Z76TO*ZjLr^=UtD@MB6QW@1mu|cR;T@fJ|w$@oU;Bc+AC~0&^R|tFy z>x2YN2r}R=jh6qka4Uo+PpR|ZqZy^nl~6V~j5`2>=mAooWL(^-5o4^{rAT5gK{s`yNB$?O% zY{lYJL~&aoAO(pWw3kFNlZ5vmY%)4HcKeRDW{3juZsj;IxeVq~kBp|wG#WK>L+z0! zp;4W$4V?($p}zfaWE)8+O@h2~I77>84g1vjQF)z@=Cm(h2h0Udilk*AwE7BGKql6| zt}H`Knq}||k_r2Qa|$jv@%bbUY=?tt@=R^WYGoiIq`bW2q+h}Nyn5=mjM8w&xyQRr zY!$oBKtvOt#uAs|h5LtalKRk{qND?QS~eo|UStn+poEeR4ayDZ-Tn@FHDL}PFNWhg z*Wrab+AhT&n%AF@C4}@a25C-BUVhS9rAJz|gVuqET2k2Ps0sue)e8_&isQdhRB>3z zXvDk`;#R=BRQL{W*Cc(}@sv=)FM-J=5GD^+6pQsDQuM_3c|iEA)Fs)szi{{5ji(%& z9LIAGgpUKy8eBzWc=vSf0a1+Lj5Ig^b?58|cb^LH;8%noh7-iFZ**L^g5z;_t_rzg zkfJz*Cbtx#EeKKNak!Td8U-k+(3rN zz~+yibRdj_tiq^k+Qlrhy;vP=w!Bsel!pid?J8G*bzYv!kiGLff zOvCD*B%I?k0<=_j2?Y=<{>zg*&i-3iGk1%6WENx-ORIsClY^l#w=0?KIE8xGqKo9* ztz)k%kK)-Qcf0QN+Vdd}3KjRKl@u0^u;tBUa_%~wUsPaVN;^*t;_Gnus-Qn4AuU{- zq&@n29BwIywSYhi&pJ|XYMyz|Zj~4EXq6u$H-otO08ed?aj@Z$w)%|AU{BhUwLHvM z-B4q`--o5)u)*8U9P-+IR*O6)rpA^7lRpi7+- z4%)=P(=35*@#u0Pyw~ukKgZFrW(3G|vpiV&rmshz)PwK`HSL#!B_XgxerOIoms+$G zBHG)6KNLF|*MmcM<3fOLr4jYg;UEqcN6oP~`{ItIR6Ul2`Oj9dP9B*J#)P8f%RsJT z^C2p5ZnXS)@oC{(*b5zn38$up3S+(=?uhXDFs7un-VZqJdEjYx0|a-W%TUNOozG*K z5{6AYZN>`u8ET2#!DfyYz3Qwv#?a<%X9wQ#Vskkx%pK1zP@+H_hh6v3KhUI#0^SYW zR>lDJFdh;B8pu-n7+jh(8cW~`AXjQXDO~~Lxs)rY;8dk67_jc?yO^}A_5uHpzKc;; z?UemXUsAD3`YxtukdH?{P6d;yFuj>$2OU#qSb`ma6MwBMWiYcKTAzgY)o;Qj*Sf+TjJww9^>O@zkX!oR17tpSm37CF zDTq3=Mgd{HU6GAl4C-^EMUVHrW8xPp*y*`M4-XU*uAp0IrsX*ZQ*?5pF z&$r3i!0;aZ3Y@Q z?yPLOu4K%2=FFeoQkY+G|MbPpGxGsnTRWwWeF`;g^rGgL(ShbA0d4e*1@q=L&qwC| z#f!Dk^A`k~M^{gpeC^`E^ci!t(Tis<4lD{xzaKd}T{=&eXHE}Hr>^~7KRB+H=jTH# z=n|y6>Ib^Y(At8*M+vE)qPsP%0U-tBEa-+tIOcD&$_zgFhtIW?LF9ZDTR{2ukZ$a6HKg4mrscDm}_Vw(K#kE@HCy|~8%vDzT1oHO*emC%N zemy8}2C_d{?XMv{inc#l>w66O2P-vgk5#@J@T>42B(AmKZ$SAc*J~Qzuo2%?fd2u? z08wSse+TQEV3ogxauovqiRef8Hk6x&gPxc(%RJ?dBmW%>ehyL(U@6;de-7!7F-DVB z9*q>>+Hecs!)UvsTGJL-?K6S@anK)2mi>9`(wh$l2hkwDr%`_;`Yf{AC!)O@%4PE> z8+d>H4NW^_wQokcBumpiwaULi`^%-8cEl=w59LoF{7(W8@!y8>@nXCsx7x2j`SF|J z6Rq+%jQyNn(>7S;3iMlkKAx;u{Y%k)36$<{Ry!ZqKjYK1f3(V@0QVf|`<_*%oL*R? zX}`7l^CP?V8#V1ltNantriq%y|6IZO{SfW1-=Jx$t^T~DcnQqIk+3Vef@?4Z3u-YA1&*PA{TdeZiD31kme`A&TF8yZE z=T57<8|9xD;E>HK$C2{?%>0K{rkt+>3`ip9a}nk<3H-77odf(gK}h&n9p}qK_bOe} z7DH%Q4xs%P<25Z8I9UEylpp(t0r{Vb@+M4{ACa(~rw6Z((X=wF{5_0o|IqHi9HxF) z&IFwO!!qrF{loIlfY1Js{m+2cW(1}$n6YT-!oZlti)M_OGe6Kgt9jAr8QN{Ln`g|u zBRIct&b;P3n*)J4^JgvA<}GZRGk;E?X1ZEemF_$BdTd>5J^Hc5~ID=4RFf=P#Z!Yku?0ru*m2Z(2O(Az3+N z0em}Z0&+xjpNY{~wy`wLSg>#@3p3|D&@^@?b9T+V1v9OhMT=+47NqwRBCuf4XsnvG zXu*T_jP7Vo&G@0_MGGX(mg(~rGSj?d#%!jGFqN~AfEd<@Epo)>d5fFnOq-W13}8C! zIA{I?R&G)A%;1dXra6n7#?Do!B~a6MrY{a?i<{(NsvB!q9_XubO^aJFYcx#1U(zQX zV^fQorW|AJ+$PKhzsG`NI$NS(5UpR>PCYibH2Gjq;$1JJYQ%$ltb48}Q7&m}hpfG!~Y zDGiv4ax%K8Va^3yEC2s8d*`_oqXJW|3r z5MZ+YYNRZ`4I9exQrJPJ$E@@c*iPppP5Tj2*1rMY!t_`0NlbUZH!}6XhdU9JOh(G` z!z=^u>I+rc4Ijb!sk%!4f|TtgFmg;oR(b;IQ23`ibC4o#n0AqB{~lrj_Wuki;af(i zbSKiG9!(pGS0qC*x2u_6i}9Jlk3ET$@HL3(*#GlS5T4jt6%<79;4K%SJv32T@Tk(JUSbOk?X_&u7>jKp*^Stf58(^=7~cC5 z9(@I$AkHK^5JAv^-S20=PG*z7IPSnOj2h@NpaupD#1GB81vX(18t^{O^L$h88}cW9 z7OTt*mLiVKr!bX^BsM!%w|$-!Cmpk?L?rF8<2u)#GwXEiyG1OPEwkwh8O}|NyYBRs ze$xW5RQRmG3X;_-jFI?Kf)yt!v~Grzwp1c`088FWl`7#QV_dHaJr_#oss9GLE3Jl( z(mf9}C#Y+FiAXtqQGM+*aPAO|-GAhEFhl*$a8XgeQNhZM=Q>77oa>c|Mm{@5&9l)F z|%M`gQoq*(dz@&mvu&gmm?Z zr1`CuU23om*GTtq(Q}S)ZzIyTqec1zk%~10N+dzLepI$h1ACc7(ISql0D5cTdG5>$ Wm0Nl}pS^zQXGLr_8vf!92Jj6aeq)*d diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-md5.o deleted file mode 100644 index 959a32364872ebadda20ad5979fd814bba5af0e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3048 zcma);e{d5;6vuZ-+NL#DRMc|Mh#Y5I&@-zzG{W$b=4DF+F!i$FHg&5NZDkJPuEoR!uZ zL8n;O+xXu~_wi@tjkMtc74-9t2N#=Fz_wZLyFtQyPaTY%qec23FQ z<3m8-aB$oHY`PWbpPk+JYc{NsHbr(ZgHE?a? zOyL`T6eER6;=P5oS5AqvMt=&u_lwO1>KgRFX!RC>NuAJe0-cO=5 zQi%8RiHaM6XsrI_JW*+QIzG;`bxW+L^YG5?B$lAU%0cE<$o$pl4~vMB;KKSt793=8 z`=Sp|WpXXR?f&SKota!#iO9NVt!Z4ST(P!dXRh6LIFoD#@+RBSuQJItAm?21kUo>l z*05&etMPO)yc3wcw!b{{?ZHg4nN`03#j7&O4j}uMzOf5WXtjX3I19N((TRM6MQ(sbA*r=EL%q@>gbVd7Xw$u#bPl ziaL@%!ha@jwAH-uU9*~~4(#i+yyhIA_i>^+ z{ai&_ULSrLD^FA>0+oav3jg_!?|bk!*nD~#DUxbA(%_OB7UL0ojDT6@!A;8tb~UCQ zG{%fWPvk68uH@EZO5E&_5)5qp9NbM9Q1*96o!e1Gr)1B zfGC`ENIM0UToxmf6SMw`$CX@m9}c=t->-&F8HK~hKq@kykOaNtHkh_k9dR4z0UZ(a zL~s&!BS0oj$K%IMg@Oxy+@9m6X-x+B$y0>HIWHv6c_DGm3yE`H(^Q1SIWK7E{J<`w zmN{C|)*BFeE$yA&z#7XvzMf!5SHLp6(mspt)grSkR?)jASanOitG=$ezIC>}>W+?p zx3kP*ZSw|wt1U3x!o+YB%BM zl`LI0hBYYhznaWv;})_`vZcmd5B`+YO|a_=5IO*s)qtT{zJ+kjhAWi=bkXfF;Z>}Y zY$;yKPucYQdNdh#LV&{60Shrj%P2LH@zX~$KV6aesZ~lmqeE;}FEkyjZc);m1NIW& zxxtp_A#^6`UjdfI29y4^U{j6dc|*zp%lu_oK57@eUF|)6-C|X+r@hL*dQN3KS{UdM zZ(2PE!L_6twxtiXHn^JR*ST7o1fjX!)9R_4@2YP_exJX+yAOGKyn)~yT|IvGfWTf7 h776-9&|>u|fZE;%R&PY82IkKE0kHau5qc+S{{h)9_|X6W diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-memory.o deleted file mode 100644 index 059354c1ee9283569a9d2ff91a82e1d05875850f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1348 zcma)5y>HV%6n|+7{h)$?I>6?kLajs`s#GjYX-O(1m!i5YWvO*>-496Y%D$jRLeLHo zlq^UrOsq&Oz=l{TVq)VDU;v4Mm8AoVc|YflxKV|8(%pN%k9$7f*$>NBC6mcyNkxXT zl+l3meFdfxZk&c`fNm}S1iHQV5zF4&aU8d=jpf>MY@~Jg0ZU>JNt?V73Tl+Cj)cP#@;_vNU)bY2YI{N%eN86)1Ema%7Y#44$ z_#4JOFO0SV-zb_>`N>A26pe8yHlo5p*(#UpvQwNYtZ(_EHerlcMdYm+Y`3iCIjor= zGDELsN^eJ!=?3+>=W|hwA~O9zdgknnrFL5%9pDPf%ydaeCH+cYE;59!#zjfg3irWg!aPLfxwe zVbgSJrYUUOa%@kQYPG->G6*AbX07?@lI6@-Dt39%Su9OkWrykl4rjgLyOMuGS`R(1 zi$bqQR-NY(S}oR(tMJlfy(Shqt4Vd~d;`O$i7xVc3=I%nQF&J770%FC6~4nc%LlWg W_y>xA0{#pU&KLd{ihl+EEYTmBlE~`- diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-port.o deleted file mode 100644 index e9b3a8487446a04aa96463195f43e19a94c0fa5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1280 zcmcgry>HV%6n}0E4dtU1La1yWGNeNsP*N5KNQqNba)?A4mJXKf9Ie&l9Qn?Oupm@{ zs2GqKSoj0@8;}?(6^Z^S9T;Fo3hz00;6|-r;z`f%{XXvO`|xweZ5f7902Kxlz|a8e zYX#~VSB3?chwk3D;xXZ^7l$li2H*Ts~q@( z^)0l!?xQx1Spl#UHn1goD!~rp;gE4`0wKWWv1Io8gI+~QKimad>=j! zv4mN})N8;NmQnafjSBrjGI4|>tO2IhUt#|?hb`=N&^o&sU?qHe28$W|ZU#dr{Wwg$F;3XVcqkthtT{Be|0>zwZsn<3;F(R>IhH$Vsu!@IQ#h;Kt$Z uY5D+p=<&1UlxGIGgx|e@m(Id!UIu6=+$M}7SNIv>D*zu9rZYDe0e%5b2im;= diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-random.o deleted file mode 100644 index 3e82b896a61b8d47aa26869daa4aa576f43a9604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1924 zcma)6PiP!f82_d_tx2<5jem$(WDXBWsGZH4MTEvf((H!fw9#zR3aKuW*=G#hoe48< ztE&OgX^>$NF9o4qJQPImB6yRALYjnv=*d&BJp^pPUP{5r`h9QSTPN#5AH4m2zwh7s zzVFT3Ps&ckFpM0iWk3!LO%NX)N=Zq=C=9^>ELJa^kMAAdBh}KUTNJx%G7DkvQMcPo zb~YZ|h*3Cp?@1LJTFfO1#bnl66ce{qwy8i~C85rAJS)-*Y{(7vDPmZf)tEt+bbXwwF$Wjds=< z>j-9j5z`TAp_$X}#}B)S(R%4$=H!?3u+(AmYn*~OReZ3qFHUrfq@jv5S=Mj!8hH&F zyJOp%Uy=ALx|*u$KjK^YOrZycjs=cmp(QN%HJMuu=btj;9TU}goJ%?zHHqR)-F!8^ zH*%o!8D@1H#&!&dZ<>jNagM&GJbe|iIf@@y+5#xl`Q<_@bp3kJOo@_Vak=G-mgO~E zf5p1Y!)P_|tqHqyve=TA32RiiD^X#-?3Aaf<=RB4@ZPHLHpZ;cWjEq=3*8;({8@?_ z1F%Ehum%56fb9j%CihWTjv}!AKyZ8Z+~UbdxZWkOqxT~b3U?VLjqRr7byv8UCm{;zcyy{P*m%A4N85%n%eB`1zZK7*uC>n;X-gEHyJMt%dhPb*Fjht^~!7jd2M z8I;NYzx>Xi59NOaH!aHdd@9Ocve6z=I4-pSi|99}WCHC+u_Wtty{|rP!<*^VM!w|t zwhltney32*ruY#XTtnkg)YGPZpTs?ZTlb10Fr42F64cW9G}oBbn{dDTu`)c4Xux6k z9FgR_;t0KU@ZXNk&sIQO-$oje!+hD5>wOj4{us=l_%rVBa1S3cU?eq3-7r>k4S5TT zULZU2?-6e!e_e48Q7@XyTbdve5Bm74ecbBfSNr(IKK@xB|FVyRC)~gb+iRi_gyi(P4lW5Y49mXkLUL5TcR#HSw{1OZWu94}>`AO@((5DSjVu5I^LNT1=KoFU|5W^MA!UIM diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-rsa.o deleted file mode 100644 index e46466d71c36f974e308442038c8b2f81ad35c0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4128 zcmdT{ZERat89q)-=VcMjwouZN4X?UvG3(M~jUb_6IGLTa#ce~Kv_MMT8|OB&aGYRY zX9-GaifeVZ>17{c+K<6B!Ov+Df6y8b!&5^%2?TV2%9o%B2~x&bHf>W{NX_#cpBp=F zB@q8OlKs5TdEfJ%_q^}#@^dg+Mc{3W53(beCXz367K?T!KUiW(n>23z0(u%M^!CU0^8lrq+;sc@B~* z(`)xlT5fImUzp48J60A4%3`1_wv|O+S!{4btE1$pJ)d24A056h6ghk-`}gJzlP9#m z{H)e(&1y~7_L8}^)OG#*2}E%6^YepRhrR#Zu8XMy^Fb{L%TA=A%?fJumZ`a|Zmkg1 zJT-`Yc_+Sd`OJM*LaVof@P@=GJv73)YQ4SurnK?yUa?lPi_J%)!(VV>vMyOat&FQZ zpDTJ#zXbcULCl%ZIymo=OV~rj$9i1du1uTVQ?qa#QTngCE@H(NN`qkBMNT%THOU-e zP!j@g^Iv^^5CJ#(uTf?977<;8{iPZ%0yf=Ny@no-9D_ylV%<%gFgvR?)TC~=Lu>xk zxraoic4?EVZ+GS$)U45Z)w;Ok_6Yx)>qkhRMES58kd`w!eWdC$Md$lI>DP+472~fc=lzhDc zb0}KM3Ugnjp)|YlEUXs30{_`nm-mbfhE>#aHFkf4tf1OLx%|QtGK@HEuG~uJ{R8&l zHl)*MhcSN`!v+yLtG+%4_0USgSV_D8n0+_^t7eR7x%mih&Sw2g1i;|otup9bo*uu3 zKr(T=f0D7HN$-nwYBQ(7`9k<^tWU@Ru6H@W>O{%i8~4M)<7)a24ab6) z0T0X(d0-+q!i|+%Y2MU)aI_tJRzq@GHXcBye3;V1YsPwOd2+2-%;l%I!ny_4yeAkC zk1w>F0NKSxbx*)+quu*ndog>h&fC8_*Co79=l7n~U7r}$n!HahdKSNrO(42{k*=GY z-GXyD?8?0D|E=k1e`BtDi^$yBb;4Vn&Q&4ZyE3bgL(&DW_b6=Kyn+5bx+m@=gLum8MhA(Zw6ZnbhDZoIJn?=p3> zcPCi!?l^^T-W~7b&$8go+vEM}InspInS0Ir-0?yPFQuIVtVWd}trX_=RXq8HrZYm^MXgY+`)eNJ1D%r$uXW!Zcd@ z_YXagHucySMQi$zw3#yX5l9Zsj7vVMn>r)=uiE=y#l6TIfsMb1+C5T~U-AlrL>u*! zN%rr4zYxDhCrzoN9p#4=XPVd^sqjVa_-lkr)qk?P4L0=Oh7TM49Vm(Nn>v2BD3qP} zdZ}t&+OQ$T>vNLRZVv_39J^iMyeyseL>*#42Xg>XuA>3SpF++WAc}mw5N8}G;1wd( z>#efiE#4|V3QYk1KZ8#VMooergVALm`3E4sgXBdO2duZMU$%&+G9t$3WW6+`R

j zR*UNUKqL6f;ByD(1G2G?d>ZrLg6H|OI@F)0uUGW6$gSQCr z8^w=;pTMSb#_t8+3hs=52;6DRb6XWZ>nMTL-(SVQQN^=W{LfXqr;6vR__wS0@2mK0 zRs4l2{^KhCw<#Z@dCmA;nru9!7GomkL7)p%xhY$4j zgrf)g`XZsh=wMH8I20A*lhIhh&{G0d1DTOTJQhkyf7E1>>G)XE7>$m^lhJhi%Z9Yl zM+tqIWX!}RCdQ5Nv|);a`}?E)M$$;>rqP?2z}*8yY;uNv;s}VCGW5|6PT6TpPnzQs zqZHGb5yE&Tp*kS3Lm!oDb7JFQhMbB|VZxvxW8RZY#FH|}q2xd*%#8-(;Tb&=2}k$o z354h{CW%X;=8%z!AD<~ZD)%`S5u}8&%2R}C5l2y%y3ImN0o_}LIHi!!6!|j>zoqa+ zh36IK75)xLKm1$d-X=sE`cL}jV#HCq>Gt2Rt72ZqSCd4Nd9ws8b3F1BY z)kuW>b3n#7f;)gX1$5(b_$CqYf0u|i;tz_i65)prjr&d^>J{DxXREEuQ3Uo@Z-sni*;EoBhFztTW7cxYBE|hH0xcYviPXppgW{ zPE{tPt_wrDGwHrm+A2+&Chgn$kq>Rfq`a8K84=Lb;!jXXyKkYH8i<8p^C0`3^ZXJM zoOw?=@4oxq@7#0G@7#OOefO;{Ll;6gl%G9$~CCWuec}m%)EV?$Y0 zIny+8_Gv~<`QJnNa8VGHRpuF`!Znd*2CEqJHlYe;)z^4`?6^#)0&1cz~C_Exbqo8EEK55-8vQ z@WSdkJZ_I*gg^|4cYYdb?RCRpc>#qGfKiAF39v$_Ze%QHpg^t1ARdU16~c9cWcdUI zYP}PZg0!Sh|`Rdd>p2)pERq(^mY<%j{+3`EFKlk+ClB2V6_idoDvYc@JI*jQ#ZyfB+$*P`g2 z!QD%t+ir5NIytvL$w>lc5}*)lKvY&sK+RQ;6=HA8kVz})r#!bD6QnOAmoO)j!_w}Yp&4R`7nsHxmnyjz8@9$vv z`nXSn^)y&XW16HfO{S2MI>pBr7|XOAzH1GPs;kRjhBzlyD8^A{Ccb${(AdK$!W6-1 z!-!KMK1hs5UQ%4flFSRYHNYuK7z)8s%Y5*5%R;^f?e}02>A}qC!OSQ~yb+&?EAp;s zVzuA%>G^N|PTt3QJ?Re?TMAIDAoHt{Qp{}R)TXamxA|LDFv_>5``G7loB_@lAW?x zse~z5^am>~4}+IjiL3-5F^I}a39%@?w25FPjBtyHtHFn?L{@x|PKbw%XIK6E0GmqE)GetQUL6&SXuD=URHX72(l7_Bq0e_@--%ctPpb)FE1;# zHztCt5OXRdz)GRUM35C?j^gEGrEp^+$O@oHzKXk#MC3Nc6V3b9hGF%e{in4@@w zS*f!z5oCp!qj*JGDc+a}vO>&Jyke}BY)k}MA?7Gv8}q5bh#)J(9K|cnmej^XkQHK% z;$_dLhEs#A5OWkSdp>QN8tbV7t0$#@O478>shlnnyv^YK+u7~c%)X1(+E3|%)_yOR zDoW6u5Dza|UQQRY*5o_CmsNO4Tt;rLpI>T{1;OQdekpUpp!PTCm-U44{w}t_t0;Dx zTjUqyerwS^7h!lcVbG#WEmIy=Ap!Ov#EWjN%e?4X4pZi${Of`E7#?Pac^~|^yK`ur zS|)B%kamVgYjY!ahVzT%Dz!{mfHHlE;jxX}_@t}UGG$$gLYU#5w9VPd)vfZ&7Oqmu z#0v3mZ@_3Pu!XCXxri0oJ=lA$^~j#y!I7o?7P*TbFUw(SpSYnY#MuLt90qgtCXeG= zn@;2{YoA!s3K*ry`RR=f&1sG`U=0BrmhQ6vYGCG;H~` z-cbWh&~&3EgcdGU-XQfd9^L4EiIo!+dng;Vq(G6T94#ZA+VXtCK^pjD^vfx1vsSf> zq9p&#KbqelQUIsLgY3|c6J93Z*53TBgMc$pmdXL5EnDkF?9$ zHBmm&Iy}igr&QG5bfIMUi@mRm=*jd8pt>2yPd+6-PS+)#ISoJDdf{LiDvh&^3CH9_KY5wFq)K);`nvnN!uNlbgM=D zVAH=mp9B<}>Dvc3fj0(5v&Tk;1CfsCbJ`exi3CEq%+c)bpLQ8t`wn&WMxwiq92?FY-x&z?WwHaW z2LLyWmtG{Dor=;iI&i!rH}Gao>F6IB8X6eJLti$lbPSK=209LOAAT;I%k=+3>BtUd zbECOTAD-;;w10PYFw@bmyfAz$cW5x9Kn|b4 zupCf&4;Tmc?=yN2>iVIsbZ>g!exs{b85$VsKXFn?k7kCmM@B}6NI|DbLSM22IoNs; a@)QQcZ&5nkiqefvQ2kw$&aZ;IYWZIZsq1n8 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o b/project1/cyassl-3.0.0/ctaocrypt/src/.libs/src_libcyassl_la-sha256.o deleted file mode 100644 index 8bb765ac05e4be2ef2cc660f8aa5388fdd6fe06b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3352 zcma)8eQZpEQk4pg5UdK zQQW&?#43&GpoLD)^a5)ZjERRcGc&OqJ`qj%Sk8rcFpQMM^lw`GnEuUG(aEPHV=S3) zL*3C8`EpFsN4tDX(uZ|3l2Ofp8u0+LfFCX%iTpt9ie9$8RA0L-6Ji~^Iy*>JFHpKP z%#N-LQ9xS{e}ToZI>9n#&6R{P>%uajhFF`%`iZ5Xb@`C}LYbyrDgHU;|DlUnj<1eR z1@Ub8q&`Cut6sW!)iNriW=R?8kf!KbL6Y)FY0vQG$bf_Q`Y zhz%?Uq~jC%Vs#!k*mX@0`Ei2OH6JhFr;#NOhP>=^C0@iv2y%jWv-k+1I@zFUge8^` z_zg#|X&O2koIQLu)sY|N6M*(GmC{m3XLgYoXE&5ygE-EH#H)^*;#HW_s_nWtFfHX# zm5fFJu1i;T)~4y@|8`!ybY5^;oUGR|Z5l`B3v@8%ahfxexuRW0%;93)Q7q6No$^_a zmg7#u6}bgF+>e6P0F!Xm6E^5dP!FgN)C*b$O2@qtHzDpZ6w`>9h0jbe`LGXjl=^^M z%F72W(Uc)_hvf^}1t?x&ebLKxvu;bv?7I>^_E=7Aot{_Ny7YZ}tkrd_l4lFzWjU_b zVmZ;&icr-t|6K03KHNRUlvN|M2)LHC=RyNfb7<^0bgjoMN32(v<%lnuN?+<*r)Fk4 zx~v^{G5Gi@-!BM!?}bvRiWTI*$XriOh!?Q$L}84KX7Bupg6x%Fk^97rUuDFFZ&0Q5^C_jDPbvL;O6liQN`8WuKR;LZ(d(0YHg5PvXG>gsuWzaDoO)pE2lwXPj#s?(?u`u% z{W*=r#rYlPUoS0nJneqi;#!+GzqGn0Yz|&D@809S(tWVQ6*}=w;)9>9*;)8rdu&bj zsSVBQ;>3yTLeASaJDy!|zx}7XbHAjVUTkcBuE_tL%BAOjch37Oi*3aVXK$^m>i<#g zy*78#=ZC&8w>6yEo4>d3uyKxhbZX|(@z0vqpPo21d1-9#%W-bg_DHK7u{SgaS{vJ3W&UvC@m$uw;PfG3;GFPb)T&BAe&86Az09qp1e z=p<)<^sddC3u?`dXg)gG|1Z1eVMFuHL8qq8M~Y0##z*Ir)Sis~8YZvG@I+{g`r-@) z(b_Y!7X?jrYLw)0Y-C7w8;HrYtlifkXJexwCjzl!&-3{EgT6f9Sn!u&WrgofzAXi`EuUfszUtc9j)#Wwy zHLF(p%j>z8U`s>$KCUJdXbtad3$<|1?+a8{`|H;Rnw#4iu!%FW6bc42^GS4g$uS(1 w5yp0Ovz6n10;)$~2C6yaJW%}tj{66w2^%9HxzW!@{XuDbAIS?ju0KQn1=EuV0{{R3 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/aes.c b/project1/cyassl-3.0.0/ctaocrypt/src/aes.c deleted file mode 100644 index 869203c4..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/aes.c +++ /dev/null @@ -1,3496 +0,0 @@ -/* aes.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_AES - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif -#ifdef DEBUG_AESNI - #include -#endif - - -#ifdef _MSC_VER - /* 4127 warning constant while(1) */ - #pragma warning(disable: 4127) -#endif - - - -#ifdef HAVE_CAVIUM - static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length, - const byte* iv); - static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in, - word32 length); - static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in, - word32 length); -#endif - -#if defined(CYASSL_PIC32MZ_CRYPT) - -#include "../../cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h" -#define DEBUG_CYASSL - - /* core hardware crypt engine driver */ - static void AesCrypt(Aes *aes, byte* out, const byte* in, word32 sz, - int dir, int algo, int cryptoalgo) - { - securityAssociation *sa_p ; - bufferDescriptor *bd_p ; - - volatile securityAssociation sa __attribute__((aligned (8))); - volatile bufferDescriptor bd __attribute__((aligned (8))); - volatile int k ; - - /* get uncached address */ - sa_p = KVA0_TO_KVA1(&sa) ; - bd_p = KVA0_TO_KVA1(&bd) ; - - /* Sync cache and physical memory */ - if(PIC32MZ_IF_RAM(in)) { - XMEMCPY((void *)KVA0_TO_KVA1(in), (void *)in, sz); - } - XMEMSET((void *)KVA0_TO_KVA1(out), 0, sz); - /* Set up the Security Association */ - XMEMSET((byte *)KVA0_TO_KVA1(&sa), 0, sizeof(sa)); - sa_p->SA_CTRL.ALGO = algo ; /* AES */ - sa_p->SA_CTRL.LNC = 1; - sa_p->SA_CTRL.LOADIV = 1; - sa_p->SA_CTRL.FB = 1; - sa_p->SA_CTRL.ENCTYPE = dir ; /* Encryption/Decryption */ - sa_p->SA_CTRL.CRYPTOALGO = cryptoalgo; - - if(cryptoalgo == PIC32_CRYPTOALGO_AES_GCM){ - switch(aes->keylen) { - case 32: - sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_256 ; - break ; - case 24: - sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_192 ; - break ; - case 16: - sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_128 ; - break ; - } - } else - sa_p->SA_CTRL.KEYSIZE = PIC32_AES_KEYSIZE_128 ; - - ByteReverseWords( - (word32 *)KVA0_TO_KVA1(sa.SA_ENCKEY + 8 - aes->keylen/sizeof(word32)), - (word32 *)aes->key_ce, aes->keylen); - ByteReverseWords( - (word32*)KVA0_TO_KVA1(sa.SA_ENCIV), (word32 *)aes->iv_ce, 16); - - XMEMSET((byte *)KVA0_TO_KVA1(&bd), 0, sizeof(bd)); - /* Set up the Buffer Descriptor */ - bd_p->BD_CTRL.BUFLEN = sz; - if(cryptoalgo == PIC32_CRYPTOALGO_AES_GCM) { - if(sz % 0x10) - bd_p->BD_CTRL.BUFLEN = (sz/0x10 + 1) * 0x10 ; - } - bd_p->BD_CTRL.LIFM = 1; - bd_p->BD_CTRL.SA_FETCH_EN = 1; - bd_p->BD_CTRL.LAST_BD = 1; - bd_p->BD_CTRL.DESC_EN = 1; - - bd_p->SA_ADDR = (unsigned int)KVA_TO_PA(&sa) ; - bd_p->SRCADDR = (unsigned int)KVA_TO_PA(in) ; - bd_p->DSTADDR = (unsigned int)KVA_TO_PA(out); - bd_p->MSGLEN = sz ; - - CECON = 1 << 6; - while (CECON); - - /* Run the engine */ - CEBDPADDR = (unsigned int)KVA_TO_PA(&bd) ; - CEINTEN = 0x07; - CECON = 0x27; - - WAIT_ENGINE ; - - if((cryptoalgo == PIC32_CRYPTOALGO_CBC) || - (cryptoalgo == PIC32_CRYPTOALGO_TCBC)|| - (cryptoalgo == PIC32_CRYPTOALGO_RCBC)) { - /* set iv for the next call */ - if(dir == PIC32_ENCRYPTION) { - XMEMCPY((void *)aes->iv_ce, - (void*)KVA0_TO_KVA1(out + sz - AES_BLOCK_SIZE), - AES_BLOCK_SIZE) ; - } else { - ByteReverseWords((word32*)aes->iv_ce, - (word32 *)KVA0_TO_KVA1(in + sz - AES_BLOCK_SIZE), - AES_BLOCK_SIZE); - } - } - XMEMCPY((byte *)out, (byte *)KVA0_TO_KVA1(out), sz) ; - ByteReverseWords((word32*)out, (word32 *)out, sz); - } - - int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - AesCrypt(aes, out, in, sz, PIC32_ENCRYPTION, PIC32_ALGO_AES, - PIC32_CRYPTOALGO_RCBC ); - } - - int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - AesCrypt(aes, out, in, sz, PIC32_DECRYPTION, PIC32_ALGO_AES, - PIC32_CRYPTOALGO_RCBC); - } - - #if defined(CYASSL_AES_COUNTER) - void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - int i ; - char out_block[AES_BLOCK_SIZE] ; - int odd ; - int even ; - char *tmp ; /* (char *)aes->tmp, for short */ - - tmp = (char *)aes->tmp ; - if(aes->left) { - if((aes->left + sz) >= AES_BLOCK_SIZE){ - odd = AES_BLOCK_SIZE - aes->left ; - } else { - odd = sz ; - } - XMEMCPY(tmp+aes->left, in, odd) ; - if((odd+aes->left) == AES_BLOCK_SIZE){ - AesCrypt(aes, out_block, tmp, AES_BLOCK_SIZE, - PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RCTR); - XMEMCPY(out, out_block+aes->left, odd) ; - aes->left = 0 ; - XMEMSET(tmp, 0x0, AES_BLOCK_SIZE) ; - /* Increment IV */ - for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { - if (++((byte *)aes->iv_ce)[i]) - break ; - } - } - in += odd ; - out+= odd ; - sz -= odd ; - } - odd = sz % AES_BLOCK_SIZE ; /* if there is tail flagment */ - if(sz / AES_BLOCK_SIZE) { - even = (sz/AES_BLOCK_SIZE)*AES_BLOCK_SIZE ; - AesCrypt(aes, out, in, even, PIC32_ENCRYPTION, PIC32_ALGO_AES, - PIC32_CRYPTOALGO_RCTR); - out += even ; - in += even ; - do { /* Increment IV */ - for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { - if (++((byte *)aes->iv_ce)[i]) - break ; - } - even -= AES_BLOCK_SIZE ; - } while((int)even > 0) ; - } - if(odd) { - XMEMSET(tmp+aes->left, 0x0, AES_BLOCK_SIZE - aes->left) ; - XMEMCPY(tmp+aes->left, in, odd) ; - AesCrypt(aes, out_block, tmp, AES_BLOCK_SIZE, - PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RCTR); - XMEMCPY(out, out_block+aes->left,odd) ; - aes->left += odd ; - } - } - #endif /* CYASSL_AES_COUNTER */ - - #ifdef HAVE_AESGCM - #define HAVE_AES_ENGINE - /* Hardware AESGCM borows most of the software AESGCM, GMAC */ - #endif - -#endif /* CYASSL_PIC32MZ_CRYPT */ - -#ifdef STM32F2_CRYPTO - /* - * STM32F2 hardware AES support through the STM32F2 standard peripheral - * library. Documentation located in STM32F2xx Standard Peripheral Library - * document (See note in README). - */ - #include "stm32f2xx.h" - #include "stm32f2xx_cryp.h" - - int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, - int dir) - { - word32 *rk = aes->key; - - if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) - return BAD_FUNC_ARG; - - aes->rounds = keylen/4 + 6; - XMEMCPY(rk, userKey, keylen); - ByteReverseWords(rk, rk, keylen); - - return AesSetIV(aes, iv); - } - - int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - word32 *enc_key, *iv; - CRYP_InitTypeDef AES_CRYP_InitStructure; - CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; - CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; - - enc_key = aes->key; - iv = aes->reg; - - /* crypto structure initialization */ - CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); - CRYP_StructInit(&AES_CRYP_InitStructure); - CRYP_IVStructInit(&AES_CRYP_IVInitStructure); - - /* reset registers to their default values */ - CRYP_DeInit(); - - /* load key into correct registers */ - switch(aes->rounds) - { - case 10: /* 128-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[3]; - break; - - case 12: /* 192-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[5]; - break; - - case 14: /* 256-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; - AES_CRYP_KeyInitStructure.CRYP_Key0Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key0Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[5]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[6]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[7]; - break; - - default: - break; - } - CRYP_KeyInit(&AES_CRYP_KeyInitStructure); - - /* set iv */ - ByteReverseWords(iv, iv, AES_BLOCK_SIZE); - AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; - AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; - AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; - AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; - CRYP_IVInit(&AES_CRYP_IVInitStructure); - - /* set direction, mode, and datatype */ - AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; - AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CBC; - AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; - CRYP_Init(&AES_CRYP_InitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - while (sz > 0) - { - /* flush IN/OUT FIFOs */ - CRYP_FIFOFlush(); - - CRYP_DataIn(*(uint32_t*)&in[0]); - CRYP_DataIn(*(uint32_t*)&in[4]); - CRYP_DataIn(*(uint32_t*)&in[8]); - CRYP_DataIn(*(uint32_t*)&in[12]); - - /* wait until the complete message has been processed */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - *(uint32_t*)&out[0] = CRYP_DataOut(); - *(uint32_t*)&out[4] = CRYP_DataOut(); - *(uint32_t*)&out[8] = CRYP_DataOut(); - *(uint32_t*)&out[12] = CRYP_DataOut(); - - /* store iv for next call */ - XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - - sz -= 16; - in += 16; - out += 16; - } - - /* disable crypto processor */ - CRYP_Cmd(DISABLE); - - return 0; - } - - int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - word32 *dec_key, *iv; - CRYP_InitTypeDef AES_CRYP_InitStructure; - CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; - CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; - - dec_key = aes->key; - iv = aes->reg; - - /* crypto structure initialization */ - CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); - CRYP_StructInit(&AES_CRYP_InitStructure); - CRYP_IVStructInit(&AES_CRYP_IVInitStructure); - - /* if input and output same will overwrite input iv */ - XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - - /* reset registers to their default values */ - CRYP_DeInit(); - - /* load key into correct registers */ - switch(aes->rounds) - { - case 10: /* 128-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[3]; - break; - - case 12: /* 192-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = dec_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = dec_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[5]; - break; - - case 14: /* 256-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; - AES_CRYP_KeyInitStructure.CRYP_Key0Left = dec_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key0Right = dec_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = dec_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = dec_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = dec_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = dec_key[5]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = dec_key[6]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = dec_key[7]; - break; - - default: - break; - } - - /* set direction, mode, and datatype for key preparation */ - AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; - AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_Key; - AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_32b; - CRYP_Init(&AES_CRYP_InitStructure); - CRYP_KeyInit(&AES_CRYP_KeyInitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - /* wait until key has been prepared */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - /* set direction, mode, and datatype for decryption */ - AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; - AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CBC; - AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; - CRYP_Init(&AES_CRYP_InitStructure); - - /* set iv */ - ByteReverseWords(iv, iv, AES_BLOCK_SIZE); - - AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; - AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; - AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; - AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; - CRYP_IVInit(&AES_CRYP_IVInitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - while (sz > 0) - { - /* flush IN/OUT FIFOs */ - CRYP_FIFOFlush(); - - CRYP_DataIn(*(uint32_t*)&in[0]); - CRYP_DataIn(*(uint32_t*)&in[4]); - CRYP_DataIn(*(uint32_t*)&in[8]); - CRYP_DataIn(*(uint32_t*)&in[12]); - - /* wait until the complete message has been processed */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - *(uint32_t*)&out[0] = CRYP_DataOut(); - *(uint32_t*)&out[4] = CRYP_DataOut(); - *(uint32_t*)&out[8] = CRYP_DataOut(); - *(uint32_t*)&out[12] = CRYP_DataOut(); - - /* store iv for next call */ - XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); - - sz -= 16; - in += 16; - out += 16; - } - - /* disable crypto processor */ - CRYP_Cmd(DISABLE); - - return 0; - } - - #ifdef CYASSL_AES_COUNTER - - /* AES-CTR calls this for key setup */ - int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen, - const byte* iv, int dir) - { - return AesSetKey(aes, userKey, keylen, iv, dir); - } - - void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - word32 *enc_key, *iv; - CRYP_InitTypeDef AES_CRYP_InitStructure; - CRYP_KeyInitTypeDef AES_CRYP_KeyInitStructure; - CRYP_IVInitTypeDef AES_CRYP_IVInitStructure; - - enc_key = aes->key; - iv = aes->reg; - - /* crypto structure initialization */ - CRYP_KeyStructInit(&AES_CRYP_KeyInitStructure); - CRYP_StructInit(&AES_CRYP_InitStructure); - CRYP_IVStructInit(&AES_CRYP_IVInitStructure); - - /* reset registers to their default values */ - CRYP_DeInit(); - - /* load key into correct registers */ - switch(aes->rounds) - { - case 10: /* 128-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_128b; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[3]; - break; - - case 12: /* 192-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_192b; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[5]; - break; - - case 14: /* 256-bit key */ - AES_CRYP_InitStructure.CRYP_KeySize = CRYP_KeySize_256b; - AES_CRYP_KeyInitStructure.CRYP_Key0Left = enc_key[0]; - AES_CRYP_KeyInitStructure.CRYP_Key0Right = enc_key[1]; - AES_CRYP_KeyInitStructure.CRYP_Key1Left = enc_key[2]; - AES_CRYP_KeyInitStructure.CRYP_Key1Right = enc_key[3]; - AES_CRYP_KeyInitStructure.CRYP_Key2Left = enc_key[4]; - AES_CRYP_KeyInitStructure.CRYP_Key2Right = enc_key[5]; - AES_CRYP_KeyInitStructure.CRYP_Key3Left = enc_key[6]; - AES_CRYP_KeyInitStructure.CRYP_Key3Right = enc_key[7]; - break; - - default: - break; - } - CRYP_KeyInit(&AES_CRYP_KeyInitStructure); - - /* set iv */ - ByteReverseWords(iv, iv, AES_BLOCK_SIZE); - AES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; - AES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; - AES_CRYP_IVInitStructure.CRYP_IV1Left = iv[2]; - AES_CRYP_IVInitStructure.CRYP_IV1Right = iv[3]; - CRYP_IVInit(&AES_CRYP_IVInitStructure); - - /* set direction, mode, and datatype */ - AES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; - AES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_AES_CTR; - AES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; - CRYP_Init(&AES_CRYP_InitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - while (sz > 0) - { - /* flush IN/OUT FIFOs */ - CRYP_FIFOFlush(); - - CRYP_DataIn(*(uint32_t*)&in[0]); - CRYP_DataIn(*(uint32_t*)&in[4]); - CRYP_DataIn(*(uint32_t*)&in[8]); - CRYP_DataIn(*(uint32_t*)&in[12]); - - /* wait until the complete message has been processed */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - *(uint32_t*)&out[0] = CRYP_DataOut(); - *(uint32_t*)&out[4] = CRYP_DataOut(); - *(uint32_t*)&out[8] = CRYP_DataOut(); - *(uint32_t*)&out[12] = CRYP_DataOut(); - - /* store iv for next call */ - XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - - sz -= 16; - in += 16; - out += 16; - } - - /* disable crypto processor */ - CRYP_Cmd(DISABLE); - } - - #endif /* CYASSL_AES_COUNTER */ - - -#elif defined(HAVE_COLDFIRE_SEC) - -#include "sec.h" -#include "mcf548x_sec.h" -#include "mcf548x_siu.h" - -#include "memory_pools.h" -extern TX_BYTE_POOL mp_ncached; /* Non Cached memory pool */ -#define AES_BUFFER_SIZE (AES_BLOCK_SIZE * 8) -static unsigned char *AESBuffer = NULL ; - -#define SEC_DESC_AES_CBC_ENCRYPT 0x60300010 -#define SEC_DESC_AES_CBC_DECRYPT 0x60200010 -#define AES_BLOCK_LENGTH 16 - -extern volatile unsigned char __MBAR[]; - -int AesCbcEncrypt(Aes* aes, byte* po, const byte* pi, word32 sz) -{ - return(AesCbcCrypt(aes, po, pi, sz, SEC_DESC_AES_CBC_ENCRYPT)) ; -} - -int AesCbcDecrypt(Aes* aes, byte* po, const byte* pi, word32 sz) -{ - return(AesCbcCrypt(aes, po, pi, sz, SEC_DESC_AES_CBC_DECRYPT)) ; -} - -static int AesCbcCrypt(Aes* aes, byte* po, const byte* pi, word32 sz, word32 descHeader) -{ - - int i ; int stat1, stat2 ; - int ret ; int size ; - static SECdescriptorType descriptor; - volatile int v ; - - if((pi == NULL) || (po == NULL)) - return BAD_FUNC_ARG;/*wrong pointer*/ - - while(sz) { - if((sz%AES_BUFFER_SIZE) == sz) { - size = sz ; - sz = 0 ; - } else { - size = AES_BUFFER_SIZE ; - sz -= AES_BUFFER_SIZE ; - } - - /* Set descriptor for SEC */ - descriptor.header = descHeader ; - /* - descriptor.length1 = 0x0; - descriptor.pointer1 = NULL; - */ - descriptor.length2 = AES_BLOCK_SIZE; - descriptor.pointer2 = (byte *)aes->reg ; /* Initial Vector */ - - switch(aes->rounds) { - case 10: descriptor.length3 = 16 ; break ; - case 12: descriptor.length3 = 24 ; break ; - case 14: descriptor.length3 = 32 ; break ; - } - - descriptor.pointer3 = (byte *)aes->key; - descriptor.length4 = size; - descriptor.pointer4 = (byte *)pi ; - descriptor.length5 = size; - descriptor.pointer5 = AESBuffer ; - /* - descriptor.length6 = 0x0; - descriptor.pointer6 = NULL; - descriptor.length7 = 0x0; - descriptor.pointer7 = NULL; - descriptor.nextDescriptorPtr = NULL; - */ - - /* Initialize SEC and wait for encryption to complete */ - MCF_SEC_CCCR0 = 0x00000000; - - /* Point SEC to the location of the descriptor */ - MCF_SEC_FR0 = (uint32)&descriptor; - - /* poll SISR to determine when channel is complete */ - i=0 ; - while (!(MCF_SEC_SISRL) && !(MCF_SEC_SISRH))i++ ; - for(v=0; v<100; v++) ; - - ret = MCF_SEC_SISRH; - stat1 = MCF_SEC_AESSR ; - stat2 = MCF_SEC_AESISR ; - if(ret & 0xe0000000) - { - db_printf("Aes_Cbc(i=%d):ISRH=%08x, AESSR=%08x, AESISR=%08x\n", i, ret, stat1, stat2) ; - } - - XMEMCPY(po, AESBuffer, size) ; - - if(descHeader == SEC_DESC_AES_CBC_ENCRYPT) { - XMEMCPY((void*)aes->reg, (void*)&(po[size-AES_BLOCK_SIZE]), AES_BLOCK_SIZE) ; - } else { - XMEMCPY((void*)aes->reg, (void*)&(pi[size-AES_BLOCK_SIZE]), AES_BLOCK_SIZE) ; - } - - pi += size ; - po += size ; - } - - return 0 ; /* for descriptier header 0xff000000 mode */ -} - -int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, - int dir) -{ - int status ; - - if(AESBuffer == NULL) { - status = tx_byte_allocate(&mp_ncached,(void *)&AESBuffer, AES_BUFFER_SIZE,TX_NO_WAIT); - } - - if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) - return BAD_FUNC_ARG; - if (aes == NULL) - return BAD_FUNC_ARG; - - aes->rounds = keylen/4 + 6; - - XMEMCPY(aes->key, userKey, keylen); - if (iv) - XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); - return 0; -} - -#elif defined FREESCALE_MMCAU - /* - * Freescale mmCAU hardware AES support through the CAU/mmCAU library. - * Documentation located in ColdFire/ColdFire+ CAU and Kinetis mmCAU - * Software Library User Guide (See note in README). - */ - #include "cau_api.h" - - int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, - int dir) - { - byte *rk = (byte*)aes->key; - - if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) - return BAD_FUNC_ARG; - - if (rk == NULL) - return BAD_FUNC_ARG; - - aes->rounds = keylen/4 + 6; - cau_aes_set_key(userKey, keylen*8, rk); - - return AesSetIV(aes, iv); - } - - int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - - byte *iv, *enc_key; - byte temp_block[AES_BLOCK_SIZE]; - - iv = (byte*)aes->reg; - enc_key = (byte*)aes->key; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, AES_BLOCK_SIZE); - - /* XOR block with IV for CBC */ - for (i = 0; i < AES_BLOCK_SIZE; i++) - temp_block[i] ^= iv[i]; - - cau_aes_encrypt(temp_block, enc_key, aes->rounds, out + offset); - - len -= AES_BLOCK_SIZE; - offset += AES_BLOCK_SIZE; - - /* store IV for next block */ - XMEMCPY(iv, out + offset - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - } - - return 0; - } - - int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - - byte* iv, *dec_key; - byte temp_block[AES_BLOCK_SIZE]; - - iv = (byte*)aes->reg; - dec_key = (byte*)aes->key; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, AES_BLOCK_SIZE); - - cau_aes_decrypt(in + offset, dec_key, aes->rounds, out + offset); - - /* XOR block with IV for CBC */ - for (i = 0; i < AES_BLOCK_SIZE; i++) - (out + offset)[i] ^= iv[i]; - - /* store IV for next block */ - XMEMCPY(iv, temp_block, AES_BLOCK_SIZE); - - len -= AES_BLOCK_SIZE; - offset += AES_BLOCK_SIZE; - } - - return 0; - } - - -#else /* CTaoCrypt software implementation */ - -static const word32 rcon[] = { - 0x01000000, 0x02000000, 0x04000000, 0x08000000, - 0x10000000, 0x20000000, 0x40000000, 0x80000000, - 0x1B000000, 0x36000000, - /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ -}; - - -static const word32 Te[5][256] = { -{ - 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, - 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, - 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, - 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, - 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, - 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, - 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, - 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, - 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, - 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, - 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, - 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, - 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, - 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, - 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, - 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, - 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, - 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, - 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, - 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, - 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, - 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, - 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, - 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, - 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, - 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, - 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, - 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, - 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, - 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, - 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, - 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, - 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, - 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, - 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, - 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, - 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, - 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, - 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, - 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, - 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, - 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, - 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, - 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, - 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, - 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, - 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, - 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, - 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, - 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, - 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, - 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, - 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, - 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, - 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, - 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, - 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, - 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, - 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, - 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, - 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, - 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, - 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, - 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, -}, -{ - 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, - 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, - 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, - 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, - 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, - 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, - 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, - 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, - 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, - 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, - 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, - 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, - 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, - 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, - 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, - 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, - 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, - 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, - 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, - 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, - 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, - 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, - 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, - 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, - 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, - 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, - 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, - 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, - 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, - 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, - 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, - 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, - 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, - 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, - 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, - 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, - 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, - 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, - 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, - 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, - 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, - 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, - 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, - 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, - 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, - 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, - 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, - 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, - 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, - 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, - 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, - 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, - 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, - 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, - 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, - 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, - 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, - 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, - 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, - 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, - 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, - 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, - 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, - 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, -}, -{ - 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, - 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, - 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, - 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, - 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, - 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, - 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, - 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, - 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, - 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, - 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, - 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, - 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, - 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, - 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, - 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, - 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, - 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, - 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, - 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, - 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, - 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, - 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, - 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, - 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, - 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, - 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, - 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, - 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, - 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, - 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, - 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, - 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, - 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, - 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, - 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, - 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, - 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, - 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, - 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, - 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, - 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, - 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, - 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, - 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, - 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, - 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, - 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, - 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, - 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, - 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, - 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, - 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, - 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, - 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, - 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, - 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, - 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, - 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, - 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, - 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, - 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, - 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, - 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, -}, -{ - 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, - 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, - 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, - 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, - 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, - 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, - 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, - 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, - 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, - 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, - 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, - 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, - 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, - 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, - 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, - 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, - 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, - 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, - 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, - 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, - 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, - 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, - 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, - 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, - 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, - 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, - 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, - 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, - 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, - 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, - 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, - 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, - 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, - 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, - 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, - 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, - 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, - 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, - 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, - 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, - 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, - 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, - 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, - 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, - 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, - 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, - 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, - 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, - 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, - 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, - 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, - 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, - 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, - 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, - 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, - 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, - 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, - 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, - 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, - 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, - 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, - 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, - 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, - 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, -}, -{ - 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, - 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, - 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, - 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, - 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, - 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, - 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, - 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, - 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, - 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, - 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, - 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, - 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, - 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, - 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, - 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, - 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, - 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, - 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, - 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, - 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, - 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, - 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, - 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, - 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, - 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, - 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, - 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, - 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, - 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, - 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, - 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, - 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, - 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, - 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, - 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, - 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, - 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, - 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, - 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, - 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, - 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, - 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, - 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, - 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, - 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, - 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, - 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, - 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, - 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, - 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, - 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, - 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, - 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, - 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, - 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, - 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, - 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, - 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, - 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, - 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, - 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, - 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, - 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, -} -}; - - -static const word32 Td[5][256] = { -{ - 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, - 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, - 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, - 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, - 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, - 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, - 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, - 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, - 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, - 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, - 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, - 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, - 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, - 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, - 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, - 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, - 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, - 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, - 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, - 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, - 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, - 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, - 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, - 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, - 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, - 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, - 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, - 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, - 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, - 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, - 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, - 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, - 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, - 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, - 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, - 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, - 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, - 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, - 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, - 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, - 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, - 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, - 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, - 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, - 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, - 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, - 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, - 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, - 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, - 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, - 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, - 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, - 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, - 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, - 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, - 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, - 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, - 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, - 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, - 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, - 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, - 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, - 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, - 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, -}, -{ - 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, - 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, - 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, - 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, - 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, - 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, - 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, - 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, - 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, - 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, - 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, - 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, - 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, - 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, - 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, - 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, - 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, - 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, - 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, - 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, - 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, - 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, - 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, - 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, - 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, - 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, - 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, - 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, - 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, - 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, - 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, - 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, - 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, - 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, - 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, - 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, - 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, - 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, - 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, - 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, - 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, - 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, - 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, - 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, - 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, - 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, - 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, - 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, - 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, - 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, - 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, - 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, - 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, - 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, - 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, - 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, - 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, - 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, - 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, - 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, - 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, - 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, - 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, - 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, -}, -{ - 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, - 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, - 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, - 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, - 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, - 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, - 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, - 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, - 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, - 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, - 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, - 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, - 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, - 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, - 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, - 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, - 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, - 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, - 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, - 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, - - 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, - 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, - 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, - 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, - 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, - 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, - 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, - 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, - 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, - 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, - 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, - 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, - 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, - 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, - 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, - 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, - 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, - 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, - 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, - 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, - 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, - 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, - 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, - 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, - 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, - 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, - 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, - 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, - 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, - 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, - 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, - 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, - 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, - 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, - 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, - 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, - 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, - 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, - 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, - 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, - 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, - 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, - 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, - 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, -}, -{ - 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, - 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, - 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, - 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, - 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, - 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, - 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, - 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, - 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, - 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, - 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, - 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, - 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, - 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, - 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, - 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, - 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, - 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, - 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, - 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, - 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, - 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, - 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, - 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, - 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, - 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, - 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, - 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, - 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, - 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, - 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, - 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, - 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, - 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, - 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, - 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, - 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, - 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, - 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, - 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, - 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, - 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, - 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, - 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, - 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, - 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, - 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, - 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, - 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, - 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, - 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, - 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, - 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, - 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, - 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, - 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, - 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, - 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, - 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, - 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, - 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, - 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, - 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, - 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, -}, -{ - 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, - 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, - 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, - 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, - 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, - 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, - 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, - 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, - 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, - 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, - 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, - 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, - 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, - 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, - 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, - 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, - 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, - 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, - 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, - 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, - 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, - 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, - 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, - 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, - 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, - 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, - 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, - 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, - 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, - 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, - 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, - 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, - 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, - 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, - 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, - 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, - 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, - 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, - 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, - 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, - 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, - 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, - 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, - 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, - 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, - 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, - 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, - 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, - 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, - 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, - 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, - 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, - 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, - 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, - 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, - 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, - 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, - 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, - 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, - 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, - 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, - 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, - 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, - 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, -} -}; - - -#define GETBYTE(x, y) (word32)((byte)((x) >> (8 * (y)))) - - -#ifdef CYASSL_AESNI - -#ifndef _MSC_VER - - #define cpuid(func,ax,bx,cx,dx)\ - __asm__ __volatile__ ("cpuid":\ - "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func)); - -#else - - #define cpuid(func,ax,bx,cx,dx)\ - __asm mov eax, func \ - __asm cpuid \ - __asm mov ax, eax \ - __asm mov bx, ebx \ - __asm mov cx, ecx \ - __asm mov dx, edx - -#endif /* _MSC_VER */ - - -static int Check_CPU_support_AES(void) -{ - unsigned int a,b,c,d; - cpuid(1,a,b,c,d); - - if (c & 0x2000000) - return 1; - - return 0; -} - -static int checkAESNI = 0; -static int haveAESNI = 0; - - -/* tell C compiler these are asm functions in case any mix up of ABI underscore - prefix between clang/gcc/llvm etc */ -void AES_CBC_encrypt(const unsigned char* in, unsigned char* out, - unsigned char* ivec, unsigned long length, - const unsigned char* KS, int nr) - asm ("AES_CBC_encrypt"); - - -void AES_CBC_decrypt(const unsigned char* in, unsigned char* out, - unsigned char* ivec, unsigned long length, - const unsigned char* KS, int nr) - asm ("AES_CBC_decrypt"); - -void AES_ECB_encrypt(const unsigned char* in, unsigned char* out, - unsigned long length, const unsigned char* KS, int nr) - asm ("AES_ECB_encrypt"); - - -void AES_ECB_decrypt(const unsigned char* in, unsigned char* out, - unsigned long length, const unsigned char* KS, int nr) - asm ("AES_ECB_decrypt"); - -void AES_128_Key_Expansion(const unsigned char* userkey, - unsigned char* key_schedule) - asm ("AES_128_Key_Expansion"); - -void AES_192_Key_Expansion(const unsigned char* userkey, - unsigned char* key_schedule) - asm ("AES_192_Key_Expansion"); - -void AES_256_Key_Expansion(const unsigned char* userkey, - unsigned char* key_schedule) - asm ("AES_256_Key_Expansion"); - - -static int AES_set_encrypt_key(const unsigned char *userKey, const int bits, - Aes* aes) -{ - if (!userKey || !aes) - return BAD_FUNC_ARG; - - if (bits == 128) { - AES_128_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 10; - return 0; - } - else if (bits == 192) { - AES_192_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 12; - return 0; - } - else if (bits == 256) { - AES_256_Key_Expansion (userKey,(byte*)aes->key); aes->rounds = 14; - return 0; - } - return BAD_FUNC_ARG; -} - - -static int AES_set_decrypt_key(const unsigned char* userKey, const int bits, - Aes* aes) -{ - int nr; - Aes temp_key; - __m128i *Key_Schedule = (__m128i*)aes->key; - __m128i *Temp_Key_Schedule = (__m128i*)temp_key.key; - - if (!userKey || !aes) - return BAD_FUNC_ARG; - - if (AES_set_encrypt_key(userKey,bits,&temp_key) == BAD_FUNC_ARG) - return BAD_FUNC_ARG; - - nr = temp_key.rounds; - aes->rounds = nr; - - Key_Schedule[nr] = Temp_Key_Schedule[0]; - Key_Schedule[nr-1] = _mm_aesimc_si128(Temp_Key_Schedule[1]); - Key_Schedule[nr-2] = _mm_aesimc_si128(Temp_Key_Schedule[2]); - Key_Schedule[nr-3] = _mm_aesimc_si128(Temp_Key_Schedule[3]); - Key_Schedule[nr-4] = _mm_aesimc_si128(Temp_Key_Schedule[4]); - Key_Schedule[nr-5] = _mm_aesimc_si128(Temp_Key_Schedule[5]); - Key_Schedule[nr-6] = _mm_aesimc_si128(Temp_Key_Schedule[6]); - Key_Schedule[nr-7] = _mm_aesimc_si128(Temp_Key_Schedule[7]); - Key_Schedule[nr-8] = _mm_aesimc_si128(Temp_Key_Schedule[8]); - Key_Schedule[nr-9] = _mm_aesimc_si128(Temp_Key_Schedule[9]); - - if(nr>10) { - Key_Schedule[nr-10] = _mm_aesimc_si128(Temp_Key_Schedule[10]); - Key_Schedule[nr-11] = _mm_aesimc_si128(Temp_Key_Schedule[11]); - } - - if(nr>12) { - Key_Schedule[nr-12] = _mm_aesimc_si128(Temp_Key_Schedule[12]); - Key_Schedule[nr-13] = _mm_aesimc_si128(Temp_Key_Schedule[13]); - } - - Key_Schedule[0] = Temp_Key_Schedule[nr]; - - return 0; -} - - - -#endif /* CYASSL_AESNI */ - - -static int AesSetKeyLocal(Aes* aes, const byte* userKey, word32 keylen, - const byte* iv, int dir) -{ - word32 temp, *rk = aes->key; - unsigned int i = 0; - - #ifdef CYASSL_AESNI - aes->use_aesni = 0; - #endif /* CYASSL_AESNI */ - #ifdef CYASSL_AES_COUNTER - aes->left = 0; - #endif /* CYASSL_AES_COUNTER */ - - aes->rounds = keylen/4 + 6; - - XMEMCPY(rk, userKey, keylen); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(rk, rk, keylen); - #endif - -#ifdef CYASSL_PIC32MZ_CRYPT - { - word32 *akey1 = aes->key_ce; - word32 *areg = aes->iv_ce ; - aes->keylen = keylen ; - XMEMCPY(akey1, userKey, keylen); - if (iv) - XMEMCPY(areg, iv, AES_BLOCK_SIZE); - else - XMEMSET(areg, 0, AES_BLOCK_SIZE); - } -#endif - - switch(keylen) - { - case 16: - while (1) - { - temp = rk[3]; - rk[4] = rk[0] ^ - (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ - (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon[i]; - rk[5] = rk[1] ^ rk[4]; - rk[6] = rk[2] ^ rk[5]; - rk[7] = rk[3] ^ rk[6]; - if (++i == 10) - break; - rk += 4; - } - break; - - case 24: - while (1) /* for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack */ - { - temp = rk[ 5]; - rk[ 6] = rk[ 0] ^ - (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ - (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon[i]; - rk[ 7] = rk[ 1] ^ rk[ 6]; - rk[ 8] = rk[ 2] ^ rk[ 7]; - rk[ 9] = rk[ 3] ^ rk[ 8]; - if (++i == 8) - break; - rk[10] = rk[ 4] ^ rk[ 9]; - rk[11] = rk[ 5] ^ rk[10]; - rk += 6; - } - break; - - case 32: - while (1) - { - temp = rk[ 7]; - rk[ 8] = rk[ 0] ^ - (Te[4][GETBYTE(temp, 2)] & 0xff000000) ^ - (Te[4][GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te[4][GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te[4][GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon[i]; - rk[ 9] = rk[ 1] ^ rk[ 8]; - rk[10] = rk[ 2] ^ rk[ 9]; - rk[11] = rk[ 3] ^ rk[10]; - if (++i == 7) - break; - temp = rk[11]; - rk[12] = rk[ 4] ^ - (Te[4][GETBYTE(temp, 3)] & 0xff000000) ^ - (Te[4][GETBYTE(temp, 2)] & 0x00ff0000) ^ - (Te[4][GETBYTE(temp, 1)] & 0x0000ff00) ^ - (Te[4][GETBYTE(temp, 0)] & 0x000000ff); - rk[13] = rk[ 5] ^ rk[12]; - rk[14] = rk[ 6] ^ rk[13]; - rk[15] = rk[ 7] ^ rk[14]; - - rk += 8; - } - break; - - default: - return BAD_FUNC_ARG; - } - - if (dir == AES_DECRYPTION) - { - unsigned int j; - rk = aes->key; - - /* invert the order of the round keys: */ - for (i = 0, j = 4* aes->rounds; i < j; i += 4, j -= 4) { - temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; - temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; - temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; - temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; - } - /* apply the inverse MixColumn transform to all round keys but the - first and the last: */ - for (i = 1; i < aes->rounds; i++) { - rk += 4; - rk[0] = - Td[0][Te[4][GETBYTE(rk[0], 3)] & 0xff] ^ - Td[1][Te[4][GETBYTE(rk[0], 2)] & 0xff] ^ - Td[2][Te[4][GETBYTE(rk[0], 1)] & 0xff] ^ - Td[3][Te[4][GETBYTE(rk[0], 0)] & 0xff]; - rk[1] = - Td[0][Te[4][GETBYTE(rk[1], 3)] & 0xff] ^ - Td[1][Te[4][GETBYTE(rk[1], 2)] & 0xff] ^ - Td[2][Te[4][GETBYTE(rk[1], 1)] & 0xff] ^ - Td[3][Te[4][GETBYTE(rk[1], 0)] & 0xff]; - rk[2] = - Td[0][Te[4][GETBYTE(rk[2], 3)] & 0xff] ^ - Td[1][Te[4][GETBYTE(rk[2], 2)] & 0xff] ^ - Td[2][Te[4][GETBYTE(rk[2], 1)] & 0xff] ^ - Td[3][Te[4][GETBYTE(rk[2], 0)] & 0xff]; - rk[3] = - Td[0][Te[4][GETBYTE(rk[3], 3)] & 0xff] ^ - Td[1][Te[4][GETBYTE(rk[3], 2)] & 0xff] ^ - Td[2][Te[4][GETBYTE(rk[3], 1)] & 0xff] ^ - Td[3][Te[4][GETBYTE(rk[3], 0)] & 0xff]; - } - } - - return AesSetIV(aes, iv); -} - - -int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, - int dir) -{ - - if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) - return BAD_FUNC_ARG; - -#ifdef HAVE_CAVIUM - if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) - return AesCaviumSetKey(aes, userKey, keylen, iv); -#endif - -#ifdef CYASSL_AESNI - if (checkAESNI == 0) { - haveAESNI = Check_CPU_support_AES(); - checkAESNI = 1; - } - if (haveAESNI) { - aes->use_aesni = 1; - if (iv) - XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); - if (dir == AES_ENCRYPTION) - return AES_set_encrypt_key(userKey, keylen * 8, aes); - else - return AES_set_decrypt_key(userKey, keylen * 8, aes); - } -#endif /* CYASSL_AESNI */ - - return AesSetKeyLocal(aes, userKey, keylen, iv, dir); -} - - -static void AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock) -{ - word32 s0, s1, s2, s3; - word32 t0, t1, t2, t3; - word32 r = aes->rounds >> 1; - - const word32* rk = aes->key; - if (r > 7 || r == 0) { - CYASSL_MSG("AesEncrypt encountered improper key, set it up"); - return; /* stop instead of segfaulting, set up your keys! */ - } -#ifdef CYASSL_AESNI - if (haveAESNI && aes->use_aesni) { - #ifdef DEBUG_AESNI - printf("about to aes encrypt\n"); - printf("in = %p\n", inBlock); - printf("out = %p\n", outBlock); - printf("aes->key = %p\n", aes->key); - printf("aes->rounds = %d\n", aes->rounds); - printf("sz = %d\n", AES_BLOCK_SIZE); - #endif - - /* check alignment, decrypt doesn't need alignment */ - if ((word)inBlock % 16) { - #ifndef NO_CYASSL_ALLOC_ALIGN - byte* tmp = (byte*)XMALLOC(AES_BLOCK_SIZE, NULL, - DYNAMIC_TYPE_TMP_BUFFER); - if (tmp == NULL) return; - - XMEMCPY(tmp, inBlock, AES_BLOCK_SIZE); - AES_ECB_encrypt(tmp, tmp, AES_BLOCK_SIZE, (byte*)aes->key, - aes->rounds); - XMEMCPY(outBlock, tmp, AES_BLOCK_SIZE); - XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return; - #else - CYASSL_MSG("AES-ECB encrypt with bad alignment"); - return; - #endif - } - - AES_ECB_encrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key, - aes->rounds); - - return; - } - else { - #ifdef DEBUG_AESNI - printf("Skipping AES-NI\n"); - #endif - } -#endif - - /* - * map byte array block to cipher state - * and add initial round key: - */ - XMEMCPY(&s0, inBlock, sizeof(s0)); - XMEMCPY(&s1, inBlock + sizeof(s0), sizeof(s1)); - XMEMCPY(&s2, inBlock + 2 * sizeof(s0), sizeof(s2)); - XMEMCPY(&s3, inBlock + 3 * sizeof(s0), sizeof(s3)); - - #ifdef LITTLE_ENDIAN_ORDER - s0 = ByteReverseWord32(s0); - s1 = ByteReverseWord32(s1); - s2 = ByteReverseWord32(s2); - s3 = ByteReverseWord32(s3); - #endif - - s0 ^= rk[0]; - s1 ^= rk[1]; - s2 ^= rk[2]; - s3 ^= rk[3]; - - /* - * Nr - 1 full rounds: - */ - - for (;;) { - t0 = - Te[0][GETBYTE(s0, 3)] ^ - Te[1][GETBYTE(s1, 2)] ^ - Te[2][GETBYTE(s2, 1)] ^ - Te[3][GETBYTE(s3, 0)] ^ - rk[4]; - t1 = - Te[0][GETBYTE(s1, 3)] ^ - Te[1][GETBYTE(s2, 2)] ^ - Te[2][GETBYTE(s3, 1)] ^ - Te[3][GETBYTE(s0, 0)] ^ - rk[5]; - t2 = - Te[0][GETBYTE(s2, 3)] ^ - Te[1][GETBYTE(s3, 2)] ^ - Te[2][GETBYTE(s0, 1)] ^ - Te[3][GETBYTE(s1, 0)] ^ - rk[6]; - t3 = - Te[0][GETBYTE(s3, 3)] ^ - Te[1][GETBYTE(s0, 2)] ^ - Te[2][GETBYTE(s1, 1)] ^ - Te[3][GETBYTE(s2, 0)] ^ - rk[7]; - - rk += 8; - if (--r == 0) { - break; - } - - s0 = - Te[0][GETBYTE(t0, 3)] ^ - Te[1][GETBYTE(t1, 2)] ^ - Te[2][GETBYTE(t2, 1)] ^ - Te[3][GETBYTE(t3, 0)] ^ - rk[0]; - s1 = - Te[0][GETBYTE(t1, 3)] ^ - Te[1][GETBYTE(t2, 2)] ^ - Te[2][GETBYTE(t3, 1)] ^ - Te[3][GETBYTE(t0, 0)] ^ - rk[1]; - s2 = - Te[0][GETBYTE(t2, 3)] ^ - Te[1][GETBYTE(t3, 2)] ^ - Te[2][GETBYTE(t0, 1)] ^ - Te[3][GETBYTE(t1, 0)] ^ - rk[2]; - s3 = - Te[0][GETBYTE(t3, 3)] ^ - Te[1][GETBYTE(t0, 2)] ^ - Te[2][GETBYTE(t1, 1)] ^ - Te[3][GETBYTE(t2, 0)] ^ - rk[3]; - } - - /* - * apply last round and - * map cipher state to byte array block: - */ - - s0 = - (Te[4][GETBYTE(t0, 3)] & 0xff000000) ^ - (Te[4][GETBYTE(t1, 2)] & 0x00ff0000) ^ - (Te[4][GETBYTE(t2, 1)] & 0x0000ff00) ^ - (Te[4][GETBYTE(t3, 0)] & 0x000000ff) ^ - rk[0]; - s1 = - (Te[4][GETBYTE(t1, 3)] & 0xff000000) ^ - (Te[4][GETBYTE(t2, 2)] & 0x00ff0000) ^ - (Te[4][GETBYTE(t3, 1)] & 0x0000ff00) ^ - (Te[4][GETBYTE(t0, 0)] & 0x000000ff) ^ - rk[1]; - s2 = - (Te[4][GETBYTE(t2, 3)] & 0xff000000) ^ - (Te[4][GETBYTE(t3, 2)] & 0x00ff0000) ^ - (Te[4][GETBYTE(t0, 1)] & 0x0000ff00) ^ - (Te[4][GETBYTE(t1, 0)] & 0x000000ff) ^ - rk[2]; - s3 = - (Te[4][GETBYTE(t3, 3)] & 0xff000000) ^ - (Te[4][GETBYTE(t0, 2)] & 0x00ff0000) ^ - (Te[4][GETBYTE(t1, 1)] & 0x0000ff00) ^ - (Te[4][GETBYTE(t2, 0)] & 0x000000ff) ^ - rk[3]; - - /* write out */ - #ifdef LITTLE_ENDIAN_ORDER - s0 = ByteReverseWord32(s0); - s1 = ByteReverseWord32(s1); - s2 = ByteReverseWord32(s2); - s3 = ByteReverseWord32(s3); - #endif - - XMEMCPY(outBlock, &s0, sizeof(s0)); - XMEMCPY(outBlock + sizeof(s0), &s1, sizeof(s1)); - XMEMCPY(outBlock + 2 * sizeof(s0), &s2, sizeof(s2)); - XMEMCPY(outBlock + 3 * sizeof(s0), &s3, sizeof(s3)); -} - - -static void AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock) -{ - word32 s0, s1, s2, s3; - word32 t0, t1, t2, t3; - word32 r = aes->rounds >> 1; - - const word32* rk = aes->key; - if (r > 7 || r == 0) { - CYASSL_MSG("AesDecrypt encountered improper key, set it up"); - return; /* stop instead of segfaulting, set up your keys! */ - } -#ifdef CYASSL_AESNI - if (haveAESNI && aes->use_aesni) { - #ifdef DEBUG_AESNI - printf("about to aes decrypt\n"); - printf("in = %p\n", inBlock); - printf("out = %p\n", outBlock); - printf("aes->key = %p\n", aes->key); - printf("aes->rounds = %d\n", aes->rounds); - printf("sz = %d\n", AES_BLOCK_SIZE); - #endif - - /* if input and output same will overwrite input iv */ - XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE); - AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key, - aes->rounds); - return; - } - else { - #ifdef DEBUG_AESNI - printf("Skipping AES-NI\n"); - #endif - } -#endif - - /* - * map byte array block to cipher state - * and add initial round key: - */ - XMEMCPY(&s0, inBlock, sizeof(s0)); - XMEMCPY(&s1, inBlock + sizeof(s0), sizeof(s1)); - XMEMCPY(&s2, inBlock + 2 * sizeof(s0), sizeof(s2)); - XMEMCPY(&s3, inBlock + 3 * sizeof(s0), sizeof(s3)); - - #ifdef LITTLE_ENDIAN_ORDER - s0 = ByteReverseWord32(s0); - s1 = ByteReverseWord32(s1); - s2 = ByteReverseWord32(s2); - s3 = ByteReverseWord32(s3); - #endif - - s0 ^= rk[0]; - s1 ^= rk[1]; - s2 ^= rk[2]; - s3 ^= rk[3]; - - /* - * Nr - 1 full rounds: - */ - - for (;;) { - t0 = - Td[0][GETBYTE(s0, 3)] ^ - Td[1][GETBYTE(s3, 2)] ^ - Td[2][GETBYTE(s2, 1)] ^ - Td[3][GETBYTE(s1, 0)] ^ - rk[4]; - t1 = - Td[0][GETBYTE(s1, 3)] ^ - Td[1][GETBYTE(s0, 2)] ^ - Td[2][GETBYTE(s3, 1)] ^ - Td[3][GETBYTE(s2, 0)] ^ - rk[5]; - t2 = - Td[0][GETBYTE(s2, 3)] ^ - Td[1][GETBYTE(s1, 2)] ^ - Td[2][GETBYTE(s0, 1)] ^ - Td[3][GETBYTE(s3, 0)] ^ - rk[6]; - t3 = - Td[0][GETBYTE(s3, 3)] ^ - Td[1][GETBYTE(s2, 2)] ^ - Td[2][GETBYTE(s1, 1)] ^ - Td[3][GETBYTE(s0, 0)] ^ - rk[7]; - - rk += 8; - if (--r == 0) { - break; - } - - s0 = - Td[0][GETBYTE(t0, 3)] ^ - Td[1][GETBYTE(t3, 2)] ^ - Td[2][GETBYTE(t2, 1)] ^ - Td[3][GETBYTE(t1, 0)] ^ - rk[0]; - s1 = - Td[0][GETBYTE(t1, 3)] ^ - Td[1][GETBYTE(t0, 2)] ^ - Td[2][GETBYTE(t3, 1)] ^ - Td[3][GETBYTE(t2, 0)] ^ - rk[1]; - s2 = - Td[0][GETBYTE(t2, 3)] ^ - Td[1][GETBYTE(t1, 2)] ^ - Td[2][GETBYTE(t0, 1)] ^ - Td[3][GETBYTE(t3, 0)] ^ - rk[2]; - s3 = - Td[0][GETBYTE(t3, 3)] ^ - Td[1][GETBYTE(t2, 2)] ^ - Td[2][GETBYTE(t1, 1)] ^ - Td[3][GETBYTE(t0, 0)] ^ - rk[3]; - } - /* - * apply last round and - * map cipher state to byte array block: - */ - s0 = - (Td[4][GETBYTE(t0, 3)] & 0xff000000) ^ - (Td[4][GETBYTE(t3, 2)] & 0x00ff0000) ^ - (Td[4][GETBYTE(t2, 1)] & 0x0000ff00) ^ - (Td[4][GETBYTE(t1, 0)] & 0x000000ff) ^ - rk[0]; - s1 = - (Td[4][GETBYTE(t1, 3)] & 0xff000000) ^ - (Td[4][GETBYTE(t0, 2)] & 0x00ff0000) ^ - (Td[4][GETBYTE(t3, 1)] & 0x0000ff00) ^ - (Td[4][GETBYTE(t2, 0)] & 0x000000ff) ^ - rk[1]; - s2 = - (Td[4][GETBYTE(t2, 3)] & 0xff000000) ^ - (Td[4][GETBYTE(t1, 2)] & 0x00ff0000) ^ - (Td[4][GETBYTE(t0, 1)] & 0x0000ff00) ^ - (Td[4][GETBYTE(t3, 0)] & 0x000000ff) ^ - rk[2]; - s3 = - (Td[4][GETBYTE(t3, 3)] & 0xff000000) ^ - (Td[4][GETBYTE(t2, 2)] & 0x00ff0000) ^ - (Td[4][GETBYTE(t1, 1)] & 0x0000ff00) ^ - (Td[4][GETBYTE(t0, 0)] & 0x000000ff) ^ - rk[3]; - - /* write out */ - #ifdef LITTLE_ENDIAN_ORDER - s0 = ByteReverseWord32(s0); - s1 = ByteReverseWord32(s1); - s2 = ByteReverseWord32(s2); - s3 = ByteReverseWord32(s3); - #endif - - XMEMCPY(outBlock, &s0, sizeof(s0)); - XMEMCPY(outBlock + sizeof(s0), &s1, sizeof(s1)); - XMEMCPY(outBlock + 2 * sizeof(s0), &s2, sizeof(s2)); - XMEMCPY(outBlock + 3 * sizeof(s0), &s3, sizeof(s3)); -} - -#ifndef HAVE_AES_ENGINE -int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / AES_BLOCK_SIZE; - -#ifdef HAVE_CAVIUM - if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) - return AesCaviumCbcEncrypt(aes, out, in, sz); -#endif - -#ifdef CYASSL_AESNI - if (haveAESNI) { - #ifdef DEBUG_AESNI - printf("about to aes cbc encrypt\n"); - printf("in = %p\n", in); - printf("out = %p\n", out); - printf("aes->key = %p\n", aes->key); - printf("aes->reg = %p\n", aes->reg); - printf("aes->rounds = %d\n", aes->rounds); - printf("sz = %d\n", sz); - #endif - - /* check alignment, decrypt doesn't need alignment */ - if ((word)in % 16) { - #ifndef NO_CYASSL_ALLOC_ALIGN - byte* tmp = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (tmp == NULL) return MEMORY_E; - - XMEMCPY(tmp, in, sz); - AES_CBC_encrypt(tmp, tmp, (byte*)aes->reg, sz, (byte*)aes->key, - aes->rounds); - /* store iv for next call */ - XMEMCPY(aes->reg, tmp + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - - XMEMCPY(out, tmp, sz); - XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return 0; - #else - return BAD_ALIGN_E; - #endif - } - - AES_CBC_encrypt(in, out, (byte*)aes->reg, sz, (byte*)aes->key, - aes->rounds); - /* store iv for next call */ - XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - - return 0; - } -#endif - - while (blocks--) { - xorbuf((byte*)aes->reg, in, AES_BLOCK_SIZE); - AesEncrypt(aes, (byte*)aes->reg, (byte*)aes->reg); - XMEMCPY(out, aes->reg, AES_BLOCK_SIZE); - - out += AES_BLOCK_SIZE; - in += AES_BLOCK_SIZE; - } - - return 0; -} - - -int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / AES_BLOCK_SIZE; - -#ifdef HAVE_CAVIUM - if (aes->magic == CYASSL_AES_CAVIUM_MAGIC) - return AesCaviumCbcDecrypt(aes, out, in, sz); -#endif - -#ifdef CYASSL_AESNI - if (haveAESNI) { - #ifdef DEBUG_AESNI - printf("about to aes cbc decrypt\n"); - printf("in = %p\n", in); - printf("out = %p\n", out); - printf("aes->key = %p\n", aes->key); - printf("aes->reg = %p\n", aes->reg); - printf("aes->rounds = %d\n", aes->rounds); - printf("sz = %d\n", sz); - #endif - - /* if input and output same will overwrite input iv */ - XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - AES_CBC_decrypt(in, out, (byte*)aes->reg, sz, (byte*)aes->key, - aes->rounds); - /* store iv for next call */ - XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); - return 0; - } -#endif - - while (blocks--) { - XMEMCPY(aes->tmp, in, AES_BLOCK_SIZE); - AesDecrypt(aes, (byte*)aes->tmp, out); - xorbuf(out, (byte*)aes->reg, AES_BLOCK_SIZE); - XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); - - out += AES_BLOCK_SIZE; - in += AES_BLOCK_SIZE; - } - - return 0; -} -#endif - -#ifdef CYASSL_AES_DIRECT - -/* Allow direct access to one block encrypt */ -void AesEncryptDirect(Aes* aes, byte* out, const byte* in) -{ - return AesEncrypt(aes, in, out); -} - - -/* Allow direct access to one block decrypt */ -void AesDecryptDirect(Aes* aes, byte* out, const byte* in) -{ - return AesDecrypt(aes, in, out); -} - - -#endif /* CYASSL_AES_DIRECT */ - - -#if defined(CYASSL_AES_DIRECT) || defined(CYASSL_AES_COUNTER) - -/* AES-CTR and AES-DIRECT need to use this for key setup, no aesni yet */ -int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen, - const byte* iv, int dir) -{ - return AesSetKeyLocal(aes, userKey, keylen, iv, dir); -} - -#endif /* CYASSL_AES_DIRECT || CYASSL_AES_COUNTER */ - - -#if defined(CYASSL_AES_COUNTER) && !defined(HAVE_AES_ENGINE) - -/* Increment AES counter */ -static INLINE void IncrementAesCounter(byte* inOutCtr) -{ - int i; - - /* in network byte order so start at end and work back */ - for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { - if (++inOutCtr[i]) /* we're done unless we overflow */ - return; - } -} - - -void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) -{ - byte* tmp = (byte*)aes->tmp + AES_BLOCK_SIZE - aes->left; - - /* consume any unused bytes left in aes->tmp */ - while (aes->left && sz) { - *(out++) = *(in++) ^ *(tmp++); - aes->left--; - sz--; - } - - /* do as many block size ops as possible */ - while (sz >= AES_BLOCK_SIZE) { - AesEncrypt(aes, (byte*)aes->reg, out); - IncrementAesCounter((byte*)aes->reg); - xorbuf(out, in, AES_BLOCK_SIZE); - - out += AES_BLOCK_SIZE; - in += AES_BLOCK_SIZE; - sz -= AES_BLOCK_SIZE; - aes->left = 0; - } - - /* handle non block size remaining and sotre unused byte count in left */ - if (sz) { - AesEncrypt(aes, (byte*)aes->reg, (byte*)aes->tmp); - IncrementAesCounter((byte*)aes->reg); - - aes->left = AES_BLOCK_SIZE; - tmp = (byte*)aes->tmp; - - while (sz--) { - *(out++) = *(in++) ^ *(tmp++); - aes->left--; - } - } -} - -#endif /* CYASSL_AES_COUNTER */ - - -#ifdef HAVE_AESGCM - -/* - * The IV for AES GCM, stored in struct Aes's member reg, is comprised of - * three parts in order: - * 1. The implicit IV. This is generated from the PRF using the shared - * secrets between endpoints. It is 4 bytes long. - * 2. The explicit IV. This is set by the user of the AES. It needs to be - * unique for each call to encrypt. The explicit IV is shared with the - * other end of the transaction in the clear. - * 3. The counter. Each block of data is encrypted with its own sequence - * number counter. - */ - -enum { - CTR_SZ = 4 -}; - - -static INLINE void InitGcmCounter(byte* inOutCtr) -{ - inOutCtr[AES_BLOCK_SIZE - 4] = 0; - inOutCtr[AES_BLOCK_SIZE - 3] = 0; - inOutCtr[AES_BLOCK_SIZE - 2] = 0; - inOutCtr[AES_BLOCK_SIZE - 1] = 1; -} - - -static INLINE void IncrementGcmCounter(byte* inOutCtr) -{ - int i; - - /* in network byte order so start at end and work back */ - for (i = AES_BLOCK_SIZE - 1; i >= AES_BLOCK_SIZE - CTR_SZ; i--) { - if (++inOutCtr[i]) /* we're done unless we overflow */ - return; - } -} - - -#if defined(GCM_SMALL) || defined(GCM_TABLE) - -static INLINE void FlattenSzInBits(byte* buf, word32 sz) -{ - /* Multiply the sz by 8 */ - word32 szHi = (sz >> (8*sizeof(sz) - 3)); - sz <<= 3; - - /* copy over the words of the sz into the destination buffer */ - buf[0] = (szHi >> 24) & 0xff; - buf[1] = (szHi >> 16) & 0xff; - buf[2] = (szHi >> 8) & 0xff; - buf[3] = szHi & 0xff; - buf[4] = (sz >> 24) & 0xff; - buf[5] = (sz >> 16) & 0xff; - buf[6] = (sz >> 8) & 0xff; - buf[7] = sz & 0xff; -} - - -static INLINE void RIGHTSHIFTX(byte* x) -{ - int i; - int carryOut = 0; - int carryIn = 0; - int borrow = x[15] & 0x01; - - for (i = 0; i < AES_BLOCK_SIZE; i++) { - carryOut = x[i] & 0x01; - x[i] = (x[i] >> 1) | (carryIn ? 0x80 : 0); - carryIn = carryOut; - } - if (borrow) x[0] ^= 0xE1; -} - -#endif /* defined(GCM_SMALL) || defined(GCM_TABLE) */ - - -#ifdef GCM_TABLE - -static void GenerateM0(Aes* aes) -{ - int i, j; - byte (*m)[AES_BLOCK_SIZE] = aes->M0; - - XMEMCPY(m[128], aes->H, AES_BLOCK_SIZE); - - for (i = 64; i > 0; i /= 2) { - XMEMCPY(m[i], m[i*2], AES_BLOCK_SIZE); - RIGHTSHIFTX(m[i]); - } - - for (i = 2; i < 256; i *= 2) { - for (j = 1; j < i; j++) { - XMEMCPY(m[i+j], m[i], AES_BLOCK_SIZE); - xorbuf(m[i+j], m[j], AES_BLOCK_SIZE); - } - } - - XMEMSET(m[0], 0, AES_BLOCK_SIZE); -} - -#endif /* GCM_TABLE */ - - -void AesGcmSetKey(Aes* aes, const byte* key, word32 len) -{ - byte iv[AES_BLOCK_SIZE]; - - if (!((len == 16) || (len == 24) || (len == 32))) - return; - - XMEMSET(iv, 0, AES_BLOCK_SIZE); - AesSetKey(aes, key, len, iv, AES_ENCRYPTION); - - AesEncrypt(aes, iv, aes->H); -#ifdef GCM_TABLE - GenerateM0(aes); -#endif /* GCM_TABLE */ -} - - -#if defined(GCM_SMALL) - -static void GMULT(byte* X, byte* Y) -{ - byte Z[AES_BLOCK_SIZE]; - byte V[AES_BLOCK_SIZE]; - int i, j; - - XMEMSET(Z, 0, AES_BLOCK_SIZE); - XMEMCPY(V, X, AES_BLOCK_SIZE); - for (i = 0; i < AES_BLOCK_SIZE; i++) - { - byte y = Y[i]; - for (j = 0; j < 8; j++) - { - if (y & 0x80) { - xorbuf(Z, V, AES_BLOCK_SIZE); - } - - RIGHTSHIFTX(V); - y = y << 1; - } - } - XMEMCPY(X, Z, AES_BLOCK_SIZE); -} - - -static void GHASH(Aes* aes, const byte* a, word32 aSz, - const byte* c, word32 cSz, byte* s, word32 sSz) -{ - byte x[AES_BLOCK_SIZE]; - byte scratch[AES_BLOCK_SIZE]; - word32 blocks, partial; - byte* h = aes->H; - - XMEMSET(x, 0, AES_BLOCK_SIZE); - - /* Hash in A, the Additional Authentication Data */ - if (aSz != 0 && a != NULL) { - blocks = aSz / AES_BLOCK_SIZE; - partial = aSz % AES_BLOCK_SIZE; - while (blocks--) { - xorbuf(x, a, AES_BLOCK_SIZE); - GMULT(x, h); - a += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(scratch, 0, AES_BLOCK_SIZE); - XMEMCPY(scratch, a, partial); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, h); - } - } - - /* Hash in C, the Ciphertext */ - if (cSz != 0 && c != NULL) { - blocks = cSz / AES_BLOCK_SIZE; - partial = cSz % AES_BLOCK_SIZE; - while (blocks--) { - xorbuf(x, c, AES_BLOCK_SIZE); - GMULT(x, h); - c += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(scratch, 0, AES_BLOCK_SIZE); - XMEMCPY(scratch, c, partial); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, h); - } - } - - /* Hash in the lengths of A and C in bits */ - FlattenSzInBits(&scratch[0], aSz); - FlattenSzInBits(&scratch[8], cSz); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, h); - - /* Copy the result into s. */ - XMEMCPY(s, x, sSz); -} - -/* end GCM_SMALL */ -#elif defined(GCM_TABLE) - -static const byte R[256][2] = { - {0x00, 0x00}, {0x01, 0xc2}, {0x03, 0x84}, {0x02, 0x46}, - {0x07, 0x08}, {0x06, 0xca}, {0x04, 0x8c}, {0x05, 0x4e}, - {0x0e, 0x10}, {0x0f, 0xd2}, {0x0d, 0x94}, {0x0c, 0x56}, - {0x09, 0x18}, {0x08, 0xda}, {0x0a, 0x9c}, {0x0b, 0x5e}, - {0x1c, 0x20}, {0x1d, 0xe2}, {0x1f, 0xa4}, {0x1e, 0x66}, - {0x1b, 0x28}, {0x1a, 0xea}, {0x18, 0xac}, {0x19, 0x6e}, - {0x12, 0x30}, {0x13, 0xf2}, {0x11, 0xb4}, {0x10, 0x76}, - {0x15, 0x38}, {0x14, 0xfa}, {0x16, 0xbc}, {0x17, 0x7e}, - {0x38, 0x40}, {0x39, 0x82}, {0x3b, 0xc4}, {0x3a, 0x06}, - {0x3f, 0x48}, {0x3e, 0x8a}, {0x3c, 0xcc}, {0x3d, 0x0e}, - {0x36, 0x50}, {0x37, 0x92}, {0x35, 0xd4}, {0x34, 0x16}, - {0x31, 0x58}, {0x30, 0x9a}, {0x32, 0xdc}, {0x33, 0x1e}, - {0x24, 0x60}, {0x25, 0xa2}, {0x27, 0xe4}, {0x26, 0x26}, - {0x23, 0x68}, {0x22, 0xaa}, {0x20, 0xec}, {0x21, 0x2e}, - {0x2a, 0x70}, {0x2b, 0xb2}, {0x29, 0xf4}, {0x28, 0x36}, - {0x2d, 0x78}, {0x2c, 0xba}, {0x2e, 0xfc}, {0x2f, 0x3e}, - {0x70, 0x80}, {0x71, 0x42}, {0x73, 0x04}, {0x72, 0xc6}, - {0x77, 0x88}, {0x76, 0x4a}, {0x74, 0x0c}, {0x75, 0xce}, - {0x7e, 0x90}, {0x7f, 0x52}, {0x7d, 0x14}, {0x7c, 0xd6}, - {0x79, 0x98}, {0x78, 0x5a}, {0x7a, 0x1c}, {0x7b, 0xde}, - {0x6c, 0xa0}, {0x6d, 0x62}, {0x6f, 0x24}, {0x6e, 0xe6}, - {0x6b, 0xa8}, {0x6a, 0x6a}, {0x68, 0x2c}, {0x69, 0xee}, - {0x62, 0xb0}, {0x63, 0x72}, {0x61, 0x34}, {0x60, 0xf6}, - {0x65, 0xb8}, {0x64, 0x7a}, {0x66, 0x3c}, {0x67, 0xfe}, - {0x48, 0xc0}, {0x49, 0x02}, {0x4b, 0x44}, {0x4a, 0x86}, - {0x4f, 0xc8}, {0x4e, 0x0a}, {0x4c, 0x4c}, {0x4d, 0x8e}, - {0x46, 0xd0}, {0x47, 0x12}, {0x45, 0x54}, {0x44, 0x96}, - {0x41, 0xd8}, {0x40, 0x1a}, {0x42, 0x5c}, {0x43, 0x9e}, - {0x54, 0xe0}, {0x55, 0x22}, {0x57, 0x64}, {0x56, 0xa6}, - {0x53, 0xe8}, {0x52, 0x2a}, {0x50, 0x6c}, {0x51, 0xae}, - {0x5a, 0xf0}, {0x5b, 0x32}, {0x59, 0x74}, {0x58, 0xb6}, - {0x5d, 0xf8}, {0x5c, 0x3a}, {0x5e, 0x7c}, {0x5f, 0xbe}, - {0xe1, 0x00}, {0xe0, 0xc2}, {0xe2, 0x84}, {0xe3, 0x46}, - {0xe6, 0x08}, {0xe7, 0xca}, {0xe5, 0x8c}, {0xe4, 0x4e}, - {0xef, 0x10}, {0xee, 0xd2}, {0xec, 0x94}, {0xed, 0x56}, - {0xe8, 0x18}, {0xe9, 0xda}, {0xeb, 0x9c}, {0xea, 0x5e}, - {0xfd, 0x20}, {0xfc, 0xe2}, {0xfe, 0xa4}, {0xff, 0x66}, - {0xfa, 0x28}, {0xfb, 0xea}, {0xf9, 0xac}, {0xf8, 0x6e}, - {0xf3, 0x30}, {0xf2, 0xf2}, {0xf0, 0xb4}, {0xf1, 0x76}, - {0xf4, 0x38}, {0xf5, 0xfa}, {0xf7, 0xbc}, {0xf6, 0x7e}, - {0xd9, 0x40}, {0xd8, 0x82}, {0xda, 0xc4}, {0xdb, 0x06}, - {0xde, 0x48}, {0xdf, 0x8a}, {0xdd, 0xcc}, {0xdc, 0x0e}, - {0xd7, 0x50}, {0xd6, 0x92}, {0xd4, 0xd4}, {0xd5, 0x16}, - {0xd0, 0x58}, {0xd1, 0x9a}, {0xd3, 0xdc}, {0xd2, 0x1e}, - {0xc5, 0x60}, {0xc4, 0xa2}, {0xc6, 0xe4}, {0xc7, 0x26}, - {0xc2, 0x68}, {0xc3, 0xaa}, {0xc1, 0xec}, {0xc0, 0x2e}, - {0xcb, 0x70}, {0xca, 0xb2}, {0xc8, 0xf4}, {0xc9, 0x36}, - {0xcc, 0x78}, {0xcd, 0xba}, {0xcf, 0xfc}, {0xce, 0x3e}, - {0x91, 0x80}, {0x90, 0x42}, {0x92, 0x04}, {0x93, 0xc6}, - {0x96, 0x88}, {0x97, 0x4a}, {0x95, 0x0c}, {0x94, 0xce}, - {0x9f, 0x90}, {0x9e, 0x52}, {0x9c, 0x14}, {0x9d, 0xd6}, - {0x98, 0x98}, {0x99, 0x5a}, {0x9b, 0x1c}, {0x9a, 0xde}, - {0x8d, 0xa0}, {0x8c, 0x62}, {0x8e, 0x24}, {0x8f, 0xe6}, - {0x8a, 0xa8}, {0x8b, 0x6a}, {0x89, 0x2c}, {0x88, 0xee}, - {0x83, 0xb0}, {0x82, 0x72}, {0x80, 0x34}, {0x81, 0xf6}, - {0x84, 0xb8}, {0x85, 0x7a}, {0x87, 0x3c}, {0x86, 0xfe}, - {0xa9, 0xc0}, {0xa8, 0x02}, {0xaa, 0x44}, {0xab, 0x86}, - {0xae, 0xc8}, {0xaf, 0x0a}, {0xad, 0x4c}, {0xac, 0x8e}, - {0xa7, 0xd0}, {0xa6, 0x12}, {0xa4, 0x54}, {0xa5, 0x96}, - {0xa0, 0xd8}, {0xa1, 0x1a}, {0xa3, 0x5c}, {0xa2, 0x9e}, - {0xb5, 0xe0}, {0xb4, 0x22}, {0xb6, 0x64}, {0xb7, 0xa6}, - {0xb2, 0xe8}, {0xb3, 0x2a}, {0xb1, 0x6c}, {0xb0, 0xae}, - {0xbb, 0xf0}, {0xba, 0x32}, {0xb8, 0x74}, {0xb9, 0xb6}, - {0xbc, 0xf8}, {0xbd, 0x3a}, {0xbf, 0x7c}, {0xbe, 0xbe} }; - - -static void GMULT(byte *x, byte m[256][AES_BLOCK_SIZE]) -{ - int i, j; - byte Z[AES_BLOCK_SIZE]; - byte a; - - XMEMSET(Z, 0, sizeof(Z)); - - for (i = 15; i > 0; i--) { - xorbuf(Z, m[x[i]], AES_BLOCK_SIZE); - a = Z[15]; - - for (j = 15; j > 0; j--) { - Z[j] = Z[j-1]; - } - - Z[0] = R[a][0]; - Z[1] ^= R[a][1]; - } - xorbuf(Z, m[x[0]], AES_BLOCK_SIZE); - - XMEMCPY(x, Z, AES_BLOCK_SIZE); -} - - -static void GHASH(Aes* aes, const byte* a, word32 aSz, - const byte* c, word32 cSz, byte* s, word32 sSz) -{ - byte x[AES_BLOCK_SIZE]; - byte scratch[AES_BLOCK_SIZE]; - word32 blocks, partial; - - XMEMSET(x, 0, AES_BLOCK_SIZE); - - /* Hash in A, the Additional Authentication Data */ - if (aSz != 0 && a != NULL) { - blocks = aSz / AES_BLOCK_SIZE; - partial = aSz % AES_BLOCK_SIZE; - while (blocks--) { - xorbuf(x, a, AES_BLOCK_SIZE); - GMULT(x, aes->M0); - a += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(scratch, 0, AES_BLOCK_SIZE); - XMEMCPY(scratch, a, partial); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, aes->M0); - } - } - - /* Hash in C, the Ciphertext */ - if (cSz != 0 && c != NULL) { - blocks = cSz / AES_BLOCK_SIZE; - partial = cSz % AES_BLOCK_SIZE; - while (blocks--) { - xorbuf(x, c, AES_BLOCK_SIZE); - GMULT(x, aes->M0); - c += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(scratch, 0, AES_BLOCK_SIZE); - XMEMCPY(scratch, c, partial); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, aes->M0); - } - } - - /* Hash in the lengths of A and C in bits */ - FlattenSzInBits(&scratch[0], aSz); - FlattenSzInBits(&scratch[8], cSz); - xorbuf(x, scratch, AES_BLOCK_SIZE); - GMULT(x, aes->M0); - - /* Copy the result into s. */ - XMEMCPY(s, x, sSz); -} - -/* end GCM_TABLE */ -#elif defined(WORD64_AVAILABLE) && !defined(GCM_WORD32) - -static void GMULT(word64* X, word64* Y) -{ - word64 Z[2] = {0,0}; - word64 V[2] ; - int i, j; - V[0] = X[0] ; V[1] = X[1] ; - - for (i = 0; i < 2; i++) - { - word64 y = Y[i]; - for (j = 0; j < 64; j++) - { - if (y & 0x8000000000000000) { - Z[0] ^= V[0]; - Z[1] ^= V[1]; - } - - if (V[1] & 0x0000000000000001) { - V[1] >>= 1; - V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0); - V[0] >>= 1; - V[0] ^= 0xE100000000000000; - } - else { - V[1] >>= 1; - V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0); - V[0] >>= 1; - } - y <<= 1; - } - } - X[0] = Z[0]; - X[1] = Z[1]; -} - - -static void GHASH(Aes* aes, const byte* a, word32 aSz, - const byte* c, word32 cSz, byte* s, word32 sSz) -{ - word64 x[2] = {0,0}; - word32 blocks, partial; - word64 bigH[2]; - - XMEMCPY(bigH, aes->H, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(bigH, bigH, AES_BLOCK_SIZE); - #endif - - /* Hash in A, the Additional Authentication Data */ - if (aSz != 0 && a != NULL) { - word64 bigA[2]; - blocks = aSz / AES_BLOCK_SIZE; - partial = aSz % AES_BLOCK_SIZE; - while (blocks--) { - XMEMCPY(bigA, a, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(bigA, bigA, AES_BLOCK_SIZE); - #endif - x[0] ^= bigA[0]; - x[1] ^= bigA[1]; - GMULT(x, bigH); - a += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(bigA, 0, AES_BLOCK_SIZE); - XMEMCPY(bigA, a, partial); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(bigA, bigA, AES_BLOCK_SIZE); - #endif - x[0] ^= bigA[0]; - x[1] ^= bigA[1]; - GMULT(x, bigH); - } - } - - /* Hash in C, the Ciphertext */ - if (cSz != 0 && c != NULL) { - word64 bigC[2]; - blocks = cSz / AES_BLOCK_SIZE; - partial = cSz % AES_BLOCK_SIZE; - while (blocks--) { - XMEMCPY(bigC, c, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(bigC, bigC, AES_BLOCK_SIZE); - #endif - x[0] ^= bigC[0]; - x[1] ^= bigC[1]; - GMULT(x, bigH); - c += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(bigC, 0, AES_BLOCK_SIZE); - XMEMCPY(bigC, c, partial); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(bigC, bigC, AES_BLOCK_SIZE); - #endif - x[0] ^= bigC[0]; - x[1] ^= bigC[1]; - GMULT(x, bigH); - } - } - - /* Hash in the lengths in bits of A and C */ - { - word64 len[2] ; - len[0] = aSz ; len[1] = cSz; - - /* Lengths are in bytes. Convert to bits. */ - len[0] *= 8; - len[1] *= 8; - - x[0] ^= len[0]; - x[1] ^= len[1]; - GMULT(x, bigH); - } - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(x, x, AES_BLOCK_SIZE); - #endif - XMEMCPY(s, x, sSz); -} - -/* end defined(WORD64_AVAILABLE) && !defined(GCM_WORD32) */ -#else /* GCM_WORD32 */ - -static void GMULT(word32* X, word32* Y) -{ - word32 Z[4] = {0,0,0,0}; - word32 V[4] ; - int i, j; - - V[0] = X[0]; V[1] = X[1]; V[2] = X[2]; V[3] = X[3]; - - for (i = 0; i < 4; i++) - { - word32 y = Y[i]; - for (j = 0; j < 32; j++) - { - if (y & 0x80000000) { - Z[0] ^= V[0]; - Z[1] ^= V[1]; - Z[2] ^= V[2]; - Z[3] ^= V[3]; - } - - if (V[3] & 0x00000001) { - V[3] >>= 1; - V[3] |= ((V[2] & 0x00000001) ? 0x80000000 : 0); - V[2] >>= 1; - V[2] |= ((V[1] & 0x00000001) ? 0x80000000 : 0); - V[1] >>= 1; - V[1] |= ((V[0] & 0x00000001) ? 0x80000000 : 0); - V[0] >>= 1; - V[0] ^= 0xE1000000; - } else { - V[3] >>= 1; - V[3] |= ((V[2] & 0x00000001) ? 0x80000000 : 0); - V[2] >>= 1; - V[2] |= ((V[1] & 0x00000001) ? 0x80000000 : 0); - V[1] >>= 1; - V[1] |= ((V[0] & 0x00000001) ? 0x80000000 : 0); - V[0] >>= 1; - } - y <<= 1; - } - } - X[0] = Z[0]; - X[1] = Z[1]; - X[2] = Z[2]; - X[3] = Z[3]; -} - - -static void GHASH(Aes* aes, const byte* a, word32 aSz, - const byte* c, word32 cSz, byte* s, word32 sSz) -{ - word32 x[4] = {0,0,0,0}; - word32 blocks, partial; - word32 bigH[4]; - - XMEMCPY(bigH, aes->H, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(bigH, bigH, AES_BLOCK_SIZE); - #endif - - /* Hash in A, the Additional Authentication Data */ - if (aSz != 0 && a != NULL) { - word32 bigA[4]; - blocks = aSz / AES_BLOCK_SIZE; - partial = aSz % AES_BLOCK_SIZE; - while (blocks--) { - XMEMCPY(bigA, a, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(bigA, bigA, AES_BLOCK_SIZE); - #endif - x[0] ^= bigA[0]; - x[1] ^= bigA[1]; - x[2] ^= bigA[2]; - x[3] ^= bigA[3]; - GMULT(x, bigH); - a += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(bigA, 0, AES_BLOCK_SIZE); - XMEMCPY(bigA, a, partial); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(bigA, bigA, AES_BLOCK_SIZE); - #endif - x[0] ^= bigA[0]; - x[1] ^= bigA[1]; - x[2] ^= bigA[2]; - x[3] ^= bigA[3]; - GMULT(x, bigH); - } - } - - /* Hash in C, the Ciphertext */ - if (cSz != 0 && c != NULL) { - word32 bigC[4]; - blocks = cSz / AES_BLOCK_SIZE; - partial = cSz % AES_BLOCK_SIZE; - while (blocks--) { - XMEMCPY(bigC, c, AES_BLOCK_SIZE); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(bigC, bigC, AES_BLOCK_SIZE); - #endif - x[0] ^= bigC[0]; - x[1] ^= bigC[1]; - x[2] ^= bigC[2]; - x[3] ^= bigC[3]; - GMULT(x, bigH); - c += AES_BLOCK_SIZE; - } - if (partial != 0) { - XMEMSET(bigC, 0, AES_BLOCK_SIZE); - XMEMCPY(bigC, c, partial); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(bigC, bigC, AES_BLOCK_SIZE); - #endif - x[0] ^= bigC[0]; - x[1] ^= bigC[1]; - x[2] ^= bigC[2]; - x[3] ^= bigC[3]; - GMULT(x, bigH); - } - } - - /* Hash in the lengths in bits of A and C */ - { - word32 len[4]; - - /* Lengths are in bytes. Convert to bits. */ - len[0] = (aSz >> (8*sizeof(aSz) - 3)); - len[1] = aSz << 3; - len[2] = (cSz >> (8*sizeof(cSz) - 3)); - len[3] = cSz << 3; - - x[0] ^= len[0]; - x[1] ^= len[1]; - x[2] ^= len[2]; - x[3] ^= len[3]; - GMULT(x, bigH); - } - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(x, x, AES_BLOCK_SIZE); - #endif - XMEMCPY(s, x, sSz); -} - -#endif /* end GCM_WORD32 */ - - -void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) -{ - word32 blocks = sz / AES_BLOCK_SIZE; - word32 partial = sz % AES_BLOCK_SIZE; - const byte* p = in; - byte* c = out; - byte counter[AES_BLOCK_SIZE]; - byte *ctr ; - byte scratch[AES_BLOCK_SIZE]; - - CYASSL_ENTER("AesGcmEncrypt"); - -#ifdef CYASSL_PIC32MZ_CRYPT - ctr = (char *)aes->iv_ce ; -#else - ctr = counter ; -#endif - - XMEMSET(ctr, 0, AES_BLOCK_SIZE); - XMEMCPY(ctr, iv, ivSz); - InitGcmCounter(ctr); - -#ifdef CYASSL_PIC32MZ_CRYPT - if(blocks) - AesCrypt(aes, out, in, blocks*AES_BLOCK_SIZE, - PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM ); -#endif - while (blocks--) { - IncrementGcmCounter(ctr); - #ifndef CYASSL_PIC32MZ_CRYPT - AesEncrypt(aes, ctr, scratch); - xorbuf(scratch, p, AES_BLOCK_SIZE); - XMEMCPY(c, scratch, AES_BLOCK_SIZE); - #endif - p += AES_BLOCK_SIZE; - c += AES_BLOCK_SIZE; - } - - if (partial != 0) { - IncrementGcmCounter(ctr); - AesEncrypt(aes, ctr, scratch); - xorbuf(scratch, p, partial); - XMEMCPY(c, scratch, partial); - - } - - GHASH(aes, authIn, authInSz, out, sz, authTag, authTagSz); - InitGcmCounter(ctr); - AesEncrypt(aes, ctr, scratch); - xorbuf(authTag, scratch, authTagSz); - -} - - -int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) -{ - word32 blocks = sz / AES_BLOCK_SIZE; - word32 partial = sz % AES_BLOCK_SIZE; - const byte* c = in; - byte* p = out; - byte counter[AES_BLOCK_SIZE]; - byte *ctr ; - byte scratch[AES_BLOCK_SIZE]; - - CYASSL_ENTER("AesGcmDecrypt"); - -#ifdef CYASSL_PIC32MZ_CRYPT - ctr = (char *)aes->iv_ce ; -#else - ctr = counter ; -#endif - - XMEMSET(ctr, 0, AES_BLOCK_SIZE); - XMEMCPY(ctr, iv, ivSz); - InitGcmCounter(ctr); - - /* Calculate the authTag again using the received auth data and the - * cipher text. */ - { - byte Tprime[AES_BLOCK_SIZE]; - byte EKY0[AES_BLOCK_SIZE]; - - GHASH(aes, authIn, authInSz, in, sz, Tprime, sizeof(Tprime)); - AesEncrypt(aes, ctr, EKY0); - xorbuf(Tprime, EKY0, sizeof(Tprime)); - - if (XMEMCMP(authTag, Tprime, authTagSz) != 0) { - return AES_GCM_AUTH_E; - } - } - -#ifdef CYASSL_PIC32MZ_CRYPT - if(blocks) - AesCrypt(aes, out, in, blocks*AES_BLOCK_SIZE, - PIC32_DECRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM ); -#endif - - while (blocks--) { - IncrementGcmCounter(ctr); - #ifndef CYASSL_PIC32MZ_CRYPT - AesEncrypt(aes, ctr, scratch); - xorbuf(scratch, c, AES_BLOCK_SIZE); - XMEMCPY(p, scratch, AES_BLOCK_SIZE); - #endif - p += AES_BLOCK_SIZE; - c += AES_BLOCK_SIZE; - } - if (partial != 0) { - IncrementGcmCounter(ctr); - AesEncrypt(aes, ctr, scratch); - xorbuf(scratch, c, partial); - XMEMCPY(p, scratch, partial); - } - return 0; -} - - - -CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len) -{ - AesGcmSetKey(&gmac->aes, key, len); -} - - -CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, - const byte* authIn, word32 authInSz, - byte* authTag, word32 authTagSz) -{ - AesGcmEncrypt(&gmac->aes, NULL, NULL, 0, iv, ivSz, - authTag, authTagSz, authIn, authInSz); -} - -#endif /* HAVE_AESGCM */ - -#ifdef HAVE_AESCCM - -void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz) -{ - byte nonce[AES_BLOCK_SIZE]; - - if (!((keySz == 16) || (keySz == 24) || (keySz == 32))) - return; - - XMEMSET(nonce, 0, sizeof(nonce)); - AesSetKey(aes, key, keySz, nonce, AES_ENCRYPTION); -} - - -static void roll_x(Aes* aes, const byte* in, word32 inSz, byte* out) -{ - /* process the bulk of the data */ - while (inSz >= AES_BLOCK_SIZE) { - xorbuf(out, in, AES_BLOCK_SIZE); - in += AES_BLOCK_SIZE; - inSz -= AES_BLOCK_SIZE; - - AesEncrypt(aes, out, out); - } - - /* process remainder of the data */ - if (inSz > 0) { - xorbuf(out, in, inSz); - AesEncrypt(aes, out, out); - } -} - - -static void roll_auth(Aes* aes, const byte* in, word32 inSz, byte* out) -{ - word32 authLenSz; - word32 remainder; - - /* encode the length in */ - if (inSz <= 0xFEFF) { - authLenSz = 2; - out[0] ^= ((inSz & 0xFF00) >> 8); - out[1] ^= (inSz & 0x00FF); - } - else if (inSz <= 0xFFFFFFFF) { - authLenSz = 6; - out[0] ^= 0xFF; out[1] ^= 0xFE; - out[2] ^= ((inSz & 0xFF000000) >> 24); - out[3] ^= ((inSz & 0x00FF0000) >> 16); - out[4] ^= ((inSz & 0x0000FF00) >> 8); - out[5] ^= (inSz & 0x000000FF); - } - /* Note, the protocol handles auth data up to 2^64, but we are - * using 32-bit sizes right now, so the bigger data isn't handled - * else if (inSz <= 0xFFFFFFFFFFFFFFFF) {} */ - else - return; - - /* start fill out the rest of the first block */ - remainder = AES_BLOCK_SIZE - authLenSz; - if (inSz >= remainder) { - /* plenty of bulk data to fill the remainder of this block */ - xorbuf(out + authLenSz, in, remainder); - inSz -= remainder; - in += remainder; - } - else { - /* not enough bulk data, copy what is available, and pad zero */ - xorbuf(out + authLenSz, in, inSz); - inSz = 0; - } - AesEncrypt(aes, out, out); - - if (inSz > 0) - roll_x(aes, in, inSz, out); -} - - -static INLINE void AesCcmCtrInc(byte* B, word32 lenSz) -{ - word32 i; - - for (i = 0; i < lenSz; i++) { - if (++B[AES_BLOCK_SIZE - 1 - i] != 0) return; - } -} - - -void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) -{ - byte A[AES_BLOCK_SIZE]; - byte B[AES_BLOCK_SIZE]; - byte lenSz; - word32 i; - - XMEMCPY(B+1, nonce, nonceSz); - lenSz = AES_BLOCK_SIZE - 1 - (byte)nonceSz; - B[0] = (authInSz > 0 ? 64 : 0) - + (8 * (((byte)authTagSz - 2) / 2)) - + (lenSz - 1); - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = (inSz >> (8 * i)) & 0xFF; - - AesEncrypt(aes, B, A); - if (authInSz > 0) - roll_auth(aes, authIn, authInSz, A); - if (inSz > 0) - roll_x(aes, in, inSz, A); - XMEMCPY(authTag, A, authTagSz); - - B[0] = lenSz - 1; - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = 0; - AesEncrypt(aes, B, A); - xorbuf(authTag, A, authTagSz); - - B[15] = 1; - while (inSz >= AES_BLOCK_SIZE) { - AesEncrypt(aes, B, A); - xorbuf(A, in, AES_BLOCK_SIZE); - XMEMCPY(out, A, AES_BLOCK_SIZE); - - AesCcmCtrInc(B, lenSz); - inSz -= AES_BLOCK_SIZE; - in += AES_BLOCK_SIZE; - out += AES_BLOCK_SIZE; - } - if (inSz > 0) { - AesEncrypt(aes, B, A); - xorbuf(A, in, inSz); - XMEMCPY(out, A, inSz); - } - - XMEMSET(A, 0, AES_BLOCK_SIZE); - XMEMSET(B, 0, AES_BLOCK_SIZE); -} - - -int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) -{ - byte A[AES_BLOCK_SIZE]; - byte B[AES_BLOCK_SIZE]; - byte* o; - byte lenSz; - word32 i, oSz; - int result = 0; - - o = out; - oSz = inSz; - XMEMCPY(B+1, nonce, nonceSz); - lenSz = AES_BLOCK_SIZE - 1 - (byte)nonceSz; - - B[0] = lenSz - 1; - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = 0; - B[15] = 1; - - while (oSz >= AES_BLOCK_SIZE) { - AesEncrypt(aes, B, A); - xorbuf(A, in, AES_BLOCK_SIZE); - XMEMCPY(o, A, AES_BLOCK_SIZE); - - AesCcmCtrInc(B, lenSz); - oSz -= AES_BLOCK_SIZE; - in += AES_BLOCK_SIZE; - o += AES_BLOCK_SIZE; - } - if (inSz > 0) { - AesEncrypt(aes, B, A); - xorbuf(A, in, oSz); - XMEMCPY(o, A, oSz); - } - - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = 0; - AesEncrypt(aes, B, A); - - o = out; - oSz = inSz; - - B[0] = (authInSz > 0 ? 64 : 0) - + (8 * (((byte)authTagSz - 2) / 2)) - + (lenSz - 1); - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = (inSz >> (8 * i)) & 0xFF; - - AesEncrypt(aes, B, A); - if (authInSz > 0) - roll_auth(aes, authIn, authInSz, A); - if (inSz > 0) - roll_x(aes, o, oSz, A); - - B[0] = lenSz - 1; - for (i = 0; i < lenSz; i++) - B[AES_BLOCK_SIZE - 1 - i] = 0; - AesEncrypt(aes, B, B); - xorbuf(A, B, authTagSz); - - if (XMEMCMP(A, authTag, authTagSz) != 0) { - /* If the authTag check fails, don't keep the decrypted data. - * Unfortunately, you need the decrypted data to calculate the - * check value. */ - XMEMSET(out, 0, inSz); - result = AES_CCM_AUTH_E; - } - - XMEMSET(A, 0, AES_BLOCK_SIZE); - XMEMSET(B, 0, AES_BLOCK_SIZE); - o = NULL; - - return result; -} - -#endif - -#endif /* STM32F2_CRYPTO */ - -int AesSetIV(Aes* aes, const byte* iv) -{ - if (aes == NULL) - return BAD_FUNC_ARG; - - if (iv) - XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE); - else - XMEMSET(aes->reg, 0, AES_BLOCK_SIZE); - - return 0; -} - - -#ifdef HAVE_CAVIUM - -#include -#include "cavium_common.h" - -/* Initiliaze Aes for use with Nitrox device */ -int AesInitCavium(Aes* aes, int devId) -{ - if (aes == NULL) - return -1; - - if (CspAllocContext(CONTEXT_SSL, &aes->contextHandle, devId) != 0) - return -1; - - aes->devId = devId; - aes->magic = CYASSL_AES_CAVIUM_MAGIC; - - return 0; -} - - -/* Free Aes from use with Nitrox device */ -void AesFreeCavium(Aes* aes) -{ - if (aes == NULL) - return; - - if (aes->magic != CYASSL_AES_CAVIUM_MAGIC) - return; - - CspFreeContext(CONTEXT_SSL, aes->contextHandle, aes->devId); - aes->magic = 0; -} - - -static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length, - const byte* iv) -{ - if (aes == NULL) - return -1; - - XMEMCPY(aes->key, key, length); /* key still holds key, iv still in reg */ - if (length == 16) - aes->type = AES_128; - else if (length == 24) - aes->type = AES_192; - else if (length == 32) - aes->type = AES_256; - - return AesSetIV(aes, iv); -} - - -static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in, - word32 length) -{ - word offset = 0; - word32 requestId; - - while (length > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - if (CspEncryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, - aes->type, slen, (byte*)in + offset, out + offset, - (byte*)aes->reg, (byte*)aes->key, &requestId, - aes->devId) != 0) { - CYASSL_MSG("Bad Cavium Aes Encrypt"); - return -1; - } - length -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - XMEMCPY(aes->reg, out + offset - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - } - if (length) { - word16 slen = (word16)length; - if (CspEncryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, - aes->type, slen, (byte*)in + offset, out + offset, - (byte*)aes->reg, (byte*)aes->key, &requestId, - aes->devId) != 0) { - CYASSL_MSG("Bad Cavium Aes Encrypt"); - return -1; - } - XMEMCPY(aes->reg, out + offset+length - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - } - return 0; -} - -static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in, - word32 length) -{ - word32 requestId; - word offset = 0; - - while (length > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - XMEMCPY(aes->tmp, in + offset + slen - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - if (CspDecryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, - aes->type, slen, (byte*)in + offset, out + offset, - (byte*)aes->reg, (byte*)aes->key, &requestId, - aes->devId) != 0) { - CYASSL_MSG("Bad Cavium Aes Decrypt"); - return -1; - } - length -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); - } - if (length) { - word16 slen = (word16)length; - XMEMCPY(aes->tmp, in + offset + slen - AES_BLOCK_SIZE, AES_BLOCK_SIZE); - if (CspDecryptAes(CAVIUM_BLOCKING, aes->contextHandle, CAVIUM_NO_UPDATE, - aes->type, slen, (byte*)in + offset, out + offset, - (byte*)aes->reg, (byte*)aes->key, &requestId, - aes->devId) != 0) { - CYASSL_MSG("Bad Cavium Aes Decrypt"); - return -1; - } - XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE); - } - return 0; -} - -#endif /* HAVE_CAVIUM */ - -#endif /* NO_AES */ - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s b/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s deleted file mode 100755 index 382d9b31..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/aes_asm.s +++ /dev/null @@ -1,814 +0,0 @@ -/* aes_asm.s - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* See Intel® Advanced Encryption Standard (AES) Instructions Set White Paper - * by Intel Mobility Group, Israel Development Center, Israel Shay Gueron - */ - - -/* -AES_CBC_encrypt (const unsigned char *in, - unsigned char *out, - unsigned char ivec[16], - unsigned long length, - const unsigned char *KS, - int nr) -*/ -.globl AES_CBC_encrypt -AES_CBC_encrypt: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9d -movq %rcx, %r10 -shrq $4, %rcx -shlq $60, %r10 -je NO_PARTS -addq $1, %rcx -NO_PARTS: -subq $16, %rsi -movdqa (%rdx), %xmm1 -LOOP: -pxor (%rdi), %xmm1 -pxor (%r8), %xmm1 -addq $16,%rsi -addq $16,%rdi -cmpl $12, %r9d -aesenc 16(%r8),%xmm1 -aesenc 32(%r8),%xmm1 -aesenc 48(%r8),%xmm1 -aesenc 64(%r8),%xmm1 -aesenc 80(%r8),%xmm1 -aesenc 96(%r8),%xmm1 -aesenc 112(%r8),%xmm1 -aesenc 128(%r8),%xmm1 -aesenc 144(%r8),%xmm1 -movdqa 160(%r8),%xmm2 -jb LAST -cmpl $14, %r9d - -aesenc 160(%r8),%xmm1 -aesenc 176(%r8),%xmm1 -movdqa 192(%r8),%xmm2 -jb LAST -aesenc 192(%r8),%xmm1 -aesenc 208(%r8),%xmm1 -movdqa 224(%r8),%xmm2 -LAST: -decq %rcx -aesenclast %xmm2,%xmm1 -movdqu %xmm1,(%rsi) -jne LOOP -ret - - - - -/* -AES_CBC_decrypt (const unsigned char *in, - unsigned char *out, - unsigned char ivec[16], - unsigned long length, - const unsigned char *KS, - int nr) -*/ -.globl AES_CBC_decrypt -AES_CBC_decrypt: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9d - -movq %rcx, %r10 -shrq $4, %rcx -shlq $60, %r10 -je DNO_PARTS_4 -addq $1, %rcx -DNO_PARTS_4: -movq %rcx, %r10 -shlq $62, %r10 -shrq $62, %r10 -shrq $2, %rcx -movdqu (%rdx),%xmm5 -je DREMAINDER_4 -subq $64, %rsi -DLOOP_4: -movdqu (%rdi), %xmm1 -movdqu 16(%rdi), %xmm2 -movdqu 32(%rdi), %xmm3 -movdqu 48(%rdi), %xmm4 -movdqa %xmm1, %xmm6 -movdqa %xmm2, %xmm7 -movdqa %xmm3, %xmm8 -movdqa %xmm4, %xmm15 -movdqa (%r8), %xmm9 -movdqa 16(%r8), %xmm10 -movdqa 32(%r8), %xmm11 -movdqa 48(%r8), %xmm12 -pxor %xmm9, %xmm1 -pxor %xmm9, %xmm2 -pxor %xmm9, %xmm3 - -pxor %xmm9, %xmm4 -aesdec %xmm10, %xmm1 -aesdec %xmm10, %xmm2 -aesdec %xmm10, %xmm3 -aesdec %xmm10, %xmm4 -aesdec %xmm11, %xmm1 -aesdec %xmm11, %xmm2 -aesdec %xmm11, %xmm3 -aesdec %xmm11, %xmm4 -aesdec %xmm12, %xmm1 -aesdec %xmm12, %xmm2 -aesdec %xmm12, %xmm3 -aesdec %xmm12, %xmm4 -movdqa 64(%r8), %xmm9 -movdqa 80(%r8), %xmm10 -movdqa 96(%r8), %xmm11 -movdqa 112(%r8), %xmm12 -aesdec %xmm9, %xmm1 -aesdec %xmm9, %xmm2 -aesdec %xmm9, %xmm3 -aesdec %xmm9, %xmm4 -aesdec %xmm10, %xmm1 -aesdec %xmm10, %xmm2 -aesdec %xmm10, %xmm3 -aesdec %xmm10, %xmm4 -aesdec %xmm11, %xmm1 -aesdec %xmm11, %xmm2 -aesdec %xmm11, %xmm3 -aesdec %xmm11, %xmm4 -aesdec %xmm12, %xmm1 -aesdec %xmm12, %xmm2 -aesdec %xmm12, %xmm3 -aesdec %xmm12, %xmm4 -movdqa 128(%r8), %xmm9 -movdqa 144(%r8), %xmm10 -movdqa 160(%r8), %xmm11 -cmpl $12, %r9d -aesdec %xmm9, %xmm1 -aesdec %xmm9, %xmm2 -aesdec %xmm9, %xmm3 -aesdec %xmm9, %xmm4 -aesdec %xmm10, %xmm1 -aesdec %xmm10, %xmm2 -aesdec %xmm10, %xmm3 -aesdec %xmm10, %xmm4 -jb DLAST_4 -movdqa 160(%r8), %xmm9 -movdqa 176(%r8), %xmm10 -movdqa 192(%r8), %xmm11 -cmpl $14, %r9d -aesdec %xmm9, %xmm1 -aesdec %xmm9, %xmm2 -aesdec %xmm9, %xmm3 -aesdec %xmm9, %xmm4 -aesdec %xmm10, %xmm1 -aesdec %xmm10, %xmm2 -aesdec %xmm10, %xmm3 -aesdec %xmm10, %xmm4 -jb DLAST_4 - -movdqa 192(%r8), %xmm9 -movdqa 208(%r8), %xmm10 -movdqa 224(%r8), %xmm11 -aesdec %xmm9, %xmm1 -aesdec %xmm9, %xmm2 -aesdec %xmm9, %xmm3 -aesdec %xmm9, %xmm4 -aesdec %xmm10, %xmm1 -aesdec %xmm10, %xmm2 -aesdec %xmm10, %xmm3 -aesdec %xmm10, %xmm4 -DLAST_4: -addq $64, %rdi -addq $64, %rsi -decq %rcx -aesdeclast %xmm11, %xmm1 -aesdeclast %xmm11, %xmm2 -aesdeclast %xmm11, %xmm3 -aesdeclast %xmm11, %xmm4 -pxor %xmm5 ,%xmm1 -pxor %xmm6 ,%xmm2 -pxor %xmm7 ,%xmm3 -pxor %xmm8 ,%xmm4 -movdqu %xmm1, (%rsi) -movdqu %xmm2, 16(%rsi) -movdqu %xmm3, 32(%rsi) -movdqu %xmm4, 48(%rsi) -movdqa %xmm15,%xmm5 -jne DLOOP_4 -addq $64, %rsi -DREMAINDER_4: -cmpq $0, %r10 -je DEND_4 -DLOOP_4_2: -movdqu (%rdi), %xmm1 -movdqa %xmm1 ,%xmm15 -addq $16, %rdi -pxor (%r8), %xmm1 -movdqu 160(%r8), %xmm2 -cmpl $12, %r9d -aesdec 16(%r8), %xmm1 -aesdec 32(%r8), %xmm1 -aesdec 48(%r8), %xmm1 -aesdec 64(%r8), %xmm1 -aesdec 80(%r8), %xmm1 -aesdec 96(%r8), %xmm1 -aesdec 112(%r8), %xmm1 -aesdec 128(%r8), %xmm1 -aesdec 144(%r8), %xmm1 -jb DLAST_4_2 -movdqu 192(%r8), %xmm2 -cmpl $14, %r9d -aesdec 160(%r8), %xmm1 -aesdec 176(%r8), %xmm1 -jb DLAST_4_2 -movdqu 224(%r8), %xmm2 -aesdec 192(%r8), %xmm1 -aesdec 208(%r8), %xmm1 -DLAST_4_2: -aesdeclast %xmm2, %xmm1 -pxor %xmm5, %xmm1 -movdqa %xmm15, %xmm5 -movdqu %xmm1, (%rsi) - -addq $16, %rsi -decq %r10 -jne DLOOP_4_2 -DEND_4: -ret - - -/* -AES_ECB_encrypt (const unsigned char *in, - unsigned char *out, - unsigned long length, - const unsigned char *KS, - int nr) -*/ -.globl AES_ECB_encrypt -AES_ECB_encrypt: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8d - movq %rdx, %r10 - shrq $4, %rdx - shlq $60, %r10 - je EECB_NO_PARTS_4 - addq $1, %rdx -EECB_NO_PARTS_4: - movq %rdx, %r10 - shlq $62, %r10 - shrq $62, %r10 - shrq $2, %rdx - je EECB_REMAINDER_4 - subq $64, %rsi -EECB_LOOP_4: - movdqu (%rdi), %xmm1 - movdqu 16(%rdi), %xmm2 - movdqu 32(%rdi), %xmm3 - movdqu 48(%rdi), %xmm4 - movdqa (%rcx), %xmm9 - movdqa 16(%rcx), %xmm10 - movdqa 32(%rcx), %xmm11 - movdqa 48(%rcx), %xmm12 - pxor %xmm9, %xmm1 - pxor %xmm9, %xmm2 - pxor %xmm9, %xmm3 - pxor %xmm9, %xmm4 - aesenc %xmm10, %xmm1 - aesenc %xmm10, %xmm2 - aesenc %xmm10, %xmm3 - aesenc %xmm10, %xmm4 - aesenc %xmm11, %xmm1 - aesenc %xmm11, %xmm2 - aesenc %xmm11, %xmm3 - aesenc %xmm11, %xmm4 - aesenc %xmm12, %xmm1 - aesenc %xmm12, %xmm2 - aesenc %xmm12, %xmm3 - aesenc %xmm12, %xmm4 - movdqa 64(%rcx), %xmm9 - movdqa 80(%rcx), %xmm10 - movdqa 96(%rcx), %xmm11 - movdqa 112(%rcx), %xmm12 - aesenc %xmm9, %xmm1 - aesenc %xmm9, %xmm2 - aesenc %xmm9, %xmm3 - aesenc %xmm9, %xmm4 - aesenc %xmm10, %xmm1 - aesenc %xmm10, %xmm2 - aesenc %xmm10, %xmm3 - aesenc %xmm10, %xmm4 - aesenc %xmm11, %xmm1 - aesenc %xmm11, %xmm2 - aesenc %xmm11, %xmm3 - aesenc %xmm11, %xmm4 - aesenc %xmm12, %xmm1 - aesenc %xmm12, %xmm2 - aesenc %xmm12, %xmm3 - aesenc %xmm12, %xmm4 - movdqa 128(%rcx), %xmm9 - movdqa 144(%rcx), %xmm10 - movdqa 160(%rcx), %xmm11 - cmpl $12, %r8d - aesenc %xmm9, %xmm1 - aesenc %xmm9, %xmm2 - aesenc %xmm9, %xmm3 - aesenc %xmm9, %xmm4 - aesenc %xmm10, %xmm1 - aesenc %xmm10, %xmm2 - aesenc %xmm10, %xmm3 - aesenc %xmm10, %xmm4 - jb EECB_LAST_4 - movdqa 160(%rcx), %xmm9 - movdqa 176(%rcx), %xmm10 - movdqa 192(%rcx), %xmm11 - cmpl $14, %r8d - aesenc %xmm9, %xmm1 - aesenc %xmm9, %xmm2 - aesenc %xmm9, %xmm3 - aesenc %xmm9, %xmm4 - aesenc %xmm10, %xmm1 - aesenc %xmm10, %xmm2 - aesenc %xmm10, %xmm3 - aesenc %xmm10, %xmm4 - jb EECB_LAST_4 - movdqa 192(%rcx), %xmm9 - movdqa 208(%rcx), %xmm10 - movdqa 224(%rcx), %xmm11 - aesenc %xmm9, %xmm1 - aesenc %xmm9, %xmm2 - aesenc %xmm9, %xmm3 - aesenc %xmm9, %xmm4 - aesenc %xmm10, %xmm1 - aesenc %xmm10, %xmm2 - aesenc %xmm10, %xmm3 - aesenc %xmm10, %xmm4 -EECB_LAST_4: - addq $64, %rdi - addq $64, %rsi - decq %rdx - aesenclast %xmm11, %xmm1 - aesenclast %xmm11, %xmm2 - aesenclast %xmm11, %xmm3 - aesenclast %xmm11, %xmm4 - movdqu %xmm1, (%rsi) - movdqu %xmm2, 16(%rsi) - movdqu %xmm3, 32(%rsi) - movdqu %xmm4, 48(%rsi) - jne EECB_LOOP_4 - addq $64, %rsi -EECB_REMAINDER_4: - cmpq $0, %r10 - je EECB_END_4 -EECB_LOOP_4_2: - movdqu (%rdi), %xmm1 - addq $16, %rdi - pxor (%rcx), %xmm1 - movdqu 160(%rcx), %xmm2 - aesenc 16(%rcx), %xmm1 - aesenc 32(%rcx), %xmm1 - aesenc 48(%rcx), %xmm1 - aesenc 64(%rcx), %xmm1 - aesenc 80(%rcx), %xmm1 - aesenc 96(%rcx), %xmm1 - aesenc 112(%rcx), %xmm1 - aesenc 128(%rcx), %xmm1 - aesenc 144(%rcx), %xmm1 - cmpl $12, %r8d - jb EECB_LAST_4_2 - movdqu 192(%rcx), %xmm2 - aesenc 160(%rcx), %xmm1 - aesenc 176(%rcx), %xmm1 - cmpl $14, %r8d - jb EECB_LAST_4_2 - movdqu 224(%rcx), %xmm2 - aesenc 192(%rcx), %xmm1 - aesenc 208(%rcx), %xmm1 -EECB_LAST_4_2: - aesenclast %xmm2, %xmm1 - movdqu %xmm1, (%rsi) - addq $16, %rsi - decq %r10 - jne EECB_LOOP_4_2 -EECB_END_4: - ret - - -/* -AES_ECB_decrypt (const unsigned char *in, - unsigned char *out, - unsigned long length, - const unsigned char *KS, - int nr) -*/ -.globl AES_ECB_decrypt -AES_ECB_decrypt: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8d - - movq %rdx, %r10 - shrq $4, %rdx - shlq $60, %r10 - je DECB_NO_PARTS_4 - addq $1, %rdx -DECB_NO_PARTS_4: - movq %rdx, %r10 - shlq $62, %r10 - shrq $62, %r10 - shrq $2, %rdx - je DECB_REMAINDER_4 - subq $64, %rsi -DECB_LOOP_4: - movdqu (%rdi), %xmm1 - movdqu 16(%rdi), %xmm2 - movdqu 32(%rdi), %xmm3 - movdqu 48(%rdi), %xmm4 - movdqa (%rcx), %xmm9 - movdqa 16(%rcx), %xmm10 - movdqa 32(%rcx), %xmm11 - movdqa 48(%rcx), %xmm12 - pxor %xmm9, %xmm1 - pxor %xmm9, %xmm2 - pxor %xmm9, %xmm3 - pxor %xmm9, %xmm4 - aesdec %xmm10, %xmm1 - aesdec %xmm10, %xmm2 - aesdec %xmm10, %xmm3 - aesdec %xmm10, %xmm4 - aesdec %xmm11, %xmm1 - aesdec %xmm11, %xmm2 - aesdec %xmm11, %xmm3 - aesdec %xmm11, %xmm4 - aesdec %xmm12, %xmm1 - aesdec %xmm12, %xmm2 - aesdec %xmm12, %xmm3 - aesdec %xmm12, %xmm4 - movdqa 64(%rcx), %xmm9 - movdqa 80(%rcx), %xmm10 - movdqa 96(%rcx), %xmm11 - movdqa 112(%rcx), %xmm12 - aesdec %xmm9, %xmm1 - aesdec %xmm9, %xmm2 - aesdec %xmm9, %xmm3 - aesdec %xmm9, %xmm4 - aesdec %xmm10, %xmm1 - aesdec %xmm10, %xmm2 - aesdec %xmm10, %xmm3 - aesdec %xmm10, %xmm4 - aesdec %xmm11, %xmm1 - aesdec %xmm11, %xmm2 - aesdec %xmm11, %xmm3 - aesdec %xmm11, %xmm4 - aesdec %xmm12, %xmm1 - aesdec %xmm12, %xmm2 - aesdec %xmm12, %xmm3 - aesdec %xmm12, %xmm4 - movdqa 128(%rcx), %xmm9 - movdqa 144(%rcx), %xmm10 - movdqa 160(%rcx), %xmm11 - cmpl $12, %r8d - aesdec %xmm9, %xmm1 - aesdec %xmm9, %xmm2 - aesdec %xmm9, %xmm3 - aesdec %xmm9, %xmm4 - aesdec %xmm10, %xmm1 - aesdec %xmm10, %xmm2 - aesdec %xmm10, %xmm3 - aesdec %xmm10, %xmm4 - jb DECB_LAST_4 - movdqa 160(%rcx), %xmm9 - movdqa 176(%rcx), %xmm10 - movdqa 192(%rcx), %xmm11 - cmpl $14, %r8d - aesdec %xmm9, %xmm1 - aesdec %xmm9, %xmm2 - aesdec %xmm9, %xmm3 - aesdec %xmm9, %xmm4 - aesdec %xmm10, %xmm1 - aesdec %xmm10, %xmm2 - aesdec %xmm10, %xmm3 - aesdec %xmm10, %xmm4 - jb DECB_LAST_4 - movdqa 192(%rcx), %xmm9 - movdqa 208(%rcx), %xmm10 - movdqa 224(%rcx), %xmm11 - aesdec %xmm9, %xmm1 - aesdec %xmm9, %xmm2 - aesdec %xmm9, %xmm3 - aesdec %xmm9, %xmm4 - aesdec %xmm10, %xmm1 - aesdec %xmm10, %xmm2 - aesdec %xmm10, %xmm3 - aesdec %xmm10, %xmm4 -DECB_LAST_4: - addq $64, %rdi - addq $64, %rsi - decq %rdx - aesdeclast %xmm11, %xmm1 - aesdeclast %xmm11, %xmm2 - aesdeclast %xmm11, %xmm3 - aesdeclast %xmm11, %xmm4 - movdqu %xmm1, (%rsi) - movdqu %xmm2, 16(%rsi) - movdqu %xmm3, 32(%rsi) - movdqu %xmm4, 48(%rsi) - jne DECB_LOOP_4 - addq $64, %rsi -DECB_REMAINDER_4: - cmpq $0, %r10 - je DECB_END_4 -DECB_LOOP_4_2: - movdqu (%rdi), %xmm1 - addq $16, %rdi - pxor (%rcx), %xmm1 - movdqu 160(%rcx), %xmm2 - cmpl $12, %r8d - aesdec 16(%rcx), %xmm1 - aesdec 32(%rcx), %xmm1 - aesdec 48(%rcx), %xmm1 - aesdec 64(%rcx), %xmm1 - aesdec 80(%rcx), %xmm1 - aesdec 96(%rcx), %xmm1 - aesdec 112(%rcx), %xmm1 - aesdec 128(%rcx), %xmm1 - aesdec 144(%rcx), %xmm1 - jb DECB_LAST_4_2 - cmpl $14, %r8d - movdqu 192(%rcx), %xmm2 - aesdec 160(%rcx), %xmm1 - aesdec 176(%rcx), %xmm1 - jb DECB_LAST_4_2 - movdqu 224(%rcx), %xmm2 - aesdec 192(%rcx), %xmm1 - aesdec 208(%rcx), %xmm1 -DECB_LAST_4_2: - aesdeclast %xmm2, %xmm1 - movdqu %xmm1, (%rsi) - addq $16, %rsi - decq %r10 - jne DECB_LOOP_4_2 -DECB_END_4: - ret - - - - -/* -void AES_128_Key_Expansion(const unsigned char* userkey, - unsigned char* key_schedule); -*/ -.align 16,0x90 -.globl AES_128_Key_Expansion -AES_128_Key_Expansion: -# parameter 1: %rdi -# parameter 2: %rsi -movl $10, 240(%rsi) - -movdqu (%rdi), %xmm1 -movdqa %xmm1, (%rsi) - - -ASSISTS: -aeskeygenassist $1, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 16(%rsi) -aeskeygenassist $2, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 32(%rsi) -aeskeygenassist $4, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 48(%rsi) -aeskeygenassist $8, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 64(%rsi) -aeskeygenassist $16, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 80(%rsi) -aeskeygenassist $32, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 96(%rsi) -aeskeygenassist $64, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 112(%rsi) -aeskeygenassist $0x80, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 128(%rsi) -aeskeygenassist $0x1b, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 144(%rsi) -aeskeygenassist $0x36, %xmm1, %xmm2 -call PREPARE_ROUNDKEY_128 -movdqa %xmm1, 160(%rsi) -ret - -PREPARE_ROUNDKEY_128: -pshufd $255, %xmm2, %xmm2 -movdqa %xmm1, %xmm3 -pslldq $4, %xmm3 -pxor %xmm3, %xmm1 -pslldq $4, %xmm3 -pxor %xmm3, %xmm1 -pslldq $4, %xmm3 -pxor %xmm3, %xmm1 -pxor %xmm2, %xmm1 -ret - - -/* -void AES_192_Key_Expansion (const unsigned char *userkey, - unsigned char *key) -*/ -.globl AES_192_Key_Expansion -AES_192_Key_Expansion: -# parameter 1: %rdi -# parameter 2: %rsi - -movdqu (%rdi), %xmm1 -movdqu 16(%rdi), %xmm3 -movdqa %xmm1, (%rsi) -movdqa %xmm3, %xmm5 - -aeskeygenassist $0x1, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -shufpd $0, %xmm1, %xmm5 -movdqa %xmm5, 16(%rsi) -movdqa %xmm1, %xmm6 -shufpd $1, %xmm3, %xmm6 -movdqa %xmm6, 32(%rsi) - -aeskeygenassist $0x2, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -movdqa %xmm1, 48(%rsi) -movdqa %xmm3, %xmm5 - -aeskeygenassist $0x4, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -shufpd $0, %xmm1, %xmm5 -movdqa %xmm5, 64(%rsi) -movdqa %xmm1, %xmm6 -shufpd $1, %xmm3, %xmm6 -movdqa %xmm6, 80(%rsi) - -aeskeygenassist $0x8, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -movdqa %xmm1, 96(%rsi) -movdqa %xmm3, %xmm5 - -aeskeygenassist $0x10, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -shufpd $0, %xmm1, %xmm5 -movdqa %xmm5, 112(%rsi) -movdqa %xmm1, %xmm6 -shufpd $1, %xmm3, %xmm6 -movdqa %xmm6, 128(%rsi) - -aeskeygenassist $0x20, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -movdqa %xmm1, 144(%rsi) -movdqa %xmm3, %xmm5 - -aeskeygenassist $0x40, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -shufpd $0, %xmm1, %xmm5 -movdqa %xmm5, 160(%rsi) -movdqa %xmm1, %xmm6 -shufpd $1, %xmm3, %xmm6 -movdqa %xmm6, 176(%rsi) - -aeskeygenassist $0x80, %xmm3, %xmm2 -call PREPARE_ROUNDKEY_192 -movdqa %xmm1, 192(%rsi) -movdqa %xmm3, 208(%rsi) -ret - -PREPARE_ROUNDKEY_192: -pshufd $0x55, %xmm2, %xmm2 -movdqu %xmm1, %xmm4 -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 - -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 -pxor %xmm2, %xmm1 -pshufd $0xff, %xmm1, %xmm2 -movdqu %xmm3, %xmm4 -pslldq $4, %xmm4 -pxor %xmm4, %xmm3 -pxor %xmm2, %xmm3 -ret - - -/* -void AES_256_Key_Expansion (const unsigned char *userkey, - unsigned char *key) -*/ -.globl AES_256_Key_Expansion -AES_256_Key_Expansion: -# parameter 1: %rdi -# parameter 2: %rsi - -movdqu (%rdi), %xmm1 -movdqu 16(%rdi), %xmm3 -movdqa %xmm1, (%rsi) -movdqa %xmm3, 16(%rsi) - -aeskeygenassist $0x1, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 32(%rsi) -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 48(%rsi) -aeskeygenassist $0x2, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 64(%rsi) -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 80(%rsi) -aeskeygenassist $0x4, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 96(%rsi) -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 112(%rsi) -aeskeygenassist $0x8, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 128(%rsi) -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 144(%rsi) -aeskeygenassist $0x10, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 160(%rsi) -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 176(%rsi) -aeskeygenassist $0x20, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 192(%rsi) - -aeskeygenassist $0x0, %xmm1, %xmm2 -call MAKE_RK256_b -movdqa %xmm3, 208(%rsi) -aeskeygenassist $0x40, %xmm3, %xmm2 -call MAKE_RK256_a -movdqa %xmm1, 224(%rsi) - -ret - -MAKE_RK256_a: -pshufd $0xff, %xmm2, %xmm2 -movdqa %xmm1, %xmm4 -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 -pslldq $4, %xmm4 -pxor %xmm4, %xmm1 -pxor %xmm2, %xmm1 -ret - -MAKE_RK256_b: -pshufd $0xaa, %xmm2, %xmm2 -movdqa %xmm3, %xmm4 -pslldq $4, %xmm4 -pxor %xmm4, %xmm3 -pslldq $4, %xmm4 -pxor %xmm4, %xmm3 -pslldq $4, %xmm4 -pxor %xmm4, %xmm3 -pxor %xmm2, %xmm3 -ret - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c b/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c deleted file mode 100644 index 01cc7a19..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/arc4.c +++ /dev/null @@ -1,179 +0,0 @@ -/* arc4.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_RC4 - -#include - - -#ifdef HAVE_CAVIUM - static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length); - static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in, - word32 length); -#endif - - -void Arc4SetKey(Arc4* arc4, const byte* key, word32 length) -{ - word32 i; - word32 keyIndex = 0, stateIndex = 0; - -#ifdef HAVE_CAVIUM - if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC) - return Arc4CaviumSetKey(arc4, key, length); -#endif - - arc4->x = 1; - arc4->y = 0; - - for (i = 0; i < ARC4_STATE_SIZE; i++) - arc4->state[i] = (byte)i; - - for (i = 0; i < ARC4_STATE_SIZE; i++) { - word32 a = arc4->state[i]; - stateIndex += key[keyIndex] + a; - stateIndex &= 0xFF; - arc4->state[i] = arc4->state[stateIndex]; - arc4->state[stateIndex] = (byte)a; - - if (++keyIndex >= length) - keyIndex = 0; - } -} - - -static INLINE byte MakeByte(word32* x, word32* y, byte* s) -{ - word32 a = s[*x], b; - *y = (*y+a) & 0xff; - - b = s[*y]; - s[*x] = (byte)b; - s[*y] = (byte)a; - *x = (*x+1) & 0xff; - - return s[(a+b) & 0xff]; -} - - -void Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length) -{ - word32 x; - word32 y; - -#ifdef HAVE_CAVIUM - if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC) - return Arc4CaviumProcess(arc4, out, in, length); -#endif - - x = arc4->x; - y = arc4->y; - - while(length--) - *out++ = *in++ ^ MakeByte(&x, &y, arc4->state); - - arc4->x = (byte)x; - arc4->y = (byte)y; -} - - -#ifdef HAVE_CAVIUM - -#include -#include "cavium_common.h" - -/* Initiliaze Arc4 for use with Nitrox device */ -int Arc4InitCavium(Arc4* arc4, int devId) -{ - if (arc4 == NULL) - return -1; - - if (CspAllocContext(CONTEXT_SSL, &arc4->contextHandle, devId) != 0) - return -1; - - arc4->devId = devId; - arc4->magic = CYASSL_ARC4_CAVIUM_MAGIC; - - return 0; -} - - -/* Free Arc4 from use with Nitrox device */ -void Arc4FreeCavium(Arc4* arc4) -{ - if (arc4 == NULL) - return; - - if (arc4->magic != CYASSL_ARC4_CAVIUM_MAGIC) - return; - - CspFreeContext(CONTEXT_SSL, arc4->contextHandle, arc4->devId); - arc4->magic = 0; -} - - -static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length) -{ - word32 requestId; - - if (CspInitializeRc4(CAVIUM_BLOCKING, arc4->contextHandle, length, - (byte*)key, &requestId, arc4->devId) != 0) { - CYASSL_MSG("Bad Cavium Arc4 Init"); - } -} - - -static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in, - word32 length) -{ - word offset = 0; - word32 requestId; - - while (length > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE, - slen, (byte*)in + offset, out + offset, &requestId, - arc4->devId) != 0) { - CYASSL_MSG("Bad Cavium Arc4 Encrypt"); - } - length -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - } - if (length) { - word16 slen = (word16)length; - if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE, - slen, (byte*)in + offset, out + offset, &requestId, - arc4->devId) != 0) { - CYASSL_MSG("Bad Cavium Arc4 Encrypt"); - } - } -} - -#endif /* HAVE_CAVIUM */ - -#endif /* NO_ARC4 */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/asm.c b/project1/cyassl-3.0.0/ctaocrypt/src/asm.c deleted file mode 100644 index 2924cddc..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/asm.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* asm.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -/* - * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -/******************************************************************/ -/* fp_montgomery_reduce.c asm or generic */ -#if defined(TFM_X86) && !defined(TFM_SSE2) -/* x86-32 code */ - -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ -__asm__( \ - "movl %5,%%eax \n\t" \ - "mull %4 \n\t" \ - "addl %1,%%eax \n\t" \ - "adcl $0,%%edx \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl $0,%%edx \n\t" \ - "movl %%edx,%1 \n\t" \ -:"=g"(_c[LO]), "=r"(cy) \ -:"0"(_c[LO]), "1"(cy), "g"(mu), "g"(*tmpm++) \ -: "%eax", "%edx", "cc") - -#define PROPCARRY \ -__asm__( \ - "addl %1,%0 \n\t" \ - "setb %%al \n\t" \ - "movzbl %%al,%1 \n\t" \ -:"=g"(_c[LO]), "=r"(cy) \ -:"0"(_c[LO]), "1"(cy) \ -: "%eax", "cc") - -/******************************************************************/ -#elif defined(TFM_X86_64) -/* x86-64 code */ - -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ -__asm__( \ - "movq %5,%%rax \n\t" \ - "mulq %4 \n\t" \ - "addq %1,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rdx,%1 \n\t" \ -:"=g"(_c[LO]), "=r"(cy) \ -:"0"(_c[LO]), "1"(cy), "r"(mu), "r"(*tmpm++) \ -: "%rax", "%rdx", "cc") - -#define INNERMUL8 \ - __asm__( \ - "movq 0(%5),%%rax \n\t" \ - "movq 0(%2),%%r10 \n\t" \ - "movq 0x8(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x8(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x10(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x10(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x8(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x18(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x18(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x10(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x20(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x20(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x18(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x28(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x28(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x20(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x30(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x30(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x28(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "movq 0x38(%5),%%r11 \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq 0x38(%2),%%r10 \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x30(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ - "movq %%r11,%%rax \n\t" \ - "mulq %4 \n\t" \ - "addq %%r10,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "addq %3,%%rax \n\t" \ - "adcq $0,%%rdx \n\t" \ - "movq %%rax,0x38(%0) \n\t" \ - "movq %%rdx,%1 \n\t" \ - \ -:"=r"(_c), "=r"(cy) \ -: "0"(_c), "1"(cy), "g"(mu), "r"(tmpm)\ -: "%rax", "%rdx", "%r10", "%r11", "cc") - - -#define PROPCARRY \ -__asm__( \ - "addq %1,%0 \n\t" \ - "setb %%al \n\t" \ - "movzbq %%al,%1 \n\t" \ -:"=g"(_c[LO]), "=r"(cy) \ -:"0"(_c[LO]), "1"(cy) \ -: "%rax", "cc") - -/******************************************************************/ -#elif defined(TFM_SSE2) -/* SSE2 code (assumes 32-bit fp_digits) */ -/* XMM register assignments: - * xmm0 *tmpm++, then Mu * (*tmpm++) - * xmm1 c[x], then Mu - * xmm2 mp - * xmm3 cy - * xmm4 _c[LO] - */ - -#define MONT_START \ - __asm__("movd %0,%%mm2"::"g"(mp)) - -#define MONT_FINI \ - __asm__("emms") - -#define LOOP_START \ -__asm__( \ -"movd %0,%%mm1 \n\t" \ -"pxor %%mm3,%%mm3 \n\t" \ -"pmuludq %%mm2,%%mm1 \n\t" \ -:: "g"(c[x])) - -/* pmuludq on mmx registers does a 32x32->64 multiply. */ -#define INNERMUL \ -__asm__( \ - "movd %1,%%mm4 \n\t" \ - "movd %2,%%mm0 \n\t" \ - "paddq %%mm4,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm0 \n\t" \ - "paddq %%mm0,%%mm3 \n\t" \ - "movd %%mm3,%0 \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -:"=g"(_c[LO]) : "0"(_c[LO]), "g"(*tmpm++) ); - -#define INNERMUL8 \ -__asm__( \ - "movd 0(%1),%%mm4 \n\t" \ - "movd 0(%2),%%mm0 \n\t" \ - "paddq %%mm4,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm0 \n\t" \ - "movd 4(%2),%%mm5 \n\t" \ - "paddq %%mm0,%%mm3 \n\t" \ - "movd 4(%1),%%mm6 \n\t" \ - "movd %%mm3,0(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm6,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm5 \n\t" \ - "movd 8(%2),%%mm6 \n\t" \ - "paddq %%mm5,%%mm3 \n\t" \ - "movd 8(%1),%%mm7 \n\t" \ - "movd %%mm3,4(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm7,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm6 \n\t" \ - "movd 12(%2),%%mm7 \n\t" \ - "paddq %%mm6,%%mm3 \n\t" \ - "movd 12(%1),%%mm5 \n\t" \ - "movd %%mm3,8(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm5,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm7 \n\t" \ - "movd 16(%2),%%mm5 \n\t" \ - "paddq %%mm7,%%mm3 \n\t" \ - "movd 16(%1),%%mm6 \n\t" \ - "movd %%mm3,12(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm6,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm5 \n\t" \ - "movd 20(%2),%%mm6 \n\t" \ - "paddq %%mm5,%%mm3 \n\t" \ - "movd 20(%1),%%mm7 \n\t" \ - "movd %%mm3,16(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm7,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm6 \n\t" \ - "movd 24(%2),%%mm7 \n\t" \ - "paddq %%mm6,%%mm3 \n\t" \ - "movd 24(%1),%%mm5 \n\t" \ - "movd %%mm3,20(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm5,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm7 \n\t" \ - "movd 28(%2),%%mm5 \n\t" \ - "paddq %%mm7,%%mm3 \n\t" \ - "movd 28(%1),%%mm6 \n\t" \ - "movd %%mm3,24(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -\ - "paddq %%mm6,%%mm3 \n\t" \ - "pmuludq %%mm1,%%mm5 \n\t" \ - "paddq %%mm5,%%mm3 \n\t" \ - "movd %%mm3,28(%0) \n\t" \ - "psrlq $32, %%mm3 \n\t" \ -:"=r"(_c) : "0"(_c), "r"(tmpm) ); - -/* TAO switched tmpm from "g" to "r" after gcc tried to index the indexed stack - pointer */ - -#define LOOP_END \ -__asm__( "movd %%mm3,%0 \n" :"=r"(cy)) - -#define PROPCARRY \ -__asm__( \ - "addl %1,%0 \n\t" \ - "setb %%al \n\t" \ - "movzbl %%al,%1 \n\t" \ -:"=g"(_c[LO]), "=r"(cy) \ -:"0"(_c[LO]), "1"(cy) \ -: "%eax", "cc") - -/******************************************************************/ -#elif defined(TFM_ARM) - /* ARMv4 code */ - -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - - -#ifdef __thumb__ - -#define INNERMUL \ -__asm__( \ - " LDR r0,%1 \n\t" \ - " ADDS r0,r0,%0 \n\t" \ - " ITE CS \n\t" \ - " MOVCS %0,#1 \n\t" \ - " MOVCC %0,#0 \n\t" \ - " UMLAL r0,%0,%3,%4 \n\t" \ - " STR r0,%1 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0]):"r0","cc"); - -#define PROPCARRY \ -__asm__( \ - " LDR r0,%1 \n\t" \ - " ADDS r0,r0,%0 \n\t" \ - " STR r0,%1 \n\t" \ - " ITE CS \n\t" \ - " MOVCS %0,#1 \n\t" \ - " MOVCC %0,#0 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"m"(_c[0]):"r0","cc"); - - -/* TAO thumb mode uses ite (if then else) to detect carry directly - * fixed unmatched constraint warning by changing 1 to m */ - -#else /* __thumb__ */ - -#define INNERMUL \ -__asm__( \ - " LDR r0,%1 \n\t" \ - " ADDS r0,r0,%0 \n\t" \ - " MOVCS %0,#1 \n\t" \ - " MOVCC %0,#0 \n\t" \ - " UMLAL r0,%0,%3,%4 \n\t" \ - " STR r0,%1 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(*tmpm++),"1"(_c[0]):"r0","cc"); - -#define PROPCARRY \ -__asm__( \ - " LDR r0,%1 \n\t" \ - " ADDS r0,r0,%0 \n\t" \ - " STR r0,%1 \n\t" \ - " MOVCS %0,#1 \n\t" \ - " MOVCC %0,#0 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"r0","cc"); - -#endif /* __thumb__ */ - -#elif defined(TFM_PPC32) - -/* PPC32 */ -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ -__asm__( \ - " mullw 16,%3,%4 \n\t" \ - " mulhwu 17,%3,%4 \n\t" \ - " addc 16,16,%0 \n\t" \ - " addze 17,17 \n\t" \ - " lwz 18,%1 \n\t" \ - " addc 16,16,18 \n\t" \ - " addze %0,17 \n\t" \ - " stw 16,%1 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(tmpm[0]),"1"(_c[0]):"16", "17", "18","cc"); ++tmpm; - -#define PROPCARRY \ -__asm__( \ - " lwz 16,%1 \n\t" \ - " addc 16,16,%0 \n\t" \ - " stw 16,%1 \n\t" \ - " xor %0,%0,%0 \n\t" \ - " addze %0,%0 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"16","cc"); - -#elif defined(TFM_PPC64) - -/* PPC64 */ -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ -__asm__( \ - " mulld 16,%3,%4 \n\t" \ - " mulhdu 17,%3,%4 \n\t" \ - " addc 16,16,%0 \n\t" \ - " addze 17,17 \n\t" \ - " ldx 18,0,%1 \n\t" \ - " addc 16,16,18 \n\t" \ - " addze %0,17 \n\t" \ - " sdx 16,0,%1 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(tmpm[0]),"1"(_c[0]):"16", "17", "18","cc"); ++tmpm; - -#define PROPCARRY \ -__asm__( \ - " ldx 16,0,%1 \n\t" \ - " addc 16,16,%0 \n\t" \ - " sdx 16,0,%1 \n\t" \ - " xor %0,%0,%0 \n\t" \ - " addze %0,%0 \n\t" \ -:"=r"(cy),"=m"(_c[0]):"0"(cy),"1"(_c[0]):"16","cc"); - -/******************************************************************/ - -#elif defined(TFM_AVR32) - -/* AVR32 */ -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ -__asm__( \ - " ld.w r2,%1 \n\t" \ - " add r2,%0 \n\t" \ - " eor r3,r3 \n\t" \ - " acr r3 \n\t" \ - " macu.d r2,%3,%4 \n\t" \ - " st.w %1,r2 \n\t" \ - " mov %0,r3 \n\t" \ -:"=r"(cy),"=r"(_c):"0"(cy),"r"(mu),"r"(*tmpm++),"1"(_c):"r2","r3"); - -#define PROPCARRY \ -__asm__( \ - " ld.w r2,%1 \n\t" \ - " add r2,%0 \n\t" \ - " st.w %1,r2 \n\t" \ - " eor %0,%0 \n\t" \ - " acr %0 \n\t" \ -:"=r"(cy),"=r"(&_c[0]):"0"(cy),"1"(&_c[0]):"r2","cc"); - -#else - -/* ISO C code */ -#define MONT_START -#define MONT_FINI -#define LOOP_END -#define LOOP_START \ - mu = c[x] * mp - -#define INNERMUL \ - do { fp_word t; \ - t = ((fp_word)_c[0] + (fp_word)cy) + \ - (((fp_word)mu) * ((fp_word)*tmpm++)); \ - _c[0] = (fp_digit)t; \ - cy = (fp_digit)(t >> DIGIT_BIT); \ - } while (0) - -#define PROPCARRY \ - do { fp_digit t = _c[0] += cy; cy = (t < cy); } while (0) - -#endif -/******************************************************************/ - - -#define LO 0 -/* end fp_montogomery_reduce.c asm */ - - -/* start fp_sqr_comba.c asm */ -#if defined(TFM_X86) - -/* x86-32 optimized */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -#define SQRADD(i, j) \ -__asm__( \ - "movl %6,%%eax \n\t" \ - "mull %%eax \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc"); - -#define SQRADD2(i, j) \ -__asm__( \ - "movl %6,%%eax \n\t" \ - "mull %7 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ - "movl %3,%%eax \n\t" \ - "mull %4 \n\t" \ - "movl %%eax,%0 \n\t" \ - "movl %%edx,%1 \n\t" \ - "xorl %2,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc"); - -/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ - -#define SQRADDAC(i, j) \ -__asm__( \ - "movl %6,%%eax \n\t" \ - "mull %7 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc"); - -#define SQRADDDB \ -__asm__( \ - "addl %6,%0 \n\t" \ - "adcl %7,%1 \n\t" \ - "adcl %8,%2 \n\t" \ - "addl %6,%0 \n\t" \ - "adcl %7,%1 \n\t" \ - "adcl %8,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); - -#elif defined(TFM_X86_64) -/* x86-64 optimized */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -#define SQRADD(i, j) \ -__asm__( \ - "movq %6,%%rax \n\t" \ - "mulq %%rax \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq %%rdx,%1 \n\t" \ - "adcq $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i) :"%rax","%rdx","cc"); - -#define SQRADD2(i, j) \ -__asm__( \ - "movq %6,%%rax \n\t" \ - "mulq %7 \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq %%rdx,%1 \n\t" \ - "adcq $0,%2 \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq %%rdx,%1 \n\t" \ - "adcq $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ - "movq %3,%%rax \n\t" \ - "mulq %4 \n\t" \ - "movq %%rax,%0 \n\t" \ - "movq %%rdx,%1 \n\t" \ - "xorq %2,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%rax","%rdx","cc"); - -/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ - -#define SQRADDAC(i, j) \ -__asm__( \ - "movq %6,%%rax \n\t" \ - "mulq %7 \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq %%rdx,%1 \n\t" \ - "adcq $0,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%rax","%rdx","cc"); - -#define SQRADDDB \ -__asm__( \ - "addq %6,%0 \n\t" \ - "adcq %7,%1 \n\t" \ - "adcq %8,%2 \n\t" \ - "addq %6,%0 \n\t" \ - "adcq %7,%1 \n\t" \ - "adcq %8,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); - -#elif defined(TFM_SSE2) - -/* SSE2 Optimized */ -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI \ - __asm__("emms"); - -#define SQRADD(i, j) \ -__asm__( \ - "movd %6,%%mm0 \n\t" \ - "pmuludq %%mm0,%%mm0\n\t" \ - "movd %%mm0,%%eax \n\t" \ - "psrlq $32,%%mm0 \n\t" \ - "addl %%eax,%0 \n\t" \ - "movd %%mm0,%%eax \n\t" \ - "adcl %%eax,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","cc"); - -#define SQRADD2(i, j) \ -__asm__( \ - "movd %6,%%mm0 \n\t" \ - "movd %7,%%mm1 \n\t" \ - "pmuludq %%mm1,%%mm0\n\t" \ - "movd %%mm0,%%eax \n\t" \ - "psrlq $32,%%mm0 \n\t" \ - "movd %%mm0,%%edx \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ - "movd %3,%%mm0 \n\t" \ - "movd %4,%%mm1 \n\t" \ - "pmuludq %%mm1,%%mm0\n\t" \ - "movd %%mm0,%0 \n\t" \ - "psrlq $32,%%mm0 \n\t" \ - "movd %%mm0,%1 \n\t" \ - "xorl %2,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "m"(i), "m"(j)); - -/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ - -#define SQRADDAC(i, j) \ -__asm__( \ - "movd %6,%%mm0 \n\t" \ - "movd %7,%%mm1 \n\t" \ - "pmuludq %%mm1,%%mm0\n\t" \ - "movd %%mm0,%%eax \n\t" \ - "psrlq $32,%%mm0 \n\t" \ - "movd %%mm0,%%edx \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "m"(i), "m"(j) :"%eax","%edx","cc"); - -#define SQRADDDB \ -__asm__( \ - "addl %6,%0 \n\t" \ - "adcl %7,%1 \n\t" \ - "adcl %8,%2 \n\t" \ - "addl %6,%0 \n\t" \ - "adcl %7,%1 \n\t" \ - "adcl %8,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); - -#elif defined(TFM_ARM) - -/* ARM code */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -/* multiplies point i and j, updates carry "c1" and digit c2 */ -#define SQRADD(i, j) \ -__asm__( \ -" UMULL r0,r1,%6,%6 \n\t" \ -" ADDS %0,%0,r0 \n\t" \ -" ADCS %1,%1,r1 \n\t" \ -" ADC %2,%2,#0 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i) : "r0", "r1", "cc"); - -/* for squaring some of the terms are doubled... */ -#define SQRADD2(i, j) \ -__asm__( \ -" UMULL r0,r1,%6,%7 \n\t" \ -" ADDS %0,%0,r0 \n\t" \ -" ADCS %1,%1,r1 \n\t" \ -" ADC %2,%2,#0 \n\t" \ -" ADDS %0,%0,r0 \n\t" \ -" ADCS %1,%1,r1 \n\t" \ -" ADC %2,%2,#0 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ -" UMULL %0,%1,%3,%4 \n\t" \ -" SUB %2,%2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "r"(i), "r"(j) : "cc"); - -/* TAO removed sc0,1,2 as input to remove warning so %6,%7 become %3,%4 */ - -#define SQRADDAC(i, j) \ -__asm__( \ -" UMULL r0,r1,%6,%7 \n\t" \ -" ADDS %0,%0,r0 \n\t" \ -" ADCS %1,%1,r1 \n\t" \ -" ADC %2,%2,#0 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "r0", "r1", "cc"); - -#define SQRADDDB \ -__asm__( \ -" ADDS %0,%0,%3 \n\t" \ -" ADCS %1,%1,%4 \n\t" \ -" ADC %2,%2,%5 \n\t" \ -" ADDS %0,%0,%3 \n\t" \ -" ADCS %1,%1,%4 \n\t" \ -" ADC %2,%2,%5 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); - -#elif defined(TFM_PPC32) - -/* PPC32 */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -/* multiplies point i and j, updates carry "c1" and digit c2 */ -#define SQRADD(i, j) \ -__asm__( \ - " mullw 16,%6,%6 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhwu 16,%6,%6 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"16","cc"); - -/* for squaring some of the terms are doubled... */ -#define SQRADD2(i, j) \ -__asm__( \ - " mullw 16,%6,%7 \n\t" \ - " mulhwu 17,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " adde %1,%1,17 \n\t" \ - " addze %2,%2 \n\t" \ - " addc %0,%0,16 \n\t" \ - " adde %1,%1,17 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16", "17","cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ - " mullw %0,%6,%7 \n\t" \ - " mulhwu %1,%6,%7 \n\t" \ - " xor %2,%2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "cc"); - -#define SQRADDAC(i, j) \ -__asm__( \ - " mullw 16,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhwu 16,%6,%7 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"16", "cc"); - -#define SQRADDDB \ -__asm__( \ - " addc %0,%0,%3 \n\t" \ - " adde %1,%1,%4 \n\t" \ - " adde %2,%2,%5 \n\t" \ - " addc %0,%0,%3 \n\t" \ - " adde %1,%1,%4 \n\t" \ - " adde %2,%2,%5 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); - -#elif defined(TFM_PPC64) -/* PPC64 */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -/* multiplies point i and j, updates carry "c1" and digit c2 */ -#define SQRADD(i, j) \ -__asm__( \ - " mulld 16,%6,%6 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhdu 16,%6,%6 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"16","cc"); - -/* for squaring some of the terms are doubled... */ -#define SQRADD2(i, j) \ -__asm__( \ - " mulld 16,%6,%7 \n\t" \ - " mulhdu 17,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " adde %1,%1,17 \n\t" \ - " addze %2,%2 \n\t" \ - " addc %0,%0,16 \n\t" \ - " adde %1,%1,17 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16", "17","cc"); - -#define SQRADDSC(i, j) \ -__asm__( \ - " mulld %0,%6,%7 \n\t" \ - " mulhdu %1,%6,%7 \n\t" \ - " xor %2,%2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "cc"); - -#define SQRADDAC(i, j) \ -__asm__( \ - " mulld 16,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhdu 16,%6,%7 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"16", "cc"); - -#define SQRADDDB \ -__asm__( \ - " addc %0,%0,%3 \n\t" \ - " adde %1,%1,%4 \n\t" \ - " adde %2,%2,%5 \n\t" \ - " addc %0,%0,%3 \n\t" \ - " adde %1,%1,%4 \n\t" \ - " adde %2,%2,%5 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); - - -#elif defined(TFM_AVR32) - -/* AVR32 */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -/* multiplies point i and j, updates carry "c1" and digit c2 */ -#define SQRADD(i, j) \ -__asm__( \ - " mulu.d r2,%6,%6 \n\t" \ - " add %0,%0,r2 \n\t" \ - " adc %1,%1,r3 \n\t" \ - " acr %2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i):"r2","r3"); - -/* for squaring some of the terms are doubled... */ -#define SQRADD2(i, j) \ -__asm__( \ - " mulu.d r2,%6,%7 \n\t" \ - " add %0,%0,r2 \n\t" \ - " adc %1,%1,r3 \n\t" \ - " acr %2, \n\t" \ - " add %0,%0,r2 \n\t" \ - " adc %1,%1,r3 \n\t" \ - " acr %2, \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"r2", "r3"); - -#define SQRADDSC(i, j) \ -__asm__( \ - " mulu.d r2,%6,%7 \n\t" \ - " mov %0,r2 \n\t" \ - " mov %1,r3 \n\t" \ - " eor %2,%2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "r2", "r3"); - -#define SQRADDAC(i, j) \ -__asm__( \ - " mulu.d r2,%6,%7 \n\t" \ - " add %0,%0,r2 \n\t" \ - " adc %1,%1,r3 \n\t" \ - " acr %2 \n\t" \ -:"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j):"r2", "r3"); - -#define SQRADDDB \ -__asm__( \ - " add %0,%0,%3 \n\t" \ - " adc %1,%1,%4 \n\t" \ - " adc %2,%2,%5 \n\t" \ - " add %0,%0,%3 \n\t" \ - " adc %1,%1,%4 \n\t" \ - " adc %2,%2,%5 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc"); - - -#else - -#define TFM_ISO - -/* ISO C portable code */ - -#define COMBA_START - -#define CLEAR_CARRY \ - c0 = c1 = c2 = 0; - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define CARRY_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_FINI - -/* multiplies point i and j, updates carry "c1" and digit c2 */ -#define SQRADD(i, j) \ - do { fp_word t; \ - t = c0 + ((fp_word)i) * ((fp_word)j); c0 = (fp_digit)t; \ - t = c1 + (t >> DIGIT_BIT); c1 = (fp_digit)t; \ - c2 +=(fp_digit) (t >> DIGIT_BIT); \ - } while (0); - - -/* for squaring some of the terms are doubled... */ -#define SQRADD2(i, j) \ - do { fp_word t; \ - t = ((fp_word)i) * ((fp_word)j); \ - tt = (fp_word)c0 + t; c0 = (fp_digit)tt; \ - tt = (fp_word)c1 + (tt >> DIGIT_BIT); c1 = (fp_digit)tt; \ - c2 +=(fp_digit)( tt >> DIGIT_BIT); \ - tt = (fp_word)c0 + t; c0 = (fp_digit)tt; \ - tt = (fp_word)c1 + (tt >> DIGIT_BIT); c1 = (fp_digit)tt; \ - c2 +=(fp_digit) (tt >> DIGIT_BIT); \ - } while (0); - -#define SQRADDSC(i, j) \ - do { fp_word t; \ - t = ((fp_word)i) * ((fp_word)j); \ - sc0 = (fp_digit)t; sc1 = (t >> DIGIT_BIT); sc2 = 0; \ - } while (0); - -#define SQRADDAC(i, j) \ - do { fp_word t; \ - t = sc0 + ((fp_word)i) * ((fp_word)j); sc0 = (fp_digit)t; \ - t = sc1 + (t >> DIGIT_BIT); sc1 = (fp_digit)t; \ - sc2 += (fp_digit)(t >> DIGIT_BIT); \ - } while (0); - -#define SQRADDDB \ - do { fp_word t; \ - t = ((fp_word)sc0) + ((fp_word)sc0) + c0; c0 = (fp_digit)t; \ - t = ((fp_word)sc1) + ((fp_word)sc1) + c1 + (t >> DIGIT_BIT); \ - c1 = (fp_digit)t; \ - c2 = c2 + (fp_digit)(((fp_word)sc2) + ((fp_word)sc2) + (t >> DIGIT_BIT)); \ - } while (0); - -#endif - -#ifdef TFM_SMALL_SET - #include "fp_sqr_comba_small_set.i" -#endif - -#if defined(TFM_SQR3) - #include "fp_sqr_comba_3.i" -#endif -#if defined(TFM_SQR4) - #include "fp_sqr_comba_4.i" -#endif -#if defined(TFM_SQR6) - #include "fp_sqr_comba_6.i" -#endif -#if defined(TFM_SQR7) - #include "fp_sqr_comba_7.i" -#endif -#if defined(TFM_SQR8) - #include "fp_sqr_comba_8.i" -#endif -#if defined(TFM_SQR9) - #include "fp_sqr_comba_9.i" -#endif -#if defined(TFM_SQR12) - #include "fp_sqr_comba_12.i" -#endif -#if defined(TFM_SQR17) - #include "fp_sqr_comba_17.i" -#endif -#if defined(TFM_SQR20) - #include "fp_sqr_comba_20.i" -#endif -#if defined(TFM_SQR24) - #include "fp_sqr_comba_24.i" -#endif -#if defined(TFM_SQR28) - #include "fp_sqr_comba_28.i" -#endif -#if defined(TFM_SQR32) - #include "fp_sqr_comba_32.i" -#endif -#if defined(TFM_SQR48) - #include "fp_sqr_comba_48.i" -#endif -#if defined(TFM_SQR64) - #include "fp_sqr_comba_64.i" -#endif -/* end fp_sqr_comba.c asm */ - -/* start fp_mul_comba.c asm */ -/* these are the combas. Worship them. */ -#if defined(TFM_X86) -/* Generic x86 optimized code */ - -/* anything you need at the start */ -#define COMBA_START - -/* clear the chaining variables */ -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -/* forward the carry to the next digit */ -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -/* store the first sum */ -#define COMBA_STORE(x) \ - x = c0; - -/* store the second sum [carry] */ -#define COMBA_STORE2(x) \ - x = c1; - -/* anything you need at the end */ -#define COMBA_FINI - -/* this should multiply i and j */ -#define MULADD(i, j) \ -__asm__( \ - "movl %6,%%eax \n\t" \ - "mull %7 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc"); - -#elif defined(TFM_X86_64) -/* x86-64 optimized */ - -/* anything you need at the start */ -#define COMBA_START - -/* clear the chaining variables */ -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -/* forward the carry to the next digit */ -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -/* store the first sum */ -#define COMBA_STORE(x) \ - x = c0; - -/* store the second sum [carry] */ -#define COMBA_STORE2(x) \ - x = c1; - -/* anything you need at the end */ -#define COMBA_FINI - -/* this should multiply i and j */ -#define MULADD(i, j) \ -__asm__ ( \ - "movq %6,%%rax \n\t" \ - "mulq %7 \n\t" \ - "addq %%rax,%0 \n\t" \ - "adcq %%rdx,%1 \n\t" \ - "adcq $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","cc"); - -#elif defined(TFM_SSE2) -/* use SSE2 optimizations */ - -/* anything you need at the start */ -#define COMBA_START - -/* clear the chaining variables */ -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -/* forward the carry to the next digit */ -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -/* store the first sum */ -#define COMBA_STORE(x) \ - x = c0; - -/* store the second sum [carry] */ -#define COMBA_STORE2(x) \ - x = c1; - -/* anything you need at the end */ -#define COMBA_FINI \ - __asm__("emms"); - -/* this should multiply i and j */ -#define MULADD(i, j) \ -__asm__( \ - "movd %6,%%mm0 \n\t" \ - "movd %7,%%mm1 \n\t" \ - "pmuludq %%mm1,%%mm0\n\t" \ - "movd %%mm0,%%eax \n\t" \ - "psrlq $32,%%mm0 \n\t" \ - "addl %%eax,%0 \n\t" \ - "movd %%mm0,%%eax \n\t" \ - "adcl %%eax,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","cc"); - -#elif defined(TFM_ARM) -/* ARM code */ - -#define COMBA_START - -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define COMBA_FINI - -#define MULADD(i, j) \ -__asm__( \ -" UMULL r0,r1,%6,%7 \n\t" \ -" ADDS %0,%0,r0 \n\t" \ -" ADCS %1,%1,r1 \n\t" \ -" ADC %2,%2,#0 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc"); - -#elif defined(TFM_PPC32) -/* For 32-bit PPC */ - -#define COMBA_START - -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define COMBA_FINI - -/* untested: will mulhwu change the flags? Docs say no */ -#define MULADD(i, j) \ -__asm__( \ - " mullw 16,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhwu 16,%6,%7 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16"); - -#elif defined(TFM_PPC64) -/* For 64-bit PPC */ - -#define COMBA_START - -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define COMBA_FINI - -/* untested: will mulhwu change the flags? Docs say no */ -#define MULADD(i, j) \ -____asm__( \ - " mulld 16,%6,%7 \n\t" \ - " addc %0,%0,16 \n\t" \ - " mulhdu 16,%6,%7 \n\t" \ - " adde %1,%1,16 \n\t" \ - " addze %2,%2 \n\t" \ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"16"); - -#elif defined(TFM_AVR32) - -/* ISO C code */ - -#define COMBA_START - -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define COMBA_FINI - -#define MULADD(i, j) \ -____asm__( \ - " mulu.d r2,%6,%7 \n\t"\ - " add %0,r2 \n\t"\ - " adc %1,%1,r3 \n\t"\ - " acr %2 \n\t"\ -:"=r"(c0), "=r"(c1), "=r"(c2):"0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j):"r2","r3"); - -#else -/* ISO C code */ - -#define COMBA_START - -#define COMBA_CLEAR \ - c0 = c1 = c2 = 0; - -#define COMBA_FORWARD \ - do { c0 = c1; c1 = c2; c2 = 0; } while (0); - -#define COMBA_STORE(x) \ - x = c0; - -#define COMBA_STORE2(x) \ - x = c1; - -#define COMBA_FINI - -#define MULADD(i, j) \ - do { fp_word t; \ - t = (fp_word)c0 + ((fp_word)i) * ((fp_word)j); c0 = (fp_digit)t; \ - t = (fp_word)c1 + (t >> DIGIT_BIT); \ - c1 = (fp_digit)t; c2 += (fp_digit)(t >> DIGIT_BIT); \ - } while (0); - -#endif - - -#ifdef TFM_SMALL_SET - #include "fp_mul_comba_small_set.i" -#endif - -#if defined(TFM_MUL3) - #include "fp_mul_comba_3.i" -#endif -#if defined(TFM_MUL4) - #include "fp_mul_comba_4.i" -#endif -#if defined(TFM_MUL6) - #include "fp_mul_comba_6.i" -#endif -#if defined(TFM_MUL7) - #include "fp_mul_comba_7.i" -#endif -#if defined(TFM_MUL8) - #include "fp_mul_comba_8.i" -#endif -#if defined(TFM_MUL9) - #include "fp_mul_comba_9.i" -#endif -#if defined(TFM_MUL12) - #include "fp_mul_comba_12.i" -#endif -#if defined(TFM_MUL17) - #include "fp_mul_comba_17.i" -#endif -#if defined(TFM_MUL20) - #include "fp_mul_comba_20.i" -#endif -#if defined(TFM_MUL24) - #include "fp_mul_comba_24.i" -#endif -#if defined(TFM_MUL28) - #include "fp_mul_comba_28.i" -#endif -#if defined(TFM_MUL32) - #include "fp_mul_comba_32.i" -#endif -#if defined(TFM_MUL48) - #include "fp_mul_comba_48.i" -#endif -#if defined(TFM_MUL64) - #include "fp_mul_comba_64.i" -#endif - -/* end fp_mul_comba.c asm */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/asn.c b/project1/cyassl-3.0.0/ctaocrypt/src/asn.c deleted file mode 100644 index 266de61b..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/asn.c +++ /dev/null @@ -1,6981 +0,0 @@ -/* asn.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_ASN - -#ifdef HAVE_RTP_SYS - #include "os.h" /* dc_rtc_api needs */ - #include "dc_rtc_api.h" /* to get current time */ -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#ifndef NO_RC4 - #include -#endif - -#ifdef HAVE_NTRU - #include "crypto_ntru.h" -#endif - -#ifdef HAVE_ECC - #include -#endif - -#ifdef CYASSL_DEBUG_ENCODING - #ifdef FREESCALE_MQX - #include - #else - #include - #endif -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */ - #pragma warning(disable: 4996) -#endif - - -#ifndef TRUE - #define TRUE 1 -#endif -#ifndef FALSE - #define FALSE 0 -#endif - - -#ifdef HAVE_RTP_SYS - /* uses parital structures */ - #define XTIME(tl) (0) - #define XGMTIME(c) my_gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) -#elif defined(MICRIUM) - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - #define XVALIDATE_DATE(d,f,t) NetSecure_ValidateDateHandler((d),(f),(t)) - #else - #define XVALIDATE_DATE(d, f, t) (0) - #endif - #define NO_TIME_H - /* since Micrium not defining XTIME or XGMTIME, CERT_GEN not available */ -#elif defined(MICROCHIP_TCPIP_V5) || defined(MICROCHIP_TCPIP) - #include - #define XTIME(t1) pic32_time((t1)) - #define XGMTIME(c) gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) -#elif defined(FREESCALE_MQX) - #include - #define XTIME(t1) mqx_time((t1)) - #define XGMTIME(c) gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) -#elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #else - #include - #endif - #undef RNG - #include "cyassl_MDK_ARM.h" - #undef RNG - #define RNG CyaSSL_RNG /*for avoiding name conflict in "stm32f2xx.h" */ - #define XTIME(tl) (0) - #define XGMTIME(c) Cyassl_MDK_gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) -#elif defined(USER_TIME) - /* user time, and gmtime compatible functions, there is a gmtime - implementation here that WINCE uses, so really just need some ticks - since the EPOCH - */ - - struct tm { - int tm_sec; /* seconds after the minute [0-60] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Savings Time flag */ - long tm_gmtoff; /* offset from CUT in seconds */ - char *tm_zone; /* timezone abbreviation */ - }; - typedef long time_t; - - /* forward declaration */ - struct tm* gmtime(const time_t* timer); - extern time_t XTIME(time_t * timer); - - #define XGMTIME(c) gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) - - #ifdef STACK_TRAP - /* for stack trap tracking, don't call os gmtime on OS X/linux, - uses a lot of stack spce */ - extern time_t time(time_t * timer); - #define XTIME(tl) time((tl)) - #endif /* STACK_TRAP */ - -#else - /* default */ - /* uses complete facility */ - #include - #define XTIME(tl) time((tl)) - #define XGMTIME(c) gmtime((c)) - #define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t)) -#endif - - -#ifdef _WIN32_WCE -/* no time() or gmtime() even though in time.h header?? */ - -#include - - -time_t time(time_t* timer) -{ - SYSTEMTIME sysTime; - FILETIME fTime; - ULARGE_INTEGER intTime; - time_t localTime; - - if (timer == NULL) - timer = &localTime; - - GetSystemTime(&sysTime); - SystemTimeToFileTime(&sysTime, &fTime); - - XMEMCPY(&intTime, &fTime, sizeof(FILETIME)); - /* subtract EPOCH */ - intTime.QuadPart -= 0x19db1ded53e8000; - /* to secs */ - intTime.QuadPart /= 10000000; - *timer = (time_t)intTime.QuadPart; - - return *timer; -} - -#endif /* _WIN32_WCE */ -#if defined( _WIN32_WCE ) || defined( USER_TIME ) - -struct tm* gmtime(const time_t* timer) -{ - #define YEAR0 1900 - #define EPOCH_YEAR 1970 - #define SECS_DAY (24L * 60L * 60L) - #define LEAPYEAR(year) (!((year) % 4) && (((year) % 100) || !((year) %400))) - #define YEARSIZE(year) (LEAPYEAR(year) ? 366 : 365) - - static const int _ytab[2][12] = - { - {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, - {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} - }; - - static struct tm st_time; - struct tm* ret = &st_time; - time_t secs = *timer; - unsigned long dayclock, dayno; - int year = EPOCH_YEAR; - - dayclock = (unsigned long)secs % SECS_DAY; - dayno = (unsigned long)secs / SECS_DAY; - - ret->tm_sec = (int) dayclock % 60; - ret->tm_min = (int)(dayclock % 3600) / 60; - ret->tm_hour = (int) dayclock / 3600; - ret->tm_wday = (int) (dayno + 4) % 7; /* day 0 a Thursday */ - - while(dayno >= (unsigned long)YEARSIZE(year)) { - dayno -= YEARSIZE(year); - year++; - } - - ret->tm_year = year - YEAR0; - ret->tm_yday = (int)dayno; - ret->tm_mon = 0; - - while(dayno >= (unsigned long)_ytab[LEAPYEAR(year)][ret->tm_mon]) { - dayno -= _ytab[LEAPYEAR(year)][ret->tm_mon]; - ret->tm_mon++; - } - - ret->tm_mday = (int)++dayno; - ret->tm_isdst = 0; - - return ret; -} - -#endif /* _WIN32_WCE || USER_TIME */ - - -#ifdef HAVE_RTP_SYS - -#define YEAR0 1900 - -struct tm* my_gmtime(const time_t* timer) /* has a gmtime() but hangs */ -{ - static struct tm st_time; - struct tm* ret = &st_time; - - DC_RTC_CALENDAR cal; - dc_rtc_time_get(&cal, TRUE); - - ret->tm_year = cal.year - YEAR0; /* gm starts at 1900 */ - ret->tm_mon = cal.month - 1; /* gm starts at 0 */ - ret->tm_mday = cal.day; - ret->tm_hour = cal.hour; - ret->tm_min = cal.minute; - ret->tm_sec = cal.second; - - return ret; -} - -#endif /* HAVE_RTP_SYS */ - - -#if defined(MICROCHIP_TCPIP_V5) || defined(MICROCHIP_TCPIP) - -/* - * time() is just a stub in Microchip libraries. We need our own - * implementation. Use SNTP client to get seconds since epoch. - */ -time_t pic32_time(time_t* timer) -{ -#ifdef MICROCHIP_TCPIP_V5 - DWORD sec = 0; -#else - uint32_t sec = 0; -#endif - time_t localTime; - - if (timer == NULL) - timer = &localTime; - -#ifdef MICROCHIP_MPLAB_HARMONY - sec = TCPIP_SNTP_UTCSecondsGet(); -#else - sec = SNTPGetUTCSeconds(); -#endif - *timer = (time_t) sec; - - return *timer; -} - -#endif /* MICROCHIP_TCPIP */ - - -#ifdef FREESCALE_MQX - -time_t mqx_time(time_t* timer) -{ - time_t localTime; - TIME_STRUCT time_s; - - if (timer == NULL) - timer = &localTime; - - _time_get(&time_s); - *timer = (time_t) time_s.SECONDS; - - return *timer; -} - -#endif /* FREESCALE_MQX */ - - -static INLINE word32 btoi(byte b) -{ - return b - 0x30; -} - - -/* two byte date/time, add to value */ -static INLINE void GetTime(int* value, const byte* date, int* idx) -{ - int i = *idx; - - *value += btoi(date[i++]) * 10; - *value += btoi(date[i++]); - - *idx = i; -} - - -#if defined(MICRIUM) - -CPU_INT32S NetSecure_ValidateDateHandler(CPU_INT08U *date, CPU_INT08U format, - CPU_INT08U dateType) -{ - CPU_BOOLEAN rtn_code; - CPU_INT32S i; - CPU_INT32S val; - CPU_INT16U year; - CPU_INT08U month; - CPU_INT16U day; - CPU_INT08U hour; - CPU_INT08U min; - CPU_INT08U sec; - - i = 0; - year = 0u; - - if (format == ASN_UTC_TIME) { - if (btoi(date[0]) >= 5) - year = 1900; - else - year = 2000; - } - else { /* format == GENERALIZED_TIME */ - year += btoi(date[i++]) * 1000; - year += btoi(date[i++]) * 100; - } - - val = year; - GetTime(&val, date, &i); - year = (CPU_INT16U)val; - - val = 0; - GetTime(&val, date, &i); - month = (CPU_INT08U)val; - - val = 0; - GetTime(&val, date, &i); - day = (CPU_INT16U)val; - - val = 0; - GetTime(&val, date, &i); - hour = (CPU_INT08U)val; - - val = 0; - GetTime(&val, date, &i); - min = (CPU_INT08U)val; - - val = 0; - GetTime(&val, date, &i); - sec = (CPU_INT08U)val; - - return NetSecure_ValidateDate(year, month, day, hour, min, sec, dateType); -} - -#endif /* MICRIUM */ - - -CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx) -{ - int length = 0; - word32 i = *inOutIdx; - byte b; - - if ( (i+1) > maxIdx) { /* for first read */ - CYASSL_MSG("GetLength bad index on input"); - return BUFFER_E; - } - - b = input[i++]; - if (b >= ASN_LONG_LENGTH) { - word32 bytes = b & 0x7F; - - if ( (i+bytes) > maxIdx) { /* for reading bytes */ - CYASSL_MSG("GetLength bad long length"); - return BUFFER_E; - } - - while (bytes--) { - b = input[i++]; - length = (length << 8) | b; - } - } - else - length = b; - - if ( (i+length) > maxIdx) { /* for user of length */ - CYASSL_MSG("GetLength value exceeds buffer length"); - return BUFFER_E; - } - - *inOutIdx = i; - *len = length; - - return length; -} - - -CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx) -{ - int length = -1; - word32 idx = *inOutIdx; - - if (input[idx++] != (ASN_SEQUENCE | ASN_CONSTRUCTED) || - GetLength(input, &idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - *len = length; - *inOutIdx = idx; - - return length; -} - - -CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx) -{ - int length = -1; - word32 idx = *inOutIdx; - - if (input[idx++] != (ASN_SET | ASN_CONSTRUCTED) || - GetLength(input, &idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - *len = length; - *inOutIdx = idx; - - return length; -} - - -/* winodws header clash for WinCE using GetVersion */ -CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, int* version) -{ - word32 idx = *inOutIdx; - - CYASSL_ENTER("GetMyVersion"); - - if (input[idx++] != ASN_INTEGER) - return ASN_PARSE_E; - - if (input[idx++] != 0x01) - return ASN_VERSION_E; - - *version = input[idx++]; - *inOutIdx = idx; - - return *version; -} - - -#ifndef NO_PWDBASED -/* Get small count integer, 32 bits or less */ -static int GetShortInt(const byte* input, word32* inOutIdx, int* number) -{ - word32 idx = *inOutIdx; - word32 len; - - *number = 0; - - if (input[idx++] != ASN_INTEGER) - return ASN_PARSE_E; - - len = input[idx++]; - if (len > 4) - return ASN_PARSE_E; - - while (len--) { - *number = *number << 8 | input[idx++]; - } - - *inOutIdx = idx; - - return *number; -} -#endif /* !NO_PWDBASED */ - - -/* May not have one, not an error */ -static int GetExplicitVersion(const byte* input, word32* inOutIdx, int* version) -{ - word32 idx = *inOutIdx; - - CYASSL_ENTER("GetExplicitVersion"); - if (input[idx++] == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) { - *inOutIdx = ++idx; /* eat header */ - return GetMyVersion(input, inOutIdx, version); - } - - /* go back as is */ - *version = 0; - - return 0; -} - - -CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx, - word32 maxIdx) -{ - word32 i = *inOutIdx; - byte b = input[i++]; - int length; - - if (b != ASN_INTEGER) - return ASN_PARSE_E; - - if (GetLength(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - if ( (b = input[i++]) == 0x00) - length--; - else - i--; - - if (mp_init(mpi) != MP_OKAY) - return MP_INIT_E; - - if (mp_read_unsigned_bin(mpi, (byte*)input + i, length) != 0) { - mp_clear(mpi); - return ASN_GETINT_E; - } - - *inOutIdx = i + length; - return 0; -} - - -static int GetObjectId(const byte* input, word32* inOutIdx, word32* oid, - word32 maxIdx) -{ - int length; - word32 i = *inOutIdx; - byte b; - *oid = 0; - - b = input[i++]; - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - while(length--) - *oid += input[i++]; - /* just sum it up for now */ - - *inOutIdx = i; - - return 0; -} - - -CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid, - word32 maxIdx) -{ - int length; - word32 i = *inOutIdx; - byte b; - *oid = 0; - - CYASSL_ENTER("GetAlgoId"); - - if (GetSequence(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - b = input[i++]; - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - while(length--) { - /* odd HC08 compiler behavior here when input[i++] */ - *oid += input[i]; - i++; - } - /* just sum it up for now */ - - /* could have NULL tag and 0 terminator, but may not */ - b = input[i++]; - - if (b == ASN_TAG_NULL) { - b = input[i++]; - if (b != 0) - return ASN_EXPECT_0_E; - } - else - /* go back, didn't have it */ - i--; - - *inOutIdx = i; - - return 0; -} - -#ifndef NO_RSA - - -#ifdef HAVE_CAVIUM - -static int GetCaviumInt(byte** buff, word16* buffSz, const byte* input, - word32* inOutIdx, word32 maxIdx, void* heap) -{ - word32 i = *inOutIdx; - byte b = input[i++]; - int length; - - if (b != ASN_INTEGER) - return ASN_PARSE_E; - - if (GetLength(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - if ( (b = input[i++]) == 0x00) - length--; - else - i--; - - *buffSz = (word16)length; - *buff = XMALLOC(*buffSz, heap, DYNAMIC_TYPE_CAVIUM_RSA); - if (*buff == NULL) - return MEMORY_E; - - XMEMCPY(*buff, input + i, *buffSz); - - *inOutIdx = i + length; - return 0; -} - -static int CaviumRsaPrivateKeyDecode(const byte* input, word32* inOutIdx, - RsaKey* key, word32 inSz) -{ - int version, length; - void* h = key->heap; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(input, inOutIdx, &version) < 0) - return ASN_PARSE_E; - - key->type = RSA_PRIVATE; - - if (GetCaviumInt(&key->c_n, &key->c_nSz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_e, &key->c_eSz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_d, &key->c_dSz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_p, &key->c_pSz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_q, &key->c_qSz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_dP, &key->c_dP_Sz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_dQ, &key->c_dQ_Sz, input, inOutIdx, inSz, h) < 0 || - GetCaviumInt(&key->c_u, &key->c_uSz, input, inOutIdx, inSz, h) < 0 ) - return ASN_RSA_KEY_E; - - return 0; -} - - -#endif /* HAVE_CAVIUM */ - -int RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, - word32 inSz) -{ - int version, length; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return CaviumRsaPrivateKeyDecode(input, inOutIdx, key, inSz); -#endif - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(input, inOutIdx, &version) < 0) - return ASN_PARSE_E; - - key->type = RSA_PRIVATE; - - if (GetInt(&key->n, input, inOutIdx, inSz) < 0 || - GetInt(&key->e, input, inOutIdx, inSz) < 0 || - GetInt(&key->d, input, inOutIdx, inSz) < 0 || - GetInt(&key->p, input, inOutIdx, inSz) < 0 || - GetInt(&key->q, input, inOutIdx, inSz) < 0 || - GetInt(&key->dP, input, inOutIdx, inSz) < 0 || - GetInt(&key->dQ, input, inOutIdx, inSz) < 0 || - GetInt(&key->u, input, inOutIdx, inSz) < 0 ) return ASN_RSA_KEY_E; - - return 0; -} - -#endif /* NO_RSA */ - -/* Remove PKCS8 header, move beginning of traditional to beginning of input */ -int ToTraditional(byte* input, word32 sz) -{ - word32 inOutIdx = 0, oid; - int version, length; - - if (GetSequence(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(input, &inOutIdx, &version) < 0) - return ASN_PARSE_E; - - if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) - return ASN_PARSE_E; - - if (input[inOutIdx] == ASN_OBJECT_ID) { - /* pkcs8 ecc uses slightly different format */ - inOutIdx++; /* past id */ - if (GetLength(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - inOutIdx += length; /* over sub id, key input will verify */ - } - - if (input[inOutIdx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - XMEMMOVE(input, input + inOutIdx, length); - - return length; -} - - -#ifndef NO_PWDBASED - -/* Check To see if PKCS version algo is supported, set id if it is return 0 - < 0 on error */ -static int CheckAlgo(int first, int second, int* id, int* version) -{ - *id = ALGO_ID_E; - *version = PKCS5; /* default */ - - if (first == 1) { - switch (second) { - case 1: - *id = PBE_SHA1_RC4_128; - *version = PKCS12; - return 0; - case 3: - *id = PBE_SHA1_DES3; - *version = PKCS12; - return 0; - default: - return ALGO_ID_E; - } - } - - if (first != PKCS5) - return ASN_INPUT_E; /* VERSION ERROR */ - - if (second == PBES2) { - *version = PKCS5v2; - return 0; - } - - switch (second) { - case 3: /* see RFC 2898 for ids */ - *id = PBE_MD5_DES; - return 0; - case 10: - *id = PBE_SHA1_DES; - return 0; - default: - return ALGO_ID_E; - - } -} - - -/* Check To see if PKCS v2 algo is supported, set id if it is return 0 - < 0 on error */ -static int CheckAlgoV2(int oid, int* id) -{ - switch (oid) { - case 69: - *id = PBE_SHA1_DES; - return 0; - case 652: - *id = PBE_SHA1_DES3; - return 0; - default: - return ALGO_ID_E; - - } -} - - -/* Decrypt intput in place from parameters based on id */ -static int DecryptKey(const char* password, int passwordSz, byte* salt, - int saltSz, int iterations, int id, byte* input, - int length, int version, byte* cbcIv) -{ - byte key[MAX_KEY_SIZE]; - int typeH; - int derivedLen; - int decryptionType; - int ret = 0; - - switch (id) { - case PBE_MD5_DES: - typeH = MD5; - derivedLen = 16; /* may need iv for v1.5 */ - decryptionType = DES_TYPE; - break; - - case PBE_SHA1_DES: - typeH = SHA; - derivedLen = 16; /* may need iv for v1.5 */ - decryptionType = DES_TYPE; - break; - - case PBE_SHA1_DES3: - typeH = SHA; - derivedLen = 32; /* may need iv for v1.5 */ - decryptionType = DES3_TYPE; - break; - - case PBE_SHA1_RC4_128: - typeH = SHA; - derivedLen = 16; - decryptionType = RC4_TYPE; - break; - - default: - return ALGO_ID_E; - } - - if (version == PKCS5v2) - ret = PBKDF2(key, (byte*)password, passwordSz, salt, saltSz, iterations, - derivedLen, typeH); - else if (version == PKCS5) - ret = PBKDF1(key, (byte*)password, passwordSz, salt, saltSz, iterations, - derivedLen, typeH); - else if (version == PKCS12) { - int i, idx = 0; - byte unicodePasswd[MAX_UNICODE_SZ]; - - if ( (passwordSz * 2 + 2) > (int)sizeof(unicodePasswd)) - return UNICODE_SIZE_E; - - for (i = 0; i < passwordSz; i++) { - unicodePasswd[idx++] = 0x00; - unicodePasswd[idx++] = (byte)password[i]; - } - /* add trailing NULL */ - unicodePasswd[idx++] = 0x00; - unicodePasswd[idx++] = 0x00; - - ret = PKCS12_PBKDF(key, unicodePasswd, idx, salt, saltSz, - iterations, derivedLen, typeH, 1); - if (decryptionType != RC4_TYPE) - ret += PKCS12_PBKDF(cbcIv, unicodePasswd, idx, salt, saltSz, - iterations, 8, typeH, 2); - } - else - return ALGO_ID_E; - - if (ret != 0) - return ret; - - switch (decryptionType) { -#ifndef NO_DES3 - case DES_TYPE: - { - Des dec; - byte* desIv = key + 8; - - if (version == PKCS5v2 || version == PKCS12) - desIv = cbcIv; - - ret = Des_SetKey(&dec, key, desIv, DES_DECRYPTION); - if (ret != 0) - return ret; - - Des_CbcDecrypt(&dec, input, input, length); - break; - } - - case DES3_TYPE: - { - Des3 dec; - byte* desIv = key + 24; - - if (version == PKCS5v2 || version == PKCS12) - desIv = cbcIv; - ret = Des3_SetKey(&dec, key, desIv, DES_DECRYPTION); - if (ret != 0) - return ret; - ret = Des3_CbcDecrypt(&dec, input, input, length); - if (ret != 0) - return ret; - break; - } -#endif -#ifndef NO_RC4 - case RC4_TYPE: - { - Arc4 dec; - - Arc4SetKey(&dec, key, derivedLen); - Arc4Process(&dec, input, input, length); - break; - } -#endif - - default: - return ALGO_ID_E; - } - - return 0; -} - - -/* Remove Encrypted PKCS8 header, move beginning of traditional to beginning - of input */ -int ToTraditionalEnc(byte* input, word32 sz,const char* password,int passwordSz) -{ - word32 inOutIdx = 0, oid; - int first, second, length, version, saltSz, id; - int iterations = 0; - byte salt[MAX_SALT_SIZE]; - byte cbcIv[MAX_IV_SIZE]; - - if (GetSequence(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) - return ASN_PARSE_E; - - first = input[inOutIdx - 2]; /* PKCS version alwyas 2nd to last byte */ - second = input[inOutIdx - 1]; /* version.algo, algo id last byte */ - - if (CheckAlgo(first, second, &id, &version) < 0) - return ASN_INPUT_E; /* Algo ID error */ - - if (version == PKCS5v2) { - - if (GetSequence(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) - return ASN_PARSE_E; - - if (oid != PBKDF2_OID) - return ASN_PARSE_E; - } - - if (GetSequence(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - if (input[inOutIdx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(input, &inOutIdx, &saltSz, sz) < 0) - return ASN_PARSE_E; - - if (saltSz > MAX_SALT_SIZE) - return ASN_PARSE_E; - - XMEMCPY(salt, &input[inOutIdx], saltSz); - inOutIdx += saltSz; - - if (GetShortInt(input, &inOutIdx, &iterations) < 0) - return ASN_PARSE_E; - - if (version == PKCS5v2) { - /* get encryption algo */ - if (GetAlgoId(input, &inOutIdx, &oid, sz) < 0) - return ASN_PARSE_E; - - if (CheckAlgoV2(oid, &id) < 0) - return ASN_PARSE_E; /* PKCS v2 algo id error */ - - if (input[inOutIdx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - XMEMCPY(cbcIv, &input[inOutIdx], length); - inOutIdx += length; - } - - if (input[inOutIdx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(input, &inOutIdx, &length, sz) < 0) - return ASN_PARSE_E; - - if (DecryptKey(password, passwordSz, salt, saltSz, iterations, id, - input + inOutIdx, length, version, cbcIv) < 0) - return ASN_INPUT_E; /* decrypt failure */ - - XMEMMOVE(input, input + inOutIdx, length); - return ToTraditional(input, length); -} - -#endif /* NO_PWDBASED */ - -#ifndef NO_RSA - -int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, - word32 inSz) -{ - int length; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - key->type = RSA_PUBLIC; - -#if defined(OPENSSL_EXTRA) || defined(RSA_DECODE_EXTRA) - { - byte b = input[*inOutIdx]; - if (b != ASN_INTEGER) { - /* not from decoded cert, will have algo id, skip past */ - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - b = input[(*inOutIdx)++]; - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - *inOutIdx += length; /* skip past */ - - /* could have NULL tag and 0 terminator, but may not */ - b = input[(*inOutIdx)++]; - - if (b == ASN_TAG_NULL) { - b = input[(*inOutIdx)++]; - if (b != 0) - return ASN_EXPECT_0_E; - } - else - /* go back, didn't have it */ - (*inOutIdx)--; - - /* should have bit tag length and seq next */ - b = input[(*inOutIdx)++]; - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - /* could have 0 */ - b = input[(*inOutIdx)++]; - if (b != 0) - (*inOutIdx)--; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - } /* end if */ - } /* openssl var block */ -#endif /* OPENSSL_EXTRA */ - - if (GetInt(&key->n, input, inOutIdx, inSz) < 0 || - GetInt(&key->e, input, inOutIdx, inSz) < 0 ) return ASN_RSA_KEY_E; - - return 0; -} - -#endif - -#ifndef NO_DH - -int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz) -{ - int length; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || - GetInt(&key->g, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; - - return 0; -} - -int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, word32 gSz) -{ - if (key == NULL || p == NULL || g == NULL || pSz == 0 || gSz == 0) - return BAD_FUNC_ARG; - - /* may have leading 0 */ - if (p[0] == 0) { - pSz--; p++; - } - - if (g[0] == 0) { - gSz--; g++; - } - - if (mp_init(&key->p) != MP_OKAY) - return MP_INIT_E; - if (mp_read_unsigned_bin(&key->p, p, pSz) != 0) { - mp_clear(&key->p); - return ASN_DH_KEY_E; - } - - if (mp_init(&key->g) != MP_OKAY) { - mp_clear(&key->p); - return MP_INIT_E; - } - if (mp_read_unsigned_bin(&key->g, g, gSz) != 0) { - mp_clear(&key->g); - mp_clear(&key->p); - return ASN_DH_KEY_E; - } - - return 0; -} - - -#ifdef OPENSSL_EXTRA - -int DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz, - byte* g, word32* gInOutSz) -{ - word32 i = 0; - byte b; - int length; - - if (GetSequence(input, &i, &length, inSz) < 0) - return ASN_PARSE_E; - - b = input[i++]; - if (b != ASN_INTEGER) - return ASN_PARSE_E; - - if (GetLength(input, &i, &length, inSz) < 0) - return ASN_PARSE_E; - - if ( (b = input[i++]) == 0x00) - length--; - else - i--; - - if (length <= (int)*pInOutSz) { - XMEMCPY(p, &input[i], length); - *pInOutSz = length; - } - else - return BUFFER_E; - - i += length; - - b = input[i++]; - if (b != ASN_INTEGER) - return ASN_PARSE_E; - - if (GetLength(input, &i, &length, inSz) < 0) - return ASN_PARSE_E; - - if (length <= (int)*gInOutSz) { - XMEMCPY(g, &input[i], length); - *gInOutSz = length; - } - else - return BUFFER_E; - - return 0; -} - -#endif /* OPENSSL_EXTRA */ -#endif /* NO_DH */ - - -#ifndef NO_DSA - -int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key, - word32 inSz) -{ - int length; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || - GetInt(&key->q, input, inOutIdx, inSz) < 0 || - GetInt(&key->g, input, inOutIdx, inSz) < 0 || - GetInt(&key->y, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; - - key->type = DSA_PUBLIC; - return 0; -} - - -int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key, - word32 inSz) -{ - int length, version; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(input, inOutIdx, &version) < 0) - return ASN_PARSE_E; - - if (GetInt(&key->p, input, inOutIdx, inSz) < 0 || - GetInt(&key->q, input, inOutIdx, inSz) < 0 || - GetInt(&key->g, input, inOutIdx, inSz) < 0 || - GetInt(&key->y, input, inOutIdx, inSz) < 0 || - GetInt(&key->x, input, inOutIdx, inSz) < 0 ) return ASN_DH_KEY_E; - - key->type = DSA_PRIVATE; - return 0; -} - -#endif /* NO_DSA */ - - -void InitDecodedCert(DecodedCert* cert, byte* source, word32 inSz, void* heap) -{ - cert->publicKey = 0; - cert->pubKeySize = 0; - cert->pubKeyStored = 0; - cert->version = 0; - cert->signature = 0; - cert->subjectCN = 0; - cert->subjectCNLen = 0; - cert->subjectCNStored = 0; - cert->altNames = NULL; -#ifndef IGNORE_NAME_CONSTRAINTS - cert->altEmailNames = NULL; - cert->permittedNames = NULL; - cert->excludedNames = NULL; -#endif /* IGNORE_NAME_CONSTRAINTS */ - cert->issuer[0] = '\0'; - cert->subject[0] = '\0'; - cert->source = source; /* don't own */ - cert->srcIdx = 0; - cert->maxIdx = inSz; /* can't go over this index */ - cert->heap = heap; - XMEMSET(cert->serial, 0, EXTERNAL_SERIAL_SIZE); - cert->serialSz = 0; - cert->extensions = 0; - cert->extensionsSz = 0; - cert->extensionsIdx = 0; - cert->extAuthInfo = NULL; - cert->extAuthInfoSz = 0; - cert->extCrlInfo = NULL; - cert->extCrlInfoSz = 0; - XMEMSET(cert->extSubjKeyId, 0, SHA_SIZE); - cert->extSubjKeyIdSet = 0; - XMEMSET(cert->extAuthKeyId, 0, SHA_SIZE); - cert->extAuthKeyIdSet = 0; - cert->extKeyUsageSet = 0; - cert->extKeyUsage = 0; - cert->extExtKeyUsageSet = 0; - cert->extExtKeyUsage = 0; - cert->isCA = 0; -#ifdef HAVE_PKCS7 - cert->issuerRaw = NULL; - cert->issuerRawLen = 0; -#endif -#ifdef CYASSL_CERT_GEN - cert->subjectSN = 0; - cert->subjectSNLen = 0; - cert->subjectC = 0; - cert->subjectCLen = 0; - cert->subjectL = 0; - cert->subjectLLen = 0; - cert->subjectST = 0; - cert->subjectSTLen = 0; - cert->subjectO = 0; - cert->subjectOLen = 0; - cert->subjectOU = 0; - cert->subjectOULen = 0; - cert->subjectEmail = 0; - cert->subjectEmailLen = 0; -#endif /* CYASSL_CERT_GEN */ - cert->beforeDate = NULL; - cert->beforeDateLen = 0; - cert->afterDate = NULL; - cert->afterDateLen = 0; -#ifdef OPENSSL_EXTRA - XMEMSET(&cert->issuerName, 0, sizeof(DecodedName)); - XMEMSET(&cert->subjectName, 0, sizeof(DecodedName)); - cert->extBasicConstSet = 0; - cert->extBasicConstCrit = 0; - cert->extBasicConstPlSet = 0; - cert->pathLength = 0; - cert->extSubjAltNameSet = 0; - cert->extSubjAltNameCrit = 0; - cert->extAuthKeyIdCrit = 0; - cert->extSubjKeyIdCrit = 0; - cert->extKeyUsageCrit = 0; - cert->extExtKeyUsageCrit = 0; - cert->extExtKeyUsageSrc = NULL; - cert->extExtKeyUsageSz = 0; - cert->extExtKeyUsageCount = 0; - cert->extAuthKeyIdSrc = NULL; - cert->extAuthKeyIdSz = 0; - cert->extSubjKeyIdSrc = NULL; - cert->extSubjKeyIdSz = 0; -#endif /* OPENSSL_EXTRA */ -#if defined(OPENSSL_EXTRA) || !defined(IGNORE_NAME_CONSTRAINTS) - cert->extNameConstraintSet = 0; -#endif /* OPENSSL_EXTRA || !IGNORE_NAME_CONSTRAINTS */ -#ifdef HAVE_ECC - cert->pkCurveOID = 0; -#endif /* HAVE_ECC */ -#ifdef CYASSL_SEP - cert->deviceTypeSz = 0; - cert->deviceType = NULL; - cert->hwTypeSz = 0; - cert->hwType = NULL; - cert->hwSerialNumSz = 0; - cert->hwSerialNum = NULL; - #ifdef OPENSSL_EXTRA - cert->extCertPolicySet = 0; - cert->extCertPolicyCrit = 0; - #endif /* OPENSSL_EXTRA */ -#endif /* CYASSL_SEP */ -} - - -void FreeAltNames(DNS_entry* altNames, void* heap) -{ - (void)heap; - - while (altNames) { - DNS_entry* tmp = altNames->next; - - XFREE(altNames->name, heap, DYNAMIC_TYPE_ALTNAME); - XFREE(altNames, heap, DYNAMIC_TYPE_ALTNAME); - altNames = tmp; - } -} - -#ifndef IGNORE_NAME_CONSTRAINTS - -void FreeNameSubtrees(Base_entry* names, void* heap) -{ - (void)heap; - - while (names) { - Base_entry* tmp = names->next; - - XFREE(names->name, heap, DYNAMIC_TYPE_ALTNAME); - XFREE(names, heap, DYNAMIC_TYPE_ALTNAME); - names = tmp; - } -} - -#endif /* IGNORE_NAME_CONSTRAINTS */ - -void FreeDecodedCert(DecodedCert* cert) -{ - if (cert->subjectCNStored == 1) - XFREE(cert->subjectCN, cert->heap, DYNAMIC_TYPE_SUBJECT_CN); - if (cert->pubKeyStored == 1) - XFREE(cert->publicKey, cert->heap, DYNAMIC_TYPE_PUBLIC_KEY); - if (cert->altNames) - FreeAltNames(cert->altNames, cert->heap); -#ifndef IGNORE_NAME_CONSTRAINTS - if (cert->altEmailNames) - FreeAltNames(cert->altEmailNames, cert->heap); - if (cert->permittedNames) - FreeNameSubtrees(cert->permittedNames, cert->heap); - if (cert->excludedNames) - FreeNameSubtrees(cert->excludedNames, cert->heap); -#endif /* IGNORE_NAME_CONSTRAINTS */ -#ifdef CYASSL_SEP - XFREE(cert->deviceType, cert->heap, 0); - XFREE(cert->hwType, cert->heap, 0); - XFREE(cert->hwSerialNum, cert->heap, 0); -#endif /* CYASSL_SEP */ -#ifdef OPENSSL_EXTRA - if (cert->issuerName.fullName != NULL) - XFREE(cert->issuerName.fullName, NULL, DYNAMIC_TYPE_X509); - if (cert->subjectName.fullName != NULL) - XFREE(cert->subjectName.fullName, NULL, DYNAMIC_TYPE_X509); -#endif /* OPENSSL_EXTRA */ -} - - -static int GetCertHeader(DecodedCert* cert) -{ - int ret = 0, len; - byte serialTmp[EXTERNAL_SERIAL_SIZE]; - mp_int mpi; - - if (GetSequence(cert->source, &cert->srcIdx, &len, cert->maxIdx) < 0) - return ASN_PARSE_E; - - cert->certBegin = cert->srcIdx; - - if (GetSequence(cert->source, &cert->srcIdx, &len, cert->maxIdx) < 0) - return ASN_PARSE_E; - cert->sigIndex = len + cert->srcIdx; - - if (GetExplicitVersion(cert->source, &cert->srcIdx, &cert->version) < 0) - return ASN_PARSE_E; - - if (GetInt(&mpi, cert->source, &cert->srcIdx, cert->maxIdx) < 0) - return ASN_PARSE_E; - - len = mp_unsigned_bin_size(&mpi); - if (len < (int)sizeof(serialTmp)) { - if ( (ret = mp_to_unsigned_bin(&mpi, serialTmp)) == MP_OKAY) { - if (len > EXTERNAL_SERIAL_SIZE) - len = EXTERNAL_SERIAL_SIZE; - XMEMCPY(cert->serial, serialTmp, len); - cert->serialSz = len; - } - } - mp_clear(&mpi); - return ret; -} - -#if !defined(NO_RSA) -/* Store Rsa Key, may save later, Dsa could use in future */ -static int StoreRsaKey(DecodedCert* cert) -{ - int length; - word32 recvd = cert->srcIdx; - - if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - recvd = cert->srcIdx - recvd; - length += recvd; - - while (recvd--) - cert->srcIdx--; - - cert->pubKeySize = length; - cert->publicKey = cert->source + cert->srcIdx; - cert->srcIdx += length; - - return 0; -} -#endif - - -#ifdef HAVE_ECC - - /* return 0 on sucess if the ECC curve oid sum is supported */ - static int CheckCurve(word32 oid) - { - if (oid != ECC_256R1 && oid != ECC_384R1 && oid != ECC_521R1 && oid != - ECC_160R1 && oid != ECC_192R1 && oid != ECC_224R1) - return ALGO_ID_E; - - return 0; - } - -#endif /* HAVE_ECC */ - - -static int GetKey(DecodedCert* cert) -{ - int length; -#ifdef HAVE_NTRU - int tmpIdx = cert->srcIdx; -#endif - - if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - if (GetAlgoId(cert->source, &cert->srcIdx, &cert->keyOID, cert->maxIdx) < 0) - return ASN_PARSE_E; - - switch (cert->keyOID) { - #ifndef NO_RSA - case RSAk: - { - byte b = cert->source[cert->srcIdx++]; - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(cert->source,&cert->srcIdx,&length,cert->maxIdx) < 0) - return ASN_PARSE_E; - b = cert->source[cert->srcIdx++]; - if (b != 0x00) - return ASN_EXPECT_0_E; - - return StoreRsaKey(cert); - } - - #endif /* NO_RSA */ - #ifdef HAVE_NTRU - case NTRUk: - { - const byte* key = &cert->source[tmpIdx]; - byte* next = (byte*)key; - word16 keyLen; - byte keyBlob[MAX_NTRU_KEY_SZ]; - - word32 rc = crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey(key, - &keyLen, NULL, &next); - - if (rc != NTRU_OK) - return ASN_NTRU_KEY_E; - if (keyLen > sizeof(keyBlob)) - return ASN_NTRU_KEY_E; - - rc = crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey(key,&keyLen, - keyBlob, &next); - if (rc != NTRU_OK) - return ASN_NTRU_KEY_E; - - if ( (next - key) < 0) - return ASN_NTRU_KEY_E; - - cert->srcIdx = tmpIdx + (int)(next - key); - - cert->publicKey = (byte*) XMALLOC(keyLen, cert->heap, - DYNAMIC_TYPE_PUBLIC_KEY); - if (cert->publicKey == NULL) - return MEMORY_E; - XMEMCPY(cert->publicKey, keyBlob, keyLen); - cert->pubKeyStored = 1; - cert->pubKeySize = keyLen; - - return 0; - } - #endif /* HAVE_NTRU */ - #ifdef HAVE_ECC - case ECDSAk: - { - int oidSz = 0; - byte b = cert->source[cert->srcIdx++]; - - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(cert->source,&cert->srcIdx,&oidSz,cert->maxIdx) < 0) - return ASN_PARSE_E; - - while(oidSz--) - cert->pkCurveOID += cert->source[cert->srcIdx++]; - - if (CheckCurve(cert->pkCurveOID) < 0) - return ECC_CURVE_OID_E; - - /* key header */ - b = cert->source[cert->srcIdx++]; - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(cert->source,&cert->srcIdx,&length,cert->maxIdx) < 0) - return ASN_PARSE_E; - b = cert->source[cert->srcIdx++]; - if (b != 0x00) - return ASN_EXPECT_0_E; - - /* actual key, use length - 1 since ate preceding 0 */ - length -= 1; - - cert->publicKey = (byte*) XMALLOC(length, cert->heap, - DYNAMIC_TYPE_PUBLIC_KEY); - if (cert->publicKey == NULL) - return MEMORY_E; - XMEMCPY(cert->publicKey, &cert->source[cert->srcIdx], length); - cert->pubKeyStored = 1; - cert->pubKeySize = length; - - cert->srcIdx += length; - - return 0; - } - #endif /* HAVE_ECC */ - default: - return ASN_UNKNOWN_OID_E; - } -} - - -/* process NAME, either issuer or subject */ -static int GetName(DecodedCert* cert, int nameType) -{ - Sha sha; /* MUST have SHA-1 hash for cert names */ - int length; /* length of all distinguished names */ - int dummy; - int ret; - char* full = (nameType == ISSUER) ? cert->issuer : cert->subject; - word32 idx; - #ifdef OPENSSL_EXTRA - DecodedName* dName = - (nameType == ISSUER) ? &cert->issuerName : &cert->subjectName; - #endif /* OPENSSL_EXTRA */ - - CYASSL_MSG("Getting Cert Name"); - - if (cert->source[cert->srcIdx] == ASN_OBJECT_ID) { - CYASSL_MSG("Trying optional prefix..."); - - if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - cert->srcIdx += length; - CYASSL_MSG("Got optional prefix"); - } - - /* For OCSP, RFC2560 section 4.1.1 states the issuer hash should be - * calculated over the entire DER encoding of the Name field, including - * the tag and length. */ - idx = cert->srcIdx; - if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, &cert->source[idx], length + cert->srcIdx - idx); - if (nameType == ISSUER) - ShaFinal(&sha, cert->issuerHash); - else - ShaFinal(&sha, cert->subjectHash); - - length += cert->srcIdx; - idx = 0; - -#ifdef HAVE_PKCS7 - /* store pointer to raw issuer */ - if (nameType == ISSUER) { - cert->issuerRaw = &cert->source[cert->srcIdx]; - cert->issuerRawLen = length - cert->srcIdx; - } -#endif -#ifndef IGNORE_NAME_CONSTRAINTS - if (nameType == SUBJECT) { - cert->subjectRaw = &cert->source[cert->srcIdx]; - cert->subjectRawLen = length - cert->srcIdx; - } -#endif - - while (cert->srcIdx < (word32)length) { - byte b; - byte joint[2]; - byte tooBig = FALSE; - int oidSz; - - if (GetSet(cert->source, &cert->srcIdx, &dummy, cert->maxIdx) < 0) { - CYASSL_MSG("Cert name lacks set header, trying sequence"); - } - - if (GetSequence(cert->source, &cert->srcIdx, &dummy, cert->maxIdx) < 0) - return ASN_PARSE_E; - - b = cert->source[cert->srcIdx++]; - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(cert->source, &cert->srcIdx, &oidSz, cert->maxIdx) < 0) - return ASN_PARSE_E; - - XMEMCPY(joint, &cert->source[cert->srcIdx], sizeof(joint)); - - /* v1 name types */ - if (joint[0] == 0x55 && joint[1] == 0x04) { - byte id; - byte copy = FALSE; - int strLen; - - cert->srcIdx += 2; - id = cert->source[cert->srcIdx++]; - b = cert->source[cert->srcIdx++]; /* strType */ - (void)b; /* may want to validate? */ - - if (GetLength(cert->source, &cert->srcIdx, &strLen, - cert->maxIdx) < 0) - return ASN_PARSE_E; - - if ( (strLen + 14) > (int)(ASN_NAME_MAX - idx)) { - /* include biggest pre fix header too 4 = "/serialNumber=" */ - CYASSL_MSG("ASN Name too big, skipping"); - tooBig = TRUE; - } - - if (id == ASN_COMMON_NAME) { - if (nameType == SUBJECT) { - cert->subjectCN = (char *)&cert->source[cert->srcIdx]; - cert->subjectCNLen = strLen; - } - - if (!tooBig) { - XMEMCPY(&full[idx], "/CN=", 4); - idx += 4; - copy = TRUE; - } - #ifdef OPENSSL_EXTRA - dName->cnIdx = cert->srcIdx; - dName->cnLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_SUR_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/SN=", 4); - idx += 4; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectSN = (char*)&cert->source[cert->srcIdx]; - cert->subjectSNLen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->snIdx = cert->srcIdx; - dName->snLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_COUNTRY_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/C=", 3); - idx += 3; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectC = (char*)&cert->source[cert->srcIdx]; - cert->subjectCLen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->cIdx = cert->srcIdx; - dName->cLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_LOCALITY_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/L=", 3); - idx += 3; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectL = (char*)&cert->source[cert->srcIdx]; - cert->subjectLLen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->lIdx = cert->srcIdx; - dName->lLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_STATE_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/ST=", 4); - idx += 4; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectST = (char*)&cert->source[cert->srcIdx]; - cert->subjectSTLen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->stIdx = cert->srcIdx; - dName->stLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_ORG_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/O=", 3); - idx += 3; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectO = (char*)&cert->source[cert->srcIdx]; - cert->subjectOLen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->oIdx = cert->srcIdx; - dName->oLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_ORGUNIT_NAME) { - if (!tooBig) { - XMEMCPY(&full[idx], "/OU=", 4); - idx += 4; - copy = TRUE; - } - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectOU = (char*)&cert->source[cert->srcIdx]; - cert->subjectOULen = strLen; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->ouIdx = cert->srcIdx; - dName->ouLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - else if (id == ASN_SERIAL_NUMBER) { - if (!tooBig) { - XMEMCPY(&full[idx], "/serialNumber=", 14); - idx += 14; - copy = TRUE; - } - #ifdef OPENSSL_EXTRA - dName->snIdx = cert->srcIdx; - dName->snLen = strLen; - #endif /* OPENSSL_EXTRA */ - } - - if (copy && !tooBig) { - XMEMCPY(&full[idx], &cert->source[cert->srcIdx], strLen); - idx += strLen; - } - - cert->srcIdx += strLen; - } - else { - /* skip */ - byte email = FALSE; - byte uid = FALSE; - int adv; - - if (joint[0] == 0x2a && joint[1] == 0x86) /* email id hdr */ - email = TRUE; - - if (joint[0] == 0x9 && joint[1] == 0x92) /* uid id hdr */ - uid = TRUE; - - cert->srcIdx += oidSz + 1; - - if (GetLength(cert->source, &cert->srcIdx, &adv, cert->maxIdx) < 0) - return ASN_PARSE_E; - - if (adv > (int)(ASN_NAME_MAX - idx)) { - CYASSL_MSG("ASN name too big, skipping"); - tooBig = TRUE; - } - - if (email) { - if ( (14 + adv) > (int)(ASN_NAME_MAX - idx)) { - CYASSL_MSG("ASN name too big, skipping"); - tooBig = TRUE; - } - if (!tooBig) { - XMEMCPY(&full[idx], "/emailAddress=", 14); - idx += 14; - } - - #ifdef CYASSL_CERT_GEN - if (nameType == SUBJECT) { - cert->subjectEmail = (char*)&cert->source[cert->srcIdx]; - cert->subjectEmailLen = adv; - } - #endif /* CYASSL_CERT_GEN */ - #ifdef OPENSSL_EXTRA - dName->emailIdx = cert->srcIdx; - dName->emailLen = adv; - #endif /* OPENSSL_EXTRA */ - #ifndef IGNORE_NAME_CONSTRAINTS - { - DNS_entry* emailName = NULL; - - emailName = (DNS_entry*)XMALLOC(sizeof(DNS_entry), - cert->heap, DYNAMIC_TYPE_ALTNAME); - if (emailName == NULL) { - CYASSL_MSG("\tOut of Memory"); - return MEMORY_E; - } - emailName->name = (char*)XMALLOC(adv + 1, - cert->heap, DYNAMIC_TYPE_ALTNAME); - if (emailName->name == NULL) { - CYASSL_MSG("\tOut of Memory"); - return MEMORY_E; - } - XMEMCPY(emailName->name, - &cert->source[cert->srcIdx], adv); - emailName->name[adv] = 0; - - emailName->next = cert->altEmailNames; - cert->altEmailNames = emailName; - } - #endif /* IGNORE_NAME_CONSTRAINTS */ - if (!tooBig) { - XMEMCPY(&full[idx], &cert->source[cert->srcIdx], adv); - idx += adv; - } - } - - if (uid) { - if ( (5 + adv) > (int)(ASN_NAME_MAX - idx)) { - CYASSL_MSG("ASN name too big, skipping"); - tooBig = TRUE; - } - if (!tooBig) { - XMEMCPY(&full[idx], "/UID=", 5); - idx += 5; - - XMEMCPY(&full[idx], &cert->source[cert->srcIdx], adv); - idx += adv; - } - #ifdef OPENSSL_EXTRA - dName->uidIdx = cert->srcIdx; - dName->uidLen = adv; - #endif /* OPENSSL_EXTRA */ - } - - cert->srcIdx += adv; - } - } - full[idx++] = 0; - - #ifdef OPENSSL_EXTRA - { - int totalLen = 0; - - if (dName->cnLen != 0) - totalLen += dName->cnLen + 4; - if (dName->snLen != 0) - totalLen += dName->snLen + 4; - if (dName->cLen != 0) - totalLen += dName->cLen + 3; - if (dName->lLen != 0) - totalLen += dName->lLen + 3; - if (dName->stLen != 0) - totalLen += dName->stLen + 4; - if (dName->oLen != 0) - totalLen += dName->oLen + 3; - if (dName->ouLen != 0) - totalLen += dName->ouLen + 4; - if (dName->emailLen != 0) - totalLen += dName->emailLen + 14; - if (dName->uidLen != 0) - totalLen += dName->uidLen + 5; - if (dName->serialLen != 0) - totalLen += dName->serialLen + 14; - - dName->fullName = (char*)XMALLOC(totalLen + 1, NULL, DYNAMIC_TYPE_X509); - if (dName->fullName != NULL) { - idx = 0; - - if (dName->cnLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/CN=", 4); - idx += 4; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->cnIdx], dName->cnLen); - dName->cnIdx = idx; - idx += dName->cnLen; - } - if (dName->snLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/SN=", 4); - idx += 4; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->snIdx], dName->snLen); - dName->snIdx = idx; - idx += dName->snLen; - } - if (dName->cLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/C=", 3); - idx += 3; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->cIdx], dName->cLen); - dName->cIdx = idx; - idx += dName->cLen; - } - if (dName->lLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/L=", 3); - idx += 3; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->lIdx], dName->lLen); - dName->lIdx = idx; - idx += dName->lLen; - } - if (dName->stLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/ST=", 4); - idx += 4; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->stIdx], dName->stLen); - dName->stIdx = idx; - idx += dName->stLen; - } - if (dName->oLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/O=", 3); - idx += 3; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->oIdx], dName->oLen); - dName->oIdx = idx; - idx += dName->oLen; - } - if (dName->ouLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/OU=", 4); - idx += 4; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->ouIdx], dName->ouLen); - dName->ouIdx = idx; - idx += dName->ouLen; - } - if (dName->emailLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/emailAddress=", 14); - idx += 14; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->emailIdx], dName->emailLen); - dName->emailIdx = idx; - idx += dName->emailLen; - } - if (dName->uidLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/UID=", 5); - idx += 5; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->uidIdx], dName->uidLen); - dName->uidIdx = idx; - idx += dName->uidLen; - } - if (dName->serialLen != 0) { - dName->entryCount++; - XMEMCPY(&dName->fullName[idx], "/serialNumber=", 14); - idx += 14; - XMEMCPY(&dName->fullName[idx], - &cert->source[dName->serialIdx], dName->serialLen); - dName->serialIdx = idx; - idx += dName->serialLen; - } - dName->fullName[idx] = '\0'; - dName->fullNameLen = totalLen; - } - } - #endif /* OPENSSL_EXTRA */ - - return 0; -} - - -#ifndef NO_TIME_H - -/* to the second */ -static int DateGreaterThan(const struct tm* a, const struct tm* b) -{ - if (a->tm_year > b->tm_year) - return 1; - - if (a->tm_year == b->tm_year && a->tm_mon > b->tm_mon) - return 1; - - if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && - a->tm_mday > b->tm_mday) - return 1; - - if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && - a->tm_mday == b->tm_mday && a->tm_hour > b->tm_hour) - return 1; - - if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && - a->tm_mday == b->tm_mday && a->tm_hour == b->tm_hour && - a->tm_min > b->tm_min) - return 1; - - if (a->tm_year == b->tm_year && a->tm_mon == b->tm_mon && - a->tm_mday == b->tm_mday && a->tm_hour == b->tm_hour && - a->tm_min == b->tm_min && a->tm_sec > b->tm_sec) - return 1; - - return 0; /* false */ -} - - -static INLINE int DateLessThan(const struct tm* a, const struct tm* b) -{ - return !DateGreaterThan(a,b); -} - - -/* like atoi but only use first byte */ -/* Make sure before and after dates are valid */ -int ValidateDate(const byte* date, byte format, int dateType) -{ - time_t ltime; - struct tm certTime; - struct tm* localTime; - int i = 0; - - ltime = XTIME(0); - XMEMSET(&certTime, 0, sizeof(certTime)); - - if (format == ASN_UTC_TIME) { - if (btoi(date[0]) >= 5) - certTime.tm_year = 1900; - else - certTime.tm_year = 2000; - } - else { /* format == GENERALIZED_TIME */ - certTime.tm_year += btoi(date[i++]) * 1000; - certTime.tm_year += btoi(date[i++]) * 100; - } - - GetTime(&certTime.tm_year, date, &i); certTime.tm_year -= 1900; /* adjust */ - GetTime(&certTime.tm_mon, date, &i); certTime.tm_mon -= 1; /* adjust */ - GetTime(&certTime.tm_mday, date, &i); - GetTime(&certTime.tm_hour, date, &i); - GetTime(&certTime.tm_min, date, &i); - GetTime(&certTime.tm_sec, date, &i); - - if (date[i] != 'Z') { /* only Zulu supported for this profile */ - CYASSL_MSG("Only Zulu time supported for this profile"); - return 0; - } - - localTime = XGMTIME(<ime); - - if (dateType == BEFORE) { - if (DateLessThan(localTime, &certTime)) - return 0; - } - else - if (DateGreaterThan(localTime, &certTime)) - return 0; - - return 1; -} - -#endif /* NO_TIME_H */ - - -static int GetDate(DecodedCert* cert, int dateType) -{ - int length; - byte date[MAX_DATE_SIZE]; - byte b; - word32 startIdx = 0; - - if (dateType == BEFORE) - cert->beforeDate = &cert->source[cert->srcIdx]; - else - cert->afterDate = &cert->source[cert->srcIdx]; - startIdx = cert->srcIdx; - - b = cert->source[cert->srcIdx++]; - if (b != ASN_UTC_TIME && b != ASN_GENERALIZED_TIME) - return ASN_TIME_E; - - if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - if (length > MAX_DATE_SIZE || length < MIN_DATE_SIZE) - return ASN_DATE_SZ_E; - - XMEMCPY(date, &cert->source[cert->srcIdx], length); - cert->srcIdx += length; - - if (dateType == BEFORE) - cert->beforeDateLen = cert->srcIdx - startIdx; - else - cert->afterDateLen = cert->srcIdx - startIdx; - - if (!XVALIDATE_DATE(date, b, dateType)) { - if (dateType == BEFORE) - return ASN_BEFORE_DATE_E; - else - return ASN_AFTER_DATE_E; - } - - return 0; -} - - -static int GetValidity(DecodedCert* cert, int verify) -{ - int length; - int badDate = 0; - - if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - if (GetDate(cert, BEFORE) < 0 && verify) - badDate = ASN_BEFORE_DATE_E; /* continue parsing */ - - if (GetDate(cert, AFTER) < 0 && verify) - return ASN_AFTER_DATE_E; - - if (badDate != 0) - return badDate; - - return 0; -} - - -int DecodeToKey(DecodedCert* cert, int verify) -{ - int badDate = 0; - int ret; - - if ( (ret = GetCertHeader(cert)) < 0) - return ret; - - CYASSL_MSG("Got Cert Header"); - - if ( (ret = GetAlgoId(cert->source, &cert->srcIdx, &cert->signatureOID, - cert->maxIdx)) < 0) - return ret; - - CYASSL_MSG("Got Algo ID"); - - if ( (ret = GetName(cert, ISSUER)) < 0) - return ret; - - if ( (ret = GetValidity(cert, verify)) < 0) - badDate = ret; - - if ( (ret = GetName(cert, SUBJECT)) < 0) - return ret; - - CYASSL_MSG("Got Subject Name"); - - if ( (ret = GetKey(cert)) < 0) - return ret; - - CYASSL_MSG("Got Key"); - - if (badDate != 0) - return badDate; - - return ret; -} - - -static int GetSignature(DecodedCert* cert) -{ - int length; - byte b = cert->source[cert->srcIdx++]; - - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) - return ASN_PARSE_E; - - cert->sigLength = length; - - b = cert->source[cert->srcIdx++]; - if (b != 0x00) - return ASN_EXPECT_0_E; - - cert->sigLength--; - cert->signature = &cert->source[cert->srcIdx]; - cert->srcIdx += cert->sigLength; - - return 0; -} - - -static word32 SetDigest(const byte* digest, word32 digSz, byte* output) -{ - output[0] = ASN_OCTET_STRING; - output[1] = (byte)digSz; - XMEMCPY(&output[2], digest, digSz); - - return digSz + 2; -} - - -static word32 BytePrecision(word32 value) -{ - word32 i; - for (i = sizeof(value); i; --i) - if (value >> ((i - 1) * CYASSL_BIT_SIZE)) - break; - - return i; -} - - -CYASSL_LOCAL word32 SetLength(word32 length, byte* output) -{ - word32 i = 0, j; - - if (length < ASN_LONG_LENGTH) - output[i++] = (byte)length; - else { - output[i++] = (byte)(BytePrecision(length) | ASN_LONG_LENGTH); - - for (j = BytePrecision(length); j; --j) { - output[i] = (byte)(length >> ((j - 1) * CYASSL_BIT_SIZE)); - i++; - } - } - - return i; -} - - -CYASSL_LOCAL word32 SetSequence(word32 len, byte* output) -{ - output[0] = ASN_SEQUENCE | ASN_CONSTRUCTED; - return SetLength(len, output + 1) + 1; -} - -CYASSL_LOCAL word32 SetOctetString(word32 len, byte* output) -{ - output[0] = ASN_OCTET_STRING; - return SetLength(len, output + 1) + 1; -} - -/* Write a set header to output */ -CYASSL_LOCAL word32 SetSet(word32 len, byte* output) -{ - output[0] = ASN_SET | ASN_CONSTRUCTED; - return SetLength(len, output + 1) + 1; -} - -CYASSL_LOCAL word32 SetImplicit(byte tag, byte number, word32 len, byte* output) -{ - - output[0] = ((tag == ASN_SEQUENCE || tag == ASN_SET) ? ASN_CONSTRUCTED : 0) - | ASN_CONTEXT_SPECIFIC | number; - return SetLength(len, output + 1) + 1; -} - -CYASSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output) -{ - output[0] = ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | number; - return SetLength(len, output + 1) + 1; -} - - -#if defined(HAVE_ECC) && defined(CYASSL_CERT_GEN) - -static word32 SetCurve(ecc_key* key, byte* output) -{ - - /* curve types */ - static const byte ECC_192v1_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, - 0x03, 0x01, 0x01}; - static const byte ECC_256v1_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, - 0x03, 0x01, 0x07}; - static const byte ECC_160r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, - 0x02}; - static const byte ECC_224r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, - 0x21}; - static const byte ECC_384r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, - 0x22}; - static const byte ECC_521r1_AlgoID[] = { 0x2b, 0x81, 0x04, 0x00, - 0x23}; - - int oidSz = 0; - int idx = 0; - int lenSz = 0; - const byte* oid = 0; - - output[0] = ASN_OBJECT_ID; - idx++; - - switch (key->dp->size) { - case 20: - oidSz = sizeof(ECC_160r1_AlgoID); - oid = ECC_160r1_AlgoID; - break; - - case 24: - oidSz = sizeof(ECC_192v1_AlgoID); - oid = ECC_192v1_AlgoID; - break; - - case 28: - oidSz = sizeof(ECC_224r1_AlgoID); - oid = ECC_224r1_AlgoID; - break; - - case 32: - oidSz = sizeof(ECC_256v1_AlgoID); - oid = ECC_256v1_AlgoID; - break; - - case 48: - oidSz = sizeof(ECC_384r1_AlgoID); - oid = ECC_384r1_AlgoID; - break; - - case 66: - oidSz = sizeof(ECC_521r1_AlgoID); - oid = ECC_521r1_AlgoID; - break; - - default: - return ASN_UNKNOWN_OID_E; - } - lenSz = SetLength(oidSz, output+idx); - idx += lenSz; - - XMEMCPY(output+idx, oid, oidSz); - idx += oidSz; - - return idx; -} - -#endif /* HAVE_ECC && CYASSL_CERT_GEN */ - - -CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz) -{ - /* adding TAG_NULL and 0 to end */ - - /* hashTypes */ - static const byte shaAlgoID[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a, - 0x05, 0x00 }; - static const byte sha256AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, - 0x04, 0x02, 0x01, 0x05, 0x00 }; - static const byte sha384AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, - 0x04, 0x02, 0x02, 0x05, 0x00 }; - static const byte sha512AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, - 0x04, 0x02, 0x03, 0x05, 0x00 }; - static const byte md5AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x02, 0x05, 0x05, 0x00 }; - static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x02, 0x02, 0x05, 0x00}; - - /* blkTypes, no NULL tags because IV is there instead */ - static const byte desCbcAlgoID[] = { 0x2B, 0x0E, 0x03, 0x02, 0x07 }; - static const byte des3CbcAlgoID[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x03, 0x07 }; - - /* RSA sigTypes */ - #ifndef NO_RSA - static const byte md5wRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x04, 0x05, 0x00}; - static const byte shawRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00}; - static const byte sha256wRSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00}; - static const byte sha384wRSA_AlgoID[] = {0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x0c, 0x05, 0x00}; - static const byte sha512wRSA_AlgoID[] = {0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x0d, 0x05, 0x00}; - #endif /* NO_RSA */ - - /* ECDSA sigTypes */ - #ifdef HAVE_ECC - static const byte shawECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, - 0x04, 0x01, 0x05, 0x00}; - static const byte sha256wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, - 0x04, 0x03, 0x02, 0x05, 0x00}; - static const byte sha384wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, - 0x04, 0x03, 0x03, 0x05, 0x00}; - static const byte sha512wECDSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE,0x3d, - 0x04, 0x03, 0x04, 0x05, 0x00}; - #endif /* HAVE_ECC */ - - /* RSA keyType */ - #ifndef NO_RSA - static const byte RSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x01, 0x01, 0x05, 0x00}; - #endif /* NO_RSA */ - - #ifdef HAVE_ECC - /* ECC keyType */ - /* no tags, so set tagSz smaller later */ - static const byte ECC_AlgoID[] = { 0x2a, 0x86, 0x48, 0xCE, 0x3d, - 0x02, 0x01}; - #endif /* HAVE_ECC */ - - int algoSz = 0; - int tagSz = 2; /* tag null and terminator */ - word32 idSz, seqSz; - const byte* algoName = 0; - byte ID_Length[MAX_LENGTH_SZ]; - byte seqArray[MAX_SEQ_SZ + 1]; /* add object_id to end */ - - if (type == hashType) { - switch (algoOID) { - case SHAh: - algoSz = sizeof(shaAlgoID); - algoName = shaAlgoID; - break; - - case SHA256h: - algoSz = sizeof(sha256AlgoID); - algoName = sha256AlgoID; - break; - - case SHA384h: - algoSz = sizeof(sha384AlgoID); - algoName = sha384AlgoID; - break; - - case SHA512h: - algoSz = sizeof(sha512AlgoID); - algoName = sha512AlgoID; - break; - - case MD2h: - algoSz = sizeof(md2AlgoID); - algoName = md2AlgoID; - break; - - case MD5h: - algoSz = sizeof(md5AlgoID); - algoName = md5AlgoID; - break; - - default: - CYASSL_MSG("Unknown Hash Algo"); - return 0; /* UNKOWN_HASH_E; */ - } - } - else if (type == blkType) { - switch (algoOID) { - case DESb: - algoSz = sizeof(desCbcAlgoID); - algoName = desCbcAlgoID; - tagSz = 0; - break; - case DES3b: - algoSz = sizeof(des3CbcAlgoID); - algoName = des3CbcAlgoID; - tagSz = 0; - break; - default: - CYASSL_MSG("Unknown Block Algo"); - return 0; - } - } - else if (type == sigType) { /* sigType */ - switch (algoOID) { - #ifndef NO_RSA - case CTC_MD5wRSA: - algoSz = sizeof(md5wRSA_AlgoID); - algoName = md5wRSA_AlgoID; - break; - - case CTC_SHAwRSA: - algoSz = sizeof(shawRSA_AlgoID); - algoName = shawRSA_AlgoID; - break; - - case CTC_SHA256wRSA: - algoSz = sizeof(sha256wRSA_AlgoID); - algoName = sha256wRSA_AlgoID; - break; - - case CTC_SHA384wRSA: - algoSz = sizeof(sha384wRSA_AlgoID); - algoName = sha384wRSA_AlgoID; - break; - - case CTC_SHA512wRSA: - algoSz = sizeof(sha512wRSA_AlgoID); - algoName = sha512wRSA_AlgoID; - break; - #endif /* NO_RSA */ - #ifdef HAVE_ECC - case CTC_SHAwECDSA: - algoSz = sizeof(shawECDSA_AlgoID); - algoName = shawECDSA_AlgoID; - break; - - case CTC_SHA256wECDSA: - algoSz = sizeof(sha256wECDSA_AlgoID); - algoName = sha256wECDSA_AlgoID; - break; - - case CTC_SHA384wECDSA: - algoSz = sizeof(sha384wECDSA_AlgoID); - algoName = sha384wECDSA_AlgoID; - break; - - case CTC_SHA512wECDSA: - algoSz = sizeof(sha512wECDSA_AlgoID); - algoName = sha512wECDSA_AlgoID; - break; - #endif /* HAVE_ECC */ - default: - CYASSL_MSG("Unknown Signature Algo"); - return 0; - } - } - else if (type == keyType) { /* keyType */ - switch (algoOID) { - #ifndef NO_RSA - case RSAk: - algoSz = sizeof(RSA_AlgoID); - algoName = RSA_AlgoID; - break; - #endif /* NO_RSA */ - #ifdef HAVE_ECC - case ECDSAk: - algoSz = sizeof(ECC_AlgoID); - algoName = ECC_AlgoID; - tagSz = 0; - break; - #endif /* HAVE_ECC */ - default: - CYASSL_MSG("Unknown Key Algo"); - return 0; - } - } - else { - CYASSL_MSG("Unknown Algo type"); - return 0; - } - - idSz = SetLength(algoSz - tagSz, ID_Length); /* don't include tags */ - seqSz = SetSequence(idSz + algoSz + 1 + curveSz, seqArray); - /* +1 for object id, curveID of curveSz follows for ecc */ - seqArray[seqSz++] = ASN_OBJECT_ID; - - XMEMCPY(output, seqArray, seqSz); - XMEMCPY(output + seqSz, ID_Length, idSz); - XMEMCPY(output + seqSz + idSz, algoName, algoSz); - - return seqSz + idSz + algoSz; - -} - - -word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, int hashOID) -{ - byte digArray[MAX_ENCODED_DIG_SZ]; - byte algoArray[MAX_ALGO_SZ]; - byte seqArray[MAX_SEQ_SZ]; - word32 encDigSz, algoSz, seqSz; - - encDigSz = SetDigest(digest, digSz, digArray); - algoSz = SetAlgoID(hashOID, algoArray, hashType, 0); - seqSz = SetSequence(encDigSz + algoSz, seqArray); - - XMEMCPY(out, seqArray, seqSz); - XMEMCPY(out + seqSz, algoArray, algoSz); - XMEMCPY(out + seqSz + algoSz, digArray, encDigSz); - - return encDigSz + algoSz + seqSz; -} - - -/* return true (1) for Confirmation */ -static int ConfirmSignature(const byte* buf, word32 bufSz, - const byte* key, word32 keySz, word32 keyOID, - const byte* sig, word32 sigSz, word32 sigOID, - void* heap) -{ -#ifdef CYASSL_SHA512 - byte digest[SHA512_DIGEST_SIZE]; /* max size */ -#elif !defined(NO_SHA256) - byte digest[SHA256_DIGEST_SIZE]; /* max size */ -#else - byte digest[SHA_DIGEST_SIZE]; /* max size */ -#endif - int typeH, digestSz, ret = 0; - - (void)key; - (void)keySz; - (void)sig; - (void)sigSz; - (void)heap; - (void)ret; - - switch (sigOID) { -#ifndef NO_MD5 - case CTC_MD5wRSA: - { - Md5 md5; - InitMd5(&md5); - Md5Update(&md5, buf, bufSz); - Md5Final(&md5, digest); - typeH = MD5h; - digestSz = MD5_DIGEST_SIZE; - } - break; -#endif - #if defined(CYASSL_MD2) - case CTC_MD2wRSA: - { - Md2 md2; - InitMd2(&md2); - Md2Update(&md2, buf, bufSz); - Md2Final(&md2, digest); - typeH = MD2h; - digestSz = MD2_DIGEST_SIZE; - } - break; - #endif -#ifndef NO_SHA - case CTC_SHAwRSA: - case CTC_SHAwDSA: - case CTC_SHAwECDSA: - { - Sha sha; - ret = InitSha(&sha); - if (ret != 0) { - CYASSL_MSG("InitSha failed"); - return 0; /* not confirmed */ - } - ShaUpdate(&sha, buf, bufSz); - ShaFinal(&sha, digest); - typeH = SHAh; - digestSz = SHA_DIGEST_SIZE; - } - break; -#endif - #ifndef NO_SHA256 - case CTC_SHA256wRSA: - case CTC_SHA256wECDSA: - { - Sha256 sha256; - ret = InitSha256(&sha256); - if (ret != 0) { - CYASSL_MSG("InitSha256 failed"); - return 0; /* not confirmed */ - } - - ret = Sha256Update(&sha256, buf, bufSz); - if (ret != 0) { - CYASSL_MSG("Sha256Update failed"); - return 0; /* not confirmed */ - } - - ret = Sha256Final(&sha256, digest); - if (ret != 0) { - CYASSL_MSG("Sha256Final failed"); - return 0; /* not confirmed */ - } - - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - } - break; - #endif - #ifdef CYASSL_SHA512 - case CTC_SHA512wRSA: - case CTC_SHA512wECDSA: - { - Sha512 sha512; - ret = InitSha512(&sha512); - if (ret != 0) { - CYASSL_MSG("InitSha512 failed"); - return 0; /* not confirmed */ - } - - ret = Sha512Update(&sha512, buf, bufSz); - if (ret != 0) { - CYASSL_MSG("Sha512Update failed"); - return 0; /* not confirmed */ - } - - ret = Sha512Final(&sha512, digest); - if (ret != 0) { - CYASSL_MSG("Sha512Final failed"); - return 0; /* not confirmed */ - } - - typeH = SHA512h; - digestSz = SHA512_DIGEST_SIZE; - } - break; - #endif - #ifdef CYASSL_SHA384 - case CTC_SHA384wRSA: - case CTC_SHA384wECDSA: - { - Sha384 sha384; - ret = InitSha384(&sha384); - if (ret != 0) { - CYASSL_MSG("InitSha384 failed"); - return 0; /* not confirmed */ - } - - ret = Sha384Update(&sha384, buf, bufSz); - if (ret != 0) { - CYASSL_MSG("Sha384Update failed"); - return 0; /* not confirmed */ - } - - ret = Sha384Final(&sha384, digest); - if (ret != 0) { - CYASSL_MSG("Sha384Final failed"); - return 0; /* not confirmed */ - } - - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - } - break; - #endif - default: - CYASSL_MSG("Verify Signautre has unsupported type"); - return 0; - } - (void)typeH; /* some builds won't read */ - - switch (keyOID) { - #ifndef NO_RSA - case RSAk: - { - RsaKey pubKey; - byte encodedSig[MAX_ENCODED_SIG_SZ]; - byte plain[MAX_ENCODED_SIG_SZ]; - word32 idx = 0; - int encodedSigSz, verifySz; - byte* out; - - if (sigSz > MAX_ENCODED_SIG_SZ) { - CYASSL_MSG("Verify Signautre is too big"); - return 0; - } - - ret = InitRsaKey(&pubKey, heap); - if (ret != 0) return ret; - if (RsaPublicKeyDecode(key, &idx, &pubKey, keySz) < 0) { - CYASSL_MSG("ASN Key decode error RSA"); - ret = 0; - } - else { - XMEMCPY(plain, sig, sigSz); - if ( (verifySz = RsaSSL_VerifyInline(plain, sigSz, &out, - &pubKey)) < 0) { - CYASSL_MSG("Rsa SSL verify error"); - ret = 0; - } - else { - /* make sure we're right justified */ - encodedSigSz = - EncodeSignature(encodedSig, digest, digestSz, typeH); - if (encodedSigSz != verifySz || - XMEMCMP(out, encodedSig, encodedSigSz) != 0) { - CYASSL_MSG("Rsa SSL verify match encode error"); - ret = 0; - } - else - ret = 1; /* match */ - - #ifdef CYASSL_DEBUG_ENCODING - { - int x; - printf("cyassl encodedSig:\n"); - for (x = 0; x < encodedSigSz; x++) { - printf("%02x ", encodedSig[x]); - if ( (x % 16) == 15) - printf("\n"); - } - printf("\n"); - printf("actual digest:\n"); - for (x = 0; x < verifySz; x++) { - printf("%02x ", out[x]); - if ( (x % 16) == 15) - printf("\n"); - } - printf("\n"); - } - #endif /* CYASSL_DEBUG_ENCODING */ - } - } - FreeRsaKey(&pubKey); - return ret; - } - - #endif /* NO_RSA */ - #ifdef HAVE_ECC - case ECDSAk: - { - ecc_key pubKey; - int verify = 0; - - if (ecc_import_x963(key, keySz, &pubKey) < 0) { - CYASSL_MSG("ASN Key import error ECC"); - return 0; - } - - ret = ecc_verify_hash(sig,sigSz,digest,digestSz,&verify,&pubKey); - ecc_free(&pubKey); - if (ret == 0 && verify == 1) - return 1; /* match */ - - CYASSL_MSG("ECC Verify didn't match"); - return 0; - } - #endif /* HAVE_ECC */ - default: - CYASSL_MSG("Verify Key type unknown"); - return 0; - } -} - - -#ifndef IGNORE_NAME_CONSTRAINTS - -static int MatchBaseName(int type, const char* name, int nameSz, - const char* base, int baseSz) -{ - if (base == NULL || baseSz <= 0 || name == NULL || nameSz <= 0 || - name[0] == '.' || nameSz < baseSz || - (type != ASN_RFC822_TYPE && type != ASN_DNS_TYPE)) - return 0; - - /* If an email type, handle special cases where the base is only - * a domain, or is an email address itself. */ - if (type == ASN_RFC822_TYPE) { - const char* p = NULL; - int count = 0; - - if (base[0] != '.') { - p = base; - count = 0; - - /* find the '@' in the base */ - while (*p != '@' && count < baseSz) { - count++; - p++; - } - - /* No '@' in base, reset p to NULL */ - if (count >= baseSz) - p = NULL; - } - - if (p == NULL) { - /* Base isn't an email address, it is a domain name, - * wind the name forward one character past its '@'. */ - p = name; - count = 0; - while (*p != '@' && count < baseSz) { - count++; - p++; - } - - if (count < baseSz && *p == '@') { - name = p + 1; - nameSz -= count + 1; - } - } - } - - if ((type == ASN_DNS_TYPE || type == ASN_RFC822_TYPE) && base[0] == '.') { - int szAdjust = nameSz - baseSz; - name += szAdjust; - nameSz -= szAdjust; - } - - while (nameSz > 0) { - if (XTOLOWER(*name++) != XTOLOWER(*base++)) - return 0; - nameSz--; - } - - return 1; -} - - -static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert) -{ - if (signer == NULL || cert == NULL) - return 0; - - /* Check against the excluded list */ - if (signer->excludedNames) { - Base_entry* base = signer->excludedNames; - - while (base != NULL) { - if (base->type == ASN_DNS_TYPE) { - DNS_entry* name = cert->altNames; - while (name != NULL) { - if (MatchBaseName(ASN_DNS_TYPE, - name->name, (int)XSTRLEN(name->name), - base->name, base->nameSz)) - return 0; - name = name->next; - } - } - else if (base->type == ASN_RFC822_TYPE) { - DNS_entry* name = cert->altEmailNames; - while (name != NULL) { - if (MatchBaseName(ASN_RFC822_TYPE, - name->name, (int)XSTRLEN(name->name), - base->name, base->nameSz)) - return 0; - - name = name->next; - } - } - else if (base->type == ASN_DIR_TYPE) { - if (cert->subjectRawLen == base->nameSz && - XMEMCMP(cert->subjectRaw, base->name, base->nameSz) == 0) { - - return 0; - } - } - base = base->next; - } - } - - /* Check against the permitted list */ - if (signer->permittedNames != NULL) { - int needDns = 0; - int matchDns = 0; - int needEmail = 0; - int matchEmail = 0; - int needDir = 0; - int matchDir = 0; - Base_entry* base = signer->permittedNames; - - while (base != NULL) { - if (base->type == ASN_DNS_TYPE) { - DNS_entry* name = cert->altNames; - - if (name != NULL) - needDns = 1; - - while (name != NULL) { - matchDns = MatchBaseName(ASN_DNS_TYPE, - name->name, (int)XSTRLEN(name->name), - base->name, base->nameSz); - name = name->next; - } - } - else if (base->type == ASN_RFC822_TYPE) { - DNS_entry* name = cert->altEmailNames; - - if (name != NULL) - needEmail = 1; - - while (name != NULL) { - matchEmail = MatchBaseName(ASN_DNS_TYPE, - name->name, (int)XSTRLEN(name->name), - base->name, base->nameSz); - name = name->next; - } - } - else if (base->type == ASN_DIR_TYPE) { - needDir = 1; - if (cert->subjectRaw != NULL && - cert->subjectRawLen == base->nameSz && - XMEMCMP(cert->subjectRaw, base->name, base->nameSz) == 0) { - - matchDir = 1; - } - } - base = base->next; - } - - if ((needDns && !matchDns) || (needEmail && !matchEmail) || - (needDir && !matchDir)) { - - return 0; - } - } - - return 1; -} - -#endif /* IGNORE_NAME_CONSTRAINTS */ - - -static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0; - - CYASSL_ENTER("DecodeAltNames"); - - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tBad Sequence"); - return ASN_PARSE_E; - } - - while (length > 0) { - byte b = input[idx++]; - - length--; - - /* Save DNS Type names in the altNames list. */ - /* Save Other Type names in the cert's OidMap */ - if (b == (ASN_CONTEXT_SPECIFIC | ASN_DNS_TYPE)) { - DNS_entry* dnsEntry; - int strLen; - word32 lenStartIdx = idx; - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfail: str length"); - return ASN_PARSE_E; - } - length -= (idx - lenStartIdx); - - dnsEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), cert->heap, - DYNAMIC_TYPE_ALTNAME); - if (dnsEntry == NULL) { - CYASSL_MSG("\tOut of Memory"); - return ASN_PARSE_E; - } - - dnsEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, - DYNAMIC_TYPE_ALTNAME); - if (dnsEntry->name == NULL) { - CYASSL_MSG("\tOut of Memory"); - XFREE(dnsEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); - return ASN_PARSE_E; - } - - XMEMCPY(dnsEntry->name, &input[idx], strLen); - dnsEntry->name[strLen] = '\0'; - - dnsEntry->next = cert->altNames; - cert->altNames = dnsEntry; - - length -= strLen; - idx += strLen; - } -#ifndef IGNORE_NAME_CONSTRAINTS - else if (b == (ASN_CONTEXT_SPECIFIC | ASN_RFC822_TYPE)) { - DNS_entry* emailEntry; - int strLen; - word32 lenStartIdx = idx; - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfail: str length"); - return ASN_PARSE_E; - } - length -= (idx - lenStartIdx); - - emailEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), cert->heap, - DYNAMIC_TYPE_ALTNAME); - if (emailEntry == NULL) { - CYASSL_MSG("\tOut of Memory"); - return ASN_PARSE_E; - } - - emailEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, - DYNAMIC_TYPE_ALTNAME); - if (emailEntry->name == NULL) { - CYASSL_MSG("\tOut of Memory"); - XFREE(emailEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); - return ASN_PARSE_E; - } - - XMEMCPY(emailEntry->name, &input[idx], strLen); - emailEntry->name[strLen] = '\0'; - - emailEntry->next = cert->altEmailNames; - cert->altEmailNames = emailEntry; - - length -= strLen; - idx += strLen; - } -#endif /* IGNORE_NAME_CONSTRAINTS */ -#ifdef CYASSL_SEP - else if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_OTHER_TYPE)) - { - int strLen; - word32 lenStartIdx = idx; - word32 oid = 0; - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfail: other name length"); - return ASN_PARSE_E; - } - /* Consume the rest of this sequence. */ - length -= (strLen + idx - lenStartIdx); - - if (GetObjectId(input, &idx, &oid, sz) < 0) { - CYASSL_MSG("\tbad OID"); - return ASN_PARSE_E; - } - - if (oid != HW_NAME_OID) { - CYASSL_MSG("\tincorrect OID"); - return ASN_PARSE_E; - } - - if (input[idx++] != (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) { - CYASSL_MSG("\twrong type"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfail: str len"); - return ASN_PARSE_E; - } - - if (GetSequence(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tBad Sequence"); - return ASN_PARSE_E; - } - - if (input[idx++] != ASN_OBJECT_ID) { - CYASSL_MSG("\texpected OID"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfailed: str len"); - return ASN_PARSE_E; - } - - cert->hwType = (byte*)XMALLOC(strLen, cert->heap, 0); - if (cert->hwType == NULL) { - CYASSL_MSG("\tOut of Memory"); - return MEMORY_E; - } - - XMEMCPY(cert->hwType, &input[idx], strLen); - cert->hwTypeSz = strLen; - idx += strLen; - - if (input[idx++] != ASN_OCTET_STRING) { - CYASSL_MSG("\texpected Octet String"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfailed: str len"); - return ASN_PARSE_E; - } - - cert->hwSerialNum = (byte*)XMALLOC(strLen + 1, cert->heap, 0); - if (cert->hwSerialNum == NULL) { - CYASSL_MSG("\tOut of Memory"); - return MEMORY_E; - } - - XMEMCPY(cert->hwSerialNum, &input[idx], strLen); - cert->hwSerialNum[strLen] = '\0'; - cert->hwSerialNumSz = strLen; - idx += strLen; - } -#endif /* CYASSL_SEP */ - else { - int strLen; - word32 lenStartIdx = idx; - - CYASSL_MSG("\tUnsupported name type, skipping"); - - if (GetLength(input, &idx, &strLen, sz) < 0) { - CYASSL_MSG("\tfail: unsupported name length"); - return ASN_PARSE_E; - } - length -= (strLen + idx - lenStartIdx); - idx += strLen; - } - } - return 0; -} - - -static int DecodeBasicCaConstraint(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0; - - CYASSL_ENTER("DecodeBasicCaConstraint"); - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: bad SEQUENCE"); - return ASN_PARSE_E; - } - - if (length == 0) - return 0; - - /* If the basic ca constraint is false, this extension may be named, but - * left empty. So, if the length is 0, just return. */ - - if (input[idx++] != ASN_BOOLEAN) - { - CYASSL_MSG("\tfail: constraint not BOOLEAN"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) - { - CYASSL_MSG("\tfail: length"); - return ASN_PARSE_E; - } - - if (input[idx++]) - cert->isCA = 1; - - #ifdef OPENSSL_EXTRA - /* If there isn't any more data, return. */ - if (idx >= (word32)sz) - return 0; - - /* Anything left should be the optional pathlength */ - if (input[idx++] != ASN_INTEGER) { - CYASSL_MSG("\tfail: pathlen not INTEGER"); - return ASN_PARSE_E; - } - - if (input[idx++] != 1) { - CYASSL_MSG("\tfail: pathlen too long"); - return ASN_PARSE_E; - } - - cert->pathLength = input[idx]; - cert->extBasicConstPlSet = 1; - #endif /* OPENSSL_EXTRA */ - - return 0; -} - - -#define CRLDP_FULL_NAME 0 - /* From RFC3280 SS4.2.1.14, Distribution Point Name*/ -#define GENERALNAME_URI 6 - /* From RFC3280 SS4.2.1.7, GeneralName */ - -static int DecodeCrlDist(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0; - - CYASSL_ENTER("DecodeCrlDist"); - - /* Unwrap the list of Distribution Points*/ - if (GetSequence(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - /* Unwrap a single Distribution Point */ - if (GetSequence(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - /* The Distribution Point has three explicit optional members - * First check for a DistributionPointName - */ - if (input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) - { - idx++; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - if (input[idx] == - (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | CRLDP_FULL_NAME)) - { - idx++; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - if (input[idx] == (ASN_CONTEXT_SPECIFIC | GENERALNAME_URI)) - { - idx++; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - cert->extCrlInfoSz = length; - cert->extCrlInfo = input + idx; - idx += length; - } - else - /* This isn't a URI, skip it. */ - idx += length; - } - else - /* This isn't a FULLNAME, skip it. */ - idx += length; - } - - /* Check for reasonFlags */ - if (idx < (word32)sz && - input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) - { - idx++; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - idx += length; - } - - /* Check for cRLIssuer */ - if (idx < (word32)sz && - input[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 2)) - { - idx++; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - idx += length; - } - - if (idx < (word32)sz) - { - CYASSL_MSG("\tThere are more CRL Distribution Point records, " - "but we only use the first one."); - } - - return 0; -} - - -static int DecodeAuthInfo(byte* input, int sz, DecodedCert* cert) -/* - * Read the first of the Authority Information Access records. If there are - * any issues, return without saving the record. - */ -{ - word32 idx = 0; - int length = 0; - byte b; - word32 oid; - - CYASSL_ENTER("DecodeAuthInfo"); - - /* Unwrap the list of AIAs */ - if (GetSequence(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - while (idx < (word32)sz) { - /* Unwrap a single AIA */ - if (GetSequence(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - oid = 0; - if (GetObjectId(input, &idx, &oid, sz) < 0) - return ASN_PARSE_E; - - /* Only supporting URIs right now. */ - b = input[idx++]; - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - if (b == (ASN_CONTEXT_SPECIFIC | GENERALNAME_URI) && - oid == AIA_OCSP_OID) - { - cert->extAuthInfoSz = length; - cert->extAuthInfo = input + idx; - break; - } - idx += length; - } - - return 0; -} - - -static int DecodeAuthKeyId(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0, ret = 0; - - CYASSL_ENTER("DecodeAuthKeyId"); - - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE\n"); - return ASN_PARSE_E; - } - - if (input[idx++] != (ASN_CONTEXT_SPECIFIC | 0)) { - CYASSL_MSG("\tfail: wanted OPTIONAL item 0, not available\n"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: extension data length"); - return ASN_PARSE_E; - } - - #ifdef OPENSSL_EXTRA - cert->extAuthKeyIdSrc = &input[idx]; - cert->extAuthKeyIdSz = length; - #endif /* OPENSSL_EXTRA */ - - if (length == SHA_SIZE) { - XMEMCPY(cert->extAuthKeyId, input + idx, length); - } - else { - Sha sha; - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, input + idx, length); - ShaFinal(&sha, cert->extAuthKeyId); - } - - return 0; -} - - -static int DecodeSubjKeyId(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0, ret = 0; - - CYASSL_ENTER("DecodeSubjKeyId"); - - if (input[idx++] != ASN_OCTET_STRING) { - CYASSL_MSG("\tfail: should be an OCTET STRING"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: extension data length"); - return ASN_PARSE_E; - } - - #ifdef OPENSSL_EXTRA - cert->extSubjKeyIdSrc = &input[idx]; - cert->extSubjKeyIdSz = length; - #endif /* OPENSSL_EXTRA */ - - if (length == SIGNER_DIGEST_SIZE) { - XMEMCPY(cert->extSubjKeyId, input + idx, length); - } - else { - Sha sha; - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, input + idx, length); - ShaFinal(&sha, cert->extSubjKeyId); - } - - return ret; -} - - -static int DecodeKeyUsage(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length; - byte unusedBits; - CYASSL_ENTER("DecodeKeyUsage"); - - if (input[idx++] != ASN_BIT_STRING) { - CYASSL_MSG("\tfail: key usage expected bit string"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: key usage bad length"); - return ASN_PARSE_E; - } - - unusedBits = input[idx++]; - length--; - - if (length == 2) { - cert->extKeyUsage = (word16)((input[idx] << 8) | input[idx+1]); - cert->extKeyUsage >>= unusedBits; - } - else if (length == 1) - cert->extKeyUsage = (word16)(input[idx] << 1); - - return 0; -} - - -static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0, oid; - int length; - - CYASSL_ENTER("DecodeExtKeyUsage"); - - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE"); - return ASN_PARSE_E; - } - - #ifdef OPENSSL_EXTRA - cert->extExtKeyUsageSrc = input + idx; - cert->extExtKeyUsageSz = length; - #endif - - while (idx < (word32)sz) { - if (GetObjectId(input, &idx, &oid, sz) < 0) - return ASN_PARSE_E; - - switch (oid) { - case EKU_ANY_OID: - cert->extExtKeyUsage |= EXTKEYUSE_ANY; - break; - case EKU_SERVER_AUTH_OID: - cert->extExtKeyUsage |= EXTKEYUSE_SERVER_AUTH; - break; - case EKU_CLIENT_AUTH_OID: - cert->extExtKeyUsage |= EXTKEYUSE_CLIENT_AUTH; - break; - case EKU_OCSP_SIGN_OID: - cert->extExtKeyUsage |= EXTKEYUSE_OCSP_SIGN; - break; - } - - #ifdef OPENSSL_EXTRA - cert->extExtKeyUsageCount++; - #endif - } - - return 0; -} - - -#ifndef IGNORE_NAME_CONSTRAINTS -static int DecodeSubtree(byte* input, int sz, Base_entry** head, void* heap) -{ - word32 idx = 0; - - (void)heap; - - while (idx < (word32)sz) { - int seqLength, strLength; - word32 nameIdx; - byte b; - - if (GetSequence(input, &idx, &seqLength, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE"); - return ASN_PARSE_E; - } - - nameIdx = idx; - b = input[nameIdx++]; - if (GetLength(input, &nameIdx, &strLength, sz) <= 0) { - CYASSL_MSG("\tinvalid length"); - return ASN_PARSE_E; - } - - if (b == (ASN_CONTEXT_SPECIFIC | ASN_DNS_TYPE) || - b == (ASN_CONTEXT_SPECIFIC | ASN_RFC822_TYPE) || - b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_DIR_TYPE)) { - - Base_entry* entry = (Base_entry*)XMALLOC(sizeof(Base_entry), - heap, DYNAMIC_TYPE_ALTNAME); - - if (entry == NULL) { - CYASSL_MSG("allocate error"); - return MEMORY_E; - } - - entry->name = (char*)XMALLOC(strLength, heap, DYNAMIC_TYPE_ALTNAME); - if (entry->name == NULL) { - CYASSL_MSG("allocate error"); - return MEMORY_E; - } - - XMEMCPY(entry->name, &input[nameIdx], strLength); - entry->nameSz = strLength; - entry->type = b & 0x0F; - - entry->next = *head; - *head = entry; - } - - idx += seqLength; - } - - return 0; -} - - -static int DecodeNameConstraints(byte* input, int sz, DecodedCert* cert) -{ - word32 idx = 0; - int length = 0; - - CYASSL_ENTER("DecodeNameConstraints"); - - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE"); - return ASN_PARSE_E; - } - - while (idx < (word32)sz) { - byte b = input[idx++]; - Base_entry** subtree = NULL; - - if (GetLength(input, &idx, &length, sz) <= 0) { - CYASSL_MSG("\tinvalid length"); - return ASN_PARSE_E; - } - - if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 0)) - subtree = &cert->permittedNames; - else if (b == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 1)) - subtree = &cert->excludedNames; - else { - CYASSL_MSG("\tinvalid subtree"); - return ASN_PARSE_E; - } - - DecodeSubtree(input + idx, length, subtree, cert->heap); - - idx += length; - } - - return 0; -} -#endif /* IGNORE_NAME_CONSTRAINTS */ - - -#ifdef CYASSL_SEP - static int DecodeCertPolicy(byte* input, int sz, DecodedCert* cert) - { - word32 idx = 0; - int length = 0; - - CYASSL_ENTER("DecodeCertPolicy"); - - /* Unwrap certificatePolicies */ - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tdeviceType isn't OID"); - return ASN_PARSE_E; - } - - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tdeviceType isn't OID"); - return ASN_PARSE_E; - } - - if (input[idx++] != ASN_OBJECT_ID) { - CYASSL_MSG("\tdeviceType isn't OID"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tCouldn't read length of deviceType"); - return ASN_PARSE_E; - } - - if (length > 0) { - cert->deviceType = (byte*)XMALLOC(length, cert->heap, 0); - if (cert->deviceType == NULL) { - CYASSL_MSG("\tCouldn't alloc memory for deviceType"); - return MEMORY_E; - } - cert->deviceTypeSz = length; - XMEMCPY(cert->deviceType, input + idx, length); - } - - CYASSL_LEAVE("DecodeCertPolicy", 0); - return 0; - } -#endif /* CYASSL_SEP */ - - -static int DecodeCertExtensions(DecodedCert* cert) -/* - * Processing the Certificate Extensions. This does not modify the current - * index. It is works starting with the recorded extensions pointer. - */ -{ - word32 idx = 0; - int sz = cert->extensionsSz; - byte* input = cert->extensions; - int length; - word32 oid; - byte critical = 0; - byte criticalFail = 0; - - CYASSL_ENTER("DecodeCertExtensions"); - - if (input == NULL || sz == 0) - return BAD_FUNC_ARG; - - if (input[idx++] != ASN_EXTENSIONS) - return ASN_PARSE_E; - - if (GetLength(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - if (GetSequence(input, &idx, &length, sz) < 0) - return ASN_PARSE_E; - - while (idx < (word32)sz) { - if (GetSequence(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE"); - return ASN_PARSE_E; - } - - oid = 0; - if (GetObjectId(input, &idx, &oid, sz) < 0) { - CYASSL_MSG("\tfail: OBJECT ID"); - return ASN_PARSE_E; - } - - /* check for critical flag */ - critical = 0; - if (input[idx] == ASN_BOOLEAN) { - int boolLength = 0; - idx++; - if (GetLength(input, &idx, &boolLength, sz) < 0) { - CYASSL_MSG("\tfail: critical boolean length"); - return ASN_PARSE_E; - } - if (input[idx++]) - critical = 1; - } - - /* process the extension based on the OID */ - if (input[idx++] != ASN_OCTET_STRING) { - CYASSL_MSG("\tfail: should be an OCTET STRING"); - return ASN_PARSE_E; - } - - if (GetLength(input, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: extension data length"); - return ASN_PARSE_E; - } - - switch (oid) { - case BASIC_CA_OID: - #ifdef OPENSSL_EXTRA - cert->extBasicConstSet = 1; - cert->extBasicConstCrit = critical; - #endif - if (DecodeBasicCaConstraint(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case CRL_DIST_OID: - if (DecodeCrlDist(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case AUTH_INFO_OID: - if (DecodeAuthInfo(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case ALT_NAMES_OID: - #ifdef OPENSSL_EXTRA - cert->extSubjAltNameSet = 1; - cert->extSubjAltNameCrit = critical; - #endif - if (DecodeAltNames(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case AUTH_KEY_OID: - cert->extAuthKeyIdSet = 1; - #ifdef OPENSSL_EXTRA - cert->extAuthKeyIdCrit = critical; - #endif - if (DecodeAuthKeyId(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case SUBJ_KEY_OID: - cert->extSubjKeyIdSet = 1; - #ifdef OPENSSL_EXTRA - cert->extSubjKeyIdCrit = critical; - #endif - if (DecodeSubjKeyId(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case CERT_POLICY_OID: - CYASSL_MSG("Certificate Policy extension not supported yet."); - #ifdef CYASSL_SEP - #ifdef OPENSSL_EXTRA - cert->extCertPolicySet = 1; - cert->extCertPolicyCrit = critical; - #endif - if (DecodeCertPolicy(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - #endif - break; - - case KEY_USAGE_OID: - cert->extKeyUsageSet = 1; - #ifdef OPENSSL_EXTRA - cert->extKeyUsageCrit = critical; - #endif - if (DecodeKeyUsage(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - case EXT_KEY_USAGE_OID: - cert->extExtKeyUsageSet = 1; - #ifdef OPENSSL_EXTRA - cert->extExtKeyUsageCrit = critical; - #endif - if (DecodeExtKeyUsage(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - - #ifndef IGNORE_NAME_CONSTRAINTS - case NAME_CONS_OID: - cert->extNameConstraintSet = 1; - #ifdef OPENSSL_EXTRA - cert->extNameConstraintCrit = critical; - #endif - if (DecodeNameConstraints(&input[idx], length, cert) < 0) - return ASN_PARSE_E; - break; - #endif /* IGNORE_NAME_CONSTRAINTS */ - - case INHIBIT_ANY_OID: - CYASSL_MSG("Inhibit anyPolicy extension not supported yet."); - break; - - default: - /* While it is a failure to not support critical extensions, - * still parse the certificate ignoring the unsupported - * extention to allow caller to accept it with the verify - * callback. */ - if (critical) - criticalFail = 1; - break; - } - idx += length; - } - - return criticalFail ? ASN_CRIT_EXT_E : 0; -} - - -int ParseCert(DecodedCert* cert, int type, int verify, void* cm) -{ - int ret; - char* ptr; - - ret = ParseCertRelative(cert, type, verify, cm); - if (ret < 0) - return ret; - - if (cert->subjectCNLen > 0) { - ptr = (char*) XMALLOC(cert->subjectCNLen + 1, cert->heap, - DYNAMIC_TYPE_SUBJECT_CN); - if (ptr == NULL) - return MEMORY_E; - XMEMCPY(ptr, cert->subjectCN, cert->subjectCNLen); - ptr[cert->subjectCNLen] = '\0'; - cert->subjectCN = ptr; - cert->subjectCNStored = 1; - } - - if (cert->keyOID == RSAk && - cert->publicKey != NULL && cert->pubKeySize > 0) { - ptr = (char*) XMALLOC(cert->pubKeySize, cert->heap, - DYNAMIC_TYPE_PUBLIC_KEY); - if (ptr == NULL) - return MEMORY_E; - XMEMCPY(ptr, cert->publicKey, cert->pubKeySize); - cert->publicKey = (byte *)ptr; - cert->pubKeyStored = 1; - } - - return ret; -} - - -/* from SSL proper, for locking can't do find here anymore */ -#ifdef __cplusplus - extern "C" { -#endif - CYASSL_LOCAL Signer* GetCA(void* signers, byte* hash); - #ifndef NO_SKID - CYASSL_LOCAL Signer* GetCAByName(void* signers, byte* hash); - #endif -#ifdef __cplusplus - } -#endif - - -int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm) -{ - word32 confirmOID; - int ret; - int badDate = 0; - int criticalExt = 0; - - if ((ret = DecodeToKey(cert, verify)) < 0) { - if (ret == ASN_BEFORE_DATE_E || ret == ASN_AFTER_DATE_E) - badDate = ret; - else - return ret; - } - - CYASSL_MSG("Parsed Past Key"); - - if (cert->srcIdx < cert->sigIndex) { - #ifndef ALLOW_V1_EXTENSIONS - if (cert->version < 2) { - CYASSL_MSG(" v1 and v2 certs not allowed extensions"); - return ASN_VERSION_E; - } - #endif - /* save extensions */ - cert->extensions = &cert->source[cert->srcIdx]; - cert->extensionsSz = cert->sigIndex - cert->srcIdx; - cert->extensionsIdx = cert->srcIdx; /* for potential later use */ - - if ((ret = DecodeCertExtensions(cert)) < 0) { - if (ret == ASN_CRIT_EXT_E) - criticalExt = ret; - else - return ret; - } - - /* advance past extensions */ - cert->srcIdx = cert->sigIndex; - } - - if ((ret = GetAlgoId(cert->source, &cert->srcIdx, &confirmOID, - cert->maxIdx)) < 0) - return ret; - - if ((ret = GetSignature(cert)) < 0) - return ret; - - if (confirmOID != cert->signatureOID) - return ASN_SIG_OID_E; - - #ifndef NO_SKID - if (cert->extSubjKeyIdSet == 0 - && cert->publicKey != NULL && cert->pubKeySize > 0) { - Sha sha; - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, cert->publicKey, cert->pubKeySize); - ShaFinal(&sha, cert->extSubjKeyId); - } - #endif - - if (verify && type != CA_TYPE) { - Signer* ca = NULL; - #ifndef NO_SKID - if (cert->extAuthKeyIdSet) - ca = GetCA(cm, cert->extAuthKeyId); - if (ca == NULL) - ca = GetCAByName(cm, cert->issuerHash); - #else /* NO_SKID */ - ca = GetCA(cm, cert->issuerHash); - #endif /* NO SKID */ - CYASSL_MSG("About to verify certificate signature"); - - if (ca) { -#ifdef HAVE_OCSP - /* Need the ca's public key hash for OCSP */ - { - Sha sha; - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, ca->publicKey, ca->pubKeySize); - ShaFinal(&sha, cert->issuerKeyHash); - } -#endif /* HAVE_OCSP */ - /* try to confirm/verify signature */ - if (!ConfirmSignature(cert->source + cert->certBegin, - cert->sigIndex - cert->certBegin, - ca->publicKey, ca->pubKeySize, ca->keyOID, - cert->signature, cert->sigLength, cert->signatureOID, - cert->heap)) { - CYASSL_MSG("Confirm signature failed"); - return ASN_SIG_CONFIRM_E; - } -#ifndef IGNORE_NAME_CONSTRAINTS - /* check that this cert's name is permitted by the signer's - * name constraints */ - if (!ConfirmNameConstraints(ca, cert)) { - CYASSL_MSG("Confirm name constraint failed"); - return ASN_NAME_INVALID_E; - } -#endif /* IGNORE_NAME_CONSTRAINTS */ - } - else { - /* no signer */ - CYASSL_MSG("No CA signer to verify with"); - return ASN_NO_SIGNER_E; - } - } - - if (badDate != 0) - return badDate; - - if (criticalExt != 0) - return criticalExt; - - return 0; -} - - -/* Create and init an new signer */ -Signer* MakeSigner(void* heap) -{ - Signer* signer = (Signer*) XMALLOC(sizeof(Signer), heap, - DYNAMIC_TYPE_SIGNER); - if (signer) { - signer->pubKeySize = 0; - signer->keyOID = 0; - signer->publicKey = NULL; - signer->nameLen = 0; - signer->name = NULL; - #ifndef IGNORE_NAME_CONSTRAINTS - signer->permittedNames = NULL; - signer->excludedNames = NULL; - #endif /* IGNORE_NAME_CONSTRAINTS */ - signer->next = NULL; - } - (void)heap; - - return signer; -} - - -/* Free an individual signer */ -void FreeSigner(Signer* signer, void* heap) -{ - XFREE(signer->name, heap, DYNAMIC_TYPE_SUBJECT_CN); - XFREE(signer->publicKey, heap, DYNAMIC_TYPE_PUBLIC_KEY); - #ifndef IGNORE_NAME_CONSTRAINTS - if (signer->permittedNames) - FreeNameSubtrees(signer->permittedNames, heap); - if (signer->excludedNames) - FreeNameSubtrees(signer->excludedNames, heap); - #endif - XFREE(signer, heap, DYNAMIC_TYPE_SIGNER); - - (void)heap; -} - - -/* Free the whole singer table with number of rows */ -void FreeSignerTable(Signer** table, int rows, void* heap) -{ - int i; - - for (i = 0; i < rows; i++) { - Signer* signer = table[i]; - while (signer) { - Signer* next = signer->next; - FreeSigner(signer, heap); - signer = next; - } - table[i] = NULL; - } -} - - -CYASSL_LOCAL int SetMyVersion(word32 version, byte* output, int header) -{ - int i = 0; - - if (header) { - output[i++] = ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED; - output[i++] = ASN_BIT_STRING; - } - output[i++] = ASN_INTEGER; - output[i++] = 0x01; - output[i++] = (byte)version; - - return i; -} - - -CYASSL_LOCAL int SetSerialNumber(const byte* sn, word32 snSz, byte* output) -{ - int result = 0; - - CYASSL_ENTER("SetSerialNumber"); - - if (snSz <= EXTERNAL_SERIAL_SIZE) { - output[0] = ASN_INTEGER; - /* The serial number is always positive. When encoding the - * INTEGER, if the MSB is 1, add a padding zero to keep the - * number positive. */ - if (sn[0] & 0x80) { - output[1] = (byte)snSz + 1; - output[2] = 0; - XMEMCPY(&output[3], sn, snSz); - result = snSz + 3; - } - else { - output[1] = (byte)snSz; - XMEMCPY(&output[2], sn, snSz); - result = snSz + 2; - } - } - return result; -} - - - - -#if defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) - -/* convert der buffer to pem into output, can't do inplace, der and output - need to be different */ -int DerToPem(const byte* der, word32 derSz, byte* output, word32 outSz, - int type) -{ - char header[80]; - char footer[80]; - - int headerLen; - int footerLen; - int i; - int err; - int outLen; /* return length or error */ - - if (der == output) /* no in place conversion */ - return BAD_FUNC_ARG; - - if (type == CERT_TYPE) { - XSTRNCPY(header, "-----BEGIN CERTIFICATE-----\n", sizeof(header)); - XSTRNCPY(footer, "-----END CERTIFICATE-----\n", sizeof(footer)); - } - else if (type == PRIVATEKEY_TYPE) { - XSTRNCPY(header, "-----BEGIN RSA PRIVATE KEY-----\n", sizeof(header)); - XSTRNCPY(footer, "-----END RSA PRIVATE KEY-----\n", sizeof(footer)); - } - #ifdef HAVE_ECC - else if (type == ECC_PRIVATEKEY_TYPE) { - XSTRNCPY(header, "-----BEGIN EC PRIVATE KEY-----\n", sizeof(header)); - XSTRNCPY(footer, "-----END EC PRIVATE KEY-----\n", sizeof(footer)); - } - #endif - #ifdef CYASSL_CERT_REQ - else if (type == CERTREQ_TYPE) - { - XSTRNCPY(header, - "-----BEGIN CERTIFICATE REQUEST-----\n", sizeof(header)); - XSTRNCPY(footer, "-----END CERTIFICATE REQUEST-----\n", sizeof(footer)); - } - #endif - else - return BAD_FUNC_ARG; - - headerLen = (int)XSTRLEN(header); - footerLen = (int)XSTRLEN(footer); - - if (!der || !output) - return BAD_FUNC_ARG; - - /* don't even try if outSz too short */ - if (outSz < headerLen + footerLen + derSz) - return BAD_FUNC_ARG; - - /* header */ - XMEMCPY(output, header, headerLen); - i = headerLen; - - /* body */ - outLen = outSz - (headerLen + footerLen); /* input to Base64_Encode */ - if ( (err = Base64_Encode(der, derSz, output + i, (word32*)&outLen)) < 0) - return err; - i += outLen; - - /* footer */ - if ( (i + footerLen) > (int)outSz) - return BAD_FUNC_ARG; - XMEMCPY(output + i, footer, footerLen); - - return outLen + headerLen + footerLen; -} - - -#endif /* CYASSL_KEY_GEN || CYASSL_CERT_GEN */ - - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) - - -static mp_int* GetRsaInt(RsaKey* key, int idx) -{ - if (idx == 0) - return &key->n; - if (idx == 1) - return &key->e; - if (idx == 2) - return &key->d; - if (idx == 3) - return &key->p; - if (idx == 4) - return &key->q; - if (idx == 5) - return &key->dP; - if (idx == 6) - return &key->dQ; - if (idx == 7) - return &key->u; - - return NULL; -} - - -/* Release Tmp RSA resources */ -static INLINE void FreeTmpRsas(byte** tmps, void* heap) -{ - int i; - - (void)heap; - - for (i = 0; i < RSA_INTS; i++) - XFREE(tmps[i], heap, DYNAMIC_TYPE_RSA); -} - - -/* Convert RsaKey key to DER format, write to output (inLen), return bytes - written */ -int RsaKeyToDer(RsaKey* key, byte* output, word32 inLen) -{ - word32 seqSz, verSz, rawLen, intTotalLen = 0; - word32 sizes[RSA_INTS]; - int i, j, outLen, ret = 0; - - byte seq[MAX_SEQ_SZ]; - byte ver[MAX_VERSION_SZ]; - byte* tmps[RSA_INTS]; - - if (!key || !output) - return BAD_FUNC_ARG; - - if (key->type != RSA_PRIVATE) - return BAD_FUNC_ARG; - - for (i = 0; i < RSA_INTS; i++) - tmps[i] = NULL; - - /* write all big ints from key to DER tmps */ - for (i = 0; i < RSA_INTS; i++) { - mp_int* keyInt = GetRsaInt(key, i); - rawLen = mp_unsigned_bin_size(keyInt); - tmps[i] = (byte*)XMALLOC(rawLen + MAX_SEQ_SZ, key->heap, - DYNAMIC_TYPE_RSA); - if (tmps[i] == NULL) { - ret = MEMORY_E; - break; - } - - tmps[i][0] = ASN_INTEGER; - sizes[i] = SetLength(rawLen, tmps[i] + 1) + 1; /* int tag */ - - if (sizes[i] <= MAX_SEQ_SZ) { - int err = mp_to_unsigned_bin(keyInt, tmps[i] + sizes[i]); - if (err == MP_OKAY) { - sizes[i] += rawLen; - intTotalLen += sizes[i]; - } - else { - ret = err; - break; - } - } - else { - ret = ASN_INPUT_E; - break; - } - } - - if (ret != 0) { - FreeTmpRsas(tmps, key->heap); - return ret; - } - - /* make headers */ - verSz = SetMyVersion(0, ver, FALSE); - seqSz = SetSequence(verSz + intTotalLen, seq); - - outLen = seqSz + verSz + intTotalLen; - if (outLen > (int)inLen) - return BAD_FUNC_ARG; - - /* write to output */ - XMEMCPY(output, seq, seqSz); - j = seqSz; - XMEMCPY(output + j, ver, verSz); - j += verSz; - - for (i = 0; i < RSA_INTS; i++) { - XMEMCPY(output + j, tmps[i], sizes[i]); - j += sizes[i]; - } - FreeTmpRsas(tmps, key->heap); - - return outLen; -} - -#endif /* CYASSL_KEY_GEN && !NO_RSA */ - - -#if defined(CYASSL_CERT_GEN) && !defined(NO_RSA) - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -/* Initialize and Set Certficate defaults: - version = 3 (0x2) - serial = 0 - sigType = SHA_WITH_RSA - issuer = blank - daysValid = 500 - selfSigned = 1 (true) use subject as issuer - subject = blank -*/ -void InitCert(Cert* cert) -{ - cert->version = 2; /* version 3 is hex 2 */ - cert->sigType = CTC_SHAwRSA; - cert->daysValid = 500; - cert->selfSigned = 1; - cert->isCA = 0; - cert->bodySz = 0; -#ifdef CYASSL_ALT_NAMES - cert->altNamesSz = 0; - cert->beforeDateSz = 0; - cert->afterDateSz = 0; -#endif - cert->keyType = RSA_KEY; - XMEMSET(cert->serial, 0, CTC_SERIAL_SIZE); - - cert->issuer.country[0] = '\0'; - cert->issuer.state[0] = '\0'; - cert->issuer.locality[0] = '\0'; - cert->issuer.sur[0] = '\0'; - cert->issuer.org[0] = '\0'; - cert->issuer.unit[0] = '\0'; - cert->issuer.commonName[0] = '\0'; - cert->issuer.email[0] = '\0'; - - cert->subject.country[0] = '\0'; - cert->subject.state[0] = '\0'; - cert->subject.locality[0] = '\0'; - cert->subject.sur[0] = '\0'; - cert->subject.org[0] = '\0'; - cert->subject.unit[0] = '\0'; - cert->subject.commonName[0] = '\0'; - cert->subject.email[0] = '\0'; - -#ifdef CYASSL_CERT_REQ - cert->challengePw[0] ='\0'; -#endif -} - - -/* DER encoded x509 Certificate */ -typedef struct DerCert { - byte size[MAX_LENGTH_SZ]; /* length encoded */ - byte version[MAX_VERSION_SZ]; /* version encoded */ - byte serial[CTC_SERIAL_SIZE + MAX_LENGTH_SZ]; /* serial number encoded */ - byte sigAlgo[MAX_ALGO_SZ]; /* signature algo encoded */ - byte issuer[ASN_NAME_MAX]; /* issuer encoded */ - byte subject[ASN_NAME_MAX]; /* subject encoded */ - byte validity[MAX_DATE_SIZE*2 + MAX_SEQ_SZ*2]; /* before and after dates */ - byte publicKey[MAX_PUBLIC_KEY_SZ]; /* rsa / ntru public key encoded */ - byte ca[MAX_CA_SZ]; /* basic constraint CA true size */ - byte extensions[MAX_EXTENSIONS_SZ]; /* all extensions */ -#ifdef CYASSL_CERT_REQ - byte attrib[MAX_ATTRIB_SZ]; /* Cert req attributes encoded */ -#endif - int sizeSz; /* encoded size length */ - int versionSz; /* encoded version length */ - int serialSz; /* encoded serial length */ - int sigAlgoSz; /* enocded sig alog length */ - int issuerSz; /* encoded issuer length */ - int subjectSz; /* encoded subject length */ - int validitySz; /* encoded validity length */ - int publicKeySz; /* encoded public key length */ - int caSz; /* encoded CA extension length */ - int extensionsSz; /* encoded extensions total length */ - int total; /* total encoded lengths */ -#ifdef CYASSL_CERT_REQ - int attribSz; -#endif -} DerCert; - - -#ifdef CYASSL_CERT_REQ - -/* Write a set header to output */ -static word32 SetUTF8String(word32 len, byte* output) -{ - output[0] = ASN_UTF8STRING; - return SetLength(len, output + 1) + 1; -} - -#endif /* CYASSL_CERT_REQ */ - - -/* Write a serial number to output */ -static int SetSerial(const byte* serial, byte* output) -{ - int length = 0; - - output[length++] = ASN_INTEGER; - length += SetLength(CTC_SERIAL_SIZE, &output[length]); - XMEMCPY(&output[length], serial, CTC_SERIAL_SIZE); - - return length + CTC_SERIAL_SIZE; -} - - -#ifdef HAVE_ECC - -/* Write a public ECC key to output */ -static int SetEccPublicKey(byte* output, ecc_key* key) -{ - byte algo[MAX_ALGO_SZ]; - byte curve[MAX_ALGO_SZ]; - byte len[MAX_LENGTH_SZ + 1]; /* trailing 0 */ - byte pub[ECC_BUFSIZE]; - int algoSz; - int curveSz; - int lenSz; - int idx; - word32 pubSz = sizeof(pub); - - int ret = ecc_export_x963(key, pub, &pubSz); - if (ret != 0) return ret; - - /* headers */ - curveSz = SetCurve(key, curve); - if (curveSz <= 0) return curveSz; - - algoSz = SetAlgoID(ECDSAk, algo, keyType, curveSz); - lenSz = SetLength(pubSz + 1, len); - len[lenSz++] = 0; /* trailing 0 */ - - /* write */ - idx = SetSequence(pubSz + curveSz + lenSz + 1 + algoSz, output); - /* 1 is for ASN_BIT_STRING */ - /* algo */ - XMEMCPY(output + idx, algo, algoSz); - idx += algoSz; - /* curve */ - XMEMCPY(output + idx, curve, curveSz); - idx += curveSz; - /* bit string */ - output[idx++] = ASN_BIT_STRING; - /* length */ - XMEMCPY(output + idx, len, lenSz); - idx += lenSz; - /* pub */ - XMEMCPY(output + idx, pub, pubSz); - idx += pubSz; - - return idx; -} - - -#endif /* HAVE_ECC */ - - -/* Write a public RSA key to output */ -static int SetRsaPublicKey(byte* output, RsaKey* key) -{ - byte n[MAX_RSA_INT_SZ]; - byte e[MAX_RSA_E_SZ]; - byte algo[MAX_ALGO_SZ]; - byte seq[MAX_SEQ_SZ]; - byte len[MAX_LENGTH_SZ + 1]; /* trailing 0 */ - int nSz; - int eSz; - int algoSz; - int seqSz; - int lenSz; - int idx; - int rawLen; - int leadingBit; - int err; - - /* n */ - leadingBit = mp_leading_bit(&key->n); - rawLen = mp_unsigned_bin_size(&key->n) + leadingBit; - n[0] = ASN_INTEGER; - nSz = SetLength(rawLen, n + 1) + 1; /* int tag */ - - if ( (nSz + rawLen) < (int)sizeof(n)) { - if (leadingBit) - n[nSz] = 0; - err = mp_to_unsigned_bin(&key->n, n + nSz + leadingBit); - if (err == MP_OKAY) - nSz += rawLen; - else - return MP_TO_E; - } - else - return BUFFER_E; - - /* e */ - leadingBit = mp_leading_bit(&key->e); - rawLen = mp_unsigned_bin_size(&key->e) + leadingBit; - e[0] = ASN_INTEGER; - eSz = SetLength(rawLen, e + 1) + 1; /* int tag */ - - if ( (eSz + rawLen) < (int)sizeof(e)) { - if (leadingBit) - e[eSz] = 0; - err = mp_to_unsigned_bin(&key->e, e + eSz + leadingBit); - if (err == MP_OKAY) - eSz += rawLen; - else - return MP_TO_E; - } - else - return BUFFER_E; - - /* headers */ - algoSz = SetAlgoID(RSAk, algo, keyType, 0); - seqSz = SetSequence(nSz + eSz, seq); - lenSz = SetLength(seqSz + nSz + eSz + 1, len); - len[lenSz++] = 0; /* trailing 0 */ - - /* write */ - idx = SetSequence(nSz + eSz + seqSz + lenSz + 1 + algoSz, output); - /* 1 is for ASN_BIT_STRING */ - /* algo */ - XMEMCPY(output + idx, algo, algoSz); - idx += algoSz; - /* bit string */ - output[idx++] = ASN_BIT_STRING; - /* length */ - XMEMCPY(output + idx, len, lenSz); - idx += lenSz; - /* seq */ - XMEMCPY(output + idx, seq, seqSz); - idx += seqSz; - /* n */ - XMEMCPY(output + idx, n, nSz); - idx += nSz; - /* e */ - XMEMCPY(output + idx, e, eSz); - idx += eSz; - - return idx; -} - - -static INLINE byte itob(int number) -{ - return (byte)number + 0x30; -} - - -/* write time to output, format */ -static void SetTime(struct tm* date, byte* output) -{ - int i = 0; - - output[i++] = itob((date->tm_year % 10000) / 1000); - output[i++] = itob((date->tm_year % 1000) / 100); - output[i++] = itob((date->tm_year % 100) / 10); - output[i++] = itob( date->tm_year % 10); - - output[i++] = itob(date->tm_mon / 10); - output[i++] = itob(date->tm_mon % 10); - - output[i++] = itob(date->tm_mday / 10); - output[i++] = itob(date->tm_mday % 10); - - output[i++] = itob(date->tm_hour / 10); - output[i++] = itob(date->tm_hour % 10); - - output[i++] = itob(date->tm_min / 10); - output[i++] = itob(date->tm_min % 10); - - output[i++] = itob(date->tm_sec / 10); - output[i++] = itob(date->tm_sec % 10); - - output[i] = 'Z'; /* Zulu profile */ -} - - -#ifdef CYASSL_ALT_NAMES - -/* Copy Dates from cert, return bytes written */ -static int CopyValidity(byte* output, Cert* cert) -{ - int seqSz; - - CYASSL_ENTER("CopyValidity"); - - /* headers and output */ - seqSz = SetSequence(cert->beforeDateSz + cert->afterDateSz, output); - XMEMCPY(output + seqSz, cert->beforeDate, cert->beforeDateSz); - XMEMCPY(output + seqSz + cert->beforeDateSz, cert->afterDate, - cert->afterDateSz); - return seqSz + cert->beforeDateSz + cert->afterDateSz; -} - -#endif - - -/* Set Date validity from now until now + daysValid */ -static int SetValidity(byte* output, int daysValid) -{ - byte before[MAX_DATE_SIZE]; - byte after[MAX_DATE_SIZE]; - - int beforeSz; - int afterSz; - int seqSz; - - time_t ticks; - struct tm* now; - struct tm local; - - ticks = XTIME(0); - now = XGMTIME(&ticks); - - /* before now */ - local = *now; - before[0] = ASN_GENERALIZED_TIME; - beforeSz = SetLength(ASN_GEN_TIME_SZ, before + 1) + 1; /* gen tag */ - - /* subtract 1 day for more compliance */ - local.tm_mday -= 1; - mktime(&local); - - /* adjust */ - local.tm_year += 1900; - local.tm_mon += 1; - - SetTime(&local, before + beforeSz); - beforeSz += ASN_GEN_TIME_SZ; - - /* after now + daysValid */ - local = *now; - after[0] = ASN_GENERALIZED_TIME; - afterSz = SetLength(ASN_GEN_TIME_SZ, after + 1) + 1; /* gen tag */ - - /* add daysValid */ - local.tm_mday += daysValid; - mktime(&local); - - /* adjust */ - local.tm_year += 1900; - local.tm_mon += 1; - - SetTime(&local, after + afterSz); - afterSz += ASN_GEN_TIME_SZ; - - /* headers and output */ - seqSz = SetSequence(beforeSz + afterSz, output); - XMEMCPY(output + seqSz, before, beforeSz); - XMEMCPY(output + seqSz + beforeSz, after, afterSz); - - return seqSz + beforeSz + afterSz; -} - - -/* ASN Encoded Name field */ -typedef struct EncodedName { - int nameLen; /* actual string value length */ - int totalLen; /* total encoded length */ - int type; /* type of name */ - int used; /* are we actually using this one */ - byte encoded[CTC_NAME_SIZE * 2]; /* encoding */ -} EncodedName; - - -/* Get Which Name from index */ -static const char* GetOneName(CertName* name, int idx) -{ - switch (idx) { - case 0: - return name->country; - - case 1: - return name->state; - - case 2: - return name->locality; - - case 3: - return name->sur; - - case 4: - return name->org; - - case 5: - return name->unit; - - case 6: - return name->commonName; - - case 7: - return name->email; - - default: - return 0; - } -} - - -/* Get ASN Name from index */ -static byte GetNameId(int idx) -{ - switch (idx) { - case 0: - return ASN_COUNTRY_NAME; - - case 1: - return ASN_STATE_NAME; - - case 2: - return ASN_LOCALITY_NAME; - - case 3: - return ASN_SUR_NAME; - - case 4: - return ASN_ORG_NAME; - - case 5: - return ASN_ORGUNIT_NAME; - - case 6: - return ASN_COMMON_NAME; - - case 7: - /* email uses different id type */ - return 0; - - default: - return 0; - } -} - - -/* encode all extensions, return total bytes written */ -static int SetExtensions(byte* output, const byte* ext, int extSz, int header) -{ - byte sequence[MAX_SEQ_SZ]; - byte len[MAX_LENGTH_SZ]; - - int sz = 0; - int seqSz = SetSequence(extSz, sequence); - - if (header) { - int lenSz = SetLength(seqSz + extSz, len); - output[0] = ASN_EXTENSIONS; /* extensions id */ - sz++; - XMEMCPY(&output[sz], len, lenSz); /* length */ - sz += lenSz; - } - XMEMCPY(&output[sz], sequence, seqSz); /* sequence */ - sz += seqSz; - XMEMCPY(&output[sz], ext, extSz); /* extensions */ - sz += extSz; - - return sz; -} - - -/* encode CA basic constraint true, return total bytes written */ -static int SetCa(byte* output) -{ - static const byte ca[] = { 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, - 0x05, 0x30, 0x03, 0x01, 0x01, 0xff }; - - XMEMCPY(output, ca, sizeof(ca)); - - return (int)sizeof(ca); -} - - -/* encode CertName into output, return total bytes written */ -static int SetName(byte* output, CertName* name) -{ - int totalBytes = 0, i, idx; - EncodedName names[NAME_ENTRIES]; - - for (i = 0; i < NAME_ENTRIES; i++) { - const char* nameStr = GetOneName(name, i); - if (nameStr) { - /* bottom up */ - byte firstLen[MAX_LENGTH_SZ]; - byte secondLen[MAX_LENGTH_SZ]; - byte sequence[MAX_SEQ_SZ]; - byte set[MAX_SET_SZ]; - - int email = i == (NAME_ENTRIES - 1) ? 1 : 0; - int strLen = (int)XSTRLEN(nameStr); - int thisLen = strLen; - int firstSz, secondSz, seqSz, setSz; - - if (strLen == 0) { /* no user data for this item */ - names[i].used = 0; - continue; - } - - secondSz = SetLength(strLen, secondLen); - thisLen += secondSz; - if (email) { - thisLen += EMAIL_JOINT_LEN; - thisLen ++; /* id type */ - firstSz = SetLength(EMAIL_JOINT_LEN, firstLen); - } - else { - thisLen++; /* str type */ - thisLen++; /* id type */ - thisLen += JOINT_LEN; - firstSz = SetLength(JOINT_LEN + 1, firstLen); - } - thisLen += firstSz; - thisLen++; /* object id */ - - seqSz = SetSequence(thisLen, sequence); - thisLen += seqSz; - setSz = SetSet(thisLen, set); - thisLen += setSz; - - if (thisLen > (int)sizeof(names[i].encoded)) - return BUFFER_E; - - /* store it */ - idx = 0; - /* set */ - XMEMCPY(names[i].encoded, set, setSz); - idx += setSz; - /* seq */ - XMEMCPY(names[i].encoded + idx, sequence, seqSz); - idx += seqSz; - /* asn object id */ - names[i].encoded[idx++] = ASN_OBJECT_ID; - /* first length */ - XMEMCPY(names[i].encoded + idx, firstLen, firstSz); - idx += firstSz; - if (email) { - const byte EMAIL_OID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x09, 0x01, 0x16 }; - /* email joint id */ - XMEMCPY(names[i].encoded + idx, EMAIL_OID, sizeof(EMAIL_OID)); - idx += (int)sizeof(EMAIL_OID); - } - else { - /* joint id */ - byte bType = GetNameId(i); - names[i].encoded[idx++] = 0x55; - names[i].encoded[idx++] = 0x04; - /* id type */ - names[i].encoded[idx++] = bType; - /* str type */ - if (bType == ASN_COUNTRY_NAME) - names[i].encoded[idx++] = 0x13; /* printable */ - else - names[i].encoded[idx++] = 0x0c; /* utf8 */ - } - /* second length */ - XMEMCPY(names[i].encoded + idx, secondLen, secondSz); - idx += secondSz; - /* str value */ - XMEMCPY(names[i].encoded + idx, nameStr, strLen); - idx += strLen; - - totalBytes += idx; - names[i].totalLen = idx; - names[i].used = 1; - } - else - names[i].used = 0; - } - - /* header */ - idx = SetSequence(totalBytes, output); - totalBytes += idx; - if (totalBytes > ASN_NAME_MAX) - return BUFFER_E; - - for (i = 0; i < NAME_ENTRIES; i++) { - if (names[i].used) { - XMEMCPY(output + idx, names[i].encoded, names[i].totalLen); - idx += names[i].totalLen; - } - } - return totalBytes; -} - -/* encode info from cert into DER encoded format */ -static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey, - RNG* rng, const byte* ntruKey, word16 ntruSz) -{ - int ret; - - (void)eccKey; - (void)ntruKey; - (void)ntruSz; - - /* init */ - XMEMSET(der, 0, sizeof(DerCert)); - - /* version */ - der->versionSz = SetMyVersion(cert->version, der->version, TRUE); - - /* serial number */ - ret = RNG_GenerateBlock(rng, cert->serial, CTC_SERIAL_SIZE); - if (ret != 0) - return ret; - - cert->serial[0] = 0x01; /* ensure positive */ - der->serialSz = SetSerial(cert->serial, der->serial); - - /* signature algo */ - der->sigAlgoSz = SetAlgoID(cert->sigType, der->sigAlgo, sigType, 0); - if (der->sigAlgoSz == 0) - return ALGO_ID_E; - - /* public key */ - if (cert->keyType == RSA_KEY) { - if (rsaKey == NULL) - return PUBLIC_KEY_E; - der->publicKeySz = SetRsaPublicKey(der->publicKey, rsaKey); - if (der->publicKeySz <= 0) - return PUBLIC_KEY_E; - } - -#ifdef HAVE_ECC - if (cert->keyType == ECC_KEY) { - if (eccKey == NULL) - return PUBLIC_KEY_E; - der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey); - if (der->publicKeySz <= 0) - return PUBLIC_KEY_E; - } -#endif /* HAVE_ECC */ - -#ifdef HAVE_NTRU - if (cert->keyType == NTRU_KEY) { - word32 rc; - word16 encodedSz; - - rc = crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( ntruSz, - ntruKey, &encodedSz, NULL); - if (rc != NTRU_OK) - return PUBLIC_KEY_E; - if (encodedSz > MAX_PUBLIC_KEY_SZ) - return PUBLIC_KEY_E; - - rc = crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( ntruSz, - ntruKey, &encodedSz, der->publicKey); - if (rc != NTRU_OK) - return PUBLIC_KEY_E; - - der->publicKeySz = encodedSz; - } -#endif /* HAVE_NTRU */ - - der->validitySz = 0; -#ifdef CYASSL_ALT_NAMES - /* date validity copy ? */ - if (cert->beforeDateSz && cert->afterDateSz) { - der->validitySz = CopyValidity(der->validity, cert); - if (der->validitySz == 0) - return DATE_E; - } -#endif - - /* date validity */ - if (der->validitySz == 0) { - der->validitySz = SetValidity(der->validity, cert->daysValid); - if (der->validitySz == 0) - return DATE_E; - } - - /* subject name */ - der->subjectSz = SetName(der->subject, &cert->subject); - if (der->subjectSz == 0) - return SUBJECT_E; - - /* issuer name */ - der->issuerSz = SetName(der->issuer, cert->selfSigned ? - &cert->subject : &cert->issuer); - if (der->issuerSz == 0) - return ISSUER_E; - - /* CA */ - if (cert->isCA) { - der->caSz = SetCa(der->ca); - if (der->caSz == 0) - return CA_TRUE_E; - } - else - der->caSz = 0; - - /* extensions, just CA now */ - if (cert->isCA) { - der->extensionsSz = SetExtensions(der->extensions, - der->ca, der->caSz, TRUE); - if (der->extensionsSz == 0) - return EXTENSIONS_E; - } - else - der->extensionsSz = 0; - -#ifdef CYASSL_ALT_NAMES - if (der->extensionsSz == 0 && cert->altNamesSz) { - der->extensionsSz = SetExtensions(der->extensions, cert->altNames, - cert->altNamesSz, TRUE); - if (der->extensionsSz == 0) - return EXTENSIONS_E; - } -#endif - - der->total = der->versionSz + der->serialSz + der->sigAlgoSz + - der->publicKeySz + der->validitySz + der->subjectSz + der->issuerSz + - der->extensionsSz; - - return 0; -} - - -/* write DER encoded cert to buffer, size already checked */ -static int WriteCertBody(DerCert* der, byte* buffer) -{ - int idx; - - /* signed part header */ - idx = SetSequence(der->total, buffer); - /* version */ - XMEMCPY(buffer + idx, der->version, der->versionSz); - idx += der->versionSz; - /* serial */ - XMEMCPY(buffer + idx, der->serial, der->serialSz); - idx += der->serialSz; - /* sig algo */ - XMEMCPY(buffer + idx, der->sigAlgo, der->sigAlgoSz); - idx += der->sigAlgoSz; - /* issuer */ - XMEMCPY(buffer + idx, der->issuer, der->issuerSz); - idx += der->issuerSz; - /* validity */ - XMEMCPY(buffer + idx, der->validity, der->validitySz); - idx += der->validitySz; - /* subject */ - XMEMCPY(buffer + idx, der->subject, der->subjectSz); - idx += der->subjectSz; - /* public key */ - XMEMCPY(buffer + idx, der->publicKey, der->publicKeySz); - idx += der->publicKeySz; - if (der->extensionsSz) { - /* extensions */ - XMEMCPY(buffer + idx, der->extensions, min(der->extensionsSz, - sizeof(der->extensions))); - idx += der->extensionsSz; - } - - return idx; -} - - -/* Make RSA signature from buffer (sz), write to sig (sigSz) */ -static int MakeSignature(const byte* buffer, int sz, byte* sig, int sigSz, - RsaKey* rsaKey, ecc_key* eccKey, RNG* rng, - int sigAlgoType) -{ - byte digest[SHA256_DIGEST_SIZE]; /* max size */ - byte encSig[MAX_ENCODED_DIG_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ]; - int encSigSz, digestSz, typeH, ret = 0; - - (void)eccKey; - - if (sigAlgoType == CTC_MD5wRSA) { - Md5 md5; - - InitMd5(&md5); - Md5Update(&md5, buffer, sz); - Md5Final(&md5, digest); - - digestSz = MD5_DIGEST_SIZE; - typeH = MD5h; - } - else if (sigAlgoType == CTC_SHAwRSA || sigAlgoType == CTC_SHAwECDSA) { - Sha sha; - - ret = InitSha(&sha); - if (ret != 0) - return ret; - - ShaUpdate(&sha, buffer, sz); - ShaFinal(&sha, digest); - - digestSz = SHA_DIGEST_SIZE; - typeH = SHAh; - } - else if (sigAlgoType == CTC_SHA256wRSA || sigAlgoType == CTC_SHA256wECDSA) { - Sha256 sha256; - - ret = InitSha256(&sha256); - if (ret != 0) - return ret; - - ret = Sha256Update(&sha256, buffer, sz); - if (ret != 0) - return ret; - - ret = Sha256Final(&sha256, digest); - if (ret != 0) - return ret; - - digestSz = SHA256_DIGEST_SIZE; - typeH = SHA256h; - } - else - return ALGO_ID_E; - - if (rsaKey) { - /* signature */ - encSigSz = EncodeSignature(encSig, digest, digestSz, typeH); - return RsaSSL_Sign(encSig, encSigSz, sig, sigSz, rsaKey, rng); - } -#ifdef HAVE_ECC - else if (eccKey) { - word32 outSz = sigSz; - ret = ecc_sign_hash(digest, digestSz, sig, &outSz, rng, eccKey); - - if (ret != 0) - return ret; - return outSz; - } -#endif /* HAVE_ECC */ - - return ALGO_ID_E; -} - - -/* add signature to end of buffer, size of buffer assumed checked, return - new length */ -static int AddSignature(byte* buffer, int bodySz, const byte* sig, int sigSz, - int sigAlgoType) -{ - byte seq[MAX_SEQ_SZ]; - int idx = bodySz, seqSz; - - /* algo */ - idx += SetAlgoID(sigAlgoType, buffer + idx, sigType, 0); - /* bit string */ - buffer[idx++] = ASN_BIT_STRING; - /* length */ - idx += SetLength(sigSz + 1, buffer + idx); - buffer[idx++] = 0; /* trailing 0 */ - /* signature */ - XMEMCPY(buffer + idx, sig, sigSz); - idx += sigSz; - - /* make room for overall header */ - seqSz = SetSequence(idx, seq); - XMEMMOVE(buffer + seqSz, buffer, idx); - XMEMCPY(buffer, seq, seqSz); - - return idx + seqSz; -} - - -/* Make an x509 Certificate v3 any key type from cert input, write to buffer */ -static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, - RsaKey* rsaKey, ecc_key* eccKey, RNG* rng, - const byte* ntruKey, word16 ntruSz) -{ - DerCert der; - int ret; - - if (eccKey) - cert->keyType = ECC_KEY; - else - cert->keyType = rsaKey ? RSA_KEY : NTRU_KEY; - ret = EncodeCert(cert, &der, rsaKey, eccKey, rng, ntruKey, ntruSz); - if (ret != 0) - return ret; - - if (der.total + MAX_SEQ_SZ * 2 > (int)derSz) - return BUFFER_E; - - return cert->bodySz = WriteCertBody(&der, derBuffer); -} - - -/* Make an x509 Certificate v3 RSA or ECC from cert input, write to buffer */ -int MakeCert(Cert* cert, byte* derBuffer, word32 derSz, RsaKey* rsaKey, - ecc_key* eccKey, RNG* rng) -{ - return MakeAnyCert(cert, derBuffer, derSz, rsaKey, eccKey, rng, NULL, 0); -} - - -#ifdef HAVE_NTRU - -int MakeNtruCert(Cert* cert, byte* derBuffer, word32 derSz, - const byte* ntruKey, word16 keySz, RNG* rng) -{ - return MakeAnyCert(cert, derBuffer, derSz, NULL, NULL, rng, ntruKey, keySz); -} - -#endif /* HAVE_NTRU */ - - -#ifdef CYASSL_CERT_REQ - -static int SetReqAttrib(byte* output, char* pw, int extSz) -{ - static const byte cpOid[] = - { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x09, 0x07 }; - static const byte erOid[] = - { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x09, 0x0e }; - - int sz = 0; /* overall size */ - int cpSz = 0; /* Challenge Password section size */ - int cpSeqSz = 0; - int cpSetSz = 0; - int cpStrSz = 0; - int pwSz = 0; - int erSz = 0; /* Extension Request section size */ - int erSeqSz = 0; - int erSetSz = 0; - byte cpSeq[MAX_SEQ_SZ]; - byte cpSet[MAX_SET_SZ]; - byte cpStr[MAX_PRSTR_SZ]; - byte erSeq[MAX_SEQ_SZ]; - byte erSet[MAX_SET_SZ]; - - output[0] = 0xa0; - sz++; - - if (pw && pw[0]) { - pwSz = (int)XSTRLEN(pw); - cpStrSz = SetUTF8String(pwSz, cpStr); - cpSetSz = SetSet(cpStrSz + pwSz, cpSet); - cpSeqSz = SetSequence(sizeof(cpOid) + cpSetSz + cpStrSz + pwSz, cpSeq); - cpSz = cpSeqSz + sizeof(cpOid) + cpSetSz + cpStrSz + pwSz; - } - - if (extSz) { - erSetSz = SetSet(extSz, erSet); - erSeqSz = SetSequence(erSetSz + sizeof(erOid) + extSz, erSeq); - erSz = extSz + erSetSz + erSeqSz + sizeof(erOid); - } - - /* Put the pieces together. */ - sz += SetLength(cpSz + erSz, &output[sz]); - - if (cpSz) { - XMEMCPY(&output[sz], cpSeq, cpSeqSz); - sz += cpSeqSz; - XMEMCPY(&output[sz], cpOid, sizeof(cpOid)); - sz += sizeof(cpOid); - XMEMCPY(&output[sz], cpSet, cpSetSz); - sz += cpSetSz; - XMEMCPY(&output[sz], cpStr, cpStrSz); - sz += cpStrSz; - XMEMCPY(&output[sz], pw, pwSz); - sz += pwSz; - } - - if (erSz) { - XMEMCPY(&output[sz], erSeq, erSeqSz); - sz += erSeqSz; - XMEMCPY(&output[sz], erOid, sizeof(erOid)); - sz += sizeof(erOid); - XMEMCPY(&output[sz], erSet, erSetSz); - sz += erSetSz; - /* The actual extension data will be tacked onto the output later. */ - } - - return sz; -} - - -/* encode info from cert into DER encoded format */ -static int EncodeCertReq(Cert* cert, DerCert* der, - RsaKey* rsaKey, ecc_key* eccKey) -{ - (void)eccKey; - - /* init */ - XMEMSET(der, 0, sizeof(DerCert)); - - /* version */ - der->versionSz = SetMyVersion(cert->version, der->version, FALSE); - - /* subject name */ - der->subjectSz = SetName(der->subject, &cert->subject); - if (der->subjectSz == 0) - return SUBJECT_E; - - /* public key */ - if (cert->keyType == RSA_KEY) { - if (rsaKey == NULL) - return PUBLIC_KEY_E; - der->publicKeySz = SetRsaPublicKey(der->publicKey, rsaKey); - if (der->publicKeySz <= 0) - return PUBLIC_KEY_E; - } - -#ifdef HAVE_ECC - if (cert->keyType == ECC_KEY) { - if (eccKey == NULL) - return PUBLIC_KEY_E; - der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey); - if (der->publicKeySz <= 0) - return PUBLIC_KEY_E; - } -#endif /* HAVE_ECC */ - - /* CA */ - if (cert->isCA) { - der->caSz = SetCa(der->ca); - if (der->caSz == 0) - return CA_TRUE_E; - } - else - der->caSz = 0; - - /* extensions, just CA now */ - if (cert->isCA) { - der->extensionsSz = SetExtensions(der->extensions, - der->ca, der->caSz, FALSE); - if (der->extensionsSz == 0) - return EXTENSIONS_E; - } - else - der->extensionsSz = 0; - - der->attribSz = SetReqAttrib(der->attrib, - cert->challengePw, der->extensionsSz); - if (der->attribSz == 0) - return REQ_ATTRIBUTE_E; - - der->total = der->versionSz + der->subjectSz + der->publicKeySz + - der->extensionsSz + der->attribSz; - - return 0; -} - - -/* write DER encoded cert req to buffer, size already checked */ -static int WriteCertReqBody(DerCert* der, byte* buffer) -{ - int idx; - - /* signed part header */ - idx = SetSequence(der->total, buffer); - /* version */ - XMEMCPY(buffer + idx, der->version, der->versionSz); - idx += der->versionSz; - /* subject */ - XMEMCPY(buffer + idx, der->subject, der->subjectSz); - idx += der->subjectSz; - /* public key */ - XMEMCPY(buffer + idx, der->publicKey, der->publicKeySz); - idx += der->publicKeySz; - /* attributes */ - XMEMCPY(buffer + idx, der->attrib, der->attribSz); - idx += der->attribSz; - /* extensions */ - if (der->extensionsSz) { - XMEMCPY(buffer + idx, der->extensions, min(der->extensionsSz, - sizeof(der->extensions))); - idx += der->extensionsSz; - } - - return idx; -} - - -int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, - RsaKey* rsaKey, ecc_key* eccKey) -{ - DerCert der; - int ret; - - cert->keyType = (eccKey != NULL) ? ECC_KEY : RSA_KEY; - ret = EncodeCertReq(cert, &der, rsaKey, eccKey); - if (ret != 0) - return ret; - - if (der.total + MAX_SEQ_SZ * 2 > (int)derSz) - return BUFFER_E; - - return cert->bodySz = WriteCertReqBody(&der, derBuffer); -} - -#endif /* CYASSL_CERT_REQ */ - - -int SignCert(int requestSz, int sType, byte* buffer, word32 buffSz, - RsaKey* rsaKey, ecc_key* eccKey, RNG* rng) -{ - byte sig[MAX_ENCODED_SIG_SZ]; - int sigSz; - - if (requestSz < 0) - return requestSz; - - sigSz = MakeSignature(buffer, requestSz, sig, sizeof(sig), rsaKey, eccKey, - rng, sType); - if (sigSz < 0) - return sigSz; - - if (requestSz + MAX_SEQ_SZ * 2 + sigSz > (int)buffSz) - return BUFFER_E; - - return AddSignature(buffer, requestSz, sig, sigSz, sType); -} - - -int MakeSelfCert(Cert* cert, byte* buffer, word32 buffSz, RsaKey* key, RNG* rng) -{ - int ret = MakeCert(cert, buffer, buffSz, key, NULL, rng); - - if (ret < 0) - return ret; - - return SignCert(cert->bodySz, cert->sigType, buffer, buffSz, key, NULL,rng); -} - - -#ifdef CYASSL_ALT_NAMES - -/* Set Alt Names from der cert, return 0 on success */ -static int SetAltNamesFromCert(Cert* cert, const byte* der, int derSz) -{ - DecodedCert decoded; - int ret; - - if (derSz < 0) - return derSz; - - InitDecodedCert(&decoded, (byte*)der, derSz, 0); - ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); - - if (ret < 0) { - FreeDecodedCert(&decoded); - return ret; - } - - if (decoded.extensions) { - byte b; - int length; - word32 maxExtensionsIdx; - - decoded.srcIdx = decoded.extensionsIdx; - b = decoded.source[decoded.srcIdx++]; - if (b != ASN_EXTENSIONS) { - FreeDecodedCert(&decoded); - return ASN_PARSE_E; - } - - if (GetLength(decoded.source, &decoded.srcIdx, &length, - decoded.maxIdx) < 0) { - FreeDecodedCert(&decoded); - return ASN_PARSE_E; - } - - if (GetSequence(decoded.source, &decoded.srcIdx, &length, - decoded.maxIdx) < 0) { - FreeDecodedCert(&decoded); - return ASN_PARSE_E; - } - - maxExtensionsIdx = decoded.srcIdx + length; - - while (decoded.srcIdx < maxExtensionsIdx) { - word32 oid; - word32 startIdx = decoded.srcIdx; - word32 tmpIdx; - - if (GetSequence(decoded.source, &decoded.srcIdx, &length, - decoded.maxIdx) < 0) { - FreeDecodedCert(&decoded); - return ASN_PARSE_E; - } - - tmpIdx = decoded.srcIdx; - decoded.srcIdx = startIdx; - - if (GetAlgoId(decoded.source, &decoded.srcIdx, &oid, - decoded.maxIdx) < 0) { - FreeDecodedCert(&decoded); - return ASN_PARSE_E; - } - - if (oid == ALT_NAMES_OID) { - cert->altNamesSz = length + (tmpIdx - startIdx); - - if (cert->altNamesSz < (int)sizeof(cert->altNames)) - XMEMCPY(cert->altNames, &decoded.source[startIdx], - cert->altNamesSz); - else { - cert->altNamesSz = 0; - CYASSL_MSG("AltNames extensions too big"); - FreeDecodedCert(&decoded); - return ALT_NAME_E; - } - } - decoded.srcIdx = tmpIdx + length; - } - } - FreeDecodedCert(&decoded); - - return 0; -} - - -/* Set Dates from der cert, return 0 on success */ -static int SetDatesFromCert(Cert* cert, const byte* der, int derSz) -{ - DecodedCert decoded; - int ret; - - CYASSL_ENTER("SetDatesFromCert"); - if (derSz < 0) - return derSz; - - InitDecodedCert(&decoded, (byte*)der, derSz, 0); - ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); - - if (ret < 0) { - CYASSL_MSG("ParseCertRelative error"); - FreeDecodedCert(&decoded); - return ret; - } - - if (decoded.beforeDate == NULL || decoded.afterDate == NULL) { - CYASSL_MSG("Couldn't extract dates"); - FreeDecodedCert(&decoded); - return -1; - } - - if (decoded.beforeDateLen > MAX_DATE_SIZE || decoded.afterDateLen > - MAX_DATE_SIZE) { - CYASSL_MSG("Bad date size"); - FreeDecodedCert(&decoded); - return -1; - } - - XMEMCPY(cert->beforeDate, decoded.beforeDate, decoded.beforeDateLen); - XMEMCPY(cert->afterDate, decoded.afterDate, decoded.afterDateLen); - - cert->beforeDateSz = decoded.beforeDateLen; - cert->afterDateSz = decoded.afterDateLen; - - return 0; -} - - -#endif /* CYASSL_ALT_NAMES && !NO_RSA */ - - -/* Set cn name from der buffer, return 0 on success */ -static int SetNameFromCert(CertName* cn, const byte* der, int derSz) -{ - DecodedCert decoded; - int ret; - int sz; - - if (derSz < 0) - return derSz; - - InitDecodedCert(&decoded, (byte*)der, derSz, 0); - ret = ParseCertRelative(&decoded, CA_TYPE, NO_VERIFY, 0); - - if (ret < 0) - return ret; - - if (decoded.subjectCN) { - sz = (decoded.subjectCNLen < CTC_NAME_SIZE) ? decoded.subjectCNLen : - CTC_NAME_SIZE - 1; - strncpy(cn->commonName, decoded.subjectCN, CTC_NAME_SIZE); - cn->commonName[sz] = 0; - } - if (decoded.subjectC) { - sz = (decoded.subjectCLen < CTC_NAME_SIZE) ? decoded.subjectCLen : - CTC_NAME_SIZE - 1; - strncpy(cn->country, decoded.subjectC, CTC_NAME_SIZE); - cn->country[sz] = 0; - } - if (decoded.subjectST) { - sz = (decoded.subjectSTLen < CTC_NAME_SIZE) ? decoded.subjectSTLen : - CTC_NAME_SIZE - 1; - strncpy(cn->state, decoded.subjectST, CTC_NAME_SIZE); - cn->state[sz] = 0; - } - if (decoded.subjectL) { - sz = (decoded.subjectLLen < CTC_NAME_SIZE) ? decoded.subjectLLen : - CTC_NAME_SIZE - 1; - strncpy(cn->locality, decoded.subjectL, CTC_NAME_SIZE); - cn->locality[sz] = 0; - } - if (decoded.subjectO) { - sz = (decoded.subjectOLen < CTC_NAME_SIZE) ? decoded.subjectOLen : - CTC_NAME_SIZE - 1; - strncpy(cn->org, decoded.subjectO, CTC_NAME_SIZE); - cn->org[sz] = 0; - } - if (decoded.subjectOU) { - sz = (decoded.subjectOULen < CTC_NAME_SIZE) ? decoded.subjectOULen : - CTC_NAME_SIZE - 1; - strncpy(cn->unit, decoded.subjectOU, CTC_NAME_SIZE); - cn->unit[sz] = 0; - } - if (decoded.subjectSN) { - sz = (decoded.subjectSNLen < CTC_NAME_SIZE) ? decoded.subjectSNLen : - CTC_NAME_SIZE - 1; - strncpy(cn->sur, decoded.subjectSN, CTC_NAME_SIZE); - cn->sur[sz] = 0; - } - if (decoded.subjectEmail) { - sz = (decoded.subjectEmailLen < CTC_NAME_SIZE) ? - decoded.subjectEmailLen : CTC_NAME_SIZE - 1; - strncpy(cn->email, decoded.subjectEmail, CTC_NAME_SIZE); - cn->email[sz] = 0; - } - - FreeDecodedCert(&decoded); - - return 0; -} - - -#ifndef NO_FILESYSTEM - -/* forward from CyaSSL */ -int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz); - -/* Set cert issuer from issuerFile in PEM */ -int SetIssuer(Cert* cert, const char* issuerFile) -{ - int ret; - int derSz; - byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); - - if (der == NULL) { - CYASSL_MSG("SetIssuer OOF Problem"); - return MEMORY_E; - } - derSz = CyaSSL_PemCertToDer(issuerFile, der, EIGHTK_BUF); - cert->selfSigned = 0; - ret = SetNameFromCert(&cert->issuer, der, derSz); - XFREE(der, NULL, DYNAMIC_TYPE_CERT); - - return ret; -} - - -/* Set cert subject from subjectFile in PEM */ -int SetSubject(Cert* cert, const char* subjectFile) -{ - int ret; - int derSz; - byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); - - if (der == NULL) { - CYASSL_MSG("SetSubject OOF Problem"); - return MEMORY_E; - } - derSz = CyaSSL_PemCertToDer(subjectFile, der, EIGHTK_BUF); - ret = SetNameFromCert(&cert->subject, der, derSz); - XFREE(der, NULL, DYNAMIC_TYPE_CERT); - - return ret; -} - - -#ifdef CYASSL_ALT_NAMES - -/* Set atl names from file in PEM */ -int SetAltNames(Cert* cert, const char* file) -{ - int ret; - int derSz; - byte* der = (byte*)XMALLOC(EIGHTK_BUF, NULL, DYNAMIC_TYPE_CERT); - - if (der == NULL) { - CYASSL_MSG("SetAltNames OOF Problem"); - return MEMORY_E; - } - derSz = CyaSSL_PemCertToDer(file, der, EIGHTK_BUF); - ret = SetAltNamesFromCert(cert, der, derSz); - XFREE(der, NULL, DYNAMIC_TYPE_CERT); - - return ret; -} - -#endif /* CYASSL_ALT_NAMES */ - -#endif /* NO_FILESYSTEM */ - -/* Set cert issuer from DER buffer */ -int SetIssuerBuffer(Cert* cert, const byte* der, int derSz) -{ - cert->selfSigned = 0; - return SetNameFromCert(&cert->issuer, der, derSz); -} - - -/* Set cert subject from DER buffer */ -int SetSubjectBuffer(Cert* cert, const byte* der, int derSz) -{ - return SetNameFromCert(&cert->subject, der, derSz); -} - - -#ifdef CYASSL_ALT_NAMES - -/* Set cert alt names from DER buffer */ -int SetAltNamesBuffer(Cert* cert, const byte* der, int derSz) -{ - return SetAltNamesFromCert(cert, der, derSz); -} - -/* Set cert dates from DER buffer */ -int SetDatesBuffer(Cert* cert, const byte* der, int derSz) -{ - return SetDatesFromCert(cert, der, derSz); -} - -#endif /* CYASSL_ALT_NAMES */ - -#endif /* CYASSL_CERT_GEN */ - - -#ifdef HAVE_ECC - -/* Der Encode r & s ints into out, outLen is (in/out) size */ -int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, mp_int* s) -{ - word32 idx = 0; - word32 rSz; /* encoding size */ - word32 sSz; - word32 headerSz = 4; /* 2*ASN_TAG + 2*LEN(ENUM) */ - - /* If the leading bit on the INTEGER is a 1, add a leading zero */ - int rLeadingZero = mp_leading_bit(r); - int sLeadingZero = mp_leading_bit(s); - int rLen = mp_unsigned_bin_size(r); /* big int size */ - int sLen = mp_unsigned_bin_size(s); - int err; - - if (*outLen < (rLen + rLeadingZero + sLen + sLeadingZero + - headerSz + 2)) /* SEQ_TAG + LEN(ENUM) */ - return BAD_FUNC_ARG; - - idx = SetSequence(rLen+rLeadingZero+sLen+sLeadingZero+headerSz, out); - - /* store r */ - out[idx++] = ASN_INTEGER; - rSz = SetLength(rLen + rLeadingZero, &out[idx]); - idx += rSz; - if (rLeadingZero) - out[idx++] = 0; - err = mp_to_unsigned_bin(r, &out[idx]); - if (err != MP_OKAY) return err; - idx += rLen; - - /* store s */ - out[idx++] = ASN_INTEGER; - sSz = SetLength(sLen + sLeadingZero, &out[idx]); - idx += sSz; - if (sLeadingZero) - out[idx++] = 0; - err = mp_to_unsigned_bin(s, &out[idx]); - if (err != MP_OKAY) return err; - idx += sLen; - - *outLen = idx; - - return 0; -} - - -/* Der Decode ECC-DSA Signautre, r & s stored as big ints */ -int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, mp_int* r, mp_int* s) -{ - word32 idx = 0; - int len = 0; - - if (GetSequence(sig, &idx, &len, sigLen) < 0) - return ASN_ECC_KEY_E; - - if ((word32)len > (sigLen - idx)) - return ASN_ECC_KEY_E; - - if (GetInt(r, sig, &idx, sigLen) < 0) - return ASN_ECC_KEY_E; - - if (GetInt(s, sig, &idx, sigLen) < 0) - return ASN_ECC_KEY_E; - - return 0; -} - - -int EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key, - word32 inSz) -{ - word32 oid = 0; - int version, length; - int privSz, pubSz; - byte b; - byte priv[ECC_MAXSIZE]; - byte pub[ECC_MAXSIZE * 2 + 1]; /* public key has two parts plus header */ - - if (input == NULL || inOutIdx == NULL || key == NULL || inSz == 0) - return BAD_FUNC_ARG; - - if (GetSequence(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(input, inOutIdx, &version) < 0) - return ASN_PARSE_E; - - b = input[*inOutIdx]; - *inOutIdx += 1; - - /* priv type */ - if (b != 4 && b != 6 && b != 7) - return ASN_PARSE_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - /* priv key */ - privSz = length; - XMEMCPY(priv, &input[*inOutIdx], privSz); - *inOutIdx += length; - - /* prefix 0, may have */ - b = input[*inOutIdx]; - if (b == ECC_PREFIX_0) { - *inOutIdx += 1; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - /* object id */ - b = input[*inOutIdx]; - *inOutIdx += 1; - - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - while(length--) { - oid += input[*inOutIdx]; - *inOutIdx += 1; - } - if (CheckCurve(oid) < 0) - return ECC_CURVE_OID_E; - } - - /* prefix 1 */ - b = input[*inOutIdx]; - *inOutIdx += 1; - if (b != ECC_PREFIX_1) - return ASN_ECC_KEY_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - - /* key header */ - b = input[*inOutIdx]; - *inOutIdx += 1; - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(input, inOutIdx, &length, inSz) < 0) - return ASN_PARSE_E; - b = input[*inOutIdx]; - *inOutIdx += 1; - if (b != 0x00) - return ASN_EXPECT_0_E; - - pubSz = length - 1; /* null prefix */ - XMEMCPY(pub, &input[*inOutIdx], pubSz); - - *inOutIdx += length; - - return ecc_import_private_key(priv, privSz, pub, pubSz, key); -} - -#endif /* HAVE_ECC */ - - -#if defined(HAVE_OCSP) || defined(HAVE_CRL) - -/* Get raw Date only, no processing, 0 on success */ -static int GetBasicDate(const byte* source, word32* idx, byte* date, - byte* format, int maxIdx) -{ - int length; - - CYASSL_ENTER("GetBasicDate"); - - *format = source[*idx]; - *idx += 1; - if (*format != ASN_UTC_TIME && *format != ASN_GENERALIZED_TIME) - return ASN_TIME_E; - - if (GetLength(source, idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - if (length > MAX_DATE_SIZE || length < MIN_DATE_SIZE) - return ASN_DATE_SZ_E; - - XMEMCPY(date, &source[*idx], length); - *idx += length; - - return 0; -} - -#endif - - -#ifdef HAVE_OCSP - -static int GetEnumerated(const byte* input, word32* inOutIdx, int *value) -{ - word32 idx = *inOutIdx; - word32 len; - - CYASSL_ENTER("GetEnumerated"); - - *value = 0; - - if (input[idx++] != ASN_ENUMERATED) - return ASN_PARSE_E; - - len = input[idx++]; - if (len > 4) - return ASN_PARSE_E; - - while (len--) { - *value = *value << 8 | input[idx++]; - } - - *inOutIdx = idx; - - return *value; -} - - -static int DecodeSingleResponse(byte* source, - word32* ioIndex, OcspResponse* resp, word32 size) -{ - word32 idx = *ioIndex, prevIndex, oid; - int length, wrapperSz; - CertStatus* cs = resp->status; - - CYASSL_ENTER("DecodeSingleResponse"); - - /* Outer wrapper of the SEQUENCE OF Single Responses. */ - if (GetSequence(source, &idx, &wrapperSz, size) < 0) - return ASN_PARSE_E; - - prevIndex = idx; - - /* When making a request, we only request one status on one certificate - * at a time. There should only be one SingleResponse */ - - /* Wrapper around the Single Response */ - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - /* Wrapper around the CertID */ - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - /* Skip the hash algorithm */ - if (GetAlgoId(source, &idx, &oid, size) < 0) - return ASN_PARSE_E; - /* Save reference to the hash of CN */ - if (source[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - resp->issuerHash = source + idx; - idx += length; - /* Save reference to the hash of the issuer public key */ - if (source[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - resp->issuerKeyHash = source + idx; - idx += length; - - /* Read the serial number, it is handled as a string, not as a - * proper number. Just XMEMCPY the data over, rather than load it - * as an mp_int. */ - if (source[idx++] != ASN_INTEGER) - return ASN_PARSE_E; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - if (length <= EXTERNAL_SERIAL_SIZE) - { - if (source[idx] == 0) - { - idx++; - length--; - } - XMEMCPY(cs->serial, source + idx, length); - cs->serialSz = length; - } - else - { - return ASN_GETINT_E; - } - idx += length; - - /* CertStatus */ - switch (source[idx++]) - { - case (ASN_CONTEXT_SPECIFIC | CERT_GOOD): - cs->status = CERT_GOOD; - idx++; - break; - case (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | CERT_REVOKED): - cs->status = CERT_REVOKED; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - idx += length; - break; - case (ASN_CONTEXT_SPECIFIC | CERT_UNKNOWN): - cs->status = CERT_UNKNOWN; - idx++; - break; - default: - return ASN_PARSE_E; - } - - if (GetBasicDate(source, &idx, cs->thisDate, - &cs->thisDateFormat, size) < 0) - return ASN_PARSE_E; - if (!XVALIDATE_DATE(cs->thisDate, cs->thisDateFormat, BEFORE)) - return ASN_BEFORE_DATE_E; - - /* The following items are optional. Only check for them if there is more - * unprocessed data in the singleResponse wrapper. */ - - if (((int)(idx - prevIndex) < wrapperSz) && - (source[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))) - { - idx++; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - if (GetBasicDate(source, &idx, cs->nextDate, - &cs->nextDateFormat, size) < 0) - return ASN_PARSE_E; - } - if (((int)(idx - prevIndex) < wrapperSz) && - (source[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1))) - { - idx++; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - idx += length; - } - - *ioIndex = idx; - - return 0; -} - -static int DecodeOcspRespExtensions(byte* source, - word32* ioIndex, OcspResponse* resp, word32 sz) -{ - word32 idx = *ioIndex; - int length; - int ext_bound; /* boundary index for the sequence of extensions */ - word32 oid; - - CYASSL_ENTER("DecodeOcspRespExtensions"); - - if (source[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) - return ASN_PARSE_E; - - if (GetLength(source, &idx, &length, sz) < 0) return ASN_PARSE_E; - - if (GetSequence(source, &idx, &length, sz) < 0) return ASN_PARSE_E; - - ext_bound = idx + length; - - while (idx < (word32)ext_bound) { - if (GetSequence(source, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: should be a SEQUENCE"); - return ASN_PARSE_E; - } - - oid = 0; - if (GetObjectId(source, &idx, &oid, sz) < 0) { - CYASSL_MSG("\tfail: OBJECT ID"); - return ASN_PARSE_E; - } - - /* check for critical flag */ - if (source[idx] == ASN_BOOLEAN) { - CYASSL_MSG("\tfound optional critical flag, moving past"); - idx += (ASN_BOOL_SIZE + 1); - } - - /* process the extension based on the OID */ - if (source[idx++] != ASN_OCTET_STRING) { - CYASSL_MSG("\tfail: should be an OCTET STRING"); - return ASN_PARSE_E; - } - - if (GetLength(source, &idx, &length, sz) < 0) { - CYASSL_MSG("\tfail: extension data length"); - return ASN_PARSE_E; - } - - if (oid == OCSP_NONCE_OID) { - resp->nonce = source + idx; - resp->nonceSz = length; - } - - idx += length; - } - - *ioIndex = idx; - return 0; -} - - -static int DecodeResponseData(byte* source, - word32* ioIndex, OcspResponse* resp, word32 size) -{ - word32 idx = *ioIndex, prev_idx; - int length; - int version; - word32 responderId = 0; - - CYASSL_ENTER("DecodeResponseData"); - - resp->response = source + idx; - prev_idx = idx; - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - resp->responseSz = length + idx - prev_idx; - - /* Get version. It is an EXPLICIT[0] DEFAULT(0) value. If this - * item isn't an EXPLICIT[0], then set version to zero and move - * onto the next item. - */ - if (source[idx] == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED)) - { - idx += 2; /* Eat the value and length */ - if (GetMyVersion(source, &idx, &version) < 0) - return ASN_PARSE_E; - } else - version = 0; - - responderId = source[idx++]; - if ((responderId == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 1)) || - (responderId == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 2))) - { - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - idx += length; - } - else - return ASN_PARSE_E; - - /* save pointer to the producedAt time */ - if (GetBasicDate(source, &idx, resp->producedDate, - &resp->producedDateFormat, size) < 0) - return ASN_PARSE_E; - - if (DecodeSingleResponse(source, &idx, resp, size) < 0) - return ASN_PARSE_E; - - if (DecodeOcspRespExtensions(source, &idx, resp, size) < 0) - return ASN_PARSE_E; - - *ioIndex = idx; - return 0; -} - - -static int DecodeCerts(byte* source, - word32* ioIndex, OcspResponse* resp, word32 size) -{ - word32 idx = *ioIndex; - - CYASSL_ENTER("DecodeCerts"); - - if (source[idx++] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC)) - { - int length; - - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - resp->cert = source + idx; - resp->certSz = length; - - idx += length; - } - *ioIndex = idx; - return 0; -} - -static int DecodeBasicOcspResponse(byte* source, - word32* ioIndex, OcspResponse* resp, word32 size) -{ - int length; - word32 idx = *ioIndex; - word32 end_index; - - CYASSL_ENTER("DecodeBasicOcspResponse"); - - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - if (idx + length > size) - return ASN_INPUT_E; - end_index = idx + length; - - if (DecodeResponseData(source, &idx, resp, size) < 0) - return ASN_PARSE_E; - - /* Get the signature algorithm */ - if (GetAlgoId(source, &idx, &resp->sigOID, size) < 0) - return ASN_PARSE_E; - - /* Obtain pointer to the start of the signature, and save the size */ - if (source[idx++] == ASN_BIT_STRING) - { - int sigLength = 0; - if (GetLength(source, &idx, &sigLength, size) < 0) - return ASN_PARSE_E; - resp->sigSz = sigLength; - resp->sig = source + idx; - idx += sigLength; - } - - /* - * Check the length of the BasicOcspResponse against the current index to - * see if there are certificates, they are optional. - */ - if (idx < end_index) - { - DecodedCert cert; - int ret; - - if (DecodeCerts(source, &idx, resp, size) < 0) - return ASN_PARSE_E; - - InitDecodedCert(&cert, resp->cert, resp->certSz, 0); - ret = ParseCertRelative(&cert, CA_TYPE, NO_VERIFY, 0); - if (ret < 0) - return ret; - - ret = ConfirmSignature(resp->response, resp->responseSz, - cert.publicKey, cert.pubKeySize, cert.keyOID, - resp->sig, resp->sigSz, resp->sigOID, NULL); - FreeDecodedCert(&cert); - - if (ret == 0) - { - CYASSL_MSG("\tOCSP Confirm signature failed"); - return ASN_OCSP_CONFIRM_E; - } - } - - *ioIndex = idx; - return 0; -} - - -void InitOcspResponse(OcspResponse* resp, CertStatus* status, - byte* source, word32 inSz) -{ - CYASSL_ENTER("InitOcspResponse"); - - resp->responseStatus = -1; - resp->response = NULL; - resp->responseSz = 0; - resp->producedDateFormat = 0; - resp->issuerHash = NULL; - resp->issuerKeyHash = NULL; - resp->sig = NULL; - resp->sigSz = 0; - resp->sigOID = 0; - resp->status = status; - resp->nonce = NULL; - resp->nonceSz = 0; - resp->source = source; - resp->maxIdx = inSz; -} - - -int OcspResponseDecode(OcspResponse* resp) -{ - int length = 0; - word32 idx = 0; - byte* source = resp->source; - word32 size = resp->maxIdx; - word32 oid; - - CYASSL_ENTER("OcspResponseDecode"); - - /* peel the outer SEQUENCE wrapper */ - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - /* First get the responseStatus, an ENUMERATED */ - if (GetEnumerated(source, &idx, &resp->responseStatus) < 0) - return ASN_PARSE_E; - - if (resp->responseStatus != OCSP_SUCCESSFUL) - return 0; - - /* Next is an EXPLICIT record called ResponseBytes, OPTIONAL */ - if (idx >= size) - return ASN_INPUT_E; - if (source[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC)) - return ASN_PARSE_E; - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - /* Get the responseBytes SEQUENCE */ - if (GetSequence(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - /* Check ObjectID for the resposeBytes */ - if (GetObjectId(source, &idx, &oid, size) < 0) - return ASN_PARSE_E; - if (oid != OCSP_BASIC_OID) - return ASN_PARSE_E; - if (source[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(source, &idx, &length, size) < 0) - return ASN_PARSE_E; - - if (DecodeBasicOcspResponse(source, &idx, resp, size) < 0) - return ASN_PARSE_E; - - return 0; -} - - -static word32 SetOcspReqExtensions(word32 extSz, byte* output, - const byte* nonce, word32 nonceSz) -{ - static const byte NonceObjId[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, - 0x30, 0x01, 0x02 }; - byte seqArray[5][MAX_SEQ_SZ]; - word32 seqSz[5], totalSz; - - CYASSL_ENTER("SetOcspReqExtensions"); - - if (nonce == NULL || nonceSz == 0) return 0; - - seqArray[0][0] = ASN_OCTET_STRING; - seqSz[0] = 1 + SetLength(nonceSz, &seqArray[0][1]); - - seqArray[1][0] = ASN_OBJECT_ID; - seqSz[1] = 1 + SetLength(sizeof(NonceObjId), &seqArray[1][1]); - - totalSz = seqSz[0] + seqSz[1] + nonceSz + (word32)sizeof(NonceObjId); - - seqSz[2] = SetSequence(totalSz, seqArray[2]); - totalSz += seqSz[2]; - - seqSz[3] = SetSequence(totalSz, seqArray[3]); - totalSz += seqSz[3]; - - seqArray[4][0] = (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 2); - seqSz[4] = 1 + SetLength(totalSz, &seqArray[4][1]); - totalSz += seqSz[4]; - - if (totalSz < extSz) - { - totalSz = 0; - XMEMCPY(output + totalSz, seqArray[4], seqSz[4]); - totalSz += seqSz[4]; - XMEMCPY(output + totalSz, seqArray[3], seqSz[3]); - totalSz += seqSz[3]; - XMEMCPY(output + totalSz, seqArray[2], seqSz[2]); - totalSz += seqSz[2]; - XMEMCPY(output + totalSz, seqArray[1], seqSz[1]); - totalSz += seqSz[1]; - XMEMCPY(output + totalSz, NonceObjId, sizeof(NonceObjId)); - totalSz += (word32)sizeof(NonceObjId); - XMEMCPY(output + totalSz, seqArray[0], seqSz[0]); - totalSz += seqSz[0]; - XMEMCPY(output + totalSz, nonce, nonceSz); - totalSz += nonceSz; - } - - return totalSz; -} - - -int EncodeOcspRequest(OcspRequest* req) -{ - byte seqArray[5][MAX_SEQ_SZ]; - /* The ASN.1 of the OCSP Request is an onion of sequences */ - byte algoArray[MAX_ALGO_SZ]; - byte issuerArray[MAX_ENCODED_DIG_SZ]; - byte issuerKeyArray[MAX_ENCODED_DIG_SZ]; - byte snArray[MAX_SN_SZ]; - byte extArray[MAX_OCSP_EXT_SZ]; - byte* output = req->dest; - word32 seqSz[5], algoSz, issuerSz, issuerKeySz, snSz, extSz, totalSz; - int i; - - CYASSL_ENTER("EncodeOcspRequest"); - - algoSz = SetAlgoID(SHAh, algoArray, hashType, 0); - - req->issuerHash = req->cert->issuerHash; - issuerSz = SetDigest(req->cert->issuerHash, SHA_SIZE, issuerArray); - - req->issuerKeyHash = req->cert->issuerKeyHash; - issuerKeySz = SetDigest(req->cert->issuerKeyHash, SHA_SIZE, issuerKeyArray); - - req->serial = req->cert->serial; - req->serialSz = req->cert->serialSz; - snSz = SetSerialNumber(req->cert->serial, req->cert->serialSz, snArray); - - extSz = 0; - if (req->useNonce) { - RNG rng; - if (InitRng(&rng) != 0) { - CYASSL_MSG("\tCannot initialize RNG. Skipping the OSCP Nonce."); - } else { - if (RNG_GenerateBlock(&rng, req->nonce, MAX_OCSP_NONCE_SZ) != 0) - CYASSL_MSG("\tCannot run RNG. Skipping the OSCP Nonce."); - else { - req->nonceSz = MAX_OCSP_NONCE_SZ; - extSz = SetOcspReqExtensions(MAX_OCSP_EXT_SZ, extArray, - req->nonce, req->nonceSz); - } - } - } - - totalSz = algoSz + issuerSz + issuerKeySz + snSz; - - for (i = 4; i >= 0; i--) { - seqSz[i] = SetSequence(totalSz, seqArray[i]); - totalSz += seqSz[i]; - if (i == 2) totalSz += extSz; - } - totalSz = 0; - for (i = 0; i < 5; i++) { - XMEMCPY(output + totalSz, seqArray[i], seqSz[i]); - totalSz += seqSz[i]; - } - XMEMCPY(output + totalSz, algoArray, algoSz); - totalSz += algoSz; - XMEMCPY(output + totalSz, issuerArray, issuerSz); - totalSz += issuerSz; - XMEMCPY(output + totalSz, issuerKeyArray, issuerKeySz); - totalSz += issuerKeySz; - XMEMCPY(output + totalSz, snArray, snSz); - totalSz += snSz; - if (extSz != 0) { - XMEMCPY(output + totalSz, extArray, extSz); - totalSz += extSz; - } - - return totalSz; -} - - -void InitOcspRequest(OcspRequest* req, DecodedCert* cert, byte useNonce, - byte* dest, word32 destSz) -{ - CYASSL_ENTER("InitOcspRequest"); - - req->cert = cert; - req->useNonce = useNonce; - req->nonceSz = 0; - req->issuerHash = NULL; - req->issuerKeyHash = NULL; - req->serial = NULL; - req->dest = dest; - req->destSz = destSz; -} - - -int CompareOcspReqResp(OcspRequest* req, OcspResponse* resp) -{ - int cmp; - - CYASSL_ENTER("CompareOcspReqResp"); - - if (req == NULL) - { - CYASSL_MSG("\tReq missing"); - return -1; - } - - if (resp == NULL) - { - CYASSL_MSG("\tResp missing"); - return 1; - } - - /* Nonces are not critical. The responder may not necessarily add - * the nonce to the response. */ - if (req->useNonce && resp->nonceSz != 0) { - cmp = req->nonceSz - resp->nonceSz; - if (cmp != 0) - { - CYASSL_MSG("\tnonceSz mismatch"); - return cmp; - } - - cmp = XMEMCMP(req->nonce, resp->nonce, req->nonceSz); - if (cmp != 0) - { - CYASSL_MSG("\tnonce mismatch"); - return cmp; - } - } - - cmp = XMEMCMP(req->issuerHash, resp->issuerHash, SHA_DIGEST_SIZE); - if (cmp != 0) - { - CYASSL_MSG("\tissuerHash mismatch"); - return cmp; - } - - cmp = XMEMCMP(req->issuerKeyHash, resp->issuerKeyHash, SHA_DIGEST_SIZE); - if (cmp != 0) - { - CYASSL_MSG("\tissuerKeyHash mismatch"); - return cmp; - } - - cmp = req->serialSz - resp->status->serialSz; - if (cmp != 0) - { - CYASSL_MSG("\tserialSz mismatch"); - return cmp; - } - - cmp = XMEMCMP(req->serial, resp->status->serial, req->serialSz); - if (cmp != 0) - { - CYASSL_MSG("\tserial mismatch"); - return cmp; - } - - return 0; -} - -#endif - - -/* store SHA1 hash of NAME */ -CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash, - int maxIdx) -{ - Sha sha; - int length; /* length of all distinguished names */ - int ret = 0; - word32 dummy; - - CYASSL_ENTER("GetNameHash"); - - if (source[*idx] == ASN_OBJECT_ID) { - CYASSL_MSG("Trying optional prefix..."); - - if (GetLength(source, idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - *idx += length; - CYASSL_MSG("Got optional prefix"); - } - - /* For OCSP, RFC2560 section 4.1.1 states the issuer hash should be - * calculated over the entire DER encoding of the Name field, including - * the tag and length. */ - dummy = *idx; - if (GetSequence(source, idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, source + dummy, length + *idx - dummy); - ShaFinal(&sha, hash); - - *idx += length; - - return 0; -} - - -#ifdef HAVE_CRL - -/* initialize decoded CRL */ -void InitDecodedCRL(DecodedCRL* dcrl) -{ - CYASSL_MSG("InitDecodedCRL"); - - dcrl->certBegin = 0; - dcrl->sigIndex = 0; - dcrl->sigLength = 0; - dcrl->signatureOID = 0; - dcrl->certs = NULL; - dcrl->totalCerts = 0; -} - - -/* free decoded CRL resources */ -void FreeDecodedCRL(DecodedCRL* dcrl) -{ - RevokedCert* tmp = dcrl->certs; - - CYASSL_MSG("FreeDecodedCRL"); - - while(tmp) { - RevokedCert* next = tmp->next; - XFREE(tmp, NULL, DYNAMIC_TYPE_REVOKED); - tmp = next; - } -} - - -/* Get Revoked Cert list, 0 on success */ -static int GetRevoked(const byte* buff, word32* idx, DecodedCRL* dcrl, - int maxIdx) -{ - int len; - word32 end; - byte b; - RevokedCert* rc; - - CYASSL_ENTER("GetRevoked"); - - if (GetSequence(buff, idx, &len, maxIdx) < 0) - return ASN_PARSE_E; - - end = *idx + len; - - /* get serial number */ - b = buff[*idx]; - *idx += 1; - - if (b != ASN_INTEGER) { - CYASSL_MSG("Expecting Integer"); - return ASN_PARSE_E; - } - - if (GetLength(buff, idx, &len, maxIdx) < 0) - return ASN_PARSE_E; - - if (len > EXTERNAL_SERIAL_SIZE) { - CYASSL_MSG("Serial Size too big"); - return ASN_PARSE_E; - } - - rc = (RevokedCert*)XMALLOC(sizeof(RevokedCert), NULL, DYNAMIC_TYPE_CRL); - if (rc == NULL) { - CYASSL_MSG("Alloc Revoked Cert failed"); - return MEMORY_E; - } - - XMEMCPY(rc->serialNumber, &buff[*idx], len); - rc->serialSz = len; - - /* add to list */ - rc->next = dcrl->certs; - dcrl->certs = rc; - dcrl->totalCerts++; - - *idx += len; - - /* get date */ - b = buff[*idx]; - *idx += 1; - - if (b != ASN_UTC_TIME && b != ASN_GENERALIZED_TIME) { - CYASSL_MSG("Expecting Date"); - return ASN_PARSE_E; - } - - if (GetLength(buff, idx, &len, maxIdx) < 0) - return ASN_PARSE_E; - - /* skip for now */ - *idx += len; - - if (*idx != end) /* skip extensions */ - *idx = end; - - return 0; -} - - -/* Get CRL Signature, 0 on success */ -static int GetCRL_Signature(const byte* source, word32* idx, DecodedCRL* dcrl, - int maxIdx) -{ - int length; - byte b; - - CYASSL_ENTER("GetCRL_Signature"); - - b = source[*idx]; - *idx += 1; - if (b != ASN_BIT_STRING) - return ASN_BITSTR_E; - - if (GetLength(source, idx, &length, maxIdx) < 0) - return ASN_PARSE_E; - - dcrl->sigLength = length; - - b = source[*idx]; - *idx += 1; - if (b != 0x00) - return ASN_EXPECT_0_E; - - dcrl->sigLength--; - dcrl->signature = (byte*)&source[*idx]; - - *idx += dcrl->sigLength; - - return 0; -} - - -/* prase crl buffer into decoded state, 0 on success */ -int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm) -{ - int version, len; - word32 oid, idx = 0; - Signer* ca = NULL; - - CYASSL_MSG("ParseCRL"); - - /* raw crl hash */ - /* hash here if needed for optimized comparisons - * Sha sha; - * InitSha(&sha); - * ShaUpdate(&sha, buff, sz); - * ShaFinal(&sha, dcrl->crlHash); */ - - if (GetSequence(buff, &idx, &len, sz) < 0) - return ASN_PARSE_E; - - dcrl->certBegin = idx; - - if (GetSequence(buff, &idx, &len, sz) < 0) - return ASN_PARSE_E; - dcrl->sigIndex = len + idx; - - /* may have version */ - if (buff[idx] == ASN_INTEGER) { - if (GetMyVersion(buff, &idx, &version) < 0) - return ASN_PARSE_E; - } - - if (GetAlgoId(buff, &idx, &oid, sz) < 0) - return ASN_PARSE_E; - - if (GetNameHash(buff, &idx, dcrl->issuerHash, sz) < 0) - return ASN_PARSE_E; - - if (GetBasicDate(buff, &idx, dcrl->lastDate, &dcrl->lastDateFormat, sz) < 0) - return ASN_PARSE_E; - - if (GetBasicDate(buff, &idx, dcrl->nextDate, &dcrl->nextDateFormat, sz) < 0) - return ASN_PARSE_E; - - if (!XVALIDATE_DATE(dcrl->nextDate, dcrl->nextDateFormat, AFTER)) { - CYASSL_MSG("CRL after date is no longer valid"); - return ASN_AFTER_DATE_E; - } - - if (idx != dcrl->sigIndex && buff[idx] != CRL_EXTENSIONS) { - if (GetSequence(buff, &idx, &len, sz) < 0) - return ASN_PARSE_E; - - len += idx; - - while (idx < (word32)len) { - if (GetRevoked(buff, &idx, dcrl, sz) < 0) - return ASN_PARSE_E; - } - } - - if (idx != dcrl->sigIndex) - idx = dcrl->sigIndex; /* skip extensions */ - - if (GetAlgoId(buff, &idx, &dcrl->signatureOID, sz) < 0) - return ASN_PARSE_E; - - if (GetCRL_Signature(buff, &idx, dcrl, sz) < 0) - return ASN_PARSE_E; - - /* openssl doesn't add skid by default for CRLs cause firefox chokes - we're not assuming it's available yet */ - #if !defined(NO_SKID) && defined(CRL_SKID_READY) - if (dcrl->extAuthKeyIdSet) - ca = GetCA(cm, dcrl->extAuthKeyId); - if (ca == NULL) - ca = GetCAByName(cm, dcrl->issuerHash); - #else /* NO_SKID */ - ca = GetCA(cm, dcrl->issuerHash); - #endif /* NO_SKID */ - CYASSL_MSG("About to verify CRL signature"); - - if (ca) { - CYASSL_MSG("Found CRL issuer CA"); - /* try to confirm/verify signature */ - #ifndef IGNORE_KEY_EXTENSIONS - if ((ca->keyUsage & KEYUSE_CRL_SIGN) == 0) { - CYASSL_MSG("CA cannot sign CRLs"); - return ASN_CRL_NO_SIGNER_E; - } - #endif /* IGNORE_KEY_EXTENSIONS */ - if (!ConfirmSignature(buff + dcrl->certBegin, - dcrl->sigIndex - dcrl->certBegin, - ca->publicKey, ca->pubKeySize, ca->keyOID, - dcrl->signature, dcrl->sigLength, dcrl->signatureOID, NULL)) { - CYASSL_MSG("CRL Confirm signature failed"); - return ASN_CRL_CONFIRM_E; - } - } - else { - CYASSL_MSG("Did NOT find CRL issuer CA"); - return ASN_CRL_NO_SIGNER_E; - } - - return 0; -} - -#endif /* HAVE_CRL */ -#endif - -#ifdef CYASSL_SEP - - - -#endif /* CYASSL_SEP */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c b/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c deleted file mode 100644 index a9d1753a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/blake2b.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Written in 2012 by Samuel Neves - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . -*/ -/* blake2b.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_BLAKE2 - -#include -#include - - -static const word64 blake2b_IV[8] = -{ - 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, - 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, - 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, - 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL -}; - -static const byte blake2b_sigma[12][16] = -{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , - { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , - { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , - { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , - { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , - { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , - { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , - { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , - { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , - { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , - { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } -}; - - -static INLINE int blake2b_set_lastnode( blake2b_state *S ) -{ - S->f[1] = ~0ULL; - return 0; -} - -/* Some helper functions, not necessarily useful */ -static INLINE int blake2b_set_lastblock( blake2b_state *S ) -{ - if( S->last_node ) blake2b_set_lastnode( S ); - - S->f[0] = ~0ULL; - return 0; -} - -static INLINE int blake2b_increment_counter( blake2b_state *S, const word64 - inc ) -{ - S->t[0] += inc; - S->t[1] += ( S->t[0] < inc ); - return 0; -} - -static INLINE int blake2b_init0( blake2b_state *S ) -{ - int i; - XMEMSET( S, 0, sizeof( blake2b_state ) ); - - for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i]; - - return 0; -} - -/* init xors IV with input parameter block */ -int blake2b_init_param( blake2b_state *S, const blake2b_param *P ) -{ - word32 i; - blake2b_init0( S ); - byte *p = ( byte * )( P ); - - /* IV XOR ParamBlock */ - for( i = 0; i < 8; ++i ) - S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); - - return 0; -} - - - -int blake2b_init( blake2b_state *S, const byte outlen ) -{ - blake2b_param P[1]; - - if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; - - P->digest_length = outlen; - P->key_length = 0; - P->fanout = 1; - P->depth = 1; - store32( &P->leaf_length, 0 ); - store64( &P->node_offset, 0 ); - P->node_depth = 0; - P->inner_length = 0; - XMEMSET( P->reserved, 0, sizeof( P->reserved ) ); - XMEMSET( P->salt, 0, sizeof( P->salt ) ); - XMEMSET( P->personal, 0, sizeof( P->personal ) ); - return blake2b_init_param( S, P ); -} - - -int blake2b_init_key( blake2b_state *S, const byte outlen, const void *key, - const byte keylen ) -{ - blake2b_param P[1]; - - if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; - - if ( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1; - - P->digest_length = outlen; - P->key_length = keylen; - P->fanout = 1; - P->depth = 1; - store32( &P->leaf_length, 0 ); - store64( &P->node_offset, 0 ); - P->node_depth = 0; - P->inner_length = 0; - XMEMSET( P->reserved, 0, sizeof( P->reserved ) ); - XMEMSET( P->salt, 0, sizeof( P->salt ) ); - XMEMSET( P->personal, 0, sizeof( P->personal ) ); - - if( blake2b_init_param( S, P ) < 0 ) return -1; - - { -#ifdef CYASSL_SMALL_STACK - byte* block; - - block = (byte*)XMALLOC(BLAKE2B_BLOCKBYTES, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - if ( block == NULL ) return -1; -#else - byte block[BLAKE2B_BLOCKBYTES]; -#endif - - XMEMSET( block, 0, BLAKE2B_BLOCKBYTES ); - XMEMCPY( block, key, keylen ); - blake2b_update( S, block, BLAKE2B_BLOCKBYTES ); - secure_zero_memory( block, BLAKE2B_BLOCKBYTES ); /* Burn the key from */ - /* memory */ - -#ifdef CYASSL_SMALL_STACK - XFREE(block, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - } - return 0; -} - -static int blake2b_compress( blake2b_state *S, - const byte block[BLAKE2B_BLOCKBYTES] ) -{ - int i; - -#ifdef CYASSL_SMALL_STACK - word64* m; - word64* v; - - m = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - if ( m == NULL ) return -1; - - v = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - if ( v == NULL ) - { - XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return -1; - } -#else - word64 m[16]; - word64 v[16]; -#endif - - for( i = 0; i < 16; ++i ) - m[i] = load64( block + i * sizeof( m[i] ) ); - - for( i = 0; i < 8; ++i ) - v[i] = S->h[i]; - - v[ 8] = blake2b_IV[0]; - v[ 9] = blake2b_IV[1]; - v[10] = blake2b_IV[2]; - v[11] = blake2b_IV[3]; - v[12] = S->t[0] ^ blake2b_IV[4]; - v[13] = S->t[1] ^ blake2b_IV[5]; - v[14] = S->f[0] ^ blake2b_IV[6]; - v[15] = S->f[1] ^ blake2b_IV[7]; -#define G(r,i,a,b,c,d) \ - do { \ - a = a + b + m[blake2b_sigma[r][2*i+0]]; \ - d = rotr64(d ^ a, 32); \ - c = c + d; \ - b = rotr64(b ^ c, 24); \ - a = a + b + m[blake2b_sigma[r][2*i+1]]; \ - d = rotr64(d ^ a, 16); \ - c = c + d; \ - b = rotr64(b ^ c, 63); \ - } while(0) -#define ROUND(r) \ - do { \ - G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ - G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ - G(r,2,v[ 2],v[ 6],v[10],v[14]); \ - G(r,3,v[ 3],v[ 7],v[11],v[15]); \ - G(r,4,v[ 0],v[ 5],v[10],v[15]); \ - G(r,5,v[ 1],v[ 6],v[11],v[12]); \ - G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ - G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ - } while(0) - ROUND( 0 ); - ROUND( 1 ); - ROUND( 2 ); - ROUND( 3 ); - ROUND( 4 ); - ROUND( 5 ); - ROUND( 6 ); - ROUND( 7 ); - ROUND( 8 ); - ROUND( 9 ); - ROUND( 10 ); - ROUND( 11 ); - - for( i = 0; i < 8; ++i ) - S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; - -#undef G -#undef ROUND - -#ifdef CYASSL_SMALL_STACK - XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(v, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - -/* inlen now in bytes */ -int blake2b_update( blake2b_state *S, const byte *in, word64 inlen ) -{ - while( inlen > 0 ) - { - word64 left = S->buflen; - word64 fill = 2 * BLAKE2B_BLOCKBYTES - left; - - if( inlen > fill ) - { - XMEMCPY( S->buf + left, in, (word)fill ); /* Fill buffer */ - S->buflen += fill; - blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); - - if ( blake2b_compress( S, S->buf ) < 0 ) return -1; /* Compress */ - - XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); - /* Shift buffer left */ - S->buflen -= BLAKE2B_BLOCKBYTES; - in += fill; - inlen -= fill; - } - else /* inlen <= fill */ - { - XMEMCPY( S->buf + left, in, (word)inlen ); - S->buflen += inlen; /* Be lazy, do not compress */ - in += inlen; - inlen -= inlen; - } - } - - return 0; -} - -/* Is this correct? */ -int blake2b_final( blake2b_state *S, byte *out, byte outlen ) -{ - byte buffer[BLAKE2B_OUTBYTES]; - int i; - - if( S->buflen > BLAKE2B_BLOCKBYTES ) - { - blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); - - if ( blake2b_compress( S, S->buf ) < 0 ) return -1; - - S->buflen -= BLAKE2B_BLOCKBYTES; - XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (word)S->buflen ); - } - - blake2b_increment_counter( S, S->buflen ); - blake2b_set_lastblock( S ); - XMEMSET( S->buf + S->buflen, 0, (word)(2 * BLAKE2B_BLOCKBYTES - S->buflen) ); - /* Padding */ - if ( blake2b_compress( S, S->buf ) < 0 ) return -1; - - for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ - store64( buffer + sizeof( S->h[i] ) * i, S->h[i] ); - - XMEMCPY( out, buffer, outlen ); - return 0; -} - -/* inlen, at least, should be word64. Others can be size_t. */ -int blake2b( byte *out, const void *in, const void *key, const byte outlen, - const word64 inlen, byte keylen ) -{ - blake2b_state S[1]; - - /* Verify parameters */ - if ( NULL == in ) return -1; - - if ( NULL == out ) return -1; - - if( NULL == key ) keylen = 0; - - if( keylen > 0 ) - { - if( blake2b_init_key( S, outlen, key, keylen ) < 0 ) return -1; - } - else - { - if( blake2b_init( S, outlen ) < 0 ) return -1; - } - - if ( blake2b_update( S, ( byte * )in, inlen ) < 0) return -1; - - return blake2b_final( S, out, outlen ); -} - -#if defined(BLAKE2B_SELFTEST) -#include -#include "blake2-kat.h" -int main( int argc, char **argv ) -{ - byte key[BLAKE2B_KEYBYTES]; - byte buf[KAT_LENGTH]; - - for( word32 i = 0; i < BLAKE2B_KEYBYTES; ++i ) - key[i] = ( byte )i; - - for( word32 i = 0; i < KAT_LENGTH; ++i ) - buf[i] = ( byte )i; - - for( word32 i = 0; i < KAT_LENGTH; ++i ) - { - byte hash[BLAKE2B_OUTBYTES]; - if ( blake2b( hash, buf, key, BLAKE2B_OUTBYTES, i, BLAKE2B_KEYBYTES ) < 0 ) - { - puts( "error" ); - return -1; - } - - if( 0 != memcmp( hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES ) ) - { - puts( "error" ); - return -1; - } - } - - puts( "ok" ); - return 0; -} -#endif - - -/* CTaoCrypt API */ - -/* Init Blake2b digest, track size incase final doesn't want to "remember" */ -int InitBlake2b(Blake2b* b2b, word32 digestSz) -{ - b2b->digestSz = digestSz; - - return blake2b_init(b2b->S, (byte)digestSz); -} - - -/* Blake2b Update */ -int Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz) -{ - return blake2b_update(b2b->S, data, sz); -} - - -/* Blake2b Final, if pass in zero size we use init digestSz */ -int Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz) -{ - word32 sz = requestSz ? requestSz : b2b->digestSz; - - return blake2b_final(b2b->S, final, (byte)sz); -} - - -/* end CTaoCrypt API */ - -#endif /* HAVE_BLAKE2 */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c b/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c deleted file mode 100644 index eaed4c90..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/camellia.c +++ /dev/null @@ -1,1621 +0,0 @@ -/* camellia.c ver 1.2.0 - * - * Copyright (c) 2006,2007 - * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer as - * the first lines of this file unmodified. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* camellia.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* - * Algorithm Specification - * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_CAMELLIA - -#include -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -/* u32 must be 32bit word */ -typedef unsigned int u32; -typedef unsigned char u8; - -/* key constants */ - -#define CAMELLIA_SIGMA1L ((u32)0xA09E667FL) -#define CAMELLIA_SIGMA1R ((u32)0x3BCC908BL) -#define CAMELLIA_SIGMA2L ((u32)0xB67AE858L) -#define CAMELLIA_SIGMA2R ((u32)0x4CAA73B2L) -#define CAMELLIA_SIGMA3L ((u32)0xC6EF372FL) -#define CAMELLIA_SIGMA3R ((u32)0xE94F82BEL) -#define CAMELLIA_SIGMA4L ((u32)0x54FF53A5L) -#define CAMELLIA_SIGMA4R ((u32)0xF1D36F1CL) -#define CAMELLIA_SIGMA5L ((u32)0x10E527FAL) -#define CAMELLIA_SIGMA5R ((u32)0xDE682D1DL) -#define CAMELLIA_SIGMA6L ((u32)0xB05688C2L) -#define CAMELLIA_SIGMA6R ((u32)0xB3E6C1FDL) - -/* - * macros - */ - - -#if defined(_MSC_VER) - -# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) -# define GETU32(p) SWAP(*((u32 *)(p))) -# define PUTU32(ct, st) {*((u32 *)(ct)) = SWAP((st));} - -#else /* not MS-VC */ - -# define GETU32(pt) \ - (((u32)(pt)[0] << 24) \ - ^ ((u32)(pt)[1] << 16) \ - ^ ((u32)(pt)[2] << 8) \ - ^ ((u32)(pt)[3])) - -# define PUTU32(ct, st) { \ - (ct)[0] = (u8)((st) >> 24); \ - (ct)[1] = (u8)((st) >> 16); \ - (ct)[2] = (u8)((st) >> 8); \ - (ct)[3] = (u8)(st); } - -#endif - -#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2]) -#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1]) - -/* rotation right shift 1byte */ -#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24)) -/* rotation left shift 1bit */ -#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31)) -/* rotation left shift 1byte */ -#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24)) - -#define CAMELLIA_ROLDQ(ll, lr, rl, rr, w0, w1, bits) \ - do { \ - w0 = ll; \ - ll = (ll << bits) + (lr >> (32 - bits)); \ - lr = (lr << bits) + (rl >> (32 - bits)); \ - rl = (rl << bits) + (rr >> (32 - bits)); \ - rr = (rr << bits) + (w0 >> (32 - bits)); \ - } while(0) - -#define CAMELLIA_ROLDQo32(ll, lr, rl, rr, w0, w1, bits) \ - do { \ - w0 = ll; \ - w1 = lr; \ - ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \ - lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \ - rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \ - rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \ - } while(0) - -#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)]) -#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)]) -#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)]) -#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)]) - -#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ - do { \ - il = xl ^ kl; \ - ir = xr ^ kr; \ - t0 = il >> 16; \ - t1 = ir >> 16; \ - yl = CAMELLIA_SP1110(ir & 0xff) \ - ^ CAMELLIA_SP0222((t1 >> 8) & 0xff) \ - ^ CAMELLIA_SP3033(t1 & 0xff) \ - ^ CAMELLIA_SP4404((ir >> 8) & 0xff); \ - yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) \ - ^ CAMELLIA_SP0222(t0 & 0xff) \ - ^ CAMELLIA_SP3033((il >> 8) & 0xff) \ - ^ CAMELLIA_SP4404(il & 0xff); \ - yl ^= yr; \ - yr = CAMELLIA_RR8(yr); \ - yr ^= yl; \ - } while(0) - - -/* - * for speed up - * - */ -#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) \ - do { \ - t0 = kll; \ - t0 &= ll; \ - lr ^= CAMELLIA_RL1(t0); \ - t1 = klr; \ - t1 |= lr; \ - ll ^= t1; \ - \ - t2 = krr; \ - t2 |= rr; \ - rl ^= t2; \ - t3 = krl; \ - t3 &= rl; \ - rr ^= CAMELLIA_RL1(t3); \ - } while(0) - -#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ - do { \ - ir = CAMELLIA_SP1110(xr & 0xff) \ - ^ CAMELLIA_SP0222((xr >> 24) & 0xff) \ - ^ CAMELLIA_SP3033((xr >> 16) & 0xff) \ - ^ CAMELLIA_SP4404((xr >> 8) & 0xff); \ - il = CAMELLIA_SP1110((xl >> 24) & 0xff) \ - ^ CAMELLIA_SP0222((xl >> 16) & 0xff) \ - ^ CAMELLIA_SP3033((xl >> 8) & 0xff) \ - ^ CAMELLIA_SP4404(xl & 0xff); \ - il ^= kl; \ - ir ^= kr; \ - ir ^= il; \ - il = CAMELLIA_RR8(il); \ - il ^= ir; \ - yl ^= ir; \ - yr ^= il; \ - } while(0) - - -static const u32 camellia_sp1110[256] = { - 0x70707000,0x82828200,0x2c2c2c00,0xececec00, - 0xb3b3b300,0x27272700,0xc0c0c000,0xe5e5e500, - 0xe4e4e400,0x85858500,0x57575700,0x35353500, - 0xeaeaea00,0x0c0c0c00,0xaeaeae00,0x41414100, - 0x23232300,0xefefef00,0x6b6b6b00,0x93939300, - 0x45454500,0x19191900,0xa5a5a500,0x21212100, - 0xededed00,0x0e0e0e00,0x4f4f4f00,0x4e4e4e00, - 0x1d1d1d00,0x65656500,0x92929200,0xbdbdbd00, - 0x86868600,0xb8b8b800,0xafafaf00,0x8f8f8f00, - 0x7c7c7c00,0xebebeb00,0x1f1f1f00,0xcecece00, - 0x3e3e3e00,0x30303000,0xdcdcdc00,0x5f5f5f00, - 0x5e5e5e00,0xc5c5c500,0x0b0b0b00,0x1a1a1a00, - 0xa6a6a600,0xe1e1e100,0x39393900,0xcacaca00, - 0xd5d5d500,0x47474700,0x5d5d5d00,0x3d3d3d00, - 0xd9d9d900,0x01010100,0x5a5a5a00,0xd6d6d600, - 0x51515100,0x56565600,0x6c6c6c00,0x4d4d4d00, - 0x8b8b8b00,0x0d0d0d00,0x9a9a9a00,0x66666600, - 0xfbfbfb00,0xcccccc00,0xb0b0b000,0x2d2d2d00, - 0x74747400,0x12121200,0x2b2b2b00,0x20202000, - 0xf0f0f000,0xb1b1b100,0x84848400,0x99999900, - 0xdfdfdf00,0x4c4c4c00,0xcbcbcb00,0xc2c2c200, - 0x34343400,0x7e7e7e00,0x76767600,0x05050500, - 0x6d6d6d00,0xb7b7b700,0xa9a9a900,0x31313100, - 0xd1d1d100,0x17171700,0x04040400,0xd7d7d700, - 0x14141400,0x58585800,0x3a3a3a00,0x61616100, - 0xdedede00,0x1b1b1b00,0x11111100,0x1c1c1c00, - 0x32323200,0x0f0f0f00,0x9c9c9c00,0x16161600, - 0x53535300,0x18181800,0xf2f2f200,0x22222200, - 0xfefefe00,0x44444400,0xcfcfcf00,0xb2b2b200, - 0xc3c3c300,0xb5b5b500,0x7a7a7a00,0x91919100, - 0x24242400,0x08080800,0xe8e8e800,0xa8a8a800, - 0x60606000,0xfcfcfc00,0x69696900,0x50505000, - 0xaaaaaa00,0xd0d0d000,0xa0a0a000,0x7d7d7d00, - 0xa1a1a100,0x89898900,0x62626200,0x97979700, - 0x54545400,0x5b5b5b00,0x1e1e1e00,0x95959500, - 0xe0e0e000,0xffffff00,0x64646400,0xd2d2d200, - 0x10101000,0xc4c4c400,0x00000000,0x48484800, - 0xa3a3a300,0xf7f7f700,0x75757500,0xdbdbdb00, - 0x8a8a8a00,0x03030300,0xe6e6e600,0xdadada00, - 0x09090900,0x3f3f3f00,0xdddddd00,0x94949400, - 0x87878700,0x5c5c5c00,0x83838300,0x02020200, - 0xcdcdcd00,0x4a4a4a00,0x90909000,0x33333300, - 0x73737300,0x67676700,0xf6f6f600,0xf3f3f300, - 0x9d9d9d00,0x7f7f7f00,0xbfbfbf00,0xe2e2e200, - 0x52525200,0x9b9b9b00,0xd8d8d800,0x26262600, - 0xc8c8c800,0x37373700,0xc6c6c600,0x3b3b3b00, - 0x81818100,0x96969600,0x6f6f6f00,0x4b4b4b00, - 0x13131300,0xbebebe00,0x63636300,0x2e2e2e00, - 0xe9e9e900,0x79797900,0xa7a7a700,0x8c8c8c00, - 0x9f9f9f00,0x6e6e6e00,0xbcbcbc00,0x8e8e8e00, - 0x29292900,0xf5f5f500,0xf9f9f900,0xb6b6b600, - 0x2f2f2f00,0xfdfdfd00,0xb4b4b400,0x59595900, - 0x78787800,0x98989800,0x06060600,0x6a6a6a00, - 0xe7e7e700,0x46464600,0x71717100,0xbababa00, - 0xd4d4d400,0x25252500,0xababab00,0x42424200, - 0x88888800,0xa2a2a200,0x8d8d8d00,0xfafafa00, - 0x72727200,0x07070700,0xb9b9b900,0x55555500, - 0xf8f8f800,0xeeeeee00,0xacacac00,0x0a0a0a00, - 0x36363600,0x49494900,0x2a2a2a00,0x68686800, - 0x3c3c3c00,0x38383800,0xf1f1f100,0xa4a4a400, - 0x40404000,0x28282800,0xd3d3d300,0x7b7b7b00, - 0xbbbbbb00,0xc9c9c900,0x43434300,0xc1c1c100, - 0x15151500,0xe3e3e300,0xadadad00,0xf4f4f400, - 0x77777700,0xc7c7c700,0x80808000,0x9e9e9e00, -}; - -static const u32 camellia_sp0222[256] = { - 0x00e0e0e0,0x00050505,0x00585858,0x00d9d9d9, - 0x00676767,0x004e4e4e,0x00818181,0x00cbcbcb, - 0x00c9c9c9,0x000b0b0b,0x00aeaeae,0x006a6a6a, - 0x00d5d5d5,0x00181818,0x005d5d5d,0x00828282, - 0x00464646,0x00dfdfdf,0x00d6d6d6,0x00272727, - 0x008a8a8a,0x00323232,0x004b4b4b,0x00424242, - 0x00dbdbdb,0x001c1c1c,0x009e9e9e,0x009c9c9c, - 0x003a3a3a,0x00cacaca,0x00252525,0x007b7b7b, - 0x000d0d0d,0x00717171,0x005f5f5f,0x001f1f1f, - 0x00f8f8f8,0x00d7d7d7,0x003e3e3e,0x009d9d9d, - 0x007c7c7c,0x00606060,0x00b9b9b9,0x00bebebe, - 0x00bcbcbc,0x008b8b8b,0x00161616,0x00343434, - 0x004d4d4d,0x00c3c3c3,0x00727272,0x00959595, - 0x00ababab,0x008e8e8e,0x00bababa,0x007a7a7a, - 0x00b3b3b3,0x00020202,0x00b4b4b4,0x00adadad, - 0x00a2a2a2,0x00acacac,0x00d8d8d8,0x009a9a9a, - 0x00171717,0x001a1a1a,0x00353535,0x00cccccc, - 0x00f7f7f7,0x00999999,0x00616161,0x005a5a5a, - 0x00e8e8e8,0x00242424,0x00565656,0x00404040, - 0x00e1e1e1,0x00636363,0x00090909,0x00333333, - 0x00bfbfbf,0x00989898,0x00979797,0x00858585, - 0x00686868,0x00fcfcfc,0x00ececec,0x000a0a0a, - 0x00dadada,0x006f6f6f,0x00535353,0x00626262, - 0x00a3a3a3,0x002e2e2e,0x00080808,0x00afafaf, - 0x00282828,0x00b0b0b0,0x00747474,0x00c2c2c2, - 0x00bdbdbd,0x00363636,0x00222222,0x00383838, - 0x00646464,0x001e1e1e,0x00393939,0x002c2c2c, - 0x00a6a6a6,0x00303030,0x00e5e5e5,0x00444444, - 0x00fdfdfd,0x00888888,0x009f9f9f,0x00656565, - 0x00878787,0x006b6b6b,0x00f4f4f4,0x00232323, - 0x00484848,0x00101010,0x00d1d1d1,0x00515151, - 0x00c0c0c0,0x00f9f9f9,0x00d2d2d2,0x00a0a0a0, - 0x00555555,0x00a1a1a1,0x00414141,0x00fafafa, - 0x00434343,0x00131313,0x00c4c4c4,0x002f2f2f, - 0x00a8a8a8,0x00b6b6b6,0x003c3c3c,0x002b2b2b, - 0x00c1c1c1,0x00ffffff,0x00c8c8c8,0x00a5a5a5, - 0x00202020,0x00898989,0x00000000,0x00909090, - 0x00474747,0x00efefef,0x00eaeaea,0x00b7b7b7, - 0x00151515,0x00060606,0x00cdcdcd,0x00b5b5b5, - 0x00121212,0x007e7e7e,0x00bbbbbb,0x00292929, - 0x000f0f0f,0x00b8b8b8,0x00070707,0x00040404, - 0x009b9b9b,0x00949494,0x00212121,0x00666666, - 0x00e6e6e6,0x00cecece,0x00ededed,0x00e7e7e7, - 0x003b3b3b,0x00fefefe,0x007f7f7f,0x00c5c5c5, - 0x00a4a4a4,0x00373737,0x00b1b1b1,0x004c4c4c, - 0x00919191,0x006e6e6e,0x008d8d8d,0x00767676, - 0x00030303,0x002d2d2d,0x00dedede,0x00969696, - 0x00262626,0x007d7d7d,0x00c6c6c6,0x005c5c5c, - 0x00d3d3d3,0x00f2f2f2,0x004f4f4f,0x00191919, - 0x003f3f3f,0x00dcdcdc,0x00797979,0x001d1d1d, - 0x00525252,0x00ebebeb,0x00f3f3f3,0x006d6d6d, - 0x005e5e5e,0x00fbfbfb,0x00696969,0x00b2b2b2, - 0x00f0f0f0,0x00313131,0x000c0c0c,0x00d4d4d4, - 0x00cfcfcf,0x008c8c8c,0x00e2e2e2,0x00757575, - 0x00a9a9a9,0x004a4a4a,0x00575757,0x00848484, - 0x00111111,0x00454545,0x001b1b1b,0x00f5f5f5, - 0x00e4e4e4,0x000e0e0e,0x00737373,0x00aaaaaa, - 0x00f1f1f1,0x00dddddd,0x00595959,0x00141414, - 0x006c6c6c,0x00929292,0x00545454,0x00d0d0d0, - 0x00787878,0x00707070,0x00e3e3e3,0x00494949, - 0x00808080,0x00505050,0x00a7a7a7,0x00f6f6f6, - 0x00777777,0x00939393,0x00868686,0x00838383, - 0x002a2a2a,0x00c7c7c7,0x005b5b5b,0x00e9e9e9, - 0x00eeeeee,0x008f8f8f,0x00010101,0x003d3d3d, -}; - -static const u32 camellia_sp3033[256] = { - 0x38003838,0x41004141,0x16001616,0x76007676, - 0xd900d9d9,0x93009393,0x60006060,0xf200f2f2, - 0x72007272,0xc200c2c2,0xab00abab,0x9a009a9a, - 0x75007575,0x06000606,0x57005757,0xa000a0a0, - 0x91009191,0xf700f7f7,0xb500b5b5,0xc900c9c9, - 0xa200a2a2,0x8c008c8c,0xd200d2d2,0x90009090, - 0xf600f6f6,0x07000707,0xa700a7a7,0x27002727, - 0x8e008e8e,0xb200b2b2,0x49004949,0xde00dede, - 0x43004343,0x5c005c5c,0xd700d7d7,0xc700c7c7, - 0x3e003e3e,0xf500f5f5,0x8f008f8f,0x67006767, - 0x1f001f1f,0x18001818,0x6e006e6e,0xaf00afaf, - 0x2f002f2f,0xe200e2e2,0x85008585,0x0d000d0d, - 0x53005353,0xf000f0f0,0x9c009c9c,0x65006565, - 0xea00eaea,0xa300a3a3,0xae00aeae,0x9e009e9e, - 0xec00ecec,0x80008080,0x2d002d2d,0x6b006b6b, - 0xa800a8a8,0x2b002b2b,0x36003636,0xa600a6a6, - 0xc500c5c5,0x86008686,0x4d004d4d,0x33003333, - 0xfd00fdfd,0x66006666,0x58005858,0x96009696, - 0x3a003a3a,0x09000909,0x95009595,0x10001010, - 0x78007878,0xd800d8d8,0x42004242,0xcc00cccc, - 0xef00efef,0x26002626,0xe500e5e5,0x61006161, - 0x1a001a1a,0x3f003f3f,0x3b003b3b,0x82008282, - 0xb600b6b6,0xdb00dbdb,0xd400d4d4,0x98009898, - 0xe800e8e8,0x8b008b8b,0x02000202,0xeb00ebeb, - 0x0a000a0a,0x2c002c2c,0x1d001d1d,0xb000b0b0, - 0x6f006f6f,0x8d008d8d,0x88008888,0x0e000e0e, - 0x19001919,0x87008787,0x4e004e4e,0x0b000b0b, - 0xa900a9a9,0x0c000c0c,0x79007979,0x11001111, - 0x7f007f7f,0x22002222,0xe700e7e7,0x59005959, - 0xe100e1e1,0xda00dada,0x3d003d3d,0xc800c8c8, - 0x12001212,0x04000404,0x74007474,0x54005454, - 0x30003030,0x7e007e7e,0xb400b4b4,0x28002828, - 0x55005555,0x68006868,0x50005050,0xbe00bebe, - 0xd000d0d0,0xc400c4c4,0x31003131,0xcb00cbcb, - 0x2a002a2a,0xad00adad,0x0f000f0f,0xca00caca, - 0x70007070,0xff00ffff,0x32003232,0x69006969, - 0x08000808,0x62006262,0x00000000,0x24002424, - 0xd100d1d1,0xfb00fbfb,0xba00baba,0xed00eded, - 0x45004545,0x81008181,0x73007373,0x6d006d6d, - 0x84008484,0x9f009f9f,0xee00eeee,0x4a004a4a, - 0xc300c3c3,0x2e002e2e,0xc100c1c1,0x01000101, - 0xe600e6e6,0x25002525,0x48004848,0x99009999, - 0xb900b9b9,0xb300b3b3,0x7b007b7b,0xf900f9f9, - 0xce00cece,0xbf00bfbf,0xdf00dfdf,0x71007171, - 0x29002929,0xcd00cdcd,0x6c006c6c,0x13001313, - 0x64006464,0x9b009b9b,0x63006363,0x9d009d9d, - 0xc000c0c0,0x4b004b4b,0xb700b7b7,0xa500a5a5, - 0x89008989,0x5f005f5f,0xb100b1b1,0x17001717, - 0xf400f4f4,0xbc00bcbc,0xd300d3d3,0x46004646, - 0xcf00cfcf,0x37003737,0x5e005e5e,0x47004747, - 0x94009494,0xfa00fafa,0xfc00fcfc,0x5b005b5b, - 0x97009797,0xfe00fefe,0x5a005a5a,0xac00acac, - 0x3c003c3c,0x4c004c4c,0x03000303,0x35003535, - 0xf300f3f3,0x23002323,0xb800b8b8,0x5d005d5d, - 0x6a006a6a,0x92009292,0xd500d5d5,0x21002121, - 0x44004444,0x51005151,0xc600c6c6,0x7d007d7d, - 0x39003939,0x83008383,0xdc00dcdc,0xaa00aaaa, - 0x7c007c7c,0x77007777,0x56005656,0x05000505, - 0x1b001b1b,0xa400a4a4,0x15001515,0x34003434, - 0x1e001e1e,0x1c001c1c,0xf800f8f8,0x52005252, - 0x20002020,0x14001414,0xe900e9e9,0xbd00bdbd, - 0xdd00dddd,0xe400e4e4,0xa100a1a1,0xe000e0e0, - 0x8a008a8a,0xf100f1f1,0xd600d6d6,0x7a007a7a, - 0xbb00bbbb,0xe300e3e3,0x40004040,0x4f004f4f, -}; - -static const u32 camellia_sp4404[256] = { - 0x70700070,0x2c2c002c,0xb3b300b3,0xc0c000c0, - 0xe4e400e4,0x57570057,0xeaea00ea,0xaeae00ae, - 0x23230023,0x6b6b006b,0x45450045,0xa5a500a5, - 0xeded00ed,0x4f4f004f,0x1d1d001d,0x92920092, - 0x86860086,0xafaf00af,0x7c7c007c,0x1f1f001f, - 0x3e3e003e,0xdcdc00dc,0x5e5e005e,0x0b0b000b, - 0xa6a600a6,0x39390039,0xd5d500d5,0x5d5d005d, - 0xd9d900d9,0x5a5a005a,0x51510051,0x6c6c006c, - 0x8b8b008b,0x9a9a009a,0xfbfb00fb,0xb0b000b0, - 0x74740074,0x2b2b002b,0xf0f000f0,0x84840084, - 0xdfdf00df,0xcbcb00cb,0x34340034,0x76760076, - 0x6d6d006d,0xa9a900a9,0xd1d100d1,0x04040004, - 0x14140014,0x3a3a003a,0xdede00de,0x11110011, - 0x32320032,0x9c9c009c,0x53530053,0xf2f200f2, - 0xfefe00fe,0xcfcf00cf,0xc3c300c3,0x7a7a007a, - 0x24240024,0xe8e800e8,0x60600060,0x69690069, - 0xaaaa00aa,0xa0a000a0,0xa1a100a1,0x62620062, - 0x54540054,0x1e1e001e,0xe0e000e0,0x64640064, - 0x10100010,0x00000000,0xa3a300a3,0x75750075, - 0x8a8a008a,0xe6e600e6,0x09090009,0xdddd00dd, - 0x87870087,0x83830083,0xcdcd00cd,0x90900090, - 0x73730073,0xf6f600f6,0x9d9d009d,0xbfbf00bf, - 0x52520052,0xd8d800d8,0xc8c800c8,0xc6c600c6, - 0x81810081,0x6f6f006f,0x13130013,0x63630063, - 0xe9e900e9,0xa7a700a7,0x9f9f009f,0xbcbc00bc, - 0x29290029,0xf9f900f9,0x2f2f002f,0xb4b400b4, - 0x78780078,0x06060006,0xe7e700e7,0x71710071, - 0xd4d400d4,0xabab00ab,0x88880088,0x8d8d008d, - 0x72720072,0xb9b900b9,0xf8f800f8,0xacac00ac, - 0x36360036,0x2a2a002a,0x3c3c003c,0xf1f100f1, - 0x40400040,0xd3d300d3,0xbbbb00bb,0x43430043, - 0x15150015,0xadad00ad,0x77770077,0x80800080, - 0x82820082,0xecec00ec,0x27270027,0xe5e500e5, - 0x85850085,0x35350035,0x0c0c000c,0x41410041, - 0xefef00ef,0x93930093,0x19190019,0x21210021, - 0x0e0e000e,0x4e4e004e,0x65650065,0xbdbd00bd, - 0xb8b800b8,0x8f8f008f,0xebeb00eb,0xcece00ce, - 0x30300030,0x5f5f005f,0xc5c500c5,0x1a1a001a, - 0xe1e100e1,0xcaca00ca,0x47470047,0x3d3d003d, - 0x01010001,0xd6d600d6,0x56560056,0x4d4d004d, - 0x0d0d000d,0x66660066,0xcccc00cc,0x2d2d002d, - 0x12120012,0x20200020,0xb1b100b1,0x99990099, - 0x4c4c004c,0xc2c200c2,0x7e7e007e,0x05050005, - 0xb7b700b7,0x31310031,0x17170017,0xd7d700d7, - 0x58580058,0x61610061,0x1b1b001b,0x1c1c001c, - 0x0f0f000f,0x16160016,0x18180018,0x22220022, - 0x44440044,0xb2b200b2,0xb5b500b5,0x91910091, - 0x08080008,0xa8a800a8,0xfcfc00fc,0x50500050, - 0xd0d000d0,0x7d7d007d,0x89890089,0x97970097, - 0x5b5b005b,0x95950095,0xffff00ff,0xd2d200d2, - 0xc4c400c4,0x48480048,0xf7f700f7,0xdbdb00db, - 0x03030003,0xdada00da,0x3f3f003f,0x94940094, - 0x5c5c005c,0x02020002,0x4a4a004a,0x33330033, - 0x67670067,0xf3f300f3,0x7f7f007f,0xe2e200e2, - 0x9b9b009b,0x26260026,0x37370037,0x3b3b003b, - 0x96960096,0x4b4b004b,0xbebe00be,0x2e2e002e, - 0x79790079,0x8c8c008c,0x6e6e006e,0x8e8e008e, - 0xf5f500f5,0xb6b600b6,0xfdfd00fd,0x59590059, - 0x98980098,0x6a6a006a,0x46460046,0xbaba00ba, - 0x25250025,0x42420042,0xa2a200a2,0xfafa00fa, - 0x07070007,0x55550055,0xeeee00ee,0x0a0a000a, - 0x49490049,0x68680068,0x38380038,0xa4a400a4, - 0x28280028,0x7b7b007b,0xc9c900c9,0xc1c100c1, - 0xe3e300e3,0xf4f400f4,0xc7c700c7,0x9e9e009e, -}; - - -/** - * Stuff related to the Camellia key schedule - */ -#define subl(x) subL[(x)] -#define subr(x) subR[(x)] - -static int camellia_setup128(const unsigned char *key, u32 *subkey) -{ - u32 kll, klr, krl, krr; - u32 il, ir, t0, t1, w0, w1; - u32 kw4l, kw4r, dw, tl, tr; - -#ifdef CYASSL_SMALL_STACK - u32* subL; - u32* subR; - - subL = (u32*) XMALLOC(sizeof(u32) * 26, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (subL == NULL) - return MEMORY_E; - - subR = (u32*) XMALLOC(sizeof(u32) * 26, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (subR == NULL) { - XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#else - u32 subL[26]; - u32 subR[26]; -#endif - - /** - * k == kll || klr || krl || krr (|| is concatination) - */ - kll = GETU32(key ); - klr = GETU32(key + 4); - krl = GETU32(key + 8); - krr = GETU32(key + 12); - /** - * generate KL dependent subkeys - */ - subl(0) = kll; subr(0) = klr; - subl(1) = krl; subr(1) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(4) = kll; subr(4) = klr; - subl(5) = krl; subr(5) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); - subl(10) = kll; subr(10) = klr; - subl(11) = krl; subr(11) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(13) = krl; subr(13) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); - subl(16) = kll; subr(16) = klr; - subl(17) = krl; subr(17) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); - subl(18) = kll; subr(18) = klr; - subl(19) = krl; subr(19) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); - subl(22) = kll; subr(22) = klr; - subl(23) = krl; subr(23) = krr; - - /* generate KA */ - kll = subl(0); klr = subr(0); - krl = subl(1); krr = subr(1); - CAMELLIA_F(kll, klr, - CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, - w0, w1, il, ir, t0, t1); - krl ^= w0; krr ^= w1; - CAMELLIA_F(krl, krr, - CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, - kll, klr, il, ir, t0, t1); - CAMELLIA_F(kll, klr, - CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, - krl, krr, il, ir, t0, t1); - krl ^= w0; krr ^= w1; - CAMELLIA_F(krl, krr, - CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, - w0, w1, il, ir, t0, t1); - kll ^= w0; klr ^= w1; - - /* generate KA dependent subkeys */ - subl(2) = kll; subr(2) = klr; - subl(3) = krl; subr(3) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(6) = kll; subr(6) = klr; - subl(7) = krl; subr(7) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(8) = kll; subr(8) = klr; - subl(9) = krl; subr(9) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(12) = kll; subr(12) = klr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(14) = kll; subr(14) = klr; - subl(15) = krl; subr(15) = krr; - CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); - subl(20) = kll; subr(20) = klr; - subl(21) = krl; subr(21) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); - subl(24) = kll; subr(24) = klr; - subl(25) = krl; subr(25) = krr; - - - /* absorb kw2 to other subkeys */ - subl(3) ^= subl(1); subr(3) ^= subr(1); - subl(5) ^= subl(1); subr(5) ^= subr(1); - subl(7) ^= subl(1); subr(7) ^= subr(1); - subl(1) ^= subr(1) & ~subr(9); - dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); - subl(11) ^= subl(1); subr(11) ^= subr(1); - subl(13) ^= subl(1); subr(13) ^= subr(1); - subl(15) ^= subl(1); subr(15) ^= subr(1); - subl(1) ^= subr(1) & ~subr(17); - dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); - subl(19) ^= subl(1); subr(19) ^= subr(1); - subl(21) ^= subl(1); subr(21) ^= subr(1); - subl(23) ^= subl(1); subr(23) ^= subr(1); - subl(24) ^= subl(1); subr(24) ^= subr(1); - - /* absorb kw4 to other subkeys */ - kw4l = subl(25); kw4r = subr(25); - subl(22) ^= kw4l; subr(22) ^= kw4r; - subl(20) ^= kw4l; subr(20) ^= kw4r; - subl(18) ^= kw4l; subr(18) ^= kw4r; - kw4l ^= kw4r & ~subr(16); - dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); - subl(14) ^= kw4l; subr(14) ^= kw4r; - subl(12) ^= kw4l; subr(12) ^= kw4r; - subl(10) ^= kw4l; subr(10) ^= kw4r; - kw4l ^= kw4r & ~subr(8); - dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); - subl(6) ^= kw4l; subr(6) ^= kw4r; - subl(4) ^= kw4l; subr(4) ^= kw4r; - subl(2) ^= kw4l; subr(2) ^= kw4r; - subl(0) ^= kw4l; subr(0) ^= kw4r; - - /* key XOR is end of F-function */ - CamelliaSubkeyL(0) = subl(0) ^ subl(2); - CamelliaSubkeyR(0) = subr(0) ^ subr(2); - CamelliaSubkeyL(2) = subl(3); - CamelliaSubkeyR(2) = subr(3); - CamelliaSubkeyL(3) = subl(2) ^ subl(4); - CamelliaSubkeyR(3) = subr(2) ^ subr(4); - CamelliaSubkeyL(4) = subl(3) ^ subl(5); - CamelliaSubkeyR(4) = subr(3) ^ subr(5); - CamelliaSubkeyL(5) = subl(4) ^ subl(6); - CamelliaSubkeyR(5) = subr(4) ^ subr(6); - CamelliaSubkeyL(6) = subl(5) ^ subl(7); - CamelliaSubkeyR(6) = subr(5) ^ subr(7); - tl = subl(10) ^ (subr(10) & ~subr(8)); - dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(7) = subl(6) ^ tl; - CamelliaSubkeyR(7) = subr(6) ^ tr; - CamelliaSubkeyL(8) = subl(8); - CamelliaSubkeyR(8) = subr(8); - CamelliaSubkeyL(9) = subl(9); - CamelliaSubkeyR(9) = subr(9); - tl = subl(7) ^ (subr(7) & ~subr(9)); - dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(10) = tl ^ subl(11); - CamelliaSubkeyR(10) = tr ^ subr(11); - CamelliaSubkeyL(11) = subl(10) ^ subl(12); - CamelliaSubkeyR(11) = subr(10) ^ subr(12); - CamelliaSubkeyL(12) = subl(11) ^ subl(13); - CamelliaSubkeyR(12) = subr(11) ^ subr(13); - CamelliaSubkeyL(13) = subl(12) ^ subl(14); - CamelliaSubkeyR(13) = subr(12) ^ subr(14); - CamelliaSubkeyL(14) = subl(13) ^ subl(15); - CamelliaSubkeyR(14) = subr(13) ^ subr(15); - tl = subl(18) ^ (subr(18) & ~subr(16)); - dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(15) = subl(14) ^ tl; - CamelliaSubkeyR(15) = subr(14) ^ tr; - CamelliaSubkeyL(16) = subl(16); - CamelliaSubkeyR(16) = subr(16); - CamelliaSubkeyL(17) = subl(17); - CamelliaSubkeyR(17) = subr(17); - tl = subl(15) ^ (subr(15) & ~subr(17)); - dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(18) = tl ^ subl(19); - CamelliaSubkeyR(18) = tr ^ subr(19); - CamelliaSubkeyL(19) = subl(18) ^ subl(20); - CamelliaSubkeyR(19) = subr(18) ^ subr(20); - CamelliaSubkeyL(20) = subl(19) ^ subl(21); - CamelliaSubkeyR(20) = subr(19) ^ subr(21); - CamelliaSubkeyL(21) = subl(20) ^ subl(22); - CamelliaSubkeyR(21) = subr(20) ^ subr(22); - CamelliaSubkeyL(22) = subl(21) ^ subl(23); - CamelliaSubkeyR(22) = subr(21) ^ subr(23); - CamelliaSubkeyL(23) = subl(22); - CamelliaSubkeyR(23) = subr(22); - CamelliaSubkeyL(24) = subl(24) ^ subl(23); - CamelliaSubkeyR(24) = subr(24) ^ subr(23); - - /* apply the inverse of the last half of P-function */ - dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; - dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; - dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; - dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; - dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; - dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; - dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; - dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; - dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; - dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; - dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; - dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; - dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; - dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; - dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; - dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; - dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; - dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; - -#ifdef CYASSL_SMALL_STACK - XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - -static int camellia_setup256(const unsigned char *key, u32 *subkey) -{ - u32 kll,klr,krl,krr; /* left half of key */ - u32 krll,krlr,krrl,krrr; /* right half of key */ - u32 il, ir, t0, t1, w0, w1; /* temporary variables */ - u32 kw4l, kw4r, dw, tl, tr; - -#ifdef CYASSL_SMALL_STACK - u32* subL; - u32* subR; - - subL = (u32*) XMALLOC(sizeof(u32) * 34, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (subL == NULL) - return MEMORY_E; - - subR = (u32*) XMALLOC(sizeof(u32) * 34, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (subR == NULL) { - XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#else - u32 subL[34]; - u32 subR[34]; -#endif - - /** - * key = (kll || klr || krl || krr || krll || krlr || krrl || krrr) - * (|| is concatination) - */ - - kll = GETU32(key ); - klr = GETU32(key + 4); - krl = GETU32(key + 8); - krr = GETU32(key + 12); - krll = GETU32(key + 16); - krlr = GETU32(key + 20); - krrl = GETU32(key + 24); - krrr = GETU32(key + 28); - - /* generate KL dependent subkeys */ - subl(0) = kll; subr(0) = klr; - subl(1) = krl; subr(1) = krr; - CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45); - subl(12) = kll; subr(12) = klr; - subl(13) = krl; subr(13) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(16) = kll; subr(16) = klr; - subl(17) = krl; subr(17) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); - subl(22) = kll; subr(22) = klr; - subl(23) = krl; subr(23) = krr; - CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); - subl(30) = kll; subr(30) = klr; - subl(31) = krl; subr(31) = krr; - - /* generate KR dependent subkeys */ - CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); - subl(4) = krll; subr(4) = krlr; - subl(5) = krrl; subr(5) = krrr; - CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); - subl(8) = krll; subr(8) = krlr; - subl(9) = krrl; subr(9) = krrr; - CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); - subl(18) = krll; subr(18) = krlr; - subl(19) = krrl; subr(19) = krrr; - CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); - subl(26) = krll; subr(26) = krlr; - subl(27) = krrl; subr(27) = krrr; - CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); - - /* generate KA */ - kll = subl(0) ^ krll; klr = subr(0) ^ krlr; - krl = subl(1) ^ krrl; krr = subr(1) ^ krrr; - CAMELLIA_F(kll, klr, - CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, - w0, w1, il, ir, t0, t1); - krl ^= w0; krr ^= w1; - CAMELLIA_F(krl, krr, - CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, - kll, klr, il, ir, t0, t1); - kll ^= krll; klr ^= krlr; - CAMELLIA_F(kll, klr, - CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, - krl, krr, il, ir, t0, t1); - krl ^= w0 ^ krrl; krr ^= w1 ^ krrr; - CAMELLIA_F(krl, krr, - CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, - w0, w1, il, ir, t0, t1); - kll ^= w0; klr ^= w1; - - /* generate KB */ - krll ^= kll; krlr ^= klr; - krrl ^= krl; krrr ^= krr; - CAMELLIA_F(krll, krlr, - CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R, - w0, w1, il, ir, t0, t1); - krrl ^= w0; krrr ^= w1; - CAMELLIA_F(krrl, krrr, - CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R, - w0, w1, il, ir, t0, t1); - krll ^= w0; krlr ^= w1; - - /* generate KA dependent subkeys */ - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); - subl(6) = kll; subr(6) = klr; - subl(7) = krl; subr(7) = krr; - CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); - subl(14) = kll; subr(14) = klr; - subl(15) = krl; subr(15) = krr; - subl(24) = klr; subr(24) = krl; - subl(25) = krr; subr(25) = kll; - CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49); - subl(28) = kll; subr(28) = klr; - subl(29) = krl; subr(29) = krr; - - /* generate KB dependent subkeys */ - subl(2) = krll; subr(2) = krlr; - subl(3) = krrl; subr(3) = krrr; - CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); - subl(10) = krll; subr(10) = krlr; - subl(11) = krrl; subr(11) = krrr; - CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); - subl(20) = krll; subr(20) = krlr; - subl(21) = krrl; subr(21) = krrr; - CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51); - subl(32) = krll; subr(32) = krlr; - subl(33) = krrl; subr(33) = krrr; - - /* absorb kw2 to other subkeys */ - subl(3) ^= subl(1); subr(3) ^= subr(1); - subl(5) ^= subl(1); subr(5) ^= subr(1); - subl(7) ^= subl(1); subr(7) ^= subr(1); - subl(1) ^= subr(1) & ~subr(9); - dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); - subl(11) ^= subl(1); subr(11) ^= subr(1); - subl(13) ^= subl(1); subr(13) ^= subr(1); - subl(15) ^= subl(1); subr(15) ^= subr(1); - subl(1) ^= subr(1) & ~subr(17); - dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); - subl(19) ^= subl(1); subr(19) ^= subr(1); - subl(21) ^= subl(1); subr(21) ^= subr(1); - subl(23) ^= subl(1); subr(23) ^= subr(1); - subl(1) ^= subr(1) & ~subr(25); - dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw); - subl(27) ^= subl(1); subr(27) ^= subr(1); - subl(29) ^= subl(1); subr(29) ^= subr(1); - subl(31) ^= subl(1); subr(31) ^= subr(1); - subl(32) ^= subl(1); subr(32) ^= subr(1); - - /* absorb kw4 to other subkeys */ - kw4l = subl(33); kw4r = subr(33); - subl(30) ^= kw4l; subr(30) ^= kw4r; - subl(28) ^= kw4l; subr(28) ^= kw4r; - subl(26) ^= kw4l; subr(26) ^= kw4r; - kw4l ^= kw4r & ~subr(24); - dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw); - subl(22) ^= kw4l; subr(22) ^= kw4r; - subl(20) ^= kw4l; subr(20) ^= kw4r; - subl(18) ^= kw4l; subr(18) ^= kw4r; - kw4l ^= kw4r & ~subr(16); - dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); - subl(14) ^= kw4l; subr(14) ^= kw4r; - subl(12) ^= kw4l; subr(12) ^= kw4r; - subl(10) ^= kw4l; subr(10) ^= kw4r; - kw4l ^= kw4r & ~subr(8); - dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); - subl(6) ^= kw4l; subr(6) ^= kw4r; - subl(4) ^= kw4l; subr(4) ^= kw4r; - subl(2) ^= kw4l; subr(2) ^= kw4r; - subl(0) ^= kw4l; subr(0) ^= kw4r; - - /* key XOR is end of F-function */ - CamelliaSubkeyL(0) = subl(0) ^ subl(2); - CamelliaSubkeyR(0) = subr(0) ^ subr(2); - CamelliaSubkeyL(2) = subl(3); - CamelliaSubkeyR(2) = subr(3); - CamelliaSubkeyL(3) = subl(2) ^ subl(4); - CamelliaSubkeyR(3) = subr(2) ^ subr(4); - CamelliaSubkeyL(4) = subl(3) ^ subl(5); - CamelliaSubkeyR(4) = subr(3) ^ subr(5); - CamelliaSubkeyL(5) = subl(4) ^ subl(6); - CamelliaSubkeyR(5) = subr(4) ^ subr(6); - CamelliaSubkeyL(6) = subl(5) ^ subl(7); - CamelliaSubkeyR(6) = subr(5) ^ subr(7); - tl = subl(10) ^ (subr(10) & ~subr(8)); - dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(7) = subl(6) ^ tl; - CamelliaSubkeyR(7) = subr(6) ^ tr; - CamelliaSubkeyL(8) = subl(8); - CamelliaSubkeyR(8) = subr(8); - CamelliaSubkeyL(9) = subl(9); - CamelliaSubkeyR(9) = subr(9); - tl = subl(7) ^ (subr(7) & ~subr(9)); - dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(10) = tl ^ subl(11); - CamelliaSubkeyR(10) = tr ^ subr(11); - CamelliaSubkeyL(11) = subl(10) ^ subl(12); - CamelliaSubkeyR(11) = subr(10) ^ subr(12); - CamelliaSubkeyL(12) = subl(11) ^ subl(13); - CamelliaSubkeyR(12) = subr(11) ^ subr(13); - CamelliaSubkeyL(13) = subl(12) ^ subl(14); - CamelliaSubkeyR(13) = subr(12) ^ subr(14); - CamelliaSubkeyL(14) = subl(13) ^ subl(15); - CamelliaSubkeyR(14) = subr(13) ^ subr(15); - tl = subl(18) ^ (subr(18) & ~subr(16)); - dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(15) = subl(14) ^ tl; - CamelliaSubkeyR(15) = subr(14) ^ tr; - CamelliaSubkeyL(16) = subl(16); - CamelliaSubkeyR(16) = subr(16); - CamelliaSubkeyL(17) = subl(17); - CamelliaSubkeyR(17) = subr(17); - tl = subl(15) ^ (subr(15) & ~subr(17)); - dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(18) = tl ^ subl(19); - CamelliaSubkeyR(18) = tr ^ subr(19); - CamelliaSubkeyL(19) = subl(18) ^ subl(20); - CamelliaSubkeyR(19) = subr(18) ^ subr(20); - CamelliaSubkeyL(20) = subl(19) ^ subl(21); - CamelliaSubkeyR(20) = subr(19) ^ subr(21); - CamelliaSubkeyL(21) = subl(20) ^ subl(22); - CamelliaSubkeyR(21) = subr(20) ^ subr(22); - CamelliaSubkeyL(22) = subl(21) ^ subl(23); - CamelliaSubkeyR(22) = subr(21) ^ subr(23); - tl = subl(26) ^ (subr(26) & ~subr(24)); - dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(23) = subl(22) ^ tl; - CamelliaSubkeyR(23) = subr(22) ^ tr; - CamelliaSubkeyL(24) = subl(24); - CamelliaSubkeyR(24) = subr(24); - CamelliaSubkeyL(25) = subl(25); - CamelliaSubkeyR(25) = subr(25); - tl = subl(23) ^ (subr(23) & ~subr(25)); - dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw); - CamelliaSubkeyL(26) = tl ^ subl(27); - CamelliaSubkeyR(26) = tr ^ subr(27); - CamelliaSubkeyL(27) = subl(26) ^ subl(28); - CamelliaSubkeyR(27) = subr(26) ^ subr(28); - CamelliaSubkeyL(28) = subl(27) ^ subl(29); - CamelliaSubkeyR(28) = subr(27) ^ subr(29); - CamelliaSubkeyL(29) = subl(28) ^ subl(30); - CamelliaSubkeyR(29) = subr(28) ^ subr(30); - CamelliaSubkeyL(30) = subl(29) ^ subl(31); - CamelliaSubkeyR(30) = subr(29) ^ subr(31); - CamelliaSubkeyL(31) = subl(30); - CamelliaSubkeyR(31) = subr(30); - CamelliaSubkeyL(32) = subl(32) ^ subl(31); - CamelliaSubkeyR(32) = subr(32) ^ subr(31); - - /* apply the inverse of the last half of P-function */ - dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; - dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; - dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; - dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; - dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; - dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; - dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; - dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; - dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; - dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; - dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; - dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; - dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; - dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; - dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; - dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; - dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; - dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; - dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw; - dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw; - dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw; - dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw; - dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw; - dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw); - CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw; - -#ifdef CYASSL_SMALL_STACK - XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - -static int camellia_setup192(const unsigned char *key, u32 *subkey) -{ - unsigned char kk[32]; - u32 krll, krlr, krrl,krrr; - - memcpy(kk, key, 24); - memcpy((unsigned char *)&krll, key+16,4); - memcpy((unsigned char *)&krlr, key+20,4); - krrl = ~krll; - krrr = ~krlr; - memcpy(kk+24, (unsigned char *)&krrl, 4); - memcpy(kk+28, (unsigned char *)&krrr, 4); - - return camellia_setup256(kk, subkey); -} - - -/** - * Stuff related to camellia encryption/decryption - * - * "io" must be 4byte aligned and big-endian data. - */ -static void camellia_encrypt128(const u32 *subkey, u32 *io) -{ - u32 il, ir, t0, t1; - - /* pre whitening but absorb kw2*/ - io[0] ^= CamelliaSubkeyL(0); - io[1] ^= CamelliaSubkeyR(0); - /* main iteration */ - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(2),CamelliaSubkeyR(2), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(3),CamelliaSubkeyR(3), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(4),CamelliaSubkeyR(4), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(5),CamelliaSubkeyR(5), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(6),CamelliaSubkeyR(6), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(7),CamelliaSubkeyR(7), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(8),CamelliaSubkeyR(8), - CamelliaSubkeyL(9),CamelliaSubkeyR(9), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(10),CamelliaSubkeyR(10), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(11),CamelliaSubkeyR(11), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(12),CamelliaSubkeyR(12), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(13),CamelliaSubkeyR(13), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(14),CamelliaSubkeyR(14), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(15),CamelliaSubkeyR(15), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(16),CamelliaSubkeyR(16), - CamelliaSubkeyL(17),CamelliaSubkeyR(17), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(18),CamelliaSubkeyR(18), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(19),CamelliaSubkeyR(19), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(20),CamelliaSubkeyR(20), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(21),CamelliaSubkeyR(21), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(22),CamelliaSubkeyR(22), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(23),CamelliaSubkeyR(23), - io[0],io[1],il,ir,t0,t1); - - /* post whitening but kw4 */ - io[2] ^= CamelliaSubkeyL(24); - io[3] ^= CamelliaSubkeyR(24); - - t0 = io[0]; - t1 = io[1]; - io[0] = io[2]; - io[1] = io[3]; - io[2] = t0; - io[3] = t1; - - return; -} - -static void camellia_decrypt128(const u32 *subkey, u32 *io) -{ - u32 il,ir,t0,t1; /* temporary valiables */ - - /* pre whitening but absorb kw2*/ - io[0] ^= CamelliaSubkeyL(24); - io[1] ^= CamelliaSubkeyR(24); - - /* main iteration */ - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(23),CamelliaSubkeyR(23), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(22),CamelliaSubkeyR(22), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(21),CamelliaSubkeyR(21), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(20),CamelliaSubkeyR(20), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(19),CamelliaSubkeyR(19), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(18),CamelliaSubkeyR(18), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(17),CamelliaSubkeyR(17), - CamelliaSubkeyL(16),CamelliaSubkeyR(16), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(15),CamelliaSubkeyR(15), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(14),CamelliaSubkeyR(14), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(13),CamelliaSubkeyR(13), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(12),CamelliaSubkeyR(12), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(11),CamelliaSubkeyR(11), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(10),CamelliaSubkeyR(10), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(9),CamelliaSubkeyR(9), - CamelliaSubkeyL(8),CamelliaSubkeyR(8), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(7),CamelliaSubkeyR(7), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(6),CamelliaSubkeyR(6), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(5),CamelliaSubkeyR(5), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(4),CamelliaSubkeyR(4), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(3),CamelliaSubkeyR(3), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(2),CamelliaSubkeyR(2), - io[0],io[1],il,ir,t0,t1); - - /* post whitening but kw4 */ - io[2] ^= CamelliaSubkeyL(0); - io[3] ^= CamelliaSubkeyR(0); - - t0 = io[0]; - t1 = io[1]; - io[0] = io[2]; - io[1] = io[3]; - io[2] = t0; - io[3] = t1; - - return; -} - -/** - * stuff for 192 and 256bit encryption/decryption - */ -static void camellia_encrypt256(const u32 *subkey, u32 *io) -{ - u32 il,ir,t0,t1; /* temporary valiables */ - - /* pre whitening but absorb kw2*/ - io[0] ^= CamelliaSubkeyL(0); - io[1] ^= CamelliaSubkeyR(0); - - /* main iteration */ - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(2),CamelliaSubkeyR(2), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(3),CamelliaSubkeyR(3), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(4),CamelliaSubkeyR(4), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(5),CamelliaSubkeyR(5), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(6),CamelliaSubkeyR(6), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(7),CamelliaSubkeyR(7), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(8),CamelliaSubkeyR(8), - CamelliaSubkeyL(9),CamelliaSubkeyR(9), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(10),CamelliaSubkeyR(10), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(11),CamelliaSubkeyR(11), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(12),CamelliaSubkeyR(12), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(13),CamelliaSubkeyR(13), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(14),CamelliaSubkeyR(14), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(15),CamelliaSubkeyR(15), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(16),CamelliaSubkeyR(16), - CamelliaSubkeyL(17),CamelliaSubkeyR(17), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(18),CamelliaSubkeyR(18), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(19),CamelliaSubkeyR(19), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(20),CamelliaSubkeyR(20), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(21),CamelliaSubkeyR(21), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(22),CamelliaSubkeyR(22), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(23),CamelliaSubkeyR(23), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(24),CamelliaSubkeyR(24), - CamelliaSubkeyL(25),CamelliaSubkeyR(25), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(26),CamelliaSubkeyR(26), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(27),CamelliaSubkeyR(27), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(28),CamelliaSubkeyR(28), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(29),CamelliaSubkeyR(29), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(30),CamelliaSubkeyR(30), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(31),CamelliaSubkeyR(31), - io[0],io[1],il,ir,t0,t1); - - /* post whitening but kw4 */ - io[2] ^= CamelliaSubkeyL(32); - io[3] ^= CamelliaSubkeyR(32); - - t0 = io[0]; - t1 = io[1]; - io[0] = io[2]; - io[1] = io[3]; - io[2] = t0; - io[3] = t1; - - return; -} - -static void camellia_decrypt256(const u32 *subkey, u32 *io) -{ - u32 il,ir,t0,t1; /* temporary valiables */ - - /* pre whitening but absorb kw2*/ - io[0] ^= CamelliaSubkeyL(32); - io[1] ^= CamelliaSubkeyR(32); - - /* main iteration */ - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(31),CamelliaSubkeyR(31), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(30),CamelliaSubkeyR(30), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(29),CamelliaSubkeyR(29), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(28),CamelliaSubkeyR(28), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(27),CamelliaSubkeyR(27), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(26),CamelliaSubkeyR(26), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(25),CamelliaSubkeyR(25), - CamelliaSubkeyL(24),CamelliaSubkeyR(24), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(23),CamelliaSubkeyR(23), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(22),CamelliaSubkeyR(22), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(21),CamelliaSubkeyR(21), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(20),CamelliaSubkeyR(20), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(19),CamelliaSubkeyR(19), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(18),CamelliaSubkeyR(18), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(17),CamelliaSubkeyR(17), - CamelliaSubkeyL(16),CamelliaSubkeyR(16), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(15),CamelliaSubkeyR(15), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(14),CamelliaSubkeyR(14), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(13),CamelliaSubkeyR(13), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(12),CamelliaSubkeyR(12), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(11),CamelliaSubkeyR(11), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(10),CamelliaSubkeyR(10), - io[0],io[1],il,ir,t0,t1); - - CAMELLIA_FLS(io[0],io[1],io[2],io[3], - CamelliaSubkeyL(9),CamelliaSubkeyR(9), - CamelliaSubkeyL(8),CamelliaSubkeyR(8), - t0,t1,il,ir); - - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(7),CamelliaSubkeyR(7), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(6),CamelliaSubkeyR(6), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(5),CamelliaSubkeyR(5), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(4),CamelliaSubkeyR(4), - io[0],io[1],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[0],io[1], - CamelliaSubkeyL(3),CamelliaSubkeyR(3), - io[2],io[3],il,ir,t0,t1); - CAMELLIA_ROUNDSM(io[2],io[3], - CamelliaSubkeyL(2),CamelliaSubkeyR(2), - io[0],io[1],il,ir,t0,t1); - - /* post whitening but kw4 */ - io[2] ^= CamelliaSubkeyL(0); - io[3] ^= CamelliaSubkeyR(0); - - t0 = io[0]; - t1 = io[1]; - io[0] = io[2]; - io[1] = io[3]; - io[2] = t0; - io[3] = t1; - - return; -} - -/*** - * - * API for compatibility - */ - -static void Camellia_EncryptBlock(const int keyBitLength, - const unsigned char *plaintext, - const KEY_TABLE_TYPE keyTable, - unsigned char *ciphertext) -{ - u32 tmp[4]; - - tmp[0] = GETU32(plaintext); - tmp[1] = GETU32(plaintext + 4); - tmp[2] = GETU32(plaintext + 8); - tmp[3] = GETU32(plaintext + 12); - - switch (keyBitLength) { - case 128: - camellia_encrypt128(keyTable, tmp); - break; - case 192: - /* fall through */ - case 256: - camellia_encrypt256(keyTable, tmp); - break; - default: - break; - } - - PUTU32(ciphertext, tmp[0]); - PUTU32(ciphertext + 4, tmp[1]); - PUTU32(ciphertext + 8, tmp[2]); - PUTU32(ciphertext + 12, tmp[3]); -} - -static void Camellia_DecryptBlock(const int keyBitLength, - const unsigned char *ciphertext, - const KEY_TABLE_TYPE keyTable, - unsigned char *plaintext) -{ - u32 tmp[4]; - - tmp[0] = GETU32(ciphertext); - tmp[1] = GETU32(ciphertext + 4); - tmp[2] = GETU32(ciphertext + 8); - tmp[3] = GETU32(ciphertext + 12); - - switch (keyBitLength) { - case 128: - camellia_decrypt128(keyTable, tmp); - break; - case 192: - /* fall through */ - case 256: - camellia_decrypt256(keyTable, tmp); - break; - default: - break; - } - PUTU32(plaintext, tmp[0]); - PUTU32(plaintext + 4, tmp[1]); - PUTU32(plaintext + 8, tmp[2]); - PUTU32(plaintext + 12, tmp[3]); -} - - - -/* CTaoCrypt wrappers to the Camellia code */ - -int CamelliaSetKey(Camellia* cam, const byte* key, word32 len, const byte* iv) -{ - int ret = 0; - - if (cam == NULL) return BAD_FUNC_ARG; - - XMEMSET(cam->key, 0, sizeof(KEY_TABLE_TYPE)); - - switch (len) { - case 16: - ret = camellia_setup128(key, cam->key); - break; - case 24: - ret = camellia_setup192(key, cam->key); - break; - case 32: - ret = camellia_setup256(key, cam->key); - break; - default: - return BAD_FUNC_ARG; - } - - if (ret != 0) - return ret; - - cam->keySz = len * 8; - - return CamelliaSetIV(cam, iv); -} - - -int CamelliaSetIV(Camellia* cam, const byte* iv) -{ - if (cam == NULL) - return BAD_FUNC_ARG; - - if (iv) - XMEMCPY(cam->reg, iv, CAMELLIA_BLOCK_SIZE); - else - XMEMSET(cam->reg, 0, CAMELLIA_BLOCK_SIZE); - - return 0; -} - - -void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in) -{ - Camellia_EncryptBlock(cam->keySz, in, cam->key, out); -} - - -void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in) -{ - Camellia_DecryptBlock(cam->keySz, in, cam->key, out); -} - - -void CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / CAMELLIA_BLOCK_SIZE; - - while (blocks--) { - xorbuf((byte*)cam->reg, in, CAMELLIA_BLOCK_SIZE); - Camellia_EncryptBlock(cam->keySz, (byte*)cam->reg, - cam->key, (byte*)cam->reg); - XMEMCPY(out, cam->reg, CAMELLIA_BLOCK_SIZE); - - out += CAMELLIA_BLOCK_SIZE; - in += CAMELLIA_BLOCK_SIZE; - } -} - - -void CamelliaCbcDecrypt(Camellia* cam, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / CAMELLIA_BLOCK_SIZE; - - while (blocks--) { - XMEMCPY(cam->tmp, in, CAMELLIA_BLOCK_SIZE); - Camellia_DecryptBlock(cam->keySz, (byte*)cam->tmp, cam->key, out); - xorbuf(out, (byte*)cam->reg, CAMELLIA_BLOCK_SIZE); - XMEMCPY(cam->reg, cam->tmp, CAMELLIA_BLOCK_SIZE); - - out += CAMELLIA_BLOCK_SIZE; - in += CAMELLIA_BLOCK_SIZE; - } -} - - -#endif /* HAVE_CAMELLIA */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/coding.c b/project1/cyassl-3.0.0/ctaocrypt/src/coding.c deleted file mode 100644 index cdad0f5c..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/coding.c +++ /dev/null @@ -1,399 +0,0 @@ -/* coding.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_CODING - -#include -#include -#include - - -enum { - BAD = 0xFF, /* invalid encoding */ - PAD = '=', - PEM_LINE_SZ = 64 -}; - - -static -const byte base64Decode[] = { 62, BAD, BAD, BAD, 63, /* + starts at 0x2B */ - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - BAD, BAD, BAD, BAD, BAD, BAD, BAD, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, - BAD, BAD, BAD, BAD, BAD, BAD, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51 - }; - - -int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) -{ - word32 i = 0; - word32 j = 0; - word32 plainSz = inLen - ((inLen + (PEM_LINE_SZ - 1)) / PEM_LINE_SZ ); - const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1; - - plainSz = (plainSz * 3 + 3) / 4; - if (plainSz > *outLen) return BAD_FUNC_ARG; - - while (inLen > 3) { - byte b1, b2, b3; - byte e1 = in[j++]; - byte e2 = in[j++]; - byte e3 = in[j++]; - byte e4 = in[j++]; - - int pad3 = 0; - int pad4 = 0; - - if (e1 == 0) /* end file 0's */ - break; - if (e3 == PAD) - pad3 = 1; - if (e4 == PAD) - pad4 = 1; - - if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) { - CYASSL_MSG("Bad Base64 Decode data, too small"); - return ASN_INPUT_E; - } - - if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) { - CYASSL_MSG("Bad Base64 Decode data, too big"); - return ASN_INPUT_E; - } - - e1 = base64Decode[e1 - 0x2B]; - e2 = base64Decode[e2 - 0x2B]; - e3 = (e3 == PAD) ? 0 : base64Decode[e3 - 0x2B]; - e4 = (e4 == PAD) ? 0 : base64Decode[e4 - 0x2B]; - - b1 = (byte)((e1 << 2) | (e2 >> 4)); - b2 = (byte)(((e2 & 0xF) << 4) | (e3 >> 2)); - b3 = (byte)(((e3 & 0x3) << 6) | e4); - - out[i++] = b1; - if (!pad3) - out[i++] = b2; - if (!pad4) - out[i++] = b3; - else - break; - - inLen -= 4; - if (inLen && (in[j] == ' ' || in[j] == '\r' || in[j] == '\n')) { - byte endLine = in[j++]; - inLen--; - while (inLen && endLine == ' ') { /* allow trailing whitespace */ - endLine = in[j++]; - inLen--; - } - if (endLine == '\r') { - if (inLen) { - endLine = in[j++]; - inLen--; - } - } - if (endLine != '\n') { - CYASSL_MSG("Bad end of line in Base64 Decode"); - return ASN_INPUT_E; - } - } - } - *outLen = i; - - return 0; -} - - -#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) - -static -const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+', '/' - }; - - -/* make sure *i (idx) won't exceed max, store and possibly escape to out, - * raw means use e w/o decode, 0 on success */ -static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max, - int raw) -{ - int doEscape = 0; - word32 needed = 1; - word32 idx = *i; - - byte basic; - byte plus = 0; - byte equals = 0; - byte newline = 0; - - if (raw) - basic = e; - else - basic = base64Encode[e]; - - /* check whether to escape */ - if (escaped) { - switch ((char)basic) { - case '+' : - plus = 1; - doEscape = 1; - needed += 2; - break; - case '=' : - equals = 1; - doEscape = 1; - needed += 2; - break; - case '\n' : - newline = 1; - doEscape = 1; - needed += 2; - break; - default: - /* do nothing */ - break; - } - } - - /* check size */ - if ( (idx+needed) > max) { - CYASSL_MSG("Escape buffer max too small"); - return BUFFER_E; - } - - /* store it */ - if (doEscape == 0) { - out[idx++] = basic; - } - else { - out[idx++] = '%'; /* start escape */ - - if (plus) { - out[idx++] = '2'; - out[idx++] = 'B'; - } - else if (equals) { - out[idx++] = '3'; - out[idx++] = 'D'; - } - else if (newline) { - out[idx++] = '0'; - out[idx++] = 'A'; - } - - } - *i = idx; - - return 0; -} - - -/* internal worker, handles both escaped and normal line endings */ -static int DoBase64_Encode(const byte* in, word32 inLen, byte* out, - word32* outLen, int escaped) -{ - int ret = 0; - word32 i = 0, - j = 0, - n = 0; /* new line counter */ - - word32 outSz = (inLen + 3 - 1) / 3 * 4; - word32 addSz = (outSz + PEM_LINE_SZ - 1) / PEM_LINE_SZ; /* new lines */ - - if (escaped) - addSz *= 3; /* instead of just \n, we're doing %0A triplet */ - - outSz += addSz; - - /* if escaped we can't predetermine size for one pass encoding, but - * make sure we have enough if no escapes are in input */ - if (outSz > *outLen) return BAD_FUNC_ARG; - - while (inLen > 2) { - byte b1 = in[j++]; - byte b2 = in[j++]; - byte b3 = in[j++]; - - /* encoded idx */ - byte e1 = b1 >> 2; - byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4)); - byte e3 = (byte)(((b2 & 0xF) << 2) | (b3 >> 6)); - byte e4 = b3 & 0x3F; - - /* store */ - ret = CEscape(escaped, e1, out, &i, *outLen, 0); - if (ret != 0) break; - ret = CEscape(escaped, e2, out, &i, *outLen, 0); - if (ret != 0) break; - ret = CEscape(escaped, e3, out, &i, *outLen, 0); - if (ret != 0) break; - ret = CEscape(escaped, e4, out, &i, *outLen, 0); - if (ret != 0) break; - - inLen -= 3; - - if ((++n % (PEM_LINE_SZ / 4)) == 0 && inLen) { - ret = CEscape(escaped, '\n', out, &i, *outLen, 1); - if (ret != 0) break; - } - } - - /* last integral */ - if (inLen && ret == 0) { - int twoBytes = (inLen == 2); - - byte b1 = in[j++]; - byte b2 = (twoBytes) ? in[j++] : 0; - - byte e1 = b1 >> 2; - byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4)); - byte e3 = (byte)((b2 & 0xF) << 2); - - ret = CEscape(escaped, e1, out, &i, *outLen, 0); - if (ret == 0) - ret = CEscape(escaped, e2, out, &i, *outLen, 0); - if (ret == 0) { - /* third */ - if (twoBytes) - ret = CEscape(escaped, e3, out, &i, *outLen, 0); - else - ret = CEscape(escaped, '=', out, &i, *outLen, 1); - } - /* fourth always pad */ - if (ret == 0) - ret = CEscape(escaped, '=', out, &i, *outLen, 1); - } - - if (ret == 0) - ret = CEscape(escaped, '\n', out, &i, *outLen, 1); - - if (i != outSz && escaped == 0 && ret == 0) - return ASN_INPUT_E; - - *outLen = i; - return ret; -} - - -/* Base64 Encode, PEM style, with \n line endings */ -int Base64_Encode(const byte* in, word32 inLen, byte* out, word32* outLen) -{ - return DoBase64_Encode(in, inLen, out, outLen, 0); -} - - -/* Base64 Encode, with %0A esacped line endings instead of \n */ -int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen) -{ - return DoBase64_Encode(in, inLen, out, outLen, 1); -} - - -#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) */ - - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) - -static -const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - BAD, BAD, BAD, BAD, BAD, BAD, BAD, - 10, 11, 12, 13, 14, 15, /* upper case A-F */ - BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, - BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, - BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, - BAD, BAD, /* G - ` */ - 10, 11, 12, 13, 14, 15 /* lower case a-f */ - }; /* A starts at 0x41 not 0x3A */ - -int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) -{ - word32 inIdx = 0; - word32 outIdx = 0; - - if (inLen == 1 && *outLen && in) { - byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */ - - /* sanity check */ - if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) - return ASN_INPUT_E; - - b = hexDecode[b]; - - if (b == BAD) - return ASN_INPUT_E; - - out[outIdx++] = b; - - *outLen = outIdx; - return 0; - } - - if (inLen % 2) - return BAD_FUNC_ARG; - - if (*outLen < (inLen / 2)) - return BAD_FUNC_ARG; - - while (inLen) { - byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */ - byte b2 = in[inIdx++] - 0x30; - - /* sanity checks */ - if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) - return ASN_INPUT_E; - if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0])) - return ASN_INPUT_E; - - b = hexDecode[b]; - b2 = hexDecode[b2]; - - if (b == BAD || b2 == BAD) - return ASN_INPUT_E; - - out[outIdx++] = (byte)((b << 4) | b2); - inLen -= 2; - } - - *outLen = outIdx; - return 0; -} - - -#endif /* (OPENSSL_EXTRA) || (HAVE_WEBSERVER) || (HAVE_FIPS) */ - -#endif /* NO_CODING */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/compress.c b/project1/cyassl-3.0.0/ctaocrypt/src/compress.c deleted file mode 100644 index faebd2ad..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/compress.c +++ /dev/null @@ -1,169 +0,0 @@ -/* compress.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_LIBZ - - -#include -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - -#include - - -/* alloc user allocs to work with zlib */ -static void* myAlloc(void* opaque, unsigned int item, unsigned int size) -{ - (void)opaque; - return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ); -} - - -static void myFree(void* opaque, void* memory) -{ - (void)opaque; - XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ); -} - - -#ifdef HAVE_MCAPI - #define DEFLATE_DEFAULT_WINDOWBITS 11 - #define DEFLATE_DEFAULT_MEMLEVEL 1 -#else - #define DEFLATE_DEFAULT_WINDOWBITS 15 - #define DEFLATE_DEFAULT_MEMLEVEL 8 -#endif - - -int Compress(byte* out, word32 outSz, const byte* in, word32 inSz, word32 flags) -/* - * out - pointer to destination buffer - * outSz - size of destination buffer - * in - pointer to source buffer to compress - * inSz - size of source to compress - * flags - flags to control how compress operates - * - * return: - * negative - error code - * positive - bytes stored in out buffer - * - * Note, the output buffer still needs to be larger than the input buffer. - * The right chunk of data won't compress at all, and the lookup table will - * add to the size of the output. The libz code says the compressed - * buffer should be srcSz + 0.1% + 12. - */ -{ - z_stream stream; - int result = 0; - - stream.next_in = (Bytef*)in; - stream.avail_in = (uInt)inSz; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != inSz) return COMPRESS_INIT_E; -#endif - stream.next_out = out; - stream.avail_out = (uInt)outSz; - if ((uLong)stream.avail_out != outSz) return COMPRESS_INIT_E; - - stream.zalloc = (alloc_func)myAlloc; - stream.zfree = (free_func)myFree; - stream.opaque = (voidpf)0; - - if (deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, - DEFLATE_DEFAULT_WINDOWBITS, DEFLATE_DEFAULT_MEMLEVEL, - flags ? Z_FIXED : Z_DEFAULT_STRATEGY) != Z_OK) - return COMPRESS_INIT_E; - - if (deflate(&stream, Z_FINISH) != Z_STREAM_END) { - deflateEnd(&stream); - return COMPRESS_E; - } - - result = (int)stream.total_out; - - if (deflateEnd(&stream) != Z_OK) - result = COMPRESS_E; - - return result; -} - - -int DeCompress(byte* out, word32 outSz, const byte* in, word32 inSz) -/* - * out - pointer to destination buffer - * outSz - size of destination buffer - * in - pointer to source buffer to compress - * inSz - size of source to compress - * flags - flags to control how compress operates - * - * return: - * negative - error code - * positive - bytes stored in out buffer - */ -{ - z_stream stream; - int result = 0; - - stream.next_in = (Bytef*)in; - stream.avail_in = (uInt)inSz; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != inSz) return DECOMPRESS_INIT_E; - - stream.next_out = out; - stream.avail_out = (uInt)outSz; - if ((uLong)stream.avail_out != outSz) return DECOMPRESS_INIT_E; - - stream.zalloc = (alloc_func)myAlloc; - stream.zfree = (free_func)myFree; - stream.opaque = (voidpf)0; - - if (inflateInit2(&stream, DEFLATE_DEFAULT_WINDOWBITS) != Z_OK) - return DECOMPRESS_INIT_E; - - if (inflate(&stream, Z_FINISH) != Z_STREAM_END) { - inflateEnd(&stream); - return DECOMPRESS_E; - } - - result = (int)stream.total_out; - - if (inflateEnd(&stream) != Z_OK) - result = DECOMPRESS_E; - - return result; -} - - -#endif /* HAVE_LIBZ */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/des3.c b/project1/cyassl-3.0.0/ctaocrypt/src/des3.c deleted file mode 100644 index dc1aac91..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/des3.c +++ /dev/null @@ -1,1422 +0,0 @@ -/* des3.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_DES3 - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include - -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifdef HAVE_CAVIUM - static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv); - static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in, - word32 length); - static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in, - word32 length); -#endif - - - - -#ifdef STM32F2_CRYPTO - /* - * STM32F2 hardware DES/3DES support through the STM32F2 standard - * peripheral library. Documentation located in STM32F2xx Standard - * Peripheral Library document (See note in README). - */ - #include "stm32f2xx.h" - #include "stm32f2xx_cryp.h" - - int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) - { - word32 *dkey = des->key; - - XMEMCPY(dkey, key, 8); - ByteReverseWords(dkey, dkey, 8); - - Des_SetIV(des, iv); - - return 0; - } - - int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) - { - word32 *dkey1 = des->key[0]; - word32 *dkey2 = des->key[1]; - word32 *dkey3 = des->key[2]; - - XMEMCPY(dkey1, key, 8); /* set key 1 */ - XMEMCPY(dkey2, key + 8, 8); /* set key 2 */ - XMEMCPY(dkey3, key + 16, 8); /* set key 3 */ - - ByteReverseWords(dkey1, dkey1, 8); - ByteReverseWords(dkey2, dkey2, 8); - ByteReverseWords(dkey3, dkey3, 8); - - return Des3_SetIV(des, iv); - } - - void DesCrypt(Des* des, byte* out, const byte* in, word32 sz, - int dir, int mode) - { - word32 *dkey, *iv; - CRYP_InitTypeDef DES_CRYP_InitStructure; - CRYP_KeyInitTypeDef DES_CRYP_KeyInitStructure; - CRYP_IVInitTypeDef DES_CRYP_IVInitStructure; - - dkey = des->key; - iv = des->reg; - - /* crypto structure initialization */ - CRYP_KeyStructInit(&DES_CRYP_KeyInitStructure); - CRYP_StructInit(&DES_CRYP_InitStructure); - CRYP_IVStructInit(&DES_CRYP_IVInitStructure); - - /* reset registers to their default values */ - CRYP_DeInit(); - - /* set direction, mode, and datatype */ - if (dir == DES_ENCRYPTION) { - DES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; - } else { /* DES_DECRYPTION */ - DES_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; - } - - if (mode == DES_CBC) { - DES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_DES_CBC; - } else { /* DES_ECB */ - DES_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_DES_ECB; - } - - DES_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; - CRYP_Init(&DES_CRYP_InitStructure); - - /* load key into correct registers */ - DES_CRYP_KeyInitStructure.CRYP_Key1Left = dkey[0]; - DES_CRYP_KeyInitStructure.CRYP_Key1Right = dkey[1]; - CRYP_KeyInit(&DES_CRYP_KeyInitStructure); - - /* set iv */ - ByteReverseWords(iv, iv, DES_BLOCK_SIZE); - DES_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; - DES_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; - CRYP_IVInit(&DES_CRYP_IVInitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - while (sz > 0) - { - /* flush IN/OUT FIFOs */ - CRYP_FIFOFlush(); - - /* if input and output same will overwrite input iv */ - XMEMCPY(des->tmp, in + sz - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - - CRYP_DataIn(*(uint32_t*)&in[0]); - CRYP_DataIn(*(uint32_t*)&in[4]); - - /* wait until the complete message has been processed */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - *(uint32_t*)&out[0] = CRYP_DataOut(); - *(uint32_t*)&out[4] = CRYP_DataOut(); - - /* store iv for next call */ - XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); - - sz -= DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - out += DES_BLOCK_SIZE; - } - - /* disable crypto processor */ - CRYP_Cmd(DISABLE); - } - - void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des, out, in, sz, DES_ENCRYPTION, DES_CBC); - } - - void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des, out, in, sz, DES_DECRYPTION, DES_CBC); - } - - void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des, out, in, sz, DES_ENCRYPTION, DES_ECB); - } - - void Des3Crypt(Des3* des, byte* out, const byte* in, word32 sz, - int dir) - { - word32 *dkey1, *dkey2, *dkey3, *iv; - CRYP_InitTypeDef DES3_CRYP_InitStructure; - CRYP_KeyInitTypeDef DES3_CRYP_KeyInitStructure; - CRYP_IVInitTypeDef DES3_CRYP_IVInitStructure; - - dkey1 = des->key[0]; - dkey2 = des->key[1]; - dkey3 = des->key[2]; - iv = des->reg; - - /* crypto structure initialization */ - CRYP_KeyStructInit(&DES3_CRYP_KeyInitStructure); - CRYP_StructInit(&DES3_CRYP_InitStructure); - CRYP_IVStructInit(&DES3_CRYP_IVInitStructure); - - /* reset registers to their default values */ - CRYP_DeInit(); - - /* set direction, mode, and datatype */ - if (dir == DES_ENCRYPTION) { - DES3_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Encrypt; - } else { - DES3_CRYP_InitStructure.CRYP_AlgoDir = CRYP_AlgoDir_Decrypt; - } - - DES3_CRYP_InitStructure.CRYP_AlgoMode = CRYP_AlgoMode_TDES_CBC; - DES3_CRYP_InitStructure.CRYP_DataType = CRYP_DataType_8b; - CRYP_Init(&DES3_CRYP_InitStructure); - - /* load key into correct registers */ - DES3_CRYP_KeyInitStructure.CRYP_Key1Left = dkey1[0]; - DES3_CRYP_KeyInitStructure.CRYP_Key1Right = dkey1[1]; - DES3_CRYP_KeyInitStructure.CRYP_Key2Left = dkey2[0]; - DES3_CRYP_KeyInitStructure.CRYP_Key2Right = dkey2[1]; - DES3_CRYP_KeyInitStructure.CRYP_Key3Left = dkey3[0]; - DES3_CRYP_KeyInitStructure.CRYP_Key3Right = dkey3[1]; - CRYP_KeyInit(&DES3_CRYP_KeyInitStructure); - - /* set iv */ - ByteReverseWords(iv, iv, DES_BLOCK_SIZE); - DES3_CRYP_IVInitStructure.CRYP_IV0Left = iv[0]; - DES3_CRYP_IVInitStructure.CRYP_IV0Right = iv[1]; - CRYP_IVInit(&DES3_CRYP_IVInitStructure); - - /* enable crypto processor */ - CRYP_Cmd(ENABLE); - - while (sz > 0) - { - /* flush IN/OUT FIFOs */ - CRYP_FIFOFlush(); - - CRYP_DataIn(*(uint32_t*)&in[0]); - CRYP_DataIn(*(uint32_t*)&in[4]); - - /* wait until the complete message has been processed */ - while(CRYP_GetFlagStatus(CRYP_FLAG_BUSY) != RESET) {} - - *(uint32_t*)&out[0] = CRYP_DataOut(); - *(uint32_t*)&out[4] = CRYP_DataOut(); - - /* store iv for next call */ - XMEMCPY(des->reg, out + sz - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - - sz -= DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - out += DES_BLOCK_SIZE; - } - - /* disable crypto processor */ - CRYP_Cmd(DISABLE); - - } - - int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - Des3Crypt(des, out, in, sz, DES_ENCRYPTION); - return 0; - } - - int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - Des3Crypt(des, out, in, sz, DES_DECRYPTION); - return 0; - } - - -#elif defined(HAVE_COLDFIRE_SEC) - -#include "sec.h" -#include "mcf548x_sec.h" - -#include "memory_pools.h" -extern TX_BYTE_POOL mp_ncached; /* Non Cached memory pool */ -#define DES_BUFFER_SIZE (DES_BLOCK_SIZE * 16) -static unsigned char *DesBuffer = NULL ; - -#define SEC_DESC_DES_CBC_ENCRYPT 0x20500010 -#define SEC_DESC_DES_CBC_DECRYPT 0x20400010 -#define SEC_DESC_DES3_CBC_ENCRYPT 0x20700010 -#define SEC_DESC_DES3_CBC_DECRYPT 0x20600010 - -extern volatile unsigned char __MBAR[]; - -static void Des_Cbc(Des* des, byte* out, const byte* in, word32 sz, word32 desc) -{ - static volatile SECdescriptorType descriptor = { NULL } ; - int ret ; int stat1,stat2 ; - int i ; int size ; - volatile int v ; - - while(sz) { - if((sz%DES_BUFFER_SIZE) == sz) { - size = sz ; - sz = 0 ; - } else { - size = DES_BUFFER_SIZE ; - sz -= DES_BUFFER_SIZE ; - } - - descriptor.header = desc ; - /* - escriptor.length1 = 0x0; - descriptor.pointer1 = NULL; - */ - descriptor.length2 = des->ivlen ; - descriptor.pointer2 = (byte *)des->iv ; - descriptor.length3 = des->keylen ; - descriptor.pointer3 = (byte *)des->key; - descriptor.length4 = size; - descriptor.pointer4 = (byte *)in ; - descriptor.length5 = size; - descriptor.pointer5 = DesBuffer ; - /* - descriptor.length6 = 0; - descriptor.pointer6 = NULL; - descriptor.length7 = 0x0; - descriptor.pointer7 = NULL; - descriptor.nextDescriptorPtr = NULL ; - */ - - /* Initialize SEC and wait for encryption to complete */ - MCF_SEC_CCCR0 = 0x0000001A; //enable channel done notification - - /* Point SEC to the location of the descriptor */ - MCF_SEC_FR0 = (uint32)&descriptor; - - /* poll SISR to determine when channel is complete */ - while (!(MCF_SEC_SISRL) && !(MCF_SEC_SISRH)) - ; - - for(v=0; v<500; v++) ; - - ret = MCF_SEC_SISRH; - stat1 = MCF_SEC_DSR ; - stat2 = MCF_SEC_DISR ; - if(ret & 0xe0000000) - db_printf("Des_Cbc(%x):ISRH=%08x, DSR=%08x, DISR=%08x\n", desc, ret, stat1, stat2) ; - - XMEMCPY(out, DesBuffer, size) ; - - if((desc==SEC_DESC_DES3_CBC_ENCRYPT)||(desc==SEC_DESC_DES_CBC_ENCRYPT)) { - XMEMCPY((void*)des->iv, (void*)&(out[size-DES_IVLEN]), DES_IVLEN) ; - } else { - XMEMCPY((void*)des->iv, (void*)&(in[size-DES_IVLEN]), DES_IVLEN) ; - } - - in += size ; - out += size ; - - } -} - - -void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) -{ - Des_Cbc(des, out, in, sz, SEC_DESC_DES_CBC_ENCRYPT) ; -} - -void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) -{ - Des_Cbc(des, out, in, sz, SEC_DESC_DES_CBC_DECRYPT) ; -} - -int Des3_CbcEncrypt(Des3* des3, byte* out, const byte* in, word32 sz) -{ - Des_Cbc((Des *)des3, out, in, sz, SEC_DESC_DES3_CBC_ENCRYPT) ; - return 0; -} - -int Des3_CbcDecrypt(Des3* des3, byte* out, const byte* in, word32 sz) -{ - Des_Cbc((Des *)des3, out, in, sz, SEC_DESC_DES3_CBC_DECRYPT) ; - return 0; -} - - -int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) -{ - int i ; int status ; - - if(DesBuffer == NULL) { - status = tx_byte_allocate(&mp_ncached,(void *)&DesBuffer,DES_BUFFER_SIZE,TX_NO_WAIT); - } - - XMEMCPY(des->key, key, DES_KEYLEN); - des->keylen = DES_KEYLEN ; - des->ivlen = 0 ; - if (iv) { - XMEMCPY(des->iv, iv, DES_IVLEN); - des->ivlen = DES_IVLEN ; - } else { - for(i=0; iiv[i] = 0x0 ; - } - - return 0; -} - -int Des3_SetKey(Des3* des3, const byte* key, const byte* iv, int dir) -{ - int i ; int status ; - - if(DesBuffer == NULL) { - status = tx_byte_allocate(&mp_ncached,(void *)&DesBuffer,DES_BUFFER_SIZE,TX_NO_WAIT); - } - - XMEMCPY(des3->key, key, DES3_KEYLEN); - des3->keylen = DES3_KEYLEN ; - des3->ivlen = 0 ; - if (iv) { - XMEMCPY(des3->iv, iv, DES3_IVLEN); - des3->ivlen = DES3_IVLEN ; - } else { - for(i=0; iiv[i] = 0x0 ; - } - - return 0; -} - -#elif defined FREESCALE_MMCAU - /* - * Freescale mmCAU hardware DES/3DES support through the CAU/mmCAU library. - * Documentation located in ColdFire/ColdFire+ CAU and Kinetis mmCAU - * Software Library User Guide (See note in README). - */ - #include "cau_api.h" - - const unsigned char parityLookup[128] = - { - 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, - 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, - 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, - 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0 - }; - - int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) - { - int i = 0; - byte* dkey = (byte*)des->key; - - XMEMCPY(dkey, key, 8); - - Des_SetIV(des, iv); - - /* fix key parity, if needed */ - for (i = 0; i < 8; i++) { - dkey[i] = ((dkey[i] & 0xFE) | parityLookup[dkey[i] >> 1]); - } - - return 0; - } - - int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) - { - int i = 0, ret = 0; - byte* dkey1 = (byte*)des->key[0]; - byte* dkey2 = (byte*)des->key[1]; - byte* dkey3 = (byte*)des->key[2]; - - XMEMCPY(dkey1, key, 8); /* set key 1 */ - XMEMCPY(dkey2, key + 8, 8); /* set key 2 */ - XMEMCPY(dkey3, key + 16, 8); /* set key 3 */ - - ret = Des3_SetIV(des, iv); - if (ret != 0) - return ret; - - /* fix key parity if needed */ - for (i = 0; i < 8; i++) - dkey1[i] = ((dkey1[i] & 0xFE) | parityLookup[dkey1[i] >> 1]); - - for (i = 0; i < 8; i++) - dkey2[i] = ((dkey2[i] & 0xFE) | parityLookup[dkey2[i] >> 1]); - - for (i = 0; i < 8; i++) - dkey3[i] = ((dkey3[i] & 0xFE) | parityLookup[dkey3[i] >> 1]); - - return ret; - } - - void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - byte *iv; - byte temp_block[DES_BLOCK_SIZE]; - - iv = (byte*)des->reg; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); - - /* XOR block with IV for CBC */ - for (i = 0; i < DES_BLOCK_SIZE; i++) - temp_block[i] ^= iv[i]; - - cau_des_encrypt(temp_block, (byte*)des->key, out + offset); - - len -= DES_BLOCK_SIZE; - offset += DES_BLOCK_SIZE; - - /* store IV for next block */ - XMEMCPY(iv, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - } - - return; - } - - void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - byte* iv; - byte temp_block[DES_BLOCK_SIZE]; - - iv = (byte*)des->reg; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); - - cau_des_decrypt(in + offset, (byte*)des->key, out + offset); - - /* XOR block with IV for CBC */ - for (i = 0; i < DES_BLOCK_SIZE; i++) - (out + offset)[i] ^= iv[i]; - - /* store IV for next block */ - XMEMCPY(iv, temp_block, DES_BLOCK_SIZE); - - len -= DES_BLOCK_SIZE; - offset += DES_BLOCK_SIZE; - } - - return; - } - - int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - - byte *iv; - byte temp_block[DES_BLOCK_SIZE]; - - iv = (byte*)des->reg; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); - - /* XOR block with IV for CBC */ - for (i = 0; i < DES_BLOCK_SIZE; i++) - temp_block[i] ^= iv[i]; - - cau_des_encrypt(temp_block , (byte*)des->key[0], out + offset); - cau_des_decrypt(out + offset, (byte*)des->key[1], out + offset); - cau_des_encrypt(out + offset, (byte*)des->key[2], out + offset); - - len -= DES_BLOCK_SIZE; - offset += DES_BLOCK_SIZE; - - /* store IV for next block */ - XMEMCPY(iv, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - } - - return 0; - } - - int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - int i; - int offset = 0; - int len = sz; - - byte* iv; - byte temp_block[DES_BLOCK_SIZE]; - - iv = (byte*)des->reg; - - while (len > 0) - { - XMEMCPY(temp_block, in + offset, DES_BLOCK_SIZE); - - cau_des_decrypt(in + offset , (byte*)des->key[2], out + offset); - cau_des_encrypt(out + offset, (byte*)des->key[1], out + offset); - cau_des_decrypt(out + offset, (byte*)des->key[0], out + offset); - - /* XOR block with IV for CBC */ - for (i = 0; i < DES_BLOCK_SIZE; i++) - (out + offset)[i] ^= iv[i]; - - /* store IV for next block */ - XMEMCPY(iv, temp_block, DES_BLOCK_SIZE); - - len -= DES_BLOCK_SIZE; - offset += DES_BLOCK_SIZE; - } - - return 0; - } - - -#elif defined(CYASSL_PIC32MZ_CRYPT) - - #include "../../cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h" - -void Des_SetIV(Des* des, const byte* iv); -int Des3_SetIV(Des3* des, const byte* iv); - - int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) - { - word32 *dkey = des->key ; - word32 *dreg = des->reg ; - - XMEMCPY((byte *)dkey, (byte *)key, 8); - ByteReverseWords(dkey, dkey, 8); - XMEMCPY((byte *)dreg, (byte *)iv, 8); - ByteReverseWords(dreg, dreg, 8); - - return 0; - } - - int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) - { - word32 *dkey1 = des->key[0]; - word32 *dreg = des->reg ; - - XMEMCPY(dkey1, key, 24); - ByteReverseWords(dkey1, dkey1, 24); - XMEMCPY(dreg, iv, 8); - ByteReverseWords(dreg, dreg, 8) ; - - return 0; - } - - void DesCrypt(word32 *key, word32 *iv, byte* out, const byte* in, word32 sz, - int dir, int algo, int cryptoalgo) - { - securityAssociation *sa_p ; - bufferDescriptor *bd_p ; - const byte *in_p, *in_l ; - byte *out_p, *out_l ; - volatile securityAssociation sa __attribute__((aligned (8))); - volatile bufferDescriptor bd __attribute__((aligned (8))); - volatile int k ; - - /* get uncached address */ - - in_l = in; - out_l = out ; - sa_p = KVA0_TO_KVA1(&sa) ; - bd_p = KVA0_TO_KVA1(&bd) ; - in_p = KVA0_TO_KVA1(in_l) ; - out_p= KVA0_TO_KVA1(out_l); - - if(PIC32MZ_IF_RAM(in_p)) - XMEMCPY((void *)in_p, (void *)in, sz); - XMEMSET((void *)out_p, 0, sz); - - /* Set up the Security Association */ - XMEMSET((byte *)KVA0_TO_KVA1(&sa), 0, sizeof(sa)); - sa_p->SA_CTRL.ALGO = algo ; - sa_p->SA_CTRL.LNC = 1; - sa_p->SA_CTRL.LOADIV = 1; - sa_p->SA_CTRL.FB = 1; - sa_p->SA_CTRL.ENCTYPE = dir ; /* Encryption/Decryption */ - sa_p->SA_CTRL.CRYPTOALGO = cryptoalgo; - sa_p->SA_CTRL.KEYSIZE = 1 ; /* KEY is 192 bits */ - XMEMCPY((byte *)KVA0_TO_KVA1(&sa.SA_ENCKEY[algo==PIC32_ALGO_TDES ? 2 : 6]), - (byte *)key, algo==PIC32_ALGO_TDES ? 24 : 8); - XMEMCPY((byte *)KVA0_TO_KVA1(&sa.SA_ENCIV[2]), (byte *)iv, 8); - - XMEMSET((byte *)KVA0_TO_KVA1(&bd), 0, sizeof(bd)); - /* Set up the Buffer Descriptor */ - bd_p->BD_CTRL.BUFLEN = sz; - bd_p->BD_CTRL.LIFM = 1; - bd_p->BD_CTRL.SA_FETCH_EN = 1; - bd_p->BD_CTRL.LAST_BD = 1; - bd_p->BD_CTRL.DESC_EN = 1; - - bd_p->SA_ADDR = (unsigned int)KVA_TO_PA(&sa) ; // (unsigned int)sa_p ; - bd_p->SRCADDR = (unsigned int)KVA_TO_PA(in) ; // (unsigned int)in_p ; - bd_p->DSTADDR = (unsigned int)KVA_TO_PA(out); // (unsigned int)out_p ; - bd_p->NXTPTR = (unsigned int)KVA_TO_PA(&bd); - bd_p->MSGLEN = sz ; - - /* Fire in the hole! */ - CECON = 1 << 6; - while (CECON); - - /* Run the engine */ - CEBDPADDR = (unsigned int)KVA_TO_PA(&bd) ; // (unsigned int)bd_p ; - CEINTEN = 0x07; - CECON = 0x27; - - WAIT_ENGINE ; - - if((cryptoalgo == PIC32_CRYPTOALGO_CBC) || - (cryptoalgo == PIC32_CRYPTOALGO_TCBC)|| - (cryptoalgo == PIC32_CRYPTOALGO_RCBC)) { - /* set iv for the next call */ - if(dir == PIC32_ENCRYPTION) { - XMEMCPY((void *)iv, (void*)&(out_p[sz-DES_IVLEN]), DES_IVLEN) ; - } else { - ByteReverseWords((word32*)iv, (word32 *)&(in_p[sz-DES_IVLEN]), DES_IVLEN); - } - - } - - ByteReverseWords((word32*)out, (word32 *)KVA0_TO_KVA1(out), sz); - } - - void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des->key, des->reg, out, in, sz, - PIC32_ENCRYPTION, PIC32_ALGO_DES, PIC32_CRYPTOALGO_CBC ); - } - - void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des->key, des->reg, out, in, sz, - PIC32_DECRYPTION, PIC32_ALGO_DES, PIC32_CRYPTOALGO_CBC); - } - - int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des->key[0], des->reg, out, in, sz, - PIC32_ENCRYPTION, PIC32_ALGO_TDES, PIC32_CRYPTOALGO_TCBC); - return 0; - } - - int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - DesCrypt(des->key[0], des->reg, out, in, sz, - PIC32_DECRYPTION, PIC32_ALGO_TDES, PIC32_CRYPTOALGO_TCBC); - return 0; - } - -#else /* CTaoCrypt software implementation */ - -/* permuted choice table (key) */ -static const byte pc1[] = { - 57, 49, 41, 33, 25, 17, 9, - 1, 58, 50, 42, 34, 26, 18, - 10, 2, 59, 51, 43, 35, 27, - 19, 11, 3, 60, 52, 44, 36, - - 63, 55, 47, 39, 31, 23, 15, - 7, 62, 54, 46, 38, 30, 22, - 14, 6, 61, 53, 45, 37, 29, - 21, 13, 5, 28, 20, 12, 4 -}; - -/* number left rotations of pc1 */ -static const byte totrot[] = { - 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 -}; - -/* permuted choice key (table) */ -static const byte pc2[] = { - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 -}; - -/* End of DES-defined tables */ - -/* bit 0 is left-most in byte */ -static const int bytebit[] = { - 0200,0100,040,020,010,04,02,01 -}; - -static const word32 Spbox[8][64] = { -{ -0x01010400,0x00000000,0x00010000,0x01010404, -0x01010004,0x00010404,0x00000004,0x00010000, -0x00000400,0x01010400,0x01010404,0x00000400, -0x01000404,0x01010004,0x01000000,0x00000004, -0x00000404,0x01000400,0x01000400,0x00010400, -0x00010400,0x01010000,0x01010000,0x01000404, -0x00010004,0x01000004,0x01000004,0x00010004, -0x00000000,0x00000404,0x00010404,0x01000000, -0x00010000,0x01010404,0x00000004,0x01010000, -0x01010400,0x01000000,0x01000000,0x00000400, -0x01010004,0x00010000,0x00010400,0x01000004, -0x00000400,0x00000004,0x01000404,0x00010404, -0x01010404,0x00010004,0x01010000,0x01000404, -0x01000004,0x00000404,0x00010404,0x01010400, -0x00000404,0x01000400,0x01000400,0x00000000, -0x00010004,0x00010400,0x00000000,0x01010004}, -{ -0x80108020,0x80008000,0x00008000,0x00108020, -0x00100000,0x00000020,0x80100020,0x80008020, -0x80000020,0x80108020,0x80108000,0x80000000, -0x80008000,0x00100000,0x00000020,0x80100020, -0x00108000,0x00100020,0x80008020,0x00000000, -0x80000000,0x00008000,0x00108020,0x80100000, -0x00100020,0x80000020,0x00000000,0x00108000, -0x00008020,0x80108000,0x80100000,0x00008020, -0x00000000,0x00108020,0x80100020,0x00100000, -0x80008020,0x80100000,0x80108000,0x00008000, -0x80100000,0x80008000,0x00000020,0x80108020, -0x00108020,0x00000020,0x00008000,0x80000000, -0x00008020,0x80108000,0x00100000,0x80000020, -0x00100020,0x80008020,0x80000020,0x00100020, -0x00108000,0x00000000,0x80008000,0x00008020, -0x80000000,0x80100020,0x80108020,0x00108000}, -{ -0x00000208,0x08020200,0x00000000,0x08020008, -0x08000200,0x00000000,0x00020208,0x08000200, -0x00020008,0x08000008,0x08000008,0x00020000, -0x08020208,0x00020008,0x08020000,0x00000208, -0x08000000,0x00000008,0x08020200,0x00000200, -0x00020200,0x08020000,0x08020008,0x00020208, -0x08000208,0x00020200,0x00020000,0x08000208, -0x00000008,0x08020208,0x00000200,0x08000000, -0x08020200,0x08000000,0x00020008,0x00000208, -0x00020000,0x08020200,0x08000200,0x00000000, -0x00000200,0x00020008,0x08020208,0x08000200, -0x08000008,0x00000200,0x00000000,0x08020008, -0x08000208,0x00020000,0x08000000,0x08020208, -0x00000008,0x00020208,0x00020200,0x08000008, -0x08020000,0x08000208,0x00000208,0x08020000, -0x00020208,0x00000008,0x08020008,0x00020200}, -{ -0x00802001,0x00002081,0x00002081,0x00000080, -0x00802080,0x00800081,0x00800001,0x00002001, -0x00000000,0x00802000,0x00802000,0x00802081, -0x00000081,0x00000000,0x00800080,0x00800001, -0x00000001,0x00002000,0x00800000,0x00802001, -0x00000080,0x00800000,0x00002001,0x00002080, -0x00800081,0x00000001,0x00002080,0x00800080, -0x00002000,0x00802080,0x00802081,0x00000081, -0x00800080,0x00800001,0x00802000,0x00802081, -0x00000081,0x00000000,0x00000000,0x00802000, -0x00002080,0x00800080,0x00800081,0x00000001, -0x00802001,0x00002081,0x00002081,0x00000080, -0x00802081,0x00000081,0x00000001,0x00002000, -0x00800001,0x00002001,0x00802080,0x00800081, -0x00002001,0x00002080,0x00800000,0x00802001, -0x00000080,0x00800000,0x00002000,0x00802080}, -{ -0x00000100,0x02080100,0x02080000,0x42000100, -0x00080000,0x00000100,0x40000000,0x02080000, -0x40080100,0x00080000,0x02000100,0x40080100, -0x42000100,0x42080000,0x00080100,0x40000000, -0x02000000,0x40080000,0x40080000,0x00000000, -0x40000100,0x42080100,0x42080100,0x02000100, -0x42080000,0x40000100,0x00000000,0x42000000, -0x02080100,0x02000000,0x42000000,0x00080100, -0x00080000,0x42000100,0x00000100,0x02000000, -0x40000000,0x02080000,0x42000100,0x40080100, -0x02000100,0x40000000,0x42080000,0x02080100, -0x40080100,0x00000100,0x02000000,0x42080000, -0x42080100,0x00080100,0x42000000,0x42080100, -0x02080000,0x00000000,0x40080000,0x42000000, -0x00080100,0x02000100,0x40000100,0x00080000, -0x00000000,0x40080000,0x02080100,0x40000100}, -{ -0x20000010,0x20400000,0x00004000,0x20404010, -0x20400000,0x00000010,0x20404010,0x00400000, -0x20004000,0x00404010,0x00400000,0x20000010, -0x00400010,0x20004000,0x20000000,0x00004010, -0x00000000,0x00400010,0x20004010,0x00004000, -0x00404000,0x20004010,0x00000010,0x20400010, -0x20400010,0x00000000,0x00404010,0x20404000, -0x00004010,0x00404000,0x20404000,0x20000000, -0x20004000,0x00000010,0x20400010,0x00404000, -0x20404010,0x00400000,0x00004010,0x20000010, -0x00400000,0x20004000,0x20000000,0x00004010, -0x20000010,0x20404010,0x00404000,0x20400000, -0x00404010,0x20404000,0x00000000,0x20400010, -0x00000010,0x00004000,0x20400000,0x00404010, -0x00004000,0x00400010,0x20004010,0x00000000, -0x20404000,0x20000000,0x00400010,0x20004010}, -{ -0x00200000,0x04200002,0x04000802,0x00000000, -0x00000800,0x04000802,0x00200802,0x04200800, -0x04200802,0x00200000,0x00000000,0x04000002, -0x00000002,0x04000000,0x04200002,0x00000802, -0x04000800,0x00200802,0x00200002,0x04000800, -0x04000002,0x04200000,0x04200800,0x00200002, -0x04200000,0x00000800,0x00000802,0x04200802, -0x00200800,0x00000002,0x04000000,0x00200800, -0x04000000,0x00200800,0x00200000,0x04000802, -0x04000802,0x04200002,0x04200002,0x00000002, -0x00200002,0x04000000,0x04000800,0x00200000, -0x04200800,0x00000802,0x00200802,0x04200800, -0x00000802,0x04000002,0x04200802,0x04200000, -0x00200800,0x00000000,0x00000002,0x04200802, -0x00000000,0x00200802,0x04200000,0x00000800, -0x04000002,0x04000800,0x00000800,0x00200002}, -{ -0x10001040,0x00001000,0x00040000,0x10041040, -0x10000000,0x10001040,0x00000040,0x10000000, -0x00040040,0x10040000,0x10041040,0x00041000, -0x10041000,0x00041040,0x00001000,0x00000040, -0x10040000,0x10000040,0x10001000,0x00001040, -0x00041000,0x00040040,0x10040040,0x10041000, -0x00001040,0x00000000,0x00000000,0x10040040, -0x10000040,0x10001000,0x00041040,0x00040000, -0x00041040,0x00040000,0x10041000,0x00001000, -0x00000040,0x10040040,0x00001000,0x00041040, -0x10001000,0x00000040,0x10000040,0x10040000, -0x10040040,0x10000000,0x00040000,0x10001040, -0x00000000,0x10041040,0x00040040,0x10000040, -0x10040000,0x10001000,0x10001040,0x00000000, -0x10041040,0x00041000,0x00041000,0x00001040, -0x00001040,0x00040040,0x10000000,0x10041000} -}; - - -static INLINE void IPERM(word32* left, word32* right) -{ - word32 work; - - *right = rotlFixed(*right, 4U); - work = (*left ^ *right) & 0xf0f0f0f0; - *left ^= work; - - *right = rotrFixed(*right^work, 20U); - work = (*left ^ *right) & 0xffff0000; - *left ^= work; - - *right = rotrFixed(*right^work, 18U); - work = (*left ^ *right) & 0x33333333; - *left ^= work; - - *right = rotrFixed(*right^work, 6U); - work = (*left ^ *right) & 0x00ff00ff; - *left ^= work; - - *right = rotlFixed(*right^work, 9U); - work = (*left ^ *right) & 0xaaaaaaaa; - *left = rotlFixed(*left^work, 1U); - *right ^= work; -} - - -static INLINE void FPERM(word32* left, word32* right) -{ - word32 work; - - *right = rotrFixed(*right, 1U); - work = (*left ^ *right) & 0xaaaaaaaa; - *right ^= work; - - *left = rotrFixed(*left^work, 9U); - work = (*left ^ *right) & 0x00ff00ff; - *right ^= work; - - *left = rotlFixed(*left^work, 6U); - work = (*left ^ *right) & 0x33333333; - *right ^= work; - - *left = rotlFixed(*left^work, 18U); - work = (*left ^ *right) & 0xffff0000; - *right ^= work; - - *left = rotlFixed(*left^work, 20U); - work = (*left ^ *right) & 0xf0f0f0f0; - *right ^= work; - - *left = rotrFixed(*left^work, 4U); -} - - -static int DesSetKey(const byte* key, int dir, word32* out) -{ -#ifdef CYASSL_SMALL_STACK - byte* buffer = (byte*)XMALLOC(56+56+8, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - if (buffer == NULL) - return MEMORY_E; -#else - byte buffer[56+56+8]; -#endif - - { - byte* const pc1m = buffer; /* place to modify pc1 into */ - byte* const pcr = pc1m + 56; /* place to rotate pc1 into */ - byte* const ks = pcr + 56; - register int i, j, l; - int m; - - for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */ - l = pc1[j] - 1; /* integer bit location */ - m = l & 07; /* find bit */ - pc1m[j] = (key[l >> 3] & /* find which key byte l is in */ - bytebit[m]) /* and which bit of that byte */ - ? 1 : 0; /* and store 1-bit result */ - } - - for (i = 0; i < 16; i++) { /* key chunk for each iteration */ - XMEMSET(ks, 0, 8); /* Clear key schedule */ - - for (j = 0; j < 56; j++) /* rotate pc1 the right amount */ - pcr[j] = - pc1m[(l = j + totrot[i]) < (j < 28 ? 28 : 56) ? l : l-28]; - - /* rotate left and right halves independently */ - for (j = 0; j < 48; j++) { /* select bits individually */ - if (pcr[pc2[j] - 1]) { /* check bit that goes to ks[j] */ - l= j % 6; /* mask it in if it's there */ - ks[j/6] |= bytebit[l] >> 2; - } - } - - /* Now convert to odd/even interleaved form for use in F */ - out[2*i] = ((word32) ks[0] << 24) - | ((word32) ks[2] << 16) - | ((word32) ks[4] << 8) - | ((word32) ks[6]); - - out[2*i + 1] = ((word32) ks[1] << 24) - | ((word32) ks[3] << 16) - | ((word32) ks[5] << 8) - | ((word32) ks[7]); - } - - /* reverse key schedule order */ - if (dir == DES_DECRYPTION) { - for (i = 0; i < 16; i += 2) { - word32 swap = out[i]; - out[i] = out[DES_KS_SIZE - 2 - i]; - out[DES_KS_SIZE - 2 - i] = swap; - - swap = out[i + 1]; - out[i + 1] = out[DES_KS_SIZE - 1 - i]; - out[DES_KS_SIZE - 1 - i] = swap; - } - } - -#ifdef CYASSL_SMALL_STACK - XFREE(buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - } - - return 0; -} - - -static INLINE int Reverse(int dir) -{ - return !dir; -} - - -int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) -{ - Des_SetIV(des, iv); - - return DesSetKey(key, dir, des->key); -} - - -int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) -{ - int ret; - -#ifdef HAVE_CAVIUM - if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) - return Des3_CaviumSetKey(des, key, iv); -#endif - - ret = DesSetKey(key + (dir == DES_ENCRYPTION ? 0:16), dir, des->key[0]); - if (ret != 0) - return ret; - - ret = DesSetKey(key + 8, Reverse(dir), des->key[1]); - if (ret != 0) - return ret; - - ret = DesSetKey(key + (dir == DES_DECRYPTION ? 0:16), dir, des->key[2]); - if (ret != 0) - return ret; - - return Des3_SetIV(des, iv); -} - - -static void DesRawProcessBlock(word32* lIn, word32* rIn, const word32* kptr) -{ - word32 l = *lIn, r = *rIn, i; - - for (i=0; i<8; i++) - { - word32 work = rotrFixed(r, 4U) ^ kptr[4*i+0]; - l ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = r ^ kptr[4*i+1]; - l ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - - work = rotrFixed(l, 4U) ^ kptr[4*i+2]; - r ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = l ^ kptr[4*i+3]; - r ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - } - - *lIn = l; *rIn = r; -} - - -static void DesProcessBlock(Des* des, const byte* in, byte* out) -{ - word32 l, r; - - XMEMCPY(&l, in, sizeof(l)); - XMEMCPY(&r, in + sizeof(l), sizeof(r)); - #ifdef LITTLE_ENDIAN_ORDER - l = ByteReverseWord32(l); - r = ByteReverseWord32(r); - #endif - IPERM(&l,&r); - - DesRawProcessBlock(&l, &r, des->key); - - FPERM(&l,&r); - #ifdef LITTLE_ENDIAN_ORDER - l = ByteReverseWord32(l); - r = ByteReverseWord32(r); - #endif - XMEMCPY(out, &r, sizeof(r)); - XMEMCPY(out + sizeof(r), &l, sizeof(l)); -} - - -static void Des3ProcessBlock(Des3* des, const byte* in, byte* out) -{ - word32 l, r; - - XMEMCPY(&l, in, sizeof(l)); - XMEMCPY(&r, in + sizeof(l), sizeof(r)); - #ifdef LITTLE_ENDIAN_ORDER - l = ByteReverseWord32(l); - r = ByteReverseWord32(r); - #endif - IPERM(&l,&r); - - DesRawProcessBlock(&l, &r, des->key[0]); - DesRawProcessBlock(&r, &l, des->key[1]); - DesRawProcessBlock(&l, &r, des->key[2]); - - FPERM(&l,&r); - #ifdef LITTLE_ENDIAN_ORDER - l = ByteReverseWord32(l); - r = ByteReverseWord32(r); - #endif - XMEMCPY(out, &r, sizeof(r)); - XMEMCPY(out + sizeof(r), &l, sizeof(l)); -} - - -void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / DES_BLOCK_SIZE; - - while (blocks--) { - xorbuf((byte*)des->reg, in, DES_BLOCK_SIZE); - DesProcessBlock(des, (byte*)des->reg, (byte*)des->reg); - XMEMCPY(out, des->reg, DES_BLOCK_SIZE); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } -} - - -void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / DES_BLOCK_SIZE; - byte hold[DES_BLOCK_SIZE]; - - while (blocks--) { - XMEMCPY(des->tmp, in, DES_BLOCK_SIZE); - DesProcessBlock(des, (byte*)des->tmp, out); - xorbuf(out, (byte*)des->reg, DES_BLOCK_SIZE); - - XMEMCPY(hold, des->reg, DES_BLOCK_SIZE); - XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); - XMEMCPY(des->tmp, hold, DES_BLOCK_SIZE); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } -} - - -int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) -{ - word32 blocks; - -#ifdef HAVE_CAVIUM - if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) - return Des3_CaviumCbcEncrypt(des, out, in, sz); -#endif - - blocks = sz / DES_BLOCK_SIZE; - while (blocks--) { - xorbuf((byte*)des->reg, in, DES_BLOCK_SIZE); - Des3ProcessBlock(des, (byte*)des->reg, (byte*)des->reg); - XMEMCPY(out, des->reg, DES_BLOCK_SIZE); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } - return 0; -} - - -int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) -{ - word32 blocks; - -#ifdef HAVE_CAVIUM - if (des->magic == CYASSL_3DES_CAVIUM_MAGIC) - return Des3_CaviumCbcDecrypt(des, out, in, sz); -#endif - - blocks = sz / DES_BLOCK_SIZE; - while (blocks--) { - XMEMCPY(des->tmp, in, DES_BLOCK_SIZE); - Des3ProcessBlock(des, (byte*)des->tmp, out); - xorbuf(out, (byte*)des->reg, DES_BLOCK_SIZE); - XMEMCPY(des->reg, des->tmp, DES_BLOCK_SIZE); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } - return 0; -} - -#ifdef CYASSL_DES_ECB - -/* One block, compatibility only */ -void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / DES_BLOCK_SIZE; - - while (blocks--) { - DesProcessBlock(des, in, out); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } -} - -#endif /* CYASSL_DES_ECB */ - -#endif /* STM32F2_CRYPTO */ - -void Des_SetIV(Des* des, const byte* iv) -{ - if (des && iv) - XMEMCPY(des->reg, iv, DES_BLOCK_SIZE); - else if (des) - XMEMSET(des->reg, 0, DES_BLOCK_SIZE); -} - - -int Des3_SetIV(Des3* des, const byte* iv) -{ - if (des && iv) - XMEMCPY(des->reg, iv, DES_BLOCK_SIZE); - else if (des) - XMEMSET(des->reg, 0, DES_BLOCK_SIZE); - - return 0; -} - - -#ifdef HAVE_CAVIUM - -#include -#include "cavium_common.h" - -/* Initiliaze Des3 for use with Nitrox device */ -int Des3_InitCavium(Des3* des3, int devId) -{ - if (des3 == NULL) - return -1; - - if (CspAllocContext(CONTEXT_SSL, &des3->contextHandle, devId) != 0) - return -1; - - des3->devId = devId; - des3->magic = CYASSL_3DES_CAVIUM_MAGIC; - - return 0; -} - - -/* Free Des3 from use with Nitrox device */ -void Des3_FreeCavium(Des3* des3) -{ - if (des3 == NULL) - return; - - if (des3->magic != CYASSL_3DES_CAVIUM_MAGIC) - return; - - CspFreeContext(CONTEXT_SSL, des3->contextHandle, des3->devId); - des3->magic = 0; -} - - -static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv) -{ - if (des3 == NULL) - return -1; - - /* key[0] holds key, iv in reg */ - XMEMCPY(des3->key[0], key, DES_BLOCK_SIZE*3); - - return Des3_SetIV(des3, iv); -} - - -static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in, - word32 length) -{ - word offset = 0; - word32 requestId; - - while (length > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - if (CspEncrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, - CAVIUM_NO_UPDATE, slen, (byte*)in + offset, - out + offset, (byte*)des3->reg, (byte*)des3->key[0], - &requestId, des3->devId) != 0) { - CYASSL_MSG("Bad Cavium 3DES Cbc Encrypt"); - return -1; - } - length -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - XMEMCPY(des3->reg, out + offset - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - } - if (length) { - word16 slen = (word16)length; - - if (CspEncrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, - CAVIUM_NO_UPDATE, slen, (byte*)in + offset, - out + offset, (byte*)des3->reg, (byte*)des3->key[0], - &requestId, des3->devId) != 0) { - CYASSL_MSG("Bad Cavium 3DES Cbc Encrypt"); - return -1; - } - XMEMCPY(des3->reg, out+offset+length - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - } - return 0; -} - -static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in, - word32 length) -{ - word32 requestId; - word offset = 0; - - while (length > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - XMEMCPY(des3->tmp, in + offset + slen - DES_BLOCK_SIZE, DES_BLOCK_SIZE); - if (CspDecrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, - CAVIUM_NO_UPDATE, slen, (byte*)in+offset, out+offset, - (byte*)des3->reg, (byte*)des3->key[0], &requestId, - des3->devId) != 0) { - CYASSL_MSG("Bad Cavium 3Des Decrypt"); - return -1; - } - length -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - XMEMCPY(des3->reg, des3->tmp, DES_BLOCK_SIZE); - } - if (length) { - word16 slen = (word16)length; - XMEMCPY(des3->tmp, in + offset + slen - DES_BLOCK_SIZE,DES_BLOCK_SIZE); - if (CspDecrypt3Des(CAVIUM_BLOCKING, des3->contextHandle, - CAVIUM_NO_UPDATE, slen, (byte*)in+offset, out+offset, - (byte*)des3->reg, (byte*)des3->key[0], &requestId, - des3->devId) != 0) { - CYASSL_MSG("Bad Cavium 3Des Decrypt"); - return -1; - } - XMEMCPY(des3->reg, des3->tmp, DES_BLOCK_SIZE); - } - return 0; -} - -#endif /* HAVE_CAVIUM */ - -#endif /* NO_DES3 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/dh.c b/project1/cyassl-3.0.0/ctaocrypt/src/dh.c deleted file mode 100644 index 1e1dd704..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/dh.c +++ /dev/null @@ -1,178 +0,0 @@ -/* dh.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_DH - -#include -#include - -#ifndef USER_MATH_LIB - #include - #define XPOW(x,y) pow((x),(y)) - #define XLOG(x) log((x)) -#else - /* user's own math lib */ -#endif - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -void InitDhKey(DhKey* key) -{ - (void)key; -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - key->p.dp = 0; - key->g.dp = 0; -#endif -} - - -void FreeDhKey(DhKey* key) -{ - (void)key; -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - mp_clear(&key->p); - mp_clear(&key->g); -#endif -} - - -static word32 DiscreteLogWorkFactor(word32 n) -{ - /* assuming discrete log takes about the same time as factoring */ - if (n<5) - return 0; - else - return (word32)(2.4 * XPOW((double)n, 1.0/3.0) * - XPOW(XLOG((double)n), 2.0/3.0) - 5); -} - - -static int GeneratePrivate(DhKey* key, RNG* rng, byte* priv, word32* privSz) -{ - int ret; - word32 sz = mp_unsigned_bin_size(&key->p); - sz = min(sz, 2 * DiscreteLogWorkFactor(sz * CYASSL_BIT_SIZE) / - CYASSL_BIT_SIZE + 1); - - ret = RNG_GenerateBlock(rng, priv, sz); - if (ret != 0) - return ret; - - priv[0] |= 0x0C; - - *privSz = sz; - - return 0; -} - - -static int GeneratePublic(DhKey* key, const byte* priv, word32 privSz, - byte* pub, word32* pubSz) -{ - int ret = 0; - - mp_int x; - mp_int y; - - if (mp_init_multi(&x, &y, 0, 0, 0, 0) != MP_OKAY) - return MP_INIT_E; - - if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY) - ret = MP_READ_E; - - if (ret == 0 && mp_exptmod(&key->g, &x, &key->p, &y) != MP_OKAY) - ret = MP_EXPTMOD_E; - - if (ret == 0 && mp_to_unsigned_bin(&y, pub) != MP_OKAY) - ret = MP_TO_E; - - if (ret == 0) - *pubSz = mp_unsigned_bin_size(&y); - - mp_clear(&y); - mp_clear(&x); - - return ret; -} - - -int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, word32* privSz, - byte* pub, word32* pubSz) -{ - int ret = GeneratePrivate(key, rng, priv, privSz); - - return (ret != 0) ? ret : GeneratePublic(key, priv, *privSz, pub, pubSz); -} - -int DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv, - word32 privSz, const byte* otherPub, word32 pubSz) -{ - int ret = 0; - - mp_int x; - mp_int y; - mp_int z; - - if (mp_init_multi(&x, &y, &z, 0, 0, 0) != MP_OKAY) - return MP_INIT_E; - - if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY) - ret = MP_READ_E; - - if (ret == 0 && mp_read_unsigned_bin(&y, otherPub, pubSz) != MP_OKAY) - ret = MP_READ_E; - - if (ret == 0 && mp_exptmod(&y, &x, &key->p, &z) != MP_OKAY) - ret = MP_EXPTMOD_E; - - if (ret == 0 && mp_to_unsigned_bin(&z, agree) != MP_OKAY) - ret = MP_TO_E; - - if (ret == 0) - *agreeSz = mp_unsigned_bin_size(&z); - - mp_clear(&z); - mp_clear(&y); - mp_clear(&x); - - return ret; -} - - -#endif /* NO_DH */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c b/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c deleted file mode 100644 index 6ee78f72..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/dsa.c +++ /dev/null @@ -1,226 +0,0 @@ -/* dsa.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_DSA - -#include -#include -#include -#include - - -enum { - DSA_HALF_SIZE = 20, /* r and s size */ - DSA_SIG_SIZE = 40 /* signature size */ -}; - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -void InitDsaKey(DsaKey* key) -{ - key->type = -1; /* haven't decided yet */ - -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - key->p.dp = 0; /* public alloc parts */ - key->q.dp = 0; - key->g.dp = 0; - key->y.dp = 0; - - key->x.dp = 0; /* private alloc parts */ -#endif -} - - -void FreeDsaKey(DsaKey* key) -{ - (void)key; -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - if (key->type == DSA_PRIVATE) - mp_clear(&key->x); - mp_clear(&key->y); - mp_clear(&key->g); - mp_clear(&key->q); - mp_clear(&key->p); -#endif -} - - -int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng) -{ - mp_int k, kInv, r, s, H; - int ret, sz; - byte buffer[DSA_HALF_SIZE]; - - sz = min(sizeof(buffer), mp_unsigned_bin_size(&key->q)); - - /* generate k */ - ret = RNG_GenerateBlock(rng, buffer, sz); - if (ret != 0) - return ret; - - buffer[0] |= 0x0C; - - if (mp_init_multi(&k, &kInv, &r, &s, &H, 0) != MP_OKAY) - return MP_INIT_E; - - if (mp_read_unsigned_bin(&k, buffer, sz) != MP_OKAY) - ret = MP_READ_E; - - if (ret == 0 && mp_cmp_d(&k, 1) != MP_GT) - ret = MP_CMP_E; - - /* inverse k mod q */ - if (ret == 0 && mp_invmod(&k, &key->q, &kInv) != MP_OKAY) - ret = MP_INVMOD_E; - - /* generate r, r = (g exp k mod p) mod q */ - if (ret == 0 && mp_exptmod(&key->g, &k, &key->p, &r) != MP_OKAY) - ret = MP_EXPTMOD_E; - - if (ret == 0 && mp_mod(&r, &key->q, &r) != MP_OKAY) - ret = MP_MOD_E; - - /* generate H from sha digest */ - if (ret == 0 && mp_read_unsigned_bin(&H, digest,SHA_DIGEST_SIZE) != MP_OKAY) - ret = MP_READ_E; - - /* generate s, s = (kInv * (H + x*r)) % q */ - if (ret == 0 && mp_mul(&key->x, &r, &s) != MP_OKAY) - ret = MP_MUL_E; - - if (ret == 0 && mp_add(&s, &H, &s) != MP_OKAY) - ret = MP_ADD_E; - - if (ret == 0 && mp_mulmod(&s, &kInv, &key->q, &s) != MP_OKAY) - ret = MP_MULMOD_E; - - /* write out */ - if (ret == 0) { - int rSz = mp_unsigned_bin_size(&r); - int sSz = mp_unsigned_bin_size(&s); - - if (rSz == DSA_HALF_SIZE - 1) { - out[0] = 0; - out++; - } - - if (mp_to_unsigned_bin(&r, out) != MP_OKAY) - ret = MP_TO_E; - else { - if (sSz == DSA_HALF_SIZE - 1) { - out[rSz] = 0; - out++; - } - ret = mp_to_unsigned_bin(&s, out + rSz); - } - } - - mp_clear(&H); - mp_clear(&s); - mp_clear(&r); - mp_clear(&kInv); - mp_clear(&k); - - return ret; -} - - -int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, int* answer) -{ - mp_int w, u1, u2, v, r, s; - int ret = 0; - - if (mp_init_multi(&w, &u1, &u2, &v, &r, &s) != MP_OKAY) - return MP_INIT_E; - - /* set r and s from signature */ - if (mp_read_unsigned_bin(&r, sig, DSA_HALF_SIZE) != MP_OKAY || - mp_read_unsigned_bin(&s, sig + DSA_HALF_SIZE, DSA_HALF_SIZE) != MP_OKAY) - ret = MP_READ_E; - - /* sanity checks */ - - - /* put H into u1 from sha digest */ - if (ret == 0 && mp_read_unsigned_bin(&u1,digest,SHA_DIGEST_SIZE) != MP_OKAY) - ret = MP_READ_E; - - /* w = s invmod q */ - if (ret == 0 && mp_invmod(&s, &key->q, &w) != MP_OKAY) - ret = MP_INVMOD_E; - - /* u1 = (H * w) % q */ - if (ret == 0 && mp_mulmod(&u1, &w, &key->q, &u1) != MP_OKAY) - ret = MP_MULMOD_E; - - /* u2 = (r * w) % q */ - if (ret == 0 && mp_mulmod(&r, &w, &key->q, &u2) != MP_OKAY) - ret = MP_MULMOD_E; - - /* verify v = ((g^u1 * y^u2) mod p) mod q */ - if (ret == 0 && mp_exptmod(&key->g, &u1, &key->p, &u1) != MP_OKAY) - ret = MP_EXPTMOD_E; - - if (ret == 0 && mp_exptmod(&key->y, &u2, &key->p, &u2) != MP_OKAY) - ret = MP_EXPTMOD_E; - - if (ret == 0 && mp_mulmod(&u1, &u2, &key->p, &v) != MP_OKAY) - ret = MP_MULMOD_E; - - if (ret == 0 && mp_mod(&v, &key->q, &v) != MP_OKAY) - ret = MP_MULMOD_E; - - /* do they match */ - if (ret == 0 && mp_cmp(&r, &v) == MP_EQ) - *answer = 1; - else - *answer = 0; - - mp_clear(&s); - mp_clear(&r); - mp_clear(&u1); - mp_clear(&u2); - mp_clear(&w); - mp_clear(&v); - - return ret; -} - - -#endif /* NO_DSA */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c b/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c deleted file mode 100644 index 6d6da734..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/ecc.c +++ /dev/null @@ -1,4140 +0,0 @@ -/* ecc.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* in case user set HAVE_ECC there */ -#include - -#ifdef HAVE_ECC - -#include -#include -#include - -#ifdef HAVE_ECC_ENCRYPT - #include - #include -#endif - - -/* map - - ptmul -> mulmod - -*/ - -#define ECC112 -#define ECC128 -#define ECC160 -#define ECC192 -#define ECC224 -#define ECC256 -#define ECC384 -#define ECC521 - - - -/* This holds the key settings. ***MUST*** be organized by size from - smallest to largest. */ - -const ecc_set_type ecc_sets[] = { -#ifdef ECC112 -{ - 14, - "SECP112R1", - "DB7C2ABF62E35E668076BEAD208B", - "659EF8BA043916EEDE8911702B22", - "DB7C2ABF62E35E7628DFAC6561C5", - "09487239995A5EE76B55F9C2F098", - "A89CE5AF8724C0A23E0E0FF77500" -}, -#endif -#ifdef ECC128 -{ - 16, - "SECP128R1", - "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", - "E87579C11079F43DD824993C2CEE5ED3", - "FFFFFFFE0000000075A30D1B9038A115", - "161FF7528B899B2D0C28607CA52C5B86", - "CF5AC8395BAFEB13C02DA292DDED7A83", -}, -#endif -#ifdef ECC160 -{ - 20, - "SECP160R1", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", - "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", - "0100000000000000000001F4C8F927AED3CA752257", - "4A96B5688EF573284664698968C38BB913CBFC82", - "23A628553168947D59DCC912042351377AC5FB32", -}, -#endif -#ifdef ECC192 -{ - 24, - "ECC-192", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", - "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", - "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", - "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", - "7192B95FFC8DA78631011ED6B24CDD573F977A11E794811", -}, -#endif -#ifdef ECC224 -{ - 28, - "ECC-224", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", - "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", - "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", - "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", -}, -#endif -#ifdef ECC256 -{ - 32, - "ECC-256", - "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", - "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", - "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", - "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", - "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", -}, -#endif -#ifdef ECC384 -{ - 48, - "ECC-384", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", - "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", - "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", - "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", -}, -#endif -#ifdef ECC521 -{ - 66, - "ECC-521", - "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", - "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", - "C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", - "11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650", -}, -#endif -{ - 0, - NULL, NULL, NULL, NULL, NULL, NULL -} -}; - - -ecc_point* ecc_new_point(void); -void ecc_del_point(ecc_point* p); -int ecc_map(ecc_point*, mp_int*, mp_digit*); -int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, - mp_int* modulus, mp_digit* mp); -int ecc_projective_dbl_point(ecc_point* P, ecc_point* R, mp_int* modulus, - mp_digit* mp); -static int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, - int map); -#ifdef ECC_SHAMIR -static int ecc_mul2add(ecc_point* A, mp_int* kA, ecc_point* B, mp_int* kB, - ecc_point* C, mp_int* modulus); -#endif - - -/* helper for either lib */ -static int get_digit_count(mp_int* a) -{ - if (a == NULL) - return 0; - - return a->used; -} - -/* helper for either lib */ -static unsigned long get_digit(mp_int* a, int n) -{ - if (a == NULL) - return 0; - - return (n >= a->used || n < 0) ? 0 : a->dp[n]; -} - - -#if defined(USE_FAST_MATH) - -/* fast math accelerated version, but not for fp ecc yet */ - -/** - Add two ECC points - P The point to add - Q The point to add - R [out] The destination of the double - modulus The modulus of the field the ECC curve is in - mp The "b" value from montgomery_setup() - return MP_OKAY on success -*/ -int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, - mp_int* modulus, mp_digit* mp) -{ - fp_int t1, t2, x, y, z; - int err; - - if (P == NULL || Q == NULL || R == NULL || modulus == NULL || mp == NULL) - return ECC_BAD_ARG_E; - - if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != MP_OKAY) { - return err; - } - - /* should we dbl instead? */ - fp_sub(modulus, &Q->y, &t1); - if ( (fp_cmp(&P->x, &Q->x) == FP_EQ) && - (get_digit_count(&Q->z) && fp_cmp(&P->z, &Q->z) == FP_EQ) && - (fp_cmp(&P->y, &Q->y) == FP_EQ || fp_cmp(&P->y, &t1) == FP_EQ)) { - return ecc_projective_dbl_point(P, R, modulus, mp); - } - - fp_copy(&P->x, &x); - fp_copy(&P->y, &y); - fp_copy(&P->z, &z); - - /* if Z is one then these are no-operations */ - if (get_digit_count(&Q->z)) { - /* T1 = Z' * Z' */ - fp_sqr(&Q->z, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* X = X * T1 */ - fp_mul(&t1, &x, &x); - fp_montgomery_reduce(&x, modulus, *mp); - /* T1 = Z' * T1 */ - fp_mul(&Q->z, &t1, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* Y = Y * T1 */ - fp_mul(&t1, &y, &y); - fp_montgomery_reduce(&y, modulus, *mp); - } - - /* T1 = Z*Z */ - fp_sqr(&z, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* T2 = X' * T1 */ - fp_mul(&Q->x, &t1, &t2); - fp_montgomery_reduce(&t2, modulus, *mp); - /* T1 = Z * T1 */ - fp_mul(&z, &t1, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* T1 = Y' * T1 */ - fp_mul(&Q->y, &t1, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - - /* Y = Y - T1 */ - fp_sub(&y, &t1, &y); - if (fp_cmp_d(&y, 0) == FP_LT) { - fp_add(&y, modulus, &y); - } - /* T1 = 2T1 */ - fp_add(&t1, &t1, &t1); - if (fp_cmp(&t1, modulus) != FP_LT) { - fp_sub(&t1, modulus, &t1); - } - /* T1 = Y + T1 */ - fp_add(&t1, &y, &t1); - if (fp_cmp(&t1, modulus) != FP_LT) { - fp_sub(&t1, modulus, &t1); - } - /* X = X - T2 */ - fp_sub(&x, &t2, &x); - if (fp_cmp_d(&x, 0) == FP_LT) { - fp_add(&x, modulus, &x); - } - /* T2 = 2T2 */ - fp_add(&t2, &t2, &t2); - if (fp_cmp(&t2, modulus) != FP_LT) { - fp_sub(&t2, modulus, &t2); - } - /* T2 = X + T2 */ - fp_add(&t2, &x, &t2); - if (fp_cmp(&t2, modulus) != FP_LT) { - fp_sub(&t2, modulus, &t2); - } - - /* if Z' != 1 */ - if (get_digit_count(&Q->z)) { - /* Z = Z * Z' */ - fp_mul(&z, &Q->z, &z); - fp_montgomery_reduce(&z, modulus, *mp); - } - - /* Z = Z * X */ - fp_mul(&z, &x, &z); - fp_montgomery_reduce(&z, modulus, *mp); - - /* T1 = T1 * X */ - fp_mul(&t1, &x, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* X = X * X */ - fp_sqr(&x, &x); - fp_montgomery_reduce(&x, modulus, *mp); - /* T2 = T2 * x */ - fp_mul(&t2, &x, &t2); - fp_montgomery_reduce(&t2, modulus, *mp); - /* T1 = T1 * X */ - fp_mul(&t1, &x, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - - /* X = Y*Y */ - fp_sqr(&y, &x); - fp_montgomery_reduce(&x, modulus, *mp); - /* X = X - T2 */ - fp_sub(&x, &t2, &x); - if (fp_cmp_d(&x, 0) == FP_LT) { - fp_add(&x, modulus, &x); - } - - /* T2 = T2 - X */ - fp_sub(&t2, &x, &t2); - if (fp_cmp_d(&t2, 0) == FP_LT) { - fp_add(&t2, modulus, &t2); - } - /* T2 = T2 - X */ - fp_sub(&t2, &x, &t2); - if (fp_cmp_d(&t2, 0) == FP_LT) { - fp_add(&t2, modulus, &t2); - } - /* T2 = T2 * Y */ - fp_mul(&t2, &y, &t2); - fp_montgomery_reduce(&t2, modulus, *mp); - /* Y = T2 - T1 */ - fp_sub(&t2, &t1, &y); - if (fp_cmp_d(&y, 0) == FP_LT) { - fp_add(&y, modulus, &y); - } - /* Y = Y/2 */ - if (fp_isodd(&y)) { - fp_add(&y, modulus, &y); - } - fp_div_2(&y, &y); - - fp_copy(&x, &R->x); - fp_copy(&y, &R->y); - fp_copy(&z, &R->z); - - return MP_OKAY; -} - - -/** - Double an ECC point - P The point to double - R [out] The destination of the double - modulus The modulus of the field the ECC curve is in - mp The "b" value from montgomery_setup() - return MP_OKAY on success -*/ -int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* modulus, - mp_digit* mp) -{ - fp_int t1, t2; - int err; - - if (P == NULL || R == NULL || modulus == NULL || mp == NULL) - return ECC_BAD_ARG_E; - - if (P != R) { - fp_copy(&P->x, &R->x); - fp_copy(&P->y, &R->y); - fp_copy(&P->z, &R->z); - } - - if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { - return err; - } - - /* t1 = Z * Z */ - fp_sqr(&R->z, &t1); - fp_montgomery_reduce(&t1, modulus, *mp); - /* Z = Y * Z */ - fp_mul(&R->z, &R->y, &R->z); - fp_montgomery_reduce(&R->z, modulus, *mp); - /* Z = 2Z */ - fp_add(&R->z, &R->z, &R->z); - if (fp_cmp(&R->z, modulus) != FP_LT) { - fp_sub(&R->z, modulus, &R->z); - } - - /* &t2 = X - T1 */ - fp_sub(&R->x, &t1, &t2); - if (fp_cmp_d(&t2, 0) == FP_LT) { - fp_add(&t2, modulus, &t2); - } - /* T1 = X + T1 */ - fp_add(&t1, &R->x, &t1); - if (fp_cmp(&t1, modulus) != FP_LT) { - fp_sub(&t1, modulus, &t1); - } - /* T2 = T1 * T2 */ - fp_mul(&t1, &t2, &t2); - fp_montgomery_reduce(&t2, modulus, *mp); - /* T1 = 2T2 */ - fp_add(&t2, &t2, &t1); - if (fp_cmp(&t1, modulus) != FP_LT) { - fp_sub(&t1, modulus, &t1); - } - /* T1 = T1 + T2 */ - fp_add(&t1, &t2, &t1); - if (fp_cmp(&t1, modulus) != FP_LT) { - fp_sub(&t1, modulus, &t1); - } - - /* Y = 2Y */ - fp_add(&R->y, &R->y, &R->y); - if (fp_cmp(&R->y, modulus) != FP_LT) { - fp_sub(&R->y, modulus, &R->y); - } - /* Y = Y * Y */ - fp_sqr(&R->y, &R->y); - fp_montgomery_reduce(&R->y, modulus, *mp); - /* T2 = Y * Y */ - fp_sqr(&R->y, &t2); - fp_montgomery_reduce(&t2, modulus, *mp); - /* T2 = T2/2 */ - if (fp_isodd(&t2)) { - fp_add(&t2, modulus, &t2); - } - fp_div_2(&t2, &t2); - /* Y = Y * X */ - fp_mul(&R->y, &R->x, &R->y); - fp_montgomery_reduce(&R->y, modulus, *mp); - - /* X = T1 * T1 */ - fp_sqr(&t1, &R->x); - fp_montgomery_reduce(&R->x, modulus, *mp); - /* X = X - Y */ - fp_sub(&R->x, &R->y, &R->x); - if (fp_cmp_d(&R->x, 0) == FP_LT) { - fp_add(&R->x, modulus, &R->x); - } - /* X = X - Y */ - fp_sub(&R->x, &R->y, &R->x); - if (fp_cmp_d(&R->x, 0) == FP_LT) { - fp_add(&R->x, modulus, &R->x); - } - - /* Y = Y - X */ - fp_sub(&R->y, &R->x, &R->y); - if (fp_cmp_d(&R->y, 0) == FP_LT) { - fp_add(&R->y, modulus, &R->y); - } - /* Y = Y * T1 */ - fp_mul(&R->y, &t1, &R->y); - fp_montgomery_reduce(&R->y, modulus, *mp); - /* Y = Y - T2 */ - fp_sub(&R->y, &t2, &R->y); - if (fp_cmp_d(&R->y, 0) == FP_LT) { - fp_add(&R->y, modulus, &R->y); - } - - return MP_OKAY; -} - -#else /* USE_FAST_MATH */ - -/** - Add two ECC points - P The point to add - Q The point to add - R [out] The destination of the double - modulus The modulus of the field the ECC curve is in - mp The "b" value from montgomery_setup() - return MP_OKAY on success -*/ -int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, - mp_int* modulus, mp_digit* mp) -{ - mp_int t1; - mp_int t2; - mp_int x; - mp_int y; - mp_int z; - int err; - - if (P == NULL || Q == NULL || R == NULL || modulus == NULL || mp == NULL) - return ECC_BAD_ARG_E; - - if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != MP_OKAY) { - return err; - } - - /* should we dbl instead? */ - err = mp_sub(modulus, &Q->y, &t1); - - if (err == MP_OKAY) { - if ( (mp_cmp(&P->x, &Q->x) == MP_EQ) && - (get_digit_count(&Q->z) && mp_cmp(&P->z, &Q->z) == MP_EQ) && - (mp_cmp(&P->y, &Q->y) == MP_EQ || mp_cmp(&P->y, &t1) == MP_EQ)) { - mp_clear(&t1); - mp_clear(&t2); - mp_clear(&x); - mp_clear(&y); - mp_clear(&z); - - return ecc_projective_dbl_point(P, R, modulus, mp); - } - } - - if (err == MP_OKAY) - err = mp_copy(&P->x, &x); - if (err == MP_OKAY) - err = mp_copy(&P->y, &y); - if (err == MP_OKAY) - err = mp_copy(&P->z, &z); - - /* if Z is one then these are no-operations */ - if (err == MP_OKAY) { - if (get_digit_count(&Q->z)) { - /* T1 = Z' * Z' */ - err = mp_sqr(&Q->z, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* X = X * T1 */ - if (err == MP_OKAY) - err = mp_mul(&t1, &x, &x); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&x, modulus, *mp); - - /* T1 = Z' * T1 */ - if (err == MP_OKAY) - err = mp_mul(&Q->z, &t1, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* Y = Y * T1 */ - if (err == MP_OKAY) - err = mp_mul(&t1, &y, &y); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&y, modulus, *mp); - } - } - - /* T1 = Z*Z */ - if (err == MP_OKAY) - err = mp_sqr(&z, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* T2 = X' * T1 */ - if (err == MP_OKAY) - err = mp_mul(&Q->x, &t1, &t2); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t2, modulus, *mp); - - /* T1 = Z * T1 */ - if (err == MP_OKAY) - err = mp_mul(&z, &t1, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* T1 = Y' * T1 */ - if (err == MP_OKAY) - err = mp_mul(&Q->y, &t1, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* Y = Y - T1 */ - if (err == MP_OKAY) - err = mp_sub(&y, &t1, &y); - if (err == MP_OKAY) { - if (mp_cmp_d(&y, 0) == MP_LT) - err = mp_add(&y, modulus, &y); - } - /* T1 = 2T1 */ - if (err == MP_OKAY) - err = mp_add(&t1, &t1, &t1); - if (err == MP_OKAY) { - if (mp_cmp(&t1, modulus) != MP_LT) - err = mp_sub(&t1, modulus, &t1); - } - /* T1 = Y + T1 */ - if (err == MP_OKAY) - err = mp_add(&t1, &y, &t1); - if (err == MP_OKAY) { - if (mp_cmp(&t1, modulus) != MP_LT) - err = mp_sub(&t1, modulus, &t1); - } - /* X = X - T2 */ - if (err == MP_OKAY) - err = mp_sub(&x, &t2, &x); - if (err == MP_OKAY) { - if (mp_cmp_d(&x, 0) == MP_LT) - err = mp_add(&x, modulus, &x); - } - /* T2 = 2T2 */ - if (err == MP_OKAY) - err = mp_add(&t2, &t2, &t2); - if (err == MP_OKAY) { - if (mp_cmp(&t2, modulus) != MP_LT) - err = mp_sub(&t2, modulus, &t2); - } - /* T2 = X + T2 */ - if (err == MP_OKAY) - err = mp_add(&t2, &x, &t2); - if (err == MP_OKAY) { - if (mp_cmp(&t2, modulus) != MP_LT) - err = mp_sub(&t2, modulus, &t2); - } - - if (err == MP_OKAY) { - if (get_digit_count(&Q->z)) { - /* Z = Z * Z' */ - err = mp_mul(&z, &Q->z, &z); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&z, modulus, *mp); - } - } - - /* Z = Z * X */ - if (err == MP_OKAY) - err = mp_mul(&z, &x, &z); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&z, modulus, *mp); - - /* T1 = T1 * X */ - if (err == MP_OKAY) - err = mp_mul(&t1, &x, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* X = X * X */ - if (err == MP_OKAY) - err = mp_sqr(&x, &x); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&x, modulus, *mp); - - /* T2 = T2 * x */ - if (err == MP_OKAY) - err = mp_mul(&t2, &x, &t2); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t2, modulus, *mp); - - /* T1 = T1 * X */ - if (err == MP_OKAY) - err = mp_mul(&t1, &x, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* X = Y*Y */ - if (err == MP_OKAY) - err = mp_sqr(&y, &x); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&x, modulus, *mp); - - /* X = X - T2 */ - if (err == MP_OKAY) - err = mp_sub(&x, &t2, &x); - if (err == MP_OKAY) { - if (mp_cmp_d(&x, 0) == MP_LT) - err = mp_add(&x, modulus, &x); - } - /* T2 = T2 - X */ - if (err == MP_OKAY) - err = mp_sub(&t2, &x, &t2); - if (err == MP_OKAY) { - if (mp_cmp_d(&t2, 0) == MP_LT) - err = mp_add(&t2, modulus, &t2); - } - /* T2 = T2 - X */ - if (err == MP_OKAY) - err = mp_sub(&t2, &x, &t2); - if (err == MP_OKAY) { - if (mp_cmp_d(&t2, 0) == MP_LT) - err = mp_add(&t2, modulus, &t2); - } - /* T2 = T2 * Y */ - if (err == MP_OKAY) - err = mp_mul(&t2, &y, &t2); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t2, modulus, *mp); - - /* Y = T2 - T1 */ - if (err == MP_OKAY) - err = mp_sub(&t2, &t1, &y); - if (err == MP_OKAY) { - if (mp_cmp_d(&y, 0) == MP_LT) - err = mp_add(&y, modulus, &y); - } - /* Y = Y/2 */ - if (err == MP_OKAY) { - if (mp_isodd(&y)) - err = mp_add(&y, modulus, &y); - } - if (err == MP_OKAY) - err = mp_div_2(&y, &y); - - if (err == MP_OKAY) - err = mp_copy(&x, &R->x); - if (err == MP_OKAY) - err = mp_copy(&y, &R->y); - if (err == MP_OKAY) - err = mp_copy(&z, &R->z); - - /* clean up */ - mp_clear(&t1); - mp_clear(&t2); - mp_clear(&x); - mp_clear(&y); - mp_clear(&z); - - return err; -} - - -/** - Double an ECC point - P The point to double - R [out] The destination of the double - modulus The modulus of the field the ECC curve is in - mp The "b" value from montgomery_setup() - return MP_OKAY on success -*/ -int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* modulus, - mp_digit* mp) -{ - mp_int t1; - mp_int t2; - int err; - - if (P == NULL || R == NULL || modulus == NULL || mp == NULL) - return ECC_BAD_ARG_E; - - if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { - return err; - } - - if (P != R) { - err = mp_copy(&P->x, &R->x); - if (err == MP_OKAY) - err = mp_copy(&P->y, &R->y); - if (err == MP_OKAY) - err = mp_copy(&P->z, &R->z); - } - - /* t1 = Z * Z */ - if (err == MP_OKAY) - err = mp_sqr(&R->z, &t1); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t1, modulus, *mp); - - /* Z = Y * Z */ - if (err == MP_OKAY) - err = mp_mul(&R->z, &R->y, &R->z); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&R->z, modulus, *mp); - - /* Z = 2Z */ - if (err == MP_OKAY) - err = mp_add(&R->z, &R->z, &R->z); - if (err == MP_OKAY) { - if (mp_cmp(&R->z, modulus) != MP_LT) - err = mp_sub(&R->z, modulus, &R->z); - } - - /* T2 = X - T1 */ - if (err == MP_OKAY) - err = mp_sub(&R->x, &t1, &t2); - if (err == MP_OKAY) { - if (mp_cmp_d(&t2, 0) == MP_LT) - err = mp_add(&t2, modulus, &t2); - } - /* T1 = X + T1 */ - if (err == MP_OKAY) - err = mp_add(&t1, &R->x, &t1); - if (err == MP_OKAY) { - if (mp_cmp(&t1, modulus) != MP_LT) - err = mp_sub(&t1, modulus, &t1); - } - /* T2 = T1 * T2 */ - if (err == MP_OKAY) - err = mp_mul(&t1, &t2, &t2); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t2, modulus, *mp); - - /* T1 = 2T2 */ - if (err == MP_OKAY) - err = mp_add(&t2, &t2, &t1); - if (err == MP_OKAY) { - if (mp_cmp(&t1, modulus) != MP_LT) - err = mp_sub(&t1, modulus, &t1); - } - /* T1 = T1 + T2 */ - if (err == MP_OKAY) - err = mp_add(&t1, &t2, &t1); - if (err == MP_OKAY) { - if (mp_cmp(&t1, modulus) != MP_LT) - err = mp_sub(&t1, modulus, &t1); - } - /* Y = 2Y */ - if (err == MP_OKAY) - err = mp_add(&R->y, &R->y, &R->y); - if (err == MP_OKAY) { - if (mp_cmp(&R->y, modulus) != MP_LT) - err = mp_sub(&R->y, modulus, &R->y); - } - /* Y = Y * Y */ - if (err == MP_OKAY) - err = mp_sqr(&R->y, &R->y); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&R->y, modulus, *mp); - - /* T2 = Y * Y */ - if (err == MP_OKAY) - err = mp_sqr(&R->y, &t2); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&t2, modulus, *mp); - - /* T2 = T2/2 */ - if (err == MP_OKAY) { - if (mp_isodd(&t2)) - err = mp_add(&t2, modulus, &t2); - } - if (err == MP_OKAY) - err = mp_div_2(&t2, &t2); - - /* Y = Y * X */ - if (err == MP_OKAY) - err = mp_mul(&R->y, &R->x, &R->y); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&R->y, modulus, *mp); - - /* X = T1 * T1 */ - if (err == MP_OKAY) - err = mp_sqr(&t1, &R->x); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&R->x, modulus, *mp); - - /* X = X - Y */ - if (err == MP_OKAY) - err = mp_sub(&R->x, &R->y, &R->x); - if (err == MP_OKAY) { - if (mp_cmp_d(&R->x, 0) == MP_LT) - err = mp_add(&R->x, modulus, &R->x); - } - /* X = X - Y */ - if (err == MP_OKAY) - err = mp_sub(&R->x, &R->y, &R->x); - if (err == MP_OKAY) { - if (mp_cmp_d(&R->x, 0) == MP_LT) - err = mp_add(&R->x, modulus, &R->x); - } - /* Y = Y - X */ - if (err == MP_OKAY) - err = mp_sub(&R->y, &R->x, &R->y); - if (err == MP_OKAY) { - if (mp_cmp_d(&R->y, 0) == MP_LT) - err = mp_add(&R->y, modulus, &R->y); - } - /* Y = Y * T1 */ - if (err == MP_OKAY) - err = mp_mul(&R->y, &t1, &R->y); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&R->y, modulus, *mp); - - /* Y = Y - T2 */ - if (err == MP_OKAY) - err = mp_sub(&R->y, &t2, &R->y); - if (err == MP_OKAY) { - if (mp_cmp_d(&R->y, 0) == MP_LT) - err = mp_add(&R->y, modulus, &R->y); - } - - /* clean up */ - mp_clear(&t1); - mp_clear(&t2); - - return err; -} - -#endif /* USE_FAST_MATH */ - -/** - Map a projective jacbobian point back to affine space - P [in/out] The point to map - modulus The modulus of the field the ECC curve is in - mp The "b" value from montgomery_setup() - return MP_OKAY on success -*/ -int ecc_map(ecc_point* P, mp_int* modulus, mp_digit* mp) -{ - mp_int t1; - mp_int t2; - int err; - - if (P == NULL || mp == NULL || modulus == NULL) - return ECC_BAD_ARG_E; - - if ((err = mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { - return MEMORY_E; - } - - /* first map z back to normal */ - err = mp_montgomery_reduce(&P->z, modulus, *mp); - - /* get 1/z */ - if (err == MP_OKAY) - err = mp_invmod(&P->z, modulus, &t1); - - /* get 1/z^2 and 1/z^3 */ - if (err == MP_OKAY) - err = mp_sqr(&t1, &t2); - if (err == MP_OKAY) - err = mp_mod(&t2, modulus, &t2); - if (err == MP_OKAY) - err = mp_mul(&t1, &t2, &t1); - if (err == MP_OKAY) - err = mp_mod(&t1, modulus, &t1); - - /* multiply against x/y */ - if (err == MP_OKAY) - err = mp_mul(&P->x, &t2, &P->x); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&P->x, modulus, *mp); - if (err == MP_OKAY) - err = mp_mul(&P->y, &t1, &P->y); - if (err == MP_OKAY) - err = mp_montgomery_reduce(&P->y, modulus, *mp); - - if (err == MP_OKAY) - mp_set(&P->z, 1); - - /* clean up */ - mp_clear(&t1); - mp_clear(&t2); - - return err; -} - - -#ifndef ECC_TIMING_RESISTANT - -/* size of sliding window, don't change this! */ -#define WINSIZE 4 - -/** - Perform a point multiplication - k The scalar to multiply by - G The base point - R [out] Destination for kG - modulus The modulus of the field the ECC curve is in - map Boolean whether to map back to affine or not - (1==map, 0 == leave in projective) - return MP_OKAY on success -*/ -#ifdef FP_ECC -static int normal_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, - mp_int* modulus, int map) -#else -static int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, - int map) -#endif -{ - ecc_point *tG, *M[8]; - int i, j, err; - mp_int mu; - mp_digit mp; - unsigned long buf; - int first = 1, bitbuf = 0, bitcpy = 0, bitcnt = 0, mode = 0, - digidx = 0; - - if (k == NULL || G == NULL || R == NULL || modulus == NULL) - return ECC_BAD_ARG_E; - - /* init montgomery reduction */ - if ((err = mp_montgomery_setup(modulus, &mp)) != MP_OKAY) { - return err; - } - if ((err = mp_init(&mu)) != MP_OKAY) { - return err; - } - if ((err = mp_montgomery_calc_normalization(&mu, modulus)) != MP_OKAY) { - mp_clear(&mu); - return err; - } - - /* alloc ram for window temps */ - for (i = 0; i < 8; i++) { - M[i] = ecc_new_point(); - if (M[i] == NULL) { - for (j = 0; j < i; j++) { - ecc_del_point(M[j]); - } - mp_clear(&mu); - return MEMORY_E; - } - } - - /* make a copy of G incase R==G */ - tG = ecc_new_point(); - if (tG == NULL) - err = MEMORY_E; - - /* tG = G and convert to montgomery */ - if (err == MP_OKAY) { - if (mp_cmp_d(&mu, 1) == MP_EQ) { - err = mp_copy(&G->x, &tG->x); - if (err == MP_OKAY) - err = mp_copy(&G->y, &tG->y); - if (err == MP_OKAY) - err = mp_copy(&G->z, &tG->z); - } else { - err = mp_mulmod(&G->x, &mu, modulus, &tG->x); - if (err == MP_OKAY) - err = mp_mulmod(&G->y, &mu, modulus, &tG->y); - if (err == MP_OKAY) - err = mp_mulmod(&G->z, &mu, modulus, &tG->z); - } - } - mp_clear(&mu); - - /* calc the M tab, which holds kG for k==8..15 */ - /* M[0] == 8G */ - if (err == MP_OKAY) - err = ecc_projective_dbl_point(tG, M[0], modulus, &mp); - if (err == MP_OKAY) - err = ecc_projective_dbl_point(M[0], M[0], modulus, &mp); - if (err == MP_OKAY) - err = ecc_projective_dbl_point(M[0], M[0], modulus, &mp); - - /* now find (8+k)G for k=1..7 */ - if (err == MP_OKAY) - for (j = 9; j < 16; j++) { - err = ecc_projective_add_point(M[j-9], tG, M[j-8], modulus, &mp); - if (err != MP_OKAY) break; - } - - /* setup sliding window */ - if (err == MP_OKAY) { - mode = 0; - bitcnt = 1; - buf = 0; - digidx = get_digit_count(k) - 1; - bitcpy = bitbuf = 0; - first = 1; - - /* perform ops */ - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - if (digidx == -1) { - break; - } - buf = get_digit(k, digidx); - bitcnt = (int) DIGIT_BIT; - --digidx; - } - - /* grab the next msb from the ltiplicand */ - i = (int)(buf >> (DIGIT_BIT - 1)) & 1; - buf <<= 1; - - /* skip leading zero bits */ - if (mode == 0 && i == 0) - continue; - - /* if the bit is zero and mode == 1 then we double */ - if (mode == 1 && i == 0) { - err = ecc_projective_dbl_point(R, R, modulus, &mp); - if (err != MP_OKAY) break; - continue; - } - - /* else we add it to the window */ - bitbuf |= (i << (WINSIZE - ++bitcpy)); - mode = 2; - - if (bitcpy == WINSIZE) { - /* if this is the first window we do a simple copy */ - if (first == 1) { - /* R = kG [k = first window] */ - err = mp_copy(&M[bitbuf-8]->x, &R->x); - if (err != MP_OKAY) break; - - err = mp_copy(&M[bitbuf-8]->y, &R->y); - if (err != MP_OKAY) break; - - err = mp_copy(&M[bitbuf-8]->z, &R->z); - first = 0; - } else { - /* normal window */ - /* ok window is filled so double as required and add */ - /* double first */ - for (j = 0; j < WINSIZE; j++) { - err = ecc_projective_dbl_point(R, R, modulus, &mp); - if (err != MP_OKAY) break; - } - if (err != MP_OKAY) break; /* out of first for(;;) */ - - /* then add, bitbuf will be 8..15 [8..2^WINSIZE] guaranted */ - err = ecc_projective_add_point(R,M[bitbuf-8],R,modulus,&mp); - } - if (err != MP_OKAY) break; - /* empty window and reset */ - bitcpy = bitbuf = 0; - mode = 1; - } - } - } - - /* if bits remain then double/add */ - if (err == MP_OKAY) { - if (mode == 2 && bitcpy > 0) { - /* double then add */ - for (j = 0; j < bitcpy; j++) { - /* only double if we have had at least one add first */ - if (first == 0) { - err = ecc_projective_dbl_point(R, R, modulus, &mp); - if (err != MP_OKAY) break; - } - - bitbuf <<= 1; - if ((bitbuf & (1 << WINSIZE)) != 0) { - if (first == 1) { - /* first add, so copy */ - err = mp_copy(&tG->x, &R->x); - if (err != MP_OKAY) break; - - err = mp_copy(&tG->y, &R->y); - if (err != MP_OKAY) break; - - err = mp_copy(&tG->z, &R->z); - if (err != MP_OKAY) break; - first = 0; - } else { - /* then add */ - err = ecc_projective_add_point(R, tG, R, modulus, &mp); - if (err != MP_OKAY) break; - } - } - } - } - } - - /* map R back from projective space */ - if (err == MP_OKAY && map) - err = ecc_map(R, modulus, &mp); - - mp_clear(&mu); - ecc_del_point(tG); - for (i = 0; i < 8; i++) { - ecc_del_point(M[i]); - } - return err; -} - -#undef WINSIZE -#endif /* ECC_TIMING_RESISTANT */ - - -/** - Allocate a new ECC point - return A newly allocated point or NULL on error -*/ -ecc_point* ecc_new_point(void) -{ - ecc_point* p; - p = (ecc_point*)XMALLOC(sizeof(ecc_point), 0, DYNAMIC_TYPE_BIGINT); - if (p == NULL) { - return NULL; - } - XMEMSET(p, 0, sizeof(ecc_point)); - if (mp_init_multi(&p->x, &p->y, &p->z, NULL, NULL, NULL) != MP_OKAY) { - XFREE(p, 0, DYNAMIC_TYPE_BIGINT); - return NULL; - } - return p; -} - -/** Free an ECC point from memory - p The point to free -*/ -void ecc_del_point(ecc_point* p) -{ - /* prevents free'ing null arguments */ - if (p != NULL) { - mp_clear(&p->x); - mp_clear(&p->y); - mp_clear(&p->z); - XFREE(p, 0, DYNAMIC_TYPE_BIGINT); - } -} - - -/** Returns whether an ECC idx is valid or not - n The idx number to check - return 1 if valid, 0 if not -*/ -static int ecc_is_valid_idx(int n) -{ - int x; - - for (x = 0; ecc_sets[x].size != 0; x++) - ; - /* -1 is a valid index --- indicating that the domain params - were supplied by the user */ - if ((n >= -1) && (n < x)) { - return 1; - } - return 0; -} - - -/** - Create an ECC shared secret between two keys - private_key The private ECC key - public_key The public key - out [out] Destination of the shared secret - Conforms to EC-DH from ANSI X9.63 - outlen [in/out] The max size and resulting size of the shared secret - return MP_OKAY if successful -*/ -int ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, - word32* outlen) -{ - word32 x = 0; - ecc_point* result; - mp_int prime; - int err; - - if (private_key == NULL || public_key == NULL || out == NULL || - outlen == NULL) - return BAD_FUNC_ARG; - - /* type valid? */ - if (private_key->type != ECC_PRIVATEKEY) { - return ECC_BAD_ARG_E; - } - - if (ecc_is_valid_idx(private_key->idx) == 0 || - ecc_is_valid_idx(public_key->idx) == 0) - return ECC_BAD_ARG_E; - - if (XSTRNCMP(private_key->dp->name, public_key->dp->name, ECC_MAXNAME) != 0) - return ECC_BAD_ARG_E; - - /* make new point */ - result = ecc_new_point(); - if (result == NULL) { - return MEMORY_E; - } - - if ((err = mp_init(&prime)) != MP_OKAY) { - ecc_del_point(result); - return err; - } - - err = mp_read_radix(&prime, (char *)private_key->dp->prime, 16); - - if (err == MP_OKAY) - err = ecc_mulmod(&private_key->k, &public_key->pubkey, result, &prime,1); - - if (err == MP_OKAY) { - x = mp_unsigned_bin_size(&prime); - if (*outlen < x) - err = BUFFER_E; - } - - if (err == MP_OKAY) { - XMEMSET(out, 0, x); - err = mp_to_unsigned_bin(&result->x,out + (x - - mp_unsigned_bin_size(&result->x))); - *outlen = x; - } - - mp_clear(&prime); - ecc_del_point(result); - - return err; -} - - -int ecc_make_key_ex(RNG* rng, ecc_key* key, const ecc_set_type* dp); - -/** - Make a new ECC key - rng An active RNG state - keysize The keysize for the new key (in octets from 20 to 65 bytes) - key [out] Destination of the newly created key - return MP_OKAY if successful, - upon error all allocated memory will be freed -*/ -int ecc_make_key(RNG* rng, int keysize, ecc_key* key) -{ - int x, err; - - if (key == NULL || rng == NULL) - return ECC_BAD_ARG_E; - - /* find key size */ - for (x = 0; (keysize > ecc_sets[x].size) && (ecc_sets[x].size != 0); x++) - ; - keysize = ecc_sets[x].size; - - if (keysize > ECC_MAXSIZE || ecc_sets[x].size == 0) { - return BAD_FUNC_ARG; - } - err = ecc_make_key_ex(rng, key, &ecc_sets[x]); - key->idx = x; - - return err; -} - -int ecc_make_key_ex(RNG* rng, ecc_key* key, const ecc_set_type* dp) -{ - int err; - ecc_point* base; - mp_int prime; - mp_int order; -#ifdef CYASSL_SMALL_STACK - byte* buf; -#else - byte buf[ECC_MAXSIZE]; -#endif - int keysize; - - if (key == NULL || rng == NULL || dp == NULL) - return ECC_BAD_ARG_E; - -#ifdef CYASSL_SMALL_STACK - buf = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (buf == NULL) - return MEMORY_E; -#endif - - key->idx = -1; - key->dp = dp; - keysize = dp->size; - - /* allocate ram */ - base = NULL; - - /* make up random string */ - err = RNG_GenerateBlock(rng, buf, keysize); - if (err == 0) - buf[0] |= 0x0c; - - /* setup the key variables */ - if (err == 0) { - err = mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, - &key->k, &prime, &order); - if (err != MP_OKAY) - err = MEMORY_E; - } - - if (err == MP_OKAY) { - base = ecc_new_point(); - if (base == NULL) - err = MEMORY_E; - } - - /* read in the specs for this key */ - if (err == MP_OKAY) - err = mp_read_radix(&prime, (char *)key->dp->prime, 16); - if (err == MP_OKAY) - err = mp_read_radix(&order, (char *)key->dp->order, 16); - if (err == MP_OKAY) - err = mp_read_radix(&base->x, (char *)key->dp->Gx, 16); - if (err == MP_OKAY) - err = mp_read_radix(&base->y, (char *)key->dp->Gy, 16); - - if (err == MP_OKAY) - mp_set(&base->z, 1); - if (err == MP_OKAY) - err = mp_read_unsigned_bin(&key->k, (byte*)buf, keysize); - - /* the key should be smaller than the order of base point */ - if (err == MP_OKAY) { - if (mp_cmp(&key->k, &order) != MP_LT) - err = mp_mod(&key->k, &order, &key->k); - } - /* make the public key */ - if (err == MP_OKAY) - err = ecc_mulmod(&key->k, base, &key->pubkey, &prime, 1); - if (err == MP_OKAY) - key->type = ECC_PRIVATEKEY; - - if (err != MP_OKAY) { - /* clean up */ - mp_clear(&key->pubkey.x); - mp_clear(&key->pubkey.y); - mp_clear(&key->pubkey.z); - mp_clear(&key->k); - } - ecc_del_point(base); - mp_clear(&prime); - mp_clear(&order); - -#ifdef ECC_CLEAN_STACK - XMEMSET(buf, 0, ECC_MAXSIZE); -#endif - -#ifdef CYASSL_SMALL_STACK - XFREE(buf, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return err; -} - - -/* Setup dynamic pointers is using normal math for proper freeing */ -void ecc_init(ecc_key* key) -{ - (void)key; -#ifndef USE_FAST_MATH - key->pubkey.x.dp = NULL; - key->pubkey.y.dp = NULL; - key->pubkey.z.dp = NULL; - - key->k.dp = NULL; -#endif -} - - -/** - Sign a message digest - in The message digest to sign - inlen The length of the digest - out [out] The destination for the signature - outlen [in/out] The max size and resulting size of the signature - key A private ECC key - return MP_OKAY if successful -*/ -int ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen, - RNG* rng, ecc_key* key) -{ - mp_int r; - mp_int s; - mp_int e; - mp_int p; - int err; - - if (in == NULL || out == NULL || outlen == NULL || key == NULL || rng ==NULL) - return ECC_BAD_ARG_E; - - /* is this a private key? */ - if (key->type != ECC_PRIVATEKEY) { - return ECC_BAD_ARG_E; - } - - /* is the IDX valid ? */ - if (ecc_is_valid_idx(key->idx) != 1) { - return ECC_BAD_ARG_E; - } - - /* get the hash and load it as a bignum into 'e' */ - /* init the bignums */ - if ((err = mp_init_multi(&r, &s, &p, &e, NULL, NULL)) != MP_OKAY) { - return err; - } - err = mp_read_radix(&p, (char *)key->dp->order, 16); - - if (err == MP_OKAY) { - /* we may need to truncate if hash is longer than key size */ - word32 orderBits = mp_count_bits(&p); - - /* truncate down to byte size, may be all that's needed */ - if ( (CYASSL_BIT_SIZE * inlen) > orderBits) - inlen = (orderBits + CYASSL_BIT_SIZE - 1)/CYASSL_BIT_SIZE; - err = mp_read_unsigned_bin(&e, (byte*)in, inlen); - - /* may still need bit truncation too */ - if (err == MP_OKAY && (CYASSL_BIT_SIZE * inlen) > orderBits) - mp_rshb(&e, CYASSL_BIT_SIZE - (orderBits & 0x7)); - } - - /* make up a key and export the public copy */ - if (err == MP_OKAY) { - ecc_key pubkey; - ecc_init(&pubkey); - for (;;) { - err = ecc_make_key_ex(rng, &pubkey, key->dp); - if (err != MP_OKAY) break; - - /* find r = x1 mod n */ - err = mp_mod(&pubkey.pubkey.x, &p, &r); - if (err != MP_OKAY) break; - - if (mp_iszero(&r) == MP_YES) - ecc_free(&pubkey); - else { - /* find s = (e + xr)/k */ - err = mp_invmod(&pubkey.k, &p, &pubkey.k); - if (err != MP_OKAY) break; - - err = mp_mulmod(&key->k, &r, &p, &s); /* s = xr */ - if (err != MP_OKAY) break; - - err = mp_add(&e, &s, &s); /* s = e + xr */ - if (err != MP_OKAY) break; - - err = mp_mod(&s, &p, &s); /* s = e + xr */ - if (err != MP_OKAY) break; - - err = mp_mulmod(&s, &pubkey.k, &p, &s); /* s = (e + xr)/k */ - if (err != MP_OKAY) break; - - ecc_free(&pubkey); - if (mp_iszero(&s) == MP_NO) - break; - } - } - ecc_free(&pubkey); - } - - /* store as SEQUENCE { r, s -- integer } */ - if (err == MP_OKAY) - err = StoreECC_DSA_Sig(out, outlen, &r, &s); - - mp_clear(&r); - mp_clear(&s); - mp_clear(&p); - mp_clear(&e); - - return err; -} - - -/** - Free an ECC key from memory - key The key you wish to free -*/ -void ecc_free(ecc_key* key) -{ - if (key == NULL) - return; - - mp_clear(&key->pubkey.x); - mp_clear(&key->pubkey.y); - mp_clear(&key->pubkey.z); - mp_clear(&key->k); -} - - -#ifdef USE_FAST_MATH - #define GEN_MEM_ERR FP_MEM -#else - #define GEN_MEM_ERR MP_MEM -#endif - -#ifdef ECC_SHAMIR - -/** Computes kA*A + kB*B = C using Shamir's Trick - A First point to multiply - kA What to multiple A by - B Second point to multiply - kB What to multiple B by - C [out] Destination point (can overlap with A or B) - modulus Modulus for curve - return MP_OKAY on success -*/ -#ifdef FP_ECC -static int normal_ecc_mul2add(ecc_point* A, mp_int* kA, - ecc_point* B, mp_int* kB, - ecc_point* C, mp_int* modulus) -#else -static int ecc_mul2add(ecc_point* A, mp_int* kA, - ecc_point* B, mp_int* kB, - ecc_point* C, mp_int* modulus) -#endif -{ - ecc_point* precomp[16]; - unsigned bitbufA, bitbufB, lenA, lenB, len, x, y, nA, nB, nibble; - unsigned char* tA; - unsigned char* tB; - int err = MP_OKAY, first; - int muInit = 0; - int tableInit = 0; - mp_digit mp; - mp_int mu; - - /* argchks */ - if (A == NULL || kA == NULL || B == NULL || kB == NULL || C == NULL || - modulus == NULL) - return ECC_BAD_ARG_E; - - - /* allocate memory */ - tA = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (tA == NULL) { - return GEN_MEM_ERR; - } - tB = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (tB == NULL) { - XFREE(tA, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return GEN_MEM_ERR; - } - XMEMSET(tA, 0, ECC_BUFSIZE); - XMEMSET(tB, 0, ECC_BUFSIZE); - - /* get sizes */ - lenA = mp_unsigned_bin_size(kA); - lenB = mp_unsigned_bin_size(kB); - len = MAX(lenA, lenB); - - /* sanity check */ - if ((lenA > ECC_BUFSIZE) || (lenB > ECC_BUFSIZE)) { - err = BAD_FUNC_ARG; - } - - if (err == MP_OKAY) { - /* extract and justify kA */ - err = mp_to_unsigned_bin(kA, (len - lenA) + tA); - - /* extract and justify kB */ - if (err == MP_OKAY) - err = mp_to_unsigned_bin(kB, (len - lenB) + tB); - - /* allocate the table */ - if (err == MP_OKAY) { - for (x = 0; x < 16; x++) { - precomp[x] = ecc_new_point(); - if (precomp[x] == NULL) { - for (y = 0; y < x; ++y) { - ecc_del_point(precomp[y]); - } - err = GEN_MEM_ERR; - break; - } - } - } - } - - if (err == MP_OKAY) - tableInit = 1; - - if (err == MP_OKAY) - /* init montgomery reduction */ - err = mp_montgomery_setup(modulus, &mp); - - if (err == MP_OKAY) - err = mp_init(&mu); - if (err == MP_OKAY) - muInit = 1; - - if (err == MP_OKAY) - err = mp_montgomery_calc_normalization(&mu, modulus); - - if (err == MP_OKAY) - /* copy ones ... */ - err = mp_mulmod(&A->x, &mu, modulus, &precomp[1]->x); - - if (err == MP_OKAY) - err = mp_mulmod(&A->y, &mu, modulus, &precomp[1]->y); - if (err == MP_OKAY) - err = mp_mulmod(&A->z, &mu, modulus, &precomp[1]->z); - - if (err == MP_OKAY) - err = mp_mulmod(&B->x, &mu, modulus, &precomp[1<<2]->x); - if (err == MP_OKAY) - err = mp_mulmod(&B->y, &mu, modulus, &precomp[1<<2]->y); - if (err == MP_OKAY) - err = mp_mulmod(&B->z, &mu, modulus, &precomp[1<<2]->z); - - if (err == MP_OKAY) - /* precomp [i,0](A + B) table */ - err = ecc_projective_dbl_point(precomp[1], precomp[2], modulus, &mp); - - if (err == MP_OKAY) - err = ecc_projective_add_point(precomp[1], precomp[2], precomp[3], - modulus, &mp); - if (err == MP_OKAY) - /* precomp [0,i](A + B) table */ - err = ecc_projective_dbl_point(precomp[1<<2], precomp[2<<2], modulus, &mp); - - if (err == MP_OKAY) - err = ecc_projective_add_point(precomp[1<<2], precomp[2<<2], precomp[3<<2], - modulus, &mp); - - if (err == MP_OKAY) { - /* precomp [i,j](A + B) table (i != 0, j != 0) */ - for (x = 1; x < 4; x++) { - for (y = 1; y < 4; y++) { - if (err == MP_OKAY) - err = ecc_projective_add_point(precomp[x], precomp[(y<<2)], - precomp[x+(y<<2)], modulus, &mp); - } - } - } - - if (err == MP_OKAY) { - nibble = 3; - first = 1; - bitbufA = tA[0]; - bitbufB = tB[0]; - - /* for every byte of the multiplicands */ - for (x = -1;; ) { - /* grab a nibble */ - if (++nibble == 4) { - ++x; if (x == len) break; - bitbufA = tA[x]; - bitbufB = tB[x]; - nibble = 0; - } - - /* extract two bits from both, shift/update */ - nA = (bitbufA >> 6) & 0x03; - nB = (bitbufB >> 6) & 0x03; - bitbufA = (bitbufA << 2) & 0xFF; - bitbufB = (bitbufB << 2) & 0xFF; - - /* if both zero, if first, continue */ - if ((nA == 0) && (nB == 0) && (first == 1)) { - continue; - } - - /* double twice, only if this isn't the first */ - if (first == 0) { - /* double twice */ - if (err == MP_OKAY) - err = ecc_projective_dbl_point(C, C, modulus, &mp); - if (err == MP_OKAY) - err = ecc_projective_dbl_point(C, C, modulus, &mp); - else - break; - } - - /* if not both zero */ - if ((nA != 0) || (nB != 0)) { - if (first == 1) { - /* if first, copy from table */ - first = 0; - if (err == MP_OKAY) - err = mp_copy(&precomp[nA + (nB<<2)]->x, &C->x); - - if (err == MP_OKAY) - err = mp_copy(&precomp[nA + (nB<<2)]->y, &C->y); - - if (err == MP_OKAY) - err = mp_copy(&precomp[nA + (nB<<2)]->z, &C->z); - else - break; - } else { - /* if not first, add from table */ - if (err == MP_OKAY) - err = ecc_projective_add_point(C, precomp[nA + (nB<<2)], C, - modulus, &mp); - else - break; - } - } - } - } - - if (err == MP_OKAY) - /* reduce to affine */ - err = ecc_map(C, modulus, &mp); - - /* clean up */ - if (muInit) - mp_clear(&mu); - - if (tableInit) { - for (x = 0; x < 16; x++) { - ecc_del_point(precomp[x]); - } - } -#ifdef ECC_CLEAN_STACK - XMEMSET(tA, 0, ECC_BUFSIZE); - XMEMSET(tB, 0, ECC_BUFSIZE); -#endif - XFREE(tA, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(tB, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - return err; -} - - -#endif /* ECC_SHAMIR */ - - - -/* verify - * - * w = s^-1 mod n - * u1 = xw - * u2 = rw - * X = u1*G + u2*Q - * v = X_x1 mod n - * accept if v == r - */ - -/** - Verify an ECC signature - sig The signature to verify - siglen The length of the signature (octets) - hash The hash (message digest) that was signed - hashlen The length of the hash (octets) - stat Result of signature, 1==valid, 0==invalid - key The corresponding public ECC key - return MP_OKAY if successful (even if the signature is not valid) -*/ -int ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash, - word32 hashlen, int* stat, ecc_key* key) -{ - ecc_point *mG, *mQ; - mp_int r; - mp_int s; - mp_int v; - mp_int w; - mp_int u1; - mp_int u2; - mp_int e; - mp_int p; - mp_int m; - int err; - - if (sig == NULL || hash == NULL || stat == NULL || key == NULL) - return ECC_BAD_ARG_E; - - /* default to invalid signature */ - *stat = 0; - - /* is the IDX valid ? */ - if (ecc_is_valid_idx(key->idx) != 1) { - return ECC_BAD_ARG_E; - } - - /* allocate ints */ - if ((err = mp_init_multi(&v, &w, &u1, &u2, &p, &e)) != MP_OKAY) { - return MEMORY_E; - } - - if ((err = mp_init(&m)) != MP_OKAY) { - mp_clear(&v); - mp_clear(&w); - mp_clear(&u1); - mp_clear(&u2); - mp_clear(&p); - mp_clear(&e); - return MEMORY_E; - } - - /* allocate points */ - mG = ecc_new_point(); - mQ = ecc_new_point(); - if (mQ == NULL || mG == NULL) - err = MEMORY_E; - - /* Note, DecodeECC_DSA_Sig() calls mp_init() on r and s. - * If either of those don't allocate correctly, none of - * the rest of this function will execute, and everything - * gets cleaned up at the end. */ - XMEMSET(&r, 0, sizeof(r)); - XMEMSET(&s, 0, sizeof(s)); - if (err == MP_OKAY) - err = DecodeECC_DSA_Sig(sig, siglen, &r, &s); - - /* get the order */ - if (err == MP_OKAY) - err = mp_read_radix(&p, (char *)key->dp->order, 16); - - /* get the modulus */ - if (err == MP_OKAY) - err = mp_read_radix(&m, (char *)key->dp->prime, 16); - - /* check for zero */ - if (err == MP_OKAY) { - if (mp_iszero(&r) || mp_iszero(&s) || mp_cmp(&r, &p) != MP_LT || - mp_cmp(&s, &p) != MP_LT) - err = MP_ZERO_E; - } - /* read hash */ - if (err == MP_OKAY) { - /* we may need to truncate if hash is longer than key size */ - unsigned int orderBits = mp_count_bits(&p); - - /* truncate down to byte size, may be all that's needed */ - if ( (CYASSL_BIT_SIZE * hashlen) > orderBits) - hashlen = (orderBits + CYASSL_BIT_SIZE - 1)/CYASSL_BIT_SIZE; - err = mp_read_unsigned_bin(&e, hash, hashlen); - - /* may still need bit truncation too */ - if (err == MP_OKAY && (CYASSL_BIT_SIZE * hashlen) > orderBits) - mp_rshb(&e, CYASSL_BIT_SIZE - (orderBits & 0x7)); - } - - /* w = s^-1 mod n */ - if (err == MP_OKAY) - err = mp_invmod(&s, &p, &w); - - /* u1 = ew */ - if (err == MP_OKAY) - err = mp_mulmod(&e, &w, &p, &u1); - - /* u2 = rw */ - if (err == MP_OKAY) - err = mp_mulmod(&r, &w, &p, &u2); - - /* find mG and mQ */ - if (err == MP_OKAY) - err = mp_read_radix(&mG->x, (char *)key->dp->Gx, 16); - - if (err == MP_OKAY) - err = mp_read_radix(&mG->y, (char *)key->dp->Gy, 16); - if (err == MP_OKAY) - mp_set(&mG->z, 1); - - if (err == MP_OKAY) - err = mp_copy(&key->pubkey.x, &mQ->x); - if (err == MP_OKAY) - err = mp_copy(&key->pubkey.y, &mQ->y); - if (err == MP_OKAY) - err = mp_copy(&key->pubkey.z, &mQ->z); - -#ifndef ECC_SHAMIR - { - mp_digit mp; - - /* compute u1*mG + u2*mQ = mG */ - if (err == MP_OKAY) - err = ecc_mulmod(&u1, mG, mG, &m, 0); - if (err == MP_OKAY) - err = ecc_mulmod(&u2, mQ, mQ, &m, 0); - - /* find the montgomery mp */ - if (err == MP_OKAY) - err = mp_montgomery_setup(&m, &mp); - - /* add them */ - if (err == MP_OKAY) - err = ecc_projective_add_point(mQ, mG, mG, &m, &mp); - - /* reduce */ - if (err == MP_OKAY) - err = ecc_map(mG, &m, &mp); - } -#else - /* use Shamir's trick to compute u1*mG + u2*mQ using half the doubles */ - if (err == MP_OKAY) - err = ecc_mul2add(mG, &u1, mQ, &u2, mG, &m); -#endif /* ECC_SHAMIR */ - - /* v = X_x1 mod n */ - if (err == MP_OKAY) - err = mp_mod(&mG->x, &p, &v); - - /* does v == r */ - if (err == MP_OKAY) { - if (mp_cmp(&v, &r) == MP_EQ) - *stat = 1; - } - - ecc_del_point(mG); - ecc_del_point(mQ); - - mp_clear(&r); - mp_clear(&s); - mp_clear(&v); - mp_clear(&w); - mp_clear(&u1); - mp_clear(&u2); - mp_clear(&p); - mp_clear(&e); - mp_clear(&m); - - return err; -} - - -/* export public ECC key in ANSI X9.63 format */ -int ecc_export_x963(ecc_key* key, byte* out, word32* outLen) -{ -#ifdef CYASSL_SMALL_STACK - byte* buf; -#else - byte buf[ECC_BUFSIZE]; -#endif - word32 numlen; - int ret = MP_OKAY; - - if (key == NULL || out == NULL || outLen == NULL) - return ECC_BAD_ARG_E; - - if (ecc_is_valid_idx(key->idx) == 0) { - return ECC_BAD_ARG_E; - } - numlen = key->dp->size; - - if (*outLen < (1 + 2*numlen)) { - *outLen = 1 + 2*numlen; - return BUFFER_E; - } - - /* store byte 0x04 */ - out[0] = 0x04; - -#ifdef CYASSL_SMALL_STACK - buf = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (buf == NULL) - return MEMORY_E; -#endif - - do { - /* pad and store x */ - XMEMSET(buf, 0, ECC_BUFSIZE); - ret = mp_to_unsigned_bin(&key->pubkey.x, - buf + (numlen - mp_unsigned_bin_size(&key->pubkey.x))); - if (ret != MP_OKAY) - break; - XMEMCPY(out+1, buf, numlen); - - /* pad and store y */ - XMEMSET(buf, 0, ECC_BUFSIZE); - ret = mp_to_unsigned_bin(&key->pubkey.y, - buf + (numlen - mp_unsigned_bin_size(&key->pubkey.y))); - if (ret != MP_OKAY) - break; - XMEMCPY(out+1+numlen, buf, numlen); - - *outLen = 1 + 2*numlen; - } while (0); - -#ifdef CYASSL_SMALL_STACK - XFREE(buf, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - - -/* import public ECC key in ANSI X9.63 format */ -int ecc_import_x963(const byte* in, word32 inLen, ecc_key* key) -{ - int x, err; - - if (in == NULL || key == NULL) - return ECC_BAD_ARG_E; - - /* must be odd */ - if ((inLen & 1) == 0) { - return ECC_BAD_ARG_E; - } - - /* init key */ - if (mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, - NULL, NULL) != MP_OKAY) { - return MEMORY_E; - } - err = MP_OKAY; - - /* check for 4, 6 or 7 */ - if (in[0] != 4 && in[0] != 6 && in[0] != 7) { - err = ASN_PARSE_E; - } - - /* read data */ - if (err == MP_OKAY) - err = mp_read_unsigned_bin(&key->pubkey.x, (byte*)in+1, (inLen-1)>>1); - - if (err == MP_OKAY) - err = mp_read_unsigned_bin(&key->pubkey.y, (byte*)in+1+((inLen-1)>>1), - (inLen-1)>>1); - - if (err == MP_OKAY) - mp_set(&key->pubkey.z, 1); - - if (err == MP_OKAY) { - /* determine the idx */ - for (x = 0; ecc_sets[x].size != 0; x++) { - if ((unsigned)ecc_sets[x].size >= ((inLen-1)>>1)) { - break; - } - } - if (ecc_sets[x].size == 0) { - err = ASN_PARSE_E; - } else { - /* set the idx */ - key->idx = x; - key->dp = &ecc_sets[x]; - key->type = ECC_PUBLICKEY; - } - } - - if (err != MP_OKAY) { - mp_clear(&key->pubkey.x); - mp_clear(&key->pubkey.y); - mp_clear(&key->pubkey.z); - mp_clear(&key->k); - } - - return err; -} - - -/* export ecc private key only raw, outLen is in/out size - return MP_OKAY on success */ -int ecc_export_private_only(ecc_key* key, byte* out, word32* outLen) -{ - word32 numlen; - - if (key == NULL || out == NULL || outLen == NULL) - return ECC_BAD_ARG_E; - - if (ecc_is_valid_idx(key->idx) == 0) { - return ECC_BAD_ARG_E; - } - numlen = key->dp->size; - - if (*outLen < numlen) { - *outLen = numlen; - return BUFFER_E; - } - *outLen = numlen; - XMEMSET(out, 0, *outLen); - return mp_to_unsigned_bin(&key->k, out + (numlen - - mp_unsigned_bin_size(&key->k))); -} - - -/* ecc private key import, public key in ANSI X9.63 format, private raw */ -int ecc_import_private_key(const byte* priv, word32 privSz, const byte* pub, - word32 pubSz, ecc_key* key) -{ - int ret = ecc_import_x963(pub, pubSz, key); - if (ret != 0) - return ret; - - key->type = ECC_PRIVATEKEY; - - return mp_read_unsigned_bin(&key->k, priv, privSz); -} - - -/* key size in octets */ -int ecc_size(ecc_key* key) -{ - if (key == NULL) return 0; - - return key->dp->size; -} - - -/* worst case estimate, check actual return from ecc_sign_hash for actual value - of signature size in octets */ -int ecc_sig_size(ecc_key* key) -{ - int sz = ecc_size(key); - if (sz < 0) - return sz; - - return sz * 2 + SIG_HEADER_SZ + 4; /* (4) worst case estimate */ -} - - -#ifdef FP_ECC - -/* fixed point ECC cache */ -/* number of entries in the cache */ -#ifndef FP_ENTRIES - #define FP_ENTRIES 16 -#endif - -/* number of bits in LUT */ -#ifndef FP_LUT - #define FP_LUT 8U -#endif - -#ifdef ECC_SHAMIR - /* Sharmir requires a bigger LUT, TAO */ - #if (FP_LUT > 12) || (FP_LUT < 4) - #error FP_LUT must be between 4 and 12 inclusively - #endif -#else - #if (FP_LUT > 12) || (FP_LUT < 2) - #error FP_LUT must be between 2 and 12 inclusively - #endif -#endif - - -/** Our FP cache */ -typedef struct { - ecc_point* g; /* cached COPY of base point */ - ecc_point* LUT[1U< 6 - { 1, 0, 0 }, { 2, 1, 64 }, { 2, 2, 64 }, { 3, 3, 64 }, { 2, 4, 64 }, { 3, 5, 64 }, { 3, 6, 64 }, { 4, 7, 64 }, - { 2, 8, 64 }, { 3, 9, 64 }, { 3, 10, 64 }, { 4, 11, 64 }, { 3, 12, 64 }, { 4, 13, 64 }, { 4, 14, 64 }, { 5, 15, 64 }, - { 2, 16, 64 }, { 3, 17, 64 }, { 3, 18, 64 }, { 4, 19, 64 }, { 3, 20, 64 }, { 4, 21, 64 }, { 4, 22, 64 }, { 5, 23, 64 }, - { 3, 24, 64 }, { 4, 25, 64 }, { 4, 26, 64 }, { 5, 27, 64 }, { 4, 28, 64 }, { 5, 29, 64 }, { 5, 30, 64 }, { 6, 31, 64 }, - { 2, 32, 64 }, { 3, 33, 64 }, { 3, 34, 64 }, { 4, 35, 64 }, { 3, 36, 64 }, { 4, 37, 64 }, { 4, 38, 64 }, { 5, 39, 64 }, - { 3, 40, 64 }, { 4, 41, 64 }, { 4, 42, 64 }, { 5, 43, 64 }, { 4, 44, 64 }, { 5, 45, 64 }, { 5, 46, 64 }, { 6, 47, 64 }, - { 3, 48, 64 }, { 4, 49, 64 }, { 4, 50, 64 }, { 5, 51, 64 }, { 4, 52, 64 }, { 5, 53, 64 }, { 5, 54, 64 }, { 6, 55, 64 }, - { 4, 56, 64 }, { 5, 57, 64 }, { 5, 58, 64 }, { 6, 59, 64 }, { 5, 60, 64 }, { 6, 61, 64 }, { 6, 62, 64 }, { 7, 63, 64 }, -#if FP_LUT > 7 - { 1, 0, 0 }, { 2, 1, 128 }, { 2, 2, 128 }, { 3, 3, 128 }, { 2, 4, 128 }, { 3, 5, 128 }, { 3, 6, 128 }, { 4, 7, 128 }, - { 2, 8, 128 }, { 3, 9, 128 }, { 3, 10, 128 }, { 4, 11, 128 }, { 3, 12, 128 }, { 4, 13, 128 }, { 4, 14, 128 }, { 5, 15, 128 }, - { 2, 16, 128 }, { 3, 17, 128 }, { 3, 18, 128 }, { 4, 19, 128 }, { 3, 20, 128 }, { 4, 21, 128 }, { 4, 22, 128 }, { 5, 23, 128 }, - { 3, 24, 128 }, { 4, 25, 128 }, { 4, 26, 128 }, { 5, 27, 128 }, { 4, 28, 128 }, { 5, 29, 128 }, { 5, 30, 128 }, { 6, 31, 128 }, - { 2, 32, 128 }, { 3, 33, 128 }, { 3, 34, 128 }, { 4, 35, 128 }, { 3, 36, 128 }, { 4, 37, 128 }, { 4, 38, 128 }, { 5, 39, 128 }, - { 3, 40, 128 }, { 4, 41, 128 }, { 4, 42, 128 }, { 5, 43, 128 }, { 4, 44, 128 }, { 5, 45, 128 }, { 5, 46, 128 }, { 6, 47, 128 }, - { 3, 48, 128 }, { 4, 49, 128 }, { 4, 50, 128 }, { 5, 51, 128 }, { 4, 52, 128 }, { 5, 53, 128 }, { 5, 54, 128 }, { 6, 55, 128 }, - { 4, 56, 128 }, { 5, 57, 128 }, { 5, 58, 128 }, { 6, 59, 128 }, { 5, 60, 128 }, { 6, 61, 128 }, { 6, 62, 128 }, { 7, 63, 128 }, - { 2, 64, 128 }, { 3, 65, 128 }, { 3, 66, 128 }, { 4, 67, 128 }, { 3, 68, 128 }, { 4, 69, 128 }, { 4, 70, 128 }, { 5, 71, 128 }, - { 3, 72, 128 }, { 4, 73, 128 }, { 4, 74, 128 }, { 5, 75, 128 }, { 4, 76, 128 }, { 5, 77, 128 }, { 5, 78, 128 }, { 6, 79, 128 }, - { 3, 80, 128 }, { 4, 81, 128 }, { 4, 82, 128 }, { 5, 83, 128 }, { 4, 84, 128 }, { 5, 85, 128 }, { 5, 86, 128 }, { 6, 87, 128 }, - { 4, 88, 128 }, { 5, 89, 128 }, { 5, 90, 128 }, { 6, 91, 128 }, { 5, 92, 128 }, { 6, 93, 128 }, { 6, 94, 128 }, { 7, 95, 128 }, - { 3, 96, 128 }, { 4, 97, 128 }, { 4, 98, 128 }, { 5, 99, 128 }, { 4, 100, 128 }, { 5, 101, 128 }, { 5, 102, 128 }, { 6, 103, 128 }, - { 4, 104, 128 }, { 5, 105, 128 }, { 5, 106, 128 }, { 6, 107, 128 }, { 5, 108, 128 }, { 6, 109, 128 }, { 6, 110, 128 }, { 7, 111, 128 }, - { 4, 112, 128 }, { 5, 113, 128 }, { 5, 114, 128 }, { 6, 115, 128 }, { 5, 116, 128 }, { 6, 117, 128 }, { 6, 118, 128 }, { 7, 119, 128 }, - { 5, 120, 128 }, { 6, 121, 128 }, { 6, 122, 128 }, { 7, 123, 128 }, { 6, 124, 128 }, { 7, 125, 128 }, { 7, 126, 128 }, { 8, 127, 128 }, -#if FP_LUT > 8 - { 1, 0, 0 }, { 2, 1, 256 }, { 2, 2, 256 }, { 3, 3, 256 }, { 2, 4, 256 }, { 3, 5, 256 }, { 3, 6, 256 }, { 4, 7, 256 }, - { 2, 8, 256 }, { 3, 9, 256 }, { 3, 10, 256 }, { 4, 11, 256 }, { 3, 12, 256 }, { 4, 13, 256 }, { 4, 14, 256 }, { 5, 15, 256 }, - { 2, 16, 256 }, { 3, 17, 256 }, { 3, 18, 256 }, { 4, 19, 256 }, { 3, 20, 256 }, { 4, 21, 256 }, { 4, 22, 256 }, { 5, 23, 256 }, - { 3, 24, 256 }, { 4, 25, 256 }, { 4, 26, 256 }, { 5, 27, 256 }, { 4, 28, 256 }, { 5, 29, 256 }, { 5, 30, 256 }, { 6, 31, 256 }, - { 2, 32, 256 }, { 3, 33, 256 }, { 3, 34, 256 }, { 4, 35, 256 }, { 3, 36, 256 }, { 4, 37, 256 }, { 4, 38, 256 }, { 5, 39, 256 }, - { 3, 40, 256 }, { 4, 41, 256 }, { 4, 42, 256 }, { 5, 43, 256 }, { 4, 44, 256 }, { 5, 45, 256 }, { 5, 46, 256 }, { 6, 47, 256 }, - { 3, 48, 256 }, { 4, 49, 256 }, { 4, 50, 256 }, { 5, 51, 256 }, { 4, 52, 256 }, { 5, 53, 256 }, { 5, 54, 256 }, { 6, 55, 256 }, - { 4, 56, 256 }, { 5, 57, 256 }, { 5, 58, 256 }, { 6, 59, 256 }, { 5, 60, 256 }, { 6, 61, 256 }, { 6, 62, 256 }, { 7, 63, 256 }, - { 2, 64, 256 }, { 3, 65, 256 }, { 3, 66, 256 }, { 4, 67, 256 }, { 3, 68, 256 }, { 4, 69, 256 }, { 4, 70, 256 }, { 5, 71, 256 }, - { 3, 72, 256 }, { 4, 73, 256 }, { 4, 74, 256 }, { 5, 75, 256 }, { 4, 76, 256 }, { 5, 77, 256 }, { 5, 78, 256 }, { 6, 79, 256 }, - { 3, 80, 256 }, { 4, 81, 256 }, { 4, 82, 256 }, { 5, 83, 256 }, { 4, 84, 256 }, { 5, 85, 256 }, { 5, 86, 256 }, { 6, 87, 256 }, - { 4, 88, 256 }, { 5, 89, 256 }, { 5, 90, 256 }, { 6, 91, 256 }, { 5, 92, 256 }, { 6, 93, 256 }, { 6, 94, 256 }, { 7, 95, 256 }, - { 3, 96, 256 }, { 4, 97, 256 }, { 4, 98, 256 }, { 5, 99, 256 }, { 4, 100, 256 }, { 5, 101, 256 }, { 5, 102, 256 }, { 6, 103, 256 }, - { 4, 104, 256 }, { 5, 105, 256 }, { 5, 106, 256 }, { 6, 107, 256 }, { 5, 108, 256 }, { 6, 109, 256 }, { 6, 110, 256 }, { 7, 111, 256 }, - { 4, 112, 256 }, { 5, 113, 256 }, { 5, 114, 256 }, { 6, 115, 256 }, { 5, 116, 256 }, { 6, 117, 256 }, { 6, 118, 256 }, { 7, 119, 256 }, - { 5, 120, 256 }, { 6, 121, 256 }, { 6, 122, 256 }, { 7, 123, 256 }, { 6, 124, 256 }, { 7, 125, 256 }, { 7, 126, 256 }, { 8, 127, 256 }, - { 2, 128, 256 }, { 3, 129, 256 }, { 3, 130, 256 }, { 4, 131, 256 }, { 3, 132, 256 }, { 4, 133, 256 }, { 4, 134, 256 }, { 5, 135, 256 }, - { 3, 136, 256 }, { 4, 137, 256 }, { 4, 138, 256 }, { 5, 139, 256 }, { 4, 140, 256 }, { 5, 141, 256 }, { 5, 142, 256 }, { 6, 143, 256 }, - { 3, 144, 256 }, { 4, 145, 256 }, { 4, 146, 256 }, { 5, 147, 256 }, { 4, 148, 256 }, { 5, 149, 256 }, { 5, 150, 256 }, { 6, 151, 256 }, - { 4, 152, 256 }, { 5, 153, 256 }, { 5, 154, 256 }, { 6, 155, 256 }, { 5, 156, 256 }, { 6, 157, 256 }, { 6, 158, 256 }, { 7, 159, 256 }, - { 3, 160, 256 }, { 4, 161, 256 }, { 4, 162, 256 }, { 5, 163, 256 }, { 4, 164, 256 }, { 5, 165, 256 }, { 5, 166, 256 }, { 6, 167, 256 }, - { 4, 168, 256 }, { 5, 169, 256 }, { 5, 170, 256 }, { 6, 171, 256 }, { 5, 172, 256 }, { 6, 173, 256 }, { 6, 174, 256 }, { 7, 175, 256 }, - { 4, 176, 256 }, { 5, 177, 256 }, { 5, 178, 256 }, { 6, 179, 256 }, { 5, 180, 256 }, { 6, 181, 256 }, { 6, 182, 256 }, { 7, 183, 256 }, - { 5, 184, 256 }, { 6, 185, 256 }, { 6, 186, 256 }, { 7, 187, 256 }, { 6, 188, 256 }, { 7, 189, 256 }, { 7, 190, 256 }, { 8, 191, 256 }, - { 3, 192, 256 }, { 4, 193, 256 }, { 4, 194, 256 }, { 5, 195, 256 }, { 4, 196, 256 }, { 5, 197, 256 }, { 5, 198, 256 }, { 6, 199, 256 }, - { 4, 200, 256 }, { 5, 201, 256 }, { 5, 202, 256 }, { 6, 203, 256 }, { 5, 204, 256 }, { 6, 205, 256 }, { 6, 206, 256 }, { 7, 207, 256 }, - { 4, 208, 256 }, { 5, 209, 256 }, { 5, 210, 256 }, { 6, 211, 256 }, { 5, 212, 256 }, { 6, 213, 256 }, { 6, 214, 256 }, { 7, 215, 256 }, - { 5, 216, 256 }, { 6, 217, 256 }, { 6, 218, 256 }, { 7, 219, 256 }, { 6, 220, 256 }, { 7, 221, 256 }, { 7, 222, 256 }, { 8, 223, 256 }, - { 4, 224, 256 }, { 5, 225, 256 }, { 5, 226, 256 }, { 6, 227, 256 }, { 5, 228, 256 }, { 6, 229, 256 }, { 6, 230, 256 }, { 7, 231, 256 }, - { 5, 232, 256 }, { 6, 233, 256 }, { 6, 234, 256 }, { 7, 235, 256 }, { 6, 236, 256 }, { 7, 237, 256 }, { 7, 238, 256 }, { 8, 239, 256 }, - { 5, 240, 256 }, { 6, 241, 256 }, { 6, 242, 256 }, { 7, 243, 256 }, { 6, 244, 256 }, { 7, 245, 256 }, { 7, 246, 256 }, { 8, 247, 256 }, - { 6, 248, 256 }, { 7, 249, 256 }, { 7, 250, 256 }, { 8, 251, 256 }, { 7, 252, 256 }, { 8, 253, 256 }, { 8, 254, 256 }, { 9, 255, 256 }, -#if FP_LUT > 9 - { 1, 0, 0 }, { 2, 1, 512 }, { 2, 2, 512 }, { 3, 3, 512 }, { 2, 4, 512 }, { 3, 5, 512 }, { 3, 6, 512 }, { 4, 7, 512 }, - { 2, 8, 512 }, { 3, 9, 512 }, { 3, 10, 512 }, { 4, 11, 512 }, { 3, 12, 512 }, { 4, 13, 512 }, { 4, 14, 512 }, { 5, 15, 512 }, - { 2, 16, 512 }, { 3, 17, 512 }, { 3, 18, 512 }, { 4, 19, 512 }, { 3, 20, 512 }, { 4, 21, 512 }, { 4, 22, 512 }, { 5, 23, 512 }, - { 3, 24, 512 }, { 4, 25, 512 }, { 4, 26, 512 }, { 5, 27, 512 }, { 4, 28, 512 }, { 5, 29, 512 }, { 5, 30, 512 }, { 6, 31, 512 }, - { 2, 32, 512 }, { 3, 33, 512 }, { 3, 34, 512 }, { 4, 35, 512 }, { 3, 36, 512 }, { 4, 37, 512 }, { 4, 38, 512 }, { 5, 39, 512 }, - { 3, 40, 512 }, { 4, 41, 512 }, { 4, 42, 512 }, { 5, 43, 512 }, { 4, 44, 512 }, { 5, 45, 512 }, { 5, 46, 512 }, { 6, 47, 512 }, - { 3, 48, 512 }, { 4, 49, 512 }, { 4, 50, 512 }, { 5, 51, 512 }, { 4, 52, 512 }, { 5, 53, 512 }, { 5, 54, 512 }, { 6, 55, 512 }, - { 4, 56, 512 }, { 5, 57, 512 }, { 5, 58, 512 }, { 6, 59, 512 }, { 5, 60, 512 }, { 6, 61, 512 }, { 6, 62, 512 }, { 7, 63, 512 }, - { 2, 64, 512 }, { 3, 65, 512 }, { 3, 66, 512 }, { 4, 67, 512 }, { 3, 68, 512 }, { 4, 69, 512 }, { 4, 70, 512 }, { 5, 71, 512 }, - { 3, 72, 512 }, { 4, 73, 512 }, { 4, 74, 512 }, { 5, 75, 512 }, { 4, 76, 512 }, { 5, 77, 512 }, { 5, 78, 512 }, { 6, 79, 512 }, - { 3, 80, 512 }, { 4, 81, 512 }, { 4, 82, 512 }, { 5, 83, 512 }, { 4, 84, 512 }, { 5, 85, 512 }, { 5, 86, 512 }, { 6, 87, 512 }, - { 4, 88, 512 }, { 5, 89, 512 }, { 5, 90, 512 }, { 6, 91, 512 }, { 5, 92, 512 }, { 6, 93, 512 }, { 6, 94, 512 }, { 7, 95, 512 }, - { 3, 96, 512 }, { 4, 97, 512 }, { 4, 98, 512 }, { 5, 99, 512 }, { 4, 100, 512 }, { 5, 101, 512 }, { 5, 102, 512 }, { 6, 103, 512 }, - { 4, 104, 512 }, { 5, 105, 512 }, { 5, 106, 512 }, { 6, 107, 512 }, { 5, 108, 512 }, { 6, 109, 512 }, { 6, 110, 512 }, { 7, 111, 512 }, - { 4, 112, 512 }, { 5, 113, 512 }, { 5, 114, 512 }, { 6, 115, 512 }, { 5, 116, 512 }, { 6, 117, 512 }, { 6, 118, 512 }, { 7, 119, 512 }, - { 5, 120, 512 }, { 6, 121, 512 }, { 6, 122, 512 }, { 7, 123, 512 }, { 6, 124, 512 }, { 7, 125, 512 }, { 7, 126, 512 }, { 8, 127, 512 }, - { 2, 128, 512 }, { 3, 129, 512 }, { 3, 130, 512 }, { 4, 131, 512 }, { 3, 132, 512 }, { 4, 133, 512 }, { 4, 134, 512 }, { 5, 135, 512 }, - { 3, 136, 512 }, { 4, 137, 512 }, { 4, 138, 512 }, { 5, 139, 512 }, { 4, 140, 512 }, { 5, 141, 512 }, { 5, 142, 512 }, { 6, 143, 512 }, - { 3, 144, 512 }, { 4, 145, 512 }, { 4, 146, 512 }, { 5, 147, 512 }, { 4, 148, 512 }, { 5, 149, 512 }, { 5, 150, 512 }, { 6, 151, 512 }, - { 4, 152, 512 }, { 5, 153, 512 }, { 5, 154, 512 }, { 6, 155, 512 }, { 5, 156, 512 }, { 6, 157, 512 }, { 6, 158, 512 }, { 7, 159, 512 }, - { 3, 160, 512 }, { 4, 161, 512 }, { 4, 162, 512 }, { 5, 163, 512 }, { 4, 164, 512 }, { 5, 165, 512 }, { 5, 166, 512 }, { 6, 167, 512 }, - { 4, 168, 512 }, { 5, 169, 512 }, { 5, 170, 512 }, { 6, 171, 512 }, { 5, 172, 512 }, { 6, 173, 512 }, { 6, 174, 512 }, { 7, 175, 512 }, - { 4, 176, 512 }, { 5, 177, 512 }, { 5, 178, 512 }, { 6, 179, 512 }, { 5, 180, 512 }, { 6, 181, 512 }, { 6, 182, 512 }, { 7, 183, 512 }, - { 5, 184, 512 }, { 6, 185, 512 }, { 6, 186, 512 }, { 7, 187, 512 }, { 6, 188, 512 }, { 7, 189, 512 }, { 7, 190, 512 }, { 8, 191, 512 }, - { 3, 192, 512 }, { 4, 193, 512 }, { 4, 194, 512 }, { 5, 195, 512 }, { 4, 196, 512 }, { 5, 197, 512 }, { 5, 198, 512 }, { 6, 199, 512 }, - { 4, 200, 512 }, { 5, 201, 512 }, { 5, 202, 512 }, { 6, 203, 512 }, { 5, 204, 512 }, { 6, 205, 512 }, { 6, 206, 512 }, { 7, 207, 512 }, - { 4, 208, 512 }, { 5, 209, 512 }, { 5, 210, 512 }, { 6, 211, 512 }, { 5, 212, 512 }, { 6, 213, 512 }, { 6, 214, 512 }, { 7, 215, 512 }, - { 5, 216, 512 }, { 6, 217, 512 }, { 6, 218, 512 }, { 7, 219, 512 }, { 6, 220, 512 }, { 7, 221, 512 }, { 7, 222, 512 }, { 8, 223, 512 }, - { 4, 224, 512 }, { 5, 225, 512 }, { 5, 226, 512 }, { 6, 227, 512 }, { 5, 228, 512 }, { 6, 229, 512 }, { 6, 230, 512 }, { 7, 231, 512 }, - { 5, 232, 512 }, { 6, 233, 512 }, { 6, 234, 512 }, { 7, 235, 512 }, { 6, 236, 512 }, { 7, 237, 512 }, { 7, 238, 512 }, { 8, 239, 512 }, - { 5, 240, 512 }, { 6, 241, 512 }, { 6, 242, 512 }, { 7, 243, 512 }, { 6, 244, 512 }, { 7, 245, 512 }, { 7, 246, 512 }, { 8, 247, 512 }, - { 6, 248, 512 }, { 7, 249, 512 }, { 7, 250, 512 }, { 8, 251, 512 }, { 7, 252, 512 }, { 8, 253, 512 }, { 8, 254, 512 }, { 9, 255, 512 }, - { 2, 256, 512 }, { 3, 257, 512 }, { 3, 258, 512 }, { 4, 259, 512 }, { 3, 260, 512 }, { 4, 261, 512 }, { 4, 262, 512 }, { 5, 263, 512 }, - { 3, 264, 512 }, { 4, 265, 512 }, { 4, 266, 512 }, { 5, 267, 512 }, { 4, 268, 512 }, { 5, 269, 512 }, { 5, 270, 512 }, { 6, 271, 512 }, - { 3, 272, 512 }, { 4, 273, 512 }, { 4, 274, 512 }, { 5, 275, 512 }, { 4, 276, 512 }, { 5, 277, 512 }, { 5, 278, 512 }, { 6, 279, 512 }, - { 4, 280, 512 }, { 5, 281, 512 }, { 5, 282, 512 }, { 6, 283, 512 }, { 5, 284, 512 }, { 6, 285, 512 }, { 6, 286, 512 }, { 7, 287, 512 }, - { 3, 288, 512 }, { 4, 289, 512 }, { 4, 290, 512 }, { 5, 291, 512 }, { 4, 292, 512 }, { 5, 293, 512 }, { 5, 294, 512 }, { 6, 295, 512 }, - { 4, 296, 512 }, { 5, 297, 512 }, { 5, 298, 512 }, { 6, 299, 512 }, { 5, 300, 512 }, { 6, 301, 512 }, { 6, 302, 512 }, { 7, 303, 512 }, - { 4, 304, 512 }, { 5, 305, 512 }, { 5, 306, 512 }, { 6, 307, 512 }, { 5, 308, 512 }, { 6, 309, 512 }, { 6, 310, 512 }, { 7, 311, 512 }, - { 5, 312, 512 }, { 6, 313, 512 }, { 6, 314, 512 }, { 7, 315, 512 }, { 6, 316, 512 }, { 7, 317, 512 }, { 7, 318, 512 }, { 8, 319, 512 }, - { 3, 320, 512 }, { 4, 321, 512 }, { 4, 322, 512 }, { 5, 323, 512 }, { 4, 324, 512 }, { 5, 325, 512 }, { 5, 326, 512 }, { 6, 327, 512 }, - { 4, 328, 512 }, { 5, 329, 512 }, { 5, 330, 512 }, { 6, 331, 512 }, { 5, 332, 512 }, { 6, 333, 512 }, { 6, 334, 512 }, { 7, 335, 512 }, - { 4, 336, 512 }, { 5, 337, 512 }, { 5, 338, 512 }, { 6, 339, 512 }, { 5, 340, 512 }, { 6, 341, 512 }, { 6, 342, 512 }, { 7, 343, 512 }, - { 5, 344, 512 }, { 6, 345, 512 }, { 6, 346, 512 }, { 7, 347, 512 }, { 6, 348, 512 }, { 7, 349, 512 }, { 7, 350, 512 }, { 8, 351, 512 }, - { 4, 352, 512 }, { 5, 353, 512 }, { 5, 354, 512 }, { 6, 355, 512 }, { 5, 356, 512 }, { 6, 357, 512 }, { 6, 358, 512 }, { 7, 359, 512 }, - { 5, 360, 512 }, { 6, 361, 512 }, { 6, 362, 512 }, { 7, 363, 512 }, { 6, 364, 512 }, { 7, 365, 512 }, { 7, 366, 512 }, { 8, 367, 512 }, - { 5, 368, 512 }, { 6, 369, 512 }, { 6, 370, 512 }, { 7, 371, 512 }, { 6, 372, 512 }, { 7, 373, 512 }, { 7, 374, 512 }, { 8, 375, 512 }, - { 6, 376, 512 }, { 7, 377, 512 }, { 7, 378, 512 }, { 8, 379, 512 }, { 7, 380, 512 }, { 8, 381, 512 }, { 8, 382, 512 }, { 9, 383, 512 }, - { 3, 384, 512 }, { 4, 385, 512 }, { 4, 386, 512 }, { 5, 387, 512 }, { 4, 388, 512 }, { 5, 389, 512 }, { 5, 390, 512 }, { 6, 391, 512 }, - { 4, 392, 512 }, { 5, 393, 512 }, { 5, 394, 512 }, { 6, 395, 512 }, { 5, 396, 512 }, { 6, 397, 512 }, { 6, 398, 512 }, { 7, 399, 512 }, - { 4, 400, 512 }, { 5, 401, 512 }, { 5, 402, 512 }, { 6, 403, 512 }, { 5, 404, 512 }, { 6, 405, 512 }, { 6, 406, 512 }, { 7, 407, 512 }, - { 5, 408, 512 }, { 6, 409, 512 }, { 6, 410, 512 }, { 7, 411, 512 }, { 6, 412, 512 }, { 7, 413, 512 }, { 7, 414, 512 }, { 8, 415, 512 }, - { 4, 416, 512 }, { 5, 417, 512 }, { 5, 418, 512 }, { 6, 419, 512 }, { 5, 420, 512 }, { 6, 421, 512 }, { 6, 422, 512 }, { 7, 423, 512 }, - { 5, 424, 512 }, { 6, 425, 512 }, { 6, 426, 512 }, { 7, 427, 512 }, { 6, 428, 512 }, { 7, 429, 512 }, { 7, 430, 512 }, { 8, 431, 512 }, - { 5, 432, 512 }, { 6, 433, 512 }, { 6, 434, 512 }, { 7, 435, 512 }, { 6, 436, 512 }, { 7, 437, 512 }, { 7, 438, 512 }, { 8, 439, 512 }, - { 6, 440, 512 }, { 7, 441, 512 }, { 7, 442, 512 }, { 8, 443, 512 }, { 7, 444, 512 }, { 8, 445, 512 }, { 8, 446, 512 }, { 9, 447, 512 }, - { 4, 448, 512 }, { 5, 449, 512 }, { 5, 450, 512 }, { 6, 451, 512 }, { 5, 452, 512 }, { 6, 453, 512 }, { 6, 454, 512 }, { 7, 455, 512 }, - { 5, 456, 512 }, { 6, 457, 512 }, { 6, 458, 512 }, { 7, 459, 512 }, { 6, 460, 512 }, { 7, 461, 512 }, { 7, 462, 512 }, { 8, 463, 512 }, - { 5, 464, 512 }, { 6, 465, 512 }, { 6, 466, 512 }, { 7, 467, 512 }, { 6, 468, 512 }, { 7, 469, 512 }, { 7, 470, 512 }, { 8, 471, 512 }, - { 6, 472, 512 }, { 7, 473, 512 }, { 7, 474, 512 }, { 8, 475, 512 }, { 7, 476, 512 }, { 8, 477, 512 }, { 8, 478, 512 }, { 9, 479, 512 }, - { 5, 480, 512 }, { 6, 481, 512 }, { 6, 482, 512 }, { 7, 483, 512 }, { 6, 484, 512 }, { 7, 485, 512 }, { 7, 486, 512 }, { 8, 487, 512 }, - { 6, 488, 512 }, { 7, 489, 512 }, { 7, 490, 512 }, { 8, 491, 512 }, { 7, 492, 512 }, { 8, 493, 512 }, { 8, 494, 512 }, { 9, 495, 512 }, - { 6, 496, 512 }, { 7, 497, 512 }, { 7, 498, 512 }, { 8, 499, 512 }, { 7, 500, 512 }, { 8, 501, 512 }, { 8, 502, 512 }, { 9, 503, 512 }, - { 7, 504, 512 }, { 8, 505, 512 }, { 8, 506, 512 }, { 9, 507, 512 }, { 8, 508, 512 }, { 9, 509, 512 }, { 9, 510, 512 }, { 10, 511, 512 }, -#if FP_LUT > 10 - { 1, 0, 0 }, { 2, 1, 1024 }, { 2, 2, 1024 }, { 3, 3, 1024 }, { 2, 4, 1024 }, { 3, 5, 1024 }, { 3, 6, 1024 }, { 4, 7, 1024 }, - { 2, 8, 1024 }, { 3, 9, 1024 }, { 3, 10, 1024 }, { 4, 11, 1024 }, { 3, 12, 1024 }, { 4, 13, 1024 }, { 4, 14, 1024 }, { 5, 15, 1024 }, - { 2, 16, 1024 }, { 3, 17, 1024 }, { 3, 18, 1024 }, { 4, 19, 1024 }, { 3, 20, 1024 }, { 4, 21, 1024 }, { 4, 22, 1024 }, { 5, 23, 1024 }, - { 3, 24, 1024 }, { 4, 25, 1024 }, { 4, 26, 1024 }, { 5, 27, 1024 }, { 4, 28, 1024 }, { 5, 29, 1024 }, { 5, 30, 1024 }, { 6, 31, 1024 }, - { 2, 32, 1024 }, { 3, 33, 1024 }, { 3, 34, 1024 }, { 4, 35, 1024 }, { 3, 36, 1024 }, { 4, 37, 1024 }, { 4, 38, 1024 }, { 5, 39, 1024 }, - { 3, 40, 1024 }, { 4, 41, 1024 }, { 4, 42, 1024 }, { 5, 43, 1024 }, { 4, 44, 1024 }, { 5, 45, 1024 }, { 5, 46, 1024 }, { 6, 47, 1024 }, - { 3, 48, 1024 }, { 4, 49, 1024 }, { 4, 50, 1024 }, { 5, 51, 1024 }, { 4, 52, 1024 }, { 5, 53, 1024 }, { 5, 54, 1024 }, { 6, 55, 1024 }, - { 4, 56, 1024 }, { 5, 57, 1024 }, { 5, 58, 1024 }, { 6, 59, 1024 }, { 5, 60, 1024 }, { 6, 61, 1024 }, { 6, 62, 1024 }, { 7, 63, 1024 }, - { 2, 64, 1024 }, { 3, 65, 1024 }, { 3, 66, 1024 }, { 4, 67, 1024 }, { 3, 68, 1024 }, { 4, 69, 1024 }, { 4, 70, 1024 }, { 5, 71, 1024 }, - { 3, 72, 1024 }, { 4, 73, 1024 }, { 4, 74, 1024 }, { 5, 75, 1024 }, { 4, 76, 1024 }, { 5, 77, 1024 }, { 5, 78, 1024 }, { 6, 79, 1024 }, - { 3, 80, 1024 }, { 4, 81, 1024 }, { 4, 82, 1024 }, { 5, 83, 1024 }, { 4, 84, 1024 }, { 5, 85, 1024 }, { 5, 86, 1024 }, { 6, 87, 1024 }, - { 4, 88, 1024 }, { 5, 89, 1024 }, { 5, 90, 1024 }, { 6, 91, 1024 }, { 5, 92, 1024 }, { 6, 93, 1024 }, { 6, 94, 1024 }, { 7, 95, 1024 }, - { 3, 96, 1024 }, { 4, 97, 1024 }, { 4, 98, 1024 }, { 5, 99, 1024 }, { 4, 100, 1024 }, { 5, 101, 1024 }, { 5, 102, 1024 }, { 6, 103, 1024 }, - { 4, 104, 1024 }, { 5, 105, 1024 }, { 5, 106, 1024 }, { 6, 107, 1024 }, { 5, 108, 1024 }, { 6, 109, 1024 }, { 6, 110, 1024 }, { 7, 111, 1024 }, - { 4, 112, 1024 }, { 5, 113, 1024 }, { 5, 114, 1024 }, { 6, 115, 1024 }, { 5, 116, 1024 }, { 6, 117, 1024 }, { 6, 118, 1024 }, { 7, 119, 1024 }, - { 5, 120, 1024 }, { 6, 121, 1024 }, { 6, 122, 1024 }, { 7, 123, 1024 }, { 6, 124, 1024 }, { 7, 125, 1024 }, { 7, 126, 1024 }, { 8, 127, 1024 }, - { 2, 128, 1024 }, { 3, 129, 1024 }, { 3, 130, 1024 }, { 4, 131, 1024 }, { 3, 132, 1024 }, { 4, 133, 1024 }, { 4, 134, 1024 }, { 5, 135, 1024 }, - { 3, 136, 1024 }, { 4, 137, 1024 }, { 4, 138, 1024 }, { 5, 139, 1024 }, { 4, 140, 1024 }, { 5, 141, 1024 }, { 5, 142, 1024 }, { 6, 143, 1024 }, - { 3, 144, 1024 }, { 4, 145, 1024 }, { 4, 146, 1024 }, { 5, 147, 1024 }, { 4, 148, 1024 }, { 5, 149, 1024 }, { 5, 150, 1024 }, { 6, 151, 1024 }, - { 4, 152, 1024 }, { 5, 153, 1024 }, { 5, 154, 1024 }, { 6, 155, 1024 }, { 5, 156, 1024 }, { 6, 157, 1024 }, { 6, 158, 1024 }, { 7, 159, 1024 }, - { 3, 160, 1024 }, { 4, 161, 1024 }, { 4, 162, 1024 }, { 5, 163, 1024 }, { 4, 164, 1024 }, { 5, 165, 1024 }, { 5, 166, 1024 }, { 6, 167, 1024 }, - { 4, 168, 1024 }, { 5, 169, 1024 }, { 5, 170, 1024 }, { 6, 171, 1024 }, { 5, 172, 1024 }, { 6, 173, 1024 }, { 6, 174, 1024 }, { 7, 175, 1024 }, - { 4, 176, 1024 }, { 5, 177, 1024 }, { 5, 178, 1024 }, { 6, 179, 1024 }, { 5, 180, 1024 }, { 6, 181, 1024 }, { 6, 182, 1024 }, { 7, 183, 1024 }, - { 5, 184, 1024 }, { 6, 185, 1024 }, { 6, 186, 1024 }, { 7, 187, 1024 }, { 6, 188, 1024 }, { 7, 189, 1024 }, { 7, 190, 1024 }, { 8, 191, 1024 }, - { 3, 192, 1024 }, { 4, 193, 1024 }, { 4, 194, 1024 }, { 5, 195, 1024 }, { 4, 196, 1024 }, { 5, 197, 1024 }, { 5, 198, 1024 }, { 6, 199, 1024 }, - { 4, 200, 1024 }, { 5, 201, 1024 }, { 5, 202, 1024 }, { 6, 203, 1024 }, { 5, 204, 1024 }, { 6, 205, 1024 }, { 6, 206, 1024 }, { 7, 207, 1024 }, - { 4, 208, 1024 }, { 5, 209, 1024 }, { 5, 210, 1024 }, { 6, 211, 1024 }, { 5, 212, 1024 }, { 6, 213, 1024 }, { 6, 214, 1024 }, { 7, 215, 1024 }, - { 5, 216, 1024 }, { 6, 217, 1024 }, { 6, 218, 1024 }, { 7, 219, 1024 }, { 6, 220, 1024 }, { 7, 221, 1024 }, { 7, 222, 1024 }, { 8, 223, 1024 }, - { 4, 224, 1024 }, { 5, 225, 1024 }, { 5, 226, 1024 }, { 6, 227, 1024 }, { 5, 228, 1024 }, { 6, 229, 1024 }, { 6, 230, 1024 }, { 7, 231, 1024 }, - { 5, 232, 1024 }, { 6, 233, 1024 }, { 6, 234, 1024 }, { 7, 235, 1024 }, { 6, 236, 1024 }, { 7, 237, 1024 }, { 7, 238, 1024 }, { 8, 239, 1024 }, - { 5, 240, 1024 }, { 6, 241, 1024 }, { 6, 242, 1024 }, { 7, 243, 1024 }, { 6, 244, 1024 }, { 7, 245, 1024 }, { 7, 246, 1024 }, { 8, 247, 1024 }, - { 6, 248, 1024 }, { 7, 249, 1024 }, { 7, 250, 1024 }, { 8, 251, 1024 }, { 7, 252, 1024 }, { 8, 253, 1024 }, { 8, 254, 1024 }, { 9, 255, 1024 }, - { 2, 256, 1024 }, { 3, 257, 1024 }, { 3, 258, 1024 }, { 4, 259, 1024 }, { 3, 260, 1024 }, { 4, 261, 1024 }, { 4, 262, 1024 }, { 5, 263, 1024 }, - { 3, 264, 1024 }, { 4, 265, 1024 }, { 4, 266, 1024 }, { 5, 267, 1024 }, { 4, 268, 1024 }, { 5, 269, 1024 }, { 5, 270, 1024 }, { 6, 271, 1024 }, - { 3, 272, 1024 }, { 4, 273, 1024 }, { 4, 274, 1024 }, { 5, 275, 1024 }, { 4, 276, 1024 }, { 5, 277, 1024 }, { 5, 278, 1024 }, { 6, 279, 1024 }, - { 4, 280, 1024 }, { 5, 281, 1024 }, { 5, 282, 1024 }, { 6, 283, 1024 }, { 5, 284, 1024 }, { 6, 285, 1024 }, { 6, 286, 1024 }, { 7, 287, 1024 }, - { 3, 288, 1024 }, { 4, 289, 1024 }, { 4, 290, 1024 }, { 5, 291, 1024 }, { 4, 292, 1024 }, { 5, 293, 1024 }, { 5, 294, 1024 }, { 6, 295, 1024 }, - { 4, 296, 1024 }, { 5, 297, 1024 }, { 5, 298, 1024 }, { 6, 299, 1024 }, { 5, 300, 1024 }, { 6, 301, 1024 }, { 6, 302, 1024 }, { 7, 303, 1024 }, - { 4, 304, 1024 }, { 5, 305, 1024 }, { 5, 306, 1024 }, { 6, 307, 1024 }, { 5, 308, 1024 }, { 6, 309, 1024 }, { 6, 310, 1024 }, { 7, 311, 1024 }, - { 5, 312, 1024 }, { 6, 313, 1024 }, { 6, 314, 1024 }, { 7, 315, 1024 }, { 6, 316, 1024 }, { 7, 317, 1024 }, { 7, 318, 1024 }, { 8, 319, 1024 }, - { 3, 320, 1024 }, { 4, 321, 1024 }, { 4, 322, 1024 }, { 5, 323, 1024 }, { 4, 324, 1024 }, { 5, 325, 1024 }, { 5, 326, 1024 }, { 6, 327, 1024 }, - { 4, 328, 1024 }, { 5, 329, 1024 }, { 5, 330, 1024 }, { 6, 331, 1024 }, { 5, 332, 1024 }, { 6, 333, 1024 }, { 6, 334, 1024 }, { 7, 335, 1024 }, - { 4, 336, 1024 }, { 5, 337, 1024 }, { 5, 338, 1024 }, { 6, 339, 1024 }, { 5, 340, 1024 }, { 6, 341, 1024 }, { 6, 342, 1024 }, { 7, 343, 1024 }, - { 5, 344, 1024 }, { 6, 345, 1024 }, { 6, 346, 1024 }, { 7, 347, 1024 }, { 6, 348, 1024 }, { 7, 349, 1024 }, { 7, 350, 1024 }, { 8, 351, 1024 }, - { 4, 352, 1024 }, { 5, 353, 1024 }, { 5, 354, 1024 }, { 6, 355, 1024 }, { 5, 356, 1024 }, { 6, 357, 1024 }, { 6, 358, 1024 }, { 7, 359, 1024 }, - { 5, 360, 1024 }, { 6, 361, 1024 }, { 6, 362, 1024 }, { 7, 363, 1024 }, { 6, 364, 1024 }, { 7, 365, 1024 }, { 7, 366, 1024 }, { 8, 367, 1024 }, - { 5, 368, 1024 }, { 6, 369, 1024 }, { 6, 370, 1024 }, { 7, 371, 1024 }, { 6, 372, 1024 }, { 7, 373, 1024 }, { 7, 374, 1024 }, { 8, 375, 1024 }, - { 6, 376, 1024 }, { 7, 377, 1024 }, { 7, 378, 1024 }, { 8, 379, 1024 }, { 7, 380, 1024 }, { 8, 381, 1024 }, { 8, 382, 1024 }, { 9, 383, 1024 }, - { 3, 384, 1024 }, { 4, 385, 1024 }, { 4, 386, 1024 }, { 5, 387, 1024 }, { 4, 388, 1024 }, { 5, 389, 1024 }, { 5, 390, 1024 }, { 6, 391, 1024 }, - { 4, 392, 1024 }, { 5, 393, 1024 }, { 5, 394, 1024 }, { 6, 395, 1024 }, { 5, 396, 1024 }, { 6, 397, 1024 }, { 6, 398, 1024 }, { 7, 399, 1024 }, - { 4, 400, 1024 }, { 5, 401, 1024 }, { 5, 402, 1024 }, { 6, 403, 1024 }, { 5, 404, 1024 }, { 6, 405, 1024 }, { 6, 406, 1024 }, { 7, 407, 1024 }, - { 5, 408, 1024 }, { 6, 409, 1024 }, { 6, 410, 1024 }, { 7, 411, 1024 }, { 6, 412, 1024 }, { 7, 413, 1024 }, { 7, 414, 1024 }, { 8, 415, 1024 }, - { 4, 416, 1024 }, { 5, 417, 1024 }, { 5, 418, 1024 }, { 6, 419, 1024 }, { 5, 420, 1024 }, { 6, 421, 1024 }, { 6, 422, 1024 }, { 7, 423, 1024 }, - { 5, 424, 1024 }, { 6, 425, 1024 }, { 6, 426, 1024 }, { 7, 427, 1024 }, { 6, 428, 1024 }, { 7, 429, 1024 }, { 7, 430, 1024 }, { 8, 431, 1024 }, - { 5, 432, 1024 }, { 6, 433, 1024 }, { 6, 434, 1024 }, { 7, 435, 1024 }, { 6, 436, 1024 }, { 7, 437, 1024 }, { 7, 438, 1024 }, { 8, 439, 1024 }, - { 6, 440, 1024 }, { 7, 441, 1024 }, { 7, 442, 1024 }, { 8, 443, 1024 }, { 7, 444, 1024 }, { 8, 445, 1024 }, { 8, 446, 1024 }, { 9, 447, 1024 }, - { 4, 448, 1024 }, { 5, 449, 1024 }, { 5, 450, 1024 }, { 6, 451, 1024 }, { 5, 452, 1024 }, { 6, 453, 1024 }, { 6, 454, 1024 }, { 7, 455, 1024 }, - { 5, 456, 1024 }, { 6, 457, 1024 }, { 6, 458, 1024 }, { 7, 459, 1024 }, { 6, 460, 1024 }, { 7, 461, 1024 }, { 7, 462, 1024 }, { 8, 463, 1024 }, - { 5, 464, 1024 }, { 6, 465, 1024 }, { 6, 466, 1024 }, { 7, 467, 1024 }, { 6, 468, 1024 }, { 7, 469, 1024 }, { 7, 470, 1024 }, { 8, 471, 1024 }, - { 6, 472, 1024 }, { 7, 473, 1024 }, { 7, 474, 1024 }, { 8, 475, 1024 }, { 7, 476, 1024 }, { 8, 477, 1024 }, { 8, 478, 1024 }, { 9, 479, 1024 }, - { 5, 480, 1024 }, { 6, 481, 1024 }, { 6, 482, 1024 }, { 7, 483, 1024 }, { 6, 484, 1024 }, { 7, 485, 1024 }, { 7, 486, 1024 }, { 8, 487, 1024 }, - { 6, 488, 1024 }, { 7, 489, 1024 }, { 7, 490, 1024 }, { 8, 491, 1024 }, { 7, 492, 1024 }, { 8, 493, 1024 }, { 8, 494, 1024 }, { 9, 495, 1024 }, - { 6, 496, 1024 }, { 7, 497, 1024 }, { 7, 498, 1024 }, { 8, 499, 1024 }, { 7, 500, 1024 }, { 8, 501, 1024 }, { 8, 502, 1024 }, { 9, 503, 1024 }, - { 7, 504, 1024 }, { 8, 505, 1024 }, { 8, 506, 1024 }, { 9, 507, 1024 }, { 8, 508, 1024 }, { 9, 509, 1024 }, { 9, 510, 1024 }, { 10, 511, 1024 }, - { 2, 512, 1024 }, { 3, 513, 1024 }, { 3, 514, 1024 }, { 4, 515, 1024 }, { 3, 516, 1024 }, { 4, 517, 1024 }, { 4, 518, 1024 }, { 5, 519, 1024 }, - { 3, 520, 1024 }, { 4, 521, 1024 }, { 4, 522, 1024 }, { 5, 523, 1024 }, { 4, 524, 1024 }, { 5, 525, 1024 }, { 5, 526, 1024 }, { 6, 527, 1024 }, - { 3, 528, 1024 }, { 4, 529, 1024 }, { 4, 530, 1024 }, { 5, 531, 1024 }, { 4, 532, 1024 }, { 5, 533, 1024 }, { 5, 534, 1024 }, { 6, 535, 1024 }, - { 4, 536, 1024 }, { 5, 537, 1024 }, { 5, 538, 1024 }, { 6, 539, 1024 }, { 5, 540, 1024 }, { 6, 541, 1024 }, { 6, 542, 1024 }, { 7, 543, 1024 }, - { 3, 544, 1024 }, { 4, 545, 1024 }, { 4, 546, 1024 }, { 5, 547, 1024 }, { 4, 548, 1024 }, { 5, 549, 1024 }, { 5, 550, 1024 }, { 6, 551, 1024 }, - { 4, 552, 1024 }, { 5, 553, 1024 }, { 5, 554, 1024 }, { 6, 555, 1024 }, { 5, 556, 1024 }, { 6, 557, 1024 }, { 6, 558, 1024 }, { 7, 559, 1024 }, - { 4, 560, 1024 }, { 5, 561, 1024 }, { 5, 562, 1024 }, { 6, 563, 1024 }, { 5, 564, 1024 }, { 6, 565, 1024 }, { 6, 566, 1024 }, { 7, 567, 1024 }, - { 5, 568, 1024 }, { 6, 569, 1024 }, { 6, 570, 1024 }, { 7, 571, 1024 }, { 6, 572, 1024 }, { 7, 573, 1024 }, { 7, 574, 1024 }, { 8, 575, 1024 }, - { 3, 576, 1024 }, { 4, 577, 1024 }, { 4, 578, 1024 }, { 5, 579, 1024 }, { 4, 580, 1024 }, { 5, 581, 1024 }, { 5, 582, 1024 }, { 6, 583, 1024 }, - { 4, 584, 1024 }, { 5, 585, 1024 }, { 5, 586, 1024 }, { 6, 587, 1024 }, { 5, 588, 1024 }, { 6, 589, 1024 }, { 6, 590, 1024 }, { 7, 591, 1024 }, - { 4, 592, 1024 }, { 5, 593, 1024 }, { 5, 594, 1024 }, { 6, 595, 1024 }, { 5, 596, 1024 }, { 6, 597, 1024 }, { 6, 598, 1024 }, { 7, 599, 1024 }, - { 5, 600, 1024 }, { 6, 601, 1024 }, { 6, 602, 1024 }, { 7, 603, 1024 }, { 6, 604, 1024 }, { 7, 605, 1024 }, { 7, 606, 1024 }, { 8, 607, 1024 }, - { 4, 608, 1024 }, { 5, 609, 1024 }, { 5, 610, 1024 }, { 6, 611, 1024 }, { 5, 612, 1024 }, { 6, 613, 1024 }, { 6, 614, 1024 }, { 7, 615, 1024 }, - { 5, 616, 1024 }, { 6, 617, 1024 }, { 6, 618, 1024 }, { 7, 619, 1024 }, { 6, 620, 1024 }, { 7, 621, 1024 }, { 7, 622, 1024 }, { 8, 623, 1024 }, - { 5, 624, 1024 }, { 6, 625, 1024 }, { 6, 626, 1024 }, { 7, 627, 1024 }, { 6, 628, 1024 }, { 7, 629, 1024 }, { 7, 630, 1024 }, { 8, 631, 1024 }, - { 6, 632, 1024 }, { 7, 633, 1024 }, { 7, 634, 1024 }, { 8, 635, 1024 }, { 7, 636, 1024 }, { 8, 637, 1024 }, { 8, 638, 1024 }, { 9, 639, 1024 }, - { 3, 640, 1024 }, { 4, 641, 1024 }, { 4, 642, 1024 }, { 5, 643, 1024 }, { 4, 644, 1024 }, { 5, 645, 1024 }, { 5, 646, 1024 }, { 6, 647, 1024 }, - { 4, 648, 1024 }, { 5, 649, 1024 }, { 5, 650, 1024 }, { 6, 651, 1024 }, { 5, 652, 1024 }, { 6, 653, 1024 }, { 6, 654, 1024 }, { 7, 655, 1024 }, - { 4, 656, 1024 }, { 5, 657, 1024 }, { 5, 658, 1024 }, { 6, 659, 1024 }, { 5, 660, 1024 }, { 6, 661, 1024 }, { 6, 662, 1024 }, { 7, 663, 1024 }, - { 5, 664, 1024 }, { 6, 665, 1024 }, { 6, 666, 1024 }, { 7, 667, 1024 }, { 6, 668, 1024 }, { 7, 669, 1024 }, { 7, 670, 1024 }, { 8, 671, 1024 }, - { 4, 672, 1024 }, { 5, 673, 1024 }, { 5, 674, 1024 }, { 6, 675, 1024 }, { 5, 676, 1024 }, { 6, 677, 1024 }, { 6, 678, 1024 }, { 7, 679, 1024 }, - { 5, 680, 1024 }, { 6, 681, 1024 }, { 6, 682, 1024 }, { 7, 683, 1024 }, { 6, 684, 1024 }, { 7, 685, 1024 }, { 7, 686, 1024 }, { 8, 687, 1024 }, - { 5, 688, 1024 }, { 6, 689, 1024 }, { 6, 690, 1024 }, { 7, 691, 1024 }, { 6, 692, 1024 }, { 7, 693, 1024 }, { 7, 694, 1024 }, { 8, 695, 1024 }, - { 6, 696, 1024 }, { 7, 697, 1024 }, { 7, 698, 1024 }, { 8, 699, 1024 }, { 7, 700, 1024 }, { 8, 701, 1024 }, { 8, 702, 1024 }, { 9, 703, 1024 }, - { 4, 704, 1024 }, { 5, 705, 1024 }, { 5, 706, 1024 }, { 6, 707, 1024 }, { 5, 708, 1024 }, { 6, 709, 1024 }, { 6, 710, 1024 }, { 7, 711, 1024 }, - { 5, 712, 1024 }, { 6, 713, 1024 }, { 6, 714, 1024 }, { 7, 715, 1024 }, { 6, 716, 1024 }, { 7, 717, 1024 }, { 7, 718, 1024 }, { 8, 719, 1024 }, - { 5, 720, 1024 }, { 6, 721, 1024 }, { 6, 722, 1024 }, { 7, 723, 1024 }, { 6, 724, 1024 }, { 7, 725, 1024 }, { 7, 726, 1024 }, { 8, 727, 1024 }, - { 6, 728, 1024 }, { 7, 729, 1024 }, { 7, 730, 1024 }, { 8, 731, 1024 }, { 7, 732, 1024 }, { 8, 733, 1024 }, { 8, 734, 1024 }, { 9, 735, 1024 }, - { 5, 736, 1024 }, { 6, 737, 1024 }, { 6, 738, 1024 }, { 7, 739, 1024 }, { 6, 740, 1024 }, { 7, 741, 1024 }, { 7, 742, 1024 }, { 8, 743, 1024 }, - { 6, 744, 1024 }, { 7, 745, 1024 }, { 7, 746, 1024 }, { 8, 747, 1024 }, { 7, 748, 1024 }, { 8, 749, 1024 }, { 8, 750, 1024 }, { 9, 751, 1024 }, - { 6, 752, 1024 }, { 7, 753, 1024 }, { 7, 754, 1024 }, { 8, 755, 1024 }, { 7, 756, 1024 }, { 8, 757, 1024 }, { 8, 758, 1024 }, { 9, 759, 1024 }, - { 7, 760, 1024 }, { 8, 761, 1024 }, { 8, 762, 1024 }, { 9, 763, 1024 }, { 8, 764, 1024 }, { 9, 765, 1024 }, { 9, 766, 1024 }, { 10, 767, 1024 }, - { 3, 768, 1024 }, { 4, 769, 1024 }, { 4, 770, 1024 }, { 5, 771, 1024 }, { 4, 772, 1024 }, { 5, 773, 1024 }, { 5, 774, 1024 }, { 6, 775, 1024 }, - { 4, 776, 1024 }, { 5, 777, 1024 }, { 5, 778, 1024 }, { 6, 779, 1024 }, { 5, 780, 1024 }, { 6, 781, 1024 }, { 6, 782, 1024 }, { 7, 783, 1024 }, - { 4, 784, 1024 }, { 5, 785, 1024 }, { 5, 786, 1024 }, { 6, 787, 1024 }, { 5, 788, 1024 }, { 6, 789, 1024 }, { 6, 790, 1024 }, { 7, 791, 1024 }, - { 5, 792, 1024 }, { 6, 793, 1024 }, { 6, 794, 1024 }, { 7, 795, 1024 }, { 6, 796, 1024 }, { 7, 797, 1024 }, { 7, 798, 1024 }, { 8, 799, 1024 }, - { 4, 800, 1024 }, { 5, 801, 1024 }, { 5, 802, 1024 }, { 6, 803, 1024 }, { 5, 804, 1024 }, { 6, 805, 1024 }, { 6, 806, 1024 }, { 7, 807, 1024 }, - { 5, 808, 1024 }, { 6, 809, 1024 }, { 6, 810, 1024 }, { 7, 811, 1024 }, { 6, 812, 1024 }, { 7, 813, 1024 }, { 7, 814, 1024 }, { 8, 815, 1024 }, - { 5, 816, 1024 }, { 6, 817, 1024 }, { 6, 818, 1024 }, { 7, 819, 1024 }, { 6, 820, 1024 }, { 7, 821, 1024 }, { 7, 822, 1024 }, { 8, 823, 1024 }, - { 6, 824, 1024 }, { 7, 825, 1024 }, { 7, 826, 1024 }, { 8, 827, 1024 }, { 7, 828, 1024 }, { 8, 829, 1024 }, { 8, 830, 1024 }, { 9, 831, 1024 }, - { 4, 832, 1024 }, { 5, 833, 1024 }, { 5, 834, 1024 }, { 6, 835, 1024 }, { 5, 836, 1024 }, { 6, 837, 1024 }, { 6, 838, 1024 }, { 7, 839, 1024 }, - { 5, 840, 1024 }, { 6, 841, 1024 }, { 6, 842, 1024 }, { 7, 843, 1024 }, { 6, 844, 1024 }, { 7, 845, 1024 }, { 7, 846, 1024 }, { 8, 847, 1024 }, - { 5, 848, 1024 }, { 6, 849, 1024 }, { 6, 850, 1024 }, { 7, 851, 1024 }, { 6, 852, 1024 }, { 7, 853, 1024 }, { 7, 854, 1024 }, { 8, 855, 1024 }, - { 6, 856, 1024 }, { 7, 857, 1024 }, { 7, 858, 1024 }, { 8, 859, 1024 }, { 7, 860, 1024 }, { 8, 861, 1024 }, { 8, 862, 1024 }, { 9, 863, 1024 }, - { 5, 864, 1024 }, { 6, 865, 1024 }, { 6, 866, 1024 }, { 7, 867, 1024 }, { 6, 868, 1024 }, { 7, 869, 1024 }, { 7, 870, 1024 }, { 8, 871, 1024 }, - { 6, 872, 1024 }, { 7, 873, 1024 }, { 7, 874, 1024 }, { 8, 875, 1024 }, { 7, 876, 1024 }, { 8, 877, 1024 }, { 8, 878, 1024 }, { 9, 879, 1024 }, - { 6, 880, 1024 }, { 7, 881, 1024 }, { 7, 882, 1024 }, { 8, 883, 1024 }, { 7, 884, 1024 }, { 8, 885, 1024 }, { 8, 886, 1024 }, { 9, 887, 1024 }, - { 7, 888, 1024 }, { 8, 889, 1024 }, { 8, 890, 1024 }, { 9, 891, 1024 }, { 8, 892, 1024 }, { 9, 893, 1024 }, { 9, 894, 1024 }, { 10, 895, 1024 }, - { 4, 896, 1024 }, { 5, 897, 1024 }, { 5, 898, 1024 }, { 6, 899, 1024 }, { 5, 900, 1024 }, { 6, 901, 1024 }, { 6, 902, 1024 }, { 7, 903, 1024 }, - { 5, 904, 1024 }, { 6, 905, 1024 }, { 6, 906, 1024 }, { 7, 907, 1024 }, { 6, 908, 1024 }, { 7, 909, 1024 }, { 7, 910, 1024 }, { 8, 911, 1024 }, - { 5, 912, 1024 }, { 6, 913, 1024 }, { 6, 914, 1024 }, { 7, 915, 1024 }, { 6, 916, 1024 }, { 7, 917, 1024 }, { 7, 918, 1024 }, { 8, 919, 1024 }, - { 6, 920, 1024 }, { 7, 921, 1024 }, { 7, 922, 1024 }, { 8, 923, 1024 }, { 7, 924, 1024 }, { 8, 925, 1024 }, { 8, 926, 1024 }, { 9, 927, 1024 }, - { 5, 928, 1024 }, { 6, 929, 1024 }, { 6, 930, 1024 }, { 7, 931, 1024 }, { 6, 932, 1024 }, { 7, 933, 1024 }, { 7, 934, 1024 }, { 8, 935, 1024 }, - { 6, 936, 1024 }, { 7, 937, 1024 }, { 7, 938, 1024 }, { 8, 939, 1024 }, { 7, 940, 1024 }, { 8, 941, 1024 }, { 8, 942, 1024 }, { 9, 943, 1024 }, - { 6, 944, 1024 }, { 7, 945, 1024 }, { 7, 946, 1024 }, { 8, 947, 1024 }, { 7, 948, 1024 }, { 8, 949, 1024 }, { 8, 950, 1024 }, { 9, 951, 1024 }, - { 7, 952, 1024 }, { 8, 953, 1024 }, { 8, 954, 1024 }, { 9, 955, 1024 }, { 8, 956, 1024 }, { 9, 957, 1024 }, { 9, 958, 1024 }, { 10, 959, 1024 }, - { 5, 960, 1024 }, { 6, 961, 1024 }, { 6, 962, 1024 }, { 7, 963, 1024 }, { 6, 964, 1024 }, { 7, 965, 1024 }, { 7, 966, 1024 }, { 8, 967, 1024 }, - { 6, 968, 1024 }, { 7, 969, 1024 }, { 7, 970, 1024 }, { 8, 971, 1024 }, { 7, 972, 1024 }, { 8, 973, 1024 }, { 8, 974, 1024 }, { 9, 975, 1024 }, - { 6, 976, 1024 }, { 7, 977, 1024 }, { 7, 978, 1024 }, { 8, 979, 1024 }, { 7, 980, 1024 }, { 8, 981, 1024 }, { 8, 982, 1024 }, { 9, 983, 1024 }, - { 7, 984, 1024 }, { 8, 985, 1024 }, { 8, 986, 1024 }, { 9, 987, 1024 }, { 8, 988, 1024 }, { 9, 989, 1024 }, { 9, 990, 1024 }, { 10, 991, 1024 }, - { 6, 992, 1024 }, { 7, 993, 1024 }, { 7, 994, 1024 }, { 8, 995, 1024 }, { 7, 996, 1024 }, { 8, 997, 1024 }, { 8, 998, 1024 }, { 9, 999, 1024 }, - { 7, 1000, 1024 }, { 8, 1001, 1024 }, { 8, 1002, 1024 }, { 9, 1003, 1024 }, { 8, 1004, 1024 }, { 9, 1005, 1024 }, { 9, 1006, 1024 }, { 10, 1007, 1024 }, - { 7, 1008, 1024 }, { 8, 1009, 1024 }, { 8, 1010, 1024 }, { 9, 1011, 1024 }, { 8, 1012, 1024 }, { 9, 1013, 1024 }, { 9, 1014, 1024 }, { 10, 1015, 1024 }, - { 8, 1016, 1024 }, { 9, 1017, 1024 }, { 9, 1018, 1024 }, { 10, 1019, 1024 }, { 9, 1020, 1024 }, { 10, 1021, 1024 }, { 10, 1022, 1024 }, { 11, 1023, 1024 }, -#if FP_LUT > 11 - { 1, 0, 0 }, { 2, 1, 2048 }, { 2, 2, 2048 }, { 3, 3, 2048 }, { 2, 4, 2048 }, { 3, 5, 2048 }, { 3, 6, 2048 }, { 4, 7, 2048 }, - { 2, 8, 2048 }, { 3, 9, 2048 }, { 3, 10, 2048 }, { 4, 11, 2048 }, { 3, 12, 2048 }, { 4, 13, 2048 }, { 4, 14, 2048 }, { 5, 15, 2048 }, - { 2, 16, 2048 }, { 3, 17, 2048 }, { 3, 18, 2048 }, { 4, 19, 2048 }, { 3, 20, 2048 }, { 4, 21, 2048 }, { 4, 22, 2048 }, { 5, 23, 2048 }, - { 3, 24, 2048 }, { 4, 25, 2048 }, { 4, 26, 2048 }, { 5, 27, 2048 }, { 4, 28, 2048 }, { 5, 29, 2048 }, { 5, 30, 2048 }, { 6, 31, 2048 }, - { 2, 32, 2048 }, { 3, 33, 2048 }, { 3, 34, 2048 }, { 4, 35, 2048 }, { 3, 36, 2048 }, { 4, 37, 2048 }, { 4, 38, 2048 }, { 5, 39, 2048 }, - { 3, 40, 2048 }, { 4, 41, 2048 }, { 4, 42, 2048 }, { 5, 43, 2048 }, { 4, 44, 2048 }, { 5, 45, 2048 }, { 5, 46, 2048 }, { 6, 47, 2048 }, - { 3, 48, 2048 }, { 4, 49, 2048 }, { 4, 50, 2048 }, { 5, 51, 2048 }, { 4, 52, 2048 }, { 5, 53, 2048 }, { 5, 54, 2048 }, { 6, 55, 2048 }, - { 4, 56, 2048 }, { 5, 57, 2048 }, { 5, 58, 2048 }, { 6, 59, 2048 }, { 5, 60, 2048 }, { 6, 61, 2048 }, { 6, 62, 2048 }, { 7, 63, 2048 }, - { 2, 64, 2048 }, { 3, 65, 2048 }, { 3, 66, 2048 }, { 4, 67, 2048 }, { 3, 68, 2048 }, { 4, 69, 2048 }, { 4, 70, 2048 }, { 5, 71, 2048 }, - { 3, 72, 2048 }, { 4, 73, 2048 }, { 4, 74, 2048 }, { 5, 75, 2048 }, { 4, 76, 2048 }, { 5, 77, 2048 }, { 5, 78, 2048 }, { 6, 79, 2048 }, - { 3, 80, 2048 }, { 4, 81, 2048 }, { 4, 82, 2048 }, { 5, 83, 2048 }, { 4, 84, 2048 }, { 5, 85, 2048 }, { 5, 86, 2048 }, { 6, 87, 2048 }, - { 4, 88, 2048 }, { 5, 89, 2048 }, { 5, 90, 2048 }, { 6, 91, 2048 }, { 5, 92, 2048 }, { 6, 93, 2048 }, { 6, 94, 2048 }, { 7, 95, 2048 }, - { 3, 96, 2048 }, { 4, 97, 2048 }, { 4, 98, 2048 }, { 5, 99, 2048 }, { 4, 100, 2048 }, { 5, 101, 2048 }, { 5, 102, 2048 }, { 6, 103, 2048 }, - { 4, 104, 2048 }, { 5, 105, 2048 }, { 5, 106, 2048 }, { 6, 107, 2048 }, { 5, 108, 2048 }, { 6, 109, 2048 }, { 6, 110, 2048 }, { 7, 111, 2048 }, - { 4, 112, 2048 }, { 5, 113, 2048 }, { 5, 114, 2048 }, { 6, 115, 2048 }, { 5, 116, 2048 }, { 6, 117, 2048 }, { 6, 118, 2048 }, { 7, 119, 2048 }, - { 5, 120, 2048 }, { 6, 121, 2048 }, { 6, 122, 2048 }, { 7, 123, 2048 }, { 6, 124, 2048 }, { 7, 125, 2048 }, { 7, 126, 2048 }, { 8, 127, 2048 }, - { 2, 128, 2048 }, { 3, 129, 2048 }, { 3, 130, 2048 }, { 4, 131, 2048 }, { 3, 132, 2048 }, { 4, 133, 2048 }, { 4, 134, 2048 }, { 5, 135, 2048 }, - { 3, 136, 2048 }, { 4, 137, 2048 }, { 4, 138, 2048 }, { 5, 139, 2048 }, { 4, 140, 2048 }, { 5, 141, 2048 }, { 5, 142, 2048 }, { 6, 143, 2048 }, - { 3, 144, 2048 }, { 4, 145, 2048 }, { 4, 146, 2048 }, { 5, 147, 2048 }, { 4, 148, 2048 }, { 5, 149, 2048 }, { 5, 150, 2048 }, { 6, 151, 2048 }, - { 4, 152, 2048 }, { 5, 153, 2048 }, { 5, 154, 2048 }, { 6, 155, 2048 }, { 5, 156, 2048 }, { 6, 157, 2048 }, { 6, 158, 2048 }, { 7, 159, 2048 }, - { 3, 160, 2048 }, { 4, 161, 2048 }, { 4, 162, 2048 }, { 5, 163, 2048 }, { 4, 164, 2048 }, { 5, 165, 2048 }, { 5, 166, 2048 }, { 6, 167, 2048 }, - { 4, 168, 2048 }, { 5, 169, 2048 }, { 5, 170, 2048 }, { 6, 171, 2048 }, { 5, 172, 2048 }, { 6, 173, 2048 }, { 6, 174, 2048 }, { 7, 175, 2048 }, - { 4, 176, 2048 }, { 5, 177, 2048 }, { 5, 178, 2048 }, { 6, 179, 2048 }, { 5, 180, 2048 }, { 6, 181, 2048 }, { 6, 182, 2048 }, { 7, 183, 2048 }, - { 5, 184, 2048 }, { 6, 185, 2048 }, { 6, 186, 2048 }, { 7, 187, 2048 }, { 6, 188, 2048 }, { 7, 189, 2048 }, { 7, 190, 2048 }, { 8, 191, 2048 }, - { 3, 192, 2048 }, { 4, 193, 2048 }, { 4, 194, 2048 }, { 5, 195, 2048 }, { 4, 196, 2048 }, { 5, 197, 2048 }, { 5, 198, 2048 }, { 6, 199, 2048 }, - { 4, 200, 2048 }, { 5, 201, 2048 }, { 5, 202, 2048 }, { 6, 203, 2048 }, { 5, 204, 2048 }, { 6, 205, 2048 }, { 6, 206, 2048 }, { 7, 207, 2048 }, - { 4, 208, 2048 }, { 5, 209, 2048 }, { 5, 210, 2048 }, { 6, 211, 2048 }, { 5, 212, 2048 }, { 6, 213, 2048 }, { 6, 214, 2048 }, { 7, 215, 2048 }, - { 5, 216, 2048 }, { 6, 217, 2048 }, { 6, 218, 2048 }, { 7, 219, 2048 }, { 6, 220, 2048 }, { 7, 221, 2048 }, { 7, 222, 2048 }, { 8, 223, 2048 }, - { 4, 224, 2048 }, { 5, 225, 2048 }, { 5, 226, 2048 }, { 6, 227, 2048 }, { 5, 228, 2048 }, { 6, 229, 2048 }, { 6, 230, 2048 }, { 7, 231, 2048 }, - { 5, 232, 2048 }, { 6, 233, 2048 }, { 6, 234, 2048 }, { 7, 235, 2048 }, { 6, 236, 2048 }, { 7, 237, 2048 }, { 7, 238, 2048 }, { 8, 239, 2048 }, - { 5, 240, 2048 }, { 6, 241, 2048 }, { 6, 242, 2048 }, { 7, 243, 2048 }, { 6, 244, 2048 }, { 7, 245, 2048 }, { 7, 246, 2048 }, { 8, 247, 2048 }, - { 6, 248, 2048 }, { 7, 249, 2048 }, { 7, 250, 2048 }, { 8, 251, 2048 }, { 7, 252, 2048 }, { 8, 253, 2048 }, { 8, 254, 2048 }, { 9, 255, 2048 }, - { 2, 256, 2048 }, { 3, 257, 2048 }, { 3, 258, 2048 }, { 4, 259, 2048 }, { 3, 260, 2048 }, { 4, 261, 2048 }, { 4, 262, 2048 }, { 5, 263, 2048 }, - { 3, 264, 2048 }, { 4, 265, 2048 }, { 4, 266, 2048 }, { 5, 267, 2048 }, { 4, 268, 2048 }, { 5, 269, 2048 }, { 5, 270, 2048 }, { 6, 271, 2048 }, - { 3, 272, 2048 }, { 4, 273, 2048 }, { 4, 274, 2048 }, { 5, 275, 2048 }, { 4, 276, 2048 }, { 5, 277, 2048 }, { 5, 278, 2048 }, { 6, 279, 2048 }, - { 4, 280, 2048 }, { 5, 281, 2048 }, { 5, 282, 2048 }, { 6, 283, 2048 }, { 5, 284, 2048 }, { 6, 285, 2048 }, { 6, 286, 2048 }, { 7, 287, 2048 }, - { 3, 288, 2048 }, { 4, 289, 2048 }, { 4, 290, 2048 }, { 5, 291, 2048 }, { 4, 292, 2048 }, { 5, 293, 2048 }, { 5, 294, 2048 }, { 6, 295, 2048 }, - { 4, 296, 2048 }, { 5, 297, 2048 }, { 5, 298, 2048 }, { 6, 299, 2048 }, { 5, 300, 2048 }, { 6, 301, 2048 }, { 6, 302, 2048 }, { 7, 303, 2048 }, - { 4, 304, 2048 }, { 5, 305, 2048 }, { 5, 306, 2048 }, { 6, 307, 2048 }, { 5, 308, 2048 }, { 6, 309, 2048 }, { 6, 310, 2048 }, { 7, 311, 2048 }, - { 5, 312, 2048 }, { 6, 313, 2048 }, { 6, 314, 2048 }, { 7, 315, 2048 }, { 6, 316, 2048 }, { 7, 317, 2048 }, { 7, 318, 2048 }, { 8, 319, 2048 }, - { 3, 320, 2048 }, { 4, 321, 2048 }, { 4, 322, 2048 }, { 5, 323, 2048 }, { 4, 324, 2048 }, { 5, 325, 2048 }, { 5, 326, 2048 }, { 6, 327, 2048 }, - { 4, 328, 2048 }, { 5, 329, 2048 }, { 5, 330, 2048 }, { 6, 331, 2048 }, { 5, 332, 2048 }, { 6, 333, 2048 }, { 6, 334, 2048 }, { 7, 335, 2048 }, - { 4, 336, 2048 }, { 5, 337, 2048 }, { 5, 338, 2048 }, { 6, 339, 2048 }, { 5, 340, 2048 }, { 6, 341, 2048 }, { 6, 342, 2048 }, { 7, 343, 2048 }, - { 5, 344, 2048 }, { 6, 345, 2048 }, { 6, 346, 2048 }, { 7, 347, 2048 }, { 6, 348, 2048 }, { 7, 349, 2048 }, { 7, 350, 2048 }, { 8, 351, 2048 }, - { 4, 352, 2048 }, { 5, 353, 2048 }, { 5, 354, 2048 }, { 6, 355, 2048 }, { 5, 356, 2048 }, { 6, 357, 2048 }, { 6, 358, 2048 }, { 7, 359, 2048 }, - { 5, 360, 2048 }, { 6, 361, 2048 }, { 6, 362, 2048 }, { 7, 363, 2048 }, { 6, 364, 2048 }, { 7, 365, 2048 }, { 7, 366, 2048 }, { 8, 367, 2048 }, - { 5, 368, 2048 }, { 6, 369, 2048 }, { 6, 370, 2048 }, { 7, 371, 2048 }, { 6, 372, 2048 }, { 7, 373, 2048 }, { 7, 374, 2048 }, { 8, 375, 2048 }, - { 6, 376, 2048 }, { 7, 377, 2048 }, { 7, 378, 2048 }, { 8, 379, 2048 }, { 7, 380, 2048 }, { 8, 381, 2048 }, { 8, 382, 2048 }, { 9, 383, 2048 }, - { 3, 384, 2048 }, { 4, 385, 2048 }, { 4, 386, 2048 }, { 5, 387, 2048 }, { 4, 388, 2048 }, { 5, 389, 2048 }, { 5, 390, 2048 }, { 6, 391, 2048 }, - { 4, 392, 2048 }, { 5, 393, 2048 }, { 5, 394, 2048 }, { 6, 395, 2048 }, { 5, 396, 2048 }, { 6, 397, 2048 }, { 6, 398, 2048 }, { 7, 399, 2048 }, - { 4, 400, 2048 }, { 5, 401, 2048 }, { 5, 402, 2048 }, { 6, 403, 2048 }, { 5, 404, 2048 }, { 6, 405, 2048 }, { 6, 406, 2048 }, { 7, 407, 2048 }, - { 5, 408, 2048 }, { 6, 409, 2048 }, { 6, 410, 2048 }, { 7, 411, 2048 }, { 6, 412, 2048 }, { 7, 413, 2048 }, { 7, 414, 2048 }, { 8, 415, 2048 }, - { 4, 416, 2048 }, { 5, 417, 2048 }, { 5, 418, 2048 }, { 6, 419, 2048 }, { 5, 420, 2048 }, { 6, 421, 2048 }, { 6, 422, 2048 }, { 7, 423, 2048 }, - { 5, 424, 2048 }, { 6, 425, 2048 }, { 6, 426, 2048 }, { 7, 427, 2048 }, { 6, 428, 2048 }, { 7, 429, 2048 }, { 7, 430, 2048 }, { 8, 431, 2048 }, - { 5, 432, 2048 }, { 6, 433, 2048 }, { 6, 434, 2048 }, { 7, 435, 2048 }, { 6, 436, 2048 }, { 7, 437, 2048 }, { 7, 438, 2048 }, { 8, 439, 2048 }, - { 6, 440, 2048 }, { 7, 441, 2048 }, { 7, 442, 2048 }, { 8, 443, 2048 }, { 7, 444, 2048 }, { 8, 445, 2048 }, { 8, 446, 2048 }, { 9, 447, 2048 }, - { 4, 448, 2048 }, { 5, 449, 2048 }, { 5, 450, 2048 }, { 6, 451, 2048 }, { 5, 452, 2048 }, { 6, 453, 2048 }, { 6, 454, 2048 }, { 7, 455, 2048 }, - { 5, 456, 2048 }, { 6, 457, 2048 }, { 6, 458, 2048 }, { 7, 459, 2048 }, { 6, 460, 2048 }, { 7, 461, 2048 }, { 7, 462, 2048 }, { 8, 463, 2048 }, - { 5, 464, 2048 }, { 6, 465, 2048 }, { 6, 466, 2048 }, { 7, 467, 2048 }, { 6, 468, 2048 }, { 7, 469, 2048 }, { 7, 470, 2048 }, { 8, 471, 2048 }, - { 6, 472, 2048 }, { 7, 473, 2048 }, { 7, 474, 2048 }, { 8, 475, 2048 }, { 7, 476, 2048 }, { 8, 477, 2048 }, { 8, 478, 2048 }, { 9, 479, 2048 }, - { 5, 480, 2048 }, { 6, 481, 2048 }, { 6, 482, 2048 }, { 7, 483, 2048 }, { 6, 484, 2048 }, { 7, 485, 2048 }, { 7, 486, 2048 }, { 8, 487, 2048 }, - { 6, 488, 2048 }, { 7, 489, 2048 }, { 7, 490, 2048 }, { 8, 491, 2048 }, { 7, 492, 2048 }, { 8, 493, 2048 }, { 8, 494, 2048 }, { 9, 495, 2048 }, - { 6, 496, 2048 }, { 7, 497, 2048 }, { 7, 498, 2048 }, { 8, 499, 2048 }, { 7, 500, 2048 }, { 8, 501, 2048 }, { 8, 502, 2048 }, { 9, 503, 2048 }, - { 7, 504, 2048 }, { 8, 505, 2048 }, { 8, 506, 2048 }, { 9, 507, 2048 }, { 8, 508, 2048 }, { 9, 509, 2048 }, { 9, 510, 2048 }, { 10, 511, 2048 }, - { 2, 512, 2048 }, { 3, 513, 2048 }, { 3, 514, 2048 }, { 4, 515, 2048 }, { 3, 516, 2048 }, { 4, 517, 2048 }, { 4, 518, 2048 }, { 5, 519, 2048 }, - { 3, 520, 2048 }, { 4, 521, 2048 }, { 4, 522, 2048 }, { 5, 523, 2048 }, { 4, 524, 2048 }, { 5, 525, 2048 }, { 5, 526, 2048 }, { 6, 527, 2048 }, - { 3, 528, 2048 }, { 4, 529, 2048 }, { 4, 530, 2048 }, { 5, 531, 2048 }, { 4, 532, 2048 }, { 5, 533, 2048 }, { 5, 534, 2048 }, { 6, 535, 2048 }, - { 4, 536, 2048 }, { 5, 537, 2048 }, { 5, 538, 2048 }, { 6, 539, 2048 }, { 5, 540, 2048 }, { 6, 541, 2048 }, { 6, 542, 2048 }, { 7, 543, 2048 }, - { 3, 544, 2048 }, { 4, 545, 2048 }, { 4, 546, 2048 }, { 5, 547, 2048 }, { 4, 548, 2048 }, { 5, 549, 2048 }, { 5, 550, 2048 }, { 6, 551, 2048 }, - { 4, 552, 2048 }, { 5, 553, 2048 }, { 5, 554, 2048 }, { 6, 555, 2048 }, { 5, 556, 2048 }, { 6, 557, 2048 }, { 6, 558, 2048 }, { 7, 559, 2048 }, - { 4, 560, 2048 }, { 5, 561, 2048 }, { 5, 562, 2048 }, { 6, 563, 2048 }, { 5, 564, 2048 }, { 6, 565, 2048 }, { 6, 566, 2048 }, { 7, 567, 2048 }, - { 5, 568, 2048 }, { 6, 569, 2048 }, { 6, 570, 2048 }, { 7, 571, 2048 }, { 6, 572, 2048 }, { 7, 573, 2048 }, { 7, 574, 2048 }, { 8, 575, 2048 }, - { 3, 576, 2048 }, { 4, 577, 2048 }, { 4, 578, 2048 }, { 5, 579, 2048 }, { 4, 580, 2048 }, { 5, 581, 2048 }, { 5, 582, 2048 }, { 6, 583, 2048 }, - { 4, 584, 2048 }, { 5, 585, 2048 }, { 5, 586, 2048 }, { 6, 587, 2048 }, { 5, 588, 2048 }, { 6, 589, 2048 }, { 6, 590, 2048 }, { 7, 591, 2048 }, - { 4, 592, 2048 }, { 5, 593, 2048 }, { 5, 594, 2048 }, { 6, 595, 2048 }, { 5, 596, 2048 }, { 6, 597, 2048 }, { 6, 598, 2048 }, { 7, 599, 2048 }, - { 5, 600, 2048 }, { 6, 601, 2048 }, { 6, 602, 2048 }, { 7, 603, 2048 }, { 6, 604, 2048 }, { 7, 605, 2048 }, { 7, 606, 2048 }, { 8, 607, 2048 }, - { 4, 608, 2048 }, { 5, 609, 2048 }, { 5, 610, 2048 }, { 6, 611, 2048 }, { 5, 612, 2048 }, { 6, 613, 2048 }, { 6, 614, 2048 }, { 7, 615, 2048 }, - { 5, 616, 2048 }, { 6, 617, 2048 }, { 6, 618, 2048 }, { 7, 619, 2048 }, { 6, 620, 2048 }, { 7, 621, 2048 }, { 7, 622, 2048 }, { 8, 623, 2048 }, - { 5, 624, 2048 }, { 6, 625, 2048 }, { 6, 626, 2048 }, { 7, 627, 2048 }, { 6, 628, 2048 }, { 7, 629, 2048 }, { 7, 630, 2048 }, { 8, 631, 2048 }, - { 6, 632, 2048 }, { 7, 633, 2048 }, { 7, 634, 2048 }, { 8, 635, 2048 }, { 7, 636, 2048 }, { 8, 637, 2048 }, { 8, 638, 2048 }, { 9, 639, 2048 }, - { 3, 640, 2048 }, { 4, 641, 2048 }, { 4, 642, 2048 }, { 5, 643, 2048 }, { 4, 644, 2048 }, { 5, 645, 2048 }, { 5, 646, 2048 }, { 6, 647, 2048 }, - { 4, 648, 2048 }, { 5, 649, 2048 }, { 5, 650, 2048 }, { 6, 651, 2048 }, { 5, 652, 2048 }, { 6, 653, 2048 }, { 6, 654, 2048 }, { 7, 655, 2048 }, - { 4, 656, 2048 }, { 5, 657, 2048 }, { 5, 658, 2048 }, { 6, 659, 2048 }, { 5, 660, 2048 }, { 6, 661, 2048 }, { 6, 662, 2048 }, { 7, 663, 2048 }, - { 5, 664, 2048 }, { 6, 665, 2048 }, { 6, 666, 2048 }, { 7, 667, 2048 }, { 6, 668, 2048 }, { 7, 669, 2048 }, { 7, 670, 2048 }, { 8, 671, 2048 }, - { 4, 672, 2048 }, { 5, 673, 2048 }, { 5, 674, 2048 }, { 6, 675, 2048 }, { 5, 676, 2048 }, { 6, 677, 2048 }, { 6, 678, 2048 }, { 7, 679, 2048 }, - { 5, 680, 2048 }, { 6, 681, 2048 }, { 6, 682, 2048 }, { 7, 683, 2048 }, { 6, 684, 2048 }, { 7, 685, 2048 }, { 7, 686, 2048 }, { 8, 687, 2048 }, - { 5, 688, 2048 }, { 6, 689, 2048 }, { 6, 690, 2048 }, { 7, 691, 2048 }, { 6, 692, 2048 }, { 7, 693, 2048 }, { 7, 694, 2048 }, { 8, 695, 2048 }, - { 6, 696, 2048 }, { 7, 697, 2048 }, { 7, 698, 2048 }, { 8, 699, 2048 }, { 7, 700, 2048 }, { 8, 701, 2048 }, { 8, 702, 2048 }, { 9, 703, 2048 }, - { 4, 704, 2048 }, { 5, 705, 2048 }, { 5, 706, 2048 }, { 6, 707, 2048 }, { 5, 708, 2048 }, { 6, 709, 2048 }, { 6, 710, 2048 }, { 7, 711, 2048 }, - { 5, 712, 2048 }, { 6, 713, 2048 }, { 6, 714, 2048 }, { 7, 715, 2048 }, { 6, 716, 2048 }, { 7, 717, 2048 }, { 7, 718, 2048 }, { 8, 719, 2048 }, - { 5, 720, 2048 }, { 6, 721, 2048 }, { 6, 722, 2048 }, { 7, 723, 2048 }, { 6, 724, 2048 }, { 7, 725, 2048 }, { 7, 726, 2048 }, { 8, 727, 2048 }, - { 6, 728, 2048 }, { 7, 729, 2048 }, { 7, 730, 2048 }, { 8, 731, 2048 }, { 7, 732, 2048 }, { 8, 733, 2048 }, { 8, 734, 2048 }, { 9, 735, 2048 }, - { 5, 736, 2048 }, { 6, 737, 2048 }, { 6, 738, 2048 }, { 7, 739, 2048 }, { 6, 740, 2048 }, { 7, 741, 2048 }, { 7, 742, 2048 }, { 8, 743, 2048 }, - { 6, 744, 2048 }, { 7, 745, 2048 }, { 7, 746, 2048 }, { 8, 747, 2048 }, { 7, 748, 2048 }, { 8, 749, 2048 }, { 8, 750, 2048 }, { 9, 751, 2048 }, - { 6, 752, 2048 }, { 7, 753, 2048 }, { 7, 754, 2048 }, { 8, 755, 2048 }, { 7, 756, 2048 }, { 8, 757, 2048 }, { 8, 758, 2048 }, { 9, 759, 2048 }, - { 7, 760, 2048 }, { 8, 761, 2048 }, { 8, 762, 2048 }, { 9, 763, 2048 }, { 8, 764, 2048 }, { 9, 765, 2048 }, { 9, 766, 2048 }, { 10, 767, 2048 }, - { 3, 768, 2048 }, { 4, 769, 2048 }, { 4, 770, 2048 }, { 5, 771, 2048 }, { 4, 772, 2048 }, { 5, 773, 2048 }, { 5, 774, 2048 }, { 6, 775, 2048 }, - { 4, 776, 2048 }, { 5, 777, 2048 }, { 5, 778, 2048 }, { 6, 779, 2048 }, { 5, 780, 2048 }, { 6, 781, 2048 }, { 6, 782, 2048 }, { 7, 783, 2048 }, - { 4, 784, 2048 }, { 5, 785, 2048 }, { 5, 786, 2048 }, { 6, 787, 2048 }, { 5, 788, 2048 }, { 6, 789, 2048 }, { 6, 790, 2048 }, { 7, 791, 2048 }, - { 5, 792, 2048 }, { 6, 793, 2048 }, { 6, 794, 2048 }, { 7, 795, 2048 }, { 6, 796, 2048 }, { 7, 797, 2048 }, { 7, 798, 2048 }, { 8, 799, 2048 }, - { 4, 800, 2048 }, { 5, 801, 2048 }, { 5, 802, 2048 }, { 6, 803, 2048 }, { 5, 804, 2048 }, { 6, 805, 2048 }, { 6, 806, 2048 }, { 7, 807, 2048 }, - { 5, 808, 2048 }, { 6, 809, 2048 }, { 6, 810, 2048 }, { 7, 811, 2048 }, { 6, 812, 2048 }, { 7, 813, 2048 }, { 7, 814, 2048 }, { 8, 815, 2048 }, - { 5, 816, 2048 }, { 6, 817, 2048 }, { 6, 818, 2048 }, { 7, 819, 2048 }, { 6, 820, 2048 }, { 7, 821, 2048 }, { 7, 822, 2048 }, { 8, 823, 2048 }, - { 6, 824, 2048 }, { 7, 825, 2048 }, { 7, 826, 2048 }, { 8, 827, 2048 }, { 7, 828, 2048 }, { 8, 829, 2048 }, { 8, 830, 2048 }, { 9, 831, 2048 }, - { 4, 832, 2048 }, { 5, 833, 2048 }, { 5, 834, 2048 }, { 6, 835, 2048 }, { 5, 836, 2048 }, { 6, 837, 2048 }, { 6, 838, 2048 }, { 7, 839, 2048 }, - { 5, 840, 2048 }, { 6, 841, 2048 }, { 6, 842, 2048 }, { 7, 843, 2048 }, { 6, 844, 2048 }, { 7, 845, 2048 }, { 7, 846, 2048 }, { 8, 847, 2048 }, - { 5, 848, 2048 }, { 6, 849, 2048 }, { 6, 850, 2048 }, { 7, 851, 2048 }, { 6, 852, 2048 }, { 7, 853, 2048 }, { 7, 854, 2048 }, { 8, 855, 2048 }, - { 6, 856, 2048 }, { 7, 857, 2048 }, { 7, 858, 2048 }, { 8, 859, 2048 }, { 7, 860, 2048 }, { 8, 861, 2048 }, { 8, 862, 2048 }, { 9, 863, 2048 }, - { 5, 864, 2048 }, { 6, 865, 2048 }, { 6, 866, 2048 }, { 7, 867, 2048 }, { 6, 868, 2048 }, { 7, 869, 2048 }, { 7, 870, 2048 }, { 8, 871, 2048 }, - { 6, 872, 2048 }, { 7, 873, 2048 }, { 7, 874, 2048 }, { 8, 875, 2048 }, { 7, 876, 2048 }, { 8, 877, 2048 }, { 8, 878, 2048 }, { 9, 879, 2048 }, - { 6, 880, 2048 }, { 7, 881, 2048 }, { 7, 882, 2048 }, { 8, 883, 2048 }, { 7, 884, 2048 }, { 8, 885, 2048 }, { 8, 886, 2048 }, { 9, 887, 2048 }, - { 7, 888, 2048 }, { 8, 889, 2048 }, { 8, 890, 2048 }, { 9, 891, 2048 }, { 8, 892, 2048 }, { 9, 893, 2048 }, { 9, 894, 2048 }, { 10, 895, 2048 }, - { 4, 896, 2048 }, { 5, 897, 2048 }, { 5, 898, 2048 }, { 6, 899, 2048 }, { 5, 900, 2048 }, { 6, 901, 2048 }, { 6, 902, 2048 }, { 7, 903, 2048 }, - { 5, 904, 2048 }, { 6, 905, 2048 }, { 6, 906, 2048 }, { 7, 907, 2048 }, { 6, 908, 2048 }, { 7, 909, 2048 }, { 7, 910, 2048 }, { 8, 911, 2048 }, - { 5, 912, 2048 }, { 6, 913, 2048 }, { 6, 914, 2048 }, { 7, 915, 2048 }, { 6, 916, 2048 }, { 7, 917, 2048 }, { 7, 918, 2048 }, { 8, 919, 2048 }, - { 6, 920, 2048 }, { 7, 921, 2048 }, { 7, 922, 2048 }, { 8, 923, 2048 }, { 7, 924, 2048 }, { 8, 925, 2048 }, { 8, 926, 2048 }, { 9, 927, 2048 }, - { 5, 928, 2048 }, { 6, 929, 2048 }, { 6, 930, 2048 }, { 7, 931, 2048 }, { 6, 932, 2048 }, { 7, 933, 2048 }, { 7, 934, 2048 }, { 8, 935, 2048 }, - { 6, 936, 2048 }, { 7, 937, 2048 }, { 7, 938, 2048 }, { 8, 939, 2048 }, { 7, 940, 2048 }, { 8, 941, 2048 }, { 8, 942, 2048 }, { 9, 943, 2048 }, - { 6, 944, 2048 }, { 7, 945, 2048 }, { 7, 946, 2048 }, { 8, 947, 2048 }, { 7, 948, 2048 }, { 8, 949, 2048 }, { 8, 950, 2048 }, { 9, 951, 2048 }, - { 7, 952, 2048 }, { 8, 953, 2048 }, { 8, 954, 2048 }, { 9, 955, 2048 }, { 8, 956, 2048 }, { 9, 957, 2048 }, { 9, 958, 2048 }, { 10, 959, 2048 }, - { 5, 960, 2048 }, { 6, 961, 2048 }, { 6, 962, 2048 }, { 7, 963, 2048 }, { 6, 964, 2048 }, { 7, 965, 2048 }, { 7, 966, 2048 }, { 8, 967, 2048 }, - { 6, 968, 2048 }, { 7, 969, 2048 }, { 7, 970, 2048 }, { 8, 971, 2048 }, { 7, 972, 2048 }, { 8, 973, 2048 }, { 8, 974, 2048 }, { 9, 975, 2048 }, - { 6, 976, 2048 }, { 7, 977, 2048 }, { 7, 978, 2048 }, { 8, 979, 2048 }, { 7, 980, 2048 }, { 8, 981, 2048 }, { 8, 982, 2048 }, { 9, 983, 2048 }, - { 7, 984, 2048 }, { 8, 985, 2048 }, { 8, 986, 2048 }, { 9, 987, 2048 }, { 8, 988, 2048 }, { 9, 989, 2048 }, { 9, 990, 2048 }, { 10, 991, 2048 }, - { 6, 992, 2048 }, { 7, 993, 2048 }, { 7, 994, 2048 }, { 8, 995, 2048 }, { 7, 996, 2048 }, { 8, 997, 2048 }, { 8, 998, 2048 }, { 9, 999, 2048 }, - { 7, 1000, 2048 }, { 8, 1001, 2048 }, { 8, 1002, 2048 }, { 9, 1003, 2048 }, { 8, 1004, 2048 }, { 9, 1005, 2048 }, { 9, 1006, 2048 }, { 10, 1007, 2048 }, - { 7, 1008, 2048 }, { 8, 1009, 2048 }, { 8, 1010, 2048 }, { 9, 1011, 2048 }, { 8, 1012, 2048 }, { 9, 1013, 2048 }, { 9, 1014, 2048 }, { 10, 1015, 2048 }, - { 8, 1016, 2048 }, { 9, 1017, 2048 }, { 9, 1018, 2048 }, { 10, 1019, 2048 }, { 9, 1020, 2048 }, { 10, 1021, 2048 }, { 10, 1022, 2048 }, { 11, 1023, 2048 }, - { 2, 1024, 2048 }, { 3, 1025, 2048 }, { 3, 1026, 2048 }, { 4, 1027, 2048 }, { 3, 1028, 2048 }, { 4, 1029, 2048 }, { 4, 1030, 2048 }, { 5, 1031, 2048 }, - { 3, 1032, 2048 }, { 4, 1033, 2048 }, { 4, 1034, 2048 }, { 5, 1035, 2048 }, { 4, 1036, 2048 }, { 5, 1037, 2048 }, { 5, 1038, 2048 }, { 6, 1039, 2048 }, - { 3, 1040, 2048 }, { 4, 1041, 2048 }, { 4, 1042, 2048 }, { 5, 1043, 2048 }, { 4, 1044, 2048 }, { 5, 1045, 2048 }, { 5, 1046, 2048 }, { 6, 1047, 2048 }, - { 4, 1048, 2048 }, { 5, 1049, 2048 }, { 5, 1050, 2048 }, { 6, 1051, 2048 }, { 5, 1052, 2048 }, { 6, 1053, 2048 }, { 6, 1054, 2048 }, { 7, 1055, 2048 }, - { 3, 1056, 2048 }, { 4, 1057, 2048 }, { 4, 1058, 2048 }, { 5, 1059, 2048 }, { 4, 1060, 2048 }, { 5, 1061, 2048 }, { 5, 1062, 2048 }, { 6, 1063, 2048 }, - { 4, 1064, 2048 }, { 5, 1065, 2048 }, { 5, 1066, 2048 }, { 6, 1067, 2048 }, { 5, 1068, 2048 }, { 6, 1069, 2048 }, { 6, 1070, 2048 }, { 7, 1071, 2048 }, - { 4, 1072, 2048 }, { 5, 1073, 2048 }, { 5, 1074, 2048 }, { 6, 1075, 2048 }, { 5, 1076, 2048 }, { 6, 1077, 2048 }, { 6, 1078, 2048 }, { 7, 1079, 2048 }, - { 5, 1080, 2048 }, { 6, 1081, 2048 }, { 6, 1082, 2048 }, { 7, 1083, 2048 }, { 6, 1084, 2048 }, { 7, 1085, 2048 }, { 7, 1086, 2048 }, { 8, 1087, 2048 }, - { 3, 1088, 2048 }, { 4, 1089, 2048 }, { 4, 1090, 2048 }, { 5, 1091, 2048 }, { 4, 1092, 2048 }, { 5, 1093, 2048 }, { 5, 1094, 2048 }, { 6, 1095, 2048 }, - { 4, 1096, 2048 }, { 5, 1097, 2048 }, { 5, 1098, 2048 }, { 6, 1099, 2048 }, { 5, 1100, 2048 }, { 6, 1101, 2048 }, { 6, 1102, 2048 }, { 7, 1103, 2048 }, - { 4, 1104, 2048 }, { 5, 1105, 2048 }, { 5, 1106, 2048 }, { 6, 1107, 2048 }, { 5, 1108, 2048 }, { 6, 1109, 2048 }, { 6, 1110, 2048 }, { 7, 1111, 2048 }, - { 5, 1112, 2048 }, { 6, 1113, 2048 }, { 6, 1114, 2048 }, { 7, 1115, 2048 }, { 6, 1116, 2048 }, { 7, 1117, 2048 }, { 7, 1118, 2048 }, { 8, 1119, 2048 }, - { 4, 1120, 2048 }, { 5, 1121, 2048 }, { 5, 1122, 2048 }, { 6, 1123, 2048 }, { 5, 1124, 2048 }, { 6, 1125, 2048 }, { 6, 1126, 2048 }, { 7, 1127, 2048 }, - { 5, 1128, 2048 }, { 6, 1129, 2048 }, { 6, 1130, 2048 }, { 7, 1131, 2048 }, { 6, 1132, 2048 }, { 7, 1133, 2048 }, { 7, 1134, 2048 }, { 8, 1135, 2048 }, - { 5, 1136, 2048 }, { 6, 1137, 2048 }, { 6, 1138, 2048 }, { 7, 1139, 2048 }, { 6, 1140, 2048 }, { 7, 1141, 2048 }, { 7, 1142, 2048 }, { 8, 1143, 2048 }, - { 6, 1144, 2048 }, { 7, 1145, 2048 }, { 7, 1146, 2048 }, { 8, 1147, 2048 }, { 7, 1148, 2048 }, { 8, 1149, 2048 }, { 8, 1150, 2048 }, { 9, 1151, 2048 }, - { 3, 1152, 2048 }, { 4, 1153, 2048 }, { 4, 1154, 2048 }, { 5, 1155, 2048 }, { 4, 1156, 2048 }, { 5, 1157, 2048 }, { 5, 1158, 2048 }, { 6, 1159, 2048 }, - { 4, 1160, 2048 }, { 5, 1161, 2048 }, { 5, 1162, 2048 }, { 6, 1163, 2048 }, { 5, 1164, 2048 }, { 6, 1165, 2048 }, { 6, 1166, 2048 }, { 7, 1167, 2048 }, - { 4, 1168, 2048 }, { 5, 1169, 2048 }, { 5, 1170, 2048 }, { 6, 1171, 2048 }, { 5, 1172, 2048 }, { 6, 1173, 2048 }, { 6, 1174, 2048 }, { 7, 1175, 2048 }, - { 5, 1176, 2048 }, { 6, 1177, 2048 }, { 6, 1178, 2048 }, { 7, 1179, 2048 }, { 6, 1180, 2048 }, { 7, 1181, 2048 }, { 7, 1182, 2048 }, { 8, 1183, 2048 }, - { 4, 1184, 2048 }, { 5, 1185, 2048 }, { 5, 1186, 2048 }, { 6, 1187, 2048 }, { 5, 1188, 2048 }, { 6, 1189, 2048 }, { 6, 1190, 2048 }, { 7, 1191, 2048 }, - { 5, 1192, 2048 }, { 6, 1193, 2048 }, { 6, 1194, 2048 }, { 7, 1195, 2048 }, { 6, 1196, 2048 }, { 7, 1197, 2048 }, { 7, 1198, 2048 }, { 8, 1199, 2048 }, - { 5, 1200, 2048 }, { 6, 1201, 2048 }, { 6, 1202, 2048 }, { 7, 1203, 2048 }, { 6, 1204, 2048 }, { 7, 1205, 2048 }, { 7, 1206, 2048 }, { 8, 1207, 2048 }, - { 6, 1208, 2048 }, { 7, 1209, 2048 }, { 7, 1210, 2048 }, { 8, 1211, 2048 }, { 7, 1212, 2048 }, { 8, 1213, 2048 }, { 8, 1214, 2048 }, { 9, 1215, 2048 }, - { 4, 1216, 2048 }, { 5, 1217, 2048 }, { 5, 1218, 2048 }, { 6, 1219, 2048 }, { 5, 1220, 2048 }, { 6, 1221, 2048 }, { 6, 1222, 2048 }, { 7, 1223, 2048 }, - { 5, 1224, 2048 }, { 6, 1225, 2048 }, { 6, 1226, 2048 }, { 7, 1227, 2048 }, { 6, 1228, 2048 }, { 7, 1229, 2048 }, { 7, 1230, 2048 }, { 8, 1231, 2048 }, - { 5, 1232, 2048 }, { 6, 1233, 2048 }, { 6, 1234, 2048 }, { 7, 1235, 2048 }, { 6, 1236, 2048 }, { 7, 1237, 2048 }, { 7, 1238, 2048 }, { 8, 1239, 2048 }, - { 6, 1240, 2048 }, { 7, 1241, 2048 }, { 7, 1242, 2048 }, { 8, 1243, 2048 }, { 7, 1244, 2048 }, { 8, 1245, 2048 }, { 8, 1246, 2048 }, { 9, 1247, 2048 }, - { 5, 1248, 2048 }, { 6, 1249, 2048 }, { 6, 1250, 2048 }, { 7, 1251, 2048 }, { 6, 1252, 2048 }, { 7, 1253, 2048 }, { 7, 1254, 2048 }, { 8, 1255, 2048 }, - { 6, 1256, 2048 }, { 7, 1257, 2048 }, { 7, 1258, 2048 }, { 8, 1259, 2048 }, { 7, 1260, 2048 }, { 8, 1261, 2048 }, { 8, 1262, 2048 }, { 9, 1263, 2048 }, - { 6, 1264, 2048 }, { 7, 1265, 2048 }, { 7, 1266, 2048 }, { 8, 1267, 2048 }, { 7, 1268, 2048 }, { 8, 1269, 2048 }, { 8, 1270, 2048 }, { 9, 1271, 2048 }, - { 7, 1272, 2048 }, { 8, 1273, 2048 }, { 8, 1274, 2048 }, { 9, 1275, 2048 }, { 8, 1276, 2048 }, { 9, 1277, 2048 }, { 9, 1278, 2048 }, { 10, 1279, 2048 }, - { 3, 1280, 2048 }, { 4, 1281, 2048 }, { 4, 1282, 2048 }, { 5, 1283, 2048 }, { 4, 1284, 2048 }, { 5, 1285, 2048 }, { 5, 1286, 2048 }, { 6, 1287, 2048 }, - { 4, 1288, 2048 }, { 5, 1289, 2048 }, { 5, 1290, 2048 }, { 6, 1291, 2048 }, { 5, 1292, 2048 }, { 6, 1293, 2048 }, { 6, 1294, 2048 }, { 7, 1295, 2048 }, - { 4, 1296, 2048 }, { 5, 1297, 2048 }, { 5, 1298, 2048 }, { 6, 1299, 2048 }, { 5, 1300, 2048 }, { 6, 1301, 2048 }, { 6, 1302, 2048 }, { 7, 1303, 2048 }, - { 5, 1304, 2048 }, { 6, 1305, 2048 }, { 6, 1306, 2048 }, { 7, 1307, 2048 }, { 6, 1308, 2048 }, { 7, 1309, 2048 }, { 7, 1310, 2048 }, { 8, 1311, 2048 }, - { 4, 1312, 2048 }, { 5, 1313, 2048 }, { 5, 1314, 2048 }, { 6, 1315, 2048 }, { 5, 1316, 2048 }, { 6, 1317, 2048 }, { 6, 1318, 2048 }, { 7, 1319, 2048 }, - { 5, 1320, 2048 }, { 6, 1321, 2048 }, { 6, 1322, 2048 }, { 7, 1323, 2048 }, { 6, 1324, 2048 }, { 7, 1325, 2048 }, { 7, 1326, 2048 }, { 8, 1327, 2048 }, - { 5, 1328, 2048 }, { 6, 1329, 2048 }, { 6, 1330, 2048 }, { 7, 1331, 2048 }, { 6, 1332, 2048 }, { 7, 1333, 2048 }, { 7, 1334, 2048 }, { 8, 1335, 2048 }, - { 6, 1336, 2048 }, { 7, 1337, 2048 }, { 7, 1338, 2048 }, { 8, 1339, 2048 }, { 7, 1340, 2048 }, { 8, 1341, 2048 }, { 8, 1342, 2048 }, { 9, 1343, 2048 }, - { 4, 1344, 2048 }, { 5, 1345, 2048 }, { 5, 1346, 2048 }, { 6, 1347, 2048 }, { 5, 1348, 2048 }, { 6, 1349, 2048 }, { 6, 1350, 2048 }, { 7, 1351, 2048 }, - { 5, 1352, 2048 }, { 6, 1353, 2048 }, { 6, 1354, 2048 }, { 7, 1355, 2048 }, { 6, 1356, 2048 }, { 7, 1357, 2048 }, { 7, 1358, 2048 }, { 8, 1359, 2048 }, - { 5, 1360, 2048 }, { 6, 1361, 2048 }, { 6, 1362, 2048 }, { 7, 1363, 2048 }, { 6, 1364, 2048 }, { 7, 1365, 2048 }, { 7, 1366, 2048 }, { 8, 1367, 2048 }, - { 6, 1368, 2048 }, { 7, 1369, 2048 }, { 7, 1370, 2048 }, { 8, 1371, 2048 }, { 7, 1372, 2048 }, { 8, 1373, 2048 }, { 8, 1374, 2048 }, { 9, 1375, 2048 }, - { 5, 1376, 2048 }, { 6, 1377, 2048 }, { 6, 1378, 2048 }, { 7, 1379, 2048 }, { 6, 1380, 2048 }, { 7, 1381, 2048 }, { 7, 1382, 2048 }, { 8, 1383, 2048 }, - { 6, 1384, 2048 }, { 7, 1385, 2048 }, { 7, 1386, 2048 }, { 8, 1387, 2048 }, { 7, 1388, 2048 }, { 8, 1389, 2048 }, { 8, 1390, 2048 }, { 9, 1391, 2048 }, - { 6, 1392, 2048 }, { 7, 1393, 2048 }, { 7, 1394, 2048 }, { 8, 1395, 2048 }, { 7, 1396, 2048 }, { 8, 1397, 2048 }, { 8, 1398, 2048 }, { 9, 1399, 2048 }, - { 7, 1400, 2048 }, { 8, 1401, 2048 }, { 8, 1402, 2048 }, { 9, 1403, 2048 }, { 8, 1404, 2048 }, { 9, 1405, 2048 }, { 9, 1406, 2048 }, { 10, 1407, 2048 }, - { 4, 1408, 2048 }, { 5, 1409, 2048 }, { 5, 1410, 2048 }, { 6, 1411, 2048 }, { 5, 1412, 2048 }, { 6, 1413, 2048 }, { 6, 1414, 2048 }, { 7, 1415, 2048 }, - { 5, 1416, 2048 }, { 6, 1417, 2048 }, { 6, 1418, 2048 }, { 7, 1419, 2048 }, { 6, 1420, 2048 }, { 7, 1421, 2048 }, { 7, 1422, 2048 }, { 8, 1423, 2048 }, - { 5, 1424, 2048 }, { 6, 1425, 2048 }, { 6, 1426, 2048 }, { 7, 1427, 2048 }, { 6, 1428, 2048 }, { 7, 1429, 2048 }, { 7, 1430, 2048 }, { 8, 1431, 2048 }, - { 6, 1432, 2048 }, { 7, 1433, 2048 }, { 7, 1434, 2048 }, { 8, 1435, 2048 }, { 7, 1436, 2048 }, { 8, 1437, 2048 }, { 8, 1438, 2048 }, { 9, 1439, 2048 }, - { 5, 1440, 2048 }, { 6, 1441, 2048 }, { 6, 1442, 2048 }, { 7, 1443, 2048 }, { 6, 1444, 2048 }, { 7, 1445, 2048 }, { 7, 1446, 2048 }, { 8, 1447, 2048 }, - { 6, 1448, 2048 }, { 7, 1449, 2048 }, { 7, 1450, 2048 }, { 8, 1451, 2048 }, { 7, 1452, 2048 }, { 8, 1453, 2048 }, { 8, 1454, 2048 }, { 9, 1455, 2048 }, - { 6, 1456, 2048 }, { 7, 1457, 2048 }, { 7, 1458, 2048 }, { 8, 1459, 2048 }, { 7, 1460, 2048 }, { 8, 1461, 2048 }, { 8, 1462, 2048 }, { 9, 1463, 2048 }, - { 7, 1464, 2048 }, { 8, 1465, 2048 }, { 8, 1466, 2048 }, { 9, 1467, 2048 }, { 8, 1468, 2048 }, { 9, 1469, 2048 }, { 9, 1470, 2048 }, { 10, 1471, 2048 }, - { 5, 1472, 2048 }, { 6, 1473, 2048 }, { 6, 1474, 2048 }, { 7, 1475, 2048 }, { 6, 1476, 2048 }, { 7, 1477, 2048 }, { 7, 1478, 2048 }, { 8, 1479, 2048 }, - { 6, 1480, 2048 }, { 7, 1481, 2048 }, { 7, 1482, 2048 }, { 8, 1483, 2048 }, { 7, 1484, 2048 }, { 8, 1485, 2048 }, { 8, 1486, 2048 }, { 9, 1487, 2048 }, - { 6, 1488, 2048 }, { 7, 1489, 2048 }, { 7, 1490, 2048 }, { 8, 1491, 2048 }, { 7, 1492, 2048 }, { 8, 1493, 2048 }, { 8, 1494, 2048 }, { 9, 1495, 2048 }, - { 7, 1496, 2048 }, { 8, 1497, 2048 }, { 8, 1498, 2048 }, { 9, 1499, 2048 }, { 8, 1500, 2048 }, { 9, 1501, 2048 }, { 9, 1502, 2048 }, { 10, 1503, 2048 }, - { 6, 1504, 2048 }, { 7, 1505, 2048 }, { 7, 1506, 2048 }, { 8, 1507, 2048 }, { 7, 1508, 2048 }, { 8, 1509, 2048 }, { 8, 1510, 2048 }, { 9, 1511, 2048 }, - { 7, 1512, 2048 }, { 8, 1513, 2048 }, { 8, 1514, 2048 }, { 9, 1515, 2048 }, { 8, 1516, 2048 }, { 9, 1517, 2048 }, { 9, 1518, 2048 }, { 10, 1519, 2048 }, - { 7, 1520, 2048 }, { 8, 1521, 2048 }, { 8, 1522, 2048 }, { 9, 1523, 2048 }, { 8, 1524, 2048 }, { 9, 1525, 2048 }, { 9, 1526, 2048 }, { 10, 1527, 2048 }, - { 8, 1528, 2048 }, { 9, 1529, 2048 }, { 9, 1530, 2048 }, { 10, 1531, 2048 }, { 9, 1532, 2048 }, { 10, 1533, 2048 }, { 10, 1534, 2048 }, { 11, 1535, 2048 }, - { 3, 1536, 2048 }, { 4, 1537, 2048 }, { 4, 1538, 2048 }, { 5, 1539, 2048 }, { 4, 1540, 2048 }, { 5, 1541, 2048 }, { 5, 1542, 2048 }, { 6, 1543, 2048 }, - { 4, 1544, 2048 }, { 5, 1545, 2048 }, { 5, 1546, 2048 }, { 6, 1547, 2048 }, { 5, 1548, 2048 }, { 6, 1549, 2048 }, { 6, 1550, 2048 }, { 7, 1551, 2048 }, - { 4, 1552, 2048 }, { 5, 1553, 2048 }, { 5, 1554, 2048 }, { 6, 1555, 2048 }, { 5, 1556, 2048 }, { 6, 1557, 2048 }, { 6, 1558, 2048 }, { 7, 1559, 2048 }, - { 5, 1560, 2048 }, { 6, 1561, 2048 }, { 6, 1562, 2048 }, { 7, 1563, 2048 }, { 6, 1564, 2048 }, { 7, 1565, 2048 }, { 7, 1566, 2048 }, { 8, 1567, 2048 }, - { 4, 1568, 2048 }, { 5, 1569, 2048 }, { 5, 1570, 2048 }, { 6, 1571, 2048 }, { 5, 1572, 2048 }, { 6, 1573, 2048 }, { 6, 1574, 2048 }, { 7, 1575, 2048 }, - { 5, 1576, 2048 }, { 6, 1577, 2048 }, { 6, 1578, 2048 }, { 7, 1579, 2048 }, { 6, 1580, 2048 }, { 7, 1581, 2048 }, { 7, 1582, 2048 }, { 8, 1583, 2048 }, - { 5, 1584, 2048 }, { 6, 1585, 2048 }, { 6, 1586, 2048 }, { 7, 1587, 2048 }, { 6, 1588, 2048 }, { 7, 1589, 2048 }, { 7, 1590, 2048 }, { 8, 1591, 2048 }, - { 6, 1592, 2048 }, { 7, 1593, 2048 }, { 7, 1594, 2048 }, { 8, 1595, 2048 }, { 7, 1596, 2048 }, { 8, 1597, 2048 }, { 8, 1598, 2048 }, { 9, 1599, 2048 }, - { 4, 1600, 2048 }, { 5, 1601, 2048 }, { 5, 1602, 2048 }, { 6, 1603, 2048 }, { 5, 1604, 2048 }, { 6, 1605, 2048 }, { 6, 1606, 2048 }, { 7, 1607, 2048 }, - { 5, 1608, 2048 }, { 6, 1609, 2048 }, { 6, 1610, 2048 }, { 7, 1611, 2048 }, { 6, 1612, 2048 }, { 7, 1613, 2048 }, { 7, 1614, 2048 }, { 8, 1615, 2048 }, - { 5, 1616, 2048 }, { 6, 1617, 2048 }, { 6, 1618, 2048 }, { 7, 1619, 2048 }, { 6, 1620, 2048 }, { 7, 1621, 2048 }, { 7, 1622, 2048 }, { 8, 1623, 2048 }, - { 6, 1624, 2048 }, { 7, 1625, 2048 }, { 7, 1626, 2048 }, { 8, 1627, 2048 }, { 7, 1628, 2048 }, { 8, 1629, 2048 }, { 8, 1630, 2048 }, { 9, 1631, 2048 }, - { 5, 1632, 2048 }, { 6, 1633, 2048 }, { 6, 1634, 2048 }, { 7, 1635, 2048 }, { 6, 1636, 2048 }, { 7, 1637, 2048 }, { 7, 1638, 2048 }, { 8, 1639, 2048 }, - { 6, 1640, 2048 }, { 7, 1641, 2048 }, { 7, 1642, 2048 }, { 8, 1643, 2048 }, { 7, 1644, 2048 }, { 8, 1645, 2048 }, { 8, 1646, 2048 }, { 9, 1647, 2048 }, - { 6, 1648, 2048 }, { 7, 1649, 2048 }, { 7, 1650, 2048 }, { 8, 1651, 2048 }, { 7, 1652, 2048 }, { 8, 1653, 2048 }, { 8, 1654, 2048 }, { 9, 1655, 2048 }, - { 7, 1656, 2048 }, { 8, 1657, 2048 }, { 8, 1658, 2048 }, { 9, 1659, 2048 }, { 8, 1660, 2048 }, { 9, 1661, 2048 }, { 9, 1662, 2048 }, { 10, 1663, 2048 }, - { 4, 1664, 2048 }, { 5, 1665, 2048 }, { 5, 1666, 2048 }, { 6, 1667, 2048 }, { 5, 1668, 2048 }, { 6, 1669, 2048 }, { 6, 1670, 2048 }, { 7, 1671, 2048 }, - { 5, 1672, 2048 }, { 6, 1673, 2048 }, { 6, 1674, 2048 }, { 7, 1675, 2048 }, { 6, 1676, 2048 }, { 7, 1677, 2048 }, { 7, 1678, 2048 }, { 8, 1679, 2048 }, - { 5, 1680, 2048 }, { 6, 1681, 2048 }, { 6, 1682, 2048 }, { 7, 1683, 2048 }, { 6, 1684, 2048 }, { 7, 1685, 2048 }, { 7, 1686, 2048 }, { 8, 1687, 2048 }, - { 6, 1688, 2048 }, { 7, 1689, 2048 }, { 7, 1690, 2048 }, { 8, 1691, 2048 }, { 7, 1692, 2048 }, { 8, 1693, 2048 }, { 8, 1694, 2048 }, { 9, 1695, 2048 }, - { 5, 1696, 2048 }, { 6, 1697, 2048 }, { 6, 1698, 2048 }, { 7, 1699, 2048 }, { 6, 1700, 2048 }, { 7, 1701, 2048 }, { 7, 1702, 2048 }, { 8, 1703, 2048 }, - { 6, 1704, 2048 }, { 7, 1705, 2048 }, { 7, 1706, 2048 }, { 8, 1707, 2048 }, { 7, 1708, 2048 }, { 8, 1709, 2048 }, { 8, 1710, 2048 }, { 9, 1711, 2048 }, - { 6, 1712, 2048 }, { 7, 1713, 2048 }, { 7, 1714, 2048 }, { 8, 1715, 2048 }, { 7, 1716, 2048 }, { 8, 1717, 2048 }, { 8, 1718, 2048 }, { 9, 1719, 2048 }, - { 7, 1720, 2048 }, { 8, 1721, 2048 }, { 8, 1722, 2048 }, { 9, 1723, 2048 }, { 8, 1724, 2048 }, { 9, 1725, 2048 }, { 9, 1726, 2048 }, { 10, 1727, 2048 }, - { 5, 1728, 2048 }, { 6, 1729, 2048 }, { 6, 1730, 2048 }, { 7, 1731, 2048 }, { 6, 1732, 2048 }, { 7, 1733, 2048 }, { 7, 1734, 2048 }, { 8, 1735, 2048 }, - { 6, 1736, 2048 }, { 7, 1737, 2048 }, { 7, 1738, 2048 }, { 8, 1739, 2048 }, { 7, 1740, 2048 }, { 8, 1741, 2048 }, { 8, 1742, 2048 }, { 9, 1743, 2048 }, - { 6, 1744, 2048 }, { 7, 1745, 2048 }, { 7, 1746, 2048 }, { 8, 1747, 2048 }, { 7, 1748, 2048 }, { 8, 1749, 2048 }, { 8, 1750, 2048 }, { 9, 1751, 2048 }, - { 7, 1752, 2048 }, { 8, 1753, 2048 }, { 8, 1754, 2048 }, { 9, 1755, 2048 }, { 8, 1756, 2048 }, { 9, 1757, 2048 }, { 9, 1758, 2048 }, { 10, 1759, 2048 }, - { 6, 1760, 2048 }, { 7, 1761, 2048 }, { 7, 1762, 2048 }, { 8, 1763, 2048 }, { 7, 1764, 2048 }, { 8, 1765, 2048 }, { 8, 1766, 2048 }, { 9, 1767, 2048 }, - { 7, 1768, 2048 }, { 8, 1769, 2048 }, { 8, 1770, 2048 }, { 9, 1771, 2048 }, { 8, 1772, 2048 }, { 9, 1773, 2048 }, { 9, 1774, 2048 }, { 10, 1775, 2048 }, - { 7, 1776, 2048 }, { 8, 1777, 2048 }, { 8, 1778, 2048 }, { 9, 1779, 2048 }, { 8, 1780, 2048 }, { 9, 1781, 2048 }, { 9, 1782, 2048 }, { 10, 1783, 2048 }, - { 8, 1784, 2048 }, { 9, 1785, 2048 }, { 9, 1786, 2048 }, { 10, 1787, 2048 }, { 9, 1788, 2048 }, { 10, 1789, 2048 }, { 10, 1790, 2048 }, { 11, 1791, 2048 }, - { 4, 1792, 2048 }, { 5, 1793, 2048 }, { 5, 1794, 2048 }, { 6, 1795, 2048 }, { 5, 1796, 2048 }, { 6, 1797, 2048 }, { 6, 1798, 2048 }, { 7, 1799, 2048 }, - { 5, 1800, 2048 }, { 6, 1801, 2048 }, { 6, 1802, 2048 }, { 7, 1803, 2048 }, { 6, 1804, 2048 }, { 7, 1805, 2048 }, { 7, 1806, 2048 }, { 8, 1807, 2048 }, - { 5, 1808, 2048 }, { 6, 1809, 2048 }, { 6, 1810, 2048 }, { 7, 1811, 2048 }, { 6, 1812, 2048 }, { 7, 1813, 2048 }, { 7, 1814, 2048 }, { 8, 1815, 2048 }, - { 6, 1816, 2048 }, { 7, 1817, 2048 }, { 7, 1818, 2048 }, { 8, 1819, 2048 }, { 7, 1820, 2048 }, { 8, 1821, 2048 }, { 8, 1822, 2048 }, { 9, 1823, 2048 }, - { 5, 1824, 2048 }, { 6, 1825, 2048 }, { 6, 1826, 2048 }, { 7, 1827, 2048 }, { 6, 1828, 2048 }, { 7, 1829, 2048 }, { 7, 1830, 2048 }, { 8, 1831, 2048 }, - { 6, 1832, 2048 }, { 7, 1833, 2048 }, { 7, 1834, 2048 }, { 8, 1835, 2048 }, { 7, 1836, 2048 }, { 8, 1837, 2048 }, { 8, 1838, 2048 }, { 9, 1839, 2048 }, - { 6, 1840, 2048 }, { 7, 1841, 2048 }, { 7, 1842, 2048 }, { 8, 1843, 2048 }, { 7, 1844, 2048 }, { 8, 1845, 2048 }, { 8, 1846, 2048 }, { 9, 1847, 2048 }, - { 7, 1848, 2048 }, { 8, 1849, 2048 }, { 8, 1850, 2048 }, { 9, 1851, 2048 }, { 8, 1852, 2048 }, { 9, 1853, 2048 }, { 9, 1854, 2048 }, { 10, 1855, 2048 }, - { 5, 1856, 2048 }, { 6, 1857, 2048 }, { 6, 1858, 2048 }, { 7, 1859, 2048 }, { 6, 1860, 2048 }, { 7, 1861, 2048 }, { 7, 1862, 2048 }, { 8, 1863, 2048 }, - { 6, 1864, 2048 }, { 7, 1865, 2048 }, { 7, 1866, 2048 }, { 8, 1867, 2048 }, { 7, 1868, 2048 }, { 8, 1869, 2048 }, { 8, 1870, 2048 }, { 9, 1871, 2048 }, - { 6, 1872, 2048 }, { 7, 1873, 2048 }, { 7, 1874, 2048 }, { 8, 1875, 2048 }, { 7, 1876, 2048 }, { 8, 1877, 2048 }, { 8, 1878, 2048 }, { 9, 1879, 2048 }, - { 7, 1880, 2048 }, { 8, 1881, 2048 }, { 8, 1882, 2048 }, { 9, 1883, 2048 }, { 8, 1884, 2048 }, { 9, 1885, 2048 }, { 9, 1886, 2048 }, { 10, 1887, 2048 }, - { 6, 1888, 2048 }, { 7, 1889, 2048 }, { 7, 1890, 2048 }, { 8, 1891, 2048 }, { 7, 1892, 2048 }, { 8, 1893, 2048 }, { 8, 1894, 2048 }, { 9, 1895, 2048 }, - { 7, 1896, 2048 }, { 8, 1897, 2048 }, { 8, 1898, 2048 }, { 9, 1899, 2048 }, { 8, 1900, 2048 }, { 9, 1901, 2048 }, { 9, 1902, 2048 }, { 10, 1903, 2048 }, - { 7, 1904, 2048 }, { 8, 1905, 2048 }, { 8, 1906, 2048 }, { 9, 1907, 2048 }, { 8, 1908, 2048 }, { 9, 1909, 2048 }, { 9, 1910, 2048 }, { 10, 1911, 2048 }, - { 8, 1912, 2048 }, { 9, 1913, 2048 }, { 9, 1914, 2048 }, { 10, 1915, 2048 }, { 9, 1916, 2048 }, { 10, 1917, 2048 }, { 10, 1918, 2048 }, { 11, 1919, 2048 }, - { 5, 1920, 2048 }, { 6, 1921, 2048 }, { 6, 1922, 2048 }, { 7, 1923, 2048 }, { 6, 1924, 2048 }, { 7, 1925, 2048 }, { 7, 1926, 2048 }, { 8, 1927, 2048 }, - { 6, 1928, 2048 }, { 7, 1929, 2048 }, { 7, 1930, 2048 }, { 8, 1931, 2048 }, { 7, 1932, 2048 }, { 8, 1933, 2048 }, { 8, 1934, 2048 }, { 9, 1935, 2048 }, - { 6, 1936, 2048 }, { 7, 1937, 2048 }, { 7, 1938, 2048 }, { 8, 1939, 2048 }, { 7, 1940, 2048 }, { 8, 1941, 2048 }, { 8, 1942, 2048 }, { 9, 1943, 2048 }, - { 7, 1944, 2048 }, { 8, 1945, 2048 }, { 8, 1946, 2048 }, { 9, 1947, 2048 }, { 8, 1948, 2048 }, { 9, 1949, 2048 }, { 9, 1950, 2048 }, { 10, 1951, 2048 }, - { 6, 1952, 2048 }, { 7, 1953, 2048 }, { 7, 1954, 2048 }, { 8, 1955, 2048 }, { 7, 1956, 2048 }, { 8, 1957, 2048 }, { 8, 1958, 2048 }, { 9, 1959, 2048 }, - { 7, 1960, 2048 }, { 8, 1961, 2048 }, { 8, 1962, 2048 }, { 9, 1963, 2048 }, { 8, 1964, 2048 }, { 9, 1965, 2048 }, { 9, 1966, 2048 }, { 10, 1967, 2048 }, - { 7, 1968, 2048 }, { 8, 1969, 2048 }, { 8, 1970, 2048 }, { 9, 1971, 2048 }, { 8, 1972, 2048 }, { 9, 1973, 2048 }, { 9, 1974, 2048 }, { 10, 1975, 2048 }, - { 8, 1976, 2048 }, { 9, 1977, 2048 }, { 9, 1978, 2048 }, { 10, 1979, 2048 }, { 9, 1980, 2048 }, { 10, 1981, 2048 }, { 10, 1982, 2048 }, { 11, 1983, 2048 }, - { 6, 1984, 2048 }, { 7, 1985, 2048 }, { 7, 1986, 2048 }, { 8, 1987, 2048 }, { 7, 1988, 2048 }, { 8, 1989, 2048 }, { 8, 1990, 2048 }, { 9, 1991, 2048 }, - { 7, 1992, 2048 }, { 8, 1993, 2048 }, { 8, 1994, 2048 }, { 9, 1995, 2048 }, { 8, 1996, 2048 }, { 9, 1997, 2048 }, { 9, 1998, 2048 }, { 10, 1999, 2048 }, - { 7, 2000, 2048 }, { 8, 2001, 2048 }, { 8, 2002, 2048 }, { 9, 2003, 2048 }, { 8, 2004, 2048 }, { 9, 2005, 2048 }, { 9, 2006, 2048 }, { 10, 2007, 2048 }, - { 8, 2008, 2048 }, { 9, 2009, 2048 }, { 9, 2010, 2048 }, { 10, 2011, 2048 }, { 9, 2012, 2048 }, { 10, 2013, 2048 }, { 10, 2014, 2048 }, { 11, 2015, 2048 }, - { 7, 2016, 2048 }, { 8, 2017, 2048 }, { 8, 2018, 2048 }, { 9, 2019, 2048 }, { 8, 2020, 2048 }, { 9, 2021, 2048 }, { 9, 2022, 2048 }, { 10, 2023, 2048 }, - { 8, 2024, 2048 }, { 9, 2025, 2048 }, { 9, 2026, 2048 }, { 10, 2027, 2048 }, { 9, 2028, 2048 }, { 10, 2029, 2048 }, { 10, 2030, 2048 }, { 11, 2031, 2048 }, - { 8, 2032, 2048 }, { 9, 2033, 2048 }, { 9, 2034, 2048 }, { 10, 2035, 2048 }, { 9, 2036, 2048 }, { 10, 2037, 2048 }, { 10, 2038, 2048 }, { 11, 2039, 2048 }, - { 9, 2040, 2048 }, { 10, 2041, 2048 }, { 10, 2042, 2048 }, { 11, 2043, 2048 }, { 10, 2044, 2048 }, { 11, 2045, 2048 }, { 11, 2046, 2048 }, { 12, 2047, 2048 }, -#endif -#endif -#endif -#endif -#endif -#endif -}; - -/* find a hole and free as required, return -1 if no hole found */ -static int find_hole(void) -{ - unsigned x; - int y, z; - for (z = -1, y = INT_MAX, x = 0; x < FP_ENTRIES; x++) { - if (fp_cache[x].lru_count < y && fp_cache[x].lock == 0) { - z = x; - y = fp_cache[x].lru_count; - } - } - - /* decrease all */ - for (x = 0; x < FP_ENTRIES; x++) { - if (fp_cache[x].lru_count > 3) { - --(fp_cache[x].lru_count); - } - } - - /* free entry z */ - if (z >= 0 && fp_cache[z].g) { - mp_clear(&fp_cache[z].mu); - ecc_del_point(fp_cache[z].g); - fp_cache[z].g = NULL; - for (x = 0; x < (1U<x, &g->x) == MP_EQ && - mp_cmp(&fp_cache[x].g->y, &g->y) == MP_EQ && - mp_cmp(&fp_cache[x].g->z, &g->z) == MP_EQ) { - break; - } - } - if (x == FP_ENTRIES) { - x = -1; - } - return x; -} - -/* add a new base to the cache */ -static int add_entry(int idx, ecc_point *g) -{ - unsigned x, y; - - /* allocate base and LUT */ - fp_cache[idx].g = ecc_new_point(); - if (fp_cache[idx].g == NULL) { - return GEN_MEM_ERR; - } - - /* copy x and y */ - if ((mp_copy(&g->x, &fp_cache[idx].g->x) != MP_OKAY) || - (mp_copy(&g->y, &fp_cache[idx].g->y) != MP_OKAY) || - (mp_copy(&g->z, &fp_cache[idx].g->z) != MP_OKAY)) { - ecc_del_point(fp_cache[idx].g); - fp_cache[idx].g = NULL; - return GEN_MEM_ERR; - } - - for (x = 0; x < (1U<x, mu, modulus, - &fp_cache[idx].LUT[1]->x) != MP_OKAY) || - (mp_mulmod(&fp_cache[idx].g->y, mu, modulus, - &fp_cache[idx].LUT[1]->y) != MP_OKAY) || - (mp_mulmod(&fp_cache[idx].g->z, mu, modulus, - &fp_cache[idx].LUT[1]->z) != MP_OKAY)) { - err = MP_MULMOD_E; - } - } - - /* make all single bit entries */ - for (x = 1; x < FP_LUT; x++) { - if (err != MP_OKAY) - break; - if ((mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->x, - &fp_cache[idx].LUT[1<x) != MP_OKAY) || - (mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->y, - &fp_cache[idx].LUT[1<y) != MP_OKAY) || - (mp_copy(&fp_cache[idx].LUT[1<<(x-1)]->z, - &fp_cache[idx].LUT[1<z) != MP_OKAY)){ - err = MP_INIT_E; - break; - } else { - - /* now double it bitlen/FP_LUT times */ - for (y = 0; y < lut_gap; y++) { - if ((err = ecc_projective_dbl_point(fp_cache[idx].LUT[1<z, modulus, *mp); - - /* invert it */ - if (err == MP_OKAY) - err = mp_invmod(&fp_cache[idx].LUT[x]->z, modulus, - &fp_cache[idx].LUT[x]->z); - - if (err == MP_OKAY) - /* now square it */ - err = mp_sqrmod(&fp_cache[idx].LUT[x]->z, modulus, &tmp); - - if (err == MP_OKAY) - /* fix x */ - err = mp_mulmod(&fp_cache[idx].LUT[x]->x, &tmp, modulus, - &fp_cache[idx].LUT[x]->x); - - if (err == MP_OKAY) - /* get 1/z^3 */ - err = mp_mulmod(&tmp, &fp_cache[idx].LUT[x]->z, modulus, &tmp); - - if (err == MP_OKAY) - /* fix y */ - err = mp_mulmod(&fp_cache[idx].LUT[x]->y, &tmp, modulus, - &fp_cache[idx].LUT[x]->y); - - if (err == MP_OKAY) - /* free z */ - mp_clear(&fp_cache[idx].LUT[x]->z); - } - mp_clear(&tmp); - - if (err == MP_OKAY) - return MP_OKAY; - - /* err cleanup */ - for (y = 0; y < (1U< mp_unsigned_bin_size(modulus)) { - mp_int order; - if (mp_init(&order) != MP_OKAY) { - mp_clear(&tk); - return MP_INIT_E; - } - - /* find order */ - y = mp_unsigned_bin_size(modulus); - for (x = 0; ecc_sets[x].size; x++) { - if (y <= (unsigned)ecc_sets[x].size) break; - } - - /* back off if we are on the 521 bit curve */ - if (y == 66) --x; - - if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { - mp_clear(&order); - mp_clear(&tk); - return err; - } - - /* k must be less than modulus */ - if (mp_cmp(k, &order) != MP_LT) { - if ((err = mp_mod(k, &order, &tk)) != MP_OKAY) { - mp_clear(&tk); - mp_clear(&order); - return err; - } - } else { - mp_copy(k, &tk); - } - mp_clear(&order); - } else { - mp_copy(k, &tk); - } - - /* get bitlen and round up to next multiple of FP_LUT */ - bitlen = mp_unsigned_bin_size(modulus) << 3; - x = bitlen % FP_LUT; - if (x) { - bitlen += FP_LUT - x; - } - lut_gap = bitlen / FP_LUT; - - /* get the k value */ - if (mp_unsigned_bin_size(&tk) > (int)(KB_SIZE - 2)) { - mp_clear(&tk); - return BUFFER_E; - } - - /* store k */ -#ifdef CYASSL_SMALL_STACK - kb = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (kb == NULL) - return MEMORY_E; -#endif - - XMEMSET(kb, 0, KB_SIZE); - if ((err = mp_to_unsigned_bin(&tk, kb)) != MP_OKAY) { - mp_clear(&tk); - } - else { - /* let's reverse kb so it's little endian */ - x = 0; - y = mp_unsigned_bin_size(&tk) - 1; - mp_clear(&tk); - - while ((unsigned)x < y) { - z = kb[x]; kb[x] = kb[y]; kb[y] = z; - ++x; --y; - } - - /* at this point we can start, yipee */ - first = 1; - for (x = lut_gap-1; x >= 0; x--) { - /* extract FP_LUT bits from kb spread out by lut_gap bits and offset - by x bits from the start */ - bitpos = x; - for (y = z = 0; y < FP_LUT; y++) { - z |= ((kb[bitpos>>3] >> (bitpos&7)) & 1) << y; - bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid - the mult in each loop */ - } - - /* double if not first */ - if (!first) { - if ((err = ecc_projective_dbl_point(R, R, modulus, - mp)) != MP_OKAY) { - break; - } - } - - /* add if not first, otherwise copy */ - if (!first && z) { - if ((err = ecc_projective_add_point(R, fp_cache[idx].LUT[z], R, - modulus, mp)) != MP_OKAY) { - break; - } - } else if (z) { - if ((mp_copy(&fp_cache[idx].LUT[z]->x, &R->x) != MP_OKAY) || - (mp_copy(&fp_cache[idx].LUT[z]->y, &R->y) != MP_OKAY) || - (mp_copy(&fp_cache[idx].mu, &R->z) != MP_OKAY)) { - err = GEN_MEM_ERR; - break; - } - first = 0; - } - } - } - - if (err == MP_OKAY) { - z = 0; - XMEMSET(kb, 0, KB_SIZE); - /* map R back from projective space */ - if (map) { - err = ecc_map(R, modulus, mp); - } else { - err = MP_OKAY; - } - } - -#ifdef CYASSL_SMALL_STACK - XFREE(kb, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - -#undef KB_SIZE - - return err; -} - -#ifdef ECC_SHAMIR -/* perform a fixed point ECC mulmod */ -static int accel_fp_mul2add(int idx1, int idx2, - mp_int* kA, mp_int* kB, - ecc_point *R, mp_int* modulus, mp_digit* mp) -{ -#define KB_SIZE 128 - -#ifdef CYASSL_SMALL_STACK - unsigned char* kb[2]; -#else - unsigned char kb[2][128]; -#endif - int x; - unsigned y, z, err, bitlen, bitpos, lut_gap, first, zA, zB; - mp_int tka; - mp_int tkb; - mp_int order; - - if (mp_init_multi(&tka, &tkb, 0, 0, 0, 0) != MP_OKAY) - return MP_INIT_E; - - /* if it's smaller than modulus we fine */ - if (mp_unsigned_bin_size(kA) > mp_unsigned_bin_size(modulus)) { - /* find order */ - y = mp_unsigned_bin_size(modulus); - for (x = 0; ecc_sets[x].size; x++) { - if (y <= (unsigned)ecc_sets[x].size) break; - } - - /* back off if we are on the 521 bit curve */ - if (y == 66) --x; - - if ((err = mp_init(&order)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - return err; - } - if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - mp_clear(&order); - return err; - } - - /* kA must be less than modulus */ - if (mp_cmp(kA, &order) != MP_LT) { - if ((err = mp_mod(kA, &order, &tka)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - mp_clear(&order); - return err; - } - } else { - mp_copy(kA, &tka); - } - mp_clear(&order); - } else { - mp_copy(kA, &tka); - } - - /* if it's smaller than modulus we fine */ - if (mp_unsigned_bin_size(kB) > mp_unsigned_bin_size(modulus)) { - /* find order */ - y = mp_unsigned_bin_size(modulus); - for (x = 0; ecc_sets[x].size; x++) { - if (y <= (unsigned)ecc_sets[x].size) break; - } - - /* back off if we are on the 521 bit curve */ - if (y == 66) --x; - - if ((err = mp_init(&order)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - return err; - } - if ((err = mp_read_radix(&order, ecc_sets[x].order, 16)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - mp_clear(&order); - return err; - } - - /* kB must be less than modulus */ - if (mp_cmp(kB, &order) != MP_LT) { - if ((err = mp_mod(kB, &order, &tkb)) != MP_OKAY) { - mp_clear(&tkb); - mp_clear(&tka); - mp_clear(&order); - return err; - } - } else { - mp_copy(kB, &tkb); - } - mp_clear(&order); - } else { - mp_copy(kB, &tkb); - } - - /* get bitlen and round up to next multiple of FP_LUT */ - bitlen = mp_unsigned_bin_size(modulus) << 3; - x = bitlen % FP_LUT; - if (x) { - bitlen += FP_LUT - x; - } - lut_gap = bitlen / FP_LUT; - - /* get the k value */ - if ((mp_unsigned_bin_size(&tka) > (int)(KB_SIZE - 2)) || - (mp_unsigned_bin_size(&tkb) > (int)(KB_SIZE - 2)) ) { - mp_clear(&tka); - mp_clear(&tkb); - return BUFFER_E; - } - - /* store k */ -#ifdef CYASSL_SMALL_STACK - kb[0] = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (kb[0] == NULL) - return MEMORY_E; -#endif - - XMEMSET(kb[0], 0, KB_SIZE); - if ((err = mp_to_unsigned_bin(&tka, kb[0])) != MP_OKAY) { - mp_clear(&tka); - mp_clear(&tkb); - XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); - return err; - } - - /* let's reverse kb so it's little endian */ - x = 0; - y = mp_unsigned_bin_size(&tka) - 1; - mp_clear(&tka); - while ((unsigned)x < y) { - z = kb[0][x]; kb[0][x] = kb[0][y]; kb[0][y] = z; - ++x; --y; - } - - /* store b */ -#ifdef CYASSL_SMALL_STACK - kb[1] = (unsigned char*)XMALLOC(KB_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (kb[1] == NULL) { - XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - XMEMSET(kb[1], 0, KB_SIZE); - if ((err = mp_to_unsigned_bin(&tkb, kb[1])) != MP_OKAY) { - mp_clear(&tkb); - } - else { - x = 0; - y = mp_unsigned_bin_size(&tkb) - 1; - mp_clear(&tkb); - while ((unsigned)x < y) { - z = kb[1][x]; kb[1][x] = kb[1][y]; kb[1][y] = z; - ++x; --y; - } - - /* at this point we can start, yipee */ - first = 1; - for (x = lut_gap-1; x >= 0; x--) { - /* extract FP_LUT bits from kb spread out by lut_gap bits and - offset by x bits from the start */ - bitpos = x; - for (y = zA = zB = 0; y < FP_LUT; y++) { - zA |= ((kb[0][bitpos>>3] >> (bitpos&7)) & 1) << y; - zB |= ((kb[1][bitpos>>3] >> (bitpos&7)) & 1) << y; - bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid - the mult in each loop */ - } - - /* double if not first */ - if (!first) { - if ((err = ecc_projective_dbl_point(R, R, modulus, - mp)) != MP_OKAY) { - break; - } - } - - /* add if not first, otherwise copy */ - if (!first) { - if (zA) { - if ((err = ecc_projective_add_point(R, fp_cache[idx1].LUT[zA], - R, modulus, mp)) != MP_OKAY) { - break; - } - } - if (zB) { - if ((err = ecc_projective_add_point(R, fp_cache[idx2].LUT[zB], - R, modulus, mp)) != MP_OKAY) { - break; - } - } - } else { - if (zA) { - if ((mp_copy(&fp_cache[idx1].LUT[zA]->x, &R->x) != MP_OKAY) || - (mp_copy(&fp_cache[idx1].LUT[zA]->y, &R->y) != MP_OKAY) || - (mp_copy(&fp_cache[idx1].mu, &R->z) != MP_OKAY)) { - err = GEN_MEM_ERR; - break; - } - first = 0; - } - if (zB && first == 0) { - if (zB) { - if ((err = ecc_projective_add_point(R, - fp_cache[idx2].LUT[zB], R, modulus, mp)) != MP_OKAY){ - break; - } - } - } else if (zB && first == 1) { - if ((mp_copy(&fp_cache[idx2].LUT[zB]->x, &R->x) != MP_OKAY) || - (mp_copy(&fp_cache[idx2].LUT[zB]->y, &R->y) != MP_OKAY) || - (mp_copy(&fp_cache[idx2].mu, &R->z) != MP_OKAY)) { - err = GEN_MEM_ERR; - break; - } - first = 0; - } - } - } - } - - XMEMSET(kb[0], 0, KB_SIZE); - XMEMSET(kb[1], 0, KB_SIZE); - -#ifdef CYASSL_SMALL_STACK - XFREE(kb[0], NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(kb[1], NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - -#undef KB_SIZE - - return ecc_map(R, modulus, mp); -} - -/** ECC Fixed Point mulmod global - Computes kA*A + kB*B = C using Shamir's Trick - A First point to multiply - kA What to multiple A by - B Second point to multiply - kB What to multiple B by - C [out] Destination point (can overlap with A or B) - modulus Modulus for curve - return MP_OKAY on success -*/ -int ecc_mul2add(ecc_point* A, mp_int* kA, - ecc_point* B, mp_int* kB, - ecc_point* C, mp_int* modulus) -{ - int idx1 = -1, idx2 = -1, err = MP_OKAY, mpInit = 0; - mp_digit mp; - mp_int mu; - - err = mp_init(&mu); - if (err != MP_OKAY) - return err; - -#ifndef HAVE_THREAD_LS - if (initMutex == 0) { - InitMutex(&ecc_fp_lock); - initMutex = 1; - } - if (LockMutex(&ecc_fp_lock) != 0) - return BAD_MUTEX_E; -#endif /* HAVE_THREAD_LS */ - - /* find point */ - idx1 = find_base(A); - - /* no entry? */ - if (idx1 == -1) { - /* find hole and add it */ - if ((idx1 = find_hole()) >= 0) { - err = add_entry(idx1, A); - } - } - if (err == MP_OKAY && idx1 != -1) { - /* increment LRU */ - ++(fp_cache[idx1].lru_count); - } - - if (err == MP_OKAY) - /* find point */ - idx2 = find_base(B); - - if (err == MP_OKAY) { - /* no entry? */ - if (idx2 == -1) { - /* find hole and add it */ - if ((idx2 = find_hole()) >= 0) - err = add_entry(idx2, B); - } - } - - if (err == MP_OKAY && idx2 != -1) { - /* increment LRU */ - ++(fp_cache[idx2].lru_count); - } - - if (err == MP_OKAY) { - /* if it's 2 build the LUT, if it's higher just use the LUT */ - if (idx1 >= 0 && fp_cache[idx1].lru_count == 2) { - /* compute mp */ - err = mp_montgomery_setup(modulus, &mp); - - if (err == MP_OKAY) { - mpInit = 1; - err = mp_montgomery_calc_normalization(&mu, modulus); - } - - if (err == MP_OKAY) - /* build the LUT */ - err = build_lut(idx1, modulus, &mp, &mu); - } - } - - if (err == MP_OKAY) { - /* if it's 2 build the LUT, if it's higher just use the LUT */ - if (idx2 >= 0 && fp_cache[idx2].lru_count == 2) { - if (mpInit == 0) { - /* compute mp */ - err = mp_montgomery_setup(modulus, &mp); - if (err == MP_OKAY) { - mpInit = 1; - err = mp_montgomery_calc_normalization(&mu, modulus); - } - } - - if (err == MP_OKAY) - /* build the LUT */ - err = build_lut(idx2, modulus, &mp, &mu); - } - } - - - if (err == MP_OKAY) { - if (idx1 >=0 && idx2 >= 0 && fp_cache[idx1].lru_count >= 2 && - fp_cache[idx2].lru_count >= 2) { - if (mpInit == 0) { - /* compute mp */ - err = mp_montgomery_setup(modulus, &mp); - } - if (err == MP_OKAY) - err = accel_fp_mul2add(idx1, idx2, kA, kB, C, modulus, &mp); - } else { - err = normal_ecc_mul2add(A, kA, B, kB, C, modulus); - } - } - -#ifndef HAVE_THREAD_LS - UnLockMutex(&ecc_fp_lock); -#endif /* HAVE_THREAD_LS */ - mp_clear(&mu); - - return err; -} -#endif - -/** ECC Fixed Point mulmod global - k The multiplicand - G Base point to multiply - R [out] Destination of product - modulus The modulus for the curve - map [boolean] If non-zero maps the point back to affine co-ordinates, - otherwise it's left in jacobian-montgomery form - return MP_OKAY if successful -*/ -int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus, - int map) -{ - int idx, err = MP_OKAY; - mp_digit mp; - mp_int mu; - int mpSetup = 0; - - if (mp_init(&mu) != MP_OKAY) - return MP_INIT_E; - -#ifndef HAVE_THREAD_LS - if (initMutex == 0) { - InitMutex(&ecc_fp_lock); - initMutex = 1; - } - - if (LockMutex(&ecc_fp_lock) != 0) - return BAD_MUTEX_E; -#endif /* HAVE_THREAD_LS */ - - /* find point */ - idx = find_base(G); - - /* no entry? */ - if (idx == -1) { - /* find hole and add it */ - idx = find_hole(); - - if (idx >= 0) - err = add_entry(idx, G); - } - if (err == MP_OKAY && idx != -1) { - /* increment LRU */ - ++(fp_cache[idx].lru_count); - } - - - if (err == MP_OKAY) { - /* if it's 2 build the LUT, if it's higher just use the LUT */ - if (idx >= 0 && fp_cache[idx].lru_count == 2) { - /* compute mp */ - err = mp_montgomery_setup(modulus, &mp); - - if (err == MP_OKAY) { - /* compute mu */ - mpSetup = 1; - err = mp_montgomery_calc_normalization(&mu, modulus); - } - - if (err == MP_OKAY) - /* build the LUT */ - err = build_lut(idx, modulus, &mp, &mu); - } - } - - if (err == MP_OKAY) { - if (idx >= 0 && fp_cache[idx].lru_count >= 2) { - if (mpSetup == 0) { - /* compute mp */ - err = mp_montgomery_setup(modulus, &mp); - } - if (err == MP_OKAY) - err = accel_fp_mul(idx, k, R, modulus, &mp, map); - } else { - err = normal_ecc_mulmod(k, G, R, modulus, map); - } - } - -#ifndef HAVE_THREAD_LS - UnLockMutex(&ecc_fp_lock); -#endif /* HAVE_THREAD_LS */ - mp_clear(&mu); - - return err; -} - -/* helper function for freeing the cache ... - must be called with the cache mutex locked */ -static void ecc_fp_free_cache(void) -{ - unsigned x, y; - for (x = 0; x < FP_ENTRIES; x++) { - if (fp_cache[x].g != NULL) { - for (y = 0; y < (1U<protocol == 0) - return NULL; - - if (ctx->protocol == REQ_RESP_CLIENT) { - if (ctx->cliSt == ecCLI_INIT) { - ctx->cliSt = ecCLI_SALT_GET; - return ctx->clientSalt; - } - else { - ctx->cliSt = ecCLI_BAD_STATE; - return NULL; - } - } - else if (ctx->protocol == REQ_RESP_SERVER) { - if (ctx->srvSt == ecSRV_INIT) { - ctx->srvSt = ecSRV_SALT_GET; - return ctx->serverSalt; - } - else { - ctx->srvSt = ecSRV_BAD_STATE; - return NULL; - } - } - - return NULL; -} - - -static const char* exchange_info = "Secure Message Exchange"; - -int ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt) -{ - byte tmp[EXCHANGE_SALT_SZ/2]; - int halfSz = EXCHANGE_SALT_SZ/2; - - if (ctx == NULL || ctx->protocol == 0 || salt == NULL) - return BAD_FUNC_ARG; - - if (ctx->protocol == REQ_RESP_CLIENT) { - XMEMCPY(ctx->serverSalt, salt, EXCHANGE_SALT_SZ); - if (ctx->cliSt == ecCLI_SALT_GET) - ctx->cliSt = ecCLI_SALT_SET; - else { - ctx->cliSt = ecCLI_BAD_STATE; - return BAD_ENC_STATE_E; - } - } - else { - XMEMCPY(ctx->clientSalt, salt, EXCHANGE_SALT_SZ); - if (ctx->srvSt == ecSRV_SALT_GET) - ctx->srvSt = ecSRV_SALT_SET; - else { - ctx->srvSt = ecSRV_BAD_STATE; - return BAD_ENC_STATE_E; - } - } - - /* mix half and half */ - /* tmp stores 2nd half of client before overwrite */ - XMEMCPY(tmp, ctx->clientSalt + halfSz, halfSz); - XMEMCPY(ctx->clientSalt + halfSz, ctx->serverSalt, halfSz); - XMEMCPY(ctx->serverSalt, tmp, halfSz); - - ctx->kdfSalt = ctx->clientSalt; - ctx->kdfSaltSz = EXCHANGE_SALT_SZ; - - ctx->macSalt = ctx->serverSalt; - ctx->macSaltSz = EXCHANGE_SALT_SZ; - - ctx->kdfInfo = (byte*)exchange_info; - ctx->kdfInfoSz = EXCHANGE_INFO_SZ; - - return 0; -} - - -static int ecc_ctx_set_salt(ecEncCtx* ctx, int flags, RNG* rng) -{ - byte* saltBuffer = NULL; - - if (ctx == NULL || rng == NULL || flags == 0) - return BAD_FUNC_ARG; - - saltBuffer = (flags == REQ_RESP_CLIENT) ? ctx->clientSalt : ctx->serverSalt; - - return RNG_GenerateBlock(rng, saltBuffer, EXCHANGE_SALT_SZ); -} - - -static void ecc_ctx_init(ecEncCtx* ctx, int flags) -{ - if (ctx) { - XMEMSET(ctx, 0, sizeof(ecEncCtx)); - - ctx->encAlgo = ecAES_128_CBC; - ctx->kdfAlgo = ecHKDF_SHA256; - ctx->macAlgo = ecHMAC_SHA256; - ctx->protocol = (byte)flags; - - if (flags == REQ_RESP_CLIENT) - ctx->cliSt = ecCLI_INIT; - if (flags == REQ_RESP_SERVER) - ctx->srvSt = ecSRV_INIT; - } -} - - -/* allow ecc context reset so user doesn't have to init/free for resue */ -int ecc_ctx_reset(ecEncCtx* ctx, RNG* rng) -{ - if (ctx == NULL || rng == NULL) - return BAD_FUNC_ARG; - - ecc_ctx_init(ctx, ctx->protocol); - return ecc_ctx_set_salt(ctx, ctx->protocol, rng); -} - - -/* alloc/init and set defaults, return new Context */ -ecEncCtx* ecc_ctx_new(int flags, RNG* rng) -{ - int ret = 0; - ecEncCtx* ctx = (ecEncCtx*)XMALLOC(sizeof(ecEncCtx), 0, DYNAMIC_TYPE_ECC); - - if (ctx) - ctx->protocol = (byte)flags; - - ret = ecc_ctx_reset(ctx, rng); - if (ret != 0) { - ecc_ctx_free(ctx); - ctx = NULL; - } - - return ctx; -} - - -/* free any resources, clear any keys */ -void ecc_ctx_free(ecEncCtx* ctx) -{ - if (ctx) { - XMEMSET(ctx, 0, sizeof(ecEncCtx)); - XFREE(ctx, 0, DYNAMIC_TYPE_ECC); - } -} - - -static int ecc_get_key_sizes(ecEncCtx* ctx, int* encKeySz, int* ivSz, - int* keysLen, word32* digestSz, word32* blockSz) -{ - if (ctx) { - switch (ctx->encAlgo) { - case ecAES_128_CBC: - *encKeySz = KEY_SIZE_128; - *ivSz = IV_SIZE_64; - *blockSz = AES_BLOCK_SIZE; - break; - default: - return BAD_FUNC_ARG; - } - - switch (ctx->macAlgo) { - case ecHMAC_SHA256: - *digestSz = SHA256_DIGEST_SIZE; - break; - default: - return BAD_FUNC_ARG; - } - } else - return BAD_FUNC_ARG; - - *keysLen = *encKeySz + *ivSz + *digestSz; - - return 0; -} - - -/* ecc encrypt with shared secret run through kdf - ctx holds non default algos and inputs - msgSz should be the right size for encAlgo, i.e., already padded - return 0 on success */ -int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, - word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx) -{ - int ret; - word32 blockSz; - word32 digestSz; - ecEncCtx localCtx; -#ifdef CYASSL_SMALL_STACK - byte* sharedSecret; - byte* keys; -#else - byte sharedSecret[ECC_MAXSIZE]; /* 521 max size */ - byte keys[ECC_BUFSIZE]; /* max size */ -#endif - word32 sharedSz = ECC_MAXSIZE; - int keysLen; - int encKeySz; - int ivSz; - int offset = 0; /* keys offset if doing msg exchange */ - byte* encKey; - byte* encIv; - byte* macKey; - - if (privKey == NULL || pubKey == NULL || msg == NULL || out == NULL || - outSz == NULL) - return BAD_FUNC_ARG; - - if (ctx == NULL) { /* use defaults */ - ecc_ctx_init(&localCtx, 0); - ctx = &localCtx; - } - - ret = ecc_get_key_sizes(ctx, &encKeySz, &ivSz, &keysLen, &digestSz, - &blockSz); - if (ret != 0) - return ret; - - if (ctx->protocol == REQ_RESP_SERVER) { - offset = keysLen; - keysLen *= 2; - - if (ctx->srvSt != ecSRV_RECV_REQ) - return BAD_ENC_STATE_E; - - ctx->srvSt = ecSRV_BAD_STATE; /* we're done no more ops allowed */ - } - else if (ctx->protocol == REQ_RESP_CLIENT) { - if (ctx->cliSt != ecCLI_SALT_SET) - return BAD_ENC_STATE_E; - - ctx->cliSt = ecCLI_SENT_REQ; /* only do this once */ - } - - if (keysLen > ECC_BUFSIZE) /* keys size */ - return BUFFER_E; - - if ( (msgSz%blockSz) != 0) - return BAD_PADDING_E; - - if (*outSz < (msgSz + digestSz)) - return BUFFER_E; - -#ifdef CYASSL_SMALL_STACK - sharedSecret = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sharedSecret == NULL) - return MEMORY_E; - - keys = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (keys == NULL) { - XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - ret = ecc_shared_secret(privKey, pubKey, sharedSecret, &sharedSz); - - if (ret == 0) { - switch (ctx->kdfAlgo) { - case ecHKDF_SHA256 : - ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt, - ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, - keys, keysLen); - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) { - encKey = keys + offset; - encIv = encKey + encKeySz; - macKey = encKey + encKeySz + ivSz; - - switch (ctx->encAlgo) { - case ecAES_128_CBC: - { - Aes aes; - ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv, - AES_ENCRYPTION); - if (ret != 0) - break; - ret = AesCbcEncrypt(&aes, out, msg, msgSz); - } - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) { - switch (ctx->macAlgo) { - case ecHMAC_SHA256: - { - Hmac hmac; - ret = HmacSetKey(&hmac, SHA256, macKey, SHA256_DIGEST_SIZE); - if (ret != 0) - break; - ret = HmacUpdate(&hmac, out, msgSz); - if (ret != 0) - break; - ret = HmacUpdate(&hmac, ctx->macSalt, ctx->macSaltSz); - if (ret != 0) - break; - ret = HmacFinal(&hmac, out+msgSz); - } - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) - *outSz = msgSz + digestSz; - -#ifdef CYASSL_SMALL_STACK - XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(keys, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - - -/* ecc decrypt with shared secret run through kdf - ctx holds non default algos and inputs - return 0 on success */ -int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, - word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx) -{ - int ret; - word32 blockSz; - word32 digestSz; - ecEncCtx localCtx; -#ifdef CYASSL_SMALL_STACK - byte* sharedSecret; - byte* keys; -#else - byte sharedSecret[ECC_MAXSIZE]; /* 521 max size */ - byte keys[ECC_BUFSIZE]; /* max size */ -#endif - word32 sharedSz = ECC_MAXSIZE; - int keysLen; - int encKeySz; - int ivSz; - int offset = 0; /* in case using msg exchange */ - byte* encKey; - byte* encIv; - byte* macKey; - - if (privKey == NULL || pubKey == NULL || msg == NULL || out == NULL || - outSz == NULL) - return BAD_FUNC_ARG; - - if (ctx == NULL) { /* use defaults */ - ecc_ctx_init(&localCtx, 0); - ctx = &localCtx; - } - - ret = ecc_get_key_sizes(ctx, &encKeySz, &ivSz, &keysLen, &digestSz, - &blockSz); - if (ret != 0) - return ret; - - if (ctx->protocol == REQ_RESP_CLIENT) { - offset = keysLen; - keysLen *= 2; - - if (ctx->cliSt != ecCLI_SENT_REQ) - return BAD_ENC_STATE_E; - - ctx->cliSt = ecSRV_BAD_STATE; /* we're done no more ops allowed */ - } - else if (ctx->protocol == REQ_RESP_SERVER) { - if (ctx->srvSt != ecSRV_SALT_SET) - return BAD_ENC_STATE_E; - - ctx->srvSt = ecSRV_RECV_REQ; /* only do this once */ - } - - if (keysLen > ECC_BUFSIZE) /* keys size */ - return BUFFER_E; - - if ( ((msgSz-digestSz) % blockSz) != 0) - return BAD_PADDING_E; - - if (*outSz < (msgSz - digestSz)) - return BUFFER_E; - -#ifdef CYASSL_SMALL_STACK - sharedSecret = (byte*)XMALLOC(ECC_MAXSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sharedSecret == NULL) - return MEMORY_E; - - keys = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (keys == NULL) { - XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - ret = ecc_shared_secret(privKey, pubKey, sharedSecret, &sharedSz); - - if (ret == 0) { - switch (ctx->kdfAlgo) { - case ecHKDF_SHA256 : - ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt, - ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, - keys, keysLen); - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) { - encKey = keys + offset; - encIv = encKey + encKeySz; - macKey = encKey + encKeySz + ivSz; - - switch (ctx->macAlgo) { - case ecHMAC_SHA256: - { - byte verify[SHA256_DIGEST_SIZE]; - Hmac hmac; - ret = HmacSetKey(&hmac, SHA256, macKey, SHA256_DIGEST_SIZE); - if (ret != 0) - break; - ret = HmacUpdate(&hmac, msg, msgSz-digestSz); - if (ret != 0) - break; - ret = HmacUpdate(&hmac, ctx->macSalt, ctx->macSaltSz); - if (ret != 0) - break; - ret = HmacFinal(&hmac, verify); - if (ret != 0) - break; - if (memcmp(verify, msg + msgSz - digestSz, digestSz) != 0) - ret = -1; - } - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) { - switch (ctx->encAlgo) { - case ecAES_128_CBC: - { - Aes aes; - ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv, - AES_DECRYPTION); - if (ret != 0) - break; - ret = AesCbcDecrypt(&aes, out, msg, msgSz-digestSz); - } - break; - - default: - ret = BAD_FUNC_ARG; - break; - } - } - - if (ret == 0) - *outSz = msgSz - digestSz; - -#ifdef CYASSL_SMALL_STACK - XFREE(sharedSecret, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(keys, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - - -#endif /* HAVE_ECC_ENCRYPT */ - -#endif /* HAVE_ECC */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c b/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c deleted file mode 100644 index c8acf938..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/ecc_fp.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy ecc_fp.c for dist */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/error.c b/project1/cyassl-3.0.0/ctaocrypt/src/error.c deleted file mode 100644 index 3b629ae0..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/error.c +++ /dev/null @@ -1,365 +0,0 @@ -/* error.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */ - #pragma warning(disable: 4996) -#endif - - -void CTaoCryptErrorString(int error, char* buffer) -{ - const int max = CYASSL_MAX_ERROR_SZ; /* shorthand */ - -#ifdef NO_ERROR_STRINGS - - (void)error; - XSTRNCPY(buffer, "no support for error strings built in", max); - -#else - - switch (error) { - - case OPEN_RAN_E : - XSTRNCPY(buffer, "opening random device error", max); - break; - - case READ_RAN_E : - XSTRNCPY(buffer, "reading random device error", max); - break; - - case WINCRYPT_E : - XSTRNCPY(buffer, "windows crypt init error", max); - break; - - case CRYPTGEN_E : - XSTRNCPY(buffer, "windows crypt generation error", max); - break; - - case RAN_BLOCK_E : - XSTRNCPY(buffer, "random device read would block error", max); - break; - - case BAD_MUTEX_E : - XSTRNCPY(buffer, "Bad mutex, operation failed", max); - break; - - case MP_INIT_E : - XSTRNCPY(buffer, "mp_init error state", max); - break; - - case MP_READ_E : - XSTRNCPY(buffer, "mp_read error state", max); - break; - - case MP_EXPTMOD_E : - XSTRNCPY(buffer, "mp_exptmod error state", max); - break; - - case MP_TO_E : - XSTRNCPY(buffer, "mp_to_xxx error state, can't convert", max); - break; - - case MP_SUB_E : - XSTRNCPY(buffer, "mp_sub error state, can't subtract", max); - break; - - case MP_ADD_E : - XSTRNCPY(buffer, "mp_add error state, can't add", max); - break; - - case MP_MUL_E : - XSTRNCPY(buffer, "mp_mul error state, can't multiply", max); - break; - - case MP_MULMOD_E : - XSTRNCPY(buffer, "mp_mulmod error state, can't multiply mod", max); - break; - - case MP_MOD_E : - XSTRNCPY(buffer, "mp_mod error state, can't mod", max); - break; - - case MP_INVMOD_E : - XSTRNCPY(buffer, "mp_invmod error state, can't inv mod", max); - break; - - case MP_CMP_E : - XSTRNCPY(buffer, "mp_cmp error state", max); - break; - - case MP_ZERO_E : - XSTRNCPY(buffer, "mp zero result, not expected", max); - break; - - case MEMORY_E : - XSTRNCPY(buffer, "out of memory error", max); - break; - - case RSA_WRONG_TYPE_E : - XSTRNCPY(buffer, "RSA wrong block type for RSA function", max); - break; - - case RSA_BUFFER_E : - XSTRNCPY(buffer, "RSA buffer error, output too small or input too big", - max); - break; - - case BUFFER_E : - XSTRNCPY(buffer, "Buffer error, output too small or input too big",max); - break; - - case ALGO_ID_E : - XSTRNCPY(buffer, "Setting Cert AlogID error", max); - break; - - case PUBLIC_KEY_E : - XSTRNCPY(buffer, "Setting Cert Public Key error", max); - break; - - case DATE_E : - XSTRNCPY(buffer, "Setting Cert Date validity error", max); - break; - - case SUBJECT_E : - XSTRNCPY(buffer, "Setting Cert Subject name error", max); - break; - - case ISSUER_E : - XSTRNCPY(buffer, "Setting Cert Issuer name error", max); - break; - - case CA_TRUE_E : - XSTRNCPY(buffer, "Setting basic constraint CA true error", max); - break; - - case EXTENSIONS_E : - XSTRNCPY(buffer, "Setting extensions error", max); - break; - - case ASN_PARSE_E : - XSTRNCPY(buffer, "ASN parsing error, invalid input", max); - break; - - case ASN_VERSION_E : - XSTRNCPY(buffer, "ASN version error, invalid number", max); - break; - - case ASN_GETINT_E : - XSTRNCPY(buffer, "ASN get big int error, invalid data", max); - break; - - case ASN_RSA_KEY_E : - XSTRNCPY(buffer, "ASN key init error, invalid input", max); - break; - - case ASN_OBJECT_ID_E : - XSTRNCPY(buffer, "ASN object id error, invalid id", max); - break; - - case ASN_TAG_NULL_E : - XSTRNCPY(buffer, "ASN tag error, not null", max); - break; - - case ASN_EXPECT_0_E : - XSTRNCPY(buffer, "ASN expect error, not zero", max); - break; - - case ASN_BITSTR_E : - XSTRNCPY(buffer, "ASN bit string error, wrong id", max); - break; - - case ASN_UNKNOWN_OID_E : - XSTRNCPY(buffer, "ASN oid error, unknown sum id", max); - break; - - case ASN_DATE_SZ_E : - XSTRNCPY(buffer, "ASN date error, bad size", max); - break; - - case ASN_BEFORE_DATE_E : - XSTRNCPY(buffer, "ASN date error, current date before", max); - break; - - case ASN_AFTER_DATE_E : - XSTRNCPY(buffer, "ASN date error, current date after", max); - break; - - case ASN_SIG_OID_E : - XSTRNCPY(buffer, "ASN signature error, mismatched oid", max); - break; - - case ASN_TIME_E : - XSTRNCPY(buffer, "ASN time error, unkown time type", max); - break; - - case ASN_INPUT_E : - XSTRNCPY(buffer, "ASN input error, not enough data", max); - break; - - case ASN_SIG_CONFIRM_E : - XSTRNCPY(buffer, "ASN sig error, confirm failure", max); - break; - - case ASN_SIG_HASH_E : - XSTRNCPY(buffer, "ASN sig error, unsupported hash type", max); - break; - - case ASN_SIG_KEY_E : - XSTRNCPY(buffer, "ASN sig error, unsupported key type", max); - break; - - case ASN_DH_KEY_E : - XSTRNCPY(buffer, "ASN key init error, invalid input", max); - break; - - case ASN_NTRU_KEY_E : - XSTRNCPY(buffer, "ASN NTRU key decode error, invalid input", max); - break; - - case ASN_CRIT_EXT_E: - XSTRNCPY(buffer, "X.509 Critical extension ignored", max); - break; - - case ECC_BAD_ARG_E : - XSTRNCPY(buffer, "ECC input argument wrong type, invalid input", max); - break; - - case ASN_ECC_KEY_E : - XSTRNCPY(buffer, "ECC ASN1 bad key data, invalid input", max); - break; - - case ECC_CURVE_OID_E : - XSTRNCPY(buffer, "ECC curve sum OID unsupported, invalid input", max); - break; - - case BAD_FUNC_ARG : - XSTRNCPY(buffer, "Bad function argument", max); - break; - - case NOT_COMPILED_IN : - XSTRNCPY(buffer, "Feature not compiled in", max); - break; - - case UNICODE_SIZE_E : - XSTRNCPY(buffer, "Unicode password too big", max); - break; - - case NO_PASSWORD : - XSTRNCPY(buffer, "No password provided by user", max); - break; - - case ALT_NAME_E : - XSTRNCPY(buffer, "Alt Name problem, too big", max); - break; - - case AES_GCM_AUTH_E: - XSTRNCPY(buffer, "AES-GCM Authentication check fail", max); - break; - - case AES_CCM_AUTH_E: - XSTRNCPY(buffer, "AES-CCM Authentication check fail", max); - break; - - case CAVIUM_INIT_E: - XSTRNCPY(buffer, "Cavium Init type error", max); - break; - - case COMPRESS_INIT_E: - XSTRNCPY(buffer, "Compress Init error", max); - break; - - case COMPRESS_E: - XSTRNCPY(buffer, "Compress error", max); - break; - - case DECOMPRESS_INIT_E: - XSTRNCPY(buffer, "DeCompress Init error", max); - break; - - case DECOMPRESS_E: - XSTRNCPY(buffer, "DeCompress error", max); - break; - - case BAD_ALIGN_E: - XSTRNCPY(buffer, "Bad alignment error, no alloc help", max); - break; - - case ASN_NO_SIGNER_E : - XSTRNCPY(buffer, "ASN no signer error to confirm failure", max); - break; - - case ASN_CRL_CONFIRM_E : - XSTRNCPY(buffer, "ASN CRL sig error, confirm failure", max); - break; - - case ASN_CRL_NO_SIGNER_E : - XSTRNCPY(buffer, "ASN CRL no signer error to confirm failure", max); - break; - - case ASN_OCSP_CONFIRM_E : - XSTRNCPY(buffer, "ASN OCSP sig error, confirm failure", max); - break; - - case BAD_ENC_STATE_E: - XSTRNCPY(buffer, "Bad ecc encrypt state operation", max); - break; - - case BAD_PADDING_E: - XSTRNCPY(buffer, "Bad padding, message wrong length", max); - break; - - case REQ_ATTRIBUTE_E: - XSTRNCPY(buffer, "Setting cert request attributes error", max); - break; - - case PKCS7_OID_E: - XSTRNCPY(buffer, "PKCS#7 error: mismatched OID value", max); - break; - - case PKCS7_RECIP_E: - XSTRNCPY(buffer, "PKCS#7 error: no matching recipient found", max); - break; - - case FIPS_NOT_ALLOWED_E: - XSTRNCPY(buffer, "FIPS mode not allowed error", max); - break; - - case ASN_NAME_INVALID_E: - XSTRNCPY(buffer, "Name Constraint error", max); - break; - - default: - XSTRNCPY(buffer, "unknown error number", max); - - } - -#endif /* NO_ERROR_STRINGS */ - -} diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fips.c b/project1/cyassl-3.0.0/ctaocrypt/src/fips.c deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c b/project1/cyassl-3.0.0/ctaocrypt/src/fips_test.c deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i deleted file mode 100644 index f52cc087..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mont_small.i +++ /dev/null @@ -1,3860 +0,0 @@ -/* fp_mont_small.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SMALL_MONT_SET -/* computes x/R == x (mod N) via Montgomery Reduction */ -void fp_montgomery_reduce_small(fp_int *a, fp_int *m, fp_digit mp) -{ - fp_digit c[FP_SIZE], *_c, *tmpm, mu, cy; - int oldused, x, y, pa; - -#if defined(USE_MEMSET) - /* now zero the buff */ - memset(c, 0, sizeof c); -#endif - pa = m->used; - - /* copy the input */ - oldused = a->used; - for (x = 0; x < oldused; x++) { - c[x] = a->dp[x]; - } -#if !defined(USE_MEMSET) - for (; x < 2*pa+3; x++) { - c[x] = 0; - } -#endif - MONT_START; - - switch (pa) { - case 1: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; -#else - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 2: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 3: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 4: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 5: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 6: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 7: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 8: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 9: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 10: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 11: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 12: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 11; cy = 0; - LOOP_START; - _c = c + 11; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 13: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 11; cy = 0; - LOOP_START; - _c = c + 11; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 12; cy = 0; - LOOP_START; - _c = c + 12; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 14: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 11; cy = 0; - LOOP_START; - _c = c + 11; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 12; cy = 0; - LOOP_START; - _c = c + 12; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 13; cy = 0; - LOOP_START; - _c = c + 13; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 15: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 11; cy = 0; - LOOP_START; - _c = c + 11; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 12; cy = 0; - LOOP_START; - _c = c + 12; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 13; cy = 0; - LOOP_START; - _c = c + 13; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 14; cy = 0; - LOOP_START; - _c = c + 14; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - case 16: - x = 0; cy = 0; - LOOP_START; - _c = c + 0; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 1; cy = 0; - LOOP_START; - _c = c + 1; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 2; cy = 0; - LOOP_START; - _c = c + 2; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 3; cy = 0; - LOOP_START; - _c = c + 3; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 4; cy = 0; - LOOP_START; - _c = c + 4; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 5; cy = 0; - LOOP_START; - _c = c + 5; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 6; cy = 0; - LOOP_START; - _c = c + 6; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 7; cy = 0; - LOOP_START; - _c = c + 7; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 8; cy = 0; - LOOP_START; - _c = c + 8; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 9; cy = 0; - LOOP_START; - _c = c + 9; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 10; cy = 0; - LOOP_START; - _c = c + 10; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 11; cy = 0; - LOOP_START; - _c = c + 11; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 12; cy = 0; - LOOP_START; - _c = c + 12; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 13; cy = 0; - LOOP_START; - _c = c + 13; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 14; cy = 0; - LOOP_START; - _c = c + 14; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - x = 15; cy = 0; - LOOP_START; - _c = c + 15; - tmpm = m->dp; -#ifdef INNERMUL8 - INNERMUL8; _c += 8; tmpm += 8; - INNERMUL8; _c += 8; tmpm += 8; -#else - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; - INNERMUL; ++_c; -#endif - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - break; - } - /* now copy out */ - _c = c + pa; - tmpm = a->dp; - for (x = 0; x < pa+1; x++) { - *tmpm++ = *_c++; - } - - for (; x < oldused; x++) { - *tmpm++ = 0; - } - - MONT_FINI; - - a->used = pa+1; - fp_clamp(a); - - /* if A >= m then A = A - m */ - if (fp_cmp_mag (a, m) != FP_LT) { - s_fp_sub (a, m, a); - } -} - -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i deleted file mode 100644 index c40ee2ba..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_12.i +++ /dev/null @@ -1,130 +0,0 @@ -/* fp_mul_comba_12.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL12 -void fp_mul_comba12(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[24]; - - memcpy(at, A->dp, 12 * sizeof(fp_digit)); - memcpy(at+12, B->dp, 12 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[12]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); MULADD(at[11], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[10], at[23]); MULADD(at[11], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[11], at[23]); - COMBA_STORE(C->dp[22]); - COMBA_STORE2(C->dp[23]); - C->used = 24; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i deleted file mode 100644 index c9223707..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_17.i +++ /dev/null @@ -1,170 +0,0 @@ -/* fp_mul_comba_17.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL17 -void fp_mul_comba17(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[34]; - - memcpy(at, A->dp, 17 * sizeof(fp_digit)); - memcpy(at+17, B->dp, 17 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[17]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); MULADD(at[15], at[17]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); MULADD(at[15], at[18]); MULADD(at[16], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); MULADD(at[15], at[19]); MULADD(at[16], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); MULADD(at[16], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[15], at[33]); MULADD(at[16], at[32]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[16], at[33]); - COMBA_STORE(C->dp[32]); - COMBA_STORE2(C->dp[33]); - C->used = 34; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i deleted file mode 100644 index 22d342fa..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_20.i +++ /dev/null @@ -1,193 +0,0 @@ -/* fp_mul_comba_20.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef TFM_MUL20 -void fp_mul_comba20(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[40]; - - memcpy(at, A->dp, 20 * sizeof(fp_digit)); - memcpy(at+20, B->dp, 20 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[20]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]); MULADD(at[17], at[20]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]); MULADD(at[17], at[21]); MULADD(at[18], at[20]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]); MULADD(at[17], at[22]); MULADD(at[18], at[21]); MULADD(at[19], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); MULADD(at[17], at[23]); MULADD(at[18], at[22]); MULADD(at[19], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]); MULADD(at[18], at[23]); MULADD(at[19], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]); MULADD(at[19], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[18], at[39]); MULADD(at[19], at[38]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[19], at[39]); - COMBA_STORE(C->dp[38]); - COMBA_STORE2(C->dp[39]); - C->used = 40; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i deleted file mode 100644 index 18de6b81..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_24.i +++ /dev/null @@ -1,226 +0,0 @@ -/* fp_mul_comba_24.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL24 -void fp_mul_comba24(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[48]; - - memcpy(at, A->dp, 24 * sizeof(fp_digit)); - memcpy(at+24, B->dp, 24 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[24]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]); MULADD(at[20], at[24]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]); MULADD(at[20], at[25]); MULADD(at[21], at[24]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]); MULADD(at[20], at[26]); MULADD(at[21], at[25]); MULADD(at[22], at[24]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); MULADD(at[20], at[27]); MULADD(at[21], at[26]); MULADD(at[22], at[25]); MULADD(at[23], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]); MULADD(at[21], at[27]); MULADD(at[22], at[26]); MULADD(at[23], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]); MULADD(at[22], at[27]); MULADD(at[23], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]); MULADD(at[23], at[27]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); - COMBA_STORE(C->dp[38]); - /* 39 */ - COMBA_FORWARD; - MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); - COMBA_STORE(C->dp[39]); - /* 40 */ - COMBA_FORWARD; - MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); - COMBA_STORE(C->dp[40]); - /* 41 */ - COMBA_FORWARD; - MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); - COMBA_STORE(C->dp[41]); - /* 42 */ - COMBA_FORWARD; - MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); - COMBA_STORE(C->dp[42]); - /* 43 */ - COMBA_FORWARD; - MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); - COMBA_STORE(C->dp[43]); - /* 44 */ - COMBA_FORWARD; - MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); - COMBA_STORE(C->dp[44]); - /* 45 */ - COMBA_FORWARD; - MULADD(at[22], at[47]); MULADD(at[23], at[46]); - COMBA_STORE(C->dp[45]); - /* 46 */ - COMBA_FORWARD; - MULADD(at[23], at[47]); - COMBA_STORE(C->dp[46]); - COMBA_STORE2(C->dp[47]); - C->used = 48; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i deleted file mode 100644 index 8c8f9ae4..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_28.i +++ /dev/null @@ -1,258 +0,0 @@ -/* fp_mul_comba_28.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL28 -void fp_mul_comba28(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[56]; - - memcpy(at, A->dp, 28 * sizeof(fp_digit)); - memcpy(at+28, B->dp, 28 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[28]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]); MULADD(at[24], at[28]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]); MULADD(at[24], at[29]); MULADD(at[25], at[28]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]); MULADD(at[24], at[30]); MULADD(at[25], at[29]); MULADD(at[26], at[28]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); MULADD(at[24], at[31]); MULADD(at[25], at[30]); MULADD(at[26], at[29]); MULADD(at[27], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]); MULADD(at[25], at[31]); MULADD(at[26], at[30]); MULADD(at[27], at[29]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]); MULADD(at[26], at[31]); MULADD(at[27], at[30]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]); MULADD(at[27], at[31]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]); - COMBA_STORE(C->dp[38]); - /* 39 */ - COMBA_FORWARD; - MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]); - COMBA_STORE(C->dp[39]); - /* 40 */ - COMBA_FORWARD; - MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]); - COMBA_STORE(C->dp[40]); - /* 41 */ - COMBA_FORWARD; - MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]); - COMBA_STORE(C->dp[41]); - /* 42 */ - COMBA_FORWARD; - MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]); - COMBA_STORE(C->dp[42]); - /* 43 */ - COMBA_FORWARD; - MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]); - COMBA_STORE(C->dp[43]); - /* 44 */ - COMBA_FORWARD; - MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]); - COMBA_STORE(C->dp[44]); - /* 45 */ - COMBA_FORWARD; - MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]); - COMBA_STORE(C->dp[45]); - /* 46 */ - COMBA_FORWARD; - MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]); - COMBA_STORE(C->dp[46]); - /* 47 */ - COMBA_FORWARD; - MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); - COMBA_STORE(C->dp[47]); - /* 48 */ - COMBA_FORWARD; - MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); - COMBA_STORE(C->dp[48]); - /* 49 */ - COMBA_FORWARD; - MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); - COMBA_STORE(C->dp[49]); - /* 50 */ - COMBA_FORWARD; - MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); - COMBA_STORE(C->dp[50]); - /* 51 */ - COMBA_FORWARD; - MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); - COMBA_STORE(C->dp[51]); - /* 52 */ - COMBA_FORWARD; - MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); - COMBA_STORE(C->dp[52]); - /* 53 */ - COMBA_FORWARD; - MULADD(at[26], at[55]); MULADD(at[27], at[54]); - COMBA_STORE(C->dp[53]); - /* 54 */ - COMBA_FORWARD; - MULADD(at[27], at[55]); - COMBA_STORE(C->dp[54]); - COMBA_STORE2(C->dp[55]); - C->used = 56; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i deleted file mode 100644 index a0720f30..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_3.i +++ /dev/null @@ -1,58 +0,0 @@ -/* fp_mul_comba_3.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL3 -void fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[6]; - - memcpy(at, A->dp, 3 * sizeof(fp_digit)); - memcpy(at+3, B->dp, 3 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[3]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[4]); MULADD(at[1], at[3]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[1], at[5]); MULADD(at[2], at[4]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[2], at[5]); - COMBA_STORE(C->dp[4]); - COMBA_STORE2(C->dp[5]); - C->used = 6; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i deleted file mode 100644 index b1ddf1df..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_32.i +++ /dev/null @@ -1,304 +0,0 @@ -/* fp_mul_comba_32.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL32 -void fp_mul_comba32(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[64]; - int out_size; - - out_size = A->used + B->used; - memcpy(at, A->dp, 32 * sizeof(fp_digit)); - memcpy(at+32, B->dp, 32 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[32]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[33]); MULADD(at[1], at[32]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[0], at[56]); MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[0], at[57]); MULADD(at[1], at[56]); MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[0], at[58]); MULADD(at[1], at[57]); MULADD(at[2], at[56]); MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[0], at[59]); MULADD(at[1], at[58]); MULADD(at[2], at[57]); MULADD(at[3], at[56]); MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[0], at[60]); MULADD(at[1], at[59]); MULADD(at[2], at[58]); MULADD(at[3], at[57]); MULADD(at[4], at[56]); MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]); MULADD(at[28], at[32]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[0], at[61]); MULADD(at[1], at[60]); MULADD(at[2], at[59]); MULADD(at[3], at[58]); MULADD(at[4], at[57]); MULADD(at[5], at[56]); MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]); MULADD(at[28], at[33]); MULADD(at[29], at[32]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[0], at[62]); MULADD(at[1], at[61]); MULADD(at[2], at[60]); MULADD(at[3], at[59]); MULADD(at[4], at[58]); MULADD(at[5], at[57]); MULADD(at[6], at[56]); MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]); MULADD(at[28], at[34]); MULADD(at[29], at[33]); MULADD(at[30], at[32]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[0], at[63]); MULADD(at[1], at[62]); MULADD(at[2], at[61]); MULADD(at[3], at[60]); MULADD(at[4], at[59]); MULADD(at[5], at[58]); MULADD(at[6], at[57]); MULADD(at[7], at[56]); MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]); MULADD(at[28], at[35]); MULADD(at[29], at[34]); MULADD(at[30], at[33]); MULADD(at[31], at[32]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[1], at[63]); MULADD(at[2], at[62]); MULADD(at[3], at[61]); MULADD(at[4], at[60]); MULADD(at[5], at[59]); MULADD(at[6], at[58]); MULADD(at[7], at[57]); MULADD(at[8], at[56]); MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]); MULADD(at[28], at[36]); MULADD(at[29], at[35]); MULADD(at[30], at[34]); MULADD(at[31], at[33]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[2], at[63]); MULADD(at[3], at[62]); MULADD(at[4], at[61]); MULADD(at[5], at[60]); MULADD(at[6], at[59]); MULADD(at[7], at[58]); MULADD(at[8], at[57]); MULADD(at[9], at[56]); MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]); MULADD(at[28], at[37]); MULADD(at[29], at[36]); MULADD(at[30], at[35]); MULADD(at[31], at[34]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[3], at[63]); MULADD(at[4], at[62]); MULADD(at[5], at[61]); MULADD(at[6], at[60]); MULADD(at[7], at[59]); MULADD(at[8], at[58]); MULADD(at[9], at[57]); MULADD(at[10], at[56]); MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]); MULADD(at[28], at[38]); MULADD(at[29], at[37]); MULADD(at[30], at[36]); MULADD(at[31], at[35]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[4], at[63]); MULADD(at[5], at[62]); MULADD(at[6], at[61]); MULADD(at[7], at[60]); MULADD(at[8], at[59]); MULADD(at[9], at[58]); MULADD(at[10], at[57]); MULADD(at[11], at[56]); MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]); MULADD(at[28], at[39]); MULADD(at[29], at[38]); MULADD(at[30], at[37]); MULADD(at[31], at[36]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[5], at[63]); MULADD(at[6], at[62]); MULADD(at[7], at[61]); MULADD(at[8], at[60]); MULADD(at[9], at[59]); MULADD(at[10], at[58]); MULADD(at[11], at[57]); MULADD(at[12], at[56]); MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]); MULADD(at[28], at[40]); MULADD(at[29], at[39]); MULADD(at[30], at[38]); MULADD(at[31], at[37]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[6], at[63]); MULADD(at[7], at[62]); MULADD(at[8], at[61]); MULADD(at[9], at[60]); MULADD(at[10], at[59]); MULADD(at[11], at[58]); MULADD(at[12], at[57]); MULADD(at[13], at[56]); MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]); MULADD(at[28], at[41]); MULADD(at[29], at[40]); MULADD(at[30], at[39]); MULADD(at[31], at[38]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[7], at[63]); MULADD(at[8], at[62]); MULADD(at[9], at[61]); MULADD(at[10], at[60]); MULADD(at[11], at[59]); MULADD(at[12], at[58]); MULADD(at[13], at[57]); MULADD(at[14], at[56]); MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]); MULADD(at[28], at[42]); MULADD(at[29], at[41]); MULADD(at[30], at[40]); MULADD(at[31], at[39]); - COMBA_STORE(C->dp[38]); - - /* early out at 40 digits, 40*32==1280, or two 640 bit operands */ - if (out_size <= 40) { COMBA_STORE2(C->dp[39]); C->used = 40; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } - - /* 39 */ - COMBA_FORWARD; - MULADD(at[8], at[63]); MULADD(at[9], at[62]); MULADD(at[10], at[61]); MULADD(at[11], at[60]); MULADD(at[12], at[59]); MULADD(at[13], at[58]); MULADD(at[14], at[57]); MULADD(at[15], at[56]); MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]); MULADD(at[28], at[43]); MULADD(at[29], at[42]); MULADD(at[30], at[41]); MULADD(at[31], at[40]); - COMBA_STORE(C->dp[39]); - /* 40 */ - COMBA_FORWARD; - MULADD(at[9], at[63]); MULADD(at[10], at[62]); MULADD(at[11], at[61]); MULADD(at[12], at[60]); MULADD(at[13], at[59]); MULADD(at[14], at[58]); MULADD(at[15], at[57]); MULADD(at[16], at[56]); MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]); MULADD(at[28], at[44]); MULADD(at[29], at[43]); MULADD(at[30], at[42]); MULADD(at[31], at[41]); - COMBA_STORE(C->dp[40]); - /* 41 */ - COMBA_FORWARD; - MULADD(at[10], at[63]); MULADD(at[11], at[62]); MULADD(at[12], at[61]); MULADD(at[13], at[60]); MULADD(at[14], at[59]); MULADD(at[15], at[58]); MULADD(at[16], at[57]); MULADD(at[17], at[56]); MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]); MULADD(at[28], at[45]); MULADD(at[29], at[44]); MULADD(at[30], at[43]); MULADD(at[31], at[42]); - COMBA_STORE(C->dp[41]); - /* 42 */ - COMBA_FORWARD; - MULADD(at[11], at[63]); MULADD(at[12], at[62]); MULADD(at[13], at[61]); MULADD(at[14], at[60]); MULADD(at[15], at[59]); MULADD(at[16], at[58]); MULADD(at[17], at[57]); MULADD(at[18], at[56]); MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]); MULADD(at[28], at[46]); MULADD(at[29], at[45]); MULADD(at[30], at[44]); MULADD(at[31], at[43]); - COMBA_STORE(C->dp[42]); - /* 43 */ - COMBA_FORWARD; - MULADD(at[12], at[63]); MULADD(at[13], at[62]); MULADD(at[14], at[61]); MULADD(at[15], at[60]); MULADD(at[16], at[59]); MULADD(at[17], at[58]); MULADD(at[18], at[57]); MULADD(at[19], at[56]); MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); MULADD(at[28], at[47]); MULADD(at[29], at[46]); MULADD(at[30], at[45]); MULADD(at[31], at[44]); - COMBA_STORE(C->dp[43]); - /* 44 */ - COMBA_FORWARD; - MULADD(at[13], at[63]); MULADD(at[14], at[62]); MULADD(at[15], at[61]); MULADD(at[16], at[60]); MULADD(at[17], at[59]); MULADD(at[18], at[58]); MULADD(at[19], at[57]); MULADD(at[20], at[56]); MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); MULADD(at[28], at[48]); MULADD(at[29], at[47]); MULADD(at[30], at[46]); MULADD(at[31], at[45]); - COMBA_STORE(C->dp[44]); - /* 45 */ - COMBA_FORWARD; - MULADD(at[14], at[63]); MULADD(at[15], at[62]); MULADD(at[16], at[61]); MULADD(at[17], at[60]); MULADD(at[18], at[59]); MULADD(at[19], at[58]); MULADD(at[20], at[57]); MULADD(at[21], at[56]); MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); MULADD(at[28], at[49]); MULADD(at[29], at[48]); MULADD(at[30], at[47]); MULADD(at[31], at[46]); - COMBA_STORE(C->dp[45]); - /* 46 */ - COMBA_FORWARD; - MULADD(at[15], at[63]); MULADD(at[16], at[62]); MULADD(at[17], at[61]); MULADD(at[18], at[60]); MULADD(at[19], at[59]); MULADD(at[20], at[58]); MULADD(at[21], at[57]); MULADD(at[22], at[56]); MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); MULADD(at[28], at[50]); MULADD(at[29], at[49]); MULADD(at[30], at[48]); MULADD(at[31], at[47]); - COMBA_STORE(C->dp[46]); - - /* early out at 48 digits, 48*32==1536, or two 768 bit operands */ - if (out_size <= 48) { COMBA_STORE2(C->dp[47]); C->used = 48; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } - - /* 47 */ - COMBA_FORWARD; - MULADD(at[16], at[63]); MULADD(at[17], at[62]); MULADD(at[18], at[61]); MULADD(at[19], at[60]); MULADD(at[20], at[59]); MULADD(at[21], at[58]); MULADD(at[22], at[57]); MULADD(at[23], at[56]); MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); MULADD(at[28], at[51]); MULADD(at[29], at[50]); MULADD(at[30], at[49]); MULADD(at[31], at[48]); - COMBA_STORE(C->dp[47]); - /* 48 */ - COMBA_FORWARD; - MULADD(at[17], at[63]); MULADD(at[18], at[62]); MULADD(at[19], at[61]); MULADD(at[20], at[60]); MULADD(at[21], at[59]); MULADD(at[22], at[58]); MULADD(at[23], at[57]); MULADD(at[24], at[56]); MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); MULADD(at[28], at[52]); MULADD(at[29], at[51]); MULADD(at[30], at[50]); MULADD(at[31], at[49]); - COMBA_STORE(C->dp[48]); - /* 49 */ - COMBA_FORWARD; - MULADD(at[18], at[63]); MULADD(at[19], at[62]); MULADD(at[20], at[61]); MULADD(at[21], at[60]); MULADD(at[22], at[59]); MULADD(at[23], at[58]); MULADD(at[24], at[57]); MULADD(at[25], at[56]); MULADD(at[26], at[55]); MULADD(at[27], at[54]); MULADD(at[28], at[53]); MULADD(at[29], at[52]); MULADD(at[30], at[51]); MULADD(at[31], at[50]); - COMBA_STORE(C->dp[49]); - /* 50 */ - COMBA_FORWARD; - MULADD(at[19], at[63]); MULADD(at[20], at[62]); MULADD(at[21], at[61]); MULADD(at[22], at[60]); MULADD(at[23], at[59]); MULADD(at[24], at[58]); MULADD(at[25], at[57]); MULADD(at[26], at[56]); MULADD(at[27], at[55]); MULADD(at[28], at[54]); MULADD(at[29], at[53]); MULADD(at[30], at[52]); MULADD(at[31], at[51]); - COMBA_STORE(C->dp[50]); - /* 51 */ - COMBA_FORWARD; - MULADD(at[20], at[63]); MULADD(at[21], at[62]); MULADD(at[22], at[61]); MULADD(at[23], at[60]); MULADD(at[24], at[59]); MULADD(at[25], at[58]); MULADD(at[26], at[57]); MULADD(at[27], at[56]); MULADD(at[28], at[55]); MULADD(at[29], at[54]); MULADD(at[30], at[53]); MULADD(at[31], at[52]); - COMBA_STORE(C->dp[51]); - /* 52 */ - COMBA_FORWARD; - MULADD(at[21], at[63]); MULADD(at[22], at[62]); MULADD(at[23], at[61]); MULADD(at[24], at[60]); MULADD(at[25], at[59]); MULADD(at[26], at[58]); MULADD(at[27], at[57]); MULADD(at[28], at[56]); MULADD(at[29], at[55]); MULADD(at[30], at[54]); MULADD(at[31], at[53]); - COMBA_STORE(C->dp[52]); - /* 53 */ - COMBA_FORWARD; - MULADD(at[22], at[63]); MULADD(at[23], at[62]); MULADD(at[24], at[61]); MULADD(at[25], at[60]); MULADD(at[26], at[59]); MULADD(at[27], at[58]); MULADD(at[28], at[57]); MULADD(at[29], at[56]); MULADD(at[30], at[55]); MULADD(at[31], at[54]); - COMBA_STORE(C->dp[53]); - /* 54 */ - COMBA_FORWARD; - MULADD(at[23], at[63]); MULADD(at[24], at[62]); MULADD(at[25], at[61]); MULADD(at[26], at[60]); MULADD(at[27], at[59]); MULADD(at[28], at[58]); MULADD(at[29], at[57]); MULADD(at[30], at[56]); MULADD(at[31], at[55]); - COMBA_STORE(C->dp[54]); - - /* early out at 56 digits, 56*32==1792, or two 896 bit operands */ - if (out_size <= 56) { COMBA_STORE2(C->dp[55]); C->used = 56; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; } - - /* 55 */ - COMBA_FORWARD; - MULADD(at[24], at[63]); MULADD(at[25], at[62]); MULADD(at[26], at[61]); MULADD(at[27], at[60]); MULADD(at[28], at[59]); MULADD(at[29], at[58]); MULADD(at[30], at[57]); MULADD(at[31], at[56]); - COMBA_STORE(C->dp[55]); - /* 56 */ - COMBA_FORWARD; - MULADD(at[25], at[63]); MULADD(at[26], at[62]); MULADD(at[27], at[61]); MULADD(at[28], at[60]); MULADD(at[29], at[59]); MULADD(at[30], at[58]); MULADD(at[31], at[57]); - COMBA_STORE(C->dp[56]); - /* 57 */ - COMBA_FORWARD; - MULADD(at[26], at[63]); MULADD(at[27], at[62]); MULADD(at[28], at[61]); MULADD(at[29], at[60]); MULADD(at[30], at[59]); MULADD(at[31], at[58]); - COMBA_STORE(C->dp[57]); - /* 58 */ - COMBA_FORWARD; - MULADD(at[27], at[63]); MULADD(at[28], at[62]); MULADD(at[29], at[61]); MULADD(at[30], at[60]); MULADD(at[31], at[59]); - COMBA_STORE(C->dp[58]); - /* 59 */ - COMBA_FORWARD; - MULADD(at[28], at[63]); MULADD(at[29], at[62]); MULADD(at[30], at[61]); MULADD(at[31], at[60]); - COMBA_STORE(C->dp[59]); - /* 60 */ - COMBA_FORWARD; - MULADD(at[29], at[63]); MULADD(at[30], at[62]); MULADD(at[31], at[61]); - COMBA_STORE(C->dp[60]); - /* 61 */ - COMBA_FORWARD; - MULADD(at[30], at[63]); MULADD(at[31], at[62]); - COMBA_STORE(C->dp[61]); - /* 62 */ - COMBA_FORWARD; - MULADD(at[31], at[63]); - COMBA_STORE(C->dp[62]); - COMBA_STORE2(C->dp[63]); - C->used = 64; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i deleted file mode 100644 index a3bdd429..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_4.i +++ /dev/null @@ -1,66 +0,0 @@ -/* fp_mul_comba_4.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL4 -void fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[8]; - - memcpy(at, A->dp, 4 * sizeof(fp_digit)); - memcpy(at+4, B->dp, 4 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[4]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[5]); MULADD(at[1], at[4]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[2], at[7]); MULADD(at[3], at[6]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[3], at[7]); - COMBA_STORE(C->dp[6]); - COMBA_STORE2(C->dp[7]); - C->used = 8; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i deleted file mode 100644 index bb068583..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_48.i +++ /dev/null @@ -1,418 +0,0 @@ -/* fp_mul_comba_48.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL48 -void fp_mul_comba48(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[96]; - - memcpy(at, A->dp, 48 * sizeof(fp_digit)); - memcpy(at+48, B->dp, 48 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[48]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[49]); MULADD(at[1], at[48]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[56]); MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[57]); MULADD(at[1], at[56]); MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[58]); MULADD(at[1], at[57]); MULADD(at[2], at[56]); MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[59]); MULADD(at[1], at[58]); MULADD(at[2], at[57]); MULADD(at[3], at[56]); MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[60]); MULADD(at[1], at[59]); MULADD(at[2], at[58]); MULADD(at[3], at[57]); MULADD(at[4], at[56]); MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[61]); MULADD(at[1], at[60]); MULADD(at[2], at[59]); MULADD(at[3], at[58]); MULADD(at[4], at[57]); MULADD(at[5], at[56]); MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[62]); MULADD(at[1], at[61]); MULADD(at[2], at[60]); MULADD(at[3], at[59]); MULADD(at[4], at[58]); MULADD(at[5], at[57]); MULADD(at[6], at[56]); MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[63]); MULADD(at[1], at[62]); MULADD(at[2], at[61]); MULADD(at[3], at[60]); MULADD(at[4], at[59]); MULADD(at[5], at[58]); MULADD(at[6], at[57]); MULADD(at[7], at[56]); MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[64]); MULADD(at[1], at[63]); MULADD(at[2], at[62]); MULADD(at[3], at[61]); MULADD(at[4], at[60]); MULADD(at[5], at[59]); MULADD(at[6], at[58]); MULADD(at[7], at[57]); MULADD(at[8], at[56]); MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[65]); MULADD(at[1], at[64]); MULADD(at[2], at[63]); MULADD(at[3], at[62]); MULADD(at[4], at[61]); MULADD(at[5], at[60]); MULADD(at[6], at[59]); MULADD(at[7], at[58]); MULADD(at[8], at[57]); MULADD(at[9], at[56]); MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[66]); MULADD(at[1], at[65]); MULADD(at[2], at[64]); MULADD(at[3], at[63]); MULADD(at[4], at[62]); MULADD(at[5], at[61]); MULADD(at[6], at[60]); MULADD(at[7], at[59]); MULADD(at[8], at[58]); MULADD(at[9], at[57]); MULADD(at[10], at[56]); MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[67]); MULADD(at[1], at[66]); MULADD(at[2], at[65]); MULADD(at[3], at[64]); MULADD(at[4], at[63]); MULADD(at[5], at[62]); MULADD(at[6], at[61]); MULADD(at[7], at[60]); MULADD(at[8], at[59]); MULADD(at[9], at[58]); MULADD(at[10], at[57]); MULADD(at[11], at[56]); MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[0], at[68]); MULADD(at[1], at[67]); MULADD(at[2], at[66]); MULADD(at[3], at[65]); MULADD(at[4], at[64]); MULADD(at[5], at[63]); MULADD(at[6], at[62]); MULADD(at[7], at[61]); MULADD(at[8], at[60]); MULADD(at[9], at[59]); MULADD(at[10], at[58]); MULADD(at[11], at[57]); MULADD(at[12], at[56]); MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[0], at[69]); MULADD(at[1], at[68]); MULADD(at[2], at[67]); MULADD(at[3], at[66]); MULADD(at[4], at[65]); MULADD(at[5], at[64]); MULADD(at[6], at[63]); MULADD(at[7], at[62]); MULADD(at[8], at[61]); MULADD(at[9], at[60]); MULADD(at[10], at[59]); MULADD(at[11], at[58]); MULADD(at[12], at[57]); MULADD(at[13], at[56]); MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[0], at[70]); MULADD(at[1], at[69]); MULADD(at[2], at[68]); MULADD(at[3], at[67]); MULADD(at[4], at[66]); MULADD(at[5], at[65]); MULADD(at[6], at[64]); MULADD(at[7], at[63]); MULADD(at[8], at[62]); MULADD(at[9], at[61]); MULADD(at[10], at[60]); MULADD(at[11], at[59]); MULADD(at[12], at[58]); MULADD(at[13], at[57]); MULADD(at[14], at[56]); MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[0], at[71]); MULADD(at[1], at[70]); MULADD(at[2], at[69]); MULADD(at[3], at[68]); MULADD(at[4], at[67]); MULADD(at[5], at[66]); MULADD(at[6], at[65]); MULADD(at[7], at[64]); MULADD(at[8], at[63]); MULADD(at[9], at[62]); MULADD(at[10], at[61]); MULADD(at[11], at[60]); MULADD(at[12], at[59]); MULADD(at[13], at[58]); MULADD(at[14], at[57]); MULADD(at[15], at[56]); MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[0], at[72]); MULADD(at[1], at[71]); MULADD(at[2], at[70]); MULADD(at[3], at[69]); MULADD(at[4], at[68]); MULADD(at[5], at[67]); MULADD(at[6], at[66]); MULADD(at[7], at[65]); MULADD(at[8], at[64]); MULADD(at[9], at[63]); MULADD(at[10], at[62]); MULADD(at[11], at[61]); MULADD(at[12], at[60]); MULADD(at[13], at[59]); MULADD(at[14], at[58]); MULADD(at[15], at[57]); MULADD(at[16], at[56]); MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[0], at[73]); MULADD(at[1], at[72]); MULADD(at[2], at[71]); MULADD(at[3], at[70]); MULADD(at[4], at[69]); MULADD(at[5], at[68]); MULADD(at[6], at[67]); MULADD(at[7], at[66]); MULADD(at[8], at[65]); MULADD(at[9], at[64]); MULADD(at[10], at[63]); MULADD(at[11], at[62]); MULADD(at[12], at[61]); MULADD(at[13], at[60]); MULADD(at[14], at[59]); MULADD(at[15], at[58]); MULADD(at[16], at[57]); MULADD(at[17], at[56]); MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[0], at[74]); MULADD(at[1], at[73]); MULADD(at[2], at[72]); MULADD(at[3], at[71]); MULADD(at[4], at[70]); MULADD(at[5], at[69]); MULADD(at[6], at[68]); MULADD(at[7], at[67]); MULADD(at[8], at[66]); MULADD(at[9], at[65]); MULADD(at[10], at[64]); MULADD(at[11], at[63]); MULADD(at[12], at[62]); MULADD(at[13], at[61]); MULADD(at[14], at[60]); MULADD(at[15], at[59]); MULADD(at[16], at[58]); MULADD(at[17], at[57]); MULADD(at[18], at[56]); MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[0], at[75]); MULADD(at[1], at[74]); MULADD(at[2], at[73]); MULADD(at[3], at[72]); MULADD(at[4], at[71]); MULADD(at[5], at[70]); MULADD(at[6], at[69]); MULADD(at[7], at[68]); MULADD(at[8], at[67]); MULADD(at[9], at[66]); MULADD(at[10], at[65]); MULADD(at[11], at[64]); MULADD(at[12], at[63]); MULADD(at[13], at[62]); MULADD(at[14], at[61]); MULADD(at[15], at[60]); MULADD(at[16], at[59]); MULADD(at[17], at[58]); MULADD(at[18], at[57]); MULADD(at[19], at[56]); MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[0], at[76]); MULADD(at[1], at[75]); MULADD(at[2], at[74]); MULADD(at[3], at[73]); MULADD(at[4], at[72]); MULADD(at[5], at[71]); MULADD(at[6], at[70]); MULADD(at[7], at[69]); MULADD(at[8], at[68]); MULADD(at[9], at[67]); MULADD(at[10], at[66]); MULADD(at[11], at[65]); MULADD(at[12], at[64]); MULADD(at[13], at[63]); MULADD(at[14], at[62]); MULADD(at[15], at[61]); MULADD(at[16], at[60]); MULADD(at[17], at[59]); MULADD(at[18], at[58]); MULADD(at[19], at[57]); MULADD(at[20], at[56]); MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); MULADD(at[28], at[48]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[0], at[77]); MULADD(at[1], at[76]); MULADD(at[2], at[75]); MULADD(at[3], at[74]); MULADD(at[4], at[73]); MULADD(at[5], at[72]); MULADD(at[6], at[71]); MULADD(at[7], at[70]); MULADD(at[8], at[69]); MULADD(at[9], at[68]); MULADD(at[10], at[67]); MULADD(at[11], at[66]); MULADD(at[12], at[65]); MULADD(at[13], at[64]); MULADD(at[14], at[63]); MULADD(at[15], at[62]); MULADD(at[16], at[61]); MULADD(at[17], at[60]); MULADD(at[18], at[59]); MULADD(at[19], at[58]); MULADD(at[20], at[57]); MULADD(at[21], at[56]); MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); MULADD(at[28], at[49]); MULADD(at[29], at[48]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[0], at[78]); MULADD(at[1], at[77]); MULADD(at[2], at[76]); MULADD(at[3], at[75]); MULADD(at[4], at[74]); MULADD(at[5], at[73]); MULADD(at[6], at[72]); MULADD(at[7], at[71]); MULADD(at[8], at[70]); MULADD(at[9], at[69]); MULADD(at[10], at[68]); MULADD(at[11], at[67]); MULADD(at[12], at[66]); MULADD(at[13], at[65]); MULADD(at[14], at[64]); MULADD(at[15], at[63]); MULADD(at[16], at[62]); MULADD(at[17], at[61]); MULADD(at[18], at[60]); MULADD(at[19], at[59]); MULADD(at[20], at[58]); MULADD(at[21], at[57]); MULADD(at[22], at[56]); MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); MULADD(at[28], at[50]); MULADD(at[29], at[49]); MULADD(at[30], at[48]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[0], at[79]); MULADD(at[1], at[78]); MULADD(at[2], at[77]); MULADD(at[3], at[76]); MULADD(at[4], at[75]); MULADD(at[5], at[74]); MULADD(at[6], at[73]); MULADD(at[7], at[72]); MULADD(at[8], at[71]); MULADD(at[9], at[70]); MULADD(at[10], at[69]); MULADD(at[11], at[68]); MULADD(at[12], at[67]); MULADD(at[13], at[66]); MULADD(at[14], at[65]); MULADD(at[15], at[64]); MULADD(at[16], at[63]); MULADD(at[17], at[62]); MULADD(at[18], at[61]); MULADD(at[19], at[60]); MULADD(at[20], at[59]); MULADD(at[21], at[58]); MULADD(at[22], at[57]); MULADD(at[23], at[56]); MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); MULADD(at[28], at[51]); MULADD(at[29], at[50]); MULADD(at[30], at[49]); MULADD(at[31], at[48]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[0], at[80]); MULADD(at[1], at[79]); MULADD(at[2], at[78]); MULADD(at[3], at[77]); MULADD(at[4], at[76]); MULADD(at[5], at[75]); MULADD(at[6], at[74]); MULADD(at[7], at[73]); MULADD(at[8], at[72]); MULADD(at[9], at[71]); MULADD(at[10], at[70]); MULADD(at[11], at[69]); MULADD(at[12], at[68]); MULADD(at[13], at[67]); MULADD(at[14], at[66]); MULADD(at[15], at[65]); MULADD(at[16], at[64]); MULADD(at[17], at[63]); MULADD(at[18], at[62]); MULADD(at[19], at[61]); MULADD(at[20], at[60]); MULADD(at[21], at[59]); MULADD(at[22], at[58]); MULADD(at[23], at[57]); MULADD(at[24], at[56]); MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); MULADD(at[28], at[52]); MULADD(at[29], at[51]); MULADD(at[30], at[50]); MULADD(at[31], at[49]); MULADD(at[32], at[48]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[0], at[81]); MULADD(at[1], at[80]); MULADD(at[2], at[79]); MULADD(at[3], at[78]); MULADD(at[4], at[77]); MULADD(at[5], at[76]); MULADD(at[6], at[75]); MULADD(at[7], at[74]); MULADD(at[8], at[73]); MULADD(at[9], at[72]); MULADD(at[10], at[71]); MULADD(at[11], at[70]); MULADD(at[12], at[69]); MULADD(at[13], at[68]); MULADD(at[14], at[67]); MULADD(at[15], at[66]); MULADD(at[16], at[65]); MULADD(at[17], at[64]); MULADD(at[18], at[63]); MULADD(at[19], at[62]); MULADD(at[20], at[61]); MULADD(at[21], at[60]); MULADD(at[22], at[59]); MULADD(at[23], at[58]); MULADD(at[24], at[57]); MULADD(at[25], at[56]); MULADD(at[26], at[55]); MULADD(at[27], at[54]); MULADD(at[28], at[53]); MULADD(at[29], at[52]); MULADD(at[30], at[51]); MULADD(at[31], at[50]); MULADD(at[32], at[49]); MULADD(at[33], at[48]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[0], at[82]); MULADD(at[1], at[81]); MULADD(at[2], at[80]); MULADD(at[3], at[79]); MULADD(at[4], at[78]); MULADD(at[5], at[77]); MULADD(at[6], at[76]); MULADD(at[7], at[75]); MULADD(at[8], at[74]); MULADD(at[9], at[73]); MULADD(at[10], at[72]); MULADD(at[11], at[71]); MULADD(at[12], at[70]); MULADD(at[13], at[69]); MULADD(at[14], at[68]); MULADD(at[15], at[67]); MULADD(at[16], at[66]); MULADD(at[17], at[65]); MULADD(at[18], at[64]); MULADD(at[19], at[63]); MULADD(at[20], at[62]); MULADD(at[21], at[61]); MULADD(at[22], at[60]); MULADD(at[23], at[59]); MULADD(at[24], at[58]); MULADD(at[25], at[57]); MULADD(at[26], at[56]); MULADD(at[27], at[55]); MULADD(at[28], at[54]); MULADD(at[29], at[53]); MULADD(at[30], at[52]); MULADD(at[31], at[51]); MULADD(at[32], at[50]); MULADD(at[33], at[49]); MULADD(at[34], at[48]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[0], at[83]); MULADD(at[1], at[82]); MULADD(at[2], at[81]); MULADD(at[3], at[80]); MULADD(at[4], at[79]); MULADD(at[5], at[78]); MULADD(at[6], at[77]); MULADD(at[7], at[76]); MULADD(at[8], at[75]); MULADD(at[9], at[74]); MULADD(at[10], at[73]); MULADD(at[11], at[72]); MULADD(at[12], at[71]); MULADD(at[13], at[70]); MULADD(at[14], at[69]); MULADD(at[15], at[68]); MULADD(at[16], at[67]); MULADD(at[17], at[66]); MULADD(at[18], at[65]); MULADD(at[19], at[64]); MULADD(at[20], at[63]); MULADD(at[21], at[62]); MULADD(at[22], at[61]); MULADD(at[23], at[60]); MULADD(at[24], at[59]); MULADD(at[25], at[58]); MULADD(at[26], at[57]); MULADD(at[27], at[56]); MULADD(at[28], at[55]); MULADD(at[29], at[54]); MULADD(at[30], at[53]); MULADD(at[31], at[52]); MULADD(at[32], at[51]); MULADD(at[33], at[50]); MULADD(at[34], at[49]); MULADD(at[35], at[48]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[0], at[84]); MULADD(at[1], at[83]); MULADD(at[2], at[82]); MULADD(at[3], at[81]); MULADD(at[4], at[80]); MULADD(at[5], at[79]); MULADD(at[6], at[78]); MULADD(at[7], at[77]); MULADD(at[8], at[76]); MULADD(at[9], at[75]); MULADD(at[10], at[74]); MULADD(at[11], at[73]); MULADD(at[12], at[72]); MULADD(at[13], at[71]); MULADD(at[14], at[70]); MULADD(at[15], at[69]); MULADD(at[16], at[68]); MULADD(at[17], at[67]); MULADD(at[18], at[66]); MULADD(at[19], at[65]); MULADD(at[20], at[64]); MULADD(at[21], at[63]); MULADD(at[22], at[62]); MULADD(at[23], at[61]); MULADD(at[24], at[60]); MULADD(at[25], at[59]); MULADD(at[26], at[58]); MULADD(at[27], at[57]); MULADD(at[28], at[56]); MULADD(at[29], at[55]); MULADD(at[30], at[54]); MULADD(at[31], at[53]); MULADD(at[32], at[52]); MULADD(at[33], at[51]); MULADD(at[34], at[50]); MULADD(at[35], at[49]); MULADD(at[36], at[48]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[0], at[85]); MULADD(at[1], at[84]); MULADD(at[2], at[83]); MULADD(at[3], at[82]); MULADD(at[4], at[81]); MULADD(at[5], at[80]); MULADD(at[6], at[79]); MULADD(at[7], at[78]); MULADD(at[8], at[77]); MULADD(at[9], at[76]); MULADD(at[10], at[75]); MULADD(at[11], at[74]); MULADD(at[12], at[73]); MULADD(at[13], at[72]); MULADD(at[14], at[71]); MULADD(at[15], at[70]); MULADD(at[16], at[69]); MULADD(at[17], at[68]); MULADD(at[18], at[67]); MULADD(at[19], at[66]); MULADD(at[20], at[65]); MULADD(at[21], at[64]); MULADD(at[22], at[63]); MULADD(at[23], at[62]); MULADD(at[24], at[61]); MULADD(at[25], at[60]); MULADD(at[26], at[59]); MULADD(at[27], at[58]); MULADD(at[28], at[57]); MULADD(at[29], at[56]); MULADD(at[30], at[55]); MULADD(at[31], at[54]); MULADD(at[32], at[53]); MULADD(at[33], at[52]); MULADD(at[34], at[51]); MULADD(at[35], at[50]); MULADD(at[36], at[49]); MULADD(at[37], at[48]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[0], at[86]); MULADD(at[1], at[85]); MULADD(at[2], at[84]); MULADD(at[3], at[83]); MULADD(at[4], at[82]); MULADD(at[5], at[81]); MULADD(at[6], at[80]); MULADD(at[7], at[79]); MULADD(at[8], at[78]); MULADD(at[9], at[77]); MULADD(at[10], at[76]); MULADD(at[11], at[75]); MULADD(at[12], at[74]); MULADD(at[13], at[73]); MULADD(at[14], at[72]); MULADD(at[15], at[71]); MULADD(at[16], at[70]); MULADD(at[17], at[69]); MULADD(at[18], at[68]); MULADD(at[19], at[67]); MULADD(at[20], at[66]); MULADD(at[21], at[65]); MULADD(at[22], at[64]); MULADD(at[23], at[63]); MULADD(at[24], at[62]); MULADD(at[25], at[61]); MULADD(at[26], at[60]); MULADD(at[27], at[59]); MULADD(at[28], at[58]); MULADD(at[29], at[57]); MULADD(at[30], at[56]); MULADD(at[31], at[55]); MULADD(at[32], at[54]); MULADD(at[33], at[53]); MULADD(at[34], at[52]); MULADD(at[35], at[51]); MULADD(at[36], at[50]); MULADD(at[37], at[49]); MULADD(at[38], at[48]); - COMBA_STORE(C->dp[38]); - /* 39 */ - COMBA_FORWARD; - MULADD(at[0], at[87]); MULADD(at[1], at[86]); MULADD(at[2], at[85]); MULADD(at[3], at[84]); MULADD(at[4], at[83]); MULADD(at[5], at[82]); MULADD(at[6], at[81]); MULADD(at[7], at[80]); MULADD(at[8], at[79]); MULADD(at[9], at[78]); MULADD(at[10], at[77]); MULADD(at[11], at[76]); MULADD(at[12], at[75]); MULADD(at[13], at[74]); MULADD(at[14], at[73]); MULADD(at[15], at[72]); MULADD(at[16], at[71]); MULADD(at[17], at[70]); MULADD(at[18], at[69]); MULADD(at[19], at[68]); MULADD(at[20], at[67]); MULADD(at[21], at[66]); MULADD(at[22], at[65]); MULADD(at[23], at[64]); MULADD(at[24], at[63]); MULADD(at[25], at[62]); MULADD(at[26], at[61]); MULADD(at[27], at[60]); MULADD(at[28], at[59]); MULADD(at[29], at[58]); MULADD(at[30], at[57]); MULADD(at[31], at[56]); MULADD(at[32], at[55]); MULADD(at[33], at[54]); MULADD(at[34], at[53]); MULADD(at[35], at[52]); MULADD(at[36], at[51]); MULADD(at[37], at[50]); MULADD(at[38], at[49]); MULADD(at[39], at[48]); - COMBA_STORE(C->dp[39]); - /* 40 */ - COMBA_FORWARD; - MULADD(at[0], at[88]); MULADD(at[1], at[87]); MULADD(at[2], at[86]); MULADD(at[3], at[85]); MULADD(at[4], at[84]); MULADD(at[5], at[83]); MULADD(at[6], at[82]); MULADD(at[7], at[81]); MULADD(at[8], at[80]); MULADD(at[9], at[79]); MULADD(at[10], at[78]); MULADD(at[11], at[77]); MULADD(at[12], at[76]); MULADD(at[13], at[75]); MULADD(at[14], at[74]); MULADD(at[15], at[73]); MULADD(at[16], at[72]); MULADD(at[17], at[71]); MULADD(at[18], at[70]); MULADD(at[19], at[69]); MULADD(at[20], at[68]); MULADD(at[21], at[67]); MULADD(at[22], at[66]); MULADD(at[23], at[65]); MULADD(at[24], at[64]); MULADD(at[25], at[63]); MULADD(at[26], at[62]); MULADD(at[27], at[61]); MULADD(at[28], at[60]); MULADD(at[29], at[59]); MULADD(at[30], at[58]); MULADD(at[31], at[57]); MULADD(at[32], at[56]); MULADD(at[33], at[55]); MULADD(at[34], at[54]); MULADD(at[35], at[53]); MULADD(at[36], at[52]); MULADD(at[37], at[51]); MULADD(at[38], at[50]); MULADD(at[39], at[49]); MULADD(at[40], at[48]); - COMBA_STORE(C->dp[40]); - /* 41 */ - COMBA_FORWARD; - MULADD(at[0], at[89]); MULADD(at[1], at[88]); MULADD(at[2], at[87]); MULADD(at[3], at[86]); MULADD(at[4], at[85]); MULADD(at[5], at[84]); MULADD(at[6], at[83]); MULADD(at[7], at[82]); MULADD(at[8], at[81]); MULADD(at[9], at[80]); MULADD(at[10], at[79]); MULADD(at[11], at[78]); MULADD(at[12], at[77]); MULADD(at[13], at[76]); MULADD(at[14], at[75]); MULADD(at[15], at[74]); MULADD(at[16], at[73]); MULADD(at[17], at[72]); MULADD(at[18], at[71]); MULADD(at[19], at[70]); MULADD(at[20], at[69]); MULADD(at[21], at[68]); MULADD(at[22], at[67]); MULADD(at[23], at[66]); MULADD(at[24], at[65]); MULADD(at[25], at[64]); MULADD(at[26], at[63]); MULADD(at[27], at[62]); MULADD(at[28], at[61]); MULADD(at[29], at[60]); MULADD(at[30], at[59]); MULADD(at[31], at[58]); MULADD(at[32], at[57]); MULADD(at[33], at[56]); MULADD(at[34], at[55]); MULADD(at[35], at[54]); MULADD(at[36], at[53]); MULADD(at[37], at[52]); MULADD(at[38], at[51]); MULADD(at[39], at[50]); MULADD(at[40], at[49]); MULADD(at[41], at[48]); - COMBA_STORE(C->dp[41]); - /* 42 */ - COMBA_FORWARD; - MULADD(at[0], at[90]); MULADD(at[1], at[89]); MULADD(at[2], at[88]); MULADD(at[3], at[87]); MULADD(at[4], at[86]); MULADD(at[5], at[85]); MULADD(at[6], at[84]); MULADD(at[7], at[83]); MULADD(at[8], at[82]); MULADD(at[9], at[81]); MULADD(at[10], at[80]); MULADD(at[11], at[79]); MULADD(at[12], at[78]); MULADD(at[13], at[77]); MULADD(at[14], at[76]); MULADD(at[15], at[75]); MULADD(at[16], at[74]); MULADD(at[17], at[73]); MULADD(at[18], at[72]); MULADD(at[19], at[71]); MULADD(at[20], at[70]); MULADD(at[21], at[69]); MULADD(at[22], at[68]); MULADD(at[23], at[67]); MULADD(at[24], at[66]); MULADD(at[25], at[65]); MULADD(at[26], at[64]); MULADD(at[27], at[63]); MULADD(at[28], at[62]); MULADD(at[29], at[61]); MULADD(at[30], at[60]); MULADD(at[31], at[59]); MULADD(at[32], at[58]); MULADD(at[33], at[57]); MULADD(at[34], at[56]); MULADD(at[35], at[55]); MULADD(at[36], at[54]); MULADD(at[37], at[53]); MULADD(at[38], at[52]); MULADD(at[39], at[51]); MULADD(at[40], at[50]); MULADD(at[41], at[49]); MULADD(at[42], at[48]); - COMBA_STORE(C->dp[42]); - /* 43 */ - COMBA_FORWARD; - MULADD(at[0], at[91]); MULADD(at[1], at[90]); MULADD(at[2], at[89]); MULADD(at[3], at[88]); MULADD(at[4], at[87]); MULADD(at[5], at[86]); MULADD(at[6], at[85]); MULADD(at[7], at[84]); MULADD(at[8], at[83]); MULADD(at[9], at[82]); MULADD(at[10], at[81]); MULADD(at[11], at[80]); MULADD(at[12], at[79]); MULADD(at[13], at[78]); MULADD(at[14], at[77]); MULADD(at[15], at[76]); MULADD(at[16], at[75]); MULADD(at[17], at[74]); MULADD(at[18], at[73]); MULADD(at[19], at[72]); MULADD(at[20], at[71]); MULADD(at[21], at[70]); MULADD(at[22], at[69]); MULADD(at[23], at[68]); MULADD(at[24], at[67]); MULADD(at[25], at[66]); MULADD(at[26], at[65]); MULADD(at[27], at[64]); MULADD(at[28], at[63]); MULADD(at[29], at[62]); MULADD(at[30], at[61]); MULADD(at[31], at[60]); MULADD(at[32], at[59]); MULADD(at[33], at[58]); MULADD(at[34], at[57]); MULADD(at[35], at[56]); MULADD(at[36], at[55]); MULADD(at[37], at[54]); MULADD(at[38], at[53]); MULADD(at[39], at[52]); MULADD(at[40], at[51]); MULADD(at[41], at[50]); MULADD(at[42], at[49]); MULADD(at[43], at[48]); - COMBA_STORE(C->dp[43]); - /* 44 */ - COMBA_FORWARD; - MULADD(at[0], at[92]); MULADD(at[1], at[91]); MULADD(at[2], at[90]); MULADD(at[3], at[89]); MULADD(at[4], at[88]); MULADD(at[5], at[87]); MULADD(at[6], at[86]); MULADD(at[7], at[85]); MULADD(at[8], at[84]); MULADD(at[9], at[83]); MULADD(at[10], at[82]); MULADD(at[11], at[81]); MULADD(at[12], at[80]); MULADD(at[13], at[79]); MULADD(at[14], at[78]); MULADD(at[15], at[77]); MULADD(at[16], at[76]); MULADD(at[17], at[75]); MULADD(at[18], at[74]); MULADD(at[19], at[73]); MULADD(at[20], at[72]); MULADD(at[21], at[71]); MULADD(at[22], at[70]); MULADD(at[23], at[69]); MULADD(at[24], at[68]); MULADD(at[25], at[67]); MULADD(at[26], at[66]); MULADD(at[27], at[65]); MULADD(at[28], at[64]); MULADD(at[29], at[63]); MULADD(at[30], at[62]); MULADD(at[31], at[61]); MULADD(at[32], at[60]); MULADD(at[33], at[59]); MULADD(at[34], at[58]); MULADD(at[35], at[57]); MULADD(at[36], at[56]); MULADD(at[37], at[55]); MULADD(at[38], at[54]); MULADD(at[39], at[53]); MULADD(at[40], at[52]); MULADD(at[41], at[51]); MULADD(at[42], at[50]); MULADD(at[43], at[49]); MULADD(at[44], at[48]); - COMBA_STORE(C->dp[44]); - /* 45 */ - COMBA_FORWARD; - MULADD(at[0], at[93]); MULADD(at[1], at[92]); MULADD(at[2], at[91]); MULADD(at[3], at[90]); MULADD(at[4], at[89]); MULADD(at[5], at[88]); MULADD(at[6], at[87]); MULADD(at[7], at[86]); MULADD(at[8], at[85]); MULADD(at[9], at[84]); MULADD(at[10], at[83]); MULADD(at[11], at[82]); MULADD(at[12], at[81]); MULADD(at[13], at[80]); MULADD(at[14], at[79]); MULADD(at[15], at[78]); MULADD(at[16], at[77]); MULADD(at[17], at[76]); MULADD(at[18], at[75]); MULADD(at[19], at[74]); MULADD(at[20], at[73]); MULADD(at[21], at[72]); MULADD(at[22], at[71]); MULADD(at[23], at[70]); MULADD(at[24], at[69]); MULADD(at[25], at[68]); MULADD(at[26], at[67]); MULADD(at[27], at[66]); MULADD(at[28], at[65]); MULADD(at[29], at[64]); MULADD(at[30], at[63]); MULADD(at[31], at[62]); MULADD(at[32], at[61]); MULADD(at[33], at[60]); MULADD(at[34], at[59]); MULADD(at[35], at[58]); MULADD(at[36], at[57]); MULADD(at[37], at[56]); MULADD(at[38], at[55]); MULADD(at[39], at[54]); MULADD(at[40], at[53]); MULADD(at[41], at[52]); MULADD(at[42], at[51]); MULADD(at[43], at[50]); MULADD(at[44], at[49]); MULADD(at[45], at[48]); - COMBA_STORE(C->dp[45]); - /* 46 */ - COMBA_FORWARD; - MULADD(at[0], at[94]); MULADD(at[1], at[93]); MULADD(at[2], at[92]); MULADD(at[3], at[91]); MULADD(at[4], at[90]); MULADD(at[5], at[89]); MULADD(at[6], at[88]); MULADD(at[7], at[87]); MULADD(at[8], at[86]); MULADD(at[9], at[85]); MULADD(at[10], at[84]); MULADD(at[11], at[83]); MULADD(at[12], at[82]); MULADD(at[13], at[81]); MULADD(at[14], at[80]); MULADD(at[15], at[79]); MULADD(at[16], at[78]); MULADD(at[17], at[77]); MULADD(at[18], at[76]); MULADD(at[19], at[75]); MULADD(at[20], at[74]); MULADD(at[21], at[73]); MULADD(at[22], at[72]); MULADD(at[23], at[71]); MULADD(at[24], at[70]); MULADD(at[25], at[69]); MULADD(at[26], at[68]); MULADD(at[27], at[67]); MULADD(at[28], at[66]); MULADD(at[29], at[65]); MULADD(at[30], at[64]); MULADD(at[31], at[63]); MULADD(at[32], at[62]); MULADD(at[33], at[61]); MULADD(at[34], at[60]); MULADD(at[35], at[59]); MULADD(at[36], at[58]); MULADD(at[37], at[57]); MULADD(at[38], at[56]); MULADD(at[39], at[55]); MULADD(at[40], at[54]); MULADD(at[41], at[53]); MULADD(at[42], at[52]); MULADD(at[43], at[51]); MULADD(at[44], at[50]); MULADD(at[45], at[49]); MULADD(at[46], at[48]); - COMBA_STORE(C->dp[46]); - /* 47 */ - COMBA_FORWARD; - MULADD(at[0], at[95]); MULADD(at[1], at[94]); MULADD(at[2], at[93]); MULADD(at[3], at[92]); MULADD(at[4], at[91]); MULADD(at[5], at[90]); MULADD(at[6], at[89]); MULADD(at[7], at[88]); MULADD(at[8], at[87]); MULADD(at[9], at[86]); MULADD(at[10], at[85]); MULADD(at[11], at[84]); MULADD(at[12], at[83]); MULADD(at[13], at[82]); MULADD(at[14], at[81]); MULADD(at[15], at[80]); MULADD(at[16], at[79]); MULADD(at[17], at[78]); MULADD(at[18], at[77]); MULADD(at[19], at[76]); MULADD(at[20], at[75]); MULADD(at[21], at[74]); MULADD(at[22], at[73]); MULADD(at[23], at[72]); MULADD(at[24], at[71]); MULADD(at[25], at[70]); MULADD(at[26], at[69]); MULADD(at[27], at[68]); MULADD(at[28], at[67]); MULADD(at[29], at[66]); MULADD(at[30], at[65]); MULADD(at[31], at[64]); MULADD(at[32], at[63]); MULADD(at[33], at[62]); MULADD(at[34], at[61]); MULADD(at[35], at[60]); MULADD(at[36], at[59]); MULADD(at[37], at[58]); MULADD(at[38], at[57]); MULADD(at[39], at[56]); MULADD(at[40], at[55]); MULADD(at[41], at[54]); MULADD(at[42], at[53]); MULADD(at[43], at[52]); MULADD(at[44], at[51]); MULADD(at[45], at[50]); MULADD(at[46], at[49]); MULADD(at[47], at[48]); - COMBA_STORE(C->dp[47]); - /* 48 */ - COMBA_FORWARD; - MULADD(at[1], at[95]); MULADD(at[2], at[94]); MULADD(at[3], at[93]); MULADD(at[4], at[92]); MULADD(at[5], at[91]); MULADD(at[6], at[90]); MULADD(at[7], at[89]); MULADD(at[8], at[88]); MULADD(at[9], at[87]); MULADD(at[10], at[86]); MULADD(at[11], at[85]); MULADD(at[12], at[84]); MULADD(at[13], at[83]); MULADD(at[14], at[82]); MULADD(at[15], at[81]); MULADD(at[16], at[80]); MULADD(at[17], at[79]); MULADD(at[18], at[78]); MULADD(at[19], at[77]); MULADD(at[20], at[76]); MULADD(at[21], at[75]); MULADD(at[22], at[74]); MULADD(at[23], at[73]); MULADD(at[24], at[72]); MULADD(at[25], at[71]); MULADD(at[26], at[70]); MULADD(at[27], at[69]); MULADD(at[28], at[68]); MULADD(at[29], at[67]); MULADD(at[30], at[66]); MULADD(at[31], at[65]); MULADD(at[32], at[64]); MULADD(at[33], at[63]); MULADD(at[34], at[62]); MULADD(at[35], at[61]); MULADD(at[36], at[60]); MULADD(at[37], at[59]); MULADD(at[38], at[58]); MULADD(at[39], at[57]); MULADD(at[40], at[56]); MULADD(at[41], at[55]); MULADD(at[42], at[54]); MULADD(at[43], at[53]); MULADD(at[44], at[52]); MULADD(at[45], at[51]); MULADD(at[46], at[50]); MULADD(at[47], at[49]); - COMBA_STORE(C->dp[48]); - /* 49 */ - COMBA_FORWARD; - MULADD(at[2], at[95]); MULADD(at[3], at[94]); MULADD(at[4], at[93]); MULADD(at[5], at[92]); MULADD(at[6], at[91]); MULADD(at[7], at[90]); MULADD(at[8], at[89]); MULADD(at[9], at[88]); MULADD(at[10], at[87]); MULADD(at[11], at[86]); MULADD(at[12], at[85]); MULADD(at[13], at[84]); MULADD(at[14], at[83]); MULADD(at[15], at[82]); MULADD(at[16], at[81]); MULADD(at[17], at[80]); MULADD(at[18], at[79]); MULADD(at[19], at[78]); MULADD(at[20], at[77]); MULADD(at[21], at[76]); MULADD(at[22], at[75]); MULADD(at[23], at[74]); MULADD(at[24], at[73]); MULADD(at[25], at[72]); MULADD(at[26], at[71]); MULADD(at[27], at[70]); MULADD(at[28], at[69]); MULADD(at[29], at[68]); MULADD(at[30], at[67]); MULADD(at[31], at[66]); MULADD(at[32], at[65]); MULADD(at[33], at[64]); MULADD(at[34], at[63]); MULADD(at[35], at[62]); MULADD(at[36], at[61]); MULADD(at[37], at[60]); MULADD(at[38], at[59]); MULADD(at[39], at[58]); MULADD(at[40], at[57]); MULADD(at[41], at[56]); MULADD(at[42], at[55]); MULADD(at[43], at[54]); MULADD(at[44], at[53]); MULADD(at[45], at[52]); MULADD(at[46], at[51]); MULADD(at[47], at[50]); - COMBA_STORE(C->dp[49]); - /* 50 */ - COMBA_FORWARD; - MULADD(at[3], at[95]); MULADD(at[4], at[94]); MULADD(at[5], at[93]); MULADD(at[6], at[92]); MULADD(at[7], at[91]); MULADD(at[8], at[90]); MULADD(at[9], at[89]); MULADD(at[10], at[88]); MULADD(at[11], at[87]); MULADD(at[12], at[86]); MULADD(at[13], at[85]); MULADD(at[14], at[84]); MULADD(at[15], at[83]); MULADD(at[16], at[82]); MULADD(at[17], at[81]); MULADD(at[18], at[80]); MULADD(at[19], at[79]); MULADD(at[20], at[78]); MULADD(at[21], at[77]); MULADD(at[22], at[76]); MULADD(at[23], at[75]); MULADD(at[24], at[74]); MULADD(at[25], at[73]); MULADD(at[26], at[72]); MULADD(at[27], at[71]); MULADD(at[28], at[70]); MULADD(at[29], at[69]); MULADD(at[30], at[68]); MULADD(at[31], at[67]); MULADD(at[32], at[66]); MULADD(at[33], at[65]); MULADD(at[34], at[64]); MULADD(at[35], at[63]); MULADD(at[36], at[62]); MULADD(at[37], at[61]); MULADD(at[38], at[60]); MULADD(at[39], at[59]); MULADD(at[40], at[58]); MULADD(at[41], at[57]); MULADD(at[42], at[56]); MULADD(at[43], at[55]); MULADD(at[44], at[54]); MULADD(at[45], at[53]); MULADD(at[46], at[52]); MULADD(at[47], at[51]); - COMBA_STORE(C->dp[50]); - /* 51 */ - COMBA_FORWARD; - MULADD(at[4], at[95]); MULADD(at[5], at[94]); MULADD(at[6], at[93]); MULADD(at[7], at[92]); MULADD(at[8], at[91]); MULADD(at[9], at[90]); MULADD(at[10], at[89]); MULADD(at[11], at[88]); MULADD(at[12], at[87]); MULADD(at[13], at[86]); MULADD(at[14], at[85]); MULADD(at[15], at[84]); MULADD(at[16], at[83]); MULADD(at[17], at[82]); MULADD(at[18], at[81]); MULADD(at[19], at[80]); MULADD(at[20], at[79]); MULADD(at[21], at[78]); MULADD(at[22], at[77]); MULADD(at[23], at[76]); MULADD(at[24], at[75]); MULADD(at[25], at[74]); MULADD(at[26], at[73]); MULADD(at[27], at[72]); MULADD(at[28], at[71]); MULADD(at[29], at[70]); MULADD(at[30], at[69]); MULADD(at[31], at[68]); MULADD(at[32], at[67]); MULADD(at[33], at[66]); MULADD(at[34], at[65]); MULADD(at[35], at[64]); MULADD(at[36], at[63]); MULADD(at[37], at[62]); MULADD(at[38], at[61]); MULADD(at[39], at[60]); MULADD(at[40], at[59]); MULADD(at[41], at[58]); MULADD(at[42], at[57]); MULADD(at[43], at[56]); MULADD(at[44], at[55]); MULADD(at[45], at[54]); MULADD(at[46], at[53]); MULADD(at[47], at[52]); - COMBA_STORE(C->dp[51]); - /* 52 */ - COMBA_FORWARD; - MULADD(at[5], at[95]); MULADD(at[6], at[94]); MULADD(at[7], at[93]); MULADD(at[8], at[92]); MULADD(at[9], at[91]); MULADD(at[10], at[90]); MULADD(at[11], at[89]); MULADD(at[12], at[88]); MULADD(at[13], at[87]); MULADD(at[14], at[86]); MULADD(at[15], at[85]); MULADD(at[16], at[84]); MULADD(at[17], at[83]); MULADD(at[18], at[82]); MULADD(at[19], at[81]); MULADD(at[20], at[80]); MULADD(at[21], at[79]); MULADD(at[22], at[78]); MULADD(at[23], at[77]); MULADD(at[24], at[76]); MULADD(at[25], at[75]); MULADD(at[26], at[74]); MULADD(at[27], at[73]); MULADD(at[28], at[72]); MULADD(at[29], at[71]); MULADD(at[30], at[70]); MULADD(at[31], at[69]); MULADD(at[32], at[68]); MULADD(at[33], at[67]); MULADD(at[34], at[66]); MULADD(at[35], at[65]); MULADD(at[36], at[64]); MULADD(at[37], at[63]); MULADD(at[38], at[62]); MULADD(at[39], at[61]); MULADD(at[40], at[60]); MULADD(at[41], at[59]); MULADD(at[42], at[58]); MULADD(at[43], at[57]); MULADD(at[44], at[56]); MULADD(at[45], at[55]); MULADD(at[46], at[54]); MULADD(at[47], at[53]); - COMBA_STORE(C->dp[52]); - /* 53 */ - COMBA_FORWARD; - MULADD(at[6], at[95]); MULADD(at[7], at[94]); MULADD(at[8], at[93]); MULADD(at[9], at[92]); MULADD(at[10], at[91]); MULADD(at[11], at[90]); MULADD(at[12], at[89]); MULADD(at[13], at[88]); MULADD(at[14], at[87]); MULADD(at[15], at[86]); MULADD(at[16], at[85]); MULADD(at[17], at[84]); MULADD(at[18], at[83]); MULADD(at[19], at[82]); MULADD(at[20], at[81]); MULADD(at[21], at[80]); MULADD(at[22], at[79]); MULADD(at[23], at[78]); MULADD(at[24], at[77]); MULADD(at[25], at[76]); MULADD(at[26], at[75]); MULADD(at[27], at[74]); MULADD(at[28], at[73]); MULADD(at[29], at[72]); MULADD(at[30], at[71]); MULADD(at[31], at[70]); MULADD(at[32], at[69]); MULADD(at[33], at[68]); MULADD(at[34], at[67]); MULADD(at[35], at[66]); MULADD(at[36], at[65]); MULADD(at[37], at[64]); MULADD(at[38], at[63]); MULADD(at[39], at[62]); MULADD(at[40], at[61]); MULADD(at[41], at[60]); MULADD(at[42], at[59]); MULADD(at[43], at[58]); MULADD(at[44], at[57]); MULADD(at[45], at[56]); MULADD(at[46], at[55]); MULADD(at[47], at[54]); - COMBA_STORE(C->dp[53]); - /* 54 */ - COMBA_FORWARD; - MULADD(at[7], at[95]); MULADD(at[8], at[94]); MULADD(at[9], at[93]); MULADD(at[10], at[92]); MULADD(at[11], at[91]); MULADD(at[12], at[90]); MULADD(at[13], at[89]); MULADD(at[14], at[88]); MULADD(at[15], at[87]); MULADD(at[16], at[86]); MULADD(at[17], at[85]); MULADD(at[18], at[84]); MULADD(at[19], at[83]); MULADD(at[20], at[82]); MULADD(at[21], at[81]); MULADD(at[22], at[80]); MULADD(at[23], at[79]); MULADD(at[24], at[78]); MULADD(at[25], at[77]); MULADD(at[26], at[76]); MULADD(at[27], at[75]); MULADD(at[28], at[74]); MULADD(at[29], at[73]); MULADD(at[30], at[72]); MULADD(at[31], at[71]); MULADD(at[32], at[70]); MULADD(at[33], at[69]); MULADD(at[34], at[68]); MULADD(at[35], at[67]); MULADD(at[36], at[66]); MULADD(at[37], at[65]); MULADD(at[38], at[64]); MULADD(at[39], at[63]); MULADD(at[40], at[62]); MULADD(at[41], at[61]); MULADD(at[42], at[60]); MULADD(at[43], at[59]); MULADD(at[44], at[58]); MULADD(at[45], at[57]); MULADD(at[46], at[56]); MULADD(at[47], at[55]); - COMBA_STORE(C->dp[54]); - /* 55 */ - COMBA_FORWARD; - MULADD(at[8], at[95]); MULADD(at[9], at[94]); MULADD(at[10], at[93]); MULADD(at[11], at[92]); MULADD(at[12], at[91]); MULADD(at[13], at[90]); MULADD(at[14], at[89]); MULADD(at[15], at[88]); MULADD(at[16], at[87]); MULADD(at[17], at[86]); MULADD(at[18], at[85]); MULADD(at[19], at[84]); MULADD(at[20], at[83]); MULADD(at[21], at[82]); MULADD(at[22], at[81]); MULADD(at[23], at[80]); MULADD(at[24], at[79]); MULADD(at[25], at[78]); MULADD(at[26], at[77]); MULADD(at[27], at[76]); MULADD(at[28], at[75]); MULADD(at[29], at[74]); MULADD(at[30], at[73]); MULADD(at[31], at[72]); MULADD(at[32], at[71]); MULADD(at[33], at[70]); MULADD(at[34], at[69]); MULADD(at[35], at[68]); MULADD(at[36], at[67]); MULADD(at[37], at[66]); MULADD(at[38], at[65]); MULADD(at[39], at[64]); MULADD(at[40], at[63]); MULADD(at[41], at[62]); MULADD(at[42], at[61]); MULADD(at[43], at[60]); MULADD(at[44], at[59]); MULADD(at[45], at[58]); MULADD(at[46], at[57]); MULADD(at[47], at[56]); - COMBA_STORE(C->dp[55]); - /* 56 */ - COMBA_FORWARD; - MULADD(at[9], at[95]); MULADD(at[10], at[94]); MULADD(at[11], at[93]); MULADD(at[12], at[92]); MULADD(at[13], at[91]); MULADD(at[14], at[90]); MULADD(at[15], at[89]); MULADD(at[16], at[88]); MULADD(at[17], at[87]); MULADD(at[18], at[86]); MULADD(at[19], at[85]); MULADD(at[20], at[84]); MULADD(at[21], at[83]); MULADD(at[22], at[82]); MULADD(at[23], at[81]); MULADD(at[24], at[80]); MULADD(at[25], at[79]); MULADD(at[26], at[78]); MULADD(at[27], at[77]); MULADD(at[28], at[76]); MULADD(at[29], at[75]); MULADD(at[30], at[74]); MULADD(at[31], at[73]); MULADD(at[32], at[72]); MULADD(at[33], at[71]); MULADD(at[34], at[70]); MULADD(at[35], at[69]); MULADD(at[36], at[68]); MULADD(at[37], at[67]); MULADD(at[38], at[66]); MULADD(at[39], at[65]); MULADD(at[40], at[64]); MULADD(at[41], at[63]); MULADD(at[42], at[62]); MULADD(at[43], at[61]); MULADD(at[44], at[60]); MULADD(at[45], at[59]); MULADD(at[46], at[58]); MULADD(at[47], at[57]); - COMBA_STORE(C->dp[56]); - /* 57 */ - COMBA_FORWARD; - MULADD(at[10], at[95]); MULADD(at[11], at[94]); MULADD(at[12], at[93]); MULADD(at[13], at[92]); MULADD(at[14], at[91]); MULADD(at[15], at[90]); MULADD(at[16], at[89]); MULADD(at[17], at[88]); MULADD(at[18], at[87]); MULADD(at[19], at[86]); MULADD(at[20], at[85]); MULADD(at[21], at[84]); MULADD(at[22], at[83]); MULADD(at[23], at[82]); MULADD(at[24], at[81]); MULADD(at[25], at[80]); MULADD(at[26], at[79]); MULADD(at[27], at[78]); MULADD(at[28], at[77]); MULADD(at[29], at[76]); MULADD(at[30], at[75]); MULADD(at[31], at[74]); MULADD(at[32], at[73]); MULADD(at[33], at[72]); MULADD(at[34], at[71]); MULADD(at[35], at[70]); MULADD(at[36], at[69]); MULADD(at[37], at[68]); MULADD(at[38], at[67]); MULADD(at[39], at[66]); MULADD(at[40], at[65]); MULADD(at[41], at[64]); MULADD(at[42], at[63]); MULADD(at[43], at[62]); MULADD(at[44], at[61]); MULADD(at[45], at[60]); MULADD(at[46], at[59]); MULADD(at[47], at[58]); - COMBA_STORE(C->dp[57]); - /* 58 */ - COMBA_FORWARD; - MULADD(at[11], at[95]); MULADD(at[12], at[94]); MULADD(at[13], at[93]); MULADD(at[14], at[92]); MULADD(at[15], at[91]); MULADD(at[16], at[90]); MULADD(at[17], at[89]); MULADD(at[18], at[88]); MULADD(at[19], at[87]); MULADD(at[20], at[86]); MULADD(at[21], at[85]); MULADD(at[22], at[84]); MULADD(at[23], at[83]); MULADD(at[24], at[82]); MULADD(at[25], at[81]); MULADD(at[26], at[80]); MULADD(at[27], at[79]); MULADD(at[28], at[78]); MULADD(at[29], at[77]); MULADD(at[30], at[76]); MULADD(at[31], at[75]); MULADD(at[32], at[74]); MULADD(at[33], at[73]); MULADD(at[34], at[72]); MULADD(at[35], at[71]); MULADD(at[36], at[70]); MULADD(at[37], at[69]); MULADD(at[38], at[68]); MULADD(at[39], at[67]); MULADD(at[40], at[66]); MULADD(at[41], at[65]); MULADD(at[42], at[64]); MULADD(at[43], at[63]); MULADD(at[44], at[62]); MULADD(at[45], at[61]); MULADD(at[46], at[60]); MULADD(at[47], at[59]); - COMBA_STORE(C->dp[58]); - /* 59 */ - COMBA_FORWARD; - MULADD(at[12], at[95]); MULADD(at[13], at[94]); MULADD(at[14], at[93]); MULADD(at[15], at[92]); MULADD(at[16], at[91]); MULADD(at[17], at[90]); MULADD(at[18], at[89]); MULADD(at[19], at[88]); MULADD(at[20], at[87]); MULADD(at[21], at[86]); MULADD(at[22], at[85]); MULADD(at[23], at[84]); MULADD(at[24], at[83]); MULADD(at[25], at[82]); MULADD(at[26], at[81]); MULADD(at[27], at[80]); MULADD(at[28], at[79]); MULADD(at[29], at[78]); MULADD(at[30], at[77]); MULADD(at[31], at[76]); MULADD(at[32], at[75]); MULADD(at[33], at[74]); MULADD(at[34], at[73]); MULADD(at[35], at[72]); MULADD(at[36], at[71]); MULADD(at[37], at[70]); MULADD(at[38], at[69]); MULADD(at[39], at[68]); MULADD(at[40], at[67]); MULADD(at[41], at[66]); MULADD(at[42], at[65]); MULADD(at[43], at[64]); MULADD(at[44], at[63]); MULADD(at[45], at[62]); MULADD(at[46], at[61]); MULADD(at[47], at[60]); - COMBA_STORE(C->dp[59]); - /* 60 */ - COMBA_FORWARD; - MULADD(at[13], at[95]); MULADD(at[14], at[94]); MULADD(at[15], at[93]); MULADD(at[16], at[92]); MULADD(at[17], at[91]); MULADD(at[18], at[90]); MULADD(at[19], at[89]); MULADD(at[20], at[88]); MULADD(at[21], at[87]); MULADD(at[22], at[86]); MULADD(at[23], at[85]); MULADD(at[24], at[84]); MULADD(at[25], at[83]); MULADD(at[26], at[82]); MULADD(at[27], at[81]); MULADD(at[28], at[80]); MULADD(at[29], at[79]); MULADD(at[30], at[78]); MULADD(at[31], at[77]); MULADD(at[32], at[76]); MULADD(at[33], at[75]); MULADD(at[34], at[74]); MULADD(at[35], at[73]); MULADD(at[36], at[72]); MULADD(at[37], at[71]); MULADD(at[38], at[70]); MULADD(at[39], at[69]); MULADD(at[40], at[68]); MULADD(at[41], at[67]); MULADD(at[42], at[66]); MULADD(at[43], at[65]); MULADD(at[44], at[64]); MULADD(at[45], at[63]); MULADD(at[46], at[62]); MULADD(at[47], at[61]); - COMBA_STORE(C->dp[60]); - /* 61 */ - COMBA_FORWARD; - MULADD(at[14], at[95]); MULADD(at[15], at[94]); MULADD(at[16], at[93]); MULADD(at[17], at[92]); MULADD(at[18], at[91]); MULADD(at[19], at[90]); MULADD(at[20], at[89]); MULADD(at[21], at[88]); MULADD(at[22], at[87]); MULADD(at[23], at[86]); MULADD(at[24], at[85]); MULADD(at[25], at[84]); MULADD(at[26], at[83]); MULADD(at[27], at[82]); MULADD(at[28], at[81]); MULADD(at[29], at[80]); MULADD(at[30], at[79]); MULADD(at[31], at[78]); MULADD(at[32], at[77]); MULADD(at[33], at[76]); MULADD(at[34], at[75]); MULADD(at[35], at[74]); MULADD(at[36], at[73]); MULADD(at[37], at[72]); MULADD(at[38], at[71]); MULADD(at[39], at[70]); MULADD(at[40], at[69]); MULADD(at[41], at[68]); MULADD(at[42], at[67]); MULADD(at[43], at[66]); MULADD(at[44], at[65]); MULADD(at[45], at[64]); MULADD(at[46], at[63]); MULADD(at[47], at[62]); - COMBA_STORE(C->dp[61]); - /* 62 */ - COMBA_FORWARD; - MULADD(at[15], at[95]); MULADD(at[16], at[94]); MULADD(at[17], at[93]); MULADD(at[18], at[92]); MULADD(at[19], at[91]); MULADD(at[20], at[90]); MULADD(at[21], at[89]); MULADD(at[22], at[88]); MULADD(at[23], at[87]); MULADD(at[24], at[86]); MULADD(at[25], at[85]); MULADD(at[26], at[84]); MULADD(at[27], at[83]); MULADD(at[28], at[82]); MULADD(at[29], at[81]); MULADD(at[30], at[80]); MULADD(at[31], at[79]); MULADD(at[32], at[78]); MULADD(at[33], at[77]); MULADD(at[34], at[76]); MULADD(at[35], at[75]); MULADD(at[36], at[74]); MULADD(at[37], at[73]); MULADD(at[38], at[72]); MULADD(at[39], at[71]); MULADD(at[40], at[70]); MULADD(at[41], at[69]); MULADD(at[42], at[68]); MULADD(at[43], at[67]); MULADD(at[44], at[66]); MULADD(at[45], at[65]); MULADD(at[46], at[64]); MULADD(at[47], at[63]); - COMBA_STORE(C->dp[62]); - /* 63 */ - COMBA_FORWARD; - MULADD(at[16], at[95]); MULADD(at[17], at[94]); MULADD(at[18], at[93]); MULADD(at[19], at[92]); MULADD(at[20], at[91]); MULADD(at[21], at[90]); MULADD(at[22], at[89]); MULADD(at[23], at[88]); MULADD(at[24], at[87]); MULADD(at[25], at[86]); MULADD(at[26], at[85]); MULADD(at[27], at[84]); MULADD(at[28], at[83]); MULADD(at[29], at[82]); MULADD(at[30], at[81]); MULADD(at[31], at[80]); MULADD(at[32], at[79]); MULADD(at[33], at[78]); MULADD(at[34], at[77]); MULADD(at[35], at[76]); MULADD(at[36], at[75]); MULADD(at[37], at[74]); MULADD(at[38], at[73]); MULADD(at[39], at[72]); MULADD(at[40], at[71]); MULADD(at[41], at[70]); MULADD(at[42], at[69]); MULADD(at[43], at[68]); MULADD(at[44], at[67]); MULADD(at[45], at[66]); MULADD(at[46], at[65]); MULADD(at[47], at[64]); - COMBA_STORE(C->dp[63]); - /* 64 */ - COMBA_FORWARD; - MULADD(at[17], at[95]); MULADD(at[18], at[94]); MULADD(at[19], at[93]); MULADD(at[20], at[92]); MULADD(at[21], at[91]); MULADD(at[22], at[90]); MULADD(at[23], at[89]); MULADD(at[24], at[88]); MULADD(at[25], at[87]); MULADD(at[26], at[86]); MULADD(at[27], at[85]); MULADD(at[28], at[84]); MULADD(at[29], at[83]); MULADD(at[30], at[82]); MULADD(at[31], at[81]); MULADD(at[32], at[80]); MULADD(at[33], at[79]); MULADD(at[34], at[78]); MULADD(at[35], at[77]); MULADD(at[36], at[76]); MULADD(at[37], at[75]); MULADD(at[38], at[74]); MULADD(at[39], at[73]); MULADD(at[40], at[72]); MULADD(at[41], at[71]); MULADD(at[42], at[70]); MULADD(at[43], at[69]); MULADD(at[44], at[68]); MULADD(at[45], at[67]); MULADD(at[46], at[66]); MULADD(at[47], at[65]); - COMBA_STORE(C->dp[64]); - /* 65 */ - COMBA_FORWARD; - MULADD(at[18], at[95]); MULADD(at[19], at[94]); MULADD(at[20], at[93]); MULADD(at[21], at[92]); MULADD(at[22], at[91]); MULADD(at[23], at[90]); MULADD(at[24], at[89]); MULADD(at[25], at[88]); MULADD(at[26], at[87]); MULADD(at[27], at[86]); MULADD(at[28], at[85]); MULADD(at[29], at[84]); MULADD(at[30], at[83]); MULADD(at[31], at[82]); MULADD(at[32], at[81]); MULADD(at[33], at[80]); MULADD(at[34], at[79]); MULADD(at[35], at[78]); MULADD(at[36], at[77]); MULADD(at[37], at[76]); MULADD(at[38], at[75]); MULADD(at[39], at[74]); MULADD(at[40], at[73]); MULADD(at[41], at[72]); MULADD(at[42], at[71]); MULADD(at[43], at[70]); MULADD(at[44], at[69]); MULADD(at[45], at[68]); MULADD(at[46], at[67]); MULADD(at[47], at[66]); - COMBA_STORE(C->dp[65]); - /* 66 */ - COMBA_FORWARD; - MULADD(at[19], at[95]); MULADD(at[20], at[94]); MULADD(at[21], at[93]); MULADD(at[22], at[92]); MULADD(at[23], at[91]); MULADD(at[24], at[90]); MULADD(at[25], at[89]); MULADD(at[26], at[88]); MULADD(at[27], at[87]); MULADD(at[28], at[86]); MULADD(at[29], at[85]); MULADD(at[30], at[84]); MULADD(at[31], at[83]); MULADD(at[32], at[82]); MULADD(at[33], at[81]); MULADD(at[34], at[80]); MULADD(at[35], at[79]); MULADD(at[36], at[78]); MULADD(at[37], at[77]); MULADD(at[38], at[76]); MULADD(at[39], at[75]); MULADD(at[40], at[74]); MULADD(at[41], at[73]); MULADD(at[42], at[72]); MULADD(at[43], at[71]); MULADD(at[44], at[70]); MULADD(at[45], at[69]); MULADD(at[46], at[68]); MULADD(at[47], at[67]); - COMBA_STORE(C->dp[66]); - /* 67 */ - COMBA_FORWARD; - MULADD(at[20], at[95]); MULADD(at[21], at[94]); MULADD(at[22], at[93]); MULADD(at[23], at[92]); MULADD(at[24], at[91]); MULADD(at[25], at[90]); MULADD(at[26], at[89]); MULADD(at[27], at[88]); MULADD(at[28], at[87]); MULADD(at[29], at[86]); MULADD(at[30], at[85]); MULADD(at[31], at[84]); MULADD(at[32], at[83]); MULADD(at[33], at[82]); MULADD(at[34], at[81]); MULADD(at[35], at[80]); MULADD(at[36], at[79]); MULADD(at[37], at[78]); MULADD(at[38], at[77]); MULADD(at[39], at[76]); MULADD(at[40], at[75]); MULADD(at[41], at[74]); MULADD(at[42], at[73]); MULADD(at[43], at[72]); MULADD(at[44], at[71]); MULADD(at[45], at[70]); MULADD(at[46], at[69]); MULADD(at[47], at[68]); - COMBA_STORE(C->dp[67]); - /* 68 */ - COMBA_FORWARD; - MULADD(at[21], at[95]); MULADD(at[22], at[94]); MULADD(at[23], at[93]); MULADD(at[24], at[92]); MULADD(at[25], at[91]); MULADD(at[26], at[90]); MULADD(at[27], at[89]); MULADD(at[28], at[88]); MULADD(at[29], at[87]); MULADD(at[30], at[86]); MULADD(at[31], at[85]); MULADD(at[32], at[84]); MULADD(at[33], at[83]); MULADD(at[34], at[82]); MULADD(at[35], at[81]); MULADD(at[36], at[80]); MULADD(at[37], at[79]); MULADD(at[38], at[78]); MULADD(at[39], at[77]); MULADD(at[40], at[76]); MULADD(at[41], at[75]); MULADD(at[42], at[74]); MULADD(at[43], at[73]); MULADD(at[44], at[72]); MULADD(at[45], at[71]); MULADD(at[46], at[70]); MULADD(at[47], at[69]); - COMBA_STORE(C->dp[68]); - /* 69 */ - COMBA_FORWARD; - MULADD(at[22], at[95]); MULADD(at[23], at[94]); MULADD(at[24], at[93]); MULADD(at[25], at[92]); MULADD(at[26], at[91]); MULADD(at[27], at[90]); MULADD(at[28], at[89]); MULADD(at[29], at[88]); MULADD(at[30], at[87]); MULADD(at[31], at[86]); MULADD(at[32], at[85]); MULADD(at[33], at[84]); MULADD(at[34], at[83]); MULADD(at[35], at[82]); MULADD(at[36], at[81]); MULADD(at[37], at[80]); MULADD(at[38], at[79]); MULADD(at[39], at[78]); MULADD(at[40], at[77]); MULADD(at[41], at[76]); MULADD(at[42], at[75]); MULADD(at[43], at[74]); MULADD(at[44], at[73]); MULADD(at[45], at[72]); MULADD(at[46], at[71]); MULADD(at[47], at[70]); - COMBA_STORE(C->dp[69]); - /* 70 */ - COMBA_FORWARD; - MULADD(at[23], at[95]); MULADD(at[24], at[94]); MULADD(at[25], at[93]); MULADD(at[26], at[92]); MULADD(at[27], at[91]); MULADD(at[28], at[90]); MULADD(at[29], at[89]); MULADD(at[30], at[88]); MULADD(at[31], at[87]); MULADD(at[32], at[86]); MULADD(at[33], at[85]); MULADD(at[34], at[84]); MULADD(at[35], at[83]); MULADD(at[36], at[82]); MULADD(at[37], at[81]); MULADD(at[38], at[80]); MULADD(at[39], at[79]); MULADD(at[40], at[78]); MULADD(at[41], at[77]); MULADD(at[42], at[76]); MULADD(at[43], at[75]); MULADD(at[44], at[74]); MULADD(at[45], at[73]); MULADD(at[46], at[72]); MULADD(at[47], at[71]); - COMBA_STORE(C->dp[70]); - /* 71 */ - COMBA_FORWARD; - MULADD(at[24], at[95]); MULADD(at[25], at[94]); MULADD(at[26], at[93]); MULADD(at[27], at[92]); MULADD(at[28], at[91]); MULADD(at[29], at[90]); MULADD(at[30], at[89]); MULADD(at[31], at[88]); MULADD(at[32], at[87]); MULADD(at[33], at[86]); MULADD(at[34], at[85]); MULADD(at[35], at[84]); MULADD(at[36], at[83]); MULADD(at[37], at[82]); MULADD(at[38], at[81]); MULADD(at[39], at[80]); MULADD(at[40], at[79]); MULADD(at[41], at[78]); MULADD(at[42], at[77]); MULADD(at[43], at[76]); MULADD(at[44], at[75]); MULADD(at[45], at[74]); MULADD(at[46], at[73]); MULADD(at[47], at[72]); - COMBA_STORE(C->dp[71]); - /* 72 */ - COMBA_FORWARD; - MULADD(at[25], at[95]); MULADD(at[26], at[94]); MULADD(at[27], at[93]); MULADD(at[28], at[92]); MULADD(at[29], at[91]); MULADD(at[30], at[90]); MULADD(at[31], at[89]); MULADD(at[32], at[88]); MULADD(at[33], at[87]); MULADD(at[34], at[86]); MULADD(at[35], at[85]); MULADD(at[36], at[84]); MULADD(at[37], at[83]); MULADD(at[38], at[82]); MULADD(at[39], at[81]); MULADD(at[40], at[80]); MULADD(at[41], at[79]); MULADD(at[42], at[78]); MULADD(at[43], at[77]); MULADD(at[44], at[76]); MULADD(at[45], at[75]); MULADD(at[46], at[74]); MULADD(at[47], at[73]); - COMBA_STORE(C->dp[72]); - /* 73 */ - COMBA_FORWARD; - MULADD(at[26], at[95]); MULADD(at[27], at[94]); MULADD(at[28], at[93]); MULADD(at[29], at[92]); MULADD(at[30], at[91]); MULADD(at[31], at[90]); MULADD(at[32], at[89]); MULADD(at[33], at[88]); MULADD(at[34], at[87]); MULADD(at[35], at[86]); MULADD(at[36], at[85]); MULADD(at[37], at[84]); MULADD(at[38], at[83]); MULADD(at[39], at[82]); MULADD(at[40], at[81]); MULADD(at[41], at[80]); MULADD(at[42], at[79]); MULADD(at[43], at[78]); MULADD(at[44], at[77]); MULADD(at[45], at[76]); MULADD(at[46], at[75]); MULADD(at[47], at[74]); - COMBA_STORE(C->dp[73]); - /* 74 */ - COMBA_FORWARD; - MULADD(at[27], at[95]); MULADD(at[28], at[94]); MULADD(at[29], at[93]); MULADD(at[30], at[92]); MULADD(at[31], at[91]); MULADD(at[32], at[90]); MULADD(at[33], at[89]); MULADD(at[34], at[88]); MULADD(at[35], at[87]); MULADD(at[36], at[86]); MULADD(at[37], at[85]); MULADD(at[38], at[84]); MULADD(at[39], at[83]); MULADD(at[40], at[82]); MULADD(at[41], at[81]); MULADD(at[42], at[80]); MULADD(at[43], at[79]); MULADD(at[44], at[78]); MULADD(at[45], at[77]); MULADD(at[46], at[76]); MULADD(at[47], at[75]); - COMBA_STORE(C->dp[74]); - /* 75 */ - COMBA_FORWARD; - MULADD(at[28], at[95]); MULADD(at[29], at[94]); MULADD(at[30], at[93]); MULADD(at[31], at[92]); MULADD(at[32], at[91]); MULADD(at[33], at[90]); MULADD(at[34], at[89]); MULADD(at[35], at[88]); MULADD(at[36], at[87]); MULADD(at[37], at[86]); MULADD(at[38], at[85]); MULADD(at[39], at[84]); MULADD(at[40], at[83]); MULADD(at[41], at[82]); MULADD(at[42], at[81]); MULADD(at[43], at[80]); MULADD(at[44], at[79]); MULADD(at[45], at[78]); MULADD(at[46], at[77]); MULADD(at[47], at[76]); - COMBA_STORE(C->dp[75]); - /* 76 */ - COMBA_FORWARD; - MULADD(at[29], at[95]); MULADD(at[30], at[94]); MULADD(at[31], at[93]); MULADD(at[32], at[92]); MULADD(at[33], at[91]); MULADD(at[34], at[90]); MULADD(at[35], at[89]); MULADD(at[36], at[88]); MULADD(at[37], at[87]); MULADD(at[38], at[86]); MULADD(at[39], at[85]); MULADD(at[40], at[84]); MULADD(at[41], at[83]); MULADD(at[42], at[82]); MULADD(at[43], at[81]); MULADD(at[44], at[80]); MULADD(at[45], at[79]); MULADD(at[46], at[78]); MULADD(at[47], at[77]); - COMBA_STORE(C->dp[76]); - /* 77 */ - COMBA_FORWARD; - MULADD(at[30], at[95]); MULADD(at[31], at[94]); MULADD(at[32], at[93]); MULADD(at[33], at[92]); MULADD(at[34], at[91]); MULADD(at[35], at[90]); MULADD(at[36], at[89]); MULADD(at[37], at[88]); MULADD(at[38], at[87]); MULADD(at[39], at[86]); MULADD(at[40], at[85]); MULADD(at[41], at[84]); MULADD(at[42], at[83]); MULADD(at[43], at[82]); MULADD(at[44], at[81]); MULADD(at[45], at[80]); MULADD(at[46], at[79]); MULADD(at[47], at[78]); - COMBA_STORE(C->dp[77]); - /* 78 */ - COMBA_FORWARD; - MULADD(at[31], at[95]); MULADD(at[32], at[94]); MULADD(at[33], at[93]); MULADD(at[34], at[92]); MULADD(at[35], at[91]); MULADD(at[36], at[90]); MULADD(at[37], at[89]); MULADD(at[38], at[88]); MULADD(at[39], at[87]); MULADD(at[40], at[86]); MULADD(at[41], at[85]); MULADD(at[42], at[84]); MULADD(at[43], at[83]); MULADD(at[44], at[82]); MULADD(at[45], at[81]); MULADD(at[46], at[80]); MULADD(at[47], at[79]); - COMBA_STORE(C->dp[78]); - /* 79 */ - COMBA_FORWARD; - MULADD(at[32], at[95]); MULADD(at[33], at[94]); MULADD(at[34], at[93]); MULADD(at[35], at[92]); MULADD(at[36], at[91]); MULADD(at[37], at[90]); MULADD(at[38], at[89]); MULADD(at[39], at[88]); MULADD(at[40], at[87]); MULADD(at[41], at[86]); MULADD(at[42], at[85]); MULADD(at[43], at[84]); MULADD(at[44], at[83]); MULADD(at[45], at[82]); MULADD(at[46], at[81]); MULADD(at[47], at[80]); - COMBA_STORE(C->dp[79]); - /* 80 */ - COMBA_FORWARD; - MULADD(at[33], at[95]); MULADD(at[34], at[94]); MULADD(at[35], at[93]); MULADD(at[36], at[92]); MULADD(at[37], at[91]); MULADD(at[38], at[90]); MULADD(at[39], at[89]); MULADD(at[40], at[88]); MULADD(at[41], at[87]); MULADD(at[42], at[86]); MULADD(at[43], at[85]); MULADD(at[44], at[84]); MULADD(at[45], at[83]); MULADD(at[46], at[82]); MULADD(at[47], at[81]); - COMBA_STORE(C->dp[80]); - /* 81 */ - COMBA_FORWARD; - MULADD(at[34], at[95]); MULADD(at[35], at[94]); MULADD(at[36], at[93]); MULADD(at[37], at[92]); MULADD(at[38], at[91]); MULADD(at[39], at[90]); MULADD(at[40], at[89]); MULADD(at[41], at[88]); MULADD(at[42], at[87]); MULADD(at[43], at[86]); MULADD(at[44], at[85]); MULADD(at[45], at[84]); MULADD(at[46], at[83]); MULADD(at[47], at[82]); - COMBA_STORE(C->dp[81]); - /* 82 */ - COMBA_FORWARD; - MULADD(at[35], at[95]); MULADD(at[36], at[94]); MULADD(at[37], at[93]); MULADD(at[38], at[92]); MULADD(at[39], at[91]); MULADD(at[40], at[90]); MULADD(at[41], at[89]); MULADD(at[42], at[88]); MULADD(at[43], at[87]); MULADD(at[44], at[86]); MULADD(at[45], at[85]); MULADD(at[46], at[84]); MULADD(at[47], at[83]); - COMBA_STORE(C->dp[82]); - /* 83 */ - COMBA_FORWARD; - MULADD(at[36], at[95]); MULADD(at[37], at[94]); MULADD(at[38], at[93]); MULADD(at[39], at[92]); MULADD(at[40], at[91]); MULADD(at[41], at[90]); MULADD(at[42], at[89]); MULADD(at[43], at[88]); MULADD(at[44], at[87]); MULADD(at[45], at[86]); MULADD(at[46], at[85]); MULADD(at[47], at[84]); - COMBA_STORE(C->dp[83]); - /* 84 */ - COMBA_FORWARD; - MULADD(at[37], at[95]); MULADD(at[38], at[94]); MULADD(at[39], at[93]); MULADD(at[40], at[92]); MULADD(at[41], at[91]); MULADD(at[42], at[90]); MULADD(at[43], at[89]); MULADD(at[44], at[88]); MULADD(at[45], at[87]); MULADD(at[46], at[86]); MULADD(at[47], at[85]); - COMBA_STORE(C->dp[84]); - /* 85 */ - COMBA_FORWARD; - MULADD(at[38], at[95]); MULADD(at[39], at[94]); MULADD(at[40], at[93]); MULADD(at[41], at[92]); MULADD(at[42], at[91]); MULADD(at[43], at[90]); MULADD(at[44], at[89]); MULADD(at[45], at[88]); MULADD(at[46], at[87]); MULADD(at[47], at[86]); - COMBA_STORE(C->dp[85]); - /* 86 */ - COMBA_FORWARD; - MULADD(at[39], at[95]); MULADD(at[40], at[94]); MULADD(at[41], at[93]); MULADD(at[42], at[92]); MULADD(at[43], at[91]); MULADD(at[44], at[90]); MULADD(at[45], at[89]); MULADD(at[46], at[88]); MULADD(at[47], at[87]); - COMBA_STORE(C->dp[86]); - /* 87 */ - COMBA_FORWARD; - MULADD(at[40], at[95]); MULADD(at[41], at[94]); MULADD(at[42], at[93]); MULADD(at[43], at[92]); MULADD(at[44], at[91]); MULADD(at[45], at[90]); MULADD(at[46], at[89]); MULADD(at[47], at[88]); - COMBA_STORE(C->dp[87]); - /* 88 */ - COMBA_FORWARD; - MULADD(at[41], at[95]); MULADD(at[42], at[94]); MULADD(at[43], at[93]); MULADD(at[44], at[92]); MULADD(at[45], at[91]); MULADD(at[46], at[90]); MULADD(at[47], at[89]); - COMBA_STORE(C->dp[88]); - /* 89 */ - COMBA_FORWARD; - MULADD(at[42], at[95]); MULADD(at[43], at[94]); MULADD(at[44], at[93]); MULADD(at[45], at[92]); MULADD(at[46], at[91]); MULADD(at[47], at[90]); - COMBA_STORE(C->dp[89]); - /* 90 */ - COMBA_FORWARD; - MULADD(at[43], at[95]); MULADD(at[44], at[94]); MULADD(at[45], at[93]); MULADD(at[46], at[92]); MULADD(at[47], at[91]); - COMBA_STORE(C->dp[90]); - /* 91 */ - COMBA_FORWARD; - MULADD(at[44], at[95]); MULADD(at[45], at[94]); MULADD(at[46], at[93]); MULADD(at[47], at[92]); - COMBA_STORE(C->dp[91]); - /* 92 */ - COMBA_FORWARD; - MULADD(at[45], at[95]); MULADD(at[46], at[94]); MULADD(at[47], at[93]); - COMBA_STORE(C->dp[92]); - /* 93 */ - COMBA_FORWARD; - MULADD(at[46], at[95]); MULADD(at[47], at[94]); - COMBA_STORE(C->dp[93]); - /* 94 */ - COMBA_FORWARD; - MULADD(at[47], at[95]); - COMBA_STORE(C->dp[94]); - COMBA_STORE2(C->dp[95]); - C->used = 96; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i deleted file mode 100644 index da46589e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_6.i +++ /dev/null @@ -1,82 +0,0 @@ -/* fp_mul_comba_6.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL6 -void fp_mul_comba6(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[12]; - - memcpy(at, A->dp, 6 * sizeof(fp_digit)); - memcpy(at+6, B->dp, 6 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[6]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[7]); MULADD(at[1], at[6]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); MULADD(at[5], at[6]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[4], at[11]); MULADD(at[5], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[5], at[11]); - COMBA_STORE(C->dp[10]); - COMBA_STORE2(C->dp[11]); - C->used = 12; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i deleted file mode 100644 index 38b40a71..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_64.i +++ /dev/null @@ -1,546 +0,0 @@ -/* fp_mul_comba_64.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL64 -void fp_mul_comba64(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[128]; - - memcpy(at, A->dp, 64 * sizeof(fp_digit)); - memcpy(at+64, B->dp, 64 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[64]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[65]); MULADD(at[1], at[64]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[66]); MULADD(at[1], at[65]); MULADD(at[2], at[64]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[67]); MULADD(at[1], at[66]); MULADD(at[2], at[65]); MULADD(at[3], at[64]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[68]); MULADD(at[1], at[67]); MULADD(at[2], at[66]); MULADD(at[3], at[65]); MULADD(at[4], at[64]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[69]); MULADD(at[1], at[68]); MULADD(at[2], at[67]); MULADD(at[3], at[66]); MULADD(at[4], at[65]); MULADD(at[5], at[64]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[70]); MULADD(at[1], at[69]); MULADD(at[2], at[68]); MULADD(at[3], at[67]); MULADD(at[4], at[66]); MULADD(at[5], at[65]); MULADD(at[6], at[64]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[71]); MULADD(at[1], at[70]); MULADD(at[2], at[69]); MULADD(at[3], at[68]); MULADD(at[4], at[67]); MULADD(at[5], at[66]); MULADD(at[6], at[65]); MULADD(at[7], at[64]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[72]); MULADD(at[1], at[71]); MULADD(at[2], at[70]); MULADD(at[3], at[69]); MULADD(at[4], at[68]); MULADD(at[5], at[67]); MULADD(at[6], at[66]); MULADD(at[7], at[65]); MULADD(at[8], at[64]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[73]); MULADD(at[1], at[72]); MULADD(at[2], at[71]); MULADD(at[3], at[70]); MULADD(at[4], at[69]); MULADD(at[5], at[68]); MULADD(at[6], at[67]); MULADD(at[7], at[66]); MULADD(at[8], at[65]); MULADD(at[9], at[64]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[74]); MULADD(at[1], at[73]); MULADD(at[2], at[72]); MULADD(at[3], at[71]); MULADD(at[4], at[70]); MULADD(at[5], at[69]); MULADD(at[6], at[68]); MULADD(at[7], at[67]); MULADD(at[8], at[66]); MULADD(at[9], at[65]); MULADD(at[10], at[64]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[75]); MULADD(at[1], at[74]); MULADD(at[2], at[73]); MULADD(at[3], at[72]); MULADD(at[4], at[71]); MULADD(at[5], at[70]); MULADD(at[6], at[69]); MULADD(at[7], at[68]); MULADD(at[8], at[67]); MULADD(at[9], at[66]); MULADD(at[10], at[65]); MULADD(at[11], at[64]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[76]); MULADD(at[1], at[75]); MULADD(at[2], at[74]); MULADD(at[3], at[73]); MULADD(at[4], at[72]); MULADD(at[5], at[71]); MULADD(at[6], at[70]); MULADD(at[7], at[69]); MULADD(at[8], at[68]); MULADD(at[9], at[67]); MULADD(at[10], at[66]); MULADD(at[11], at[65]); MULADD(at[12], at[64]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[77]); MULADD(at[1], at[76]); MULADD(at[2], at[75]); MULADD(at[3], at[74]); MULADD(at[4], at[73]); MULADD(at[5], at[72]); MULADD(at[6], at[71]); MULADD(at[7], at[70]); MULADD(at[8], at[69]); MULADD(at[9], at[68]); MULADD(at[10], at[67]); MULADD(at[11], at[66]); MULADD(at[12], at[65]); MULADD(at[13], at[64]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[78]); MULADD(at[1], at[77]); MULADD(at[2], at[76]); MULADD(at[3], at[75]); MULADD(at[4], at[74]); MULADD(at[5], at[73]); MULADD(at[6], at[72]); MULADD(at[7], at[71]); MULADD(at[8], at[70]); MULADD(at[9], at[69]); MULADD(at[10], at[68]); MULADD(at[11], at[67]); MULADD(at[12], at[66]); MULADD(at[13], at[65]); MULADD(at[14], at[64]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[79]); MULADD(at[1], at[78]); MULADD(at[2], at[77]); MULADD(at[3], at[76]); MULADD(at[4], at[75]); MULADD(at[5], at[74]); MULADD(at[6], at[73]); MULADD(at[7], at[72]); MULADD(at[8], at[71]); MULADD(at[9], at[70]); MULADD(at[10], at[69]); MULADD(at[11], at[68]); MULADD(at[12], at[67]); MULADD(at[13], at[66]); MULADD(at[14], at[65]); MULADD(at[15], at[64]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[0], at[80]); MULADD(at[1], at[79]); MULADD(at[2], at[78]); MULADD(at[3], at[77]); MULADD(at[4], at[76]); MULADD(at[5], at[75]); MULADD(at[6], at[74]); MULADD(at[7], at[73]); MULADD(at[8], at[72]); MULADD(at[9], at[71]); MULADD(at[10], at[70]); MULADD(at[11], at[69]); MULADD(at[12], at[68]); MULADD(at[13], at[67]); MULADD(at[14], at[66]); MULADD(at[15], at[65]); MULADD(at[16], at[64]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[0], at[81]); MULADD(at[1], at[80]); MULADD(at[2], at[79]); MULADD(at[3], at[78]); MULADD(at[4], at[77]); MULADD(at[5], at[76]); MULADD(at[6], at[75]); MULADD(at[7], at[74]); MULADD(at[8], at[73]); MULADD(at[9], at[72]); MULADD(at[10], at[71]); MULADD(at[11], at[70]); MULADD(at[12], at[69]); MULADD(at[13], at[68]); MULADD(at[14], at[67]); MULADD(at[15], at[66]); MULADD(at[16], at[65]); MULADD(at[17], at[64]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[0], at[82]); MULADD(at[1], at[81]); MULADD(at[2], at[80]); MULADD(at[3], at[79]); MULADD(at[4], at[78]); MULADD(at[5], at[77]); MULADD(at[6], at[76]); MULADD(at[7], at[75]); MULADD(at[8], at[74]); MULADD(at[9], at[73]); MULADD(at[10], at[72]); MULADD(at[11], at[71]); MULADD(at[12], at[70]); MULADD(at[13], at[69]); MULADD(at[14], at[68]); MULADD(at[15], at[67]); MULADD(at[16], at[66]); MULADD(at[17], at[65]); MULADD(at[18], at[64]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[0], at[83]); MULADD(at[1], at[82]); MULADD(at[2], at[81]); MULADD(at[3], at[80]); MULADD(at[4], at[79]); MULADD(at[5], at[78]); MULADD(at[6], at[77]); MULADD(at[7], at[76]); MULADD(at[8], at[75]); MULADD(at[9], at[74]); MULADD(at[10], at[73]); MULADD(at[11], at[72]); MULADD(at[12], at[71]); MULADD(at[13], at[70]); MULADD(at[14], at[69]); MULADD(at[15], at[68]); MULADD(at[16], at[67]); MULADD(at[17], at[66]); MULADD(at[18], at[65]); MULADD(at[19], at[64]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[0], at[84]); MULADD(at[1], at[83]); MULADD(at[2], at[82]); MULADD(at[3], at[81]); MULADD(at[4], at[80]); MULADD(at[5], at[79]); MULADD(at[6], at[78]); MULADD(at[7], at[77]); MULADD(at[8], at[76]); MULADD(at[9], at[75]); MULADD(at[10], at[74]); MULADD(at[11], at[73]); MULADD(at[12], at[72]); MULADD(at[13], at[71]); MULADD(at[14], at[70]); MULADD(at[15], at[69]); MULADD(at[16], at[68]); MULADD(at[17], at[67]); MULADD(at[18], at[66]); MULADD(at[19], at[65]); MULADD(at[20], at[64]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[0], at[85]); MULADD(at[1], at[84]); MULADD(at[2], at[83]); MULADD(at[3], at[82]); MULADD(at[4], at[81]); MULADD(at[5], at[80]); MULADD(at[6], at[79]); MULADD(at[7], at[78]); MULADD(at[8], at[77]); MULADD(at[9], at[76]); MULADD(at[10], at[75]); MULADD(at[11], at[74]); MULADD(at[12], at[73]); MULADD(at[13], at[72]); MULADD(at[14], at[71]); MULADD(at[15], at[70]); MULADD(at[16], at[69]); MULADD(at[17], at[68]); MULADD(at[18], at[67]); MULADD(at[19], at[66]); MULADD(at[20], at[65]); MULADD(at[21], at[64]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[0], at[86]); MULADD(at[1], at[85]); MULADD(at[2], at[84]); MULADD(at[3], at[83]); MULADD(at[4], at[82]); MULADD(at[5], at[81]); MULADD(at[6], at[80]); MULADD(at[7], at[79]); MULADD(at[8], at[78]); MULADD(at[9], at[77]); MULADD(at[10], at[76]); MULADD(at[11], at[75]); MULADD(at[12], at[74]); MULADD(at[13], at[73]); MULADD(at[14], at[72]); MULADD(at[15], at[71]); MULADD(at[16], at[70]); MULADD(at[17], at[69]); MULADD(at[18], at[68]); MULADD(at[19], at[67]); MULADD(at[20], at[66]); MULADD(at[21], at[65]); MULADD(at[22], at[64]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[0], at[87]); MULADD(at[1], at[86]); MULADD(at[2], at[85]); MULADD(at[3], at[84]); MULADD(at[4], at[83]); MULADD(at[5], at[82]); MULADD(at[6], at[81]); MULADD(at[7], at[80]); MULADD(at[8], at[79]); MULADD(at[9], at[78]); MULADD(at[10], at[77]); MULADD(at[11], at[76]); MULADD(at[12], at[75]); MULADD(at[13], at[74]); MULADD(at[14], at[73]); MULADD(at[15], at[72]); MULADD(at[16], at[71]); MULADD(at[17], at[70]); MULADD(at[18], at[69]); MULADD(at[19], at[68]); MULADD(at[20], at[67]); MULADD(at[21], at[66]); MULADD(at[22], at[65]); MULADD(at[23], at[64]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[0], at[88]); MULADD(at[1], at[87]); MULADD(at[2], at[86]); MULADD(at[3], at[85]); MULADD(at[4], at[84]); MULADD(at[5], at[83]); MULADD(at[6], at[82]); MULADD(at[7], at[81]); MULADD(at[8], at[80]); MULADD(at[9], at[79]); MULADD(at[10], at[78]); MULADD(at[11], at[77]); MULADD(at[12], at[76]); MULADD(at[13], at[75]); MULADD(at[14], at[74]); MULADD(at[15], at[73]); MULADD(at[16], at[72]); MULADD(at[17], at[71]); MULADD(at[18], at[70]); MULADD(at[19], at[69]); MULADD(at[20], at[68]); MULADD(at[21], at[67]); MULADD(at[22], at[66]); MULADD(at[23], at[65]); MULADD(at[24], at[64]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[0], at[89]); MULADD(at[1], at[88]); MULADD(at[2], at[87]); MULADD(at[3], at[86]); MULADD(at[4], at[85]); MULADD(at[5], at[84]); MULADD(at[6], at[83]); MULADD(at[7], at[82]); MULADD(at[8], at[81]); MULADD(at[9], at[80]); MULADD(at[10], at[79]); MULADD(at[11], at[78]); MULADD(at[12], at[77]); MULADD(at[13], at[76]); MULADD(at[14], at[75]); MULADD(at[15], at[74]); MULADD(at[16], at[73]); MULADD(at[17], at[72]); MULADD(at[18], at[71]); MULADD(at[19], at[70]); MULADD(at[20], at[69]); MULADD(at[21], at[68]); MULADD(at[22], at[67]); MULADD(at[23], at[66]); MULADD(at[24], at[65]); MULADD(at[25], at[64]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[0], at[90]); MULADD(at[1], at[89]); MULADD(at[2], at[88]); MULADD(at[3], at[87]); MULADD(at[4], at[86]); MULADD(at[5], at[85]); MULADD(at[6], at[84]); MULADD(at[7], at[83]); MULADD(at[8], at[82]); MULADD(at[9], at[81]); MULADD(at[10], at[80]); MULADD(at[11], at[79]); MULADD(at[12], at[78]); MULADD(at[13], at[77]); MULADD(at[14], at[76]); MULADD(at[15], at[75]); MULADD(at[16], at[74]); MULADD(at[17], at[73]); MULADD(at[18], at[72]); MULADD(at[19], at[71]); MULADD(at[20], at[70]); MULADD(at[21], at[69]); MULADD(at[22], at[68]); MULADD(at[23], at[67]); MULADD(at[24], at[66]); MULADD(at[25], at[65]); MULADD(at[26], at[64]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[0], at[91]); MULADD(at[1], at[90]); MULADD(at[2], at[89]); MULADD(at[3], at[88]); MULADD(at[4], at[87]); MULADD(at[5], at[86]); MULADD(at[6], at[85]); MULADD(at[7], at[84]); MULADD(at[8], at[83]); MULADD(at[9], at[82]); MULADD(at[10], at[81]); MULADD(at[11], at[80]); MULADD(at[12], at[79]); MULADD(at[13], at[78]); MULADD(at[14], at[77]); MULADD(at[15], at[76]); MULADD(at[16], at[75]); MULADD(at[17], at[74]); MULADD(at[18], at[73]); MULADD(at[19], at[72]); MULADD(at[20], at[71]); MULADD(at[21], at[70]); MULADD(at[22], at[69]); MULADD(at[23], at[68]); MULADD(at[24], at[67]); MULADD(at[25], at[66]); MULADD(at[26], at[65]); MULADD(at[27], at[64]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[0], at[92]); MULADD(at[1], at[91]); MULADD(at[2], at[90]); MULADD(at[3], at[89]); MULADD(at[4], at[88]); MULADD(at[5], at[87]); MULADD(at[6], at[86]); MULADD(at[7], at[85]); MULADD(at[8], at[84]); MULADD(at[9], at[83]); MULADD(at[10], at[82]); MULADD(at[11], at[81]); MULADD(at[12], at[80]); MULADD(at[13], at[79]); MULADD(at[14], at[78]); MULADD(at[15], at[77]); MULADD(at[16], at[76]); MULADD(at[17], at[75]); MULADD(at[18], at[74]); MULADD(at[19], at[73]); MULADD(at[20], at[72]); MULADD(at[21], at[71]); MULADD(at[22], at[70]); MULADD(at[23], at[69]); MULADD(at[24], at[68]); MULADD(at[25], at[67]); MULADD(at[26], at[66]); MULADD(at[27], at[65]); MULADD(at[28], at[64]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[0], at[93]); MULADD(at[1], at[92]); MULADD(at[2], at[91]); MULADD(at[3], at[90]); MULADD(at[4], at[89]); MULADD(at[5], at[88]); MULADD(at[6], at[87]); MULADD(at[7], at[86]); MULADD(at[8], at[85]); MULADD(at[9], at[84]); MULADD(at[10], at[83]); MULADD(at[11], at[82]); MULADD(at[12], at[81]); MULADD(at[13], at[80]); MULADD(at[14], at[79]); MULADD(at[15], at[78]); MULADD(at[16], at[77]); MULADD(at[17], at[76]); MULADD(at[18], at[75]); MULADD(at[19], at[74]); MULADD(at[20], at[73]); MULADD(at[21], at[72]); MULADD(at[22], at[71]); MULADD(at[23], at[70]); MULADD(at[24], at[69]); MULADD(at[25], at[68]); MULADD(at[26], at[67]); MULADD(at[27], at[66]); MULADD(at[28], at[65]); MULADD(at[29], at[64]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[0], at[94]); MULADD(at[1], at[93]); MULADD(at[2], at[92]); MULADD(at[3], at[91]); MULADD(at[4], at[90]); MULADD(at[5], at[89]); MULADD(at[6], at[88]); MULADD(at[7], at[87]); MULADD(at[8], at[86]); MULADD(at[9], at[85]); MULADD(at[10], at[84]); MULADD(at[11], at[83]); MULADD(at[12], at[82]); MULADD(at[13], at[81]); MULADD(at[14], at[80]); MULADD(at[15], at[79]); MULADD(at[16], at[78]); MULADD(at[17], at[77]); MULADD(at[18], at[76]); MULADD(at[19], at[75]); MULADD(at[20], at[74]); MULADD(at[21], at[73]); MULADD(at[22], at[72]); MULADD(at[23], at[71]); MULADD(at[24], at[70]); MULADD(at[25], at[69]); MULADD(at[26], at[68]); MULADD(at[27], at[67]); MULADD(at[28], at[66]); MULADD(at[29], at[65]); MULADD(at[30], at[64]); - COMBA_STORE(C->dp[30]); - /* 31 */ - COMBA_FORWARD; - MULADD(at[0], at[95]); MULADD(at[1], at[94]); MULADD(at[2], at[93]); MULADD(at[3], at[92]); MULADD(at[4], at[91]); MULADD(at[5], at[90]); MULADD(at[6], at[89]); MULADD(at[7], at[88]); MULADD(at[8], at[87]); MULADD(at[9], at[86]); MULADD(at[10], at[85]); MULADD(at[11], at[84]); MULADD(at[12], at[83]); MULADD(at[13], at[82]); MULADD(at[14], at[81]); MULADD(at[15], at[80]); MULADD(at[16], at[79]); MULADD(at[17], at[78]); MULADD(at[18], at[77]); MULADD(at[19], at[76]); MULADD(at[20], at[75]); MULADD(at[21], at[74]); MULADD(at[22], at[73]); MULADD(at[23], at[72]); MULADD(at[24], at[71]); MULADD(at[25], at[70]); MULADD(at[26], at[69]); MULADD(at[27], at[68]); MULADD(at[28], at[67]); MULADD(at[29], at[66]); MULADD(at[30], at[65]); MULADD(at[31], at[64]); - COMBA_STORE(C->dp[31]); - /* 32 */ - COMBA_FORWARD; - MULADD(at[0], at[96]); MULADD(at[1], at[95]); MULADD(at[2], at[94]); MULADD(at[3], at[93]); MULADD(at[4], at[92]); MULADD(at[5], at[91]); MULADD(at[6], at[90]); MULADD(at[7], at[89]); MULADD(at[8], at[88]); MULADD(at[9], at[87]); MULADD(at[10], at[86]); MULADD(at[11], at[85]); MULADD(at[12], at[84]); MULADD(at[13], at[83]); MULADD(at[14], at[82]); MULADD(at[15], at[81]); MULADD(at[16], at[80]); MULADD(at[17], at[79]); MULADD(at[18], at[78]); MULADD(at[19], at[77]); MULADD(at[20], at[76]); MULADD(at[21], at[75]); MULADD(at[22], at[74]); MULADD(at[23], at[73]); MULADD(at[24], at[72]); MULADD(at[25], at[71]); MULADD(at[26], at[70]); MULADD(at[27], at[69]); MULADD(at[28], at[68]); MULADD(at[29], at[67]); MULADD(at[30], at[66]); MULADD(at[31], at[65]); MULADD(at[32], at[64]); - COMBA_STORE(C->dp[32]); - /* 33 */ - COMBA_FORWARD; - MULADD(at[0], at[97]); MULADD(at[1], at[96]); MULADD(at[2], at[95]); MULADD(at[3], at[94]); MULADD(at[4], at[93]); MULADD(at[5], at[92]); MULADD(at[6], at[91]); MULADD(at[7], at[90]); MULADD(at[8], at[89]); MULADD(at[9], at[88]); MULADD(at[10], at[87]); MULADD(at[11], at[86]); MULADD(at[12], at[85]); MULADD(at[13], at[84]); MULADD(at[14], at[83]); MULADD(at[15], at[82]); MULADD(at[16], at[81]); MULADD(at[17], at[80]); MULADD(at[18], at[79]); MULADD(at[19], at[78]); MULADD(at[20], at[77]); MULADD(at[21], at[76]); MULADD(at[22], at[75]); MULADD(at[23], at[74]); MULADD(at[24], at[73]); MULADD(at[25], at[72]); MULADD(at[26], at[71]); MULADD(at[27], at[70]); MULADD(at[28], at[69]); MULADD(at[29], at[68]); MULADD(at[30], at[67]); MULADD(at[31], at[66]); MULADD(at[32], at[65]); MULADD(at[33], at[64]); - COMBA_STORE(C->dp[33]); - /* 34 */ - COMBA_FORWARD; - MULADD(at[0], at[98]); MULADD(at[1], at[97]); MULADD(at[2], at[96]); MULADD(at[3], at[95]); MULADD(at[4], at[94]); MULADD(at[5], at[93]); MULADD(at[6], at[92]); MULADD(at[7], at[91]); MULADD(at[8], at[90]); MULADD(at[9], at[89]); MULADD(at[10], at[88]); MULADD(at[11], at[87]); MULADD(at[12], at[86]); MULADD(at[13], at[85]); MULADD(at[14], at[84]); MULADD(at[15], at[83]); MULADD(at[16], at[82]); MULADD(at[17], at[81]); MULADD(at[18], at[80]); MULADD(at[19], at[79]); MULADD(at[20], at[78]); MULADD(at[21], at[77]); MULADD(at[22], at[76]); MULADD(at[23], at[75]); MULADD(at[24], at[74]); MULADD(at[25], at[73]); MULADD(at[26], at[72]); MULADD(at[27], at[71]); MULADD(at[28], at[70]); MULADD(at[29], at[69]); MULADD(at[30], at[68]); MULADD(at[31], at[67]); MULADD(at[32], at[66]); MULADD(at[33], at[65]); MULADD(at[34], at[64]); - COMBA_STORE(C->dp[34]); - /* 35 */ - COMBA_FORWARD; - MULADD(at[0], at[99]); MULADD(at[1], at[98]); MULADD(at[2], at[97]); MULADD(at[3], at[96]); MULADD(at[4], at[95]); MULADD(at[5], at[94]); MULADD(at[6], at[93]); MULADD(at[7], at[92]); MULADD(at[8], at[91]); MULADD(at[9], at[90]); MULADD(at[10], at[89]); MULADD(at[11], at[88]); MULADD(at[12], at[87]); MULADD(at[13], at[86]); MULADD(at[14], at[85]); MULADD(at[15], at[84]); MULADD(at[16], at[83]); MULADD(at[17], at[82]); MULADD(at[18], at[81]); MULADD(at[19], at[80]); MULADD(at[20], at[79]); MULADD(at[21], at[78]); MULADD(at[22], at[77]); MULADD(at[23], at[76]); MULADD(at[24], at[75]); MULADD(at[25], at[74]); MULADD(at[26], at[73]); MULADD(at[27], at[72]); MULADD(at[28], at[71]); MULADD(at[29], at[70]); MULADD(at[30], at[69]); MULADD(at[31], at[68]); MULADD(at[32], at[67]); MULADD(at[33], at[66]); MULADD(at[34], at[65]); MULADD(at[35], at[64]); - COMBA_STORE(C->dp[35]); - /* 36 */ - COMBA_FORWARD; - MULADD(at[0], at[100]); MULADD(at[1], at[99]); MULADD(at[2], at[98]); MULADD(at[3], at[97]); MULADD(at[4], at[96]); MULADD(at[5], at[95]); MULADD(at[6], at[94]); MULADD(at[7], at[93]); MULADD(at[8], at[92]); MULADD(at[9], at[91]); MULADD(at[10], at[90]); MULADD(at[11], at[89]); MULADD(at[12], at[88]); MULADD(at[13], at[87]); MULADD(at[14], at[86]); MULADD(at[15], at[85]); MULADD(at[16], at[84]); MULADD(at[17], at[83]); MULADD(at[18], at[82]); MULADD(at[19], at[81]); MULADD(at[20], at[80]); MULADD(at[21], at[79]); MULADD(at[22], at[78]); MULADD(at[23], at[77]); MULADD(at[24], at[76]); MULADD(at[25], at[75]); MULADD(at[26], at[74]); MULADD(at[27], at[73]); MULADD(at[28], at[72]); MULADD(at[29], at[71]); MULADD(at[30], at[70]); MULADD(at[31], at[69]); MULADD(at[32], at[68]); MULADD(at[33], at[67]); MULADD(at[34], at[66]); MULADD(at[35], at[65]); MULADD(at[36], at[64]); - COMBA_STORE(C->dp[36]); - /* 37 */ - COMBA_FORWARD; - MULADD(at[0], at[101]); MULADD(at[1], at[100]); MULADD(at[2], at[99]); MULADD(at[3], at[98]); MULADD(at[4], at[97]); MULADD(at[5], at[96]); MULADD(at[6], at[95]); MULADD(at[7], at[94]); MULADD(at[8], at[93]); MULADD(at[9], at[92]); MULADD(at[10], at[91]); MULADD(at[11], at[90]); MULADD(at[12], at[89]); MULADD(at[13], at[88]); MULADD(at[14], at[87]); MULADD(at[15], at[86]); MULADD(at[16], at[85]); MULADD(at[17], at[84]); MULADD(at[18], at[83]); MULADD(at[19], at[82]); MULADD(at[20], at[81]); MULADD(at[21], at[80]); MULADD(at[22], at[79]); MULADD(at[23], at[78]); MULADD(at[24], at[77]); MULADD(at[25], at[76]); MULADD(at[26], at[75]); MULADD(at[27], at[74]); MULADD(at[28], at[73]); MULADD(at[29], at[72]); MULADD(at[30], at[71]); MULADD(at[31], at[70]); MULADD(at[32], at[69]); MULADD(at[33], at[68]); MULADD(at[34], at[67]); MULADD(at[35], at[66]); MULADD(at[36], at[65]); MULADD(at[37], at[64]); - COMBA_STORE(C->dp[37]); - /* 38 */ - COMBA_FORWARD; - MULADD(at[0], at[102]); MULADD(at[1], at[101]); MULADD(at[2], at[100]); MULADD(at[3], at[99]); MULADD(at[4], at[98]); MULADD(at[5], at[97]); MULADD(at[6], at[96]); MULADD(at[7], at[95]); MULADD(at[8], at[94]); MULADD(at[9], at[93]); MULADD(at[10], at[92]); MULADD(at[11], at[91]); MULADD(at[12], at[90]); MULADD(at[13], at[89]); MULADD(at[14], at[88]); MULADD(at[15], at[87]); MULADD(at[16], at[86]); MULADD(at[17], at[85]); MULADD(at[18], at[84]); MULADD(at[19], at[83]); MULADD(at[20], at[82]); MULADD(at[21], at[81]); MULADD(at[22], at[80]); MULADD(at[23], at[79]); MULADD(at[24], at[78]); MULADD(at[25], at[77]); MULADD(at[26], at[76]); MULADD(at[27], at[75]); MULADD(at[28], at[74]); MULADD(at[29], at[73]); MULADD(at[30], at[72]); MULADD(at[31], at[71]); MULADD(at[32], at[70]); MULADD(at[33], at[69]); MULADD(at[34], at[68]); MULADD(at[35], at[67]); MULADD(at[36], at[66]); MULADD(at[37], at[65]); MULADD(at[38], at[64]); - COMBA_STORE(C->dp[38]); - /* 39 */ - COMBA_FORWARD; - MULADD(at[0], at[103]); MULADD(at[1], at[102]); MULADD(at[2], at[101]); MULADD(at[3], at[100]); MULADD(at[4], at[99]); MULADD(at[5], at[98]); MULADD(at[6], at[97]); MULADD(at[7], at[96]); MULADD(at[8], at[95]); MULADD(at[9], at[94]); MULADD(at[10], at[93]); MULADD(at[11], at[92]); MULADD(at[12], at[91]); MULADD(at[13], at[90]); MULADD(at[14], at[89]); MULADD(at[15], at[88]); MULADD(at[16], at[87]); MULADD(at[17], at[86]); MULADD(at[18], at[85]); MULADD(at[19], at[84]); MULADD(at[20], at[83]); MULADD(at[21], at[82]); MULADD(at[22], at[81]); MULADD(at[23], at[80]); MULADD(at[24], at[79]); MULADD(at[25], at[78]); MULADD(at[26], at[77]); MULADD(at[27], at[76]); MULADD(at[28], at[75]); MULADD(at[29], at[74]); MULADD(at[30], at[73]); MULADD(at[31], at[72]); MULADD(at[32], at[71]); MULADD(at[33], at[70]); MULADD(at[34], at[69]); MULADD(at[35], at[68]); MULADD(at[36], at[67]); MULADD(at[37], at[66]); MULADD(at[38], at[65]); MULADD(at[39], at[64]); - COMBA_STORE(C->dp[39]); - /* 40 */ - COMBA_FORWARD; - MULADD(at[0], at[104]); MULADD(at[1], at[103]); MULADD(at[2], at[102]); MULADD(at[3], at[101]); MULADD(at[4], at[100]); MULADD(at[5], at[99]); MULADD(at[6], at[98]); MULADD(at[7], at[97]); MULADD(at[8], at[96]); MULADD(at[9], at[95]); MULADD(at[10], at[94]); MULADD(at[11], at[93]); MULADD(at[12], at[92]); MULADD(at[13], at[91]); MULADD(at[14], at[90]); MULADD(at[15], at[89]); MULADD(at[16], at[88]); MULADD(at[17], at[87]); MULADD(at[18], at[86]); MULADD(at[19], at[85]); MULADD(at[20], at[84]); MULADD(at[21], at[83]); MULADD(at[22], at[82]); MULADD(at[23], at[81]); MULADD(at[24], at[80]); MULADD(at[25], at[79]); MULADD(at[26], at[78]); MULADD(at[27], at[77]); MULADD(at[28], at[76]); MULADD(at[29], at[75]); MULADD(at[30], at[74]); MULADD(at[31], at[73]); MULADD(at[32], at[72]); MULADD(at[33], at[71]); MULADD(at[34], at[70]); MULADD(at[35], at[69]); MULADD(at[36], at[68]); MULADD(at[37], at[67]); MULADD(at[38], at[66]); MULADD(at[39], at[65]); MULADD(at[40], at[64]); - COMBA_STORE(C->dp[40]); - /* 41 */ - COMBA_FORWARD; - MULADD(at[0], at[105]); MULADD(at[1], at[104]); MULADD(at[2], at[103]); MULADD(at[3], at[102]); MULADD(at[4], at[101]); MULADD(at[5], at[100]); MULADD(at[6], at[99]); MULADD(at[7], at[98]); MULADD(at[8], at[97]); MULADD(at[9], at[96]); MULADD(at[10], at[95]); MULADD(at[11], at[94]); MULADD(at[12], at[93]); MULADD(at[13], at[92]); MULADD(at[14], at[91]); MULADD(at[15], at[90]); MULADD(at[16], at[89]); MULADD(at[17], at[88]); MULADD(at[18], at[87]); MULADD(at[19], at[86]); MULADD(at[20], at[85]); MULADD(at[21], at[84]); MULADD(at[22], at[83]); MULADD(at[23], at[82]); MULADD(at[24], at[81]); MULADD(at[25], at[80]); MULADD(at[26], at[79]); MULADD(at[27], at[78]); MULADD(at[28], at[77]); MULADD(at[29], at[76]); MULADD(at[30], at[75]); MULADD(at[31], at[74]); MULADD(at[32], at[73]); MULADD(at[33], at[72]); MULADD(at[34], at[71]); MULADD(at[35], at[70]); MULADD(at[36], at[69]); MULADD(at[37], at[68]); MULADD(at[38], at[67]); MULADD(at[39], at[66]); MULADD(at[40], at[65]); MULADD(at[41], at[64]); - COMBA_STORE(C->dp[41]); - /* 42 */ - COMBA_FORWARD; - MULADD(at[0], at[106]); MULADD(at[1], at[105]); MULADD(at[2], at[104]); MULADD(at[3], at[103]); MULADD(at[4], at[102]); MULADD(at[5], at[101]); MULADD(at[6], at[100]); MULADD(at[7], at[99]); MULADD(at[8], at[98]); MULADD(at[9], at[97]); MULADD(at[10], at[96]); MULADD(at[11], at[95]); MULADD(at[12], at[94]); MULADD(at[13], at[93]); MULADD(at[14], at[92]); MULADD(at[15], at[91]); MULADD(at[16], at[90]); MULADD(at[17], at[89]); MULADD(at[18], at[88]); MULADD(at[19], at[87]); MULADD(at[20], at[86]); MULADD(at[21], at[85]); MULADD(at[22], at[84]); MULADD(at[23], at[83]); MULADD(at[24], at[82]); MULADD(at[25], at[81]); MULADD(at[26], at[80]); MULADD(at[27], at[79]); MULADD(at[28], at[78]); MULADD(at[29], at[77]); MULADD(at[30], at[76]); MULADD(at[31], at[75]); MULADD(at[32], at[74]); MULADD(at[33], at[73]); MULADD(at[34], at[72]); MULADD(at[35], at[71]); MULADD(at[36], at[70]); MULADD(at[37], at[69]); MULADD(at[38], at[68]); MULADD(at[39], at[67]); MULADD(at[40], at[66]); MULADD(at[41], at[65]); MULADD(at[42], at[64]); - COMBA_STORE(C->dp[42]); - /* 43 */ - COMBA_FORWARD; - MULADD(at[0], at[107]); MULADD(at[1], at[106]); MULADD(at[2], at[105]); MULADD(at[3], at[104]); MULADD(at[4], at[103]); MULADD(at[5], at[102]); MULADD(at[6], at[101]); MULADD(at[7], at[100]); MULADD(at[8], at[99]); MULADD(at[9], at[98]); MULADD(at[10], at[97]); MULADD(at[11], at[96]); MULADD(at[12], at[95]); MULADD(at[13], at[94]); MULADD(at[14], at[93]); MULADD(at[15], at[92]); MULADD(at[16], at[91]); MULADD(at[17], at[90]); MULADD(at[18], at[89]); MULADD(at[19], at[88]); MULADD(at[20], at[87]); MULADD(at[21], at[86]); MULADD(at[22], at[85]); MULADD(at[23], at[84]); MULADD(at[24], at[83]); MULADD(at[25], at[82]); MULADD(at[26], at[81]); MULADD(at[27], at[80]); MULADD(at[28], at[79]); MULADD(at[29], at[78]); MULADD(at[30], at[77]); MULADD(at[31], at[76]); MULADD(at[32], at[75]); MULADD(at[33], at[74]); MULADD(at[34], at[73]); MULADD(at[35], at[72]); MULADD(at[36], at[71]); MULADD(at[37], at[70]); MULADD(at[38], at[69]); MULADD(at[39], at[68]); MULADD(at[40], at[67]); MULADD(at[41], at[66]); MULADD(at[42], at[65]); MULADD(at[43], at[64]); - COMBA_STORE(C->dp[43]); - /* 44 */ - COMBA_FORWARD; - MULADD(at[0], at[108]); MULADD(at[1], at[107]); MULADD(at[2], at[106]); MULADD(at[3], at[105]); MULADD(at[4], at[104]); MULADD(at[5], at[103]); MULADD(at[6], at[102]); MULADD(at[7], at[101]); MULADD(at[8], at[100]); MULADD(at[9], at[99]); MULADD(at[10], at[98]); MULADD(at[11], at[97]); MULADD(at[12], at[96]); MULADD(at[13], at[95]); MULADD(at[14], at[94]); MULADD(at[15], at[93]); MULADD(at[16], at[92]); MULADD(at[17], at[91]); MULADD(at[18], at[90]); MULADD(at[19], at[89]); MULADD(at[20], at[88]); MULADD(at[21], at[87]); MULADD(at[22], at[86]); MULADD(at[23], at[85]); MULADD(at[24], at[84]); MULADD(at[25], at[83]); MULADD(at[26], at[82]); MULADD(at[27], at[81]); MULADD(at[28], at[80]); MULADD(at[29], at[79]); MULADD(at[30], at[78]); MULADD(at[31], at[77]); MULADD(at[32], at[76]); MULADD(at[33], at[75]); MULADD(at[34], at[74]); MULADD(at[35], at[73]); MULADD(at[36], at[72]); MULADD(at[37], at[71]); MULADD(at[38], at[70]); MULADD(at[39], at[69]); MULADD(at[40], at[68]); MULADD(at[41], at[67]); MULADD(at[42], at[66]); MULADD(at[43], at[65]); MULADD(at[44], at[64]); - COMBA_STORE(C->dp[44]); - /* 45 */ - COMBA_FORWARD; - MULADD(at[0], at[109]); MULADD(at[1], at[108]); MULADD(at[2], at[107]); MULADD(at[3], at[106]); MULADD(at[4], at[105]); MULADD(at[5], at[104]); MULADD(at[6], at[103]); MULADD(at[7], at[102]); MULADD(at[8], at[101]); MULADD(at[9], at[100]); MULADD(at[10], at[99]); MULADD(at[11], at[98]); MULADD(at[12], at[97]); MULADD(at[13], at[96]); MULADD(at[14], at[95]); MULADD(at[15], at[94]); MULADD(at[16], at[93]); MULADD(at[17], at[92]); MULADD(at[18], at[91]); MULADD(at[19], at[90]); MULADD(at[20], at[89]); MULADD(at[21], at[88]); MULADD(at[22], at[87]); MULADD(at[23], at[86]); MULADD(at[24], at[85]); MULADD(at[25], at[84]); MULADD(at[26], at[83]); MULADD(at[27], at[82]); MULADD(at[28], at[81]); MULADD(at[29], at[80]); MULADD(at[30], at[79]); MULADD(at[31], at[78]); MULADD(at[32], at[77]); MULADD(at[33], at[76]); MULADD(at[34], at[75]); MULADD(at[35], at[74]); MULADD(at[36], at[73]); MULADD(at[37], at[72]); MULADD(at[38], at[71]); MULADD(at[39], at[70]); MULADD(at[40], at[69]); MULADD(at[41], at[68]); MULADD(at[42], at[67]); MULADD(at[43], at[66]); MULADD(at[44], at[65]); MULADD(at[45], at[64]); - COMBA_STORE(C->dp[45]); - /* 46 */ - COMBA_FORWARD; - MULADD(at[0], at[110]); MULADD(at[1], at[109]); MULADD(at[2], at[108]); MULADD(at[3], at[107]); MULADD(at[4], at[106]); MULADD(at[5], at[105]); MULADD(at[6], at[104]); MULADD(at[7], at[103]); MULADD(at[8], at[102]); MULADD(at[9], at[101]); MULADD(at[10], at[100]); MULADD(at[11], at[99]); MULADD(at[12], at[98]); MULADD(at[13], at[97]); MULADD(at[14], at[96]); MULADD(at[15], at[95]); MULADD(at[16], at[94]); MULADD(at[17], at[93]); MULADD(at[18], at[92]); MULADD(at[19], at[91]); MULADD(at[20], at[90]); MULADD(at[21], at[89]); MULADD(at[22], at[88]); MULADD(at[23], at[87]); MULADD(at[24], at[86]); MULADD(at[25], at[85]); MULADD(at[26], at[84]); MULADD(at[27], at[83]); MULADD(at[28], at[82]); MULADD(at[29], at[81]); MULADD(at[30], at[80]); MULADD(at[31], at[79]); MULADD(at[32], at[78]); MULADD(at[33], at[77]); MULADD(at[34], at[76]); MULADD(at[35], at[75]); MULADD(at[36], at[74]); MULADD(at[37], at[73]); MULADD(at[38], at[72]); MULADD(at[39], at[71]); MULADD(at[40], at[70]); MULADD(at[41], at[69]); MULADD(at[42], at[68]); MULADD(at[43], at[67]); MULADD(at[44], at[66]); MULADD(at[45], at[65]); MULADD(at[46], at[64]); - COMBA_STORE(C->dp[46]); - /* 47 */ - COMBA_FORWARD; - MULADD(at[0], at[111]); MULADD(at[1], at[110]); MULADD(at[2], at[109]); MULADD(at[3], at[108]); MULADD(at[4], at[107]); MULADD(at[5], at[106]); MULADD(at[6], at[105]); MULADD(at[7], at[104]); MULADD(at[8], at[103]); MULADD(at[9], at[102]); MULADD(at[10], at[101]); MULADD(at[11], at[100]); MULADD(at[12], at[99]); MULADD(at[13], at[98]); MULADD(at[14], at[97]); MULADD(at[15], at[96]); MULADD(at[16], at[95]); MULADD(at[17], at[94]); MULADD(at[18], at[93]); MULADD(at[19], at[92]); MULADD(at[20], at[91]); MULADD(at[21], at[90]); MULADD(at[22], at[89]); MULADD(at[23], at[88]); MULADD(at[24], at[87]); MULADD(at[25], at[86]); MULADD(at[26], at[85]); MULADD(at[27], at[84]); MULADD(at[28], at[83]); MULADD(at[29], at[82]); MULADD(at[30], at[81]); MULADD(at[31], at[80]); MULADD(at[32], at[79]); MULADD(at[33], at[78]); MULADD(at[34], at[77]); MULADD(at[35], at[76]); MULADD(at[36], at[75]); MULADD(at[37], at[74]); MULADD(at[38], at[73]); MULADD(at[39], at[72]); MULADD(at[40], at[71]); MULADD(at[41], at[70]); MULADD(at[42], at[69]); MULADD(at[43], at[68]); MULADD(at[44], at[67]); MULADD(at[45], at[66]); MULADD(at[46], at[65]); MULADD(at[47], at[64]); - COMBA_STORE(C->dp[47]); - /* 48 */ - COMBA_FORWARD; - MULADD(at[0], at[112]); MULADD(at[1], at[111]); MULADD(at[2], at[110]); MULADD(at[3], at[109]); MULADD(at[4], at[108]); MULADD(at[5], at[107]); MULADD(at[6], at[106]); MULADD(at[7], at[105]); MULADD(at[8], at[104]); MULADD(at[9], at[103]); MULADD(at[10], at[102]); MULADD(at[11], at[101]); MULADD(at[12], at[100]); MULADD(at[13], at[99]); MULADD(at[14], at[98]); MULADD(at[15], at[97]); MULADD(at[16], at[96]); MULADD(at[17], at[95]); MULADD(at[18], at[94]); MULADD(at[19], at[93]); MULADD(at[20], at[92]); MULADD(at[21], at[91]); MULADD(at[22], at[90]); MULADD(at[23], at[89]); MULADD(at[24], at[88]); MULADD(at[25], at[87]); MULADD(at[26], at[86]); MULADD(at[27], at[85]); MULADD(at[28], at[84]); MULADD(at[29], at[83]); MULADD(at[30], at[82]); MULADD(at[31], at[81]); MULADD(at[32], at[80]); MULADD(at[33], at[79]); MULADD(at[34], at[78]); MULADD(at[35], at[77]); MULADD(at[36], at[76]); MULADD(at[37], at[75]); MULADD(at[38], at[74]); MULADD(at[39], at[73]); MULADD(at[40], at[72]); MULADD(at[41], at[71]); MULADD(at[42], at[70]); MULADD(at[43], at[69]); MULADD(at[44], at[68]); MULADD(at[45], at[67]); MULADD(at[46], at[66]); MULADD(at[47], at[65]); MULADD(at[48], at[64]); - COMBA_STORE(C->dp[48]); - /* 49 */ - COMBA_FORWARD; - MULADD(at[0], at[113]); MULADD(at[1], at[112]); MULADD(at[2], at[111]); MULADD(at[3], at[110]); MULADD(at[4], at[109]); MULADD(at[5], at[108]); MULADD(at[6], at[107]); MULADD(at[7], at[106]); MULADD(at[8], at[105]); MULADD(at[9], at[104]); MULADD(at[10], at[103]); MULADD(at[11], at[102]); MULADD(at[12], at[101]); MULADD(at[13], at[100]); MULADD(at[14], at[99]); MULADD(at[15], at[98]); MULADD(at[16], at[97]); MULADD(at[17], at[96]); MULADD(at[18], at[95]); MULADD(at[19], at[94]); MULADD(at[20], at[93]); MULADD(at[21], at[92]); MULADD(at[22], at[91]); MULADD(at[23], at[90]); MULADD(at[24], at[89]); MULADD(at[25], at[88]); MULADD(at[26], at[87]); MULADD(at[27], at[86]); MULADD(at[28], at[85]); MULADD(at[29], at[84]); MULADD(at[30], at[83]); MULADD(at[31], at[82]); MULADD(at[32], at[81]); MULADD(at[33], at[80]); MULADD(at[34], at[79]); MULADD(at[35], at[78]); MULADD(at[36], at[77]); MULADD(at[37], at[76]); MULADD(at[38], at[75]); MULADD(at[39], at[74]); MULADD(at[40], at[73]); MULADD(at[41], at[72]); MULADD(at[42], at[71]); MULADD(at[43], at[70]); MULADD(at[44], at[69]); MULADD(at[45], at[68]); MULADD(at[46], at[67]); MULADD(at[47], at[66]); MULADD(at[48], at[65]); MULADD(at[49], at[64]); - COMBA_STORE(C->dp[49]); - /* 50 */ - COMBA_FORWARD; - MULADD(at[0], at[114]); MULADD(at[1], at[113]); MULADD(at[2], at[112]); MULADD(at[3], at[111]); MULADD(at[4], at[110]); MULADD(at[5], at[109]); MULADD(at[6], at[108]); MULADD(at[7], at[107]); MULADD(at[8], at[106]); MULADD(at[9], at[105]); MULADD(at[10], at[104]); MULADD(at[11], at[103]); MULADD(at[12], at[102]); MULADD(at[13], at[101]); MULADD(at[14], at[100]); MULADD(at[15], at[99]); MULADD(at[16], at[98]); MULADD(at[17], at[97]); MULADD(at[18], at[96]); MULADD(at[19], at[95]); MULADD(at[20], at[94]); MULADD(at[21], at[93]); MULADD(at[22], at[92]); MULADD(at[23], at[91]); MULADD(at[24], at[90]); MULADD(at[25], at[89]); MULADD(at[26], at[88]); MULADD(at[27], at[87]); MULADD(at[28], at[86]); MULADD(at[29], at[85]); MULADD(at[30], at[84]); MULADD(at[31], at[83]); MULADD(at[32], at[82]); MULADD(at[33], at[81]); MULADD(at[34], at[80]); MULADD(at[35], at[79]); MULADD(at[36], at[78]); MULADD(at[37], at[77]); MULADD(at[38], at[76]); MULADD(at[39], at[75]); MULADD(at[40], at[74]); MULADD(at[41], at[73]); MULADD(at[42], at[72]); MULADD(at[43], at[71]); MULADD(at[44], at[70]); MULADD(at[45], at[69]); MULADD(at[46], at[68]); MULADD(at[47], at[67]); MULADD(at[48], at[66]); MULADD(at[49], at[65]); MULADD(at[50], at[64]); - COMBA_STORE(C->dp[50]); - /* 51 */ - COMBA_FORWARD; - MULADD(at[0], at[115]); MULADD(at[1], at[114]); MULADD(at[2], at[113]); MULADD(at[3], at[112]); MULADD(at[4], at[111]); MULADD(at[5], at[110]); MULADD(at[6], at[109]); MULADD(at[7], at[108]); MULADD(at[8], at[107]); MULADD(at[9], at[106]); MULADD(at[10], at[105]); MULADD(at[11], at[104]); MULADD(at[12], at[103]); MULADD(at[13], at[102]); MULADD(at[14], at[101]); MULADD(at[15], at[100]); MULADD(at[16], at[99]); MULADD(at[17], at[98]); MULADD(at[18], at[97]); MULADD(at[19], at[96]); MULADD(at[20], at[95]); MULADD(at[21], at[94]); MULADD(at[22], at[93]); MULADD(at[23], at[92]); MULADD(at[24], at[91]); MULADD(at[25], at[90]); MULADD(at[26], at[89]); MULADD(at[27], at[88]); MULADD(at[28], at[87]); MULADD(at[29], at[86]); MULADD(at[30], at[85]); MULADD(at[31], at[84]); MULADD(at[32], at[83]); MULADD(at[33], at[82]); MULADD(at[34], at[81]); MULADD(at[35], at[80]); MULADD(at[36], at[79]); MULADD(at[37], at[78]); MULADD(at[38], at[77]); MULADD(at[39], at[76]); MULADD(at[40], at[75]); MULADD(at[41], at[74]); MULADD(at[42], at[73]); MULADD(at[43], at[72]); MULADD(at[44], at[71]); MULADD(at[45], at[70]); MULADD(at[46], at[69]); MULADD(at[47], at[68]); MULADD(at[48], at[67]); MULADD(at[49], at[66]); MULADD(at[50], at[65]); MULADD(at[51], at[64]); - COMBA_STORE(C->dp[51]); - /* 52 */ - COMBA_FORWARD; - MULADD(at[0], at[116]); MULADD(at[1], at[115]); MULADD(at[2], at[114]); MULADD(at[3], at[113]); MULADD(at[4], at[112]); MULADD(at[5], at[111]); MULADD(at[6], at[110]); MULADD(at[7], at[109]); MULADD(at[8], at[108]); MULADD(at[9], at[107]); MULADD(at[10], at[106]); MULADD(at[11], at[105]); MULADD(at[12], at[104]); MULADD(at[13], at[103]); MULADD(at[14], at[102]); MULADD(at[15], at[101]); MULADD(at[16], at[100]); MULADD(at[17], at[99]); MULADD(at[18], at[98]); MULADD(at[19], at[97]); MULADD(at[20], at[96]); MULADD(at[21], at[95]); MULADD(at[22], at[94]); MULADD(at[23], at[93]); MULADD(at[24], at[92]); MULADD(at[25], at[91]); MULADD(at[26], at[90]); MULADD(at[27], at[89]); MULADD(at[28], at[88]); MULADD(at[29], at[87]); MULADD(at[30], at[86]); MULADD(at[31], at[85]); MULADD(at[32], at[84]); MULADD(at[33], at[83]); MULADD(at[34], at[82]); MULADD(at[35], at[81]); MULADD(at[36], at[80]); MULADD(at[37], at[79]); MULADD(at[38], at[78]); MULADD(at[39], at[77]); MULADD(at[40], at[76]); MULADD(at[41], at[75]); MULADD(at[42], at[74]); MULADD(at[43], at[73]); MULADD(at[44], at[72]); MULADD(at[45], at[71]); MULADD(at[46], at[70]); MULADD(at[47], at[69]); MULADD(at[48], at[68]); MULADD(at[49], at[67]); MULADD(at[50], at[66]); MULADD(at[51], at[65]); MULADD(at[52], at[64]); - COMBA_STORE(C->dp[52]); - /* 53 */ - COMBA_FORWARD; - MULADD(at[0], at[117]); MULADD(at[1], at[116]); MULADD(at[2], at[115]); MULADD(at[3], at[114]); MULADD(at[4], at[113]); MULADD(at[5], at[112]); MULADD(at[6], at[111]); MULADD(at[7], at[110]); MULADD(at[8], at[109]); MULADD(at[9], at[108]); MULADD(at[10], at[107]); MULADD(at[11], at[106]); MULADD(at[12], at[105]); MULADD(at[13], at[104]); MULADD(at[14], at[103]); MULADD(at[15], at[102]); MULADD(at[16], at[101]); MULADD(at[17], at[100]); MULADD(at[18], at[99]); MULADD(at[19], at[98]); MULADD(at[20], at[97]); MULADD(at[21], at[96]); MULADD(at[22], at[95]); MULADD(at[23], at[94]); MULADD(at[24], at[93]); MULADD(at[25], at[92]); MULADD(at[26], at[91]); MULADD(at[27], at[90]); MULADD(at[28], at[89]); MULADD(at[29], at[88]); MULADD(at[30], at[87]); MULADD(at[31], at[86]); MULADD(at[32], at[85]); MULADD(at[33], at[84]); MULADD(at[34], at[83]); MULADD(at[35], at[82]); MULADD(at[36], at[81]); MULADD(at[37], at[80]); MULADD(at[38], at[79]); MULADD(at[39], at[78]); MULADD(at[40], at[77]); MULADD(at[41], at[76]); MULADD(at[42], at[75]); MULADD(at[43], at[74]); MULADD(at[44], at[73]); MULADD(at[45], at[72]); MULADD(at[46], at[71]); MULADD(at[47], at[70]); MULADD(at[48], at[69]); MULADD(at[49], at[68]); MULADD(at[50], at[67]); MULADD(at[51], at[66]); MULADD(at[52], at[65]); MULADD(at[53], at[64]); - COMBA_STORE(C->dp[53]); - /* 54 */ - COMBA_FORWARD; - MULADD(at[0], at[118]); MULADD(at[1], at[117]); MULADD(at[2], at[116]); MULADD(at[3], at[115]); MULADD(at[4], at[114]); MULADD(at[5], at[113]); MULADD(at[6], at[112]); MULADD(at[7], at[111]); MULADD(at[8], at[110]); MULADD(at[9], at[109]); MULADD(at[10], at[108]); MULADD(at[11], at[107]); MULADD(at[12], at[106]); MULADD(at[13], at[105]); MULADD(at[14], at[104]); MULADD(at[15], at[103]); MULADD(at[16], at[102]); MULADD(at[17], at[101]); MULADD(at[18], at[100]); MULADD(at[19], at[99]); MULADD(at[20], at[98]); MULADD(at[21], at[97]); MULADD(at[22], at[96]); MULADD(at[23], at[95]); MULADD(at[24], at[94]); MULADD(at[25], at[93]); MULADD(at[26], at[92]); MULADD(at[27], at[91]); MULADD(at[28], at[90]); MULADD(at[29], at[89]); MULADD(at[30], at[88]); MULADD(at[31], at[87]); MULADD(at[32], at[86]); MULADD(at[33], at[85]); MULADD(at[34], at[84]); MULADD(at[35], at[83]); MULADD(at[36], at[82]); MULADD(at[37], at[81]); MULADD(at[38], at[80]); MULADD(at[39], at[79]); MULADD(at[40], at[78]); MULADD(at[41], at[77]); MULADD(at[42], at[76]); MULADD(at[43], at[75]); MULADD(at[44], at[74]); MULADD(at[45], at[73]); MULADD(at[46], at[72]); MULADD(at[47], at[71]); MULADD(at[48], at[70]); MULADD(at[49], at[69]); MULADD(at[50], at[68]); MULADD(at[51], at[67]); MULADD(at[52], at[66]); MULADD(at[53], at[65]); MULADD(at[54], at[64]); - COMBA_STORE(C->dp[54]); - /* 55 */ - COMBA_FORWARD; - MULADD(at[0], at[119]); MULADD(at[1], at[118]); MULADD(at[2], at[117]); MULADD(at[3], at[116]); MULADD(at[4], at[115]); MULADD(at[5], at[114]); MULADD(at[6], at[113]); MULADD(at[7], at[112]); MULADD(at[8], at[111]); MULADD(at[9], at[110]); MULADD(at[10], at[109]); MULADD(at[11], at[108]); MULADD(at[12], at[107]); MULADD(at[13], at[106]); MULADD(at[14], at[105]); MULADD(at[15], at[104]); MULADD(at[16], at[103]); MULADD(at[17], at[102]); MULADD(at[18], at[101]); MULADD(at[19], at[100]); MULADD(at[20], at[99]); MULADD(at[21], at[98]); MULADD(at[22], at[97]); MULADD(at[23], at[96]); MULADD(at[24], at[95]); MULADD(at[25], at[94]); MULADD(at[26], at[93]); MULADD(at[27], at[92]); MULADD(at[28], at[91]); MULADD(at[29], at[90]); MULADD(at[30], at[89]); MULADD(at[31], at[88]); MULADD(at[32], at[87]); MULADD(at[33], at[86]); MULADD(at[34], at[85]); MULADD(at[35], at[84]); MULADD(at[36], at[83]); MULADD(at[37], at[82]); MULADD(at[38], at[81]); MULADD(at[39], at[80]); MULADD(at[40], at[79]); MULADD(at[41], at[78]); MULADD(at[42], at[77]); MULADD(at[43], at[76]); MULADD(at[44], at[75]); MULADD(at[45], at[74]); MULADD(at[46], at[73]); MULADD(at[47], at[72]); MULADD(at[48], at[71]); MULADD(at[49], at[70]); MULADD(at[50], at[69]); MULADD(at[51], at[68]); MULADD(at[52], at[67]); MULADD(at[53], at[66]); MULADD(at[54], at[65]); MULADD(at[55], at[64]); - COMBA_STORE(C->dp[55]); - /* 56 */ - COMBA_FORWARD; - MULADD(at[0], at[120]); MULADD(at[1], at[119]); MULADD(at[2], at[118]); MULADD(at[3], at[117]); MULADD(at[4], at[116]); MULADD(at[5], at[115]); MULADD(at[6], at[114]); MULADD(at[7], at[113]); MULADD(at[8], at[112]); MULADD(at[9], at[111]); MULADD(at[10], at[110]); MULADD(at[11], at[109]); MULADD(at[12], at[108]); MULADD(at[13], at[107]); MULADD(at[14], at[106]); MULADD(at[15], at[105]); MULADD(at[16], at[104]); MULADD(at[17], at[103]); MULADD(at[18], at[102]); MULADD(at[19], at[101]); MULADD(at[20], at[100]); MULADD(at[21], at[99]); MULADD(at[22], at[98]); MULADD(at[23], at[97]); MULADD(at[24], at[96]); MULADD(at[25], at[95]); MULADD(at[26], at[94]); MULADD(at[27], at[93]); MULADD(at[28], at[92]); MULADD(at[29], at[91]); MULADD(at[30], at[90]); MULADD(at[31], at[89]); MULADD(at[32], at[88]); MULADD(at[33], at[87]); MULADD(at[34], at[86]); MULADD(at[35], at[85]); MULADD(at[36], at[84]); MULADD(at[37], at[83]); MULADD(at[38], at[82]); MULADD(at[39], at[81]); MULADD(at[40], at[80]); MULADD(at[41], at[79]); MULADD(at[42], at[78]); MULADD(at[43], at[77]); MULADD(at[44], at[76]); MULADD(at[45], at[75]); MULADD(at[46], at[74]); MULADD(at[47], at[73]); MULADD(at[48], at[72]); MULADD(at[49], at[71]); MULADD(at[50], at[70]); MULADD(at[51], at[69]); MULADD(at[52], at[68]); MULADD(at[53], at[67]); MULADD(at[54], at[66]); MULADD(at[55], at[65]); MULADD(at[56], at[64]); - COMBA_STORE(C->dp[56]); - /* 57 */ - COMBA_FORWARD; - MULADD(at[0], at[121]); MULADD(at[1], at[120]); MULADD(at[2], at[119]); MULADD(at[3], at[118]); MULADD(at[4], at[117]); MULADD(at[5], at[116]); MULADD(at[6], at[115]); MULADD(at[7], at[114]); MULADD(at[8], at[113]); MULADD(at[9], at[112]); MULADD(at[10], at[111]); MULADD(at[11], at[110]); MULADD(at[12], at[109]); MULADD(at[13], at[108]); MULADD(at[14], at[107]); MULADD(at[15], at[106]); MULADD(at[16], at[105]); MULADD(at[17], at[104]); MULADD(at[18], at[103]); MULADD(at[19], at[102]); MULADD(at[20], at[101]); MULADD(at[21], at[100]); MULADD(at[22], at[99]); MULADD(at[23], at[98]); MULADD(at[24], at[97]); MULADD(at[25], at[96]); MULADD(at[26], at[95]); MULADD(at[27], at[94]); MULADD(at[28], at[93]); MULADD(at[29], at[92]); MULADD(at[30], at[91]); MULADD(at[31], at[90]); MULADD(at[32], at[89]); MULADD(at[33], at[88]); MULADD(at[34], at[87]); MULADD(at[35], at[86]); MULADD(at[36], at[85]); MULADD(at[37], at[84]); MULADD(at[38], at[83]); MULADD(at[39], at[82]); MULADD(at[40], at[81]); MULADD(at[41], at[80]); MULADD(at[42], at[79]); MULADD(at[43], at[78]); MULADD(at[44], at[77]); MULADD(at[45], at[76]); MULADD(at[46], at[75]); MULADD(at[47], at[74]); MULADD(at[48], at[73]); MULADD(at[49], at[72]); MULADD(at[50], at[71]); MULADD(at[51], at[70]); MULADD(at[52], at[69]); MULADD(at[53], at[68]); MULADD(at[54], at[67]); MULADD(at[55], at[66]); MULADD(at[56], at[65]); MULADD(at[57], at[64]); - COMBA_STORE(C->dp[57]); - /* 58 */ - COMBA_FORWARD; - MULADD(at[0], at[122]); MULADD(at[1], at[121]); MULADD(at[2], at[120]); MULADD(at[3], at[119]); MULADD(at[4], at[118]); MULADD(at[5], at[117]); MULADD(at[6], at[116]); MULADD(at[7], at[115]); MULADD(at[8], at[114]); MULADD(at[9], at[113]); MULADD(at[10], at[112]); MULADD(at[11], at[111]); MULADD(at[12], at[110]); MULADD(at[13], at[109]); MULADD(at[14], at[108]); MULADD(at[15], at[107]); MULADD(at[16], at[106]); MULADD(at[17], at[105]); MULADD(at[18], at[104]); MULADD(at[19], at[103]); MULADD(at[20], at[102]); MULADD(at[21], at[101]); MULADD(at[22], at[100]); MULADD(at[23], at[99]); MULADD(at[24], at[98]); MULADD(at[25], at[97]); MULADD(at[26], at[96]); MULADD(at[27], at[95]); MULADD(at[28], at[94]); MULADD(at[29], at[93]); MULADD(at[30], at[92]); MULADD(at[31], at[91]); MULADD(at[32], at[90]); MULADD(at[33], at[89]); MULADD(at[34], at[88]); MULADD(at[35], at[87]); MULADD(at[36], at[86]); MULADD(at[37], at[85]); MULADD(at[38], at[84]); MULADD(at[39], at[83]); MULADD(at[40], at[82]); MULADD(at[41], at[81]); MULADD(at[42], at[80]); MULADD(at[43], at[79]); MULADD(at[44], at[78]); MULADD(at[45], at[77]); MULADD(at[46], at[76]); MULADD(at[47], at[75]); MULADD(at[48], at[74]); MULADD(at[49], at[73]); MULADD(at[50], at[72]); MULADD(at[51], at[71]); MULADD(at[52], at[70]); MULADD(at[53], at[69]); MULADD(at[54], at[68]); MULADD(at[55], at[67]); MULADD(at[56], at[66]); MULADD(at[57], at[65]); MULADD(at[58], at[64]); - COMBA_STORE(C->dp[58]); - /* 59 */ - COMBA_FORWARD; - MULADD(at[0], at[123]); MULADD(at[1], at[122]); MULADD(at[2], at[121]); MULADD(at[3], at[120]); MULADD(at[4], at[119]); MULADD(at[5], at[118]); MULADD(at[6], at[117]); MULADD(at[7], at[116]); MULADD(at[8], at[115]); MULADD(at[9], at[114]); MULADD(at[10], at[113]); MULADD(at[11], at[112]); MULADD(at[12], at[111]); MULADD(at[13], at[110]); MULADD(at[14], at[109]); MULADD(at[15], at[108]); MULADD(at[16], at[107]); MULADD(at[17], at[106]); MULADD(at[18], at[105]); MULADD(at[19], at[104]); MULADD(at[20], at[103]); MULADD(at[21], at[102]); MULADD(at[22], at[101]); MULADD(at[23], at[100]); MULADD(at[24], at[99]); MULADD(at[25], at[98]); MULADD(at[26], at[97]); MULADD(at[27], at[96]); MULADD(at[28], at[95]); MULADD(at[29], at[94]); MULADD(at[30], at[93]); MULADD(at[31], at[92]); MULADD(at[32], at[91]); MULADD(at[33], at[90]); MULADD(at[34], at[89]); MULADD(at[35], at[88]); MULADD(at[36], at[87]); MULADD(at[37], at[86]); MULADD(at[38], at[85]); MULADD(at[39], at[84]); MULADD(at[40], at[83]); MULADD(at[41], at[82]); MULADD(at[42], at[81]); MULADD(at[43], at[80]); MULADD(at[44], at[79]); MULADD(at[45], at[78]); MULADD(at[46], at[77]); MULADD(at[47], at[76]); MULADD(at[48], at[75]); MULADD(at[49], at[74]); MULADD(at[50], at[73]); MULADD(at[51], at[72]); MULADD(at[52], at[71]); MULADD(at[53], at[70]); MULADD(at[54], at[69]); MULADD(at[55], at[68]); MULADD(at[56], at[67]); MULADD(at[57], at[66]); MULADD(at[58], at[65]); MULADD(at[59], at[64]); - COMBA_STORE(C->dp[59]); - /* 60 */ - COMBA_FORWARD; - MULADD(at[0], at[124]); MULADD(at[1], at[123]); MULADD(at[2], at[122]); MULADD(at[3], at[121]); MULADD(at[4], at[120]); MULADD(at[5], at[119]); MULADD(at[6], at[118]); MULADD(at[7], at[117]); MULADD(at[8], at[116]); MULADD(at[9], at[115]); MULADD(at[10], at[114]); MULADD(at[11], at[113]); MULADD(at[12], at[112]); MULADD(at[13], at[111]); MULADD(at[14], at[110]); MULADD(at[15], at[109]); MULADD(at[16], at[108]); MULADD(at[17], at[107]); MULADD(at[18], at[106]); MULADD(at[19], at[105]); MULADD(at[20], at[104]); MULADD(at[21], at[103]); MULADD(at[22], at[102]); MULADD(at[23], at[101]); MULADD(at[24], at[100]); MULADD(at[25], at[99]); MULADD(at[26], at[98]); MULADD(at[27], at[97]); MULADD(at[28], at[96]); MULADD(at[29], at[95]); MULADD(at[30], at[94]); MULADD(at[31], at[93]); MULADD(at[32], at[92]); MULADD(at[33], at[91]); MULADD(at[34], at[90]); MULADD(at[35], at[89]); MULADD(at[36], at[88]); MULADD(at[37], at[87]); MULADD(at[38], at[86]); MULADD(at[39], at[85]); MULADD(at[40], at[84]); MULADD(at[41], at[83]); MULADD(at[42], at[82]); MULADD(at[43], at[81]); MULADD(at[44], at[80]); MULADD(at[45], at[79]); MULADD(at[46], at[78]); MULADD(at[47], at[77]); MULADD(at[48], at[76]); MULADD(at[49], at[75]); MULADD(at[50], at[74]); MULADD(at[51], at[73]); MULADD(at[52], at[72]); MULADD(at[53], at[71]); MULADD(at[54], at[70]); MULADD(at[55], at[69]); MULADD(at[56], at[68]); MULADD(at[57], at[67]); MULADD(at[58], at[66]); MULADD(at[59], at[65]); MULADD(at[60], at[64]); - COMBA_STORE(C->dp[60]); - /* 61 */ - COMBA_FORWARD; - MULADD(at[0], at[125]); MULADD(at[1], at[124]); MULADD(at[2], at[123]); MULADD(at[3], at[122]); MULADD(at[4], at[121]); MULADD(at[5], at[120]); MULADD(at[6], at[119]); MULADD(at[7], at[118]); MULADD(at[8], at[117]); MULADD(at[9], at[116]); MULADD(at[10], at[115]); MULADD(at[11], at[114]); MULADD(at[12], at[113]); MULADD(at[13], at[112]); MULADD(at[14], at[111]); MULADD(at[15], at[110]); MULADD(at[16], at[109]); MULADD(at[17], at[108]); MULADD(at[18], at[107]); MULADD(at[19], at[106]); MULADD(at[20], at[105]); MULADD(at[21], at[104]); MULADD(at[22], at[103]); MULADD(at[23], at[102]); MULADD(at[24], at[101]); MULADD(at[25], at[100]); MULADD(at[26], at[99]); MULADD(at[27], at[98]); MULADD(at[28], at[97]); MULADD(at[29], at[96]); MULADD(at[30], at[95]); MULADD(at[31], at[94]); MULADD(at[32], at[93]); MULADD(at[33], at[92]); MULADD(at[34], at[91]); MULADD(at[35], at[90]); MULADD(at[36], at[89]); MULADD(at[37], at[88]); MULADD(at[38], at[87]); MULADD(at[39], at[86]); MULADD(at[40], at[85]); MULADD(at[41], at[84]); MULADD(at[42], at[83]); MULADD(at[43], at[82]); MULADD(at[44], at[81]); MULADD(at[45], at[80]); MULADD(at[46], at[79]); MULADD(at[47], at[78]); MULADD(at[48], at[77]); MULADD(at[49], at[76]); MULADD(at[50], at[75]); MULADD(at[51], at[74]); MULADD(at[52], at[73]); MULADD(at[53], at[72]); MULADD(at[54], at[71]); MULADD(at[55], at[70]); MULADD(at[56], at[69]); MULADD(at[57], at[68]); MULADD(at[58], at[67]); MULADD(at[59], at[66]); MULADD(at[60], at[65]); MULADD(at[61], at[64]); - COMBA_STORE(C->dp[61]); - /* 62 */ - COMBA_FORWARD; - MULADD(at[0], at[126]); MULADD(at[1], at[125]); MULADD(at[2], at[124]); MULADD(at[3], at[123]); MULADD(at[4], at[122]); MULADD(at[5], at[121]); MULADD(at[6], at[120]); MULADD(at[7], at[119]); MULADD(at[8], at[118]); MULADD(at[9], at[117]); MULADD(at[10], at[116]); MULADD(at[11], at[115]); MULADD(at[12], at[114]); MULADD(at[13], at[113]); MULADD(at[14], at[112]); MULADD(at[15], at[111]); MULADD(at[16], at[110]); MULADD(at[17], at[109]); MULADD(at[18], at[108]); MULADD(at[19], at[107]); MULADD(at[20], at[106]); MULADD(at[21], at[105]); MULADD(at[22], at[104]); MULADD(at[23], at[103]); MULADD(at[24], at[102]); MULADD(at[25], at[101]); MULADD(at[26], at[100]); MULADD(at[27], at[99]); MULADD(at[28], at[98]); MULADD(at[29], at[97]); MULADD(at[30], at[96]); MULADD(at[31], at[95]); MULADD(at[32], at[94]); MULADD(at[33], at[93]); MULADD(at[34], at[92]); MULADD(at[35], at[91]); MULADD(at[36], at[90]); MULADD(at[37], at[89]); MULADD(at[38], at[88]); MULADD(at[39], at[87]); MULADD(at[40], at[86]); MULADD(at[41], at[85]); MULADD(at[42], at[84]); MULADD(at[43], at[83]); MULADD(at[44], at[82]); MULADD(at[45], at[81]); MULADD(at[46], at[80]); MULADD(at[47], at[79]); MULADD(at[48], at[78]); MULADD(at[49], at[77]); MULADD(at[50], at[76]); MULADD(at[51], at[75]); MULADD(at[52], at[74]); MULADD(at[53], at[73]); MULADD(at[54], at[72]); MULADD(at[55], at[71]); MULADD(at[56], at[70]); MULADD(at[57], at[69]); MULADD(at[58], at[68]); MULADD(at[59], at[67]); MULADD(at[60], at[66]); MULADD(at[61], at[65]); MULADD(at[62], at[64]); - COMBA_STORE(C->dp[62]); - /* 63 */ - COMBA_FORWARD; - MULADD(at[0], at[127]); MULADD(at[1], at[126]); MULADD(at[2], at[125]); MULADD(at[3], at[124]); MULADD(at[4], at[123]); MULADD(at[5], at[122]); MULADD(at[6], at[121]); MULADD(at[7], at[120]); MULADD(at[8], at[119]); MULADD(at[9], at[118]); MULADD(at[10], at[117]); MULADD(at[11], at[116]); MULADD(at[12], at[115]); MULADD(at[13], at[114]); MULADD(at[14], at[113]); MULADD(at[15], at[112]); MULADD(at[16], at[111]); MULADD(at[17], at[110]); MULADD(at[18], at[109]); MULADD(at[19], at[108]); MULADD(at[20], at[107]); MULADD(at[21], at[106]); MULADD(at[22], at[105]); MULADD(at[23], at[104]); MULADD(at[24], at[103]); MULADD(at[25], at[102]); MULADD(at[26], at[101]); MULADD(at[27], at[100]); MULADD(at[28], at[99]); MULADD(at[29], at[98]); MULADD(at[30], at[97]); MULADD(at[31], at[96]); MULADD(at[32], at[95]); MULADD(at[33], at[94]); MULADD(at[34], at[93]); MULADD(at[35], at[92]); MULADD(at[36], at[91]); MULADD(at[37], at[90]); MULADD(at[38], at[89]); MULADD(at[39], at[88]); MULADD(at[40], at[87]); MULADD(at[41], at[86]); MULADD(at[42], at[85]); MULADD(at[43], at[84]); MULADD(at[44], at[83]); MULADD(at[45], at[82]); MULADD(at[46], at[81]); MULADD(at[47], at[80]); MULADD(at[48], at[79]); MULADD(at[49], at[78]); MULADD(at[50], at[77]); MULADD(at[51], at[76]); MULADD(at[52], at[75]); MULADD(at[53], at[74]); MULADD(at[54], at[73]); MULADD(at[55], at[72]); MULADD(at[56], at[71]); MULADD(at[57], at[70]); MULADD(at[58], at[69]); MULADD(at[59], at[68]); MULADD(at[60], at[67]); MULADD(at[61], at[66]); MULADD(at[62], at[65]); MULADD(at[63], at[64]); - COMBA_STORE(C->dp[63]); - /* 64 */ - COMBA_FORWARD; - MULADD(at[1], at[127]); MULADD(at[2], at[126]); MULADD(at[3], at[125]); MULADD(at[4], at[124]); MULADD(at[5], at[123]); MULADD(at[6], at[122]); MULADD(at[7], at[121]); MULADD(at[8], at[120]); MULADD(at[9], at[119]); MULADD(at[10], at[118]); MULADD(at[11], at[117]); MULADD(at[12], at[116]); MULADD(at[13], at[115]); MULADD(at[14], at[114]); MULADD(at[15], at[113]); MULADD(at[16], at[112]); MULADD(at[17], at[111]); MULADD(at[18], at[110]); MULADD(at[19], at[109]); MULADD(at[20], at[108]); MULADD(at[21], at[107]); MULADD(at[22], at[106]); MULADD(at[23], at[105]); MULADD(at[24], at[104]); MULADD(at[25], at[103]); MULADD(at[26], at[102]); MULADD(at[27], at[101]); MULADD(at[28], at[100]); MULADD(at[29], at[99]); MULADD(at[30], at[98]); MULADD(at[31], at[97]); MULADD(at[32], at[96]); MULADD(at[33], at[95]); MULADD(at[34], at[94]); MULADD(at[35], at[93]); MULADD(at[36], at[92]); MULADD(at[37], at[91]); MULADD(at[38], at[90]); MULADD(at[39], at[89]); MULADD(at[40], at[88]); MULADD(at[41], at[87]); MULADD(at[42], at[86]); MULADD(at[43], at[85]); MULADD(at[44], at[84]); MULADD(at[45], at[83]); MULADD(at[46], at[82]); MULADD(at[47], at[81]); MULADD(at[48], at[80]); MULADD(at[49], at[79]); MULADD(at[50], at[78]); MULADD(at[51], at[77]); MULADD(at[52], at[76]); MULADD(at[53], at[75]); MULADD(at[54], at[74]); MULADD(at[55], at[73]); MULADD(at[56], at[72]); MULADD(at[57], at[71]); MULADD(at[58], at[70]); MULADD(at[59], at[69]); MULADD(at[60], at[68]); MULADD(at[61], at[67]); MULADD(at[62], at[66]); MULADD(at[63], at[65]); - COMBA_STORE(C->dp[64]); - /* 65 */ - COMBA_FORWARD; - MULADD(at[2], at[127]); MULADD(at[3], at[126]); MULADD(at[4], at[125]); MULADD(at[5], at[124]); MULADD(at[6], at[123]); MULADD(at[7], at[122]); MULADD(at[8], at[121]); MULADD(at[9], at[120]); MULADD(at[10], at[119]); MULADD(at[11], at[118]); MULADD(at[12], at[117]); MULADD(at[13], at[116]); MULADD(at[14], at[115]); MULADD(at[15], at[114]); MULADD(at[16], at[113]); MULADD(at[17], at[112]); MULADD(at[18], at[111]); MULADD(at[19], at[110]); MULADD(at[20], at[109]); MULADD(at[21], at[108]); MULADD(at[22], at[107]); MULADD(at[23], at[106]); MULADD(at[24], at[105]); MULADD(at[25], at[104]); MULADD(at[26], at[103]); MULADD(at[27], at[102]); MULADD(at[28], at[101]); MULADD(at[29], at[100]); MULADD(at[30], at[99]); MULADD(at[31], at[98]); MULADD(at[32], at[97]); MULADD(at[33], at[96]); MULADD(at[34], at[95]); MULADD(at[35], at[94]); MULADD(at[36], at[93]); MULADD(at[37], at[92]); MULADD(at[38], at[91]); MULADD(at[39], at[90]); MULADD(at[40], at[89]); MULADD(at[41], at[88]); MULADD(at[42], at[87]); MULADD(at[43], at[86]); MULADD(at[44], at[85]); MULADD(at[45], at[84]); MULADD(at[46], at[83]); MULADD(at[47], at[82]); MULADD(at[48], at[81]); MULADD(at[49], at[80]); MULADD(at[50], at[79]); MULADD(at[51], at[78]); MULADD(at[52], at[77]); MULADD(at[53], at[76]); MULADD(at[54], at[75]); MULADD(at[55], at[74]); MULADD(at[56], at[73]); MULADD(at[57], at[72]); MULADD(at[58], at[71]); MULADD(at[59], at[70]); MULADD(at[60], at[69]); MULADD(at[61], at[68]); MULADD(at[62], at[67]); MULADD(at[63], at[66]); - COMBA_STORE(C->dp[65]); - /* 66 */ - COMBA_FORWARD; - MULADD(at[3], at[127]); MULADD(at[4], at[126]); MULADD(at[5], at[125]); MULADD(at[6], at[124]); MULADD(at[7], at[123]); MULADD(at[8], at[122]); MULADD(at[9], at[121]); MULADD(at[10], at[120]); MULADD(at[11], at[119]); MULADD(at[12], at[118]); MULADD(at[13], at[117]); MULADD(at[14], at[116]); MULADD(at[15], at[115]); MULADD(at[16], at[114]); MULADD(at[17], at[113]); MULADD(at[18], at[112]); MULADD(at[19], at[111]); MULADD(at[20], at[110]); MULADD(at[21], at[109]); MULADD(at[22], at[108]); MULADD(at[23], at[107]); MULADD(at[24], at[106]); MULADD(at[25], at[105]); MULADD(at[26], at[104]); MULADD(at[27], at[103]); MULADD(at[28], at[102]); MULADD(at[29], at[101]); MULADD(at[30], at[100]); MULADD(at[31], at[99]); MULADD(at[32], at[98]); MULADD(at[33], at[97]); MULADD(at[34], at[96]); MULADD(at[35], at[95]); MULADD(at[36], at[94]); MULADD(at[37], at[93]); MULADD(at[38], at[92]); MULADD(at[39], at[91]); MULADD(at[40], at[90]); MULADD(at[41], at[89]); MULADD(at[42], at[88]); MULADD(at[43], at[87]); MULADD(at[44], at[86]); MULADD(at[45], at[85]); MULADD(at[46], at[84]); MULADD(at[47], at[83]); MULADD(at[48], at[82]); MULADD(at[49], at[81]); MULADD(at[50], at[80]); MULADD(at[51], at[79]); MULADD(at[52], at[78]); MULADD(at[53], at[77]); MULADD(at[54], at[76]); MULADD(at[55], at[75]); MULADD(at[56], at[74]); MULADD(at[57], at[73]); MULADD(at[58], at[72]); MULADD(at[59], at[71]); MULADD(at[60], at[70]); MULADD(at[61], at[69]); MULADD(at[62], at[68]); MULADD(at[63], at[67]); - COMBA_STORE(C->dp[66]); - /* 67 */ - COMBA_FORWARD; - MULADD(at[4], at[127]); MULADD(at[5], at[126]); MULADD(at[6], at[125]); MULADD(at[7], at[124]); MULADD(at[8], at[123]); MULADD(at[9], at[122]); MULADD(at[10], at[121]); MULADD(at[11], at[120]); MULADD(at[12], at[119]); MULADD(at[13], at[118]); MULADD(at[14], at[117]); MULADD(at[15], at[116]); MULADD(at[16], at[115]); MULADD(at[17], at[114]); MULADD(at[18], at[113]); MULADD(at[19], at[112]); MULADD(at[20], at[111]); MULADD(at[21], at[110]); MULADD(at[22], at[109]); MULADD(at[23], at[108]); MULADD(at[24], at[107]); MULADD(at[25], at[106]); MULADD(at[26], at[105]); MULADD(at[27], at[104]); MULADD(at[28], at[103]); MULADD(at[29], at[102]); MULADD(at[30], at[101]); MULADD(at[31], at[100]); MULADD(at[32], at[99]); MULADD(at[33], at[98]); MULADD(at[34], at[97]); MULADD(at[35], at[96]); MULADD(at[36], at[95]); MULADD(at[37], at[94]); MULADD(at[38], at[93]); MULADD(at[39], at[92]); MULADD(at[40], at[91]); MULADD(at[41], at[90]); MULADD(at[42], at[89]); MULADD(at[43], at[88]); MULADD(at[44], at[87]); MULADD(at[45], at[86]); MULADD(at[46], at[85]); MULADD(at[47], at[84]); MULADD(at[48], at[83]); MULADD(at[49], at[82]); MULADD(at[50], at[81]); MULADD(at[51], at[80]); MULADD(at[52], at[79]); MULADD(at[53], at[78]); MULADD(at[54], at[77]); MULADD(at[55], at[76]); MULADD(at[56], at[75]); MULADD(at[57], at[74]); MULADD(at[58], at[73]); MULADD(at[59], at[72]); MULADD(at[60], at[71]); MULADD(at[61], at[70]); MULADD(at[62], at[69]); MULADD(at[63], at[68]); - COMBA_STORE(C->dp[67]); - /* 68 */ - COMBA_FORWARD; - MULADD(at[5], at[127]); MULADD(at[6], at[126]); MULADD(at[7], at[125]); MULADD(at[8], at[124]); MULADD(at[9], at[123]); MULADD(at[10], at[122]); MULADD(at[11], at[121]); MULADD(at[12], at[120]); MULADD(at[13], at[119]); MULADD(at[14], at[118]); MULADD(at[15], at[117]); MULADD(at[16], at[116]); MULADD(at[17], at[115]); MULADD(at[18], at[114]); MULADD(at[19], at[113]); MULADD(at[20], at[112]); MULADD(at[21], at[111]); MULADD(at[22], at[110]); MULADD(at[23], at[109]); MULADD(at[24], at[108]); MULADD(at[25], at[107]); MULADD(at[26], at[106]); MULADD(at[27], at[105]); MULADD(at[28], at[104]); MULADD(at[29], at[103]); MULADD(at[30], at[102]); MULADD(at[31], at[101]); MULADD(at[32], at[100]); MULADD(at[33], at[99]); MULADD(at[34], at[98]); MULADD(at[35], at[97]); MULADD(at[36], at[96]); MULADD(at[37], at[95]); MULADD(at[38], at[94]); MULADD(at[39], at[93]); MULADD(at[40], at[92]); MULADD(at[41], at[91]); MULADD(at[42], at[90]); MULADD(at[43], at[89]); MULADD(at[44], at[88]); MULADD(at[45], at[87]); MULADD(at[46], at[86]); MULADD(at[47], at[85]); MULADD(at[48], at[84]); MULADD(at[49], at[83]); MULADD(at[50], at[82]); MULADD(at[51], at[81]); MULADD(at[52], at[80]); MULADD(at[53], at[79]); MULADD(at[54], at[78]); MULADD(at[55], at[77]); MULADD(at[56], at[76]); MULADD(at[57], at[75]); MULADD(at[58], at[74]); MULADD(at[59], at[73]); MULADD(at[60], at[72]); MULADD(at[61], at[71]); MULADD(at[62], at[70]); MULADD(at[63], at[69]); - COMBA_STORE(C->dp[68]); - /* 69 */ - COMBA_FORWARD; - MULADD(at[6], at[127]); MULADD(at[7], at[126]); MULADD(at[8], at[125]); MULADD(at[9], at[124]); MULADD(at[10], at[123]); MULADD(at[11], at[122]); MULADD(at[12], at[121]); MULADD(at[13], at[120]); MULADD(at[14], at[119]); MULADD(at[15], at[118]); MULADD(at[16], at[117]); MULADD(at[17], at[116]); MULADD(at[18], at[115]); MULADD(at[19], at[114]); MULADD(at[20], at[113]); MULADD(at[21], at[112]); MULADD(at[22], at[111]); MULADD(at[23], at[110]); MULADD(at[24], at[109]); MULADD(at[25], at[108]); MULADD(at[26], at[107]); MULADD(at[27], at[106]); MULADD(at[28], at[105]); MULADD(at[29], at[104]); MULADD(at[30], at[103]); MULADD(at[31], at[102]); MULADD(at[32], at[101]); MULADD(at[33], at[100]); MULADD(at[34], at[99]); MULADD(at[35], at[98]); MULADD(at[36], at[97]); MULADD(at[37], at[96]); MULADD(at[38], at[95]); MULADD(at[39], at[94]); MULADD(at[40], at[93]); MULADD(at[41], at[92]); MULADD(at[42], at[91]); MULADD(at[43], at[90]); MULADD(at[44], at[89]); MULADD(at[45], at[88]); MULADD(at[46], at[87]); MULADD(at[47], at[86]); MULADD(at[48], at[85]); MULADD(at[49], at[84]); MULADD(at[50], at[83]); MULADD(at[51], at[82]); MULADD(at[52], at[81]); MULADD(at[53], at[80]); MULADD(at[54], at[79]); MULADD(at[55], at[78]); MULADD(at[56], at[77]); MULADD(at[57], at[76]); MULADD(at[58], at[75]); MULADD(at[59], at[74]); MULADD(at[60], at[73]); MULADD(at[61], at[72]); MULADD(at[62], at[71]); MULADD(at[63], at[70]); - COMBA_STORE(C->dp[69]); - /* 70 */ - COMBA_FORWARD; - MULADD(at[7], at[127]); MULADD(at[8], at[126]); MULADD(at[9], at[125]); MULADD(at[10], at[124]); MULADD(at[11], at[123]); MULADD(at[12], at[122]); MULADD(at[13], at[121]); MULADD(at[14], at[120]); MULADD(at[15], at[119]); MULADD(at[16], at[118]); MULADD(at[17], at[117]); MULADD(at[18], at[116]); MULADD(at[19], at[115]); MULADD(at[20], at[114]); MULADD(at[21], at[113]); MULADD(at[22], at[112]); MULADD(at[23], at[111]); MULADD(at[24], at[110]); MULADD(at[25], at[109]); MULADD(at[26], at[108]); MULADD(at[27], at[107]); MULADD(at[28], at[106]); MULADD(at[29], at[105]); MULADD(at[30], at[104]); MULADD(at[31], at[103]); MULADD(at[32], at[102]); MULADD(at[33], at[101]); MULADD(at[34], at[100]); MULADD(at[35], at[99]); MULADD(at[36], at[98]); MULADD(at[37], at[97]); MULADD(at[38], at[96]); MULADD(at[39], at[95]); MULADD(at[40], at[94]); MULADD(at[41], at[93]); MULADD(at[42], at[92]); MULADD(at[43], at[91]); MULADD(at[44], at[90]); MULADD(at[45], at[89]); MULADD(at[46], at[88]); MULADD(at[47], at[87]); MULADD(at[48], at[86]); MULADD(at[49], at[85]); MULADD(at[50], at[84]); MULADD(at[51], at[83]); MULADD(at[52], at[82]); MULADD(at[53], at[81]); MULADD(at[54], at[80]); MULADD(at[55], at[79]); MULADD(at[56], at[78]); MULADD(at[57], at[77]); MULADD(at[58], at[76]); MULADD(at[59], at[75]); MULADD(at[60], at[74]); MULADD(at[61], at[73]); MULADD(at[62], at[72]); MULADD(at[63], at[71]); - COMBA_STORE(C->dp[70]); - /* 71 */ - COMBA_FORWARD; - MULADD(at[8], at[127]); MULADD(at[9], at[126]); MULADD(at[10], at[125]); MULADD(at[11], at[124]); MULADD(at[12], at[123]); MULADD(at[13], at[122]); MULADD(at[14], at[121]); MULADD(at[15], at[120]); MULADD(at[16], at[119]); MULADD(at[17], at[118]); MULADD(at[18], at[117]); MULADD(at[19], at[116]); MULADD(at[20], at[115]); MULADD(at[21], at[114]); MULADD(at[22], at[113]); MULADD(at[23], at[112]); MULADD(at[24], at[111]); MULADD(at[25], at[110]); MULADD(at[26], at[109]); MULADD(at[27], at[108]); MULADD(at[28], at[107]); MULADD(at[29], at[106]); MULADD(at[30], at[105]); MULADD(at[31], at[104]); MULADD(at[32], at[103]); MULADD(at[33], at[102]); MULADD(at[34], at[101]); MULADD(at[35], at[100]); MULADD(at[36], at[99]); MULADD(at[37], at[98]); MULADD(at[38], at[97]); MULADD(at[39], at[96]); MULADD(at[40], at[95]); MULADD(at[41], at[94]); MULADD(at[42], at[93]); MULADD(at[43], at[92]); MULADD(at[44], at[91]); MULADD(at[45], at[90]); MULADD(at[46], at[89]); MULADD(at[47], at[88]); MULADD(at[48], at[87]); MULADD(at[49], at[86]); MULADD(at[50], at[85]); MULADD(at[51], at[84]); MULADD(at[52], at[83]); MULADD(at[53], at[82]); MULADD(at[54], at[81]); MULADD(at[55], at[80]); MULADD(at[56], at[79]); MULADD(at[57], at[78]); MULADD(at[58], at[77]); MULADD(at[59], at[76]); MULADD(at[60], at[75]); MULADD(at[61], at[74]); MULADD(at[62], at[73]); MULADD(at[63], at[72]); - COMBA_STORE(C->dp[71]); - /* 72 */ - COMBA_FORWARD; - MULADD(at[9], at[127]); MULADD(at[10], at[126]); MULADD(at[11], at[125]); MULADD(at[12], at[124]); MULADD(at[13], at[123]); MULADD(at[14], at[122]); MULADD(at[15], at[121]); MULADD(at[16], at[120]); MULADD(at[17], at[119]); MULADD(at[18], at[118]); MULADD(at[19], at[117]); MULADD(at[20], at[116]); MULADD(at[21], at[115]); MULADD(at[22], at[114]); MULADD(at[23], at[113]); MULADD(at[24], at[112]); MULADD(at[25], at[111]); MULADD(at[26], at[110]); MULADD(at[27], at[109]); MULADD(at[28], at[108]); MULADD(at[29], at[107]); MULADD(at[30], at[106]); MULADD(at[31], at[105]); MULADD(at[32], at[104]); MULADD(at[33], at[103]); MULADD(at[34], at[102]); MULADD(at[35], at[101]); MULADD(at[36], at[100]); MULADD(at[37], at[99]); MULADD(at[38], at[98]); MULADD(at[39], at[97]); MULADD(at[40], at[96]); MULADD(at[41], at[95]); MULADD(at[42], at[94]); MULADD(at[43], at[93]); MULADD(at[44], at[92]); MULADD(at[45], at[91]); MULADD(at[46], at[90]); MULADD(at[47], at[89]); MULADD(at[48], at[88]); MULADD(at[49], at[87]); MULADD(at[50], at[86]); MULADD(at[51], at[85]); MULADD(at[52], at[84]); MULADD(at[53], at[83]); MULADD(at[54], at[82]); MULADD(at[55], at[81]); MULADD(at[56], at[80]); MULADD(at[57], at[79]); MULADD(at[58], at[78]); MULADD(at[59], at[77]); MULADD(at[60], at[76]); MULADD(at[61], at[75]); MULADD(at[62], at[74]); MULADD(at[63], at[73]); - COMBA_STORE(C->dp[72]); - /* 73 */ - COMBA_FORWARD; - MULADD(at[10], at[127]); MULADD(at[11], at[126]); MULADD(at[12], at[125]); MULADD(at[13], at[124]); MULADD(at[14], at[123]); MULADD(at[15], at[122]); MULADD(at[16], at[121]); MULADD(at[17], at[120]); MULADD(at[18], at[119]); MULADD(at[19], at[118]); MULADD(at[20], at[117]); MULADD(at[21], at[116]); MULADD(at[22], at[115]); MULADD(at[23], at[114]); MULADD(at[24], at[113]); MULADD(at[25], at[112]); MULADD(at[26], at[111]); MULADD(at[27], at[110]); MULADD(at[28], at[109]); MULADD(at[29], at[108]); MULADD(at[30], at[107]); MULADD(at[31], at[106]); MULADD(at[32], at[105]); MULADD(at[33], at[104]); MULADD(at[34], at[103]); MULADD(at[35], at[102]); MULADD(at[36], at[101]); MULADD(at[37], at[100]); MULADD(at[38], at[99]); MULADD(at[39], at[98]); MULADD(at[40], at[97]); MULADD(at[41], at[96]); MULADD(at[42], at[95]); MULADD(at[43], at[94]); MULADD(at[44], at[93]); MULADD(at[45], at[92]); MULADD(at[46], at[91]); MULADD(at[47], at[90]); MULADD(at[48], at[89]); MULADD(at[49], at[88]); MULADD(at[50], at[87]); MULADD(at[51], at[86]); MULADD(at[52], at[85]); MULADD(at[53], at[84]); MULADD(at[54], at[83]); MULADD(at[55], at[82]); MULADD(at[56], at[81]); MULADD(at[57], at[80]); MULADD(at[58], at[79]); MULADD(at[59], at[78]); MULADD(at[60], at[77]); MULADD(at[61], at[76]); MULADD(at[62], at[75]); MULADD(at[63], at[74]); - COMBA_STORE(C->dp[73]); - /* 74 */ - COMBA_FORWARD; - MULADD(at[11], at[127]); MULADD(at[12], at[126]); MULADD(at[13], at[125]); MULADD(at[14], at[124]); MULADD(at[15], at[123]); MULADD(at[16], at[122]); MULADD(at[17], at[121]); MULADD(at[18], at[120]); MULADD(at[19], at[119]); MULADD(at[20], at[118]); MULADD(at[21], at[117]); MULADD(at[22], at[116]); MULADD(at[23], at[115]); MULADD(at[24], at[114]); MULADD(at[25], at[113]); MULADD(at[26], at[112]); MULADD(at[27], at[111]); MULADD(at[28], at[110]); MULADD(at[29], at[109]); MULADD(at[30], at[108]); MULADD(at[31], at[107]); MULADD(at[32], at[106]); MULADD(at[33], at[105]); MULADD(at[34], at[104]); MULADD(at[35], at[103]); MULADD(at[36], at[102]); MULADD(at[37], at[101]); MULADD(at[38], at[100]); MULADD(at[39], at[99]); MULADD(at[40], at[98]); MULADD(at[41], at[97]); MULADD(at[42], at[96]); MULADD(at[43], at[95]); MULADD(at[44], at[94]); MULADD(at[45], at[93]); MULADD(at[46], at[92]); MULADD(at[47], at[91]); MULADD(at[48], at[90]); MULADD(at[49], at[89]); MULADD(at[50], at[88]); MULADD(at[51], at[87]); MULADD(at[52], at[86]); MULADD(at[53], at[85]); MULADD(at[54], at[84]); MULADD(at[55], at[83]); MULADD(at[56], at[82]); MULADD(at[57], at[81]); MULADD(at[58], at[80]); MULADD(at[59], at[79]); MULADD(at[60], at[78]); MULADD(at[61], at[77]); MULADD(at[62], at[76]); MULADD(at[63], at[75]); - COMBA_STORE(C->dp[74]); - /* 75 */ - COMBA_FORWARD; - MULADD(at[12], at[127]); MULADD(at[13], at[126]); MULADD(at[14], at[125]); MULADD(at[15], at[124]); MULADD(at[16], at[123]); MULADD(at[17], at[122]); MULADD(at[18], at[121]); MULADD(at[19], at[120]); MULADD(at[20], at[119]); MULADD(at[21], at[118]); MULADD(at[22], at[117]); MULADD(at[23], at[116]); MULADD(at[24], at[115]); MULADD(at[25], at[114]); MULADD(at[26], at[113]); MULADD(at[27], at[112]); MULADD(at[28], at[111]); MULADD(at[29], at[110]); MULADD(at[30], at[109]); MULADD(at[31], at[108]); MULADD(at[32], at[107]); MULADD(at[33], at[106]); MULADD(at[34], at[105]); MULADD(at[35], at[104]); MULADD(at[36], at[103]); MULADD(at[37], at[102]); MULADD(at[38], at[101]); MULADD(at[39], at[100]); MULADD(at[40], at[99]); MULADD(at[41], at[98]); MULADD(at[42], at[97]); MULADD(at[43], at[96]); MULADD(at[44], at[95]); MULADD(at[45], at[94]); MULADD(at[46], at[93]); MULADD(at[47], at[92]); MULADD(at[48], at[91]); MULADD(at[49], at[90]); MULADD(at[50], at[89]); MULADD(at[51], at[88]); MULADD(at[52], at[87]); MULADD(at[53], at[86]); MULADD(at[54], at[85]); MULADD(at[55], at[84]); MULADD(at[56], at[83]); MULADD(at[57], at[82]); MULADD(at[58], at[81]); MULADD(at[59], at[80]); MULADD(at[60], at[79]); MULADD(at[61], at[78]); MULADD(at[62], at[77]); MULADD(at[63], at[76]); - COMBA_STORE(C->dp[75]); - /* 76 */ - COMBA_FORWARD; - MULADD(at[13], at[127]); MULADD(at[14], at[126]); MULADD(at[15], at[125]); MULADD(at[16], at[124]); MULADD(at[17], at[123]); MULADD(at[18], at[122]); MULADD(at[19], at[121]); MULADD(at[20], at[120]); MULADD(at[21], at[119]); MULADD(at[22], at[118]); MULADD(at[23], at[117]); MULADD(at[24], at[116]); MULADD(at[25], at[115]); MULADD(at[26], at[114]); MULADD(at[27], at[113]); MULADD(at[28], at[112]); MULADD(at[29], at[111]); MULADD(at[30], at[110]); MULADD(at[31], at[109]); MULADD(at[32], at[108]); MULADD(at[33], at[107]); MULADD(at[34], at[106]); MULADD(at[35], at[105]); MULADD(at[36], at[104]); MULADD(at[37], at[103]); MULADD(at[38], at[102]); MULADD(at[39], at[101]); MULADD(at[40], at[100]); MULADD(at[41], at[99]); MULADD(at[42], at[98]); MULADD(at[43], at[97]); MULADD(at[44], at[96]); MULADD(at[45], at[95]); MULADD(at[46], at[94]); MULADD(at[47], at[93]); MULADD(at[48], at[92]); MULADD(at[49], at[91]); MULADD(at[50], at[90]); MULADD(at[51], at[89]); MULADD(at[52], at[88]); MULADD(at[53], at[87]); MULADD(at[54], at[86]); MULADD(at[55], at[85]); MULADD(at[56], at[84]); MULADD(at[57], at[83]); MULADD(at[58], at[82]); MULADD(at[59], at[81]); MULADD(at[60], at[80]); MULADD(at[61], at[79]); MULADD(at[62], at[78]); MULADD(at[63], at[77]); - COMBA_STORE(C->dp[76]); - /* 77 */ - COMBA_FORWARD; - MULADD(at[14], at[127]); MULADD(at[15], at[126]); MULADD(at[16], at[125]); MULADD(at[17], at[124]); MULADD(at[18], at[123]); MULADD(at[19], at[122]); MULADD(at[20], at[121]); MULADD(at[21], at[120]); MULADD(at[22], at[119]); MULADD(at[23], at[118]); MULADD(at[24], at[117]); MULADD(at[25], at[116]); MULADD(at[26], at[115]); MULADD(at[27], at[114]); MULADD(at[28], at[113]); MULADD(at[29], at[112]); MULADD(at[30], at[111]); MULADD(at[31], at[110]); MULADD(at[32], at[109]); MULADD(at[33], at[108]); MULADD(at[34], at[107]); MULADD(at[35], at[106]); MULADD(at[36], at[105]); MULADD(at[37], at[104]); MULADD(at[38], at[103]); MULADD(at[39], at[102]); MULADD(at[40], at[101]); MULADD(at[41], at[100]); MULADD(at[42], at[99]); MULADD(at[43], at[98]); MULADD(at[44], at[97]); MULADD(at[45], at[96]); MULADD(at[46], at[95]); MULADD(at[47], at[94]); MULADD(at[48], at[93]); MULADD(at[49], at[92]); MULADD(at[50], at[91]); MULADD(at[51], at[90]); MULADD(at[52], at[89]); MULADD(at[53], at[88]); MULADD(at[54], at[87]); MULADD(at[55], at[86]); MULADD(at[56], at[85]); MULADD(at[57], at[84]); MULADD(at[58], at[83]); MULADD(at[59], at[82]); MULADD(at[60], at[81]); MULADD(at[61], at[80]); MULADD(at[62], at[79]); MULADD(at[63], at[78]); - COMBA_STORE(C->dp[77]); - /* 78 */ - COMBA_FORWARD; - MULADD(at[15], at[127]); MULADD(at[16], at[126]); MULADD(at[17], at[125]); MULADD(at[18], at[124]); MULADD(at[19], at[123]); MULADD(at[20], at[122]); MULADD(at[21], at[121]); MULADD(at[22], at[120]); MULADD(at[23], at[119]); MULADD(at[24], at[118]); MULADD(at[25], at[117]); MULADD(at[26], at[116]); MULADD(at[27], at[115]); MULADD(at[28], at[114]); MULADD(at[29], at[113]); MULADD(at[30], at[112]); MULADD(at[31], at[111]); MULADD(at[32], at[110]); MULADD(at[33], at[109]); MULADD(at[34], at[108]); MULADD(at[35], at[107]); MULADD(at[36], at[106]); MULADD(at[37], at[105]); MULADD(at[38], at[104]); MULADD(at[39], at[103]); MULADD(at[40], at[102]); MULADD(at[41], at[101]); MULADD(at[42], at[100]); MULADD(at[43], at[99]); MULADD(at[44], at[98]); MULADD(at[45], at[97]); MULADD(at[46], at[96]); MULADD(at[47], at[95]); MULADD(at[48], at[94]); MULADD(at[49], at[93]); MULADD(at[50], at[92]); MULADD(at[51], at[91]); MULADD(at[52], at[90]); MULADD(at[53], at[89]); MULADD(at[54], at[88]); MULADD(at[55], at[87]); MULADD(at[56], at[86]); MULADD(at[57], at[85]); MULADD(at[58], at[84]); MULADD(at[59], at[83]); MULADD(at[60], at[82]); MULADD(at[61], at[81]); MULADD(at[62], at[80]); MULADD(at[63], at[79]); - COMBA_STORE(C->dp[78]); - /* 79 */ - COMBA_FORWARD; - MULADD(at[16], at[127]); MULADD(at[17], at[126]); MULADD(at[18], at[125]); MULADD(at[19], at[124]); MULADD(at[20], at[123]); MULADD(at[21], at[122]); MULADD(at[22], at[121]); MULADD(at[23], at[120]); MULADD(at[24], at[119]); MULADD(at[25], at[118]); MULADD(at[26], at[117]); MULADD(at[27], at[116]); MULADD(at[28], at[115]); MULADD(at[29], at[114]); MULADD(at[30], at[113]); MULADD(at[31], at[112]); MULADD(at[32], at[111]); MULADD(at[33], at[110]); MULADD(at[34], at[109]); MULADD(at[35], at[108]); MULADD(at[36], at[107]); MULADD(at[37], at[106]); MULADD(at[38], at[105]); MULADD(at[39], at[104]); MULADD(at[40], at[103]); MULADD(at[41], at[102]); MULADD(at[42], at[101]); MULADD(at[43], at[100]); MULADD(at[44], at[99]); MULADD(at[45], at[98]); MULADD(at[46], at[97]); MULADD(at[47], at[96]); MULADD(at[48], at[95]); MULADD(at[49], at[94]); MULADD(at[50], at[93]); MULADD(at[51], at[92]); MULADD(at[52], at[91]); MULADD(at[53], at[90]); MULADD(at[54], at[89]); MULADD(at[55], at[88]); MULADD(at[56], at[87]); MULADD(at[57], at[86]); MULADD(at[58], at[85]); MULADD(at[59], at[84]); MULADD(at[60], at[83]); MULADD(at[61], at[82]); MULADD(at[62], at[81]); MULADD(at[63], at[80]); - COMBA_STORE(C->dp[79]); - /* 80 */ - COMBA_FORWARD; - MULADD(at[17], at[127]); MULADD(at[18], at[126]); MULADD(at[19], at[125]); MULADD(at[20], at[124]); MULADD(at[21], at[123]); MULADD(at[22], at[122]); MULADD(at[23], at[121]); MULADD(at[24], at[120]); MULADD(at[25], at[119]); MULADD(at[26], at[118]); MULADD(at[27], at[117]); MULADD(at[28], at[116]); MULADD(at[29], at[115]); MULADD(at[30], at[114]); MULADD(at[31], at[113]); MULADD(at[32], at[112]); MULADD(at[33], at[111]); MULADD(at[34], at[110]); MULADD(at[35], at[109]); MULADD(at[36], at[108]); MULADD(at[37], at[107]); MULADD(at[38], at[106]); MULADD(at[39], at[105]); MULADD(at[40], at[104]); MULADD(at[41], at[103]); MULADD(at[42], at[102]); MULADD(at[43], at[101]); MULADD(at[44], at[100]); MULADD(at[45], at[99]); MULADD(at[46], at[98]); MULADD(at[47], at[97]); MULADD(at[48], at[96]); MULADD(at[49], at[95]); MULADD(at[50], at[94]); MULADD(at[51], at[93]); MULADD(at[52], at[92]); MULADD(at[53], at[91]); MULADD(at[54], at[90]); MULADD(at[55], at[89]); MULADD(at[56], at[88]); MULADD(at[57], at[87]); MULADD(at[58], at[86]); MULADD(at[59], at[85]); MULADD(at[60], at[84]); MULADD(at[61], at[83]); MULADD(at[62], at[82]); MULADD(at[63], at[81]); - COMBA_STORE(C->dp[80]); - /* 81 */ - COMBA_FORWARD; - MULADD(at[18], at[127]); MULADD(at[19], at[126]); MULADD(at[20], at[125]); MULADD(at[21], at[124]); MULADD(at[22], at[123]); MULADD(at[23], at[122]); MULADD(at[24], at[121]); MULADD(at[25], at[120]); MULADD(at[26], at[119]); MULADD(at[27], at[118]); MULADD(at[28], at[117]); MULADD(at[29], at[116]); MULADD(at[30], at[115]); MULADD(at[31], at[114]); MULADD(at[32], at[113]); MULADD(at[33], at[112]); MULADD(at[34], at[111]); MULADD(at[35], at[110]); MULADD(at[36], at[109]); MULADD(at[37], at[108]); MULADD(at[38], at[107]); MULADD(at[39], at[106]); MULADD(at[40], at[105]); MULADD(at[41], at[104]); MULADD(at[42], at[103]); MULADD(at[43], at[102]); MULADD(at[44], at[101]); MULADD(at[45], at[100]); MULADD(at[46], at[99]); MULADD(at[47], at[98]); MULADD(at[48], at[97]); MULADD(at[49], at[96]); MULADD(at[50], at[95]); MULADD(at[51], at[94]); MULADD(at[52], at[93]); MULADD(at[53], at[92]); MULADD(at[54], at[91]); MULADD(at[55], at[90]); MULADD(at[56], at[89]); MULADD(at[57], at[88]); MULADD(at[58], at[87]); MULADD(at[59], at[86]); MULADD(at[60], at[85]); MULADD(at[61], at[84]); MULADD(at[62], at[83]); MULADD(at[63], at[82]); - COMBA_STORE(C->dp[81]); - /* 82 */ - COMBA_FORWARD; - MULADD(at[19], at[127]); MULADD(at[20], at[126]); MULADD(at[21], at[125]); MULADD(at[22], at[124]); MULADD(at[23], at[123]); MULADD(at[24], at[122]); MULADD(at[25], at[121]); MULADD(at[26], at[120]); MULADD(at[27], at[119]); MULADD(at[28], at[118]); MULADD(at[29], at[117]); MULADD(at[30], at[116]); MULADD(at[31], at[115]); MULADD(at[32], at[114]); MULADD(at[33], at[113]); MULADD(at[34], at[112]); MULADD(at[35], at[111]); MULADD(at[36], at[110]); MULADD(at[37], at[109]); MULADD(at[38], at[108]); MULADD(at[39], at[107]); MULADD(at[40], at[106]); MULADD(at[41], at[105]); MULADD(at[42], at[104]); MULADD(at[43], at[103]); MULADD(at[44], at[102]); MULADD(at[45], at[101]); MULADD(at[46], at[100]); MULADD(at[47], at[99]); MULADD(at[48], at[98]); MULADD(at[49], at[97]); MULADD(at[50], at[96]); MULADD(at[51], at[95]); MULADD(at[52], at[94]); MULADD(at[53], at[93]); MULADD(at[54], at[92]); MULADD(at[55], at[91]); MULADD(at[56], at[90]); MULADD(at[57], at[89]); MULADD(at[58], at[88]); MULADD(at[59], at[87]); MULADD(at[60], at[86]); MULADD(at[61], at[85]); MULADD(at[62], at[84]); MULADD(at[63], at[83]); - COMBA_STORE(C->dp[82]); - /* 83 */ - COMBA_FORWARD; - MULADD(at[20], at[127]); MULADD(at[21], at[126]); MULADD(at[22], at[125]); MULADD(at[23], at[124]); MULADD(at[24], at[123]); MULADD(at[25], at[122]); MULADD(at[26], at[121]); MULADD(at[27], at[120]); MULADD(at[28], at[119]); MULADD(at[29], at[118]); MULADD(at[30], at[117]); MULADD(at[31], at[116]); MULADD(at[32], at[115]); MULADD(at[33], at[114]); MULADD(at[34], at[113]); MULADD(at[35], at[112]); MULADD(at[36], at[111]); MULADD(at[37], at[110]); MULADD(at[38], at[109]); MULADD(at[39], at[108]); MULADD(at[40], at[107]); MULADD(at[41], at[106]); MULADD(at[42], at[105]); MULADD(at[43], at[104]); MULADD(at[44], at[103]); MULADD(at[45], at[102]); MULADD(at[46], at[101]); MULADD(at[47], at[100]); MULADD(at[48], at[99]); MULADD(at[49], at[98]); MULADD(at[50], at[97]); MULADD(at[51], at[96]); MULADD(at[52], at[95]); MULADD(at[53], at[94]); MULADD(at[54], at[93]); MULADD(at[55], at[92]); MULADD(at[56], at[91]); MULADD(at[57], at[90]); MULADD(at[58], at[89]); MULADD(at[59], at[88]); MULADD(at[60], at[87]); MULADD(at[61], at[86]); MULADD(at[62], at[85]); MULADD(at[63], at[84]); - COMBA_STORE(C->dp[83]); - /* 84 */ - COMBA_FORWARD; - MULADD(at[21], at[127]); MULADD(at[22], at[126]); MULADD(at[23], at[125]); MULADD(at[24], at[124]); MULADD(at[25], at[123]); MULADD(at[26], at[122]); MULADD(at[27], at[121]); MULADD(at[28], at[120]); MULADD(at[29], at[119]); MULADD(at[30], at[118]); MULADD(at[31], at[117]); MULADD(at[32], at[116]); MULADD(at[33], at[115]); MULADD(at[34], at[114]); MULADD(at[35], at[113]); MULADD(at[36], at[112]); MULADD(at[37], at[111]); MULADD(at[38], at[110]); MULADD(at[39], at[109]); MULADD(at[40], at[108]); MULADD(at[41], at[107]); MULADD(at[42], at[106]); MULADD(at[43], at[105]); MULADD(at[44], at[104]); MULADD(at[45], at[103]); MULADD(at[46], at[102]); MULADD(at[47], at[101]); MULADD(at[48], at[100]); MULADD(at[49], at[99]); MULADD(at[50], at[98]); MULADD(at[51], at[97]); MULADD(at[52], at[96]); MULADD(at[53], at[95]); MULADD(at[54], at[94]); MULADD(at[55], at[93]); MULADD(at[56], at[92]); MULADD(at[57], at[91]); MULADD(at[58], at[90]); MULADD(at[59], at[89]); MULADD(at[60], at[88]); MULADD(at[61], at[87]); MULADD(at[62], at[86]); MULADD(at[63], at[85]); - COMBA_STORE(C->dp[84]); - /* 85 */ - COMBA_FORWARD; - MULADD(at[22], at[127]); MULADD(at[23], at[126]); MULADD(at[24], at[125]); MULADD(at[25], at[124]); MULADD(at[26], at[123]); MULADD(at[27], at[122]); MULADD(at[28], at[121]); MULADD(at[29], at[120]); MULADD(at[30], at[119]); MULADD(at[31], at[118]); MULADD(at[32], at[117]); MULADD(at[33], at[116]); MULADD(at[34], at[115]); MULADD(at[35], at[114]); MULADD(at[36], at[113]); MULADD(at[37], at[112]); MULADD(at[38], at[111]); MULADD(at[39], at[110]); MULADD(at[40], at[109]); MULADD(at[41], at[108]); MULADD(at[42], at[107]); MULADD(at[43], at[106]); MULADD(at[44], at[105]); MULADD(at[45], at[104]); MULADD(at[46], at[103]); MULADD(at[47], at[102]); MULADD(at[48], at[101]); MULADD(at[49], at[100]); MULADD(at[50], at[99]); MULADD(at[51], at[98]); MULADD(at[52], at[97]); MULADD(at[53], at[96]); MULADD(at[54], at[95]); MULADD(at[55], at[94]); MULADD(at[56], at[93]); MULADD(at[57], at[92]); MULADD(at[58], at[91]); MULADD(at[59], at[90]); MULADD(at[60], at[89]); MULADD(at[61], at[88]); MULADD(at[62], at[87]); MULADD(at[63], at[86]); - COMBA_STORE(C->dp[85]); - /* 86 */ - COMBA_FORWARD; - MULADD(at[23], at[127]); MULADD(at[24], at[126]); MULADD(at[25], at[125]); MULADD(at[26], at[124]); MULADD(at[27], at[123]); MULADD(at[28], at[122]); MULADD(at[29], at[121]); MULADD(at[30], at[120]); MULADD(at[31], at[119]); MULADD(at[32], at[118]); MULADD(at[33], at[117]); MULADD(at[34], at[116]); MULADD(at[35], at[115]); MULADD(at[36], at[114]); MULADD(at[37], at[113]); MULADD(at[38], at[112]); MULADD(at[39], at[111]); MULADD(at[40], at[110]); MULADD(at[41], at[109]); MULADD(at[42], at[108]); MULADD(at[43], at[107]); MULADD(at[44], at[106]); MULADD(at[45], at[105]); MULADD(at[46], at[104]); MULADD(at[47], at[103]); MULADD(at[48], at[102]); MULADD(at[49], at[101]); MULADD(at[50], at[100]); MULADD(at[51], at[99]); MULADD(at[52], at[98]); MULADD(at[53], at[97]); MULADD(at[54], at[96]); MULADD(at[55], at[95]); MULADD(at[56], at[94]); MULADD(at[57], at[93]); MULADD(at[58], at[92]); MULADD(at[59], at[91]); MULADD(at[60], at[90]); MULADD(at[61], at[89]); MULADD(at[62], at[88]); MULADD(at[63], at[87]); - COMBA_STORE(C->dp[86]); - /* 87 */ - COMBA_FORWARD; - MULADD(at[24], at[127]); MULADD(at[25], at[126]); MULADD(at[26], at[125]); MULADD(at[27], at[124]); MULADD(at[28], at[123]); MULADD(at[29], at[122]); MULADD(at[30], at[121]); MULADD(at[31], at[120]); MULADD(at[32], at[119]); MULADD(at[33], at[118]); MULADD(at[34], at[117]); MULADD(at[35], at[116]); MULADD(at[36], at[115]); MULADD(at[37], at[114]); MULADD(at[38], at[113]); MULADD(at[39], at[112]); MULADD(at[40], at[111]); MULADD(at[41], at[110]); MULADD(at[42], at[109]); MULADD(at[43], at[108]); MULADD(at[44], at[107]); MULADD(at[45], at[106]); MULADD(at[46], at[105]); MULADD(at[47], at[104]); MULADD(at[48], at[103]); MULADD(at[49], at[102]); MULADD(at[50], at[101]); MULADD(at[51], at[100]); MULADD(at[52], at[99]); MULADD(at[53], at[98]); MULADD(at[54], at[97]); MULADD(at[55], at[96]); MULADD(at[56], at[95]); MULADD(at[57], at[94]); MULADD(at[58], at[93]); MULADD(at[59], at[92]); MULADD(at[60], at[91]); MULADD(at[61], at[90]); MULADD(at[62], at[89]); MULADD(at[63], at[88]); - COMBA_STORE(C->dp[87]); - /* 88 */ - COMBA_FORWARD; - MULADD(at[25], at[127]); MULADD(at[26], at[126]); MULADD(at[27], at[125]); MULADD(at[28], at[124]); MULADD(at[29], at[123]); MULADD(at[30], at[122]); MULADD(at[31], at[121]); MULADD(at[32], at[120]); MULADD(at[33], at[119]); MULADD(at[34], at[118]); MULADD(at[35], at[117]); MULADD(at[36], at[116]); MULADD(at[37], at[115]); MULADD(at[38], at[114]); MULADD(at[39], at[113]); MULADD(at[40], at[112]); MULADD(at[41], at[111]); MULADD(at[42], at[110]); MULADD(at[43], at[109]); MULADD(at[44], at[108]); MULADD(at[45], at[107]); MULADD(at[46], at[106]); MULADD(at[47], at[105]); MULADD(at[48], at[104]); MULADD(at[49], at[103]); MULADD(at[50], at[102]); MULADD(at[51], at[101]); MULADD(at[52], at[100]); MULADD(at[53], at[99]); MULADD(at[54], at[98]); MULADD(at[55], at[97]); MULADD(at[56], at[96]); MULADD(at[57], at[95]); MULADD(at[58], at[94]); MULADD(at[59], at[93]); MULADD(at[60], at[92]); MULADD(at[61], at[91]); MULADD(at[62], at[90]); MULADD(at[63], at[89]); - COMBA_STORE(C->dp[88]); - /* 89 */ - COMBA_FORWARD; - MULADD(at[26], at[127]); MULADD(at[27], at[126]); MULADD(at[28], at[125]); MULADD(at[29], at[124]); MULADD(at[30], at[123]); MULADD(at[31], at[122]); MULADD(at[32], at[121]); MULADD(at[33], at[120]); MULADD(at[34], at[119]); MULADD(at[35], at[118]); MULADD(at[36], at[117]); MULADD(at[37], at[116]); MULADD(at[38], at[115]); MULADD(at[39], at[114]); MULADD(at[40], at[113]); MULADD(at[41], at[112]); MULADD(at[42], at[111]); MULADD(at[43], at[110]); MULADD(at[44], at[109]); MULADD(at[45], at[108]); MULADD(at[46], at[107]); MULADD(at[47], at[106]); MULADD(at[48], at[105]); MULADD(at[49], at[104]); MULADD(at[50], at[103]); MULADD(at[51], at[102]); MULADD(at[52], at[101]); MULADD(at[53], at[100]); MULADD(at[54], at[99]); MULADD(at[55], at[98]); MULADD(at[56], at[97]); MULADD(at[57], at[96]); MULADD(at[58], at[95]); MULADD(at[59], at[94]); MULADD(at[60], at[93]); MULADD(at[61], at[92]); MULADD(at[62], at[91]); MULADD(at[63], at[90]); - COMBA_STORE(C->dp[89]); - /* 90 */ - COMBA_FORWARD; - MULADD(at[27], at[127]); MULADD(at[28], at[126]); MULADD(at[29], at[125]); MULADD(at[30], at[124]); MULADD(at[31], at[123]); MULADD(at[32], at[122]); MULADD(at[33], at[121]); MULADD(at[34], at[120]); MULADD(at[35], at[119]); MULADD(at[36], at[118]); MULADD(at[37], at[117]); MULADD(at[38], at[116]); MULADD(at[39], at[115]); MULADD(at[40], at[114]); MULADD(at[41], at[113]); MULADD(at[42], at[112]); MULADD(at[43], at[111]); MULADD(at[44], at[110]); MULADD(at[45], at[109]); MULADD(at[46], at[108]); MULADD(at[47], at[107]); MULADD(at[48], at[106]); MULADD(at[49], at[105]); MULADD(at[50], at[104]); MULADD(at[51], at[103]); MULADD(at[52], at[102]); MULADD(at[53], at[101]); MULADD(at[54], at[100]); MULADD(at[55], at[99]); MULADD(at[56], at[98]); MULADD(at[57], at[97]); MULADD(at[58], at[96]); MULADD(at[59], at[95]); MULADD(at[60], at[94]); MULADD(at[61], at[93]); MULADD(at[62], at[92]); MULADD(at[63], at[91]); - COMBA_STORE(C->dp[90]); - /* 91 */ - COMBA_FORWARD; - MULADD(at[28], at[127]); MULADD(at[29], at[126]); MULADD(at[30], at[125]); MULADD(at[31], at[124]); MULADD(at[32], at[123]); MULADD(at[33], at[122]); MULADD(at[34], at[121]); MULADD(at[35], at[120]); MULADD(at[36], at[119]); MULADD(at[37], at[118]); MULADD(at[38], at[117]); MULADD(at[39], at[116]); MULADD(at[40], at[115]); MULADD(at[41], at[114]); MULADD(at[42], at[113]); MULADD(at[43], at[112]); MULADD(at[44], at[111]); MULADD(at[45], at[110]); MULADD(at[46], at[109]); MULADD(at[47], at[108]); MULADD(at[48], at[107]); MULADD(at[49], at[106]); MULADD(at[50], at[105]); MULADD(at[51], at[104]); MULADD(at[52], at[103]); MULADD(at[53], at[102]); MULADD(at[54], at[101]); MULADD(at[55], at[100]); MULADD(at[56], at[99]); MULADD(at[57], at[98]); MULADD(at[58], at[97]); MULADD(at[59], at[96]); MULADD(at[60], at[95]); MULADD(at[61], at[94]); MULADD(at[62], at[93]); MULADD(at[63], at[92]); - COMBA_STORE(C->dp[91]); - /* 92 */ - COMBA_FORWARD; - MULADD(at[29], at[127]); MULADD(at[30], at[126]); MULADD(at[31], at[125]); MULADD(at[32], at[124]); MULADD(at[33], at[123]); MULADD(at[34], at[122]); MULADD(at[35], at[121]); MULADD(at[36], at[120]); MULADD(at[37], at[119]); MULADD(at[38], at[118]); MULADD(at[39], at[117]); MULADD(at[40], at[116]); MULADD(at[41], at[115]); MULADD(at[42], at[114]); MULADD(at[43], at[113]); MULADD(at[44], at[112]); MULADD(at[45], at[111]); MULADD(at[46], at[110]); MULADD(at[47], at[109]); MULADD(at[48], at[108]); MULADD(at[49], at[107]); MULADD(at[50], at[106]); MULADD(at[51], at[105]); MULADD(at[52], at[104]); MULADD(at[53], at[103]); MULADD(at[54], at[102]); MULADD(at[55], at[101]); MULADD(at[56], at[100]); MULADD(at[57], at[99]); MULADD(at[58], at[98]); MULADD(at[59], at[97]); MULADD(at[60], at[96]); MULADD(at[61], at[95]); MULADD(at[62], at[94]); MULADD(at[63], at[93]); - COMBA_STORE(C->dp[92]); - /* 93 */ - COMBA_FORWARD; - MULADD(at[30], at[127]); MULADD(at[31], at[126]); MULADD(at[32], at[125]); MULADD(at[33], at[124]); MULADD(at[34], at[123]); MULADD(at[35], at[122]); MULADD(at[36], at[121]); MULADD(at[37], at[120]); MULADD(at[38], at[119]); MULADD(at[39], at[118]); MULADD(at[40], at[117]); MULADD(at[41], at[116]); MULADD(at[42], at[115]); MULADD(at[43], at[114]); MULADD(at[44], at[113]); MULADD(at[45], at[112]); MULADD(at[46], at[111]); MULADD(at[47], at[110]); MULADD(at[48], at[109]); MULADD(at[49], at[108]); MULADD(at[50], at[107]); MULADD(at[51], at[106]); MULADD(at[52], at[105]); MULADD(at[53], at[104]); MULADD(at[54], at[103]); MULADD(at[55], at[102]); MULADD(at[56], at[101]); MULADD(at[57], at[100]); MULADD(at[58], at[99]); MULADD(at[59], at[98]); MULADD(at[60], at[97]); MULADD(at[61], at[96]); MULADD(at[62], at[95]); MULADD(at[63], at[94]); - COMBA_STORE(C->dp[93]); - /* 94 */ - COMBA_FORWARD; - MULADD(at[31], at[127]); MULADD(at[32], at[126]); MULADD(at[33], at[125]); MULADD(at[34], at[124]); MULADD(at[35], at[123]); MULADD(at[36], at[122]); MULADD(at[37], at[121]); MULADD(at[38], at[120]); MULADD(at[39], at[119]); MULADD(at[40], at[118]); MULADD(at[41], at[117]); MULADD(at[42], at[116]); MULADD(at[43], at[115]); MULADD(at[44], at[114]); MULADD(at[45], at[113]); MULADD(at[46], at[112]); MULADD(at[47], at[111]); MULADD(at[48], at[110]); MULADD(at[49], at[109]); MULADD(at[50], at[108]); MULADD(at[51], at[107]); MULADD(at[52], at[106]); MULADD(at[53], at[105]); MULADD(at[54], at[104]); MULADD(at[55], at[103]); MULADD(at[56], at[102]); MULADD(at[57], at[101]); MULADD(at[58], at[100]); MULADD(at[59], at[99]); MULADD(at[60], at[98]); MULADD(at[61], at[97]); MULADD(at[62], at[96]); MULADD(at[63], at[95]); - COMBA_STORE(C->dp[94]); - /* 95 */ - COMBA_FORWARD; - MULADD(at[32], at[127]); MULADD(at[33], at[126]); MULADD(at[34], at[125]); MULADD(at[35], at[124]); MULADD(at[36], at[123]); MULADD(at[37], at[122]); MULADD(at[38], at[121]); MULADD(at[39], at[120]); MULADD(at[40], at[119]); MULADD(at[41], at[118]); MULADD(at[42], at[117]); MULADD(at[43], at[116]); MULADD(at[44], at[115]); MULADD(at[45], at[114]); MULADD(at[46], at[113]); MULADD(at[47], at[112]); MULADD(at[48], at[111]); MULADD(at[49], at[110]); MULADD(at[50], at[109]); MULADD(at[51], at[108]); MULADD(at[52], at[107]); MULADD(at[53], at[106]); MULADD(at[54], at[105]); MULADD(at[55], at[104]); MULADD(at[56], at[103]); MULADD(at[57], at[102]); MULADD(at[58], at[101]); MULADD(at[59], at[100]); MULADD(at[60], at[99]); MULADD(at[61], at[98]); MULADD(at[62], at[97]); MULADD(at[63], at[96]); - COMBA_STORE(C->dp[95]); - /* 96 */ - COMBA_FORWARD; - MULADD(at[33], at[127]); MULADD(at[34], at[126]); MULADD(at[35], at[125]); MULADD(at[36], at[124]); MULADD(at[37], at[123]); MULADD(at[38], at[122]); MULADD(at[39], at[121]); MULADD(at[40], at[120]); MULADD(at[41], at[119]); MULADD(at[42], at[118]); MULADD(at[43], at[117]); MULADD(at[44], at[116]); MULADD(at[45], at[115]); MULADD(at[46], at[114]); MULADD(at[47], at[113]); MULADD(at[48], at[112]); MULADD(at[49], at[111]); MULADD(at[50], at[110]); MULADD(at[51], at[109]); MULADD(at[52], at[108]); MULADD(at[53], at[107]); MULADD(at[54], at[106]); MULADD(at[55], at[105]); MULADD(at[56], at[104]); MULADD(at[57], at[103]); MULADD(at[58], at[102]); MULADD(at[59], at[101]); MULADD(at[60], at[100]); MULADD(at[61], at[99]); MULADD(at[62], at[98]); MULADD(at[63], at[97]); - COMBA_STORE(C->dp[96]); - /* 97 */ - COMBA_FORWARD; - MULADD(at[34], at[127]); MULADD(at[35], at[126]); MULADD(at[36], at[125]); MULADD(at[37], at[124]); MULADD(at[38], at[123]); MULADD(at[39], at[122]); MULADD(at[40], at[121]); MULADD(at[41], at[120]); MULADD(at[42], at[119]); MULADD(at[43], at[118]); MULADD(at[44], at[117]); MULADD(at[45], at[116]); MULADD(at[46], at[115]); MULADD(at[47], at[114]); MULADD(at[48], at[113]); MULADD(at[49], at[112]); MULADD(at[50], at[111]); MULADD(at[51], at[110]); MULADD(at[52], at[109]); MULADD(at[53], at[108]); MULADD(at[54], at[107]); MULADD(at[55], at[106]); MULADD(at[56], at[105]); MULADD(at[57], at[104]); MULADD(at[58], at[103]); MULADD(at[59], at[102]); MULADD(at[60], at[101]); MULADD(at[61], at[100]); MULADD(at[62], at[99]); MULADD(at[63], at[98]); - COMBA_STORE(C->dp[97]); - /* 98 */ - COMBA_FORWARD; - MULADD(at[35], at[127]); MULADD(at[36], at[126]); MULADD(at[37], at[125]); MULADD(at[38], at[124]); MULADD(at[39], at[123]); MULADD(at[40], at[122]); MULADD(at[41], at[121]); MULADD(at[42], at[120]); MULADD(at[43], at[119]); MULADD(at[44], at[118]); MULADD(at[45], at[117]); MULADD(at[46], at[116]); MULADD(at[47], at[115]); MULADD(at[48], at[114]); MULADD(at[49], at[113]); MULADD(at[50], at[112]); MULADD(at[51], at[111]); MULADD(at[52], at[110]); MULADD(at[53], at[109]); MULADD(at[54], at[108]); MULADD(at[55], at[107]); MULADD(at[56], at[106]); MULADD(at[57], at[105]); MULADD(at[58], at[104]); MULADD(at[59], at[103]); MULADD(at[60], at[102]); MULADD(at[61], at[101]); MULADD(at[62], at[100]); MULADD(at[63], at[99]); - COMBA_STORE(C->dp[98]); - /* 99 */ - COMBA_FORWARD; - MULADD(at[36], at[127]); MULADD(at[37], at[126]); MULADD(at[38], at[125]); MULADD(at[39], at[124]); MULADD(at[40], at[123]); MULADD(at[41], at[122]); MULADD(at[42], at[121]); MULADD(at[43], at[120]); MULADD(at[44], at[119]); MULADD(at[45], at[118]); MULADD(at[46], at[117]); MULADD(at[47], at[116]); MULADD(at[48], at[115]); MULADD(at[49], at[114]); MULADD(at[50], at[113]); MULADD(at[51], at[112]); MULADD(at[52], at[111]); MULADD(at[53], at[110]); MULADD(at[54], at[109]); MULADD(at[55], at[108]); MULADD(at[56], at[107]); MULADD(at[57], at[106]); MULADD(at[58], at[105]); MULADD(at[59], at[104]); MULADD(at[60], at[103]); MULADD(at[61], at[102]); MULADD(at[62], at[101]); MULADD(at[63], at[100]); - COMBA_STORE(C->dp[99]); - /* 100 */ - COMBA_FORWARD; - MULADD(at[37], at[127]); MULADD(at[38], at[126]); MULADD(at[39], at[125]); MULADD(at[40], at[124]); MULADD(at[41], at[123]); MULADD(at[42], at[122]); MULADD(at[43], at[121]); MULADD(at[44], at[120]); MULADD(at[45], at[119]); MULADD(at[46], at[118]); MULADD(at[47], at[117]); MULADD(at[48], at[116]); MULADD(at[49], at[115]); MULADD(at[50], at[114]); MULADD(at[51], at[113]); MULADD(at[52], at[112]); MULADD(at[53], at[111]); MULADD(at[54], at[110]); MULADD(at[55], at[109]); MULADD(at[56], at[108]); MULADD(at[57], at[107]); MULADD(at[58], at[106]); MULADD(at[59], at[105]); MULADD(at[60], at[104]); MULADD(at[61], at[103]); MULADD(at[62], at[102]); MULADD(at[63], at[101]); - COMBA_STORE(C->dp[100]); - /* 101 */ - COMBA_FORWARD; - MULADD(at[38], at[127]); MULADD(at[39], at[126]); MULADD(at[40], at[125]); MULADD(at[41], at[124]); MULADD(at[42], at[123]); MULADD(at[43], at[122]); MULADD(at[44], at[121]); MULADD(at[45], at[120]); MULADD(at[46], at[119]); MULADD(at[47], at[118]); MULADD(at[48], at[117]); MULADD(at[49], at[116]); MULADD(at[50], at[115]); MULADD(at[51], at[114]); MULADD(at[52], at[113]); MULADD(at[53], at[112]); MULADD(at[54], at[111]); MULADD(at[55], at[110]); MULADD(at[56], at[109]); MULADD(at[57], at[108]); MULADD(at[58], at[107]); MULADD(at[59], at[106]); MULADD(at[60], at[105]); MULADD(at[61], at[104]); MULADD(at[62], at[103]); MULADD(at[63], at[102]); - COMBA_STORE(C->dp[101]); - /* 102 */ - COMBA_FORWARD; - MULADD(at[39], at[127]); MULADD(at[40], at[126]); MULADD(at[41], at[125]); MULADD(at[42], at[124]); MULADD(at[43], at[123]); MULADD(at[44], at[122]); MULADD(at[45], at[121]); MULADD(at[46], at[120]); MULADD(at[47], at[119]); MULADD(at[48], at[118]); MULADD(at[49], at[117]); MULADD(at[50], at[116]); MULADD(at[51], at[115]); MULADD(at[52], at[114]); MULADD(at[53], at[113]); MULADD(at[54], at[112]); MULADD(at[55], at[111]); MULADD(at[56], at[110]); MULADD(at[57], at[109]); MULADD(at[58], at[108]); MULADD(at[59], at[107]); MULADD(at[60], at[106]); MULADD(at[61], at[105]); MULADD(at[62], at[104]); MULADD(at[63], at[103]); - COMBA_STORE(C->dp[102]); - /* 103 */ - COMBA_FORWARD; - MULADD(at[40], at[127]); MULADD(at[41], at[126]); MULADD(at[42], at[125]); MULADD(at[43], at[124]); MULADD(at[44], at[123]); MULADD(at[45], at[122]); MULADD(at[46], at[121]); MULADD(at[47], at[120]); MULADD(at[48], at[119]); MULADD(at[49], at[118]); MULADD(at[50], at[117]); MULADD(at[51], at[116]); MULADD(at[52], at[115]); MULADD(at[53], at[114]); MULADD(at[54], at[113]); MULADD(at[55], at[112]); MULADD(at[56], at[111]); MULADD(at[57], at[110]); MULADD(at[58], at[109]); MULADD(at[59], at[108]); MULADD(at[60], at[107]); MULADD(at[61], at[106]); MULADD(at[62], at[105]); MULADD(at[63], at[104]); - COMBA_STORE(C->dp[103]); - /* 104 */ - COMBA_FORWARD; - MULADD(at[41], at[127]); MULADD(at[42], at[126]); MULADD(at[43], at[125]); MULADD(at[44], at[124]); MULADD(at[45], at[123]); MULADD(at[46], at[122]); MULADD(at[47], at[121]); MULADD(at[48], at[120]); MULADD(at[49], at[119]); MULADD(at[50], at[118]); MULADD(at[51], at[117]); MULADD(at[52], at[116]); MULADD(at[53], at[115]); MULADD(at[54], at[114]); MULADD(at[55], at[113]); MULADD(at[56], at[112]); MULADD(at[57], at[111]); MULADD(at[58], at[110]); MULADD(at[59], at[109]); MULADD(at[60], at[108]); MULADD(at[61], at[107]); MULADD(at[62], at[106]); MULADD(at[63], at[105]); - COMBA_STORE(C->dp[104]); - /* 105 */ - COMBA_FORWARD; - MULADD(at[42], at[127]); MULADD(at[43], at[126]); MULADD(at[44], at[125]); MULADD(at[45], at[124]); MULADD(at[46], at[123]); MULADD(at[47], at[122]); MULADD(at[48], at[121]); MULADD(at[49], at[120]); MULADD(at[50], at[119]); MULADD(at[51], at[118]); MULADD(at[52], at[117]); MULADD(at[53], at[116]); MULADD(at[54], at[115]); MULADD(at[55], at[114]); MULADD(at[56], at[113]); MULADD(at[57], at[112]); MULADD(at[58], at[111]); MULADD(at[59], at[110]); MULADD(at[60], at[109]); MULADD(at[61], at[108]); MULADD(at[62], at[107]); MULADD(at[63], at[106]); - COMBA_STORE(C->dp[105]); - /* 106 */ - COMBA_FORWARD; - MULADD(at[43], at[127]); MULADD(at[44], at[126]); MULADD(at[45], at[125]); MULADD(at[46], at[124]); MULADD(at[47], at[123]); MULADD(at[48], at[122]); MULADD(at[49], at[121]); MULADD(at[50], at[120]); MULADD(at[51], at[119]); MULADD(at[52], at[118]); MULADD(at[53], at[117]); MULADD(at[54], at[116]); MULADD(at[55], at[115]); MULADD(at[56], at[114]); MULADD(at[57], at[113]); MULADD(at[58], at[112]); MULADD(at[59], at[111]); MULADD(at[60], at[110]); MULADD(at[61], at[109]); MULADD(at[62], at[108]); MULADD(at[63], at[107]); - COMBA_STORE(C->dp[106]); - /* 107 */ - COMBA_FORWARD; - MULADD(at[44], at[127]); MULADD(at[45], at[126]); MULADD(at[46], at[125]); MULADD(at[47], at[124]); MULADD(at[48], at[123]); MULADD(at[49], at[122]); MULADD(at[50], at[121]); MULADD(at[51], at[120]); MULADD(at[52], at[119]); MULADD(at[53], at[118]); MULADD(at[54], at[117]); MULADD(at[55], at[116]); MULADD(at[56], at[115]); MULADD(at[57], at[114]); MULADD(at[58], at[113]); MULADD(at[59], at[112]); MULADD(at[60], at[111]); MULADD(at[61], at[110]); MULADD(at[62], at[109]); MULADD(at[63], at[108]); - COMBA_STORE(C->dp[107]); - /* 108 */ - COMBA_FORWARD; - MULADD(at[45], at[127]); MULADD(at[46], at[126]); MULADD(at[47], at[125]); MULADD(at[48], at[124]); MULADD(at[49], at[123]); MULADD(at[50], at[122]); MULADD(at[51], at[121]); MULADD(at[52], at[120]); MULADD(at[53], at[119]); MULADD(at[54], at[118]); MULADD(at[55], at[117]); MULADD(at[56], at[116]); MULADD(at[57], at[115]); MULADD(at[58], at[114]); MULADD(at[59], at[113]); MULADD(at[60], at[112]); MULADD(at[61], at[111]); MULADD(at[62], at[110]); MULADD(at[63], at[109]); - COMBA_STORE(C->dp[108]); - /* 109 */ - COMBA_FORWARD; - MULADD(at[46], at[127]); MULADD(at[47], at[126]); MULADD(at[48], at[125]); MULADD(at[49], at[124]); MULADD(at[50], at[123]); MULADD(at[51], at[122]); MULADD(at[52], at[121]); MULADD(at[53], at[120]); MULADD(at[54], at[119]); MULADD(at[55], at[118]); MULADD(at[56], at[117]); MULADD(at[57], at[116]); MULADD(at[58], at[115]); MULADD(at[59], at[114]); MULADD(at[60], at[113]); MULADD(at[61], at[112]); MULADD(at[62], at[111]); MULADD(at[63], at[110]); - COMBA_STORE(C->dp[109]); - /* 110 */ - COMBA_FORWARD; - MULADD(at[47], at[127]); MULADD(at[48], at[126]); MULADD(at[49], at[125]); MULADD(at[50], at[124]); MULADD(at[51], at[123]); MULADD(at[52], at[122]); MULADD(at[53], at[121]); MULADD(at[54], at[120]); MULADD(at[55], at[119]); MULADD(at[56], at[118]); MULADD(at[57], at[117]); MULADD(at[58], at[116]); MULADD(at[59], at[115]); MULADD(at[60], at[114]); MULADD(at[61], at[113]); MULADD(at[62], at[112]); MULADD(at[63], at[111]); - COMBA_STORE(C->dp[110]); - /* 111 */ - COMBA_FORWARD; - MULADD(at[48], at[127]); MULADD(at[49], at[126]); MULADD(at[50], at[125]); MULADD(at[51], at[124]); MULADD(at[52], at[123]); MULADD(at[53], at[122]); MULADD(at[54], at[121]); MULADD(at[55], at[120]); MULADD(at[56], at[119]); MULADD(at[57], at[118]); MULADD(at[58], at[117]); MULADD(at[59], at[116]); MULADD(at[60], at[115]); MULADD(at[61], at[114]); MULADD(at[62], at[113]); MULADD(at[63], at[112]); - COMBA_STORE(C->dp[111]); - /* 112 */ - COMBA_FORWARD; - MULADD(at[49], at[127]); MULADD(at[50], at[126]); MULADD(at[51], at[125]); MULADD(at[52], at[124]); MULADD(at[53], at[123]); MULADD(at[54], at[122]); MULADD(at[55], at[121]); MULADD(at[56], at[120]); MULADD(at[57], at[119]); MULADD(at[58], at[118]); MULADD(at[59], at[117]); MULADD(at[60], at[116]); MULADD(at[61], at[115]); MULADD(at[62], at[114]); MULADD(at[63], at[113]); - COMBA_STORE(C->dp[112]); - /* 113 */ - COMBA_FORWARD; - MULADD(at[50], at[127]); MULADD(at[51], at[126]); MULADD(at[52], at[125]); MULADD(at[53], at[124]); MULADD(at[54], at[123]); MULADD(at[55], at[122]); MULADD(at[56], at[121]); MULADD(at[57], at[120]); MULADD(at[58], at[119]); MULADD(at[59], at[118]); MULADD(at[60], at[117]); MULADD(at[61], at[116]); MULADD(at[62], at[115]); MULADD(at[63], at[114]); - COMBA_STORE(C->dp[113]); - /* 114 */ - COMBA_FORWARD; - MULADD(at[51], at[127]); MULADD(at[52], at[126]); MULADD(at[53], at[125]); MULADD(at[54], at[124]); MULADD(at[55], at[123]); MULADD(at[56], at[122]); MULADD(at[57], at[121]); MULADD(at[58], at[120]); MULADD(at[59], at[119]); MULADD(at[60], at[118]); MULADD(at[61], at[117]); MULADD(at[62], at[116]); MULADD(at[63], at[115]); - COMBA_STORE(C->dp[114]); - /* 115 */ - COMBA_FORWARD; - MULADD(at[52], at[127]); MULADD(at[53], at[126]); MULADD(at[54], at[125]); MULADD(at[55], at[124]); MULADD(at[56], at[123]); MULADD(at[57], at[122]); MULADD(at[58], at[121]); MULADD(at[59], at[120]); MULADD(at[60], at[119]); MULADD(at[61], at[118]); MULADD(at[62], at[117]); MULADD(at[63], at[116]); - COMBA_STORE(C->dp[115]); - /* 116 */ - COMBA_FORWARD; - MULADD(at[53], at[127]); MULADD(at[54], at[126]); MULADD(at[55], at[125]); MULADD(at[56], at[124]); MULADD(at[57], at[123]); MULADD(at[58], at[122]); MULADD(at[59], at[121]); MULADD(at[60], at[120]); MULADD(at[61], at[119]); MULADD(at[62], at[118]); MULADD(at[63], at[117]); - COMBA_STORE(C->dp[116]); - /* 117 */ - COMBA_FORWARD; - MULADD(at[54], at[127]); MULADD(at[55], at[126]); MULADD(at[56], at[125]); MULADD(at[57], at[124]); MULADD(at[58], at[123]); MULADD(at[59], at[122]); MULADD(at[60], at[121]); MULADD(at[61], at[120]); MULADD(at[62], at[119]); MULADD(at[63], at[118]); - COMBA_STORE(C->dp[117]); - /* 118 */ - COMBA_FORWARD; - MULADD(at[55], at[127]); MULADD(at[56], at[126]); MULADD(at[57], at[125]); MULADD(at[58], at[124]); MULADD(at[59], at[123]); MULADD(at[60], at[122]); MULADD(at[61], at[121]); MULADD(at[62], at[120]); MULADD(at[63], at[119]); - COMBA_STORE(C->dp[118]); - /* 119 */ - COMBA_FORWARD; - MULADD(at[56], at[127]); MULADD(at[57], at[126]); MULADD(at[58], at[125]); MULADD(at[59], at[124]); MULADD(at[60], at[123]); MULADD(at[61], at[122]); MULADD(at[62], at[121]); MULADD(at[63], at[120]); - COMBA_STORE(C->dp[119]); - /* 120 */ - COMBA_FORWARD; - MULADD(at[57], at[127]); MULADD(at[58], at[126]); MULADD(at[59], at[125]); MULADD(at[60], at[124]); MULADD(at[61], at[123]); MULADD(at[62], at[122]); MULADD(at[63], at[121]); - COMBA_STORE(C->dp[120]); - /* 121 */ - COMBA_FORWARD; - MULADD(at[58], at[127]); MULADD(at[59], at[126]); MULADD(at[60], at[125]); MULADD(at[61], at[124]); MULADD(at[62], at[123]); MULADD(at[63], at[122]); - COMBA_STORE(C->dp[121]); - /* 122 */ - COMBA_FORWARD; - MULADD(at[59], at[127]); MULADD(at[60], at[126]); MULADD(at[61], at[125]); MULADD(at[62], at[124]); MULADD(at[63], at[123]); - COMBA_STORE(C->dp[122]); - /* 123 */ - COMBA_FORWARD; - MULADD(at[60], at[127]); MULADD(at[61], at[126]); MULADD(at[62], at[125]); MULADD(at[63], at[124]); - COMBA_STORE(C->dp[123]); - /* 124 */ - COMBA_FORWARD; - MULADD(at[61], at[127]); MULADD(at[62], at[126]); MULADD(at[63], at[125]); - COMBA_STORE(C->dp[124]); - /* 125 */ - COMBA_FORWARD; - MULADD(at[62], at[127]); MULADD(at[63], at[126]); - COMBA_STORE(C->dp[125]); - /* 126 */ - COMBA_FORWARD; - MULADD(at[63], at[127]); - COMBA_STORE(C->dp[126]); - COMBA_STORE2(C->dp[127]); - C->used = 128; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i deleted file mode 100644 index 22b2eec2..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_7.i +++ /dev/null @@ -1,90 +0,0 @@ -/* fp_mul_comba_7.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL7 -void fp_mul_comba7(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[14]; - - memcpy(at, A->dp, 7 * sizeof(fp_digit)); - memcpy(at+7, B->dp, 7 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[7]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[8]); MULADD(at[1], at[7]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); MULADD(at[6], at[7]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[5], at[13]); MULADD(at[6], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[6], at[13]); - COMBA_STORE(C->dp[12]); - COMBA_STORE2(C->dp[13]); - C->used = 14; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i deleted file mode 100644 index 7847d111..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_8.i +++ /dev/null @@ -1,98 +0,0 @@ -/* fp_mul_comba_8.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL8 -void fp_mul_comba8(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[16]; - - memcpy(at, A->dp, 8 * sizeof(fp_digit)); - memcpy(at+8, B->dp, 8 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[8]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); MULADD(at[7], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[6], at[15]); MULADD(at[7], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[7], at[15]); - COMBA_STORE(C->dp[14]); - COMBA_STORE2(C->dp[15]); - C->used = 16; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i deleted file mode 100644 index 598c281a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_9.i +++ /dev/null @@ -1,106 +0,0 @@ -/* fp_mul_comba_9.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_MUL9 -void fp_mul_comba9(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[18]; - - memcpy(at, A->dp, 9 * sizeof(fp_digit)); - memcpy(at+9, B->dp, 9 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[9]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); MULADD(at[8], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[7], at[17]); MULADD(at[8], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[8], at[17]); - COMBA_STORE(C->dp[16]); - COMBA_STORE2(C->dp[17]); - C->used = 18; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; -} -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i deleted file mode 100644 index 64326c6b..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_mul_comba_small_set.i +++ /dev/null @@ -1,1250 +0,0 @@ -/* fp_mul_comba_small_set.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#if defined(TFM_SMALL_SET) -void fp_mul_comba_small(fp_int *A, fp_int *B, fp_int *C) -{ - fp_digit c0, c1, c2, at[32]; - switch (MAX(A->used, B->used)) { - - case 1: - memcpy(at, A->dp, 1 * sizeof(fp_digit)); - memcpy(at+1, B->dp, 1 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[1]); - COMBA_STORE(C->dp[0]); - COMBA_STORE2(C->dp[1]); - C->used = 2; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 2: - memcpy(at, A->dp, 2 * sizeof(fp_digit)); - memcpy(at+2, B->dp, 2 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[2]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[3]); MULADD(at[1], at[2]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[1], at[3]); - COMBA_STORE(C->dp[2]); - COMBA_STORE2(C->dp[3]); - C->used = 4; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 3: - memcpy(at, A->dp, 3 * sizeof(fp_digit)); - memcpy(at+3, B->dp, 3 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[3]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[4]); MULADD(at[1], at[3]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[1], at[5]); MULADD(at[2], at[4]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[2], at[5]); - COMBA_STORE(C->dp[4]); - COMBA_STORE2(C->dp[5]); - C->used = 6; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 4: - memcpy(at, A->dp, 4 * sizeof(fp_digit)); - memcpy(at+4, B->dp, 4 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[4]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[5]); MULADD(at[1], at[4]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[2], at[7]); MULADD(at[3], at[6]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[3], at[7]); - COMBA_STORE(C->dp[6]); - COMBA_STORE2(C->dp[7]); - C->used = 8; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 5: - memcpy(at, A->dp, 5 * sizeof(fp_digit)); - memcpy(at+5, B->dp, 5 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[5]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[6]); MULADD(at[1], at[5]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); MULADD(at[4], at[5]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[3], at[9]); MULADD(at[4], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[4], at[9]); - COMBA_STORE(C->dp[8]); - COMBA_STORE2(C->dp[9]); - C->used = 10; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 6: - memcpy(at, A->dp, 6 * sizeof(fp_digit)); - memcpy(at+6, B->dp, 6 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[6]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[7]); MULADD(at[1], at[6]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[8]); MULADD(at[1], at[7]); MULADD(at[2], at[6]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); MULADD(at[3], at[6]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); MULADD(at[4], at[6]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); MULADD(at[5], at[6]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[4], at[11]); MULADD(at[5], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[5], at[11]); - COMBA_STORE(C->dp[10]); - COMBA_STORE2(C->dp[11]); - C->used = 12; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 7: - memcpy(at, A->dp, 7 * sizeof(fp_digit)); - memcpy(at+7, B->dp, 7 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[7]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[8]); MULADD(at[1], at[7]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); MULADD(at[2], at[7]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); MULADD(at[3], at[7]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); MULADD(at[4], at[7]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); MULADD(at[5], at[7]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); MULADD(at[6], at[7]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[5], at[13]); MULADD(at[6], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[6], at[13]); - COMBA_STORE(C->dp[12]); - COMBA_STORE2(C->dp[13]); - C->used = 14; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 8: - memcpy(at, A->dp, 8 * sizeof(fp_digit)); - memcpy(at+8, B->dp, 8 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[8]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[9]); MULADD(at[1], at[8]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); MULADD(at[2], at[8]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); MULADD(at[3], at[8]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); MULADD(at[4], at[8]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); MULADD(at[5], at[8]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); MULADD(at[6], at[8]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); MULADD(at[7], at[8]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[6], at[15]); MULADD(at[7], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[7], at[15]); - COMBA_STORE(C->dp[14]); - COMBA_STORE2(C->dp[15]); - C->used = 16; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 9: - memcpy(at, A->dp, 9 * sizeof(fp_digit)); - memcpy(at+9, B->dp, 9 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[9]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[10]); MULADD(at[1], at[9]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); MULADD(at[2], at[9]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); MULADD(at[3], at[9]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); MULADD(at[4], at[9]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); MULADD(at[5], at[9]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); MULADD(at[6], at[9]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); MULADD(at[7], at[9]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); MULADD(at[8], at[9]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[7], at[17]); MULADD(at[8], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[8], at[17]); - COMBA_STORE(C->dp[16]); - COMBA_STORE2(C->dp[17]); - C->used = 18; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 10: - memcpy(at, A->dp, 10 * sizeof(fp_digit)); - memcpy(at+10, B->dp, 10 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[10]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[11]); MULADD(at[1], at[10]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); MULADD(at[2], at[10]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); MULADD(at[3], at[10]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); MULADD(at[4], at[10]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); MULADD(at[5], at[10]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); MULADD(at[6], at[10]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); MULADD(at[7], at[10]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); MULADD(at[8], at[10]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); MULADD(at[9], at[10]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); MULADD(at[9], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[8], at[19]); MULADD(at[9], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[9], at[19]); - COMBA_STORE(C->dp[18]); - COMBA_STORE2(C->dp[19]); - C->used = 20; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 11: - memcpy(at, A->dp, 11 * sizeof(fp_digit)); - memcpy(at+11, B->dp, 11 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[11]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[12]); MULADD(at[1], at[11]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); MULADD(at[2], at[11]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); MULADD(at[3], at[11]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); MULADD(at[4], at[11]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); MULADD(at[5], at[11]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); MULADD(at[6], at[11]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); MULADD(at[7], at[11]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); MULADD(at[8], at[11]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); MULADD(at[9], at[11]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); MULADD(at[10], at[11]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[9], at[21]); MULADD(at[10], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[10], at[21]); - COMBA_STORE(C->dp[20]); - COMBA_STORE2(C->dp[21]); - C->used = 22; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 12: - memcpy(at, A->dp, 12 * sizeof(fp_digit)); - memcpy(at+12, B->dp, 12 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[12]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[13]); MULADD(at[1], at[12]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); MULADD(at[11], at[12]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[10], at[23]); MULADD(at[11], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[11], at[23]); - COMBA_STORE(C->dp[22]); - COMBA_STORE2(C->dp[23]); - C->used = 24; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 13: - memcpy(at, A->dp, 13 * sizeof(fp_digit)); - memcpy(at+13, B->dp, 13 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[13]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[14]); MULADD(at[1], at[13]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); MULADD(at[12], at[13]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); MULADD(at[12], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[11], at[25]); MULADD(at[12], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[12], at[25]); - COMBA_STORE(C->dp[24]); - COMBA_STORE2(C->dp[25]); - C->used = 26; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 14: - memcpy(at, A->dp, 14 * sizeof(fp_digit)); - memcpy(at+14, B->dp, 14 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[14]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[15]); MULADD(at[1], at[14]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); MULADD(at[12], at[14]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); MULADD(at[13], at[14]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); MULADD(at[13], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[12], at[27]); MULADD(at[13], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[13], at[27]); - COMBA_STORE(C->dp[26]); - COMBA_STORE2(C->dp[27]); - C->used = 28; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 15: - memcpy(at, A->dp, 15 * sizeof(fp_digit)); - memcpy(at+15, B->dp, 15 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[15]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[16]); MULADD(at[1], at[15]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); MULADD(at[12], at[15]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); MULADD(at[13], at[15]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); MULADD(at[14], at[15]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); MULADD(at[14], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[13], at[29]); MULADD(at[14], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[14], at[29]); - COMBA_STORE(C->dp[28]); - COMBA_STORE2(C->dp[29]); - C->used = 30; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - case 16: - memcpy(at, A->dp, 16 * sizeof(fp_digit)); - memcpy(at+16, B->dp, 16 * sizeof(fp_digit)); - COMBA_START; - - COMBA_CLEAR; - /* 0 */ - MULADD(at[0], at[16]); - COMBA_STORE(C->dp[0]); - /* 1 */ - COMBA_FORWARD; - MULADD(at[0], at[17]); MULADD(at[1], at[16]); - COMBA_STORE(C->dp[1]); - /* 2 */ - COMBA_FORWARD; - MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); - COMBA_STORE(C->dp[2]); - /* 3 */ - COMBA_FORWARD; - MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); - COMBA_STORE(C->dp[3]); - /* 4 */ - COMBA_FORWARD; - MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); - COMBA_STORE(C->dp[4]); - /* 5 */ - COMBA_FORWARD; - MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); - COMBA_STORE(C->dp[5]); - /* 6 */ - COMBA_FORWARD; - MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); - COMBA_STORE(C->dp[6]); - /* 7 */ - COMBA_FORWARD; - MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); - COMBA_STORE(C->dp[7]); - /* 8 */ - COMBA_FORWARD; - MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); - COMBA_STORE(C->dp[8]); - /* 9 */ - COMBA_FORWARD; - MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); - COMBA_STORE(C->dp[9]); - /* 10 */ - COMBA_FORWARD; - MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); - COMBA_STORE(C->dp[10]); - /* 11 */ - COMBA_FORWARD; - MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]); - COMBA_STORE(C->dp[11]); - /* 12 */ - COMBA_FORWARD; - MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]); MULADD(at[12], at[16]); - COMBA_STORE(C->dp[12]); - /* 13 */ - COMBA_FORWARD; - MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]); MULADD(at[13], at[16]); - COMBA_STORE(C->dp[13]); - /* 14 */ - COMBA_FORWARD; - MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]); MULADD(at[14], at[16]); - COMBA_STORE(C->dp[14]); - /* 15 */ - COMBA_FORWARD; - MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]); MULADD(at[15], at[16]); - COMBA_STORE(C->dp[15]); - /* 16 */ - COMBA_FORWARD; - MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); MULADD(at[15], at[17]); - COMBA_STORE(C->dp[16]); - /* 17 */ - COMBA_FORWARD; - MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); MULADD(at[15], at[18]); - COMBA_STORE(C->dp[17]); - /* 18 */ - COMBA_FORWARD; - MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); MULADD(at[15], at[19]); - COMBA_STORE(C->dp[18]); - /* 19 */ - COMBA_FORWARD; - MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); - COMBA_STORE(C->dp[19]); - /* 20 */ - COMBA_FORWARD; - MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); - COMBA_STORE(C->dp[20]); - /* 21 */ - COMBA_FORWARD; - MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); - COMBA_STORE(C->dp[21]); - /* 22 */ - COMBA_FORWARD; - MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); - COMBA_STORE(C->dp[22]); - /* 23 */ - COMBA_FORWARD; - MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); - COMBA_STORE(C->dp[23]); - /* 24 */ - COMBA_FORWARD; - MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); - COMBA_STORE(C->dp[24]); - /* 25 */ - COMBA_FORWARD; - MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); - COMBA_STORE(C->dp[25]); - /* 26 */ - COMBA_FORWARD; - MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); - COMBA_STORE(C->dp[26]); - /* 27 */ - COMBA_FORWARD; - MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); - COMBA_STORE(C->dp[27]); - /* 28 */ - COMBA_FORWARD; - MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); - COMBA_STORE(C->dp[28]); - /* 29 */ - COMBA_FORWARD; - MULADD(at[14], at[31]); MULADD(at[15], at[30]); - COMBA_STORE(C->dp[29]); - /* 30 */ - COMBA_FORWARD; - MULADD(at[15], at[31]); - COMBA_STORE(C->dp[30]); - COMBA_STORE2(C->dp[31]); - C->used = 32; - C->sign = A->sign ^ B->sign; - fp_clamp(C); - COMBA_FINI; - break; - - default: - break; - } -} - -#endif diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i deleted file mode 100644 index f6326d7e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_12.i +++ /dev/null @@ -1,159 +0,0 @@ -/* fp_sqr_comba_12.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR12 -void fp_sqr_comba12(fp_int *A, fp_int *B) -{ - fp_digit *a, b[24], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADD2(a[7], a[11]); SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADD2(a[8], a[11]); SQRADD2(a[9], a[10]); - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADD2(a[10], a[11]); - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - COMBA_STORE2(b[23]); - COMBA_FINI; - - B->used = 24; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 24 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i deleted file mode 100644 index d94bd638..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_17.i +++ /dev/null @@ -1,210 +0,0 @@ -/* fp_sqr_comba_17.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR17 -void fp_sqr_comba17(fp_int *A, fp_int *B) -{ - fp_digit *a, b[34], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADD2(a[12], a[16]); SQRADD2(a[13], a[15]); SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADD2(a[13], a[16]); SQRADD2(a[14], a[15]); - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADD2(a[14], a[16]); SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADD2(a[15], a[16]); - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - COMBA_STORE2(b[33]); - COMBA_FINI; - - B->used = 34; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 34 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i deleted file mode 100644 index 04b5dd40..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_20.i +++ /dev/null @@ -1,240 +0,0 @@ -/* fp_sqr_comba_20.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR20 -void fp_sqr_comba20(fp_int *A, fp_int *B) -{ - fp_digit *a, b[40], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADD2(a[15], a[19]); SQRADD2(a[16], a[18]); SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADD2(a[16], a[19]); SQRADD2(a[17], a[18]); - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADD2(a[17], a[19]); SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADD2(a[18], a[19]); - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - COMBA_STORE2(b[39]); - COMBA_FINI; - - B->used = 40; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 40 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i deleted file mode 100644 index 3e23e9f5..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_24.i +++ /dev/null @@ -1,280 +0,0 @@ -/* fp_sqr_comba_24.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR24 -void fp_sqr_comba24(fp_int *A, fp_int *B) -{ - fp_digit *a, b[48], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADDSC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - - /* output 39 */ - CARRY_FORWARD; - SQRADDSC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; - COMBA_STORE(b[39]); - - /* output 40 */ - CARRY_FORWARD; - SQRADDSC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); - COMBA_STORE(b[40]); - - /* output 41 */ - CARRY_FORWARD; - SQRADDSC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; - COMBA_STORE(b[41]); - - /* output 42 */ - CARRY_FORWARD; - SQRADD2(a[19], a[23]); SQRADD2(a[20], a[22]); SQRADD(a[21], a[21]); - COMBA_STORE(b[42]); - - /* output 43 */ - CARRY_FORWARD; - SQRADD2(a[20], a[23]); SQRADD2(a[21], a[22]); - COMBA_STORE(b[43]); - - /* output 44 */ - CARRY_FORWARD; - SQRADD2(a[21], a[23]); SQRADD(a[22], a[22]); - COMBA_STORE(b[44]); - - /* output 45 */ - CARRY_FORWARD; - SQRADD2(a[22], a[23]); - COMBA_STORE(b[45]); - - /* output 46 */ - CARRY_FORWARD; - SQRADD(a[23], a[23]); - COMBA_STORE(b[46]); - COMBA_STORE2(b[47]); - COMBA_FINI; - - B->used = 48; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 48 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i deleted file mode 100644 index d6e4998f..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_28.i +++ /dev/null @@ -1,320 +0,0 @@ -/* fp_sqr_comba_28.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR28 -void fp_sqr_comba28(fp_int *A, fp_int *B) -{ - fp_digit *a, b[56], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - - /* output 39 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; - COMBA_STORE(b[39]); - - /* output 40 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); - COMBA_STORE(b[40]); - - /* output 41 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; - COMBA_STORE(b[41]); - - /* output 42 */ - CARRY_FORWARD; - SQRADDSC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); - COMBA_STORE(b[42]); - - /* output 43 */ - CARRY_FORWARD; - SQRADDSC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; - COMBA_STORE(b[43]); - - /* output 44 */ - CARRY_FORWARD; - SQRADDSC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); - COMBA_STORE(b[44]); - - /* output 45 */ - CARRY_FORWARD; - SQRADDSC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; - COMBA_STORE(b[45]); - - /* output 46 */ - CARRY_FORWARD; - SQRADDSC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); - COMBA_STORE(b[46]); - - /* output 47 */ - CARRY_FORWARD; - SQRADDSC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; - COMBA_STORE(b[47]); - - /* output 48 */ - CARRY_FORWARD; - SQRADDSC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); - COMBA_STORE(b[48]); - - /* output 49 */ - CARRY_FORWARD; - SQRADDSC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; - COMBA_STORE(b[49]); - - /* output 50 */ - CARRY_FORWARD; - SQRADD2(a[23], a[27]); SQRADD2(a[24], a[26]); SQRADD(a[25], a[25]); - COMBA_STORE(b[50]); - - /* output 51 */ - CARRY_FORWARD; - SQRADD2(a[24], a[27]); SQRADD2(a[25], a[26]); - COMBA_STORE(b[51]); - - /* output 52 */ - CARRY_FORWARD; - SQRADD2(a[25], a[27]); SQRADD(a[26], a[26]); - COMBA_STORE(b[52]); - - /* output 53 */ - CARRY_FORWARD; - SQRADD2(a[26], a[27]); - COMBA_STORE(b[53]); - - /* output 54 */ - CARRY_FORWARD; - SQRADD(a[27], a[27]); - COMBA_STORE(b[54]); - COMBA_STORE2(b[55]); - COMBA_FINI; - - B->used = 56; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 56 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i deleted file mode 100644 index 7e308dd5..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_3.i +++ /dev/null @@ -1,70 +0,0 @@ -/* fp_sqr_comba_3.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR3 -void fp_sqr_comba3(fp_int *A, fp_int *B) -{ - fp_digit *a, b[6], c0, c1, c2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - COMBA_STORE2(b[5]); - COMBA_FINI; - - B->used = 6; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 6 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i deleted file mode 100644 index 598a514e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_32.i +++ /dev/null @@ -1,360 +0,0 @@ -/* fp_sqr_comba_32.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR32 -void fp_sqr_comba32(fp_int *A, fp_int *B) -{ - fp_digit *a, b[64], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - - /* output 39 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; - COMBA_STORE(b[39]); - - /* output 40 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); - COMBA_STORE(b[40]); - - /* output 41 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; - COMBA_STORE(b[41]); - - /* output 42 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); - COMBA_STORE(b[42]); - - /* output 43 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; - COMBA_STORE(b[43]); - - /* output 44 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); - COMBA_STORE(b[44]); - - /* output 45 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; - COMBA_STORE(b[45]); - - /* output 46 */ - CARRY_FORWARD; - SQRADDSC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); - COMBA_STORE(b[46]); - - /* output 47 */ - CARRY_FORWARD; - SQRADDSC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; - COMBA_STORE(b[47]); - - /* output 48 */ - CARRY_FORWARD; - SQRADDSC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); - COMBA_STORE(b[48]); - - /* output 49 */ - CARRY_FORWARD; - SQRADDSC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; - COMBA_STORE(b[49]); - - /* output 50 */ - CARRY_FORWARD; - SQRADDSC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); - COMBA_STORE(b[50]); - - /* output 51 */ - CARRY_FORWARD; - SQRADDSC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; - COMBA_STORE(b[51]); - - /* output 52 */ - CARRY_FORWARD; - SQRADDSC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); - COMBA_STORE(b[52]); - - /* output 53 */ - CARRY_FORWARD; - SQRADDSC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; - COMBA_STORE(b[53]); - - /* output 54 */ - CARRY_FORWARD; - SQRADDSC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); - COMBA_STORE(b[54]); - - /* output 55 */ - CARRY_FORWARD; - SQRADDSC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; - COMBA_STORE(b[55]); - - /* output 56 */ - CARRY_FORWARD; - SQRADDSC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); - COMBA_STORE(b[56]); - - /* output 57 */ - CARRY_FORWARD; - SQRADDSC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; - COMBA_STORE(b[57]); - - /* output 58 */ - CARRY_FORWARD; - SQRADD2(a[27], a[31]); SQRADD2(a[28], a[30]); SQRADD(a[29], a[29]); - COMBA_STORE(b[58]); - - /* output 59 */ - CARRY_FORWARD; - SQRADD2(a[28], a[31]); SQRADD2(a[29], a[30]); - COMBA_STORE(b[59]); - - /* output 60 */ - CARRY_FORWARD; - SQRADD2(a[29], a[31]); SQRADD(a[30], a[30]); - COMBA_STORE(b[60]); - - /* output 61 */ - CARRY_FORWARD; - SQRADD2(a[30], a[31]); - COMBA_STORE(b[61]); - - /* output 62 */ - CARRY_FORWARD; - SQRADD(a[31], a[31]); - COMBA_STORE(b[62]); - COMBA_STORE2(b[63]); - COMBA_FINI; - - B->used = 64; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 64 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i deleted file mode 100644 index 53c2a905..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_4.i +++ /dev/null @@ -1,80 +0,0 @@ -/* fp_sqr_comba_4.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR4 -void fp_sqr_comba4(fp_int *A, fp_int *B) -{ - fp_digit *a, b[8], c0, c1, c2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADD2(a[2], a[3]); - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - COMBA_STORE2(b[7]); - COMBA_FINI; - - B->used = 8; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 8 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i deleted file mode 100644 index 61779c88..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_48.i +++ /dev/null @@ -1,520 +0,0 @@ -/* fp_sqr_comba_48.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR48 -void fp_sqr_comba48(fp_int *A, fp_int *B) -{ - fp_digit *a, b[96], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[32]); SQRADDAC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[33]); SQRADDAC(a[1], a[32]); SQRADDAC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[34]); SQRADDAC(a[1], a[33]); SQRADDAC(a[2], a[32]); SQRADDAC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[35]); SQRADDAC(a[1], a[34]); SQRADDAC(a[2], a[33]); SQRADDAC(a[3], a[32]); SQRADDAC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[36]); SQRADDAC(a[1], a[35]); SQRADDAC(a[2], a[34]); SQRADDAC(a[3], a[33]); SQRADDAC(a[4], a[32]); SQRADDAC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[37]); SQRADDAC(a[1], a[36]); SQRADDAC(a[2], a[35]); SQRADDAC(a[3], a[34]); SQRADDAC(a[4], a[33]); SQRADDAC(a[5], a[32]); SQRADDAC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[38]); SQRADDAC(a[1], a[37]); SQRADDAC(a[2], a[36]); SQRADDAC(a[3], a[35]); SQRADDAC(a[4], a[34]); SQRADDAC(a[5], a[33]); SQRADDAC(a[6], a[32]); SQRADDAC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - - /* output 39 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[39]); SQRADDAC(a[1], a[38]); SQRADDAC(a[2], a[37]); SQRADDAC(a[3], a[36]); SQRADDAC(a[4], a[35]); SQRADDAC(a[5], a[34]); SQRADDAC(a[6], a[33]); SQRADDAC(a[7], a[32]); SQRADDAC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; - COMBA_STORE(b[39]); - - /* output 40 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[40]); SQRADDAC(a[1], a[39]); SQRADDAC(a[2], a[38]); SQRADDAC(a[3], a[37]); SQRADDAC(a[4], a[36]); SQRADDAC(a[5], a[35]); SQRADDAC(a[6], a[34]); SQRADDAC(a[7], a[33]); SQRADDAC(a[8], a[32]); SQRADDAC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); - COMBA_STORE(b[40]); - - /* output 41 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[41]); SQRADDAC(a[1], a[40]); SQRADDAC(a[2], a[39]); SQRADDAC(a[3], a[38]); SQRADDAC(a[4], a[37]); SQRADDAC(a[5], a[36]); SQRADDAC(a[6], a[35]); SQRADDAC(a[7], a[34]); SQRADDAC(a[8], a[33]); SQRADDAC(a[9], a[32]); SQRADDAC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; - COMBA_STORE(b[41]); - - /* output 42 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[42]); SQRADDAC(a[1], a[41]); SQRADDAC(a[2], a[40]); SQRADDAC(a[3], a[39]); SQRADDAC(a[4], a[38]); SQRADDAC(a[5], a[37]); SQRADDAC(a[6], a[36]); SQRADDAC(a[7], a[35]); SQRADDAC(a[8], a[34]); SQRADDAC(a[9], a[33]); SQRADDAC(a[10], a[32]); SQRADDAC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); - COMBA_STORE(b[42]); - - /* output 43 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[43]); SQRADDAC(a[1], a[42]); SQRADDAC(a[2], a[41]); SQRADDAC(a[3], a[40]); SQRADDAC(a[4], a[39]); SQRADDAC(a[5], a[38]); SQRADDAC(a[6], a[37]); SQRADDAC(a[7], a[36]); SQRADDAC(a[8], a[35]); SQRADDAC(a[9], a[34]); SQRADDAC(a[10], a[33]); SQRADDAC(a[11], a[32]); SQRADDAC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; - COMBA_STORE(b[43]); - - /* output 44 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[44]); SQRADDAC(a[1], a[43]); SQRADDAC(a[2], a[42]); SQRADDAC(a[3], a[41]); SQRADDAC(a[4], a[40]); SQRADDAC(a[5], a[39]); SQRADDAC(a[6], a[38]); SQRADDAC(a[7], a[37]); SQRADDAC(a[8], a[36]); SQRADDAC(a[9], a[35]); SQRADDAC(a[10], a[34]); SQRADDAC(a[11], a[33]); SQRADDAC(a[12], a[32]); SQRADDAC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); - COMBA_STORE(b[44]); - - /* output 45 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[45]); SQRADDAC(a[1], a[44]); SQRADDAC(a[2], a[43]); SQRADDAC(a[3], a[42]); SQRADDAC(a[4], a[41]); SQRADDAC(a[5], a[40]); SQRADDAC(a[6], a[39]); SQRADDAC(a[7], a[38]); SQRADDAC(a[8], a[37]); SQRADDAC(a[9], a[36]); SQRADDAC(a[10], a[35]); SQRADDAC(a[11], a[34]); SQRADDAC(a[12], a[33]); SQRADDAC(a[13], a[32]); SQRADDAC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; - COMBA_STORE(b[45]); - - /* output 46 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[46]); SQRADDAC(a[1], a[45]); SQRADDAC(a[2], a[44]); SQRADDAC(a[3], a[43]); SQRADDAC(a[4], a[42]); SQRADDAC(a[5], a[41]); SQRADDAC(a[6], a[40]); SQRADDAC(a[7], a[39]); SQRADDAC(a[8], a[38]); SQRADDAC(a[9], a[37]); SQRADDAC(a[10], a[36]); SQRADDAC(a[11], a[35]); SQRADDAC(a[12], a[34]); SQRADDAC(a[13], a[33]); SQRADDAC(a[14], a[32]); SQRADDAC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); - COMBA_STORE(b[46]); - - /* output 47 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[47]); SQRADDAC(a[1], a[46]); SQRADDAC(a[2], a[45]); SQRADDAC(a[3], a[44]); SQRADDAC(a[4], a[43]); SQRADDAC(a[5], a[42]); SQRADDAC(a[6], a[41]); SQRADDAC(a[7], a[40]); SQRADDAC(a[8], a[39]); SQRADDAC(a[9], a[38]); SQRADDAC(a[10], a[37]); SQRADDAC(a[11], a[36]); SQRADDAC(a[12], a[35]); SQRADDAC(a[13], a[34]); SQRADDAC(a[14], a[33]); SQRADDAC(a[15], a[32]); SQRADDAC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; - COMBA_STORE(b[47]); - - /* output 48 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[47]); SQRADDAC(a[2], a[46]); SQRADDAC(a[3], a[45]); SQRADDAC(a[4], a[44]); SQRADDAC(a[5], a[43]); SQRADDAC(a[6], a[42]); SQRADDAC(a[7], a[41]); SQRADDAC(a[8], a[40]); SQRADDAC(a[9], a[39]); SQRADDAC(a[10], a[38]); SQRADDAC(a[11], a[37]); SQRADDAC(a[12], a[36]); SQRADDAC(a[13], a[35]); SQRADDAC(a[14], a[34]); SQRADDAC(a[15], a[33]); SQRADDAC(a[16], a[32]); SQRADDAC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); - COMBA_STORE(b[48]); - - /* output 49 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[47]); SQRADDAC(a[3], a[46]); SQRADDAC(a[4], a[45]); SQRADDAC(a[5], a[44]); SQRADDAC(a[6], a[43]); SQRADDAC(a[7], a[42]); SQRADDAC(a[8], a[41]); SQRADDAC(a[9], a[40]); SQRADDAC(a[10], a[39]); SQRADDAC(a[11], a[38]); SQRADDAC(a[12], a[37]); SQRADDAC(a[13], a[36]); SQRADDAC(a[14], a[35]); SQRADDAC(a[15], a[34]); SQRADDAC(a[16], a[33]); SQRADDAC(a[17], a[32]); SQRADDAC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; - COMBA_STORE(b[49]); - - /* output 50 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[47]); SQRADDAC(a[4], a[46]); SQRADDAC(a[5], a[45]); SQRADDAC(a[6], a[44]); SQRADDAC(a[7], a[43]); SQRADDAC(a[8], a[42]); SQRADDAC(a[9], a[41]); SQRADDAC(a[10], a[40]); SQRADDAC(a[11], a[39]); SQRADDAC(a[12], a[38]); SQRADDAC(a[13], a[37]); SQRADDAC(a[14], a[36]); SQRADDAC(a[15], a[35]); SQRADDAC(a[16], a[34]); SQRADDAC(a[17], a[33]); SQRADDAC(a[18], a[32]); SQRADDAC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); - COMBA_STORE(b[50]); - - /* output 51 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[47]); SQRADDAC(a[5], a[46]); SQRADDAC(a[6], a[45]); SQRADDAC(a[7], a[44]); SQRADDAC(a[8], a[43]); SQRADDAC(a[9], a[42]); SQRADDAC(a[10], a[41]); SQRADDAC(a[11], a[40]); SQRADDAC(a[12], a[39]); SQRADDAC(a[13], a[38]); SQRADDAC(a[14], a[37]); SQRADDAC(a[15], a[36]); SQRADDAC(a[16], a[35]); SQRADDAC(a[17], a[34]); SQRADDAC(a[18], a[33]); SQRADDAC(a[19], a[32]); SQRADDAC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; - COMBA_STORE(b[51]); - - /* output 52 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[47]); SQRADDAC(a[6], a[46]); SQRADDAC(a[7], a[45]); SQRADDAC(a[8], a[44]); SQRADDAC(a[9], a[43]); SQRADDAC(a[10], a[42]); SQRADDAC(a[11], a[41]); SQRADDAC(a[12], a[40]); SQRADDAC(a[13], a[39]); SQRADDAC(a[14], a[38]); SQRADDAC(a[15], a[37]); SQRADDAC(a[16], a[36]); SQRADDAC(a[17], a[35]); SQRADDAC(a[18], a[34]); SQRADDAC(a[19], a[33]); SQRADDAC(a[20], a[32]); SQRADDAC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); - COMBA_STORE(b[52]); - - /* output 53 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[47]); SQRADDAC(a[7], a[46]); SQRADDAC(a[8], a[45]); SQRADDAC(a[9], a[44]); SQRADDAC(a[10], a[43]); SQRADDAC(a[11], a[42]); SQRADDAC(a[12], a[41]); SQRADDAC(a[13], a[40]); SQRADDAC(a[14], a[39]); SQRADDAC(a[15], a[38]); SQRADDAC(a[16], a[37]); SQRADDAC(a[17], a[36]); SQRADDAC(a[18], a[35]); SQRADDAC(a[19], a[34]); SQRADDAC(a[20], a[33]); SQRADDAC(a[21], a[32]); SQRADDAC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; - COMBA_STORE(b[53]); - - /* output 54 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[47]); SQRADDAC(a[8], a[46]); SQRADDAC(a[9], a[45]); SQRADDAC(a[10], a[44]); SQRADDAC(a[11], a[43]); SQRADDAC(a[12], a[42]); SQRADDAC(a[13], a[41]); SQRADDAC(a[14], a[40]); SQRADDAC(a[15], a[39]); SQRADDAC(a[16], a[38]); SQRADDAC(a[17], a[37]); SQRADDAC(a[18], a[36]); SQRADDAC(a[19], a[35]); SQRADDAC(a[20], a[34]); SQRADDAC(a[21], a[33]); SQRADDAC(a[22], a[32]); SQRADDAC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); - COMBA_STORE(b[54]); - - /* output 55 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[47]); SQRADDAC(a[9], a[46]); SQRADDAC(a[10], a[45]); SQRADDAC(a[11], a[44]); SQRADDAC(a[12], a[43]); SQRADDAC(a[13], a[42]); SQRADDAC(a[14], a[41]); SQRADDAC(a[15], a[40]); SQRADDAC(a[16], a[39]); SQRADDAC(a[17], a[38]); SQRADDAC(a[18], a[37]); SQRADDAC(a[19], a[36]); SQRADDAC(a[20], a[35]); SQRADDAC(a[21], a[34]); SQRADDAC(a[22], a[33]); SQRADDAC(a[23], a[32]); SQRADDAC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; - COMBA_STORE(b[55]); - - /* output 56 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[47]); SQRADDAC(a[10], a[46]); SQRADDAC(a[11], a[45]); SQRADDAC(a[12], a[44]); SQRADDAC(a[13], a[43]); SQRADDAC(a[14], a[42]); SQRADDAC(a[15], a[41]); SQRADDAC(a[16], a[40]); SQRADDAC(a[17], a[39]); SQRADDAC(a[18], a[38]); SQRADDAC(a[19], a[37]); SQRADDAC(a[20], a[36]); SQRADDAC(a[21], a[35]); SQRADDAC(a[22], a[34]); SQRADDAC(a[23], a[33]); SQRADDAC(a[24], a[32]); SQRADDAC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); - COMBA_STORE(b[56]); - - /* output 57 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[47]); SQRADDAC(a[11], a[46]); SQRADDAC(a[12], a[45]); SQRADDAC(a[13], a[44]); SQRADDAC(a[14], a[43]); SQRADDAC(a[15], a[42]); SQRADDAC(a[16], a[41]); SQRADDAC(a[17], a[40]); SQRADDAC(a[18], a[39]); SQRADDAC(a[19], a[38]); SQRADDAC(a[20], a[37]); SQRADDAC(a[21], a[36]); SQRADDAC(a[22], a[35]); SQRADDAC(a[23], a[34]); SQRADDAC(a[24], a[33]); SQRADDAC(a[25], a[32]); SQRADDAC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; - COMBA_STORE(b[57]); - - /* output 58 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[47]); SQRADDAC(a[12], a[46]); SQRADDAC(a[13], a[45]); SQRADDAC(a[14], a[44]); SQRADDAC(a[15], a[43]); SQRADDAC(a[16], a[42]); SQRADDAC(a[17], a[41]); SQRADDAC(a[18], a[40]); SQRADDAC(a[19], a[39]); SQRADDAC(a[20], a[38]); SQRADDAC(a[21], a[37]); SQRADDAC(a[22], a[36]); SQRADDAC(a[23], a[35]); SQRADDAC(a[24], a[34]); SQRADDAC(a[25], a[33]); SQRADDAC(a[26], a[32]); SQRADDAC(a[27], a[31]); SQRADDAC(a[28], a[30]); SQRADDDB; SQRADD(a[29], a[29]); - COMBA_STORE(b[58]); - - /* output 59 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[47]); SQRADDAC(a[13], a[46]); SQRADDAC(a[14], a[45]); SQRADDAC(a[15], a[44]); SQRADDAC(a[16], a[43]); SQRADDAC(a[17], a[42]); SQRADDAC(a[18], a[41]); SQRADDAC(a[19], a[40]); SQRADDAC(a[20], a[39]); SQRADDAC(a[21], a[38]); SQRADDAC(a[22], a[37]); SQRADDAC(a[23], a[36]); SQRADDAC(a[24], a[35]); SQRADDAC(a[25], a[34]); SQRADDAC(a[26], a[33]); SQRADDAC(a[27], a[32]); SQRADDAC(a[28], a[31]); SQRADDAC(a[29], a[30]); SQRADDDB; - COMBA_STORE(b[59]); - - /* output 60 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[47]); SQRADDAC(a[14], a[46]); SQRADDAC(a[15], a[45]); SQRADDAC(a[16], a[44]); SQRADDAC(a[17], a[43]); SQRADDAC(a[18], a[42]); SQRADDAC(a[19], a[41]); SQRADDAC(a[20], a[40]); SQRADDAC(a[21], a[39]); SQRADDAC(a[22], a[38]); SQRADDAC(a[23], a[37]); SQRADDAC(a[24], a[36]); SQRADDAC(a[25], a[35]); SQRADDAC(a[26], a[34]); SQRADDAC(a[27], a[33]); SQRADDAC(a[28], a[32]); SQRADDAC(a[29], a[31]); SQRADDDB; SQRADD(a[30], a[30]); - COMBA_STORE(b[60]); - - /* output 61 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[47]); SQRADDAC(a[15], a[46]); SQRADDAC(a[16], a[45]); SQRADDAC(a[17], a[44]); SQRADDAC(a[18], a[43]); SQRADDAC(a[19], a[42]); SQRADDAC(a[20], a[41]); SQRADDAC(a[21], a[40]); SQRADDAC(a[22], a[39]); SQRADDAC(a[23], a[38]); SQRADDAC(a[24], a[37]); SQRADDAC(a[25], a[36]); SQRADDAC(a[26], a[35]); SQRADDAC(a[27], a[34]); SQRADDAC(a[28], a[33]); SQRADDAC(a[29], a[32]); SQRADDAC(a[30], a[31]); SQRADDDB; - COMBA_STORE(b[61]); - - /* output 62 */ - CARRY_FORWARD; - SQRADDSC(a[15], a[47]); SQRADDAC(a[16], a[46]); SQRADDAC(a[17], a[45]); SQRADDAC(a[18], a[44]); SQRADDAC(a[19], a[43]); SQRADDAC(a[20], a[42]); SQRADDAC(a[21], a[41]); SQRADDAC(a[22], a[40]); SQRADDAC(a[23], a[39]); SQRADDAC(a[24], a[38]); SQRADDAC(a[25], a[37]); SQRADDAC(a[26], a[36]); SQRADDAC(a[27], a[35]); SQRADDAC(a[28], a[34]); SQRADDAC(a[29], a[33]); SQRADDAC(a[30], a[32]); SQRADDDB; SQRADD(a[31], a[31]); - COMBA_STORE(b[62]); - - /* output 63 */ - CARRY_FORWARD; - SQRADDSC(a[16], a[47]); SQRADDAC(a[17], a[46]); SQRADDAC(a[18], a[45]); SQRADDAC(a[19], a[44]); SQRADDAC(a[20], a[43]); SQRADDAC(a[21], a[42]); SQRADDAC(a[22], a[41]); SQRADDAC(a[23], a[40]); SQRADDAC(a[24], a[39]); SQRADDAC(a[25], a[38]); SQRADDAC(a[26], a[37]); SQRADDAC(a[27], a[36]); SQRADDAC(a[28], a[35]); SQRADDAC(a[29], a[34]); SQRADDAC(a[30], a[33]); SQRADDAC(a[31], a[32]); SQRADDDB; - COMBA_STORE(b[63]); - - /* output 64 */ - CARRY_FORWARD; - SQRADDSC(a[17], a[47]); SQRADDAC(a[18], a[46]); SQRADDAC(a[19], a[45]); SQRADDAC(a[20], a[44]); SQRADDAC(a[21], a[43]); SQRADDAC(a[22], a[42]); SQRADDAC(a[23], a[41]); SQRADDAC(a[24], a[40]); SQRADDAC(a[25], a[39]); SQRADDAC(a[26], a[38]); SQRADDAC(a[27], a[37]); SQRADDAC(a[28], a[36]); SQRADDAC(a[29], a[35]); SQRADDAC(a[30], a[34]); SQRADDAC(a[31], a[33]); SQRADDDB; SQRADD(a[32], a[32]); - COMBA_STORE(b[64]); - - /* output 65 */ - CARRY_FORWARD; - SQRADDSC(a[18], a[47]); SQRADDAC(a[19], a[46]); SQRADDAC(a[20], a[45]); SQRADDAC(a[21], a[44]); SQRADDAC(a[22], a[43]); SQRADDAC(a[23], a[42]); SQRADDAC(a[24], a[41]); SQRADDAC(a[25], a[40]); SQRADDAC(a[26], a[39]); SQRADDAC(a[27], a[38]); SQRADDAC(a[28], a[37]); SQRADDAC(a[29], a[36]); SQRADDAC(a[30], a[35]); SQRADDAC(a[31], a[34]); SQRADDAC(a[32], a[33]); SQRADDDB; - COMBA_STORE(b[65]); - - /* output 66 */ - CARRY_FORWARD; - SQRADDSC(a[19], a[47]); SQRADDAC(a[20], a[46]); SQRADDAC(a[21], a[45]); SQRADDAC(a[22], a[44]); SQRADDAC(a[23], a[43]); SQRADDAC(a[24], a[42]); SQRADDAC(a[25], a[41]); SQRADDAC(a[26], a[40]); SQRADDAC(a[27], a[39]); SQRADDAC(a[28], a[38]); SQRADDAC(a[29], a[37]); SQRADDAC(a[30], a[36]); SQRADDAC(a[31], a[35]); SQRADDAC(a[32], a[34]); SQRADDDB; SQRADD(a[33], a[33]); - COMBA_STORE(b[66]); - - /* output 67 */ - CARRY_FORWARD; - SQRADDSC(a[20], a[47]); SQRADDAC(a[21], a[46]); SQRADDAC(a[22], a[45]); SQRADDAC(a[23], a[44]); SQRADDAC(a[24], a[43]); SQRADDAC(a[25], a[42]); SQRADDAC(a[26], a[41]); SQRADDAC(a[27], a[40]); SQRADDAC(a[28], a[39]); SQRADDAC(a[29], a[38]); SQRADDAC(a[30], a[37]); SQRADDAC(a[31], a[36]); SQRADDAC(a[32], a[35]); SQRADDAC(a[33], a[34]); SQRADDDB; - COMBA_STORE(b[67]); - - /* output 68 */ - CARRY_FORWARD; - SQRADDSC(a[21], a[47]); SQRADDAC(a[22], a[46]); SQRADDAC(a[23], a[45]); SQRADDAC(a[24], a[44]); SQRADDAC(a[25], a[43]); SQRADDAC(a[26], a[42]); SQRADDAC(a[27], a[41]); SQRADDAC(a[28], a[40]); SQRADDAC(a[29], a[39]); SQRADDAC(a[30], a[38]); SQRADDAC(a[31], a[37]); SQRADDAC(a[32], a[36]); SQRADDAC(a[33], a[35]); SQRADDDB; SQRADD(a[34], a[34]); - COMBA_STORE(b[68]); - - /* output 69 */ - CARRY_FORWARD; - SQRADDSC(a[22], a[47]); SQRADDAC(a[23], a[46]); SQRADDAC(a[24], a[45]); SQRADDAC(a[25], a[44]); SQRADDAC(a[26], a[43]); SQRADDAC(a[27], a[42]); SQRADDAC(a[28], a[41]); SQRADDAC(a[29], a[40]); SQRADDAC(a[30], a[39]); SQRADDAC(a[31], a[38]); SQRADDAC(a[32], a[37]); SQRADDAC(a[33], a[36]); SQRADDAC(a[34], a[35]); SQRADDDB; - COMBA_STORE(b[69]); - - /* output 70 */ - CARRY_FORWARD; - SQRADDSC(a[23], a[47]); SQRADDAC(a[24], a[46]); SQRADDAC(a[25], a[45]); SQRADDAC(a[26], a[44]); SQRADDAC(a[27], a[43]); SQRADDAC(a[28], a[42]); SQRADDAC(a[29], a[41]); SQRADDAC(a[30], a[40]); SQRADDAC(a[31], a[39]); SQRADDAC(a[32], a[38]); SQRADDAC(a[33], a[37]); SQRADDAC(a[34], a[36]); SQRADDDB; SQRADD(a[35], a[35]); - COMBA_STORE(b[70]); - - /* output 71 */ - CARRY_FORWARD; - SQRADDSC(a[24], a[47]); SQRADDAC(a[25], a[46]); SQRADDAC(a[26], a[45]); SQRADDAC(a[27], a[44]); SQRADDAC(a[28], a[43]); SQRADDAC(a[29], a[42]); SQRADDAC(a[30], a[41]); SQRADDAC(a[31], a[40]); SQRADDAC(a[32], a[39]); SQRADDAC(a[33], a[38]); SQRADDAC(a[34], a[37]); SQRADDAC(a[35], a[36]); SQRADDDB; - COMBA_STORE(b[71]); - - /* output 72 */ - CARRY_FORWARD; - SQRADDSC(a[25], a[47]); SQRADDAC(a[26], a[46]); SQRADDAC(a[27], a[45]); SQRADDAC(a[28], a[44]); SQRADDAC(a[29], a[43]); SQRADDAC(a[30], a[42]); SQRADDAC(a[31], a[41]); SQRADDAC(a[32], a[40]); SQRADDAC(a[33], a[39]); SQRADDAC(a[34], a[38]); SQRADDAC(a[35], a[37]); SQRADDDB; SQRADD(a[36], a[36]); - COMBA_STORE(b[72]); - - /* output 73 */ - CARRY_FORWARD; - SQRADDSC(a[26], a[47]); SQRADDAC(a[27], a[46]); SQRADDAC(a[28], a[45]); SQRADDAC(a[29], a[44]); SQRADDAC(a[30], a[43]); SQRADDAC(a[31], a[42]); SQRADDAC(a[32], a[41]); SQRADDAC(a[33], a[40]); SQRADDAC(a[34], a[39]); SQRADDAC(a[35], a[38]); SQRADDAC(a[36], a[37]); SQRADDDB; - COMBA_STORE(b[73]); - - /* output 74 */ - CARRY_FORWARD; - SQRADDSC(a[27], a[47]); SQRADDAC(a[28], a[46]); SQRADDAC(a[29], a[45]); SQRADDAC(a[30], a[44]); SQRADDAC(a[31], a[43]); SQRADDAC(a[32], a[42]); SQRADDAC(a[33], a[41]); SQRADDAC(a[34], a[40]); SQRADDAC(a[35], a[39]); SQRADDAC(a[36], a[38]); SQRADDDB; SQRADD(a[37], a[37]); - COMBA_STORE(b[74]); - - /* output 75 */ - CARRY_FORWARD; - SQRADDSC(a[28], a[47]); SQRADDAC(a[29], a[46]); SQRADDAC(a[30], a[45]); SQRADDAC(a[31], a[44]); SQRADDAC(a[32], a[43]); SQRADDAC(a[33], a[42]); SQRADDAC(a[34], a[41]); SQRADDAC(a[35], a[40]); SQRADDAC(a[36], a[39]); SQRADDAC(a[37], a[38]); SQRADDDB; - COMBA_STORE(b[75]); - - /* output 76 */ - CARRY_FORWARD; - SQRADDSC(a[29], a[47]); SQRADDAC(a[30], a[46]); SQRADDAC(a[31], a[45]); SQRADDAC(a[32], a[44]); SQRADDAC(a[33], a[43]); SQRADDAC(a[34], a[42]); SQRADDAC(a[35], a[41]); SQRADDAC(a[36], a[40]); SQRADDAC(a[37], a[39]); SQRADDDB; SQRADD(a[38], a[38]); - COMBA_STORE(b[76]); - - /* output 77 */ - CARRY_FORWARD; - SQRADDSC(a[30], a[47]); SQRADDAC(a[31], a[46]); SQRADDAC(a[32], a[45]); SQRADDAC(a[33], a[44]); SQRADDAC(a[34], a[43]); SQRADDAC(a[35], a[42]); SQRADDAC(a[36], a[41]); SQRADDAC(a[37], a[40]); SQRADDAC(a[38], a[39]); SQRADDDB; - COMBA_STORE(b[77]); - - /* output 78 */ - CARRY_FORWARD; - SQRADDSC(a[31], a[47]); SQRADDAC(a[32], a[46]); SQRADDAC(a[33], a[45]); SQRADDAC(a[34], a[44]); SQRADDAC(a[35], a[43]); SQRADDAC(a[36], a[42]); SQRADDAC(a[37], a[41]); SQRADDAC(a[38], a[40]); SQRADDDB; SQRADD(a[39], a[39]); - COMBA_STORE(b[78]); - - /* output 79 */ - CARRY_FORWARD; - SQRADDSC(a[32], a[47]); SQRADDAC(a[33], a[46]); SQRADDAC(a[34], a[45]); SQRADDAC(a[35], a[44]); SQRADDAC(a[36], a[43]); SQRADDAC(a[37], a[42]); SQRADDAC(a[38], a[41]); SQRADDAC(a[39], a[40]); SQRADDDB; - COMBA_STORE(b[79]); - - /* output 80 */ - CARRY_FORWARD; - SQRADDSC(a[33], a[47]); SQRADDAC(a[34], a[46]); SQRADDAC(a[35], a[45]); SQRADDAC(a[36], a[44]); SQRADDAC(a[37], a[43]); SQRADDAC(a[38], a[42]); SQRADDAC(a[39], a[41]); SQRADDDB; SQRADD(a[40], a[40]); - COMBA_STORE(b[80]); - - /* output 81 */ - CARRY_FORWARD; - SQRADDSC(a[34], a[47]); SQRADDAC(a[35], a[46]); SQRADDAC(a[36], a[45]); SQRADDAC(a[37], a[44]); SQRADDAC(a[38], a[43]); SQRADDAC(a[39], a[42]); SQRADDAC(a[40], a[41]); SQRADDDB; - COMBA_STORE(b[81]); - - /* output 82 */ - CARRY_FORWARD; - SQRADDSC(a[35], a[47]); SQRADDAC(a[36], a[46]); SQRADDAC(a[37], a[45]); SQRADDAC(a[38], a[44]); SQRADDAC(a[39], a[43]); SQRADDAC(a[40], a[42]); SQRADDDB; SQRADD(a[41], a[41]); - COMBA_STORE(b[82]); - - /* output 83 */ - CARRY_FORWARD; - SQRADDSC(a[36], a[47]); SQRADDAC(a[37], a[46]); SQRADDAC(a[38], a[45]); SQRADDAC(a[39], a[44]); SQRADDAC(a[40], a[43]); SQRADDAC(a[41], a[42]); SQRADDDB; - COMBA_STORE(b[83]); - - /* output 84 */ - CARRY_FORWARD; - SQRADDSC(a[37], a[47]); SQRADDAC(a[38], a[46]); SQRADDAC(a[39], a[45]); SQRADDAC(a[40], a[44]); SQRADDAC(a[41], a[43]); SQRADDDB; SQRADD(a[42], a[42]); - COMBA_STORE(b[84]); - - /* output 85 */ - CARRY_FORWARD; - SQRADDSC(a[38], a[47]); SQRADDAC(a[39], a[46]); SQRADDAC(a[40], a[45]); SQRADDAC(a[41], a[44]); SQRADDAC(a[42], a[43]); SQRADDDB; - COMBA_STORE(b[85]); - - /* output 86 */ - CARRY_FORWARD; - SQRADDSC(a[39], a[47]); SQRADDAC(a[40], a[46]); SQRADDAC(a[41], a[45]); SQRADDAC(a[42], a[44]); SQRADDDB; SQRADD(a[43], a[43]); - COMBA_STORE(b[86]); - - /* output 87 */ - CARRY_FORWARD; - SQRADDSC(a[40], a[47]); SQRADDAC(a[41], a[46]); SQRADDAC(a[42], a[45]); SQRADDAC(a[43], a[44]); SQRADDDB; - COMBA_STORE(b[87]); - - /* output 88 */ - CARRY_FORWARD; - SQRADDSC(a[41], a[47]); SQRADDAC(a[42], a[46]); SQRADDAC(a[43], a[45]); SQRADDDB; SQRADD(a[44], a[44]); - COMBA_STORE(b[88]); - - /* output 89 */ - CARRY_FORWARD; - SQRADDSC(a[42], a[47]); SQRADDAC(a[43], a[46]); SQRADDAC(a[44], a[45]); SQRADDDB; - COMBA_STORE(b[89]); - - /* output 90 */ - CARRY_FORWARD; - SQRADD2(a[43], a[47]); SQRADD2(a[44], a[46]); SQRADD(a[45], a[45]); - COMBA_STORE(b[90]); - - /* output 91 */ - CARRY_FORWARD; - SQRADD2(a[44], a[47]); SQRADD2(a[45], a[46]); - COMBA_STORE(b[91]); - - /* output 92 */ - CARRY_FORWARD; - SQRADD2(a[45], a[47]); SQRADD(a[46], a[46]); - COMBA_STORE(b[92]); - - /* output 93 */ - CARRY_FORWARD; - SQRADD2(a[46], a[47]); - COMBA_STORE(b[93]); - - /* output 94 */ - CARRY_FORWARD; - SQRADD(a[47], a[47]); - COMBA_STORE(b[94]); - COMBA_STORE2(b[95]); - COMBA_FINI; - - B->used = 96; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 96 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i deleted file mode 100644 index 75205e85..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_6.i +++ /dev/null @@ -1,100 +0,0 @@ -/* fp_sqr_comba_6.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR6 -void fp_sqr_comba6(fp_int *A, fp_int *B) -{ - fp_digit *a, b[12], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADD2(a[1], a[5]); SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADD2(a[2], a[5]); SQRADD2(a[3], a[4]); - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADD2(a[4], a[5]); - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - COMBA_STORE2(b[11]); - COMBA_FINI; - - B->used = 12; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 12 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i deleted file mode 100644 index 6c8b9f13..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_64.i +++ /dev/null @@ -1,680 +0,0 @@ -/* fp_sqr_comba_64.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR64 -void fp_sqr_comba64(fp_int *A, fp_int *B) -{ - fp_digit *a, b[128], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[16]); SQRADDAC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[17]); SQRADDAC(a[1], a[16]); SQRADDAC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[18]); SQRADDAC(a[1], a[17]); SQRADDAC(a[2], a[16]); SQRADDAC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[19]); SQRADDAC(a[1], a[18]); SQRADDAC(a[2], a[17]); SQRADDAC(a[3], a[16]); SQRADDAC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[20]); SQRADDAC(a[1], a[19]); SQRADDAC(a[2], a[18]); SQRADDAC(a[3], a[17]); SQRADDAC(a[4], a[16]); SQRADDAC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[21]); SQRADDAC(a[1], a[20]); SQRADDAC(a[2], a[19]); SQRADDAC(a[3], a[18]); SQRADDAC(a[4], a[17]); SQRADDAC(a[5], a[16]); SQRADDAC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[22]); SQRADDAC(a[1], a[21]); SQRADDAC(a[2], a[20]); SQRADDAC(a[3], a[19]); SQRADDAC(a[4], a[18]); SQRADDAC(a[5], a[17]); SQRADDAC(a[6], a[16]); SQRADDAC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[23]); SQRADDAC(a[1], a[22]); SQRADDAC(a[2], a[21]); SQRADDAC(a[3], a[20]); SQRADDAC(a[4], a[19]); SQRADDAC(a[5], a[18]); SQRADDAC(a[6], a[17]); SQRADDAC(a[7], a[16]); SQRADDAC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[24]); SQRADDAC(a[1], a[23]); SQRADDAC(a[2], a[22]); SQRADDAC(a[3], a[21]); SQRADDAC(a[4], a[20]); SQRADDAC(a[5], a[19]); SQRADDAC(a[6], a[18]); SQRADDAC(a[7], a[17]); SQRADDAC(a[8], a[16]); SQRADDAC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[25]); SQRADDAC(a[1], a[24]); SQRADDAC(a[2], a[23]); SQRADDAC(a[3], a[22]); SQRADDAC(a[4], a[21]); SQRADDAC(a[5], a[20]); SQRADDAC(a[6], a[19]); SQRADDAC(a[7], a[18]); SQRADDAC(a[8], a[17]); SQRADDAC(a[9], a[16]); SQRADDAC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[26]); SQRADDAC(a[1], a[25]); SQRADDAC(a[2], a[24]); SQRADDAC(a[3], a[23]); SQRADDAC(a[4], a[22]); SQRADDAC(a[5], a[21]); SQRADDAC(a[6], a[20]); SQRADDAC(a[7], a[19]); SQRADDAC(a[8], a[18]); SQRADDAC(a[9], a[17]); SQRADDAC(a[10], a[16]); SQRADDAC(a[11], a[15]); SQRADDAC(a[12], a[14]); SQRADDDB; SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[27]); SQRADDAC(a[1], a[26]); SQRADDAC(a[2], a[25]); SQRADDAC(a[3], a[24]); SQRADDAC(a[4], a[23]); SQRADDAC(a[5], a[22]); SQRADDAC(a[6], a[21]); SQRADDAC(a[7], a[20]); SQRADDAC(a[8], a[19]); SQRADDAC(a[9], a[18]); SQRADDAC(a[10], a[17]); SQRADDAC(a[11], a[16]); SQRADDAC(a[12], a[15]); SQRADDAC(a[13], a[14]); SQRADDDB; - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[28]); SQRADDAC(a[1], a[27]); SQRADDAC(a[2], a[26]); SQRADDAC(a[3], a[25]); SQRADDAC(a[4], a[24]); SQRADDAC(a[5], a[23]); SQRADDAC(a[6], a[22]); SQRADDAC(a[7], a[21]); SQRADDAC(a[8], a[20]); SQRADDAC(a[9], a[19]); SQRADDAC(a[10], a[18]); SQRADDAC(a[11], a[17]); SQRADDAC(a[12], a[16]); SQRADDAC(a[13], a[15]); SQRADDDB; SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[29]); SQRADDAC(a[1], a[28]); SQRADDAC(a[2], a[27]); SQRADDAC(a[3], a[26]); SQRADDAC(a[4], a[25]); SQRADDAC(a[5], a[24]); SQRADDAC(a[6], a[23]); SQRADDAC(a[7], a[22]); SQRADDAC(a[8], a[21]); SQRADDAC(a[9], a[20]); SQRADDAC(a[10], a[19]); SQRADDAC(a[11], a[18]); SQRADDAC(a[12], a[17]); SQRADDAC(a[13], a[16]); SQRADDAC(a[14], a[15]); SQRADDDB; - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[30]); SQRADDAC(a[1], a[29]); SQRADDAC(a[2], a[28]); SQRADDAC(a[3], a[27]); SQRADDAC(a[4], a[26]); SQRADDAC(a[5], a[25]); SQRADDAC(a[6], a[24]); SQRADDAC(a[7], a[23]); SQRADDAC(a[8], a[22]); SQRADDAC(a[9], a[21]); SQRADDAC(a[10], a[20]); SQRADDAC(a[11], a[19]); SQRADDAC(a[12], a[18]); SQRADDAC(a[13], a[17]); SQRADDAC(a[14], a[16]); SQRADDDB; SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - - /* output 31 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[31]); SQRADDAC(a[1], a[30]); SQRADDAC(a[2], a[29]); SQRADDAC(a[3], a[28]); SQRADDAC(a[4], a[27]); SQRADDAC(a[5], a[26]); SQRADDAC(a[6], a[25]); SQRADDAC(a[7], a[24]); SQRADDAC(a[8], a[23]); SQRADDAC(a[9], a[22]); SQRADDAC(a[10], a[21]); SQRADDAC(a[11], a[20]); SQRADDAC(a[12], a[19]); SQRADDAC(a[13], a[18]); SQRADDAC(a[14], a[17]); SQRADDAC(a[15], a[16]); SQRADDDB; - COMBA_STORE(b[31]); - - /* output 32 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[32]); SQRADDAC(a[1], a[31]); SQRADDAC(a[2], a[30]); SQRADDAC(a[3], a[29]); SQRADDAC(a[4], a[28]); SQRADDAC(a[5], a[27]); SQRADDAC(a[6], a[26]); SQRADDAC(a[7], a[25]); SQRADDAC(a[8], a[24]); SQRADDAC(a[9], a[23]); SQRADDAC(a[10], a[22]); SQRADDAC(a[11], a[21]); SQRADDAC(a[12], a[20]); SQRADDAC(a[13], a[19]); SQRADDAC(a[14], a[18]); SQRADDAC(a[15], a[17]); SQRADDDB; SQRADD(a[16], a[16]); - COMBA_STORE(b[32]); - - /* output 33 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[33]); SQRADDAC(a[1], a[32]); SQRADDAC(a[2], a[31]); SQRADDAC(a[3], a[30]); SQRADDAC(a[4], a[29]); SQRADDAC(a[5], a[28]); SQRADDAC(a[6], a[27]); SQRADDAC(a[7], a[26]); SQRADDAC(a[8], a[25]); SQRADDAC(a[9], a[24]); SQRADDAC(a[10], a[23]); SQRADDAC(a[11], a[22]); SQRADDAC(a[12], a[21]); SQRADDAC(a[13], a[20]); SQRADDAC(a[14], a[19]); SQRADDAC(a[15], a[18]); SQRADDAC(a[16], a[17]); SQRADDDB; - COMBA_STORE(b[33]); - - /* output 34 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[34]); SQRADDAC(a[1], a[33]); SQRADDAC(a[2], a[32]); SQRADDAC(a[3], a[31]); SQRADDAC(a[4], a[30]); SQRADDAC(a[5], a[29]); SQRADDAC(a[6], a[28]); SQRADDAC(a[7], a[27]); SQRADDAC(a[8], a[26]); SQRADDAC(a[9], a[25]); SQRADDAC(a[10], a[24]); SQRADDAC(a[11], a[23]); SQRADDAC(a[12], a[22]); SQRADDAC(a[13], a[21]); SQRADDAC(a[14], a[20]); SQRADDAC(a[15], a[19]); SQRADDAC(a[16], a[18]); SQRADDDB; SQRADD(a[17], a[17]); - COMBA_STORE(b[34]); - - /* output 35 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[35]); SQRADDAC(a[1], a[34]); SQRADDAC(a[2], a[33]); SQRADDAC(a[3], a[32]); SQRADDAC(a[4], a[31]); SQRADDAC(a[5], a[30]); SQRADDAC(a[6], a[29]); SQRADDAC(a[7], a[28]); SQRADDAC(a[8], a[27]); SQRADDAC(a[9], a[26]); SQRADDAC(a[10], a[25]); SQRADDAC(a[11], a[24]); SQRADDAC(a[12], a[23]); SQRADDAC(a[13], a[22]); SQRADDAC(a[14], a[21]); SQRADDAC(a[15], a[20]); SQRADDAC(a[16], a[19]); SQRADDAC(a[17], a[18]); SQRADDDB; - COMBA_STORE(b[35]); - - /* output 36 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[36]); SQRADDAC(a[1], a[35]); SQRADDAC(a[2], a[34]); SQRADDAC(a[3], a[33]); SQRADDAC(a[4], a[32]); SQRADDAC(a[5], a[31]); SQRADDAC(a[6], a[30]); SQRADDAC(a[7], a[29]); SQRADDAC(a[8], a[28]); SQRADDAC(a[9], a[27]); SQRADDAC(a[10], a[26]); SQRADDAC(a[11], a[25]); SQRADDAC(a[12], a[24]); SQRADDAC(a[13], a[23]); SQRADDAC(a[14], a[22]); SQRADDAC(a[15], a[21]); SQRADDAC(a[16], a[20]); SQRADDAC(a[17], a[19]); SQRADDDB; SQRADD(a[18], a[18]); - COMBA_STORE(b[36]); - - /* output 37 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[37]); SQRADDAC(a[1], a[36]); SQRADDAC(a[2], a[35]); SQRADDAC(a[3], a[34]); SQRADDAC(a[4], a[33]); SQRADDAC(a[5], a[32]); SQRADDAC(a[6], a[31]); SQRADDAC(a[7], a[30]); SQRADDAC(a[8], a[29]); SQRADDAC(a[9], a[28]); SQRADDAC(a[10], a[27]); SQRADDAC(a[11], a[26]); SQRADDAC(a[12], a[25]); SQRADDAC(a[13], a[24]); SQRADDAC(a[14], a[23]); SQRADDAC(a[15], a[22]); SQRADDAC(a[16], a[21]); SQRADDAC(a[17], a[20]); SQRADDAC(a[18], a[19]); SQRADDDB; - COMBA_STORE(b[37]); - - /* output 38 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[38]); SQRADDAC(a[1], a[37]); SQRADDAC(a[2], a[36]); SQRADDAC(a[3], a[35]); SQRADDAC(a[4], a[34]); SQRADDAC(a[5], a[33]); SQRADDAC(a[6], a[32]); SQRADDAC(a[7], a[31]); SQRADDAC(a[8], a[30]); SQRADDAC(a[9], a[29]); SQRADDAC(a[10], a[28]); SQRADDAC(a[11], a[27]); SQRADDAC(a[12], a[26]); SQRADDAC(a[13], a[25]); SQRADDAC(a[14], a[24]); SQRADDAC(a[15], a[23]); SQRADDAC(a[16], a[22]); SQRADDAC(a[17], a[21]); SQRADDAC(a[18], a[20]); SQRADDDB; SQRADD(a[19], a[19]); - COMBA_STORE(b[38]); - - /* output 39 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[39]); SQRADDAC(a[1], a[38]); SQRADDAC(a[2], a[37]); SQRADDAC(a[3], a[36]); SQRADDAC(a[4], a[35]); SQRADDAC(a[5], a[34]); SQRADDAC(a[6], a[33]); SQRADDAC(a[7], a[32]); SQRADDAC(a[8], a[31]); SQRADDAC(a[9], a[30]); SQRADDAC(a[10], a[29]); SQRADDAC(a[11], a[28]); SQRADDAC(a[12], a[27]); SQRADDAC(a[13], a[26]); SQRADDAC(a[14], a[25]); SQRADDAC(a[15], a[24]); SQRADDAC(a[16], a[23]); SQRADDAC(a[17], a[22]); SQRADDAC(a[18], a[21]); SQRADDAC(a[19], a[20]); SQRADDDB; - COMBA_STORE(b[39]); - - /* output 40 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[40]); SQRADDAC(a[1], a[39]); SQRADDAC(a[2], a[38]); SQRADDAC(a[3], a[37]); SQRADDAC(a[4], a[36]); SQRADDAC(a[5], a[35]); SQRADDAC(a[6], a[34]); SQRADDAC(a[7], a[33]); SQRADDAC(a[8], a[32]); SQRADDAC(a[9], a[31]); SQRADDAC(a[10], a[30]); SQRADDAC(a[11], a[29]); SQRADDAC(a[12], a[28]); SQRADDAC(a[13], a[27]); SQRADDAC(a[14], a[26]); SQRADDAC(a[15], a[25]); SQRADDAC(a[16], a[24]); SQRADDAC(a[17], a[23]); SQRADDAC(a[18], a[22]); SQRADDAC(a[19], a[21]); SQRADDDB; SQRADD(a[20], a[20]); - COMBA_STORE(b[40]); - - /* output 41 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[41]); SQRADDAC(a[1], a[40]); SQRADDAC(a[2], a[39]); SQRADDAC(a[3], a[38]); SQRADDAC(a[4], a[37]); SQRADDAC(a[5], a[36]); SQRADDAC(a[6], a[35]); SQRADDAC(a[7], a[34]); SQRADDAC(a[8], a[33]); SQRADDAC(a[9], a[32]); SQRADDAC(a[10], a[31]); SQRADDAC(a[11], a[30]); SQRADDAC(a[12], a[29]); SQRADDAC(a[13], a[28]); SQRADDAC(a[14], a[27]); SQRADDAC(a[15], a[26]); SQRADDAC(a[16], a[25]); SQRADDAC(a[17], a[24]); SQRADDAC(a[18], a[23]); SQRADDAC(a[19], a[22]); SQRADDAC(a[20], a[21]); SQRADDDB; - COMBA_STORE(b[41]); - - /* output 42 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[42]); SQRADDAC(a[1], a[41]); SQRADDAC(a[2], a[40]); SQRADDAC(a[3], a[39]); SQRADDAC(a[4], a[38]); SQRADDAC(a[5], a[37]); SQRADDAC(a[6], a[36]); SQRADDAC(a[7], a[35]); SQRADDAC(a[8], a[34]); SQRADDAC(a[9], a[33]); SQRADDAC(a[10], a[32]); SQRADDAC(a[11], a[31]); SQRADDAC(a[12], a[30]); SQRADDAC(a[13], a[29]); SQRADDAC(a[14], a[28]); SQRADDAC(a[15], a[27]); SQRADDAC(a[16], a[26]); SQRADDAC(a[17], a[25]); SQRADDAC(a[18], a[24]); SQRADDAC(a[19], a[23]); SQRADDAC(a[20], a[22]); SQRADDDB; SQRADD(a[21], a[21]); - COMBA_STORE(b[42]); - - /* output 43 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[43]); SQRADDAC(a[1], a[42]); SQRADDAC(a[2], a[41]); SQRADDAC(a[3], a[40]); SQRADDAC(a[4], a[39]); SQRADDAC(a[5], a[38]); SQRADDAC(a[6], a[37]); SQRADDAC(a[7], a[36]); SQRADDAC(a[8], a[35]); SQRADDAC(a[9], a[34]); SQRADDAC(a[10], a[33]); SQRADDAC(a[11], a[32]); SQRADDAC(a[12], a[31]); SQRADDAC(a[13], a[30]); SQRADDAC(a[14], a[29]); SQRADDAC(a[15], a[28]); SQRADDAC(a[16], a[27]); SQRADDAC(a[17], a[26]); SQRADDAC(a[18], a[25]); SQRADDAC(a[19], a[24]); SQRADDAC(a[20], a[23]); SQRADDAC(a[21], a[22]); SQRADDDB; - COMBA_STORE(b[43]); - - /* output 44 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[44]); SQRADDAC(a[1], a[43]); SQRADDAC(a[2], a[42]); SQRADDAC(a[3], a[41]); SQRADDAC(a[4], a[40]); SQRADDAC(a[5], a[39]); SQRADDAC(a[6], a[38]); SQRADDAC(a[7], a[37]); SQRADDAC(a[8], a[36]); SQRADDAC(a[9], a[35]); SQRADDAC(a[10], a[34]); SQRADDAC(a[11], a[33]); SQRADDAC(a[12], a[32]); SQRADDAC(a[13], a[31]); SQRADDAC(a[14], a[30]); SQRADDAC(a[15], a[29]); SQRADDAC(a[16], a[28]); SQRADDAC(a[17], a[27]); SQRADDAC(a[18], a[26]); SQRADDAC(a[19], a[25]); SQRADDAC(a[20], a[24]); SQRADDAC(a[21], a[23]); SQRADDDB; SQRADD(a[22], a[22]); - COMBA_STORE(b[44]); - - /* output 45 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[45]); SQRADDAC(a[1], a[44]); SQRADDAC(a[2], a[43]); SQRADDAC(a[3], a[42]); SQRADDAC(a[4], a[41]); SQRADDAC(a[5], a[40]); SQRADDAC(a[6], a[39]); SQRADDAC(a[7], a[38]); SQRADDAC(a[8], a[37]); SQRADDAC(a[9], a[36]); SQRADDAC(a[10], a[35]); SQRADDAC(a[11], a[34]); SQRADDAC(a[12], a[33]); SQRADDAC(a[13], a[32]); SQRADDAC(a[14], a[31]); SQRADDAC(a[15], a[30]); SQRADDAC(a[16], a[29]); SQRADDAC(a[17], a[28]); SQRADDAC(a[18], a[27]); SQRADDAC(a[19], a[26]); SQRADDAC(a[20], a[25]); SQRADDAC(a[21], a[24]); SQRADDAC(a[22], a[23]); SQRADDDB; - COMBA_STORE(b[45]); - - /* output 46 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[46]); SQRADDAC(a[1], a[45]); SQRADDAC(a[2], a[44]); SQRADDAC(a[3], a[43]); SQRADDAC(a[4], a[42]); SQRADDAC(a[5], a[41]); SQRADDAC(a[6], a[40]); SQRADDAC(a[7], a[39]); SQRADDAC(a[8], a[38]); SQRADDAC(a[9], a[37]); SQRADDAC(a[10], a[36]); SQRADDAC(a[11], a[35]); SQRADDAC(a[12], a[34]); SQRADDAC(a[13], a[33]); SQRADDAC(a[14], a[32]); SQRADDAC(a[15], a[31]); SQRADDAC(a[16], a[30]); SQRADDAC(a[17], a[29]); SQRADDAC(a[18], a[28]); SQRADDAC(a[19], a[27]); SQRADDAC(a[20], a[26]); SQRADDAC(a[21], a[25]); SQRADDAC(a[22], a[24]); SQRADDDB; SQRADD(a[23], a[23]); - COMBA_STORE(b[46]); - - /* output 47 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[47]); SQRADDAC(a[1], a[46]); SQRADDAC(a[2], a[45]); SQRADDAC(a[3], a[44]); SQRADDAC(a[4], a[43]); SQRADDAC(a[5], a[42]); SQRADDAC(a[6], a[41]); SQRADDAC(a[7], a[40]); SQRADDAC(a[8], a[39]); SQRADDAC(a[9], a[38]); SQRADDAC(a[10], a[37]); SQRADDAC(a[11], a[36]); SQRADDAC(a[12], a[35]); SQRADDAC(a[13], a[34]); SQRADDAC(a[14], a[33]); SQRADDAC(a[15], a[32]); SQRADDAC(a[16], a[31]); SQRADDAC(a[17], a[30]); SQRADDAC(a[18], a[29]); SQRADDAC(a[19], a[28]); SQRADDAC(a[20], a[27]); SQRADDAC(a[21], a[26]); SQRADDAC(a[22], a[25]); SQRADDAC(a[23], a[24]); SQRADDDB; - COMBA_STORE(b[47]); - - /* output 48 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[48]); SQRADDAC(a[1], a[47]); SQRADDAC(a[2], a[46]); SQRADDAC(a[3], a[45]); SQRADDAC(a[4], a[44]); SQRADDAC(a[5], a[43]); SQRADDAC(a[6], a[42]); SQRADDAC(a[7], a[41]); SQRADDAC(a[8], a[40]); SQRADDAC(a[9], a[39]); SQRADDAC(a[10], a[38]); SQRADDAC(a[11], a[37]); SQRADDAC(a[12], a[36]); SQRADDAC(a[13], a[35]); SQRADDAC(a[14], a[34]); SQRADDAC(a[15], a[33]); SQRADDAC(a[16], a[32]); SQRADDAC(a[17], a[31]); SQRADDAC(a[18], a[30]); SQRADDAC(a[19], a[29]); SQRADDAC(a[20], a[28]); SQRADDAC(a[21], a[27]); SQRADDAC(a[22], a[26]); SQRADDAC(a[23], a[25]); SQRADDDB; SQRADD(a[24], a[24]); - COMBA_STORE(b[48]); - - /* output 49 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[49]); SQRADDAC(a[1], a[48]); SQRADDAC(a[2], a[47]); SQRADDAC(a[3], a[46]); SQRADDAC(a[4], a[45]); SQRADDAC(a[5], a[44]); SQRADDAC(a[6], a[43]); SQRADDAC(a[7], a[42]); SQRADDAC(a[8], a[41]); SQRADDAC(a[9], a[40]); SQRADDAC(a[10], a[39]); SQRADDAC(a[11], a[38]); SQRADDAC(a[12], a[37]); SQRADDAC(a[13], a[36]); SQRADDAC(a[14], a[35]); SQRADDAC(a[15], a[34]); SQRADDAC(a[16], a[33]); SQRADDAC(a[17], a[32]); SQRADDAC(a[18], a[31]); SQRADDAC(a[19], a[30]); SQRADDAC(a[20], a[29]); SQRADDAC(a[21], a[28]); SQRADDAC(a[22], a[27]); SQRADDAC(a[23], a[26]); SQRADDAC(a[24], a[25]); SQRADDDB; - COMBA_STORE(b[49]); - - /* output 50 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[50]); SQRADDAC(a[1], a[49]); SQRADDAC(a[2], a[48]); SQRADDAC(a[3], a[47]); SQRADDAC(a[4], a[46]); SQRADDAC(a[5], a[45]); SQRADDAC(a[6], a[44]); SQRADDAC(a[7], a[43]); SQRADDAC(a[8], a[42]); SQRADDAC(a[9], a[41]); SQRADDAC(a[10], a[40]); SQRADDAC(a[11], a[39]); SQRADDAC(a[12], a[38]); SQRADDAC(a[13], a[37]); SQRADDAC(a[14], a[36]); SQRADDAC(a[15], a[35]); SQRADDAC(a[16], a[34]); SQRADDAC(a[17], a[33]); SQRADDAC(a[18], a[32]); SQRADDAC(a[19], a[31]); SQRADDAC(a[20], a[30]); SQRADDAC(a[21], a[29]); SQRADDAC(a[22], a[28]); SQRADDAC(a[23], a[27]); SQRADDAC(a[24], a[26]); SQRADDDB; SQRADD(a[25], a[25]); - COMBA_STORE(b[50]); - - /* output 51 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[51]); SQRADDAC(a[1], a[50]); SQRADDAC(a[2], a[49]); SQRADDAC(a[3], a[48]); SQRADDAC(a[4], a[47]); SQRADDAC(a[5], a[46]); SQRADDAC(a[6], a[45]); SQRADDAC(a[7], a[44]); SQRADDAC(a[8], a[43]); SQRADDAC(a[9], a[42]); SQRADDAC(a[10], a[41]); SQRADDAC(a[11], a[40]); SQRADDAC(a[12], a[39]); SQRADDAC(a[13], a[38]); SQRADDAC(a[14], a[37]); SQRADDAC(a[15], a[36]); SQRADDAC(a[16], a[35]); SQRADDAC(a[17], a[34]); SQRADDAC(a[18], a[33]); SQRADDAC(a[19], a[32]); SQRADDAC(a[20], a[31]); SQRADDAC(a[21], a[30]); SQRADDAC(a[22], a[29]); SQRADDAC(a[23], a[28]); SQRADDAC(a[24], a[27]); SQRADDAC(a[25], a[26]); SQRADDDB; - COMBA_STORE(b[51]); - - /* output 52 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[52]); SQRADDAC(a[1], a[51]); SQRADDAC(a[2], a[50]); SQRADDAC(a[3], a[49]); SQRADDAC(a[4], a[48]); SQRADDAC(a[5], a[47]); SQRADDAC(a[6], a[46]); SQRADDAC(a[7], a[45]); SQRADDAC(a[8], a[44]); SQRADDAC(a[9], a[43]); SQRADDAC(a[10], a[42]); SQRADDAC(a[11], a[41]); SQRADDAC(a[12], a[40]); SQRADDAC(a[13], a[39]); SQRADDAC(a[14], a[38]); SQRADDAC(a[15], a[37]); SQRADDAC(a[16], a[36]); SQRADDAC(a[17], a[35]); SQRADDAC(a[18], a[34]); SQRADDAC(a[19], a[33]); SQRADDAC(a[20], a[32]); SQRADDAC(a[21], a[31]); SQRADDAC(a[22], a[30]); SQRADDAC(a[23], a[29]); SQRADDAC(a[24], a[28]); SQRADDAC(a[25], a[27]); SQRADDDB; SQRADD(a[26], a[26]); - COMBA_STORE(b[52]); - - /* output 53 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[53]); SQRADDAC(a[1], a[52]); SQRADDAC(a[2], a[51]); SQRADDAC(a[3], a[50]); SQRADDAC(a[4], a[49]); SQRADDAC(a[5], a[48]); SQRADDAC(a[6], a[47]); SQRADDAC(a[7], a[46]); SQRADDAC(a[8], a[45]); SQRADDAC(a[9], a[44]); SQRADDAC(a[10], a[43]); SQRADDAC(a[11], a[42]); SQRADDAC(a[12], a[41]); SQRADDAC(a[13], a[40]); SQRADDAC(a[14], a[39]); SQRADDAC(a[15], a[38]); SQRADDAC(a[16], a[37]); SQRADDAC(a[17], a[36]); SQRADDAC(a[18], a[35]); SQRADDAC(a[19], a[34]); SQRADDAC(a[20], a[33]); SQRADDAC(a[21], a[32]); SQRADDAC(a[22], a[31]); SQRADDAC(a[23], a[30]); SQRADDAC(a[24], a[29]); SQRADDAC(a[25], a[28]); SQRADDAC(a[26], a[27]); SQRADDDB; - COMBA_STORE(b[53]); - - /* output 54 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[54]); SQRADDAC(a[1], a[53]); SQRADDAC(a[2], a[52]); SQRADDAC(a[3], a[51]); SQRADDAC(a[4], a[50]); SQRADDAC(a[5], a[49]); SQRADDAC(a[6], a[48]); SQRADDAC(a[7], a[47]); SQRADDAC(a[8], a[46]); SQRADDAC(a[9], a[45]); SQRADDAC(a[10], a[44]); SQRADDAC(a[11], a[43]); SQRADDAC(a[12], a[42]); SQRADDAC(a[13], a[41]); SQRADDAC(a[14], a[40]); SQRADDAC(a[15], a[39]); SQRADDAC(a[16], a[38]); SQRADDAC(a[17], a[37]); SQRADDAC(a[18], a[36]); SQRADDAC(a[19], a[35]); SQRADDAC(a[20], a[34]); SQRADDAC(a[21], a[33]); SQRADDAC(a[22], a[32]); SQRADDAC(a[23], a[31]); SQRADDAC(a[24], a[30]); SQRADDAC(a[25], a[29]); SQRADDAC(a[26], a[28]); SQRADDDB; SQRADD(a[27], a[27]); - COMBA_STORE(b[54]); - - /* output 55 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[55]); SQRADDAC(a[1], a[54]); SQRADDAC(a[2], a[53]); SQRADDAC(a[3], a[52]); SQRADDAC(a[4], a[51]); SQRADDAC(a[5], a[50]); SQRADDAC(a[6], a[49]); SQRADDAC(a[7], a[48]); SQRADDAC(a[8], a[47]); SQRADDAC(a[9], a[46]); SQRADDAC(a[10], a[45]); SQRADDAC(a[11], a[44]); SQRADDAC(a[12], a[43]); SQRADDAC(a[13], a[42]); SQRADDAC(a[14], a[41]); SQRADDAC(a[15], a[40]); SQRADDAC(a[16], a[39]); SQRADDAC(a[17], a[38]); SQRADDAC(a[18], a[37]); SQRADDAC(a[19], a[36]); SQRADDAC(a[20], a[35]); SQRADDAC(a[21], a[34]); SQRADDAC(a[22], a[33]); SQRADDAC(a[23], a[32]); SQRADDAC(a[24], a[31]); SQRADDAC(a[25], a[30]); SQRADDAC(a[26], a[29]); SQRADDAC(a[27], a[28]); SQRADDDB; - COMBA_STORE(b[55]); - - /* output 56 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[56]); SQRADDAC(a[1], a[55]); SQRADDAC(a[2], a[54]); SQRADDAC(a[3], a[53]); SQRADDAC(a[4], a[52]); SQRADDAC(a[5], a[51]); SQRADDAC(a[6], a[50]); SQRADDAC(a[7], a[49]); SQRADDAC(a[8], a[48]); SQRADDAC(a[9], a[47]); SQRADDAC(a[10], a[46]); SQRADDAC(a[11], a[45]); SQRADDAC(a[12], a[44]); SQRADDAC(a[13], a[43]); SQRADDAC(a[14], a[42]); SQRADDAC(a[15], a[41]); SQRADDAC(a[16], a[40]); SQRADDAC(a[17], a[39]); SQRADDAC(a[18], a[38]); SQRADDAC(a[19], a[37]); SQRADDAC(a[20], a[36]); SQRADDAC(a[21], a[35]); SQRADDAC(a[22], a[34]); SQRADDAC(a[23], a[33]); SQRADDAC(a[24], a[32]); SQRADDAC(a[25], a[31]); SQRADDAC(a[26], a[30]); SQRADDAC(a[27], a[29]); SQRADDDB; SQRADD(a[28], a[28]); - COMBA_STORE(b[56]); - - /* output 57 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[57]); SQRADDAC(a[1], a[56]); SQRADDAC(a[2], a[55]); SQRADDAC(a[3], a[54]); SQRADDAC(a[4], a[53]); SQRADDAC(a[5], a[52]); SQRADDAC(a[6], a[51]); SQRADDAC(a[7], a[50]); SQRADDAC(a[8], a[49]); SQRADDAC(a[9], a[48]); SQRADDAC(a[10], a[47]); SQRADDAC(a[11], a[46]); SQRADDAC(a[12], a[45]); SQRADDAC(a[13], a[44]); SQRADDAC(a[14], a[43]); SQRADDAC(a[15], a[42]); SQRADDAC(a[16], a[41]); SQRADDAC(a[17], a[40]); SQRADDAC(a[18], a[39]); SQRADDAC(a[19], a[38]); SQRADDAC(a[20], a[37]); SQRADDAC(a[21], a[36]); SQRADDAC(a[22], a[35]); SQRADDAC(a[23], a[34]); SQRADDAC(a[24], a[33]); SQRADDAC(a[25], a[32]); SQRADDAC(a[26], a[31]); SQRADDAC(a[27], a[30]); SQRADDAC(a[28], a[29]); SQRADDDB; - COMBA_STORE(b[57]); - - /* output 58 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[58]); SQRADDAC(a[1], a[57]); SQRADDAC(a[2], a[56]); SQRADDAC(a[3], a[55]); SQRADDAC(a[4], a[54]); SQRADDAC(a[5], a[53]); SQRADDAC(a[6], a[52]); SQRADDAC(a[7], a[51]); SQRADDAC(a[8], a[50]); SQRADDAC(a[9], a[49]); SQRADDAC(a[10], a[48]); SQRADDAC(a[11], a[47]); SQRADDAC(a[12], a[46]); SQRADDAC(a[13], a[45]); SQRADDAC(a[14], a[44]); SQRADDAC(a[15], a[43]); SQRADDAC(a[16], a[42]); SQRADDAC(a[17], a[41]); SQRADDAC(a[18], a[40]); SQRADDAC(a[19], a[39]); SQRADDAC(a[20], a[38]); SQRADDAC(a[21], a[37]); SQRADDAC(a[22], a[36]); SQRADDAC(a[23], a[35]); SQRADDAC(a[24], a[34]); SQRADDAC(a[25], a[33]); SQRADDAC(a[26], a[32]); SQRADDAC(a[27], a[31]); SQRADDAC(a[28], a[30]); SQRADDDB; SQRADD(a[29], a[29]); - COMBA_STORE(b[58]); - - /* output 59 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[59]); SQRADDAC(a[1], a[58]); SQRADDAC(a[2], a[57]); SQRADDAC(a[3], a[56]); SQRADDAC(a[4], a[55]); SQRADDAC(a[5], a[54]); SQRADDAC(a[6], a[53]); SQRADDAC(a[7], a[52]); SQRADDAC(a[8], a[51]); SQRADDAC(a[9], a[50]); SQRADDAC(a[10], a[49]); SQRADDAC(a[11], a[48]); SQRADDAC(a[12], a[47]); SQRADDAC(a[13], a[46]); SQRADDAC(a[14], a[45]); SQRADDAC(a[15], a[44]); SQRADDAC(a[16], a[43]); SQRADDAC(a[17], a[42]); SQRADDAC(a[18], a[41]); SQRADDAC(a[19], a[40]); SQRADDAC(a[20], a[39]); SQRADDAC(a[21], a[38]); SQRADDAC(a[22], a[37]); SQRADDAC(a[23], a[36]); SQRADDAC(a[24], a[35]); SQRADDAC(a[25], a[34]); SQRADDAC(a[26], a[33]); SQRADDAC(a[27], a[32]); SQRADDAC(a[28], a[31]); SQRADDAC(a[29], a[30]); SQRADDDB; - COMBA_STORE(b[59]); - - /* output 60 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[60]); SQRADDAC(a[1], a[59]); SQRADDAC(a[2], a[58]); SQRADDAC(a[3], a[57]); SQRADDAC(a[4], a[56]); SQRADDAC(a[5], a[55]); SQRADDAC(a[6], a[54]); SQRADDAC(a[7], a[53]); SQRADDAC(a[8], a[52]); SQRADDAC(a[9], a[51]); SQRADDAC(a[10], a[50]); SQRADDAC(a[11], a[49]); SQRADDAC(a[12], a[48]); SQRADDAC(a[13], a[47]); SQRADDAC(a[14], a[46]); SQRADDAC(a[15], a[45]); SQRADDAC(a[16], a[44]); SQRADDAC(a[17], a[43]); SQRADDAC(a[18], a[42]); SQRADDAC(a[19], a[41]); SQRADDAC(a[20], a[40]); SQRADDAC(a[21], a[39]); SQRADDAC(a[22], a[38]); SQRADDAC(a[23], a[37]); SQRADDAC(a[24], a[36]); SQRADDAC(a[25], a[35]); SQRADDAC(a[26], a[34]); SQRADDAC(a[27], a[33]); SQRADDAC(a[28], a[32]); SQRADDAC(a[29], a[31]); SQRADDDB; SQRADD(a[30], a[30]); - COMBA_STORE(b[60]); - - /* output 61 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[61]); SQRADDAC(a[1], a[60]); SQRADDAC(a[2], a[59]); SQRADDAC(a[3], a[58]); SQRADDAC(a[4], a[57]); SQRADDAC(a[5], a[56]); SQRADDAC(a[6], a[55]); SQRADDAC(a[7], a[54]); SQRADDAC(a[8], a[53]); SQRADDAC(a[9], a[52]); SQRADDAC(a[10], a[51]); SQRADDAC(a[11], a[50]); SQRADDAC(a[12], a[49]); SQRADDAC(a[13], a[48]); SQRADDAC(a[14], a[47]); SQRADDAC(a[15], a[46]); SQRADDAC(a[16], a[45]); SQRADDAC(a[17], a[44]); SQRADDAC(a[18], a[43]); SQRADDAC(a[19], a[42]); SQRADDAC(a[20], a[41]); SQRADDAC(a[21], a[40]); SQRADDAC(a[22], a[39]); SQRADDAC(a[23], a[38]); SQRADDAC(a[24], a[37]); SQRADDAC(a[25], a[36]); SQRADDAC(a[26], a[35]); SQRADDAC(a[27], a[34]); SQRADDAC(a[28], a[33]); SQRADDAC(a[29], a[32]); SQRADDAC(a[30], a[31]); SQRADDDB; - COMBA_STORE(b[61]); - - /* output 62 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[62]); SQRADDAC(a[1], a[61]); SQRADDAC(a[2], a[60]); SQRADDAC(a[3], a[59]); SQRADDAC(a[4], a[58]); SQRADDAC(a[5], a[57]); SQRADDAC(a[6], a[56]); SQRADDAC(a[7], a[55]); SQRADDAC(a[8], a[54]); SQRADDAC(a[9], a[53]); SQRADDAC(a[10], a[52]); SQRADDAC(a[11], a[51]); SQRADDAC(a[12], a[50]); SQRADDAC(a[13], a[49]); SQRADDAC(a[14], a[48]); SQRADDAC(a[15], a[47]); SQRADDAC(a[16], a[46]); SQRADDAC(a[17], a[45]); SQRADDAC(a[18], a[44]); SQRADDAC(a[19], a[43]); SQRADDAC(a[20], a[42]); SQRADDAC(a[21], a[41]); SQRADDAC(a[22], a[40]); SQRADDAC(a[23], a[39]); SQRADDAC(a[24], a[38]); SQRADDAC(a[25], a[37]); SQRADDAC(a[26], a[36]); SQRADDAC(a[27], a[35]); SQRADDAC(a[28], a[34]); SQRADDAC(a[29], a[33]); SQRADDAC(a[30], a[32]); SQRADDDB; SQRADD(a[31], a[31]); - COMBA_STORE(b[62]); - - /* output 63 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[63]); SQRADDAC(a[1], a[62]); SQRADDAC(a[2], a[61]); SQRADDAC(a[3], a[60]); SQRADDAC(a[4], a[59]); SQRADDAC(a[5], a[58]); SQRADDAC(a[6], a[57]); SQRADDAC(a[7], a[56]); SQRADDAC(a[8], a[55]); SQRADDAC(a[9], a[54]); SQRADDAC(a[10], a[53]); SQRADDAC(a[11], a[52]); SQRADDAC(a[12], a[51]); SQRADDAC(a[13], a[50]); SQRADDAC(a[14], a[49]); SQRADDAC(a[15], a[48]); SQRADDAC(a[16], a[47]); SQRADDAC(a[17], a[46]); SQRADDAC(a[18], a[45]); SQRADDAC(a[19], a[44]); SQRADDAC(a[20], a[43]); SQRADDAC(a[21], a[42]); SQRADDAC(a[22], a[41]); SQRADDAC(a[23], a[40]); SQRADDAC(a[24], a[39]); SQRADDAC(a[25], a[38]); SQRADDAC(a[26], a[37]); SQRADDAC(a[27], a[36]); SQRADDAC(a[28], a[35]); SQRADDAC(a[29], a[34]); SQRADDAC(a[30], a[33]); SQRADDAC(a[31], a[32]); SQRADDDB; - COMBA_STORE(b[63]); - - /* output 64 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[63]); SQRADDAC(a[2], a[62]); SQRADDAC(a[3], a[61]); SQRADDAC(a[4], a[60]); SQRADDAC(a[5], a[59]); SQRADDAC(a[6], a[58]); SQRADDAC(a[7], a[57]); SQRADDAC(a[8], a[56]); SQRADDAC(a[9], a[55]); SQRADDAC(a[10], a[54]); SQRADDAC(a[11], a[53]); SQRADDAC(a[12], a[52]); SQRADDAC(a[13], a[51]); SQRADDAC(a[14], a[50]); SQRADDAC(a[15], a[49]); SQRADDAC(a[16], a[48]); SQRADDAC(a[17], a[47]); SQRADDAC(a[18], a[46]); SQRADDAC(a[19], a[45]); SQRADDAC(a[20], a[44]); SQRADDAC(a[21], a[43]); SQRADDAC(a[22], a[42]); SQRADDAC(a[23], a[41]); SQRADDAC(a[24], a[40]); SQRADDAC(a[25], a[39]); SQRADDAC(a[26], a[38]); SQRADDAC(a[27], a[37]); SQRADDAC(a[28], a[36]); SQRADDAC(a[29], a[35]); SQRADDAC(a[30], a[34]); SQRADDAC(a[31], a[33]); SQRADDDB; SQRADD(a[32], a[32]); - COMBA_STORE(b[64]); - - /* output 65 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[63]); SQRADDAC(a[3], a[62]); SQRADDAC(a[4], a[61]); SQRADDAC(a[5], a[60]); SQRADDAC(a[6], a[59]); SQRADDAC(a[7], a[58]); SQRADDAC(a[8], a[57]); SQRADDAC(a[9], a[56]); SQRADDAC(a[10], a[55]); SQRADDAC(a[11], a[54]); SQRADDAC(a[12], a[53]); SQRADDAC(a[13], a[52]); SQRADDAC(a[14], a[51]); SQRADDAC(a[15], a[50]); SQRADDAC(a[16], a[49]); SQRADDAC(a[17], a[48]); SQRADDAC(a[18], a[47]); SQRADDAC(a[19], a[46]); SQRADDAC(a[20], a[45]); SQRADDAC(a[21], a[44]); SQRADDAC(a[22], a[43]); SQRADDAC(a[23], a[42]); SQRADDAC(a[24], a[41]); SQRADDAC(a[25], a[40]); SQRADDAC(a[26], a[39]); SQRADDAC(a[27], a[38]); SQRADDAC(a[28], a[37]); SQRADDAC(a[29], a[36]); SQRADDAC(a[30], a[35]); SQRADDAC(a[31], a[34]); SQRADDAC(a[32], a[33]); SQRADDDB; - COMBA_STORE(b[65]); - - /* output 66 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[63]); SQRADDAC(a[4], a[62]); SQRADDAC(a[5], a[61]); SQRADDAC(a[6], a[60]); SQRADDAC(a[7], a[59]); SQRADDAC(a[8], a[58]); SQRADDAC(a[9], a[57]); SQRADDAC(a[10], a[56]); SQRADDAC(a[11], a[55]); SQRADDAC(a[12], a[54]); SQRADDAC(a[13], a[53]); SQRADDAC(a[14], a[52]); SQRADDAC(a[15], a[51]); SQRADDAC(a[16], a[50]); SQRADDAC(a[17], a[49]); SQRADDAC(a[18], a[48]); SQRADDAC(a[19], a[47]); SQRADDAC(a[20], a[46]); SQRADDAC(a[21], a[45]); SQRADDAC(a[22], a[44]); SQRADDAC(a[23], a[43]); SQRADDAC(a[24], a[42]); SQRADDAC(a[25], a[41]); SQRADDAC(a[26], a[40]); SQRADDAC(a[27], a[39]); SQRADDAC(a[28], a[38]); SQRADDAC(a[29], a[37]); SQRADDAC(a[30], a[36]); SQRADDAC(a[31], a[35]); SQRADDAC(a[32], a[34]); SQRADDDB; SQRADD(a[33], a[33]); - COMBA_STORE(b[66]); - - /* output 67 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[63]); SQRADDAC(a[5], a[62]); SQRADDAC(a[6], a[61]); SQRADDAC(a[7], a[60]); SQRADDAC(a[8], a[59]); SQRADDAC(a[9], a[58]); SQRADDAC(a[10], a[57]); SQRADDAC(a[11], a[56]); SQRADDAC(a[12], a[55]); SQRADDAC(a[13], a[54]); SQRADDAC(a[14], a[53]); SQRADDAC(a[15], a[52]); SQRADDAC(a[16], a[51]); SQRADDAC(a[17], a[50]); SQRADDAC(a[18], a[49]); SQRADDAC(a[19], a[48]); SQRADDAC(a[20], a[47]); SQRADDAC(a[21], a[46]); SQRADDAC(a[22], a[45]); SQRADDAC(a[23], a[44]); SQRADDAC(a[24], a[43]); SQRADDAC(a[25], a[42]); SQRADDAC(a[26], a[41]); SQRADDAC(a[27], a[40]); SQRADDAC(a[28], a[39]); SQRADDAC(a[29], a[38]); SQRADDAC(a[30], a[37]); SQRADDAC(a[31], a[36]); SQRADDAC(a[32], a[35]); SQRADDAC(a[33], a[34]); SQRADDDB; - COMBA_STORE(b[67]); - - /* output 68 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[63]); SQRADDAC(a[6], a[62]); SQRADDAC(a[7], a[61]); SQRADDAC(a[8], a[60]); SQRADDAC(a[9], a[59]); SQRADDAC(a[10], a[58]); SQRADDAC(a[11], a[57]); SQRADDAC(a[12], a[56]); SQRADDAC(a[13], a[55]); SQRADDAC(a[14], a[54]); SQRADDAC(a[15], a[53]); SQRADDAC(a[16], a[52]); SQRADDAC(a[17], a[51]); SQRADDAC(a[18], a[50]); SQRADDAC(a[19], a[49]); SQRADDAC(a[20], a[48]); SQRADDAC(a[21], a[47]); SQRADDAC(a[22], a[46]); SQRADDAC(a[23], a[45]); SQRADDAC(a[24], a[44]); SQRADDAC(a[25], a[43]); SQRADDAC(a[26], a[42]); SQRADDAC(a[27], a[41]); SQRADDAC(a[28], a[40]); SQRADDAC(a[29], a[39]); SQRADDAC(a[30], a[38]); SQRADDAC(a[31], a[37]); SQRADDAC(a[32], a[36]); SQRADDAC(a[33], a[35]); SQRADDDB; SQRADD(a[34], a[34]); - COMBA_STORE(b[68]); - - /* output 69 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[63]); SQRADDAC(a[7], a[62]); SQRADDAC(a[8], a[61]); SQRADDAC(a[9], a[60]); SQRADDAC(a[10], a[59]); SQRADDAC(a[11], a[58]); SQRADDAC(a[12], a[57]); SQRADDAC(a[13], a[56]); SQRADDAC(a[14], a[55]); SQRADDAC(a[15], a[54]); SQRADDAC(a[16], a[53]); SQRADDAC(a[17], a[52]); SQRADDAC(a[18], a[51]); SQRADDAC(a[19], a[50]); SQRADDAC(a[20], a[49]); SQRADDAC(a[21], a[48]); SQRADDAC(a[22], a[47]); SQRADDAC(a[23], a[46]); SQRADDAC(a[24], a[45]); SQRADDAC(a[25], a[44]); SQRADDAC(a[26], a[43]); SQRADDAC(a[27], a[42]); SQRADDAC(a[28], a[41]); SQRADDAC(a[29], a[40]); SQRADDAC(a[30], a[39]); SQRADDAC(a[31], a[38]); SQRADDAC(a[32], a[37]); SQRADDAC(a[33], a[36]); SQRADDAC(a[34], a[35]); SQRADDDB; - COMBA_STORE(b[69]); - - /* output 70 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[63]); SQRADDAC(a[8], a[62]); SQRADDAC(a[9], a[61]); SQRADDAC(a[10], a[60]); SQRADDAC(a[11], a[59]); SQRADDAC(a[12], a[58]); SQRADDAC(a[13], a[57]); SQRADDAC(a[14], a[56]); SQRADDAC(a[15], a[55]); SQRADDAC(a[16], a[54]); SQRADDAC(a[17], a[53]); SQRADDAC(a[18], a[52]); SQRADDAC(a[19], a[51]); SQRADDAC(a[20], a[50]); SQRADDAC(a[21], a[49]); SQRADDAC(a[22], a[48]); SQRADDAC(a[23], a[47]); SQRADDAC(a[24], a[46]); SQRADDAC(a[25], a[45]); SQRADDAC(a[26], a[44]); SQRADDAC(a[27], a[43]); SQRADDAC(a[28], a[42]); SQRADDAC(a[29], a[41]); SQRADDAC(a[30], a[40]); SQRADDAC(a[31], a[39]); SQRADDAC(a[32], a[38]); SQRADDAC(a[33], a[37]); SQRADDAC(a[34], a[36]); SQRADDDB; SQRADD(a[35], a[35]); - COMBA_STORE(b[70]); - - /* output 71 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[63]); SQRADDAC(a[9], a[62]); SQRADDAC(a[10], a[61]); SQRADDAC(a[11], a[60]); SQRADDAC(a[12], a[59]); SQRADDAC(a[13], a[58]); SQRADDAC(a[14], a[57]); SQRADDAC(a[15], a[56]); SQRADDAC(a[16], a[55]); SQRADDAC(a[17], a[54]); SQRADDAC(a[18], a[53]); SQRADDAC(a[19], a[52]); SQRADDAC(a[20], a[51]); SQRADDAC(a[21], a[50]); SQRADDAC(a[22], a[49]); SQRADDAC(a[23], a[48]); SQRADDAC(a[24], a[47]); SQRADDAC(a[25], a[46]); SQRADDAC(a[26], a[45]); SQRADDAC(a[27], a[44]); SQRADDAC(a[28], a[43]); SQRADDAC(a[29], a[42]); SQRADDAC(a[30], a[41]); SQRADDAC(a[31], a[40]); SQRADDAC(a[32], a[39]); SQRADDAC(a[33], a[38]); SQRADDAC(a[34], a[37]); SQRADDAC(a[35], a[36]); SQRADDDB; - COMBA_STORE(b[71]); - - /* output 72 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[63]); SQRADDAC(a[10], a[62]); SQRADDAC(a[11], a[61]); SQRADDAC(a[12], a[60]); SQRADDAC(a[13], a[59]); SQRADDAC(a[14], a[58]); SQRADDAC(a[15], a[57]); SQRADDAC(a[16], a[56]); SQRADDAC(a[17], a[55]); SQRADDAC(a[18], a[54]); SQRADDAC(a[19], a[53]); SQRADDAC(a[20], a[52]); SQRADDAC(a[21], a[51]); SQRADDAC(a[22], a[50]); SQRADDAC(a[23], a[49]); SQRADDAC(a[24], a[48]); SQRADDAC(a[25], a[47]); SQRADDAC(a[26], a[46]); SQRADDAC(a[27], a[45]); SQRADDAC(a[28], a[44]); SQRADDAC(a[29], a[43]); SQRADDAC(a[30], a[42]); SQRADDAC(a[31], a[41]); SQRADDAC(a[32], a[40]); SQRADDAC(a[33], a[39]); SQRADDAC(a[34], a[38]); SQRADDAC(a[35], a[37]); SQRADDDB; SQRADD(a[36], a[36]); - COMBA_STORE(b[72]); - - /* output 73 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[63]); SQRADDAC(a[11], a[62]); SQRADDAC(a[12], a[61]); SQRADDAC(a[13], a[60]); SQRADDAC(a[14], a[59]); SQRADDAC(a[15], a[58]); SQRADDAC(a[16], a[57]); SQRADDAC(a[17], a[56]); SQRADDAC(a[18], a[55]); SQRADDAC(a[19], a[54]); SQRADDAC(a[20], a[53]); SQRADDAC(a[21], a[52]); SQRADDAC(a[22], a[51]); SQRADDAC(a[23], a[50]); SQRADDAC(a[24], a[49]); SQRADDAC(a[25], a[48]); SQRADDAC(a[26], a[47]); SQRADDAC(a[27], a[46]); SQRADDAC(a[28], a[45]); SQRADDAC(a[29], a[44]); SQRADDAC(a[30], a[43]); SQRADDAC(a[31], a[42]); SQRADDAC(a[32], a[41]); SQRADDAC(a[33], a[40]); SQRADDAC(a[34], a[39]); SQRADDAC(a[35], a[38]); SQRADDAC(a[36], a[37]); SQRADDDB; - COMBA_STORE(b[73]); - - /* output 74 */ - CARRY_FORWARD; - SQRADDSC(a[11], a[63]); SQRADDAC(a[12], a[62]); SQRADDAC(a[13], a[61]); SQRADDAC(a[14], a[60]); SQRADDAC(a[15], a[59]); SQRADDAC(a[16], a[58]); SQRADDAC(a[17], a[57]); SQRADDAC(a[18], a[56]); SQRADDAC(a[19], a[55]); SQRADDAC(a[20], a[54]); SQRADDAC(a[21], a[53]); SQRADDAC(a[22], a[52]); SQRADDAC(a[23], a[51]); SQRADDAC(a[24], a[50]); SQRADDAC(a[25], a[49]); SQRADDAC(a[26], a[48]); SQRADDAC(a[27], a[47]); SQRADDAC(a[28], a[46]); SQRADDAC(a[29], a[45]); SQRADDAC(a[30], a[44]); SQRADDAC(a[31], a[43]); SQRADDAC(a[32], a[42]); SQRADDAC(a[33], a[41]); SQRADDAC(a[34], a[40]); SQRADDAC(a[35], a[39]); SQRADDAC(a[36], a[38]); SQRADDDB; SQRADD(a[37], a[37]); - COMBA_STORE(b[74]); - - /* output 75 */ - CARRY_FORWARD; - SQRADDSC(a[12], a[63]); SQRADDAC(a[13], a[62]); SQRADDAC(a[14], a[61]); SQRADDAC(a[15], a[60]); SQRADDAC(a[16], a[59]); SQRADDAC(a[17], a[58]); SQRADDAC(a[18], a[57]); SQRADDAC(a[19], a[56]); SQRADDAC(a[20], a[55]); SQRADDAC(a[21], a[54]); SQRADDAC(a[22], a[53]); SQRADDAC(a[23], a[52]); SQRADDAC(a[24], a[51]); SQRADDAC(a[25], a[50]); SQRADDAC(a[26], a[49]); SQRADDAC(a[27], a[48]); SQRADDAC(a[28], a[47]); SQRADDAC(a[29], a[46]); SQRADDAC(a[30], a[45]); SQRADDAC(a[31], a[44]); SQRADDAC(a[32], a[43]); SQRADDAC(a[33], a[42]); SQRADDAC(a[34], a[41]); SQRADDAC(a[35], a[40]); SQRADDAC(a[36], a[39]); SQRADDAC(a[37], a[38]); SQRADDDB; - COMBA_STORE(b[75]); - - /* output 76 */ - CARRY_FORWARD; - SQRADDSC(a[13], a[63]); SQRADDAC(a[14], a[62]); SQRADDAC(a[15], a[61]); SQRADDAC(a[16], a[60]); SQRADDAC(a[17], a[59]); SQRADDAC(a[18], a[58]); SQRADDAC(a[19], a[57]); SQRADDAC(a[20], a[56]); SQRADDAC(a[21], a[55]); SQRADDAC(a[22], a[54]); SQRADDAC(a[23], a[53]); SQRADDAC(a[24], a[52]); SQRADDAC(a[25], a[51]); SQRADDAC(a[26], a[50]); SQRADDAC(a[27], a[49]); SQRADDAC(a[28], a[48]); SQRADDAC(a[29], a[47]); SQRADDAC(a[30], a[46]); SQRADDAC(a[31], a[45]); SQRADDAC(a[32], a[44]); SQRADDAC(a[33], a[43]); SQRADDAC(a[34], a[42]); SQRADDAC(a[35], a[41]); SQRADDAC(a[36], a[40]); SQRADDAC(a[37], a[39]); SQRADDDB; SQRADD(a[38], a[38]); - COMBA_STORE(b[76]); - - /* output 77 */ - CARRY_FORWARD; - SQRADDSC(a[14], a[63]); SQRADDAC(a[15], a[62]); SQRADDAC(a[16], a[61]); SQRADDAC(a[17], a[60]); SQRADDAC(a[18], a[59]); SQRADDAC(a[19], a[58]); SQRADDAC(a[20], a[57]); SQRADDAC(a[21], a[56]); SQRADDAC(a[22], a[55]); SQRADDAC(a[23], a[54]); SQRADDAC(a[24], a[53]); SQRADDAC(a[25], a[52]); SQRADDAC(a[26], a[51]); SQRADDAC(a[27], a[50]); SQRADDAC(a[28], a[49]); SQRADDAC(a[29], a[48]); SQRADDAC(a[30], a[47]); SQRADDAC(a[31], a[46]); SQRADDAC(a[32], a[45]); SQRADDAC(a[33], a[44]); SQRADDAC(a[34], a[43]); SQRADDAC(a[35], a[42]); SQRADDAC(a[36], a[41]); SQRADDAC(a[37], a[40]); SQRADDAC(a[38], a[39]); SQRADDDB; - COMBA_STORE(b[77]); - - /* output 78 */ - CARRY_FORWARD; - SQRADDSC(a[15], a[63]); SQRADDAC(a[16], a[62]); SQRADDAC(a[17], a[61]); SQRADDAC(a[18], a[60]); SQRADDAC(a[19], a[59]); SQRADDAC(a[20], a[58]); SQRADDAC(a[21], a[57]); SQRADDAC(a[22], a[56]); SQRADDAC(a[23], a[55]); SQRADDAC(a[24], a[54]); SQRADDAC(a[25], a[53]); SQRADDAC(a[26], a[52]); SQRADDAC(a[27], a[51]); SQRADDAC(a[28], a[50]); SQRADDAC(a[29], a[49]); SQRADDAC(a[30], a[48]); SQRADDAC(a[31], a[47]); SQRADDAC(a[32], a[46]); SQRADDAC(a[33], a[45]); SQRADDAC(a[34], a[44]); SQRADDAC(a[35], a[43]); SQRADDAC(a[36], a[42]); SQRADDAC(a[37], a[41]); SQRADDAC(a[38], a[40]); SQRADDDB; SQRADD(a[39], a[39]); - COMBA_STORE(b[78]); - - /* output 79 */ - CARRY_FORWARD; - SQRADDSC(a[16], a[63]); SQRADDAC(a[17], a[62]); SQRADDAC(a[18], a[61]); SQRADDAC(a[19], a[60]); SQRADDAC(a[20], a[59]); SQRADDAC(a[21], a[58]); SQRADDAC(a[22], a[57]); SQRADDAC(a[23], a[56]); SQRADDAC(a[24], a[55]); SQRADDAC(a[25], a[54]); SQRADDAC(a[26], a[53]); SQRADDAC(a[27], a[52]); SQRADDAC(a[28], a[51]); SQRADDAC(a[29], a[50]); SQRADDAC(a[30], a[49]); SQRADDAC(a[31], a[48]); SQRADDAC(a[32], a[47]); SQRADDAC(a[33], a[46]); SQRADDAC(a[34], a[45]); SQRADDAC(a[35], a[44]); SQRADDAC(a[36], a[43]); SQRADDAC(a[37], a[42]); SQRADDAC(a[38], a[41]); SQRADDAC(a[39], a[40]); SQRADDDB; - COMBA_STORE(b[79]); - - /* output 80 */ - CARRY_FORWARD; - SQRADDSC(a[17], a[63]); SQRADDAC(a[18], a[62]); SQRADDAC(a[19], a[61]); SQRADDAC(a[20], a[60]); SQRADDAC(a[21], a[59]); SQRADDAC(a[22], a[58]); SQRADDAC(a[23], a[57]); SQRADDAC(a[24], a[56]); SQRADDAC(a[25], a[55]); SQRADDAC(a[26], a[54]); SQRADDAC(a[27], a[53]); SQRADDAC(a[28], a[52]); SQRADDAC(a[29], a[51]); SQRADDAC(a[30], a[50]); SQRADDAC(a[31], a[49]); SQRADDAC(a[32], a[48]); SQRADDAC(a[33], a[47]); SQRADDAC(a[34], a[46]); SQRADDAC(a[35], a[45]); SQRADDAC(a[36], a[44]); SQRADDAC(a[37], a[43]); SQRADDAC(a[38], a[42]); SQRADDAC(a[39], a[41]); SQRADDDB; SQRADD(a[40], a[40]); - COMBA_STORE(b[80]); - - /* output 81 */ - CARRY_FORWARD; - SQRADDSC(a[18], a[63]); SQRADDAC(a[19], a[62]); SQRADDAC(a[20], a[61]); SQRADDAC(a[21], a[60]); SQRADDAC(a[22], a[59]); SQRADDAC(a[23], a[58]); SQRADDAC(a[24], a[57]); SQRADDAC(a[25], a[56]); SQRADDAC(a[26], a[55]); SQRADDAC(a[27], a[54]); SQRADDAC(a[28], a[53]); SQRADDAC(a[29], a[52]); SQRADDAC(a[30], a[51]); SQRADDAC(a[31], a[50]); SQRADDAC(a[32], a[49]); SQRADDAC(a[33], a[48]); SQRADDAC(a[34], a[47]); SQRADDAC(a[35], a[46]); SQRADDAC(a[36], a[45]); SQRADDAC(a[37], a[44]); SQRADDAC(a[38], a[43]); SQRADDAC(a[39], a[42]); SQRADDAC(a[40], a[41]); SQRADDDB; - COMBA_STORE(b[81]); - - /* output 82 */ - CARRY_FORWARD; - SQRADDSC(a[19], a[63]); SQRADDAC(a[20], a[62]); SQRADDAC(a[21], a[61]); SQRADDAC(a[22], a[60]); SQRADDAC(a[23], a[59]); SQRADDAC(a[24], a[58]); SQRADDAC(a[25], a[57]); SQRADDAC(a[26], a[56]); SQRADDAC(a[27], a[55]); SQRADDAC(a[28], a[54]); SQRADDAC(a[29], a[53]); SQRADDAC(a[30], a[52]); SQRADDAC(a[31], a[51]); SQRADDAC(a[32], a[50]); SQRADDAC(a[33], a[49]); SQRADDAC(a[34], a[48]); SQRADDAC(a[35], a[47]); SQRADDAC(a[36], a[46]); SQRADDAC(a[37], a[45]); SQRADDAC(a[38], a[44]); SQRADDAC(a[39], a[43]); SQRADDAC(a[40], a[42]); SQRADDDB; SQRADD(a[41], a[41]); - COMBA_STORE(b[82]); - - /* output 83 */ - CARRY_FORWARD; - SQRADDSC(a[20], a[63]); SQRADDAC(a[21], a[62]); SQRADDAC(a[22], a[61]); SQRADDAC(a[23], a[60]); SQRADDAC(a[24], a[59]); SQRADDAC(a[25], a[58]); SQRADDAC(a[26], a[57]); SQRADDAC(a[27], a[56]); SQRADDAC(a[28], a[55]); SQRADDAC(a[29], a[54]); SQRADDAC(a[30], a[53]); SQRADDAC(a[31], a[52]); SQRADDAC(a[32], a[51]); SQRADDAC(a[33], a[50]); SQRADDAC(a[34], a[49]); SQRADDAC(a[35], a[48]); SQRADDAC(a[36], a[47]); SQRADDAC(a[37], a[46]); SQRADDAC(a[38], a[45]); SQRADDAC(a[39], a[44]); SQRADDAC(a[40], a[43]); SQRADDAC(a[41], a[42]); SQRADDDB; - COMBA_STORE(b[83]); - - /* output 84 */ - CARRY_FORWARD; - SQRADDSC(a[21], a[63]); SQRADDAC(a[22], a[62]); SQRADDAC(a[23], a[61]); SQRADDAC(a[24], a[60]); SQRADDAC(a[25], a[59]); SQRADDAC(a[26], a[58]); SQRADDAC(a[27], a[57]); SQRADDAC(a[28], a[56]); SQRADDAC(a[29], a[55]); SQRADDAC(a[30], a[54]); SQRADDAC(a[31], a[53]); SQRADDAC(a[32], a[52]); SQRADDAC(a[33], a[51]); SQRADDAC(a[34], a[50]); SQRADDAC(a[35], a[49]); SQRADDAC(a[36], a[48]); SQRADDAC(a[37], a[47]); SQRADDAC(a[38], a[46]); SQRADDAC(a[39], a[45]); SQRADDAC(a[40], a[44]); SQRADDAC(a[41], a[43]); SQRADDDB; SQRADD(a[42], a[42]); - COMBA_STORE(b[84]); - - /* output 85 */ - CARRY_FORWARD; - SQRADDSC(a[22], a[63]); SQRADDAC(a[23], a[62]); SQRADDAC(a[24], a[61]); SQRADDAC(a[25], a[60]); SQRADDAC(a[26], a[59]); SQRADDAC(a[27], a[58]); SQRADDAC(a[28], a[57]); SQRADDAC(a[29], a[56]); SQRADDAC(a[30], a[55]); SQRADDAC(a[31], a[54]); SQRADDAC(a[32], a[53]); SQRADDAC(a[33], a[52]); SQRADDAC(a[34], a[51]); SQRADDAC(a[35], a[50]); SQRADDAC(a[36], a[49]); SQRADDAC(a[37], a[48]); SQRADDAC(a[38], a[47]); SQRADDAC(a[39], a[46]); SQRADDAC(a[40], a[45]); SQRADDAC(a[41], a[44]); SQRADDAC(a[42], a[43]); SQRADDDB; - COMBA_STORE(b[85]); - - /* output 86 */ - CARRY_FORWARD; - SQRADDSC(a[23], a[63]); SQRADDAC(a[24], a[62]); SQRADDAC(a[25], a[61]); SQRADDAC(a[26], a[60]); SQRADDAC(a[27], a[59]); SQRADDAC(a[28], a[58]); SQRADDAC(a[29], a[57]); SQRADDAC(a[30], a[56]); SQRADDAC(a[31], a[55]); SQRADDAC(a[32], a[54]); SQRADDAC(a[33], a[53]); SQRADDAC(a[34], a[52]); SQRADDAC(a[35], a[51]); SQRADDAC(a[36], a[50]); SQRADDAC(a[37], a[49]); SQRADDAC(a[38], a[48]); SQRADDAC(a[39], a[47]); SQRADDAC(a[40], a[46]); SQRADDAC(a[41], a[45]); SQRADDAC(a[42], a[44]); SQRADDDB; SQRADD(a[43], a[43]); - COMBA_STORE(b[86]); - - /* output 87 */ - CARRY_FORWARD; - SQRADDSC(a[24], a[63]); SQRADDAC(a[25], a[62]); SQRADDAC(a[26], a[61]); SQRADDAC(a[27], a[60]); SQRADDAC(a[28], a[59]); SQRADDAC(a[29], a[58]); SQRADDAC(a[30], a[57]); SQRADDAC(a[31], a[56]); SQRADDAC(a[32], a[55]); SQRADDAC(a[33], a[54]); SQRADDAC(a[34], a[53]); SQRADDAC(a[35], a[52]); SQRADDAC(a[36], a[51]); SQRADDAC(a[37], a[50]); SQRADDAC(a[38], a[49]); SQRADDAC(a[39], a[48]); SQRADDAC(a[40], a[47]); SQRADDAC(a[41], a[46]); SQRADDAC(a[42], a[45]); SQRADDAC(a[43], a[44]); SQRADDDB; - COMBA_STORE(b[87]); - - /* output 88 */ - CARRY_FORWARD; - SQRADDSC(a[25], a[63]); SQRADDAC(a[26], a[62]); SQRADDAC(a[27], a[61]); SQRADDAC(a[28], a[60]); SQRADDAC(a[29], a[59]); SQRADDAC(a[30], a[58]); SQRADDAC(a[31], a[57]); SQRADDAC(a[32], a[56]); SQRADDAC(a[33], a[55]); SQRADDAC(a[34], a[54]); SQRADDAC(a[35], a[53]); SQRADDAC(a[36], a[52]); SQRADDAC(a[37], a[51]); SQRADDAC(a[38], a[50]); SQRADDAC(a[39], a[49]); SQRADDAC(a[40], a[48]); SQRADDAC(a[41], a[47]); SQRADDAC(a[42], a[46]); SQRADDAC(a[43], a[45]); SQRADDDB; SQRADD(a[44], a[44]); - COMBA_STORE(b[88]); - - /* output 89 */ - CARRY_FORWARD; - SQRADDSC(a[26], a[63]); SQRADDAC(a[27], a[62]); SQRADDAC(a[28], a[61]); SQRADDAC(a[29], a[60]); SQRADDAC(a[30], a[59]); SQRADDAC(a[31], a[58]); SQRADDAC(a[32], a[57]); SQRADDAC(a[33], a[56]); SQRADDAC(a[34], a[55]); SQRADDAC(a[35], a[54]); SQRADDAC(a[36], a[53]); SQRADDAC(a[37], a[52]); SQRADDAC(a[38], a[51]); SQRADDAC(a[39], a[50]); SQRADDAC(a[40], a[49]); SQRADDAC(a[41], a[48]); SQRADDAC(a[42], a[47]); SQRADDAC(a[43], a[46]); SQRADDAC(a[44], a[45]); SQRADDDB; - COMBA_STORE(b[89]); - - /* output 90 */ - CARRY_FORWARD; - SQRADDSC(a[27], a[63]); SQRADDAC(a[28], a[62]); SQRADDAC(a[29], a[61]); SQRADDAC(a[30], a[60]); SQRADDAC(a[31], a[59]); SQRADDAC(a[32], a[58]); SQRADDAC(a[33], a[57]); SQRADDAC(a[34], a[56]); SQRADDAC(a[35], a[55]); SQRADDAC(a[36], a[54]); SQRADDAC(a[37], a[53]); SQRADDAC(a[38], a[52]); SQRADDAC(a[39], a[51]); SQRADDAC(a[40], a[50]); SQRADDAC(a[41], a[49]); SQRADDAC(a[42], a[48]); SQRADDAC(a[43], a[47]); SQRADDAC(a[44], a[46]); SQRADDDB; SQRADD(a[45], a[45]); - COMBA_STORE(b[90]); - - /* output 91 */ - CARRY_FORWARD; - SQRADDSC(a[28], a[63]); SQRADDAC(a[29], a[62]); SQRADDAC(a[30], a[61]); SQRADDAC(a[31], a[60]); SQRADDAC(a[32], a[59]); SQRADDAC(a[33], a[58]); SQRADDAC(a[34], a[57]); SQRADDAC(a[35], a[56]); SQRADDAC(a[36], a[55]); SQRADDAC(a[37], a[54]); SQRADDAC(a[38], a[53]); SQRADDAC(a[39], a[52]); SQRADDAC(a[40], a[51]); SQRADDAC(a[41], a[50]); SQRADDAC(a[42], a[49]); SQRADDAC(a[43], a[48]); SQRADDAC(a[44], a[47]); SQRADDAC(a[45], a[46]); SQRADDDB; - COMBA_STORE(b[91]); - - /* output 92 */ - CARRY_FORWARD; - SQRADDSC(a[29], a[63]); SQRADDAC(a[30], a[62]); SQRADDAC(a[31], a[61]); SQRADDAC(a[32], a[60]); SQRADDAC(a[33], a[59]); SQRADDAC(a[34], a[58]); SQRADDAC(a[35], a[57]); SQRADDAC(a[36], a[56]); SQRADDAC(a[37], a[55]); SQRADDAC(a[38], a[54]); SQRADDAC(a[39], a[53]); SQRADDAC(a[40], a[52]); SQRADDAC(a[41], a[51]); SQRADDAC(a[42], a[50]); SQRADDAC(a[43], a[49]); SQRADDAC(a[44], a[48]); SQRADDAC(a[45], a[47]); SQRADDDB; SQRADD(a[46], a[46]); - COMBA_STORE(b[92]); - - /* output 93 */ - CARRY_FORWARD; - SQRADDSC(a[30], a[63]); SQRADDAC(a[31], a[62]); SQRADDAC(a[32], a[61]); SQRADDAC(a[33], a[60]); SQRADDAC(a[34], a[59]); SQRADDAC(a[35], a[58]); SQRADDAC(a[36], a[57]); SQRADDAC(a[37], a[56]); SQRADDAC(a[38], a[55]); SQRADDAC(a[39], a[54]); SQRADDAC(a[40], a[53]); SQRADDAC(a[41], a[52]); SQRADDAC(a[42], a[51]); SQRADDAC(a[43], a[50]); SQRADDAC(a[44], a[49]); SQRADDAC(a[45], a[48]); SQRADDAC(a[46], a[47]); SQRADDDB; - COMBA_STORE(b[93]); - - /* output 94 */ - CARRY_FORWARD; - SQRADDSC(a[31], a[63]); SQRADDAC(a[32], a[62]); SQRADDAC(a[33], a[61]); SQRADDAC(a[34], a[60]); SQRADDAC(a[35], a[59]); SQRADDAC(a[36], a[58]); SQRADDAC(a[37], a[57]); SQRADDAC(a[38], a[56]); SQRADDAC(a[39], a[55]); SQRADDAC(a[40], a[54]); SQRADDAC(a[41], a[53]); SQRADDAC(a[42], a[52]); SQRADDAC(a[43], a[51]); SQRADDAC(a[44], a[50]); SQRADDAC(a[45], a[49]); SQRADDAC(a[46], a[48]); SQRADDDB; SQRADD(a[47], a[47]); - COMBA_STORE(b[94]); - - /* output 95 */ - CARRY_FORWARD; - SQRADDSC(a[32], a[63]); SQRADDAC(a[33], a[62]); SQRADDAC(a[34], a[61]); SQRADDAC(a[35], a[60]); SQRADDAC(a[36], a[59]); SQRADDAC(a[37], a[58]); SQRADDAC(a[38], a[57]); SQRADDAC(a[39], a[56]); SQRADDAC(a[40], a[55]); SQRADDAC(a[41], a[54]); SQRADDAC(a[42], a[53]); SQRADDAC(a[43], a[52]); SQRADDAC(a[44], a[51]); SQRADDAC(a[45], a[50]); SQRADDAC(a[46], a[49]); SQRADDAC(a[47], a[48]); SQRADDDB; - COMBA_STORE(b[95]); - - /* output 96 */ - CARRY_FORWARD; - SQRADDSC(a[33], a[63]); SQRADDAC(a[34], a[62]); SQRADDAC(a[35], a[61]); SQRADDAC(a[36], a[60]); SQRADDAC(a[37], a[59]); SQRADDAC(a[38], a[58]); SQRADDAC(a[39], a[57]); SQRADDAC(a[40], a[56]); SQRADDAC(a[41], a[55]); SQRADDAC(a[42], a[54]); SQRADDAC(a[43], a[53]); SQRADDAC(a[44], a[52]); SQRADDAC(a[45], a[51]); SQRADDAC(a[46], a[50]); SQRADDAC(a[47], a[49]); SQRADDDB; SQRADD(a[48], a[48]); - COMBA_STORE(b[96]); - - /* output 97 */ - CARRY_FORWARD; - SQRADDSC(a[34], a[63]); SQRADDAC(a[35], a[62]); SQRADDAC(a[36], a[61]); SQRADDAC(a[37], a[60]); SQRADDAC(a[38], a[59]); SQRADDAC(a[39], a[58]); SQRADDAC(a[40], a[57]); SQRADDAC(a[41], a[56]); SQRADDAC(a[42], a[55]); SQRADDAC(a[43], a[54]); SQRADDAC(a[44], a[53]); SQRADDAC(a[45], a[52]); SQRADDAC(a[46], a[51]); SQRADDAC(a[47], a[50]); SQRADDAC(a[48], a[49]); SQRADDDB; - COMBA_STORE(b[97]); - - /* output 98 */ - CARRY_FORWARD; - SQRADDSC(a[35], a[63]); SQRADDAC(a[36], a[62]); SQRADDAC(a[37], a[61]); SQRADDAC(a[38], a[60]); SQRADDAC(a[39], a[59]); SQRADDAC(a[40], a[58]); SQRADDAC(a[41], a[57]); SQRADDAC(a[42], a[56]); SQRADDAC(a[43], a[55]); SQRADDAC(a[44], a[54]); SQRADDAC(a[45], a[53]); SQRADDAC(a[46], a[52]); SQRADDAC(a[47], a[51]); SQRADDAC(a[48], a[50]); SQRADDDB; SQRADD(a[49], a[49]); - COMBA_STORE(b[98]); - - /* output 99 */ - CARRY_FORWARD; - SQRADDSC(a[36], a[63]); SQRADDAC(a[37], a[62]); SQRADDAC(a[38], a[61]); SQRADDAC(a[39], a[60]); SQRADDAC(a[40], a[59]); SQRADDAC(a[41], a[58]); SQRADDAC(a[42], a[57]); SQRADDAC(a[43], a[56]); SQRADDAC(a[44], a[55]); SQRADDAC(a[45], a[54]); SQRADDAC(a[46], a[53]); SQRADDAC(a[47], a[52]); SQRADDAC(a[48], a[51]); SQRADDAC(a[49], a[50]); SQRADDDB; - COMBA_STORE(b[99]); - - /* output 100 */ - CARRY_FORWARD; - SQRADDSC(a[37], a[63]); SQRADDAC(a[38], a[62]); SQRADDAC(a[39], a[61]); SQRADDAC(a[40], a[60]); SQRADDAC(a[41], a[59]); SQRADDAC(a[42], a[58]); SQRADDAC(a[43], a[57]); SQRADDAC(a[44], a[56]); SQRADDAC(a[45], a[55]); SQRADDAC(a[46], a[54]); SQRADDAC(a[47], a[53]); SQRADDAC(a[48], a[52]); SQRADDAC(a[49], a[51]); SQRADDDB; SQRADD(a[50], a[50]); - COMBA_STORE(b[100]); - - /* output 101 */ - CARRY_FORWARD; - SQRADDSC(a[38], a[63]); SQRADDAC(a[39], a[62]); SQRADDAC(a[40], a[61]); SQRADDAC(a[41], a[60]); SQRADDAC(a[42], a[59]); SQRADDAC(a[43], a[58]); SQRADDAC(a[44], a[57]); SQRADDAC(a[45], a[56]); SQRADDAC(a[46], a[55]); SQRADDAC(a[47], a[54]); SQRADDAC(a[48], a[53]); SQRADDAC(a[49], a[52]); SQRADDAC(a[50], a[51]); SQRADDDB; - COMBA_STORE(b[101]); - - /* output 102 */ - CARRY_FORWARD; - SQRADDSC(a[39], a[63]); SQRADDAC(a[40], a[62]); SQRADDAC(a[41], a[61]); SQRADDAC(a[42], a[60]); SQRADDAC(a[43], a[59]); SQRADDAC(a[44], a[58]); SQRADDAC(a[45], a[57]); SQRADDAC(a[46], a[56]); SQRADDAC(a[47], a[55]); SQRADDAC(a[48], a[54]); SQRADDAC(a[49], a[53]); SQRADDAC(a[50], a[52]); SQRADDDB; SQRADD(a[51], a[51]); - COMBA_STORE(b[102]); - - /* output 103 */ - CARRY_FORWARD; - SQRADDSC(a[40], a[63]); SQRADDAC(a[41], a[62]); SQRADDAC(a[42], a[61]); SQRADDAC(a[43], a[60]); SQRADDAC(a[44], a[59]); SQRADDAC(a[45], a[58]); SQRADDAC(a[46], a[57]); SQRADDAC(a[47], a[56]); SQRADDAC(a[48], a[55]); SQRADDAC(a[49], a[54]); SQRADDAC(a[50], a[53]); SQRADDAC(a[51], a[52]); SQRADDDB; - COMBA_STORE(b[103]); - - /* output 104 */ - CARRY_FORWARD; - SQRADDSC(a[41], a[63]); SQRADDAC(a[42], a[62]); SQRADDAC(a[43], a[61]); SQRADDAC(a[44], a[60]); SQRADDAC(a[45], a[59]); SQRADDAC(a[46], a[58]); SQRADDAC(a[47], a[57]); SQRADDAC(a[48], a[56]); SQRADDAC(a[49], a[55]); SQRADDAC(a[50], a[54]); SQRADDAC(a[51], a[53]); SQRADDDB; SQRADD(a[52], a[52]); - COMBA_STORE(b[104]); - - /* output 105 */ - CARRY_FORWARD; - SQRADDSC(a[42], a[63]); SQRADDAC(a[43], a[62]); SQRADDAC(a[44], a[61]); SQRADDAC(a[45], a[60]); SQRADDAC(a[46], a[59]); SQRADDAC(a[47], a[58]); SQRADDAC(a[48], a[57]); SQRADDAC(a[49], a[56]); SQRADDAC(a[50], a[55]); SQRADDAC(a[51], a[54]); SQRADDAC(a[52], a[53]); SQRADDDB; - COMBA_STORE(b[105]); - - /* output 106 */ - CARRY_FORWARD; - SQRADDSC(a[43], a[63]); SQRADDAC(a[44], a[62]); SQRADDAC(a[45], a[61]); SQRADDAC(a[46], a[60]); SQRADDAC(a[47], a[59]); SQRADDAC(a[48], a[58]); SQRADDAC(a[49], a[57]); SQRADDAC(a[50], a[56]); SQRADDAC(a[51], a[55]); SQRADDAC(a[52], a[54]); SQRADDDB; SQRADD(a[53], a[53]); - COMBA_STORE(b[106]); - - /* output 107 */ - CARRY_FORWARD; - SQRADDSC(a[44], a[63]); SQRADDAC(a[45], a[62]); SQRADDAC(a[46], a[61]); SQRADDAC(a[47], a[60]); SQRADDAC(a[48], a[59]); SQRADDAC(a[49], a[58]); SQRADDAC(a[50], a[57]); SQRADDAC(a[51], a[56]); SQRADDAC(a[52], a[55]); SQRADDAC(a[53], a[54]); SQRADDDB; - COMBA_STORE(b[107]); - - /* output 108 */ - CARRY_FORWARD; - SQRADDSC(a[45], a[63]); SQRADDAC(a[46], a[62]); SQRADDAC(a[47], a[61]); SQRADDAC(a[48], a[60]); SQRADDAC(a[49], a[59]); SQRADDAC(a[50], a[58]); SQRADDAC(a[51], a[57]); SQRADDAC(a[52], a[56]); SQRADDAC(a[53], a[55]); SQRADDDB; SQRADD(a[54], a[54]); - COMBA_STORE(b[108]); - - /* output 109 */ - CARRY_FORWARD; - SQRADDSC(a[46], a[63]); SQRADDAC(a[47], a[62]); SQRADDAC(a[48], a[61]); SQRADDAC(a[49], a[60]); SQRADDAC(a[50], a[59]); SQRADDAC(a[51], a[58]); SQRADDAC(a[52], a[57]); SQRADDAC(a[53], a[56]); SQRADDAC(a[54], a[55]); SQRADDDB; - COMBA_STORE(b[109]); - - /* output 110 */ - CARRY_FORWARD; - SQRADDSC(a[47], a[63]); SQRADDAC(a[48], a[62]); SQRADDAC(a[49], a[61]); SQRADDAC(a[50], a[60]); SQRADDAC(a[51], a[59]); SQRADDAC(a[52], a[58]); SQRADDAC(a[53], a[57]); SQRADDAC(a[54], a[56]); SQRADDDB; SQRADD(a[55], a[55]); - COMBA_STORE(b[110]); - - /* output 111 */ - CARRY_FORWARD; - SQRADDSC(a[48], a[63]); SQRADDAC(a[49], a[62]); SQRADDAC(a[50], a[61]); SQRADDAC(a[51], a[60]); SQRADDAC(a[52], a[59]); SQRADDAC(a[53], a[58]); SQRADDAC(a[54], a[57]); SQRADDAC(a[55], a[56]); SQRADDDB; - COMBA_STORE(b[111]); - - /* output 112 */ - CARRY_FORWARD; - SQRADDSC(a[49], a[63]); SQRADDAC(a[50], a[62]); SQRADDAC(a[51], a[61]); SQRADDAC(a[52], a[60]); SQRADDAC(a[53], a[59]); SQRADDAC(a[54], a[58]); SQRADDAC(a[55], a[57]); SQRADDDB; SQRADD(a[56], a[56]); - COMBA_STORE(b[112]); - - /* output 113 */ - CARRY_FORWARD; - SQRADDSC(a[50], a[63]); SQRADDAC(a[51], a[62]); SQRADDAC(a[52], a[61]); SQRADDAC(a[53], a[60]); SQRADDAC(a[54], a[59]); SQRADDAC(a[55], a[58]); SQRADDAC(a[56], a[57]); SQRADDDB; - COMBA_STORE(b[113]); - - /* output 114 */ - CARRY_FORWARD; - SQRADDSC(a[51], a[63]); SQRADDAC(a[52], a[62]); SQRADDAC(a[53], a[61]); SQRADDAC(a[54], a[60]); SQRADDAC(a[55], a[59]); SQRADDAC(a[56], a[58]); SQRADDDB; SQRADD(a[57], a[57]); - COMBA_STORE(b[114]); - - /* output 115 */ - CARRY_FORWARD; - SQRADDSC(a[52], a[63]); SQRADDAC(a[53], a[62]); SQRADDAC(a[54], a[61]); SQRADDAC(a[55], a[60]); SQRADDAC(a[56], a[59]); SQRADDAC(a[57], a[58]); SQRADDDB; - COMBA_STORE(b[115]); - - /* output 116 */ - CARRY_FORWARD; - SQRADDSC(a[53], a[63]); SQRADDAC(a[54], a[62]); SQRADDAC(a[55], a[61]); SQRADDAC(a[56], a[60]); SQRADDAC(a[57], a[59]); SQRADDDB; SQRADD(a[58], a[58]); - COMBA_STORE(b[116]); - - /* output 117 */ - CARRY_FORWARD; - SQRADDSC(a[54], a[63]); SQRADDAC(a[55], a[62]); SQRADDAC(a[56], a[61]); SQRADDAC(a[57], a[60]); SQRADDAC(a[58], a[59]); SQRADDDB; - COMBA_STORE(b[117]); - - /* output 118 */ - CARRY_FORWARD; - SQRADDSC(a[55], a[63]); SQRADDAC(a[56], a[62]); SQRADDAC(a[57], a[61]); SQRADDAC(a[58], a[60]); SQRADDDB; SQRADD(a[59], a[59]); - COMBA_STORE(b[118]); - - /* output 119 */ - CARRY_FORWARD; - SQRADDSC(a[56], a[63]); SQRADDAC(a[57], a[62]); SQRADDAC(a[58], a[61]); SQRADDAC(a[59], a[60]); SQRADDDB; - COMBA_STORE(b[119]); - - /* output 120 */ - CARRY_FORWARD; - SQRADDSC(a[57], a[63]); SQRADDAC(a[58], a[62]); SQRADDAC(a[59], a[61]); SQRADDDB; SQRADD(a[60], a[60]); - COMBA_STORE(b[120]); - - /* output 121 */ - CARRY_FORWARD; - SQRADDSC(a[58], a[63]); SQRADDAC(a[59], a[62]); SQRADDAC(a[60], a[61]); SQRADDDB; - COMBA_STORE(b[121]); - - /* output 122 */ - CARRY_FORWARD; - SQRADD2(a[59], a[63]); SQRADD2(a[60], a[62]); SQRADD(a[61], a[61]); - COMBA_STORE(b[122]); - - /* output 123 */ - CARRY_FORWARD; - SQRADD2(a[60], a[63]); SQRADD2(a[61], a[62]); - COMBA_STORE(b[123]); - - /* output 124 */ - CARRY_FORWARD; - SQRADD2(a[61], a[63]); SQRADD(a[62], a[62]); - COMBA_STORE(b[124]); - - /* output 125 */ - CARRY_FORWARD; - SQRADD2(a[62], a[63]); - COMBA_STORE(b[125]); - - /* output 126 */ - CARRY_FORWARD; - SQRADD(a[63], a[63]); - COMBA_STORE(b[126]); - COMBA_STORE2(b[127]); - COMBA_FINI; - - B->used = 128; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 128 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i deleted file mode 100644 index 12b4f19a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_7.i +++ /dev/null @@ -1,110 +0,0 @@ -/* fp_sqr_comba_7.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR7 -void fp_sqr_comba7(fp_int *A, fp_int *B) -{ - fp_digit *a, b[14], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADD2(a[2], a[6]); SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADD2(a[3], a[6]); SQRADD2(a[4], a[5]); - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADD2(a[5], a[6]); - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - COMBA_STORE2(b[13]); - COMBA_FINI; - - B->used = 14; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 14 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i deleted file mode 100644 index 52a0cebd..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_8.i +++ /dev/null @@ -1,120 +0,0 @@ -/* fp_sqr_comba_8.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR8 -void fp_sqr_comba8(fp_int *A, fp_int *B) -{ - fp_digit *a, b[16], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD2(a[3], a[7]); SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADD2(a[4], a[7]); SQRADD2(a[5], a[6]); - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADD2(a[6], a[7]); - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - COMBA_STORE2(b[15]); - COMBA_FINI; - - B->used = 16; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 16 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i deleted file mode 100644 index bbf7149e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_9.i +++ /dev/null @@ -1,130 +0,0 @@ -/* fp_sqr_comba_9.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef TFM_SQR9 -void fp_sqr_comba9(fp_int *A, fp_int *B) -{ - fp_digit *a, b[18], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD2(a[4], a[8]); SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADD2(a[5], a[8]); SQRADD2(a[6], a[7]); - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADD2(a[7], a[8]); - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - COMBA_STORE2(b[17]); - COMBA_FINI; - - B->used = 18; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 18 * sizeof(fp_digit)); - fp_clamp(B); -} -#endif - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i b/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i deleted file mode 100644 index 43f15b5e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/fp_sqr_comba_small_set.i +++ /dev/null @@ -1,1540 +0,0 @@ -/* fp_sqr_comba_small_set.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#if defined(TFM_SMALL_SET) -void fp_sqr_comba_small(fp_int *A, fp_int *B) -{ - fp_digit *a, b[32], c0, c1, c2, sc0, sc1, sc2; -#ifdef TFM_ISO - fp_word tt; -#endif - switch (A->used) { - case 1: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - COMBA_STORE2(b[1]); - COMBA_FINI; - - B->used = 2; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 2 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 2: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - COMBA_STORE2(b[3]); - COMBA_FINI; - - B->used = 4; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 4 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 3: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - COMBA_STORE2(b[5]); - COMBA_FINI; - - B->used = 6; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 6 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 4: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADD2(a[2], a[3]); - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - COMBA_STORE2(b[7]); - COMBA_FINI; - - B->used = 8; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 8 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 5: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADD2(a[1], a[4]); SQRADD2(a[2], a[3]); - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADD2(a[3], a[4]); - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - COMBA_STORE2(b[9]); - COMBA_FINI; - - B->used = 10; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 10 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 6: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADD2(a[1], a[5]); SQRADD2(a[2], a[4]); SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADD2(a[2], a[5]); SQRADD2(a[3], a[4]); - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADD2(a[4], a[5]); - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - COMBA_STORE2(b[11]); - COMBA_FINI; - - B->used = 12; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 12 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 7: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADD2(a[2], a[6]); SQRADD2(a[3], a[5]); SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADD2(a[3], a[6]); SQRADD2(a[4], a[5]); - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADD2(a[5], a[6]); - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - COMBA_STORE2(b[13]); - COMBA_FINI; - - B->used = 14; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 14 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 8: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADD2(a[3], a[7]); SQRADD2(a[4], a[6]); SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADD2(a[4], a[7]); SQRADD2(a[5], a[6]); - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADD2(a[6], a[7]); - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - COMBA_STORE2(b[15]); - COMBA_FINI; - - B->used = 16; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 16 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 9: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADD2(a[4], a[8]); SQRADD2(a[5], a[7]); SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADD2(a[5], a[8]); SQRADD2(a[6], a[7]); - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADD2(a[7], a[8]); - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - COMBA_STORE2(b[17]); - COMBA_FINI; - - B->used = 18; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 18 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 10: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADD2(a[5], a[9]); SQRADD2(a[6], a[8]); SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADD2(a[6], a[9]); SQRADD2(a[7], a[8]); - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADD2(a[7], a[9]); SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADD2(a[8], a[9]); - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - COMBA_STORE2(b[19]); - COMBA_FINI; - - B->used = 20; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 20 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 11: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADD2(a[6], a[10]); SQRADD2(a[7], a[9]); SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADD2(a[7], a[10]); SQRADD2(a[8], a[9]); - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADD2(a[9], a[10]); - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - COMBA_STORE2(b[21]); - COMBA_FINI; - - B->used = 22; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 22 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 12: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADD2(a[7], a[11]); SQRADD2(a[8], a[10]); SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADD2(a[8], a[11]); SQRADD2(a[9], a[10]); - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADD2(a[10], a[11]); - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - COMBA_STORE2(b[23]); - COMBA_FINI; - - B->used = 24; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 24 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 13: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADD2(a[8], a[12]); SQRADD2(a[9], a[11]); SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADD2(a[9], a[12]); SQRADD2(a[10], a[11]); - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADD2(a[10], a[12]); SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADD2(a[11], a[12]); - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - COMBA_STORE2(b[25]); - COMBA_FINI; - - B->used = 26; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 26 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 14: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADD2(a[9], a[13]); SQRADD2(a[10], a[12]); SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADD2(a[10], a[13]); SQRADD2(a[11], a[12]); - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADD2(a[11], a[13]); SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADD2(a[12], a[13]); - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - COMBA_STORE2(b[27]); - COMBA_FINI; - - B->used = 28; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 28 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 15: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADD2(a[10], a[14]); SQRADD2(a[11], a[13]); SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADD2(a[11], a[14]); SQRADD2(a[12], a[13]); - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADD2(a[12], a[14]); SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADD2(a[13], a[14]); - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - COMBA_STORE2(b[29]); - COMBA_FINI; - - B->used = 30; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 30 * sizeof(fp_digit)); - fp_clamp(B); - break; - - case 16: - a = A->dp; - COMBA_START; - - /* clear carries */ - CLEAR_CARRY; - - /* output 0 */ - SQRADD(a[0],a[0]); - COMBA_STORE(b[0]); - - /* output 1 */ - CARRY_FORWARD; - SQRADD2(a[0], a[1]); - COMBA_STORE(b[1]); - - /* output 2 */ - CARRY_FORWARD; - SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); - COMBA_STORE(b[2]); - - /* output 3 */ - CARRY_FORWARD; - SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); - COMBA_STORE(b[3]); - - /* output 4 */ - CARRY_FORWARD; - SQRADD2(a[0], a[4]); SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); - COMBA_STORE(b[4]); - - /* output 5 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[5]); SQRADDAC(a[1], a[4]); SQRADDAC(a[2], a[3]); SQRADDDB; - COMBA_STORE(b[5]); - - /* output 6 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[6]); SQRADDAC(a[1], a[5]); SQRADDAC(a[2], a[4]); SQRADDDB; SQRADD(a[3], a[3]); - COMBA_STORE(b[6]); - - /* output 7 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[7]); SQRADDAC(a[1], a[6]); SQRADDAC(a[2], a[5]); SQRADDAC(a[3], a[4]); SQRADDDB; - COMBA_STORE(b[7]); - - /* output 8 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[8]); SQRADDAC(a[1], a[7]); SQRADDAC(a[2], a[6]); SQRADDAC(a[3], a[5]); SQRADDDB; SQRADD(a[4], a[4]); - COMBA_STORE(b[8]); - - /* output 9 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[9]); SQRADDAC(a[1], a[8]); SQRADDAC(a[2], a[7]); SQRADDAC(a[3], a[6]); SQRADDAC(a[4], a[5]); SQRADDDB; - COMBA_STORE(b[9]); - - /* output 10 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[10]); SQRADDAC(a[1], a[9]); SQRADDAC(a[2], a[8]); SQRADDAC(a[3], a[7]); SQRADDAC(a[4], a[6]); SQRADDDB; SQRADD(a[5], a[5]); - COMBA_STORE(b[10]); - - /* output 11 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[11]); SQRADDAC(a[1], a[10]); SQRADDAC(a[2], a[9]); SQRADDAC(a[3], a[8]); SQRADDAC(a[4], a[7]); SQRADDAC(a[5], a[6]); SQRADDDB; - COMBA_STORE(b[11]); - - /* output 12 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[12]); SQRADDAC(a[1], a[11]); SQRADDAC(a[2], a[10]); SQRADDAC(a[3], a[9]); SQRADDAC(a[4], a[8]); SQRADDAC(a[5], a[7]); SQRADDDB; SQRADD(a[6], a[6]); - COMBA_STORE(b[12]); - - /* output 13 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[13]); SQRADDAC(a[1], a[12]); SQRADDAC(a[2], a[11]); SQRADDAC(a[3], a[10]); SQRADDAC(a[4], a[9]); SQRADDAC(a[5], a[8]); SQRADDAC(a[6], a[7]); SQRADDDB; - COMBA_STORE(b[13]); - - /* output 14 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[14]); SQRADDAC(a[1], a[13]); SQRADDAC(a[2], a[12]); SQRADDAC(a[3], a[11]); SQRADDAC(a[4], a[10]); SQRADDAC(a[5], a[9]); SQRADDAC(a[6], a[8]); SQRADDDB; SQRADD(a[7], a[7]); - COMBA_STORE(b[14]); - - /* output 15 */ - CARRY_FORWARD; - SQRADDSC(a[0], a[15]); SQRADDAC(a[1], a[14]); SQRADDAC(a[2], a[13]); SQRADDAC(a[3], a[12]); SQRADDAC(a[4], a[11]); SQRADDAC(a[5], a[10]); SQRADDAC(a[6], a[9]); SQRADDAC(a[7], a[8]); SQRADDDB; - COMBA_STORE(b[15]); - - /* output 16 */ - CARRY_FORWARD; - SQRADDSC(a[1], a[15]); SQRADDAC(a[2], a[14]); SQRADDAC(a[3], a[13]); SQRADDAC(a[4], a[12]); SQRADDAC(a[5], a[11]); SQRADDAC(a[6], a[10]); SQRADDAC(a[7], a[9]); SQRADDDB; SQRADD(a[8], a[8]); - COMBA_STORE(b[16]); - - /* output 17 */ - CARRY_FORWARD; - SQRADDSC(a[2], a[15]); SQRADDAC(a[3], a[14]); SQRADDAC(a[4], a[13]); SQRADDAC(a[5], a[12]); SQRADDAC(a[6], a[11]); SQRADDAC(a[7], a[10]); SQRADDAC(a[8], a[9]); SQRADDDB; - COMBA_STORE(b[17]); - - /* output 18 */ - CARRY_FORWARD; - SQRADDSC(a[3], a[15]); SQRADDAC(a[4], a[14]); SQRADDAC(a[5], a[13]); SQRADDAC(a[6], a[12]); SQRADDAC(a[7], a[11]); SQRADDAC(a[8], a[10]); SQRADDDB; SQRADD(a[9], a[9]); - COMBA_STORE(b[18]); - - /* output 19 */ - CARRY_FORWARD; - SQRADDSC(a[4], a[15]); SQRADDAC(a[5], a[14]); SQRADDAC(a[6], a[13]); SQRADDAC(a[7], a[12]); SQRADDAC(a[8], a[11]); SQRADDAC(a[9], a[10]); SQRADDDB; - COMBA_STORE(b[19]); - - /* output 20 */ - CARRY_FORWARD; - SQRADDSC(a[5], a[15]); SQRADDAC(a[6], a[14]); SQRADDAC(a[7], a[13]); SQRADDAC(a[8], a[12]); SQRADDAC(a[9], a[11]); SQRADDDB; SQRADD(a[10], a[10]); - COMBA_STORE(b[20]); - - /* output 21 */ - CARRY_FORWARD; - SQRADDSC(a[6], a[15]); SQRADDAC(a[7], a[14]); SQRADDAC(a[8], a[13]); SQRADDAC(a[9], a[12]); SQRADDAC(a[10], a[11]); SQRADDDB; - COMBA_STORE(b[21]); - - /* output 22 */ - CARRY_FORWARD; - SQRADDSC(a[7], a[15]); SQRADDAC(a[8], a[14]); SQRADDAC(a[9], a[13]); SQRADDAC(a[10], a[12]); SQRADDDB; SQRADD(a[11], a[11]); - COMBA_STORE(b[22]); - - /* output 23 */ - CARRY_FORWARD; - SQRADDSC(a[8], a[15]); SQRADDAC(a[9], a[14]); SQRADDAC(a[10], a[13]); SQRADDAC(a[11], a[12]); SQRADDDB; - COMBA_STORE(b[23]); - - /* output 24 */ - CARRY_FORWARD; - SQRADDSC(a[9], a[15]); SQRADDAC(a[10], a[14]); SQRADDAC(a[11], a[13]); SQRADDDB; SQRADD(a[12], a[12]); - COMBA_STORE(b[24]); - - /* output 25 */ - CARRY_FORWARD; - SQRADDSC(a[10], a[15]); SQRADDAC(a[11], a[14]); SQRADDAC(a[12], a[13]); SQRADDDB; - COMBA_STORE(b[25]); - - /* output 26 */ - CARRY_FORWARD; - SQRADD2(a[11], a[15]); SQRADD2(a[12], a[14]); SQRADD(a[13], a[13]); - COMBA_STORE(b[26]); - - /* output 27 */ - CARRY_FORWARD; - SQRADD2(a[12], a[15]); SQRADD2(a[13], a[14]); - COMBA_STORE(b[27]); - - /* output 28 */ - CARRY_FORWARD; - SQRADD2(a[13], a[15]); SQRADD(a[14], a[14]); - COMBA_STORE(b[28]); - - /* output 29 */ - CARRY_FORWARD; - SQRADD2(a[14], a[15]); - COMBA_STORE(b[29]); - - /* output 30 */ - CARRY_FORWARD; - SQRADD(a[15], a[15]); - COMBA_STORE(b[30]); - COMBA_STORE2(b[31]); - COMBA_FINI; - - B->used = 32; - B->sign = FP_ZPOS; - memcpy(B->dp, b, 32 * sizeof(fp_digit)); - fp_clamp(B); - break; - - default: - break; -} -} - -#endif /* TFM_SMALL_SET */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c b/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c deleted file mode 100644 index 4937d6eb..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/hc128.c +++ /dev/null @@ -1,399 +0,0 @@ -/* hc128.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_HC128 - -#include -#include -#include -#ifdef NO_INLINE - #include - #include -#else - #include -#endif - - -#ifdef BIG_ENDIAN_ORDER - #define LITTLE32(x) ByteReverseWord32(x) -#else - #define LITTLE32(x) (x) -#endif - - -/*h1 function*/ -#define h1(ctx, x, y) { \ - byte a,c; \ - a = (byte) (x); \ - c = (byte) ((x) >> 16); \ - y = (ctx->T[512+a])+(ctx->T[512+256+c]); \ -} - -/*h2 function*/ -#define h2(ctx, x, y) { \ - byte a,c; \ - a = (byte) (x); \ - c = (byte) ((x) >> 16); \ - y = (ctx->T[a])+(ctx->T[256+c]); \ -} - -/*one step of HC-128, update P and generate 32 bits keystream*/ -#define step_P(ctx,u,v,a,b,c,d,n){ \ - word32 tem0,tem1,tem2,tem3; \ - h1((ctx),(ctx->X[(d)]),tem3); \ - tem0 = rotrFixed((ctx->T[(v)]),23); \ - tem1 = rotrFixed((ctx->X[(c)]),10); \ - tem2 = rotrFixed((ctx->X[(b)]),8); \ - (ctx->T[(u)]) += tem2+(tem0 ^ tem1); \ - (ctx->X[(a)]) = (ctx->T[(u)]); \ - (n) = tem3 ^ (ctx->T[(u)]) ; \ -} - -/*one step of HC-128, update Q and generate 32 bits keystream*/ -#define step_Q(ctx,u,v,a,b,c,d,n){ \ - word32 tem0,tem1,tem2,tem3; \ - h2((ctx),(ctx->Y[(d)]),tem3); \ - tem0 = rotrFixed((ctx->T[(v)]),(32-23)); \ - tem1 = rotrFixed((ctx->Y[(c)]),(32-10)); \ - tem2 = rotrFixed((ctx->Y[(b)]),(32-8)); \ - (ctx->T[(u)]) += tem2 + (tem0 ^ tem1); \ - (ctx->Y[(a)]) = (ctx->T[(u)]); \ - (n) = tem3 ^ (ctx->T[(u)]) ; \ -} - -/*16 steps of HC-128, generate 512 bits keystream*/ -static void generate_keystream(HC128* ctx, word32* keystream) -{ - word32 cc,dd; - cc = ctx->counter1024 & 0x1ff; - dd = (cc+16)&0x1ff; - - if (ctx->counter1024 < 512) - { - ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; - step_P(ctx, cc+0, cc+1, 0, 6, 13,4, keystream[0]); - step_P(ctx, cc+1, cc+2, 1, 7, 14,5, keystream[1]); - step_P(ctx, cc+2, cc+3, 2, 8, 15,6, keystream[2]); - step_P(ctx, cc+3, cc+4, 3, 9, 0, 7, keystream[3]); - step_P(ctx, cc+4, cc+5, 4, 10,1, 8, keystream[4]); - step_P(ctx, cc+5, cc+6, 5, 11,2, 9, keystream[5]); - step_P(ctx, cc+6, cc+7, 6, 12,3, 10,keystream[6]); - step_P(ctx, cc+7, cc+8, 7, 13,4, 11,keystream[7]); - step_P(ctx, cc+8, cc+9, 8, 14,5, 12,keystream[8]); - step_P(ctx, cc+9, cc+10,9, 15,6, 13,keystream[9]); - step_P(ctx, cc+10,cc+11,10,0, 7, 14,keystream[10]); - step_P(ctx, cc+11,cc+12,11,1, 8, 15,keystream[11]); - step_P(ctx, cc+12,cc+13,12,2, 9, 0, keystream[12]); - step_P(ctx, cc+13,cc+14,13,3, 10,1, keystream[13]); - step_P(ctx, cc+14,cc+15,14,4, 11,2, keystream[14]); - step_P(ctx, cc+15,dd+0, 15,5, 12,3, keystream[15]); - } - else - { - ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; - step_Q(ctx, 512+cc+0, 512+cc+1, 0, 6, 13,4, keystream[0]); - step_Q(ctx, 512+cc+1, 512+cc+2, 1, 7, 14,5, keystream[1]); - step_Q(ctx, 512+cc+2, 512+cc+3, 2, 8, 15,6, keystream[2]); - step_Q(ctx, 512+cc+3, 512+cc+4, 3, 9, 0, 7, keystream[3]); - step_Q(ctx, 512+cc+4, 512+cc+5, 4, 10,1, 8, keystream[4]); - step_Q(ctx, 512+cc+5, 512+cc+6, 5, 11,2, 9, keystream[5]); - step_Q(ctx, 512+cc+6, 512+cc+7, 6, 12,3, 10,keystream[6]); - step_Q(ctx, 512+cc+7, 512+cc+8, 7, 13,4, 11,keystream[7]); - step_Q(ctx, 512+cc+8, 512+cc+9, 8, 14,5, 12,keystream[8]); - step_Q(ctx, 512+cc+9, 512+cc+10,9, 15,6, 13,keystream[9]); - step_Q(ctx, 512+cc+10,512+cc+11,10,0, 7, 14,keystream[10]); - step_Q(ctx, 512+cc+11,512+cc+12,11,1, 8, 15,keystream[11]); - step_Q(ctx, 512+cc+12,512+cc+13,12,2, 9, 0, keystream[12]); - step_Q(ctx, 512+cc+13,512+cc+14,13,3, 10,1, keystream[13]); - step_Q(ctx, 512+cc+14,512+cc+15,14,4, 11,2, keystream[14]); - step_Q(ctx, 512+cc+15,512+dd+0, 15,5, 12,3, keystream[15]); - } -} - - -/* The following defines the initialization functions */ -#define f1(x) (rotrFixed((x),7) ^ rotrFixed((x),18) ^ ((x) >> 3)) -#define f2(x) (rotrFixed((x),17) ^ rotrFixed((x),19) ^ ((x) >> 10)) - -/*update table P*/ -#define update_P(ctx,u,v,a,b,c,d){ \ - word32 tem0,tem1,tem2,tem3; \ - tem0 = rotrFixed((ctx->T[(v)]),23); \ - tem1 = rotrFixed((ctx->X[(c)]),10); \ - tem2 = rotrFixed((ctx->X[(b)]),8); \ - h1((ctx),(ctx->X[(d)]),tem3); \ - (ctx->T[(u)]) = ((ctx->T[(u)]) + tem2+(tem0^tem1)) ^ tem3; \ - (ctx->X[(a)]) = (ctx->T[(u)]); \ -} - -/*update table Q*/ -#define update_Q(ctx,u,v,a,b,c,d){ \ - word32 tem0,tem1,tem2,tem3; \ - tem0 = rotrFixed((ctx->T[(v)]),(32-23)); \ - tem1 = rotrFixed((ctx->Y[(c)]),(32-10)); \ - tem2 = rotrFixed((ctx->Y[(b)]),(32-8)); \ - h2((ctx),(ctx->Y[(d)]),tem3); \ - (ctx->T[(u)]) = ((ctx->T[(u)]) + tem2+(tem0^tem1)) ^ tem3; \ - (ctx->Y[(a)]) = (ctx->T[(u)]); \ -} - -/*16 steps of HC-128, without generating keystream, */ -/*but use the outputs to update P and Q*/ -static void setup_update(HC128* ctx) /*each time 16 steps*/ -{ - word32 cc,dd; - cc = ctx->counter1024 & 0x1ff; - dd = (cc+16)&0x1ff; - - if (ctx->counter1024 < 512) - { - ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; - update_P(ctx, cc+0, cc+1, 0, 6, 13, 4); - update_P(ctx, cc+1, cc+2, 1, 7, 14, 5); - update_P(ctx, cc+2, cc+3, 2, 8, 15, 6); - update_P(ctx, cc+3, cc+4, 3, 9, 0, 7); - update_P(ctx, cc+4, cc+5, 4, 10,1, 8); - update_P(ctx, cc+5, cc+6, 5, 11,2, 9); - update_P(ctx, cc+6, cc+7, 6, 12,3, 10); - update_P(ctx, cc+7, cc+8, 7, 13,4, 11); - update_P(ctx, cc+8, cc+9, 8, 14,5, 12); - update_P(ctx, cc+9, cc+10,9, 15,6, 13); - update_P(ctx, cc+10,cc+11,10,0, 7, 14); - update_P(ctx, cc+11,cc+12,11,1, 8, 15); - update_P(ctx, cc+12,cc+13,12,2, 9, 0); - update_P(ctx, cc+13,cc+14,13,3, 10, 1); - update_P(ctx, cc+14,cc+15,14,4, 11, 2); - update_P(ctx, cc+15,dd+0, 15,5, 12, 3); - } - else - { - ctx->counter1024 = (ctx->counter1024 + 16) & 0x3ff; - update_Q(ctx, 512+cc+0, 512+cc+1, 0, 6, 13, 4); - update_Q(ctx, 512+cc+1, 512+cc+2, 1, 7, 14, 5); - update_Q(ctx, 512+cc+2, 512+cc+3, 2, 8, 15, 6); - update_Q(ctx, 512+cc+3, 512+cc+4, 3, 9, 0, 7); - update_Q(ctx, 512+cc+4, 512+cc+5, 4, 10,1, 8); - update_Q(ctx, 512+cc+5, 512+cc+6, 5, 11,2, 9); - update_Q(ctx, 512+cc+6, 512+cc+7, 6, 12,3, 10); - update_Q(ctx, 512+cc+7, 512+cc+8, 7, 13,4, 11); - update_Q(ctx, 512+cc+8, 512+cc+9, 8, 14,5, 12); - update_Q(ctx, 512+cc+9, 512+cc+10,9, 15,6, 13); - update_Q(ctx, 512+cc+10,512+cc+11,10,0, 7, 14); - update_Q(ctx, 512+cc+11,512+cc+12,11,1, 8, 15); - update_Q(ctx, 512+cc+12,512+cc+13,12,2, 9, 0); - update_Q(ctx, 512+cc+13,512+cc+14,13,3, 10, 1); - update_Q(ctx, 512+cc+14,512+cc+15,14,4, 11, 2); - update_Q(ctx, 512+cc+15,512+dd+0, 15,5, 12, 3); - } -} - - -/* for the 128-bit key: key[0]...key[15] -* key[0] is the least significant byte of ctx->key[0] (K_0); -* key[3] is the most significant byte of ctx->key[0] (K_0); -* ... -* key[12] is the least significant byte of ctx->key[3] (K_3) -* key[15] is the most significant byte of ctx->key[3] (K_3) -* -* for the 128-bit iv: iv[0]...iv[15] -* iv[0] is the least significant byte of ctx->iv[0] (IV_0); -* iv[3] is the most significant byte of ctx->iv[0] (IV_0); -* ... -* iv[12] is the least significant byte of ctx->iv[3] (IV_3) -* iv[15] is the most significant byte of ctx->iv[3] (IV_3) -*/ - - - -static void Hc128_SetIV(HC128* ctx, const byte* inIv) -{ - word32 i; - word32 iv[4]; - - if (inIv) - XMEMCPY(iv, inIv, sizeof(iv)); - else - XMEMSET(iv, 0, sizeof(iv)); - - for (i = 0; i < (128 >> 5); i++) - ctx->iv[i] = LITTLE32(iv[i]); - - for (; i < 8; i++) ctx->iv[i] = ctx->iv[i-4]; - - /* expand the key and IV into the table T */ - /* (expand the key and IV into the table P and Q) */ - - for (i = 0; i < 8; i++) ctx->T[i] = ctx->key[i]; - for (i = 8; i < 16; i++) ctx->T[i] = ctx->iv[i-8]; - - for (i = 16; i < (256+16); i++) - ctx->T[i] = f2(ctx->T[i-2]) + ctx->T[i-7] + f1(ctx->T[i-15]) + - ctx->T[i-16]+i; - - for (i = 0; i < 16; i++) ctx->T[i] = ctx->T[256+i]; - - for (i = 16; i < 1024; i++) - ctx->T[i] = f2(ctx->T[i-2]) + ctx->T[i-7] + f1(ctx->T[i-15]) + - ctx->T[i-16]+256+i; - - /* initialize counter1024, X and Y */ - ctx->counter1024 = 0; - for (i = 0; i < 16; i++) ctx->X[i] = ctx->T[512-16+i]; - for (i = 0; i < 16; i++) ctx->Y[i] = ctx->T[512+512-16+i]; - - /* run the cipher 1024 steps before generating the output */ - for (i = 0; i < 64; i++) setup_update(ctx); -} - - -static INLINE int DoKey(HC128* ctx, const byte* key, const byte* iv) -{ - word32 i; - - /* Key size in bits 128 */ - for (i = 0; i < (128 >> 5); i++) - ctx->key[i] = LITTLE32(((word32*)key)[i]); - - for ( ; i < 8 ; i++) ctx->key[i] = ctx->key[i-4]; - - Hc128_SetIV(ctx, iv); - - return 0; -} - - -/* Key setup */ -int Hc128_SetKey(HC128* ctx, const byte* key, const byte* iv) -{ -#ifdef XSTREAM_ALIGN - if ((word)key % 4) { - int alignKey[4]; - - /* iv gets aligned in SetIV */ - CYASSL_MSG("Hc128SetKey unaligned key"); - - XMEMCPY(alignKey, key, sizeof(alignKey)); - - return DoKey(ctx, (const byte*)alignKey, iv); - } -#endif /* XSTREAM_ALIGN */ - - return DoKey(ctx, key, iv); -} - - - -/* The following defines the encryption of data stream */ -static INLINE int DoProcess(HC128* ctx, byte* output, const byte* input, - word32 msglen) -{ - word32 i, keystream[16]; - - for ( ; msglen >= 64; msglen -= 64, input += 64, output += 64) - { - generate_keystream(ctx, keystream); - - /* unroll loop */ - ((word32*)output)[0] = ((word32*)input)[0] ^ LITTLE32(keystream[0]); - ((word32*)output)[1] = ((word32*)input)[1] ^ LITTLE32(keystream[1]); - ((word32*)output)[2] = ((word32*)input)[2] ^ LITTLE32(keystream[2]); - ((word32*)output)[3] = ((word32*)input)[3] ^ LITTLE32(keystream[3]); - ((word32*)output)[4] = ((word32*)input)[4] ^ LITTLE32(keystream[4]); - ((word32*)output)[5] = ((word32*)input)[5] ^ LITTLE32(keystream[5]); - ((word32*)output)[6] = ((word32*)input)[6] ^ LITTLE32(keystream[6]); - ((word32*)output)[7] = ((word32*)input)[7] ^ LITTLE32(keystream[7]); - ((word32*)output)[8] = ((word32*)input)[8] ^ LITTLE32(keystream[8]); - ((word32*)output)[9] = ((word32*)input)[9] ^ LITTLE32(keystream[9]); - ((word32*)output)[10] = ((word32*)input)[10] ^ LITTLE32(keystream[10]); - ((word32*)output)[11] = ((word32*)input)[11] ^ LITTLE32(keystream[11]); - ((word32*)output)[12] = ((word32*)input)[12] ^ LITTLE32(keystream[12]); - ((word32*)output)[13] = ((word32*)input)[13] ^ LITTLE32(keystream[13]); - ((word32*)output)[14] = ((word32*)input)[14] ^ LITTLE32(keystream[14]); - ((word32*)output)[15] = ((word32*)input)[15] ^ LITTLE32(keystream[15]); - } - - if (msglen > 0) - { - XMEMSET(keystream, 0, sizeof(keystream)); /* hush the static analysis */ - generate_keystream(ctx, keystream); - -#ifdef BIG_ENDIAN_ORDER - { - word32 wordsLeft = msglen / sizeof(word32); - if (msglen % sizeof(word32)) wordsLeft++; - - ByteReverseWords(keystream, keystream, wordsLeft * sizeof(word32)); - } -#endif - - for (i = 0; i < msglen; i++) - output[i] = input[i] ^ ((byte*)keystream)[i]; - } - - return 0; -} - - -/* Encrypt/decrypt a message of any size */ -int Hc128_Process(HC128* ctx, byte* output, const byte* input, word32 msglen) -{ -#ifdef XSTREAM_ALIGN - if ((word)input % 4 || (word)output % 4) { - #ifndef NO_CYASSL_ALLOC_ALIGN - byte* tmp; - CYASSL_MSG("Hc128Process unaligned"); - - tmp = (byte*)XMALLOC(msglen, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (tmp == NULL) return MEMORY_E; - - XMEMCPY(tmp, input, msglen); - DoProcess(ctx, tmp, tmp, msglen); - XMEMCPY(output, tmp, msglen); - - XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - return 0; - #else - return BAD_ALIGN_E; - #endif - } -#endif /* XSTREAM_ALIGN */ - - return DoProcess(ctx, output, input, msglen); -} - - -#else /* HAVE_HC128 */ - - -#ifdef _MSC_VER - /* 4206 warning for blank file */ - #pragma warning(disable: 4206) -#endif - - -#endif /* HAVE_HC128 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c b/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c deleted file mode 100644 index 0bd1c41d..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/hmac.c +++ /dev/null @@ -1,820 +0,0 @@ -/* hmac.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_HMAC - -#ifdef CYASSL_PIC32MZ_HASH - -#define InitMd5 InitMd5_sw -#define Md5Update Md5Update_sw -#define Md5Final Md5Final_sw - -#define InitSha InitSha_sw -#define ShaUpdate ShaUpdate_sw -#define ShaFinal ShaFinal_sw - -#define InitSha256 InitSha256_sw -#define Sha256Update Sha256Update_sw -#define Sha256Final Sha256Final_sw - -#endif - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include - - -#ifdef HAVE_CAVIUM - static void HmacCaviumFinal(Hmac* hmac, byte* hash); - static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length); - static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key, - word32 length); -#endif - -static int InitHmac(Hmac* hmac, int type) -{ - int ret = 0; - - hmac->innerHashKeyed = 0; - hmac->macType = (byte)type; - - if (!(type == MD5 || type == SHA || type == SHA256 || type == SHA384 - || type == SHA512 || type == BLAKE2B_ID)) - return BAD_FUNC_ARG; - - switch (type) { - #ifndef NO_MD5 - case MD5: - InitMd5(&hmac->hash.md5); - break; - #endif - - #ifndef NO_SHA - case SHA: - ret = InitSha(&hmac->hash.sha); - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - ret = InitSha256(&hmac->hash.sha256); - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - ret = InitSha384(&hmac->hash.sha384); - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - ret = InitSha512(&hmac->hash.sha512); - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - ret = InitBlake2b(&hmac->hash.blake2b, BLAKE2B_256); - break; - #endif - - default: - return BAD_FUNC_ARG; - } - - return ret; -} - - -int HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) -{ - byte* ip = (byte*) hmac->ipad; - byte* op = (byte*) hmac->opad; - word32 i, hmac_block_size = 0; - int ret; - -#ifdef HAVE_CAVIUM - if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) - return HmacCaviumSetKey(hmac, type, key, length); -#endif - - ret = InitHmac(hmac, type); - if (ret != 0) - return ret; - - switch (hmac->macType) { - #ifndef NO_MD5 - case MD5: - { - hmac_block_size = MD5_BLOCK_SIZE; - if (length <= MD5_BLOCK_SIZE) { - XMEMCPY(ip, key, length); - } - else { - Md5Update(&hmac->hash.md5, key, length); - Md5Final(&hmac->hash.md5, ip); - length = MD5_DIGEST_SIZE; - } - } - break; - #endif - - #ifndef NO_SHA - case SHA: - { - hmac_block_size = SHA_BLOCK_SIZE; - if (length <= SHA_BLOCK_SIZE) { - XMEMCPY(ip, key, length); - } - else { - ShaUpdate(&hmac->hash.sha, key, length); - ShaFinal(&hmac->hash.sha, ip); - length = SHA_DIGEST_SIZE; - } - } - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - { - hmac_block_size = SHA256_BLOCK_SIZE; - if (length <= SHA256_BLOCK_SIZE) { - XMEMCPY(ip, key, length); - } - else { - ret = Sha256Update(&hmac->hash.sha256, key, length); - if (ret != 0) - return ret; - - ret = Sha256Final(&hmac->hash.sha256, ip); - if (ret != 0) - return ret; - - length = SHA256_DIGEST_SIZE; - } - } - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - { - hmac_block_size = SHA384_BLOCK_SIZE; - if (length <= SHA384_BLOCK_SIZE) { - XMEMCPY(ip, key, length); - } - else { - ret = Sha384Update(&hmac->hash.sha384, key, length); - if (ret != 0) - return ret; - - ret = Sha384Final(&hmac->hash.sha384, ip); - if (ret != 0) - return ret; - - length = SHA384_DIGEST_SIZE; - } - } - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - { - hmac_block_size = SHA512_BLOCK_SIZE; - if (length <= SHA512_BLOCK_SIZE) { - XMEMCPY(ip, key, length); - } - else { - ret = Sha512Update(&hmac->hash.sha512, key, length); - if (ret != 0) - return ret; - - ret = Sha512Final(&hmac->hash.sha512, ip); - if (ret != 0) - return ret; - - length = SHA512_DIGEST_SIZE; - } - } - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - { - hmac_block_size = BLAKE2B_BLOCKBYTES; - if (length <= BLAKE2B_BLOCKBYTES) { - XMEMCPY(ip, key, length); - } - else { - ret = Blake2bUpdate(&hmac->hash.blake2b, key, length); - if (ret != 0) - return ret; - - ret = Blake2bFinal(&hmac->hash.blake2b, ip, BLAKE2B_256); - if (ret != 0) - return ret; - - length = BLAKE2B_256; - } - } - break; - #endif - - default: - return BAD_FUNC_ARG; - } - if (length < hmac_block_size) - XMEMSET(ip + length, 0, hmac_block_size - length); - - for(i = 0; i < hmac_block_size; i++) { - op[i] = ip[i] ^ OPAD; - ip[i] ^= IPAD; - } - return 0; -} - - -static int HmacKeyInnerHash(Hmac* hmac) -{ - int ret = 0; - - switch (hmac->macType) { - #ifndef NO_MD5 - case MD5: - Md5Update(&hmac->hash.md5, (byte*) hmac->ipad, MD5_BLOCK_SIZE); - break; - #endif - - #ifndef NO_SHA - case SHA: - ShaUpdate(&hmac->hash.sha, (byte*) hmac->ipad, SHA_BLOCK_SIZE); - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - ret = Sha256Update(&hmac->hash.sha256, - (byte*) hmac->ipad, SHA256_BLOCK_SIZE); - if (ret != 0) - return ret; - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - ret = Sha384Update(&hmac->hash.sha384, - (byte*) hmac->ipad, SHA384_BLOCK_SIZE); - if (ret != 0) - return ret; - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - ret = Sha512Update(&hmac->hash.sha512, - (byte*) hmac->ipad, SHA512_BLOCK_SIZE); - if (ret != 0) - return ret; - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - ret = Blake2bUpdate(&hmac->hash.blake2b, - (byte*) hmac->ipad,BLAKE2B_BLOCKBYTES); - if (ret != 0) - return ret; - break; - #endif - - default: - break; - } - - hmac->innerHashKeyed = 1; - - return ret; -} - - -int HmacUpdate(Hmac* hmac, const byte* msg, word32 length) -{ - int ret; - -#ifdef HAVE_CAVIUM - if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) - return HmacCaviumUpdate(hmac, msg, length); -#endif - - if (!hmac->innerHashKeyed) { - ret = HmacKeyInnerHash(hmac); - if (ret != 0) - return ret; - } - - switch (hmac->macType) { - #ifndef NO_MD5 - case MD5: - Md5Update(&hmac->hash.md5, msg, length); - break; - #endif - - #ifndef NO_SHA - case SHA: - ShaUpdate(&hmac->hash.sha, msg, length); - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - ret = Sha256Update(&hmac->hash.sha256, msg, length); - if (ret != 0) - return ret; - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - ret = Sha384Update(&hmac->hash.sha384, msg, length); - if (ret != 0) - return ret; - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - ret = Sha512Update(&hmac->hash.sha512, msg, length); - if (ret != 0) - return ret; - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - ret = Blake2bUpdate(&hmac->hash.blake2b, msg, length); - if (ret != 0) - return ret; - break; - #endif - - default: - break; - } - - return 0; -} - - -int HmacFinal(Hmac* hmac, byte* hash) -{ - int ret; - -#ifdef HAVE_CAVIUM - if (hmac->magic == CYASSL_HMAC_CAVIUM_MAGIC) - return HmacCaviumFinal(hmac, hash); -#endif - - if (!hmac->innerHashKeyed) { - ret = HmacKeyInnerHash(hmac); - if (ret != 0) - return ret; - } - - switch (hmac->macType) { - #ifndef NO_MD5 - case MD5: - { - Md5Final(&hmac->hash.md5, (byte*) hmac->innerHash); - - Md5Update(&hmac->hash.md5, (byte*) hmac->opad, MD5_BLOCK_SIZE); - Md5Update(&hmac->hash.md5, - (byte*) hmac->innerHash, MD5_DIGEST_SIZE); - - Md5Final(&hmac->hash.md5, hash); - } - break; - #endif - - #ifndef NO_SHA - case SHA: - { - ShaFinal(&hmac->hash.sha, (byte*) hmac->innerHash); - - ShaUpdate(&hmac->hash.sha, (byte*) hmac->opad, SHA_BLOCK_SIZE); - ShaUpdate(&hmac->hash.sha, - (byte*) hmac->innerHash, SHA_DIGEST_SIZE); - - ShaFinal(&hmac->hash.sha, hash); - } - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - { - ret = Sha256Final(&hmac->hash.sha256, (byte*) hmac->innerHash); - if (ret != 0) - return ret; - - ret = Sha256Update(&hmac->hash.sha256, - (byte*) hmac->opad, SHA256_BLOCK_SIZE); - if (ret != 0) - return ret; - - ret = Sha256Update(&hmac->hash.sha256, - (byte*) hmac->innerHash, SHA256_DIGEST_SIZE); - if (ret != 0) - return ret; - - ret = Sha256Final(&hmac->hash.sha256, hash); - if (ret != 0) - return ret; - } - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - { - ret = Sha384Final(&hmac->hash.sha384, (byte*) hmac->innerHash); - if (ret != 0) - return ret; - - ret = Sha384Update(&hmac->hash.sha384, - (byte*) hmac->opad, SHA384_BLOCK_SIZE); - if (ret != 0) - return ret; - - ret = Sha384Update(&hmac->hash.sha384, - (byte*) hmac->innerHash, SHA384_DIGEST_SIZE); - if (ret != 0) - return ret; - - ret = Sha384Final(&hmac->hash.sha384, hash); - if (ret != 0) - return ret; - } - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - { - ret = Sha512Final(&hmac->hash.sha512, (byte*) hmac->innerHash); - if (ret != 0) - return ret; - - ret = Sha512Update(&hmac->hash.sha512, - (byte*) hmac->opad, SHA512_BLOCK_SIZE); - if (ret != 0) - return ret; - - ret = Sha512Update(&hmac->hash.sha512, - (byte*) hmac->innerHash, SHA512_DIGEST_SIZE); - if (ret != 0) - return ret; - - ret = Sha512Final(&hmac->hash.sha512, hash); - if (ret != 0) - return ret; - } - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - { - ret = Blake2bFinal(&hmac->hash.blake2b, (byte*) hmac->innerHash, - BLAKE2B_256); - if (ret != 0) - return ret; - - ret = Blake2bUpdate(&hmac->hash.blake2b, - (byte*) hmac->opad, BLAKE2B_BLOCKBYTES); - if (ret != 0) - return ret; - - ret = Blake2bUpdate(&hmac->hash.blake2b, - (byte*) hmac->innerHash, BLAKE2B_256); - if (ret != 0) - return ret; - - ret = Blake2bFinal(&hmac->hash.blake2b, hash, BLAKE2B_256); - if (ret != 0) - return ret; - } - break; - #endif - - default: - break; - } - - hmac->innerHashKeyed = 0; - - return 0; -} - - -#ifdef HAVE_CAVIUM - -/* Initiliaze Hmac for use with Nitrox device */ -int HmacInitCavium(Hmac* hmac, int devId) -{ - if (hmac == NULL) - return -1; - - if (CspAllocContext(CONTEXT_SSL, &hmac->contextHandle, devId) != 0) - return -1; - - hmac->keyLen = 0; - hmac->dataLen = 0; - hmac->type = 0; - hmac->devId = devId; - hmac->magic = CYASSL_HMAC_CAVIUM_MAGIC; - hmac->data = NULL; /* buffered input data */ - - hmac->innerHashKeyed = 0; - - return 0; -} - - -/* Free Hmac from use with Nitrox device */ -void HmacFreeCavium(Hmac* hmac) -{ - if (hmac == NULL) - return; - - CspFreeContext(CONTEXT_SSL, hmac->contextHandle, hmac->devId); - hmac->magic = 0; - XFREE(hmac->data, NULL, DYNAMIC_TYPE_CAVIUM_TMP); - hmac->data = NULL; -} - - -static void HmacCaviumFinal(Hmac* hmac, byte* hash) -{ - word32 requestId; - - if (CspHmac(CAVIUM_BLOCKING, hmac->type, NULL, hmac->keyLen, - (byte*)hmac->ipad, hmac->dataLen, hmac->data, hash, &requestId, - hmac->devId) != 0) { - CYASSL_MSG("Cavium Hmac failed"); - } - hmac->innerHashKeyed = 0; /* tell update to start over if used again */ -} - - -static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length) -{ - word16 add = (word16)length; - word32 total; - byte* tmp; - - if (length > CYASSL_MAX_16BIT) { - CYASSL_MSG("Too big msg for cavium hmac"); - return; - } - - if (hmac->innerHashKeyed == 0) { /* starting new */ - hmac->dataLen = 0; - hmac->innerHashKeyed = 1; - } - - total = add + hmac->dataLen; - if (total > CYASSL_MAX_16BIT) { - CYASSL_MSG("Too big msg for cavium hmac"); - return; - } - - tmp = XMALLOC(hmac->dataLen + add, NULL,DYNAMIC_TYPE_CAVIUM_TMP); - if (tmp == NULL) { - CYASSL_MSG("Out of memory for cavium update"); - return; - } - if (hmac->dataLen) - XMEMCPY(tmp, hmac->data, hmac->dataLen); - XMEMCPY(tmp + hmac->dataLen, msg, add); - - hmac->dataLen += add; - XFREE(hmac->data, NULL, DYNAMIC_TYPE_CAVIUM_TMP); - hmac->data = tmp; -} - - -static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key, - word32 length) -{ - hmac->macType = (byte)type; - if (type == MD5) - hmac->type = MD5_TYPE; - else if (type == SHA) - hmac->type = SHA1_TYPE; - else if (type == SHA256) - hmac->type = SHA256_TYPE; - else { - CYASSL_MSG("unsupported cavium hmac type"); - } - - hmac->innerHashKeyed = 0; /* should we key Startup flag */ - - hmac->keyLen = (word16)length; - /* store key in ipad */ - XMEMCPY(hmac->ipad, key, length); -} - -#endif /* HAVE_CAVIUM */ - -int CyaSSL_GetHmacMaxSize(void) -{ - return MAX_DIGEST_SIZE; -} - -#ifdef HAVE_HKDF - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -static INLINE int GetHashSizeByType(int type) -{ - if (!(type == MD5 || type == SHA || type == SHA256 || type == SHA384 - || type == SHA512 || type == BLAKE2B_ID)) - return BAD_FUNC_ARG; - - switch (type) { - #ifndef NO_MD5 - case MD5: - return MD5_DIGEST_SIZE; - break; - #endif - - #ifndef NO_SHA - case SHA: - return SHA_DIGEST_SIZE; - break; - #endif - - #ifndef NO_SHA256 - case SHA256: - return SHA256_DIGEST_SIZE; - break; - #endif - - #ifdef CYASSL_SHA384 - case SHA384: - return SHA384_DIGEST_SIZE; - break; - #endif - - #ifdef CYASSL_SHA512 - case SHA512: - return SHA512_DIGEST_SIZE; - break; - #endif - - #ifdef HAVE_BLAKE2 - case BLAKE2B_ID: - return BLAKE2B_OUTBYTES; - break; - #endif - - default: - return BAD_FUNC_ARG; - break; - } -} - - -/* HMAC-KDF with hash type, optional salt and info, return 0 on success */ -int HKDF(int type, const byte* inKey, word32 inKeySz, - const byte* salt, word32 saltSz, - const byte* info, word32 infoSz, - byte* out, word32 outSz) -{ - Hmac myHmac; -#ifdef CYASSL_SMALL_STACK - byte* tmp; - byte* prk; -#else - byte tmp[MAX_DIGEST_SIZE]; /* localSalt helper and T */ - byte prk[MAX_DIGEST_SIZE]; -#endif - const byte* localSalt; /* either points to user input or tmp */ - int hashSz = GetHashSizeByType(type); - word32 outIdx = 0; - byte n = 0x1; - int ret; - - if (hashSz < 0) - return BAD_FUNC_ARG; - -#ifdef CYASSL_SMALL_STACK - tmp = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (tmp == NULL) - return MEMORY_E; - - prk = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (prk == NULL) { - XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - localSalt = salt; - if (localSalt == NULL) { - XMEMSET(tmp, 0, hashSz); - localSalt = tmp; - saltSz = hashSz; - } - - do { - ret = HmacSetKey(&myHmac, type, localSalt, saltSz); - if (ret != 0) - break; - ret = HmacUpdate(&myHmac, inKey, inKeySz); - if (ret != 0) - break; - ret = HmacFinal(&myHmac, prk); - } while (0); - - if (ret == 0) { - while (outIdx < outSz) { - int tmpSz = (n == 1) ? 0 : hashSz; - word32 left = outSz - outIdx; - - ret = HmacSetKey(&myHmac, type, prk, hashSz); - if (ret != 0) - break; - ret = HmacUpdate(&myHmac, tmp, tmpSz); - if (ret != 0) - break; - ret = HmacUpdate(&myHmac, info, infoSz); - if (ret != 0) - break; - ret = HmacUpdate(&myHmac, &n, 1); - if (ret != 0) - break; - ret = HmacFinal(&myHmac, tmp); - if (ret != 0) - break; - - left = min(left, (word32)hashSz); - XMEMCPY(out+outIdx, tmp, left); - - outIdx += hashSz; - n++; - } - } - -#ifdef CYASSL_SMALL_STACK - XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(prk, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - -#endif /* HAVE_HKDF */ - -#endif /* NO_HMAC */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/include.am b/project1/cyassl-3.0.0/ctaocrypt/src/include.am deleted file mode 100644 index 580d3f55..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/include.am +++ /dev/null @@ -1,39 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -EXTRA_DIST += ctaocrypt/src/misc.c -EXTRA_DIST += ctaocrypt/src/asm.c - -EXTRA_DIST += \ - ctaocrypt/src/ecc_fp.c \ - ctaocrypt/src/fp_mont_small.i \ - ctaocrypt/src/fp_mul_comba_12.i \ - ctaocrypt/src/fp_mul_comba_17.i \ - ctaocrypt/src/fp_mul_comba_20.i \ - ctaocrypt/src/fp_mul_comba_24.i \ - ctaocrypt/src/fp_mul_comba_28.i \ - ctaocrypt/src/fp_mul_comba_32.i \ - ctaocrypt/src/fp_mul_comba_3.i \ - ctaocrypt/src/fp_mul_comba_48.i \ - ctaocrypt/src/fp_mul_comba_4.i \ - ctaocrypt/src/fp_mul_comba_64.i \ - ctaocrypt/src/fp_mul_comba_6.i \ - ctaocrypt/src/fp_mul_comba_7.i \ - ctaocrypt/src/fp_mul_comba_8.i \ - ctaocrypt/src/fp_mul_comba_9.i \ - ctaocrypt/src/fp_mul_comba_small_set.i \ - ctaocrypt/src/fp_sqr_comba_12.i \ - ctaocrypt/src/fp_sqr_comba_17.i \ - ctaocrypt/src/fp_sqr_comba_20.i \ - ctaocrypt/src/fp_sqr_comba_24.i \ - ctaocrypt/src/fp_sqr_comba_28.i \ - ctaocrypt/src/fp_sqr_comba_32.i \ - ctaocrypt/src/fp_sqr_comba_3.i \ - ctaocrypt/src/fp_sqr_comba_48.i \ - ctaocrypt/src/fp_sqr_comba_4.i \ - ctaocrypt/src/fp_sqr_comba_64.i \ - ctaocrypt/src/fp_sqr_comba_6.i \ - ctaocrypt/src/fp_sqr_comba_7.i \ - ctaocrypt/src/fp_sqr_comba_8.i \ - ctaocrypt/src/fp_sqr_comba_9.i \ - ctaocrypt/src/fp_sqr_comba_small_set.i diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/integer.c b/project1/cyassl-3.0.0/ctaocrypt/src/integer.c deleted file mode 100644 index e885ca04..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/integer.c +++ /dev/null @@ -1,4488 +0,0 @@ -/* integer.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* - * Based on public domain LibTomMath 0.38 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* in case user set USE_FAST_MATH there */ -#include - -#ifndef NO_BIG_INT - -#ifndef USE_FAST_MATH - -#include - -#ifndef NO_CYASSL_SMALL_STACK - #ifndef CYASSL_SMALL_STACK - #define CYASSL_SMALL_STACK - #endif -#endif - -static void bn_reverse (unsigned char *s, int len); - -/* math settings check */ -word32 CheckRunTimeSettings(void) -{ - return CTC_SETTINGS; -} - - -/* handle up to 6 inits */ -int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, - mp_int* f) -{ - int res = MP_OKAY; - - if (a && ((res = mp_init(a)) != MP_OKAY)) - return res; - - if (b && ((res = mp_init(b)) != MP_OKAY)) { - mp_clear(a); - return res; - } - - if (c && ((res = mp_init(c)) != MP_OKAY)) { - mp_clear(a); mp_clear(b); - return res; - } - - if (d && ((res = mp_init(d)) != MP_OKAY)) { - mp_clear(a); mp_clear(b); mp_clear(c); - return res; - } - - if (e && ((res = mp_init(e)) != MP_OKAY)) { - mp_clear(a); mp_clear(b); mp_clear(c); mp_clear(d); - return res; - } - - if (f && ((res = mp_init(f)) != MP_OKAY)) { - mp_clear(a); mp_clear(b); mp_clear(c); mp_clear(d); mp_clear(e); - return res; - } - - return res; -} - - -/* init a new mp_int */ -int mp_init (mp_int * a) -{ - int i; - - /* allocate memory required and clear it */ - a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC, 0, - DYNAMIC_TYPE_BIGINT); - if (a->dp == NULL) { - return MP_MEM; - } - - /* set the digits to zero */ - for (i = 0; i < MP_PREC; i++) { - a->dp[i] = 0; - } - - /* set the used to zero, allocated digits to the default precision - * and sign to positive */ - a->used = 0; - a->alloc = MP_PREC; - a->sign = MP_ZPOS; - - return MP_OKAY; -} - - -/* clear one (frees) */ -void -mp_clear (mp_int * a) -{ - int i; - - if (a == NULL) - return; - - /* only do anything if a hasn't been freed previously */ - if (a->dp != NULL) { - /* first zero the digits */ - for (i = 0; i < a->used; i++) { - a->dp[i] = 0; - } - - /* free ram */ - XFREE(a->dp, 0, DYNAMIC_TYPE_BIGINT); - - /* reset members to make debugging easier */ - a->dp = NULL; - a->alloc = a->used = 0; - a->sign = MP_ZPOS; - } -} - - -/* get the size for an unsigned equivalent */ -int mp_unsigned_bin_size (mp_int * a) -{ - int size = mp_count_bits (a); - return (size / 8 + ((size & 7) != 0 ? 1 : 0)); -} - - -/* returns the number of bits in an int */ -int -mp_count_bits (mp_int * a) -{ - int r; - mp_digit q; - - /* shortcut */ - if (a->used == 0) { - return 0; - } - - /* get number of digits and add that */ - r = (a->used - 1) * DIGIT_BIT; - - /* take the last digit and count the bits in it */ - q = a->dp[a->used - 1]; - while (q > ((mp_digit) 0)) { - ++r; - q >>= ((mp_digit) 1); - } - return r; -} - - -int mp_leading_bit (mp_int * a) -{ - int bit = 0; - mp_int t; - - if (mp_init_copy(&t, a) != MP_OKAY) - return 0; - - while (mp_iszero(&t) == 0) { -#ifndef MP_8BIT - bit = (t.dp[0] & 0x80) != 0; -#else - bit = (t.dp[0] | ((t.dp[1] & 0x01) << 7)) & 0x80 != 0; -#endif - if (mp_div_2d (&t, 8, &t, NULL) != MP_OKAY) - break; - } - mp_clear(&t); - return bit; -} - - -/* store in unsigned [big endian] format */ -int mp_to_unsigned_bin (mp_int * a, unsigned char *b) -{ - int x, res; - mp_int t; - - if ((res = mp_init_copy (&t, a)) != MP_OKAY) { - return res; - } - - x = 0; - while (mp_iszero (&t) == 0) { -#ifndef MP_8BIT - b[x++] = (unsigned char) (t.dp[0] & 255); -#else - b[x++] = (unsigned char) (t.dp[0] | ((t.dp[1] & 0x01) << 7)); -#endif - if ((res = mp_div_2d (&t, 8, &t, NULL)) != MP_OKAY) { - mp_clear (&t); - return res; - } - } - bn_reverse (b, x); - mp_clear (&t); - return MP_OKAY; -} - - -/* creates "a" then copies b into it */ -int mp_init_copy (mp_int * a, mp_int * b) -{ - int res; - - if ((res = mp_init (a)) != MP_OKAY) { - return res; - } - return mp_copy (b, a); -} - - -/* copy, b = a */ -int -mp_copy (mp_int * a, mp_int * b) -{ - int res, n; - - /* if dst == src do nothing */ - if (a == b) { - return MP_OKAY; - } - - /* grow dest */ - if (b->alloc < a->used) { - if ((res = mp_grow (b, a->used)) != MP_OKAY) { - return res; - } - } - - /* zero b and copy the parameters over */ - { - register mp_digit *tmpa, *tmpb; - - /* pointer aliases */ - - /* source */ - tmpa = a->dp; - - /* destination */ - tmpb = b->dp; - - /* copy all the digits */ - for (n = 0; n < a->used; n++) { - *tmpb++ = *tmpa++; - } - - /* clear high digits */ - for (; n < b->used; n++) { - *tmpb++ = 0; - } - } - - /* copy used count and sign */ - b->used = a->used; - b->sign = a->sign; - return MP_OKAY; -} - - -/* grow as required */ -int mp_grow (mp_int * a, int size) -{ - int i; - mp_digit *tmp; - - /* if the alloc size is smaller alloc more ram */ - if (a->alloc < size) { - /* ensure there are always at least MP_PREC digits extra on top */ - size += (MP_PREC * 2) - (size % MP_PREC); - - /* reallocate the array a->dp - * - * We store the return in a temporary variable - * in case the operation failed we don't want - * to overwrite the dp member of a. - */ - tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size, 0, - DYNAMIC_TYPE_BIGINT); - if (tmp == NULL) { - /* reallocation failed but "a" is still valid [can be freed] */ - return MP_MEM; - } - - /* reallocation succeeded so set a->dp */ - a->dp = tmp; - - /* zero excess digits */ - i = a->alloc; - a->alloc = size; - for (; i < a->alloc; i++) { - a->dp[i] = 0; - } - } - return MP_OKAY; -} - - -/* reverse an array, used for radix code */ -void -bn_reverse (unsigned char *s, int len) -{ - int ix, iy; - unsigned char t; - - ix = 0; - iy = len - 1; - while (ix < iy) { - t = s[ix]; - s[ix] = s[iy]; - s[iy] = t; - ++ix; - --iy; - } -} - - -/* shift right by a certain bit count (store quotient in c, optional - remainder in d) */ -int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) -{ - int D, res; - mp_int t; - - - /* if the shift count is <= 0 then we do no work */ - if (b <= 0) { - res = mp_copy (a, c); - if (d != NULL) { - mp_zero (d); - } - return res; - } - - if ((res = mp_init (&t)) != MP_OKAY) { - return res; - } - - /* get the remainder */ - if (d != NULL) { - if ((res = mp_mod_2d (a, b, &t)) != MP_OKAY) { - mp_clear (&t); - return res; - } - } - - /* copy */ - if ((res = mp_copy (a, c)) != MP_OKAY) { - mp_clear (&t); - return res; - } - - /* shift by as many digits in the bit count */ - if (b >= (int)DIGIT_BIT) { - mp_rshd (c, b / DIGIT_BIT); - } - - /* shift any bit count < DIGIT_BIT */ - D = (b % DIGIT_BIT); - if (D != 0) { - mp_rshb(c, D); - } - mp_clamp (c); - if (d != NULL) { - mp_exch (&t, d); - } - mp_clear (&t); - return MP_OKAY; -} - - -/* set to zero */ -void mp_zero (mp_int * a) -{ - int n; - mp_digit *tmp; - - a->sign = MP_ZPOS; - a->used = 0; - - tmp = a->dp; - for (n = 0; n < a->alloc; n++) { - *tmp++ = 0; - } -} - - -/* trim unused digits - * - * This is used to ensure that leading zero digits are - * trimed and the leading "used" digit will be non-zero - * Typically very fast. Also fixes the sign if there - * are no more leading digits - */ -void -mp_clamp (mp_int * a) -{ - /* decrease used while the most significant digit is - * zero. - */ - while (a->used > 0 && a->dp[a->used - 1] == 0) { - --(a->used); - } - - /* reset the sign flag if used == 0 */ - if (a->used == 0) { - a->sign = MP_ZPOS; - } -} - - -/* swap the elements of two integers, for cases where you can't simply swap the - * mp_int pointers around - */ -void -mp_exch (mp_int * a, mp_int * b) -{ - mp_int t; - - t = *a; - *a = *b; - *b = t; -} - - -/* shift right a certain number of bits */ -void mp_rshb (mp_int *c, int x) -{ - register mp_digit *tmpc, mask, shift; - mp_digit r, rr; - mp_digit D = x; - - /* mask */ - mask = (((mp_digit)1) << D) - 1; - - /* shift for lsb */ - shift = DIGIT_BIT - D; - - /* alias */ - tmpc = c->dp + (c->used - 1); - - /* carry */ - r = 0; - for (x = c->used - 1; x >= 0; x--) { - /* get the lower bits of this word in a temp */ - rr = *tmpc & mask; - - /* shift the current word and mix in the carry bits from previous word */ - *tmpc = (*tmpc >> D) | (r << shift); - --tmpc; - - /* set the carry to the carry bits of the current word found above */ - r = rr; - } -} - - -/* shift right a certain amount of digits */ -void mp_rshd (mp_int * a, int b) -{ - int x; - - /* if b <= 0 then ignore it */ - if (b <= 0) { - return; - } - - /* if b > used then simply zero it and return */ - if (a->used <= b) { - mp_zero (a); - return; - } - - { - register mp_digit *bottom, *top; - - /* shift the digits down */ - - /* bottom */ - bottom = a->dp; - - /* top [offset into digits] */ - top = a->dp + b; - - /* this is implemented as a sliding window where - * the window is b-digits long and digits from - * the top of the window are copied to the bottom - * - * e.g. - - b-2 | b-1 | b0 | b1 | b2 | ... | bb | ----> - /\ | ----> - \-------------------/ ----> - */ - for (x = 0; x < (a->used - b); x++) { - *bottom++ = *top++; - } - - /* zero the top digits */ - for (; x < a->used; x++) { - *bottom++ = 0; - } - } - - /* remove excess digits */ - a->used -= b; -} - - -/* calc a value mod 2**b */ -int -mp_mod_2d (mp_int * a, int b, mp_int * c) -{ - int x, res; - - /* if b is <= 0 then zero the int */ - if (b <= 0) { - mp_zero (c); - return MP_OKAY; - } - - /* if the modulus is larger than the value than return */ - if (b >= (int) (a->used * DIGIT_BIT)) { - res = mp_copy (a, c); - return res; - } - - /* copy */ - if ((res = mp_copy (a, c)) != MP_OKAY) { - return res; - } - - /* zero digits above the last digit of the modulus */ - for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { - c->dp[x] = 0; - } - /* clear the digit that is not completely outside/inside the modulus */ - c->dp[b / DIGIT_BIT] &= (mp_digit) ((((mp_digit) 1) << - (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1)); - mp_clamp (c); - return MP_OKAY; -} - - -/* reads a unsigned char array, assumes the msb is stored first [big endian] */ -int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) -{ - int res; - - /* make sure there are at least two digits */ - if (a->alloc < 2) { - if ((res = mp_grow(a, 2)) != MP_OKAY) { - return res; - } - } - - /* zero the int */ - mp_zero (a); - - /* read the bytes in */ - while (c-- > 0) { - if ((res = mp_mul_2d (a, 8, a)) != MP_OKAY) { - return res; - } - -#ifndef MP_8BIT - a->dp[0] |= *b++; - a->used += 1; -#else - a->dp[0] = (*b & MP_MASK); - a->dp[1] |= ((*b++ >> 7U) & 1); - a->used += 2; -#endif - } - mp_clamp (a); - return MP_OKAY; -} - - -/* shift left by a certain bit count */ -int mp_mul_2d (mp_int * a, int b, mp_int * c) -{ - mp_digit d; - int res; - - /* copy */ - if (a != c) { - if ((res = mp_copy (a, c)) != MP_OKAY) { - return res; - } - } - - if (c->alloc < (int)(c->used + b/DIGIT_BIT + 1)) { - if ((res = mp_grow (c, c->used + b / DIGIT_BIT + 1)) != MP_OKAY) { - return res; - } - } - - /* shift by as many digits in the bit count */ - if (b >= (int)DIGIT_BIT) { - if ((res = mp_lshd (c, b / DIGIT_BIT)) != MP_OKAY) { - return res; - } - } - - /* shift any bit count < DIGIT_BIT */ - d = (mp_digit) (b % DIGIT_BIT); - if (d != 0) { - register mp_digit *tmpc, shift, mask, r, rr; - register int x; - - /* bitmask for carries */ - mask = (((mp_digit)1) << d) - 1; - - /* shift for msbs */ - shift = DIGIT_BIT - d; - - /* alias */ - tmpc = c->dp; - - /* carry */ - r = 0; - for (x = 0; x < c->used; x++) { - /* get the higher bits of the current word */ - rr = (*tmpc >> shift) & mask; - - /* shift the current word and OR in the carry */ - *tmpc = ((*tmpc << d) | r) & MP_MASK; - ++tmpc; - - /* set the carry to the carry bits of the current word */ - r = rr; - } - - /* set final carry */ - if (r != 0) { - c->dp[(c->used)++] = r; - } - } - mp_clamp (c); - return MP_OKAY; -} - - -/* shift left a certain amount of digits */ -int mp_lshd (mp_int * a, int b) -{ - int x, res; - - /* if its less than zero return */ - if (b <= 0) { - return MP_OKAY; - } - - /* grow to fit the new digits */ - if (a->alloc < a->used + b) { - if ((res = mp_grow (a, a->used + b)) != MP_OKAY) { - return res; - } - } - - { - register mp_digit *top, *bottom; - - /* increment the used by the shift amount then copy upwards */ - a->used += b; - - /* top */ - top = a->dp + a->used - 1; - - /* base */ - bottom = a->dp + a->used - 1 - b; - - /* much like mp_rshd this is implemented using a sliding window - * except the window goes the otherway around. Copying from - * the bottom to the top. see bn_mp_rshd.c for more info. - */ - for (x = a->used - 1; x >= b; x--) { - *top-- = *bottom--; - } - - /* zero the lower digits */ - top = a->dp; - for (x = 0; x < b; x++) { - *top++ = 0; - } - } - return MP_OKAY; -} - - -/* this is a shell function that calls either the normal or Montgomery - * exptmod functions. Originally the call to the montgomery code was - * embedded in the normal function but that wasted alot of stack space - * for nothing (since 99% of the time the Montgomery code would be called) - */ -int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) -{ - int dr; - - /* modulus P must be positive */ - if (P->sign == MP_NEG) { - return MP_VAL; - } - - /* if exponent X is negative we have to recurse */ - if (X->sign == MP_NEG) { -#ifdef BN_MP_INVMOD_C - mp_int tmpG, tmpX; - int err; - - /* first compute 1/G mod P */ - if ((err = mp_init(&tmpG)) != MP_OKAY) { - return err; - } - if ((err = mp_invmod(G, P, &tmpG)) != MP_OKAY) { - mp_clear(&tmpG); - return err; - } - - /* now get |X| */ - if ((err = mp_init(&tmpX)) != MP_OKAY) { - mp_clear(&tmpG); - return err; - } - if ((err = mp_abs(X, &tmpX)) != MP_OKAY) { - mp_clear(&tmpG); - mp_clear(&tmpX); - return err; - } - - /* and now compute (1/G)**|X| instead of G**X [X < 0] */ - err = mp_exptmod(&tmpG, &tmpX, P, Y); - mp_clear(&tmpG); - mp_clear(&tmpX); - return err; -#else - /* no invmod */ - return MP_VAL; -#endif - } - -/* modified diminished radix reduction */ -#if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C) && \ - defined(BN_S_MP_EXPTMOD_C) - if (mp_reduce_is_2k_l(P) == MP_YES) { - return s_mp_exptmod(G, X, P, Y, 1); - } -#endif - -#ifdef BN_MP_DR_IS_MODULUS_C - /* is it a DR modulus? */ - dr = mp_dr_is_modulus(P); -#else - /* default to no */ - dr = 0; -#endif - -#ifdef BN_MP_REDUCE_IS_2K_C - /* if not, is it a unrestricted DR modulus? */ - if (dr == 0) { - dr = mp_reduce_is_2k(P) << 1; - } -#endif - - /* if the modulus is odd or dr != 0 use the montgomery method */ -#ifdef BN_MP_EXPTMOD_FAST_C - if (mp_isodd (P) == 1 || dr != 0) { - return mp_exptmod_fast (G, X, P, Y, dr); - } else { -#endif -#ifdef BN_S_MP_EXPTMOD_C - /* otherwise use the generic Barrett reduction technique */ - return s_mp_exptmod (G, X, P, Y, 0); -#else - /* no exptmod for evens */ - return MP_VAL; -#endif -#ifdef BN_MP_EXPTMOD_FAST_C - } -#endif -} - - -/* b = |a| - * - * Simple function copies the input and fixes the sign to positive - */ -int -mp_abs (mp_int * a, mp_int * b) -{ - int res; - - /* copy a to b */ - if (a != b) { - if ((res = mp_copy (a, b)) != MP_OKAY) { - return res; - } - } - - /* force the sign of b to positive */ - b->sign = MP_ZPOS; - - return MP_OKAY; -} - - -/* hac 14.61, pp608 */ -int mp_invmod (mp_int * a, mp_int * b, mp_int * c) -{ - /* b cannot be negative */ - if (b->sign == MP_NEG || mp_iszero(b) == 1) { - return MP_VAL; - } - -#ifdef BN_FAST_MP_INVMOD_C - /* if the modulus is odd we can use a faster routine instead */ - if (mp_isodd (b) == 1) { - return fast_mp_invmod (a, b, c); - } -#endif - -#ifdef BN_MP_INVMOD_SLOW_C - return mp_invmod_slow(a, b, c); -#endif -} - - -/* computes the modular inverse via binary extended euclidean algorithm, - * that is c = 1/a mod b - * - * Based on slow invmod except this is optimized for the case where b is - * odd as per HAC Note 14.64 on pp. 610 - */ -int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c) -{ - mp_int x, y, u, v, B, D; - int res, neg; - - /* 2. [modified] b must be odd */ - if (mp_iseven (b) == 1) { - return MP_VAL; - } - - /* init all our temps */ - if ((res = mp_init_multi(&x, &y, &u, &v, &B, &D)) != MP_OKAY) { - return res; - } - - /* x == modulus, y == value to invert */ - if ((res = mp_copy (b, &x)) != MP_OKAY) { - goto LBL_ERR; - } - - /* we need y = |a| */ - if ((res = mp_mod (a, b, &y)) != MP_OKAY) { - goto LBL_ERR; - } - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - if ((res = mp_copy (&x, &u)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_copy (&y, &v)) != MP_OKAY) { - goto LBL_ERR; - } - mp_set (&D, 1); - -top: - /* 4. while u is even do */ - while (mp_iseven (&u) == 1) { - /* 4.1 u = u/2 */ - if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { - goto LBL_ERR; - } - /* 4.2 if B is odd then */ - if (mp_isodd (&B) == 1) { - if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } - /* B = B/2 */ - if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* 5. while v is even do */ - while (mp_iseven (&v) == 1) { - /* 5.1 v = v/2 */ - if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { - goto LBL_ERR; - } - /* 5.2 if D is odd then */ - if (mp_isodd (&D) == 1) { - /* D = (D-x)/2 */ - if ((res = mp_sub (&D, &x, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - /* D = D/2 */ - if ((res = mp_div_2 (&D, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* 6. if u >= v then */ - if (mp_cmp (&u, &v) != MP_LT) { - /* u = u - v, B = B - D */ - if ((res = mp_sub (&u, &v, &u)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&B, &D, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } else { - /* v - v - u, D = D - B */ - if ((res = mp_sub (&v, &u, &v)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&D, &B, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* if not zero goto step 4 */ - if (mp_iszero (&u) == 0) { - goto top; - } - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (mp_cmp_d (&v, 1) != MP_EQ) { - res = MP_VAL; - goto LBL_ERR; - } - - /* b is now the inverse */ - neg = a->sign; - while (D.sign == MP_NEG) { - if ((res = mp_add (&D, b, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - mp_exch (&D, c); - c->sign = neg; - res = MP_OKAY; - -LBL_ERR:mp_clear(&x); - mp_clear(&y); - mp_clear(&u); - mp_clear(&v); - mp_clear(&B); - mp_clear(&D); - return res; -} - - -/* hac 14.61, pp608 */ -int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c) -{ - mp_int x, y, u, v, A, B, C, D; - int res; - - /* b cannot be negative */ - if (b->sign == MP_NEG || mp_iszero(b) == 1) { - return MP_VAL; - } - - /* init temps */ - if ((res = mp_init_multi(&x, &y, &u, &v, - &A, &B)) != MP_OKAY) { - return res; - } - - /* init rest of tmps temps */ - if ((res = mp_init_multi(&C, &D, 0, 0, 0, 0)) != MP_OKAY) { - return res; - } - - /* x = a, y = b */ - if ((res = mp_mod(a, b, &x)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_copy (b, &y)) != MP_OKAY) { - goto LBL_ERR; - } - - /* 2. [modified] if x,y are both even then return an error! */ - if (mp_iseven (&x) == 1 && mp_iseven (&y) == 1) { - res = MP_VAL; - goto LBL_ERR; - } - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - if ((res = mp_copy (&x, &u)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_copy (&y, &v)) != MP_OKAY) { - goto LBL_ERR; - } - mp_set (&A, 1); - mp_set (&D, 1); - -top: - /* 4. while u is even do */ - while (mp_iseven (&u) == 1) { - /* 4.1 u = u/2 */ - if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { - goto LBL_ERR; - } - /* 4.2 if A or B is odd then */ - if (mp_isodd (&A) == 1 || mp_isodd (&B) == 1) { - /* A = (A+y)/2, B = (B-x)/2 */ - if ((res = mp_add (&A, &y, &A)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } - /* A = A/2, B = B/2 */ - if ((res = mp_div_2 (&A, &A)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* 5. while v is even do */ - while (mp_iseven (&v) == 1) { - /* 5.1 v = v/2 */ - if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { - goto LBL_ERR; - } - /* 5.2 if C or D is odd then */ - if (mp_isodd (&C) == 1 || mp_isodd (&D) == 1) { - /* C = (C+y)/2, D = (D-x)/2 */ - if ((res = mp_add (&C, &y, &C)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_sub (&D, &x, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - /* C = C/2, D = D/2 */ - if ((res = mp_div_2 (&C, &C)) != MP_OKAY) { - goto LBL_ERR; - } - if ((res = mp_div_2 (&D, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* 6. if u >= v then */ - if (mp_cmp (&u, &v) != MP_LT) { - /* u = u - v, A = A - C, B = B - D */ - if ((res = mp_sub (&u, &v, &u)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&A, &C, &A)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&B, &D, &B)) != MP_OKAY) { - goto LBL_ERR; - } - } else { - /* v - v - u, C = C - A, D = D - B */ - if ((res = mp_sub (&v, &u, &v)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&C, &A, &C)) != MP_OKAY) { - goto LBL_ERR; - } - - if ((res = mp_sub (&D, &B, &D)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* if not zero goto step 4 */ - if (mp_iszero (&u) == 0) - goto top; - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (mp_cmp_d (&v, 1) != MP_EQ) { - res = MP_VAL; - goto LBL_ERR; - } - - /* if its too low */ - while (mp_cmp_d(&C, 0) == MP_LT) { - if ((res = mp_add(&C, b, &C)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* too big */ - while (mp_cmp_mag(&C, b) != MP_LT) { - if ((res = mp_sub(&C, b, &C)) != MP_OKAY) { - goto LBL_ERR; - } - } - - /* C is now the inverse */ - mp_exch (&C, c); - res = MP_OKAY; -LBL_ERR:mp_clear(&x); - mp_clear(&y); - mp_clear(&u); - mp_clear(&v); - mp_clear(&A); - mp_clear(&B); - mp_clear(&C); - mp_clear(&D); - return res; -} - - -/* compare maginitude of two ints (unsigned) */ -int mp_cmp_mag (mp_int * a, mp_int * b) -{ - int n; - mp_digit *tmpa, *tmpb; - - /* compare based on # of non-zero digits */ - if (a->used > b->used) { - return MP_GT; - } - - if (a->used < b->used) { - return MP_LT; - } - - /* alias for a */ - tmpa = a->dp + (a->used - 1); - - /* alias for b */ - tmpb = b->dp + (a->used - 1); - - /* compare based on digits */ - for (n = 0; n < a->used; ++n, --tmpa, --tmpb) { - if (*tmpa > *tmpb) { - return MP_GT; - } - - if (*tmpa < *tmpb) { - return MP_LT; - } - } - return MP_EQ; -} - - -/* compare two ints (signed)*/ -int -mp_cmp (mp_int * a, mp_int * b) -{ - /* compare based on sign */ - if (a->sign != b->sign) { - if (a->sign == MP_NEG) { - return MP_LT; - } else { - return MP_GT; - } - } - - /* compare digits */ - if (a->sign == MP_NEG) { - /* if negative compare opposite direction */ - return mp_cmp_mag(b, a); - } else { - return mp_cmp_mag(a, b); - } -} - - -/* compare a digit */ -int mp_cmp_d(mp_int * a, mp_digit b) -{ - /* compare based on sign */ - if (a->sign == MP_NEG) { - return MP_LT; - } - - /* compare based on magnitude */ - if (a->used > 1) { - return MP_GT; - } - - /* compare the only digit of a to b */ - if (a->dp[0] > b) { - return MP_GT; - } else if (a->dp[0] < b) { - return MP_LT; - } else { - return MP_EQ; - } -} - - -/* set to a digit */ -void mp_set (mp_int * a, mp_digit b) -{ - mp_zero (a); - a->dp[0] = b & MP_MASK; - a->used = (a->dp[0] != 0) ? 1 : 0; -} - - -/* c = a mod b, 0 <= c < b */ -int -mp_mod (mp_int * a, mp_int * b, mp_int * c) -{ - mp_int t; - int res; - - if ((res = mp_init (&t)) != MP_OKAY) { - return res; - } - - if ((res = mp_div (a, b, NULL, &t)) != MP_OKAY) { - mp_clear (&t); - return res; - } - - if (t.sign != b->sign) { - res = mp_add (b, &t, c); - } else { - res = MP_OKAY; - mp_exch (&t, c); - } - - mp_clear (&t); - return res; -} - - -/* slower bit-bang division... also smaller */ -int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) -{ - mp_int ta, tb, tq, q; - int res, n, n2; - - /* is divisor zero ? */ - if (mp_iszero (b) == 1) { - return MP_VAL; - } - - /* if a < b then q=0, r = a */ - if (mp_cmp_mag (a, b) == MP_LT) { - if (d != NULL) { - res = mp_copy (a, d); - } else { - res = MP_OKAY; - } - if (c != NULL) { - mp_zero (c); - } - return res; - } - - /* init our temps */ - if ((res = mp_init_multi(&ta, &tb, &tq, &q, 0, 0)) != MP_OKAY) { - return res; - } - - - mp_set(&tq, 1); - n = mp_count_bits(a) - mp_count_bits(b); - if (((res = mp_abs(a, &ta)) != MP_OKAY) || - ((res = mp_abs(b, &tb)) != MP_OKAY) || - ((res = mp_mul_2d(&tb, n, &tb)) != MP_OKAY) || - ((res = mp_mul_2d(&tq, n, &tq)) != MP_OKAY)) { - goto LBL_ERR; - } - - while (n-- >= 0) { - if (mp_cmp(&tb, &ta) != MP_GT) { - if (((res = mp_sub(&ta, &tb, &ta)) != MP_OKAY) || - ((res = mp_add(&q, &tq, &q)) != MP_OKAY)) { - goto LBL_ERR; - } - } - if (((res = mp_div_2d(&tb, 1, &tb, NULL)) != MP_OKAY) || - ((res = mp_div_2d(&tq, 1, &tq, NULL)) != MP_OKAY)) { - goto LBL_ERR; - } - } - - /* now q == quotient and ta == remainder */ - n = a->sign; - n2 = (a->sign == b->sign ? MP_ZPOS : MP_NEG); - if (c != NULL) { - mp_exch(c, &q); - c->sign = (mp_iszero(c) == MP_YES) ? MP_ZPOS : n2; - } - if (d != NULL) { - mp_exch(d, &ta); - d->sign = (mp_iszero(d) == MP_YES) ? MP_ZPOS : n; - } -LBL_ERR: - mp_clear(&ta); - mp_clear(&tb); - mp_clear(&tq); - mp_clear(&q); - return res; -} - - -/* b = a/2 */ -int mp_div_2(mp_int * a, mp_int * b) -{ - int x, res, oldused; - - /* copy */ - if (b->alloc < a->used) { - if ((res = mp_grow (b, a->used)) != MP_OKAY) { - return res; - } - } - - oldused = b->used; - b->used = a->used; - { - register mp_digit r, rr, *tmpa, *tmpb; - - /* source alias */ - tmpa = a->dp + b->used - 1; - - /* dest alias */ - tmpb = b->dp + b->used - 1; - - /* carry */ - r = 0; - for (x = b->used - 1; x >= 0; x--) { - /* get the carry for the next iteration */ - rr = *tmpa & 1; - - /* shift the current digit, add in carry and store */ - *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); - - /* forward carry to next iteration */ - r = rr; - } - - /* zero excess digits */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; - mp_clamp (b); - return MP_OKAY; -} - - -/* high level addition (handles signs) */ -int mp_add (mp_int * a, mp_int * b, mp_int * c) -{ - int sa, sb, res; - - /* get sign of both inputs */ - sa = a->sign; - sb = b->sign; - - /* handle two cases, not four */ - if (sa == sb) { - /* both positive or both negative */ - /* add their magnitudes, copy the sign */ - c->sign = sa; - res = s_mp_add (a, b, c); - } else { - /* one positive, the other negative */ - /* subtract the one with the greater magnitude from */ - /* the one of the lesser magnitude. The result gets */ - /* the sign of the one with the greater magnitude. */ - if (mp_cmp_mag (a, b) == MP_LT) { - c->sign = sb; - res = s_mp_sub (b, a, c); - } else { - c->sign = sa; - res = s_mp_sub (a, b, c); - } - } - return res; -} - - -/* low level addition, based on HAC pp.594, Algorithm 14.7 */ -int -s_mp_add (mp_int * a, mp_int * b, mp_int * c) -{ - mp_int *x; - int olduse, res, min, max; - - /* find sizes, we let |a| <= |b| which means we have to sort - * them. "x" will point to the input with the most digits - */ - if (a->used > b->used) { - min = b->used; - max = a->used; - x = a; - } else { - min = a->used; - max = b->used; - x = b; - } - - /* init result */ - if (c->alloc < max + 1) { - if ((res = mp_grow (c, max + 1)) != MP_OKAY) { - return res; - } - } - - /* get old used digit count and set new one */ - olduse = c->used; - c->used = max + 1; - - { - register mp_digit u, *tmpa, *tmpb, *tmpc; - register int i; - - /* alias for digit pointers */ - - /* first input */ - tmpa = a->dp; - - /* second input */ - tmpb = b->dp; - - /* destination */ - tmpc = c->dp; - - /* zero the carry */ - u = 0; - for (i = 0; i < min; i++) { - /* Compute the sum at one digit, T[i] = A[i] + B[i] + U */ - *tmpc = *tmpa++ + *tmpb++ + u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((mp_digit)DIGIT_BIT); - - /* take away carry bit from T[i] */ - *tmpc++ &= MP_MASK; - } - - /* now copy higher words if any, that is in A+B - * if A or B has more digits add those in - */ - if (min != max) { - for (; i < max; i++) { - /* T[i] = X[i] + U */ - *tmpc = x->dp[i] + u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((mp_digit)DIGIT_BIT); - - /* take away carry bit from T[i] */ - *tmpc++ &= MP_MASK; - } - } - - /* add carry */ - *tmpc++ = u; - - /* clear digits above oldused */ - for (i = c->used; i < olduse; i++) { - *tmpc++ = 0; - } - } - - mp_clamp (c); - return MP_OKAY; -} - - -/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */ -int -s_mp_sub (mp_int * a, mp_int * b, mp_int * c) -{ - int olduse, res, min, max; - - /* find sizes */ - min = b->used; - max = a->used; - - /* init result */ - if (c->alloc < max) { - if ((res = mp_grow (c, max)) != MP_OKAY) { - return res; - } - } - olduse = c->used; - c->used = max; - - { - register mp_digit u, *tmpa, *tmpb, *tmpc; - register int i; - - /* alias for digit pointers */ - tmpa = a->dp; - tmpb = b->dp; - tmpc = c->dp; - - /* set carry to zero */ - u = 0; - for (i = 0; i < min; i++) { - /* T[i] = A[i] - B[i] - U */ - *tmpc = *tmpa++ - *tmpb++ - u; - - /* U = carry bit of T[i] - * Note this saves performing an AND operation since - * if a carry does occur it will propagate all the way to the - * MSB. As a result a single shift is enough to get the carry - */ - u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); - - /* Clear carry from T[i] */ - *tmpc++ &= MP_MASK; - } - - /* now copy higher words if any, e.g. if A has more digits than B */ - for (; i < max; i++) { - /* T[i] = A[i] - U */ - *tmpc = *tmpa++ - u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); - - /* Clear carry from T[i] */ - *tmpc++ &= MP_MASK; - } - - /* clear digits above used (since we may not have grown result above) */ - for (i = c->used; i < olduse; i++) { - *tmpc++ = 0; - } - } - - mp_clamp (c); - return MP_OKAY; -} - - -/* high level subtraction (handles signs) */ -int -mp_sub (mp_int * a, mp_int * b, mp_int * c) -{ - int sa, sb, res; - - sa = a->sign; - sb = b->sign; - - if (sa != sb) { - /* subtract a negative from a positive, OR */ - /* subtract a positive from a negative. */ - /* In either case, ADD their magnitudes, */ - /* and use the sign of the first number. */ - c->sign = sa; - res = s_mp_add (a, b, c); - } else { - /* subtract a positive from a positive, OR */ - /* subtract a negative from a negative. */ - /* First, take the difference between their */ - /* magnitudes, then... */ - if (mp_cmp_mag (a, b) != MP_LT) { - /* Copy the sign from the first */ - c->sign = sa; - /* The first has a larger or equal magnitude */ - res = s_mp_sub (a, b, c); - } else { - /* The result has the *opposite* sign from */ - /* the first number. */ - c->sign = (sa == MP_ZPOS) ? MP_NEG : MP_ZPOS; - /* The second has a larger magnitude */ - res = s_mp_sub (b, a, c); - } - } - return res; -} - - -/* determines if reduce_2k_l can be used */ -int mp_reduce_is_2k_l(mp_int *a) -{ - int ix, iy; - - if (a->used == 0) { - return MP_NO; - } else if (a->used == 1) { - return MP_YES; - } else if (a->used > 1) { - /* if more than half of the digits are -1 we're sold */ - for (iy = ix = 0; ix < a->used; ix++) { - if (a->dp[ix] == MP_MASK) { - ++iy; - } - } - return (iy >= (a->used/2)) ? MP_YES : MP_NO; - - } - return MP_NO; -} - - -/* determines if mp_reduce_2k can be used */ -int mp_reduce_is_2k(mp_int *a) -{ - int ix, iy, iw; - mp_digit iz; - - if (a->used == 0) { - return MP_NO; - } else if (a->used == 1) { - return MP_YES; - } else if (a->used > 1) { - iy = mp_count_bits(a); - iz = 1; - iw = 1; - - /* Test every bit from the second digit up, must be 1 */ - for (ix = DIGIT_BIT; ix < iy; ix++) { - if ((a->dp[iw] & iz) == 0) { - return MP_NO; - } - iz <<= 1; - if (iz > (mp_digit)MP_MASK) { - ++iw; - iz = 1; - } - } - } - return MP_YES; -} - - -/* determines if a number is a valid DR modulus */ -int mp_dr_is_modulus(mp_int *a) -{ - int ix; - - /* must be at least two digits */ - if (a->used < 2) { - return 0; - } - - /* must be of the form b**k - a [a <= b] so all - * but the first digit must be equal to -1 (mod b). - */ - for (ix = 1; ix < a->used; ix++) { - if (a->dp[ix] != MP_MASK) { - return 0; - } - } - return 1; -} - - -/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85 - * - * Uses a left-to-right k-ary sliding window to compute the modular - * exponentiation. - * The value of k changes based on the size of the exponent. - * - * Uses Montgomery or Diminished Radix reduction [whichever appropriate] - */ - -#ifdef MP_LOW_MEM - #define TAB_SIZE 32 -#else - #define TAB_SIZE 256 -#endif - -int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, - int redmode) -{ - mp_int M[TAB_SIZE], res; - mp_digit buf, mp; - int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; - - /* use a pointer to the reduction algorithm. This allows us to use - * one of many reduction algorithms without modding the guts of - * the code with if statements everywhere. - */ - int (*redux)(mp_int*,mp_int*,mp_digit); - - /* find window size */ - x = mp_count_bits (X); - if (x <= 7) { - winsize = 2; - } else if (x <= 36) { - winsize = 3; - } else if (x <= 140) { - winsize = 4; - } else if (x <= 450) { - winsize = 5; - } else if (x <= 1303) { - winsize = 6; - } else if (x <= 3529) { - winsize = 7; - } else { - winsize = 8; - } - -#ifdef MP_LOW_MEM - if (winsize > 5) { - winsize = 5; - } -#endif - - /* init M array */ - /* init first cell */ - if ((err = mp_init(&M[1])) != MP_OKAY) { - return err; - } - - /* now init the second half of the array */ - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - if ((err = mp_init(&M[x])) != MP_OKAY) { - for (y = 1<<(winsize-1); y < x; y++) { - mp_clear (&M[y]); - } - mp_clear(&M[1]); - return err; - } - } - - /* determine and setup reduction code */ - if (redmode == 0) { -#ifdef BN_MP_MONTGOMERY_SETUP_C - /* now setup montgomery */ - if ((err = mp_montgomery_setup (P, &mp)) != MP_OKAY) { - goto LBL_M; - } -#else - err = MP_VAL; - goto LBL_M; -#endif - - /* automatically pick the comba one if available (saves quite a few - calls/ifs) */ -#ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C - if (((P->used * 2 + 1) < MP_WARRAY) && - P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { - redux = fast_mp_montgomery_reduce; - } else -#endif - { -#ifdef BN_MP_MONTGOMERY_REDUCE_C - /* use slower baseline Montgomery method */ - redux = mp_montgomery_reduce; -#else - err = MP_VAL; - goto LBL_M; -#endif - } - } else if (redmode == 1) { -#if defined(BN_MP_DR_SETUP_C) && defined(BN_MP_DR_REDUCE_C) - /* setup DR reduction for moduli of the form B**k - b */ - mp_dr_setup(P, &mp); - redux = mp_dr_reduce; -#else - err = MP_VAL; - goto LBL_M; -#endif - } else { -#if defined(BN_MP_REDUCE_2K_SETUP_C) && defined(BN_MP_REDUCE_2K_C) - /* setup DR reduction for moduli of the form 2**k - b */ - if ((err = mp_reduce_2k_setup(P, &mp)) != MP_OKAY) { - goto LBL_M; - } - redux = mp_reduce_2k; -#else - err = MP_VAL; - goto LBL_M; -#endif - } - - /* setup result */ - if ((err = mp_init (&res)) != MP_OKAY) { - goto LBL_M; - } - - /* create M table - * - - * - * The first half of the table is not computed though accept for M[0] and M[1] - */ - - if (redmode == 0) { -#ifdef BN_MP_MONTGOMERY_CALC_NORMALIZATION_C - /* now we need R mod m */ - if ((err = mp_montgomery_calc_normalization (&res, P)) != MP_OKAY) { - goto LBL_RES; - } -#else - err = MP_VAL; - goto LBL_RES; -#endif - - /* now set M[1] to G * R mod m */ - if ((err = mp_mulmod (G, &res, P, &M[1])) != MP_OKAY) { - goto LBL_RES; - } - } else { - mp_set(&res, 1); - if ((err = mp_mod(G, P, &M[1])) != MP_OKAY) { - goto LBL_RES; - } - } - - /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times*/ - if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { - goto LBL_RES; - } - - for (x = 0; x < (winsize - 1); x++) { - if ((err = mp_sqr (&M[1 << (winsize - 1)], &M[1 << (winsize - 1)])) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&M[1 << (winsize - 1)], P, mp)) != MP_OKAY) { - goto LBL_RES; - } - } - - /* create upper table */ - for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { - if ((err = mp_mul (&M[x - 1], &M[1], &M[x])) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&M[x], P, mp)) != MP_OKAY) { - goto LBL_RES; - } - } - - /* set initial mode and bit cnt */ - mode = 0; - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - bitcpy = 0; - bitbuf = 0; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits so break */ - if (digidx == -1) { - break; - } - /* read next digit and reset bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int)DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (int)(buf >> (DIGIT_BIT - 1)) & 1; - buf <<= (mp_digit)1; - - /* if the bit is zero and mode == 0 then we ignore it - * These represent the leading zero bits before the first 1 bit - * in the exponent. Technically this opt is not required but it - * does lower the # of trivial squaring/reductions used - */ - if (mode == 0 && y == 0) { - continue; - } - - /* if the bit is zero and mode == 1 then we square */ - if (mode == 1 && y == 0) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - continue; - } - - /* else we add it to the window */ - bitbuf |= (y << (winsize - ++bitcpy)); - mode = 2; - - if (bitcpy == winsize) { - /* ok window is filled so square as required and multiply */ - /* square first */ - for (x = 0; x < winsize; x++) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - } - - /* then multiply */ - if ((err = mp_mul (&res, &M[bitbuf], &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - - /* empty window and reset */ - bitcpy = 0; - bitbuf = 0; - mode = 1; - } - } - - /* if bits remain then square/multiply */ - if (mode == 2 && bitcpy > 0) { - /* square then multiply if the bit is set */ - for (x = 0; x < bitcpy; x++) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - - /* get next bit of the window */ - bitbuf <<= 1; - if ((bitbuf & (1 << winsize)) != 0) { - /* then multiply */ - if ((err = mp_mul (&res, &M[1], &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - } - } - } - - if (redmode == 0) { - /* fixup result if Montgomery reduction is used - * recall that any value in a Montgomery system is - * actually multiplied by R mod n. So we have - * to reduce one more time to cancel out the factor - * of R. - */ - if ((err = redux(&res, P, mp)) != MP_OKAY) { - goto LBL_RES; - } - } - - /* swap res with Y */ - mp_exch (&res, Y); - err = MP_OKAY; -LBL_RES:mp_clear (&res); -LBL_M: - mp_clear(&M[1]); - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - mp_clear (&M[x]); - } - return err; -} - - -/* setups the montgomery reduction stuff */ -int -mp_montgomery_setup (mp_int * n, mp_digit * rho) -{ - mp_digit x, b; - -/* fast inversion mod 2**k - * - * Based on the fact that - * - * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) - * => 2*X*A - X*X*A*A = 1 - * => 2*(1) - (1) = 1 - */ - b = n->dp[0]; - - if ((b & 1) == 0) { - return MP_VAL; - } - - x = (((b + 2) & 4) << 1) + b; /* here x*a==1 mod 2**4 */ - x *= 2 - b * x; /* here x*a==1 mod 2**8 */ -#if !defined(MP_8BIT) - x *= 2 - b * x; /* here x*a==1 mod 2**16 */ -#endif -#if defined(MP_64BIT) || !(defined(MP_8BIT) || defined(MP_16BIT)) - x *= 2 - b * x; /* here x*a==1 mod 2**32 */ -#endif -#ifdef MP_64BIT - x *= 2 - b * x; /* here x*a==1 mod 2**64 */ -#endif - - /* rho = -1/m mod b */ - /* TAO, switched mp_word casts to mp_digit to shut up compiler */ - *rho = (((mp_digit)1 << ((mp_digit) DIGIT_BIT)) - x) & MP_MASK; - - return MP_OKAY; -} - - -/* computes xR**-1 == x (mod N) via Montgomery Reduction - * - * This is an optimized implementation of montgomery_reduce - * which uses the comba method to quickly calculate the columns of the - * reduction. - * - * Based on Algorithm 14.32 on pp.601 of HAC. -*/ -int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) -{ - int ix, res, olduse; -#ifdef CYASSL_SMALL_STACK - mp_word* W; /* uses dynamic memory and slower */ -#else - mp_word W[MP_WARRAY]; -#endif - - /* get old used count */ - olduse = x->used; - - /* grow a as required */ - if (x->alloc < n->used + 1) { - if ((res = mp_grow (x, n->used + 1)) != MP_OKAY) { - return res; - } - } - -#ifdef CYASSL_SMALL_STACK - W = (mp_word*)XMALLOC(sizeof(mp_word) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); - if (W == NULL) - return MP_MEM; -#endif - - /* first we have to get the digits of the input into - * an array of double precision words W[...] - */ - { - register mp_word *_W; - register mp_digit *tmpx; - - /* alias for the W[] array */ - _W = W; - - /* alias for the digits of x*/ - tmpx = x->dp; - - /* copy the digits of a into W[0..a->used-1] */ - for (ix = 0; ix < x->used; ix++) { - *_W++ = *tmpx++; - } - - /* zero the high words of W[a->used..m->used*2] */ - for (; ix < n->used * 2 + 1; ix++) { - *_W++ = 0; - } - } - - /* now we proceed to zero successive digits - * from the least significant upwards - */ - for (ix = 0; ix < n->used; ix++) { - /* mu = ai * m' mod b - * - * We avoid a double precision multiplication (which isn't required) - * by casting the value down to a mp_digit. Note this requires - * that W[ix-1] have the carry cleared (see after the inner loop) - */ - register mp_digit mu; - mu = (mp_digit) (((W[ix] & MP_MASK) * rho) & MP_MASK); - - /* a = a + mu * m * b**i - * - * This is computed in place and on the fly. The multiplication - * by b**i is handled by offseting which columns the results - * are added to. - * - * Note the comba method normally doesn't handle carries in the - * inner loop In this case we fix the carry from the previous - * column since the Montgomery reduction requires digits of the - * result (so far) [see above] to work. This is - * handled by fixing up one carry after the inner loop. The - * carry fixups are done in order so after these loops the - * first m->used words of W[] have the carries fixed - */ - { - register int iy; - register mp_digit *tmpn; - register mp_word *_W; - - /* alias for the digits of the modulus */ - tmpn = n->dp; - - /* Alias for the columns set by an offset of ix */ - _W = W + ix; - - /* inner loop */ - for (iy = 0; iy < n->used; iy++) { - *_W++ += ((mp_word)mu) * ((mp_word)*tmpn++); - } - } - - /* now fix carry for next digit, W[ix+1] */ - W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); - } - - /* now we have to propagate the carries and - * shift the words downward [all those least - * significant digits we zeroed]. - */ - { - register mp_digit *tmpx; - register mp_word *_W, *_W1; - - /* nox fix rest of carries */ - - /* alias for current word */ - _W1 = W + ix; - - /* alias for next word, where the carry goes */ - _W = W + ++ix; - - for (; ix <= n->used * 2 + 1; ix++) { - *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); - } - - /* copy out, A = A/b**n - * - * The result is A/b**n but instead of converting from an - * array of mp_word to mp_digit than calling mp_rshd - * we just copy them in the right order - */ - - /* alias for destination word */ - tmpx = x->dp; - - /* alias for shifted double precision result */ - _W = W + n->used; - - for (ix = 0; ix < n->used + 1; ix++) { - *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); - } - - /* zero oldused digits, if the input a was larger than - * m->used+1 we'll have to clear the digits - */ - for (; ix < olduse; ix++) { - *tmpx++ = 0; - } - } - - /* set the max used and clamp */ - x->used = n->used + 1; - mp_clamp (x); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, 0, DYNAMIC_TYPE_BIGINT); -#endif - - /* if A >= m then A = A - m */ - if (mp_cmp_mag (x, n) != MP_LT) { - return s_mp_sub (x, n, x); - } - return MP_OKAY; -} - - -/* computes xR**-1 == x (mod N) via Montgomery Reduction */ -int -mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) -{ - int ix, res, digs; - mp_digit mu; - - /* can the fast reduction [comba] method be used? - * - * Note that unlike in mul you're safely allowed *less* - * than the available columns [255 per default] since carries - * are fixed up in the inner loop. - */ - digs = n->used * 2 + 1; - if ((digs < MP_WARRAY) && - n->used < - (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { - return fast_mp_montgomery_reduce (x, n, rho); - } - - /* grow the input as required */ - if (x->alloc < digs) { - if ((res = mp_grow (x, digs)) != MP_OKAY) { - return res; - } - } - x->used = digs; - - for (ix = 0; ix < n->used; ix++) { - /* mu = ai * rho mod b - * - * The value of rho must be precalculated via - * montgomery_setup() such that - * it equals -1/n0 mod b this allows the - * following inner loop to reduce the - * input one digit at a time - */ - mu = (mp_digit) (((mp_word)x->dp[ix]) * ((mp_word)rho) & MP_MASK); - - /* a = a + mu * m * b**i */ - { - register int iy; - register mp_digit *tmpn, *tmpx, u; - register mp_word r; - - /* alias for digits of the modulus */ - tmpn = n->dp; - - /* alias for the digits of x [the input] */ - tmpx = x->dp + ix; - - /* set the carry to zero */ - u = 0; - - /* Multiply and add in place */ - for (iy = 0; iy < n->used; iy++) { - /* compute product and sum */ - r = ((mp_word)mu) * ((mp_word)*tmpn++) + - ((mp_word) u) + ((mp_word) * tmpx); - - /* get carry */ - u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); - - /* fix digit */ - *tmpx++ = (mp_digit)(r & ((mp_word) MP_MASK)); - } - /* At this point the ix'th digit of x should be zero */ - - - /* propagate carries upwards as required*/ - while (u) { - *tmpx += u; - u = *tmpx >> DIGIT_BIT; - *tmpx++ &= MP_MASK; - } - } - } - - /* at this point the n.used'th least - * significant digits of x are all zero - * which means we can shift x to the - * right by n.used digits and the - * residue is unchanged. - */ - - /* x = x/b**n.used */ - mp_clamp(x); - mp_rshd (x, n->used); - - /* if x >= n then x = x - n */ - if (mp_cmp_mag (x, n) != MP_LT) { - return s_mp_sub (x, n, x); - } - - return MP_OKAY; -} - - -/* determines the setup value */ -void mp_dr_setup(mp_int *a, mp_digit *d) -{ - /* the casts are required if DIGIT_BIT is one less than - * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] - */ - *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - - ((mp_word)a->dp[0])); -} - - -/* reduce "x" in place modulo "n" using the Diminished Radix algorithm. - * - * Based on algorithm from the paper - * - * "Generating Efficient Primes for Discrete Log Cryptosystems" - * Chae Hoon Lim, Pil Joong Lee, - * POSTECH Information Research Laboratories - * - * The modulus must be of a special format [see manual] - * - * Has been modified to use algorithm 7.10 from the LTM book instead - * - * Input x must be in the range 0 <= x <= (n-1)**2 - */ -int -mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k) -{ - int err, i, m; - mp_word r; - mp_digit mu, *tmpx1, *tmpx2; - - /* m = digits in modulus */ - m = n->used; - - /* ensure that "x" has at least 2m digits */ - if (x->alloc < m + m) { - if ((err = mp_grow (x, m + m)) != MP_OKAY) { - return err; - } - } - -/* top of loop, this is where the code resumes if - * another reduction pass is required. - */ -top: - /* aliases for digits */ - /* alias for lower half of x */ - tmpx1 = x->dp; - - /* alias for upper half of x, or x/B**m */ - tmpx2 = x->dp + m; - - /* set carry to zero */ - mu = 0; - - /* compute (x mod B**m) + k * [x/B**m] inline and inplace */ - for (i = 0; i < m; i++) { - r = ((mp_word)*tmpx2++) * ((mp_word)k) + *tmpx1 + mu; - *tmpx1++ = (mp_digit)(r & MP_MASK); - mu = (mp_digit)(r >> ((mp_word)DIGIT_BIT)); - } - - /* set final carry */ - *tmpx1++ = mu; - - /* zero words above m */ - for (i = m + 1; i < x->used; i++) { - *tmpx1++ = 0; - } - - /* clamp, sub and return */ - mp_clamp (x); - - /* if x >= n then subtract and reduce again - * Each successive "recursion" makes the input smaller and smaller. - */ - if (mp_cmp_mag (x, n) != MP_LT) { - s_mp_sub(x, n, x); - goto top; - } - return MP_OKAY; -} - - -/* reduces a modulo n where n is of the form 2**p - d */ -int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d) -{ - mp_int q; - int p, res; - - if ((res = mp_init(&q)) != MP_OKAY) { - return res; - } - - p = mp_count_bits(n); -top: - /* q = a/2**p, a = a mod 2**p */ - if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { - goto ERR; - } - - if (d != 1) { - /* q = q * d */ - if ((res = mp_mul_d(&q, d, &q)) != MP_OKAY) { - goto ERR; - } - } - - /* a = a + q */ - if ((res = s_mp_add(a, &q, a)) != MP_OKAY) { - goto ERR; - } - - if (mp_cmp_mag(a, n) != MP_LT) { - s_mp_sub(a, n, a); - goto top; - } - -ERR: - mp_clear(&q); - return res; -} - - -/* determines the setup value */ -int mp_reduce_2k_setup(mp_int *a, mp_digit *d) -{ - int res, p; - mp_int tmp; - - if ((res = mp_init(&tmp)) != MP_OKAY) { - return res; - } - - p = mp_count_bits(a); - if ((res = mp_2expt(&tmp, p)) != MP_OKAY) { - mp_clear(&tmp); - return res; - } - - if ((res = s_mp_sub(&tmp, a, &tmp)) != MP_OKAY) { - mp_clear(&tmp); - return res; - } - - *d = tmp.dp[0]; - mp_clear(&tmp); - return MP_OKAY; -} - - -/* computes a = 2**b - * - * Simple algorithm which zeroes the int, grows it then just sets one bit - * as required. - */ -int -mp_2expt (mp_int * a, int b) -{ - int res; - - /* zero a as per default */ - mp_zero (a); - - /* grow a to accomodate the single bit */ - if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) { - return res; - } - - /* set the used count of where the bit will go */ - a->used = b / DIGIT_BIT + 1; - - /* put the single bit in its place */ - a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); - - return MP_OKAY; -} - - -/* multiply by a digit */ -int -mp_mul_d (mp_int * a, mp_digit b, mp_int * c) -{ - mp_digit u, *tmpa, *tmpc; - mp_word r; - int ix, res, olduse; - - /* make sure c is big enough to hold a*b */ - if (c->alloc < a->used + 1) { - if ((res = mp_grow (c, a->used + 1)) != MP_OKAY) { - return res; - } - } - - /* get the original destinations used count */ - olduse = c->used; - - /* set the sign */ - c->sign = a->sign; - - /* alias for a->dp [source] */ - tmpa = a->dp; - - /* alias for c->dp [dest] */ - tmpc = c->dp; - - /* zero carry */ - u = 0; - - /* compute columns */ - for (ix = 0; ix < a->used; ix++) { - /* compute product and carry sum for this term */ - r = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b); - - /* mask off higher bits to get a single digit */ - *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK)); - - /* send carry into next iteration */ - u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); - } - - /* store final carry [if any] and increment ix offset */ - *tmpc++ = u; - ++ix; - - /* now zero digits above the top */ - while (ix++ < olduse) { - *tmpc++ = 0; - } - - /* set used count */ - c->used = a->used + 1; - mp_clamp(c); - - return MP_OKAY; -} - - -/* d = a * b (mod c) */ -int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) -{ - int res; - mp_int t; - - if ((res = mp_init (&t)) != MP_OKAY) { - return res; - } - - if ((res = mp_mul (a, b, &t)) != MP_OKAY) { - mp_clear (&t); - return res; - } - res = mp_mod (&t, c, d); - mp_clear (&t); - return res; -} - - -/* computes b = a*a */ -int -mp_sqr (mp_int * a, mp_int * b) -{ - int res; - - { -#ifdef BN_FAST_S_MP_SQR_C - /* can we use the fast comba multiplier? */ - if ((a->used * 2 + 1) < MP_WARRAY && - a->used < - (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { - res = fast_s_mp_sqr (a, b); - } else -#endif -#ifdef BN_S_MP_SQR_C - res = s_mp_sqr (a, b); -#else - res = MP_VAL; -#endif - } - b->sign = MP_ZPOS; - return res; -} - - -/* high level multiplication (handles sign) */ -int mp_mul (mp_int * a, mp_int * b, mp_int * c) -{ - int res, neg; - neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG; - - { - /* can we use the fast multiplier? - * - * The fast multiplier can be used if the output will - * have less than MP_WARRAY digits and the number of - * digits won't affect carry propagation - */ - int digs = a->used + b->used + 1; - -#ifdef BN_FAST_S_MP_MUL_DIGS_C - if ((digs < MP_WARRAY) && - MIN(a->used, b->used) <= - (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { - res = fast_s_mp_mul_digs (a, b, c, digs); - } else -#endif -#ifdef BN_S_MP_MUL_DIGS_C - res = s_mp_mul (a, b, c); /* uses s_mp_mul_digs */ -#else - res = MP_VAL; -#endif - - } - c->sign = (c->used > 0) ? neg : MP_ZPOS; - return res; -} - - -/* b = a*2 */ -int mp_mul_2(mp_int * a, mp_int * b) -{ - int x, res, oldused; - - /* grow to accomodate result */ - if (b->alloc < a->used + 1) { - if ((res = mp_grow (b, a->used + 1)) != MP_OKAY) { - return res; - } - } - - oldused = b->used; - b->used = a->used; - - { - register mp_digit r, rr, *tmpa, *tmpb; - - /* alias for source */ - tmpa = a->dp; - - /* alias for dest */ - tmpb = b->dp; - - /* carry */ - r = 0; - for (x = 0; x < a->used; x++) { - - /* get what will be the *next* carry bit from the - * MSB of the current digit - */ - rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1)); - - /* now shift up this digit, add in the carry [from the previous] */ - *tmpb++ = ((*tmpa++ << ((mp_digit)1)) | r) & MP_MASK; - - /* copy the carry that would be from the source - * digit into the next iteration - */ - r = rr; - } - - /* new leading digit? */ - if (r != 0) { - /* add a MSB which is always 1 at this point */ - *tmpb = 1; - ++(b->used); - } - - /* now zero any excess digits on the destination - * that we didn't write to - */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; - return MP_OKAY; -} - - -/* divide by three (based on routine from MPI and the GMP manual) */ -int -mp_div_3 (mp_int * a, mp_int *c, mp_digit * d) -{ - mp_int q; - mp_word w, t; - mp_digit b; - int res, ix; - - /* b = 2**DIGIT_BIT / 3 */ - b = (((mp_word)1) << ((mp_word)DIGIT_BIT)) / ((mp_word)3); - - if ((res = mp_init_size(&q, a->used)) != MP_OKAY) { - return res; - } - - q.used = a->used; - q.sign = a->sign; - w = 0; - for (ix = a->used - 1; ix >= 0; ix--) { - w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); - - if (w >= 3) { - /* multiply w by [1/3] */ - t = (w * ((mp_word)b)) >> ((mp_word)DIGIT_BIT); - - /* now subtract 3 * [w/3] from w, to get the remainder */ - w -= t+t+t; - - /* fixup the remainder as required since - * the optimization is not exact. - */ - while (w >= 3) { - t += 1; - w -= 3; - } - } else { - t = 0; - } - q.dp[ix] = (mp_digit)t; - } - - /* [optional] store the remainder */ - if (d != NULL) { - *d = (mp_digit)w; - } - - /* [optional] store the quotient */ - if (c != NULL) { - mp_clamp(&q); - mp_exch(&q, c); - } - mp_clear(&q); - - return res; -} - - -/* init an mp_init for a given size */ -int mp_init_size (mp_int * a, int size) -{ - int x; - - /* pad size so there are always extra digits */ - size += (MP_PREC * 2) - (size % MP_PREC); - - /* alloc mem */ - a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size, 0, - DYNAMIC_TYPE_BIGINT); - if (a->dp == NULL) { - return MP_MEM; - } - - /* set the members */ - a->used = 0; - a->alloc = size; - a->sign = MP_ZPOS; - - /* zero the digits */ - for (x = 0; x < size; x++) { - a->dp[x] = 0; - } - - return MP_OKAY; -} - - -/* the jist of squaring... - * you do like mult except the offset of the tmpx [one that - * starts closer to zero] can't equal the offset of tmpy. - * So basically you set up iy like before then you min it with - * (ty-tx) so that it never happens. You double all those - * you add in the inner loop - -After that loop you do the squares and add them in. -*/ - -int fast_s_mp_sqr (mp_int * a, mp_int * b) -{ - int olduse, res, pa, ix, iz; -#ifdef CYASSL_SMALL_STACK - mp_digit* W; /* uses dynamic memory and slower */ -#else - mp_digit W[MP_WARRAY]; -#endif - mp_digit *tmpx; - mp_word W1; - - /* grow the destination as required */ - pa = a->used + a->used; - if (b->alloc < pa) { - if ((res = mp_grow (b, pa)) != MP_OKAY) { - return res; - } - } - - if (pa > MP_WARRAY) - return MP_RANGE; /* TAO range check */ - -#ifdef CYASSL_SMALL_STACK - W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); - if (W == NULL) - return MP_MEM; -#endif - - /* number of output digits to produce */ - W1 = 0; - for (ix = 0; ix < pa; ix++) { - int tx, ty, iy; - mp_word _W; - mp_digit *tmpy; - - /* clear counter */ - _W = 0; - - /* get offsets into the two bignums */ - ty = MIN(a->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = a->dp + ty; - - /* this is the number of times the loop will iterrate, essentially - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = MIN(a->used-tx, ty+1); - - /* now for squaring tx can never equal ty - * we halve the distance since they approach at a rate of 2x - * and we have to round because odd cases need to be executed - */ - iy = MIN(iy, (ty-tx+1)>>1); - - /* execute loop */ - for (iz = 0; iz < iy; iz++) { - _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); - } - - /* double the inner product and add carry */ - _W = _W + _W + W1; - - /* even columns have the square term in them */ - if ((ix&1) == 0) { - _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); - } - - /* store it */ - W[ix] = (mp_digit)(_W & MP_MASK); - - /* make next carry */ - W1 = _W >> ((mp_word)DIGIT_BIT); - } - - /* setup dest */ - olduse = b->used; - b->used = a->used+a->used; - - { - mp_digit *tmpb; - tmpb = b->dp; - for (ix = 0; ix < pa; ix++) { - *tmpb++ = W[ix] & MP_MASK; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpb++ = 0; - } - } - mp_clamp (b); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, 0, DYNAMIC_TYPE_BIGINT); -#endif - - return MP_OKAY; -} - - -/* Fast (comba) multiplier - * - * This is the fast column-array [comba] multiplier. It is - * designed to compute the columns of the product first - * then handle the carries afterwards. This has the effect - * of making the nested loops that compute the columns very - * simple and schedulable on super-scalar processors. - * - * This has been modified to produce a variable number of - * digits of output so if say only a half-product is required - * you don't have to compute the upper half (a feature - * required for fast Barrett reduction). - * - * Based on Algorithm 14.12 on pp.595 of HAC. - * - */ -int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) -{ - int olduse, res, pa, ix, iz; -#ifdef CYASSL_SMALL_STACK - mp_digit* W; /* uses dynamic memory and slower */ -#else - mp_digit W[MP_WARRAY]; -#endif - register mp_word _W; - - /* grow the destination as required */ - if (c->alloc < digs) { - if ((res = mp_grow (c, digs)) != MP_OKAY) { - return res; - } - } - - /* number of output digits to produce */ - pa = MIN(digs, a->used + b->used); - if (pa > MP_WARRAY) - return MP_RANGE; /* TAO range check */ - -#ifdef CYASSL_SMALL_STACK - W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); - if (W == NULL) - return MP_MEM; -#endif - - /* clear the carry */ - _W = 0; - for (ix = 0; ix < pa; ix++) { - int tx, ty; - int iy; - mp_digit *tmpx, *tmpy; - - /* get offsets into the two bignums */ - ty = MIN(b->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = b->dp + ty; - - /* this is the number of times the loop will iterrate, essentially - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = MIN(a->used-tx, ty+1); - - /* execute loop */ - for (iz = 0; iz < iy; ++iz) { - _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); - - } - - /* store term */ - W[ix] = ((mp_digit)_W) & MP_MASK; - - /* make next carry */ - _W = _W >> ((mp_word)DIGIT_BIT); - } - - /* setup dest */ - olduse = c->used; - c->used = pa; - - { - register mp_digit *tmpc; - tmpc = c->dp; - for (ix = 0; ix < pa+1; ix++) { - /* now extract the previous digit [below the carry] */ - *tmpc++ = W[ix]; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpc++ = 0; - } - } - mp_clamp (c); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, 0, DYNAMIC_TYPE_BIGINT); -#endif - - return MP_OKAY; -} - - -/* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */ -int s_mp_sqr (mp_int * a, mp_int * b) -{ - mp_int t; - int res, ix, iy, pa; - mp_word r; - mp_digit u, tmpx, *tmpt; - - pa = a->used; - if ((res = mp_init_size (&t, 2*pa + 1)) != MP_OKAY) { - return res; - } - - /* default used is maximum possible size */ - t.used = 2*pa + 1; - - for (ix = 0; ix < pa; ix++) { - /* first calculate the digit at 2*ix */ - /* calculate double precision result */ - r = ((mp_word) t.dp[2*ix]) + - ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); - - /* store lower part in result */ - t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); - - /* get the carry */ - u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); - - /* left hand side of A[ix] * A[iy] */ - tmpx = a->dp[ix]; - - /* alias for where to store the results */ - tmpt = t.dp + (2*ix + 1); - - for (iy = ix + 1; iy < pa; iy++) { - /* first calculate the product */ - r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); - - /* now calculate the double precision result, note we use - * addition instead of *2 since it's easier to optimize - */ - r = ((mp_word) *tmpt) + r + r + ((mp_word) u); - - /* store lower part */ - *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); - - /* get carry */ - u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); - } - /* propagate upwards */ - while (u != ((mp_digit) 0)) { - r = ((mp_word) *tmpt) + ((mp_word) u); - *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); - u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); - } - } - - mp_clamp (&t); - mp_exch (&t, b); - mp_clear (&t); - return MP_OKAY; -} - - -/* multiplies |a| * |b| and only computes upto digs digits of result - * HAC pp. 595, Algorithm 14.12 Modified so you can control how - * many digits of output are created. - */ -int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) -{ - mp_int t; - int res, pa, pb, ix, iy; - mp_digit u; - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - - /* can we use the fast multiplier? */ - if (((digs) < MP_WARRAY) && - MIN (a->used, b->used) < - (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { - return fast_s_mp_mul_digs (a, b, c, digs); - } - - if ((res = mp_init_size (&t, digs)) != MP_OKAY) { - return res; - } - t.used = digs; - - /* compute the digits of the product directly */ - pa = a->used; - for (ix = 0; ix < pa; ix++) { - /* set the carry to zero */ - u = 0; - - /* limit ourselves to making digs digits of output */ - pb = MIN (b->used, digs - ix); - - /* setup some aliases */ - /* copy of the digit from a used within the nested loop */ - tmpx = a->dp[ix]; - - /* an alias for the destination shifted ix places */ - tmpt = t.dp + ix; - - /* an alias for the digits of b */ - tmpy = b->dp; - - /* compute the columns of the output and propagate the carry */ - for (iy = 0; iy < pb; iy++) { - /* compute the column as a mp_word */ - r = ((mp_word)*tmpt) + - ((mp_word)tmpx) * ((mp_word)*tmpy++) + - ((mp_word) u); - - /* the new column is the lower part of the result */ - *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); - - /* get the carry word from the result */ - u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); - } - /* set carry if it is placed below digs */ - if (ix + iy < digs) { - *tmpt = u; - } - } - - mp_clamp (&t); - mp_exch (&t, c); - - mp_clear (&t); - return MP_OKAY; -} - - -/* - * shifts with subtractions when the result is greater than b. - * - * The method is slightly modified to shift B unconditionally upto just under - * the leading bit of b. This saves alot of multiple precision shifting. - */ -int mp_montgomery_calc_normalization (mp_int * a, mp_int * b) -{ - int x, bits, res; - - /* how many bits of last digit does b use */ - bits = mp_count_bits (b) % DIGIT_BIT; - - if (b->used > 1) { - if ((res = mp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) { - return res; - } - } else { - mp_set(a, 1); - bits = 1; - } - - - /* now compute C = A * B mod b */ - for (x = bits - 1; x < (int)DIGIT_BIT; x++) { - if ((res = mp_mul_2 (a, a)) != MP_OKAY) { - return res; - } - if (mp_cmp_mag (a, b) != MP_LT) { - if ((res = s_mp_sub (a, b, a)) != MP_OKAY) { - return res; - } - } - } - - return MP_OKAY; -} - - -#ifdef MP_LOW_MEM - #define TAB_SIZE 32 -#else - #define TAB_SIZE 256 -#endif - -int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) -{ - mp_int M[TAB_SIZE], res, mu; - mp_digit buf; - int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; - int (*redux)(mp_int*,mp_int*,mp_int*); - - /* find window size */ - x = mp_count_bits (X); - if (x <= 7) { - winsize = 2; - } else if (x <= 36) { - winsize = 3; - } else if (x <= 140) { - winsize = 4; - } else if (x <= 450) { - winsize = 5; - } else if (x <= 1303) { - winsize = 6; - } else if (x <= 3529) { - winsize = 7; - } else { - winsize = 8; - } - -#ifdef MP_LOW_MEM - if (winsize > 5) { - winsize = 5; - } -#endif - - /* init M array */ - /* init first cell */ - if ((err = mp_init(&M[1])) != MP_OKAY) { - return err; - } - - /* now init the second half of the array */ - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - if ((err = mp_init(&M[x])) != MP_OKAY) { - for (y = 1<<(winsize-1); y < x; y++) { - mp_clear (&M[y]); - } - mp_clear(&M[1]); - return err; - } - } - - /* create mu, used for Barrett reduction */ - if ((err = mp_init (&mu)) != MP_OKAY) { - goto LBL_M; - } - - if (redmode == 0) { - if ((err = mp_reduce_setup (&mu, P)) != MP_OKAY) { - goto LBL_MU; - } - redux = mp_reduce; - } else { - if ((err = mp_reduce_2k_setup_l (P, &mu)) != MP_OKAY) { - goto LBL_MU; - } - redux = mp_reduce_2k_l; - } - - /* create M table - * - * The M table contains powers of the base, - * e.g. M[x] = G**x mod P - * - * The first half of the table is not - * computed though accept for M[0] and M[1] - */ - if ((err = mp_mod (G, P, &M[1])) != MP_OKAY) { - goto LBL_MU; - } - - /* compute the value at M[1<<(winsize-1)] by squaring - * M[1] (winsize-1) times - */ - if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { - goto LBL_MU; - } - - for (x = 0; x < (winsize - 1); x++) { - /* square it */ - if ((err = mp_sqr (&M[1 << (winsize - 1)], - &M[1 << (winsize - 1)])) != MP_OKAY) { - goto LBL_MU; - } - - /* reduce modulo P */ - if ((err = redux (&M[1 << (winsize - 1)], P, &mu)) != MP_OKAY) { - goto LBL_MU; - } - } - - /* create upper table, that is M[x] = M[x-1] * M[1] (mod P) - * for x = (2**(winsize - 1) + 1) to (2**winsize - 1) - */ - for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { - if ((err = mp_mul (&M[x - 1], &M[1], &M[x])) != MP_OKAY) { - goto LBL_MU; - } - if ((err = redux (&M[x], P, &mu)) != MP_OKAY) { - goto LBL_MU; - } - } - - /* setup result */ - if ((err = mp_init (&res)) != MP_OKAY) { - goto LBL_MU; - } - mp_set (&res, 1); - - /* set initial mode and bit cnt */ - mode = 0; - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - bitcpy = 0; - bitbuf = 0; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits */ - if (digidx == -1) { - break; - } - /* read next digit and reset the bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int) DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (int)(buf >> (mp_digit)(DIGIT_BIT - 1)) & 1; - buf <<= (mp_digit)1; - - /* if the bit is zero and mode == 0 then we ignore it - * These represent the leading zero bits before the first 1 bit - * in the exponent. Technically this opt is not required but it - * does lower the # of trivial squaring/reductions used - */ - if (mode == 0 && y == 0) { - continue; - } - - /* if the bit is zero and mode == 1 then we square */ - if (mode == 1 && y == 0) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != MP_OKAY) { - goto LBL_RES; - } - continue; - } - - /* else we add it to the window */ - bitbuf |= (y << (winsize - ++bitcpy)); - mode = 2; - - if (bitcpy == winsize) { - /* ok window is filled so square as required and multiply */ - /* square first */ - for (x = 0; x < winsize; x++) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != MP_OKAY) { - goto LBL_RES; - } - } - - /* then multiply */ - if ((err = mp_mul (&res, &M[bitbuf], &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != MP_OKAY) { - goto LBL_RES; - } - - /* empty window and reset */ - bitcpy = 0; - bitbuf = 0; - mode = 1; - } - } - - /* if bits remain then square/multiply */ - if (mode == 2 && bitcpy > 0) { - /* square then multiply if the bit is set */ - for (x = 0; x < bitcpy; x++) { - if ((err = mp_sqr (&res, &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != MP_OKAY) { - goto LBL_RES; - } - - bitbuf <<= 1; - if ((bitbuf & (1 << winsize)) != 0) { - /* then multiply */ - if ((err = mp_mul (&res, &M[1], &res)) != MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != MP_OKAY) { - goto LBL_RES; - } - } - } - } - - mp_exch (&res, Y); - err = MP_OKAY; -LBL_RES:mp_clear (&res); -LBL_MU:mp_clear (&mu); -LBL_M: - mp_clear(&M[1]); - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - mp_clear (&M[x]); - } - return err; -} - - -/* pre-calculate the value required for Barrett reduction - * For a given modulus "b" it calulates the value required in "a" - */ -int mp_reduce_setup (mp_int * a, mp_int * b) -{ - int res; - - if ((res = mp_2expt (a, b->used * 2 * DIGIT_BIT)) != MP_OKAY) { - return res; - } - return mp_div (a, b, a, NULL); -} - - -/* reduces x mod m, assumes 0 < x < m**2, mu is - * precomputed via mp_reduce_setup. - * From HAC pp.604 Algorithm 14.42 - */ -int mp_reduce (mp_int * x, mp_int * m, mp_int * mu) -{ - mp_int q; - int res, um = m->used; - - /* q = x */ - if ((res = mp_init_copy (&q, x)) != MP_OKAY) { - return res; - } - - /* q1 = x / b**(k-1) */ - mp_rshd (&q, um - 1); - - /* according to HAC this optimization is ok */ - if (((mp_word) um) > (((mp_digit)1) << (DIGIT_BIT - 1))) { - if ((res = mp_mul (&q, mu, &q)) != MP_OKAY) { - goto CLEANUP; - } - } else { -#ifdef BN_S_MP_MUL_HIGH_DIGS_C - if ((res = s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { - goto CLEANUP; - } -#elif defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) - if ((res = fast_s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { - goto CLEANUP; - } -#else - { - res = MP_VAL; - goto CLEANUP; - } -#endif - } - - /* q3 = q2 / b**(k+1) */ - mp_rshd (&q, um + 1); - - /* x = x mod b**(k+1), quick (no division) */ - if ((res = mp_mod_2d (x, DIGIT_BIT * (um + 1), x)) != MP_OKAY) { - goto CLEANUP; - } - - /* q = q * m mod b**(k+1), quick (no division) */ - if ((res = s_mp_mul_digs (&q, m, &q, um + 1)) != MP_OKAY) { - goto CLEANUP; - } - - /* x = x - q */ - if ((res = mp_sub (x, &q, x)) != MP_OKAY) { - goto CLEANUP; - } - - /* If x < 0, add b**(k+1) to it */ - if (mp_cmp_d (x, 0) == MP_LT) { - mp_set (&q, 1); - if ((res = mp_lshd (&q, um + 1)) != MP_OKAY) - goto CLEANUP; - if ((res = mp_add (x, &q, x)) != MP_OKAY) - goto CLEANUP; - } - - /* Back off if it's too big */ - while (mp_cmp (x, m) != MP_LT) { - if ((res = s_mp_sub (x, m, x)) != MP_OKAY) { - goto CLEANUP; - } - } - -CLEANUP: - mp_clear (&q); - - return res; -} - - -/* reduces a modulo n where n is of the form 2**p - d - This differs from reduce_2k since "d" can be larger - than a single digit. -*/ -int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d) -{ - mp_int q; - int p, res; - - if ((res = mp_init(&q)) != MP_OKAY) { - return res; - } - - p = mp_count_bits(n); -top: - /* q = a/2**p, a = a mod 2**p */ - if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { - goto ERR; - } - - /* q = q * d */ - if ((res = mp_mul(&q, d, &q)) != MP_OKAY) { - goto ERR; - } - - /* a = a + q */ - if ((res = s_mp_add(a, &q, a)) != MP_OKAY) { - goto ERR; - } - - if (mp_cmp_mag(a, n) != MP_LT) { - s_mp_sub(a, n, a); - goto top; - } - -ERR: - mp_clear(&q); - return res; -} - - -/* determines the setup value */ -int mp_reduce_2k_setup_l(mp_int *a, mp_int *d) -{ - int res; - mp_int tmp; - - if ((res = mp_init(&tmp)) != MP_OKAY) { - return res; - } - - if ((res = mp_2expt(&tmp, mp_count_bits(a))) != MP_OKAY) { - goto ERR; - } - - if ((res = s_mp_sub(&tmp, a, d)) != MP_OKAY) { - goto ERR; - } - -ERR: - mp_clear(&tmp); - return res; -} - - -/* multiplies |a| * |b| and does not compute the lower digs digits - * [meant to get the higher part of the product] - */ -int -s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) -{ - mp_int t; - int res, pa, pb, ix, iy; - mp_digit u; - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - - /* can we use the fast multiplier? */ -#ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C - if (((a->used + b->used + 1) < MP_WARRAY) - && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { - return fast_s_mp_mul_high_digs (a, b, c, digs); - } -#endif - - if ((res = mp_init_size (&t, a->used + b->used + 1)) != MP_OKAY) { - return res; - } - t.used = a->used + b->used + 1; - - pa = a->used; - pb = b->used; - for (ix = 0; ix < pa; ix++) { - /* clear the carry */ - u = 0; - - /* left hand side of A[ix] * B[iy] */ - tmpx = a->dp[ix]; - - /* alias to the address of where the digits will be stored */ - tmpt = &(t.dp[digs]); - - /* alias for where to read the right hand side from */ - tmpy = b->dp + (digs - ix); - - for (iy = digs - ix; iy < pb; iy++) { - /* calculate the double precision result */ - r = ((mp_word)*tmpt) + - ((mp_word)tmpx) * ((mp_word)*tmpy++) + - ((mp_word) u); - - /* get the lower part */ - *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); - - /* carry the carry */ - u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); - } - *tmpt = u; - } - mp_clamp (&t); - mp_exch (&t, c); - mp_clear (&t); - return MP_OKAY; -} - - -/* this is a modified version of fast_s_mul_digs that only produces - * output digits *above* digs. See the comments for fast_s_mul_digs - * to see how it works. - * - * This is used in the Barrett reduction since for one of the multiplications - * only the higher digits were needed. This essentially halves the work. - * - * Based on Algorithm 14.12 on pp.595 of HAC. - */ -int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) -{ - int olduse, res, pa, ix, iz; -#ifdef CYASSL_SMALL_STACK - mp_digit* W; /* uses dynamic memory and slower */ -#else - mp_digit W[MP_WARRAY]; -#endif - mp_word _W; - - /* grow the destination as required */ - pa = a->used + b->used; - if (c->alloc < pa) { - if ((res = mp_grow (c, pa)) != MP_OKAY) { - return res; - } - } - - if (pa > MP_WARRAY) - return MP_RANGE; /* TAO range check */ - -#ifdef CYASSL_SMALL_STACK - W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, 0, DYNAMIC_TYPE_BIGINT); - if (W == NULL) - return MP_MEM; -#endif - - /* number of output digits to produce */ - pa = a->used + b->used; - _W = 0; - for (ix = digs; ix < pa; ix++) { - int tx, ty, iy; - mp_digit *tmpx, *tmpy; - - /* get offsets into the two bignums */ - ty = MIN(b->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = b->dp + ty; - - /* this is the number of times the loop will iterrate, essentially its - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = MIN(a->used-tx, ty+1); - - /* execute loop */ - for (iz = 0; iz < iy; iz++) { - _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); - } - - /* store term */ - W[ix] = ((mp_digit)_W) & MP_MASK; - - /* make next carry */ - _W = _W >> ((mp_word)DIGIT_BIT); - } - - /* setup dest */ - olduse = c->used; - c->used = pa; - - { - register mp_digit *tmpc; - - tmpc = c->dp + digs; - for (ix = digs; ix <= pa; ix++) { - /* now extract the previous digit [below the carry] */ - *tmpc++ = W[ix]; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpc++ = 0; - } - } - mp_clamp (c); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, 0, DYNAMIC_TYPE_BIGINT); -#endif - - return MP_OKAY; -} - - -/* set a 32-bit const */ -int mp_set_int (mp_int * a, unsigned long b) -{ - int x, res; - - mp_zero (a); - - /* set four bits at a time */ - for (x = 0; x < 8; x++) { - /* shift the number up four bits */ - if ((res = mp_mul_2d (a, 4, a)) != MP_OKAY) { - return res; - } - - /* OR in the top four bits of the source */ - a->dp[0] |= (b >> 28) & 15; - - /* shift the source up to the next four bits */ - b <<= 4; - - /* ensure that digits are not clamped off */ - a->used += 1; - } - mp_clamp (a); - return MP_OKAY; -} - - -#if defined(CYASSL_KEY_GEN) || defined(HAVE_ECC) - -/* c = a * a (mod b) */ -int mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) -{ - int res; - mp_int t; - - if ((res = mp_init (&t)) != MP_OKAY) { - return res; - } - - if ((res = mp_sqr (a, &t)) != MP_OKAY) { - mp_clear (&t); - return res; - } - res = mp_mod (&t, b, c); - mp_clear (&t); - return res; -} - -#endif - - -#if defined(HAVE_ECC) || !defined(NO_PWDBASED) || defined(CYASSL_SNIFFER) || defined(CYASSL_HAVE_WOLFSCEP) - -/* single digit addition */ -int mp_add_d (mp_int* a, mp_digit b, mp_int* c) -{ - int res, ix, oldused; - mp_digit *tmpa, *tmpc, mu; - - /* grow c as required */ - if (c->alloc < a->used + 1) { - if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { - return res; - } - } - - /* if a is negative and |a| >= b, call c = |a| - b */ - if (a->sign == MP_NEG && (a->used > 1 || a->dp[0] >= b)) { - /* temporarily fix sign of a */ - a->sign = MP_ZPOS; - - /* c = |a| - b */ - res = mp_sub_d(a, b, c); - - /* fix sign */ - a->sign = c->sign = MP_NEG; - - /* clamp */ - mp_clamp(c); - - return res; - } - - /* old number of used digits in c */ - oldused = c->used; - - /* sign always positive */ - c->sign = MP_ZPOS; - - /* source alias */ - tmpa = a->dp; - - /* destination alias */ - tmpc = c->dp; - - /* if a is positive */ - if (a->sign == MP_ZPOS) { - /* add digit, after this we're propagating - * the carry. - */ - *tmpc = *tmpa++ + b; - mu = *tmpc >> DIGIT_BIT; - *tmpc++ &= MP_MASK; - - /* now handle rest of the digits */ - for (ix = 1; ix < a->used; ix++) { - *tmpc = *tmpa++ + mu; - mu = *tmpc >> DIGIT_BIT; - *tmpc++ &= MP_MASK; - } - /* set final carry */ - if (mu != 0 && ix < c->alloc) { - ix++; - *tmpc++ = mu; - } - - /* setup size */ - c->used = a->used + 1; - } else { - /* a was negative and |a| < b */ - c->used = 1; - - /* the result is a single digit */ - if (a->used == 1) { - *tmpc++ = b - a->dp[0]; - } else { - *tmpc++ = b; - } - - /* setup count so the clearing of oldused - * can fall through correctly - */ - ix = 1; - } - - /* now zero to oldused */ - while (ix++ < oldused) { - *tmpc++ = 0; - } - mp_clamp(c); - - return MP_OKAY; -} - - -/* single digit subtraction */ -int mp_sub_d (mp_int * a, mp_digit b, mp_int * c) -{ - mp_digit *tmpa, *tmpc, mu; - int res, ix, oldused; - - /* grow c as required */ - if (c->alloc < a->used + 1) { - if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { - return res; - } - } - - /* if a is negative just do an unsigned - * addition [with fudged signs] - */ - if (a->sign == MP_NEG) { - a->sign = MP_ZPOS; - res = mp_add_d(a, b, c); - a->sign = c->sign = MP_NEG; - - /* clamp */ - mp_clamp(c); - - return res; - } - - /* setup regs */ - oldused = c->used; - tmpa = a->dp; - tmpc = c->dp; - - /* if a <= b simply fix the single digit */ - if ((a->used == 1 && a->dp[0] <= b) || a->used == 0) { - if (a->used == 1) { - *tmpc++ = b - *tmpa; - } else { - *tmpc++ = b; - } - ix = 1; - - /* negative/1digit */ - c->sign = MP_NEG; - c->used = 1; - } else { - /* positive/size */ - c->sign = MP_ZPOS; - c->used = a->used; - - /* subtract first digit */ - *tmpc = *tmpa++ - b; - mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1); - *tmpc++ &= MP_MASK; - - /* handle rest of the digits */ - for (ix = 1; ix < a->used; ix++) { - *tmpc = *tmpa++ - mu; - mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1); - *tmpc++ &= MP_MASK; - } - } - - /* zero excess digits */ - while (ix++ < oldused) { - *tmpc++ = 0; - } - mp_clamp(c); - return MP_OKAY; -} - -#endif /* defined(HAVE_ECC) || !defined(NO_PWDBASED) */ - - -#ifdef CYASSL_KEY_GEN - -int mp_cnt_lsb(mp_int *a); - -static int s_is_power_of_two(mp_digit b, int *p) -{ - int x; - - /* fast return if no power of two */ - if ((b==0) || (b & (b-1))) { - return 0; - } - - for (x = 0; x < DIGIT_BIT; x++) { - if (b == (((mp_digit)1)<dp[0] & ((((mp_digit)1)<used)) != MP_OKAY) { - return res; - } - - q.used = a->used; - q.sign = a->sign; - w = 0; - for (ix = a->used - 1; ix >= 0; ix--) { - w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); - - if (w >= b) { - t = (mp_digit)(w / b); - w -= ((mp_word)t) * ((mp_word)b); - } else { - t = 0; - } - q.dp[ix] = (mp_digit)t; - } - - if (d != NULL) { - *d = (mp_digit)w; - } - - if (c != NULL) { - mp_clamp(&q); - mp_exch(&q, c); - } - mp_clear(&q); - - return res; -} - - -static int mp_mod_d (mp_int * a, mp_digit b, mp_digit * c) -{ - return mp_div_d(a, b, NULL, c); -} - - -const mp_digit ltm_prime_tab[] = { - 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, - 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, - 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, - 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, -#ifndef MP_8BIT - 0x0083, - 0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD, - 0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF, - 0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107, - 0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137, - - 0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167, - 0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199, - 0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9, - 0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7, - 0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239, - 0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265, - 0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293, - 0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF, - - 0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301, - 0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B, - 0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371, - 0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD, - 0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5, - 0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419, - 0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449, - 0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B, - - 0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7, - 0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503, - 0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529, - 0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F, - 0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3, - 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, - 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, - 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 -#endif -}; - - -/* Miller-Rabin test of "a" to the base of "b" as described in - * HAC pp. 139 Algorithm 4.24 - * - * Sets result to 0 if definitely composite or 1 if probably prime. - * Randomly the chance of error is no more than 1/4 and often - * very much lower. - */ -static int mp_prime_miller_rabin (mp_int * a, mp_int * b, int *result) -{ - mp_int n1, y, r; - int s, j, err; - - /* default */ - *result = MP_NO; - - /* ensure b > 1 */ - if (mp_cmp_d(b, 1) != MP_GT) { - return MP_VAL; - } - - /* get n1 = a - 1 */ - if ((err = mp_init_copy (&n1, a)) != MP_OKAY) { - return err; - } - if ((err = mp_sub_d (&n1, 1, &n1)) != MP_OKAY) { - goto LBL_N1; - } - - /* set 2**s * r = n1 */ - if ((err = mp_init_copy (&r, &n1)) != MP_OKAY) { - goto LBL_N1; - } - - /* count the number of least significant bits - * which are zero - */ - s = mp_cnt_lsb(&r); - - /* now divide n - 1 by 2**s */ - if ((err = mp_div_2d (&r, s, &r, NULL)) != MP_OKAY) { - goto LBL_R; - } - - /* compute y = b**r mod a */ - if ((err = mp_init (&y)) != MP_OKAY) { - goto LBL_R; - } - if ((err = mp_exptmod (b, &r, a, &y)) != MP_OKAY) { - goto LBL_Y; - } - - /* if y != 1 and y != n1 do */ - if (mp_cmp_d (&y, 1) != MP_EQ && mp_cmp (&y, &n1) != MP_EQ) { - j = 1; - /* while j <= s-1 and y != n1 */ - while ((j <= (s - 1)) && mp_cmp (&y, &n1) != MP_EQ) { - if ((err = mp_sqrmod (&y, a, &y)) != MP_OKAY) { - goto LBL_Y; - } - - /* if y == 1 then composite */ - if (mp_cmp_d (&y, 1) == MP_EQ) { - goto LBL_Y; - } - - ++j; - } - - /* if y != n1 then composite */ - if (mp_cmp (&y, &n1) != MP_EQ) { - goto LBL_Y; - } - } - - /* probably prime now */ - *result = MP_YES; -LBL_Y:mp_clear (&y); -LBL_R:mp_clear (&r); -LBL_N1:mp_clear (&n1); - return err; -} - - -/* determines if an integers is divisible by one - * of the first PRIME_SIZE primes or not - * - * sets result to 0 if not, 1 if yes - */ -static int mp_prime_is_divisible (mp_int * a, int *result) -{ - int err, ix; - mp_digit res; - - /* default to not */ - *result = MP_NO; - - for (ix = 0; ix < PRIME_SIZE; ix++) { - /* what is a mod LBL_prime_tab[ix] */ - if ((err = mp_mod_d (a, ltm_prime_tab[ix], &res)) != MP_OKAY) { - return err; - } - - /* is the residue zero? */ - if (res == 0) { - *result = MP_YES; - return MP_OKAY; - } - } - - return MP_OKAY; -} - - -/* - * Sets result to 1 if probably prime, 0 otherwise - */ -int mp_prime_is_prime (mp_int * a, int t, int *result) -{ - mp_int b; - int ix, err, res; - - /* default to no */ - *result = MP_NO; - - /* valid value of t? */ - if (t <= 0 || t > PRIME_SIZE) { - return MP_VAL; - } - - /* is the input equal to one of the primes in the table? */ - for (ix = 0; ix < PRIME_SIZE; ix++) { - if (mp_cmp_d(a, ltm_prime_tab[ix]) == MP_EQ) { - *result = 1; - return MP_OKAY; - } - } - - /* first perform trial division */ - if ((err = mp_prime_is_divisible (a, &res)) != MP_OKAY) { - return err; - } - - /* return if it was trivially divisible */ - if (res == MP_YES) { - return MP_OKAY; - } - - /* now perform the miller-rabin rounds */ - if ((err = mp_init (&b)) != MP_OKAY) { - return err; - } - - for (ix = 0; ix < t; ix++) { - /* set the prime */ - mp_set (&b, ltm_prime_tab[ix]); - - if ((err = mp_prime_miller_rabin (a, &b, &res)) != MP_OKAY) { - goto LBL_B; - } - - if (res == MP_NO) { - goto LBL_B; - } - } - - /* passed the test */ - *result = MP_YES; -LBL_B:mp_clear (&b); - return err; -} - - -/* computes least common multiple as |a*b|/(a, b) */ -int mp_lcm (mp_int * a, mp_int * b, mp_int * c) -{ - int res; - mp_int t1, t2; - - - if ((res = mp_init_multi (&t1, &t2, NULL, NULL, NULL, NULL)) != MP_OKAY) { - return res; - } - - /* t1 = get the GCD of the two inputs */ - if ((res = mp_gcd (a, b, &t1)) != MP_OKAY) { - goto LBL_T; - } - - /* divide the smallest by the GCD */ - if (mp_cmp_mag(a, b) == MP_LT) { - /* store quotient in t2 such that t2 * b is the LCM */ - if ((res = mp_div(a, &t1, &t2, NULL)) != MP_OKAY) { - goto LBL_T; - } - res = mp_mul(b, &t2, c); - } else { - /* store quotient in t2 such that t2 * a is the LCM */ - if ((res = mp_div(b, &t1, &t2, NULL)) != MP_OKAY) { - goto LBL_T; - } - res = mp_mul(a, &t2, c); - } - - /* fix the sign to positive */ - c->sign = MP_ZPOS; - -LBL_T: - mp_clear(&t1); - mp_clear(&t2); - return res; -} - - -static const int lnz[16] = { - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 -}; - -/* Counts the number of lsbs which are zero before the first zero bit */ -int mp_cnt_lsb(mp_int *a) -{ - int x; - mp_digit q, qq; - - /* easy out */ - if (mp_iszero(a) == 1) { - return 0; - } - - /* scan lower digits until non-zero */ - for (x = 0; x < a->used && a->dp[x] == 0; x++); - q = a->dp[x]; - x *= DIGIT_BIT; - - /* now scan this digit until a 1 is found */ - if ((q & 1) == 0) { - do { - qq = q & 15; - x += lnz[qq]; - q >>= 4; - } while (qq == 0); - } - return x; -} - - -/* Greatest Common Divisor using the binary method */ -int mp_gcd (mp_int * a, mp_int * b, mp_int * c) -{ - mp_int u, v; - int k, u_lsb, v_lsb, res; - - /* either zero than gcd is the largest */ - if (mp_iszero (a) == MP_YES) { - return mp_abs (b, c); - } - if (mp_iszero (b) == MP_YES) { - return mp_abs (a, c); - } - - /* get copies of a and b we can modify */ - if ((res = mp_init_copy (&u, a)) != MP_OKAY) { - return res; - } - - if ((res = mp_init_copy (&v, b)) != MP_OKAY) { - goto LBL_U; - } - - /* must be positive for the remainder of the algorithm */ - u.sign = v.sign = MP_ZPOS; - - /* B1. Find the common power of two for u and v */ - u_lsb = mp_cnt_lsb(&u); - v_lsb = mp_cnt_lsb(&v); - k = MIN(u_lsb, v_lsb); - - if (k > 0) { - /* divide the power of two out */ - if ((res = mp_div_2d(&u, k, &u, NULL)) != MP_OKAY) { - goto LBL_V; - } - - if ((res = mp_div_2d(&v, k, &v, NULL)) != MP_OKAY) { - goto LBL_V; - } - } - - /* divide any remaining factors of two out */ - if (u_lsb != k) { - if ((res = mp_div_2d(&u, u_lsb - k, &u, NULL)) != MP_OKAY) { - goto LBL_V; - } - } - - if (v_lsb != k) { - if ((res = mp_div_2d(&v, v_lsb - k, &v, NULL)) != MP_OKAY) { - goto LBL_V; - } - } - - while (mp_iszero(&v) == 0) { - /* make sure v is the largest */ - if (mp_cmp_mag(&u, &v) == MP_GT) { - /* swap u and v to make sure v is >= u */ - mp_exch(&u, &v); - } - - /* subtract smallest from largest */ - if ((res = s_mp_sub(&v, &u, &v)) != MP_OKAY) { - goto LBL_V; - } - - /* Divide out all factors of two */ - if ((res = mp_div_2d(&v, mp_cnt_lsb(&v), &v, NULL)) != MP_OKAY) { - goto LBL_V; - } - } - - /* multiply by 2**k which we divided out at the beginning */ - if ((res = mp_mul_2d (&u, k, c)) != MP_OKAY) { - goto LBL_V; - } - c->sign = MP_ZPOS; - res = MP_OKAY; -LBL_V:mp_clear (&u); -LBL_U:mp_clear (&v); - return res; -} - - - -#endif /* CYASSL_KEY_GEN */ - - -#ifdef HAVE_ECC - -/* chars used in radix conversions */ -const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; - -/* read a string [ASCII] in a given radix */ -int mp_read_radix (mp_int * a, const char *str, int radix) -{ - int y, res, neg; - char ch; - - /* zero the digit bignum */ - mp_zero(a); - - /* make sure the radix is ok */ - if (radix < 2 || radix > 64) { - return MP_VAL; - } - - /* if the leading digit is a - * minus set the sign to negative. - */ - if (*str == '-') { - ++str; - neg = MP_NEG; - } else { - neg = MP_ZPOS; - } - - /* set the integer to the default of zero */ - mp_zero (a); - - /* process each digit of the string */ - while (*str) { - /* if the radix < 36 the conversion is case insensitive - * this allows numbers like 1AB and 1ab to represent the same value - * [e.g. in hex] - */ - ch = (char) ((radix < 36) ? XTOUPPER(*str) : *str); - for (y = 0; y < 64; y++) { - if (ch == mp_s_rmap[y]) { - break; - } - } - - /* if the char was found in the map - * and is less than the given radix add it - * to the number, otherwise exit the loop. - */ - if (y < radix) { - if ((res = mp_mul_d (a, (mp_digit) radix, a)) != MP_OKAY) { - return res; - } - if ((res = mp_add_d (a, (mp_digit) y, a)) != MP_OKAY) { - return res; - } - } else { - break; - } - ++str; - } - - /* set the sign only if a != 0 */ - if (mp_iszero(a) != 1) { - a->sign = neg; - } - return MP_OKAY; -} - -#endif /* HAVE_ECC */ - -#endif /* USE_FAST_MATH */ - -#endif /* NO_BIG_INT */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/logging.c b/project1/cyassl-3.0.0/ctaocrypt/src/logging.c deleted file mode 100644 index 5c17f591..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/logging.c +++ /dev/null @@ -1,162 +0,0 @@ -/* logging.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -/* submitted by eof */ - -#include -#include - - -#ifdef __cplusplus - extern "C" { -#endif - CYASSL_API int CyaSSL_Debugging_ON(void); - CYASSL_API void CyaSSL_Debugging_OFF(void); -#ifdef __cplusplus - } -#endif - - -#ifdef DEBUG_CYASSL - -/* Set these to default values initially. */ -static CyaSSL_Logging_cb log_function = 0; -static int loggingEnabled = 0; - -#endif /* DEBUG_CYASSL */ - - -int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f) -{ -#ifdef DEBUG_CYASSL - int res = 0; - - if (f) - log_function = f; - else - res = BAD_FUNC_ARG; - - return res; -#else - (void)f; - return NOT_COMPILED_IN; -#endif -} - - -int CyaSSL_Debugging_ON(void) -{ -#ifdef DEBUG_CYASSL - loggingEnabled = 1; - return 0; -#else - return NOT_COMPILED_IN; -#endif -} - - -void CyaSSL_Debugging_OFF(void) -{ -#ifdef DEBUG_CYASSL - loggingEnabled = 0; -#endif -} - - -#ifdef DEBUG_CYASSL - -#ifdef FREESCALE_MQX - #include -#else - #include /* for default printf stuff */ -#endif - -#ifdef THREADX - int dc_log_printf(char*, ...); -#endif - -static void cyassl_log(const int logLevel, const char *const logMessage) -{ - if (log_function) - log_function(logLevel, logMessage); - else { - if (loggingEnabled) { -#ifdef THREADX - dc_log_printf("%s\n", logMessage); -#elif defined(MICRIUM) - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - NetSecure_TraceOut((CPU_CHAR *)logMessage); - #endif -#elif defined(CYASSL_MDK_ARM) - fflush(stdout) ; - printf("%s\n", logMessage); - fflush(stdout) ; -#else - fprintf(stderr, "%s\n", logMessage); -#endif - } - } -} - - -void CYASSL_MSG(const char* msg) -{ - if (loggingEnabled) - cyassl_log(INFO_LOG , msg); -} - - -void CYASSL_ENTER(const char* msg) -{ - if (loggingEnabled) { - char buffer[80]; - sprintf(buffer, "CyaSSL Entering %s", msg); - cyassl_log(ENTER_LOG , buffer); - } -} - - -void CYASSL_LEAVE(const char* msg, int ret) -{ - if (loggingEnabled) { - char buffer[80]; - sprintf(buffer, "CyaSSL Leaving %s, return %d", msg, ret); - cyassl_log(LEAVE_LOG , buffer); - } -} - - -void CYASSL_ERROR(int error) -{ - if (loggingEnabled) { - char buffer[80]; - sprintf(buffer, "CyaSSL error occured, error = %d", error); - cyassl_log(ERROR_LOG , buffer); - } -} - -#endif /* DEBUG_CYASSL */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md2.c b/project1/cyassl-3.0.0/ctaocrypt/src/md2.c deleted file mode 100644 index 178287ee..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/md2.c +++ /dev/null @@ -1,131 +0,0 @@ -/* md2.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef CYASSL_MD2 - -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -void InitMd2(Md2* md2) -{ - XMEMSET(md2->X, 0, MD2_X_SIZE); - XMEMSET(md2->C, 0, MD2_BLOCK_SIZE); - XMEMSET(md2->buffer, 0, MD2_BLOCK_SIZE); - md2->count = 0; -} - - -void Md2Update(Md2* md2, const byte* data, word32 len) -{ - static const byte S[256] = - { - 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, - 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, - 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, - 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, - 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, - 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, - 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, - 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, - 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, - 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, - 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, - 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, - 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, - 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, - 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, - 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, - 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, - 31, 26, 219, 153, 141, 51, 159, 17, 131, 20 - }; - - while (len) { - word32 L = (MD2_PAD_SIZE - md2->count) < len ? - (MD2_PAD_SIZE - md2->count) : len; - XMEMCPY(md2->buffer + md2->count, data, L); - md2->count += L; - data += L; - len -= L; - - if (md2->count == MD2_PAD_SIZE) { - int i; - byte t; - - md2->count = 0; - XMEMCPY(md2->X + MD2_PAD_SIZE, md2->buffer, MD2_PAD_SIZE); - t = md2->C[15]; - - for(i = 0; i < MD2_PAD_SIZE; i++) { - md2->X[32 + i] = md2->X[MD2_PAD_SIZE + i] ^ md2->X[i]; - t = md2->C[i] ^= S[md2->buffer[i] ^ t]; - } - - t=0; - for(i = 0; i < 18; i++) { - int j; - for(j = 0; j < MD2_X_SIZE; j += 8) { - t = md2->X[j+0] ^= S[t]; - t = md2->X[j+1] ^= S[t]; - t = md2->X[j+2] ^= S[t]; - t = md2->X[j+3] ^= S[t]; - t = md2->X[j+4] ^= S[t]; - t = md2->X[j+5] ^= S[t]; - t = md2->X[j+6] ^= S[t]; - t = md2->X[j+7] ^= S[t]; - } - t = (t + i) & 0xFF; - } - } - } -} - - -void Md2Final(Md2* md2, byte* hash) -{ - byte padding[MD2_BLOCK_SIZE]; - word32 padLen = MD2_PAD_SIZE - md2->count; - word32 i; - - for (i = 0; i < padLen; i++) - padding[i] = (byte)padLen; - - Md2Update(md2, padding, padLen); - Md2Update(md2, md2->C, MD2_BLOCK_SIZE); - - XMEMCPY(hash, md2->X, MD2_DIGEST_SIZE); - - InitMd2(md2); -} - - -#endif /* CYASSL_MD2 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md4.c b/project1/cyassl-3.0.0/ctaocrypt/src/md4.c deleted file mode 100644 index d696d638..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/md4.c +++ /dev/null @@ -1,219 +0,0 @@ -/* md4.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_MD4 - -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -void InitMd4(Md4* md4) -{ - md4->digest[0] = 0x67452301L; - md4->digest[1] = 0xefcdab89L; - md4->digest[2] = 0x98badcfeL; - md4->digest[3] = 0x10325476L; - - md4->buffLen = 0; - md4->loLen = 0; - md4->hiLen = 0; -} - - -static void Transform(Md4* md4) -{ -#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) -#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) - - /* Copy context->state[] to working vars */ - word32 A = md4->digest[0]; - word32 B = md4->digest[1]; - word32 C = md4->digest[2]; - word32 D = md4->digest[3]; - -#define function(a,b,c,d,k,s) a=rotlFixed(a+F(b,c,d)+md4->buffer[k],s); - function(A,B,C,D, 0, 3); - function(D,A,B,C, 1, 7); - function(C,D,A,B, 2,11); - function(B,C,D,A, 3,19); - function(A,B,C,D, 4, 3); - function(D,A,B,C, 5, 7); - function(C,D,A,B, 6,11); - function(B,C,D,A, 7,19); - function(A,B,C,D, 8, 3); - function(D,A,B,C, 9, 7); - function(C,D,A,B,10,11); - function(B,C,D,A,11,19); - function(A,B,C,D,12, 3); - function(D,A,B,C,13, 7); - function(C,D,A,B,14,11); - function(B,C,D,A,15,19); - -#undef function -#define function(a,b,c,d,k,s) \ - a=rotlFixed(a+G(b,c,d)+md4->buffer[k]+0x5a827999,s); - - function(A,B,C,D, 0, 3); - function(D,A,B,C, 4, 5); - function(C,D,A,B, 8, 9); - function(B,C,D,A,12,13); - function(A,B,C,D, 1, 3); - function(D,A,B,C, 5, 5); - function(C,D,A,B, 9, 9); - function(B,C,D,A,13,13); - function(A,B,C,D, 2, 3); - function(D,A,B,C, 6, 5); - function(C,D,A,B,10, 9); - function(B,C,D,A,14,13); - function(A,B,C,D, 3, 3); - function(D,A,B,C, 7, 5); - function(C,D,A,B,11, 9); - function(B,C,D,A,15,13); - -#undef function -#define function(a,b,c,d,k,s) \ - a=rotlFixed(a+H(b,c,d)+md4->buffer[k]+0x6ed9eba1,s); - - function(A,B,C,D, 0, 3); - function(D,A,B,C, 8, 9); - function(C,D,A,B, 4,11); - function(B,C,D,A,12,15); - function(A,B,C,D, 2, 3); - function(D,A,B,C,10, 9); - function(C,D,A,B, 6,11); - function(B,C,D,A,14,15); - function(A,B,C,D, 1, 3); - function(D,A,B,C, 9, 9); - function(C,D,A,B, 5,11); - function(B,C,D,A,13,15); - function(A,B,C,D, 3, 3); - function(D,A,B,C,11, 9); - function(C,D,A,B, 7,11); - function(B,C,D,A,15,15); - - /* Add the working vars back into digest state[] */ - md4->digest[0] += A; - md4->digest[1] += B; - md4->digest[2] += C; - md4->digest[3] += D; -} - - -static INLINE void AddLength(Md4* md4, word32 len) -{ - word32 tmp = md4->loLen; - if ( (md4->loLen += len) < tmp) - md4->hiLen++; /* carry low to high */ -} - - -void Md4Update(Md4* md4, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)md4->buffer; - - while (len) { - word32 add = min(len, MD4_BLOCK_SIZE - md4->buffLen); - XMEMCPY(&local[md4->buffLen], data, add); - - md4->buffLen += add; - data += add; - len -= add; - - if (md4->buffLen == MD4_BLOCK_SIZE) { - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); - #endif - Transform(md4); - AddLength(md4, MD4_BLOCK_SIZE); - md4->buffLen = 0; - } - } -} - - -void Md4Final(Md4* md4, byte* hash) -{ - byte* local = (byte*)md4->buffer; - - AddLength(md4, md4->buffLen); /* before adding pads */ - - local[md4->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (md4->buffLen > MD4_PAD_SIZE) { - XMEMSET(&local[md4->buffLen], 0, MD4_BLOCK_SIZE - md4->buffLen); - md4->buffLen += MD4_BLOCK_SIZE - md4->buffLen; - - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); - #endif - Transform(md4); - md4->buffLen = 0; - } - XMEMSET(&local[md4->buffLen], 0, MD4_PAD_SIZE - md4->buffLen); - - /* put lengths in bits */ - md4->hiLen = (md4->loLen >> (8*sizeof(md4->loLen) - 3)) + - (md4->hiLen << 3); - md4->loLen = md4->loLen << 3; - - /* store lengths */ - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(md4->buffer, md4->buffer, MD4_BLOCK_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - XMEMCPY(&local[MD4_PAD_SIZE], &md4->loLen, sizeof(word32)); - XMEMCPY(&local[MD4_PAD_SIZE + sizeof(word32)], &md4->hiLen, sizeof(word32)); - - Transform(md4); - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(md4->digest, md4->digest, MD4_DIGEST_SIZE); - #endif - XMEMCPY(hash, md4->digest, MD4_DIGEST_SIZE); - - InitMd4(md4); /* reset state */ -} - - -#endif /* NO_MD4 */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/md5.c b/project1/cyassl-3.0.0/ctaocrypt/src/md5.c deleted file mode 100644 index 3da4cc6b..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/md5.c +++ /dev/null @@ -1,364 +0,0 @@ -/* md5.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if !defined(NO_MD5) - -#ifdef CYASSL_PIC32MZ_HASH -#define InitMd5 InitMd5_sw -#define Md5Update Md5Update_sw -#define Md5Final Md5Final_sw -#endif - -#include - -#ifdef NO_INLINE - #include -#else - #include -#endif - -#ifdef FREESCALE_MMCAU - #include "cau_api.h" - #define XTRANSFORM(S,B) cau_md5_hash_n((B), 1, (unsigned char*)(S)->digest) -#else - #define XTRANSFORM(S,B) Transform((S)) -#endif - - -#ifdef STM32F2_HASH - /* - * STM32F2 hardware MD5 support through the STM32F2 standard peripheral - * library. Documentation located in STM32F2xx Standard Peripheral Library - * document (See note in README). - */ - #include "stm32f2xx.h" - - void InitMd5(Md5* md5) - { - /* STM32F2 struct notes: - * md5->buffer = first 4 bytes used to hold partial block if needed - * md5->buffLen = num bytes currently stored in md5->buffer - * md5->loLen = num bytes that have been written to STM32 FIFO - */ - XMEMSET(md5->buffer, 0, MD5_REG_SIZE); - - md5->buffLen = 0; - md5->loLen = 0; - - /* initialize HASH peripheral */ - HASH_DeInit(); - - /* configure algo used, algo mode, datatype */ - HASH->CR &= ~ (HASH_CR_ALGO | HASH_CR_DATATYPE | HASH_CR_MODE); - HASH->CR |= (HASH_AlgoSelection_MD5 | HASH_AlgoMode_HASH - | HASH_DataType_8b); - - /* reset HASH processor */ - HASH->CR |= HASH_CR_INIT; - } - - void Md5Update(Md5* md5, const byte* data, word32 len) - { - word32 i = 0; - word32 fill = 0; - word32 diff = 0; - - /* if saved partial block is available */ - if (md5->buffLen > 0) { - fill = 4 - md5->buffLen; - - /* if enough data to fill, fill and push to FIFO */ - if (fill <= len) { - XMEMCPY((byte*)md5->buffer + md5->buffLen, data, fill); - HASH_DataIn(*(uint32_t*)md5->buffer); - - data += fill; - len -= fill; - md5->loLen += 4; - md5->buffLen = 0; - } else { - /* append partial to existing stored block */ - XMEMCPY((byte*)md5->buffer + md5->buffLen, data, len); - md5->buffLen += len; - return; - } - } - - /* write input block in the IN FIFO */ - for (i = 0; i < len; i += 4) - { - diff = len - i; - if (diff < 4) { - /* store incomplete last block, not yet in FIFO */ - XMEMSET(md5->buffer, 0, MD5_REG_SIZE); - XMEMCPY((byte*)md5->buffer, data, diff); - md5->buffLen = diff; - } else { - HASH_DataIn(*(uint32_t*)data); - data+=4; - } - } - - /* keep track of total data length thus far */ - md5->loLen += (len - md5->buffLen); - } - - void Md5Final(Md5* md5, byte* hash) - { - __IO uint16_t nbvalidbitsdata = 0; - - /* finish reading any trailing bytes into FIFO */ - if (md5->buffLen > 0) { - HASH_DataIn(*(uint32_t*)md5->buffer); - md5->loLen += md5->buffLen; - } - - /* calculate number of valid bits in last word of input data */ - nbvalidbitsdata = 8 * (md5->loLen % MD5_REG_SIZE); - - /* configure number of valid bits in last word of the data */ - HASH_SetLastWordValidBitsNbr(nbvalidbitsdata); - - /* start HASH processor */ - HASH_StartDigest(); - - /* wait until Busy flag == RESET */ - while (HASH_GetFlagStatus(HASH_FLAG_BUSY) != RESET) {} - - /* read message digest */ - md5->digest[0] = HASH->HR[0]; - md5->digest[1] = HASH->HR[1]; - md5->digest[2] = HASH->HR[2]; - md5->digest[3] = HASH->HR[3]; - - ByteReverseWords(md5->digest, md5->digest, MD5_DIGEST_SIZE); - - XMEMCPY(hash, md5->digest, MD5_DIGEST_SIZE); - - InitMd5(md5); /* reset state */ - } - -#else /* CTaoCrypt software implementation */ - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -void InitMd5(Md5* md5) -{ - md5->digest[0] = 0x67452301L; - md5->digest[1] = 0xefcdab89L; - md5->digest[2] = 0x98badcfeL; - md5->digest[3] = 0x10325476L; - - md5->buffLen = 0; - md5->loLen = 0; - md5->hiLen = 0; -} - -#ifndef FREESCALE_MMCAU - -static void Transform(Md5* md5) -{ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -#define MD5STEP(f, w, x, y, z, data, s) \ - w = rotlFixed(w + f(x, y, z) + data, s) + x - - /* Copy context->state[] to working vars */ - word32 a = md5->digest[0]; - word32 b = md5->digest[1]; - word32 c = md5->digest[2]; - word32 d = md5->digest[3]; - - MD5STEP(F1, a, b, c, d, md5->buffer[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, md5->buffer[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, md5->buffer[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, md5->buffer[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, md5->buffer[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, md5->buffer[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, md5->buffer[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, md5->buffer[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, md5->buffer[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, md5->buffer[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, md5->buffer[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, md5->buffer[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, md5->buffer[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, md5->buffer[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, md5->buffer[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, md5->buffer[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, md5->buffer[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, md5->buffer[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, md5->buffer[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, md5->buffer[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, md5->buffer[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, md5->buffer[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, md5->buffer[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, md5->buffer[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, md5->buffer[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, md5->buffer[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, md5->buffer[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, md5->buffer[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, md5->buffer[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, md5->buffer[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, md5->buffer[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, md5->buffer[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, md5->buffer[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, md5->buffer[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, md5->buffer[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, md5->buffer[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, md5->buffer[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, md5->buffer[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, md5->buffer[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, md5->buffer[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, md5->buffer[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, md5->buffer[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, md5->buffer[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, md5->buffer[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, md5->buffer[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, md5->buffer[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, md5->buffer[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, md5->buffer[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, md5->buffer[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, md5->buffer[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, md5->buffer[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, md5->buffer[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, md5->buffer[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, md5->buffer[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, md5->buffer[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, md5->buffer[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, md5->buffer[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, md5->buffer[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, md5->buffer[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, md5->buffer[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, md5->buffer[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, md5->buffer[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, md5->buffer[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, md5->buffer[9] + 0xeb86d391, 21); - - /* Add the working vars back into digest state[] */ - md5->digest[0] += a; - md5->digest[1] += b; - md5->digest[2] += c; - md5->digest[3] += d; -} - -#endif /* FREESCALE_MMCAU */ - - -static INLINE void AddLength(Md5* md5, word32 len) -{ - word32 tmp = md5->loLen; - if ( (md5->loLen += len) < tmp) - md5->hiLen++; /* carry low to high */ -} - - -void Md5Update(Md5* md5, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)md5->buffer; - - while (len) { - word32 add = min(len, MD5_BLOCK_SIZE - md5->buffLen); - XMEMCPY(&local[md5->buffLen], data, add); - - md5->buffLen += add; - data += add; - len -= add; - - if (md5->buffLen == MD5_BLOCK_SIZE) { - #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); - #endif - XTRANSFORM(md5, local); - AddLength(md5, MD5_BLOCK_SIZE); - md5->buffLen = 0; - } - } -} - - -void Md5Final(Md5* md5, byte* hash) -{ - byte* local = (byte*)md5->buffer; - - AddLength(md5, md5->buffLen); /* before adding pads */ - - local[md5->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (md5->buffLen > MD5_PAD_SIZE) { - XMEMSET(&local[md5->buffLen], 0, MD5_BLOCK_SIZE - md5->buffLen); - md5->buffLen += MD5_BLOCK_SIZE - md5->buffLen; - - #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); - #endif - XTRANSFORM(md5, local); - md5->buffLen = 0; - } - XMEMSET(&local[md5->buffLen], 0, MD5_PAD_SIZE - md5->buffLen); - - /* put lengths in bits */ - md5->hiLen = (md5->loLen >> (8*sizeof(md5->loLen) - 3)) + - (md5->hiLen << 3); - md5->loLen = md5->loLen << 3; - - /* store lengths */ - #if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(md5->buffer, md5->buffer, MD5_BLOCK_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - XMEMCPY(&local[MD5_PAD_SIZE], &md5->loLen, sizeof(word32)); - XMEMCPY(&local[MD5_PAD_SIZE + sizeof(word32)], &md5->hiLen, sizeof(word32)); - - XTRANSFORM(md5, local); - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(md5->digest, md5->digest, MD5_DIGEST_SIZE); - #endif - XMEMCPY(hash, md5->digest, MD5_DIGEST_SIZE); - - InitMd5(md5); /* reset state */ -} - -#endif /* STM32F2_HASH */ - -#endif /* NO_MD5 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/memory.c b/project1/cyassl-3.0.0/ctaocrypt/src/memory.c deleted file mode 100644 index 71bbbc46..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/memory.c +++ /dev/null @@ -1,183 +0,0 @@ -/* memory.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef USE_CYASSL_MEMORY - -#include -#include - -#ifdef CYASSL_MALLOC_CHECK - #include -#endif - -/* Set these to default values initially. */ -static CyaSSL_Malloc_cb malloc_function = 0; -static CyaSSL_Free_cb free_function = 0; -static CyaSSL_Realloc_cb realloc_function = 0; - -int CyaSSL_SetAllocators(CyaSSL_Malloc_cb mf, - CyaSSL_Free_cb ff, - CyaSSL_Realloc_cb rf) -{ - int res = 0; - - if (mf) - malloc_function = mf; - else - res = BAD_FUNC_ARG; - - if (ff) - free_function = ff; - else - res = BAD_FUNC_ARG; - - if (rf) - realloc_function = rf; - else - res = BAD_FUNC_ARG; - - return res; -} - - -void* CyaSSL_Malloc(size_t size) -{ - void* res = 0; - - if (malloc_function) - res = malloc_function(size); - else - res = malloc(size); - - #ifdef CYASSL_MALLOC_CHECK - if (res == NULL) - puts("CyaSSL_malloc failed"); - #endif - - return res; -} - -void CyaSSL_Free(void *ptr) -{ - if (free_function) - free_function(ptr); - else - free(ptr); -} - -void* CyaSSL_Realloc(void *ptr, size_t size) -{ - void* res = 0; - - if (realloc_function) - res = realloc_function(ptr, size); - else - res = realloc(ptr, size); - - return res; -} - -#endif /* USE_CYASSL_MEMORY */ - - -#ifdef HAVE_IO_POOL - -/* Example for user io pool, shared build may need definitions in lib proper */ - -#include -#include - -#ifndef HAVE_THREAD_LS - #error "Oops, simple I/O pool example needs thread local storage" -#endif - - -/* allow simple per thread in and out pools */ -/* use 17k size sense max record size is 16k plus overhead */ -static THREAD_LS_T byte pool_in[17*1024]; -static THREAD_LS_T byte pool_out[17*1024]; - - -void* XMALLOC(size_t n, void* heap, int type) -{ - (void)heap; - - if (type == DYNAMIC_TYPE_IN_BUFFER) { - if (n < sizeof(pool_in)) - return pool_in; - else - return NULL; - } - - if (type == DYNAMIC_TYPE_OUT_BUFFER) { - if (n < sizeof(pool_out)) - return pool_out; - else - return NULL; - } - - return malloc(n); -} - -void* XREALLOC(void *p, size_t n, void* heap, int type) -{ - (void)heap; - - if (type == DYNAMIC_TYPE_IN_BUFFER) { - if (n < sizeof(pool_in)) - return pool_in; - else - return NULL; - } - - if (type == DYNAMIC_TYPE_OUT_BUFFER) { - if (n < sizeof(pool_out)) - return pool_out; - else - return NULL; - } - - return realloc(p, n); -} - - -/* unit api calls, let's make sure visisble with CYASSL_API */ -CYASSL_API void XFREE(void *p, void* heap, int type) -{ - (void)heap; - - if (type == DYNAMIC_TYPE_IN_BUFFER) - return; /* do nothing, static pool */ - - if (type == DYNAMIC_TYPE_OUT_BUFFER) - return; /* do nothing, static pool */ - - free(p); -} - -#endif /* HAVE_IO_POOL */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/misc.c b/project1/cyassl-3.0.0/ctaocrypt/src/misc.c deleted file mode 100644 index 69fd4a44..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/misc.c +++ /dev/null @@ -1,170 +0,0 @@ -/* misc.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -/* inlining these functions is a huge speed increase and a small size decrease, - because the functions are smaller than function call setup/cleanup, e.g., - md5 benchmark is twice as fast with inline. If you don't want it, then - define NO_INLINE and compile this file into cyassl, otherwise it's used as - a source header - */ - -#ifdef NO_INLINE - #define STATIC -#else - #define STATIC static -#endif - - -#ifdef INTEL_INTRINSICS - - #include /* get intrinsic definitions */ - - #pragma intrinsic(_lrotl, _lrotr) - - STATIC INLINE word32 rotlFixed(word32 x, word32 y) - { - return y ? _lrotl(x, y) : x; - } - - STATIC INLINE word32 rotrFixed(word32 x, word32 y) - { - return y ? _lrotr(x, y) : x; - } - -#else /* generic */ - - STATIC INLINE word32 rotlFixed(word32 x, word32 y) - { - return (x << y) | (x >> (sizeof(y) * 8 - y)); - } - - - STATIC INLINE word32 rotrFixed(word32 x, word32 y) - { - return (x >> y) | (x << (sizeof(y) * 8 - y)); - } - -#endif - - -STATIC INLINE word32 ByteReverseWord32(word32 value) -{ -#ifdef PPC_INTRINSICS - /* PPC: load reverse indexed instruction */ - return (word32)__lwbrx(&value,0); -#elif defined(KEIL_INTRINSICS) - return (word32)__rev(value); -#elif defined(FAST_ROTATE) - /* 5 instructions with rotate instruction, 9 without */ - return (rotrFixed(value, 8U) & 0xff00ff00) | - (rotlFixed(value, 8U) & 0x00ff00ff); -#else - /* 6 instructions with rotate instruction, 8 without */ - value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); - return rotlFixed(value, 16U); -#endif -} - - -STATIC INLINE void ByteReverseWords(word32* out, const word32* in, - word32 byteCount) -{ - word32 count = byteCount/(word32)sizeof(word32), i; - - for (i = 0; i < count; i++) - out[i] = ByteReverseWord32(in[i]); - -} - - -#ifdef WORD64_AVAILABLE - - -STATIC INLINE word64 rotlFixed64(word64 x, word64 y) -{ - return (x << y) | (x >> (sizeof(y) * 8 - y)); -} - - -STATIC INLINE word64 rotrFixed64(word64 x, word64 y) -{ - return (x >> y) | (x << (sizeof(y) * 8 - y)); -} - - -STATIC INLINE word64 ByteReverseWord64(word64 value) -{ -#ifdef CTAOCRYPT_SLOW_WORD64 - return (word64)(ByteReverseWord32((word32)value)) << 32 | - ByteReverseWord32((word32)(value>>32)); -#else - value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | - ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); - value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | - ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); - return rotlFixed64(value, 32U); -#endif -} - - -STATIC INLINE void ByteReverseWords64(word64* out, const word64* in, - word32 byteCount) -{ - word32 count = byteCount/(word32)sizeof(word64), i; - - for (i = 0; i < count; i++) - out[i] = ByteReverseWord64(in[i]); - -} - -#endif /* WORD64_AVAILABLE */ - - -STATIC INLINE void XorWords(word* r, const word* a, word32 n) -{ - word32 i; - - for (i = 0; i < n; i++) r[i] ^= a[i]; -} - - -STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count) -{ - if (((word)buf | (word)mask | count) % CYASSL_WORD_SIZE == 0) - XorWords( (word*)buf, (const word*)mask, count / CYASSL_WORD_SIZE); - else { - word32 i; - byte* b = (byte*)buf; - const byte* m = (const byte*)mask; - - for (i = 0; i < count; i++) b[i] ^= m[i]; - } -} -#undef STATIC - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c b/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c deleted file mode 100644 index 1b009279..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/pkcs7.c +++ /dev/null @@ -1,1391 +0,0 @@ -/* pkcs7.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_PKCS7 - -#include -#include -#include - -#ifndef min - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } -#endif - - -/* placed ASN.1 contentType OID into *output, return idx on success, - * 0 upon failure */ -CYASSL_LOCAL int SetContentType(int pkcs7TypeOID, byte* output) -{ - /* PKCS#7 content types, RFC 2315, section 14 */ - static const byte pkcs7[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07 }; - static const byte data[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x01 }; - static const byte signedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x02}; - static const byte envelopedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x03 }; - static const byte signedAndEnveloped[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x04 }; - static const byte digestedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x05 }; - static const byte encryptedData[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x01, 0x07, 0x06 }; - - int idSz; - int typeSz = 0, idx = 0; - const byte* typeName = 0; - byte ID_Length[MAX_LENGTH_SZ]; - - switch (pkcs7TypeOID) { - case PKCS7_MSG: - typeSz = sizeof(pkcs7); - typeName = pkcs7; - break; - - case DATA: - typeSz = sizeof(data); - typeName = data; - break; - - case SIGNED_DATA: - typeSz = sizeof(signedData); - typeName = signedData; - break; - - case ENVELOPED_DATA: - typeSz = sizeof(envelopedData); - typeName = envelopedData; - break; - - case SIGNED_AND_ENVELOPED_DATA: - typeSz = sizeof(signedAndEnveloped); - typeName = signedAndEnveloped; - break; - - case DIGESTED_DATA: - typeSz = sizeof(digestedData); - typeName = digestedData; - break; - - case ENCRYPTED_DATA: - typeSz = sizeof(encryptedData); - typeName = encryptedData; - break; - - default: - CYASSL_MSG("Unknown PKCS#7 Type"); - return 0; - }; - - idSz = SetLength(typeSz, ID_Length); - output[idx++] = ASN_OBJECT_ID; - XMEMCPY(output + idx, ID_Length, idSz); - idx += idSz; - XMEMCPY(output + idx, typeName, typeSz); - idx += typeSz; - - return idx; - -} - - -/* get ASN.1 contentType OID sum, return 0 on success, <0 on failure */ -int GetContentType(const byte* input, word32* inOutIdx, word32* oid, - word32 maxIdx) -{ - int length; - word32 i = *inOutIdx; - byte b; - *oid = 0; - - CYASSL_ENTER("GetContentType"); - - b = input[i++]; - if (b != ASN_OBJECT_ID) - return ASN_OBJECT_ID_E; - - if (GetLength(input, &i, &length, maxIdx) < 0) - return ASN_PARSE_E; - - while(length--) { - *oid += input[i]; - i++; - } - - *inOutIdx = i; - - return 0; -} - - -/* init PKCS7 struct with recipient cert, decode into DecodedCert */ -int PKCS7_InitWithCert(PKCS7* pkcs7, byte* cert, word32 certSz) -{ - int ret = 0; - - XMEMSET(pkcs7, 0, sizeof(PKCS7)); - if (cert != NULL && certSz > 0) { - DecodedCert dCert; - - pkcs7->singleCert = cert; - pkcs7->singleCertSz = certSz; - InitDecodedCert(&dCert, cert, certSz, 0); - - ret = ParseCert(&dCert, CA_TYPE, NO_VERIFY, 0); - if (ret < 0) { - FreeDecodedCert(&dCert); - return ret; - } - XMEMCPY(pkcs7->publicKey, dCert.publicKey, dCert.pubKeySize); - pkcs7->publicKeySz = dCert.pubKeySize; - XMEMCPY(pkcs7->issuerHash, dCert.issuerHash, SHA_SIZE); - pkcs7->issuer = dCert.issuerRaw; - pkcs7->issuerSz = dCert.issuerRawLen; - XMEMCPY(pkcs7->issuerSn, dCert.serial, dCert.serialSz); - pkcs7->issuerSnSz = dCert.serialSz; - FreeDecodedCert(&dCert); - } - - return ret; -} - - -/* releases any memory allocated by a PKCS7 initializer */ -void PKCS7_Free(PKCS7* pkcs7) -{ - (void)pkcs7; -} - - -/* build PKCS#7 data content type */ -int PKCS7_EncodeData(PKCS7* pkcs7, byte* output, word32 outputSz) -{ - static const byte oid[] = - { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, - 0x07, 0x01 }; - byte seq[MAX_SEQ_SZ]; - byte octetStr[MAX_OCTET_STR_SZ]; - word32 seqSz; - word32 octetStrSz; - word32 oidSz = (word32)sizeof(oid); - int idx = 0; - - octetStrSz = SetOctetString(pkcs7->contentSz, octetStr); - seqSz = SetSequence(pkcs7->contentSz + octetStrSz + oidSz, seq); - - if (outputSz < pkcs7->contentSz + octetStrSz + oidSz + seqSz) - return BUFFER_E; - - XMEMCPY(output, seq, seqSz); - idx += seqSz; - XMEMCPY(output + idx, oid, oidSz); - idx += oidSz; - XMEMCPY(output + idx, octetStr, octetStrSz); - idx += octetStrSz; - XMEMCPY(output + idx, pkcs7->content, pkcs7->contentSz); - idx += pkcs7->contentSz; - - return idx; -} - - -typedef struct EncodedAttrib { - byte valueSeq[MAX_SEQ_SZ]; - const byte* oid; - byte valueSet[MAX_SET_SZ]; - const byte* value; - word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz; -} EncodedAttrib; - - -typedef struct ESD { - Sha sha; - byte contentDigest[SHA_DIGEST_SIZE + 2]; /* content only + ASN.1 heading */ - byte contentAttribsDigest[SHA_DIGEST_SIZE]; - byte encContentDigest[512]; - - byte outerSeq[MAX_SEQ_SZ]; - byte outerContent[MAX_EXP_SZ]; - byte innerSeq[MAX_SEQ_SZ]; - byte version[MAX_VERSION_SZ]; - byte digAlgoIdSet[MAX_SET_SZ]; - byte singleDigAlgoId[MAX_ALGO_SZ]; - - byte contentInfoSeq[MAX_SEQ_SZ]; - byte innerContSeq[MAX_EXP_SZ]; - byte innerOctets[MAX_OCTET_STR_SZ]; - - byte certsSet[MAX_SET_SZ]; - - byte signerInfoSet[MAX_SET_SZ]; - byte signerInfoSeq[MAX_SEQ_SZ]; - byte signerVersion[MAX_VERSION_SZ]; - byte issuerSnSeq[MAX_SEQ_SZ]; - byte issuerName[MAX_SEQ_SZ]; - byte issuerSn[MAX_SN_SZ]; - byte signerDigAlgoId[MAX_ALGO_SZ]; - byte digEncAlgoId[MAX_ALGO_SZ]; - byte signedAttribSet[MAX_SET_SZ]; - EncodedAttrib signedAttribs[6]; - byte signerDigest[MAX_OCTET_STR_SZ]; - word32 innerOctetsSz, innerContSeqSz, contentInfoSeqSz; - word32 outerSeqSz, outerContentSz, innerSeqSz, versionSz, digAlgoIdSetSz, - singleDigAlgoIdSz, certsSetSz; - word32 signerInfoSetSz, signerInfoSeqSz, signerVersionSz, - issuerSnSeqSz, issuerNameSz, issuerSnSz, - signerDigAlgoIdSz, digEncAlgoIdSz, signerDigestSz; - word32 encContentDigestSz, signedAttribsSz, signedAttribsCount, - signedAttribSetSz; -} ESD; - - -static int EncodeAttributes(EncodedAttrib* ea, int eaSz, - PKCS7Attrib* attribs, int attribsSz) -{ - int i; - int maxSz = min(eaSz, attribsSz); - int allAttribsSz = 0; - - for (i = 0; i < maxSz; i++) - { - int attribSz = 0; - - ea[i].value = attribs[i].value; - ea[i].valueSz = attribs[i].valueSz; - attribSz += ea[i].valueSz; - ea[i].valueSetSz = SetSet(attribSz, ea[i].valueSet); - attribSz += ea[i].valueSetSz; - ea[i].oid = attribs[i].oid; - ea[i].oidSz = attribs[i].oidSz; - attribSz += ea[i].oidSz; - ea[i].valueSeqSz = SetSequence(attribSz, ea[i].valueSeq); - attribSz += ea[i].valueSeqSz; - ea[i].totalSz = attribSz; - - allAttribsSz += attribSz; - } - return allAttribsSz; -} - - -static int FlattenAttributes(byte* output, EncodedAttrib* ea, int eaSz) -{ - int i, idx; - - idx = 0; - for (i = 0; i < eaSz; i++) { - XMEMCPY(output + idx, ea[i].valueSeq, ea[i].valueSeqSz); - idx += ea[i].valueSeqSz; - XMEMCPY(output + idx, ea[i].oid, ea[i].oidSz); - idx += ea[i].oidSz; - XMEMCPY(output + idx, ea[i].valueSet, ea[i].valueSetSz); - idx += ea[i].valueSetSz; - XMEMCPY(output + idx, ea[i].value, ea[i].valueSz); - idx += ea[i].valueSz; - } - return 0; -} - - -/* build PKCS#7 signedData content type */ -int PKCS7_EncodeSignedData(PKCS7* pkcs7, byte* output, word32 outputSz) -{ - static const byte outerOid[] = - { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, - 0x07, 0x02 }; - static const byte innerOid[] = - { ASN_OBJECT_ID, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, - 0x07, 0x01 }; - - ESD esd; - word32 signerInfoSz = 0; - word32 totalSz = 0; - int idx = 0, ret = 0; - byte* flatSignedAttribs = NULL; - word32 flatSignedAttribsSz = 0; - word32 innerOidSz = sizeof(innerOid); - word32 outerOidSz = sizeof(outerOid); - - if (pkcs7 == NULL || pkcs7->content == NULL || pkcs7->contentSz == 0 || - pkcs7->encryptOID == 0 || pkcs7->hashOID == 0 || pkcs7->rng == 0 || - pkcs7->singleCert == NULL || pkcs7->singleCertSz == 0 || - pkcs7->privateKey == NULL || pkcs7->privateKeySz == 0 || - output == NULL || outputSz == 0) - return BAD_FUNC_ARG; - - XMEMSET(&esd, 0, sizeof(esd)); - ret = InitSha(&esd.sha); - if (ret != 0) - return ret; - - if (pkcs7->contentSz != 0) - { - ShaUpdate(&esd.sha, pkcs7->content, pkcs7->contentSz); - esd.contentDigest[0] = ASN_OCTET_STRING; - esd.contentDigest[1] = SHA_DIGEST_SIZE; - ShaFinal(&esd.sha, &esd.contentDigest[2]); - } - - esd.innerOctetsSz = SetOctetString(pkcs7->contentSz, esd.innerOctets); - esd.innerContSeqSz = SetExplicit(0, esd.innerOctetsSz + pkcs7->contentSz, - esd.innerContSeq); - esd.contentInfoSeqSz = SetSequence(pkcs7->contentSz + esd.innerOctetsSz + - innerOidSz + esd.innerContSeqSz, - esd.contentInfoSeq); - - esd.issuerSnSz = SetSerialNumber(pkcs7->issuerSn, pkcs7->issuerSnSz, - esd.issuerSn); - signerInfoSz += esd.issuerSnSz; - esd.issuerNameSz = SetSequence(pkcs7->issuerSz, esd.issuerName); - signerInfoSz += esd.issuerNameSz + pkcs7->issuerSz; - esd.issuerSnSeqSz = SetSequence(signerInfoSz, esd.issuerSnSeq); - signerInfoSz += esd.issuerSnSeqSz; - esd.signerVersionSz = SetMyVersion(1, esd.signerVersion, 0); - signerInfoSz += esd.signerVersionSz; - esd.signerDigAlgoIdSz = SetAlgoID(pkcs7->hashOID, esd.signerDigAlgoId, - hashType, 0); - signerInfoSz += esd.signerDigAlgoIdSz; - esd.digEncAlgoIdSz = SetAlgoID(pkcs7->encryptOID, esd.digEncAlgoId, - keyType, 0); - signerInfoSz += esd.digEncAlgoIdSz; - - if (pkcs7->signedAttribsSz != 0) { - byte contentTypeOid[] = - { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xF7, 0x0d, 0x01, - 0x09, 0x03 }; - byte contentType[] = - { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x07, 0x01 }; - byte messageDigestOid[] = - { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x09, 0x04 }; - - PKCS7Attrib cannedAttribs[2] = - { - { contentTypeOid, sizeof(contentTypeOid), - contentType, sizeof(contentType) }, - { messageDigestOid, sizeof(messageDigestOid), - esd.contentDigest, sizeof(esd.contentDigest) } - }; - word32 cannedAttribsCount = sizeof(cannedAttribs)/sizeof(PKCS7Attrib); - - esd.signedAttribsCount += cannedAttribsCount; - esd.signedAttribsSz += EncodeAttributes(&esd.signedAttribs[0], 2, - cannedAttribs, cannedAttribsCount); - - esd.signedAttribsCount += pkcs7->signedAttribsSz; - esd.signedAttribsSz += EncodeAttributes(&esd.signedAttribs[2], 4, - pkcs7->signedAttribs, pkcs7->signedAttribsSz); - - flatSignedAttribs = (byte*)XMALLOC(esd.signedAttribsSz, 0, NULL); - flatSignedAttribsSz = esd.signedAttribsSz; - if (flatSignedAttribs == NULL) - return MEMORY_E; - FlattenAttributes(flatSignedAttribs, - esd.signedAttribs, esd.signedAttribsCount); - esd.signedAttribSetSz = SetImplicit(ASN_SET, 0, esd.signedAttribsSz, - esd.signedAttribSet); - } - /* Calculate the final hash and encrypt it. */ - { - RsaKey privKey; - int result; - word32 scratch = 0; - - byte digestInfo[MAX_SEQ_SZ + MAX_ALGO_SZ + - MAX_OCTET_STR_SZ + SHA_DIGEST_SIZE]; - byte digestInfoSeq[MAX_SEQ_SZ]; - byte digestStr[MAX_OCTET_STR_SZ]; - word32 digestInfoSeqSz, digestStrSz; - int digIdx = 0; - - if (pkcs7->signedAttribsSz != 0) { - byte attribSet[MAX_SET_SZ]; - word32 attribSetSz; - - attribSetSz = SetSet(flatSignedAttribsSz, attribSet); - - ret = InitSha(&esd.sha); - if (ret < 0) { - XFREE(flatSignedAttribs, 0, NULL); - return ret; - } - ShaUpdate(&esd.sha, attribSet, attribSetSz); - ShaUpdate(&esd.sha, flatSignedAttribs, flatSignedAttribsSz); - } - ShaFinal(&esd.sha, esd.contentAttribsDigest); - - digestStrSz = SetOctetString(SHA_DIGEST_SIZE, digestStr); - digestInfoSeqSz = SetSequence(esd.signerDigAlgoIdSz + - digestStrSz + SHA_DIGEST_SIZE, - digestInfoSeq); - - XMEMCPY(digestInfo + digIdx, digestInfoSeq, digestInfoSeqSz); - digIdx += digestInfoSeqSz; - XMEMCPY(digestInfo + digIdx, - esd.signerDigAlgoId, esd.signerDigAlgoIdSz); - digIdx += esd.signerDigAlgoIdSz; - XMEMCPY(digestInfo + digIdx, digestStr, digestStrSz); - digIdx += digestStrSz; - XMEMCPY(digestInfo + digIdx, esd.contentAttribsDigest, SHA_DIGEST_SIZE); - digIdx += SHA_DIGEST_SIZE; - - result = InitRsaKey(&privKey, NULL); - if (result == 0) - result = RsaPrivateKeyDecode(pkcs7->privateKey, &scratch, &privKey, - pkcs7->privateKeySz); - if (result < 0) { - XFREE(flatSignedAttribs, 0, NULL); - return PUBLIC_KEY_E; - } - result = RsaSSL_Sign(digestInfo, digIdx, - esd.encContentDigest, sizeof(esd.encContentDigest), - &privKey, pkcs7->rng); - FreeRsaKey(&privKey); - if (result < 0) { - XFREE(flatSignedAttribs, 0, NULL); - return result; - } - esd.encContentDigestSz = (word32)result; - } - signerInfoSz += flatSignedAttribsSz + esd.signedAttribSetSz; - - esd.signerDigestSz = SetOctetString(esd.encContentDigestSz, - esd.signerDigest); - signerInfoSz += esd.signerDigestSz + esd.encContentDigestSz; - - esd.signerInfoSeqSz = SetSequence(signerInfoSz, esd.signerInfoSeq); - signerInfoSz += esd.signerInfoSeqSz; - esd.signerInfoSetSz = SetSet(signerInfoSz, esd.signerInfoSet); - signerInfoSz += esd.signerInfoSetSz; - - esd.certsSetSz = SetImplicit(ASN_SET, 0, pkcs7->singleCertSz, esd.certsSet); - - esd.singleDigAlgoIdSz = SetAlgoID(pkcs7->hashOID, esd.singleDigAlgoId, - hashType, 0); - esd.digAlgoIdSetSz = SetSet(esd.singleDigAlgoIdSz, esd.digAlgoIdSet); - - - esd.versionSz = SetMyVersion(1, esd.version, 0); - - totalSz = esd.versionSz + esd.singleDigAlgoIdSz + esd.digAlgoIdSetSz + - esd.contentInfoSeqSz + esd.certsSetSz + pkcs7->singleCertSz + - esd.innerOctetsSz + esd.innerContSeqSz + - innerOidSz + pkcs7->contentSz + - signerInfoSz; - esd.innerSeqSz = SetSequence(totalSz, esd.innerSeq); - totalSz += esd.innerSeqSz; - esd.outerContentSz = SetExplicit(0, totalSz, esd.outerContent); - totalSz += esd.outerContentSz + outerOidSz; - esd.outerSeqSz = SetSequence(totalSz, esd.outerSeq); - totalSz += esd.outerSeqSz; - - if (outputSz < totalSz) - return BUFFER_E; - - idx = 0; - XMEMCPY(output + idx, esd.outerSeq, esd.outerSeqSz); - idx += esd.outerSeqSz; - XMEMCPY(output + idx, outerOid, outerOidSz); - idx += outerOidSz; - XMEMCPY(output + idx, esd.outerContent, esd.outerContentSz); - idx += esd.outerContentSz; - XMEMCPY(output + idx, esd.innerSeq, esd.innerSeqSz); - idx += esd.innerSeqSz; - XMEMCPY(output + idx, esd.version, esd.versionSz); - idx += esd.versionSz; - XMEMCPY(output + idx, esd.digAlgoIdSet, esd.digAlgoIdSetSz); - idx += esd.digAlgoIdSetSz; - XMEMCPY(output + idx, esd.singleDigAlgoId, esd.singleDigAlgoIdSz); - idx += esd.singleDigAlgoIdSz; - XMEMCPY(output + idx, esd.contentInfoSeq, esd.contentInfoSeqSz); - idx += esd.contentInfoSeqSz; - XMEMCPY(output + idx, innerOid, innerOidSz); - idx += innerOidSz; - XMEMCPY(output + idx, esd.innerContSeq, esd.innerContSeqSz); - idx += esd.innerContSeqSz; - XMEMCPY(output + idx, esd.innerOctets, esd.innerOctetsSz); - idx += esd.innerOctetsSz; - XMEMCPY(output + idx, pkcs7->content, pkcs7->contentSz); - idx += pkcs7->contentSz; - XMEMCPY(output + idx, esd.certsSet, esd.certsSetSz); - idx += esd.certsSetSz; - XMEMCPY(output + idx, pkcs7->singleCert, pkcs7->singleCertSz); - idx += pkcs7->singleCertSz; - XMEMCPY(output + idx, esd.signerInfoSet, esd.signerInfoSetSz); - idx += esd.signerInfoSetSz; - XMEMCPY(output + idx, esd.signerInfoSeq, esd.signerInfoSeqSz); - idx += esd.signerInfoSeqSz; - XMEMCPY(output + idx, esd.signerVersion, esd.signerVersionSz); - idx += esd.signerVersionSz; - XMEMCPY(output + idx, esd.issuerSnSeq, esd.issuerSnSeqSz); - idx += esd.issuerSnSeqSz; - XMEMCPY(output + idx, esd.issuerName, esd.issuerNameSz); - idx += esd.issuerNameSz; - XMEMCPY(output + idx, pkcs7->issuer, pkcs7->issuerSz); - idx += pkcs7->issuerSz; - XMEMCPY(output + idx, esd.issuerSn, esd.issuerSnSz); - idx += esd.issuerSnSz; - XMEMCPY(output + idx, esd.signerDigAlgoId, esd.signerDigAlgoIdSz); - idx += esd.signerDigAlgoIdSz; - - /* SignerInfo:Attributes */ - if (pkcs7->signedAttribsSz != 0) { - XMEMCPY(output + idx, esd.signedAttribSet, esd.signedAttribSetSz); - idx += esd.signedAttribSetSz; - XMEMCPY(output + idx, flatSignedAttribs, flatSignedAttribsSz); - idx += flatSignedAttribsSz; - XFREE(flatSignedAttribs, 0, NULL); - } - - XMEMCPY(output + idx, esd.digEncAlgoId, esd.digEncAlgoIdSz); - idx += esd.digEncAlgoIdSz; - XMEMCPY(output + idx, esd.signerDigest, esd.signerDigestSz); - idx += esd.signerDigestSz; - XMEMCPY(output + idx, esd.encContentDigest, esd.encContentDigestSz); - idx += esd.encContentDigestSz; - - return idx; -} - - -/* Finds the certificates in the message and saves it. */ -int PKCS7_VerifySignedData(PKCS7* pkcs7, byte* pkiMsg, word32 pkiMsgSz) -{ - word32 idx, contentType; - int length, version, ret; - byte* content = NULL; - byte* sig = NULL; - byte* cert = NULL; - int contentSz = 0, sigSz = 0, certSz = 0; - - if (pkcs7 == NULL || pkiMsg == NULL || pkiMsgSz == 0) - return BAD_FUNC_ARG; - - idx = 0; - - /* Get the contentInfo sequence */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Get the contentInfo contentType */ - if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (contentType != SIGNED_DATA) { - CYASSL_MSG("PKCS#7 input not of type SignedData"); - return PKCS7_OID_E; - } - - /* get the ContentInfo content */ - if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Get the signedData sequence */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Get the version */ - if (GetMyVersion(pkiMsg, &idx, &version) < 0) - return ASN_PARSE_E; - - if (version != 1) { - CYASSL_MSG("PKCS#7 signedData needs to be of version 1"); - return ASN_VERSION_E; - } - - /* Get the set of DigestAlgorithmIdentifiers */ - if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Skip the set. */ - idx += length; - - /* Get the inner ContentInfo sequence */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Get the inner ContentInfo contentType */ - if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (contentType != DATA) { - CYASSL_MSG("PKCS#7 inner input not of type Data"); - return PKCS7_OID_E; - } - - if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (pkiMsg[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Save the inner data as the content. */ - if (length > 0) { - /* Local pointer for calculating hashes later */ - pkcs7->content = content = &pkiMsg[idx]; - pkcs7->contentSz = contentSz = length; - idx += length; - } - - /* Get the implicit[0] set of certificates */ - if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) { - idx++; - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (length > 0) { - /* At this point, idx is at the first certificate in - * a set of certificates. There may be more than one, - * or none, or they may be a PKCS 6 extended - * certificate. We want to save the first cert if it - * is X.509. */ - - word32 certIdx = idx; - - if (pkiMsg[certIdx++] == (ASN_CONSTRUCTED | ASN_SEQUENCE)) { - if (GetLength(pkiMsg, &certIdx, &certSz, pkiMsgSz) < 0) - return ASN_PARSE_E; - - cert = &pkiMsg[idx]; - certSz += (certIdx - idx); - } - PKCS7_InitWithCert(pkcs7, cert, certSz); - } - idx += length; - } - - /* Get the implicit[1] set of crls */ - if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 1)) { - idx++; - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Skip the set */ - idx += length; - } - - /* Get the set of signerInfos */ - if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (length > 0) { - RsaKey key; - word32 scratch = 0; - int plainSz = 0; - byte digest[MAX_SEQ_SZ+MAX_ALGO_SZ+MAX_OCTET_STR_SZ+SHA_DIGEST_SIZE]; - - /* Get the sequence of the first signerInfo */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Get the version */ - if (GetMyVersion(pkiMsg, &idx, &version) < 0) - return ASN_PARSE_E; - - if (version != 1) { - CYASSL_MSG("PKCS#7 signerInfo needs to be of version 1"); - return ASN_VERSION_E; - } - - /* Get the sequence of IssuerAndSerialNumber */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Skip it */ - idx += length; - - /* Get the sequence of digestAlgorithm */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Skip it */ - idx += length; - - /* Get the IMPLICIT[0] SET OF signedAttributes */ - if (pkiMsg[idx] == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) { - idx++; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - idx += length; - } - - /* Get the sequence of digestEncryptionAlgorithm */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* Skip it */ - idx += length; - - /* Get the signature */ - if (pkiMsg[idx] == ASN_OCTET_STRING) { - idx++; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* save pointer and length */ - sig = &pkiMsg[idx]; - sigSz = length; - - idx += length; - } - - XMEMSET(digest, 0, sizeof(digest)); - pkcs7->content = content; - pkcs7->contentSz = contentSz; - - ret = InitRsaKey(&key, NULL); - if (ret != 0) return ret; - if (RsaPublicKeyDecode(pkcs7->publicKey, &scratch, &key, - pkcs7->publicKeySz) < 0) { - CYASSL_MSG("ASN RSA key decode error"); - return PUBLIC_KEY_E; - } - plainSz = RsaSSL_Verify(sig, sigSz, digest, sizeof(digest), &key); - FreeRsaKey(&key); - if (plainSz < 0) - return plainSz; - } - - return 0; -} - - -/* create ASN.1 fomatted RecipientInfo structure, returns sequence size */ -CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz, - int keyEncAlgo, int blockKeySz, - RNG* rng, byte* contentKeyPlain, - byte* contentKeyEnc, - int* keyEncSz, byte* out, word32 outSz) -{ - word32 idx = 0; - int ret = 0, totalSz = 0; - int verSz, issuerSz, snSz, keyEncAlgSz; - int issuerSeqSz, recipSeqSz, issuerSerialSeqSz; - int encKeyOctetStrSz; - - byte ver[MAX_VERSION_SZ]; - byte serial[MAX_SN_SZ]; - byte issuerSerialSeq[MAX_SEQ_SZ]; - byte recipSeq[MAX_SEQ_SZ]; - byte issuerSeq[MAX_SEQ_SZ]; - byte keyAlgArray[MAX_ALGO_SZ]; - byte encKeyOctetStr[MAX_OCTET_STR_SZ]; - - RsaKey pubKey; - DecodedCert decoded; - - InitDecodedCert(&decoded, (byte*)cert, certSz, 0); - ret = ParseCert(&decoded, CA_TYPE, NO_VERIFY, 0); - if (ret < 0) { - FreeDecodedCert(&decoded); - return ret; - } - - /* version */ - verSz = SetMyVersion(0, ver, 0); - - /* IssuerAndSerialNumber */ - if (decoded.issuerRaw == NULL || decoded.issuerRawLen == 0) { - CYASSL_MSG("DecodedCert lacks raw issuer pointer and length"); - FreeDecodedCert(&decoded); - return -1; - } - issuerSz = decoded.issuerRawLen; - issuerSeqSz = SetSequence(issuerSz, issuerSeq); - - if (decoded.serial == NULL || decoded.serialSz == 0) { - CYASSL_MSG("DecodedCert missing serial number"); - FreeDecodedCert(&decoded); - return -1; - } - snSz = SetSerialNumber(decoded.serial, decoded.serialSz, serial); - - issuerSerialSeqSz = SetSequence(issuerSeqSz + issuerSz + snSz, - issuerSerialSeq); - - /* KeyEncryptionAlgorithmIdentifier, only support RSA now */ - if (keyEncAlgo != RSAk) - return ALGO_ID_E; - - keyEncAlgSz = SetAlgoID(keyEncAlgo, keyAlgArray, keyType, 0); - if (keyEncAlgSz == 0) - return BAD_FUNC_ARG; - - /* EncryptedKey */ - ret = InitRsaKey(&pubKey, 0); - if (ret != 0) return ret; - if (RsaPublicKeyDecode(decoded.publicKey, &idx, &pubKey, - decoded.pubKeySize) < 0) { - CYASSL_MSG("ASN RSA key decode error"); - return PUBLIC_KEY_E; - } - - *keyEncSz = RsaPublicEncrypt(contentKeyPlain, blockKeySz, contentKeyEnc, - MAX_ENCRYPTED_KEY_SZ, &pubKey, rng); - FreeRsaKey(&pubKey); - if (*keyEncSz < 0) { - CYASSL_MSG("RSA Public Encrypt failed"); - return *keyEncSz; - } - - encKeyOctetStrSz = SetOctetString(*keyEncSz, encKeyOctetStr); - - /* RecipientInfo */ - recipSeqSz = SetSequence(verSz + issuerSerialSeqSz + issuerSeqSz + - issuerSz + snSz + keyEncAlgSz + encKeyOctetStrSz + - *keyEncSz, recipSeq); - - if (recipSeqSz + verSz + issuerSerialSeqSz + issuerSeqSz + snSz + - keyEncAlgSz + encKeyOctetStrSz + *keyEncSz > (int)outSz) { - CYASSL_MSG("RecipientInfo output buffer too small"); - return BUFFER_E; - } - - XMEMCPY(out + totalSz, recipSeq, recipSeqSz); - totalSz += recipSeqSz; - XMEMCPY(out + totalSz, ver, verSz); - totalSz += verSz; - XMEMCPY(out + totalSz, issuerSerialSeq, issuerSerialSeqSz); - totalSz += issuerSerialSeqSz; - XMEMCPY(out + totalSz, issuerSeq, issuerSeqSz); - totalSz += issuerSeqSz; - XMEMCPY(out + totalSz, decoded.issuerRaw, issuerSz); - totalSz += issuerSz; - XMEMCPY(out + totalSz, serial, snSz); - totalSz += snSz; - XMEMCPY(out + totalSz, keyAlgArray, keyEncAlgSz); - totalSz += keyEncAlgSz; - XMEMCPY(out + totalSz, encKeyOctetStr, encKeyOctetStrSz); - totalSz += encKeyOctetStrSz; - XMEMCPY(out + totalSz, contentKeyEnc, *keyEncSz); - totalSz += *keyEncSz; - - FreeDecodedCert(&decoded); - - return totalSz; -} - - -/* build PKCS#7 envelopedData content type, return enveloped size */ -int PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz) -{ - int i, ret = 0, idx = 0; - int totalSz = 0, padSz = 0, desOutSz = 0; - - int contentInfoSeqSz, outerContentTypeSz, outerContentSz; - byte contentInfoSeq[MAX_SEQ_SZ]; - byte outerContentType[MAX_ALGO_SZ]; - byte outerContent[MAX_SEQ_SZ]; - - int envDataSeqSz, verSz; - byte envDataSeq[MAX_SEQ_SZ]; - byte ver[MAX_VERSION_SZ]; - - RNG rng; - int contentKeyEncSz, blockKeySz; - int dynamicFlag = 0; - byte contentKeyPlain[MAX_CONTENT_KEY_LEN]; - byte contentKeyEnc[MAX_ENCRYPTED_KEY_SZ]; - byte* plain; - byte* encryptedContent; - - int recipSz, recipSetSz; - byte recip[MAX_RECIP_SZ]; - byte recipSet[MAX_SET_SZ]; - - int encContentOctetSz, encContentSeqSz, contentTypeSz; - int contentEncAlgoSz, ivOctetStringSz; - byte encContentSeq[MAX_SEQ_SZ]; - byte contentType[MAX_ALGO_SZ]; - byte contentEncAlgo[MAX_ALGO_SZ]; - byte tmpIv[DES_BLOCK_SIZE]; - byte ivOctetString[MAX_OCTET_STR_SZ]; - byte encContentOctet[MAX_OCTET_STR_SZ]; - - if (pkcs7 == NULL || pkcs7->content == NULL || pkcs7->contentSz == 0 || - pkcs7->encryptOID == 0 || pkcs7->singleCert == NULL) - return BAD_FUNC_ARG; - - if (output == NULL || outputSz == 0) - return BAD_FUNC_ARG; - - /* PKCS#7 only supports DES, 3DES for now */ - switch (pkcs7->encryptOID) { - case DESb: - blockKeySz = DES_KEYLEN; - break; - - case DES3b: - blockKeySz = DES3_KEYLEN; - break; - - default: - CYASSL_MSG("Unsupported content cipher type"); - return ALGO_ID_E; - }; - - /* outer content type */ - outerContentTypeSz = SetContentType(ENVELOPED_DATA, outerContentType); - - /* version, defined as 0 in RFC 2315 */ - verSz = SetMyVersion(0, ver, 0); - - /* generate random content encryption key */ - ret = InitRng(&rng); - if (ret != 0) - return ret; - - ret = RNG_GenerateBlock(&rng, contentKeyPlain, blockKeySz); - if (ret != 0) - return ret; - - /* build RecipientInfo, only handle 1 for now */ - recipSz = CreateRecipientInfo(pkcs7->singleCert, pkcs7->singleCertSz, RSAk, - blockKeySz, &rng, contentKeyPlain, - contentKeyEnc, &contentKeyEncSz, recip, - MAX_RECIP_SZ); - - if (recipSz < 0) { - CYASSL_MSG("Failed to create RecipientInfo"); - return recipSz; - } - recipSetSz = SetSet(recipSz, recipSet); - - /* generate IV for block cipher */ - ret = RNG_GenerateBlock(&rng, tmpIv, DES_BLOCK_SIZE); - if (ret != 0) - return ret; - - /* EncryptedContentInfo */ - contentTypeSz = SetContentType(pkcs7->contentOID, contentType); - if (contentTypeSz == 0) - return BAD_FUNC_ARG; - - /* allocate encrypted content buffer, pad if necessary, PKCS#7 padding */ - padSz = DES_BLOCK_SIZE - (pkcs7->contentSz % DES_BLOCK_SIZE); - desOutSz = pkcs7->contentSz + padSz; - - if (padSz != 0) { - plain = XMALLOC(desOutSz, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (plain == NULL) { - return MEMORY_E; - } - XMEMCPY(plain, pkcs7->content, pkcs7->contentSz); - dynamicFlag = 1; - - for (i = 0; i < padSz; i++) { - plain[pkcs7->contentSz + i] = padSz; - } - - } else { - plain = pkcs7->content; - desOutSz = pkcs7->contentSz; - } - - encryptedContent = XMALLOC(desOutSz, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (encryptedContent == NULL) { - if (dynamicFlag) - XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } - - /* put together IV OCTET STRING */ - ivOctetStringSz = SetOctetString(DES_BLOCK_SIZE, ivOctetString); - - /* build up our ContentEncryptionAlgorithmIdentifier sequence, - * adding (ivOctetStringSz + DES_BLOCK_SIZE) for IV OCTET STRING */ - contentEncAlgoSz = SetAlgoID(pkcs7->encryptOID, contentEncAlgo, - blkType, ivOctetStringSz + DES_BLOCK_SIZE); - if (contentEncAlgoSz == 0) - return BAD_FUNC_ARG; - - /* encrypt content */ - if (pkcs7->encryptOID == DESb) { - Des des; - - ret = Des_SetKey(&des, contentKeyPlain, tmpIv, DES_ENCRYPTION); - - if (ret == 0) - Des_CbcEncrypt(&des, encryptedContent, plain, desOutSz); - - if (ret != 0) { - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (dynamicFlag) - XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return ret; - } - } - else if (pkcs7->encryptOID == DES3b) { - Des3 des3; - - ret = Des3_SetKey(&des3, contentKeyPlain, tmpIv, DES_ENCRYPTION); - - if (ret == 0) - ret = Des3_CbcEncrypt(&des3, encryptedContent, plain, desOutSz); - - if (ret != 0) { - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (dynamicFlag) - XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return ret; - } - } - - encContentOctetSz = SetImplicit(ASN_OCTET_STRING, 0, - desOutSz, encContentOctet); - - encContentSeqSz = SetSequence(contentTypeSz + contentEncAlgoSz + - ivOctetStringSz + DES_BLOCK_SIZE + - encContentOctetSz + desOutSz, encContentSeq); - - /* keep track of sizes for outer wrapper layering */ - totalSz = verSz + recipSetSz + recipSz + encContentSeqSz + contentTypeSz + - contentEncAlgoSz + ivOctetStringSz + DES_BLOCK_SIZE + - encContentOctetSz + desOutSz; - - /* EnvelopedData */ - envDataSeqSz = SetSequence(totalSz, envDataSeq); - totalSz += envDataSeqSz; - - /* outer content */ - outerContentSz = SetExplicit(0, totalSz, outerContent); - totalSz += outerContentTypeSz; - totalSz += outerContentSz; - - /* ContentInfo */ - contentInfoSeqSz = SetSequence(totalSz, contentInfoSeq); - totalSz += contentInfoSeqSz; - - if (totalSz > (int)outputSz) { - CYASSL_MSG("Pkcs7_encrypt output buffer too small"); - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (dynamicFlag) - XFREE(plain, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return BUFFER_E; - } - - XMEMCPY(output + idx, contentInfoSeq, contentInfoSeqSz); - idx += contentInfoSeqSz; - XMEMCPY(output + idx, outerContentType, outerContentTypeSz); - idx += outerContentTypeSz; - XMEMCPY(output + idx, outerContent, outerContentSz); - idx += outerContentSz; - XMEMCPY(output + idx, envDataSeq, envDataSeqSz); - idx += envDataSeqSz; - XMEMCPY(output + idx, ver, verSz); - idx += verSz; - XMEMCPY(output + idx, recipSet, recipSetSz); - idx += recipSetSz; - XMEMCPY(output + idx, recip, recipSz); - idx += recipSz; - XMEMCPY(output + idx, encContentSeq, encContentSeqSz); - idx += encContentSeqSz; - XMEMCPY(output + idx, contentType, contentTypeSz); - idx += contentTypeSz; - XMEMCPY(output + idx, contentEncAlgo, contentEncAlgoSz); - idx += contentEncAlgoSz; - XMEMCPY(output + idx, ivOctetString, ivOctetStringSz); - idx += ivOctetStringSz; - XMEMCPY(output + idx, tmpIv, DES_BLOCK_SIZE); - idx += DES_BLOCK_SIZE; - XMEMCPY(output + idx, encContentOctet, encContentOctetSz); - idx += encContentOctetSz; - XMEMCPY(output + idx, encryptedContent, desOutSz); - idx += desOutSz; - -#ifdef NO_RC4 - FreeRng(&rng); -#endif - - XMEMSET(contentKeyPlain, 0, MAX_CONTENT_KEY_LEN); - XMEMSET(contentKeyEnc, 0, MAX_ENCRYPTED_KEY_SZ); - - if (dynamicFlag) - XFREE(plain, NULL, DYNAMMIC_TYPE_TMP_BUFFER); - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - return idx; -} - -/* unwrap and decrypt PKCS#7 envelopedData object, return decoded size */ -CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg, - word32 pkiMsgSz, byte* output, - word32 outputSz) -{ - int recipFound = 0; - int ret, version, length; - word32 savedIdx = 0, idx = 0; - word32 contentType, encOID; - byte issuerHash[SHA_DIGEST_SIZE]; - mp_int serialNum; - - int encryptedKeySz, keySz; - byte tmpIv[DES_BLOCK_SIZE]; - byte encryptedKey[MAX_ENCRYPTED_KEY_SZ]; - byte* decryptedKey = NULL; - - RsaKey privKey; - int encryptedContentSz; - byte padLen; - byte* encryptedContent = NULL; - - if (pkcs7 == NULL || pkcs7->singleCert == NULL || - pkcs7->singleCertSz == 0 || pkcs7->privateKey == NULL || - pkcs7->privateKeySz == 0) - return BAD_FUNC_ARG; - - if (pkiMsg == NULL || pkiMsgSz == 0 || - output == NULL || outputSz == 0) - return BAD_FUNC_ARG; - - /* load private key */ - ret = InitRsaKey(&privKey, 0); - if (ret != 0) return ret; - ret = RsaPrivateKeyDecode(pkcs7->privateKey, &idx, &privKey, - pkcs7->privateKeySz); - if (ret != 0) { - CYASSL_MSG("Failed to decode RSA private key"); - return ret; - } - - idx = 0; - - /* read past ContentInfo, verify type is envelopedData */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (contentType != ENVELOPED_DATA) { - CYASSL_MSG("PKCS#7 input not of type EnvelopedData"); - return PKCS7_OID_E; - } - - if (pkiMsg[idx++] != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* remove EnvelopedData and version */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (GetMyVersion(pkiMsg, &idx, &version) < 0) - return ASN_PARSE_E; - - if (version != 0) { - CYASSL_MSG("PKCS#7 envelopedData needs to be of version 0"); - return ASN_VERSION_E; - } - - /* walk through RecipientInfo set, find correct recipient */ - if (GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - savedIdx = idx; - recipFound = 0; - - /* when looking for next recipient, use first sequence and version to - * indicate there is another, if not, move on */ - while(recipFound == 0) { - - /* remove RecipientInfo, if we don't have a SEQUENCE, back up idx to - * last good saved one */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) { - idx = savedIdx; - break; - } - - if (GetMyVersion(pkiMsg, &idx, &version) < 0) { - idx = savedIdx; - break; - } - - if (version != 0) - return ASN_VERSION_E; - - /* remove IssuerAndSerialNumber */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (GetNameHash(pkiMsg, &idx, issuerHash, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* if we found correct recipient, issuer hashes will match */ - if (XMEMCMP(issuerHash, pkcs7->issuerHash, SHA_DIGEST_SIZE) == 0) { - recipFound = 1; - } - - if (GetInt(&serialNum, pkiMsg, &idx, pkiMsgSz) < 0) - return ASN_PARSE_E; - mp_clear(&serialNum); - - if (GetAlgoId(pkiMsg, &idx, &encOID, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* key encryption algorithm must be RSA for now */ - if (encOID != RSAk) - return ALGO_ID_E; - - /* read encryptedKey */ - if (pkiMsg[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &encryptedKeySz, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (recipFound == 1) - XMEMCPY(encryptedKey, &pkiMsg[idx], encryptedKeySz); - idx += encryptedKeySz; - - /* update good idx */ - savedIdx = idx; - } - - if (recipFound == 0) { - CYASSL_MSG("No recipient found in envelopedData that matches input"); - return PKCS7_RECIP_E; - } - - /* remove EncryptedContentInfo */ - if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (GetContentType(pkiMsg, &idx, &contentType, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (GetAlgoId(pkiMsg, &idx, &encOID, pkiMsgSz) < 0) - return ASN_PARSE_E; - - /* get block cipher IV, stored in OPTIONAL parameter of AlgoID */ - if (pkiMsg[idx++] != ASN_OCTET_STRING) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &length, pkiMsgSz) < 0) - return ASN_PARSE_E; - - if (length != DES_BLOCK_SIZE) { - CYASSL_MSG("Incorrect IV length, must be of DES_BLOCK_SIZE"); - return ASN_PARSE_E; - } - - XMEMCPY(tmpIv, &pkiMsg[idx], length); - idx += length; - - /* read encryptedContent, cont[0] */ - if (pkiMsg[idx++] != (ASN_CONTEXT_SPECIFIC | 0)) - return ASN_PARSE_E; - - if (GetLength(pkiMsg, &idx, &encryptedContentSz, pkiMsgSz) < 0) - return ASN_PARSE_E; - - encryptedContent = XMALLOC(encryptedContentSz, NULL, - DYNAMIC_TYPE_TMP_BUFFER); - - XMEMCPY(encryptedContent, &pkiMsg[idx], encryptedContentSz); - - /* decrypt encryptedKey */ - keySz = RsaPrivateDecryptInline(encryptedKey, encryptedKeySz, - &decryptedKey, &privKey); - FreeRsaKey(&privKey); - if (keySz <= 0) - return keySz; - - /* decrypt encryptedContent */ - if (encOID == DESb) { - Des des; - ret = Des_SetKey(&des, decryptedKey, tmpIv, DES_DECRYPTION); - - if (ret == 0) - Des_CbcDecrypt(&des, encryptedContent, encryptedContent, - encryptedContentSz); - - if (ret != 0) { - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return ret; - } - } - else if (encOID == DES3b) { - Des3 des; - ret = Des3_SetKey(&des, decryptedKey, tmpIv, DES_DECRYPTION); - if (ret == 0) - ret = Des3_CbcDecrypt(&des, encryptedContent, encryptedContent, - encryptedContentSz); - - if (ret != 0) { - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return ret; - } - } else { - CYASSL_MSG("Unsupported content encryption OID type"); - return ALGO_ID_E; - } - - padLen = encryptedContent[encryptedContentSz-1]; - - /* copy plaintext to output */ - XMEMCPY(output, encryptedContent, encryptedContentSz - padLen); - - /* free memory, zero out keys */ - XMEMSET(encryptedKey, 0, MAX_ENCRYPTED_KEY_SZ); - XMEMSET(encryptedContent, 0, encryptedContentSz); - XFREE(encryptedContent, NULL, DYNAMIC_TYPE_TMP_BUFFER); - - return encryptedContentSz - padLen; -} - - -#else /* HAVE_PKCS7 */ - - -#ifdef _MSC_VER - /* 4206 warning for blank file */ - #pragma warning(disable: 4206) -#endif - - -#endif /* HAVE_PKCS7 */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/port.c b/project1/cyassl-3.0.0/ctaocrypt/src/port.c deleted file mode 100644 index c5106218..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/port.c +++ /dev/null @@ -1,436 +0,0 @@ -/* port.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include -#include -#include - - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - - - -#ifdef SINGLE_THREADED - -int InitMutex(CyaSSL_Mutex* m) -{ - (void)m; - return 0; -} - - -int FreeMutex(CyaSSL_Mutex *m) -{ - (void)m; - return 0; -} - - -int LockMutex(CyaSSL_Mutex *m) -{ - (void)m; - return 0; -} - - -int UnLockMutex(CyaSSL_Mutex *m) -{ - (void)m; - return 0; -} - -#else /* MULTI_THREAD */ - - #if defined(FREERTOS) - - int InitMutex(CyaSSL_Mutex* m) - { - int iReturn; - - *m = ( CyaSSL_Mutex ) xSemaphoreCreateMutex(); - if( *m != NULL ) - iReturn = 0; - else - iReturn = BAD_MUTEX_E; - - return iReturn; - } - - int FreeMutex(CyaSSL_Mutex* m) - { - vSemaphoreDelete( *m ); - return 0; - } - - int LockMutex(CyaSSL_Mutex* m) - { - /* Assume an infinite block, or should there be zero block? */ - xSemaphoreTake( *m, portMAX_DELAY ); - return 0; - } - - int UnLockMutex(CyaSSL_Mutex* m) - { - xSemaphoreGive( *m ); - return 0; - } - - #elif defined(CYASSL_SAFERTOS) - - int InitMutex(CyaSSL_Mutex* m) - { - vSemaphoreCreateBinary(m->mutexBuffer, m->mutex); - if (m->mutex == NULL) - return BAD_MUTEX_E; - - return 0; - } - - int FreeMutex(CyaSSL_Mutex* m) - { - (void)m; - return 0; - } - - int LockMutex(CyaSSL_Mutex* m) - { - /* Assume an infinite block */ - xSemaphoreTake(m->mutex, portMAX_DELAY); - return 0; - } - - int UnLockMutex(CyaSSL_Mutex* m) - { - xSemaphoreGive(m->mutex); - return 0; - } - - - #elif defined(USE_WINDOWS_API) - - int InitMutex(CyaSSL_Mutex* m) - { - InitializeCriticalSection(m); - return 0; - } - - - int FreeMutex(CyaSSL_Mutex* m) - { - DeleteCriticalSection(m); - return 0; - } - - - int LockMutex(CyaSSL_Mutex* m) - { - EnterCriticalSection(m); - return 0; - } - - - int UnLockMutex(CyaSSL_Mutex* m) - { - LeaveCriticalSection(m); - return 0; - } - - #elif defined(CYASSL_PTHREADS) - - int InitMutex(CyaSSL_Mutex* m) - { - if (pthread_mutex_init(m, 0) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int FreeMutex(CyaSSL_Mutex* m) - { - if (pthread_mutex_destroy(m) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int LockMutex(CyaSSL_Mutex* m) - { - if (pthread_mutex_lock(m) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int UnLockMutex(CyaSSL_Mutex* m) - { - if (pthread_mutex_unlock(m) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - #elif defined(THREADX) - - int InitMutex(CyaSSL_Mutex* m) - { - if (tx_mutex_create(m, "CyaSSL Mutex", TX_NO_INHERIT) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int FreeMutex(CyaSSL_Mutex* m) - { - if (tx_mutex_delete(m) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int LockMutex(CyaSSL_Mutex* m) - { - if (tx_mutex_get(m, TX_WAIT_FOREVER) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - - int UnLockMutex(CyaSSL_Mutex* m) - { - if (tx_mutex_put(m) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - #elif defined(MICRIUM) - - int InitMutex(CyaSSL_Mutex* m) - { - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - if (NetSecure_OS_MutexCreate(m) == 0) - return 0; - else - return BAD_MUTEX_E; - #else - return 0; - #endif - } - - - int FreeMutex(CyaSSL_Mutex* m) - { - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - if (NetSecure_OS_FreeMutex(m) == 0) - return 0; - else - return BAD_MUTEX_E; - #else - return 0; - #endif - } - - - int LockMutex(CyaSSL_Mutex* m) - { - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - if (NetSecure_OS_LockMutex(m) == 0) - return 0; - else - return BAD_MUTEX_E; - #else - return 0; - #endif - } - - - int UnLockMutex(CyaSSL_Mutex* m) - { - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - if (NetSecure_OS_UnLockMutex(m) == 0) - return 0; - else - return BAD_MUTEX_E; - #else - return 0; - #endif - - } - - #elif defined(EBSNET) - - int InitMutex(CyaSSL_Mutex* m) - { - if (rtp_sig_mutex_alloc(m, "CyaSSL Mutex") == -1) - return BAD_MUTEX_E; - else - return 0; - } - - int FreeMutex(CyaSSL_Mutex* m) - { - rtp_sig_mutex_free(*m); - return 0; - } - - int LockMutex(CyaSSL_Mutex* m) - { - if (rtp_sig_mutex_claim_timed(*m, RTIP_INF) == 0) - return 0; - else - return BAD_MUTEX_E; - } - - int UnLockMutex(CyaSSL_Mutex* m) - { - rtp_sig_mutex_release(*m); - return 0; - } - - #elif defined(FREESCALE_MQX) - - int InitMutex(CyaSSL_Mutex* m) - { - if (_mutex_init(m, NULL) == MQX_EOK) - return 0; - else - return BAD_MUTEX_E; - } - - int FreeMutex(CyaSSL_Mutex* m) - { - if (_mutex_destroy(m) == MQX_EOK) - return 0; - else - return BAD_MUTEX_E; - } - - int LockMutex(CyaSSL_Mutex* m) - { - if (_mutex_lock(m) == MQX_EOK) - return 0; - else - return BAD_MUTEX_E; - } - - int UnLockMutex(CyaSSL_Mutex* m) - { - if (_mutex_unlock(m) == MQX_EOK) - return 0; - else - return BAD_MUTEX_E; - } - - #elif defined(CYASSL_MDK_ARM)|| defined(CYASSL_CMSIS_RTOS) - - #if defined(CYASSL_CMSIS_RTOS) - #include "cmsis_os.h" - #define CMSIS_NMUTEX 10 - osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ; - osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; - osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; - osMutexDef(CyaSSL_mt9) ; - - static const osMutexDef_t *CMSIS_mutex[] = { osMutex(CyaSSL_mt0), - osMutex(CyaSSL_mt1), osMutex(CyaSSL_mt2), osMutex(CyaSSL_mt3), - osMutex(CyaSSL_mt4), osMutex(CyaSSL_mt5), osMutex(CyaSSL_mt6), - osMutex(CyaSSL_mt7), osMutex(CyaSSL_mt8), osMutex(CyaSSL_mt9) } ; - - static osMutexId CMSIS_mutexID[CMSIS_NMUTEX] = {0} ; - - int InitMutex(CyaSSL_Mutex* m) - { - int i ; - for (i=0; i -#endif - -#include - -#ifndef NO_PWDBASED - -#ifdef CYASSL_PIC32MZ_HASH - -#define InitMd5 InitMd5_sw -#define Md5Update Md5Update_sw -#define Md5Final Md5Final_sw - -#define InitSha InitSha_sw -#define ShaUpdate ShaUpdate_sw -#define ShaFinal ShaFinal_sw - -#define InitSha256 InitSha256_sw -#define Sha256Update Sha256Update_sw -#define Sha256Final Sha256Final_sw - -#endif - -#include -#include -#include -#include -#if defined(CYASSL_SHA512) || defined(CYASSL_SHA384) - #include -#endif - -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -int PBKDF1(byte* output, const byte* passwd, int pLen, const byte* salt, - int sLen, int iterations, int kLen, int hashType) -{ - Md5 md5; - Sha sha; - int hLen = (hashType == MD5) ? (int)MD5_DIGEST_SIZE : (int)SHA_DIGEST_SIZE; - int i, ret = 0; - byte buffer[SHA_DIGEST_SIZE]; /* max size */ - - if (hashType != MD5 && hashType != SHA) - return BAD_FUNC_ARG; - - if (kLen > hLen) - return BAD_FUNC_ARG; - - if (iterations < 1) - return BAD_FUNC_ARG; - - if (hashType == MD5) { - InitMd5(&md5); - Md5Update(&md5, passwd, pLen); - Md5Update(&md5, salt, sLen); - Md5Final(&md5, buffer); - } - else { - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, passwd, pLen); - ShaUpdate(&sha, salt, sLen); - ShaFinal(&sha, buffer); - } - - for (i = 1; i < iterations; i++) { - if (hashType == MD5) { - Md5Update(&md5, buffer, hLen); - Md5Final(&md5, buffer); - } - else { - ShaUpdate(&sha, buffer, hLen); - ShaFinal(&sha, buffer); - } - } - XMEMCPY(output, buffer, kLen); - - return 0; -} - - -int PBKDF2(byte* output, const byte* passwd, int pLen, const byte* salt, - int sLen, int iterations, int kLen, int hashType) -{ - word32 i = 1; - int hLen; - int j, ret; - Hmac hmac; -#ifdef CYASSL_SMALL_STACK - byte* buffer; -#else - byte buffer[MAX_DIGEST_SIZE]; -#endif - - if (hashType == MD5) { - hLen = MD5_DIGEST_SIZE; - } - else if (hashType == SHA) { - hLen = SHA_DIGEST_SIZE; - } -#ifndef NO_SHA256 - else if (hashType == SHA256) { - hLen = SHA256_DIGEST_SIZE; - } -#endif -#ifdef CYASSL_SHA512 - else if (hashType == SHA512) { - hLen = SHA512_DIGEST_SIZE; - } -#endif - else - return BAD_FUNC_ARG; - -#ifdef CYASSL_SMALL_STACK - buffer = (byte*)XMALLOC(MAX_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (buffer == NULL) - return MEMORY_E; -#endif - - ret = HmacSetKey(&hmac, hashType, passwd, pLen); - - if (ret == 0) { - while (kLen) { - int currentLen; - - ret = HmacUpdate(&hmac, salt, sLen); - if (ret != 0) - break; - - /* encode i */ - for (j = 0; j < 4; j++) { - byte b = (byte)(i >> ((3-j) * 8)); - - ret = HmacUpdate(&hmac, &b, 1); - if (ret != 0) - break; - } - - /* check ret from inside for loop */ - if (ret != 0) - break; - - ret = HmacFinal(&hmac, buffer); - if (ret != 0) - break; - - currentLen = min(kLen, hLen); - XMEMCPY(output, buffer, currentLen); - - for (j = 1; j < iterations; j++) { - ret = HmacUpdate(&hmac, buffer, hLen); - if (ret != 0) - break; - ret = HmacFinal(&hmac, buffer); - if (ret != 0) - break; - xorbuf(output, buffer, currentLen); - } - - /* check ret from inside for loop */ - if (ret != 0) - break; - - output += currentLen; - kLen -= currentLen; - i++; - } - } - -#ifdef CYASSL_SMALL_STACK - XFREE(buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - -#ifdef CYASSL_SHA512 -#define PBKDF_DIGEST_SIZE SHA512_BLOCK_SIZE -#elif !defined(NO_SHA256) -#define PBKDF_DIGEST_SIZE SHA256_BLOCK_SIZE -#else -#define PBKDF_DIGEST_SIZE SHA_DIGEST_SIZE -#endif - -int PKCS12_PBKDF(byte* output, const byte* passwd, int passLen,const byte* salt, - int saltLen, int iterations, int kLen, int hashType, int id) -{ - /* all in bytes instead of bits */ - word32 u, v, dLen, pLen, iLen, sLen, totalLen; - int dynamic = 0; - int ret = 0; - int i; - byte *D, *S, *P, *I; -#ifdef CYASSL_SMALL_STACK - byte staticBuffer[1]; /* force dynamic usage */ -#else - byte staticBuffer[1024]; -#endif - byte* buffer = staticBuffer; - -#ifdef CYASSL_SMALL_STACK - byte* Ai; - byte* B; -#else - byte Ai[PBKDF_DIGEST_SIZE]; - byte B[PBKDF_DIGEST_SIZE]; -#endif - - if (!iterations) - iterations = 1; - - if (hashType == MD5) { - v = MD5_BLOCK_SIZE; - u = MD5_DIGEST_SIZE; - } - else if (hashType == SHA) { - v = SHA_BLOCK_SIZE; - u = SHA_DIGEST_SIZE; - } -#ifndef NO_SHA256 - else if (hashType == SHA256) { - v = SHA256_BLOCK_SIZE; - u = SHA256_DIGEST_SIZE; - } -#endif -#ifdef CYASSL_SHA512 - else if (hashType == SHA512) { - v = SHA512_BLOCK_SIZE; - u = SHA512_DIGEST_SIZE; - } -#endif - else - return BAD_FUNC_ARG; - -#ifdef CYASSL_SMALL_STACK - Ai = (byte*)XMALLOC(PBKDF_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (Ai == NULL) - return MEMORY_E; - - B = (byte*)XMALLOC(PBKDF_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (B == NULL) { - XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - dLen = v; - sLen = v * ((saltLen + v - 1) / v); - if (passLen) - pLen = v * ((passLen + v - 1) / v); - else - pLen = 0; - iLen = sLen + pLen; - - totalLen = dLen + sLen + pLen; - - if (totalLen > sizeof(staticBuffer)) { - buffer = (byte*)XMALLOC(totalLen, 0, DYNAMIC_TYPE_KEY); - if (buffer == NULL) { -#ifdef CYASSL_SMALL_STACK - XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(B, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - return MEMORY_E; - } - dynamic = 1; - } - - D = buffer; - S = D + dLen; - P = S + sLen; - I = S; - - XMEMSET(D, id, dLen); - - for (i = 0; i < (int)sLen; i++) - S[i] = salt[i % saltLen]; - for (i = 0; i < (int)pLen; i++) - P[i] = passwd[i % passLen]; - - while (kLen > 0) { - word32 currentLen; - mp_int B1; - - if (hashType == MD5) { - Md5 md5; - - InitMd5(&md5); - Md5Update(&md5, buffer, totalLen); - Md5Final(&md5, Ai); - - for (i = 1; i < iterations; i++) { - Md5Update(&md5, Ai, u); - Md5Final(&md5, Ai); - } - } - else if (hashType == SHA) { - Sha sha; - - ret = InitSha(&sha); - if (ret != 0) - break; - ShaUpdate(&sha, buffer, totalLen); - ShaFinal(&sha, Ai); - - for (i = 1; i < iterations; i++) { - ShaUpdate(&sha, Ai, u); - ShaFinal(&sha, Ai); - } - } -#ifndef NO_SHA256 - else if (hashType == SHA256) { - Sha256 sha256; - - ret = InitSha256(&sha256); - if (ret != 0) - break; - - ret = Sha256Update(&sha256, buffer, totalLen); - if (ret != 0) - break; - - ret = Sha256Final(&sha256, Ai); - if (ret != 0) - break; - - for (i = 1; i < iterations; i++) { - ret = Sha256Update(&sha256, Ai, u); - if (ret != 0) - break; - - ret = Sha256Final(&sha256, Ai); - if (ret != 0) - break; - } - } -#endif -#ifdef CYASSL_SHA512 - else if (hashType == SHA512) { - Sha512 sha512; - - ret = InitSha512(&sha512); - if (ret != 0) - break; - - ret = Sha512Update(&sha512, buffer, totalLen); - if (ret != 0) - break; - - ret = Sha512Final(&sha512, Ai); - if (ret != 0) - break; - - for (i = 1; i < iterations; i++) { - ret = Sha512Update(&sha512, Ai, u); - if (ret != 0) - break; - - ret = Sha512Final(&sha512, Ai); - if (ret != 0) - break; - } - } -#endif - - for (i = 0; i < (int)v; i++) - B[i] = Ai[i % u]; - - if (mp_init(&B1) != MP_OKAY) - ret = MP_INIT_E; - else if (mp_read_unsigned_bin(&B1, B, v) != MP_OKAY) - ret = MP_READ_E; - else if (mp_add_d(&B1, (mp_digit)1, &B1) != MP_OKAY) - ret = MP_ADD_E; - - if (ret != 0) { - mp_clear(&B1); - break; - } - - for (i = 0; i < (int)iLen; i += v) { - int outSz; - mp_int i1; - mp_int res; - - if (mp_init_multi(&i1, &res, NULL, NULL, NULL, NULL) != MP_OKAY) { - ret = MP_INIT_E; - break; - } - if (mp_read_unsigned_bin(&i1, I + i, v) != MP_OKAY) - ret = MP_READ_E; - else if (mp_add(&i1, &B1, &res) != MP_OKAY) - ret = MP_ADD_E; - else if ( (outSz = mp_unsigned_bin_size(&res)) < 0) - ret = MP_TO_E; - else { - if (outSz > (int)v) { - /* take off MSB */ - byte tmp[129]; - ret = mp_to_unsigned_bin(&res, tmp); - XMEMCPY(I + i, tmp + 1, v); - } - else if (outSz < (int)v) { - XMEMSET(I + i, 0, v - outSz); - ret = mp_to_unsigned_bin(&res, I + i + v - outSz); - } - else - ret = mp_to_unsigned_bin(&res, I + i); - } - - mp_clear(&i1); - mp_clear(&res); - if (ret < 0) break; - } - - currentLen = min(kLen, (int)u); - XMEMCPY(output, Ai, currentLen); - output += currentLen; - kLen -= currentLen; - mp_clear(&B1); - } - - if (dynamic) XFREE(buffer, 0, DYNAMIC_TYPE_KEY); - -#ifdef CYASSL_SMALL_STACK - XFREE(Ai, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(B, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - -#undef PBKDF_DIGEST_SIZE - -#endif /* NO_PWDBASED */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c b/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c deleted file mode 100644 index 5be47416..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/rabbit.c +++ /dev/null @@ -1,310 +0,0 @@ -/* rabbit.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_RABBIT - -#include -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifdef BIG_ENDIAN_ORDER - #define LITTLE32(x) ByteReverseWord32(x) -#else - #define LITTLE32(x) (x) -#endif - -#define U32V(x) ((word32)(x) & 0xFFFFFFFFU) - - -/* Square a 32-bit unsigned integer to obtain the 64-bit result and return */ -/* the upper 32 bits XOR the lower 32 bits */ -static word32 RABBIT_g_func(word32 x) -{ - /* Temporary variables */ - word32 a, b, h, l; - - /* Construct high and low argument for squaring */ - a = x&0xFFFF; - b = x>>16; - - /* Calculate high and low result of squaring */ - h = (((U32V(a*a)>>17) + U32V(a*b))>>15) + b*b; - l = x*x; - - /* Return high XOR low */ - return U32V(h^l); -} - - -/* Calculate the next internal state */ -static void RABBIT_next_state(RabbitCtx* ctx) -{ - /* Temporary variables */ - word32 g[8], c_old[8], i; - - /* Save old counter values */ - for (i=0; i<8; i++) - c_old[i] = ctx->c[i]; - - /* Calculate new counter values */ - ctx->c[0] = U32V(ctx->c[0] + 0x4D34D34D + ctx->carry); - ctx->c[1] = U32V(ctx->c[1] + 0xD34D34D3 + (ctx->c[0] < c_old[0])); - ctx->c[2] = U32V(ctx->c[2] + 0x34D34D34 + (ctx->c[1] < c_old[1])); - ctx->c[3] = U32V(ctx->c[3] + 0x4D34D34D + (ctx->c[2] < c_old[2])); - ctx->c[4] = U32V(ctx->c[4] + 0xD34D34D3 + (ctx->c[3] < c_old[3])); - ctx->c[5] = U32V(ctx->c[5] + 0x34D34D34 + (ctx->c[4] < c_old[4])); - ctx->c[6] = U32V(ctx->c[6] + 0x4D34D34D + (ctx->c[5] < c_old[5])); - ctx->c[7] = U32V(ctx->c[7] + 0xD34D34D3 + (ctx->c[6] < c_old[6])); - ctx->carry = (ctx->c[7] < c_old[7]); - - /* Calculate the g-values */ - for (i=0;i<8;i++) - g[i] = RABBIT_g_func(U32V(ctx->x[i] + ctx->c[i])); - - /* Calculate new state values */ - ctx->x[0] = U32V(g[0] + rotlFixed(g[7],16) + rotlFixed(g[6], 16)); - ctx->x[1] = U32V(g[1] + rotlFixed(g[0], 8) + g[7]); - ctx->x[2] = U32V(g[2] + rotlFixed(g[1],16) + rotlFixed(g[0], 16)); - ctx->x[3] = U32V(g[3] + rotlFixed(g[2], 8) + g[1]); - ctx->x[4] = U32V(g[4] + rotlFixed(g[3],16) + rotlFixed(g[2], 16)); - ctx->x[5] = U32V(g[5] + rotlFixed(g[4], 8) + g[3]); - ctx->x[6] = U32V(g[6] + rotlFixed(g[5],16) + rotlFixed(g[4], 16)); - ctx->x[7] = U32V(g[7] + rotlFixed(g[6], 8) + g[5]); -} - - -/* IV setup */ -static void RabbitSetIV(Rabbit* ctx, const byte* inIv) -{ - /* Temporary variables */ - word32 i0, i1, i2, i3, i; - word32 iv[2]; - - if (inIv) - XMEMCPY(iv, inIv, sizeof(iv)); - else - XMEMSET(iv, 0, sizeof(iv)); - - /* Generate four subvectors */ - i0 = LITTLE32(iv[0]); - i2 = LITTLE32(iv[1]); - i1 = (i0>>16) | (i2&0xFFFF0000); - i3 = (i2<<16) | (i0&0x0000FFFF); - - /* Modify counter values */ - ctx->workCtx.c[0] = ctx->masterCtx.c[0] ^ i0; - ctx->workCtx.c[1] = ctx->masterCtx.c[1] ^ i1; - ctx->workCtx.c[2] = ctx->masterCtx.c[2] ^ i2; - ctx->workCtx.c[3] = ctx->masterCtx.c[3] ^ i3; - ctx->workCtx.c[4] = ctx->masterCtx.c[4] ^ i0; - ctx->workCtx.c[5] = ctx->masterCtx.c[5] ^ i1; - ctx->workCtx.c[6] = ctx->masterCtx.c[6] ^ i2; - ctx->workCtx.c[7] = ctx->masterCtx.c[7] ^ i3; - - /* Copy state variables */ - for (i=0; i<8; i++) - ctx->workCtx.x[i] = ctx->masterCtx.x[i]; - ctx->workCtx.carry = ctx->masterCtx.carry; - - /* Iterate the system four times */ - for (i=0; i<4; i++) - RABBIT_next_state(&(ctx->workCtx)); -} - - -/* Key setup */ -static INLINE int DoKey(Rabbit* ctx, const byte* key, const byte* iv) -{ - /* Temporary variables */ - word32 k0, k1, k2, k3, i; - - /* Generate four subkeys */ - k0 = LITTLE32(*(word32*)(key+ 0)); - k1 = LITTLE32(*(word32*)(key+ 4)); - k2 = LITTLE32(*(word32*)(key+ 8)); - k3 = LITTLE32(*(word32*)(key+12)); - - /* Generate initial state variables */ - ctx->masterCtx.x[0] = k0; - ctx->masterCtx.x[2] = k1; - ctx->masterCtx.x[4] = k2; - ctx->masterCtx.x[6] = k3; - ctx->masterCtx.x[1] = U32V(k3<<16) | (k2>>16); - ctx->masterCtx.x[3] = U32V(k0<<16) | (k3>>16); - ctx->masterCtx.x[5] = U32V(k1<<16) | (k0>>16); - ctx->masterCtx.x[7] = U32V(k2<<16) | (k1>>16); - - /* Generate initial counter values */ - ctx->masterCtx.c[0] = rotlFixed(k2, 16); - ctx->masterCtx.c[2] = rotlFixed(k3, 16); - ctx->masterCtx.c[4] = rotlFixed(k0, 16); - ctx->masterCtx.c[6] = rotlFixed(k1, 16); - ctx->masterCtx.c[1] = (k0&0xFFFF0000) | (k1&0xFFFF); - ctx->masterCtx.c[3] = (k1&0xFFFF0000) | (k2&0xFFFF); - ctx->masterCtx.c[5] = (k2&0xFFFF0000) | (k3&0xFFFF); - ctx->masterCtx.c[7] = (k3&0xFFFF0000) | (k0&0xFFFF); - - /* Clear carry bit */ - ctx->masterCtx.carry = 0; - - /* Iterate the system four times */ - for (i=0; i<4; i++) - RABBIT_next_state(&(ctx->masterCtx)); - - /* Modify the counters */ - for (i=0; i<8; i++) - ctx->masterCtx.c[i] ^= ctx->masterCtx.x[(i+4)&0x7]; - - /* Copy master instance to work instance */ - for (i=0; i<8; i++) { - ctx->workCtx.x[i] = ctx->masterCtx.x[i]; - ctx->workCtx.c[i] = ctx->masterCtx.c[i]; - } - ctx->workCtx.carry = ctx->masterCtx.carry; - - RabbitSetIV(ctx, iv); - - return 0; -} - - -/* Key setup */ -int RabbitSetKey(Rabbit* ctx, const byte* key, const byte* iv) -{ -#ifdef XSTREAM_ALIGN - if ((word)key % 4) { - int alignKey[4]; - - /* iv aligned in SetIV */ - CYASSL_MSG("RabbitSetKey unaligned key"); - - XMEMCPY(alignKey, key, sizeof(alignKey)); - - return DoKey(ctx, (const byte*)alignKey, iv); - } -#endif /* XSTREAM_ALIGN */ - - return DoKey(ctx, key, iv); -} - - -/* Encrypt/decrypt a message of any size */ -static INLINE int DoProcess(Rabbit* ctx, byte* output, const byte* input, - word32 msglen) -{ - /* Encrypt/decrypt all full blocks */ - while (msglen >= 16) { - /* Iterate the system */ - RABBIT_next_state(&(ctx->workCtx)); - - /* Encrypt/decrypt 16 bytes of data */ - *(word32*)(output+ 0) = *(word32*)(input+ 0) ^ - LITTLE32(ctx->workCtx.x[0] ^ (ctx->workCtx.x[5]>>16) ^ - U32V(ctx->workCtx.x[3]<<16)); - *(word32*)(output+ 4) = *(word32*)(input+ 4) ^ - LITTLE32(ctx->workCtx.x[2] ^ (ctx->workCtx.x[7]>>16) ^ - U32V(ctx->workCtx.x[5]<<16)); - *(word32*)(output+ 8) = *(word32*)(input+ 8) ^ - LITTLE32(ctx->workCtx.x[4] ^ (ctx->workCtx.x[1]>>16) ^ - U32V(ctx->workCtx.x[7]<<16)); - *(word32*)(output+12) = *(word32*)(input+12) ^ - LITTLE32(ctx->workCtx.x[6] ^ (ctx->workCtx.x[3]>>16) ^ - U32V(ctx->workCtx.x[1]<<16)); - - /* Increment pointers and decrement length */ - input += 16; - output += 16; - msglen -= 16; - } - - /* Encrypt/decrypt remaining data */ - if (msglen) { - - word32 i; - word32 tmp[4]; - byte* buffer = (byte*)tmp; - - XMEMSET(tmp, 0, sizeof(tmp)); /* help static analysis */ - - /* Iterate the system */ - RABBIT_next_state(&(ctx->workCtx)); - - /* Generate 16 bytes of pseudo-random data */ - tmp[0] = LITTLE32(ctx->workCtx.x[0] ^ - (ctx->workCtx.x[5]>>16) ^ U32V(ctx->workCtx.x[3]<<16)); - tmp[1] = LITTLE32(ctx->workCtx.x[2] ^ - (ctx->workCtx.x[7]>>16) ^ U32V(ctx->workCtx.x[5]<<16)); - tmp[2] = LITTLE32(ctx->workCtx.x[4] ^ - (ctx->workCtx.x[1]>>16) ^ U32V(ctx->workCtx.x[7]<<16)); - tmp[3] = LITTLE32(ctx->workCtx.x[6] ^ - (ctx->workCtx.x[3]>>16) ^ U32V(ctx->workCtx.x[1]<<16)); - - /* Encrypt/decrypt the data */ - for (i=0; i -#endif - -#include - -/* on HPUX 11 you may need to install /dev/random see - http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I - -*/ - -#include -#include - -#ifdef NO_RC4 - #include - - #ifdef NO_INLINE - #include - #else - #define MISC_DUMM_FUNC misc_dummy_random - #include - #endif -#endif - -#if defined(USE_WINDOWS_API) - #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0400 - #endif - #include - #include -#else - #if !defined(NO_DEV_RANDOM) && !defined(CYASSL_MDK_ARM) \ - && !defined(CYASSL_IAR_ARM) - #include - #ifndef EBSNET - #include - #endif - #else - /* include headers that may be needed to get good seed */ - #endif -#endif /* USE_WINDOWS_API */ - - -#ifdef NO_RC4 - -/* Start NIST DRBG code */ - -#define OUTPUT_BLOCK_LEN (256/8) -#define MAX_REQUEST_LEN (0x1000) -#define MAX_STRING_LEN (0x100000000) -#define RESEED_MAX (0x100000000000LL) -#define ENTROPY_SZ 256 - -#define DBRG_SUCCESS 0 -#define DBRG_ERROR 1 -#define DBRG_NEED_RESEED 2 - - -enum { - dbrgInitC = 0, - dbrgReseed = 1, - dbrgGenerateW = 2, - dbrgGenerateH = 3, - dbrgInitV -}; - - -static int Hash_df(RNG* rng, byte* out, word32 outSz, byte type, byte* inA, word32 inASz, - byte* inB, word32 inBSz, byte* inC, word32 inCSz) -{ - byte ctr; - int i; - int len; - word32 bits = (outSz * 8); /* reverse byte order */ - - #ifdef LITTLE_ENDIAN_ORDER - bits = ByteReverseWord32(bits); - #endif - len = (outSz / SHA256_DIGEST_SIZE) - + ((outSz % SHA256_DIGEST_SIZE) ? 1 : 0); - - for (i = 0, ctr = 1; i < len; i++, ctr++) - { - if (InitSha256(&rng->sha) != 0) - return DBRG_ERROR; - - if (Sha256Update(&rng->sha, &ctr, sizeof(ctr)) != 0) - return DBRG_ERROR; - - if (Sha256Update(&rng->sha, (byte*)&bits, sizeof(bits)) != 0) - return DBRG_ERROR; - - /* churning V is the only string that doesn't have - * the type added */ - if (type != dbrgInitV) - if (Sha256Update(&rng->sha, &type, sizeof(type)) != 0) - return DBRG_ERROR; - - if (Sha256Update(&rng->sha, inA, inASz) != 0) - return DBRG_ERROR; - - if (inB != NULL && inBSz > 0) - if (Sha256Update(&rng->sha, inB, inBSz) != 0) - return DBRG_ERROR; - - if (inC != NULL && inCSz > 0) - if (Sha256Update(&rng->sha, inC, inCSz) != 0) - return DBRG_ERROR; - - if (Sha256Final(&rng->sha, rng->digest) != 0) - return DBRG_ERROR; - - if (outSz > SHA256_DIGEST_SIZE) { - XMEMCPY(out, rng->digest, SHA256_DIGEST_SIZE); - outSz -= SHA256_DIGEST_SIZE; - out += SHA256_DIGEST_SIZE; - } - else { - XMEMCPY(out, rng->digest, outSz); - } - } - - return DBRG_SUCCESS; -} - - -static int Hash_DBRG_Reseed(RNG* rng, byte* entropy, word32 entropySz) -{ - int ret; - byte seed[DBRG_SEED_LEN]; - - ret = Hash_df(rng, seed, sizeof(seed), dbrgInitV, rng->V, sizeof(rng->V), - entropy, entropySz, NULL, 0); - if (ret != 0) - return ret; - - XMEMCPY(rng->V, seed, sizeof(rng->V)); - XMEMSET(seed, 0, sizeof(seed)); - - ret = Hash_df(rng, rng->C, sizeof(rng->C), dbrgInitC, rng->V, - sizeof(rng->V), NULL, 0, NULL, 0); - if (ret != 0) - return ret; - - rng->reseed_ctr = 1; - return 0; -} - -static INLINE void array_add_one(byte* data, word32 dataSz) -{ - int i; - - for (i = dataSz - 1; i >= 0; i--) - { - data[i]++; - if (data[i] != 0) break; - } -} - -static int Hash_gen(RNG* rng, byte* out, word32 outSz, byte* V) -{ - byte data[DBRG_SEED_LEN]; - int i, ret; - int len = (outSz / SHA256_DIGEST_SIZE) - + ((outSz % SHA256_DIGEST_SIZE) ? 1 : 0); - - XMEMCPY(data, V, sizeof(data)); - for (i = 0; i < len; i++) { - ret = InitSha256(&rng->sha); - if (ret != 0) - return ret; - - ret = Sha256Update(&rng->sha, data, sizeof(data)); - if (ret != 0) - return ret; - - ret = Sha256Final(&rng->sha, rng->digest); - if (ret != 0) - return ret; - - if (outSz > SHA256_DIGEST_SIZE) { - XMEMCPY(out, rng->digest, SHA256_DIGEST_SIZE); - outSz -= SHA256_DIGEST_SIZE; - out += SHA256_DIGEST_SIZE; - array_add_one(data, DBRG_SEED_LEN); - } - else { - XMEMCPY(out, rng->digest, outSz); - } - } - XMEMSET(data, 0, sizeof(data)); - - return 0; -} - - -static INLINE void array_add(byte* d, word32 dLen, byte* s, word32 sLen) -{ - word16 carry = 0; - - if (dLen > 0 && sLen > 0 && dLen >= sLen) { - int sIdx, dIdx; - - for (sIdx = sLen - 1, dIdx = dLen - 1; sIdx >= 0; dIdx--, sIdx--) - { - carry += d[dIdx] + s[sIdx]; - d[dIdx] = carry; - carry >>= 8; - } - if (dIdx > 0) - d[dIdx] += carry; - } -} - - -static int Hash_DBRG_Generate(RNG* rng, byte* out, word32 outSz) -{ - int ret; - - if (rng->reseed_ctr != RESEED_MAX) { - byte type = dbrgGenerateH; - - if (Hash_gen(rng, out, outSz, rng->V) != 0) - return DBRG_ERROR; - if (InitSha256(&rng->sha) != 0) - return DBRG_ERROR; - if (Sha256Update(&rng->sha, &type, sizeof(type)) != 0) - return DBRG_ERROR; - if (Sha256Update(&rng->sha, rng->V, sizeof(rng->V)) != 0) - return DBRG_ERROR; - if (Sha256Final(&rng->sha, rng->digest) != 0) - return DBRG_ERROR; - - array_add(rng->V, sizeof(rng->V), rng->digest, sizeof(rng->digest)); - array_add(rng->V, sizeof(rng->V), rng->C, sizeof(rng->C)); - array_add(rng->V, sizeof(rng->V), - (byte*)&rng->reseed_ctr, sizeof(rng->reseed_ctr)); - rng->reseed_ctr++; - ret = DBRG_SUCCESS; - } - else { - ret = DBRG_NEED_RESEED; - } - return ret; -} - - -static int Hash_DBRG_Instantiate(RNG* rng, byte* seed, word32 seedSz) -{ - int ret; - - XMEMSET(rng, 0, sizeof(*rng)); - ret = Hash_df(rng, rng->V, sizeof(rng->V), dbrgInitV, seed, seedSz, NULL, 0, - NULL, 0); - if (ret != 0) - return ret; - - ret = Hash_df(rng, rng->C, sizeof(rng->C), dbrgInitC, rng->V, - sizeof(rng->V), NULL, 0, NULL, 0); - if (ret != 0) - return ret; - - rng->reseed_ctr = 1; - - return 0; -} - - -static int Hash_DBRG_Uninstantiate(RNG* rng) -{ - int result = DBRG_ERROR; - - if (rng != NULL) { - XMEMSET(rng, 0, sizeof(*rng)); - result = DBRG_SUCCESS; - } - - return result; -} - -/* End NIST DRBG Code */ - - - -/* Get seed and key cipher */ -int InitRng(RNG* rng) -{ -#ifdef CYASSL_SMALL_STACK - byte* entropy; -#else - byte entropy[ENTROPY_SZ]; -#endif - int ret = DBRG_ERROR; - -#ifdef CYASSL_SMALL_STACK - entropy = (byte*)XMALLOC(ENTROPY_SZ, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (entropy == NULL) - return MEMORY_E; -#endif - - if (GenerateSeed(&rng->seed, entropy, ENTROPY_SZ) == 0) - ret = Hash_DBRG_Instantiate(rng, entropy, ENTROPY_SZ); - - XMEMSET(entropy, 0, ENTROPY_SZ); - -#ifdef CYASSL_SMALL_STACK - XFREE(entropy, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - - -/* place a generated block in output */ -int RNG_GenerateBlock(RNG* rng, byte* output, word32 sz) -{ - int ret; - - XMEMSET(output, 0, sz); - ret = Hash_DBRG_Generate(rng, output, sz); - - if (ret == DBRG_NEED_RESEED) { -#ifdef CYASSL_SMALL_STACK - byte* entropy; -#else - byte entropy[ENTROPY_SZ]; -#endif - -#ifdef CYASSL_SMALL_STACK - entropy = (byte*)XMALLOC(ENTROPY_SZ, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (entropy == NULL) - return MEMORY_E; -#endif - - ret = GenerateSeed(&rng->seed, entropy, ENTROPY_SZ); - if (ret == 0) { - ret = Hash_DBRG_Reseed(rng, entropy, ENTROPY_SZ); - - if (ret == 0) - ret = Hash_DBRG_Generate(rng, output, sz); - } - else - ret = DBRG_ERROR; - - XMEMSET(entropy, 0, ENTROPY_SZ); - -#ifdef CYASSL_SMALL_STACK - XFREE(entropy, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - } - - return ret; -} - - -int RNG_GenerateByte(RNG* rng, byte* b) -{ - return RNG_GenerateBlock(rng, b, 1); -} - - -void FreeRng(RNG* rng) -{ - Hash_DBRG_Uninstantiate(rng); -} - -#else /* NO_RC4 */ - -/* Get seed and key cipher */ -int InitRng(RNG* rng) -{ - int ret; -#ifdef CYASSL_SMALL_STACK - byte* key; - byte* junk; -#else - byte key[32]; - byte junk[256]; -#endif - -#ifdef HAVE_CAVIUM - if (rng->magic == CYASSL_RNG_CAVIUM_MAGIC) - return 0; -#endif - -#ifdef CYASSL_SMALL_STACK - key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (key == NULL) - return MEMORY_E; - - junk = (byte*)XMALLOC(256, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (junk == NULL) { - XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); - return MEMORY_E; - } -#endif - - ret = GenerateSeed(&rng->seed, key, 32); - - if (ret == 0) { - Arc4SetKey(&rng->cipher, key, sizeof(key)); - - ret = RNG_GenerateBlock(rng, junk, 256); /*rid initial state*/ - } - -#ifdef CYASSL_SMALL_STACK - XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); - XFREE(junk, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return ret; -} - -#ifdef HAVE_CAVIUM - static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz); -#endif - -/* place a generated block in output */ -int RNG_GenerateBlock(RNG* rng, byte* output, word32 sz) -{ -#ifdef HAVE_CAVIUM - if (rng->magic == CYASSL_RNG_CAVIUM_MAGIC) - return CaviumRNG_GenerateBlock(rng, output, sz); -#endif - XMEMSET(output, 0, sz); - Arc4Process(&rng->cipher, output, output, sz); - - return 0; -} - - -int RNG_GenerateByte(RNG* rng, byte* b) -{ - return RNG_GenerateBlock(rng, b, 1); -} - - -#ifdef HAVE_CAVIUM - -#include -#include "cavium_common.h" - -/* Initiliaze RNG for use with Nitrox device */ -int InitRngCavium(RNG* rng, int devId) -{ - if (rng == NULL) - return -1; - - rng->devId = devId; - rng->magic = CYASSL_RNG_CAVIUM_MAGIC; - - return 0; -} - - -static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz) -{ - word offset = 0; - word32 requestId; - - while (sz > CYASSL_MAX_16BIT) { - word16 slen = (word16)CYASSL_MAX_16BIT; - if (CspRandom(CAVIUM_BLOCKING, slen, output + offset, &requestId, - rng->devId) != 0) { - CYASSL_MSG("Cavium RNG failed"); - } - sz -= CYASSL_MAX_16BIT; - offset += CYASSL_MAX_16BIT; - } - if (sz) { - word16 slen = (word16)sz; - if (CspRandom(CAVIUM_BLOCKING, slen, output + offset, &requestId, - rng->devId) != 0) { - CYASSL_MSG("Cavium RNG failed"); - } - } -} - -#endif /* HAVE_CAVIUM */ - -#endif /* NO_RC4 */ - - -#if defined(USE_WINDOWS_API) - - -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - if(!CryptAcquireContext(&os->handle, 0, 0, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) - return WINCRYPT_E; - - if (!CryptGenRandom(os->handle, sz, output)) - return CRYPTGEN_E; - - CryptReleaseContext(os->handle, 0); - - return 0; -} - - -#elif defined(HAVE_RTP_SYS) || defined(EBSNET) - -#include "rtprand.h" /* rtp_rand () */ -#include "rtptime.h" /* rtp_get_system_msec() */ - - -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - int i; - rtp_srand(rtp_get_system_msec()); - - for (i = 0; i < sz; i++ ) { - output[i] = rtp_rand() % 256; - if ( (i % 8) == 7) - rtp_srand(rtp_get_system_msec()); - } - - return 0; -} - - -#elif defined(MICRIUM) - -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - NetSecure_InitSeed(output, sz); - #endif - return 0; -} - -#elif defined(MBED) - -/* write a real one !!!, just for testing board */ -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - int i; - for (i = 0; i < sz; i++ ) - output[i] = i; - - return 0; -} - -#elif defined(MICROCHIP_PIC32) - -#ifdef MICROCHIP_MPLAB_HARMONY - #define PIC32_SEED_COUNT _CP0_GET_COUNT -#else - #if !defined(CYASSL_MICROCHIP_PIC32MZ) - #include - #endif - #define PIC32_SEED_COUNT ReadCoreTimer -#endif - #ifdef CYASSL_MIC32MZ_RNG - #include "xc.h" - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i ; - byte rnd[8] ; - word32 *rnd32 = (word32 *)rnd ; - word32 size = sz ; - byte* op = output ; - - /* This part has to be replaced with better random seed */ - RNGNUMGEN1 = ReadCoreTimer(); - RNGPOLY1 = ReadCoreTimer(); - RNGPOLY2 = ReadCoreTimer(); - RNGNUMGEN2 = ReadCoreTimer(); -#ifdef DEBUG_CYASSL - printf("GenerateSeed::Seed=%08x, %08x\n", RNGNUMGEN1, RNGNUMGEN2) ; -#endif - RNGCONbits.PLEN = 0x40; - RNGCONbits.PRNGEN = 1; - for(i=0; i<5; i++) { /* wait for RNGNUMGEN ready */ - volatile int x ; - x = RNGNUMGEN1 ; - x = RNGNUMGEN2 ; - } - do { - rnd32[0] = RNGNUMGEN1; - rnd32[1] = RNGNUMGEN2; - - for(i=0; i<8; i++, op++) { - *op = rnd[i] ; - size -- ; - if(size==0)break ; - } - } while(size) ; - return 0; - } - #else /* CYASSL_MIC32MZ_RNG */ - /* uses the core timer, in nanoseconds to seed srand */ - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - srand(PIC32_SEED_COUNT() * 25); - - for (i = 0; i < sz; i++ ) { - output[i] = rand() % 256; - if ( (i % 8) == 7) - srand(PIC32_SEED_COUNT() * 25); - } - return 0; - } - #endif /* CYASSL_MIC32MZ_RNG */ - -#elif defined(FREESCALE_MQX) - - #ifdef FREESCALE_K70_RNGA - /* - * Generates a RNG seed using the Random Number Generator Accelerator - * on the Kinetis K70. Documentation located in Chapter 37 of - * K70 Sub-Family Reference Manual (see Note 3 in the README for link). - */ - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - - /* turn on RNGA module */ - SIM_SCGC3 |= SIM_SCGC3_RNGA_MASK; - - /* set SLP bit to 0 - "RNGA is not in sleep mode" */ - RNG_CR &= ~RNG_CR_SLP_MASK; - - /* set HA bit to 1 - "security violations masked" */ - RNG_CR |= RNG_CR_HA_MASK; - - /* set GO bit to 1 - "output register loaded with data" */ - RNG_CR |= RNG_CR_GO_MASK; - - for (i = 0; i < sz; i++) { - - /* wait for RNG FIFO to be full */ - while((RNG_SR & RNG_SR_OREG_LVL(0xF)) == 0) {} - - /* get value */ - output[i] = RNG_OR; - } - - return 0; - } - - #elif defined(FREESCALE_K53_RNGB) - /* - * Generates a RNG seed using the Random Number Generator (RNGB) - * on the Kinetis K53. Documentation located in Chapter 33 of - * K53 Sub-Family Reference Manual (see note in the README for link). - */ - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - - /* turn on RNGB module */ - SIM_SCGC3 |= SIM_SCGC3_RNGB_MASK; - - /* reset RNGB */ - RNG_CMD |= RNG_CMD_SR_MASK; - - /* FIFO generate interrupt, return all zeros on underflow, - * set auto reseed */ - RNG_CR |= (RNG_CR_FUFMOD_MASK | RNG_CR_AR_MASK); - - /* gen seed, clear interrupts, clear errors */ - RNG_CMD |= (RNG_CMD_GS_MASK | RNG_CMD_CI_MASK | RNG_CMD_CE_MASK); - - /* wait for seeding to complete */ - while ((RNG_SR & RNG_SR_SDN_MASK) == 0) {} - - for (i = 0; i < sz; i++) { - - /* wait for a word to be available from FIFO */ - while((RNG_SR & RNG_SR_FIFO_LVL_MASK) == 0) {} - - /* get value */ - output[i] = RNG_OUT; - } - - return 0; - } - - #else - #warning "write a real random seed!!!!, just for testing now" - - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - for (i = 0; i < sz; i++ ) - output[i] = i; - - return 0; - } - #endif /* FREESCALE_K70_RNGA */ - -#elif defined(CYASSL_SAFERTOS) || defined(CYASSL_LEANPSK) \ - || defined(CYASSL_IAR_ARM) - -#warning "write a real random seed!!!!, just for testing now" - -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - word32 i; - for (i = 0; i < sz; i++ ) - output[i] = i; - - (void)os; - - return 0; -} - -#elif defined(STM32F2_RNG) - #undef RNG - #include "stm32f2xx_rng.h" - #include "stm32f2xx_rcc.h" - /* - * Generate a RNG seed using the hardware random number generator - * on the STM32F2. Documentation located in STM32F2xx Standard Peripheral - * Library document (See note in README). - */ - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - - /* enable RNG clock source */ - RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG, ENABLE); - - /* enable RNG peripheral */ - RNG_Cmd(ENABLE); - - for (i = 0; i < sz; i++) { - /* wait until RNG number is ready */ - while(RNG_GetFlagStatus(RNG_FLAG_DRDY)== RESET) { } - - /* get value */ - output[i] = RNG_GetRandomNumber(); - } - - return 0; - } -#elif defined(CYASSL_LPC43xx) || defined(CYASSL_STM32F2xx) - - #warning "write a real random seed!!!!, just for testing now" - - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - - for (i = 0; i < sz; i++ ) - output[i] = i; - - return 0; - } - -#elif defined(CUSTOM_RAND_GENERATE) - - /* Implement your own random generation function - * word32 rand_gen(void); - * #define CUSTOM_RAND_GENERATE rand_gen */ - - int GenerateSeed(OS_Seed* os, byte* output, word32 sz) - { - int i; - - for (i = 0; i < sz; i++ ) - output[i] = CUSTOM_RAND_GENERATE(); - - return 0; - } - -#elif defined(NO_DEV_RANDOM) - -#error "you need to write an os specific GenerateSeed() here" - -/* -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - return 0; -} -*/ - - -#else /* !USE_WINDOWS_API && !HAVE_RPT_SYS && !MICRIUM && !NO_DEV_RANDOM */ - - -/* may block */ -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - int ret = 0; - - os->fd = open("/dev/urandom",O_RDONLY); - if (os->fd == -1) { - /* may still have /dev/random */ - os->fd = open("/dev/random",O_RDONLY); - if (os->fd == -1) - return OPEN_RAN_E; - } - - while (sz) { - int len = (int)read(os->fd, output, sz); - if (len == -1) { - ret = READ_RAN_E; - break; - } - - sz -= len; - output += len; - - if (sz) { -#ifdef BLOCKING - sleep(0); /* context switch */ -#else - ret = RAN_BLOCK_E; - break; -#endif - } - } - close(os->fd); - - return ret; -} - -#endif /* USE_WINDOWS_API */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c b/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c deleted file mode 100644 index 69ff9066..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/ripemd.c +++ /dev/null @@ -1,354 +0,0 @@ -/* ripemd.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef CYASSL_RIPEMD - -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -void InitRipeMd(RipeMd* ripemd) -{ - ripemd->digest[0] = 0x67452301L; - ripemd->digest[1] = 0xEFCDAB89L; - ripemd->digest[2] = 0x98BADCFEL; - ripemd->digest[3] = 0x10325476L; - ripemd->digest[4] = 0xC3D2E1F0L; - - ripemd->buffLen = 0; - ripemd->loLen = 0; - ripemd->hiLen = 0; -} - - -/* for all */ -#define F(x, y, z) (x ^ y ^ z) -#define G(x, y, z) (z ^ (x & (y^z))) -#define H(x, y, z) (z ^ (x | ~y)) -#define I(x, y, z) (y ^ (z & (x^y))) -#define J(x, y, z) (x ^ (y | ~z)) - -#define k0 0 -#define k1 0x5a827999 -#define k2 0x6ed9eba1 -#define k3 0x8f1bbcdc -#define k4 0xa953fd4e -#define k5 0x50a28be6 -#define k6 0x5c4dd124 -#define k7 0x6d703ef3 -#define k8 0x7a6d76e9 -#define k9 0 - -/* for 160 and 320 */ -#define Subround(f, a, b, c, d, e, x, s, k) \ - a += f(b, c, d) + x + k;\ - a = rotlFixed((word32)a, s) + e;\ - c = rotlFixed((word32)c, 10U) - -static void Transform(RipeMd* ripemd) -{ - word32 a1, b1, c1, d1, e1, a2, b2, c2, d2, e2; - a1 = a2 = ripemd->digest[0]; - b1 = b2 = ripemd->digest[1]; - c1 = c2 = ripemd->digest[2]; - d1 = d2 = ripemd->digest[3]; - e1 = e2 = ripemd->digest[4]; - - Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 11, k0); - Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[ 1], 14, k0); - Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[ 2], 15, k0); - Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[ 3], 12, k0); - Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[ 4], 5, k0); - Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[ 5], 8, k0); - Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[ 6], 7, k0); - Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[ 7], 9, k0); - Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 11, k0); - Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[ 9], 13, k0); - Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[10], 14, k0); - Subround(F, e1, a1, b1, c1, d1, ripemd->buffer[11], 15, k0); - Subround(F, d1, e1, a1, b1, c1, ripemd->buffer[12], 6, k0); - Subround(F, c1, d1, e1, a1, b1, ripemd->buffer[13], 7, k0); - Subround(F, b1, c1, d1, e1, a1, ripemd->buffer[14], 9, k0); - Subround(F, a1, b1, c1, d1, e1, ripemd->buffer[15], 8, k0); - - Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 7], 7, k1); - Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[ 4], 6, k1); - Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[13], 8, k1); - Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[10], 11, k1); - Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 6], 9, k1); - Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[15], 7, k1); - Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[ 3], 15, k1); - Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[12], 7, k1); - Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 12, k1); - Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 9], 15, k1); - Subround(G, d1, e1, a1, b1, c1, ripemd->buffer[ 5], 9, k1); - Subround(G, c1, d1, e1, a1, b1, ripemd->buffer[ 2], 11, k1); - Subround(G, b1, c1, d1, e1, a1, ripemd->buffer[14], 7, k1); - Subround(G, a1, b1, c1, d1, e1, ripemd->buffer[11], 13, k1); - Subround(G, e1, a1, b1, c1, d1, ripemd->buffer[ 8], 12, k1); - - Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[ 3], 11, k2); - Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[10], 13, k2); - Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[14], 6, k2); - Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[ 4], 7, k2); - Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 9], 14, k2); - Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[15], 9, k2); - Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 13, k2); - Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[ 2], 14, k2); - Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 7], 8, k2); - Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[ 0], 13, k2); - Subround(H, c1, d1, e1, a1, b1, ripemd->buffer[ 6], 6, k2); - Subround(H, b1, c1, d1, e1, a1, ripemd->buffer[13], 5, k2); - Subround(H, a1, b1, c1, d1, e1, ripemd->buffer[11], 12, k2); - Subround(H, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 7, k2); - Subround(H, d1, e1, a1, b1, c1, ripemd->buffer[12], 5, k2); - - Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 1], 11, k3); - Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[ 9], 12, k3); - Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[11], 14, k3); - Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[10], 15, k3); - Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 0], 14, k3); - Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 8], 15, k3); - Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[12], 9, k3); - Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[ 4], 8, k3); - Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[13], 9, k3); - Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 3], 14, k3); - Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 7], 5, k3); - Subround(I, b1, c1, d1, e1, a1, ripemd->buffer[15], 6, k3); - Subround(I, a1, b1, c1, d1, e1, ripemd->buffer[14], 8, k3); - Subround(I, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 6, k3); - Subround(I, d1, e1, a1, b1, c1, ripemd->buffer[ 6], 5, k3); - Subround(I, c1, d1, e1, a1, b1, ripemd->buffer[ 2], 12, k3); - - Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[ 4], 9, k4); - Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 0], 15, k4); - Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[ 5], 5, k4); - Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[ 9], 11, k4); - Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[ 7], 6, k4); - Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[12], 8, k4); - Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 2], 13, k4); - Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[10], 12, k4); - Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[14], 5, k4); - Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[ 1], 12, k4); - Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[ 3], 13, k4); - Subround(J, a1, b1, c1, d1, e1, ripemd->buffer[ 8], 14, k4); - Subround(J, e1, a1, b1, c1, d1, ripemd->buffer[11], 11, k4); - Subround(J, d1, e1, a1, b1, c1, ripemd->buffer[ 6], 8, k4); - Subround(J, c1, d1, e1, a1, b1, ripemd->buffer[15], 5, k4); - Subround(J, b1, c1, d1, e1, a1, ripemd->buffer[13], 6, k4); - - Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[ 5], 8, k5); - Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[14], 9, k5); - Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 7], 9, k5); - Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[ 0], 11, k5); - Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 13, k5); - Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[ 2], 15, k5); - Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[11], 15, k5); - Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 4], 5, k5); - Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[13], 7, k5); - Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 6], 7, k5); - Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[15], 8, k5); - Subround(J, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 11, k5); - Subround(J, d2, e2, a2, b2, c2, ripemd->buffer[ 1], 14, k5); - Subround(J, c2, d2, e2, a2, b2, ripemd->buffer[10], 14, k5); - Subround(J, b2, c2, d2, e2, a2, ripemd->buffer[ 3], 12, k5); - Subround(J, a2, b2, c2, d2, e2, ripemd->buffer[12], 6, k5); - - Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 6], 9, k6); - Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[11], 13, k6); - Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[ 3], 15, k6); - Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[ 7], 7, k6); - Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 12, k6); - Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[13], 8, k6); - Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[ 5], 9, k6); - Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[10], 11, k6); - Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[14], 7, k6); - Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[15], 7, k6); - Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 12, k6); - Subround(I, d2, e2, a2, b2, c2, ripemd->buffer[12], 7, k6); - Subround(I, c2, d2, e2, a2, b2, ripemd->buffer[ 4], 6, k6); - Subround(I, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 15, k6); - Subround(I, a2, b2, c2, d2, e2, ripemd->buffer[ 1], 13, k6); - Subround(I, e2, a2, b2, c2, d2, ripemd->buffer[ 2], 11, k6); - - Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[15], 9, k7); - Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 5], 7, k7); - Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[ 1], 15, k7); - Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[ 3], 11, k7); - Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 8, k7); - Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[14], 6, k7); - Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 6], 6, k7); - Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[ 9], 14, k7); - Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[11], 12, k7); - Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 8], 13, k7); - Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[12], 5, k7); - Subround(H, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 14, k7); - Subround(H, b2, c2, d2, e2, a2, ripemd->buffer[10], 13, k7); - Subround(H, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 13, k7); - Subround(H, e2, a2, b2, c2, d2, ripemd->buffer[ 4], 7, k7); - Subround(H, d2, e2, a2, b2, c2, ripemd->buffer[13], 5, k7); - - Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[ 8], 15, k8); - Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[ 6], 5, k8); - Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 4], 8, k8); - Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 1], 11, k8); - Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[ 3], 14, k8); - Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[11], 14, k8); - Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[15], 6, k8); - Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 0], 14, k8); - Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 5], 6, k8); - Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[12], 9, k8); - Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 12, k8); - Subround(G, b2, c2, d2, e2, a2, ripemd->buffer[13], 9, k8); - Subround(G, a2, b2, c2, d2, e2, ripemd->buffer[ 9], 12, k8); - Subround(G, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 5, k8); - Subround(G, d2, e2, a2, b2, c2, ripemd->buffer[10], 15, k8); - Subround(G, c2, d2, e2, a2, b2, ripemd->buffer[14], 8, k8); - - Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[12], 8, k9); - Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[15], 5, k9); - Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[10], 12, k9); - Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 4], 9, k9); - Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 1], 12, k9); - Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[ 5], 5, k9); - Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[ 8], 14, k9); - Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[ 7], 6, k9); - Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 6], 8, k9); - Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 2], 13, k9); - Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[13], 6, k9); - Subround(F, a2, b2, c2, d2, e2, ripemd->buffer[14], 5, k9); - Subround(F, e2, a2, b2, c2, d2, ripemd->buffer[ 0], 15, k9); - Subround(F, d2, e2, a2, b2, c2, ripemd->buffer[ 3], 13, k9); - Subround(F, c2, d2, e2, a2, b2, ripemd->buffer[ 9], 11, k9); - Subround(F, b2, c2, d2, e2, a2, ripemd->buffer[11], 11, k9); - - c1 = ripemd->digest[1] + c1 + d2; - ripemd->digest[1] = ripemd->digest[2] + d1 + e2; - ripemd->digest[2] = ripemd->digest[3] + e1 + a2; - ripemd->digest[3] = ripemd->digest[4] + a1 + b2; - ripemd->digest[4] = ripemd->digest[0] + b1 + c2; - ripemd->digest[0] = c1; -} - - -static INLINE void AddLength(RipeMd* ripemd, word32 len) -{ - word32 tmp = ripemd->loLen; - if ( (ripemd->loLen += len) < tmp) - ripemd->hiLen++; /* carry low to high */ -} - - -void RipeMdUpdate(RipeMd* ripemd, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)ripemd->buffer; - - while (len) { - word32 add = min(len, RIPEMD_BLOCK_SIZE - ripemd->buffLen); - XMEMCPY(&local[ripemd->buffLen], data, add); - - ripemd->buffLen += add; - data += add; - len -= add; - - if (ripemd->buffLen == RIPEMD_BLOCK_SIZE) { - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(ripemd->buffer, ripemd->buffer, - RIPEMD_BLOCK_SIZE); - #endif - Transform(ripemd); - AddLength(ripemd, RIPEMD_BLOCK_SIZE); - ripemd->buffLen = 0; - } - } -} - - -void RipeMdFinal(RipeMd* ripemd, byte* hash) -{ - byte* local = (byte*)ripemd->buffer; - - AddLength(ripemd, ripemd->buffLen); /* before adding pads */ - - local[ripemd->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (ripemd->buffLen > RIPEMD_PAD_SIZE) { - XMEMSET(&local[ripemd->buffLen], 0, RIPEMD_BLOCK_SIZE - ripemd->buffLen); - ripemd->buffLen += RIPEMD_BLOCK_SIZE - ripemd->buffLen; - - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(ripemd->buffer, ripemd->buffer, RIPEMD_BLOCK_SIZE); - #endif - Transform(ripemd); - ripemd->buffLen = 0; - } - XMEMSET(&local[ripemd->buffLen], 0, RIPEMD_PAD_SIZE - ripemd->buffLen); - - /* put lengths in bits */ - ripemd->loLen = ripemd->loLen << 3; - ripemd->hiLen = (ripemd->loLen >> (8*sizeof(ripemd->loLen) - 3)) + - (ripemd->hiLen << 3); - - /* store lengths */ - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(ripemd->buffer, ripemd->buffer, RIPEMD_BLOCK_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - XMEMCPY(&local[RIPEMD_PAD_SIZE], &ripemd->loLen, sizeof(word32)); - XMEMCPY(&local[RIPEMD_PAD_SIZE + sizeof(word32)], &ripemd->hiLen, - sizeof(word32)); - - Transform(ripemd); - #ifdef BIG_ENDIAN_ORDER - ByteReverseWords(ripemd->digest, ripemd->digest, RIPEMD_DIGEST_SIZE); - #endif - XMEMCPY(hash, ripemd->digest, RIPEMD_DIGEST_SIZE); - - InitRipeMd(ripemd); /* reset state */ -} - - -#endif /* CYASSL_RIPEMD */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c b/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c deleted file mode 100644 index 648d56f1..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/rsa.c +++ /dev/null @@ -1,834 +0,0 @@ -/* rsa.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef NO_RSA - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include -#include -#include - -#ifdef SHOW_GEN - #ifdef FREESCALE_MQX - #include - #else - #include - #endif -#endif - -#ifdef HAVE_CAVIUM - static int InitCaviumRsaKey(RsaKey* key, void* heap); - static int FreeCaviumRsaKey(RsaKey* key); - static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); - static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); - static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); - static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); -#endif - -enum { - RSA_PUBLIC_ENCRYPT = 0, - RSA_PUBLIC_DECRYPT = 1, - RSA_PRIVATE_ENCRYPT = 2, - RSA_PRIVATE_DECRYPT = 3, - - RSA_BLOCK_TYPE_1 = 1, - RSA_BLOCK_TYPE_2 = 2, - - RSA_MIN_SIZE = 512, - RSA_MAX_SIZE = 4096, - - RSA_MIN_PAD_SZ = 11 /* seperator + 0 + pad value + 8 pads */ -}; - - -int InitRsaKey(RsaKey* key, void* heap) -{ -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return InitCaviumRsaKey(key, heap); -#endif - - key->type = -1; /* haven't decided yet */ - key->heap = heap; - -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - key->n.dp = key->e.dp = 0; /* public alloc parts */ - - key->d.dp = key->p.dp = 0; /* private alloc parts */ - key->q.dp = key->dP.dp = 0; - key->u.dp = key->dQ.dp = 0; -#endif - - return 0; -} - - -int FreeRsaKey(RsaKey* key) -{ - (void)key; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return FreeCaviumRsaKey(key); -#endif - -/* TomsFastMath doesn't use memory allocation */ -#ifndef USE_FAST_MATH - if (key->type == RSA_PRIVATE) { - mp_clear(&key->u); - mp_clear(&key->dQ); - mp_clear(&key->dP); - mp_clear(&key->q); - mp_clear(&key->p); - mp_clear(&key->d); - } - mp_clear(&key->e); - mp_clear(&key->n); -#endif - - return 0; -} - -static int RsaPad(const byte* input, word32 inputLen, byte* pkcsBlock, - word32 pkcsBlockLen, byte padValue, RNG* rng) -{ - if (inputLen == 0) - return 0; - - pkcsBlock[0] = 0x0; /* set first byte to zero and advance */ - pkcsBlock++; pkcsBlockLen--; - pkcsBlock[0] = padValue; /* insert padValue */ - - if (padValue == RSA_BLOCK_TYPE_1) - /* pad with 0xff bytes */ - XMEMSET(&pkcsBlock[1], 0xFF, pkcsBlockLen - inputLen - 2); - else { - /* pad with non-zero random bytes */ - word32 padLen = pkcsBlockLen - inputLen - 1, i; - int ret = RNG_GenerateBlock(rng, &pkcsBlock[1], padLen); - - if (ret != 0) - return ret; - - /* remove zeros */ - for (i = 1; i < padLen; i++) - if (pkcsBlock[i] == 0) pkcsBlock[i] = 0x01; - } - - pkcsBlock[pkcsBlockLen-inputLen-1] = 0; /* separator */ - XMEMCPY(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen); - - return 0; -} - - -static word32 RsaUnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen, - byte **output, byte padValue) -{ - word32 maxOutputLen = (pkcsBlockLen > 10) ? (pkcsBlockLen - 10) : 0, - invalid = 0, - i = 1, - outputLen; - - if (pkcsBlock[0] != 0x0) /* skip past zero */ - invalid = 1; - pkcsBlock++; pkcsBlockLen--; - - /* Require block type padValue */ - invalid = (pkcsBlock[0] != padValue) || invalid; - - /* skip past the padding until we find the separator */ - while (i maxOutputLen) || invalid; - - if (invalid) { - CYASSL_MSG("RsaUnPad error, bad formatting"); - return 0; - } - - *output = (byte *)(pkcsBlock + i); - return outputLen; -} - - -static int RsaFunction(const byte* in, word32 inLen, byte* out, word32* outLen, - int type, RsaKey* key) -{ - #define ERROR_OUT(x) { ret = x; goto done;} - - mp_int tmp; - int ret = 0; - word32 keyLen, len; - - if (mp_init(&tmp) != MP_OKAY) - return MP_INIT_E; - - if (mp_read_unsigned_bin(&tmp, (byte*)in, inLen) != MP_OKAY) - ERROR_OUT(MP_READ_E); - - if (type == RSA_PRIVATE_DECRYPT || type == RSA_PRIVATE_ENCRYPT) { - #ifdef RSA_LOW_MEM /* half as much memory but twice as slow */ - if (mp_exptmod(&tmp, &key->d, &key->n, &tmp) != MP_OKAY) - ERROR_OUT(MP_EXPTMOD_E); - #else - #define INNER_ERROR_OUT(x) { ret = x; goto inner_done; } - - mp_int tmpa, tmpb; - - if (mp_init(&tmpa) != MP_OKAY) - ERROR_OUT(MP_INIT_E); - - if (mp_init(&tmpb) != MP_OKAY) { - mp_clear(&tmpa); - ERROR_OUT(MP_INIT_E); - } - - /* tmpa = tmp^dP mod p */ - if (mp_exptmod(&tmp, &key->dP, &key->p, &tmpa) != MP_OKAY) - INNER_ERROR_OUT(MP_EXPTMOD_E); - - /* tmpb = tmp^dQ mod q */ - if (mp_exptmod(&tmp, &key->dQ, &key->q, &tmpb) != MP_OKAY) - INNER_ERROR_OUT(MP_EXPTMOD_E); - - /* tmp = (tmpa - tmpb) * qInv (mod p) */ - if (mp_sub(&tmpa, &tmpb, &tmp) != MP_OKAY) - INNER_ERROR_OUT(MP_SUB_E); - - if (mp_mulmod(&tmp, &key->u, &key->p, &tmp) != MP_OKAY) - INNER_ERROR_OUT(MP_MULMOD_E); - - /* tmp = tmpb + q * tmp */ - if (mp_mul(&tmp, &key->q, &tmp) != MP_OKAY) - INNER_ERROR_OUT(MP_MUL_E); - - if (mp_add(&tmp, &tmpb, &tmp) != MP_OKAY) - INNER_ERROR_OUT(MP_ADD_E); - - inner_done: - mp_clear(&tmpa); - mp_clear(&tmpb); - - if (ret != 0) return ret; - - #endif /* RSA_LOW_MEM */ - } - else if (type == RSA_PUBLIC_ENCRYPT || type == RSA_PUBLIC_DECRYPT) { - if (mp_exptmod(&tmp, &key->e, &key->n, &tmp) != MP_OKAY) - ERROR_OUT(MP_EXPTMOD_E); - } - else - ERROR_OUT(RSA_WRONG_TYPE_E); - - keyLen = mp_unsigned_bin_size(&key->n); - if (keyLen > *outLen) - ERROR_OUT(RSA_BUFFER_E); - - len = mp_unsigned_bin_size(&tmp); - - /* pad front w/ zeros to match key length */ - while (len < keyLen) { - *out++ = 0x00; - len++; - } - - *outLen = keyLen; - - /* convert */ - if (mp_to_unsigned_bin(&tmp, out) != MP_OKAY) - ERROR_OUT(MP_TO_E); - -done: - mp_clear(&tmp); - return ret; -} - - -int RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, word32 outLen, - RsaKey* key, RNG* rng) -{ - int sz, ret; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return CaviumRsaPublicEncrypt(in, inLen, out, outLen, key); -#endif - - sz = mp_unsigned_bin_size(&key->n); - if (sz > (int)outLen) - return RSA_BUFFER_E; - - if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) - return RSA_BUFFER_E; - - ret = RsaPad(in, inLen, out, sz, RSA_BLOCK_TYPE_2, rng); - if (ret != 0) - return ret; - - if ((ret = RsaFunction(out, sz, out, &outLen, RSA_PUBLIC_ENCRYPT, key)) < 0) - sz = ret; - - return sz; -} - - -int RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, RsaKey* key) -{ - int plainLen, ret; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) { - ret = CaviumRsaPrivateDecrypt(in, inLen, in, inLen, key); - if (ret > 0) - *out = in; - return ret; - } -#endif - - if ((ret = RsaFunction(in, inLen, in, &inLen, RSA_PRIVATE_DECRYPT, key)) - < 0) { - return ret; - } - - plainLen = RsaUnPad(in, inLen, out, RSA_BLOCK_TYPE_2); - - return plainLen; -} - - -int RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, word32 outLen, - RsaKey* key) -{ - int plainLen, ret; - byte* tmp; - byte* pad = 0; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return CaviumRsaPrivateDecrypt(in, inLen, out, outLen, key); -#endif - - tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); - if (tmp == NULL) { - return MEMORY_E; - } - - XMEMCPY(tmp, in, inLen); - - if ((ret = plainLen = RsaPrivateDecryptInline(tmp, inLen, &pad, key)) - < 0) { - XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); - return ret; - } - if (plainLen > (int)outLen) - plainLen = BAD_FUNC_ARG; - else - XMEMCPY(out, pad, plainLen); - XMEMSET(tmp, 0x00, inLen); - - XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); - return plainLen; -} - - -/* for Rsa Verify */ -int RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key) -{ - int plainLen, ret; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) { - ret = CaviumRsaSSL_Verify(in, inLen, in, inLen, key); - if (ret > 0) - *out = in; - return ret; - } -#endif - - if ((ret = RsaFunction(in, inLen, in, &inLen, RSA_PUBLIC_DECRYPT, key)) - < 0) { - return ret; - } - - plainLen = RsaUnPad(in, inLen, out, RSA_BLOCK_TYPE_1); - - return plainLen; -} - - -int RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen, - RsaKey* key) -{ - int plainLen, ret; - byte* tmp; - byte* pad = 0; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return CaviumRsaSSL_Verify(in, inLen, out, outLen, key); -#endif - - tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); - if (tmp == NULL) { - return MEMORY_E; - } - - XMEMCPY(tmp, in, inLen); - - if ((ret = plainLen = RsaSSL_VerifyInline(tmp, inLen, &pad, key)) - < 0) { - XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); - return ret; - } - - if (plainLen > (int)outLen) - plainLen = BAD_FUNC_ARG; - else - XMEMCPY(out, pad, plainLen); - XMEMSET(tmp, 0x00, inLen); - - XFREE(tmp, key->heap, DYNAMIC_TYPE_RSA); - return plainLen; -} - - -/* for Rsa Sign */ -int RsaSSL_Sign(const byte* in, word32 inLen, byte* out, word32 outLen, - RsaKey* key, RNG* rng) -{ - int sz, ret; - -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return CaviumRsaSSL_Sign(in, inLen, out, outLen, key); -#endif - - sz = mp_unsigned_bin_size(&key->n); - if (sz > (int)outLen) - return RSA_BUFFER_E; - - if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) - return RSA_BUFFER_E; - - ret = RsaPad(in, inLen, out, sz, RSA_BLOCK_TYPE_1, rng); - if (ret != 0) - return ret; - - if ((ret = RsaFunction(out, sz, out, &outLen, RSA_PRIVATE_ENCRYPT,key)) < 0) - sz = ret; - - return sz; -} - - -int RsaEncryptSize(RsaKey* key) -{ -#ifdef HAVE_CAVIUM - if (key->magic == CYASSL_RSA_CAVIUM_MAGIC) - return key->c_nSz; -#endif - return mp_unsigned_bin_size(&key->n); -} - - -#ifdef CYASSL_KEY_GEN - -static const int USE_BBS = 1; - -static int rand_prime(mp_int* N, int len, RNG* rng, void* heap) -{ - int err, res, type; - byte* buf; - - (void)heap; - if (N == NULL || rng == NULL) - return BAD_FUNC_ARG; - - /* get type */ - if (len < 0) { - type = USE_BBS; - len = -len; - } else { - type = 0; - } - - /* allow sizes between 2 and 512 bytes for a prime size */ - if (len < 2 || len > 512) { - return BAD_FUNC_ARG; - } - - /* allocate buffer to work with */ - buf = (byte*)XMALLOC(len, heap, DYNAMIC_TYPE_RSA); - if (buf == NULL) { - return MEMORY_E; - } - XMEMSET(buf, 0, len); - - do { -#ifdef SHOW_GEN - printf("."); - fflush(stdout); -#endif - /* generate value */ - err = RNG_GenerateBlock(rng, buf, len); - if (err != 0) { - XFREE(buf, heap, DYNAMIC_TYPE_RSA); - return err; - } - - /* munge bits */ - buf[0] |= 0x80 | 0x40; - buf[len-1] |= 0x01 | ((type & USE_BBS) ? 0x02 : 0x00); - - /* load value */ - if ((err = mp_read_unsigned_bin(N, buf, len)) != MP_OKAY) { - XFREE(buf, heap, DYNAMIC_TYPE_RSA); - return err; - } - - /* test */ - if ((err = mp_prime_is_prime(N, 8, &res)) != MP_OKAY) { - XFREE(buf, heap, DYNAMIC_TYPE_RSA); - return err; - } - } while (res == MP_NO); - -#ifdef LTC_CLEAN_STACK - XMEMSET(buf, 0, len); -#endif - - XFREE(buf, heap, DYNAMIC_TYPE_RSA); - return 0; -} - - -/* Make an RSA key for size bits, with e specified, 65537 is a good e */ -int MakeRsaKey(RsaKey* key, int size, long e, RNG* rng) -{ - mp_int p, q, tmp1, tmp2, tmp3; - int err; - - if (key == NULL || rng == NULL) - return BAD_FUNC_ARG; - - if (size < RSA_MIN_SIZE || size > RSA_MAX_SIZE) - return BAD_FUNC_ARG; - - if (e < 3 || (e & 1) == 0) - return BAD_FUNC_ARG; - - if ((err = mp_init_multi(&p, &q, &tmp1, &tmp2, &tmp3, NULL)) != MP_OKAY) - return err; - - err = mp_set_int(&tmp3, e); - - /* make p */ - if (err == MP_OKAY) { - do { - err = rand_prime(&p, size/16, rng, key->heap); /* size in bytes/2 */ - - if (err == MP_OKAY) - err = mp_sub_d(&p, 1, &tmp1); /* tmp1 = p-1 */ - - if (err == MP_OKAY) - err = mp_gcd(&tmp1, &tmp3, &tmp2); /* tmp2 = gcd(p-1, e) */ - } while (err == MP_OKAY && mp_cmp_d(&tmp2, 1) != 0); /* e divdes p-1 */ - } - - /* make q */ - if (err == MP_OKAY) { - do { - err = rand_prime(&q, size/16, rng, key->heap); /* size in bytes/2 */ - - if (err == MP_OKAY) - err = mp_sub_d(&q, 1, &tmp1); /* tmp1 = q-1 */ - - if (err == MP_OKAY) - err = mp_gcd(&tmp1, &tmp3, &tmp2); /* tmp2 = gcd(q-1, e) */ - } while (err == MP_OKAY && mp_cmp_d(&tmp2, 1) != 0); /* e divdes q-1 */ - } - - if (err == MP_OKAY) - err = mp_init_multi(&key->n, &key->e, &key->d, &key->p, &key->q, NULL); - - if (err == MP_OKAY) - err = mp_init_multi(&key->dP, &key->dQ, &key->u, NULL, NULL, NULL); - - if (err == MP_OKAY) - err = mp_sub_d(&p, 1, &tmp2); /* tmp2 = p-1 */ - - if (err == MP_OKAY) - err = mp_lcm(&tmp1, &tmp2, &tmp1); /* tmp1 = lcm(p-1, q-1),last loop */ - - /* make key */ - if (err == MP_OKAY) - err = mp_set_int(&key->e, e); /* key->e = e */ - - if (err == MP_OKAY) /* key->d = 1/e mod lcm(p-1, q-1) */ - err = mp_invmod(&key->e, &tmp1, &key->d); - - if (err == MP_OKAY) - err = mp_mul(&p, &q, &key->n); /* key->n = pq */ - - if (err == MP_OKAY) - err = mp_sub_d(&p, 1, &tmp1); - - if (err == MP_OKAY) - err = mp_sub_d(&q, 1, &tmp2); - - if (err == MP_OKAY) - err = mp_mod(&key->d, &tmp1, &key->dP); - - if (err == MP_OKAY) - err = mp_mod(&key->d, &tmp2, &key->dQ); - - if (err == MP_OKAY) - err = mp_invmod(&q, &p, &key->u); - - if (err == MP_OKAY) - err = mp_copy(&p, &key->p); - - if (err == MP_OKAY) - err = mp_copy(&q, &key->q); - - if (err == MP_OKAY) - key->type = RSA_PRIVATE; - - mp_clear(&tmp3); - mp_clear(&tmp2); - mp_clear(&tmp1); - mp_clear(&q); - mp_clear(&p); - - if (err != MP_OKAY) { - FreeRsaKey(key); - return err; - } - - return 0; -} - - -#endif /* CYASSL_KEY_GEN */ - - -#ifdef HAVE_CAVIUM - -#include -#include "cavium_common.h" - -/* Initiliaze RSA for use with Nitrox device */ -int RsaInitCavium(RsaKey* rsa, int devId) -{ - if (rsa == NULL) - return -1; - - if (CspAllocContext(CONTEXT_SSL, &rsa->contextHandle, devId) != 0) - return -1; - - rsa->devId = devId; - rsa->magic = CYASSL_RSA_CAVIUM_MAGIC; - - return 0; -} - - -/* Free RSA from use with Nitrox device */ -void RsaFreeCavium(RsaKey* rsa) -{ - if (rsa == NULL) - return; - - CspFreeContext(CONTEXT_SSL, rsa->contextHandle, rsa->devId); - rsa->magic = 0; -} - - -/* Initialize cavium RSA key */ -static int InitCaviumRsaKey(RsaKey* key, void* heap) -{ - if (key == NULL) - return BAD_FUNC_ARG; - - key->heap = heap; - key->type = -1; /* don't know yet */ - - key->c_n = NULL; - key->c_e = NULL; - key->c_d = NULL; - key->c_p = NULL; - key->c_q = NULL; - key->c_dP = NULL; - key->c_dQ = NULL; - key->c_u = NULL; - - key->c_nSz = 0; - key->c_eSz = 0; - key->c_dSz = 0; - key->c_pSz = 0; - key->c_qSz = 0; - key->c_dP_Sz = 0; - key->c_dQ_Sz = 0; - key->c_uSz = 0; - - return 0; -} - - -/* Free cavium RSA key */ -static int FreeCaviumRsaKey(RsaKey* key) -{ - if (key == NULL) - return BAD_FUNC_ARG; - - XFREE(key->c_n, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_e, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_d, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_p, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_q, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_dP, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_dQ, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - XFREE(key->c_u, key->heap, DYNAMIC_TYPE_CAVIUM_TMP); - - return InitCaviumRsaKey(key, key->heap); /* reset pointers */ -} - - -static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - word32 requestId; - word32 ret; - - if (key == NULL || in == NULL || out == NULL || outLen < (word32)key->c_nSz) - return -1; - - ret = CspPkcs1v15Enc(CAVIUM_BLOCKING, BT2, key->c_nSz, key->c_eSz, - (word16)inLen, key->c_n, key->c_e, (byte*)in, out, - &requestId, key->devId); - if (ret != 0) { - CYASSL_MSG("Cavium Enc BT2 failed"); - return -1; - } - return key->c_nSz; -} - - -static INLINE void ato16(const byte* c, word16* u16) -{ - *u16 = (c[0] << 8) | (c[1]); -} - - -static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - word32 requestId; - word32 ret; - word16 outSz = (word16)outLen; - - if (key == NULL || in == NULL || out == NULL || inLen != (word32)key->c_nSz) - return -1; - - ret = CspPkcs1v15CrtDec(CAVIUM_BLOCKING, BT2, key->c_nSz, key->c_q, - key->c_dQ, key->c_p, key->c_dP, key->c_u, - (byte*)in, &outSz, out, &requestId, key->devId); - if (ret != 0) { - CYASSL_MSG("Cavium CRT Dec BT2 failed"); - return -1; - } - ato16((const byte*)&outSz, &outSz); - - return outSz; -} - - -static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - word32 requestId; - word32 ret; - - if (key == NULL || in == NULL || out == NULL || inLen == 0 || outLen < - (word32)key->c_nSz) - return -1; - - ret = CspPkcs1v15CrtEnc(CAVIUM_BLOCKING, BT1, key->c_nSz, (word16)inLen, - key->c_q, key->c_dQ, key->c_p, key->c_dP, key->c_u, - (byte*)in, out, &requestId, key->devId); - if (ret != 0) { - CYASSL_MSG("Cavium CRT Enc BT1 failed"); - return -1; - } - return key->c_nSz; -} - - -static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - word32 requestId; - word32 ret; - word16 outSz = (word16)outLen; - - if (key == NULL || in == NULL || out == NULL || inLen != (word32)key->c_nSz) - return -1; - - ret = CspPkcs1v15Dec(CAVIUM_BLOCKING, BT1, key->c_nSz, key->c_eSz, - key->c_n, key->c_e, (byte*)in, &outSz, out, - &requestId, key->devId); - if (ret != 0) { - CYASSL_MSG("Cavium Dec BT1 failed"); - return -1; - } - outSz = ntohs(outSz); - - return outSz; -} - - -#endif /* HAVE_CAVIUM */ - -#endif /* NO_RSA */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha.c deleted file mode 100644 index 9797b531..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/sha.c +++ /dev/null @@ -1,395 +0,0 @@ -/* sha.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if !defined(NO_SHA) - -#ifdef CYASSL_PIC32MZ_HASH -#define InitSha InitSha_sw -#define ShaUpdate ShaUpdate_sw -#define ShaFinal ShaFinal_sw -#endif - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - -#ifdef FREESCALE_MMCAU - #include "cau_api.h" - #define XTRANSFORM(S,B) cau_sha1_hash_n((B), 1, ((S))->digest) -#else - #define XTRANSFORM(S,B) Transform((S)) -#endif - - -#ifdef STM32F2_HASH - /* - * STM32F2 hardware SHA1 support through the STM32F2 standard peripheral - * library. Documentation located in STM32F2xx Standard Peripheral Library - * document (See note in README). - */ - #include "stm32f2xx.h" - #include "stm32f2xx_hash.h" - - int InitSha(Sha* sha) - { - /* STM32F2 struct notes: - * sha->buffer = first 4 bytes used to hold partial block if needed - * sha->buffLen = num bytes currently stored in sha->buffer - * sha->loLen = num bytes that have been written to STM32 FIFO - */ - XMEMSET(sha->buffer, 0, SHA_REG_SIZE); - sha->buffLen = 0; - sha->loLen = 0; - - /* initialize HASH peripheral */ - HASH_DeInit(); - - /* configure algo used, algo mode, datatype */ - HASH->CR &= ~ (HASH_CR_ALGO | HASH_CR_DATATYPE | HASH_CR_MODE); - HASH->CR |= (HASH_AlgoSelection_SHA1 | HASH_AlgoMode_HASH - | HASH_DataType_8b); - - /* reset HASH processor */ - HASH->CR |= HASH_CR_INIT; - - return 0; - } - - int ShaUpdate(Sha* sha, const byte* data, word32 len) - { - word32 i = 0; - word32 fill = 0; - word32 diff = 0; - - /* if saved partial block is available */ - if (sha->buffLen) { - fill = 4 - sha->buffLen; - - /* if enough data to fill, fill and push to FIFO */ - if (fill <= len) { - XMEMCPY((byte*)sha->buffer + sha->buffLen, data, fill); - HASH_DataIn(*(uint32_t*)sha->buffer); - - data += fill; - len -= fill; - sha->loLen += 4; - sha->buffLen = 0; - } else { - /* append partial to existing stored block */ - XMEMCPY((byte*)sha->buffer + sha->buffLen, data, len); - sha->buffLen += len; - return; - } - } - - /* write input block in the IN FIFO */ - for(i = 0; i < len; i += 4) - { - diff = len - i; - if ( diff < 4) { - /* store incomplete last block, not yet in FIFO */ - XMEMSET(sha->buffer, 0, SHA_REG_SIZE); - XMEMCPY((byte*)sha->buffer, data, diff); - sha->buffLen = diff; - } else { - HASH_DataIn(*(uint32_t*)data); - data+=4; - } - } - - /* keep track of total data length thus far */ - sha->loLen += (len - sha->buffLen); - - return 0; - } - - int ShaFinal(Sha* sha, byte* hash) - { - __IO uint16_t nbvalidbitsdata = 0; - - /* finish reading any trailing bytes into FIFO */ - if (sha->buffLen) { - HASH_DataIn(*(uint32_t*)sha->buffer); - sha->loLen += sha->buffLen; - } - - /* calculate number of valid bits in last word of input data */ - nbvalidbitsdata = 8 * (sha->loLen % SHA_REG_SIZE); - - /* configure number of valid bits in last word of the data */ - HASH_SetLastWordValidBitsNbr(nbvalidbitsdata); - - /* start HASH processor */ - HASH_StartDigest(); - - /* wait until Busy flag == RESET */ - while (HASH_GetFlagStatus(HASH_FLAG_BUSY) != RESET) {} - - /* read message digest */ - sha->digest[0] = HASH->HR[0]; - sha->digest[1] = HASH->HR[1]; - sha->digest[2] = HASH->HR[2]; - sha->digest[3] = HASH->HR[3]; - sha->digest[4] = HASH->HR[4]; - - ByteReverseWords(sha->digest, sha->digest, SHA_DIGEST_SIZE); - - XMEMCPY(hash, sha->digest, SHA_DIGEST_SIZE); - - return InitSha(sha); /* reset state */ - } - -#else /* CTaoCrypt software implementation */ - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -int InitSha(Sha* sha) -{ - #ifdef FREESCALE_MMCAU - cau_sha1_initialize_output(sha->digest); - #else - sha->digest[0] = 0x67452301L; - sha->digest[1] = 0xEFCDAB89L; - sha->digest[2] = 0x98BADCFEL; - sha->digest[3] = 0x10325476L; - sha->digest[4] = 0xC3D2E1F0L; - #endif - - sha->buffLen = 0; - sha->loLen = 0; - sha->hiLen = 0; - - return 0; -} - -#ifndef FREESCALE_MMCAU - -#define blk0(i) (W[i] = sha->buffer[i]) -#define blk1(i) (W[i&15] = \ - rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1)) - -#define f1(x,y,z) (z^(x &(y^z))) -#define f2(x,y,z) (x^y^z) -#define f3(x,y,z) ((x&y)|(z&(x|y))) -#define f4(x,y,z) (x^y^z) - -/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ -#define R0(v,w,x,y,z,i) z+= f1(w,x,y) + blk0(i) + 0x5A827999+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R1(v,w,x,y,z,i) z+= f1(w,x,y) + blk1(i) + 0x5A827999+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R2(v,w,x,y,z,i) z+= f2(w,x,y) + blk1(i) + 0x6ED9EBA1+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R3(v,w,x,y,z,i) z+= f3(w,x,y) + blk1(i) + 0x8F1BBCDC+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R4(v,w,x,y,z,i) z+= f4(w,x,y) + blk1(i) + 0xCA62C1D6+ \ - rotlFixed(v,5); w = rotlFixed(w,30); - - -static void Transform(Sha* sha) -{ - word32 W[SHA_BLOCK_SIZE / sizeof(word32)]; - - /* Copy context->state[] to working vars */ - word32 a = sha->digest[0]; - word32 b = sha->digest[1]; - word32 c = sha->digest[2]; - word32 d = sha->digest[3]; - word32 e = sha->digest[4]; - -#ifdef USE_SLOW_SHA - word32 t, i; - - for (i = 0; i < 16; i++) { - R0(a, b, c, d, e, i); - t = e; e = d; d = c; c = b; b = a; a = t; - } - - for (; i < 20; i++) { - R1(a, b, c, d, e, i); - t = e; e = d; d = c; c = b; b = a; a = t; - } - - for (; i < 40; i++) { - R2(a, b, c, d, e, i); - t = e; e = d; d = c; c = b; b = a; a = t; - } - - for (; i < 60; i++) { - R3(a, b, c, d, e, i); - t = e; e = d; d = c; c = b; b = a; a = t; - } - - for (; i < 80; i++) { - R4(a, b, c, d, e, i); - t = e; e = d; d = c; c = b; b = a; a = t; - } -#else - /* nearly 1 K bigger in code size but 25% faster */ - /* 4 rounds of 20 operations each. Loop unrolled. */ - R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); - R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); - R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); - R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); - - R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); - - R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); - R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); - R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); - R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); - R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); - - R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); - R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); - R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); - R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); - R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); - - R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); - R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); - R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); - R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); - R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); -#endif - - /* Add the working vars back into digest state[] */ - sha->digest[0] += a; - sha->digest[1] += b; - sha->digest[2] += c; - sha->digest[3] += d; - sha->digest[4] += e; -} - -#endif /* FREESCALE_MMCAU */ - - -static INLINE void AddLength(Sha* sha, word32 len) -{ - word32 tmp = sha->loLen; - if ( (sha->loLen += len) < tmp) - sha->hiLen++; /* carry low to high */ -} - - -int ShaUpdate(Sha* sha, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)sha->buffer; - - while (len) { - word32 add = min(len, SHA_BLOCK_SIZE - sha->buffLen); - XMEMCPY(&local[sha->buffLen], data, add); - - sha->buffLen += add; - data += add; - len -= add; - - if (sha->buffLen == SHA_BLOCK_SIZE) { - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); - #endif - XTRANSFORM(sha, local); - AddLength(sha, SHA_BLOCK_SIZE); - sha->buffLen = 0; - } - } - - return 0; -} - - -int ShaFinal(Sha* sha, byte* hash) -{ - byte* local = (byte*)sha->buffer; - - AddLength(sha, sha->buffLen); /* before adding pads */ - - local[sha->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (sha->buffLen > SHA_PAD_SIZE) { - XMEMSET(&local[sha->buffLen], 0, SHA_BLOCK_SIZE - sha->buffLen); - sha->buffLen += SHA_BLOCK_SIZE - sha->buffLen; - - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); - #endif - XTRANSFORM(sha, local); - sha->buffLen = 0; - } - XMEMSET(&local[sha->buffLen], 0, SHA_PAD_SIZE - sha->buffLen); - - /* put lengths in bits */ - sha->hiLen = (sha->loLen >> (8*sizeof(sha->loLen) - 3)) + - (sha->hiLen << 3); - sha->loLen = sha->loLen << 3; - - /* store lengths */ - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha->buffer, sha->buffer, SHA_BLOCK_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - XMEMCPY(&local[SHA_PAD_SIZE], &sha->hiLen, sizeof(word32)); - XMEMCPY(&local[SHA_PAD_SIZE + sizeof(word32)], &sha->loLen, sizeof(word32)); - - #ifdef FREESCALE_MMCAU - /* Kinetis requires only these bytes reversed */ - ByteReverseWords(&sha->buffer[SHA_PAD_SIZE/sizeof(word32)], - &sha->buffer[SHA_PAD_SIZE/sizeof(word32)], - 2 * sizeof(word32)); - #endif - - XTRANSFORM(sha, local); - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(sha->digest, sha->digest, SHA_DIGEST_SIZE); - #endif - XMEMCPY(hash, sha->digest, SHA_DIGEST_SIZE); - - return InitSha(sha); /* reset state */ -} - -#endif /* STM32F2_HASH */ - -#endif /* NO_SHA */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c deleted file mode 100644 index 2a0d1f97..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/sha256.c +++ /dev/null @@ -1,287 +0,0 @@ -/* sha256.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* code submitted by raphael.huck@efixo.com */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if !defined(NO_SHA256) - -#ifdef CYASSL_PIC32MZ_HASH -#define InitSha256 InitSha256_sw -#define Sha256Update Sha256Update_sw -#define Sha256Final Sha256Final_sw -#endif - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - -#ifdef FREESCALE_MMCAU - #include "cau_api.h" -#endif - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -int InitSha256(Sha256* sha256) -{ - #ifdef FREESCALE_MMCAU - cau_sha256_initialize_output(sha256->digest); - #else - sha256->digest[0] = 0x6A09E667L; - sha256->digest[1] = 0xBB67AE85L; - sha256->digest[2] = 0x3C6EF372L; - sha256->digest[3] = 0xA54FF53AL; - sha256->digest[4] = 0x510E527FL; - sha256->digest[5] = 0x9B05688CL; - sha256->digest[6] = 0x1F83D9ABL; - sha256->digest[7] = 0x5BE0CD19L; - #endif - - sha256->buffLen = 0; - sha256->loLen = 0; - sha256->hiLen = 0; - - return 0; -} - -#ifdef FREESCALE_MMCAU - #define XTRANSFORM(S,B) Transform((S), (B)) - -static int Transform(Sha256* sha256, byte* buf) -{ - cau_sha256_hash_n(buf, 1, sha256->digest); - - return 0; -} - -#else - #define XTRANSFORM(S,B) Transform((S)) - -static const word32 K[64] = { - 0x428A2F98L, 0x71374491L, 0xB5C0FBCFL, 0xE9B5DBA5L, 0x3956C25BL, - 0x59F111F1L, 0x923F82A4L, 0xAB1C5ED5L, 0xD807AA98L, 0x12835B01L, - 0x243185BEL, 0x550C7DC3L, 0x72BE5D74L, 0x80DEB1FEL, 0x9BDC06A7L, - 0xC19BF174L, 0xE49B69C1L, 0xEFBE4786L, 0x0FC19DC6L, 0x240CA1CCL, - 0x2DE92C6FL, 0x4A7484AAL, 0x5CB0A9DCL, 0x76F988DAL, 0x983E5152L, - 0xA831C66DL, 0xB00327C8L, 0xBF597FC7L, 0xC6E00BF3L, 0xD5A79147L, - 0x06CA6351L, 0x14292967L, 0x27B70A85L, 0x2E1B2138L, 0x4D2C6DFCL, - 0x53380D13L, 0x650A7354L, 0x766A0ABBL, 0x81C2C92EL, 0x92722C85L, - 0xA2BFE8A1L, 0xA81A664BL, 0xC24B8B70L, 0xC76C51A3L, 0xD192E819L, - 0xD6990624L, 0xF40E3585L, 0x106AA070L, 0x19A4C116L, 0x1E376C08L, - 0x2748774CL, 0x34B0BCB5L, 0x391C0CB3L, 0x4ED8AA4AL, 0x5B9CCA4FL, - 0x682E6FF3L, 0x748F82EEL, 0x78A5636FL, 0x84C87814L, 0x8CC70208L, - 0x90BEFFFAL, 0xA4506CEBL, 0xBEF9A3F7L, 0xC67178F2L -}; - -#define Ch(x,y,z) (z ^ (x & (y ^ z))) -#define Maj(x,y,z) (((x | y) & z) | (x & y)) -#define S(x, n) rotrFixed(x, n) -#define R(x, n) (((x)&0xFFFFFFFFU)>>(n)) -#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) -#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25)) -#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3)) -#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10)) - -#define RND(a,b,c,d,e,f,g,h,i) \ - t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ - t1 = Sigma0(a) + Maj(a, b, c); \ - d += t0; \ - h = t0 + t1; - - -static int Transform(Sha256* sha256) -{ - word32 S[8], t0, t1; - int i; - -#ifdef CYASSL_SMALL_STACK - word32* W; - - W = (word32*) XMALLOC(sizeof(word32) * 64, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (W == NULL) - return MEMORY_E; -#else - word32 W[64]; -#endif - - /* Copy context->state[] to working vars */ - for (i = 0; i < 8; i++) - S[i] = sha256->digest[i]; - - for (i = 0; i < 16; i++) - W[i] = sha256->buffer[i]; - - for (i = 16; i < 64; i++) - W[i] = Gamma1(W[i-2]) + W[i-7] + Gamma0(W[i-15]) + W[i-16]; - - for (i = 0; i < 64; i += 8) { - RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0); - RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1); - RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2); - RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3); - RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4); - RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5); - RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6); - RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7); - } - - /* Add the working vars back into digest state[] */ - for (i = 0; i < 8; i++) { - sha256->digest[i] += S[i]; - } - -#ifdef CYASSL_SMALL_STACK - XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - -#endif /* FREESCALE_MMCAU */ - - -static INLINE void AddLength(Sha256* sha256, word32 len) -{ - word32 tmp = sha256->loLen; - if ( (sha256->loLen += len) < tmp) - sha256->hiLen++; /* carry low to high */ -} - - -int Sha256Update(Sha256* sha256, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)sha256->buffer; - - while (len) { - word32 add = min(len, SHA256_BLOCK_SIZE - sha256->buffLen); - XMEMCPY(&local[sha256->buffLen], data, add); - - sha256->buffLen += add; - data += add; - len -= add; - - if (sha256->buffLen == SHA256_BLOCK_SIZE) { - int ret; - - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha256->buffer, sha256->buffer, - SHA256_BLOCK_SIZE); - #endif - - ret = XTRANSFORM(sha256, local); - if (ret != 0) - return ret; - - AddLength(sha256, SHA256_BLOCK_SIZE); - sha256->buffLen = 0; - } - } - - return 0; -} - - -int Sha256Final(Sha256* sha256, byte* hash) -{ - byte* local = (byte*)sha256->buffer; - int ret; - - AddLength(sha256, sha256->buffLen); /* before adding pads */ - - local[sha256->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (sha256->buffLen > SHA256_PAD_SIZE) { - XMEMSET(&local[sha256->buffLen], 0, SHA256_BLOCK_SIZE - sha256->buffLen); - sha256->buffLen += SHA256_BLOCK_SIZE - sha256->buffLen; - - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha256->buffer, sha256->buffer, SHA256_BLOCK_SIZE); - #endif - - ret = XTRANSFORM(sha256, local); - if (ret != 0) - return ret; - - sha256->buffLen = 0; - } - XMEMSET(&local[sha256->buffLen], 0, SHA256_PAD_SIZE - sha256->buffLen); - - /* put lengths in bits */ - sha256->hiLen = (sha256->loLen >> (8*sizeof(sha256->loLen) - 3)) + - (sha256->hiLen << 3); - sha256->loLen = sha256->loLen << 3; - - /* store lengths */ - #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU) - ByteReverseWords(sha256->buffer, sha256->buffer, SHA256_BLOCK_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - XMEMCPY(&local[SHA256_PAD_SIZE], &sha256->hiLen, sizeof(word32)); - XMEMCPY(&local[SHA256_PAD_SIZE + sizeof(word32)], &sha256->loLen, - sizeof(word32)); - - #ifdef FREESCALE_MMCAU - /* Kinetis requires only these bytes reversed */ - ByteReverseWords(&sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], - &sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], - 2 * sizeof(word32)); - #endif - - ret = XTRANSFORM(sha256, local); - if (ret != 0) - return ret; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords(sha256->digest, sha256->digest, SHA256_DIGEST_SIZE); - #endif - XMEMCPY(hash, sha256->digest, SHA256_DIGEST_SIZE); - - return InitSha256(sha256); /* reset state */ -} - - -#endif /* NO_SHA256 */ - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c b/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c deleted file mode 100644 index ceb5a7e7..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/sha512.c +++ /dev/null @@ -1,475 +0,0 @@ -/* sha512.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef CYASSL_SHA512 - -#ifdef HAVE_FIPS - /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */ - #define FIPS_NO_WRAPPERS -#endif - -#include -#include -#ifdef NO_INLINE - #include -#else - #include -#endif - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -int InitSha512(Sha512* sha512) -{ - sha512->digest[0] = W64LIT(0x6a09e667f3bcc908); - sha512->digest[1] = W64LIT(0xbb67ae8584caa73b); - sha512->digest[2] = W64LIT(0x3c6ef372fe94f82b); - sha512->digest[3] = W64LIT(0xa54ff53a5f1d36f1); - sha512->digest[4] = W64LIT(0x510e527fade682d1); - sha512->digest[5] = W64LIT(0x9b05688c2b3e6c1f); - sha512->digest[6] = W64LIT(0x1f83d9abfb41bd6b); - sha512->digest[7] = W64LIT(0x5be0cd19137e2179); - - sha512->buffLen = 0; - sha512->loLen = 0; - sha512->hiLen = 0; - - return 0; -} - - -static const word64 K512[80] = { - W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd), - W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc), - W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019), - W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118), - W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe), - W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2), - W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1), - W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694), - W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3), - W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65), - W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483), - W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5), - W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210), - W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4), - W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725), - W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70), - W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926), - W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df), - W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8), - W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b), - W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001), - W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30), - W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910), - W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8), - W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53), - W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8), - W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb), - W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3), - W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60), - W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec), - W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9), - W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b), - W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207), - W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178), - W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6), - W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b), - W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493), - W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c), - W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a), - W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817) -}; - - -#define blk0(i) (W[i] = sha512->buffer[i]) -#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15])) - -#define Ch(x,y,z) (z^(x&(y^z))) -#define Maj(x,y,z) ((x&y)|(z&(x|y))) - -#define a(i) T[(0-i)&7] -#define b(i) T[(1-i)&7] -#define c(i) T[(2-i)&7] -#define d(i) T[(3-i)&7] -#define e(i) T[(4-i)&7] -#define f(i) T[(5-i)&7] -#define g(i) T[(6-i)&7] -#define h(i) T[(7-i)&7] - -#define S0(x) (rotrFixed64(x,28)^rotrFixed64(x,34)^rotrFixed64(x,39)) -#define S1(x) (rotrFixed64(x,14)^rotrFixed64(x,18)^rotrFixed64(x,41)) -#define s0(x) (rotrFixed64(x,1)^rotrFixed64(x,8)^(x>>7)) -#define s1(x) (rotrFixed64(x,19)^rotrFixed64(x,61)^(x>>6)) - -#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\ - d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) - -#define blk384(i) (W[i] = sha384->buffer[i]) - -#define R2(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk384(i));\ - d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) - - -static int Transform(Sha512* sha512) -{ - const word64* K = K512; - - word32 j; - word64 T[8]; - -#ifdef CYASSL_SMALL_STACK - word64* W; - - W = (word64*) XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (W == NULL) - return MEMORY_E; -#else - word64 W[16]; -#endif - - /* Copy digest to working vars */ - XMEMCPY(T, sha512->digest, sizeof(T)); - -#ifdef USE_SLOW_SHA2 - /* over twice as small, but 50% slower */ - /* 80 operations, not unrolled */ - for (j = 0; j < 80; j += 16) { - int m; - for (m = 0; m < 16; m++) { /* braces needed here for macros {} */ - R(m); - } - } -#else - /* 80 operations, partially loop unrolled */ - for (j = 0; j < 80; j += 16) { - R( 0); R( 1); R( 2); R( 3); - R( 4); R( 5); R( 6); R( 7); - R( 8); R( 9); R(10); R(11); - R(12); R(13); R(14); R(15); - } -#endif /* USE_SLOW_SHA2 */ - - /* Add the working vars back into digest */ - - sha512->digest[0] += a(0); - sha512->digest[1] += b(0); - sha512->digest[2] += c(0); - sha512->digest[3] += d(0); - sha512->digest[4] += e(0); - sha512->digest[5] += f(0); - sha512->digest[6] += g(0); - sha512->digest[7] += h(0); - - /* Wipe variables */ - XMEMSET(W, 0, sizeof(word64) * 16); - XMEMSET(T, 0, sizeof(T)); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - - -static INLINE void AddLength(Sha512* sha512, word32 len) -{ - word32 tmp = sha512->loLen; - if ( (sha512->loLen += len) < tmp) - sha512->hiLen++; /* carry low to high */ -} - - -int Sha512Update(Sha512* sha512, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)sha512->buffer; - - while (len) { - word32 add = min(len, SHA512_BLOCK_SIZE - sha512->buffLen); - XMEMCPY(&local[sha512->buffLen], data, add); - - sha512->buffLen += add; - data += add; - len -= add; - - if (sha512->buffLen == SHA512_BLOCK_SIZE) { - int ret; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha512->buffer, sha512->buffer, - SHA512_BLOCK_SIZE); - #endif - ret = Transform(sha512); - if (ret != 0) - return ret; - - AddLength(sha512, SHA512_BLOCK_SIZE); - sha512->buffLen = 0; - } - } - return 0; -} - - -int Sha512Final(Sha512* sha512, byte* hash) -{ - byte* local = (byte*)sha512->buffer; - int ret; - - AddLength(sha512, sha512->buffLen); /* before adding pads */ - - local[sha512->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (sha512->buffLen > SHA512_PAD_SIZE) { - XMEMSET(&local[sha512->buffLen], 0, SHA512_BLOCK_SIZE -sha512->buffLen); - sha512->buffLen += SHA512_BLOCK_SIZE - sha512->buffLen; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha512->buffer,sha512->buffer,SHA512_BLOCK_SIZE); - #endif - ret = Transform(sha512); - if (ret != 0) - return ret; - - sha512->buffLen = 0; - } - XMEMSET(&local[sha512->buffLen], 0, SHA512_PAD_SIZE - sha512->buffLen); - - /* put lengths in bits */ - sha512->hiLen = (sha512->loLen >> (8*sizeof(sha512->loLen) - 3)) + - (sha512->hiLen << 3); - sha512->loLen = sha512->loLen << 3; - - /* store lengths */ - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha512->buffer, sha512->buffer, SHA512_PAD_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - sha512->buffer[SHA512_BLOCK_SIZE / sizeof(word64) - 2] = sha512->hiLen; - sha512->buffer[SHA512_BLOCK_SIZE / sizeof(word64) - 1] = sha512->loLen; - - ret = Transform(sha512); - if (ret != 0) - return ret; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha512->digest, sha512->digest, SHA512_DIGEST_SIZE); - #endif - XMEMCPY(hash, sha512->digest, SHA512_DIGEST_SIZE); - - return InitSha512(sha512); /* reset state */ -} - - - -#ifdef CYASSL_SHA384 - -int InitSha384(Sha384* sha384) -{ - sha384->digest[0] = W64LIT(0xcbbb9d5dc1059ed8); - sha384->digest[1] = W64LIT(0x629a292a367cd507); - sha384->digest[2] = W64LIT(0x9159015a3070dd17); - sha384->digest[3] = W64LIT(0x152fecd8f70e5939); - sha384->digest[4] = W64LIT(0x67332667ffc00b31); - sha384->digest[5] = W64LIT(0x8eb44a8768581511); - sha384->digest[6] = W64LIT(0xdb0c2e0d64f98fa7); - sha384->digest[7] = W64LIT(0x47b5481dbefa4fa4); - - sha384->buffLen = 0; - sha384->loLen = 0; - sha384->hiLen = 0; - - return 0; -} - - -static int Transform384(Sha384* sha384) -{ - const word64* K = K512; - - word32 j; - word64 T[8]; - -#ifdef CYASSL_SMALL_STACK - word64* W; - - W = (word64*) XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (W == NULL) - return MEMORY_E; -#else - word64 W[16]; -#endif - - /* Copy digest to working vars */ - XMEMCPY(T, sha384->digest, sizeof(T)); - -#ifdef USE_SLOW_SHA2 - /* over twice as small, but 50% slower */ - /* 80 operations, not unrolled */ - for (j = 0; j < 80; j += 16) { - int m; - for (m = 0; m < 16; m++) { /* braces needed for macros {} */ - R2(m); - } - } -#else - /* 80 operations, partially loop unrolled */ - for (j = 0; j < 80; j += 16) { - R2( 0); R2( 1); R2( 2); R2( 3); - R2( 4); R2( 5); R2( 6); R2( 7); - R2( 8); R2( 9); R2(10); R2(11); - R2(12); R2(13); R2(14); R2(15); - } -#endif /* USE_SLOW_SHA2 */ - - /* Add the working vars back into digest */ - - sha384->digest[0] += a(0); - sha384->digest[1] += b(0); - sha384->digest[2] += c(0); - sha384->digest[3] += d(0); - sha384->digest[4] += e(0); - sha384->digest[5] += f(0); - sha384->digest[6] += g(0); - sha384->digest[7] += h(0); - - /* Wipe variables */ - XMEMSET(W, 0, sizeof(word64) * 16); - XMEMSET(T, 0, sizeof(T)); - -#ifdef CYASSL_SMALL_STACK - XFREE(W, NULL, DYNAMIC_TYPE_TMP_BUFFER); -#endif - - return 0; -} - - -static INLINE void AddLength384(Sha384* sha384, word32 len) -{ - word32 tmp = sha384->loLen; - if ( (sha384->loLen += len) < tmp) - sha384->hiLen++; /* carry low to high */ -} - - -int Sha384Update(Sha384* sha384, const byte* data, word32 len) -{ - /* do block size increments */ - byte* local = (byte*)sha384->buffer; - - while (len) { - word32 add = min(len, SHA384_BLOCK_SIZE - sha384->buffLen); - XMEMCPY(&local[sha384->buffLen], data, add); - - sha384->buffLen += add; - data += add; - len -= add; - - if (sha384->buffLen == SHA384_BLOCK_SIZE) { - int ret; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha384->buffer, sha384->buffer, - SHA384_BLOCK_SIZE); - #endif - ret = Transform384(sha384); - if (ret != 0) - return ret; - - AddLength384(sha384, SHA384_BLOCK_SIZE); - sha384->buffLen = 0; - } - } - return 0; -} - - -int Sha384Final(Sha384* sha384, byte* hash) -{ - byte* local = (byte*)sha384->buffer; - int ret; - - AddLength384(sha384, sha384->buffLen); /* before adding pads */ - - local[sha384->buffLen++] = 0x80; /* add 1 */ - - /* pad with zeros */ - if (sha384->buffLen > SHA384_PAD_SIZE) { - XMEMSET(&local[sha384->buffLen], 0, SHA384_BLOCK_SIZE -sha384->buffLen); - sha384->buffLen += SHA384_BLOCK_SIZE - sha384->buffLen; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha384->buffer,sha384->buffer,SHA384_BLOCK_SIZE); - #endif - ret = Transform384(sha384); - if (ret != 0) - return ret; - - sha384->buffLen = 0; - } - XMEMSET(&local[sha384->buffLen], 0, SHA384_PAD_SIZE - sha384->buffLen); - - /* put lengths in bits */ - sha384->hiLen = (sha384->loLen >> (8*sizeof(sha384->loLen) - 3)) + - (sha384->hiLen << 3); - sha384->loLen = sha384->loLen << 3; - - /* store lengths */ - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha384->buffer, sha384->buffer, SHA384_PAD_SIZE); - #endif - /* ! length ordering dependent on digest endian type ! */ - sha384->buffer[SHA384_BLOCK_SIZE / sizeof(word64) - 2] = sha384->hiLen; - sha384->buffer[SHA384_BLOCK_SIZE / sizeof(word64) - 1] = sha384->loLen; - - ret = Transform384(sha384); - if (ret != 0) - return ret; - - #ifdef LITTLE_ENDIAN_ORDER - ByteReverseWords64(sha384->digest, sha384->digest, SHA384_DIGEST_SIZE); - #endif - XMEMCPY(hash, sha384->digest, SHA384_DIGEST_SIZE); - - return InitSha384(sha384); /* reset state */ -} - -#endif /* CYASSL_SHA384 */ - -#endif /* CYASSL_SHA512 */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo deleted file mode 100644 index 5087fc68..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-aes.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-aes.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-aes.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo deleted file mode 100644 index 5f0eda1e..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-arc4.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-arc4.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-arc4.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo deleted file mode 100644 index a9a06f03..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-asn.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-asn.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-asn.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo deleted file mode 100644 index 206a1c2a..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-coding.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-coding.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-coding.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo deleted file mode 100644 index 289cf3ac..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-des3.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-des3.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-des3.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo deleted file mode 100644 index 1a0634e9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-dh.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-dh.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-dh.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo deleted file mode 100644 index 596f4fb3..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-error.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-error.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-error.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo deleted file mode 100644 index 75838f89..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-hmac.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-hmac.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-hmac.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo deleted file mode 100644 index e5e9b2dd..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-integer.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-integer.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-integer.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo deleted file mode 100644 index ae73fdb4..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-logging.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-logging.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-logging.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo deleted file mode 100644 index 779f1789..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-md5.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-md5.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-md5.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo deleted file mode 100644 index 7bceaa06..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-memory.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-memory.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-memory.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo deleted file mode 100644 index 1750f9f9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-port.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-port.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-port.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo deleted file mode 100644 index 4905d347..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-random.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-random.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-random.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo deleted file mode 100644 index 8f5fa22d..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-rsa.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-rsa.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-rsa.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo deleted file mode 100644 index d4fd75ed..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-sha.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-sha.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo b/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo deleted file mode 100644 index 308149b9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/src_libcyassl_la-sha256.lo +++ /dev/null @@ -1,12 +0,0 @@ -# ctaocrypt/src/src_libcyassl_la-sha256.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-sha256.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c b/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c deleted file mode 100644 index cd4e46fd..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/src/tfm.c +++ /dev/null @@ -1,2514 +0,0 @@ -/* tfm.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* - * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - -/** - * Edited by Moisés Guimarães (moisesguimaraesm@gmail.com) - * to fit CyaSSL's needs. - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* in case user set USE_FAST_MATH there */ -#include - -#ifdef USE_FAST_MATH - -#include -#include /* will define asm MACROS or C ones */ - - -/* math settings check */ -word32 CheckRunTimeSettings(void) -{ - return CTC_SETTINGS; -} - - -/* math settings size check */ -word32 CheckRunTimeFastMath(void) -{ - return FP_SIZE; -} - - -/* Functions */ - -void fp_add(fp_int *a, fp_int *b, fp_int *c) -{ - int sa, sb; - - /* get sign of both inputs */ - sa = a->sign; - sb = b->sign; - - /* handle two cases, not four */ - if (sa == sb) { - /* both positive or both negative */ - /* add their magnitudes, copy the sign */ - c->sign = sa; - s_fp_add (a, b, c); - } else { - /* one positive, the other negative */ - /* subtract the one with the greater magnitude from */ - /* the one of the lesser magnitude. The result gets */ - /* the sign of the one with the greater magnitude. */ - if (fp_cmp_mag (a, b) == FP_LT) { - c->sign = sb; - s_fp_sub (b, a, c); - } else { - c->sign = sa; - s_fp_sub (a, b, c); - } - } -} - -/* unsigned addition */ -void s_fp_add(fp_int *a, fp_int *b, fp_int *c) -{ - int x, y, oldused; - register fp_word t; - - y = MAX(a->used, b->used); - oldused = c->used; - c->used = y; - - t = 0; - for (x = 0; x < y; x++) { - t += ((fp_word)a->dp[x]) + ((fp_word)b->dp[x]); - c->dp[x] = (fp_digit)t; - t >>= DIGIT_BIT; - } - if (t != 0 && x < FP_SIZE) { - c->dp[c->used++] = (fp_digit)t; - ++x; - } - - c->used = x; - for (; x < oldused; x++) { - c->dp[x] = 0; - } - fp_clamp(c); -} - -/* c = a - b */ -void fp_sub(fp_int *a, fp_int *b, fp_int *c) -{ - int sa, sb; - - sa = a->sign; - sb = b->sign; - - if (sa != sb) { - /* subtract a negative from a positive, OR */ - /* subtract a positive from a negative. */ - /* In either case, ADD their magnitudes, */ - /* and use the sign of the first number. */ - c->sign = sa; - s_fp_add (a, b, c); - } else { - /* subtract a positive from a positive, OR */ - /* subtract a negative from a negative. */ - /* First, take the difference between their */ - /* magnitudes, then... */ - if (fp_cmp_mag (a, b) != FP_LT) { - /* Copy the sign from the first */ - c->sign = sa; - /* The first has a larger or equal magnitude */ - s_fp_sub (a, b, c); - } else { - /* The result has the *opposite* sign from */ - /* the first number. */ - c->sign = (sa == FP_ZPOS) ? FP_NEG : FP_ZPOS; - /* The second has a larger magnitude */ - s_fp_sub (b, a, c); - } - } -} - -/* unsigned subtraction ||a|| >= ||b|| ALWAYS! */ -void s_fp_sub(fp_int *a, fp_int *b, fp_int *c) -{ - int x, oldbused, oldused; - fp_word t; - - oldused = c->used; - oldbused = b->used; - c->used = a->used; - t = 0; - for (x = 0; x < oldbused; x++) { - t = ((fp_word)a->dp[x]) - (((fp_word)b->dp[x]) + t); - c->dp[x] = (fp_digit)t; - t = (t >> DIGIT_BIT)&1; - } - for (; x < a->used; x++) { - t = ((fp_word)a->dp[x]) - t; - c->dp[x] = (fp_digit)t; - t = (t >> DIGIT_BIT)&1; - } - for (; x < oldused; x++) { - c->dp[x] = 0; - } - fp_clamp(c); -} - -/* c = a * b */ -void fp_mul(fp_int *A, fp_int *B, fp_int *C) -{ - int y, yy; - - y = MAX(A->used, B->used); - yy = MIN(A->used, B->used); - - /* call generic if we're out of range */ - if (y + yy > FP_SIZE) { - fp_mul_comba(A, B, C); - return ; - } - - /* pick a comba (unrolled 4/8/16/32 x or rolled) based on the size - of the largest input. We also want to avoid doing excess mults if the - inputs are not close to the next power of two. That is, for example, - if say y=17 then we would do (32-17)^2 = 225 unneeded multiplications - */ - -#ifdef TFM_MUL3 - if (y <= 3) { - fp_mul_comba3(A,B,C); - return; - } -#endif -#ifdef TFM_MUL4 - if (y == 4) { - fp_mul_comba4(A,B,C); - return; - } -#endif -#ifdef TFM_MUL6 - if (y <= 6) { - fp_mul_comba6(A,B,C); - return; - } -#endif -#ifdef TFM_MUL7 - if (y == 7) { - fp_mul_comba7(A,B,C); - return; - } -#endif -#ifdef TFM_MUL8 - if (y == 8) { - fp_mul_comba8(A,B,C); - return; - } -#endif -#ifdef TFM_MUL9 - if (y == 9) { - fp_mul_comba9(A,B,C); - return; - } -#endif -#ifdef TFM_MUL12 - if (y <= 12) { - fp_mul_comba12(A,B,C); - return; - } -#endif -#ifdef TFM_MUL17 - if (y <= 17) { - fp_mul_comba17(A,B,C); - return; - } -#endif - -#ifdef TFM_SMALL_SET - if (y <= 16) { - fp_mul_comba_small(A,B,C); - return; - } -#endif -#if defined(TFM_MUL20) - if (y <= 20) { - fp_mul_comba20(A,B,C); - return; - } -#endif -#if defined(TFM_MUL24) - if (yy >= 16 && y <= 24) { - fp_mul_comba24(A,B,C); - return; - } -#endif -#if defined(TFM_MUL28) - if (yy >= 20 && y <= 28) { - fp_mul_comba28(A,B,C); - return; - } -#endif -#if defined(TFM_MUL32) - if (yy >= 24 && y <= 32) { - fp_mul_comba32(A,B,C); - return; - } -#endif -#if defined(TFM_MUL48) - if (yy >= 40 && y <= 48) { - fp_mul_comba48(A,B,C); - return; - } -#endif -#if defined(TFM_MUL64) - if (yy >= 56 && y <= 64) { - fp_mul_comba64(A,B,C); - return; - } -#endif - fp_mul_comba(A,B,C); -} - -void fp_mul_2(fp_int * a, fp_int * b) -{ - int x, oldused; - - oldused = b->used; - b->used = a->used; - - { - register fp_digit r, rr, *tmpa, *tmpb; - - /* alias for source */ - tmpa = a->dp; - - /* alias for dest */ - tmpb = b->dp; - - /* carry */ - r = 0; - for (x = 0; x < a->used; x++) { - - /* get what will be the *next* carry bit from the - * MSB of the current digit - */ - rr = *tmpa >> ((fp_digit)(DIGIT_BIT - 1)); - - /* now shift up this digit, add in the carry [from the previous] */ - *tmpb++ = ((*tmpa++ << ((fp_digit)1)) | r); - - /* copy the carry that would be from the source - * digit into the next iteration - */ - r = rr; - } - - /* new leading digit? */ - if (r != 0 && b->used != (FP_SIZE-1)) { - /* add a MSB which is always 1 at this point */ - *tmpb = 1; - ++(b->used); - } - - /* now zero any excess digits on the destination - * that we didn't write to - */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; -} - -/* c = a * b */ -void fp_mul_d(fp_int *a, fp_digit b, fp_int *c) -{ - fp_word w; - int x, oldused; - - oldused = c->used; - c->used = a->used; - c->sign = a->sign; - w = 0; - for (x = 0; x < a->used; x++) { - w = ((fp_word)a->dp[x]) * ((fp_word)b) + w; - c->dp[x] = (fp_digit)w; - w = w >> DIGIT_BIT; - } - if (w != 0 && (a->used != FP_SIZE)) { - c->dp[c->used++] = (fp_digit) w; - ++x; - } - for (; x < oldused; x++) { - c->dp[x] = 0; - } - fp_clamp(c); -} - -/* c = a * 2**d */ -void fp_mul_2d(fp_int *a, int b, fp_int *c) -{ - fp_digit carry, carrytmp, shift; - int x; - - /* copy it */ - fp_copy(a, c); - - /* handle whole digits */ - if (b >= DIGIT_BIT) { - fp_lshd(c, b/DIGIT_BIT); - } - b %= DIGIT_BIT; - - /* shift the digits */ - if (b != 0) { - carry = 0; - shift = DIGIT_BIT - b; - for (x = 0; x < c->used; x++) { - carrytmp = c->dp[x] >> shift; - c->dp[x] = (c->dp[x] << b) + carry; - carry = carrytmp; - } - /* store last carry if room */ - if (carry && x < FP_SIZE) { - c->dp[c->used++] = carry; - } - } - fp_clamp(c); -} - -/* generic PxQ multiplier */ -void fp_mul_comba(fp_int *A, fp_int *B, fp_int *C) -{ - int ix, iy, iz, tx, ty, pa; - fp_digit c0, c1, c2, *tmpx, *tmpy; - fp_int tmp, *dst; - - COMBA_START; - COMBA_CLEAR; - - /* get size of output and trim */ - pa = A->used + B->used; - if (pa >= FP_SIZE) { - pa = FP_SIZE-1; - } - - if (A == C || B == C) { - fp_zero(&tmp); - dst = &tmp; - } else { - fp_zero(C); - dst = C; - } - - for (ix = 0; ix < pa; ix++) { - /* get offsets into the two bignums */ - ty = MIN(ix, B->used-1); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = A->dp + tx; - tmpy = B->dp + ty; - - /* this is the number of times the loop will iterrate, essentially its - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = MIN(A->used-tx, ty+1); - - /* execute loop */ - COMBA_FORWARD; - for (iz = 0; iz < iy; ++iz) { - /* TAO change COMBA_ADD back to MULADD */ - MULADD(*tmpx++, *tmpy--); - } - - /* store term */ - COMBA_STORE(dst->dp[ix]); - } - COMBA_FINI; - - dst->used = pa; - dst->sign = A->sign ^ B->sign; - fp_clamp(dst); - fp_copy(dst, C); -} - -/* a/b => cb + d == a */ -int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d) -{ - fp_int q, x, y, t1, t2; - int n, t, i, norm, neg; - - /* is divisor zero ? */ - if (fp_iszero (b) == 1) { - return FP_VAL; - } - - /* if a < b then q=0, r = a */ - if (fp_cmp_mag (a, b) == FP_LT) { - if (d != NULL) { - fp_copy (a, d); - } - if (c != NULL) { - fp_zero (c); - } - return FP_OKAY; - } - - fp_init(&q); - q.used = a->used + 2; - - fp_init(&t1); - fp_init(&t2); - fp_init_copy(&x, a); - fp_init_copy(&y, b); - - /* fix the sign */ - neg = (a->sign == b->sign) ? FP_ZPOS : FP_NEG; - x.sign = y.sign = FP_ZPOS; - - /* normalize both x and y, ensure that y >= b/2, [b == 2**DIGIT_BIT] */ - norm = fp_count_bits(&y) % DIGIT_BIT; - if (norm < (int)(DIGIT_BIT-1)) { - norm = (DIGIT_BIT-1) - norm; - fp_mul_2d (&x, norm, &x); - fp_mul_2d (&y, norm, &y); - } else { - norm = 0; - } - - /* note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4 */ - n = x.used - 1; - t = y.used - 1; - - /* while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} } */ - fp_lshd (&y, n - t); /* y = y*b**{n-t} */ - - while (fp_cmp (&x, &y) != FP_LT) { - ++(q.dp[n - t]); - fp_sub (&x, &y, &x); - } - - /* reset y by shifting it back down */ - fp_rshd (&y, n - t); - - /* step 3. for i from n down to (t + 1) */ - for (i = n; i >= (t + 1); i--) { - if (i > x.used) { - continue; - } - - /* step 3.1 if xi == yt then set q{i-t-1} to b-1, - * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ - if (x.dp[i] == y.dp[t]) { - q.dp[i - t - 1] = (fp_digit) ((((fp_word)1) << DIGIT_BIT) - 1); - } else { - fp_word tmp; - tmp = ((fp_word) x.dp[i]) << ((fp_word) DIGIT_BIT); - tmp |= ((fp_word) x.dp[i - 1]); - tmp /= ((fp_word)y.dp[t]); - q.dp[i - t - 1] = (fp_digit) (tmp); - } - - /* while (q{i-t-1} * (yt * b + y{t-1})) > - xi * b**2 + xi-1 * b + xi-2 - - do q{i-t-1} -= 1; - */ - q.dp[i - t - 1] = (q.dp[i - t - 1] + 1); - do { - q.dp[i - t - 1] = (q.dp[i - t - 1] - 1); - - /* find left hand */ - fp_zero (&t1); - t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; - t1.dp[1] = y.dp[t]; - t1.used = 2; - fp_mul_d (&t1, q.dp[i - t - 1], &t1); - - /* find right hand */ - t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; - t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; - t2.dp[2] = x.dp[i]; - t2.used = 3; - } while (fp_cmp_mag(&t1, &t2) == FP_GT); - - /* step 3.3 x = x - q{i-t-1} * y * b**{i-t-1} */ - fp_mul_d (&y, q.dp[i - t - 1], &t1); - fp_lshd (&t1, i - t - 1); - fp_sub (&x, &t1, &x); - - /* if x < 0 then { x = x + y*b**{i-t-1}; q{i-t-1} -= 1; } */ - if (x.sign == FP_NEG) { - fp_copy (&y, &t1); - fp_lshd (&t1, i - t - 1); - fp_add (&x, &t1, &x); - q.dp[i - t - 1] = q.dp[i - t - 1] - 1; - } - } - - /* now q is the quotient and x is the remainder - * [which we have to normalize] - */ - - /* get sign before writing to c */ - x.sign = x.used == 0 ? FP_ZPOS : a->sign; - - if (c != NULL) { - fp_clamp (&q); - fp_copy (&q, c); - c->sign = neg; - } - - if (d != NULL) { - fp_div_2d (&x, norm, &x, NULL); - -/* the following is a kludge, essentially we were seeing the right remainder but - with excess digits that should have been zero - */ - for (i = b->used; i < x.used; i++) { - x.dp[i] = 0; - } - fp_clamp(&x); - fp_copy (&x, d); - } - - return FP_OKAY; -} - -/* b = a/2 */ -void fp_div_2(fp_int * a, fp_int * b) -{ - int x, oldused; - - oldused = b->used; - b->used = a->used; - { - register fp_digit r, rr, *tmpa, *tmpb; - - /* source alias */ - tmpa = a->dp + b->used - 1; - - /* dest alias */ - tmpb = b->dp + b->used - 1; - - /* carry */ - r = 0; - for (x = b->used - 1; x >= 0; x--) { - /* get the carry for the next iteration */ - rr = *tmpa & 1; - - /* shift the current digit, add in carry and store */ - *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); - - /* forward carry to next iteration */ - r = rr; - } - - /* zero excess digits */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; - fp_clamp (b); -} - -/* c = a / 2**b */ -void fp_div_2d(fp_int *a, int b, fp_int *c, fp_int *d) -{ - int D; - fp_int t; - - /* if the shift count is <= 0 then we do no work */ - if (b <= 0) { - fp_copy (a, c); - if (d != NULL) { - fp_zero (d); - } - return; - } - - fp_init(&t); - - /* get the remainder */ - if (d != NULL) { - fp_mod_2d (a, b, &t); - } - - /* copy */ - fp_copy(a, c); - - /* shift by as many digits in the bit count */ - if (b >= (int)DIGIT_BIT) { - fp_rshd (c, b / DIGIT_BIT); - } - - /* shift any bit count < DIGIT_BIT */ - D = (b % DIGIT_BIT); - if (D != 0) { - fp_rshb(c, D); - } - fp_clamp (c); - if (d != NULL) { - fp_copy (&t, d); - } -} - -/* c = a mod b, 0 <= c < b */ -int fp_mod(fp_int *a, fp_int *b, fp_int *c) -{ - fp_int t; - int err; - - fp_zero(&t); - if ((err = fp_div(a, b, NULL, &t)) != FP_OKAY) { - return err; - } - if (t.sign != b->sign) { - fp_add(&t, b, c); - } else { - fp_copy(&t, c); - } - return FP_OKAY; -} - -/* c = a mod 2**d */ -void fp_mod_2d(fp_int *a, int b, fp_int *c) -{ - int x; - - /* zero if count less than or equal to zero */ - if (b <= 0) { - fp_zero(c); - return; - } - - /* get copy of input */ - fp_copy(a, c); - - /* if 2**d is larger than we just return */ - if (b >= (DIGIT_BIT * a->used)) { - return; - } - - /* zero digits above the last digit of the modulus */ - for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { - c->dp[x] = 0; - } - /* clear the digit that is not completely outside/inside the modulus */ - c->dp[b / DIGIT_BIT] &= ~((fp_digit)0) >> (DIGIT_BIT - b); - fp_clamp (c); -} - -static int fp_invmod_slow (fp_int * a, fp_int * b, fp_int * c) -{ - fp_int x, y, u, v, A, B, C, D; - int res; - - /* b cannot be negative */ - if (b->sign == FP_NEG || fp_iszero(b) == 1) { - return FP_VAL; - } - - /* init temps */ - fp_init(&x); fp_init(&y); - fp_init(&u); fp_init(&v); - fp_init(&A); fp_init(&B); - fp_init(&C); fp_init(&D); - - /* x = a, y = b */ - if ((res = fp_mod(a, b, &x)) != FP_OKAY) { - return res; - } - fp_copy(b, &y); - - /* 2. [modified] if x,y are both even then return an error! */ - if (fp_iseven (&x) == 1 && fp_iseven (&y) == 1) { - return FP_VAL; - } - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - fp_copy (&x, &u); - fp_copy (&y, &v); - fp_set (&A, 1); - fp_set (&D, 1); - -top: - /* 4. while u is even do */ - while (fp_iseven (&u) == 1) { - /* 4.1 u = u/2 */ - fp_div_2 (&u, &u); - - /* 4.2 if A or B is odd then */ - if (fp_isodd (&A) == 1 || fp_isodd (&B) == 1) { - /* A = (A+y)/2, B = (B-x)/2 */ - fp_add (&A, &y, &A); - fp_sub (&B, &x, &B); - } - /* A = A/2, B = B/2 */ - fp_div_2 (&A, &A); - fp_div_2 (&B, &B); - } - - /* 5. while v is even do */ - while (fp_iseven (&v) == 1) { - /* 5.1 v = v/2 */ - fp_div_2 (&v, &v); - - /* 5.2 if C or D is odd then */ - if (fp_isodd (&C) == 1 || fp_isodd (&D) == 1) { - /* C = (C+y)/2, D = (D-x)/2 */ - fp_add (&C, &y, &C); - fp_sub (&D, &x, &D); - } - /* C = C/2, D = D/2 */ - fp_div_2 (&C, &C); - fp_div_2 (&D, &D); - } - - /* 6. if u >= v then */ - if (fp_cmp (&u, &v) != FP_LT) { - /* u = u - v, A = A - C, B = B - D */ - fp_sub (&u, &v, &u); - fp_sub (&A, &C, &A); - fp_sub (&B, &D, &B); - } else { - /* v - v - u, C = C - A, D = D - B */ - fp_sub (&v, &u, &v); - fp_sub (&C, &A, &C); - fp_sub (&D, &B, &D); - } - - /* if not zero goto step 4 */ - if (fp_iszero (&u) == 0) - goto top; - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (fp_cmp_d (&v, 1) != FP_EQ) { - return FP_VAL; - } - - /* if its too low */ - while (fp_cmp_d(&C, 0) == FP_LT) { - fp_add(&C, b, &C); - } - - /* too big */ - while (fp_cmp_mag(&C, b) != FP_LT) { - fp_sub(&C, b, &C); - } - - /* C is now the inverse */ - fp_copy(&C, c); - return FP_OKAY; -} - -/* c = 1/a (mod b) for odd b only */ -int fp_invmod(fp_int *a, fp_int *b, fp_int *c) -{ - fp_int x, y, u, v, B, D; - int neg; - - /* 2. [modified] b must be odd */ - if (fp_iseven (b) == FP_YES) { - return fp_invmod_slow(a,b,c); - } - - /* init all our temps */ - fp_init(&x); fp_init(&y); - fp_init(&u); fp_init(&v); - fp_init(&B); fp_init(&D); - - /* x == modulus, y == value to invert */ - fp_copy(b, &x); - - /* we need y = |a| */ - fp_abs(a, &y); - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - fp_copy(&x, &u); - fp_copy(&y, &v); - fp_set (&D, 1); - -top: - /* 4. while u is even do */ - while (fp_iseven (&u) == FP_YES) { - /* 4.1 u = u/2 */ - fp_div_2 (&u, &u); - - /* 4.2 if B is odd then */ - if (fp_isodd (&B) == FP_YES) { - fp_sub (&B, &x, &B); - } - /* B = B/2 */ - fp_div_2 (&B, &B); - } - - /* 5. while v is even do */ - while (fp_iseven (&v) == FP_YES) { - /* 5.1 v = v/2 */ - fp_div_2 (&v, &v); - - /* 5.2 if D is odd then */ - if (fp_isodd (&D) == FP_YES) { - /* D = (D-x)/2 */ - fp_sub (&D, &x, &D); - } - /* D = D/2 */ - fp_div_2 (&D, &D); - } - - /* 6. if u >= v then */ - if (fp_cmp (&u, &v) != FP_LT) { - /* u = u - v, B = B - D */ - fp_sub (&u, &v, &u); - fp_sub (&B, &D, &B); - } else { - /* v - v - u, D = D - B */ - fp_sub (&v, &u, &v); - fp_sub (&D, &B, &D); - } - - /* if not zero goto step 4 */ - if (fp_iszero (&u) == FP_NO) { - goto top; - } - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (fp_cmp_d (&v, 1) != FP_EQ) { - return FP_VAL; - } - - /* b is now the inverse */ - neg = a->sign; - while (D.sign == FP_NEG) { - fp_add (&D, b, &D); - } - fp_copy (&D, c); - c->sign = neg; - return FP_OKAY; -} - -/* d = a * b (mod c) */ -int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d) -{ - fp_int tmp; - fp_zero(&tmp); - fp_mul(a, b, &tmp); - return fp_mod(&tmp, c, d); -} - -#ifdef TFM_TIMING_RESISTANT - -/* timing resistant montgomery ladder based exptmod - - Based on work by Marc Joye, Sung-Ming Yen, "The Montgomery Powering Ladder", Cryptographic Hardware and Embedded Systems, CHES 2002 -*/ -static int _fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) -{ - fp_int R[2]; - fp_digit buf, mp; - int err, bitcnt, digidx, y; - - /* now setup montgomery */ - if ((err = fp_montgomery_setup (P, &mp)) != FP_OKAY) { - return err; - } - - fp_init(&R[0]); - fp_init(&R[1]); - - /* now we need R mod m */ - fp_montgomery_calc_normalization (&R[0], P); - - /* now set R[0][1] to G * R mod m */ - if (fp_cmp_mag(P, G) != FP_GT) { - /* G > P so we reduce it first */ - fp_mod(G, P, &R[1]); - } else { - fp_copy(G, &R[1]); - } - fp_mulmod (&R[1], &R[0], P, &R[1]); - - /* for j = t-1 downto 0 do - r_!k = R0*R1; r_k = r_k^2 - */ - - /* set initial mode and bit cnt */ - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits so break */ - if (digidx == -1) { - break; - } - /* read next digit and reset bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int)DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (int)(buf >> (DIGIT_BIT - 1)) & 1; - buf <<= (fp_digit)1; - - /* do ops */ - fp_mul(&R[0], &R[1], &R[y^1]); fp_montgomery_reduce(&R[y^1], P, mp); - fp_sqr(&R[y], &R[y]); fp_montgomery_reduce(&R[y], P, mp); - } - - fp_montgomery_reduce(&R[0], P, mp); - fp_copy(&R[0], Y); - return FP_OKAY; -} - -#else - -/* y = g**x (mod b) - * Some restrictions... x must be positive and < b - */ -static int _fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) -{ - fp_int M[64], res; - fp_digit buf, mp; - int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; - - /* find window size */ - x = fp_count_bits (X); - if (x <= 21) { - winsize = 1; - } else if (x <= 36) { - winsize = 3; - } else if (x <= 140) { - winsize = 4; - } else if (x <= 450) { - winsize = 5; - } else { - winsize = 6; - } - - /* init M array */ - XMEMSET(M, 0, sizeof(M)); - - /* now setup montgomery */ - if ((err = fp_montgomery_setup (P, &mp)) != FP_OKAY) { - return err; - } - - /* setup result */ - fp_init(&res); - - /* create M table - * - * The M table contains powers of the input base, e.g. M[x] = G^x mod P - * - * The first half of the table is not computed though accept for M[0] and M[1] - */ - - /* now we need R mod m */ - fp_montgomery_calc_normalization (&res, P); - - /* now set M[1] to G * R mod m */ - if (fp_cmp_mag(P, G) != FP_GT) { - /* G > P so we reduce it first */ - fp_mod(G, P, &M[1]); - } else { - fp_copy(G, &M[1]); - } - fp_mulmod (&M[1], &res, P, &M[1]); - - /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times */ - fp_copy (&M[1], &M[1 << (winsize - 1)]); - for (x = 0; x < (winsize - 1); x++) { - fp_sqr (&M[1 << (winsize - 1)], &M[1 << (winsize - 1)]); - fp_montgomery_reduce (&M[1 << (winsize - 1)], P, mp); - } - - /* create upper table */ - for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { - fp_mul(&M[x - 1], &M[1], &M[x]); - fp_montgomery_reduce(&M[x], P, mp); - } - - /* set initial mode and bit cnt */ - mode = 0; - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - bitcpy = 0; - bitbuf = 0; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits so break */ - if (digidx == -1) { - break; - } - /* read next digit and reset bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int)DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (int)(buf >> (DIGIT_BIT - 1)) & 1; - buf <<= (fp_digit)1; - - /* if the bit is zero and mode == 0 then we ignore it - * These represent the leading zero bits before the first 1 bit - * in the exponent. Technically this opt is not required but it - * does lower the # of trivial squaring/reductions used - */ - if (mode == 0 && y == 0) { - continue; - } - - /* if the bit is zero and mode == 1 then we square */ - if (mode == 1 && y == 0) { - fp_sqr(&res, &res); - fp_montgomery_reduce(&res, P, mp); - continue; - } - - /* else we add it to the window */ - bitbuf |= (y << (winsize - ++bitcpy)); - mode = 2; - - if (bitcpy == winsize) { - /* ok window is filled so square as required and multiply */ - /* square first */ - for (x = 0; x < winsize; x++) { - fp_sqr(&res, &res); - fp_montgomery_reduce(&res, P, mp); - } - - /* then multiply */ - fp_mul(&res, &M[bitbuf], &res); - fp_montgomery_reduce(&res, P, mp); - - /* empty window and reset */ - bitcpy = 0; - bitbuf = 0; - mode = 1; - } - } - - /* if bits remain then square/multiply */ - if (mode == 2 && bitcpy > 0) { - /* square then multiply if the bit is set */ - for (x = 0; x < bitcpy; x++) { - fp_sqr(&res, &res); - fp_montgomery_reduce(&res, P, mp); - - /* get next bit of the window */ - bitbuf <<= 1; - if ((bitbuf & (1 << winsize)) != 0) { - /* then multiply */ - fp_mul(&res, &M[1], &res); - fp_montgomery_reduce(&res, P, mp); - } - } - } - - /* fixup result if Montgomery reduction is used - * recall that any value in a Montgomery system is - * actually multiplied by R mod n. So we have - * to reduce one more time to cancel out the factor - * of R. - */ - fp_montgomery_reduce(&res, P, mp); - - /* swap res with Y */ - fp_copy (&res, Y); - return FP_OKAY; -} - -#endif - -int fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) -{ - /* prevent overflows */ - if (P->used > (FP_SIZE/2)) { - return FP_VAL; - } - - if (X->sign == FP_NEG) { -#ifndef POSITIVE_EXP_ONLY /* reduce stack if assume no negatives */ - int err; - fp_int tmp; - - /* yes, copy G and invmod it */ - fp_copy(G, &tmp); - if ((err = fp_invmod(&tmp, P, &tmp)) != FP_OKAY) { - return err; - } - X->sign = FP_ZPOS; - err = _fp_exptmod(&tmp, X, P, Y); - if (X != Y) { - X->sign = FP_NEG; - } - return err; -#else - return FP_VAL; -#endif - } - else { - /* Positive exponent so just exptmod */ - return _fp_exptmod(G, X, P, Y); - } -} - -/* computes a = 2**b */ -void fp_2expt(fp_int *a, int b) -{ - int z; - - /* zero a as per default */ - fp_zero (a); - - if (b < 0) { - return; - } - - z = b / DIGIT_BIT; - if (z >= FP_SIZE) { - return; - } - - /* set the used count of where the bit will go */ - a->used = z + 1; - - /* put the single bit in its place */ - a->dp[z] = ((fp_digit)1) << (b % DIGIT_BIT); -} - -/* b = a*a */ -void fp_sqr(fp_int *A, fp_int *B) -{ - int y = A->used; - - /* call generic if we're out of range */ - if (y + y > FP_SIZE) { - fp_sqr_comba(A, B); - return ; - } - -#if defined(TFM_SQR3) - if (y <= 3) { - fp_sqr_comba3(A,B); - return; - } -#endif -#if defined(TFM_SQR4) - if (y == 4) { - fp_sqr_comba4(A,B); - return; - } -#endif -#if defined(TFM_SQR6) - if (y <= 6) { - fp_sqr_comba6(A,B); - return; - } -#endif -#if defined(TFM_SQR7) - if (y == 7) { - fp_sqr_comba7(A,B); - return; - } -#endif -#if defined(TFM_SQR8) - if (y == 8) { - fp_sqr_comba8(A,B); - return; - } -#endif -#if defined(TFM_SQR9) - if (y == 9) { - fp_sqr_comba9(A,B); - return; - } -#endif -#if defined(TFM_SQR12) - if (y <= 12) { - fp_sqr_comba12(A,B); - return; - } -#endif -#if defined(TFM_SQR17) - if (y <= 17) { - fp_sqr_comba17(A,B); - return; - } -#endif -#if defined(TFM_SMALL_SET) - if (y <= 16) { - fp_sqr_comba_small(A,B); - return; - } -#endif -#if defined(TFM_SQR20) - if (y <= 20) { - fp_sqr_comba20(A,B); - return; - } -#endif -#if defined(TFM_SQR24) - if (y <= 24) { - fp_sqr_comba24(A,B); - return; - } -#endif -#if defined(TFM_SQR28) - if (y <= 28) { - fp_sqr_comba28(A,B); - return; - } -#endif -#if defined(TFM_SQR32) - if (y <= 32) { - fp_sqr_comba32(A,B); - return; - } -#endif -#if defined(TFM_SQR48) - if (y <= 48) { - fp_sqr_comba48(A,B); - return; - } -#endif -#if defined(TFM_SQR64) - if (y <= 64) { - fp_sqr_comba64(A,B); - return; - } -#endif - fp_sqr_comba(A, B); -} - -/* generic comba squarer */ -void fp_sqr_comba(fp_int *A, fp_int *B) -{ - int pa, ix, iz; - fp_digit c0, c1, c2; - fp_int tmp, *dst; -#ifdef TFM_ISO - fp_word tt; -#endif - - /* get size of output and trim */ - pa = A->used + A->used; - if (pa >= FP_SIZE) { - pa = FP_SIZE-1; - } - - /* number of output digits to produce */ - COMBA_START; - COMBA_CLEAR; - - if (A == B) { - fp_zero(&tmp); - dst = &tmp; - } else { - fp_zero(B); - dst = B; - } - - for (ix = 0; ix < pa; ix++) { - int tx, ty, iy; - fp_digit *tmpy, *tmpx; - - /* get offsets into the two bignums */ - ty = MIN(A->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = A->dp + tx; - tmpy = A->dp + ty; - - /* this is the number of times the loop will iterrate, - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = MIN(A->used-tx, ty+1); - - /* now for squaring tx can never equal ty - * we halve the distance since they approach - * at a rate of 2x and we have to round because - * odd cases need to be executed - */ - iy = MIN(iy, (ty-tx+1)>>1); - - /* forward carries */ - COMBA_FORWARD; - - /* execute loop */ - for (iz = 0; iz < iy; iz++) { - SQRADD2(*tmpx++, *tmpy--); - } - - /* even columns have the square term in them */ - if ((ix&1) == 0) { - /* TAO change COMBA_ADD back to SQRADD */ - SQRADD(A->dp[ix>>1], A->dp[ix>>1]); - } - - /* store it */ - COMBA_STORE(dst->dp[ix]); - } - - COMBA_FINI; - - /* setup dest */ - dst->used = pa; - fp_clamp (dst); - if (dst != B) { - fp_copy(dst, B); - } -} - -int fp_cmp(fp_int *a, fp_int *b) -{ - if (a->sign == FP_NEG && b->sign == FP_ZPOS) { - return FP_LT; - } else if (a->sign == FP_ZPOS && b->sign == FP_NEG) { - return FP_GT; - } else { - /* compare digits */ - if (a->sign == FP_NEG) { - /* if negative compare opposite direction */ - return fp_cmp_mag(b, a); - } else { - return fp_cmp_mag(a, b); - } - } -} - -/* compare against a single digit */ -int fp_cmp_d(fp_int *a, fp_digit b) -{ - /* compare based on sign */ - if ((b && a->used == 0) || a->sign == FP_NEG) { - return FP_LT; - } - - /* compare based on magnitude */ - if (a->used > 1) { - return FP_GT; - } - - /* compare the only digit of a to b */ - if (a->dp[0] > b) { - return FP_GT; - } else if (a->dp[0] < b) { - return FP_LT; - } else { - return FP_EQ; - } - -} - -int fp_cmp_mag(fp_int *a, fp_int *b) -{ - int x; - - if (a->used > b->used) { - return FP_GT; - } else if (a->used < b->used) { - return FP_LT; - } else { - for (x = a->used - 1; x >= 0; x--) { - if (a->dp[x] > b->dp[x]) { - return FP_GT; - } else if (a->dp[x] < b->dp[x]) { - return FP_LT; - } - } - } - return FP_EQ; -} - -/* setups the montgomery reduction */ -int fp_montgomery_setup(fp_int *a, fp_digit *rho) -{ - fp_digit x, b; - -/* fast inversion mod 2**k - * - * Based on the fact that - * - * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) - * => 2*X*A - X*X*A*A = 1 - * => 2*(1) - (1) = 1 - */ - b = a->dp[0]; - - if ((b & 1) == 0) { - return FP_VAL; - } - - x = (((b + 2) & 4) << 1) + b; /* here x*a==1 mod 2**4 */ - x *= 2 - b * x; /* here x*a==1 mod 2**8 */ - x *= 2 - b * x; /* here x*a==1 mod 2**16 */ - x *= 2 - b * x; /* here x*a==1 mod 2**32 */ -#ifdef FP_64BIT - x *= 2 - b * x; /* here x*a==1 mod 2**64 */ -#endif - - /* rho = -1/m mod b */ - *rho = (fp_digit) (((fp_word) 1 << ((fp_word) DIGIT_BIT)) - ((fp_word)x)); - - return FP_OKAY; -} - -/* computes a = B**n mod b without division or multiplication useful for - * normalizing numbers in a Montgomery system. - */ -void fp_montgomery_calc_normalization(fp_int *a, fp_int *b) -{ - int x, bits; - - /* how many bits of last digit does b use */ - bits = fp_count_bits (b) % DIGIT_BIT; - if (!bits) bits = DIGIT_BIT; - - /* compute A = B^(n-1) * 2^(bits-1) */ - if (b->used > 1) { - fp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1); - } else { - fp_set(a, 1); - bits = 1; - } - - /* now compute C = A * B mod b */ - for (x = bits - 1; x < (int)DIGIT_BIT; x++) { - fp_mul_2 (a, a); - if (fp_cmp_mag (a, b) != FP_LT) { - s_fp_sub (a, b, a); - } - } -} - - -#ifdef TFM_SMALL_MONT_SET - #include "fp_mont_small.i" -#endif - -/* computes x/R == x (mod N) via Montgomery Reduction */ -void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) -{ - fp_digit c[FP_SIZE], *_c, *tmpm, mu = 0; - int oldused, x, y, pa; - - /* bail if too large */ - if (m->used > (FP_SIZE/2)) { - (void)mu; /* shut up compiler */ - return; - } - -#ifdef TFM_SMALL_MONT_SET - if (m->used <= 16) { - fp_montgomery_reduce_small(a, m, mp); - return; - } -#endif - - - /* now zero the buff */ - XMEMSET(c, 0, sizeof c); - pa = m->used; - - /* copy the input */ - oldused = a->used; - for (x = 0; x < oldused; x++) { - c[x] = a->dp[x]; - } - MONT_START; - - for (x = 0; x < pa; x++) { - fp_digit cy = 0; - /* get Mu for this round */ - LOOP_START; - _c = c + x; - tmpm = m->dp; - y = 0; - #if (defined(TFM_SSE2) || defined(TFM_X86_64)) - for (; y < (pa & ~7); y += 8) { - INNERMUL8; - _c += 8; - tmpm += 8; - } - #endif - - for (; y < pa; y++) { - INNERMUL; - ++_c; - } - LOOP_END; - while (cy) { - PROPCARRY; - ++_c; - } - } - - /* now copy out */ - _c = c + pa; - tmpm = a->dp; - for (x = 0; x < pa+1; x++) { - *tmpm++ = *_c++; - } - - for (; x < oldused; x++) { - *tmpm++ = 0; - } - - MONT_FINI; - - a->used = pa+1; - fp_clamp(a); - - /* if A >= m then A = A - m */ - if (fp_cmp_mag (a, m) != FP_LT) { - s_fp_sub (a, m, a); - } -} - -void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c) -{ - /* zero the int */ - fp_zero (a); - - /* If we know the endianness of this architecture, and we're using - 32-bit fp_digits, we can optimize this */ -#if (defined(LITTLE_ENDIAN_ORDER) || defined(BIG_ENDIAN_ORDER)) && !defined(FP_64BIT) - /* But not for both simultaneously */ -#if defined(LITTLE_ENDIAN_ORDER) && defined(BIG_ENDIAN_ORDER) -#error Both LITTLE_ENDIAN_ORDER and BIG_ENDIAN_ORDER defined. -#endif - { - unsigned char *pd = (unsigned char *)a->dp; - - if ((unsigned)c > (FP_SIZE * sizeof(fp_digit))) { - int excess = c - (FP_SIZE * sizeof(fp_digit)); - c -= excess; - b += excess; - } - a->used = (c + sizeof(fp_digit) - 1)/sizeof(fp_digit); - /* read the bytes in */ -#ifdef BIG_ENDIAN_ORDER - { - /* Use Duff's device to unroll the loop. */ - int idx = (c - 1) & ~3; - switch (c % 4) { - case 0: do { pd[idx+0] = *b++; - case 3: pd[idx+1] = *b++; - case 2: pd[idx+2] = *b++; - case 1: pd[idx+3] = *b++; - idx -= 4; - } while ((c -= 4) > 0); - } - } -#else - for (c -= 1; c >= 0; c -= 1) { - pd[c] = *b++; - } -#endif - } -#else - /* read the bytes in */ - for (; c > 0; c--) { - fp_mul_2d (a, 8, a); - a->dp[0] |= *b++; - a->used += 1; - } -#endif - fp_clamp (a); -} - -void fp_to_unsigned_bin(fp_int *a, unsigned char *b) -{ - int x; - fp_int t; - - fp_init_copy(&t, a); - - x = 0; - while (fp_iszero (&t) == FP_NO) { - b[x++] = (unsigned char) (t.dp[0] & 255); - fp_div_2d (&t, 8, &t, NULL); - } - fp_reverse (b, x); -} - -int fp_unsigned_bin_size(fp_int *a) -{ - int size = fp_count_bits (a); - return (size / 8 + ((size & 7) != 0 ? 1 : 0)); -} - -void fp_set(fp_int *a, fp_digit b) -{ - fp_zero(a); - a->dp[0] = b; - a->used = a->dp[0] ? 1 : 0; -} - -int fp_count_bits (fp_int * a) -{ - int r; - fp_digit q; - - /* shortcut */ - if (a->used == 0) { - return 0; - } - - /* get number of digits and add that */ - r = (a->used - 1) * DIGIT_BIT; - - /* take the last digit and count the bits in it */ - q = a->dp[a->used - 1]; - while (q > ((fp_digit) 0)) { - ++r; - q >>= ((fp_digit) 1); - } - return r; -} - -int fp_leading_bit(fp_int *a) -{ - int bit = 0; - - if (a->used != 0) { - fp_digit q = a->dp[a->used - 1]; - int qSz = sizeof(fp_digit); - - while (qSz > 0) { - if ((unsigned char)q != 0) - bit = (q & 0x80) != 0; - q >>= 8; - qSz--; - } - } - - return bit; -} - -void fp_lshd(fp_int *a, int x) -{ - int y; - - /* move up and truncate as required */ - y = MIN(a->used + x - 1, (int)(FP_SIZE-1)); - - /* store new size */ - a->used = y + 1; - - /* move digits */ - for (; y >= x; y--) { - a->dp[y] = a->dp[y-x]; - } - - /* zero lower digits */ - for (; y >= 0; y--) { - a->dp[y] = 0; - } - - /* clamp digits */ - fp_clamp(a); -} - - -/* right shift by bit count */ -void fp_rshb(fp_int *c, int x) -{ - register fp_digit *tmpc, mask, shift; - fp_digit r, rr; - fp_digit D = x; - - /* mask */ - mask = (((fp_digit)1) << D) - 1; - - /* shift for lsb */ - shift = DIGIT_BIT - D; - - /* alias */ - tmpc = c->dp + (c->used - 1); - - /* carry */ - r = 0; - for (x = c->used - 1; x >= 0; x--) { - /* get the lower bits of this word in a temp */ - rr = *tmpc & mask; - - /* shift the current word and mix in the carry bits from previous word */ - *tmpc = (*tmpc >> D) | (r << shift); - --tmpc; - - /* set the carry to the carry bits of the current word found above */ - r = rr; - } -} - - -void fp_rshd(fp_int *a, int x) -{ - int y; - - /* too many digits just zero and return */ - if (x >= a->used) { - fp_zero(a); - return; - } - - /* shift */ - for (y = 0; y < a->used - x; y++) { - a->dp[y] = a->dp[y+x]; - } - - /* zero rest */ - for (; y < a->used; y++) { - a->dp[y] = 0; - } - - /* decrement count */ - a->used -= x; - fp_clamp(a); -} - -/* reverse an array, used for radix code */ -void fp_reverse (unsigned char *s, int len) -{ - int ix, iy; - unsigned char t; - - ix = 0; - iy = len - 1; - while (ix < iy) { - t = s[ix]; - s[ix] = s[iy]; - s[iy] = t; - ++ix; - --iy; - } -} - - -/* c = a - b */ -void fp_sub_d(fp_int *a, fp_digit b, fp_int *c) -{ - fp_int tmp; - fp_set(&tmp, b); - fp_sub(a, &tmp, c); -} - - -/* CyaSSL callers from normal lib */ - -/* init a new mp_int */ -int mp_init (mp_int * a) -{ - if (a) - fp_init(a); - return MP_OKAY; -} - -/* clear one (frees) */ -void mp_clear (mp_int * a) -{ - fp_zero(a); -} - -/* handle up to 6 inits */ -int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, mp_int* f) -{ - if (a) - fp_init(a); - if (b) - fp_init(b); - if (c) - fp_init(c); - if (d) - fp_init(d); - if (e) - fp_init(e); - if (f) - fp_init(f); - - return MP_OKAY; -} - -/* high level addition (handles signs) */ -int mp_add (mp_int * a, mp_int * b, mp_int * c) -{ - fp_add(a, b, c); - return MP_OKAY; -} - -/* high level subtraction (handles signs) */ -int mp_sub (mp_int * a, mp_int * b, mp_int * c) -{ - fp_sub(a, b, c); - return MP_OKAY; -} - -/* high level multiplication (handles sign) */ -int mp_mul (mp_int * a, mp_int * b, mp_int * c) -{ - fp_mul(a, b, c); - return MP_OKAY; -} - -/* d = a * b (mod c) */ -int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) -{ - return fp_mulmod(a, b, c, d); -} - -/* c = a mod b, 0 <= c < b */ -int mp_mod (mp_int * a, mp_int * b, mp_int * c) -{ - return fp_mod (a, b, c); -} - -/* hac 14.61, pp608 */ -int mp_invmod (mp_int * a, mp_int * b, mp_int * c) -{ - return fp_invmod(a, b, c); -} - -/* this is a shell function that calls either the normal or Montgomery - * exptmod functions. Originally the call to the montgomery code was - * embedded in the normal function but that wasted alot of stack space - * for nothing (since 99% of the time the Montgomery code would be called) - */ -int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) -{ - return fp_exptmod(G, X, P, Y); -} - -/* compare two ints (signed)*/ -int mp_cmp (mp_int * a, mp_int * b) -{ - return fp_cmp(a, b); -} - -/* compare a digit */ -int mp_cmp_d(mp_int * a, mp_digit b) -{ - return fp_cmp_d(a, b); -} - -/* get the size for an unsigned equivalent */ -int mp_unsigned_bin_size (mp_int * a) -{ - return fp_unsigned_bin_size(a); -} - -/* store in unsigned [big endian] format */ -int mp_to_unsigned_bin (mp_int * a, unsigned char *b) -{ - fp_to_unsigned_bin(a,b); - return MP_OKAY; -} - -/* reads a unsigned char array, assumes the msb is stored first [big endian] */ -int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) -{ - fp_read_unsigned_bin(a, (unsigned char *)b, c); - return MP_OKAY; -} - - -int mp_sub_d(fp_int *a, fp_digit b, fp_int *c) -{ - fp_sub_d(a, b, c); - return MP_OKAY; -} - - -/* fast math conversion */ -int mp_copy(fp_int* a, fp_int* b) -{ - fp_copy(a, b); - return MP_OKAY; -} - - -/* fast math conversion */ -int mp_isodd(mp_int* a) -{ - return fp_isodd(a); -} - - -/* fast math conversion */ -int mp_iszero(mp_int* a) -{ - return fp_iszero(a); -} - - -/* fast math conversion */ -int mp_count_bits (mp_int* a) -{ - return fp_count_bits(a); -} - - -int mp_leading_bit (mp_int* a) -{ - return fp_leading_bit(a); -} - - -/* fast math conversion */ -void mp_rshb (mp_int* a, int x) -{ - fp_rshb(a, x); -} - - -/* fast math wrappers */ -int mp_set_int(fp_int *a, fp_digit b) -{ - fp_set(a, b); - return MP_OKAY; -} - - -#if defined(CYASSL_KEY_GEN) || defined (HAVE_ECC) - -/* c = a * a (mod b) */ -int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c) -{ - fp_int tmp; - fp_zero(&tmp); - fp_sqr(a, &tmp); - return fp_mod(&tmp, b, c); -} - -/* fast math conversion */ -int mp_sqrmod(mp_int *a, mp_int *b, mp_int *c) -{ - return fp_sqrmod(a, b, c); -} - -/* fast math conversion */ -int mp_montgomery_calc_normalization(mp_int *a, mp_int *b) -{ - fp_montgomery_calc_normalization(a, b); - return MP_OKAY; -} - -#endif /* CYASSL_KEYGEN || HAVE_ECC */ - - -#ifdef CYASSL_KEY_GEN - -void fp_gcd(fp_int *a, fp_int *b, fp_int *c); -void fp_lcm(fp_int *a, fp_int *b, fp_int *c); -int fp_isprime(fp_int *a); -int fp_cnt_lsb(fp_int *a); - -int mp_gcd(fp_int *a, fp_int *b, fp_int *c) -{ - fp_gcd(a, b, c); - return MP_OKAY; -} - - -int mp_lcm(fp_int *a, fp_int *b, fp_int *c) -{ - fp_lcm(a, b, c); - return MP_OKAY; -} - - -int mp_prime_is_prime(mp_int* a, int t, int* result) -{ - (void)t; - *result = fp_isprime(a); - return MP_OKAY; -} - - - -static int s_is_power_of_two(fp_digit b, int *p) -{ - int x; - - /* fast return if no power of two */ - if ((b==0) || (b & (b-1))) { - return 0; - } - - for (x = 0; x < DIGIT_BIT; x++) { - if (b == (((fp_digit)1)< cb + d == a */ -static int fp_div_d(fp_int *a, fp_digit b, fp_int *c, fp_digit *d) -{ - fp_int q; - fp_word w; - fp_digit t; - int ix; - - /* cannot divide by zero */ - if (b == 0) { - return FP_VAL; - } - - /* quick outs */ - if (b == 1 || fp_iszero(a) == 1) { - if (d != NULL) { - *d = 0; - } - if (c != NULL) { - fp_copy(a, c); - } - return FP_OKAY; - } - - /* power of two ? */ - if (s_is_power_of_two(b, &ix) == 1) { - if (d != NULL) { - *d = a->dp[0] & ((((fp_digit)1)<used; - q.sign = a->sign; - w = 0; - for (ix = a->used - 1; ix >= 0; ix--) { - w = (w << ((fp_word)DIGIT_BIT)) | ((fp_word)a->dp[ix]); - - if (w >= b) { - t = (fp_digit)(w / b); - w -= ((fp_word)t) * ((fp_word)b); - } else { - t = 0; - } - q.dp[ix] = (fp_digit)t; - } - - if (d != NULL) { - *d = (fp_digit)w; - } - - if (c != NULL) { - fp_clamp(&q); - fp_copy(&q, c); - } - - return FP_OKAY; -} - - -/* c = a mod b, 0 <= c < b */ -static int fp_mod_d(fp_int *a, fp_digit b, fp_digit *c) -{ - return fp_div_d(a, b, NULL, c); -} - - -/* Miller-Rabin test of "a" to the base of "b" as described in - * HAC pp. 139 Algorithm 4.24 - * - * Sets result to 0 if definitely composite or 1 if probably prime. - * Randomly the chance of error is no more than 1/4 and often - * very much lower. - */ -static void fp_prime_miller_rabin (fp_int * a, fp_int * b, int *result) -{ - fp_int n1, y, r; - int s, j; - - /* default */ - *result = FP_NO; - - /* ensure b > 1 */ - if (fp_cmp_d(b, 1) != FP_GT) { - return; - } - - /* get n1 = a - 1 */ - fp_init_copy(&n1, a); - fp_sub_d(&n1, 1, &n1); - - /* set 2**s * r = n1 */ - fp_init_copy(&r, &n1); - - /* count the number of least significant bits - * which are zero - */ - s = fp_cnt_lsb(&r); - - /* now divide n - 1 by 2**s */ - fp_div_2d (&r, s, &r, NULL); - - /* compute y = b**r mod a */ - fp_init(&y); - fp_exptmod(b, &r, a, &y); - - /* if y != 1 and y != n1 do */ - if (fp_cmp_d (&y, 1) != FP_EQ && fp_cmp (&y, &n1) != FP_EQ) { - j = 1; - /* while j <= s-1 and y != n1 */ - while ((j <= (s - 1)) && fp_cmp (&y, &n1) != FP_EQ) { - fp_sqrmod (&y, a, &y); - - /* if y == 1 then composite */ - if (fp_cmp_d (&y, 1) == FP_EQ) { - return; - } - ++j; - } - - /* if y != n1 then composite */ - if (fp_cmp (&y, &n1) != FP_EQ) { - return; - } - } - - /* probably prime now */ - *result = FP_YES; -} - - -/* a few primes */ -static const fp_digit primes[256] = { - 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, - 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, - 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, - 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, 0x0083, - 0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD, - 0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF, - 0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107, - 0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137, - - 0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167, - 0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199, - 0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9, - 0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7, - 0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239, - 0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265, - 0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293, - 0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF, - - 0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301, - 0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B, - 0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371, - 0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD, - 0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5, - 0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419, - 0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449, - 0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B, - - 0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7, - 0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503, - 0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529, - 0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F, - 0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3, - 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, - 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, - 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 -}; - -int fp_isprime(fp_int *a) -{ - fp_int b; - fp_digit d = 0; - int r, res; - - /* do trial division */ - for (r = 0; r < 256; r++) { - fp_mod_d(a, primes[r], &d); - if (d == 0) { - return FP_NO; - } - } - - /* now do 8 miller rabins */ - fp_init(&b); - for (r = 0; r < 8; r++) { - fp_set(&b, primes[r]); - fp_prime_miller_rabin(a, &b, &res); - if (res == FP_NO) { - return FP_NO; - } - } - return FP_YES; -} - - -/* c = [a, b] */ -void fp_lcm(fp_int *a, fp_int *b, fp_int *c) -{ - fp_int t1, t2; - - fp_init(&t1); - fp_init(&t2); - fp_gcd(a, b, &t1); - if (fp_cmp_mag(a, b) == FP_GT) { - fp_div(a, &t1, &t2, NULL); - fp_mul(b, &t2, c); - } else { - fp_div(b, &t1, &t2, NULL); - fp_mul(a, &t2, c); - } -} - - -static const int lnz[16] = { - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 -}; - -/* Counts the number of lsbs which are zero before the first zero bit */ -int fp_cnt_lsb(fp_int *a) -{ - int x; - fp_digit q, qq; - - /* easy out */ - if (fp_iszero(a) == 1) { - return 0; - } - - /* scan lower digits until non-zero */ - for (x = 0; x < a->used && a->dp[x] == 0; x++); - q = a->dp[x]; - x *= DIGIT_BIT; - - /* now scan this digit until a 1 is found */ - if ((q & 1) == 0) { - do { - qq = q & 15; - x += lnz[qq]; - q >>= 4; - } while (qq == 0); - } - return x; -} - - -/* c = (a, b) */ -void fp_gcd(fp_int *a, fp_int *b, fp_int *c) -{ - fp_int u, v, r; - - /* either zero than gcd is the largest */ - if (fp_iszero (a) == 1 && fp_iszero (b) == 0) { - fp_abs (b, c); - return; - } - if (fp_iszero (a) == 0 && fp_iszero (b) == 1) { - fp_abs (a, c); - return; - } - - /* optimized. At this point if a == 0 then - * b must equal zero too - */ - if (fp_iszero (a) == 1) { - fp_zero(c); - return; - } - - /* sort inputs */ - if (fp_cmp_mag(a, b) != FP_LT) { - fp_init_copy(&u, a); - fp_init_copy(&v, b); - } else { - fp_init_copy(&u, b); - fp_init_copy(&v, a); - } - - fp_zero(&r); - while (fp_iszero(&v) == FP_NO) { - fp_mod(&u, &v, &r); - fp_copy(&v, &u); - fp_copy(&r, &v); - } - fp_copy(&u, c); -} - -#endif /* CYASSL_KEY_GEN */ - - -#if defined(HAVE_ECC) || !defined(NO_PWDBASED) -/* c = a + b */ -void fp_add_d(fp_int *a, fp_digit b, fp_int *c) -{ - fp_int tmp; - fp_set(&tmp, b); - fp_add(a,&tmp,c); -} - -/* external compatibility */ -int mp_add_d(fp_int *a, fp_digit b, fp_int *c) -{ - fp_add_d(a, b, c); - return MP_OKAY; -} - -#endif /* HAVE_ECC || !NO_PWDBASED */ - - -#ifdef HAVE_ECC - -/* chars used in radix conversions */ -static const char *fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; - -static int fp_read_radix(fp_int *a, const char *str, int radix) -{ - int y, neg; - char ch; - - /* make sure the radix is ok */ - if (radix < 2 || radix > 64) { - return FP_VAL; - } - - /* if the leading digit is a - * minus set the sign to negative. - */ - if (*str == '-') { - ++str; - neg = FP_NEG; - } else { - neg = FP_ZPOS; - } - - /* set the integer to the default of zero */ - fp_zero (a); - - /* process each digit of the string */ - while (*str) { - /* if the radix < 36 the conversion is case insensitive - * this allows numbers like 1AB and 1ab to represent the same value - * [e.g. in hex] - */ - ch = (char) ((radix < 36) ? XTOUPPER(*str) : *str); - for (y = 0; y < 64; y++) { - if (ch == fp_s_rmap[y]) { - break; - } - } - - /* if the char was found in the map - * and is less than the given radix add it - * to the number, otherwise exit the loop. - */ - if (y < radix) { - fp_mul_d (a, (fp_digit) radix, a); - fp_add_d (a, (fp_digit) y, a); - } else { - break; - } - ++str; - } - - /* set the sign only if a != 0 */ - if (fp_iszero(a) != FP_YES) { - a->sign = neg; - } - return FP_OKAY; -} - -/* fast math conversion */ -int mp_read_radix(mp_int *a, const char *str, int radix) -{ - return fp_read_radix(a, str, radix); -} - -/* fast math conversion */ -int mp_set(fp_int *a, fp_digit b) -{ - fp_set(a,b); - return MP_OKAY; -} - -/* fast math conversion */ -int mp_sqr(fp_int *A, fp_int *B) -{ - fp_sqr(A, B); - return MP_OKAY; -} - -/* fast math conversion */ -int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) -{ - fp_montgomery_reduce(a, m, mp); - return MP_OKAY; -} - - -/* fast math conversion */ -int mp_montgomery_setup(fp_int *a, fp_digit *rho) -{ - return fp_montgomery_setup(a, rho); -} - -int mp_div_2(fp_int * a, fp_int * b) -{ - fp_div_2(a, b); - return MP_OKAY; -} - - -int mp_init_copy(fp_int * a, fp_int * b) -{ - fp_init_copy(a, b); - return MP_OKAY; -} - - - -#endif /* HAVE_ECC */ - -#endif /* USE_FAST_MATH */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po deleted file mode 100644 index d1f55ba9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/test.Po +++ /dev/null @@ -1,202 +0,0 @@ -ctaocrypt/test/test.o: ctaocrypt/test/test.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/md2.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/pwdbased.h \ - cyassl/ctaocrypt/ripemd.h /usr/include/stdio.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h ctaocrypt/test/test.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/md2.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/md4.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/sha512.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/coding.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/pwdbased.h: - -cyassl/ctaocrypt/ripemd.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -ctaocrypt/test/test.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po b/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po deleted file mode 100644 index 934f747b..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/.deps/testsuite_testsuite_test-test.Po +++ /dev/null @@ -1,202 +0,0 @@ -ctaocrypt/test/testsuite_testsuite_test-test.o: ctaocrypt/test/test.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/md2.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/md4.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/coding.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/pwdbased.h \ - cyassl/ctaocrypt/ripemd.h /usr/include/stdio.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h ctaocrypt/test/test.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/md2.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/md4.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/sha512.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/coding.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/pwdbased.h: - -cyassl/ctaocrypt/ripemd.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -ctaocrypt/test/test.h: diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp b/project1/cyassl-3.0.0/ctaocrypt/test/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt b/project1/cyassl-3.0.0/ctaocrypt/test/.libs/testctaocrypt deleted file mode 100755 index 765ccaf74b268f64a05b33027d3275d72a293641..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22418 zcmeHPdwf(ymaagHEn*T75H+I>HW&~>0s*5UCXj?zfRKcTf;3IKla6$fwz~s~6Gxa% zkWAAW9b{2q26cRm=-{G=h!6}t|Mg&yW?DtjOo7`N&?)uw5_8)G3 zm8!4KsZ&*_PCf4Jd(Q(|IoUBWF+#sOh>n72^+OhGDq`;_MM)JlahXUI*NX(v30b72 zE(8yP4Fwo3L7oMnBSHai!6J*5;Ywfz(vU3!A|X(gp=PiU3@k6=6@Ax8A$D!HSQ!#J zKt2NNB^^m|4)k-NG3Y``XB`Y4ROCV344J?TIxY8b(AAVAMAIu4D}x<02Aw_ybing2 z%18Ag4|HSu(oh!z%d>xjy(M!8dtHOPC1n+rNrCdDA&SPbq>q_275`N~D6V|X|HcY#S*;f6sA#u<|U&cmg7x_Qa0b=4@ z6aVKX{rCxgW5WGS z_}@|fs|Ku9lqIef-vdWm@HL_WIQ2P;mFqxP5hsqc;lD<_i2Q+JRlb|JTx^8=?%=1q zZUWOAYffR6GZ64{!5JnT;|eA^TyDR+xFisC`wJ$H_Li5q3!HPkZsBkgmzI|~0zs!g z=x_+f`1y`Jjc>FUBHRI0yxqbX?!f4|g;`~V{wiNkj4gE*PW8E*LARLb8kSvB=Jbk8 z&jfc>rn|7*r9Op{rcmhE@DQ3ok#n9k$T%OgM6S>l(~X>6lC?!tL_6=ek_rEc&C zOUjA^l8*KZij&Qk4X>E%Eotd#hQBaXm#^BO>wtYxg~*fZFE4Zllt}at+Q=w|RM~K? zJX(^UpW~S3_Lme@2}cn$A{E(6)^ygYN2M!G(`pEG6=>4(ONz?`*fbtpt2!4OnO9aU z>rul5UX?({wL+>El?!_+r6~=kW%+_0zuV~|PL`IYD2{QHVMVTzGDk(g?Go-vjBHW4 z&s`>b6~Tb;`Af=zMIsRNdy!S@E)BSYj0#JAGV)c4qC#(Zz%5FhUW~LTVkIz7+OlSz zrOuKv=EG{;Ff%8pa{~cIL{^zgjL8`{YP4fWQc6oInUg}hFpY3^kb5Rm+(Xq4DibnI z9>u3(ox5X8uFiX*I0pN={>MGOgO~?_`X1V~q~r?L{G*l^FL4K9QH>Gjwpgs460iqj zJ-8I}I-W6jyEDdu(2Fq+M+uCv@!J?*iZcsitN@9OFT?u4xU&$+j4#J}!nh0042;o& z5sa}^q%)4gnTRnOIhJu(A#xaFvCL(R16u)O97<*|?jgi1#yy3Y!}uy8T#Rve@i4v` zOAzC0gzz!GR)`>D^sAEbuY{;(e4P*r8DEb*jIm9KC5(Fuv6OKiA?g|5AjC4pb|F?U z?kmJf#{F0g;!1!h%@cz#LI}|i5nzdLEMXY zt;8#dZN#f3UQL`xTrcsTh?9vIO8f#bZ%2;!Bwj->S^Z_XRR8hV0FPva+G~x~afVe?l z;a})%rv)*MGz@_`dwOc!;n1;OJ1ut7nwxevM%I(Gfl%^qJ=>w~ovq(oAJg=~*@~D( zd0?*Hrx&ctv|IGT`*t_hosMk6iiEZ8b_x&`S4#QTXf;%@;}Yh@?EVfdd#VXHtf>Eb zy&*kY8bS&ha-<4H>W>8Qzo@=GfBLl0v3Q!Bn7OENYBH9cYP)Uc7%Rxl(f6T%(Af@g zwGTpHQ4jWvx*fHr<7)o|7zrhR+uU4du}7oOWAs_9TZ*_`5_2`;9uhZWmr+CxOeEyf zh_8_N3br0aTp)?{8u1Yl4`V-4#3D&ts}X}FCRlaiR7q^oh|@{T$Bv~+W=i4-jd&}G zqp^J{;!sJ9{}0ubUy+!BJxvk&NMf=^6eLc>MyH5fB{5ece)$uK%dz_@qL4(NM%+Q- z-WK9H;6Qf*I!0up)HK|C-XaU}Glq9#W|e^#kf(9$phI9%fg(w z&`LN5Wirmy?Ik}{1^HIWkA8fXCxwdck%=*(?dL)}<5Lu(-EYB}?HU3Ael zsuJdNccaqmdn|>(S?|CZCbCXyHfWEJgqEmYbcgg_npP9|>?jgir6{&YXunFa1&L{( zAs(oBZaO0M1kLYIT9uklS3DyW&rwwxn)fPhsriM9Cr9#B+db^{rZeo=2FHo!<_cfk ziAWHOQ>MKOPN5>=wHMTFJ=!@OJF2e0-X*jnKAe3Pim^hWQe!^alUJo{kPc^`l6o5` z^~PGFtEBjf_%H-S#-D-Ke(3m{SB`cHqmDBN7Hy-N3|ia7G6>XKf1Cg#Z%M6HQ){29 z-nP-24Xj43EmFO0qczEsY0sr`B%PMMor&JY)rMKvYfs#uje+WP(4Ktsitzns!&#yk zjSOv%mtC&La-a#hObNM*DjQGh(Fv=ik!-k=gp_dBF@q7Y5z%^C5Xyku$XKb2nBOdG zRR()+PzE1a>B>mJu{aWXUUjcmB(zqg614HMSy2?@W>*tttD+`GLSLxVK+uvC6i=$+ zIj$&akx-v+q(O}UPdZM~l#@xGEz(Y2`UrazdfC11Kf+0M1MSg`=mmP#1tV{*`#uZ` z`ac8OML9nG5YZXmOD#{K9`1+DgkxK#pyG@cDUMun%tZ0ARFx(s`h(K%WD-Y)v(IU? zv8oC+AG4%@ifbd2F&{0Vo!`PbVO-4}>h{JxGznWPrscu9vx~M-i3Xik8+5uW(V$aI zxpT_E?9i!P@HCxj(@xVVrrq62Uvk=MI@P9~rc+Eizv7Y8PSdHJcA8EPDV-+hI;B3^ z=rjS!@Mt^wWQp-+)etDO!}d~NJh@wD3MgYDQUdD`l<#ZIY@Haex9>N>?q zOGMZHQ|ffWg>|}Fag5h>s@tj5=@g~#aVDLP)pW|HMOR4yzg(wl&_I3e+i=SqdFciA zevN%B2$9fwf*N}cz|IWx3Jh!`z%##PHQojmINmc zp^?xoRe@J=`dT@IS~3!vr6gBM{tpy?HNZx>Y=n=&#J6B`=NKfSkqbfMu7V_=eKUEq z7uJ=;aHc&qoHz(Da{r0c*m-}1tsIA&%b{_dfTMOQ20aZU68-KZHmEUNOuC@PWW-jKTZyJ1$-TaA zNA&tu9@I|yQqs4}N;Ek?VYtI%PJ|ygCu?C@EQ+rq7jx%Uh)xZspK2kYK~G2$nqtRV znHZOKrXm5m;lRlFZ{=K^NF zWZeTyaSz&Le*sFtmX2i@=WCeHz32_L_P=8c;%eVPP9#)J?o6!Zs`n$PHTFQ2>cvtw zp}7<-g$C`tpczV(ixBk#iH9JuA_(nh<*lfkzZas{+M%h76qSA)s#3LSRaj;I668b7 zL5dj^2|cVD#bJ~J!>(}ZqwxFxR_J(lMe)#KY0BYPZI`#g2H?s>feG#9m-_4k&cb5-n; z;*mOHk~&fqNL{Ry)*<_+4il=Gs{0OA`{$aXjvEw3Q3gc~1E*BfXDx~Xhrx!9!K8FW z?d?rl_>5DQ+wN=jHPnDQ?aG~C0dD0Yp%Xg88v6<|7>;$*c(3Qh89-Uyffn`h+`t2b z+NB*z7gyoFF0OVjW$0zr*c%9?$as`)EpwA9(^Hmt5|qfgOIaJ|BTo;l=E}OFvp~a0 zUJ3RJpT=OtElV$hq9x-Eim@9R$FSX+q9yS(Gz%%)sOSNa(Dkg4s%bgcsQ&Eb0MHy8 zbuCk^Qp@?co8o=2uH$(&v^*}}1lUPXc1q0s34C>Pme&!u_F z`KC^UJ0J%7r3T_^Poj)81T5c}Anb~!kZ7#Z)F+Z}H~1oI$Ah6npN442*e_`>D;eF< zqIk#{KnSY~XJWtLz#)rbkK%^LQ?qArD}aVKfnG5^oQdt0y$UU$eDv!w z#@lPZ-LMx7!Qpb~+A)G|R4}C7#~TZng1oJO^<4v;(tsOeeL;$ZdQ+mT!|;HGwjX^P zH?A;KnNEQ~bu+ybPm}Zs&<#ICU;->b7Oxh=MT1>hgJ-ZMFxn08Lu6ddaLsZfYwW&D zp&PZ1@r{iZ1D?hy7CH|FF z);4miS{unCx)j=)R%D?n@}4ZhC#bv|r3&9bBOq&!B*=$$I6tAo&{=oL@!|0Xk~I7p zl}qV9KFOnWbs~~I!01ij1C|}2R~iIxdMW|cx`0h~A2h;_X#(^G{@d6vefRQ&>VTTV9T`Tuw_A2hm`}sv1r@CC-|&l2Sl7s6lV*B+A;lVYh5+MLLA)b?Z9sg5E&2yTDOlLrGmt%TUrFs1}e$ zOUqO1J03RcCipN`*DzKZ9$7h^pvo?os@6KFy9>q?wD{1rUNak08XBigPidZ(AMFbR z!{c8R3>`}d<8&KY_a2UY(UQZcHna=L{yVn*+@bb#@J96<8#2;h3LH=*QxRL5m%T;C z(9W1!&Qu%>ZA+Lr+i`c}(JShW*LRKD?_BH9gGG&B;%B{({9#MZ7WMlnf8QKcQQ~#k z<_B#4in1VnO1G6dgC1LHNdR%7r?Z%tIm{-npgRz>6*)`1ZddQlB7bbg1+oX>T>zV{ zE%(@o8KVbLQajm{)P6PvwWVa_jZST+F_~HU?KKA3L)+obXrDVTV^ZeiiQsQrWnO-} z9nBo8YBX^>=N5|knA{a3_Dx>9fB7BvC;t5bKYk()1f0cgo2#T4Iut+5E4jb=jo(M| z?i!r(=abGRfkG~KQL(4wo_XHVvU1C4?y*NpqOq~4dVzfZjQ_{ia7IxV_q@7RY zKC|2GIXln(Qw7ul6(MR?jLb~9ZC}~OSH?f}!<7Dq4`=&M3g`dxC0?F+$ESPpiYwm< zts30py65vBpWSb@ut)B3?(3Ac;c!F0-**`~=ay$ie08U*xp(pDW8Z#s^{1V-it+9u zw-{SuEAZfL9`Wch|9!*L-b%Rg)I(=`gwL%K3p~!C%~fuza@rO+%P`f-{kF35pa<`@ z+#xEuRF1r7?du)Cd7&(&^WATxiO+xWC8ljo&HGjNoF$)b*g5n>blqujc{`W*b32zf ze(vBshmQ_^dS9^T$0utJuI&3nb(QFLcVN_;Yr6jRk!PMb^}DBjJ-P5?#fM_S$QQ30 zzA!escH)MkO^+;kzW<$4f~&6UtrMR=1efWv<(XYh)KaKOgTl{yt`?g}^Zzs&^IqKJ+Jk@Q$U6}*=9&=3;8!LNm zc{pb8HyIh}U)=plpBvV8bUw5Es{2;H7T@grr|9vrSbtT@;;EPTUH=|#SpU<_OCLI! zy%{f0q~xI9(|Ch^8-n8Ub?}*)@+n?`uUlhkbvv%I?Y zPRW?!ym!&))%}0-LCx9NI#OE>Iv=hNG6c^9C!?0pxew`_tYmbP1=iHLr*-4olT8#c%D z>1}t(^XYB3%Xa8(_RaI@Z8y;K=`q)Kyv>Gw;4mo`e%9PP0&x?55SW8F9X}?mM9gOt zykhRl6EW4+m}|ROEd1TuhCDuyAAxeb0~N8>?AR{j<1PP5lVX!QjE(J{(HI+_u_Lxi#?Dx4#`ahX9~D$1 ztVCIyV=rD8HE>Y_7d3EE0~a-LQ3Dq>a8UynHE>Y_7d3EE0~a-LQ3JnF1HOkX)?5S@ zyZO%+>(ehYU#0vU(iDS8jJN+q;bnH^e_cCuCJORH2$#25& zDV4nVh(X}X06q&?jmr640*7f*C6hOm>uIc^o;Q%PC4GZv*I_Xa<&<- zfRyiFqWTW_i!S;7yjG$JeVvc67-2cWa|r7Zb|CCW_!{9fLZ_t`YfprJ2*VMw5vCy& zAT(-zrT2hEsltViHCCMt4 zczmcSk_yX9OYyW^AB+D@%=tyT=Dd(TBmijp`b8SA8xZh=yyTO<9zd`G>lf!FuM`BG zZwcljpY_=#Mg7zHG6C^uuAKF99)}9j{syG=i+sEuM9}$i z!Iuj@`5aYJ)!IkiM-6=RGqM_=efYWPX%}_Ji*JqT^7yTL_kOLGk5*5`K9v$5{F*8QIz<^6Gr= zA|0pkald%)0(|?y!~W7l_%T@11^7NS@O=cnkHD9RJpIz^jUt0%MtRa#3iwz7^LUYu zYC4Ia*UN8_&)w15c90|=c~2YoxNnK{wthdz!_aKt`wV=afzL1;Eqb{Gl`^00;}>#Y zfsf_&OHX$OAKOP;=S4ohOsRjQF>t@6Ed836fpvof?b4HsX)F4bIR@hk+rJJOqY+py zZIE-rDDR_OAvWvE15KBQ>d!fz~3iCA5>Pw=dT*)v`F<%v(GavIu+dn%Bo_^H%hjB+~ z@oJtaOv_fjbQGrMgy6hUn4_Z3O$zfgqs~nVtCgMhuCV%bhIXy6IxXqvl#Ze&vjy!` z(Y1wx_K2&a^ri#5Y{5LWwff%ZC{JxNOaAL9u5B}p7ICtf8qnJlgHstL9MbgB0s6pl zAmX*NCUFL^e)c4u4lKX;L>zB|=R4l>I-fv*Qv<>SP?z@I>VFHQaf zz*`LXA>ii?_>aKH4fs{y2Z5>5Fks6?{eFXtg@4iY-&LFi zHjaM_GZN&tU<&KwN$)E?fOY$ffqh;FtdA$@DV*|}J;uO3#{lzNW@dMzy)dC&oE>vb znBPq3mko(};3n83SBh>Ot`N@w>-KJgwZ3ZLr#!PSq9)MO9<^BSLO)slZzlf3CVbk2 zI~f*5%9kG@BIZSWqlrEQSbh}^8hzi~Vxni5aJ~u82JZ6*obR>v7MtkhCcMam9|ku1 z%6ZI0e+GCp=Hm+Vllu5q6MZxA2an@EP^0fM(LXWagTNm@hVz-$-fvCxpMk&lBkn&D zvp)Lx&@bxmY7^!=yZZQ2e<>zkTA88GXA1o)6uUtoFUor#_|f0vUQMHaVxk{0;ZFKN6=hkz zrwLyNyc+#;N;=kK6a5Yoo?^nYfTLRf;;}wEf%W~4^U(v$b0nKZUrgnu@>RgC_I!<~ z1@@pla2X=||2q@^?|~0KZL!j)7WMNaaQ}a4wT~A~{I8qv78BlW!XKLO=O+BM0o%~V zAAy&^{&;`F_H;6wX{hgBCTut1WMIAjw2u+M_pfN}&qNddbOUDn_Zl$kTV%pZP524m zFP^kmuhs158DOI?tQSrEq7ZLs1uO6ZS0UU5jUS!o$QhSk08dw~{;(XuQU_cQmBH1O z?&Zpm<#4#l9mU@AxlXUc6)g7$9L|bLfje2B*Bx}bl7g{CsMV-(3i08tAIHWYLS0+EQ&RXf3LUTEz}Wc3#HBEJxO)Ogb`? zW38w8*rP?g@G6yg=cJ5@<3@waK#@Msgkwz3*~C`B?>yf{al)SrjMzP!$F$ zl#8x$5U4z4!Ks(o!`OfCZ>=(IcoJSNbodG#K~F{5yrj96g3m}aKUPYr=7dXm%}P(# z{aPgpeT3RLLWA3{+%^u%=p?I6DLC5lRT*;S>`PR~UsCngTEt+EV^QI4e zi_r*gCo}Yh$&_XPB{af554P zDyL#b65YE&Zxi4x4zssa|MXU7{@yRJ<}1MbX`Yl zRJ4@L1>q$({d(1zCGfO|x34bdA2 pMkS`zJD!~4`fkz2p`xy8y&`F;%FeVdPHR~xl~m;gv0Yz;{{^637^(mO diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/include.am b/project1/cyassl-3.0.0/ctaocrypt/test/include.am deleted file mode 100644 index d5c550bc..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -noinst_PROGRAMS+= ctaocrypt/test/testctaocrypt -ctaocrypt_test_testctaocrypt_SOURCES = ctaocrypt/test/test.c -ctaocrypt_test_testctaocrypt_LDADD = src/libcyassl.la -ctaocrypt_test_testctaocrypt_DEPENDENCIES = src/libcyassl.la -noinst_HEADERS += ctaocrypt/test/test.h -EXTRA_DIST += ctaocrypt/test/test.sln -EXTRA_DIST += ctaocrypt/test/test.vcproj -DISTCLEANFILES+= ctaocrypt/test/.libs/testctaocrypt diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.c b/project1/cyassl-3.0.0/ctaocrypt/test/test.c deleted file mode 100644 index e19675bd..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/test.c +++ /dev/null @@ -1,4758 +0,0 @@ -/* test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef XMALLOC_USER - #include /* we're using malloc / free direct here */ -#endif - -#ifndef NO_CRYPT_TEST - -#ifdef CYASSL_TEST_CERT - #include -#else - #include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_ECC - #include -#endif -#ifdef HAVE_BLAKE2 - #include -#endif -#ifdef HAVE_LIBZ - #include -#endif -#ifdef HAVE_PKCS7 - #include -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -#ifdef OPENSSL_EXTRA - #include - #include - #include - #include -#endif - - -#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) - /* include test cert and key buffers for use with NO_FILESYSTEM */ - #if defined(CYASSL_MDK_ARM) - #include "cert_data.h" - /* use certs_test.c for initial data, so other - commands can share the data. */ - #else - #include - #endif -#endif - -#if defined(CYASSL_MDK_ARM) - #include - #include - extern FILE * CyaSSL_fopen(const char *fname, const char *mode) ; - #define fopen CyaSSL_fopen -#endif - -#ifdef HAVE_NTRU - #include "crypto_ntru.h" -#endif -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif - -#ifdef FREESCALE_MQX - #include - #include - #include -#else - #include -#endif - - -#ifdef THREADX - /* since just testing, use THREADX log printf instead */ - int dc_log_printf(char*, ...); - #undef printf - #define printf dc_log_printf -#endif - -#include "ctaocrypt/test/test.h" - - -typedef struct testVector { - const char* input; - const char* output; - size_t inLen; - size_t outLen; -} testVector; - -int md2_test(void); -int md5_test(void); -int md4_test(void); -int sha_test(void); -int sha256_test(void); -int sha512_test(void); -int sha384_test(void); -int hmac_md5_test(void); -int hmac_sha_test(void); -int hmac_sha256_test(void); -int hmac_sha384_test(void); -int hmac_sha512_test(void); -int hmac_blake2b_test(void); -int hkdf_test(void); -int arc4_test(void); -int hc128_test(void); -int rabbit_test(void); -int des_test(void); -int des3_test(void); -int aes_test(void); -int aesgcm_test(void); -int gmac_test(void); -int aesccm_test(void); -int camellia_test(void); -int rsa_test(void); -int dh_test(void); -int dsa_test(void); -int random_test(void); -int pwdbased_test(void); -int ripemd_test(void); -int openssl_test(void); /* test mini api */ -int pbkdf1_test(void); -int pkcs12_test(void); -int pbkdf2_test(void); -#ifdef HAVE_ECC - int ecc_test(void); - #ifdef HAVE_ECC_ENCRYPT - int ecc_encrypt_test(void); - #endif -#endif -#ifdef HAVE_BLAKE2 - int blake2b_test(void); -#endif -#ifdef HAVE_LIBZ - int compress_test(void); -#endif -#ifdef HAVE_PKCS7 - int pkcs7enveloped_test(void); - int pkcs7signed_test(void); -#endif - - - -static void err_sys(const char* msg, int es) -{ - printf("%s error = %d\n", msg, es); - #if !defined(THREADX) && !defined(CYASSL_MDK_ARM) - if (msg) - exit(es); - #endif - return; -} - -/* func_args from test.h, so don't have to pull in other junk */ -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - - - -void ctaocrypt_test(void* args) -{ - int ret = 0; - - ((func_args*)args)->return_code = -1; /* error state */ - -#if !defined(NO_BIG_INT) - if (CheckCtcSettings() != 1) - err_sys("Build vs runtime math mismatch\n", -1234); - -#ifdef USE_FAST_MATH - if (CheckFastMathSettings() != 1) - err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235); -#endif /* USE_FAST_MATH */ -#endif /* !NO_BIG_INT */ - - -#ifndef NO_MD5 - if ( (ret = md5_test()) != 0) - err_sys("MD5 test failed!\n", ret); - else - printf( "MD5 test passed!\n"); -#endif - -#ifdef CYASSL_MD2 - if ( (ret = md2_test()) != 0) - err_sys("MD2 test failed!\n", ret); - else - printf( "MD2 test passed!\n"); -#endif - -#ifndef NO_MD4 - if ( (ret = md4_test()) != 0) - err_sys("MD4 test failed!\n", ret); - else - printf( "MD4 test passed!\n"); -#endif - -#ifndef NO_SHA - if ( (ret = sha_test()) != 0) - err_sys("SHA test failed!\n", ret); - else - printf( "SHA test passed!\n"); -#endif - -#ifndef NO_SHA256 - if ( (ret = sha256_test()) != 0) - err_sys("SHA-256 test failed!\n", ret); - else - printf( "SHA-256 test passed!\n"); -#endif - -#ifdef CYASSL_SHA384 - if ( (ret = sha384_test()) != 0) - err_sys("SHA-384 test failed!\n", ret); - else - printf( "SHA-384 test passed!\n"); -#endif - -#ifdef CYASSL_SHA512 - if ( (ret = sha512_test()) != 0) - err_sys("SHA-512 test failed!\n", ret); - else - printf( "SHA-512 test passed!\n"); -#endif - -#ifdef CYASSL_RIPEMD - if ( (ret = ripemd_test()) != 0) - err_sys("RIPEMD test failed!\n", ret); - else - printf( "RIPEMD test passed!\n"); -#endif - -#ifdef HAVE_BLAKE2 - if ( (ret = blake2b_test()) != 0) - err_sys("BLAKE2b test failed!\n", ret); - else - printf( "BLAKE2b test passed!\n"); -#endif - -#ifndef NO_HMAC - #ifndef NO_MD5 - if ( (ret = hmac_md5_test()) != 0) - err_sys("HMAC-MD5 test failed!\n", ret); - else - printf( "HMAC-MD5 test passed!\n"); - #endif - - #ifndef NO_SHA - if ( (ret = hmac_sha_test()) != 0) - err_sys("HMAC-SHA test failed!\n", ret); - else - printf( "HMAC-SHA test passed!\n"); - #endif - - #ifndef NO_SHA256 - if ( (ret = hmac_sha256_test()) != 0) - err_sys("HMAC-SHA256 test failed!\n", ret); - else - printf( "HMAC-SHA256 test passed!\n"); - #endif - - #ifdef CYASSL_SHA384 - if ( (ret = hmac_sha384_test()) != 0) - err_sys("HMAC-SHA384 test failed!\n", ret); - else - printf( "HMAC-SHA384 test passed!\n"); - #endif - - #ifdef CYASSL_SHA512 - if ( (ret = hmac_sha512_test()) != 0) - err_sys("HMAC-SHA512 test failed!\n", ret); - else - printf( "HMAC-SHA512 test passed!\n"); - #endif - - #ifdef HAVE_BLAKE2 - if ( (ret = hmac_blake2b_test()) != 0) - err_sys("HMAC-BLAKE2 test failed!\n", ret); - else - printf( "HMAC-BLAKE2 test passed!\n"); - #endif - - #ifdef HAVE_HKDF - if ( (ret = hkdf_test()) != 0) - err_sys("HMAC-KDF test failed!\n", ret); - else - printf( "HMAC-KDF test passed!\n"); - #endif - -#endif - -#ifdef HAVE_AESGCM - if ( (ret = gmac_test()) != 0) - err_sys("GMAC test passed!\n", ret); - else - printf( "GMAC test passed!\n"); -#endif - -#ifndef NO_RC4 - if ( (ret = arc4_test()) != 0) - err_sys("ARC4 test failed!\n", ret); - else - printf( "ARC4 test passed!\n"); -#endif - -#ifndef NO_HC128 - if ( (ret = hc128_test()) != 0) - err_sys("HC-128 test failed!\n", ret); - else - printf( "HC-128 test passed!\n"); -#endif - -#ifndef NO_RABBIT - if ( (ret = rabbit_test()) != 0) - err_sys("Rabbit test failed!\n", ret); - else - printf( "Rabbit test passed!\n"); -#endif - -#ifndef NO_DES3 - if ( (ret = des_test()) != 0) - err_sys("DES test failed!\n", ret); - else - printf( "DES test passed!\n"); -#endif - -#ifndef NO_DES3 - if ( (ret = des3_test()) != 0) - err_sys("DES3 test failed!\n", ret); - else - printf( "DES3 test passed!\n"); -#endif - -#ifndef NO_AES - if ( (ret = aes_test()) != 0) - err_sys("AES test failed!\n", ret); - else - printf( "AES test passed!\n"); - -#ifdef HAVE_AESGCM - if ( (ret = aesgcm_test()) != 0) - err_sys("AES-GCM test failed!\n", ret); - else - printf( "AES-GCM test passed!\n"); -#endif - -#ifdef HAVE_AESCCM - if ( (ret = aesccm_test()) != 0) - err_sys("AES-CCM test failed!\n", ret); - else - printf( "AES-CCM test passed!\n"); -#endif -#endif - -#ifdef HAVE_CAMELLIA - if ( (ret = camellia_test()) != 0) - err_sys("CAMELLIA test failed!\n", ret); - else - printf( "CAMELLIA test passed!\n"); -#endif - - if ( (ret = random_test()) != 0) - err_sys("RANDOM test failed!\n", ret); - else - printf( "RANDOM test passed!\n"); - -#ifndef NO_RSA - if ( (ret = rsa_test()) != 0) - err_sys("RSA test failed!\n", ret); - else - printf( "RSA test passed!\n"); -#endif - -#ifndef NO_DH - if ( (ret = dh_test()) != 0) - err_sys("DH test failed!\n", ret); - else - printf( "DH test passed!\n"); -#endif - -#ifndef NO_DSA - if ( (ret = dsa_test()) != 0) - err_sys("DSA test failed!\n", ret); - else - printf( "DSA test passed!\n"); -#endif - -#ifndef NO_PWDBASED - if ( (ret = pwdbased_test()) != 0) - err_sys("PWDBASED test failed!\n", ret); - else - printf( "PWDBASED test passed!\n"); -#endif - -#ifdef OPENSSL_EXTRA - if ( (ret = openssl_test()) != 0) - err_sys("OPENSSL test failed!\n", ret); - else - printf( "OPENSSL test passed!\n"); -#endif - -#ifdef HAVE_ECC - if ( (ret = ecc_test()) != 0) - err_sys("ECC test failed!\n", ret); - else - printf( "ECC test passed!\n"); - #ifdef HAVE_ECC_ENCRYPT - if ( (ret = ecc_encrypt_test()) != 0) - err_sys("ECC Enc test failed!\n", ret); - else - printf( "ECC Enc test passed!\n"); - #endif -#endif - -#ifdef HAVE_LIBZ - if ( (ret = compress_test()) != 0) - err_sys("COMPRESS test failed!\n", ret); - else - printf( "COMPRESS test passed!\n"); -#endif - -#ifdef HAVE_PKCS7 - if ( (ret = pkcs7enveloped_test()) != 0) - err_sys("PKCS7enveloped test failed!\n", ret); - else - printf( "PKCS7enveloped test passed!\n"); - - if ( (ret = pkcs7signed_test()) != 0) - err_sys("PKCS7signed test failed!\n", ret); - else - printf( "PKCS7signed test passed!\n"); -#endif - - ((func_args*)args)->return_code = ret; -} - - -#ifndef NO_MAIN_DRIVER - -#ifdef HAVE_CAVIUM - -static int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif /* HAVE_CAVIUM */ - - /* so overall tests can pull in test function */ - - int main(int argc, char** argv) - { - - func_args args; - - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed", -1236); -#endif /* HAVE_CAVIUM */ - - args.argc = argc; - args.argv = argv; - - ctaocrypt_test(&args); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - - return args.return_code; - } - -#endif /* NO_MAIN_DRIVER */ - - -#ifdef CYASSL_MD2 -int md2_test() -{ - Md2 md2; - byte hash[MD2_DIGEST_SIZE]; - - testVector a, b, c, d, e, f, g; - testVector test_md2[7]; - int times = sizeof(test_md2) / sizeof(testVector), i; - - a.input = ""; - a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69" - "\x27\x73"; - a.inLen = strlen(a.input); - a.outLen = MD2_DIGEST_SIZE; - - b.input = "a"; - b.output = "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0" - "\xb5\xd1"; - b.inLen = strlen(b.input); - b.outLen = MD2_DIGEST_SIZE; - - c.input = "abc"; - c.output = "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde" - "\xd6\xbb"; - c.inLen = strlen(c.input); - c.outLen = MD2_DIGEST_SIZE; - - d.input = "message digest"; - d.output = "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe" - "\x06\xb0"; - d.inLen = strlen(d.input); - d.outLen = MD2_DIGEST_SIZE; - - e.input = "abcdefghijklmnopqrstuvwxyz"; - e.output = "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47" - "\x94\x0b"; - e.inLen = strlen(e.input); - e.outLen = MD2_DIGEST_SIZE; - - f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - f.output = "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03" - "\x38\xcd"; - f.inLen = strlen(f.input); - f.outLen = MD2_DIGEST_SIZE; - - g.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - g.output = "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3" - "\xef\xd8"; - g.inLen = strlen(g.input); - g.outLen = MD2_DIGEST_SIZE; - - test_md2[0] = a; - test_md2[1] = b; - test_md2[2] = c; - test_md2[3] = d; - test_md2[4] = e; - test_md2[5] = f; - test_md2[6] = g; - - InitMd2(&md2); - - for (i = 0; i < times; ++i) { - Md2Update(&md2, (byte*)test_md2[i].input, (word32)test_md2[i].inLen); - Md2Final(&md2, hash); - - if (memcmp(hash, test_md2[i].output, MD2_DIGEST_SIZE) != 0) - return -155 - i; - } - - return 0; -} -#endif - -#ifndef NO_MD5 -int md5_test(void) -{ - Md5 md5; - byte hash[MD5_DIGEST_SIZE]; - - testVector a, b, c, d, e; - testVector test_md5[5]; - int times = sizeof(test_md5) / sizeof(testVector), i; - - a.input = "abc"; - a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" - "\x72"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - b.input = "message digest"; - b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" - "\xd0"; - b.inLen = strlen(b.input); - b.outLen = MD5_DIGEST_SIZE; - - c.input = "abcdefghijklmnopqrstuvwxyz"; - c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" - "\x3b"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" - "\x9f"; - d.inLen = strlen(d.input); - d.outLen = MD5_DIGEST_SIZE; - - e.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" - "\x7a"; - e.inLen = strlen(e.input); - e.outLen = MD5_DIGEST_SIZE; - - test_md5[0] = a; - test_md5[1] = b; - test_md5[2] = c; - test_md5[3] = d; - test_md5[4] = e; - - InitMd5(&md5); - - for (i = 0; i < times; ++i) { - Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); - Md5Final(&md5, hash); - - if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) - return -5 - i; - } - - return 0; -} -#endif /* NO_MD5 */ - - -#ifndef NO_MD4 - -int md4_test(void) -{ - Md4 md4; - byte hash[MD4_DIGEST_SIZE]; - - testVector a, b, c, d, e, f, g; - testVector test_md4[7]; - int times = sizeof(test_md4) / sizeof(testVector), i; - - a.input = ""; - a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" - "\xc0"; - a.inLen = strlen(a.input); - a.outLen = MD4_DIGEST_SIZE; - - b.input = "a"; - b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" - "\x24"; - b.inLen = strlen(b.input); - b.outLen = MD4_DIGEST_SIZE; - - c.input = "abc"; - c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" - "\x9d"; - c.inLen = strlen(c.input); - c.outLen = MD4_DIGEST_SIZE; - - d.input = "message digest"; - d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" - "\x4b"; - d.inLen = strlen(d.input); - d.outLen = MD4_DIGEST_SIZE; - - e.input = "abcdefghijklmnopqrstuvwxyz"; - e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" - "\xa9"; - e.inLen = strlen(e.input); - e.outLen = MD4_DIGEST_SIZE; - - f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" - "\xe4"; - f.inLen = strlen(f.input); - f.outLen = MD4_DIGEST_SIZE; - - g.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" - "\x36"; - g.inLen = strlen(g.input); - g.outLen = MD4_DIGEST_SIZE; - - test_md4[0] = a; - test_md4[1] = b; - test_md4[2] = c; - test_md4[3] = d; - test_md4[4] = e; - test_md4[5] = f; - test_md4[6] = g; - - InitMd4(&md4); - - for (i = 0; i < times; ++i) { - Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); - Md4Final(&md4, hash); - - if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) - return -205 - i; - } - - return 0; -} - -#endif /* NO_MD4 */ - -#ifndef NO_SHA - -int sha_test(void) -{ - Sha sha; - byte hash[SHA_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_sha[4]; - int ret; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" - "\x6C\x9C\xD0\xD8\x9D"; - a.inLen = strlen(a.input); - a.outLen = SHA_DIGEST_SIZE; - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" - "\xE5\xE5\x46\x70\xF1"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaa"; - c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" - "\x2A\x25\xEC\x64\x4D"; - c.inLen = strlen(c.input); - c.outLen = SHA_DIGEST_SIZE; - - d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaa"; - d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" - "\x53\x99\x5E\x26\xA0"; - d.inLen = strlen(d.input); - d.outLen = SHA_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - test_sha[2] = c; - test_sha[3] = d; - - ret = InitSha(&sha); - if (ret != 0) - return -4001; - - for (i = 0; i < times; ++i) { - ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); - ShaFinal(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} - -#endif /* NO_SHA */ - -#ifdef CYASSL_RIPEMD -int ripemd_test(void) -{ - RipeMd ripemd; - byte hash[RIPEMD_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_ripemd[4]; - int times = sizeof(test_ripemd) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" - "\xb0\x87\xf1\x5a\x0b\xfc"; - a.inLen = strlen(a.input); - a.outLen = RIPEMD_DIGEST_SIZE; - - b.input = "message digest"; - b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" - "\x5f\xfa\x21\x59\x5f\x36"; - b.inLen = strlen(b.input); - b.outLen = RIPEMD_DIGEST_SIZE; - - c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" - "\xf4\x9a\xda\x62\xeb\x2b"; - c.inLen = strlen(c.input); - c.outLen = RIPEMD_DIGEST_SIZE; - - d.input = "12345678901234567890123456789012345678901234567890123456" - "789012345678901234567890"; - d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" - "\x82\xbf\x63\x32\x6b\xfb"; - d.inLen = strlen(d.input); - d.outLen = RIPEMD_DIGEST_SIZE; - - test_ripemd[0] = a; - test_ripemd[1] = b; - test_ripemd[2] = c; - test_ripemd[3] = d; - - InitRipeMd(&ripemd); - - for (i = 0; i < times; ++i) { - RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, - (word32)test_ripemd[i].inLen); - RipeMdFinal(&ripemd, hash); - - if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* CYASSL_RIPEMD */ - - -#ifdef HAVE_BLAKE2 - - -#define BLAKE2_TESTS 3 - -static const byte blake2b_vec[BLAKE2_TESTS][BLAKE2B_OUTBYTES] = -{ - { - 0x78, 0x6A, 0x02, 0xF7, 0x42, 0x01, 0x59, 0x03, - 0xC6, 0xC6, 0xFD, 0x85, 0x25, 0x52, 0xD2, 0x72, - 0x91, 0x2F, 0x47, 0x40, 0xE1, 0x58, 0x47, 0x61, - 0x8A, 0x86, 0xE2, 0x17, 0xF7, 0x1F, 0x54, 0x19, - 0xD2, 0x5E, 0x10, 0x31, 0xAF, 0xEE, 0x58, 0x53, - 0x13, 0x89, 0x64, 0x44, 0x93, 0x4E, 0xB0, 0x4B, - 0x90, 0x3A, 0x68, 0x5B, 0x14, 0x48, 0xB7, 0x55, - 0xD5, 0x6F, 0x70, 0x1A, 0xFE, 0x9B, 0xE2, 0xCE - }, - { - 0x2F, 0xA3, 0xF6, 0x86, 0xDF, 0x87, 0x69, 0x95, - 0x16, 0x7E, 0x7C, 0x2E, 0x5D, 0x74, 0xC4, 0xC7, - 0xB6, 0xE4, 0x8F, 0x80, 0x68, 0xFE, 0x0E, 0x44, - 0x20, 0x83, 0x44, 0xD4, 0x80, 0xF7, 0x90, 0x4C, - 0x36, 0x96, 0x3E, 0x44, 0x11, 0x5F, 0xE3, 0xEB, - 0x2A, 0x3A, 0xC8, 0x69, 0x4C, 0x28, 0xBC, 0xB4, - 0xF5, 0xA0, 0xF3, 0x27, 0x6F, 0x2E, 0x79, 0x48, - 0x7D, 0x82, 0x19, 0x05, 0x7A, 0x50, 0x6E, 0x4B - }, - { - 0x1C, 0x08, 0x79, 0x8D, 0xC6, 0x41, 0xAB, 0xA9, - 0xDE, 0xE4, 0x35, 0xE2, 0x25, 0x19, 0xA4, 0x72, - 0x9A, 0x09, 0xB2, 0xBF, 0xE0, 0xFF, 0x00, 0xEF, - 0x2D, 0xCD, 0x8E, 0xD6, 0xF8, 0xA0, 0x7D, 0x15, - 0xEA, 0xF4, 0xAE, 0xE5, 0x2B, 0xBF, 0x18, 0xAB, - 0x56, 0x08, 0xA6, 0x19, 0x0F, 0x70, 0xB9, 0x04, - 0x86, 0xC8, 0xA7, 0xD4, 0x87, 0x37, 0x10, 0xB1, - 0x11, 0x5D, 0x3D, 0xEB, 0xBB, 0x43, 0x27, 0xB5 - } -}; - - - -int blake2b_test(void) -{ - Blake2b b2b; - byte digest[64]; - byte input[64]; - int i, ret; - - for (i = 0; i < (int)sizeof(input); i++) - input[i] = (byte)i; - - for (i = 0; i < BLAKE2_TESTS; i++) { - ret = InitBlake2b(&b2b, 64); - if (ret != 0) - return -4002; - - ret = Blake2bUpdate(&b2b, input, i); - if (ret != 0) - return -4003; - - ret = Blake2bFinal(&b2b, digest, 64); - if (ret != 0) - return -4004; - - if (memcmp(digest, blake2b_vec[i], 64) != 0) { - return -300 - i; - } - } - - return 0; -} -#endif /* HAVE_BLAKE2 */ - - -#ifndef NO_SHA256 -int sha256_test(void) -{ - Sha256 sha; - byte hash[SHA256_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int ret; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" - "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" - "\x15\xAD"; - a.inLen = strlen(a.input); - a.outLen = SHA256_DIGEST_SIZE; - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" - "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" - "\x06\xC1"; - b.inLen = strlen(b.input); - b.outLen = SHA256_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha256(&sha); - if (ret != 0) - return -4005; - - for (i = 0; i < times; ++i) { - ret = Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return -4006; - ret = Sha256Final(&sha, hash); - if (ret != 0) - return -4007; - - if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - - -#ifdef CYASSL_SHA512 -int sha512_test(void) -{ - Sha512 sha; - byte hash[SHA512_DIGEST_SIZE]; - int ret; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" - "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" - "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" - "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" - "\xa5\x4c\xa4\x9f"; - a.inLen = strlen(a.input); - a.outLen = SHA512_DIGEST_SIZE; - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" - "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" - "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" - "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" - "\x87\x4b\xe9\x09"; - b.inLen = strlen(b.input); - b.outLen = SHA512_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha512(&sha); - if (ret != 0) - return -4009; - - for (i = 0; i < times; ++i) { - ret = Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return -4010; - - ret = Sha512Final(&sha, hash); - if (ret != 0) - return -4011; - - if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - - -#ifdef CYASSL_SHA384 -int sha384_test(void) -{ - Sha384 sha; - byte hash[SHA384_DIGEST_SIZE]; - int ret; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" - "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" - "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" - "\xc8\x25\xa7"; - a.inLen = strlen(a.input); - a.outLen = SHA384_DIGEST_SIZE; - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" - "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" - "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" - "\x74\x60\x39"; - b.inLen = strlen(b.input); - b.outLen = SHA384_DIGEST_SIZE; - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha384(&sha); - if (ret != 0) - return -4012; - - for (i = 0; i < times; ++i) { - ret = Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return -4013; - - ret = Sha384Final(&sha, hash); - if (ret != 0) - return -4014; - - if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* CYASSL_SHA384 */ - - -#if !defined(NO_HMAC) && !defined(NO_MD5) -int hmac_md5_test(void) -{ - Hmac hmac; - byte hash[MD5_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" - "\x9d"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" - "\x38"; - b.inLen = strlen(b.input); - b.outLen = MD5_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" - "\xf6"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20009; -#endif - ret = HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4015; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4016; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4017; - - if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif /* NO_HMAC && NO_MD5 */ - -#if !defined(NO_HMAC) && !defined(NO_SHA) -int hmac_sha_test(void) -{ - Hmac hmac; - byte hash[SHA_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" - "\x8e\xf1\x46\xbe\x00"; - a.inLen = strlen(a.input); - a.outLen = SHA_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" - "\x9c\x25\x9a\x7c\x79"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" - "\x4f\x63\xf1\x75\xd3"; - c.inLen = strlen(c.input); - c.outLen = SHA_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20010; -#endif - ret = HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4018; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4019; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4020; - - if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && !defined(NO_SHA256) -int hmac_sha256_test(void) -{ - Hmac hmac; - byte hash[SHA256_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" - "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" - "\xcf\xf7"; - a.inLen = strlen(a.input); - a.outLen = SHA256_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" - "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" - "\x38\x43"; - b.inLen = strlen(b.input); - b.outLen = SHA256_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" - "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" - "\x65\xfe"; - c.inLen = strlen(c.input); - c.outLen = SHA256_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20011; -#endif - ret = HmacSetKey(&hmac, SHA256, (byte*)keys[i],(word32)strlen(keys[i])); - if (ret != 0) - return -4021; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4022; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4023; - - if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(HAVE_BLAKE2) -int hmac_blake2b_test(void) -{ - Hmac hmac; - byte hash[BLAKE2B_256]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x72\x93\x0d\xdd\xf5\xf7\xe1\x78\x38\x07\x44\x18\x0b\x3f\x51" - "\x37\x25\xb5\x82\xc2\x08\x83\x2f\x1c\x99\xfd\x03\xa0\x16\x75" - "\xac\xfd"; - a.inLen = strlen(a.input); - a.outLen = BLAKE2B_256; - - b.input = "what do ya want for nothing?"; - b.output = "\x3d\x20\x50\x71\x05\xc0\x8c\x0c\x38\x44\x1e\xf7\xf9\xd1\x67" - "\x21\xff\x64\xf5\x94\x00\xcf\xf9\x75\x41\xda\x88\x61\x9d\x7c" - "\xda\x2b"; - b.inLen = strlen(b.input); - b.outLen = BLAKE2B_256; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\xda\xfe\x2a\x24\xfc\xe7\xea\x36\x34\xbe\x41\x92\xc7\x11\xa7" - "\x00\xae\x53\x9c\x11\x9c\x80\x74\x55\x22\x25\x4a\xb9\x55\xd3" - "\x0f\x87"; - c.inLen = strlen(c.input); - c.outLen = BLAKE2B_256; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { -#ifdef HAVE_CAVIUM - if (i == 1) - continue; /* driver can't handle keys <= bytes */ - if (HmacInitCavium(&hmac, CAVIUM_DEV_ID) != 0) - return -20011; -#endif - ret = HmacSetKey(&hmac, BLAKE2B_ID, (byte*)keys[i], - (word32)strlen(keys[i])); - if (ret != 0) - return -4024; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4025; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4026; - - if (memcmp(hash, test_hmac[i].output, BLAKE2B_256) != 0) - return -20 - i; -#ifdef HAVE_CAVIUM - HmacFreeCavium(&hmac); -#endif - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(CYASSL_SHA384) -int hmac_sha384_test(void) -{ - Hmac hmac; - byte hash[SHA384_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" - "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" - "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" - "\xfa\x9c\xb6"; - a.inLen = strlen(a.input); - a.outLen = SHA384_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" - "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" - "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" - "\xb2\x16\x49"; - b.inLen = strlen(b.input); - b.outLen = SHA384_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" - "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" - "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" - "\xa3\x4f\x27"; - c.inLen = strlen(c.input); - c.outLen = SHA384_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac, SHA384, (byte*)keys[i],(word32)strlen(keys[i])); - if (ret != 0) - return -4027; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4028; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4029; - - if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(CYASSL_SHA512) -int hmac_sha512_test(void) -{ - Hmac hmac; - byte hash[SHA512_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c" - "\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1" - "\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae" - "\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20" - "\x3a\x12\x68\x54"; - a.inLen = strlen(a.input); - a.outLen = SHA512_DIGEST_SIZE; - - b.input = "what do ya want for nothing?"; - b.output = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0" - "\xa3\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25" - "\x05\x54\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8" - "\xf0\xe6\xfd\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a" - "\x38\xbc\xe7\x37"; - b.inLen = strlen(b.input); - b.outLen = SHA512_DIGEST_SIZE; - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b" - "\xe9\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27" - "\x9d\x39\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e" - "\x67\xc8\x07\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59" - "\xe1\x32\x92\xfb"; - c.inLen = strlen(c.input); - c.outLen = SHA512_DIGEST_SIZE; - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac, SHA512, (byte*)keys[i],(word32)strlen(keys[i])); - if (ret != 0) - return -4030; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4031; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4032; - - if (memcmp(hash, test_hmac[i].output, SHA512_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - - -#ifndef NO_RC4 -int arc4_test(void) -{ - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x01\x23\x45\x67\x89\xab\xcd\xef", - "\x01\x23\x45\x67\x89\xab\xcd\xef", - "\x00\x00\x00\x00\x00\x00\x00\x00", - "\xef\x01\x23\x45" - }; - - testVector a, b, c, d; - testVector test_arc4[4]; - - int times = sizeof(test_arc4) / sizeof(testVector), i; - - a.input = "\x01\x23\x45\x67\x89\xab\xcd\xef"; - a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x74\x94\xc2\xe7\x10\x4b\x08\x79"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\xde\x18\x89\x41\xa3\x37\x5d\x3a"; - c.inLen = 8; - c.outLen = 8; - - d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - d.output = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61"; - d.inLen = 10; - d.outLen = 10; - - test_arc4[0] = a; - test_arc4[1] = b; - test_arc4[2] = c; - test_arc4[3] = d; - - for (i = 0; i < times; ++i) { - Arc4 enc; - Arc4 dec; - int keylen = 8; /* strlen with key 0x00 not good */ - if (i == 3) - keylen = 4; - -#ifdef HAVE_CAVIUM - if (Arc4InitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20001; - if (Arc4InitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20002; -#endif - - Arc4SetKey(&enc, (byte*)keys[i], keylen); - Arc4SetKey(&dec, (byte*)keys[i], keylen); - - Arc4Process(&enc, cipher, (byte*)test_arc4[i].input, - (word32)test_arc4[i].outLen); - Arc4Process(&dec, plain, cipher, (word32)test_arc4[i].outLen); - - if (memcmp(plain, test_arc4[i].input, test_arc4[i].outLen)) - return -20 - i; - - if (memcmp(cipher, test_arc4[i].output, test_arc4[i].outLen)) - return -20 - 5 - i; - -#ifdef HAVE_CAVIUM - Arc4FreeCavium(&enc); - Arc4FreeCavium(&dec); -#endif - } - - return 0; -} -#endif - - -int hc128_test(void) -{ -#ifdef HAVE_HC128 - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD", - "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC" - }; - - const char* ivs[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16", - "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31" - }; - - - testVector a, b, c, d; - testVector test_hc128[4]; - - int times = sizeof(test_hc128) / sizeof(testVector), i; - - a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - a.output = "\x37\x86\x02\xB9\x8F\x32\xA7\x48"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x33\x7F\x86\x11\xC6\xED\x61\x5F"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A"; - c.inLen = 8; - c.outLen = 8; - - d.input = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - d.output = "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29"; - d.inLen = 15; - d.outLen = 15; - - test_hc128[0] = a; - test_hc128[1] = b; - test_hc128[2] = c; - test_hc128[3] = d; - - for (i = 0; i < times; ++i) { - HC128 enc; - HC128 dec; - - /* align keys/ivs in plain/cipher buffers */ - memcpy(plain, keys[i], 16); - memcpy(cipher, ivs[i], 16); - - Hc128_SetKey(&enc, plain, cipher); - Hc128_SetKey(&dec, plain, cipher); - - /* align input */ - memcpy(plain, test_hc128[i].input, test_hc128[i].outLen); - Hc128_Process(&enc, cipher, plain, (word32)test_hc128[i].outLen); - Hc128_Process(&dec, plain, cipher, (word32)test_hc128[i].outLen); - - if (memcmp(plain, test_hc128[i].input, test_hc128[i].outLen)) - return -120 - i; - - if (memcmp(cipher, test_hc128[i].output, test_hc128[i].outLen)) - return -120 - 5 - i; - } - -#endif /* HAVE_HC128 */ - return 0; -} - - -#ifndef NO_RABBIT -int rabbit_test(void) -{ - byte cipher[16]; - byte plain[16]; - - const char* keys[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91" - }; - - const char* ivs[] = - { - "\x00\x00\x00\x00\x00\x00\x00\x00", - "\x59\x7E\x26\xC1\x75\xF5\x73\xC3", - 0 - }; - - testVector a, b, c; - testVector test_rabbit[3]; - - int times = sizeof(test_rabbit) / sizeof(testVector), i; - - a.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - a.output = "\xED\xB7\x05\x67\x37\x5D\xCD\x7C"; - a.inLen = 8; - a.outLen = 8; - - b.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - b.output = "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0"; - b.inLen = 8; - b.outLen = 8; - - c.input = "\x00\x00\x00\x00\x00\x00\x00\x00"; - c.output = "\x04\xCE\xCA\x7A\x1A\x86\x6E\x77"; - c.inLen = 8; - c.outLen = 8; - - test_rabbit[0] = a; - test_rabbit[1] = b; - test_rabbit[2] = c; - - for (i = 0; i < times; ++i) { - Rabbit enc; - Rabbit dec; - byte* iv; - - /* align keys/ivs in plain/cipher buffers */ - memcpy(plain, keys[i], 16); - if (ivs[i]) { - memcpy(cipher, ivs[i], 8); - iv = cipher; - } else - iv = NULL; - RabbitSetKey(&enc, plain, iv); - RabbitSetKey(&dec, plain, iv); - - /* align input */ - memcpy(plain, test_rabbit[i].input, test_rabbit[i].outLen); - RabbitProcess(&enc, cipher, plain, (word32)test_rabbit[i].outLen); - RabbitProcess(&dec, plain, cipher, (word32)test_rabbit[i].outLen); - - if (memcmp(plain, test_rabbit[i].input, test_rabbit[i].outLen)) - return -130 - i; - - if (memcmp(cipher, test_rabbit[i].output, test_rabbit[i].outLen)) - return -130 - 5 - i; - } - - return 0; -} -#endif /* NO_RABBIT */ - - -#ifndef NO_DES3 -int des_test(void) -{ - const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - Des enc; - Des dec; - - const byte key[] = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef - }; - - const byte iv[] = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef - }; - - const byte verify[] = - { - 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, - 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, - 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b - }; - - int ret; - - ret = Des_SetKey(&enc, key, iv, DES_ENCRYPTION); - if (ret != 0) - return -31; - - Des_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); - ret = Des_SetKey(&dec, key, iv, DES_DECRYPTION); - if (ret != 0) - return -32; - Des_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); - - if (memcmp(plain, vector, sizeof(plain))) - return -33; - - if (memcmp(cipher, verify, sizeof(cipher))) - return -34; - - return 0; -} -#endif /* NO_DES3 */ - - -#ifndef NO_DES3 -int des3_test(void) -{ - const byte vector[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - Des3 enc; - Des3 dec; - - const byte key3[] = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, - 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 - }; - const byte iv3[] = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81 - - }; - - const byte verify3[] = - { - 0x43,0xa0,0x29,0x7e,0xd1,0x84,0xf8,0x0e, - 0x89,0x64,0x84,0x32,0x12,0xd5,0x08,0x98, - 0x18,0x94,0x15,0x74,0x87,0x12,0x7d,0xb0 - }; - - int ret; - - -#ifdef HAVE_CAVIUM - if (Des3_InitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20005; - if (Des3_InitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20006; -#endif - ret = Des3_SetKey(&enc, key3, iv3, DES_ENCRYPTION); - if (ret != 0) - return -31; - ret = Des3_SetKey(&dec, key3, iv3, DES_DECRYPTION); - if (ret != 0) - return -32; - ret = Des3_CbcEncrypt(&enc, cipher, vector, sizeof(vector)); - if (ret != 0) - return -33; - ret = Des3_CbcDecrypt(&dec, plain, cipher, sizeof(cipher)); - if (ret != 0) - return -34; - - if (memcmp(plain, vector, sizeof(plain))) - return -35; - - if (memcmp(cipher, verify3, sizeof(cipher))) - return -36; - -#ifdef HAVE_CAVIUM - Des3_FreeCavium(&enc); - Des3_FreeCavium(&dec); -#endif - return 0; -} -#endif /* NO_DES */ - - -#ifndef NO_AES -int aes_test(void) -{ - Aes enc; - Aes dec; - - const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - const byte verify[] = - { - 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, - 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb - }; - - byte key[] = "0123456789abcdef "; /* align */ - byte iv[] = "1234567890abcdef "; /* align */ - - byte cipher[AES_BLOCK_SIZE * 4]; - byte plain [AES_BLOCK_SIZE * 4]; - int ret; - -#ifdef HAVE_CAVIUM - if (AesInitCavium(&enc, CAVIUM_DEV_ID) != 0) - return -20003; - if (AesInitCavium(&dec, CAVIUM_DEV_ID) != 0) - return -20004; -#endif - ret = AesSetKey(&enc, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); - if (ret != 0) - return -1001; - ret = AesSetKey(&dec, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION); - if (ret != 0) - return -1002; - - ret = AesCbcEncrypt(&enc, cipher, msg, AES_BLOCK_SIZE); - if (ret != 0) - return -1005; - ret = AesCbcDecrypt(&dec, plain, cipher, AES_BLOCK_SIZE); - if (ret != 0) - return -1006; - - if (memcmp(plain, msg, AES_BLOCK_SIZE)) - return -60; - - if (memcmp(cipher, verify, AES_BLOCK_SIZE)) - return -61; - -#ifdef HAVE_CAVIUM - AesFreeCavium(&enc); - AesFreeCavium(&dec); -#endif -#ifdef CYASSL_AES_COUNTER - { - const byte ctrKey[] = - { - 0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6, - 0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c - }; - - const byte ctrIv[] = - { - 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, - 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff - }; - - - const byte ctrPlain[] = - { - 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, - 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, - 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, - 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, - 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11, - 0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef, - 0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17, - 0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10 - }; - - const byte ctrCipher[] = - { - 0x87,0x4d,0x61,0x91,0xb6,0x20,0xe3,0x26, - 0x1b,0xef,0x68,0x64,0x99,0x0d,0xb6,0xce, - 0x98,0x06,0xf6,0x6b,0x79,0x70,0xfd,0xff, - 0x86,0x17,0x18,0x7b,0xb9,0xff,0xfd,0xff, - 0x5a,0xe4,0xdf,0x3e,0xdb,0xd5,0xd3,0x5e, - 0x5b,0x4f,0x09,0x02,0x0d,0xb0,0x3e,0xab, - 0x1e,0x03,0x1d,0xda,0x2f,0xbe,0x03,0xd1, - 0x79,0x21,0x70,0xa0,0xf3,0x00,0x9c,0xee - }; - - const byte oddCipher[] = - { - 0xb9,0xd7,0xcb,0x08,0xb0,0xe1,0x7b,0xa0, - 0xc2 - }; - - AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - /* Ctr only uses encrypt, even on key setup */ - AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - - AesCtrEncrypt(&enc, cipher, ctrPlain, AES_BLOCK_SIZE*4); - AesCtrEncrypt(&dec, plain, cipher, AES_BLOCK_SIZE*4); - - if (memcmp(plain, ctrPlain, AES_BLOCK_SIZE*4)) - return -66; - - if (memcmp(cipher, ctrCipher, AES_BLOCK_SIZE*4)) - return -67; - - /* let's try with just 9 bytes, non block size test */ - AesSetKeyDirect(&enc, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - /* Ctr only uses encrypt, even on key setup */ - AesSetKeyDirect(&dec, ctrKey, AES_BLOCK_SIZE, ctrIv, AES_ENCRYPTION); - - AesCtrEncrypt(&enc, cipher, ctrPlain, 9); - AesCtrEncrypt(&dec, plain, cipher, 9); - - if (memcmp(plain, ctrPlain, 9)) - return -68; - - if (memcmp(cipher, ctrCipher, 9)) - return -69; - - /* and an additional 9 bytes to reuse tmp left buffer */ - AesCtrEncrypt(&enc, cipher, ctrPlain, 9); - AesCtrEncrypt(&dec, plain, cipher, 9); - - if (memcmp(plain, ctrPlain, 9)) - return -70; - - if (memcmp(cipher, oddCipher, 9)) - return -71; - } -#endif /* CYASSL_AES_COUNTER */ - -#if defined(CYASSL_AESNI) && defined(CYASSL_AES_DIRECT) - { - const byte niPlain[] = - { - 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, - 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a - }; - - const byte niCipher[] = - { - 0xf3,0xee,0xd1,0xbd,0xb5,0xd2,0xa0,0x3c, - 0x06,0x4b,0x5a,0x7e,0x3d,0xb1,0x81,0xf8 - }; - - const byte niKey[] = - { - 0x60,0x3d,0xeb,0x10,0x15,0xca,0x71,0xbe, - 0x2b,0x73,0xae,0xf0,0x85,0x7d,0x77,0x81, - 0x1f,0x35,0x2c,0x07,0x3b,0x61,0x08,0xd7, - 0x2d,0x98,0x10,0xa3,0x09,0x14,0xdf,0xf4 - }; - - XMEMSET(cipher, 0, AES_BLOCK_SIZE); - ret = AesSetKey(&enc, niKey, sizeof(niKey), cipher, AES_ENCRYPTION); - if (ret != 0) - return -1003; - AesEncryptDirect(&enc, cipher, niPlain); - if (XMEMCMP(cipher, niCipher, AES_BLOCK_SIZE) != 0) - return -20006; - - XMEMSET(plain, 0, AES_BLOCK_SIZE); - ret = AesSetKey(&dec, niKey, sizeof(niKey), plain, AES_DECRYPTION); - if (ret != 0) - return -1004; - AesDecryptDirect(&dec, plain, niCipher); - if (XMEMCMP(plain, niPlain, AES_BLOCK_SIZE) != 0) - return -20007; - } -#endif /* CYASSL_AESNI && CYASSL_AES_DIRECT */ - - return 0; -} - -#ifdef HAVE_AESGCM -int aesgcm_test(void) -{ - Aes enc; - - /* - * This is Test Case 16 from the document Galois/ - * Counter Mode of Operation (GCM) by McGrew and - * Viega. - */ - const byte k[] = - { - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 - }; - - const byte iv[] = - { - 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, - 0xde, 0xca, 0xf8, 0x88 - }; - - const byte p[] = - { - 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, - 0xba, 0x63, 0x7b, 0x39 - }; - - const byte a[] = - { - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xab, 0xad, 0xda, 0xd2 - }; - - const byte c[] = - { - 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62 - }; - - const byte t[] = - { - 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, - 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b - }; - - byte t2[sizeof(t)]; - byte p2[sizeof(c)]; - byte c2[sizeof(p)]; - - int result; - - memset(t2, 0, sizeof(t2)); - memset(c2, 0, sizeof(c2)); - memset(p2, 0, sizeof(p2)); - - AesGcmSetKey(&enc, k, sizeof(k)); - /* AES-GCM encrypt and decrypt both use AES encrypt internally */ - AesGcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (memcmp(c, c2, sizeof(c2))) - return -68; - if (memcmp(t, t2, sizeof(t2))) - return -69; - - result = AesGcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result != 0) - return -70; - if (memcmp(p, p2, sizeof(p2))) - return -71; - - return 0; -} - -int gmac_test(void) -{ - Gmac gmac; - - const byte k1[] = - { - 0x89, 0xc9, 0x49, 0xe9, 0xc8, 0x04, 0xaf, 0x01, - 0x4d, 0x56, 0x04, 0xb3, 0x94, 0x59, 0xf2, 0xc8 - }; - const byte iv1[] = - { - 0xd1, 0xb1, 0x04, 0xc8, 0x15, 0xbf, 0x1e, 0x94, - 0xe2, 0x8c, 0x8f, 0x16 - }; - const byte a1[] = - { - 0x82, 0xad, 0xcd, 0x63, 0x8d, 0x3f, 0xa9, 0xd9, - 0xf3, 0xe8, 0x41, 0x00, 0xd6, 0x1e, 0x07, 0x77 - }; - const byte t1[] = - { - 0x88, 0xdb, 0x9d, 0x62, 0x17, 0x2e, 0xd0, 0x43, - 0xaa, 0x10, 0xf1, 0x6d, 0x22, 0x7d, 0xc4, 0x1b - }; - - const byte k2[] = - { - 0x40, 0xf7, 0xec, 0xb2, 0x52, 0x6d, 0xaa, 0xd4, - 0x74, 0x25, 0x1d, 0xf4, 0x88, 0x9e, 0xf6, 0x5b - }; - const byte iv2[] = - { - 0xee, 0x9c, 0x6e, 0x06, 0x15, 0x45, 0x45, 0x03, - 0x1a, 0x60, 0x24, 0xa7 - }; - const byte a2[] = - { - 0x94, 0x81, 0x2c, 0x87, 0x07, 0x4e, 0x15, 0x18, - 0x34, 0xb8, 0x35, 0xaf, 0x1c, 0xa5, 0x7e, 0x56 - }; - const byte t2[] = - { - 0xc6, 0x81, 0x79, 0x8e, 0x3d, 0xda, 0xb0, 0x9f, - 0x8d, 0x83, 0xb0, 0xbb, 0x14, 0xb6, 0x91 - }; - - const byte k3[] = - { - 0xb8, 0xe4, 0x9a, 0x5e, 0x37, 0xf9, 0x98, 0x2b, - 0xb9, 0x6d, 0xd0, 0xc9, 0xb6, 0xab, 0x26, 0xac - }; - const byte iv3[] = - { - 0xe4, 0x4a, 0x42, 0x18, 0x8c, 0xae, 0x94, 0x92, - 0x6a, 0x9c, 0x26, 0xb0 - }; - const byte a3[] = - { - 0x9d, 0xb9, 0x61, 0x68, 0xa6, 0x76, 0x7a, 0x31, - 0xf8, 0x29, 0xe4, 0x72, 0x61, 0x68, 0x3f, 0x8a - }; - const byte t3[] = - { - 0x23, 0xe2, 0x9f, 0x66, 0xe4, 0xc6, 0x52, 0x48 - }; - - byte tag[16]; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k1, sizeof(k1)); - GmacUpdate(&gmac, iv1, sizeof(iv1), a1, sizeof(a1), tag, sizeof(t1)); - if (memcmp(t1, tag, sizeof(t1)) != 0) - return -126; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k2, sizeof(k2)); - GmacUpdate(&gmac, iv2, sizeof(iv2), a2, sizeof(a2), tag, sizeof(t2)); - if (memcmp(t2, tag, sizeof(t2)) != 0) - return -127; - - memset(tag, 0, sizeof(tag)); - GmacSetKey(&gmac, k3, sizeof(k3)); - GmacUpdate(&gmac, iv3, sizeof(iv3), a3, sizeof(a3), tag, sizeof(t3)); - if (memcmp(t3, tag, sizeof(t3)) != 0) - return -128; - - return 0; -} -#endif /* HAVE_AESGCM */ - -#ifdef HAVE_AESCCM -int aesccm_test(void) -{ - Aes enc; - - /* key */ - const byte k[] = - { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf - }; - - /* nonce */ - const byte iv[] = - { - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0, - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5 - }; - - /* plaintext */ - const byte p[] = - { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e - }; - - const byte a[] = - { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - - const byte c[] = - { - 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2, - 0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80, - 0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84 - }; - - const byte t[] = - { - 0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 - }; - - byte t2[sizeof(t)]; - byte p2[sizeof(p)]; - byte c2[sizeof(c)]; - - int result; - - memset(t2, 0, sizeof(t2)); - memset(c2, 0, sizeof(c2)); - memset(p2, 0, sizeof(p2)); - - AesCcmSetKey(&enc, k, sizeof(k)); - /* AES-CCM encrypt and decrypt both use AES encrypt internally */ - AesCcmEncrypt(&enc, c2, p, sizeof(c2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (memcmp(c, c2, sizeof(c2))) - return -107; - if (memcmp(t, t2, sizeof(t2))) - return -108; - - result = AesCcmDecrypt(&enc, p2, c2, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result != 0) - return -109; - if (memcmp(p, p2, sizeof(p2))) - return -110; - - /* Test the authentication failure */ - t2[0]++; /* Corrupt the authentication tag. */ - result = AesCcmDecrypt(&enc, p2, c, sizeof(p2), iv, sizeof(iv), - t2, sizeof(t2), a, sizeof(a)); - if (result == 0) - return -111; - - /* Clear c2 to compare against p2. p2 should be set to zero in case of - * authentication fail. */ - memset(c2, 0, sizeof(c2)); - if (memcmp(p2, c2, sizeof(p2))) - return -112; - - return 0; -} -#endif /* HAVE_AESCCM */ - - -#endif /* NO_AES */ - - -#ifdef HAVE_CAMELLIA - -enum { - CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC -}; - -typedef struct { - int type; - const byte* plaintext; - const byte* iv; - const byte* ciphertext; - const byte* key; - word32 keySz; - int errorCode; -} test_vector_t; - -int camellia_test(void) -{ - /* Camellia ECB Test Plaintext */ - static const byte pte[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 - }; - - /* Camellia ECB Test Initialization Vector */ - static const byte ive[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - - /* Test 1: Camellia ECB 128-bit key */ - static const byte k1[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 - }; - static const byte c1[] = - { - 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, - 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 - }; - - /* Test 2: Camellia ECB 192-bit key */ - static const byte k2[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 - }; - static const byte c2[] = - { - 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, - 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 - }; - - /* Test 3: Camellia ECB 256-bit key */ - static const byte k3[] = - { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff - }; - static const byte c3[] = - { - 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, - 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 - }; - - /* Camellia CBC Test Plaintext */ - static const byte ptc[] = - { - 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A - }; - - /* Camellia CBC Test Initialization Vector */ - static const byte ivc[] = - { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F - }; - - /* Test 4: Camellia-CBC 128-bit key */ - static const byte k4[] = - { - 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C - }; - static const byte c4[] = - { - 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, - 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB - }; - - /* Test 5: Camellia-CBC 192-bit key */ - static const byte k5[] = - { - 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B - }; - static const byte c5[] = - { - 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, - 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 - }; - - /* Test 6: CBC 256-bit key */ - static const byte k6[] = - { - 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 - }; - static const byte c6[] = - { - 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, - 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA - }; - - byte out[CAMELLIA_BLOCK_SIZE]; - Camellia cam; - int i, testsSz; - const test_vector_t testVectors[] = - { - {CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114}, - {CAM_ECB_ENC, pte, ive, c2, k2, sizeof(k2), -115}, - {CAM_ECB_ENC, pte, ive, c3, k3, sizeof(k3), -116}, - {CAM_ECB_DEC, pte, ive, c1, k1, sizeof(k1), -117}, - {CAM_ECB_DEC, pte, ive, c2, k2, sizeof(k2), -118}, - {CAM_ECB_DEC, pte, ive, c3, k3, sizeof(k3), -119}, - {CAM_CBC_ENC, ptc, ivc, c4, k4, sizeof(k4), -120}, - {CAM_CBC_ENC, ptc, ivc, c5, k5, sizeof(k5), -121}, - {CAM_CBC_ENC, ptc, ivc, c6, k6, sizeof(k6), -122}, - {CAM_CBC_DEC, ptc, ivc, c4, k4, sizeof(k4), -123}, - {CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124}, - {CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125} - }; - - testsSz = sizeof(testVectors)/sizeof(test_vector_t); - for (i = 0; i < testsSz; i++) { - if (CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz, - testVectors[i].iv) != 0) - return testVectors[i].errorCode; - - switch (testVectors[i].type) { - case CAM_ECB_ENC: - CamelliaEncryptDirect(&cam, out, testVectors[i].plaintext); - if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_ECB_DEC: - CamelliaDecryptDirect(&cam, out, testVectors[i].ciphertext); - if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_CBC_ENC: - CamelliaCbcEncrypt(&cam, out, testVectors[i].plaintext, - CAMELLIA_BLOCK_SIZE); - if (memcmp(out, testVectors[i].ciphertext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - case CAM_CBC_DEC: - CamelliaCbcDecrypt(&cam, out, testVectors[i].ciphertext, - CAMELLIA_BLOCK_SIZE); - if (memcmp(out, testVectors[i].plaintext, CAMELLIA_BLOCK_SIZE)) - return testVectors[i].errorCode; - break; - default: - break; - } - } - - /* Setting the IV and checking it was actually set. */ - CamelliaSetIV(&cam, ivc); - if (XMEMCMP(cam.reg, ivc, CAMELLIA_BLOCK_SIZE)) - return -1; - - /* Setting the IV to NULL should be same as all zeros IV */ - if (CamelliaSetIV(&cam, NULL) != 0 || - XMEMCMP(cam.reg, ive, CAMELLIA_BLOCK_SIZE)) - return -1; - - /* First parameter should never be null */ - if (CamelliaSetIV(NULL, NULL) == 0) - return -1; - - /* First parameter should never be null, check it fails */ - if (CamelliaSetKey(NULL, k1, sizeof(k1), NULL) == 0) - return -1; - - /* Key should have a size of 16, 24, or 32 */ - if (CamelliaSetKey(&cam, k1, 0, NULL) == 0) - return -1; - - return 0; -} -#endif /* HAVE_CAMELLIA */ - - -int random_test(void) -{ - RNG rng; - byte block[32]; - int ret; - -#ifdef HAVE_CAVIUM - ret = InitRngCavium(&rng, CAVIUM_DEV_ID); - if (ret != 0) return -2007; -#endif - ret = InitRng(&rng); - if (ret != 0) return -39; - - ret = RNG_GenerateBlock(&rng, block, sizeof(block)); - if (ret != 0) return -40; - - return 0; -} - - -#ifdef HAVE_NTRU - -byte GetEntropy(ENTROPY_CMD cmd, byte* out); - -byte GetEntropy(ENTROPY_CMD cmd, byte* out) -{ - static RNG rng; - - if (cmd == INIT) - return (InitRng(&rng) == 0) ? 1 : 0; - - if (out == NULL) - return 0; - - if (cmd == GET_BYTE_OF_ENTROPY) - return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0; - - if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { - *out = 1; - return 1; - } - - return 0; -} - -#endif /* HAVE_NTRU */ - -#ifndef NO_RSA - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* clientKey = "a:\\certs\\client-key.der"; - static const char* clientCert = "a:\\certs\\client-cert.der"; - #ifdef CYASSL_CERT_GEN - static const char* caKeyFile = "a:\\certs\\ca-key.der"; - static const char* caCertFile = "a:\\certs\\ca-cert.pem"; - #ifdef HAVE_ECC - static const char* eccCaKeyFile = "a:\\certs\\ecc-key.der"; - static const char* eccCaCertFile = "a:\\certs\\server-ecc.pem"; - #endif - #endif - #elif defined(CYASSL_MKD_SHELL) - static char* clientKey = "certs/client-key.der"; - static char* clientCert = "certs/client-cert.der"; - void set_clientKey(char *key) { clientKey = key ; } - void set_clientCert(char *cert) { clientCert = cert ; } - #ifdef CYASSL_CERT_GEN - static char* caKeyFile = "certs/ca-key.der"; - static char* caCertFile = "certs/ca-cert.pem"; - void set_caKeyFile (char * key) { caKeyFile = key ; } - void set_caCertFile(char * cert) { caCertFile = cert ; } - #ifdef HAVE_ECC - static const char* eccCaKeyFile = "certs/ecc-key.der"; - static const char* eccCaCertFile = "certs/server-ecc.pem"; - void set_eccCaKeyFile (char * key) { eccCaKeyFile = key ; } - void set_eccCaCertFile(char * cert) { eccCaCertFile = cert ; } - #endif - #endif - #else - static const char* clientKey = "./certs/client-key.der"; - static const char* clientCert = "./certs/client-cert.der"; - #ifdef CYASSL_CERT_GEN - static const char* caKeyFile = "./certs/ca-key.der"; - static const char* caCertFile = "./certs/ca-cert.pem"; - #ifdef HAVE_ECC - static const char* eccCaKeyFile = "./certs/ecc-key.der"; - static const char* eccCaCertFile = "./certs/server-ecc.pem"; - #endif - #endif - #endif -#endif - - - -#define FOURK_BUF 4096 - -int rsa_test(void) -{ - byte* tmp; - size_t bytes; - RsaKey key; - RNG rng; - word32 idx = 0; - int ret; - byte in[] = "Everyone gets Friday off."; - word32 inLen = (word32)strlen((char*)in); - byte out[256]; - byte plain[256]; -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - FILE* file, * file2; -#endif -#ifdef CYASSL_TEST_CERT - DecodedCert cert; -#endif - - tmp = (byte*)malloc(FOURK_BUF); - if (tmp == NULL) - return -40; - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024); - bytes = sizeof_client_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, client_key_der_2048, sizeof_client_key_der_2048); - bytes = sizeof_client_key_der_2048; -#else - file = fopen(clientKey, "rb"); - - if (!file) - err_sys("can't open ./certs/client-key.der, " - "Please run from CyaSSL home dir", -40); - - bytes = fread(tmp, 1, FOURK_BUF, file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - -#ifdef HAVE_CAVIUM - RsaInitCavium(&key, CAVIUM_DEV_ID); -#endif - ret = InitRsaKey(&key, 0); - if (ret != 0) return -39; - ret = RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes); - if (ret != 0) return -41; - - ret = InitRng(&rng); - if (ret != 0) return -42; - - ret = RsaPublicEncrypt(in, inLen, out, sizeof(out), &key, &rng); - if (ret < 0) return -43; - - ret = RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key); - if (ret < 0) return -44; - - if (memcmp(plain, in, inLen)) return -45; - - ret = RsaSSL_Sign(in, inLen, out, sizeof(out), &key, &rng); - if (ret < 0) return -46; - - memset(plain, 0, sizeof(plain)); - ret = RsaSSL_Verify(out, ret, plain, sizeof(plain), &key); - if (ret < 0) return -47; - - if (memcmp(plain, in, ret)) return -48; - -#if defined(CYASSL_MDK_ARM) - #define sizeof(s) strlen((char *)(s)) -#endif - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, client_cert_der_1024, sizeof_client_cert_der_1024); - bytes = sizeof_client_cert_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, client_cert_der_2048, sizeof_client_cert_der_2048); - bytes = sizeof_client_cert_der_2048; -#else - file2 = fopen(clientCert, "rb"); - if (!file2) - return -49; - - bytes = fread(tmp, 1, FOURK_BUF, file2); - fclose(file2); -#endif - -#ifdef sizeof - #undef sizeof -#endif - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&cert, tmp, (word32)bytes, 0); - - ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) return -491; - - FreeDecodedCert(&cert); -#else - (void)bytes; -#endif - - -#ifdef CYASSL_KEY_GEN - { - byte* der; - byte* pem; - int derSz = 0; - int pemSz = 0; - RsaKey derIn; - RsaKey genKey; - FILE* keyFile; - FILE* pemFile; - - ret = InitRsaKey(&genKey, 0); - if (ret != 0) - return -300; - ret = MakeRsaKey(&genKey, 1024, 65537, &rng); - if (ret != 0) - return -301; - - der = (byte*)malloc(FOURK_BUF); - if (der == NULL) { - FreeRsaKey(&genKey); - return -307; - } - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(der); - FreeRsaKey(&genKey); - return -308; - } - - derSz = RsaKeyToDer(&genKey, der, FOURK_BUF); - if (derSz < 0) { - free(der); - free(pem); - return -302; - } - - keyFile = fopen("./key.der", "wb"); - if (!keyFile) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -303; - } - ret = (int)fwrite(der, 1, derSz, keyFile); - fclose(keyFile); - if (ret != derSz) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -313; - } - - pemSz = DerToPem(der, derSz, pem, FOURK_BUF, PRIVATEKEY_TYPE); - if (pemSz < 0) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -304; - } - - pemFile = fopen("./key.pem", "wb"); - if (!pemFile) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -305; - } - ret = (int)fwrite(pem, 1, pemSz, pemFile); - fclose(pemFile); - if (ret != pemSz) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -314; - } - - ret = InitRsaKey(&derIn, 0); - if (ret != 0) { - free(der); - free(pem); - FreeRsaKey(&genKey); - return -3060; - } - idx = 0; - ret = RsaPrivateKeyDecode(der, &idx, &derIn, derSz); - if (ret != 0) { - free(der); - free(pem); - FreeRsaKey(&derIn); - FreeRsaKey(&genKey); - return -306; - } - - FreeRsaKey(&derIn); - FreeRsaKey(&genKey); - free(pem); - free(der); - } -#endif /* CYASSL_KEY_GEN */ - - -#ifdef CYASSL_CERT_GEN - /* self signed */ - { - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - int certSz; - int pemSz; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -309; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(derCert); - return -310; - } - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - myCert.isCA = 1; - myCert.sigType = CTC_SHA256wRSA; - - certSz = MakeSelfCert(&myCert, derCert, FOURK_BUF, &key, &rng); - if (certSz < 0) { - free(derCert); - free(pem); - return -401; - } - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) { - free(derCert); - free(pem); - return -402; - } - FreeDecodedCert(&decode); -#endif - derFile = fopen("./cert.der", "wb"); - if (!derFile) { - free(derCert); - free(pem); - return -403; - } - ret = (int)fwrite(derCert, 1, certSz, derFile); - fclose(derFile); - if (ret != certSz) { - free(derCert); - free(pem); - return -414; - } - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) { - free(derCert); - free(pem); - return -404; - } - - pemFile = fopen("./cert.pem", "wb"); - if (!pemFile) { - free(derCert); - free(pem); - return -405; - } - ret = (int)fwrite(pem, 1, pemSz, pemFile); - fclose(pemFile); - if (ret != pemSz) { - free(derCert); - free(pem); - return -406; - } - free(pem); - free(derCert); - } - /* CA style */ - { - RsaKey caKey; - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - int certSz; - int pemSz; - size_t bytes3; - word32 idx3 = 0; - FILE* file3 ; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -311; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(derCert); - return -312; - } - - file3 = fopen(caKeyFile, "rb"); - - if (!file3) { - free(derCert); - free(pem); - return -412; - } - - bytes3 = fread(tmp, 1, FOURK_BUF, file3); - fclose(file3); - - ret = InitRsaKey(&caKey, 0); - if (ret != 0) { - free(derCert); - free(pem); - return -411; - } - ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); - if (ret != 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -413; - } - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - - ret = SetIssuer(&myCert, caCertFile); - if (ret < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -405; - } - - certSz = MakeCert(&myCert, derCert, FOURK_BUF, &key, NULL, &rng); - if (certSz < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -407; - } - - certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, - &caKey, NULL, &rng); - if (certSz < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -408; - } - - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -409; - } - FreeDecodedCert(&decode); -#endif - - derFile = fopen("./othercert.der", "wb"); - if (!derFile) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -410; - } - ret = (int)fwrite(derCert, 1, certSz, derFile); - fclose(derFile); - if (ret != certSz) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -416; - } - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -411; - } - - pemFile = fopen("./othercert.pem", "wb"); - if (!pemFile) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -412; - } - ret = (int)fwrite(pem, 1, pemSz, pemFile); - if (ret != pemSz) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -415; - } - fclose(pemFile); - free(pem); - free(derCert); - FreeRsaKey(&caKey); - } -#ifdef HAVE_ECC - /* ECC CA style */ - { - ecc_key caKey; - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - int certSz; - int pemSz; - size_t bytes3; - word32 idx3 = 0; - FILE* file3; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -5311; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(derCert); - return -5312; - } - - file3 = fopen(eccCaKeyFile, "rb"); - - if (!file3) { - free(derCert); - free(pem); - return -5412; - } - - bytes3 = fread(tmp, 1, FOURK_BUF, file3); - fclose(file3); - - ecc_init(&caKey); - ret = EccPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes3); - if (ret != 0) { - free(derCert); - free(pem); - return -5413; - } - - InitCert(&myCert); - myCert.sigType = CTC_SHA256wECDSA; - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "wolfSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.wolfssl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@wolfssl.com", CTC_NAME_SIZE); - - ret = SetIssuer(&myCert, eccCaCertFile); - if (ret < 0) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5405; - } - - certSz = MakeCert(&myCert, derCert, FOURK_BUF, NULL, &caKey, &rng); - if (certSz < 0) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5407; - } - - certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, - NULL, &caKey, &rng); - if (certSz < 0) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5408; - } - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5409; - } - FreeDecodedCert(&decode); -#endif - - derFile = fopen("./certecc.der", "wb"); - if (!derFile) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5410; - } - ret = (int)fwrite(derCert, 1, certSz, derFile); - fclose(derFile); - if (ret != certSz) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5414; - } - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5411; - } - - pemFile = fopen("./certecc.pem", "wb"); - if (!pemFile) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5412; - } - ret = (int)fwrite(pem, 1, pemSz, pemFile); - if (ret != pemSz) { - free(pem); - free(derCert); - ecc_free(&caKey); - return -5415; - } - fclose(pemFile); - free(pem); - free(derCert); - ecc_free(&caKey); - } -#endif /* HAVE_ECC */ -#ifdef HAVE_NTRU - { - RsaKey caKey; - Cert myCert; - byte* derCert; - byte* pem; - FILE* derFile; - FILE* pemFile; - FILE* caFile; - FILE* ntruPrivFile; - int certSz; - int pemSz; - word32 idx3; -#ifdef CYASSL_TEST_CERT - DecodedCert decode; -#endif - derCert = (byte*)malloc(FOURK_BUF); - if (derCert == NULL) - return -311; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(derCert); - return -312; - } - - byte public_key[557]; /* sized for EES401EP2 */ - word16 public_key_len; /* no. of octets in public key */ - byte private_key[607]; /* sized for EES401EP2 */ - word16 private_key_len; /* no. of octets in private key */ - DRBG_HANDLE drbg; - static uint8_t const pers_str[] = { - 'C', 'y', 'a', 'S', 'S', 'L', ' ', 't', 'e', 's', 't' - }; - word32 rc = crypto_drbg_instantiate(112, pers_str, sizeof(pers_str), - GetEntropy, &drbg); - if (rc != DRBG_OK) { - free(derCert); - free(pem); - return -450; - } - - rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, - NULL, &private_key_len, NULL); - if (rc != NTRU_OK) { - free(derCert); - free(pem); - return -451; - } - - rc = crypto_ntru_encrypt_keygen(drbg, NTRU_EES401EP2, &public_key_len, - public_key, &private_key_len, private_key); - crypto_drbg_uninstantiate(drbg); - - if (rc != NTRU_OK) { - free(derCert); - free(pem); - return -452; - } - - caFile = fopen(caKeyFile, "rb"); - - if (!caFile) { - free(derCert); - free(pem); - return -453; - } - - bytes = fread(tmp, 1, FOURK_BUF, caFile); - fclose(caFile); - - ret = InitRsaKey(&caKey, 0); - if (ret != 0) { - free(derCert); - free(pem); - return -459; - } - ret = RsaPrivateKeyDecode(tmp, &idx3, &caKey, (word32)bytes); - if (ret != 0) { - free(derCert); - free(pem); - return -454; - } - - InitCert(&myCert); - - strncpy(myCert.subject.country, "US", CTC_NAME_SIZE); - strncpy(myCert.subject.state, "OR", CTC_NAME_SIZE); - strncpy(myCert.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(myCert.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(myCert.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(myCert.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(myCert.subject.email, "info@yassl.com", CTC_NAME_SIZE); - - ret = SetIssuer(&myCert, caCertFile); - if (ret < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -455; - } - - certSz = MakeNtruCert(&myCert, derCert, FOURK_BUF, public_key, - public_key_len, &rng); - if (certSz < 0) { - free(derCert); - free(pem); - FreeRsaKey(&caKey); - return -456; - } - - certSz = SignCert(myCert.bodySz, myCert.sigType, derCert, FOURK_BUF, - &caKey, NULL, &rng); - FreeRsaKey(&caKey); - if (certSz < 0) { - free(derCert); - free(pem); - return -457; - } - - -#ifdef CYASSL_TEST_CERT - InitDecodedCert(&decode, derCert, certSz, 0); - ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0); - if (ret != 0) { - free(derCert); - free(pem); - return -458; - } - FreeDecodedCert(&decode); -#endif - derFile = fopen("./ntru-cert.der", "wb"); - if (!derFile) { - free(derCert); - free(pem); - return -459; - } - ret = (int)fwrite(derCert, 1, certSz, derFile); - fclose(derFile); - if (ret != certSz) { - free(derCert); - free(pem); - return -473; - } - - pemSz = DerToPem(derCert, certSz, pem, FOURK_BUF, CERT_TYPE); - if (pemSz < 0) { - free(derCert); - free(pem); - return -460; - } - - pemFile = fopen("./ntru-cert.pem", "wb"); - if (!pemFile) { - free(derCert); - free(pem); - return -461; - } - ret = (int)fwrite(pem, 1, pemSz, pemFile); - fclose(pemFile); - if (ret != pemSz) { - free(derCert); - free(pem); - return -474; - } - - ntruPrivFile = fopen("./ntru-key.raw", "wb"); - if (!ntruPrivFile) { - free(derCert); - free(pem); - return -462; - } - ret = (int)fwrite(private_key, 1, private_key_len, ntruPrivFile); - fclose(ntruPrivFile); - if (ret != private_key_len) { - free(pem); - free(derCert); - return -475; - } - free(pem); - free(derCert); - } -#endif /* HAVE_NTRU */ -#ifdef CYASSL_CERT_REQ - { - Cert req; - byte* der; - byte* pem; - int derSz; - int pemSz; - FILE* reqFile; - - der = (byte*)malloc(FOURK_BUF); - if (der == NULL) - return -463; - pem = (byte*)malloc(FOURK_BUF); - if (pem == NULL) { - free(der); - return -464; - } - - InitCert(&req); - - req.version = 0; - req.isCA = 1; - strncpy(req.challengePw, "yassl123", CTC_NAME_SIZE); - strncpy(req.subject.country, "US", CTC_NAME_SIZE); - strncpy(req.subject.state, "OR", CTC_NAME_SIZE); - strncpy(req.subject.locality, "Portland", CTC_NAME_SIZE); - strncpy(req.subject.org, "yaSSL", CTC_NAME_SIZE); - strncpy(req.subject.unit, "Development", CTC_NAME_SIZE); - strncpy(req.subject.commonName, "www.yassl.com", CTC_NAME_SIZE); - strncpy(req.subject.email, "info@yassl.com", CTC_NAME_SIZE); - req.sigType = CTC_SHA256wRSA; - - derSz = MakeCertReq(&req, der, FOURK_BUF, &key, NULL); - if (derSz < 0) { - free(pem); - free(der); - return -465; - } - - derSz = SignCert(req.bodySz, req.sigType, der, FOURK_BUF, - &key, NULL, &rng); - if (derSz < 0) { - free(pem); - free(der); - return -466; - } - - pemSz = DerToPem(der, derSz, pem, FOURK_BUF, CERTREQ_TYPE); - if (pemSz < 0) { - free(pem); - free(der); - return -467; - } - - reqFile = fopen("./certreq.der", "wb"); - if (!reqFile) { - free(pem); - free(der); - return -468; - } - - ret = (int)fwrite(der, 1, derSz, reqFile); - fclose(reqFile); - if (ret != derSz) { - free(pem); - free(der); - return -471; - } - - reqFile = fopen("./certreq.pem", "wb"); - if (!reqFile) { - free(pem); - free(der); - return -469; - } - ret = (int)fwrite(pem, 1, pemSz, reqFile); - fclose(reqFile); - if (ret != pemSz) { - free(pem); - free(der); - return -470; - } - - free(pem); - free(der); - } -#endif /* CYASSL_CERT_REQ */ -#endif /* CYASSL_CERT_GEN */ - - FreeRsaKey(&key); -#ifdef HAVE_CAVIUM - RsaFreeCavium(&key); -#endif - free(tmp); - - return 0; -} - -#endif - - -#ifndef NO_DH - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* dhKey = "a:\certs\\dh2048.der"; - #else - static const char* dhKey = "./certs/dh2048.der"; - #endif -#endif - -int dh_test(void) -{ - int ret; - word32 bytes; - word32 idx = 0, privSz, pubSz, privSz2, pubSz2, agreeSz, agreeSz2; - byte tmp[1024]; - byte priv[256]; - byte pub[256]; - byte priv2[256]; - byte pub2[256]; - byte agree[256]; - byte agree2[256]; - DhKey key; - DhKey key2; - RNG rng; - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dh_key_der_1024, sizeof_dh_key_der_1024); - bytes = sizeof_dh_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dh_key_der_2048, sizeof_dh_key_der_2048); - bytes = sizeof_dh_key_der_2048; -#else - FILE* file = fopen(dhKey, "rb"); - - if (!file) - return -50; - - bytes = (word32) fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - InitDhKey(&key); - InitDhKey(&key2); - ret = DhKeyDecode(tmp, &idx, &key, bytes); - if (ret != 0) - return -51; - - idx = 0; - ret = DhKeyDecode(tmp, &idx, &key2, bytes); - if (ret != 0) - return -52; - - ret = InitRng(&rng); - if (ret != 0) - return -53; - - ret = DhGenerateKeyPair(&key, &rng, priv, &privSz, pub, &pubSz); - ret += DhGenerateKeyPair(&key2, &rng, priv2, &privSz2, pub2, &pubSz2); - if (ret != 0) - return -54; - - ret = DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2); - ret += DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz); - if (ret != 0) - return -55; - - if (memcmp(agree, agree2, agreeSz)) - return -56; - - FreeDhKey(&key); - FreeDhKey(&key2); - - return 0; -} - -#endif /* NO_DH */ - - -#ifndef NO_DSA - -#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) - #ifdef FREESCALE_MQX - static const char* dsaKey = "a:\\certs\\dsa2048.der"; - #else - static const char* dsaKey = "./certs/dsa2048.der"; - #endif -#endif - -int dsa_test(void) -{ - int ret, answer; - word32 bytes; - word32 idx = 0; - byte tmp[1024]; - DsaKey key; - RNG rng; - Sha sha; - byte hash[SHA_DIGEST_SIZE]; - byte signature[40]; - - -#ifdef USE_CERT_BUFFERS_1024 - XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024); - bytes = sizeof_dsa_key_der_1024; -#elif defined(USE_CERT_BUFFERS_2048) - XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048); - bytes = sizeof_dsa_key_der_2048; -#else - FILE* file = fopen(dsaKey, "rb"); - - if (!file) - return -60; - - bytes = (word32) fread(tmp, 1, sizeof(tmp), file); - fclose(file); -#endif /* USE_CERT_BUFFERS */ - - ret = InitSha(&sha); - if (ret != 0) - return -4002; - ShaUpdate(&sha, tmp, bytes); - ShaFinal(&sha, hash); - - InitDsaKey(&key); - ret = DsaPrivateKeyDecode(tmp, &idx, &key, bytes); - if (ret != 0) return -61; - - ret = InitRng(&rng); - if (ret != 0) return -62; - - ret = DsaSign(hash, signature, &key, &rng); - if (ret != 0) return -63; - - ret = DsaVerify(hash, signature, &key, &answer); - if (ret != 0) return -64; - if (answer != 1) return -65; - - FreeDsaKey(&key); - - return 0; -} - -#endif /* NO_DSA */ - - -#ifdef OPENSSL_EXTRA - -int openssl_test(void) -{ - EVP_MD_CTX md_ctx; - testVector a, b, c, d, e, f; - byte hash[SHA_DIGEST_SIZE*4]; /* max size */ - - (void)e; - (void)f; - - a.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - a.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" - "\x7a"; - a.inLen = strlen(a.input); - a.outLen = MD5_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_md5()); - - EVP_DigestUpdate(&md_ctx, a.input, a.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, a.output, MD5_DIGEST_SIZE) != 0) - return -71; - - b.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaa"; - b.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" - "\x53\x99\x5E\x26\xA0"; - b.inLen = strlen(b.input); - b.outLen = SHA_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha1()); - - EVP_DigestUpdate(&md_ctx, b.input, b.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, b.output, SHA_DIGEST_SIZE) != 0) - return -72; - - - d.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - d.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" - "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" - "\x06\xC1"; - d.inLen = strlen(d.input); - d.outLen = SHA256_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha256()); - - EVP_DigestUpdate(&md_ctx, d.input, d.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, d.output, SHA256_DIGEST_SIZE) != 0) - return -78; - -#ifdef CYASSL_SHA384 - - e.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - e.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" - "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" - "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" - "\x74\x60\x39"; - e.inLen = strlen(e.input); - e.outLen = SHA384_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha384()); - - EVP_DigestUpdate(&md_ctx, e.input, e.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0) - return -79; - -#endif /* CYASSL_SHA384 */ - - -#ifdef CYASSL_SHA512 - - f.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - f.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" - "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" - "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" - "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" - "\x87\x4b\xe9\x09"; - f.inLen = strlen(f.input); - f.outLen = SHA512_DIGEST_SIZE; - - EVP_MD_CTX_init(&md_ctx); - EVP_DigestInit(&md_ctx, EVP_sha512()); - - EVP_DigestUpdate(&md_ctx, f.input, f.inLen); - EVP_DigestFinal(&md_ctx, hash, 0); - - if (memcmp(hash, f.output, SHA512_DIGEST_SIZE) != 0) - return -80; - -#endif /* CYASSL_SHA512 */ - - - if (RAND_bytes(hash, sizeof(hash)) != 1) - return -73; - - c.input = "what do ya want for nothing?"; - c.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" - "\x38"; - c.inLen = strlen(c.input); - c.outLen = MD5_DIGEST_SIZE; - - HMAC(EVP_md5(), "Jefe", 4, (byte*)c.input, (int)c.inLen, hash, 0); - - if (memcmp(hash, c.output, MD5_DIGEST_SIZE) != 0) - return -74; - - { /* des test */ - const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - byte plain[24]; - byte cipher[24]; - - const_DES_cblock key = - { - 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef - }; - - DES_cblock iv = - { - 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef - }; - - DES_key_schedule sched; - - const byte verify[] = - { - 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8, - 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73, - 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b - }; - - DES_key_sched(&key, &sched); - - DES_cbc_encrypt(vector, cipher, sizeof(vector), &sched, &iv, DES_ENCRYPT); - DES_cbc_encrypt(cipher, plain, sizeof(vector), &sched, &iv, DES_DECRYPT); - - if (memcmp(plain, vector, sizeof(vector)) != 0) - return -75; - - if (memcmp(cipher, verify, sizeof(verify)) != 0) - return -76; - - /* test changing iv */ - DES_ncbc_encrypt(vector, cipher, 8, &sched, &iv, DES_ENCRYPT); - DES_ncbc_encrypt(vector + 8, cipher + 8, 16, &sched, &iv, DES_ENCRYPT); - - if (memcmp(cipher, verify, sizeof(verify)) != 0) - return -77; - - } /* end des test */ - - { /* evp_cipher test */ - EVP_CIPHER_CTX ctx; - - - const byte msg[] = { /* "Now is the time for all " w/o trailing 0 */ - 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 - }; - - const byte verify[] = - { - 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53, - 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb - }; - - byte key[] = "0123456789abcdef "; /* align */ - byte iv[] = "1234567890abcdef "; /* align */ - - byte cipher[AES_BLOCK_SIZE * 4]; - byte plain [AES_BLOCK_SIZE * 4]; - - EVP_CIPHER_CTX_init(&ctx); - if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 1) == 0) - return -81; - - if (EVP_Cipher(&ctx, cipher, (byte*)msg, 16) == 0) - return -82; - - if (memcmp(cipher, verify, AES_BLOCK_SIZE)) - return -83; - - EVP_CIPHER_CTX_init(&ctx); - if (EVP_CipherInit(&ctx, EVP_aes_128_cbc(), key, iv, 0) == 0) - return -84; - - if (EVP_Cipher(&ctx, plain, cipher, 16) == 0) - return -85; - - if (memcmp(plain, msg, AES_BLOCK_SIZE)) - return -86; - - - } /* end evp_cipher test */ - - return 0; -} - -#endif /* OPENSSL_EXTRA */ - - -#ifndef NO_PWDBASED - -int pkcs12_test(void) -{ - const byte passwd[] = { 0x00, 0x73, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x67, - 0x00, 0x00 }; - const byte salt[] = { 0x0a, 0x58, 0xCF, 0x64, 0x53, 0x0d, 0x82, 0x3f }; - - const byte passwd2[] = { 0x00, 0x71, 0x00, 0x75, 0x00, 0x65, 0x00, 0x65, - 0x00, 0x67, 0x00, 0x00 }; - const byte salt2[] = { 0x16, 0x82, 0xC0, 0xfC, 0x5b, 0x3f, 0x7e, 0xc5 }; - byte derived[64]; - - const byte verify[] = { - 0x8A, 0xAA, 0xE6, 0x29, 0x7B, 0x6C, 0xB0, 0x46, - 0x42, 0xAB, 0x5B, 0x07, 0x78, 0x51, 0x28, 0x4E, - 0xB7, 0x12, 0x8F, 0x1A, 0x2A, 0x7F, 0xBC, 0xA3 - }; - - const byte verify2[] = { - 0x48, 0x3D, 0xD6, 0xE9, 0x19, 0xD7, 0xDE, 0x2E, - 0x8E, 0x64, 0x8B, 0xA8, 0xF8, 0x62, 0xF3, 0xFB, - 0xFB, 0xDC, 0x2B, 0xCB, 0x2C, 0x02, 0x95, 0x7F - }; - - int id = 1; - int kLen = 24; - int iterations = 1; - int ret = PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8, iterations, - kLen, SHA, id); - - if (ret < 0) - return -103; - - if ( (ret = memcmp(derived, verify, kLen)) != 0) - return -104; - - iterations = 1000; - ret = PKCS12_PBKDF(derived, passwd2, sizeof(passwd2), salt2, 8, iterations, - kLen, SHA, id); - if (ret < 0) - return -105; - - if ( (ret = memcmp(derived, verify2, 24)) != 0) - return -106; - - return 0; -} - - -int pbkdf2_test(void) -{ - char passwd[] = "password"; - const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; - int iterations = 2048; - int kLen = 24; - byte derived[64]; - - const byte verify[] = { - 0xBF, 0xDE, 0x6B, 0xE9, 0x4D, 0xF7, 0xE1, 0x1D, 0xD4, 0x09, 0xBC, 0xE2, - 0x0A, 0x02, 0x55, 0xEC, 0x32, 0x7C, 0xB9, 0x36, 0xFF, 0xE9, 0x36, 0x43 - - }; - - int ret = PBKDF2(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, - iterations, kLen, SHA); - if (ret != 0) - return ret; - - if (memcmp(derived, verify, sizeof(verify)) != 0) - return -102; - - return 0; -} - - -int pbkdf1_test(void) -{ - char passwd[] = "password"; - const byte salt[] = { 0x78, 0x57, 0x8E, 0x5a, 0x5d, 0x63, 0xcb, 0x06 }; - int iterations = 1000; - int kLen = 16; - byte derived[16]; - - const byte verify[] = { - 0xDC, 0x19, 0x84, 0x7E, 0x05, 0xC6, 0x4D, 0x2F, 0xAF, 0x10, 0xEB, 0xFB, - 0x4A, 0x3D, 0x2A, 0x20 - }; - - PBKDF1(derived, (byte*)passwd, (int)strlen(passwd), salt, 8, iterations, - kLen, SHA); - - if (memcmp(derived, verify, sizeof(verify)) != 0) - return -101; - - return 0; -} - - -int pwdbased_test(void) -{ - int ret = pbkdf1_test(); - ret += pbkdf2_test(); - - return ret + pkcs12_test(); -} - -#endif /* NO_PWDBASED */ - -#if defined(HAVE_HKDF) && (!defined(NO_SHA) || !defined(NO_SHA256)) - -int hkdf_test(void) -{ - int ret; - int L = 42; - byte okm1[42]; - byte ikm1[22] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b }; - byte salt1[13] ={ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c }; - byte info1[10] ={ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9 }; - byte res1[42] = { 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, - 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, - 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, - 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, - 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, - 0x49, 0x18 }; - byte res2[42] = { 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, - 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, - 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, - 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, - 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, - 0xf8, 0x96 }; - byte res3[42] = { 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, - 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, - 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, - 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, - 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, - 0x96, 0xc8 }; - byte res4[42] = { 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, - 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, - 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, - 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, - 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, - 0x58, 0x65 }; - - (void)res1; - (void)res2; - (void)res3; - (void)res4; - -#ifndef NO_SHA - ret = HKDF(SHA, ikm1, 22, NULL, 0, NULL, 0, okm1, L); - if (ret != 0) - return -2001; - - if (memcmp(okm1, res1, L) != 0) - return -2002; - - ret = HKDF(SHA, ikm1, 11, salt1, 13, info1, 10, okm1, L); - if (ret != 0) - return -2003; - - if (memcmp(okm1, res2, L) != 0) - return -2004; -#endif /* NO_SHA */ - -#ifndef NO_SHA256 - ret = HKDF(SHA256, ikm1, 22, NULL, 0, NULL, 0, okm1, L); - if (ret != 0) - return -2005; - - if (memcmp(okm1, res3, L) != 0) - return -2006; - - ret = HKDF(SHA256, ikm1, 22, salt1, 13, info1, 10, okm1, L); - if (ret != 0) - return -2007; - - if (memcmp(okm1, res4, L) != 0) - return -2007; -#endif /* NO_SHA256 */ - - return 0; -} - -#endif /* HAVE_HKDF */ - - -#ifdef HAVE_ECC - -int ecc_test(void) -{ - RNG rng; - byte sharedA[1024]; - byte sharedB[1024]; - byte sig[1024]; - byte digest[20]; - byte exportBuf[1024]; - word32 x, y; - int i, verify, ret; - ecc_key userA, userB, pubKey; - - ret = InitRng(&rng); - if (ret != 0) - return -1001; - - ecc_init(&userA); - ecc_init(&userB); - ecc_init(&pubKey); - - ret = ecc_make_key(&rng, 32, &userA); - - if (ret != 0) - return -1014; - - ret = ecc_make_key(&rng, 32, &userB); - - if (ret != 0) - return -1002; - - x = sizeof(sharedA); - ret = ecc_shared_secret(&userA, &userB, sharedA, &x); - - if (ret != 0) - return -1015; - - y = sizeof(sharedB); - ret = ecc_shared_secret(&userB, &userA, sharedB, &y); - - if (ret != 0) - return -1003; - - if (y != x) - return -1004; - - if (memcmp(sharedA, sharedB, x)) - return -1005; - - x = sizeof(exportBuf); - ret = ecc_export_x963(&userA, exportBuf, &x); - if (ret != 0) - return -1006; - - ret = ecc_import_x963(exportBuf, x, &pubKey); - - if (ret != 0) - return -1007; - - y = sizeof(sharedB); - ret = ecc_shared_secret(&userB, &pubKey, sharedB, &y); - - if (ret != 0) - return -1008; - - if (memcmp(sharedA, sharedB, y)) - return -1010; - - /* test DSA sign hash */ - for (i = 0; i < (int)sizeof(digest); i++) - digest[i] = (byte)i; - - x = sizeof(sig); - ret = ecc_sign_hash(digest, sizeof(digest), sig, &x, &rng, &userA); - - if (ret != 0) - return -1016; - - verify = 0; - ret = ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &userA); - - if (ret != 0) - return -1011; - - if (verify != 1) - return -1012; - - x = sizeof(exportBuf); - ret = ecc_export_private_only(&userA, exportBuf, &x); - if (ret != 0) - return -1013; - - ecc_free(&pubKey); - ecc_free(&userB); - ecc_free(&userA); - - return 0; -} - -#ifdef HAVE_ECC_ENCRYPT - -int ecc_encrypt_test(void) -{ - RNG rng; - int ret; - ecc_key userA, userB; - byte msg[48]; - byte plain[48]; - byte out[80]; - word32 outSz = sizeof(out); - word32 plainSz = sizeof(plain); - int i; - - ret = InitRng(&rng); - if (ret != 0) - return -3001; - - ecc_init(&userA); - ecc_init(&userB); - - ret = ecc_make_key(&rng, 32, &userA); - ret += ecc_make_key(&rng, 32, &userB); - - if (ret != 0) - return -3002; - - for (i = 0; i < 48; i++) - msg[i] = i; - - /* encrypt msg to B */ - ret = ecc_encrypt(&userA, &userB, msg, sizeof(msg), out, &outSz, NULL); - if (ret != 0) - return -3003; - - /* decrypt msg from A */ - ret = ecc_decrypt(&userB, &userA, out, outSz, plain, &plainSz, NULL); - if (ret != 0) - return -3004; - - if (memcmp(plain, msg, sizeof(msg)) != 0) - return -3005; - - - { /* let's verify message exchange works, A is client, B is server */ - ecEncCtx* cliCtx = ecc_ctx_new(REQ_RESP_CLIENT, &rng); - ecEncCtx* srvCtx = ecc_ctx_new(REQ_RESP_SERVER, &rng); - - byte cliSalt[EXCHANGE_SALT_SZ]; - byte srvSalt[EXCHANGE_SALT_SZ]; - const byte* tmpSalt; - - if (cliCtx == NULL || srvCtx == NULL) - return -3006; - - /* get salt to send to peer */ - tmpSalt = ecc_ctx_get_own_salt(cliCtx); - if (tmpSalt == NULL) - return -3007; - memcpy(cliSalt, tmpSalt, EXCHANGE_SALT_SZ); - - tmpSalt = ecc_ctx_get_own_salt(srvCtx); - if (tmpSalt == NULL) - return -3007; - memcpy(srvSalt, tmpSalt, EXCHANGE_SALT_SZ); - - /* in actual use, we'd get the peer's salt over the transport */ - ret = ecc_ctx_set_peer_salt(cliCtx, srvSalt); - ret += ecc_ctx_set_peer_salt(srvCtx, cliSalt); - - if (ret != 0) - return -3008; - - /* get encrypted msg (request) to send to B */ - outSz = sizeof(out); - ret = ecc_encrypt(&userA, &userB, msg, sizeof(msg), out, &outSz,cliCtx); - if (ret != 0) - return -3009; - - /* B decrypts msg (request) from A */ - plainSz = sizeof(plain); - ret = ecc_decrypt(&userB, &userA, out, outSz, plain, &plainSz, srvCtx); - if (ret != 0) - return -3010; - - if (memcmp(plain, msg, sizeof(msg)) != 0) - return -3011; - - { - /* msg2 (response) from B to A */ - byte msg2[48]; - byte plain2[48]; - byte out2[80]; - word32 outSz2 = sizeof(out2); - word32 plainSz2 = sizeof(plain2); - - for (i = 0; i < 48; i++) - msg2[i] = i+48; - - /* get encrypted msg (response) to send to B */ - ret = ecc_encrypt(&userB, &userA, msg2, sizeof(msg2), out2, - &outSz2, srvCtx); - if (ret != 0) - return -3012; - - /* A decrypts msg (response) from B */ - ret = ecc_decrypt(&userA, &userB, out2, outSz2, plain2, &plainSz2, - cliCtx); - if (ret != 0) - return -3013; - - if (memcmp(plain2, msg2, sizeof(msg2)) != 0) - return -3014; - } - - /* cleanup */ - ecc_ctx_free(srvCtx); - ecc_ctx_free(cliCtx); - } - - /* cleanup */ - ecc_free(&userB); - ecc_free(&userA); - - return 0; -} - -#endif /* HAVE_ECC_ENCRYPT */ -#endif /* HAVE_ECC */ - -#ifdef HAVE_LIBZ - -const byte sample_text[] = - "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" - "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" - "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" - "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" - "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" - "small batch meggings kogi dolore food truck bespoke gastropub.\n" - "\n" - "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" - "four loko you probably haven't heard of them high life. Messenger bag\n" - "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" - "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" - "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" - "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" - "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" - "richardson elit leggings adipisicing ennui raw denim banjo hella. Godard\n" - "mixtape polaroid, pork belly readymade organic cray typewriter helvetica\n" - "four loko whatever street art yr farm-to-table.\n" - "\n" - "Vinyl keytar vice tofu. Locavore you probably haven't heard of them pug\n" - "pickled, hella tonx labore truffaut DIY mlkshk elit cosby sweater sint\n" - "et mumblecore. Elit swag semiotics, reprehenderit DIY sartorial nisi ugh\n" - "nesciunt pug pork belly wayfarers selfies delectus. Ethical hoodie\n" - "seitan fingerstache kale chips. Terry richardson artisan williamsburg,\n" - "eiusmod fanny pack irony tonx ennui lo-fi incididunt tofu YOLO\n" - "readymade. 8-bit sed ethnic beard officia. Pour-over iphone DIY butcher,\n" - "ethnic art party qui letterpress nisi proident jean shorts mlkshk\n" - "locavore.\n" - "\n" - "Narwhal flexitarian letterpress, do gluten-free voluptate next level\n" - "banh mi tonx incididunt carles DIY. Odd future nulla 8-bit beard ut\n" - "cillum pickled velit, YOLO officia you probably haven't heard of them\n" - "trust fund gastropub. Nisi adipisicing tattooed, Austin mlkshk 90's\n" - "small batch american apparel. Put a bird on it cosby sweater before they\n" - "sold out pork belly kogi hella. Street art mollit sustainable polaroid,\n" - "DIY ethnic ea pug beard dreamcatcher cosby sweater magna scenester nisi.\n" - "Sed pork belly skateboard mollit, labore proident eiusmod. Sriracha\n" - "excepteur cosby sweater, anim deserunt laborum eu aliquip ethical et\n" - "neutra PBR selvage.\n" - "\n" - "Raw denim pork belly truffaut, irony plaid sustainable put a bird on it\n" - "next level jean shorts exercitation. Hashtag keytar whatever, nihil\n" - "authentic aliquip disrupt laborum. Tattooed selfies deserunt trust fund\n" - "wayfarers. 3 wolf moon synth church-key sartorial, gastropub leggings\n" - "tattooed. Labore high life commodo, meggings raw denim fingerstache pug\n" - "trust fund leggings seitan forage. Nostrud ullamco duis, reprehenderit\n" - "incididunt flannel sustainable helvetica pork belly pug banksy you\n" - "probably haven't heard of them nesciunt farm-to-table. Disrupt nostrud\n" - "mollit magna, sriracha sartorial helvetica.\n" - "\n" - "Nulla kogi reprehenderit, skateboard sustainable duis adipisicing viral\n" - "ad fanny pack salvia. Fanny pack trust fund you probably haven't heard\n" - "of them YOLO vice nihil. Keffiyeh cray lo-fi pinterest cardigan aliqua,\n" - "reprehenderit aute. Culpa tousled williamsburg, marfa lomo actually anim\n" - "skateboard. Iphone aliqua ugh, semiotics pariatur vero readymade\n" - "organic. Marfa squid nulla, in laborum disrupt laboris irure gastropub.\n" - "Veniam sunt food truck leggings, sint vinyl fap.\n" - "\n" - "Hella dolore pork belly, truffaut carles you probably haven't heard of\n" - "them PBR helvetica in sapiente. Fashion axe ugh bushwick american\n" - "apparel. Fingerstache sed iphone, jean shorts blue bottle nisi bushwick\n" - "flexitarian officia veniam plaid bespoke fap YOLO lo-fi. Blog\n" - "letterpress mumblecore, food truck id cray brooklyn cillum ad sed.\n" - "Assumenda chambray wayfarers vinyl mixtape sustainable. VHS vinyl\n" - "delectus, culpa williamsburg polaroid cliche swag church-key synth kogi\n" - "magna pop-up literally. Swag thundercats ennui shoreditch vegan\n" - "pitchfork neutra truffaut etsy, sed single-origin coffee craft beer.\n" - "\n" - "Odio letterpress brooklyn elit. Nulla single-origin coffee in occaecat\n" - "meggings. Irony meggings 8-bit, chillwave lo-fi adipisicing cred\n" - "dreamcatcher veniam. Put a bird on it irony umami, trust fund bushwick\n" - "locavore kale chips. Sriracha swag thundercats, chillwave disrupt\n" - "tousled beard mollit mustache leggings portland next level. Nihil esse\n" - "est, skateboard art party etsy thundercats sed dreamcatcher ut iphone\n" - "swag consectetur et. Irure skateboard banjo, nulla deserunt messenger\n" - "bag dolor terry richardson sapiente.\n"; - - -int compress_test(void) -{ - int ret = 0; - word32 dSz = sizeof(sample_text); - word32 cSz = (dSz + (word32)(dSz * 0.001) + 12); - byte *c = NULL; - byte *d = NULL; - - c = calloc(cSz, sizeof(byte)); - d = calloc(dSz, sizeof(byte)); - - if (c == NULL || d == NULL) - ret = -300; - - if (ret == 0 && (ret = Compress(c, cSz, sample_text, dSz, 0)) < 0) - ret = -301; - - if (ret > 0) { - cSz = (word32)ret; - ret = 0; - } - - if (ret == 0 && DeCompress(d, dSz, c, cSz) != (int)dSz) - ret = -302; - - if (ret == 0 && memcmp(d, sample_text, dSz)) - ret = -303; - - if (c) free(c); - if (d) free(d); - - return ret; -} - -#endif /* HAVE_LIBZ */ - -#ifdef HAVE_PKCS7 - -int pkcs7enveloped_test(void) -{ - int ret = 0; - - int cipher = DES3b; - int envelopedSz, decodedSz; - PKCS7 pkcs7; - byte* cert; - byte* privKey; - byte enveloped[2048]; - byte decoded[2048]; - - size_t certSz; - size_t privKeySz; - FILE* certFile; - FILE* keyFile; - FILE* pkcs7File; - const char* pkcs7OutFile = "pkcs7envelopedData.der"; - - const byte data[] = { /* Hello World */ - 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f, - 0x72,0x6c,0x64 - }; - - /* read client cert and key in DER format */ - cert = (byte*)malloc(FOURK_BUF); - if (cert == NULL) - return -201; - - privKey = (byte*)malloc(FOURK_BUF); - if (privKey == NULL) { - free(cert); - return -202; - } - - certFile = fopen(clientCert, "rb"); - if (!certFile) { - free(cert); - free(privKey); - err_sys("can't open ./certs/client-cert.der, " - "Please run from CyaSSL home dir", -42); - } - - certSz = fread(cert, 1, FOURK_BUF, certFile); - fclose(certFile); - - keyFile = fopen(clientKey, "rb"); - if (!keyFile) { - free(cert); - free(privKey); - err_sys("can't open ./certs/client-key.der, " - "Please run from CyaSSL home dir", -43); - } - - privKeySz = fread(privKey, 1, FOURK_BUF, keyFile); - fclose(keyFile); - - PKCS7_InitWithCert(&pkcs7, cert, (word32)certSz); - pkcs7.content = (byte*)data; - pkcs7.contentSz = (word32)sizeof(data); - pkcs7.contentOID = DATA; - pkcs7.encryptOID = cipher; - pkcs7.privateKey = privKey; - pkcs7.privateKeySz = (word32)privKeySz; - - /* encode envelopedData */ - envelopedSz = PKCS7_EncodeEnvelopedData(&pkcs7, enveloped, - sizeof(enveloped)); - if (envelopedSz <= 0) { - free(cert); - free(privKey); - return -203; - } - - /* decode envelopedData */ - decodedSz = PKCS7_DecodeEnvelopedData(&pkcs7, enveloped, envelopedSz, - decoded, sizeof(decoded)); - if (decodedSz <= 0) { - free(cert); - free(privKey); - return -204; - } - - /* test decode result */ - if (memcmp(decoded, data, sizeof(data)) != 0) { - free(cert); - free(privKey); - return -205; - } - - /* output pkcs7 envelopedData for external testing */ - pkcs7File = fopen(pkcs7OutFile, "wb"); - if (!pkcs7File) { - free(cert); - free(privKey); - return -206; - } - - ret = (int)fwrite(enveloped, envelopedSz, 1, pkcs7File); - fclose(pkcs7File); - - free(cert); - free(privKey); - PKCS7_Free(&pkcs7); - - if (ret > 0) - return 0; - - return ret; -} - -int pkcs7signed_test(void) -{ - int ret = 0; - - FILE* file; - byte* certDer; - byte* keyDer; - byte* out; - char data[] = "Hello World"; - word32 dataSz, outSz, certDerSz, keyDerSz; - PKCS7 msg; - RNG rng; - - byte transIdOid[] = - { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, - 0x09, 0x07 }; - byte messageTypeOid[] = - { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, - 0x09, 0x02 }; - byte senderNonceOid[] = - { 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, - 0x09, 0x05 }; - byte transId[(SHA_DIGEST_SIZE + 1) * 2 + 1]; - byte messageType[] = { 0x13, 2, '1', '9' }; - byte senderNonce[PKCS7_NONCE_SZ + 2]; - - PKCS7Attrib attribs[] = - { - { transIdOid, sizeof(transIdOid), - transId, sizeof(transId) - 1 }, /* take off the null */ - { messageTypeOid, sizeof(messageTypeOid), - messageType, sizeof(messageType) }, - { senderNonceOid, sizeof(senderNonceOid), - senderNonce, sizeof(senderNonce) } - }; - - dataSz = (word32) strlen(data); - outSz = FOURK_BUF; - - certDer = (byte*)malloc(FOURK_BUF); - if (certDer == NULL) - return -207; - keyDer = (byte*)malloc(FOURK_BUF); - if (keyDer == NULL) { - free(certDer); - return -208; - } - out = (byte*)malloc(FOURK_BUF); - if (out == NULL) { - free(certDer); - free(keyDer); - return -209; - } - - /* read in DER cert of recipient, into cert of size certSz */ - file = fopen(clientCert, "rb"); - if (!file) { - free(certDer); - free(keyDer); - free(out); - err_sys("can't open ./certs/client-cert.der, " - "Please run from CyaSSL home dir", -44); - } - certDerSz = (word32)fread(certDer, 1, FOURK_BUF, file); - fclose(file); - - file = fopen(clientKey, "rb"); - if (!file) { - free(certDer); - free(keyDer); - free(out); - err_sys("can't open ./certs/client-key.der, " - "Please run from CyaSSL home dir", -45); - } - keyDerSz = (word32)fread(keyDer, 1, FOURK_BUF, file); - fclose(file); - - ret = InitRng(&rng); - if (ret != 0) { - free(certDer); - free(keyDer); - free(out); - return -210; - } - - senderNonce[0] = 0x04; - senderNonce[1] = PKCS7_NONCE_SZ; - - ret = RNG_GenerateBlock(&rng, &senderNonce[2], PKCS7_NONCE_SZ); - if (ret != 0) { - free(certDer); - free(keyDer); - free(out); - return -211; - } - - PKCS7_InitWithCert(&msg, certDer, certDerSz); - msg.privateKey = keyDer; - msg.privateKeySz = keyDerSz; - msg.content = (byte*)data; - msg.contentSz = dataSz; - msg.hashOID = SHAh; - msg.encryptOID = RSAk; - msg.signedAttribs = attribs; - msg.signedAttribsSz = sizeof(attribs)/sizeof(PKCS7Attrib); - msg.rng = &rng; - { - Sha sha; - byte digest[SHA_DIGEST_SIZE]; - int i,j; - - transId[0] = 0x13; - transId[1] = SHA_DIGEST_SIZE * 2; - - ret = InitSha(&sha); - if (ret != 0) { - free(certDer); - free(keyDer); - free(out); - return -4003; - } - ShaUpdate(&sha, msg.publicKey, msg.publicKeySz); - ShaFinal(&sha, digest); - - for (i = 0, j = 2; i < SHA_DIGEST_SIZE; i++, j += 2) { - snprintf((char*)&transId[j], 3, "%02x", digest[i]); - } - } - ret = PKCS7_EncodeSignedData(&msg, out, outSz); - if (ret < 0) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -212; - } - else - outSz = ret; - - /* write PKCS#7 to output file for more testing */ - file = fopen("./pkcs7signedData.der", "wb"); - if (!file) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -213; - } - ret = (int)fwrite(out, 1, outSz, file); - fclose(file); - if (ret != (int)outSz) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -218; - } - - PKCS7_Free(&msg); - PKCS7_InitWithCert(&msg, NULL, 0); - - ret = PKCS7_VerifySignedData(&msg, out, outSz); - if (ret < 0) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -214; - } - - if (msg.singleCert == NULL || msg.singleCertSz == 0) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -215; - } - - file = fopen("./pkcs7cert.der", "wb"); - if (!file) { - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - return -216; - } - ret = (int)fwrite(msg.singleCert, 1, msg.singleCertSz, file); - fclose(file); - - free(certDer); - free(keyDer); - free(out); - PKCS7_Free(&msg); - - if (ret > 0) - return 0; - - return ret; -} - -#endif /* HAVE_PKCS7 */ - -#endif /* NO_CRYPT_TEST */ diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.h b/project1/cyassl-3.0.0/ctaocrypt/test/test.h deleted file mode 100644 index 2310ed51..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/test.h +++ /dev/null @@ -1,33 +0,0 @@ -/* ctaocrypt/test/test.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#pragma once - -#ifdef __cplusplus - extern "C" { -#endif - -void ctaocrypt_test(void* args); - -#ifdef __cplusplus - } /* extern "C" */ -#endif - diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.o b/project1/cyassl-3.0.0/ctaocrypt/test/test.o deleted file mode 100644 index 8d0ac21b0c9497cc331b80c8f4edf8e34749031c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15008 zcmbtb3wTu3wcde%2}TnsAXRDy957%QNHTdqF%U>XfCNGk9)cK#Wb%N?B+g8LU=T2g zFdafs(Sj9=P^(t7w7ycb8s4QAQG8+X*;}uaM-{IYtSI;Y&)NITnUkQm*Ykacf3LmP zUTd$l*M6KmVMT61UQ|?6cOjoB(OpC-0+?je38w~$B3{Ial36pGPbC~@&D>Rc*fi8+ zw;h-ma{wq`a8M%y*1;}4;&&b+rX^Mz=| zT+^BPL=VMW(wX^DPsOb4%p4G-m@_&vOJWr>r!#ZHrHYx_nVB7@n1ebq3old5D>^gp zy<9OFcuRy18_Z7-I1BU1D^$z(Ix#UC40ZF~gqzFe?vV|1?9qmb13C5>$5(Q^4n*6H zaxh?z(WU-zCp4JI+at)6i^Hsw3r*#lP32-!InPucZ7MrVkZQ905g9LnP4)qyiRVJ`!2)}X z76>VHAUH;kL0gW!KDZyzidHqD0<_6KA3RKXgbH?Is9y_RYez$$w!*09edn7GBqVn< ze;pk>blawr(P!Tc9$&SWp+x%3+oMPJFKmTZ&HA<{Nx)Wu;YA;4?=Pb|pbxkP$7Yn+ zgTzemfJqTDmdKCOWyVCvSR%htmnqO>n(Woe>(-9;vQIBuXs8c<+7`g#lw*(U1<^K- zy)?M%WUtWW^G>LO9oWOD39DmmcoTzDJb8e(IQ zJ+WPmf$ns`KJw&cq2=d7x#9vk*}N}7bGZr2L8Ov74B2F6kA-m~8OfpCQ>G+hC&Iyi z-nM)#7*V%v2nU1Sn}XrN5*HDSX7B}+_BUJ}AjiuV0}jT`9x-7O4Y?%nMh?(roDnja zhRhhqj7!mFawzknmM4#)#Juej{Ab7!Owwl#IuVDFj|qMe0tf!jMs(30+mPXB`*g-( zIdUd+xiJNGNg0XuB1+6f^L&O%s!_~oWM+l(&P!gtZX#knUfnhg^D(;lz-eSBlIudZ z;NkdnQ?aXJTD~7Vw`wngXo_jm#bRno9>i2z@MKKCb=t|8e(SW8G1aDBWK0KKG^PU( zjA|KEbXnz2`_wLDN=X&ALKV|e88)5$8PDo@QZon(n=zKkimrl$OV9MkRSV8q&1^T6Oo3A=;TVUxT~PpB8w;cV_iuM<=CB}#PQgAZOyx) zn>!MM`=?=T83~>fE599UhYkBrQuDvBjK8NN{+W)pF|Ax@LPNog;r`RsVjqW;#8xg3 zH;RFywi6R66Cu$35-Fz`_UE76SNHOH_N~}`D@AFrx}UR^J!?sdCdyj z%0&_9gV9j!42}ETV95@(cAzVEtd)uJxn~;&U^h%^n|xZ^4dd6H{RYcbFSJZLd-PWW)OM1vWN=sO!S?s)M9!{G>$wMecf>qV$E=t(6(lV*?A^se^9tPNaBHLNfydhU zrIW|;tq(JXVFTzctcRV8>*QP`UD9Q=7_rD0=?2W=^iMxb=-mvvk3hZKMWCpvt3bVD z1PT(S96E)RiU?FQoY6Yp_LO})i~4ET*a=MIvfaLs0+wSP!WDQ^a|CFmfr5w$!fo1Bf@&YbOX!>?Vw2 zIM8On-V~h3e#=0cnR^-NVJ6RwgH6~UEgko$C^M{DluPh6#qZ#V7zeQQ7%M>g+thAH zANy-g=<&8GCp5iBm0qg4d9M7Hcn3pi){7-H2X^_G`udc87%Js3@*_)&jj|7uc6_-C zxU1LWo}pbc*WyAmLywJplayRFg9lnK#JA*8c@u_Q?>7};%%VAVy25=3s8&Kk6fr%u z`4({^WCY?{&!CN#2w1)`LFkGMh}Ikl|CT0q5OQt$j)z21yf-!8IHhM2ZS!bOoZdKY;i$Lu2-RV=@K5r zO`SJI_7(6OW`%OF-FD7_eXXb44?`f3t_|JAl0bbQ$W&0-m)wC5WVIj}xfaed_!Yxs z)J6$uYLxYl>9v<)0O_~9Lc;`DgDO5Y#8)`fiw#9y% zufZFrsdd|GU4d#_ZH*sTUfoL+=A_xQC*bx6Y?ZDWkGo=EFHw@8eUa+nDQW38TcmV; zVfKXK)YL^aHFaH0MUkBB;t9?!I+K%I(p6_ro!W(TcGuFy*;8|-6+%AJWN}HCj^^a+ z7A?}Q1?6IWRMEyUN2cv~^WL$`6F*$x6SZ!?-&N(dRn$}=hT_XbHOrfxy}PY=&WPmS zoN>J((5S*)Syf%LaFM6hTUURJ&mU-5yku$PGLb!gLQZbp#QaH57ooVSAnWMz3fyXu;S@QN554i>;{W5#=FNMJh3w^JWn05N|t=Iq8 z!5P~p{nat>l4q8QM>l1qPwcsB;m)kVw=6B%?YaMzqnkAk=_LK6tMrx*(`UL(&*?n< zX9ySt212xK%*q+?lOx`pPfULB%jrWu`Y5mdjBtI==X)#op7veh@wsD$yu@YI($D zccokW#`1{#8e3_#+vgT{ZSXBi&wOsc4?bUau5al4X0fE&6|hy**&1E8B`z;!bDhuT ztqWAwc&o;WhPb6!3wJ!-{lp{QG3E3)v3$$ zpi__OfcWJ6`wKrhIb!RPK)*N6w7h@+;QN{yMelk3@qgHU#i2X5-S_!VAG~#1`I&~- z#FDH>uSs8dd0uN_`^i`CT=nqK8)HLR=XMQxyL?8Um)~%IBciU&tqMMN=o9e?N}}P} z)hjoBu}?tIMvFHe%zpUPn9TS8=n~;spieB!ZqsB5*X1sD z`x@)KZd;W*;J4-ZYARffwz|qnhwv>Bi4OtF=vNbd{78*sANW@>bONglbn&oifsy$u>rnR7JgA)k_m% zu;1qP`7p9K*albh5_`_S_Ll3ezl-HxP4fJ?>cgK1v2o|^Q*P=v{?@l1>^*Ew&alC! zDhkEUrTt#~S=8YZ+1caXoA<<^Yj<>aZM*l%W%oaoaKZJN==->M=E~$dX7un?{4Lb+ z%vTv}*PY3GL5LmB0@u-FnI$(p^4phxd+C|$*ZgR=IM{r{!$ba&;c=uKJ}c(Fvn%h# z`3+MSM%#zP+|zJiju;!W`MOcfn@`RDL&d4g3EBzC`j5A6iLJ(O3sk#p+J?j|b$L8C zHLSgzGncN%@P?X-cSK$9X`dE<@_)W6yTjkN^~pg~?zn!+)bD8j&3ijHE-p<;V2V(u z(uZG8wdaa~$=TCgx2&45W$10Mww${>SkaQw`;C~5{WtUttnR&h$Hn@0&xX5Zm5pCj zlJu9&c}upYz9htBIB`6WcNgB9ad=_b4}49&55V1xleb=H*MIR`H?$!XMW@s-UUBmFYnBc+|&*J zj0HFvHQ35ME^n0$^WR@n=e4CeoWqkFG)}55G2p85k0{P9$jvUvElYKdsI2k2JVR}X z3ozL$Y!ELfm|4g+Lxpho+#W~3y)+;k<#n~SSRRC9f#0v!SGWQ$O~6;@@YI#NJi>t$ z+U=M)b;fXiz*W9TIQ-TAfG^-$fRe(-T8;MAvAJ;Q|LPQlk{!wEP_J<%ZOW=|FXDvD z4?BUwyY@KwZ$G`ve^vTY20yqP&$v_}67V&HU(2=jl#9W;K+>2B+T%3oVujMjdmhSv zm)ugw&^CX>;6r^Mu+#D(kMA6bINxheAN(@1j12jx;*UVHtn98wMWPY{s{Z{DWwXCU zqlG9!9sPydnjHIIjhFgV|2m+Le;}bAUhj~^IbOq&k}>ngLQIoo0%iD;Z)z?cf}HtL zym6>hK9Enj)hx(I$rXcEF(IpE5d6SBIDaYUSkYhhaWY=BzSon4Sg4W$Jf#oCh{s$X zEzVq+EGuk~iV{5p|Eh!KDd$Y%|e^P|h&XZ=yUEFa4(d_fam!i$BlM=;J7tyO49u0 z#?<^?BDrd<{Al!B_mA;9Uh8%Za8h9(19JUkZ96 zc&h*NK(7H`^|uoAW)r;{^i7ag{a+7yxryEc`uC7m{%i%!{aX3+6lm_-I^9#-<3BX< z{|NpG6TKhw|Cs2*pdUtieZKb;w;?`m&?-Jh!9Ndqo!>*$VlA757uA~omt)QqfSw@f zD?$GZ^baKc1-vWJ!iT)5B zp>BQMxcQUZwv8${(2M^C&~m;9rKa%|s7Gd7Oz(L3zH39*^=$6Ws&8 zaedI^-BUO~F9fZ}r>9ti`0=mE6u%L4FB821G}kM|-v@fMiO;!k1bpr#QP_q1g8s9K z9uE5VruK6||J6jJXgraB4al6rV40ro+Nu|>=#KF>Ki!Q}fL_~O+v&m*-L+X^rm>Nj zp6@v)I(#%6X8zs%y+=xwesFeQ@bQY59YDqIzW0Cwp zDPM;9@HHksJ)^##0@F~(-~UKI1NvPAQ_)*M2QLZJb0GUCv`<4l<);JLmpQV1U*K^} zo|%%*eq~{>`B#^eUyS-hgpGMc+70?M@X{r1Gli5n(%V9Rh4E7l`Cprch%|Mnhx8al z07*Y>Y5$Og=Gv$p$`@GZ8!Yr73!RVnsE6&-E%Y!8U1XuZvG_aL;*ZlpkG0S?i@uQ< z8}+b1Sr+|wS?D`0@-JBE@fJGMLg!iZ?Y7XHE%fg!^y?P-V+;MJ#oj>+z0E>zvd}|R zFo2AQ3wfs=(jkkz6&AYHLdRO-U1{M@vDp7_OTK(yk>@;85BoD;5kS(zE#oc91FpJq zUt@h>1TSW_e;noE+A`LPvWW%L#%C9lP0PzG$t^7_%^qKnTP7w{yUQ09H+V~NuU+B} z1aQyg7qt~>dK*UpK8-|uL%=Wm)h<(AMg}YJk!!BY6xFq^^0LU*8Kd;t$o82djoL^h znaRTCD|edIW~PV=x8Gcm%8FETjZ?THMbd=N<*lfzH4CK+pWp05W`?M!HVb45M*+Y6 zBxIzEdS8tRq9BoCsj31O;I&UPpVVZD21u%Vv@HeP*{;B@Xn~mhp?NaJbsSj9=^7`wqCVS zwo{euRAt+#Y&(^0r?Tx#)eMwWy98co043dk9!00>mNQKWBMm4I2sZ%{(MnlQQ`Xaz z^)zKYO?jS16A}67!1W*UINCTqB`v*Dm3PVZYmp7ME0J=B41rOen2ti ziKAw5xD2mF4rYgxS98g+*j*l|^J%OJ3(9l7+5)1;9JfxIqzH#Lrr#4%OVYFw8@gufTkELHL0myOU?R5b1l5gcKfAYhHS0Biq$4lI;9L5g1Dxl zOPmeG-YQW%bz<2>x7Y2%gcy%|C0rvFs0G7O;}x~IV67`hC6|Z{HMkjRqLR1SqSEJf zRfx)RPo3Yb>-4*rUB!M^k*{Vkl!8JZ>MGn?UBd!TjS=;*km@CBaOquEQd0%X?pnV) zz*el9sdroU!zuE7ZZ}x8g+91d2UXH#=+iN$ngZItvJ*Mg%3E-XT)0@zsm`vV25Qvh zYh7@>x;!~0Q(q_bJC9!Y;J60+Q1lZ0Y!y2m_m-r$;T#H#oq#=6(md4i1Ir~=Lyj+=|iL^3h{=dPms>n&;OLa1bbubBz&6zN!v+J#{b)qbT;WJ_#Tw> z&7=$Tvoz&zC0(fBH;~>)8Xwz%noB0j*cBH|Z>Aw=x+DMak=Swx%@CKGX%o=LuM?uu-`(&IBy_6AjG5Or(wK^ zqu?*=vG{&OydQZ*ybtRH){5vL<}-0U<{c6Cg2X$~j`%YnP7=}2VOUe5@4{bm5g){T z1@UenenkZTIbdw25PL|&-U%Y?eMW@6e-m%V_+w3q-i*6QU~IY&KPHaGeHiPv3h@&n z*1hRK`n!O9_~RjF2oWG3`hQJ?{vAZh$}GfB@XHf z8k?0@;(8+dd4#wMag_Kvkp1BkbrX0JF)cM3X{jN?t0B~D*k9rRi8kUqA?%X=U(wMy A`2YX_ diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.sln b/project1/cyassl-3.0.0/ctaocrypt/test/test.sln deleted file mode 100755 index 97b2e8df..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/test.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.ActiveCfg = Debug|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.Build.0 = Debug|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.ActiveCfg = Release|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj b/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj deleted file mode 100755 index 38c5c6be..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/test.vcproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt b/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt deleted file mode 100755 index 954447f9..00000000 --- a/project1/cyassl-3.0.0/ctaocrypt/test/testctaocrypt +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/bash - -# ctaocrypt/test/testctaocrypt - temporary wrapper script for .libs/testctaocrypt -# Generated by libtool (GNU libtool) 2.4.2 -# -# The ctaocrypt/test/testctaocrypt program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/test/test.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "testctaocrypt:ctaocrypt/test/testctaocrypt:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'testctaocrypt' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o b/project1/cyassl-3.0.0/ctaocrypt/test/testsuite_testsuite_test-test.o deleted file mode 100644 index 2b16426b39ae53a4a948f7f0d659d6a96380febd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14932 zcmbtb3w%_?)t^AX1fz)vNR`?J7YrB{l58Fz1_DV4kU&VnLmq}D**svgiMtyh7+xk3 z)+H1zTCmchv{frwT3;zz zIcLt9Gmkr2R^=AtMMXt*7xIY`-9?llfE_>338w~$B3{Ial36pGPbZvY&D=Hn*fi8+ zw;h@oa{r!#ZHrHYx_nVB7@n1ebq3old5D>^gp zy<9OFcuRzi8qALoI1BTMD^$yOIx#UC40ZGVgj>qy?vo93?9qmbLpk;s$Cq-v4n^CI zaxh?z(WU-=7c`j2+at(ROTw&Ei%jKPOyy!zInPucZ7MrVoNrqGDU_=DP(46=`!;oWEL1Q6_BYe(q%lFOpARrNHtl0kBk?=Ci{TU#Pgx}V1YeG z3xpIp6da?+pe@HeoWoy1SuITVYi5fsW=w3CX*g zzlshXS-Is@^trc#C)ey}D3Lz%_vw-S6IU{ZvPCGz8RnK2PEmdLNxWePNzCVRE=x^;JZ*(Vn+G}H$_X$xR+%CX1wf@qt^ zUK-qUs#oap@xfAiT=T(%P~Le2CI$gDA{O+7%b~o_w74Z{aibL#w}cQBv`s#TsD06W z<>RM%hG65|@iqGyCR5a&V;j6i)Se}Qk-SLMY~UKPx=7SCnH+nON)C8C7v9FVhS=C+ zPi&WCpgSF~k34l*XvO(ZuDF0sHXlgPTyDa05UFGiLpGV&V`1D(Msg_kv?+<$iEuEW zw=G`_M%2np;b72vQ!qSO;v$0448DNU{)Wo~HGeRcQ zkQoD+aVfe?4rN}@^5jvJn74g`{|GsPN&3t|C*m;jF~QG6;K2Xch%VY=8#4TCpUya} zK+c3NH>RL2DI?KdM2Wd*p3hK8HHtZn%&bsehven!CL-qJHEq){AETQOok4aYxh`}I z9*y5H6}u{?<-5W2YxXmUrkFNeET*R9K}@v;Psa2cr=5)HH%>blQ*GKs#&p0%V>$rA zsFpEBmsRexPwg_MlvH6WR52};aWgXuEHN#WF*VQCZ;vU1_q=rM$Lpz(Yu*#x zygMOya2nQ@k>EM8^4qa?*s%X3HUImn_dxXEZL#f-RO!PYh_}5?zx5m*bS4~CZExE!}ty7zQ%IZ3oVn*9Y57A z_{p069DUOS>$DN*$$<6OI8{WqJ!gNIqdSJnFwWOT?zO*Vbth> z-m1T9r7i8;*aG(chzvEF7oqo{u_1uy$o4TXUP@KiB&E2a3U1MwG!bLeV;6pxYK9w~ z;xK9owVfm^8Qjx)xcwbEk+Y}MdhWsA9WhVTF)OA`1xX7Hdv~$WybQNF+}bF6;IVdo z>Ev;I>qCrT*Z{f<>tW~OIyu)!mvk8|Ml3Q$x&gB|{nHNQHTV*mslER3Cbiqq z$NriVdc1AQ2~F>DrI)I1nJd2~-oj9t^GhXl0O_~9Lc;`Dhblf@DAR`;N!$JsRK~ZY%gjYC)n9_x=*5fM5j6-4;Fr~QxUOw`%3VxTl@@5bJ$oj*!=43n8!;RJ zjzw1;gi3Y=Dm6!?N;)c4qGy_yN*DS|4-raOu=Mq?*4Kt{P^xTOV*Uq6G}zG6943n* zCM`2hTi=s+?-S!2YCILTC4QT)!5gTlb=zuPfofZAjUQNE-Afeaq}jA5;PwY>m983( zyJBE3QIem1k?P?oY3Vjwq;!5^_JrZo)I~KlbzMzGk(}(}3C=D$lapK0RcBD0+J$s> z*V4t=Q*)*jLO#-DaY>hs=H%-ZEz+)qv~zBQH8s*s=8*;Vo$BNuKre^KhUsb>9WSP{?C+R0$rMGmLKGSV_PUq=AL%=975Ta#sR?dJMk9l`JKKX$!rVst#gS`5)!u1`W z@2ucE+INY^=8iq_VsX{7z0F%k^u6|>k}bCk*(U65i(JQgX10H@d&rOCvKEZmKIU&X zS6moa^{>-s{`|cYJ@<%9EsvP&u5^oESssyJV=Jw8``qI0O}^#nna>Wm^0N)+`-VEU zilx=AfUTm=*66Y=b$KzH>wGqEU7)(gTQycR#4XEOwDYO%A3f|%?lu3JO!4-A{fL>* zJBz>Hr(oTQ_Cu+koP6S6ow`g9I`xttoUG%}J5f2^<^n2}W%e(gvzOSiK^q%h@ z|GOPm9Jy=zeV^U=z-`mY&o;a&mS#P2ZTjlV^I8krPrZECnumto92?3yzh}^!Hn^gf*w^vu8?L+mCRTho$@9mm_iq$p z^RC;c%d)8m2CawhxK9r{T~XF*auF^`n}%o}T@?iqn}Bw9}6D zA8*}KTaDiqsCL`54T)Lm@_1}&SbIBXF58IV4K)?-jJm#rk*8rn_gAjbBre^rx+POCL;qQHV!zdUy`+9=x~UAi}aA_^Nz=3fJF4 z+5ANAxAiW+AN#FIAadjFl5g69JM$yA;*0Q&J^A8%V{^8ML~hX*Cj5xptGnczHto** z$lbd$KXM!If*-M;cjiZK>;`|vLL848Y~>!8x5|b!z+Y46wWT_o!;>2{PO2?2;HvVE zD9$a&%`V9;OLdN@tns=$Lv4u*G2tt05HBd0S;#g+g>d-X9!J2vEFc`^b+xrvB7|e1 z->=tKxB@Osz*pz+)RntD!hu!V?U*=q#&CbYRlZm_{MG(|FW_2;lETJXjrP^Cxp3(J z>J){N9m(lXuW==9%BpWJ;>5}iHG#vp_BiqHi+v>lP$^6q`~lr~I`CJ57<`@JuisjG z%EjPaC}~Uw{pqI)Ix2m&>vD5M)kMA6bIInBZd)ElDoDBJ> z;`c$btnAK1MWPY{s{VZsWwXE0qlG9!9sPydnjHIIjhFgV|29G&fAF9lUe}Psxm?4M zk}(9oy_hD;1j_Iw-_%?*$lqw7T6+|494O@j8I)Vgf_#)*F=!PNvPuUDF%I|I{L44T zivF^XlkuAMZAuctt&##fr4Pl3$6OyR&R&=-D{PR85m40634*_qW#_uVf0(~d=I^9G374$LCoEz-Vk|@LzWflKZ;GY0r^`Ev*gVyI= z5AhY~SOj13dxCd0=v1jM9(19JUkZ96c&h*NL9YW}^|uoARujDz^gPI`{%-`m!bEQY z{aeT@e;x$QJzM$nBxvs4I^9#-=ifK+e-HjgCi)=gf12o{pdUheeZKb;D-jUarT~_a<;RUZwvdl;1Pa9VkQ4 z;9rKa%|s7Gd7Oz(L3x3R9*^>B6Ws&8aedI^-BUO~F9NN{r>9tq`0-a^ir)yjmx25>r#rHm7worVbK$z*yIYjtUr~}Fb{Xb9Y33oH z&5~wpZpNlMRLZ{(It$5ljiec?u}J=)l%Iq7@CQtOdPaSB0@F~(zvq#D8uZ%;rlPlj z4qg(br-P>LIa0na@FXV7Ow_YI`;mpg<*z15FF}1G!o)lx?FRiRc;E%Y!8U1XuZ zw)i{Q;*ZlpkG0S?i@uQ<8}+b1Sr+|wTj;wi^3Pl7@fJGMLg!iZ?X}QbE%a|J^q(#C zhZg#Ei@n1Zdb@?*VxfnqU;r5p7xGR$q(c^at1NV@g^snvyVAm+VzK|fmV9~7BF}lG z9`6u<0VT>m6)c4C61DqtOS#lWU>-X z&QLN+I7JDkDB%<(oT7wNRPRz$tJINFPpWF3nxblyo>Zr*Q3_Mj#UyV{ps*rM;GI#A z4_`M+dHnpw-Ft0$ZM|xvY^N&Qsmiuf*>)=1PG#Gfsu?J$b_u-F07|+6J&I1%EoYh% zMjB8a5N-k@qLs3qrmUwa>uJh*n({o2CL;3Dfh#}calq$sdqqAn75P5J-KZ6%P1c$% zrl|;|sR*R851LwkIRACcx@+mGZ|SOU>8fw(s&DDITF|m7UBw|?8A?}%(v`CrRA|fz z-BdQFi0nO!MZUUn{L#diCytsW;WE4yIhY+%Ud<)P5_fr^&Zn^^EG*CUY72-WbKE*< zlJ?b9Hijo2Oqix2dzH$zsU|b}3^mzFEsHdy(I!hq1Day2)TE|*Ej8;K&9(3{+wGTr z8M3whDps3J>69{L2;y3bE^#&#d#gn8)QM#i-Cnm36Jk8>k#KEPpcV{AjaSs-Qnjue zm0Th+)Zk{MiAvsJi%Or{RUsmbqxzWHAd9K zLaLXj!9{mjNlg_jyKDXK09&zYrrvGY52wiUx!qvV7W&{;9aKq|p-;!0Y6@uo%1-1| zD{sLma^W&Pr#ice8mLj1uP#qc$<&uf>^nGuie5h!;#y!d4skqJ#g4}vCFuuo<|I7< z`>CXP&Wil3lZrx3BXXAyBmm`udEc_tC(>4ijm6nlv{ z&o3w9BbL97r2X|k+TTQk{a*nY|DELHJim*GbN+E628Z_uu{a=f5OEp6dw|&9LfD8n z?++v5BQ=MJ^Zry~KOt@fM&E&W5ZA*FF@#?)5b@z24PR)t7m#-Q5b@FBAmSq|lZcPW zV&c`fDTp+^EXvB(k#sO((G7-sEL4+MI z5qEMMfYJC!d6l>ccOgV1R~%wYJrjY{QwWT;2{DT}2zN5X>x5WEvSE>^w?@osWUE^EogUb}kTy;r<7?Lp#?KZ@~Q&5q72! zlc0|XJIjHzb3YMwo+rZ22_o!VAi~ZB%zUo)Sk0v6|?>Pg95^g?NUTjCny! z5#mFlQ;08!S;(hLp|1hoh!P(o25^TW@k1i)b;B4Fi-5E{6Bs)~hy}!%n6KnFVZ2Gt z65=P|tP1*x8tGl3om?-dkCZkJQ_U#kfl*zY#wgmw1fzB|@Af zy$tgOb18bM5H}H_w*VMhDnyl}Hvy^lKGxra?@8AGOo(SmV^Mrv(q9q%_*TbSLCgWh zPJ@4>eTWb7Rv~^#gq^2=u|@Dt(&vG+6OB0?y;g|9#5TkW$a)trHXC;6DqD%@krEY1sRS2z#FrVej9>H5mUZf%oIy5g3~;#1Dw0 zareb~ta~>SH{%``NPicS4}Uzw3?TyKL;o*{(7%%i{Vxz(v3^VZJ8_i|{0~;dG$Q<4 zLtKe@FL6*`(74$2O58|S@h2S~IL=VSkp G^nU=>G$W$` diff --git a/project1/cyassl-3.0.0/cyassl-config b/project1/cyassl-3.0.0/cyassl-config deleted file mode 100644 index 614f7fbf..00000000 --- a/project1/cyassl-3.0.0/cyassl-config +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh - -package="cyassl" -version="3.0.0" -libs="-lcyassl" - -prefix="/usr/local" -exec_prefix="${prefix}" -bindir="${exec_prefix}/bin" -sbindir="${exec_prefix}/sbin" -libexecdir="${exec_prefix}/libexec" -datadir="${datarootdir}" -sysconfdir="${prefix}/etc" -sharedstatedir="${prefix}/com" -localstatedir="${prefix}/var" -libdir="${exec_prefix}/lib" -infodir="${datarootdir}/info" -mandir="${datarootdir}/man" -includedir="${prefix}/include" -target="" -host="i686-pc-linux-gnu" -build="i686-pc-linux-gnu" - -if test "$#" -eq 0; then - cat < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/cyassl.sln b/project1/cyassl-3.0.0/cyassl.sln deleted file mode 100755 index fde689fa..00000000 --- a/project1/cyassl-3.0.0/cyassl.sln +++ /dev/null @@ -1,74 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cyassl", "cyassl.vcproj", "{73973223-5EE8-41CA-8E88-1D60E89A237B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsuite", "testsuite\testsuite.vcproj", "{611E8971-46E0-4D0A-B5A1-632C3B00CB80}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sslSniffer", "sslSniffer\sslSniffer.vcproj", "{34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoserver", "examples\echoserver\echoserver.vcproj", "{07D97C48-E08F-4E34-9F67-3064039FF2CB}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoclient", "examples\echoclient\echoclient.vcproj", "{8362A816-C5DC-4E22-B5C5-9E6806387073}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "examples\client\client.vcproj", "{3ADE9549-582D-4D8E-9826-B172197A7959}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "examples\server\server.vcproj", "{E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}" - ProjectSection(ProjectDependencies) = postProject - {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.ActiveCfg = Debug|Win32 - {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.Build.0 = Debug|Win32 - {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.ActiveCfg = Release|Win32 - {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.Build.0 = Release|Win32 - {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|Win32.ActiveCfg = Debug|Win32 - {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|Win32.Build.0 = Debug|Win32 - {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.ActiveCfg = Release|Win32 - {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.Build.0 = Release|Win32 - {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|Win32.ActiveCfg = Debug|Win32 - {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|Win32.Build.0 = Debug|Win32 - {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.ActiveCfg = Release|Win32 - {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.Build.0 = Release|Win32 - {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|Win32.ActiveCfg = Debug|Win32 - {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|Win32.Build.0 = Debug|Win32 - {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.ActiveCfg = Release|Win32 - {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.Build.0 = Release|Win32 - {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|Win32.ActiveCfg = Debug|Win32 - {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|Win32.Build.0 = Debug|Win32 - {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.ActiveCfg = Release|Win32 - {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.Build.0 = Release|Win32 - {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|Win32.ActiveCfg = Debug|Win32 - {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|Win32.Build.0 = Debug|Win32 - {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.ActiveCfg = Release|Win32 - {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.Build.0 = Release|Win32 - {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|Win32.Build.0 = Debug|Win32 - {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.ActiveCfg = Release|Win32 - {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/cyassl.vcproj b/project1/cyassl-3.0.0/cyassl.vcproj deleted file mode 100755 index 7005e3aa..00000000 --- a/project1/cyassl-3.0.0/cyassl.vcproj +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/cyassl/callbacks.h b/project1/cyassl-3.0.0/cyassl/callbacks.h deleted file mode 100644 index 3dacc572..00000000 --- a/project1/cyassl-3.0.0/cyassl/callbacks.h +++ /dev/null @@ -1,80 +0,0 @@ -/* callbacks.h - * - * Copyright (C) 2013 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_CALLBACKS_H -#define CYASSL_CALLBACKS_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { /* CALLBACK CONTSTANTS */ - MAX_PACKETNAME_SZ = 24, - MAX_CIPHERNAME_SZ = 24, - MAX_TIMEOUT_NAME_SZ = 24, - MAX_PACKETS_HANDSHAKE = 14, /* 12 for client auth plus 2 alerts */ - MAX_VALUE_SZ = 128, /* all handshake packets but Cert should - fit here */ -}; - - -typedef struct handShakeInfo_st { - char cipherName[MAX_CIPHERNAME_SZ + 1]; /* negotiated cipher */ - char packetNames[MAX_PACKETS_HANDSHAKE][MAX_PACKETNAME_SZ + 1]; - /* SSL packet names */ - int numberPackets; /* actual # of packets */ - int negotiationError; /* cipher/parameter err */ -} HandShakeInfo; - - -typedef struct timeval Timeval; - - -typedef struct packetInfo_st { - char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */ - Timeval timestamp; /* when it occured */ - unsigned char value[MAX_VALUE_SZ]; /* if fits, it's here */ - unsigned char* bufferValue; /* otherwise here (non 0) */ - int valueSz; /* sz of value or buffer */ -} PacketInfo; - - -typedef struct timeoutInfo_st { - char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; /* timeout Name */ - int flags; /* for future use */ - int numberPackets; /* actual # of packets */ - PacketInfo packets[MAX_PACKETS_HANDSHAKE]; /* list of all packets */ - Timeval timeoutValue; /* timer that caused it */ -} TimeoutInfo; - - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_CALLBACKS_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/certs_test.h b/project1/cyassl-3.0.0/cyassl/certs_test.h deleted file mode 100644 index 5d10679a..00000000 --- a/project1/cyassl-3.0.0/cyassl/certs_test.h +++ /dev/null @@ -1,800 +0,0 @@ -/* certs_test.h */ - -#ifndef CYASSL_CERTS_TEST_H -#define CYASSL_CERTS_TEST_H - -#ifdef USE_CERT_BUFFERS_1024 - -/* ./certs/1024/client-key.der, 1024-bit */ -const unsigned char client_key_der_1024[] = -{ - 0x30, 0x82, 0x02, 0x5C, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, - 0x00, 0xBC, 0x73, 0x0E, 0xA8, 0x49, 0xF3, 0x74, 0xA2, 0xA9, - 0xEF, 0x18, 0xA5, 0xDA, 0x55, 0x99, 0x21, 0xF9, 0xC8, 0xEC, - 0xB3, 0x6D, 0x48, 0xE5, 0x35, 0x35, 0x75, 0x77, 0x37, 0xEC, - 0xD1, 0x61, 0x90, 0x5F, 0x3E, 0xD9, 0xE4, 0xD5, 0xDF, 0x94, - 0xCA, 0xC1, 0xA9, 0xD7, 0x19, 0xDA, 0x86, 0xC9, 0xE8, 0x4D, - 0xC4, 0x61, 0x36, 0x82, 0xFE, 0xAB, 0xAD, 0x7E, 0x77, 0x25, - 0xBB, 0x8D, 0x11, 0xA5, 0xBC, 0x62, 0x3A, 0xA8, 0x38, 0xCC, - 0x39, 0xA2, 0x04, 0x66, 0xB4, 0xF7, 0xF7, 0xF3, 0xAA, 0xDA, - 0x4D, 0x02, 0x0E, 0xBB, 0x5E, 0x8D, 0x69, 0x48, 0xDC, 0x77, - 0xC9, 0x28, 0x0E, 0x22, 0xE9, 0x6B, 0xA4, 0x26, 0xBA, 0x4C, - 0xE8, 0xC1, 0xFD, 0x4A, 0x6F, 0x2B, 0x1F, 0xEF, 0x8A, 0xAE, - 0xF6, 0x90, 0x62, 0xE5, 0x64, 0x1E, 0xEB, 0x2B, 0x3C, 0x67, - 0xC8, 0xDC, 0x27, 0x00, 0xF6, 0x91, 0x68, 0x65, 0xA9, 0x02, - 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x13, 0x97, 0xEA, - 0xE8, 0x38, 0x78, 0x25, 0xA2, 0x5C, 0x04, 0xCE, 0x0D, 0x40, - 0x7C, 0x31, 0xE5, 0xC4, 0x70, 0xCD, 0x9B, 0x82, 0x3B, 0x58, - 0x09, 0x86, 0x3B, 0x66, 0x5F, 0xDC, 0x31, 0x90, 0xF1, 0x4F, - 0xD5, 0xDB, 0x15, 0xDD, 0xDE, 0xD7, 0x3B, 0x95, 0x93, 0x31, - 0x18, 0x31, 0x0E, 0x5E, 0xA3, 0xD6, 0xA2, 0x1A, 0x71, 0x6E, - 0x81, 0x48, 0x1C, 0x4B, 0xCF, 0xDB, 0x8E, 0x7A, 0x86, 0x61, - 0x32, 0xDC, 0xFB, 0x55, 0xC1, 0x16, 0x6D, 0x27, 0x92, 0x24, - 0x45, 0x8B, 0xF1, 0xB8, 0x48, 0xB1, 0x4B, 0x1D, 0xAC, 0xDE, - 0xDA, 0xDD, 0x8E, 0x2F, 0xC2, 0x91, 0xFB, 0xA5, 0xA9, 0x6E, - 0xF8, 0x3A, 0x6A, 0xF1, 0xFD, 0x50, 0x18, 0xEF, 0x9F, 0xE7, - 0xC3, 0xCA, 0x78, 0xEA, 0x56, 0xD3, 0xD3, 0x72, 0x5B, 0x96, - 0xDD, 0x4E, 0x06, 0x4E, 0x3A, 0xC3, 0xD9, 0xBE, 0x72, 0xB6, - 0x65, 0x07, 0x07, 0x4C, 0x01, 0x02, 0x41, 0x00, 0xFA, 0x47, - 0xD4, 0x7A, 0x7C, 0x92, 0x3C, 0x55, 0xEF, 0x81, 0xF0, 0x41, - 0x30, 0x2D, 0xA3, 0xCF, 0x8F, 0x1C, 0xE6, 0x87, 0x27, 0x05, - 0x70, 0x0D, 0xDF, 0x98, 0x35, 0xD6, 0xF1, 0x8B, 0x38, 0x2F, - 0x24, 0xB5, 0xD0, 0x84, 0xB6, 0x79, 0x4F, 0x71, 0x29, 0x94, - 0x5A, 0xF0, 0x64, 0x6A, 0xAC, 0xE7, 0x72, 0xC6, 0xED, 0x4D, - 0x59, 0x98, 0x3E, 0x67, 0x3A, 0xF3, 0x74, 0x2C, 0xF9, 0x61, - 0x17, 0x69, 0x02, 0x41, 0x00, 0xC0, 0xC1, 0x82, 0x0D, 0x0C, - 0xEB, 0xC6, 0x2F, 0xDC, 0x92, 0xF9, 0x9D, 0x82, 0x1A, 0x31, - 0xE9, 0xE9, 0xF7, 0x4B, 0xF2, 0x82, 0x87, 0x1C, 0xEE, 0x16, - 0x6A, 0xD1, 0x1D, 0x18, 0x82, 0x70, 0xF3, 0xC0, 0xB6, 0x2F, - 0xF6, 0xF3, 0xF7, 0x1D, 0xF1, 0x86, 0x23, 0xC8, 0x4E, 0xEB, - 0x8F, 0x56, 0x8E, 0x8F, 0xF5, 0xBF, 0xF1, 0xF7, 0x2B, 0xB5, - 0xCC, 0x3D, 0xC6, 0x57, 0x39, 0x0C, 0x1B, 0x54, 0x41, 0x02, - 0x41, 0x00, 0x9D, 0x7E, 0x05, 0xDE, 0xED, 0xF4, 0xB7, 0xB2, - 0xFB, 0xFC, 0x30, 0x4B, 0x55, 0x1D, 0xE3, 0x2F, 0x01, 0x47, - 0x96, 0x69, 0x05, 0xCD, 0x0E, 0x2E, 0x2C, 0xBD, 0x83, 0x63, - 0xB6, 0xAB, 0x7C, 0xB7, 0x6D, 0xCA, 0x5B, 0x64, 0xA7, 0xCE, - 0xBE, 0x86, 0xDF, 0x3B, 0x53, 0xDE, 0x61, 0xD2, 0x1E, 0xEB, - 0xA5, 0xF6, 0x37, 0xED, 0xAC, 0xAB, 0x78, 0xD9, 0x4C, 0xE7, - 0x55, 0xFB, 0xD7, 0x11, 0x99, 0xC1, 0x02, 0x40, 0x18, 0x98, - 0x18, 0x29, 0xE6, 0x1E, 0x27, 0x39, 0x70, 0x21, 0x68, 0xAC, - 0x0A, 0x2F, 0xA1, 0x72, 0xC1, 0x21, 0x86, 0x95, 0x38, 0xC6, - 0x58, 0x90, 0xA0, 0x57, 0x9C, 0xBA, 0xE3, 0xA7, 0xB1, 0x15, - 0xC8, 0xDE, 0xF6, 0x1B, 0xC2, 0x61, 0x23, 0x76, 0xEF, 0xB0, - 0x9D, 0x1C, 0x44, 0xBE, 0x13, 0x43, 0x39, 0x67, 0x17, 0xC8, - 0x9D, 0xCA, 0xFB, 0xF5, 0x45, 0x64, 0x8B, 0x38, 0x82, 0x2C, - 0xF2, 0x81, 0x02, 0x40, 0x39, 0x89, 0xE5, 0x9C, 0x19, 0x55, - 0x30, 0xBA, 0xB7, 0x48, 0x8C, 0x48, 0x14, 0x0E, 0xF4, 0x9F, - 0x7E, 0x77, 0x97, 0x43, 0xE1, 0xB4, 0x19, 0x35, 0x31, 0x23, - 0x75, 0x9C, 0x3B, 0x44, 0xAD, 0x69, 0x12, 0x56, 0xEE, 0x00, - 0x61, 0x64, 0x16, 0x66, 0xD3, 0x7C, 0x74, 0x2B, 0x15, 0xB4, - 0xA2, 0xFE, 0xBF, 0x08, 0x6B, 0x1A, 0x5D, 0x3F, 0x90, 0x12, - 0xB1, 0x05, 0x86, 0x31, 0x29, 0xDB, 0xD9, 0xE2 -}; -const int sizeof_client_key_der_1024 = sizeof(client_key_der_1024) ; - -/* ./certs/1024/client-cert.der, 1024-bit */ -const unsigned char client_cert_der_1024[] = -{ - 0x30, 0x82, 0x02, 0xEC, 0x30, 0x82, 0x02, 0x55, 0xA0, 0x03, - 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x8D, 0x0D, 0xAC, 0xFE, - 0xC6, 0x98, 0x45, 0x26, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, - 0x81, 0x8E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, - 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, - 0x03, 0x55, 0x04, 0x08, 0x0C, 0x06, 0x4F, 0x72, 0x65, 0x67, - 0x6F, 0x6E, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, - 0x07, 0x0C, 0x08, 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, - 0x64, 0x31, 0x0E, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, - 0x0C, 0x05, 0x79, 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, - 0x12, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x0B, 0x50, 0x72, - 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, - 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0D, - 0x77, 0x77, 0x77, 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, - 0x63, 0x6F, 0x6D, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, - 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, - 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, - 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x33, - 0x30, 0x31, 0x31, 0x38, 0x32, 0x31, 0x34, 0x32, 0x34, 0x39, - 0x5A, 0x17, 0x0D, 0x31, 0x35, 0x31, 0x30, 0x31, 0x35, 0x32, - 0x31, 0x34, 0x32, 0x34, 0x39, 0x5A, 0x30, 0x81, 0x8E, 0x31, - 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, - 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, - 0x08, 0x0C, 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, - 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x08, - 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, - 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x05, 0x79, - 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x04, 0x0B, 0x0C, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, - 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, - 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0D, 0x77, 0x77, 0x77, - 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, - 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, - 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, - 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, - 0x6D, 0x30, 0x81, 0x9F, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, - 0x81, 0x8D, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, - 0xBC, 0x73, 0x0E, 0xA8, 0x49, 0xF3, 0x74, 0xA2, 0xA9, 0xEF, - 0x18, 0xA5, 0xDA, 0x55, 0x99, 0x21, 0xF9, 0xC8, 0xEC, 0xB3, - 0x6D, 0x48, 0xE5, 0x35, 0x35, 0x75, 0x77, 0x37, 0xEC, 0xD1, - 0x61, 0x90, 0x5F, 0x3E, 0xD9, 0xE4, 0xD5, 0xDF, 0x94, 0xCA, - 0xC1, 0xA9, 0xD7, 0x19, 0xDA, 0x86, 0xC9, 0xE8, 0x4D, 0xC4, - 0x61, 0x36, 0x82, 0xFE, 0xAB, 0xAD, 0x7E, 0x77, 0x25, 0xBB, - 0x8D, 0x11, 0xA5, 0xBC, 0x62, 0x3A, 0xA8, 0x38, 0xCC, 0x39, - 0xA2, 0x04, 0x66, 0xB4, 0xF7, 0xF7, 0xF3, 0xAA, 0xDA, 0x4D, - 0x02, 0x0E, 0xBB, 0x5E, 0x8D, 0x69, 0x48, 0xDC, 0x77, 0xC9, - 0x28, 0x0E, 0x22, 0xE9, 0x6B, 0xA4, 0x26, 0xBA, 0x4C, 0xE8, - 0xC1, 0xFD, 0x4A, 0x6F, 0x2B, 0x1F, 0xEF, 0x8A, 0xAE, 0xF6, - 0x90, 0x62, 0xE5, 0x64, 0x1E, 0xEB, 0x2B, 0x3C, 0x67, 0xC8, - 0xDC, 0x27, 0x00, 0xF6, 0x91, 0x68, 0x65, 0xA9, 0x02, 0x03, - 0x01, 0x00, 0x01, 0xA3, 0x50, 0x30, 0x4E, 0x30, 0x1D, 0x06, - 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x81, 0x69, - 0x0F, 0xF8, 0xDF, 0xDD, 0xCF, 0x34, 0x29, 0xD5, 0x67, 0x75, - 0x71, 0x85, 0xC7, 0x75, 0x10, 0x69, 0x59, 0xEC, 0x30, 0x1F, - 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, - 0x14, 0x81, 0x69, 0x0F, 0xF8, 0xDF, 0xDD, 0xCF, 0x34, 0x29, - 0xD5, 0x67, 0x75, 0x71, 0x85, 0xC7, 0x75, 0x10, 0x69, 0x59, - 0xEC, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, - 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0D, 0x06, 0x09, 0x2A, - 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, - 0x03, 0x81, 0x81, 0x00, 0x72, 0x66, 0x0F, 0x6A, 0xA1, 0x85, - 0x95, 0x06, 0xE6, 0x87, 0x1A, 0xED, 0x2B, 0xDA, 0xED, 0x84, - 0x90, 0x89, 0xA6, 0x31, 0x4D, 0x60, 0xF2, 0x7B, 0x63, 0x0C, - 0xDC, 0x9B, 0x44, 0x4C, 0xD6, 0x62, 0x41, 0x24, 0x74, 0x30, - 0x70, 0x4E, 0x07, 0x10, 0x05, 0x12, 0x5E, 0x14, 0xB3, 0xDD, - 0xCF, 0x58, 0x27, 0x93, 0xCF, 0xAA, 0x4F, 0x85, 0x2C, 0x35, - 0x0E, 0xFF, 0x5B, 0xA8, 0x6B, 0xB5, 0x95, 0x32, 0xD5, 0xCC, - 0x73, 0x68, 0x5B, 0x1B, 0xC4, 0xF8, 0x89, 0x5E, 0x3D, 0xF8, - 0x02, 0x39, 0x32, 0x7D, 0x06, 0xA4, 0x32, 0xE9, 0xB3, 0xEF, - 0x62, 0xA0, 0x43, 0x5D, 0x4F, 0xFB, 0xCE, 0x3D, 0x08, 0x33, - 0xAF, 0x3D, 0x7F, 0x12, 0xCB, 0x8A, 0x5A, 0xC2, 0x63, 0xDB, - 0x3E, 0xDD, 0xEA, 0x5B, 0x67, 0x10, 0x49, 0x9F, 0x5B, 0x96, - 0x1B, 0x4E, 0x5D, 0xBC, 0x4E, 0x9A, 0x7C, 0x1F, 0xAB, 0x56, - 0x47, 0x4A -}; -const int sizeof_client_cert_der_1024 = sizeof(client_cert_der_1024) ; - -/* ./certs/1024/dh1024.der, 1024-bit */ -const unsigned char dh_key_der_1024[] = -{ - 0x30, 0x81, 0x87, 0x02, 0x81, 0x81, 0x00, 0xA4, 0xD2, 0xB8, - 0x6E, 0x78, 0xF5, 0xD9, 0xED, 0x2D, 0x7C, 0xDD, 0xB6, 0x16, - 0x86, 0x5A, 0x4B, 0x05, 0x76, 0x90, 0xDD, 0x66, 0x61, 0xB9, - 0x6D, 0x52, 0xA7, 0x1C, 0xAF, 0x62, 0xC6, 0x69, 0x47, 0x7B, - 0x39, 0xF2, 0xFB, 0x94, 0xEC, 0xBC, 0x79, 0xFF, 0x24, 0x5E, - 0xEF, 0x79, 0xBB, 0x59, 0xB2, 0xFC, 0xCA, 0x07, 0xD6, 0xF4, - 0xE9, 0x34, 0xF7, 0xE8, 0x38, 0xE7, 0xD7, 0x33, 0x44, 0x1D, - 0xA3, 0x64, 0x76, 0x1A, 0x84, 0x97, 0x54, 0x74, 0x40, 0x84, - 0x1F, 0x15, 0xFE, 0x7C, 0x25, 0x2A, 0x2B, 0x25, 0xFD, 0x9E, - 0xC1, 0x89, 0x33, 0x8C, 0x39, 0x25, 0x2B, 0x40, 0xE6, 0xCD, - 0xF8, 0xA8, 0xA1, 0x8A, 0x53, 0xC6, 0x47, 0xB2, 0xA0, 0xD7, - 0x8F, 0xEB, 0x2E, 0x60, 0x0A, 0x0D, 0x4B, 0xF8, 0xB4, 0x94, - 0x8C, 0x63, 0x0A, 0xAD, 0xC7, 0x10, 0xEA, 0xC7, 0xA1, 0xB9, - 0x9D, 0xF2, 0xA8, 0x37, 0x73, 0x02, 0x01, 0x02 -}; -const int sizeof_dh_key_der_1024 = sizeof(dh_key_der_1024) ; - -/* ./certs/1024/dsa1024.der, 1024-bit */ -const unsigned char dsa_key_der_1024[] = -{ - 0x30, 0x82, 0x01, 0xBC, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, - 0x00, 0xF7, 0x4B, 0xF9, 0xBB, 0x15, 0x98, 0xEB, 0xDD, 0xDE, - 0x1E, 0x4E, 0x71, 0x88, 0x85, 0xF2, 0xB7, 0xBA, 0xE2, 0x4A, - 0xDA, 0x76, 0x40, 0xCD, 0x69, 0x48, 0x9E, 0x83, 0x7C, 0x11, - 0xF7, 0x65, 0x31, 0x78, 0xF5, 0x25, 0x2D, 0xF7, 0xB7, 0xF8, - 0x52, 0x3F, 0xBE, 0xD8, 0xB6, 0xC5, 0xFE, 0x18, 0x15, 0x5B, - 0xB9, 0xD5, 0x92, 0x86, 0xBC, 0xB2, 0x17, 0x7C, 0xD8, 0xB0, - 0xBE, 0xA0, 0x7C, 0xF2, 0xD5, 0x73, 0x7A, 0x58, 0x8F, 0x8D, - 0xE5, 0x4A, 0x00, 0x99, 0x83, 0x4A, 0xC0, 0x9E, 0x16, 0x09, - 0xA1, 0x10, 0x34, 0xD5, 0x19, 0xBB, 0x63, 0xE3, 0xDD, 0x83, - 0x74, 0x7F, 0x10, 0xCA, 0x73, 0x75, 0xEE, 0x31, 0x4A, 0xDD, - 0x9F, 0xE0, 0x02, 0x6A, 0x9D, 0xEE, 0xB2, 0x4B, 0xA7, 0x6B, - 0x2A, 0x6C, 0xC7, 0x86, 0x77, 0xE8, 0x04, 0x15, 0xDC, 0x92, - 0xB4, 0x7A, 0x29, 0x1F, 0x4E, 0x83, 0x63, 0x85, 0x55, 0x02, - 0x15, 0x00, 0xD2, 0x05, 0xE4, 0x73, 0xFB, 0xC1, 0x99, 0xC5, - 0xDC, 0x68, 0xA4, 0x8D, 0x92, 0x27, 0x3D, 0xE2, 0x52, 0x5F, - 0x89, 0x8B, 0x02, 0x81, 0x81, 0x00, 0xAA, 0x21, 0x02, 0x09, - 0x43, 0x6E, 0xFB, 0xA2, 0x54, 0x14, 0x85, 0x0A, 0xF4, 0x28, - 0x7C, 0xCB, 0xCC, 0xDB, 0xF5, 0x1E, 0xA2, 0x18, 0xA9, 0x21, - 0xDE, 0x88, 0x88, 0x33, 0x8C, 0x2E, 0xEB, 0x8D, 0xA3, 0xF0, - 0x1D, 0xC8, 0x8F, 0xF6, 0x7E, 0xF8, 0xCF, 0x12, 0xF5, 0xB4, - 0xA1, 0x11, 0x6F, 0x0C, 0xD4, 0xF0, 0x06, 0xAD, 0xC4, 0xFC, - 0x14, 0x45, 0xC7, 0x94, 0x15, 0xBC, 0x19, 0x4B, 0xAE, 0xEF, - 0x93, 0x6A, 0x4F, 0xCC, 0x14, 0xD8, 0x47, 0x8B, 0x39, 0x66, - 0x87, 0x02, 0xD4, 0x28, 0x0A, 0xB8, 0xEE, 0x09, 0x37, 0xF4, - 0x00, 0xA0, 0x04, 0xA7, 0x79, 0xA7, 0xD2, 0x3C, 0xF7, 0x34, - 0x43, 0x56, 0x8E, 0xD0, 0x7C, 0xC2, 0xD8, 0x4D, 0x0F, 0x89, - 0xED, 0x14, 0xC1, 0x2C, 0x9C, 0x4C, 0x19, 0x9B, 0x9E, 0xDC, - 0x53, 0x09, 0x9F, 0xDF, 0x2D, 0xF0, 0x0C, 0x27, 0x54, 0x3A, - 0x77, 0x14, 0x2D, 0xDE, 0x02, 0x81, 0x81, 0x00, 0xE8, 0x1F, - 0x7C, 0xB7, 0xC0, 0x54, 0x51, 0xA7, 0x28, 0x2D, 0x58, 0x7C, - 0xDE, 0xD4, 0x5C, 0xDD, 0xD5, 0x76, 0x84, 0x3C, 0x36, 0x20, - 0xC0, 0xC3, 0x25, 0xD7, 0x3A, 0x38, 0xE1, 0x54, 0xC8, 0xFD, - 0x40, 0x68, 0x1A, 0x21, 0x54, 0x26, 0x39, 0x14, 0xBF, 0xF6, - 0xA3, 0x9C, 0x5E, 0xD9, 0x2B, 0xF7, 0xC9, 0x25, 0xBA, 0x00, - 0x09, 0xCB, 0x7F, 0x0C, 0x4A, 0x24, 0xFD, 0x15, 0x16, 0x15, - 0x48, 0xCD, 0x0B, 0x52, 0x44, 0x40, 0x7B, 0x90, 0x63, 0x2B, - 0x90, 0x22, 0xC5, 0x18, 0x05, 0x80, 0x53, 0xAF, 0x83, 0x1F, - 0x54, 0xE2, 0xB0, 0xA2, 0x0B, 0x5A, 0x92, 0x24, 0xE1, 0x62, - 0x28, 0x3F, 0xB7, 0xCA, 0xB9, 0x89, 0xD6, 0xA0, 0xB7, 0xAD, - 0xAE, 0x05, 0xE1, 0xC1, 0x59, 0x40, 0xED, 0x4A, 0x1B, 0x68, - 0xA7, 0x7B, 0xFB, 0xC3, 0x20, 0x81, 0xEF, 0x4B, 0xF3, 0x69, - 0x91, 0xB0, 0xCE, 0x3A, 0xB0, 0x38, 0x02, 0x14, 0x25, 0x38, - 0x3B, 0xA1, 0x19, 0x75, 0xDF, 0x9B, 0xF5, 0x72, 0x53, 0x4F, - 0x39, 0xE1, 0x1C, 0xEC, 0x13, 0x84, 0x82, 0x18 -}; -const int sizeof_dsa_key_der_1024 = sizeof(dsa_key_der_1024) ; - -/* ./certs/1024/rsa1024.der, 1024-bit */ -const unsigned char rsa_key_der_1024[] = -{ - 0x30, 0x82, 0x02, 0x5D, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, - 0x00, 0xBE, 0x70, 0x70, 0xB8, 0x04, 0x18, 0xE5, 0x28, 0xFE, - 0x66, 0xD8, 0x90, 0x88, 0xE0, 0xF1, 0xB7, 0xC3, 0xD0, 0xD2, - 0x3E, 0xE6, 0x4B, 0x94, 0x74, 0xB0, 0xFF, 0xB0, 0xF7, 0x63, - 0xA5, 0xAB, 0x7E, 0xAF, 0xB6, 0x2B, 0xB7, 0x38, 0x16, 0x1A, - 0x50, 0xBF, 0xF1, 0xCA, 0x87, 0x3A, 0xD5, 0xB0, 0xDA, 0xF8, - 0x43, 0x7A, 0x15, 0xB9, 0x7E, 0xEA, 0x2A, 0x80, 0xD2, 0x51, - 0xB0, 0x35, 0xAF, 0x07, 0xF3, 0xF2, 0x5D, 0x24, 0x3A, 0x4B, - 0x87, 0x56, 0x48, 0x1B, 0x3C, 0x24, 0x9A, 0xDA, 0x70, 0x80, - 0xBD, 0x3C, 0x8B, 0x03, 0x4A, 0x0C, 0x83, 0x71, 0xDE, 0xE3, - 0x03, 0x70, 0xA2, 0xB7, 0x60, 0x09, 0x1B, 0x5E, 0xC7, 0x3D, - 0xA0, 0x64, 0x60, 0xE3, 0xA9, 0x06, 0x8D, 0xD3, 0xFF, 0x42, - 0xBB, 0x0A, 0x94, 0x27, 0x2D, 0x57, 0x42, 0x0D, 0xB0, 0x2D, - 0xE0, 0xBA, 0x18, 0x25, 0x60, 0x92, 0x11, 0x92, 0xF3, 0x02, - 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x0E, 0xEE, 0x1D, - 0xC8, 0x2F, 0x7A, 0x0C, 0x2D, 0x44, 0x94, 0xA7, 0x91, 0xDD, - 0x49, 0x55, 0x6A, 0x04, 0xCE, 0x10, 0x4D, 0xA2, 0x1C, 0x76, - 0xCD, 0x17, 0x3B, 0x54, 0x92, 0x70, 0x9B, 0x82, 0x70, 0x72, - 0x32, 0x24, 0x07, 0x3F, 0x3C, 0x6C, 0x5F, 0xBC, 0x4C, 0xA6, - 0x86, 0x27, 0x94, 0xAD, 0x42, 0xDD, 0x87, 0xDC, 0xC0, 0x6B, - 0x44, 0x89, 0xF3, 0x3F, 0x1A, 0x3E, 0x11, 0x44, 0x84, 0x2E, - 0x69, 0x4C, 0xBB, 0x4A, 0x71, 0x1A, 0xBB, 0x9A, 0x52, 0x3C, - 0x6B, 0xDE, 0xBC, 0xB2, 0x7C, 0x51, 0xEF, 0x4F, 0x8F, 0x3A, - 0xDC, 0x50, 0x04, 0x4E, 0xB6, 0x31, 0x66, 0xA8, 0x8E, 0x06, - 0x3B, 0x51, 0xA9, 0xC1, 0x8A, 0xCB, 0xC4, 0x81, 0xCA, 0x2D, - 0x69, 0xEC, 0x88, 0xFC, 0x33, 0x88, 0xD1, 0xD4, 0x29, 0x47, - 0x87, 0x37, 0xF9, 0x6A, 0x22, 0x69, 0xB9, 0xC9, 0xFE, 0xEB, - 0x8C, 0xC5, 0x21, 0x41, 0x71, 0x02, 0x41, 0x00, 0xFD, 0x17, - 0x98, 0x42, 0x54, 0x1C, 0x23, 0xF8, 0xD7, 0x5D, 0xEF, 0x49, - 0x4F, 0xAF, 0xD9, 0x35, 0x6F, 0x08, 0xC6, 0xC7, 0x40, 0x5C, - 0x7E, 0x58, 0x86, 0xC2, 0xB2, 0x16, 0x39, 0x24, 0xC5, 0x06, - 0xB0, 0x3D, 0xAF, 0x02, 0xD2, 0x87, 0x77, 0xD2, 0x76, 0xBA, - 0xE3, 0x59, 0x60, 0x42, 0xF1, 0x16, 0xEF, 0x33, 0x0B, 0xF2, - 0x0B, 0xBA, 0x99, 0xCC, 0xB6, 0x4C, 0x46, 0x3F, 0x33, 0xE4, - 0xD4, 0x67, 0x02, 0x41, 0x00, 0xC0, 0xA0, 0x91, 0x6D, 0xFE, - 0x28, 0xE0, 0x81, 0x5A, 0x15, 0xA7, 0xC9, 0xA8, 0x98, 0xC6, - 0x0A, 0xAB, 0x00, 0xC5, 0x40, 0xC9, 0x21, 0xBB, 0xB2, 0x33, - 0x5A, 0xA7, 0xCB, 0x6E, 0xB8, 0x08, 0x56, 0x4A, 0x76, 0x28, - 0xE8, 0x6D, 0xBD, 0xF5, 0x26, 0x7B, 0xBF, 0xC5, 0x46, 0x45, - 0x0D, 0xEC, 0x7D, 0xEE, 0x82, 0xD6, 0xCA, 0x5F, 0x3D, 0x6E, - 0xCC, 0x94, 0x73, 0xCD, 0xCE, 0x86, 0x6E, 0x95, 0x95, 0x02, - 0x40, 0x38, 0xFD, 0x28, 0x1E, 0xBF, 0x5B, 0xBA, 0xC9, 0xDC, - 0x8C, 0xDD, 0x45, 0xAF, 0xB8, 0xD3, 0xFB, 0x11, 0x2E, 0x73, - 0xBC, 0x08, 0x05, 0x0B, 0xBA, 0x19, 0x56, 0x1B, 0xCD, 0x9F, - 0x3E, 0x65, 0x53, 0x15, 0x3A, 0x3E, 0x7F, 0x2F, 0x32, 0xAB, - 0xCB, 0x6B, 0x4A, 0xB7, 0xC8, 0xB7, 0x41, 0x3B, 0x92, 0x43, - 0x78, 0x46, 0x17, 0x51, 0x86, 0xC9, 0xFC, 0xEB, 0x8B, 0x8F, - 0x41, 0xCA, 0x08, 0x9B, 0xBF, 0x02, 0x41, 0x00, 0xAD, 0x9B, - 0x89, 0xB6, 0xF2, 0x8C, 0x70, 0xDA, 0xE4, 0x10, 0x04, 0x6B, - 0x11, 0x92, 0xAF, 0x5A, 0xCA, 0x08, 0x25, 0xBF, 0x60, 0x07, - 0x11, 0x1D, 0x68, 0x7F, 0x5A, 0x1F, 0x55, 0x28, 0x74, 0x0B, - 0x21, 0x8D, 0x21, 0x0D, 0x6A, 0x6A, 0xFB, 0xD9, 0xB5, 0x4A, - 0x7F, 0x47, 0xF7, 0xD0, 0xB6, 0xC6, 0x41, 0x02, 0x97, 0x07, - 0x49, 0x93, 0x1A, 0x9B, 0x33, 0x68, 0xB3, 0xA2, 0x61, 0x32, - 0xA5, 0x89, 0x02, 0x41, 0x00, 0x8F, 0xEF, 0xAD, 0xB5, 0xB0, - 0xB0, 0x7E, 0x86, 0x03, 0x43, 0x93, 0x6E, 0xDD, 0x3C, 0x2D, - 0x9B, 0x6A, 0x55, 0xFF, 0x6F, 0x3E, 0x70, 0x2A, 0xD4, 0xBF, - 0x1F, 0x8C, 0x93, 0x60, 0x9E, 0x6D, 0x2F, 0x18, 0x6C, 0x11, - 0x36, 0x98, 0x3F, 0x10, 0x78, 0xE8, 0x3E, 0x8F, 0xFE, 0x55, - 0xB9, 0x9E, 0xD5, 0x5B, 0x2E, 0x87, 0x1C, 0x58, 0xD0, 0x37, - 0x89, 0x96, 0xEC, 0x48, 0x54, 0xF5, 0x9F, 0x0F, 0xB3 -}; -const int sizeof_rsa_key_der_1024 = sizeof(rsa_key_der_1024) ; - -#elif defined(USE_CERT_BUFFERS_2048) - -/* ./certs/client-key.der, 2048-bit */ -const unsigned char client_key_der_2048[] = -{ - 0x30, 0x82, 0x04, 0xA4, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, - 0x01, 0x00, 0xC3, 0x03, 0xD1, 0x2B, 0xFE, 0x39, 0xA4, 0x32, - 0x45, 0x3B, 0x53, 0xC8, 0x84, 0x2B, 0x2A, 0x7C, 0x74, 0x9A, - 0xBD, 0xAA, 0x2A, 0x52, 0x07, 0x47, 0xD6, 0xA6, 0x36, 0xB2, - 0x07, 0x32, 0x8E, 0xD0, 0xBA, 0x69, 0x7B, 0xC6, 0xC3, 0x44, - 0x9E, 0xD4, 0x81, 0x48, 0xFD, 0x2D, 0x68, 0xA2, 0x8B, 0x67, - 0xBB, 0xA1, 0x75, 0xC8, 0x36, 0x2C, 0x4A, 0xD2, 0x1B, 0xF7, - 0x8B, 0xBA, 0xCF, 0x0D, 0xF9, 0xEF, 0xEC, 0xF1, 0x81, 0x1E, - 0x7B, 0x9B, 0x03, 0x47, 0x9A, 0xBF, 0x65, 0xCC, 0x7F, 0x65, - 0x24, 0x69, 0xA6, 0xE8, 0x14, 0x89, 0x5B, 0xE4, 0x34, 0xF7, - 0xC5, 0xB0, 0x14, 0x93, 0xF5, 0x67, 0x7B, 0x3A, 0x7A, 0x78, - 0xE1, 0x01, 0x56, 0x56, 0x91, 0xA6, 0x13, 0x42, 0x8D, 0xD2, - 0x3C, 0x40, 0x9C, 0x4C, 0xEF, 0xD1, 0x86, 0xDF, 0x37, 0x51, - 0x1B, 0x0C, 0xA1, 0x3B, 0xF5, 0xF1, 0xA3, 0x4A, 0x35, 0xE4, - 0xE1, 0xCE, 0x96, 0xDF, 0x1B, 0x7E, 0xBF, 0x4E, 0x97, 0xD0, - 0x10, 0xE8, 0xA8, 0x08, 0x30, 0x81, 0xAF, 0x20, 0x0B, 0x43, - 0x14, 0xC5, 0x74, 0x67, 0xB4, 0x32, 0x82, 0x6F, 0x8D, 0x86, - 0xC2, 0x88, 0x40, 0x99, 0x36, 0x83, 0xBA, 0x1E, 0x40, 0x72, - 0x22, 0x17, 0xD7, 0x52, 0x65, 0x24, 0x73, 0xB0, 0xCE, 0xEF, - 0x19, 0xCD, 0xAE, 0xFF, 0x78, 0x6C, 0x7B, 0xC0, 0x12, 0x03, - 0xD4, 0x4E, 0x72, 0x0D, 0x50, 0x6D, 0x3B, 0xA3, 0x3B, 0xA3, - 0x99, 0x5E, 0x9D, 0xC8, 0xD9, 0x0C, 0x85, 0xB3, 0xD9, 0x8A, - 0xD9, 0x54, 0x26, 0xDB, 0x6D, 0xFA, 0xAC, 0xBB, 0xFF, 0x25, - 0x4C, 0xC4, 0xD1, 0x79, 0xF4, 0x71, 0xD3, 0x86, 0x40, 0x18, - 0x13, 0xB0, 0x63, 0xB5, 0x72, 0x4E, 0x30, 0xC4, 0x97, 0x84, - 0x86, 0x2D, 0x56, 0x2F, 0xD7, 0x15, 0xF7, 0x7F, 0xC0, 0xAE, - 0xF5, 0xFC, 0x5B, 0xE5, 0xFB, 0xA1, 0xBA, 0xD3, 0x02, 0x03, - 0x01, 0x00, 0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xA2, 0xE6, - 0xD8, 0x5F, 0x10, 0x71, 0x64, 0x08, 0x9E, 0x2E, 0x6D, 0xD1, - 0x6D, 0x1E, 0x85, 0xD2, 0x0A, 0xB1, 0x8C, 0x47, 0xCE, 0x2C, - 0x51, 0x6A, 0xA0, 0x12, 0x9E, 0x53, 0xDE, 0x91, 0x4C, 0x1D, - 0x6D, 0xEA, 0x59, 0x7B, 0xF2, 0x77, 0xAA, 0xD9, 0xC6, 0xD9, - 0x8A, 0xAB, 0xD8, 0xE1, 0x16, 0xE4, 0x63, 0x26, 0xFF, 0xB5, - 0x6C, 0x13, 0x59, 0xB8, 0xE3, 0xA5, 0xC8, 0x72, 0x17, 0x2E, - 0x0C, 0x9F, 0x6F, 0xE5, 0x59, 0x3F, 0x76, 0x6F, 0x49, 0xB1, - 0x11, 0xC2, 0x5A, 0x2E, 0x16, 0x29, 0x0D, 0xDE, 0xB7, 0x8E, - 0xDC, 0x40, 0xD5, 0xA2, 0xEE, 0xE0, 0x1E, 0xA1, 0xF4, 0xBE, - 0x97, 0xDB, 0x86, 0x63, 0x96, 0x14, 0xCD, 0x98, 0x09, 0x60, - 0x2D, 0x30, 0x76, 0x9C, 0x3C, 0xCD, 0xE6, 0x88, 0xEE, 0x47, - 0x92, 0x79, 0x0B, 0x5A, 0x00, 0xE2, 0x5E, 0x5F, 0x11, 0x7C, - 0x7D, 0xF9, 0x08, 0xB7, 0x20, 0x06, 0x89, 0x2A, 0x5D, 0xFD, - 0x00, 0xAB, 0x22, 0xE1, 0xF0, 0xB3, 0xBC, 0x24, 0xA9, 0x5E, - 0x26, 0x0E, 0x1F, 0x00, 0x2D, 0xFE, 0x21, 0x9A, 0x53, 0x5B, - 0x6D, 0xD3, 0x2B, 0xAB, 0x94, 0x82, 0x68, 0x43, 0x36, 0xD8, - 0xF6, 0x2F, 0xC6, 0x22, 0xFC, 0xB5, 0x41, 0x5D, 0x0D, 0x33, - 0x60, 0xEA, 0xA4, 0x7D, 0x7E, 0xE8, 0x4B, 0x55, 0x91, 0x56, - 0xD3, 0x5C, 0x57, 0x8F, 0x1F, 0x94, 0x17, 0x2F, 0xAA, 0xDE, - 0xE9, 0x9E, 0xA8, 0xF4, 0xCF, 0x8A, 0x4C, 0x8E, 0xA0, 0xE4, - 0x56, 0x73, 0xB2, 0xCF, 0x4F, 0x86, 0xC5, 0x69, 0x3C, 0xF3, - 0x24, 0x20, 0x8B, 0x5C, 0x96, 0x0C, 0xFA, 0x6B, 0x12, 0x3B, - 0x9A, 0x67, 0xC1, 0xDF, 0xC6, 0x96, 0xB2, 0xA5, 0xD5, 0x92, - 0x0D, 0x9B, 0x09, 0x42, 0x68, 0x24, 0x10, 0x45, 0xD4, 0x50, - 0xE4, 0x17, 0x39, 0x48, 0xD0, 0x35, 0x8B, 0x94, 0x6D, 0x11, - 0xDE, 0x8F, 0xCA, 0x59, 0x02, 0x81, 0x81, 0x00, 0xEA, 0x24, - 0xA7, 0xF9, 0x69, 0x33, 0xE9, 0x71, 0xDC, 0x52, 0x7D, 0x88, - 0x21, 0x28, 0x2F, 0x49, 0xDE, 0xBA, 0x72, 0x16, 0xE9, 0xCC, - 0x47, 0x7A, 0x88, 0x0D, 0x94, 0x57, 0x84, 0x58, 0x16, 0x3A, - 0x81, 0xB0, 0x3F, 0xA2, 0xCF, 0xA6, 0x6C, 0x1E, 0xB0, 0x06, - 0x29, 0x00, 0x8F, 0xE7, 0x77, 0x76, 0xAC, 0xDB, 0xCA, 0xC7, - 0xD9, 0x5E, 0x9B, 0x3F, 0x26, 0x90, 0x52, 0xAE, 0xFC, 0x38, - 0x90, 0x00, 0x14, 0xBB, 0xB4, 0x0F, 0x58, 0x94, 0xE7, 0x2F, - 0x6A, 0x7E, 0x1C, 0x4F, 0x41, 0x21, 0xD4, 0x31, 0x59, 0x1F, - 0x4E, 0x8A, 0x1A, 0x8D, 0xA7, 0x57, 0x6C, 0x22, 0xD8, 0xE5, - 0xF4, 0x7E, 0x32, 0xA6, 0x10, 0xCB, 0x64, 0xA5, 0x55, 0x03, - 0x87, 0xA6, 0x27, 0x05, 0x8C, 0xC3, 0xD7, 0xB6, 0x27, 0xB2, - 0x4D, 0xBA, 0x30, 0xDA, 0x47, 0x8F, 0x54, 0xD3, 0x3D, 0x8B, - 0x84, 0x8D, 0x94, 0x98, 0x58, 0xA5, 0x02, 0x81, 0x81, 0x00, - 0xD5, 0x38, 0x1B, 0xC3, 0x8F, 0xC5, 0x93, 0x0C, 0x47, 0x0B, - 0x6F, 0x35, 0x92, 0xC5, 0xB0, 0x8D, 0x46, 0xC8, 0x92, 0x18, - 0x8F, 0xF5, 0x80, 0x0A, 0xF7, 0xEF, 0xA1, 0xFE, 0x80, 0xB9, - 0xB5, 0x2A, 0xBA, 0xCA, 0x18, 0xB0, 0x5D, 0xA5, 0x07, 0xD0, - 0x93, 0x8D, 0xD8, 0x9C, 0x04, 0x1C, 0xD4, 0x62, 0x8E, 0xA6, - 0x26, 0x81, 0x01, 0xFF, 0xCE, 0x8A, 0x2A, 0x63, 0x34, 0x35, - 0x40, 0xAA, 0x6D, 0x80, 0xDE, 0x89, 0x23, 0x6A, 0x57, 0x4D, - 0x9E, 0x6E, 0xAD, 0x93, 0x4E, 0x56, 0x90, 0x0B, 0x6D, 0x9D, - 0x73, 0x8B, 0x0C, 0xAE, 0x27, 0x3D, 0xDE, 0x4E, 0xF0, 0xAA, - 0xC5, 0x6C, 0x78, 0x67, 0x6C, 0x94, 0x52, 0x9C, 0x37, 0x67, - 0x6C, 0x2D, 0xEF, 0xBB, 0xAF, 0xDF, 0xA6, 0x90, 0x3C, 0xC4, - 0x47, 0xCF, 0x8D, 0x96, 0x9E, 0x98, 0xA9, 0xB4, 0x9F, 0xC5, - 0xA6, 0x50, 0xDC, 0xB3, 0xF0, 0xFB, 0x74, 0x17, 0x02, 0x81, - 0x80, 0x5E, 0x83, 0x09, 0x62, 0xBD, 0xBA, 0x7C, 0xA2, 0xBF, - 0x42, 0x74, 0xF5, 0x7C, 0x1C, 0xD2, 0x69, 0xC9, 0x04, 0x0D, - 0x85, 0x7E, 0x3E, 0x3D, 0x24, 0x12, 0xC3, 0x18, 0x7B, 0xF3, - 0x29, 0xF3, 0x5F, 0x0E, 0x76, 0x6C, 0x59, 0x75, 0xE4, 0x41, - 0x84, 0x69, 0x9D, 0x32, 0xF3, 0xCD, 0x22, 0xAB, 0xB0, 0x35, - 0xBA, 0x4A, 0xB2, 0x3C, 0xE5, 0xD9, 0x58, 0xB6, 0x62, 0x4F, - 0x5D, 0xDE, 0xE5, 0x9E, 0x0A, 0xCA, 0x53, 0xB2, 0x2C, 0xF7, - 0x9E, 0xB3, 0x6B, 0x0A, 0x5B, 0x79, 0x65, 0xEC, 0x6E, 0x91, - 0x4E, 0x92, 0x20, 0xF6, 0xFC, 0xFC, 0x16, 0xED, 0xD3, 0x76, - 0x0C, 0xE2, 0xEC, 0x7F, 0xB2, 0x69, 0x13, 0x6B, 0x78, 0x0E, - 0x5A, 0x46, 0x64, 0xB4, 0x5E, 0xB7, 0x25, 0xA0, 0x5A, 0x75, - 0x3A, 0x4B, 0xEF, 0xC7, 0x3C, 0x3E, 0xF7, 0xFD, 0x26, 0xB8, - 0x20, 0xC4, 0x99, 0x0A, 0x9A, 0x73, 0xBE, 0xC3, 0x19, 0x02, - 0x81, 0x81, 0x00, 0xBA, 0x44, 0x93, 0x14, 0xAC, 0x34, 0x19, - 0x3B, 0x5F, 0x91, 0x60, 0xAC, 0xF7, 0xB4, 0xD6, 0x81, 0x05, - 0x36, 0x51, 0x53, 0x3D, 0xE8, 0x65, 0xDC, 0xAF, 0x2E, 0xDC, - 0x61, 0x3E, 0xC9, 0x7D, 0xB8, 0x7F, 0x87, 0xF0, 0x3B, 0x9B, - 0x03, 0x82, 0x29, 0x37, 0xCE, 0x72, 0x4E, 0x11, 0xD5, 0xB1, - 0xC1, 0x0C, 0x07, 0xA0, 0x99, 0x91, 0x4A, 0x8D, 0x7F, 0xEC, - 0x79, 0xCF, 0xF1, 0x39, 0xB5, 0xE9, 0x85, 0xEC, 0x62, 0xF7, - 0xDA, 0x7D, 0xBC, 0x64, 0x4D, 0x22, 0x3C, 0x0E, 0xF2, 0xD6, - 0x51, 0xF5, 0x87, 0xD8, 0x99, 0xC0, 0x11, 0x20, 0x5D, 0x0F, - 0x29, 0xFD, 0x5B, 0xE2, 0xAE, 0xD9, 0x1C, 0xD9, 0x21, 0x56, - 0x6D, 0xFC, 0x84, 0xD0, 0x5F, 0xED, 0x10, 0x15, 0x1C, 0x18, - 0x21, 0xE7, 0xC4, 0x3D, 0x4B, 0xD7, 0xD0, 0x9E, 0x6A, 0x95, - 0xCF, 0x22, 0xC9, 0x03, 0x7B, 0x9E, 0xE3, 0x60, 0x01, 0xFC, - 0x2F, 0x02, 0x81, 0x80, 0x11, 0xD0, 0x4B, 0xCF, 0x1B, 0x67, - 0xB9, 0x9F, 0x10, 0x75, 0x47, 0x86, 0x65, 0xAE, 0x31, 0xC2, - 0xC6, 0x30, 0xAC, 0x59, 0x06, 0x50, 0xD9, 0x0F, 0xB5, 0x70, - 0x06, 0xF7, 0xF0, 0xD3, 0xC8, 0x62, 0x7C, 0xA8, 0xDA, 0x6E, - 0xF6, 0x21, 0x3F, 0xD3, 0x7F, 0x5F, 0xEA, 0x8A, 0xAB, 0x3F, - 0xD9, 0x2A, 0x5E, 0xF3, 0x51, 0xD2, 0xC2, 0x30, 0x37, 0xE3, - 0x2D, 0xA3, 0x75, 0x0D, 0x1E, 0x4D, 0x21, 0x34, 0xD5, 0x57, - 0x70, 0x5C, 0x89, 0xBF, 0x72, 0xEC, 0x4A, 0x6E, 0x68, 0xD5, - 0xCD, 0x18, 0x74, 0x33, 0x4E, 0x8C, 0x3A, 0x45, 0x8F, 0xE6, - 0x96, 0x40, 0xEB, 0x63, 0xF9, 0x19, 0x86, 0x3A, 0x51, 0xDD, - 0x89, 0x4B, 0xB0, 0xF3, 0xF9, 0x9F, 0x5D, 0x28, 0x95, 0x38, - 0xBE, 0x35, 0xAB, 0xCA, 0x5C, 0xE7, 0x93, 0x53, 0x34, 0xA1, - 0x45, 0x5D, 0x13, 0x39, 0x65, 0x42, 0x46, 0xA1, 0x9F, 0xCD, - 0xF5, 0xBF -}; -const int sizeof_client_key_der_2048 = sizeof(client_key_der_2048) ; - -/* ./certs/client-cert.der, 2048-bit */ -const unsigned char client_cert_der_2048[] = -{ - 0x30, 0x82, 0x04, 0x98, 0x30, 0x82, 0x03, 0x80, 0xA0, 0x03, - 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x87, 0x4A, 0x75, 0xBE, - 0x91, 0x66, 0xD8, 0x3D, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, - 0x81, 0x8E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, - 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, - 0x03, 0x55, 0x04, 0x08, 0x13, 0x06, 0x4F, 0x72, 0x65, 0x67, - 0x6F, 0x6E, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, - 0x07, 0x13, 0x08, 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, - 0x64, 0x31, 0x0E, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, - 0x13, 0x05, 0x79, 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, - 0x12, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0B, 0x50, 0x72, - 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, - 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0D, - 0x77, 0x77, 0x77, 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, - 0x63, 0x6F, 0x6D, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, - 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, - 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, - 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x31, - 0x31, 0x30, 0x32, 0x34, 0x31, 0x38, 0x32, 0x31, 0x35, 0x35, - 0x5A, 0x17, 0x0D, 0x31, 0x34, 0x30, 0x37, 0x32, 0x30, 0x31, - 0x38, 0x32, 0x31, 0x35, 0x35, 0x5A, 0x30, 0x81, 0x8E, 0x31, - 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, - 0x55, 0x53, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, - 0x08, 0x13, 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, - 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, - 0x50, 0x6F, 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, - 0x30, 0x0C, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x05, 0x79, - 0x61, 0x53, 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x04, 0x0B, 0x13, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, - 0x61, 0x6D, 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, - 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0D, 0x77, 0x77, 0x77, - 0x2E, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, - 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, - 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, - 0x6F, 0x40, 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, - 0x6D, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, - 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, - 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, - 0x82, 0x01, 0x01, 0x00, 0xC3, 0x03, 0xD1, 0x2B, 0xFE, 0x39, - 0xA4, 0x32, 0x45, 0x3B, 0x53, 0xC8, 0x84, 0x2B, 0x2A, 0x7C, - 0x74, 0x9A, 0xBD, 0xAA, 0x2A, 0x52, 0x07, 0x47, 0xD6, 0xA6, - 0x36, 0xB2, 0x07, 0x32, 0x8E, 0xD0, 0xBA, 0x69, 0x7B, 0xC6, - 0xC3, 0x44, 0x9E, 0xD4, 0x81, 0x48, 0xFD, 0x2D, 0x68, 0xA2, - 0x8B, 0x67, 0xBB, 0xA1, 0x75, 0xC8, 0x36, 0x2C, 0x4A, 0xD2, - 0x1B, 0xF7, 0x8B, 0xBA, 0xCF, 0x0D, 0xF9, 0xEF, 0xEC, 0xF1, - 0x81, 0x1E, 0x7B, 0x9B, 0x03, 0x47, 0x9A, 0xBF, 0x65, 0xCC, - 0x7F, 0x65, 0x24, 0x69, 0xA6, 0xE8, 0x14, 0x89, 0x5B, 0xE4, - 0x34, 0xF7, 0xC5, 0xB0, 0x14, 0x93, 0xF5, 0x67, 0x7B, 0x3A, - 0x7A, 0x78, 0xE1, 0x01, 0x56, 0x56, 0x91, 0xA6, 0x13, 0x42, - 0x8D, 0xD2, 0x3C, 0x40, 0x9C, 0x4C, 0xEF, 0xD1, 0x86, 0xDF, - 0x37, 0x51, 0x1B, 0x0C, 0xA1, 0x3B, 0xF5, 0xF1, 0xA3, 0x4A, - 0x35, 0xE4, 0xE1, 0xCE, 0x96, 0xDF, 0x1B, 0x7E, 0xBF, 0x4E, - 0x97, 0xD0, 0x10, 0xE8, 0xA8, 0x08, 0x30, 0x81, 0xAF, 0x20, - 0x0B, 0x43, 0x14, 0xC5, 0x74, 0x67, 0xB4, 0x32, 0x82, 0x6F, - 0x8D, 0x86, 0xC2, 0x88, 0x40, 0x99, 0x36, 0x83, 0xBA, 0x1E, - 0x40, 0x72, 0x22, 0x17, 0xD7, 0x52, 0x65, 0x24, 0x73, 0xB0, - 0xCE, 0xEF, 0x19, 0xCD, 0xAE, 0xFF, 0x78, 0x6C, 0x7B, 0xC0, - 0x12, 0x03, 0xD4, 0x4E, 0x72, 0x0D, 0x50, 0x6D, 0x3B, 0xA3, - 0x3B, 0xA3, 0x99, 0x5E, 0x9D, 0xC8, 0xD9, 0x0C, 0x85, 0xB3, - 0xD9, 0x8A, 0xD9, 0x54, 0x26, 0xDB, 0x6D, 0xFA, 0xAC, 0xBB, - 0xFF, 0x25, 0x4C, 0xC4, 0xD1, 0x79, 0xF4, 0x71, 0xD3, 0x86, - 0x40, 0x18, 0x13, 0xB0, 0x63, 0xB5, 0x72, 0x4E, 0x30, 0xC4, - 0x97, 0x84, 0x86, 0x2D, 0x56, 0x2F, 0xD7, 0x15, 0xF7, 0x7F, - 0xC0, 0xAE, 0xF5, 0xFC, 0x5B, 0xE5, 0xFB, 0xA1, 0xBA, 0xD3, - 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x81, 0xF6, 0x30, 0x81, - 0xF3, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, - 0x04, 0x14, 0x33, 0xD8, 0x45, 0x66, 0xD7, 0x68, 0x87, 0x18, - 0x7E, 0x54, 0x0D, 0x70, 0x27, 0x91, 0xC7, 0x26, 0xD7, 0x85, - 0x65, 0xC0, 0x30, 0x81, 0xC3, 0x06, 0x03, 0x55, 0x1D, 0x23, - 0x04, 0x81, 0xBB, 0x30, 0x81, 0xB8, 0x80, 0x14, 0x33, 0xD8, - 0x45, 0x66, 0xD7, 0x68, 0x87, 0x18, 0x7E, 0x54, 0x0D, 0x70, - 0x27, 0x91, 0xC7, 0x26, 0xD7, 0x85, 0x65, 0xC0, 0xA1, 0x81, - 0x94, 0xA4, 0x81, 0x91, 0x30, 0x81, 0x8E, 0x31, 0x0B, 0x30, - 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, - 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, - 0x06, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E, 0x31, 0x11, 0x30, - 0x0F, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, 0x50, 0x6F, - 0x72, 0x74, 0x6C, 0x61, 0x6E, 0x64, 0x31, 0x0E, 0x30, 0x0C, - 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x05, 0x79, 0x61, 0x53, - 0x53, 0x4C, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, - 0x0B, 0x13, 0x0B, 0x50, 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, - 0x6D, 0x69, 0x6E, 0x67, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0D, 0x77, 0x77, 0x77, 0x2E, 0x79, - 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1D, - 0x30, 0x1B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, - 0x01, 0x09, 0x01, 0x16, 0x0E, 0x69, 0x6E, 0x66, 0x6F, 0x40, - 0x79, 0x61, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x82, - 0x09, 0x00, 0x87, 0x4A, 0x75, 0xBE, 0x91, 0x66, 0xD8, 0x3D, - 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, - 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, - 0x82, 0x01, 0x01, 0x00, 0x1C, 0x7C, 0x42, 0x81, 0x29, 0x9E, - 0x21, 0xCF, 0xD0, 0xD8, 0xC1, 0x54, 0x6F, 0xCC, 0xAE, 0x14, - 0x09, 0x38, 0xFF, 0x68, 0x98, 0x9A, 0x95, 0x53, 0x76, 0x18, - 0x7B, 0xE6, 0x30, 0x76, 0xEC, 0x28, 0x0D, 0x75, 0xA7, 0xDE, - 0xE0, 0xCD, 0x8E, 0xD5, 0x55, 0x23, 0x6A, 0x47, 0x2B, 0x4E, - 0x8D, 0xFC, 0x7D, 0x06, 0xA3, 0xD8, 0x0F, 0xAD, 0x5E, 0xD6, - 0x04, 0xC9, 0x00, 0x33, 0xFB, 0x77, 0x27, 0xD3, 0xB5, 0x03, - 0xB3, 0x7B, 0x21, 0x74, 0x31, 0x0B, 0x4A, 0xAF, 0x2D, 0x1A, - 0xB3, 0x93, 0x8E, 0xCC, 0xF3, 0x5F, 0x3D, 0x90, 0x3F, 0xCC, - 0xE3, 0x55, 0x19, 0x91, 0x7B, 0x78, 0x24, 0x2E, 0x4A, 0x09, - 0xBB, 0x18, 0x4E, 0x61, 0x2D, 0x9C, 0xC6, 0x0A, 0xA0, 0x34, - 0x91, 0x88, 0x70, 0x6B, 0x3B, 0x48, 0x47, 0xBC, 0x79, 0x94, - 0xA2, 0xA0, 0x4D, 0x32, 0x47, 0x54, 0xC2, 0xA3, 0xDC, 0x2E, - 0xD2, 0x51, 0x4C, 0x29, 0x39, 0x11, 0xFF, 0xE2, 0x15, 0x5E, - 0x58, 0x97, 0x36, 0xF6, 0xE9, 0x06, 0x06, 0x86, 0x0E, 0x8D, - 0x9D, 0x95, 0x03, 0x72, 0xB2, 0x8B, 0x19, 0x7C, 0xE9, 0x14, - 0x6E, 0xA1, 0x88, 0x73, 0x68, 0x58, 0x6D, 0x71, 0x5E, 0xC2, - 0xD5, 0xD3, 0x13, 0xD2, 0x5F, 0xDE, 0xEA, 0x03, 0xBE, 0xE2, - 0x00, 0x40, 0xE5, 0xCE, 0xFD, 0xE6, 0x92, 0x31, 0x57, 0xC3, - 0xEB, 0xBB, 0x66, 0xAC, 0xCB, 0x2F, 0x1A, 0xFA, 0xE0, 0x62, - 0xA2, 0x47, 0xF4, 0x93, 0x43, 0x2A, 0x4B, 0x6C, 0x5E, 0x0A, - 0x2F, 0xF9, 0xE7, 0xE6, 0x4A, 0x63, 0x86, 0xB0, 0xAC, 0x2A, - 0xA1, 0xEB, 0xB4, 0x5B, 0x67, 0xCD, 0x32, 0xE4, 0xB6, 0x11, - 0x4B, 0x9A, 0x72, 0x66, 0x0D, 0xA2, 0x4A, 0x76, 0x8F, 0xFE, - 0x22, 0xBC, 0x83, 0xFD, 0xDB, 0xB7, 0xD5, 0xA9, 0xEE, 0x05, - 0xC9, 0xB1, 0x71, 0x7E, 0x1B, 0x2B, 0xE1, 0xE3, 0xAF, 0xC0 - -}; -const int sizeof_client_cert_der_2048 = sizeof(client_cert_der_2048) ; - -/* ./certs/dh2048.der, 2048-bit */ -const unsigned char dh_key_der_2048[] = -{ - 0x30, 0x82, 0x01, 0x08, 0x02, 0x82, 0x01, 0x01, 0x00, 0xB0, - 0xA1, 0x08, 0x06, 0x9C, 0x08, 0x13, 0xBA, 0x59, 0x06, 0x3C, - 0xBC, 0x30, 0xD5, 0xF5, 0x00, 0xC1, 0x4F, 0x44, 0xA7, 0xD6, - 0xEF, 0x4A, 0xC6, 0x25, 0x27, 0x1C, 0xE8, 0xD2, 0x96, 0x53, - 0x0A, 0x5C, 0x91, 0xDD, 0xA2, 0xC2, 0x94, 0x84, 0xBF, 0x7D, - 0xB2, 0x44, 0x9F, 0x9B, 0xD2, 0xC1, 0x8A, 0xC5, 0xBE, 0x72, - 0x5C, 0xA7, 0xE7, 0x91, 0xE6, 0xD4, 0x9F, 0x73, 0x07, 0x85, - 0x5B, 0x66, 0x48, 0xC7, 0x70, 0xFA, 0xB4, 0xEE, 0x02, 0xC9, - 0x3D, 0x9A, 0x4A, 0xDA, 0x3D, 0xC1, 0x46, 0x3E, 0x19, 0x69, - 0xD1, 0x17, 0x46, 0x07, 0xA3, 0x4D, 0x9F, 0x2B, 0x96, 0x17, - 0x39, 0x6D, 0x30, 0x8D, 0x2A, 0xF3, 0x94, 0xD3, 0x75, 0xCF, - 0xA0, 0x75, 0xE6, 0xF2, 0x92, 0x1F, 0x1A, 0x70, 0x05, 0xAA, - 0x04, 0x83, 0x57, 0x30, 0xFB, 0xDA, 0x76, 0x93, 0x38, 0x50, - 0xE8, 0x27, 0xFD, 0x63, 0xEE, 0x3C, 0xE5, 0xB7, 0xC8, 0x09, - 0xAE, 0x6F, 0x50, 0x35, 0x8E, 0x84, 0xCE, 0x4A, 0x00, 0xE9, - 0x12, 0x7E, 0x5A, 0x31, 0xD7, 0x33, 0xFC, 0x21, 0x13, 0x76, - 0xCC, 0x16, 0x30, 0xDB, 0x0C, 0xFC, 0xC5, 0x62, 0xA7, 0x35, - 0xB8, 0xEF, 0xB7, 0xB0, 0xAC, 0xC0, 0x36, 0xF6, 0xD9, 0xC9, - 0x46, 0x48, 0xF9, 0x40, 0x90, 0x00, 0x2B, 0x1B, 0xAA, 0x6C, - 0xE3, 0x1A, 0xC3, 0x0B, 0x03, 0x9E, 0x1B, 0xC2, 0x46, 0xE4, - 0x48, 0x4E, 0x22, 0x73, 0x6F, 0xC3, 0x5F, 0xD4, 0x9A, 0xD6, - 0x30, 0x07, 0x48, 0xD6, 0x8C, 0x90, 0xAB, 0xD4, 0xF6, 0xF1, - 0xE3, 0x48, 0xD3, 0x58, 0x4B, 0xA6, 0xB9, 0xCD, 0x29, 0xBF, - 0x68, 0x1F, 0x08, 0x4B, 0x63, 0x86, 0x2F, 0x5C, 0x6B, 0xD6, - 0xB6, 0x06, 0x65, 0xF7, 0xA6, 0xDC, 0x00, 0x67, 0x6B, 0xBB, - 0xC3, 0xA9, 0x41, 0x83, 0xFB, 0xC7, 0xFA, 0xC8, 0xE2, 0x1E, - 0x7E, 0xAF, 0x00, 0x3F, 0x93, 0x02, 0x01, 0x02 -}; -const int sizeof_dh_key_der_2048 = sizeof(dh_key_der_2048) ; - -/* ./certs/dsa2048.der, 2048-bit */ -const unsigned char dsa_key_der_2048[] = -{ - 0x30, 0x82, 0x03, 0x3F, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, - 0x01, 0x00, 0xCC, 0x8E, 0xC9, 0xA0, 0xD5, 0x9A, 0x27, 0x1C, - 0xDA, 0x52, 0xDF, 0xC7, 0xC0, 0xE6, 0x06, 0xA4, 0x3E, 0x8A, - 0x66, 0x49, 0xD0, 0x59, 0x33, 0x51, 0x69, 0xC4, 0x9C, 0x5E, - 0x64, 0x85, 0xC7, 0xF1, 0xAB, 0xD5, 0xD9, 0x62, 0xAC, 0xFD, - 0xA1, 0xE0, 0x1B, 0x57, 0xFF, 0x96, 0xEF, 0x0C, 0x9F, 0xC8, - 0x44, 0x87, 0xEB, 0x5C, 0x91, 0xD0, 0x46, 0x42, 0x09, 0x50, - 0x6A, 0x23, 0xCB, 0x89, 0x6F, 0x55, 0xE9, 0x6A, 0x11, 0xA9, - 0xA8, 0x32, 0xAB, 0x33, 0x0D, 0x51, 0xB5, 0x79, 0x51, 0xB4, - 0xAB, 0xA2, 0x25, 0x11, 0x8D, 0xE5, 0x24, 0xBE, 0xD8, 0xF1, - 0x9D, 0x4E, 0x12, 0x6F, 0xAC, 0x44, 0x54, 0x80, 0xA9, 0xB4, - 0x81, 0x68, 0x4E, 0x44, 0x0E, 0xB8, 0x39, 0xF3, 0xBE, 0x83, - 0x08, 0x74, 0xA2, 0xC6, 0x7A, 0xD7, 0x6A, 0x7D, 0x0A, 0x88, - 0x57, 0x83, 0x48, 0xDC, 0xCF, 0x5E, 0x6F, 0xEE, 0x68, 0x0C, - 0xF7, 0xFF, 0x03, 0x04, 0x90, 0xAA, 0xF7, 0x07, 0x98, 0xF8, - 0x67, 0x5A, 0x83, 0x23, 0x66, 0x47, 0x60, 0xC3, 0x43, 0x6E, - 0x03, 0x91, 0xAC, 0x28, 0x66, 0xCB, 0xF0, 0xD3, 0x05, 0xC8, - 0x09, 0x97, 0xB5, 0xAE, 0x01, 0x5E, 0x80, 0x3B, 0x9D, 0x4F, - 0xDE, 0x3E, 0x94, 0xFE, 0xCB, 0x82, 0xB0, 0xB1, 0xFC, 0x91, - 0x8B, 0x1D, 0x8A, 0xEE, 0xC6, 0x06, 0x1F, 0x37, 0x91, 0x48, - 0xD2, 0xF8, 0x6C, 0x5D, 0x60, 0x13, 0x83, 0xA7, 0x81, 0xAC, - 0xCA, 0x8D, 0xD0, 0x6A, 0x04, 0x0A, 0xEA, 0x3E, 0x22, 0x4E, - 0x13, 0xF1, 0x0D, 0xBB, 0x60, 0x6B, 0xCD, 0xBC, 0x5C, 0x87, - 0xA3, 0x67, 0x2B, 0x42, 0xA1, 0x9F, 0xCD, 0x39, 0x58, 0xBE, - 0x55, 0xB1, 0x93, 0x84, 0xCE, 0xB2, 0x10, 0x4E, 0xE4, 0xC3, - 0x9F, 0xB2, 0x53, 0x61, 0x01, 0x29, 0xAA, 0x96, 0xCB, 0x20, - 0x60, 0x42, 0x1D, 0xBA, 0x75, 0x4B, 0x63, 0xC1, 0x02, 0x15, - 0x00, 0xE7, 0xA5, 0x39, 0xD4, 0x6A, 0x37, 0x5E, 0x95, 0x06, - 0x39, 0x07, 0x77, 0x0A, 0xEB, 0xA0, 0x03, 0xEB, 0x78, 0x82, - 0x9B, 0x02, 0x82, 0x01, 0x01, 0x00, 0x9A, 0xD4, 0x4C, 0x71, - 0x2F, 0xEC, 0xFA, 0x32, 0xB2, 0x80, 0x7E, 0x61, 0x4A, 0x6B, - 0x5F, 0x18, 0x76, 0x43, 0xC3, 0x69, 0xBA, 0x41, 0xC7, 0xA7, - 0x1D, 0x79, 0x01, 0xEC, 0xAF, 0x34, 0x87, 0x67, 0x4F, 0x29, - 0x80, 0xA8, 0x3B, 0x87, 0xF6, 0xE8, 0xA1, 0xE8, 0xCD, 0x1B, - 0x1C, 0x86, 0x38, 0xF6, 0xD1, 0x0C, 0x46, 0x2E, 0xC8, 0xE0, - 0xC9, 0x30, 0x26, 0xD5, 0x2C, 0x7F, 0xC1, 0x08, 0xBF, 0xCC, - 0x5A, 0x82, 0x8E, 0xD4, 0xD4, 0x49, 0xAA, 0xA2, 0xFA, 0xE6, - 0xC1, 0x9D, 0xF0, 0xD9, 0x96, 0xB0, 0xFF, 0x0C, 0x5B, 0x33, - 0x8E, 0x06, 0xDD, 0x9D, 0x28, 0xA9, 0xE9, 0x80, 0x41, 0x3B, - 0xD8, 0x7A, 0x94, 0x21, 0x8F, 0x56, 0xF1, 0xA2, 0xB4, 0x2B, - 0x89, 0x1C, 0x74, 0xFF, 0x7E, 0x91, 0xDC, 0x1F, 0x91, 0x13, - 0x98, 0xAF, 0xC7, 0x06, 0xD2, 0x4C, 0x90, 0xA2, 0xBD, 0xDA, - 0x16, 0xBA, 0x65, 0xB0, 0x2D, 0x68, 0x87, 0x3C, 0x6E, 0x25, - 0x8D, 0x90, 0xC7, 0xBC, 0x0D, 0xA9, 0x43, 0x03, 0xC9, 0xBE, - 0xCF, 0x85, 0x6F, 0xDB, 0x07, 0x7B, 0x8C, 0xF8, 0xB1, 0xC2, - 0x49, 0x10, 0x69, 0x63, 0x56, 0x37, 0xC5, 0x30, 0xD2, 0xFB, - 0x71, 0x9A, 0xE8, 0x82, 0x07, 0x2E, 0x3E, 0x95, 0x50, 0xF3, - 0x73, 0xCF, 0x34, 0x5B, 0xD5, 0xAB, 0x02, 0x15, 0xF2, 0xCC, - 0xD7, 0x52, 0xC5, 0x28, 0xD8, 0x41, 0x19, 0x55, 0x6F, 0xB8, - 0x5F, 0xF1, 0x99, 0xB3, 0xC7, 0xD9, 0xB3, 0x71, 0xF4, 0x2D, - 0xDF, 0x22, 0x59, 0x35, 0x86, 0xDB, 0x39, 0xCA, 0x1B, 0x4D, - 0x35, 0x90, 0x19, 0x6B, 0x31, 0xE3, 0xC8, 0xC6, 0x09, 0xBF, - 0x7C, 0xED, 0x01, 0xB4, 0xB2, 0xF5, 0x6E, 0xDA, 0x63, 0x41, - 0x3C, 0xE6, 0x3A, 0x72, 0x2D, 0x65, 0x48, 0xF6, 0x07, 0xCD, - 0x92, 0x84, 0x8B, 0x1D, 0xA7, 0x31, 0x6B, 0xD6, 0xF0, 0xFB, - 0xD9, 0xF4, 0x02, 0x82, 0x01, 0x00, 0x66, 0x4B, 0xBB, 0xB7, - 0xC9, 0x48, 0x95, 0x0D, 0x5A, 0xA6, 0x2D, 0xA1, 0x7F, 0xDF, - 0x1F, 0x67, 0x6D, 0xED, 0x52, 0x4B, 0x16, 0x6C, 0x17, 0xC6, - 0xAE, 0xF8, 0x6A, 0xC4, 0x57, 0xED, 0x2F, 0xB3, 0xF0, 0x2A, - 0x55, 0xAB, 0xBA, 0xCA, 0xEA, 0x17, 0xE8, 0x35, 0x7C, 0xE5, - 0x31, 0x0D, 0x4A, 0x95, 0xFC, 0x43, 0x6F, 0x97, 0x3C, 0x5C, - 0x67, 0xAC, 0xBE, 0x67, 0x7F, 0xE9, 0x4E, 0xAA, 0x48, 0xB3, - 0x92, 0xA1, 0x76, 0x75, 0xEA, 0x04, 0x34, 0x7F, 0x87, 0x33, - 0x2D, 0x24, 0xB6, 0x29, 0x97, 0xE3, 0x04, 0x77, 0x93, 0x89, - 0x13, 0xDB, 0x1B, 0x93, 0xB8, 0x2C, 0x90, 0x1A, 0x09, 0x3B, - 0x26, 0xD9, 0x59, 0xF3, 0x2A, 0x09, 0x58, 0xDC, 0xAC, 0x25, - 0xB4, 0xA9, 0x45, 0x3B, 0xA2, 0x3A, 0x6C, 0x61, 0x84, 0xBF, - 0x68, 0xD4, 0xEA, 0x9B, 0xC5, 0x29, 0x48, 0x60, 0x15, 0x10, - 0x35, 0x2C, 0x44, 0x1D, 0xB5, 0x9A, 0xEE, 0xAC, 0xC1, 0x68, - 0xE8, 0x47, 0xB7, 0x41, 0x34, 0x39, 0x9A, 0xF8, 0xA5, 0x20, - 0xE9, 0x24, 0xC4, 0x2C, 0x58, 0x3F, 0x4C, 0x41, 0x30, 0x3A, - 0x14, 0x6E, 0x8D, 0xEA, 0xAD, 0xBA, 0x9B, 0x43, 0xD3, 0x98, - 0x2F, 0x83, 0xD8, 0x14, 0x67, 0xE8, 0xF8, 0xD5, 0x4F, 0xAC, - 0xE0, 0x3B, 0xBF, 0xA7, 0x54, 0x16, 0x5E, 0x49, 0x64, 0x26, - 0x54, 0xA4, 0x6B, 0x69, 0x7C, 0xBA, 0x8A, 0x83, 0xD9, 0x2E, - 0x65, 0x0A, 0xA2, 0x27, 0xEF, 0x99, 0x99, 0x08, 0xD7, 0xB5, - 0x9F, 0xA0, 0x01, 0xEF, 0x7E, 0x17, 0xBF, 0x83, 0x6B, 0x2E, - 0xDD, 0xC0, 0x39, 0x38, 0x23, 0x68, 0xB4, 0x76, 0x6B, 0xE5, - 0xCA, 0xF7, 0x7C, 0xEE, 0xC0, 0x52, 0xE2, 0xDD, 0xAD, 0x59, - 0x3A, 0x42, 0x06, 0x45, 0xB0, 0xC7, 0xC1, 0x77, 0x05, 0xB2, - 0x0C, 0x32, 0x40, 0x46, 0xAA, 0xDA, 0x79, 0x77, 0x04, 0x71, - 0xDF, 0x7A, 0x02, 0x15, 0x00, 0x98, 0xEE, 0xB9, 0x51, 0x37, - 0x3E, 0x75, 0x13, 0x13, 0x06, 0x8F, 0x94, 0xD3, 0xE6, 0xE9, - 0x00, 0xCB, 0x62, 0x6D, 0x9A -}; -const int sizeof_dsa_key_der_2048 = sizeof(dsa_key_der_2048) ; - -/* ./certs/rsa2048.der, 2048-bit */ -const unsigned char rsa_key_der_2048[] = -{ - 0x30, 0x82, 0x04, 0xA3, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, - 0x01, 0x00, 0xE9, 0x8A, 0x5D, 0x15, 0xA4, 0xD4, 0x34, 0xB9, - 0x59, 0xA2, 0xDA, 0xAF, 0x74, 0xC8, 0xC9, 0x03, 0x26, 0x38, - 0xFA, 0x48, 0xFC, 0x4D, 0x30, 0x6E, 0xEA, 0x76, 0x89, 0xCE, - 0x4F, 0xF6, 0x87, 0xDE, 0x32, 0x3A, 0x46, 0x6E, 0x38, 0x12, - 0x58, 0x37, 0x22, 0x0D, 0x80, 0xAC, 0x2D, 0xAF, 0x2F, 0x12, - 0x3E, 0x62, 0x73, 0x60, 0x66, 0x68, 0x90, 0xB2, 0x6F, 0x47, - 0x17, 0x04, 0x2B, 0xCA, 0xB7, 0x26, 0xB7, 0x10, 0xC2, 0x13, - 0xF9, 0x7A, 0x62, 0x0A, 0x93, 0x32, 0x90, 0x42, 0x0D, 0x16, - 0x2E, 0xFA, 0xD7, 0x29, 0xD7, 0x9F, 0x54, 0xE4, 0xFC, 0x65, - 0x74, 0xF8, 0xF6, 0x43, 0x6B, 0x4E, 0x9E, 0x34, 0x7F, 0xCB, - 0x6B, 0x1C, 0x1A, 0xDE, 0x82, 0x81, 0xBF, 0x08, 0x5D, 0x3F, - 0xC0, 0xB6, 0xB1, 0xA8, 0xA5, 0x9C, 0x81, 0x70, 0xA7, 0x4E, - 0x32, 0x87, 0x15, 0x1C, 0x78, 0x0E, 0xF0, 0x18, 0xFE, 0xEB, - 0x4B, 0x37, 0x2B, 0xE9, 0xE1, 0xF7, 0xFA, 0x51, 0xC6, 0x58, - 0xB9, 0xD8, 0x06, 0x03, 0xED, 0xC0, 0x03, 0x18, 0x55, 0x8B, - 0x98, 0xFE, 0xB1, 0xF6, 0xD0, 0x3D, 0xFA, 0x63, 0xC0, 0x38, - 0x19, 0xC7, 0x00, 0xEF, 0x4D, 0x99, 0x60, 0xB4, 0xBA, 0xCE, - 0xE3, 0xCE, 0xD9, 0x6B, 0x2D, 0x76, 0x94, 0xFF, 0xFB, 0x77, - 0x18, 0x4A, 0xFE, 0x65, 0xF0, 0x0A, 0x91, 0x5C, 0x3B, 0x22, - 0x94, 0x85, 0xD0, 0x20, 0x18, 0x59, 0x2E, 0xA5, 0x33, 0x03, - 0xAC, 0x1B, 0x5F, 0x78, 0x32, 0x11, 0x25, 0xEE, 0x7F, 0x96, - 0x21, 0xA9, 0xD6, 0x76, 0x97, 0x8D, 0x66, 0x7E, 0xB2, 0x91, - 0xD0, 0x36, 0x2E, 0xA3, 0x1D, 0xBF, 0xF1, 0x85, 0xED, 0xC0, - 0x3E, 0x60, 0xB8, 0x5A, 0x9F, 0xAB, 0x80, 0xE0, 0xEA, 0x5D, - 0x5F, 0x75, 0x56, 0xC7, 0x4D, 0x51, 0x8E, 0xD4, 0x1F, 0x34, - 0xA6, 0x36, 0xF1, 0x30, 0x1F, 0x51, 0x99, 0x2F, 0x02, 0x03, - 0x01, 0x00, 0x01, 0x02, 0x82, 0x01, 0x00, 0x52, 0x11, 0x33, - 0x40, 0xC5, 0xD9, 0x64, 0x65, 0xB5, 0xE0, 0x0A, 0xA5, 0x19, - 0x8E, 0xED, 0x44, 0x54, 0x0C, 0x35, 0xB7, 0xAC, 0x21, 0x9B, - 0xE1, 0x7E, 0x37, 0x05, 0x9A, 0x20, 0x73, 0x6B, 0xAF, 0x63, - 0x4B, 0x23, 0x30, 0xDC, 0x37, 0x66, 0x14, 0x89, 0xBC, 0xE0, - 0xF8, 0xA0, 0x5D, 0x2D, 0x57, 0x65, 0xE0, 0xC6, 0xD6, 0x9B, - 0x66, 0x27, 0x62, 0xEC, 0xC3, 0xB8, 0x8C, 0xD8, 0xAE, 0xB5, - 0xC9, 0xBF, 0x0E, 0xFE, 0x84, 0x72, 0x68, 0xD5, 0x47, 0x0E, - 0x0E, 0xF8, 0xAE, 0x9D, 0x56, 0xAC, 0x4F, 0xAD, 0x88, 0xA0, - 0xA2, 0xF6, 0xFC, 0x38, 0xCD, 0x96, 0x5B, 0x5E, 0x7E, 0xB6, - 0x98, 0xBB, 0xF3, 0x8A, 0xEC, 0xFA, 0xC8, 0xB7, 0x90, 0x75, - 0xA0, 0x0E, 0x77, 0x6B, 0xFD, 0x59, 0x45, 0x5A, 0x0C, 0xFF, - 0x95, 0x8D, 0xCE, 0xFE, 0x9B, 0xF6, 0x19, 0x8E, 0x0B, 0xA1, - 0x0C, 0xEE, 0xC6, 0x79, 0xDD, 0x9D, 0x61, 0x85, 0x5C, 0x19, - 0x6C, 0x47, 0xCC, 0x08, 0xFF, 0xA5, 0x62, 0xDB, 0xE4, 0x2D, - 0x2D, 0xDD, 0x14, 0x67, 0xD6, 0x4A, 0x64, 0x2A, 0x66, 0x49, - 0x54, 0x9C, 0xE3, 0x85, 0x18, 0xE7, 0x31, 0x42, 0xE2, 0xD0, - 0x2C, 0x20, 0xA0, 0x74, 0x0F, 0x1F, 0x20, 0x89, 0xBA, 0xAB, - 0x80, 0xD8, 0x38, 0xD9, 0x46, 0x69, 0xBB, 0xEF, 0xCC, 0x8B, - 0xA1, 0x73, 0xA7, 0xF2, 0xE4, 0x38, 0x5D, 0xD6, 0x75, 0x9F, - 0x88, 0x0E, 0x56, 0xCD, 0xD8, 0x84, 0x59, 0x29, 0x73, 0xF5, - 0xA1, 0x79, 0xDA, 0x7A, 0x1F, 0xBF, 0x73, 0x83, 0xC0, 0x6D, - 0x9F, 0x8B, 0x34, 0x15, 0xC0, 0x6D, 0x69, 0x6A, 0x20, 0xE6, - 0x51, 0xCF, 0x45, 0x6E, 0xCC, 0x05, 0xC4, 0x3A, 0xC0, 0x9E, - 0xAA, 0xC1, 0x06, 0x2F, 0xAB, 0x99, 0x30, 0xE1, 0x6E, 0x9D, - 0x45, 0x7A, 0xFF, 0xA9, 0xCE, 0x70, 0xB8, 0x16, 0x1A, 0x0E, - 0x20, 0xFA, 0xC1, 0x02, 0x81, 0x81, 0x00, 0xFF, 0x30, 0x11, - 0xC2, 0x3C, 0x6B, 0xB4, 0xD6, 0x9E, 0x6B, 0xC1, 0x93, 0xD1, - 0x48, 0xCE, 0x80, 0x2D, 0xBE, 0xAF, 0xF7, 0xBA, 0xB2, 0xD7, - 0xC3, 0xC4, 0x53, 0x6E, 0x15, 0x02, 0xAA, 0x61, 0xB9, 0xEA, - 0x05, 0x9B, 0x79, 0x67, 0x0B, 0xCE, 0xD9, 0xFB, 0x98, 0x8C, - 0x1D, 0x6B, 0xF4, 0x5A, 0xA7, 0xA0, 0x5E, 0x54, 0x18, 0xE9, - 0x31, 0x44, 0x7C, 0xC7, 0x52, 0xD8, 0x6D, 0xA0, 0x3E, 0xD6, - 0x14, 0x2D, 0x7B, 0x15, 0x9D, 0x1E, 0x39, 0x87, 0x96, 0xDD, - 0xA8, 0x33, 0x55, 0x2A, 0x8E, 0x32, 0xC0, 0xC4, 0xE5, 0xB8, - 0xCB, 0xCD, 0x32, 0x8D, 0xAD, 0x7B, 0xE5, 0xC6, 0x7E, 0x4D, - 0x6F, 0xF3, 0xA4, 0xC5, 0xA6, 0x40, 0xBE, 0x90, 0x3A, 0x33, - 0x6A, 0x24, 0xB2, 0x80, 0x81, 0x12, 0xAC, 0xE3, 0x7B, 0x26, - 0x63, 0xCF, 0x88, 0xB9, 0xFF, 0x74, 0x23, 0x37, 0x52, 0xF0, - 0xC4, 0x27, 0x5D, 0x45, 0x1F, 0x02, 0x81, 0x81, 0x00, 0xEA, - 0x48, 0xA7, 0xDD, 0x73, 0x41, 0x56, 0x21, 0x15, 0xF7, 0x42, - 0x45, 0x4D, 0xA9, 0xE1, 0x66, 0x5B, 0xBD, 0x25, 0x7D, 0xF7, - 0xA8, 0x65, 0x13, 0xAE, 0x2D, 0x38, 0x11, 0xCD, 0x93, 0xFC, - 0x30, 0xA3, 0x2C, 0x44, 0xBB, 0xCF, 0xD0, 0x21, 0x8F, 0xFB, - 0xC1, 0xF9, 0xAD, 0x1D, 0xEE, 0x96, 0xCF, 0x97, 0x49, 0x60, - 0x53, 0x80, 0xA5, 0xA2, 0xF8, 0xEE, 0xB9, 0xD5, 0x77, 0x44, - 0xDD, 0xFD, 0x19, 0x2A, 0xF1, 0x81, 0xF4, 0xD9, 0x3C, 0xEC, - 0x73, 0xD0, 0x2A, 0xD8, 0x3C, 0x27, 0x87, 0x79, 0x12, 0x86, - 0xE7, 0x57, 0x0C, 0x59, 0xD1, 0x44, 0x55, 0xAE, 0xC3, 0x4D, - 0x42, 0xAD, 0xA9, 0xB3, 0x28, 0x61, 0xB4, 0x9C, 0xA6, 0x63, - 0xD3, 0x96, 0xB1, 0x75, 0x9F, 0x2A, 0x78, 0x99, 0xE3, 0x1E, - 0x71, 0x47, 0x39, 0xF4, 0x52, 0xE3, 0x66, 0xF1, 0xEB, 0x7F, - 0xEF, 0xC6, 0x81, 0x93, 0x4C, 0x99, 0xF1, 0x02, 0x81, 0x81, - 0x00, 0xC5, 0xB6, 0x20, 0x8C, 0x34, 0xF3, 0xDD, 0xF0, 0x4A, - 0x5D, 0x82, 0x65, 0x5C, 0x48, 0xE4, 0x75, 0x3A, 0xFB, 0xFA, - 0xAA, 0x1C, 0xE4, 0x63, 0x77, 0x31, 0xAC, 0xD2, 0x25, 0x45, - 0x23, 0x6D, 0x03, 0xF5, 0xE4, 0xD2, 0x48, 0x85, 0x26, 0x08, - 0xE5, 0xAA, 0xA0, 0xCE, 0x2E, 0x1D, 0x6D, 0xFC, 0xAE, 0xD2, - 0xF9, 0x42, 0x7E, 0xEA, 0x6D, 0x59, 0x7A, 0xB3, 0x93, 0xE4, - 0x4B, 0x4B, 0x54, 0x63, 0xD8, 0xCE, 0x44, 0x06, 0xC2, 0xEC, - 0x9F, 0xF6, 0x05, 0x55, 0x46, 0xF4, 0x3E, 0x8F, 0xF2, 0x0C, - 0x30, 0x7E, 0x5C, 0xDD, 0x88, 0x49, 0x3B, 0x59, 0xB9, 0x87, - 0xBC, 0xC6, 0xC5, 0x24, 0x8A, 0x10, 0x63, 0x21, 0x1F, 0x66, - 0x1A, 0x3E, 0xF4, 0x58, 0xD1, 0x6C, 0x0D, 0x40, 0xB2, 0xC0, - 0x1D, 0x63, 0x42, 0x0E, 0xC4, 0x56, 0x0E, 0xC0, 0xCC, 0xC2, - 0xD6, 0x66, 0x0E, 0xC4, 0xAB, 0xB5, 0x33, 0xF6, 0x51, 0x02, - 0x81, 0x80, 0x19, 0x7E, 0xE6, 0xA5, 0xB6, 0xD1, 0x39, 0x6A, - 0x48, 0x55, 0xAC, 0x24, 0x96, 0x9B, 0x12, 0x28, 0x6D, 0x7B, - 0x5C, 0x05, 0x25, 0x5A, 0x72, 0x05, 0x7E, 0x42, 0xF5, 0x83, - 0x1A, 0x78, 0x2C, 0x4D, 0xAE, 0xB4, 0x36, 0x96, 0xA9, 0xBA, - 0xE0, 0xAC, 0x26, 0x9D, 0xA9, 0x6A, 0x29, 0x83, 0xB9, 0x6D, - 0xC5, 0xEC, 0xFA, 0x4A, 0x9C, 0x09, 0x6A, 0x7E, 0xE4, 0x9B, - 0xDC, 0x9B, 0x2A, 0x27, 0x6E, 0x4F, 0xBA, 0xD8, 0xA5, 0x67, - 0xDB, 0xEC, 0x41, 0x5F, 0x29, 0x1C, 0x40, 0x83, 0xEB, 0x59, - 0x56, 0xD7, 0xA9, 0x4E, 0xAB, 0xAE, 0x70, 0x67, 0xD1, 0xA3, - 0xF1, 0x6C, 0xD7, 0x8F, 0x96, 0x0E, 0x8D, 0xAC, 0xAB, 0x55, - 0x58, 0x66, 0xD3, 0x1E, 0x47, 0x9B, 0xF0, 0x4C, 0xED, 0xF6, - 0x49, 0xE8, 0xE9, 0x7B, 0x32, 0x61, 0x20, 0x31, 0x95, 0x05, - 0xB2, 0xF6, 0x09, 0xEA, 0x32, 0x14, 0x0F, 0xCF, 0x9A, 0x41, - 0x02, 0x81, 0x80, 0x77, 0x3F, 0xB6, 0x14, 0x8D, 0xC5, 0x13, - 0x08, 0x7E, 0xC9, 0xC4, 0xEA, 0xD4, 0xBA, 0x0D, 0xA4, 0x9E, - 0xB3, 0x6E, 0xDE, 0x1A, 0x7A, 0xF8, 0x89, 0x88, 0xEF, 0x36, - 0x3C, 0x11, 0xBC, 0x83, 0xE8, 0x30, 0x6C, 0x81, 0x7C, 0x47, - 0xF3, 0x4D, 0xCA, 0xEA, 0x56, 0x01, 0x62, 0x55, 0x2E, 0x4B, - 0x89, 0xA9, 0xBD, 0x6F, 0x01, 0xF6, 0x74, 0x02, 0xAA, 0xE3, - 0x84, 0x66, 0x06, 0x95, 0x34, 0xA1, 0xE2, 0xCA, 0x65, 0xFE, - 0xA3, 0x2D, 0x43, 0x97, 0x95, 0x6C, 0x6F, 0xD5, 0xB4, 0x38, - 0xF6, 0xF9, 0x95, 0x30, 0xFA, 0xF8, 0x9C, 0x25, 0x2B, 0xB6, - 0x14, 0x51, 0xCC, 0x2E, 0xB3, 0x5B, 0xD6, 0xDC, 0x1A, 0xEC, - 0x2D, 0x09, 0x5B, 0x3F, 0x3A, 0xD0, 0xB8, 0x4E, 0x27, 0x1F, - 0xDC, 0x2A, 0xEE, 0xAC, 0xA9, 0x59, 0x5D, 0x07, 0x63, 0x11, - 0x83, 0x0B, 0xD4, 0x74, 0x80, 0xB6, 0x7D, 0x62, 0x45, 0xBF, - 0x56 -}; -const int sizeof_rsa_key_der_2048 = sizeof(rsa_key_der_2048) ; - -#endif /* USE_CERT_BUFFERS_1024 */ - -#endif /* CYASSL_CERTS_TEST_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/crl.h b/project1/cyassl-3.0.0/cyassl/crl.h deleted file mode 100644 index c3dbfd7c..00000000 --- a/project1/cyassl-3.0.0/cyassl/crl.h +++ /dev/null @@ -1,51 +0,0 @@ -/* crl.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_CRL_H -#define CYASSL_CRL_H - - -#ifdef HAVE_CRL - -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - -typedef struct CYASSL_CRL CYASSL_CRL; - -CYASSL_LOCAL int InitCRL(CYASSL_CRL*, CYASSL_CERT_MANAGER*); -CYASSL_LOCAL void FreeCRL(CYASSL_CRL*, int dynamic); - -CYASSL_LOCAL int LoadCRL(CYASSL_CRL* crl, const char* path, int type, int mon); -CYASSL_LOCAL int BufferLoadCRL(CYASSL_CRL*, const byte*, long, int); -CYASSL_LOCAL int CheckCertCRL(CYASSL_CRL*, DecodedCert*); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* HAVE_CRL */ -#endif /* CYASSL_CRL_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h deleted file mode 100644 index c36dfd5f..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/aes.h +++ /dev/null @@ -1,180 +0,0 @@ -/* aes.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_AES - -#ifndef CTAO_CRYPT_AES_H -#define CTAO_CRYPT_AES_H - - -#include - -#ifdef HAVE_CAVIUM - #include - #include "cavium_common.h" -#endif - -#ifdef CYASSL_AESNI - -#include - -#if !defined (ALIGN16) - #if defined (__GNUC__) - #define ALIGN16 __attribute__ ( (aligned (16))) - #elif defined(_MSC_VER) - #define ALIGN16 __declspec (align (16)) - #else - #define ALIGN16 - #endif -#endif - -#endif /* CYASSL_AESNI */ - -#if !defined (ALIGN16) - #define ALIGN16 -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -#define CYASSL_AES_CAVIUM_MAGIC 0xBEEF0002 - -enum { - AES_ENC_TYPE = 1, /* cipher unique type */ - AES_ENCRYPTION = 0, - AES_DECRYPTION = 1, - AES_BLOCK_SIZE = 16 -}; - - -typedef struct Aes { - /* AESNI needs key first, rounds 2nd, not sure why yet */ - ALIGN16 word32 key[60]; - word32 rounds; - - ALIGN16 word32 reg[AES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ - ALIGN16 word32 tmp[AES_BLOCK_SIZE / sizeof(word32)]; /* same */ - -#ifdef HAVE_AESGCM - ALIGN16 byte H[AES_BLOCK_SIZE]; -#ifdef GCM_TABLE - /* key-based fast multiplication table. */ - ALIGN16 byte M0[256][AES_BLOCK_SIZE]; -#endif /* GCM_TABLE */ -#endif /* HAVE_AESGCM */ -#ifdef CYASSL_AESNI - byte use_aesni; -#endif /* CYASSL_AESNI */ -#ifdef HAVE_CAVIUM - AesType type; /* aes key type */ - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ - word64 contextHandle; /* nitrox context memory handle */ -#endif -#ifdef CYASSL_AES_COUNTER - word32 left; /* unsued bytes left from last call */ -#endif -#ifdef CYASSL_PIC32MZ_CRYPT - word32 key_ce[AES_BLOCK_SIZE*2/sizeof(word32)] ; - word32 iv_ce [AES_BLOCK_SIZE /sizeof(word32)] ; - int keylen ; -#endif -} Aes; - - -CYASSL_API int AesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv, - int dir); -CYASSL_API int AesSetIV(Aes* aes, const byte* iv); -CYASSL_API int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz); -CYASSL_API int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz); -CYASSL_API void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz); -CYASSL_API void AesEncryptDirect(Aes* aes, byte* out, const byte* in); -CYASSL_API void AesDecryptDirect(Aes* aes, byte* out, const byte* in); -CYASSL_API int AesSetKeyDirect(Aes* aes, const byte* key, word32 len, - const byte* iv, int dir); -#ifdef HAVE_AESGCM -CYASSL_API void AesGcmSetKey(Aes* aes, const byte* key, word32 len); -CYASSL_API void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz); -CYASSL_API int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz); - -typedef struct Gmac { - Aes aes; -} Gmac; -CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len); -CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, - const byte* authIn, word32 authInSz, - byte* authTag, word32 authTagSz); -#endif /* HAVE_AESGCM */ -#ifdef HAVE_AESCCM -CYASSL_API void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz); -CYASSL_API void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz); -CYASSL_API int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz); -#endif /* HAVE_AESCCM */ - -#ifdef HAVE_CAVIUM - CYASSL_API int AesInitCavium(Aes*, int); - CYASSL_API void AesFreeCavium(Aes*); -#endif - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int AesSetKey_fips(Aes* aes, const byte* key, word32 len, - const byte* iv, int dir); - CYASSL_API int AesSetIV_fips(Aes* aes, const byte* iv); - CYASSL_API int AesCbcEncrypt_fips(Aes* aes, byte* out, const byte* in, - word32 sz); - CYASSL_API int AesCbcDecrypt_fips(Aes* aes, byte* out, const byte* in, - word32 sz); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define AesSetKey AesSetKey_fips - #define AesSetIV AesSetIV_fips - #define AesCbcEncrypt AesCbcEncrypt_fips - #define AesCbcDecrypt AesCbcDecrypt_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_AES_H */ -#endif /* NO_AES */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h deleted file mode 100644 index e205c50d..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/arc4.h +++ /dev/null @@ -1,68 +0,0 @@ -/* arc4.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_ARC4_H -#define CTAO_CRYPT_ARC4_H - - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - -#define CYASSL_ARC4_CAVIUM_MAGIC 0xBEEF0001 - -enum { - ARC4_ENC_TYPE = 4, /* cipher unique type */ - ARC4_STATE_SIZE = 256 -}; - -/* ARC4 encryption and decryption */ -typedef struct Arc4 { - byte x; - byte y; - byte state[ARC4_STATE_SIZE]; -#ifdef HAVE_CAVIUM - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ - word64 contextHandle; /* nitrox context memory handle */ -#endif -} Arc4; - -CYASSL_API void Arc4Process(Arc4*, byte*, const byte*, word32); -CYASSL_API void Arc4SetKey(Arc4*, const byte*, word32); - -#ifdef HAVE_CAVIUM - CYASSL_API int Arc4InitCavium(Arc4*, int); - CYASSL_API void Arc4FreeCavium(Arc4*); -#endif - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_ARC4_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h deleted file mode 100644 index 239c0749..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn.h +++ /dev/null @@ -1,704 +0,0 @@ -/* asn.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifndef NO_ASN - -#ifndef CTAO_CRYPT_ASN_H -#define CTAO_CRYPT_ASN_H - -#include -#include -#include -#include -#include -#include -#include /* public interface */ -#ifdef HAVE_ECC - #include -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - ISSUER = 0, - SUBJECT = 1, - - EXTERNAL_SERIAL_SIZE = 32, - - BEFORE = 0, - AFTER = 1 -}; - -/* ASN Tags */ -enum ASN_Tags { - ASN_BOOLEAN = 0x01, - ASN_INTEGER = 0x02, - ASN_BIT_STRING = 0x03, - ASN_OCTET_STRING = 0x04, - ASN_TAG_NULL = 0x05, - ASN_OBJECT_ID = 0x06, - ASN_ENUMERATED = 0x0a, - ASN_UTF8STRING = 0x0c, - ASN_SEQUENCE = 0x10, - ASN_SET = 0x11, - ASN_UTC_TIME = 0x17, - ASN_OTHER_TYPE = 0x00, - ASN_RFC822_TYPE = 0x01, - ASN_DNS_TYPE = 0x02, - ASN_DIR_TYPE = 0x04, - ASN_GENERALIZED_TIME = 0x18, - CRL_EXTENSIONS = 0xa0, - ASN_EXTENSIONS = 0xa3, - ASN_LONG_LENGTH = 0x80 -}; - -enum ASN_Flags{ - ASN_CONSTRUCTED = 0x20, - ASN_CONTEXT_SPECIFIC = 0x80 -}; - -enum DN_Tags { - ASN_COMMON_NAME = 0x03, /* CN */ - ASN_SUR_NAME = 0x04, /* SN */ - ASN_SERIAL_NUMBER = 0x05, /* serialNumber */ - ASN_COUNTRY_NAME = 0x06, /* C */ - ASN_LOCALITY_NAME = 0x07, /* L */ - ASN_STATE_NAME = 0x08, /* ST */ - ASN_ORG_NAME = 0x0a, /* O */ - ASN_ORGUNIT_NAME = 0x0b /* OU */ -}; - -enum PBES { - PBE_MD5_DES = 0, - PBE_SHA1_DES = 1, - PBE_SHA1_DES3 = 2, - PBE_SHA1_RC4_128 = 3, - PBES2 = 13 /* algo ID */ -}; - -enum ENCRYPTION_TYPES { - DES_TYPE = 0, - DES3_TYPE = 1, - RC4_TYPE = 2 -}; - -enum ECC_TYPES { - ECC_PREFIX_0 = 160, - ECC_PREFIX_1 = 161 -}; - -enum Misc_ASN { - ASN_NAME_MAX = 256, - MAX_SALT_SIZE = 64, /* MAX PKCS Salt length */ - MAX_IV_SIZE = 64, /* MAX PKCS Iv length */ - MAX_KEY_SIZE = 64, /* MAX PKCS Key length */ - PKCS5 = 5, /* PKCS oid tag */ - PKCS5v2 = 6, /* PKCS #5 v2.0 */ - PKCS12 = 12, /* PKCS #12 */ - MAX_UNICODE_SZ = 256, - ASN_BOOL_SIZE = 2, /* including type */ - SHA_SIZE = 20, - RSA_INTS = 8, /* RSA ints in private key */ - MIN_DATE_SIZE = 13, - MAX_DATE_SIZE = 32, - ASN_GEN_TIME_SZ = 15, /* 7 numbers * 2 + Zulu tag */ - MAX_ENCODED_SIG_SZ = 512, - MAX_SIG_SZ = 256, - MAX_ALGO_SZ = 20, - MAX_SEQ_SZ = 5, /* enum(seq | con) + length(4) */ - MAX_SET_SZ = 5, /* enum(set | con) + length(4) */ - MAX_OCTET_STR_SZ = 5, /* enum(set | con) + length(4) */ - MAX_EXP_SZ = 5, /* enum(contextspec|con|exp) + length(4) */ - MAX_PRSTR_SZ = 5, /* enum(prstr) + length(4) */ - MAX_VERSION_SZ = 5, /* enum + id + version(byte) + (header(2))*/ - MAX_ENCODED_DIG_SZ = 73, /* sha512 + enum(bit or octet) + legnth(4) */ - MAX_RSA_INT_SZ = 517, /* RSA raw sz 4096 for bits + tag + len(4) */ - MAX_NTRU_KEY_SZ = 610, /* NTRU 112 bit public key */ - MAX_NTRU_ENC_SZ = 628, /* NTRU 112 bit DER public encoding */ - MAX_LENGTH_SZ = 4, /* Max length size for DER encoding */ - MAX_RSA_E_SZ = 16, /* Max RSA public e size */ - MAX_CA_SZ = 32, /* Max encoded CA basic constraint length */ - MAX_SN_SZ = 35, /* Max encoded serial number (INT) length */ -#ifdef CYASSL_CERT_GEN - #ifdef CYASSL_CERT_REQ - /* Max encoded cert req attributes length */ - MAX_ATTRIB_SZ = MAX_SEQ_SZ * 3 + (11 + MAX_SEQ_SZ) * 2 + - MAX_PRSTR_SZ + CTC_NAME_SIZE, /* 11 is the OID size */ - #endif - #ifdef CYASSL_ALT_NAMES - MAX_EXTENSIONS_SZ = 1 + MAX_LENGTH_SZ + CTC_MAX_ALT_SIZE, - #else - MAX_EXTENSIONS_SZ = 1 + MAX_LENGTH_SZ + MAX_CA_SZ, - #endif - /* Max total extensions, id + len + others */ -#endif - MAX_OCSP_EXT_SZ = 58, /* Max OCSP Extension length */ - MAX_OCSP_NONCE_SZ = 18, /* OCSP Nonce size */ - EIGHTK_BUF = 8192, /* Tmp buffer size */ - MAX_PUBLIC_KEY_SZ = MAX_NTRU_ENC_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ * 2 - /* use bigger NTRU size */ -}; - - -enum Oid_Types { - hashType = 0, - sigType = 1, - keyType = 2, - curveType = 3, - blkType = 4 -}; - - -enum Hash_Sum { - MD2h = 646, - MD5h = 649, - SHAh = 88, - SHA256h = 414, - SHA384h = 415, - SHA512h = 416 -}; - - -enum Block_Sum { - DESb = 69, - DES3b = 652 -}; - - -enum Key_Sum { - DSAk = 515, - RSAk = 645, - NTRUk = 364, - ECDSAk = 518 -}; - - -enum Ecc_Sum { - ECC_256R1 = 526, - ECC_384R1 = 210, - ECC_521R1 = 211, - ECC_160R1 = 184, - ECC_192R1 = 520, - ECC_224R1 = 209 -}; - - -enum KDF_Sum { - PBKDF2_OID = 660 -}; - - -enum Extensions_Sum { - BASIC_CA_OID = 133, - ALT_NAMES_OID = 131, - CRL_DIST_OID = 145, - AUTH_INFO_OID = 69, - CA_ISSUER_OID = 117, - AUTH_KEY_OID = 149, - SUBJ_KEY_OID = 128, - CERT_POLICY_OID = 146, - KEY_USAGE_OID = 129, /* 2.5.29.15 */ - INHIBIT_ANY_OID = 168, /* 2.5.29.54 */ - EXT_KEY_USAGE_OID = 151, /* 2.5.29.37 */ - NAME_CONS_OID = 144 /* 2.5.29.30 */ -}; - -enum CertificatePolicy_Sum { - CP_ANY_OID = 146 /* id-ce 32 0 */ -}; - -enum SepHardwareName_Sum { - HW_NAME_OID = 79 /* 1.3.6.1.5.5.7.8.4 from RFC 4108*/ -}; - -enum AuthInfo_Sum { - AIA_OCSP_OID = 116, /* 1.3.6.1.5.5.7.48.1 */ - AIA_CA_ISSUER_OID = 117 /* 1.3.6.1.5.5.7.48.2 */ -}; - -enum ExtKeyUsage_Sum { /* From RFC 5280 */ - EKU_ANY_OID = 151, /* 2.5.29.37.0, anyExtendedKeyUsage */ - EKU_SERVER_AUTH_OID = 71, /* 1.3.6.1.5.5.7.3.1, id-kp-serverAuth */ - EKU_CLIENT_AUTH_OID = 72, /* 1.3.6.1.5.5.7.3.2, id-kp-clientAuth */ - EKU_OCSP_SIGN_OID = 79, /* 1.3.6.1.5.5.7.3.9, OCSPSigning */ -}; - - -enum VerifyType { - NO_VERIFY = 0, - VERIFY = 1 -}; - - -/* Key usage extension bits */ -#define KEYUSE_DIGITAL_SIG 0x0100 -#define KEYUSE_CONTENT_COMMIT 0x0080 -#define KEYUSE_KEY_ENCIPHER 0x0040 -#define KEYUSE_DATA_ENCIPHER 0x0020 -#define KEYUSE_KEY_AGREE 0x0010 -#define KEYUSE_KEY_CERT_SIGN 0x0008 -#define KEYUSE_CRL_SIGN 0x0004 -#define KEYUSE_ENCIPHER_ONLY 0x0002 -#define KEYUSE_DECIPHER_ONLY 0x0001 - -#define EXTKEYUSE_ANY 0x08 -#define EXTKEYUSE_OCSP_SIGN 0x04 -#define EXTKEYUSE_CLIENT_AUTH 0x02 -#define EXTKEYUSE_SERVER_AUTH 0x01 - -typedef struct DNS_entry DNS_entry; - -struct DNS_entry { - DNS_entry* next; /* next on DNS list */ - char* name; /* actual DNS name */ -}; - - -typedef struct Base_entry Base_entry; - -struct Base_entry { - Base_entry* next; /* next on name base list */ - char* name; /* actual name base */ - int nameSz; /* name length */ - byte type; /* Name base type (DNS or RFC822) */ -}; - - -struct DecodedName { - char* fullName; - int fullNameLen; - int entryCount; - int cnIdx; - int cnLen; - int snIdx; - int snLen; - int cIdx; - int cLen; - int lIdx; - int lLen; - int stIdx; - int stLen; - int oIdx; - int oLen; - int ouIdx; - int ouLen; - int emailIdx; - int emailLen; - int uidIdx; - int uidLen; - int serialIdx; - int serialLen; -}; - - -typedef struct DecodedCert DecodedCert; -typedef struct DecodedName DecodedName; -typedef struct Signer Signer; - - -struct DecodedCert { - byte* publicKey; - word32 pubKeySize; - int pubKeyStored; - word32 certBegin; /* offset to start of cert */ - word32 sigIndex; /* offset to start of signature */ - word32 sigLength; /* length of signature */ - word32 signatureOID; /* sum of algorithm object id */ - word32 keyOID; /* sum of key algo object id */ - int version; /* cert version, 1 or 3 */ - DNS_entry* altNames; /* alt names list of dns entries */ -#ifndef IGNORE_NAME_CONSTRAINTS - DNS_entry* altEmailNames; /* alt names list of RFC822 entries */ - Base_entry* permittedNames; /* Permitted name bases */ - Base_entry* excludedNames; /* Excluded name bases */ -#endif /* IGNORE_NAME_CONSTRAINTS */ - byte subjectHash[SHA_SIZE]; /* hash of all Names */ - byte issuerHash[SHA_SIZE]; /* hash of all Names */ -#ifdef HAVE_OCSP - byte issuerKeyHash[SHA_SIZE]; /* hash of the public Key */ -#endif /* HAVE_OCSP */ - byte* signature; /* not owned, points into raw cert */ - char* subjectCN; /* CommonName */ - int subjectCNLen; - int subjectCNStored; /* have we saved a copy we own */ - char issuer[ASN_NAME_MAX]; /* full name including common name */ - char subject[ASN_NAME_MAX]; /* full name including common name */ - int verify; /* Default to yes, but could be off */ - byte* source; /* byte buffer holder cert, NOT owner */ - word32 srcIdx; /* current offset into buffer */ - word32 maxIdx; /* max offset based on init size */ - void* heap; /* for user memory overrides */ - byte serial[EXTERNAL_SERIAL_SIZE]; /* raw serial number */ - int serialSz; /* raw serial bytes stored */ - byte* extensions; /* not owned, points into raw cert */ - int extensionsSz; /* length of cert extensions */ - word32 extensionsIdx; /* if want to go back and parse later */ - byte* extAuthInfo; /* Authority Information Access URI */ - int extAuthInfoSz; /* length of the URI */ - byte* extCrlInfo; /* CRL Distribution Points */ - int extCrlInfoSz; /* length of the URI */ - byte extSubjKeyId[SHA_SIZE]; /* Subject Key ID */ - byte extSubjKeyIdSet; /* Set when the SKID was read from cert */ - byte extAuthKeyId[SHA_SIZE]; /* Authority Key ID */ - byte extAuthKeyIdSet; /* Set when the AKID was read from cert */ -#ifndef IGNORE_NAME_CONSTRAINTS - byte extNameConstraintSet; -#endif /* IGNORE_NAME_CONSTRAINTS */ - byte isCA; /* CA basic constraint true */ - byte extKeyUsageSet; - word16 extKeyUsage; /* Key usage bitfield */ - byte extExtKeyUsageSet; /* Extended Key Usage */ - byte extExtKeyUsage; /* Extended Key usage bitfield */ -#ifdef OPENSSL_EXTRA - byte extBasicConstSet; - byte extBasicConstCrit; - byte extBasicConstPlSet; - word32 pathLength; /* CA basic constraint path length, opt */ - byte extSubjAltNameSet; - byte extSubjAltNameCrit; - byte extAuthKeyIdCrit; -#ifndef IGNORE_NAME_CONSTRAINTS - byte extNameConstraintCrit; -#endif /* IGNORE_NAME_CONSTRAINTS */ - byte extSubjKeyIdCrit; - byte extKeyUsageCrit; - byte extExtKeyUsageCrit; - byte* extExtKeyUsageSrc; - word32 extExtKeyUsageSz; - word32 extExtKeyUsageCount; - byte* extAuthKeyIdSrc; - word32 extAuthKeyIdSz; - byte* extSubjKeyIdSrc; - word32 extSubjKeyIdSz; -#endif -#ifdef HAVE_ECC - word32 pkCurveOID; /* Public Key's curve OID */ -#endif /* HAVE_ECC */ - byte* beforeDate; - int beforeDateLen; - byte* afterDate; - int afterDateLen; -#ifdef HAVE_PKCS7 - byte* issuerRaw; /* pointer to issuer inside source */ - int issuerRawLen; -#endif -#ifndef IGNORE_NAME_CONSTRAINT - byte* subjectRaw; /* pointer to subject inside source */ - int subjectRawLen; -#endif -#if defined(CYASSL_CERT_GEN) - /* easy access to subject info for other sign */ - char* subjectSN; - int subjectSNLen; - char* subjectC; - int subjectCLen; - char* subjectL; - int subjectLLen; - char* subjectST; - int subjectSTLen; - char* subjectO; - int subjectOLen; - char* subjectOU; - int subjectOULen; - char* subjectEmail; - int subjectEmailLen; -#endif /* CYASSL_CERT_GEN */ -#ifdef OPENSSL_EXTRA - DecodedName issuerName; - DecodedName subjectName; -#endif /* OPENSSL_EXTRA */ -#ifdef CYASSL_SEP - int deviceTypeSz; - byte* deviceType; - int hwTypeSz; - byte* hwType; - int hwSerialNumSz; - byte* hwSerialNum; - #ifdef OPENSSL_EXTRA - byte extCertPolicySet; - byte extCertPolicyCrit; - #endif /* OPENSSL_EXTRA */ -#endif /* CYASSL_SEP */ -}; - - -#ifdef SHA_DIGEST_SIZE - #define SIGNER_DIGEST_SIZE SHA_DIGEST_SIZE -#else - #define SIGNER_DIGEST_SIZE 20 -#endif - -/* CA Signers */ -/* if change layout change PERSIST_CERT_CACHE functions too */ -struct Signer { - word32 pubKeySize; - word32 keyOID; /* key type */ - word16 keyUsage; - byte* publicKey; - int nameLen; - char* name; /* common name */ -#ifndef IGNORE_NAME_CONSTRAINTS - Base_entry* permittedNames; - Base_entry* excludedNames; -#endif /* IGNORE_NAME_CONSTRAINTS */ - byte subjectNameHash[SIGNER_DIGEST_SIZE]; - /* sha hash of names in certificate */ - #ifndef NO_SKID - byte subjectKeyIdHash[SIGNER_DIGEST_SIZE]; - /* sha hash of names in certificate */ - #endif - Signer* next; -}; - - -/* not for public consumption but may use for testing sometimes */ -#ifdef CYASSL_TEST_CERT - #define CYASSL_TEST_API CYASSL_API -#else - #define CYASSL_TEST_API CYASSL_LOCAL -#endif - -CYASSL_TEST_API void FreeAltNames(DNS_entry*, void*); -#ifndef IGNORE_NAME_CONSTRAINTS - CYASSL_TEST_API void FreeNameSubtrees(Base_entry*, void*); -#endif /* IGNORE_NAME_CONSTRAINTS */ -CYASSL_TEST_API void InitDecodedCert(DecodedCert*, byte*, word32, void*); -CYASSL_TEST_API void FreeDecodedCert(DecodedCert*); -CYASSL_TEST_API int ParseCert(DecodedCert*, int type, int verify, void* cm); - -CYASSL_LOCAL int ParseCertRelative(DecodedCert*, int type, int verify,void* cm); -CYASSL_LOCAL int DecodeToKey(DecodedCert*, int verify); - -CYASSL_LOCAL word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, - int hashOID); - -CYASSL_LOCAL Signer* MakeSigner(void*); -CYASSL_LOCAL void FreeSigner(Signer*, void*); -CYASSL_LOCAL void FreeSignerTable(Signer**, int, void*); - - -CYASSL_LOCAL int ToTraditional(byte* buffer, word32 length); -CYASSL_LOCAL int ToTraditionalEnc(byte* buffer, word32 length,const char*, int); - -CYASSL_LOCAL int ValidateDate(const byte* date, byte format, int dateType); - -/* ASN.1 helper functions */ -CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx); -CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx); -CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len, - word32 maxIdx); -CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, - int* version); -CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx, - word32 maxIdx); -CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid, - word32 maxIdx); -CYASSL_LOCAL word32 SetLength(word32 length, byte* output); -CYASSL_LOCAL word32 SetSequence(word32 len, byte* output); -CYASSL_LOCAL word32 SetOctetString(word32 len, byte* output); -CYASSL_LOCAL word32 SetImplicit(byte tag, byte number, word32 len,byte* output); -CYASSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output); -CYASSL_LOCAL word32 SetSet(word32 len, byte* output); -CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz); -CYASSL_LOCAL int SetMyVersion(word32 version, byte* output, int header); -CYASSL_LOCAL int SetSerialNumber(const byte* sn, word32 snSz, byte* output); -CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash, - int maxIdx); - -#ifdef HAVE_ECC - /* ASN sig helpers */ - CYASSL_LOCAL int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, - mp_int* s); - CYASSL_LOCAL int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, - mp_int* r, mp_int* s); -#endif - -#ifdef CYASSL_CERT_GEN - -enum cert_enums { - NAME_ENTRIES = 8, - JOINT_LEN = 2, - EMAIL_JOINT_LEN = 9, - RSA_KEY = 10, - NTRU_KEY = 11, - ECC_KEY = 12 -}; - - -#endif /* CYASSL_CERT_GEN */ - - - -/* for pointer use */ -typedef struct CertStatus CertStatus; - -#ifdef HAVE_OCSP - -enum Ocsp_Response_Status { - OCSP_SUCCESSFUL = 0, /* Response has valid confirmations */ - OCSP_MALFORMED_REQUEST = 1, /* Illegal confirmation request */ - OCSP_INTERNAL_ERROR = 2, /* Internal error in issuer */ - OCSP_TRY_LATER = 3, /* Try again later */ - OCSP_SIG_REQUIRED = 5, /* Must sign the request (4 is skipped) */ - OCSP_UNAUTHROIZED = 6 /* Request unauthorized */ -}; - - -enum Ocsp_Cert_Status { - CERT_GOOD = 0, - CERT_REVOKED = 1, - CERT_UNKNOWN = 2 -}; - - -enum Ocsp_Sums { - OCSP_BASIC_OID = 117, - OCSP_NONCE_OID = 118 -}; - - -typedef struct OcspRequest OcspRequest; -typedef struct OcspResponse OcspResponse; - - -struct CertStatus { - CertStatus* next; - - byte serial[EXTERNAL_SERIAL_SIZE]; - int serialSz; - - int status; - - byte thisDate[MAX_DATE_SIZE]; - byte nextDate[MAX_DATE_SIZE]; - byte thisDateFormat; - byte nextDateFormat; -}; - - -struct OcspResponse { - int responseStatus; /* return code from Responder */ - - byte* response; /* Pointer to beginning of OCSP Response */ - word32 responseSz; /* length of the OCSP Response */ - - byte producedDate[MAX_DATE_SIZE]; - /* Date at which this response was signed */ - byte producedDateFormat; /* format of the producedDate */ - byte* issuerHash; - byte* issuerKeyHash; - - byte* cert; - word32 certSz; - - byte* sig; /* Pointer to sig in source */ - word32 sigSz; /* Length in octets for the sig */ - word32 sigOID; /* OID for hash used for sig */ - - CertStatus* status; /* certificate status to fill out */ - - byte* nonce; /* pointer to nonce inside ASN.1 response */ - int nonceSz; /* length of the nonce string */ - - byte* source; /* pointer to source buffer, not owned */ - word32 maxIdx; /* max offset based on init size */ -}; - - -struct OcspRequest { - DecodedCert* cert; - - byte useNonce; - byte nonce[MAX_OCSP_NONCE_SZ]; - int nonceSz; - - byte* issuerHash; /* pointer to issuerHash in source cert */ - byte* issuerKeyHash; /* pointer to issuerKeyHash in source cert */ - byte* serial; /* pointer to serial number in source cert */ - int serialSz; /* length of the serial number */ - - byte* dest; /* pointer to the destination ASN.1 buffer */ - word32 destSz; /* length of the destination buffer */ -}; - - -CYASSL_LOCAL void InitOcspResponse(OcspResponse*, CertStatus*, byte*, word32); -CYASSL_LOCAL int OcspResponseDecode(OcspResponse*); - -CYASSL_LOCAL void InitOcspRequest(OcspRequest*, DecodedCert*, - byte, byte*, word32); -CYASSL_LOCAL int EncodeOcspRequest(OcspRequest*); - -CYASSL_LOCAL int CompareOcspReqResp(OcspRequest*, OcspResponse*); - - -#endif /* HAVE_OCSP */ - - -/* for pointer use */ -typedef struct RevokedCert RevokedCert; - -#ifdef HAVE_CRL - -struct RevokedCert { - byte serialNumber[EXTERNAL_SERIAL_SIZE]; - int serialSz; - RevokedCert* next; -}; - -typedef struct DecodedCRL DecodedCRL; - -struct DecodedCRL { - word32 certBegin; /* offset to start of cert */ - word32 sigIndex; /* offset to start of signature */ - word32 sigLength; /* length of signature */ - word32 signatureOID; /* sum of algorithm object id */ - byte* signature; /* pointer into raw source, not owned */ - byte issuerHash[SHA_DIGEST_SIZE]; /* issuer hash */ - byte crlHash[SHA_DIGEST_SIZE]; /* raw crl data hash */ - byte lastDate[MAX_DATE_SIZE]; /* last date updated */ - byte nextDate[MAX_DATE_SIZE]; /* next update date */ - byte lastDateFormat; /* format of last date */ - byte nextDateFormat; /* format of next date */ - RevokedCert* certs; /* revoked cert list */ - int totalCerts; /* number on list */ -}; - -CYASSL_LOCAL void InitDecodedCRL(DecodedCRL*); -CYASSL_LOCAL int ParseCRL(DecodedCRL*, const byte* buff, word32 sz, void* cm); -CYASSL_LOCAL void FreeDecodedCRL(DecodedCRL*); - - -#endif /* HAVE_CRL */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_ASN_H */ - -#endif /* !NO_ASN */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h deleted file mode 100644 index 3ad60170..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/asn_public.h +++ /dev/null @@ -1,177 +0,0 @@ -/* asn_public.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_ASN_PUBLIC_H -#define CTAO_CRYPT_ASN_PUBLIC_H - -#include -#include -#ifdef CYASSL_CERT_GEN - #include -#endif - - -#ifdef __cplusplus - extern "C" { -#endif - - -/* Certificate file Type */ -enum CertType { - CERT_TYPE = 0, - PRIVATEKEY_TYPE, - DH_PARAM_TYPE, - CRL_TYPE, - CA_TYPE, - ECC_PRIVATEKEY_TYPE, - CERTREQ_TYPE -}; - - -/* Signature type, by OID sum */ -enum Ctc_SigType { - CTC_SHAwDSA = 517, - CTC_MD2wRSA = 646, - CTC_MD5wRSA = 648, - CTC_SHAwRSA = 649, - CTC_SHAwECDSA = 520, - CTC_SHA256wRSA = 655, - CTC_SHA256wECDSA = 524, - CTC_SHA384wRSA = 656, - CTC_SHA384wECDSA = 525, - CTC_SHA512wRSA = 657, - CTC_SHA512wECDSA = 526 -}; - - -#ifdef CYASSL_CERT_GEN - -#ifndef HAVE_ECC - typedef struct ecc_key ecc_key; -#endif - -enum Ctc_Misc { - CTC_NAME_SIZE = 64, - CTC_DATE_SIZE = 32, - CTC_MAX_ALT_SIZE = 8192, /* may be huge */ - CTC_SERIAL_SIZE = 8 -}; - -typedef struct CertName { - char country[CTC_NAME_SIZE]; - char state[CTC_NAME_SIZE]; - char locality[CTC_NAME_SIZE]; - char sur[CTC_NAME_SIZE]; - char org[CTC_NAME_SIZE]; - char unit[CTC_NAME_SIZE]; - char commonName[CTC_NAME_SIZE]; - char email[CTC_NAME_SIZE]; /* !!!! email has to be last !!!! */ -} CertName; - - -/* for user to fill for certificate generation */ -typedef struct Cert { - int version; /* x509 version */ - byte serial[CTC_SERIAL_SIZE]; /* serial number */ - int sigType; /* signature algo type */ - CertName issuer; /* issuer info */ - int daysValid; /* validity days */ - int selfSigned; /* self signed flag */ - CertName subject; /* subject info */ - int isCA; /* is this going to be a CA */ - /* internal use only */ - int bodySz; /* pre sign total size */ - int keyType; /* public key type of subject */ -#ifdef CYASSL_ALT_NAMES - byte altNames[CTC_MAX_ALT_SIZE]; /* altNames copy */ - int altNamesSz; /* altNames size in bytes */ - byte beforeDate[CTC_DATE_SIZE]; /* before date copy */ - int beforeDateSz; /* size of copy */ - byte afterDate[CTC_DATE_SIZE]; /* after date copy */ - int afterDateSz; /* size of copy */ -#endif -#ifdef CYASSL_CERT_REQ - char challengePw[CTC_NAME_SIZE]; -#endif -} Cert; - - - - -/* Initialize and Set Certficate defaults: - version = 3 (0x2) - serial = 0 (Will be randomly generated) - sigType = SHA_WITH_RSA - issuer = blank - daysValid = 500 - selfSigned = 1 (true) use subject as issuer - subject = blank - isCA = 0 (false) - keyType = RSA_KEY (default) -*/ -CYASSL_API void InitCert(Cert*); -CYASSL_API int MakeCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*, - ecc_key*, RNG*); -#ifdef CYASSL_CERT_REQ - CYASSL_API int MakeCertReq(Cert*, byte* derBuffer, word32 derSz, RsaKey*, - ecc_key*); -#endif -CYASSL_API int SignCert(int requestSz, int sigType, byte* derBuffer, - word32 derSz, RsaKey*, ecc_key*, RNG*); -CYASSL_API int MakeSelfCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*, - RNG*); -CYASSL_API int SetIssuer(Cert*, const char*); -CYASSL_API int SetSubject(Cert*, const char*); -#ifdef CYASSL_ALT_NAMES - CYASSL_API int SetAltNames(Cert*, const char*); -#endif -CYASSL_API int SetIssuerBuffer(Cert*, const byte*, int); -CYASSL_API int SetSubjectBuffer(Cert*, const byte*, int); -CYASSL_API int SetAltNamesBuffer(Cert*, const byte*, int); -CYASSL_API int SetDatesBuffer(Cert*, const byte*, int); - - #ifdef HAVE_NTRU - CYASSL_API int MakeNtruCert(Cert*, byte* derBuffer, word32 derSz, - const byte* ntruKey, word16 keySz, RNG*); - #endif - -#endif /* CYASSL_CERT_GEN */ - - -#if defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) - CYASSL_API int DerToPem(const byte* der, word32 derSz, byte* output, - word32 outputSz, int type); -#endif - -#ifdef HAVE_ECC - /* private key helpers */ - CYASSL_API int EccPrivateKeyDecode(const byte* input,word32* inOutIdx, - ecc_key*,word32); -#endif - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_ASN_PUBLIC_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h deleted file mode 100644 index d82bffc6..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-impl.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Written in 2012 by Samuel Neves - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . -*/ -/* blake2-impl.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAOCRYPT_BLAKE2_IMPL_H -#define CTAOCRYPT_BLAKE2_IMPL_H - -#include - -static inline word32 load32( const void *src ) -{ -#if defined(LITTLE_ENDIAN_ORDER) - return *( word32 * )( src ); -#else - const byte *p = ( byte * )src; - word32 w = *p++; - w |= ( word32 )( *p++ ) << 8; - w |= ( word32 )( *p++ ) << 16; - w |= ( word32 )( *p++ ) << 24; - return w; -#endif -} - -static inline word64 load64( const void *src ) -{ -#if defined(LITTLE_ENDIAN_ORDER) - return *( word64 * )( src ); -#else - const byte *p = ( byte * )src; - word64 w = *p++; - w |= ( word64 )( *p++ ) << 8; - w |= ( word64 )( *p++ ) << 16; - w |= ( word64 )( *p++ ) << 24; - w |= ( word64 )( *p++ ) << 32; - w |= ( word64 )( *p++ ) << 40; - w |= ( word64 )( *p++ ) << 48; - w |= ( word64 )( *p++ ) << 56; - return w; -#endif -} - -static inline void store32( void *dst, word32 w ) -{ -#if defined(LITTLE_ENDIAN_ORDER) - *( word32 * )( dst ) = w; -#else - byte *p = ( byte * )dst; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; -#endif -} - -static inline void store64( void *dst, word64 w ) -{ -#if defined(LITTLE_ENDIAN_ORDER) - *( word64 * )( dst ) = w; -#else - byte *p = ( byte * )dst; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; -#endif -} - -static inline word64 load48( const void *src ) -{ - const byte *p = ( const byte * )src; - word64 w = *p++; - w |= ( word64 )( *p++ ) << 8; - w |= ( word64 )( *p++ ) << 16; - w |= ( word64 )( *p++ ) << 24; - w |= ( word64 )( *p++ ) << 32; - w |= ( word64 )( *p++ ) << 40; - return w; -} - -static inline void store48( void *dst, word64 w ) -{ - byte *p = ( byte * )dst; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; w >>= 8; - *p++ = ( byte )w; -} - -static inline word32 rotl32( const word32 w, const unsigned c ) -{ - return ( w << c ) | ( w >> ( 32 - c ) ); -} - -static inline word64 rotl64( const word64 w, const unsigned c ) -{ - return ( w << c ) | ( w >> ( 64 - c ) ); -} - -static inline word32 rotr32( const word32 w, const unsigned c ) -{ - return ( w >> c ) | ( w << ( 32 - c ) ); -} - -static inline word64 rotr64( const word64 w, const unsigned c ) -{ - return ( w >> c ) | ( w << ( 64 - c ) ); -} - -/* prevents compiler optimizing out memset() */ -static inline void secure_zero_memory( void *v, word64 n ) -{ - volatile byte *p = ( volatile byte * )v; - - while( n-- ) *p++ = 0; -} - -#endif /* CTAOCRYPT_BLAKE2_IMPL_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h deleted file mode 100644 index ba5cc774..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2-int.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Written in 2012 by Samuel Neves - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . -*/ -/* blake2-int.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - - -#ifndef CTAOCRYPT_BLAKE2_INT_H -#define CTAOCRYPT_BLAKE2_INT_H - -#include - - -#if defined(_MSC_VER) - #define ALIGN(x) __declspec(align(x)) -#elif defined(__GNUC__) - #define ALIGN(x) __attribute__((aligned(x))) -#else - #define ALIGN(x) -#endif - - -#if defined(__cplusplus) - extern "C" { -#endif - - enum blake2s_constant - { - BLAKE2S_BLOCKBYTES = 64, - BLAKE2S_OUTBYTES = 32, - BLAKE2S_KEYBYTES = 32, - BLAKE2S_SALTBYTES = 8, - BLAKE2S_PERSONALBYTES = 8 - }; - - enum blake2b_constant - { - BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, - BLAKE2B_PERSONALBYTES = 16 - }; - -#pragma pack(push, 1) - typedef struct __blake2s_param - { - byte digest_length; /* 1 */ - byte key_length; /* 2 */ - byte fanout; /* 3 */ - byte depth; /* 4 */ - word32 leaf_length; /* 8 */ - byte node_offset[6];/* 14 */ - byte node_depth; /* 15 */ - byte inner_length; /* 16 */ - /* byte reserved[0]; */ - byte salt[BLAKE2B_SALTBYTES]; /* 24 */ - byte personal[BLAKE2S_PERSONALBYTES]; /* 32 */ - } blake2s_param; - - ALIGN( 64 ) typedef struct __blake2s_state - { - word32 h[8]; - word32 t[2]; - word32 f[2]; - byte buf[2 * BLAKE2S_BLOCKBYTES]; - word64 buflen; - byte last_node; - } blake2s_state ; - - typedef struct __blake2b_param - { - byte digest_length; /* 1 */ - byte key_length; /* 2 */ - byte fanout; /* 3 */ - byte depth; /* 4 */ - word32 leaf_length; /* 8 */ - word64 node_offset; /* 16 */ - byte node_depth; /* 17 */ - byte inner_length; /* 18 */ - byte reserved[14]; /* 32 */ - byte salt[BLAKE2B_SALTBYTES]; /* 48 */ - byte personal[BLAKE2B_PERSONALBYTES]; /* 64 */ - } blake2b_param; - - ALIGN( 64 ) typedef struct __blake2b_state - { - word64 h[8]; - word64 t[2]; - word64 f[2]; - byte buf[2 * BLAKE2B_BLOCKBYTES]; - word64 buflen; - byte last_node; - } blake2b_state; - - typedef struct __blake2sp_state - { - blake2s_state S[8][1]; - blake2s_state R[1]; - byte buf[8 * BLAKE2S_BLOCKBYTES]; - word64 buflen; - } blake2sp_state; - - typedef struct __blake2bp_state - { - blake2b_state S[4][1]; - blake2b_state R[1]; - byte buf[4 * BLAKE2B_BLOCKBYTES]; - word64 buflen; - } blake2bp_state; -#pragma pack(pop) - - /* Streaming API */ - int blake2s_init( blake2s_state *S, const byte outlen ); - int blake2s_init_key( blake2s_state *S, const byte outlen, const void *key, const byte keylen ); - int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); - int blake2s_update( blake2s_state *S, const byte *in, word64 inlen ); - int blake2s_final( blake2s_state *S, byte *out, byte outlen ); - - int blake2b_init( blake2b_state *S, const byte outlen ); - int blake2b_init_key( blake2b_state *S, const byte outlen, const void *key, const byte keylen ); - int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); - int blake2b_update( blake2b_state *S, const byte *in, word64 inlen ); - int blake2b_final( blake2b_state *S, byte *out, byte outlen ); - - int blake2sp_init( blake2sp_state *S, const byte outlen ); - int blake2sp_init_key( blake2sp_state *S, const byte outlen, const void *key, const byte keylen ); - int blake2sp_update( blake2sp_state *S, const byte *in, word64 inlen ); - int blake2sp_final( blake2sp_state *S, byte *out, byte outlen ); - - int blake2bp_init( blake2bp_state *S, const byte outlen ); - int blake2bp_init_key( blake2bp_state *S, const byte outlen, const void *key, const byte keylen ); - int blake2bp_update( blake2bp_state *S, const byte *in, word64 inlen ); - int blake2bp_final( blake2bp_state *S, byte *out, byte outlen ); - - /* Simple API */ - int blake2s( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); - int blake2b( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); - - int blake2sp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); - int blake2bp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); - - static inline int blake2( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ) - { - return blake2b( out, in, key, outlen, inlen, keylen ); - } - - - -#if defined(__cplusplus) - } -#endif - -#endif /* CTAOCRYPT_BLAKE2_INT_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h deleted file mode 100644 index ba5ec6fd..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/blake2.h +++ /dev/null @@ -1,60 +0,0 @@ -/* blake2.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_BLAKE2 - -#ifndef CTAOCRYPT_BLAKE2_H -#define CTAOCRYPT_BLAKE2_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/* in bytes, variable digest size up to 512 bits (64 bytes) */ -enum { - BLAKE2B_ID = 7, /* hash type unique */ - BLAKE2B_256 = 32 /* 256 bit type, SSL default */ -}; - - -/* BLAKE2b digest */ -typedef struct Blake2b { - blake2b_state S[1]; /* our state */ - word32 digestSz; /* digest size used on init */ -} Blake2b; - - -CYASSL_API int InitBlake2b(Blake2b*, word32); -CYASSL_API int Blake2bUpdate(Blake2b*, const byte*, word32); -CYASSL_API int Blake2bFinal(Blake2b*, byte*, word32); - - - -#ifdef __cplusplus - } -#endif - -#endif /* CTAOCRYPT_BLAKE2_H */ -#endif /* HAVE_BLAKE2 */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h deleted file mode 100644 index aec9ecf6..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/camellia.h +++ /dev/null @@ -1,96 +0,0 @@ -/* camellia.h ver 1.2.0 - * - * Copyright (c) 2006,2007 - * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer as - * the first lines of this file unmodified. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* camellia.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CAMELLIA - -#ifndef CTAO_CRYPT_CAMELLIA_H -#define CTAO_CRYPT_CAMELLIA_H - - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - CAMELLIA_BLOCK_SIZE = 16 -}; - -#define CAMELLIA_TABLE_BYTE_LEN 272 -#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / sizeof(word32)) - -typedef word32 KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; - -typedef struct Camellia { - word32 keySz; - KEY_TABLE_TYPE key; - word32 reg[CAMELLIA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ - word32 tmp[CAMELLIA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ -} Camellia; - - -CYASSL_API int CamelliaSetKey(Camellia* cam, - const byte* key, word32 len, const byte* iv); -CYASSL_API int CamelliaSetIV(Camellia* cam, const byte* iv); -CYASSL_API void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in); -CYASSL_API void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in); -CYASSL_API void CamelliaCbcEncrypt(Camellia* cam, - byte* out, const byte* in, word32 sz); -CYASSL_API void CamelliaCbcDecrypt(Camellia* cam, - byte* out, const byte* in, word32 sz); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_AES_H */ -#endif /* HAVE_CAMELLIA */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h deleted file mode 100644 index 303565fd..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/coding.h +++ /dev/null @@ -1,58 +0,0 @@ -/* coding.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_CODING_H -#define CTAO_CRYPT_CODING_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* decode needed by CyaSSL */ -CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out, - word32* outLen); - -#if defined(OPENSSL_EXTRA) || defined(SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) - /* encode isn't */ - CYASSL_API - int Base64_Encode(const byte* in, word32 inLen, byte* out, - word32* outLen); - CYASSL_API - int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, - word32* outLen); -#endif - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) - CYASSL_API - int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen); -#endif - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_CODING_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h deleted file mode 100644 index ecf16220..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/compress.h +++ /dev/null @@ -1,52 +0,0 @@ -/* compress.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_LIBZ - -#ifndef CTAO_CRYPT_COMPRESS_H -#define CTAO_CRYPT_COMPRESS_H - - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - -#define COMPRESS_FIXED 1 - - -CYASSL_API int Compress(byte*, word32, const byte*, word32, word32); -CYASSL_API int DeCompress(byte*, word32, const byte*, word32); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_COMPRESS_H */ - -#endif /* HAVE_LIBZ */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h deleted file mode 100644 index 5a95851d..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/des3.h +++ /dev/null @@ -1,137 +0,0 @@ -/* des3.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_DES3 - -#ifndef CTAO_CRYPT_DES3_H -#define CTAO_CRYPT_DES3_H - - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - -#define CYASSL_3DES_CAVIUM_MAGIC 0xBEEF0003 - -enum { - DES_ENC_TYPE = 2, /* cipher unique type */ - DES3_ENC_TYPE = 3, /* cipher unique type */ - DES_BLOCK_SIZE = 8, - DES_KS_SIZE = 32, - - DES_ENCRYPTION = 0, - DES_DECRYPTION = 1 -}; - -#define DES_IVLEN 8 -#define DES_KEYLEN 8 -#define DES3_IVLEN 8 -#define DES3_KEYLEN 24 - - -#ifdef STM32F2_CRYPTO -enum { - DES_CBC = 0, - DES_ECB = 1 -}; -#endif - - -/* DES encryption and decryption */ -typedef struct Des { - word32 reg[DES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ - word32 tmp[DES_BLOCK_SIZE / sizeof(word32)]; /* same */ -#ifdef HAVE_COLDFIRE_SEC - byte keylen ; /* for Coldfire SEC */ - byte ivlen ; /* for Coldfire SEC */ - byte iv[DES3_IVLEN]; /* for Coldfire SEC */ -#endif - word32 key[DES_KS_SIZE]; -} Des; - - -/* DES3 encryption and decryption */ -typedef struct Des3 { -#ifdef HAVE_COLDFIRE_SEC - byte keylen ; /* for Coldfire SEC */ - byte ivlen ; /* for Coldfire SEC */ - byte iv[DES3_IVLEN]; /* for Coldfire SEC */ -#endif - word32 key[3][DES_KS_SIZE]; - word32 reg[DES_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ - word32 tmp[DES_BLOCK_SIZE / sizeof(word32)]; /* same */ -#ifdef HAVE_CAVIUM - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ - word64 contextHandle; /* nitrox context memory handle */ -#endif -} Des3; - - -CYASSL_API int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir); -CYASSL_API void Des_SetIV(Des* des, const byte* iv); -CYASSL_API void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz); -CYASSL_API void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz); -CYASSL_API void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz); - -CYASSL_API int Des3_SetKey(Des3* des, const byte* key, const byte* iv,int dir); -CYASSL_API int Des3_SetIV(Des3* des, const byte* iv); -CYASSL_API int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in,word32 sz); -CYASSL_API int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in,word32 sz); - - -#ifdef HAVE_CAVIUM - CYASSL_API int Des3_InitCavium(Des3*, int); - CYASSL_API void Des3_FreeCavium(Des3*); -#endif - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int Des3_SetKey_fips(Des3* des, const byte* key, const byte* iv, - int dir); - CYASSL_API int Des3_SetIV_fips(Des3* des, const byte* iv); - CYASSL_API int Des3_CbcEncrypt_fips(Des3* des, byte* out, const byte* in, - word32 sz); - CYASSL_API int Des3_CbcDecrypt_fips(Des3* des, byte* out, const byte* in, - word32 sz); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define Des3_SetKey Des3_SetKey_fips - #define Des3_SetIV Des3_SetIV_fips - #define Des3_CbcEncrypt Des3_CbcEncrypt_fips - #define Des3_CbcDecrypt Des3_CbcDecrypt_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* NO_DES3 */ -#endif /* CTAO_CRYPT_DES3_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h deleted file mode 100644 index f700e333..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dh.h +++ /dev/null @@ -1,67 +0,0 @@ -/* dh.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_DH - -#ifndef CTAO_CRYPT_DH_H -#define CTAO_CRYPT_DH_H - -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* Diffie-Hellman Key */ -typedef struct DhKey { - mp_int p, g; /* group parameters */ -} DhKey; - - -CYASSL_API void InitDhKey(DhKey* key); -CYASSL_API void FreeDhKey(DhKey* key); - -CYASSL_API int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, - word32* privSz, byte* pub, word32* pubSz); -CYASSL_API int DhAgree(DhKey* key, byte* agree, word32* agreeSz, - const byte* priv, word32 privSz, const byte* otherPub, - word32 pubSz); - -CYASSL_API int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, - word32); -CYASSL_API int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, - word32 gSz); -CYASSL_API int DhParamsLoad(const byte* input, word32 inSz, byte* p, - word32* pInOutSz, byte* g, word32* gInOutSz); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_DH_H */ - -#endif /* NO_DH */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h deleted file mode 100644 index 8bfc3215..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/dsa.h +++ /dev/null @@ -1,67 +0,0 @@ -/* dsa.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_DSA - -#ifndef CTAO_CRYPT_DSA_H -#define CTAO_CRYPT_DSA_H - -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - DSA_PUBLIC = 0, - DSA_PRIVATE = 1 -}; - -/* DSA */ -typedef struct DsaKey { - mp_int p, q, g, y, x; - int type; /* public or private */ -} DsaKey; - - -CYASSL_API void InitDsaKey(DsaKey* key); -CYASSL_API void FreeDsaKey(DsaKey* key); - -CYASSL_API int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng); -CYASSL_API int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, - int* answer); - -CYASSL_API int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey*, - word32); -CYASSL_API int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey*, - word32); - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_DSA_H */ -#endif /* NO_DSA */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h deleted file mode 100644 index 0c44a4f0..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ecc.h +++ /dev/null @@ -1,182 +0,0 @@ -/* ecc.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_ECC - -#ifndef CTAO_CRYPT_ECC_H -#define CTAO_CRYPT_ECC_H - -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - ECC_PUBLICKEY = 1, - ECC_PRIVATEKEY = 2, - ECC_MAXNAME = 16, /* MAX CURVE NAME LENGTH */ - SIG_HEADER_SZ = 6, /* ECC signature header size */ - ECC_BUFSIZE = 256, /* for exported keys temp buffer */ - ECC_MINSIZE = 20, /* MIN Private Key size */ - ECC_MAXSIZE = 66 /* MAX Private Key size */ -}; - - -/* ECC set type defined a NIST GF(p) curve */ -typedef struct { - int size; /* The size of the curve in octets */ - const char* name; /* name of this curve */ - const char* prime; /* prime that defines the field, curve is in (hex) */ - const char* Bf; /* fields B param (hex) */ - const char* order; /* order of the curve (hex) */ - const char* Gx; /* x coordinate of the base point on curve (hex) */ - const char* Gy; /* y coordinate of the base point on curve (hex) */ -} ecc_set_type; - - -/* A point on an ECC curve, stored in Jacbobian format such that (x,y,z) => - (x/z^2, y/z^3, 1) when interpreted as affine */ -typedef struct { - mp_int x; /* The x coordinate */ - mp_int y; /* The y coordinate */ - mp_int z; /* The z coordinate */ -} ecc_point; - - -/* An ECC Key */ -typedef struct { - int type; /* Public or Private */ - int idx; /* Index into the ecc_sets[] for the parameters of - this curve if -1, this key is using user supplied - curve in dp */ - const ecc_set_type* dp; /* domain parameters, either points to NIST - curves (idx >= 0) or user supplied */ - ecc_point pubkey; /* public key */ - mp_int k; /* private key */ -} ecc_key; - - -/* ECC predefined curve sets */ -extern const ecc_set_type ecc_sets[]; - - -CYASSL_API -int ecc_make_key(RNG* rng, int keysize, ecc_key* key); -CYASSL_API -int ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, - word32* outlen); -CYASSL_API -int ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen, - RNG* rng, ecc_key* key); -CYASSL_API -int ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash, - word32 hashlen, int* stat, ecc_key* key); -CYASSL_API -void ecc_init(ecc_key* key); -CYASSL_API -void ecc_free(ecc_key* key); -CYASSL_API -void ecc_fp_free(void); - - -/* ASN key helpers */ -CYASSL_API -int ecc_export_x963(ecc_key*, byte* out, word32* outLen); -CYASSL_API -int ecc_import_x963(const byte* in, word32 inLen, ecc_key* key); -CYASSL_API -int ecc_import_private_key(const byte* priv, word32 privSz, const byte* pub, - word32 pubSz, ecc_key* key); -CYASSL_API -int ecc_export_private_only(ecc_key* key, byte* out, word32* outLen); - -/* size helper */ -CYASSL_API -int ecc_size(ecc_key* key); -CYASSL_API -int ecc_sig_size(ecc_key* key); - - -#ifdef HAVE_ECC_ENCRYPT -/* ecc encrypt */ - -enum ecEncAlgo { - ecAES_128_CBC = 1, /* default */ - ecAES_256_CBC = 2 -}; - -enum ecKdfAlgo { - ecHKDF_SHA256 = 1, /* default */ - ecHKDF_SHA1 = 2 -}; - -enum ecMacAlgo { - ecHMAC_SHA256 = 1, /* default */ - ecHMAC_SHA1 = 2 -}; - -enum { - KEY_SIZE_128 = 16, - KEY_SIZE_256 = 32, - IV_SIZE_64 = 8, - EXCHANGE_SALT_SZ = 16, - EXCHANGE_INFO_SZ = 23 -}; - -enum ecFlags { - REQ_RESP_CLIENT = 1, - REQ_RESP_SERVER = 2 -}; - - -typedef struct ecEncCtx ecEncCtx; - -CYASSL_API -ecEncCtx* ecc_ctx_new(int flags, RNG* rng); -CYASSL_API -void ecc_ctx_free(ecEncCtx*); -CYASSL_API -int ecc_ctx_reset(ecEncCtx*, RNG*); /* reset for use again w/o alloc/free */ - -CYASSL_API -const byte* ecc_ctx_get_own_salt(ecEncCtx*); -CYASSL_API -int ecc_ctx_set_peer_salt(ecEncCtx*, const byte* salt); - -CYASSL_API -int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, - word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx); -CYASSL_API -int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg, - word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx); - -#endif /* HAVE_ECC_ENCRYPT */ - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_ECC_H */ -#endif /* HAVE_ECC */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h deleted file mode 100644 index 113d2d73..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/error-crypt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* error-crypt.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_ERROR_H -#define CTAO_CRYPT_ERROR_H - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - -/* error codes */ -enum { - MAX_CODE_E = -100, /* errors -101 - -199 */ - OPEN_RAN_E = -101, /* opening random device error */ - READ_RAN_E = -102, /* reading random device error */ - WINCRYPT_E = -103, /* windows crypt init error */ - CRYPTGEN_E = -104, /* windows crypt generation error */ - RAN_BLOCK_E = -105, /* reading random device would block */ - BAD_MUTEX_E = -106, /* Bad mutex operation */ - - MP_INIT_E = -110, /* mp_init error state */ - MP_READ_E = -111, /* mp_read error state */ - MP_EXPTMOD_E = -112, /* mp_exptmod error state */ - MP_TO_E = -113, /* mp_to_xxx error state, can't convert */ - MP_SUB_E = -114, /* mp_sub error state, can't subtract */ - MP_ADD_E = -115, /* mp_add error state, can't add */ - MP_MUL_E = -116, /* mp_mul error state, can't multiply */ - MP_MULMOD_E = -117, /* mp_mulmod error state, can't multiply mod */ - MP_MOD_E = -118, /* mp_mod error state, can't mod */ - MP_INVMOD_E = -119, /* mp_invmod error state, can't inv mod */ - MP_CMP_E = -120, /* mp_cmp error state */ - MP_ZERO_E = -121, /* got a mp zero result, not expected */ - - MEMORY_E = -125, /* out of memory error */ - - RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */ - RSA_BUFFER_E = -131, /* RSA buffer error, output too small or - input too large */ - BUFFER_E = -132, /* output buffer too small or input too large */ - ALGO_ID_E = -133, /* setting algo id error */ - PUBLIC_KEY_E = -134, /* setting public key error */ - DATE_E = -135, /* setting date validity error */ - SUBJECT_E = -136, /* setting subject name error */ - ISSUER_E = -137, /* setting issuer name error */ - CA_TRUE_E = -138, /* setting CA basic constraint true error */ - EXTENSIONS_E = -139, /* setting extensions error */ - - ASN_PARSE_E = -140, /* ASN parsing error, invalid input */ - ASN_VERSION_E = -141, /* ASN version error, invalid number */ - ASN_GETINT_E = -142, /* ASN get big int error, invalid data */ - ASN_RSA_KEY_E = -143, /* ASN key init error, invalid input */ - ASN_OBJECT_ID_E = -144, /* ASN object id error, invalid id */ - ASN_TAG_NULL_E = -145, /* ASN tag error, not null */ - ASN_EXPECT_0_E = -146, /* ASN expect error, not zero */ - ASN_BITSTR_E = -147, /* ASN bit string error, wrong id */ - ASN_UNKNOWN_OID_E = -148, /* ASN oid error, unknown sum id */ - ASN_DATE_SZ_E = -149, /* ASN date error, bad size */ - ASN_BEFORE_DATE_E = -150, /* ASN date error, current date before */ - ASN_AFTER_DATE_E = -151, /* ASN date error, current date after */ - ASN_SIG_OID_E = -152, /* ASN signature error, mismatched oid */ - ASN_TIME_E = -153, /* ASN time error, unknown time type */ - ASN_INPUT_E = -154, /* ASN input error, not enough data */ - ASN_SIG_CONFIRM_E = -155, /* ASN sig error, confirm failure */ - ASN_SIG_HASH_E = -156, /* ASN sig error, unsupported hash type */ - ASN_SIG_KEY_E = -157, /* ASN sig error, unsupported key type */ - ASN_DH_KEY_E = -158, /* ASN key init error, invalid input */ - ASN_NTRU_KEY_E = -159, /* ASN ntru key decode error, invalid input */ - ASN_CRIT_EXT_E = -160, /* ASN unsupported critical extension */ - - ECC_BAD_ARG_E = -170, /* ECC input argument of wrong type */ - ASN_ECC_KEY_E = -171, /* ASN ECC bad input */ - ECC_CURVE_OID_E = -172, /* Unsupported ECC OID curve type */ - BAD_FUNC_ARG = -173, /* Bad function argument provided */ - NOT_COMPILED_IN = -174, /* Feature not compiled in */ - UNICODE_SIZE_E = -175, /* Unicode password too big */ - NO_PASSWORD = -176, /* no password provided by user */ - ALT_NAME_E = -177, /* alt name size problem, too big */ - - AES_GCM_AUTH_E = -180, /* AES-GCM Authentication check failure */ - AES_CCM_AUTH_E = -181, /* AES-CCM Authentication check failure */ - - CAVIUM_INIT_E = -182, /* Cavium Init type error */ - - COMPRESS_INIT_E = -183, /* Compress init error */ - COMPRESS_E = -184, /* Compress error */ - DECOMPRESS_INIT_E = -185, /* DeCompress init error */ - DECOMPRESS_E = -186, /* DeCompress error */ - - BAD_ALIGN_E = -187, /* Bad alignment for operation, no alloc */ - ASN_NO_SIGNER_E = -188, /* ASN no signer to confirm failure */ - ASN_CRL_CONFIRM_E = -189, /* ASN CRL signature confirm failure */ - ASN_CRL_NO_SIGNER_E = -190, /* ASN CRL no signer to confirm failure */ - ASN_OCSP_CONFIRM_E = -191, /* ASN OCSP signature confirm failure */ - - BAD_ENC_STATE_E = -192, /* Bad ecc enc state operation */ - BAD_PADDING_E = -193, /* Bad padding, msg not correct length */ - - REQ_ATTRIBUTE_E = -194, /* setting cert request attributes error */ - - PKCS7_OID_E = -195, /* PKCS#7, mismatched OID error */ - PKCS7_RECIP_E = -196, /* PKCS#7, recipient error */ - FIPS_NOT_ALLOWED_E = -197, /* FIPS not allowed error */ - ASN_NAME_INVALID_E = -198, /* ASN name constraint error */ - - MIN_CODE_E = -200 /* errors -101 - -199 */ -}; - - -CYASSL_API void CTaoCryptErrorString(int err, char* buff); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_ERROR_H */ - - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h deleted file mode 100644 index 2015927c..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/fips_test.h +++ /dev/null @@ -1,43 +0,0 @@ -/* fips_test.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_FIPS_TEST_H -#define CTAO_CRYPT_FIPS_TEST_H - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - -/* Known Answer Test string inputs are hex */ - -CYASSL_LOCAL int DoKnownAnswerTests(void); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_FIPS_TEST_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h deleted file mode 100644 index 766a79b2..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hc128.h +++ /dev/null @@ -1,60 +0,0 @@ -/* hc128.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_HC128 - -#ifndef CTAO_CRYPT_HC128_H -#define CTAO_CRYPT_HC128_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - HC128_ENC_TYPE = 6 /* cipher unique type */ -}; - -/* HC-128 stream cipher */ -typedef struct HC128 { - word32 T[1024]; /* P[i] = T[i]; Q[i] = T[1024 + i ]; */ - word32 X[16]; - word32 Y[16]; - word32 counter1024; /* counter1024 = i mod 1024 at the ith step */ - word32 key[8]; - word32 iv[8]; -} HC128; - - -CYASSL_API int Hc128_Process(HC128*, byte*, const byte*, word32); -CYASSL_API int Hc128_SetKey(HC128*, const byte* key, const byte* iv); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_HC128_H */ - -#endif /* HAVE_HC128 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h deleted file mode 100644 index 68627efc..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/hmac.h +++ /dev/null @@ -1,199 +0,0 @@ -/* hmac.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_HMAC - -#ifndef CTAO_CRYPT_HMAC_H -#define CTAO_CRYPT_HMAC_H - -#include - -#ifndef NO_MD5 - #include -#endif - -#ifndef NO_SHA - #include -#endif - -#ifndef NO_SHA256 - #include -#endif - -#ifdef CYASSL_SHA512 - #include -#endif - -#ifdef HAVE_BLAKE2 - #include -#endif - -#ifdef HAVE_CAVIUM - #include - #include "cavium_common.h" -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -#define CYASSL_HMAC_CAVIUM_MAGIC 0xBEEF0005 - -enum { - IPAD = 0x36, - OPAD = 0x5C, - -/* If any hash is not enabled, add the ID here. */ -#ifdef NO_MD5 - MD5 = 0, -#endif -#ifdef NO_SHA - SHA = 1, -#endif -#ifdef NO_SHA256 - SHA256 = 2, -#endif -#ifndef CYASSL_SHA512 - SHA512 = 4, -#endif -#ifndef CYASSL_SHA384 - SHA384 = 5, -#endif -#ifndef HAVE_BLAKE2 - BLAKE2B_ID = 7, -#endif - -/* Select the largest available hash for the buffer size. */ -#if defined(CYASSL_SHA512) - MAX_DIGEST_SIZE = SHA512_DIGEST_SIZE, - HMAC_BLOCK_SIZE = SHA512_BLOCK_SIZE -#elif defined(HAVE_BLAKE2) - MAX_DIGEST_SIZE = BLAKE2B_OUTBYTES, - HMAC_BLOCK_SIZE = BLAKE2B_BLOCKBYTES, -#elif defined(CYASSL_SHA384) - MAX_DIGEST_SIZE = SHA384_DIGEST_SIZE, - HMAC_BLOCK_SIZE = SHA384_BLOCK_SIZE -#elif !defined(NO_SHA256) - MAX_DIGEST_SIZE = SHA256_DIGEST_SIZE, - HMAC_BLOCK_SIZE = SHA256_BLOCK_SIZE -#elif !defined(NO_SHA) - MAX_DIGEST_SIZE = SHA_DIGEST_SIZE, - HMAC_BLOCK_SIZE = SHA_BLOCK_SIZE -#elif !defined(NO_MD5) - MAX_DIGEST_SIZE = MD5_DIGEST_SIZE, - HMAC_BLOCK_SIZE = MD5_BLOCK_SIZE -#else - #error "You have to have some kind of hash if you want to use HMAC." -#endif -}; - - -/* hash union */ -typedef union { - #ifndef NO_MD5 - Md5 md5; - #endif - #ifndef NO_SHA - Sha sha; - #endif - #ifndef NO_SHA256 - Sha256 sha256; - #endif - #ifdef CYASSL_SHA384 - Sha384 sha384; - #endif - #ifdef CYASSL_SHA512 - Sha512 sha512; - #endif - #ifdef HAVE_BLAKE2 - Blake2b blake2b; - #endif -} Hash; - -/* Hmac digest */ -typedef struct Hmac { - Hash hash; - word32 ipad[HMAC_BLOCK_SIZE / sizeof(word32)]; /* same block size all*/ - word32 opad[HMAC_BLOCK_SIZE / sizeof(word32)]; - word32 innerHash[MAX_DIGEST_SIZE / sizeof(word32)]; - byte macType; /* md5 sha or sha256 */ - byte innerHashKeyed; /* keyed flag */ -#ifdef HAVE_CAVIUM - word16 keyLen; /* hmac key length */ - word16 dataLen; - HashType type; /* hmac key type */ - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ - word64 contextHandle; /* nitrox context memory handle */ - byte* data; /* buffered input data for one call */ -#endif -} Hmac; - - -/* does init */ -CYASSL_API int HmacSetKey(Hmac*, int type, const byte* key, word32 keySz); -CYASSL_API int HmacUpdate(Hmac*, const byte*, word32); -CYASSL_API int HmacFinal(Hmac*, byte*); - -#ifdef HAVE_CAVIUM - CYASSL_API int HmacInitCavium(Hmac*, int); - CYASSL_API void HmacFreeCavium(Hmac*); -#endif - -CYASSL_API int CyaSSL_GetHmacMaxSize(void); - - -#ifdef HAVE_HKDF - -CYASSL_API int HKDF(int type, const byte* inKey, word32 inKeySz, - const byte* salt, word32 saltSz, - const byte* info, word32 infoSz, - byte* out, word32 outSz); - -#endif /* HAVE_HKDF */ - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int HmacSetKey_fips(Hmac*, int type, const byte* key, - word32 keySz); - CYASSL_API int HmacUpdate_fips(Hmac*, const byte*, word32); - CYASSL_API int HmacFinal_fips(Hmac*, byte*); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define HmacSetKey HmacSetKey_fips - #define HmacUpdate HmacUpdate_fips - #define HmacFinal HmacFinal_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_HMAC_H */ - -#endif /* NO_HMAC */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am b/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am deleted file mode 100644 index 8165af42..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/include.am +++ /dev/null @@ -1,45 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -nobase_include_HEADERS+= \ - cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/camellia.h \ - cyassl/ctaocrypt/coding.h \ - cyassl/ctaocrypt/compress.h \ - cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/dh.h \ - cyassl/ctaocrypt/dsa.h \ - cyassl/ctaocrypt/ecc.h \ - cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/fips_test.h \ - cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/integer.h \ - cyassl/ctaocrypt/md2.h \ - cyassl/ctaocrypt/md4.h \ - cyassl/ctaocrypt/md5.h \ - cyassl/ctaocrypt/misc.h \ - cyassl/ctaocrypt/pkcs7.h \ - cyassl/ctaocrypt/port.h \ - cyassl/ctaocrypt/pwdbased.h \ - cyassl/ctaocrypt/rabbit.h \ - cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/ripemd.h \ - cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/settings.h \ - cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/sha512.h \ - cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/blake2.h \ - cyassl/ctaocrypt/blake2-int.h \ - cyassl/ctaocrypt/blake2-impl.h \ - cyassl/ctaocrypt/tfm.h \ - cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/visibility.h \ - cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/memory.h \ - cyassl/ctaocrypt/mpi_class.h \ - cyassl/ctaocrypt/mpi_superclass.h diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h deleted file mode 100644 index 8f20f901..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/integer.h +++ /dev/null @@ -1,317 +0,0 @@ -/* integer.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* - * Based on public domain LibTomMath 0.38 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -#ifndef CTAO_CRYPT_INTEGER_H -#define CTAO_CRYPT_INTEGER_H - -/* may optionally use fast math instead, not yet supported on all platforms and - may not be faster on all -*/ -#include /* will set MP_xxBIT if not default */ -#ifdef USE_FAST_MATH - #include -#else - -#ifndef CHAR_BIT - #include -#endif - -#include - -#ifndef MIN - #define MIN(x,y) ((x)<(y)?(x):(y)) -#endif - -#ifndef MAX - #define MAX(x,y) ((x)>(y)?(x):(y)) -#endif - -#ifdef __cplusplus -extern "C" { - -/* C++ compilers don't like assigning void * to mp_digit * */ -#define OPT_CAST(x) (x *) - -#else - -/* C on the other hand doesn't care */ -#define OPT_CAST(x) - -#endif - - -/* detect 64-bit mode if possible */ -#if defined(__x86_64__) - #if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) - #define MP_64BIT - #endif -#endif - -/* some default configurations. - * - * A "mp_digit" must be able to hold DIGIT_BIT + 1 bits - * A "mp_word" must be able to hold 2*DIGIT_BIT + 1 bits - * - * At the very least a mp_digit must be able to hold 7 bits - * [any size beyond that is ok provided it doesn't overflow the data type] - */ -#ifdef MP_8BIT - typedef unsigned char mp_digit; - typedef unsigned short mp_word; -#elif defined(MP_16BIT) || defined(NO_64BIT) - typedef unsigned short mp_digit; - typedef unsigned int mp_word; -#elif defined(MP_64BIT) - /* for GCC only on supported platforms */ - typedef unsigned long long mp_digit; /* 64 bit type, 128 uses mode(TI) */ - typedef unsigned long mp_word __attribute__ ((mode(TI))); - - #define DIGIT_BIT 60 -#else - /* this is the default case, 28-bit digits */ - - #if defined(_MSC_VER) || defined(__BORLANDC__) - typedef unsigned __int64 ulong64; - #else - typedef unsigned long long ulong64; - #endif - - typedef unsigned int mp_digit; /* long could be 64 now, changed TAO */ - typedef ulong64 mp_word; - -#ifdef MP_31BIT - /* this is an extension that uses 31-bit digits */ - #define DIGIT_BIT 31 -#else - /* default case is 28-bit digits, defines MP_28BIT as a handy test macro */ - #define DIGIT_BIT 28 - #define MP_28BIT -#endif -#endif - - -/* otherwise the bits per digit is calculated automatically from the size of - a mp_digit */ -#ifndef DIGIT_BIT - #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) - /* bits per digit */ -#endif - -#define MP_DIGIT_BIT DIGIT_BIT -#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1)) -#define MP_DIGIT_MAX MP_MASK - -/* equalities */ -#define MP_LT -1 /* less than */ -#define MP_EQ 0 /* equal to */ -#define MP_GT 1 /* greater than */ - -#define MP_ZPOS 0 /* positive integer */ -#define MP_NEG 1 /* negative */ - -#define MP_OKAY 0 /* ok result */ -#define MP_MEM -2 /* out of mem */ -#define MP_VAL -3 /* invalid input */ -#define MP_RANGE MP_VAL - -#define MP_YES 1 /* yes response */ -#define MP_NO 0 /* no response */ - -/* Primality generation flags */ -#define LTM_PRIME_BBS 0x0001 /* BBS style prime */ -#define LTM_PRIME_SAFE 0x0002 /* Safe prime (p-1)/2 == prime */ -#define LTM_PRIME_2MSB_ON 0x0008 /* force 2nd MSB to 1 */ - -typedef int mp_err; - -/* define this to use lower memory usage routines (exptmods mostly) */ -#define MP_LOW_MEM - -/* default precision */ -#ifndef MP_PREC - #ifndef MP_LOW_MEM - #define MP_PREC 32 /* default digits of precision */ - #else - #define MP_PREC 1 /* default digits of precision */ - #endif -#endif - -/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - - BITS_PER_DIGIT*2) */ -#define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1)) - -/* the infamous mp_int structure */ -typedef struct { - int used, alloc, sign; - mp_digit *dp; -} mp_int; - -/* callback for mp_prime_random, should fill dst with random bytes and return - how many read [upto len] */ -typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat); - - -#define USED(m) ((m)->used) -#define DIGIT(m,k) ((m)->dp[(k)]) -#define SIGN(m) ((m)->sign) - - -/* ---> Basic Manipulations <--- */ -#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO) -#define mp_iseven(a) \ - (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO) -#define mp_isodd(a) \ - (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO) - - -/* number of primes */ -#ifdef MP_8BIT - #define PRIME_SIZE 31 -#else - #define PRIME_SIZE 256 -#endif - -#define mp_prime_random(a, t, size, bbs, cb, dat) \ - mp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?LTM_PRIME_BBS:0, cb, dat) - -#define mp_read_raw(mp, str, len) mp_read_signed_bin((mp), (str), (len)) -#define mp_raw_size(mp) mp_signed_bin_size(mp) -#define mp_toraw(mp, str) mp_to_signed_bin((mp), (str)) -#define mp_read_mag(mp, str, len) mp_read_unsigned_bin((mp), (str), (len)) -#define mp_mag_size(mp) mp_unsigned_bin_size(mp) -#define mp_tomag(mp, str) mp_to_unsigned_bin((mp), (str)) - -#define mp_tobinary(M, S) mp_toradix((M), (S), 2) -#define mp_tooctal(M, S) mp_toradix((M), (S), 8) -#define mp_todecimal(M, S) mp_toradix((M), (S), 10) -#define mp_tohex(M, S) mp_toradix((M), (S), 16) - -#define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) - -extern const char *mp_s_rmap; - -/* 6 functions needed by Rsa */ -int mp_init (mp_int * a); -void mp_clear (mp_int * a); -int mp_unsigned_bin_size(mp_int * a); -int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c); -int mp_to_unsigned_bin (mp_int * a, unsigned char *b); -int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y); -/* end functions needed by Rsa */ - -/* functions added to support above needed, removed TOOM and KARATSUBA */ -int mp_count_bits (mp_int * a); -int mp_leading_bit (mp_int * a); -int mp_init_copy (mp_int * a, mp_int * b); -int mp_copy (mp_int * a, mp_int * b); -int mp_grow (mp_int * a, int size); -int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d); -void mp_zero (mp_int * a); -void mp_clamp (mp_int * a); -void mp_exch (mp_int * a, mp_int * b); -void mp_rshd (mp_int * a, int b); -void mp_rshb (mp_int * a, int b); -int mp_mod_2d (mp_int * a, int b, mp_int * c); -int mp_mul_2d (mp_int * a, int b, mp_int * c); -int mp_lshd (mp_int * a, int b); -int mp_abs (mp_int * a, mp_int * b); -int mp_invmod (mp_int * a, mp_int * b, mp_int * c); -int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c); -int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c); -int mp_cmp_mag (mp_int * a, mp_int * b); -int mp_cmp (mp_int * a, mp_int * b); -int mp_cmp_d(mp_int * a, mp_digit b); -void mp_set (mp_int * a, mp_digit b); -int mp_mod (mp_int * a, mp_int * b, mp_int * c); -int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d); -int mp_div_2(mp_int * a, mp_int * b); -int mp_add (mp_int * a, mp_int * b, mp_int * c); -int s_mp_add (mp_int * a, mp_int * b, mp_int * c); -int s_mp_sub (mp_int * a, mp_int * b, mp_int * c); -int mp_sub (mp_int * a, mp_int * b, mp_int * c); -int mp_reduce_is_2k_l(mp_int *a); -int mp_reduce_is_2k(mp_int *a); -int mp_dr_is_modulus(mp_int *a); -int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int); -int mp_montgomery_setup (mp_int * n, mp_digit * rho); -int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); -int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho); -void mp_dr_setup(mp_int *a, mp_digit *d); -int mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k); -int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d); -int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs); -int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs); -int mp_reduce_2k_setup_l(mp_int *a, mp_int *d); -int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d); -int mp_reduce (mp_int * x, mp_int * m, mp_int * mu); -int mp_reduce_setup (mp_int * a, mp_int * b); -int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode); -int mp_montgomery_calc_normalization (mp_int * a, mp_int * b); -int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs); -int s_mp_sqr (mp_int * a, mp_int * b); -int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs); -int fast_s_mp_sqr (mp_int * a, mp_int * b); -int mp_init_size (mp_int * a, int size); -int mp_div_3 (mp_int * a, mp_int *c, mp_digit * d); -int mp_mul_2(mp_int * a, mp_int * b); -int mp_mul (mp_int * a, mp_int * b, mp_int * c); -int mp_sqr (mp_int * a, mp_int * b); -int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d); -int mp_mul_d (mp_int * a, mp_digit b, mp_int * c); -int mp_2expt (mp_int * a, int b); -int mp_reduce_2k_setup(mp_int *a, mp_digit *d); -int mp_add_d (mp_int* a, mp_digit b, mp_int* c); -int mp_set_int (mp_int * a, unsigned long b); -int mp_sub_d (mp_int * a, mp_digit b, mp_int * c); -/* end support added functions */ - -/* added */ -int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, - mp_int* f); - -#if defined(HAVE_ECC) || defined(CYASSL_KEY_GEN) - int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c); -#endif -#ifdef HAVE_ECC - int mp_read_radix(mp_int* a, const char* str, int radix); -#endif - -#ifdef CYASSL_KEY_GEN - int mp_prime_is_prime (mp_int * a, int t, int *result); - int mp_gcd (mp_int * a, mp_int * b, mp_int * c); - int mp_lcm (mp_int * a, mp_int * b, mp_int * c); -#endif - -#ifdef __cplusplus - } -#endif - - -#endif /* USE_FAST_MATH */ - -#endif /* CTAO_CRYPT_INTEGER_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h deleted file mode 100644 index a361e8cc..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/logging.h +++ /dev/null @@ -1,70 +0,0 @@ -/* logging.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* submitted by eof */ - - -#ifndef CYASSL_LOGGING_H -#define CYASSL_LOGGING_H - - -#ifdef __cplusplus - extern "C" { -#endif - - -enum CYA_Log_Levels { - ERROR_LOG = 0, - INFO_LOG, - ENTER_LOG, - LEAVE_LOG, - OTHER_LOG -}; - -typedef void (*CyaSSL_Logging_cb)(const int logLevel, - const char *const logMessage); - -CYASSL_API int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb log_function); - - -#ifdef DEBUG_CYASSL - - void CYASSL_ENTER(const char* msg); - void CYASSL_LEAVE(const char* msg, int ret); - - void CYASSL_ERROR(int); - void CYASSL_MSG(const char* msg); - -#else /* DEBUG_CYASSL */ - - #define CYASSL_ENTER(m) - #define CYASSL_LEAVE(m, r) - - #define CYASSL_ERROR(e) - #define CYASSL_MSG(m) - -#endif /* DEBUG_CYASSL */ - -#ifdef __cplusplus -} -#endif - -#endif /* CYASSL_MEMORY_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h deleted file mode 100644 index 0b99c43b..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md2.h +++ /dev/null @@ -1,64 +0,0 @@ -/* md2.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef CYASSL_MD2 - -#ifndef CTAO_CRYPT_MD2_H -#define CTAO_CRYPT_MD2_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { - MD2 = 6, /* hash type unique */ - MD2_BLOCK_SIZE = 16, - MD2_DIGEST_SIZE = 16, - MD2_PAD_SIZE = 16, - MD2_X_SIZE = 48 -}; - - -/* Md2 digest */ -typedef struct Md2 { - word32 count; /* bytes % PAD_SIZE */ - byte X[MD2_X_SIZE]; - byte C[MD2_BLOCK_SIZE]; - byte buffer[MD2_BLOCK_SIZE]; -} Md2; - - -CYASSL_API void InitMd2(Md2*); -CYASSL_API void Md2Update(Md2*, const byte*, word32); -CYASSL_API void Md2Final(Md2*, byte*); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_MD2_H */ -#endif /* CYASSL_MD2 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h deleted file mode 100644 index eb5ebb5a..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md4.h +++ /dev/null @@ -1,65 +0,0 @@ -/* md4.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_MD4 - -#ifndef CTAO_CRYPT_MD4_H -#define CTAO_CRYPT_MD4_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { - MD4_BLOCK_SIZE = 64, - MD4_DIGEST_SIZE = 16, - MD4_PAD_SIZE = 56 -}; - - -/* MD4 digest */ -typedef struct Md4 { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word32 digest[MD4_DIGEST_SIZE / sizeof(word32)]; - word32 buffer[MD4_BLOCK_SIZE / sizeof(word32)]; -} Md4; - - -CYASSL_API void InitMd4(Md4*); -CYASSL_API void Md4Update(Md4*, const byte*, word32); -CYASSL_API void Md4Final(Md4*, byte*); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_MD4_H */ - -#endif /* NO_MD4 */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h deleted file mode 100644 index 418d7b14..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/md5.h +++ /dev/null @@ -1,72 +0,0 @@ -/* md5.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifndef NO_MD5 - -#ifndef CTAO_CRYPT_MD5_H -#define CTAO_CRYPT_MD5_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { -#ifdef STM32F2_HASH - MD5_REG_SIZE = 4, /* STM32 register size, bytes */ -#endif - MD5 = 0, /* hash type unique */ - MD5_BLOCK_SIZE = 64, - MD5_DIGEST_SIZE = 16, - MD5_PAD_SIZE = 56 -}; - -#ifdef CYASSL_PIC32MZ_HASH -#include "port/pic32/pic32mz-crypt.h" -#endif - -/* MD5 digest */ -typedef struct Md5 { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)]; - #ifndef CYASSL_PIC32MZ_HASH - word32 digest[MD5_DIGEST_SIZE / sizeof(word32)]; - #else - word32 digest[PIC32_HASH_SIZE / sizeof(word32)]; - pic32mz_desc desc ; /* Crypt Engine descripter */ - #endif -} Md5; - -CYASSL_API void InitMd5(Md5*); -CYASSL_API void Md5Update(Md5*, const byte*, word32); -CYASSL_API void Md5Final(Md5*, byte*); - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_MD5_H */ -#endif /* NO_MD5 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h deleted file mode 100644 index 20e98a39..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/memory.h +++ /dev/null @@ -1,55 +0,0 @@ -/* memory.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* submitted by eof */ - - -#ifndef CYASSL_MEMORY_H -#define CYASSL_MEMORY_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -typedef void *(*CyaSSL_Malloc_cb)(size_t size); -typedef void (*CyaSSL_Free_cb)(void *ptr); -typedef void *(*CyaSSL_Realloc_cb)(void *ptr, size_t size); - - -/* Public set function */ -CYASSL_API int CyaSSL_SetAllocators(CyaSSL_Malloc_cb malloc_function, - CyaSSL_Free_cb free_function, - CyaSSL_Realloc_cb realloc_function); - -/* Public in case user app wants to use XMALLOC/XFREE */ -CYASSL_API void* CyaSSL_Malloc(size_t size); -CYASSL_API void CyaSSL_Free(void *ptr); -CYASSL_API void* CyaSSL_Realloc(void *ptr, size_t size); - - -#ifdef __cplusplus -} -#endif - -#endif /* CYASSL_MEMORY_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h deleted file mode 100644 index c55f50bd..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/misc.h +++ /dev/null @@ -1,72 +0,0 @@ -/* misc.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_MISC_H -#define CTAO_CRYPT_MISC_H - - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - -#ifdef NO_INLINE -CYASSL_LOCAL -word32 rotlFixed(word32, word32); -CYASSL_LOCAL -word32 rotrFixed(word32, word32); - -CYASSL_LOCAL -word32 ByteReverseWord32(word32); -CYASSL_LOCAL -void ByteReverseWords(word32*, const word32*, word32); - -CYASSL_LOCAL -void XorWords(word*, const word*, word32); -CYASSL_LOCAL -void xorbuf(void*, const void*, word32); - -#ifdef WORD64_AVAILABLE -CYASSL_LOCAL -word64 rotlFixed64(word64, word64); -CYASSL_LOCAL -word64 rotrFixed64(word64, word64); - -CYASSL_LOCAL -word64 ByteReverseWord64(word64); -CYASSL_LOCAL -void ByteReverseWords64(word64*, const word64*, word32); -#endif /* WORD64_AVAILABLE */ - -#endif /* NO_INLINE */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_MISC_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h deleted file mode 100644 index 50ad757f..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_class.h +++ /dev/null @@ -1,1018 +0,0 @@ -/* mpi_class.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#if !(defined(LTM1) && defined(LTM2) && defined(LTM3)) -#if defined(LTM2) -#define LTM3 -#endif -#if defined(LTM1) -#define LTM2 -#endif -#define LTM1 - -#if defined(LTM_ALL) -#define BN_ERROR_C -#define BN_FAST_MP_INVMOD_C -#define BN_FAST_MP_MONTGOMERY_REDUCE_C -#define BN_FAST_S_MP_MUL_DIGS_C -#define BN_FAST_S_MP_MUL_HIGH_DIGS_C -#define BN_FAST_S_MP_SQR_C -#define BN_MP_2EXPT_C -#define BN_MP_ABS_C -#define BN_MP_ADD_C -#define BN_MP_ADD_D_C -#define BN_MP_ADDMOD_C -#define BN_MP_AND_C -#define BN_MP_CLAMP_C -#define BN_MP_CLEAR_C -#define BN_MP_CLEAR_MULTI_C -#define BN_MP_CMP_C -#define BN_MP_CMP_D_C -#define BN_MP_CMP_MAG_C -#define BN_MP_CNT_LSB_C -#define BN_MP_COPY_C -#define BN_MP_COUNT_BITS_C -#define BN_MP_DIV_C -#define BN_MP_DIV_2_C -#define BN_MP_DIV_2D_C -#define BN_MP_DIV_3_C -#define BN_MP_DIV_D_C -#define BN_MP_DR_IS_MODULUS_C -#define BN_MP_DR_REDUCE_C -#define BN_MP_DR_SETUP_C -#define BN_MP_EXCH_C -#define BN_MP_EXPT_D_C -#define BN_MP_EXPTMOD_C -#define BN_MP_EXPTMOD_FAST_C -#define BN_MP_EXTEUCLID_C -#define BN_MP_FREAD_C -#define BN_MP_FWRITE_C -#define BN_MP_GCD_C -#define BN_MP_GET_INT_C -#define BN_MP_GROW_C -#define BN_MP_INIT_C -#define BN_MP_INIT_COPY_C -#define BN_MP_INIT_MULTI_C -#define BN_MP_INIT_SET_C -#define BN_MP_INIT_SET_INT_C -#define BN_MP_INIT_SIZE_C -#define BN_MP_INVMOD_C -#define BN_MP_INVMOD_SLOW_C -#define BN_MP_IS_SQUARE_C -#define BN_MP_JACOBI_C -#define BN_MP_KARATSUBA_MUL_C -#define BN_MP_KARATSUBA_SQR_C -#define BN_MP_LCM_C -#define BN_MP_LSHD_C -#define BN_MP_MOD_C -#define BN_MP_MOD_2D_C -#define BN_MP_MOD_D_C -#define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C -#define BN_MP_MONTGOMERY_REDUCE_C -#define BN_MP_MONTGOMERY_SETUP_C -#define BN_MP_MUL_C -#define BN_MP_MUL_2_C -#define BN_MP_MUL_2D_C -#define BN_MP_MUL_D_C -#define BN_MP_MULMOD_C -#define BN_MP_N_ROOT_C -#define BN_MP_NEG_C -#define BN_MP_OR_C -#define BN_MP_PRIME_FERMAT_C -#define BN_MP_PRIME_IS_DIVISIBLE_C -#define BN_MP_PRIME_IS_PRIME_C -#define BN_MP_PRIME_MILLER_RABIN_C -#define BN_MP_PRIME_NEXT_PRIME_C -#define BN_MP_PRIME_RABIN_MILLER_TRIALS_C -#define BN_MP_PRIME_RANDOM_EX_C -#define BN_MP_RADIX_SIZE_C -#define BN_MP_RADIX_SMAP_C -#define BN_MP_RAND_C -#define BN_MP_READ_RADIX_C -#define BN_MP_READ_SIGNED_BIN_C -#define BN_MP_READ_UNSIGNED_BIN_C -#define BN_MP_REDUCE_C -#define BN_MP_REDUCE_2K_C -#define BN_MP_REDUCE_2K_L_C -#define BN_MP_REDUCE_2K_SETUP_C -#define BN_MP_REDUCE_2K_SETUP_L_C -#define BN_MP_REDUCE_IS_2K_C -#define BN_MP_REDUCE_IS_2K_L_C -#define BN_MP_REDUCE_SETUP_C -#define BN_MP_RSHD_C -#define BN_MP_SET_C -#define BN_MP_SET_INT_C -#define BN_MP_SHRINK_C -#define BN_MP_SIGNED_BIN_SIZE_C -#define BN_MP_SQR_C -#define BN_MP_SQRMOD_C -#define BN_MP_SQRT_C -#define BN_MP_SUB_C -#define BN_MP_SUB_D_C -#define BN_MP_SUBMOD_C -#define BN_MP_TO_SIGNED_BIN_C -#define BN_MP_TO_SIGNED_BIN_N_C -#define BN_MP_TO_UNSIGNED_BIN_C -#define BN_MP_TO_UNSIGNED_BIN_N_C -#define BN_MP_TOOM_MUL_C -#define BN_MP_TOOM_SQR_C -#define BN_MP_TORADIX_C -#define BN_MP_TORADIX_N_C -#define BN_MP_UNSIGNED_BIN_SIZE_C -#define BN_MP_XOR_C -#define BN_MP_ZERO_C -#define BN_PRIME_TAB_C -#define BN_REVERSE_C -#define BN_S_MP_ADD_C -#define BN_S_MP_EXPTMOD_C -#define BN_S_MP_MUL_DIGS_C -#define BN_S_MP_MUL_HIGH_DIGS_C -#define BN_S_MP_SQR_C -#define BN_S_MP_SUB_C -#define BNCORE_C -#endif - -#if defined(BN_ERROR_C) - #define BN_MP_ERROR_TO_STRING_C -#endif - -#if defined(BN_FAST_MP_INVMOD_C) - #define BN_MP_ISEVEN_C - #define BN_MP_INIT_MULTI_C - #define BN_MP_COPY_C - #define BN_MP_MOD_C - #define BN_MP_SET_C - #define BN_MP_DIV_2_C - #define BN_MP_ISODD_C - #define BN_MP_SUB_C - #define BN_MP_CMP_C - #define BN_MP_ISZERO_C - #define BN_MP_CMP_D_C - #define BN_MP_ADD_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C) - #define BN_MP_GROW_C - #define BN_MP_RSHD_C - #define BN_MP_CLAMP_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_FAST_S_MP_MUL_DIGS_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_FAST_S_MP_SQR_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_2EXPT_C) - #define BN_MP_ZERO_C - #define BN_MP_GROW_C -#endif - -#if defined(BN_MP_ABS_C) - #define BN_MP_COPY_C -#endif - -#if defined(BN_MP_ADD_C) - #define BN_S_MP_ADD_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_ADD_D_C) - #define BN_MP_GROW_C - #define BN_MP_SUB_D_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_ADDMOD_C) - #define BN_MP_INIT_C - #define BN_MP_ADD_C - #define BN_MP_CLEAR_C - #define BN_MP_MOD_C -#endif - -#if defined(BN_MP_AND_C) - #define BN_MP_INIT_COPY_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_CLAMP_C) -#endif - -#if defined(BN_MP_CLEAR_C) -#endif - -#if defined(BN_MP_CLEAR_MULTI_C) - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_CMP_C) - #define BN_MP_CMP_MAG_C -#endif - -#if defined(BN_MP_CMP_D_C) -#endif - -#if defined(BN_MP_CMP_MAG_C) -#endif - -#if defined(BN_MP_CNT_LSB_C) - #define BN_MP_ISZERO_C -#endif - -#if defined(BN_MP_COPY_C) - #define BN_MP_GROW_C -#endif - -#if defined(BN_MP_COUNT_BITS_C) -#endif - -#if defined(BN_MP_DIV_C) - #define BN_MP_ISZERO_C - #define BN_MP_CMP_MAG_C - #define BN_MP_COPY_C - #define BN_MP_ZERO_C - #define BN_MP_INIT_MULTI_C - #define BN_MP_SET_C - #define BN_MP_COUNT_BITS_C - #define BN_MP_ABS_C - #define BN_MP_MUL_2D_C - #define BN_MP_CMP_C - #define BN_MP_SUB_C - #define BN_MP_ADD_C - #define BN_MP_DIV_2D_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_MULTI_C - #define BN_MP_INIT_SIZE_C - #define BN_MP_INIT_C - #define BN_MP_INIT_COPY_C - #define BN_MP_LSHD_C - #define BN_MP_RSHD_C - #define BN_MP_MUL_D_C - #define BN_MP_CLAMP_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_DIV_2_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_DIV_2D_C) - #define BN_MP_COPY_C - #define BN_MP_ZERO_C - #define BN_MP_INIT_C - #define BN_MP_MOD_2D_C - #define BN_MP_CLEAR_C - #define BN_MP_RSHD_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C -#endif - -#if defined(BN_MP_DIV_3_C) - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_DIV_D_C) - #define BN_MP_ISZERO_C - #define BN_MP_COPY_C - #define BN_MP_DIV_2D_C - #define BN_MP_DIV_3_C - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_DR_IS_MODULUS_C) -#endif - -#if defined(BN_MP_DR_REDUCE_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_DR_SETUP_C) -#endif - -#if defined(BN_MP_EXCH_C) -#endif - -#if defined(BN_MP_EXPT_D_C) - #define BN_MP_INIT_COPY_C - #define BN_MP_SET_C - #define BN_MP_SQR_C - #define BN_MP_CLEAR_C - #define BN_MP_MUL_C -#endif - -#if defined(BN_MP_EXPTMOD_C) - #define BN_MP_INIT_C - #define BN_MP_INVMOD_C - #define BN_MP_CLEAR_C - #define BN_MP_ABS_C - #define BN_MP_CLEAR_MULTI_C - #define BN_MP_REDUCE_IS_2K_L_C - #define BN_S_MP_EXPTMOD_C - #define BN_MP_DR_IS_MODULUS_C - #define BN_MP_REDUCE_IS_2K_C - #define BN_MP_ISODD_C - #define BN_MP_EXPTMOD_FAST_C -#endif - -#if defined(BN_MP_EXPTMOD_FAST_C) - #define BN_MP_COUNT_BITS_C - #define BN_MP_INIT_C - #define BN_MP_CLEAR_C - #define BN_MP_MONTGOMERY_SETUP_C - #define BN_FAST_MP_MONTGOMERY_REDUCE_C - #define BN_MP_MONTGOMERY_REDUCE_C - #define BN_MP_DR_SETUP_C - #define BN_MP_DR_REDUCE_C - #define BN_MP_REDUCE_2K_SETUP_C - #define BN_MP_REDUCE_2K_C - #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C - #define BN_MP_MULMOD_C - #define BN_MP_SET_C - #define BN_MP_MOD_C - #define BN_MP_COPY_C - #define BN_MP_SQR_C - #define BN_MP_MUL_C - #define BN_MP_EXCH_C -#endif - -#if defined(BN_MP_EXTEUCLID_C) - #define BN_MP_INIT_MULTI_C - #define BN_MP_SET_C - #define BN_MP_COPY_C - #define BN_MP_ISZERO_C - #define BN_MP_DIV_C - #define BN_MP_MUL_C - #define BN_MP_SUB_C - #define BN_MP_NEG_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_MP_FREAD_C) - #define BN_MP_ZERO_C - #define BN_MP_S_RMAP_C - #define BN_MP_MUL_D_C - #define BN_MP_ADD_D_C - #define BN_MP_CMP_D_C -#endif - -#if defined(BN_MP_FWRITE_C) - #define BN_MP_RADIX_SIZE_C - #define BN_MP_TORADIX_C -#endif - -#if defined(BN_MP_GCD_C) - #define BN_MP_ISZERO_C - #define BN_MP_ABS_C - #define BN_MP_ZERO_C - #define BN_MP_INIT_COPY_C - #define BN_MP_CNT_LSB_C - #define BN_MP_DIV_2D_C - #define BN_MP_CMP_MAG_C - #define BN_MP_EXCH_C - #define BN_S_MP_SUB_C - #define BN_MP_MUL_2D_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_GET_INT_C) -#endif - -#if defined(BN_MP_GROW_C) -#endif - -#if defined(BN_MP_INIT_C) -#endif - -#if defined(BN_MP_INIT_COPY_C) - #define BN_MP_COPY_C -#endif - -#if defined(BN_MP_INIT_MULTI_C) - #define BN_MP_ERR_C - #define BN_MP_INIT_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_INIT_SET_C) - #define BN_MP_INIT_C - #define BN_MP_SET_C -#endif - -#if defined(BN_MP_INIT_SET_INT_C) - #define BN_MP_INIT_C - #define BN_MP_SET_INT_C -#endif - -#if defined(BN_MP_INIT_SIZE_C) - #define BN_MP_INIT_C -#endif - -#if defined(BN_MP_INVMOD_C) - #define BN_MP_ISZERO_C - #define BN_MP_ISODD_C - #define BN_FAST_MP_INVMOD_C - #define BN_MP_INVMOD_SLOW_C -#endif - -#if defined(BN_MP_INVMOD_SLOW_C) - #define BN_MP_ISZERO_C - #define BN_MP_INIT_MULTI_C - #define BN_MP_MOD_C - #define BN_MP_COPY_C - #define BN_MP_ISEVEN_C - #define BN_MP_SET_C - #define BN_MP_DIV_2_C - #define BN_MP_ISODD_C - #define BN_MP_ADD_C - #define BN_MP_SUB_C - #define BN_MP_CMP_C - #define BN_MP_CMP_D_C - #define BN_MP_CMP_MAG_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_MP_IS_SQUARE_C) - #define BN_MP_MOD_D_C - #define BN_MP_INIT_SET_INT_C - #define BN_MP_MOD_C - #define BN_MP_GET_INT_C - #define BN_MP_SQRT_C - #define BN_MP_SQR_C - #define BN_MP_CMP_MAG_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_JACOBI_C) - #define BN_MP_CMP_D_C - #define BN_MP_ISZERO_C - #define BN_MP_INIT_COPY_C - #define BN_MP_CNT_LSB_C - #define BN_MP_DIV_2D_C - #define BN_MP_MOD_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_KARATSUBA_MUL_C) - #define BN_MP_MUL_C - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_SUB_C - #define BN_MP_ADD_C - #define BN_MP_LSHD_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_KARATSUBA_SQR_C) - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_SQR_C - #define BN_MP_SUB_C - #define BN_S_MP_ADD_C - #define BN_MP_LSHD_C - #define BN_MP_ADD_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_LCM_C) - #define BN_MP_INIT_MULTI_C - #define BN_MP_GCD_C - #define BN_MP_CMP_MAG_C - #define BN_MP_DIV_C - #define BN_MP_MUL_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_MP_LSHD_C) - #define BN_MP_GROW_C - #define BN_MP_RSHD_C -#endif - -#if defined(BN_MP_MOD_C) - #define BN_MP_INIT_C - #define BN_MP_DIV_C - #define BN_MP_CLEAR_C - #define BN_MP_ADD_C - #define BN_MP_EXCH_C -#endif - -#if defined(BN_MP_MOD_2D_C) - #define BN_MP_ZERO_C - #define BN_MP_COPY_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_MOD_D_C) - #define BN_MP_DIV_D_C -#endif - -#if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) - #define BN_MP_COUNT_BITS_C - #define BN_MP_2EXPT_C - #define BN_MP_SET_C - #define BN_MP_MUL_2_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_MONTGOMERY_REDUCE_C) - #define BN_FAST_MP_MONTGOMERY_REDUCE_C - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C - #define BN_MP_RSHD_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_MONTGOMERY_SETUP_C) -#endif - -#if defined(BN_MP_MUL_C) - #define BN_MP_TOOM_MUL_C - #define BN_MP_KARATSUBA_MUL_C - #define BN_FAST_S_MP_MUL_DIGS_C - #define BN_S_MP_MUL_C - #define BN_S_MP_MUL_DIGS_C -#endif - -#if defined(BN_MP_MUL_2_C) - #define BN_MP_GROW_C -#endif - -#if defined(BN_MP_MUL_2D_C) - #define BN_MP_COPY_C - #define BN_MP_GROW_C - #define BN_MP_LSHD_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_MUL_D_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_MULMOD_C) - #define BN_MP_INIT_C - #define BN_MP_MUL_C - #define BN_MP_CLEAR_C - #define BN_MP_MOD_C -#endif - -#if defined(BN_MP_N_ROOT_C) - #define BN_MP_INIT_C - #define BN_MP_SET_C - #define BN_MP_COPY_C - #define BN_MP_EXPT_D_C - #define BN_MP_MUL_C - #define BN_MP_SUB_C - #define BN_MP_MUL_D_C - #define BN_MP_DIV_C - #define BN_MP_CMP_C - #define BN_MP_SUB_D_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_NEG_C) - #define BN_MP_COPY_C - #define BN_MP_ISZERO_C -#endif - -#if defined(BN_MP_OR_C) - #define BN_MP_INIT_COPY_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_PRIME_FERMAT_C) - #define BN_MP_CMP_D_C - #define BN_MP_INIT_C - #define BN_MP_EXPTMOD_C - #define BN_MP_CMP_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_PRIME_IS_DIVISIBLE_C) - #define BN_MP_MOD_D_C -#endif - -#if defined(BN_MP_PRIME_IS_PRIME_C) - #define BN_MP_CMP_D_C - #define BN_MP_PRIME_IS_DIVISIBLE_C - #define BN_MP_INIT_C - #define BN_MP_SET_C - #define BN_MP_PRIME_MILLER_RABIN_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_PRIME_MILLER_RABIN_C) - #define BN_MP_CMP_D_C - #define BN_MP_INIT_COPY_C - #define BN_MP_SUB_D_C - #define BN_MP_CNT_LSB_C - #define BN_MP_DIV_2D_C - #define BN_MP_EXPTMOD_C - #define BN_MP_CMP_C - #define BN_MP_SQRMOD_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_PRIME_NEXT_PRIME_C) - #define BN_MP_CMP_D_C - #define BN_MP_SET_C - #define BN_MP_SUB_D_C - #define BN_MP_ISEVEN_C - #define BN_MP_MOD_D_C - #define BN_MP_INIT_C - #define BN_MP_ADD_D_C - #define BN_MP_PRIME_MILLER_RABIN_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C) -#endif - -#if defined(BN_MP_PRIME_RANDOM_EX_C) - #define BN_MP_READ_UNSIGNED_BIN_C - #define BN_MP_PRIME_IS_PRIME_C - #define BN_MP_SUB_D_C - #define BN_MP_DIV_2_C - #define BN_MP_MUL_2_C - #define BN_MP_ADD_D_C -#endif - -#if defined(BN_MP_RADIX_SIZE_C) - #define BN_MP_COUNT_BITS_C - #define BN_MP_INIT_COPY_C - #define BN_MP_ISZERO_C - #define BN_MP_DIV_D_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_RADIX_SMAP_C) - #define BN_MP_S_RMAP_C -#endif - -#if defined(BN_MP_RAND_C) - #define BN_MP_ZERO_C - #define BN_MP_ADD_D_C - #define BN_MP_LSHD_C -#endif - -#if defined(BN_MP_READ_RADIX_C) - #define BN_MP_ZERO_C - #define BN_MP_S_RMAP_C - #define BN_MP_RADIX_SMAP_C - #define BN_MP_MUL_D_C - #define BN_MP_ADD_D_C - #define BN_MP_ISZERO_C -#endif - -#if defined(BN_MP_READ_SIGNED_BIN_C) - #define BN_MP_READ_UNSIGNED_BIN_C -#endif - -#if defined(BN_MP_READ_UNSIGNED_BIN_C) - #define BN_MP_GROW_C - #define BN_MP_ZERO_C - #define BN_MP_MUL_2D_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_REDUCE_C) - #define BN_MP_REDUCE_SETUP_C - #define BN_MP_INIT_COPY_C - #define BN_MP_RSHD_C - #define BN_MP_MUL_C - #define BN_S_MP_MUL_HIGH_DIGS_C - #define BN_FAST_S_MP_MUL_HIGH_DIGS_C - #define BN_MP_MOD_2D_C - #define BN_S_MP_MUL_DIGS_C - #define BN_MP_SUB_C - #define BN_MP_CMP_D_C - #define BN_MP_SET_C - #define BN_MP_LSHD_C - #define BN_MP_ADD_C - #define BN_MP_CMP_C - #define BN_S_MP_SUB_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_REDUCE_2K_C) - #define BN_MP_INIT_C - #define BN_MP_COUNT_BITS_C - #define BN_MP_DIV_2D_C - #define BN_MP_MUL_D_C - #define BN_S_MP_ADD_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_REDUCE_2K_L_C) - #define BN_MP_INIT_C - #define BN_MP_COUNT_BITS_C - #define BN_MP_DIV_2D_C - #define BN_MP_MUL_C - #define BN_S_MP_ADD_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_REDUCE_2K_SETUP_C) - #define BN_MP_INIT_C - #define BN_MP_COUNT_BITS_C - #define BN_MP_2EXPT_C - #define BN_MP_CLEAR_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_REDUCE_2K_SETUP_L_C) - #define BN_MP_INIT_C - #define BN_MP_2EXPT_C - #define BN_MP_COUNT_BITS_C - #define BN_S_MP_SUB_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_REDUCE_IS_2K_C) - #define BN_MP_REDUCE_2K_C - #define BN_MP_COUNT_BITS_C -#endif - -#if defined(BN_MP_REDUCE_IS_2K_L_C) -#endif - -#if defined(BN_MP_REDUCE_SETUP_C) - #define BN_MP_2EXPT_C - #define BN_MP_DIV_C -#endif - -#if defined(BN_MP_RSHD_C) - #define BN_MP_ZERO_C -#endif - -#if defined(BN_MP_SET_C) - #define BN_MP_ZERO_C -#endif - -#if defined(BN_MP_SET_INT_C) - #define BN_MP_ZERO_C - #define BN_MP_MUL_2D_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_SHRINK_C) -#endif - -#if defined(BN_MP_SIGNED_BIN_SIZE_C) - #define BN_MP_UNSIGNED_BIN_SIZE_C -#endif - -#if defined(BN_MP_SQR_C) - #define BN_MP_TOOM_SQR_C - #define BN_MP_KARATSUBA_SQR_C - #define BN_FAST_S_MP_SQR_C - #define BN_S_MP_SQR_C -#endif - -#if defined(BN_MP_SQRMOD_C) - #define BN_MP_INIT_C - #define BN_MP_SQR_C - #define BN_MP_CLEAR_C - #define BN_MP_MOD_C -#endif - -#if defined(BN_MP_SQRT_C) - #define BN_MP_N_ROOT_C - #define BN_MP_ISZERO_C - #define BN_MP_ZERO_C - #define BN_MP_INIT_COPY_C - #define BN_MP_RSHD_C - #define BN_MP_DIV_C - #define BN_MP_ADD_C - #define BN_MP_DIV_2_C - #define BN_MP_CMP_MAG_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_SUB_C) - #define BN_S_MP_ADD_C - #define BN_MP_CMP_MAG_C - #define BN_S_MP_SUB_C -#endif - -#if defined(BN_MP_SUB_D_C) - #define BN_MP_GROW_C - #define BN_MP_ADD_D_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_MP_SUBMOD_C) - #define BN_MP_INIT_C - #define BN_MP_SUB_C - #define BN_MP_CLEAR_C - #define BN_MP_MOD_C -#endif - -#if defined(BN_MP_TO_SIGNED_BIN_C) - #define BN_MP_TO_UNSIGNED_BIN_C -#endif - -#if defined(BN_MP_TO_SIGNED_BIN_N_C) - #define BN_MP_SIGNED_BIN_SIZE_C - #define BN_MP_TO_SIGNED_BIN_C -#endif - -#if defined(BN_MP_TO_UNSIGNED_BIN_C) - #define BN_MP_INIT_COPY_C - #define BN_MP_ISZERO_C - #define BN_MP_DIV_2D_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_TO_UNSIGNED_BIN_N_C) - #define BN_MP_UNSIGNED_BIN_SIZE_C - #define BN_MP_TO_UNSIGNED_BIN_C -#endif - -#if defined(BN_MP_TOOM_MUL_C) - #define BN_MP_INIT_MULTI_C - #define BN_MP_MOD_2D_C - #define BN_MP_COPY_C - #define BN_MP_RSHD_C - #define BN_MP_MUL_C - #define BN_MP_MUL_2_C - #define BN_MP_ADD_C - #define BN_MP_SUB_C - #define BN_MP_DIV_2_C - #define BN_MP_MUL_2D_C - #define BN_MP_MUL_D_C - #define BN_MP_DIV_3_C - #define BN_MP_LSHD_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_MP_TOOM_SQR_C) - #define BN_MP_INIT_MULTI_C - #define BN_MP_MOD_2D_C - #define BN_MP_COPY_C - #define BN_MP_RSHD_C - #define BN_MP_SQR_C - #define BN_MP_MUL_2_C - #define BN_MP_ADD_C - #define BN_MP_SUB_C - #define BN_MP_DIV_2_C - #define BN_MP_MUL_2D_C - #define BN_MP_MUL_D_C - #define BN_MP_DIV_3_C - #define BN_MP_LSHD_C - #define BN_MP_CLEAR_MULTI_C -#endif - -#if defined(BN_MP_TORADIX_C) - #define BN_MP_ISZERO_C - #define BN_MP_INIT_COPY_C - #define BN_MP_DIV_D_C - #define BN_MP_CLEAR_C - #define BN_MP_S_RMAP_C -#endif - -#if defined(BN_MP_TORADIX_N_C) - #define BN_MP_ISZERO_C - #define BN_MP_INIT_COPY_C - #define BN_MP_DIV_D_C - #define BN_MP_CLEAR_C - #define BN_MP_S_RMAP_C -#endif - -#if defined(BN_MP_UNSIGNED_BIN_SIZE_C) - #define BN_MP_COUNT_BITS_C -#endif - -#if defined(BN_MP_XOR_C) - #define BN_MP_INIT_COPY_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_MP_ZERO_C) -#endif - -#if defined(BN_PRIME_TAB_C) -#endif - -#if defined(BN_REVERSE_C) -#endif - -#if defined(BN_S_MP_ADD_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BN_S_MP_EXPTMOD_C) - #define BN_MP_COUNT_BITS_C - #define BN_MP_INIT_C - #define BN_MP_CLEAR_C - #define BN_MP_REDUCE_SETUP_C - #define BN_MP_REDUCE_C - #define BN_MP_REDUCE_2K_SETUP_L_C - #define BN_MP_REDUCE_2K_L_C - #define BN_MP_MOD_C - #define BN_MP_COPY_C - #define BN_MP_SQR_C - #define BN_MP_MUL_C - #define BN_MP_SET_C - #define BN_MP_EXCH_C -#endif - -#if defined(BN_S_MP_MUL_DIGS_C) - #define BN_FAST_S_MP_MUL_DIGS_C - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_S_MP_MUL_HIGH_DIGS_C) - #define BN_FAST_S_MP_MUL_HIGH_DIGS_C - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_S_MP_SQR_C) - #define BN_MP_INIT_SIZE_C - #define BN_MP_CLAMP_C - #define BN_MP_EXCH_C - #define BN_MP_CLEAR_C -#endif - -#if defined(BN_S_MP_SUB_C) - #define BN_MP_GROW_C - #define BN_MP_CLAMP_C -#endif - -#if defined(BNCORE_C) -#endif - -#ifdef LTM3 -#define LTM_LAST -#endif -#include "mpi_superclass.h" -#include "mpi_class.h" -#else -#define LTM_LAST -#endif - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h deleted file mode 100644 index 06a05f54..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/mpi_superclass.h +++ /dev/null @@ -1,95 +0,0 @@ -/* mpi_superclass.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* super class file for PK algos */ - -/* default ... include all MPI */ -#define LTM_ALL - -/* RSA only (does not support DH/DSA/ECC) */ -/* #define SC_RSA_1 */ - -/* For reference.... On an Athlon64 optimizing for speed... - - LTM's mpi.o with all functions [striped] is 142KiB in size. - -*/ - -/* Works for RSA only, mpi.o is 68KiB */ -#ifdef SC_RSA_1 - #define BN_MP_SHRINK_C - #define BN_MP_LCM_C - #define BN_MP_PRIME_RANDOM_EX_C - #define BN_MP_INVMOD_C - #define BN_MP_GCD_C - #define BN_MP_MOD_C - #define BN_MP_MULMOD_C - #define BN_MP_ADDMOD_C - #define BN_MP_EXPTMOD_C - #define BN_MP_SET_INT_C - #define BN_MP_INIT_MULTI_C - #define BN_MP_CLEAR_MULTI_C - #define BN_MP_UNSIGNED_BIN_SIZE_C - #define BN_MP_TO_UNSIGNED_BIN_C - #define BN_MP_MOD_D_C - #define BN_MP_PRIME_RABIN_MILLER_TRIALS_C - #define BN_REVERSE_C - #define BN_PRIME_TAB_C - - /* other modifiers */ - #define BN_MP_DIV_SMALL /* Slower division, not critical */ - - /* here we are on the last pass so we turn things off. The functions classes are still there - * but we remove them specifically from the build. This also invokes tweaks in functions - * like removing support for even moduli, etc... - */ -#ifdef LTM_LAST - #undef BN_MP_TOOM_MUL_C - #undef BN_MP_TOOM_SQR_C - #undef BN_MP_KARATSUBA_MUL_C - #undef BN_MP_KARATSUBA_SQR_C - #undef BN_MP_REDUCE_C - #undef BN_MP_REDUCE_SETUP_C - #undef BN_MP_DR_IS_MODULUS_C - #undef BN_MP_DR_SETUP_C - #undef BN_MP_DR_REDUCE_C - #undef BN_MP_REDUCE_IS_2K_C - #undef BN_MP_REDUCE_2K_SETUP_C - #undef BN_MP_REDUCE_2K_C - #undef BN_S_MP_EXPTMOD_C - #undef BN_MP_DIV_3_C - #undef BN_S_MP_MUL_HIGH_DIGS_C - #undef BN_FAST_S_MP_MUL_HIGH_DIGS_C - #undef BN_FAST_MP_INVMOD_C - - /* To safely undefine these you have to make sure your RSA key won't exceed the Comba threshold - * which is roughly 255 digits [7140 bits for 32-bit machines, 15300 bits for 64-bit machines] - * which means roughly speaking you can handle upto 2536-bit RSA keys with these defined without - * trouble. - */ - #undef BN_S_MP_MUL_DIGS_C - #undef BN_S_MP_SQR_C - #undef BN_MP_MONTGOMERY_REDUCE_C -#endif - -#endif - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h deleted file mode 100644 index 63ae2a54..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pkcs7.h +++ /dev/null @@ -1,123 +0,0 @@ -/* pkcs7.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_PKCS7 - -#ifndef CTAO_CRYPT_PKCS7_H -#define CTAO_CRYPT_PKCS7_H - -#include -#include -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/* PKCS#7 content types, ref RFC 2315 (Section 14) */ -enum PKCS7_TYPES { - PKCS7_MSG = 650, /* 1.2.840.113549.1.7 */ - DATA = 651, /* 1.2.840.113549.1.7.1 */ - SIGNED_DATA = 652, /* 1.2.840.113549.1.7.2 */ - ENVELOPED_DATA = 653, /* 1.2.840.113549.1.7.3 */ - SIGNED_AND_ENVELOPED_DATA = 654, /* 1.2.840.113549.1.7.4 */ - DIGESTED_DATA = 655, /* 1.2.840.113549.1.7.5 */ - ENCRYPTED_DATA = 656 /* 1.2.840.113549.1.7.6 */ -}; - -enum Pkcs7_Misc { - PKCS7_NONCE_SZ = 16, - MAX_ENCRYPTED_KEY_SZ = 512, /* max enc. key size, RSA <= 4096 */ - MAX_CONTENT_KEY_LEN = DES3_KEYLEN, /* highest current cipher is 3DES */ - MAX_RECIP_SZ = MAX_VERSION_SZ + - MAX_SEQ_SZ + ASN_NAME_MAX + MAX_SN_SZ + - MAX_SEQ_SZ + MAX_ALGO_SZ + 1 + MAX_ENCRYPTED_KEY_SZ -}; - - -typedef struct PKCS7Attrib { - byte* oid; - word32 oidSz; - byte* value; - word32 valueSz; -} PKCS7Attrib; - - -typedef struct PKCS7 { - byte* content; /* inner content, not owner */ - word32 contentSz; /* content size */ - int contentOID; /* PKCS#7 content type OID sum */ - - RNG* rng; - - int hashOID; - int encryptOID; /* key encryption algorithm OID */ - - byte* singleCert; /* recipient cert, DER, not owner */ - word32 singleCertSz; /* size of recipient cert buffer, bytes */ - byte issuerHash[SHA_SIZE]; /* hash of all alt Names */ - byte* issuer; /* issuer name of singleCert */ - word32 issuerSz; /* length of issuer name */ - byte issuerSn[MAX_SN_SZ]; /* singleCert's serial number */ - word32 issuerSnSz; /* length of serial number */ - byte publicKey[512]; - word32 publicKeySz; - byte* privateKey; /* private key, DER, not owner */ - word32 privateKeySz; /* size of private key buffer, bytes */ - - PKCS7Attrib* signedAttribs; - word32 signedAttribsSz; -} PKCS7; - - -CYASSL_LOCAL int SetContentType(int pkcs7TypeOID, byte* output); -CYASSL_LOCAL int GetContentType(const byte* input, word32* inOutIdx, - word32* oid, word32 maxIdx); -CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz, - int keyEncAlgo, int blockKeySz, - RNG* rng, byte* contentKeyPlain, - byte* contentKeyEnc, - int* keyEncSz, byte* out, word32 outSz); - -CYASSL_API int PKCS7_InitWithCert(PKCS7* pkcs7, byte* cert, word32 certSz); -CYASSL_API void PKCS7_Free(PKCS7* pkcs7); -CYASSL_API int PKCS7_EncodeData(PKCS7* pkcs7, byte* output, word32 outputSz); -CYASSL_API int PKCS7_EncodeSignedData(PKCS7* pkcs7, - byte* output, word32 outputSz); -CYASSL_API int PKCS7_VerifySignedData(PKCS7* pkcs7, - byte* pkiMsg, word32 pkiMsgSz); -CYASSL_API int PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, - byte* output, word32 outputSz); -CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg, - word32 pkiMsgSz, byte* output, - word32 outputSz); - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_PKCS7_H */ - -#endif /* HAVE_PKCS7 */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h deleted file mode 100644 index 9a2c9776..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/port.h +++ /dev/null @@ -1,194 +0,0 @@ -/* port.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_PORT_H -#define CTAO_CRYPT_PORT_H - - -#ifdef __cplusplus - extern "C" { -#endif - - -#ifdef USE_WINDOWS_API - #ifdef CYASSL_GAME_BUILD - #include "system/xtl.h" - #else - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #endif - #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) - /* On WinCE winsock2.h must be included before windows.h */ - #include - #endif - #include - #endif -#elif defined(THREADX) - #ifndef SINGLE_THREADED - #include "tx_api.h" - #endif -#elif defined(MICRIUM) - /* do nothing, just don't pick Unix */ -#elif defined(FREERTOS) || defined(CYASSL_SAFERTOS) - /* do nothing */ -#elif defined(EBSNET) - /* do nothing */ -#elif defined(FREESCALE_MQX) - /* do nothing */ -#elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #else - #include - #endif -#elif defined(CYASSL_CMSIS_RTOS) - #include "cmsis_os.h" -#else - #ifndef SINGLE_THREADED - #define CYASSL_PTHREADS - #include - #endif - #if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) - #include /* for close of BIO */ - #endif -#endif - - -#ifdef SINGLE_THREADED - typedef int CyaSSL_Mutex; -#else /* MULTI_THREADED */ - /* FREERTOS comes first to enable use of FreeRTOS Windows simulator only */ - #ifdef FREERTOS - typedef xSemaphoreHandle CyaSSL_Mutex; - #elif defined(CYASSL_SAFERTOS) - typedef struct CyaSSL_Mutex { - signed char mutexBuffer[portQUEUE_OVERHEAD_BYTES]; - xSemaphoreHandle mutex; - } CyaSSL_Mutex; - #elif defined(USE_WINDOWS_API) - typedef CRITICAL_SECTION CyaSSL_Mutex; - #elif defined(CYASSL_PTHREADS) - typedef pthread_mutex_t CyaSSL_Mutex; - #elif defined(THREADX) - typedef TX_MUTEX CyaSSL_Mutex; - #elif defined(MICRIUM) - typedef OS_MUTEX CyaSSL_Mutex; - #elif defined(EBSNET) - typedef RTP_MUTEX CyaSSL_Mutex; - #elif defined(FREESCALE_MQX) - typedef MUTEX_STRUCT CyaSSL_Mutex; - #elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_CMSIS_RTOS) - typedef osMutexId CyaSSL_Mutex; - #else - typedef OS_MUT CyaSSL_Mutex; - #endif - #elif defined(CYASSL_CMSIS_RTOS) - typedef osMutexId CyaSSL_Mutex; - #else - #error Need a mutex type in multithreaded mode - #endif /* USE_WINDOWS_API */ -#endif /* SINGLE_THREADED */ - -CYASSL_LOCAL int InitMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int FreeMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int LockMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int UnLockMutex(CyaSSL_Mutex*); - - -/* filesystem abstraction layer, used by ssl.c */ -#ifndef NO_FILESYSTEM - -#if defined(EBSNET) - #define XFILE int - #define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0); - #define XFSEEK vf_lseek - #define XFTELL vf_tell - #define XREWIND vf_rewind - #define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT) - #define XFWRITE(BUF, SZ, AMT, FD) vf_write(FD, BUF, SZ*AMT) - #define XFCLOSE vf_close - #define XSEEK_END VSEEK_END - #define XBADFILE -1 -#elif defined(LSR_FS) - #include - #define XFILE struct fs_file* - #define XFOPEN(NAME, MODE) fs_open((char*)NAME); - #define XFSEEK(F, O, W) (void)F - #define XFTELL(F) (F)->len - #define XREWIND(F) (void)F - #define XFREAD(BUF, SZ, AMT, F) fs_read(F, (char*)BUF, SZ*AMT) - #define XFWRITE(BUF, SZ, AMT, F) fs_write(F, (char*)BUF, SZ*AMT) - #define XFCLOSE fs_close - #define XSEEK_END 0 - #define XBADFILE NULL -#elif defined(FREESCALE_MQX) - #define XFILE MQX_FILE_PTR - #define XFOPEN fopen - #define XFSEEK fseek - #define XFTELL ftell - #define XREWIND(F) fseek(F, 0, IO_SEEK_SET) - #define XFREAD fread - #define XFWRITE fwrite - #define XFCLOSE fclose - #define XSEEK_END IO_SEEK_END - #define XBADFILE NULL -#elif defined(MICRIUM) - #include - #define XFILE FS_FILE* - #define XFOPEN fs_fopen - #define XFSEEK fs_fseek - #define XFTELL fs_ftell - #define XREWIND fs_rewind - #define XFREAD fs_fread - #define XFWRITE fs_fwrite - #define XFCLOSE fs_fclose - #define XSEEK_END FS_SEEK_END - #define XBADFILE NULL -#else - /* stdio, default case */ - #define XFILE FILE* - #if defined(CYASSL_MDK_ARM) - extern FILE * CyaSSL_fopen(const char *name, const char *mode) ; - #define XFOPEN CyaSSL_fopen - #else - #define XFOPEN fopen - #endif - #define XFSEEK fseek - #define XFTELL ftell - #define XREWIND rewind - #define XFREAD fread - #define XFWRITE fwrite - #define XFCLOSE fclose - #define XSEEK_END SEEK_END - #define XBADFILE NULL -#endif - -#endif /* NO_FILESYSTEM */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_PORT_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h deleted file mode 100644 index 04ea330a..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/pwdbased.h +++ /dev/null @@ -1,53 +0,0 @@ -/* pwdbased.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_PWDBASED - -#ifndef CTAO_CRYPT_PWDBASED_H -#define CTAO_CRYPT_PWDBASED_H - -#include -#include /* for hash type */ -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -CYASSL_API int PBKDF1(byte* output, const byte* passwd, int pLen, - const byte* salt, int sLen, int iterations, int kLen, - int hashType); -CYASSL_API int PBKDF2(byte* output, const byte* passwd, int pLen, - const byte* salt, int sLen, int iterations, int kLen, - int hashType); -CYASSL_API int PKCS12_PBKDF(byte* output, const byte* passwd, int pLen, - const byte* salt, int sLen, int iterations, - int kLen, int hashType, int purpose); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_PWDBASED_H */ -#endif /* NO_PWDBASED */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h deleted file mode 100644 index 08da26c8..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rabbit.h +++ /dev/null @@ -1,65 +0,0 @@ -/* rabbit.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_RABBIT - -#ifndef CTAO_CRYPT_RABBIT_H -#define CTAO_CRYPT_RABBIT_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - RABBIT_ENC_TYPE = 5 /* cipher unique type */ -}; - - -/* Rabbit Context */ -typedef struct RabbitCtx { - word32 x[8]; - word32 c[8]; - word32 carry; -} RabbitCtx; - - -/* Rabbit stream cipher */ -typedef struct Rabbit { - RabbitCtx masterCtx; - RabbitCtx workCtx; -} Rabbit; - - -CYASSL_API int RabbitProcess(Rabbit*, byte*, const byte*, word32); -CYASSL_API int RabbitSetKey(Rabbit*, const byte* key, const byte* iv); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_RABBIT_H */ - -#endif /* NO_RABBIT */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h deleted file mode 100644 index 57674402..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/random.h +++ /dev/null @@ -1,119 +0,0 @@ -/* random.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_RANDOM_H -#define CTAO_CRYPT_RANDOM_H - -#include - -#ifndef NO_RC4 - #include -#else - #include -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -#if defined(USE_WINDOWS_API) - #if defined(_WIN64) - typedef unsigned __int64 ProviderHandle; - /* type HCRYPTPROV, avoid #include */ - #else - typedef unsigned long ProviderHandle; - #endif -#endif - - -/* OS specific seeder */ -typedef struct OS_Seed { - #if defined(USE_WINDOWS_API) - ProviderHandle handle; - #else - int fd; - #endif -} OS_Seed; - - -CYASSL_LOCAL -int GenerateSeed(OS_Seed* os, byte* seed, word32 sz); - -#if defined(CYASSL_MDK_ARM) -#undef RNG -#define RNG CyaSSL_RNG /* for avoiding name conflict in "stm32f2xx.h" */ -#endif - -#ifndef NO_RC4 - -#define CYASSL_RNG_CAVIUM_MAGIC 0xBEEF0004 - -/* secure Random Nnumber Generator */ - - -typedef struct RNG { - OS_Seed seed; - Arc4 cipher; -#ifdef HAVE_CAVIUM - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ -#endif -} RNG; - - -#ifdef HAVE_CAVIUM - CYASSL_API int InitRngCavium(RNG*, int); -#endif - -#else /* NO_RC4 */ - -#define DBRG_SEED_LEN (440/8) - - -/* secure Random Nnumber Generator */ -typedef struct RNG { - OS_Seed seed; - - Sha256 sha; - byte digest[SHA256_DIGEST_SIZE]; - byte V[DBRG_SEED_LEN]; - byte C[DBRG_SEED_LEN]; - word64 reseed_ctr; -} RNG; - -#endif - -CYASSL_API int InitRng(RNG*); -CYASSL_API int RNG_GenerateBlock(RNG*, byte*, word32 sz); -CYASSL_API int RNG_GenerateByte(RNG*, byte*); - -#ifdef NO_RC4 - CYASSL_API void FreeRng(RNG*); -#endif - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_RANDOM_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h deleted file mode 100644 index de062698..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/ripemd.h +++ /dev/null @@ -1,64 +0,0 @@ -/* ripemd.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef CYASSL_RIPEMD - -#ifndef CTAO_CRYPT_RIPEMD_H -#define CTAO_CRYPT_RIPEME_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { - RIPEMD = 3, /* hash type unique */ - RIPEMD_BLOCK_SIZE = 64, - RIPEMD_DIGEST_SIZE = 20, - RIPEMD_PAD_SIZE = 56 -}; - - -/* RipeMd 160 digest */ -typedef struct RipeMd { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word32 digest[RIPEMD_DIGEST_SIZE / sizeof(word32)]; - word32 buffer[RIPEMD_BLOCK_SIZE / sizeof(word32)]; -} RipeMd; - - -CYASSL_API void InitRipeMd(RipeMd*); -CYASSL_API void RipeMdUpdate(RipeMd*, const byte*, word32); -CYASSL_API void RipeMdFinal(RipeMd*, byte*); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_RIPEMD_H */ -#endif /* CYASSL_RIPEMD */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h deleted file mode 100644 index 1f94742a..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/rsa.h +++ /dev/null @@ -1,142 +0,0 @@ -/* rsa.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifndef NO_RSA - -#ifndef CTAO_CRYPT_RSA_H -#define CTAO_CRYPT_RSA_H - -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - -#define CYASSL_RSA_CAVIUM_MAGIC 0xBEEF0006 - -enum { - RSA_PUBLIC = 0, - RSA_PRIVATE = 1 -}; - -/* RSA */ -typedef struct RsaKey { - mp_int n, e, d, p, q, dP, dQ, u; - int type; /* public or private */ - void* heap; /* for user memory overrides */ -#ifdef HAVE_CAVIUM - int devId; /* nitrox device id */ - word32 magic; /* using cavium magic */ - word64 contextHandle; /* nitrox context memory handle */ - byte* c_n; /* cavium byte buffers for key parts */ - byte* c_e; - byte* c_d; - byte* c_p; - byte* c_q; - byte* c_dP; - byte* c_dQ; - byte* c_u; /* sizes in bytes */ - word16 c_nSz, c_eSz, c_dSz, c_pSz, c_qSz, c_dP_Sz, c_dQ_Sz, c_uSz; -#endif -} RsaKey; - - -CYASSL_API int InitRsaKey(RsaKey* key, void*); -CYASSL_API int FreeRsaKey(RsaKey* key); - -CYASSL_API int RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, RNG* rng); -CYASSL_API int RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, - RsaKey* key); -CYASSL_API int RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); -CYASSL_API int RsaSSL_Sign(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, RNG* rng); -CYASSL_API int RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, - RsaKey* key); -CYASSL_API int RsaSSL_Verify(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); -CYASSL_API int RsaEncryptSize(RsaKey* key); - -CYASSL_API int RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey*, - word32); -CYASSL_API int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey*, - word32); -#ifdef CYASSL_KEY_GEN - CYASSL_API int MakeRsaKey(RsaKey* key, int size, long e, RNG* rng); - CYASSL_API int RsaKeyToDer(RsaKey*, byte* output, word32 inLen); -#endif - -#ifdef HAVE_CAVIUM - CYASSL_API int RsaInitCavium(RsaKey*, int); - CYASSL_API void RsaFreeCavium(RsaKey*); -#endif - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int InitRsaKey_fips(RsaKey* key, void*); - CYASSL_API int FreeRsaKey_fips(RsaKey* key); - - CYASSL_API int RsaPublicEncrypt_fips(const byte* in,word32 inLen,byte* out, - word32 outLen, RsaKey* key, RNG* rng); - CYASSL_API int RsaPrivateDecryptInline_fips(byte* in, word32 inLen, - byte** out, RsaKey* key); - CYASSL_API int RsaPrivateDecrypt_fips(const byte* in, word32 inLen, - byte* out,word32 outLen,RsaKey* key); - CYASSL_API int RsaSSL_Sign_fips(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, RNG* rng); - CYASSL_API int RsaSSL_VerifyInline_fips(byte* in, word32 inLen, byte** out, - RsaKey* key); - CYASSL_API int RsaSSL_Verify_fips(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key); - CYASSL_API int RsaEncryptSize_fips(RsaKey* key); - - CYASSL_API int RsaPrivateKeyDecode_fips(const byte* input, word32* inOutIdx, - RsaKey*, word32); - CYASSL_API int RsaPublicKeyDecode_fips(const byte* input, word32* inOutIdx, - RsaKey*, word32); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define InitRsaKey InitRsaKey_fips - #define FreeRsaKey FreeRsaKey_fips - #define RsaPublicEncrypt RsaPublicEncrypt_fips - #define RsaPrivateDecryptInline RsaPrivateDecryptInline_fips - #define RsaPrivateDecrypt RsaPrivateDecrypt_fips - #define RsaSSL_Sign RsaSSL_Sign_fips - #define RsaSSL_VerifyInline RsaSSL_VerifyInline_fips - #define RsaSSL_Verify RsaSSL_Verify_fips - #define RsaEncryptSize RsaEncryptSize_fips - /* no implicit KeyDecodes since in asn.c (not rsa.c) */ - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_RSA_H */ - -#endif /* NO_RSA */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h deleted file mode 100644 index a506755f..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/settings.h +++ /dev/null @@ -1,667 +0,0 @@ -/* settings.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* Place OS specific preprocessor flags, defines, includes here, will be - included into every file because types.h includes it */ - - -#ifndef CTAO_CRYPT_SETTINGS_H -#define CTAO_CRYPT_SETTINGS_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Uncomment next line if using IPHONE */ -/* #define IPHONE */ - -/* Uncomment next line if using ThreadX */ -/* #define THREADX */ - -/* Uncomment next line if using Micrium ucOS */ -/* #define MICRIUM */ - -/* Uncomment next line if using Mbed */ -/* #define MBED */ - -/* Uncomment next line if using Microchip PIC32 ethernet starter kit */ -/* #define MICROCHIP_PIC32 */ - -/* Uncomment next line if using Microchip TCP/IP stack, version 5 */ -/* #define MICROCHIP_TCPIP_V5 */ - -/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */ -/* #define MICROCHIP_TCPIP */ - -/* Uncomment next line if using PIC32MZ Crypto Engine */ -/* #define CYASSL_MICROCHIP_PIC32MZ */ - -/* Uncomment next line if using FreeRTOS */ -/* #define FREERTOS */ - -/* Uncomment next line if using FreeRTOS Windows Simulator */ -/* #define FREERTOS_WINSIM */ - -/* Uncomment next line if using RTIP */ -/* #define EBSNET */ - -/* Uncomment next line if using lwip */ -/* #define CYASSL_LWIP */ - -/* Uncomment next line if building CyaSSL for a game console */ -/* #define CYASSL_GAME_BUILD */ - -/* Uncomment next line if building CyaSSL for LSR */ -/* #define CYASSL_LSR */ - -/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */ -/* #define FREESCALE_MQX */ - -/* Uncomment next line if using STM32F2 */ -/* #define CYASSL_STM32F2 */ - -/* Uncomment next line if using Comverge settings */ -/* #define COMVERGE */ - -/* Uncomment next line if using QL SEP settings */ -/* #define CYASSL_QL */ - -/* Uncomment next line if using LwIP native TCP socket settings */ -/* #define HAVE_LWIP_NATIVE */ - -/* Uncomment next line if building for EROAD */ -/* #define CYASSL_EROAD */ - -#include - -#ifdef IPHONE - #define SIZEOF_LONG_LONG 8 -#endif - - -#ifdef CYASSL_USER_SETTINGS - #include -#endif - - -#ifdef COMVERGE - #define THREADX - #define HAVE_NETX - #define CYASSL_USER_IO - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_FILESYSTEM - #define NO_SHA512 - #define NO_DH - #define NO_DSA - #define NO_HC128 - #define NO_RSA - #define NO_SESSION_CACHE - #define HAVE_ECC -#endif - - -#ifdef THREADX - #define SIZEOF_LONG_LONG 8 -#endif - -#ifdef HAVE_NETX - #include "nx_api.h" -#endif - -#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */ - #define CYASSL_LWIP - #define NO_WRITEV - #define SINGLE_THREADED - #define CYASSL_USER_IO - #define NO_FILESYSTEM -#endif - -#ifdef MICROCHIP_PIC32 - /* #define CYASSL_MICROCHIP_PIC32MZ */ - #define SIZEOF_LONG_LONG 8 - #define SINGLE_THREADED - #define CYASSL_USER_IO - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_FILESYSTEM - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT -#endif - -#ifdef CYASSL_MICROCHIP_PIC32MZ - #define CYASSL_PIC32MZ_CE - #define CYASSL_PIC32MZ_CRYPT - #define HAVE_AES_ENGINE - #define CYASSL_PIC32MZ_RNG - /* #define CYASSL_PIC32MZ_HASH */ - #define CYASSL_AES_COUNTER - #define HAVE_AESGCM - #define NO_BIG_INT - -#endif - -#ifdef MICROCHIP_TCPIP_V5 - /* include timer functions */ - #include "TCPIP Stack/TCPIP.h" -#endif - -#ifdef MICROCHIP_TCPIP - /* include timer, NTP functions */ - #ifdef MICROCHIP_MPLAB_HARMONY - #include "tcpip/tcpip.h" - #else - #include "system/system_services.h" - #include "tcpip/sntp.h" - #endif -#endif - -#ifdef MBED - #define CYASSL_USER_IO - #define NO_FILESYSTEM - #define NO_CERT - #define USE_CERT_BUFFERS_1024 - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_SHA512 - #define NO_DH - #define NO_DSA - #define NO_HC128 - #define HAVE_ECC - #define NO_SESSION_CACHE - #define CYASSL_CMSIS_RTOS -#endif - - -#ifdef CYASSL_EROAD - #define FREESCALE_MQX - #define FREESCALE_MMCAU - #define SINGLE_THREADED - #define NO_STDIO_FILESYSTEM - #define CYASSL_LEANPSK - #define HAVE_NULL_CIPHER - #define NO_OLD_TLS - #define NO_ASN - #define NO_BIG_INT - #define NO_RSA - #define NO_DSA - #define NO_DH - #define NO_CERTS - #define NO_PWDBASED - #define NO_DES3 - #define NO_MD4 - #define NO_RC4 - #define NO_MD5 - #define NO_SESSION_CACHE - #define NO_MAIN_DRIVER -#endif - -#ifdef FREERTOS_WINSIM - #define FREERTOS - #define USE_WINDOWS_API -#endif - - -/* Micrium will use Visual Studio for compilation but not the Win32 API */ -#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \ - && !defined(EBSNET) && !defined(CYASSL_EROAD) - #define USE_WINDOWS_API -#endif - - -#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER) - #include - #define XMALLOC(s, h, type) malloc((s)) - #define XFREE(p, h, type) free((p)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) -#endif - -#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL) - #undef XMALLOC - #define XMALLOC yaXMALLOC - #undef XFREE - #define XFREE yaXFREE - #undef XREALLOC - #define XREALLOC yaXREALLOC -#endif - - -#ifdef FREERTOS - #ifndef NO_WRITEV - #define NO_WRITEV - #endif - #ifndef NO_SHA512 - #define NO_SHA512 - #endif - #ifndef NO_DH - #define NO_DH - #endif - #ifndef NO_DSA - #define NO_DSA - #endif - #ifndef NO_HC128 - #define NO_HC128 - #endif - - #ifndef SINGLE_THREADED - #include "FreeRTOS.h" - #include "semphr.h" - #endif -#endif - -#ifdef EBSNET - #include "rtip.h" - - /* #define DEBUG_CYASSL */ - #define NO_CYASSL_DIR /* tbd */ - - #if (POLLOS) - #define SINGLE_THREADED - #endif - - #if (RTPLATFORM) - #if (!RTP_LITTLE_ENDIAN) - #define BIG_ENDIAN_ORDER - #endif - #else - #if (!KS_LITTLE_ENDIAN) - #define BIG_ENDIAN_ORDER - #endif - #endif - - #if (WINMSP3) - #undef SIZEOF_LONG - #define SIZEOF_LONG_LONG 8 - #else - #sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG - #endif - - #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC)) - #define XFREE(p, h, type) (rtp_free(p)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) - -#endif /* EBSNET */ - -#ifdef CYASSL_GAME_BUILD - #define SIZEOF_LONG_LONG 8 - #if defined(__PPU) || defined(__XENON) - #define BIG_ENDIAN_ORDER - #endif -#endif - -#ifdef CYASSL_LSR - #define HAVE_WEBSERVER - #define SIZEOF_LONG_LONG 8 - #define CYASSL_LOW_MEMORY - #define NO_WRITEV - #define NO_SHA512 - #define NO_DH - #define NO_DSA - #define NO_HC128 - #define NO_DEV_RANDOM - #define NO_CYASSL_DIR - #define NO_RABBIT - #ifndef NO_FILESYSTEM - #define LSR_FS - #include "inc/hw_types.h" - #include "fs.h" - #endif - #define CYASSL_LWIP - #include /* for tcp errno */ - #define CYASSL_SAFERTOS - #if defined(__IAR_SYSTEMS_ICC__) - /* enum uses enum */ - #pragma diag_suppress=Pa089 - #endif -#endif - -#ifdef CYASSL_SAFERTOS - #ifndef SINGLE_THREADED - #include "SafeRTOS/semphr.h" - #endif - - #include "SafeRTOS/heap.h" - #define XMALLOC(s, h, type) pvPortMalloc((s)) - #define XFREE(p, h, type) vPortFree((p)) - #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) -#endif - -#ifdef CYASSL_LOW_MEMORY - #undef RSA_LOW_MEM - #define RSA_LOW_MEM - #undef CYASSL_SMALL_STACK - #define CYASSL_SMALL_STACK - #undef TFM_TIMING_RESISTANT - #define TFM_TIMING_RESISTANT -#endif - -#ifdef FREESCALE_MQX - #define SIZEOF_LONG_LONG 8 - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_RABBIT - #define NO_CYASSL_DIR - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT - #define FREESCALE_K70_RNGA - /* #define FREESCALE_K53_RNGB */ - #include "mqx.h" - #ifndef NO_FILESYSTEM - #include "mfs.h" - #include "fio.h" - #endif - #ifndef SINGLE_THREADED - #include "mutex.h" - #endif - - #define XMALLOC(s, h, t) (void *)_mem_alloc_system((s)) - #define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));} - /* Note: MQX has no realloc, using fastmath above */ -#endif - -#ifdef CYASSL_STM32F2 - #define SIZEOF_LONG_LONG 8 - #define NO_DEV_RANDOM - #define NO_CYASSL_DIR - #define NO_RABBIT - #define STM32F2_RNG - #define STM32F2_CRYPTO - #define KEIL_INTRINSICS -#endif - -#ifdef MICRIUM - - #include "stdlib.h" - #include "net_cfg.h" - #include "ssl_cfg.h" - #include "net_secure_os.h" - - #define CYASSL_TYPES - - typedef CPU_INT08U byte; - typedef CPU_INT16U word16; - typedef CPU_INT32U word32; - - #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32) - #define SIZEOF_LONG 4 - #undef SIZEOF_LONG_LONG - #else - #undef SIZEOF_LONG - #define SIZEOF_LONG_LONG 8 - #endif - - #define STRING_USER - - #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr))) - #define XSTRNCPY(pstr_dest, pstr_src, len_max) \ - ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \ - (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max))) - #define XSTRNCMP(pstr_1, pstr_2, len_max) \ - ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \ - (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max))) - #define XSTRSTR(pstr, pstr_srch) \ - ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \ - (CPU_CHAR *)(pstr_srch))) - #define XMEMSET(pmem, data_val, size) \ - ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \ - (CPU_SIZE_T)(size))) - #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \ - (void *)(psrc), (CPU_SIZE_T)(size))) - #define XMEMCMP(pmem_1, pmem_2, size) \ - (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \ - (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES) - #define XMEMMOVE XMEMCPY - -#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - #define MICRIUM_MALLOC - #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \ - (CPU_SIZE_T)(s), (void *)0)) - #define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \ - (p), (void *)0)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) -#endif - - #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED) - #undef NO_FILESYSTEM - #else - #define NO_FILESYSTEM - #endif - - #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG) - #define DEBUG_CYASSL - #else - #undef DEBUG_CYASSL - #endif - - #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED) - #define OPENSSL_EXTRA - #else - #undef OPENSSL_EXTRA - #endif - - #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED) - #undef SINGLE_THREADED - #else - #define SINGLE_THREADED - #endif - - #if (SSL_CFG_DH_EN == DEF_ENABLED) - #undef NO_DH - #else - #define NO_DH - #endif - - #if (SSL_CFG_DSA_EN == DEF_ENABLED) - #undef NO_DSA - #else - #define NO_DSA - #endif - - #if (SSL_CFG_PSK_EN == DEF_ENABLED) - #undef NO_PSK - #else - #define NO_PSK - #endif - - #if (SSL_CFG_3DES_EN == DEF_ENABLED) - #undef NO_DES - #else - #define NO_DES - #endif - - #if (SSL_CFG_AES_EN == DEF_ENABLED) - #undef NO_AES - #else - #define NO_AES - #endif - - #if (SSL_CFG_RC4_EN == DEF_ENABLED) - #undef NO_RC4 - #else - #define NO_RC4 - #endif - - #if (SSL_CFG_RABBIT_EN == DEF_ENABLED) - #undef NO_RABBIT - #else - #define NO_RABBIT - #endif - - #if (SSL_CFG_HC128_EN == DEF_ENABLED) - #undef NO_HC128 - #else - #define NO_HC128 - #endif - - #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) - #define BIG_ENDIAN_ORDER - #else - #undef BIG_ENDIAN_ORDER - #define LITTLE_ENDIAN_ORDER - #endif - - #if (SSL_CFG_MD4_EN == DEF_ENABLED) - #undef NO_MD4 - #else - #define NO_MD4 - #endif - - #if (SSL_CFG_WRITEV_EN == DEF_ENABLED) - #undef NO_WRITEV - #else - #define NO_WRITEV - #endif - - #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED) - #define NO_DEV_RANDOM - #else - #undef NO_DEV_RANDOM - #endif - - #if (SSL_CFG_USER_IO_EN == DEF_ENABLED) - #define CYASSL_USER_IO - #else - #undef CYASSL_USER_IO - #endif - - #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED) - #undef LARGE_STATIC_BUFFERS - #undef STATIC_CHUNKS_ONLY - #else - #define LARGE_STATIC_BUFFERS - #define STATIC_CHUNKS_ONLY - #endif - - #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED) - #define CYASSL_DER_LOAD - #else - #undef CYASSL_DER_LOAD - #endif - - #if (SSL_CFG_DTLS_EN == DEF_ENABLED) - #define CYASSL_DTLS - #else - #undef CYASSL_DTLS - #endif - - #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED) - #define CYASSL_CALLBACKS - #else - #undef CYASSL_CALLBACKS - #endif - - #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED) - #define USE_FAST_MATH - #else - #undef USE_FAST_MATH - #endif - - #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED) - #define TFM_TIMING_RESISTANT - #else - #undef TFM_TIMING_RESISTANT - #endif - -#endif /* MICRIUM */ - - -#ifdef CYASSL_QL - #ifndef CYASSL_SEP - #define CYASSL_SEP - #endif - #ifndef OPENSSL_EXTRA - #define OPENSSL_EXTRA - #endif - #ifndef SESSION_CERTS - #define SESSION_CERTS - #endif - #ifndef HAVE_AESCCM - #define HAVE_AESCCM - #endif - #ifndef ATOMIC_USER - #define ATOMIC_USER - #endif - #ifndef CYASSL_DER_LOAD - #define CYASSL_DER_LOAD - #endif - #ifndef KEEP_PEER_CERT - #define KEEP_PEER_CERT - #endif - #ifndef HAVE_ECC - #define HAVE_ECC - #endif - #ifndef SESSION_INDEX - #define SESSION_INDEX - #endif -#endif /* CYASSL_QL */ - - -#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \ - !defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY) - #define USE_CYASSL_MEMORY -#endif - - -#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) - #undef KEEP_PEER_CERT - #define KEEP_PEER_CERT -#endif - - -/* stream ciphers except arc4 need 32bit alignment, intel ok without */ -#ifndef XSTREAM_ALIGNMENT - #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__) - #define NO_XSTREAM_ALIGNMENT - #else - #define XSTREAM_ALIGNMENT - #endif -#endif - - -/* if using hardware crypto and have alignment requirements, specify the - requirement here. The record header of SSL/TLS will prvent easy alignment. - This hint tries to help as much as possible. */ -#ifndef CYASSL_GENERAL_ALIGNMENT - #ifdef CYASSL_AESNI - #define CYASSL_GENERAL_ALIGNMENT 16 - #elif defined(XSTREAM_ALIGNMENT) - #define CYASSL_GENERAL_ALIGNMENT 4 - #else - #define CYASSL_GENERAL_ALIGNMENT 0 - #endif -#endif - -#ifdef HAVE_CRL - /* not widely supported yet */ - #undef NO_SKID - #define NO_SKID -#endif - -/* Place any other flags or defines here */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_SETTINGS_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h deleted file mode 100644 index 749b728a..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha.h +++ /dev/null @@ -1,91 +0,0 @@ -/* sha.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef NO_SHA - -#ifndef CTAO_CRYPT_SHA_H -#define CTAO_CRYPT_SHA_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { -#ifdef STM32F2_HASH - SHA_REG_SIZE = 4, /* STM32 register size, bytes */ -#endif - SHA = 1, /* hash type unique */ - SHA_BLOCK_SIZE = 64, - SHA_DIGEST_SIZE = 20, - SHA_PAD_SIZE = 56 -}; - -#ifdef CYASSL_PIC32MZ_HASH -#include "port/pic32/pic32mz-crypt.h" -#endif - -/* Sha digest */ -typedef struct Sha { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word32 buffer[SHA_BLOCK_SIZE / sizeof(word32)]; - #ifndef CYASSL_PIC32MZ_HASH - word32 digest[SHA_DIGEST_SIZE / sizeof(word32)]; - #else - word32 digest[PIC32_HASH_SIZE / sizeof(word32)]; - pic32mz_desc desc; /* Crypt Engine descripter */ - #endif -} Sha; - - -CYASSL_API int InitSha(Sha*); -CYASSL_API int ShaUpdate(Sha*, const byte*, word32); -CYASSL_API int ShaFinal(Sha*, byte*); - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int InitSha_fips(Sha*); - CYASSL_API int ShaUpdate_fips(Sha*, const byte*, word32); - CYASSL_API int ShaFinal_fips(Sha*, byte*); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define InitSha InitSha_fips - #define ShaUpdate ShaUpdate_fips - #define ShaFinal ShaFinal_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_SHA_H */ -#endif /* NO_SHA */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h deleted file mode 100644 index 5b709c23..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha256.h +++ /dev/null @@ -1,90 +0,0 @@ -/* sha256.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* code submitted by raphael.huck@efixo.com */ - - -#ifndef NO_SHA256 - -#ifndef CTAO_CRYPT_SHA256_H -#define CTAO_CRYPT_SHA256_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -#ifdef CYASSL_PIC32MZ_HASH -#include "port/pic32/pic32mz-crypt.h" -#endif - - -/* in bytes */ -enum { - SHA256 = 2, /* hash type unique */ - SHA256_BLOCK_SIZE = 64, - SHA256_DIGEST_SIZE = 32, - SHA256_PAD_SIZE = 56 -}; - - -/* Sha256 digest */ -typedef struct Sha256 { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word32 digest[SHA256_DIGEST_SIZE / sizeof(word32)]; - word32 buffer[SHA256_BLOCK_SIZE / sizeof(word32)]; - #ifdef CYASSL_PIC32MZ_HASH - pic32mz_desc desc ; /* Crypt Engine descripter */ - #endif -} Sha256; - - -CYASSL_API int InitSha256(Sha256*); -CYASSL_API int Sha256Update(Sha256*, const byte*, word32); -CYASSL_API int Sha256Final(Sha256*, byte*); - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int InitSha256_fips(Sha256*); - CYASSL_API int Sha256Update_fips(Sha256*, const byte*, word32); - CYASSL_API int Sha256Final_fips(Sha256*, byte*); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define InitSha256 InitSha256_fips - #define Sha256Update Sha256Update_fips - #define Sha256Final Sha256Final_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_SHA256_H */ -#endif /* NO_SHA256 */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h deleted file mode 100644 index 5a49942c..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/sha512.h +++ /dev/null @@ -1,118 +0,0 @@ -/* sha512.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef CYASSL_SHA512 - -#ifndef CTAO_CRYPT_SHA512_H -#define CTAO_CRYPT_SHA512_H - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -/* in bytes */ -enum { - SHA512 = 4, /* hash type unique */ - SHA512_BLOCK_SIZE = 128, - SHA512_DIGEST_SIZE = 64, - SHA512_PAD_SIZE = 112 -}; - - -/* Sha512 digest */ -typedef struct Sha512 { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; - word64 buffer[SHA512_BLOCK_SIZE / sizeof(word64)]; -} Sha512; - - -CYASSL_API int InitSha512(Sha512*); -CYASSL_API int Sha512Update(Sha512*, const byte*, word32); -CYASSL_API int Sha512Final(Sha512*, byte*); - - -#if defined(CYASSL_SHA384) || defined(HAVE_AESGCM) - -/* in bytes */ -enum { - SHA384 = 5, /* hash type unique */ - SHA384_BLOCK_SIZE = 128, - SHA384_DIGEST_SIZE = 48, - SHA384_PAD_SIZE = 112 -}; - - -/* Sha384 digest */ -typedef struct Sha384 { - word32 buffLen; /* in bytes */ - word32 loLen; /* length in bytes */ - word32 hiLen; /* length in bytes */ - word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; /* for transform 512 */ - word64 buffer[SHA384_BLOCK_SIZE / sizeof(word64)]; -} Sha384; - - -CYASSL_API int InitSha384(Sha384*); -CYASSL_API int Sha384Update(Sha384*, const byte*, word32); -CYASSL_API int Sha384Final(Sha384*, byte*); - - -#ifdef HAVE_FIPS - /* fips wrapper calls, user can call direct */ - CYASSL_API int InitSha512_fips(Sha512*); - CYASSL_API int Sha512Update_fips(Sha512*, const byte*, word32); - CYASSL_API int Sha512Final_fips(Sha512*, byte*); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define InitSha512 InitSha512_fips - #define Sha512Update Sha512Update_fips - #define Sha512Final Sha512Final_fips - #endif /* FIPS_NO_WRAPPERS */ - - /* fips wrapper calls, user can call direct */ - CYASSL_API int InitSha384_fips(Sha384*); - CYASSL_API int Sha384Update_fips(Sha384*, const byte*, word32); - CYASSL_API int Sha384Final_fips(Sha384*, byte*); - #ifndef FIPS_NO_WRAPPERS - /* if not impl or fips.c impl wrapper force fips calls if fips build */ - #define InitSha384 InitSha384_fips - #define Sha384Update Sha384Update_fips - #define Sha384Final Sha384Final_fips - #endif /* FIPS_NO_WRAPPERS */ - -#endif /* HAVE_FIPS */ - - -#endif /* CYASSL_SHA384 */ - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_SHA512_H */ -#endif /* CYASSL_SHA512 */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h deleted file mode 100644 index abb588f7..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/tfm.h +++ /dev/null @@ -1,694 +0,0 @@ -/* tfm.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* - * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -/** - * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) - * to fit CyaSSL's needs. - */ - - -#ifndef CTAO_CRYPT_TFM_H -#define CTAO_CRYPT_TFM_H - -#include -#ifndef CHAR_BIT - #include -#endif - - -#ifdef __cplusplus - extern "C" { -#endif - -#ifndef MIN - #define MIN(x,y) ((x)<(y)?(x):(y)) -#endif - -#ifndef MAX - #define MAX(x,y) ((x)>(y)?(x):(y)) -#endif - - -#ifndef NO_64BIT -/* autodetect x86-64 and make sure we are using 64-bit digits with x86-64 asm */ -#if defined(__x86_64__) - #if defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) - #error x86-64 detected, x86-32/SSE2/ARM optimizations are not valid! - #endif - #if !defined(TFM_X86_64) && !defined(TFM_NO_ASM) - #define TFM_X86_64 - #endif -#endif -#if defined(TFM_X86_64) - #if !defined(FP_64BIT) - #define FP_64BIT - #endif -#endif -/* use 64-bit digit even if not using asm on x86_64 */ -#if defined(__x86_64__) && !defined(FP_64BIT) - #define FP_64BIT -#endif -#endif /* NO_64BIT */ - -/* try to detect x86-32 */ -#if defined(__i386__) && !defined(TFM_SSE2) - #if defined(TFM_X86_64) || defined(TFM_ARM) - #error x86-32 detected, x86-64/ARM optimizations are not valid! - #endif - #if !defined(TFM_X86) && !defined(TFM_NO_ASM) - #define TFM_X86 - #endif -#endif - -/* make sure we're 32-bit for x86-32/sse/arm/ppc32 */ -#if (defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) || defined(TFM_PPC32)) && defined(FP_64BIT) - #warning x86-32, SSE2 and ARM, PPC32 optimizations require 32-bit digits (undefining) - #undef FP_64BIT -#endif - -/* multi asms? */ -#ifdef TFM_X86 - #define TFM_ASM -#endif -#ifdef TFM_X86_64 - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif -#ifdef TFM_SSE2 - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif -#ifdef TFM_ARM - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif -#ifdef TFM_PPC32 - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif -#ifdef TFM_PPC64 - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif -#ifdef TFM_AVR32 - #ifdef TFM_ASM - #error TFM_ASM already defined! - #endif - #define TFM_ASM -#endif - -/* we want no asm? */ -#ifdef TFM_NO_ASM - #undef TFM_X86 - #undef TFM_X86_64 - #undef TFM_SSE2 - #undef TFM_ARM - #undef TFM_PPC32 - #undef TFM_PPC64 - #undef TFM_AVR32 - #undef TFM_ASM -#endif - -/* ECC helpers */ -#ifdef TFM_ECC192 - #ifdef FP_64BIT - #define TFM_MUL3 - #define TFM_SQR3 - #else - #define TFM_MUL6 - #define TFM_SQR6 - #endif -#endif - -#ifdef TFM_ECC224 - #ifdef FP_64BIT - #define TFM_MUL4 - #define TFM_SQR4 - #else - #define TFM_MUL7 - #define TFM_SQR7 - #endif -#endif - -#ifdef TFM_ECC256 - #ifdef FP_64BIT - #define TFM_MUL4 - #define TFM_SQR4 - #else - #define TFM_MUL8 - #define TFM_SQR8 - #endif -#endif - -#ifdef TFM_ECC384 - #ifdef FP_64BIT - #define TFM_MUL6 - #define TFM_SQR6 - #else - #define TFM_MUL12 - #define TFM_SQR12 - #endif -#endif - -#ifdef TFM_ECC521 - #ifdef FP_64BIT - #define TFM_MUL9 - #define TFM_SQR9 - #else - #define TFM_MUL17 - #define TFM_SQR17 - #endif -#endif - - -/* some default configurations. - */ -#if defined(FP_64BIT) - /* for GCC only on supported platforms */ - typedef unsigned long long fp_digit; /* 64bit, 128 uses mode(TI) below */ - typedef unsigned long fp_word __attribute__ ((mode(TI))); -#else - #if defined(_MSC_VER) || defined(__BORLANDC__) - typedef unsigned __int64 ulong64; - #else - typedef unsigned long long ulong64; - #endif - - #ifndef NO_64BIT - typedef unsigned int fp_digit; - typedef ulong64 fp_word; - #else - /* some procs like coldfire prefer not to place multiply into 64bit type - even though it exists */ - typedef unsigned short fp_digit; - typedef unsigned int fp_word; - #endif -#endif - -/* # of digits this is */ -#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit)) - -/* Max size of any number in bits. Basically the largest size you will be - * multiplying should be half [or smaller] of FP_MAX_SIZE-four_digit - * - * It defaults to 4096-bits [allowing multiplications upto 2048x2048 bits ] - */ -#ifndef FP_MAX_BITS - #define FP_MAX_BITS 4096 -#endif -#define FP_MAX_SIZE (FP_MAX_BITS+(8*DIGIT_BIT)) - -/* will this lib work? */ -#if (CHAR_BIT & 7) - #error CHAR_BIT must be a multiple of eight. -#endif -#if FP_MAX_BITS % CHAR_BIT - #error FP_MAX_BITS must be a multiple of CHAR_BIT -#endif - -#define FP_MASK (fp_digit)(-1) -#define FP_SIZE (FP_MAX_SIZE/DIGIT_BIT) - -/* signs */ -#define FP_ZPOS 0 -#define FP_NEG 1 - -/* return codes */ -#define FP_OKAY 0 -#define FP_VAL 1 -#define FP_MEM 2 - -/* equalities */ -#define FP_LT -1 /* less than */ -#define FP_EQ 0 /* equal to */ -#define FP_GT 1 /* greater than */ - -/* replies */ -#define FP_YES 1 /* yes response */ -#define FP_NO 0 /* no response */ - -/* a FP type */ -typedef struct { - fp_digit dp[FP_SIZE]; - int used, - sign; -} fp_int; - -/* externally define this symbol to ignore the default settings, useful for changing the build from the make process */ -#ifndef TFM_ALREADY_SET - -/* do we want the large set of small multiplications ? - Enable these if you are going to be doing a lot of small (<= 16 digit) multiplications say in ECC - Or if you're on a 64-bit machine doing RSA as a 1024-bit integer == 16 digits ;-) - */ -/* need to refactor the function */ -/*#define TFM_SMALL_SET */ - -/* do we want huge code - Enable these if you are doing 20, 24, 28, 32, 48, 64 digit multiplications (useful for RSA) - Less important on 64-bit machines as 32 digits == 2048 bits - */ -#if 0 -#define TFM_MUL3 -#define TFM_MUL4 -#define TFM_MUL6 -#define TFM_MUL7 -#define TFM_MUL8 -#define TFM_MUL9 -#define TFM_MUL12 -#define TFM_MUL17 -#endif -#ifdef TFM_HUGE_SET -#define TFM_MUL20 -#define TFM_MUL24 -#define TFM_MUL28 -#define TFM_MUL32 -#if (FP_MAX_BITS >= 6144) && defined(FP_64BIT) - #define TFM_MUL48 -#endif -#if (FP_MAX_BITS >= 8192) && defined(FP_64BIT) - #define TFM_MUL64 -#endif -#endif - -#if 0 -#define TFM_SQR3 -#define TFM_SQR4 -#define TFM_SQR6 -#define TFM_SQR7 -#define TFM_SQR8 -#define TFM_SQR9 -#define TFM_SQR12 -#define TFM_SQR17 -#endif -#ifdef TFM_HUGE_SET -#define TFM_SQR20 -#define TFM_SQR24 -#define TFM_SQR28 -#define TFM_SQR32 -#define TFM_SQR48 -#define TFM_SQR64 -#endif - -/* do we want some overflow checks - Not required if you make sure your numbers are within range (e.g. by default a modulus for fp_exptmod() can only be upto 2048 bits long) - */ -/* #define TFM_CHECK */ - -/* Is the target a P4 Prescott - */ -/* #define TFM_PRESCOTT */ - -/* Do we want timing resistant fp_exptmod() ? - * This makes it slower but also timing invariant with respect to the exponent - */ -/* #define TFM_TIMING_RESISTANT */ - -#endif /* TFM_ALREADY_SET */ - -/* functions */ - -/* returns a TFM ident string useful for debugging... */ -/*const char *fp_ident(void);*/ - -/* initialize [or zero] an fp int */ -#define fp_init(a) (void)XMEMSET((a), 0, sizeof(fp_int)) -#define fp_zero(a) fp_init(a) - -/* zero/even/odd ? */ -#define fp_iszero(a) (((a)->used == 0) ? FP_YES : FP_NO) -#define fp_iseven(a) (((a)->used >= 0 && (((a)->dp[0] & 1) == 0)) ? FP_YES : FP_NO) -#define fp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? FP_YES : FP_NO) - -/* set to a small digit */ -void fp_set(fp_int *a, fp_digit b); - -/* copy from a to b */ -#define fp_copy(a, b) (void)(((a) != (b)) ? ((void)XMEMCPY((b), (a), sizeof(fp_int))) : (void)0) -#define fp_init_copy(a, b) fp_copy(b, a) - -/* clamp digits */ -#define fp_clamp(a) { while ((a)->used && (a)->dp[(a)->used-1] == 0) --((a)->used); (a)->sign = (a)->used ? (a)->sign : FP_ZPOS; } - -/* negate and absolute */ -#define fp_neg(a, b) { fp_copy(a, b); (b)->sign ^= 1; fp_clamp(b); } -#define fp_abs(a, b) { fp_copy(a, b); (b)->sign = 0; } - -/* right shift x digits */ -void fp_rshd(fp_int *a, int x); - -/* right shift x bits */ -void fp_rshb(fp_int *a, int x); - -/* left shift x digits */ -void fp_lshd(fp_int *a, int x); - -/* signed comparison */ -int fp_cmp(fp_int *a, fp_int *b); - -/* unsigned comparison */ -int fp_cmp_mag(fp_int *a, fp_int *b); - -/* power of 2 operations */ -void fp_div_2d(fp_int *a, int b, fp_int *c, fp_int *d); -void fp_mod_2d(fp_int *a, int b, fp_int *c); -void fp_mul_2d(fp_int *a, int b, fp_int *c); -void fp_2expt (fp_int *a, int b); -void fp_mul_2(fp_int *a, fp_int *c); -void fp_div_2(fp_int *a, fp_int *c); - -/* Counts the number of lsbs which are zero before the first zero bit */ -/*int fp_cnt_lsb(fp_int *a);*/ - -/* c = a + b */ -void fp_add(fp_int *a, fp_int *b, fp_int *c); - -/* c = a - b */ -void fp_sub(fp_int *a, fp_int *b, fp_int *c); - -/* c = a * b */ -void fp_mul(fp_int *a, fp_int *b, fp_int *c); - -/* b = a*a */ -void fp_sqr(fp_int *a, fp_int *b); - -/* a/b => cb + d == a */ -int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d); - -/* c = a mod b, 0 <= c < b */ -int fp_mod(fp_int *a, fp_int *b, fp_int *c); - -/* compare against a single digit */ -int fp_cmp_d(fp_int *a, fp_digit b); - -/* c = a + b */ -void fp_add_d(fp_int *a, fp_digit b, fp_int *c); - -/* c = a - b */ -void fp_sub_d(fp_int *a, fp_digit b, fp_int *c); - -/* c = a * b */ -void fp_mul_d(fp_int *a, fp_digit b, fp_int *c); - -/* a/b => cb + d == a */ -/*int fp_div_d(fp_int *a, fp_digit b, fp_int *c, fp_digit *d);*/ - -/* c = a mod b, 0 <= c < b */ -/*int fp_mod_d(fp_int *a, fp_digit b, fp_digit *c);*/ - -/* ---> number theory <--- */ -/* d = a + b (mod c) */ -/*int fp_addmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d);*/ - -/* d = a - b (mod c) */ -/*int fp_submod(fp_int *a, fp_int *b, fp_int *c, fp_int *d);*/ - -/* d = a * b (mod c) */ -int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); - -/* c = a * a (mod b) */ -int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c); - -/* c = 1/a (mod b) */ -int fp_invmod(fp_int *a, fp_int *b, fp_int *c); - -/* c = (a, b) */ -/*void fp_gcd(fp_int *a, fp_int *b, fp_int *c);*/ - -/* c = [a, b] */ -/*void fp_lcm(fp_int *a, fp_int *b, fp_int *c);*/ - -/* setups the montgomery reduction */ -int fp_montgomery_setup(fp_int *a, fp_digit *mp); - -/* computes a = B**n mod b without division or multiplication useful for - * normalizing numbers in a Montgomery system. - */ -void fp_montgomery_calc_normalization(fp_int *a, fp_int *b); - -/* computes x/R == x (mod N) via Montgomery Reduction */ -void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); - -/* d = a**b (mod c) */ -int fp_exptmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); - -/* primality stuff */ - -/* perform a Miller-Rabin test of a to the base b and store result in "result" */ -/*void fp_prime_miller_rabin (fp_int * a, fp_int * b, int *result);*/ - -/* 256 trial divisions + 8 Miller-Rabins, returns FP_YES if probable prime */ -/*int fp_isprime(fp_int *a);*/ - -/* Primality generation flags */ -/*#define TFM_PRIME_BBS 0x0001 */ /* BBS style prime */ -/*#define TFM_PRIME_SAFE 0x0002 */ /* Safe prime (p-1)/2 == prime */ -/*#define TFM_PRIME_2MSB_OFF 0x0004 */ /* force 2nd MSB to 0 */ -/*#define TFM_PRIME_2MSB_ON 0x0008 */ /* force 2nd MSB to 1 */ - -/* callback for fp_prime_random, should fill dst with random bytes and return how many read [upto len] */ -/*typedef int tfm_prime_callback(unsigned char *dst, int len, void *dat);*/ - -/*#define fp_prime_random(a, t, size, bbs, cb, dat) fp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?TFM_PRIME_BBS:0, cb, dat)*/ - -/*int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback cb, void *dat);*/ - -/* radix conersions */ -int fp_count_bits(fp_int *a); -int fp_leading_bit(fp_int *a); - -int fp_unsigned_bin_size(fp_int *a); -void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c); -void fp_to_unsigned_bin(fp_int *a, unsigned char *b); - -/*int fp_signed_bin_size(fp_int *a);*/ -/*void fp_read_signed_bin(fp_int *a, unsigned char *b, int c);*/ -/*void fp_to_signed_bin(fp_int *a, unsigned char *b);*/ - -/*int fp_read_radix(fp_int *a, char *str, int radix);*/ -/*int fp_toradix(fp_int *a, char *str, int radix);*/ -/*int fp_toradix_n(fp_int * a, char *str, int radix, int maxlen);*/ - - -/* VARIOUS LOW LEVEL STUFFS */ -void s_fp_add(fp_int *a, fp_int *b, fp_int *c); -void s_fp_sub(fp_int *a, fp_int *b, fp_int *c); -void fp_reverse(unsigned char *s, int len); - -void fp_mul_comba(fp_int *a, fp_int *b, fp_int *c); - -#ifdef TFM_SMALL_SET -void fp_mul_comba_small(fp_int *a, fp_int *b, fp_int *c); -#endif - -#ifdef TFM_MUL3 -void fp_mul_comba3(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL4 -void fp_mul_comba4(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL6 -void fp_mul_comba6(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL7 -void fp_mul_comba7(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL8 -void fp_mul_comba8(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL9 -void fp_mul_comba9(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL12 -void fp_mul_comba12(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL17 -void fp_mul_comba17(fp_int *a, fp_int *b, fp_int *c); -#endif - -#ifdef TFM_MUL20 -void fp_mul_comba20(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL24 -void fp_mul_comba24(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL28 -void fp_mul_comba28(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL32 -void fp_mul_comba32(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL48 -void fp_mul_comba48(fp_int *a, fp_int *b, fp_int *c); -#endif -#ifdef TFM_MUL64 -void fp_mul_comba64(fp_int *a, fp_int *b, fp_int *c); -#endif - -void fp_sqr_comba(fp_int *a, fp_int *b); - -#ifdef TFM_SMALL_SET -void fp_sqr_comba_small(fp_int *a, fp_int *b); -#endif - -#ifdef TFM_SQR3 -void fp_sqr_comba3(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR4 -void fp_sqr_comba4(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR6 -void fp_sqr_comba6(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR7 -void fp_sqr_comba7(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR8 -void fp_sqr_comba8(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR9 -void fp_sqr_comba9(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR12 -void fp_sqr_comba12(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR17 -void fp_sqr_comba17(fp_int *a, fp_int *b); -#endif - -#ifdef TFM_SQR20 -void fp_sqr_comba20(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR24 -void fp_sqr_comba24(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR28 -void fp_sqr_comba28(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR32 -void fp_sqr_comba32(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR48 -void fp_sqr_comba48(fp_int *a, fp_int *b); -#endif -#ifdef TFM_SQR64 -void fp_sqr_comba64(fp_int *a, fp_int *b); -#endif -/*extern const char *fp_s_rmap;*/ - - -/** - * Used by CyaSSL - */ - -/* Types */ - typedef fp_digit mp_digit; - typedef fp_word mp_word; - typedef fp_int mp_int; - -/* Constants */ - #define MP_LT FP_LT /* less than */ - #define MP_EQ FP_EQ /* equal to */ - #define MP_GT FP_GT /* greater than */ - #define MP_OKAY FP_OKAY /* ok result */ - #define MP_NO FP_NO /* yes/no result */ - #define MP_YES FP_YES /* yes/no result */ - -/* Prototypes */ -int mp_init (mp_int * a); -void mp_clear (mp_int * a); -int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, mp_int* f); - -int mp_add (mp_int * a, mp_int * b, mp_int * c); -int mp_sub (mp_int * a, mp_int * b, mp_int * c); -int mp_add_d (mp_int * a, mp_digit b, mp_int * c); - -int mp_mul (mp_int * a, mp_int * b, mp_int * c); -int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d); -int mp_mod(mp_int *a, mp_int *b, mp_int *c); -int mp_invmod(mp_int *a, mp_int *b, mp_int *c); -int mp_exptmod (mp_int * g, mp_int * x, mp_int * p, mp_int * y); - -int mp_cmp(mp_int *a, mp_int *b); -int mp_cmp_d(mp_int *a, mp_digit b); - -int mp_unsigned_bin_size(mp_int * a); -int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c); -int mp_to_unsigned_bin (mp_int * a, unsigned char *b); - -int mp_sub_d(fp_int *a, fp_digit b, fp_int *c); -int mp_copy(fp_int* a, fp_int* b); -int mp_isodd(mp_int* a); -int mp_iszero(mp_int* a); -int mp_count_bits(mp_int *a); -int mp_leading_bit(mp_int *a); -int mp_set_int(fp_int *a, fp_digit b); -void mp_rshb(mp_int *a, int x); - -#ifdef HAVE_ECC - int mp_read_radix(mp_int* a, const char* str, int radix); - int mp_set(fp_int *a, fp_digit b); - int mp_sqr(fp_int *a, fp_int *b); - int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); - int mp_montgomery_setup(fp_int *a, fp_digit *rho); - int mp_div_2(fp_int * a, fp_int * b); - int mp_init_copy(fp_int * a, fp_int * b); -#endif - -#if defined(HAVE_ECC) || defined(CYASSL_KEY_GEN) - int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c); - int mp_montgomery_calc_normalization(mp_int *a, mp_int *b); -#endif - -#ifdef CYASSL_KEY_GEN -int mp_gcd(fp_int *a, fp_int *b, fp_int *c); -int mp_lcm(fp_int *a, fp_int *b, fp_int *c); -int mp_prime_is_prime(mp_int* a, int t, int* result); -#endif /* CYASSL_KEY_GEN */ - -CYASSL_API word32 CheckRunTimeFastMath(void); - -/* If user uses RSA, DH, DSA, or ECC math lib directly then fast math FP_SIZE - must match, return 1 if a match otherwise 0 */ -#define CheckFastMathSettings() (FP_SIZE == CheckRunTimeFastMath()) -#ifdef __cplusplus - } -#endif - - -#endif /* CTAO_CRYPT_TFM_H */ diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h deleted file mode 100644 index 194b50b7..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/types.h +++ /dev/null @@ -1,328 +0,0 @@ -/* types.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CTAO_CRYPT_TYPES_H -#define CTAO_CRYPT_TYPES_H - -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -#if defined(WORDS_BIGENDIAN) - #define BIG_ENDIAN_ORDER -#endif - -#ifndef BIG_ENDIAN_ORDER - #define LITTLE_ENDIAN_ORDER -#endif - -#ifndef CYASSL_TYPES - #ifndef byte - typedef unsigned char byte; - #endif - typedef unsigned short word16; - typedef unsigned int word32; -#endif - - -/* try to set SIZEOF_LONG or LONG_LONG if user didn't */ -#if !defined(_MSC_VER) && !defined(__BCPLUSPLUS__) - #if !defined(SIZEOF_LONG_LONG) && !defined(SIZEOF_LONG) - #if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) \ - || defined(__mips64) || defined(__x86_64__)) - /* long should be 64bit */ - #define SIZEOF_LONG 8 - #elif defined(__i386__) || defined(__CORTEX_M3__) - /* long long should be 64bit */ - #define SIZEOF_LONG_LONG 8 - #endif - #endif -#endif - - -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) - #define WORD64_AVAILABLE - #define W64LIT(x) x##ui64 - typedef unsigned __int64 word64; -#elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8 - #define WORD64_AVAILABLE - #define W64LIT(x) x##LL - typedef unsigned long word64; -#elif defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG == 8 - #define WORD64_AVAILABLE - #define W64LIT(x) x##LL - typedef unsigned long long word64; -#elif defined(__SIZEOF_LONG_LONG__) && __SIZEOF_LONG_LONG__ == 8 - #define WORD64_AVAILABLE - #define W64LIT(x) x##LL - typedef unsigned long long word64; -#else - #define MP_16BIT /* for mp_int, mp_word needs to be twice as big as - mp_digit, no 64 bit type so make mp_digit 16 bit */ -#endif - - -/* These platforms have 64-bit CPU registers. */ -#if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \ - defined(__mips64) || defined(__x86_64__) || defined(_M_X64)) - typedef word64 word; -#else - typedef word32 word; - #ifdef WORD64_AVAILABLE - #define CTAOCRYPT_SLOW_WORD64 - #endif -#endif - - -enum { - CYASSL_WORD_SIZE = sizeof(word), - CYASSL_BIT_SIZE = 8, - CYASSL_WORD_BITS = CYASSL_WORD_SIZE * CYASSL_BIT_SIZE -}; - -#define CYASSL_MAX_16BIT 0xffffU - -/* use inlining if compiler allows */ -#ifndef INLINE -#ifndef NO_INLINE - #ifdef _MSC_VER - #define INLINE __inline - #elif defined(__GNUC__) - #define INLINE inline - #elif defined(__IAR_SYSTEMS_ICC__) - #define INLINE inline - #elif defined(THREADX) - #define INLINE _Inline - #else - #define INLINE - #endif -#else - #define INLINE -#endif -#endif - - -/* set up rotate style */ -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) - #define INTEL_INTRINSICS - #define FAST_ROTATE -#elif defined(__MWERKS__) && TARGET_CPU_PPC - #define PPC_INTRINSICS - #define FAST_ROTATE -#elif defined(__GNUC__) && defined(__i386__) - /* GCC does peephole optimizations which should result in using rotate - instructions */ - #define FAST_ROTATE -#endif - - -/* set up thread local storage if available */ -#ifdef HAVE_THREAD_LS - #if defined(_MSC_VER) - #define THREAD_LS_T __declspec(thread) - #else - #define THREAD_LS_T __thread - #endif -#else - #define THREAD_LS_T -#endif - - -/* Micrium will use Visual Studio for compilation but not the Win32 API */ -#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \ - && !defined(EBSNET) - #define USE_WINDOWS_API -#endif - - -/* idea to add global alloc override by Moisés Guimarães */ -/* default to libc stuff */ -/* XREALLOC is used once in normal math lib, not in fast math lib */ -/* XFREE on some embeded systems doesn't like free(0) so test */ -#if defined(XMALLOC_USER) - /* prototypes for user heap override functions */ - #include /* for size_t */ - extern void *XMALLOC(size_t n, void* heap, int type); - extern void *XREALLOC(void *p, size_t n, void* heap, int type); - extern void XFREE(void *p, void* heap, int type); -#elif defined(NO_CYASSL_MEMORY) - /* just use plain C stdlib stuff if desired */ - #include - #define XMALLOC(s, h, t) ((void)h, (void)t, malloc((s))) - #define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));} - #define XREALLOC(p, n, h, t) realloc((p), (n)) -#elif !defined(MICRIUM_MALLOC) && !defined(EBSNET) \ - && !defined(CYASSL_SAFERTOS) && !defined(FREESCALE_MQX) \ - && !defined(CYASSL_LEANPSK) - /* default C runtime, can install different routines at runtime via cbs */ - #include - #define XMALLOC(s, h, t) ((void)h, (void)t, CyaSSL_Malloc((s))) - #define XFREE(p, h, t) {void* xp = (p); if((xp)) CyaSSL_Free((xp));} - #define XREALLOC(p, n, h, t) CyaSSL_Realloc((p), (n)) -#endif - -#ifndef STRING_USER - #include - char* mystrnstr(const char* s1, const char* s2, unsigned int n); - - #define XMEMCPY(d,s,l) memcpy((d),(s),(l)) - #define XMEMSET(b,c,l) memset((b),(c),(l)) - #define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n)) - #define XMEMMOVE(d,s,l) memmove((d),(s),(l)) - - #define XSTRLEN(s1) strlen((s1)) - #define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n)) - /* strstr, strncmp, and strncat only used by CyaSSL proper, not required for - CTaoCrypt only */ - #define XSTRSTR(s1,s2) strstr((s1),(s2)) - #define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n)) - #define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n)) - #define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n)) - #ifndef USE_WINDOWS_API - #define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n)) - #define XSNPRINTF snprintf - #else - #define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n)) - #define XSNPRINTF _snprintf - #endif -#endif - -#ifndef CTYPE_USER - #include - #if defined(HAVE_ECC) || defined(HAVE_OCSP) - #define XTOUPPER(c) toupper((c)) - #define XISALPHA(c) isalpha((c)) - #endif - /* needed by CyaSSL_check_domain_name() */ - #ifdef __CYGWIN__ - /* Cygwin uses a macro version of tolower() by default, use the - * function version. */ - #undef tolower - #endif - #define XTOLOWER(c) tolower((c)) -#endif - - -/* memory allocation types for user hints */ -enum { - DYNAMIC_TYPE_CA = 1, - DYNAMIC_TYPE_CERT = 2, - DYNAMIC_TYPE_KEY = 3, - DYNAMIC_TYPE_FILE = 4, - DYNAMIC_TYPE_SUBJECT_CN = 5, - DYNAMIC_TYPE_PUBLIC_KEY = 6, - DYNAMIC_TYPE_SIGNER = 7, - DYNAMIC_TYPE_NONE = 8, - DYNAMIC_TYPE_BIGINT = 9, - DYNAMIC_TYPE_RSA = 10, - DYNAMIC_TYPE_METHOD = 11, - DYNAMIC_TYPE_OUT_BUFFER = 12, - DYNAMIC_TYPE_IN_BUFFER = 13, - DYNAMIC_TYPE_INFO = 14, - DYNAMIC_TYPE_DH = 15, - DYNAMIC_TYPE_DOMAIN = 16, - DYNAMIC_TYPE_SSL = 17, - DYNAMIC_TYPE_CTX = 18, - DYNAMIC_TYPE_WRITEV = 19, - DYNAMIC_TYPE_OPENSSL = 20, - DYNAMIC_TYPE_DSA = 21, - DYNAMIC_TYPE_CRL = 22, - DYNAMIC_TYPE_REVOKED = 23, - DYNAMIC_TYPE_CRL_ENTRY = 24, - DYNAMIC_TYPE_CERT_MANAGER = 25, - DYNAMIC_TYPE_CRL_MONITOR = 26, - DYNAMIC_TYPE_OCSP_STATUS = 27, - DYNAMIC_TYPE_OCSP_ENTRY = 28, - DYNAMIC_TYPE_ALTNAME = 29, - DYNAMIC_TYPE_SUITES = 30, - DYNAMIC_TYPE_CIPHER = 31, - DYNAMIC_TYPE_RNG = 32, - DYNAMIC_TYPE_ARRAYS = 33, - DYNAMIC_TYPE_DTLS_POOL = 34, - DYNAMIC_TYPE_SOCKADDR = 35, - DYNAMIC_TYPE_LIBZ = 36, - DYNAMIC_TYPE_ECC = 37, - DYNAMIC_TYPE_TMP_BUFFER = 38, - DYNAMIC_TYPE_DTLS_MSG = 39, - DYNAMIC_TYPE_CAVIUM_TMP = 40, - DYNAMIC_TYPE_CAVIUM_RSA = 41, - DYNAMIC_TYPE_X509 = 42, - DYNAMIC_TYPE_TLSX = 43, - DYNAMIC_TYPE_OCSP = 44, - DYNAMIC_TYPE_SIGNATURE = 45 -}; - -/* max error buffer string size */ -enum { - CYASSL_MAX_ERROR_SZ = 80 -}; - -/* stack protection */ -enum { - MIN_STACK_BUFFER = 8 -}; - - - -/* settings detection for compile vs runtime math incombatibilities */ -enum { -#if !defined(USE_FAST_MATH) && !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG) - CTC_SETTINGS = 0x0 -#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) - CTC_SETTINGS = 0x1 -#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 8) - CTC_SETTINGS = 0x2 -#elif !defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 4) - CTC_SETTINGS = 0x4 -#elif defined(USE_FAST_MATH) && !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG) - CTC_SETTINGS = 0x8 -#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) - CTC_SETTINGS = 0x10 -#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 8) - CTC_SETTINGS = 0x20 -#elif defined(USE_FAST_MATH) && defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 4) - CTC_SETTINGS = 0x40 -#else - #error "bad math long / long long settings" -#endif -}; - - -CYASSL_API word32 CheckRunTimeSettings(void); - -/* If user uses RSA, DH, DSA, or ECC math lib directly then fast math and long - types need to match at compile time and run time, CheckCtcSettings will - return 1 if a match otherwise 0 */ -#define CheckCtcSettings() (CTC_SETTINGS == CheckRunTimeSettings()) - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_TYPES_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h b/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h deleted file mode 100644 index a3b27812..00000000 --- a/project1/cyassl-3.0.0/cyassl/ctaocrypt/visibility.h +++ /dev/null @@ -1,69 +0,0 @@ -/* visibility.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* Visibility control macros */ - - -#ifndef CTAO_CRYPT_VISIBILITY_H -#define CTAO_CRYPT_VISIBILITY_H - - -/* CYASSL_API is used for the public API symbols. - It either imports or exports (or does nothing for static builds) - - CYASSL_LOCAL is used for non-API symbols (private). -*/ - -#if defined(BUILDING_CYASSL) - #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY - #define CYASSL_API __attribute__ ((visibility("default"))) - #define CYASSL_LOCAL __attribute__ ((visibility("hidden"))) - #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) - #define CYASSL_API __global - #define CYASSL_LOCAL __hidden - #elif defined(_MSC_VER) - #ifdef CYASSL_DLL - #define CYASSL_API extern __declspec(dllexport) - #else - #define CYASSL_API - #endif - #define CYASSL_LOCAL - #else - #define CYASSL_API - #define CYASSL_LOCAL - #endif /* HAVE_VISIBILITY */ -#else /* BUILDING_CYASSL */ - #if defined(_MSC_VER) - #ifdef CYASSL_DLL - #define CYASSL_API extern __declspec(dllimport) - #else - #define CYASSL_API - #endif - #define CYASSL_LOCAL - #else - #define CYASSL_API - #define CYASSL_LOCAL - #endif -#endif /* BUILDING_CYASSL */ - - -#endif /* CTAO_CRYPT_VISIBILITY_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/error-ssl.h b/project1/cyassl-3.0.0/cyassl/error-ssl.h deleted file mode 100644 index 74445b40..00000000 --- a/project1/cyassl-3.0.0/cyassl/error-ssl.h +++ /dev/null @@ -1,149 +0,0 @@ -/* error-ssl.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_ERROR_H -#define CYASSL_ERROR_H - -#include /* pull in CTaoCrypt errors */ - -#ifdef __cplusplus - extern "C" { -#endif - -enum CyaSSL_ErrorCodes { - INPUT_CASE_ERROR = -201, /* process input state error */ - PREFIX_ERROR = -202, /* bad index to key rounds */ - MEMORY_ERROR = -203, /* out of memory */ - VERIFY_FINISHED_ERROR = -204, /* verify problem on finished */ - VERIFY_MAC_ERROR = -205, /* verify mac problem */ - PARSE_ERROR = -206, /* parse error on header */ - UNKNOWN_HANDSHAKE_TYPE = -207, /* weird handshake type */ - SOCKET_ERROR_E = -208, /* error state on socket */ - SOCKET_NODATA = -209, /* expected data, not there */ - INCOMPLETE_DATA = -210, /* don't have enough data to - complete task */ - UNKNOWN_RECORD_TYPE = -211, /* unknown type in record hdr */ - DECRYPT_ERROR = -212, /* error during decryption */ - FATAL_ERROR = -213, /* recvd alert fatal error */ - ENCRYPT_ERROR = -214, /* error during encryption */ - FREAD_ERROR = -215, /* fread problem */ - NO_PEER_KEY = -216, /* need peer's key */ - NO_PRIVATE_KEY = -217, /* need the private key */ - RSA_PRIVATE_ERROR = -218, /* error during rsa priv op */ - NO_DH_PARAMS = -219, /* server missing DH params */ - BUILD_MSG_ERROR = -220, /* build message failure */ - - BAD_HELLO = -221, /* client hello malformed */ - DOMAIN_NAME_MISMATCH = -222, /* peer subject name mismatch */ - WANT_READ = -223, /* want read, call again */ - NOT_READY_ERROR = -224, /* handshake layer not ready */ - PMS_VERSION_ERROR = -225, /* pre m secret version error */ - VERSION_ERROR = -226, /* record layer version error */ - WANT_WRITE = -227, /* want write, call again */ - BUFFER_ERROR = -228, /* malformed buffer input */ - VERIFY_CERT_ERROR = -229, /* verify cert error */ - VERIFY_SIGN_ERROR = -230, /* verify sign error */ - CLIENT_ID_ERROR = -231, /* psk client identity error */ - SERVER_HINT_ERROR = -232, /* psk server hint error */ - PSK_KEY_ERROR = -233, /* psk key error */ - ZLIB_INIT_ERROR = -234, /* zlib init error */ - ZLIB_COMPRESS_ERROR = -235, /* zlib compression error */ - ZLIB_DECOMPRESS_ERROR = -236, /* zlib decompression error */ - - GETTIME_ERROR = -237, /* gettimeofday failed ??? */ - GETITIMER_ERROR = -238, /* getitimer failed ??? */ - SIGACT_ERROR = -239, /* sigaction failed ??? */ - SETITIMER_ERROR = -240, /* setitimer failed ??? */ - LENGTH_ERROR = -241, /* record layer length error */ - PEER_KEY_ERROR = -242, /* can't decode peer key */ - ZERO_RETURN = -243, /* peer sent close notify */ - SIDE_ERROR = -244, /* wrong client/server type */ - NO_PEER_CERT = -245, /* peer didn't send key */ - NTRU_KEY_ERROR = -246, /* NTRU key error */ - NTRU_DRBG_ERROR = -247, /* NTRU drbg error */ - NTRU_ENCRYPT_ERROR = -248, /* NTRU encrypt error */ - NTRU_DECRYPT_ERROR = -249, /* NTRU decrypt error */ - ECC_CURVETYPE_ERROR = -250, /* Bad ECC Curve Type */ - ECC_CURVE_ERROR = -251, /* Bad ECC Curve */ - ECC_PEERKEY_ERROR = -252, /* Bad Peer ECC Key */ - ECC_MAKEKEY_ERROR = -253, /* Bad Make ECC Key */ - ECC_EXPORT_ERROR = -254, /* Bad ECC Export Key */ - ECC_SHARED_ERROR = -255, /* Bad ECC Shared Secret */ - NOT_CA_ERROR = -257, /* Not a CA cert error */ - BAD_PATH_ERROR = -258, /* Bad path for opendir */ - BAD_CERT_MANAGER_ERROR = -259, /* Bad Cert Manager */ - OCSP_CERT_REVOKED = -260, /* OCSP Certificate revoked */ - CRL_CERT_REVOKED = -261, /* CRL Certificate revoked */ - CRL_MISSING = -262, /* CRL Not loaded */ - MONITOR_RUNNING_E = -263, /* CRL Monitor already running */ - THREAD_CREATE_E = -264, /* Thread Create Error */ - OCSP_NEED_URL = -265, /* OCSP need an URL for lookup */ - OCSP_CERT_UNKNOWN = -266, /* OCSP responder doesn't know */ - OCSP_LOOKUP_FAIL = -267, /* OCSP lookup not successful */ - MAX_CHAIN_ERROR = -268, /* max chain depth exceeded */ - COOKIE_ERROR = -269, /* dtls cookie error */ - SEQUENCE_ERROR = -270, /* dtls sequence error */ - SUITES_ERROR = -271, /* suites pointer error */ - SSL_NO_PEM_HEADER = -272, /* no PEM header found */ - OUT_OF_ORDER_E = -273, /* out of order message */ - BAD_KEA_TYPE_E = -274, /* bad KEA type found */ - SANITY_CIPHER_E = -275, /* sanity check on cipher error */ - RECV_OVERFLOW_E = -276, /* RXCB returned more than rqed */ - GEN_COOKIE_E = -277, /* Generate Cookie Error */ - NO_PEER_VERIFY = -278, /* Need peer cert verify Error */ - FWRITE_ERROR = -279, /* fwrite problem */ - CACHE_MATCH_ERROR = -280, /* chache hdr match error */ - UNKNOWN_SNI_HOST_NAME_E = -281, /* Unrecognized host name Error */ - UNKNOWN_MAX_FRAG_LEN_E = -282, /* Unrecognized max frag len Error */ - /* add strings to SetErrorString !!!!! */ - KEYUSE_SIGNATURE_E = -283, /* KeyUse digSignature error */ - KEYUSE_ENCIPHER_E = -285, /* KeyUse keyEncipher error */ - EXTKEYUSE_AUTH_E = -286, /* ExtKeyUse server|client_auth */ - - /* begin negotiation parameter errors */ - UNSUPPORTED_SUITE = -290, /* unsupported cipher suite */ - MATCH_SUITE_ERROR = -291 /* can't match cipher suite */ - /* end negotiation parameter errors only 10 for now */ - /* add strings to SetErrorString !!!!! */ -}; - - -#ifdef CYASSL_CALLBACKS - enum { - MIN_PARAM_ERR = UNSUPPORTED_SUITE, - MAX_PARAM_ERR = MIN_PARAM_ERR - 10 - }; -#endif - - -CYASSL_LOCAL -void SetErrorString(int err, char* buff); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CyaSSL_ERROR_H */ - - diff --git a/project1/cyassl-3.0.0/cyassl/include.am b/project1/cyassl-3.0.0/cyassl/include.am deleted file mode 100644 index db1f089e..00000000 --- a/project1/cyassl-3.0.0/cyassl/include.am +++ /dev/null @@ -1,25 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -include cyassl/ctaocrypt/include.am -include cyassl/openssl/include.am - -EXTRA_DIST+= cyassl/sniffer_error.rc - -nobase_include_HEADERS+= \ - cyassl/error-ssl.h \ - cyassl/ssl.h \ - cyassl/sniffer_error.h \ - cyassl/sniffer.h \ - cyassl/callbacks.h \ - cyassl/certs_test.h \ - cyassl/test.h \ - cyassl/version.h \ - cyassl/options.h \ - cyassl/ocsp.h \ - cyassl/crl.h - -noinst_HEADERS+= \ - cyassl/internal.h - diff --git a/project1/cyassl-3.0.0/cyassl/internal.h b/project1/cyassl-3.0.0/cyassl/internal.h deleted file mode 100644 index b2dd3cc6..00000000 --- a/project1/cyassl-3.0.0/cyassl/internal.h +++ /dev/null @@ -1,2143 +0,0 @@ -/* internal.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_INT_H -#define CYASSL_INT_H - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef NO_RC4 - #include -#endif -#ifdef HAVE_ECC - #include -#endif -#ifndef NO_SHA256 - #include -#endif -#ifdef HAVE_OCSP - #include -#endif -#ifdef CYASSL_SHA512 - #include -#endif - -#ifdef HAVE_AESGCM - #include -#endif - -#ifdef CYASSL_RIPEMD - #include -#endif - -#ifdef CYASSL_CALLBACKS - #include - #include -#endif - -#ifdef USE_WINDOWS_API - #ifdef CYASSL_GAME_BUILD - #include "system/xtl.h" - #else - #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) - /* On WinCE winsock2.h must be included before windows.h */ - #include - #endif - #include - #endif -#elif defined(THREADX) - #ifndef SINGLE_THREADED - #include "tx_api.h" - #endif -#elif defined(MICRIUM) - /* do nothing, just don't pick Unix */ -#elif defined(FREERTOS) || defined(CYASSL_SAFERTOS) - /* do nothing */ -#elif defined(EBSNET) - /* do nothing */ -#elif defined(FREESCALE_MQX) - /* do nothing */ -#elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #else - #include - #endif -#elif defined(MBED) - -#else - #ifndef SINGLE_THREADED - #define CYASSL_PTHREADS - #include - #endif - #if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) - #include /* for close of BIO */ - #endif -#endif - - -#ifdef HAVE_LIBZ - #include "zlib.h" -#endif - -#ifdef _MSC_VER - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable: 4996) -#endif - -#ifdef NO_AES - #if !defined (ALIGN16) - #define ALIGN16 - #endif -#endif - -#ifdef NO_SHA - #define SHA_DIGEST_SIZE 20 -#endif - -#ifdef NO_SHA256 - #define SHA256_DIGEST_SIZE 32 -#endif - - -#ifdef __cplusplus - extern "C" { -#endif - - -#ifdef USE_WINDOWS_API - typedef unsigned int SOCKET_T; -#else - typedef int SOCKET_T; -#endif - - -typedef byte word24[3]; - -/* used by ssl.c and cyassl_int.c */ -void c32to24(word32 in, word24 out); - -/* Define or comment out the cipher suites you'd like to be compiled in - make sure to use at least one BUILD_SSL_xxx or BUILD_TLS_xxx is defined - - When adding cipher suites, add name to cipher_names, idx to cipher_name_idx -*/ -#if !defined(NO_RSA) && !defined(NO_RC4) - #if !defined(NO_SHA) - #define BUILD_SSL_RSA_WITH_RC4_128_SHA - #endif - #if !defined(NO_MD5) - #define BUILD_SSL_RSA_WITH_RC4_128_MD5 - #endif - #if !defined(NO_TLS) && defined(HAVE_NTRU) && !defined(NO_SHA) - #define BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA - #endif -#endif - -#if !defined(NO_RSA) && !defined(NO_DES3) - #if !defined(NO_SHA) - #define BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA - #if !defined(NO_TLS) && defined(HAVE_NTRU) - #define BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA - #endif - #endif -#endif - -#if !defined(NO_RSA) && !defined(NO_AES) && !defined(NO_TLS) - #if !defined(NO_SHA) - #define BUILD_TLS_RSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_RSA_WITH_AES_256_CBC_SHA - #if defined(HAVE_NTRU) - #define BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA - #endif - #endif - #if !defined (NO_SHA256) - #define BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 - #define BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 - #endif - #if defined (HAVE_AESGCM) - #define BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 - #if defined (CYASSL_SHA384) - #define BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 - #endif - #endif - #if defined (HAVE_AESCCM) - #define BUILD_TLS_RSA_WITH_AES_128_CCM_8 - #define BUILD_TLS_RSA_WITH_AES_256_CCM_8 - #endif - #if defined(HAVE_BLAKE2) - #define BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 - #define BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 - #endif -#endif - -#if defined(HAVE_CAMELLIA) && !defined(NO_TLS) - #ifndef NO_RSA - #if !defined(NO_SHA) - #define BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - #define BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - #endif - #ifndef NO_SHA256 - #define BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - #define BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - #endif - #if !defined(NO_DH) && defined(OPENSSL_EXTRA) - #if !defined(NO_SHA) - #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - #endif - #ifndef NO_SHA256 - #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - #define BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - #endif - #endif - #endif -#endif - -#if !defined(NO_PSK) && !defined(NO_AES) && !defined(NO_TLS) - #if !defined(NO_SHA) - #define BUILD_TLS_PSK_WITH_AES_128_CBC_SHA - #define BUILD_TLS_PSK_WITH_AES_256_CBC_SHA - #endif - #ifndef NO_SHA256 - #define BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 - #ifdef HAVE_AESCCM - #define BUILD_TLS_PSK_WITH_AES_128_CCM_8 - #define BUILD_TLS_PSK_WITH_AES_256_CCM_8 - #endif - #endif -#endif - -#if !defined(NO_TLS) && defined(HAVE_NULL_CIPHER) - #if !defined(NO_RSA) - #if !defined(NO_SHA) - #define BUILD_TLS_RSA_WITH_NULL_SHA - #endif - #ifndef NO_SHA256 - #define BUILD_TLS_RSA_WITH_NULL_SHA256 - #endif - #endif - #if !defined(NO_PSK) - #if !defined(NO_SHA) - #define BUILD_TLS_PSK_WITH_NULL_SHA - #endif - #ifndef NO_SHA256 - #define BUILD_TLS_PSK_WITH_NULL_SHA256 - #endif - #endif -#endif - -#if !defined(NO_HC128) && !defined(NO_RSA) && !defined(NO_TLS) - #define BUILD_TLS_RSA_WITH_HC_128_MD5 - #if !defined(NO_SHA) - #define BUILD_TLS_RSA_WITH_HC_128_SHA - #endif - #if defined(HAVE_BLAKE2) - #define BUILD_TLS_RSA_WITH_HC_128_B2B256 - #endif -#endif - -#if !defined(NO_RABBIT) && !defined(NO_TLS) && !defined(NO_RSA) - #if !defined(NO_SHA) - #define BUILD_TLS_RSA_WITH_RABBIT_SHA - #endif -#endif - -#if !defined(NO_DH) && !defined(NO_AES) && !defined(NO_TLS) && \ - !defined(NO_RSA) && defined(OPENSSL_EXTRA) - #if !defined(NO_SHA) - #define BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - #endif - #if !defined (NO_SHA256) - #define BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - #define BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - #if defined (HAVE_AESGCM) - #define BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - #if defined (CYASSL_SHA384) - #define BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - #endif - #endif - #endif -#endif - -#if defined(HAVE_ECC) && !defined(NO_TLS) - #if !defined(NO_AES) - #if !defined(NO_SHA) - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - #define BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - #endif - - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - #endif /* NO_SHA */ - #ifndef NO_SHA256 - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - #define BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - #endif - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - #endif - - #ifdef CYASSL_SHA384 - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - #define BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - #endif - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - #endif - - #if defined (HAVE_AESGCM) - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - #define BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - #if defined(CYASSL_SHA384) - #define BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - #define BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - #endif - #endif - - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - - #if defined(CYASSL_SHA384) - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - #define BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - #endif - #endif - #if defined (HAVE_AESCCM) - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 - #define BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 - #endif - #endif /* NO_AES */ - #if !defined(NO_RC4) - #if !defined(NO_SHA) - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA - #define BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA - #endif - - #define BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - #define BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - #endif - #endif - #if !defined(NO_DES3) - #if !defined(NO_RSA) - #define BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - #define BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - #endif - - #define BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - #define BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - #endif -#endif - - -#if defined(BUILD_SSL_RSA_WITH_RC4_128_SHA) || \ - defined(BUILD_SSL_RSA_WITH_RC4_128_MD5) - #define BUILD_ARC4 -#endif - -#if defined(BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA) - #define BUILD_DES3 -#endif - -#if defined(BUILD_TLS_RSA_WITH_AES_128_CBC_SHA) || \ - defined(BUILD_TLS_RSA_WITH_AES_256_CBC_SHA) || \ - defined(BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) - #undef BUILD_AES - #define BUILD_AES -#endif - -#if defined(BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256) || \ - defined(BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) - #define BUILD_AESGCM -#endif - -#if defined(BUILD_TLS_RSA_WITH_HC_128_SHA) || \ - defined(BUILD_TLS_RSA_WITH_HC_128_MD5) || \ - defined(BUILD_TLS_RSA_WITH_HC_128_B2B256) - #define BUILD_HC128 -#endif - -#if defined(BUILD_TLS_RSA_WITH_RABBIT_SHA) - #define BUILD_RABBIT -#endif - -#ifdef NO_DES3 - #define DES_BLOCK_SIZE 8 -#else - #undef BUILD_DES3 - #define BUILD_DES3 -#endif - -#ifdef NO_AES - #define AES_BLOCK_SIZE 16 -#else - #undef BUILD_AES - #define BUILD_AES -#endif - -#ifndef NO_RC4 - #undef BUILD_ARC4 - #define BUILD_ARC4 -#endif - - - -#if defined(BUILD_AESGCM) || defined(HAVE_AESCCM) - #define HAVE_AEAD -#endif - - -/* actual cipher values, 2nd byte */ -enum { - TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x39, - TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x33, - TLS_RSA_WITH_AES_256_CBC_SHA = 0x35, - TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F, - TLS_RSA_WITH_NULL_SHA = 0x02, - TLS_PSK_WITH_AES_256_CBC_SHA = 0x8d, - TLS_PSK_WITH_AES_128_CBC_SHA256 = 0xae, - TLS_PSK_WITH_AES_128_CBC_SHA = 0x8c, - TLS_PSK_WITH_NULL_SHA256 = 0xb0, - TLS_PSK_WITH_NULL_SHA = 0x2c, - SSL_RSA_WITH_RC4_128_SHA = 0x05, - SSL_RSA_WITH_RC4_128_MD5 = 0x04, - SSL_RSA_WITH_3DES_EDE_CBC_SHA = 0x0A, - - /* ECC suites, first byte is 0xC0 (ECC_BYTE) */ - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0x14, - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0x13, - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0x0A, - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0x09, - TLS_ECDHE_RSA_WITH_RC4_128_SHA = 0x11, - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = 0x07, - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x12, - TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = 0x08, - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0x27, - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0x23, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0x28, - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0x24, - - /* static ECDH, first byte is 0xC0 (ECC_BYTE) */ - TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = 0x0F, - TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = 0x0E, - TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = 0x05, - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = 0x04, - TLS_ECDH_RSA_WITH_RC4_128_SHA = 0x0C, - TLS_ECDH_ECDSA_WITH_RC4_128_SHA = 0x02, - TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0D, - TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = 0x03, - TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = 0x29, - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = 0x25, - TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = 0x2A, - TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = 0x26, - - /* CyaSSL extension - eSTREAM */ - TLS_RSA_WITH_HC_128_MD5 = 0xFB, - TLS_RSA_WITH_HC_128_SHA = 0xFC, - TLS_RSA_WITH_RABBIT_SHA = 0xFD, - - /* CyaSSL extension - Blake2b 256 */ - TLS_RSA_WITH_AES_128_CBC_B2B256 = 0xF8, - TLS_RSA_WITH_AES_256_CBC_B2B256 = 0xF9, - TLS_RSA_WITH_HC_128_B2B256 = 0xFA, /* eSTREAM too */ - - /* CyaSSL extension - NTRU */ - TLS_NTRU_RSA_WITH_RC4_128_SHA = 0xe5, - TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA = 0xe6, - TLS_NTRU_RSA_WITH_AES_128_CBC_SHA = 0xe7, /* clases w/ official SHA-256 */ - TLS_NTRU_RSA_WITH_AES_256_CBC_SHA = 0xe8, - - /* SHA256 */ - TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x6b, - TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x67, - TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x3d, - TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x3c, - TLS_RSA_WITH_NULL_SHA256 = 0x3b, - - /* AES-GCM */ - TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x9c, - TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x9d, - TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x9e, - TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x9f, - - /* ECC AES-GCM, first byte is 0xC0 (ECC_BYTE) */ - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2b, - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0x2c, - TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2d, - TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = 0x2e, - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0x2f, - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0x30, - TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0x31, - TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0x32, - - /* AES-CCM, first byte is 0xC0 but isn't ECC, - * also, in some of the other AES-CCM suites - * there will be second byte number conflicts - * with non-ECC AES-GCM */ - TLS_RSA_WITH_AES_128_CCM_8 = 0xa0, - TLS_RSA_WITH_AES_256_CCM_8 = 0xa1, - TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xae, - TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 = 0xaf, - TLS_PSK_WITH_AES_128_CCM = 0xa4, - TLS_PSK_WITH_AES_256_CCM = 0xa5, - TLS_PSK_WITH_AES_128_CCM_8 = 0xa8, - TLS_PSK_WITH_AES_256_CCM_8 = 0xa9, - - TLS_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x41, - TLS_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x84, - TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xba, - TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0xc0, - TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x45, - TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x88, - TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xbe, - TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0xc4, - - /* Renegotiation Indication Extension Special Suite */ - TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0xff -}; - - -enum Misc { - ECC_BYTE = 0xC0, /* ECC first cipher suite byte */ - - SEND_CERT = 1, - SEND_BLANK_CERT = 2, - - DTLS_MAJOR = 0xfe, /* DTLS major version number */ - DTLS_MINOR = 0xff, /* DTLS minor version number */ - DTLSv1_2_MINOR = 0xfd, /* DTLS minor version number */ - SSLv3_MAJOR = 3, /* SSLv3 and TLSv1+ major version number */ - SSLv3_MINOR = 0, /* TLSv1 minor version number */ - TLSv1_MINOR = 1, /* TLSv1 minor version number */ - TLSv1_1_MINOR = 2, /* TLSv1_1 minor version number */ - TLSv1_2_MINOR = 3, /* TLSv1_2 minor version number */ - INVALID_BYTE = 0xff, /* Used to initialize cipher specs values */ - NO_COMPRESSION = 0, - ZLIB_COMPRESSION = 221, /* CyaSSL zlib compression */ - HELLO_EXT_SIG_ALGO = 13, /* ID for the sig_algo hello extension */ - SECRET_LEN = 48, /* pre RSA and all master */ - ENCRYPT_LEN = 512, /* allow 4096 bit static buffer */ - SIZEOF_SENDER = 4, /* clnt or srvr */ - FINISHED_SZ = 36, /* MD5_DIGEST_SIZE + SHA_DIGEST_SIZE */ - MAX_RECORD_SIZE = 16384, /* 2^14, max size by standard */ - MAX_MSG_EXTRA = 38 + MAX_DIGEST_SIZE, - /* max added to msg, mac + pad from */ - /* RECORD_HEADER_SZ + BLOCK_SZ (pad) + Max - digest sz + BLOC_SZ (iv) + pad byte (1) */ - MAX_COMP_EXTRA = 1024, /* max compression extra */ - MAX_MTU = 1500, /* max expected MTU */ - MAX_UDP_SIZE = 8192 - 100, /* was MAX_MTU - 100 */ - MAX_DH_SZ = 612, /* 2240 p, pub, g + 2 byte size for each */ - MAX_STR_VERSION = 8, /* string rep of protocol version */ - - PAD_MD5 = 48, /* pad length for finished */ - PAD_SHA = 40, /* pad length for finished */ - MAX_PAD_SIZE = 256, /* maximum length of padding */ - COMPRESS_DUMMY_SIZE = 64, /* compression dummy round size */ - COMPRESS_CONSTANT = 13, /* compression calc constant */ - COMPRESS_UPPER = 55, /* compression calc numerator */ - COMPRESS_LOWER = 64, /* compression calc denominator */ - - PEM_LINE_LEN = 80, /* PEM line max + fudge */ - LENGTH_SZ = 2, /* length field for HMAC, data only */ - VERSION_SZ = 2, /* length of proctocol version */ - SEQ_SZ = 8, /* 64 bit sequence number */ - BYTE3_LEN = 3, /* up to 24 bit byte lengths */ - ALERT_SIZE = 2, /* level + description */ - VERIFY_HEADER = 2, /* always use 2 bytes */ - EXT_ID_SZ = 2, /* always use 2 bytes */ - MAX_DH_SIZE = 513, /* 4096 bit plus possible leading 0 */ - - MAX_SUITE_SZ = 200, /* 100 suites for now! */ - RAN_LEN = 32, /* random length */ - SEED_LEN = RAN_LEN * 2, /* tls prf seed length */ - ID_LEN = 32, /* session id length */ - MAX_COOKIE_LEN = 32, /* max dtls cookie size */ - COOKIE_SZ = 20, /* use a 20 byte cookie */ - SUITE_LEN = 2, /* cipher suite sz length */ - ENUM_LEN = 1, /* always a byte */ - OPAQUE8_LEN = 1, /* 1 byte */ - OPAQUE16_LEN = 2, /* 2 bytes */ - OPAQUE24_LEN = 3, /* 3 bytes */ - COMP_LEN = 1, /* compression length */ - CURVE_LEN = 2, /* ecc named curve length */ - SERVER_ID_LEN = 20, /* server session id length */ - - HANDSHAKE_HEADER_SZ = 4, /* type + length(3) */ - RECORD_HEADER_SZ = 5, /* type + version + len(2) */ - CERT_HEADER_SZ = 3, /* always 3 bytes */ - REQ_HEADER_SZ = 2, /* cert request header sz */ - HINT_LEN_SZ = 2, /* length of hint size field */ - TRUNCATED_HMAC_SZ = 10, /* length of hmac w/ truncated hmac extension */ - HELLO_EXT_TYPE_SZ = 2, /* length of a hello extension type */ - HELLO_EXT_SZ = 8, /* total length of the lazy hello extensions */ - HELLO_EXT_LEN = 6, /* length of the lazy hello extensions */ - HELLO_EXT_SIGALGO_SZ = 2, /* length of signature algo extension */ - HELLO_EXT_SIGALGO_MAX = 32, /* number of items in the signature algo list */ - - DTLS_HANDSHAKE_HEADER_SZ = 12, /* normal + seq(2) + offset(3) + length(3) */ - DTLS_RECORD_HEADER_SZ = 13, /* normal + epoch(2) + seq_num(6) */ - DTLS_HANDSHAKE_EXTRA = 8, /* diff from normal */ - DTLS_RECORD_EXTRA = 8, /* diff from normal */ - DTLS_HANDSHAKE_SEQ_SZ = 2, /* handshake header sequence number */ - DTLS_HANDSHAKE_FRAG_SZ = 3, /* fragment offset and length are 24 bit */ - DTLS_POOL_SZ = 5, /* buffers to hold in the retry pool */ - - FINISHED_LABEL_SZ = 15, /* TLS finished label size */ - TLS_FINISHED_SZ = 12, /* TLS has a shorter size */ - MASTER_LABEL_SZ = 13, /* TLS master secret label sz */ - KEY_LABEL_SZ = 13, /* TLS key block expansion sz */ - MAX_PRF_HALF = 128, /* Maximum half secret len */ - MAX_PRF_LABSEED = 128, /* Maximum label + seed len */ - MAX_PRF_DIG = 224, /* Maximum digest len */ - MAX_REQUEST_SZ = 256, /* Maximum cert req len (no auth yet */ - SESSION_FLUSH_COUNT = 256, /* Flush session cache unless user turns off */ - - RC4_KEY_SIZE = 16, /* always 128bit */ - DES_KEY_SIZE = 8, /* des */ - DES3_KEY_SIZE = 24, /* 3 des ede */ - DES_IV_SIZE = DES_BLOCK_SIZE, - AES_256_KEY_SIZE = 32, /* for 256 bit */ - AES_192_KEY_SIZE = 24, /* for 192 bit */ - AES_IV_SIZE = 16, /* always block size */ - AES_128_KEY_SIZE = 16, /* for 128 bit */ - - AEAD_SEQ_OFFSET = 4, /* Auth Data: Sequence number */ - AEAD_TYPE_OFFSET = 8, /* Auth Data: Type */ - AEAD_VMAJ_OFFSET = 9, /* Auth Data: Major Version */ - AEAD_VMIN_OFFSET = 10, /* Auth Data: Minor Version */ - AEAD_LEN_OFFSET = 11, /* Auth Data: Length */ - AEAD_AUTH_DATA_SZ = 13, /* Size of the data to authenticate */ - AEAD_IMP_IV_SZ = 4, /* Size of the implicit IV */ - AEAD_EXP_IV_SZ = 8, /* Size of the explicit IV */ - AEAD_NONCE_SZ = AEAD_EXP_IV_SZ + AEAD_IMP_IV_SZ, - - AES_GCM_AUTH_SZ = 16, /* AES-GCM Auth Tag length */ - AES_CCM_16_AUTH_SZ = 16, /* AES-CCM-16 Auth Tag length */ - AES_CCM_8_AUTH_SZ = 8, /* AES-CCM-8 Auth Tag Length */ - - CAMELLIA_128_KEY_SIZE = 16, /* for 128 bit */ - CAMELLIA_192_KEY_SIZE = 24, /* for 192 bit */ - CAMELLIA_256_KEY_SIZE = 32, /* for 256 bit */ - CAMELLIA_IV_SIZE = 16, /* always block size */ - - HC_128_KEY_SIZE = 16, /* 128 bits */ - HC_128_IV_SIZE = 16, /* also 128 bits */ - - RABBIT_KEY_SIZE = 16, /* 128 bits */ - RABBIT_IV_SIZE = 8, /* 64 bits for iv */ - - EVP_SALT_SIZE = 8, /* evp salt size 64 bits */ - - ECDHE_SIZE = 32, /* ECHDE server size defaults to 256 bit */ - MAX_EXPORT_ECC_SZ = 256, /* Export ANS X9.62 max future size */ - - MAX_HELLO_SZ = 128, /* max client or server hello */ - MAX_CERT_VERIFY_SZ = 1024, /* max */ - CLIENT_HELLO_FIRST = 35, /* Protocol + RAN_LEN + sizeof(id_len) */ - MAX_SUITE_NAME = 48, /* maximum length of cipher suite string */ - DEFAULT_TIMEOUT = 500, /* default resumption timeout in seconds */ - - DTLS_TIMEOUT_INIT = 1, /* default timeout init for DTLS receive */ - DTLS_TIMEOUT_MAX = 64, /* default max timeout for DTLS receive */ - DTLS_TIMEOUT_MULTIPLIER = 2, /* default timeout multiplier for DTLS recv */ - - MAX_PSK_ID_LEN = 128, /* max psk identity/hint supported */ - MAX_PSK_KEY_LEN = 64, /* max psk key supported */ - - MAX_CYASSL_FILE_SIZE = 1024 * 1024 * 4, /* 4 mb file size alloc limit */ - -#ifdef FORTRESS - MAX_EX_DATA = 3, /* allow for three items of ex_data */ -#endif - - MAX_X509_SIZE = 2048, /* max static x509 buffer size */ - CERT_MIN_SIZE = 256, /* min PEM cert size with header/footer */ - MAX_FILENAME_SZ = 256, /* max file name length */ - FILE_BUFFER_SIZE = 1024, /* default static file buffer size for input, - will use dynamic buffer if not big enough */ - - MAX_NTRU_PUB_KEY_SZ = 1027, /* NTRU max for now */ - MAX_NTRU_ENCRYPT_SZ = 1027, /* NTRU max for now */ - MAX_NTRU_BITS = 256, /* max symmetric bit strength */ - NO_SNIFF = 0, /* not sniffing */ - SNIFF = 1, /* currently sniffing */ - - HASH_SIG_SIZE = 2, /* default SHA1 RSA */ - - NO_CAVIUM_DEVICE = -2, /* invalid cavium device id */ - - NO_COPY = 0, /* should we copy static buffer for write */ - COPY = 1 /* should we copy static buffer for write */ -}; - - -#ifdef SESSION_INDEX -/* Shift values for making a session index */ -#define SESSIDX_ROW_SHIFT 4 -#define SESSIDX_IDX_MASK 0x0F -#endif - - -/* max cert chain peer depth */ -#ifndef MAX_CHAIN_DEPTH - #define MAX_CHAIN_DEPTH 9 -#endif - - -/* don't use extra 3/4k stack space unless need to */ -#ifdef HAVE_NTRU - #define MAX_ENCRYPT_SZ MAX_NTRU_ENCRYPT_SZ -#else - #define MAX_ENCRYPT_SZ ENCRYPT_LEN -#endif - - -/* states */ -enum states { - NULL_STATE = 0, - - SERVER_HELLOVERIFYREQUEST_COMPLETE, - SERVER_HELLO_COMPLETE, - SERVER_CERT_COMPLETE, - SERVER_KEYEXCHANGE_COMPLETE, - SERVER_HELLODONE_COMPLETE, - SERVER_FINISHED_COMPLETE, - - CLIENT_HELLO_COMPLETE, - CLIENT_KEYEXCHANGE_COMPLETE, - CLIENT_FINISHED_COMPLETE, - - HANDSHAKE_DONE -}; - - -#if defined(__GNUC__) - #define CYASSL_PACK __attribute__ ((packed)) -#else - #define CYASSL_PACK -#endif - -/* SSL Version */ -typedef struct ProtocolVersion { - byte major; - byte minor; -} CYASSL_PACK ProtocolVersion; - - -CYASSL_LOCAL ProtocolVersion MakeSSLv3(void); -CYASSL_LOCAL ProtocolVersion MakeTLSv1(void); -CYASSL_LOCAL ProtocolVersion MakeTLSv1_1(void); -CYASSL_LOCAL ProtocolVersion MakeTLSv1_2(void); - -#ifdef CYASSL_DTLS - CYASSL_LOCAL ProtocolVersion MakeDTLSv1(void); - CYASSL_LOCAL ProtocolVersion MakeDTLSv1_2(void); -#endif - - -enum BIO_TYPE { - BIO_BUFFER = 1, - BIO_SOCKET = 2, - BIO_SSL = 3, - BIO_MEMORY = 4 -}; - - -/* CyaSSL BIO_METHOD type */ -struct CYASSL_BIO_METHOD { - byte type; /* method type */ -}; - - -/* CyaSSL BIO type */ -struct CYASSL_BIO { - byte type; /* method type */ - byte close; /* close flag */ - byte eof; /* eof flag */ - CYASSL* ssl; /* possible associated ssl */ - byte* mem; /* memory buffer */ - int memLen; /* memory buffer length */ - int fd; /* possible file descriptor */ - CYASSL_BIO* prev; /* previous in chain */ - CYASSL_BIO* next; /* next in chain */ -}; - - -/* CyaSSL method type */ -struct CYASSL_METHOD { - ProtocolVersion version; - byte side; /* connection side, server or client */ - byte downgrade; /* whether to downgrade version, default no */ -}; - - -/* defautls to client */ -CYASSL_LOCAL void InitSSL_Method(CYASSL_METHOD*, ProtocolVersion); - -/* for sniffer */ -CYASSL_LOCAL int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 size, word32 totalSz, int sniff); -CYASSL_LOCAL int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx); - - -/* CyaSSL buffer type */ -typedef struct buffer { - word32 length; - byte* buffer; -} buffer; - - -enum { - FORCED_FREE = 1, - NO_FORCED_FREE = 0 -}; - - -/* only use compression extra if using compression */ -#ifdef HAVE_LIBZ - #define COMP_EXTRA MAX_COMP_EXTRA -#else - #define COMP_EXTRA 0 -#endif - -/* only the sniffer needs space in the buffer for extra MTU record(s) */ -#ifdef CYASSL_SNIFFER - #define MTU_EXTRA MAX_MTU * 3 -#else - #define MTU_EXTRA 0 -#endif - - -/* embedded callbacks require large static buffers, make sure on */ -#ifdef CYASSL_CALLBACKS - #undef LARGE_STATIC_BUFFERS - #define LARGE_STATIC_BUFFERS -#endif - - -/* give user option to use 16K static buffers */ -#if defined(LARGE_STATIC_BUFFERS) - #define RECORD_SIZE MAX_RECORD_SIZE -#else - #ifdef CYASSL_DTLS - #define RECORD_SIZE MAX_MTU - #else - #define RECORD_SIZE 128 - #endif -#endif - - -/* user option to turn off 16K output option */ -/* if using small static buffers (default) and SSL_write tries to write data - larger than the record we have, dynamically get it, unless user says only - write in static buffer chuncks */ -#ifndef STATIC_CHUNKS_ONLY - #define OUTPUT_RECORD_SIZE MAX_RECORD_SIZE -#else - #define OUTPUT_RECORD_SIZE RECORD_SIZE -#endif - -/* CyaSSL input buffer - - RFC 2246: - - length - The length (in bytes) of the following TLSPlaintext.fragment. - The length should not exceed 2^14. -*/ -#if defined(LARGE_STATIC_BUFFERS) - #define STATIC_BUFFER_LEN RECORD_HEADER_SZ + RECORD_SIZE + COMP_EXTRA + \ - MTU_EXTRA + MAX_MSG_EXTRA -#else - /* don't fragment memory from the record header */ - #define STATIC_BUFFER_LEN RECORD_HEADER_SZ -#endif - -typedef struct { - word32 length; /* total buffer length used */ - word32 idx; /* idx to part of length already consumed */ - byte* buffer; /* place holder for static or dynamic buffer */ - word32 bufferSize; /* current buffer size */ - ALIGN16 byte staticBuffer[STATIC_BUFFER_LEN]; - byte dynamicFlag; /* dynamic memory currently in use */ - byte offset; /* alignment offset attempt */ -} bufferStatic; - -/* Cipher Suites holder */ -typedef struct Suites { - int setSuites; /* user set suites from default */ - byte suites[MAX_SUITE_SZ]; - word16 suiteSz; /* suite length in bytes */ - byte hashSigAlgo[HELLO_EXT_SIGALGO_MAX]; /* sig/algo to offer */ - word16 hashSigAlgoSz; /* SigAlgo extension length in bytes */ - byte hashAlgo; /* selected hash algorithm */ - byte sigAlgo; /* selected sig algorithm */ -} Suites; - - -CYASSL_LOCAL -void InitSuites(Suites*, ProtocolVersion, - byte, byte, byte, byte, byte, byte, int); -CYASSL_LOCAL -int SetCipherList(Suites*, const char* list); - -#ifndef PSK_TYPES_DEFINED - typedef unsigned int (*psk_client_callback)(CYASSL*, const char*, char*, - unsigned int, unsigned char*, unsigned int); - typedef unsigned int (*psk_server_callback)(CYASSL*, const char*, - unsigned char*, unsigned int); -#endif /* PSK_TYPES_DEFINED */ - - -#ifndef CYASSL_USER_IO - /* default IO callbacks */ - CYASSL_LOCAL - int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx); - CYASSL_LOCAL - int EmbedSend(CYASSL *ssl, char *buf, int sz, void *ctx); - - #ifdef HAVE_OCSP - CYASSL_LOCAL - int EmbedOcspLookup(void*, const char*, int, byte*, int, byte**); - CYASSL_LOCAL - void EmbedOcspRespFree(void*, byte*); - #endif - - #ifdef CYASSL_DTLS - CYASSL_LOCAL - int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx); - CYASSL_LOCAL - int EmbedSendTo(CYASSL *ssl, char *buf, int sz, void *ctx); - CYASSL_LOCAL - int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx); - CYASSL_LOCAL - int IsUDP(void*); - #endif /* CYASSL_DTLS */ -#endif /* CYASSL_USER_IO */ - -#ifdef HAVE_NETX - CYASSL_LOCAL int NetX_Receive(CYASSL *ssl, char *buf, int sz, void *ctx); - CYASSL_LOCAL int NetX_Send(CYASSL *ssl, char *buf, int sz, void *ctx); -#endif /* HAVE_NETX */ - - -/* CyaSSL Cipher type just points back to SSL */ -struct CYASSL_CIPHER { - CYASSL* ssl; -}; - - -typedef struct OCSP_Entry OCSP_Entry; - -#ifdef SHA_DIGEST_SIZE - #define OCSP_DIGEST_SIZE SHA_DIGEST_SIZE -#else - #define OCSP_DIGEST_SIZE 160 -#endif - -#ifdef NO_ASN - /* no_asn won't have */ - typedef struct CertStatus CertStatus; -#endif - -struct OCSP_Entry { - OCSP_Entry* next; /* next entry */ - byte issuerHash[OCSP_DIGEST_SIZE]; /* issuer hash */ - byte issuerKeyHash[OCSP_DIGEST_SIZE]; /* issuer public key hash */ - CertStatus* status; /* OCSP response list */ - int totalStatus; /* number on list */ -}; - - -#ifndef HAVE_OCSP - typedef struct CYASSL_OCSP CYASSL_OCSP; -#endif - -/* CyaSSL OCSP controller */ -struct CYASSL_OCSP { - CYASSL_CERT_MANAGER* cm; /* pointer back to cert manager */ - OCSP_Entry* ocspList; /* OCSP response list */ - CyaSSL_Mutex ocspLock; /* OCSP list lock */ -}; - -#ifndef MAX_DATE_SIZE -#define MAX_DATE_SIZE 32 -#endif - -typedef struct CRL_Entry CRL_Entry; - -#ifdef SHA_DIGEST_SIZE - #define CRL_DIGEST_SIZE SHA_DIGEST_SIZE -#else - #define CRL_DIGEST_SIZE 160 -#endif - -#ifdef NO_ASN - typedef struct RevokedCert RevokedCert; -#endif - -/* Complete CRL */ -struct CRL_Entry { - CRL_Entry* next; /* next entry */ - byte issuerHash[CRL_DIGEST_SIZE]; /* issuer hash */ - /* byte crlHash[CRL_DIGEST_SIZE]; raw crl data hash */ - /* restore the hash here if needed for optimized comparisons */ - byte lastDate[MAX_DATE_SIZE]; /* last date updated */ - byte nextDate[MAX_DATE_SIZE]; /* next update date */ - byte lastDateFormat; /* last date format */ - byte nextDateFormat; /* next date format */ - RevokedCert* certs; /* revoked cert list */ - int totalCerts; /* number on list */ -}; - - -typedef struct CRL_Monitor CRL_Monitor; - -/* CRL directory monitor */ -struct CRL_Monitor { - char* path; /* full dir path, if valid pointer we're using */ - int type; /* PEM or ASN1 type */ -}; - - -#ifndef HAVE_CRL - typedef struct CYASSL_CRL CYASSL_CRL; -#endif - -/* CyaSSL CRL controller */ -struct CYASSL_CRL { - CYASSL_CERT_MANAGER* cm; /* pointer back to cert manager */ - CRL_Entry* crlList; /* our CRL list */ - CyaSSL_Mutex crlLock; /* CRL list lock */ - CRL_Monitor monitors[2]; /* PEM and DER possible */ -#ifdef HAVE_CRL_MONITOR - pthread_t tid; /* monitoring thread */ -#endif -}; - - -#ifdef NO_ASN - typedef struct Signer Signer; -#endif - - -#ifndef CA_TABLE_SIZE - #define CA_TABLE_SIZE 11 -#endif - -/* CyaSSL Certificate Manager */ -struct CYASSL_CERT_MANAGER { - Signer* caTable[CA_TABLE_SIZE]; /* the CA signer table */ - CyaSSL_Mutex caLock; /* CA list lock */ - CallbackCACache caCacheCallback; /* CA cache addition callback */ - void* heap; /* heap helper */ - CYASSL_CRL* crl; /* CRL checker */ - byte crlEnabled; /* is CRL on ? */ - byte crlCheckAll; /* always leaf, but all ? */ - CbMissingCRL cbMissingCRL; /* notify through cb of missing crl */ - CYASSL_OCSP* ocsp; /* OCSP checker */ - byte ocspEnabled; /* is OCSP on ? */ - byte ocspSendNonce; /* send the OCSP nonce ? */ - byte ocspUseOverrideURL; /* ignore cert's responder, override */ - char* ocspOverrideURL; /* use this responder */ - void* ocspIOCtx; /* I/O callback CTX */ - CbOCSPIO ocspIOCb; /* I/O callback for OCSP lookup */ - CbOCSPRespFree ocspRespFreeCb; /* Frees OCSP Response from IO Cb */ -}; - -CYASSL_LOCAL int CM_SaveCertCache(CYASSL_CERT_MANAGER*, const char*); -CYASSL_LOCAL int CM_RestoreCertCache(CYASSL_CERT_MANAGER*, const char*); -CYASSL_LOCAL int CM_MemSaveCertCache(CYASSL_CERT_MANAGER*, void*, int, int*); -CYASSL_LOCAL int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER*, const void*, int); -CYASSL_LOCAL int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER*); - -/* CyaSSL Sock Addr */ -struct CYASSL_SOCKADDR { - unsigned int sz; /* sockaddr size */ - void* sa; /* pointer to the sockaddr_in or sockaddr_in6 */ -}; - -typedef struct CYASSL_DTLS_CTX { - CYASSL_SOCKADDR peer; - int fd; -} CYASSL_DTLS_CTX; - -/* RFC 6066 TLS Extensions */ -#ifdef HAVE_TLS_EXTENSIONS - -typedef enum { - SERVER_NAME_INDICATION = 0, - MAX_FRAGMENT_LENGTH = 1, - TRUNCATED_HMAC = 4, - ELLIPTIC_CURVES = 10 -} TLSX_Type; - -typedef struct TLSX { - TLSX_Type type; /* Extension Type */ - void* data; /* Extension Data */ - byte resp; /* IsResponse Flag */ - struct TLSX* next; /* List Behavior */ -} TLSX; - -CYASSL_LOCAL TLSX* TLSX_Find(TLSX* list, TLSX_Type type); -CYASSL_LOCAL void TLSX_FreeAll(TLSX* list); - -#ifndef NO_CYASSL_CLIENT -CYASSL_LOCAL word16 TLSX_GetRequestSize(CYASSL* ssl); -CYASSL_LOCAL word16 TLSX_WriteRequest(CYASSL* ssl, byte* output); -#endif - -#ifndef NO_CYASSL_SERVER -CYASSL_LOCAL word16 TLSX_GetResponseSize(CYASSL* ssl); -CYASSL_LOCAL word16 TLSX_WriteResponse(CYASSL* ssl, byte* output); -#endif - -CYASSL_LOCAL int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, - byte isRequest, Suites *suites); - -/* Server Name Indication */ -#ifdef HAVE_SNI - -typedef struct SNI { - byte type; /* SNI Type */ - union { char* host_name; } data; /* SNI Data */ - struct SNI* next; /* List Behavior */ -#ifndef NO_CYASSL_SERVER - byte options; /* Behaviour options */ - byte status; /* Matching result */ -#endif -} SNI; - -CYASSL_LOCAL int TLSX_UseSNI(TLSX** extensions, byte type, const void* data, - word16 size); - -#ifndef NO_CYASSL_SERVER -CYASSL_LOCAL void TLSX_SNI_SetOptions(TLSX* extensions, byte type, - byte options); -CYASSL_LOCAL byte TLSX_SNI_Status(TLSX* extensions, byte type); -CYASSL_LOCAL word16 TLSX_SNI_GetRequest(TLSX* extensions, byte type, - void** data); -CYASSL_LOCAL int TLSX_SNI_GetFromBuffer(const byte* buffer, word32 bufferSz, - byte type, byte* sni, word32* inOutSz); -#endif - -#endif /* HAVE_SNI */ - -/* Maximum Fragment Length */ -#ifdef HAVE_MAX_FRAGMENT - -CYASSL_LOCAL int TLSX_UseMaxFragment(TLSX** extensions, byte mfl); - -#endif /* HAVE_MAX_FRAGMENT */ - -#ifdef HAVE_TRUNCATED_HMAC - -CYASSL_LOCAL int TLSX_UseTruncatedHMAC(TLSX** extensions); - -#endif /* HAVE_TRUNCATED_HMAC */ - -#ifdef HAVE_SUPPORTED_CURVES - -typedef struct EllipticCurve { - word16 name; /* CurveNames */ - struct EllipticCurve* next; /* List Behavior */ - -} EllipticCurve; - -CYASSL_LOCAL int TLSX_UseSupportedCurve(TLSX** extensions, word16 name); - -#ifndef NO_CYASSL_SERVER -CYASSL_LOCAL int TLSX_ValidateEllipticCurves(CYASSL* ssl, byte first, - byte second); -#endif - -#endif /* HAVE_SUPPORTED_CURVES */ - -#endif /* HAVE_TLS_EXTENSIONS */ - -/* CyaSSL context type */ -struct CYASSL_CTX { - CYASSL_METHOD* method; - CyaSSL_Mutex countMutex; /* reference count mutex */ - int refCount; /* reference count */ -#ifndef NO_CERTS - buffer certificate; - buffer certChain; - /* chain after self, in DER, with leading size for each cert */ - buffer privateKey; - buffer serverDH_P; - buffer serverDH_G; - CYASSL_CERT_MANAGER* cm; /* our cert manager, ctx owns SSL will use */ -#endif - Suites suites; - void* heap; /* for user memory overrides */ - byte verifyPeer; - byte verifyNone; - byte failNoCert; - byte sessionCacheOff; - byte sessionCacheFlushOff; - byte sendVerify; /* for client side */ - byte haveRSA; /* RSA available */ - byte haveDH; /* server DH parms set by user */ - byte haveNTRU; /* server private NTRU key loaded */ - byte haveECDSAsig; /* server cert signed w/ ECDSA */ - byte haveStaticECC; /* static server ECC private key */ - byte partialWrite; /* only one msg per write call */ - byte quietShutdown; /* don't send close notify */ - byte groupMessages; /* group handshake messages before sending */ - CallbackIORecv CBIORecv; - CallbackIOSend CBIOSend; -#ifdef CYASSL_DTLS - CallbackGenCookie CBIOCookie; /* gen cookie callback */ -#endif - VerifyCallback verifyCallback; /* cert verification callback */ - word32 timeout; /* session timeout */ -#ifdef HAVE_ECC - word16 eccTempKeySz; /* in octets 20 - 66 */ - word32 pkCurveOID; /* curve Ecc_Sum */ -#endif -#ifndef NO_PSK - byte havePSK; /* psk key set by user */ - psk_client_callback client_psk_cb; /* client callback */ - psk_server_callback server_psk_cb; /* server callback */ - char server_hint[MAX_PSK_ID_LEN]; -#endif /* NO_PSK */ -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - pem_password_cb passwd_cb; - void* userdata; -#endif /* OPENSSL_EXTRA */ -#ifdef HAVE_OCSP - CYASSL_OCSP ocsp; -#endif -#ifdef HAVE_CAVIUM - int devId; /* cavium device id to use */ -#endif -#ifdef HAVE_TLS_EXTENSIONS - TLSX* extensions; /* RFC 6066 TLS Extensions data */ -#endif -#ifdef ATOMIC_USER - CallbackMacEncrypt MacEncryptCb; /* Atomic User Mac/Encrypt Cb */ - CallbackDecryptVerify DecryptVerifyCb; /* Atomic User Decrypt/Verify Cb */ -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - CallbackEccSign EccSignCb; /* User EccSign Callback handler */ - CallbackEccVerify EccVerifyCb; /* User EccVerify Callback handler */ - #endif /* HAVE_ECC */ - #ifndef NO_RSA - CallbackRsaSign RsaSignCb; /* User RsaSign Callback handler */ - CallbackRsaVerify RsaVerifyCb; /* User RsaVerify Callback handler */ - CallbackRsaEnc RsaEncCb; /* User Rsa Public Encrypt handler */ - CallbackRsaDec RsaDecCb; /* User Rsa Private Decrypt handler */ - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ -}; - - -CYASSL_LOCAL -int InitSSL_Ctx(CYASSL_CTX*, CYASSL_METHOD*); -CYASSL_LOCAL -void FreeSSL_Ctx(CYASSL_CTX*); -CYASSL_LOCAL -void SSL_CtxResourceFree(CYASSL_CTX*); - -CYASSL_LOCAL -int DeriveTlsKeys(CYASSL* ssl); -CYASSL_LOCAL -int ProcessOldClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 inSz, word16 sz); -#ifndef NO_CERTS - CYASSL_LOCAL - int AddCA(CYASSL_CERT_MANAGER* ctx, buffer der, int type, int verify); - CYASSL_LOCAL - int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash); -#endif - -/* All cipher suite related info */ -typedef struct CipherSpecs { - byte bulk_cipher_algorithm; - byte cipher_type; /* block, stream, or aead */ - byte mac_algorithm; - byte kea; /* key exchange algo */ - byte sig_algo; - byte hash_size; - byte pad_size; - byte static_ecdh; - word16 key_size; - word16 iv_size; - word16 block_size; - word16 aead_mac_size; -} CipherSpecs; - - -void InitCipherSpecs(CipherSpecs* cs); - - -/* Supported Message Authentication Codes from page 43 */ -enum MACAlgorithm { - no_mac, - md5_mac, - sha_mac, - sha224_mac, - sha256_mac, - sha384_mac, - sha512_mac, - rmd_mac, - blake2b_mac -}; - - -/* Supported Key Exchange Protocols */ -enum KeyExchangeAlgorithm { - no_kea, - rsa_kea, - diffie_hellman_kea, - fortezza_kea, - psk_kea, - ntru_kea, - ecc_diffie_hellman_kea, - ecc_static_diffie_hellman_kea /* for verify suite only */ -}; - - -/* Supported Authentication Schemes */ -enum SignatureAlgorithm { - anonymous_sa_algo, - rsa_sa_algo, - dsa_sa_algo, - ecc_dsa_sa_algo -}; - - -/* Supprted ECC Curve Types */ -enum EccCurves { - named_curve = 3 -}; - - -/* Supprted ECC Named Curves */ -enum EccNamedCurves { - secp256r1 = 0x17, /* default, OpenSSL also calls it prime256v1 */ - secp384r1 = 0x18, - secp521r1 = 0x19, - - secp160r1 = 0x10, - secp192r1 = 0x13, /* Openssl also call it prime192v1 */ - secp224r1 = 0x15 -}; - - -/* Valid client certificate request types from page 27 */ -enum ClientCertificateType { - rsa_sign = 1, - dss_sign = 2, - rsa_fixed_dh = 3, - dss_fixed_dh = 4, - rsa_ephemeral_dh = 5, - dss_ephemeral_dh = 6, - fortezza_kea_cert = 20 -}; - - -enum CipherType { stream, block, aead }; - - -#ifdef CYASSL_DTLS - - #ifdef WORD64_AVAILABLE - typedef word64 DtlsSeq; - #else - typedef word32 DtlsSeq; - #endif - #define DTLS_SEQ_BITS (sizeof(DtlsSeq) * CHAR_BIT) - - typedef struct DtlsState { - DtlsSeq window; /* Sliding window for current epoch */ - word16 nextEpoch; /* Expected epoch in next record */ - word32 nextSeq; /* Expected sequence in next record */ - - word16 curEpoch; /* Received epoch in current record */ - word32 curSeq; /* Received sequence in current record */ - - DtlsSeq prevWindow; /* Sliding window for old epoch */ - word32 prevSeq; /* Next sequence in allowed old epoch */ - } DtlsState; - -#endif /* CYASSL_DTLS */ - - -/* keys and secrets */ -typedef struct Keys { - byte client_write_MAC_secret[MAX_DIGEST_SIZE]; /* max sizes */ - byte server_write_MAC_secret[MAX_DIGEST_SIZE]; - byte client_write_key[AES_256_KEY_SIZE]; /* max sizes */ - byte server_write_key[AES_256_KEY_SIZE]; - byte client_write_IV[AES_IV_SIZE]; /* max sizes */ - byte server_write_IV[AES_IV_SIZE]; -#ifdef HAVE_AEAD - byte aead_exp_IV[AEAD_EXP_IV_SZ]; - byte aead_enc_imp_IV[AEAD_IMP_IV_SZ]; - byte aead_dec_imp_IV[AEAD_IMP_IV_SZ]; -#endif - - word32 peer_sequence_number; - word32 sequence_number; - -#ifdef CYASSL_DTLS - DtlsState dtls_state; /* Peer's state */ - word16 dtls_peer_handshake_number; - word16 dtls_expected_peer_handshake_number; - - word16 dtls_epoch; /* Current tx epoch */ - word32 dtls_sequence_number; /* Current tx sequence */ - word16 dtls_handshake_number; /* Current tx handshake seq */ -#endif - - word32 encryptSz; /* last size of encrypted data */ - word32 padSz; /* how much to advance after decrypt part */ - byte encryptionOn; /* true after change cipher spec */ - byte decryptedCur; /* only decrypt current record once */ -} Keys; - - -/* cipher for now */ -typedef struct Ciphers { -#ifdef BUILD_ARC4 - Arc4* arc4; -#endif -#ifdef BUILD_DES3 - Des3* des3; -#endif -#if defined(BUILD_AES) || defined(BUILD_AESGCM) - Aes* aes; -#endif -#ifdef HAVE_CAMELLIA - Camellia* cam; -#endif -#ifdef HAVE_HC128 - HC128* hc128; -#endif -#ifdef BUILD_RABBIT - Rabbit* rabbit; -#endif - byte setup; /* have we set it up flag for detection */ -} Ciphers; - - -CYASSL_LOCAL void InitCiphers(CYASSL* ssl); -CYASSL_LOCAL void FreeCiphers(CYASSL* ssl); - - -/* hashes type */ -typedef struct Hashes { - #ifndef NO_OLD_TLS - byte md5[MD5_DIGEST_SIZE]; - #endif - byte sha[SHA_DIGEST_SIZE]; - #ifndef NO_SHA256 - byte sha256[SHA256_DIGEST_SIZE]; - #endif - #ifdef CYASSL_SHA384 - byte sha384[SHA384_DIGEST_SIZE]; - #endif -} Hashes; - - -/* Static x509 buffer */ -typedef struct x509_buffer { - int length; /* actual size */ - byte buffer[MAX_X509_SIZE]; /* max static cert size */ -} x509_buffer; - - -/* CyaSSL X509_CHAIN, for no dynamic memory SESSION_CACHE */ -struct CYASSL_X509_CHAIN { - int count; /* total number in chain */ - x509_buffer certs[MAX_CHAIN_DEPTH]; /* only allow max depth 4 for now */ -}; - - -/* CyaSSL session type */ -struct CYASSL_SESSION { - byte sessionID[ID_LEN]; /* id for protocol */ - byte masterSecret[SECRET_LEN]; /* stored secret */ - word32 bornOn; /* create time in seconds */ - word32 timeout; /* timeout in seconds */ -#ifdef SESSION_CERTS - CYASSL_X509_CHAIN chain; /* peer cert chain, static */ - ProtocolVersion version; /* which version was used */ - byte cipherSuite0; /* first byte, normally 0 */ - byte cipherSuite; /* 2nd byte, actual suite */ -#endif -#ifndef NO_CLIENT_CACHE - byte serverID[SERVER_ID_LEN]; /* for easier client lookup */ - word16 idLen; /* serverID length */ -#endif -}; - - -CYASSL_LOCAL -CYASSL_SESSION* GetSession(CYASSL*, byte*); -CYASSL_LOCAL -int SetSession(CYASSL*, CYASSL_SESSION*); - -typedef int (*hmacfp) (CYASSL*, byte*, const byte*, word32, int, int); - -#ifndef NO_CLIENT_CACHE - CYASSL_SESSION* GetSessionClient(CYASSL*, const byte*, int); -#endif - -/* client connect state for nonblocking restart */ -enum ConnectState { - CONNECT_BEGIN = 0, - CLIENT_HELLO_SENT, - HELLO_AGAIN, /* HELLO_AGAIN s for DTLS case */ - HELLO_AGAIN_REPLY, - FIRST_REPLY_DONE, - FIRST_REPLY_FIRST, - FIRST_REPLY_SECOND, - FIRST_REPLY_THIRD, - FIRST_REPLY_FOURTH, - FINISHED_DONE, - SECOND_REPLY_DONE -}; - - -/* server accept state for nonblocking restart */ -enum AcceptState { - ACCEPT_BEGIN = 0, - ACCEPT_CLIENT_HELLO_DONE, - HELLO_VERIFY_SENT, - ACCEPT_FIRST_REPLY_DONE, - SERVER_HELLO_SENT, - CERT_SENT, - KEY_EXCHANGE_SENT, - CERT_REQ_SENT, - SERVER_HELLO_DONE, - ACCEPT_SECOND_REPLY_DONE, - CHANGE_CIPHER_SENT, - ACCEPT_FINISHED_DONE, - ACCEPT_THIRD_REPLY_DONE -}; - - -typedef struct Buffers { -#ifndef NO_CERTS - buffer certificate; /* CYASSL_CTX owns, unless we own */ - buffer key; /* CYASSL_CTX owns, unless we own */ - buffer certChain; /* CYASSL_CTX owns */ - /* chain after self, in DER, with leading size for each cert */ - buffer serverDH_P; /* CYASSL_CTX owns, unless we own */ - buffer serverDH_G; /* CYASSL_CTX owns, unless we own */ - buffer serverDH_Pub; - buffer serverDH_Priv; -#endif - buffer domainName; /* for client check */ - bufferStatic inputBuffer; - bufferStatic outputBuffer; - buffer clearOutputBuffer; - int prevSent; /* previous plain text bytes sent - when got WANT_WRITE */ - int plainSz; /* plain text bytes in buffer to send - when got WANT_WRITE */ - byte weOwnCert; /* SSL own cert flag */ - byte weOwnKey; /* SSL own key flag */ - byte weOwnDH; /* SSL own dh (p,g) flag */ -#ifdef CYASSL_DTLS - CYASSL_DTLS_CTX dtlsCtx; /* DTLS connection context */ -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - buffer peerEccDsaKey; /* we own for Ecc Verify Callbacks */ - #endif /* HAVE_ECC */ - #ifndef NO_RSA - buffer peerRsaKey; /* we own for Rsa Verify Callbacks */ - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ -} Buffers; - -typedef struct Options { - byte sessionCacheOff; - byte sessionCacheFlushOff; - byte cipherSuite0; /* first byte, normally 0 */ - byte cipherSuite; /* second byte, actual suite */ - byte serverState; - byte clientState; - byte handShakeState; - byte side; /* client or server end */ - byte verifyPeer; - byte verifyNone; - byte failNoCert; - byte downgrade; /* allow downgrade of versions */ - byte sendVerify; /* false = 0, true = 1, sendBlank = 2 */ - byte resuming; - byte haveSessionId; /* server may not send */ - byte tls; /* using TLS ? */ - byte tls1_1; /* using TLSv1.1+ ? */ - byte dtls; /* using datagrams ? */ - byte connReset; /* has the peer reset */ - byte isClosed; /* if we consider conn closed */ - byte closeNotify; /* we've recieved a close notify */ - byte sentNotify; /* we've sent a close notify */ - byte connectState; /* nonblocking resume */ - byte acceptState; /* nonblocking resume */ - byte usingCompression; /* are we using compression */ - byte haveRSA; /* RSA available */ - byte haveDH; /* server DH parms set by user */ - byte haveNTRU; /* server NTRU private key loaded */ - byte haveECDSAsig; /* server ECDSA signed cert */ - byte haveStaticECC; /* static server ECC private key */ - byte havePeerCert; /* do we have peer's cert */ - byte havePeerVerify; /* and peer's cert verify */ - byte usingPSK_cipher; /* whether we're using psk as cipher */ - byte sendAlertState; /* nonblocking resume */ - byte processReply; /* nonblocking resume */ - byte partialWrite; /* only one msg per write call */ - byte quietShutdown; /* don't send close notify */ - byte certOnly; /* stop once we get cert */ - byte groupMessages; /* group handshake messages */ - byte usingNonblock; /* set when using nonblocking socket */ - byte saveArrays; /* save array Memory for user get keys - or psk */ -#ifndef NO_PSK - byte havePSK; /* psk key set by user */ - psk_client_callback client_psk_cb; - psk_server_callback server_psk_cb; -#endif /* NO_PSK */ -} Options; - -typedef struct Arrays { - byte clientRandom[RAN_LEN]; - byte serverRandom[RAN_LEN]; - byte sessionID[ID_LEN]; - byte preMasterSecret[ENCRYPT_LEN]; - byte masterSecret[SECRET_LEN]; -#ifdef CYASSL_DTLS - byte cookie[MAX_COOKIE_LEN]; - byte cookieSz; -#endif -#ifndef NO_PSK - char client_identity[MAX_PSK_ID_LEN]; - char server_hint[MAX_PSK_ID_LEN]; - byte psk_key[MAX_PSK_KEY_LEN]; - word32 psk_keySz; /* acutal size */ -#endif - word32 preMasterSz; /* differs for DH, actual size */ -} Arrays; - -#ifndef ASN_NAME_MAX -#define ASN_NAME_MAX 256 -#endif - -#ifndef MAX_DATE_SZ -#define MAX_DATE_SZ 32 -#endif - -struct CYASSL_X509_NAME { - char *name; - char staticName[ASN_NAME_MAX]; - int dynamicName; - int sz; -#ifdef OPENSSL_EXTRA - DecodedName fullName; -#endif /* OPENSSL_EXTRA */ -}; - -#ifndef EXTERNAL_SERIAL_SIZE - #define EXTERNAL_SERIAL_SIZE 32 -#endif - -#ifdef NO_ASN - typedef struct DNS_entry DNS_entry; -#endif - -struct CYASSL_X509 { - int version; - CYASSL_X509_NAME issuer; - CYASSL_X509_NAME subject; - int serialSz; - byte serial[EXTERNAL_SERIAL_SIZE]; - char subjectCN[ASN_NAME_MAX]; /* common name short cut */ -#ifdef CYASSL_SEP - int deviceTypeSz; - byte deviceType[EXTERNAL_SERIAL_SIZE]; - int hwTypeSz; - byte hwType[EXTERNAL_SERIAL_SIZE]; - int hwSerialNumSz; - byte hwSerialNum[EXTERNAL_SERIAL_SIZE]; - #ifdef OPENSSL_EXTRA - byte certPolicySet; - byte certPolicyCrit; - #endif /* OPENSSL_EXTRA */ -#endif - int notBeforeSz; - byte notBefore[MAX_DATE_SZ]; - int notAfterSz; - byte notAfter[MAX_DATE_SZ]; - int sigOID; - buffer sig; - int pubKeyOID; - buffer pubKey; - #ifdef HAVE_ECC - word32 pkCurveOID; - #endif /* HAVE_ECC */ - buffer derCert; /* may need */ - DNS_entry* altNames; /* alt names list */ - DNS_entry* altNamesNext; /* hint for retrieval */ - byte dynamicMemory; /* dynamic memory flag */ - byte isCa; -#ifdef OPENSSL_EXTRA - word32 pathLength; - word16 keyUsage; - byte basicConstSet; - byte basicConstCrit; - byte basicConstPlSet; - byte subjAltNameSet; - byte subjAltNameCrit; - byte authKeyIdSet; - byte authKeyIdCrit; - byte* authKeyId; - word32 authKeyIdSz; - byte subjKeyIdSet; - byte subjKeyIdCrit; - byte* subjKeyId; - word32 subjKeyIdSz; - byte keyUsageSet; - byte keyUsageCrit; -#endif /* OPENSSL_EXTRA */ -}; - - -/* record layer header for PlainText, Compressed, and CipherText */ -typedef struct RecordLayerHeader { - byte type; - byte pvMajor; - byte pvMinor; - byte length[2]; -} RecordLayerHeader; - - -/* record layer header for DTLS PlainText, Compressed, and CipherText */ -typedef struct DtlsRecordLayerHeader { - byte type; - byte pvMajor; - byte pvMinor; - byte epoch[2]; /* increment on cipher state change */ - byte sequence_number[6]; /* per record */ - byte length[2]; -} DtlsRecordLayerHeader; - - -typedef struct DtlsPool { - buffer buf[DTLS_POOL_SZ]; - int used; -} DtlsPool; - -typedef struct DtlsMsg { - struct DtlsMsg* next; - word32 seq; /* Handshake sequence number */ - word32 sz; /* Length of whole mesage */ - word32 fragSz; /* Length of fragments received */ - byte type; - byte* buf; - byte* msg; -} DtlsMsg; - - -#ifdef HAVE_NETX - - /* NETX I/O Callback default */ - typedef struct NetX_Ctx { - NX_TCP_SOCKET* nxSocket; /* send/recv socket handle */ - NX_PACKET* nxPacket; /* incoming packet handle for short reads */ - ULONG nxOffset; /* offset already read from nxPacket */ - ULONG nxWait; /* wait option flag */ - } NetX_Ctx; - -#endif - - -/* CyaSSL ssl type */ -struct CYASSL { - CYASSL_CTX* ctx; - int error; - ProtocolVersion version; /* negotiated version */ - ProtocolVersion chVersion; /* client hello version */ - Suites* suites; /* only need during handshake */ - Ciphers encrypt; - Ciphers decrypt; - CipherSpecs specs; - Keys keys; - int rfd; /* read file descriptor */ - int wfd; /* write file descriptor */ - int rflags; /* user read flags */ - int wflags; /* user write flags */ - CYASSL_BIO* biord; /* socket bio read to free/close */ - CYASSL_BIO* biowr; /* socket bio write to free/close */ - void* IOCB_ReadCtx; - void* IOCB_WriteCtx; - RNG* rng; -#ifndef NO_OLD_TLS -#ifndef NO_SHA - Sha hashSha; /* sha hash of handshake msgs */ -#endif -#ifndef NO_MD5 - Md5 hashMd5; /* md5 hash of handshake msgs */ -#endif -#endif -#ifndef NO_SHA256 - Sha256 hashSha256; /* sha256 hash of handshake msgs */ -#endif -#ifdef CYASSL_SHA384 - Sha384 hashSha384; /* sha384 hash of handshake msgs */ -#endif - Hashes verifyHashes; - Hashes certHashes; /* for cert verify */ - Buffers buffers; - Options options; - Arrays* arrays; - CYASSL_SESSION session; - VerifyCallback verifyCallback; /* cert verification callback */ - void* verifyCbCtx; /* cert verify callback user ctx*/ -#ifndef NO_RSA - RsaKey* peerRsaKey; - byte peerRsaKeyPresent; -#endif -#ifdef HAVE_NTRU - word16 peerNtruKeyLen; - byte peerNtruKey[MAX_NTRU_PUB_KEY_SZ]; - byte peerNtruKeyPresent; -#endif -#ifdef HAVE_ECC - ecc_key* peerEccKey; /* peer's ECDHE key */ - ecc_key* peerEccDsaKey; /* peer's ECDSA key */ - ecc_key* eccTempKey; /* private ECDHE key */ - ecc_key* eccDsaKey; /* private ECDSA key */ - word16 eccTempKeySz; /* in octets 20 - 66 */ - word32 pkCurveOID; /* curve Ecc_Sum */ - byte peerEccKeyPresent; - byte peerEccDsaKeyPresent; - byte eccTempKeyPresent; - byte eccDsaKeyPresent; -#endif - hmacfp hmac; - void* heap; /* for user overrides */ - RecordLayerHeader curRL; - word16 curSize; - word32 timeout; /* session timeout */ - CYASSL_CIPHER cipher; -#ifdef HAVE_LIBZ - z_stream c_stream; /* compression stream */ - z_stream d_stream; /* decompression stream */ - byte didStreamInit; /* for stream init and end */ -#endif -#ifdef CYASSL_DTLS - int dtls_timeout_init; /* starting timeout vaule */ - int dtls_timeout_max; /* maximum timeout value */ - int dtls_timeout; /* current timeout value, changes */ - DtlsPool* dtls_pool; - DtlsMsg* dtls_msg_list; - void* IOCB_CookieCtx; /* gen cookie ctx */ - word32 dtls_expected_rx; -#endif -#ifdef CYASSL_CALLBACKS - HandShakeInfo handShakeInfo; /* info saved during handshake */ - TimeoutInfo timeoutInfo; /* info saved during handshake */ - byte hsInfoOn; /* track handshake info */ - byte toInfoOn; /* track timeout info */ -#endif -#ifdef KEEP_PEER_CERT - CYASSL_X509 peerCert; /* X509 peer cert */ -#endif -#ifdef FORTRESS - void* ex_data[MAX_EX_DATA]; /* external data, for Fortress */ -#endif -#ifdef HAVE_CAVIUM - int devId; /* cavium device id to use */ -#endif -#ifdef HAVE_TLS_EXTENSIONS - TLSX* extensions; /* RFC 6066 TLS Extensions data */ -#ifdef HAVE_MAX_FRAGMENT - word16 max_fragment; -#endif -#ifdef HAVE_TRUNCATED_HMAC - byte truncated_hmac; -#endif -#endif -#ifdef HAVE_NETX - NetX_Ctx nxCtx; /* NetX IO Context */ -#endif -#ifdef SESSION_INDEX - int sessionIndex; /* Session's location in the cache. */ -#endif - CYASSL_ALERT_HISTORY alert_history; -#ifdef ATOMIC_USER - void* MacEncryptCtx; /* Atomic User Mac/Encrypt Callback Context */ - void* DecryptVerifyCtx; /* Atomic User Decrypt/Verify Callback Context */ -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - void* EccSignCtx; /* Ecc Sign Callback Context */ - void* EccVerifyCtx; /* Ecc Verify Callback Context */ - #endif /* HAVE_ECC */ - #ifndef NO_RSA - void* RsaSignCtx; /* Rsa Sign Callback Context */ - void* RsaVerifyCtx; /* Rsa Verify Callback Context */ - void* RsaEncCtx; /* Rsa Public Encrypt Callback Context */ - void* RsaDecCtx; /* Rsa Private Decrypt Callback Context */ - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ -}; - - -CYASSL_LOCAL -int InitSSL(CYASSL*, CYASSL_CTX*); -CYASSL_LOCAL -void FreeSSL(CYASSL*); -CYASSL_API void SSL_ResourceFree(CYASSL*); /* Micrium uses */ - - -enum { - IV_SZ = 32, /* max iv sz */ - NAME_SZ = 80 /* max one line */ -}; - - -typedef struct EncryptedInfo { - char name[NAME_SZ]; /* encryption name */ - byte iv[IV_SZ]; /* encrypted IV */ - word32 ivSz; /* encrypted IV size */ - long consumed; /* tracks PEM bytes consumed */ - byte set; /* if encryption set */ - CYASSL_CTX* ctx; /* CTX owner */ -} EncryptedInfo; - - -#ifndef NO_CERTS - CYASSL_LOCAL int PemToDer(const unsigned char* buff, long sz, int type, - buffer* der, void* heap, EncryptedInfo* info, - int* eccKey); - - CYASSL_LOCAL int ProcessFile(CYASSL_CTX* ctx, const char* fname, int format, - int type, CYASSL* ssl, int userChain, - CYASSL_CRL* crl); -#endif - - -#ifdef CYASSL_CALLBACKS - CYASSL_LOCAL - void InitHandShakeInfo(HandShakeInfo*); - CYASSL_LOCAL - void FinishHandShakeInfo(HandShakeInfo*, const CYASSL*); - CYASSL_LOCAL - void AddPacketName(const char*, HandShakeInfo*); - - CYASSL_LOCAL - void InitTimeoutInfo(TimeoutInfo*); - CYASSL_LOCAL - void FreeTimeoutInfo(TimeoutInfo*, void*); - CYASSL_LOCAL - void AddPacketInfo(const char*, TimeoutInfo*, const byte*, int, void*); - CYASSL_LOCAL - void AddLateName(const char*, TimeoutInfo*); - CYASSL_LOCAL - void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info); -#endif - - -/* Record Layer Header identifier from page 12 */ -enum ContentType { - no_type = 0, - change_cipher_spec = 20, - alert = 21, - handshake = 22, - application_data = 23 -}; - - -/* handshake header, same for each message type, pgs 20/21 */ -typedef struct HandShakeHeader { - byte type; - word24 length; -} HandShakeHeader; - - -/* DTLS handshake header, same for each message type */ -typedef struct DtlsHandShakeHeader { - byte type; - word24 length; - byte message_seq[2]; /* start at 0, restransmit gets same # */ - word24 fragment_offset; /* bytes in previous fragments */ - word24 fragment_length; /* length of this fragment */ -} DtlsHandShakeHeader; - - -enum HandShakeType { - no_shake = -1, - hello_request = 0, - client_hello = 1, - server_hello = 2, - hello_verify_request = 3, /* DTLS addition */ - session_ticket = 4, - certificate = 11, - server_key_exchange = 12, - certificate_request = 13, - server_hello_done = 14, - certificate_verify = 15, - client_key_exchange = 16, - finished = 20 -}; - - -static const byte client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 }; -static const byte server[SIZEOF_SENDER] = { 0x53, 0x52, 0x56, 0x52 }; - -static const byte tls_client[FINISHED_LABEL_SZ + 1] = "client finished"; -static const byte tls_server[FINISHED_LABEL_SZ + 1] = "server finished"; - - -/* internal functions */ -CYASSL_LOCAL int SendChangeCipher(CYASSL*); -CYASSL_LOCAL int SendData(CYASSL*, const void*, int); -CYASSL_LOCAL int SendCertificate(CYASSL*); -CYASSL_LOCAL int SendCertificateRequest(CYASSL*); -CYASSL_LOCAL int SendServerKeyExchange(CYASSL*); -CYASSL_LOCAL int SendBuffered(CYASSL*); -CYASSL_LOCAL int ReceiveData(CYASSL*, byte*, int, int); -CYASSL_LOCAL int SendFinished(CYASSL*); -CYASSL_LOCAL int SendAlert(CYASSL*, int, int); -CYASSL_LOCAL int ProcessReply(CYASSL*); - -CYASSL_LOCAL int SetCipherSpecs(CYASSL*); -CYASSL_LOCAL int MakeMasterSecret(CYASSL*); - -CYASSL_LOCAL int AddSession(CYASSL*); -CYASSL_LOCAL int DeriveKeys(CYASSL* ssl); -CYASSL_LOCAL int StoreKeys(CYASSL* ssl, const byte* keyData); - -CYASSL_LOCAL int IsTLS(const CYASSL* ssl); -CYASSL_LOCAL int IsAtLeastTLSv1_2(const CYASSL* ssl); - -CYASSL_LOCAL void FreeHandshakeResources(CYASSL* ssl); -CYASSL_LOCAL void ShrinkInputBuffer(CYASSL* ssl, int forcedFree); -CYASSL_LOCAL void ShrinkOutputBuffer(CYASSL* ssl); - -CYASSL_LOCAL int VerifyClientSuite(CYASSL* ssl); -#ifndef NO_CERTS - CYASSL_LOCAL Signer* GetCA(void* cm, byte* hash); - #ifndef NO_SKID - CYASSL_LOCAL Signer* GetCAByName(void* cm, byte* hash); - #endif -#endif -CYASSL_LOCAL int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, - const byte* sender); -CYASSL_LOCAL void FreeArrays(CYASSL* ssl, int keep); -CYASSL_LOCAL int CheckAvailableSize(CYASSL *ssl, int size); -CYASSL_LOCAL int GrowInputBuffer(CYASSL* ssl, int size, int usedLength); - -#ifndef NO_TLS - CYASSL_LOCAL int MakeTlsMasterSecret(CYASSL*); - CYASSL_LOCAL int TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, - word32 sz, int content, int verify); -#endif - -#ifndef NO_CYASSL_CLIENT - CYASSL_LOCAL int SendClientHello(CYASSL*); - CYASSL_LOCAL int SendClientKeyExchange(CYASSL*); - CYASSL_LOCAL int SendCertificateVerify(CYASSL*); -#endif /* NO_CYASSL_CLIENT */ - -#ifndef NO_CYASSL_SERVER - CYASSL_LOCAL int SendServerHello(CYASSL*); - CYASSL_LOCAL int SendServerHelloDone(CYASSL*); - #ifdef CYASSL_DTLS - CYASSL_LOCAL int SendHelloVerifyRequest(CYASSL*); - #endif -#endif /* NO_CYASSL_SERVER */ - -#ifdef CYASSL_DTLS - CYASSL_LOCAL int DtlsPoolInit(CYASSL*); - CYASSL_LOCAL int DtlsPoolSave(CYASSL*, const byte*, int); - CYASSL_LOCAL int DtlsPoolTimeout(CYASSL*); - CYASSL_LOCAL int DtlsPoolSend(CYASSL*); - CYASSL_LOCAL void DtlsPoolReset(CYASSL*); - - CYASSL_LOCAL DtlsMsg* DtlsMsgNew(word32, void*); - CYASSL_LOCAL void DtlsMsgDelete(DtlsMsg*, void*); - CYASSL_LOCAL void DtlsMsgListDelete(DtlsMsg*, void*); - CYASSL_LOCAL void DtlsMsgSet(DtlsMsg*, word32, const byte*, byte, - word32, word32); - CYASSL_LOCAL DtlsMsg* DtlsMsgFind(DtlsMsg*, word32); - CYASSL_LOCAL DtlsMsg* DtlsMsgStore(DtlsMsg*, word32, const byte*, word32, - byte, word32, word32, void*); - CYASSL_LOCAL DtlsMsg* DtlsMsgInsert(DtlsMsg*, DtlsMsg*); -#endif /* CYASSL_DTLS */ - -#ifndef NO_TLS - - -#endif /* NO_TLS */ - - -CYASSL_LOCAL word32 LowResTimer(void); - -CYASSL_LOCAL void InitX509Name(CYASSL_X509_NAME*, int); -CYASSL_LOCAL void FreeX509Name(CYASSL_X509_NAME* name); -CYASSL_LOCAL void InitX509(CYASSL_X509*, int); -CYASSL_LOCAL void FreeX509(CYASSL_X509*); -#ifndef NO_CERTS - CYASSL_LOCAL int CopyDecodedToX509(CYASSL_X509*, DecodedCert*); -#endif - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CyaSSL_INT_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/ocsp.h b/project1/cyassl-3.0.0/cyassl/ocsp.h deleted file mode 100644 index 3fc4f9f0..00000000 --- a/project1/cyassl-3.0.0/cyassl/ocsp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* ocsp.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* CyaSSL OCSP API */ - -#ifndef CYASSL_OCSP_H -#define CYASSL_OCSP_H - -#ifdef HAVE_OCSP - -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - -typedef struct CYASSL_OCSP CYASSL_OCSP; - -CYASSL_LOCAL int InitOCSP(CYASSL_OCSP*, CYASSL_CERT_MANAGER*); -CYASSL_LOCAL void FreeOCSP(CYASSL_OCSP*, int dynamic); - -CYASSL_LOCAL int CheckCertOCSP(CYASSL_OCSP*, DecodedCert*); - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* HAVE_OCSP */ -#endif /* CYASSL_OCSP_H */ - - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/asn1.h b/project1/cyassl-3.0.0/cyassl/openssl/asn1.h deleted file mode 100644 index 3f34d7d2..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/asn1.h +++ /dev/null @@ -1,2 +0,0 @@ -/* asn1.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/bio.h b/project1/cyassl-3.0.0/cyassl/openssl/bio.h deleted file mode 100644 index aba1935f..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/bio.h +++ /dev/null @@ -1,23 +0,0 @@ -/* bio.h for openssl */ - - -#ifndef CYASSL_BIO_H_ -#define CYASSL_BIO_H_ - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_BIO_H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/bn.h b/project1/cyassl-3.0.0/cyassl/openssl/bn.h deleted file mode 100644 index 0796bab2..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/bn.h +++ /dev/null @@ -1,115 +0,0 @@ -/* bn.h for openssl */ - - -#ifndef CYASSL_BN_H_ -#define CYASSL_BN_H_ - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -typedef struct CYASSL_BIGNUM { - int neg; /* openssh deference */ - void* internal; /* our big num */ -} CYASSL_BIGNUM; - - -typedef struct CYASSL_BN_CTX CYASSL_BN_CTX; - - -CYASSL_API CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void); -CYASSL_API void CyaSSL_BN_CTX_init(CYASSL_BN_CTX*); -CYASSL_API void CyaSSL_BN_CTX_free(CYASSL_BN_CTX*); - -CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_new(void); -CYASSL_API void CyaSSL_BN_free(CYASSL_BIGNUM*); -CYASSL_API void CyaSSL_BN_clear_free(CYASSL_BIGNUM*); - - -CYASSL_API int CyaSSL_BN_sub(CYASSL_BIGNUM*, const CYASSL_BIGNUM*, - const CYASSL_BIGNUM*); -CYASSL_API int CyaSSL_BN_mod(CYASSL_BIGNUM*, const CYASSL_BIGNUM*, - const CYASSL_BIGNUM*, const CYASSL_BN_CTX*); - -CYASSL_API const CYASSL_BIGNUM* CyaSSL_BN_value_one(void); - - -CYASSL_API int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM*); -CYASSL_API int CyaSSL_BN_num_bits(const CYASSL_BIGNUM*); - -CYASSL_API int CyaSSL_BN_is_zero(const CYASSL_BIGNUM*); -CYASSL_API int CyaSSL_BN_is_one(const CYASSL_BIGNUM*); -CYASSL_API int CyaSSL_BN_is_odd(const CYASSL_BIGNUM*); - -CYASSL_API int CyaSSL_BN_cmp(const CYASSL_BIGNUM*, const CYASSL_BIGNUM*); - -CYASSL_API int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM*, unsigned char*); -CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char*, int len, - CYASSL_BIGNUM* ret); - -CYASSL_API int CyaSSL_mask_bits(CYASSL_BIGNUM*, int n); - -CYASSL_API int CyaSSL_BN_rand(CYASSL_BIGNUM*, int bits, int top, int bottom); -CYASSL_API int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM*, int n); -CYASSL_API int CyaSSL_BN_hex2bn(CYASSL_BIGNUM**, const char* str); - -CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM*); -CYASSL_API CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM*, const CYASSL_BIGNUM*); - -CYASSL_API int CyaSSL_BN_set_word(CYASSL_BIGNUM*, unsigned long w); - -CYASSL_API int CyaSSL_BN_dec2bn(CYASSL_BIGNUM**, const char* str); -CYASSL_API char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM*); - - -typedef CYASSL_BIGNUM BIGNUM; -typedef CYASSL_BN_CTX BN_CTX; - -#define BN_CTX_new CyaSSL_BN_CTX_new -#define BN_CTX_init CyaSSL_BN_CTX_init -#define BN_CTX_free CyaSSL_BN_CTX_free - -#define BN_new CyaSSL_BN_new -#define BN_free CyaSSL_BN_free -#define BN_clear_free CyaSSL_BN_clear_free - -#define BN_num_bytes CyaSSL_BN_num_bytes -#define BN_num_bits CyaSSL_BN_num_bits - -#define BN_is_zero CyaSSL_BN_is_zero -#define BN_is_one CyaSSL_BN_is_one -#define BN_is_odd CyaSSL_BN_is_odd - -#define BN_cmp CyaSSL_BN_cmp - -#define BN_bn2bin CyaSSL_BN_bn2bin -#define BN_bin2bn CyaSSL_BN_bin2bn - -#define BN_mod CyaSSL_BN_mod -#define BN_sub CyaSSL_BN_sub -#define BN_value_one CyaSSL_BN_value_one - -#define BN_mask_bits CyaSSL_mask_bits - -#define BN_rand CyaSSL_BN_rand -#define BN_is_bit_set CyaSSL_BN_is_bit_set -#define BN_hex2bn CyaSSL_BN_hex2bn - -#define BN_dup CyaSSL_BN_dup -#define BN_copy CyaSSL_BN_copy - -#define BN_set_word CyaSSL_BN_set_word - -#define BN_dec2bn CyaSSL_BN_dec2bn -#define BN_bn2dec CyaSSL_BN_bn2dec - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL__H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/conf.h b/project1/cyassl-3.0.0/cyassl/openssl/conf.h deleted file mode 100644 index 1e328cf4..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/conf.h +++ /dev/null @@ -1,2 +0,0 @@ -/* conf.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/crypto.h b/project1/cyassl-3.0.0/cyassl/openssl/crypto.h deleted file mode 100644 index f7d5337c..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/crypto.h +++ /dev/null @@ -1,26 +0,0 @@ -/* crypto.h for openSSL */ - -#ifndef CYASSL_CRYPTO_H_ -#define CYASSL_CRYPTO_H_ - - -#include - -#ifdef YASSL_PREFIX -#include "prefix_crypto.h" -#endif - - -CYASSL_API const char* CyaSSLeay_version(int type); -CYASSL_API unsigned long CyaSSLeay(void); - -#define SSLeay_version CyaSSLeay_version -#define SSLeay CyaSSLeay - - -#define SSLEAY_VERSION 0x0090600fL -#define SSLEAY_VERSION_NUMBER SSLEAY_VERSION - - -#endif /* header */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/des.h b/project1/cyassl-3.0.0/cyassl/openssl/des.h deleted file mode 100644 index 848bc28b..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/des.h +++ /dev/null @@ -1,87 +0,0 @@ -/* des.h - * - * Copyright (C) 2013 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* des.h defines mini des openssl compatibility layer - * - */ - - -#ifndef CYASSL_DES_H_ -#define CYASSL_DES_H_ - -#include - -#ifdef YASSL_PREFIX -#include "prefix_des.h" -#endif - - -#ifdef __cplusplus - extern "C" { -#endif - -typedef unsigned char CYASSL_DES_cblock[8]; -typedef /* const */ CYASSL_DES_cblock CYASSL_const_DES_cblock; -typedef CYASSL_DES_cblock CYASSL_DES_key_schedule; - - -enum { - DES_ENCRYPT = 1, - DES_DECRYPT = 0 -}; - - -CYASSL_API void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock*, - CYASSL_DES_key_schedule*); -CYASSL_API int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key, - CYASSL_DES_key_schedule* schedule); -CYASSL_API void CyaSSL_DES_cbc_encrypt(const unsigned char* input, - unsigned char* output, long length, - CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, - int enc); -CYASSL_API void CyaSSL_DES_ncbc_encrypt(const unsigned char* input, - unsigned char* output, long length, - CYASSL_DES_key_schedule* schedule, - CYASSL_DES_cblock* ivec, int enc); - -CYASSL_API void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock*); -CYASSL_API void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock*, CYASSL_DES_cblock*, - CYASSL_DES_key_schedule*, int); - - -typedef CYASSL_DES_cblock DES_cblock; -typedef CYASSL_const_DES_cblock const_DES_cblock; -typedef CYASSL_DES_key_schedule DES_key_schedule; - -#define DES_set_key_unchecked CyaSSL_DES_set_key_unchecked -#define DES_key_sched CyaSSL_DES_key_sched -#define DES_cbc_encrypt CyaSSL_DES_cbc_encrypt -#define DES_ncbc_encrypt CyaSSL_DES_ncbc_encrypt -#define DES_set_odd_parity CyaSSL_DES_set_odd_parity -#define DES_ecb_encrypt CyaSSL_DES_ecb_encrypt - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_DES_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/dh.h b/project1/cyassl-3.0.0/cyassl/openssl/dh.h deleted file mode 100644 index 2faccbca..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/dh.h +++ /dev/null @@ -1,52 +0,0 @@ -/* dh.h for openSSL */ - - -#ifndef CYASSL_DH_H_ -#define CYASSL_DH_H_ - - -#include -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - - - -typedef struct CYASSL_DH { - CYASSL_BIGNUM* p; - CYASSL_BIGNUM* g; - CYASSL_BIGNUM* pub_key; /* openssh deference g^x */ - CYASSL_BIGNUM* priv_key; /* openssh deference x */ - void* internal; /* our DH */ - char inSet; /* internal set from external ? */ - char exSet; /* external set from internal ? */ -} CYASSL_DH; - - -CYASSL_API CYASSL_DH* CyaSSL_DH_new(void); -CYASSL_API void CyaSSL_DH_free(CYASSL_DH*); - -CYASSL_API int CyaSSL_DH_size(CYASSL_DH*); -CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*); -CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub, - CYASSL_DH*); - -typedef CYASSL_DH DH; - -#define DH_new CyaSSL_DH_new -#define DH_free CyaSSL_DH_free - -#define DH_size CyaSSL_DH_size -#define DH_generate_key CyaSSL_DH_generate_key -#define DH_compute_key CyaSSL_DH_compute_key - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/dsa.h b/project1/cyassl-3.0.0/cyassl/openssl/dsa.h deleted file mode 100644 index 817f1fa1..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/dsa.h +++ /dev/null @@ -1,53 +0,0 @@ -/* dsa.h for openSSL */ - - -#ifndef CYASSL_DSA_H_ -#define CYASSL_DSA_H_ - - -#include -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - - -struct CYASSL_DSA { - CYASSL_BIGNUM* p; - CYASSL_BIGNUM* q; - CYASSL_BIGNUM* g; - CYASSL_BIGNUM* pub_key; /* our y */ - CYASSL_BIGNUM* priv_key; /* our x */ - void* internal; /* our Dsa Key */ - char inSet; /* internal set from external ? */ - char exSet; /* external set from internal ? */ -}; - - -CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void); -CYASSL_API void CyaSSL_DSA_free(CYASSL_DSA*); - -CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*); -CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits, - unsigned char* seed, int seedLen, int* counterRet, - unsigned long* hRet, void* cb); - -CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz); -CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet, - CYASSL_DSA* dsa); - -#define DSA_new CyaSSL_DSA_new -#define DSA_free CyaSSL_DSA_free - -#define DSA_generate_key CyaSSL_DSA_generate_key -#define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ec.h b/project1/cyassl-3.0.0/cyassl/openssl/ec.h deleted file mode 100644 index 5ffdaf6e..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ec.h +++ /dev/null @@ -1,2 +0,0 @@ -/* ec.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h b/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h deleted file mode 100644 index f3cf0de3..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ecdsa.h +++ /dev/null @@ -1,2 +0,0 @@ -/* ecdsa.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/engine.h b/project1/cyassl-3.0.0/cyassl/openssl/engine.h deleted file mode 100644 index 39952fca..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/engine.h +++ /dev/null @@ -1,5 +0,0 @@ -/* engine.h for libcurl */ - -#undef HAVE_OPENSSL_ENGINE_H - - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/err.h b/project1/cyassl-3.0.0/cyassl/openssl/err.h deleted file mode 100644 index 7e7f1eb7..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/err.h +++ /dev/null @@ -1,2 +0,0 @@ -/* err.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/evp.h b/project1/cyassl-3.0.0/cyassl/openssl/evp.h deleted file mode 100644 index ee2873c5..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/evp.h +++ /dev/null @@ -1,241 +0,0 @@ -/* evp.h - * - * Copyright (C) 2013 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* evp.h defines mini evp openssl compatibility layer - * - */ - - -#ifndef CYASSL_EVP_H_ -#define CYASSL_EVP_H_ - -#include - -#ifdef YASSL_PREFIX -#include "prefix_evp.h" -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include - - -#ifdef __cplusplus - extern "C" { -#endif - -typedef char CYASSL_EVP_MD; -typedef char CYASSL_EVP_CIPHER; - -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_md5(void); -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void); -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void); -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void); -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void); -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void); - -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void); -CYASSL_API const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void); - - -typedef union { - CYASSL_MD5_CTX md5; - CYASSL_SHA_CTX sha; - CYASSL_SHA256_CTX sha256; - #ifdef CYASSL_SHA384 - CYASSL_SHA384_CTX sha384; - #endif - #ifdef CYASSL_SHA512 - CYASSL_SHA512_CTX sha512; - #endif - #ifdef CYASSL_RIPEMD - CYASSL_RIPEMD_CTX ripemd; - #endif -} CYASSL_Hasher; - - -typedef struct CYASSL_EVP_MD_CTX { - unsigned char macType; - CYASSL_Hasher hash; -} CYASSL_EVP_MD_CTX; - - -typedef union { - Aes aes; -#ifndef NO_DES3 - Des des; - Des3 des3; -#endif - Arc4 arc4; -} CYASSL_Cipher; - - -enum { - AES_128_CBC_TYPE = 1, - AES_192_CBC_TYPE = 2, - AES_256_CBC_TYPE = 3, - AES_128_CTR_TYPE = 4, - AES_192_CTR_TYPE = 5, - AES_256_CTR_TYPE = 6, - DES_CBC_TYPE = 7, - DES_EDE3_CBC_TYPE = 8, - ARC4_TYPE = 9, - NULL_CIPHER_TYPE = 10, - EVP_PKEY_RSA = 11, - EVP_PKEY_DSA = 12, - NID_sha1 = 64, - NID_md5 = 4 -}; - - -typedef struct CYASSL_EVP_CIPHER_CTX { - int keyLen; /* user may set for variable */ - unsigned char enc; /* if encrypt side, then true */ - unsigned char cipherType; - unsigned char iv[AES_BLOCK_SIZE]; /* working iv pointer into cipher */ - CYASSL_Cipher cipher; -} CYASSL_EVP_CIPHER_CTX; - - -CYASSL_API int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* md); -CYASSL_API void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx); -CYASSL_API int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx); - -CYASSL_API int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, - const CYASSL_EVP_MD* type); -CYASSL_API int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data, - unsigned long sz); -CYASSL_API int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, - unsigned int* s); -CYASSL_API int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, - unsigned char* md, unsigned int* s); -CYASSL_API int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER*, - const CYASSL_EVP_MD*, const unsigned char*, - const unsigned char*, int, int, unsigned char*, - unsigned char*); - -CYASSL_API void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx); -CYASSL_API int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx); - -CYASSL_API int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX*); - - -CYASSL_API int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx, - const CYASSL_EVP_CIPHER* type, - unsigned char* key, unsigned char* iv, - int enc); -CYASSL_API int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx); -CYASSL_API int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx, - int keylen); -CYASSL_API int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, - unsigned char* dst, unsigned char* src, - unsigned int len); - -CYASSL_API const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int); - -CYASSL_API CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY*); -CYASSL_API CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY*); - -/* these next ones don't need real OpenSSL type, for OpenSSH compat only */ -CYASSL_API void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx); -CYASSL_API int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx); - -CYASSL_API void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, - unsigned char* iv, int len); -CYASSL_API void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, - unsigned char* iv, int len); - -CYASSL_API int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx); -CYASSL_API int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx); - - -/* end OpenSSH compat */ - -typedef CYASSL_EVP_MD EVP_MD; -typedef CYASSL_EVP_CIPHER EVP_CIPHER; -typedef CYASSL_EVP_MD_CTX EVP_MD_CTX; -typedef CYASSL_EVP_CIPHER_CTX EVP_CIPHER_CTX; - -#define EVP_md5 CyaSSL_EVP_md5 -#define EVP_sha1 CyaSSL_EVP_sha1 -#define EVP_sha256 CyaSSL_EVP_sha256 -#define EVP_sha384 CyaSSL_EVP_sha384 -#define EVP_sha512 CyaSSL_EVP_sha512 -#define EVP_ripemd160 CyaSSL_EVP_ripemd160 - -#define EVP_aes_128_cbc CyaSSL_EVP_aes_128_cbc -#define EVP_aes_192_cbc CyaSSL_EVP_aes_192_cbc -#define EVP_aes_256_cbc CyaSSL_EVP_aes_256_cbc -#define EVP_aes_128_ctr CyaSSL_EVP_aes_128_ctr -#define EVP_aes_192_ctr CyaSSL_EVP_aes_192_ctr -#define EVP_aes_256_ctr CyaSSL_EVP_aes_256_ctr -#define EVP_des_cbc CyaSSL_EVP_des_cbc -#define EVP_des_ede3_cbc CyaSSL_EVP_des_ede3_cbc -#define EVP_rc4 CyaSSL_EVP_rc4 -#define EVP_enc_null CyaSSL_EVP_enc_null - -#define EVP_MD_size CyaSSL_EVP_MD_size -#define EVP_MD_CTX_init CyaSSL_EVP_MD_CTX_init -#define EVP_MD_CTX_cleanup CyaSSL_EVP_MD_CTX_cleanup -#define EVP_DigestInit CyaSSL_EVP_DigestInit -#define EVP_DigestUpdate CyaSSL_EVP_DigestUpdate -#define EVP_DigestFinal CyaSSL_EVP_DigestFinal -#define EVP_DigestFinal_ex CyaSSL_EVP_DigestFinal_ex -#define EVP_BytesToKey CyaSSL_EVP_BytesToKey - -#define EVP_CIPHER_CTX_init CyaSSL_EVP_CIPHER_CTX_init -#define EVP_CIPHER_CTX_cleanup CyaSSL_EVP_CIPHER_CTX_cleanup -#define EVP_CIPHER_CTX_iv_length CyaSSL_EVP_CIPHER_CTX_iv_length -#define EVP_CIPHER_CTX_key_length CyaSSL_EVP_CIPHER_CTX_key_length -#define EVP_CIPHER_CTX_set_key_length CyaSSL_EVP_CIPHER_CTX_set_key_length -#define EVP_CipherInit CyaSSL_EVP_CipherInit -#define EVP_Cipher CyaSSL_EVP_Cipher - -#define EVP_get_digestbynid CyaSSL_EVP_get_digestbynid - -#define EVP_PKEY_get1_RSA CyaSSL_EVP_PKEY_get1_RSA -#define EVP_PKEY_get1_DSA CyaSSL_EVP_PKEY_get1_DSA - -#ifndef EVP_MAX_MD_SIZE - #define EVP_MAX_MD_SIZE 64 /* sha512 */ -#endif - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_EVP_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/hmac.h b/project1/cyassl-3.0.0/cyassl/openssl/hmac.h deleted file mode 100644 index 4482d109..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/hmac.h +++ /dev/null @@ -1,81 +0,0 @@ -/* hmac.h - * - * Copyright (C) 2013 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* hmac.h defines mini hamc openssl compatibility layer - * - */ - - -#ifndef CYASSL_HMAC_H_ -#define CYASSL_HMAC_H_ - -#include - -#ifdef YASSL_PREFIX -#include "prefix_hmac.h" -#endif - -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -CYASSL_API unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, - const void* key, int key_len, - const unsigned char* d, int n, unsigned char* md, - unsigned int* md_len); - - -typedef struct CYASSL_HMAC_CTX { - Hmac hmac; - int type; -} CYASSL_HMAC_CTX; - - -CYASSL_API void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, - int keylen, const EVP_MD* type); -CYASSL_API void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, - const unsigned char* data, int len); -CYASSL_API void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash, - unsigned int* len); -CYASSL_API void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx); - - -typedef struct CYASSL_HMAC_CTX HMAC_CTX; - -#define HMAC(a,b,c,d,e,f,g) CyaSSL_HMAC((a),(b),(c),(d),(e),(f),(g)) - -#define HMAC_Init CyaSSL_HMAC_Init -#define HMAC_Update CyaSSL_HMAC_Update -#define HMAC_Final CyaSSL_HMAC_Final -#define HMAC_cleanup CyaSSL_HMAC_cleanup - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_HMAC_H_ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/include.am b/project1/cyassl-3.0.0/cyassl/openssl/include.am deleted file mode 100644 index e531f767..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/include.am +++ /dev/null @@ -1,36 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -nobase_include_HEADERS+= \ - cyassl/openssl/asn1.h \ - cyassl/openssl/bio.h \ - cyassl/openssl/bn.h \ - cyassl/openssl/conf.h \ - cyassl/openssl/crypto.h \ - cyassl/openssl/des.h \ - cyassl/openssl/dh.h \ - cyassl/openssl/dsa.h \ - cyassl/openssl/ecdsa.h \ - cyassl/openssl/ec.h \ - cyassl/openssl/engine.h \ - cyassl/openssl/err.h \ - cyassl/openssl/evp.h \ - cyassl/openssl/hmac.h \ - cyassl/openssl/lhash.h \ - cyassl/openssl/md4.h \ - cyassl/openssl/md5.h \ - cyassl/openssl/ripemd.h \ - cyassl/openssl/ocsp.h \ - cyassl/openssl/opensslconf.h \ - cyassl/openssl/opensslv.h \ - cyassl/openssl/ossl_typ.h \ - cyassl/openssl/pem.h \ - cyassl/openssl/pkcs12.h \ - cyassl/openssl/rand.h \ - cyassl/openssl/rsa.h \ - cyassl/openssl/sha.h \ - cyassl/openssl/ssl.h \ - cyassl/openssl/stack.h \ - cyassl/openssl/ui.h \ - cyassl/openssl/x509.h \ - cyassl/openssl/x509v3.h diff --git a/project1/cyassl-3.0.0/cyassl/openssl/lhash.h b/project1/cyassl-3.0.0/cyassl/openssl/lhash.h deleted file mode 100644 index 01f8535f..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/lhash.h +++ /dev/null @@ -1,2 +0,0 @@ -/* lhash.h for openSSL */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/md4.h b/project1/cyassl-3.0.0/cyassl/openssl/md4.h deleted file mode 100644 index 2e99f977..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/md4.h +++ /dev/null @@ -1 +0,0 @@ -/* md4.h for libcurl */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/md5.h b/project1/cyassl-3.0.0/cyassl/openssl/md5.h deleted file mode 100644 index 0fddb517..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/md5.h +++ /dev/null @@ -1,39 +0,0 @@ -/* md5.h for openssl */ - - -#ifndef CYASSL_MD5_H_ -#define CYASSL_MD5_H_ - -#include - -#ifdef YASSL_PREFIX -#include "prefix_md5.h" -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -typedef struct CYASSL_MD5_CTX { - int holder[24]; /* big enough to hold ctaocrypt md5, but check on init */ -} CYASSL_MD5_CTX; - -CYASSL_API void CyaSSL_MD5_Init(CYASSL_MD5_CTX*); -CYASSL_API void CyaSSL_MD5_Update(CYASSL_MD5_CTX*, const void*, unsigned long); -CYASSL_API void CyaSSL_MD5_Final(unsigned char*, CYASSL_MD5_CTX*); - - -typedef CYASSL_MD5_CTX MD5_CTX; - -#define MD5_Init CyaSSL_MD5_Init -#define MD5_Update CyaSSL_MD5_Update -#define MD5_Final CyaSSL_MD5_Final - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_MD5_H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h b/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h deleted file mode 100644 index 7463eec9..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ocsp.h +++ /dev/null @@ -1 +0,0 @@ -/* ocsp.h for libcurl */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h b/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h deleted file mode 100644 index ac6b55bc..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/opensslconf.h +++ /dev/null @@ -1,8 +0,0 @@ -/* opensslconf.h for openSSL */ - - -#ifndef OPENSSL_THREADS - #define OPENSSL_THREADS -#endif - - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h b/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h deleted file mode 100644 index bdcc805e..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/opensslv.h +++ /dev/null @@ -1,12 +0,0 @@ -/* opensslv.h compatibility */ - -#ifndef CYASSL_OPENSSLV_H_ -#define CYASSL_OPENSSLV_H_ - - -/* api version compatibility */ -#define OPENSSL_VERSION_NUMBER 0x0090410fL - - -#endif /* header */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h b/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h deleted file mode 100644 index 65b00c72..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ossl_typ.h +++ /dev/null @@ -1,2 +0,0 @@ -/* ossl_typ.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/pem.h b/project1/cyassl-3.0.0/cyassl/openssl/pem.h deleted file mode 100644 index b727862b..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/pem.h +++ /dev/null @@ -1,41 +0,0 @@ -/* pem.h for openssl */ - - -#ifndef CYASSL_PEM_H_ -#define CYASSL_PEM_H_ - -#include -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -CYASSL_API int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa, - const EVP_CIPHER* cipher, - unsigned char* passwd, int len, - pem_password_cb cb, void* arg); - -CYASSL_API int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa, - const EVP_CIPHER* cipher, - unsigned char* passwd, int len, - pem_password_cb cb, void* arg); - -CYASSL_API CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio, - CYASSL_EVP_PKEY**, pem_password_cb cb, void* arg); - -#define PEM_write_bio_RSAPrivateKey CyaSSL_PEM_write_bio_RSAPrivateKey -#define PEM_write_bio_DSAPrivateKey CyaSSL_PEM_write_bio_DSAPrivateKey -#define PEM_read_bio_PrivateKey CyaSSL_PEM_read_bio_PrivateKey - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_PEM_H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h b/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h deleted file mode 100644 index 544b6f09..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/pkcs12.h +++ /dev/null @@ -1,2 +0,0 @@ -/* pkcs12.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/rand.h b/project1/cyassl-3.0.0/cyassl/openssl/rand.h deleted file mode 100644 index a5534e1a..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/rand.h +++ /dev/null @@ -1,4 +0,0 @@ -/* rand.h for openSSL */ - -#include - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h b/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h deleted file mode 100644 index 2d4d0146..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ripemd.h +++ /dev/null @@ -1,37 +0,0 @@ -/* ripemd.h for openssl */ - - -#ifndef CYASSL_RIPEMD_H_ -#define CYASSL_RIPEMD_H_ - -#include - -#ifdef __cplusplus - extern "C" { -#endif - - -typedef struct CYASSL_RIPEMD_CTX { - int holder[32]; /* big enough to hold ctaocrypt, but check on init */ -} CYASSL_RIPEMD_CTX; - -CYASSL_API void CyaSSL_RIPEMD_Init(CYASSL_RIPEMD_CTX*); -CYASSL_API void CyaSSL_RIPEMD_Update(CYASSL_RIPEMD_CTX*, const void*, - unsigned long); -CYASSL_API void CyaSSL_RIPEMD_Final(unsigned char*, CYASSL_RIPEMD_CTX*); - - -typedef CYASSL_RIPEMD_CTX RIPEMD_CTX; - -#define RIPEMD_Init CyaSSL_RIPEMD_Init -#define RIPEMD_Update CyaSSL_RIPEMD_Update -#define RIPEMD_Final CyaSSL_RIPEMD_Final - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_MD5_H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/rsa.h b/project1/cyassl-3.0.0/cyassl/openssl/rsa.h deleted file mode 100644 index 149ad46c..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/rsa.h +++ /dev/null @@ -1,75 +0,0 @@ -/* rsa.h for openSSL */ - - -#ifndef CYASSL_RSA_H_ -#define CYASSL_RSA_H_ - -#include -#include - - -#ifdef __cplusplus - extern "C" { -#endif - - -enum { - RSA_PKCS1_PADDING = 1 - }; - -struct CYASSL_RSA { - CYASSL_BIGNUM* n; - CYASSL_BIGNUM* e; - CYASSL_BIGNUM* d; - CYASSL_BIGNUM* p; - CYASSL_BIGNUM* q; - CYASSL_BIGNUM* dmp1; /* dP */ - CYASSL_BIGNUM* dmq1; /* dQ */ - CYASSL_BIGNUM* iqmp; /* u */ - void* internal; /* our RSA */ - char inSet; /* internal set from external ? */ - char exSet; /* external set from internal ? */ -}; - - -CYASSL_API CYASSL_RSA* CyaSSL_RSA_new(void); -CYASSL_API void CyaSSL_RSA_free(CYASSL_RSA*); - -CYASSL_API int CyaSSL_RSA_generate_key_ex(CYASSL_RSA*, int bits, CYASSL_BIGNUM*, - void* cb); - -CYASSL_API int CyaSSL_RSA_blinding_on(CYASSL_RSA*, CYASSL_BN_CTX*); -CYASSL_API int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr, - unsigned char* to, CYASSL_RSA*, int padding); -CYASSL_API int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr, - unsigned char* to, CYASSL_RSA*, int padding); - -CYASSL_API int CyaSSL_RSA_size(const CYASSL_RSA*); -CYASSL_API int CyaSSL_RSA_sign(int type, const unsigned char* m, - unsigned int mLen, unsigned char* sigRet, - unsigned int* sigLen, CYASSL_RSA*); -CYASSL_API int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from, - unsigned char* to, CYASSL_RSA*, int padding); -CYASSL_API int CyaSSL_RSA_GenAdd(CYASSL_RSA*); -CYASSL_API int CyaSSL_RSA_LoadDer(CYASSL_RSA*, const unsigned char*, int sz); - - -#define RSA_new CyaSSL_RSA_new -#define RSA_free CyaSSL_RSA_free - -#define RSA_generate_key_ex CyaSSL_RSA_generate_key_ex - -#define RSA_blinding_on CyaSSL_RSA_blinding_on -#define RSA_public_encrypt CyaSSL_RSA_public_encrypt -#define RSA_private_decrypt CyaSSL_RSA_private_decrypt - -#define RSA_size CyaSSL_RSA_size -#define RSA_sign CyaSSL_RSA_sign -#define RSA_public_decrypt CyaSSL_RSA_public_decrypt - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* header */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/sha.h b/project1/cyassl-3.0.0/cyassl/openssl/sha.h deleted file mode 100644 index 9545795e..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/sha.h +++ /dev/null @@ -1,125 +0,0 @@ -/* sha.h for openssl */ - - -#ifndef CYASSL_SHA_H_ -#define CYASSL_SHA_H_ - -#include - -#ifdef YASSL_PREFIX -#include "prefix_sha.h" -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - -typedef struct CYASSL_SHA_CTX { - int holder[24]; /* big enough to hold ctaocrypt sha, but check on init */ -} CYASSL_SHA_CTX; - -CYASSL_API void CyaSSL_SHA_Init(CYASSL_SHA_CTX*); -CYASSL_API void CyaSSL_SHA_Update(CYASSL_SHA_CTX*, const void*, unsigned long); -CYASSL_API void CyaSSL_SHA_Final(unsigned char*, CYASSL_SHA_CTX*); - -/* SHA1 points to above, shouldn't use SHA0 ever */ -CYASSL_API void CyaSSL_SHA1_Init(CYASSL_SHA_CTX*); -CYASSL_API void CyaSSL_SHA1_Update(CYASSL_SHA_CTX*, const void*, unsigned long); -CYASSL_API void CyaSSL_SHA1_Final(unsigned char*, CYASSL_SHA_CTX*); - -enum { - SHA_DIGEST_LENGTH = 20 -}; - - -typedef CYASSL_SHA_CTX SHA_CTX; - -#define SHA_Init CyaSSL_SHA_Init -#define SHA_Update CyaSSL_SHA_Update -#define SHA_Final CyaSSL_SHA_Final - -#define SHA1_Init CyaSSL_SHA1_Init -#define SHA1_Update CyaSSL_SHA1_Update -#define SHA1_Final CyaSSL_SHA1_Final - - -typedef struct CYASSL_SHA256_CTX { - int holder[28]; /* big enough to hold ctaocrypt sha, but check on init */ -} CYASSL_SHA256_CTX; - -CYASSL_API void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX*); -CYASSL_API void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX*, const void*, - unsigned long); -CYASSL_API void CyaSSL_SHA256_Final(unsigned char*, CYASSL_SHA256_CTX*); - -enum { - SHA256_DIGEST_LENGTH = 32 -}; - - -typedef CYASSL_SHA256_CTX SHA256_CTX; - -#define SHA256_Init CyaSSL_SHA256_Init -#define SHA256_Update CyaSSL_SHA256_Update -#define SHA256_Final CyaSSL_SHA256_Final - - -#ifdef CYASSL_SHA384 - -typedef struct CYASSL_SHA384_CTX { - long long holder[32]; /* big enough, but check on init */ -} CYASSL_SHA384_CTX; - -CYASSL_API void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX*); -CYASSL_API void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX*, const void*, - unsigned long); -CYASSL_API void CyaSSL_SHA384_Final(unsigned char*, CYASSL_SHA384_CTX*); - -enum { - SHA384_DIGEST_LENGTH = 48 -}; - - -typedef CYASSL_SHA384_CTX SHA384_CTX; - -#define SHA384_Init CyaSSL_SHA384_Init -#define SHA384_Update CyaSSL_SHA384_Update -#define SHA384_Final CyaSSL_SHA384_Final - -#endif /* CYASSL_SHA384 */ - -#ifdef CYASSL_SHA512 - -typedef struct CYASSL_SHA512_CTX { - long long holder[36]; /* big enough, but check on init */ -} CYASSL_SHA512_CTX; - -CYASSL_API void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX*); -CYASSL_API void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX*, const void*, - unsigned long); -CYASSL_API void CyaSSL_SHA512_Final(unsigned char*, CYASSL_SHA512_CTX*); - -enum { - SHA512_DIGEST_LENGTH = 64 -}; - - -typedef CYASSL_SHA512_CTX SHA512_CTX; - -#define SHA512_Init CyaSSL_SHA512_Init -#define SHA512_Update CyaSSL_SHA512_Update -#define SHA512_Final CyaSSL_SHA512_Final - -#endif /* CYASSL_SHA512 */ - - - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_SHA_H_ */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ssl.h b/project1/cyassl-3.0.0/cyassl/openssl/ssl.h deleted file mode 100644 index 0fb6d453..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ssl.h +++ /dev/null @@ -1,380 +0,0 @@ -/* ssl.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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 - * a with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -/* ssl.h defines openssl compatibility layer - * - */ - - -#ifndef CYASSL_OPENSSL_H_ -#define CYASSL_OPENSSL_H_ - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -#ifdef _WIN32 - /* wincrypt.h clashes */ - #undef X509_NAME -#endif - - -typedef CYASSL SSL; -typedef CYASSL_SESSION SSL_SESSION; -typedef CYASSL_METHOD SSL_METHOD; -typedef CYASSL_CTX SSL_CTX; - -typedef CYASSL_X509 X509; -typedef CYASSL_X509_NAME X509_NAME; -typedef CYASSL_X509_CHAIN X509_CHAIN; - - -/* redeclare guard */ -#define CYASSL_TYPES_DEFINED - - -typedef CYASSL_EVP_PKEY EVP_PKEY; -typedef CYASSL_RSA RSA; -typedef CYASSL_DSA DSA; -typedef CYASSL_BIO BIO; -typedef CYASSL_BIO_METHOD BIO_METHOD; -typedef CYASSL_CIPHER SSL_CIPHER; -typedef CYASSL_X509_LOOKUP X509_LOOKUP; -typedef CYASSL_X509_LOOKUP_METHOD X509_LOOKUP_METHOD; -typedef CYASSL_X509_CRL X509_CRL; -typedef CYASSL_X509_EXTENSION X509_EXTENSION; -typedef CYASSL_ASN1_TIME ASN1_TIME; -typedef CYASSL_ASN1_INTEGER ASN1_INTEGER; -typedef CYASSL_ASN1_OBJECT ASN1_OBJECT; -typedef CYASSL_ASN1_STRING ASN1_STRING; -typedef CYASSL_dynlock_value CRYPTO_dynlock_value; - -#define ASN1_UTCTIME CYASSL_ASN1_TIME - -typedef CYASSL_MD4_CTX MD4_CTX; -typedef CYASSL_COMP_METHOD COMP_METHOD; -typedef CYASSL_X509_STORE X509_STORE; -typedef CYASSL_X509_REVOKED X509_REVOKED; -typedef CYASSL_X509_OBJECT X509_OBJECT; -typedef CYASSL_X509_STORE_CTX X509_STORE_CTX; - - -#define SSLv3_server_method CyaSSLv3_server_method -#define SSLv3_client_method CyaSSLv3_client_method -#define TLSv1_server_method CyaTLSv1_server_method -#define TLSv1_client_method CyaTLSv1_client_method -#define TLSv1_1_server_method CyaTLSv1_1_server_method -#define TLSv1_1_client_method CyaTLSv1_1_client_method -#define TLSv1_2_server_method CyaTLSv1_2_server_method -#define TLSv1_2_client_method CyaTLSv1_2_client_method - -#ifdef CYASSL_DTLS - #define DTLSv1_client_method CyaDTLSv1_client_method - #define DTLSv1_server_method CyaDTLSv1_server_method - #define DTLSv1_2_client_method CyaDTLSv1_2_client_method - #define DTLSv1_2_server_method CyaDTLSv1_2_server_method -#endif - - -#ifndef NO_FILESYSTEM - #define SSL_CTX_use_certificate_file CyaSSL_CTX_use_certificate_file - #define SSL_CTX_use_PrivateKey_file CyaSSL_CTX_use_PrivateKey_file - #define SSL_CTX_load_verify_locations CyaSSL_CTX_load_verify_locations - #define SSL_CTX_use_certificate_chain_file CyaSSL_CTX_use_certificate_chain_file - #define SSL_CTX_use_RSAPrivateKey_file CyaSSL_CTX_use_RSAPrivateKey_file - - #define SSL_use_certificate_file CyaSSL_use_certificate_file - #define SSL_use_PrivateKey_file CyaSSL_use_PrivateKey_file - #define SSL_use_certificate_chain_file CyaSSL_use_certificate_chain_file - #define SSL_use_RSAPrivateKey_file CyaSSL_use_RSAPrivateKey_file -#endif - -#define SSL_CTX_new CyaSSL_CTX_new -#define SSL_new CyaSSL_new -#define SSL_set_fd CyaSSL_set_fd -#define SSL_get_fd CyaSSL_get_fd -#define SSL_connect CyaSSL_connect - -#define SSL_write CyaSSL_write -#define SSL_read CyaSSL_read -#define SSL_peek CyaSSL_peek -#define SSL_accept CyaSSL_accept -#define SSL_CTX_free CyaSSL_CTX_free -#define SSL_free CyaSSL_free -#define SSL_shutdown CyaSSL_shutdown - -#define SSL_CTX_set_quiet_shutdown CyaSSL_CTX_set_quiet_shutdown -#define SSL_set_quiet_shutdown CyaSSL_set_quiet_shutdown -#define SSL_get_error CyaSSL_get_error -#define SSL_set_session CyaSSL_set_session -#define SSL_get_session CyaSSL_get_session -#define SSL_flush_sessions CyaSSL_flush_sessions - -#define SSL_CTX_set_verify CyaSSL_CTX_set_verify -#define SSL_set_verify CyaSSL_set_verify -#define SSL_pending CyaSSL_pending -#define SSL_load_error_strings CyaSSL_load_error_strings -#define SSL_library_init CyaSSL_library_init -#define SSL_CTX_set_session_cache_mode CyaSSL_CTX_set_session_cache_mode -#define SSL_CTX_set_cipher_list CyaSSL_CTX_set_cipher_list -#define SSL_set_cipher_list CyaSSL_set_cipher_list - -#define ERR_error_string CyaSSL_ERR_error_string -#define ERR_error_string_n CyaSSL_ERR_error_string_n - -#define SSL_set_ex_data CyaSSL_set_ex_data -#define SSL_get_shutdown CyaSSL_get_shutdown -#define SSL_set_rfd CyaSSL_set_rfd -#define SSL_set_wfd CyaSSL_set_wfd -#define SSL_set_shutdown CyaSSL_set_shutdown -#define SSL_set_session_id_context CyaSSL_set_session_id_context -#define SSL_set_connect_state CyaSSL_set_connect_state -#define SSL_set_accept_state CyaSSL_set_accept_state -#define SSL_session_reused CyaSSL_session_reused -#define SSL_SESSION_free CyaSSL_SESSION_free -#define SSL_is_init_finished CyaSSL_is_init_finished - -#define SSL_get_version CyaSSL_get_version -#define SSL_get_current_cipher CyaSSL_get_current_cipher -#define SSL_get_cipher CyaSSL_get_cipher -#define SSL_CIPHER_description CyaSSL_CIPHER_description -#define SSL_CIPHER_get_name CyaSSL_CIPHER_get_name -#define SSL_get1_session CyaSSL_get1_session - -#define SSL_get_keyblock_size CyaSSL_get_keyblock_size -#define SSL_get_keys CyaSSL_get_keys - -#define X509_free CyaSSL_X509_free -#define OPENSSL_free CyaSSL_OPENSSL_free - -#define OCSP_parse_url CyaSSL_OCSP_parse_url -#define SSLv23_client_method CyaSSLv23_client_method -#define SSLv2_client_method CyaSSLv2_client_method -#define SSLv2_server_method CyaSSLv2_server_method - -#define MD4_Init CyaSSL_MD4_Init -#define MD4_Update CyaSSL_MD4_Update -#define MD4_Final CyaSSL_MD4_Final - -#define BIO_new CyaSSL_BIO_new -#define BIO_free CyaSSL_BIO_free -#define BIO_free_all CyaSSL_BIO_free_all -#define BIO_read CyaSSL_BIO_read -#define BIO_write CyaSSL_BIO_write -#define BIO_push CyaSSL_BIO_push -#define BIO_pop CyaSSL_BIO_pop -#define BIO_flush CyaSSL_BIO_flush -#define BIO_pending CyaSSL_BIO_pending - -#define BIO_get_mem_data CyaSSL_BIO_get_mem_data -#define BIO_new_mem_buf CyaSSL_BIO_new_mem_buf - -#define BIO_f_buffer CyaSSL_BIO_f_buffer -#define BIO_set_write_buffer_size CyaSSL_BIO_set_write_buffer_size -#define BIO_f_ssl CyaSSL_BIO_f_ssl -#define BIO_new_socket CyaSSL_BIO_new_socket -#define SSL_set_bio CyaSSL_set_bio -#define BIO_eof CyaSSL_BIO_eof -#define BIO_set_ss CyaSSL_BIO_set_ss - -#define BIO_s_mem CyaSSL_BIO_s_mem -#define BIO_f_base64 CyaSSL_BIO_f_base64 -#define BIO_set_flags CyaSSL_BIO_set_flags - -#define OpenSSL_add_all_algorithms CyaSSL_add_all_algorithms -#define SSLeay_add_ssl_algorithms CyaSSL_add_all_algorithms -#define SSLeay_add_all_algorithms CyaSSL_add_all_algorithms - -#define RAND_screen CyaSSL_RAND_screen -#define RAND_file_name CyaSSL_RAND_file_name -#define RAND_write_file CyaSSL_RAND_write_file -#define RAND_load_file CyaSSL_RAND_load_file -#define RAND_egd CyaSSL_RAND_egd -#define RAND_seed CyaSSL_RAND_seed -#define RAND_add CyaSSL_RAND_add - -#define COMP_zlib CyaSSL_COMP_zlib -#define COMP_rle CyaSSL_COMP_rle -#define SSL_COMP_add_compression_method CyaSSL_COMP_add_compression_method - -#define SSL_get_ex_new_index CyaSSL_get_ex_new_index - -#define CRYPTO_set_id_callback CyaSSL_set_id_callback -#define CRYPTO_set_locking_callback CyaSSL_set_locking_callback -#define CRYPTO_set_dynlock_create_callback CyaSSL_set_dynlock_create_callback -#define CRYPTO_set_dynlock_lock_callback CyaSSL_set_dynlock_lock_callback -#define CRYPTO_set_dynlock_destroy_callback CyaSSL_set_dynlock_destroy_callback -#define CRYPTO_num_locks CyaSSL_num_locks - -#define X509_STORE_CTX_get_current_cert CyaSSL_X509_STORE_CTX_get_current_cert -#define X509_STORE_CTX_get_error CyaSSL_X509_STORE_CTX_get_error -#define X509_STORE_CTX_get_error_depth CyaSSL_X509_STORE_CTX_get_error_depth - -#define X509_NAME_oneline CyaSSL_X509_NAME_oneline -#define X509_get_issuer_name CyaSSL_X509_get_issuer_name -#define X509_get_subject_name CyaSSL_X509_get_subject_name -#define X509_verify_cert_error_string CyaSSL_X509_verify_cert_error_string - -#define X509_LOOKUP_add_dir CyaSSL_X509_LOOKUP_add_dir -#define X509_LOOKUP_load_file CyaSSL_X509_LOOKUP_load_file -#define X509_LOOKUP_hash_dir CyaSSL_X509_LOOKUP_hash_dir -#define X509_LOOKUP_file CyaSSL_X509_LOOKUP_file - -#define X509_STORE_add_lookup CyaSSL_X509_STORE_add_lookup -#define X509_STORE_new CyaSSL_X509_STORE_new -#define X509_STORE_get_by_subject CyaSSL_X509_STORE_get_by_subject -#define X509_STORE_CTX_init CyaSSL_X509_STORE_CTX_init -#define X509_STORE_CTX_cleanup CyaSSL_X509_STORE_CTX_cleanup - -#define X509_CRL_get_lastUpdate CyaSSL_X509_CRL_get_lastUpdate -#define X509_CRL_get_nextUpdate CyaSSL_X509_CRL_get_nextUpdate - -#define X509_get_pubkey CyaSSL_X509_get_pubkey -#define X509_CRL_verify CyaSSL_X509_CRL_verify -#define X509_STORE_CTX_set_error CyaSSL_X509_STORE_CTX_set_error -#define X509_OBJECT_free_contents CyaSSL_X509_OBJECT_free_contents -#define EVP_PKEY_free CyaSSL_EVP_PKEY_free -#define X509_cmp_current_time CyaSSL_X509_cmp_current_time -#define sk_X509_REVOKED_num CyaSSL_sk_X509_REVOKED_num -#define X509_CRL_get_REVOKED CyaSSL_X509_CRL_get_REVOKED -#define sk_X509_REVOKED_value CyaSSL_sk_X509_REVOKED_value - -#define X509_get_serialNumber CyaSSL_X509_get_serialNumber - -#define ASN1_TIME_pr CyaSSL_ASN1_TIME_pr - -#define ASN1_INTEGER_cmp CyaSSL_ASN1_INTEGER_cmp -#define ASN1_INTEGER_get CyaSSL_ASN1_INTEGER_get - -#define SSL_load_client_CA_file CyaSSL_load_client_CA_file - -#define SSL_CTX_set_client_CA_list CyaSSL_CTX_set_client_CA_list -#define X509_STORE_CTX_get_ex_data CyaSSL_X509_STORE_CTX_get_ex_data -#define SSL_get_ex_data_X509_STORE_CTX_idx CyaSSL_get_ex_data_X509_STORE_CTX_idx -#define SSL_get_ex_data CyaSSL_get_ex_data - -#define SSL_CTX_set_default_passwd_cb_userdata CyaSSL_CTX_set_default_passwd_cb_userdata -#define SSL_CTX_set_default_passwd_cb CyaSSL_CTX_set_default_passwd_cb - -#define SSL_CTX_set_timeout CyaSSL_CTX_set_timeout -#define SSL_CTX_set_info_callback CyaSSL_CTX_set_info_callback - -#define ERR_peek_error CyaSSL_ERR_peek_error -#define ERR_GET_REASON CyaSSL_ERR_GET_REASON - -#define SSL_alert_type_string CyaSSL_alert_type_string -#define SSL_alert_desc_string CyaSSL_alert_desc_string -#define SSL_state_string CyaSSL_state_string - -#define RSA_free CyaSSL_RSA_free -#define RSA_generate_key CyaSSL_RSA_generate_key -#define SSL_CTX_set_tmp_rsa_callback CyaSSL_CTX_set_tmp_rsa_callback - -#define PEM_def_callback CyaSSL_PEM_def_callback - -#define SSL_CTX_sess_accept CyaSSL_CTX_sess_accept -#define SSL_CTX_sess_connect CyaSSL_CTX_sess_connect -#define SSL_CTX_sess_accept_good CyaSSL_CTX_sess_accept_good -#define SSL_CTX_sess_connect_good CyaSSL_CTX_sess_connect_good -#define SSL_CTX_sess_accept_renegotiate CyaSSL_CTX_sess_accept_renegotiate -#define SSL_CTX_sess_connect_renegotiate CyaSSL_CTX_sess_connect_renegotiate -#define SSL_CTX_sess_hits CyaSSL_CTX_sess_hits -#define SSL_CTX_sess_cb_hits CyaSSL_CTX_sess_cb_hits -#define SSL_CTX_sess_cache_full CyaSSL_CTX_sess_cache_full -#define SSL_CTX_sess_misses CyaSSL_CTX_sess_misses -#define SSL_CTX_sess_timeouts CyaSSL_CTX_sess_timeouts -#define SSL_CTX_sess_number CyaSSL_CTX_sess_number -#define SSL_CTX_sess_get_cache_size CyaSSL_CTX_sess_get_cache_size - - -#define SSL_DEFAULT_CIPHER_LIST CYASSL_DEFAULT_CIPHER_LIST -#define RSA_F4 CYASSL_RSA_F4 - -#define SSL_CTX_set_psk_client_callback CyaSSL_CTX_set_psk_client_callback -#define SSL_set_psk_client_callback CyaSSL_set_psk_client_callback - -#define SSL_get_psk_identity_hint CyaSSL_get_psk_identity_hint -#define SSL_get_psk_identity CyaSSL_get_psk_identity - -#define SSL_CTX_use_psk_identity_hint CyaSSL_CTX_use_psk_identity_hint -#define SSL_use_psk_identity_hint CyaSSL_use_psk_identity_hint - -#define SSL_CTX_set_psk_server_callback CyaSSL_CTX_set_psk_server_callback -#define SSL_set_psk_server_callback CyaSSL_set_psk_server_callback - -#define ERR_get_error_line_data CyaSSL_ERR_get_error_line_data - -#define ERR_get_error CyaSSL_ERR_get_error -#define ERR_clear_error CyaSSL_ERR_clear_error - -#define RAND_status CyaSSL_RAND_status -#define RAND_bytes CyaSSL_RAND_bytes -#define SSLv23_server_method CyaSSLv23_server_method -#define SSL_CTX_set_options CyaSSL_CTX_set_options -#define SSL_CTX_check_private_key CyaSSL_CTX_check_private_key - -#define ERR_free_strings CyaSSL_ERR_free_strings -#define ERR_remove_state CyaSSL_ERR_remove_state -#define EVP_cleanup CyaSSL_EVP_cleanup - -#define CRYPTO_cleanup_all_ex_data CyaSSL_cleanup_all_ex_data -#define SSL_CTX_set_mode CyaSSL_CTX_set_mode -#define SSL_CTX_get_mode CyaSSL_CTX_get_mode -#define SSL_CTX_set_default_read_ahead CyaSSL_CTX_set_default_read_ahead - -#define SSL_CTX_sess_set_cache_size CyaSSL_CTX_sess_set_cache_size -#define SSL_CTX_set_default_verify_paths CyaSSL_CTX_set_default_verify_paths - -#define SSL_CTX_set_session_id_context CyaSSL_CTX_set_session_id_context -#define SSL_get_peer_certificate CyaSSL_get_peer_certificate - -#define SSL_want_read CyaSSL_want_read -#define SSL_want_write CyaSSL_want_write - -#define BIO_prf CyaSSL_BIO_prf -#define ASN1_UTCTIME_pr CyaSSL_ASN1_UTCTIME_pr - -#define sk_num CyaSSL_sk_num -#define sk_value CyaSSL_sk_value - -#define SSL_CTX_get_ex_data CyaSSL_CTX_get_ex_data -#define SSL_CTX_set_ex_data CyaSSL_CTX_set_ex_data -#define SSL_CTX_sess_set_get_cb CyaSSL_CTX_sess_set_get_cb -#define SSL_CTX_sess_set_new_cb CyaSSL_CTX_sess_set_new_cb -#define SSL_CTX_sess_set_remove_cb CyaSSL_CTX_sess_set_remove_cb - -#define i2d_SSL_SESSION CyaSSL_i2d_SSL_SESSION -#define d2i_SSL_SESSION CyaSSL_d2i_SSL_SESSION -#define SSL_SESSION_get_timeout CyaSSL_SESSION_get_timeout -#define SSL_SESSION_get_time CyaSSL_SESSION_get_time -#define SSL_CTX_get_ex_new_index CyaSSL_CTX_get_ex_new_index - - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CyaSSL_openssl_h__ */ diff --git a/project1/cyassl-3.0.0/cyassl/openssl/stack.h b/project1/cyassl-3.0.0/cyassl/openssl/stack.h deleted file mode 100644 index 374c1fcd..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/stack.h +++ /dev/null @@ -1,2 +0,0 @@ -/* stack.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/ui.h b/project1/cyassl-3.0.0/cyassl/openssl/ui.h deleted file mode 100644 index a2539303..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/ui.h +++ /dev/null @@ -1,2 +0,0 @@ -/* ui.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/openssl/x509.h b/project1/cyassl-3.0.0/cyassl/openssl/x509.h deleted file mode 100644 index 645b3b5f..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/x509.h +++ /dev/null @@ -1,3 +0,0 @@ -/* x509.h for openssl */ - -#include diff --git a/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h b/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h deleted file mode 100644 index 77828a33..00000000 --- a/project1/cyassl-3.0.0/cyassl/openssl/x509v3.h +++ /dev/null @@ -1,2 +0,0 @@ -/* x509v3.h for openssl */ - diff --git a/project1/cyassl-3.0.0/cyassl/options.h b/project1/cyassl-3.0.0/cyassl/options.h deleted file mode 100644 index cb523801..00000000 --- a/project1/cyassl-3.0.0/cyassl/options.h +++ /dev/null @@ -1,53 +0,0 @@ -/* cyassl options.h - * generated from configure options - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#undef CYASSL_DTLS -#define CYASSL_DTLS - -#undef _POSIX_THREADS -#define _POSIX_THREADS - -#undef HAVE_THREAD_LS -#define HAVE_THREAD_LS - -#undef NDEBUG -#define NDEBUG - -#undef NO_DSA -#define NO_DSA - -#undef NO_PSK -#define NO_PSK - -#undef NO_MD4 -#define NO_MD4 - -#undef NO_PWDBASED -#define NO_PWDBASED - -#undef NO_HC128 -#define NO_HC128 - -#undef NO_RABBIT -#define NO_RABBIT - -#undef CYASSL_SMALL_STACK -#define CYASSL_SMALL_STACK - - -#ifdef __cplusplus -} -#endif - diff --git a/project1/cyassl-3.0.0/cyassl/options.h.in b/project1/cyassl-3.0.0/cyassl/options.h.in deleted file mode 100644 index 0030ecdf..00000000 --- a/project1/cyassl-3.0.0/cyassl/options.h.in +++ /dev/null @@ -1,34 +0,0 @@ -/* options.h.in - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -/* default blank options for autoconf */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} -#endif - diff --git a/project1/cyassl-3.0.0/cyassl/sniffer.h b/project1/cyassl-3.0.0/cyassl/sniffer.h deleted file mode 100644 index a1d0e966..00000000 --- a/project1/cyassl-3.0.0/cyassl/sniffer.h +++ /dev/null @@ -1,74 +0,0 @@ -/* sniffer.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_SNIFFER_H -#define CYASSL_SNIFFER_H - -#include - -#ifdef _WIN32 - #ifdef SSL_SNIFFER_EXPORTS - #define SSL_SNIFFER_API __declspec(dllexport) - #else - #define SSL_SNIFFER_API __declspec(dllimport) - #endif -#else - #define SSL_SNIFFER_API -#endif /* _WIN32 */ - - -#ifdef __cplusplus - extern "C" { -#endif - - -CYASSL_API -SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port, - const char* keyFile, int keyType, - const char* password, char* error); - -CYASSL_API -SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length, - unsigned char* data, char* error); - -CYASSL_API -SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error); - - -CYASSL_API void ssl_InitSniffer(void); - -CYASSL_API void ssl_FreeSniffer(void); - - -/* ssl_SetPrivateKey keyTypes */ -enum { - FILETYPE_PEM = 1, - FILETYPE_DER = 2, -}; - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CyaSSL_SNIFFER_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/sniffer_error.h b/project1/cyassl-3.0.0/cyassl/sniffer_error.h deleted file mode 100644 index c588a568..00000000 --- a/project1/cyassl-3.0.0/cyassl/sniffer_error.h +++ /dev/null @@ -1,110 +0,0 @@ -/* sniffer_error.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifndef CYASSL_SNIFFER_ERROR_H -#define CYASSL_SNIFFER_ERROR_H - -/* need to have errors as #defines since .rc files can't handle enums */ -/* need to start at 1 and go in order for same reason */ - -#define MEMORY_STR 1 -#define NEW_SERVER_STR 2 -#define IP_CHECK_STR 3 -#define SERVER_NOT_REG_STR 4 -#define TCP_CHECK_STR 5 -#define SERVER_PORT_NOT_REG_STR 6 -#define RSA_DECRYPT_STR 7 -#define RSA_DECODE_STR 8 -#define BAD_CIPHER_SPEC_STR 9 -#define SERVER_HELLO_INPUT_STR 10 - -#define BAD_SESSION_RESUME_STR 11 -#define SERVER_DID_RESUMPTION_STR 12 -#define CLIENT_HELLO_INPUT_STR 13 -#define CLIENT_RESUME_TRY_STR 14 -#define HANDSHAKE_INPUT_STR 15 -#define GOT_HELLO_VERIFY_STR 16 -#define GOT_SERVER_HELLO_STR 17 -#define GOT_CERT_REQ_STR 18 -#define GOT_SERVER_KEY_EX_STR 19 -#define GOT_CERT_STR 20 - -#define GOT_SERVER_HELLO_DONE_STR 21 -#define GOT_FINISHED_STR 22 -#define GOT_CLIENT_HELLO_STR 23 -#define GOT_CLIENT_KEY_EX_STR 24 -#define GOT_CERT_VER_STR 25 -#define GOT_UNKNOWN_HANDSHAKE_STR 26 -#define NEW_SESSION_STR 27 -#define BAD_NEW_SSL_STR 28 -#define GOT_PACKET_STR 29 -#define NO_DATA_STR 30 - -#define BAD_SESSION_STR 31 -#define GOT_OLD_CLIENT_HELLO_STR 32 -#define OLD_CLIENT_INPUT_STR 33 -#define OLD_CLIENT_OK_STR 34 -#define BAD_OLD_CLIENT_STR 35 -#define BAD_RECORD_HDR_STR 36 -#define RECORD_INPUT_STR 37 -#define GOT_HANDSHAKE_STR 38 -#define BAD_HANDSHAKE_STR 39 -#define GOT_CHANGE_CIPHER_STR 40 - -#define GOT_APP_DATA_STR 41 -#define BAD_APP_DATA_STR 42 -#define GOT_ALERT_STR 43 -#define ANOTHER_MSG_STR 44 -#define REMOVE_SESSION_STR 45 -#define KEY_FILE_STR 46 -#define BAD_IPVER_STR 47 -#define BAD_PROTO_STR 48 -#define PACKET_HDR_SHORT_STR 49 -#define GOT_UNKNOWN_RECORD_STR 50 - -#define BAD_TRACE_FILE_STR 51 -#define FATAL_ERROR_STR 52 -#define PARTIAL_INPUT_STR 53 -#define BUFFER_ERROR_STR 54 -#define PARTIAL_ADD_STR 55 -#define DUPLICATE_STR 56 -#define OUT_OF_ORDER_STR 57 -#define OVERLAP_DUPLICATE_STR 58 -#define OVERLAP_REASSEMBLY_BEGIN_STR 59 -#define OVERLAP_REASSEMBLY_END_STR 60 - -#define MISSED_CLIENT_HELLO_STR 61 -#define GOT_HELLO_REQUEST_STR 62 -#define GOT_SESSION_TICKET_STR 63 -#define BAD_INPUT_STR 64 -#define BAD_DECRYPT_TYPE 65 -#define BAD_FINISHED_MSG 66 -#define BAD_COMPRESSION_STR 67 -#define BAD_DERIVE_STR 68 -#define ACK_MISSED_STR 69 -#define BAD_DECRYPT 70 - -/* !!!! also add to msgTable in sniffer.c and .rc file !!!! */ - - -#endif /* CyaSSL_SNIFFER_ERROR_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/sniffer_error.rc b/project1/cyassl-3.0.0/cyassl/sniffer_error.rc deleted file mode 100644 index 516f7aa1..00000000 --- a/project1/cyassl-3.0.0/cyassl/sniffer_error.rc +++ /dev/null @@ -1,88 +0,0 @@ - -STRINGTABLE -{ - 1, "Out of Memory" - 2, "New SSL Sniffer Server Registered" - 3, "Checking IP Header" - 4, "SSL Sniffer Server Not Registered" - 5, "Checking TCP Header" - - 6, "SSL Sniffer Server Port Not Registered" - 7, "RSA Private Decrypt Error" - 8, "RSA Private Decode Error" - 9, "Set Cipher Spec Error" - 10, "Server Hello Input Malformed" - - 11, "Couldn't Resume Session Error" - 12, "Server Did Resumption" - 13, "Client Hello Input Malformed" - 14, "Client Trying to Resume" - 15, "Handshake Input Malformed" - - 16, "Got Hello Verify msg" - 17, "Got Server Hello msg" - 18, "Got Cert Request msg" - 19, "Got Server Key Exchange msg" - 20, "Got Cert msg" - - 21, "Got Server Hello Done msg" - 22, "Got Finished msg" - 23, "Got Client Hello msg" - 24, "Got Client Key Exchange msg" - 25, "Got Cert Verify msg" - - 26, "Got Unknown Handshake msg" - 27, "New SSL Sniffer Session created" - 28, "Couldn't create new SSL" - 29, "Got a Packet to decode" - 30, "No data present" - - 31, "Session Not Found" - 32, "Got an Old Client Hello msg" - 33, "Old Client Hello Input Malformed" - 34, "Old Client Hello OK" - 35, "Bad Old Client Hello" - - 36, "Bad Record Header" - 37, "Record Header Input Malformed" - 38, "Got a HandShake msg" - 39, "Bad HandShake msg" - 40, "Got a Change Cipher Spec msg" - - 41, "Got Application Data msg" - 42, "Bad Application Data" - 43, "Got an Alert msg" - 44, "Another msg to Process" - 45, "Removing Session From Table" - - 46, "Bad Key File" - 47, "Wrong IP Version" - 48, "Wrong Protocol type" - 49, "Packet Short for header processing" - 50, "Got Unknown Record Type" - - 51, "Can't Open Trace File" - 52, "Session in Fatal Error State" - 53, "Partial SSL record received" - 54, "Buffer Error, malformed input" - 55, "Added to Partial Input" - - 56, "Received a Duplicate Packet" - 57, "Received an Out of Order Packet" - 58, "Received an Overlap Duplicate Packet" - 59, "Received an Overlap Reassembly Begin Duplicate Packet" - 60, "Received an Overlap Reassembly End Duplicate Packet" - - 61, "Missed the Client Hello Entirely" - 62, "Got Hello Request msg" - 63, "Got Session Ticket msg" - 64, "Bad Input" - 65, "Bad Decrypt Type" - - 66, "Bad Finished Message Processing" - 67, "Bad Compression Type" - 68, "Bad DeriveKeys Error" - 69, "Saw ACK for Missing Packet Error" - 70, "Bad Decrypt Operation" -} - diff --git a/project1/cyassl-3.0.0/cyassl/ssl.h b/project1/cyassl-3.0.0/cyassl/ssl.h deleted file mode 100644 index c6ffb273..00000000 --- a/project1/cyassl-3.0.0/cyassl/ssl.h +++ /dev/null @@ -1,1304 +0,0 @@ -/* ssl.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* CyaSSL API */ - -#ifndef CYASSL_SSL_H -#define CYASSL_SSL_H - - -/* for users not using preprocessor flags*/ -#include -#include - - -#ifndef NO_FILESYSTEM - #ifdef FREESCALE_MQX - #include - #else - #include /* ERR_printf */ - #endif -#endif - -#ifdef YASSL_PREFIX - #include "prefix_ssl.h" -#endif - -#ifdef LIBCYASSL_VERSION_STRING - #define CYASSL_VERSION LIBCYASSL_VERSION_STRING -#endif - -#ifdef _WIN32 - /* wincrypt.h clashes */ - #undef OCSP_REQUEST - #undef OCSP_RESPONSE -#endif - - - -#ifdef __cplusplus - extern "C" { -#endif - -typedef struct CYASSL CYASSL; -typedef struct CYASSL_SESSION CYASSL_SESSION; -typedef struct CYASSL_METHOD CYASSL_METHOD; -typedef struct CYASSL_CTX CYASSL_CTX; - -typedef struct CYASSL_X509 CYASSL_X509; -typedef struct CYASSL_X509_NAME CYASSL_X509_NAME; -typedef struct CYASSL_X509_CHAIN CYASSL_X509_CHAIN; - -typedef struct CYASSL_CERT_MANAGER CYASSL_CERT_MANAGER; -typedef struct CYASSL_SOCKADDR CYASSL_SOCKADDR; - -/* redeclare guard */ -#define CYASSL_TYPES_DEFINED - - -typedef struct CYASSL_RSA CYASSL_RSA; -typedef struct CYASSL_DSA CYASSL_DSA; -typedef struct CYASSL_CIPHER CYASSL_CIPHER; -typedef struct CYASSL_X509_LOOKUP CYASSL_X509_LOOKUP; -typedef struct CYASSL_X509_LOOKUP_METHOD CYASSL_X509_LOOKUP_METHOD; -typedef struct CYASSL_X509_CRL CYASSL_X509_CRL; -typedef struct CYASSL_BIO CYASSL_BIO; -typedef struct CYASSL_BIO_METHOD CYASSL_BIO_METHOD; -typedef struct CYASSL_X509_EXTENSION CYASSL_X509_EXTENSION; -typedef struct CYASSL_ASN1_TIME CYASSL_ASN1_TIME; -typedef struct CYASSL_ASN1_INTEGER CYASSL_ASN1_INTEGER; -typedef struct CYASSL_ASN1_OBJECT CYASSL_ASN1_OBJECT; -typedef struct CYASSL_ASN1_STRING CYASSL_ASN1_STRING; -typedef struct CYASSL_dynlock_value CYASSL_dynlock_value; - -#define CYASSL_ASN1_UTCTIME CYASSL_ASN1_TIME - -typedef struct CYASSL_EVP_PKEY { - int type; /* openssh dereference */ - int save_type; /* openssh dereference */ - int pkey_sz; - union { - char* ptr; - } pkey; - #ifdef HAVE_ECC - int pkey_curve; - #endif -} CYASSL_EVP_PKEY; - -typedef struct CYASSL_MD4_CTX { - int buffer[32]; /* big enough to hold, check size in Init */ -} CYASSL_MD4_CTX; - - -typedef struct CYASSL_COMP_METHOD { - int type; /* stunnel dereference */ -} CYASSL_COMP_METHOD; - - -typedef struct CYASSL_X509_STORE { - int cache; /* stunnel dereference */ - CYASSL_CERT_MANAGER* cm; -} CYASSL_X509_STORE; - -typedef struct CYASSL_ALERT { - int code; - int level; -} CYASSL_ALERT; - -typedef struct CYASSL_ALERT_HISTORY { - CYASSL_ALERT last_rx; - CYASSL_ALERT last_tx; -} CYASSL_ALERT_HISTORY; - -typedef struct CYASSL_X509_REVOKED { - CYASSL_ASN1_INTEGER* serialNumber; /* stunnel dereference */ -} CYASSL_X509_REVOKED; - - -typedef struct CYASSL_X509_OBJECT { - union { - char* ptr; - CYASSL_X509_CRL* crl; /* stunnel dereference */ - } data; -} CYASSL_X509_OBJECT; - - -typedef struct CYASSL_X509_STORE_CTX { - CYASSL_X509_STORE* store; /* Store full of a CA cert chain */ - CYASSL_X509* current_cert; /* stunnel dereference */ - char* domain; /* subject CN domain name */ - void* ex_data; /* external data, for fortress build */ - void* userCtx; /* user ctx */ - int error; /* current error */ - int error_depth; /* cert depth for this error */ - int discardSessionCerts; /* so verify callback can flag for discard */ -} CYASSL_X509_STORE_CTX; - - -/* Valid Alert types from page 16/17 */ -enum AlertDescription { - close_notify = 0, - unexpected_message = 10, - bad_record_mac = 20, - decompression_failure = 30, - handshake_failure = 40, - no_certificate = 41, - bad_certificate = 42, - unsupported_certificate = 43, - certificate_revoked = 44, - certificate_expired = 45, - certificate_unknown = 46, - illegal_parameter = 47, - decrypt_error = 51, - protocol_version = 70, - no_renegotiation = 100, - unrecognized_name = 112 -}; - - -enum AlertLevel { - alert_warning = 1, - alert_fatal = 2 -}; - - -CYASSL_API CYASSL_METHOD *CyaSSLv3_server_method(void); -CYASSL_API CYASSL_METHOD *CyaSSLv3_client_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_server_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_client_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_1_server_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_1_client_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_2_server_method(void); -CYASSL_API CYASSL_METHOD *CyaTLSv1_2_client_method(void); - -#ifdef CYASSL_DTLS - CYASSL_API CYASSL_METHOD *CyaDTLSv1_client_method(void); - CYASSL_API CYASSL_METHOD *CyaDTLSv1_server_method(void); - CYASSL_API CYASSL_METHOD *CyaDTLSv1_2_client_method(void); - CYASSL_API CYASSL_METHOD *CyaDTLSv1_2_server_method(void); -#endif - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - -CYASSL_API int CyaSSL_CTX_use_certificate_file(CYASSL_CTX*, const char*, int); -CYASSL_API int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX*, const char*, int); -CYASSL_API int CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, - const char*); -CYASSL_API int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX *, - const char *file); -CYASSL_API int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX*, const char*, int); - -CYASSL_API int CyaSSL_use_certificate_file(CYASSL*, const char*, int); -CYASSL_API int CyaSSL_use_PrivateKey_file(CYASSL*, const char*, int); -CYASSL_API int CyaSSL_use_certificate_chain_file(CYASSL*, const char *file); -CYASSL_API int CyaSSL_use_RSAPrivateKey_file(CYASSL*, const char*, int); - -#ifdef CYASSL_DER_LOAD - CYASSL_API int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX*, - const char*, int); -#endif - -#ifdef HAVE_NTRU - CYASSL_API int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX*, const char*); - /* load NTRU private key blob */ -#endif - -CYASSL_API int CyaSSL_PemCertToDer(const char*, unsigned char*, int); - -#endif /* !NO_FILESYSTEM && !NO_CERTS */ - -CYASSL_API CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD*); -CYASSL_API CYASSL* CyaSSL_new(CYASSL_CTX*); -CYASSL_API int CyaSSL_set_fd (CYASSL*, int); -CYASSL_API int CyaSSL_get_fd(const CYASSL*); -CYASSL_API void CyaSSL_set_using_nonblock(CYASSL*, int); -CYASSL_API int CyaSSL_get_using_nonblock(CYASSL*); -CYASSL_API int CyaSSL_connect(CYASSL*); /* please see note at top of README - if you get an error from connect */ -CYASSL_API int CyaSSL_write(CYASSL*, const void*, int); -CYASSL_API int CyaSSL_read(CYASSL*, void*, int); -CYASSL_API int CyaSSL_peek(CYASSL*, void*, int); -CYASSL_API int CyaSSL_accept(CYASSL*); -CYASSL_API void CyaSSL_CTX_free(CYASSL_CTX*); -CYASSL_API void CyaSSL_free(CYASSL*); -CYASSL_API int CyaSSL_shutdown(CYASSL*); -CYASSL_API int CyaSSL_send(CYASSL*, const void*, int sz, int flags); -CYASSL_API int CyaSSL_recv(CYASSL*, void*, int sz, int flags); - -CYASSL_API void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX*, int); -CYASSL_API void CyaSSL_set_quiet_shutdown(CYASSL*, int); - -CYASSL_API int CyaSSL_get_error(CYASSL*, int); -CYASSL_API int CyaSSL_get_alert_history(CYASSL*, CYASSL_ALERT_HISTORY *); - -CYASSL_API int CyaSSL_set_session(CYASSL* ssl,CYASSL_SESSION* session); -CYASSL_API CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl); -CYASSL_API void CyaSSL_flush_sessions(CYASSL_CTX *ctx, long tm); -CYASSL_API int CyaSSL_SetServerID(CYASSL* ssl, const unsigned char*, - int, int); - -#ifdef SESSION_INDEX -CYASSL_API int CyaSSL_GetSessionIndex(CYASSL* ssl); -CYASSL_API int CyaSSL_GetSessionAtIndex(int index, CYASSL_SESSION* session); -#endif /* SESSION_INDEX */ - -#if defined(SESSION_INDEX) && defined(SESSION_CERTS) -CYASSL_API - CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session); -#endif /* SESSION_INDEX && SESSION_CERTS */ - -typedef int (*VerifyCallback)(int, CYASSL_X509_STORE_CTX*); -typedef int (*pem_password_cb)(char*, int, int, void*); - -CYASSL_API void CyaSSL_CTX_set_verify(CYASSL_CTX*, int, - VerifyCallback verify_callback); -CYASSL_API void CyaSSL_set_verify(CYASSL*, int, VerifyCallback verify_callback); -CYASSL_API void CyaSSL_SetCertCbCtx(CYASSL*, void*); - -CYASSL_API int CyaSSL_pending(CYASSL*); - -CYASSL_API void CyaSSL_load_error_strings(void); -CYASSL_API int CyaSSL_library_init(void); -CYASSL_API long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX*, long); - -/* session cache persistence */ -CYASSL_API int CyaSSL_save_session_cache(const char*); -CYASSL_API int CyaSSL_restore_session_cache(const char*); -CYASSL_API int CyaSSL_memsave_session_cache(void*, int); -CYASSL_API int CyaSSL_memrestore_session_cache(const void*, int); -CYASSL_API int CyaSSL_get_session_cache_memsize(void); - -/* certificate cache persistence, uses ctx since certs are per ctx */ -CYASSL_API int CyaSSL_CTX_save_cert_cache(CYASSL_CTX*, const char*); -CYASSL_API int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX*, const char*); -CYASSL_API int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX*, void*, int, int*); -CYASSL_API int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX*, const void*, int); -CYASSL_API int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX*); - -/* only supports full name from cipher_name[] delimited by : */ -CYASSL_API int CyaSSL_CTX_set_cipher_list(CYASSL_CTX*, const char*); -CYASSL_API int CyaSSL_set_cipher_list(CYASSL*, const char*); - -/* Nonblocking DTLS helper functions */ -CYASSL_API int CyaSSL_dtls_get_current_timeout(CYASSL* ssl); -CYASSL_API int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int); -CYASSL_API int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int); -CYASSL_API int CyaSSL_dtls_got_timeout(CYASSL* ssl); -CYASSL_API int CyaSSL_dtls(CYASSL* ssl); - -CYASSL_API int CyaSSL_dtls_set_peer(CYASSL*, void*, unsigned int); -CYASSL_API int CyaSSL_dtls_get_peer(CYASSL*, void*, unsigned int*); - -CYASSL_API int CyaSSL_ERR_GET_REASON(int err); -CYASSL_API char* CyaSSL_ERR_error_string(unsigned long,char*); -CYASSL_API void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, - unsigned long sz); - -/* extras */ - -#define STACK_OF(x) x - -CYASSL_API int CyaSSL_set_ex_data(CYASSL*, int, void*); -CYASSL_API int CyaSSL_get_shutdown(const CYASSL*); -CYASSL_API int CyaSSL_set_rfd(CYASSL*, int); -CYASSL_API int CyaSSL_set_wfd(CYASSL*, int); -CYASSL_API void CyaSSL_set_shutdown(CYASSL*, int); -CYASSL_API int CyaSSL_set_session_id_context(CYASSL*, const unsigned char*, - unsigned int); -CYASSL_API void CyaSSL_set_connect_state(CYASSL*); -CYASSL_API void CyaSSL_set_accept_state(CYASSL*); -CYASSL_API int CyaSSL_session_reused(CYASSL*); -CYASSL_API void CyaSSL_SESSION_free(CYASSL_SESSION* session); -CYASSL_API int CyaSSL_is_init_finished(CYASSL*); - -CYASSL_API const char* CyaSSL_get_version(CYASSL*); -CYASSL_API int CyaSSL_get_current_cipher_suite(CYASSL* ssl); -CYASSL_API CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL*); -CYASSL_API char* CyaSSL_CIPHER_description(CYASSL_CIPHER*, char*, int); -CYASSL_API const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher); -CYASSL_API const char* CyaSSL_get_cipher(CYASSL*); -CYASSL_API CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl); - /* what's ref count */ - -CYASSL_API void CyaSSL_X509_free(CYASSL_X509*); -CYASSL_API void CyaSSL_OPENSSL_free(void*); - -CYASSL_API int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, - char** path, int* ssl); - -CYASSL_API CYASSL_METHOD* CyaSSLv23_client_method(void); -CYASSL_API CYASSL_METHOD* CyaSSLv2_client_method(void); -CYASSL_API CYASSL_METHOD* CyaSSLv2_server_method(void); - -CYASSL_API void CyaSSL_MD4_Init(CYASSL_MD4_CTX*); -CYASSL_API void CyaSSL_MD4_Update(CYASSL_MD4_CTX*, const void*, unsigned long); -CYASSL_API void CyaSSL_MD4_Final(unsigned char*, CYASSL_MD4_CTX*); - - -CYASSL_API CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD*); -CYASSL_API int CyaSSL_BIO_free(CYASSL_BIO*); -CYASSL_API int CyaSSL_BIO_free_all(CYASSL_BIO*); -CYASSL_API int CyaSSL_BIO_read(CYASSL_BIO*, void*, int); -CYASSL_API int CyaSSL_BIO_write(CYASSL_BIO*, const void*, int); -CYASSL_API CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO*, CYASSL_BIO* append); -CYASSL_API CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO*); -CYASSL_API int CyaSSL_BIO_flush(CYASSL_BIO*); -CYASSL_API int CyaSSL_BIO_pending(CYASSL_BIO*); - -CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void); -CYASSL_API long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO*, long size); -CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void); -CYASSL_API CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int flag); -CYASSL_API int CyaSSL_BIO_eof(CYASSL_BIO*); - -CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void); -CYASSL_API CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void); -CYASSL_API void CyaSSL_BIO_set_flags(CYASSL_BIO*, int); - -CYASSL_API int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio,const unsigned char** p); -CYASSL_API CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len); - - -CYASSL_API long CyaSSL_BIO_set_ssl(CYASSL_BIO*, CYASSL*, int flag); -CYASSL_API void CyaSSL_set_bio(CYASSL*, CYASSL_BIO* rd, CYASSL_BIO* wr); - -CYASSL_API int CyaSSL_add_all_algorithms(void); - -CYASSL_API void CyaSSL_RAND_screen(void); -CYASSL_API const char* CyaSSL_RAND_file_name(char*, unsigned long); -CYASSL_API int CyaSSL_RAND_write_file(const char*); -CYASSL_API int CyaSSL_RAND_load_file(const char*, long); -CYASSL_API int CyaSSL_RAND_egd(const char*); -CYASSL_API int CyaSSL_RAND_seed(const void*, int); -CYASSL_API void CyaSSL_RAND_add(const void*, int, double); - -CYASSL_API CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void); -CYASSL_API CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void); -CYASSL_API int CyaSSL_COMP_add_compression_method(int, void*); - -CYASSL_API int CyaSSL_get_ex_new_index(long, void*, void*, void*, void*); - -CYASSL_API void CyaSSL_set_id_callback(unsigned long (*f)(void)); -CYASSL_API void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, - int)); -CYASSL_API void CyaSSL_set_dynlock_create_callback(CYASSL_dynlock_value* (*f) - (const char*, int)); -CYASSL_API void CyaSSL_set_dynlock_lock_callback(void (*f)(int, - CYASSL_dynlock_value*, const char*, int)); -CYASSL_API void CyaSSL_set_dynlock_destroy_callback(void (*f) - (CYASSL_dynlock_value*, const char*, int)); -CYASSL_API int CyaSSL_num_locks(void); - -CYASSL_API CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert( - CYASSL_X509_STORE_CTX*); -CYASSL_API int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX*); -CYASSL_API int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX*); - -CYASSL_API char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME*, char*, int); -CYASSL_API CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509*); -CYASSL_API CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509*); -CYASSL_API int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509*, int); -CYASSL_API int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509*, int); -CYASSL_API int CyaSSL_X509_get_isCA(CYASSL_X509*); -CYASSL_API int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509*); -CYASSL_API unsigned int CyaSSL_X509_get_pathLength(CYASSL_X509*); -CYASSL_API unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509*); -CYASSL_API unsigned char* CyaSSL_X509_get_authorityKeyID( - CYASSL_X509*, unsigned char*, int*); -CYASSL_API unsigned char* CyaSSL_X509_get_subjectKeyID( - CYASSL_X509*, unsigned char*, int*); -CYASSL_API int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME*); -CYASSL_API int CyaSSL_X509_NAME_get_text_by_NID( - CYASSL_X509_NAME*, int, char*, int); -CYASSL_API int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX*); -CYASSL_API const char* CyaSSL_X509_verify_cert_error_string(long); -CYASSL_API int CyaSSL_X509_get_signature_type(CYASSL_X509*); -CYASSL_API int CyaSSL_X509_get_signature(CYASSL_X509*, unsigned char*, int*); - -CYASSL_API int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP*,const char*,long); -CYASSL_API int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP*, const char*, - long); -CYASSL_API CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void); -CYASSL_API CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void); - -CYASSL_API CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE*, - CYASSL_X509_LOOKUP_METHOD*); -CYASSL_API CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void); -CYASSL_API void CyaSSL_X509_STORE_free(CYASSL_X509_STORE*); -CYASSL_API int CyaSSL_X509_STORE_add_cert( - CYASSL_X509_STORE*, CYASSL_X509*); -CYASSL_API int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE*); -CYASSL_API int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX*, - int, CYASSL_X509_NAME*, CYASSL_X509_OBJECT*); -CYASSL_API CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void); -CYASSL_API int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX*, - CYASSL_X509_STORE*, CYASSL_X509*, STACK_OF(CYASSL_X509)*); -CYASSL_API void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX*); -CYASSL_API void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX*); - -CYASSL_API CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL*); -CYASSL_API CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL*); - -CYASSL_API CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509*); -CYASSL_API int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL*, CYASSL_EVP_PKEY*); -CYASSL_API void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX*, - int); -CYASSL_API void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT*); -CYASSL_API void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY*); -CYASSL_API int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME*); -CYASSL_API int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED*); - -CYASSL_API CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL*); -CYASSL_API CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value( - CYASSL_X509_REVOKED*,int); -CYASSL_API CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509*); - -CYASSL_API int CyaSSL_ASN1_TIME_print(CYASSL_BIO*, const CYASSL_ASN1_TIME*); - -CYASSL_API int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER*, - const CYASSL_ASN1_INTEGER*); -CYASSL_API long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER*); - -CYASSL_API STACK_OF(CYASSL_X509_NAME)* CyaSSL_load_client_CA_file(const char*); - -CYASSL_API void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX*, - STACK_OF(CYASSL_X509_NAME)*); -CYASSL_API void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX*, int); -CYASSL_API int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void); -CYASSL_API void* CyaSSL_get_ex_data(const CYASSL*, int); - -CYASSL_API void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX*, - void* userdata); -CYASSL_API void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX*, pem_password_cb); - - -CYASSL_API void CyaSSL_CTX_set_info_callback(CYASSL_CTX*, void (*)(void)); - -CYASSL_API unsigned long CyaSSL_ERR_peek_error(void); -CYASSL_API int CyaSSL_GET_REASON(int); - -CYASSL_API char* CyaSSL_alert_type_string_long(int); -CYASSL_API char* CyaSSL_alert_desc_string_long(int); -CYASSL_API char* CyaSSL_state_string_long(CYASSL*); - -CYASSL_API CYASSL_RSA* CyaSSL_RSA_generate_key(int, unsigned long, - void(*)(int, int, void*), void*); -CYASSL_API void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX*, - CYASSL_RSA*(*)(CYASSL*, int, int)); - -CYASSL_API int CyaSSL_PEM_def_callback(char*, int num, int w, void* key); - -CYASSL_API long CyaSSL_CTX_sess_accept(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_connect(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_accept_good(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_connect_good(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_hits(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_cache_full(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_misses(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_timeouts(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_number(CYASSL_CTX*); -CYASSL_API long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX*); - -#define CYASSL_DEFAULT_CIPHER_LIST "" /* default all */ -#define CYASSL_RSA_F4 0x10001L - -enum { - OCSP_NOCERTS = 1, - OCSP_NOINTERN = 2, - OCSP_NOSIGS = 4, - OCSP_NOCHAIN = 8, - OCSP_NOVERIFY = 16, - OCSP_NOEXPLICIT = 32, - OCSP_NOCASIGN = 64, - OCSP_NODELEGATED = 128, - OCSP_NOCHECKS = 256, - OCSP_TRUSTOTHER = 512, - OCSP_RESPID_KEY = 1024, - OCSP_NOTIME = 2048, - - OCSP_CERTID = 2, - OCSP_REQUEST = 4, - OCSP_RESPONSE = 8, - OCSP_BASICRESP = 16, - - CYASSL_OCSP_URL_OVERRIDE = 1, - CYASSL_OCSP_NO_NONCE = 2, - - CYASSL_CRL_CHECKALL = 1, - - ASN1_GENERALIZEDTIME = 4, - - SSL_OP_MICROSOFT_SESS_ID_BUG = 1, - SSL_OP_NETSCAPE_CHALLENGE_BUG = 2, - SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 3, - SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 4, - SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 5, - SSL_OP_MSIE_SSLV2_RSA_PADDING = 6, - SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 7, - SSL_OP_TLS_D5_BUG = 8, - SSL_OP_TLS_BLOCK_PADDING_BUG = 9, - SSL_OP_TLS_ROLLBACK_BUG = 10, - SSL_OP_ALL = 11, - SSL_OP_EPHEMERAL_RSA = 12, - SSL_OP_NO_SSLv3 = 13, - SSL_OP_NO_TLSv1 = 14, - SSL_OP_PKCS1_CHECK_1 = 15, - SSL_OP_PKCS1_CHECK_2 = 16, - SSL_OP_NETSCAPE_CA_DN_BUG = 17, - SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 18, - SSL_OP_SINGLE_DH_USE = 19, - SSL_OP_NO_TICKET = 20, - SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 21, - SSL_OP_NO_QUERY_MTU = 22, - SSL_OP_COOKIE_EXCHANGE = 23, - SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 24, - SSL_OP_SINGLE_ECDH_USE = 25, - SSL_OP_CIPHER_SERVER_PREFERENCE = 26, - - SSL_MAX_SSL_SESSION_ID_LENGTH = 32, - - EVP_R_BAD_DECRYPT = 2, - - SSL_CB_LOOP = 4, - SSL_ST_CONNECT = 5, - SSL_ST_ACCEPT = 6, - SSL_CB_ALERT = 7, - SSL_CB_READ = 8, - SSL_CB_HANDSHAKE_DONE = 9, - - SSL_MODE_ENABLE_PARTIAL_WRITE = 2, - - BIO_FLAGS_BASE64_NO_NL = 1, - BIO_CLOSE = 1, - BIO_NOCLOSE = 0, - - NID_undef = 0, - - X509_FILETYPE_PEM = 8, - X509_LU_X509 = 9, - X509_LU_CRL = 12, - - X509_V_ERR_CRL_SIGNATURE_FAILURE = 13, - X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 14, - X509_V_ERR_CRL_HAS_EXPIRED = 15, - X509_V_ERR_CERT_REVOKED = 16, - X509_V_ERR_CERT_CHAIN_TOO_LONG = 17, - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = 18, - X509_V_ERR_CERT_NOT_YET_VALID = 19, - X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = 20, - X509_V_ERR_CERT_HAS_EXPIRED = 21, - X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = 22, - - X509_V_OK = 0, - - CRYPTO_LOCK = 1, - CRYPTO_NUM_LOCKS = 10 -}; - -/* extras end */ - -#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) -/* CyaSSL extension, provide last error from SSL_get_error - since not using thread storage error queue */ -CYASSL_API void CyaSSL_ERR_print_errors_fp(FILE*, int err); -#endif - -enum { /* ssl Constants */ - SSL_ERROR_NONE = 0, /* for most functions */ - SSL_FAILURE = 0, /* for some functions */ - SSL_SUCCESS = 1, - - SSL_BAD_CERTTYPE = -8, - SSL_BAD_STAT = -7, - SSL_BAD_PATH = -6, - SSL_BAD_FILETYPE = -5, - SSL_BAD_FILE = -4, - SSL_NOT_IMPLEMENTED = -3, - SSL_UNKNOWN = -2, - SSL_FATAL_ERROR = -1, - - SSL_FILETYPE_ASN1 = 2, - SSL_FILETYPE_PEM = 1, - SSL_FILETYPE_DEFAULT = 2, /* ASN1 */ - SSL_FILETYPE_RAW = 3, /* NTRU raw key blob */ - - SSL_VERIFY_NONE = 0, - SSL_VERIFY_PEER = 1, - SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 2, - SSL_VERIFY_CLIENT_ONCE = 4, - - SSL_SESS_CACHE_OFF = 30, - SSL_SESS_CACHE_CLIENT = 31, - SSL_SESS_CACHE_SERVER = 32, - SSL_SESS_CACHE_BOTH = 33, - SSL_SESS_CACHE_NO_AUTO_CLEAR = 34, - SSL_SESS_CACHE_NO_INTERNAL_LOOKUP = 35, - - SSL_ERROR_WANT_READ = 2, - SSL_ERROR_WANT_WRITE = 3, - SSL_ERROR_WANT_CONNECT = 7, - SSL_ERROR_WANT_ACCEPT = 8, - SSL_ERROR_SYSCALL = 5, - SSL_ERROR_WANT_X509_LOOKUP = 83, - SSL_ERROR_ZERO_RETURN = 6, - SSL_ERROR_SSL = 85, - - SSL_SENT_SHUTDOWN = 1, - SSL_RECEIVED_SHUTDOWN = 2, - SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER = 4, - SSL_OP_NO_SSLv2 = 8, - - SSL_R_SSL_HANDSHAKE_FAILURE = 101, - SSL_R_TLSV1_ALERT_UNKNOWN_CA = 102, - SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN = 103, - SSL_R_SSLV3_ALERT_BAD_CERTIFICATE = 104, - - PEM_BUFSIZE = 1024 -}; - - -#ifndef NO_PSK - typedef unsigned int (*psk_client_callback)(CYASSL*, const char*, char*, - unsigned int, unsigned char*, unsigned int); - CYASSL_API void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX*, - psk_client_callback); - CYASSL_API void CyaSSL_set_psk_client_callback(CYASSL*,psk_client_callback); - - CYASSL_API const char* CyaSSL_get_psk_identity_hint(const CYASSL*); - CYASSL_API const char* CyaSSL_get_psk_identity(const CYASSL*); - - CYASSL_API int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX*, const char*); - CYASSL_API int CyaSSL_use_psk_identity_hint(CYASSL*, const char*); - - typedef unsigned int (*psk_server_callback)(CYASSL*, const char*, - unsigned char*, unsigned int); - CYASSL_API void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX*, - psk_server_callback); - CYASSL_API void CyaSSL_set_psk_server_callback(CYASSL*,psk_server_callback); - - #define PSK_TYPES_DEFINED -#endif /* NO_PSK */ - - -/* extra begins */ - -enum { /* ERR Constants */ - ERR_TXT_STRING = 1 -}; - -CYASSL_API unsigned long CyaSSL_ERR_get_error_line_data(const char**, int*, - const char**, int *); - -CYASSL_API unsigned long CyaSSL_ERR_get_error(void); -CYASSL_API void CyaSSL_ERR_clear_error(void); - - -CYASSL_API int CyaSSL_RAND_status(void); -CYASSL_API int CyaSSL_RAND_bytes(unsigned char* buf, int num); -CYASSL_API CYASSL_METHOD *CyaSSLv23_server_method(void); -CYASSL_API long CyaSSL_CTX_set_options(CYASSL_CTX*, long); -#ifndef NO_CERTS - CYASSL_API int CyaSSL_CTX_check_private_key(CYASSL_CTX*); -#endif /* !NO_CERTS */ - -CYASSL_API void CyaSSL_ERR_free_strings(void); -CYASSL_API void CyaSSL_ERR_remove_state(unsigned long); -CYASSL_API void CyaSSL_EVP_cleanup(void); - -CYASSL_API void CyaSSL_cleanup_all_ex_data(void); -CYASSL_API long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode); -CYASSL_API long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx); -CYASSL_API void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m); - -CYASSL_API long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX*, long); - -CYASSL_API int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX*); -CYASSL_API int CyaSSL_CTX_set_session_id_context(CYASSL_CTX*, - const unsigned char*, unsigned int); -CYASSL_API CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl); - -CYASSL_API int CyaSSL_want_read(CYASSL*); -CYASSL_API int CyaSSL_want_write(CYASSL*); - -CYASSL_API int CyaSSL_BIO_printf(CYASSL_BIO*, const char*, ...); -CYASSL_API int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO*, - const CYASSL_ASN1_UTCTIME*); -CYASSL_API int CyaSSL_sk_num(CYASSL_X509_REVOKED*); -CYASSL_API void* CyaSSL_sk_value(CYASSL_X509_REVOKED*, int); - -/* stunnel 4.28 needs */ -CYASSL_API void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX*, int); -CYASSL_API int CyaSSL_CTX_set_ex_data(CYASSL_CTX*, int, void*); -CYASSL_API void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX*, - CYASSL_SESSION*(*f)(CYASSL*, unsigned char*, int, int*)); -CYASSL_API void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX*, - int (*f)(CYASSL*, CYASSL_SESSION*)); -CYASSL_API void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX*, - void (*f)(CYASSL_CTX*, CYASSL_SESSION*)); - -CYASSL_API int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION*,unsigned char**); -CYASSL_API CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION**, - const unsigned char**, long); - -CYASSL_API long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION*); -CYASSL_API long CyaSSL_SESSION_get_time(const CYASSL_SESSION*); -CYASSL_API int CyaSSL_CTX_get_ex_new_index(long, void*, void*, void*, void*); - -/* extra ends */ - - -/* CyaSSL extensions */ - -/* call before SSL_connect, if verifying will add name check to - date check and signature check */ -CYASSL_API int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn); - -/* need to call once to load library (session cache) */ -CYASSL_API int CyaSSL_Init(void); -/* call when done to cleanup/free session cache mutex / resources */ -CYASSL_API int CyaSSL_Cleanup(void); - -/* turn logging on, only if compiled in */ -CYASSL_API int CyaSSL_Debugging_ON(void); -/* turn logging off */ -CYASSL_API void CyaSSL_Debugging_OFF(void); - -/* do accept or connect depedning on side */ -CYASSL_API int CyaSSL_negotiate(CYASSL* ssl); -/* turn on CyaSSL data compression */ -CYASSL_API int CyaSSL_set_compression(CYASSL* ssl); - -CYASSL_API int CyaSSL_set_timeout(CYASSL*, unsigned int); -CYASSL_API int CyaSSL_CTX_set_timeout(CYASSL_CTX*, unsigned int); - -/* get CyaSSL peer X509_CHAIN */ -CYASSL_API CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl); -/* peer chain count */ -CYASSL_API int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain); -/* index cert length */ -CYASSL_API int CyaSSL_get_chain_length(CYASSL_X509_CHAIN*, int idx); -/* index cert */ -CYASSL_API unsigned char* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN*, int idx); -/* index cert in X509 */ -CYASSL_API CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN*, int idx); -/* free X509 */ -CYASSL_API void CyaSSL_FreeX509(CYASSL_X509*); -/* get index cert in PEM */ -CYASSL_API int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN*, int idx, - unsigned char* buffer, int inLen, int* outLen); -CYASSL_API const unsigned char* CyaSSL_get_sessionID(const CYASSL_SESSION* s); -CYASSL_API int CyaSSL_X509_get_serial_number(CYASSL_X509*,unsigned char*,int*); -CYASSL_API char* CyaSSL_X509_get_subjectCN(CYASSL_X509*); -CYASSL_API const unsigned char* CyaSSL_X509_get_der(CYASSL_X509*, int*); -CYASSL_API const unsigned char* CyaSSL_X509_notBefore(CYASSL_X509*); -CYASSL_API const unsigned char* CyaSSL_X509_notAfter(CYASSL_X509*); -CYASSL_API int CyaSSL_X509_version(CYASSL_X509*); -CYASSL_API - -CYASSL_API int CyaSSL_cmp_peer_cert_to_file(CYASSL*, const char*); - -CYASSL_API char* CyaSSL_X509_get_next_altname(CYASSL_X509*); - -CYASSL_API CYASSL_X509* - CyaSSL_X509_d2i(CYASSL_X509** x509, const unsigned char* in, int len); -#ifndef NO_FILESYSTEM - #ifndef NO_STDIO_FILESYSTEM - CYASSL_API CYASSL_X509* - CyaSSL_X509_d2i_fp(CYASSL_X509** x509, FILE* file); - #endif -CYASSL_API CYASSL_X509* - CyaSSL_X509_load_certificate_file(const char* fname, int format); -#endif - -#ifdef CYASSL_SEP - CYASSL_API unsigned char* - CyaSSL_X509_get_device_type(CYASSL_X509*, unsigned char*, int*); - CYASSL_API unsigned char* - CyaSSL_X509_get_hw_type(CYASSL_X509*, unsigned char*, int*); - CYASSL_API unsigned char* - CyaSSL_X509_get_hw_serial_number(CYASSL_X509*, unsigned char*, int*); -#endif - -/* connect enough to get peer cert */ -CYASSL_API int CyaSSL_connect_cert(CYASSL* ssl); - -/* XXX This should be #ifndef NO_DH */ -#ifndef NO_CERTS -/* server Diffie-Hellman parameters */ -CYASSL_API int CyaSSL_SetTmpDH(CYASSL*, const unsigned char* p, int pSz, - const unsigned char* g, int gSz); -CYASSL_API int CyaSSL_SetTmpDH_buffer(CYASSL*, const unsigned char* b, long sz, - int format); -CYASSL_API int CyaSSL_SetTmpEC_DHE_Sz(CYASSL*, unsigned short); -#ifndef NO_FILESYSTEM - CYASSL_API int CyaSSL_SetTmpDH_file(CYASSL*, const char* f, int format); -#endif - -/* server ctx Diffie-Hellman parameters */ -CYASSL_API int CyaSSL_CTX_SetTmpDH(CYASSL_CTX*, const unsigned char* p, - int pSz, const unsigned char* g, int gSz); -CYASSL_API int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX*, const unsigned char* b, - long sz, int format); -CYASSL_API int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX*, unsigned short); - -#ifndef NO_FILESYSTEM - CYASSL_API int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX*, const char* f, - int format); -#endif -#endif - -/* keyblock size in bytes or -1 */ -/* need to call CyaSSL_KeepArrays before handshake to save keys */ -CYASSL_API int CyaSSL_get_keyblock_size(CYASSL*); -CYASSL_API int CyaSSL_get_keys(CYASSL*,unsigned char** ms, unsigned int* msLen, - unsigned char** sr, unsigned int* srLen, - unsigned char** cr, unsigned int* crLen); - -/* Computes EAP-TLS and EAP-TTLS keying material from the master_secret. */ -CYASSL_API int CyaSSL_make_eap_keys(CYASSL*, void* key, unsigned int len, - const char* label); - - -#ifndef _WIN32 - #ifndef NO_WRITEV - #ifdef __PPU - #include - #include - #elif !defined(CYASSL_MDK_ARM) - #include - #endif - /* allow writev style writing */ - CYASSL_API int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, - int iovcnt); - #endif -#endif - - -#ifndef NO_CERTS - /* SSL_CTX versions */ - CYASSL_API int CyaSSL_CTX_UnloadCAs(CYASSL_CTX*); - CYASSL_API int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX*, - const unsigned char*, long, int); - CYASSL_API int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX*, - const unsigned char*, long, int); - CYASSL_API int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX*, - const unsigned char*, long, int); - CYASSL_API int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX*, - const unsigned char*, long); - - /* SSL versions */ - CYASSL_API int CyaSSL_use_certificate_buffer(CYASSL*, const unsigned char*, - long, int); - CYASSL_API int CyaSSL_use_PrivateKey_buffer(CYASSL*, const unsigned char*, - long, int); - CYASSL_API int CyaSSL_use_certificate_chain_buffer(CYASSL*, - const unsigned char*, long); - CYASSL_API int CyaSSL_UnloadCertsKeys(CYASSL*); -#endif - -CYASSL_API int CyaSSL_CTX_set_group_messages(CYASSL_CTX*); -CYASSL_API int CyaSSL_set_group_messages(CYASSL*); - -/* I/O callbacks */ -typedef int (*CallbackIORecv)(CYASSL *ssl, char *buf, int sz, void *ctx); -typedef int (*CallbackIOSend)(CYASSL *ssl, char *buf, int sz, void *ctx); - -CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX*, CallbackIORecv); -CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX*, CallbackIOSend); - -CYASSL_API void CyaSSL_SetIOReadCtx( CYASSL* ssl, void *ctx); -CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *ctx); - -CYASSL_API void* CyaSSL_GetIOReadCtx( CYASSL* ssl); -CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl); - -CYASSL_API void CyaSSL_SetIOReadFlags( CYASSL* ssl, int flags); -CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags); - -#ifdef HAVE_NETX - CYASSL_API void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxsocket, - ULONG waitoption); -#endif - -typedef int (*CallbackGenCookie)(CYASSL* ssl, unsigned char* buf, int sz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX*, CallbackGenCookie); -CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl); - - -/* I/O Callback default errors */ -enum IOerrors { - CYASSL_CBIO_ERR_GENERAL = -1, /* general unexpected err */ - CYASSL_CBIO_ERR_WANT_READ = -2, /* need to call read again */ - CYASSL_CBIO_ERR_WANT_WRITE = -2, /* need to call write again */ - CYASSL_CBIO_ERR_CONN_RST = -3, /* connection reset */ - CYASSL_CBIO_ERR_ISR = -4, /* interrupt */ - CYASSL_CBIO_ERR_CONN_CLOSE = -5, /* connection closed or epipe */ - CYASSL_CBIO_ERR_TIMEOUT = -6 /* socket timeout */ -}; - - -/* CA cache callbacks */ -enum { - CYASSL_SSLV3 = 0, - CYASSL_TLSV1 = 1, - CYASSL_TLSV1_1 = 2, - CYASSL_TLSV1_2 = 3, - CYASSL_USER_CA = 1, /* user added as trusted */ - CYASSL_CHAIN_CA = 2 /* added to cache from trusted chain */ -}; - -CYASSL_API int CyaSSL_GetObjectSize(void); /* object size based on build */ -CYASSL_API int CyaSSL_SetVersion(CYASSL* ssl, int version); -CYASSL_API int CyaSSL_KeyPemToDer(const unsigned char*, int sz, unsigned char*, - int, const char*); -CYASSL_API int CyaSSL_CertPemToDer(const unsigned char*, int sz, unsigned char*, - int, int); - -typedef void (*CallbackCACache)(unsigned char* der, int sz, int type); -typedef void (*CbMissingCRL)(const char* url); -typedef int (*CbOCSPIO)(void*, const char*, int, - unsigned char*, int, unsigned char**); -typedef void (*CbOCSPRespFree)(void*,unsigned char*); - -/* User Atomic Record Layer CallBacks */ -typedef int (*CallbackMacEncrypt)(CYASSL* ssl, unsigned char* macOut, - const unsigned char* macIn, unsigned int macInSz, int macContent, - int macVerify, unsigned char* encOut, const unsigned char* encIn, - unsigned int encSz, void* ctx); -CYASSL_API void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX*, CallbackMacEncrypt); -CYASSL_API void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl); - -typedef int (*CallbackDecryptVerify)(CYASSL* ssl, - unsigned char* decOut, const unsigned char* decIn, - unsigned int decSz, int content, int verify, unsigned int* padSz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX*, - CallbackDecryptVerify); -CYASSL_API void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl); - -CYASSL_API const unsigned char* CyaSSL_GetMacSecret(CYASSL*, int); -CYASSL_API const unsigned char* CyaSSL_GetClientWriteKey(CYASSL*); -CYASSL_API const unsigned char* CyaSSL_GetClientWriteIV(CYASSL*); -CYASSL_API const unsigned char* CyaSSL_GetServerWriteKey(CYASSL*); -CYASSL_API const unsigned char* CyaSSL_GetServerWriteIV(CYASSL*); -CYASSL_API int CyaSSL_GetKeySize(CYASSL*); -CYASSL_API int CyaSSL_GetIVSize(CYASSL*); -CYASSL_API int CyaSSL_GetSide(CYASSL*); -CYASSL_API int CyaSSL_IsTLSv1_1(CYASSL*); -CYASSL_API int CyaSSL_GetBulkCipher(CYASSL*); -CYASSL_API int CyaSSL_GetCipherBlockSize(CYASSL*); -CYASSL_API int CyaSSL_GetAeadMacSize(CYASSL*); -CYASSL_API int CyaSSL_GetHmacSize(CYASSL*); -CYASSL_API int CyaSSL_GetHmacType(CYASSL*); -CYASSL_API int CyaSSL_GetCipherType(CYASSL*); -CYASSL_API int CyaSSL_SetTlsHmacInner(CYASSL*, unsigned char*, - unsigned int, int, int); - -/* Atomic User Needs */ -enum { - CYASSL_SERVER_END = 0, - CYASSL_CLIENT_END = 1, - CYASSL_BLOCK_TYPE = 2, - CYASSL_STREAM_TYPE = 3, - CYASSL_AEAD_TYPE = 4, - CYASSL_TLS_HMAC_INNER_SZ = 13 /* SEQ_SZ + ENUM + VERSION_SZ + LEN_SZ */ -}; - -/* for GetBulkCipher and internal use */ -enum BulkCipherAlgorithm { - cyassl_cipher_null, - cyassl_rc4, - cyassl_rc2, - cyassl_des, - cyassl_triple_des, /* leading 3 (3des) not valid identifier */ - cyassl_des40, - cyassl_idea, - cyassl_aes, - cyassl_aes_gcm, - cyassl_aes_ccm, - cyassl_camellia, - cyassl_hc128, /* CyaSSL extensions */ - cyassl_rabbit -}; - - -/* Public Key Callback support */ -typedef int (*CallbackEccSign)(CYASSL* ssl, - const unsigned char* in, unsigned int inSz, - unsigned char* out, unsigned int* outSz, - const unsigned char* keyDer, unsigned int keySz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX*, CallbackEccSign); -CYASSL_API void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetEccSignCtx(CYASSL* ssl); - -typedef int (*CallbackEccVerify)(CYASSL* ssl, - const unsigned char* sig, unsigned int sigSz, - const unsigned char* hash, unsigned int hashSz, - const unsigned char* keyDer, unsigned int keySz, - int* result, void* ctx); -CYASSL_API void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX*, CallbackEccVerify); -CYASSL_API void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl); - -typedef int (*CallbackRsaSign)(CYASSL* ssl, - const unsigned char* in, unsigned int inSz, - unsigned char* out, unsigned int* outSz, - const unsigned char* keyDer, unsigned int keySz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX*, CallbackRsaSign); -CYASSL_API void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetRsaSignCtx(CYASSL* ssl); - -typedef int (*CallbackRsaVerify)(CYASSL* ssl, - unsigned char* sig, unsigned int sigSz, - unsigned char** out, - const unsigned char* keyDer, unsigned int keySz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX*, CallbackRsaVerify); -CYASSL_API void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl); - -/* RSA Public Encrypt cb */ -typedef int (*CallbackRsaEnc)(CYASSL* ssl, - const unsigned char* in, unsigned int inSz, - unsigned char* out, unsigned int* outSz, - const unsigned char* keyDer, unsigned int keySz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX*, CallbackRsaEnc); -CYASSL_API void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetRsaEncCtx(CYASSL* ssl); - -/* RSA Private Decrypt cb */ -typedef int (*CallbackRsaDec)(CYASSL* ssl, - unsigned char* in, unsigned int inSz, - unsigned char** out, - const unsigned char* keyDer, unsigned int keySz, - void* ctx); -CYASSL_API void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX*, CallbackRsaDec); -CYASSL_API void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx); -CYASSL_API void* CyaSSL_GetRsaDecCtx(CYASSL* ssl); - - -#ifndef NO_CERTS - CYASSL_API void CyaSSL_CTX_SetCACb(CYASSL_CTX*, CallbackCACache); - - CYASSL_API CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void); - CYASSL_API void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER*); - - CYASSL_API int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER*, const char* f, - const char* d); - CYASSL_API int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm); - CYASSL_API int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER*, const char* f, - int format); - CYASSL_API int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, - const unsigned char* buff, long sz, int format); - CYASSL_API int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER*, - unsigned char*, int sz); - CYASSL_API int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER*, - int options); - CYASSL_API int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER*); - CYASSL_API int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER*, const char*, - int, int); - CYASSL_API int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER*, - CbMissingCRL); - CYASSL_API int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER*, - unsigned char*, int sz); - CYASSL_API int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER*, - int options); - CYASSL_API int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER*); - CYASSL_API int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER*, - const char*); - CYASSL_API int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER*, - CbOCSPIO, CbOCSPRespFree, void*); - - CYASSL_API int CyaSSL_EnableCRL(CYASSL* ssl, int options); - CYASSL_API int CyaSSL_DisableCRL(CYASSL* ssl); - CYASSL_API int CyaSSL_LoadCRL(CYASSL*, const char*, int, int); - CYASSL_API int CyaSSL_SetCRL_Cb(CYASSL*, CbMissingCRL); - CYASSL_API int CyaSSL_EnableOCSP(CYASSL*, int options); - CYASSL_API int CyaSSL_DisableOCSP(CYASSL*); - CYASSL_API int CyaSSL_SetOCSP_OverrideURL(CYASSL*, const char*); - CYASSL_API int CyaSSL_SetOCSP_Cb(CYASSL*, CbOCSPIO, CbOCSPRespFree, void*); - - CYASSL_API int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options); - CYASSL_API int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx); - CYASSL_API int CyaSSL_CTX_LoadCRL(CYASSL_CTX*, const char*, int, int); - CYASSL_API int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX*, CbMissingCRL); - CYASSL_API int CyaSSL_CTX_EnableOCSP(CYASSL_CTX*, int options); - CYASSL_API int CyaSSL_CTX_DisableOCSP(CYASSL_CTX*); - CYASSL_API int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX*, const char*); - CYASSL_API int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX*, - CbOCSPIO, CbOCSPRespFree, void*); -#endif /* !NO_CERTS */ - -/* end of handshake frees temporary arrays, if user needs for get_keys or - psk hints, call KeepArrays before handshake and then FreeArrays when done - if don't want to wait for object free */ -CYASSL_API void CyaSSL_KeepArrays(CYASSL*); -CYASSL_API void CyaSSL_FreeArrays(CYASSL*); - - -/* cavium additions */ -CYASSL_API int CyaSSL_UseCavium(CYASSL*, int devId); -CYASSL_API int CyaSSL_CTX_UseCavium(CYASSL_CTX*, int devId); - -/* TLS Extensions */ - -/* Server Name Indication */ -#ifdef HAVE_SNI -/* SNI types */ -enum { - CYASSL_SNI_HOST_NAME = 0 -}; - -CYASSL_API int CyaSSL_UseSNI(CYASSL* ssl, unsigned char type, const void* data, - unsigned short size); -CYASSL_API int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, unsigned char type, - const void* data, unsigned short size); - -#ifndef NO_CYASSL_SERVER -/* SNI options */ -enum { - CYASSL_SNI_CONTINUE_ON_MISMATCH = 0x01, /* do not abort on mismatch flag */ - CYASSL_SNI_ANSWER_ON_MISMATCH = 0x02 /* fake match on mismatch flag */ -}; - -CYASSL_API void CyaSSL_SNI_SetOptions(CYASSL* ssl, unsigned char type, - unsigned char options); -CYASSL_API void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, unsigned char type, - unsigned char options); - -/* SNI status */ -enum { - CYASSL_SNI_NO_MATCH = 0, - CYASSL_SNI_FAKE_MATCH = 1, /* if CYASSL_SNI_ANSWER_ON_MISMATCH is enabled */ - CYASSL_SNI_REAL_MATCH = 2 -}; - -CYASSL_API unsigned char CyaSSL_SNI_Status(CYASSL* ssl, unsigned char type); - -CYASSL_API unsigned short CyaSSL_SNI_GetRequest(CYASSL *ssl, unsigned char type, - void** data); - -CYASSL_API int CyaSSL_SNI_GetFromBuffer( - const unsigned char* clientHello, unsigned int helloSz, - unsigned char type, unsigned char* sni, unsigned int* inOutSz); - -#endif /* NO_CYASSL_SERVER */ -#endif /* HAVE_SNI */ - -/* Maximum Fragment Length */ -#ifdef HAVE_MAX_FRAGMENT -/* Fragment lengths */ -enum { - CYASSL_MFL_2_9 = 1, /* 512 bytes */ - CYASSL_MFL_2_10 = 2, /* 1024 bytes */ - CYASSL_MFL_2_11 = 3, /* 2048 bytes */ - CYASSL_MFL_2_12 = 4, /* 4096 bytes */ - CYASSL_MFL_2_13 = 5 /* 8192 bytes *//* CyaSSL ONLY!!! */ -}; - -#ifndef NO_CYASSL_CLIENT - -CYASSL_API int CyaSSL_UseMaxFragment(CYASSL* ssl, unsigned char mfl); -CYASSL_API int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, unsigned char mfl); - -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_MAX_FRAGMENT */ - -/* Truncated HMAC */ -#ifdef HAVE_TRUNCATED_HMAC -#ifndef NO_CYASSL_CLIENT - -CYASSL_API int CyaSSL_UseTruncatedHMAC(CYASSL* ssl); -CYASSL_API int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx); - -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_TRUNCATED_HMAC */ - -/* Elliptic Curves */ -#ifdef HAVE_SUPPORTED_CURVES - -enum { - CYASSL_ECC_SECP160R1 = 0x10, - CYASSL_ECC_SECP192R1 = 0x13, - CYASSL_ECC_SECP224R1 = 0x15, - CYASSL_ECC_SECP256R1 = 0x17, - CYASSL_ECC_SECP384R1 = 0x18, - CYASSL_ECC_SECP521R1 = 0x19 -}; - -#ifndef NO_CYASSL_CLIENT - -CYASSL_API int CyaSSL_UseSupportedCurve(CYASSL* ssl, unsigned short name); -CYASSL_API int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, - unsigned short name); - -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_SUPPORTED_CURVES */ - - -#define CYASSL_CRL_MONITOR 0x01 /* monitor this dir flag */ -#define CYASSL_CRL_START_MON 0x02 /* start monitoring flag */ - -#ifdef CYASSL_CALLBACKS - -/* used internally by CyaSSL while OpenSSL types aren't */ -#include - -typedef int (*HandShakeCallBack)(HandShakeInfo*); -typedef int (*TimeoutCallBack)(TimeoutInfo*); - -/* CyaSSL connect extension allowing HandShakeCallBack and/or TimeoutCallBack - for diagnostics */ -CYASSL_API int CyaSSL_connect_ex(CYASSL*, HandShakeCallBack, TimeoutCallBack, - Timeval); -CYASSL_API int CyaSSL_accept_ex(CYASSL*, HandShakeCallBack, TimeoutCallBack, - Timeval); - -#endif /* CYASSL_CALLBACKS */ - - -#ifdef CYASSL_HAVE_WOLFSCEP - CYASSL_API void CyaSSL_wolfSCEP(void); -#endif /* CYASSL_HAVE_WOLFSCEP */ - -#ifdef CYASSL_HAVE_CERT_SERVICE - CYASSL_API void CyaSSL_cert_service(void); -#endif - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CYASSL_SSL_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/test.h b/project1/cyassl-3.0.0/cyassl/test.h deleted file mode 100644 index 667476ed..00000000 --- a/project1/cyassl-3.0.0/cyassl/test.h +++ /dev/null @@ -1,1730 +0,0 @@ -/* test.h */ - -#ifndef CyaSSL_TEST_H -#define CyaSSL_TEST_H - -#include -#include -#include -#include -#include -#include - -#ifdef ATOMIC_USER - #include - #include - #include -#endif -#ifdef HAVE_PK_CALLBACKS - #include - #include - #ifdef HAVE_ECC - #include - #endif /* HAVE_ECC */ -#endif /*HAVE_PK_CALLBACKS */ - -#ifdef USE_WINDOWS_API - #include - #include - #ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */ - #include - #include - #endif - #define SOCKET_T SOCKET - #define SNPRINTF _snprintf -#elif defined(CYASSL_MDK_ARM) - #include -#else - #include - #include -#ifndef CYASSL_LEANPSK - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #ifdef TEST_IPV6 - #include - #endif -#endif - #define SOCKET_T int - #ifndef SO_NOSIGPIPE - #include /* ignore SIGPIPE */ - #endif - #define SNPRINTF snprintf -#endif /* USE_WINDOWS_API */ - -#ifdef HAVE_CAVIUM - #include "cavium_sysdep.h" - #include "cavium_common.h" - #include "cavium_ioctl.h" -#endif - -#ifdef _MSC_VER - /* disable conversion warning */ - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable:4244 4996) -#endif - - -#if defined(__MACH__) || defined(USE_WINDOWS_API) - #ifndef _SOCKLEN_T - typedef int socklen_t; - #endif -#endif - - -/* HPUX doesn't use socklent_t for third parameter to accept, unless - _XOPEN_SOURCE_EXTENDED is defined */ -#if !defined(__hpux__) && !defined(CYASSL_MDK_ARM) && !defined(CYASSL_IAR_ARM) - typedef socklen_t* ACCEPT_THIRD_T; -#else - #if defined _XOPEN_SOURCE_EXTENDED - typedef socklen_t* ACCEPT_THIRD_T; - #else - typedef int* ACCEPT_THIRD_T; - #endif -#endif - - -#ifdef USE_WINDOWS_API - #define CloseSocket(s) closesocket(s) - #define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); } -#elif defined(CYASSL_MDK_ARM) - #define CloseSocket(s) closesocket(s) - #define StartTCP() -#else - #define CloseSocket(s) close(s) - #define StartTCP() -#endif - - -#ifdef SINGLE_THREADED - typedef unsigned int THREAD_RETURN; - typedef void* THREAD_TYPE; - #define CYASSL_THREAD -#else - #if defined(_POSIX_THREADS) && !defined(__MINGW32__) - typedef void* THREAD_RETURN; - typedef pthread_t THREAD_TYPE; - #define CYASSL_THREAD - #define INFINITE -1 - #define WAIT_OBJECT_0 0L - #elif defined(CYASSL_MDK_ARM) - typedef unsigned int THREAD_RETURN; - typedef int THREAD_TYPE; - #define CYASSL_THREAD - #else - typedef unsigned int THREAD_RETURN; - typedef intptr_t THREAD_TYPE; - #define CYASSL_THREAD __stdcall - #endif -#endif - - -#ifdef TEST_IPV6 - typedef struct sockaddr_in6 SOCKADDR_IN_T; - #define AF_INET_V AF_INET6 -#else - typedef struct sockaddr_in SOCKADDR_IN_T; - #define AF_INET_V AF_INET -#endif - - -#define SERVER_DEFAULT_VERSION 3 -#define SERVER_DTLS_DEFAULT_VERSION (-2) -#define SERVER_INVALID_VERSION (-99) -#define CLIENT_DEFAULT_VERSION 3 -#define CLIENT_DTLS_DEFAULT_VERSION (-2) -#define CLIENT_INVALID_VERSION (-99) - -/* all certs relative to CyaSSL home directory now */ -#define caCert "./certs/ca-cert.pem" -#define eccCert "./certs/server-ecc.pem" -#define eccKey "./certs/ecc-key.pem" -#define svrCert "./certs/server-cert.pem" -#define svrKey "./certs/server-key.pem" -#define cliCert "./certs/client-cert.pem" -#define cliKey "./certs/client-key.pem" -#define ntruCert "./certs/ntru-cert.pem" -#define ntruKey "./certs/ntru-key.raw" -#define dhParam "./certs/dh2048.pem" -#define cliEccKey "./certs/ecc-client-key.pem" -#define cliEccCert "./certs/client-ecc-cert.pem" -#define crlPemDir "./certs/crl" - -typedef struct tcp_ready { - word16 ready; /* predicate */ - word16 port; -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_t mutex; - pthread_cond_t cond; -#endif -} tcp_ready; - - -void InitTcpReady(tcp_ready*); -void FreeTcpReady(tcp_ready*); - -typedef CYASSL_METHOD* (*method_provider)(void); -typedef void (*ctx_callback)(CYASSL_CTX* ctx); -typedef void (*ssl_callback)(CYASSL* ssl); - -typedef struct callback_functions { - method_provider method; - ctx_callback ctx_ready; - ssl_callback ssl_ready; - ssl_callback on_result; -} callback_functions; - -typedef struct func_args { - int argc; - char** argv; - int return_code; - tcp_ready* signal; - callback_functions *callbacks; -} func_args; - -void wait_tcp_ready(func_args*); - -typedef THREAD_RETURN CYASSL_THREAD THREAD_FUNC(void*); - -void start_thread(THREAD_FUNC, func_args*, THREAD_TYPE*); -void join_thread(THREAD_TYPE); - -/* yaSSL */ -#ifndef TEST_IPV6 - static const char* const yasslIP = "127.0.0.1"; -#else - static const char* const yasslIP = "::1"; -#endif -static const word16 yasslPort = 11111; - -static INLINE void err_sys(const char* msg) -{ - printf("yassl error: %s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - - -#define MY_EX_USAGE 2 - -extern int myoptind; -extern char* myoptarg; - -static INLINE int mygetopt(int argc, char** argv, const char* optstring) -{ - static char* next = NULL; - - char c; - char* cp; - - if (myoptind == 0) - next = NULL; /* we're starting new/over */ - - if (next == NULL || *next == '\0') { - if (myoptind == 0) - myoptind++; - - if (myoptind >= argc || argv[myoptind][0] != '-' || - argv[myoptind][1] == '\0') { - myoptarg = NULL; - if (myoptind < argc) - myoptarg = argv[myoptind]; - - return -1; - } - - if (strcmp(argv[myoptind], "--") == 0) { - myoptind++; - myoptarg = NULL; - - if (myoptind < argc) - myoptarg = argv[myoptind]; - - return -1; - } - - next = argv[myoptind]; - next++; /* skip - */ - myoptind++; - } - - c = *next++; - /* The C++ strchr can return a different value */ - cp = (char*)strchr(optstring, c); - - if (cp == NULL || c == ':') - return '?'; - - cp++; - - if (*cp == ':') { - if (*next != '\0') { - myoptarg = next; - next = NULL; - } - else if (myoptind < argc) { - myoptarg = argv[myoptind]; - myoptind++; - } - else - return '?'; - } - - return c; -} - - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - -static INLINE int PasswordCallBack(char* passwd, int sz, int rw, void* userdata) -{ - (void)rw; - (void)userdata; - strncpy(passwd, "yassl123", sz); - return 8; -} - -#endif - - -#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) - -static INLINE void ShowX509(CYASSL_X509* x509, const char* hdr) -{ - char* altName; - char* issuer = CyaSSL_X509_NAME_oneline( - CyaSSL_X509_get_issuer_name(x509), 0, 0); - char* subject = CyaSSL_X509_NAME_oneline( - CyaSSL_X509_get_subject_name(x509), 0, 0); - byte serial[32]; - int ret; - int sz = sizeof(serial); - - printf("%s\n issuer : %s\n subject: %s\n", hdr, issuer, subject); - - while ( (altName = CyaSSL_X509_get_next_altname(x509)) != NULL) - printf(" altname = %s\n", altName); - - ret = CyaSSL_X509_get_serial_number(x509, serial, &sz); - if (ret == SSL_SUCCESS) { - int i; - int strLen; - char serialMsg[80]; - - /* testsuite has multiple threads writing to stdout, get output - message ready to write once */ - strLen = sprintf(serialMsg, " serial number"); - for (i = 0; i < sz; i++) - sprintf(serialMsg + strLen + (i*3), ":%02x ", serial[i]); - printf("%s\n", serialMsg); - } - - XFREE(subject, 0, DYNAMIC_TYPE_OPENSSL); - XFREE(issuer, 0, DYNAMIC_TYPE_OPENSSL); -} - -#endif /* KEEP_PEER_CERT || SESSION_CERTS */ - - -static INLINE void showPeer(CYASSL* ssl) -{ - - CYASSL_CIPHER* cipher; -#ifdef KEEP_PEER_CERT - CYASSL_X509* peer = CyaSSL_get_peer_certificate(ssl); - if (peer) - ShowX509(peer, "peer's cert info:"); - else - printf("peer has no cert!\n"); -#endif - printf("SSL version is %s\n", CyaSSL_get_version(ssl)); - - cipher = CyaSSL_get_current_cipher(ssl); - printf("SSL cipher suite is %s\n", CyaSSL_CIPHER_get_name(cipher)); - -#if defined(SESSION_CERTS) && defined(SHOW_CERTS) - { - CYASSL_X509_CHAIN* chain = CyaSSL_get_peer_chain(ssl); - int count = CyaSSL_get_chain_count(chain); - int i; - - for (i = 0; i < count; i++) { - int length; - unsigned char buffer[3072]; - CYASSL_X509* chainX509; - - CyaSSL_get_chain_cert_pem(chain,i,buffer, sizeof(buffer), &length); - buffer[length] = 0; - printf("cert %d has length %d data = \n%s\n", i, length, buffer); - - chainX509 = CyaSSL_get_chain_X509(chain, i); - if (chainX509) - ShowX509(chainX509, "session cert info:"); - else - printf("get_chain_X509 failed\n"); - CyaSSL_FreeX509(chainX509); - } - } -#endif - (void)ssl; -} - - -static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer, - word16 port, int udp) -{ - int useLookup = 0; - (void)useLookup; - (void)udp; - - memset(addr, 0, sizeof(SOCKADDR_IN_T)); - -#ifndef TEST_IPV6 - /* peer could be in human readable form */ - if ( (peer != INADDR_ANY) && isalpha((int)peer[0])) { - #ifdef CYASSL_MDK_ARM - int err; - struct hostent* entry = gethostbyname(peer, &err); - #else - struct hostent* entry = gethostbyname(peer); - #endif - - if (entry) { - memcpy(&addr->sin_addr.s_addr, entry->h_addr_list[0], - entry->h_length); - useLookup = 1; - } - else - err_sys("no entry for host"); - } -#endif - - -#ifndef TEST_IPV6 - #if defined(CYASSL_MDK_ARM) - addr->sin_family = PF_INET; - #else - addr->sin_family = AF_INET_V; - #endif - addr->sin_port = htons(port); - if (peer == INADDR_ANY) - addr->sin_addr.s_addr = INADDR_ANY; - else { - if (!useLookup) - addr->sin_addr.s_addr = inet_addr(peer); - } -#else - addr->sin6_family = AF_INET_V; - addr->sin6_port = htons(port); - if (peer == INADDR_ANY) - addr->sin6_addr = in6addr_any; - else { - #ifdef HAVE_GETADDRINFO - struct addrinfo hints; - struct addrinfo* answer = NULL; - int ret; - char strPort[80]; - - memset(&hints, 0, sizeof(hints)); - - hints.ai_family = AF_INET_V; - hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM; - hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP; - - SNPRINTF(strPort, sizeof(strPort), "%d", port); - strPort[79] = '\0'; - - ret = getaddrinfo(peer, strPort, &hints, &answer); - if (ret < 0 || answer == NULL) - err_sys("getaddrinfo failed"); - - memcpy(addr, answer->ai_addr, answer->ai_addrlen); - freeaddrinfo(answer); - #else - printf("no ipv6 getaddrinfo, loopback only tests/examples\n"); - addr->sin6_addr = in6addr_loopback; - #endif - } -#endif -} - - -static INLINE void tcp_socket(SOCKET_T* sockfd, int udp) -{ - if (udp) - *sockfd = socket(AF_INET_V, SOCK_DGRAM, 0); - else - *sockfd = socket(AF_INET_V, SOCK_STREAM, 0); - -#ifdef USE_WINDOWS_API - if (*sockfd == INVALID_SOCKET) - err_sys("socket failed\n"); -#else - if (*sockfd < 0) - err_sys("socket failed\n"); -#endif - -#ifndef USE_WINDOWS_API -#ifdef SO_NOSIGPIPE - { - int on = 1; - socklen_t len = sizeof(on); - int res = setsockopt(*sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, len); - if (res < 0) - err_sys("setsockopt SO_NOSIGPIPE failed\n"); - } -#elif defined(CYASSL_MDK_ARM) - /* nothing to define */ -#else /* no S_NOSIGPIPE */ - signal(SIGPIPE, SIG_IGN); -#endif /* S_NOSIGPIPE */ - -#if defined(TCP_NODELAY) - if (!udp) - { - int on = 1; - socklen_t len = sizeof(on); - int res = setsockopt(*sockfd, IPPROTO_TCP, TCP_NODELAY, &on, len); - if (res < 0) - err_sys("setsockopt TCP_NODELAY failed\n"); - } -#endif -#endif /* USE_WINDOWS_API */ -} - -static INLINE void tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port, - int udp) -{ - SOCKADDR_IN_T addr; - build_addr(&addr, ip, port, udp); - tcp_socket(sockfd, udp); - - if (!udp) { - if (connect(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) - err_sys("tcp connect failed"); - } -} - - -static INLINE void udp_connect(SOCKET_T* sockfd, void* addr, int addrSz) -{ - if (connect(*sockfd, (const struct sockaddr*)addr, addrSz) != 0) - err_sys("tcp connect failed"); -} - - -enum { - TEST_SELECT_FAIL, - TEST_TIMEOUT, - TEST_RECV_READY, - TEST_ERROR_READY -}; - - -#if !defined(CYASSL_MDK_ARM) -static INLINE int tcp_select(SOCKET_T socketfd, int to_sec) -{ - fd_set recvfds, errfds; - SOCKET_T nfds = socketfd + 1; - struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; - int result; - - FD_ZERO(&recvfds); - FD_SET(socketfd, &recvfds); - FD_ZERO(&errfds); - FD_SET(socketfd, &errfds); - - result = select(nfds, &recvfds, NULL, &errfds, &timeout); - - if (result == 0) - return TEST_TIMEOUT; - else if (result > 0) { - if (FD_ISSET(socketfd, &recvfds)) - return TEST_RECV_READY; - else if(FD_ISSET(socketfd, &errfds)) - return TEST_ERROR_READY; - } - - return TEST_SELECT_FAIL; -} -#endif /* !CYASSL_MDK_ARM */ - - -static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr, - int udp) -{ - SOCKADDR_IN_T addr; - - /* don't use INADDR_ANY by default, firewall may block, make user switch - on */ - build_addr(&addr, (useAnyAddr ? INADDR_ANY : yasslIP), *port, udp); - tcp_socket(sockfd, udp); - -#if !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_ARM) - { - int res, on = 1; - socklen_t len = sizeof(on); - res = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) - err_sys("setsockopt SO_REUSEADDR failed\n"); - } -#endif - - if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) - err_sys("tcp bind failed"); - if (!udp) { - if (listen(*sockfd, 5) != 0) - err_sys("tcp listen failed"); - } - #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) - if (*port == 0) { - socklen_t len = sizeof(addr); - if (getsockname(*sockfd, (struct sockaddr*)&addr, &len) == 0) { - #ifndef TEST_IPV6 - *port = ntohs(addr.sin_port); - #else - *port = ntohs(addr.sin6_port); - #endif - } - } - #endif -} - - -static INLINE int udp_read_connect(SOCKET_T sockfd) -{ - SOCKADDR_IN_T cliaddr; - byte b[1500]; - int n; - socklen_t len = sizeof(cliaddr); - - n = (int)recvfrom(sockfd, (char*)b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &len); - if (n > 0) { - if (connect(sockfd, (const struct sockaddr*)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); - } - else - err_sys("recvfrom failed"); - - return sockfd; -} - -static INLINE void udp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd, - int useAnyAddr, word16 port, func_args* args) -{ - SOCKADDR_IN_T addr; - - (void)args; - build_addr(&addr, (useAnyAddr ? INADDR_ANY : yasslIP), port, 1); - tcp_socket(sockfd, 1); - - -#if !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_ARM) - { - int res, on = 1; - socklen_t len = sizeof(on); - res = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) - err_sys("setsockopt SO_REUSEADDR failed\n"); - } -#endif - - if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) - err_sys("tcp bind failed"); - - #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) - if (port == 0) { - socklen_t len = sizeof(addr); - if (getsockname(*sockfd, (struct sockaddr*)&addr, &len) == 0) { - #ifndef TEST_IPV6 - port = ntohs(addr.sin_port); - #else - port = ntohs(addr.sin6_port); - #endif - } - } - #endif - -#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) - /* signal ready to accept data */ - { - tcp_ready* ready = args->signal; - pthread_mutex_lock(&ready->mutex); - ready->ready = 1; - ready->port = port; - pthread_cond_signal(&ready->cond); - pthread_mutex_unlock(&ready->mutex); - } -#endif - - *clientfd = udp_read_connect(*sockfd); -} - -static INLINE void tcp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd, - func_args* args, word16 port, int useAnyAddr, - int udp) -{ - SOCKADDR_IN_T client; - socklen_t client_len = sizeof(client); - - if (udp) { - udp_accept(sockfd, clientfd, useAnyAddr, port, args); - return; - } - - tcp_listen(sockfd, &port, useAnyAddr, udp); - -#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) - /* signal ready to tcp_accept */ - { - tcp_ready* ready = args->signal; - pthread_mutex_lock(&ready->mutex); - ready->ready = 1; - ready->port = port; - pthread_cond_signal(&ready->cond); - pthread_mutex_unlock(&ready->mutex); - } -#endif - - *clientfd = accept(*sockfd, (struct sockaddr*)&client, - (ACCEPT_THIRD_T)&client_len); -#ifdef USE_WINDOWS_API - if (*clientfd == INVALID_SOCKET) - err_sys("tcp accept failed"); -#else - if (*clientfd == -1) - err_sys("tcp accept failed"); -#endif -} - - -static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd) -{ - #ifdef USE_WINDOWS_API - unsigned long blocking = 1; - int ret = ioctlsocket(*sockfd, FIONBIO, &blocking); - if (ret == SOCKET_ERROR) - err_sys("ioctlsocket failed"); - #elif defined(CYASSL_MDK_ARM) - /* non blocking not suppported, for now */ - #else - int flags = fcntl(*sockfd, F_GETFL, 0); - if (flags < 0) - err_sys("fcntl get failed"); - flags = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK); - if (flags < 0) - err_sys("fcntl set failed"); - #endif -} - - -#ifndef NO_PSK - -static INLINE unsigned int my_psk_client_cb(CYASSL* ssl, const char* hint, - char* identity, unsigned int id_max_len, unsigned char* key, - unsigned int key_max_len) -{ - (void)ssl; - (void)hint; - (void)key_max_len; - - /* identity is OpenSSL testing default for openssl s_client, keep same */ - strncpy(identity, "Client_identity", id_max_len); - - - /* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using - unsigned binary */ - key[0] = 26; - key[1] = 43; - key[2] = 60; - key[3] = 77; - - return 4; /* length of key in octets or 0 for error */ -} - - -static INLINE unsigned int my_psk_server_cb(CYASSL* ssl, const char* identity, - unsigned char* key, unsigned int key_max_len) -{ - (void)ssl; - (void)key_max_len; - - /* identity is OpenSSL testing default for openssl s_client, keep same */ - if (strncmp(identity, "Client_identity", 15) != 0) - return 0; - - /* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using - unsigned binary */ - key[0] = 26; - key[1] = 43; - key[2] = 60; - key[3] = 77; - - return 4; /* length of key in octets or 0 for error */ -} - -#endif /* NO_PSK */ - - -#ifdef USE_WINDOWS_API - - #define WIN32_LEAN_AND_MEAN - #include - - static INLINE double current_time() - { - static int init = 0; - static LARGE_INTEGER freq; - - LARGE_INTEGER count; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = 1; - } - - QueryPerformanceCounter(&count); - - return (double)count.QuadPart / freq.QuadPart; - } - -#else - -#if !defined(CYASSL_MDK_ARM) - #include - - static INLINE double current_time(void) - { - struct timeval tv; - gettimeofday(&tv, 0); - - return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; - } - -#endif -#endif /* USE_WINDOWS_API */ - - -#if defined(NO_FILESYSTEM) && !defined(NO_CERTS) - - enum { - CYASSL_CA = 1, - CYASSL_CERT = 2, - CYASSL_KEY = 3 - }; - - static INLINE void load_buffer(CYASSL_CTX* ctx, const char* fname, int type) - { - /* test buffer load */ - long sz = 0; - byte buff[10000]; - FILE* file = fopen(fname, "rb"); - - if (!file) - err_sys("can't open file for buffer load " - "Please run from CyaSSL home directory if not"); - fseek(file, 0, SEEK_END); - sz = ftell(file); - rewind(file); - fread(buff, sizeof(buff), 1, file); - - if (type == CYASSL_CA) { - if (CyaSSL_CTX_load_verify_buffer(ctx, buff, sz, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load buffer ca file"); - } - else if (type == CYASSL_CERT) { - if (CyaSSL_CTX_use_certificate_buffer(ctx, buff, sz, - SSL_FILETYPE_PEM) != SSL_SUCCESS) - err_sys("can't load buffer cert file"); - } - else if (type == CYASSL_KEY) { - if (CyaSSL_CTX_use_PrivateKey_buffer(ctx, buff, sz, - SSL_FILETYPE_PEM) != SSL_SUCCESS) - err_sys("can't load buffer key file"); - } - } - -#endif /* NO_FILESYSTEM */ - -#ifdef VERIFY_CALLBACK - -static INLINE int myVerify(int preverify, CYASSL_X509_STORE_CTX* store) -{ - (void)preverify; - char buffer[CYASSL_MAX_ERROR_SZ]; - -#ifdef OPENSSL_EXTRA - CYASSL_X509* peer; -#endif - - printf("In verification callback, error = %d, %s\n", store->error, - CyaSSL_ERR_error_string(store->error, buffer)); -#ifdef OPENSSL_EXTRA - peer = store->current_cert; - if (peer) { - char* issuer = CyaSSL_X509_NAME_oneline( - CyaSSL_X509_get_issuer_name(peer), 0, 0); - char* subject = CyaSSL_X509_NAME_oneline( - CyaSSL_X509_get_subject_name(peer), 0, 0); - printf("peer's cert info:\n issuer : %s\n subject: %s\n", issuer, - subject); - XFREE(subject, 0, DYNAMIC_TYPE_OPENSSL); - XFREE(issuer, 0, DYNAMIC_TYPE_OPENSSL); - } - else - printf("peer has no cert!\n"); -#endif - printf("Subject's domain name is %s\n", store->domain); - - printf("Allowing to continue anyway (shouldn't do this, EVER!!!)\n"); - return 1; -} - -#endif /* VERIFY_CALLBACK */ - - -#ifdef HAVE_CRL - -static INLINE void CRL_CallBack(const char* url) -{ - printf("CRL callback url = %s\n", url); -} - -#endif - -#ifndef NO_CERTS - -static INLINE void CaCb(unsigned char* der, int sz, int type) -{ - (void)der; - printf("Got CA cache add callback, derSz = %d, type = %d\n", sz, type); -} - - -static INLINE void SetDH(CYASSL* ssl) -{ - /* dh1024 p */ - static unsigned char p[] = - { - 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3, - 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E, - 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59, - 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2, - 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD, - 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF, - 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02, - 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C, - 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7, - 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50, - 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B, - }; - - /* dh1024 g */ - static unsigned char g[] = - { - 0x02, - }; - - CyaSSL_SetTmpDH(ssl, p, sizeof(p), g, sizeof(g)); -} - -static INLINE void SetDHCtx(CYASSL_CTX* ctx) -{ - /* dh1024 p */ - static unsigned char p[] = - { - 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3, - 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E, - 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59, - 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2, - 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD, - 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF, - 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02, - 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C, - 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7, - 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50, - 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B, - }; - - /* dh1024 g */ - static unsigned char g[] = - { - 0x02, - }; - - CyaSSL_CTX_SetTmpDH(ctx, p, sizeof(p), g, sizeof(g)); -} - -#endif /* !NO_CERTS */ - -#ifdef HAVE_CAVIUM - -static INLINE int OpenNitroxDevice(int dma_mode,int dev_id) -{ - Csp1CoreAssignment core_assign; - Uint32 device; - - if (CspInitialize(CAVIUM_DIRECT,CAVIUM_DEV_ID)) - return -1; - if (Csp1GetDevType(&device)) - return -1; - if (device != NPX_DEVICE) { - if (ioctl(gpkpdev_hdlr[CAVIUM_DEV_ID], IOCTL_CSP1_GET_CORE_ASSIGNMENT, - (Uint32 *)&core_assign)!= 0) - return -1; - } - CspShutdown(CAVIUM_DEV_ID); - - return CspInitialize(dma_mode, dev_id); -} - -#endif /* HAVE_CAVIUM */ - - -#ifdef USE_WINDOWS_API - -/* do back x number of directories */ -static INLINE void ChangeDirBack(int x) -{ - char path[MAX_PATH]; - - if (x == 1) - strncpy(path, "..\\", MAX_PATH); - else if (x == 2) - strncpy(path, "..\\..\\", MAX_PATH); - else if (x == 3) - strncpy(path, "..\\..\\..\\", MAX_PATH); - else if (x == 4) - strncpy(path, "..\\..\\..\\..\\", MAX_PATH); - else - strncpy(path, ".\\", MAX_PATH); - - SetCurrentDirectoryA(path); -} - -/* does current dir contain str */ -static INLINE int CurrentDir(const char* str) -{ - char path[MAX_PATH]; - char* baseName; - - GetCurrentDirectoryA(sizeof(path), path); - - baseName = strrchr(path, '\\'); - if (baseName) - baseName++; - else - baseName = path; - - if (strstr(baseName, str)) - return 1; - - return 0; -} - -#elif defined(CYASSL_MDK_ARM) - /* KEIL-RL File System does not support relative directry */ -#else - -#ifndef MAX_PATH - #define MAX_PATH 256 -#endif - -/* do back x number of directories */ -static INLINE void ChangeDirBack(int x) -{ - char path[MAX_PATH]; - - if (x == 1) - strncpy(path, "../", MAX_PATH); - else if (x == 2) - strncpy(path, "../../", MAX_PATH); - else if (x == 3) - strncpy(path, "../../../", MAX_PATH); - else if (x == 4) - strncpy(path, "../../../../", MAX_PATH); - else - strncpy(path, "./", MAX_PATH); - - if (chdir(path) < 0) - printf("chdir to %s failed\n", path); -} - -/* does current dir contain str */ -static INLINE int CurrentDir(const char* str) -{ - char path[MAX_PATH]; - char* baseName; - - if (getcwd(path, sizeof(path)) == NULL) { - printf("no current dir?\n"); - return 0; - } - - baseName = strrchr(path, '/'); - if (baseName) - baseName++; - else - baseName = path; - - if (strstr(baseName, str)) - return 1; - - return 0; -} - -#endif /* USE_WINDOWS_API */ - - -#ifdef USE_CYASSL_MEMORY - - typedef struct memoryStats { - size_t totalAllocs; /* number of allocations */ - size_t totalBytes; /* total number of bytes allocated */ - size_t peakBytes; /* concurrent max bytes */ - size_t currentBytes; /* total current bytes in use */ - } memoryStats; - - typedef struct memHint { - size_t thisSize; /* size of this memory */ - void* thisMemory; /* actual memory for user */ - } memHint; - - typedef struct memoryTrack { - union { - memHint hint; - byte alignit[16]; /* make sure we have strong alignment */ - } u; - } memoryTrack; - - #if defined(CYASSL_TRACK_MEMORY) - #define DO_MEM_STATS - static memoryStats ourMemStats; - #endif - - static INLINE void* TrackMalloc(size_t sz) - { - memoryTrack* mt; - - if (sz == 0) - return NULL; - - mt = (memoryTrack*)malloc(sizeof(memoryTrack) + sz); - if (mt == NULL) - return NULL; - - mt->u.hint.thisSize = sz; - mt->u.hint.thisMemory = (byte*)mt + sizeof(memoryTrack); - -#ifdef DO_MEM_STATS - ourMemStats.totalAllocs++; - ourMemStats.totalBytes += sz; - ourMemStats.currentBytes += sz; - if (ourMemStats.currentBytes > ourMemStats.peakBytes) - ourMemStats.peakBytes = ourMemStats.currentBytes; -#endif - - return mt->u.hint.thisMemory; - } - - - static INLINE void TrackFree(void* ptr) - { - memoryTrack* mt; - - if (ptr == NULL) - return; - - mt = (memoryTrack*)ptr; - --mt; /* same as minus sizeof(memoryTrack), removes header */ - -#ifdef DO_MEM_STATS - ourMemStats.currentBytes -= mt->u.hint.thisSize; -#endif - - free(mt); - } - - - static INLINE void* TrackRealloc(void* ptr, size_t sz) - { - void* ret = TrackMalloc(sz); - - if (ptr) { - /* if realloc is bigger, don't overread old ptr */ - memoryTrack* mt = (memoryTrack*)ptr; - --mt; /* same as minus sizeof(memoryTrack), removes header */ - - if (mt->u.hint.thisSize < sz) - sz = mt->u.hint.thisSize; - } - - if (ret && ptr) - memcpy(ret, ptr, sz); - - if (ret) - TrackFree(ptr); - - return ret; - } - - static INLINE void InitMemoryTracker(void) - { - if (CyaSSL_SetAllocators(TrackMalloc, TrackFree, TrackRealloc) != 0) - err_sys("CyaSSL SetAllocators failed for track memory"); - - #ifdef DO_MEM_STATS - ourMemStats.totalAllocs = 0; - ourMemStats.totalBytes = 0; - ourMemStats.peakBytes = 0; - ourMemStats.currentBytes = 0; - #endif - } - - static INLINE void ShowMemoryTracker(void) - { - #ifdef DO_MEM_STATS - printf("total Allocs = %9lu\n", - (unsigned long)ourMemStats.totalAllocs); - printf("total Bytes = %9lu\n", - (unsigned long)ourMemStats.totalBytes); - printf("peak Bytes = %9lu\n", - (unsigned long)ourMemStats.peakBytes); - printf("current Bytes = %9lu\n", - (unsigned long)ourMemStats.currentBytes); - #endif - } - -#endif /* USE_CYASSL_MEMORY */ - - -#ifdef HAVE_STACK_SIZE - -typedef THREAD_RETURN CYASSL_THREAD (*thread_func)(void* args); - - -static INLINE void StackSizeCheck(func_args* args, thread_func tf) -{ - int ret, i, used; - unsigned char* myStack; - int stackSize = 1024*128; - pthread_attr_t myAttr; - pthread_t threadId; - -#ifdef PTHREAD_STACK_MIN - if (stackSize < PTHREAD_STACK_MIN) - stackSize = PTHREAD_STACK_MIN; -#endif - - ret = posix_memalign((void**)&myStack, sysconf(_SC_PAGESIZE), stackSize); - if (ret != 0) - err_sys("posix_memalign failed\n"); - - memset(myStack, 0x01, stackSize); - - ret = pthread_attr_init(&myAttr); - if (ret != 0) - err_sys("attr_init failed"); - - ret = pthread_attr_setstack(&myAttr, myStack, stackSize); - if (ret != 0) - err_sys("attr_setstackaddr failed"); - - ret = pthread_create(&threadId, &myAttr, tf, args); - if (ret != 0) { - perror("pthread_create failed"); - exit(EXIT_FAILURE); - } - - ret = pthread_join(threadId, NULL); - if (ret != 0) - err_sys("pthread_join failed"); - - for (i = 0; i < stackSize; i++) { - if (myStack[i] != 0x01) { - break; - } - } - - used = stackSize - i; - printf("stack used = %d\n", used); -} - - -#endif /* HAVE_STACK_SIZE */ - - -#ifdef STACK_TRAP - -/* good settings - --enable-debug --disable-shared C_EXTRA_FLAGS="-DUSER_TIME -DTFM_TIMING_RESISTANT -DPOSITIVE_EXP_ONLY -DSTACK_TRAP" - -*/ - -#ifdef HAVE_STACK_SIZE - /* client only for now, setrlimit will fail if pthread_create() called */ - /* STACK_SIZE does pthread_create() on client */ - #error "can't use STACK_TRAP with STACK_SIZE, setrlimit will fail" -#endif /* HAVE_STACK_SIZE */ - -static INLINE void StackTrap(void) -{ - struct rlimit rl; - if (getrlimit(RLIMIT_STACK, &rl) != 0) - err_sys("getrlimit failed"); - printf("rlim_cur = %llu\n", rl.rlim_cur); - rl.rlim_cur = 1024*21; /* adjust trap size here */ - if (setrlimit(RLIMIT_STACK, &rl) != 0) { - perror("setrlimit"); - err_sys("setrlimit failed"); - } -} - -#else /* STACK_TRAP */ - -static INLINE void StackTrap(void) -{ -} - -#endif /* STACK_TRAP */ - - -#ifdef ATOMIC_USER - -/* Atomic Encrypt Context example */ -typedef struct AtomicEncCtx { - int keySetup; /* have we done key setup yet */ - Aes aes; /* for aes example */ -} AtomicEncCtx; - - -/* Atomic Decrypt Context example */ -typedef struct AtomicDecCtx { - int keySetup; /* have we done key setup yet */ - Aes aes; /* for aes example */ -} AtomicDecCtx; - - -static INLINE int myMacEncryptCb(CYASSL* ssl, unsigned char* macOut, - const unsigned char* macIn, unsigned int macInSz, int macContent, - int macVerify, unsigned char* encOut, const unsigned char* encIn, - unsigned int encSz, void* ctx) -{ - int ret; - Hmac hmac; - byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; - AtomicEncCtx* encCtx = (AtomicEncCtx*)ctx; - const char* tlsStr = "TLS"; - - /* example supports (d)tls aes */ - if (CyaSSL_GetBulkCipher(ssl) != cyassl_aes) { - printf("myMacEncryptCb not using AES\n"); - return -1; - } - - if (strstr(CyaSSL_get_version(ssl), tlsStr) == NULL) { - printf("myMacEncryptCb not using (D)TLS\n"); - return -1; - } - - /* hmac, not needed if aead mode */ - CyaSSL_SetTlsHmacInner(ssl, myInner, macInSz, macContent, macVerify); - - ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), - CyaSSL_GetMacSecret(ssl, macVerify), CyaSSL_GetHmacSize(ssl)); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, macIn, macInSz); - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, macOut); - if (ret != 0) - return ret; - - - /* encrypt setup on first time */ - if (encCtx->keySetup == 0) { - int keyLen = CyaSSL_GetKeySize(ssl); - const byte* key; - const byte* iv; - - if (CyaSSL_GetSide(ssl) == CYASSL_CLIENT_END) { - key = CyaSSL_GetClientWriteKey(ssl); - iv = CyaSSL_GetClientWriteIV(ssl); - } - else { - key = CyaSSL_GetServerWriteKey(ssl); - iv = CyaSSL_GetServerWriteIV(ssl); - } - - ret = AesSetKey(&encCtx->aes, key, keyLen, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("AesSetKey failed in myMacEncryptCb\n"); - return ret; - } - encCtx->keySetup = 1; - } - - /* encrypt */ - return AesCbcEncrypt(&encCtx->aes, encOut, encIn, encSz); -} - - -static INLINE int myDecryptVerifyCb(CYASSL* ssl, - unsigned char* decOut, const unsigned char* decIn, - unsigned int decSz, int macContent, int macVerify, - unsigned int* padSz, void* ctx) -{ - AtomicDecCtx* decCtx = (AtomicDecCtx*)ctx; - int ret = 0; - int macInSz = 0; - int ivExtra = 0; - int digestSz = CyaSSL_GetHmacSize(ssl); - unsigned int pad = 0; - unsigned int padByte = 0; - Hmac hmac; - byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; - byte verify[MAX_DIGEST_SIZE]; - const char* tlsStr = "TLS"; - - /* example supports (d)tls aes */ - if (CyaSSL_GetBulkCipher(ssl) != cyassl_aes) { - printf("myMacEncryptCb not using AES\n"); - return -1; - } - - if (strstr(CyaSSL_get_version(ssl), tlsStr) == NULL) { - printf("myMacEncryptCb not using (D)TLS\n"); - return -1; - } - - /*decrypt */ - if (decCtx->keySetup == 0) { - int keyLen = CyaSSL_GetKeySize(ssl); - const byte* key; - const byte* iv; - - /* decrypt is from other side (peer) */ - if (CyaSSL_GetSide(ssl) == CYASSL_SERVER_END) { - key = CyaSSL_GetClientWriteKey(ssl); - iv = CyaSSL_GetClientWriteIV(ssl); - } - else { - key = CyaSSL_GetServerWriteKey(ssl); - iv = CyaSSL_GetServerWriteIV(ssl); - } - - ret = AesSetKey(&decCtx->aes, key, keyLen, iv, AES_DECRYPTION); - if (ret != 0) { - printf("AesSetKey failed in myDecryptVerifyCb\n"); - return ret; - } - decCtx->keySetup = 1; - } - - /* decrypt */ - ret = AesCbcDecrypt(&decCtx->aes, decOut, decIn, decSz); - - if (CyaSSL_GetCipherType(ssl) == CYASSL_AEAD_TYPE) { - *padSz = CyaSSL_GetAeadMacSize(ssl); - return 0; /* hmac, not needed if aead mode */ - } - - if (CyaSSL_GetCipherType(ssl) == CYASSL_BLOCK_TYPE) { - pad = *(decOut + decSz - 1); - padByte = 1; - if (CyaSSL_IsTLSv1_1(ssl)) - ivExtra = CyaSSL_GetCipherBlockSize(ssl); - } - - *padSz = CyaSSL_GetHmacSize(ssl) + pad + padByte; - macInSz = decSz - ivExtra - digestSz - pad - padByte; - - CyaSSL_SetTlsHmacInner(ssl, myInner, macInSz, macContent, macVerify); - - ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), - CyaSSL_GetMacSecret(ssl, macVerify), digestSz); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, decOut + ivExtra, macInSz); - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, verify); - if (ret != 0) - return ret; - - if (memcmp(verify, decOut + decSz - digestSz - pad - padByte, - digestSz) != 0) { - printf("myDecryptVerify verify failed\n"); - return -1; - } - - return ret; -} - - -static INLINE void SetupAtomicUser(CYASSL_CTX* ctx, CYASSL* ssl) -{ - AtomicEncCtx* encCtx; - AtomicDecCtx* decCtx; - - encCtx = (AtomicEncCtx*)malloc(sizeof(AtomicEncCtx)); - if (encCtx == NULL) - err_sys("AtomicEncCtx malloc failed"); - memset(encCtx, 0, sizeof(AtomicEncCtx)); - - decCtx = (AtomicDecCtx*)malloc(sizeof(AtomicDecCtx)); - if (decCtx == NULL) { - free(encCtx); - err_sys("AtomicDecCtx malloc failed"); - } - memset(decCtx, 0, sizeof(AtomicDecCtx)); - - CyaSSL_CTX_SetMacEncryptCb(ctx, myMacEncryptCb); - CyaSSL_SetMacEncryptCtx(ssl, encCtx); - - CyaSSL_CTX_SetDecryptVerifyCb(ctx, myDecryptVerifyCb); - CyaSSL_SetDecryptVerifyCtx(ssl, decCtx); -} - - -static INLINE void FreeAtomicUser(CYASSL* ssl) -{ - AtomicEncCtx* encCtx = CyaSSL_GetMacEncryptCtx(ssl); - AtomicDecCtx* decCtx = CyaSSL_GetDecryptVerifyCtx(ssl); - - free(decCtx); - free(encCtx); -} - -#endif /* ATOMIC_USER */ - - -#ifdef HAVE_PK_CALLBACKS - -#ifdef HAVE_ECC - -static INLINE int myEccSign(CYASSL* ssl, const byte* in, word32 inSz, - byte* out, word32* outSz, const byte* key, word32 keySz, void* ctx) -{ - RNG rng; - int ret; - word32 idx = 0; - ecc_key myKey; - - (void)ssl; - (void)ctx; - - ret = InitRng(&rng); - if (ret != 0) - return ret; - - ecc_init(&myKey); - - ret = EccPrivateKeyDecode(key, &idx, &myKey, keySz); - if (ret == 0) - ret = ecc_sign_hash(in, inSz, out, outSz, &rng, &myKey); - ecc_free(&myKey); - - return ret; -} - - -static INLINE int myEccVerify(CYASSL* ssl, const byte* sig, word32 sigSz, - const byte* hash, word32 hashSz, const byte* key, word32 keySz, - int* result, void* ctx) -{ - int ret; - ecc_key myKey; - - (void)ssl; - (void)ctx; - - ecc_init(&myKey); - - ret = ecc_import_x963(key, keySz, &myKey); - if (ret == 0) - ret = ecc_verify_hash(sig, sigSz, hash, hashSz, result, &myKey); - ecc_free(&myKey); - - return ret; -} - -#endif /* HAVE_ECC */ - -#ifndef NO_RSA - -static INLINE int myRsaSign(CYASSL* ssl, const byte* in, word32 inSz, - byte* out, word32* outSz, const byte* key, word32 keySz, void* ctx) -{ - RNG rng; - int ret; - word32 idx = 0; - RsaKey myKey; - - (void)ssl; - (void)ctx; - - ret = InitRng(&rng); - if (ret != 0) - return ret; - - InitRsaKey(&myKey, NULL); - - ret = RsaPrivateKeyDecode(key, &idx, &myKey, keySz); - if (ret == 0) - ret = RsaSSL_Sign(in, inSz, out, *outSz, &myKey, &rng); - if (ret > 0) { /* save and convert to 0 success */ - *outSz = ret; - ret = 0; - } - FreeRsaKey(&myKey); - - return ret; -} - - -static INLINE int myRsaVerify(CYASSL* ssl, byte* sig, word32 sigSz, - byte** out, - const byte* key, word32 keySz, - void* ctx) -{ - int ret; - word32 idx = 0; - RsaKey myKey; - - (void)ssl; - (void)ctx; - - InitRsaKey(&myKey, NULL); - - ret = RsaPublicKeyDecode(key, &idx, &myKey, keySz); - if (ret == 0) - ret = RsaSSL_VerifyInline(sig, sigSz, out, &myKey); - FreeRsaKey(&myKey); - - return ret; -} - - -static INLINE int myRsaEnc(CYASSL* ssl, const byte* in, word32 inSz, - byte* out, word32* outSz, const byte* key, - word32 keySz, void* ctx) -{ - int ret; - word32 idx = 0; - RsaKey myKey; - RNG rng; - - (void)ssl; - (void)ctx; - - ret = InitRng(&rng); - if (ret != 0) - return ret; - - InitRsaKey(&myKey, NULL); - - ret = RsaPublicKeyDecode(key, &idx, &myKey, keySz); - if (ret == 0) { - ret = RsaPublicEncrypt(in, inSz, out, *outSz, &myKey, &rng); - if (ret > 0) { - *outSz = ret; - ret = 0; /* reset to success */ - } - } - FreeRsaKey(&myKey); - - return ret; -} - -static INLINE int myRsaDec(CYASSL* ssl, byte* in, word32 inSz, - byte** out, - const byte* key, word32 keySz, void* ctx) -{ - int ret; - word32 idx = 0; - RsaKey myKey; - - (void)ssl; - (void)ctx; - - InitRsaKey(&myKey, NULL); - - ret = RsaPrivateKeyDecode(key, &idx, &myKey, keySz); - if (ret == 0) { - ret = RsaPrivateDecryptInline(in, inSz, out, &myKey); - } - FreeRsaKey(&myKey); - - return ret; -} - -#endif /* NO_RSA */ - -static INLINE void SetupPkCallbacks(CYASSL_CTX* ctx, CYASSL* ssl) -{ - (void)ctx; - (void)ssl; - - #ifdef HAVE_ECC - CyaSSL_CTX_SetEccSignCb(ctx, myEccSign); - CyaSSL_CTX_SetEccVerifyCb(ctx, myEccVerify); - #endif /* HAVE_ECC */ - #ifndef NO_RSA - CyaSSL_CTX_SetRsaSignCb(ctx, myRsaSign); - CyaSSL_CTX_SetRsaVerifyCb(ctx, myRsaVerify); - CyaSSL_CTX_SetRsaEncCb(ctx, myRsaEnc); - CyaSSL_CTX_SetRsaDecCb(ctx, myRsaDec); - #endif /* NO_RSA */ -} - -#endif /* HAVE_PK_CALLBACKS */ - - - - - -#if defined(__hpux__) || defined(__MINGW32__) - -/* HP/UX doesn't have strsep, needed by test/suites.c */ -static INLINE char* strsep(char **stringp, const char *delim) -{ - char* start; - char* end; - - start = *stringp; - if (start == NULL) - return NULL; - - if ((end = strpbrk(start, delim))) { - *end++ = '\0'; - *stringp = end; - } else { - *stringp = NULL; - } - - return start; -} - -#endif /* __hpux__ */ - -#endif /* CyaSSL_TEST_H */ - diff --git a/project1/cyassl-3.0.0/cyassl/version.h b/project1/cyassl-3.0.0/cyassl/version.h deleted file mode 100644 index 9df3246e..00000000 --- a/project1/cyassl-3.0.0/cyassl/version.h +++ /dev/null @@ -1,35 +0,0 @@ -/* cyassl_version.h.in - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#define LIBCYASSL_VERSION_STRING "3.0.0" -#define LIBCYASSL_VERSION_HEX 0x03000000 - -#ifdef __cplusplus -} -#endif - diff --git a/project1/cyassl-3.0.0/cyassl/version.h.in b/project1/cyassl-3.0.0/cyassl/version.h.in deleted file mode 100644 index ee1d639c..00000000 --- a/project1/cyassl-3.0.0/cyassl/version.h.in +++ /dev/null @@ -1,35 +0,0 @@ -/* cyassl_version.h.in - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#define LIBCYASSL_VERSION_STRING "@VERSION@" -#define LIBCYASSL_VERSION_HEX @HEX_VERSION@ - -#ifdef __cplusplus -} -#endif - diff --git a/project1/cyassl-3.0.0/doc/README.txt b/project1/cyassl-3.0.0/doc/README.txt deleted file mode 100644 index d9b367be..00000000 --- a/project1/cyassl-3.0.0/doc/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -The CyaSSL manual is availalbe at: -http://www.yassl.com/documentation/CyaSSL-Manual.pdf - diff --git a/project1/cyassl-3.0.0/doc/include.am b/project1/cyassl-3.0.0/doc/include.am deleted file mode 100644 index 5bef623a..00000000 --- a/project1/cyassl-3.0.0/doc/include.am +++ /dev/null @@ -1,5 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -dist_doc_DATA+= doc/README.txt diff --git a/project1/cyassl-3.0.0/examples/client/.deps/.dirstamp b/project1/cyassl-3.0.0/examples/client/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/examples/client/.deps/client.Po b/project1/cyassl-3.0.0/examples/client/.deps/client.Po deleted file mode 100644 index dbdd956e..00000000 --- a/project1/cyassl-3.0.0/examples/client/.deps/client.Po +++ /dev/null @@ -1,268 +0,0 @@ -examples/client/client.o: examples/client/client.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h cyassl/ssl.h \ - cyassl/version.h /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po b/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po deleted file mode 100644 index 2245eca4..00000000 --- a/project1/cyassl-3.0.0/examples/client/.deps/tests_unit_test-client.Po +++ /dev/null @@ -1,269 +0,0 @@ -examples/client/tests_unit_test-client.o: examples/client/client.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ - /usr/include/features.h /usr/include/stdc-predef.h \ - /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po b/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po deleted file mode 100644 index 0b86e257..00000000 --- a/project1/cyassl-3.0.0/examples/client/.deps/testsuite_testsuite_test-client.Po +++ /dev/null @@ -1,269 +0,0 @@ -examples/client/testsuite_testsuite_test-client.o: \ - examples/client/client.c config.h cyassl/ctaocrypt/settings.h \ - cyassl/ctaocrypt/visibility.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/client/client.h: diff --git a/project1/cyassl-3.0.0/examples/client/.dirstamp b/project1/cyassl-3.0.0/examples/client/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/examples/client/.libs/client b/project1/cyassl-3.0.0/examples/client/.libs/client deleted file mode 100755 index bd93ed2c06ec441db6dccf85cabf6a2dcff29b44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23479 zcmeHve|%KMx%UJXTou@e)Eki2V_h^@5)z0s2Gj(?FO8Uzh*YhcO|r?RY)mZo<1ZSlb>HuI=1lhF z7~9YLdH;JqJusR1&hyMO&pb2p%sFT0%q=UMR+W^L2z^ZwlLb-qD=v2p;+@MCrA8Ry zR8cNICe9X9kwsd~R`4JgD8MiUc`k&>2(7@a+gxsjGl3aML$(Zvgg{w_Sr-ez!1AJ0 z(MK*7V&oZ@o1u1+5E~I#FX>2%_dtISGzKk{bk@NTL`6Z=&Cm$UplQv2G&|dBg=pLB zax-{AW6<Ls3)B0tBgk~7bzOclD>M~ z)%dI0L78O;EISKBk zKzgc!{!@p3^BnSfY~`unmmKAnIq>%#_?Sc9We$A3qkUONeU%P*a~!zWA@6gJ^7lIA z?{e_p>Y)F|VUN=t_3d=fyB&C`t$qXPZ#c>yv(ahKuQ_nRq2FGIeEK_mvHVpUAT|&l zvtiPk9rfoN<+nNLXE^Bp>A=5s=vU^@FYb_c2)O)b@ZGpd;Q@aQyk-o~79)_?`E8e* z#m*2O@ys~>*}{eTkAG2>pD9ik!>F$j{FFCSz}>+Icl7(?@em#GMZ&kX^-5o7AQtHE ziJO5~>y;})k#L~Z-yRAGpRc<&686PSf6VmxgzxgrzV#O0iV#Eu;;Q(Bg;(_ZTbo)o zSNj(EIzl~xu<7d!n88S=0HLL&$rldXsFU3R(-(-vA~BuOX@=rH=5{1vF%~s@dIOP! zX{YP-iq?(3I9N9aVm)2`IyV;Z%bFUM4&ycO^@MxIWOYQs;Xub2q_|MT-)YH1y2Eew zM8a_`nG6oyQFR|3|tZD_jUDPC|H`c1k8qzG)W{jW|6fvYpw_d{NY4Y^Ro{zOzhUtHFN}GW=~fS ztQ+uk1gVF;A~gacALw~DbpnBQlgEPzvomsISU_O7$F7MUP0ECtLXnAhPq^C`j)dFM zxJ{&31Ls2q@9KbgRr_Z#Y+8D5lEzWPta`$szIpM4*|JlL-Db7Q7Yo4tW1YEj{dzSu zFbiYQk<+)AGj|D7Q8UPaPFy8ALXmhtbajNykeuX-%eVF_6zzn0rPw%{7cfPj4-)_q zV;#Ymi1&1d{UO3|N3>r=6J}h*10ha|-as!oqNv*JB1b3?W`zHuBiPv!6Fp&=&)?Y@ zle{PnbFz|16s7$fD{vznW`8u`Yv*JV7!tuq+-&cc!w#t9#!hC+Dc;rT?-zbE(j(%b zKp@JhI(nm!K(A#vB92+%3v~KTKM3vdxXMRXxKpfdTDyFOZxPI)Q;X^O=yWH^zdEgR zHC9xcb0&kl##4y+EMTWu0Ff@QVvTeiEXCl$-EQ$8?|n6uQ>m+0hi zl|b$*7M=J^Nq31n=q#i7CynvH_pHl3^;{vQ9dWr&!Fo{27|P6I3^`?tQFbn4JX{!z zPr@PgvI&<6pGhTuIXWWSXXS@>q&v+I3pYdw+KjSq*v?Pzaa}Q!bY&&o|#AK516$*ucA#+M@ zDn?E6arboxMBySAYAeih<1cCyg?ZDE3No2L2KK_dQex8bMEO8BSGjYAdwZt2V zt0Z1V+(v9jTu;mf5I0Nw5OFhcy~KNo zHxgG#{3vl7u_5sgagexF;>U@j#6sdHiTj90I6vk+O}v%(n8Zhjw-X3#6uDv zCBB<@kHjw!?7rQSEv7&JYIIlGZgC#8R~|4-+X9QoO3qU692Wx=28g6T%DOBeq6;RERt*+;QbV9mLN0z~3WDc_yj z0+Sq^!n~5hZ$YzvAAQEntf1_!Thxn{$*Kuo*5hZ?l zWy#f?&3s4E%0Oeq0`Z!A3xxvWD)J&Wt$2$SW9^mswN{L^P~weNyugxEZ(*!mpx3)0 zwJU-Cz=_1!hmwtCCr6Tb1ds90uqX2fNdpCQ%GS$7qG_q=ZS!P*=tk2U zy`jvqJzFoU@C-bPJD#n#ln77iyGUh|e`d>I>GU#hZrw>PfS%NKxXW3cmeN+GWzE@0 zN%}!b|H3KT8@+v=$41jz&^yUV$52{z4#!7s2RermRphFp|Hqj z6sVV?ZdQQi7Wsb$7%No{)a3SJ`2sT!)~QSC(E}q(Q6cN~>rWY&K8^QvOuj zP=dKeGEYSg0AHSq{7HBNfQ=FyS73_-F98%=x{t#jgEBel@_g=bkn)e>CKe?Z$cB9v zImtr7Gw=X&_>ca0%|04<%)*AoNgDc9BdiV-sXb z+8U|!8_E5Xk|(ElKL2anrDsx^;7h8fb6at zQ5B|si6Kk{{&E6}92zKiQb&-35!VRs^by!c4)|9=O^%j$1|9+(1nFAyhBNzYY|{-Hyf2JKmw$vM?3>2SO$hNrq@i&gN$+; zD;uBlLVK{XKF`2p<-DD zmNz{YD#DwdGa9{Z65b9z2{%H(7k>>UtB0UT-@vP$Ylb}Y6@TKKu0tv{iS~+i?H_V? zrBmM9P&oeu{P8^YFCw>?))6Nf`$}AiPkeZR^a5}0ZgdICv-07M%=o6&M>9G9)=bOP zmu3W9u$x9fYsiS!r)*#D5{i!Vc%eUm9-#! zshHDUq6wcyJ&kf1oixOe+d(*S=N%TKbS}oh4IRn+$2F-;# zq-`M}qXe+%^-{=%s0R7KpUy-fJe!RC4w|^UQno910oo6JWRrdasn!CF6%9>i2QbQg z2bA<{Qh&DN2@Jwi2OhgsPxe?N@)%gF4|BYqL(5~ldmg(q_kCEP`milkA6- zG}iD;Xi2N_vKX@|?=c|GO^ms*0sIH5VslNLQ+jH3QzCutb`N?ST;rxz`VA~e6q!vn z@a_TRZ1O+;fE1d4d<0@$UNl_f24TfwYxB+UI8cw4;bpI!S-SE+K`~YNZMem7Rz3}t zLkOoN3!!n=?EIS(dMdOU7_toF+1?1jD9P@WW>HRB&g&OYJLmNRu;_Vw6nPlbUSa+d zq9$RMW*WV`agek8a%hC?T47$R>?@6xI}cSlyg!%Y+%VWt!S*{)!E^!hLJpTJHk8gN z_mstO3pL2+-UrL@8T1zWU$@-IsY5`WDmUXdzmuX3teC(HOv_J74(GSdR=j~ zF}I!qx8SbVtj#9d{-{_Vfxv9?0Q~_QsBX*g@=E0VU_Y4h24!dAww#%nE#74?lRIrH zWBe987ms=dj>3;-AN9Tm7R!q4?yD%~PqKYCUwJU)B3aV2$v2b(%I$v5(kU@>c=Z?y ze5ACea;#&b?vtW!IXe8&fua7{mh~w!_kFY?IXcNRa2^yv8*6Z@gJ_E|t2vRI(S}U| z2|fX|<6Sh`nX6W&TqZljYR_~U5Qh8+YC?V!I$nCkI}~rLT%P0&CzNVs)v}g^n}zm} z32_->6zrqT?|~qxk0&(`-7UF2sc)j7o;BCP0+#RGifnjE+|dlYYOe7-mJqouD6br6 zw8RCU2Jy3{6+EdFT@o)DQ5NK8??ll>TpQ1ZFK@ z{sD4WHySXUL$%+5)1lhU$fCQ=W9UP*+fisD)lQjMwL!2e)ow$|lR9XrcGyx)DAg!6 z|9#}qxgg?|#q37JAq?}iq9GhKa)$p2_9XyWdKbInlk?>u7OU-NL1S=@b9{rx;rND8 zEW4@%D|K61-h3B5oG07M#gbmVagR$q73Hr*R_+&+X5F{kgvLTsYR${83bQoZAE0Jh zs*-_*PF1Er6$qKg4ayli@qJCppWJo1BleK0gJ|0NG?M zlkej8HJj{V@^zWKhRK&@az5@5^1qVFEzEsJCO^g812WmgakL7>K%5RnVKOW0JVC659`K7N|`beuZTWF6&Q44)tqMa7HU7{fi-73+Dh596_ zhh(<#vl2xubiG77EwoOeAq&+@G-9DeKuP|Fqh2w}5&H}}aY4>9c-aN$WOVR-t_+cC(qfRKf7dqw!Q?$oxA_!6g=FPXCLzNooKQ!DdElzP*?bn0fSY!yy@ZG z=TK1wFKHBF{|pT6qpF@Y`yr+Z-CILgJ+#k2lzuDy(tB?`m}&KvXF^`@sk?8dbc>iZ zy|w8-gM4b}_F9mQECfJEDcV0ReLZ~Ci>PWYs?y5`6sU$BP$k=9E`$@B50>&wlh-@2 zBSqQ!;KD@WBV)NusapAlC^4z}@QMAC66=yD;V$n66IiTfWYN5Vp&zrPCsk6gw=gD2 z=B6U^F<1c3I{hm=y$-kF)^GvtYoVB%WA-G}FT=wdM>(VkCxn| z_j%Wrx{DIfMXAGy)3-g&u2-&SfD;yiT-gEZfdgXtF_bNz40JZE(1KUed<4-W;iW->9VG2FJrY_@p&cpBVaIB*+qYKoak1Y=!g`ZSU)_YDDiBE z#7#*qx%-st+$pdq?x;VmTxN)zXy_RzYuDt< z;KH~pCG8z_Wv&z%7!76H9;fkdxb6Uc8%Q26)x8ir552I(YgC`W8}3W8t7XAuvMRGO zU7L-TrlYQcT*^uw;rqqOkI3an{$2VAN5ST)X&I+Sl8={SNF1;`U^nGMAJ}(RX3a=) zXk>my3V?nIv|-GdB#+P4I{o6~Ql}cJ(`A-UyOfctCekUBq{x!dw2YS~Ev;mX%BxWM zMR@;Eoe7Ry{8!KNzskW{KZ2+Xmgb{UZZ>q8{~*QCSZQeYOO9$ZX|5dQ_Me9aufC?b zu%RXQ1bSxMfqBpt%EKX4Wxw|}=1A@&7RPLI1j+da_rE_0HD929CxYl&ERCqwjbshg zDBS)C8Iy-fF8*`kCDeA^4ZhDD7@j_8zur1v{jT03Yy951s8Rlq&N+*VOA+^V@YxvAK^iS?;`9&7(xgJ zuy@GlkUJG&yANEkKs?cl4N+q(H{N(-rP|ln5$P3`3%S26zOchz!9-;=V9S%+5kEA4 zQ=nh6U)J53i1)6GnO%KXHwWvYb(`x#bq#eLb(`wi>uzePYpQFFTvaEck(gwj;}TH5T@SI|F@{L9;hxtZ8j+URYgO zHT|^drwQsHcS>pvS^_b2m4R^;#ct04YK91F+aovGX+FN?*u>&wO~9g73yS5LIbMwF zD$y8dPjrj**jfkkh|0=^>c84a$B{8FZb>^$m=V(-G7Lj*w~Vt@7l#tX?B)GtAa0Ch zN1+p#4M(=M;nA5*<*i|9^u%RDnPrW%cmn%Jb-vtAC`YW-OqIcbX=SJ#g=2abxBnTf zE1G@lu4-J_)bQysayVjOc*iixA~6g|>|r%KqK5AFaf88Vv2QlDB*=1R%#U%7y@`=n zzmRj@klTkFcDdXy?5Y>x5Sy_dD)dHQRM-be` zW#fEsXHO?Rl-#WfKP9*L8aBL|$?dTm5DEdXN}n^e0EOxnsy z?5VT7+hVF>th=gpWgVx2YBhOjAnv-GA;=VsMYahWy=MnNDHU0}#ftcDrHh)-}A z_IQOVLdG)eHkBh`h1_B-UG5lDMSHQ^mj}Wf!Crq1eIf^s)ei0wmyTD}gl+TKNUN_3 z%vOC}4d)n*1&o%UKNjeu(~XM?Q&SD2RgQ0~VQQE|md7%#e+Z4n(VC-=bZ-D{3c?8!Sd=err zu89J>lezZrw==GT{1pkGh=|8`xa98FM-k)G68`WnzoBQ0mokwM^6`2#!m{{TGxBss zwF&V5>XP5jTP4o_lFPjWVHLs#gf4{52)82KiSPiz!w3fvo=12E;RM3eL6`e1g!2)W zAgn^zfY61o8R1rhI}sj0co^Xz!t)5PAe=y$`el?yI3HmN!YYIf2we!95pG4e6X5}b zhY=1UJdf}S!U=?_x1l`3`3Or8Rv~Oa=t9_xa4W){2oE4UjBpU)d4yLGP9RLhSqEn! zoR6>sVHLs#gf0Ya%+)Ja)EVVhwiH@|Sk#V?ANO+l!Ediwa5&@YgWK7<=%=sWa9US2mK==smN|1^Yu z4SBj=mS@<6K!3qBeMSgQtr=<7%RDXmCZw_POy<$&JPJMzel3rD#7P9rM<4Y#_~^UH zM}MjLb|6h%Sr5O{K92psw7tG`y`M*h<|~CSDaCf^HcbSLHX-C@RL#e;Nuuc7pVI+b z7x{Sc=P1obpWTROZ2f#ex)x1ak&iZL1792X1Rb??X?YI-kMZ%m5Ik^rH4|bj?;#ss z3VbQ>4Nk!K81i5W*~jvHlS_*-$gbr*g)~ed`MAcs{ULnMgNOQY%tuS?3oXCSRFt;1iDL3vdcfqXH|WYI|HI!amk`d9ExCBeFMk}=1C zzM5BK%waC!vr9P_Sue)|$Glx$+j=3cVWxFyc^cbe`Xl1WQgd}Kjl!yC`WJ;&4fG=l zt5(xrD6D29{er@(_w?F7S$Zrr&lO#=3C?GQmBO623abIH&rz5xJrvrDd8p`|(dsN9 zg?T4bJZE9D9LYk?A4TVg1;+SSSj{5N2Zh-y>K;nrnG$n+E37;=$Fag{=IVQt$=00{ z$EBj5CCkh4htyg}@is@M7SA4fFTTeKx!j_>ONB^<4+N)<(Yu_21Jo*l-VUosB;R{H%@s zKY)K?!ztha8-Et~D>i%H3H;r=i}l?Hyw8Sr0T0>mcYyD=VQvMv*M<)OKWM{G1NVJf z%lC-?0uKJ~B7PBgE3kon!8clB1o*jKF83n1296KzBYSZEWg5mKW)PX=n3GRnD4aT%t_Nl23Y$S1LxM9G&vWwUv%(Yg8t44Crj9JtAWZvb9k&Brq) z%@*AbdJ34I6#J#T>Ed<={eL>}4;}cR1OF0ujn%$V_>UJH^w%7?1P@odKS%X)KDvQ< zf34f=0oE7Wdp>ZLtvw5Yi{pE?SnA+k1w7?J^*qM;aD{{3=D>Xp{3Qpz&w=@ktiGt< zQx5!F8#X|H!-mOUB3q6GF5>A9T;af%Iq-T1jsk0YaC~jC(GAGI(}r2!*B$r=4*ZM* z|F;9b3#{)4d9Iec@r7Jolt06E&r5uc17GUEq66Dg%tTjLB@f8Ce8qZS)7q9+oU&Cs zi_2&B;@}{h#uXR(ge_Z^563t8xP1CoqPMpnMQli(lr@eu(C23j*jXbts#p;kQQ5S7d6lo)iWhxS zCu()#Vk@z@N+&e);zc@Vu};+J#6>!>L?^W58ZD70vn&JtbM5?$94UDpy;ae3?7Dj#`df;`GRKJ3ykD|_SJ0>5W2=h;&D{SZHW z`&L+|j>(^TSMk6wnYvP)m?YEd0}5O%f2{89$F?CHs#F=~yQWAYc4eTqg}*T4s3SY7 z9)}i4ljBaO`6_Fyt2>3S@zd)Xu3WnUTsDe43r_e}H(j;7 zp~-jEs#Ps3TYaq!%bQmEL~-j!eZ4+?i9=AH-P93Jj609(?;Hb$7kc<_mjj5SpzJx; z<{ZbtS%3RLyS~~bl`y0)+Tk;UiSVY%_CCS4Yt|W3>Y%F$Dq$JN@nJl3YywVeGl1SY z1fw`l7vrH?(SCbT+hEZrTUm{xnQW)c5mKVss-q5pQ^$AN#o5Y|8E-RrG9H>RcE*;S zTb{HvE<>LEWzVq$uH`{*9X$5SP8`>*@>g)(_7?jF9%lZnQ__5nqvP1r4?T!)!ejj` zE#)q_iO#lTAL=)|7B929I<14s#x=@k9~C$eZ9H+@xrjVWZ9KU%9`OaS1+RE;9$TXi zsr!(l(;YR9pT86)9hTfsVU!M%e`H8 z2FpsTou}Q=gXz{VO*5(k9OWTw9N@umV+0!VY&pAZeQH}*)ECqzL4M$*JlPIx;X^x$ z2fbNZaazc;;4D1hsfiyrKX1&e)|?xEDCOAMfl!!d`y9mdLlRh7g_SAl#XMXBiig71?+S*t=*>8e+ wS2&K9MB|Hx`q}v{Z)ndNclst9fC(tiF0?b*8iSorA2^P3+>wICa*M_P0Sa(7{Qv*} diff --git a/project1/cyassl-3.0.0/examples/client/client b/project1/cyassl-3.0.0/examples/client/client deleted file mode 100755 index fd94a2c9..00000000 --- a/project1/cyassl-3.0.0/examples/client/client +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/bash - -# examples/client/client - temporary wrapper script for .libs/client -# Generated by libtool (GNU libtool) 2.4.2 -# -# The examples/client/client program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/client/client.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "client:examples/client/client:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "client:examples/client/client:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "client:examples/client/client:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'client' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj b/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj deleted file mode 100755 index c8910039..00000000 --- a/project1/cyassl-3.0.0/examples/client/client-ntru.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/client/client.c b/project1/cyassl-3.0.0/examples/client/client.c deleted file mode 100644 index a4720165..00000000 --- a/project1/cyassl-3.0.0/examples/client/client.c +++ /dev/null @@ -1,851 +0,0 @@ -/* client.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#if defined(CYASSL_MDK_ARM) - #include - #include - #include - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) - /* in case memory tracker wants stats */ - #define CYASSL_TRACK_MEMORY -#endif - -#include -#include - -#include "examples/client/client.h" - - -#ifdef CYASSL_CALLBACKS - int handShakeCB(HandShakeInfo*); - int timeoutCB(TimeoutInfo*); - Timeval timeout; -#endif - - -static void NonBlockingSSL_Connect(CYASSL* ssl) -{ -#ifndef CYASSL_CALLBACKS - int ret = CyaSSL_connect(ssl); -#else - int ret = CyaSSL_connect_ex(ssl, handShakeCB, timeoutCB, timeout); -#endif - int error = CyaSSL_get_error(ssl, 0); - SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); - int select_ret; - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; - - if (error == SSL_ERROR_WANT_READ) - printf("... client would read block\n"); - else - printf("... client would write block\n"); - -#ifdef CYASSL_DTLS - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); -#endif - select_ret = tcp_select(sockfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - #ifndef CYASSL_CALLBACKS - ret = CyaSSL_connect(ssl); - #else - ret = CyaSSL_connect_ex(ssl,handShakeCB,timeoutCB,timeout); - #endif - error = CyaSSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } -#ifdef CYASSL_DTLS - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } -#endif - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) - err_sys("SSL_connect failed"); -} - - -static void Usage(void) -{ - printf("client " LIBCYASSL_VERSION_STRING - " NOTE: All files relative to CyaSSL home dir\n"); - printf("-? Help, print this usage\n"); - printf("-h Host to connect to, default %s\n", yasslIP); - printf("-p Port to connect on, not 0, default %d\n", yasslPort); - printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", - CLIENT_DEFAULT_VERSION); - printf("-l Cipher list\n"); - printf("-c Certificate file, default %s\n", cliCert); - printf("-k Key file, default %s\n", cliKey); - printf("-A Certificate Authority file, default %s\n", caCert); - printf("-b Benchmark connections and print stats\n"); - printf("-s Use pre Shared keys\n"); - printf("-t Track CyaSSL memory use\n"); - printf("-d Disable peer checks\n"); - printf("-g Send server HTTP GET\n"); - printf("-u Use UDP DTLS," - " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); - printf("-m Match domain name in cert\n"); - printf("-N Use Non-blocking sockets\n"); - printf("-r Resume session\n"); - printf("-f Fewer packets/group messages\n"); - printf("-x Disable client cert/key loading\n"); -#ifdef SHOW_SIZES - printf("-z Print structure sizes\n"); -#endif -#ifdef HAVE_SNI - printf("-S Use Host Name Indication\n"); -#endif -#ifdef HAVE_MAX_FRAGMENT - printf("-L Use Maximum Fragment Length [1-5]\n"); -#endif -#ifdef HAVE_TRUNCATED_HMAC - printf("-T Use Truncated HMAC\n"); -#endif -#ifdef HAVE_OCSP - printf("-o Perform OCSP lookup on peer certificate\n"); - printf("-O Perform OCSP lookup using as responder\n"); -#endif -#ifdef ATOMIC_USER - printf("-U Atomic User Record Layer Callbacks\n"); -#endif -#ifdef HAVE_PK_CALLBACKS - printf("-P Public Key Callbacks\n"); -#endif -} - - -#ifdef CYASSL_MDK_SHELL - #define exit(code) return(code) -#endif - - -THREAD_RETURN CYASSL_THREAD client_test(void* args) -{ - SOCKET_T sockfd = 0; - - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - CYASSL* ssl = 0; - - CYASSL* sslResume = 0; - CYASSL_SESSION* session = 0; - char resumeMsg[] = "resuming cyassl!"; - int resumeSz = sizeof(resumeMsg); - - char msg[32] = "hello cyassl!"; /* GET may make bigger */ - char reply[80]; - int input; - int msgSz = (int)strlen(msg); - - word16 port = yasslPort; - char* host = (char*)yasslIP; - char* domain = (char*)"www.yassl.com"; - - int ch; - int version = CLIENT_INVALID_VERSION; - int usePsk = 0; - int sendGET = 0; - int benchmark = 0; - int doDTLS = 0; - int matchName = 0; - int doPeerCheck = 1; - int nonBlocking = 0; - int resumeSession = 0; - int trackMemory = 0; - int useClientCert = 1; - int fewerPackets = 0; - int atomicUser = 0; - int pkCallbacks = 0; - char* cipherList = NULL; - char* verifyCert = (char*)caCert; - char* ourCert = (char*)cliCert; - char* ourKey = (char*)cliKey; - -#ifdef HAVE_SNI - char* sniHostName = NULL; -#endif -#ifdef HAVE_MAX_FRAGMENT - byte maxFragment = 0; -#endif -#ifdef HAVE_TRUNCATED_HMAC - byte truncatedHMAC = 0; -#endif - - -#ifdef HAVE_OCSP - int useOcsp = 0; - char* ocspUrl = NULL; -#endif - - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef NO_RSA - verifyCert = (char*)eccCert; - ourCert = (char*)cliEccCert; - ourKey = (char*)cliEccKey; -#endif - (void)resumeSz; - (void)session; - (void)sslResume; - (void)trackMemory; - (void)atomicUser; - (void)pkCallbacks; - - StackTrap(); - - while ((ch = mygetopt(argc, argv, - "?gdusmNrtfxUPh:p:v:l:A:c:k:b:zS:L:ToO:")) != -1) { - switch (ch) { - case '?' : - Usage(); - exit(EXIT_SUCCESS); - - case 'g' : - sendGET = 1; - break; - - case 'd' : - doPeerCheck = 0; - break; - - case 'u' : - doDTLS = 1; - break; - - case 's' : - usePsk = 1; - break; - - case 't' : - #ifdef USE_CYASSL_MEMORY - trackMemory = 1; - #endif - break; - - case 'm' : - matchName = 1; - break; - - case 'x' : - useClientCert = 0; - break; - - case 'f' : - fewerPackets = 1; - break; - - case 'U' : - #ifdef ATOMIC_USER - atomicUser = 1; - #endif - break; - - case 'P' : - #ifdef HAVE_PK_CALLBACKS - pkCallbacks = 1; - #endif - break; - - case 'h' : - host = myoptarg; - domain = myoptarg; - break; - - case 'p' : - port = (word16)atoi(myoptarg); - #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) - if (port == 0) - err_sys("port number cannot be 0"); - #endif - break; - - case 'v' : - version = atoi(myoptarg); - if (version < 0 || version > 3) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'l' : - cipherList = myoptarg; - break; - - case 'A' : - verifyCert = myoptarg; - break; - - case 'c' : - ourCert = myoptarg; - break; - - case 'k' : - ourKey = myoptarg; - break; - - case 'b' : - benchmark = atoi(myoptarg); - if (benchmark < 0 || benchmark > 1000000) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'N' : - nonBlocking = 1; - break; - - case 'r' : - resumeSession = 1; - break; - - case 'z' : - #ifndef CYASSL_LEANPSK - CyaSSL_GetObjectSize(); - #endif - break; - - case 'S' : - #ifdef HAVE_SNI - sniHostName = myoptarg; - #endif - break; - - case 'L' : - #ifdef HAVE_MAX_FRAGMENT - maxFragment = atoi(myoptarg); - if (maxFragment < CYASSL_MFL_2_9 || - maxFragment > CYASSL_MFL_2_13) { - Usage(); - exit(MY_EX_USAGE); - } - #endif - break; - - case 'T' : - #ifdef HAVE_TRUNCATED_HMAC - truncatedHMAC = 1; - #endif - break; - - case 'o' : - #ifdef HAVE_OCSP - useOcsp = 1; - #endif - break; - - case 'O' : - #ifdef HAVE_OCSP - useOcsp = 1; - ocspUrl = myoptarg; - #endif - break; - - default: - Usage(); - exit(MY_EX_USAGE); - } - } - - myoptind = 0; /* reset for test cases */ - - /* sort out DTLS versus TLS versions */ - if (version == CLIENT_INVALID_VERSION) { - if (doDTLS) - version = CLIENT_DTLS_DEFAULT_VERSION; - else - version = CLIENT_DEFAULT_VERSION; - } - else { - if (doDTLS) { - if (version == 3) - version = -2; - else - version = -1; - } - } - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - InitMemoryTracker(); -#endif - - switch (version) { -#ifndef NO_OLD_TLS - case 0: - method = CyaSSLv3_client_method(); - break; - - - #ifndef NO_TLS - case 1: - method = CyaTLSv1_client_method(); - break; - - case 2: - method = CyaTLSv1_1_client_method(); - break; - #endif /* NO_TLS */ - -#endif /* NO_OLD_TLS */ - -#ifndef NO_TLS - case 3: - method = CyaTLSv1_2_client_method(); - break; -#endif - -#ifdef CYASSL_DTLS - case -1: - method = CyaDTLSv1_client_method(); - break; - - case -2: - method = CyaDTLSv1_2_client_method(); - break; -#endif - - default: - err_sys("Bad SSL version"); - break; - } - - if (method == NULL) - err_sys("unable to get method"); - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - err_sys("unable to get ctx"); - - if (cipherList) - if (CyaSSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) - err_sys("client can't set cipher list 1"); - -#ifdef CYASSL_LEANPSK - usePsk = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - usePsk = 1; -#endif - - if (fewerPackets) - CyaSSL_CTX_set_group_messages(ctx); - - if (usePsk) { -#ifndef NO_PSK - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - if (cipherList == NULL) { - const char *defaultCipherList; - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); - } -#endif - useClientCert = 0; - } - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - if (cipherList == NULL) { - /* don't use EDH, can't sniff tmp keys */ - if (CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) { - err_sys("client can't set cipher list 3"); - } - } -#endif - -#ifdef HAVE_OCSP - if (useOcsp) { - if (ocspUrl != NULL) { - CyaSSL_CTX_SetOCSP_OverrideURL(ctx, ocspUrl); - CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE - | CYASSL_OCSP_URL_OVERRIDE); - } - else - CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE); - } -#endif - -#ifdef USER_CA_CB - CyaSSL_CTX_SetCACb(ctx, CaCb); -#endif - -#ifdef VERIFY_CALLBACK - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, myVerify); -#endif -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (useClientCert){ - if (CyaSSL_CTX_use_certificate_chain_file(ctx, ourCert) != SSL_SUCCESS) - err_sys("can't load client cert file, check file and run from" - " CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load client private key file, check file and run " - "from CyaSSL home dir"); - } - - if (!usePsk) { - if (CyaSSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - } -#endif -#if !defined(NO_CERTS) - if (!usePsk && doPeerCheck == 0) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); -#endif - -#ifdef HAVE_CAVIUM - CyaSSL_CTX_UseCavium(ctx, CAVIUM_DEV_ID); -#endif - -#ifdef HAVE_SNI - if (sniHostName) - if (CyaSSL_CTX_UseSNI(ctx, 0, sniHostName, XSTRLEN(sniHostName)) - != SSL_SUCCESS) - err_sys("UseSNI failed"); -#endif -#ifdef HAVE_MAX_FRAGMENT - if (maxFragment) - if (CyaSSL_CTX_UseMaxFragment(ctx, maxFragment) != SSL_SUCCESS) - err_sys("UseMaxFragment failed"); -#endif -#ifdef HAVE_TRUNCATED_HMAC - if (truncatedHMAC) - if (CyaSSL_CTX_UseTruncatedHMAC(ctx) != SSL_SUCCESS) - err_sys("UseTruncatedHMAC failed"); -#endif - - if (benchmark) { - /* time passed in number of connects give average */ - int times = benchmark; - int i = 0; - - double start = current_time(), avg; - - for (i = 0; i < times; i++) { - tcp_connect(&sockfd, host, port, doDTLS); - - ssl = CyaSSL_new(ctx); - CyaSSL_set_fd(ssl, sockfd); - if (CyaSSL_connect(ssl) != SSL_SUCCESS) - err_sys("SSL_connect failed"); - - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - CloseSocket(sockfd); - } - avg = current_time() - start; - avg /= times; - avg *= 1000; /* milliseconds */ - printf("CyaSSL_connect avg took: %8.3f milliseconds\n", avg); - - CyaSSL_CTX_free(ctx); - ((func_args*)args)->return_code = 0; - - exit(EXIT_SUCCESS); - } - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) - err_sys("unable to get SSL object"); - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(ssl, sockfd); -#ifdef HAVE_CRL - if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS) - err_sys("can't enable crl check"); - if (CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, 0) != SSL_SUCCESS) - err_sys("can't load crl, check crlfile and date validity"); - if (CyaSSL_SetCRL_Cb(ssl, CRL_CallBack) != SSL_SUCCESS) - err_sys("can't set crl callback"); -#endif -#ifdef ATOMIC_USER - if (atomicUser) - SetupAtomicUser(ctx, ssl); -#endif -#ifdef HAVE_PK_CALLBACKS - if (pkCallbacks) - SetupPkCallbacks(ctx, ssl); -#endif - if (matchName && doPeerCheck) - CyaSSL_check_domain_name(ssl, domain); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(ssl); - } - else if (CyaSSL_connect(ssl) != SSL_SUCCESS) { - /* see note at top of README */ - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("err = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); - err_sys("SSL_connect failed"); - /* if you're getting an error here */ - } -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - showPeer(ssl); - - if (sendGET) { - printf("SSL connect ok, sending GET...\n"); - msgSz = 28; - strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); - msg[msgSz] = '\0'; - } - if (CyaSSL_write(ssl, msg, msgSz) != msgSz) - err_sys("SSL_write failed"); - - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server response: %s\n", reply); - - if (sendGET) { /* get html */ - while (1) { - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("%s\n", reply); - } - else - break; - } - } - } - else if (input < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("CyaSSL_read failed"); - } - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - strncpy(msg, "break", 6); - msgSz = (int)strlen(msg); - /* try to send session close */ - CyaSSL_write(ssl, msg, msgSz); - } - session = CyaSSL_get_session(ssl); - sslResume = CyaSSL_new(ctx); - } -#endif - - if (doDTLS == 0) /* don't send alert after "break" command */ - CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */ -#ifdef ATOMIC_USER - if (atomicUser) - FreeAtomicUser(ssl); -#endif - CyaSSL_free(ssl); - CloseSocket(sockfd); - -#ifndef NO_SESSION_CACHE - if (resumeSession) { - if (doDTLS) { - SOCKADDR_IN_T addr; - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - build_addr(&addr, host, port, 1); - CyaSSL_dtls_set_peer(sslResume, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, host, port, 0); - } - CyaSSL_set_fd(sslResume, sockfd); - CyaSSL_set_session(sslResume, session); - - showPeer(sslResume); -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(sslResume, 1); - tcp_set_nonblocking(&sockfd); - NonBlockingSSL_Connect(sslResume); - } - else if (CyaSSL_connect(sslResume) != SSL_SUCCESS) - err_sys("SSL resume failed"); -#else - timeout.tv_sec = 2; - timeout.tv_usec = 0; - NonBlockingSSL_Connect(ssl); /* will keep retrying on timeout */ -#endif - - if (CyaSSL_session_reused(sslResume)) - printf("reused session id\n"); - else - printf("didn't reuse session id!!!\n"); - - if (CyaSSL_write(sslResume, resumeMsg, resumeSz) != resumeSz) - err_sys("SSL_write failed"); - - if (nonBlocking) { - /* give server a chance to bounce a message back to client */ - #ifdef USE_WINDOWS_API - Sleep(500); - #else - sleep(1); - #endif - } - - input = CyaSSL_read(sslResume, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server resume response: %s\n", reply); - } - - /* try to send session break */ - CyaSSL_write(sslResume, msg, msgSz); - - CyaSSL_shutdown(sslResume); - CyaSSL_free(sslResume); - CloseSocket(sockfd); - } -#endif /* NO_SESSION_CACHE */ - - CyaSSL_CTX_free(ctx); - - ((func_args*)args)->return_code = 0; - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - ShowMemoryTracker(); -#endif /* USE_CYASSL_MEMORY */ - - return 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) && !defined(STACK_TRAP) - CyaSSL_Debugging_ON(); -#endif - if (CurrentDir("client")) - ChangeDirBack(2); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); - -#ifdef HAVE_STACK_SIZE - StackSizeCheck(&args, client_test); -#else - client_test(&args); -#endif - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - - int myoptind = 0; - char* myoptarg = NULL; - -#endif /* NO_MAIN_DRIVER */ - - - -#ifdef CYASSL_CALLBACKS - - int handShakeCB(HandShakeInfo* info) - { - (void)info; - return 0; - } - - - int timeoutCB(TimeoutInfo* info) - { - (void)info; - return 0; - } - -#endif - diff --git a/project1/cyassl-3.0.0/examples/client/client.h b/project1/cyassl-3.0.0/examples/client/client.h deleted file mode 100644 index 61f0e8cc..00000000 --- a/project1/cyassl-3.0.0/examples/client/client.h +++ /dev/null @@ -1,25 +0,0 @@ -/* client.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#pragma once - -THREAD_RETURN CYASSL_THREAD client_test(void* args); - diff --git a/project1/cyassl-3.0.0/examples/client/client.o b/project1/cyassl-3.0.0/examples/client/client.o deleted file mode 100644 index 726aa9a8b9967724088f84175de61699adbf60a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18448 zcmeHOeSB2anLdF*Gl-qwS5dKE>!3lCA(I3M0X0AZSOcUaDr$9@%uJGz$;@=-4g{qF z&P>a6h_zO$)>>_~YW=7mwN=!mp;9Q@uC-g+YIoaO*WZ?GuxtGUKgd4Mx#!H>T+*)H z{bT>xtI2bobKdiw_q^vl@4ffju&J$mNkv7)M4_$Ph(a}+xz~kO_3N%UqLkoaQ zLFiae%z1|(Qmibrd)E|~xd5@A?Y(CMlY>R{5GYMAm5frU8e?{`y;RdtDosNh2Nu9( zx5Ff09c6*0!i@^$yiwnzxO4#cYQ<}mo)*PhCAL&T>*&ZNIgjG^SeJh%bMl_-G!}8~ zkzQio9sD)oDL&1n{HQr;^LZlEKHv1N@eDpyiK(}GW5orJY(B5nlYiz&AvSNS5T4v) zD3u*qSYUZ9Kjg_>cC-*n3sT#Xf*g4;QBin++P`?@)>iL;XUBoUMy!stPS)a_iB@SV zHMDV*joyJ~Pp+B8fr{qLoXwvTB4b!)c~L9Pay?RzTGT)zRfPwj2$R#(%#NPxx$aY# zVRp~X?C5;Y7hao!uDPcvRq^8J%S9b5)x*C&B-f#d?ik(+qS{=gU@*^FxX2?s*FK2G z;k&6w_cn%av3j>t@o>>1EmGAr7O9iuvmm8j(-2@C!&lg=rVp>Q)7Ie@tG8G7ZYZ~v ztxER5XZdMp8g_eR2sKLKBdnfXk{tX{PHwd%`z^9jl0SePHq&L<11`_CyU;ZJ%u!Nj zjhxtHsL76wdh++MR?eRF#dhzq?7`bJ$7MHqH;N}Q@aXo5sQ0w}WaL;`XHLl;oanh} z$n%4rWcMCI)oNj0RCsPM`v_JFZm1m0Zn8>3!ao~|0O zvn#nS(j;gvyza@H5Xlb}O|O}m0UgygQO;V6ay(Cd6@-sMddW znt&N@^u`8r-s{m&kh`!f@`mRutKkjL)K>2rNpFOlq^qIey5GV`{}3!0$iL>fc*rx; zlFyvlv&Sk;pudtmJBKQJ3OVl$=sf&I{POJhoMmuPywf^R;mVx-*EQd ziqS=`jumheWx&hPxi4H0Df}6;j1_b`_%So9c9TXKq(usAhiX)58!84`=HuQ|c-ynB z8r$~`PZjPkZ+NbdTO15Gzc)Oqe}eT#Nt^Z8gXXMl(zj4hguw_KcKwW0au$X`J@_TE zt#liZx?OtVN>frd;5{u?AiKO&Xf42>^-e4N7(ti|P1Y+JRT23zME!di@2Ar9hl^ThG2Y-%!Y#=$Fgdk5Kf;Dq4)JVlg<|yNa!R*YNqWq_u7QYsA0s_^ zh52znyD+QZdOkRmb~&n>gn6muUpX6VcZ|*cydBGW=9ZfYvFd{vuX962RFwBbbMed?56&K{WH$)65Gpsx{+I)IJB^m8M3U=C{q3VZ|T zPDO&4r?q03ms}9rd~9xR$HJGgBILT{?MXgxVt!p5T8@&bEOk<=fQ|z;pEn|V%)oL> zX;1E6bhPgpl{+`18d(xgH2K%eWu6@wYhqU7Ojfv%)0BE9%^dV0Y39)BqvbStOXe6V zr=jG@J%QiMX-@&Qb|gG%9lnPW>OljJ`{~dJ*+l`ym))Qbcq;zH~JyQ&ipxfY* z3f!sJSnoaMeC`?Se+v)t%<8R=xUAOUOHsA&1!}WBx4=?b&C6~ItL$P0X-W|mj%Ny# zjF$%Gj{RHDHFSt)YYVi(OY||lq&9lVLwvTWhKPM*V`lAAR%aHC^fI4Zbf(eunp^Gm zoHK5=v~rDdifc@^?1d@iY$*lDX3J00*5Q56qn9IFE@De*o0xdZ;Rqu~jLkW4g*>OA zE39BComFHHO!efCgcfX8*geI*QOD0n*PK+!T=ti2nPK24nPD)XJom5$w33hZn?{wC z(4~}gV8d#>Qpp1m^*m;-Dasc!F3s3U73FK%c=cT8@#>Eox86UrW!HlUlq&+4UH+^! z#PFm8`V?pQy?0B+|11|@Ef-%Z7oRH^pDh=kEEgXt7r#|5-drwjD;Kw*Xss4fpUV1$ z-S8~;g^bj4T9>z|vF=ebnO{~|S1!&d7f&h|J>{Yc#m?;h%6%Mq?75eU`|(CQ-03AL z?(yEU)ilP`mbOBvR>q5Bhb{a6u>NmZ{eRS!-Bo$nv(^#g0w${GkdA8X4lmuee{3Z% zTO8~`P2u;_QP~eGJU8w1r5-2fEcEd1evHyc&a@4&YDNJOJFV(i^n&b&l zW`ck3J3A+2R%8$2AmtVaL1fG{e#oAlTm{aQoK5ChXN{-u65d`%I`L>&gXdahSm7Yd zpN5w=Mme+zUB3qzZ5o%yJf?6U`|=?^wdHQ61}sr-Z|0~iySVgL>apC-fOj}v#=gHtqq(e{BCLLurHO;9$!_>0Z~kLP zc3OhCtfCX%{u7>Zc(9LXn6_mXoqxq;&*Ixac7N5FRoLh?{O{m|`<%h0vLpMzd%i-` zV6v)^bdAbeS;f;lU!3@~ydBBk^PlD|YuynAiG|m*yQ&Zp&pHz@hOdIU?u3tE`fU!Rs*iY@9#%i+!)p`_QxK zLj;*?u;q0b{K!XmRg!L+`2f|>Sp{Vsr!-wgIT~=_p7Sk~g_bY1Nc{g_qAwDQC5+I9 zU^*Q;Z5)53BI!(jG~QbhS-*b0PfGhjiGJam6^f+H^sG>@mIYrjVylZqBXRSu)~}6h zkmBd{hBN8@6)Cf4;KGi+=4A7_=2-K>=1}w6=I-XJI-A>@yAms#MKX~xjd-TNJCZU& z!FW7j8r>12PAm$Bjn2+?V_hVbjwa$F6AyOBB8HhTdLyRMA2It9VMk@i91tOC95tP3 z8fi#|qRBp}jz!a^;TKkYECJCT{ek68*;F4MAGc zm*|fe;b>|cCCOBDUC@jenEU@iS5Wosh(&_w$X_2H#sor%csvq<{7FlHFWLhOc6 znv@o z!sv{ca`r(pkox%CYMKq6%=U2UJSfSS*RKb8UMSUrH5s4>Ek zo?s?s%4ydojRn}k6g4`ypKY>t-6Y zMpt{M-&bGVFmt9uL௪lf7V-rVvq9N`l$O|+H#)@N_$mHmT^p zaTaEfg0KVhjvv#fR`~1Z`s(nXUtqCx1R+4rvyyQ*8fJz{MKajw=}4M6&WMIjJ542P z*$}q1IC8j*G?fDqYil4F4>O%()B1cqq4Qt^Z7^1>>}qS~9+1vSW7JsCjINW})S2AW zIJM`My|FA3OV$|3ao7W9A3{2l4)#XI8dMuI7NpIT41vYvlv@(2?JlqPqDVZ{*B?w_ zF=W)Ju!0BDGVxj?rOlw3F89Ya)z^h^SuzzdI{SjDNSH}CEox2OY8YKIu+_w@_=d@2 z4XzEB{6@737KAjK8f;CzdP`w#e_7x1pc(2j!ioN1G;YL$NRL3?mTgAVt|-fM z{1u6KZ8vh>S_XxcT*}TwzuHt;ewCGoRTQf6d&=!gBJ1IpB(epv(yZQ8B9lbgNHYjZ zI%@~Y^4g!aJM1jp8F|}bAEG#-r2G^)FCXAK+JYwhh9EjQ3-CdR^k z@R^YTQ}EfRADLD7y3=XlL*9z`mae$47O@ywD}3obgt!^(MoHs_e#xmJl?VsTpzvA0 zE#?cQ%_a;Wo7l_m^UrZ`%i$m4_aw;RWkKMWUS5s(-Fc!S0Qs&6qzpc!m99JI3$X?t z8+kCxHp*4vho2b8d1S(Ct4$ZV*2l+h%G>4mK|^0!?m|>h-!ZCz`uNPRFY4gWQv6Vk zZ_2!Gfm}5!)TQ+;2Di^cEP+0B;ymaBJ&zR1?5?(s7&=LatLZFtv5i073bkB|A;bbb zDYVg6${nS!4#;cc>6Wi7X30>F?jq{zr;xK>x(y*#@*UeLx5Xx?<*-a8pRoDvGq7%W zxx=56h->h}`O?M){MgJEE>wJtj#Zb|r@2OZy-WOMlwVSKa!dUcSedT^PsI<{oBUch z`CXLT6fc7Fe1YF^*nT7UR&d54`5y3Rz>igY00#dYyjJns(f$Fr<+n<)1N?ZbryhSJ z*6eifQE z6S&rQ68Iq-e;@t2@pGo?&+l=^W1+Qt4S0>6WB!Z5^?ZB4F9O&8c?t4yaP7ZWz&F|W zZ1C&BJ!-sj!S4WP3~+vzfEQ5K`Z~aOpk4cODL6kO=<$Q#{|2ttdkE`ag&#fs(Qx!> z;5ADB3E<1YxuzWNRPfEF?aNA0hxQ+#PRH9k@ONx{5%^i~fo{JN_B@LI zIzIS0>I$^OL^<9!fI)D*UMa}$MxCDDRp2jzYkzzf<#L{?5R(zhr^g@}URkM*>! z3UM*`^)}9<({jG45ch$9lE%oZLOcpS%f<)6_u2aY3_NOUUju%-tvv<)gpGd{{B0Y5 z7W{l$|LNc}xcF-P9QaE%dH%`9VjEupzQx9`2LDGJZvhY3_+0Q+Hhu><<5`dQ0~Ah2 zo#u~0b`jQ7^M3|E-^Skp@38UDf;Zau3h-JRzX5!{jpMdpyC#X#!MK;LYm%5zvV}EA zh&J?pUA2<;qg)9Y16TpRLbd7mo`87abuxY`aOZjtv1Ooa#gkhkz+1qrcyfymA-@KE z9)2i43GsU;%Cw8T8vJ>bt^MZ~7l6~ACe_{v&I4LQ@yozFz`crxz&G34*Mi>(ewu1e zgFg?>9LMpl1~)M0GZfE)cYx1Oya>J-T+i<-;CF)a{>J{dfjO8!TD?96TQDDpd3Q7tcQ*X(D({$<6l|&p@w`vIRDnNTk&6k^Y1b5Qv7zT z^&vPrf_lpT4)tgj41o&#J{o$t-kP5bj@xUA&jhC}x_vG5OcVR8{Mb5ti&=>g(2XArkT@Ide@GBgA zQ+cz>b-G9GH;&2ie#nBl$fr8w57?HB?Ry>bS?b{X7{BVG{7wgd%fat*^zU)-*$#i+ z>)>}e^gZclKheQ`4*fSc+Fy0>c@FtsIND!vv|r@ld58RMj(GVO2mjE)pLXyj?OY)J z`zObGpYK?&q+>l(4*Sk<@LL@G0|&p!q3;w2A9dLCTL*vJ!LM`lpXji^$1&e64tv%+ z{QE~oJe=&1KhD8_>ga#8qx~(%_?sNO&tbpycR!X8*Jrk)T|@?g{mEDap9$oty8>TG z_}UkDoL?8H(*+#7ONjuETTKyI+P-qp!uG(*B}+Qnx&mDb7qzzqAZnArD>)B`m#2FL z4sb%r4UXo1G~jJI7Kx*Q@6`lOMH&Yi6afJKYy0<0%C&eMm}OC#n=dHmfOy(%L5 zH{i?_hu$dQI|ItTxI7q;gUoH@prQVx(%C4D>q{w}^>eN6!Bnpvg~NTSOSwXhOG9O0 zt}e_GIGT-W)~E{g^HiaMGhmN;93;p>15OYu9lEKJ)22*=R^L!kU+Sf&-cSwfvLqFWSf%Awtvb~obFeHDnbh(~ej zJ=euLCJWRDR7j}LJ(jg|{5Fws1sc`bu4@=q!R#is%ageA+huH6?f!8k=G2unIE_@^ zS=_Zc5Ra@^mIO#~s2{Mt4g~l)%Go3j)&ix2HJctBUIuvHr;fM-p+1}h26)hI*FmWc z>q8XIwhwFO>01DYWzn7u0jwp))XgM;W$`T5cs3;R^5WSjab zpkhL|EIz+uS=*`r1*8qCCwB_0ojX?~GdLHwYW*^jIkY@J)hc*aswC=Vq*8(k<@X&e z#R`4qn~p^yN!`Hd>V}dB8wEO494f|fxZ zwrXbUrrBCpXYSd|SL~z*(0z4RzwY7JI{dnef3}`f+p1O8^aIeuQ)o*kPh+KWKOM|b z>UG~n-PEWDu4i(ljGsf(BAP%+WXrb6-#DSg|-3j7aK$mOjFI8QrP-t}aQ_7d)B5Qy^; zKz`uWJ?H4r7UOepJd+gt*3C&~0PCH5^8MEPpZg-~jLEg#de?U2pt=jsGvuEk{z!;x zfo{C)Z6o4h$IO8Tlj_0G~d{^Z-^NF1}lU4OWg;AjE zLHx;`;`{?P_WPMaKAV%jt8f%Z`3o>d)^`HQw~%98zMHu-LOiGNMTIW|U0)XB&*ZS@ zfI_@pNqE4Jg`3GkWTl^5cD;v+&#LL0}MON8Akh_E+9guP!^^$)B1U#t45 zI3D2qd_?GJ1ackQ6lPUB|8vmri;{tDL;;m6Iy+wo7Uf$mRWpOItS zZxC;Veqs*iI&8;58UHyi+xL=RBE&DqpBCabfnRucQx3V7n?@;yMA)bVDepUa3s^3Y(LE~Ok|8rIU67dwQ zkE(x*{F6eA5>LmsfMbAXAny`qz&}K<5N8w56k-msPKbrX27C)6HVSbu(S@@~;v^yZ ziO4AfMC`ReAmi;@#On~>tjFGYk{t8dL5`fTmxwicfoQ;=#M6ZM4HklVUxqVW#cRmxVK;H65a+TUSCfYk--^#6kH8O#x03f@9Ti_i z-YdkVieC++pZO=OjQ^X6U&D7P;%%@C=#FB49S`h-ERc3hBi@Aj0`VEFBk@Kd-cvZ` z1n{pSuMnYk0TFr=K*qraBJy&U_3-nTiI3p^0;D}dDmtDjbA$~$czn>A$ z$MXrX8T*4c-};X0o`*a`zEFsliI9Jlcn0@%{1@|5*_!|W diff --git a/project1/cyassl-3.0.0/examples/client/client.sln b/project1/cyassl-3.0.0/examples/client/client.sln deleted file mode 100755 index 3c4bbb12..00000000 --- a/project1/cyassl-3.0.0/examples/client/client.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{F117DD21-2672-4001-9FF8-8DBEBBFCA380}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Debug|Win32.ActiveCfg = Debug|Win32 - {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Debug|Win32.Build.0 = Debug|Win32 - {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Release|Win32.ActiveCfg = Release|Win32 - {F117DD21-2672-4001-9FF8-8DBEBBFCA380}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/examples/client/client.vcproj b/project1/cyassl-3.0.0/examples/client/client.vcproj deleted file mode 100755 index a743bcaf..00000000 --- a/project1/cyassl-3.0.0/examples/client/client.vcproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/client/include.am b/project1/cyassl-3.0.0/examples/client/include.am deleted file mode 100644 index 0d74028c..00000000 --- a/project1/cyassl-3.0.0/examples/client/include.am +++ /dev/null @@ -1,16 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -if BUILD_EXAMPLES -noinst_PROGRAMS += examples/client/client -noinst_HEADERS += examples/client/client.h -examples_client_client_SOURCES = examples/client/client.c -examples_client_client_LDADD = src/libcyassl.la -examples_client_client_DEPENDENCIES = src/libcyassl.la -endif -EXTRA_DIST += examples/client/client.sln -EXTRA_DIST += examples/client/client-ntru.vcproj -EXTRA_DIST += examples/client/client.vcproj - -dist_example_DATA+= examples/client/client.c -DISTCLEANFILES+= examples/client/.libs/client diff --git a/project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o b/project1/cyassl-3.0.0/examples/client/tests_unit_test-client.o deleted file mode 100644 index f9b9fef4a3d2a7ac25fb25ecfe828b1624441b09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16512 zcmd^GeSB2Kxt@>(vk<$eh+t6qxg|>3-m;JDzC{*k1wYRm^`|F4GdV7fhFSUwjmGpV$%fY9*8jk0=%ES}(iw z#{D}WwvV+}-ng6Hhtedu2Cr)<l>!5^_IJ7!KCxKN~;&o{jrJVV<{F!=^=ba2UI0~c0!vfn;Vh=Ci5geUV= zlyWZ=oS9o3Lw_S}Hr}yqkkDc$i<+)OH&PZE}UL1Sb>M_U-hk6dg`|1GvgID(x#=cNW!{AtEzL7j z1GZQRy)A8l_S`{F_6T-Sb{LK`Q*)rhYZK+{v?#~(WPcCgDTpbl8L)%eC<1ilMYD%I znPIF2&RldT0OYMbUhT@_8%~^Y8aOEWe<2R8}`hz zO{&=3e&N6sV9BSw*a;47w;10QR6?`*Z4nDeG zS8$CU!HybiDjlq!ilf!+Eum8|8wz4J(kI%0?191<+L+W7*hyht*0wv*?k(=s(W&+t zuF77Qmkm<8+!$NNCR^TBtyoO89^Boj00wy!O>Bj6EW*xGYh|X=-yA{qh53_oXUuQQ zPAEnfxjNQ{qv%wdNcKL6+|vxC+D#heCOsMc(iM4BaT+T6>JdTB+*_Wl z3?grMrZ#xjzu~z?#x5}2@!s&P|2ftlC2iIRZ<=$qO5Z}kAPmN~Vb`mql5;Q&>cKCU zZTYA#b-VP!<)@_Xx_j%bjqLJLp|t?7>ywsy8k;b4z^zv@qITrV5UqNK`~5U}9{b(% zKV2FJef&sQnz_-tTj+GwAK46`VO|J{ncjeuUx6Mv7X?Hjr=SANS)U9A3!As zGglooh*@hN-~eWV0Wy&P&;hV2^892Ear;vJ1i|fl6H1{%G94xL=jz2ssLk1vCzJ98x?!FR{TIFa!Kz6=>_z*kT*jqEc+)-zIS zu46p9YV<_d$O11VIF#|e3?{=>xr{~m?Q1_+JW)pJ;h$9OruO2MiA-Jdzv*(^IGOBOGYu63>>GaLUn> z%PAdW1?jwFumiKZAYwnq2v3GEPXROwb1IzA=YjkwM|G_*ufUns?y^qD_~>5@gJnHq z%Ndy5@dDcrdU(5HN0(iIPf@v%eOn+hdV-D?GK}15+195kX-R%H%$(kYI&y1nm)fAE zV0pPP7mZ)SyfPQg47bTFZP=cSw@dB@Jd3k(aI<$2+*E=m%DgicANFM1>ER!H--C$q zBGs(bYO=%Euile!v01i{A70v&I&pMWUPQ&nW2?I1#nIEU!~HXr_o-8QIemD7C;Lr2 zfk0oSFfRpc7G@O>atr3rEl}WNe|sVvz&x!L!@T5z*ydw%a~l>u9~B|DUf!PCI3(t` zo+w92mE=3ARY1o+o6jo|J!WIMr8I7&RA4(dDs~Q_8c`BYG}!}Yljq5lH8Cr2_7=Gi z)0BD!&6&{0n1)UtEvCs^GRIIc4JA+J`}oV4_Cui7j(|t4BVVJ0deDI5KDuewW9!4T zyU^*MFzpVATc&*uB~RvO%Cx7)n?|i8J5k5r0^l`-(+%LsfcyB+!u^*&;Us95!R@Hf zw+A_$ql!j)m`^P_%IJE{t#*67IcB7^;*4^NYh0v!3#Jqzr4$?=DgQ)UNA_KVUXDol zJX`Wd#Ke0GM;M(nKHk6;GBH6{SQ{muoJb!&!IQlkT5wQdcd7l59y=Oce`-Ez+25yS zbb+H}bisf!(P0f}1s?4;jVd6aOFrO?e+;V{zVWFYu!~Dj~ z*UDKb_CXr|+4>K&`v0gc{Zz@7yR8f#b0xW7A~=-W9iG2~K5c~)+>G=-*o&InAEl$x z?-zOQ-sQ<`r;c~iuN+CgJ0bU0F6uQr+51rULwv-RUB7-M*M@iOUAx{nW7o*Xi*^mw z7h$<(?RsY-UNg&vzT^D?#L{CEQYAxKj)M~|F^81Ms2m9Aro6zi!%tAm)3gg}DzT8Y zq*cRD7=Ya0a({a7Z`%jkyk!WFUiXf>s9iM7shEFh?kYr# zKVqm^7)l3oWdMfcT+I1+)|m&9GTaxu*{vDseuDR$)XDkU=FFlexU*6ds-8KtYeH&G z`W>V+?nMnm#!cg=?CHrAF-hrYGP|8Mp4>}#j~s2qLs~hWFqL7scVPaETqzBfi=^xK zBF4?&@|Y*)4yRu}!sn;VJ=B0D$~=>ra^q86dMn;o?&ijJI9^3ar4%XQ^!};#eF9^Q zszXR?o-(v*YEJEDq;yJhi-vlq=6YSZgXyQHVvya=BaP`zh2WI*@Il=#zbn)GOC5uF zKXef2GN5ZNUKP(8Y&y939nW&Q#WmD*ked}xv{tmz(HJ(B%8A4M`WndimdSGc?e)6u z|2uYtqtUn#><=W9(b>mvMk1U{^+aNwd67+{LNXZX?FuK1 zXe4PGRl=%|#-UtGVj4zABpNO^f?eTYw=5fhSjb4EVn#I9ZGp1=-Bn!*hB8V>Kv^I^by@q~TeMr+tyhT|3tnDInXsg#P$ zL;yRjC)^WH^oxovV+l1cH4LK($UUwHFyrM$DBKZ9MNK*Fie6($EY(9%qa}`=Ym<$~ z%8gjuG%9UfLX$-&V!f0!5t@2fu)y$jc&=541@Pu&G z6*w-DjtHiNm6NB2rdZcFL%R!oK9N5aTC#xS`YbE-v5&JXg~N`$rq9;6J{6*>dZDip z|ElcaEEEYb0wlsIoTOwp$rxfpLbGS9peGwbwibJ5l;!?XXDr@b4#8N6VG)PI=kp02 zXKFaIv1V;sW1WGemM%$R)M&trY?RT;89dZD6&DtK&=ijLmK%s6F|217HgYN%=nRiH zs3K}CNty|{@GA--EiY8jURdSj;aIS%Cy>Ar$i1RA6FiWVfz28zX$H(>p?|Vq&pNoQ zHxV{ky8?-Dh(RqWD$GKAo7}x>V%8>x$>R;K2o>ZTB1sv$d&3A2GRQ(-XQ90nzJ-Hj z{9urwlktVFXkQuL1jqCuBp?>e?@Yu~y@(A-Zi2kdioSxp_NVO*HlKGM-qv7_8~~eC-{CgJ zQ_+xN1#4+C1&(T$FPlc~NnG`-mtFUj?nspV} zi@|Q;OLk$4n}K$eH1_vMP7R58C}0MJ&-!aIUodGd!T_>~y{ddw3mn{X_(%9V5i)pw z7D$cCi|-)+g)dL_B_GB?D1+||^4E+7LaZ-g4#aAs9H?M6m9l(u;5F+M3-w>EZyG8n zZRC{y2wti)wNA9F(bq7Hsm;X^sTitwt0Tp26WrS+`)@ZpqbV+}qwvqcE;{_*2b zsV=QgbB*?Tm-y@0BWPfviu#M-$2pw>+u?}p{HQNSO%%@cC?p)(K3wlNG-W$hl*A zWqUW|*PvaGe=~R|IQJj>Kac+X;QXF}{7u+*w@u!M_D8|BzMCQU34C}AC~rdFFxs^} z*Ma}a#$Q7JSHL|={uS`Qg42g`Jn*SlC~eOu_?h6^-Yu}_JaDc5eYCFx*Z%uE^t9tM zSLu5c<0sKxuJ}&y2f^tRj`u_Ge+OT#_%FbxVGO-qzX5Nu@jrlXw($X!bLeZGgAy@{ z@?)rjN~wPm<8;A z5|dG$o{APZcjqe0sW8*{MlWqJt@Y`&B1Gvnr zD18a=U)#p}JoqU#`Q6}MHa-h{IyZyrp813XTbN_cs+R1#utKj z*!Y9swYKqpigD+m&bo@kwUAwi_0jwb;7e`%$KZ`N&a*bp#;1dyY2#ObSK9cgTD8Q9 z;w&KJv2{%pbMm&ZW|BA_{ST^E@*b4=y9onW1inVK>GSX`&I7NH<5Pq?!Oy@Al&$^c z77M}a!L9w}7WZO*Z2(`459J>Me+XsTMZO#Sd6cd5?iPOmr#*{Q`|IG9d3)UA5O@o? zSG6AjAF#DgLd<;#e70);7&yN$U<~1S)4>hQ`E12c2X6tNqxjk21K@goKJbUYdB0%) z1>nzvTj$*^+Q4}jt$67c&EN*O72n+AS**<~2rkv=GXWZ2fi3)*RT;XG?+53Pt(GYM z0yuw=#dTnN82ztgArRf)5wE0B*^6?DJTVIS}%N_g_n+a@h;l$KM-ff!#`5ztq4>)*< zLw>7+H#_**4!+Fh0*?1{Web7)FxEj|v8Zj_lLSDf0cvZ?%>^y{yqnP-@)S! z|1EXs8*sG$+0p-yWByk-bv+QAto^hN)E z+cBSu9P3r*u;+D${02w+Qx5(uhky4v`hVHMf8yYeIQkbm?Ca2z0dhVkIof$I*B9F_ za@cpF!@rvyo*;#T+!))2npWO5?f`N>%kjYmh*qQ`OWgM&aT%3U3xfjwP_5S}o1S znqwC@Id;2TTC2V4*b<8h8k|O|S*~bX?~jEyDNFpMND2F`+_Ilv8#tR}g2tau z(Ae}K3Fc?sNF_-9!7gN!{7jSDbx^9s`oaL2(W9D~#qlHQ66xso%iJ;ZcJ}@>&uSOg z!e*o=9PbDP`i0*gH2ZtQ{&sc~kr>2~8%t1#>E-r*rnZEYs}jjbClWRSx>WXCs4Sr# z$>tLd*x~$+LCYn(Qf4T=DW-V`cT+GLM?TOxm{m1GCLBAo1YInp!hI1_tdqG;<;0K~ zO-lDORjB&&c*qElKgcqL=(qB9emN=Corb28NP+od@tBp%lIeeeY~6B|tV3egzalQb zJkbWhL3F76n#mdqCtayzTQHSKAZexcgl<`JQA<8&ppoH3Sjt?cNmft5$7Q zUY|_EX%)=5X$g5)XdD&FuM)HrD|GHK84ZVfbpxlX8}c5InQp(8-d3jY%rZhM3mGt^ zLv>88sns?4ro7WR9SZ9fh8=QU&nQM-rQ>iFN0T+R+RnyHF0p3hhaeM_NLvAm^{uY69+TOZ{%#}!d~`w#!bH# z?XjY^JW}%AZSvjLJD3|UO3YojzHGg-xi1!?P4TOU-xT5|pd0TrTZzXDnWJ*!IpI-q zyjcAU5zlGQ0gE5TyAqyZT%Qr54(RR_;*$z*CVGY74*^{}g!q!Ge_Y`nB3`6kWc!z3 zA9NOf1@CGKD}dCun%E@7WvV`<@J68P9wD|V{({2S6#iY|OxP~<0xAC~#WyO>XC`-8 zhyx1WRyfA?%|e`tXE66gc&7!r;zFE5?8UE5h@Zu~Eb%TOE+l>q`6S|_O>_^^+*oXWaF^P9ZJe#>T;a!%9M9;T~pBI8TFV}-YyhhxH+!fwoxPEcs zcKj-k_;n$kC1Q~d5Ro)0#^Y4&qICS0iG+e<6Myc|V~0EFu0*L}H{ENio{xAwti|KpGI=%zlMl@2_o9J z60<@K6LD^TLqvc6PbSwbLhL8zu>Ls1T<@7gtoIxu)_WE48}JJe>(xiZdOb*lJ-;Pl zU6?#(`$Cc`15(<9q<2 zQ-rvSI1_#)&Jf}oL?ocTOPquCBhD4#7sN97oj4DEBqBEKCr*Svi6ugmVo!11XA`d# zVm{FAM&6Mec3wa}33+EC)}WO*4f}_PL~?`(-3G~ zo&0RrO*{?X_pl!0?Iu4Rd0WL_B0mG`sQCYoe-ieSL+|_K*jvZp9^*D}UV+qeGC4kH z5NG2YsQL=>V$6?tCgQBBZzR72_Xl$5Z6$9-ep>MWIc{zd#pC4bgxI9`b>x@gm-C7b zl3#{%toVK8>v7*w{1NiYk%LhDyX05E4~p+5zY^=H_^-%uQ+-MCcY*Zt1gr)3k+IY@dkX)qHvISqYz&qLhp}=(EB=&``|F~ zRE&!~Nk2~|;yj)Sq&*ACA42X*@i_SdLfoSG1FHSsh&cDZQ|$tm`&`r!7g~8}_hRf% z#c_0GJRN%?bw;W)yBwxRnSa?;zIU{1YpLxL375K&%ns zAtEOGFcFh{lnDEGD13}~z7XFbE)wDg#46l}Rr@dzetC*`o|VgF|L4e;T6uT(eB2kv zEAgB~^x^(MT!8xy5%RARtMNUE;`@mgT6ubRgAi|$ufRScHVW|`u^xYlfXlG{#N|T# E17af(vk<$eh+t6qxg|>3-m;JDzC{*k1wYRm^`|F4GdV7fhFSUwjmGpV$%fY9*8jk0=%ES}(iw z#{D}WwvV+}-ng6Hhtedu2Cr)<l>!5^_IJ7!KCxKN~;&o{jrJVV<{F!=^=ba2UI0~c0!vfn;Vh=Ci5geUV= zlyWZ=oS9o3Lw_S}Hr}yqkkDc$i<+)OH&PZE}UL1Sb>M_U-hk6dg`|1GvgID(x#=cNW!{AtEzL7j z1GZQRy)A8l_S`{F_6T-Sb{LK`Q*)rhYZK+{v?#~(WPcCgDTpbl8L)%eC<1ilMYD%I znPIF2&RldT0OYMbUhT@_8%~^Y8aOEWe<2R8}`hz zO{&=3e&N6sV9BSw*a;47w;10QR6?`*Z4nDeG zS8$CU!HybiDjlq!ilf!+Eum8|8wz4J(kI%0?191<+L+W7*hyht*0wv*?k(=s(W&+t zuF77Qmkm<8+!$NNCR^TBtyoO89^Boj00wy!O>Bj6EW*xGYh|X=-yA{qh53_oXUuQQ zPAEnfxjNQ{qv%wdNcKL6+|vxC+D#heCOsMc(iM4BaT+T6>JdTB+*_Wl z3?grMrZ#xjzu~z?#x5}2@!s&P|2ftlC2iIRZ<=$qO5Z}kAPmN~Vb`mql5;Q&>cKCU zZTYA#b-VP!<)@_Xx_j%bjqLJLp|t?7>ywsy8k;b4z^zv@qITrV5UqNK`~5U}9{b(% zKV2FJef&sQnz_-tTj+GwAK46`VO|J{ncjeuUx6Mv7X?Hjr=SANS)U9A3!As zGglooh*@hN-~eWV0Wy&P&;hV2^892Ear;vJ1i|fl6H1{%G94xL=jz2ssLk1vCzJ98x?!FR{TIFa!Kz6=>_z*kT*jqEc+)-zIS zu46p9YV<_d$O11VIF#|e3?{=>xr{~m?Q1_+JW)pJ;h$9OruO2MiA-Jdzv*(^IGOBOGYu63>>GaLUn> z%PAdW1?jwFumiKZAYwnq2v3GEPXROwb1IzA=YjkwM|G_*ufUns?y^qD_~>5@gJnHq z%Ndy5@dDcrdU(5HN0(iIPf@v%eOn+hdV-D?GK}15+195kX-R%H%$(kYI&y1nm)fAE zV0pPP7mZ)SyfPQg47bTFZP=cSw@dB@Jd3k(aI<$2+*E=m%DgicANFM1>ER!H--C$q zBGs(bYO=%Euile!v01i{A70v&I&pMWUPQ&nW2?I1#nIEU!~HXr_o-8QIemD7C;Lr2 zfk0oSFfRpc7G@O>atr3rEl}WNe|sVvz&x!L!@T5z*ydw%a~l>u9~B|DUf!PCI3(t` zo+w92mE=3ARY1o+o6jo|J!WIMr8I7&RA4(dDs~Q_8c`BYG}!}Yljq5lH8Cr2_7=Gi z)0BD!&6&{0n1)UtEvCs^GRIIc4JA+J`}oV4_Cui7j(|t4BVVJ0deDI5KDuewW9!4T zyU^*MFzpVATc&*uB~RvO%Cx7)n?|i8J5k5r0^l`-(+%LsfcyB+!u^*&;Us95!R@Hf zw+A_$ql!j)m`^P_%IJE{t#*67IcB7^;*4^NYh0v!3#Jqzr4$?=DgQ)UNA_KVUXDol zJX`Wd#Ke0GM;M(nKHk6;GBH6{SQ{muoJb!&!IQlkT5wQdcd7l59y=Oce`-Ez+25yS zbb+H}bisf!(P0f}1s?4;jVd6aOFrO?e+;V{zVWFYu!~Dj~ z*UDKb_CXr|+4>K&`v0gc{Zz@7yR8f#b0xW7A~=-W9iG2~K5c~)+>G=-*o&InAEl$x z?-zOQ-sQ<`r;c~iuN+CgJ0bU0F6uQr+51rULwv-RUB7-M*M@iOUAx{nW7o*Xi*^mw z7h$<(?RsY-UNg&vzT^D?#L{CEQYAxKj)M~|F^81Ms2m9Aro6zi!%tAm)3gg}DzT8Y zq*cRD7=Ya0a({a7Z`%jkyk!WFUiXf>s9iM7shEFh?kYr# zKVqm^7)l3oWdMfcT+I1+)|m&9GTaxu*{vDseuDR$)XDkU=FFlexU*6ds-8KtYeH&G z`W>V+?nMnm#!cg=?CHrAF-hrYGP|8Mp4>}#j~s2qLs~hWFqL7scVPaETqzBfi=^xK zBF4?&@|Y*)4yRu}!sn;VJ=B0D$~=>ra^q86dMn;o?&ijJI9^3ar4%XQ^!};#eF9^Q zszXR?o-(v*YEJEDq;yJhi-vlq=6YSZgXyQHVvya=BaP`zh2WI*@Il=#zbn)GOC5uF zKXef2GN5ZNUKP(8Y&y939nW&Q#WmD*ked}xv{tmz(HJ(B%8A4M`WndimdSGc?e)6u z|2uYtqtUn#><=W9(b>mvMk1U{^+aNwd67+{LNXZX?FuK1 zXe4PGRl=%|#-UtGVj4zABpNO^f?eTYw=5fhSjb4EVn#I9ZGp1=-Bn!*hB8V>Kv^I^by@q~TeMr+tyhT|3tnDInXsg#P$ zL;yRjC)^WH^oxovV+l1cH4LK($UUwHFyrM$DBKZ9MNK*Fie6($EY(9%qa}`=Ym<$~ z%8gjuG%9UfLX$-&V!f0!5t@2fu)y$jc&=541@Pu&G z6*w-DjtHiNm6NB2rdZcFL%R!oK9N5aTC#xS`YbE-v5&JXg~N`$rq9;6J{6*>dZDip z|ElcaEEEYb0wlsIoTOwp$rxfpLbGS9peGwbwibJ5l;!?XXDr@b4#8N6VG)PI=kp02 zXKFaIv1V;sW1WGemM%$R)M&trY?RT;89dZD6&DtK&=ijLmK%s6F|217HgYN%=nRiH zs3K}CNty|{@GA--EiY8jURdSj;aIS%Cy>Ar$i1RA6FiWVfz28zX$H(>p?|Vq&pNoQ zHxV{ky8?-Dh(RqWD$GKAo7}x>V%8>x$>R;K2o>ZTB1sv$d&3A2GRQ(-XQ90nzJ-Hj z{9urwlktVFXkQuL1jqCuBp?>e?@Yu~y@(A-Zi2kdioSxp_NVO*HlKGM-qv7_8~~eC-{CgJ zQ_+xN1#4+C1&(T$FPlc~NnG`-mtFUj?nspV} zi@|Q;OLk$4n}K$eH1_vMP7R58C}0MJ&-!aIUodGd!T_>~y{ddw3mn{X_(%9V5i)pw z7D$cCi|-)+g)dL_B_GB?D1+||^4E+7LaZ-g4#aAs9H?M6m9l(u;5F+M3-w>EZyG8n zZRC{y2wti)wNA9F(bq7Hsm;X^sTitwt0Tp26WrS+`)@ZpqbV+}qwvqcE;{_*2b zsV=QgbB*?Tm-y@0BWPfviu#M-$2pw>+u?}p{HQNSO%%@cC?p)(K3wlNG-W$hl*A zWqUW|*PvaGe=~R|IQJj>Kac+X;QXF}{7u+*w@u!M_D8|BzMCQU34C}AC~rdFFxs^} z*Ma}a#$Q7JSHL|={uS`Qg42g`Jn*SlC~eOu_?h6^-Yu}_JaDc5eYCFx*Z%uE^t9tM zSLu5c<0sKxuJ}&y2f^tRj`u_Ge+OT#_%FbxVGO-qzX5Nu@jrlXw($X!bLeZGgAy@{ z@?)rjN~wPm<8;A z5|dG$o{APZcjqe0sW8*{MlWqJt@Y`&B1Gvnr zD18a=U)#p}JoqU#`Q6}MHa-h{IyZyrp813XTbN_cs+R1#utKj z*!Y9swYKqpigD+m&bo@kwUAwi_0jwb;7e`%$KZ`N&a*bp#;1dyY2#ObSK9cgTD8Q9 z;w&KJv2{%pbMm&ZW|BA_{ST^E@*b4=y9onW1inVK>GSX`&I7NH<5Pq?!Oy@Al&$^c z77M}a!L9w}7WZO*Z2(`459J>Me+XsTMZO#Sd6cd5?iPOmr#*{Q`|IG9d3)UA5O@o? zSG6AjAF#DgLd<;#e70);7&yN$U<~1S)4>hQ`E12c2X6tNqxjk21K@goKJbUYdB0%) z1>nzvTj$*^+Q4}jt$67c&EN*O72n+AS**<~2rkv=GXWZ2fi3)*RT;XG?+53Pt(GYM z0yuw=#dTnN82ztgArRf)5wE0B*^6?DJTVIS}%N_g_n+a@h;l$KM-ff!#`5ztq4>)*< zLw>7+H#_**4!+Fh0*?1{Web7)FxEj|v8Zj_lLSDf0cvZ?%>^y{yqnP-@)S! z|1EXs8*sG$+0p-yWByk-bv+QAto^hN)E z+cBSu9P3r*u;+D${02w+Qx5(uhky4v`hVHMf8yYeIQkbm?Ca2z0dhVkIof$I*B9F_ za@cpF!@rvyo*;#T+!))2npWO5?f`N>%kjYmh*qQ`OWgM&aT%3U3xfjwP_5S}o1S znqwC@Id;2TTC2V4*b<8h8k|O|S*~bX?~jEyDNFpMND2F`+_Ilv8#tR}g2tau z(Ae}K3Fc?sNF_-9!7gN!{7jSDbx^9s`oaL2(W9D~#qlHQ66xso%iJ;ZcJ}@>&uSOg z!e*o=9PbDP`i0*gH2ZtQ{&sc~kr>2~8%t1#>E-r*rnZEYs}jjbClWRSx>WXCs4Sr# z$>tLd*x~$+LCYn(Qf4T=DW-V`cT+GLM?TOxm{m1GCLBAo1YInp!hI1_tdqG;<;0K~ zO-lDORjB&&c*qElKgcqL=(qB9emN=Corb28NP+od@tBp%lIeeeY~6B|tV3egzalQb zJkbWhL3F76n#mdqCtayzTQHSKAZexcgl<`JQA<8&ppoH3Sjt?cNmft5$7Q zUY|_EX%)=5X$g5)XdD&FuM)HrD|GHK84ZVfbpxlX8}c5InQp(8-d3jY%rZhM3mGt^ zLv>88sns?4ro7WR9SZ9fh8=QU&nQM-rQ>iFN0T+R+RnyHF0p3hhaeM_NLvAm^{uY69+TOZ{%#}!d~`w#!bH# z?XjY^JW}%AZSvjLJD3|UO3YojzHGg-xi1!?P4TOU-xT5|pd0TrTZzXDnWJ*!IpI-q zyjcAU5zlGQ0gE5TyAqyZT%Qr54(RR_;*$z*CVGY74*^{}g!q!Ge_Y`nB3`6kWc!z3 zA9NOf1@CGKD}dCun%E@7WvV`<@J68P9wD|V{({2S6#iY|OxP~<0xAC~#WyO>XC`-8 zhyx1WRyfA?%|e`tXE66gc&7!r;zFE5?8UE5h@Zu~Eb%TOE+l>q`6S|_O>_^^+*oXWaF^P9ZJe#>T;a!%9M9;T~pBI8TFV}-YyhhxH+!fwoxPEcs zcKj-k_;n$kC1Q~d5Ro)0#^Y4&qICS0iG+e<6Myc|V~0EFu0*L}H{ENio{xAwti|KpGI=%zlMl@2_o9J z60<@K6LD^TLqvc6PbSwbLhL8zu>Ls1T<@7gtoIxu)_WE48}JJe>(xiZdOb*lJ-;Pl zU6?#(`$Cc`15(<9q<2 zQ-rvSI1_#)&Jf}oL?ocTOPquCBhD4#7sN97oj4DEBqBEKCr*Svi6ugmVo!11XA`d# zVm{FAM&6Mec3wa}33+EC)}WO*4f}_PL~?`(-3G~ zo&0RrO*{?X_pl!0?Iu4Rd0WL_B0mG`sQCYoe-ieSL+|_K*jvZp9^*D}UV+qeGC4kH z5NG2YsQL=>V$6?tCgQBBZzR72_Xl$5Z6$9-ep>MWIc{zd#pC4bgxI9`b>x@gm-C7b zl3#{%toVK8>v7*w{1NiYk%LhDyX05E4~p+5zY^=H_^-%uQ+-MCcY*Zt1gr)3k+IY@dkX)qHvISqYz&qLhp}=(EB=&``|F~ zRE&!~Nk2~|;yj)Sq&*ACA42X*@i_SdLfoSG1FHSsh&cDZQ|$tm`&`r!7g~8}_hRf% z#c_0GJRN%?bw;W)yBwxRnSa?;zIU{1YpLxL375K&%ns zAtEOGFcFh{lnDEGD13}~z7XFbE)wDg#46l}Rr@dzetC*`o|VgF|L4e;T6uT(eB2kv zEAgB~^x^(MT!8xy5%RARtMNUE;`@mgT6ubRgAi|$ufRScHVW|`u^xYlfXlG{#N|T# E17af6lku2H9AV5g6tq#ObtKGNSjaR#y z-M3g`RIq0)u(IBX%GW@KVH`pUGj$rzq+v**sX@jLEz>%*aolML?m*}YnPQ4#T)x!b z@7{N%r-zg2bo!^SeRS^co^#LrzVF_>=f3rA8_LScgbwARLJ%2yef~!9z!D{C6o$A^ z)QQF75-|%&lr`>z4#+?T(gjHKfhs^@?)3AtPy{l(P&{4EiyYO=<-uX<7U4?8x!?LL7hC=O+aq zBWd{^kOO`p&_0S69gw^0SBtVp%nv43CgQy-6Ok2(crrH-%%*~?l#F>P-+0?*{8jCs z%~}xiqDr#wC@-5>x~=b__477-ZSTGJzC7^au^)6DV!tj2vHi@qhrRxG(}he6f*L^U z*8l3{3vWF*wEvd34j%t@_oAN_Kd74c=l821ni2kq6>-8maMn!+1CbXz^4%W%q*exJ z{trF!mp%An5B^6_{%1V$g&us&gDX9FsR#eaV?V%7a{}wTQv-0~|McW%pXy*BQt-$d zJ@~60`<$;j(EimP`A=Q)xsbo1mBFb$>XH-x$b*05!pt8B=|KH)4Zw+?bmWgP>E7NsrOCpuDxg;SYlhzL5L^D<>!gy;}Tj$*kW;hYIlD64z*|AhanDJ!X)|%l|GHHdUU`toGnMj2q z=G|5%9vwtH9J1r7WLE1_!BtQ+V_8}hu@hM{YuRSnvNAf6I4bMHD(=X{?J50Du4=R- ztWYwS*11@UG;KyvS$1SU`*1a5X*nPj*>O`ZwIG9nxAONJ6EIXwst6C$07C+(<+_E~n8qJ+wbm)gOkDXgHC|a!|weVA?W!*^L6WVyUd%JD3dhTSVa< z5fN2AVw#*Q&hYn#Py^G7gzOMZ^k&hioEAt*M#RRpP3v0BRcN}7T{9KqW-WK}@~OYv z-#P6`3_7kj^%$#gxYnB~_2Da8=K05OG52=^R1=TS;n!v}vmunhUc`|TUo7Pp2orMV znJaOHh&x#2FQ3YP`o}*1EPUM0k}nkEQ}VA0QHizrCE6uN!{(D?an_RKL%)a|A2Eac zOZfhhV>Q;1Ux@D<`D`KT$uGiLgS=9RHRNc)4dht1P2|;B%jBr=P2|`R+sLu8w3DNL zUF7({c9Y|*aToalA$rKaEJTDHAL1DKSFjzBUm`@Bd=d6Xa-2B^$S)OQh}^(;gnWq* zyU8!d9z(tq=Na-Vu#b~pDa6C%bwWHwzD$TG$gdJ&ANkcnbmmX`OMiz>-Zhp&wnF~& z#~4RKoH<-|?IJrdUw-$dLlaU*d% zag)Srh`WjFCBA{UhuDy~iI@!N&KTA9+afJ8)@lJ_j#Lp9_B~B0@B<_(oP5cYuc8P7` zqr^=T4-g+Gu9tX-_yn;b@lN6ragD^giBAy=iT4nnB|h~T+rO6>>lp2qc$C;rd{p9x ziED@tO8gixkE`PcBz}U}Al@hOKH@s!QQ(I6wvGII{_RukT^+F|d@o~1AN2X}*b@8t zpW|%)CMt9~I_mycSQHp@x?6<0iVwN`m19jXNoUkm0>;JNCP5w zv9#|m4WWw;U%<4oS3g9}zJCfA29$rPuE>I^ico@zj1MBq=y(=?qobpnJGXAxb+XNm z+X&6yxohl~SnY-US%?b)wWurPKV`hWushHLwIfY_z{x`0k=B60EcwsMhdK%azQRUd zvGA+6CMQSQ0=^Mnp!5>Dmj<91KzBp2VyL08(O)d|OlxUj=^<(#rcvrn_$iR)hXQq? zdiP@NvBPH+FZ~)dVhOjCA1UU)OMB?BksAWYhDxF}4?&hcTUI@M8k-ITr4APG%19!x zyn5@w>Se8g`qKMIDu^>pVV}LOnE&3}%If1t9X?pSdkh(iZGpx@du5@i2A$Cr@XJyv z1Es(C1igo{>dOV$s;m1ZjG1`a-ZB>48fY9D3M?uji?p#^*0hE-eHAs;)du&WSb?D@ zE4?9GI6PUshX+JT**lQp6Cp|_Y5}W0Q0>U_KxvZN;2(YLw7mwI3K#+u=`X$*Xu}6e z^^p&sNKtwpdTeO}jIxW~q`mQx&qj{Gq90x58$nx_A$9H9>fwKYRx$sH?rYTom=UF| zD3^8~1t{k0*pD0yrNLWo=~_qQdjP|eb_@F97V4mK%Q2F&`K-|!tidb8@7;UZ;nwB1 zh!H#Bld2f(d2C!`pfnqmUiN;CK2< z`OUFnz86C?5iI5h$ge2oe?Y#tn131#npjZG7s#uM`Cl`ARx$rBI0vDae@->I^dy!& zCKo%W^b`v1#NI%p_lBS1gn$b0a#+|Ks0YJhuYryErMHl^Xa@qQFQ+Lt?9zQOfxT$0 zleUs(CuCZ&sjRy7aIw(Ef}QiDzJF6NIoH9HNV+jKygu6LUronhK^ znSSmgn$C5w_1fZ79*eK5;$v=$U!P&oa#@T>i}p>$d_PmsVwF$+SW`NtY?pp3wFZ~S zd7R(jv}Fxa-8HF&HfDJZCq@DjqjUrcm=3kO4zcsM-Rb(`Y~I>1xuvs|L&bKDEyY1J ze{vCKV}0=_C-Jc=J#q%7@+Cx<9e(Na^5HY~mFl|#b89dOIWG}yWQ8Xmeu0YlBV}tp z%DtICwCK)l<~PSC=8U?-hd7qWvs;BM@h3Pc=6P7dc8nn|7du2al)Tb5c%3ogNnAXP zXdHJ)S1Rr%Q^~=VVJl;2SB66?7zw7Wen*uTJtG{FxtAO5xPoOZBa=%S(M+n}P*+JK zmg=_*UU_(bb8d@9G=u^pGD%)wbi%iDxMyW?Pl+e{jI5QxEz-!wa=0w*NE+c(e}5<$ zxz3>0WwYht-Tnn_E1SiA(~vi)>kKaN?a;Ntv6Q;SidL&P*C#qGSzQqfu2lck#mul% z#?q`)o!QPUa0)i8`dY9a{~AOxW#C4f88o7)44Rm=g}kU6Rwk3mTn7`gsS?g*GEigl zzk$BLq~dx5W597Zjd;nRG$Fn?`;fa_jHJ|A%EE=l|J7dOeh0s7)S9i z@}>Eisq$~As=T@SBHK40zVVgouUZvYvIfabAfAyz;G((8KV05iRrx?gOI6MNzUHd= z`3r8VsxQB(YJT%rRZa8Zs>CM51j9T^F46B2hR7v z`5rjm1ONX$a0>6)M?tiVBiUl;2RNs)|PM4_&JzA3kdu? zEKcIbBAyY6fB*SpYCqnYd6V}K?iem%zFxa2pG}-bCB=nPVU2aA3Fwm z2XqEB>pMRG0?-wp)u0WaEubjqZqWUpM?ueko&y~Q9Rs}sIs=+jKz`5_pw*xape>*% z=x)&cphrQ^fSv;#1|0*v13Ckmh4EV8j2WxAv8ClYqi%C=E@|hC#^9RZsuc}ua}qWz zQwhS6h7%!NYH*{G_mgXajVl_I;x$H{9qP-j>{#EnzPWR~c}?R=yjq14%Z$2S+^8Z3 zt}|_ITW&Rw2S3vXvxEJ1s2AMMC?3->JUUsKvW|iI1;o8xt_iNg z{m{DsX=RsPJ`$abr zxsOnfdzaSRi#Y4ba`^VW2bnHMTnAn514z(%2cUNVdh*`uD6&te`=CpY{y_!`TfzZy z0`(Xk18IBQKU*;g^j({BUG9^P9{Zphdfm{wj~Shy^_~G{GWDd-4vYmH9Wt%=*NAJq zPvO_|DfC9qq4#s7;ptG0vGg&*uXfr7)ph*u5y#V_)Z>1C@(<`8gAU8(oZ%zFsXw6i zZ;*2=s3(1wpvR0%V_>-)-?u^99^Y3_94+oU3agU2zbLFq z;69=-OIQ1a!m2>-3ks{z)8F9=xnrqyuH;fpe$N$VE7W&hVV)AEeN!sr4u#_Z)}fNC zk>`3-cn;Z=?@EQ7$!h&5IcKa|Ckm@o$@QQxM@5}y6y_;Ioo5tQJ2vOB!fNH}b3%ns zrx?ylC0{@$&og8d@)U!4$oVKScd%*SoeIIz)O4u8Y05orKJmdMTdd13!_L7RJx=?} z#T@DDHtNF7kn6J@+vw~MR~-f&-_31;GY2-MW25$3^4zz9{F(( ze%FKP%Ozi7VVk~M<*voe^5%Q+DJlOW&M?Cn49!xh3-CwN# zYaaP;T-ZQ+CR~{9`vmw|XZ+@t*9yOD)1tf<*zK!!rANNjgKzQR7%-pVL$Jm9FyNAN zb&t3(%X`Fwp8-DL)UO8X<1an(p9AathW1|p=J%QNiN1BOx%64yZ-J-Bd!cyOC1?4+ z2d2LO&u^ShAA980YKw&?+k-QO3md?zU6}H99^3`2%V&T0xa7=#j|(&ZcRlzi4}QUe zUjugg4!-V@pYY%hJXnPBq+{oz(O?)pVmG&Rm~ERnyWlxE?O$lx{c!w)hhbJ|uR&Lm zX+~0JUn12TN|+HlmC2f++=+K8KQY$y3LEc%55S_2`LkX7LCU7-IBzRc*5Jq3`lq)w-@2&< zS}uv>E4Q)j_I1r|=It9cbgu6*yPDUvt*1HZW*5%plwTq4UHISBq+RLI;y>!6Ik0AR z5RQ9hI&9jpTylG`cR=uR<2dLkuR*st<$mZ+nQpgfTX=SI95%HZrg9*3XOKRK?gYm( zQ27{63mUX3?V+h08>bcOwZbO)U54q#=oYFTajK)d5*=_3-^_Enh$?4Bw^3L)w+pK2 z?lyQ%x-)rvVd=X$Qyj^r%otu0@#d+kIOQ)o(+gC2S-Nv$yy490PWgiG)WgA$Iag?_lL1J0ph)mt?*0xDNETF~d`N%H`FaRkpD|?M|BE?&=muPg!@u W41Z+DUsyi>&QNmu(oPGm5&r{sh4Tpj diff --git a/project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient b/project1/cyassl-3.0.0/examples/echoclient/.libs/lt-echoclient deleted file mode 100755 index b247a976c2856c7f70a34da8efc3e1c9ca8d2271..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12910 zcmeHNe{fV)mcE@d*kVW`vP@70pW0wh=p+zX@W)O<0*FS9N%*nl43AFtYr3V=-FCm0 z#9~*dCQ7F1nv9C2JC22xqgE~BP&K=jv$!)jQ5a{eUDlap-P&@(Qq%ke`H%6o8CGIm;l$f#WEf)DBG2vd-Vz(E!Q|>_J{o5HgaM z-wrw8mjdmhc+my9yMAmtiTS}qLo(6Zkc=)$CQ|wSP%a%>tYpkf`RZHO;;(84ZPtO9 zcP5B^NBNI)%isIef}?vj-hS2cCmQei;+1(rgOn`pR<9N16A^+|N z{Q<6{3q_4+pQJxqJc9HWhgAL<;sVhQeH;3;H$z}~V9iDb!ns_M3-%geuIahOj9OW1 zb0TM3*`8b4lIfJy6Yfn~!ZbJcrBi0k4rguC6y{BLn_Z4xTM{O$oXURI%xweV?(PmV zWo;EsG;4*UjJNl6bl=@%Mv@6DWt)AL9ZyGvnMfsUtrQBq|@Ohn?*1ajHY zblw(;6q*-~MzbQ8$wRfz>WjcgERsy;IH(bOAY+-m>_!1w@pR7a9Y}@yETYKPsEDZ^ zF-^`DXZZWVsDWuk!*&=ZdUNPhP75TZqM{+5?z0-U#1nm1u3>9ByQLwMP2Y(TY-&(* zZPAiYW2mtqmyI-pU^FLIcdS{_W-dl&>DZF-7`J!1_g9Sn}ML9&&t?H<07J z@J;erLTn=cnh;TPe7xi27h?+{zeI=(`5f#oNZ;tj-& z5?@ceiP(_1g_sQ*t(CZ)I72KXzLB_}_=7KyFt3AnJMl4zJBfD@ACb6+c$oO0#2bho zA>J?XH;MNW@0EBH@w3Fk5=V*m6K|I|PW%FKM&cy#LE=pkXNZ46+$ph5e1y0~;(p>c zh#Mu|MtqFeka#bGCmsG1f5JFYz!jkI$n=Bz}mvmiVB= zj}X@p@0a*7VuN_E#CwVBiHCuk-rG3zpM~QeboO+`Gx)y71^(Q=E}r_XKTv)P6*?6g zcK<8R368k&3qOLnMf>olaAxXO-v~QSU{0T2JM{a)$-2Y-AZ24mUL7etPtgm6Qvanh z6+=IN>D^0xNB-qZ-Z%0OGUMwy<4}9huQR{?>d4UP(u-JOSc^B%fXH7Y?FY)+&_#!) zFwOVsN2u8oWn3^&{-wGiv&Jhz2`Vx=fGoqKIsAAsW|-hxRw@{AEfpn8l~=u00q+gwqU)e**O>c>)>g{ z%m0QNv4q>m50?r*qdj!k(DgxNLnYCg2O%q*@zo5T!iEDuxr+t7GL#H1tXY4sWeXH~JK7M;-(49HTdg5@84hTcP2 zjTM4y@ztA87?bgYy#*||J=i?7EjXuyEYik8S<_n9^i|YUR~y`qVg-htto){I;ow-! zE*>Z;W$!?W&x0tNs0FP0L3Kk5gXJ-5gMad=)Am|qDq;vwWT5n7umc|_)kl7O9!2?m z=&_|uFv>1^i}pr`J|8*^ive_%e+X?|fYjw@Y6gD=ty1A?_7eMAwE$*Bc|FRdoreKR zg$0kXn2%yhd-wg;j+Rgxi!7*#t!t@X43%MIwAiDig7i5)L<>25Ud_|{0N@Bo&< ziBPHVEcyIW;n(DIONHN{K__OF3J1umONH~ur zv>ST^k=`2yaXLT+c$qBj4mN^evDd=J%<|jFTC#&d)R)tg8+Q3#n804N+(~Po*%LCY z)Z(jYKU6C2WWmmUaUm=~dv>X?7pbGqLc3J>#HraS2;HWG%5JWD#i+Ds-&iVqpQ&iE$`_CgKdNk(eGT@Ql-z zWk_|`qz>Ac<+U7vBqm1rFcdHy>UO-$&fj>4>x;8?ebd;w?s6U#+cEMn4sC^#b1)kl zOFur2k5&26(=b&yhUkJrFMUxlc-p>FeRp7P873j;C8Eu&@Yq8Ks8~4cTmDJ@t-{N5 z?$~I4YvjcAVR!gw#5uQB$`T7Kkq0$w$7pGV*eW97)Rnfu>yMF0;i6*161a1^QgN3V zPYyLitgM}Dh=dn063SS8jw&yPMkFkAFEl!FWy@JcHlH$L*>s2$FH@l=kxCo5L1zbySUQU)=4>G^_J)tqu%Uv{qN$U)fe&d!N6xdS+qDt<{YcH&)MV z9jUHuJyc!Qdbm2!`bxE*U$t$Zmyws|&xLb6aIOc=^}x9vIM)N`df;3Soa=$F?g68O zUw23dII4})O#sAvrzVf$4}KCBYjMEBPsZ}Ch`$N&jR-$c%eQF!w99M0z)!v6IDY)$ znUDD6FUHdQ@XpMed0-H~WrLT2@l&+;0qo(YX!*N1enOUkXH0=#n0S`sosZ{AzTx2~ zWwCpgKft&R&Udjo5Z}((031WpGm(xPc$#@X0Dta&)i%KYSK#}(&UhN{V^hEF56lA1 z2Q3Ay0<8nZKzD=g13e6S8uUEq5a=lA9nfje)FSeO=7W}kR)N-mVxYT0_kkV;Jq>yu zbO>}5^bY7WXe#^;W`X8|mV#D+bp2MhwOwn}ukFpJ?7Yz&S{7QosA+j#!lnf(K{(P# zGK@y(r@b({oD$g)?n@c@U1Dl?A9 zt#PDsnBiIM?q?%;-&svs|XJZVdN;@QfwXxc+VEas6w1)Z=0(fV3X>i`_`%K0-b2 zU0QE9;;bvn;oJ9%$aDqbI_PrmM}pQn2EAj@llNFhk$pnl2V8pe59&l=mvexeKs|;> zK-wPnPaBg!-<>Jfze8N>Eregs zLg)>jMenCb!!w{9W9egrU*WV3s_XbK5$897bAkK)@vqQ33OUQA9v=nDU!nIOkaH}k zCw-To#~)6a#=vqpzQ;k@9^Xn&;q8#)ssr^%qadxv?};#kcnWDcXubbIg4TNqdQTau z9Je0hXFx2U_2Uc3K4YRUkTl*epCe9tjZ8$KURK7`AIeDlj?tD5b1y?%DR6?0l5=cz z_|1Hb8#)C~!eSAK?cm(voOj!cLO4w?4#>1UM86ccA2G4g(c-?Nuqv7Ri^8e|?js7b zbhTe7tP145ps*S}{T;59JC<7KN-ovp_grDNLVf2I<|$#qH>FbUP&jWmzABZ@$aB3Z z{pnI)`>s^VnXJ~2l5@sl95MeDR;!ZhL1B&x>^tB6O6eV>=C_io9h>u5VYPDgIiXUh zQw-;&lFuTO=NYm}d5Xb2!Y9dtPH02&QzxZ&Bb6uD3!_L7R!%q7v z#B}NFcF=`eY0f$0QNA8fzTkoTkUIv>^$P}kktl)7b0IkO9|hO_;X{AC0IUP+NzpFYg;{{nW`SLY>X{*ST@OJbMXYP!O>EheKdOQq#QTDj>ng1CN{t0j=`g1M}F#oF_`5PYm zt_RbXOTMbYHhr}!T#K9K&Gg_aJop+9ZuQ_UU_JloyS2e1w>;SP;5{Dvj0gV=Soas} z|C&esTNgIao)a$2_I(EYtTTQWR@8}rYty2<4%qFhcBMzY+=FlS;5aenLl}(nq2DFv z>K<}ombb@)p9bFV)UOun<8M9kp91UshW1|p=J%QNiN1BOx%64y?|>)9d$xGjC1?2` z1M~f#=Qqx$Pd)M)wZ%e{?ZKJCg$>}PE=>6f5AFfh<+Hyxx#Y}$j|(&ZcRct>4?f_* zuK~M#2VeKdk9qKi9xNhwqOtR_SSSJ?v76eu%#JnPJ@6cy@Gms&J~;lt!!Reb*PtuO zG^1&Ab28l`kZYKDpm9ZIV^(#w-m=nMd22iUAZ62ZoVS&6Yw%-i|I1rjZ&}j@ zEtkacm0R6$+ltl>^R`v1x>xp?J*_J`R??hwvy0^N%C8XjF8pt4(T;Iw@gMck>|eGt z1jjuy6EW?0KD8y(+b?*zaUArN*Pz>+azAvZOtjmyEj%MR4x8EyQ#la2Ge{pqcY@;? zsC*131WnqM_Rv(0jS~uuT44?SE+cefbPH9FIMq>Ji4Hi6Z|2!uM3pn6+bArY-38Tj zcN;t>-I+YTu=L%WERN>VW*jerc*E3H9QPNU>;iCjQlDoVgTnBpFnB=KE?(*u+D%;qXaVJf3cXbP-r>r|c X^{i7j$6r`J=T1^``_fJbmWclYIuri9 diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient b/project1/cyassl-3.0.0/examples/echoclient/echoclient deleted file mode 100755 index dfbb98e1..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/bash - -# examples/echoclient/echoclient - temporary wrapper script for .libs/echoclient -# Generated by libtool (GNU libtool) 2.4.2 -# -# The examples/echoclient/echoclient program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/echoclient/echoclient.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "echoclient:examples/echoclient/echoclient:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "echoclient:examples/echoclient/echoclient:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "echoclient:examples/echoclient/echoclient:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'echoclient' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj b/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj deleted file mode 100755 index 3fa0caf6..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient-ntru.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.c b/project1/cyassl-3.0.0/examples/echoclient/echoclient.c deleted file mode 100644 index 29e062e7..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient.c +++ /dev/null @@ -1,274 +0,0 @@ -/* echoclient.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - #include - #include "cyassl_MDK_ARM.h" -#endif - -#include - -#include "examples/echoclient/echoclient.h" - -void echoclient_test(void* args) -{ - SOCKET_T sockfd = 0; - - FILE* fin = stdin ; - FILE* fout = stdout; - - int inCreated = 0; - int outCreated = 0; - - char msg[1024]; - char reply[1024+1]; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - - int doDTLS = 0; - int doPSK = 0; - int sendSz; - int argc = 0; - char** argv = 0; - word16 port = yasslPort; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifndef CYASSL_MDK_SHELL - argc = ((func_args*)args)->argc; - argv = ((func_args*)args)->argv; -#endif - - if (argc >= 2) { - fin = fopen(argv[1], "r"); - inCreated = 1; - } - if (argc >= 3) { - fout = fopen(argv[2], "w"); - outCreated = 1; - } - - if (!fin) err_sys("can't open input file"); - if (!fout) err_sys("can't open output file"); - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - -#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL) - port = ((func_args*)args)->signal->port; -#endif - -#if defined(CYASSL_DTLS) - method = DTLSv1_client_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_client_method(); -#else - method = SSLv3_client_method(); -#endif - ctx = SSL_CTX_new(method); - -#ifndef NO_FILESYSTEM - #ifndef NO_RSA - if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif - #ifdef HAVE_ECC - if (SSL_CTX_load_verify_locations(ctx, eccCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - #endif -#elif !defined(NO_CERTS) - if (!doPSK) - load_buffer(ctx, caCert, CYASSL_CA); -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - SSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=SSL_SUCCESS) - err_sys("client can't set cipher list 2"); -#endif - } - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - #if defined(CYASSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); - #endif - - ssl = SSL_new(ctx); - - - if (doDTLS) { - SOCKADDR_IN_T addr; - build_addr(&addr, yasslIP, port, 1); - CyaSSL_dtls_set_peer(ssl, &addr, sizeof(addr)); - tcp_socket(&sockfd, 1); - } - else { - tcp_connect(&sockfd, yasslIP, port, 0); - } - - SSL_set_fd(ssl, sockfd); -#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) - /* let echoserver bind first, TODO: add Windows signal like pthreads does */ - Sleep(100); -#endif - - if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); - - while (fgets(msg, sizeof(msg), fin) != 0) { - - sendSz = (int)strlen(msg); - - if (SSL_write(ssl, msg, sendSz) != sendSz) - err_sys("SSL_write failed"); - - if (strncmp(msg, "quit", 4) == 0) { - fputs("sending server shutdown command: quit!\n", fout); - break; - } - - if (strncmp(msg, "break", 5) == 0) { - fputs("sending server session close: break!\n", fout); - break; - } - - #ifndef CYASSL_MDK_SHELL - while (sendSz) { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - else - break; - } - #else - { - int got; - if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) { - reply[got] = 0; - fputs(reply, fout); - fflush(fout) ; - sendSz -= got; - } - } - #endif - } - - -#ifdef CYASSL_DTLS - strncpy(msg, "break", 6); - sendSz = (int)strlen(msg); - /* try to tell server done */ - SSL_write(ssl, msg, sendSz); -#else - SSL_shutdown(ssl); -#endif - - SSL_free(ssl); - SSL_CTX_free(ctx); - - fflush(fout); - if (inCreated) fclose(fin); - if (outCreated) fclose(fout); - - CloseSocket(sockfd); - ((func_args*)args)->return_code = 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - - if (CurrentDir("echoclient")) - ChangeDirBack(2); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); - echoclient_test(&args); - - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - -#endif /* NO_MAIN_DRIVER */ - - diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.h b/project1/cyassl-3.0.0/examples/echoclient/echoclient.h deleted file mode 100644 index ad60ad40..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient.h +++ /dev/null @@ -1,23 +0,0 @@ -/* echoclient.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#pragma once -void echoclient_test(void* args); diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.o b/project1/cyassl-3.0.0/examples/echoclient/echoclient.o deleted file mode 100644 index c49ea93f430ad32cded4c70a7cc7623e4492f331..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4976 zcmb7IZEO_R6}`qw@EU?$k^-p^9mo(&F>9|eF%Z%kY-3P10bwAK2-%KjXYH+bXPuc@ zj4LaF+E%mLSWzk^YO7YQDz%Cl^-rZrRhvkt1YEVL6se7rR{ZFXstR?YC{ctW8swfc z^PX7`t9TGO{yOr5BmPt*nzb2Uy> zGiIWiFyH+YYIFcalVMEXYMe^f2Ah^?Xg&fC;lO%TQ=ovq`WAv zvzJRcg&uAL(b#&W*gAMCoTQ|6{Qn1nvs z!$@0^U>JoC8<@bdGM_LBQKs{=i!IMR3{EMl1L@sM(kbLUWp1pts}vQ6xwpcohAqI7 zO>?iAnM7C$x)BUR@60p}r%NTeUcFVFhsP$ADp6Ir?)#)=_K(o2t96tC+}!r_GRPeo zE9*7B4>G$L^q~%qunq{W9cLv>Uq@8EGW-5BTdwxEKO)t@OoXa>v%8}tcYIKJ{WJ5b zajR!doWg}6I9ju`BU~*kBLdj2qpNhKNZnzQI@bsqC4vm!tF+ zQVJhXxLM(Pg=-bw6(Ki4jnvvWTr5r);t;+KWXrw{GiEoYYR{XU0KDw2@NsXbJ{OoK z;tkIit@s6)y%g+Ia~<04?4`NhhL--T%f19!`@Sfg>#sn2d1U{^b?4`CT{*F!vaj2M zc(9|N$768hb`>MLCVp|lRKQhAlUu`c9DSx#mE)1%l(#af;?2dy&8tyc5#pzcS=gNShjM8ZH3nD z#_^(K`HtaLTqEz5OGe+MH8hklM$09~$Q3*R$=YStb!@C>VZmHDHQ^NkM^8LmDFos> zZm!^t7{243b3DTztpvI9glpL4Qps|2`wePsX%1hLu{*RK-!GJ*TrB&}euJ;l7<3(b zv}_j(jvGk7Gh7*w6HXYeq*5LDtAHbW6u}xn+1Tc*sG7wu+hdN7x>?d)J*iIoNsC)H z;L@8k@?{U1`hiSZzF#yP&ntWT;i8!;cE$6c#wvVGcHoEXRq92^?R?(Xi$7hJ2j!)O~ufpZ43%VbVJYQScPNXm1HslYiONQwnw zhN)rSmy}x$oYdfBr*`>)Wsgb9AN2z-u!b?xI9UpL&I&B}DHAD7BeVbe;a3@FOYTw@ zyc7J4lj`Ajoey=A;VAm`4qDcC(N#D{8THt3`xI{k^0`*$i(LD=7h~#wmflh5(0>D@ZHpogD26C*q1A{++ zb3ZA68T>7bA5gppiZ?Kh>a|kNfHy!#>*v5%fpc$YKM39e&N7jgz}JH_Kl0yW%pBJ% zJ_EUdIqomz*D+?BXi@ynz&>zo|96ZZ#m_n=Ujh3p_!ks^3*#?gyg~67fjr*Y|2vQm zfb-mPy^p{rF}_Ffo8Zr5to@w={~$gnHSIJi8a5GHTt!R)9SfAtPuoU?>>K0^7uhxY?{=Jy|TQNQdfBK>R zrWkLJ`TMt422%e=G5K#|ayKU59OFk~T))S3L;qJ|{+@}&_q&+=x|sa8G5LiUe<;SE zjIH<0nEZtpZ;P#WEoT2=jQ=afSI6v6$M}ZWdaW^jB8?Wv_@VRTkm(NJX%hGS@DR>k@QoE!=W)lE;7v{8z*+BCiu+ z#BWX#4d<`q_lxkIO?*Y<77_nAS&erniT->KFtJ~xhj;+~)x1rP#y?F&ia@?nWOvI+Y!uhX?{F(^6H;J(O8|Ap5{F5AZACW`< zCOPz*Q4{KKCPKd*n8XEVFFEuNkvEH+CLh2*w1}M|Mb57g3CNMh6gm9Pki+jw#BCz~ E0ahtRy8r+H diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln b/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln deleted file mode 100755 index 3fb7851d..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoclient", "echoclient.vcproj", "{A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Debug|Win32.Build.0 = Debug|Win32 - {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Release|Win32.ActiveCfg = Release|Win32 - {A7AA93AD-AFF0-4FF0-8AED-14685DE55CF3}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj b/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj deleted file mode 100755 index 3a2a085a..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/echoclient.vcproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/echoclient/include.am b/project1/cyassl-3.0.0/examples/echoclient/include.am deleted file mode 100644 index d913e663..00000000 --- a/project1/cyassl-3.0.0/examples/echoclient/include.am +++ /dev/null @@ -1,19 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - - -if BUILD_EXAMPLES -noinst_PROGRAMS += examples/echoclient/echoclient -noinst_HEADERS += examples/echoclient/echoclient.h -examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c -examples_echoclient_echoclient_LDADD = src/libcyassl.la -examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la -endif -EXTRA_DIST += examples/echoclient/echoclient.sln -EXTRA_DIST += examples/echoclient/echoclient-ntru.vcproj -EXTRA_DIST += examples/echoclient/echoclient.vcproj - -dist_example_DATA+= examples/echoclient/echoclient.c -DISTCLEANFILES+= examples/echoclient/.libs/echoclient - diff --git a/project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o b/project1/cyassl-3.0.0/examples/echoclient/testsuite_testsuite_test-echoclient.o deleted file mode 100644 index 429c3f79f7d37e95240ecb6762ea86aa6e7c44f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3872 zcmb7HU2GiH6+ZS(VAnCMNfAj4gh`ly-LBWaNg(i$5Ib&Qn?$uuB2k!*XYbfs@6IeU zvq@I6fM8p&8Z5*M5f7+UALv6-RkgfO`T$BDOH@Kgs8y;~RiCPW3n(urYAe$3%-p-# zOsgWUGy9$IoO91T_h;^zJUdxB($&?KA=$bpLtTmh^_vnh9z#EEr7X=(pM3n>KT27m z%dCCk+y(9)Ei;LzHDMSXav@qVehAl%gV}3n(eTEEp|j`mm)%RpqO)3SJ(|+iB389Z zhSt)I%m0QWhgtqIv$Qvw%HCi_|GPLt z(RaMHWb9Z&w>Zvc=+)mEkMr$Q`KsiB8WNxl&0t98yRmvL|KgqCY~_`M^_I4E3A0}^ zZb!t#TOzN(%5UM7r1SB|=-4VqpAGcLwyNkUy&t@qUwscA9V=RhGt|^Lyf&}4!^Ja6 zJhpUtoCjIG7EWQdkHtR8JPBcv?ABL5eP-a|MBy=tLZg7C&|+7$rQ-(F{jux7=Z&|c z3By2`?An_~2_cX_FF`vRa$4=j+1oq{#{wLC+iMTMY`j$PzaL3$?)twjd(Y_)kEkVEjfjF7%Afb-$h|BRE9D`rBn1){E9``w%A%wR&`o8 zj>Jd#-0%3Mead{|$qUKEHt&(d#sE%*LV_v*sc zD{j3J>Q1F9I<;OSY^#eyw(!GX$hHPqDAq+yx>h}_tlL)HyP%(_3M&x0-*9!u_iFm# zrZqiX(igm%(90E{Kup_nU14K93j>y8)fvAM3Z;0uQ3)v!Zn@&l>w)l33ttZw8e!Qx zHVQK9}Ine zvNU;UdeR&lA95kAF``p8=wxFRH~*oDHeSQ^N36oC^Xfx?U)X zQ^#fpgV3@UsTeE-p&wdvkQ6p+F)v%8g*YA~8%HpcuhICeni~MYrI4t$2 zF|p%PW>9|Ll(I6d^8$1<6&jn<&W+9Ncj|xmJp>)!(5hX!ndmu83TK6O;Nki5?LLM_ z%@rb@Lc-fSI;wHm*4aAs8eO?ID~;T>i?+}lkY&Z^(cyh?-cPol2mcWAeUe`R{{nJe z@{fR9pyPbm|1#t}o^6tMBk(Tp+a&)GGSBG_$uEI_3-Wf!Ujgy~Z6 zuk1I|ZfWLsU|V+={ph-TypO-`7?St(wUqt&6fdOw|CO@;EM@;q%3e>|cc%EGDX!iV z4#WAar{cYz^52I2RgL{Gr0mb9cq_$!pgIG&|5D2SlNA3;%Ku7=f0E)`Q~7OA#p_G) z@22`6OYy@ge>25NoV9B8stAUJz2Mo^3hv|%v1rqEy%`D=33IA+{Em(mW3kgmX>TstKxznq6;F#TB7x zmCL>gP!6ks89-SV!k5*Og33Iqm~vsO)6P^@ayiaEOxmwvo^l>>QJ1y{*yh@`y2@!- zd7(C!$-#$4K#o&w1PkOKTNJ{0c{fZGq@ehpOCi)bZ!=>Gax#nTgK=1tW^oMPLra=mSR7$UidTTjQ^c_+a=uBZ}K+j3{DP8FRdt_=m#N%ZLyC{{X5n BFy;UN diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp b/project1/cyassl-3.0.0/examples/echoserver/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po b/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po deleted file mode 100644 index 8cc153a1..00000000 --- a/project1/cyassl-3.0.0/examples/echoserver/.deps/echoserver.Po +++ /dev/null @@ -1,270 +0,0 @@ -examples/echoserver/echoserver.o: examples/echoserver/echoserver.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ - /usr/include/features.h /usr/include/stdc-predef.h \ - /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h \ - examples/echoserver/echoserver.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/echoserver/echoserver.h: diff --git a/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po b/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po deleted file mode 100644 index 27d0bb4b..00000000 --- a/project1/cyassl-3.0.0/examples/echoserver/.deps/testsuite_testsuite_test-echoserver.Po +++ /dev/null @@ -1,270 +0,0 @@ -examples/echoserver/testsuite_testsuite_test-echoserver.o: \ - examples/echoserver/echoserver.c config.h cyassl/ctaocrypt/settings.h \ - cyassl/ctaocrypt/visibility.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h \ - examples/echoserver/echoserver.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/echoserver/echoserver.h: diff --git a/project1/cyassl-3.0.0/examples/echoserver/.dirstamp b/project1/cyassl-3.0.0/examples/echoserver/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver b/project1/cyassl-3.0.0/examples/echoserver/.libs/echoserver deleted file mode 100755 index 49b310918d2c1e001129890e6fc0e3ad81649280..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13134 zcmeHNdvsjId7qWm&SGRq7~`7Y;2V4WfY>X^2xCAv5?c9zg)Jo6nA-96YWJ>o>(%bE zd)Jn7bXvJw_A)!svKnU(CHjOC6h(}O= zznOcbs~hOy^l!%g^v!R+$2{)L+}XL`pS84Z@OV7JPGzE85VhUo_0@x)SfV8LLK7E> zmEuZqg_w;Z%IXK81JYnXnuRhis2tP@+D1*ykZ3QemHhmb zLY)7a*GFn86QUKwdMQU%Oh7&X8Oe4^IqM+BP*DtZlY+n`Th{iH8L38n)em}oBtK*% zTYeklfPawaAJvO?$erz*kGe>-Xa8yv@vfRgWOX8*%=HGcslXZ~qb=ndw{FK@)erhy z2%_zL5XX-4%!cf3uWYDZe&yp@%Qt`Ef1~k{Eu)mJ0l@W3xMiCH@7@{ z{_z(-(|=;ii^I>|xpUFq7hkD7_piULglI;(j83dH5BxvbFe?$Wt#;Co`I$@J;KCnr z`Kxr{yKHCR^#8QW{tcJ>H!k@wqYLzjM;t34buJ88%~;ci>B)A9vXgJLL5DC71k02iA}`9hmyZT=v@>at-;{UGm3V zIN<89$A$Y{`j0yNv;HcVzTc()?=F4KrN14x?oq6Dq-v~~81T9&e7U$E{`~iOeOyPE zh$^vrhW_PZ0OdyqmHj+%vDgiLFZ5B2=Y!>eH5={=WwQw`*lUHpx${;%Vq}c&c-AyB zowqh8Qc0sT)Ri!Vu6OsOl6uw*WlUWc`YrqQc1y200T)JAnZK)Xb6=>Vqg78D2ZWW) z7@>&JZ?p;^vfUC>%D@GkoTIc+YHxLh2xu(B_kvY+@{uWvRsvbV`UEJVdgukSjPN zk$(tlnH;NgCHX~o?~%_DqL%z(oIS`Zum_N%O4Cl3#svr6+Yn)y?{T_b!vQ)%*AFDxgQ`S6#8lglcQi!nR)JWMB-RTEP- zc1Gg)#C)V0|D{%wyUSdt+Mq+kotXkqAahh02yotD%c>Em{ENdkmAbwur zHsT}1XC&?<9wHu=cqj1##3v=*O?;I2sKk4Tj}s3`93ehQJRot5_%Y(N#0lbI;=K~5 ziJvBJlh`CaL)<8FFY$B4wG#IeKToVlJV0C`u9o-^@i?)N_z3X?@%ZoA|9gnB^3i{Z zhlqW|XC%ItxSDua;s=Nq5}%a#^TZnQQHhTduOuFl_+jE&;sM~gm-h_5kpJ~~TW5Pr z;QbmK`kdEy+m6_qpY{4mUql06iw-&e6&CqNocOWp@KRr0k3ac|*#|r$97uureqsCI zOZoE)Pka58O`iGwNby?~Jw_eO zgBOZVVD(|W-b4o?cd7L6EA?Z@MrX0i^Zi%RvM;@c9~h{AvE7gbQw^a64H@f$$T*unUS#IA!QU&3y1`jGz=Mu;hj{CAP>{#fA~{xi_auP^IgQrO@v zG2V4E#L9hRG(9cm8r3W#r=c);5U&z0WnhF?`szYDH28xc=pWfg@*<|q^ zSxfO=SwZOuNJ|YEayTn>!fJ4I(Dbh==9^dv#$&Lam2fJEk{9y)gs19o7p#i;``$&x z16NQn*A(-QKs>gdwXgD*#^}1iUwR7dbT#36s1#V|3IB0)weW;&;JIbR{CG*VtAWOF z^04KkpH7rE2I^_Fts2cMsw^5ke=y;%2K*r;vJVaHLj^WS!M^+lUL~c+-r^Qn^{EtI zoly6pag@21^l+2LJ~iwk-HsE`QU#>dT#*%)Rp;^B`X)({)jmj#D z`IGP=t6fExTs5-V0lKcE2iV+!>g7-_z%zlPb#=qgl|Ps;Ji|~u67<&=AdpX5dXm3k zOOvo196fxY>QfJMtovb^o)!9MrSu?bqS#kleUVH~L^I z>V^-V;(oVB-}Q-+V*Uaea&CDs|04O7#rznyigOE!`M1a`i}|a`XBYE#fXmUyhphJA z3D?-7(SK2DLCx4n^XF>^|Ha-&cjCAeE!hl$dNY^Qm> zRaV2^E|#q;HhQXpqs77rt|Rp>D;@qF+ihN6%shroLUE0PS-Kzy4LCX zlq|Ddf7{{uYUw)H&feP|&!Wufae?v}b9&6o@c5*|<8!ac#%?O+zsFLHqOwz)^oL;w zTv{XR?OP((ZT=Z*qAw?4>ukwxXkp=3Q}#TDr}Qxt6oUSR2TyVE_w1T+`iTy0zrAj9 zM@Q);RB~{{zz?VV`9+0mPVU&T+Iyz@r|w{j1DQ63QC zP;!N-@kh6YU(WcotjYU>Kn;KIXKU1zz-od(+UT*=6RA){QzDHbX|qae!wo~$&@#EC z#vlBex`fbTsUAb)uXC5veMaAV_=Mzrx-`RSP2GrS(GV^^BEq_cv0+Q6RwLhwcjj=r z(1q)XePUB*XIo8OpjKN`TdSq^&7ISnN}5K}T+O?H8#L4CHEUvKPh#$zxpPDVbL$(r zQjtFG=8etUTDP^|v}9>irX}m=G^8`e`Z=N-mpNuU*`0Ov9L6=YTi+nvt(X4TK6#;I zx6laV(m~$5h@jDx>lW>X97hod)TsaJazisy+A{c;-JBzGk+f!AvDlvMn-&{SUvy|4 z+w}I9?Hw&m!C?E83l1JHPp0(cJ5=+GI*R>Q^-3t&B$a@ znH$imIaCSfG8w4xQGXos%bCK7I3-#BkIt zw0bs{Gda*&Bz3@2h6M+8<}`5Dj=6qC`HdQiIPZtYCntII8o(QNFZek4=fQbT&*b@J zyYTe;JXchBy+^Q^HIyv^^}}v}n|h^hLuJJ+RTrDyUh(k{-+1*J|B`hmZUilauMoIs zs`MQ$YpSfcyS%xw`Yvx%<^24tt(CQ9n=0owjZ{`QjaF7Pov!pXeXr8X18hI26}EK$ zLHb|>J{W-yM&N@Hcz+|H6>-x;Lc(@EMO^^IybmYmy*I9w<@X|<;`yBj=OXz%8i!=u zk_&;8nHa|f5chlH-@P-LI)QJ^{9)`nj5}}e5-_f;MFE>NuB_!v2CkZA;`>G5=8XIJ zI@HH^3a+UIe-6fuczw+81n0Li?)&^L$cE!Umzua67f;}{#j7TDFEFzIuOz>pTb5_> zee42g_Fs5?3qZ?3Ye5@8J3vv;e$ZW@`#{G)-vW(-ehNAZx&WG8fIVnAXf0?1Xa^_? z+7G%5bRXy#=v$ys&`&{UK^H)?5qq!zv>db+v;kyy?(BVkdDG@yFRto;WnkpVpY(m| z)89V$=eIpRYtPkMWayT@zfQk-*_ZG5r)QTQJNDa)PStLD_RBT*FK*E0J+w(wCVw$| z(G#=QU-yx|tsN_V8M^ZE?_6=>q1}6f&y?M?|M@+?dFYV`uekJB!~I*o@Jjv*-~9Q! z+t$9mJh0>V-IuNV<#S6%+u9EQYVq7>pWautvAOvMZRPf^T++;G^?`MPHLL5c&q-K! zl`0UHG@JGJZ9(cb<4=4MIf0njX=}Qn^(iHg}RfuKvyn~ID~ja z1c+jxY)k|qeM$IJ9N)yG#A@RVphK2164Y0jbixz?`I$1ngRcn4&w7DON`B-D7%_Y$ z#OE+QhOcQ;NLlEiOeWN)EbRQBgrNrKp`Lgc6{p}3e*&@=WlT#!xVVsdGFAiv4cJax*GzRFTkip6=3z#q#8R!kLVOC-rsQVd^t;aZ} zHdOX?HpEKQV|oB&>v0eF;`^R`cBkB~_Y0ODtJ0vSL2ukuFZGW(^knQ1UJ8B+tYrK9 z1~BWTi+aQt)kAN{(jl|;zJokIS;}WDW1SGwWXqg-KLEfdO{vFs&iH%i{S-Q^mve?6 zCtiCGy`MwQXF)v~Lj^q=vW$ss;Pd@8$o9wYxfA%#$#OeUk2D6d_4rN`nh?iPW+z+k ze^6lS9f#g=4R=ho5;*mkCP1u*?cv%c!jUOBsppQu?yf zUqNp+1y-`NDgz2a=Bxvb*|)6O`a(fW-ruPLt&m&)cRDI zJCqPyhYE8=ft%>gI$u(LJD~iM2=0M(6rAf94ERz}1ea%0aOyt@ z&V2w3@_FJhW~{{a{2TJM{4xpdK@8Lj;3v_)0Sk|TKlB-|Plp2iQO{1ae+^*R8h;N~ zMHv*F{j+t+sb2}X-CjmXEe5v7--GdA32e8Q@*9Ee@%Lc-ZzHx6pKdoX<_l-~JhbnC zOFrnp8g#w_Jb>}#%%4{_S3C}EKTi$)A9d){|8p)p;lguJu``D3631ev{ZbcRk$bs3P7l2P#^Z$~vh2p`Yrn;PvGyKnXLsN*xq00{{djW zkL~t-(V@@X<5A%0=Xtq!(jjO2p9W^!!4b>@&YypF$)9)OaR=65?^Rnaa_lemG8bL~ zETab?aN)EI4+6Jg|JZ`9o$Yxm|DF+|h}M$LY98-R#kEFPlWjqaE$&DAM&v zO7Bjjxb%^=(c!T;CdUedx-Ny$ezBTz3J8#y=7~Vp`EhV zcAmd|rYb_bU+|8tO}B1thL%Gjqe6wgv31+cO|AO24I4UII`z(`n_F9SM?7I;qaFFj z0g!Qn;cQL?N~&PR85;j*Flz6*wE=`6>glj<#&XGhfv#S`A5d1rp$dU?y0bz)-!ooQ z1wlG3tUyK;7C9}bbB2gAqE$s-PAk;f3Y!^TDkCqQLe*cZIVyJ5{xacIv)el}EY%8c z#q@FX6)~JnOIM^W<3?wSBiWQ5!`FrBK-j5hS6Aq%3i6z3?TYt&7a/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/echoserver/echoserver.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "echoserver:examples/echoserver/echoserver:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "echoserver:examples/echoserver/echoserver:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "echoserver:examples/echoserver/echoserver:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'echoserver' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj b/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj deleted file mode 100755 index 539b2e78..00000000 --- a/project1/cyassl-3.0.0/examples/echoserver/echoserver-ntru.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.c b/project1/cyassl-3.0.0/examples/echoserver/echoserver.c deleted file mode 100644 index 945fc126..00000000 --- a/project1/cyassl-3.0.0/examples/echoserver/echoserver.c +++ /dev/null @@ -1,360 +0,0 @@ -/* echoserver.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if defined(CYASSL_MDK_ARM) - #include - #include - #include - #include "cyassl_MDK_ARM.h" -#endif - -#include -#include - -#ifndef NO_MAIN_DRIVER - #define ECHO_OUT -#endif - -#include "examples/echoserver/echoserver.h" - - -#ifdef SESSION_STATS - CYASSL_API void PrintSessionStats(void); -#endif - -#define SVR_COMMAND_SIZE 256 - -static void SignalReady(void* args, word16 port) -{ -#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER) && !defined(__MINGW32__) - /* signal ready to tcp_accept */ - func_args* server_args = (func_args*)args; - tcp_ready* ready = server_args->signal; - pthread_mutex_lock(&ready->mutex); - ready->ready = 1; - ready->port = port; - pthread_cond_signal(&ready->cond); - pthread_mutex_unlock(&ready->mutex); -#endif - (void)args; - (void)port; -} - - -THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) -{ - SOCKET_T sockfd = 0; - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - - int doDTLS = 0; - int doPSK = 0; - int outCreated = 0; - int shutDown = 0; - int useAnyAddr = 0; - word16 port = yasslPort; - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - -#ifdef ECHO_OUT - FILE* fout = stdout; - if (argc >= 2) { - fout = fopen(argv[1], "w"); - outCreated = 1; - } - if (!fout) err_sys("can't open output file"); -#endif - (void)outCreated; - (void)argc; - (void)argv; - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef CYASSL_DTLS - doDTLS = 1; -#endif - -#ifdef CYASSL_LEANPSK - doPSK = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - doPSK = 1; -#endif - - #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ - !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) - port = 0; - #endif - #if defined(USE_ANY_ADDR) - useAnyAddr = 1; - #endif - tcp_listen(&sockfd, &port, useAnyAddr, doDTLS); - -#if defined(CYASSL_DTLS) - method = CyaDTLSv1_server_method(); -#elif !defined(NO_TLS) - method = CyaSSLv23_server_method(); -#else - method = CyaSSLv3_server_method(); -#endif - ctx = CyaSSL_CTX_new(method); - /* CyaSSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); */ - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#ifndef NO_FILESYSTEM - if (doPSK == 0) { - #ifdef HAVE_NTRU - /* ntru */ - if (CyaSSL_CTX_use_certificate_file(ctx, ntruCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load ntru cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ntruKey) - != SSL_SUCCESS) - err_sys("can't load ntru key file, " - "Please run from CyaSSL home dir"); - #elif defined(HAVE_ECC) - /* ecc */ - if (CyaSSL_CTX_use_certificate_file(ctx, eccCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #elif defined(NO_CERTS) - /* do nothing, just don't load cert files */ - #else - /* normal */ - if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, " - "Please run from CyaSSL home dir"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server key file, " - "Please run from CyaSSL home dir"); - #endif - } /* doPSK */ -#elif !defined(NO_CERTS) - if (!doPSK) { - load_buffer(ctx, svrCert, CYASSL_CERT); - load_buffer(ctx, svrKey, CYASSL_KEY); - } -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); -#endif - - if (doPSK) { -#ifndef NO_PSK - const char *defaultCipherList; - - CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 2"); -#endif - } - - SignalReady(args, port); - - while (!shutDown) { - CYASSL* ssl = 0; - char command[SVR_COMMAND_SIZE+1]; - int echoSz = 0; - int clientfd; - int firstRead = 1; - int gotFirstG = 0; - -#ifndef CYASSL_DTLS - SOCKADDR_IN_T client; - socklen_t client_len = sizeof(client); - clientfd = accept(sockfd, (struct sockaddr*)&client, - (ACCEPT_THIRD_T)&client_len); -#else - clientfd = udp_read_connect(sockfd); -#endif - if (clientfd == -1) err_sys("tcp accept failed"); - - ssl = CyaSSL_new(ctx); - if (ssl == NULL) err_sys("SSL_new failed"); - CyaSSL_set_fd(ssl, clientfd); - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #elif !defined(NO_CERTS) - SetDH(ssl); /* will repick suites with DHE, higher than PSK */ - #endif - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - printf("SSL_accept failed\n"); - CyaSSL_free(ssl); - CloseSocket(clientfd); - continue; - } -#if defined(PEER_INFO) - showPeer(ssl); -#endif - - while ( (echoSz = CyaSSL_read(ssl, command, sizeof(command)-1)) > 0) { - - if (firstRead == 1) { - firstRead = 0; /* browser may send 1 byte 'G' to start */ - if (echoSz == 1 && command[0] == 'G') { - gotFirstG = 1; - continue; - } - } - else if (gotFirstG == 1 && strncmp(command, "ET /", 4) == 0) { - strncpy(command, "GET", 4); - /* fall through to normal GET */ - } - - if ( strncmp(command, "quit", 4) == 0) { - printf("client sent quit command: shutting down!\n"); - shutDown = 1; - break; - } - if ( strncmp(command, "break", 5) == 0) { - printf("client sent break command: closing session!\n"); - break; - } -#ifdef SESSION_STATS - if ( strncmp(command, "printstats", 10) == 0) { - PrintSessionStats(); - break; - } -#endif - if ( strncmp(command, "GET", 3) == 0) { - char type[] = "HTTP/1.0 200 ok\r\nContent-type:" - " text/html\r\n\r\n"; - char header[] = "\n

\n";
-                char body[]   = "greetings from CyaSSL\n";
-                char footer[] = "\r\n\r\n";
-            
-                strncpy(command, type, sizeof(type));
-                echoSz = sizeof(type) - 1;
-
-                strncpy(&command[echoSz], header, sizeof(header));
-                echoSz += (int)sizeof(header) - 1;
-                strncpy(&command[echoSz], body, sizeof(body));
-                echoSz += (int)sizeof(body) - 1;
-                strncpy(&command[echoSz], footer, sizeof(footer));
-                echoSz += (int)sizeof(footer);
-
-                if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                    err_sys("SSL_write failed");
-                break;
-            }
-            command[echoSz] = 0;
-
-            #ifdef ECHO_OUT
-                fputs(command, fout);
-            #endif
-
-            if (CyaSSL_write(ssl, command, echoSz) != echoSz)
-                err_sys("SSL_write failed");
-        }
-#ifndef CYASSL_DTLS
-        CyaSSL_shutdown(ssl);
-#endif
-        CyaSSL_free(ssl);
-        CloseSocket(clientfd);
-#ifdef CYASSL_DTLS
-        tcp_listen(&sockfd, &port, useAnyAddr, doDTLS);
-        SignalReady(args, port);
-#endif
-    }
-
-    CloseSocket(sockfd);
-    CyaSSL_CTX_free(ctx);
-
-#ifdef ECHO_OUT
-    if (outCreated)
-        fclose(fout);
-#endif
-
-    ((func_args*)args)->return_code = 0;
-    return 0;
-}
-
-
-/* so overall tests can pull in test function */
-#ifndef NO_MAIN_DRIVER
-
-    int main(int argc, char** argv)
-    {
-        func_args args;
-
-#ifdef HAVE_CAVIUM
-        int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID);
-        if (ret != 0)
-            err_sys("Cavium OpenNitroxDevice failed");
-#endif /* HAVE_CAVIUM */
-
-        StartTCP();
-
-        args.argc = argc;
-        args.argv = argv;
-
-        CyaSSL_Init();
-#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
-        CyaSSL_Debugging_ON();
-#endif
-        if (CurrentDir("echoserver"))
-            ChangeDirBack(2);
-        else if (CurrentDir("Debug") || CurrentDir("Release"))
-            ChangeDirBack(3);
-        echoserver_test(&args);
-        CyaSSL_Cleanup();
-
-#ifdef HAVE_CAVIUM
-        CspShutdown(CAVIUM_DEV_ID);
-#endif
-        return args.return_code;
-    }
-
-        
-#endif /* NO_MAIN_DRIVER */
-
-
-
-
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.h b/project1/cyassl-3.0.0/examples/echoserver/echoserver.h
deleted file mode 100644
index 2e229ac0..00000000
--- a/project1/cyassl-3.0.0/examples/echoserver/echoserver.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* echoserver.h
- *
- * Copyright (C) 2006-2014 wolfSSL Inc.
- *
- * This file is part of CyaSSL.
- *
- * CyaSSL 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.
- *
- * CyaSSL 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-1301, USA
- */
-
-#pragma once
-
-THREAD_RETURN CYASSL_THREAD echoserver_test(void* args);
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.o b/project1/cyassl-3.0.0/examples/echoserver/echoserver.o
deleted file mode 100644
index 34f82d5ea9244f7b00eb05c87dbff06a9703e424..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 6876
zcmbVR4RBP|6+R&wnvH?*BmNYWM_3UmY<~GQq=9Vs(G>y-paoesyKj>nvOnE@3&dd*
znxqm}sIB#{j@mj(9ZPLHV_U80M4{l=s-3n>ol!@sqZOf3X{SiFnttDV_a@7ecC=65
ze)qfQ+;h)4_rCki3pcj}mlYKi6^puxq*#hH0q!VwNWBd+rChwSu5H8mT_+EGN#s5D
zZrpW{!;kd&4ylnbw4X=2^NRcvzTZKww{g^t%KS1;Au1^tG~Q2ZkxPhO<#V+@cKAjbrLK?M`i4kFisE
z0oDYD7Ss$vr-8ai&mdrTz*n7zz+P$FQYkl$DKP5NgV`V-qNm}Ij8=>D>_qsKZ0ik
zI!-Q;W^L2D?lV#(a9Fzba9=%Vlsq=7S}`Y3%U4>M=7k>&{EJDc=z9mjAD=Zct=c9O
z9?yS*ecnrZw1tgu2b=cOQaT4s+jN0Kz?V?c8RwL)SJDg5DQzA&tR9ky!*VqxpC2a|
zBhzv+$E%Z2|IEAr-+Cn;kKo)B}1!kJ=~qpMzbL7NBHk)~1%m72j_hj`v?4sE>t
zpfmf48452|c!9#P3P(F=XTw=c<=YXD5Ai#zh?BJUWc9$yg$HRYzo=rvV8yI}&#+fI
zFQ=O#9xI^iDJwi1{|qyGf<9lqwLIT6E-wS^*lt|3a_3o(A)Cf1i9L6uG=}_Eo~U&9
zoNW_h?Wc($W2nbIaXdbPdQ=8RZ{J1<13(;Ov;=)q*q0v-f2QD>FGnKLIgSq|u+%oC
z1}avaEr>BW1B$u3MUR<<5p`P*=yV21{M;}G`w&NF5C
ze9p7r89uA}2d#ywuS!STKe(rG4OQ?MkoxE;`F}^%pUnTYExn
zF1<_7;cV9zv1qMO9&*z-Z_44o!Bt2-mG*Oc)+Tm)vIlETua12h8}
z-gr>t-Mj8zymI5)vv-`@dGMJ(_U!%kFL!-o&C?~DzhXphzpCel>5nEoblq=`PT#lh
zZ{9=ID~>)?b@$W;W5RtaWNh+{(NhkTG|s=IXI0zfZ-y^@`q|0*@7r`k;FVE}w;tR4
z{(V2bck;x24R^14;8gDeKYwk)nt312@UMULmPrfVe0BQa*4F;Frj9xK!WQnoZ4wD5
zFSm?T+Dsa$oR!X5Ml9ZKioYsiW~^*g*34`*GjmA%X)~eJyHnw);fM^1>@l;A)^0PL
zHH}OzX~Z(Agwfm+Zfgq~U8#g=MB^E^(Jf}rf3XS4=QL?W(ndHEG1KrN49BB_8AC~P
zo2D)8MwR{E`+6>JNk_&EZ;=)4?X6Wc{%WJPy4px>8B^ArN?K;pnq&2(%|(V~Znvts
ztVH*ivN2`Sz*b{JM=IK5EM4BbI=Fi6;>zhU`>Jd#Ye;9z#xm*5n5Gp^c4iAB$KWcC
zYizL1HQM&*-?mKLGPQ?hq$}m*QUYd2u2a^Ub{@s=ufqQd*ot%^i-wglF2gi-v}KZu
zrj1A{nKUEA8OWHCt#4ZsSH*%Ye`Qyo9#BtOeU3C1h2}d63JyUP~(b!6guav@npDrmNByfJ2+}UJs4bn
z4adw9@n_6#KX--r={f=te@8Ye{$$EB{mWOao0GM|kuBoSc4e)M74ASwV^6~7(XbVU
zofMJ68h_0^7q^4|oIfnYaE{1mrO$7XTKm21bnqR+i#lGr<@~gx;MrX)Ql@0o_;@0_m1MPm?{M4d<>!AA_+Isx;
z;C}$u^L4@3x4?D2-v(caTig2x?Hh3Gcwa<&I&OZ2(Efh3PovF`2l9R3yk_Gr!YVM9
zYP7jO$v*_%fZOqBwA3TNYoMd^>(9j@`^uK9l88vhd)Kj<2NlS@A2^4H_iKjP9Kbn&NL
ze4Wc)+GTH|OMjv(9-oVgxjmdncbnO&k*cep>5s@rf546RP{OpjQc?D^T4`>-
zmL;mPQd`)a%bFop)bUt661L2cQ;gfQ)w}gtGx4p^x!UY0RGX{SVkk*bOrf^KMDVt5
zzM#C%iY^aDm5o}T9w`S=F@|C&rA;fa!r!Sdt)=L0Pox7YGS7`h%{u@UuLZgqet>d(I*4!o=pehOq=chkh)D>Mi5A
zXdATavboOeb@OyQTr4}4F`Y~5)y{{W-9Q;ZFq!C2Mu`B*O_);z=w-I2whQc1F$3Kr9PWtWesv!Wa)0S$6PCJ1NI^Ll`&nl4xM97!c@5OyM;;Y&ok)Q%CCq2@r$Uc6Ws
zyB9^$c;c5)GZH6@Oe4aVS;UE`lZhynt^|6n!5^fFE%*l$Aos@>@+OfUpm!4DC%;PM
z5hC*NlIlN7eznLyiEB}xA=jQYB1?#^sCS4MNBJwLB{W(fLU*tFuA1j{_*Q0($&b%m+F9dovAWm|8L(C@nMC#d(JO+pucP$a)
zVw8LFjYE!cH<3gCo8-{HiwOP4h|qtMaum0R$f5r-IsU}>7CF}Sed1D)GwdIWhX6h?
Rj#41)jw6TNX~cOV{{bpvQ#Akp

diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln b/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln
deleted file mode 100755
index 6bda3549..00000000
--- a/project1/cyassl-3.0.0/examples/echoserver/echoserver.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echoserver", "echoserver.vcproj", "{4F3F3EF1-BB95-466A-87B2-A91C059D0197}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Debug|Win32.ActiveCfg = Debug|Win32
-		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Debug|Win32.Build.0 = Debug|Win32
-		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Release|Win32.ActiveCfg = Release|Win32
-		{4F3F3EF1-BB95-466A-87B2-A91C059D0197}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj b/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj
deleted file mode 100755
index 0fc396f0..00000000
--- a/project1/cyassl-3.0.0/examples/echoserver/echoserver.vcproj
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-		
-		
-		
-		
-		
-	
-	
-	
-
diff --git a/project1/cyassl-3.0.0/examples/echoserver/include.am b/project1/cyassl-3.0.0/examples/echoserver/include.am
deleted file mode 100644
index f207d475..00000000
--- a/project1/cyassl-3.0.0/examples/echoserver/include.am
+++ /dev/null
@@ -1,18 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-
-if BUILD_EXAMPLES
-noinst_PROGRAMS += examples/echoserver/echoserver
-noinst_HEADERS += examples/echoserver/echoserver.h
-examples_echoserver_echoserver_SOURCES      = examples/echoserver/echoserver.c
-examples_echoserver_echoserver_LDADD        = src/libcyassl.la
-examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la
-endif
-EXTRA_DIST += examples/echoserver/echoserver.sln
-EXTRA_DIST += examples/echoserver/echoserver-ntru.vcproj
-EXTRA_DIST += examples/echoserver/echoserver.vcproj
-
-dist_example_DATA+= examples/echoserver/echoserver.c
-DISTCLEANFILES+= examples/echoserver/.libs/echoserver
diff --git a/project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o b/project1/cyassl-3.0.0/examples/echoserver/testsuite_testsuite_test-echoserver.o
deleted file mode 100644
index 6a26b34ddeaa804b95c4760247b4d5f825234a6b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 5868
zcmbVQ3vg7`8U8ofKsE$|yhH)LhLu;tCL6-j5P@t6+65vB4~wvDcJGpH_T}EYfhe`a
zBqKX%Xgk(|rL~pmP&%b8owjzSqQ>$FR0kMFv{SV@bf$%ZwbYJUOQqj`?>W0S7dq{D
znY-Wl&i^?7`OmrM{Nc+D{^bsbqmaboph9v;0(`Z^BsB)ipi*+t+UE7^x~?1YT>Dyk~pLAv`%z+|oSdx{g9};z5%)m^4|ASQU(8)``ED_$3{zUvn3lo<(>w`_(TKR;Y+@ecvOC

$ypK+B!?mQXd@0s=TX`_AgF{|hdM_rsboxi_kFXXYO zva4A5P@4HH(~|%#K_nB4J)=AF_gTdrYpOT&T~E#9NP6mIBrKyVNgcN*Vnt2URTVo} z@CjlIuChI{Cz(6M@D?Wzq?ymG2ZjCa#FYJ`k6J1FIj@$dTk^Nn?jU`Ihy`*Ry33HT zW12~2tuK_)BenCddrdfP7p$Mq!**{Hg*-7d-^lN)d7tx|r1~FON7#^z=zvUi$0V<> z_LA`136@(7Y>c>(TkeCfH-$<$Y7o(=u!>!^5@KeZ3>G}@!neEA6`IoDu+>_<;Df@h z#3|Mm(xH%If(*RKFTRX;$OMu2zb9zXobi7^6b5fgv` zCIC5%iUVLTy0ITFE$})mr865V4S5UmAC@>u0g9je-|W*bn&UcA(AR4iJTH-M8^o6o zNJL2v0w_XpQgL7CUbigJFqdEtq)<+9q4|58w2YKRWhBFYSj{}6)Zw9jZ`VlM^zSV} zLBl`l4_$pdv;KVAh>YH2v`C38jt+enhlC+=@g&FOz9?nOJd3h*)Tgz z_n0_yEM>NM;6h7&~go`}UZ zONnf2Ep1xSC3PEIaA@@Whw&VdC=2I9F~OHnJp=%WO?E@2mmy5@#L-r=qdsDKeLoA3 zr0pV-MGCd6Lq%V34T@{MyhHQjpr*eMc_v;ZG=*(>>i4(04E;$^0*DzW~Z@1Q)&wS)|v|SD~n_j&` z@M5bwA)4f4RW_#wju7)Xe=N$JqB8Wdw<-1rp7U4NbTbFNuXfbXbraH9Vx)DbWxW;o zjzkD*(dM{x_!A}GQ2WPZQ*>sDlU<(|DNzFL2=mVf zp5&c$v{K0s>my}9Y>5U3}Op?C@nVrw+dUO65R;M!q||a0Fq%xe2`ZpK3Bk8 z7GLOm;_O&QMQ5*J4y;yXqv~E?7f;S1V*{@>L75t;E8Sy)q*+45Vy^Bqymz~(Np;Ig zr0b=l#JhVANz}}>@ymbI>YfL}jHhM41Ahd`$OqJbx#gN^DAlu<)n4EAVB5!59AOO^ znHgBMCaaB{n6+XRy2f}J{cK_RwIFF;ZCyo}v8q?<0gTgHZku0o4brl&;8Osiq+ zz^j~X72lm6?L}{D91xRJcRPZfrUtSJeH(geef=%iZEkD!^kO6m1E>Y74jsfAhkuueFly*O^ep_?~f{(SKCh58Fqzd(jD}!I4I(z z?GII67cJuR`5&3nKGIutEVvZaC+1s@)bXhLQPA%g;ppOcu8)8D$p{HMWci^veKS3+ z;Gn%HVu*ZM5MdSoxY_pIZhJTzujH?HM$@3na@vF##6Lkt%z+Gxjg>=wr+XMhV_xD0 zicYa>y*R-~aiZ{`dVDV!yD(tZHuIS^jtMJv1=qSuCi!djm8inV)5Upf+9KZP$~;y( zjsy(Dh>Q+))lwrzEAc2KZc$F<#Kf7kmtuy41&dtOqpT6=1C(z2f+Lf=5^0V@R_MeZ zG!+|p`gVh=bNa{n#(3Eu>lY(3KHa|B)hdilY~6NPmLY|Tt`;jKYams#dJxrzh+k)X z0J0v|9+1&$S6O=w;dK*nIi91fjMecglEg^4|0Lntx;}@m&ZwJ)b*}@{B{Lna+8Nf-p4~7#D}S>&b#tgdXqJ}Q1E};+?qi{}r*2grdbX2w zYG==OdS6l=KEF+e^K{RZ(z9)2Bf*Y~cssTF9ixA=obsHO$l4%YW&hT&)>NlhyFPoi zzkh+4f7?B!=YY{Rntj>LXHL3x_lq1ER>4!aO1H48C2JBE*=+DpKUF7>u?`ed)e^u; z#C#M3U$tL&na`$mmM&=^{M4xk<^g)aq*>SI+b0+IgfyQ`f_8XFNYyO z2%sT)047}hFNiQ9HS9dFEtqFb-Unc)=wt7W?!o)?5TT;Arpw2TWAIiwhQ{E^hdnE~L!oK+0_4 zFjRmy$%;;g@O)*>T2Zh@T;HT=ibf|Ebn`BN%@&>&3eVIK(?A$Nd?;+()JUNkcamgy zm1>YmrkeEBh?t)PVOkKayDDyIDb~98FI0L+Em6*&Ck6wtQ_l{kR-4cXQ+M?2$=_s7-Gp8eNfYZg&SEXB8wt9#S{(koP{EU# zTM(L5-JAyx%|yOBjpkfTW5Zxfb=tG1jIJ&X`Y1LaIw(WkvMl(yx%}e|dQP-K@2-U( z%Y16OiiI`8oo9VWhRbm?u9a$yg3{C4>-tm|HeH$f*c@`KNBlFHrv1IJ{0J#z-k^-q zt?dyxC?}>Fst^YmOdEluy_ixEsXno*6+_N*k&zvd)_8cJ7vxV0g>a4^pXqpQz z(s@%vp28ksxYd)$D%5CajMqh@x5stIa$m8|($dSSWiJ(pAk7MKtZ1_$8GETq8OQPB zwjdxGU8DJ)8v>Iq|6z188H_#o$L1$k8P;3HlVLJ@ndO-cSBuQBiLUBUrzw?CsmIrn zZi9HdU(nsKRY<5*f|_y|(#rLKw2V48tLc0`bL>HM1+3@+trJM0G=q#$>s7E8GST{~ z)(msvG(%ccCf3$K(dY!{T}*JYe3Aj%F;Gp7sSRJP6$FlqGsh`*h4{Sb(#DmS#vJEf z|5j@Y2R;WHTsR?_`6l)CY zT*qW?uf3E$v`l{@OStqX18vmqxt&%}8eNSZ?`f4s>v85s;76dA5;ieZ85V}>&xojq z<9~{%GFU0zharWD6va0ITv9{qekIyC!S(j_&^%la$&SCDEMQr zKhgYgi^Wl00hR^S1Nv8F=H#L~@4RzZ&)e3T`!~v+!O<%lL>Kxn8rH6tX)gUe2Q&9P zuaO03wlxnbMk(jSC$i+KkmChB&WP^h?T^UN|WG;pgb0v#nrQ!rs zK9QN1=mC{jk~snjmp=Q7a*mRN&Y9~&`leU>klN0n(W50o1^0nA+Bc_+t^^mBTA4|X%CE$KAdU? zS27eu%~O#b-PKep#1%&(_u?Z2<4@O#jXQl?fQkN*xr7YFO13;n73}Y!&eB^n8@`Qf zQnfOSoGOfuDJ}i|b!T|*dGIp|cW2mZ!ZE@grMK&ie>)O!(4eG$S}ejMC2W4ZzyE=? zGJa7=!6NN4Y7kk=;Hysko)FT3B}hg~Z)I>xr+9-De37w^SWL}t_D8?|+WD#$BYzX( zrt>1!J!W7dP3h_(lfh|mA#17N8;i>Q5t>Gdt-fPukzbI5Q{;;pCKWVQ3RK&FfQ%aI z2*_ZYGe*Llt_!tIV^X1OjgX^-`SgL&q#>h5uRp9@8__nA_e=i|$G!f>*o>-*td$fj zW8)SNGWCOLp*f8CG)ym!!*t4EOwIZe;19q5zZ>6rRiYNpF}}4&svsQuGImXke1TSM zVC!BsGF4wcabW8pElQ;rG_du|K8M?8gG9nB&FCR zObCcsspP#fIQYTVG5cD^zNANzr-LO?|H<0dNfl;8ftpZ36XeRae<%$&B~v-k{ z`a;K0;nGrTGQ;^D(j#K|Fetg^f1Pynd9bv5NWxrb6A!7j`;QcpD{hmFHd8}chMKE- zu!&b&oqDV}EUwK)H>XNT=WO z$H+qsE89|(oF(4nW%?~yT-;Y()<|ZQOY_@mk7b^!y)67rg2llkRRiuAg5!;}PX1@c z8DObOomZ&4C0TJUs5k1mO?eQu)@WgD)8iA)9)E{rqZLF?_LGSlB9<+KlpWT)v?#6Z z#-3uIr&xV>Tx3Y{g#Y2TM}_V%tTDyGGoG4FO!|%u7BtCF9oNV`op-aFn23i2&ZR-sbcpGr!AlqVkmdDNe<8o~;jaO2Q}qREO4q-& zhn*mBAR|2|2;u1E?;+)E+_xt5kSjm(u+Mxo68vaVFMvTY*!`_>R zM^UtW+dW~GHS9YK`yNP00uc~G2>WINh$4hZG9iH^6K0Y?5ZPo^L_kCk5JWZ+5ET%W z9a#iKHrW+WL_l^B5QV(w)m=T)M7*EpeUIb&{<<%{()FvVuBz^?v%345WEjgYcWG~~ zt;J7`aF`LS>$hXto9VT9$h?1xU)+#~7QLOxm)~engYQt;wZTs9x|b$zJ92}608T!E zXi?)Cc}zKWC0l;!Pu9B{myR$+`1<2C z9X)wuWzEV@iCvb`OOem<)dk;_B?K_^$|T#vJl;9>X~{1W~PzNpOO?3?%@i$5T( zl{ND6tF1rVvbY_ugEz*T;jQrwcn`cUo`4U*N8l6j8TfpBIsQ4m8UGePil4==;D6v+ zIitUVY)j)+@dkKPybazJ?}NwTsdyGX4*!<1zQy)EdM|l47 zkF!hQmGQdxTJ{fS+Y0Z5Z$$TEI{+VyXX0b0deScj@;!tBPrBqit={^EkF%{V_5NQxXMbj!W}jxcsdJW_`R4Zj z<{188#{0B=%rTnVIh+e|b4+Hwsm(S_T`Kf(cF(4dvp3Ov~S!qr!%}FXgDL%C}LvyAwWT!h_8|qAQ$J-Mf z3?|Vr*lASN$E?Or%N|$UU}w7K9G2#clVgo{q&pheQ(fuybdK4n#k-`;8!u$GZJIMp>YRqundVRt*@T+(^GTQho$&u}L(_;_cWJ1Z?c z$(5?Potbg*c1JQpwI|SRvO1qn)OV(O>nFH53*Ix7>SVNX+_gP&(luQ(W-26Q%EggP zb&gV!JRa%1Z3jCi){)|Qa!hWIL*L8pO4H&Ta=a;y^ti+)uX}7pQgS>O)8larbTZzg zoOqY?AwPr zQqw)&6C3N~>^b5!--SzdWO04vqDVoOJ2@ZE zhtursS)E;VVT>ltI>tnP>d@RwdV6d}LIN!(WF#kR-lH^g4I+#t{yEEKCMG2$#c@f@ ziEc6w>+o<5WfCS0Om(Eo`AqW+R`c7Q6wfSAO3zZ`mJ)S26O&TYExCeRoFh3o))6;Y zWq0ct)k{aw7?m#L-LV6$#cF0*v()5NS;Lc)VwuWGW?#CNS?^{NSnIIcleq((>FG%+ zPFF&_BdbnbRh7&n$#r{kIBZ9ppy12-N1Z1wSF$s8V0xlzkC~b-IJx4P^TNMOcw^#m z;y8;gRuJZltU5YmS{v|*jEJyDWUzABd$MrYU2eN&rOQ#{UkZCjXPxOx+UhC`3&Kl; zWJV5?mGd9jZ97ETS&7_Sbd#TM%xQ-`BHSLEWoJ4h#WAf@J?U+pKLc7< z$FQW7j1+rBA_r`5>rCS?BZtMYv@w>pJ-bBPBdDF^v`6Z98a*f4IV6L*Yvx7EUCCqb z;o^+Zx>2#4%ibfhtGxrOg*UIeaXVsFCQGej4HyOsuYTP-M}`}#cY@r$v}gxs0k9IC zP{q+2H^Fr0Fj=gVk{Mr=GtQaBMDnu7s*~YP&1#d^hHS(W0o_RdtNTh`?# zj;NctitBeQwNA*=C9~EzmV}}D5@d)72Lqy24;RR(Zi{NQHY)T=6=DXaCJkpCi7t;? zevLwzr@f#eK51YQhaGJ$JNnYc8|jI|L8Md*QM8P<$#L5fPz9ifQe1)7l%x z5d};jS?5+4IJfD+iIs8YwcLMJRY%2}qod%D= zN8&T_75E7}Z|39dig*y-LDKI(&fbpi#Si0)=JS5THWinx>6t1$lI;Y1s-;Zo%*vtP zM|V_hU0}O4N4e~CgZ%spA7`(|*W;V>fqj&j-OH2FP}o!kw1#!O2~X1zA=t+M7BbB0Ax7NLe>Z6e!u>}HRMjOy93UB`&< zo{@U4Q5M;)?Z1@#V=sGDqoQ-{|8Hf+o_#_Z zhuK+=bL{k#Y@>cubhy1oRL9;NrM+|Hi#c}t_fli;f8X=zCB|Nn-6Eo1?9nr_?SJU` zf2yNeiug}W{9B>1FDt@-*!iiY?pQ54x=Usgjax@%pz$*xP`{JtKQaRYf}}){%f75bo-y$(Z~Id3YJFxd0=u0+DCMi@tdRYULrZA zva>30(k%Gt9XzFtrw$@VJKlaGz`0A8j^Y1){k%2)^;o<$WH4$D{NsSUl`PGem7W-} zx1y!Be;&KHmZiD>P|MQRf9}-MoK)=Ay<4OvVF`7Y_rAWXw-T@BvBA#!v?Enszj$4; zyp(BL&M-vIFh-+zXJ(@eH}CAO6ipW@%{_T`qu1L^Z`*Xp_kV3&x8(G?%YC=^4!c$C z){BeBwwm!n|B4^aUXkyFt?z5aH;)gjvE$W3z0&(_c0c~~r_syuo|&6|YwosfNpmku zXutW!uKC-F?*E`r4OfH94Ofgy?{wy)H7}o<^k-(&^Uuvr*%i2aPwiZ5c8_{-%bkMf zcD0|r?1$&$_U0W}w{FSt1-_`=tZIdTzf&4?Em62xbWcwK=hp=WWd?k^ea!dgxtq3dkbmiIi_7ItZd$p^&&BG?Vj>5d-Js4lY1<_|KXpTZx0)? z>yM2*SKxUzJJQE*-Pr={CkI|0!BGRky4fqcH z0Dcm`fZxE)djDzrka~GGvoG!Wv#o&F!UORZczZkw?}sPi9(*J|8J~$Sz-8YRY}esi z@qPF){5*aYzmNNE;kfa#cy&Ag&pEEJ9C`9Jz1{Jba3`LIzk*M|r{nYRW%y_KCfwTI z9`q6XC;T#g7nkqYm6tGyUKlfzchJlvUPtuD6ir@{{;g~%Q8L$1k6n-GSl_IlEEs6K zDab39YE!4d>_>kI8|um+8l%TiEboFT8N8n~ke5W>G-QAErjn8t<9m-cVqY40dQ0Zh zmBc5=1Kji!SG@P3OJ%3KVulSHX3Zr4qlb!kU*&ZrUG^p5^Ryad^FkY^S8>EY(X`nJ z+0sBthKhk1V>C<2PEX>oP*uq>yqvXo`!X7P@+iF3jMAjk%ztTz60?c8lr-xB(Z7AT z)9sS?FNS2iIGd5fC&Qh_Zkjxv89__qQc18fudwGPr;;MB{{MQsId(Ujqt^3g&AlH3&}0X{AU-yL`1IBCNL}_cb3z zz6$z<(QCMjfG2(D97?=ip6*Z)IAiLhN;px*XUrjUCwX(0X{Hy&5`HsYeavEGJ|!6~ zx_o_^uh<^qDXNsAs}tCO=u$j!#^FxARck?9hTAP~_j+EelQ*vap^hVgK#SgtH*RT; z&5ZI&SW}HbLVjj3L)2sBlBLJ(<=`#hQ$>_7&TjT%Ho#&-v^Pax*Cbpj`!fi$*b>Sk zWbaAzb@DHjeTBV3(HFq+#J53kwuch|lIS&2Z@CQ_K{UA;Npz+m0iXX+Bf^oH#Bp|%z_Y$y8Vf~RXM`DK z){Fj;Yh=jrL;t{3{miRNnCc>r&m81)iZp%FkRy|qwMegGe4g{qxg~K^%hY+=^ph(8 z%hvSJ=znNV#_o)ZBMhYn`!(e6km zbP~&>fw^Y(=o}GUy{U2J&w4)};R4ItVrk59YEM?-`1B8N^amR!5kdI?j{BIzN!xYo z5iR#iV{*x99!g8b#n2~7M9zS=gx8ccj%cD=uGU6I$*sorT)45-H2K{ztIKDhR=>$F z|62X!v&68@6K6Wd?**{EgBRxuEk)O5+Zi8yfmj#*JN^Q{N$vkDu{ZpT(voNOg_Nzt zH{h>a<2m#$zYlPSSl~^=_x@pQx8CC!_Uhy8@+$v`+B&IQzep~>eDb4w9&Nyc4mM}5 z+Lp~Hmxh5hn)QxqF{Hd}6A(pzq`74+p6@+AxVlJwOmqNUcT3*H@v z<0MCNH$4!GG+@{>6%yC|Rm>nX=`K^70ibR;paZUbR~F8Z~Rxu2Z*O{RRyK8Z{0K zYNGX6cK7*cXZXk+i_4Us)xY+$`v!m9{8r@rDj)ZGxbp2>zjW^Pu(ADKO6IERnfoWz z?Be&w-^YLLetciOouk`^)Ozc~*mWIW`t+xP6~3xDyU3Nu^IISH^UG+oqxj7(V?KPh z-J84qJTmyVn74AhGjB$z--oAcIrU=HI}KmkeDp}w^geZy&UI|N=i8}+CU4IemNoV6 z;OF|x`EkgXwbyq)zq!n+NjDQ#+P_`iqs$ zuI=j@z4yw_2}|-fJ#u?uoyMOn*;4(hLAm^19$Wfa{fgheK4WdxvYWT_-TC0>q;B8c zJ>~pibDq3aVuKI8{&?v(^P>ZT7xucdDCqp_c`|;#w>a$TYXw)_7|=TJf+78%_fOsQ z=j&CUYnk`QS*!Cr_hY+F7rU-|v*+|Y{k|FEI+{0kcBvi%YWy|3+`E@I9orw#dh*cs zPY&GF=F*x;Z%oeDtZ%vBPG8@X)xN-p4=xvNGveFI>`hPHydBH@(-(9)(&eJ8h^5AfvQViPCV4J@7!ktLTh|Fut1@rzrFDG;aS($ zzCV3#h3-4Ij$ULx<4Ec}^rh0}i&rf0)!RS+T5sXjh;!9iR4P-Uc)`NY6j`*B=cS_2GhAw)-3ZaKF5>c|zOZk$?5gtQ+yhnO)WQ zCH{SFecY`J8}^JX!-TwVnKhdPWhnj?#_+guXLyJ zXJ@WPO(=Zumu*9nOMhN}&X;K)J?t>EShe`e?Z27w_ww?sZZ160;MLwYrZuUyyIaSJ z+YU85`FPRZDWL_A&i;PPA4}`}G<->|sb8F0yk%9Z3-h0CPmc@;QG9H&F`DfS-EG~t7ZLDI63#XuMUK|Ivssx!Ifhp z*3|vvv&Dgd)mznTJafsetqF@lnr`ftzI5-{zt|K5akz#j}U!wesBVm35$G*)2_Xd#-$UKf3RVM=>Q`EzeFk-FDcRJD==*?wiCf z8wA&A7SsB}?d~0wN*Aj6^Tsziwx|>SPT}k!w&h_zeO@U4ybEhjOxxBw-Z5_9D{1S4 zen@{gxkH;5HXH>19^fAh{yV^b7WnT2|6AbyG5Eg?{=LBe9{5iO|C-?cH~1e1|Iy(8 z7Wj7r|AF8?8~o3MzaRJ)2mcSje;4@w2LA7W|L@>`3j7;_{}J%73;u1ve-QW&1OLI` z|0DRX2mdnQp8)=A!M`l{j|Kk$;2#P8=fHm)_*Vq~nc&|C{L6v=MDYIt{Hufi&*1+8 z_}2sfeBhr8{NDrrCE$M>{67Q#ufYFh@UIX4Gr<2Q_i9r&*U|2*LD0{?9AuL1t=g8zQ-9}51Pz<(0> zHv|9E;NKqnFN42)^QQ*>uYrFD@Lvi3-N64Z@b3-&mBGI@_{W2PRq#Iq{?CH{r{G@{ z{11cw`{3Ul{1<_L68M(}{{rCuEBHr%ez?U|4Z=S1ODT|zYF+(4gQb7e*yS! z1pl4j9}NDP;C}}E6Tv?Y{P%*tKlrx>e>?cU3jPnkzZm$ZfPZK3zXSeP!T%umCxibS z@P7#Y)xiH7@GlSkC&2#(`0ob)ZQ%bH{6oS2d+@IV{?bJ z0{{Nt{|ESQ2LBP@{}K3q4*t!-e;N3vg8wVv{|xxw1%Dg(F9&}o_>Tnt{NR5P{7-`a z0q{Qx{>Q-o6YviN|Hk0I75tlm|5ET@1OBDJzZ3Z12md1A-w6EQ1plt!-xK`Lg8whz zUjh6#fd44)&kg?lz~2M@0pR}<_(y?%6Ywtq{!_qzIQUNm|HHvs<_@OOiMA@F|#{KLV22>Aa5{`0_p8u&ZF zKMnlT!M_doF9Uxk_%8iK~ z{8xehO7MRc{5yevAow={|54yS6#Q3%|3dJu5B`bZ{|Nk(!T$mH9|3QqpTYkw_-_XPSnz)g{?Xvy3;fT6|L@>` z75s02{{ry$2mjZ>KQH*_0sl?l|0ekN1OKDoUkd#H0{_e49|8XFgMSQh% z{C9%C9sE0ke|hl#3jFJV|2gn41OA1eCq2mg=2za04I1OFeve*pN`0{=h2zd87i z1pm6=zYF~T2LD^&e+K-=gMT&fF9!ZKz`rH<2Z8?w;NJ-R8-sro`2Pa_rNRG8@b3Wr z@!&rN{9A#41Mr^){@uX;5cn?w|AOE@2K;{l|Eb`=1^nlO{|xZo5B}}IzXbSi0RQ{o z{|Wey2LHFgzajV+2md+X|0?*$f&bUwKMefKg8vub{~q|Kg8xPE{~r7=f&X0a4+Z~c zz<&hze+K^5!G9+BCxHJ(@ZSsm2f_aY_|FFaQ{dkN{O^JPG4Njl{$0U8H~6mu|4HCq z1^k}}|101h0{-dX9}fPN!2dA#_Xhv=;O_wcLf~H#{9Ay3ZSemV{C@@iPr?5z_3}3jFhce=ztj1^)o>zXSfSga1A7e+~Qx zfd3HiPX+&~;Qu4|KL`F7!M`W?e*^w`!M_Li&j$ZZ;NKejPlEp?@ShC+<-mUr_>Tbp zHsC)__y_;d;9np7i-G@3;9ms%$AkZB@NWqIMZy1N@b3%$q2ONt{9ge7>)<~Z{I`Pt z8Sozp{>8!nZSY?R{?)+00{A}z{%?T)dho9d{fnD3{4aoiAo$0D|GVJ73;a8Q|JUIEC-~O||M$WFGw`1P{@cL+bMQ|C|C!)_8T|hS z|C`|dD)=`6|Bm3_4E*kz75u*g|LNf075s02{|fM*1^$P?e-QXL0DmX= z_Xqze;6D-k3xfYZ@IMXy{@{NM{EvhG2jKqz{7ZoUN8s-O|BB$>9{dl3|84Lu3I4mm z|33IX0{@oa-xmBo0slnsuL1raf`29O{~7#SfPZ1|Uk?6-z<(|H_Xhuc;2#A3$>6^s z3VQ|{g#Cau#^iJ0C0H|T3)UL@5PKgRgWbW7V}D^IuwSq+Y%DexYlKPQVImfcO~v^A zu86kSH`q_uWo#eT6MF@li3MRxvF%uOtR;3G>w>+56~x+L53wCsH!MFEfPH`^V0EyQ zSPkqmEEDUCEy6ltDcBp>A*?3m#vWkzuy||&mWa*9N@GW{#h83nz8~v{IkENF3@jN- z!#ZF+ut(T6>`Uwv)*mZ{$uG6NfGxw`#O7n;uxZ!{>|;#$pMq_~j$j3_``87n50(ep zfPIe1ugc}c4q^?k%Gg`jUaS>X6!XKjVV_`|uw0l8D}lX^4aT0urenphaI8Bv5Icii z!QRDgW8Y&3u$$Og>>}pDW??I_bgUZo8@37y!Ny}hV}D{zu}fG*ECV}>rDF11ez&ml z*buA|Ru|ieO~zc<7g#J-1Y3cX#WrIVu)ne1*mGECY!`MI%fjr~d)R4gEA|-Ulha|} zVJ~5Ku`1Y)*m6w5pOdhB*lsKk`xGmV`C~6)wXxCIRV)S@fIW|m!al;vVe7C?SYb?l zN9=;%HJC7w{C9yb+?`-H*6)S|jiY)hzE0q4!!>7E3e!ueEW9xron@c zed==k)N|*~={*`Z9>ApW`)J_61FzPv-@Dx7$G^oMKfdnb#~*inFEjIMFTVKMx9!_cEqL?hUsqSH3Lkj%=;x0XEsDAF$tRIp=FO{q zfAQkzS#I}*zFW7>-TuWF85JKrI=}kuw_6UXRjbQOp`pp)ty+!ryMOU~H>WrRo*RojZTj?%nS=t515mOuY|w$|^zf0tCdcDL_7`)t&LjEpN4 zo_VJD`>(xLDZN31J^|&+2RE!xA@sA<)HBy#dTH%n3m5ji7ZtU*YxCxrj$_BZIPm%B zuf9^ZZq#$X{PN?FMveNvJ8oQwKcb_TCLTJZe=k>qYuC07u-jW#`TOr*_I&zj*0sKU z*KZy)=xDor``$dcdGo-|VPWo{I(3?Pv`d%Sm-_Ts)9L%~#}7Vu@auXvZtVPZ#ft8w z|N86N&WMN!$GdiYuUC^M2{Xr!FZO+8)_{&_jCpI`1VqeeZx*`vq8wk=u=`)a|0 zn!hYx-uce+&o6rX;fMXUwr)N8^|#*2vuehSRvYKfuiBwmv$WiQ{Bi5-#*J~?)~_F$ zaq843aaF6fY3%QBFQ1+LYmqy59;F;Uyrs)`-;F6*s8HFE5+!Oix_WiT`Iwl^i{5=V zWPjVXlfufB33%a~Z{EJWY+0|dBS-$-zGchdE92w${MN7ESM|%43wp=nxwvq^fUUE~ zj45}hd-wN8ojLPiLbYmbN7k#?^W$mLn!h$_Qo+6L+D)l@{rc`B8#WAXQL<#6te<{b z_H+OK8!HtoSUU6c=~d0oojct-C@8+$v(KhiE>NK4>5d&|6v&&m5Z{8);lj%=Z|Jvu z`-0RXM>gG9xiVsDZ0tA7r%w-C{LVXpO)p$H@+BEfxl$29b z-h9&*|HBWT9`4p{-noxH>bN#J`NYHCy;tVDd-qPwD_6e%#Od5Sb@=eRmshWDUp9Y! z{~x~k$~9@&u$!)$H9NTj0{9}Iip_2{Ohk5otBn%uFZ4LjreBWx*;nP684|y&|zAhT)Fbv?%lgz zyhxFXA37Y{V?sg({rSQRs}FwpWzzHs6Uy}2wrx)BN|m1d^8NQ~H#>j+WQhk4e*b*- z?D|cL6|44jQqtkHlP5o#JauZmWiw|sSwDAf!)lc)x0o?;Vk!IO%inf9aA0C~uU;#L z)v42C_}Q~d-kLHc*Mko}cyaXP$6JzbE+j z0RLRz{}K4V3jXE5KNkEig8zHq9|`{R!M`>5PXzx`;Qu@Le+&Kv!T&1w4+Q^5;C}`D zw}AhB@Sg?#eZhY__*Vq~)!;t}{9gk9aPap7|L)-bGWg#G|6uUX5B_h1zX$xI!M_#w z7Xtq%@OOfLfAFsZ{vUvUQSe^}{?CAaDEQ9>|CZoi3;dJ7|2yzs0R9!g|9$XJ2mb)@ zZwUUMf&X>z{|o%@fqz%@ga20We;xc+f&WJE?*RU}!T&7yZv+1f@Q(w3zQ66)^59xGy{}k|#2miz1e-8ZDg8xJC z&jI z{|Vqf9{i_)e;e@s2K-lm{|WHV1O7JfFAn}6f`1J7{|WvF!GAjV_W}Rf;QuA~Hv|6? z;Qu-JHv#{z!9NZBCxibo@Lv!9)xduS_}jt1Blu^7|1j_$4*qX}{{!$J4gO`o{}lKK zg8we?-vItQz<&++4+Z~X;LkJn^1s3V82CR6{&CKoRp5UV{1<`$C*VI1 z{1=128~nF|{}jm$|61T53jVFY|33Kd2mfI3UjqKWg8wb>9|Ha-z&{ZDOM!oG z@ZSyo)xm!U_?HF$S>T@s{NDrreBfUk{6~ZT&*1+%_}2#i&%i$e{GS2;*TBC4_?HL& z3gDj#{x5<5Lhz3Q|K{L-4E#R_|GMD+3-~tz|8d|S4gQC8{21^>R_ zKM4Hyf&XUk4+H;B;NJ!O`+)!V;C~SOZ-D;_@c#?^Bf!5a_%{Ln@!%f`{(pkMANY>~ z{~qAq0{j<%|8nqu9{fK9|JLCD7WmHq|M}qG4E+B9|Bc|k9{f*%e^v1J2mfsFzXSe< z!T&q(F9iN2!2c@v$AJI4;NKSf%Ygqk;J*y~M}mJ#@Q(-oe&AmY{5{}50Q|>*e|PXd z1OC;(zaIEc1OG|j-wyn*gZ~EbFA4rXfq#GSF9`mp!T%ii2Z8^y;9mgzJA!{+@UH>> zFN6Pf@IM0nE5Sb&{HKHeJK%o-{IkISH}KyB{!PI@1^nLx{~y4=8~A?&{>k9q8~pEr z{}u3eg8y*vUk(2G!T&4p9|rz4!9M`}D}w)0@Lvo5yTJbv`2Pt0>EK@l{5ymHCh&g) z{9gzEH1K~8{MUhh0{C|T|6JgI5B!UOzXSY3!2bpC{}TKsfd4k|uLS<@ga3K(e*pfo z!M_;zCxQP-@Sh6)Gr@l@_*Vx1iQs=3{11SCFYvDe{%65|3iy8j{*%GKF!*l)|BK+? z2K*DjKOFq$fPX{qFADx^z`rN>e+~Yn!9NcCM}YrO@P7sTZ-f6}@OOd#PVjFG{x$iK|1tO<2mg=3KNI}-g8x|X{}%jT1^;L&3il_}>Tr{oo%A{!76BSMa|D{zJh31o#Jne<|?K4gR~q zzdHEu0ROV!KMVZxfd6~opAYaL{|~{xHTb^;{xiUTKKM5S|3AQgBlxce|5M;!75x3dKO6k-fd66e{|@{M zfqx0`zY6{_;Quc8w*~();QtNyF9ZLP;NKGbL#0 z2maH*e-ik&1OMybzXAM9g8xt8-yi%7g8ymoKL`Fn;QuW67Xbf`;GY-#Yk>dD;J+RG zkAVM5@Q(%m>EQnk_+J43Eb#vg{P%!=Q}9m#|2M(^2k`F({vUyVGWhof|GVIS1^k`h zKOFp5gMWVT{|fwvfqzZ#4*>s);J+07*Mk2p@V^B9KZ1Wc_*Vh{&fvcZ{Q36y*Ix(! zH1K~8{MUhh0{C|T|6JgI5B!UOzXSY3!2bpC{}TKsfd4k|uLS<@ga3K(e*pfo!M_;z zCxQP-@Sh6)Gr@l@_*Vx1iQs=3{11SCFYvDe{%65|3iy8j{*%GKF!*l)|BK+?2K*Dj zKOFq$fPX{qFADx^z`rN>e+~YnB_<#-Jc$`d98O|A5*L!Vi^O0g9w;#*i3v%ZL1HKp z`;&N;#MUIiJ?fGh!D{biI+)iM&fD`_mEhP#0w=RD6t`lNlC0sVm}hg zk@$_oY$O&Xu@s5nNNiBzP!ju;n2N;EBnBlhC5cN(d`Mz55+9Y=jKotU?k2G*iFZnj zQ{s0Li;-BO@%(@7n#7zWCM9tri91SMRpOiyuaX$4#DyfDDe*jssY(1!;y@DDl6b1b zNhJ;>u_%e3Nt{pOXA;Yk7!x7J9ufzVSdzr7B=#h+S&7j~{7+(%5?hqmt;CQdmMF1G ziA74>N8(r#o0S-@#K|NUCb1xi37Ro2iTO#aR$@yMua%gk#Fiu;D=|`ufl8c9;(vs{ z21ra;;)W74lo+7IuOzN1u{4Q$N(@)xmJ)-K*ssJyC6+63If;Eq+*jg|67Q54t;97Y zek(Coi3Lk6RAP)01C&^$#DXOzDltBZH%g35;)@d7mDsApu_ZPv@i>XkN_A)StXt<@k)u&Ni0-izY-Ic__D-gCC(}FbcxSN{8{475`&dkoy4ytW-c*t ziKk0!S7PZBGnW{w#PB4}EiqJy7fbA0VxRkG7Lfnyu8q zN$dYv>X0vW*_RT-^pt9g{q^>YGN~&my)C_ceGjQC{b}BIRDV)e^7+qBih42@>SCki zhm1{rs(nSPHtZ@*85OY6s;-eQ?U3WI<(C=a=O^=ne*%H6pZrS*r2Qx$tuok3J{i=N zJkt5~eaY8%kT#6Aj557k>PxeFfu5GS(uQ7F+BEt$`jKiM~A7dPPJw0E> zppQ$MHO59lAG=;4WqKWBtdiFArA_HuvvC5)*frfpYjSeX+Gr*VZYM*GJn=E&dIt6Q zPp_kw%MYn9xnjn?a?!>}T5?G1rLwjA+LAnJN3-Nn-7xaZ{mgc3dOg~;(+;)9h-NE& zXm;7s9^27+zM0lANss2I7(ea&MC&`+G*YvZuSr7c`b$Of$RMAenBus2Isi*g0r&-NUv*(6}+_INk4oUmvrzpSV+sP-5`LUAXVr-?1l&Xt1 z(z4o8rthooCuzM++ST)=9Wkk6*)k5jE!DQPPpRInUYGiMA4b2v@u_hc<22jU`!L2X zeM>)T9A;ZGCfaN5&uNp3Mf0uwbL*E)@>)w4r>?bhtL66B%lt`GhqRnjt+mvUGEuUR zzBlbiTjU#c^-B5=$@A6K+m${kGuk!VH1?%^qaS@N`hNQU#u#NE`qM{FJ$;;J9dczX z-ZI7^&GOua{Gq`)~#Bu*fX|ggX&c)U%Y@{^CtDHS13_1SBu~VHCi=oRJ%%< zqWPW+4X9PQbdkI*LmJksRH|^EiX{u>9<3S2Z)YnV$yAUdk!xndixewZ)|Mw%#iDsj z6)01pQ10^i{qt2QS=g^`aFv>knpUpUq+!*@4FYR7s}>SaFQ`T(yNy6t{sM)H6fIVw zRGD%WD$<0{a{L*DtwOHmc1m;M11>$vmhbCp{Bd^n0MRS6v-h(tiHq5WM`^YZ`E3=5 zCrn~scJie0itKkzzWlF9{&qzQbt+mgJ@+uJRr%%&rdlG|t?@l8va@T*!GssdKi)6A zNTG?j!i)G%$Q@CnqF+RTBL3mKiWCapT_k__&LX+n7IfvvX;-jgj-0jy{U$xRmob)= zbTNhTH)bn+z2+BD#6F02cNCFR`d|C+8TjuR`0p9`?-}^-8TjuR`0p9`?-}^-8TkMG z3=9b3IUg4r^0!UP!pGoK@j3WnoPUv9`;<3;FYrzHK3pE3XB0Kw3FfKoO14GFKgL%6 z{h{RgnpT+Y)*Cjh9NWeH{q*3ZJp7i&m!svGT{M3N?rKJ(^61{7l&0lnyMZ6__v%G? z5#b-$)!#?t-9Q`Q#|Zcbarhzc1I6$%__#VodSh)(D~{fSm%!y6hHoEoH6Wi*x=Y&N zALw=Usi|oX*~*yzzpyhLpJ_`u7whp|_%ZwF&AHy%=_wc+8*&nZkhvMz<-gp9@iBG_1;Y;!L_%8eyei6Ti=M7+gycQmcx5Inm z33w(x0iT60#ng5z6(EwU&Qa>c>~!WuZ4%=?eN}s0zTT|r?roWc-CI0 zS8PUVdWJnXpjkjr!@#f%T?W=QGBi~hm+at6e$4N?X%Z0JFwm&j#9oJQpYb$`itG{@ z9vvCeB)Ab@*yc#CYp>(|8tN`xdUv(6PhCw5@MNW=J7U?UyNzw4nd0kdoB;zq>+xs-d@+iAX^1)7|L3iINWnkOtaDrv?!{|Zb~9g)nPM9MZnjHElJ!A+G>e43 z4v;7H#GBy-aj7TkhWNB1Mj5;4b^O`3#${irC+m#3tS_cXU9k?htQAsE)(LU>H-^oA zC11Q3E^CXVWqlE!Mq0)sbhG zBrRi=byC(@@#>^aGy5GvhFNbKb;R}fh^i=uE_Fv(>ZQSscn|&GrZy^?r)aFDo~-NQ zW=uwEn*B~v_2hWZQAfN-wA3)nY){UWj8Ez{j_}jHhEYZTX}0%1%BaC$3%d^+a zeh-r)*G$@z`@pT^C8kH+|EN4x*CJ*j)nQcv!SS`R;MwCt!%>WE*) z&Guwn9R2*$&&v(!N&hmwanu_}y-RYUlu27+cX4U2u?S4+xs9a$Q_94P;nJ3A_o(;C z6l|rAm~3SZm^R`CKW$-CBaSwM0_j)gjId#Cui{%=6ImpbneCa{x|KCXESKt4))GS- zJhlW-sM&=uqOOubKHT`}o+g$q7m@$70T~;<;%f-{6I`w*9ZtYgK9HHZUqH)zm3D1fSuKIBdAv4e;hSiA))kZbbJ&{a$HvUs zpqCgwWIVe`dODk#1+_yYt6TIb^dO7=1%1B1ul{wC{k-d4L7nmC{e0!Q7-;JlpDu!K zY1zLVx~gUW>gYbbef1lnHH&VFULWNvZ;d_@=hL0gZj0`T4zuX~=rb0bi2lW*-RMge zJp$c=f7#Zsg4zUhphZtZ*RtsM&=o9tG1}jvSEKV-^ak{}EMNQE(ODL~AN`Pje%0*% z82W}qpF>};=qu=x7JV0ez@i_ccUUx^B5E5fx;T23MOQ>GvglgqcP+XxdWuCqi_Wy@ zw&*by&22ziG}L!Ieb9p~<+11i7M+alWzm`Fjh6jKqdQs3Uq`pH=$YtXi+&%y*0TR{ zbX`mNXXwfny%Al)qIaS5Tl7KnBg^$Vg}!ak7tpB|eH|TV(GSplEZQ%ZrggRGLg?Qt zx-|NXMcdJbEV>?gmqiDozqaV-&}%HZ1A2)?N1@-d=$FxNS#$!rjYX%Sn_Bd6bOVbX zhpuYTQ_-a@dN#VCMK3~Y7QGVv$1vY~S&zPA(Oc1HEqX8ds6`(|e`~qkKZ>@L|AyXd z(YMf_Tl8P(3=YKlchWZUB%MgD0C@{o{To1 zexNe2DW$2O?{VBSEMSqQ+ealyWC;H{vKK(t~e#fUzq7!*J z>q-0a{BRZBl?Psr()ZDI2J?)kbUq#l11DtXAzYKc!Kuw#fbWQX|+WSK3AoQx4 z%$agV{YZ2L^bFNr6uM)qrhUYaq`esQR{H-yl@CI%TLr^P4@bvL(X@k%OX`nD&*pgK zdELhOdL6yTqTfOvdz*ixTkXF9ZELM*U#jsfM~|R>MYX>?E6ekup-X5x(ZeWb8tU!u zN2go#5wvOYe03&={tZ3!E3-yH?IwDvMgNJeZ_zd$u|q8S8FaWs7en{5=yK>-i>`{^ zN?g;h!dgAFX)?ZG^abyWNyfu3p66VNLxdK&tKMZbs6 zd(7A0hv}T^dIQ9@)Dt2 zVLe#)z_Pv+;1$1trM}$1`dD;H%J;LL%A2~4_wVZHjl9pE(REp^5xUe~?zw1L&)cFa zp5=bTx+ppd?fQv(h$?rYXY1qD!OwEV>H%er4bJse`_1(Shjm z7X2*xm_->T67kAvPF+YkF@AF&>oAPiN0$& zzIo_GOZgIXKZ{q*7JV9B!J;pq{Vn<$`anhB`M!s~ zY#HxkbRJ9nd@M;1EBWgCqi>EIJsy!=hWFH&}E#^eT()j$UNZ zeb7Hy#ybH0uBAK)J;kEk=rI=k3OduG$Ds#X^qc4b7Cj5y%c2*cyIS;ebfiUpif(Dq zU!jj!#=9LIVkzH;ZfMa*(KRjlM|35NzKAYm(KpbAE&2gEk44*9SRYxgcLDSt7F_~; z%%Urz_gKbT1HH+j8=$A;VSUuCuoi+gP1e&c==dS#`d(Ih2|d7~2cZ)!`js5}zlHw0 znoWCNt@m@$718JDMAqL$=ruKMT8z>k=h%O94t*H?ax35bJ%e5!?$a01M=km$`i@0E zL>F)4tDl1^q%hU;pFLdwcoxH1vutK0OzGDB7o&qRaR2=}*yHd;9c8 z^ebI`dN(?krT!tb)6(8)w4Vf(bt|a-iauhge*?Y7-#6d>L?5;2Ts#O|vgpES|6;!S zWzdZ+x+>bk2RMt>{0T(28OZx7Ly-9uhJK@kO>3^6kHXP&6KvWtRlh5`oYSU_RrUL# zx6(ehLH&6l4gD9I$823sLU%y(_@L_r=uv2SOp)h{&(Rqcy&F9lZMJs~-P5A)qZe3o ziDEn-TXa423X5)s9%Rw|(CaKZ3*8l+PmSkI^h`_nQnYEp_a<~Mg4#V){k=KLe?s?^ zpf?}=$nl*QEkSOjFNh|nT}SPIImiBw(Mh9intbjcXQ60u*0+&1t(wwR&>l`cmq0HM zLi@d9)8umksow%ULW1U80O`LCdTkp&&93_EB<1L4N_RsaMK@MD3Z0wJ$2iUU{x70U zljE1?!FA(oTCB`l`b)`CJ~oGz`jy_bX-R56&B{^Eu)QYjuco|WTVwv(_@sFw+WPsH zw=xN-zlZXqEjDd~dOkglK6{CHjXEC}(aoeoeg+hx-~Ll+%{-gLsIMXUN@=()RDzm;x{c1Q61taNvDc)U$J zp>$uVf1Gowv;!@_Lm=-L(*98Nm+g55QhF4+YqfH;QkY=%6~-{fJY(e1byG*mhR9h0ePe=0o&z55F9 z@M=6$&|#bpv;KVaS@dzm`zrK8%lu!99>9mB39A3?=mw!SZM16tF#4lT+;f#ai;n!j zriCee7d?aHWs2y>myJHg#oDQK;nK8!-KN!0<12$+|Fuo~TwT9f=(Ws;2C9Bjbjt(W z?^ONP=x3VnnVQmF&|kHIDOLXk^n)cf?T*q8^Z>38uMPTmQqZYia!u9o4MYE3+@^h` z%EzOdo+eVE%HKx+!eStw6Uz0PgI>e+Dy!-*MQ>SV(`qaI3A(4Hzc0}TIKPpqd?(st zxqgSxp$&aJotSM=2oo7P(Ge-Aw@zfB|LV4Pp{InMVfb^h{}fzPuxEw37H zIrN;9HvRWnWc=08Z7tV306h`jf>e8v=*nHV$EyB%ptrKVR8x8Y`ZLNaDV>b&!TEVx z>0#)K;~0Y)&s4PhUXGZJ-=CO^{)n41hpdl(2|E0uO`}O&uS4IC)3hJd{`=5XnM_qx z`EhjWVVgEX?SB>BXt_-zWTfwJcSHa9J@+3Ld^vwFpm(tzc@#hK=nt6xZdKod_UHcdoYKS57u)iAiPBTh zeTMRms*Z0idLHwgjo$tTBpl2qbN&Aaeg7Am#+1~{Ka+9}Mt-kA#`7)u_oX&1Q|*5U zU7q{f7^P33KMvqYL)HHoy??Xu`*^bdRrKe3aV)(RLQcpOtQmKE}<}!vl)6-xA#*jO(e+S0sAlI_8i%{_g1C7ZZO|`@eur zYepTV2cVy$e3jB3^xAqOSqlV5Q$dC$b(SC_NwTNh4;g&c`bB z_Pd()p*r3T=to_B_qXln(Bn4kmfHUpbZwp|W+{CQeUaA(wpXbphttOa^mQ z^;ZVncnzOnDqRQt_zn5pBIA5Lhjw$nHt$Cr(C>0Qy;XT%wE6qj@*9fr=y~ zZJ+9|KKd++$9`2Fgw6%8=KN`gp2~cES(QJJPPVMa{m{?Qe<4+#h%VQZIiYkqx@ZP# zn(FUW^d45OqDoIimkG0J>1zJIhnC;Z5|j09DO&%1MO~NHHlp8TePfBz&;KrTh4WlF zbv}-wzi0BCqQ3C*8`_`snnw&>Uq@&2JSo2iCFOsii|}D7L(p}eip)Qr_drJ1CD126 zC+4NftD#T-&i!8LXVDib*t8H;zb*O=7N^-t_du`Ye$Nu3x7QCXlb74Lu9MIoasD~w zy3Rx&|^OrSG9lD^8-2+^Cd^Zh#)g&66SW+jxB5fc~?DO>3!i zFZ3T*(qCK-J72@BQjK5Qn{TrfxW_eWWi-YVd z^^c&lxL)S|m(b;S7(KvzmGb-O!W^$zUd+yVOn*^o|3GxlSB>Xesow%^n)K1l&h;5( z)7~d7<^9mFTjqxcU8e|qFyEzoB)UJx+fvn^hBi&wTW$BPC;qG_>(D1yjGv=S_TPjy zP3nJdH1`XJ>Y z=)27C7OK26+BE5}AG(3%cvI2EGl+-eG5Q;UUcz`@qpq|!32pxVZ*f-Psc6%rz4_=q z%(pqDrT$v)7>sQgHNqckAm)LhE^m5Dj z*@CviM_KAh`Em65JAB5i^hLC3(%yaamL|sYyVRG3^eF2$k5l^oCDHYY`*c0@2+oIH zm4~8l-R6F#bXT-#(p8d0OMfHKX}@yKIAPM?eDsU#--R;K>(Fn)!)T?yK{uvMGO$@wtXn@Z?|+jvH&uJjjx?qoTCZO~=6b3Jnz zwivx5koJ;O6JyrdN=(+I!tkU6V)9fUApkK5cuM^$eqBAY^ zW&9J+b+#IR8zSSKh5oRBP2-V3AKxnUF3b3~p_f>$=V^2?>YMZVF1jM?gWQj$z5KOU zQ@CE{e5-=4#r>?iDi1|3dJV&Mi0zq#BW3&Ku=`yNn4`NqHEW;XUF zuf&1&q<_fL>&xFhJYfCLt8_>7#I3&b+Y5c&a(+|MrpXva<X#YB_7hErvEPekP=$l-R64aIU z0?@s0`PTo==q0R|@|Ys!vFN#+?;n-ULf>M2Ht!cx(PcP)=Kbs=bg`qHKh@txbTG%) zRqekMUHGKE7gT)8zQ8qd(?+ zg^`x=H%HI2tcRV@zcQbB1k}s>pw}?|@~XZYorUI=Krf$we$BGp&qtdk{jEVCt7X&T zNK1d;NIB>Cq|yh`d;M+N0M*|qbgsHKJ-#LNFQDJydXH4~@1h&?GH2dz^YS88dYnyL zpvwKxtGQk=O4mU*WBp`W>;1Pt?-|7VPaZ?JL(jV6dp>#*{SEaitNK~!YrBp2IT_Dn zbeWlaX_^}E476!>5=+si9`nqu$~U0jIn5kW`Zzj_lWVR&H_=5oKXjpw&#yk~gXMbo zqmMH`*y!cuNzAdVcY#vByiMbgLN9NLK6uHu-oAwPT$6V+qdW!O$HM1$^hhS-WmWzj zI*9!%=s@!TF#eW1MbgP8Kcsr&@qq=F>A9^~^TT_%Ch&IhmVhq~0&G)?jCi?R+{Cy&2(*Jx*eSJQnH*$WX zRr%NG3iQY6)9e3$zRmT&q|WD6bXaZQ^?8UkP1-Bikk8+0`sR0av_J4YPnq=J89m9e zUi3%H-)xE%=dar0(eG^KGY(xB)ZA#(r2Vlu^xHY~GIaPI-~D?Fx(63CihZU3pK{c{ zg&xi4LFW3MH^A&o>hrq`=m^dS%Zk2#d-RvghcZgXqXQ%Oyhoj%40JNruY@X}j5bZ$ zo0CIpaqe_adPYJ*K%5p6(HJn3kVXDMtQ0+W2GV82)D2ouwIn z9vz>Nl9I(P78N6ZRsBR&k2|hWQYxe4@4p#(K$kXcnlz3H3^G$8W+GHi1cy-8)SC?U zr2@UlkT7pDw6U2C@|Fi1ZPQY4GqY5+7#b63^cPG@bx2B83yld<{gLw43o`13GH9bS zNg16<%IHi|P4vzrWwatGqZLW{S~12Vc}BmIGLDE;khc$YK$7R}gMZInPN3v@`%oj5 zJZ~TB3`(B2k05U!O}u?H@g7GLZy!y(eKhg*(ZqWkO}u?H@g7GLZy!y(eFS^^2=?}& zE)1gz_Vy9%?IYORN3ge#U~eDlQp&#GK0>^Ggn0W1@g7Hrw~r8SA0gg8LcD#1c>4(P z9*3G?^rj}5q`ZBEdix0V_7UpsBh=eRsJD+$Zy%xFK0>|6;Vo?HJ)oxE&YF5VYwGQ+ zskgJH-p-nOJ8SA|&)Zp3Z)e`DX5P-4c{^+7?W~!%vu57Tnt3~G=IyMRx3gxxmc5;^ zqNw>A=ItZQ+eet{BMh?C&LmCB!eY!h6c%F+KP*O#rfD$y7>!F(T^l`VG_NO(_DKdQ z3?!-Mg(QumkW^Enf0Al4lTuTTl&>^Q4y{wqjx1r)J1LeKUrG*A@gx1(90Q$NTbH-puAYHCv(m^)Pxg>*>vkliYVDor9aGaX(%Z_HUPyD@Gt!Y- zS4VnWVp~@Vb-M8_7>16{NJ@8VJ;K`t%8wweM^fBi*(W+_V0iLCmlhq}B_=V&5vRo^ zr6qDJ;`=Y0F-h^zo4m>zo4nB#iV=t)l+ zo#{!VKRs!5sV9wzE=e_4^`tRoJ?ZOBEqQvbuQ#>8>AAkf)WQ}R$aFLtBWX59(i}QT zvoVt9&`Fv@Cut6yq&akwW^c@MgCprpt<`$c*PD0fRPgoY9Xh$b#>}Aur5YnCwG$~d zLP1tv8R#=mjgOQX9z3d}W}Lp1w>@7UYPF{owZ=XZo*E0QfKg4JI`qCs7}ZJ0v9c`4RaUEkBxQ6eSB9r2WkK*J zy%jhiD%V$TEIXc|Nx&Mwx8@`}wFsTA2uEBZ=`4pJ>1G+>nap_n(t5aEaV!pPc!~r+ zr6LjmU1dd6n&e6~nuv4p9Y8TD8GJ>KCXaPd&V&fb0$;tBDiYjSR$#YBR67lfW0D=Q z&SWjcp+A!vA}vP$${y%T2D_ z#du6JCIty&W|1%^7763>lQ1qn3FGpUFs3>QW7d!`rYH#m93InD59;xc46_II@JEi> zgL?EM$LvAf$jC8!Q1?4>%pTN3Ut^Of5@x4rH6h0wyIM)eF~_dRAjcfLT0wXqQ)5@i zkYSEpJ@9#-_egjvn`2iGdlZ>tSNC0V%(0tw6>N=T)bkz*^BB}!ogA|V^{hvZc?{}F zj~w$D)N>vWcj_3__I*0k>lOnJO=fcN0E69W{G;nYaF8<@kp3G zs0Tc9%pTO^9XVzX>fw$Y^BB~#QDb#0Y;4{N<;mkoI8vM`E_W8QIl=98#w28<#-#&0 zpe84~;(VGl}l!z4OCIy|$2hj#V+T3o(mTc*k92Ju9;aRs?M#nx6YpNT2Ck6Hv^7O zHX$dU^0sWuyEm{7mW-S_$}u!&78j9ws1}_T`+w@X*5f8at=LpHX}E`solafeW_*`s zX9Pc9H2>86CplHb^GniV`?iKpd{jtffkUSg2>J1^-@hDeYpTSw$F6w$vip#OQAlx@ zi=2&ZyDCZ^?%NW{cw3^>NHcP2oa3A#MM+g0tcn=@uywZo)Y?qDDC~7Ai}p~SZ2gHM zh?`MZ91ROfllEGc`6fR19ow@NQ;C{MS$(RZ{^@Lypexg|?kPhJI6v)d`qiRnLhMh= z@-5RnxFPL^(0{YD?Q(OzgNZJdY$CBUtmN!ZgDq`wXpgdr#pKGi$1?Rz20q(u-T>+iw{t;?t>QGLr2;(&qChs>GXF@#UEKfPepGF=M1ZZN>_zKs zvA1-{7ie;2S{vvA7G7`tS_a37b&#vM(2(#yQ0Ys zg-y*aD@>F96uSbt<`f^INzPLK6YVx!3#@j)c$z&#JdQ?l_Fps;Xp3v!!(!2<+x1SI zwhHPAf5%cJr_}e%32#>KLM{=LiakA+HWpIKX}TpM3$qEt4KdV*CM3bHf+F1d-Dryi zX3XN>@5RNoVox#E>Ju@-zC)soA-?H$Ev(f<5J<-g*cciI0uVd`5E_WD)#xrHXlqVC zKxc1uZJV;I(fN4j(l;E1FetX!$(ERUxX}nkDFT`4;rnxi0|xC9I&UUA_QzxrC> zuRtn{6oP3b?c~NLHAJF&T_|`z3PsGyeiY_RzqVEW>A@du@Z7@+tRaQ)s81{ut1X8X z$0Z?LABzZ-9yV|wbBAqZ`!JSp-D|0$rzySSFq&*TTmdySF;CXk^ksg3ZsMwUkju&w!%X(sv#BZmOw z$&*~_TA{F?7QedN^AaGnKpthv0@i)>^B$4F0jFmu51Dv>5rR%Dpo z?26892^)h8wyUYHbiOWM9w$rl^7OQsZ_Re{xSX4d8!rh?sB3z($=l={XBd*?0JKs* z*z9sgm@50!>(Xv-BQ1k2*ue==d(vt z!+uJ3K;_jnq`jgnc2Zxv`B|!Cs@AlcCXkCi{9QD^6j&rww|=_)8#`H(Tr!41d4Yt! zXLSa0!=GzW4as8_7cr{m?@%X3Vr?Q!s=}obNHX8@r;ShA>0obm^hyGruW?rU^?qw{k8xk z$B+KDzpSl%d1Ozg@@zvRcu!wEHZOSabiI_p%8j*9^v!Sn9z&S-nom>QP6)Wg%YS$! z01`UE0=>FlgE;s<2)%_k!5UjeYP$FlVepew15e^ZgXSH^3>D|F)?j_=HwaKbo9r z!QDhR$E?3VdJQtX=KEFpn_oa1@!qqvVq%U{b>noWe{zl{wz)PB12B>=Lqt{ie&c=@ zx{ySB5hvfk+w=9>$W$4PEjv+DcqwuEgoC%3U(P^qCg(j8`i*1uXgQ8hNT%>y`HrIX z#yYA^E^&Gr7fnv826@2g8Q|Y_0B%a}iF4@eG2KouA8_TC*M&zzAMlXtLEWJ!9S9XM zqCBy5*QZDf1(MIcL8yeP%#PTG!Ri*`-BJhm)1AMD03u#i@rR^Pw^H)GzCMo=ficNP zOd(i&1vtF>^1wL&Tj5X$FXYIc;wu#64F%EiVPrQKX5PL8&>F)Bx8Ka}I(ZghUYB-9iuU^T{Eb-cJ;sHHK>jY=8 z#VSr*&tS{}RSd^TAPVD`h=s=FD;HTOMP+4+P#fC#Zh6O5C#uRoZ1K%XA=7i%y~<%K49n@TI*e$4 zGxEO=~ z6GbD_-_9antc28yNbBgrFlc4|YRk|{flwlj%dmbQ6gDI*|5mbc?+h9Ot$c?b9T9~( zTu7Zzbd{Kt^t@L?b*KO#oMwZ<9<0Z^l|~muo}sC6*Vy?;g`JZi7f8+4prSe$Frj*8TkdeOyJ4=O2jwT#y4RT~l& z^;!t6*~4Z53ThL&m^n4rKo0%v_Bml(U~F8GPkNmL4VTiufzx2}VZS0=2kQ{Z1qPir z;Hw@Dyy03;Z(E|l)qehxkL23`=BH3@I=NI#+#@Wc5mXLV(&G7V4-XnVr#r>dE-EOH zg`b8cwbVMA`Q4pTiiUxCG2PG-xN? zIvT;-_A0lcCL&jd$Bud!JY8o~GYWg`?XvvMih#bLY(WZ>W{ufpyb}w*bysZBDZza$ z5?g~Lk+k?CA4ZjUc!qjoP=Gy*@!+tiia+b1L?R>_G=ZoACL!8@2uSrxtAQkvYe;A^BVZ9G znVDqH91m!VFSjrDy|t}ZvDcEog^=(v0b4<^immmn_qJvnUjP+IEadw<`pUbY5+yzl`APyrlfh? z4*wcws_z{CnhdFn*?lR6J$o1*sdV}W&ick6<*Z0)&W>mK2aLQaB4)Lj*Qr&x9qRMF z?`DOw!Ykx(Ws1O1hiGS=>a6Q4OOd5Lw=MeGlE8cU{jC4a);%OtTj%y@UU!*#Ltn*Y z*4|g)W^!LezVQ;o_EnS`kVm}QziKv1-CBlFUwaLHKgORPV7l7A*cQGWVgHS1eeN$x zwBnZ{W3>Gi`~u_MeBtT;$I#G_T2ZN2RP|L-W%AP|Bbuu{Q4encmet@Tj^Zt&M6%7 zf10|DHTlK{hm=Qp{X;3r)&b?Q-cXMctOn*lv805^A#Jg{D0D=5WVe5vyFgMlN1d-A zl#h_do$CMetWWU|ot=0f@V2~*1jSR8tp|`{GBWJ(pOl?%6rKzn@Qx3j^qm_mbD%M0 zqpp{tW$C4L-3}=^i6(3LKJ^&XZA3fkRRc1`ehuokLMiv15ARK&sMt zmO&{HMeKp7$LW{`jI;ImC}E`N>#dYg`h4UUMJ0W`!_1HOA(oT$`J?pv(#+V=qZgwU zY)_rK{+yA!7!=!y0f&jP>N zS;O1n8V+U;2S@NBXLxF^9W;1>vEhJ#4)sZB*-*4>6bKqaaXp8GrVFx|2PGA~(xE#0 z{0<5{o;`~K?>UDt5yKhzCIq@f7VlV18eXCE&OH&2Tj)mpR;PNaqpwwrcOcUr&IVfb z;Vk_2wPvS?8l*l^RbT7(O X`cNYDvqb30MCd6q6mH#uP_*?~!eDFQz3gFxdfl$j zNhSDiNDXug63~?uY-BkiBN+X(mFW7sqIzZq28WLkrBTXVSQu1fcZz` zGa_ZF;r7Q6=&KOP(e|H_MSbm0n4I!vMB9JCa6B{8K`S9Fz(@z_3b+3fNs$iD+u?Rf zXQYFZcewpm2uIr=V!>$p!^Z0;#_OlX>)U+wwR6z&>1+Ro5kSad1-O$Vk`Wkd1vr)j z<4%kG2@XcvpEfZ5nlC(%Iy8y7``T|us7!>GCgScE4Q6UhBIFXt87E99lmLFWh>Ud1 z#XH>oAkarTXiS9LbrEKVhub%caJdLSBEl6S{HO@uB*Kp)9BuzM{NnXpzVtxt7#Do~FC>rXkC?M)+#dM@x56)K1MCBFNF{|F>Q1h)BTbO}L zh+Q}|cd`}V=Wus{ZKkQH3Zj+Z`N(8wVJB0EX=6>~iTbx7K|*m(4~gOw93}V{q}Ycq zEhXfn;9EH>GL_)(0PD9@C5>KZA_sDZt=wvF=zzMBgTE_)mMXzEq?po#X+q7kTIg#~ zwzjjAF^SY`^E2zTB~F;#9JtEXtsJv7yWOe>X1CWeyFG4q9b$+E%`|%8i_Gpr9}f)` z_QXdCIxGu1&@Hi}yRHCj-ghxw67s%Xr&TyXgR=F}VfA}p_OtHAH2DG8>UN==6k826 zT=%rTmr2Gl?oRC~cRm1Zhnpi7;adIG|0@)xgTOy7=l~|X$|fitZ$rX=VZ|0NW`-PVCR?%DO-w8_82h8 zbvl7eU_$(5ws>;bs39mALu6Xe&56#;Wt0lKIVXvzKCANo9YM^ELqw@DP3 zoM^sTxUi>nFD2DjO@7X@MW_pm$Q!W2&BmJVTIk=h+o^K@h=veYK;RE10A-w2S&5j9 zdqvE+_8oY~9d=VOsapeL!6MuQS>$=bO#lm)J^uVh5JQWCgzcIvuZeZD9k*7IISdp= z+VB{fW5Z)|N5uHM#nj=;FeV+@=hoV3*bOg5qt71W?-tV!O=_x?;YngjViNU>JxLRG z5n?7;DmM|6Xt2Lq7_2a@i-c*7{*wB?g&%*nut;IngIU!2f$qDZXeA&+#NCL{+8Hst zLRu88P%CDY*I*SC8d6XDjwNjktvxt`%svqV)L7zXafxdYV3$vu|!L<1o-%S}V;%wUq{8vH>I4dC)}Y$1JUY{dg~| z_|Qr9nD3aewEEm-;Ydkhef@>-DUBF6=8DU|zEJXF6nvi?^-ccla7!9Y{%%@`fUFy}^|^r|$A;@LbLCniMp$1}XB}PB zS?6TU0|SbaqDPoaf*>{j>`+B+VUHzekUxj^FePv1!(5tlq2$m5qva#2h=jM;5cbi=v4z!_eV5w09PBvxXY<3nraz6VG{J-$29mK^mHv?@n0lC;oLh@e*0 z>Cmz}VWK%r(^RywFLXQQ6OZQTR6h{2yIA?NV^1JD)UzhDys&3xQ?Byhe6%>Qce0oi zKd-Ut+(kf8py`WQ;UjnBH}Cnvo{~W&@I#=I2VjmGyp4uVnr3f1s}8XMq;kBblU6jx zAkq{r|4u`nU#CAJnj#vc>r_u@3v5LZgr=gC1ue`LmB5*sO%}v6^$@cfg`*+jlA|bk zb?Q#mtL`MB?CAfgWd&Ng=BJN1)YHwii4xRE`6fa60pIBOGAo1j7>P`MjEvQu;X)JL zkqJVbAdP11(2Jp-wdd<)qXMT>S66Dm01!#?t3z)Y*y7o8hbSv>=k=;q9Z&R$c;+rV z>EC6|aWGk~8^lP2f-@Qr?Vuw-j=$f10SJx%{j-Jy2Hs>~N%RE<$vU@7pPLE(iO5io zT9NI&$kN7Q9IERrk5iy0Q?1B}kG2MXA@r*`|9ydX@O-T-8~vM@x-FlVQ)mi!2tRMa z5dJ#vH_?Z=C|j?s&z!m5xw;ztS^zO~tBsBbEcfvIEDX&e`H;FkGjzn8m%1cJ@R~z8 z+cep^XvtA`b7SV#GvVs9;aNlRiQ1CvK+ng4UZZPl+3h19!}b8Ygcvm?w>rG(T1M!A z?~^_1{^5fi+^Yncr68+F^STRK_nZgzLisFHkC)UtB8%N+is)uh{(W-!9!vphA9cdF zkrjn2A@!7358heIRu6WAJnl?H6pP`|AVjDCk1S@I?#odyeg~0FVr&%gUxJ{>9lvCF zuHB!h1Vglm=n~=t@c|XtU~(3C;nWs5X5Q*(fm1ksnKm)>n)fT}LG{gn34-*~}uAgoNafOHei)g7S3Et`8xw@f$(YfQ*gW?cWDIk{6p`vrF^( zv|qD%c^?XPt(oKAU{>UJ_r?d|{WL|T}_E;Xt3?31`vI|*C0>7#}xIrecoNESAM(OTJTMeHTC zip*+#?=Qe?H+$5j?gdy?A49aZ!qIw$^N=^I^~}Y5J45fom7su>sBSEVJnkC3-NPn( z+$(h9N=E2zUAWv4TB^6xABWKGdb?zV7VGUozM(iH!i$WySAkNg@IV~yZ{b%i>`@QJ zFG)C=Io|m6iCP)jbpnD@*t7FG&{gVCIu?Q|^qy@>9?p#HecbTC(xRQXrU*PGFFtUd zdc41m4T3&b&nV$@5Vjn%=li=KX1zWva;bW>jZ{PaQhB^@qCr{8mXz52AOJ#9qd8+w zA+wPn>kDM{Q5Mn{V8^=D1Oo4D=zRy~qDPi9PS>gJH-m8|nZ69A^HIX_33d|ANKiTs zlAE5ZvL+5|N#&^t;MC9$fUi;9H3`)DOXFnLu$ax8*|NA5|1 zI$sg4#o>Y*>(mD%eQm1R%_^0x>qe&EG-r zIi|h=6}doZyAYX5dhfgFCK!sxx~U#s`n!6(ci^InKe%`x4%6L% zv1v$15IeIqCt4X6GLEXAp`oN2=M7QUwL*VnmM zVSWEbKvj|OVut);mjBKH7WP{~^6IeX{Q%bX;qEwK06vhL{(;Z^2rotUU ze3@yDDWTWcv=^sP=dBq+1IkKps0hZyE>Zv7L#WHcAmpJeZ+|6nViF-iS<^G0|k$QnyF2 zY}V{se19j;dIisbl1wOB3|ZN{+xff_yc?F4vK2;Q#{TUb`ATpQlXmPTMC(Cg-$R^R zaB|v3RSssdEXfAYSf+bM%O$7P7nM!ZPzbzsbGro?)!tKw@unabr&hU3r&OW05YFpG zu_Ar(=plWLTzCL2Iar(m3UQW7{(a!MEFTBa@tI3u3_d4J2=yZ^Kygw+wXj7*$HQ#Q zqs8u)pH~mDv(QoO<1D-lseI7=5J(mLolKuVg1=R(! z@Chm9r{$wqjvmiDWU^2R=8=}@sXv)Uk+QYy>cDA-mq+7r1E*7z(0_of$ejh|tJWHv zGL@@rd>=^xaSH8`9&oNee*V-_cj?3f@?mA`Y19J)FIf^@2tJg{j&{$jU8apj*HLC0)cxT)iY3z7m)QS@u-gEukzhTVIcR8~L&qd}TF)>EP2@K5XhWmRWlwAKi z@4y5Z68uP>7crNX5wXRsgl>kMf`y@_cJPj$%jMtUUK2ucdv?q8_sIKHqrJeq9?FsJ0rP4lG2PYVg z5rZw+>L)oCj0oH++!w?*AND;Yt9D}d2 ze$MrReiKT|C3)Duc@4icxpbX8wTte}*@kB-CgH&@T0?*K50 zJGMAt8v(VP%g#eL6{*g`1EekfL$;&jP|Lq0TlP=3>aqA|TLqa5-VCm53o>UeaJJkO zyB@%tI#nTX~b6D*l;*5cG*A%I1!L!F$k{#eVn!$eYL-JFFgce-=MF; zF$M(hd502s*L^VUzXiV1CHhl~Tf&qn+F6aKk{` zI1vD5xJwL)fnz7fSk=q>MR~Hr+~`QU8jM|6ElmqAX6XaljZFle7D^S$3&;#!WQN8JzhZi(;!vVu$6*`W#GSe1MoQ~@JmX{Z6pSC9q|zRAb5lgy>}IR5+YT44-u4v2 zFlkFm0Ol&4Pq`N`0&f1+Jtb%lbW47s@us0+p0l)AV#cZ`BD0;PXMLIe`!mkKnNYC$ zhWOahREB&-h)cO|s@}$2joMdP;cq z=>7;clH2F2xyBI9y} zG5FZ;u%+Oy5pOKQ#hb1(i7o5@+d;^O(Hba+sj0nhp^n8<9T~gf8Q6~+HVgaSa4dJE zqa}5HK{rL8R8&nLCEPaarl(~bstXLcl#c&qAHm{>cArk|jyYtyQ$3#XCOeT?aJY+| ztaQ-UQqKnV!EszTq<)0OxOb|*G*9y7D4j>^G;f|uBRCF;~}Rt<-~sSArW^tvJ&&>TZeT|lRPY8Ln1Xs%h+Prc(TtY(x? z9Fk!*28B+#_ytWymHj_;OH%7zj^f0=Z|i#v>`tCKd_jMNBUj(yrnS3m0;_%Hqo3=) zt6~o9T_ELgrsUv<@!}9P&I)3gpS$gR5ov0N9d19$;N;aFO0IvW7#!Zq*fr=nx8O*= zJ25=X3`*$7tcm)G+hWEJ0XtDWDq63F$ebikjl*UI$RLtU>i~`mvjfSzWNOgOEnkt8 zIBfRMV$AwHj9>}3fLRO2sX?OEI_u!Y7X=81cD zPX7ZLXI4*+pTjG5UjdMEpQ3wBSwYUpAN{;_FU2n*je+-uZwX>LiF9z;0S8zP))K~s zO#VJN5+$%6vxuYrhBrB^d>i2Q$&rj4TBq2H*|ZcTF_5x#M-)AfBOjz(VF!h66e~v9 zNw*`+R$=PMj(X%#vVWJc&dC;Yl+nlicfT$wnIu0$%k5S@jq zJhQOf_-b!|PIy*2-&x^V&hT2G7#;rRIpJF~<7we?M(z2k@N2qH$>#SyNFV`izw zX%n2;;m|Po4A)q``fh(Ao3^+#-`tSYdE$b7GdVG8a}-anO4Gi-=2J3T34MYr@`vm* zoffO%yc*APH2+-!r@Ak)k<1L@t{%@TUyfZAHVMI8RkX9q4TZ=pl3$>tsiVE)t&Pzu zg9pq_Pv1@PwcvpebSw38{ZZ~r0U3@+B*K$H3dr1vlNu1bh4GQwrdJPR5{R*Q=(SE8 zbK)0sg7Yz*q| z`L_x2)Yn}(M)90B2VIfaFY~W0lzm@QI&UpC{q5en(bu&5+*&IwLf~}@cV;O25{FM^E8h{n;ZJ*4Issw%?l+lRTop#M%xmQZS# zzp#XS(R-Ed7#|qQ+D3J*R2)LlV$7V0mcTSHG$Z336PT>_>W;DMA=F)iqZ2S&5W1Vy zp)NyZp3vZ@37j5J@_f?(plB9|;3<2-pI0EuMS_}Isw=ue^U0?-K!kiWGOG|P-^uDL z*xYY$7ZuWN=nBKVRaWxieW#GBo+wT6&H~;dxsPa5!Ad#GN+Dz14anpGQZwD84qO!% z2w0tZ&{&13$05XC|Jun?*OeG4-fyS}Nf8(A%GUV>>Z!m$y7$V!04Fe7)djv=w7EP& zLbe)B)Od)i!XSB@+uaAHgT1!JW+ z{H8VB7d*T06g9CD`Vpkh-~Bj%6yJpHjI+rSHJ=nO#Ks$>4~s0lGBwbh#Y|q#u(_JJ zjwA1ud(kL2j=XR|K@|dSn?tP&+Yiz%?6+fk>9n3dfs>Dl0o(nmp{-n$et0*Gg8&HS zK-ji$3eq#D0-v~H0Hug+Cwe|z{i!IRd#)$oRuA*eLS|annK1rks%)gzsl4XG+ja+Ak;FM4H@OA3bBPSIWLh9rDArJ&$5K3W-`BJ z=UVnd19n4pigAylgE)NzU1eBniJK8iUlF=$rYdY6P6vh}p4|Twf)JvME$1Q(<%dv5 zs@!ePmfd2u@UQn&ezEd}q4p3PKWftDan%L{<@qDhcq?WlkwV{SWm21P+Zr z-a84p1^Lngo*untX?2i znUL5l-BA*Cq{x9oDN#>~EJrGg#rt}(c+XyaFBk8=YXABSo(#yo?@k=aRyzHp7>kdp z>!q-JbQoJu7!)b;i@clE`7je(dk-?p2nknXM8ay5X!Lc(DRBqm=Gw^yyu}lAvkI;G#?xjU^o1CyEs-P??p`Yh@MdAI+XB}h}1T% z;c(jI#VmOO0_&VBNf6vIY%Q?_9OyrAYG_FA5NRm>q$s}TD)|HdE?$L{;Q$ZS zp`r2Xucy<mlE2EioTG;(ZE@7_`7Ur0~BH>kBNm&`lge~nZou$-D}?| zJb68xm|m|z+qo9~HU3>ZuqFBKRHN~)m3*Mw@`=_V4xC{!B|pJGH#CgsPO(X*b+8KG z*t}z^2+5ty4r!Wb9Z1ZwiCh2UFTeo7L?}K#!29?)!=wlGWN@1>BRz`(z(o}oP`tZMmBLvI`Qb^I!9lz7Jku>8t0W6n3<=LH7Rd`=Tc zGu{~7v`8>*Iv1c$qfvWv?%ZQ$d((U$HQ$HKcc1y*WxhMj_cP}Em*)G2=KC@8y~%uc z81L9Rbb%TCW->_8GGp&d1{WlQ<;mcTWN=zC$OV9jVPY~kHW^G!22VqsnR$7_#0>s5 z89bT{{vjFcO$N6ngTF}zf0PV9k_<+Y!41ivHyNx?2EUOEE=mR~lR;`?lisV7!7Gx% z$;sfjWH2om{1l4M#BeMb{97{k=Vb6uGPpMx+?EVJoecgo8GJk$)RV!sWN>vd*pLiX zCxc6p!LKHRWy#?5Wbn#l@Sm?GRQ$-#=f2m9!UoKlEEFx;Iql# zFOtFUC4&zkXv`bKmh6Q?&?2kgtM$0AoPo_856o3q%wB%%q8MTS4U+g=jS{>PP-5-O z>6^orx=IXNSlB_D8HjWtj&I%);9D#J@TM0J_NV(wYx)O8nD)G*)jq_y^G?Ob@=X($ zDQaI}sGy6kDP_)SF^j?sFxTaVrWh)~&ODA>=JiEArTJ3fkj|43lKvb1YURT9W?RT7 zyj-Yr+}uFa5!mMl45h7qIktzT0xU(+>~%no=6zub4@a$nJuo@y8HaD)jIo0~ku+Eq zqXN5AU`9*^k8^O({tGcpL56I}m;Xf>jCO*!>^PTHw3j%Oy0FE>ARQTisG>tX`YKF7 z9P))+`nW+$#CLqUXhR6P zym>Gj4#?49ipUrZj^`z6IWm3!}xeT~JK!kcqJ#G0EzF;905sqTG*>dS-+YRF@ zbfD`v$i@)}NEMIH{B;z0r*yWGT)iRX3Sr-=Ct&1aduH|d!WR9C*p^X{ixs159eTqk zr+>RxS$Hol*V^dARkn)T`AANY_vz&m!9+J#R`GKf;zCO=&tT`P*>3fy8tuR1_lC_f z8iiqhW@&~wLN0e2ODvw|p>;>ol&pmv_Y>T$g&7Wp^DLiB&m0$ajE&6AP+tzbkP`Nc zh2>JG&Bf=u=8pF75?{wq2fa7I-;l$e!fA3rD{t%N;JU9T55HMuSt5wvEM5(+bONl( z+WshTnk2XV!GeghZHG}` zWUmox5g&+NjB93SyVX| zT$Hbxl7dZMSJZ)CJQjKEXP^Q{CsTg=y81?Vu~SyhL~e8X2haMl=!0gnl#We68b8lJ zm@2@KAE59_->=<)tUJxaiL;thZrP zq8|;9Kd!*M7ZuA8UUbH&FxJ~Kpv~?t#o+{uoy2lF8sfS1boqC*(XF+$big{&Uy9Bd zW>!AuUVte7`fKD}--2paLNfpk-+;25Sg1LNi-IHmF16r3qe--hB+_{G8_rD;m}VTchu zlm&X`3{+8M_vh?1{5kzPMlXHL<|U7J!Fr>y^y(zm!fxYwhmI3Tlx$-ioQ0~;D@Fa+ zdpg%mf|1uCjs(p=yI~ixbjkT+9JQ~*jp=ea= z&;_W+>p-?_#+nML{It1eX!M{KW)GsTl6@isP-M4vG6=yQdFx)vSYjKe^}Rm;942x> z_gjd<7W96+_<*>s$04pM=03Z*V~bj#?*DZkTLRA{dip<50GGv)6?`bxT7@?PY}23R zmtS!B_=Wx-Fwm#=GkcKXeOjoDm}ov=+nP}(gXvkli!c_xTF3#cnohF`Fdd~%-Jp;q zRrBBn+(%%lcYNVVBnn*Sf-g2e;oym9^g29pD3qHhgws3b=oU_wZHA!j$Hm!0k#hP) zCPBW7$qAvMDE?ju;0LR#;+L!MT4^}!V5az{T5;+t^q|~#HQXK%|1ls4!|mcJ5&jnS z1aqN%^bw5~InS(aiD$y^;x)_FqM2^UT^Y#DSNrsK_6X*C{n5W5;NM1!4#l&3n+t*M zv=$Z5;cZW#sXK2MKn!x338v5=V`CEug%}oq8SePGU2f!!r;C?L7k5D_m=rE52`?^@ z^{SE-bNGJ(G}$`NkFZbR%MtPhtYE9T<0Eu|kUJdpI*Bg6Aik2f0^H-rl)#J0ur&4w zj_Gs7{w?^F@KWeLr;tB&PzgPZDk*(R#}NXT+5*xT;&9%gsYhgqO+)hqVM9`g7kjR>&`N@wYSqz$u_yjf+ z4Qt?7vho^UbrZdMiWTS!oa(;#Gz`_tgk5q`U^h>@b11k}Q{~`RDE7@^b1%Z>4-wLB zyYZjdi+5u$el%Rc_~`AIZN_8U{!2FFz1TA{hJ>FDiS9B?@;`xB_REiY<}`?ptm0{SM)v5*i$2~~*C3VEin zcJWam&otIvR)!z(NujD~qV{Q#){P)H?3r+Jq;-=Kx+Kynj9e_4w!Ds%ODQt4m={f+ zdb#4HGe2oXLc<;G|Je>Q9!uw|MY=iBf-h(;85Y=fNEWoo3^eksd9w<6i(g3S_e-V8SiKv{BMMm zP5bd17@VSP`cwo)D;@Wv=r(@kMfvIB=Catm2pWsC2ZT*tYObE=>^)X(nkApo77{lD{v9g*o*#cPa*``UPH2-5rIMXhT8*!;Pb~USbEIp zg}Y*Z6B#>LXyZ%~4l^9$#hTc+L_~lQn|^@bz~DXjS_IrEfx&x~;Qa{1evT~q{jUXv z#wZ>ChVZs)aEhBP3-B|Z=#mRT%{+mJqO>7TzyD)=^hRmBNEG~&2%m>=VD}*mBBhOo zJ7c%7fZ$j^+K{ysiVqnm-;mW{Zi4vsv#$FZq|D9;A(6`r^ectvkv+oeu>o(jF7%W$U zl`_I^Ef194|ECr8JBAs~dSb#O0&-s@u*3e>!$;4O%a z1E6nTCg@6OcEw}?C%Cc;xlB%k{*JIAIO4OcO7JHlQ4EXo$Q|4t%~ygCA~r@Lw?;y$ z(tZ+?Q|uQayC8Qo7~`#qZ5ATL*=j_Hd$p8DL2|@|hneLMxJD)VBYF^3s}5t!{Wstu z&Tc&OdHbUc!vDF6dl7+v+9w4q^Q*BYM@N)_KBf|BM5D%$#EQ4g+89_iotCRWYH z!37OxE(|vcGeP4PfRg^7|BiMFj?g5{d9-cTbSxG1KZGWZlD8P{ z6p;{n78HG6Ly}fe0Z8iKvemGPbO4{Vis<7Z_3WVS++FQI`v!cJ71;KkHW7Xlye36G z)6UPvMS<{Aun$hykI*IFS=bYwtUbEI0q*ih57%9W=}e&G-0kOYdV9o0%AMM6xamKSwlkY0JcwAG=1_=^_uq)TIID%tgLa~zJzk5B&;-KJ`(7M57kFlt zJA9e&t<9Y0^ue{^eJt6d?6lVR9>lSme%5>^&apoUKnuEm#8&})nXP+xtYl`;{S;!v zJt(DvP6ErYat5Lw>rFUq8HoM^pRAQ%K_7VZRm}`EH1Z8U*2RiyTA1B1zmfLoQnQJV+ zoY<^>N+}Ec?nQ_emHJ6w-#?}_ zxJ&)JzR!^bFFtOJ;GiPze9kV-+h^5;I}Nj^%P+|LW<=e zmTzq5HE5V`p@~H;Htsj7$9X;U1n;B^TAeipjSkY>AJ_)fvM+vtnl1L_@EHK%&V)=! z{r4bkCqHw;%T$z0;Ud6Q8j59L;8LjQ^T4bJ4f)K28umo8r$wr!$>AlV)f3i@m5YEB zdal&GwIV)a;e86XRg~a*P=y;SO6Xe%MB4;YqO&vPSSw((LsWDc6+LsVfW<(dH^mcy zt5TnvqMn#>bB4gEbSy#ZmB3|VfYP`hgUfV?5*3NBV6dWNm}%`5odk@J0t>_sSSN6J z4$G^6C9v#&@$YE=32mOlb(xfRTHcT0N4kU)Tc**!*q;#F zJZdZ)-h%!yYt+(W4q!+yD^+Q08<%8OF3|8(0v`2{vNdyB@7uT)xpd4O1wJkm zD8fhCa9?ug$0#2->r^)Ffu#h76zQeoK`yyga!Tp=YZmAeY$_d(d#TFShVgRm-<)vo zY+W}#CF8@u?o@ob>SYX+V)+b)0Lv*IPq7rlNZs+?mNb|v`Qw43RDJ5>=K#rr{NBr% zio5|Ov=*I?F<49*17}kNt=L#ZW)vt>9=r#FuR~}-I6j7mYxMAZc(l#`coKM^FN?Ju z|KJBe5L<-%aU8(Z_;ezgzBogD`nw-t(~T`wZLD@vC1!nNW=NhpH0=&!8G+^M4z~u> zVBN3r3ppt{t0Fmo)qmA`Zm}Ht2>;&4xnY{r6IQF>0->&Ok#jt{qO?_r|9`I$|(Fu|A$b>LW|I zgQtY1K_1}oK7;XFiX{`E*cAL2hRmoKZ6Z`8RE-pw&kcEQMnD0gY#Re8OOn)HrGv|! zSUV!I6A^?mk|!3I=reBvoh>39?=V1Mj-L;^i61NN@jBm^_fN)e<~c+fl|xs2WDe87~BSQc7MnCr=eK(*tbPVH*;qJ%A`ZXtdYb%K16_R|tvtv|8S7 z`FYb&EEzPXq_uIB{{bYMh)w zr++aPg=n^zawmxI;glvOW~HMF1#vCFqn;Mp5cjX}O{)HVIAxJ~gL(rib`J(s-(-%^$XT|6?6>7o-13v^MiId=ev`X2`%$H%MBTfG{?Nr$v(n=qvd-;d1& zTGg=lAk#^!?%`)()lI?Jh+T#pu(qt5!EHjWlg5$6Lk=(3X}3Xwen;n%vUMl@hrF`; zk95)BF3dFMz2KmTqZ8AziBYMriOn}%9E8Qy;QoW(26gXpPT`!cm!}v9G~izrKJRg} z=z8{~!|Ob57G2Mdbo>}T@0;j)mi2j;Mm*PFg4M#Ur7k735ktka>E|eIen5#sF&+iD z#?hmlUeOj?oB~0@HlPGybAd(qU5p}pPyuup zqL21i7TGbSV*%*|DQp$S8A*n=QZUx))Cb*vV0$}xRIEr`M$CH`m~r7Kg&%k+l6RM! zP&&pE1F+Y%4(x}qHpGdYG=4Khf6z?>RnNW-2!>g-ymd|7>S?|7YTo+(0053`I8gb1 z^@S-EjCI$`GmWL1((!8`)z@7u>Gz}I;~ucEKXqp1I92uZR1_{FBy1L9=ZYQ2ry%zA{o z&e%=Gry4!`yEr$hN4MXO?AQY8a^c<0Zo-G$z`sl=X2W`U&K<_gm6%8dOZNGeLS;}* zVjX-d&cp-jHvT9TFQAlImZKBnmj%waeTB)am+KL6dcc^dIDFiw&eE;NDS->v40A35 z%VpG>(y3#UdyMT>-~P8plW)$H+~&On2#XFNI)ScL~(p zt^NUwyYW;^Mh9WsIROcg{xw%KfqiB2vA}?9JK3aE@OX={5pNo#`rJ8?k+Ntj|HF~2 zJ}*4Kwh7Rj&er1)Q3N-RBJ}P>s&MZpLeHLmU0TZP-Yoxi(RsM@-X;Q=Lb%>CgtLweS-YvVG2W0V4-Oo z7tB<}TJioLVyK-!*fdLGdyZij>V5u~PbJieF#pphR0cwZ{!WSg7-94QPi7Rr2)l&i zMks#%FD_$oaSYV215J?fLfot*%lvDvk$t0|EZg>9)Fhr5<03Z|`46Ose-e6fuiW)F zk!hTU$2~v|OTlWeC+vt*k)j`kplNqr`@Y07{8apqi6v?Cy=8N2GB^whyZBj9w zkD99@(PYz{kxK%n3q*NZDpo;!6>>4E!5%UqjiWg@w}T=ASCZicXt;q*e3~FqdH0O@ zqw$Hvi$ISOQh*{-Ry||ZIVwyFUP&RpR8#4Jg~w1_K9uNj_4E|j*_K8Q9Knz?xW${_ z#_=q{5ZqEyI(~%ISP5~O;|VjmoE2^5_on37FKH-=j^;867A8N4fcuXhfJMo#DCisi zg4{L%O0>s31crMxmVvp?`XEB$v*zkPYq`(?v`>!i;)#C6)6a9&&yjoPf=D!ag(Fst zT^iYilD)Vd=WY+lVmJ*Z@t3N7q(DDA)Uq@~GV(-0g zE)`ahRYD#!Qk3>(fMC^HyzUr8Pf&I+tCR@qt)WED*hdpc^oi2>Lc(BHI$l8LI*<|E z#z5c<_K~XF`f${!K{D=v6w8;~%x6bjf~m^@ESnIZB|HN@V29*pClxjPZTl zsM%BEFiMt;GA1+5F__G-VktSk`p!UK8uRIykXTbs&E3tu(;svnOLhj7ebK`yLf}pUa?+$BZ_?$^>eu+BmHBv>iQx4 zU@qS@!H_k|EH3$R_JIAQ!`P)(VR28#&d1euU+&|8{n_>!#JxU54B;%sHqFSMz@ zOK3QJiZ#f(tXtS){N4O6EZn6rVmxka_$SYbn7$^exn5)dB@(&7Pdh7bCuKhTE)E$D zKZohENxTb1O%+JN+KJ5ntn9N5&X|T0QG*L&cqhChVPIxswJpWSh}%{7g9n0pSa9_A z_kx|+La9aMbI2KYTb~uNwPWsELWXnM0+{(4)tCp9@)QA;IRMhbnDDV+Y=Py);J|W$ z-FqNDYUd^B>((9ar%*`UDxtd|D?@DcR+xj2Gudx#O6-J9_e1_FdhH?p#)Azp${ zp&rca#bbfgr?7a`&$X8fgQ_?&;LS+_CR{Ogl^^LbyfD2=`G*`ePqKm!#a2q0f4k{Z zQW2?l(6fZ^Jx)BSwQ*8GQ|CixuY+OdM+yiJ;>AaQ(2zUcPKbz&_$v1r5Y`|Pt8h^p z0|T2j1l5;^UR2*Ld>`D-4g4MFqVMDN3@6kh3OK+L+9;R*6s$fGZ4=)TSI?;b>WDoX z|mBsW0F^|0qbCi$s0ikbm$>ZyaU2$7++qO7{`P^K#s& zbkCP700&?5PE@*ID|yL#Zs60YzW#VV@+sZf;gXkp7wb!8xM0dppzsg*`OrLI-Vnic z7sC-qZ&|>+B?q$p@A*Ft{2vGYf5m}C3zsaMQ#GF-UX`E@B|1l@;SV3YluGe;J^rr! zUp`C!myfTp#kXozQ?s|W#*_Z$@n`>MvszJ<(>U(RAtb%5feqe5CT7GY>SE^mJs&+Zs zT2t+<&UZC7d0k$#xmK!aBF+`n_ko(mCf_|PL=LuedDF^O4YlBcx4PwC$=7&qW7FzJ zQ3tr;YOY=0#L8=$C8Nd~UvoW(uc=+$ympnhzNt}auDx%0jjOr=q`K-*ZG*|rVfkwt z6Zz|!!G#2e8f!r<+kHg~nJx(!G$TX(ee4`Ynmk%r-_pX$J(Vsnwt8jDaGIK1szoVR z(<*6sHQT$g+Pi$k@P1$Bt8b`5XSTFd-%|^E>l=JvkI@(CpN57elxnDJYF>#R75&lT zTlTMDs;jYjWvvS&2&7VDQ{z?38o+fDWN_cLy1LQZl3?tzT5zwrMoM;EL-ktpFFS<^ zYh7z=z4=N0*VQ+-c%@a%wJWPzyp&V0xYp}}aI}EUiJDFBnjK@HwDK5&{JEqxL+D-0 ze06oeT<2?OkP@x5VvP}Dp!lqmQxfaz>X)NSEJ3%%z_RKV^dW_?{+`BaFZsEus!PC>`eq1$Jr9ZvkG-eX>#bi|+f-Lmy*4+`%!O)mFb-U7f(C)iQ0s_6Ce6n1DW5aP zHOB|d;aUvE;c9Aj*)-jV9AA*QfR%j}l@ZrGDi#2V5y8mvHPoD+iS|^MyP%1h(dpLs znGcz+cFmdPTDH~&aj0Jov2JYfHdiORm{hN-Mzb-tFhZf->YGg#Fli3e$GqxBj7lr| zmN|B_%62RiY8Iu(oAY6DEmfS3^_Ny}ng~1Jb5G=XElZe*O_MG zx+t|qTk2K|6=VQ&szDI2wxEM*&1uop)<%Zg8aZO_X{^5=bgXDzXeg#>=4?>yLpKi3Y)y}~>_=Cl zZ{;#f=d-G+FovW#bLQdYSu{&pu;{DO!Z}4(EvlR)-t#=uB~SUHtLDs}bB&0cRlcb3 z>S8N+_4I44pc#u833Ui1 zq^VGdWSKN|Sxbu%Ps2iFXl|N{=?_9T6)dWqI(PnUSHYTEey=pOWd%mQw|W^u)_d(r z0TXd^6H!Q0jb8&|#=@zEXv#nP(58fwK%%>bPZ9q9`YjO@KeRXbFb^E4i6;x*idADI z{^K5z#(ZR9oe9I&A)cIdX25(|__6^r|Ci)}T@9?L_%^mdZIEd1S!KRdoxe~L8)6U@h|*MhCLJ>DT5AG!=Y=R>~8Qo3{w7{M@3 z!wLAoOiB6^!aR1!^tFILMA*t-2blYC&ZuuLFFcnapTYSHLd-w)lGp@auqa?oPD-Wzc&o!dCltApMvveJ}8*LMW~B zJpObZVCoCc2IB7Xr5AtrjqkH(T&R!1vkU8v%y_TkXvU{1d;`P%|2p6jz!pDm z2E4!qUkCUez?Yik-GC#2E&h!I{Bv9WXF=}<HyaPw)nLOaKM&-68QZH z>axaH8PXp?y4BxT0sa+Wi(iufciYm_0UrTu(fcv_=L5i2f4vP@#-G(c2NAv$f7bZ= zPlRv9pT(~y5xxh17QY`sID$W8o=cbbZ#AE`@wW|WkKylPlV42;cj3=!?^1+c#@`iY z`b`M)D9Ys~d@aH}opF^3p9A<7z*c)NM#VLNAyT40z7BW=U!r+mmTLHgPkSxzDi$Acz zO@Pa6`R@cg*9K1kTxEl0@aspFNqirIpO4t!*8xXt@b3X{u)(}1<+Z`T1YB=}vmj6X z6-oSOF`i$y!H*#SH*ERa057t^O@J$H@KV6n+u)l3Uu}c01$>1Kz7+6e8=M7roDDvM z`60~)zYF-&xk-AD0zPJgp9TD98@w0r-)wLX1T(EXS^f#6AF`!ufcM(qHGsF-;FnO| zWh-Bc^rvm<3jzPs2HyzyaU1+P%IDb1=ObOWrB4LhW`olJueQM-p}!hz@LPbZZ7}~W z;Sw7hM}Ho%_2;XA`)u$&z&mX4Zvj7RgSP|US8e!y3AoG#Zw5Tw2Dbvf(grsIzQ_jO z2{_vZR|3wk!P5bswbg$K;E!zZ4?*8AZ197Czh{Hj0)EH_*8vXM;6;G%x4~tAn{4n^ zfNN~(AZScoV*grP-ZNSAgcpweB)z;tKBEQO({-1y^vB6IQo?wF?0i0=r z+W^Zpn7a0)4gXTWaT|OS;J0k>wSZr?!IuJl-Ud%jm!!ouI1A~!Z15SRKWBsA1^ko^ zJ_`6}Hh3@K@7v&K0dKa!PXK<<25W$WHh2x-bvBs)ThMER7Xogu!8Zb~vBCL(m)c<7 zQSIgk)>w9H{X?nI{;6*GYS6!@RX%VcnjcNHh4A+(fM`B^j`vw)hFTo zfEWL362260S4|S$3HS9OcI?!x|3;AM;;`{2Qtz>Dwm$>yZBM(_r&qO~v$d)bB2X z&0wYvf!>MVlB5GB97Op&cSzEUc#HZ`4^IX zq{9BTKdHi#kc>$cJAroi94QU7T!Y2LpAmg7K7{xN;5rzizcgWfur7$k{MCf{b-A0- z7wA%ve;LxpV=+YgmF2$$_=58#$z#G#ApZ^+*XSaVUWN2GU>`P^@Yevh0pDg5ZUlS{ z@V#rohfw|w7^CO{QN9iEt-yD$3G)Q&cBFF%viJ!wwU^7jQn{A`|9O z%U^&WZza;!TWC1?={oE0XQ2lO>(Al-NJCb30u0tO6NJi5a_+wOy>!fm4IR9iSqoI^jaIN z0$t)4_<5ovso|U zR;0VW3VAWp9|k<;7SIbin7$17T4rO7ZQ}b2%AYPqpPTUe&<{)RPWJB%z!hJ^_&3Y{ z3GjC?KT-b>-_3xRLI0pS0iTEZepAU0t{89__3iM$$7RyE#I|BbRBkKS02)Jzoz2}Z7PrYM3fHz_4 z3F{%e(gN@%93BCmi~g`4rbq1b0}hPfXa0!vg~($)Z2#I3?U^^C{15Hrk)LvAJ*@xL z5$XIsjP(%zFGs-7jDW}6Vc_e6yjl_+A=;Z@WDmv`)3dDF4(5dAVvtdoCRTyGHQm<^(l{yk9bczM~xY z=EJ17?BxMZAHko)BhpJowExNxaCW+d-KhWS5$T;H>X%xYmroO0pV*h0x?H-c1-qvB zo#m~n#c>D#_Z8lCwY2=2tG!KE7fCl^Q*+Uxs=MaZdRH{nB)~b|HPT&kt8SS+tLm;> zDk>J0FTQK>tl3rNcS+^gsjD$}It^eEcA$qvS2Q=ROeQUEGQ!q=r?K5B%~@N`dbwL| zZdT8)U2W7aHgH97o)5cclE~*>gB{~0U-RmtponSR?UYz)>)3ubu=3082QlF-%Cq7~Ik>WUqyY#c}!@hhqPM0mh=C?#KHHgOM`_!tN7vFSE z!CeIi&7O_GbSv=xx;hi^s){R)&ka$zxD+j|`ju8xw5V9~l9%@qq(C4FSoY1J*vFCx zNJs*SEG~7Uh>8mCb)_y9tqbB(i`b&268D388l5b^4wO!&^B0?jV$5j=JB1Du1O& zg#|bQWw>Mvj%Zy-g=PPIr$87tbbjl?-5a;Ql|n*DoZLRQ&DFQowY4=Xc!+?DdL93& zT6GE;bAuI-H8R9wxw=LTQeqoI$b%a*zjX$;#x=DyFAlZOS6l75C=!j(;Y;>;s!h;V z=6qXlmCI)tjBaim;=}ERDZ(qepRb8mv|3YpRcXld8TBEu&DAxv?=H=skvC)15$X8W z7rjeVR+d#RpK~FAAZiN1UrJS3q%qWS$Yf3vJxt*{F=2JBg}Q}SiOrbxM#a;F#D!92 zL4#^;D}BmWyim%iI&_eHA!{OZp<|$`41I;GT)bi?r3J^+!uSO*6D{ZCP~5mtLrdAr zH<;l(hvp$3uW3SaJ7c%qB!B7shdvrB*AfWRGSj9b@9TIM569}8lTl?R44c+ID~!tM z4?;H-X=wh)Bwq;KCkshawmwRRnLy=t-WnG|SG?MH6PvJN7EPK~p1iAvGPzboNKuoIs;u}L*%qvf8Agk0GCOKQr=|FsEc2RJm72_? zqLTZ(YGkfTEQW!j2UR<-Qu2^W=6F@Coj1p;Vq?@~))%Ao-W;DQTJO#As%X78$E%|C z-W;!r))zDD3(@*wW_=-AU(Bp8MC-jd%Bv8qFUlORiq;o1>kH9(PID|(w7!_NeIZ)! z&GC6f>%BQ%6|MK?NX3L;t?JG3s%U*7v%Wf7@6GY4qViq_||&XkYV`)O6Fe24daBA>aVDq5e<+))*+&t<7%B0qg8tC*%*_oVR! z`^KA5$ZFE~7y_0)W98ee^%S8ST<%-8wYG}T#az+Uvx3jnr-~)|T)irm=yUa|SfX!muZku5)|IL<_8Z^2UKJb1o8winajG)A zY?aV#mGv7I39C?5))JM`E?st zhF#tquZm9d=6F>!)z80P)oE(xG`2`qp~}o@xoE1l&_5U}b8ad+Uh&W zhk%Cdj22}r@O-XNJ|VuJ+}Uvv{4Aa2>Nmbzqm8khx~-2IQrHfRJq4c)RN#339g48G z>y&plJlGNTfMJW{yFhIz=UbdzQ=v9n#%oJ{Xa${h3=&q@0IDrzD`IVlr8l}MeAF5< zd&V495p{Vu8H8ryZXUA9a&8-WY=9ly#lQSXy>(-jMEifg(ZksqV@$cPJevMJ@cT-+=@4@?v^rXZc z3d`#fcRwsUnR7edL+JS>uzYah^qyI~-T07kgYkLe>*AoqeG2t_8SiV#_<2sne3i8% zKGv&jT;g)bUC2+dT1uy%;!*zh8g(uvd6V%~<9o&$-oxm*lcCc6&E!3Je<-<^vC>#? zoMdc+WxO;#56X_)pz=G3^V#xAiE9u~NnDF~DseR3Xs1s&t0jIw^?6pLK3icqzi0NP z*undBUc^gQ9AkMy;_6JEAn;yZNzI&pI1Zsz@u%3Tf1ha|2K@4Hm~Ad#Q28U<4h zTTU@q=c&?PYFur6Qsgk<1(V-`>4%(^nEZutKi;<~-610N8z|0AoZefioXIB7GhSlU zxvSEx7n|uKJX5-(pz3#lWZL--lb{ulkKRjXjJvpe6{&1*tQ%zoK@@A8F8ud5flx~Fa zLgO38|A^R;awes8eW3CmAo=jb4TI`$jix_Odiuj=lRq+9zvC%8Cqg~{xygeM401En zb2o{kdqE`Mo}9fX{dq8b#kuV!?}SRf@4|fm42?t?NIiuH2oXWlYckP{KRok z=~r^5B;Eqc7bosflb?}HIbVvT@7EKO-_=m*-;+Eqac6QMDY++SN8$+1pu_`uVfU+? zm-HqbfA#2Wu^;0@{2}9z0~C$3m3<)n_a%{jxkJ=AJqmKjH(X>KT`V$Q%8w!6t(^6W zA9EgbEc_R-hsT9-CsvTIJ#o*$^fl*h%?15hsOL9{l=F>BNdB)>LF#vK9%9c(5&1?~ zHX(7ZNuI{}nB<{}ORC|CiMtZ2o)1VKkhoW&^8ehp3u+wpC3Cg~`Y6Dk8wbxpa_NwcL-TXdD)$!r} z^-%RJ^@r5|GUM5t`IYnMly4S~Pu%k&{(BE9|1JYV`YPi_D1C8IU<*_|mWZ^^!y@he zvfclCU3mV&!6E(Ku>6F?y*MPuX?>6vh}g9WD*rcOmx1(8n7&Tj!U=GHVp2r<_F>|; zI1d-;3q^4fFFA>&0dXAD0UC*lWjf^#k6c;^;~_q2fu-Jtht(22&hH?1ng$GgR?J&iO@b|45{+J4Nc=g?lM&vY$vB9W2tO zy~P34N2KlhiTLOQ5#Nmw@$IQ%4fPS}1M@`s%sC=`@?w#`e3eMwzeQv$tQK?5JuDu< zcoGlioJ%~6b6D|E=iU;>uuh2B{BQ9Gj$lp5SlnCe%ekn?7(G-xnsacGFy4yr%zkbE*@l0H+ufcaJ=$Y6qa zCiARFzr7r$J2>kW|4Dz7p7fg~H}D+<$vpRt^xDdAo6!NV+4L12i8EFpd?;zr*C^##P2OcK>zp4AyacB>TRCYKL=abMa-`TKZdQ z>8_Q&hJA%NmVMl8$a51#o;z_4>G02T5&zsO z;+M*1h@ajOXC-b*8>IX%Me==r9?y?v-#Op(BKim0gZw5`y>IS7CZ8=L!8PAIGo%{} z)nC?&q}yTouOze19ac; zC)7CVdKNrAamPUA+xP6y{$pWzTf#&}d*dsHv`Y#0=xQ=kgiB8gXT2$H$rR&Ke0Y%9 z6ynfQeA7!ZK4Hka6d(2x@m*hWYKVVJ@o8T286mza#TQKFE~V`UiL`mW*g_1sI5)%& zrc0RTB|jG80Mm`ko01_z*>kG+J7PV>r}<8T>B-WiPx0MAlW~VjH#kQ#x%9W;b7uM* zVt6D!$$TrW4{;ai6U<+d*AX)%{yM~wrH``@ll&`U^TbD;TO~e1tgHBNh(k%&a^5fb zA?9h3|B=L{4-)4fJ`m!%()*p;AeqD)#e4YoEbCJZ`#Jf1> z7b*N*@eX1P#oL|RF8-XDFmaW0pNZG8?uyqEuOnW={}OmL{uk+M`p#QQpWH|MCH@z0 z!~f!~_+PvQ|BEz2FYzY)FW!j%#h>ASk;bYJugCx5Rrp_AiT}kF_+Pvd|BF}PfAMns zFD?)9QR!v)U-G5+U%UkWi_2Jt#EbF2xD@}3KP3)Oyb%A37ZJB6UV#6_^YOoU9{v}9 zg8#*H@xOQu{udb|D@4Z5H6ml`25}Mo7a5bQ#18x~G6$>{nH%mCnKRaiZTMeo4Kc9k zX8bQ1ZZK{%ZW8~1|3x~(7URptt;TI4>E0H}=Uw9m#_h(BMbdpHK7;>_yNm>@dcA&l zO6l~MDn$LLxu{qiv4`;>qvFt{?`7<5>|^X}tT5({HOBrT^&4cYHx4t75V3cRae_!a z8;ny#o}X%LH2o}Nv&i#p#tzdjGM-~R-?+rM%(z^nek(-ExyE>d@n+*Hk#u*8*tgnv zpK*=x5s`F{8`m2*7&jU>8J{(7F}`fvYTRag+xV{W1LJn%$Hvc$JB_=Hu1lz2xv{Hp zA7gj%_xRsWD;E@{)zD~KF|0UpJV)sl(WpZ+_*y2WXwOw U=V6@`yPCX@vAeN{@gU>>0hu-nDtHE(Dp6ueRGQh zSh{Ln9y7*ZG%*?zzLLNPGz%grZt}O$Yi2HNkzekhLIh)H*oSYrLk} z+hU@JvN9rLt(WyM59;rCLZ?MBBgnm4n0qkOT>DDl#$FDG9Ep#9vO>vBLO5Oc)sjYA2ru$McV30V*{l|GlS*E*76H2hll5>U(BEgu~-jsF~<>x1%v^9ldrE6_aQ`cGv(Y01|t@WY0Hp8!DihhbO z5E#9i6`UhR3(yZ-^RK_2iF$!zqeebS3=XiMbyztM$9$tkhPe$IK4nS zHwuBX;zc(++H@4E`6@kFOLx}Npg}QjOA#k-g+6WC9SYN<5}oSmh)(%9=xeof%tKa3 zFhjxE;E0+LsxO|3Wk!7yayFM#GQO@r_ogkXVd?VuMQk*;d4DJz+7$^&UEQ0HBr~y8 zyU#xo%gG5J+{57mdudKPV}Y!k3J7^pus~c%r{xTUkz9@iGK!D`{rd(tX5yi%*l(@1caq`Szb8bCDmu?EkPKJ3i{?{b@4vItk4Cr~t!xldc zPPR9JWM2TT#{3T~z87c@>eD8h0Exfq;=j2#EbyTXSr;Ab5aS!StvasC-%#6IXNLSsXsihdskQ*=X$QeHYVg= zMLC+38B!USrU6O=9h;vfm6<<7nvIj+KagDSQ$B8M8*+8$Bpt0`_WcvznHvsLi0NGw*1_ zDBmD_ma&frpJMDH;S-GgN(jFdIGg0x1Ee@{;+(M*A^g6y z^tXs3{?CN)--7oe#Z3}E&De*8KE}=wV&0F0@LPv_N^zq=&ohi2B82@@OCP{{!t*4) WC4}o38zsb_*w+cyBQD_v#{LF@)NyA3 diff --git a/project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o b/project1/cyassl-3.0.0/src/.libs/src_libcyassl_la-keys.o deleted file mode 100644 index e3554e1f4cf5a35c74a3a7e06cef1a6769d0f21a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4968 zcmai1ZERE589q)7B#idDG^1G;z?6&RuBov}0x5(JC-!w&oq%wXO`_B>!H|@EF#8%c zQW`?9ono8|m8Nad)~?m0sh!knXzL);R_dtKZnhs|(loIj+nCfJP9>L86^|{icmX$6<&`Gj&G@v`<(18@;+R(2c5J;?+9;)eVdyS{F64`K zi|e#f+Z`%)i#sQ|%PU)0L1}d`2fHfVnOg(SZ|#7tXI_`Fg9W9Hv8y_ddbyO&8ig6cJ&R3P=2V-Vv9_xCvi#I5#P;SU&%X+UsVl4++6DWwd*AN~f4x`xq;XN7hh#r` zy~A6cobXnu9_j2vi>~a*jLS8dA=#d>8=cpcK0UOZadv2dZ7XL!md=f|LbV}tL%TYe z3CXf<->MjOR#m(rJc+;t-EmlwxfC!+ct*xH0_#67P=amzyEC(y`t)fsWO zAl`a}VvW1tm-&srtCG%1=@-aCk*VET%A<*6e%Z|74ugO~e;p`=Z?j6COcC{LHrC>U;dp3*s`HR;QCBc5(~#hv*& zpt}$go%pQclFoItBGVNj1!r*^r;K7*a<>{MyM^KWUU%g0u;icIVCG(!`iNq{DokDG z5OtZ7N!OdxE;K$H*}IRQ*yEoxVDJ_l+LY`8OFBEyBAt7_RXTTMtDcgt!!l!@*OdIS zg`~Q-!@_pW_Ag!is+2VxWG82EP?q#TLc<9k7qC5iplLN8*z-1Mw;j^--yoR1y>|A~ z2Hig)&EB%Zput<#hh*o>W_lXROQo0o0;O!~moQ|uOXbV?luUEsD;_;qFwpk);&b43 zf!ks7Iy#EILhQ#X?u5c_CRapm1oxqSQr z4Wnf?hn7^#=C9;QuqNN5SBk0kW!j7f;OdL8%f3Xd$ewwJa!ARqLxUXCZwu_V!^CM^ z!}ID|t}mm?9(?#406RaNn7VqZnUj9GQCI3vM;ACYqoneAA9g^(t-SYL?`fqf^?t2n zOFncE+%}A(Gw+w5#4LisAg<)IoSu`?zlR5i+I+f_gVSc-E6}1*d;<|VDnuD)-{fN! z=+md0XR&Q|95K@~YIz0GqyW8XGWz59Tq2T&#qYUDD2-AlwJzlOkaKgyrJ3}5ZV~F? z=ygJ!r0e3kS2*{wZr{R#Ovxg9J1=R$Yyj%^4TQYC?H1olh!w5iKsj2qak;r#njXc735yJOvGU*L zaweZm^8uNm0ZEr9R(j|1{+d4KGx$&ZHhDd(KZVxNOjOi1U6y_@o6aTcQ*+5W@0?*_ zSbKA@{51VfDUd&Yfd-b(FM4#3)zQ(x=;{gJ%Av*RM!{mNXMb`;O*;FBq9cc#M`Q8C z;OL06$=&?8H_0VUPL~=zl-Rf@5DNIhfk;#H#)E?+(V<73uKm$O?0^&Mp-^up**waa zJ02TytFh-*=I$RI9*&Iw*`G)-_sFOka|gS69#5#z{=>|j7)YpbHM$>|3CD&xO&;Q- z2cl|}xs7jwB1Ny;dygy^i%=Q8}nv(*J*YC_eX(;oyt>H3*!5>8}I0H9pUSjJ1MC+f$Bad_BM^ z-c9(>@-<}&rjmT+^uMTVAT%Fy-sTuDrN2kxS`4Lmbf z64&3)*lsZB#~Mn`^Kbw*;bYbgC>sDXXl@4Df|7WCS^0K$qkIXH*UaX_>aU>BTIe&N z!xnl5^gaun13hS=KLq`Pg}w;-q=kM1^unUfEUd-~ICW zuYx{WL4UV`eyxJ0pUUQXC0`M2H_M1R>70+RpU z3YsP2{TmO*#uDy+7LKVMgGUBp@$ivYe}YAVpkC(p-5+RXlS&b`QrV}*a8a7 zA4@bv1n!F^=DG2~qlSZ>BZF$^ffhzEJb*hf^tJAtn<5?{?d_W)Edp*9aEpMg0zM(2 z*EH~Y8Qk<7!POcgOrhJHVF$qiCRowKvCe2hMG<2C@tDdw!RQ`JEaL6y3Pyslkysqw z+L0QDhOUX_>lt$bRy~6GLLY0_F-AW^2>u=z9Hnl5pW5Pmc5>_%>qURJWUXOekR~Q2!0V~24{$1RKPa@Dc)Zb zjZ5*51RrK>70y1z|1@ANF6hq%eHusAj^uwxa4p^(f~y(3O%NBnA7_&MJp)*Up&SP! zzb6R7?>hwHcQbqvj0*TCg7ABtApCB}TSk7LAqc!GNMw1S`q^zWXxs%_LaQ|M&U- z=RD7u$ISb!z4l&v?X}ll`||Cmp5)o{rvAS9jhth_qrTm#w^iJ7>n>4OT1;JQ9ro7W z2z~J79U?^J91HY&F7HlqEQ9t^XjkBvXMAw2s7Ry)I@YA4QkB0qIXFWpjLOnb*{-r1 zN~{%GD#;7`l2BQsiCtmecnclq*zzs3+&evRY%8rNDAU#Hy*T{5$fs)6`9}Bqkjv1@ zY+)JS?xfpp*#$!;!4N|Z(UPZVyl86{+S&r0qHP@)*Vf@$yfmk1VXXKYK&Ha<$>9ew zp+c~g-{EJo#IyK*U?!iRb>X{Z>-X5xo{aDVEqDk@)&pb(Th}8+wBk0=f=~-3iAS@& z<#{mmGi8Wp-&#kqVLl|8gL%|iM`omhx^gO|13qO(Lz9Crlx|?~*M4fWoq8!- zO6M6&E<6p=_IYwc<&Mn20neo&_*3ZO&BuZxcEKPdZqFb$!P=+$oKHd=O4tg%B#b@_H0 zq&!aF&Sdd$Nz1zAKJVpSZM3Ydrn~J?qD`9)zBI0TPEsyP_YT9uMR`a> z_TZc(?>qOkJ%RMTj`ae2he~=z>Z;vldq>Fcqh7YR`VY43d;s}|t}2Wvzow`6yJ4YE z@1pRpzJnZx(%=s2@q*}MLG*DU9=k+sww9gJ(MHDzH3NlEU5b?%6I${NPh(dbRWQPB zPeVdbg`jX-v4skBpiyRE2%D~kJj`-txGgy$T0~_!*w^2$Ta_No4FPL<4($R{)}0u` zG6PRVI7ux#*c~mms+71^{Vu{89>>`l;fzr2^_;qb4Ux>LTFee~k8!9OjITQYY&+0> z{bs<6J`*mV`4ujos$Bli9OTwce!i|;b@e6S-PiU*SeK4Yq@xpO3^&_Gf*b4Xam5b{ zk7agvEW6ycWe6JOdkg*}9C$n1Xu5iO&y`+#==Y!%&)n1j;o+=+$kX0-Kgv(-xhoR! zq>AgqVEaxE_5N8IdHYa^@V?%=wM*!k(6aMc6f}f2%|Hcm>%mj;H3r1R$RBOgDF(!l zm`q|IeS#|WKxF$9IS`%72s?xk-sv}0qmDL@i`K#7>z_w)UmqIP`-*G^hRnlk#sD7= zB2i`;q72|QV}yBcm+YZhLLB>A$sQJ4C|9ON=6_*q@3}HHrDZ2OW5}v=VhXM45&jnq zoicZ1T!=2{J-DR>Q}Qn9(^=NFL};yJW}tsZ8GYDa3!7pda|Mo={#)^kxvfSpf~fpuXfigI=z58)XQmtF&TnKepax68qK!~muO zh{>eIWGOq~^oX@0Mq-y`iKXOVp$6;Jz_Bgt7Ed1f$bnU4HkYk|BdaqllQ8s2wl1%N zoxT%&Vxl(}bVin{zQf5eeO~NH!y+Rc_RD~!pl*^-SB#L|$+sv!86SKz_?oqxR;U)r zxS>ool)2TSOv?^AL5>L*R$uuxq;2JwIcINhV;$VD^`tQq>mYuav-iM&PS`J1X^&-7 zvJe&5g7I>({m)wfdmB9ku$PZ57-V%WEb2)^qaAQsIz(n*-xr|0-qbCu zch?q91iONJ#Znq(o&XuiD1PQAW?D-loB+6fwZKtxlRq&>*~IEqWN%%aM3Hg|(kT?K zQp&KoOSk$X7Pk&8zfXs;?HH7iQQtc>%vf%)Md{eP$nmu(rs!J7Y83aNXrr&cr0I0X znHD1>3r?OHu7iVG;z@W;KOI#hsjX9&>#BY%ofio|g}5ZNdRSM>W}0_bS-jsOQh;x7 z+44>BhkM7$j9eea^pfylnqTY)E`wht-}eJXsg^Houtwm3`B0a+=_UVr=BC~L_q|E> z{hlGd&Y8W5zRtxk{y_i1rmPVbkt2*7Q0z6fiXGtRfB$)Sb`}&6JSaEV_G~cIBR+Yu zv6-;C*$7>SuPaOMGxX*HJ;BWdJ7l1K2yyUl8SkcsS49fzjp+q({v4@D*P=E-!hzY} zt%tW!7yLzz0{o8spaLCGSezQDN$+JOhPFB0A`f#QH}IjS9dDC7Vs3nzdYY|gkUTDQy?HauKB z%;p`6p=9qJ(=v7Vb`B#m@HzAgyYdp?FLu>q+9j~Yg59#%R=USSqMAUzEa>0ChAHvk z)M3*xW}CBec$tCf08Lh2h5gpFguBszjo`jnAV%utJCrVo#! z5mG$iwGLAlT+NumD^xwc-HTyEv2+Qw)Ftvn5t;|~$$2fctMxjluU0&R9MoY#&FH$9 zJ7=4AC`lT<30RcLbJ$pc&oQ%HLdjLmj5wW3)S}(=A7pP7JIZ}063w>Xk?@D`EzZlr zF2^(&Sa_W8a8eB#I<0pmQuE?c^Lj5v>g92%m-nV4)ft!StO?Fe4$WupWtr{Y;_}68 z-@$E{+5Stp&)O*WS?y0Du?9Vsjo#)`Zam6lAc&>I(rMHto7^Nks8E+m%_IK65v&#f zGa^pxJ3L<60;?w{MVRfA&Gu_-5S<200Hy;ISygyhR_m^b5E;ypMqm*0dax>SLJJ;6 zr*-}{t@Hg1$Vu-!n4I!jN>?JL@vTpUCcPLu`uSfwKS*5u(uj#&tS97r20b}3cycG5 zH9XrXTro?yZ#q)cxb~!kRu%=0dEd$5B%T`7{&d{8TW)$}hpI-X*BMwoaN}jR5A8gd zVYbh=L9LWdvwd~~wc2a8-<_D!EwwuS`CqYmJmPVS5w#*qHw{ZFC}DW#(Y~lTqq8S* zdB=!}-9q;nTXK%{CWh7(VflM@c#hOvF7hn8d*2D3ME3NE(mh|LG!(|Gfg_%}@LgHa zxaPeTotuHi*KNm2i&50@WQPmws-x*m>|jf+B9H0%EVQBs(vo20{d0W%!)cIJq<#&R zxSVQlD4v?rt5_NfEoBRJYGw4!ZcD-+HnkyDFYp5;34Fo%DUxv&$W|N zh3UVG92ZVLW^wFf2WO=MoI%b*o1jH-RvMn}7f*DBMZsD0@WsJdW2S9d$^*CX-A%#PU?e-%+y_Q`XSVp0t`^XHD>$ zZ%|%@P?Cg4`c*L1(Z4^ZU%L$^MWz}a6P6Kt)mhl|ppOi*u)B3P zT~vfGv480R72~iQ9B&~B<=-G|bLX1c9)uZ0v`a&o7$N@w zI@qm+$n_=<*l_e^*^wS^-A$ugCgvo-1)JemjECzC3#>f=;I7L9+!{lcswc}<+Syxs+~hDn9le(qvyy+a@lOIzkzZQ z10Xlh4`-q_sC+D4^cScDCm(?y1E+5iO)$d`gU}MYC%%ckaU#WN?Wc>I8>VB31^=Mu zcGQW*w&{O|4z<>i&7Ktgx7INu_{pJ5ky*<^-F!@)y1nUuEJA?L0=D2=(4CKMB{ zbu?}kjfI`1WsC=R$ay`6KsaDT_d``O@ zqW=euz})OSj|T=vko_*6&A@ZW#;xR+z?PkNG17X@4z(rY0j@qeh-SR1nxT}!geZFi z(_vc@@^!VbnC;L}ltt^QPoP5{K?M$gbLjW@QWe4z7PahLiv&@PfrqbC&6fyDU2QC8 zJH%I1(Q1y?-jCOwk+uUx&^a^@A{z; z_8y*fn6t#FF#}&92?Kx&Fn+>vl7t(wM>{ww412bc$t~!JkwHc71G^!B#O~_n-9(BTcX~=P`#C*qx zu5xU>1Cq@rI-AGQMlcYLf;pqu(51t=+PK}ZX|dwe{m?t$qPf`y87{c3-Xy~XcGle0L?b4A z9JYRq=Ng>n0s&Tx^DxK?)j9IQshK#{$lkFQUIZohX2e)^YY0ao;nYb=itzrhYf_?b zPa^t96y4;YHpmb;+N9YMWow{89_nD^vAG;Ga*m-C<0@VjB-m`K$;dzvuw&$av$c;Q z9o;pyVbWk3o#*p5Dop*K<2wk@5tWKk(8*$!K1CaIf+Cj zz}CYXV8R|K7de~WXFP_rUQ0NWR{?#oXc??Cmef>7mpM}yfZ93jN%1R3hwC-lFSUPDu zS{KtveutBTbl~C;dp{Ww{0Gn$8NYakC)Pv}tMAcISRooSjplRIO3|((1N?nB+XsD& z-Z46N?`qv<7-~EWl_55xgRT{YI;%5bt~{uWyj)Wzqsmzh;ia?S&Fwep7}C!L@NArIwWU?W*0@Oy1Pgz;;{BKPHkrwp|Nx? zDdc$X5b+w@r>dOx)>gakl;jk z;Q^#v`ws4F)VAj-?14DC#H|_M?o7Pe`ahS*-tM{aYfFrVZ{a8KjYtHbZlGlZ7&1U2 zT1Zz&I@W3Pq||h`aHVA9wjdS3_q1c337*rtT4pn`SF$iXy!p(DFU-*uhrt4@JOIAG?7<2GUW7;X4 z6Ij?Uf~4?Y6-do?nI;b9HaNINQwMW?2j3B@!?|saZ-B5I(80&D!arww^ia#$#}l1b zm{Nyx4g_L-JXibXLg}1d}=YA2`clQuqf5J*e zkt`$`y({$7=lgxfzuYR;FLU;8LFDhBxED>aFMque9yJ~{W`_NVl!nxdaGg!O?17HEhZgzz6Ptb&!kc+Ll+mYI!M&}!**PMB1V0jHgujhP zbjS!5U%V)>_~M0A_li>cgC8{S##&%AvcnxS!mhN;V5*1~)F2zlGD2W(?tN6Ak;Y#6 zM%_5RJ%)?4xRTqlUG%(HUYZHbFHf9bGIekBnc?m1a`6iM??3JehxCxx# z$LJHMR_&5tSBzqm(L83bM)zLgJCVMHQ>i%%Cv<^Kcw_6HbbOmHbif64HA0+-npXRK z<(T7%zhU}+3SYvE!&7IhXV|a48AcAY5%hCR zQK;5V+v>r#{LOTZO^h@yxnoC~6Dikhmm}>1_@o0gT-Dt8OJ+TpfK4YGX|_Fv@0j7X zQw+D)SrNt<<(MxNKRMid!S!VF@{b#9J2=9lqi=lJHFPn1PV~0iv$A#zA?VogL-Ala}nz} z9T0^@m6+~uq>BZkYcEeq5PPAam=b&^&hw^pwG^QZw%%0ViF3Tz{LCR0nQUXPp<#uC zvT44~V(4OdFKIs1flH`DwjAHFHx@lOVd2gdZls2gi2bXas=We8Q{L0;oS#-vcoA~;#h z;$#8>U2@>S>NBT4un@epqk<2JlePz#Q(6XAh`c2{OJyHDRb*Q?A}ER}6Ap3(${xB` zoa$|?hCHi9y6l;B#t0FtHZw;PcKo6860nj z9}QK8#4Wn;?EavSUKB01W_Y(qVX7{LS6D(Cep(dslO#w(2r#x&q*?fx&W=?M2)v_{ zb8XCsF)@;ogRMN_9ymS}vl>DrQy%McV;Qsb!)XGNaynYJs-<5YB6iDGwe+h15qg$O zKVR3(m^o;$1s|g%T|BbdLxNc96+0%Vb)L&{o?7J9InGbnBi|+UeE!$qo8g#gho>CS zOWkWT1Ajm}7<)QDN?hJOV&WdgpW4qB%G8YTwkceRg*FMmjFc9hWefTRwfvLDu5=S$j5=?%!N3{b6sWUV~Kdo;Nwhu6%~OlzA8>y0dkgSRO*A;T_tIb4=KEJLh_wGO!D3LShk7!z19gNJEeZ zsxA)yS}rTXTw{nijmB2N#C+iwOvc#D#w!JVKoP$p_%HQDF?yo&Me&M$@8|ETw|bq+ z_u;U71Sj9nCIR6lTX3^Xz>U0`py&Q%EbI`~JogXp_mAKLpmm$zizb`hNWhAESWP$D z1u5K&t40JnaoIz7x~miC3CJc^yo20##L6**U2~`{4??kWOOA+8>yw$mHYZp*nV005 z701rs5b2n7;WrWUiLua|qJCe(+alsB>ZbL45Mm1 z-l$Zt7@ZU?_s`-a8h1q{+FRKaB#il7LJ#Am9Hy#p7(8~A`F(% zJ4_R}zQJx1e#8qw@YBPi*Bi87^CPI=m(?2sfRcD%=SXQ;cr_85`!K8|QJx->h) z`&7JC!9E#pg-@JnMMOBomGqG~fk6w!u*1p|rDXm}h zgY=#&lY1{{`A4D`cRor}@S?kUY{>rrbN8Os`o&3R8!EGj4T#inwAuc^Mu_ix7mNPZ zZ{R6qztA+?%Gcu9qq#bF-4LS(RvNg-Aq3;qC)^^0^C8N>n`>6U1kPujATDFUvO_s4Rh>1NwScnGYc%42KL1ZGP*UfvY!UYQlH3r>VAnsc|VkvkK?Too_EFEG?fqdu~B~d7(&^ zyu$geQ*Z{9vX>TKcYR@5`Ke0}l0!;y71>MjOY`RymKTfhIKQCurjqhP*H_g1&+;fq1z#oN zR7_dc^_49jl-sn#C@U*oImIY1E?b!+zb9#&Y{xN* z-14G|(gJ5i&g8s`vZDOK8S`AZv5YCM!m^4&S7AlLtO8LC!lUx?!KA!XGAHL=erl$r zB=WI6v63x?2k_@#UtBy;ADybRyNU{9MGjKsfINd#J0Oomj?jBR28)n^4P)s!1@oxC z)-=*ZG${)!{**lD;1vuaV^AgHeFu%|+=3-N^0Dsrx?^gU7*Dvwbd%X6ly2|>c z_Lc6Y=GumO`;X&(sVH`vu>c=)}{p#?{;*;^m&*KG#@d7ib4|)7M zTcOr(;atNI$2KaTuJ=sP)_RizhG9n<>t*|Ny(92UxqN5K&oancARooIu9tj1>(2|w zXZ>j2OeAXE$Y;KPe5IhZ?a10tY#94td~_YQcTzvLi~od}RoojDtEBbcOlR%%N=w{Hxpn2%d{A)ok13gaB0nqn= zzEIH{LGyBzL($&`{R-%F75zBqUeL1th8a(R=Jg}H;y(vE6SS^BhctM)elI!=Z#0B0 zsLwU!2^koaQ^h=k0(AO5T3Zf40zJ(0!ooihncoIVUMf*Mq(aw3c@d=p`1~4*Fiu=c)3u zA@4~G{e93cgT6rVp9KApg}w>;-UFU4?}WT`bk2n;|F@8TnuWd+{KcRr>iR$jE%YAP z?>W%;PxN0tr;qL+cGYkJ7&?Odn0puUE&{d%O zEc7bSLuW?oI|KB~7XC!g2Q2h!(C-rqZ9{#ZTIjzZe^P!_-Upyf3q1lcXQPGA0{s&U zeFf-WTIlCdzSg4O1n?iT@ZSLcB@2HH_}{Yd4bU?z^g__@TIed!A6V#m(4Sc7S)ki3 z^gPfzEcEwK|2r0X2k3(qdPD-o2K-rmY{nU&c|lCm=Yqb%LQe!e%R)~9JG@0Kd_ejj?0CVIy!b8or-7e!v0Q(X|0>cK zp)A*Dr2h)}j%kK*r=k<#yFa?nFn+A$Peu9){M9LbH~Q=QIkL}LejM8OAQl5$e~|t$ z_^ZIrRCFuk{}J}!dV~D?p-(3CouTLnP~>COU#945!S_SoQbqTp{9_jWEaZ1h#~4=p z+mZhdmi(81o@}Ap(Vioij5(xO|54CqfUoICK)((CD8>IB=p^tp{VT+#n_=?>x<2r0 zkbkA3zXN^>_*$QXpq~O=q4?J!|6CY@KM7#{dGP;zaPS)x{U!1zV=$#CdM?^~2JH0{ zRsJ;a|AI931Iy0QzZ`SuFG8UeJ{7Szq!wutc^xtU3pM(DX=_HI_MPC5<6CnTFDt`_9 zqYwI}DtaGeZ$RgNN9F$^(u*-nZTMq-PoS;e$&32qGvLpI4zF=M(SDHk3&^`dm7fNF zE_fI=fn0l*nUY=${?EX_S<#EZe;0h+Ka0UH1%IL9Uj+Vr;9sU_7wD~^(d9z^ zLg@D!^bd*&`Z(}6AkZv9A3*yzAdfB|f+L+a(=ZMr5B1*!-x!1OtL^IneH@*2jw;`Y z@^etWP|>HO+&R!sx92ag|I4s{j^d9*`8t%pP|ie3eJ0cePkd_3?CXOW`+47?p_*D3l2=$nBuTAvZnQ7AyYmz&jJ|<7HX4$A__$ZSQJe~(oj(t6_f4RQ2OUDU%>;_}=?+%( zYjO4cJ&q2=wfA&udm#U@IR3M7bXOcb%vwKmI0^sNAKEWDPX3K?bYGnRtcq*@ertZn zdm)bh=eY8}jI-ApaWsEUtUt70N*vu7M?V)wNB36J{*E|4|M6n|p?se0=nv`MIC@7M z{jSxX;9VH!ulwT0Z>JUxr2I3iG@ixpHdGq>;~#PMEJD1}AM&4xadcK3&7Z*Q59Jla@h{O#Ao_<2 z>n2qhE7sujydHl>#hl^=v+|287R;VqR#;w9ovSw>`dn#(GHD~Dn%G->W z*cJ5+^-Iu_8K_l~q;l z#)vtq8tUuaRUV_F0&m#s8!Dhtr3XecTo6{$&`>9AU*@i_o+Vz!yQ_^!#n+V2&2d&_ z<7w6`JmlmVB~1-guy&~%FYY7BQzB2!$Ww0Q>GH_a75Zs%j=`FW-00#P+)cGLYf9aB zc-_q&*?HBu()!CPjk(SFo?=`U@Q8Q36_YiC@1&GgQ>3smcN1Pf36T-b6j4oqyU9~q zQ;YVx1ub)4>t0j1x@s9-T**{RF0Bl8w1{;z)VsCl+-xaYlrN}lT!v0k`sCszGYZbG zt*>ofCd?>|mm9H7Zk}+eqRRT}=4F-3-KFm425%G03JJ7$uC{nCUPj7l>T2;W%+fY+ zlsG))$eMF2U{;|+F5a_6p02P+u(ny{bgG6#Z6rHHmv^ep&8={%F2$4T$lMB;LAl=? zw`akU+u>nlwRc8bu*~f#U(x6)lD+1w^`MO^|EeZXLNym(%BfU1bYz?~xhtzHYU@4j zCcH2-O5IiN+Ldl=W@gX@n_+SN+~lrWsh^vdc|Fy<1;8%JuR|*}hvP?FHnApDGDpR- z+GbBfQ)IZUszemARwfc;1C-u{rKM6>1!5j=uAt?Gyvb4~$w|e0(Wq;R&s|ZkIoG<~ zjrmPYm1`n)Vt`XAmdB{k=T%mfxvQGok#^CK=T+8ME_FA}M;KE%EvXbEqgw6KdUsQK z<&ru{%kVg`!1eWY4VBde`4OEcti-*dyuk&pk37gW<}vEmS0PwQdaA<73h7R?1&1$@ zu0*8666s{b97Y}SK&KWDT11YPA;y4UMM`P0Ia)4amMT8gm{r;AzT8>ia#uA}yN&XO z@}|n_S_VP*mufafNTfk3iM`c`PF3#GTv5|#)HHfM5py)cwbaN%_rM!Vz ztENo$G)#6{JDMY-0`m^0u*j6!Y*5MS+9v2$Sxv+W2z@L^MkNtnLM<{+Wtc%2#bO*P z#>y!bRbpO%k9n3gM8Y5YLP_u$OKbnBHc$aCtQkSJbdq#I&Vmnn+-&t6kDm*|Y{TW^@hBwYH`H ziYh8uv4YXh(sbsi5=)qhI?Q~WyX1b&Nq)XC+pbE6AfYUN6Evr0{Ks+TJcY&Ygb#s=>JuFQ!W zGmKr5!G@|VlTVom3sBi`48CTu;Is@rRr*xvlLwX%n;G1Nt@lQ@M>Tcc=4IMpBAsio zpzaXex7y%{(s8~e2V`}_3XYX}MsjOkHmqoDQeLf+#fm1fa-w`|bXy{}1zH5T@nd@M z9F|c%c!q)FIyT=|S3~Y8tB5Zu!$z!lwYot}Xhw{WSey+Uu<)sE7XFLCqt^Dyaw1yj zm1e}qa#Pymh8B_F%$ykQYDVYUWwKtfOy-iMc~z~aYS|>*S&PnkdD`eKtjC!ei_KhA zpPH{Z1#?S^3QNVFQ8z zaIK}vs;vmi>J=Ea8mfSihR@6=}I>m#`=hXR}G?+@$@*)Pq4pDVLR1;@JbxWGg zC&Vggx)s=tS-elWgR0XhyHgm<8R_v)ka^t2fifw(QnCL2*LG*`uq#8+HZ74o?m0}E^YBSCPCS7AQ<`MD# z+vAxw(*wX1eBIA<90dQ6c+xO70~1Esj1D4ROuoYOFY#Ul$Z{V5S?-v^K41ba;qe_I z(|I3{H1FY&zMS+}n^CCfd8G4fhMNfatAUie5y<)GC9|IbOG173GadTAOB(uqMjH8@IO}Bo+lbJ&m55GzoOp@NXeUCySBTKB zmx%mnIP;`_*+A+S0Mb7mSNJ>;{c}Je?;xk`I7LCE&)!N z3QU2|Tm)o#kxIW!;T=Hg{g~o+F+I^{jK#oW{_}xs=hZ;^`?aK>GK{5)-^O&j$onP{ zgX3XfBHH_c;=j&xjEkd01=K-SNfleE)xAk)i$DLIC*oax0j;||g| z2wzJ?8#k%+M@WyxxF%j^7%!^y4$|3p4@tzkzQ3vTUeXiszLbbD!Mk#lKMI%vAD^h` zO49IIucH5rG<@(uMZZQGKGvh?4@tv!hC&z0n+!~WZ_HM7F=_O9wW6OPjlSKj=$A>O zFW*)4x#^IDcy_nK{Y3NwUsfdi!!Rx;USTtC1kzq-;C(Rdco7kHoCajvxd}-A9i-t8 zcaeX!&Df&SUnh;YF>>A{QGLWm!}XW?I}BNicU5l`Zt32~;)xE%MtlCH!&r0|->L9-MErBDLmj{i5wD2DY(_bd?W-pC8OG0v zXxCjAfIr=4{E!Iwe$g9_V$)c4YhkdBK4*AelLFs&vQqW_5S z_eY8F*KNdW5l@M8ZN>$ez!^3pSK%!{%3B7cT|G>PT^}XFu1^qQ*Iy7}*F8k&_a8*q za|p&R?aSYWB>fV8N<{kgMCk1WQvN-pKgK;5;&*VLi})1onGzpHJO*-nTy?R`f4{p2I=^xG7@Qqk>-HWA|lAINg8K(==qY3TO~5&Hdw2>m7?22#I?KYJxT?Ax3l|Zheey-@3$j7hE-&OPpMb}S8I^x4eK$aUZ1$00B zjhKLOO|;pJ`9Sh-2C|>)n2xy9O2oyWM-=}jiob>FXX1{Z;=ix>pD2Ek6Z~;D<4hvT z<7`gIzY0kCB}|8Wx8mQU_!|}fai&B5uND7*;=iN#N0|=!Lvp2j2ax(-45Xc>D=Z)% z_AXWQEeb0Yu28rJNc#pA{QzmqqfaVKzFf+m31t746VbobMD*{&K-T*>koEmu(QhmK zK;h^skRSe14rISp0a@;LgH6rSHhlqMUB%+?IJeeQ+0a5Nsg*Pa?RpH%0w&$ln z+NBf7ak-C(`0y4H{cxO!xN*r;nQu9e>8}!@r)?VWBiw@`qI?dJ@_w$cPhrV)nf`>r zV+xCA$n-}Pz67M4lL~XLlzbO3>1o{WQ}kva?>hcFF%9!E@lM=VCyv6Mx2t5i>A)0> z$$BE@elM{Z_wtD24C8ymF^D(B@wnSZY%+|uh?oODC7zA_%hf={*m1;k+`xX)HeUFIt9wwr_pAykteo}6RPY`dBzgbGTUf$J9StRd6 zq}+<%$B=)6yknShqrA_Zvd}Q>OutF~Rwv~)c}F;<0{4@dzF7WtEu~W4El#O2j69}S z%e#0fZee~SWr<<9m|i3AB&ICI{ZZ1(`u(ZeNRQ-uW*yXhlv<- z-&OSE#HsT4J}H-@Uq~Z{JgxZ8DBP@Y3vnj=RnZ*^cPrdWMBltZgt7Lk^f!oz`EL;m zMFwrURzNO4Vf0LdMzb7s*j4z2L__6`7MgJ4a(Er5Q=zm3H%P!Kf z#T1B8YNQmS{}qi;X{20({wK~s{}YSQ|B8<-rYMIkvp|GOBjq~uzoKUm!Dw;MS0c{c+gQ01f#v8C;vt;sW? zDYEVz9OK+<)YzU&jbLUjWK?HDhL+KcsgLscd@dETxi`AGnHpP~8l4Onh5-v!&Az>L z+P7BZQl&-nt=M`#=;^5;t`{)6b6FrlS%sNW4WwK%HJVFOmV2I0Jus7f?ijoroY)T2 z&eHmk);dhC$^?u`m@@z?asfCWFv>G~jMB_n14g|%EC6b20FQg|$cBursZt=x@z4X| zd+#4(ItI_2!2)(hvLi+XT*;m=yaYpr1~52Q$tfp{N_wde{Rq!YJ61)ya@H+k@Z){p z9NUA8>5o>?O}K!$3<@4;@T{hg(!jc!Ocdf_qnu(_w!x|bD|uc!Cf8{_CBv}{uQY%p zDSv1asNj6fKupzHcr$fcI5Ak+>kL$6^)6cJNE7{GKfY%&l6eFLFv^b^fc&2kyz--jdh$qmHewG^X|%* zJTn>0kog%h&M<3^qMiJ?NrW|9Df6OzIEU6r#y^oa?inInFslK>hefQPu?!8ez z+WIxmq~{e+-Y%B+_4442@9WEk3(W~1Bxn_)H<75 z%xR@^+FEB?4UkW+&75tQ=h&`lV5&GP8j(aK(|d^xWs&AARLXmq3sYTaKiCH^cg!jJ z!EvUcP`1f4(Th^@tg#Q4vX8J^z|lqq5-IKRJpoCjv|b8ETxOWKF-F( z`kk^ql=12)5=N0hDHMI2&nL&DpBOI+l(UEBgzPg6JM#)$4$cN1oDICNckaODA+ZCO zC&UgsSU4Vqz|{_`0?oXLSX9)T=S7X~=0zBEZvJk|U53v?bp0_S4KTIq!fc>OhL(Ey zSQ}cYwL(9#v95MBdER3!Po6JIEIx+q7h~v;Kv{xg$Do#%Jsee6k$P3m(}%`rJY-a+ zUe61NN^8#SsXn`9%Kq!}^M1`fI!<#y5`Lp{!g4XmZ;LEc6-{g#bPv)0IrYp1i|L!n|OqXQ$v&1%J#!gLFrnhN? z<>_sU(vijKrV>=WFWppnV0~%2sqDb|vUJmu%v3tEG~MK_9WCtq;29R+MTdRFxRXA< zts?#dmdZYBbb*J|vo#>c_W_`O%4PRMbIb*d<-iN|gziySn@`SotgDhUMTwG=&==Fo zk~11`=68D0Nha7`gSdDb&}hAKXW8SUxO5Be1Bts_Yv8b#vbNqEl7ncfm7A7@$Gsy)q6WETb2{f8wJeGNOAhqQ?q$O3MnRk=p z6%X7y_Ib<{{eR39|1V~Ig`gHNGZ8GtW%^kIn>DpSekOuN;)|GCAV*)+)Pezi9vWI0ZB?b+$&$qQP- z`vR-vqz{kjB`-ixoUFhDZyGhVubw-XndIwK@`5M%mpq#yUr^*5h-IvCu8q{Fo_d}u z;hhSAWd-yp8`a!ekAsKnl(p?X)im&J@KSkwsDUaid5GmpadO7@EBdAfU&7KAsK+W$ zymQIr8%GV-`vjxc!PuvJm4_i1Xk5T6w!h2=Sfv`hxGJZW0{Cu5TTU3sJ@{;}t^%Wi zNy!b{23+sL)7#LrYmlvlgp%z_#ccnHyMvi!-v=+MitTu-fcqK|xbLQ!%scx24{*)u z_l)W*hm3wiLC72vvc(e0=;RkgX*pO(pu9(9->DrP9OogD9SRZO7TVO_8SOD+mTyN- ztS8=Wc8Rz-u+tovr5`eP`^;VakyyN^FD7~;aSPJ8**RcZLTu?s#H@s`Ga89K=)*MX z`0D*@SJft@q~2F;MIMZ=zPmZp+|2KMzWmVjYbUq~f@$R@aU`0BBIdFHcqzC%CB34BB z<_|1`bZphNqtU=G@Al$iaXjAJQ&#QCPi@f!3t+o*g}#^03+N+urHs&8+HcI;tG z3cgWBy}KMGKu7Op;Erz;*P!u~Bd8_7`B}?&*^BD&b7BQ5)?F^d4%bA-9%b&~=4;}; z{38(RVD80SbV(6W%3Q}I7Kv8?4g44u>2rW}F8cex%aE*gHNPLU<0JJS2F<;p&!pYs z;(sj|k2@mLv@|=4=goIcnXOYSO60zgVoaA6d4vz}NvQE0UIq{9LH{1~pB1fvJ_5Ji zQuN!PzlTG}b4UG6i0cHB->PUf?IOrq6wS~66_7jnuR*@iC2xTIn=bjIkUx)u>dapR z`JY_tor2xNNW&G-qyJBW9tO>SF-SiR_=Jmo4)h@x{Ws7PNZY$g|903pjE~f%%3d3w zGq@)|o{W{zd+PuCg6y6*Rwl%kh+nd&h zn!}>Cs{tC3sA%hs*vQ6slNB=2zS~1>J8Q#rl+-ocU<>U_K%kk%I(z#CmI^BtQTs{| zcitToy=HG`|8CJA?vBK}NyTvuv_>8>rPWz1T;T_GP0~Z`&PdYYT;Yu~yiO^oL<2PKTprOek54X>I6@bhhvA zHyu`+X<=1zH^yS-fPkCfZcvUKQ(7aPYCWo90{js~xAfx@F(qne3Cq~YvvU*fHLdQx zF2_`BBpU7O6dPkb79DLZ2<y`le1Tfv zVoP?fUQ#2(N}NBfT8LW-uea;I=qp0>k%lk>ScdvNNP3MBKO>EL{W&4}#A!h4-+*&X zdwT%2RYLqg!JAPdnqP>m3hpF?{7D5T6ntC3(^!jk9zc(v-G>3o@HY4CrA?_hGgoqPfC&c3lju2ie#7ls* z_ZsPIgg6UWv;ui6v-!&b$-f1V{H==Lq4-0Je^BwCR{UQp{*>bXTk)?z52l@ZK(2c$ zAnivK|2v9*K=DTu|7FF0UGdK;{tZiQJ6S-+`3xcA{0$-EyV`5hEeduJg8x%O?9Zrz QZz%aYN*=lda_r}S0Nl$o_5c6? diff --git a/project1/cyassl-3.0.0/src/crl.c b/project1/cyassl-3.0.0/src/crl.c deleted file mode 100644 index b3d114a4..00000000 --- a/project1/cyassl-3.0.0/src/crl.c +++ /dev/null @@ -1,600 +0,0 @@ -/* crl.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_CRL - -#include -#include - -#include -#include -#include - - -/* Initialze CRL members */ -int InitCRL(CYASSL_CRL* crl, CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("InitCRL"); - - crl->cm = cm; - crl->crlList = NULL; - crl->monitors[0].path = NULL; - crl->monitors[1].path = NULL; -#ifdef HAVE_CRL_MONITOR - crl->tid = 0; -#endif - if (InitMutex(&crl->crlLock) != 0) - return BAD_MUTEX_E; - - return 0; -} - - -/* Initialze CRL Entry */ -static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl) -{ - CYASSL_ENTER("InitCRL_Entry"); - - XMEMCPY(crle->issuerHash, dcrl->issuerHash, SHA_DIGEST_SIZE); - /* XMEMCPY(crle->crlHash, dcrl->crlHash, SHA_DIGEST_SIZE); - * copy the hash here if needed for optimized comparisons */ - XMEMCPY(crle->lastDate, dcrl->lastDate, MAX_DATE_SIZE); - XMEMCPY(crle->nextDate, dcrl->nextDate, MAX_DATE_SIZE); - crle->lastDateFormat = dcrl->lastDateFormat; - crle->nextDateFormat = dcrl->nextDateFormat; - - crle->certs = dcrl->certs; /* take ownsership */ - dcrl->certs = NULL; - crle->totalCerts = dcrl->totalCerts; - - return 0; -} - - -/* Free all CRL Entry resources */ -static void FreeCRL_Entry(CRL_Entry* crle) -{ - RevokedCert* tmp = crle->certs; - - CYASSL_ENTER("FreeCRL_Entry"); - - while(tmp) { - RevokedCert* next = tmp->next; - XFREE(tmp, NULL, DYNAMIC_TYPE_REVOKED); - tmp = next; - } -} - - - -/* Free all CRL resources */ -void FreeCRL(CYASSL_CRL* crl, int dynamic) -{ - CRL_Entry* tmp = crl->crlList; - - CYASSL_ENTER("FreeCRL"); - - if (crl->monitors[0].path) - XFREE(crl->monitors[0].path, NULL, DYNAMIC_TYPE_CRL_MONITOR); - - if (crl->monitors[1].path) - XFREE(crl->monitors[1].path, NULL, DYNAMIC_TYPE_CRL_MONITOR); - - while(tmp) { - CRL_Entry* next = tmp->next; - FreeCRL_Entry(tmp); - XFREE(tmp, NULL, DYNAMIC_TYPE_CRL_ENTRY); - tmp = next; - } - -#ifdef HAVE_CRL_MONITOR - if (crl->tid != 0) { - CYASSL_MSG("Canceling monitor thread"); - pthread_cancel(crl->tid); - } -#endif - FreeMutex(&crl->crlLock); - if (dynamic) /* free self */ - XFREE(crl, NULL, DYNAMIC_TYPE_CRL); -} - - -/* Is the cert ok with CRL, return 0 on success */ -int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert) -{ - CRL_Entry* crle; - int foundEntry = 0; - int ret = 0; - - CYASSL_ENTER("CheckCertCRL"); - - if (LockMutex(&crl->crlLock) != 0) { - CYASSL_MSG("LockMutex failed"); - return BAD_MUTEX_E; - } - - crle = crl->crlList; - - while (crle) { - if (XMEMCMP(crle->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE) == 0) { - CYASSL_MSG("Found CRL Entry on list"); - CYASSL_MSG("Checking next date validity"); - - if (!ValidateDate(crle->nextDate, crle->nextDateFormat, AFTER)) { - CYASSL_MSG("CRL next date is no longer valid"); - ret = ASN_AFTER_DATE_E; - } - else - foundEntry = 1; - break; - } - crle = crle->next; - } - - if (foundEntry) { - RevokedCert* rc = crle->certs; - - while (rc) { - if (XMEMCMP(rc->serialNumber, cert->serial, rc->serialSz) == 0) { - CYASSL_MSG("Cert revoked"); - ret = CRL_CERT_REVOKED; - break; - } - rc = rc->next; - } - } - - UnLockMutex(&crl->crlLock); - - if (foundEntry == 0) { - CYASSL_MSG("Couldn't find CRL for status check"); - ret = CRL_MISSING; - if (crl->cm->cbMissingCRL) { - char url[256]; - - CYASSL_MSG("Issuing missing CRL callback"); - url[0] = '\0'; - if (cert->extCrlInfoSz < (int)sizeof(url) -1 ) { - XMEMCPY(url, cert->extCrlInfo, cert->extCrlInfoSz); - url[cert->extCrlInfoSz] = '\0'; - } - else { - CYASSL_MSG("CRL url too long"); - } - crl->cm->cbMissingCRL(url); - } - } - - - return ret; -} - - -/* Add Decoded CRL, 0 on success */ -static int AddCRL(CYASSL_CRL* crl, DecodedCRL* dcrl) -{ - CRL_Entry* crle; - - CYASSL_ENTER("AddCRL"); - - crle = (CRL_Entry*)XMALLOC(sizeof(CRL_Entry), NULL, DYNAMIC_TYPE_CRL_ENTRY); - if (crle == NULL) { - CYASSL_MSG("alloc CRL Entry failed"); - return -1; - } - - if (InitCRL_Entry(crle, dcrl) < 0) { - CYASSL_MSG("Init CRL Entry failed"); - XFREE(crle, NULL, DYNAMIC_TYPE_CRL_ENTRY); - return -1; - } - - if (LockMutex(&crl->crlLock) != 0) { - CYASSL_MSG("LockMutex failed"); - FreeCRL_Entry(crle); - XFREE(crle, NULL, DYNAMIC_TYPE_CRL_ENTRY); - return BAD_MUTEX_E; - } - crle->next = crl->crlList; - crl->crlList = crle; - UnLockMutex(&crl->crlLock); - - return 0; -} - - -/* Load CRL File of type, SSL_SUCCESS on ok */ -int BufferLoadCRL(CYASSL_CRL* crl, const byte* buff, long sz, int type) -{ - int ret = SSL_SUCCESS; - const byte* myBuffer = buff; /* if DER ok, otherwise switch */ - buffer der; - DecodedCRL dcrl; - - der.buffer = NULL; - - CYASSL_ENTER("BufferLoadCRL"); - - if (crl == NULL || buff == NULL || sz == 0) - return BAD_FUNC_ARG; - - if (type == SSL_FILETYPE_PEM) { - int eccKey = 0; /* not used */ - EncryptedInfo info; - info.ctx = NULL; - - ret = PemToDer(buff, sz, CRL_TYPE, &der, NULL, &info, &eccKey); - if (ret == 0) { - myBuffer = der.buffer; - sz = der.length; - } - else { - CYASSL_MSG("Pem to Der failed"); - return -1; - } - } - - InitDecodedCRL(&dcrl); - ret = ParseCRL(&dcrl, myBuffer, (word32)sz, crl->cm); - if (ret != 0) { - CYASSL_MSG("ParseCRL error"); - } - else { - ret = AddCRL(crl, &dcrl); - if (ret != 0) { - CYASSL_MSG("AddCRL error"); - } - } - FreeDecodedCRL(&dcrl); - - if (der.buffer) - XFREE(der.buffer, NULL, DYNAMIC_TYPE_CRL); - - if (ret == 0) - return SSL_SUCCESS; /* convert */ - return ret; -} - - -#ifdef HAVE_CRL_MONITOR - - -/* read in new CRL entries and save new list */ -static int SwapLists(CYASSL_CRL* crl) -{ - int ret; - CYASSL_CRL tmp; - CRL_Entry* newList; - - if (InitCRL(&tmp, crl->cm) < 0) { - CYASSL_MSG("Init tmp CRL failed"); - return -1; - } - - if (crl->monitors[0].path) { - ret = LoadCRL(&tmp, crl->monitors[0].path, SSL_FILETYPE_PEM, 0); - if (ret != SSL_SUCCESS) { - CYASSL_MSG("PEM LoadCRL on dir change failed"); - FreeCRL(&tmp, 0); - return -1; - } - } - - if (crl->monitors[1].path) { - ret = LoadCRL(&tmp, crl->monitors[1].path, SSL_FILETYPE_ASN1, 0); - if (ret != SSL_SUCCESS) { - CYASSL_MSG("DER LoadCRL on dir change failed"); - FreeCRL(&tmp, 0); - return -1; - } - } - - if (LockMutex(&crl->crlLock) != 0) { - CYASSL_MSG("LockMutex failed"); - FreeCRL(&tmp, 0); - return -1; - } - - newList = tmp.crlList; - - /* swap lists */ - tmp.crlList = crl->crlList; - crl->crlList = newList; - - UnLockMutex(&crl->crlLock); - - FreeCRL(&tmp, 0); - - return 0; -} - - -#if (defined(__MACH__) || defined(__FreeBSD__)) - -#include -#include -#include -#include - -#ifdef __MACH__ - #define XEVENT_MODE O_EVTONLY -#elif defined(__FreeBSD__) - #define XEVENT_MODE EVFILT_VNODE -#endif - - -/* OS X monitoring */ -static void* DoMonitor(void* arg) -{ - int fPEM, fDER, kq; - struct kevent change; - - CYASSL_CRL* crl = (CYASSL_CRL*)arg; - - CYASSL_ENTER("DoMonitor"); - - kq = kqueue(); - if (kq == -1) { - CYASSL_MSG("kqueue failed"); - return NULL; - } - - fPEM = -1; - fDER = -1; - - if (crl->monitors[0].path) { - fPEM = open(crl->monitors[0].path, XEVENT_MODE); - if (fPEM == -1) { - CYASSL_MSG("PEM event dir open failed"); - return NULL; - } - } - - if (crl->monitors[1].path) { - fDER = open(crl->monitors[1].path, XEVENT_MODE); - if (fDER == -1) { - CYASSL_MSG("DER event dir open failed"); - return NULL; - } - } - - if (fPEM != -1) - EV_SET(&change, fPEM, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, - NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0); - - if (fDER != -1) - EV_SET(&change, fDER, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, - NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0); - - for (;;) { - struct kevent event; - int numEvents = kevent(kq, &change, 1, &event, 1, NULL); - - CYASSL_MSG("Got kevent"); - - if (numEvents == -1) { - CYASSL_MSG("kevent problem, continue"); - continue; - } - - if (SwapLists(crl) < 0) { - CYASSL_MSG("SwapLists problem, continue"); - } - } - - return NULL; -} - - -#elif defined(__linux__) - -#include -#include -#include - -/* linux monitoring */ -static void* DoMonitor(void* arg) -{ - int notifyFd; - int wd; - CYASSL_CRL* crl = (CYASSL_CRL*)arg; - - CYASSL_ENTER("DoMonitor"); - - notifyFd = inotify_init(); - if (notifyFd < 0) { - CYASSL_MSG("inotify failed"); - return NULL; - } - - if (crl->monitors[0].path) { - wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CLOSE_WRITE | - IN_DELETE); - if (wd < 0) { - CYASSL_MSG("PEM notify add watch failed"); - return NULL; - } - } - - if (crl->monitors[1].path) { - wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CLOSE_WRITE | - IN_DELETE); - if (wd < 0) { - CYASSL_MSG("DER notify add watch failed"); - return NULL; - } - } - - for (;;) { - char buff[8192]; - int length = read(notifyFd, buff, sizeof(buff)); - - CYASSL_MSG("Got notify event"); - - if (length < 0) { - CYASSL_MSG("notify read problem, continue"); - continue; - } - - if (SwapLists(crl) < 0) { - CYASSL_MSG("SwapLists problem, continue"); - } - } - - return NULL; -} - - -#else - -#error "CRL monitor only currently supported on linux or mach" - -#endif /* MACH or linux */ - - -/* Start Monitoring the CRL path(s) in a thread */ -static int StartMonitorCRL(CYASSL_CRL* crl) -{ - pthread_attr_t attr; - - CYASSL_ENTER("StartMonitorCRL"); - - if (crl == NULL) - return BAD_FUNC_ARG; - - if (crl->tid != 0) { - CYASSL_MSG("Monitor thread already running"); - return MONITOR_RUNNING_E; - } - - pthread_attr_init(&attr); - - if (pthread_create(&crl->tid, &attr, DoMonitor, crl) != 0) { - CYASSL_MSG("Thread creation error"); - return THREAD_CREATE_E; - } - - return SSL_SUCCESS; -} - - -#else /* HAVE_CRL_MONITOR */ - -static int StartMonitorCRL(CYASSL_CRL* crl) -{ - (void)crl; - - CYASSL_ENTER("StartMonitorCRL"); - CYASSL_MSG("Not compiled in"); - - return NOT_COMPILED_IN; -} - -#endif /* HAVE_CRL_MONITOR */ - - -/* Load CRL path files of type, SSL_SUCCESS on ok */ -int LoadCRL(CYASSL_CRL* crl, const char* path, int type, int monitor) -{ - struct dirent* entry; - DIR* dir; - int ret = SSL_SUCCESS; - - CYASSL_ENTER("LoadCRL"); - if (crl == NULL) - return BAD_FUNC_ARG; - - dir = opendir(path); - if (dir == NULL) { - CYASSL_MSG("opendir path crl load failed"); - return BAD_PATH_ERROR; - } - while ( (entry = readdir(dir)) != NULL) { - char name[MAX_FILENAME_SZ]; - struct stat s; - - XMEMSET(name, 0, sizeof(name)); - XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 2); - XSTRNCAT(name, "/", 1); - XSTRNCAT(name, entry->d_name, MAX_FILENAME_SZ/2); - - if (stat(name, &s) != 0) { - CYASSL_MSG("stat on name failed"); - continue; - } - if (s.st_mode & S_IFREG) { - - if (type == SSL_FILETYPE_PEM) { - if (strstr(entry->d_name, ".pem") == NULL) { - CYASSL_MSG("not .pem file, skipping"); - continue; - } - } - else { - if (strstr(entry->d_name, ".der") == NULL && - strstr(entry->d_name, ".crl") == NULL) { - - CYASSL_MSG("not .der or .crl file, skipping"); - continue; - } - } - - if (ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl) - != SSL_SUCCESS) { - CYASSL_MSG("CRL file load failed, continuing"); - } - } - } - - if (monitor & CYASSL_CRL_MONITOR) { - CYASSL_MSG("monitor path requested"); - - if (type == SSL_FILETYPE_PEM) { - crl->monitors[0].path = strdup(path); - crl->monitors[0].type = SSL_FILETYPE_PEM; - if (crl->monitors[0].path == NULL) - ret = MEMORY_E; - } else { - crl->monitors[1].path = strdup(path); - crl->monitors[1].type = SSL_FILETYPE_ASN1; - if (crl->monitors[1].path == NULL) - ret = MEMORY_E; - } - - if (monitor & CYASSL_CRL_START_MON) { - CYASSL_MSG("start monitoring requested"); - - ret = StartMonitorCRL(crl); - } - } - - closedir(dir); - - return ret; -} - -#endif /* HAVE_CRL */ diff --git a/project1/cyassl-3.0.0/src/include.am b/project1/cyassl-3.0.0/src/include.am deleted file mode 100644 index 0673e151..00000000 --- a/project1/cyassl-3.0.0/src/include.am +++ /dev/null @@ -1,147 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -lib_LTLIBRARIES+= src/libcyassl.la -src_libcyassl_la_SOURCES = \ - src/internal.c \ - src/io.c \ - src/keys.c \ - src/ssl.c \ - src/tls.c \ - ctaocrypt/src/hmac.c \ - ctaocrypt/src/random.c \ - ctaocrypt/src/sha256.c \ - ctaocrypt/src/logging.c \ - ctaocrypt/src/port.c \ - ctaocrypt/src/error.c -src_libcyassl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${CYASSL_LIBRARY_VERSION} -src_libcyassl_la_LIBADD = $(LIBM) -src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL $(AM_CFLAGS) -src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS) - -if BUILD_MEMORY -src_libcyassl_la_SOURCES += ctaocrypt/src/memory.c -endif - -if BUILD_RSA -src_libcyassl_la_SOURCES += ctaocrypt/src/rsa.c -endif - -if BUILD_DH -src_libcyassl_la_SOURCES += ctaocrypt/src/dh.c -endif - -if BUILD_ASN -src_libcyassl_la_SOURCES += ctaocrypt/src/asn.c -endif - -if BUILD_FIPS -src_libcyassl_la_SOURCES += ctaocrypt/src/fips.c -src_libcyassl_la_SOURCES += ctaocrypt/src/fips_test.c -endif - -if BUILD_CODING -src_libcyassl_la_SOURCES += ctaocrypt/src/coding.c -endif - -if BUILD_AES -src_libcyassl_la_SOURCES += ctaocrypt/src/aes.c -endif - -if BUILD_DES3 -src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c -endif - -if BUILD_SHA -src_libcyassl_la_SOURCES += ctaocrypt/src/sha.c -endif - -if BUILD_RC4 -src_libcyassl_la_SOURCES += ctaocrypt/src/arc4.c -endif - -if BUILD_MD4 -src_libcyassl_la_SOURCES += ctaocrypt/src/md4.c -endif - -if BUILD_MD5 -src_libcyassl_la_SOURCES += ctaocrypt/src/md5.c -endif - -if BUILD_PWDBASED -src_libcyassl_la_SOURCES += ctaocrypt/src/pwdbased.c -endif - -if BUILD_DSA -src_libcyassl_la_SOURCES += ctaocrypt/src/dsa.c -endif - -if BUILD_AESNI -src_libcyassl_la_SOURCES += ctaocrypt/src/aes_asm.s -endif - -if BUILD_CAMELLIA -src_libcyassl_la_SOURCES += ctaocrypt/src/camellia.c -endif - -if BUILD_MD2 -src_libcyassl_la_SOURCES += ctaocrypt/src/md2.c -endif - -if BUILD_RIPEMD -src_libcyassl_la_SOURCES += ctaocrypt/src/ripemd.c -endif - -if BUILD_SHA512 -src_libcyassl_la_SOURCES += ctaocrypt/src/sha512.c -endif - -if BUILD_BLAKE2 -src_libcyassl_la_SOURCES += ctaocrypt/src/blake2b.c -endif - -if BUILD_SNIFFER -src_libcyassl_la_SOURCES += src/sniffer.c -endif - -if BUILD_HC128 -src_libcyassl_la_SOURCES += ctaocrypt/src/hc128.c -endif - -if BUILD_RABBIT -src_libcyassl_la_SOURCES += ctaocrypt/src/rabbit.c -endif - -if !BUILD_INLINE -src_libcyassl_la_SOURCES += ctaocrypt/src/misc.c -endif - -if BUILD_FASTMATH -src_libcyassl_la_SOURCES += ctaocrypt/src/tfm.c -endif - -if BUILD_SLOWMATH -src_libcyassl_la_SOURCES += ctaocrypt/src/integer.c -endif - -if BUILD_ECC -src_libcyassl_la_SOURCES += ctaocrypt/src/ecc.c -endif - -if BUILD_OCSP -src_libcyassl_la_SOURCES += src/ocsp.c -endif - -if BUILD_CRL -src_libcyassl_la_SOURCES += src/crl.c -endif - -if BUILD_LIBZ -src_libcyassl_la_SOURCES += ctaocrypt/src/compress.c -endif - -if BUILD_PKCS7 -src_libcyassl_la_SOURCES += ctaocrypt/src/pkcs7.c -endif - diff --git a/project1/cyassl-3.0.0/src/internal.c b/project1/cyassl-3.0.0/src/internal.c deleted file mode 100644 index 533476cd..00000000 --- a/project1/cyassl-3.0.0/src/internal.c +++ /dev/null @@ -1,11300 +0,0 @@ -/* internal.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include -#include - -#ifdef HAVE_LIBZ - #include "zlib.h" -#endif - -#ifdef HAVE_NTRU - #include "crypto_ntru.h" -#endif - -#if defined(DEBUG_CYASSL) || defined(SHOW_SECRETS) - #ifdef FREESCALE_MQX - #include - #else - #include - #endif -#endif - -#ifdef __sun - #include -#endif - -#ifndef TRUE - #define TRUE 1 -#endif -#ifndef FALSE - #define FALSE 0 -#endif - - -#if defined(OPENSSL_EXTRA) && defined(NO_DH) - #error OPENSSL_EXTRA needs DH, please remove NO_DH -#endif - -#if defined(CYASSL_CALLBACKS) && !defined(LARGE_STATIC_BUFFERS) - #error \ -CYASSL_CALLBACKS needs LARGE_STATIC_BUFFERS, please add LARGE_STATIC_BUFFERS -#endif - - -#ifndef NO_CYASSL_CLIENT - static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input, word32*, - word32); - static int DoServerHello(CYASSL* ssl, const byte* input, word32*, word32); - static int DoServerKeyExchange(CYASSL* ssl, const byte* input, word32*, - word32); - #ifndef NO_CERTS - static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32*, - word32); - #endif -#endif - - -#ifndef NO_CYASSL_SERVER - static int DoClientHello(CYASSL* ssl, const byte* input, word32*, word32); - static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32*, word32); - #if !defined(NO_RSA) || defined(HAVE_ECC) - static int DoCertificateVerify(CYASSL* ssl, byte*, word32*, word32); - #endif -#endif - - -#ifdef CYASSL_DTLS - static INLINE int DtlsCheckWindow(DtlsState* state); - static INLINE int DtlsUpdateWindow(DtlsState* state); -#endif - - -typedef enum { - doProcessInit = 0, -#ifndef NO_CYASSL_SERVER - runProcessOldClientHello, -#endif - getRecordLayerHeader, - getData, - runProcessingOneMessage -} processReply; - -#ifndef NO_OLD_TLS -static int SSL_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, - int content, int verify); - -#endif - -#ifndef NO_CERTS -static int BuildCertHashes(CYASSL* ssl, Hashes* hashes); -#endif - -static void PickHashSigAlgo(CYASSL* ssl, - const byte* hashSigAlgo, word32 hashSigAlgoSz); - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -int IsTLS(const CYASSL* ssl) -{ - if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_MINOR) - return 1; - - return 0; -} - - -int IsAtLeastTLSv1_2(const CYASSL* ssl) -{ - if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_2_MINOR) - return 1; - if (ssl->version.major == DTLS_MAJOR && ssl->version.minor <= DTLSv1_2_MINOR) - return 1; - - return 0; -} - - -#ifdef HAVE_NTRU - -static byte GetEntropy(ENTROPY_CMD cmd, byte* out) -{ - /* TODO: add locking? */ - static RNG rng; - - if (cmd == INIT) - return (InitRng(&rng) == 0) ? 1 : 0; - - if (out == NULL) - return 0; - - if (cmd == GET_BYTE_OF_ENTROPY) - return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0; - - if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) { - *out = 1; - return 1; - } - - return 0; -} - -#endif /* HAVE_NTRU */ - -/* used by ssl.c too */ -void c32to24(word32 in, word24 out) -{ - out[0] = (in >> 16) & 0xff; - out[1] = (in >> 8) & 0xff; - out[2] = in & 0xff; -} - - -#ifdef CYASSL_DTLS - -static INLINE void c32to48(word32 in, byte out[6]) -{ - out[0] = 0; - out[1] = 0; - out[2] = (in >> 24) & 0xff; - out[3] = (in >> 16) & 0xff; - out[4] = (in >> 8) & 0xff; - out[5] = in & 0xff; -} - -#endif /* CYASSL_DTLS */ - - -/* convert 16 bit integer to opaque */ -static INLINE void c16toa(word16 u16, byte* c) -{ - c[0] = (u16 >> 8) & 0xff; - c[1] = u16 & 0xff; -} - - -/* convert 32 bit integer to opaque */ -static INLINE void c32toa(word32 u32, byte* c) -{ - c[0] = (u32 >> 24) & 0xff; - c[1] = (u32 >> 16) & 0xff; - c[2] = (u32 >> 8) & 0xff; - c[3] = u32 & 0xff; -} - - -/* convert a 24 bit integer into a 32 bit one */ -static INLINE void c24to32(const word24 u24, word32* u32) -{ - *u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; -} - - -/* convert opaque to 16 bit integer */ -static INLINE void ato16(const byte* c, word16* u16) -{ - *u16 = (word16) ((c[0] << 8) | (c[1])); -} - - -#ifdef CYASSL_DTLS - -/* convert opaque to 32 bit integer */ -static INLINE void ato32(const byte* c, word32* u32) -{ - *u32 = (c[0] << 24) | (c[1] << 16) | (c[2] << 8) | c[3]; -} - -#endif /* CYASSL_DTLS */ - - -#ifdef HAVE_LIBZ - - /* alloc user allocs to work with zlib */ - static void* myAlloc(void* opaque, unsigned int item, unsigned int size) - { - (void)opaque; - return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ); - } - - - static void myFree(void* opaque, void* memory) - { - (void)opaque; - XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ); - } - - - /* init zlib comp/decomp streams, 0 on success */ - static int InitStreams(CYASSL* ssl) - { - ssl->c_stream.zalloc = (alloc_func)myAlloc; - ssl->c_stream.zfree = (free_func)myFree; - ssl->c_stream.opaque = (voidpf)ssl->heap; - - if (deflateInit(&ssl->c_stream, Z_DEFAULT_COMPRESSION) != Z_OK) - return ZLIB_INIT_ERROR; - - ssl->didStreamInit = 1; - - ssl->d_stream.zalloc = (alloc_func)myAlloc; - ssl->d_stream.zfree = (free_func)myFree; - ssl->d_stream.opaque = (voidpf)ssl->heap; - - if (inflateInit(&ssl->d_stream) != Z_OK) return ZLIB_INIT_ERROR; - - return 0; - } - - - static void FreeStreams(CYASSL* ssl) - { - if (ssl->didStreamInit) { - deflateEnd(&ssl->c_stream); - inflateEnd(&ssl->d_stream); - } - } - - - /* compress in to out, return out size or error */ - static int myCompress(CYASSL* ssl, byte* in, int inSz, byte* out, int outSz) - { - int err; - int currTotal = (int)ssl->c_stream.total_out; - - ssl->c_stream.next_in = in; - ssl->c_stream.avail_in = inSz; - ssl->c_stream.next_out = out; - ssl->c_stream.avail_out = outSz; - - err = deflate(&ssl->c_stream, Z_SYNC_FLUSH); - if (err != Z_OK && err != Z_STREAM_END) return ZLIB_COMPRESS_ERROR; - - return (int)ssl->c_stream.total_out - currTotal; - } - - - /* decompress in to out, returnn out size or error */ - static int myDeCompress(CYASSL* ssl, byte* in,int inSz, byte* out,int outSz) - { - int err; - int currTotal = (int)ssl->d_stream.total_out; - - ssl->d_stream.next_in = in; - ssl->d_stream.avail_in = inSz; - ssl->d_stream.next_out = out; - ssl->d_stream.avail_out = outSz; - - err = inflate(&ssl->d_stream, Z_SYNC_FLUSH); - if (err != Z_OK && err != Z_STREAM_END) return ZLIB_DECOMPRESS_ERROR; - - return (int)ssl->d_stream.total_out - currTotal; - } - -#endif /* HAVE_LIBZ */ - - -void InitSSL_Method(CYASSL_METHOD* method, ProtocolVersion pv) -{ - method->version = pv; - method->side = CYASSL_CLIENT_END; - method->downgrade = 0; -} - - -/* Initialze SSL context, return 0 on success */ -int InitSSL_Ctx(CYASSL_CTX* ctx, CYASSL_METHOD* method) -{ - ctx->method = method; - ctx->refCount = 1; /* so either CTX_free or SSL_free can release */ -#ifndef NO_CERTS - ctx->certificate.buffer = 0; - ctx->certChain.buffer = 0; - ctx->privateKey.buffer = 0; - ctx->serverDH_P.buffer = 0; - ctx->serverDH_G.buffer = 0; -#endif - ctx->haveDH = 0; - ctx->haveNTRU = 0; /* start off */ - ctx->haveECDSAsig = 0; /* start off */ - ctx->haveStaticECC = 0; /* start off */ - ctx->heap = ctx; /* defaults to self */ -#ifndef NO_PSK - ctx->havePSK = 0; - ctx->server_hint[0] = 0; - ctx->client_psk_cb = 0; - ctx->server_psk_cb = 0; -#endif /* NO_PSK */ -#ifdef HAVE_ECC - ctx->eccTempKeySz = ECDHE_SIZE; -#endif - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - ctx->passwd_cb = 0; - ctx->userdata = 0; -#endif /* OPENSSL_EXTRA */ - - ctx->timeout = DEFAULT_TIMEOUT; - -#ifndef CYASSL_USER_IO - ctx->CBIORecv = EmbedReceive; - ctx->CBIOSend = EmbedSend; - #ifdef CYASSL_DTLS - if (method->version.major == DTLS_MAJOR) { - ctx->CBIORecv = EmbedReceiveFrom; - ctx->CBIOSend = EmbedSendTo; - ctx->CBIOCookie = EmbedGenerateCookie; - } - #endif -#else - /* user will set */ - ctx->CBIORecv = NULL; - ctx->CBIOSend = NULL; - #ifdef CYASSL_DTLS - ctx->CBIOCookie = NULL; - #endif -#endif /* CYASSL_USER_IO */ -#ifdef HAVE_NETX - ctx->CBIORecv = NetX_Receive; - ctx->CBIOSend = NetX_Send; -#endif - ctx->partialWrite = 0; - ctx->verifyCallback = 0; - -#ifndef NO_CERTS - ctx->cm = CyaSSL_CertManagerNew(); -#endif -#ifdef HAVE_NTRU - if (method->side == CYASSL_CLIENT_END) - ctx->haveNTRU = 1; /* always on cliet side */ - /* server can turn on by loading key */ -#endif -#ifdef HAVE_ECC - if (method->side == CYASSL_CLIENT_END) { - ctx->haveECDSAsig = 1; /* always on cliet side */ - ctx->haveStaticECC = 1; /* server can turn on by loading key */ - } -#endif - ctx->suites.setSuites = 0; /* user hasn't set yet */ - /* remove DH later if server didn't set, add psk later */ - InitSuites(&ctx->suites, method->version, TRUE, FALSE, TRUE, ctx->haveNTRU, - ctx->haveECDSAsig, ctx->haveStaticECC, method->side); - ctx->verifyPeer = 0; - ctx->verifyNone = 0; - ctx->failNoCert = 0; - ctx->sessionCacheOff = 0; /* initially on */ - ctx->sessionCacheFlushOff = 0; /* initially on */ - ctx->sendVerify = 0; - ctx->quietShutdown = 0; - ctx->groupMessages = 0; -#ifdef HAVE_CAVIUM - ctx->devId = NO_CAVIUM_DEVICE; -#endif -#ifdef HAVE_TLS_EXTENSIONS - ctx->extensions = NULL; -#endif -#ifdef ATOMIC_USER - ctx->MacEncryptCb = NULL; - ctx->DecryptVerifyCb = NULL; -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ctx->EccSignCb = NULL; - ctx->EccVerifyCb = NULL; - #endif /* HAVE_ECC */ - #ifndef NO_RSA - ctx->RsaSignCb = NULL; - ctx->RsaVerifyCb = NULL; - ctx->RsaEncCb = NULL; - ctx->RsaDecCb = NULL; - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ - - if (InitMutex(&ctx->countMutex) < 0) { - CYASSL_MSG("Mutex error on CTX init"); - return BAD_MUTEX_E; - } -#ifndef NO_CERTS - if (ctx->cm == NULL) { - CYASSL_MSG("Bad Cert Manager New"); - return BAD_CERT_MANAGER_ERROR; - } -#endif - return 0; -} - - -/* In case contexts are held in array and don't want to free actual ctx */ -void SSL_CtxResourceFree(CYASSL_CTX* ctx) -{ - XFREE(ctx->method, ctx->heap, DYNAMIC_TYPE_METHOD); - -#ifndef NO_CERTS - XFREE(ctx->serverDH_G.buffer, ctx->heap, DYNAMIC_TYPE_DH); - XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); - XFREE(ctx->privateKey.buffer, ctx->heap, DYNAMIC_TYPE_KEY); - XFREE(ctx->certificate.buffer, ctx->heap, DYNAMIC_TYPE_CERT); - XFREE(ctx->certChain.buffer, ctx->heap, DYNAMIC_TYPE_CERT); - CyaSSL_CertManagerFree(ctx->cm); -#endif -#ifdef HAVE_TLS_EXTENSIONS - TLSX_FreeAll(ctx->extensions); -#endif -} - - -void FreeSSL_Ctx(CYASSL_CTX* ctx) -{ - int doFree = 0; - - if (LockMutex(&ctx->countMutex) != 0) { - CYASSL_MSG("Couldn't lock count mutex"); - return; - } - ctx->refCount--; - if (ctx->refCount == 0) - doFree = 1; - UnLockMutex(&ctx->countMutex); - - if (doFree) { - CYASSL_MSG("CTX ref count down to 0, doing full free"); - SSL_CtxResourceFree(ctx); - FreeMutex(&ctx->countMutex); - XFREE(ctx, ctx->heap, DYNAMIC_TYPE_CTX); - } - else { - (void)ctx; - CYASSL_MSG("CTX ref count not 0 yet, no free"); - } -} - - -/* Set cipher pointers to null */ -void InitCiphers(CYASSL* ssl) -{ -#ifdef BUILD_ARC4 - ssl->encrypt.arc4 = NULL; - ssl->decrypt.arc4 = NULL; -#endif -#ifdef BUILD_DES3 - ssl->encrypt.des3 = NULL; - ssl->decrypt.des3 = NULL; -#endif -#ifdef BUILD_AES - ssl->encrypt.aes = NULL; - ssl->decrypt.aes = NULL; -#endif -#ifdef HAVE_CAMELLIA - ssl->encrypt.cam = NULL; - ssl->decrypt.cam = NULL; -#endif -#ifdef HAVE_HC128 - ssl->encrypt.hc128 = NULL; - ssl->decrypt.hc128 = NULL; -#endif -#ifdef BUILD_RABBIT - ssl->encrypt.rabbit = NULL; - ssl->decrypt.rabbit = NULL; -#endif - ssl->encrypt.setup = 0; - ssl->decrypt.setup = 0; -} - - -/* Free ciphers */ -void FreeCiphers(CYASSL* ssl) -{ - (void)ssl; -#ifdef BUILD_ARC4 - #ifdef HAVE_CAVIUM - if (ssl->devId != NO_CAVIUM_DEVICE) { - Arc4FreeCavium(ssl->encrypt.arc4); - Arc4FreeCavium(ssl->decrypt.arc4); - } - #endif - XFREE(ssl->encrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -#ifdef BUILD_DES3 - #ifdef HAVE_CAVIUM - if (ssl->devId != NO_CAVIUM_DEVICE) { - Des3_FreeCavium(ssl->encrypt.des3); - Des3_FreeCavium(ssl->decrypt.des3); - } - #endif - XFREE(ssl->encrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -#ifdef BUILD_AES - #ifdef HAVE_CAVIUM - if (ssl->devId != NO_CAVIUM_DEVICE) { - AesFreeCavium(ssl->encrypt.aes); - AesFreeCavium(ssl->decrypt.aes); - } - #endif - XFREE(ssl->encrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -#ifdef HAVE_CAMELLIA - XFREE(ssl->encrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -#ifdef HAVE_HC128 - XFREE(ssl->encrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -#ifdef BUILD_RABBIT - XFREE(ssl->encrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER); - XFREE(ssl->decrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER); -#endif -} - - -void InitCipherSpecs(CipherSpecs* cs) -{ - cs->bulk_cipher_algorithm = INVALID_BYTE; - cs->cipher_type = INVALID_BYTE; - cs->mac_algorithm = INVALID_BYTE; - cs->kea = INVALID_BYTE; - cs->sig_algo = INVALID_BYTE; - - cs->hash_size = 0; - cs->static_ecdh = 0; - cs->key_size = 0; - cs->iv_size = 0; - cs->block_size = 0; -} - - -void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK, - byte haveDH, byte haveNTRU, byte haveECDSAsig, - byte haveStaticECC, int side) -{ - word16 idx = 0; - int tls = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_MINOR; - int tls1_2 = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_2_MINOR; - int haveRSAsig = 1; - - (void)tls; /* shut up compiler */ - (void)tls1_2; - (void)haveDH; - (void)havePSK; - (void)haveNTRU; - (void)haveStaticECC; - - if (suites == NULL) { - CYASSL_MSG("InitSuites pointer error"); - return; - } - - if (suites->setSuites) - return; /* trust user settings, don't override */ - - if (side == CYASSL_SERVER_END && haveStaticECC) { - haveRSA = 0; /* can't do RSA with ECDSA key */ - (void)haveRSA; /* some builds won't read */ - } - - if (side == CYASSL_SERVER_END && haveECDSAsig) { - haveRSAsig = 0; /* can't have RSA sig if signed by ECDSA */ - (void)haveRSAsig; /* non ecc builds won't read */ - } - -#ifdef CYASSL_DTLS - if (pv.major == DTLS_MAJOR) { - tls = 1; - tls1_2 = pv.minor <= DTLSv1_2_MINOR; - } -#endif - -#ifdef HAVE_RENEGOTIATION_INDICATION - if (side == CYASSL_CLIENT_END) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_EMPTY_RENEGOTIATION_INFO_SCSV; - } -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA - if (tls && haveNTRU && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA - if (tls && haveNTRU && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA - if (tls && haveNTRU && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_NTRU_RSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA - if (tls && haveNTRU && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveRSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - if (tls1_2 && haveRSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - if (tls1_2 && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - if (tls1_2 && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - if (tls && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - if (tls && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - if (tls && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - if (tls && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - if (tls && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - if (tls && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - if (tls && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - if (tls && haveECDSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - if (tls && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - if (tls && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA - if (tls && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA - if (tls && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - if (tls && haveRSAsig && haveStaticECC) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8; - } -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 - if (tls1_2 && haveECDSAsig) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_RSA_WITH_AES_128_CCM_8; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_RSA_WITH_AES_256_CCM_8; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - if (tls1_2 && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_256_GCM_SHA384; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_128_GCM_SHA256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 - if (tls1_2 && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA256; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA - if (tls && havePSK) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_PSK_WITH_AES_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 - if (tls && havePSK) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA - if (tls && havePSK) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 - if (tls && havePSK) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_PSK_WITH_AES_128_CCM_8; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 - if (tls && havePSK) { - suites->suites[idx++] = ECC_BYTE; - suites->suites[idx++] = TLS_PSK_WITH_AES_256_CCM_8; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 - if (tls && havePSK) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA256; - } -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA - if (tls && havePSK) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA; - } -#endif - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA - if (haveRSA ) { - suites->suites[idx++] = 0; - suites->suites[idx++] = SSL_RSA_WITH_RC4_128_SHA; - } -#endif - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 - if (haveRSA ) { - suites->suites[idx++] = 0; - suites->suites[idx++] = SSL_RSA_WITH_RC4_128_MD5; - } -#endif - -#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA - if (haveRSA ) { - suites->suites[idx++] = 0; - suites->suites[idx++] = SSL_RSA_WITH_3DES_EDE_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_HC_128_MD5; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_HC_128_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_HC_128_B2B256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_B2B256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_B2B256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_RABBIT_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_DHE_WITH_RSA_CAMELLIA_256_CBC_SHA - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - if (tls && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256; - } -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - if (tls && haveDH && haveRSA) { - suites->suites[idx++] = 0; - suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256; - } -#endif - - suites->suiteSz = idx; - - { - idx = 0; - - if (haveECDSAsig) { - #ifdef CYASSL_SHA384 - suites->hashSigAlgo[idx++] = sha384_mac; - suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - #endif - #ifndef NO_SHA256 - suites->hashSigAlgo[idx++] = sha256_mac; - suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - #endif - #ifndef NO_SHA - suites->hashSigAlgo[idx++] = sha_mac; - suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - #endif - } - - if (haveRSAsig) { - #ifdef CYASSL_SHA384 - suites->hashSigAlgo[idx++] = sha384_mac; - suites->hashSigAlgo[idx++] = rsa_sa_algo; - #endif - #ifndef NO_SHA256 - suites->hashSigAlgo[idx++] = sha256_mac; - suites->hashSigAlgo[idx++] = rsa_sa_algo; - #endif - #ifndef NO_SHA - suites->hashSigAlgo[idx++] = sha_mac; - suites->hashSigAlgo[idx++] = rsa_sa_algo; - #endif - } - - suites->hashSigAlgoSz = idx; - } -} - - -#ifndef NO_CERTS - - -void InitX509Name(CYASSL_X509_NAME* name, int dynamicFlag) -{ - (void)dynamicFlag; - - if (name != NULL) { - name->name = name->staticName; - name->dynamicName = 0; -#ifdef OPENSSL_EXTRA - XMEMSET(&name->fullName, 0, sizeof(DecodedName)); -#endif /* OPENSSL_EXTRA */ - } -} - - -void FreeX509Name(CYASSL_X509_NAME* name) -{ - if (name != NULL) { - if (name->dynamicName) - XFREE(name->name, NULL, DYNAMIC_TYPE_SUBJECT_CN); -#ifdef OPENSSL_EXTRA - if (name->fullName.fullName != NULL) - XFREE(name->fullName.fullName, NULL, DYNAMIC_TYPE_X509); -#endif /* OPENSSL_EXTRA */ - } -} - - -/* Initialize CyaSSL X509 type */ -void InitX509(CYASSL_X509* x509, int dynamicFlag) -{ - InitX509Name(&x509->issuer, 0); - InitX509Name(&x509->subject, 0); - x509->version = 0; - x509->pubKey.buffer = NULL; - x509->sig.buffer = NULL; - x509->derCert.buffer = NULL; - x509->altNames = NULL; - x509->altNamesNext = NULL; - x509->dynamicMemory = (byte)dynamicFlag; - x509->isCa = 0; -#ifdef HAVE_ECC - x509->pkCurveOID = 0; -#endif /* HAVE_ECC */ -#ifdef OPENSSL_EXTRA - x509->pathLength = 0; - x509->basicConstSet = 0; - x509->basicConstCrit = 0; - x509->basicConstPlSet = 0; - x509->subjAltNameSet = 0; - x509->subjAltNameCrit = 0; - x509->authKeyIdSet = 0; - x509->authKeyIdCrit = 0; - x509->authKeyId = NULL; - x509->authKeyIdSz = 0; - x509->subjKeyIdSet = 0; - x509->subjKeyIdCrit = 0; - x509->subjKeyId = NULL; - x509->subjKeyIdSz = 0; - x509->keyUsageSet = 0; - x509->keyUsageCrit = 0; - x509->keyUsage = 0; - #ifdef CYASSL_SEP - x509->certPolicySet = 0; - x509->certPolicyCrit = 0; - #endif /* CYASSL_SEP */ -#endif /* OPENSSL_EXTRA */ -} - - -/* Free CyaSSL X509 type */ -void FreeX509(CYASSL_X509* x509) -{ - if (x509 == NULL) - return; - - FreeX509Name(&x509->issuer); - FreeX509Name(&x509->subject); - if (x509->pubKey.buffer) - XFREE(x509->pubKey.buffer, NULL, DYNAMIC_TYPE_PUBLIC_KEY); - XFREE(x509->derCert.buffer, NULL, DYNAMIC_TYPE_SUBJECT_CN); - XFREE(x509->sig.buffer, NULL, DYNAMIC_TYPE_SIGNATURE); - #ifdef OPENSSL_EXTRA - XFREE(x509->authKeyId, NULL, 0); - XFREE(x509->subjKeyId, NULL, 0); - #endif /* OPENSSL_EXTRA */ - if (x509->altNames) - FreeAltNames(x509->altNames, NULL); - if (x509->dynamicMemory) - XFREE(x509, NULL, DYNAMIC_TYPE_X509); -} - -#endif /* NO_CERTS */ - - -/* init everything to 0, NULL, default values before calling anything that may - fail so that desctructor has a "good" state to cleanup */ -int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx) -{ - int ret; - byte haveRSA = 0; - byte havePSK = 0; - - ssl->ctx = ctx; /* only for passing to calls, options could change */ - ssl->version = ctx->method->version; - ssl->suites = NULL; - -#ifdef HAVE_LIBZ - ssl->didStreamInit = 0; -#endif -#ifndef NO_RSA - haveRSA = 1; -#endif - -#ifndef NO_CERTS - ssl->buffers.certificate.buffer = 0; - ssl->buffers.key.buffer = 0; - ssl->buffers.certChain.buffer = 0; -#endif - ssl->buffers.inputBuffer.length = 0; - ssl->buffers.inputBuffer.idx = 0; - ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer; - ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN; - ssl->buffers.inputBuffer.dynamicFlag = 0; - ssl->buffers.inputBuffer.offset = 0; - ssl->buffers.outputBuffer.length = 0; - ssl->buffers.outputBuffer.idx = 0; - ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer; - ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN; - ssl->buffers.outputBuffer.dynamicFlag = 0; - ssl->buffers.outputBuffer.offset = 0; - ssl->buffers.domainName.buffer = 0; -#ifndef NO_CERTS - ssl->buffers.serverDH_P.buffer = 0; - ssl->buffers.serverDH_G.buffer = 0; - ssl->buffers.serverDH_Pub.buffer = 0; - ssl->buffers.serverDH_Priv.buffer = 0; -#endif - ssl->buffers.clearOutputBuffer.buffer = 0; - ssl->buffers.clearOutputBuffer.length = 0; - ssl->buffers.prevSent = 0; - ssl->buffers.plainSz = 0; -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ssl->buffers.peerEccDsaKey.buffer = 0; - ssl->buffers.peerEccDsaKey.length = 0; - #endif /* HAVE_ECC */ - #ifndef NO_RSA - ssl->buffers.peerRsaKey.buffer = 0; - ssl->buffers.peerRsaKey.length = 0; - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ - -#ifdef KEEP_PEER_CERT - InitX509(&ssl->peerCert, 0); -#endif - -#ifdef HAVE_ECC - ssl->eccTempKeySz = ctx->eccTempKeySz; - ssl->pkCurveOID = ctx->pkCurveOID; - ssl->peerEccKeyPresent = 0; - ssl->peerEccDsaKeyPresent = 0; - ssl->eccDsaKeyPresent = 0; - ssl->eccTempKeyPresent = 0; - ssl->peerEccKey = NULL; - ssl->peerEccDsaKey = NULL; - ssl->eccDsaKey = NULL; - ssl->eccTempKey = NULL; -#endif - - ssl->timeout = ctx->timeout; - ssl->rfd = -1; /* set to invalid descriptor */ - ssl->wfd = -1; - ssl->rflags = 0; /* no user flags yet */ - ssl->wflags = 0; /* no user flags yet */ - ssl->biord = 0; - ssl->biowr = 0; - - ssl->IOCB_ReadCtx = &ssl->rfd; /* prevent invalid pointer access if not */ - ssl->IOCB_WriteCtx = &ssl->wfd; /* correctly set */ -#ifdef HAVE_NETX - ssl->nxCtx.nxSocket = NULL; - ssl->nxCtx.nxPacket = NULL; - ssl->nxCtx.nxOffset = 0; - ssl->nxCtx.nxWait = 0; - ssl->IOCB_ReadCtx = &ssl->nxCtx; /* default NetX IO ctx, same for read */ - ssl->IOCB_WriteCtx = &ssl->nxCtx; /* and write */ -#endif -#ifdef CYASSL_DTLS - ssl->IOCB_CookieCtx = NULL; /* we don't use for default cb */ - ssl->dtls_expected_rx = MAX_MTU; - ssl->keys.dtls_state.window = 0; - ssl->keys.dtls_state.nextEpoch = 0; - ssl->keys.dtls_state.nextSeq = 0; -#endif - -#ifndef NO_OLD_TLS -#ifndef NO_MD5 - InitMd5(&ssl->hashMd5); -#endif -#ifndef NO_SHA - ret = InitSha(&ssl->hashSha); - if (ret != 0) { - return ret; - } -#endif -#endif -#ifndef NO_SHA256 - ret = InitSha256(&ssl->hashSha256); - if (ret != 0) { - return ret; - } -#endif -#ifdef CYASSL_SHA384 - ret = InitSha384(&ssl->hashSha384); - if (ret != 0) { - return ret; - } -#endif -#ifndef NO_RSA - ssl->peerRsaKey = NULL; - ssl->peerRsaKeyPresent = 0; -#endif - ssl->verifyCallback = ctx->verifyCallback; - ssl->verifyCbCtx = NULL; - ssl->options.side = ctx->method->side; - ssl->options.downgrade = ctx->method->downgrade; - ssl->error = 0; - ssl->options.connReset = 0; - ssl->options.isClosed = 0; - ssl->options.closeNotify = 0; - ssl->options.sentNotify = 0; - ssl->options.usingCompression = 0; - if (ssl->options.side == CYASSL_SERVER_END) - ssl->options.haveDH = ctx->haveDH; - else - ssl->options.haveDH = 0; - ssl->options.haveNTRU = ctx->haveNTRU; - ssl->options.haveECDSAsig = ctx->haveECDSAsig; - ssl->options.haveStaticECC = ctx->haveStaticECC; - ssl->options.havePeerCert = 0; - ssl->options.havePeerVerify = 0; - ssl->options.usingPSK_cipher = 0; - ssl->options.sendAlertState = 0; -#ifndef NO_PSK - havePSK = ctx->havePSK; - ssl->options.havePSK = ctx->havePSK; - ssl->options.client_psk_cb = ctx->client_psk_cb; - ssl->options.server_psk_cb = ctx->server_psk_cb; -#endif /* NO_PSK */ - - ssl->options.serverState = NULL_STATE; - ssl->options.clientState = NULL_STATE; - ssl->options.connectState = CONNECT_BEGIN; - ssl->options.acceptState = ACCEPT_BEGIN; - ssl->options.handShakeState = NULL_STATE; - ssl->options.processReply = doProcessInit; - -#ifdef CYASSL_DTLS - ssl->keys.dtls_sequence_number = 0; - ssl->keys.dtls_state.curSeq = 0; - ssl->keys.dtls_state.nextSeq = 0; - ssl->keys.dtls_handshake_number = 0; - ssl->keys.dtls_expected_peer_handshake_number = 0; - ssl->keys.dtls_epoch = 0; - ssl->keys.dtls_state.curEpoch = 0; - ssl->keys.dtls_state.nextEpoch = 0; - ssl->dtls_timeout_init = DTLS_TIMEOUT_INIT; - ssl->dtls_timeout_max = DTLS_TIMEOUT_MAX; - ssl->dtls_timeout = ssl->dtls_timeout_init; - ssl->dtls_pool = NULL; - ssl->dtls_msg_list = NULL; -#endif - ssl->keys.encryptSz = 0; - ssl->keys.padSz = 0; - ssl->keys.encryptionOn = 0; /* initially off */ - ssl->keys.decryptedCur = 0; /* initially off */ - ssl->options.sessionCacheOff = ctx->sessionCacheOff; - ssl->options.sessionCacheFlushOff = ctx->sessionCacheFlushOff; - - ssl->options.verifyPeer = ctx->verifyPeer; - ssl->options.verifyNone = ctx->verifyNone; - ssl->options.failNoCert = ctx->failNoCert; - ssl->options.sendVerify = ctx->sendVerify; - - ssl->options.resuming = 0; - ssl->options.haveSessionId = 0; - #ifndef NO_OLD_TLS - ssl->hmac = SSL_hmac; /* default to SSLv3 */ - #else - ssl->hmac = TLS_hmac; - #endif - ssl->heap = ctx->heap; /* defaults to self */ - ssl->options.tls = 0; - ssl->options.tls1_1 = 0; - ssl->options.dtls = ssl->version.major == DTLS_MAJOR; - ssl->options.partialWrite = ctx->partialWrite; - ssl->options.quietShutdown = ctx->quietShutdown; - ssl->options.certOnly = 0; - ssl->options.groupMessages = ctx->groupMessages; - ssl->options.usingNonblock = 0; - ssl->options.saveArrays = 0; - -#ifndef NO_CERTS - /* ctx still owns certificate, certChain, key, dh, and cm */ - ssl->buffers.certificate = ctx->certificate; - ssl->buffers.certChain = ctx->certChain; - ssl->buffers.key = ctx->privateKey; - if (ssl->options.side == CYASSL_SERVER_END) { - ssl->buffers.serverDH_P = ctx->serverDH_P; - ssl->buffers.serverDH_G = ctx->serverDH_G; - } -#endif - ssl->buffers.weOwnCert = 0; - ssl->buffers.weOwnKey = 0; - ssl->buffers.weOwnDH = 0; - -#ifdef CYASSL_DTLS - ssl->buffers.dtlsCtx.fd = -1; - ssl->buffers.dtlsCtx.peer.sa = NULL; - ssl->buffers.dtlsCtx.peer.sz = 0; -#endif - -#ifdef KEEP_PEER_CERT - ssl->peerCert.issuer.sz = 0; - ssl->peerCert.subject.sz = 0; -#endif - -#ifdef SESSION_CERTS - ssl->session.chain.count = 0; -#endif - -#ifndef NO_CLIENT_CACHE - ssl->session.idLen = 0; -#endif - - ssl->cipher.ssl = ssl; - -#ifdef FORTRESS - ssl->ex_data[0] = 0; - ssl->ex_data[1] = 0; - ssl->ex_data[2] = 0; -#endif - -#ifdef CYASSL_CALLBACKS - ssl->hsInfoOn = 0; - ssl->toInfoOn = 0; -#endif - -#ifdef HAVE_CAVIUM - ssl->devId = ctx->devId; -#endif - -#ifdef HAVE_TLS_EXTENSIONS - ssl->extensions = NULL; -#ifdef HAVE_MAX_FRAGMENT - ssl->max_fragment = MAX_RECORD_SIZE; -#endif -#ifdef HAVE_TRUNCATED_HMAC - ssl->truncated_hmac = 0; -#endif -#endif - - ssl->rng = NULL; - ssl->arrays = NULL; - - /* default alert state (none) */ - ssl->alert_history.last_rx.code = -1; - ssl->alert_history.last_rx.level = -1; - ssl->alert_history.last_tx.code = -1; - ssl->alert_history.last_tx.level = -1; - - InitCiphers(ssl); - InitCipherSpecs(&ssl->specs); -#ifdef ATOMIC_USER - ssl->MacEncryptCtx = NULL; - ssl->DecryptVerifyCtx = NULL; -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ssl->EccSignCtx = NULL; - ssl->EccVerifyCtx = NULL; - #endif /* HAVE_ECC */ - #ifndef NO_RSA - ssl->RsaSignCtx = NULL; - ssl->RsaVerifyCtx = NULL; - ssl->RsaEncCtx = NULL; - ssl->RsaDecCtx = NULL; - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ - - /* all done with init, now can return errors, call other stuff */ - - /* increment CTX reference count */ - if (LockMutex(&ctx->countMutex) != 0) { - CYASSL_MSG("Couldn't lock CTX count mutex"); - return BAD_MUTEX_E; - } - ctx->refCount++; - UnLockMutex(&ctx->countMutex); - - /* arrays */ - ssl->arrays = (Arrays*)XMALLOC(sizeof(Arrays), ssl->heap, - DYNAMIC_TYPE_ARRAYS); - if (ssl->arrays == NULL) { - CYASSL_MSG("Arrays Memory error"); - return MEMORY_E; - } - XMEMSET(ssl->arrays, 0, sizeof(Arrays)); - -#ifndef NO_PSK - ssl->arrays->client_identity[0] = 0; - if (ctx->server_hint[0]) { /* set in CTX */ - XSTRNCPY(ssl->arrays->server_hint, ctx->server_hint, MAX_PSK_ID_LEN); - ssl->arrays->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; - } - else - ssl->arrays->server_hint[0] = 0; -#endif /* NO_PSK */ - -#ifdef CYASSL_DTLS - ssl->arrays->cookieSz = 0; -#endif - - /* RNG */ - ssl->rng = (RNG*)XMALLOC(sizeof(RNG), ssl->heap, DYNAMIC_TYPE_RNG); - if (ssl->rng == NULL) { - CYASSL_MSG("RNG Memory error"); - return MEMORY_E; - } - - if ( (ret = InitRng(ssl->rng)) != 0) { - CYASSL_MSG("RNG Init error"); - return ret; - } - - /* suites */ - ssl->suites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap, - DYNAMIC_TYPE_SUITES); - if (ssl->suites == NULL) { - CYASSL_MSG("Suites Memory error"); - return MEMORY_E; - } - *ssl->suites = ctx->suites; - - /* peer key */ -#ifndef NO_RSA - ssl->peerRsaKey = (RsaKey*)XMALLOC(sizeof(RsaKey), ssl->heap, - DYNAMIC_TYPE_RSA); - if (ssl->peerRsaKey == NULL) { - CYASSL_MSG("PeerRsaKey Memory error"); - return MEMORY_E; - } - ret = InitRsaKey(ssl->peerRsaKey, ctx->heap); - if (ret != 0) return ret; -#endif -#ifndef NO_CERTS - /* make sure server has cert and key unless using PSK */ - if (ssl->options.side == CYASSL_SERVER_END && !havePSK) - if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) { - CYASSL_MSG("Server missing certificate and/or private key"); - return NO_PRIVATE_KEY; - } -#endif -#ifdef HAVE_ECC - ssl->peerEccKey = (ecc_key*)XMALLOC(sizeof(ecc_key), - ctx->heap, DYNAMIC_TYPE_ECC); - if (ssl->peerEccKey == NULL) { - CYASSL_MSG("PeerEccKey Memory error"); - return MEMORY_E; - } - ssl->peerEccDsaKey = (ecc_key*)XMALLOC(sizeof(ecc_key), - ctx->heap, DYNAMIC_TYPE_ECC); - if (ssl->peerEccDsaKey == NULL) { - CYASSL_MSG("PeerEccDsaKey Memory error"); - return MEMORY_E; - } - ssl->eccDsaKey = (ecc_key*)XMALLOC(sizeof(ecc_key), - ctx->heap, DYNAMIC_TYPE_ECC); - if (ssl->eccDsaKey == NULL) { - CYASSL_MSG("EccDsaKey Memory error"); - return MEMORY_E; - } - ssl->eccTempKey = (ecc_key*)XMALLOC(sizeof(ecc_key), - ctx->heap, DYNAMIC_TYPE_ECC); - if (ssl->eccTempKey == NULL) { - CYASSL_MSG("EccTempKey Memory error"); - return MEMORY_E; - } - ecc_init(ssl->peerEccKey); - ecc_init(ssl->peerEccDsaKey); - ecc_init(ssl->eccDsaKey); - ecc_init(ssl->eccTempKey); -#endif - - /* make sure server has DH parms, and add PSK if there, add NTRU too */ - if (ssl->options.side == CYASSL_SERVER_END) - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - else - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, TRUE, - ssl->options.haveNTRU, ssl->options.haveECDSAsig, - ssl->options.haveStaticECC, ssl->options.side); - - return 0; -} - - -/* free use of temporary arrays */ -void FreeArrays(CYASSL* ssl, int keep) -{ - if (ssl->arrays && keep) { - /* keeps session id for user retrieval */ - XMEMCPY(ssl->session.sessionID, ssl->arrays->sessionID, ID_LEN); - } - XFREE(ssl->arrays, ssl->heap, DYNAMIC_TYPE_ARRAYS); - ssl->arrays = NULL; -} - - -/* In case holding SSL object in array and don't want to free actual ssl */ -void SSL_ResourceFree(CYASSL* ssl) -{ - FreeCiphers(ssl); - FreeArrays(ssl, 0); - XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG); - XFREE(ssl->suites, ssl->heap, DYNAMIC_TYPE_SUITES); - XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN); - -#ifndef NO_CERTS - XFREE(ssl->buffers.serverDH_Priv.buffer, ssl->heap, DYNAMIC_TYPE_DH); - XFREE(ssl->buffers.serverDH_Pub.buffer, ssl->heap, DYNAMIC_TYPE_DH); - /* parameters (p,g) may be owned by ctx */ - if (ssl->buffers.weOwnDH || ssl->options.side == CYASSL_CLIENT_END) { - XFREE(ssl->buffers.serverDH_G.buffer, ssl->heap, DYNAMIC_TYPE_DH); - XFREE(ssl->buffers.serverDH_P.buffer, ssl->heap, DYNAMIC_TYPE_DH); - } - - /* CYASSL_CTX always owns certChain */ - if (ssl->buffers.weOwnCert) - XFREE(ssl->buffers.certificate.buffer, ssl->heap, DYNAMIC_TYPE_CERT); - if (ssl->buffers.weOwnKey) - XFREE(ssl->buffers.key.buffer, ssl->heap, DYNAMIC_TYPE_KEY); -#endif -#ifndef NO_RSA - if (ssl->peerRsaKey) { - FreeRsaKey(ssl->peerRsaKey); - XFREE(ssl->peerRsaKey, ssl->heap, DYNAMIC_TYPE_RSA); - } -#endif - if (ssl->buffers.inputBuffer.dynamicFlag) - ShrinkInputBuffer(ssl, FORCED_FREE); - if (ssl->buffers.outputBuffer.dynamicFlag) - ShrinkOutputBuffer(ssl); -#ifdef CYASSL_DTLS - if (ssl->dtls_pool != NULL) { - DtlsPoolReset(ssl); - XFREE(ssl->dtls_pool, ssl->heap, DYNAMIC_TYPE_NONE); - } - if (ssl->dtls_msg_list != NULL) { - DtlsMsgListDelete(ssl->dtls_msg_list, ssl->heap); - ssl->dtls_msg_list = NULL; - } - XFREE(ssl->buffers.dtlsCtx.peer.sa, ssl->heap, DYNAMIC_TYPE_SOCKADDR); - ssl->buffers.dtlsCtx.peer.sa = NULL; -#endif -#if defined(KEEP_PEER_CERT) || defined(GOAHEAD_WS) - FreeX509(&ssl->peerCert); -#endif -#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) - CyaSSL_BIO_free(ssl->biord); - if (ssl->biord != ssl->biowr) /* in case same as write */ - CyaSSL_BIO_free(ssl->biowr); -#endif -#ifdef HAVE_LIBZ - FreeStreams(ssl); -#endif -#ifdef HAVE_ECC - if (ssl->peerEccKey) { - if (ssl->peerEccKeyPresent) - ecc_free(ssl->peerEccKey); - XFREE(ssl->peerEccKey, ssl->heap, DYNAMIC_TYPE_ECC); - } - if (ssl->peerEccDsaKey) { - if (ssl->peerEccDsaKeyPresent) - ecc_free(ssl->peerEccDsaKey); - XFREE(ssl->peerEccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); - } - if (ssl->eccTempKey) { - if (ssl->eccTempKeyPresent) - ecc_free(ssl->eccTempKey); - XFREE(ssl->eccTempKey, ssl->heap, DYNAMIC_TYPE_ECC); - } - if (ssl->eccDsaKey) { - if (ssl->eccDsaKeyPresent) - ecc_free(ssl->eccDsaKey); - XFREE(ssl->eccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); - } -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC); - #endif /* HAVE_ECC */ - #ifndef NO_RSA - XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA); - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ -#ifdef HAVE_TLS_EXTENSIONS - TLSX_FreeAll(ssl->extensions); -#endif -#ifdef HAVE_NETX - if (ssl->nxCtx.nxPacket) - nx_packet_release(ssl->nxCtx.nxPacket); -#endif -} - - -/* Free any handshake resources no longer needed */ -void FreeHandshakeResources(CYASSL* ssl) -{ - /* input buffer */ - if (ssl->buffers.inputBuffer.dynamicFlag) - ShrinkInputBuffer(ssl, NO_FORCED_FREE); - - /* suites */ - XFREE(ssl->suites, ssl->heap, DYNAMIC_TYPE_SUITES); - ssl->suites = NULL; - - /* RNG */ - if (ssl->specs.cipher_type == stream || ssl->options.tls1_1 == 0) { - XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG); - ssl->rng = NULL; - } - -#ifdef CYASSL_DTLS - /* DTLS_POOL */ - if (ssl->options.dtls && ssl->dtls_pool != NULL) { - DtlsPoolReset(ssl); - XFREE(ssl->dtls_pool, ssl->heap, DYNAMIC_TYPE_DTLS_POOL); - ssl->dtls_pool = NULL; - } -#endif - - /* arrays */ - if (ssl->options.saveArrays) - FreeArrays(ssl, 1); - -#ifndef NO_RSA - /* peerRsaKey */ - if (ssl->peerRsaKey) { - FreeRsaKey(ssl->peerRsaKey); - XFREE(ssl->peerRsaKey, ssl->heap, DYNAMIC_TYPE_RSA); - ssl->peerRsaKey = NULL; - } -#endif - -#ifdef HAVE_ECC - if (ssl->peerEccKey) - { - if (ssl->peerEccKeyPresent) { - ecc_free(ssl->peerEccKey); - ssl->peerEccKeyPresent = 0; - } - XFREE(ssl->peerEccKey, ssl->heap, DYNAMIC_TYPE_ECC); - ssl->peerEccKey = NULL; - } - if (ssl->peerEccDsaKey) - { - if (ssl->peerEccDsaKeyPresent) { - ecc_free(ssl->peerEccDsaKey); - ssl->peerEccDsaKeyPresent = 0; - } - XFREE(ssl->peerEccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); - ssl->peerEccDsaKey = NULL; - } - if (ssl->eccTempKey) - { - if (ssl->eccTempKeyPresent) { - ecc_free(ssl->eccTempKey); - ssl->eccTempKeyPresent = 0; - } - XFREE(ssl->eccTempKey, ssl->heap, DYNAMIC_TYPE_ECC); - ssl->eccTempKey = NULL; - } - if (ssl->eccDsaKey) - { - if (ssl->eccDsaKeyPresent) { - ecc_free(ssl->eccDsaKey); - ssl->eccDsaKeyPresent = 0; - } - XFREE(ssl->eccDsaKey, ssl->heap, DYNAMIC_TYPE_ECC); - ssl->eccDsaKey = NULL; - } -#endif -#ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC); - ssl->buffers.peerEccDsaKey.buffer = NULL; - #endif /* HAVE_ECC */ - #ifndef NO_RSA - XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA); - ssl->buffers.peerRsaKey.buffer = NULL; - #endif /* NO_RSA */ -#endif /* HAVE_PK_CALLBACKS */ -} - - -void FreeSSL(CYASSL* ssl) -{ - FreeSSL_Ctx(ssl->ctx); /* will decrement and free underyling CTX if 0 */ - SSL_ResourceFree(ssl); - XFREE(ssl, ssl->heap, DYNAMIC_TYPE_SSL); -} - - -#ifdef CYASSL_DTLS - -int DtlsPoolInit(CYASSL* ssl) -{ - if (ssl->dtls_pool == NULL) { - DtlsPool *pool = (DtlsPool*)XMALLOC(sizeof(DtlsPool), - ssl->heap, DYNAMIC_TYPE_DTLS_POOL); - if (pool == NULL) { - CYASSL_MSG("DTLS Buffer Pool Memory error"); - return MEMORY_E; - } - else { - int i; - - for (i = 0; i < DTLS_POOL_SZ; i++) { - pool->buf[i].length = 0; - pool->buf[i].buffer = NULL; - } - pool->used = 0; - ssl->dtls_pool = pool; - } - } - return 0; -} - - -int DtlsPoolSave(CYASSL* ssl, const byte *src, int sz) -{ - DtlsPool *pool = ssl->dtls_pool; - if (pool != NULL && pool->used < DTLS_POOL_SZ) { - buffer *pBuf = &pool->buf[pool->used]; - pBuf->buffer = (byte*)XMALLOC(sz, ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); - if (pBuf->buffer == NULL) { - CYASSL_MSG("DTLS Buffer Memory error"); - return MEMORY_ERROR; - } - XMEMCPY(pBuf->buffer, src, sz); - pBuf->length = (word32)sz; - pool->used++; - } - return 0; -} - - -void DtlsPoolReset(CYASSL* ssl) -{ - DtlsPool *pool = ssl->dtls_pool; - if (pool != NULL) { - buffer *pBuf; - int i, used; - - used = pool->used; - for (i = 0, pBuf = &pool->buf[0]; i < used; i++, pBuf++) { - XFREE(pBuf->buffer, ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); - pBuf->buffer = NULL; - pBuf->length = 0; - } - pool->used = 0; - } - ssl->dtls_timeout = ssl->dtls_timeout_init; -} - - -int DtlsPoolTimeout(CYASSL* ssl) -{ - int result = -1; - if (ssl->dtls_timeout < ssl->dtls_timeout_max) { - ssl->dtls_timeout *= DTLS_TIMEOUT_MULTIPLIER; - result = 0; - } - return result; -} - - -int DtlsPoolSend(CYASSL* ssl) -{ - int ret; - DtlsPool *pool = ssl->dtls_pool; - - if (pool != NULL && pool->used > 0) { - int i; - for (i = 0; i < pool->used; i++) { - int sendResult; - buffer* buf = &pool->buf[i]; - - DtlsRecordLayerHeader* dtls = (DtlsRecordLayerHeader*)buf->buffer; - - word16 message_epoch; - ato16(dtls->epoch, &message_epoch); - if (message_epoch == ssl->keys.dtls_epoch) { - /* Increment record sequence number on retransmitted handshake - * messages */ - c32to48(ssl->keys.dtls_sequence_number, dtls->sequence_number); - ssl->keys.dtls_sequence_number++; - } - else { - /* The Finished message is sent with the next epoch, keep its - * sequence number */ - } - - if ((ret = CheckAvailableSize(ssl, buf->length)) != 0) - return ret; - - XMEMCPY(ssl->buffers.outputBuffer.buffer, buf->buffer, buf->length); - ssl->buffers.outputBuffer.idx = 0; - ssl->buffers.outputBuffer.length = buf->length; - - sendResult = SendBuffered(ssl); - if (sendResult < 0) { - return sendResult; - } - } - } - return 0; -} - - -/* functions for managing DTLS datagram reordering */ - -/* Need to allocate space for the handshake message header. The hashing - * routines assume the message pointer is still within the buffer that - * has the headers, and will include those headers in the hash. The store - * routines need to take that into account as well. New will allocate - * extra space for the headers. */ -DtlsMsg* DtlsMsgNew(word32 sz, void* heap) -{ - DtlsMsg* msg = NULL; - - msg = (DtlsMsg*)XMALLOC(sizeof(DtlsMsg), heap, DYNAMIC_TYPE_DTLS_MSG); - - if (msg != NULL) { - msg->buf = (byte*)XMALLOC(sz + DTLS_HANDSHAKE_HEADER_SZ, - heap, DYNAMIC_TYPE_NONE); - if (msg->buf != NULL) { - msg->next = NULL; - msg->seq = 0; - msg->sz = sz; - msg->fragSz = 0; - msg->msg = msg->buf + DTLS_HANDSHAKE_HEADER_SZ; - } - else { - XFREE(msg, heap, DYNAMIC_TYPE_DTLS_MSG); - msg = NULL; - } - } - - return msg; -} - -void DtlsMsgDelete(DtlsMsg* item, void* heap) -{ - (void)heap; - - if (item != NULL) { - if (item->buf != NULL) - XFREE(item->buf, heap, DYNAMIC_TYPE_NONE); - XFREE(item, heap, DYNAMIC_TYPE_DTLS_MSG); - } -} - - -void DtlsMsgListDelete(DtlsMsg* head, void* heap) -{ - DtlsMsg* next; - while (head) { - next = head->next; - DtlsMsgDelete(head, heap); - head = next; - } -} - - -void DtlsMsgSet(DtlsMsg* msg, word32 seq, const byte* data, byte type, - word32 fragOffset, word32 fragSz) -{ - if (msg != NULL && data != NULL && msg->fragSz <= msg->sz) { - msg->seq = seq; - msg->type = type; - msg->fragSz += fragSz; - /* If fragOffset is zero, this is either a full message that is out - * of order, or the first fragment of a fragmented message. Copy the - * handshake message header as well as the message data. */ - if (fragOffset == 0) - XMEMCPY(msg->buf, data - DTLS_HANDSHAKE_HEADER_SZ, - fragSz + DTLS_HANDSHAKE_HEADER_SZ); - else { - /* If fragOffet is non-zero, this is an additional fragment that - * needs to be copied to its location in the message buffer. Also - * copy the total size of the message over the fragment size. The - * hash routines look at a defragmented message if it had actually - * come across as a single handshake message. */ - XMEMCPY(msg->msg + fragOffset, data, fragSz); - c32to24(msg->sz, msg->msg - DTLS_HANDSHAKE_FRAG_SZ); - } - } -} - - -DtlsMsg* DtlsMsgFind(DtlsMsg* head, word32 seq) -{ - while (head != NULL && head->seq != seq) { - head = head->next; - } - return head; -} - - -DtlsMsg* DtlsMsgStore(DtlsMsg* head, word32 seq, const byte* data, - word32 dataSz, byte type, word32 fragOffset, word32 fragSz, void* heap) -{ - - /* See if seq exists in the list. If it isn't in the list, make - * a new item of size dataSz, copy fragSz bytes from data to msg->msg - * starting at offset fragOffset, and add fragSz to msg->fragSz. If - * the seq is in the list and it isn't full, copy fragSz bytes from - * data to msg->msg starting at offset fragOffset, and add fragSz to - * msg->fragSz. The new item should be inserted into the list in its - * proper position. - * - * 1. Find seq in list, or where seq should go in list. If seq not in - * list, create new item and insert into list. Either case, keep - * pointer to item. - * 2. If msg->fragSz + fragSz < sz, copy data to msg->msg at offset - * fragOffset. Add fragSz to msg->fragSz. - */ - - if (head != NULL) { - DtlsMsg* cur = DtlsMsgFind(head, seq); - if (cur == NULL) { - cur = DtlsMsgNew(dataSz, heap); - if (cur != NULL) { - DtlsMsgSet(cur, seq, data, type, fragOffset, fragSz); - head = DtlsMsgInsert(head, cur); - } - } - else { - DtlsMsgSet(cur, seq, data, type, fragOffset, fragSz); - } - } - else { - head = DtlsMsgNew(dataSz, heap); - DtlsMsgSet(head, seq, data, type, fragOffset, fragSz); - } - - return head; -} - - -/* DtlsMsgInsert() is an in-order insert. */ -DtlsMsg* DtlsMsgInsert(DtlsMsg* head, DtlsMsg* item) -{ - if (head == NULL || item->seq < head->seq) { - item->next = head; - head = item; - } - else if (head->next == NULL) { - head->next = item; - } - else { - DtlsMsg* cur = head->next; - DtlsMsg* prev = head; - while (cur) { - if (item->seq < cur->seq) { - item->next = cur; - prev->next = item; - break; - } - prev = cur; - cur = cur->next; - } - if (cur == NULL) { - prev->next = item; - } - } - - return head; -} - -#endif /* CYASSL_DTLS */ - -#ifndef NO_OLD_TLS - -ProtocolVersion MakeSSLv3(void) -{ - ProtocolVersion pv; - pv.major = SSLv3_MAJOR; - pv.minor = SSLv3_MINOR; - - return pv; -} - -#endif /* NO_OLD_TLS */ - - -#ifdef CYASSL_DTLS - -ProtocolVersion MakeDTLSv1(void) -{ - ProtocolVersion pv; - pv.major = DTLS_MAJOR; - pv.minor = DTLS_MINOR; - - return pv; -} - -ProtocolVersion MakeDTLSv1_2(void) -{ - ProtocolVersion pv; - pv.major = DTLS_MAJOR; - pv.minor = DTLSv1_2_MINOR; - - return pv; -} - -#endif /* CYASSL_DTLS */ - - - - -#ifdef USE_WINDOWS_API - - word32 LowResTimer(void) - { - static int init = 0; - static LARGE_INTEGER freq; - LARGE_INTEGER count; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = 1; - } - - QueryPerformanceCounter(&count); - - return (word32)(count.QuadPart / freq.QuadPart); - } - -#elif defined(HAVE_RTP_SYS) - - #include "rtptime.h" - - word32 LowResTimer(void) - { - return (word32)rtp_get_system_sec(); - } - - -#elif defined(MICRIUM) - - word32 LowResTimer(void) - { - NET_SECURE_OS_TICK clk; - - #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - clk = NetSecure_OS_TimeGet(); - #endif - return (word32)clk; - } - - -#elif defined(MICROCHIP_TCPIP_V5) - - word32 LowResTimer(void) - { - return (word32) TickGet(); - } - - -#elif defined(MICROCHIP_TCPIP) - - #if defined(MICROCHIP_MPLAB_HARMONY) - - #include - - word32 LowResTimer(void) - { - return (word32) SYS_TMR_TickCountGet(); - } - - #else - - word32 LowResTimer(void) - { - return (word32) SYS_TICK_Get(); - } - - #endif - -#elif defined(FREESCALE_MQX) - - word32 LowResTimer(void) - { - TIME_STRUCT mqxTime; - - _time_get_elapsed(&mqxTime); - - return (word32) mqxTime.SECONDS; - } - - -#elif defined(USER_TICKS) -#if 0 - word32 LowResTimer(void) - { - /* - write your own clock tick function if don't want time(0) - needs second accuracy but doesn't have to correlated to EPOCH - */ - } -#endif -#else /* !USE_WINDOWS_API && !HAVE_RTP_SYS && !MICRIUM && !USER_TICKS */ - - #include - - word32 LowResTimer(void) - { - return (word32)time(0); - } - - -#endif /* USE_WINDOWS_API */ - - -/* add output to md5 and sha handshake hashes, exclude record header */ -static int HashOutput(CYASSL* ssl, const byte* output, int sz, int ivSz) -{ - const byte* adj = output + RECORD_HEADER_SZ + ivSz; - sz -= RECORD_HEADER_SZ; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - adj += DTLS_RECORD_EXTRA; - sz -= DTLS_RECORD_EXTRA; - } -#endif -#ifndef NO_OLD_TLS -#ifndef NO_SHA - ShaUpdate(&ssl->hashSha, adj, sz); -#endif -#ifndef NO_MD5 - Md5Update(&ssl->hashMd5, adj, sz); -#endif -#endif - - if (IsAtLeastTLSv1_2(ssl)) { - int ret; - -#ifndef NO_SHA256 - ret = Sha256Update(&ssl->hashSha256, adj, sz); - if (ret != 0) - return ret; -#endif -#ifdef CYASSL_SHA384 - ret = Sha384Update(&ssl->hashSha384, adj, sz); - if (ret != 0) - return ret; -#endif - } - - return 0; -} - - -/* add input to md5 and sha handshake hashes, include handshake header */ -static int HashInput(CYASSL* ssl, const byte* input, int sz) -{ - const byte* adj = input - HANDSHAKE_HEADER_SZ; - sz += HANDSHAKE_HEADER_SZ; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - adj -= DTLS_HANDSHAKE_EXTRA; - sz += DTLS_HANDSHAKE_EXTRA; - } -#endif - -#ifndef NO_OLD_TLS -#ifndef NO_SHA - ShaUpdate(&ssl->hashSha, adj, sz); -#endif -#ifndef NO_MD5 - Md5Update(&ssl->hashMd5, adj, sz); -#endif -#endif - - if (IsAtLeastTLSv1_2(ssl)) { - int ret; - -#ifndef NO_SHA256 - ret = Sha256Update(&ssl->hashSha256, adj, sz); - if (ret != 0) - return ret; -#endif -#ifdef CYASSL_SHA384 - ret = Sha384Update(&ssl->hashSha384, adj, sz); - if (ret != 0) - return ret; -#endif - } - - return 0; -} - - -/* add record layer header for message */ -static void AddRecordHeader(byte* output, word32 length, byte type, CYASSL* ssl) -{ - RecordLayerHeader* rl; - - /* record layer header */ - rl = (RecordLayerHeader*)output; - rl->type = type; - rl->pvMajor = ssl->version.major; /* type and version same in each */ - rl->pvMinor = ssl->version.minor; - - if (!ssl->options.dtls) - c16toa((word16)length, rl->length); - else { -#ifdef CYASSL_DTLS - DtlsRecordLayerHeader* dtls; - - /* dtls record layer header extensions */ - dtls = (DtlsRecordLayerHeader*)output; - c16toa(ssl->keys.dtls_epoch, dtls->epoch); - c32to48(ssl->keys.dtls_sequence_number++, dtls->sequence_number); - c16toa((word16)length, dtls->length); -#endif - } -} - - -/* add handshake header for message */ -static void AddHandShakeHeader(byte* output, word32 length, byte type, - CYASSL* ssl) -{ - HandShakeHeader* hs; - (void)ssl; - - /* handshake header */ - hs = (HandShakeHeader*)output; - hs->type = type; - c32to24(length, hs->length); /* type and length same for each */ -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - DtlsHandShakeHeader* dtls; - - /* dtls handshake header extensions */ - dtls = (DtlsHandShakeHeader*)output; - c16toa(ssl->keys.dtls_handshake_number++, dtls->message_seq); - c32to24(0, dtls->fragment_offset); - c32to24(length, dtls->fragment_length); - } -#endif -} - - -/* add both headers for handshake message */ -static void AddHeaders(byte* output, word32 length, byte type, CYASSL* ssl) -{ - if (!ssl->options.dtls) { - AddRecordHeader(output, length + HANDSHAKE_HEADER_SZ, handshake, ssl); - AddHandShakeHeader(output + RECORD_HEADER_SZ, length, type, ssl); - } -#ifdef CYASSL_DTLS - else { - AddRecordHeader(output, length+DTLS_HANDSHAKE_HEADER_SZ, handshake,ssl); - AddHandShakeHeader(output + DTLS_RECORD_HEADER_SZ, length, type, ssl); - } -#endif -} - - -/* return bytes received, -1 on error */ -static int Receive(CYASSL* ssl, byte* buf, word32 sz) -{ - int recvd; - - if (ssl->ctx->CBIORecv == NULL) { - CYASSL_MSG("Your IO Recv callback is null, please set"); - return -1; - } - -retry: - recvd = ssl->ctx->CBIORecv(ssl, (char *)buf, (int)sz, ssl->IOCB_ReadCtx); - if (recvd < 0) - switch (recvd) { - case CYASSL_CBIO_ERR_GENERAL: /* general/unknown error */ - return -1; - - case CYASSL_CBIO_ERR_WANT_READ: /* want read, would block */ - return WANT_READ; - - case CYASSL_CBIO_ERR_CONN_RST: /* connection reset */ - #ifdef USE_WINDOWS_API - if (ssl->options.dtls) { - goto retry; - } - #endif - ssl->options.connReset = 1; - return -1; - - case CYASSL_CBIO_ERR_ISR: /* interrupt */ - /* see if we got our timeout */ - #ifdef CYASSL_CALLBACKS - if (ssl->toInfoOn) { - struct itimerval timeout; - getitimer(ITIMER_REAL, &timeout); - if (timeout.it_value.tv_sec == 0 && - timeout.it_value.tv_usec == 0) { - XSTRNCPY(ssl->timeoutInfo.timeoutName, - "recv() timeout", MAX_TIMEOUT_NAME_SZ); - CYASSL_MSG("Got our timeout"); - return WANT_READ; - } - } - #endif - goto retry; - - case CYASSL_CBIO_ERR_CONN_CLOSE: /* peer closed connection */ - ssl->options.isClosed = 1; - return -1; - - case CYASSL_CBIO_ERR_TIMEOUT: -#ifdef CYASSL_DTLS - if (DtlsPoolTimeout(ssl) == 0 && DtlsPoolSend(ssl) == 0) - goto retry; - else -#endif - return -1; - - default: - return recvd; - } - - return recvd; -} - - -/* Switch dynamic output buffer back to static, buffer is assumed clear */ -void ShrinkOutputBuffer(CYASSL* ssl) -{ - CYASSL_MSG("Shrinking output buffer\n"); - XFREE(ssl->buffers.outputBuffer.buffer - ssl->buffers.outputBuffer.offset, - ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); - ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer; - ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN; - ssl->buffers.outputBuffer.dynamicFlag = 0; - ssl->buffers.outputBuffer.offset = 0; -} - - -/* Switch dynamic input buffer back to static, keep any remaining input */ -/* forced free means cleaning up */ -void ShrinkInputBuffer(CYASSL* ssl, int forcedFree) -{ - int usedLength = ssl->buffers.inputBuffer.length - - ssl->buffers.inputBuffer.idx; - if (!forcedFree && usedLength > STATIC_BUFFER_LEN) - return; - - CYASSL_MSG("Shrinking input buffer\n"); - - if (!forcedFree && usedLength) - XMEMCPY(ssl->buffers.inputBuffer.staticBuffer, - ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx, - usedLength); - - XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset, - ssl->heap, DYNAMIC_TYPE_IN_BUFFER); - ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer; - ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN; - ssl->buffers.inputBuffer.dynamicFlag = 0; - ssl->buffers.inputBuffer.offset = 0; - ssl->buffers.inputBuffer.idx = 0; - ssl->buffers.inputBuffer.length = usedLength; -} - - -int SendBuffered(CYASSL* ssl) -{ - if (ssl->ctx->CBIOSend == NULL) { - CYASSL_MSG("Your IO Send callback is null, please set"); - return SOCKET_ERROR_E; - } - - while (ssl->buffers.outputBuffer.length > 0) { - int sent = ssl->ctx->CBIOSend(ssl, - (char*)ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.idx, - (int)ssl->buffers.outputBuffer.length, - ssl->IOCB_WriteCtx); - if (sent < 0) { - switch (sent) { - - case CYASSL_CBIO_ERR_WANT_WRITE: /* would block */ - return WANT_WRITE; - - case CYASSL_CBIO_ERR_CONN_RST: /* connection reset */ - ssl->options.connReset = 1; - break; - - case CYASSL_CBIO_ERR_ISR: /* interrupt */ - /* see if we got our timeout */ - #ifdef CYASSL_CALLBACKS - if (ssl->toInfoOn) { - struct itimerval timeout; - getitimer(ITIMER_REAL, &timeout); - if (timeout.it_value.tv_sec == 0 && - timeout.it_value.tv_usec == 0) { - XSTRNCPY(ssl->timeoutInfo.timeoutName, - "send() timeout", MAX_TIMEOUT_NAME_SZ); - CYASSL_MSG("Got our timeout"); - return WANT_WRITE; - } - } - #endif - continue; - - case CYASSL_CBIO_ERR_CONN_CLOSE: /* epipe / conn closed */ - ssl->options.connReset = 1; /* treat same as reset */ - break; - - default: - return SOCKET_ERROR_E; - } - - return SOCKET_ERROR_E; - } - - ssl->buffers.outputBuffer.idx += sent; - ssl->buffers.outputBuffer.length -= sent; - } - - ssl->buffers.outputBuffer.idx = 0; - - if (ssl->buffers.outputBuffer.dynamicFlag) - ShrinkOutputBuffer(ssl); - - return 0; -} - - -/* Grow the output buffer */ -static INLINE int GrowOutputBuffer(CYASSL* ssl, int size) -{ - byte* tmp; - byte hdrSz = ssl->options.dtls ? DTLS_RECORD_HEADER_SZ : - RECORD_HEADER_SZ; - byte align = CYASSL_GENERAL_ALIGNMENT; - /* the encrypted data will be offset from the front of the buffer by - the header, if the user wants encrypted alignment they need - to define their alignment requirement */ - - if (align) { - while (align < hdrSz) - align *= 2; - } - - tmp = (byte*) XMALLOC(size + ssl->buffers.outputBuffer.length + align, - ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); - CYASSL_MSG("growing output buffer\n"); - - if (!tmp) return MEMORY_E; - if (align) - tmp += align - hdrSz; - - if (ssl->buffers.outputBuffer.length) - XMEMCPY(tmp, ssl->buffers.outputBuffer.buffer, - ssl->buffers.outputBuffer.length); - - if (ssl->buffers.outputBuffer.dynamicFlag) - XFREE(ssl->buffers.outputBuffer.buffer - - ssl->buffers.outputBuffer.offset, ssl->heap, - DYNAMIC_TYPE_OUT_BUFFER); - ssl->buffers.outputBuffer.dynamicFlag = 1; - if (align) - ssl->buffers.outputBuffer.offset = align - hdrSz; - else - ssl->buffers.outputBuffer.offset = 0; - ssl->buffers.outputBuffer.buffer = tmp; - ssl->buffers.outputBuffer.bufferSize = size + - ssl->buffers.outputBuffer.length; - return 0; -} - - -/* Grow the input buffer, should only be to read cert or big app data */ -int GrowInputBuffer(CYASSL* ssl, int size, int usedLength) -{ - byte* tmp; - byte hdrSz = DTLS_RECORD_HEADER_SZ; - byte align = ssl->options.dtls ? CYASSL_GENERAL_ALIGNMENT : 0; - /* the encrypted data will be offset from the front of the buffer by - the dtls record header, if the user wants encrypted alignment they need - to define their alignment requirement. in tls we read record header - to get size of record and put actual data back at front, so don't need */ - - if (align) { - while (align < hdrSz) - align *= 2; - } - tmp = (byte*) XMALLOC(size + usedLength + align, ssl->heap, - DYNAMIC_TYPE_IN_BUFFER); - CYASSL_MSG("growing input buffer\n"); - - if (!tmp) return MEMORY_E; - if (align) - tmp += align - hdrSz; - - if (usedLength) - XMEMCPY(tmp, ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, usedLength); - - if (ssl->buffers.inputBuffer.dynamicFlag) - XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset, - ssl->heap,DYNAMIC_TYPE_IN_BUFFER); - - ssl->buffers.inputBuffer.dynamicFlag = 1; - if (align) - ssl->buffers.inputBuffer.offset = align - hdrSz; - else - ssl->buffers.inputBuffer.offset = 0; - ssl->buffers.inputBuffer.buffer = tmp; - ssl->buffers.inputBuffer.bufferSize = size + usedLength; - ssl->buffers.inputBuffer.idx = 0; - ssl->buffers.inputBuffer.length = usedLength; - - return 0; -} - - -/* check available size into output buffer, make room if needed */ -int CheckAvailableSize(CYASSL *ssl, int size) -{ - if (ssl->buffers.outputBuffer.bufferSize - ssl->buffers.outputBuffer.length - < (word32)size) { - if (GrowOutputBuffer(ssl, size) < 0) - return MEMORY_E; - } - - return 0; -} - - -/* do all verify and sanity checks on record header */ -static int GetRecordHeader(CYASSL* ssl, const byte* input, word32* inOutIdx, - RecordLayerHeader* rh, word16 *size) -{ - if (!ssl->options.dtls) { - XMEMCPY(rh, input + *inOutIdx, RECORD_HEADER_SZ); - *inOutIdx += RECORD_HEADER_SZ; - ato16(rh->length, size); - } - else { -#ifdef CYASSL_DTLS - /* type and version in same sport */ - XMEMCPY(rh, input + *inOutIdx, ENUM_LEN + VERSION_SZ); - *inOutIdx += ENUM_LEN + VERSION_SZ; - ato16(input + *inOutIdx, &ssl->keys.dtls_state.curEpoch); - *inOutIdx += 4; /* advance past epoch, skip first 2 seq bytes for now */ - ato32(input + *inOutIdx, &ssl->keys.dtls_state.curSeq); - *inOutIdx += 4; /* advance past rest of seq */ - ato16(input + *inOutIdx, size); - *inOutIdx += LENGTH_SZ; -#endif - } - - /* catch version mismatch */ - if (rh->pvMajor != ssl->version.major || rh->pvMinor != ssl->version.minor){ - if (ssl->options.side == CYASSL_SERVER_END && - ssl->options.acceptState == ACCEPT_BEGIN) - CYASSL_MSG("Client attempting to connect with different version"); - else if (ssl->options.side == CYASSL_CLIENT_END && - ssl->options.downgrade && - ssl->options.connectState < FIRST_REPLY_DONE) - CYASSL_MSG("Server attempting to accept with different version"); - else { - CYASSL_MSG("SSL version error"); - return VERSION_ERROR; /* only use requested version */ - } - } - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if (DtlsCheckWindow(&ssl->keys.dtls_state) != 1) - return SEQUENCE_ERROR; - } -#endif - - /* record layer length check */ -#ifdef HAVE_MAX_FRAGMENT - if (*size > (ssl->max_fragment + MAX_COMP_EXTRA + MAX_MSG_EXTRA)) - return LENGTH_ERROR; -#else - if (*size > (MAX_RECORD_SIZE + MAX_COMP_EXTRA + MAX_MSG_EXTRA)) - return LENGTH_ERROR; -#endif - - /* verify record type here as well */ - switch (rh->type) { - case handshake: - case change_cipher_spec: - case application_data: - case alert: - break; - case no_type: - default: - CYASSL_MSG("Unknown Record Type"); - return UNKNOWN_RECORD_TYPE; - } - - /* haven't decrypted this record yet */ - ssl->keys.decryptedCur = 0; - - return 0; -} - - -static int GetHandShakeHeader(CYASSL* ssl, const byte* input, word32* inOutIdx, - byte *type, word32 *size) -{ - const byte *ptr = input + *inOutIdx; - (void)ssl; - *inOutIdx += HANDSHAKE_HEADER_SZ; - - *type = ptr[0]; - c24to32(&ptr[1], size); - - return 0; -} - - -#ifdef CYASSL_DTLS -static int GetDtlsHandShakeHeader(CYASSL* ssl, const byte* input, - word32* inOutIdx, byte *type, word32 *size, - word32 *fragOffset, word32 *fragSz) -{ - word32 idx = *inOutIdx; - - *inOutIdx += HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA; - - *type = input[idx++]; - c24to32(input + idx, size); - idx += BYTE3_LEN; - - ato16(input + idx, &ssl->keys.dtls_peer_handshake_number); - idx += DTLS_HANDSHAKE_SEQ_SZ; - - c24to32(input + idx, fragOffset); - idx += DTLS_HANDSHAKE_FRAG_SZ; - c24to32(input + idx, fragSz); - - return 0; -} -#endif - - -#ifndef NO_OLD_TLS -/* fill with MD5 pad size since biggest required */ -static const byte PAD1[PAD_MD5] = - { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - }; -static const byte PAD2[PAD_MD5] = - { 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c - }; - -/* calculate MD5 hash for finished */ -static void BuildMD5(CYASSL* ssl, Hashes* hashes, const byte* sender) -{ - byte md5_result[MD5_DIGEST_SIZE]; - - /* make md5 inner */ - Md5Update(&ssl->hashMd5, sender, SIZEOF_SENDER); - Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); - Md5Update(&ssl->hashMd5, PAD1, PAD_MD5); - Md5Final(&ssl->hashMd5, md5_result); - - /* make md5 outer */ - Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); - Md5Update(&ssl->hashMd5, PAD2, PAD_MD5); - Md5Update(&ssl->hashMd5, md5_result, MD5_DIGEST_SIZE); - - Md5Final(&ssl->hashMd5, hashes->md5); -} - - -/* calculate SHA hash for finished */ -static void BuildSHA(CYASSL* ssl, Hashes* hashes, const byte* sender) -{ - byte sha_result[SHA_DIGEST_SIZE]; - - /* make sha inner */ - ShaUpdate(&ssl->hashSha, sender, SIZEOF_SENDER); - ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); - ShaUpdate(&ssl->hashSha, PAD1, PAD_SHA); - ShaFinal(&ssl->hashSha, sha_result); - - /* make sha outer */ - ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); - ShaUpdate(&ssl->hashSha, PAD2, PAD_SHA); - ShaUpdate(&ssl->hashSha, sha_result, SHA_DIGEST_SIZE); - - ShaFinal(&ssl->hashSha, hashes->sha); -} -#endif - - -static int BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) -{ - /* store current states, building requires get_digest which resets state */ -#ifndef NO_OLD_TLS -#ifndef NO_MD5 - Md5 md5 = ssl->hashMd5; -#endif -#ifndef NO_SHA - Sha sha = ssl->hashSha; -#endif -#endif -#ifndef NO_SHA256 - Sha256 sha256 = ssl->hashSha256; -#endif -#ifdef CYASSL_SHA384 - Sha384 sha384 = ssl->hashSha384; -#endif - - int ret = 0; - -#ifndef NO_TLS - if (ssl->options.tls) { - ret = BuildTlsFinished(ssl, hashes, sender); - } -#endif -#ifndef NO_OLD_TLS - if (!ssl->options.tls) { - BuildMD5(ssl, hashes, sender); - BuildSHA(ssl, hashes, sender); - } -#endif - - /* restore */ -#ifndef NO_OLD_TLS - #ifndef NO_MD5 - ssl->hashMd5 = md5; - #endif - #ifndef NO_SHA - ssl->hashSha = sha; - #endif -#endif - if (IsAtLeastTLSv1_2(ssl)) { - #ifndef NO_SHA256 - ssl->hashSha256 = sha256; - #endif - #ifdef CYASSL_SHA384 - ssl->hashSha384 = sha384; - #endif - } - - return ret; -} - - -#ifndef NO_CERTS - - -/* Match names with wildcards, each wildcard can represent a single name - component or fragment but not mulitple names, i.e., - *.z.com matches y.z.com but not x.y.z.com - - return 1 on success */ -static int MatchDomainName(const char* pattern, int len, const char* str) -{ - char p, s; - - if (pattern == NULL || str == NULL || len <= 0) - return 0; - - while (len > 0) { - - p = (char)XTOLOWER(*pattern++); - if (p == 0) - break; - - if (p == '*') { - while (--len > 0 && (p = (char)XTOLOWER(*pattern++)) == '*') - ; - - if (len == 0) - p = '\0'; - - while ( (s = (char)XTOLOWER(*str)) != '\0') { - if (s == p) - break; - if (s == '.') - return 0; - str++; - } - } - else { - if (p != (char)XTOLOWER(*str)) - return 0; - } - - if (*str != '\0') - str++; - - if (len > 0) - len--; - } - - return *str == '\0'; -} - - -/* try to find an altName match to domain, return 1 on success */ -static int CheckAltNames(DecodedCert* dCert, char* domain) -{ - int match = 0; - DNS_entry* altName = NULL; - - CYASSL_MSG("Checking AltNames"); - - if (dCert) - altName = dCert->altNames; - - while (altName) { - CYASSL_MSG(" individual AltName check"); - - if (MatchDomainName(altName->name,(int)XSTRLEN(altName->name), domain)){ - match = 1; - break; - } - - altName = altName->next; - } - - return match; -} - - -#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) - -/* Copy parts X509 needs from Decoded cert, 0 on success */ -int CopyDecodedToX509(CYASSL_X509* x509, DecodedCert* dCert) -{ - int ret = 0; - - if (x509 == NULL || dCert == NULL) - return BAD_FUNC_ARG; - - x509->version = dCert->version + 1; - - XSTRNCPY(x509->issuer.name, dCert->issuer, ASN_NAME_MAX); - x509->issuer.name[ASN_NAME_MAX - 1] = '\0'; - x509->issuer.sz = (int)XSTRLEN(x509->issuer.name) + 1; -#ifdef OPENSSL_EXTRA - if (dCert->issuerName.fullName != NULL) { - XMEMCPY(&x509->issuer.fullName, - &dCert->issuerName, sizeof(DecodedName)); - x509->issuer.fullName.fullName = (char*)XMALLOC( - dCert->issuerName.fullNameLen, NULL, DYNAMIC_TYPE_X509); - if (x509->issuer.fullName.fullName != NULL) - XMEMCPY(x509->issuer.fullName.fullName, - dCert->issuerName.fullName, dCert->issuerName.fullNameLen); - } -#endif /* OPENSSL_EXTRA */ - - XSTRNCPY(x509->subject.name, dCert->subject, ASN_NAME_MAX); - x509->subject.name[ASN_NAME_MAX - 1] = '\0'; - x509->subject.sz = (int)XSTRLEN(x509->subject.name) + 1; -#ifdef OPENSSL_EXTRA - if (dCert->subjectName.fullName != NULL) { - XMEMCPY(&x509->subject.fullName, - &dCert->subjectName, sizeof(DecodedName)); - x509->subject.fullName.fullName = (char*)XMALLOC( - dCert->subjectName.fullNameLen, NULL, DYNAMIC_TYPE_X509); - if (x509->subject.fullName.fullName != NULL) - XMEMCPY(x509->subject.fullName.fullName, - dCert->subjectName.fullName, dCert->subjectName.fullNameLen); - } -#endif /* OPENSSL_EXTRA */ - - XMEMCPY(x509->serial, dCert->serial, EXTERNAL_SERIAL_SIZE); - x509->serialSz = dCert->serialSz; - if (dCert->subjectCNLen < ASN_NAME_MAX) { - XMEMCPY(x509->subjectCN, dCert->subjectCN, dCert->subjectCNLen); - x509->subjectCN[dCert->subjectCNLen] = '\0'; - } - else - x509->subjectCN[0] = '\0'; - -#ifdef CYASSL_SEP - { - int minSz = min(dCert->deviceTypeSz, EXTERNAL_SERIAL_SIZE); - if (minSz > 0) { - x509->deviceTypeSz = minSz; - XMEMCPY(x509->deviceType, dCert->deviceType, minSz); - } - else - x509->deviceTypeSz = 0; - minSz = min(dCert->hwTypeSz, EXTERNAL_SERIAL_SIZE); - if (minSz != 0) { - x509->hwTypeSz = minSz; - XMEMCPY(x509->hwType, dCert->hwType, minSz); - } - else - x509->hwTypeSz = 0; - minSz = min(dCert->hwSerialNumSz, EXTERNAL_SERIAL_SIZE); - if (minSz != 0) { - x509->hwSerialNumSz = minSz; - XMEMCPY(x509->hwSerialNum, dCert->hwSerialNum, minSz); - } - else - x509->hwSerialNumSz = 0; - } -#endif /* CYASSL_SEP */ - { - int minSz = min(dCert->beforeDateLen, MAX_DATE_SZ); - if (minSz != 0) { - x509->notBeforeSz = minSz; - XMEMCPY(x509->notBefore, dCert->beforeDate, minSz); - } - else - x509->notBeforeSz = 0; - minSz = min(dCert->afterDateLen, MAX_DATE_SZ); - if (minSz != 0) { - x509->notAfterSz = minSz; - XMEMCPY(x509->notAfter, dCert->afterDate, minSz); - } - else - x509->notAfterSz = 0; - } - - if (dCert->publicKey != NULL && dCert->pubKeySize != 0) { - x509->pubKey.buffer = (byte*)XMALLOC( - dCert->pubKeySize, NULL, DYNAMIC_TYPE_PUBLIC_KEY); - if (x509->pubKey.buffer != NULL) { - x509->pubKeyOID = dCert->keyOID; - x509->pubKey.length = dCert->pubKeySize; - XMEMCPY(x509->pubKey.buffer, dCert->publicKey, dCert->pubKeySize); - } - else - ret = MEMORY_E; - } - - if (dCert->signature != NULL && dCert->sigLength != 0) { - x509->sig.buffer = (byte*)XMALLOC( - dCert->sigLength, NULL, DYNAMIC_TYPE_SIGNATURE); - if (x509->sig.buffer == NULL) { - ret = MEMORY_E; - } - else { - XMEMCPY(x509->sig.buffer, dCert->signature, dCert->sigLength); - x509->sig.length = dCert->sigLength; - x509->sigOID = dCert->signatureOID; - } - } - - /* store cert for potential retrieval */ - x509->derCert.buffer = (byte*)XMALLOC(dCert->maxIdx, NULL, - DYNAMIC_TYPE_CERT); - if (x509->derCert.buffer == NULL) { - ret = MEMORY_E; - } - else { - XMEMCPY(x509->derCert.buffer, dCert->source, dCert->maxIdx); - x509->derCert.length = dCert->maxIdx; - } - - x509->altNames = dCert->altNames; - dCert->altNames = NULL; /* takes ownership */ - x509->altNamesNext = x509->altNames; /* index hint */ - - x509->isCa = dCert->isCA; -#ifdef OPENSSL_EXTRA - x509->pathLength = dCert->pathLength; - x509->keyUsage = dCert->extKeyUsage; - - x509->basicConstSet = dCert->extBasicConstSet; - x509->basicConstCrit = dCert->extBasicConstCrit; - x509->basicConstPlSet = dCert->extBasicConstPlSet; - x509->subjAltNameSet = dCert->extSubjAltNameSet; - x509->subjAltNameCrit = dCert->extSubjAltNameCrit; - x509->authKeyIdSet = dCert->extAuthKeyIdSet; - x509->authKeyIdCrit = dCert->extAuthKeyIdCrit; - if (dCert->extAuthKeyIdSrc != NULL && dCert->extAuthKeyIdSz != 0) { - x509->authKeyId = (byte*)XMALLOC(dCert->extAuthKeyIdSz, NULL, 0); - if (x509->authKeyId != NULL) { - XMEMCPY(x509->authKeyId, - dCert->extAuthKeyIdSrc, dCert->extAuthKeyIdSz); - x509->authKeyIdSz = dCert->extAuthKeyIdSz; - } - else - ret = MEMORY_E; - } - x509->subjKeyIdSet = dCert->extSubjKeyIdSet; - x509->subjKeyIdCrit = dCert->extSubjKeyIdCrit; - if (dCert->extSubjKeyIdSrc != NULL && dCert->extSubjKeyIdSz != 0) { - x509->subjKeyId = (byte*)XMALLOC(dCert->extSubjKeyIdSz, NULL, 0); - if (x509->subjKeyId != NULL) { - XMEMCPY(x509->subjKeyId, - dCert->extSubjKeyIdSrc, dCert->extSubjKeyIdSz); - x509->subjKeyIdSz = dCert->extSubjKeyIdSz; - } - else - ret = MEMORY_E; - } - x509->keyUsageSet = dCert->extKeyUsageSet; - x509->keyUsageCrit = dCert->extKeyUsageCrit; - #ifdef CYASSL_SEP - x509->certPolicySet = dCert->extCertPolicySet; - x509->certPolicyCrit = dCert->extCertPolicyCrit; - #endif /* CYASSL_SEP */ -#endif /* OPENSSL_EXTRA */ -#ifdef HAVE_ECC - x509->pkCurveOID = dCert->pkCurveOID; -#endif /* HAVE_ECC */ - - return ret; -} - -#endif /* KEEP_PEER_CERT || SESSION_CERTS */ - - -static int DoCertificate(CYASSL* ssl, byte* input, word32* inOutIdx, - word32 size) -{ - word32 listSz, begin = *inOutIdx; - int ret = 0; - int anyError = 0; - int totalCerts = 0; /* number of certs in certs buffer */ - int count; - char domain[ASN_NAME_MAX]; - buffer certs[MAX_CHAIN_DEPTH]; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("Certificate", &ssl->handShakeInfo); - if (ssl->toInfoOn) AddLateName("Certificate", &ssl->timeoutInfo); - #endif - - if ((*inOutIdx - begin) + OPAQUE24_LEN > size) - return BUFFER_ERROR; - - c24to32(input + *inOutIdx, &listSz); - *inOutIdx += OPAQUE24_LEN; - -#ifdef HAVE_MAX_FRAGMENT - if (listSz > ssl->max_fragment) - return BUFFER_E; -#else - if (listSz > MAX_RECORD_SIZE) - return BUFFER_E; -#endif - - if ((*inOutIdx - begin) + listSz != size) - return BUFFER_ERROR; - - CYASSL_MSG("Loading peer's cert chain"); - /* first put cert chain into buffer so can verify top down - we're sent bottom up */ - while (listSz) { - word32 certSz; - - if (totalCerts >= MAX_CHAIN_DEPTH) - return MAX_CHAIN_ERROR; - - if ((*inOutIdx - begin) + OPAQUE24_LEN > size) - return BUFFER_ERROR; - - c24to32(input + *inOutIdx, &certSz); - *inOutIdx += OPAQUE24_LEN; - - if ((*inOutIdx - begin) + certSz > size) - return BUFFER_ERROR; - - certs[totalCerts].length = certSz; - certs[totalCerts].buffer = input + *inOutIdx; - -#ifdef SESSION_CERTS - if (ssl->session.chain.count < MAX_CHAIN_DEPTH && - certSz < MAX_X509_SIZE) { - ssl->session.chain.certs[ssl->session.chain.count].length = certSz; - XMEMCPY(ssl->session.chain.certs[ssl->session.chain.count].buffer, - input + *inOutIdx, certSz); - ssl->session.chain.count++; - } else { - CYASSL_MSG("Couldn't store chain cert for session"); - } -#endif - - *inOutIdx += certSz; - listSz -= certSz + CERT_HEADER_SZ; - - totalCerts++; - CYASSL_MSG(" Put another cert into chain"); - } - - count = totalCerts; - - /* verify up to peer's first */ - while (count > 1) { - buffer myCert = certs[count - 1]; - DecodedCert dCert; - byte* subjectHash; - - InitDecodedCert(&dCert, myCert.buffer, myCert.length, ssl->heap); - ret = ParseCertRelative(&dCert, CERT_TYPE, !ssl->options.verifyNone, - ssl->ctx->cm); - #ifndef NO_SKID - subjectHash = dCert.extSubjKeyId; - #else - subjectHash = dCert.subjectHash; - #endif - - if (ret == 0 && dCert.isCA == 0) { - CYASSL_MSG("Chain cert is not a CA, not adding as one"); - } - else if (ret == 0 && ssl->options.verifyNone) { - CYASSL_MSG("Chain cert not verified by option, not adding as CA"); - } - else if (ret == 0 && !AlreadySigner(ssl->ctx->cm, subjectHash)) { - buffer add; - add.length = myCert.length; - add.buffer = (byte*)XMALLOC(myCert.length, ssl->heap, - DYNAMIC_TYPE_CA); - CYASSL_MSG("Adding CA from chain"); - - if (add.buffer == NULL) - return MEMORY_E; - XMEMCPY(add.buffer, myCert.buffer, myCert.length); - - ret = AddCA(ssl->ctx->cm, add, CYASSL_CHAIN_CA, - ssl->ctx->verifyPeer); - if (ret == 1) ret = 0; /* SSL_SUCCESS for external */ - } - else if (ret != 0) { - CYASSL_MSG("Failed to verify CA from chain"); - } - else { - CYASSL_MSG("Verified CA from chain and already had it"); - } - -#ifdef HAVE_CRL - if (ret == 0 && ssl->ctx->cm->crlEnabled && ssl->ctx->cm->crlCheckAll) { - CYASSL_MSG("Doing Non Leaf CRL check"); - ret = CheckCertCRL(ssl->ctx->cm->crl, &dCert); - - if (ret != 0) { - CYASSL_MSG("\tCRL check not ok"); - } - } -#endif /* HAVE_CRL */ - - if (ret != 0 && anyError == 0) - anyError = ret; /* save error from last time */ - - FreeDecodedCert(&dCert); - count--; - } - - /* peer's, may not have one if blank client cert sent by TLSv1.2 */ - if (count) { - buffer myCert = certs[0]; - DecodedCert dCert; - int fatal = 0; - - CYASSL_MSG("Verifying Peer's cert"); - - InitDecodedCert(&dCert, myCert.buffer, myCert.length, ssl->heap); - ret = ParseCertRelative(&dCert, CERT_TYPE, !ssl->options.verifyNone, - ssl->ctx->cm); - if (ret == 0) { - CYASSL_MSG("Verified Peer's cert"); - fatal = 0; - } - else if (ret == ASN_PARSE_E) { - CYASSL_MSG("Got Peer cert ASN PARSE ERROR, fatal"); - fatal = 1; - } - else { - CYASSL_MSG("Failed to verify Peer's cert"); - if (ssl->verifyCallback) { - CYASSL_MSG("\tCallback override available, will continue"); - fatal = 0; - } - else { - CYASSL_MSG("\tNo callback override available, fatal"); - fatal = 1; - } - } - -#ifdef HAVE_OCSP - if (fatal == 0 && ssl->ctx->cm->ocspEnabled) { - ret = CheckCertOCSP(ssl->ctx->cm->ocsp, &dCert); - if (ret != 0) { - CYASSL_MSG("\tOCSP Lookup not ok"); - fatal = 0; - } - } -#endif - -#ifdef HAVE_CRL - if (fatal == 0 && ssl->ctx->cm->crlEnabled) { - int doCrlLookup = 1; - - #ifdef HAVE_OCSP - if (ssl->ctx->cm->ocspEnabled) { - doCrlLookup = (ret == OCSP_CERT_UNKNOWN); - } - #endif /* HAVE_OCSP */ - - if (doCrlLookup) { - CYASSL_MSG("Doing Leaf CRL check"); - ret = CheckCertCRL(ssl->ctx->cm->crl, &dCert); - - if (ret != 0) { - CYASSL_MSG("\tCRL check not ok"); - fatal = 0; - } - } - } - -#endif /* HAVE_CRL */ - -#ifdef KEEP_PEER_CERT - { - /* set X509 format for peer cert even if fatal */ - int copyRet = CopyDecodedToX509(&ssl->peerCert, &dCert); - if (copyRet == MEMORY_E) - fatal = 1; - } -#endif - -#ifndef IGNORE_KEY_EXTENSIONS - if (dCert.extKeyUsageSet) { - if ((ssl->specs.kea == rsa_kea) && - (dCert.extKeyUsage & KEYUSE_KEY_ENCIPHER) == 0) { - ret = KEYUSE_ENCIPHER_E; - } - if ((ssl->specs.sig_algo == rsa_sa_algo || - ssl->specs.sig_algo == ecc_dsa_sa_algo) && - (dCert.extKeyUsage & KEYUSE_DIGITAL_SIG) == 0) { - CYASSL_MSG("KeyUse Digital Sig not set"); - ret = KEYUSE_SIGNATURE_E; - } - } - - if (dCert.extExtKeyUsageSet) { - if (ssl->options.side == CYASSL_CLIENT_END) { - if ((dCert.extExtKeyUsage & - (EXTKEYUSE_ANY | EXTKEYUSE_SERVER_AUTH)) == 0) { - CYASSL_MSG("ExtKeyUse Server Auth not set"); - ret = EXTKEYUSE_AUTH_E; - } - } - else { - if ((dCert.extExtKeyUsage & - (EXTKEYUSE_ANY | EXTKEYUSE_CLIENT_AUTH)) == 0) { - CYASSL_MSG("ExtKeyUse Client Auth not set"); - ret = EXTKEYUSE_AUTH_E; - } - } - } -#endif /* IGNORE_KEY_EXTENSIONS */ - - if (fatal) { - FreeDecodedCert(&dCert); - ssl->error = ret; - return ret; - } - ssl->options.havePeerCert = 1; - - /* store for callback use */ - if (dCert.subjectCNLen < ASN_NAME_MAX) { - XMEMCPY(domain, dCert.subjectCN, dCert.subjectCNLen); - domain[dCert.subjectCNLen] = '\0'; - } - else - domain[0] = '\0'; - - if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) { - if (MatchDomainName(dCert.subjectCN, dCert.subjectCNLen, - (char*)ssl->buffers.domainName.buffer) == 0) { - CYASSL_MSG("DomainName match on common name failed"); - if (CheckAltNames(&dCert, - (char*)ssl->buffers.domainName.buffer) == 0 ) { - CYASSL_MSG("DomainName match on alt names failed too"); - ret = DOMAIN_NAME_MISMATCH; /* try to get peer key still */ - } - } - } - - /* decode peer key */ - switch (dCert.keyOID) { - #ifndef NO_RSA - case RSAk: - { - word32 idx = 0; - if (RsaPublicKeyDecode(dCert.publicKey, &idx, - ssl->peerRsaKey, dCert.pubKeySize) != 0) { - ret = PEER_KEY_ERROR; - } - else { - ssl->peerRsaKeyPresent = 1; - #ifdef HAVE_PK_CALLBACKS - #ifndef NO_RSA - ssl->buffers.peerRsaKey.buffer = - XMALLOC(dCert.pubKeySize, - ssl->heap, DYNAMIC_TYPE_RSA); - if (ssl->buffers.peerRsaKey.buffer == NULL) - ret = MEMORY_ERROR; - else { - XMEMCPY(ssl->buffers.peerRsaKey.buffer, - dCert.publicKey, dCert.pubKeySize); - ssl->buffers.peerRsaKey.length = - dCert.pubKeySize; - } - #endif /* NO_RSA */ - #endif /*HAVE_PK_CALLBACKS */ - } - } - break; - #endif /* NO_RSA */ - #ifdef HAVE_NTRU - case NTRUk: - { - if (dCert.pubKeySize > sizeof(ssl->peerNtruKey)) { - ret = PEER_KEY_ERROR; - } - else { - XMEMCPY(ssl->peerNtruKey, dCert.publicKey, dCert.pubKeySize); - ssl->peerNtruKeyLen = (word16)dCert.pubKeySize; - ssl->peerNtruKeyPresent = 1; - } - } - break; - #endif /* HAVE_NTRU */ - #ifdef HAVE_ECC - case ECDSAk: - { - if (ecc_import_x963(dCert.publicKey, dCert.pubKeySize, - ssl->peerEccDsaKey) != 0) { - ret = PEER_KEY_ERROR; - } - else { - ssl->peerEccDsaKeyPresent = 1; - #ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ssl->buffers.peerEccDsaKey.buffer = - XMALLOC(dCert.pubKeySize, - ssl->heap, DYNAMIC_TYPE_ECC); - if (ssl->buffers.peerEccDsaKey.buffer == NULL) - ret = MEMORY_ERROR; - else { - XMEMCPY(ssl->buffers.peerEccDsaKey.buffer, - dCert.publicKey, dCert.pubKeySize); - ssl->buffers.peerEccDsaKey.length = - dCert.pubKeySize; - } - #endif /* HAVE_ECC */ - #endif /*HAVE_PK_CALLBACKS */ - } - } - break; - #endif /* HAVE_ECC */ - default: - break; - } - - FreeDecodedCert(&dCert); - } - - if (anyError != 0 && ret == 0) - ret = anyError; - - if (ret == 0 && ssl->options.side == CYASSL_CLIENT_END) - ssl->options.serverState = SERVER_CERT_COMPLETE; - - if (ret != 0) { - if (!ssl->options.verifyNone) { - int why = bad_certificate; - if (ret == ASN_AFTER_DATE_E || ret == ASN_BEFORE_DATE_E) - why = certificate_expired; - if (ssl->verifyCallback) { - int ok; - CYASSL_X509_STORE_CTX store; - - store.error = ret; - store.error_depth = totalCerts; - store.discardSessionCerts = 0; - store.domain = domain; - store.userCtx = ssl->verifyCbCtx; -#ifdef KEEP_PEER_CERT - store.current_cert = &ssl->peerCert; -#else - store.current_cert = NULL; -#endif -#ifdef FORTRESS - store.ex_data = ssl; -#endif - ok = ssl->verifyCallback(0, &store); - if (ok) { - CYASSL_MSG("Verify callback overriding error!"); - ret = 0; - } - #ifdef SESSION_CERTS - if (store.discardSessionCerts) { - CYASSL_MSG("Verify callback requested discard sess certs"); - ssl->session.chain.count = 0; - } - #endif - } - if (ret != 0) { - SendAlert(ssl, alert_fatal, why); /* try to send */ - ssl->options.isClosed = 1; - } - } - ssl->error = ret; - } -#ifdef CYASSL_ALWAYS_VERIFY_CB - else { - if (ssl->verifyCallback) { - int ok; - CYASSL_X509_STORE_CTX store; - - store.error = ret; - store.error_depth = totalCerts; - store.discardSessionCerts = 0; - store.domain = domain; - store.userCtx = ssl->verifyCbCtx; -#ifdef KEEP_PEER_CERT - store.current_cert = &ssl->peerCert; -#endif - store.ex_data = ssl; - - ok = ssl->verifyCallback(1, &store); - if (!ok) { - CYASSL_MSG("Verify callback overriding valid certificate!"); - ret = -1; - SendAlert(ssl, alert_fatal, bad_certificate); - ssl->options.isClosed = 1; - } - #ifdef SESSION_CERTS - if (store.discardSessionCerts) { - CYASSL_MSG("Verify callback requested discard sess certs"); - ssl->session.chain.count = 0; - } - #endif - } - } -#endif - - return ret; -} - -#endif /* !NO_CERTS */ - - -static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 size, word32 totalSz) -{ - int ret = 0; - - if (size) /* must be 0 */ - return BUFFER_ERROR; - - if (ssl->keys.encryptionOn) { - byte verify[MAX_DIGEST_SIZE]; - int padSz = ssl->keys.encryptSz - HANDSHAKE_HEADER_SZ - - ssl->specs.hash_size; - - ret = ssl->hmac(ssl, verify, input + *inOutIdx - HANDSHAKE_HEADER_SZ, - HANDSHAKE_HEADER_SZ, handshake, 1); - if (ret != 0) - return ret; - - if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) - padSz -= ssl->specs.block_size; - - /* access beyond input + size should be checked against totalSz */ - if ((word32) (*inOutIdx + ssl->specs.hash_size + padSz) > totalSz) - return INCOMPLETE_DATA; - - /* verify */ - if (XMEMCMP(input + *inOutIdx, verify, ssl->specs.hash_size) != 0) { - CYASSL_MSG(" hello_request verify mac error"); - return VERIFY_MAC_ERROR; - } - - *inOutIdx += ssl->specs.hash_size + padSz; - } - - if (ssl->options.side == CYASSL_SERVER_END) { - SendAlert(ssl, alert_fatal, unexpected_message); /* try */ - return FATAL_ERROR; - } - else - return SendAlert(ssl, alert_warning, no_renegotiation); -} - - -int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, word32 size, - word32 totalSz, int sniff) -{ - word32 finishedSz = (ssl->options.tls ? TLS_FINISHED_SZ : FINISHED_SZ); - - if (finishedSz != size) - return BUFFER_ERROR; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("Finished", &ssl->handShakeInfo); - if (ssl->toInfoOn) AddLateName("Finished", &ssl->timeoutInfo); - #endif - - if (sniff == NO_SNIFF) { - if (XMEMCMP(input + *inOutIdx, &ssl->verifyHashes, size) != 0) { - CYASSL_MSG("Verify finished error on hashes"); - return VERIFY_FINISHED_ERROR; - } - } - - /* increment beyond input + size should be checked against totalSz */ - if (*inOutIdx + size + ssl->keys.padSz > totalSz) - return INCOMPLETE_DATA; - - /* force input exhaustion at ProcessReply consuming padSz */ - *inOutIdx += size + ssl->keys.padSz; - - if (ssl->options.side == CYASSL_CLIENT_END) { - ssl->options.serverState = SERVER_FINISHED_COMPLETE; - if (!ssl->options.resuming) { - ssl->options.handShakeState = HANDSHAKE_DONE; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* Other side has received our Finished, go to next epoch */ - ssl->keys.dtls_epoch++; - ssl->keys.dtls_sequence_number = 1; - } -#endif - } - } - else { - ssl->options.clientState = CLIENT_FINISHED_COMPLETE; - if (ssl->options.resuming) { - ssl->options.handShakeState = HANDSHAKE_DONE; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* Other side has received our Finished, go to next epoch */ - ssl->keys.dtls_epoch++; - ssl->keys.dtls_sequence_number = 1; - } -#endif - } - } - - return 0; -} - - -static int DoHandShakeMsgType(CYASSL* ssl, byte* input, word32* inOutIdx, - byte type, word32 size, word32 totalSz) -{ - int ret = 0; - (void)totalSz; - - CYASSL_ENTER("DoHandShakeMsgType"); - - /* make sure can read the message */ - if (*inOutIdx + size > totalSz) - return INCOMPLETE_DATA; - - ret = HashInput(ssl, input + *inOutIdx, size); - if (ret != 0) - return ret; - -#ifdef CYASSL_CALLBACKS - /* add name later, add on record and handshake header part back on */ - if (ssl->toInfoOn) { - int add = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - AddPacketInfo(0, &ssl->timeoutInfo, input + *inOutIdx - add, - size + add, ssl->heap); - AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo); - } -#endif - - if (ssl->options.handShakeState == HANDSHAKE_DONE && type != hello_request){ - CYASSL_MSG("HandShake message after handshake complete"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - if (ssl->options.side == CYASSL_CLIENT_END && ssl->options.dtls == 0 && - ssl->options.serverState == NULL_STATE && type != server_hello) { - CYASSL_MSG("First server message not server hello"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - if (ssl->options.side == CYASSL_CLIENT_END && ssl->options.dtls && - type == server_hello_done && - ssl->options.serverState < SERVER_HELLO_COMPLETE) { - CYASSL_MSG("Server hello done received before server hello in DTLS"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - if (ssl->options.side == CYASSL_SERVER_END && - ssl->options.clientState == NULL_STATE && type != client_hello) { - CYASSL_MSG("First client message not client hello"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - - switch (type) { - - case hello_request: - CYASSL_MSG("processing hello request"); - ret = DoHelloRequest(ssl, input, inOutIdx, size, totalSz); - break; - -#ifndef NO_CYASSL_CLIENT - case hello_verify_request: - CYASSL_MSG("processing hello verify request"); - ret = DoHelloVerifyRequest(ssl, input,inOutIdx, size); - break; - - case server_hello: - CYASSL_MSG("processing server hello"); - ret = DoServerHello(ssl, input, inOutIdx, size); - break; - -#ifndef NO_CERTS - case certificate_request: - CYASSL_MSG("processing certificate request"); - ret = DoCertificateRequest(ssl, input, inOutIdx, size); - break; -#endif - - case server_key_exchange: - CYASSL_MSG("processing server key exchange"); - ret = DoServerKeyExchange(ssl, input, inOutIdx, size); - break; -#endif - -#ifndef NO_CERTS - case certificate: - CYASSL_MSG("processing certificate"); - ret = DoCertificate(ssl, input, inOutIdx, size); - break; -#endif - - case server_hello_done: - CYASSL_MSG("processing server hello done"); - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerHelloDone", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("ServerHelloDone", &ssl->timeoutInfo); - #endif - ssl->options.serverState = SERVER_HELLODONE_COMPLETE; - break; - - case finished: - CYASSL_MSG("processing finished"); - ret = DoFinished(ssl, input, inOutIdx, size, totalSz, NO_SNIFF); - break; - -#ifndef NO_CYASSL_SERVER - case client_hello: - CYASSL_MSG("processing client hello"); - ret = DoClientHello(ssl, input, inOutIdx, size); - break; - - case client_key_exchange: - CYASSL_MSG("processing client key exchange"); - ret = DoClientKeyExchange(ssl, input, inOutIdx, size); - break; - -#if !defined(NO_RSA) || defined(HAVE_ECC) - case certificate_verify: - CYASSL_MSG("processing certificate verify"); - ret = DoCertificateVerify(ssl, input, inOutIdx, size); - break; -#endif /* !NO_RSA || HAVE_ECC */ - -#endif /* !NO_CYASSL_SERVER */ - - default: - CYASSL_MSG("Unknown handshake message type"); - ret = UNKNOWN_HANDSHAKE_TYPE; - break; - } - - CYASSL_LEAVE("DoHandShakeMsgType()", ret); - return ret; -} - - -static int DoHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx, - word32 totalSz) -{ - byte type; - word32 size; - int ret = 0; - - CYASSL_ENTER("DoHandShakeMsg()"); - - if (GetHandShakeHeader(ssl, input, inOutIdx, &type, &size) != 0) - return PARSE_ERROR; - - ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); - - CYASSL_LEAVE("DoHandShakeMsg()", ret); - return ret; -} - - -#ifdef CYASSL_DTLS - -static INLINE int DtlsCheckWindow(DtlsState* state) -{ - word32 cur; - word32 next; - DtlsSeq window; - - if (state->curEpoch == state->nextEpoch) { - next = state->nextSeq; - window = state->window; - } - else if (state->curEpoch < state->nextEpoch) { - next = state->prevSeq; - window = state->prevWindow; - } - else { - return 0; - } - - cur = state->curSeq; - - if ((next > DTLS_SEQ_BITS) && (cur < next - DTLS_SEQ_BITS)) { - return 0; - } - else if ((cur < next) && (window & (1 << (next - cur - 1)))) { - return 0; - } - - return 1; -} - - -static INLINE int DtlsUpdateWindow(DtlsState* state) -{ - word32 cur; - word32* next; - DtlsSeq* window; - - if (state->curEpoch == state->nextEpoch) { - next = &state->nextSeq; - window = &state->window; - } - else { - next = &state->prevSeq; - window = &state->prevWindow; - } - - cur = state->curSeq; - - if (cur < *next) { - *window |= (1 << (*next - cur - 1)); - } - else { - *window <<= (1 + cur - *next); - *window |= 1; - *next = cur + 1; - } - - return 1; -} - - -static int DtlsMsgDrain(CYASSL* ssl) -{ - DtlsMsg* item = ssl->dtls_msg_list; - int ret = 0; - - /* While there is an item in the store list, and it is the expected - * message, and it is complete, and there hasn't been an error in the - * last messge... */ - while (item != NULL && - ssl->keys.dtls_expected_peer_handshake_number == item->seq && - item->fragSz == item->sz && - ret == 0) { - word32 idx = 0; - ssl->keys.dtls_expected_peer_handshake_number++; - ret = DoHandShakeMsgType(ssl, item->msg, - &idx, item->type, item->sz, item->sz); - ssl->dtls_msg_list = item->next; - DtlsMsgDelete(item, ssl->heap); - item = ssl->dtls_msg_list; - } - - return ret; -} - - -static int DoDtlsHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx, - word32 totalSz) -{ - byte type; - word32 size; - word32 fragOffset, fragSz; - int ret = 0; - - CYASSL_ENTER("DoDtlsHandShakeMsg()"); - if (GetDtlsHandShakeHeader(ssl, input, inOutIdx, &type, - &size, &fragOffset, &fragSz) != 0) - return PARSE_ERROR; - - if (*inOutIdx + fragSz > totalSz) - return INCOMPLETE_DATA; - - /* Check the handshake sequence number first. If out of order, - * add the current message to the list. If the message is in order, - * but it is a fragment, add the current message to the list, then - * check the head of the list to see if it is complete, if so, pop - * it out as the current message. If the message is complete and in - * order, process it. Check the head of the list to see if it is in - * order, if so, process it. (Repeat until list exhausted.) If the - * head is out of order, return for more processing. - */ - if (ssl->keys.dtls_peer_handshake_number > - ssl->keys.dtls_expected_peer_handshake_number) { - /* Current message is out of order. It will get stored in the list. - * Storing also takes care of defragmentation. */ - ssl->dtls_msg_list = DtlsMsgStore(ssl->dtls_msg_list, - ssl->keys.dtls_peer_handshake_number, input + *inOutIdx, - size, type, fragOffset, fragSz, ssl->heap); - *inOutIdx += fragSz; - ret = 0; - } - else if (ssl->keys.dtls_peer_handshake_number < - ssl->keys.dtls_expected_peer_handshake_number) { - /* Already saw this message and processed it. It can be ignored. */ - *inOutIdx += fragSz; - ret = 0; - } - else if (fragSz < size) { - /* Since this branch is in order, but fragmented, dtls_msg_list will be - * pointing to the message with this fragment in it. Check it to see - * if it is completed. */ - ssl->dtls_msg_list = DtlsMsgStore(ssl->dtls_msg_list, - ssl->keys.dtls_peer_handshake_number, input + *inOutIdx, - size, type, fragOffset, fragSz, ssl->heap); - *inOutIdx += fragSz; - ret = 0; - if (ssl->dtls_msg_list != NULL && - ssl->dtls_msg_list->fragSz >= ssl->dtls_msg_list->sz) - ret = DtlsMsgDrain(ssl); - } - else { - /* This branch is in order next, and a complete message. */ - ssl->keys.dtls_expected_peer_handshake_number++; - ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); - if (ret == 0 && ssl->dtls_msg_list != NULL) - ret = DtlsMsgDrain(ssl); - } - - CYASSL_LEAVE("DoDtlsHandShakeMsg()", ret); - return ret; -} -#endif - - -static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) -{ - if (verify) - return ssl->keys.peer_sequence_number++; - else - return ssl->keys.sequence_number++; -} - - -#ifdef HAVE_AEAD -static INLINE void AeadIncrementExpIV(CYASSL* ssl) -{ - int i; - for (i = AEAD_EXP_IV_SZ-1; i >= 0; i--) { - if (++ssl->keys.aead_exp_IV[i]) return; - } -} -#endif - - -static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz) -{ - (void)out; - (void)input; - (void)sz; - - if (ssl->encrypt.setup == 0) { - CYASSL_MSG("Encrypt ciphers not setup"); - return ENCRYPT_ERROR; - } - - switch (ssl->specs.bulk_cipher_algorithm) { - #ifdef BUILD_ARC4 - case cyassl_rc4: - Arc4Process(ssl->encrypt.arc4, out, input, sz); - break; - #endif - - #ifdef BUILD_DES3 - case cyassl_triple_des: - return Des3_CbcEncrypt(ssl->encrypt.des3, out, input, sz); - #endif - - #ifdef BUILD_AES - case cyassl_aes: - return AesCbcEncrypt(ssl->encrypt.aes, out, input, sz); - #endif - - #ifdef BUILD_AESGCM - case cyassl_aes_gcm: - { - byte additional[AES_BLOCK_SIZE]; - byte nonce[AEAD_NONCE_SZ]; - const byte* additionalSrc = input - 5; - - XMEMSET(additional, 0, AES_BLOCK_SIZE); - - /* sequence number field is 64-bits, we only use 32-bits */ - c32toa(GetSEQIncrement(ssl, 0), - additional + AEAD_SEQ_OFFSET); - - /* Store the type, version. Unfortunately, they are in - * the input buffer ahead of the plaintext. */ - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - additionalSrc -= DTLS_HANDSHAKE_EXTRA; - #endif - XMEMCPY(additional + AEAD_TYPE_OFFSET, additionalSrc, 3); - - /* Store the length of the plain text minus the explicit - * IV length minus the authentication tag size. */ - c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - additional + AEAD_LEN_OFFSET); - XMEMCPY(nonce, - ssl->keys.aead_enc_imp_IV, AEAD_IMP_IV_SZ); - XMEMCPY(nonce + AEAD_IMP_IV_SZ, - ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); - AesGcmEncrypt(ssl->encrypt.aes, - out + AEAD_EXP_IV_SZ, input + AEAD_EXP_IV_SZ, - sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - nonce, AEAD_NONCE_SZ, - out + sz - ssl->specs.aead_mac_size, - ssl->specs.aead_mac_size, additional, - AEAD_AUTH_DATA_SZ); - AeadIncrementExpIV(ssl); - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - } - break; - #endif - - #ifdef HAVE_AESCCM - case cyassl_aes_ccm: - { - byte additional[AES_BLOCK_SIZE]; - byte nonce[AEAD_NONCE_SZ]; - const byte* additionalSrc = input - 5; - - XMEMSET(additional, 0, AES_BLOCK_SIZE); - - /* sequence number field is 64-bits, we only use 32-bits */ - c32toa(GetSEQIncrement(ssl, 0), - additional + AEAD_SEQ_OFFSET); - - /* Store the type, version. Unfortunately, they are in - * the input buffer ahead of the plaintext. */ - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - c16toa(ssl->keys.dtls_epoch, additional); - additionalSrc -= DTLS_HANDSHAKE_EXTRA; - } - #endif - XMEMCPY(additional + AEAD_TYPE_OFFSET, additionalSrc, 3); - - /* Store the length of the plain text minus the explicit - * IV length minus the authentication tag size. */ - c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - additional + AEAD_LEN_OFFSET); - XMEMCPY(nonce, - ssl->keys.aead_enc_imp_IV, AEAD_IMP_IV_SZ); - XMEMCPY(nonce + AEAD_IMP_IV_SZ, - ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); - AesCcmEncrypt(ssl->encrypt.aes, - out + AEAD_EXP_IV_SZ, input + AEAD_EXP_IV_SZ, - sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - nonce, AEAD_NONCE_SZ, - out + sz - ssl->specs.aead_mac_size, - ssl->specs.aead_mac_size, - additional, AEAD_AUTH_DATA_SZ); - AeadIncrementExpIV(ssl); - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - - break; - } - #endif - - #ifdef HAVE_CAMELLIA - case cyassl_camellia: - CamelliaCbcEncrypt(ssl->encrypt.cam, out, input, sz); - break; - #endif - - #ifdef HAVE_HC128 - case cyassl_hc128: - return Hc128_Process(ssl->encrypt.hc128, out, input, sz); - #endif - - #ifdef BUILD_RABBIT - case cyassl_rabbit: - return RabbitProcess(ssl->encrypt.rabbit, out, input, sz); - #endif - - #ifdef HAVE_NULL_CIPHER - case cyassl_cipher_null: - if (input != out) { - XMEMMOVE(out, input, sz); - } - break; - #endif - - default: - CYASSL_MSG("CyaSSL Encrypt programming error"); - return ENCRYPT_ERROR; - } - - return 0; -} - - - -static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input, - word16 sz) -{ - (void)plain; - (void)input; - (void)sz; - - if (ssl->decrypt.setup == 0) { - CYASSL_MSG("Decrypt ciphers not setup"); - return DECRYPT_ERROR; - } - - switch (ssl->specs.bulk_cipher_algorithm) { - #ifdef BUILD_ARC4 - case cyassl_rc4: - Arc4Process(ssl->decrypt.arc4, plain, input, sz); - break; - #endif - - #ifdef BUILD_DES3 - case cyassl_triple_des: - return Des3_CbcDecrypt(ssl->decrypt.des3, plain, input, sz); - #endif - - #ifdef BUILD_AES - case cyassl_aes: - return AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz); - #endif - - #ifdef BUILD_AESGCM - case cyassl_aes_gcm: - { - byte additional[AES_BLOCK_SIZE]; - byte nonce[AEAD_NONCE_SZ]; - - XMEMSET(additional, 0, AES_BLOCK_SIZE); - - /* sequence number field is 64-bits, we only use 32-bits */ - c32toa(GetSEQIncrement(ssl, 1), additional + AEAD_SEQ_OFFSET); - - additional[AEAD_TYPE_OFFSET] = ssl->curRL.type; - additional[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor; - additional[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor; - - c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - additional + AEAD_LEN_OFFSET); - XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, AEAD_IMP_IV_SZ); - XMEMCPY(nonce + AEAD_IMP_IV_SZ, input, AEAD_EXP_IV_SZ); - if (AesGcmDecrypt(ssl->decrypt.aes, - plain + AEAD_EXP_IV_SZ, - input + AEAD_EXP_IV_SZ, - sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - nonce, AEAD_NONCE_SZ, - input + sz - ssl->specs.aead_mac_size, - ssl->specs.aead_mac_size, - additional, AEAD_AUTH_DATA_SZ) < 0) { - SendAlert(ssl, alert_fatal, bad_record_mac); - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - return VERIFY_MAC_ERROR; - } - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - break; - } - #endif - - #ifdef HAVE_AESCCM - case cyassl_aes_ccm: - { - byte additional[AES_BLOCK_SIZE]; - byte nonce[AEAD_NONCE_SZ]; - - XMEMSET(additional, 0, AES_BLOCK_SIZE); - - /* sequence number field is 64-bits, we only use 32-bits */ - c32toa(GetSEQIncrement(ssl, 1), additional + AEAD_SEQ_OFFSET); - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - c16toa(ssl->keys.dtls_state.curEpoch, additional); - #endif - - additional[AEAD_TYPE_OFFSET] = ssl->curRL.type; - additional[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor; - additional[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor; - - c16toa(sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - additional + AEAD_LEN_OFFSET); - XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, AEAD_IMP_IV_SZ); - XMEMCPY(nonce + AEAD_IMP_IV_SZ, input, AEAD_EXP_IV_SZ); - if (AesCcmDecrypt(ssl->decrypt.aes, - plain + AEAD_EXP_IV_SZ, - input + AEAD_EXP_IV_SZ, - sz - AEAD_EXP_IV_SZ - ssl->specs.aead_mac_size, - nonce, AEAD_NONCE_SZ, - input + sz - ssl->specs.aead_mac_size, - ssl->specs.aead_mac_size, - additional, AEAD_AUTH_DATA_SZ) < 0) { - SendAlert(ssl, alert_fatal, bad_record_mac); - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - return VERIFY_MAC_ERROR; - } - XMEMSET(nonce, 0, AEAD_NONCE_SZ); - break; - } - #endif - - #ifdef HAVE_CAMELLIA - case cyassl_camellia: - CamelliaCbcDecrypt(ssl->decrypt.cam, plain, input, sz); - break; - #endif - - #ifdef HAVE_HC128 - case cyassl_hc128: - return Hc128_Process(ssl->decrypt.hc128, plain, input, sz); - #endif - - #ifdef BUILD_RABBIT - case cyassl_rabbit: - return RabbitProcess(ssl->decrypt.rabbit, plain, input, sz); - #endif - - #ifdef HAVE_NULL_CIPHER - case cyassl_cipher_null: - if (input != plain) { - XMEMMOVE(plain, input, sz); - } - break; - #endif - - default: - CYASSL_MSG("CyaSSL Decrypt programming error"); - return DECRYPT_ERROR; - } - return 0; -} - - -/* check cipher text size for sanity */ -static int SanityCheckCipherText(CYASSL* ssl, word32 encryptSz) -{ -#ifdef HAVE_TRUNCATED_HMAC - word32 minLength = ssl->truncated_hmac ? TRUNCATED_HMAC_SZ - : ssl->specs.hash_size; -#else - word32 minLength = ssl->specs.hash_size; /* covers stream */ -#endif - - if (ssl->specs.cipher_type == block) { - if (encryptSz % ssl->specs.block_size) { - CYASSL_MSG("Block ciphertext not block size"); - return SANITY_CIPHER_E; - } - - minLength++; /* pad byte */ - - if (ssl->specs.block_size > minLength) - minLength = ssl->specs.block_size; - - if (ssl->options.tls1_1) - minLength += ssl->specs.block_size; /* explicit IV */ - } - else if (ssl->specs.cipher_type == aead) { - minLength = ssl->specs.aead_mac_size + AEAD_EXP_IV_SZ; - /* explicit IV + authTag size */ - } - - if (encryptSz < minLength) { - CYASSL_MSG("Ciphertext not minimum size"); - return SANITY_CIPHER_E; - } - - return 0; -} - - -#ifndef NO_OLD_TLS - -static INLINE void Md5Rounds(int rounds, const byte* data, int sz) -{ - Md5 md5; - int i; - - InitMd5(&md5); - - for (i = 0; i < rounds; i++) - Md5Update(&md5, data, sz); -} - - - -/* do a dummy sha round */ -static INLINE void ShaRounds(int rounds, const byte* data, int sz) -{ - Sha sha; - int i; - - InitSha(&sha); /* no error check on purpose, dummy round */ - - for (i = 0; i < rounds; i++) - ShaUpdate(&sha, data, sz); -} -#endif - - -#ifndef NO_SHA256 - -static INLINE void Sha256Rounds(int rounds, const byte* data, int sz) -{ - Sha256 sha256; - int i; - - InitSha256(&sha256); /* no error check on purpose, dummy round */ - - for (i = 0; i < rounds; i++) { - Sha256Update(&sha256, data, sz); - /* no error check on purpose, dummy round */ - } - -} - -#endif - - -#ifdef CYASSL_SHA384 - -static INLINE void Sha384Rounds(int rounds, const byte* data, int sz) -{ - Sha384 sha384; - int i; - - InitSha384(&sha384); /* no error check on purpose, dummy round */ - - for (i = 0; i < rounds; i++) { - Sha384Update(&sha384, data, sz); - /* no error check on purpose, dummy round */ - } -} - -#endif - - -#ifdef CYASSL_SHA512 - -static INLINE void Sha512Rounds(int rounds, const byte* data, int sz) -{ - Sha512 sha512; - int i; - - InitSha512(&sha512); /* no error check on purpose, dummy round */ - - for (i = 0; i < rounds; i++) { - Sha512Update(&sha512, data, sz); - /* no error check on purpose, dummy round */ - } -} - -#endif - - -#ifdef CYASSL_RIPEMD - -static INLINE void RmdRounds(int rounds, const byte* data, int sz) -{ - RipeMd ripemd; - int i; - - InitRipeMd(&ripemd); - - for (i = 0; i < rounds; i++) - RipeMdUpdate(&ripemd, data, sz); -} - -#endif - - -/* Do dummy rounds */ -static INLINE void DoRounds(int type, int rounds, const byte* data, int sz) -{ - switch (type) { - - case no_mac : - break; - -#ifndef NO_OLD_TLS -#ifndef NO_MD5 - case md5_mac : - Md5Rounds(rounds, data, sz); - break; -#endif - -#ifndef NO_SHA - case sha_mac : - ShaRounds(rounds, data, sz); - break; -#endif -#endif - -#ifndef NO_SHA256 - case sha256_mac : - Sha256Rounds(rounds, data, sz); - break; -#endif - -#ifdef CYASSL_SHA384 - case sha384_mac : - Sha384Rounds(rounds, data, sz); - break; -#endif - -#ifdef CYASSL_SHA512 - case sha512_mac : - Sha512Rounds(rounds, data, sz); - break; -#endif - -#ifdef CYASSL_RIPEMD - case rmd_mac : - RmdRounds(rounds, data, sz); - break; -#endif - - default: - CYASSL_MSG("Bad round type"); - break; - } -} - - -/* do number of compression rounds on dummy data */ -static INLINE void CompressRounds(CYASSL* ssl, int rounds, const byte* dummy) -{ - if (rounds) - DoRounds(ssl->specs.mac_algorithm, rounds, dummy, COMPRESS_LOWER); -} - - -/* check all length bytes for equality, return 0 on success */ -static int ConstantCompare(const byte* a, const byte* b, int length) -{ - int i; - int good = 0; - int bad = 0; - - for (i = 0; i < length; i++) { - if (a[i] == b[i]) - good++; - else - bad++; - } - - if (good == length) - return 0; - else - return 0 - bad; /* compare failed */ -} - - -/* check all length bytes for the pad value, return 0 on success */ -static int PadCheck(const byte* input, byte pad, int length) -{ - int i; - int good = 0; - int bad = 0; - - for (i = 0; i < length; i++) { - if (input[i] == pad) - good++; - else - bad++; - } - - if (good == length) - return 0; - else - return 0 - bad; /* pad check failed */ -} - - -/* get compression extra rounds */ -static INLINE int GetRounds(int pLen, int padLen, int t) -{ - int roundL1 = 1; /* round up flags */ - int roundL2 = 1; - - int L1 = COMPRESS_CONSTANT + pLen - t; - int L2 = COMPRESS_CONSTANT + pLen - padLen - 1 - t; - - L1 -= COMPRESS_UPPER; - L2 -= COMPRESS_UPPER; - - if ( (L1 % COMPRESS_LOWER) == 0) - roundL1 = 0; - if ( (L2 % COMPRESS_LOWER) == 0) - roundL2 = 0; - - L1 /= COMPRESS_LOWER; - L2 /= COMPRESS_LOWER; - - L1 += roundL1; - L2 += roundL2; - - return L1 - L2; -} - - -/* timing resistant pad/verify check, return 0 on success */ -static int TimingPadVerify(CYASSL* ssl, const byte* input, int padLen, int t, - int pLen, int content) -{ - byte verify[MAX_DIGEST_SIZE]; - byte dummy[MAX_PAD_SIZE]; - int ret = 0; - - XMEMSET(dummy, 1, sizeof(dummy)); - - if ( (t + padLen + 1) > pLen) { - CYASSL_MSG("Plain Len not long enough for pad/mac"); - PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE); - ssl->hmac(ssl, verify, input, pLen - t, content, 1); /* still compare */ - ConstantCompare(verify, input + pLen - t, t); - - return VERIFY_MAC_ERROR; - } - - if (PadCheck(input + pLen - (padLen + 1), (byte)padLen, padLen + 1) != 0) { - CYASSL_MSG("PadCheck failed"); - PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1); - ssl->hmac(ssl, verify, input, pLen - t, content, 1); /* still compare */ - ConstantCompare(verify, input + pLen - t, t); - - return VERIFY_MAC_ERROR; - } - - PadCheck(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1); - ret = ssl->hmac(ssl, verify, input, pLen - padLen - 1 - t, content, 1); - - CompressRounds(ssl, GetRounds(pLen, padLen, t), dummy); - - if (ConstantCompare(verify, input + (pLen - padLen - 1 - t), t) != 0) { - CYASSL_MSG("Verify MAC compare failed"); - return VERIFY_MAC_ERROR; - } - - if (ret != 0) - return VERIFY_MAC_ERROR; - return 0; -} - - -int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx) -{ - word32 msgSz = ssl->keys.encryptSz; - word32 idx = *inOutIdx; - int dataSz; - int ivExtra = 0; - byte* rawData = input + idx; /* keep current for hmac */ -#ifdef HAVE_LIBZ - byte decomp[MAX_RECORD_SIZE + MAX_COMP_EXTRA]; -#endif - - if (ssl->options.handShakeState != HANDSHAKE_DONE) { - CYASSL_MSG("Received App data before handshake complete"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - if (ssl->specs.cipher_type == block) { - if (ssl->options.tls1_1) - ivExtra = ssl->specs.block_size; - } - else if (ssl->specs.cipher_type == aead) { - ivExtra = AEAD_EXP_IV_SZ; - } - - dataSz = msgSz - ivExtra - ssl->keys.padSz; - if (dataSz < 0) { - CYASSL_MSG("App data buffer error, malicious input?"); - return BUFFER_ERROR; - } - - /* read data */ - if (dataSz) { - int rawSz = dataSz; /* keep raw size for idx adjustment */ - -#ifdef HAVE_LIBZ - if (ssl->options.usingCompression) { - dataSz = myDeCompress(ssl, rawData, dataSz, decomp, sizeof(decomp)); - if (dataSz < 0) return dataSz; - } -#endif - idx += rawSz; - - ssl->buffers.clearOutputBuffer.buffer = rawData; - ssl->buffers.clearOutputBuffer.length = dataSz; - } - - idx += ssl->keys.padSz; - -#ifdef HAVE_LIBZ - /* decompress could be bigger, overwrite after verify */ - if (ssl->options.usingCompression) - XMEMMOVE(rawData, decomp, dataSz); -#endif - - *inOutIdx = idx; - return 0; -} - - -/* process alert, return level */ -static int DoAlert(CYASSL* ssl, byte* input, word32* inOutIdx, int* type, - word32 totalSz) -{ - byte level; - byte code; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("Alert", &ssl->handShakeInfo); - if (ssl->toInfoOn) - /* add record header back on to info + 2 byte level, data */ - AddPacketInfo("Alert", &ssl->timeoutInfo, input + *inOutIdx - - RECORD_HEADER_SZ, 2 + RECORD_HEADER_SZ, ssl->heap); - #endif - - /* make sure can read the message */ - if (*inOutIdx + ALERT_SIZE > totalSz) - return BUFFER_E; - - level = input[(*inOutIdx)++]; - code = input[(*inOutIdx)++]; - ssl->alert_history.last_rx.code = code; - ssl->alert_history.last_rx.level = level; - *type = code; - if (level == alert_fatal) { - ssl->options.isClosed = 1; /* Don't send close_notify */ - } - - CYASSL_MSG("Got alert"); - if (*type == close_notify) { - CYASSL_MSG(" close notify"); - ssl->options.closeNotify = 1; - } - CYASSL_ERROR(*type); - - if (ssl->keys.encryptionOn) { - if (*inOutIdx + ssl->keys.padSz > totalSz) - return BUFFER_E; - *inOutIdx += ssl->keys.padSz; - } - - return level; -} - -static int GetInputData(CYASSL *ssl, word32 size) -{ - int in; - int inSz; - int maxLength; - int usedLength; - int dtlsExtra = 0; - - - /* check max input length */ - usedLength = ssl->buffers.inputBuffer.length - ssl->buffers.inputBuffer.idx; - maxLength = ssl->buffers.inputBuffer.bufferSize - usedLength; - inSz = (int)(size - usedLength); /* from last partial read */ - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if (size < ssl->dtls_expected_rx) - dtlsExtra = (int)(ssl->dtls_expected_rx - size); - inSz = ssl->dtls_expected_rx; - } -#endif - - if (inSz > maxLength) { - if (GrowInputBuffer(ssl, size + dtlsExtra, usedLength) < 0) - return MEMORY_E; - } - - if (inSz <= 0) - return BUFFER_ERROR; - - /* Put buffer data at start if not there */ - if (usedLength > 0 && ssl->buffers.inputBuffer.idx != 0) - XMEMMOVE(ssl->buffers.inputBuffer.buffer, - ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx, - usedLength); - - /* remove processed data */ - ssl->buffers.inputBuffer.idx = 0; - ssl->buffers.inputBuffer.length = usedLength; - - /* read data from network */ - do { - in = Receive(ssl, - ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.length, - inSz); - if (in == -1) - return SOCKET_ERROR_E; - - if (in == WANT_READ) - return WANT_READ; - - if (in > inSz) - return RECV_OVERFLOW_E; - - ssl->buffers.inputBuffer.length += in; - inSz -= in; - - } while (ssl->buffers.inputBuffer.length < size); - - return 0; -} - - -static INLINE int VerifyMac(CYASSL* ssl, const byte* input, word32 msgSz, - int content, word32* padSz) -{ - int ivExtra = 0; - int ret; - word32 pad = 0; - word32 padByte = 0; -#ifdef HAVE_TRUNCATED_HMAC - word32 digestSz = ssl->truncated_hmac ? TRUNCATED_HMAC_SZ - : ssl->specs.hash_size; -#else - word32 digestSz = ssl->specs.hash_size; -#endif - byte verify[MAX_DIGEST_SIZE]; - - if (ssl->specs.cipher_type == block) { - if (ssl->options.tls1_1) - ivExtra = ssl->specs.block_size; - pad = *(input + msgSz - ivExtra - 1); - padByte = 1; - - if (ssl->options.tls) { - ret = TimingPadVerify(ssl, input, pad, digestSz, msgSz - ivExtra, - content); - if (ret != 0) - return ret; - } - else { /* sslv3, some implementations have bad padding, but don't - * allow bad read */ - int badPadLen = 0; - byte dummy[MAX_PAD_SIZE]; - - XMEMSET(dummy, 1, sizeof(dummy)); - - if (pad > (msgSz - digestSz - 1)) { - CYASSL_MSG("Plain Len not long enough for pad/mac"); - pad = 0; /* no bad read */ - badPadLen = 1; - } - PadCheck(dummy, (byte)pad, MAX_PAD_SIZE); /* timing only */ - ret = ssl->hmac(ssl, verify, input, msgSz - digestSz - pad - 1, - content, 1); - if (ConstantCompare(verify, input + msgSz - digestSz - pad - 1, - digestSz) != 0) - return VERIFY_MAC_ERROR; - if (ret != 0 || badPadLen) - return VERIFY_MAC_ERROR; - } - } - else if (ssl->specs.cipher_type == stream) { - ret = ssl->hmac(ssl, verify, input, msgSz - digestSz, content, 1); - if (ConstantCompare(verify, input + msgSz - digestSz, digestSz) != 0){ - return VERIFY_MAC_ERROR; - } - if (ret != 0) - return VERIFY_MAC_ERROR; - } - - if (ssl->specs.cipher_type == aead) { - *padSz = ssl->specs.aead_mac_size; - } - else { - *padSz = digestSz + pad + padByte; - } - - return 0; -} - - -/* process input requests, return 0 is done, 1 is call again to complete, and - negative number is error */ -int ProcessReply(CYASSL* ssl) -{ - int ret = 0, type, readSz; - int atomicUser = 0; - word32 startIdx = 0; -#ifndef NO_CYASSL_SERVER - byte b0, b1; -#endif -#ifdef CYASSL_DTLS - int used; -#endif - -#ifdef ATOMIC_USER - if (ssl->ctx->DecryptVerifyCb) - atomicUser = 1; -#endif - - if (ssl->error != 0 && ssl->error != WANT_READ && ssl->error != WANT_WRITE){ - CYASSL_MSG("ProcessReply retry in error state, not allowed"); - return ssl->error; - } - - for (;;) { - switch (ssl->options.processReply) { - - /* in the CYASSL_SERVER case, get the first byte for detecting - * old client hello */ - case doProcessInit: - - readSz = RECORD_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - readSz = DTLS_RECORD_HEADER_SZ; - #endif - - /* get header or return error */ - if (!ssl->options.dtls) { - if ((ret = GetInputData(ssl, readSz)) < 0) - return ret; - } else { - #ifdef CYASSL_DTLS - /* read ahead may already have header */ - used = ssl->buffers.inputBuffer.length - - ssl->buffers.inputBuffer.idx; - if (used < readSz) - if ((ret = GetInputData(ssl, readSz)) < 0) - return ret; - #endif - } - -#ifndef NO_CYASSL_SERVER - - /* see if sending SSLv2 client hello */ - if ( ssl->options.side == CYASSL_SERVER_END && - ssl->options.clientState == NULL_STATE && - ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx] - != handshake) { - ssl->options.processReply = runProcessOldClientHello; - - /* how many bytes need ProcessOldClientHello */ - b0 = - ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++]; - b1 = - ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++]; - ssl->curSize = (word16)(((b0 & 0x7f) << 8) | b1); - } - else { - ssl->options.processReply = getRecordLayerHeader; - continue; - } - - /* in the CYASSL_SERVER case, run the old client hello */ - case runProcessOldClientHello: - - /* get sz bytes or return error */ - if (!ssl->options.dtls) { - if ((ret = GetInputData(ssl, ssl->curSize)) < 0) - return ret; - } else { - #ifdef CYASSL_DTLS - /* read ahead may already have */ - used = ssl->buffers.inputBuffer.length - - ssl->buffers.inputBuffer.idx; - if (used < ssl->curSize) - if ((ret = GetInputData(ssl, ssl->curSize)) < 0) - return ret; - #endif /* CYASSL_DTLS */ - } - - ret = ProcessOldClientHello(ssl, ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx, - ssl->buffers.inputBuffer.length - - ssl->buffers.inputBuffer.idx, - ssl->curSize); - if (ret < 0) - return ret; - - else if (ssl->buffers.inputBuffer.idx == - ssl->buffers.inputBuffer.length) { - ssl->options.processReply = doProcessInit; - return 0; - } - -#endif /* NO_CYASSL_SERVER */ - - /* get the record layer header */ - case getRecordLayerHeader: - - ret = GetRecordHeader(ssl, ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx, - &ssl->curRL, &ssl->curSize); -#ifdef CYASSL_DTLS - if (ssl->options.dtls && ret == SEQUENCE_ERROR) { - ssl->options.processReply = doProcessInit; - ssl->buffers.inputBuffer.length = 0; - ssl->buffers.inputBuffer.idx = 0; - continue; - } -#endif - if (ret != 0) - return ret; - - ssl->options.processReply = getData; - - /* retrieve record layer data */ - case getData: - - /* get sz bytes or return error */ - if (!ssl->options.dtls) { - if ((ret = GetInputData(ssl, ssl->curSize)) < 0) - return ret; - } else { -#ifdef CYASSL_DTLS - /* read ahead may already have */ - used = ssl->buffers.inputBuffer.length - - ssl->buffers.inputBuffer.idx; - if (used < ssl->curSize) - if ((ret = GetInputData(ssl, ssl->curSize)) < 0) - return ret; -#endif - } - - ssl->options.processReply = runProcessingOneMessage; - startIdx = ssl->buffers.inputBuffer.idx; /* in case > 1 msg per */ - - /* the record layer is here */ - case runProcessingOneMessage: - - #ifdef CYASSL_DTLS - if (ssl->options.dtls && - ssl->keys.dtls_state.curEpoch < ssl->keys.dtls_state.nextEpoch) - ssl->keys.decryptedCur = 1; - #endif - - if (ssl->keys.encryptionOn && ssl->keys.decryptedCur == 0) - { - ret = SanityCheckCipherText(ssl, ssl->curSize); - if (ret < 0) - return ret; - - if (atomicUser) { - #ifdef ATOMIC_USER - ret = ssl->ctx->DecryptVerifyCb(ssl, - ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, - ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, - ssl->curSize, ssl->curRL.type, 1, - &ssl->keys.padSz, ssl->DecryptVerifyCtx); - if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) - ssl->buffers.inputBuffer.idx += ssl->specs.block_size; - /* go past TLSv1.1 IV */ - if (ssl->specs.cipher_type == aead) - ssl->buffers.inputBuffer.idx += AEAD_EXP_IV_SZ; - #endif /* ATOMIC_USER */ - } - else { - ret = Decrypt(ssl, ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, - ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, - ssl->curSize); - if (ret < 0) { - CYASSL_ERROR(ret); - return DECRYPT_ERROR; - } - if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) - ssl->buffers.inputBuffer.idx += ssl->specs.block_size; - /* go past TLSv1.1 IV */ - if (ssl->specs.cipher_type == aead) - ssl->buffers.inputBuffer.idx += AEAD_EXP_IV_SZ; - - ret = VerifyMac(ssl, ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx, - ssl->curSize, ssl->curRL.type, - &ssl->keys.padSz); - } - if (ret < 0) { - CYASSL_ERROR(ret); - return DECRYPT_ERROR; - } - ssl->keys.encryptSz = ssl->curSize; - ssl->keys.decryptedCur = 1; - } - - if (ssl->options.dtls) { - #ifdef CYASSL_DTLS - DtlsUpdateWindow(&ssl->keys.dtls_state); - #endif /* CYASSL_DTLS */ - } - - CYASSL_MSG("received record layer msg"); - - switch (ssl->curRL.type) { - case handshake : - /* debugging in DoHandShakeMsg */ - if (!ssl->options.dtls) { - ret = DoHandShakeMsg(ssl, - ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx, - ssl->buffers.inputBuffer.length); - } - else { -#ifdef CYASSL_DTLS - ret = DoDtlsHandShakeMsg(ssl, - ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx, - ssl->buffers.inputBuffer.length); -#endif - } - if (ret != 0) - return ret; - break; - - case change_cipher_spec: - CYASSL_MSG("got CHANGE CIPHER SPEC"); - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ChangeCipher", &ssl->handShakeInfo); - /* add record header back on info */ - if (ssl->toInfoOn) { - AddPacketInfo("ChangeCipher", &ssl->timeoutInfo, - ssl->buffers.inputBuffer.buffer + - ssl->buffers.inputBuffer.idx - RECORD_HEADER_SZ, - 1 + RECORD_HEADER_SZ, ssl->heap); - AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo); - } - #endif - - if (ssl->curSize != 1) { - CYASSL_MSG("Malicious or corrupted ChangeCipher msg"); - return LENGTH_ERROR; - } - #ifndef NO_CERTS - if (ssl->options.side == CYASSL_SERVER_END && - ssl->options.verifyPeer && - ssl->options.havePeerCert) - if (!ssl->options.havePeerVerify) { - CYASSL_MSG("client didn't send cert verify"); - return NO_PEER_VERIFY; - } - #endif - - - ssl->buffers.inputBuffer.idx++; - ssl->keys.encryptionOn = 1; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - DtlsPoolReset(ssl); - ssl->keys.dtls_state.nextEpoch++; - ssl->keys.dtls_state.nextSeq = 0; - } - #endif - - #ifdef HAVE_LIBZ - if (ssl->options.usingCompression) - if ( (ret = InitStreams(ssl)) != 0) - return ret; - #endif - if (ssl->options.resuming && ssl->options.side == - CYASSL_CLIENT_END) - ret = BuildFinished(ssl, &ssl->verifyHashes, server); - else if (!ssl->options.resuming && ssl->options.side == - CYASSL_SERVER_END) - ret = BuildFinished(ssl, &ssl->verifyHashes, client); - if (ret != 0) - return ret; - break; - - case application_data: - CYASSL_MSG("got app DATA"); - if ((ret = DoApplicationData(ssl, - ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx)) - != 0) { - CYASSL_ERROR(ret); - return ret; - } - break; - - case alert: - CYASSL_MSG("got ALERT!"); - ret = DoAlert(ssl, ssl->buffers.inputBuffer.buffer, - &ssl->buffers.inputBuffer.idx, &type, - ssl->buffers.inputBuffer.length); - if (ret == alert_fatal) - return FATAL_ERROR; - else if (ret < 0) - return ret; - - /* catch warnings that are handled as errors */ - if (type == close_notify) - return ssl->error = ZERO_RETURN; - - if (type == decrypt_error) - return FATAL_ERROR; - break; - - default: - CYASSL_ERROR(UNKNOWN_RECORD_TYPE); - return UNKNOWN_RECORD_TYPE; - } - - ssl->options.processReply = doProcessInit; - - /* input exhausted? */ - if (ssl->buffers.inputBuffer.idx == ssl->buffers.inputBuffer.length) - return 0; - /* more messages per record */ - else if ((ssl->buffers.inputBuffer.idx - startIdx) < ssl->curSize) { - CYASSL_MSG("More messages in record"); - #ifdef CYASSL_DTLS - /* read-ahead but dtls doesn't bundle messages per record */ - if (ssl->options.dtls) { - ssl->options.processReply = doProcessInit; - continue; - } - #endif - ssl->options.processReply = runProcessingOneMessage; - continue; - } - /* more records */ - else { - CYASSL_MSG("More records in input"); - ssl->options.processReply = doProcessInit; - continue; - } - - default: - CYASSL_MSG("Bad process input state, programming error"); - return INPUT_CASE_ERROR; - } - } -} - - -int SendChangeCipher(CYASSL* ssl) -{ - byte *output; - int sendSz = RECORD_HEADER_SZ + ENUM_LEN; - int idx = RECORD_HEADER_SZ; - int ret; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA; - idx += DTLS_RECORD_EXTRA; - } - #endif - - /* check for avalaible size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddRecordHeader(output, 1, change_cipher_spec, ssl); - - output[idx] = 1; /* turn it on */ - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("ChangeCipher", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ChangeCipher", &ssl->timeoutInfo, output, sendSz, - ssl->heap); - #endif - ssl->buffers.outputBuffer.length += sendSz; - - if (ssl->options.groupMessages) - return 0; - #ifdef CYASSL_DTLS - else if (ssl->options.dtls) { - /* If using DTLS, force the ChangeCipherSpec message to be in the - * same datagram as the finished message. */ - return 0; - } - #endif - else - return SendBuffered(ssl); -} - - -#ifndef NO_OLD_TLS -static int SSL_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, - int content, int verify) -{ - byte result[MAX_DIGEST_SIZE]; - word32 digestSz = ssl->specs.hash_size; /* actual sizes */ - word32 padSz = ssl->specs.pad_size; - int ret = 0; - - Md5 md5; - Sha sha; - - /* data */ - byte seq[SEQ_SZ]; - byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */ - const byte* macSecret = CyaSSL_GetMacSecret(ssl, verify); - - XMEMSET(seq, 0, SEQ_SZ); - conLen[0] = (byte)content; - c16toa((word16)sz, &conLen[ENUM_LEN]); - c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]); - - if (ssl->specs.mac_algorithm == md5_mac) { - InitMd5(&md5); - /* inner */ - Md5Update(&md5, macSecret, digestSz); - Md5Update(&md5, PAD1, padSz); - Md5Update(&md5, seq, SEQ_SZ); - Md5Update(&md5, conLen, sizeof(conLen)); - /* in buffer */ - Md5Update(&md5, in, sz); - Md5Final(&md5, result); - /* outer */ - Md5Update(&md5, macSecret, digestSz); - Md5Update(&md5, PAD2, padSz); - Md5Update(&md5, result, digestSz); - Md5Final(&md5, digest); - } - else { - ret = InitSha(&sha); - if (ret != 0) - return ret; - /* inner */ - ShaUpdate(&sha, macSecret, digestSz); - ShaUpdate(&sha, PAD1, padSz); - ShaUpdate(&sha, seq, SEQ_SZ); - ShaUpdate(&sha, conLen, sizeof(conLen)); - /* in buffer */ - ShaUpdate(&sha, in, sz); - ShaFinal(&sha, result); - /* outer */ - ShaUpdate(&sha, macSecret, digestSz); - ShaUpdate(&sha, PAD2, padSz); - ShaUpdate(&sha, result, digestSz); - ShaFinal(&sha, digest); - } - return 0; -} - -#ifndef NO_CERTS -static void BuildMD5_CertVerify(CYASSL* ssl, byte* digest) -{ - byte md5_result[MD5_DIGEST_SIZE]; - - /* make md5 inner */ - Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); - Md5Update(&ssl->hashMd5, PAD1, PAD_MD5); - Md5Final(&ssl->hashMd5, md5_result); - - /* make md5 outer */ - Md5Update(&ssl->hashMd5, ssl->arrays->masterSecret, SECRET_LEN); - Md5Update(&ssl->hashMd5, PAD2, PAD_MD5); - Md5Update(&ssl->hashMd5, md5_result, MD5_DIGEST_SIZE); - - Md5Final(&ssl->hashMd5, digest); -} - - -static void BuildSHA_CertVerify(CYASSL* ssl, byte* digest) -{ - byte sha_result[SHA_DIGEST_SIZE]; - - /* make sha inner */ - ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); - ShaUpdate(&ssl->hashSha, PAD1, PAD_SHA); - ShaFinal(&ssl->hashSha, sha_result); - - /* make sha outer */ - ShaUpdate(&ssl->hashSha, ssl->arrays->masterSecret, SECRET_LEN); - ShaUpdate(&ssl->hashSha, PAD2, PAD_SHA); - ShaUpdate(&ssl->hashSha, sha_result, SHA_DIGEST_SIZE); - - ShaFinal(&ssl->hashSha, digest); -} -#endif /* NO_CERTS */ -#endif /* NO_OLD_TLS */ - - -#ifndef NO_CERTS - -static int BuildCertHashes(CYASSL* ssl, Hashes* hashes) -{ - /* store current states, building requires get_digest which resets state */ - #ifndef NO_OLD_TLS - Md5 md5 = ssl->hashMd5; - Sha sha = ssl->hashSha; - #endif - #ifndef NO_SHA256 - Sha256 sha256 = ssl->hashSha256; - #endif - #ifdef CYASSL_SHA384 - Sha384 sha384 = ssl->hashSha384; - #endif - - if (ssl->options.tls) { -#if ! defined( NO_OLD_TLS ) - Md5Final(&ssl->hashMd5, hashes->md5); - ShaFinal(&ssl->hashSha, hashes->sha); -#endif - if (IsAtLeastTLSv1_2(ssl)) { - int ret; - - #ifndef NO_SHA256 - ret = Sha256Final(&ssl->hashSha256, hashes->sha256); - if (ret != 0) - return ret; - #endif - #ifdef CYASSL_SHA384 - ret = Sha384Final(&ssl->hashSha384, hashes->sha384); - if (ret != 0) - return ret; - #endif - } - } -#if ! defined( NO_OLD_TLS ) - else { - BuildMD5_CertVerify(ssl, hashes->md5); - BuildSHA_CertVerify(ssl, hashes->sha); - } - - /* restore */ - ssl->hashMd5 = md5; - ssl->hashSha = sha; -#endif - if (IsAtLeastTLSv1_2(ssl)) { - #ifndef NO_SHA256 - ssl->hashSha256 = sha256; - #endif - #ifdef CYASSL_SHA384 - ssl->hashSha384 = sha384; - #endif - } - - return 0; -} - -#endif /* CYASSL_LEANPSK */ - -/* Build SSL Message, encrypted */ -static int BuildMessage(CYASSL* ssl, byte* output, const byte* input, int inSz, - int type) -{ -#ifdef HAVE_TRUNCATED_HMAC - word32 digestSz = min(ssl->specs.hash_size, - ssl->truncated_hmac ? TRUNCATED_HMAC_SZ : ssl->specs.hash_size); -#else - word32 digestSz = ssl->specs.hash_size; -#endif - word32 sz = RECORD_HEADER_SZ + inSz + digestSz; - word32 pad = 0, i; - word32 idx = RECORD_HEADER_SZ; - word32 ivSz = 0; /* TLSv1.1 IV */ - word32 headerSz = RECORD_HEADER_SZ; - word16 size; - byte iv[AES_BLOCK_SIZE]; /* max size */ - int ret = 0; - int atomicUser = 0; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sz += DTLS_RECORD_EXTRA; - idx += DTLS_RECORD_EXTRA; - headerSz += DTLS_RECORD_EXTRA; - } -#endif - -#ifdef ATOMIC_USER - if (ssl->ctx->MacEncryptCb) - atomicUser = 1; -#endif - - if (ssl->specs.cipher_type == block) { - word32 blockSz = ssl->specs.block_size; - if (ssl->options.tls1_1) { - ivSz = blockSz; - sz += ivSz; - - ret = RNG_GenerateBlock(ssl->rng, iv, ivSz); - if (ret != 0) - return ret; - - } - sz += 1; /* pad byte */ - pad = (sz - headerSz) % blockSz; - pad = blockSz - pad; - sz += pad; - } - -#ifdef HAVE_AEAD - if (ssl->specs.cipher_type == aead) { - ivSz = AEAD_EXP_IV_SZ; - sz += (ivSz + ssl->specs.aead_mac_size - digestSz); - XMEMCPY(iv, ssl->keys.aead_exp_IV, AEAD_EXP_IV_SZ); - } -#endif - size = (word16)(sz - headerSz); /* include mac and digest */ - AddRecordHeader(output, size, (byte)type, ssl); - - /* write to output */ - if (ivSz) { - XMEMCPY(output + idx, iv, min(ivSz, sizeof(iv))); - idx += ivSz; - } - XMEMCPY(output + idx, input, inSz); - idx += inSz; - - if (type == handshake) { - ret = HashOutput(ssl, output, headerSz + inSz, ivSz); - if (ret != 0) - return ret; - } - - if (ssl->specs.cipher_type == block) { - word32 tmpIdx = idx + digestSz; - - for (i = 0; i <= pad; i++) - output[tmpIdx++] = (byte)pad; /* pad byte gets pad value too */ - } - - if (atomicUser) { /* User Record Layer Callback handling */ -#ifdef ATOMIC_USER - if ( (ret = ssl->ctx->MacEncryptCb(ssl, output + idx, - output + headerSz + ivSz, inSz, type, 0, - output + headerSz, output + headerSz, size, - ssl->MacEncryptCtx)) != 0) - return ret; -#endif - } - else { - if (ssl->specs.cipher_type != aead) { -#ifdef HAVE_TRUNCATED_HMAC - if (ssl->truncated_hmac && ssl->specs.hash_size > digestSz) { - byte hmac[MAX_DIGEST_SIZE]; - - ret = ssl->hmac(ssl, hmac, output + headerSz + ivSz, inSz, - type, 0); - XMEMCPY(output + idx, hmac, digestSz); - } else -#endif - ret = ssl->hmac(ssl, output+idx, output + headerSz + ivSz, inSz, - type, 0); - } - if (ret != 0) - return ret; - - if ( (ret = Encrypt(ssl, output + headerSz, output+headerSz,size)) != 0) - return ret; - } - - return sz; -} - - -int SendFinished(CYASSL* ssl) -{ - int sendSz, - finishedSz = ssl->options.tls ? TLS_FINISHED_SZ : - FINISHED_SZ; - byte input[FINISHED_SZ + DTLS_HANDSHAKE_HEADER_SZ]; /* max */ - byte *output; - Hashes* hashes; - int ret; - int headerSz = HANDSHAKE_HEADER_SZ; - - #ifdef CYASSL_DTLS - word32 sequence_number = ssl->keys.dtls_sequence_number; - word16 epoch = ssl->keys.dtls_epoch; - #endif - - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sizeof(input) + MAX_MSG_EXTRA)) != 0) - return ret; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* Send Finished message with the next epoch, but don't commit that - * change until the other end confirms its reception. */ - headerSz += DTLS_HANDSHAKE_EXTRA; - ssl->keys.dtls_epoch++; - ssl->keys.dtls_sequence_number = 0; /* reset after epoch change */ - } - #endif - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHandShakeHeader(input, finishedSz, finished, ssl); - - /* make finished hashes */ - hashes = (Hashes*)&input[headerSz]; - ret = BuildFinished(ssl, hashes, - ssl->options.side == CYASSL_CLIENT_END ? client : server); - if (ret != 0) return ret; - - sendSz = BuildMessage(ssl, output, input, headerSz + finishedSz, handshake); - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - ssl->keys.dtls_epoch = epoch; - ssl->keys.dtls_sequence_number = sequence_number; - } - #endif - - if (sendSz < 0) - return BUILD_MSG_ERROR; - - if (!ssl->options.resuming) { -#ifndef NO_SESSION_CACHE - AddSession(ssl); /* just try */ -#endif - if (ssl->options.side == CYASSL_CLIENT_END) { - ret = BuildFinished(ssl, &ssl->verifyHashes, server); - if (ret != 0) return ret; - } - else { - ssl->options.handShakeState = HANDSHAKE_DONE; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* Other side will soon receive our Finished, go to next - * epoch. */ - ssl->keys.dtls_epoch++; - ssl->keys.dtls_sequence_number = 1; - } - #endif - } - } - else { - if (ssl->options.side == CYASSL_CLIENT_END) { - ssl->options.handShakeState = HANDSHAKE_DONE; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* Other side will soon receive our Finished, go to next - * epoch. */ - ssl->keys.dtls_epoch++; - ssl->keys.dtls_sequence_number = 1; - } - #endif - } - else { - ret = BuildFinished(ssl, &ssl->verifyHashes, client); - if (ret != 0) return ret; - } - } - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("Finished", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("Finished", &ssl->timeoutInfo, output, sendSz, - ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - - return SendBuffered(ssl); -} - -#ifndef NO_CERTS -int SendCertificate(CYASSL* ssl) -{ - int sendSz, length, ret = 0; - word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - word32 certSz, listSz; - byte* output = 0; - - if (ssl->options.usingPSK_cipher) return 0; /* not needed */ - - if (ssl->options.sendVerify == SEND_BLANK_CERT) { - certSz = 0; - length = CERT_HEADER_SZ; - listSz = 0; - } - else { - certSz = ssl->buffers.certificate.length; - /* list + cert size */ - length = certSz + 2 * CERT_HEADER_SZ; - listSz = certSz + CERT_HEADER_SZ; - - /* may need to send rest of chain, already has leading size(s) */ - if (ssl->buffers.certChain.buffer) { - length += ssl->buffers.certChain.length; - listSz += ssl->buffers.certChain.length; - } - } - sendSz = length + RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - } - #endif - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, length, certificate, ssl); - - /* list total */ - c32to24(listSz, output + i); - i += CERT_HEADER_SZ; - - /* member */ - if (certSz) { - c32to24(certSz, output + i); - i += CERT_HEADER_SZ; - XMEMCPY(output + i, ssl->buffers.certificate.buffer, certSz); - i += certSz; - - /* send rest of chain? */ - if (ssl->buffers.certChain.buffer) { - XMEMCPY(output + i, ssl->buffers.certChain.buffer, - ssl->buffers.certChain.length); - /* if add more to output adjust i - i += ssl->buffers.certChain.length; */ - } - } - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("Certificate", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("Certificate", &ssl->timeoutInfo, output, sendSz, - ssl->heap); - #endif - - if (ssl->options.side == CYASSL_SERVER_END) - ssl->options.serverState = SERVER_CERT_COMPLETE; - - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - return 0; - else - return SendBuffered(ssl); -} - - -int SendCertificateRequest(CYASSL* ssl) -{ - byte *output; - int ret; - int sendSz; - word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - - int typeTotal = 1; /* only rsa for now */ - int reqSz = ENUM_LEN + typeTotal + REQ_HEADER_SZ; /* add auth later */ - - if (IsAtLeastTLSv1_2(ssl)) - reqSz += LENGTH_SZ + ssl->suites->hashSigAlgoSz; - - if (ssl->options.usingPSK_cipher) return 0; /* not needed */ - - sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + reqSz; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - } - #endif - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, reqSz, certificate_request, ssl); - - /* write to output */ - output[i++] = (byte)typeTotal; /* # of types */ - output[i++] = rsa_sign; - - /* supported hash/sig */ - if (IsAtLeastTLSv1_2(ssl)) { - c16toa(ssl->suites->hashSigAlgoSz, &output[i]); - i += LENGTH_SZ; - - XMEMCPY(&output[i], - ssl->suites->hashSigAlgo, ssl->suites->hashSigAlgoSz); - i += ssl->suites->hashSigAlgoSz; - } - - c16toa(0, &output[i]); /* auth's */ - /* if add more to output, adjust i - i += REQ_HEADER_SZ; */ - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("CertificateRequest", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("CertificateRequest", &ssl->timeoutInfo, output, - sendSz, ssl->heap); - #endif - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - return 0; - else - return SendBuffered(ssl); -} -#endif /* !NO_CERTS */ - - -int SendData(CYASSL* ssl, const void* data, int sz) -{ - int sent = 0, /* plainText size */ - sendSz, - ret; - - if (ssl->error == WANT_WRITE) - ssl->error = 0; - - if (ssl->options.handShakeState != HANDSHAKE_DONE) { - int err; - CYASSL_MSG("handshake not complete, trying to finish"); - if ( (err = CyaSSL_negotiate(ssl)) != SSL_SUCCESS) - return err; - } - - /* last time system socket output buffer was full, try again to send */ - if (ssl->buffers.outputBuffer.length > 0) { - CYASSL_MSG("output buffer was full, trying to send again"); - if ( (ssl->error = SendBuffered(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - if (ssl->error == SOCKET_ERROR_E && ssl->options.connReset) - return 0; /* peer reset */ - return ssl->error; - } - else { - /* advance sent to previous sent + plain size just sent */ - sent = ssl->buffers.prevSent + ssl->buffers.plainSz; - CYASSL_MSG("sent write buffered data"); - } - } - - for (;;) { -#ifdef HAVE_MAX_FRAGMENT - int len = min(sz - sent, min(ssl->max_fragment, OUTPUT_RECORD_SIZE)); -#else - int len = min(sz - sent, OUTPUT_RECORD_SIZE); -#endif - byte* out; - byte* sendBuffer = (byte*)data + sent; /* may switch on comp */ - int buffSz = len; /* may switch on comp */ -#ifdef HAVE_LIBZ - byte comp[MAX_RECORD_SIZE + MAX_COMP_EXTRA]; -#endif - - if (sent == sz) break; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - len = min(len, MAX_UDP_SIZE); - buffSz = len; - } -#endif - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, len + COMP_EXTRA + - MAX_MSG_EXTRA)) != 0) - return ssl->error = ret; - - /* get ouput buffer */ - out = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - -#ifdef HAVE_LIBZ - if (ssl->options.usingCompression) { - buffSz = myCompress(ssl, sendBuffer, buffSz, comp, sizeof(comp)); - if (buffSz < 0) { - return buffSz; - } - sendBuffer = comp; - } -#endif - sendSz = BuildMessage(ssl, out, sendBuffer, buffSz, - application_data); - - ssl->buffers.outputBuffer.length += sendSz; - - if ( (ret = SendBuffered(ssl)) < 0) { - CYASSL_ERROR(ret); - /* store for next call if WANT_WRITE or user embedSend() that - doesn't present like WANT_WRITE */ - ssl->buffers.plainSz = len; - ssl->buffers.prevSent = sent; - if (ret == SOCKET_ERROR_E && ssl->options.connReset) - return 0; /* peer reset */ - return ssl->error = ret; - } - - sent += len; - - /* only one message per attempt */ - if (ssl->options.partialWrite == 1) { - CYASSL_MSG("Paritial Write on, only sending one record"); - break; - } - } - - return sent; -} - -/* process input data */ -int ReceiveData(CYASSL* ssl, byte* output, int sz, int peek) -{ - int size; - - CYASSL_ENTER("ReceiveData()"); - - if (ssl->error == WANT_READ) - ssl->error = 0; - - if (ssl->error != 0 && ssl->error != WANT_WRITE) { - CYASSL_MSG("User calling CyaSSL_read in error state, not allowed"); - return ssl->error; - } - - if (ssl->options.handShakeState != HANDSHAKE_DONE) { - int err; - CYASSL_MSG("Handshake not complete, trying to finish"); - if ( (err = CyaSSL_negotiate(ssl)) != SSL_SUCCESS) - return err; - } - - while (ssl->buffers.clearOutputBuffer.length == 0) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - if (ssl->error == ZERO_RETURN) { - CYASSL_MSG("Zero return, no more data coming"); - return 0; /* no more data coming */ - } - if (ssl->error == SOCKET_ERROR_E) { - if (ssl->options.connReset || ssl->options.isClosed) { - CYASSL_MSG("Peer reset or closed, connection done"); - return 0; /* peer reset or closed */ - } - } - return ssl->error; - } - - if (sz < (int)ssl->buffers.clearOutputBuffer.length) - size = sz; - else - size = ssl->buffers.clearOutputBuffer.length; - - XMEMCPY(output, ssl->buffers.clearOutputBuffer.buffer, size); - - if (peek == 0) { - ssl->buffers.clearOutputBuffer.length -= size; - ssl->buffers.clearOutputBuffer.buffer += size; - } - - if (ssl->buffers.clearOutputBuffer.length == 0 && - ssl->buffers.inputBuffer.dynamicFlag) - ShrinkInputBuffer(ssl, NO_FORCED_FREE); - - CYASSL_LEAVE("ReceiveData()", size); - return size; -} - - -/* send alert message */ -int SendAlert(CYASSL* ssl, int severity, int type) -{ - byte input[ALERT_SIZE]; - byte *output; - int sendSz; - int ret; - int dtlsExtra = 0; - - /* if sendalert is called again for nonbloking */ - if (ssl->options.sendAlertState != 0) { - ret = SendBuffered(ssl); - if (ret == 0) - ssl->options.sendAlertState = 0; - return ret; - } - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - dtlsExtra = DTLS_RECORD_EXTRA; - #endif - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, - ALERT_SIZE + MAX_MSG_EXTRA + dtlsExtra)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - input[0] = (byte)severity; - input[1] = (byte)type; - ssl->alert_history.last_tx.code = type; - ssl->alert_history.last_tx.level = severity; - if (severity == alert_fatal) { - ssl->options.isClosed = 1; /* Don't send close_notify */ - } - - /* only send encrypted alert if handshake actually complete, otherwise - other side may not be able to handle it */ - if (ssl->keys.encryptionOn && ssl->options.handShakeState == HANDSHAKE_DONE) - sendSz = BuildMessage(ssl, output, input, ALERT_SIZE, alert); - else { - - AddRecordHeader(output, ALERT_SIZE, alert, ssl); - output += RECORD_HEADER_SZ; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - output += DTLS_RECORD_EXTRA; - #endif - XMEMCPY(output, input, ALERT_SIZE); - - sendSz = RECORD_HEADER_SZ + ALERT_SIZE; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - sendSz += DTLS_RECORD_EXTRA; - #endif - } - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("Alert", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("Alert", &ssl->timeoutInfo, output, sendSz,ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - ssl->options.sendAlertState = 1; - - return SendBuffered(ssl); -} - - - -void SetErrorString(int error, char* str) -{ - const int max = CYASSL_MAX_ERROR_SZ; /* shorthand */ - -#ifdef NO_ERROR_STRINGS - - (void)error; - XSTRNCPY(str, "no support for error strings built in", max); - -#else - - /* pass to CTaoCrypt */ - if (error < MAX_CODE_E && error > MIN_CODE_E) { - CTaoCryptErrorString(error, str); - return; - } - - switch (error) { - - case UNSUPPORTED_SUITE : - XSTRNCPY(str, "unsupported cipher suite", max); - break; - - case INPUT_CASE_ERROR : - XSTRNCPY(str, "input state error", max); - break; - - case PREFIX_ERROR : - XSTRNCPY(str, "bad index to key rounds", max); - break; - - case MEMORY_ERROR : - XSTRNCPY(str, "out of memory", max); - break; - - case VERIFY_FINISHED_ERROR : - XSTRNCPY(str, "verify problem on finished", max); - break; - - case VERIFY_MAC_ERROR : - XSTRNCPY(str, "verify mac problem", max); - break; - - case PARSE_ERROR : - XSTRNCPY(str, "parse error on header", max); - break; - - case SIDE_ERROR : - XSTRNCPY(str, "wrong client/server type", max); - break; - - case NO_PEER_CERT : - XSTRNCPY(str, "peer didn't send cert", max); - break; - - case UNKNOWN_HANDSHAKE_TYPE : - XSTRNCPY(str, "weird handshake type", max); - break; - - case SOCKET_ERROR_E : - XSTRNCPY(str, "error state on socket", max); - break; - - case SOCKET_NODATA : - XSTRNCPY(str, "expected data, not there", max); - break; - - case INCOMPLETE_DATA : - XSTRNCPY(str, "don't have enough data to complete task", max); - break; - - case UNKNOWN_RECORD_TYPE : - XSTRNCPY(str, "unknown type in record hdr", max); - break; - - case DECRYPT_ERROR : - XSTRNCPY(str, "error during decryption", max); - break; - - case FATAL_ERROR : - XSTRNCPY(str, "revcd alert fatal error", max); - break; - - case ENCRYPT_ERROR : - XSTRNCPY(str, "error during encryption", max); - break; - - case FREAD_ERROR : - XSTRNCPY(str, "fread problem", max); - break; - - case NO_PEER_KEY : - XSTRNCPY(str, "need peer's key", max); - break; - - case NO_PRIVATE_KEY : - XSTRNCPY(str, "need the private key", max); - break; - - case NO_DH_PARAMS : - XSTRNCPY(str, "server missing DH params", max); - break; - - case RSA_PRIVATE_ERROR : - XSTRNCPY(str, "error during rsa priv op", max); - break; - - case MATCH_SUITE_ERROR : - XSTRNCPY(str, "can't match cipher suite", max); - break; - - case BUILD_MSG_ERROR : - XSTRNCPY(str, "build message failure", max); - break; - - case BAD_HELLO : - XSTRNCPY(str, "client hello malformed", max); - break; - - case DOMAIN_NAME_MISMATCH : - XSTRNCPY(str, "peer subject name mismatch", max); - break; - - case WANT_READ : - case SSL_ERROR_WANT_READ : - XSTRNCPY(str, "non-blocking socket wants data to be read", max); - break; - - case NOT_READY_ERROR : - XSTRNCPY(str, "handshake layer not ready yet, complete first", max); - break; - - case PMS_VERSION_ERROR : - XSTRNCPY(str, "premaster secret version mismatch error", max); - break; - - case VERSION_ERROR : - XSTRNCPY(str, "record layer version error", max); - break; - - case WANT_WRITE : - case SSL_ERROR_WANT_WRITE : - XSTRNCPY(str, "non-blocking socket write buffer full", max); - break; - - case BUFFER_ERROR : - XSTRNCPY(str, "malformed buffer input error", max); - break; - - case VERIFY_CERT_ERROR : - XSTRNCPY(str, "verify problem on certificate", max); - break; - - case VERIFY_SIGN_ERROR : - XSTRNCPY(str, "verify problem based on signature", max); - break; - - case CLIENT_ID_ERROR : - XSTRNCPY(str, "psk client identity error", max); - break; - - case SERVER_HINT_ERROR: - XSTRNCPY(str, "psk server hint error", max); - break; - - case PSK_KEY_ERROR: - XSTRNCPY(str, "psk key callback error", max); - break; - - case NTRU_KEY_ERROR: - XSTRNCPY(str, "NTRU key error", max); - break; - - case NTRU_DRBG_ERROR: - XSTRNCPY(str, "NTRU drbg error", max); - break; - - case NTRU_ENCRYPT_ERROR: - XSTRNCPY(str, "NTRU encrypt error", max); - break; - - case NTRU_DECRYPT_ERROR: - XSTRNCPY(str, "NTRU decrypt error", max); - break; - - case ZLIB_INIT_ERROR: - XSTRNCPY(str, "zlib init error", max); - break; - - case ZLIB_COMPRESS_ERROR: - XSTRNCPY(str, "zlib compress error", max); - break; - - case ZLIB_DECOMPRESS_ERROR: - XSTRNCPY(str, "zlib decompress error", max); - break; - - case GETTIME_ERROR: - XSTRNCPY(str, "gettimeofday() error", max); - break; - - case GETITIMER_ERROR: - XSTRNCPY(str, "getitimer() error", max); - break; - - case SIGACT_ERROR: - XSTRNCPY(str, "sigaction() error", max); - break; - - case SETITIMER_ERROR: - XSTRNCPY(str, "setitimer() error", max); - break; - - case LENGTH_ERROR: - XSTRNCPY(str, "record layer length error", max); - break; - - case PEER_KEY_ERROR: - XSTRNCPY(str, "cant decode peer key", max); - break; - - case ZERO_RETURN: - case SSL_ERROR_ZERO_RETURN: - XSTRNCPY(str, "peer sent close notify alert", max); - break; - - case ECC_CURVETYPE_ERROR: - XSTRNCPY(str, "Bad ECC Curve Type or unsupported", max); - break; - - case ECC_CURVE_ERROR: - XSTRNCPY(str, "Bad ECC Curve or unsupported", max); - break; - - case ECC_PEERKEY_ERROR: - XSTRNCPY(str, "Bad ECC Peer Key", max); - break; - - case ECC_MAKEKEY_ERROR: - XSTRNCPY(str, "ECC Make Key failure", max); - break; - - case ECC_EXPORT_ERROR: - XSTRNCPY(str, "ECC Export Key failure", max); - break; - - case ECC_SHARED_ERROR: - XSTRNCPY(str, "ECC DHE shared failure", max); - break; - - case NOT_CA_ERROR: - XSTRNCPY(str, "Not a CA by basic constraint error", max); - break; - - case BAD_PATH_ERROR: - XSTRNCPY(str, "Bad path for opendir error", max); - break; - - case BAD_CERT_MANAGER_ERROR: - XSTRNCPY(str, "Bad Cert Manager error", max); - break; - - case OCSP_CERT_REVOKED: - XSTRNCPY(str, "OCSP Cert revoked", max); - break; - - case CRL_CERT_REVOKED: - XSTRNCPY(str, "CRL Cert revoked", max); - break; - - case CRL_MISSING: - XSTRNCPY(str, "CRL missing, not loaded", max); - break; - - case MONITOR_RUNNING_E: - XSTRNCPY(str, "CRL monitor already running", max); - break; - - case THREAD_CREATE_E: - XSTRNCPY(str, "Thread creation problem", max); - break; - - case OCSP_NEED_URL: - XSTRNCPY(str, "OCSP need URL", max); - break; - - case OCSP_CERT_UNKNOWN: - XSTRNCPY(str, "OCSP Cert unknown", max); - break; - - case OCSP_LOOKUP_FAIL: - XSTRNCPY(str, "OCSP Responder lookup fail", max); - break; - - case MAX_CHAIN_ERROR: - XSTRNCPY(str, "Maximum Chain Depth Exceeded", max); - break; - - case COOKIE_ERROR: - XSTRNCPY(str, "DTLS Cookie Error", max); - break; - - case SEQUENCE_ERROR: - XSTRNCPY(str, "DTLS Sequence Error", max); - break; - - case SUITES_ERROR: - XSTRNCPY(str, "Suites Pointer Error", max); - break; - - case SSL_NO_PEM_HEADER: - XSTRNCPY(str, "No PEM Header Error", max); - break; - - case OUT_OF_ORDER_E: - XSTRNCPY(str, "Out of order message, fatal", max); - break; - - case BAD_KEA_TYPE_E: - XSTRNCPY(str, "Bad KEA type found", max); - break; - - case SANITY_CIPHER_E: - XSTRNCPY(str, "Sanity check on ciphertext failed", max); - break; - - case RECV_OVERFLOW_E: - XSTRNCPY(str, "Receive callback returned more than requested", max); - break; - - case GEN_COOKIE_E: - XSTRNCPY(str, "Generate Cookie Error", max); - break; - - case NO_PEER_VERIFY: - XSTRNCPY(str, "Need peer certificate verify Error", max); - break; - - case FWRITE_ERROR: - XSTRNCPY(str, "fwrite Error", max); - break; - - case CACHE_MATCH_ERROR: - XSTRNCPY(str, "Cache restore header match Error", max); - break; - - case UNKNOWN_SNI_HOST_NAME_E: - XSTRNCPY(str, "Unrecognized host name Error", max); - break; - - case KEYUSE_SIGNATURE_E: - XSTRNCPY(str, "Key Use digitalSignature not set Error", max); - break; - - case KEYUSE_ENCIPHER_E: - XSTRNCPY(str, "Key Use keyEncipherment not set Error", max); - break; - - case EXTKEYUSE_AUTH_E: - XSTRNCPY(str, "Ext Key Use server/client auth not set Error", max); - break; - - default : - XSTRNCPY(str, "unknown error number", max); - } - -#endif /* NO_ERROR_STRINGS */ -} - - - -/* be sure to add to cipher_name_idx too !!!! */ -static const char* const cipher_names[] = -{ -#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA - "RC4-SHA", -#endif - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 - "RC4-MD5", -#endif - -#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA - "DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA - "AES128-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA - "AES256-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA - "NULL-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 - "NULL-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - "DHE-RSA-AES128-SHA", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - "DHE-RSA-AES256-SHA", -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 - "PSK-AES128-CBC-SHA256", -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA - "PSK-AES128-CBC-SHA", -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA - "PSK-AES256-CBC-SHA", -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 - "PSK-AES128-CCM-8", -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 - "PSK-AES256-CCM-8", -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 - "PSK-NULL-SHA256", -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA - "PSK-NULL-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 - "HC128-MD5", -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA - "HC128-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 - "HC128-B2B256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 - "AES128-B2B256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 - "AES256-B2B256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA - "RABBIT-SHA", -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA - "NTRU-RC4-SHA", -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA - "NTRU-DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA - "NTRU-AES128-SHA", -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA - "NTRU-AES256-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 - "AES128-CCM-8", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 - "AES256-CCM-8", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 - "ECDHE-ECDSA-AES128-CCM-8", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 - "ECDHE-ECDSA-AES256-CCM-8", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - "ECDHE-RSA-AES128-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - "ECDHE-RSA-AES256-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - "ECDHE-ECDSA-AES128-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - "ECDHE-ECDSA-AES256-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA - "ECDHE-RSA-RC4-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - "ECDHE-RSA-DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - "ECDHE-ECDSA-RC4-SHA", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - "ECDHE-ECDSA-DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 - "AES128-SHA256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 - "AES256-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - "DHE-RSA-AES128-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - "DHE-RSA-AES256-SHA256", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - "ECDH-RSA-AES128-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - "ECDH-RSA-AES256-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - "ECDH-ECDSA-AES128-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - "ECDH-ECDSA-AES256-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA - "ECDH-RSA-RC4-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - "ECDH-RSA-DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - "ECDH-ECDSA-RC4-SHA", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - "ECDH-ECDSA-DES-CBC3-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 - "AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 - "AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - "DHE-RSA-AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - "DHE-RSA-AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - "ECDHE-RSA-AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - "ECDHE-RSA-AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - "ECDHE-ECDSA-AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - "ECDHE-ECDSA-AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - "ECDH-RSA-AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - "ECDH-RSA-AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - "ECDH-ECDSA-AES128-GCM-SHA256", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - "ECDH-ECDSA-AES256-GCM-SHA384", -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - "CAMELLIA128-SHA", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - "DHE-RSA-CAMELLIA128-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - "CAMELLIA256-SHA", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - "DHE-RSA-CAMELLIA256-SHA", -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - "CAMELLIA128-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - "DHE-RSA-CAMELLIA128-SHA256", -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - "CAMELLIA256-SHA256", -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - "DHE-RSA-CAMELLIA256-SHA256", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - "ECDHE-RSA-AES128-SHA256", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - "ECDHE-ECDSA-AES128-SHA256", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - "ECDH-RSA-AES128-SHA256", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - "ECDH-ECDSA-AES128-SHA256", -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - "ECDHE-RSA-AES256-SHA384", -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - "ECDHE-ECDSA-AES256-SHA384", -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - "ECDH-RSA-AES256-SHA384", -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - "ECDH-ECDSA-AES256-SHA384", -#endif - -}; - - - -/* cipher suite number that matches above name table */ -static int cipher_name_idx[] = -{ - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA - SSL_RSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 - SSL_RSA_WITH_RC4_128_MD5, -#endif - -#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA - SSL_RSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA - TLS_RSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA - TLS_RSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA - TLS_RSA_WITH_NULL_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 - TLS_RSA_WITH_NULL_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - TLS_DHE_RSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - TLS_DHE_RSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 - TLS_PSK_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA - TLS_PSK_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA - TLS_PSK_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 - TLS_PSK_WITH_AES_128_CCM_8, -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 - TLS_PSK_WITH_AES_256_CCM_8, -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 - TLS_PSK_WITH_NULL_SHA256, -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA - TLS_PSK_WITH_NULL_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 - TLS_RSA_WITH_HC_128_MD5, -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA - TLS_RSA_WITH_HC_128_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 - TLS_RSA_WITH_HC_128_B2B256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 - TLS_RSA_WITH_AES_128_CBC_B2B256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 - TLS_RSA_WITH_AES_256_CBC_B2B256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA - TLS_RSA_WITH_RABBIT_SHA, -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA - TLS_NTRU_RSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA - TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA - TLS_NTRU_RSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA - TLS_NTRU_RSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 - TLS_RSA_WITH_AES_128_CCM_8, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 - TLS_RSA_WITH_AES_256_CCM_8, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 - TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 - TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA - TLS_ECDHE_RSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 - TLS_RSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 - TLS_RSA_WITH_AES_256_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA - TLS_ECDH_RSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - TLS_ECDH_ECDSA_WITH_RC4_128_SHA, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 - TLS_RSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 - TLS_RSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 -#endif -}; - - -/* return true if set, else false */ -/* only supports full name from cipher_name[] delimited by : */ -int SetCipherList(Suites* s, const char* list) -{ - int ret = 0, i; - char name[MAX_SUITE_NAME]; - - char needle[] = ":"; - char* haystack = (char*)list; - char* prev; - - const int suiteSz = sizeof(cipher_names) / sizeof(cipher_names[0]); - int idx = 0; - int haveRSA = 0, haveECDSA = 0; - - if (s == NULL) { - CYASSL_MSG("SetCipherList suite pointer error"); - return 0; - } - - if (!list) - return 0; - - if (*list == 0) return 1; /* CyaSSL default */ - - if (XSTRNCMP(haystack, "ALL", 3) == 0) return 1; /* CyaSSL defualt */ - - for(;;) { - word32 len; - prev = haystack; - haystack = XSTRSTR(haystack, needle); - - if (!haystack) /* last cipher */ - len = min(sizeof(name), (word32)XSTRLEN(prev)); - else - len = min(sizeof(name), (word32)(haystack - prev)); - - XSTRNCPY(name, prev, len); - name[(len == sizeof(name)) ? len - 1 : len] = 0; - - for (i = 0; i < suiteSz; i++) - if (XSTRNCMP(name, cipher_names[i], sizeof(name)) == 0) { - if (XSTRSTR(name, "EC") || XSTRSTR(name, "CCM")) - s->suites[idx++] = ECC_BYTE; /* ECC suite */ - else - s->suites[idx++] = 0x00; /* normal */ - s->suites[idx++] = (byte)cipher_name_idx[i]; - - /* The suites are either ECDSA, RSA, or PSK. The RSA suites - * don't necessarily have RSA in the name. */ - if ((haveECDSA == 0) && XSTRSTR(name, "ECDSA")) { - haveECDSA = 1; - } - else if ((haveRSA == 0) && (XSTRSTR(name, "PSK") == NULL)) { - haveRSA = 1; - } - - if (!ret) ret = 1; /* found at least one */ - break; - } - if (!haystack) break; - haystack++; - } - - if (ret) { - s->setSuites = 1; - s->suiteSz = (word16)idx; - - idx = 0; - - if (haveECDSA) { - #ifdef CYASSL_SHA384 - s->hashSigAlgo[idx++] = sha384_mac; - s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - #endif - #ifndef NO_SHA256 - s->hashSigAlgo[idx++] = sha256_mac; - s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - #endif - s->hashSigAlgo[idx++] = sha_mac; - s->hashSigAlgo[idx++] = ecc_dsa_sa_algo; - } - - if (haveRSA) { - #ifdef CYASSL_SHA384 - s->hashSigAlgo[idx++] = sha384_mac; - s->hashSigAlgo[idx++] = rsa_sa_algo; - #endif - #ifndef NO_SHA256 - s->hashSigAlgo[idx++] = sha256_mac; - s->hashSigAlgo[idx++] = rsa_sa_algo; - #endif - s->hashSigAlgo[idx++] = sha_mac; - s->hashSigAlgo[idx++] = rsa_sa_algo; - } - - s->hashSigAlgoSz = (word16)idx; - } - - return ret; -} - - -static void PickHashSigAlgo(CYASSL* ssl, - const byte* hashSigAlgo, word32 hashSigAlgoSz) -{ - word32 i; - - ssl->suites->sigAlgo = ssl->specs.sig_algo; - ssl->suites->hashAlgo = sha_mac; - - for (i = 0; i < hashSigAlgoSz; i += 2) { - if (hashSigAlgo[i+1] == ssl->specs.sig_algo) { - if (hashSigAlgo[i] == sha_mac) { - break; - } - #ifndef NO_SHA256 - else if (hashSigAlgo[i] == sha256_mac) { - ssl->suites->hashAlgo = sha256_mac; - break; - } - #endif - #ifdef CYASSL_SHA384 - else if (hashSigAlgo[i] == sha384_mac) { - ssl->suites->hashAlgo = sha384_mac; - break; - } - #endif - } - } -} - - -#ifdef CYASSL_CALLBACKS - - /* Initialisze HandShakeInfo */ - void InitHandShakeInfo(HandShakeInfo* info) - { - int i; - - info->cipherName[0] = 0; - for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) - info->packetNames[i][0] = 0; - info->numberPackets = 0; - info->negotiationError = 0; - } - - /* Set Final HandShakeInfo parameters */ - void FinishHandShakeInfo(HandShakeInfo* info, const CYASSL* ssl) - { - int i; - int sz = sizeof(cipher_name_idx)/sizeof(int); - - for (i = 0; i < sz; i++) - if (ssl->options.cipherSuite == (byte)cipher_name_idx[i]) { - if (ssl->options.cipherSuite0 == ECC_BYTE) - continue; /* ECC suites at end */ - XSTRNCPY(info->cipherName, cipher_names[i], MAX_CIPHERNAME_SZ); - break; - } - - /* error max and min are negative numbers */ - if (ssl->error <= MIN_PARAM_ERR && ssl->error >= MAX_PARAM_ERR) - info->negotiationError = ssl->error; - } - - - /* Add name to info packet names, increase packet name count */ - void AddPacketName(const char* name, HandShakeInfo* info) - { - if (info->numberPackets < MAX_PACKETS_HANDSHAKE) { - XSTRNCPY(info->packetNames[info->numberPackets++], name, - MAX_PACKETNAME_SZ); - } - } - - - /* Initialisze TimeoutInfo */ - void InitTimeoutInfo(TimeoutInfo* info) - { - int i; - - info->timeoutName[0] = 0; - info->flags = 0; - - for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) { - info->packets[i].packetName[0] = 0; - info->packets[i].timestamp.tv_sec = 0; - info->packets[i].timestamp.tv_usec = 0; - info->packets[i].bufferValue = 0; - info->packets[i].valueSz = 0; - } - info->numberPackets = 0; - info->timeoutValue.tv_sec = 0; - info->timeoutValue.tv_usec = 0; - } - - - /* Free TimeoutInfo */ - void FreeTimeoutInfo(TimeoutInfo* info, void* heap) - { - int i; - (void)heap; - for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) - if (info->packets[i].bufferValue) { - XFREE(info->packets[i].bufferValue, heap, DYNAMIC_TYPE_INFO); - info->packets[i].bufferValue = 0; - } - - } - - - /* Add PacketInfo to TimeoutInfo */ - void AddPacketInfo(const char* name, TimeoutInfo* info, const byte* data, - int sz, void* heap) - { - if (info->numberPackets < (MAX_PACKETS_HANDSHAKE - 1)) { - Timeval currTime; - - /* may add name after */ - if (name) - XSTRNCPY(info->packets[info->numberPackets].packetName, name, - MAX_PACKETNAME_SZ); - - /* add data, put in buffer if bigger than static buffer */ - info->packets[info->numberPackets].valueSz = sz; - if (sz < MAX_VALUE_SZ) - XMEMCPY(info->packets[info->numberPackets].value, data, sz); - else { - info->packets[info->numberPackets].bufferValue = - XMALLOC(sz, heap, DYNAMIC_TYPE_INFO); - if (!info->packets[info->numberPackets].bufferValue) - /* let next alloc catch, just don't fill, not fatal here */ - info->packets[info->numberPackets].valueSz = 0; - else - XMEMCPY(info->packets[info->numberPackets].bufferValue, - data, sz); - } - gettimeofday(&currTime, 0); - info->packets[info->numberPackets].timestamp.tv_sec = - currTime.tv_sec; - info->packets[info->numberPackets].timestamp.tv_usec = - currTime.tv_usec; - info->numberPackets++; - } - } - - - /* Add packet name to previsouly added packet info */ - void AddLateName(const char* name, TimeoutInfo* info) - { - /* make sure we have a valid previous one */ - if (info->numberPackets > 0 && info->numberPackets < - MAX_PACKETS_HANDSHAKE) { - XSTRNCPY(info->packets[info->numberPackets - 1].packetName, name, - MAX_PACKETNAME_SZ); - } - } - - /* Add record header to previsouly added packet info */ - void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info) - { - /* make sure we have a valid previous one */ - if (info->numberPackets > 0 && info->numberPackets < - MAX_PACKETS_HANDSHAKE) { - if (info->packets[info->numberPackets - 1].bufferValue) - XMEMCPY(info->packets[info->numberPackets - 1].bufferValue, rl, - RECORD_HEADER_SZ); - else - XMEMCPY(info->packets[info->numberPackets - 1].value, rl, - RECORD_HEADER_SZ); - } - } - -#endif /* CYASSL_CALLBACKS */ - - - -/* client only parts */ -#ifndef NO_CYASSL_CLIENT - - int SendClientHello(CYASSL* ssl) - { - byte *output; - word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int sendSz; - int idSz = ssl->options.resuming ? ID_LEN : 0; - int ret; - - if (ssl->suites == NULL) { - CYASSL_MSG("Bad suites pointer in SendClientHello"); - return SUITES_ERROR; - } - - length = VERSION_SZ + RAN_LEN - + idSz + ENUM_LEN - + ssl->suites->suiteSz + SUITE_LEN - + COMP_LEN + ENUM_LEN; - -#ifdef HAVE_TLS_EXTENSIONS - length += TLSX_GetRequestSize(ssl); -#else - if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) { - length += ssl->suites->hashSigAlgoSz + HELLO_EXT_SZ; - } -#endif - sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - length += ENUM_LEN; /* cookie */ - if (ssl->arrays->cookieSz != 0) length += ssl->arrays->cookieSz; - sendSz = length + DTLS_HANDSHAKE_HEADER_SZ + DTLS_RECORD_HEADER_SZ; - idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; - } -#endif - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, length, client_hello, ssl); - - /* client hello, first version */ - output[idx++] = ssl->version.major; - output[idx++] = ssl->version.minor; - ssl->chVersion = ssl->version; /* store in case changed */ - - /* then random */ - if (ssl->options.connectState == CONNECT_BEGIN) { - ret = RNG_GenerateBlock(ssl->rng, output + idx, RAN_LEN); - if (ret != 0) - return ret; - - /* store random */ - XMEMCPY(ssl->arrays->clientRandom, output + idx, RAN_LEN); - } else { -#ifdef CYASSL_DTLS - /* send same random on hello again */ - XMEMCPY(output + idx, ssl->arrays->clientRandom, RAN_LEN); -#endif - } - idx += RAN_LEN; - - /* then session id */ - output[idx++] = (byte)idSz; - if (idSz) { - XMEMCPY(output + idx, ssl->session.sessionID, ID_LEN); - idx += ID_LEN; - } - - /* then DTLS cookie */ -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - byte cookieSz = ssl->arrays->cookieSz; - - output[idx++] = cookieSz; - if (cookieSz) { - XMEMCPY(&output[idx], ssl->arrays->cookie, cookieSz); - idx += cookieSz; - } - } -#endif - /* then cipher suites */ - c16toa(ssl->suites->suiteSz, output + idx); - idx += 2; - XMEMCPY(output + idx, &ssl->suites->suites, ssl->suites->suiteSz); - idx += ssl->suites->suiteSz; - - /* last, compression */ - output[idx++] = COMP_LEN; - if (ssl->options.usingCompression) - output[idx++] = ZLIB_COMPRESSION; - else - output[idx++] = NO_COMPRESSION; - -#ifdef HAVE_TLS_EXTENSIONS - idx += TLSX_WriteRequest(ssl, output + idx); - - (void)idx; /* suppress analyzer warning, keep idx current */ -#else - if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) - { - int i; - /* add in the extensions length */ - c16toa(HELLO_EXT_LEN + ssl->suites->hashSigAlgoSz, output + idx); - idx += 2; - - c16toa(HELLO_EXT_SIG_ALGO, output + idx); - idx += 2; - c16toa(HELLO_EXT_SIGALGO_SZ+ssl->suites->hashSigAlgoSz, output+idx); - idx += 2; - c16toa(ssl->suites->hashSigAlgoSz, output + idx); - idx += 2; - for (i = 0; i < ssl->suites->hashSigAlgoSz; i++, idx++) { - output[idx] = ssl->suites->hashSigAlgo[i]; - } - } -#endif - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - ssl->options.clientState = CLIENT_HELLO_COMPLETE; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("ClientHello", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ClientHello", &ssl->timeoutInfo, output, sendSz, - ssl->heap); -#endif - - ssl->buffers.outputBuffer.length += sendSz; - - return SendBuffered(ssl); - } - - - static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input, - word32* inOutIdx, word32 size) - { - ProtocolVersion pv; - byte cookieSz; - word32 begin = *inOutIdx; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("HelloVerifyRequest", - &ssl->handShakeInfo); - if (ssl->toInfoOn) AddLateName("HelloVerifyRequest", &ssl->timeoutInfo); -#endif - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - DtlsPoolReset(ssl); - } -#endif - - if ((*inOutIdx - begin) + OPAQUE16_LEN + OPAQUE8_LEN > size) - return BUFFER_ERROR; - - XMEMCPY(&pv, input + *inOutIdx, OPAQUE16_LEN); - *inOutIdx += OPAQUE16_LEN; - - cookieSz = input[(*inOutIdx)++]; - - if (cookieSz) { - if ((*inOutIdx - begin) + cookieSz > size) - return BUFFER_ERROR; - -#ifdef CYASSL_DTLS - if (cookieSz <= MAX_COOKIE_LEN) { - XMEMCPY(ssl->arrays->cookie, input + *inOutIdx, cookieSz); - ssl->arrays->cookieSz = cookieSz; - } -#endif - *inOutIdx += cookieSz; - } - - ssl->options.serverState = SERVER_HELLOVERIFYREQUEST_COMPLETE; - return 0; - } - - - static int DoServerHello(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 helloSz) - { - byte b; - ProtocolVersion pv; - byte compression; - word32 i = *inOutIdx; - word32 begin = i; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("ServerHello", &ssl->handShakeInfo); - if (ssl->toInfoOn) AddLateName("ServerHello", &ssl->timeoutInfo); -#endif - - /* protocol version, random and session id length check */ - if ((i - begin) + OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz) - return BUFFER_ERROR; - - /* protocol version */ - XMEMCPY(&pv, input + i, OPAQUE16_LEN); - i += OPAQUE16_LEN; - - if (pv.minor > ssl->version.minor) { - CYASSL_MSG("Server using higher version, fatal error"); - return VERSION_ERROR; - } - else if (pv.minor < ssl->version.minor) { - CYASSL_MSG("server using lower version"); - - if (!ssl->options.downgrade) { - CYASSL_MSG(" no downgrade allowed, fatal error"); - return VERSION_ERROR; - } - - if (pv.minor == SSLv3_MINOR) { - /* turn off tls */ - CYASSL_MSG(" downgrading to SSLv3"); - ssl->options.tls = 0; - ssl->options.tls1_1 = 0; - ssl->version.minor = SSLv3_MINOR; - } - else if (pv.minor == TLSv1_MINOR) { - /* turn off tls 1.1+ */ - CYASSL_MSG(" downgrading to TLSv1"); - ssl->options.tls1_1 = 0; - ssl->version.minor = TLSv1_MINOR; - } - else if (pv.minor == TLSv1_1_MINOR) { - CYASSL_MSG(" downgrading to TLSv1.1"); - ssl->version.minor = TLSv1_1_MINOR; - } - } - - /* random */ - XMEMCPY(ssl->arrays->serverRandom, input + i, RAN_LEN); - i += RAN_LEN; - - /* session id */ - b = input[i++]; - - if (b == ID_LEN) { - if ((i - begin) + ID_LEN > helloSz) - return BUFFER_ERROR; - - XMEMCPY(ssl->arrays->sessionID, input + i, min(b, ID_LEN)); - i += ID_LEN; - ssl->options.haveSessionId = 1; - } - else if (b) { - CYASSL_MSG("Invalid session ID size"); - return BUFFER_ERROR; /* session ID nor 0 neither 32 bytes long */ - } - - /* suite and compression */ - if ((i - begin) + OPAQUE16_LEN + OPAQUE8_LEN > helloSz) - return BUFFER_ERROR; - - ssl->options.cipherSuite0 = input[i++]; - ssl->options.cipherSuite = input[i++]; - compression = input[i++]; - - if (compression != ZLIB_COMPRESSION && ssl->options.usingCompression) { - CYASSL_MSG("Server refused compression, turning off"); - ssl->options.usingCompression = 0; /* turn off if server refused */ - } - - *inOutIdx = i; - - /* tls extensions */ - if ( (i - begin) < helloSz) { -#ifdef HAVE_TLS_EXTENSIONS - if (IsTLS(ssl)) { - int ret = 0; - word16 totalExtSz; - Suites clSuites; /* just for compatibility right now */ - - if ((i - begin) + OPAQUE16_LEN > helloSz) - return BUFFER_ERROR; - - ato16(&input[i], &totalExtSz); - i += OPAQUE16_LEN; - - if ((i - begin) + totalExtSz > helloSz) - return BUFFER_ERROR; - - if ((ret = TLSX_Parse(ssl, (byte *) input + i, - totalExtSz, 0, &clSuites))) - return ret; - - i += totalExtSz; - *inOutIdx = i; - } - else -#endif - *inOutIdx = begin + helloSz; /* skip extensions */ - } - - ssl->options.serverState = SERVER_HELLO_COMPLETE; - - if (ssl->options.resuming) { - if (ssl->options.haveSessionId && XMEMCMP(ssl->arrays->sessionID, - ssl->session.sessionID, ID_LEN) == 0) { - if (SetCipherSpecs(ssl) == 0) { - int ret = -1; - - XMEMCPY(ssl->arrays->masterSecret, - ssl->session.masterSecret, SECRET_LEN); - #ifdef NO_OLD_TLS - ret = DeriveTlsKeys(ssl); - #else - #ifndef NO_TLS - if (ssl->options.tls) - ret = DeriveTlsKeys(ssl); - #endif - if (!ssl->options.tls) - ret = DeriveKeys(ssl); - #endif - ssl->options.serverState = SERVER_HELLODONE_COMPLETE; - - return ret; - } - else { - CYASSL_MSG("Unsupported cipher suite, DoServerHello"); - return UNSUPPORTED_SUITE; - } - } - else { - CYASSL_MSG("Server denied resumption attempt"); - ssl->options.resuming = 0; /* server denied resumption try */ - } - } - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - DtlsPoolReset(ssl); - } - #endif - - return SetCipherSpecs(ssl); - } - - -#ifndef NO_CERTS - /* just read in and ignore for now TODO: */ - static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32* - inOutIdx, word32 size) - { - word16 len; - word32 begin = *inOutIdx; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("CertificateRequest", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("CertificateRequest", &ssl->timeoutInfo); - #endif - - if ((*inOutIdx - begin) + OPAQUE8_LEN > size) - return BUFFER_ERROR; - - len = input[(*inOutIdx)++]; - - if ((*inOutIdx - begin) + len > size) - return BUFFER_ERROR; - - /* types, read in here */ - *inOutIdx += len; - - /* signature and hash signature algorithm */ - if (IsAtLeastTLSv1_2(ssl)) { - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &len); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + len > size) - return BUFFER_ERROR; - - PickHashSigAlgo(ssl, input + *inOutIdx, len); - *inOutIdx += len; - } - - /* authorities */ - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &len); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + len > size) - return BUFFER_ERROR; - - while (len) { - word16 dnSz; - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &dnSz); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + dnSz > size) - return BUFFER_ERROR; - - *inOutIdx += dnSz; - len -= OPAQUE16_LEN + dnSz; - } - - /* don't send client cert or cert verify if user hasn't provided - cert and private key */ - if (ssl->buffers.certificate.buffer && ssl->buffers.key.buffer) - ssl->options.sendVerify = SEND_CERT; - else if (IsTLS(ssl)) - ssl->options.sendVerify = SEND_BLANK_CERT; - - return 0; - } -#endif /* !NO_CERTS */ - - - static int DoServerKeyExchange(CYASSL* ssl, const byte* input, - word32* inOutIdx, word32 size) - { - word16 length = 0; - word32 begin = *inOutIdx; - int ret = 0; - - (void)length; /* shut up compiler warnings */ - (void)begin; - (void)ssl; - (void)input; - (void)size; - (void)ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("ServerKeyExchange", &ssl->timeoutInfo); - #endif - - #ifndef NO_PSK - if (ssl->specs.kea == psk_kea) { - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &length); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - XMEMCPY(ssl->arrays->server_hint, input + *inOutIdx, - min(length, MAX_PSK_ID_LEN)); - - ssl->arrays->server_hint[min(length, MAX_PSK_ID_LEN - 1)] = 0; - *inOutIdx += length; - - return 0; - } - #endif - #ifdef OPENSSL_EXTRA - if (ssl->specs.kea == diffie_hellman_kea) - { - /* p */ - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &length); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - ssl->buffers.serverDH_P.buffer = (byte*) XMALLOC(length, ssl->heap, - DYNAMIC_TYPE_DH); - - if (ssl->buffers.serverDH_P.buffer) - ssl->buffers.serverDH_P.length = length; - else - return MEMORY_ERROR; - - XMEMCPY(ssl->buffers.serverDH_P.buffer, input + *inOutIdx, length); - *inOutIdx += length; - - /* g */ - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &length); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - ssl->buffers.serverDH_G.buffer = (byte*) XMALLOC(length, ssl->heap, - DYNAMIC_TYPE_DH); - - if (ssl->buffers.serverDH_G.buffer) - ssl->buffers.serverDH_G.length = length; - else - return MEMORY_ERROR; - - XMEMCPY(ssl->buffers.serverDH_G.buffer, input + *inOutIdx, length); - *inOutIdx += length; - - /* pub */ - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &length); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - ssl->buffers.serverDH_Pub.buffer = (byte*) XMALLOC(length, ssl->heap, - DYNAMIC_TYPE_DH); - - if (ssl->buffers.serverDH_Pub.buffer) - ssl->buffers.serverDH_Pub.length = length; - else - return MEMORY_ERROR; - - XMEMCPY(ssl->buffers.serverDH_Pub.buffer, input + *inOutIdx, length); - *inOutIdx += length; - } /* dh_kea */ - #endif /* OPENSSL_EXTRA */ - - #ifdef HAVE_ECC - if (ssl->specs.kea == ecc_diffie_hellman_kea) - { - byte b; - - if ((*inOutIdx - begin) + ENUM_LEN + OPAQUE16_LEN + OPAQUE8_LEN > size) - return BUFFER_ERROR; - - b = input[(*inOutIdx)++]; - - if (b != named_curve) - return ECC_CURVETYPE_ERROR; - - *inOutIdx += 1; /* curve type, eat leading 0 */ - b = input[(*inOutIdx)++]; - - if (b != secp256r1 && b != secp384r1 && b != secp521r1 && b != - secp160r1 && b != secp192r1 && b != secp224r1) - return ECC_CURVE_ERROR; - - length = input[(*inOutIdx)++]; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - if (ecc_import_x963(input + *inOutIdx, length, ssl->peerEccKey) != 0) - return ECC_PEERKEY_ERROR; - - *inOutIdx += length; - ssl->peerEccKeyPresent = 1; - } - #endif /* HAVE_ECC */ - - #if defined(OPENSSL_EXTRA) || defined(HAVE_ECC) - { -#ifndef NO_OLD_TLS - Md5 md5; - Sha sha; -#endif -#ifndef NO_SHA256 - Sha256 sha256; - byte hash256[SHA256_DIGEST_SIZE]; -#endif -#ifdef CYASSL_SHA384 - Sha384 sha384; - byte hash384[SHA384_DIGEST_SIZE]; -#endif - byte hash[FINISHED_SZ]; - byte messageVerify[MAX_DH_SZ]; - byte hashAlgo = sha_mac; - byte sigAlgo = ssl->specs.sig_algo; - word16 verifySz = (word16) (*inOutIdx - begin); - - /* save message for hash verify */ - if (verifySz > sizeof(messageVerify)) - return BUFFER_ERROR; - - XMEMCPY(messageVerify, input + begin, verifySz); - - if (IsAtLeastTLSv1_2(ssl)) { - if ((*inOutIdx - begin) + ENUM_LEN + ENUM_LEN > size) - return BUFFER_ERROR; - - hashAlgo = input[(*inOutIdx)++]; - sigAlgo = input[(*inOutIdx)++]; - } - - /* signature */ - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &length); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - /* inOutIdx updated at the end of the function */ - - /* verify signature */ -#ifndef NO_OLD_TLS - /* md5 */ - InitMd5(&md5); - Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); - Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); - Md5Update(&md5, messageVerify, verifySz); - Md5Final(&md5, hash); - - /* sha */ - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); - ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); - ShaUpdate(&sha, messageVerify, verifySz); - ShaFinal(&sha, hash + MD5_DIGEST_SIZE); -#endif - -#ifndef NO_SHA256 - ret = InitSha256(&sha256); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, messageVerify, verifySz); - if (ret != 0) - return ret; - ret = Sha256Final(&sha256, hash256); - if (ret != 0) - return ret; -#endif - -#ifdef CYASSL_SHA384 - ret = InitSha384(&sha384); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, messageVerify, verifySz); - if (ret != 0) - return ret; - ret = Sha384Final(&sha384, hash384); - if (ret != 0) - return ret; -#endif - -#ifndef NO_RSA - /* rsa */ - if (sigAlgo == rsa_sa_algo) - { - byte* out = NULL; - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaVerifyCb) - doUserRsa = 1; - #endif /*HAVE_PK_CALLBACKS */ - - if (!ssl->peerRsaKeyPresent) - return NO_PEER_KEY; - - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - ret = ssl->ctx->RsaVerifyCb(ssl, (byte *) input + *inOutIdx, - length, &out, - ssl->buffers.peerRsaKey.buffer, - ssl->buffers.peerRsaKey.length, - ssl->RsaVerifyCtx); - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = RsaSSL_VerifyInline((byte *) input + *inOutIdx, length, - &out, ssl->peerRsaKey); - } - - if (IsAtLeastTLSv1_2(ssl)) { - byte encodedSig[MAX_ENCODED_SIG_SZ]; - word32 encSigSz; -#ifndef NO_OLD_TLS - byte* digest = &hash[MD5_DIGEST_SIZE]; - int typeH = SHAh; - int digestSz = SHA_DIGEST_SIZE; -#else - byte* digest = hash256; - int typeH = SHA256h; - int digestSz = SHA256_DIGEST_SIZE; -#endif - - if (hashAlgo == sha_mac) { - #ifndef NO_SHA - digest = &hash[MD5_DIGEST_SIZE]; - typeH = SHAh; - digestSz = SHA_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = hash256; - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = hash384; - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - - encSigSz = EncodeSignature(encodedSig, digest, digestSz, typeH); - - if (encSigSz != (word32)ret || !out || XMEMCMP(out, encodedSig, - min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) - return VERIFY_SIGN_ERROR; - } - else { - if (ret != sizeof(hash) || !out || XMEMCMP(out, - hash, sizeof(hash)) != 0) - return VERIFY_SIGN_ERROR; - } - } else -#endif -#ifdef HAVE_ECC - /* ecdsa */ - if (sigAlgo == ecc_dsa_sa_algo) { - int verify = 0; -#ifndef NO_OLD_TLS - byte* digest = &hash[MD5_DIGEST_SIZE]; - word32 digestSz = SHA_DIGEST_SIZE; -#else - byte* digest = hash256; - word32 digestSz = SHA256_DIGEST_SIZE; -#endif - byte doUserEcc = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->EccVerifyCb) - doUserEcc = 1; - #endif - - if (!ssl->peerEccDsaKeyPresent) - return NO_PEER_KEY; - - if (IsAtLeastTLSv1_2(ssl)) { - if (hashAlgo == sha_mac) { - #ifndef NO_SHA - digest = &hash[MD5_DIGEST_SIZE]; - digestSz = SHA_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = hash256; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = hash384; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - } - if (doUserEcc) { - #ifdef HAVE_PK_CALLBACKS - ret = ssl->ctx->EccVerifyCb(ssl, input + *inOutIdx, length, - digest, digestSz, - ssl->buffers.peerEccDsaKey.buffer, - ssl->buffers.peerEccDsaKey.length, - &verify, ssl->EccVerifyCtx); - #endif - } - else { - ret = ecc_verify_hash(input + *inOutIdx, length, - digest, digestSz, &verify, ssl->peerEccDsaKey); - } - if (ret != 0 || verify == 0) - return VERIFY_SIGN_ERROR; - } - else -#endif /* HAVE_ECC */ - return ALGO_ID_E; - - /* signature length */ - *inOutIdx += length; - - ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; - - return 0; - } -#else /* HAVE_OPENSSL or HAVE_ECC */ - return NOT_COMPILED_IN; /* not supported by build */ -#endif /* HAVE_OPENSSL or HAVE_ECC */ - } - - - int SendClientKeyExchange(CYASSL* ssl) - { - byte encSecret[MAX_ENCRYPT_SZ]; - word32 encSz = 0; - word32 idx = 0; - int ret = 0; - byte doUserRsa = 0; - - (void)doUserRsa; - - #ifdef HAVE_PK_CALLBACKS - #ifndef NO_RSA - if (ssl->ctx->RsaEncCb) - doUserRsa = 1; - #endif /* NO_RSA */ - #endif /*HAVE_PK_CALLBACKS */ - - switch (ssl->specs.kea) { - #ifndef NO_RSA - case rsa_kea: - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->preMasterSecret, - SECRET_LEN); - if (ret != 0) - return ret; - - ssl->arrays->preMasterSecret[0] = ssl->chVersion.major; - ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor; - ssl->arrays->preMasterSz = SECRET_LEN; - - if (ssl->peerRsaKeyPresent == 0) - return NO_PEER_KEY; - - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - #ifndef NO_RSA - encSz = sizeof(encSecret); - ret = ssl->ctx->RsaEncCb(ssl, - ssl->arrays->preMasterSecret, - SECRET_LEN, - encSecret, &encSz, - ssl->buffers.peerRsaKey.buffer, - ssl->buffers.peerRsaKey.length, - ssl->RsaEncCtx); - #endif /* NO_RSA */ - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = RsaPublicEncrypt(ssl->arrays->preMasterSecret, - SECRET_LEN, encSecret, sizeof(encSecret), - ssl->peerRsaKey, ssl->rng); - if (ret > 0) { - encSz = ret; - ret = 0; /* set success to 0 */ - } - } - break; - #endif - #ifdef OPENSSL_EXTRA - case diffie_hellman_kea: - { - buffer serverP = ssl->buffers.serverDH_P; - buffer serverG = ssl->buffers.serverDH_G; - buffer serverPub = ssl->buffers.serverDH_Pub; - byte priv[ENCRYPT_LEN]; - word32 privSz = 0; - DhKey key; - - if (serverP.buffer == 0 || serverG.buffer == 0 || - serverPub.buffer == 0) - return NO_PEER_KEY; - - InitDhKey(&key); - ret = DhSetKey(&key, serverP.buffer, serverP.length, - serverG.buffer, serverG.length); - if (ret == 0) - /* for DH, encSecret is Yc, agree is pre-master */ - ret = DhGenerateKeyPair(&key, ssl->rng, priv, &privSz, - encSecret, &encSz); - if (ret == 0) - ret = DhAgree(&key, ssl->arrays->preMasterSecret, - &ssl->arrays->preMasterSz, priv, privSz, - serverPub.buffer, serverPub.length); - FreeDhKey(&key); - } - break; - #endif /* OPENSSL_EXTRA */ - #ifndef NO_PSK - case psk_kea: - { - byte* pms = ssl->arrays->preMasterSecret; - - ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl, - ssl->arrays->server_hint, ssl->arrays->client_identity, - MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN); - if (ssl->arrays->psk_keySz == 0 || - ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) - return PSK_KEY_ERROR; - encSz = (word32)XSTRLEN(ssl->arrays->client_identity); - if (encSz > MAX_PSK_ID_LEN) return CLIENT_ID_ERROR; - XMEMCPY(encSecret, ssl->arrays->client_identity, encSz); - - /* make psk pre master secret */ - /* length of key + length 0s + length of key + key */ - c16toa((word16)ssl->arrays->psk_keySz, pms); - pms += 2; - XMEMSET(pms, 0, ssl->arrays->psk_keySz); - pms += ssl->arrays->psk_keySz; - c16toa((word16)ssl->arrays->psk_keySz, pms); - pms += 2; - XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz); - ssl->arrays->preMasterSz = ssl->arrays->psk_keySz * 2 + 4; - XMEMSET(ssl->arrays->psk_key, 0, ssl->arrays->psk_keySz); - ssl->arrays->psk_keySz = 0; /* No further need */ - } - break; - #endif /* NO_PSK */ - #ifdef HAVE_NTRU - case ntru_kea: - { - word32 rc; - word16 cipherLen = sizeof(encSecret); - DRBG_HANDLE drbg; - static uint8_t const cyasslStr[] = { - 'C', 'y', 'a', 'S', 'S', 'L', ' ', 'N', 'T', 'R', 'U' - }; - - ret = RNG_GenerateBlock(ssl->rng, - ssl->arrays->preMasterSecret, SECRET_LEN); - if (ret != 0) - return ret; - - ssl->arrays->preMasterSz = SECRET_LEN; - - if (ssl->peerNtruKeyPresent == 0) - return NO_PEER_KEY; - - rc = crypto_drbg_instantiate(MAX_NTRU_BITS, cyasslStr, - sizeof(cyasslStr), GetEntropy, - &drbg); - if (rc != DRBG_OK) - return NTRU_DRBG_ERROR; - - rc = crypto_ntru_encrypt(drbg, ssl->peerNtruKeyLen, - ssl->peerNtruKey, - ssl->arrays->preMasterSz, - ssl->arrays->preMasterSecret, - &cipherLen, encSecret); - crypto_drbg_uninstantiate(drbg); - if (rc != NTRU_OK) - return NTRU_ENCRYPT_ERROR; - - encSz = cipherLen; - ret = 0; - } - break; - #endif /* HAVE_NTRU */ - #ifdef HAVE_ECC - case ecc_diffie_hellman_kea: - { - ecc_key myKey; - ecc_key* peerKey = NULL; - word32 size = sizeof(encSecret); - - if (ssl->specs.static_ecdh) { - /* TODO: EccDsa is really fixed Ecc change naming */ - if (!ssl->peerEccDsaKeyPresent || !ssl->peerEccDsaKey->dp) - return NO_PEER_KEY; - peerKey = ssl->peerEccDsaKey; - } - else { - if (!ssl->peerEccKeyPresent || !ssl->peerEccKey->dp) - return NO_PEER_KEY; - peerKey = ssl->peerEccKey; - } - - if (peerKey == NULL) - return NO_PEER_KEY; - - ecc_init(&myKey); - ret = ecc_make_key(ssl->rng, peerKey->dp->size, &myKey); - if (ret != 0) - return ECC_MAKEKEY_ERROR; - - /* precede export with 1 byte length */ - ret = ecc_export_x963(&myKey, encSecret + 1, &size); - encSecret[0] = (byte)size; - encSz = size + 1; - - if (ret != 0) - ret = ECC_EXPORT_ERROR; - else { - size = sizeof(ssl->arrays->preMasterSecret); - ret = ecc_shared_secret(&myKey, peerKey, - ssl->arrays->preMasterSecret, &size); - if (ret != 0) - ret = ECC_SHARED_ERROR; - } - - ssl->arrays->preMasterSz = size; - ecc_free(&myKey); - } - break; - #endif /* HAVE_ECC */ - default: - return ALGO_ID_E; /* unsupported kea */ - } - - if (ret == 0) { - byte *output; - int sendSz; - word32 tlsSz = 0; - - if (ssl->options.tls || ssl->specs.kea == diffie_hellman_kea) - tlsSz = 2; - - if (ssl->specs.kea == ecc_diffie_hellman_kea) /* always off */ - tlsSz = 0; - - sendSz = encSz + tlsSz + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - idx = HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; - idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA; - } - #endif - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, encSz + tlsSz, client_key_exchange, ssl); - - if (tlsSz) { - c16toa((word16)encSz, &output[idx]); - idx += 2; - } - XMEMCPY(output + idx, encSecret, encSz); - /* if add more to output, adjust idx - idx += encSz; */ - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ClientKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ClientKeyExchange", &ssl->timeoutInfo, - output, sendSz, ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - - if (ssl->options.groupMessages) - ret = 0; - else - ret = SendBuffered(ssl); - } - - if (ret == 0 || ret == WANT_WRITE) { - int tmpRet = MakeMasterSecret(ssl); - if (tmpRet != 0) - ret = tmpRet; /* save WANT_WRITE unless more serious */ - ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; - } - /* No further need for PMS */ - XMEMSET(ssl->arrays->preMasterSecret, 0, ssl->arrays->preMasterSz); - ssl->arrays->preMasterSz = 0; - - return ret; - } - -#ifndef NO_CERTS - int SendCertificateVerify(CYASSL* ssl) - { - byte *output; - int sendSz = 0, length, ret; - word32 idx = 0; - word32 sigOutSz = 0; -#ifndef NO_RSA - RsaKey key; - int initRsaKey = 0; -#endif - int usingEcc = 0; -#ifdef HAVE_ECC - ecc_key eccKey; -#endif - - (void)idx; - - if (ssl->options.sendVerify == SEND_BLANK_CERT) - return 0; /* sent blank cert, can't verify */ - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, MAX_CERT_VERIFY_SZ)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - ret = BuildCertHashes(ssl, &ssl->certHashes); - if (ret != 0) - return ret; - -#ifdef HAVE_ECC - ecc_init(&eccKey); -#endif -#ifndef NO_RSA - ret = InitRsaKey(&key, ssl->heap); - if (ret == 0) initRsaKey = 1; - if (ret == 0) - ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &idx, &key, - ssl->buffers.key.length); - if (ret == 0) - sigOutSz = RsaEncryptSize(&key); - else -#endif - { - #ifdef HAVE_ECC - CYASSL_MSG("Trying ECC client cert, RSA didn't work"); - - idx = 0; - ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &idx, &eccKey, - ssl->buffers.key.length); - if (ret == 0) { - CYASSL_MSG("Using ECC client cert"); - usingEcc = 1; - sigOutSz = MAX_ENCODED_SIG_SZ; - } - else { - CYASSL_MSG("Bad client cert type"); - } - #endif - } - if (ret == 0) { - byte* verify = (byte*)&output[RECORD_HEADER_SZ + - HANDSHAKE_HEADER_SZ]; -#ifndef NO_OLD_TLS - byte* signBuffer = ssl->certHashes.md5; -#else - byte* signBuffer = NULL; -#endif - word32 signSz = FINISHED_SZ; - byte encodedSig[MAX_ENCODED_SIG_SZ]; - word32 extraSz = 0; /* tls 1.2 hash/sig */ - - (void)encodedSig; - (void)signSz; - (void)signBuffer; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - verify += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - #endif - length = sigOutSz; - if (IsAtLeastTLSv1_2(ssl)) { - verify[0] = ssl->suites->hashAlgo; - verify[1] = usingEcc ? ecc_dsa_sa_algo : rsa_sa_algo; - extraSz = HASH_SIG_SIZE; - } - - if (usingEcc) { -#ifdef HAVE_ECC - word32 localSz = MAX_ENCODED_SIG_SZ; - word32 digestSz; - byte* digest; - byte doUserEcc = 0; -#ifndef NO_OLD_TLS - /* old tls default */ - digestSz = SHA_DIGEST_SIZE; - digest = ssl->certHashes.sha; -#else - /* new tls default */ - digestSz = SHA256_DIGEST_SIZE; - digest = ssl->certHashes.sha256; -#endif - - #ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - if (ssl->ctx->EccSignCb) - doUserEcc = 1; - #endif /* HAVE_ECC */ - #endif /*HAVE_PK_CALLBACKS */ - - if (IsAtLeastTLSv1_2(ssl)) { - if (ssl->suites->hashAlgo == sha_mac) { - #ifndef NO_SHA - digest = ssl->certHashes.sha; - digestSz = SHA_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = ssl->certHashes.sha256; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = ssl->certHashes.sha384; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - } - - if (doUserEcc) { - #ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ret = ssl->ctx->EccSignCb(ssl, digest, digestSz, - encodedSig, &localSz, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->EccSignCtx); - #endif /* HAVE_ECC */ - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = ecc_sign_hash(digest, digestSz, encodedSig, - &localSz, ssl->rng, &eccKey); - } - if (ret == 0) { - length = localSz; - c16toa((word16)length, verify + extraSz); /* prepend hdr */ - XMEMCPY(verify + extraSz + VERIFY_HEADER,encodedSig,length); - } -#endif - } -#ifndef NO_RSA - else { - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaSignCb) - doUserRsa = 1; - #endif /*HAVE_PK_CALLBACKS */ - - if (IsAtLeastTLSv1_2(ssl)) { -#ifndef NO_OLD_TLS - byte* digest = ssl->certHashes.sha; - int digestSz = SHA_DIGEST_SIZE; - int typeH = SHAh; -#else - byte* digest = ssl->certHashes.sha256; - int digestSz = SHA256_DIGEST_SIZE; - int typeH = SHA256h; -#endif - - if (ssl->suites->hashAlgo == sha_mac) { - #ifndef NO_SHA - digest = ssl->certHashes.sha; - typeH = SHAh; - digestSz = SHA_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = ssl->certHashes.sha256; - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = ssl->certHashes.sha384; - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - - signSz = EncodeSignature(encodedSig, digest,digestSz,typeH); - signBuffer = encodedSig; - } - - c16toa((word16)length, verify + extraSz); /* prepend hdr */ - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - #ifndef NO_RSA - word32 ioLen = ENCRYPT_LEN; - ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, - verify + extraSz + VERIFY_HEADER, - &ioLen, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->RsaSignCtx); - #endif /* NO_RSA */ - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = RsaSSL_Sign(signBuffer, signSz, verify + extraSz + - VERIFY_HEADER, ENCRYPT_LEN, &key, ssl->rng); - } - - if (ret > 0) - ret = 0; /* RSA reset */ - } -#endif - if (ret == 0) { - AddHeaders(output, length + extraSz + VERIFY_HEADER, - certificate_verify, ssl); - - sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + length + - extraSz + VERIFY_HEADER; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - } - } -#ifndef NO_RSA - if (initRsaKey) - FreeRsaKey(&key); -#endif -#ifdef HAVE_ECC - ecc_free(&eccKey); -#endif - - if (ret == 0) { - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("CertificateVerify", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("CertificateVerify", &ssl->timeoutInfo, - output, sendSz, ssl->heap); - #endif - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - return 0; - else - return SendBuffered(ssl); - } - else - return ret; - } -#endif /* NO_CERTS */ - - -#endif /* NO_CYASSL_CLIENT */ - - -#ifndef NO_CYASSL_SERVER - - int SendServerHello(CYASSL* ssl) - { - byte *output; - word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int sendSz; - int ret; - - length = VERSION_SZ + RAN_LEN - + ID_LEN + ENUM_LEN - + SUITE_LEN - + ENUM_LEN; - -#ifdef HAVE_TLS_EXTENSIONS - length += TLSX_GetResponseSize(ssl); -#endif - - /* check for avalaible size */ - if ((ret = CheckAvailableSize(ssl, MAX_HELLO_SZ)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - AddHeaders(output, length, server_hello, ssl); - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - } - #endif - /* now write to output */ - /* first version */ - output[idx++] = ssl->version.major; - output[idx++] = ssl->version.minor; - - /* then random */ - if (!ssl->options.resuming) { - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, - RAN_LEN); - if (ret != 0) - return ret; - } - - XMEMCPY(output + idx, ssl->arrays->serverRandom, RAN_LEN); - idx += RAN_LEN; - -#ifdef SHOW_SECRETS - { - int j; - printf("server random: "); - for (j = 0; j < RAN_LEN; j++) - printf("%02x", ssl->arrays->serverRandom[j]); - printf("\n"); - } -#endif - /* then session id */ - output[idx++] = ID_LEN; - - if (!ssl->options.resuming) { - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->sessionID, ID_LEN); - if (ret != 0) - return ret; - } - - XMEMCPY(output + idx, ssl->arrays->sessionID, ID_LEN); - idx += ID_LEN; - - /* then cipher suite */ - output[idx++] = ssl->options.cipherSuite0; - output[idx++] = ssl->options.cipherSuite; - - /* then compression */ - if (ssl->options.usingCompression) - output[idx++] = ZLIB_COMPRESSION; - else - output[idx++] = NO_COMPRESSION; - - /* last, extensions */ -#ifdef HAVE_TLS_EXTENSIONS - if (IsTLS(ssl)) - TLSX_WriteResponse(ssl, output + idx); -#endif - - ssl->buffers.outputBuffer.length += sendSz; - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerHello", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ServerHello", &ssl->timeoutInfo, output, sendSz, - ssl->heap); - #endif - - ssl->options.serverState = SERVER_HELLO_COMPLETE; - - if (ssl->options.groupMessages) - return 0; - else - return SendBuffered(ssl); - } - - -#ifdef HAVE_ECC - - static byte SetCurveId(int size) - { - switch(size) { - case 20: - return secp160r1; - case 24: - return secp192r1; - case 28: - return secp224r1; - case 32: - return secp256r1; - case 48: - return secp384r1; - case 66: - return secp521r1; - default: - return 0; - } - } - -#endif /* HAVE_ECC */ - - - int SendServerKeyExchange(CYASSL* ssl) - { - int ret = 0; - (void)ssl; - - #ifndef NO_PSK - if (ssl->specs.kea == psk_kea) - { - byte *output; - word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int sendSz; - if (ssl->arrays->server_hint[0] == 0) return 0; /* don't send */ - - /* include size part */ - length = (word32)XSTRLEN(ssl->arrays->server_hint); - if (length > MAX_PSK_ID_LEN) return SERVER_HINT_ERROR; - length += HINT_LEN_SZ; - sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - } - #endif - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, length, server_key_exchange, ssl); - - /* key data */ - c16toa((word16)(length - HINT_LEN_SZ), output + idx); - idx += HINT_LEN_SZ; - XMEMCPY(output + idx, ssl->arrays->server_hint,length -HINT_LEN_SZ); - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, - output, sendSz, ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - ret = 0; - else - ret = SendBuffered(ssl); - ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; - } - #endif /*NO_PSK */ - - #ifdef HAVE_ECC - if (ssl->specs.kea == ecc_diffie_hellman_kea) - { - byte *output; - word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int sendSz; - byte exportBuf[MAX_EXPORT_ECC_SZ]; - word32 expSz = sizeof(exportBuf); - word32 sigSz; - word32 preSigSz, preSigIdx; -#ifndef NO_RSA - RsaKey rsaKey; -#endif - ecc_key dsaKey; - - if (ssl->specs.static_ecdh) { - CYASSL_MSG("Using Static ECDH, not sending ServerKeyExchagne"); - return 0; - } - - /* curve type, named curve, length(1) */ - length = ENUM_LEN + CURVE_LEN + ENUM_LEN; - /* pub key size */ - CYASSL_MSG("Using ephemeral ECDH"); - if (ecc_export_x963(ssl->eccTempKey, exportBuf, &expSz) != 0) - return ECC_EXPORT_ERROR; - length += expSz; - - preSigSz = length; - preSigIdx = idx; - -#ifndef NO_RSA - ret = InitRsaKey(&rsaKey, ssl->heap); - if (ret != 0) return ret; -#endif - ecc_init(&dsaKey); - - /* sig length */ - length += LENGTH_SZ; - - if (!ssl->buffers.key.buffer) { -#ifndef NO_RSA - FreeRsaKey(&rsaKey); -#endif - ecc_free(&dsaKey); - return NO_PRIVATE_KEY; - } - -#ifndef NO_RSA - if (ssl->specs.sig_algo == rsa_sa_algo) { - /* rsa sig size */ - word32 i = 0; - ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, - &rsaKey, ssl->buffers.key.length); - if (ret != 0) return ret; - sigSz = RsaEncryptSize(&rsaKey); - } else -#endif - if (ssl->specs.sig_algo == ecc_dsa_sa_algo) { - /* ecdsa sig size */ - word32 i = 0; - ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &i, - &dsaKey, ssl->buffers.key.length); - if (ret != 0) return ret; - sigSz = ecc_sig_size(&dsaKey); /* worst case estimate */ - } - else { -#ifndef NO_RSA - FreeRsaKey(&rsaKey); -#endif - ecc_free(&dsaKey); - return ALGO_ID_E; /* unsupported type */ - } - length += sigSz; - - if (IsAtLeastTLSv1_2(ssl)) - length += HASH_SIG_SIZE; - - sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - preSigIdx = idx; - } - #endif - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) { -#ifndef NO_RSA - FreeRsaKey(&rsaKey); -#endif - ecc_free(&dsaKey); - return ret; - } - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - /* record and message headers will be added below, when we're sure - of the sig length */ - - /* key exchange data */ - output[idx++] = named_curve; - output[idx++] = 0x00; /* leading zero */ - output[idx++] = SetCurveId(ecc_size(ssl->eccTempKey)); - output[idx++] = (byte)expSz; - XMEMCPY(output + idx, exportBuf, expSz); - idx += expSz; - if (IsAtLeastTLSv1_2(ssl)) { - output[idx++] = ssl->suites->hashAlgo; - output[idx++] = ssl->suites->sigAlgo; - } - - /* Signtaure length will be written later, when we're sure what it - is */ - - /* do signature */ - { -#ifndef NO_OLD_TLS - Md5 md5; - Sha sha; -#endif - byte hash[FINISHED_SZ]; - #ifndef NO_SHA256 - Sha256 sha256; - byte hash256[SHA256_DIGEST_SIZE]; - #endif - #ifdef CYASSL_SHA384 - Sha384 sha384; - byte hash384[SHA384_DIGEST_SIZE]; - #endif - -#ifndef NO_OLD_TLS - /* md5 */ - InitMd5(&md5); - Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); - Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); - Md5Update(&md5, output + preSigIdx, preSigSz); - Md5Final(&md5, hash); - - /* sha */ - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); - ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); - ShaUpdate(&sha, output + preSigIdx, preSigSz); - ShaFinal(&sha, &hash[MD5_DIGEST_SIZE]); -#endif - - #ifndef NO_SHA256 - ret = InitSha256(&sha256); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, output + preSigIdx, preSigSz); - if (ret != 0) - return ret; - ret = Sha256Final(&sha256, hash256); - if (ret != 0) - return ret; - #endif - - #ifdef CYASSL_SHA384 - ret = InitSha384(&sha384); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, output + preSigIdx, preSigSz); - if (ret != 0) - return ret; - ret = Sha384Final(&sha384, hash384); - if (ret != 0) - return ret; - #endif -#ifndef NO_RSA - if (ssl->suites->sigAlgo == rsa_sa_algo) { - byte* signBuffer = hash; - word32 signSz = sizeof(hash); - byte encodedSig[MAX_ENCODED_SIG_SZ]; - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaSignCb) - doUserRsa = 1; - #endif /*HAVE_PK_CALLBACKS */ - - if (IsAtLeastTLSv1_2(ssl)) { - byte* digest = &hash[MD5_DIGEST_SIZE]; - int typeH = SHAh; - int digestSz = SHA_DIGEST_SIZE; - - if (ssl->suites->hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = hash256; - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = hash384; - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - - signSz = EncodeSignature(encodedSig, digest, digestSz, - typeH); - signBuffer = encodedSig; - } - /* write sig size here */ - c16toa((word16)sigSz, output + idx); - idx += LENGTH_SZ; - - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - word32 ioLen = sigSz; - ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, - output + idx, - &ioLen, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->RsaSignCtx); - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = RsaSSL_Sign(signBuffer, signSz, output + idx, - sigSz, &rsaKey, ssl->rng); - if (ret > 0) - ret = 0; /* reset on success */ - } - FreeRsaKey(&rsaKey); - ecc_free(&dsaKey); - if (ret < 0) - return ret; - } else -#endif - if (ssl->suites->sigAlgo == ecc_dsa_sa_algo) { -#ifndef NO_OLD_TLS - byte* digest = &hash[MD5_DIGEST_SIZE]; - word32 digestSz = SHA_DIGEST_SIZE; -#else - byte* digest = hash256; - word32 digestSz = SHA256_DIGEST_SIZE; -#endif - word32 sz = sigSz; - byte doUserEcc = 0; - - #ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - if (ssl->ctx->EccSignCb) - doUserEcc = 1; - #endif /* HAVE_ECC */ - #endif /*HAVE_PK_CALLBACKS */ - - if (IsAtLeastTLSv1_2(ssl)) { - if (ssl->suites->hashAlgo == sha_mac) { - #ifndef NO_SHA - digest = &hash[MD5_DIGEST_SIZE]; - digestSz = SHA_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = hash256; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = hash384; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - } - - if (doUserEcc) { - #ifdef HAVE_PK_CALLBACKS - #ifdef HAVE_ECC - ret = ssl->ctx->EccSignCb(ssl, digest, digestSz, - output + LENGTH_SZ + idx, &sz, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->EccSignCtx); - #endif /* HAVE_ECC */ - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = ecc_sign_hash(digest, digestSz, - output + LENGTH_SZ + idx, &sz, ssl->rng, &dsaKey); - } -#ifndef NO_RSA - FreeRsaKey(&rsaKey); -#endif - ecc_free(&dsaKey); - if (ret < 0) return ret; - - /* Now that we know the real sig size, write it. */ - c16toa((word16)sz, output + idx); - - /* And adjust length and sendSz from estimates */ - length += sz - sigSz; - sendSz += sz - sigSz; - } - } - - AddHeaders(output, length, server_key_exchange, ssl); - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, - output, sendSz, ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - ret = 0; - else - ret = SendBuffered(ssl); - ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; - } - #endif /* HAVE_ECC */ - - #ifdef OPENSSL_EXTRA - if (ssl->specs.kea == diffie_hellman_kea) { - byte *output; - word32 length = 0, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int sendSz; - word32 sigSz = 0, i = 0; - word32 preSigSz = 0, preSigIdx = 0; - RsaKey rsaKey; - DhKey dhKey; - - if (ssl->buffers.serverDH_P.buffer == NULL || - ssl->buffers.serverDH_G.buffer == NULL) - return NO_DH_PARAMS; - - if (ssl->buffers.serverDH_Pub.buffer == NULL) { - ssl->buffers.serverDH_Pub.buffer = (byte*)XMALLOC( - ssl->buffers.serverDH_P.length + 2, ssl->ctx->heap, - DYNAMIC_TYPE_DH); - if (ssl->buffers.serverDH_Pub.buffer == NULL) - return MEMORY_E; - } - - if (ssl->buffers.serverDH_Priv.buffer == NULL) { - ssl->buffers.serverDH_Priv.buffer = (byte*)XMALLOC( - ssl->buffers.serverDH_P.length + 2, ssl->ctx->heap, - DYNAMIC_TYPE_DH); - if (ssl->buffers.serverDH_Priv.buffer == NULL) - return MEMORY_E; - } - - InitDhKey(&dhKey); - ret = DhSetKey(&dhKey, ssl->buffers.serverDH_P.buffer, - ssl->buffers.serverDH_P.length, - ssl->buffers.serverDH_G.buffer, - ssl->buffers.serverDH_G.length); - if (ret == 0) - ret = DhGenerateKeyPair(&dhKey, ssl->rng, - ssl->buffers.serverDH_Priv.buffer, - &ssl->buffers.serverDH_Priv.length, - ssl->buffers.serverDH_Pub.buffer, - &ssl->buffers.serverDH_Pub.length); - FreeDhKey(&dhKey); - - if (ret == 0) { - ret = InitRsaKey(&rsaKey, ssl->heap); - if (ret != 0) return ret; - } - if (ret == 0) { - length = LENGTH_SZ * 3; /* p, g, pub */ - length += ssl->buffers.serverDH_P.length + - ssl->buffers.serverDH_G.length + - ssl->buffers.serverDH_Pub.length; - - preSigIdx = idx; - preSigSz = length; - - /* sig length */ - length += LENGTH_SZ; - - if (!ssl->buffers.key.buffer) - return NO_PRIVATE_KEY; - - ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, &rsaKey, - ssl->buffers.key.length); - if (ret == 0) { - sigSz = RsaEncryptSize(&rsaKey); - length += sigSz; - } - } - if (ret != 0) { - FreeRsaKey(&rsaKey); - return ret; - } - - if (IsAtLeastTLSv1_2(ssl)) - length += HASH_SIG_SIZE; - - sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - preSigIdx = idx; - } - #endif - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) { - FreeRsaKey(&rsaKey); - return ret; - } - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, length, server_key_exchange, ssl); - - /* add p, g, pub */ - c16toa((word16)ssl->buffers.serverDH_P.length, output + idx); - idx += LENGTH_SZ; - XMEMCPY(output + idx, ssl->buffers.serverDH_P.buffer, - ssl->buffers.serverDH_P.length); - idx += ssl->buffers.serverDH_P.length; - - /* g */ - c16toa((word16)ssl->buffers.serverDH_G.length, output + idx); - idx += LENGTH_SZ; - XMEMCPY(output + idx, ssl->buffers.serverDH_G.buffer, - ssl->buffers.serverDH_G.length); - idx += ssl->buffers.serverDH_G.length; - - /* pub */ - c16toa((word16)ssl->buffers.serverDH_Pub.length, output + idx); - idx += LENGTH_SZ; - XMEMCPY(output + idx, ssl->buffers.serverDH_Pub.buffer, - ssl->buffers.serverDH_Pub.length); - idx += ssl->buffers.serverDH_Pub.length; - - /* Add signature */ - if (IsAtLeastTLSv1_2(ssl)) { - output[idx++] = ssl->suites->hashAlgo; - output[idx++] = ssl->suites->sigAlgo; - } - /* size */ - c16toa((word16)sigSz, output + idx); - idx += LENGTH_SZ; - - /* do signature */ - { -#ifndef NO_OLD_TLS - Md5 md5; - Sha sha; -#endif - byte hash[FINISHED_SZ]; - #ifndef NO_SHA256 - Sha256 sha256; - byte hash256[SHA256_DIGEST_SIZE]; - #endif - #ifdef CYASSL_SHA384 - Sha384 sha384; - byte hash384[SHA384_DIGEST_SIZE]; - #endif - -#ifndef NO_OLD_TLS - /* md5 */ - InitMd5(&md5); - Md5Update(&md5, ssl->arrays->clientRandom, RAN_LEN); - Md5Update(&md5, ssl->arrays->serverRandom, RAN_LEN); - Md5Update(&md5, output + preSigIdx, preSigSz); - Md5Final(&md5, hash); - - /* sha */ - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, ssl->arrays->clientRandom, RAN_LEN); - ShaUpdate(&sha, ssl->arrays->serverRandom, RAN_LEN); - ShaUpdate(&sha, output + preSigIdx, preSigSz); - ShaFinal(&sha, &hash[MD5_DIGEST_SIZE]); -#endif - - #ifndef NO_SHA256 - ret = InitSha256(&sha256); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha256Update(&sha256, output + preSigIdx, preSigSz); - if (ret != 0) - return ret; - ret = Sha256Final(&sha256, hash256); - if (ret != 0) - return ret; - #endif - - #ifdef CYASSL_SHA384 - ret = InitSha384(&sha384); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->clientRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, ssl->arrays->serverRandom, RAN_LEN); - if (ret != 0) - return ret; - ret = Sha384Update(&sha384, output + preSigIdx, preSigSz); - if (ret != 0) - return ret; - ret = Sha384Final(&sha384, hash384); - if (ret != 0) - return ret; - #endif -#ifndef NO_RSA - if (ssl->suites->sigAlgo == rsa_sa_algo) { - byte* signBuffer = hash; - word32 signSz = sizeof(hash); - byte encodedSig[MAX_ENCODED_SIG_SZ]; - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaSignCb) - doUserRsa = 1; - #endif /*HAVE_PK_CALLBACKS */ - - if (IsAtLeastTLSv1_2(ssl)) { - byte* digest = &hash[MD5_DIGEST_SIZE]; - int typeH = SHAh; - int digestSz = SHA_DIGEST_SIZE; - - if (ssl->suites->hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = hash256; - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (ssl->suites->hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = hash384; - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - - signSz = EncodeSignature(encodedSig, digest, digestSz, - typeH); - signBuffer = encodedSig; - } - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - word32 ioLen = sigSz; - ret = ssl->ctx->RsaSignCb(ssl, signBuffer, signSz, - output + idx, - &ioLen, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->RsaSignCtx); - #endif /*HAVE_PK_CALLBACKS */ - } - else { - ret = RsaSSL_Sign(signBuffer, signSz, output + idx, - sigSz, &rsaKey, ssl->rng); - } - FreeRsaKey(&rsaKey); - if (ret < 0) - return ret; - } -#endif - } - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return ret; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ServerKeyExchange", &ssl->timeoutInfo, - output, sendSz, ssl->heap); - #endif - - ssl->buffers.outputBuffer.length += sendSz; - if (ssl->options.groupMessages) - ret = 0; - else - ret = SendBuffered(ssl); - ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE; - } - #endif /* OPENSSL_EXTRA */ - - return ret; - } - - - /* cipher requirements */ - enum { - REQUIRES_RSA, - REQUIRES_DHE, - REQUIRES_ECC_DSA, - REQUIRES_ECC_STATIC, - REQUIRES_PSK, - REQUIRES_NTRU, - REQUIRES_RSA_SIG - }; - - - - /* Does this cipher suite (first, second) have the requirement - an ephemeral key exchange will still require the key for signing - the key exchange so ECHDE_RSA requires an rsa key thus rsa_kea */ - static int CipherRequires(byte first, byte second, int requirement) - { - /* ECC extensions */ - if (first == ECC_BYTE) { - - switch (second) { - -#ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; - -#ifndef NO_DES3 - case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; -#endif - -#ifndef NO_RC4 - case TLS_ECDHE_RSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDH_RSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; -#endif -#endif /* NO_RSA */ - -#ifndef NO_DES3 - case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; -#endif -#ifndef NO_RC4 - case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; -#endif -#ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; -#endif - - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; - - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; - - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; - -#ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; - - case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_ECC_STATIC) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; - - case TLS_RSA_WITH_AES_128_CCM_8 : - case TLS_RSA_WITH_AES_256_CCM_8 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; - - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - break; - - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : - if (requirement == REQUIRES_RSA_SIG) - return 1; - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; -#endif - - case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 : - case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : - if (requirement == REQUIRES_ECC_DSA) - return 1; - break; - - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : - if (requirement == REQUIRES_ECC_DSA) - return 1; - if (requirement == REQUIRES_ECC_STATIC) - return 1; - break; - - case TLS_PSK_WITH_AES_128_CCM: - case TLS_PSK_WITH_AES_256_CCM: - case TLS_PSK_WITH_AES_128_CCM_8: - case TLS_PSK_WITH_AES_256_CCM_8: - if (requirement == REQUIRES_PSK) - return 1; - break; - - default: - CYASSL_MSG("Unsupported cipher suite, CipherRequires ECC"); - return 0; - } /* switch */ - } /* if */ - if (first != ECC_BYTE) { /* normal suites */ - switch (second) { - -#ifndef NO_RSA - case SSL_RSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_NTRU_RSA_WITH_RC4_128_SHA : - if (requirement == REQUIRES_NTRU) - return 1; - break; - - case SSL_RSA_WITH_RC4_128_MD5 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case SSL_RSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : - if (requirement == REQUIRES_NTRU) - return 1; - break; - - case TLS_RSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_AES_128_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_NTRU) - return 1; - break; - - case TLS_RSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_AES_256_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_NULL_SHA : - case TLS_RSA_WITH_NULL_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_NTRU) - return 1; - break; -#endif - - case TLS_PSK_WITH_AES_128_CBC_SHA256 : - case TLS_PSK_WITH_AES_128_CBC_SHA : - case TLS_PSK_WITH_AES_256_CBC_SHA : - case TLS_PSK_WITH_NULL_SHA256 : - case TLS_PSK_WITH_NULL_SHA : - if (requirement == REQUIRES_PSK) - return 1; - break; - -#ifndef NO_RSA - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; - - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; - - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; - - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; - - case TLS_RSA_WITH_HC_128_MD5 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_HC_128_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_HC_128_B2B256: - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_AES_128_CBC_B2B256: - case TLS_RSA_WITH_AES_256_CBC_B2B256: - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_RABBIT_SHA : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_RSA_WITH_AES_128_GCM_SHA256 : - case TLS_RSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : - case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; - - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - break; - - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - if (requirement == REQUIRES_RSA) - return 1; - if (requirement == REQUIRES_RSA_SIG) - return 1; - if (requirement == REQUIRES_DHE) - return 1; - break; -#endif - - default: - CYASSL_MSG("Unsupported cipher suite, CipherRequires"); - return 0; - } /* switch */ - } /* if ECC / Normal suites else */ - - return 0; - } - - - /* Make sure client setup is valid for this suite, true on success */ - int VerifyClientSuite(CYASSL* ssl) - { - int havePSK = 0; - byte first = ssl->options.cipherSuite0; - byte second = ssl->options.cipherSuite; - - CYASSL_ENTER("VerifyClientSuite"); - - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - - if (CipherRequires(first, second, REQUIRES_PSK)) { - CYASSL_MSG("Requires PSK"); - if (havePSK == 0) { - CYASSL_MSG("Don't have PSK"); - return 0; - } - } - - return 1; /* success */ - } - - - /* Make sure server cert/key are valid for this suite, true on success */ - static int VerifyServerSuite(CYASSL* ssl, word16 idx) - { - int haveRSA = !ssl->options.haveStaticECC; - int havePSK = 0; - byte first; - byte second; - - CYASSL_ENTER("VerifyServerSuite"); - - if (ssl->suites == NULL) { - CYASSL_MSG("Suites pointer error"); - return 0; - } - - first = ssl->suites->suites[idx]; - second = ssl->suites->suites[idx+1]; - - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - - if (ssl->options.haveNTRU) - haveRSA = 0; - - if (CipherRequires(first, second, REQUIRES_RSA)) { - CYASSL_MSG("Requires RSA"); - if (haveRSA == 0) { - CYASSL_MSG("Don't have RSA"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_DHE)) { - CYASSL_MSG("Requires DHE"); - if (ssl->options.haveDH == 0) { - CYASSL_MSG("Don't have DHE"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_ECC_DSA)) { - CYASSL_MSG("Requires ECCDSA"); - if (ssl->options.haveECDSAsig == 0) { - CYASSL_MSG("Don't have ECCDSA"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_ECC_STATIC)) { - CYASSL_MSG("Requires static ECC"); - if (ssl->options.haveStaticECC == 0) { - CYASSL_MSG("Don't have static ECC"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_PSK)) { - CYASSL_MSG("Requires PSK"); - if (havePSK == 0) { - CYASSL_MSG("Don't have PSK"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_NTRU)) { - CYASSL_MSG("Requires NTRU"); - if (ssl->options.haveNTRU == 0) { - CYASSL_MSG("Don't have NTRU"); - return 0; - } - } - - if (CipherRequires(first, second, REQUIRES_RSA_SIG)) { - CYASSL_MSG("Requires RSA Signature"); - if (ssl->options.side == CYASSL_SERVER_END && - ssl->options.haveECDSAsig == 1) { - CYASSL_MSG("Don't have RSA Signature"); - return 0; - } - } - -#ifdef HAVE_SUPPORTED_CURVES - if (!TLSX_ValidateEllipticCurves(ssl, first, second)) { - CYASSL_MSG("Don't have matching curves"); - return 0; - } -#endif - - /* ECCDHE is always supported if ECC on */ - - return 1; - } - - - static int MatchSuite(CYASSL* ssl, Suites* peerSuites) - { - word16 i, j; - - CYASSL_ENTER("MatchSuite"); - - /* & 0x1 equivalent % 2 */ - if (peerSuites->suiteSz == 0 || peerSuites->suiteSz & 0x1) - return MATCH_SUITE_ERROR; - - if (ssl->suites == NULL) - return SUITES_ERROR; - /* start with best, if a match we are good */ - for (i = 0; i < ssl->suites->suiteSz; i += 2) - for (j = 0; j < peerSuites->suiteSz; j += 2) - if (ssl->suites->suites[i] == peerSuites->suites[j] && - ssl->suites->suites[i+1] == peerSuites->suites[j+1] ) { - - if (VerifyServerSuite(ssl, i)) { - int result; - CYASSL_MSG("Verified suite validity"); - ssl->options.cipherSuite0 = ssl->suites->suites[i]; - ssl->options.cipherSuite = ssl->suites->suites[i+1]; - result = SetCipherSpecs(ssl); - if (result == 0) - PickHashSigAlgo(ssl, peerSuites->hashSigAlgo, - peerSuites->hashSigAlgoSz); - return result; - } - else { - CYASSL_MSG("Could not verify suite validity, continue"); - } - } - - return MATCH_SUITE_ERROR; - } - - - /* process old style client hello, deprecate? */ - int ProcessOldClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 inSz, word16 sz) - { - word32 idx = *inOutIdx; - word16 sessionSz; - word16 randomSz; - word16 i, j; - ProtocolVersion pv; - Suites clSuites; - - (void)inSz; - CYASSL_MSG("Got old format client hello"); -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ClientHello", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("ClientHello", &ssl->timeoutInfo); -#endif - - /* manually hash input since different format */ -#ifndef NO_OLD_TLS -#ifndef NO_MD5 - Md5Update(&ssl->hashMd5, input + idx, sz); -#endif -#ifndef NO_SHA - ShaUpdate(&ssl->hashSha, input + idx, sz); -#endif -#endif -#ifndef NO_SHA256 - if (IsAtLeastTLSv1_2(ssl)) { - int shaRet = Sha256Update(&ssl->hashSha256, input + idx, sz); - - if (shaRet != 0) - return shaRet; - } -#endif - - /* does this value mean client_hello? */ - idx++; - - /* version */ - pv.major = input[idx++]; - pv.minor = input[idx++]; - ssl->chVersion = pv; /* store */ - - if (ssl->version.minor > pv.minor) { - byte haveRSA = 0; - byte havePSK = 0; - if (!ssl->options.downgrade) { - CYASSL_MSG("Client trying to connect with lesser version"); - return VERSION_ERROR; - } - if (pv.minor == SSLv3_MINOR) { - /* turn off tls */ - CYASSL_MSG(" downgrading to SSLv3"); - ssl->options.tls = 0; - ssl->options.tls1_1 = 0; - ssl->version.minor = SSLv3_MINOR; - } - else if (pv.minor == TLSv1_MINOR) { - CYASSL_MSG(" downgrading to TLSv1"); - /* turn off tls 1.1+ */ - ssl->options.tls1_1 = 0; - ssl->version.minor = TLSv1_MINOR; - } - else if (pv.minor == TLSv1_1_MINOR) { - CYASSL_MSG(" downgrading to TLSv1.1"); - ssl->version.minor = TLSv1_1_MINOR; - } -#ifndef NO_RSA - haveRSA = 1; -#endif -#ifndef NO_PSK - havePSK = ssl->options.havePSK; -#endif - - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - } - - /* suite size */ - ato16(&input[idx], &clSuites.suiteSz); - idx += 2; - - if (clSuites.suiteSz > MAX_SUITE_SZ) - return BUFFER_ERROR; - clSuites.hashSigAlgoSz = 0; - - /* session size */ - ato16(&input[idx], &sessionSz); - idx += 2; - - if (sessionSz > ID_LEN) - return BUFFER_ERROR; - - /* random size */ - ato16(&input[idx], &randomSz); - idx += 2; - - if (randomSz > RAN_LEN) - return BUFFER_ERROR; - - /* suites */ - for (i = 0, j = 0; i < clSuites.suiteSz; i += 3) { - byte first = input[idx++]; - if (!first) { /* implicit: skip sslv2 type */ - XMEMCPY(&clSuites.suites[j], &input[idx], 2); - j += 2; - } - idx += 2; - } - clSuites.suiteSz = j; - - /* session id */ - if (sessionSz) { - XMEMCPY(ssl->arrays->sessionID, input + idx, sessionSz); - idx += sessionSz; - ssl->options.resuming = 1; - } - - /* random */ - if (randomSz < RAN_LEN) - XMEMSET(ssl->arrays->clientRandom, 0, RAN_LEN - randomSz); - XMEMCPY(&ssl->arrays->clientRandom[RAN_LEN - randomSz], input + idx, - randomSz); - idx += randomSz; - - if (ssl->options.usingCompression) - ssl->options.usingCompression = 0; /* turn off */ - - ssl->options.clientState = CLIENT_HELLO_COMPLETE; - *inOutIdx = idx; - - ssl->options.haveSessionId = 1; - /* DoClientHello uses same resume code */ - if (ssl->options.resuming) { /* let's try */ - int ret = -1; - CYASSL_SESSION* session = GetSession(ssl,ssl->arrays->masterSecret); - if (!session) { - CYASSL_MSG("Session lookup for resume failed"); - ssl->options.resuming = 0; - } else { - if (MatchSuite(ssl, &clSuites) < 0) { - CYASSL_MSG("Unsupported cipher suite, OldClientHello"); - return UNSUPPORTED_SUITE; - } - #ifdef SESSION_CERTS - ssl->session = *session; /* restore session certs. */ - #endif - - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, - RAN_LEN); - if (ret != 0) - return ret; - - #ifdef NO_OLD_TLS - ret = DeriveTlsKeys(ssl); - #else - #ifndef NO_TLS - if (ssl->options.tls) - ret = DeriveTlsKeys(ssl); - #endif - if (!ssl->options.tls) - ret = DeriveKeys(ssl); - #endif - ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; - - return ret; - } - } - - return MatchSuite(ssl, &clSuites); - } - - - static int DoClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx, - word32 helloSz) - { - byte b; - ProtocolVersion pv; - Suites clSuites; - word32 i = *inOutIdx; - word32 begin = i; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) AddPacketName("ClientHello", &ssl->handShakeInfo); - if (ssl->toInfoOn) AddLateName("ClientHello", &ssl->timeoutInfo); -#endif - - /* protocol version, random and session id length check */ - if ((i - begin) + OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz) - return BUFFER_ERROR; - - /* protocol version */ - XMEMCPY(&pv, input + i, OPAQUE16_LEN); - ssl->chVersion = pv; /* store */ - i += OPAQUE16_LEN; - - if (ssl->version.minor > pv.minor) { - byte haveRSA = 0; - byte havePSK = 0; - - if (!ssl->options.downgrade) { - CYASSL_MSG("Client trying to connect with lesser version"); - return VERSION_ERROR; - } - - if (pv.minor == SSLv3_MINOR) { - /* turn off tls */ - CYASSL_MSG(" downgrading to SSLv3"); - ssl->options.tls = 0; - ssl->options.tls1_1 = 0; - ssl->version.minor = SSLv3_MINOR; - } - else if (pv.minor == TLSv1_MINOR) { - /* turn off tls 1.1+ */ - CYASSL_MSG(" downgrading to TLSv1"); - ssl->options.tls1_1 = 0; - ssl->version.minor = TLSv1_MINOR; - } - else if (pv.minor == TLSv1_1_MINOR) { - CYASSL_MSG(" downgrading to TLSv1.1"); - ssl->version.minor = TLSv1_1_MINOR; - } -#ifndef NO_RSA - haveRSA = 1; -#endif -#ifndef NO_PSK - havePSK = ssl->options.havePSK; -#endif - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - } - - /* random */ - XMEMCPY(ssl->arrays->clientRandom, input + i, RAN_LEN); - i += RAN_LEN; - -#ifdef SHOW_SECRETS - { - int j; - printf("client random: "); - for (j = 0; j < RAN_LEN; j++) - printf("%02x", ssl->arrays->clientRandom[j]); - printf("\n"); - } -#endif - - /* session id */ - b = input[i++]; - - if (b == ID_LEN) { - if ((i - begin) + ID_LEN > helloSz) - return BUFFER_ERROR; - - XMEMCPY(ssl->arrays->sessionID, input + i, ID_LEN); - i += ID_LEN; - ssl->options.resuming = 1; /* client wants to resume */ - CYASSL_MSG("Client wants to resume session"); - } - else if (b) { - CYASSL_MSG("Invalid session ID size"); - return BUFFER_ERROR; /* session ID nor 0 neither 32 bytes long */ - } - - #ifdef CYASSL_DTLS - /* cookie */ - if (ssl->options.dtls) { - - if ((i - begin) + OPAQUE8_LEN > helloSz) - return BUFFER_ERROR; - - b = input[i++]; - - if (b) { - byte cookie[MAX_COOKIE_LEN]; - - if (b > MAX_COOKIE_LEN) - return BUFFER_ERROR; - - if ((i - begin) + b > helloSz) - return BUFFER_ERROR; - - if (ssl->ctx->CBIOCookie == NULL) { - CYASSL_MSG("Your Cookie callback is null, please set"); - return COOKIE_ERROR; - } - - if ((ssl->ctx->CBIOCookie(ssl, cookie, COOKIE_SZ, - ssl->IOCB_CookieCtx) != COOKIE_SZ) - || (b != COOKIE_SZ) - || (XMEMCMP(cookie, input + i, b) != 0)) { - return COOKIE_ERROR; - } - - i += b; - } - } - #endif - - /* suites */ - if ((i - begin) + OPAQUE16_LEN > helloSz) - return BUFFER_ERROR; - - ato16(&input[i], &clSuites.suiteSz); - i += OPAQUE16_LEN; - - /* suites and compression length check */ - if ((i - begin) + clSuites.suiteSz + OPAQUE8_LEN > helloSz) - return BUFFER_ERROR; - - if (clSuites.suiteSz > MAX_SUITE_SZ) - return BUFFER_ERROR; - - XMEMCPY(clSuites.suites, input + i, clSuites.suiteSz); - i += clSuites.suiteSz; - clSuites.hashSigAlgoSz = 0; - - /* compression length */ - b = input[i++]; - - if ((i - begin) + b > helloSz) - return BUFFER_ERROR; - - if (ssl->options.usingCompression) { - int match = 0; - - while (b--) { - byte comp = input[i++]; - - if (comp == ZLIB_COMPRESSION) - match = 1; - } - - if (!match) { - CYASSL_MSG("Not matching compression, turning off"); - ssl->options.usingCompression = 0; /* turn off */ - } - } - else - i += b; /* ignore, since we're not on */ - - *inOutIdx = i; - - /* tls extensions */ - if ((i - begin) < helloSz) { -#ifdef HAVE_TLS_EXTENSIONS - if (IsTLS(ssl)) { - int ret = 0; -#else - if (IsAtLeastTLSv1_2(ssl)) { -#endif - /* Process the hello extension. Skip unsupported. */ - word16 totalExtSz; - - if ((i - begin) + OPAQUE16_LEN > helloSz) - return BUFFER_ERROR; - - ato16(&input[i], &totalExtSz); - i += OPAQUE16_LEN; - - if ((i - begin) + totalExtSz > helloSz) - return BUFFER_ERROR; - -#ifdef HAVE_TLS_EXTENSIONS - if ((ret = TLSX_Parse(ssl, (byte *) input + i, - totalExtSz, 1, &clSuites))) - return ret; - - i += totalExtSz; -#else - while (totalExtSz) { - word16 extId, extSz; - - if (OPAQUE16_LEN + OPAQUE16_LEN > totalExtSz) - return BUFFER_ERROR; - - ato16(&input[i], &extId); - i += OPAQUE16_LEN; - ato16(&input[i], &extSz); - i += OPAQUE16_LEN; - - if (OPAQUE16_LEN + OPAQUE16_LEN + extSz > totalExtSz) - return BUFFER_ERROR; - - if (extId == HELLO_EXT_SIG_ALGO) { - ato16(&input[i], &clSuites.hashSigAlgoSz); - i += OPAQUE16_LEN; - - if (OPAQUE16_LEN + clSuites.hashSigAlgoSz > extSz) - return BUFFER_ERROR; - - XMEMCPY(clSuites.hashSigAlgo, &input[i], - min(clSuites.hashSigAlgoSz, HELLO_EXT_SIGALGO_MAX)); - i += clSuites.hashSigAlgoSz; - } - else - i += extSz; - - totalExtSz -= OPAQUE16_LEN + OPAQUE16_LEN + extSz; - } -#endif - *inOutIdx = i; - } - else - *inOutIdx = begin + helloSz; /* skip extensions */ - } - - ssl->options.clientState = CLIENT_HELLO_COMPLETE; - ssl->options.haveSessionId = 1; - - /* ProcessOld uses same resume code */ - if (ssl->options.resuming && (!ssl->options.dtls || - ssl->options.acceptState == HELLO_VERIFY_SENT)) { /* let's try */ - int ret = -1; - CYASSL_SESSION* session = GetSession(ssl,ssl->arrays->masterSecret); - - if (!session) { - CYASSL_MSG("Session lookup for resume failed"); - ssl->options.resuming = 0; - } - else { - if (MatchSuite(ssl, &clSuites) < 0) { - CYASSL_MSG("Unsupported cipher suite, ClientHello"); - return UNSUPPORTED_SUITE; - } - #ifdef SESSION_CERTS - ssl->session = *session; /* restore session certs. */ - #endif - - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, - RAN_LEN); - if (ret != 0) - return ret; - - #ifdef NO_OLD_TLS - ret = DeriveTlsKeys(ssl); - #else - #ifndef NO_TLS - if (ssl->options.tls) - ret = DeriveTlsKeys(ssl); - #endif - if (!ssl->options.tls) - ret = DeriveKeys(ssl); - #endif - ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; - - return ret; - } - } - return MatchSuite(ssl, &clSuites); - } - -#if !defined(NO_RSA) || defined(HAVE_ECC) - static int DoCertificateVerify(CYASSL* ssl, byte* input, word32* inOutIdx, - word32 size) - { - word16 sz = 0; - int ret = VERIFY_CERT_ERROR; /* start in error state */ - byte hashAlgo = sha_mac; - byte sigAlgo = anonymous_sa_algo; - word32 begin = *inOutIdx; - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("CertificateVerify", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("CertificateVerify", &ssl->timeoutInfo); - #endif - - - if (IsAtLeastTLSv1_2(ssl)) { - if ((*inOutIdx - begin) + ENUM_LEN + ENUM_LEN > size) - return BUFFER_ERROR; - - hashAlgo = input[(*inOutIdx)++]; - sigAlgo = input[(*inOutIdx)++]; - } - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &sz); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + sz > size || sz > ENCRYPT_LEN) - return BUFFER_ERROR; - - /* RSA */ -#ifndef NO_RSA - if (ssl->peerRsaKeyPresent != 0) { - byte* out = NULL; - int outLen = 0; - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaVerifyCb) - doUserRsa = 1; - #endif /*HAVE_PK_CALLBACKS */ - - CYASSL_MSG("Doing RSA peer cert verify"); - - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - outLen = ssl->ctx->RsaVerifyCb(ssl, input + *inOutIdx, sz, - &out, - ssl->buffers.peerRsaKey.buffer, - ssl->buffers.peerRsaKey.length, - ssl->RsaVerifyCtx); - #endif /*HAVE_PK_CALLBACKS */ - } - else { - outLen = RsaSSL_VerifyInline(input + *inOutIdx, sz, &out, - ssl->peerRsaKey); - } - - if (IsAtLeastTLSv1_2(ssl)) { - byte encodedSig[MAX_ENCODED_SIG_SZ]; - word32 sigSz; - byte* digest = ssl->certHashes.sha; - int typeH = SHAh; - int digestSz = SHA_DIGEST_SIZE; - - if (sigAlgo != rsa_sa_algo) { - CYASSL_MSG("Oops, peer sent RSA key but not in verify"); - } - - if (hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = ssl->certHashes.sha256; - typeH = SHA256h; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = ssl->certHashes.sha384; - typeH = SHA384h; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - - sigSz = EncodeSignature(encodedSig, digest, digestSz, typeH); - - if (outLen == (int)sigSz && out && XMEMCMP(out, encodedSig, - min(sigSz, MAX_ENCODED_SIG_SZ)) == 0) - ret = 0; /* verified */ - } - else { - if (outLen == FINISHED_SZ && out && XMEMCMP(out, - &ssl->certHashes, FINISHED_SZ) == 0) - ret = 0; /* verified */ - } - } -#endif -#ifdef HAVE_ECC - if (ssl->peerEccDsaKeyPresent) { - int verify = 0; - int err = -1; - byte* digest = ssl->certHashes.sha; - word32 digestSz = SHA_DIGEST_SIZE; - byte doUserEcc = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->EccVerifyCb) - doUserEcc = 1; - #endif - - CYASSL_MSG("Doing ECC peer cert verify"); - - if (IsAtLeastTLSv1_2(ssl)) { - if (sigAlgo != ecc_dsa_sa_algo) { - CYASSL_MSG("Oops, peer sent ECC key but not in verify"); - } - - if (hashAlgo == sha256_mac) { - #ifndef NO_SHA256 - digest = ssl->certHashes.sha256; - digestSz = SHA256_DIGEST_SIZE; - #endif - } - else if (hashAlgo == sha384_mac) { - #ifdef CYASSL_SHA384 - digest = ssl->certHashes.sha384; - digestSz = SHA384_DIGEST_SIZE; - #endif - } - } - - if (doUserEcc) { - #ifdef HAVE_PK_CALLBACKS - ret = ssl->ctx->EccVerifyCb(ssl, input + *inOutIdx, sz, digest, - digestSz, - ssl->buffers.peerEccDsaKey.buffer, - ssl->buffers.peerEccDsaKey.length, - &verify, ssl->EccVerifyCtx); - #endif - } - else { - err = ecc_verify_hash(input + *inOutIdx, sz, digest, digestSz, - &verify, ssl->peerEccDsaKey); - } - - if (err == 0 && verify == 1) - ret = 0; /* verified */ - } -#endif - *inOutIdx += sz; - - if (ret == 0) - ssl->options.havePeerVerify = 1; - - return ret; - } -#endif /* !NO_RSA || HAVE_ECC */ - - int SendServerHelloDone(CYASSL* ssl) - { - byte *output; - int sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; - int ret; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA; - #endif - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, 0, server_hello_done, ssl); - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) - return 0; - } - #endif - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ServerHelloDone", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("ServerHelloDone", &ssl->timeoutInfo, output, sendSz, - ssl->heap); -#endif - ssl->options.serverState = SERVER_HELLODONE_COMPLETE; - - ssl->buffers.outputBuffer.length += sendSz; - - return SendBuffered(ssl); - } - -#ifdef CYASSL_DTLS - int SendHelloVerifyRequest(CYASSL* ssl) - { - byte* output; - byte cookieSz = COOKIE_SZ; - int length = VERSION_SZ + ENUM_LEN + cookieSz; - int idx = DTLS_RECORD_HEADER_SZ + DTLS_HANDSHAKE_HEADER_SZ; - int sendSz = length + idx; - int ret; - - /* check for available size */ - if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) - return ret; - - /* get ouput buffer */ - output = ssl->buffers.outputBuffer.buffer + - ssl->buffers.outputBuffer.length; - - AddHeaders(output, length, hello_verify_request, ssl); - - output[idx++] = ssl->chVersion.major; - output[idx++] = ssl->chVersion.minor; - - output[idx++] = cookieSz; - if (ssl->ctx->CBIOCookie == NULL) { - CYASSL_MSG("Your Cookie callback is null, please set"); - return COOKIE_ERROR; - } - if ((ret = ssl->ctx->CBIOCookie(ssl, output + idx, cookieSz, - ssl->IOCB_CookieCtx)) < 0) - return ret; - - ret = HashOutput(ssl, output, sendSz, 0); - if (ret != 0) - return ret; - -#ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("HelloVerifyRequest", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddPacketInfo("HelloVerifyRequest", &ssl->timeoutInfo, output, - sendSz, ssl->heap); -#endif - ssl->options.serverState = SERVER_HELLOVERIFYREQUEST_COMPLETE; - - ssl->buffers.outputBuffer.length += sendSz; - - return SendBuffered(ssl); - } -#endif - - static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32* inOutIdx, - word32 size) - { - int ret = 0; - word32 length = 0; - byte* out = NULL; - word32 begin = *inOutIdx; - - (void)length; /* shut up compiler warnings */ - (void)out; - (void)input; - (void)size; - - if (ssl->options.side != CYASSL_SERVER_END) { - CYASSL_MSG("Client received client keyexchange, attack?"); - CYASSL_ERROR(ssl->error = SIDE_ERROR); - return SSL_FATAL_ERROR; - } - - if (ssl->options.clientState < CLIENT_HELLO_COMPLETE) { - CYASSL_MSG("Client sending keyexchange at wrong time"); - SendAlert(ssl, alert_fatal, unexpected_message); - return OUT_OF_ORDER_E; - } - - #ifndef NO_CERTS - if (ssl->options.verifyPeer && ssl->options.failNoCert) - if (!ssl->options.havePeerCert) { - CYASSL_MSG("client didn't present peer cert"); - return NO_PEER_CERT; - } - #endif - - #ifdef CYASSL_CALLBACKS - if (ssl->hsInfoOn) - AddPacketName("ClientKeyExchange", &ssl->handShakeInfo); - if (ssl->toInfoOn) - AddLateName("ClientKeyExchange", &ssl->timeoutInfo); - #endif - - switch (ssl->specs.kea) { - #ifndef NO_RSA - case rsa_kea: - { - word32 idx = 0; - RsaKey key; - byte doUserRsa = 0; - - #ifdef HAVE_PK_CALLBACKS - if (ssl->ctx->RsaDecCb) - doUserRsa = 1; - #endif - - ret = InitRsaKey(&key, ssl->heap); - if (ret != 0) return ret; - - if (ssl->buffers.key.buffer) - ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &idx, - &key, ssl->buffers.key.length); - else - return NO_PRIVATE_KEY; - - if (ret == 0) { - length = RsaEncryptSize(&key); - ssl->arrays->preMasterSz = SECRET_LEN; - - if (ssl->options.tls) { - word16 check; - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &check); - *inOutIdx += OPAQUE16_LEN; - - if ((word32) check != length) { - CYASSL_MSG("RSA explicit size doesn't match"); - FreeRsaKey(&key); - return RSA_PRIVATE_ERROR; - } - } - - if ((*inOutIdx - begin) + length > size) { - CYASSL_MSG("RSA message too big"); - FreeRsaKey(&key); - return BUFFER_ERROR; - } - - if (doUserRsa) { - #ifdef HAVE_PK_CALLBACKS - ret = ssl->ctx->RsaDecCb(ssl, - input + *inOutIdx, length, &out, - ssl->buffers.key.buffer, - ssl->buffers.key.length, - ssl->RsaDecCtx); - #endif - } - else { - ret = RsaPrivateDecryptInline(input + *inOutIdx, length, - &out, &key); - } - - *inOutIdx += length; - - if (ret == SECRET_LEN) { - XMEMCPY(ssl->arrays->preMasterSecret, out, SECRET_LEN); - if (ssl->arrays->preMasterSecret[0] != - ssl->chVersion.major - || ssl->arrays->preMasterSecret[1] != - ssl->chVersion.minor) - ret = PMS_VERSION_ERROR; - else - ret = MakeMasterSecret(ssl); - } - else { - ret = RSA_PRIVATE_ERROR; - } - } - - FreeRsaKey(&key); - } - break; - #endif - #ifndef NO_PSK - case psk_kea: - { - byte* pms = ssl->arrays->preMasterSecret; - word16 ci_sz; - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &ci_sz); - *inOutIdx += OPAQUE16_LEN; - - if (ci_sz > MAX_PSK_ID_LEN) - return CLIENT_ID_ERROR; - - if ((*inOutIdx - begin) + ci_sz > size) - return BUFFER_ERROR; - - XMEMCPY(ssl->arrays->client_identity, input + *inOutIdx, ci_sz); - *inOutIdx += ci_sz; - - ssl->arrays->client_identity[min(ci_sz, MAX_PSK_ID_LEN-1)] = 0; - ssl->arrays->psk_keySz = ssl->options.server_psk_cb(ssl, - ssl->arrays->client_identity, ssl->arrays->psk_key, - MAX_PSK_KEY_LEN); - - if (ssl->arrays->psk_keySz == 0 || - ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) - return PSK_KEY_ERROR; - - /* make psk pre master secret */ - /* length of key + length 0s + length of key + key */ - c16toa((word16) ssl->arrays->psk_keySz, pms); - pms += OPAQUE16_LEN; - - XMEMSET(pms, 0, ssl->arrays->psk_keySz); - pms += ssl->arrays->psk_keySz; - - c16toa((word16) ssl->arrays->psk_keySz, pms); - pms += OPAQUE16_LEN; - - XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz); - ssl->arrays->preMasterSz = ssl->arrays->psk_keySz * 2 + 4; - - ret = MakeMasterSecret(ssl); - - /* No further need for PSK */ - XMEMSET(ssl->arrays->psk_key, 0, ssl->arrays->psk_keySz); - ssl->arrays->psk_keySz = 0; - } - break; - #endif /* NO_PSK */ - #ifdef HAVE_NTRU - case ntru_kea: - { - word16 cipherLen; - word16 plainLen = sizeof(ssl->arrays->preMasterSecret); - - if (!ssl->buffers.key.buffer) - return NO_PRIVATE_KEY; - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &cipherLen); - *inOutIdx += OPAQUE16_LEN; - - if (cipherLen > MAX_NTRU_ENCRYPT_SZ) - return NTRU_KEY_ERROR; - - if ((*inOutIdx - begin) + cipherLen > size) - return BUFFER_ERROR; - - if (NTRU_OK != crypto_ntru_decrypt( - (word16) ssl->buffers.key.length, - ssl->buffers.key.buffer, cipherLen, - input + *inOutIdx, &plainLen, - ssl->arrays->preMasterSecret)) - return NTRU_DECRYPT_ERROR; - - if (plainLen != SECRET_LEN) - return NTRU_DECRYPT_ERROR; - - *inOutIdx += cipherLen; - - ssl->arrays->preMasterSz = plainLen; - ret = MakeMasterSecret(ssl); - } - break; - #endif /* HAVE_NTRU */ - #ifdef HAVE_ECC - case ecc_diffie_hellman_kea: - { - if ((*inOutIdx - begin) + OPAQUE8_LEN > size) - return BUFFER_ERROR; - - length = input[(*inOutIdx)++]; - - if ((*inOutIdx - begin) + length > size) - return BUFFER_ERROR; - - if (ecc_import_x963(input + *inOutIdx, length, ssl->peerEccKey)) - return ECC_PEERKEY_ERROR; - - *inOutIdx += length; - ssl->peerEccKeyPresent = 1; - - length = sizeof(ssl->arrays->preMasterSecret); - - if (ssl->specs.static_ecdh) { - ecc_key staticKey; - word32 i = 0; - - ecc_init(&staticKey); - ret = EccPrivateKeyDecode(ssl->buffers.key.buffer, &i, - &staticKey, ssl->buffers.key.length); - - if (ret == 0) - ret = ecc_shared_secret(&staticKey, ssl->peerEccKey, - ssl->arrays->preMasterSecret, &length); - - ecc_free(&staticKey); - } - else - ret = ecc_shared_secret(ssl->eccTempKey, ssl->peerEccKey, - ssl->arrays->preMasterSecret, &length); - - if (ret != 0) - return ECC_SHARED_ERROR; - - ssl->arrays->preMasterSz = length; - ret = MakeMasterSecret(ssl); - } - break; - #endif /* HAVE_ECC */ - #ifdef OPENSSL_EXTRA - case diffie_hellman_kea: - { - word16 clientPubSz; - DhKey dhKey; - - if ((*inOutIdx - begin) + OPAQUE16_LEN > size) - return BUFFER_ERROR; - - ato16(input + *inOutIdx, &clientPubSz); - *inOutIdx += OPAQUE16_LEN; - - if ((*inOutIdx - begin) + clientPubSz > size) - return BUFFER_ERROR; - - InitDhKey(&dhKey); - ret = DhSetKey(&dhKey, ssl->buffers.serverDH_P.buffer, - ssl->buffers.serverDH_P.length, - ssl->buffers.serverDH_G.buffer, - ssl->buffers.serverDH_G.length); - if (ret == 0) - ret = DhAgree(&dhKey, ssl->arrays->preMasterSecret, - &ssl->arrays->preMasterSz, - ssl->buffers.serverDH_Priv.buffer, - ssl->buffers.serverDH_Priv.length, - input + *inOutIdx, clientPubSz); - FreeDhKey(&dhKey); - - *inOutIdx += clientPubSz; - - if (ret == 0) - ret = MakeMasterSecret(ssl); - } - break; - #endif /* OPENSSL_EXTRA */ - default: - { - CYASSL_MSG("Bad kea type"); - ret = BAD_KEA_TYPE_E; - } - break; - } - - /* No further need for PMS */ - XMEMSET(ssl->arrays->preMasterSecret, 0, ssl->arrays->preMasterSz); - ssl->arrays->preMasterSz = 0; - - if (ret == 0) { - ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE; - #ifndef NO_CERTS - if (ssl->options.verifyPeer) - ret = BuildCertHashes(ssl, &ssl->certHashes); - #endif - } - - return ret; - } - -#endif /* NO_CYASSL_SERVER */ diff --git a/project1/cyassl-3.0.0/src/io.c b/project1/cyassl-3.0.0/src/io.c deleted file mode 100644 index 0f5ddf30..00000000 --- a/project1/cyassl-3.0.0/src/io.c +++ /dev/null @@ -1,1050 +0,0 @@ -/* io.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef _WIN32_WCE - /* On WinCE winsock2.h must be included before windows.h for socket stuff */ - #include -#endif - -#include -#include - -/* if user writes own I/O callbacks they can define CYASSL_USER_IO to remove - automatic setting of default I/O functions EmbedSend() and EmbedReceive() - but they'll still need SetCallback xxx() at end of file -*/ -#ifndef CYASSL_USER_IO - -#ifdef HAVE_LIBZ - #include "zlib.h" -#endif - -#ifndef USE_WINDOWS_API - #ifdef CYASSL_LWIP - /* lwIP needs to be configured to use sockets API in this mode */ - /* LWIP_SOCKET 1 in lwip/opt.h or in build */ - #include "lwip/sockets.h" - #include - #ifndef LWIP_PROVIDE_ERRNO - #define LWIP_PROVIDE_ERRNO 1 - #endif - #elif defined(FREESCALE_MQX) - #include - #include - #elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) - #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" - #else - #include - #endif - #undef RNG - #include "CYASSL_MDK_ARM.h" - #undef RNG - #define RNG CyaSSL_RNG - /* for avoiding name conflict in "stm32f2xx.h" */ - static int errno; - #else - #include - #include - #ifndef EBSNET - #include - #endif - #include - #if !(defined(DEVKITPRO) || defined(HAVE_RTP_SYS) || defined(EBSNET)) - #include - #include - #include - #include - #ifdef __PPU - #include - #else - #include - #endif - #endif - #ifdef HAVE_RTP_SYS - #include - #endif - #ifdef EBSNET - #include "rtipapi.h" /* errno */ - #include "socket.h" - #endif - #endif -#endif /* USE_WINDOWS_API */ - -#ifdef __sun - #include -#endif - -#ifdef USE_WINDOWS_API - /* no epipe yet */ - #ifndef WSAEPIPE - #define WSAEPIPE -12345 - #endif - #define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK - #define SOCKET_EAGAIN WSAETIMEDOUT - #define SOCKET_ECONNRESET WSAECONNRESET - #define SOCKET_EINTR WSAEINTR - #define SOCKET_EPIPE WSAEPIPE - #define SOCKET_ECONNREFUSED WSAENOTCONN - #define SOCKET_ECONNABORTED WSAECONNABORTED - #define close(s) closesocket(s) -#elif defined(__PPU) - #define SOCKET_EWOULDBLOCK SYS_NET_EWOULDBLOCK - #define SOCKET_EAGAIN SYS_NET_EAGAIN - #define SOCKET_ECONNRESET SYS_NET_ECONNRESET - #define SOCKET_EINTR SYS_NET_EINTR - #define SOCKET_EPIPE SYS_NET_EPIPE - #define SOCKET_ECONNREFUSED SYS_NET_ECONNREFUSED - #define SOCKET_ECONNABORTED SYS_NET_ECONNABORTED -#elif defined(FREESCALE_MQX) - /* RTCS doesn't have an EWOULDBLOCK error */ - #define SOCKET_EWOULDBLOCK EAGAIN - #define SOCKET_EAGAIN EAGAIN - #define SOCKET_ECONNRESET RTCSERR_TCP_CONN_RESET - #define SOCKET_EINTR EINTR - #define SOCKET_EPIPE EPIPE - #define SOCKET_ECONNREFUSED RTCSERR_TCP_CONN_REFUSED - #define SOCKET_ECONNABORTED RTCSERR_TCP_CONN_ABORTED -#elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) - #define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK - #define SOCKET_EAGAIN BSD_ERROR_LOCKED - #define SOCKET_ECONNRESET BSD_ERROR_CLOSED - #define SOCKET_EINTR BSD_ERROR - #define SOCKET_EPIPE BSD_ERROR - #define SOCKET_ECONNREFUSED BSD_ERROR - #define SOCKET_ECONNABORTED BSD_ERROR - #else - #define SOCKET_EWOULDBLOCK SCK_EWOULDBLOCK - #define SOCKET_EAGAIN SCK_ELOCKED - #define SOCKET_ECONNRESET SCK_ECLOSED - #define SOCKET_EINTR SCK_ERROR - #define SOCKET_EPIPE SCK_ERROR - #define SOCKET_ECONNREFUSED SCK_ERROR - #define SOCKET_ECONNABORTED SCK_ERROR - #endif -#else - #define SOCKET_EWOULDBLOCK EWOULDBLOCK - #define SOCKET_EAGAIN EAGAIN - #define SOCKET_ECONNRESET ECONNRESET - #define SOCKET_EINTR EINTR - #define SOCKET_EPIPE EPIPE - #define SOCKET_ECONNREFUSED ECONNREFUSED - #define SOCKET_ECONNABORTED ECONNABORTED -#endif /* USE_WINDOWS_API */ - - -#ifdef DEVKITPRO - /* from network.h */ - int net_send(int, const void*, int, unsigned int); - int net_recv(int, void*, int, unsigned int); - #define SEND_FUNCTION net_send - #define RECV_FUNCTION net_recv -#elif defined(CYASSL_LWIP) - #define SEND_FUNCTION lwip_send - #define RECV_FUNCTION lwip_recv -#else - #define SEND_FUNCTION send - #define RECV_FUNCTION recv -#endif - - -/* Translates return codes returned from - * send() and recv() if need be. - */ -static INLINE int TranslateReturnCode(int old, int sd) -{ - (void)sd; - -#ifdef FREESCALE_MQX - if (old == 0) { - errno = SOCKET_EWOULDBLOCK; - return -1; /* convert to BSD style wouldblock as error */ - } - - if (old < 0) { - errno = RTCS_geterror(sd); - if (errno == RTCSERR_TCP_CONN_CLOSING) - return 0; /* convert to BSD style closing */ - } -#endif - - return old; -} - -static INLINE int LastError(void) -{ -#ifdef USE_WINDOWS_API - return WSAGetLastError(); -#elif defined(EBSNET) - return xn_getlasterror(); -#else - return errno; -#endif -} - -/* The receive embedded callback - * return : nb bytes read, or error - */ -int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx) -{ - int recvd; - int err; - int sd = *(int*)ctx; - -#ifdef CYASSL_DTLS - { - int dtls_timeout = CyaSSL_dtls_get_current_timeout(ssl); - if (CyaSSL_dtls(ssl) - && !CyaSSL_get_using_nonblock(ssl) - && dtls_timeout != 0) { - #ifdef USE_WINDOWS_API - DWORD timeout = dtls_timeout * 1000; - #else - struct timeval timeout; - XMEMSET(&timeout, 0, sizeof(timeout)); - timeout.tv_sec = dtls_timeout; - #endif - if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, - sizeof(timeout)) != 0) { - CYASSL_MSG("setsockopt rcvtimeo failed"); - } - } - } -#endif - - recvd = (int)RECV_FUNCTION(sd, buf, sz, ssl->rflags); - - recvd = TranslateReturnCode(recvd, sd); - - if (recvd < 0) { - err = LastError(); - CYASSL_MSG("Embed Receive error"); - - if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { - if (!CyaSSL_dtls(ssl) || CyaSSL_get_using_nonblock(ssl)) { - CYASSL_MSG(" Would block"); - return CYASSL_CBIO_ERR_WANT_READ; - } - else { - CYASSL_MSG(" Socket timeout"); - return CYASSL_CBIO_ERR_TIMEOUT; - } - } - else if (err == SOCKET_ECONNRESET) { - CYASSL_MSG(" Connection reset"); - return CYASSL_CBIO_ERR_CONN_RST; - } - else if (err == SOCKET_EINTR) { - CYASSL_MSG(" Socket interrupted"); - return CYASSL_CBIO_ERR_ISR; - } - else if (err == SOCKET_ECONNREFUSED) { - CYASSL_MSG(" Connection refused"); - return CYASSL_CBIO_ERR_WANT_READ; - } - else if (err == SOCKET_ECONNABORTED) { - CYASSL_MSG(" Connection aborted"); - return CYASSL_CBIO_ERR_CONN_CLOSE; - } - else { - CYASSL_MSG(" General error"); - return CYASSL_CBIO_ERR_GENERAL; - } - } - else if (recvd == 0) { - CYASSL_MSG("Embed receive connection closed"); - return CYASSL_CBIO_ERR_CONN_CLOSE; - } - - return recvd; -} - -/* The send embedded callback - * return : nb bytes sent, or error - */ -int EmbedSend(CYASSL* ssl, char *buf, int sz, void *ctx) -{ - int sd = *(int*)ctx; - int sent; - int len = sz; - int err; - - sent = (int)SEND_FUNCTION(sd, &buf[sz - len], len, ssl->wflags); - - if (sent < 0) { - err = LastError(); - CYASSL_MSG("Embed Send error"); - - if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { - CYASSL_MSG(" Would Block"); - return CYASSL_CBIO_ERR_WANT_WRITE; - } - else if (err == SOCKET_ECONNRESET) { - CYASSL_MSG(" Connection reset"); - return CYASSL_CBIO_ERR_CONN_RST; - } - else if (err == SOCKET_EINTR) { - CYASSL_MSG(" Socket interrupted"); - return CYASSL_CBIO_ERR_ISR; - } - else if (err == SOCKET_EPIPE) { - CYASSL_MSG(" Socket EPIPE"); - return CYASSL_CBIO_ERR_CONN_CLOSE; - } - else { - CYASSL_MSG(" General error"); - return CYASSL_CBIO_ERR_GENERAL; - } - } - - return sent; -} - - -#ifdef CYASSL_DTLS - -#include - -#ifdef USE_WINDOWS_API - #define XSOCKLENT int -#else - #define XSOCKLENT socklen_t -#endif - -#define SENDTO_FUNCTION sendto -#define RECVFROM_FUNCTION recvfrom - - -/* The receive embedded callback - * return : nb bytes read, or error - */ -int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx) -{ - CYASSL_DTLS_CTX* dtlsCtx = (CYASSL_DTLS_CTX*)ctx; - int recvd; - int err; - int sd = dtlsCtx->fd; - int dtls_timeout = CyaSSL_dtls_get_current_timeout(ssl); - struct sockaddr_storage peer; - XSOCKLENT peerSz = sizeof(peer); - - CYASSL_ENTER("EmbedReceiveFrom()"); - - if (!CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) { - #ifdef USE_WINDOWS_API - DWORD timeout = dtls_timeout * 1000; - #else - struct timeval timeout; - XMEMSET(&timeout, 0, sizeof(timeout)); - timeout.tv_sec = dtls_timeout; - #endif - if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, - sizeof(timeout)) != 0) { - CYASSL_MSG("setsockopt rcvtimeo failed"); - } - } - - recvd = (int)RECVFROM_FUNCTION(sd, buf, sz, ssl->rflags, - (struct sockaddr*)&peer, &peerSz); - - recvd = TranslateReturnCode(recvd, sd); - - if (recvd < 0) { - err = LastError(); - CYASSL_MSG("Embed Receive From error"); - - if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { - if (CyaSSL_get_using_nonblock(ssl)) { - CYASSL_MSG(" Would block"); - return CYASSL_CBIO_ERR_WANT_READ; - } - else { - CYASSL_MSG(" Socket timeout"); - return CYASSL_CBIO_ERR_TIMEOUT; - } - } - else if (err == SOCKET_ECONNRESET) { - CYASSL_MSG(" Connection reset"); - return CYASSL_CBIO_ERR_CONN_RST; - } - else if (err == SOCKET_EINTR) { - CYASSL_MSG(" Socket interrupted"); - return CYASSL_CBIO_ERR_ISR; - } - else if (err == SOCKET_ECONNREFUSED) { - CYASSL_MSG(" Connection refused"); - return CYASSL_CBIO_ERR_WANT_READ; - } - else { - CYASSL_MSG(" General error"); - return CYASSL_CBIO_ERR_GENERAL; - } - } - else { - if (dtlsCtx->peer.sz > 0 - && peerSz != (XSOCKLENT)dtlsCtx->peer.sz - && memcmp(&peer, dtlsCtx->peer.sa, peerSz) != 0) { - CYASSL_MSG(" Ignored packet from invalid peer"); - return CYASSL_CBIO_ERR_WANT_READ; - } - } - - return recvd; -} - - -/* The send embedded callback - * return : nb bytes sent, or error - */ -int EmbedSendTo(CYASSL* ssl, char *buf, int sz, void *ctx) -{ - CYASSL_DTLS_CTX* dtlsCtx = (CYASSL_DTLS_CTX*)ctx; - int sd = dtlsCtx->fd; - int sent; - int len = sz; - int err; - - CYASSL_ENTER("EmbedSendTo()"); - - sent = (int)SENDTO_FUNCTION(sd, &buf[sz - len], len, ssl->wflags, - dtlsCtx->peer.sa, dtlsCtx->peer.sz); - if (sent < 0) { - err = LastError(); - CYASSL_MSG("Embed Send To error"); - - if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { - CYASSL_MSG(" Would Block"); - return CYASSL_CBIO_ERR_WANT_WRITE; - } - else if (err == SOCKET_ECONNRESET) { - CYASSL_MSG(" Connection reset"); - return CYASSL_CBIO_ERR_CONN_RST; - } - else if (err == SOCKET_EINTR) { - CYASSL_MSG(" Socket interrupted"); - return CYASSL_CBIO_ERR_ISR; - } - else if (err == SOCKET_EPIPE) { - CYASSL_MSG(" Socket EPIPE"); - return CYASSL_CBIO_ERR_CONN_CLOSE; - } - else { - CYASSL_MSG(" General error"); - return CYASSL_CBIO_ERR_GENERAL; - } - } - - return sent; -} - - -/* The DTLS Generate Cookie callback - * return : number of bytes copied into buf, or error - */ -int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx) -{ - int sd = ssl->wfd; - struct sockaddr_storage peer; - XSOCKLENT peerSz = sizeof(peer); - Sha sha; - byte digest[SHA_DIGEST_SIZE]; - int ret = 0; - - (void)ctx; - - XMEMSET(&peer, 0, sizeof(peer)); - if (getpeername(sd, (struct sockaddr*)&peer, &peerSz) != 0) { - CYASSL_MSG("getpeername failed in EmbedGenerateCookie"); - return GEN_COOKIE_E; - } - - ret = InitSha(&sha); - if (ret != 0) - return ret; - ShaUpdate(&sha, (byte*)&peer, peerSz); - ShaFinal(&sha, digest); - - if (sz > SHA_DIGEST_SIZE) - sz = SHA_DIGEST_SIZE; - XMEMCPY(buf, digest, sz); - - return sz; -} - -#endif /* CYASSL_DTLS */ - -#ifdef HAVE_OCSP - - -static int tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port) -{ - struct sockaddr_storage addr; - int sockaddr_len = sizeof(struct sockaddr_in); - XMEMSET(&addr, 0, sizeof(addr)); - - #ifdef HAVE_GETADDRINFO - { - struct addrinfo hints; - struct addrinfo* answer = NULL; - char strPort[8]; - - XMEMSET(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - XSNPRINTF(strPort, sizeof(strPort), "%d", port); - strPort[7] = '\0'; - - if (getaddrinfo(ip, strPort, &hints, &answer) < 0 || answer == NULL) { - CYASSL_MSG("no addr info for OCSP responder"); - return -1; - } - - sockaddr_len = answer->ai_addrlen; - XMEMCPY(&addr, answer->ai_addr, sockaddr_len); - freeaddrinfo(answer); - - } - #else /* HAVE_GETADDRINFO */ - { - struct hostent* entry = gethostbyname(ip); - struct sockaddr_in *sin = (struct sockaddr_in *)&addr; - - if (entry) { - sin->sin_family = AF_INET; - sin->sin_port = htons(port); - XMEMCPY(&sin->sin_addr.s_addr, entry->h_addr_list[0], - entry->h_length); - } - else { - CYASSL_MSG("no addr info for OCSP responder"); - return -1; - } - } - #endif /* HAVE_GETADDRINFO */ - - *sockfd = socket(addr.ss_family, SOCK_STREAM, 0); - if (*sockfd < 0) { - CYASSL_MSG("bad socket fd, out of fds?"); - return -1; - } - - if (connect(*sockfd, (struct sockaddr *)&addr, sockaddr_len) != 0) { - CYASSL_MSG("OCSP responder tcp connect failed"); - return -1; - } - - return 0; -} - - -static int build_http_request(const char* domainName, const char* path, - int ocspReqSz, byte* buf, int bufSize) -{ - return XSNPRINTF((char*)buf, bufSize, - "POST %s HTTP/1.1\r\n" - "Host: %s\r\n" - "Content-Length: %d\r\n" - "Content-Type: application/ocsp-request\r\n" - "\r\n", - path, domainName, ocspReqSz); -} - - -static int decode_url(const char* url, int urlSz, - char* outName, char* outPath, word16* outPort) -{ - int result = -1; - - if (outName != NULL && outPath != NULL && outPort != NULL) - { - if (url == NULL || urlSz == 0) - { - *outName = 0; - *outPath = 0; - *outPort = 0; - } - else - { - int i, cur; - - /* need to break the url down into scheme, address, and port */ - /* "http://example.com:8080/" */ - /* "http://[::1]:443/" */ - if (XSTRNCMP(url, "http://", 7) == 0) { - cur = 7; - } else cur = 0; - - i = 0; - if (url[cur] == '[') { - cur++; - /* copy until ']' */ - while (url[cur] != 0 && url[cur] != ']' && cur < urlSz) { - outName[i++] = url[cur++]; - } - cur++; /* skip ']' */ - } - else { - while (url[cur] != 0 && url[cur] != ':' && - url[cur] != '/' && cur < urlSz) { - outName[i++] = url[cur++]; - } - } - outName[i] = 0; - /* Need to pick out the path after the domain name */ - - if (cur < urlSz && url[cur] == ':') { - char port[6]; - int j; - word32 bigPort = 0; - i = 0; - cur++; - while (cur < urlSz && url[cur] != 0 && url[cur] != '/' && - i < 6) { - port[i++] = url[cur++]; - } - - for (j = 0; j < i; j++) { - if (port[j] < '0' || port[j] > '9') return -1; - bigPort = (bigPort * 10) + (port[j] - '0'); - } - *outPort = (word16)bigPort; - } - else - *outPort = 80; - - if (cur < urlSz && url[cur] == '/') { - i = 0; - while (cur < urlSz && url[cur] != 0 && i < 80) { - outPath[i++] = url[cur++]; - } - outPath[i] = 0; - } - else { - outPath[0] = '/'; - outPath[1] = 0; - } - result = 0; - } - } - - return result; -} - - -/* return: >0 OCSP Response Size - * -1 error */ -static int process_http_response(int sfd, byte** respBuf, - byte* httpBuf, int httpBufSz) -{ - int result; - int len = 0; - char *start, *end; - byte *recvBuf = NULL; - int recvBufSz = 0; - enum phr_state { phr_init, phr_http_start, phr_have_length, - phr_have_type, phr_wait_end, phr_http_end - } state = phr_init; - - start = end = NULL; - do { - if (end == NULL) { - result = (int)recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0); - if (result > 0) { - len += result; - start = (char*)httpBuf; - start[len] = 0; - } - else { - CYASSL_MSG("process_http_response recv http from peer failed"); - return -1; - } - } - end = XSTRSTR(start, "\r\n"); - - if (end == NULL) { - if (len != 0) - XMEMMOVE(httpBuf, start, len); - start = end = NULL; - } - else if (end == start) { - if (state == phr_wait_end) { - state = phr_http_end; - len -= 2; - start += 2; - } - else { - CYASSL_MSG("process_http_response header ended early"); - return -1; - } - } - else { - *end = 0; - len -= (int)(end - start) + 2; - /* adjust len to remove the first line including the /r/n */ - - if (XSTRNCASECMP(start, "HTTP/1", 6) == 0) { - start += 9; - if (XSTRNCASECMP(start, "200 OK", 6) != 0 || - state != phr_init) { - CYASSL_MSG("process_http_response not OK"); - return -1; - } - state = phr_http_start; - } - else if (XSTRNCASECMP(start, "Content-Type:", 13) == 0) { - start += 13; - while (*start == ' ' && *start != '\0') start++; - if (XSTRNCASECMP(start, "application/ocsp-response", 25) != 0) { - CYASSL_MSG("process_http_response not ocsp-response"); - return -1; - } - - if (state == phr_http_start) state = phr_have_type; - else if (state == phr_have_length) state = phr_wait_end; - else { - CYASSL_MSG("process_http_response type invalid state"); - return -1; - } - } - else if (XSTRNCASECMP(start, "Content-Length:", 15) == 0) { - start += 15; - while (*start == ' ' && *start != '\0') start++; - recvBufSz = atoi(start); - - if (state == phr_http_start) state = phr_have_length; - else if (state == phr_have_type) state = phr_wait_end; - else { - CYASSL_MSG("process_http_response length invalid state"); - return -1; - } - } - - start = end + 2; - } - } while (state != phr_http_end); - - recvBuf = XMALLOC(recvBufSz, NULL, DYNAMIC_TYPE_IN_BUFFER); - if (recvBuf == NULL) { - CYASSL_MSG("process_http_response couldn't create response buffer"); - return -1; - } - - /* copy the remainder of the httpBuf into the respBuf */ - if (len != 0) - XMEMCPY(recvBuf, start, len); - - /* receive the OCSP response data */ - do { - result = (int)recv(sfd, (char*)recvBuf+len, recvBufSz-len, 0); - if (result > 0) - len += result; - else { - CYASSL_MSG("process_http_response recv ocsp from peer failed"); - return -1; - } - } while (len != recvBufSz); - - *respBuf = recvBuf; - return recvBufSz; -} - - -#define SCRATCH_BUFFER_SIZE 512 - -int EmbedOcspLookup(void* ctx, const char* url, int urlSz, - byte* ocspReqBuf, int ocspReqSz, byte** ocspRespBuf) -{ - char domainName[80], path[80]; - int httpBufSz; - SOCKET_T sfd = 0; - word16 port; - int ocspRespSz = 0; - byte* httpBuf = NULL; - - (void)ctx; - - if (ocspReqBuf == NULL || ocspReqSz == 0) { - CYASSL_MSG("OCSP request is required for lookup"); - return -1; - } - - if (ocspRespBuf == NULL) { - CYASSL_MSG("Cannot save OCSP response"); - return -1; - } - - if (decode_url(url, urlSz, domainName, path, &port) < 0) { - CYASSL_MSG("Unable to decode OCSP URL"); - return -1; - } - - /* Note, the library uses the EmbedOcspRespFree() callback to - * free this buffer. */ - httpBufSz = SCRATCH_BUFFER_SIZE; - httpBuf = (byte*)XMALLOC(httpBufSz, NULL, DYNAMIC_TYPE_IN_BUFFER); - - if (httpBuf == NULL) { - CYASSL_MSG("Unable to create OCSP response buffer"); - return -1; - } - - httpBufSz = build_http_request(domainName, path, ocspReqSz, - httpBuf, httpBufSz); - - if ((tcp_connect(&sfd, domainName, port) == 0) && (sfd > 0)) { - int written; - written = (int)send(sfd, (char*)httpBuf, httpBufSz, 0); - if (written == httpBufSz) { - written = (int)send(sfd, (char*)ocspReqBuf, ocspReqSz, 0); - if (written == ocspReqSz) { - ocspRespSz = process_http_response(sfd, ocspRespBuf, - httpBuf, SCRATCH_BUFFER_SIZE); - } - } - close(sfd); - if (ocspRespSz == 0) { - CYASSL_MSG("OCSP response was not OK, no OCSP response"); - XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); - return -1; - } - } else { - CYASSL_MSG("OCSP Responder connection failed"); - close(sfd); - XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); - return -1; - } - - XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); - return ocspRespSz; -} - - -void EmbedOcspRespFree(void* ctx, byte *resp) -{ - (void)ctx; - - if (resp) - XFREE(resp, NULL, DYNAMIC_TYPE_IN_BUFFER); -} - - -#endif - -#endif /* CYASSL_USER_IO */ - -CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX *ctx, CallbackIORecv CBIORecv) -{ - ctx->CBIORecv = CBIORecv; -} - - -CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX *ctx, CallbackIOSend CBIOSend) -{ - ctx->CBIOSend = CBIOSend; -} - - -CYASSL_API void CyaSSL_SetIOReadCtx(CYASSL* ssl, void *rctx) -{ - ssl->IOCB_ReadCtx = rctx; -} - - -CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *wctx) -{ - ssl->IOCB_WriteCtx = wctx; -} - - -CYASSL_API void* CyaSSL_GetIOReadCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->IOCB_ReadCtx; - - return NULL; -} - - -CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->IOCB_WriteCtx; - - return NULL; -} - - -CYASSL_API void CyaSSL_SetIOReadFlags(CYASSL* ssl, int flags) -{ - ssl->rflags = flags; -} - - -CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags) -{ - ssl->wflags = flags; -} - - -#ifdef CYASSL_DTLS - -CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX* ctx, CallbackGenCookie cb) -{ - ctx->CBIOCookie = cb; -} - - -CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx) -{ - ssl->IOCB_CookieCtx = ctx; -} - - -CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->IOCB_CookieCtx; - - return NULL; -} - -#endif /* CYASSL_DTLS */ - - -#ifdef HAVE_NETX - -/* The NetX receive callback - * return : bytes read, or error - */ -int NetX_Receive(CYASSL *ssl, char *buf, int sz, void *ctx) -{ - NetX_Ctx* nxCtx = (NetX_Ctx*)ctx; - ULONG left; - ULONG total; - ULONG copied = 0; - UINT status; - - if (nxCtx == NULL || nxCtx->nxSocket == NULL) { - CYASSL_MSG("NetX Recv NULL parameters"); - return CYASSL_CBIO_ERR_GENERAL; - } - - if (nxCtx->nxPacket == NULL) { - status = nx_tcp_socket_receive(nxCtx->nxSocket, &nxCtx->nxPacket, - nxCtx->nxWait); - if (status != NX_SUCCESS) { - CYASSL_MSG("NetX Recv receive error"); - return CYASSL_CBIO_ERR_GENERAL; - } - } - - if (nxCtx->nxPacket) { - status = nx_packet_length_get(nxCtx->nxPacket, &total); - if (status != NX_SUCCESS) { - CYASSL_MSG("NetX Recv length get error"); - return CYASSL_CBIO_ERR_GENERAL; - } - - left = total - nxCtx->nxOffset; - status = nx_packet_data_extract_offset(nxCtx->nxPacket, nxCtx->nxOffset, - buf, sz, &copied); - if (status != NX_SUCCESS) { - CYASSL_MSG("NetX Recv data extract offset error"); - return CYASSL_CBIO_ERR_GENERAL; - } - - nxCtx->nxOffset += copied; - - if (copied == left) { - CYASSL_MSG("NetX Recv Drained packet"); - nx_packet_release(nxCtx->nxPacket); - nxCtx->nxPacket = NULL; - nxCtx->nxOffset = 0; - } - } - - return copied; -} - - -/* The NetX send callback - * return : bytes sent, or error - */ -int NetX_Send(CYASSL* ssl, char *buf, int sz, void *ctx) -{ - NetX_Ctx* nxCtx = (NetX_Ctx*)ctx; - NX_PACKET* packet; - NX_PACKET_POOL* pool; /* shorthand */ - UINT status; - - if (nxCtx == NULL || nxCtx->nxSocket == NULL) { - CYASSL_MSG("NetX Send NULL parameters"); - return CYASSL_CBIO_ERR_GENERAL; - } - - pool = nxCtx->nxSocket->nx_tcp_socket_ip_ptr->nx_ip_default_packet_pool; - status = nx_packet_allocate(pool, &packet, NX_TCP_PACKET, - nxCtx->nxWait); - if (status != NX_SUCCESS) { - CYASSL_MSG("NetX Send packet alloc error"); - return CYASSL_CBIO_ERR_GENERAL; - } - - status = nx_packet_data_append(packet, buf, sz, pool, nxCtx->nxWait); - if (status != NX_SUCCESS) { - nx_packet_release(packet); - CYASSL_MSG("NetX Send data append error"); - return CYASSL_CBIO_ERR_GENERAL; - } - - status = nx_tcp_socket_send(nxCtx->nxSocket, packet, nxCtx->nxWait); - if (status != NX_SUCCESS) { - nx_packet_release(packet); - CYASSL_MSG("NetX Send socket send error"); - return CYASSL_CBIO_ERR_GENERAL; - } - - return sz; -} - - -/* like set_fd, but for default NetX context */ -void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxSocket, ULONG waitOption) -{ - if (ssl) { - ssl->nxCtx.nxSocket = nxSocket; - ssl->nxCtx.nxWait = waitOption; - } -} - -#endif /* HAVE_NETX */ - diff --git a/project1/cyassl-3.0.0/src/keys.c b/project1/cyassl-3.0.0/src/keys.c deleted file mode 100644 index 463ba9f4..00000000 --- a/project1/cyassl-3.0.0/src/keys.c +++ /dev/null @@ -1,2012 +0,0 @@ -/* keys.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include -#ifdef SHOW_SECRETS - #ifdef FREESCALE_MQX - #include - #else - #include - #endif -#endif - - -int SetCipherSpecs(CYASSL* ssl) -{ - if (ssl->options.side == CYASSL_CLIENT_END) { - /* server side verified before SetCipherSpecs call */ - if (VerifyClientSuite(ssl) != 1) { - CYASSL_MSG("SetCipherSpecs() client has an unusuable suite"); - return UNSUPPORTED_SUITE; - } - } - /* ECC extensions, or AES-CCM */ - if (ssl->options.cipherSuite0 == ECC_BYTE) { - - switch (ssl->options.cipherSuite) { - -#ifdef HAVE_ECC - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA - case TLS_ECDHE_RSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA - case TLS_ECDH_RSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 1; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 - case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 - case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = ecc_diffie_hellman_kea; - ssl->specs.sig_algo = ecc_dsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - break; -#endif -#endif /* HAVE_ECC */ - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8 - case TLS_RSA_WITH_AES_128_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8 - case TLS_RSA_WITH_AES_256_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8 - case TLS_PSK_WITH_AES_128_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8 - case TLS_PSK_WITH_AES_256_CCM_8 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_ccm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - - default: - CYASSL_MSG("Unsupported cipher suite, SetCipherSpecs ECC"); - return UNSUPPORTED_SUITE; - } /* switch */ - } /* if */ - if (ssl->options.cipherSuite0 != ECC_BYTE) { /* normal suites */ - switch (ssl->options.cipherSuite) { - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA - case SSL_RSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA - case TLS_NTRU_RSA_WITH_RC4_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ntru_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5 - case SSL_RSA_WITH_RC4_128_MD5 : - ssl->specs.bulk_cipher_algorithm = cyassl_rc4; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = md5_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = MD5_DIGEST_SIZE; - ssl->specs.pad_size = PAD_MD5; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RC4_KEY_SIZE; - ssl->specs.iv_size = 0; - ssl->specs.block_size = 0; - - break; -#endif - -#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA - case SSL_RSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA - case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_triple_des; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ntru_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = DES3_KEY_SIZE; - ssl->specs.block_size = DES_BLOCK_SIZE; - ssl->specs.iv_size = DES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA - case TLS_RSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 - case TLS_RSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA - case TLS_RSA_WITH_NULL_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = 0; - ssl->specs.block_size = 0; - ssl->specs.iv_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256 - case TLS_RSA_WITH_NULL_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = 0; - ssl->specs.block_size = 0; - ssl->specs.iv_size = 0; - - break; -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA - case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ntru_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA - case TLS_RSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 - case TLS_RSA_WITH_AES_256_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA - case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = ntru_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 - case TLS_PSK_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA - case TLS_PSK_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA - case TLS_PSK_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256 - case TLS_PSK_WITH_NULL_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = 0; - ssl->specs.block_size = 0; - ssl->specs.iv_size = 0; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_PSK_WITH_NULL_SHA - case TLS_PSK_WITH_NULL_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_cipher_null; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = psk_kea; - ssl->specs.sig_algo = anonymous_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = 0; - ssl->specs.block_size = 0; - ssl->specs.iv_size = 0; - - ssl->options.usingPSK_cipher = 1; - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5 - case TLS_RSA_WITH_HC_128_MD5 : - ssl->specs.bulk_cipher_algorithm = cyassl_hc128; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = md5_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = MD5_DIGEST_SIZE; - ssl->specs.pad_size = PAD_MD5; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = HC_128_KEY_SIZE; - ssl->specs.block_size = 0; - ssl->specs.iv_size = HC_128_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA - case TLS_RSA_WITH_HC_128_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_hc128; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = HC_128_KEY_SIZE; - ssl->specs.block_size = 0; - ssl->specs.iv_size = HC_128_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_HC_128_B2B256 - case TLS_RSA_WITH_HC_128_B2B256: - ssl->specs.bulk_cipher_algorithm = cyassl_hc128; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = blake2b_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = BLAKE2B_256; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = HC_128_KEY_SIZE; - ssl->specs.block_size = 0; - ssl->specs.iv_size = HC_128_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 - case TLS_RSA_WITH_AES_128_CBC_B2B256: - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = blake2b_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = BLAKE2B_256; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 - case TLS_RSA_WITH_AES_256_CBC_B2B256: - ssl->specs.bulk_cipher_algorithm = cyassl_aes; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = blake2b_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = BLAKE2B_256; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.iv_size = AES_IV_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA - case TLS_RSA_WITH_RABBIT_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_rabbit; - ssl->specs.cipher_type = stream; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = RABBIT_KEY_SIZE; - ssl->specs.block_size = 0; - ssl->specs.iv_size = RABBIT_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 - case TLS_RSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 - case TLS_RSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_128_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : - ssl->specs.bulk_cipher_algorithm = cyassl_aes_gcm; - ssl->specs.cipher_type = aead; - ssl->specs.mac_algorithm = sha384_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA384_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = AES_256_KEY_SIZE; - ssl->specs.block_size = AES_BLOCK_SIZE; - ssl->specs.iv_size = AEAD_IMP_IV_SZ; - ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = rsa_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_128_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - -#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - ssl->specs.bulk_cipher_algorithm = cyassl_camellia; - ssl->specs.cipher_type = block; - ssl->specs.mac_algorithm = sha256_mac; - ssl->specs.kea = diffie_hellman_kea; - ssl->specs.sig_algo = rsa_sa_algo; - ssl->specs.hash_size = SHA256_DIGEST_SIZE; - ssl->specs.pad_size = PAD_SHA; - ssl->specs.static_ecdh = 0; - ssl->specs.key_size = CAMELLIA_256_KEY_SIZE; - ssl->specs.block_size = CAMELLIA_BLOCK_SIZE; - ssl->specs.iv_size = CAMELLIA_IV_SIZE; - - break; -#endif - - default: - CYASSL_MSG("Unsupported cipher suite, SetCipherSpecs"); - return UNSUPPORTED_SUITE; - } /* switch */ - } /* if ECC / Normal suites else */ - - /* set TLS if it hasn't been turned off */ - if (ssl->version.major == 3 && ssl->version.minor >= 1) { -#ifndef NO_TLS - ssl->options.tls = 1; - ssl->hmac = TLS_hmac; - if (ssl->version.minor >= 2) - ssl->options.tls1_1 = 1; -#endif - } - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) - ssl->hmac = TLS_hmac; -#endif - - return 0; -} - - -enum KeyStuff { - MASTER_ROUNDS = 3, - PREFIX = 3, /* up to three letters for master prefix */ - KEY_PREFIX = 7 /* up to 7 prefix letters for key rounds */ - - -}; - -#ifndef NO_OLD_TLS -/* true or false, zero for error */ -static int SetPrefix(byte* sha_input, int idx) -{ - switch (idx) { - case 0: - XMEMCPY(sha_input, "A", 1); - break; - case 1: - XMEMCPY(sha_input, "BB", 2); - break; - case 2: - XMEMCPY(sha_input, "CCC", 3); - break; - case 3: - XMEMCPY(sha_input, "DDDD", 4); - break; - case 4: - XMEMCPY(sha_input, "EEEEE", 5); - break; - case 5: - XMEMCPY(sha_input, "FFFFFF", 6); - break; - case 6: - XMEMCPY(sha_input, "GGGGGGG", 7); - break; - default: - CYASSL_MSG("Set Prefix error, bad input"); - return 0; - } - return 1; -} -#endif - - -static int SetKeys(Ciphers* enc, Ciphers* dec, Keys* keys, CipherSpecs* specs, - byte side, void* heap, int devId) -{ -#ifdef BUILD_ARC4 - word32 sz = specs->key_size; - if (specs->bulk_cipher_algorithm == cyassl_rc4) { - if (enc->arc4 == NULL) - enc->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER); - if (enc->arc4 == NULL) - return MEMORY_E; - if (dec->arc4 == NULL) - dec->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER); - if (dec->arc4 == NULL) - return MEMORY_E; -#ifdef HAVE_CAVIUM - if (devId != NO_CAVIUM_DEVICE) { - if (Arc4InitCavium(enc->arc4, devId) != 0) { - CYASSL_MSG("Arc4InitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - if (Arc4InitCavium(dec->arc4, devId) != 0) { - CYASSL_MSG("Arc4InitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - } -#endif - if (side == CYASSL_CLIENT_END) { - Arc4SetKey(enc->arc4, keys->client_write_key, sz); - Arc4SetKey(dec->arc4, keys->server_write_key, sz); - } - else { - Arc4SetKey(enc->arc4, keys->server_write_key, sz); - Arc4SetKey(dec->arc4, keys->client_write_key, sz); - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef HAVE_HC128 - if (specs->bulk_cipher_algorithm == cyassl_hc128) { - int hcRet; - if (enc->hc128 == NULL) - enc->hc128 = - (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER); - if (enc->hc128 == NULL) - return MEMORY_E; - if (dec->hc128 == NULL) - dec->hc128 = - (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER); - if (dec->hc128 == NULL) - return MEMORY_E; - if (side == CYASSL_CLIENT_END) { - hcRet = Hc128_SetKey(enc->hc128, keys->client_write_key, - keys->client_write_IV); - if (hcRet != 0) return hcRet; - hcRet = Hc128_SetKey(dec->hc128, keys->server_write_key, - keys->server_write_IV); - if (hcRet != 0) return hcRet; - } - else { - hcRet = Hc128_SetKey(enc->hc128, keys->server_write_key, - keys->server_write_IV); - if (hcRet != 0) return hcRet; - hcRet = Hc128_SetKey(dec->hc128, keys->client_write_key, - keys->client_write_IV); - if (hcRet != 0) return hcRet; - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef BUILD_RABBIT - if (specs->bulk_cipher_algorithm == cyassl_rabbit) { - int rabRet; - if (enc->rabbit == NULL) - enc->rabbit = - (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER); - if (enc->rabbit == NULL) - return MEMORY_E; - if (dec->rabbit == NULL) - dec->rabbit = - (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER); - if (dec->rabbit == NULL) - return MEMORY_E; - if (side == CYASSL_CLIENT_END) { - rabRet = RabbitSetKey(enc->rabbit, keys->client_write_key, - keys->client_write_IV); - if (rabRet != 0) return rabRet; - rabRet = RabbitSetKey(dec->rabbit, keys->server_write_key, - keys->server_write_IV); - if (rabRet != 0) return rabRet; - } - else { - rabRet = RabbitSetKey(enc->rabbit, keys->server_write_key, - keys->server_write_IV); - if (rabRet != 0) return rabRet; - rabRet = RabbitSetKey(dec->rabbit, keys->client_write_key, - keys->client_write_IV); - if (rabRet != 0) return rabRet; - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef BUILD_DES3 - if (specs->bulk_cipher_algorithm == cyassl_triple_des) { - int desRet = 0; - - if (enc->des3 == NULL) - enc->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER); - if (enc->des3 == NULL) - return MEMORY_E; - if (dec->des3 == NULL) - dec->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER); - if (dec->des3 == NULL) - return MEMORY_E; -#ifdef HAVE_CAVIUM - if (devId != NO_CAVIUM_DEVICE) { - if (Des3_InitCavium(enc->des3, devId) != 0) { - CYASSL_MSG("Des3_InitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - if (Des3_InitCavium(dec->des3, devId) != 0) { - CYASSL_MSG("Des3_InitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - } -#endif - if (side == CYASSL_CLIENT_END) { - desRet = Des3_SetKey(enc->des3, keys->client_write_key, - keys->client_write_IV, DES_ENCRYPTION); - if (desRet != 0) - return desRet; - desRet = Des3_SetKey(dec->des3, keys->server_write_key, - keys->server_write_IV, DES_DECRYPTION); - if (desRet != 0) - return desRet; - } - else { - desRet = Des3_SetKey(enc->des3, keys->server_write_key, - keys->server_write_IV, DES_ENCRYPTION); - if (desRet != 0) - return desRet; - desRet = Des3_SetKey(dec->des3, keys->client_write_key, - keys->client_write_IV, DES_DECRYPTION); - if (desRet != 0) - return desRet; - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef BUILD_AES - if (specs->bulk_cipher_algorithm == cyassl_aes) { - int aesRet = 0; - - if (enc->aes == NULL) - enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (enc->aes == NULL) - return MEMORY_E; - if (dec->aes == NULL) - dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (dec->aes == NULL) - return MEMORY_E; -#ifdef HAVE_CAVIUM - if (devId != NO_CAVIUM_DEVICE) { - if (AesInitCavium(enc->aes, devId) != 0) { - CYASSL_MSG("AesInitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - if (AesInitCavium(dec->aes, devId) != 0) { - CYASSL_MSG("AesInitCavium failed in SetKeys"); - return CAVIUM_INIT_E; - } - } -#endif - if (side == CYASSL_CLIENT_END) { - aesRet = AesSetKey(enc->aes, keys->client_write_key, - specs->key_size, keys->client_write_IV, - AES_ENCRYPTION); - if (aesRet != 0) - return aesRet; - aesRet = AesSetKey(dec->aes, keys->server_write_key, - specs->key_size, keys->server_write_IV, - AES_DECRYPTION); - if (aesRet != 0) - return aesRet; - } - else { - aesRet = AesSetKey(enc->aes, keys->server_write_key, - specs->key_size, keys->server_write_IV, - AES_ENCRYPTION); - if (aesRet != 0) - return aesRet; - aesRet = AesSetKey(dec->aes, keys->client_write_key, - specs->key_size, keys->client_write_IV, - AES_DECRYPTION); - if (aesRet != 0) - return aesRet; - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef BUILD_AESGCM - if (specs->bulk_cipher_algorithm == cyassl_aes_gcm) { - if (enc->aes == NULL) - enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (enc->aes == NULL) - return MEMORY_E; - if (dec->aes == NULL) - dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (dec->aes == NULL) - return MEMORY_E; - - if (side == CYASSL_CLIENT_END) { - AesGcmSetKey(enc->aes, keys->client_write_key, specs->key_size); - XMEMCPY(keys->aead_enc_imp_IV, - keys->client_write_IV, AEAD_IMP_IV_SZ); - AesGcmSetKey(dec->aes, keys->server_write_key, specs->key_size); - XMEMCPY(keys->aead_dec_imp_IV, - keys->server_write_IV, AEAD_IMP_IV_SZ); - } - else { - AesGcmSetKey(enc->aes, keys->server_write_key, specs->key_size); - XMEMCPY(keys->aead_enc_imp_IV, - keys->server_write_IV, AEAD_IMP_IV_SZ); - AesGcmSetKey(dec->aes, keys->client_write_key, specs->key_size); - XMEMCPY(keys->aead_dec_imp_IV, - keys->client_write_IV, AEAD_IMP_IV_SZ); - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef HAVE_AESCCM - if (specs->bulk_cipher_algorithm == cyassl_aes_ccm) { - if (enc->aes == NULL) - enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (enc->aes == NULL) - return MEMORY_E; - if (dec->aes == NULL) - dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER); - if (dec->aes == NULL) - return MEMORY_E; - - if (side == CYASSL_CLIENT_END) { - AesCcmSetKey(enc->aes, keys->client_write_key, specs->key_size); - XMEMCPY(keys->aead_enc_imp_IV, - keys->client_write_IV, AEAD_IMP_IV_SZ); - AesCcmSetKey(dec->aes, keys->server_write_key, specs->key_size); - XMEMCPY(keys->aead_dec_imp_IV, - keys->server_write_IV, AEAD_IMP_IV_SZ); - } - else { - AesCcmSetKey(enc->aes, keys->server_write_key, specs->key_size); - XMEMCPY(keys->aead_enc_imp_IV, - keys->server_write_IV, AEAD_IMP_IV_SZ); - AesCcmSetKey(dec->aes, keys->client_write_key, specs->key_size); - XMEMCPY(keys->aead_dec_imp_IV, - keys->client_write_IV, AEAD_IMP_IV_SZ); - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef HAVE_CAMELLIA - if (specs->bulk_cipher_algorithm == cyassl_camellia) { - int camRet; - - if (enc->cam == NULL) - enc->cam = - (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER); - if (enc->cam == NULL) - return MEMORY_E; - - if (dec->cam == NULL) - dec->cam = - (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER); - if (dec->cam == NULL) - return MEMORY_E; - - if (side == CYASSL_CLIENT_END) { - camRet = CamelliaSetKey(enc->cam, keys->client_write_key, - specs->key_size, keys->client_write_IV); - if (camRet != 0) - return camRet; - - camRet = CamelliaSetKey(dec->cam, keys->server_write_key, - specs->key_size, keys->server_write_IV); - if (camRet != 0) - return camRet; - } - else { - camRet = CamelliaSetKey(enc->cam, keys->server_write_key, - specs->key_size, keys->server_write_IV); - if (camRet != 0) - return camRet; - - camRet = CamelliaSetKey(dec->cam, keys->client_write_key, - specs->key_size, keys->client_write_IV); - if (camRet != 0) - return camRet; - } - enc->setup = 1; - dec->setup = 1; - } -#endif - -#ifdef HAVE_NULL_CIPHER - if (specs->bulk_cipher_algorithm == cyassl_cipher_null) { - enc->setup = 1; - dec->setup = 1; - } -#endif - - keys->sequence_number = 0; - keys->peer_sequence_number = 0; - keys->encryptionOn = 0; - (void)side; - (void)heap; - (void)enc; - (void)dec; - (void)specs; - (void)devId; - - return 0; -} - - -/* TLS can call too */ -int StoreKeys(CYASSL* ssl, const byte* keyData) -{ - int sz, i = 0; - int devId = NO_CAVIUM_DEVICE; - -#ifdef HAVE_CAVIUM - devId = ssl->devId; -#endif - - if (ssl->specs.cipher_type != aead) { - sz = ssl->specs.hash_size; - XMEMCPY(ssl->keys.client_write_MAC_secret,&keyData[i], sz); - i += sz; - XMEMCPY(ssl->keys.server_write_MAC_secret,&keyData[i], sz); - i += sz; - } - sz = ssl->specs.key_size; - XMEMCPY(ssl->keys.client_write_key, &keyData[i], sz); - i += sz; - XMEMCPY(ssl->keys.server_write_key, &keyData[i], sz); - i += sz; - - sz = ssl->specs.iv_size; - XMEMCPY(ssl->keys.client_write_IV, &keyData[i], sz); - i += sz; - XMEMCPY(ssl->keys.server_write_IV, &keyData[i], sz); - -#ifdef HAVE_AEAD - if (ssl->specs.cipher_type == aead) { - /* Initialize the AES-GCM/CCM explicit IV to a zero. */ - XMEMSET(ssl->keys.aead_exp_IV, 0, AEAD_EXP_IV_SZ); - } -#endif - - return SetKeys(&ssl->encrypt, &ssl->decrypt, &ssl->keys, &ssl->specs, - ssl->options.side, ssl->heap, devId); -} - -#ifndef NO_OLD_TLS -int DeriveKeys(CYASSL* ssl) -{ - int length = 2 * ssl->specs.hash_size + - 2 * ssl->specs.key_size + - 2 * ssl->specs.iv_size; - int rounds = (length + MD5_DIGEST_SIZE - 1 ) / MD5_DIGEST_SIZE, i; - int ret = 0; - - byte shaOutput[SHA_DIGEST_SIZE]; - byte md5Input[SECRET_LEN + SHA_DIGEST_SIZE]; - byte shaInput[KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN]; - - Md5 md5; - Sha sha; - - byte keyData[KEY_PREFIX * MD5_DIGEST_SIZE]; /* max size */ - - InitMd5(&md5); - ret = InitSha(&sha); - if (ret != 0) - return ret; - - XMEMCPY(md5Input, ssl->arrays->masterSecret, SECRET_LEN); - - for (i = 0; i < rounds; ++i) { - int j = i + 1; - int idx = j; - - if (!SetPrefix(shaInput, i)) { - return PREFIX_ERROR; - } - - XMEMCPY(shaInput + idx, ssl->arrays->masterSecret, SECRET_LEN); - idx += SECRET_LEN; - XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN); - idx += RAN_LEN; - XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN); - - ShaUpdate(&sha, shaInput, (word32)sizeof(shaInput) - KEY_PREFIX + j); - ShaFinal(&sha, shaOutput); - - XMEMCPY(&md5Input[SECRET_LEN], shaOutput, SHA_DIGEST_SIZE); - Md5Update(&md5, md5Input, sizeof(md5Input)); - Md5Final(&md5, keyData + i * MD5_DIGEST_SIZE); - } - - return StoreKeys(ssl, keyData); -} - - -static int CleanPreMaster(CYASSL* ssl) -{ - int i, ret, sz = ssl->arrays->preMasterSz; - - for (i = 0; i < sz; i++) - ssl->arrays->preMasterSecret[i] = 0; - - ret = RNG_GenerateBlock(ssl->rng, ssl->arrays->preMasterSecret, sz); - if (ret != 0) - return ret; - - for (i = 0; i < sz; i++) - ssl->arrays->preMasterSecret[i] = 0; - - return 0; -} - - -/* Create and store the master secret see page 32, 6.1 */ -static int MakeSslMasterSecret(CYASSL* ssl) -{ - byte shaOutput[SHA_DIGEST_SIZE]; - byte md5Input[ENCRYPT_LEN + SHA_DIGEST_SIZE]; - byte shaInput[PREFIX + ENCRYPT_LEN + 2 * RAN_LEN]; - int i, ret; - word32 idx; - word32 pmsSz = ssl->arrays->preMasterSz; - - Md5 md5; - Sha sha; - -#ifdef SHOW_SECRETS - { - word32 j; - printf("pre master secret: "); - for (j = 0; j < pmsSz; j++) - printf("%02x", ssl->arrays->preMasterSecret[j]); - printf("\n"); - } -#endif - - InitMd5(&md5); - ret = InitSha(&sha); - if (ret != 0) - return ret; - - XMEMCPY(md5Input, ssl->arrays->preMasterSecret, pmsSz); - - for (i = 0; i < MASTER_ROUNDS; ++i) { - byte prefix[PREFIX]; - if (!SetPrefix(prefix, i)) { - return PREFIX_ERROR; - } - - idx = 0; - XMEMCPY(shaInput, prefix, i + 1); - idx += i + 1; - - XMEMCPY(shaInput + idx, ssl->arrays->preMasterSecret, pmsSz); - idx += pmsSz; - XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN); - idx += RAN_LEN; - XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN); - idx += RAN_LEN; - ShaUpdate(&sha, shaInput, idx); - ShaFinal(&sha, shaOutput); - - idx = pmsSz; /* preSz */ - XMEMCPY(md5Input + idx, shaOutput, SHA_DIGEST_SIZE); - idx += SHA_DIGEST_SIZE; - Md5Update(&md5, md5Input, idx); - Md5Final(&md5, &ssl->arrays->masterSecret[i * MD5_DIGEST_SIZE]); - } - -#ifdef SHOW_SECRETS - { - word32 j; - printf("master secret: "); - for (j = 0; j < SECRET_LEN; j++) - printf("%02x", ssl->arrays->masterSecret[j]); - printf("\n"); - } -#endif - - ret = DeriveKeys(ssl); - if (ret != 0) { - /* always try to clean PreMaster */ - CleanPreMaster(ssl); - return ret; - } - - return CleanPreMaster(ssl); -} -#endif - - -/* Master wrapper, doesn't use SSL stack space in TLS mode */ -int MakeMasterSecret(CYASSL* ssl) -{ -#ifdef NO_OLD_TLS - return MakeTlsMasterSecret(ssl); -#elif !defined(NO_TLS) - if (ssl->options.tls) return MakeTlsMasterSecret(ssl); -#endif - -#ifndef NO_OLD_TLS - return MakeSslMasterSecret(ssl); -#endif -} - diff --git a/project1/cyassl-3.0.0/src/libcyassl.la b/project1/cyassl-3.0.0/src/libcyassl.la deleted file mode 100644 index dcae8a35..00000000 --- a/project1/cyassl-3.0.0/src/libcyassl.la +++ /dev/null @@ -1,41 +0,0 @@ -# libcyassl.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcyassl.so.5' - -# Names of this library. -library_names='libcyassl.so.5.0.5 libcyassl.so.5 libcyassl.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcyassl. -current=5 -age=0 -revision=5 - -# Is this an already installed library? -installed=no - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/project1/cyassl-3.0.0/src/ocsp.c b/project1/cyassl-3.0.0/src/ocsp.c deleted file mode 100644 index 98cbfdb7..00000000 --- a/project1/cyassl-3.0.0/src/ocsp.c +++ /dev/null @@ -1,269 +0,0 @@ -/* ocsp.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_OCSP - -#include -#include -#include - - -int InitOCSP(CYASSL_OCSP* ocsp, CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("InitOCSP"); - XMEMSET(ocsp, 0, sizeof(*ocsp)); - ocsp->cm = cm; - if (InitMutex(&ocsp->ocspLock) != 0) - return BAD_MUTEX_E; - - return 0; -} - - -static int InitOCSP_Entry(OCSP_Entry* ocspe, DecodedCert* cert) -{ - CYASSL_ENTER("InitOCSP_Entry"); - - XMEMSET(ocspe, 0, sizeof(*ocspe)); - XMEMCPY(ocspe->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE); - XMEMCPY(ocspe->issuerKeyHash, cert->issuerKeyHash, SHA_DIGEST_SIZE); - - return 0; -} - - -static void FreeOCSP_Entry(OCSP_Entry* ocspe) -{ - CertStatus* tmp = ocspe->status; - - CYASSL_ENTER("FreeOCSP_Entry"); - - while (tmp) { - CertStatus* next = tmp->next; - XFREE(tmp, NULL, DYNAMIC_TYPE_OCSP_STATUS); - tmp = next; - } -} - - -void FreeOCSP(CYASSL_OCSP* ocsp, int dynamic) -{ - OCSP_Entry* tmp = ocsp->ocspList; - - CYASSL_ENTER("FreeOCSP"); - - while (tmp) { - OCSP_Entry* next = tmp->next; - FreeOCSP_Entry(tmp); - XFREE(tmp, NULL, DYNAMIC_TYPE_OCSP_ENTRY); - tmp = next; - } - - FreeMutex(&ocsp->ocspLock); - if (dynamic) - XFREE(ocsp, NULL, DYNAMIC_TYPE_OCSP); -} - - -static int xstat2err(int stat) -{ - switch (stat) { - case CERT_GOOD: - return 0; - case CERT_REVOKED: - return OCSP_CERT_REVOKED; - default: - return OCSP_CERT_UNKNOWN; - } -} - - -int CheckCertOCSP(CYASSL_OCSP* ocsp, DecodedCert* cert) -{ - byte* ocspReqBuf = NULL; - int ocspReqSz = 2048; - byte* ocspRespBuf = NULL; - OcspRequest ocspRequest; - OcspResponse ocspResponse; - int result = -1; - OCSP_Entry* ocspe; - CertStatus* certStatus = NULL; - CertStatus newStatus; - const char *url; - int urlSz; - - CYASSL_ENTER("CheckCertOCSP"); - - if (LockMutex(&ocsp->ocspLock) != 0) { - CYASSL_LEAVE("CheckCertOCSP", BAD_MUTEX_E); - return BAD_MUTEX_E; - } - - ocspe = ocsp->ocspList; - while (ocspe) { - if (XMEMCMP(ocspe->issuerHash, cert->issuerHash, SHA_DIGEST_SIZE) == 0 - && XMEMCMP(ocspe->issuerKeyHash, cert->issuerKeyHash, - SHA_DIGEST_SIZE) == 0) - break; - else - ocspe = ocspe->next; - } - - if (ocspe == NULL) { - ocspe = (OCSP_Entry*)XMALLOC(sizeof(OCSP_Entry), - NULL, DYNAMIC_TYPE_OCSP_ENTRY); - if (ocspe != NULL) { - InitOCSP_Entry(ocspe, cert); - ocspe->next = ocsp->ocspList; - ocsp->ocspList = ocspe; - } - else { - UnLockMutex(&ocsp->ocspLock); - CYASSL_LEAVE("CheckCertOCSP", MEMORY_ERROR); - return MEMORY_ERROR; - } - } - else { - certStatus = ocspe->status; - while (certStatus) { - if (certStatus->serialSz == cert->serialSz && - XMEMCMP(certStatus->serial, cert->serial, cert->serialSz) == 0) - break; - else - certStatus = certStatus->next; - } - } - - if (certStatus != NULL) { - if (!ValidateDate(certStatus->thisDate, - certStatus->thisDateFormat, BEFORE) || - (certStatus->nextDate[0] == 0) || - !ValidateDate(certStatus->nextDate, - certStatus->nextDateFormat, AFTER)) { - CYASSL_MSG("\tinvalid status date, looking up cert"); - } - else { - result = xstat2err(certStatus->status); - UnLockMutex(&ocsp->ocspLock); - CYASSL_LEAVE("CheckCertOCSP", result); - return result; - } - } - - UnLockMutex(&ocsp->ocspLock); - - if (ocsp->cm->ocspUseOverrideURL) { - url = ocsp->cm->ocspOverrideURL; - if (url != NULL && url[0] != '\0') - urlSz = (int)XSTRLEN(url); - else - return OCSP_NEED_URL; - } - else if (cert->extAuthInfoSz != 0 && cert->extAuthInfo != NULL) { - url = (const char *)cert->extAuthInfo; - urlSz = cert->extAuthInfoSz; - } - else { - /* cert doesn't have extAuthInfo, assuming CERT_GOOD */ - return 0; - } - - ocspReqBuf = (byte*)XMALLOC(ocspReqSz, NULL, DYNAMIC_TYPE_IN_BUFFER); - if (ocspReqBuf == NULL) { - CYASSL_LEAVE("CheckCertOCSP", MEMORY_ERROR); - return MEMORY_ERROR; - } - InitOcspRequest(&ocspRequest, cert, ocsp->cm->ocspSendNonce, - ocspReqBuf, ocspReqSz); - ocspReqSz = EncodeOcspRequest(&ocspRequest); - - if (ocsp->cm->ocspIOCb) - result = ocsp->cm->ocspIOCb(ocsp->cm->ocspIOCtx, url, urlSz, - ocspReqBuf, ocspReqSz, &ocspRespBuf); - - if (result >= 0 && ocspRespBuf) { - XMEMSET(&newStatus, 0, sizeof(CertStatus)); - - InitOcspResponse(&ocspResponse, &newStatus, ocspRespBuf, result); - OcspResponseDecode(&ocspResponse); - - if (ocspResponse.responseStatus != OCSP_SUCCESSFUL) - result = OCSP_LOOKUP_FAIL; - else { - if (CompareOcspReqResp(&ocspRequest, &ocspResponse) == 0) { - result = xstat2err(ocspResponse.status->status); - - if (LockMutex(&ocsp->ocspLock) != 0) - result = BAD_MUTEX_E; - else { - if (certStatus != NULL) - /* Replace existing certificate entry with updated */ - XMEMCPY(certStatus, &newStatus, sizeof(CertStatus)); - else { - /* Save new certificate entry */ - certStatus = (CertStatus*)XMALLOC(sizeof(CertStatus), - NULL, DYNAMIC_TYPE_OCSP_STATUS); - if (certStatus != NULL) { - XMEMCPY(certStatus, &newStatus, sizeof(CertStatus)); - certStatus->next = ocspe->status; - ocspe->status = certStatus; - ocspe->totalStatus++; - } - } - - UnLockMutex(&ocsp->ocspLock); - } - } - else - result = OCSP_LOOKUP_FAIL; - } - } - else - result = OCSP_LOOKUP_FAIL; - - if (ocspReqBuf != NULL) - XFREE(ocspReqBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); - - if (ocspRespBuf != NULL && ocsp->cm->ocspRespFreeCb) - ocsp->cm->ocspRespFreeCb(ocsp->cm->ocspIOCtx, ocspRespBuf); - - CYASSL_LEAVE("CheckCertOCSP", result); - return result; -} - - -#else /* HAVE_OCSP */ - - -#ifdef _MSC_VER - /* 4206 warning for blank file */ - #pragma warning(disable: 4206) -#endif - - -#endif /* HAVE_OCSP */ - diff --git a/project1/cyassl-3.0.0/src/sniffer.c b/project1/cyassl-3.0.0/src/sniffer.c deleted file mode 100644 index 2c6860c8..00000000 --- a/project1/cyassl-3.0.0/src/sniffer.c +++ /dev/null @@ -1,2567 +0,0 @@ -/* sniffer.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef CYASSL_SNIFFER - -#include -#include - -#ifndef _WIN32 - #include -#endif - -#ifdef _WIN32 - #define SNPRINTF _snprintf -#else - #define SNPRINTF snprintf -#endif - -#include -#include -#include -#include -#include - - -#ifndef min - -static INLINE word32 min(word32 a, word32 b) -{ - return a > b ? b : a; -} - -#endif - - -/* Misc constants */ -enum { - MAX_SERVER_ADDRESS = 128, /* maximum server address length */ - MAX_ERROR_LEN = 80, /* maximum error length */ - ETHER_IF_ADDR_LEN = 6, /* ethernet interface address length */ - LOCAL_IF_ADDR_LEN = 4, /* localhost interface address length, !windows */ - TCP_PROTO = 6, /* TCP_PROTOCOL */ - IP_HDR_SZ = 20, /* IP header legnth, min */ - TCP_HDR_SZ = 20, /* TCP header legnth, min */ - IPV4 = 4, /* IP version 4 */ - TCP_PROTOCOL = 6, /* TCP Protocol id */ - TRACE_MSG_SZ = 80, /* Trace Message buffer size */ - HASH_SIZE = 499, /* Session Hash Table Rows */ - PSEUDO_HDR_SZ = 12, /* TCP Pseudo Header size in bytes */ - FATAL_ERROR_STATE = 1, /* SnifferSession fatal error state */ - SNIFFER_TIMEOUT = 900, /* Cache unclosed Sessions for 15 minutes */ - TICKET_HINT_LEN = 4, /* Session Ticket Hint length */ - EXT_TYPE_SZ = 2, /* Extension length */ - MAX_INPUT_SZ = MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA + - MTU_EXTRA, /* Max input sz of reassembly */ - TICKET_EXT_ID = 0x23 /* Session Ticket Extension ID */ -}; - - -#ifdef _WIN32 - -static HMODULE dllModule; /* for error string resources */ - -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) -{ - static int didInit = 0; - - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - if (didInit == 0) { - dllModule = hModule; - ssl_InitSniffer(); - didInit = 1; - } - break; - case DLL_THREAD_ATTACH: - break; - case DLL_THREAD_DETACH: - break; - case DLL_PROCESS_DETACH: - if (didInit) { - ssl_FreeSniffer(); - didInit = 0; - } - break; - } - return TRUE; -} - -#endif /* _WIN32 */ - - -static int TraceOn = 0; /* Trace is off by default */ -static FILE* TraceFile = 0; - - -/* windows uses .rc table for this */ -#ifndef _WIN32 - -static const char* const msgTable[] = -{ - /* 1 */ - "Out of Memory", - "New SSL Sniffer Server Registered", - "Checking IP Header", - "SSL Sniffer Server Not Registered", - "Checking TCP Header", - - /* 6 */ - "SSL Sniffer Server Port Not Registered", - "RSA Private Decrypt Error", - "RSA Private Decode Error", - "Set Cipher Spec Error", - "Server Hello Input Malformed", - - /* 11 */ - "Couldn't Resume Session Error", - "Server Did Resumption", - "Client Hello Input Malformed", - "Client Trying to Resume", - "Handshake Input Malformed", - - /* 16 */ - "Got Hello Verify msg", - "Got Server Hello msg", - "Got Cert Request msg", - "Got Server Key Exchange msg", - "Got Cert msg", - - /* 21 */ - "Got Server Hello Done msg", - "Got Finished msg", - "Got Client Hello msg", - "Got Client Key Exchange msg", - "Got Cert Verify msg", - - /* 26 */ - "Got Unknown Handshake msg", - "New SSL Sniffer Session created", - "Couldn't create new SSL", - "Got a Packet to decode", - "No data present", - - /* 31 */ - "Session Not Found", - "Got an Old Client Hello msg", - "Old Client Hello Input Malformed", - "Old Client Hello OK", - "Bad Old Client Hello", - - /* 36 */ - "Bad Record Header", - "Record Header Input Malformed", - "Got a HandShake msg", - "Bad HandShake msg", - "Got a Change Cipher Spec msg", - - /* 41 */ - "Got Application Data msg", - "Bad Application Data", - "Got an Alert msg", - "Another msg to Process", - "Removing Session From Table", - - /* 46 */ - "Bad Key File", - "Wrong IP Version", - "Wrong Protocol type", - "Packet Short for header processing", - "Got Unknown Record Type", - - /* 51 */ - "Can't Open Trace File", - "Session in Fatal Error State", - "Partial SSL record received", - "Buffer Error, malformed input", - "Added to Partial Input", - - /* 56 */ - "Received a Duplicate Packet", - "Received an Out of Order Packet", - "Received an Overlap Duplicate Packet", - "Received an Overlap Reassembly Begin Duplicate Packet", - "Received an Overlap Reassembly End Duplicate Packet", - - /* 61 */ - "Missed the Client Hello Entirely", - "Got Hello Request msg", - "Got Session Ticket msg", - "Bad Input", - "Bad Decrypt Type", - - /* 66 */ - "Bad Finished Message Processing", - "Bad Compression Type", - "Bad DeriveKeys Error", - "Saw ACK for Missing Packet Error", - "Bad Decrypt Operation" -}; - - -/* *nix version uses table above */ -static void GetError(int idx, char* str) -{ - XSTRNCPY(str, msgTable[idx - 1], MAX_ERROR_LEN); -} - - -#else /* _WIN32 */ - - -/* Windows version uses .rc table */ -static void GetError(int idx, char* buffer) -{ - if (!LoadStringA(dllModule, idx, buffer, MAX_ERROR_LEN)) - buffer[0] = 0; -} - - -#endif /* _WIN32 */ - - -/* Packet Buffer for reassembly list and ready list */ -typedef struct PacketBuffer { - word32 begin; /* relative sequence begin */ - word32 end; /* relative sequence end */ - byte* data; /* actual data */ - struct PacketBuffer* next; /* next on reassembly list or ready list */ -} PacketBuffer; - - -/* Sniffer Server holds info for each server/port monitored */ -typedef struct SnifferServer { - SSL_CTX* ctx; /* SSL context */ - char address[MAX_SERVER_ADDRESS]; /* passed in server address */ - word32 server; /* netowrk order address */ - int port; /* server port */ - struct SnifferServer* next; /* for list */ -} SnifferServer; - - -/* Session Flags */ -typedef struct Flags { - byte side; /* which end is current packet headed */ - byte serverCipherOn; /* indicates whether cipher is active */ - byte clientCipherOn; /* indicates whether cipher is active */ - byte resuming; /* did this session come from resumption */ - byte cached; /* have we cached this session yet */ - byte clientHello; /* processed client hello yet, for SSLv2 */ - byte finCount; /* get both FINs before removing */ - byte fatalError; /* fatal error state */ -} Flags; - - -/* Out of Order FIN caputre */ -typedef struct FinCaputre { - word32 cliFinSeq; /* client relative sequence FIN 0 is no */ - word32 srvFinSeq; /* server relative sequence FIN, 0 is no */ - byte cliCounted; /* did we count yet, detects duplicates */ - byte srvCounted; /* did we count yet, detects duplicates */ -} FinCaputre; - - -/* Sniffer Session holds info for each client/server SSL/TLS session */ -typedef struct SnifferSession { - SnifferServer* context; /* server context */ - SSL* sslServer; /* SSL server side decode */ - SSL* sslClient; /* SSL client side decode */ - word32 server; /* server address in network byte order */ - word32 client; /* client address in network byte order */ - word16 srvPort; /* server port */ - word16 cliPort; /* client port */ - word32 cliSeqStart; /* client start sequence */ - word32 srvSeqStart; /* server start sequence */ - word32 cliExpected; /* client expected sequence (relative) */ - word32 srvExpected; /* server expected sequence (relative) */ - FinCaputre finCaputre; /* retain out of order FIN s */ - Flags flags; /* session flags */ - time_t lastUsed; /* last used ticks */ - PacketBuffer* cliReassemblyList; /* client out of order packets */ - PacketBuffer* srvReassemblyList; /* server out of order packets */ - struct SnifferSession* next; /* for hash table list */ - byte* ticketID; /* mac ID of session ticket */ -} SnifferSession; - - -/* Sniffer Server List and mutex */ -static SnifferServer* ServerList = 0; -static CyaSSL_Mutex ServerListMutex; - - -/* Session Hash Table, mutex, and count */ -static SnifferSession* SessionTable[HASH_SIZE]; -static CyaSSL_Mutex SessionMutex; -static int SessionCount = 0; - - -/* Initialize overall Sniffer */ -void ssl_InitSniffer(void) -{ - CyaSSL_Init(); - InitMutex(&ServerListMutex); - InitMutex(&SessionMutex); -} - - -/* Free Sniffer Server's resources/self */ -static void FreeSnifferServer(SnifferServer* srv) -{ - if (srv) - SSL_CTX_free(srv->ctx); - free(srv); -} - - -/* free PacketBuffer's resources/self */ -static void FreePacketBuffer(PacketBuffer* del) -{ - if (del) { - free(del->data); - free(del); - } -} - - -/* remove PacketBuffer List */ -static void FreePacketList(PacketBuffer* in) -{ - if (in) { - PacketBuffer* del; - PacketBuffer* packet = in; - - while (packet) { - del = packet; - packet = packet->next; - FreePacketBuffer(del); - } - } -} - - -/* Free Sniffer Session's resources/self */ -static void FreeSnifferSession(SnifferSession* session) -{ - if (session) { - SSL_free(session->sslClient); - SSL_free(session->sslServer); - - FreePacketList(session->cliReassemblyList); - FreePacketList(session->srvReassemblyList); - - free(session->ticketID); - } - free(session); -} - - -/* Free overall Sniffer */ -void ssl_FreeSniffer(void) -{ - SnifferServer* srv; - SnifferServer* removeServer; - SnifferSession* session; - SnifferSession* removeSession; - int i; - - LockMutex(&ServerListMutex); - LockMutex(&SessionMutex); - - srv = ServerList; - while (srv) { - removeServer = srv; - srv = srv->next; - FreeSnifferServer(removeServer); - } - - for (i = 0; i < HASH_SIZE; i++) { - session = SessionTable[i]; - while (session) { - removeSession = session; - session = session->next; - FreeSnifferSession(removeSession); - } - } - - UnLockMutex(&SessionMutex); - UnLockMutex(&ServerListMutex); - - FreeMutex(&SessionMutex); - FreeMutex(&ServerListMutex); - - if (TraceFile) { - TraceOn = 0; - fclose(TraceFile); - TraceFile = NULL; - } - - CyaSSL_Cleanup(); -} - - -/* Initialize a SnifferServer */ -static void InitSnifferServer(SnifferServer* sniffer) -{ - sniffer->ctx = 0; - XMEMSET(sniffer->address, 0, MAX_SERVER_ADDRESS); - sniffer->server = 0; - sniffer->port = 0; - sniffer->next = 0; -} - - -/* Initialize session flags */ -static void InitFlags(Flags* flags) -{ - flags->side = 0; - flags->serverCipherOn = 0; - flags->clientCipherOn = 0; - flags->resuming = 0; - flags->cached = 0; - flags->clientHello = 0; - flags->finCount = 0; - flags->fatalError = 0; -} - - -/* Initialize FIN Capture */ -static void InitFinCapture(FinCaputre* cap) -{ - cap->cliFinSeq = 0; - cap->srvFinSeq = 0; - cap->cliCounted = 0; - cap->srvCounted = 0; -} - - -/* Initialize a Sniffer Session */ -static void InitSession(SnifferSession* session) -{ - session->context = 0; - session->sslServer = 0; - session->sslClient = 0; - session->server = 0; - session->client = 0; - session->srvPort = 0; - session->cliPort = 0; - session->cliSeqStart = 0; - session->srvSeqStart = 0; - session->cliExpected = 0; - session->srvExpected = 0; - session->lastUsed = 0; - session->cliReassemblyList = 0; - session->srvReassemblyList = 0; - session->next = 0; - session->ticketID = 0; - - InitFlags(&session->flags); - InitFinCapture(&session->finCaputre); -} - - -/* IP Info from IP Header */ -typedef struct IpInfo { - int length; /* length of this header */ - int total; /* total length of fragment */ - word32 src; /* network order source address */ - word32 dst; /* network order destination address */ -} IpInfo; - - -/* TCP Info from TCP Header */ -typedef struct TcpInfo { - int srcPort; /* source port */ - int dstPort; /* source port */ - int length; /* length of this header */ - word32 sequence; /* sequence number */ - word32 ackNumber; /* ack number */ - byte fin; /* FIN set */ - byte rst; /* RST set */ - byte syn; /* SYN set */ - byte ack; /* ACK set */ -} TcpInfo; - - -/* Tcp Pseudo Header for Checksum calculation */ -typedef struct TcpPseudoHdr { - word32 src; /* source address */ - word32 dst; /* destination address */ - byte rsv; /* reserved, always 0 */ - byte protocol; /* IP protocol */ - word16 legnth; /* tcp header length + data length (doesn't include */ - /* pseudo header length) network order */ -} TcpPseudoHdr; - - -/* Password Setting Callback */ -static int SetPassword(char* passwd, int sz, int rw, void* userdata) -{ - (void)rw; - XSTRNCPY(passwd, userdata, sz); - return (int)XSTRLEN(userdata); -} - - -/* Ethernet Header */ -typedef struct EthernetHdr { - byte dst[ETHER_IF_ADDR_LEN]; /* destination host address */ - byte src[ETHER_IF_ADDR_LEN]; /* source host address */ - word16 type; /* IP, ARP, etc */ -} EthernetHdr; - - -/* IP Header */ -typedef struct IpHdr { - byte ver_hl; /* version/header length */ - byte tos; /* type of service */ - word16 length; /* total length */ - word16 id; /* identification */ - word16 offset; /* fragment offset field */ - byte ttl; /* time to live */ - byte protocol; /* protocol */ - word16 sum; /* checksum */ - word32 src; /* source address */ - word32 dst; /* destination address */ -} IpHdr; - - -#define IP_HL(ip) ( (((ip)->ver_hl) & 0x0f) * 4) -#define IP_V(ip) ( ((ip)->ver_hl) >> 4) - -/* TCP Header */ -typedef struct TcpHdr { - word16 srcPort; /* source port */ - word16 dstPort; /* destination port */ - word32 sequence; /* sequence number */ - word32 ack; /* acknoledgment number */ - byte offset; /* data offset, reserved */ - byte flags; /* option flags */ - word16 window; /* window */ - word16 sum; /* checksum */ - word16 urgent; /* urgent pointer */ -} TcpHdr; - -#define TCP_LEN(tcp) ( (((tcp)->offset & 0xf0) >> 4) * 4) -#define TCP_FIN 0x01 -#define TCP_SYN 0x02 -#define TCP_RST 0x04 -#define TCP_ACK 0x10 - - - - - -/* Use platform specific GetError to write to tracfile if tracing */ -static void Trace(int idx) -{ - if (TraceOn) { - char myBuffer[MAX_ERROR_LEN]; - GetError(idx, myBuffer); - fprintf(TraceFile, "\t%s\n", myBuffer); -#ifdef DEBUG_SNIFFER - fprintf(stderr, "\t%s\n", myBuffer); -#endif - } -} - - -/* Show TimeStamp for beginning of packet Trace */ -static void TraceHeader(void) -{ - if (TraceOn) { - time_t ticks = time(NULL); - fprintf(TraceFile, "\n%s", ctime(&ticks)); - } -} - - -/* Show Set Server info for Trace */ -static void TraceSetServer(const char* srv, int port, const char* keyFile) -{ - if (TraceOn) { - fprintf(TraceFile, "\tTrying to install a new Sniffer Server with\n"); - fprintf(TraceFile, "\tserver: %s, port: %d, keyFile: %s\n", srv, port, - keyFile); - } -} - - -/* Trace got packet number */ -static void TracePacket(void) -{ - if (TraceOn) { - static word32 packetNumber = 0; - fprintf(TraceFile, "\tGot a Packet to decode, packet %u\n", - ++packetNumber); - } -} - - -/* Convert network byte order address into human readable */ -static char* IpToS(word32 addr, char* str) -{ - byte* p = (byte*)&addr; - - SNPRINTF(str, TRACE_MSG_SZ, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - - return str; -} - - -/* Show destination and source address from Ip Hdr for packet Trace */ -static void TraceIP(IpHdr* iphdr) -{ - if (TraceOn) { - char src[TRACE_MSG_SZ]; - char dst[TRACE_MSG_SZ]; - fprintf(TraceFile, "\tdst:%s src:%s\n", IpToS(iphdr->dst, dst), - IpToS(iphdr->src, src)); - } -} - - -/* Show destination and source port from Tcp Hdr for packet Trace */ -static void TraceTcp(TcpHdr* tcphdr) -{ - if (TraceOn) { - fprintf(TraceFile, "\tdstPort:%u srcPort:%u\n", ntohs(tcphdr->dstPort), - ntohs(tcphdr->srcPort)); - } -} - - -/* Show sequence and payload length for Trace */ -static void TraceSequence(word32 seq, int len) -{ - if (TraceOn) { - fprintf(TraceFile, "\tSequence:%u, payload length:%d\n", seq, len); - } -} - - -/* Show sequence and payload length for Trace */ -static void TraceAck(word32 ack, word32 expected) -{ - if (TraceOn) { - fprintf(TraceFile, "\tAck:%u Expected:%u\n", ack, expected); - } -} - - -/* Show relative expected and relative received sequences */ -static void TraceRelativeSequence(word32 expected, word32 got) -{ - if (TraceOn) { - fprintf(TraceFile, "\tExpected sequence:%u, received sequence:%u\n", - expected, got); - } -} - - -/* Show server sequence startup from SYN */ -static void TraceServerSyn(word32 seq) -{ - if (TraceOn) { - fprintf(TraceFile, "\tServer SYN, Sequence Start:%u\n", seq); - } -} - - -/* Show client sequence startup from SYN */ -static void TraceClientSyn(word32 seq) -{ - if (TraceOn) { - fprintf(TraceFile, "\tClient SYN, Sequence Start:%u\n", seq); - } -} - - -/* Show client FIN capture */ -static void TraceClientFin(word32 finSeq, word32 relSeq) -{ - if (TraceOn) { - fprintf(TraceFile, "\tClient FIN capture:%u, current SEQ:%u\n", - finSeq, relSeq); - } -} - - -/* Show server FIN capture */ -static void TraceServerFin(word32 finSeq, word32 relSeq) -{ - if (TraceOn) { - fprintf(TraceFile, "\tServer FIN capture:%u, current SEQ:%u\n", - finSeq, relSeq); - } -} - - -/* Show number of SSL data bytes decoded, could be 0 (ok) */ -static void TraceGotData(int bytes) -{ - if (TraceOn) { - fprintf(TraceFile, "\t%d bytes of SSL App data processed\n", bytes); - } -} - - -/* Show bytes added to old SSL App data */ -static void TraceAddedData(int newBytes, int existingBytes) -{ - if (TraceOn) { - fprintf(TraceFile, - "\t%d bytes added to %d exisiting bytes in User Buffer\n", - newBytes, existingBytes); - } -} - - -/* Show Stale Session */ -static void TraceStaleSession(void) -{ - if (TraceOn) { - fprintf(TraceFile, "\tFound a stale session\n"); - } -} - - -/* Show Finding Stale Sessions */ -static void TraceFindingStale(void) -{ - if (TraceOn) { - fprintf(TraceFile, "\tTrying to find Stale Sessions\n"); - } -} - - -/* Show Removed Session */ -static void TraceRemovedSession(void) -{ - if (TraceOn) { - fprintf(TraceFile, "\tRemoved it\n"); - } -} - - -/* Set user error string */ -static void SetError(int idx, char* error, SnifferSession* session, int fatal) -{ - GetError(idx, error); - Trace(idx); - if (session && fatal == FATAL_ERROR_STATE) - session->flags.fatalError = 1; -} - - -/* See if this IPV4 network order address has been registered */ -/* return 1 is true, 0 is false */ -static int IsServerRegistered(word32 addr) -{ - int ret = 0; /* false */ - SnifferServer* sniffer; - - LockMutex(&ServerListMutex); - - sniffer = ServerList; - while (sniffer) { - if (sniffer->server == addr) { - ret = 1; - break; - } - sniffer = sniffer->next; - } - - UnLockMutex(&ServerListMutex); - - return ret; -} - - -/* See if this port has been registered to watch */ -/* return 1 is true, 0 is false */ -static int IsPortRegistered(word32 port) -{ - int ret = 0; /* false */ - SnifferServer* sniffer; - - LockMutex(&ServerListMutex); - - sniffer = ServerList; - while (sniffer) { - if (sniffer->port == (int)port) { - ret = 1; - break; - } - sniffer = sniffer->next; - } - - UnLockMutex(&ServerListMutex); - - return ret; -} - - -/* Get SnifferServer from IP and Port */ -static SnifferServer* GetSnifferServer(IpInfo* ipInfo, TcpInfo* tcpInfo) -{ - SnifferServer* sniffer; - - LockMutex(&ServerListMutex); - - sniffer = ServerList; - while (sniffer) { - if (sniffer->port == tcpInfo->srcPort && sniffer->server == ipInfo->src) - break; - if (sniffer->port == tcpInfo->dstPort && sniffer->server == ipInfo->dst) - break; - sniffer = sniffer->next; - } - - UnLockMutex(&ServerListMutex); - - return sniffer; -} - - -/* Hash the Session Info, return hash row */ -static word32 SessionHash(IpInfo* ipInfo, TcpInfo* tcpInfo) -{ - word32 hash = ipInfo->src * ipInfo->dst; - hash *= tcpInfo->srcPort * tcpInfo->dstPort; - - return hash % HASH_SIZE; -} - - -/* Get Exisiting SnifferSession from IP and Port */ -static SnifferSession* GetSnifferSession(IpInfo* ipInfo, TcpInfo* tcpInfo) -{ - SnifferSession* session; - time_t currTime = time(NULL); - word32 row = SessionHash(ipInfo, tcpInfo); - - assert(row <= HASH_SIZE); - - LockMutex(&SessionMutex); - - session = SessionTable[row]; - while (session) { - if (session->server == ipInfo->src && session->client == ipInfo->dst && - session->srvPort == tcpInfo->srcPort && - session->cliPort == tcpInfo->dstPort) - break; - if (session->client == ipInfo->src && session->server == ipInfo->dst && - session->cliPort == tcpInfo->srcPort && - session->srvPort == tcpInfo->dstPort) - break; - - session = session->next; - } - - if (session) - session->lastUsed= currTime; /* keep session alive, remove stale will */ - /* leave alone */ - UnLockMutex(&SessionMutex); - - /* determine side */ - if (session) { - if (ipInfo->dst == session->context->server && - tcpInfo->dstPort == session->context->port) - session->flags.side = CYASSL_SERVER_END; - else - session->flags.side = CYASSL_CLIENT_END; - } - - return session; -} - - -/* Sets the private key for a specific server and port */ -/* returns 0 on success, -1 on error */ -int ssl_SetPrivateKey(const char* serverAddress, int port, const char* keyFile, - int typeKey, const char* password, char* error) -{ - int ret; - int type = (typeKey == FILETYPE_PEM) ? SSL_FILETYPE_PEM : - SSL_FILETYPE_ASN1; - SnifferServer* sniffer; - - TraceHeader(); - TraceSetServer(serverAddress, port, keyFile); - - sniffer = (SnifferServer*)malloc(sizeof(SnifferServer)); - if (sniffer == NULL) { - SetError(MEMORY_STR, error, NULL, 0); - return -1; - } - InitSnifferServer(sniffer); - - XSTRNCPY(sniffer->address, serverAddress, MAX_SERVER_ADDRESS); - sniffer->server = inet_addr(sniffer->address); - sniffer->port = port; - - /* start in client mode since SSL_new needs a cert for server */ - sniffer->ctx = SSL_CTX_new(SSLv3_client_method()); - if (!sniffer->ctx) { - SetError(MEMORY_STR, error, NULL, 0); - FreeSnifferServer(sniffer); - return -1; - } - - if (password){ - SSL_CTX_set_default_passwd_cb(sniffer->ctx, SetPassword); - SSL_CTX_set_default_passwd_cb_userdata(sniffer->ctx, (void*)password); - } - ret = SSL_CTX_use_PrivateKey_file(sniffer->ctx, keyFile, type); - if (ret != SSL_SUCCESS) { - SetError(KEY_FILE_STR, error, NULL, 0); - FreeSnifferServer(sniffer); - return -1; - } - Trace(NEW_SERVER_STR); - - LockMutex(&ServerListMutex); - - sniffer->next = ServerList; - ServerList = sniffer; - - UnLockMutex(&ServerListMutex); - - return 0; -} - - -/* Check IP Header for IPV4, TCP, and a registered server address */ -/* returns 0 on success, -1 on error */ -static int CheckIpHdr(IpHdr* iphdr, IpInfo* info, int length, char* error) -{ - int version = IP_V(iphdr); - - TraceIP(iphdr); - Trace(IP_CHECK_STR); - - if (version != IPV4) { - SetError(BAD_IPVER_STR, error, NULL, 0); - return -1; - } - - if (iphdr->protocol != TCP_PROTOCOL) { - SetError(BAD_PROTO_STR, error, NULL, 0); - return -1; - } - - if (!IsServerRegistered(iphdr->src) && !IsServerRegistered(iphdr->dst)) { - SetError(SERVER_NOT_REG_STR, error, NULL, 0); - return -1; - } - - info->length = IP_HL(iphdr); - info->total = ntohs(iphdr->length); - info->src = iphdr->src; - info->dst = iphdr->dst; - - if (info->total == 0) - info->total = length; /* reassembled may be off */ - - return 0; -} - - -/* Check TCP Header for a registered port */ -/* returns 0 on success, -1 on error */ -static int CheckTcpHdr(TcpHdr* tcphdr, TcpInfo* info, char* error) -{ - TraceTcp(tcphdr); - Trace(TCP_CHECK_STR); - info->srcPort = ntohs(tcphdr->srcPort); - info->dstPort = ntohs(tcphdr->dstPort); - info->length = TCP_LEN(tcphdr); - info->sequence = ntohl(tcphdr->sequence); - info->fin = tcphdr->flags & TCP_FIN; - info->rst = tcphdr->flags & TCP_RST; - info->syn = tcphdr->flags & TCP_SYN; - info->ack = tcphdr->flags & TCP_ACK; - if (info->ack) - info->ackNumber = ntohl(tcphdr->ack); - - if (!IsPortRegistered(info->srcPort) && !IsPortRegistered(info->dstPort)) { - SetError(SERVER_PORT_NOT_REG_STR, error, NULL, 0); - return -1; - } - - return 0; -} - - -/* Decode Record Layer Header */ -static int GetRecordHeader(const byte* input, RecordLayerHeader* rh, int* size) -{ - XMEMCPY(rh, input, RECORD_HEADER_SZ); - *size = (rh->length[0] << 8) | rh->length[1]; - - if (*size > (MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA)) - return LENGTH_ERROR; - - return 0; -} - - -/* Process Client Key Exchange, RSA only */ -static int ProcessClientKeyExchange(const byte* input, int* sslBytes, - SnifferSession* session, char* error) -{ - word32 idx = 0; - RsaKey key; - int ret; - - ret = InitRsaKey(&key, 0); - if (ret == 0) - ret = RsaPrivateKeyDecode(session->context->ctx->privateKey.buffer, - &idx, &key, session->context->ctx->privateKey.length); - if (ret == 0) { - int length = RsaEncryptSize(&key); - - if (IsTLS(session->sslServer)) - input += 2; /* tls pre length */ - - if (length > *sslBytes) { - SetError(PARTIAL_INPUT_STR, error, session, FATAL_ERROR_STATE); - FreeRsaKey(&key); - return -1; - } - ret = RsaPrivateDecrypt(input, length, - session->sslServer->arrays->preMasterSecret,SECRET_LEN, &key); - - if (ret != SECRET_LEN) { - SetError(RSA_DECRYPT_STR, error, session, FATAL_ERROR_STATE); - FreeRsaKey(&key); - return -1; - } - ret = 0; /* not in error state */ - session->sslServer->arrays->preMasterSz = SECRET_LEN; - - /* store for client side as well */ - XMEMCPY(session->sslClient->arrays->preMasterSecret, - session->sslServer->arrays->preMasterSecret, SECRET_LEN); - session->sslClient->arrays->preMasterSz = SECRET_LEN; - - #ifdef SHOW_SECRETS - { - int i; - printf("pre master secret: "); - for (i = 0; i < SECRET_LEN; i++) - printf("%02x", session->sslServer->arrays->preMasterSecret[i]); - printf("\n"); - } - #endif - } - else { - SetError(RSA_DECODE_STR, error, session, FATAL_ERROR_STATE); - FreeRsaKey(&key); - return -1; - } - - if (SetCipherSpecs(session->sslServer) != 0) { - SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); - FreeRsaKey(&key); - return -1; - } - - if (SetCipherSpecs(session->sslClient) != 0) { - SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); - FreeRsaKey(&key); - return -1; - } - - MakeMasterSecret(session->sslServer); - MakeMasterSecret(session->sslClient); -#ifdef SHOW_SECRETS - { - int i; - printf("server master secret: "); - for (i = 0; i < SECRET_LEN; i++) - printf("%02x", session->sslServer->arrays->masterSecret[i]); - printf("\n"); - - printf("client master secret: "); - for (i = 0; i < SECRET_LEN; i++) - printf("%02x", session->sslClient->arrays->masterSecret[i]); - printf("\n"); - - printf("server suite = %d\n", session->sslServer->options.cipherSuite); - printf("client suite = %d\n", session->sslClient->options.cipherSuite); - } -#endif - - FreeRsaKey(&key); - return ret; -} - - -/* Process Session Ticket */ -static int ProcessSessionTicket(const byte* input, int* sslBytes, - SnifferSession* session, char* error) -{ - word16 len; - - /* make sure can read through hint and len */ - if (TICKET_HINT_LEN + LENGTH_SZ > *sslBytes) { - SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - input += TICKET_HINT_LEN; /* skip over hint */ - *sslBytes -= TICKET_HINT_LEN; - - len = (word16)((input[0] << 8) | input[1]); - input += LENGTH_SZ; - *sslBytes -= LENGTH_SZ; - - /* make sure can read through ticket */ - if (len > *sslBytes || len < ID_LEN) { - SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - /* store session with macID as sessionID */ - session->sslServer->options.haveSessionId = 1; - XMEMCPY(session->sslServer->arrays->sessionID, input + len - ID_LEN,ID_LEN); - - return 0; -} - - -/* Process Server Hello */ -static int ProcessServerHello(const byte* input, int* sslBytes, - SnifferSession* session, char* error) -{ - ProtocolVersion pv; - byte b; - int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN; - int doResume = 0; - - /* make sure we didn't miss ClientHello */ - if (session->flags.clientHello == 0) { - SetError(MISSED_CLIENT_HELLO_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - /* make sure can read through session len */ - if (toRead > *sslBytes) { - SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - XMEMCPY(&pv, input, VERSION_SZ); - input += VERSION_SZ; - *sslBytes -= VERSION_SZ; - - session->sslServer->version = pv; - session->sslClient->version = pv; - - XMEMCPY(session->sslServer->arrays->serverRandom, input, RAN_LEN); - XMEMCPY(session->sslClient->arrays->serverRandom, input, RAN_LEN); - input += RAN_LEN; - *sslBytes -= RAN_LEN; - - b = *input++; - *sslBytes -= 1; - - /* make sure can read through compression */ - if ( (b + SUITE_LEN + ENUM_LEN) > *sslBytes) { - SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - if (b) { - XMEMCPY(session->sslServer->arrays->sessionID, input, ID_LEN); - session->sslServer->options.haveSessionId = 1; - } - input += b; - *sslBytes -= b; - - /* cipher suite */ - b = *input++; /* first byte, ECC or not */ - session->sslServer->options.cipherSuite0 = b; - session->sslClient->options.cipherSuite0 = b; - b = *input++; - session->sslServer->options.cipherSuite = b; - session->sslClient->options.cipherSuite = b; - *sslBytes -= SUITE_LEN; - - /* compression */ - b = *input++; - *sslBytes -= ENUM_LEN; - - if (b) { - SetError(BAD_COMPRESSION_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - if (session->sslServer->options.haveSessionId && - XMEMCMP(session->sslServer->arrays->sessionID, - session->sslClient->arrays->sessionID, ID_LEN) == 0) - doResume = 1; - else if (session->sslClient->options.haveSessionId == 0 && - session->sslServer->options.haveSessionId == 0 && - session->ticketID) - doResume = 1; - - if (session->ticketID && doResume) { - /* use ticketID to retrieve from session, prefer over sessionID */ - XMEMCPY(session->sslServer->arrays->sessionID,session->ticketID,ID_LEN); - session->sslServer->options.haveSessionId = 1; /* may not have - actual sessionID */ - } - - if (doResume ) { - int ret = 0; - SSL_SESSION* resume = GetSession(session->sslServer, - session->sslServer->arrays->masterSecret); - if (resume == NULL) { - SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - /* make sure client has master secret too */ - XMEMCPY(session->sslClient->arrays->masterSecret, - session->sslServer->arrays->masterSecret, SECRET_LEN); - session->flags.resuming = 1; - - Trace(SERVER_DID_RESUMPTION_STR); - if (SetCipherSpecs(session->sslServer) != 0) { - SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - if (SetCipherSpecs(session->sslClient) != 0) { - SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - if (session->sslServer->options.tls) { - ret = DeriveTlsKeys(session->sslServer); - ret += DeriveTlsKeys(session->sslClient); - } - else { - ret = DeriveKeys(session->sslServer); - ret += DeriveKeys(session->sslClient); - } - if (ret != 0) { - SetError(BAD_DERIVE_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - } -#ifdef SHOW_SECRETS - { - int i; - printf("cipher suite = 0x%02x\n", - session->sslServer->options.cipherSuite); - printf("server random: "); - for (i = 0; i < RAN_LEN; i++) - printf("%02x", session->sslServer->arrays->serverRandom[i]); - printf("\n"); - } -#endif - return 0; -} - - -/* Process normal Client Hello */ -static int ProcessClientHello(const byte* input, int* sslBytes, - SnifferSession* session, char* error) -{ - byte bLen; - word16 len; - int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN; - - session->flags.clientHello = 1; /* don't process again */ - - /* make sure can read up to session len */ - if (toRead > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - /* skip, get negotiated one from server hello */ - input += VERSION_SZ; - *sslBytes -= VERSION_SZ; - - XMEMCPY(session->sslServer->arrays->clientRandom, input, RAN_LEN); - XMEMCPY(session->sslClient->arrays->clientRandom, input, RAN_LEN); - - input += RAN_LEN; - *sslBytes -= RAN_LEN; - - /* store session in case trying to resume */ - bLen = *input++; - *sslBytes -= ENUM_LEN; - if (bLen) { - if (ID_LEN > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - Trace(CLIENT_RESUME_TRY_STR); - XMEMCPY(session->sslClient->arrays->sessionID, input, ID_LEN); - session->sslClient->options.haveSessionId = 1; - } -#ifdef SHOW_SECRETS - { - int i; - printf("client random: "); - for (i = 0; i < RAN_LEN; i++) - printf("%02x", session->sslServer->arrays->clientRandom[i]); - printf("\n"); - } -#endif - - input += bLen; - *sslBytes -= bLen; - - /* skip cipher suites */ - /* make sure can read len */ - if (SUITE_LEN > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - len = (word16)((input[0] << 8) | input[1]); - input += SUITE_LEN; - *sslBytes -= SUITE_LEN; - /* make sure can read suites + comp len */ - if (len + ENUM_LEN > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - input += len; - *sslBytes -= len; - - /* skip compression */ - bLen = *input++; - *sslBytes -= ENUM_LEN; - /* make sure can read len */ - if (bLen > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - input += bLen; - *sslBytes -= bLen; - - if (*sslBytes == 0) { - /* no extensions */ - return 0; - } - - /* skip extensions until session ticket */ - /* make sure can read len */ - if (SUITE_LEN > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - len = (word16)((input[0] << 8) | input[1]); - input += SUITE_LEN; - *sslBytes -= SUITE_LEN; - /* make sure can read through all extensions */ - if (len > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - while (len > EXT_TYPE_SZ + LENGTH_SZ) { - byte extType[EXT_TYPE_SZ]; - word16 extLen; - - extType[0] = input[0]; - extType[1] = input[1]; - input += EXT_TYPE_SZ; - *sslBytes -= EXT_TYPE_SZ; - - extLen = (word16)((input[0] << 8) | input[1]); - input += LENGTH_SZ; - *sslBytes -= LENGTH_SZ; - - /* make sure can read through individual extension */ - if (extLen > *sslBytes) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - if (extType[0] == 0x00 && extType[1] == TICKET_EXT_ID) { - - /* make sure can read through ticket if there is a non blank one */ - if (extLen && extLen < ID_LEN) { - SetError(CLIENT_HELLO_INPUT_STR, error, session, - FATAL_ERROR_STATE); - return -1; - } - - if (extLen) { - if (session->ticketID == 0) { - session->ticketID = (byte*)malloc(ID_LEN); - if (session->ticketID == 0) { - SetError(MEMORY_STR, error, session, - FATAL_ERROR_STATE); - return -1; - } - } - XMEMCPY(session->ticketID, input + extLen - ID_LEN, ID_LEN); - } - } - - input += extLen; - *sslBytes -= extLen; - len -= extLen + EXT_TYPE_SZ + LENGTH_SZ; - } - - return 0; -} - - -/* Process Finished */ -static int ProcessFinished(const byte* input, int size, int* sslBytes, - SnifferSession* session, char* error) -{ - SSL* ssl; - word32 inOutIdx = 0; - int ret; - - if (session->flags.side == CYASSL_SERVER_END) - ssl = session->sslServer; - else - ssl = session->sslClient; - - ret = DoFinished(ssl, input, &inOutIdx, (word32) size, (word32) *sslBytes, - SNIFF); - *sslBytes -= (int)inOutIdx; - - if (ret < 0) { - SetError(BAD_FINISHED_MSG, error, session, FATAL_ERROR_STATE); - return ret; - } - - if (ret == 0 && session->flags.cached == 0) { - if (session->sslServer->options.haveSessionId) { - CYASSL_SESSION* sess = GetSession(session->sslServer, NULL); - if (sess == NULL) - AddSession(session->sslServer); /* don't re add */ - session->flags.cached = 1; - } - } - - FreeHandshakeResources(ssl); - - return ret; -} - - -/* Process HandShake input */ -static int DoHandShake(const byte* input, int* sslBytes, - SnifferSession* session, char* error) -{ - byte type; - int size; - int ret = 0; - - if (*sslBytes < HANDSHAKE_HEADER_SZ) { - SetError(HANDSHAKE_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - type = input[0]; - size = (input[1] << 16) | (input[2] << 8) | input[3]; - - input += HANDSHAKE_HEADER_SZ; - *sslBytes -= HANDSHAKE_HEADER_SZ; - - if (*sslBytes < size) { - SetError(HANDSHAKE_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - switch (type) { - case hello_verify_request: - Trace(GOT_HELLO_VERIFY_STR); - break; - case hello_request: - Trace(GOT_HELLO_REQUEST_STR); - break; - case session_ticket: - Trace(GOT_SESSION_TICKET_STR); - ret = ProcessSessionTicket(input, sslBytes, session, error); - break; - case server_hello: - Trace(GOT_SERVER_HELLO_STR); - ret = ProcessServerHello(input, sslBytes, session, error); - break; - case certificate_request: - Trace(GOT_CERT_REQ_STR); - break; - case server_key_exchange: - Trace(GOT_SERVER_KEY_EX_STR); - /* can't know temp key passively */ - SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE); - ret = -1; - break; - case certificate: - Trace(GOT_CERT_STR); - break; - case server_hello_done: - Trace(GOT_SERVER_HELLO_DONE_STR); - break; - case finished: - Trace(GOT_FINISHED_STR); - ret = ProcessFinished(input, size, sslBytes, session, error); - break; - case client_hello: - Trace(GOT_CLIENT_HELLO_STR); - ret = ProcessClientHello(input, sslBytes, session, error); - break; - case client_key_exchange: - Trace(GOT_CLIENT_KEY_EX_STR); - ret = ProcessClientKeyExchange(input, sslBytes, session, error); - break; - case certificate_verify: - Trace(GOT_CERT_VER_STR); - break; - default: - SetError(GOT_UNKNOWN_HANDSHAKE_STR, error, session, 0); - return -1; - } - - return ret; -} - - -/* Decrypt input into plain output, 0 on success */ -static int Decrypt(SSL* ssl, byte* output, const byte* input, word32 sz) -{ - int ret = 0; - - switch (ssl->specs.bulk_cipher_algorithm) { - #ifdef BUILD_ARC4 - case cyassl_rc4: - Arc4Process(ssl->decrypt.arc4, output, input, sz); - break; - #endif - - #ifdef BUILD_DES3 - case cyassl_triple_des: - ret = Des3_CbcDecrypt(ssl->decrypt.des3, output, input, sz); - break; - #endif - - #ifdef BUILD_AES - case cyassl_aes: - ret = AesCbcDecrypt(ssl->decrypt.aes, output, input, sz); - break; - #endif - - #ifdef HAVE_HC128 - case cyassl_hc128: - Hc128_Process(ssl->decrypt.hc128, output, input, sz); - break; - #endif - - #ifdef BUILD_RABBIT - case cyassl_rabbit: - RabbitProcess(ssl->decrypt.rabbit, output, input, sz); - break; - #endif - - #ifdef HAVE_CAMELLIA - case cyassl_camellia: - CamelliaCbcDecrypt(ssl->decrypt.cam, output, input, sz); - break; - #endif - - default: - Trace(BAD_DECRYPT_TYPE); - ret = -1; - break; - } - - return ret; -} - - -/* Decrypt input message into output, adjust output steam if needed */ -static const byte* DecryptMessage(SSL* ssl, const byte* input, word32 sz, - byte* output, int* error) -{ - int ivExtra = 0; - - int ret = Decrypt(ssl, output, input, sz); - if (ret != 0) { - *error = ret; - return NULL; - } - ssl->keys.encryptSz = sz; - if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) { - output += ssl->specs.block_size; /* go past TLSv1.1 IV */ - ivExtra = ssl->specs.block_size; - } - - ssl->keys.padSz = ssl->specs.hash_size; - - if (ssl->specs.cipher_type == block) - ssl->keys.padSz += *(output + sz - ivExtra - 1) + 1; - - return output; -} - - -/* remove session from table, use rowHint if no info (means we have a lock) */ -static void RemoveSession(SnifferSession* session, IpInfo* ipInfo, - TcpInfo* tcpInfo, word32 rowHint) -{ - SnifferSession* previous = 0; - SnifferSession* current; - word32 row = rowHint; - int haveLock = 0; - - if (ipInfo && tcpInfo) - row = SessionHash(ipInfo, tcpInfo); - else - haveLock = 1; - - assert(row <= HASH_SIZE); - Trace(REMOVE_SESSION_STR); - - if (!haveLock) - LockMutex(&SessionMutex); - - current = SessionTable[row]; - - while (current) { - if (current == session) { - if (previous) - previous->next = current->next; - else - SessionTable[row] = current->next; - FreeSnifferSession(session); - TraceRemovedSession(); - break; - } - previous = current; - current = current->next; - } - - if (!haveLock) - UnLockMutex(&SessionMutex); -} - - -/* Remove stale sessions from the Session Table, have a lock */ -static void RemoveStaleSessions(void) -{ - word32 i; - SnifferSession* session; - - for (i = 0; i < HASH_SIZE; i++) { - session = SessionTable[i]; - while (session) { - SnifferSession* next = session->next; - if (time(NULL) >= session->lastUsed + SNIFFER_TIMEOUT) { - TraceStaleSession(); - RemoveSession(session, NULL, NULL, i); - } - session = next; - } - } -} - - -/* Create a new Sniffer Session */ -static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo, - char* error) -{ - SnifferSession* session = 0; - int row; - - Trace(NEW_SESSION_STR); - /* create a new one */ - session = (SnifferSession*)malloc(sizeof(SnifferSession)); - if (session == NULL) { - SetError(MEMORY_STR, error, NULL, 0); - return 0; - } - InitSession(session); - session->server = ipInfo->dst; - session->client = ipInfo->src; - session->srvPort = (word16)tcpInfo->dstPort; - session->cliPort = (word16)tcpInfo->srcPort; - session->cliSeqStart = tcpInfo->sequence; - session->cliExpected = 1; /* relative */ - session->lastUsed= time(NULL); - - session->context = GetSnifferServer(ipInfo, tcpInfo); - if (session->context == NULL) { - SetError(SERVER_NOT_REG_STR, error, NULL, 0); - free(session); - return 0; - } - - session->sslServer = SSL_new(session->context->ctx); - if (session->sslServer == NULL) { - SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE); - free(session); - return 0; - } - session->sslClient = SSL_new(session->context->ctx); - if (session->sslClient == NULL) { - SSL_free(session->sslServer); - session->sslServer = 0; - - SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE); - free(session); - return 0; - } - /* put server back into server mode */ - session->sslServer->options.side = CYASSL_SERVER_END; - - row = SessionHash(ipInfo, tcpInfo); - - /* add it to the session table */ - LockMutex(&SessionMutex); - - session->next = SessionTable[row]; - SessionTable[row] = session; - - SessionCount++; - - if ( (SessionCount % HASH_SIZE) == 0) { - TraceFindingStale(); - RemoveStaleSessions(); - } - - UnLockMutex(&SessionMutex); - - /* determine headed side */ - if (ipInfo->dst == session->context->server && - tcpInfo->dstPort == session->context->port) - session->flags.side = CYASSL_SERVER_END; - else - session->flags.side = CYASSL_CLIENT_END; - - return session; -} - - -/* Process Old Client Hello Input */ -static int DoOldHello(SnifferSession* session, const byte* sslFrame, - int* rhSize, int* sslBytes, char* error) -{ - const byte* input = sslFrame; - byte b0, b1; - word32 idx = 0; - int ret; - - Trace(GOT_OLD_CLIENT_HELLO_STR); - session->flags.clientHello = 1; /* don't process again */ - b0 = *input++; - b1 = *input++; - *sslBytes -= 2; - *rhSize = ((b0 & 0x7f) << 8) | b1; - - if (*rhSize > *sslBytes) { - SetError(OLD_CLIENT_INPUT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - ret = ProcessOldClientHello(session->sslServer, input, &idx, *sslBytes, - (word16)*rhSize); - if (ret < 0 && ret != MATCH_SUITE_ERROR) { - SetError(BAD_OLD_CLIENT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - Trace(OLD_CLIENT_OK_STR); - XMEMCPY(session->sslClient->arrays->clientRandom, - session->sslServer->arrays->clientRandom, RAN_LEN); - - *sslBytes -= *rhSize; - return 0; -} - - -#if 0 -/* Calculate the TCP checksum, see RFC 1071 */ -/* return 0 for success, -1 on error */ -/* can be called from decode() with - TcpChecksum(&ipInfo, &tcpInfo, sslBytes, packet + ipInfo.length); - could also add a 64bit version if type available and using this -*/ -int TcpChecksum(IpInfo* ipInfo, TcpInfo* tcpInfo, int dataLen, - const byte* packet) -{ - TcpPseudoHdr pseudo; - int count = PSEUDO_HDR_SZ; - const word16* data = (word16*)&pseudo; - word32 sum = 0; - word16 checksum; - - pseudo.src = ipInfo->src; - pseudo.dst = ipInfo->dst; - pseudo.rsv = 0; - pseudo.protocol = TCP_PROTO; - pseudo.legnth = htons(tcpInfo->length + dataLen); - - /* pseudo header sum */ - while (count >= 2) { - sum += *data++; - count -= 2; - } - - count = tcpInfo->length + dataLen; - data = (word16*)packet; - - /* main sum */ - while (count > 1) { - sum += *data++; - count -=2; - } - - /* get left-over, if any */ - packet = (byte*)data; - if (count > 0) { - sum += *packet; - } - - /* fold 32bit sum into 16 bits */ - while (sum >> 16) - sum = (sum & 0xffff) + (sum >> 16); - - checksum = (word16)~sum; - /* checksum should now equal 0, since included already calcd checksum */ - /* field, but tcp checksum offloading could negate calculation */ - if (checksum == 0) - return 0; - return -1; -} -#endif - - -/* Check IP and TCP headers, set payload */ -/* returns 0 on success, -1 on error */ -static int CheckHeaders(IpInfo* ipInfo, TcpInfo* tcpInfo, const byte* packet, - int length, const byte** sslFrame, int* sslBytes, char* error) -{ - TraceHeader(); - TracePacket(); - - /* ip header */ - if (length < IP_HDR_SZ) { - SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); - return -1; - } - if (CheckIpHdr((IpHdr*)packet, ipInfo, length, error) != 0) - return -1; - - /* tcp header */ - if (length < (ipInfo->length + TCP_HDR_SZ)) { - SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); - return -1; - } - if (CheckTcpHdr((TcpHdr*)(packet + ipInfo->length), tcpInfo, error) != 0) - return -1; - - /* setup */ - *sslFrame = packet + ipInfo->length + tcpInfo->length; - if (*sslFrame > packet + length) { - SetError(PACKET_HDR_SHORT_STR, error, NULL, 0); - return -1; - } - *sslBytes = (int)(packet + length - *sslFrame); - - return 0; -} - - -/* Create or Find existing session */ -/* returns 0 on success (continue), -1 on error, 1 on success (end) */ -static int CheckSession(IpInfo* ipInfo, TcpInfo* tcpInfo, int sslBytes, - SnifferSession** session, char* error) -{ - /* create a new SnifferSession on client SYN */ - if (tcpInfo->syn && !tcpInfo->ack) { - TraceClientSyn(tcpInfo->sequence); - *session = CreateSession(ipInfo, tcpInfo, error); - if (*session == NULL) { - *session = GetSnifferSession(ipInfo, tcpInfo); - /* already had exisiting, so OK */ - if (*session) - return 1; - - SetError(MEMORY_STR, error, NULL, 0); - return -1; - } - return 1; - } - /* get existing sniffer session */ - else { - *session = GetSnifferSession(ipInfo, tcpInfo); - if (*session == NULL) { - /* don't worry about extraneous RST or duplicate FINs */ - if (tcpInfo->fin || tcpInfo->rst) - return 1; - /* don't worry about duplicate ACKs either */ - if (sslBytes == 0 && tcpInfo->ack) - return 1; - - SetError(BAD_SESSION_STR, error, NULL, 0); - return -1; - } - } - return 0; -} - - -/* Create a Packet Buffer from *begin - end, adjust new *begin and bytesLeft */ -static PacketBuffer* CreateBuffer(word32* begin, word32 end, const byte* data, - int* bytesLeft) -{ - PacketBuffer* pb; - - int added = end - *begin + 1; - assert(*begin <= end); - - pb = (PacketBuffer*)malloc(sizeof(PacketBuffer)); - if (pb == NULL) return NULL; - - pb->next = 0; - pb->begin = *begin; - pb->end = end; - pb->data = (byte*)malloc(added); - - if (pb->data == NULL) { - free(pb); - return NULL; - } - XMEMCPY(pb->data, data, added); - - *bytesLeft -= added; - *begin = pb->end + 1; - - return pb; -} - - -/* Add sslFrame to Reassembly List */ -/* returns 1 (end) on success, -1, on error */ -static int AddToReassembly(byte from, word32 seq, const byte* sslFrame, - int sslBytes, SnifferSession* session, char* error) -{ - PacketBuffer* add; - PacketBuffer** front = (from == CYASSL_SERVER_END) ? - &session->cliReassemblyList: &session->srvReassemblyList; - PacketBuffer* curr = *front; - PacketBuffer* prev = curr; - - word32 startSeq = seq; - word32 added; - int bytesLeft = sslBytes; /* could be overlapping fragment */ - - /* if list is empty add full frame to front */ - if (!curr) { - add = CreateBuffer(&seq, seq + sslBytes - 1, sslFrame, &bytesLeft); - if (add == NULL) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - *front = add; - return 1; - } - - /* add to front if before current front, up to next->begin */ - if (seq < curr->begin) { - word32 end = seq + sslBytes - 1; - - if (end >= curr->begin) - end = curr->begin - 1; - - add = CreateBuffer(&seq, end, sslFrame, &bytesLeft); - if (add == NULL) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - add->next = curr; - *front = add; - } - - /* while we have bytes left, try to find a gap to fill */ - while (bytesLeft > 0) { - /* get previous packet in list */ - while (curr && (seq >= curr->begin)) { - prev = curr; - curr = curr->next; - } - - /* don't add duplicate data */ - if (prev->end >= seq) { - if ( (seq + bytesLeft - 1) <= prev->end) - return 1; - seq = prev->end + 1; - bytesLeft = startSeq + sslBytes - seq; - } - - if (!curr) - /* we're at the end */ - added = bytesLeft; - else - /* we're in between two frames */ - added = min((word32)bytesLeft, curr->begin - seq); - - /* data already there */ - if (added == 0) - continue; - - add = CreateBuffer(&seq, seq + added - 1, &sslFrame[seq - startSeq], - &bytesLeft); - if (add == NULL) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - add->next = prev->next; - prev->next = add; - } - return 1; -} - - -/* Add out of order FIN capture */ -/* returns 1 for success (end) */ -static int AddFinCapture(SnifferSession* session, word32 sequence) -{ - if (session->flags.side == CYASSL_SERVER_END) { - if (session->finCaputre.cliCounted == 0) - session->finCaputre.cliFinSeq = sequence; - } - else { - if (session->finCaputre.srvCounted == 0) - session->finCaputre.srvFinSeq = sequence; - } - return 1; -} - - -/* Adjust incoming sequence based on side */ -/* returns 0 on success (continue), -1 on error, 1 on success (end) */ -static int AdjustSequence(TcpInfo* tcpInfo, SnifferSession* session, - int* sslBytes, const byte** sslFrame, char* error) -{ - word32 seqStart = (session->flags.side == CYASSL_SERVER_END) ? - session->cliSeqStart :session->srvSeqStart; - word32 real = tcpInfo->sequence - seqStart; - word32* expected = (session->flags.side == CYASSL_SERVER_END) ? - &session->cliExpected : &session->srvExpected; - PacketBuffer* reassemblyList = (session->flags.side == CYASSL_SERVER_END) ? - session->cliReassemblyList : session->srvReassemblyList; - - /* handle rollover of sequence */ - if (tcpInfo->sequence < seqStart) - real = 0xffffffffU - seqStart + tcpInfo->sequence; - - TraceRelativeSequence(*expected, real); - - if (real < *expected) { - Trace(DUPLICATE_STR); - if (real + *sslBytes > *expected) { - int overlap = *expected - real; - Trace(OVERLAP_DUPLICATE_STR); - - /* adjust to expected, remove duplicate */ - *sslFrame += overlap; - *sslBytes -= overlap; - - if (reassemblyList) { - word32 newEnd = *expected + *sslBytes; - - if (newEnd > reassemblyList->begin) { - Trace(OVERLAP_REASSEMBLY_BEGIN_STR); - - /* remove bytes already on reassembly list */ - *sslBytes -= newEnd - reassemblyList->begin; - } - if (newEnd > reassemblyList->end) { - Trace(OVERLAP_REASSEMBLY_END_STR); - - /* may be past reassembly list end (could have more on list) - so try to add what's past the front->end */ - AddToReassembly(session->flags.side, reassemblyList->end +1, - *sslFrame + reassemblyList->end - *expected + 1, - newEnd - reassemblyList->end, session, error); - } - } - } - else - return 1; - } - else if (real > *expected) { - Trace(OUT_OF_ORDER_STR); - if (*sslBytes > 0) - return AddToReassembly(session->flags.side, real, *sslFrame, - *sslBytes, session, error); - else if (tcpInfo->fin) - return AddFinCapture(session, real); - } - /* got expected sequence */ - *expected += *sslBytes; - if (tcpInfo->fin) - *expected += 1; - - return 0; -} - - -/* Check latest ack number for missing packets - return 0 ok, <0 on error */ -static int CheckAck(TcpInfo* tcpInfo, SnifferSession* session) -{ - if (tcpInfo->ack) { - word32 seqStart = (session->flags.side == CYASSL_SERVER_END) ? - session->srvSeqStart :session->cliSeqStart; - word32 real = tcpInfo->ackNumber - seqStart; - word32 expected = (session->flags.side == CYASSL_SERVER_END) ? - session->srvExpected : session->cliExpected; - - /* handle rollover of sequence */ - if (tcpInfo->ackNumber < seqStart) - real = 0xffffffffU - seqStart + tcpInfo->ackNumber; - - TraceAck(real, expected); - - if (real > expected) - return -1; /* we missed a packet, ACKing data we never saw */ - } - return 0; -} - - -/* Check TCP Sequence status */ -/* returns 0 on success (continue), -1 on error, 1 on success (end) */ -static int CheckSequence(IpInfo* ipInfo, TcpInfo* tcpInfo, - SnifferSession* session, int* sslBytes, - const byte** sslFrame, char* error) -{ - int actualLen; - - /* init SEQ from server to client */ - if (tcpInfo->syn && tcpInfo->ack) { - session->srvSeqStart = tcpInfo->sequence; - session->srvExpected = 1; - TraceServerSyn(tcpInfo->sequence); - return 1; - } - - /* adjust potential ethernet trailer */ - actualLen = ipInfo->total - ipInfo->length - tcpInfo->length; - if (*sslBytes > actualLen) { - *sslBytes = actualLen; - } - - TraceSequence(tcpInfo->sequence, *sslBytes); - if (CheckAck(tcpInfo, session) < 0) { - SetError(ACK_MISSED_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - return AdjustSequence(tcpInfo, session, sslBytes, sslFrame, error); -} - - -/* Check Status before record processing */ -/* returns 0 on success (continue), -1 on error, 1 on success (end) */ -static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo, - const byte** sslFrame, SnifferSession** session, - int* sslBytes, const byte** end, char* error) -{ - word32 length; - SSL* ssl = ((*session)->flags.side == CYASSL_SERVER_END) ? - (*session)->sslServer : (*session)->sslClient; - /* remove SnifferSession on 2nd FIN or RST */ - if (tcpInfo->fin || tcpInfo->rst) { - /* flag FIN and RST */ - if (tcpInfo->fin) - (*session)->flags.finCount += 1; - else if (tcpInfo->rst) - (*session)->flags.finCount += 2; - - if ((*session)->flags.finCount >= 2) { - RemoveSession(*session, ipInfo, tcpInfo, 0); - *session = NULL; - return 1; - } - } - - if ((*session)->flags.fatalError == FATAL_ERROR_STATE) { - SetError(FATAL_ERROR_STR, error, NULL, 0); - return -1; - } - - if (*sslBytes == 0) { - Trace(NO_DATA_STR); - return 1; - } - - /* if current partial data, add to end of partial */ - if ( (length = ssl->buffers.inputBuffer.length) ) { - Trace(PARTIAL_ADD_STR); - - if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) { - if (GrowInputBuffer(ssl, *sslBytes, length) < 0) { - SetError(MEMORY_STR, error, *session, FATAL_ERROR_STATE); - return -1; - } - } - XMEMCPY(&ssl->buffers.inputBuffer.buffer[length], *sslFrame, *sslBytes); - *sslBytes += length; - ssl->buffers.inputBuffer.length = *sslBytes; - *sslFrame = ssl->buffers.inputBuffer.buffer; - *end = *sslFrame + *sslBytes; - } - - if ((*session)->flags.clientHello == 0 && **sslFrame != handshake) { - int rhSize; - int ret = DoOldHello(*session, *sslFrame, &rhSize, sslBytes, error); - if (ret < 0) - return -1; /* error already set */ - if (*sslBytes <= 0) - return 1; - } - - return 0; -} - - -/* See if input on the reassembly list is ready for consuming */ -/* returns 1 for TRUE, 0 for FALSE */ -static int HaveMoreInput(SnifferSession* session, const byte** sslFrame, - int* sslBytes, const byte** end, char* error) -{ - /* sequence and reassembly based on from, not to */ - int moreInput = 0; - PacketBuffer** front = (session->flags.side == CYASSL_SERVER_END) ? - &session->cliReassemblyList : &session->srvReassemblyList; - word32* expected = (session->flags.side == CYASSL_SERVER_END) ? - &session->cliExpected : &session->srvExpected; - /* buffer is on receiving end */ - word32* length = (session->flags.side == CYASSL_SERVER_END) ? - &session->sslServer->buffers.inputBuffer.length : - &session->sslClient->buffers.inputBuffer.length; - byte* myBuffer = (session->flags.side == CYASSL_SERVER_END) ? - session->sslServer->buffers.inputBuffer.buffer : - session->sslClient->buffers.inputBuffer.buffer; - word32 bufferSize = (session->flags.side == CYASSL_SERVER_END) ? - session->sslServer->buffers.inputBuffer.bufferSize : - session->sslClient->buffers.inputBuffer.bufferSize; - SSL* ssl = (session->flags.side == CYASSL_SERVER_END) ? - session->sslServer : session->sslClient; - - while (*front && ((*front)->begin == *expected) ) { - word32 room = bufferSize - *length; - word32 packetLen = (*front)->end - (*front)->begin + 1; - - if (packetLen > room && bufferSize < MAX_INPUT_SZ) { - if (GrowInputBuffer(ssl, packetLen, *length) < 0) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return 0; - } - } - - if (packetLen <= room) { - PacketBuffer* del = *front; - - XMEMCPY(&myBuffer[*length], (*front)->data, packetLen); - *length += packetLen; - *expected += packetLen; - - /* remove used packet */ - *front = (*front)->next; - FreePacketBuffer(del); - - moreInput = 1; - } - else - break; - } - if (moreInput) { - *sslFrame = myBuffer; - *sslBytes = *length; - *end = myBuffer + *length; - } - return moreInput; -} - - - -/* Process Message(s) from sslFrame */ -/* return Number of bytes on success, 0 for no data yet, and -1 on error */ -static int ProcessMessage(const byte* sslFrame, SnifferSession* session, - int sslBytes, byte* data, const byte* end,char* error) -{ - const byte* sslBegin = sslFrame; - const byte* tmp; - RecordLayerHeader rh; - int rhSize = 0; - int ret; - int errCode = 0; - int decoded = 0; /* bytes stored for user in data */ - int notEnough; /* notEnough bytes yet flag */ - SSL* ssl = (session->flags.side == CYASSL_SERVER_END) ? - session->sslServer : session->sslClient; -doMessage: - notEnough = 0; - if (sslBytes < 0) { - SetError(PACKET_HDR_SHORT_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - if (sslBytes >= RECORD_HEADER_SZ) { - if (GetRecordHeader(sslFrame, &rh, &rhSize) != 0) { - SetError(BAD_RECORD_HDR_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - } - else - notEnough = 1; - - if (notEnough || rhSize > (sslBytes - RECORD_HEADER_SZ)) { - /* don't have enough input yet to process full SSL record */ - Trace(PARTIAL_INPUT_STR); - - /* store partial if not there already or we advanced */ - if (ssl->buffers.inputBuffer.length == 0 || sslBegin != sslFrame) { - if (sslBytes > (int)ssl->buffers.inputBuffer.bufferSize) { - if (GrowInputBuffer(ssl, sslBytes, 0) < 0) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - } - XMEMCPY(ssl->buffers.inputBuffer.buffer, sslFrame, sslBytes); - ssl->buffers.inputBuffer.length = sslBytes; - } - if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error)) - goto doMessage; - return decoded; - } - sslFrame += RECORD_HEADER_SZ; - sslBytes -= RECORD_HEADER_SZ; - tmp = sslFrame + rhSize; /* may have more than one record to process */ - - /* decrypt if needed */ - if ((session->flags.side == CYASSL_SERVER_END && - session->flags.serverCipherOn) - || (session->flags.side == CYASSL_CLIENT_END && - session->flags.clientCipherOn)) { - if (CheckAvailableSize(ssl, rhSize) < 0) { - SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - sslFrame = DecryptMessage(ssl, sslFrame, rhSize, - ssl->buffers.outputBuffer.buffer, &errCode); - if (errCode != 0) { - SetError(BAD_DECRYPT, error, session, FATAL_ERROR_STATE); - return -1; - } - } - - switch ((enum ContentType)rh.type) { - case handshake: - Trace(GOT_HANDSHAKE_STR); - ret = DoHandShake(sslFrame, &sslBytes, session, error); - if (ret != 0) { - if (session->flags.fatalError == 0) - SetError(BAD_HANDSHAKE_STR,error,session,FATAL_ERROR_STATE); - return -1; - } - break; - case change_cipher_spec: - if (session->flags.side == CYASSL_SERVER_END) - session->flags.serverCipherOn = 1; - else - session->flags.clientCipherOn = 1; - Trace(GOT_CHANGE_CIPHER_STR); - ssl->options.handShakeState = HANDSHAKE_DONE; - break; - case application_data: - Trace(GOT_APP_DATA_STR); - { - word32 inOutIdx = 0; - - ret = DoApplicationData(ssl, (byte*)sslFrame, &inOutIdx); - if (ret == 0) { - ret = ssl->buffers.clearOutputBuffer.length; - TraceGotData(ret); - if (ret) { /* may be blank message */ - XMEMCPY(&data[decoded], - ssl->buffers.clearOutputBuffer.buffer, ret); - TraceAddedData(ret, decoded); - decoded += ret; - ssl->buffers.clearOutputBuffer.length = 0; - } - } - else { - SetError(BAD_APP_DATA_STR, error,session,FATAL_ERROR_STATE); - return -1; - } - if (ssl->buffers.outputBuffer.dynamicFlag) - ShrinkOutputBuffer(ssl); - } - break; - case alert: - Trace(GOT_ALERT_STR); - break; - case no_type: - default: - SetError(GOT_UNKNOWN_RECORD_STR, error, session, FATAL_ERROR_STATE); - return -1; - } - - if (tmp < end) { - Trace(ANOTHER_MSG_STR); - sslFrame = tmp; - sslBytes = (int)(end - tmp); - goto doMessage; - } - - /* clear used input */ - ssl->buffers.inputBuffer.length = 0; - - /* could have more input ready now */ - if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error)) - goto doMessage; - - if (ssl->buffers.inputBuffer.dynamicFlag) - ShrinkInputBuffer(ssl, NO_FORCED_FREE); - - return decoded; -} - - -/* See if we need to process any pending FIN captures */ -static void CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo, - SnifferSession* session) -{ - if (session->finCaputre.cliFinSeq && session->finCaputre.cliFinSeq <= - session->cliExpected) { - if (session->finCaputre.cliCounted == 0) { - session->flags.finCount += 1; - session->finCaputre.cliCounted = 1; - TraceClientFin(session->finCaputre.cliFinSeq, session->cliExpected); - } - } - - if (session->finCaputre.srvFinSeq && session->finCaputre.srvFinSeq <= - session->srvExpected) { - if (session->finCaputre.srvCounted == 0) { - session->flags.finCount += 1; - session->finCaputre.srvCounted = 1; - TraceServerFin(session->finCaputre.srvFinSeq, session->srvExpected); - } - } - - if (session->flags.finCount >= 2) - RemoveSession(session, ipInfo, tcpInfo, 0); -} - - -/* If session is in fatal error state free resources now - return true if removed, 0 otherwise */ -static int RemoveFatalSession(IpInfo* ipInfo, TcpInfo* tcpInfo, - SnifferSession* session, char* error) -{ - if (session && session->flags.fatalError == FATAL_ERROR_STATE) { - RemoveSession(session, ipInfo, tcpInfo, 0); - SetError(FATAL_ERROR_STR, error, NULL, 0); - return 1; - } - return 0; -} - - -/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */ -/* returns Number of bytes on success, 0 for no data yet, and -1 on error */ -int ssl_DecodePacket(const byte* packet, int length, byte* data, char* error) -{ - TcpInfo tcpInfo; - IpInfo ipInfo; - const byte* sslFrame; - const byte* end = packet + length; - int sslBytes; /* ssl bytes unconsumed */ - int ret; - SnifferSession* session = 0; - - if (CheckHeaders(&ipInfo, &tcpInfo, packet, length, &sslFrame, &sslBytes, - error) != 0) - return -1; - - ret = CheckSession(&ipInfo, &tcpInfo, sslBytes, &session, error); - if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; - else if (ret == -1) return -1; - else if (ret == 1) return 0; /* done for now */ - - ret = CheckSequence(&ipInfo, &tcpInfo, session, &sslBytes, &sslFrame,error); - if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; - else if (ret == -1) return -1; - else if (ret == 1) return 0; /* done for now */ - - ret = CheckPreRecord(&ipInfo, &tcpInfo, &sslFrame, &session, &sslBytes, - &end, error); - if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; - else if (ret == -1) return -1; - else if (ret == 1) return 0; /* done for now */ - - ret = ProcessMessage(sslFrame, session, sslBytes, data, end, error); - if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1; - CheckFinCapture(&ipInfo, &tcpInfo, session); - return ret; -} - - -/* Enables (if traceFile)/ Disables debug tracing */ -/* returns 0 on success, -1 on error */ -int ssl_Trace(const char* traceFile, char* error) -{ - if (traceFile) { - TraceFile = fopen(traceFile, "a"); - if (!TraceFile) { - SetError(BAD_TRACE_FILE_STR, error, NULL, 0); - return -1; - } - TraceOn = 1; - } - else - TraceOn = 0; - - return 0; -} - - - - -#endif /* CYASSL_SNIFFER */ diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo deleted file mode 100644 index dfa9c9d3..00000000 --- a/project1/cyassl-3.0.0/src/src_libcyassl_la-internal.lo +++ /dev/null @@ -1,12 +0,0 @@ -# src/src_libcyassl_la-internal.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-internal.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo deleted file mode 100644 index b8febacf..00000000 --- a/project1/cyassl-3.0.0/src/src_libcyassl_la-io.lo +++ /dev/null @@ -1,12 +0,0 @@ -# src/src_libcyassl_la-io.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-io.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo deleted file mode 100644 index 79ec5153..00000000 --- a/project1/cyassl-3.0.0/src/src_libcyassl_la-keys.lo +++ /dev/null @@ -1,12 +0,0 @@ -# src/src_libcyassl_la-keys.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-keys.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo deleted file mode 100644 index 9da2ff0a..00000000 --- a/project1/cyassl-3.0.0/src/src_libcyassl_la-ssl.lo +++ /dev/null @@ -1,12 +0,0 @@ -# src/src_libcyassl_la-ssl.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-ssl.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo b/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo deleted file mode 100644 index b73cdf38..00000000 --- a/project1/cyassl-3.0.0/src/src_libcyassl_la-tls.lo +++ /dev/null @@ -1,12 +0,0 @@ -# src/src_libcyassl_la-tls.lo - a libtool object file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/src_libcyassl_la-tls.o' - -# Name of the non-PIC object -non_pic_object=none - diff --git a/project1/cyassl-3.0.0/src/ssl.c b/project1/cyassl-3.0.0/src/ssl.c deleted file mode 100644 index 39726a92..00000000 --- a/project1/cyassl-3.0.0/src/ssl.c +++ /dev/null @@ -1,11553 +0,0 @@ -/* ssl.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef HAVE_ERRNO_H - #include -#endif - - -#include -#include -#include -#include - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - #include -#endif - -#ifdef OPENSSL_EXTRA - /* openssl headers begin */ - #include - #include - #include - #include - #include - #include - #include - /* openssl headers end, cyassl internal headers next */ - #include - #include - #include - #include - #include - #include - #ifdef CYASSL_SHA512 - #include - #endif -#endif - -#ifndef NO_FILESYSTEM - #if !defined(USE_WINDOWS_API) && !defined(NO_CYASSL_DIR) \ - && !defined(EBSNET) - #include - #include - #endif - #ifdef EBSNET - #include "vfapi.h" - #include "vfile.h" - #endif -#endif /* NO_FILESYSTEM */ - -#ifndef TRUE - #define TRUE 1 -#endif -#ifndef FALSE - #define FALSE 0 -#endif - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - -#ifndef max -#ifdef CYASSL_DTLS - static INLINE word32 max(word32 a, word32 b) - { - return a > b ? a : b; - } -#endif -#endif /* min */ - - -#ifndef CYASSL_LEANPSK -char* mystrnstr(const char* s1, const char* s2, unsigned int n) -{ - unsigned int s2_len = (unsigned int)XSTRLEN(s2); - - if (s2_len == 0) - return (char*)s1; - - while (n >= s2_len && s1[0]) { - if (s1[0] == s2[0]) - if (XMEMCMP(s1, s2, s2_len) == 0) - return (char*)s1; - s1++; - n--; - } - - return NULL; -} -#endif - - -/* prevent multiple mutex initializations */ -static volatile int initRefCount = 0; -static CyaSSL_Mutex count_mutex; /* init ref count mutex */ - - -CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD* method) -{ - CYASSL_CTX* ctx = NULL; - - CYASSL_ENTER("CYASSL_CTX_new"); - - if (initRefCount == 0) - CyaSSL_Init(); /* user no longer forced to call Init themselves */ - - if (method == NULL) - return ctx; - - ctx = (CYASSL_CTX*) XMALLOC(sizeof(CYASSL_CTX), 0, DYNAMIC_TYPE_CTX); - if (ctx) { - if (InitSSL_Ctx(ctx, method) < 0) { - CYASSL_MSG("Init CTX failed"); - CyaSSL_CTX_free(ctx); - ctx = NULL; - } - } - else { - CYASSL_MSG("Alloc CTX failed, method freed"); - XFREE(method, NULL, DYNAMIC_TYPE_METHOD); - } - - CYASSL_LEAVE("CYASSL_CTX_new", 0); - return ctx; -} - - -void CyaSSL_CTX_free(CYASSL_CTX* ctx) -{ - CYASSL_ENTER("SSL_CTX_free"); - if (ctx) - FreeSSL_Ctx(ctx); - CYASSL_LEAVE("SSL_CTX_free", 0); -} - - -CYASSL* CyaSSL_new(CYASSL_CTX* ctx) -{ - CYASSL* ssl = NULL; - int ret = 0; - - (void)ret; - CYASSL_ENTER("SSL_new"); - - if (ctx == NULL) - return ssl; - - ssl = (CYASSL*) XMALLOC(sizeof(CYASSL), ctx->heap,DYNAMIC_TYPE_SSL); - if (ssl) - if ( (ret = InitSSL(ssl, ctx)) < 0) { - FreeSSL(ssl); - ssl = 0; - } - - CYASSL_LEAVE("SSL_new", ret); - return ssl; -} - - -void CyaSSL_free(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_free"); - if (ssl) - FreeSSL(ssl); - CYASSL_LEAVE("SSL_free", 0); -} - - -int CyaSSL_set_fd(CYASSL* ssl, int fd) -{ - CYASSL_ENTER("SSL_set_fd"); - ssl->rfd = fd; /* not used directly to allow IO callbacks */ - ssl->wfd = fd; - - ssl->IOCB_ReadCtx = &ssl->rfd; - ssl->IOCB_WriteCtx = &ssl->wfd; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - ssl->IOCB_ReadCtx = &ssl->buffers.dtlsCtx; - ssl->IOCB_WriteCtx = &ssl->buffers.dtlsCtx; - ssl->buffers.dtlsCtx.fd = fd; - } - #endif - - CYASSL_LEAVE("SSL_set_fd", SSL_SUCCESS); - return SSL_SUCCESS; -} - - -int CyaSSL_get_fd(const CYASSL* ssl) -{ - CYASSL_ENTER("SSL_get_fd"); - CYASSL_LEAVE("SSL_get_fd", ssl->rfd); - return ssl->rfd; -} - - -int CyaSSL_get_using_nonblock(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_get_using_nonblock"); - CYASSL_LEAVE("CyaSSL_get_using_nonblock", ssl->options.usingNonblock); - return ssl->options.usingNonblock; -} - - -int CyaSSL_dtls(CYASSL* ssl) -{ - return ssl->options.dtls; -} - - -#ifndef CYASSL_LEANPSK -void CyaSSL_set_using_nonblock(CYASSL* ssl, int nonblock) -{ - CYASSL_ENTER("CyaSSL_set_using_nonblock"); - ssl->options.usingNonblock = (nonblock != 0); -} - - -int CyaSSL_dtls_set_peer(CYASSL* ssl, void* peer, unsigned int peerSz) -{ -#ifdef CYASSL_DTLS - void* sa = (void*)XMALLOC(peerSz, ssl->heap, DYNAMIC_TYPE_SOCKADDR); - if (sa != NULL) { - XMEMCPY(sa, peer, peerSz); - ssl->buffers.dtlsCtx.peer.sa = sa; - ssl->buffers.dtlsCtx.peer.sz = peerSz; - return SSL_SUCCESS; - } - return SSL_FAILURE; -#else - (void)ssl; - (void)peer; - (void)peerSz; - return SSL_NOT_IMPLEMENTED; -#endif -} - -int CyaSSL_dtls_get_peer(CYASSL* ssl, void* peer, unsigned int* peerSz) -{ -#ifdef CYASSL_DTLS - if (peer != NULL && peerSz != NULL - && *peerSz >= ssl->buffers.dtlsCtx.peer.sz) { - *peerSz = ssl->buffers.dtlsCtx.peer.sz; - XMEMCPY(peer, ssl->buffers.dtlsCtx.peer.sa, *peerSz); - return SSL_SUCCESS; - } - return SSL_FAILURE; -#else - (void)ssl; - (void)peer; - (void)peerSz; - return SSL_NOT_IMPLEMENTED; -#endif -} -#endif /* CYASSL_LEANPSK */ - - -/* return underlyig connect or accept, SSL_SUCCESS on ok */ -int CyaSSL_negotiate(CYASSL* ssl) -{ - int err = SSL_FATAL_ERROR; - - CYASSL_ENTER("CyaSSL_negotiate"); -#ifndef NO_CYASSL_SERVER - if (ssl->options.side == CYASSL_SERVER_END) - err = CyaSSL_accept(ssl); -#endif - -#ifndef NO_CYASSL_CLIENT - if (ssl->options.side == CYASSL_CLIENT_END) - err = CyaSSL_connect(ssl); -#endif - - CYASSL_LEAVE("CyaSSL_negotiate", err); - - return err; -} - - -#ifndef CYASSL_LEANPSK -/* object size based on build */ -int CyaSSL_GetObjectSize(void) -{ -#ifdef SHOW_SIZES - printf("sizeof suites = %lu\n", sizeof(Suites)); - printf("sizeof ciphers(2) = %lu\n", sizeof(Ciphers)); -#ifndef NO_RC4 - printf(" sizeof arc4 = %lu\n", sizeof(Arc4)); -#endif - printf(" sizeof aes = %lu\n", sizeof(Aes)); -#ifndef NO_DES3 - printf(" sizeof des3 = %lu\n", sizeof(Des3)); -#endif -#ifndef NO_RABBIT - printf(" sizeof rabbit = %lu\n", sizeof(Rabbit)); -#endif - printf("sizeof cipher specs = %lu\n", sizeof(CipherSpecs)); - printf("sizeof keys = %lu\n", sizeof(Keys)); - printf("sizeof Hashes(2) = %lu\n", sizeof(Hashes)); -#ifndef NO_MD5 - printf(" sizeof MD5 = %lu\n", sizeof(Md5)); -#endif -#ifndef NO_SHA - printf(" sizeof SHA = %lu\n", sizeof(Sha)); -#endif -#ifndef NO_SHA256 - printf(" sizeof SHA256 = %lu\n", sizeof(Sha256)); -#endif -#ifdef CYASSL_SHA384 - printf(" sizeof SHA384 = %lu\n", sizeof(Sha384)); -#endif -#ifdef CYASSL_SHA384 - printf(" sizeof SHA512 = %lu\n", sizeof(Sha512)); -#endif - printf("sizeof Buffers = %lu\n", sizeof(Buffers)); - printf("sizeof Options = %lu\n", sizeof(Options)); - printf("sizeof Arrays = %lu\n", sizeof(Arrays)); -#ifndef NO_RSA - printf("sizeof RsaKey = %lu\n", sizeof(RsaKey)); -#endif -#ifdef HAVE_ECC - printf("sizeof ecc_key = %lu\n", sizeof(ecc_key)); -#endif - printf("sizeof CYASSL_CIPHER = %lu\n", sizeof(CYASSL_CIPHER)); - printf("sizeof CYASSL_SESSION = %lu\n", sizeof(CYASSL_SESSION)); - printf("sizeof CYASSL = %lu\n", sizeof(CYASSL)); - printf("sizeof CYASSL_CTX = %lu\n", sizeof(CYASSL_CTX)); -#endif - - return sizeof(CYASSL); -} -#endif - -/* XXX should be NO_DH */ -#ifndef NO_CERTS -/* server Diffie-Hellman parameters, SSL_SUCCESS on ok */ -int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz, - const unsigned char* g, int gSz) -{ - byte havePSK = 0; - byte haveRSA = 1; - - CYASSL_ENTER("CyaSSL_SetTmpDH"); - if (ssl == NULL || p == NULL || g == NULL) return BAD_FUNC_ARG; - - if (ssl->options.side != CYASSL_SERVER_END) - return SIDE_ERROR; - - if (ssl->buffers.serverDH_P.buffer && ssl->buffers.weOwnDH) - XFREE(ssl->buffers.serverDH_P.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); - if (ssl->buffers.serverDH_G.buffer && ssl->buffers.weOwnDH) - XFREE(ssl->buffers.serverDH_G.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); - - ssl->buffers.weOwnDH = 1; /* SSL owns now */ - ssl->buffers.serverDH_P.buffer = (byte*)XMALLOC(pSz, ssl->ctx->heap, - DYNAMIC_TYPE_DH); - if (ssl->buffers.serverDH_P.buffer == NULL) - return MEMORY_E; - - ssl->buffers.serverDH_G.buffer = (byte*)XMALLOC(gSz, ssl->ctx->heap, - DYNAMIC_TYPE_DH); - if (ssl->buffers.serverDH_G.buffer == NULL) { - XFREE(ssl->buffers.serverDH_P.buffer, ssl->ctx->heap, DYNAMIC_TYPE_DH); - return MEMORY_E; - } - - ssl->buffers.serverDH_P.length = pSz; - ssl->buffers.serverDH_G.length = gSz; - - XMEMCPY(ssl->buffers.serverDH_P.buffer, p, pSz); - XMEMCPY(ssl->buffers.serverDH_G.buffer, g, gSz); - - ssl->options.haveDH = 1; - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - #ifdef NO_RSA - haveRSA = 0; - #endif - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, ssl->options.haveDH, - ssl->options.haveNTRU, ssl->options.haveECDSAsig, - ssl->options.haveStaticECC, ssl->options.side); - - CYASSL_LEAVE("CyaSSL_SetTmpDH", 0); - return SSL_SUCCESS; -} -#endif /* !NO_CERTS */ - - -int CyaSSL_write(CYASSL* ssl, const void* data, int sz) -{ - int ret; - - CYASSL_ENTER("SSL_write()"); - - if (ssl == NULL || data == NULL || sz < 0) - return BAD_FUNC_ARG; - -#ifdef HAVE_ERRNO_H - errno = 0; -#endif - - ret = SendData(ssl, data, sz); - - CYASSL_LEAVE("SSL_write()", ret); - - if (ret < 0) - return SSL_FATAL_ERROR; - else - return ret; -} - - -static int CyaSSL_read_internal(CYASSL* ssl, void* data, int sz, int peek) -{ - int ret; - - CYASSL_ENTER("CyaSSL_read_internal()"); - - if (ssl == NULL || data == NULL || sz < 0) - return BAD_FUNC_ARG; - -#ifdef HAVE_ERRNO_H - errno = 0; -#endif -#ifdef CYASSL_DTLS - if (ssl->options.dtls) - ssl->dtls_expected_rx = max(sz + 100, MAX_MTU); -#endif - -#ifdef HAVE_MAX_FRAGMENT - ret = ReceiveData(ssl, (byte*)data, - min(sz, min(ssl->max_fragment, OUTPUT_RECORD_SIZE)), peek); -#else - ret = ReceiveData(ssl, (byte*)data, min(sz, OUTPUT_RECORD_SIZE), peek); -#endif - - CYASSL_LEAVE("CyaSSL_read_internal()", ret); - - if (ret < 0) - return SSL_FATAL_ERROR; - else - return ret; -} - - -int CyaSSL_peek(CYASSL* ssl, void* data, int sz) -{ - CYASSL_ENTER("CyaSSL_peek()"); - - return CyaSSL_read_internal(ssl, data, sz, TRUE); -} - - -int CyaSSL_read(CYASSL* ssl, void* data, int sz) -{ - CYASSL_ENTER("CyaSSL_read()"); - - return CyaSSL_read_internal(ssl, data, sz, FALSE); -} - - -#ifdef HAVE_CAVIUM - -/* let's use cavium, SSL_SUCCESS on ok */ -int CyaSSL_UseCavium(CYASSL* ssl, int devId) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - ssl->devId = devId; - - return SSL_SUCCESS; -} - - -/* let's use cavium, SSL_SUCCESS on ok */ -int CyaSSL_CTX_UseCavium(CYASSL_CTX* ctx, int devId) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - ctx->devId = devId; - - return SSL_SUCCESS; -} - - -#endif /* HAVE_CAVIUM */ - -#ifdef HAVE_SNI - -int CyaSSL_UseSNI(CYASSL* ssl, byte type, const void* data, word16 size) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseSNI(&ssl->extensions, type, data, size); -} - -int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, byte type, const void* data, word16 size) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseSNI(&ctx->extensions, type, data, size); -} - -#ifndef NO_CYASSL_SERVER - -void CyaSSL_SNI_SetOptions(CYASSL* ssl, byte type, byte options) -{ - if (ssl && ssl->extensions) - TLSX_SNI_SetOptions(ssl->extensions, type, options); -} - -void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, byte type, byte options) -{ - if (ctx && ctx->extensions) - TLSX_SNI_SetOptions(ctx->extensions, type, options); -} - -byte CyaSSL_SNI_Status(CYASSL* ssl, byte type) -{ - return TLSX_SNI_Status(ssl ? ssl->extensions : NULL, type); -} - -word16 CyaSSL_SNI_GetRequest(CYASSL* ssl, byte type, void** data) -{ - if (data) - *data = NULL; - - if (ssl && ssl->extensions) - return TLSX_SNI_GetRequest(ssl->extensions, type, data); - - return 0; -} - -int CyaSSL_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, byte type, - byte* sni, word32* inOutSz) -{ - if (clientHello && helloSz > 0 && sni && inOutSz && *inOutSz > 0) - return TLSX_SNI_GetFromBuffer(clientHello, helloSz, type, sni, inOutSz); - - return BAD_FUNC_ARG; -} - -#endif /* NO_CYASSL_SERVER */ - -#endif /* HAVE_SNI */ - - -#ifdef HAVE_MAX_FRAGMENT -#ifndef NO_CYASSL_CLIENT -int CyaSSL_UseMaxFragment(CYASSL* ssl, byte mfl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseMaxFragment(&ssl->extensions, mfl); -} - -int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, byte mfl) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseMaxFragment(&ctx->extensions, mfl); -} -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_MAX_FRAGMENT */ - -#ifdef HAVE_TRUNCATED_HMAC -#ifndef NO_CYASSL_CLIENT -int CyaSSL_UseTruncatedHMAC(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseTruncatedHMAC(&ssl->extensions); -} - -int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - return TLSX_UseTruncatedHMAC(&ctx->extensions); -} -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_TRUNCATED_HMAC */ - -/* Elliptic Curves */ -#ifdef HAVE_SUPPORTED_CURVES -#ifndef NO_CYASSL_CLIENT - -int CyaSSL_UseSupportedCurve(CYASSL* ssl, word16 name) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - switch (name) { - case CYASSL_ECC_SECP160R1: - case CYASSL_ECC_SECP192R1: - case CYASSL_ECC_SECP224R1: - case CYASSL_ECC_SECP256R1: - case CYASSL_ECC_SECP384R1: - case CYASSL_ECC_SECP521R1: - break; - - default: - return BAD_FUNC_ARG; - } - - return TLSX_UseSupportedCurve(&ssl->extensions, name); -} - -int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, word16 name) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - switch (name) { - case CYASSL_ECC_SECP160R1: - case CYASSL_ECC_SECP192R1: - case CYASSL_ECC_SECP224R1: - case CYASSL_ECC_SECP256R1: - case CYASSL_ECC_SECP384R1: - case CYASSL_ECC_SECP521R1: - break; - - default: - return BAD_FUNC_ARG; - } - - return TLSX_UseSupportedCurve(&ctx->extensions, name); -} - -#endif /* NO_CYASSL_CLIENT */ -#endif /* HAVE_SUPPORTED_CURVES */ - - -#ifndef CYASSL_LEANPSK -int CyaSSL_send(CYASSL* ssl, const void* data, int sz, int flags) -{ - int ret; - int oldFlags; - - CYASSL_ENTER("CyaSSL_send()"); - - if (ssl == NULL || data == NULL || sz < 0) - return BAD_FUNC_ARG; - - oldFlags = ssl->wflags; - - ssl->wflags = flags; - ret = CyaSSL_write(ssl, data, sz); - ssl->wflags = oldFlags; - - CYASSL_LEAVE("CyaSSL_send()", ret); - - return ret; -} - - -int CyaSSL_recv(CYASSL* ssl, void* data, int sz, int flags) -{ - int ret; - int oldFlags; - - CYASSL_ENTER("CyaSSL_recv()"); - - if (ssl == NULL || data == NULL || sz < 0) - return BAD_FUNC_ARG; - - oldFlags = ssl->rflags; - - ssl->rflags = flags; - ret = CyaSSL_read(ssl, data, sz); - ssl->rflags = oldFlags; - - CYASSL_LEAVE("CyaSSL_recv()", ret); - - return ret; -} -#endif - - -/* SSL_SUCCESS on ok */ -int CyaSSL_shutdown(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_shutdown()"); - - if (ssl == NULL) - return SSL_FATAL_ERROR; - - if (ssl->options.quietShutdown) { - CYASSL_MSG("quiet shutdown, no close notify sent"); - return SSL_SUCCESS; - } - - /* try to send close notify, not an error if can't */ - if (!ssl->options.isClosed && !ssl->options.connReset && - !ssl->options.sentNotify) { - ssl->error = SendAlert(ssl, alert_warning, close_notify); - if (ssl->error < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.sentNotify = 1; /* don't send close_notify twice */ - } - - CYASSL_LEAVE("SSL_shutdown()", ssl->error); - - ssl->error = SSL_ERROR_SYSCALL; /* simulate OpenSSL behavior */ - - return SSL_SUCCESS; -} - - -int CyaSSL_get_error(CYASSL* ssl, int ret) -{ - CYASSL_ENTER("SSL_get_error"); - - if (ret > 0) - return SSL_ERROR_NONE; - if (ssl == NULL) - return BAD_FUNC_ARG; - - CYASSL_LEAVE("SSL_get_error", ssl->error); - - /* make sure converted types are handled in SetErrorString() too */ - if (ssl->error == WANT_READ) - return SSL_ERROR_WANT_READ; /* convert to OpenSSL type */ - else if (ssl->error == WANT_WRITE) - return SSL_ERROR_WANT_WRITE; /* convert to OpenSSL type */ - else if (ssl->error == ZERO_RETURN) - return SSL_ERROR_ZERO_RETURN; /* convert to OpenSSL type */ - return ssl->error; -} - - -/* retrive alert history, SSL_SUCCESS on ok */ -int CyaSSL_get_alert_history(CYASSL* ssl, CYASSL_ALERT_HISTORY *h) -{ - if (ssl && h) { - *h = ssl->alert_history; - } - return SSL_SUCCESS; -} - - -/* return TRUE if current error is want read */ -int CyaSSL_want_read(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_want_read"); - if (ssl->error == WANT_READ) - return 1; - - return 0; -} - - -/* return TRUE if current error is want write */ -int CyaSSL_want_write(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_want_write"); - if (ssl->error == WANT_WRITE) - return 1; - - return 0; -} - - -char* CyaSSL_ERR_error_string(unsigned long errNumber, char* data) -{ - static const char* msg = "Please supply a buffer for error string"; - - CYASSL_ENTER("ERR_error_string"); - if (data) { - SetErrorString((int)errNumber, data); - return data; - } - - return (char*)msg; -} - - -void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, unsigned long len) -{ - CYASSL_ENTER("CyaSSL_ERR_error_string_n"); - if (len >= CYASSL_MAX_ERROR_SZ) - CyaSSL_ERR_error_string(e, buf); - else { - char tmp[CYASSL_MAX_ERROR_SZ]; - - CYASSL_MSG("Error buffer too short, truncating"); - if (len) { - CyaSSL_ERR_error_string(e, tmp); - XMEMCPY(buf, tmp, len-1); - buf[len-1] = '\0'; - } - } -} - - -/* don't free temporary arrays at end of handshake */ -void CyaSSL_KeepArrays(CYASSL* ssl) -{ - if (ssl) - ssl->options.saveArrays = 1; -} - - -/* user doesn't need temporary arrays anymore, Free */ -void CyaSSL_FreeArrays(CYASSL* ssl) -{ - if (ssl && ssl->options.handShakeState == HANDSHAKE_DONE) { - ssl->options.saveArrays = 0; - FreeArrays(ssl, 1); - } -} - - -const byte* CyaSSL_GetMacSecret(CYASSL* ssl, int verify) -{ - if (ssl == NULL) - return NULL; - - if ( (ssl->options.side == CYASSL_CLIENT_END && !verify) || - (ssl->options.side == CYASSL_SERVER_END && verify) ) - return ssl->keys.client_write_MAC_secret; - else - return ssl->keys.server_write_MAC_secret; -} - - -#ifdef ATOMIC_USER - -void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX* ctx, CallbackMacEncrypt cb) -{ - if (ctx) - ctx->MacEncryptCb = cb; -} - - -void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->MacEncryptCtx = ctx; -} - - -void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->MacEncryptCtx; - - return NULL; -} - - -void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX* ctx, CallbackDecryptVerify cb) -{ - if (ctx) - ctx->DecryptVerifyCb = cb; -} - - -void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->DecryptVerifyCtx = ctx; -} - - -void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->DecryptVerifyCtx; - - return NULL; -} - - -const byte* CyaSSL_GetClientWriteKey(CYASSL* ssl) -{ - if (ssl) - return ssl->keys.client_write_key; - - return NULL; -} - - -const byte* CyaSSL_GetClientWriteIV(CYASSL* ssl) -{ - if (ssl) - return ssl->keys.client_write_IV; - - return NULL; -} - - -const byte* CyaSSL_GetServerWriteKey(CYASSL* ssl) -{ - if (ssl) - return ssl->keys.server_write_key; - - return NULL; -} - - -const byte* CyaSSL_GetServerWriteIV(CYASSL* ssl) -{ - if (ssl) - return ssl->keys.server_write_IV; - - return NULL; -} - - -int CyaSSL_GetKeySize(CYASSL* ssl) -{ - if (ssl) - return ssl->specs.key_size; - - return BAD_FUNC_ARG; -} - - -int CyaSSL_GetIVSize(CYASSL* ssl) -{ - if (ssl) - return ssl->specs.iv_size; - - return BAD_FUNC_ARG; -} - - -int CyaSSL_GetBulkCipher(CYASSL* ssl) -{ - if (ssl) - return ssl->specs.bulk_cipher_algorithm; - - return BAD_FUNC_ARG; -} - - -int CyaSSL_GetCipherType(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - if (ssl->specs.cipher_type == block) - return CYASSL_BLOCK_TYPE; - if (ssl->specs.cipher_type == stream) - return CYASSL_STREAM_TYPE; - if (ssl->specs.cipher_type == aead) - return CYASSL_AEAD_TYPE; - - return -1; -} - - -int CyaSSL_GetCipherBlockSize(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - return ssl->specs.block_size; -} - - -int CyaSSL_GetAeadMacSize(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - return ssl->specs.aead_mac_size; -} - - -int CyaSSL_IsTLSv1_1(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - if (ssl->options.tls1_1) - return 1; - - return 0; -} - - -int CyaSSL_GetSide(CYASSL* ssl) -{ - if (ssl) - return ssl->options.side; - - return BAD_FUNC_ARG; -} - - -int CyaSSL_GetHmacSize(CYASSL* ssl) -{ - /* AEAD ciphers don't have HMAC keys */ - if (ssl) - return (ssl->specs.cipher_type != aead) ? ssl->specs.hash_size : 0; - - return BAD_FUNC_ARG; -} - -#endif /* ATOMIC_USER */ - -#ifndef NO_CERTS - -CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void) -{ - CYASSL_CERT_MANAGER* cm = NULL; - - CYASSL_ENTER("CyaSSL_CertManagerNew"); - - cm = (CYASSL_CERT_MANAGER*) XMALLOC(sizeof(CYASSL_CERT_MANAGER), 0, - DYNAMIC_TYPE_CERT_MANAGER); - if (cm) { - XMEMSET(cm, 0, sizeof(CYASSL_CERT_MANAGER)); - - if (InitMutex(&cm->caLock) != 0) { - CYASSL_MSG("Bad mutex init"); - CyaSSL_CertManagerFree(cm); - return NULL; - } - } - - return cm; -} - - -void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("CyaSSL_CertManagerFree"); - - if (cm) { - #ifdef HAVE_CRL - if (cm->crl) - FreeCRL(cm->crl, 1); - #endif - #ifdef HAVE_OCSP - if (cm->ocsp) - FreeOCSP(cm->ocsp, 1); - #endif - FreeSignerTable(cm->caTable, CA_TABLE_SIZE, NULL); - FreeMutex(&cm->caLock); - XFREE(cm, NULL, DYNAMIC_TYPE_CERT_MANAGER); - } - -} - - -/* Unload the CA signer list */ -int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("CyaSSL_CertManagerUnloadCAs"); - - if (cm == NULL) - return BAD_FUNC_ARG; - - if (LockMutex(&cm->caLock) != 0) - return BAD_MUTEX_E; - - FreeSignerTable(cm->caTable, CA_TABLE_SIZE, NULL); - - UnLockMutex(&cm->caLock); - - - return SSL_SUCCESS; -} - - -/* Return bytes written to buff or < 0 for error */ -int CyaSSL_CertPemToDer(const unsigned char* pem, int pemSz, - unsigned char* buff, int buffSz, - int type) -{ - EncryptedInfo info; - int eccKey = 0; - int ret; - buffer der; - - CYASSL_ENTER("CyaSSL_CertPemToDer"); - - if (pem == NULL || buff == NULL || buffSz <= 0) { - CYASSL_MSG("Bad pem der args"); - return BAD_FUNC_ARG; - } - - if (type != CERT_TYPE && type != CA_TYPE && type != CERTREQ_TYPE) { - CYASSL_MSG("Bad cert type"); - return BAD_FUNC_ARG; - } - - info.set = 0; - info.ctx = NULL; - info.consumed = 0; - der.buffer = NULL; - - ret = PemToDer(pem, pemSz, type, &der, NULL, &info, &eccKey); - if (ret < 0) { - CYASSL_MSG("Bad Pem To Der"); - } - else { - if (der.length <= (word32)buffSz) { - XMEMCPY(buff, der.buffer, der.length); - ret = der.length; - } - else { - CYASSL_MSG("Bad der length"); - ret = BAD_FUNC_ARG; - } - } - - XFREE(der.buffer, NULL, DYNAMIC_TYPE_KEY); - - return ret; -} - - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - -/* our KeyPemToDer password callback, password in userData */ -static INLINE int OurPasswordCb(char* passwd, int sz, int rw, void* userdata) -{ - (void)rw; - - if (userdata == NULL) - return 0; - - XSTRNCPY(passwd, (char*)userdata, sz); - return min((word32)sz, (word32)XSTRLEN((char*)userdata)); -} - -#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ - - -/* Return bytes written to buff or < 0 for error */ -int CyaSSL_KeyPemToDer(const unsigned char* pem, int pemSz, unsigned char* buff, - int buffSz, const char* pass) -{ - EncryptedInfo info; - int eccKey = 0; - int ret; - buffer der; - - (void)pass; - - CYASSL_ENTER("CyaSSL_KeyPemToDer"); - - if (pem == NULL || buff == NULL || buffSz <= 0) { - CYASSL_MSG("Bad pem der args"); - return BAD_FUNC_ARG; - } - - info.set = 0; - info.ctx = NULL; - info.consumed = 0; - der.buffer = NULL; - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - if (pass) { - info.ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - if (info.ctx == NULL) - return MEMORY_E; - CyaSSL_CTX_set_default_passwd_cb(info.ctx, OurPasswordCb); - CyaSSL_CTX_set_default_passwd_cb_userdata(info.ctx, (void*)pass); - } -#endif - - ret = PemToDer(pem, pemSz, PRIVATEKEY_TYPE, &der, NULL, &info, &eccKey); - if (ret < 0) { - CYASSL_MSG("Bad Pem To Der"); - } - else { - if (der.length <= (word32)buffSz) { - XMEMCPY(buff, der.buffer, der.length); - ret = der.length; - } - else { - CYASSL_MSG("Bad der length"); - ret = BAD_FUNC_ARG; - } - } - - XFREE(der.buffer, NULL, DYNAMIC_TYPE_KEY); - - if (info.ctx) - CyaSSL_CTX_free(info.ctx); - - return ret; -} - - -#endif /* !NO_CERTS */ - - - -#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) - -void CyaSSL_ERR_print_errors_fp(FILE* fp, int err) -{ - char data[CYASSL_MAX_ERROR_SZ + 1]; - - CYASSL_ENTER("CyaSSL_ERR_print_errors_fp"); - SetErrorString(err, data); - fprintf(fp, "%s", data); -} - -#endif - - -int CyaSSL_pending(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_pending"); - return ssl->buffers.clearOutputBuffer.length; -} - - -#ifndef CYASSL_LEANPSK -/* trun on handshake group messages for context */ -int CyaSSL_CTX_set_group_messages(CYASSL_CTX* ctx) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - ctx->groupMessages = 1; - - return SSL_SUCCESS; -} -#endif - - -#ifndef NO_CYASSL_CLIENT -/* connect enough to get peer cert chain */ -int CyaSSL_connect_cert(CYASSL* ssl) -{ - int ret; - - if (ssl == NULL) - return SSL_FAILURE; - - ssl->options.certOnly = 1; - ret = CyaSSL_connect(ssl); - ssl->options.certOnly = 0; - - return ret; -} -#endif - - -#ifndef CYASSL_LEANPSK -/* trun on handshake group messages for ssl object */ -int CyaSSL_set_group_messages(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - ssl->options.groupMessages = 1; - - return SSL_SUCCESS; -} - - -int CyaSSL_SetVersion(CYASSL* ssl, int version) -{ - byte haveRSA = 1; - byte havePSK = 0; - - CYASSL_ENTER("CyaSSL_SetVersion"); - - if (ssl == NULL) { - CYASSL_MSG("Bad function argument"); - return BAD_FUNC_ARG; - } - - switch (version) { -#ifndef NO_OLD_TLS - case CYASSL_SSLV3: - ssl->version = MakeSSLv3(); - break; -#endif - -#ifndef NO_TLS - #ifndef NO_OLD_TLS - case CYASSL_TLSV1: - ssl->version = MakeTLSv1(); - break; - - case CYASSL_TLSV1_1: - ssl->version = MakeTLSv1_1(); - break; - #endif - case CYASSL_TLSV1_2: - ssl->version = MakeTLSv1_2(); - break; -#endif - - default: - CYASSL_MSG("Bad function argument"); - return BAD_FUNC_ARG; - } - - #ifdef NO_RSA - haveRSA = 0; - #endif - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, ssl->options.haveDH, - ssl->options.haveNTRU, ssl->options.haveECDSAsig, - ssl->options.haveStaticECC, ssl->options.side); - - return SSL_SUCCESS; -} -#endif /* !leanpsk */ - - -#if !defined(NO_CERTS) || !defined(NO_SESSION_CACHE) - -/* Make a work from the front of random hash */ -static INLINE word32 MakeWordFromHash(const byte* hashID) -{ - return (hashID[0] << 24) | (hashID[1] << 16) | (hashID[2] << 8) | - hashID[3]; -} - -#endif /* !NO_CERTS || !NO_SESSION_CACHE */ - - -#ifndef NO_CERTS - -/* hash is the SHA digest of name, just use first 32 bits as hash */ -static INLINE word32 HashSigner(const byte* hash) -{ - return MakeWordFromHash(hash) % CA_TABLE_SIZE; -} - - -/* does CA already exist on signer list */ -int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash) -{ - Signer* signers; - int ret = 0; - word32 row = HashSigner(hash); - - if (LockMutex(&cm->caLock) != 0) - return ret; - signers = cm->caTable[row]; - while (signers) { - byte* subjectHash; - #ifndef NO_SKID - subjectHash = signers->subjectKeyIdHash; - #else - subjectHash = signers->subjectNameHash; - #endif - if (XMEMCMP(hash, subjectHash, SHA_DIGEST_SIZE) == 0) { - ret = 1; - break; - } - signers = signers->next; - } - UnLockMutex(&cm->caLock); - - return ret; -} - - -/* return CA if found, otherwise NULL */ -Signer* GetCA(void* vp, byte* hash) -{ - CYASSL_CERT_MANAGER* cm = (CYASSL_CERT_MANAGER*)vp; - Signer* ret = NULL; - Signer* signers; - word32 row = HashSigner(hash); - - if (cm == NULL) - return NULL; - - if (LockMutex(&cm->caLock) != 0) - return ret; - - signers = cm->caTable[row]; - while (signers) { - byte* subjectHash; - #ifndef NO_SKID - subjectHash = signers->subjectKeyIdHash; - #else - subjectHash = signers->subjectNameHash; - #endif - if (XMEMCMP(hash, subjectHash, SHA_DIGEST_SIZE) == 0) { - ret = signers; - break; - } - signers = signers->next; - } - UnLockMutex(&cm->caLock); - - return ret; -} - - -#ifndef NO_SKID -/* return CA if found, otherwise NULL. Walk through hash table. */ -Signer* GetCAByName(void* vp, byte* hash) -{ - CYASSL_CERT_MANAGER* cm = (CYASSL_CERT_MANAGER*)vp; - Signer* ret = NULL; - Signer* signers; - word32 row; - - if (cm == NULL) - return NULL; - - if (LockMutex(&cm->caLock) != 0) - return ret; - - for (row = 0; row < CA_TABLE_SIZE && ret == NULL; row++) { - signers = cm->caTable[row]; - while (signers && ret == NULL) { - if (XMEMCMP(hash, signers->subjectNameHash, SHA_DIGEST_SIZE) == 0) { - ret = signers; - } - signers = signers->next; - } - } - UnLockMutex(&cm->caLock); - - return ret; -} -#endif - - -/* owns der, internal now uses too */ -/* type flag ids from user or from chain received during verify - don't allow chain ones to be added w/o isCA extension */ -int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify) -{ - int ret; - DecodedCert cert; - Signer* signer = 0; - word32 row; - byte* subjectHash; - - CYASSL_MSG("Adding a CA"); - InitDecodedCert(&cert, der.buffer, der.length, cm->heap); - ret = ParseCert(&cert, CA_TYPE, verify, cm); - CYASSL_MSG(" Parsed new CA"); - - #ifndef NO_SKID - subjectHash = cert.extSubjKeyId; - #else - subjectHash = cert.subjectHash; - #endif - - if (ret == 0 && cert.isCA == 0 && type != CYASSL_USER_CA) { - CYASSL_MSG(" Can't add as CA if not actually one"); - ret = NOT_CA_ERROR; - } - #ifndef ALLOW_INVALID_CERTSIGN - else if (ret == 0 && cert.isCA == 1 && type != CYASSL_USER_CA && - (cert.extKeyUsage & KEYUSE_KEY_CERT_SIGN) == 0) { - /* Intermediate CA certs are required to have the keyCertSign - * extension set. User loaded root certs are not. */ - CYASSL_MSG(" Doesn't have key usage certificate signing"); - ret = NOT_CA_ERROR; - } - #endif - else if (ret == 0 && AlreadySigner(cm, subjectHash)) { - CYASSL_MSG(" Already have this CA, not adding again"); - (void)ret; - } - else if (ret == 0) { - /* take over signer parts */ - signer = MakeSigner(cm->heap); - if (!signer) - ret = MEMORY_ERROR; - else { - signer->keyOID = cert.keyOID; - signer->publicKey = cert.publicKey; - signer->pubKeySize = cert.pubKeySize; - signer->nameLen = cert.subjectCNLen; - signer->name = cert.subjectCN; - #ifndef IGNORE_NAME_CONSTRAINTS - signer->permittedNames = cert.permittedNames; - signer->excludedNames = cert.excludedNames; - #endif - #ifndef NO_SKID - XMEMCPY(signer->subjectKeyIdHash, - cert.extSubjKeyId, SHA_DIGEST_SIZE); - #endif - XMEMCPY(signer->subjectNameHash, cert.subjectHash, SHA_DIGEST_SIZE); - signer->keyUsage = cert.extKeyUsageSet ? cert.extKeyUsage : 0xFFFF; - /* If Key Usage not set, all uses valid. */ - signer->next = NULL; /* in case lock fails */ - - cert.publicKey = 0; /* don't free here */ - cert.subjectCN = 0; - #ifndef IGNORE_NAME_CONSTRAINTS - cert.permittedNames = NULL; - cert.excludedNames = NULL; - #endif - - #ifndef NO_SKID - row = HashSigner(signer->subjectKeyIdHash); - #else - row = HashSigner(signer->subjectNameHash); - #endif - - if (LockMutex(&cm->caLock) == 0) { - signer->next = cm->caTable[row]; - cm->caTable[row] = signer; /* takes ownership */ - UnLockMutex(&cm->caLock); - if (cm->caCacheCallback) - cm->caCacheCallback(der.buffer, (int)der.length, type); - } - else { - CYASSL_MSG(" CA Mutex Lock failed"); - ret = BAD_MUTEX_E; - FreeSigner(signer, cm->heap); - } - } - } - - CYASSL_MSG(" Freeing Parsed CA"); - FreeDecodedCert(&cert); - CYASSL_MSG(" Freeing der CA"); - XFREE(der.buffer, cm->heap, DYNAMIC_TYPE_CA); - CYASSL_MSG(" OK Freeing der CA"); - - CYASSL_LEAVE("AddCA", ret); - if (ret == 0) return SSL_SUCCESS; - return ret; -} - -#endif /* !NO_CERTS */ - - -#ifndef NO_SESSION_CACHE - - /* basic config gives a cache with 33 sessions, adequate for clients and - embedded servers - - MEDIUM_SESSION_CACHE allows 1055 sessions, adequate for servers that - aren't under heavy load, basically allows 200 new sessions per minute - - BIG_SESSION_CACHE yields 20,027 sessions - - HUGE_SESSION_CACHE yields 65,791 sessions, for servers under heavy load, - allows over 13,000 new sessions per minute or over 200 new sessions per - second - - SMALL_SESSION_CACHE only stores 6 sessions, good for embedded clients - or systems where the default of nearly 3kB is too much RAM, this define - uses less than 500 bytes RAM - - default SESSION_CACHE stores 33 sessions (no XXX_SESSION_CACHE defined) - */ - #ifdef HUGE_SESSION_CACHE - #define SESSIONS_PER_ROW 11 - #define SESSION_ROWS 5981 - #elif defined(BIG_SESSION_CACHE) - #define SESSIONS_PER_ROW 7 - #define SESSION_ROWS 2861 - #elif defined(MEDIUM_SESSION_CACHE) - #define SESSIONS_PER_ROW 5 - #define SESSION_ROWS 211 - #elif defined(SMALL_SESSION_CACHE) - #define SESSIONS_PER_ROW 2 - #define SESSION_ROWS 3 - #else - #define SESSIONS_PER_ROW 3 - #define SESSION_ROWS 11 - #endif - - typedef struct SessionRow { - int nextIdx; /* where to place next one */ - int totalCount; /* sessions ever on this row */ - CYASSL_SESSION Sessions[SESSIONS_PER_ROW]; - } SessionRow; - - static SessionRow SessionCache[SESSION_ROWS]; - - static CyaSSL_Mutex session_mutex; /* SessionCache mutex */ - - #ifndef NO_CLIENT_CACHE - - typedef struct ClientSession { - word16 serverRow; /* SessionCache Row id */ - word16 serverIdx; /* SessionCache Idx (column) */ - } ClientSession; - - typedef struct ClientRow { - int nextIdx; /* where to place next one */ - int totalCount; /* sessions ever on this row */ - ClientSession Clients[SESSIONS_PER_ROW]; - } ClientRow; - - static ClientRow ClientCache[SESSION_ROWS]; /* Client Cache */ - /* uses session mutex */ - #endif /* NO_CLIENT_CACHE */ - -#endif /* NO_SESSION_CACHE */ - - -int CyaSSL_Init(void) -{ - int ret = SSL_SUCCESS; - - CYASSL_ENTER("CyaSSL_Init"); - - if (initRefCount == 0) { -#ifndef NO_SESSION_CACHE - if (InitMutex(&session_mutex) != 0) - ret = BAD_MUTEX_E; -#endif - if (InitMutex(&count_mutex) != 0) - ret = BAD_MUTEX_E; - } - if (ret == SSL_SUCCESS) { - if (LockMutex(&count_mutex) != 0) { - CYASSL_MSG("Bad Lock Mutex count"); - return BAD_MUTEX_E; - } - initRefCount++; - UnLockMutex(&count_mutex); - } - - return ret; -} - - -#ifndef NO_CERTS - - /* Remove PEM header/footer, convert to ASN1, store any encrypted data - info->consumed tracks of PEM bytes consumed in case multiple parts */ - int PemToDer(const unsigned char* buff, long longSz, int type, - buffer* der, void* heap, EncryptedInfo* info, int* eccKey) - { - char header[PEM_LINE_LEN]; - char footer[PEM_LINE_LEN]; - char* headerEnd; - char* footerEnd; - char* consumedEnd; - char* bufferEnd = (char*)(buff + longSz); - long neededSz; - int ret = 0; - int pkcs8 = 0; - int pkcs8Enc = 0; - int dynamicType = 0; - int sz = (int)longSz; - - (void)heap; - (void)dynamicType; - - if (type == CERT_TYPE || type == CA_TYPE) { - XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header)); - XSTRNCPY(footer, "-----END CERTIFICATE-----", sizeof(footer)); - dynamicType = (type == CA_TYPE) ? DYNAMIC_TYPE_CA : - DYNAMIC_TYPE_CERT; - } else if (type == CERTREQ_TYPE) { - XSTRNCPY(header, "-----BEGIN CERTIFICATE REQUEST-----", - sizeof(header)); - XSTRNCPY(footer, "-----END CERTIFICATE REQUEST-----", - sizeof(footer)); - dynamicType = DYNAMIC_TYPE_KEY; - } else if (type == DH_PARAM_TYPE) { - XSTRNCPY(header, "-----BEGIN DH PARAMETERS-----", sizeof(header)); - XSTRNCPY(footer, "-----END DH PARAMETERS-----", sizeof(footer)); - dynamicType = DYNAMIC_TYPE_KEY; - } else if (type == CRL_TYPE) { - XSTRNCPY(header, "-----BEGIN X509 CRL-----", sizeof(header)); - XSTRNCPY(footer, "-----END X509 CRL-----", sizeof(footer)); - dynamicType = DYNAMIC_TYPE_CRL; - } else { - XSTRNCPY(header, "-----BEGIN RSA PRIVATE KEY-----", sizeof(header)); - XSTRNCPY(footer, "-----END RSA PRIVATE KEY-----", sizeof(footer)); - dynamicType = DYNAMIC_TYPE_KEY; - } - - /* find header */ - headerEnd = XSTRNSTR((char*)buff, header, sz); - if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be pkcs8 */ - XSTRNCPY(header, "-----BEGIN PRIVATE KEY-----", sizeof(header)); - XSTRNCPY(footer, "-----END PRIVATE KEY-----", sizeof(footer)); - - headerEnd = XSTRNSTR((char*)buff, header, sz); - if (headerEnd) - pkcs8 = 1; - else { - XSTRNCPY(header, "-----BEGIN ENCRYPTED PRIVATE KEY-----", - sizeof(header)); - XSTRNCPY(footer, "-----END ENCRYPTED PRIVATE KEY-----", - sizeof(footer)); - - headerEnd = XSTRNSTR((char*)buff, header, sz); - if (headerEnd) { - pkcs8Enc = 1; - (void)pkcs8Enc; /* only opensslextra will read */ - } - } - } - if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be ecc */ - XSTRNCPY(header, "-----BEGIN EC PRIVATE KEY-----", sizeof(header)); - XSTRNCPY(footer, "-----END EC PRIVATE KEY-----", sizeof(footer)); - - headerEnd = XSTRNSTR((char*)buff, header, sz); - if (headerEnd) - *eccKey = 1; - } - if (!headerEnd && type == PRIVATEKEY_TYPE) { /* may be dsa */ - XSTRNCPY(header, "-----BEGIN DSA PRIVATE KEY-----", sizeof(header)); - XSTRNCPY(footer, "-----END DSA PRIVATE KEY-----", sizeof(footer)); - - headerEnd = XSTRNSTR((char*)buff, header, sz); - } - if (!headerEnd) { - CYASSL_MSG("Couldn't find PEM header"); - return SSL_NO_PEM_HEADER; - } - headerEnd += XSTRLEN(header); - - /* eat end of line */ - if (headerEnd[0] == '\n') - headerEnd++; - else if (headerEnd[1] == '\n') - headerEnd += 2; - else - return SSL_BAD_FILE; - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - { - /* remove encrypted header if there */ - char encHeader[] = "Proc-Type"; - char* line = XSTRNSTR((char*)buff, encHeader, PEM_LINE_LEN); - if (line) { - char* newline; - char* finish; - char* start = XSTRNSTR(line, "DES", PEM_LINE_LEN); - - if (!start) - start = XSTRNSTR(line, "AES", PEM_LINE_LEN); - - if (!start) return SSL_BAD_FILE; - if (!info) return SSL_BAD_FILE; - - finish = XSTRNSTR(start, ",", PEM_LINE_LEN); - - if (start && finish && (start < finish)) { - newline = XSTRNSTR(finish, "\r", PEM_LINE_LEN); - - XMEMCPY(info->name, start, finish - start); - info->name[finish - start] = 0; - XMEMCPY(info->iv, finish + 1, sizeof(info->iv)); - - if (!newline) newline = XSTRNSTR(finish, "\n", PEM_LINE_LEN); - if (newline && (newline > finish)) { - info->ivSz = (word32)(newline - (finish + 1)); - info->set = 1; - } - else - return SSL_BAD_FILE; - } - else - return SSL_BAD_FILE; - - /* eat blank line */ - while (*newline == '\r' || *newline == '\n') - newline++; - headerEnd = newline; - } - } -#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ - - /* find footer */ - footerEnd = XSTRNSTR((char*)buff, footer, sz); - if (!footerEnd) return SSL_BAD_FILE; - - consumedEnd = footerEnd + XSTRLEN(footer); - - if (consumedEnd < bufferEnd) { /* handle no end of line on last line */ - /* eat end of line */ - if (consumedEnd[0] == '\n') - consumedEnd++; - else if (consumedEnd[1] == '\n') - consumedEnd += 2; - else - return SSL_BAD_FILE; - } - - if (info) - info->consumed = (long)(consumedEnd - (char*)buff); - - /* set up der buffer */ - neededSz = (long)(footerEnd - headerEnd); - if (neededSz > sz || neededSz < 0) return SSL_BAD_FILE; - der->buffer = (byte*) XMALLOC(neededSz, heap, dynamicType); - if (!der->buffer) return MEMORY_ERROR; - der->length = (word32)neededSz; - - if (Base64_Decode((byte*)headerEnd, (word32)neededSz, der->buffer, - &der->length) < 0) - return SSL_BAD_FILE; - - if (pkcs8) { - /* convert and adjust length */ - if ( (ret = ToTraditional(der->buffer, der->length)) < 0 ) { - return ret; - } else { - der->length = ret; - return 0; - } - } - -#if (defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)) && !defined(NO_PWDBASED) - if (pkcs8Enc) { - int passwordSz; - char password[80]; - - if (!info || !info->ctx || !info->ctx->passwd_cb) - return SSL_BAD_FILE; /* no callback error */ - passwordSz = info->ctx->passwd_cb(password, sizeof(password), 0, - info->ctx->userdata); - /* convert and adjust length */ - if ( (ret = ToTraditionalEnc(der->buffer, der->length, password, - passwordSz)) < 0 ) { - return ret; - } else { - der->length = ret; - return 0; - } - } -#endif - - return 0; - } - - - /* process the buffer buff, legnth sz, into ctx of format and type - used tracks bytes consumed, userChain specifies a user cert chain - to pass during the handshake */ - static int ProcessBuffer(CYASSL_CTX* ctx, const unsigned char* buff, - long sz, int format, int type, CYASSL* ssl, - long* used, int userChain) - { - EncryptedInfo info; - buffer der; /* holds DER or RAW (for NTRU) */ - int ret; - int dynamicType = 0; - int eccKey = 0; - int rsaKey = 0; - void* heap = ctx ? ctx->heap : NULL; - - info.set = 0; - info.ctx = ctx; - info.consumed = 0; - der.buffer = 0; - - (void)dynamicType; - (void)rsaKey; - - if (used) - *used = sz; /* used bytes default to sz, PEM chain may shorten*/ - - if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM - && format != SSL_FILETYPE_RAW) - return SSL_BAD_FILETYPE; - - if (type == CA_TYPE) - dynamicType = DYNAMIC_TYPE_CA; - else if (type == CERT_TYPE) - dynamicType = DYNAMIC_TYPE_CERT; - else - dynamicType = DYNAMIC_TYPE_KEY; - - if (format == SSL_FILETYPE_PEM) { - ret = PemToDer(buff, sz, type, &der, heap, &info, &eccKey); - if (ret < 0) { - XFREE(der.buffer, heap, dynamicType); - return ret; - } - if (used) - *used = info.consumed; - /* we may have a user cert chain, try to consume */ - if (userChain && type == CERT_TYPE && info.consumed < sz) { - byte staticBuffer[FILE_BUFFER_SIZE]; /* tmp chain buffer */ - byte* chainBuffer = staticBuffer; - int dynamicBuffer = 0; - word32 bufferSz = sizeof(staticBuffer); - long consumed = info.consumed; - word32 idx = 0; - int gotOne = 0; - - if ( (sz - consumed) > (int)bufferSz) { - CYASSL_MSG("Growing Tmp Chain Buffer"); - bufferSz = (word32)(sz - consumed); - /* will shrink to actual size */ - chainBuffer = (byte*)XMALLOC(bufferSz, heap, - DYNAMIC_TYPE_FILE); - if (chainBuffer == NULL) { - XFREE(der.buffer, heap, dynamicType); - return MEMORY_E; - } - dynamicBuffer = 1; - } - - CYASSL_MSG("Processing Cert Chain"); - while (consumed < sz) { - buffer part; - info.consumed = 0; - part.buffer = 0; - - ret = PemToDer(buff + consumed, sz - consumed, type, &part, - heap, &info, &eccKey); - if (ret == 0) { - gotOne = 1; - if ( (idx + part.length) > bufferSz) { - CYASSL_MSG(" Cert Chain bigger than buffer"); - ret = BUFFER_E; - } - else { - c32to24(part.length, &chainBuffer[idx]); - idx += CERT_HEADER_SZ; - XMEMCPY(&chainBuffer[idx], part.buffer,part.length); - idx += part.length; - consumed += info.consumed; - if (used) - *used += info.consumed; - } - } - - XFREE(part.buffer, heap, dynamicType); - - if (ret == SSL_NO_PEM_HEADER && gotOne) { - CYASSL_MSG("We got one good PEM so stuff at end ok"); - break; - } - - if (ret < 0) { - CYASSL_MSG(" Error in Cert in Chain"); - XFREE(der.buffer, heap, dynamicType); - return ret; - } - CYASSL_MSG(" Consumed another Cert in Chain"); - } - CYASSL_MSG("Finished Processing Cert Chain"); - - if (ctx == NULL) { - CYASSL_MSG("certChain needs context"); - return BAD_FUNC_ARG; - } - ctx->certChain.buffer = (byte*)XMALLOC(idx, heap, - dynamicType); - if (ctx->certChain.buffer) { - ctx->certChain.length = idx; - XMEMCPY(ctx->certChain.buffer, chainBuffer, idx); - } - if (dynamicBuffer) - XFREE(chainBuffer, heap, DYNAMIC_TYPE_FILE); - if (ctx->certChain.buffer == NULL) { - XFREE(der.buffer, heap, dynamicType); - return MEMORY_E; - } - } - } - else { /* ASN1 (DER) or RAW (NTRU) */ - der.buffer = (byte*) XMALLOC(sz, heap, dynamicType); - if (!der.buffer) return MEMORY_ERROR; - XMEMCPY(der.buffer, buff, sz); - der.length = (word32)sz; - } - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - if (info.set) { - /* decrypt */ - char password[80]; - int passwordSz; - - byte key[AES_256_KEY_SIZE]; - byte iv[AES_IV_SIZE]; - - if (!ctx || !ctx->passwd_cb) { - XFREE(der.buffer, heap, dynamicType); - return NO_PASSWORD; - } - - /* use file's salt for key derivation, hex decode first */ - if (Base16_Decode(info.iv, info.ivSz, info.iv, &info.ivSz) != 0) { - XFREE(der.buffer, heap, dynamicType); - return ASN_INPUT_E; - } - - passwordSz = ctx->passwd_cb(password, sizeof(password), 0, - ctx->userdata); - if ( (ret = EVP_BytesToKey(info.name, "MD5", info.iv, - (byte*)password, passwordSz, 1, key, iv)) <= 0) { - XFREE(der.buffer, heap, dynamicType); - return ret; - } - - if (XSTRNCMP(info.name, "DES-CBC", 7) == 0) { - Des enc; - - ret = Des_SetKey(&enc, key, info.iv, DES_DECRYPTION); - if (ret != 0) - return ret; - - Des_CbcDecrypt(&enc, der.buffer, der.buffer, der.length); - } - else if (XSTRNCMP(info.name, "DES-EDE3-CBC", 13) == 0) { - Des3 enc; - - ret = Des3_SetKey(&enc, key, info.iv, DES_DECRYPTION); - if (ret != 0) - return ret; - - ret = Des3_CbcDecrypt(&enc, der.buffer, der.buffer, der.length); - if (ret != 0) - return ret; - } - else if (XSTRNCMP(info.name, "AES-128-CBC", 13) == 0) { - Aes enc; - ret = AesSetKey(&enc, key, AES_128_KEY_SIZE, info.iv, - AES_DECRYPTION); - if (ret == 0) - ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); - } - else if (XSTRNCMP(info.name, "AES-192-CBC", 13) == 0) { - Aes enc; - ret = AesSetKey(&enc, key, AES_192_KEY_SIZE, info.iv, - AES_DECRYPTION); - if (ret == 0) - ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); - } - else if (XSTRNCMP(info.name, "AES-256-CBC", 13) == 0) { - Aes enc; - ret = AesSetKey(&enc, key, AES_256_KEY_SIZE, info.iv, - AES_DECRYPTION); - if (ret == 0) - ret = AesCbcDecrypt(&enc, der.buffer,der.buffer,der.length); - } - else { - XFREE(der.buffer, heap, dynamicType); - return SSL_BAD_FILE; - } - - if (ret != 0) { - XFREE(der.buffer, heap, dynamicType); - return ret; - } - } -#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ - - if (type == CA_TYPE) { - if (ctx == NULL) { - CYASSL_MSG("Need context for CA load"); - XFREE(der.buffer, heap, dynamicType); - return BAD_FUNC_ARG; - } - return AddCA(ctx->cm, der, CYASSL_USER_CA, ctx->verifyPeer); - /* takes der over */ - } - else if (type == CERT_TYPE) { - if (ssl) { - if (ssl->buffers.weOwnCert && ssl->buffers.certificate.buffer) - XFREE(ssl->buffers.certificate.buffer, heap, - dynamicType); - ssl->buffers.certificate = der; - ssl->buffers.weOwnCert = 1; - } - else if (ctx) { - if (ctx->certificate.buffer) - XFREE(ctx->certificate.buffer, heap, dynamicType); - ctx->certificate = der; /* takes der over */ - } - } - else if (type == PRIVATEKEY_TYPE) { - if (ssl) { - if (ssl->buffers.weOwnKey && ssl->buffers.key.buffer) - XFREE(ssl->buffers.key.buffer, heap, dynamicType); - ssl->buffers.key = der; - ssl->buffers.weOwnKey = 1; - } - else if (ctx) { - if (ctx->privateKey.buffer) - XFREE(ctx->privateKey.buffer, heap, dynamicType); - ctx->privateKey = der; /* takes der over */ - } - } - else { - XFREE(der.buffer, heap, dynamicType); - return SSL_BAD_CERTTYPE; - } - - if (type == PRIVATEKEY_TYPE && format != SSL_FILETYPE_RAW) { -#ifndef NO_RSA - if (!eccKey) { - /* make sure RSA key can be used */ - RsaKey key; - word32 idx = 0; - - ret = InitRsaKey(&key, 0); - if (ret != 0) return ret; - if (RsaPrivateKeyDecode(der.buffer,&idx,&key,der.length) != 0) { -#ifdef HAVE_ECC - /* could have DER ECC (or pkcs8 ecc), no easy way to tell */ - eccKey = 1; /* so try it out */ -#endif - if (!eccKey) { - FreeRsaKey(&key); - return SSL_BAD_FILE; - } - } else { - rsaKey = 1; - (void)rsaKey; /* for no ecc builds */ - } - FreeRsaKey(&key); - } -#endif -#ifdef HAVE_ECC - if (!rsaKey) { - /* make sure ECC key can be used */ - word32 idx = 0; - ecc_key key; - - ecc_init(&key); - if (EccPrivateKeyDecode(der.buffer,&idx,&key,der.length) != 0) { - ecc_free(&key); - return SSL_BAD_FILE; - } - ecc_free(&key); - eccKey = 1; - if (ctx) - ctx->haveStaticECC = 1; - if (ssl) - ssl->options.haveStaticECC = 1; - } -#endif /* HAVE_ECC */ - } - else if (type == CERT_TYPE) { - DecodedCert cert; - - CYASSL_MSG("Checking cert signature type"); - InitDecodedCert(&cert, der.buffer, der.length, heap); - - if (DecodeToKey(&cert, 0) < 0) { - CYASSL_MSG("Decode to key failed"); - return SSL_BAD_FILE; - } - switch (cert.signatureOID) { - case CTC_SHAwECDSA: - case CTC_SHA256wECDSA: - case CTC_SHA384wECDSA: - case CTC_SHA512wECDSA: - CYASSL_MSG("ECDSA cert signature"); - if (ctx) - ctx->haveECDSAsig = 1; - if (ssl) - ssl->options.haveECDSAsig = 1; - break; - default: - CYASSL_MSG("Not ECDSA cert signature"); - break; - } - -#ifdef HAVE_ECC - if (ctx) - ctx->pkCurveOID = cert.pkCurveOID; - if (ssl) - ssl->pkCurveOID = cert.pkCurveOID; -#endif - - FreeDecodedCert(&cert); - } - - return SSL_SUCCESS; - } - - - - -/* CA PEM file for verification, may have multiple/chain certs to process */ -static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff, - long sz, int format, int type, CYASSL* ssl) -{ - long used = 0; - int ret = 0; - int gotOne = 0; - - CYASSL_MSG("Processing CA PEM file"); - while (used < sz) { - long consumed = 0; - - ret = ProcessBuffer(ctx, buff + used, sz - used, format, type, ssl, - &consumed, 0); - - if (ret == SSL_NO_PEM_HEADER && gotOne) { - CYASSL_MSG("We got one good PEM file so stuff at end ok"); - ret = SSL_SUCCESS; - break; - } - - if (ret < 0) - break; - - CYASSL_MSG(" Processed a CA"); - gotOne = 1; - used += consumed; - } - - return ret; -} - - -/* Verify the ceritficate, SSL_SUCCESS for ok, < 0 for error */ -int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, const byte* buff, - long sz, int format) -{ - int ret = 0; - int eccKey = 0; /* not used */ - - DecodedCert cert; - buffer der; - - CYASSL_ENTER("CyaSSL_CertManagerVerifyBuffer"); - - der.buffer = NULL; - der.length = 0; - - if (format == SSL_FILETYPE_PEM) { - EncryptedInfo info; - - info.set = 0; - info.ctx = NULL; - info.consumed = 0; - ret = PemToDer(buff, sz, CERT_TYPE, &der, cm->heap, &info, &eccKey); - InitDecodedCert(&cert, der.buffer, der.length, cm->heap); - } - else - InitDecodedCert(&cert, (byte*)buff, (word32)sz, cm->heap); - - if (ret == 0) - ret = ParseCertRelative(&cert, CERT_TYPE, 1, cm); -#ifdef HAVE_CRL - if (ret == 0 && cm->crlEnabled) - ret = CheckCertCRL(cm->crl, &cert); -#endif - - FreeDecodedCert(&cert); - XFREE(der.buffer, cm->heap, DYNAMIC_TYPE_CERT); - - if (ret == 0) - return SSL_SUCCESS; - return ret; -} - - -#ifndef NO_FILESYSTEM - - #if defined(CYASSL_MDK_ARM) - extern FILE * CyaSSL_fopen(const char *name, const char *mode) ; - #define XFOPEN CyaSSL_fopen - #else - #define XFOPEN fopen - #endif - -/* process a file with name fname into ctx of format and type - userChain specifies a user certificate chain to pass during handshake */ -int ProcessFile(CYASSL_CTX* ctx, const char* fname, int format, int type, - CYASSL* ssl, int userChain, CYASSL_CRL* crl) -{ - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* myBuffer = staticBuffer; - int dynamic = 0; - int ret; - long sz = 0; - XFILE file; - void* heapHint = ctx ? ctx->heap : NULL; - - (void)crl; - (void)heapHint; - - if (fname == NULL) return SSL_BAD_FILE; - - file = XFOPEN(fname, "rb"); - if (file == XBADFILE) return SSL_BAD_FILE; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - if (sz > (long)sizeof(staticBuffer)) { - CYASSL_MSG("Getting dynamic buffer"); - myBuffer = (byte*)XMALLOC(sz, heapHint, DYNAMIC_TYPE_FILE); - if (myBuffer == NULL) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - dynamic = 1; - } - else if (sz < 0) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - - if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) - ret = SSL_BAD_FILE; - else { - if (type == CA_TYPE && format == SSL_FILETYPE_PEM) - ret = ProcessChainBuffer(ctx, myBuffer, sz, format, type, ssl); -#ifdef HAVE_CRL - else if (type == CRL_TYPE) - ret = BufferLoadCRL(crl, myBuffer, sz, format); -#endif - else - ret = ProcessBuffer(ctx, myBuffer, sz, format, type, ssl, NULL, - userChain); - } - - XFCLOSE(file); - if (dynamic) XFREE(myBuffer, heapHint, DYNAMIC_TYPE_FILE); - - return ret; -} - - -/* loads file then loads each file in path, no c_rehash */ -int CyaSSL_CTX_load_verify_locations(CYASSL_CTX* ctx, const char* file, - const char* path) -{ - int ret = SSL_SUCCESS; - - CYASSL_ENTER("CyaSSL_CTX_load_verify_locations"); - (void)path; - - if (ctx == NULL || (file == NULL && path == NULL) ) - return SSL_FAILURE; - - if (file) - ret = ProcessFile(ctx, file, SSL_FILETYPE_PEM, CA_TYPE, NULL, 0, NULL); - - if (ret == SSL_SUCCESS && path) { - /* try to load each regular file in path */ - #ifdef USE_WINDOWS_API - WIN32_FIND_DATAA FindFileData; - HANDLE hFind; - char name[MAX_FILENAME_SZ]; - - XMEMSET(name, 0, sizeof(name)); - XSTRNCPY(name, path, MAX_FILENAME_SZ - 4); - XSTRNCAT(name, "\\*", 3); - - hFind = FindFirstFileA(name, &FindFileData); - if (hFind == INVALID_HANDLE_VALUE) { - CYASSL_MSG("FindFirstFile for path verify locations failed"); - return BAD_PATH_ERROR; - } - - do { - if (FindFileData.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY) { - XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 3); - XSTRNCAT(name, "\\", 2); - XSTRNCAT(name, FindFileData.cFileName, MAX_FILENAME_SZ/2); - - ret = ProcessFile(ctx, name, SSL_FILETYPE_PEM, CA_TYPE, NULL,0, - NULL); - } - } while (ret == SSL_SUCCESS && FindNextFileA(hFind, &FindFileData)); - - FindClose(hFind); - #elif !defined(NO_CYASSL_DIR) - struct dirent* entry; - DIR* dir = opendir(path); - - if (dir == NULL) { - CYASSL_MSG("opendir path verify locations failed"); - return BAD_PATH_ERROR; - } - while ( ret == SSL_SUCCESS && (entry = readdir(dir)) != NULL) { - char name[MAX_FILENAME_SZ]; - struct stat s; - - XMEMSET(name, 0, sizeof(name)); - XSTRNCPY(name, path, MAX_FILENAME_SZ/2 - 2); - XSTRNCAT(name, "/", 1); - XSTRNCAT(name, entry->d_name, MAX_FILENAME_SZ/2); - - if (stat(name, &s) != 0) { - CYASSL_MSG("stat on name failed"); - closedir(dir); - return BAD_PATH_ERROR; - } - if (s.st_mode & S_IFREG) { - ret = ProcessFile(ctx, name, SSL_FILETYPE_PEM, CA_TYPE, NULL,0, - NULL); - } - } - closedir(dir); - #endif - } - - return ret; -} - - -/* Verify the ceritficate, SSL_SUCCESS for ok, < 0 for error */ -int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER* cm, const char* fname, - int format) -{ - int ret = SSL_FATAL_ERROR; - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* myBuffer = staticBuffer; - int dynamic = 0; - long sz = 0; - XFILE file = XFOPEN(fname, "rb"); - - CYASSL_ENTER("CyaSSL_CertManagerVerify"); - - if (file == XBADFILE) return SSL_BAD_FILE; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - if (sz > MAX_CYASSL_FILE_SIZE || sz < 0) { - CYASSL_MSG("CertManagerVerify file bad size"); - XFCLOSE(file); - return SSL_BAD_FILE; - } - - if (sz > (long)sizeof(staticBuffer)) { - CYASSL_MSG("Getting dynamic buffer"); - myBuffer = (byte*) XMALLOC(sz, cm->heap, DYNAMIC_TYPE_FILE); - if (myBuffer == NULL) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - dynamic = 1; - } - - if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) - ret = SSL_BAD_FILE; - else - ret = CyaSSL_CertManagerVerifyBuffer(cm, myBuffer, sz, format); - - XFCLOSE(file); - if (dynamic) XFREE(myBuffer, cm->heap, DYNAMIC_TYPE_FILE); - - return ret; -} - - -static INLINE CYASSL_METHOD* cm_pick_method(void) -{ - #ifndef NO_CYASSL_CLIENT - #ifdef NO_OLD_TLS - return CyaTLSv1_2_client_method(); - #else - return CyaSSLv3_client_method(); - #endif - #elif !defined(NO_CYASSL_SERVER) - #ifdef NO_OLD_TLS - return CyaTLSv1_2_server_method(); - #else - return CyaSSLv3_server_method(); - #endif - #else - return NULL; - #endif -} - - -/* like load verify locations, 1 for success, < 0 for error */ -int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER* cm, const char* file, - const char* path) -{ - int ret = SSL_FATAL_ERROR; - CYASSL_CTX* tmp; - - CYASSL_ENTER("CyaSSL_CertManagerLoadCA"); - - if (cm == NULL) { - CYASSL_MSG("No CertManager error"); - return ret; - } - tmp = CyaSSL_CTX_new(cm_pick_method()); - - if (tmp == NULL) { - CYASSL_MSG("CTX new failed"); - return ret; - } - - /* for tmp use */ - CyaSSL_CertManagerFree(tmp->cm); - tmp->cm = cm; - - ret = CyaSSL_CTX_load_verify_locations(tmp, file, path); - - /* don't loose our good one */ - tmp->cm = NULL; - CyaSSL_CTX_free(tmp); - - return ret; -} - - - -/* turn on CRL if off and compiled in, set options */ -int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER* cm, int options) -{ - int ret = SSL_SUCCESS; - - (void)options; - - CYASSL_ENTER("CyaSSL_CertManagerEnableCRL"); - if (cm == NULL) - return BAD_FUNC_ARG; - - #ifdef HAVE_CRL - if (cm->crl == NULL) { - cm->crl = (CYASSL_CRL*)XMALLOC(sizeof(CYASSL_CRL), cm->heap, - DYNAMIC_TYPE_CRL); - if (cm->crl == NULL) - return MEMORY_E; - - if (InitCRL(cm->crl, cm) != 0) { - CYASSL_MSG("Init CRL failed"); - FreeCRL(cm->crl, 1); - cm->crl = NULL; - return SSL_FAILURE; - } - } - cm->crlEnabled = 1; - if (options & CYASSL_CRL_CHECKALL) - cm->crlCheckAll = 1; - #else - ret = NOT_COMPILED_IN; - #endif - - return ret; -} - - -int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("CyaSSL_CertManagerDisableCRL"); - if (cm == NULL) - return BAD_FUNC_ARG; - - cm->crlEnabled = 0; - - return SSL_SUCCESS; -} - - -/* turn on OCSP if off and compiled in, set options */ -int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER* cm, int options) -{ - int ret = SSL_SUCCESS; - - (void)options; - - CYASSL_ENTER("CyaSSL_CertManagerEnableOCSP"); - if (cm == NULL) - return BAD_FUNC_ARG; - - #ifdef HAVE_OCSP - if (cm->ocsp == NULL) { - cm->ocsp = (CYASSL_OCSP*)XMALLOC(sizeof(CYASSL_OCSP), cm->heap, - DYNAMIC_TYPE_OCSP); - if (cm->ocsp == NULL) - return MEMORY_E; - - if (InitOCSP(cm->ocsp, cm) != 0) { - CYASSL_MSG("Init OCSP failed"); - FreeOCSP(cm->ocsp, 1); - cm->ocsp = NULL; - return SSL_FAILURE; - } - } - cm->ocspEnabled = 1; - if (options & CYASSL_OCSP_URL_OVERRIDE) - cm->ocspUseOverrideURL = 1; - if (options & CYASSL_OCSP_NO_NONCE) - cm->ocspSendNonce = 0; - else - cm->ocspSendNonce = 1; - #ifndef CYASSL_USER_IO - cm->ocspIOCb = EmbedOcspLookup; - cm->ocspRespFreeCb = EmbedOcspRespFree; - #endif /* CYASSL_USER_IO */ - #else - ret = NOT_COMPILED_IN; - #endif - - return ret; -} - - -int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER* cm) -{ - CYASSL_ENTER("CyaSSL_CertManagerDisableOCSP"); - if (cm == NULL) - return BAD_FUNC_ARG; - - cm->ocspEnabled = 0; - - return SSL_SUCCESS; -} - - -int CyaSSL_CTX_check_private_key(CYASSL_CTX* ctx) -{ - /* TODO: check private against public for RSA match */ - (void)ctx; - CYASSL_ENTER("SSL_CTX_check_private_key"); - return SSL_SUCCESS; -} - - -#ifdef HAVE_CRL - - -/* check CRL if enabled, SSL_SUCCESS */ -int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER* cm, byte* der, int sz) -{ - int ret; - DecodedCert cert; - - CYASSL_ENTER("CyaSSL_CertManagerCheckCRL"); - - if (cm == NULL) - return BAD_FUNC_ARG; - - if (cm->crlEnabled == 0) - return SSL_SUCCESS; - - InitDecodedCert(&cert, der, sz, NULL); - - ret = ParseCertRelative(&cert, CERT_TYPE, NO_VERIFY, cm); - if (ret != 0) { - CYASSL_MSG("ParseCert failed"); - return ret; - } - else { - ret = CheckCertCRL(cm->crl, &cert); - if (ret != 0) { - CYASSL_MSG("CheckCertCRL failed"); - } - } - - FreeDecodedCert(&cert); - - if (ret == 0) - return SSL_SUCCESS; /* convert */ - - return ret; -} - - -int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER* cm, CbMissingCRL cb) -{ - CYASSL_ENTER("CyaSSL_CertManagerSetCRL_Cb"); - if (cm == NULL) - return BAD_FUNC_ARG; - - cm->cbMissingCRL = cb; - - return SSL_SUCCESS; -} - - -int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER* cm, const char* path, - int type, int monitor) -{ - CYASSL_ENTER("CyaSSL_CertManagerLoadCRL"); - if (cm == NULL) - return BAD_FUNC_ARG; - - if (cm->crl == NULL) { - if (CyaSSL_CertManagerEnableCRL(cm, 0) != SSL_SUCCESS) { - CYASSL_MSG("Enable CRL failed"); - return SSL_FATAL_ERROR; - } - } - - return LoadCRL(cm->crl, path, type, monitor); -} - - -int CyaSSL_EnableCRL(CYASSL* ssl, int options) -{ - CYASSL_ENTER("CyaSSL_EnableCRL"); - if (ssl) - return CyaSSL_CertManagerEnableCRL(ssl->ctx->cm, options); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_DisableCRL(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_DisableCRL"); - if (ssl) - return CyaSSL_CertManagerDisableCRL(ssl->ctx->cm); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_LoadCRL(CYASSL* ssl, const char* path, int type, int monitor) -{ - CYASSL_ENTER("CyaSSL_LoadCRL"); - if (ssl) - return CyaSSL_CertManagerLoadCRL(ssl->ctx->cm, path, type, monitor); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_SetCRL_Cb(CYASSL* ssl, CbMissingCRL cb) -{ - CYASSL_ENTER("CyaSSL_SetCRL_Cb"); - if (ssl) - return CyaSSL_CertManagerSetCRL_Cb(ssl->ctx->cm, cb); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options) -{ - CYASSL_ENTER("CyaSSL_CTX_EnableCRL"); - if (ctx) - return CyaSSL_CertManagerEnableCRL(ctx->cm, options); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx) -{ - CYASSL_ENTER("CyaSSL_CTX_DisableCRL"); - if (ctx) - return CyaSSL_CertManagerDisableCRL(ctx->cm); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_LoadCRL(CYASSL_CTX* ctx, const char* path, int type, int monitor) -{ - CYASSL_ENTER("CyaSSL_CTX_LoadCRL"); - if (ctx) - return CyaSSL_CertManagerLoadCRL(ctx->cm, path, type, monitor); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX* ctx, CbMissingCRL cb) -{ - CYASSL_ENTER("CyaSSL_CTX_SetCRL_Cb"); - if (ctx) - return CyaSSL_CertManagerSetCRL_Cb(ctx->cm, cb); - else - return BAD_FUNC_ARG; -} - - -#endif /* HAVE_CRL */ - - -#ifdef HAVE_OCSP - - -/* check CRL if enabled, SSL_SUCCESS */ -int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER* cm, byte* der, int sz) -{ - int ret; - DecodedCert cert; - - CYASSL_ENTER("CyaSSL_CertManagerCheckOCSP"); - - if (cm == NULL) - return BAD_FUNC_ARG; - - if (cm->ocspEnabled == 0) - return SSL_SUCCESS; - - InitDecodedCert(&cert, der, sz, NULL); - - ret = ParseCertRelative(&cert, CERT_TYPE, NO_VERIFY, cm); - if (ret != 0) { - CYASSL_MSG("ParseCert failed"); - return ret; - } - else { - ret = CheckCertOCSP(cm->ocsp, &cert); - if (ret != 0) { - CYASSL_MSG("CheckCertOCSP failed"); - } - } - - FreeDecodedCert(&cert); - - if (ret == 0) - return SSL_SUCCESS; /* convert */ - - return ret; -} - - -int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER* cm, - const char* url) -{ - CYASSL_ENTER("CyaSSL_CertManagerSetOCSPOverrideURL"); - if (cm == NULL) - return BAD_FUNC_ARG; - - XFREE(cm->ocspOverrideURL, cm->heap, 0); - if (url != NULL) { - int urlSz = (int)XSTRLEN(url) + 1; - cm->ocspOverrideURL = (char*)XMALLOC(urlSz, cm->heap, 0); - if (cm->ocspOverrideURL != NULL) { - XMEMCPY(cm->ocspOverrideURL, url, urlSz); - } - else - return MEMORY_E; - } - else - cm->ocspOverrideURL = NULL; - - return SSL_SUCCESS; -} - - -int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER* cm, - CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) -{ - CYASSL_ENTER("CyaSSL_CertManagerSetOCSP_Cb"); - if (cm == NULL) - return BAD_FUNC_ARG; - - cm->ocspIOCb = ioCb; - cm->ocspRespFreeCb = respFreeCb; - cm->ocspIOCtx = ioCbCtx; - - return SSL_SUCCESS; -} - - -int CyaSSL_EnableOCSP(CYASSL* ssl, int options) -{ - CYASSL_ENTER("CyaSSL_EnableOCSP"); - if (ssl) - return CyaSSL_CertManagerEnableOCSP(ssl->ctx->cm, options); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_DisableOCSP(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_DisableOCSP"); - if (ssl) - return CyaSSL_CertManagerDisableOCSP(ssl->ctx->cm); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_SetOCSP_OverrideURL(CYASSL* ssl, const char* url) -{ - CYASSL_ENTER("CyaSSL_SetOCSP_OverrideURL"); - if (ssl) - return CyaSSL_CertManagerSetOCSPOverrideURL(ssl->ctx->cm, url); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_SetOCSP_Cb(CYASSL* ssl, - CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) -{ - CYASSL_ENTER("CyaSSL_SetOCSP_Cb"); - if (ssl) - return CyaSSL_CertManagerSetOCSP_Cb(ssl->ctx->cm, - ioCb, respFreeCb, ioCbCtx); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_EnableOCSP(CYASSL_CTX* ctx, int options) -{ - CYASSL_ENTER("CyaSSL_CTX_EnableOCSP"); - if (ctx) - return CyaSSL_CertManagerEnableOCSP(ctx->cm, options); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_DisableOCSP(CYASSL_CTX* ctx) -{ - CYASSL_ENTER("CyaSSL_CTX_DisableOCSP"); - if (ctx) - return CyaSSL_CertManagerDisableOCSP(ctx->cm); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX* ctx, const char* url) -{ - CYASSL_ENTER("CyaSSL_SetOCSP_OverrideURL"); - if (ctx) - return CyaSSL_CertManagerSetOCSPOverrideURL(ctx->cm, url); - else - return BAD_FUNC_ARG; -} - - -int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX* ctx, - CbOCSPIO ioCb, CbOCSPRespFree respFreeCb, void* ioCbCtx) -{ - CYASSL_ENTER("CyaSSL_CTX_SetOCSP_Cb"); - if (ctx) - return CyaSSL_CertManagerSetOCSP_Cb(ctx->cm, ioCb, respFreeCb, ioCbCtx); - else - return BAD_FUNC_ARG; -} - - -#endif /* HAVE_OCSP */ - - -#ifdef CYASSL_DER_LOAD - -/* Add format parameter to allow DER load of CA files */ -int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX* ctx, const char* file, - int format) -{ - CYASSL_ENTER("CyaSSL_CTX_der_load_verify_locations"); - if (ctx == NULL || file == NULL) - return SSL_FAILURE; - - if (ProcessFile(ctx, file, format, CA_TYPE, NULL, 0, NULL) == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - -#endif /* CYASSL_DER_LOAD */ - - -#ifdef CYASSL_CERT_GEN - -/* load pem cert from file into der buffer, return der size or error */ -int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) -{ - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* fileBuf = staticBuffer; - int dynamic = 0; - int ret; - int ecc = 0; - long sz = 0; - XFILE file = XFOPEN(fileName, "rb"); - EncryptedInfo info; - buffer converted; - - CYASSL_ENTER("CyaSSL_PemCertToDer"); - converted.buffer = 0; - - if (file == XBADFILE) return SSL_BAD_FILE; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - if (sz > (long)sizeof(staticBuffer)) { - fileBuf = (byte*) XMALLOC(sz, 0, DYNAMIC_TYPE_FILE); - if (fileBuf == NULL) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - dynamic = 1; - } - else if (sz < 0) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - - if ( (ret = (int)XFREAD(fileBuf, sz, 1, file)) < 0) - ret = SSL_BAD_FILE; - else - ret = PemToDer(fileBuf, sz, CA_TYPE, &converted, 0, &info, &ecc); - - if (ret == 0) { - if (converted.length < (word32)derSz) { - XMEMCPY(derBuf, converted.buffer, converted.length); - ret = converted.length; - } - else - ret = BUFFER_E; - } - - XFREE(converted.buffer, 0, DYNAMIC_TYPE_CA); - if (dynamic) - XFREE(fileBuf, 0, DYNAMIC_TYPE_FILE); - XFCLOSE(file); - - return ret; -} - -#endif /* CYASSL_CERT_GEN */ - - -int CyaSSL_CTX_use_certificate_file(CYASSL_CTX* ctx, const char* file, - int format) -{ - CYASSL_ENTER("CyaSSL_CTX_use_certificate_file"); - if (ProcessFile(ctx, file, format, CERT_TYPE, NULL, 0, NULL) == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX* ctx, const char* file,int format) -{ - CYASSL_ENTER("CyaSSL_CTX_use_PrivateKey_file"); - if (ProcessFile(ctx, file, format, PRIVATEKEY_TYPE, NULL, 0, NULL) - == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX* ctx, const char* file) -{ - /* procces up to MAX_CHAIN_DEPTH plus subject cert */ - CYASSL_ENTER("CyaSSL_CTX_use_certificate_chain_file"); - if (ProcessFile(ctx, file, SSL_FILETYPE_PEM,CERT_TYPE,NULL,1, NULL) - == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -#ifdef OPENSSL_EXTRA -/* put SSL type in extra for now, not very common */ - -int CyaSSL_use_certificate_file(CYASSL* ssl, const char* file, int format) -{ - CYASSL_ENTER("CyaSSL_use_certificate_file"); - if (ProcessFile(ssl->ctx, file, format, CERT_TYPE, ssl, 0, NULL) - == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -int CyaSSL_use_PrivateKey_file(CYASSL* ssl, const char* file, int format) -{ - CYASSL_ENTER("CyaSSL_use_PrivateKey_file"); - if (ProcessFile(ssl->ctx, file, format, PRIVATEKEY_TYPE, ssl, 0, NULL) - == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -int CyaSSL_use_certificate_chain_file(CYASSL* ssl, const char* file) -{ - /* procces up to MAX_CHAIN_DEPTH plus subject cert */ - CYASSL_ENTER("CyaSSL_use_certificate_chain_file"); - if (ProcessFile(ssl->ctx, file, SSL_FILETYPE_PEM, CERT_TYPE, ssl, 1, NULL) - == SSL_SUCCESS) - return SSL_SUCCESS; - - return SSL_FAILURE; -} - - -/* server wrapper for ctx or ssl Diffie-Hellman parameters */ -static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl, - const unsigned char* buf, long sz, int format) -{ - buffer der; - int ret; - int weOwnDer = 0; - byte p[MAX_DH_SIZE]; - byte g[MAX_DH_SIZE]; - word32 pSz = sizeof(p); - word32 gSz = sizeof(g); - - der.buffer = (byte*)buf; - der.length = (word32)sz; - - if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) - return SSL_BAD_FILETYPE; - - if (format == SSL_FILETYPE_PEM) { - der.buffer = NULL; - ret = PemToDer(buf, sz, DH_PARAM_TYPE, &der, ctx->heap, NULL,NULL); - if (ret < 0) { - XFREE(der.buffer, ctx->heap, DYNAMIC_TYPE_KEY); - return ret; - } - weOwnDer = 1; - } - - if (DhParamsLoad(der.buffer, der.length, p, &pSz, g, &gSz) < 0) - ret = SSL_BAD_FILETYPE; - else { - if (ssl) - ret = CyaSSL_SetTmpDH(ssl, p, pSz, g, gSz); - else - ret = CyaSSL_CTX_SetTmpDH(ctx, p, pSz, g, gSz); - } - - if (weOwnDer) - XFREE(der.buffer, ctx->heap, DYNAMIC_TYPE_KEY); - - return ret; -} - -/* server Diffie-Hellman parameters, SSL_SUCCESS on ok */ -int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, const unsigned char* buf, long sz, - int format) -{ - return CyaSSL_SetTmpDH_buffer_wrapper(ssl->ctx, ssl, buf, sz, format); -} - - -/* server ctx Diffie-Hellman parameters, SSL_SUCCESS on ok */ -int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, const unsigned char* buf, - long sz, int format) -{ - return CyaSSL_SetTmpDH_buffer_wrapper(ctx, NULL, buf, sz, format); -} - - -#ifdef HAVE_ECC - -/* Set Temp CTX EC-DHE size in octets, should be 20 - 66 for 160 - 521 bit */ -int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX* ctx, word16 sz) -{ - if (ctx == NULL || sz < ECC_MINSIZE || sz > ECC_MAXSIZE) - return BAD_FUNC_ARG; - - ctx->eccTempKeySz = sz; - - return SSL_SUCCESS; -} - - -/* Set Temp SSL EC-DHE size in octets, should be 20 - 66 for 160 - 521 bit */ -int CyaSSL_SetTmpEC_DHE_Sz(CYASSL* ssl, word16 sz) -{ - if (ssl == NULL || sz < ECC_MINSIZE || sz > ECC_MAXSIZE) - return BAD_FUNC_ARG; - - ssl->eccTempKeySz = sz; - - return SSL_SUCCESS; -} - -#endif /* HAVE_ECC */ - - -#if !defined(NO_FILESYSTEM) - -/* server Diffie-Hellman parameters */ -static int CyaSSL_SetTmpDH_file_wrapper(CYASSL_CTX* ctx, CYASSL* ssl, - const char* fname, int format) -{ - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* myBuffer = staticBuffer; - int dynamic = 0; - int ret; - long sz = 0; - XFILE file = XFOPEN(fname, "rb"); - - if (file == XBADFILE) return SSL_BAD_FILE; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - if (sz > (long)sizeof(staticBuffer)) { - CYASSL_MSG("Getting dynamic buffer"); - myBuffer = (byte*) XMALLOC(sz, ctx->heap, DYNAMIC_TYPE_FILE); - if (myBuffer == NULL) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - dynamic = 1; - } - else if (sz < 0) { - XFCLOSE(file); - return SSL_BAD_FILE; - } - - if ( (ret = (int)XFREAD(myBuffer, sz, 1, file)) < 0) - ret = SSL_BAD_FILE; - else { - if (ssl) - ret = CyaSSL_SetTmpDH_buffer(ssl, myBuffer, sz, format); - else - ret = CyaSSL_CTX_SetTmpDH_buffer(ctx, myBuffer, sz, format); - } - - XFCLOSE(file); - if (dynamic) XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE); - - return ret; -} - -/* server Diffie-Hellman parameters */ -int CyaSSL_SetTmpDH_file(CYASSL* ssl, const char* fname, int format) -{ - return CyaSSL_SetTmpDH_file_wrapper(ssl->ctx, ssl, fname, format); -} - - -/* server Diffie-Hellman parameters */ -int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX* ctx, const char* fname, int format) -{ - return CyaSSL_SetTmpDH_file_wrapper(ctx, NULL, fname, format); -} - - -#endif /* !NO_FILESYSTEM */ -#endif /* OPENSSL_EXTRA */ - -#ifdef HAVE_NTRU - -int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX* ctx, const char* file) -{ - CYASSL_ENTER("CyaSSL_CTX_use_NTRUPrivateKey_file"); - if (ctx == NULL) - return SSL_FAILURE; - - if (ProcessFile(ctx, file, SSL_FILETYPE_RAW, PRIVATEKEY_TYPE, NULL, 0, NULL) - == SSL_SUCCESS) { - ctx->haveNTRU = 1; - return SSL_SUCCESS; - } - - return SSL_FAILURE; -} - -#endif /* HAVE_NTRU */ - - - -#if defined(OPENSSL_EXTRA) - - int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX* ctx,const char* file, - int format) - { - CYASSL_ENTER("SSL_CTX_use_RSAPrivateKey_file"); - - return CyaSSL_CTX_use_PrivateKey_file(ctx, file, format); - } - - int CyaSSL_use_RSAPrivateKey_file(CYASSL* ssl, const char* file, int format) - { - CYASSL_ENTER("CyaSSL_use_RSAPrivateKey_file"); - - return CyaSSL_use_PrivateKey_file(ssl, file, format); - } - -#endif /* OPENSSL_EXTRA */ - -#endif /* NO_FILESYSTEM */ - - -void CyaSSL_CTX_set_verify(CYASSL_CTX* ctx, int mode, VerifyCallback vc) -{ - CYASSL_ENTER("CyaSSL_CTX_set_verify"); - if (mode & SSL_VERIFY_PEER) { - ctx->verifyPeer = 1; - ctx->verifyNone = 0; /* in case perviously set */ - } - - if (mode == SSL_VERIFY_NONE) { - ctx->verifyNone = 1; - ctx->verifyPeer = 0; /* in case previously set */ - } - - if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - ctx->failNoCert = 1; - - ctx->verifyCallback = vc; -} - - -void CyaSSL_set_verify(CYASSL* ssl, int mode, VerifyCallback vc) -{ - CYASSL_ENTER("CyaSSL_set_verify"); - if (mode & SSL_VERIFY_PEER) { - ssl->options.verifyPeer = 1; - ssl->options.verifyNone = 0; /* in case perviously set */ - } - - if (mode == SSL_VERIFY_NONE) { - ssl->options.verifyNone = 1; - ssl->options.verifyPeer = 0; /* in case previously set */ - } - - if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - ssl->options.failNoCert = 1; - - ssl->verifyCallback = vc; -} - - -/* store user ctx for verify callback */ -void CyaSSL_SetCertCbCtx(CYASSL* ssl, void* ctx) -{ - CYASSL_ENTER("CyaSSL_SetCertCbCtx"); - if (ssl) - ssl->verifyCbCtx = ctx; -} - - -/* store context CA Cache addition callback */ -void CyaSSL_CTX_SetCACb(CYASSL_CTX* ctx, CallbackCACache cb) -{ - if (ctx && ctx->cm) - ctx->cm->caCacheCallback = cb; -} - - -#if defined(PERSIST_CERT_CACHE) - -#if !defined(NO_FILESYSTEM) - -/* Persist cert cache to file */ -int CyaSSL_CTX_save_cert_cache(CYASSL_CTX* ctx, const char* fname) -{ - CYASSL_ENTER("CyaSSL_CTX_save_cert_cache"); - - if (ctx == NULL || fname == NULL) - return BAD_FUNC_ARG; - - return CM_SaveCertCache(ctx->cm, fname); -} - - -/* Persist cert cache from file */ -int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX* ctx, const char* fname) -{ - CYASSL_ENTER("CyaSSL_CTX_restore_cert_cache"); - - if (ctx == NULL || fname == NULL) - return BAD_FUNC_ARG; - - return CM_RestoreCertCache(ctx->cm, fname); -} - -#endif /* NO_FILESYSTEM */ - -/* Persist cert cache to memory */ -int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX* ctx, void* mem, int sz, int* used) -{ - CYASSL_ENTER("CyaSSL_CTX_memsave_cert_cache"); - - if (ctx == NULL || mem == NULL || used == NULL || sz <= 0) - return BAD_FUNC_ARG; - - return CM_MemSaveCertCache(ctx->cm, mem, sz, used); -} - - -/* Restore cert cache from memory */ -int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX* ctx, const void* mem, int sz) -{ - CYASSL_ENTER("CyaSSL_CTX_memrestore_cert_cache"); - - if (ctx == NULL || mem == NULL || sz <= 0) - return BAD_FUNC_ARG; - - return CM_MemRestoreCertCache(ctx->cm, mem, sz); -} - - -/* get how big the the cert cache save buffer needs to be */ -int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX* ctx) -{ - CYASSL_ENTER("CyaSSL_CTX_get_cert_cache_memsize"); - - if (ctx == NULL) - return BAD_FUNC_ARG; - - return CM_GetCertCacheMemSize(ctx->cm); -} - -#endif /* PERSISTE_CERT_CACHE */ -#endif /* !NO_CERTS */ - - -#ifndef NO_SESSION_CACHE - -CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl) -{ - CYASSL_ENTER("SSL_get_session"); - if (ssl) - return GetSession(ssl, 0); - - return NULL; -} - - -int CyaSSL_set_session(CYASSL* ssl, CYASSL_SESSION* session) -{ - CYASSL_ENTER("SSL_set_session"); - if (session) - return SetSession(ssl, session); - - return SSL_FAILURE; -} - - -#ifndef NO_CLIENT_CACHE - -/* Associate client session with serverID, find existing or store for saving - if newSession flag on, don't reuse existing session - SSL_SUCCESS on ok */ -int CyaSSL_SetServerID(CYASSL* ssl, const byte* id, int len, int newSession) -{ - CYASSL_SESSION* session = NULL; - - CYASSL_ENTER("CyaSSL_SetServerID"); - - if (ssl == NULL || id == NULL || len <= 0) - return BAD_FUNC_ARG; - - if (newSession == 0) { - session = GetSessionClient(ssl, id, len); - if (session) { - if (SetSession(ssl, session) != SSL_SUCCESS) { - CYASSL_MSG("SetSession failed"); - session = NULL; - } - } - } - - if (session == NULL) { - CYASSL_MSG("Valid ServerID not cached already"); - - ssl->session.idLen = (word16)min(SERVER_ID_LEN, (word32)len); - XMEMCPY(ssl->session.serverID, id, ssl->session.idLen); - } - - return SSL_SUCCESS; -} - -#endif /* NO_CLIENT_CACHE */ - -#if defined(PERSIST_SESSION_CACHE) - -/* for persistance, if changes to layout need to increment and modify - save_session_cache() and restore_session_cache and memory versions too */ -#define CYASSL_CACHE_VERSION 2 - -/* Session Cache Header information */ -typedef struct { - int version; /* cache layout version id */ - int rows; /* session rows */ - int columns; /* session columns */ - int sessionSz; /* sizeof CYASSL_SESSION */ -} cache_header_t; - -/* current persistence layout is: - - 1) cache_header_t - 2) SessionCache - 3) ClientCache - - update CYASSL_CACHE_VERSION if change layout for the following - PERSISTENT_SESSION_CACHE functions -*/ - - -/* get how big the the session cache save buffer needs to be */ -int CyaSSL_get_session_cache_memsize(void) -{ - int sz = (int)(sizeof(SessionCache) + sizeof(cache_header_t)); - - #ifndef NO_CLIENT_CACHE - sz += (int)(sizeof(ClientCache)); - #endif - - return sz; -} - - -/* Persist session cache to memory */ -int CyaSSL_memsave_session_cache(void* mem, int sz) -{ - int i; - cache_header_t cache_header; - SessionRow* row = (SessionRow*)((byte*)mem + sizeof(cache_header)); -#ifndef NO_CLIENT_CACHE - ClientRow* clRow; -#endif - - CYASSL_ENTER("CyaSSL_memsave_session_cache"); - - if (sz < CyaSSL_get_session_cache_memsize()) { - CYASSL_MSG("Memory buffer too small"); - return BUFFER_E; - } - - cache_header.version = CYASSL_CACHE_VERSION; - cache_header.rows = SESSION_ROWS; - cache_header.columns = SESSIONS_PER_ROW; - cache_header.sessionSz = (int)sizeof(CYASSL_SESSION); - XMEMCPY(mem, &cache_header, sizeof(cache_header)); - - if (LockMutex(&session_mutex) != 0) { - CYASSL_MSG("Session cache mutex lock failed"); - return BAD_MUTEX_E; - } - - for (i = 0; i < cache_header.rows; ++i) - XMEMCPY(row++, SessionCache + i, sizeof(SessionRow)); - -#ifndef NO_CLIENT_CACHE - clRow = (ClientRow*)row; - for (i = 0; i < cache_header.rows; ++i) - XMEMCPY(clRow++, ClientCache + i, sizeof(ClientRow)); -#endif - - UnLockMutex(&session_mutex); - - CYASSL_LEAVE("CyaSSL_memsave_session_cache", SSL_SUCCESS); - - return SSL_SUCCESS; -} - - -/* Restore the persistant session cache from memory */ -int CyaSSL_memrestore_session_cache(const void* mem, int sz) -{ - int i; - cache_header_t cache_header; - SessionRow* row = (SessionRow*)((byte*)mem + sizeof(cache_header)); -#ifndef NO_CLIENT_CACHE - ClientRow* clRow; -#endif - - CYASSL_ENTER("CyaSSL_memrestore_session_cache"); - - if (sz < CyaSSL_get_session_cache_memsize()) { - CYASSL_MSG("Memory buffer too small"); - return BUFFER_E; - } - - XMEMCPY(&cache_header, mem, sizeof(cache_header)); - if (cache_header.version != CYASSL_CACHE_VERSION || - cache_header.rows != SESSION_ROWS || - cache_header.columns != SESSIONS_PER_ROW || - cache_header.sessionSz != (int)sizeof(CYASSL_SESSION)) { - - CYASSL_MSG("Session cache header match failed"); - return CACHE_MATCH_ERROR; - } - - if (LockMutex(&session_mutex) != 0) { - CYASSL_MSG("Session cache mutex lock failed"); - return BAD_MUTEX_E; - } - - for (i = 0; i < cache_header.rows; ++i) - XMEMCPY(SessionCache + i, row++, sizeof(SessionRow)); - -#ifndef NO_CLIENT_CACHE - clRow = (ClientRow*)row; - for (i = 0; i < cache_header.rows; ++i) - XMEMCPY(ClientCache + i, clRow++, sizeof(ClientRow)); -#endif - - UnLockMutex(&session_mutex); - - CYASSL_LEAVE("CyaSSL_memrestore_session_cache", SSL_SUCCESS); - - return SSL_SUCCESS; -} - -#if !defined(NO_FILESYSTEM) - -/* Persist session cache to file */ -/* doesn't use memsave because of additional memory use */ -int CyaSSL_save_session_cache(const char *fname) -{ - XFILE file; - int ret; - int rc = SSL_SUCCESS; - int i; - cache_header_t cache_header; - - CYASSL_ENTER("CyaSSL_save_session_cache"); - - file = XFOPEN(fname, "w+b"); - if (file == XBADFILE) { - CYASSL_MSG("Couldn't open session cache save file"); - return SSL_BAD_FILE; - } - cache_header.version = CYASSL_CACHE_VERSION; - cache_header.rows = SESSION_ROWS; - cache_header.columns = SESSIONS_PER_ROW; - cache_header.sessionSz = (int)sizeof(CYASSL_SESSION); - - /* cache header */ - ret = (int)XFWRITE(&cache_header, sizeof cache_header, 1, file); - if (ret != 1) { - CYASSL_MSG("Session cache header file write failed"); - XFCLOSE(file); - return FWRITE_ERROR; - } - - if (LockMutex(&session_mutex) != 0) { - CYASSL_MSG("Session cache mutex lock failed"); - XFCLOSE(file); - return BAD_MUTEX_E; - } - - /* session cache */ - for (i = 0; i < cache_header.rows; ++i) { - ret = (int)XFWRITE(SessionCache + i, sizeof(SessionRow), 1, file); - if (ret != 1) { - CYASSL_MSG("Session cache member file write failed"); - rc = FWRITE_ERROR; - break; - } - } - -#ifndef NO_CLIENT_CACHE - /* client cache */ - for (i = 0; i < cache_header.rows; ++i) { - ret = (int)XFWRITE(ClientCache + i, sizeof(ClientRow), 1, file); - if (ret != 1) { - CYASSL_MSG("Client cache member file write failed"); - rc = FWRITE_ERROR; - break; - } - } -#endif /* NO_CLIENT_CACHE */ - - UnLockMutex(&session_mutex); - - XFCLOSE(file); - CYASSL_LEAVE("CyaSSL_save_session_cache", rc); - - return rc; -} - - -/* Restore the persistant session cache from file */ -/* doesn't use memstore because of additional memory use */ -int CyaSSL_restore_session_cache(const char *fname) -{ - XFILE file; - int rc = SSL_SUCCESS; - int ret; - int i; - cache_header_t cache_header; - - CYASSL_ENTER("CyaSSL_restore_session_cache"); - - file = XFOPEN(fname, "rb"); - if (file == XBADFILE) { - CYASSL_MSG("Couldn't open session cache save file"); - return SSL_BAD_FILE; - } - /* cache header */ - ret = (int)XFREAD(&cache_header, sizeof cache_header, 1, file); - if (ret != 1) { - CYASSL_MSG("Session cache header file read failed"); - XFCLOSE(file); - return FREAD_ERROR; - } - if (cache_header.version != CYASSL_CACHE_VERSION || - cache_header.rows != SESSION_ROWS || - cache_header.columns != SESSIONS_PER_ROW || - cache_header.sessionSz != (int)sizeof(CYASSL_SESSION)) { - - CYASSL_MSG("Session cache header match failed"); - XFCLOSE(file); - return CACHE_MATCH_ERROR; - } - - if (LockMutex(&session_mutex) != 0) { - CYASSL_MSG("Session cache mutex lock failed"); - XFCLOSE(file); - return BAD_MUTEX_E; - } - - /* session cache */ - for (i = 0; i < cache_header.rows; ++i) { - ret = (int)XFREAD(SessionCache + i, sizeof(SessionRow), 1, file); - if (ret != 1) { - CYASSL_MSG("Session cache member file read failed"); - XMEMSET(SessionCache, 0, sizeof SessionCache); - rc = FREAD_ERROR; - break; - } - } - -#ifndef NO_CLIENT_CACHE - /* client cache */ - for (i = 0; i < cache_header.rows; ++i) { - ret = (int)XFREAD(ClientCache + i, sizeof(ClientRow), 1, file); - if (ret != 1) { - CYASSL_MSG("Client cache member file read failed"); - XMEMSET(ClientCache, 0, sizeof ClientCache); - rc = FREAD_ERROR; - break; - } - } - -#endif /* NO_CLIENT_CACHE */ - - UnLockMutex(&session_mutex); - - XFCLOSE(file); - CYASSL_LEAVE("CyaSSL_restore_session_cache", rc); - - return rc; -} - -#endif /* !NO_FILESYSTEM */ -#endif /* PERSIST_SESSION_CACHE */ -#endif /* NO_SESSION_CACHE */ - - -void CyaSSL_load_error_strings(void) /* compatibility only */ -{} - - -int CyaSSL_library_init(void) -{ - CYASSL_ENTER("SSL_library_init"); - if (CyaSSL_Init() == SSL_SUCCESS) - return SSL_SUCCESS; - else - return SSL_FATAL_ERROR; -} - - -#ifndef NO_SESSION_CACHE - -/* on by default if built in but allow user to turn off */ -long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX* ctx, long mode) -{ - CYASSL_ENTER("SSL_CTX_set_session_cache_mode"); - if (mode == SSL_SESS_CACHE_OFF) - ctx->sessionCacheOff = 1; - - if (mode == SSL_SESS_CACHE_NO_AUTO_CLEAR) - ctx->sessionCacheFlushOff = 1; - - return SSL_SUCCESS; -} - -#endif /* NO_SESSION_CACHE */ - - -#if !defined(NO_CERTS) -#if defined(PERSIST_CERT_CACHE) - - -#define CYASSL_CACHE_CERT_VERSION 1 - -typedef struct { - int version; /* cache cert layout version id */ - int rows; /* hash table rows, CA_TABLE_SIZE */ - int columns[CA_TABLE_SIZE]; /* columns per row on list */ - int signerSz; /* sizeof Signer object */ -} CertCacheHeader; - -/* current cert persistance layout is: - - 1) CertCacheHeader - 2) caTable - - update CYASSL_CERT_CACHE_VERSION if change layout for the following - PERSIST_CERT_CACHE functions -*/ - - -/* Return memory needed to persist this signer, have lock */ -static INLINE int GetSignerMemory(Signer* signer) -{ - int sz = sizeof(signer->pubKeySize) + sizeof(signer->keyOID) - + sizeof(signer->nameLen) + sizeof(signer->subjectNameHash); - -#if !defined(NO_SKID) - sz += (int)sizeof(signer->subjectKeyIdHash); -#endif - - /* add dynamic bytes needed */ - sz += signer->pubKeySize; - sz += signer->nameLen; - - return sz; -} - - -/* Return memory needed to persist this row, have lock */ -static INLINE int GetCertCacheRowMemory(Signer* row) -{ - int sz = 0; - - while (row) { - sz += GetSignerMemory(row); - row = row->next; - } - - return sz; -} - - -/* get the size of persist cert cache, have lock */ -static INLINE int GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm) -{ - int sz; - int i; - - sz = sizeof(CertCacheHeader); - - for (i = 0; i < CA_TABLE_SIZE; i++) - sz += GetCertCacheRowMemory(cm->caTable[i]); - - return sz; -} - - -/* Store cert cache header columns with number of items per list, have lock */ -static INLINE void SetCertHeaderColumns(CYASSL_CERT_MANAGER* cm, int* columns) -{ - int i; - Signer* row; - - for (i = 0; i < CA_TABLE_SIZE; i++) { - int count = 0; - row = cm->caTable[i]; - - while (row) { - ++count; - row = row->next; - } - columns[i] = count; - } -} - - -/* Restore whole cert row from memory, have lock, return bytes consumed, - < 0 on error, have lock */ -static INLINE int RestoreCertRow(CYASSL_CERT_MANAGER* cm, byte* current, - int row, int listSz, const byte* end) -{ - int idx = 0; - - if (listSz < 0) { - CYASSL_MSG("Row header corrupted, negative value"); - return PARSE_ERROR; - } - - while (listSz) { - Signer* signer; - byte* start = current + idx; /* for end checks on this signer */ - int minSz = sizeof(signer->pubKeySize) + sizeof(signer->keyOID) + - sizeof(signer->nameLen) + sizeof(signer->subjectNameHash); - #ifndef NO_SKID - minSz += (int)sizeof(signer->subjectKeyIdHash); - #endif - - if (start + minSz > end) { - CYASSL_MSG("Would overread restore buffer"); - return BUFFER_E; - } - signer = MakeSigner(cm->heap); - if (signer == NULL) - return MEMORY_E; - - /* pubKeySize */ - XMEMCPY(&signer->pubKeySize, current + idx, sizeof(signer->pubKeySize)); - idx += (int)sizeof(signer->pubKeySize); - - /* keyOID */ - XMEMCPY(&signer->keyOID, current + idx, sizeof(signer->keyOID)); - idx += (int)sizeof(signer->keyOID); - - /* pulicKey */ - if (start + minSz + signer->pubKeySize > end) { - CYASSL_MSG("Would overread restore buffer"); - FreeSigner(signer, cm->heap); - return BUFFER_E; - } - signer->publicKey = (byte*)XMALLOC(signer->pubKeySize, cm->heap, - DYNAMIC_TYPE_KEY); - if (signer->publicKey == NULL) { - FreeSigner(signer, cm->heap); - return MEMORY_E; - } - - XMEMCPY(signer->publicKey, current + idx, signer->pubKeySize); - idx += signer->pubKeySize; - - /* nameLen */ - XMEMCPY(&signer->nameLen, current + idx, sizeof(signer->nameLen)); - idx += (int)sizeof(signer->nameLen); - - /* name */ - if (start + minSz + signer->pubKeySize + signer->nameLen > end) { - CYASSL_MSG("Would overread restore buffer"); - FreeSigner(signer, cm->heap); - return BUFFER_E; - } - signer->name = (char*)XMALLOC(signer->nameLen, cm->heap, - DYNAMIC_TYPE_SUBJECT_CN); - if (signer->name == NULL) { - FreeSigner(signer, cm->heap); - return MEMORY_E; - } - - XMEMCPY(signer->name, current + idx, signer->nameLen); - idx += signer->nameLen; - - /* subjectNameHash */ - XMEMCPY(signer->subjectNameHash, current + idx, SIGNER_DIGEST_SIZE); - idx += SIGNER_DIGEST_SIZE; - - #ifndef NO_SKID - /* subjectKeyIdHash */ - XMEMCPY(signer->subjectKeyIdHash, current + idx,SIGNER_DIGEST_SIZE); - idx += SIGNER_DIGEST_SIZE; - #endif - - signer->next = cm->caTable[row]; - cm->caTable[row] = signer; - - --listSz; - } - - return idx; -} - - -/* Store whole cert row into memory, have lock, return bytes added */ -static INLINE int StoreCertRow(CYASSL_CERT_MANAGER* cm, byte* current, int row) -{ - int added = 0; - Signer* list = cm->caTable[row]; - - while (list) { - XMEMCPY(current + added, &list->pubKeySize, sizeof(list->pubKeySize)); - added += (int)sizeof(list->pubKeySize); - - XMEMCPY(current + added, &list->keyOID, sizeof(list->keyOID)); - added += (int)sizeof(list->keyOID); - - XMEMCPY(current + added, list->publicKey, list->pubKeySize); - added += list->pubKeySize; - - XMEMCPY(current + added, &list->nameLen, sizeof(list->nameLen)); - added += (int)sizeof(list->nameLen); - - XMEMCPY(current + added, list->name, list->nameLen); - added += list->nameLen; - - XMEMCPY(current + added, list->subjectNameHash, SIGNER_DIGEST_SIZE); - added += SIGNER_DIGEST_SIZE; - - #ifndef NO_SKID - XMEMCPY(current + added, list->subjectKeyIdHash,SIGNER_DIGEST_SIZE); - added += SIGNER_DIGEST_SIZE; - #endif - - list = list->next; - } - - return added; -} - - -/* Persist cert cache to memory, have lock */ -static INLINE int DoMemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz) -{ - int realSz; - int ret = SSL_SUCCESS; - int i; - - CYASSL_ENTER("DoMemSaveCertCache"); - - realSz = GetCertCacheMemSize(cm); - if (realSz > sz) { - CYASSL_MSG("Mem output buffer too small"); - ret = BUFFER_E; - } - else { - byte* current; - CertCacheHeader hdr; - - hdr.version = CYASSL_CACHE_CERT_VERSION; - hdr.rows = CA_TABLE_SIZE; - SetCertHeaderColumns(cm, hdr.columns); - hdr.signerSz = (int)sizeof(Signer); - - XMEMCPY(mem, &hdr, sizeof(CertCacheHeader)); - current = (byte*)mem + sizeof(CertCacheHeader); - - for (i = 0; i < CA_TABLE_SIZE; ++i) - current += StoreCertRow(cm, current, i); - } - - return ret; -} - - -#if !defined(NO_FILESYSTEM) - -/* Persist cert cache to file */ -int CM_SaveCertCache(CYASSL_CERT_MANAGER* cm, const char* fname) -{ - XFILE file; - int rc = SSL_SUCCESS; - int memSz; - byte* mem; - - CYASSL_ENTER("CM_SaveCertCache"); - - file = XFOPEN(fname, "w+b"); - if (file == XBADFILE) { - CYASSL_MSG("Couldn't open cert cache save file"); - return SSL_BAD_FILE; - } - - if (LockMutex(&cm->caLock) != 0) { - CYASSL_MSG("LockMutex on caLock failed"); - XFCLOSE(file); - return BAD_MUTEX_E; - } - - memSz = GetCertCacheMemSize(cm); - mem = (byte*)XMALLOC(memSz, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); - if (mem == NULL) { - CYASSL_MSG("Alloc for tmp buffer failed"); - rc = MEMORY_E; - } else { - rc = DoMemSaveCertCache(cm, mem, memSz); - if (rc == SSL_SUCCESS) { - int ret = (int)XFWRITE(mem, memSz, 1, file); - if (ret != 1) { - CYASSL_MSG("Cert cache file write failed"); - rc = FWRITE_ERROR; - } - } - XFREE(mem, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); - } - - UnLockMutex(&cm->caLock); - XFCLOSE(file); - - return rc; -} - - -/* Restore cert cache from file */ -int CM_RestoreCertCache(CYASSL_CERT_MANAGER* cm, const char* fname) -{ - XFILE file; - int rc = SSL_SUCCESS; - int ret; - int memSz; - byte* mem; - - CYASSL_ENTER("CM_RestoreCertCache"); - - file = XFOPEN(fname, "rb"); - if (file == XBADFILE) { - CYASSL_MSG("Couldn't open cert cache save file"); - return SSL_BAD_FILE; - } - - XFSEEK(file, 0, XSEEK_END); - memSz = (int)XFTELL(file); - XREWIND(file); - - if (memSz <= 0) { - CYASSL_MSG("Bad file size"); - XFCLOSE(file); - return SSL_BAD_FILE; - } - - mem = (byte*)XMALLOC(memSz, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); - if (mem == NULL) { - CYASSL_MSG("Alloc for tmp buffer failed"); - XFCLOSE(file); - return MEMORY_E; - } - - ret = (int)XFREAD(mem, memSz, 1, file); - if (ret != 1) { - CYASSL_MSG("Cert file read error"); - rc = FREAD_ERROR; - } else { - rc = CM_MemRestoreCertCache(cm, mem, memSz); - if (rc != SSL_SUCCESS) { - CYASSL_MSG("Mem restore cert cache failed"); - } - } - - XFREE(mem, cm->heap, DYNAMIC_TYPE_TMP_BUFFER); - XFCLOSE(file); - - return rc; -} - -#endif /* NO_FILESYSTEM */ - - -/* Persist cert cache to memory */ -int CM_MemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz, int* used) -{ - int ret = SSL_SUCCESS; - - CYASSL_ENTER("CM_MemSaveCertCache"); - - if (LockMutex(&cm->caLock) != 0) { - CYASSL_MSG("LockMutex on caLock failed"); - return BAD_MUTEX_E; - } - - ret = DoMemSaveCertCache(cm, mem, sz); - if (ret == SSL_SUCCESS) - *used = GetCertCacheMemSize(cm); - - UnLockMutex(&cm->caLock); - - return ret; -} - - -/* Restore cert cache from memory */ -int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER* cm, const void* mem, int sz) -{ - int ret = SSL_SUCCESS; - int i; - CertCacheHeader* hdr = (CertCacheHeader*)mem; - byte* current = (byte*)mem + sizeof(CertCacheHeader); - byte* end = (byte*)mem + sz; /* don't go over */ - - CYASSL_ENTER("CM_MemRestoreCertCache"); - - if (current > end) { - CYASSL_MSG("Cert Cache Memory buffer too small"); - return BUFFER_E; - } - - if (hdr->version != CYASSL_CACHE_CERT_VERSION || - hdr->rows != CA_TABLE_SIZE || - hdr->signerSz != (int)sizeof(Signer)) { - - CYASSL_MSG("Cert Cache Memory header mismatch"); - return CACHE_MATCH_ERROR; - } - - if (LockMutex(&cm->caLock) != 0) { - CYASSL_MSG("LockMutex on caLock failed"); - return BAD_MUTEX_E; - } - - FreeSignerTable(cm->caTable, CA_TABLE_SIZE, cm->heap); - - for (i = 0; i < CA_TABLE_SIZE; ++i) { - int added = RestoreCertRow(cm, current, i, hdr->columns[i], end); - if (added < 0) { - CYASSL_MSG("RestoreCertRow error"); - ret = added; - break; - } - current += added; - } - - UnLockMutex(&cm->caLock); - - return ret; -} - - -/* get how big the the cert cache save buffer needs to be */ -int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm) -{ - int sz; - - CYASSL_ENTER("CM_GetCertCacheMemSize"); - - if (LockMutex(&cm->caLock) != 0) { - CYASSL_MSG("LockMutex on caLock failed"); - return BAD_MUTEX_E; - } - - sz = GetCertCacheMemSize(cm); - - UnLockMutex(&cm->caLock); - - return sz; -} - -#endif /* PERSIST_CERT_CACHE */ -#endif /* NO_CERTS */ - - -int CyaSSL_CTX_set_cipher_list(CYASSL_CTX* ctx, const char* list) -{ - CYASSL_ENTER("CyaSSL_CTX_set_cipher_list"); - if (SetCipherList(&ctx->suites, list)) - return SSL_SUCCESS; - else - return SSL_FAILURE; -} - - -int CyaSSL_set_cipher_list(CYASSL* ssl, const char* list) -{ - CYASSL_ENTER("CyaSSL_set_cipher_list"); - if (SetCipherList(ssl->suites, list)) { - byte haveRSA = 1; - byte havePSK = 0; - - #ifdef NO_RSA - haveRSA = 0; - #endif - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - - return SSL_SUCCESS; - } - else - return SSL_FAILURE; -} - - -#ifndef CYASSL_LEANPSK -#ifdef CYASSL_DTLS - -int CyaSSL_dtls_get_current_timeout(CYASSL* ssl) -{ - (void)ssl; - - return ssl->dtls_timeout; -} - - -/* user may need to alter init dtls recv timeout, SSL_SUCCESS on ok */ -int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int timeout) -{ - if (ssl == NULL || timeout < 0) - return BAD_FUNC_ARG; - - if (timeout > ssl->dtls_timeout_max) { - CYASSL_MSG("Can't set dtls timeout init greater than dtls timeout max"); - return BAD_FUNC_ARG; - } - - ssl->dtls_timeout_init = timeout; - ssl->dtls_timeout = timeout; - - return SSL_SUCCESS; -} - - -/* user may need to alter max dtls recv timeout, SSL_SUCCESS on ok */ -int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int timeout) -{ - if (ssl == NULL || timeout < 0) - return BAD_FUNC_ARG; - - if (timeout < ssl->dtls_timeout_init) { - CYASSL_MSG("Can't set dtls timeout max less than dtls timeout init"); - return BAD_FUNC_ARG; - } - - ssl->dtls_timeout_max = timeout; - - return SSL_SUCCESS; -} - - -int CyaSSL_dtls_got_timeout(CYASSL* ssl) -{ - int result = SSL_SUCCESS; - - DtlsMsgListDelete(ssl->dtls_msg_list, ssl->heap); - ssl->dtls_msg_list = NULL; - if (DtlsPoolTimeout(ssl) < 0 || DtlsPoolSend(ssl) < 0) { - result = SSL_FATAL_ERROR; - } - return result; -} - -#endif /* DTLS */ -#endif /* LEANPSK */ - - -/* client only parts */ -#ifndef NO_CYASSL_CLIENT - - #ifndef NO_OLD_TLS - CYASSL_METHOD* CyaSSLv3_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("SSLv3_client_method"); - if (method) - InitSSL_Method(method, MakeSSLv3()); - return method; - } - #endif - - #ifdef CYASSL_DTLS - CYASSL_METHOD* CyaDTLSv1_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("DTLSv1_client_method"); - if (method) - InitSSL_Method(method, MakeDTLSv1()); - return method; - } - - CYASSL_METHOD* CyaDTLSv1_2_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("DTLSv1_2_client_method"); - if (method) - InitSSL_Method(method, MakeDTLSv1_2()); - return method; - } - #endif - - - /* please see note at top of README if you get an error from connect */ - int CyaSSL_connect(CYASSL* ssl) - { - int neededState; - - CYASSL_ENTER("SSL_connect()"); - - #ifdef HAVE_ERRNO_H - errno = 0; - #endif - - if (ssl->options.side != CYASSL_CLIENT_END) { - CYASSL_ERROR(ssl->error = SIDE_ERROR); - return SSL_FATAL_ERROR; - } - - #ifdef CYASSL_DTLS - if (ssl->version.major == DTLS_MAJOR) { - ssl->options.dtls = 1; - ssl->options.tls = 1; - ssl->options.tls1_1 = 1; - - if (DtlsPoolInit(ssl) != 0) { - ssl->error = MEMORY_ERROR; - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - #endif - - if (ssl->buffers.outputBuffer.length > 0) { - if ( (ssl->error = SendBuffered(ssl)) == 0) { - ssl->options.connectState++; - CYASSL_MSG("connect state: Advanced from buffered send"); - } - else { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - - switch (ssl->options.connectState) { - - case CONNECT_BEGIN : - /* always send client hello first */ - if ( (ssl->error = SendClientHello(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.connectState = CLIENT_HELLO_SENT; - CYASSL_MSG("connect state: CLIENT_HELLO_SENT"); - - case CLIENT_HELLO_SENT : - neededState = ssl->options.resuming ? SERVER_FINISHED_COMPLETE : - SERVER_HELLODONE_COMPLETE; - #ifdef CYASSL_DTLS - /* In DTLS, when resuming, we can go straight to FINISHED, - * or do a cookie exchange and then skip to FINISHED, assume - * we need the cookie exchange first. */ - if (ssl->options.dtls) - neededState = SERVER_HELLOVERIFYREQUEST_COMPLETE; - #endif - /* get response */ - while (ssl->options.serverState < neededState) { - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - /* if resumption failed, reset needed state */ - else if (neededState == SERVER_FINISHED_COMPLETE) - if (!ssl->options.resuming) { - if (!ssl->options.dtls) - neededState = SERVER_HELLODONE_COMPLETE; - else - neededState = SERVER_HELLOVERIFYREQUEST_COMPLETE; - } - } - - ssl->options.connectState = HELLO_AGAIN; - CYASSL_MSG("connect state: HELLO_AGAIN"); - - case HELLO_AGAIN : - if (ssl->options.certOnly) - return SSL_SUCCESS; - - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - /* re-init hashes, exclude first hello and verify request */ -#ifndef NO_OLD_TLS - InitMd5(&ssl->hashMd5); - if ( (ssl->error = InitSha(&ssl->hashSha)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } -#endif - if (IsAtLeastTLSv1_2(ssl)) { - #ifndef NO_SHA256 - if ( (ssl->error = - InitSha256(&ssl->hashSha256)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - #ifdef CYASSL_SHA384 - if ( (ssl->error = - InitSha384(&ssl->hashSha384)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - } - if ( (ssl->error = SendClientHello(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - #endif - - ssl->options.connectState = HELLO_AGAIN_REPLY; - CYASSL_MSG("connect state: HELLO_AGAIN_REPLY"); - - case HELLO_AGAIN_REPLY : - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - neededState = ssl->options.resuming ? - SERVER_FINISHED_COMPLETE : SERVER_HELLODONE_COMPLETE; - - /* get response */ - while (ssl->options.serverState < neededState) { - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - /* if resumption failed, reset needed state */ - else if (neededState == SERVER_FINISHED_COMPLETE) - if (!ssl->options.resuming) - neededState = SERVER_HELLODONE_COMPLETE; - } - } - #endif - - ssl->options.connectState = FIRST_REPLY_DONE; - CYASSL_MSG("connect state: FIRST_REPLY_DONE"); - - case FIRST_REPLY_DONE : - #ifndef NO_CERTS - if (ssl->options.sendVerify) { - if ( (ssl->error = SendCertificate(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - CYASSL_MSG("sent: certificate"); - } - - #endif - ssl->options.connectState = FIRST_REPLY_FIRST; - CYASSL_MSG("connect state: FIRST_REPLY_FIRST"); - - case FIRST_REPLY_FIRST : - if (!ssl->options.resuming) { - if ( (ssl->error = SendClientKeyExchange(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - CYASSL_MSG("sent: client key exchange"); - } - - ssl->options.connectState = FIRST_REPLY_SECOND; - CYASSL_MSG("connect state: FIRST_REPLY_SECOND"); - - case FIRST_REPLY_SECOND : - #ifndef NO_CERTS - if (ssl->options.sendVerify) { - if ( (ssl->error = SendCertificateVerify(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - CYASSL_MSG("sent: certificate verify"); - } - #endif - ssl->options.connectState = FIRST_REPLY_THIRD; - CYASSL_MSG("connect state: FIRST_REPLY_THIRD"); - - case FIRST_REPLY_THIRD : - if ( (ssl->error = SendChangeCipher(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - CYASSL_MSG("sent: change cipher spec"); - ssl->options.connectState = FIRST_REPLY_FOURTH; - CYASSL_MSG("connect state: FIRST_REPLY_FOURTH"); - - case FIRST_REPLY_FOURTH : - if ( (ssl->error = SendFinished(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - CYASSL_MSG("sent: finished"); - ssl->options.connectState = FINISHED_DONE; - CYASSL_MSG("connect state: FINISHED_DONE"); - - case FINISHED_DONE : - /* get response */ - while (ssl->options.serverState < SERVER_FINISHED_COMPLETE) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - - ssl->options.connectState = SECOND_REPLY_DONE; - CYASSL_MSG("connect state: SECOND_REPLY_DONE"); - - case SECOND_REPLY_DONE: - FreeHandshakeResources(ssl); - CYASSL_LEAVE("SSL_connect()", SSL_SUCCESS); - return SSL_SUCCESS; - - default: - CYASSL_MSG("Unknown connect state ERROR"); - return SSL_FATAL_ERROR; /* unknown connect state */ - } - } - -#endif /* NO_CYASSL_CLIENT */ - - -/* server only parts */ -#ifndef NO_CYASSL_SERVER - - #ifndef NO_OLD_TLS - CYASSL_METHOD* CyaSSLv3_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("SSLv3_server_method"); - if (method) { - InitSSL_Method(method, MakeSSLv3()); - method->side = CYASSL_SERVER_END; - } - return method; - } - #endif - - - #ifdef CYASSL_DTLS - CYASSL_METHOD* CyaDTLSv1_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("DTLSv1_server_method"); - if (method) { - InitSSL_Method(method, MakeDTLSv1()); - method->side = CYASSL_SERVER_END; - } - return method; - } - - CYASSL_METHOD* CyaDTLSv1_2_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - CYASSL_ENTER("DTLSv1_2_server_method"); - if (method) { - InitSSL_Method(method, MakeDTLSv1_2()); - method->side = CYASSL_SERVER_END; - } - return method; - } - #endif - - - int CyaSSL_accept(CYASSL* ssl) - { - byte havePSK = 0; - CYASSL_ENTER("SSL_accept()"); - - #ifdef HAVE_ERRNO_H - errno = 0; - #endif - - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - (void)havePSK; - - if (ssl->options.side != CYASSL_SERVER_END) { - CYASSL_ERROR(ssl->error = SIDE_ERROR); - return SSL_FATAL_ERROR; - } - - #ifndef NO_CERTS - /* in case used set_accept_state after init */ - if (!havePSK && (ssl->buffers.certificate.buffer == NULL || - ssl->buffers.key.buffer == NULL)) { - CYASSL_MSG("accept error: don't have server cert and key"); - ssl->error = NO_PRIVATE_KEY; - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - - #ifdef HAVE_ECC - /* in case used set_accept_state after init */ - if (ssl->eccTempKeyPresent == 0) { - if (ecc_make_key(ssl->rng, ssl->eccTempKeySz, - ssl->eccTempKey) != 0) { - ssl->error = ECC_MAKEKEY_ERROR; - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->eccTempKeyPresent = 1; - } - #endif - - #ifdef CYASSL_DTLS - if (ssl->version.major == DTLS_MAJOR) { - ssl->options.dtls = 1; - ssl->options.tls = 1; - ssl->options.tls1_1 = 1; - - if (DtlsPoolInit(ssl) != 0) { - ssl->error = MEMORY_ERROR; - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - #endif - - if (ssl->buffers.outputBuffer.length > 0) { - if ( (ssl->error = SendBuffered(ssl)) == 0) { - ssl->options.acceptState++; - CYASSL_MSG("accept state: Advanced from buffered send"); - } - else { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - - switch (ssl->options.acceptState) { - - case ACCEPT_BEGIN : - /* get response */ - while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.acceptState = ACCEPT_CLIENT_HELLO_DONE; - CYASSL_MSG("accept state ACCEPT_CLIENT_HELLO_DONE"); - - case ACCEPT_CLIENT_HELLO_DONE : - #ifdef CYASSL_DTLS - if (ssl->options.dtls) - if ( (ssl->error = SendHelloVerifyRequest(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - ssl->options.acceptState = HELLO_VERIFY_SENT; - CYASSL_MSG("accept state HELLO_VERIFY_SENT"); - - case HELLO_VERIFY_SENT: - #ifdef CYASSL_DTLS - if (ssl->options.dtls) { - ssl->options.clientState = NULL_STATE; /* get again */ - /* re-init hashes, exclude first hello and verify request */ -#ifndef NO_OLD_TLS - InitMd5(&ssl->hashMd5); - if ( (ssl->error = InitSha(&ssl->hashSha)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } -#endif - if (IsAtLeastTLSv1_2(ssl)) { - #ifndef NO_SHA256 - if ( (ssl->error = - InitSha256(&ssl->hashSha256)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - #ifdef CYASSL_SHA384 - if ( (ssl->error = - InitSha384(&ssl->hashSha384)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - } - - while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - #endif - ssl->options.acceptState = ACCEPT_FIRST_REPLY_DONE; - CYASSL_MSG("accept state ACCEPT_FIRST_REPLY_DONE"); - - case ACCEPT_FIRST_REPLY_DONE : - if ( (ssl->error = SendServerHello(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.acceptState = SERVER_HELLO_SENT; - CYASSL_MSG("accept state SERVER_HELLO_SENT"); - - case SERVER_HELLO_SENT : - #ifndef NO_CERTS - if (!ssl->options.resuming) - if ( (ssl->error = SendCertificate(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - ssl->options.acceptState = CERT_SENT; - CYASSL_MSG("accept state CERT_SENT"); - - case CERT_SENT : - if (!ssl->options.resuming) - if ( (ssl->error = SendServerKeyExchange(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.acceptState = KEY_EXCHANGE_SENT; - CYASSL_MSG("accept state KEY_EXCHANGE_SENT"); - - case KEY_EXCHANGE_SENT : - #ifndef NO_CERTS - if (!ssl->options.resuming) - if (ssl->options.verifyPeer) - if ( (ssl->error = SendCertificateRequest(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - #endif - ssl->options.acceptState = CERT_REQ_SENT; - CYASSL_MSG("accept state CERT_REQ_SENT"); - - case CERT_REQ_SENT : - if (!ssl->options.resuming) - if ( (ssl->error = SendServerHelloDone(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.acceptState = SERVER_HELLO_DONE; - CYASSL_MSG("accept state SERVER_HELLO_DONE"); - - case SERVER_HELLO_DONE : - if (!ssl->options.resuming) { - while (ssl->options.clientState < CLIENT_FINISHED_COMPLETE) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - } - ssl->options.acceptState = ACCEPT_SECOND_REPLY_DONE; - CYASSL_MSG("accept state ACCEPT_SECOND_REPLY_DONE"); - - case ACCEPT_SECOND_REPLY_DONE : - if ( (ssl->error = SendChangeCipher(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - ssl->options.acceptState = CHANGE_CIPHER_SENT; - CYASSL_MSG("accept state CHANGE_CIPHER_SENT"); - - case CHANGE_CIPHER_SENT : - if ( (ssl->error = SendFinished(ssl)) != 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - - ssl->options.acceptState = ACCEPT_FINISHED_DONE; - CYASSL_MSG("accept state ACCEPT_FINISHED_DONE"); - - case ACCEPT_FINISHED_DONE : - if (ssl->options.resuming) - while (ssl->options.clientState < CLIENT_FINISHED_COMPLETE) - if ( (ssl->error = ProcessReply(ssl)) < 0) { - CYASSL_ERROR(ssl->error); - return SSL_FATAL_ERROR; - } - - ssl->options.acceptState = ACCEPT_THIRD_REPLY_DONE; - CYASSL_MSG("accept state ACCEPT_THIRD_REPLY_DONE"); - - case ACCEPT_THIRD_REPLY_DONE : - FreeHandshakeResources(ssl); - CYASSL_LEAVE("SSL_accept()", SSL_SUCCESS); - return SSL_SUCCESS; - - default : - CYASSL_MSG("Unknown accept state ERROR"); - return SSL_FATAL_ERROR; - } - } - -#endif /* NO_CYASSL_SERVER */ - - -int CyaSSL_Cleanup(void) -{ - int ret = SSL_SUCCESS; - int release = 0; - - CYASSL_ENTER("CyaSSL_Cleanup"); - - if (initRefCount == 0) - return ret; /* possibly no init yet, but not failure either way */ - - if (LockMutex(&count_mutex) != 0) { - CYASSL_MSG("Bad Lock Mutex count"); - return BAD_MUTEX_E; - } - - release = initRefCount-- == 1; - if (initRefCount < 0) - initRefCount = 0; - - UnLockMutex(&count_mutex); - - if (!release) - return ret; - -#ifndef NO_SESSION_CACHE - if (FreeMutex(&session_mutex) != 0) - ret = BAD_MUTEX_E; -#endif - if (FreeMutex(&count_mutex) != 0) - ret = BAD_MUTEX_E; - -#if defined(HAVE_ECC) && defined(FP_ECC) - ecc_fp_free(); -#endif - - return ret; -} - - -#ifndef NO_SESSION_CACHE - -#ifndef NO_MD5 - -/* some session IDs aren't random afterall, let's make them random */ - -static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) -{ - byte digest[MD5_DIGEST_SIZE]; - Md5 md5; - - (void)error; - - InitMd5(&md5); - Md5Update(&md5, sessionID, len); - Md5Final(&md5, digest); - - return MakeWordFromHash(digest); -} - -#elif !defined(NO_SHA) - -/* 0 on failure */ -static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) -{ - byte digest[SHA_DIGEST_SIZE]; - Sha sha; - int ret = 0; - - ret = InitSha(&sha); - if (ret != 0) { - *error = ret; - return 0; - } - ShaUpdate(&sha, sessionID, len); - ShaFinal(&sha, digest); - - return MakeWordFromHash(digest); -} - -#elif !defined(NO_SHA256) - -static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) -{ - byte digest[SHA256_DIGEST_SIZE]; - Sha256 sha256; - int ret; - - ret = InitSha256(&sha256); - if (ret != 0) { - *error = ret; - return 0; - } - - ret = Sha256Update(&sha256, sessionID, len); - if (ret != 0) { - *error = ret; - return 0; - } - - ret = Sha256Final(&sha256, digest); - if (ret != 0) { - *error = ret; - return 0; - } - - return MakeWordFromHash(digest); -} - -#else - -#error "We need a digest to hash the session IDs" - -#endif /* NO_MD5 */ - - -void CyaSSL_flush_sessions(CYASSL_CTX* ctx, long tm) -{ - /* static table now, no flusing needed */ - (void)ctx; - (void)tm; -} - - -/* set ssl session timeout in seconds */ -int CyaSSL_set_timeout(CYASSL* ssl, unsigned int to) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - ssl->timeout = to; - - return SSL_SUCCESS; -} - - -/* set ctx session timeout in seconds */ -int CyaSSL_CTX_set_timeout(CYASSL_CTX* ctx, unsigned int to) -{ - if (ctx == NULL) - return BAD_FUNC_ARG; - - ctx->timeout = to; - - return SSL_SUCCESS; -} - - -#ifndef NO_CLIENT_CACHE - -/* Get Session from Client cache based on id/len, return NULL on failure */ -CYASSL_SESSION* GetSessionClient(CYASSL* ssl, const byte* id, int len) -{ - CYASSL_SESSION* ret = NULL; - word32 row; - int idx; - int count; - int error = 0; - - CYASSL_ENTER("GetSessionClient"); - - if (ssl->options.side == CYASSL_SERVER_END) - return NULL; - - len = min(SERVER_ID_LEN, (word32)len); - row = HashSession(id, len, &error) % SESSION_ROWS; - if (error != 0) { - CYASSL_MSG("Hash session failed"); - return NULL; - } - - if (LockMutex(&session_mutex) != 0) { - CYASSL_MSG("Lock session mutex failed"); - return NULL; - } - - /* start from most recently used */ - count = min((word32)ClientCache[row].totalCount, SESSIONS_PER_ROW); - idx = ClientCache[row].nextIdx - 1; - if (idx < 0) - idx = SESSIONS_PER_ROW - 1; /* if back to front, the previous was end */ - - for (; count > 0; --count, idx = idx ? idx - 1 : SESSIONS_PER_ROW - 1) { - CYASSL_SESSION* current; - ClientSession clSess; - - if (idx >= SESSIONS_PER_ROW || idx < 0) { /* sanity check */ - CYASSL_MSG("Bad idx"); - break; - } - - clSess = ClientCache[row].Clients[idx]; - - current = &SessionCache[clSess.serverRow].Sessions[clSess.serverIdx]; - if (XMEMCMP(current->serverID, id, len) == 0) { - CYASSL_MSG("Found a serverid match for client"); - if (LowResTimer() < (current->bornOn + current->timeout)) { - CYASSL_MSG("Session valid"); - ret = current; - break; - } else { - CYASSL_MSG("Session timed out"); /* could have more for id */ - } - } else { - CYASSL_MSG("ServerID not a match from client table"); - } - } - - UnLockMutex(&session_mutex); - - return ret; -} - -#endif /* NO_CLIENT_CACHE */ - - -CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret) -{ - CYASSL_SESSION* ret = 0; - const byte* id = NULL; - word32 row; - int idx; - int count; - int error = 0; - - if (ssl->options.sessionCacheOff) - return NULL; - - if (ssl->options.haveSessionId == 0) - return NULL; - - if (ssl->arrays) - id = ssl->arrays->sessionID; - else - id = ssl->session.sessionID; - - row = HashSession(id, ID_LEN, &error) % SESSION_ROWS; - if (error != 0) { - CYASSL_MSG("Hash session failed"); - return NULL; - } - - if (LockMutex(&session_mutex) != 0) - return 0; - - /* start from most recently used */ - count = min((word32)SessionCache[row].totalCount, SESSIONS_PER_ROW); - idx = SessionCache[row].nextIdx - 1; - if (idx < 0) - idx = SESSIONS_PER_ROW - 1; /* if back to front, the previous was end */ - - for (; count > 0; --count, idx = idx ? idx - 1 : SESSIONS_PER_ROW - 1) { - CYASSL_SESSION* current; - - if (idx >= SESSIONS_PER_ROW || idx < 0) { /* sanity check */ - CYASSL_MSG("Bad idx"); - break; - } - - current = &SessionCache[row].Sessions[idx]; - if (XMEMCMP(current->sessionID, id, ID_LEN) == 0) { - CYASSL_MSG("Found a session match"); - if (LowResTimer() < (current->bornOn + current->timeout)) { - CYASSL_MSG("Session valid"); - ret = current; - if (masterSecret) - XMEMCPY(masterSecret, current->masterSecret, SECRET_LEN); - } else { - CYASSL_MSG("Session timed out"); - } - break; /* no more sessionIDs whether valid or not that match */ - } else { - CYASSL_MSG("SessionID not a match at this idx"); - } - } - - UnLockMutex(&session_mutex); - - return ret; -} - - -int SetSession(CYASSL* ssl, CYASSL_SESSION* session) -{ - if (ssl->options.sessionCacheOff) - return SSL_FAILURE; - - if (LowResTimer() < (session->bornOn + session->timeout)) { - ssl->session = *session; - ssl->options.resuming = 1; - -#ifdef SESSION_CERTS - ssl->version = session->version; - ssl->options.cipherSuite0 = session->cipherSuite0; - ssl->options.cipherSuite = session->cipherSuite; -#endif - - return SSL_SUCCESS; - } - return SSL_FAILURE; /* session timed out */ -} - - -int AddSession(CYASSL* ssl) -{ - word32 row, idx; - int error = 0; - - if (ssl->options.sessionCacheOff) - return 0; - - if (ssl->options.haveSessionId == 0) - return 0; - - row = HashSession(ssl->arrays->sessionID, ID_LEN, &error) % SESSION_ROWS; - if (error != 0) { - CYASSL_MSG("Hash session failed"); - return error; - } - - if (LockMutex(&session_mutex) != 0) - return BAD_MUTEX_E; - - idx = SessionCache[row].nextIdx++; -#ifdef SESSION_INDEX - ssl->sessionIndex = (row << SESSIDX_ROW_SHIFT) | idx; -#endif - - XMEMCPY(SessionCache[row].Sessions[idx].masterSecret, - ssl->arrays->masterSecret, SECRET_LEN); - XMEMCPY(SessionCache[row].Sessions[idx].sessionID, ssl->arrays->sessionID, - ID_LEN); - - SessionCache[row].Sessions[idx].timeout = ssl->timeout; - SessionCache[row].Sessions[idx].bornOn = LowResTimer(); - -#ifdef SESSION_CERTS - SessionCache[row].Sessions[idx].chain.count = ssl->session.chain.count; - XMEMCPY(SessionCache[row].Sessions[idx].chain.certs, - ssl->session.chain.certs, sizeof(x509_buffer) * MAX_CHAIN_DEPTH); - - SessionCache[row].Sessions[idx].version = ssl->version; - SessionCache[row].Sessions[idx].cipherSuite0 = ssl->options.cipherSuite0; - SessionCache[row].Sessions[idx].cipherSuite = ssl->options.cipherSuite; -#endif /* SESSION_CERTS */ - - SessionCache[row].totalCount++; - if (SessionCache[row].nextIdx == SESSIONS_PER_ROW) - SessionCache[row].nextIdx = 0; - -#ifndef NO_CLIENT_CACHE - if (ssl->options.side == CYASSL_CLIENT_END && ssl->session.idLen) { - word32 clientRow, clientIdx; - - CYASSL_MSG("Adding client cache entry"); - - SessionCache[row].Sessions[idx].idLen = ssl->session.idLen; - XMEMCPY(SessionCache[row].Sessions[idx].serverID, ssl->session.serverID, - ssl->session.idLen); - - clientRow = HashSession(ssl->session.serverID, ssl->session.idLen, - &error) % SESSION_ROWS; - if (error != 0) { - CYASSL_MSG("Hash session failed"); - return error; - } - clientIdx = ClientCache[clientRow].nextIdx++; - - ClientCache[clientRow].Clients[clientIdx].serverRow = (word16)row; - ClientCache[clientRow].Clients[clientIdx].serverIdx = (word16)idx; - - ClientCache[clientRow].totalCount++; - if (ClientCache[clientRow].nextIdx == SESSIONS_PER_ROW) - ClientCache[clientRow].nextIdx = 0; - } - else - SessionCache[row].Sessions[idx].idLen = 0; -#endif /* NO_CLIENT_CACHE */ - - if (UnLockMutex(&session_mutex) != 0) - return BAD_MUTEX_E; - - return 0; -} - - -#ifdef SESSION_INDEX - -int CyaSSL_GetSessionIndex(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_GetSessionIndex"); - CYASSL_LEAVE("CyaSSL_GetSessionIndex", ssl->sessionIndex); - return ssl->sessionIndex; -} - - -int CyaSSL_GetSessionAtIndex(int idx, CYASSL_SESSION* session) -{ - int row, col, result = SSL_FAILURE; - - CYASSL_ENTER("CyaSSL_GetSessionAtIndex"); - - row = idx >> SESSIDX_ROW_SHIFT; - col = idx & SESSIDX_IDX_MASK; - - if (LockMutex(&session_mutex) != 0) { - return BAD_MUTEX_E; - } - - if (row < SESSION_ROWS && - col < (int)min(SessionCache[row].totalCount, SESSIONS_PER_ROW)) { - XMEMCPY(session, - &SessionCache[row].Sessions[col], sizeof(CYASSL_SESSION)); - result = SSL_SUCCESS; - } - - if (UnLockMutex(&session_mutex) != 0) - result = BAD_MUTEX_E; - - CYASSL_LEAVE("CyaSSL_GetSessionAtIndex", result); - return result; -} - -#endif /* SESSION_INDEX */ - -#if defined(SESSION_INDEX) && defined(SESSION_CERTS) - -CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session) -{ - CYASSL_X509_CHAIN* chain = NULL; - - CYASSL_ENTER("CyaSSL_SESSION_get_peer_chain"); - if (session) - chain = &session->chain; - - CYASSL_LEAVE("CyaSSL_SESSION_get_peer_chain", chain ? 1 : 0); - return chain; -} - -#endif /* SESSION_INDEX && SESSION_CERTS */ - - - #ifdef SESSION_STATS - - CYASSL_API - void PrintSessionStats(void) - { - word32 totalSessionsSeen = 0; - word32 totalSessionsNow = 0; - word32 rowNow; - int i; - double E; /* expected freq */ - double chiSquare = 0; - - for (i = 0; i < SESSION_ROWS; i++) { - totalSessionsSeen += SessionCache[i].totalCount; - - if (SessionCache[i].totalCount >= SESSIONS_PER_ROW) - rowNow = SESSIONS_PER_ROW; - else if (SessionCache[i].nextIdx == 0) - rowNow = 0; - else - rowNow = SessionCache[i].nextIdx; - - totalSessionsNow += rowNow; - } - - printf("Total Sessions Seen = %d\n", totalSessionsSeen); - printf("Total Sessions Now = %d\n", totalSessionsNow); - - E = (double)totalSessionsSeen / SESSION_ROWS; - - for (i = 0; i < SESSION_ROWS; i++) { - double diff = SessionCache[i].totalCount - E; - diff *= diff; /* square */ - diff /= E; /* normalize */ - - chiSquare += diff; - } - printf(" chi-square = %5.1f, d.f. = %d\n", chiSquare, - SESSION_ROWS - 1); - if (SESSION_ROWS == 11) - printf(" .05 p value = 18.3, chi-square should be less\n"); - else if (SESSION_ROWS == 211) - printf(".05 p value = 244.8, chi-square should be less\n"); - else if (SESSION_ROWS == 5981) - printf(".05 p value = 6161.0, chi-square should be less\n"); - else if (SESSION_ROWS == 3) - printf(".05 p value = 6.0, chi-square should be less\n"); - else if (SESSION_ROWS == 2861) - printf(".05 p value = 2985.5, chi-square should be less\n"); - printf("\n"); - } - - #endif /* SESSION_STATS */ - -#else /* NO_SESSION_CACHE */ - -/* No session cache version */ -CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret) -{ - (void)ssl; - (void)masterSecret; - - return NULL; -} - -#endif /* NO_SESSION_CACHE */ - - -/* call before SSL_connect, if verifying will add name check to - date check and signature check */ -int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn) -{ - CYASSL_ENTER("CyaSSL_check_domain_name"); - if (ssl->buffers.domainName.buffer) - XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN); - - ssl->buffers.domainName.length = (word32)XSTRLEN(dn) + 1; - ssl->buffers.domainName.buffer = (byte*) XMALLOC( - ssl->buffers.domainName.length, ssl->heap, DYNAMIC_TYPE_DOMAIN); - - if (ssl->buffers.domainName.buffer) { - XSTRNCPY((char*)ssl->buffers.domainName.buffer, dn, - ssl->buffers.domainName.length); - return SSL_SUCCESS; - } - else { - ssl->error = MEMORY_ERROR; - return SSL_FAILURE; - } -} - - -/* turn on CyaSSL zlib compression - returns SSL_SUCCESS for success, else error (not built in) -*/ -int CyaSSL_set_compression(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_set_compression"); - (void)ssl; -#ifdef HAVE_LIBZ - ssl->options.usingCompression = 1; - return SSL_SUCCESS; -#else - return NOT_COMPILED_IN; -#endif -} - - -#ifndef USE_WINDOWS_API - #ifndef NO_WRITEV - - /* simulate writev semantics, doesn't actually do block at a time though - because of SSL_write behavior and because front adds may be small */ - int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, int iovcnt) - { - byte tmp[FILE_BUFFER_SIZE]; - byte* myBuffer = tmp; - int sending = 0; - int newBuffer = 0; - int idx = 0; - int i; - int ret; - - CYASSL_ENTER("CyaSSL_writev"); - - for (i = 0; i < iovcnt; i++) - sending += (int)iov[i].iov_len; - - if (sending > (int)sizeof(tmp)) { - byte* tmp2 = (byte*) XMALLOC(sending, ssl->heap, - DYNAMIC_TYPE_WRITEV); - if (!tmp2) - return MEMORY_ERROR; - myBuffer = tmp2; - newBuffer = 1; - } - - for (i = 0; i < iovcnt; i++) { - XMEMCPY(&myBuffer[idx], iov[i].iov_base, iov[i].iov_len); - idx += (int)iov[i].iov_len; - } - - ret = CyaSSL_write(ssl, myBuffer, sending); - - if (newBuffer) XFREE(myBuffer, ssl->heap, DYNAMIC_TYPE_WRITEV); - - return ret; - } - #endif -#endif - - -#ifdef CYASSL_CALLBACKS - - typedef struct itimerval Itimerval; - - /* don't keep calling simple functions while setting up timer and singals - if no inlining these are the next best */ - - #define AddTimes(a, b, c) \ - do { \ - c.tv_sec = a.tv_sec + b.tv_sec; \ - c.tv_usec = a.tv_usec + b.tv_usec; \ - if (c.tv_usec >= 1000000) { \ - c.tv_sec++; \ - c.tv_usec -= 1000000; \ - } \ - } while (0) - - - #define SubtractTimes(a, b, c) \ - do { \ - c.tv_sec = a.tv_sec - b.tv_sec; \ - c.tv_usec = a.tv_usec - b.tv_usec; \ - if (c.tv_usec < 0) { \ - c.tv_sec--; \ - c.tv_usec += 1000000; \ - } \ - } while (0) - - #define CmpTimes(a, b, cmp) \ - ((a.tv_sec == b.tv_sec) ? \ - (a.tv_usec cmp b.tv_usec) : \ - (a.tv_sec cmp b.tv_sec)) \ - - - /* do nothing handler */ - static void myHandler(int signo) - { - (void)signo; - return; - } - - - static int CyaSSL_ex_wrapper(CYASSL* ssl, HandShakeCallBack hsCb, - TimeoutCallBack toCb, Timeval timeout) - { - int ret = SSL_FATAL_ERROR; - int oldTimerOn = 0; /* was timer already on */ - Timeval startTime; - Timeval endTime; - Timeval totalTime; - Itimerval myTimeout; - Itimerval oldTimeout; /* if old timer adjust from total time to reset */ - struct sigaction act, oact; - - #define ERR_OUT(x) { ssl->hsInfoOn = 0; ssl->toInfoOn = 0; return x; } - - if (hsCb) { - ssl->hsInfoOn = 1; - InitHandShakeInfo(&ssl->handShakeInfo); - } - if (toCb) { - ssl->toInfoOn = 1; - InitTimeoutInfo(&ssl->timeoutInfo); - - if (gettimeofday(&startTime, 0) < 0) - ERR_OUT(GETTIME_ERROR); - - /* use setitimer to simulate getitimer, init 0 myTimeout */ - myTimeout.it_interval.tv_sec = 0; - myTimeout.it_interval.tv_usec = 0; - myTimeout.it_value.tv_sec = 0; - myTimeout.it_value.tv_usec = 0; - if (setitimer(ITIMER_REAL, &myTimeout, &oldTimeout) < 0) - ERR_OUT(SETITIMER_ERROR); - - if (oldTimeout.it_value.tv_sec || oldTimeout.it_value.tv_usec) { - oldTimerOn = 1; - - /* is old timer going to expire before ours */ - if (CmpTimes(oldTimeout.it_value, timeout, <)) { - timeout.tv_sec = oldTimeout.it_value.tv_sec; - timeout.tv_usec = oldTimeout.it_value.tv_usec; - } - } - myTimeout.it_value.tv_sec = timeout.tv_sec; - myTimeout.it_value.tv_usec = timeout.tv_usec; - - /* set up signal handler, don't restart socket send/recv */ - act.sa_handler = myHandler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; -#ifdef SA_INTERRUPT - act.sa_flags |= SA_INTERRUPT; -#endif - if (sigaction(SIGALRM, &act, &oact) < 0) - ERR_OUT(SIGACT_ERROR); - - if (setitimer(ITIMER_REAL, &myTimeout, 0) < 0) - ERR_OUT(SETITIMER_ERROR); - } - - /* do main work */ -#ifndef NO_CYASSL_CLIENT - if (ssl->options.side == CYASSL_CLIENT_END) - ret = CyaSSL_connect(ssl); -#endif -#ifndef NO_CYASSL_SERVER - if (ssl->options.side == CYASSL_SERVER_END) - ret = CyaSSL_accept(ssl); -#endif - - /* do callbacks */ - if (toCb) { - if (oldTimerOn) { - gettimeofday(&endTime, 0); - SubtractTimes(endTime, startTime, totalTime); - /* adjust old timer for elapsed time */ - if (CmpTimes(totalTime, oldTimeout.it_value, <)) - SubtractTimes(oldTimeout.it_value, totalTime, - oldTimeout.it_value); - else { - /* reset value to interval, may be off */ - oldTimeout.it_value.tv_sec = oldTimeout.it_interval.tv_sec; - oldTimeout.it_value.tv_usec =oldTimeout.it_interval.tv_usec; - } - /* keep iter the same whether there or not */ - } - /* restore old handler */ - if (sigaction(SIGALRM, &oact, 0) < 0) - ret = SIGACT_ERROR; /* more pressing error, stomp */ - else - /* use old settings which may turn off (expired or not there) */ - if (setitimer(ITIMER_REAL, &oldTimeout, 0) < 0) - ret = SETITIMER_ERROR; - - /* if we had a timeout call callback */ - if (ssl->timeoutInfo.timeoutName[0]) { - ssl->timeoutInfo.timeoutValue.tv_sec = timeout.tv_sec; - ssl->timeoutInfo.timeoutValue.tv_usec = timeout.tv_usec; - (toCb)(&ssl->timeoutInfo); - } - /* clean up */ - FreeTimeoutInfo(&ssl->timeoutInfo, ssl->heap); - ssl->toInfoOn = 0; - } - if (hsCb) { - FinishHandShakeInfo(&ssl->handShakeInfo, ssl); - (hsCb)(&ssl->handShakeInfo); - ssl->hsInfoOn = 0; - } - return ret; - } - - -#ifndef NO_CYASSL_CLIENT - - int CyaSSL_connect_ex(CYASSL* ssl, HandShakeCallBack hsCb, - TimeoutCallBack toCb, Timeval timeout) - { - CYASSL_ENTER("CyaSSL_connect_ex"); - return CyaSSL_ex_wrapper(ssl, hsCb, toCb, timeout); - } - -#endif - - -#ifndef NO_CYASSL_SERVER - - int CyaSSL_accept_ex(CYASSL* ssl, HandShakeCallBack hsCb, - TimeoutCallBack toCb,Timeval timeout) - { - CYASSL_ENTER("CyaSSL_accept_ex"); - return CyaSSL_ex_wrapper(ssl, hsCb, toCb, timeout); - } - -#endif - -#endif /* CYASSL_CALLBACKS */ - - -#ifndef NO_PSK - - void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX* ctx, - psk_client_callback cb) - { - CYASSL_ENTER("SSL_CTX_set_psk_client_callback"); - ctx->havePSK = 1; - ctx->client_psk_cb = cb; - } - - - void CyaSSL_set_psk_client_callback(CYASSL* ssl, psk_client_callback cb) - { - byte haveRSA = 1; - - CYASSL_ENTER("SSL_set_psk_client_callback"); - ssl->options.havePSK = 1; - ssl->options.client_psk_cb = cb; - - #ifdef NO_RSA - haveRSA = 0; - #endif - InitSuites(ssl->suites, ssl->version, haveRSA, TRUE, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - } - - - void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX* ctx, - psk_server_callback cb) - { - CYASSL_ENTER("SSL_CTX_set_psk_server_callback"); - ctx->havePSK = 1; - ctx->server_psk_cb = cb; - } - - - void CyaSSL_set_psk_server_callback(CYASSL* ssl, psk_server_callback cb) - { - byte haveRSA = 1; - - CYASSL_ENTER("SSL_set_psk_server_callback"); - ssl->options.havePSK = 1; - ssl->options.server_psk_cb = cb; - - #ifdef NO_RSA - haveRSA = 0; - #endif - InitSuites(ssl->suites, ssl->version, haveRSA, TRUE, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - } - - - const char* CyaSSL_get_psk_identity_hint(const CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_psk_identity_hint"); - - if (ssl == NULL || ssl->arrays == NULL) - return NULL; - - return ssl->arrays->server_hint; - } - - - const char* CyaSSL_get_psk_identity(const CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_psk_identity"); - - if (ssl == NULL || ssl->arrays == NULL) - return NULL; - - return ssl->arrays->client_identity; - } - - - int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX* ctx, const char* hint) - { - CYASSL_ENTER("SSL_CTX_use_psk_identity_hint"); - if (hint == 0) - ctx->server_hint[0] = 0; - else { - XSTRNCPY(ctx->server_hint, hint, MAX_PSK_ID_LEN); - ctx->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; - } - return SSL_SUCCESS; - } - - - int CyaSSL_use_psk_identity_hint(CYASSL* ssl, const char* hint) - { - CYASSL_ENTER("SSL_use_psk_identity_hint"); - - if (ssl == NULL || ssl->arrays == NULL) - return SSL_FAILURE; - - if (hint == 0) - ssl->arrays->server_hint[0] = 0; - else { - XSTRNCPY(ssl->arrays->server_hint, hint, MAX_PSK_ID_LEN); - ssl->arrays->server_hint[MAX_PSK_ID_LEN - 1] = '\0'; - } - return SSL_SUCCESS; - } - -#endif /* NO_PSK */ - - -#ifndef NO_CERTS -/* used to be defined on NO_FILESYSTEM only, but are generally useful */ - - /* CyaSSL extension allows DER files to be loaded from buffers as well */ - int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX* ctx, const unsigned char* in, - long sz, int format) - { - CYASSL_ENTER("CyaSSL_CTX_load_verify_buffer"); - if (format == SSL_FILETYPE_PEM) - return ProcessChainBuffer(ctx, in, sz, format, CA_TYPE, NULL); - else - return ProcessBuffer(ctx, in, sz, format, CA_TYPE, NULL,NULL,0); - } - - - int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX* ctx, - const unsigned char* in, long sz, int format) - { - CYASSL_ENTER("CyaSSL_CTX_use_certificate_buffer"); - return ProcessBuffer(ctx, in, sz, format, CERT_TYPE, NULL, NULL, 0); - } - - - int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX* ctx, - const unsigned char* in, long sz, int format) - { - CYASSL_ENTER("CyaSSL_CTX_use_PrivateKey_buffer"); - return ProcessBuffer(ctx, in, sz, format, PRIVATEKEY_TYPE, NULL,NULL,0); - } - - - int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX* ctx, - const unsigned char* in, long sz) - { - CYASSL_ENTER("CyaSSL_CTX_use_certificate_chain_buffer"); - return ProcessBuffer(ctx, in, sz, SSL_FILETYPE_PEM, CERT_TYPE, NULL, - NULL, 1); - } - - int CyaSSL_use_certificate_buffer(CYASSL* ssl, - const unsigned char* in, long sz, int format) - { - CYASSL_ENTER("CyaSSL_use_certificate_buffer"); - return ProcessBuffer(ssl->ctx, in, sz, format,CERT_TYPE,ssl,NULL,0); - } - - - int CyaSSL_use_PrivateKey_buffer(CYASSL* ssl, - const unsigned char* in, long sz, int format) - { - CYASSL_ENTER("CyaSSL_use_PrivateKey_buffer"); - return ProcessBuffer(ssl->ctx, in, sz, format, PRIVATEKEY_TYPE, - ssl, NULL, 0); - } - - - int CyaSSL_use_certificate_chain_buffer(CYASSL* ssl, - const unsigned char* in, long sz) - { - CYASSL_ENTER("CyaSSL_use_certificate_chain_buffer"); - return ProcessBuffer(ssl->ctx, in, sz, SSL_FILETYPE_PEM, CERT_TYPE, - ssl, NULL, 1); - } - - - /* unload any certs or keys that SSL owns, leave CTX as is - SSL_SUCCESS on ok */ - int CyaSSL_UnloadCertsKeys(CYASSL* ssl) - { - if (ssl == NULL) { - CYASSL_MSG("Null function arg"); - return BAD_FUNC_ARG; - } - - if (ssl->buffers.weOwnCert) { - CYASSL_MSG("Unloading cert"); - XFREE(ssl->buffers.certificate.buffer, ssl->heap,DYNAMIC_TYPE_CERT); - ssl->buffers.weOwnCert = 0; - ssl->buffers.certificate.length = 0; - ssl->buffers.certificate.buffer = NULL; - } - - if (ssl->buffers.weOwnKey) { - CYASSL_MSG("Unloading key"); - XFREE(ssl->buffers.key.buffer, ssl->heap, DYNAMIC_TYPE_KEY); - ssl->buffers.weOwnKey = 0; - ssl->buffers.key.length = 0; - ssl->buffers.key.buffer = NULL; - } - - return SSL_SUCCESS; - } - - - int CyaSSL_CTX_UnloadCAs(CYASSL_CTX* ctx) - { - CYASSL_ENTER("CyaSSL_CTX_UnloadCAs"); - - if (ctx == NULL) - return BAD_FUNC_ARG; - - return CyaSSL_CertManagerUnloadCAs(ctx->cm); - } - -/* old NO_FILESYSTEM end */ -#endif /* !NO_CERTS */ - - -#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) - - - int CyaSSL_add_all_algorithms(void) - { - CYASSL_ENTER("CyaSSL_add_all_algorithms"); - CyaSSL_Init(); - return SSL_SUCCESS; - } - - - long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX* ctx, long sz) - { - /* cache size fixed at compile time in CyaSSL */ - (void)ctx; - (void)sz; - return 0; - } - - - void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX* ctx, int mode) - { - CYASSL_ENTER("CyaSSL_CTX_set_quiet_shutdown"); - if (mode) - ctx->quietShutdown = 1; - } - - - void CyaSSL_set_quiet_shutdown(CYASSL* ssl, int mode) - { - CYASSL_ENTER("CyaSSL_CTX_set_quiet_shutdown"); - if (mode) - ssl->options.quietShutdown = 1; - } - - - void CyaSSL_set_bio(CYASSL* ssl, CYASSL_BIO* rd, CYASSL_BIO* wr) - { - CYASSL_ENTER("SSL_set_bio"); - CyaSSL_set_rfd(ssl, rd->fd); - CyaSSL_set_wfd(ssl, wr->fd); - - ssl->biord = rd; - ssl->biowr = wr; - } - - - void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX* ctx, - STACK_OF(CYASSL_X509_NAME)* names) - { - (void)ctx; - (void)names; - } - - - STACK_OF(CYASSL_X509_NAME)* CyaSSL_load_client_CA_file(const char* fname) - { - (void)fname; - return 0; - } - - - int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX* ctx) - { - /* TODO:, not needed in goahead */ - (void)ctx; - return SSL_NOT_IMPLEMENTED; - } - - - /* keyblock size in bytes or -1 */ - int CyaSSL_get_keyblock_size(CYASSL* ssl) - { - if (ssl == NULL) - return SSL_FATAL_ERROR; - - return 2 * (ssl->specs.key_size + ssl->specs.iv_size + - ssl->specs.hash_size); - } - - - /* store keys returns SSL_SUCCESS or -1 on error */ - int CyaSSL_get_keys(CYASSL* ssl, unsigned char** ms, unsigned int* msLen, - unsigned char** sr, unsigned int* srLen, - unsigned char** cr, unsigned int* crLen) - { - if (ssl == NULL || ssl->arrays == NULL) - return SSL_FATAL_ERROR; - - *ms = ssl->arrays->masterSecret; - *sr = ssl->arrays->serverRandom; - *cr = ssl->arrays->clientRandom; - - *msLen = SECRET_LEN; - *srLen = RAN_LEN; - *crLen = RAN_LEN; - - return SSL_SUCCESS; - } - - - void CyaSSL_set_accept_state(CYASSL* ssl) - { - byte haveRSA = 1; - byte havePSK = 0; - - CYASSL_ENTER("SSL_set_accept_state"); - ssl->options.side = CYASSL_SERVER_END; - /* reset suites in case user switched */ - - #ifdef NO_RSA - haveRSA = 0; - #endif - #ifndef NO_PSK - havePSK = ssl->options.havePSK; - #endif - InitSuites(ssl->suites, ssl->version, haveRSA, havePSK, - ssl->options.haveDH, ssl->options.haveNTRU, - ssl->options.haveECDSAsig, ssl->options.haveStaticECC, - ssl->options.side); - } -#endif - - /* return true if connection established */ - int CyaSSL_is_init_finished(CYASSL* ssl) - { - if (ssl == NULL) - return 0; - - if (ssl->options.handShakeState == HANDSHAKE_DONE) - return 1; - - return 0; - } - -#if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) - void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX* ctx, - CYASSL_RSA*(*f)(CYASSL*, int, int)) - { - /* CyaSSL verifies all these internally */ - (void)ctx; - (void)f; - } - - - void CyaSSL_set_shutdown(CYASSL* ssl, int opt) - { - (void)ssl; - (void)opt; - } - - - long CyaSSL_CTX_set_options(CYASSL_CTX* ctx, long opt) - { - /* goahead calls with 0, do nothing */ - CYASSL_ENTER("SSL_CTX_set_options"); - (void)ctx; - return opt; - } - - - int CyaSSL_set_rfd(CYASSL* ssl, int rfd) - { - CYASSL_ENTER("SSL_set_rfd"); - ssl->rfd = rfd; /* not used directly to allow IO callbacks */ - - ssl->IOCB_ReadCtx = &ssl->rfd; - - return SSL_SUCCESS; - } - - - int CyaSSL_set_wfd(CYASSL* ssl, int wfd) - { - CYASSL_ENTER("SSL_set_wfd"); - ssl->wfd = wfd; /* not used directly to allow IO callbacks */ - - ssl->IOCB_WriteCtx = &ssl->wfd; - - return SSL_SUCCESS; - } - - - CYASSL_RSA* CyaSSL_RSA_generate_key(int len, unsigned long bits, - void(*f)(int, int, void*), void* data) - { - /* no tmp key needed, actual generation not supported */ - CYASSL_ENTER("RSA_generate_key"); - (void)len; - (void)bits; - (void)f; - (void)data; - return NULL; - } - - - - CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert( - CYASSL_X509_STORE_CTX* ctx) - { - (void)ctx; - return 0; - } - - - int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX* ctx) - { - if (ctx != NULL) - return ctx->error; - return 0; - } - - - int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX* ctx) - { - (void)ctx; - return 0; - } - - - CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void) - { - static CYASSL_BIO_METHOD meth; - - CYASSL_ENTER("BIO_f_buffer"); - meth.type = BIO_BUFFER; - - return &meth; - } - - - long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO* bio, long size) - { - /* CyaSSL has internal buffer, compatibility only */ - CYASSL_ENTER("BIO_set_write_buffer_size"); - (void)bio; - return size; - } - - - CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void) - { - static CYASSL_BIO_METHOD meth; - - CYASSL_ENTER("BIO_f_ssl"); - meth.type = BIO_SSL; - - return &meth; - } - - - CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int closeF) - { - CYASSL_BIO* bio = (CYASSL_BIO*) XMALLOC(sizeof(CYASSL_BIO), 0, - DYNAMIC_TYPE_OPENSSL); - - CYASSL_ENTER("BIO_new_socket"); - if (bio) { - bio->type = BIO_SOCKET; - bio->close = (byte)closeF; - bio->eof = 0; - bio->ssl = 0; - bio->fd = sfd; - bio->prev = 0; - bio->next = 0; - bio->mem = NULL; - bio->memLen = 0; - } - return bio; - } - - - int CyaSSL_BIO_eof(CYASSL_BIO* b) - { - CYASSL_ENTER("BIO_eof"); - if (b->eof) - return 1; - - return 0; - } - - - long CyaSSL_BIO_set_ssl(CYASSL_BIO* b, CYASSL* ssl, int closeF) - { - CYASSL_ENTER("BIO_set_ssl"); - b->ssl = ssl; - b->close = (byte)closeF; - /* add to ssl for bio free if SSL_free called before/instead of free_all? */ - - return 0; - } - - - CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD* method) - { - CYASSL_BIO* bio = (CYASSL_BIO*) XMALLOC(sizeof(CYASSL_BIO), 0, - DYNAMIC_TYPE_OPENSSL); - CYASSL_ENTER("BIO_new"); - if (bio) { - bio->type = method->type; - bio->close = 0; - bio->eof = 0; - bio->ssl = NULL; - bio->mem = NULL; - bio->memLen = 0; - bio->fd = 0; - bio->prev = NULL; - bio->next = NULL; - } - return bio; - } - - - int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio, const byte** p) - { - if (bio == NULL || p == NULL) - return SSL_FATAL_ERROR; - - *p = bio->mem; - - return bio->memLen; - } - - - CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len) - { - CYASSL_BIO* bio = NULL; - if (buf == NULL) - return bio; - - bio = CyaSSL_BIO_new(CyaSSL_BIO_s_mem()); - if (bio == NULL) - return bio; - - bio->memLen = len; - bio->mem = (byte*)XMALLOC(len, 0, DYNAMIC_TYPE_OPENSSL); - if (bio->mem == NULL) { - XFREE(bio, 0, DYNAMIC_TYPE_OPENSSL); - return NULL; - } - - XMEMCPY(bio->mem, buf, len); - - return bio; - } - - -#ifdef USE_WINDOWS_API - #define CloseSocket(s) closesocket(s) -#elif defined(CYASSL_MDK_ARM) - #define CloseSocket(s) closesocket(s) - extern int closesocket(int) ; -#else - #define CloseSocket(s) close(s) -#endif - - int CyaSSL_BIO_free(CYASSL_BIO* bio) - { - /* unchain?, doesn't matter in goahead since from free all */ - CYASSL_ENTER("BIO_free"); - if (bio) { - if (bio->close) { - if (bio->ssl) - CyaSSL_free(bio->ssl); - if (bio->fd) - CloseSocket(bio->fd); - } - if (bio->mem) - XFREE(bio->mem, 0, DYNAMIC_TYPE_OPENSSL); - XFREE(bio, 0, DYNAMIC_TYPE_OPENSSL); - } - return 0; - } - - - int CyaSSL_BIO_free_all(CYASSL_BIO* bio) - { - CYASSL_ENTER("BIO_free_all"); - while (bio) { - CYASSL_BIO* next = bio->next; - CyaSSL_BIO_free(bio); - bio = next; - } - return 0; - } - - - int CyaSSL_BIO_read(CYASSL_BIO* bio, void* buf, int len) - { - int ret; - CYASSL* ssl = 0; - CYASSL_BIO* front = bio; - - CYASSL_ENTER("BIO_read"); - /* already got eof, again is error */ - if (front->eof) - return SSL_FATAL_ERROR; - - while(bio && ((ssl = bio->ssl) == 0) ) - bio = bio->next; - - if (ssl == 0) return BAD_FUNC_ARG; - - ret = CyaSSL_read(ssl, buf, len); - if (ret == 0) - front->eof = 1; - else if (ret < 0) { - int err = CyaSSL_get_error(ssl, 0); - if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) - front->eof = 1; - } - return ret; - } - - - int CyaSSL_BIO_write(CYASSL_BIO* bio, const void* data, int len) - { - int ret; - CYASSL* ssl = 0; - CYASSL_BIO* front = bio; - - CYASSL_ENTER("BIO_write"); - /* already got eof, again is error */ - if (front->eof) - return SSL_FATAL_ERROR; - - while(bio && ((ssl = bio->ssl) == 0) ) - bio = bio->next; - - if (ssl == 0) return BAD_FUNC_ARG; - - ret = CyaSSL_write(ssl, data, len); - if (ret == 0) - front->eof = 1; - else if (ret < 0) { - int err = CyaSSL_get_error(ssl, 0); - if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) - front->eof = 1; - } - - return ret; - } - - - CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO* top, CYASSL_BIO* append) - { - CYASSL_ENTER("BIO_push"); - top->next = append; - append->prev = top; - - return top; - } - - - int CyaSSL_BIO_flush(CYASSL_BIO* bio) - { - /* for CyaSSL no flushing needed */ - CYASSL_ENTER("BIO_flush"); - (void)bio; - return 1; - } - - -#endif /* OPENSSL_EXTRA || GOAHEAD_WS */ - - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - - void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX* ctx, - void* userdata) - { - CYASSL_ENTER("SSL_CTX_set_default_passwd_cb_userdata"); - ctx->userdata = userdata; - } - - - void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX* ctx, pem_password_cb cb) - { - CYASSL_ENTER("SSL_CTX_set_default_passwd_cb"); - ctx->passwd_cb = cb; - } - - int CyaSSL_num_locks(void) - { - return 0; - } - - void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, int)) - { - (void)f; - } - - void CyaSSL_set_id_callback(unsigned long (*f)(void)) - { - (void)f; - } - - unsigned long CyaSSL_ERR_get_error(void) - { - /* TODO: */ - return 0; - } - - int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER* type, - const CYASSL_EVP_MD* md, const byte* salt, - const byte* data, int sz, int count, byte* key, byte* iv) - { - int keyLen = 0; - int ivLen = 0; - - Md5 myMD; - byte digest[MD5_DIGEST_SIZE]; - - int j; - int keyLeft; - int ivLeft; - int keyOutput = 0; - - CYASSL_ENTER("EVP_BytesToKey"); - InitMd5(&myMD); - - /* only support MD5 for now */ - if (XSTRNCMP(md, "MD5", 3) != 0) return 0; - - /* only support CBC DES and AES for now */ - if (XSTRNCMP(type, "DES-CBC", 7) == 0) { - keyLen = DES_KEY_SIZE; - ivLen = DES_IV_SIZE; - } - else if (XSTRNCMP(type, "DES-EDE3-CBC", 12) == 0) { - keyLen = DES3_KEY_SIZE; - ivLen = DES_IV_SIZE; - } - else if (XSTRNCMP(type, "AES-128-CBC", 11) == 0) { - keyLen = AES_128_KEY_SIZE; - ivLen = AES_IV_SIZE; - } - else if (XSTRNCMP(type, "AES-192-CBC", 11) == 0) { - keyLen = AES_192_KEY_SIZE; - ivLen = AES_IV_SIZE; - } - else if (XSTRNCMP(type, "AES-256-CBC", 11) == 0) { - keyLen = AES_256_KEY_SIZE; - ivLen = AES_IV_SIZE; - } - else - return 0; - - keyLeft = keyLen; - ivLeft = ivLen; - - while (keyOutput < (keyLen + ivLen)) { - int digestLeft = MD5_DIGEST_SIZE; - /* D_(i - 1) */ - if (keyOutput) /* first time D_0 is empty */ - Md5Update(&myMD, digest, MD5_DIGEST_SIZE); - /* data */ - Md5Update(&myMD, data, sz); - /* salt */ - if (salt) - Md5Update(&myMD, salt, EVP_SALT_SIZE); - Md5Final(&myMD, digest); - /* count */ - for (j = 1; j < count; j++) { - Md5Update(&myMD, digest, MD5_DIGEST_SIZE); - Md5Final(&myMD, digest); - } - - if (keyLeft) { - int store = min(keyLeft, MD5_DIGEST_SIZE); - XMEMCPY(&key[keyLen - keyLeft], digest, store); - - keyOutput += store; - keyLeft -= store; - digestLeft -= store; - } - - if (ivLeft && digestLeft) { - int store = min(ivLeft, digestLeft); - XMEMCPY(&iv[ivLen - ivLeft], &digest[MD5_DIGEST_SIZE - - digestLeft], store); - keyOutput += store; - ivLeft -= store; - } - } - if (keyOutput != (keyLen + ivLen)) - return 0; - return keyOutput; - } - -#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ - - -#ifdef OPENSSL_EXTRA - - unsigned long CyaSSLeay(void) - { - return SSLEAY_VERSION_NUMBER; - } - - - const char* CyaSSLeay_version(int type) - { - static const char* version = "SSLeay CyaSSL compatibility"; - (void)type; - return version; - } - - - void CyaSSL_MD5_Init(CYASSL_MD5_CTX* md5) - { - typedef char md5_test[sizeof(MD5_CTX) >= sizeof(Md5) ? 1 : -1]; - (void)sizeof(md5_test); - - CYASSL_ENTER("MD5_Init"); - InitMd5((Md5*)md5); - } - - - void CyaSSL_MD5_Update(CYASSL_MD5_CTX* md5, const void* input, - unsigned long sz) - { - CYASSL_ENTER("CyaSSL_MD5_Update"); - Md5Update((Md5*)md5, (const byte*)input, (word32)sz); - } - - - void CyaSSL_MD5_Final(byte* input, CYASSL_MD5_CTX* md5) - { - CYASSL_ENTER("MD5_Final"); - Md5Final((Md5*)md5, input); - } - - - void CyaSSL_SHA_Init(CYASSL_SHA_CTX* sha) - { - typedef char sha_test[sizeof(SHA_CTX) >= sizeof(Sha) ? 1 : -1]; - (void)sizeof(sha_test); - - CYASSL_ENTER("SHA_Init"); - InitSha((Sha*)sha); /* OpenSSL compat, no ret */ - } - - - void CyaSSL_SHA_Update(CYASSL_SHA_CTX* sha, const void* input, - unsigned long sz) - { - CYASSL_ENTER("SHA_Update"); - ShaUpdate((Sha*)sha, (const byte*)input, (word32)sz); - } - - - void CyaSSL_SHA_Final(byte* input, CYASSL_SHA_CTX* sha) - { - CYASSL_ENTER("SHA_Final"); - ShaFinal((Sha*)sha, input); - } - - - void CyaSSL_SHA1_Init(CYASSL_SHA_CTX* sha) - { - CYASSL_ENTER("SHA1_Init"); - SHA_Init(sha); - } - - - void CyaSSL_SHA1_Update(CYASSL_SHA_CTX* sha, const void* input, - unsigned long sz) - { - CYASSL_ENTER("SHA1_Update"); - SHA_Update(sha, input, sz); - } - - - void CyaSSL_SHA1_Final(byte* input, CYASSL_SHA_CTX* sha) - { - CYASSL_ENTER("SHA1_Final"); - SHA_Final(input, sha); - } - - - void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX* sha256) - { - typedef char sha_test[sizeof(SHA256_CTX) >= sizeof(Sha256) ? 1 : -1]; - (void)sizeof(sha_test); - - CYASSL_ENTER("SHA256_Init"); - InitSha256((Sha256*)sha256); /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX* sha, const void* input, - unsigned long sz) - { - CYASSL_ENTER("SHA256_Update"); - Sha256Update((Sha256*)sha, (const byte*)input, (word32)sz); - /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA256_Final(byte* input, CYASSL_SHA256_CTX* sha) - { - CYASSL_ENTER("SHA256_Final"); - Sha256Final((Sha256*)sha, input); - /* OpenSSL compat, no error */ - } - - - #ifdef CYASSL_SHA384 - - void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX* sha) - { - typedef char sha_test[sizeof(SHA384_CTX) >= sizeof(Sha384) ? 1 : -1]; - (void)sizeof(sha_test); - - CYASSL_ENTER("SHA384_Init"); - InitSha384((Sha384*)sha); /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX* sha, const void* input, - unsigned long sz) - { - CYASSL_ENTER("SHA384_Update"); - Sha384Update((Sha384*)sha, (const byte*)input, (word32)sz); - /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA384_Final(byte* input, CYASSL_SHA384_CTX* sha) - { - CYASSL_ENTER("SHA384_Final"); - Sha384Final((Sha384*)sha, input); - /* OpenSSL compat, no error */ - } - - #endif /* CYASSL_SHA384 */ - - - #ifdef CYASSL_SHA512 - - void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX* sha) - { - typedef char sha_test[sizeof(SHA512_CTX) >= sizeof(Sha512) ? 1 : -1]; - (void)sizeof(sha_test); - - CYASSL_ENTER("SHA512_Init"); - InitSha512((Sha512*)sha); /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX* sha, const void* input, - unsigned long sz) - { - CYASSL_ENTER("SHA512_Update"); - Sha512Update((Sha512*)sha, (const byte*)input, (word32)sz); - /* OpenSSL compat, no error */ - } - - - void CyaSSL_SHA512_Final(byte* input, CYASSL_SHA512_CTX* sha) - { - CYASSL_ENTER("SHA512_Final"); - Sha512Final((Sha512*)sha, input); - /* OpenSSL compat, no error */ - } - - #endif /* CYASSL_SHA512 */ - - - const CYASSL_EVP_MD* CyaSSL_EVP_md5(void) - { - static const char* type = "MD5"; - CYASSL_ENTER("EVP_md5"); - return type; - } - - - const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void) - { - static const char* type = "SHA"; - CYASSL_ENTER("EVP_sha1"); - return type; - } - - - const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void) - { - static const char* type = "SHA256"; - CYASSL_ENTER("EVP_sha256"); - return type; - } - - #ifdef CYASSL_SHA384 - - const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void) - { - static const char* type = "SHA384"; - CYASSL_ENTER("EVP_sha384"); - return type; - } - - #endif /* CYASSL_SHA384 */ - - #ifdef CYASSL_SHA512 - - const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void) - { - static const char* type = "SHA512"; - CYASSL_ENTER("EVP_sha512"); - return type; - } - - #endif /* CYASSL_SHA512 */ - - - void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx) - { - CYASSL_ENTER("EVP_CIPHER_MD_CTX_init"); - (void)ctx; - /* do nothing */ - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void) - { - static const char* type = "AES128-CBC"; - CYASSL_ENTER("CyaSSL_EVP_aes_128_cbc"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void) - { - static const char* type = "AES192-CBC"; - CYASSL_ENTER("CyaSSL_EVP_aes_192_cbc"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void) - { - static const char* type = "AES256-CBC"; - CYASSL_ENTER("CyaSSL_EVP_aes_256_cbc"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void) - { - static const char* type = "AES128-CTR"; - CYASSL_ENTER("CyaSSL_EVP_aes_128_ctr"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void) - { - static const char* type = "AES192-CTR"; - CYASSL_ENTER("CyaSSL_EVP_aes_192_ctr"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void) - { - static const char* type = "AES256-CTR"; - CYASSL_ENTER("CyaSSL_EVP_aes_256_ctr"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void) - { - static const char* type = "DES-CBC"; - CYASSL_ENTER("CyaSSL_EVP_des_cbc"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void) - { - static const char* type = "DES-EDE3-CBC"; - CYASSL_ENTER("CyaSSL_EVP_des_ede3_cbc"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void) - { - static const char* type = "ARC4"; - CYASSL_ENTER("CyaSSL_EVP_rc4"); - return type; - } - - - const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void) - { - static const char* type = "NULL"; - CYASSL_ENTER("CyaSSL_EVP_enc_null"); - return type; - } - - - int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx) - { - CYASSL_ENTER("EVP_MD_CTX_cleanup"); - (void)ctx; - return 0; - } - - - - void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_ENTER("EVP_CIPHER_CTX_init"); - if (ctx) { - ctx->cipherType = 0xff; /* no init */ - ctx->keyLen = 0; - ctx->enc = 1; /* start in encrypt mode */ - } - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_ENTER("EVP_CIPHER_CTX_cleanup"); - if (ctx) { - ctx->cipherType = 0xff; /* no more init */ - ctx->keyLen = 0; - } - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx, - const CYASSL_EVP_CIPHER* type, byte* key, - byte* iv, int enc) - { - int ret = 0; - - CYASSL_ENTER("CyaSSL_EVP_CipherInit"); - if (ctx == NULL) { - CYASSL_MSG("no ctx"); - return 0; /* failure */ - } - - if (type == NULL && ctx->cipherType == 0xff) { - CYASSL_MSG("no type set"); - return 0; /* failure */ - } - - if (ctx->cipherType == AES_128_CBC_TYPE || (type && - XSTRNCMP(type, "AES128-CBC", 10) == 0)) { - CYASSL_MSG("AES-128-CBC"); - ctx->cipherType = AES_128_CBC_TYPE; - ctx->keyLen = 16; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } - else if (ctx->cipherType == AES_192_CBC_TYPE || (type && - XSTRNCMP(type, "AES192-CBC", 10) == 0)) { - CYASSL_MSG("AES-192-CBC"); - ctx->cipherType = AES_192_CBC_TYPE; - ctx->keyLen = 24; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } - else if (ctx->cipherType == AES_256_CBC_TYPE || (type && - XSTRNCMP(type, "AES256-CBC", 10) == 0)) { - CYASSL_MSG("AES-256-CBC"); - ctx->cipherType = AES_256_CBC_TYPE; - ctx->keyLen = 32; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } -#ifdef CYASSL_AES_COUNTER - else if (ctx->cipherType == AES_128_CTR_TYPE || (type && - XSTRNCMP(type, "AES128-CTR", 10) == 0)) { - CYASSL_MSG("AES-128-CTR"); - ctx->cipherType = AES_128_CTR_TYPE; - ctx->keyLen = 16; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - AES_ENCRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } - else if (ctx->cipherType == AES_192_CTR_TYPE || (type && - XSTRNCMP(type, "AES192-CTR", 10) == 0)) { - CYASSL_MSG("AES-192-CTR"); - ctx->cipherType = AES_192_CTR_TYPE; - ctx->keyLen = 24; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - AES_ENCRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } - else if (ctx->cipherType == AES_256_CTR_TYPE || (type && - XSTRNCMP(type, "AES256-CTR", 10) == 0)) { - CYASSL_MSG("AES-256-CTR"); - ctx->cipherType = AES_256_CTR_TYPE; - ctx->keyLen = 32; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv, - AES_ENCRYPTION); - if (ret != 0) - return ret; - } - if (iv && key == NULL) { - ret = AesSetIV(&ctx->cipher.aes, iv); - if (ret != 0) - return ret; - } - } -#endif /* CYASSL_AES_CTR */ - else if (ctx->cipherType == DES_CBC_TYPE || (type && - XSTRNCMP(type, "DES-CBC", 7) == 0)) { - CYASSL_MSG("DES-CBC"); - ctx->cipherType = DES_CBC_TYPE; - ctx->keyLen = 8; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = Des_SetKey(&ctx->cipher.des, key, iv, - ctx->enc ? DES_ENCRYPTION : DES_DECRYPTION); - if (ret != 0) - return ret; - } - - if (iv && key == NULL) - Des_SetIV(&ctx->cipher.des, iv); - } - else if (ctx->cipherType == DES_EDE3_CBC_TYPE || (type && - XSTRNCMP(type, "DES-EDE3-CBC", 11) == 0)) { - CYASSL_MSG("DES-EDE3-CBC"); - ctx->cipherType = DES_EDE3_CBC_TYPE; - ctx->keyLen = 24; - if (enc == 0 || enc == 1) - ctx->enc = enc ? 1 : 0; - if (key) { - ret = Des3_SetKey(&ctx->cipher.des3, key, iv, - ctx->enc ? DES_ENCRYPTION : DES_DECRYPTION); - if (ret != 0) - return ret; - } - - if (iv && key == NULL) { - ret = Des3_SetIV(&ctx->cipher.des3, iv); - if (ret != 0) - return ret; - } - } - else if (ctx->cipherType == ARC4_TYPE || (type && - XSTRNCMP(type, "ARC4", 4) == 0)) { - CYASSL_MSG("ARC4"); - ctx->cipherType = ARC4_TYPE; - if (ctx->keyLen == 0) /* user may have already set */ - ctx->keyLen = 16; /* default to 128 */ - if (key) - Arc4SetKey(&ctx->cipher.arc4, key, ctx->keyLen); - } - else if (ctx->cipherType == NULL_CIPHER_TYPE || (type && - XSTRNCMP(type, "NULL", 4) == 0)) { - CYASSL_MSG("NULL cipher"); - ctx->cipherType = NULL_CIPHER_TYPE; - ctx->keyLen = 0; - } - else - return 0; /* failure */ - - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_ENTER("CyaSSL_EVP_CIPHER_CTX_key_length"); - if (ctx) - return ctx->keyLen; - - return 0; /* failure */ - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx, - int keylen) - { - CYASSL_ENTER("CyaSSL_EVP_CIPHER_CTX_set_key_length"); - if (ctx) - ctx->keyLen = keylen; - else - return 0; /* failure */ - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src, - word32 len) - { - int ret = 0; - CYASSL_ENTER("CyaSSL_EVP_Cipher"); - - if (ctx == NULL || dst == NULL || src == NULL) { - CYASSL_MSG("Bad function argument"); - return 0; /* failure */ - } - - if (ctx->cipherType == 0xff) { - CYASSL_MSG("no init"); - return 0; /* failure */ - } - - switch (ctx->cipherType) { - - case AES_128_CBC_TYPE : - case AES_192_CBC_TYPE : - case AES_256_CBC_TYPE : - CYASSL_MSG("AES CBC"); - if (ctx->enc) - ret = AesCbcEncrypt(&ctx->cipher.aes, dst, src, len); - else - ret = AesCbcDecrypt(&ctx->cipher.aes, dst, src, len); - break; - -#ifdef CYASSL_AES_COUNTER - case AES_128_CTR_TYPE : - case AES_192_CTR_TYPE : - case AES_256_CTR_TYPE : - CYASSL_MSG("AES CTR"); - AesCtrEncrypt(&ctx->cipher.aes, dst, src, len); - break; -#endif - - case DES_CBC_TYPE : - if (ctx->enc) - Des_CbcEncrypt(&ctx->cipher.des, dst, src, len); - else - Des_CbcDecrypt(&ctx->cipher.des, dst, src, len); - break; - - case DES_EDE3_CBC_TYPE : - if (ctx->enc) - ret = Des3_CbcEncrypt(&ctx->cipher.des3, dst, src, len); - else - ret = Des3_CbcDecrypt(&ctx->cipher.des3, dst, src, len); - break; - - case ARC4_TYPE : - Arc4Process(&ctx->cipher.arc4, dst, src, len); - break; - - case NULL_CIPHER_TYPE : - XMEMCPY(dst, src, len); - break; - - default: { - CYASSL_MSG("bad type"); - return 0; /* failure */ - } - } - - if (ret != 0) { - CYASSL_MSG("CyaSSL_EVP_Cipher failure"); - return 0; /* failuer */ - } - - CYASSL_MSG("CyaSSL_EVP_Cipher success"); - return SSL_SUCCESS; /* success */ - } - - - /* store for external read of iv, SSL_SUCCESS on success */ - int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_ENTER("CyaSSL_StoreExternalIV"); - - if (ctx == NULL) { - CYASSL_MSG("Bad function argument"); - return SSL_FATAL_ERROR; - } - - switch (ctx->cipherType) { - - case AES_128_CBC_TYPE : - case AES_192_CBC_TYPE : - case AES_256_CBC_TYPE : - CYASSL_MSG("AES CBC"); - memcpy(ctx->iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); - break; - -#ifdef CYASSL_AES_COUNTER - case AES_128_CTR_TYPE : - case AES_192_CTR_TYPE : - case AES_256_CTR_TYPE : - CYASSL_MSG("AES CTR"); - memcpy(ctx->iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); - break; -#endif - - case DES_CBC_TYPE : - CYASSL_MSG("DES CBC"); - memcpy(ctx->iv, &ctx->cipher.des.reg, DES_BLOCK_SIZE); - break; - - case DES_EDE3_CBC_TYPE : - CYASSL_MSG("DES EDE3 CBC"); - memcpy(ctx->iv, &ctx->cipher.des.reg, DES_BLOCK_SIZE); - break; - - case ARC4_TYPE : - CYASSL_MSG("ARC4"); - break; - - case NULL_CIPHER_TYPE : - CYASSL_MSG("NULL"); - break; - - default: { - CYASSL_MSG("bad type"); - return SSL_FATAL_ERROR; - } - } - return SSL_SUCCESS; - } - - - /* set internal IV from external, SSL_SUCCESS on success */ - int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx) - { - - CYASSL_ENTER("CyaSSL_SetInternalIV"); - - if (ctx == NULL) { - CYASSL_MSG("Bad function argument"); - return SSL_FATAL_ERROR; - } - - switch (ctx->cipherType) { - - case AES_128_CBC_TYPE : - case AES_192_CBC_TYPE : - case AES_256_CBC_TYPE : - CYASSL_MSG("AES CBC"); - memcpy(&ctx->cipher.aes.reg, ctx->iv, AES_BLOCK_SIZE); - break; - -#ifdef CYASSL_AES_COUNTER - case AES_128_CTR_TYPE : - case AES_192_CTR_TYPE : - case AES_256_CTR_TYPE : - CYASSL_MSG("AES CTR"); - memcpy(&ctx->cipher.aes.reg, ctx->iv, AES_BLOCK_SIZE); - break; -#endif - - case DES_CBC_TYPE : - CYASSL_MSG("DES CBC"); - memcpy(&ctx->cipher.des.reg, ctx->iv, DES_BLOCK_SIZE); - break; - - case DES_EDE3_CBC_TYPE : - CYASSL_MSG("DES EDE3 CBC"); - memcpy(&ctx->cipher.des.reg, ctx->iv, DES_BLOCK_SIZE); - break; - - case ARC4_TYPE : - CYASSL_MSG("ARC4"); - break; - - case NULL_CIPHER_TYPE : - CYASSL_MSG("NULL"); - break; - - default: { - CYASSL_MSG("bad type"); - return SSL_FATAL_ERROR; - } - } - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, const CYASSL_EVP_MD* type) - { - CYASSL_ENTER("EVP_DigestInit"); - if (XSTRNCMP(type, "MD5", 3) == 0) { - ctx->macType = MD5; - CyaSSL_MD5_Init((MD5_CTX*)&ctx->hash); - } - else if (XSTRNCMP(type, "SHA256", 6) == 0) { - ctx->macType = SHA256; - CyaSSL_SHA256_Init((SHA256_CTX*)&ctx->hash); - } - #ifdef CYASSL_SHA384 - else if (XSTRNCMP(type, "SHA384", 6) == 0) { - ctx->macType = SHA384; - CyaSSL_SHA384_Init((SHA384_CTX*)&ctx->hash); - } - #endif - #ifdef CYASSL_SHA512 - else if (XSTRNCMP(type, "SHA512", 6) == 0) { - ctx->macType = SHA512; - CyaSSL_SHA512_Init((SHA512_CTX*)&ctx->hash); - } - #endif - /* has to be last since would pick or 256, 384, or 512 too */ - else if (XSTRNCMP(type, "SHA", 3) == 0) { - ctx->macType = SHA; - CyaSSL_SHA_Init((SHA_CTX*)&ctx->hash); - } - else - return BAD_FUNC_ARG; - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data, - unsigned long sz) - { - CYASSL_ENTER("EVP_DigestUpdate"); - if (ctx->macType == MD5) - CyaSSL_MD5_Update((MD5_CTX*)&ctx->hash, data, (unsigned long)sz); - else if (ctx->macType == SHA) - CyaSSL_SHA_Update((SHA_CTX*)&ctx->hash, data, (unsigned long)sz); - else if (ctx->macType == SHA256) - CyaSSL_SHA256_Update((SHA256_CTX*)&ctx->hash, data, - (unsigned long)sz); - #ifdef CYASSL_SHA384 - else if (ctx->macType == SHA384) - CyaSSL_SHA384_Update((SHA384_CTX*)&ctx->hash, data, - (unsigned long)sz); - #endif - #ifdef CYASSL_SHA512 - else if (ctx->macType == SHA512) - CyaSSL_SHA512_Update((SHA512_CTX*)&ctx->hash, data, - (unsigned long)sz); - #endif - else - return BAD_FUNC_ARG; - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, - unsigned int* s) - { - CYASSL_ENTER("EVP_DigestFinal"); - if (ctx->macType == MD5) { - CyaSSL_MD5_Final(md, (MD5_CTX*)&ctx->hash); - if (s) *s = MD5_DIGEST_SIZE; - } - else if (ctx->macType == SHA) { - CyaSSL_SHA_Final(md, (SHA_CTX*)&ctx->hash); - if (s) *s = SHA_DIGEST_SIZE; - } - else if (ctx->macType == SHA256) { - CyaSSL_SHA256_Final(md, (SHA256_CTX*)&ctx->hash); - if (s) *s = SHA256_DIGEST_SIZE; - } - #ifdef CYASSL_SHA384 - else if (ctx->macType == SHA384) { - CyaSSL_SHA384_Final(md, (SHA384_CTX*)&ctx->hash); - if (s) *s = SHA384_DIGEST_SIZE; - } - #endif - #ifdef CYASSL_SHA512 - else if (ctx->macType == SHA512) { - CyaSSL_SHA512_Final(md, (SHA512_CTX*)&ctx->hash); - if (s) *s = SHA512_DIGEST_SIZE; - } - #endif - else - return BAD_FUNC_ARG; - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, unsigned char* md, - unsigned int* s) - { - CYASSL_ENTER("EVP_DigestFinal_ex"); - return EVP_DigestFinal(ctx, md, s); - } - - - unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, const void* key, - int key_len, const unsigned char* d, int n, - unsigned char* md, unsigned int* md_len) - { - Hmac hmac; - - CYASSL_ENTER("HMAC"); - if (!md) return NULL; /* no static buffer support */ - - if (XSTRNCMP(evp_md, "MD5", 3) == 0) { - if (HmacSetKey(&hmac, MD5, (const byte*)key, key_len) != 0) - return NULL; - - if (md_len) *md_len = MD5_DIGEST_SIZE; - } - else if (XSTRNCMP(evp_md, "SHA", 3) == 0) { - if (HmacSetKey(&hmac, SHA, (const byte*)key, key_len) != 0) - return NULL; - - if (md_len) *md_len = SHA_DIGEST_SIZE; - } - else - return NULL; - - if (HmacUpdate(&hmac, d, n) != 0) - return NULL; - - if (HmacFinal(&hmac, md) != 0) - return NULL; - - return md; - } - - void CyaSSL_ERR_clear_error(void) - { - /* TODO: */ - } - - - int CyaSSL_RAND_status(void) - { - return SSL_SUCCESS; /* CTaoCrypt provides enough seed internally */ - } - - - - void CyaSSL_RAND_add(const void* add, int len, double entropy) - { - (void)add; - (void)len; - (void)entropy; - - /* CyaSSL seeds/adds internally, use explicit RNG if you want - to take control */ - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key, - CYASSL_DES_key_schedule* schedule) - { - CYASSL_ENTER("DES_key_sched"); - XMEMCPY(schedule, key, sizeof(const_DES_cblock)); - return SSL_SUCCESS; - } - - - void CyaSSL_DES_cbc_encrypt(const unsigned char* input, - unsigned char* output, long length, - CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, - int enc) - { - Des myDes; - - CYASSL_ENTER("DES_cbc_encrypt"); - - /* OpenSSL compat, no ret */ - Des_SetKey(&myDes, (const byte*)schedule, (const byte*)ivec, !enc); - - if (enc) - Des_CbcEncrypt(&myDes, output, input, (word32)length); - else - Des_CbcDecrypt(&myDes, output, input, (word32)length); - } - - - /* correctly sets ivec for next call */ - void CyaSSL_DES_ncbc_encrypt(const unsigned char* input, - unsigned char* output, long length, - CYASSL_DES_key_schedule* schedule, CYASSL_DES_cblock* ivec, - int enc) - { - Des myDes; - - CYASSL_ENTER("DES_ncbc_encrypt"); - - /* OpenSSL compat, no ret */ - Des_SetKey(&myDes, (const byte*)schedule, (const byte*)ivec, !enc); - - if (enc) - Des_CbcEncrypt(&myDes, output, input, (word32)length); - else - Des_CbcDecrypt(&myDes, output, input, (word32)length); - - XMEMCPY(ivec, output + length - sizeof(DES_cblock), sizeof(DES_cblock)); - } - - - void CyaSSL_ERR_free_strings(void) - { - /* handled internally */ - } - - - void CyaSSL_ERR_remove_state(unsigned long state) - { - /* TODO: GetErrors().Remove(); */ - (void)state; - } - - - void CyaSSL_EVP_cleanup(void) - { - /* nothing to do here */ - } - - - void CyaSSL_cleanup_all_ex_data(void) - { - /* nothing to do here */ - } - - - long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode) - { - /* SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER is CyaSSL default mode */ - - CYASSL_ENTER("SSL_CTX_set_mode"); - if (mode == SSL_MODE_ENABLE_PARTIAL_WRITE) - ctx->partialWrite = 1; - - return mode; - } - - - long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx) - { - /* TODO: */ - (void)ctx; - return 0; - } - - - void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m) - { - /* TODO: maybe? */ - (void)ctx; - (void)m; - } - - - int CyaSSL_CTX_set_session_id_context(CYASSL_CTX* ctx, - const unsigned char* sid_ctx, - unsigned int sid_ctx_len) - { - /* No application specific context needed for cyaSSL */ - (void)ctx; - (void)sid_ctx; - (void)sid_ctx_len; - return SSL_SUCCESS; - } - - - long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX* ctx) - { - /* TODO: maybe? */ - (void)ctx; - return (~0); - } - - unsigned long CyaSSL_ERR_get_error_line_data(const char** file, int* line, - const char** data, int *flags) - { - /* Not implemented */ - (void)file; - (void)line; - (void)data; - (void)flags; - return 0; - } - -#endif /* OPENSSL_EXTRA */ - - -#if defined(KEEP_PEER_CERT) - - CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_peer_certificate"); - if (ssl->peerCert.issuer.sz) - return &ssl->peerCert; - else - return 0; - } - -#endif /* KEEP_PEER_CERT */ - - -#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) - - void CyaSSL_FreeX509(CYASSL_X509* x509) - { - CYASSL_ENTER("CyaSSL_FreeX509"); - FreeX509(x509); - } - - - /* return the next, if any, altname from the peer cert */ - char* CyaSSL_X509_get_next_altname(CYASSL_X509* cert) - { - char* ret = NULL; - CYASSL_ENTER("CyaSSL_X509_get_next_altname"); - - /* don't have any to work with */ - if (cert == NULL || cert->altNames == NULL) - return NULL; - - /* already went through them */ - if (cert->altNamesNext == NULL) - return NULL; - - ret = cert->altNamesNext->name; - cert->altNamesNext = cert->altNamesNext->next; - - return ret; - } - - - CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509* cert) - { - CYASSL_ENTER("X509_get_issuer_name"); - return &cert->issuer; - } - - - CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509* cert) - { - CYASSL_ENTER("X509_get_subject_name"); - return &cert->subject; - } - - - int CyaSSL_X509_get_isCA(CYASSL_X509* x509) - { - int isCA = 0; - - CYASSL_ENTER("CyaSSL_X509_get_isCA"); - - if (x509 != NULL) - isCA = x509->isCa; - - CYASSL_LEAVE("CyaSSL_X509_get_isCA", isCA); - - return isCA; - } - - -#ifdef OPENSSL_EXTRA - int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509* x509, int nid) - { - int isSet = 0; - - CYASSL_ENTER("CyaSSL_X509_ext_isSet_by_NID"); - - if (x509 != NULL) { - switch (nid) { - case BASIC_CA_OID: isSet = x509->basicConstSet; break; - case ALT_NAMES_OID: isSet = x509->subjAltNameSet; break; - case AUTH_KEY_OID: isSet = x509->authKeyIdSet; break; - case SUBJ_KEY_OID: isSet = x509->subjKeyIdSet; break; - case KEY_USAGE_OID: isSet = x509->keyUsageSet; break; - #ifdef CYASSL_SEP - case CERT_POLICY_OID: isSet = x509->certPolicySet; break; - #endif /* CYASSL_SEP */ - } - } - - CYASSL_LEAVE("CyaSSL_X509_ext_isSet_by_NID", isSet); - - return isSet; - } - - - int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509* x509, int nid) - { - int crit = 0; - - CYASSL_ENTER("CyaSSL_X509_ext_get_critical_by_NID"); - - if (x509 != NULL) { - switch (nid) { - case BASIC_CA_OID: crit = x509->basicConstCrit; break; - case ALT_NAMES_OID: crit = x509->subjAltNameCrit; break; - case AUTH_KEY_OID: crit = x509->authKeyIdCrit; break; - case SUBJ_KEY_OID: crit = x509->subjKeyIdCrit; break; - case KEY_USAGE_OID: crit = x509->keyUsageCrit; break; - #ifdef CYASSL_SEP - case CERT_POLICY_OID: crit = x509->certPolicyCrit; break; - #endif /* CYASSL_SEP */ - } - } - - CYASSL_LEAVE("CyaSSL_X509_ext_get_critical_by_NID", crit); - - return crit; - } - - - int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509* x509) - { - int isSet = 0; - - CYASSL_ENTER("CyaSSL_X509_get_isSet_pathLength"); - - if (x509 != NULL) - isSet = x509->basicConstPlSet; - - CYASSL_LEAVE("CyaSSL_X509_get_isSet_pathLength", isSet); - - return isSet; - } - - - word32 CyaSSL_X509_get_pathLength(CYASSL_X509* x509) - { - word32 pathLength = 0; - - CYASSL_ENTER("CyaSSL_X509_get_pathLength"); - - if (x509 != NULL) - pathLength = x509->pathLength; - - CYASSL_LEAVE("CyaSSL_X509_get_pathLength", pathLength); - - return pathLength; - } - - - unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509* x509) - { - word16 usage = 0; - - CYASSL_ENTER("CyaSSL_X509_get_keyUsage"); - - if (x509 != NULL) - usage = x509->keyUsage; - - CYASSL_LEAVE("CyaSSL_X509_get_keyUsage", usage); - - return usage; - } - - - byte* CyaSSL_X509_get_authorityKeyID( - CYASSL_X509* x509, byte* dst, int* dstLen) - { - byte *id = NULL; - int copySz = 0; - - CYASSL_ENTER("CyaSSL_X509_get_authorityKeyID"); - - if (x509 != NULL) { - if (x509->authKeyIdSet) { - copySz = min(dstLen != NULL ? *dstLen : 0, - (int)x509->authKeyIdSz); - id = x509->authKeyId; - } - - if (dst != NULL && dstLen != NULL && id != NULL && copySz > 0) { - XMEMCPY(dst, id, copySz); - id = dst; - *dstLen = copySz; - } - } - - CYASSL_LEAVE("CyaSSL_X509_get_authorityKeyID", copySz); - - return id; - } - - - byte* CyaSSL_X509_get_subjectKeyID( - CYASSL_X509* x509, byte* dst, int* dstLen) - { - byte *id = NULL; - int copySz = 0; - - CYASSL_ENTER("CyaSSL_X509_get_subjectKeyID"); - - if (x509 != NULL) { - if (x509->subjKeyIdSet) { - copySz = min(dstLen != NULL ? *dstLen : 0, - (int)x509->subjKeyIdSz); - id = x509->subjKeyId; - } - - if (dst != NULL && dstLen != NULL && id != NULL && copySz > 0) { - XMEMCPY(dst, id, copySz); - id = dst; - *dstLen = copySz; - } - } - - CYASSL_LEAVE("CyaSSL_X509_get_subjectKeyID", copySz); - - return id; - } - - - int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME* name) - { - int count = 0; - - CYASSL_ENTER("CyaSSL_X509_NAME_entry_count"); - - if (name != NULL) - count = name->fullName.entryCount; - - CYASSL_LEAVE("CyaSSL_X509_NAME_entry_count", count); - return count; - } - - - int CyaSSL_X509_NAME_get_text_by_NID(CYASSL_X509_NAME* name, - int nid, char* buf, int len) - { - char *text = NULL; - int textSz = 0; - - CYASSL_ENTER("CyaSSL_X509_NAME_get_text_by_NID"); - - switch (nid) { - case ASN_COMMON_NAME: - text = name->fullName.fullName + name->fullName.cnIdx; - textSz = name->fullName.cnLen; - break; - case ASN_SUR_NAME: - text = name->fullName.fullName + name->fullName.snIdx; - textSz = name->fullName.snLen; - break; - case ASN_SERIAL_NUMBER: - text = name->fullName.fullName + name->fullName.serialIdx; - textSz = name->fullName.serialLen; - break; - case ASN_COUNTRY_NAME: - text = name->fullName.fullName + name->fullName.cIdx; - textSz = name->fullName.cLen; - break; - case ASN_LOCALITY_NAME: - text = name->fullName.fullName + name->fullName.lIdx; - textSz = name->fullName.lLen; - break; - case ASN_STATE_NAME: - text = name->fullName.fullName + name->fullName.stIdx; - textSz = name->fullName.stLen; - break; - case ASN_ORG_NAME: - text = name->fullName.fullName + name->fullName.oIdx; - textSz = name->fullName.oLen; - break; - case ASN_ORGUNIT_NAME: - text = name->fullName.fullName + name->fullName.ouIdx; - textSz = name->fullName.ouLen; - break; - default: - break; - } - - if (buf != NULL && text != NULL) { - textSz = min(textSz, len); - XMEMCPY(buf, text, textSz); - buf[textSz] = '\0'; - } - - CYASSL_LEAVE("CyaSSL_X509_NAME_get_text_by_NID", textSz); - return textSz; - } -#endif - - - /* copy name into in buffer, at most sz bytes, if buffer is null will - malloc buffer, call responsible for freeing */ - char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME* name, char* in, int sz) - { - int copySz = min(sz, name->sz); - - CYASSL_ENTER("CyaSSL_X509_NAME_oneline"); - if (!name->sz) return in; - - if (!in) { - in = (char*)XMALLOC(name->sz, 0, DYNAMIC_TYPE_OPENSSL); - if (!in ) return in; - copySz = name->sz; - } - - if (copySz == 0) - return in; - - XMEMCPY(in, name->name, copySz - 1); - in[copySz - 1] = 0; - - return in; - } - - - int CyaSSL_X509_get_signature_type(CYASSL_X509* x509) - { - int type = 0; - - CYASSL_ENTER("CyaSSL_X509_get_signature_type"); - - if (x509 != NULL) - type = x509->sigOID; - - return type; - } - - - int CyaSSL_X509_get_signature(CYASSL_X509* x509, - unsigned char* buf, int* bufSz) - { - CYASSL_ENTER("CyaSSL_X509_get_signature"); - if (x509 == NULL || bufSz == NULL || *bufSz < (int)x509->sig.length) - return SSL_FATAL_ERROR; - - if (buf != NULL) - XMEMCPY(buf, x509->sig.buffer, x509->sig.length); - *bufSz = x509->sig.length; - - return SSL_SUCCESS; - } - - - /* write X509 serial number in unsigned binary to buffer - buffer needs to be at least EXTERNAL_SERIAL_SIZE (32) for all cases - return SSL_SUCCESS on success */ - int CyaSSL_X509_get_serial_number(CYASSL_X509* x509, byte* in, int* inOutSz) - { - CYASSL_ENTER("CyaSSL_X509_get_serial_number"); - if (x509 == NULL || in == NULL || - inOutSz == NULL || *inOutSz < x509->serialSz) - return BAD_FUNC_ARG; - - XMEMCPY(in, x509->serial, x509->serialSz); - *inOutSz = x509->serialSz; - - return SSL_SUCCESS; - } - - - const byte* CyaSSL_X509_get_der(CYASSL_X509* x509, int* outSz) - { - CYASSL_ENTER("CyaSSL_X509_get_der"); - - if (x509 == NULL || outSz == NULL) - return NULL; - - *outSz = (int)x509->derCert.length; - return x509->derCert.buffer; - } - - - int CyaSSL_X509_version(CYASSL_X509* x509) - { - CYASSL_ENTER("CyaSSL_X509_version"); - - if (x509 == NULL) - return 0; - - return x509->version; - } - - - const byte* CyaSSL_X509_notBefore(CYASSL_X509* x509) - { - CYASSL_ENTER("CyaSSL_X509_notBefore"); - - if (x509 == NULL) - return NULL; - - return x509->notBefore; - } - - - const byte* CyaSSL_X509_notAfter(CYASSL_X509* x509) - { - CYASSL_ENTER("CyaSSL_X509_notAfter"); - - if (x509 == NULL) - return NULL; - - return x509->notAfter; - } - - -#ifdef CYASSL_SEP - -/* copy oid into in buffer, at most *inOutSz bytes, if buffer is null will - malloc buffer, call responsible for freeing. Actual size returned in - *inOutSz. Requires inOutSz be non-null */ -byte* CyaSSL_X509_get_device_type(CYASSL_X509* x509, byte* in, int *inOutSz) -{ - int copySz; - - CYASSL_ENTER("CyaSSL_X509_get_dev_type"); - if (inOutSz == NULL) return NULL; - if (!x509->deviceTypeSz) return in; - - copySz = min(*inOutSz, x509->deviceTypeSz); - - if (!in) { - in = (byte*)XMALLOC(x509->deviceTypeSz, 0, DYNAMIC_TYPE_OPENSSL); - if (!in) return in; - copySz = x509->deviceTypeSz; - } - - XMEMCPY(in, x509->deviceType, copySz); - *inOutSz = copySz; - - return in; -} - - -byte* CyaSSL_X509_get_hw_type(CYASSL_X509* x509, byte* in, int* inOutSz) -{ - int copySz; - - CYASSL_ENTER("CyaSSL_X509_get_hw_type"); - if (inOutSz == NULL) return NULL; - if (!x509->hwTypeSz) return in; - - copySz = min(*inOutSz, x509->hwTypeSz); - - if (!in) { - in = (byte*)XMALLOC(x509->hwTypeSz, 0, DYNAMIC_TYPE_OPENSSL); - if (!in) return in; - copySz = x509->hwTypeSz; - } - - XMEMCPY(in, x509->hwType, copySz); - *inOutSz = copySz; - - return in; -} - - -byte* CyaSSL_X509_get_hw_serial_number(CYASSL_X509* x509,byte* in,int* inOutSz) -{ - int copySz; - - CYASSL_ENTER("CyaSSL_X509_get_hw_serial_number"); - if (inOutSz == NULL) return NULL; - if (!x509->hwTypeSz) return in; - - copySz = min(*inOutSz, x509->hwSerialNumSz); - - if (!in) { - in = (byte*)XMALLOC(x509->hwSerialNumSz, 0, DYNAMIC_TYPE_OPENSSL); - if (!in) return in; - copySz = x509->hwSerialNumSz; - } - - XMEMCPY(in, x509->hwSerialNum, copySz); - *inOutSz = copySz; - - return in; -} - -#endif /* CYASSL_SEP */ - - -CYASSL_X509* CyaSSL_X509_d2i(CYASSL_X509** x509, const byte* in, int len) -{ - CYASSL_X509 *newX509 = NULL; - - CYASSL_ENTER("CyaSSL_X509_d2i"); - - if (in != NULL && len != 0) { - DecodedCert cert; - - InitDecodedCert(&cert, (byte*)in, len, NULL); - if (ParseCertRelative(&cert, CERT_TYPE, 0, NULL) == 0) { - newX509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), - NULL, DYNAMIC_TYPE_X509); - if (newX509 != NULL) { - InitX509(newX509, 1); - if (CopyDecodedToX509(newX509, &cert) != 0) { - XFREE(newX509, NULL, DYNAMIC_TYPE_X509); - newX509 = NULL; - } - } - } - FreeDecodedCert(&cert); - } - - if (x509 != NULL) - *x509 = newX509; - - return newX509; -} - - -#ifndef NO_FILESYSTEM - -#ifndef NO_STDIO_FILESYSTEM - -CYASSL_X509* CyaSSL_X509_d2i_fp(CYASSL_X509** x509, XFILE file) -{ - CYASSL_X509* newX509 = NULL; - - CYASSL_ENTER("CyaSSL_X509_d2i_fp"); - - if (file != XBADFILE) { - byte* fileBuffer = NULL; - long sz = 0; - - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - fileBuffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_FILE); - if (fileBuffer != NULL) { - if ((int)XFREAD(fileBuffer, sz, 1, file) > 0) { - newX509 = CyaSSL_X509_d2i(NULL, fileBuffer, (int)sz); - } - XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); - } - } - - if (x509 != NULL) - *x509 = newX509; - - return newX509; -} - -#endif /* NO_STDIO_FILESYSTEM */ - -CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format) -{ - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* fileBuffer = staticBuffer; - int dynamic = 0; - long sz = 0; - XFILE file; - CYASSL_X509* x509 = NULL; - buffer der; - - CYASSL_ENTER("CyaSSL_X509_load_certificate"); - - /* Check the inputs */ - if ((fname == NULL) || - (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)) - return NULL; - - file = XFOPEN(fname, "rb"); - if (file == XBADFILE) return NULL; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - - if (sz > (long)sizeof(staticBuffer)) { - fileBuffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_FILE); - if (fileBuffer == NULL) { - XFCLOSE(file); - return NULL; - } - dynamic = 1; - } - if ((int)XFREAD(fileBuffer, sz, 1, file) < 0) { - XFCLOSE(file); - if (dynamic) XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); - return NULL; - } - XFCLOSE(file); - - der.buffer = NULL; - der.length = 0; - - if (format == SSL_FILETYPE_PEM) { - EncryptedInfo info; - int ecc = 0; - - info.set = 0; - info.ctx = NULL; - info.consumed = 0; - - if (PemToDer(fileBuffer, sz, CERT_TYPE, &der, NULL, &info, &ecc) != 0) - { - /* Only time this should fail, and leave `der` with a buffer - is when the Base64 Decode fails. Release `der.buffer` in - that case. */ - if (der.buffer != NULL) { - XFREE(der.buffer, NULL, DYNAMIC_TYPE_CERT); - der.buffer = NULL; - } - } - } - else { - der.buffer = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_CERT); - if (der.buffer != NULL) { - XMEMCPY(der.buffer, fileBuffer, sz); - der.length = (word32)sz; - } - } - if (dynamic) XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE); - - /* At this point we want `der` to have the certificate in DER format */ - /* ready to be decoded. */ - if (der.buffer != NULL) { - DecodedCert cert; - - InitDecodedCert(&cert, der.buffer, der.length, NULL); - if (ParseCertRelative(&cert, CERT_TYPE, 0, NULL) == 0) { - x509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), - NULL, DYNAMIC_TYPE_X509); - if (x509 != NULL) { - InitX509(x509, 1); - if (CopyDecodedToX509(x509, &cert) != 0) { - XFREE(x509, NULL, DYNAMIC_TYPE_X509); - x509 = NULL; - } - } - } - FreeDecodedCert(&cert); - - XFREE(der.buffer, NULL, DYNAMIC_TYPE_CERT); - } - - return x509; -} - -#endif /* NO_FILESYSTEM */ - -#endif /* KEEP_PEER_CERT || SESSION_CERTS */ - - -#ifdef OPENSSL_EXTRA - int CyaSSL_set_ex_data(CYASSL* ssl, int idx, void* data) - { -#ifdef FORTRESS - if (ssl != NULL && idx < MAX_EX_DATA) - { - ssl->ex_data[idx] = data; - return SSL_SUCCESS; - } -#else - (void)ssl; - (void)idx; - (void)data; -#endif - return SSL_FAILURE; - } - - - int CyaSSL_set_session_id_context(CYASSL* ssl, const unsigned char* id, - unsigned int len) - { - (void)ssl; - (void)id; - (void)len; - return 0; - } - - - void CyaSSL_set_connect_state(CYASSL* ssl) - { - (void)ssl; - /* client by default */ - } -#endif - - int CyaSSL_get_shutdown(const CYASSL* ssl) - { - return (ssl->options.isClosed || - ssl->options.connReset || - ssl->options.sentNotify); - } - - - int CyaSSL_session_reused(CYASSL* ssl) - { - return ssl->options.resuming; - } - -#ifdef OPENSSL_EXTRA - void CyaSSL_SESSION_free(CYASSL_SESSION* session) - { - (void)session; - } -#endif - - const char* CyaSSL_get_version(CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_version"); - if (ssl->version.major == SSLv3_MAJOR) { - switch (ssl->version.minor) { - case SSLv3_MINOR : - return "SSLv3"; - case TLSv1_MINOR : - return "TLSv1"; - case TLSv1_1_MINOR : - return "TLSv1.1"; - case TLSv1_2_MINOR : - return "TLSv1.2"; - default: - return "unknown"; - } - } - else if (ssl->version.major == DTLS_MAJOR) { - switch (ssl->version.minor) { - case DTLS_MINOR : - return "DTLS"; - case DTLSv1_2_MINOR : - return "DTLSv1.2"; - default: - return "unknown"; - } - } - return "unknown"; - } - - int CyaSSL_get_current_cipher_suite(CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_current_cipher_suite"); - if (ssl) - return (ssl->options.cipherSuite0 << 8) | ssl->options.cipherSuite; - return 0; - } - - CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL* ssl) - { - CYASSL_ENTER("SSL_get_current_cipher"); - if (ssl) - return &ssl->cipher; - else - return NULL; - } - - - const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher) - { - (void)cipher; - - CYASSL_ENTER("SSL_CIPHER_get_name"); -#ifndef NO_ERROR_STRINGS - if (cipher) { -#ifdef HAVE_ECC - if (cipher->ssl->options.cipherSuite0 == ECC_BYTE) { - /* ECC suites */ - switch (cipher->ssl->options.cipherSuite) { -#ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 : - return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"; -#endif - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 : - return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"; -#ifndef NO_RSA - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 : - return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256"; -#endif - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 : - return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"; -#ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 : - return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"; -#endif - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 : - return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"; -#ifndef NO_RSA - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 : - return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384"; -#endif - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 : - return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384"; -#ifndef NO_SHA - #ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA : - return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"; - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA : - return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"; - #endif - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA : - return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"; - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA : - return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"; - #ifndef NO_RC4 - #ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_RC4_128_SHA : - return "TLS_ECDHE_RSA_WITH_RC4_128_SHA"; - #endif - case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : - return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"; - #endif - #ifndef NO_DES3 - #ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA : - return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"; - #endif - case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA : - return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"; - #endif - - #ifndef NO_RSA - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA : - return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA"; - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA : - return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA"; - #endif - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA : - return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA"; - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA : - return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA"; - #ifndef NO_RC4 - #ifndef NO_RSA - case TLS_ECDH_RSA_WITH_RC4_128_SHA : - return "TLS_ECDH_RSA_WITH_RC4_128_SHA"; - #endif - case TLS_ECDH_ECDSA_WITH_RC4_128_SHA : - return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA"; - #endif - #ifndef NO_DES3 - #ifndef NO_RSA - case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA : - return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA"; - #endif - case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA : - return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA"; - #endif -#endif /* NO_SHA */ - -#ifdef HAVE_AESGCM - #ifndef NO_RSA - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : - return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; - case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : - return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; - #endif - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : - return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"; - case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : - return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"; - #ifndef NO_RSA - case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 : - return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"; - case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 : - return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384"; - #endif - case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 : - return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256"; - case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 : - return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384"; -#endif - -#ifdef HAVE_AESCCM - #ifndef NO_RSA - case TLS_RSA_WITH_AES_128_CCM_8 : - return "TLS_RSA_WITH_AES_128_CCM_8"; - case TLS_RSA_WITH_AES_256_CCM_8 : - return "TLS_RSA_WITH_AES_256_CCM_8"; - #endif - case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: - return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"; - case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 : - return "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8"; -#endif - - default: - return "NONE"; - } - } -#endif /* ECC */ - if (cipher->ssl->options.cipherSuite0 != ECC_BYTE) { - /* normal suites */ - switch (cipher->ssl->options.cipherSuite) { -#ifndef NO_RSA - #ifndef NO_RC4 - #ifndef NO_SHA - case SSL_RSA_WITH_RC4_128_SHA : - return "SSL_RSA_WITH_RC4_128_SHA"; - #endif - #ifndef NO_MD5 - case SSL_RSA_WITH_RC4_128_MD5 : - return "SSL_RSA_WITH_RC4_128_MD5"; - #endif - #endif - #ifndef NO_SHA - #ifndef NO_DES3 - case SSL_RSA_WITH_3DES_EDE_CBC_SHA : - return "SSL_RSA_WITH_3DES_EDE_CBC_SHA"; - #endif - case TLS_RSA_WITH_AES_128_CBC_SHA : - return "TLS_RSA_WITH_AES_128_CBC_SHA"; - case TLS_RSA_WITH_AES_256_CBC_SHA : - return "TLS_RSA_WITH_AES_256_CBC_SHA"; - #endif - case TLS_RSA_WITH_AES_128_CBC_SHA256 : - return "TLS_RSA_WITH_AES_128_CBC_SHA256"; - case TLS_RSA_WITH_AES_256_CBC_SHA256 : - return "TLS_RSA_WITH_AES_256_CBC_SHA256"; - #ifdef HAVE_BLAKE2 - case TLS_RSA_WITH_AES_128_CBC_B2B256: - return "TLS_RSA_WITH_AES_128_CBC_B2B256"; - case TLS_RSA_WITH_AES_256_CBC_B2B256: - return "TLS_RSA_WITH_AES_256_CBC_B2B256"; - #endif - #ifndef NO_SHA - case TLS_RSA_WITH_NULL_SHA : - return "TLS_RSA_WITH_NULL_SHA"; - #endif - case TLS_RSA_WITH_NULL_SHA256 : - return "TLS_RSA_WITH_NULL_SHA256"; -#endif /* NO_RSA */ -#ifndef NO_PSK - case TLS_PSK_WITH_AES_128_CBC_SHA256 : - return "TLS_PSK_WITH_AES_128_CBC_SHA256"; - #ifndef NO_SHA - case TLS_PSK_WITH_AES_128_CBC_SHA : - return "TLS_PSK_WITH_AES_128_CBC_SHA"; - case TLS_PSK_WITH_AES_256_CBC_SHA : - return "TLS_PSK_WITH_AES_256_CBC_SHA"; - #endif - #ifndef NO_SHA256 - #ifdef HAVE_AESCCM - case TLS_PSK_WITH_AES_128_CCM_8 : - return "TLS_PSK_WITH_AES_128_CCM_8"; - case TLS_PSK_WITH_AES_256_CCM_8 : - return "TLS_PSK_WITH_AES_256_CCM_8"; - #endif - case TLS_PSK_WITH_NULL_SHA256 : - return "TLS_PSK_WITH_NULL_SHA256"; - #endif - #ifndef NO_SHA - case TLS_PSK_WITH_NULL_SHA : - return "TLS_PSK_WITH_NULL_SHA"; - #endif -#endif /* NO_PSK */ -#ifndef NO_RSA - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 : - return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"; - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 : - return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"; - #ifndef NO_SHA - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA : - return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"; - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA : - return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"; - #endif - #ifndef NO_HC128 - #ifndef NO_MD5 - case TLS_RSA_WITH_HC_128_MD5 : - return "TLS_RSA_WITH_HC_128_MD5"; - #endif - #ifndef NO_SHA - case TLS_RSA_WITH_HC_128_SHA : - return "TLS_RSA_WITH_HC_128_SHA"; - #endif - #ifdef HAVE_BLAKE2 - case TLS_RSA_WITH_HC_128_B2B256: - return "TLS_RSA_WITH_HC_128_B2B256"; - #endif - #endif /* NO_HC128 */ - #ifndef NO_SHA - #ifndef NO_RABBIT - case TLS_RSA_WITH_RABBIT_SHA : - return "TLS_RSA_WITH_RABBIT_SHA"; - #endif - #ifdef HAVE_NTRU - #ifndef NO_RC4 - case TLS_NTRU_RSA_WITH_RC4_128_SHA : - return "TLS_NTRU_RSA_WITH_RC4_128_SHA"; - #endif - #ifndef NO_DES3 - case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA : - return "TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA"; - #endif - case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA : - return "TLS_NTRU_RSA_WITH_AES_128_CBC_SHA"; - case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA : - return "TLS_NTRU_RSA_WITH_AES_256_CBC_SHA"; - #endif /* HAVE_NTRU */ - #endif /* NO_SHA */ - case TLS_RSA_WITH_AES_128_GCM_SHA256 : - return "TLS_RSA_WITH_AES_128_GCM_SHA256"; - case TLS_RSA_WITH_AES_256_GCM_SHA384 : - return "TLS_RSA_WITH_AES_256_GCM_SHA384"; - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 : - return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"; - case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 : - return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"; - #ifndef NO_SHA - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA : - return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA"; - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA : - return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA"; - #endif - case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256"; - case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256"; - #ifndef NO_SHA - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA : - return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA"; - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA : - return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA"; - #endif - case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 : - return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"; - case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 : - return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256"; -#endif /* NO_RSA */ - default: - return "NONE"; - } /* switch */ - } /* normal / ECC */ - } -#endif /* NO_ERROR_STRINGS */ - return "NONE"; - } - - - const char* CyaSSL_get_cipher(CYASSL* ssl) - { - CYASSL_ENTER("CyaSSL_get_cipher"); - return CyaSSL_CIPHER_get_name(CyaSSL_get_current_cipher(ssl)); - } - -#ifdef OPENSSL_EXTRA - -/* XXX shuld be NO_DH */ -#ifndef NO_CERTS - /* server ctx Diffie-Hellman parameters, SSL_SUCCESS on ok */ - int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, const unsigned char* p, int pSz, - const unsigned char* g, int gSz) - { - CYASSL_ENTER("CyaSSL_CTX_SetTmpDH"); - if (ctx == NULL || p == NULL || g == NULL) return BAD_FUNC_ARG; - - XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); - XFREE(ctx->serverDH_G.buffer, ctx->heap, DYNAMIC_TYPE_DH); - - ctx->serverDH_P.buffer = (byte*)XMALLOC(pSz, ctx->heap,DYNAMIC_TYPE_DH); - if (ctx->serverDH_P.buffer == NULL) - return MEMORY_E; - - ctx->serverDH_G.buffer = (byte*)XMALLOC(gSz, ctx->heap,DYNAMIC_TYPE_DH); - if (ctx->serverDH_G.buffer == NULL) { - XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_DH); - return MEMORY_E; - } - - ctx->serverDH_P.length = pSz; - ctx->serverDH_G.length = gSz; - - XMEMCPY(ctx->serverDH_P.buffer, p, pSz); - XMEMCPY(ctx->serverDH_G.buffer, g, gSz); - - ctx->haveDH = 1; - - CYASSL_LEAVE("CyaSSL_CTX_SetTmpDH", 0); - return SSL_SUCCESS; - } -#endif /* !NO_CERTS */ - - - char* CyaSSL_CIPHER_description(CYASSL_CIPHER* cipher, char* in, int len) - { - (void)cipher; - (void)in; - (void)len; - return 0; - } - - - CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl) /* what's ref count */ - { - (void)ssl; - return 0; - } - - - void CyaSSL_X509_free(CYASSL_X509* buf) - { - (void)buf; - } - - - /* was do nothing */ - /* - void OPENSSL_free(void* buf) - { - (void)buf; - } - */ - - - int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, char** path, - int* ssl) - { - (void)url; - (void)host; - (void)port; - (void)path; - (void)ssl; - return 0; - } - - - CYASSL_METHOD* CyaSSLv2_client_method(void) - { - return 0; - } - - - CYASSL_METHOD* CyaSSLv2_server_method(void) - { - return 0; - } - - -#ifndef NO_MD4 - - void CyaSSL_MD4_Init(CYASSL_MD4_CTX* md4) - { - /* make sure we have a big enough buffer */ - typedef char ok[sizeof(md4->buffer) >= sizeof(Md4) ? 1 : -1]; - (void) sizeof(ok); - - CYASSL_ENTER("MD4_Init"); - InitMd4((Md4*)md4); - } - - - void CyaSSL_MD4_Update(CYASSL_MD4_CTX* md4, const void* data, - unsigned long len) - { - CYASSL_ENTER("MD4_Update"); - Md4Update((Md4*)md4, (const byte*)data, (word32)len); - } - - - void CyaSSL_MD4_Final(unsigned char* digest, CYASSL_MD4_CTX* md4) - { - CYASSL_ENTER("MD4_Final"); - Md4Final((Md4*)md4, digest); - } - -#endif /* NO_MD4 */ - - - CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO* top) - { - (void)top; - return 0; - } - - - int CyaSSL_BIO_pending(CYASSL_BIO* bio) - { - (void)bio; - return 0; - } - - - - CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void) - { - static CYASSL_BIO_METHOD meth; - - CYASSL_ENTER("BIO_s_mem"); - meth.type = BIO_MEMORY; - - return &meth; - } - - - CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void) - { - return 0; - } - - - void CyaSSL_BIO_set_flags(CYASSL_BIO* bio, int flags) - { - (void)bio; - (void)flags; - } - - - - void CyaSSL_RAND_screen(void) - { - - } - - - const char* CyaSSL_RAND_file_name(char* fname, unsigned long len) - { - (void)fname; - (void)len; - return 0; - } - - - int CyaSSL_RAND_write_file(const char* fname) - { - (void)fname; - return 0; - } - - - int CyaSSL_RAND_load_file(const char* fname, long len) - { - (void)fname; - /* CTaoCrypt provides enough entropy internally or will report error */ - if (len == -1) - return 1024; - else - return (int)len; - } - - - int CyaSSL_RAND_egd(const char* path) - { - (void)path; - return 0; - } - - - - CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void) - { - return 0; - } - - - CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void) - { - return 0; - } - - - int CyaSSL_COMP_add_compression_method(int method, void* data) - { - (void)method; - (void)data; - return 0; - } - - - - int CyaSSL_get_ex_new_index(long idx, void* data, void* cb1, void* cb2, - void* cb3) - { - (void)idx; - (void)data; - (void)cb1; - (void)cb2; - (void)cb3; - return 0; - } - - - void CyaSSL_set_dynlock_create_callback(CYASSL_dynlock_value* (*f)( - const char*, int)) - { - (void)f; - } - - - void CyaSSL_set_dynlock_lock_callback( - void (*f)(int, CYASSL_dynlock_value*, const char*, int)) - { - (void)f; - } - - - void CyaSSL_set_dynlock_destroy_callback( - void (*f)(CYASSL_dynlock_value*, const char*, int)) - { - (void)f; - } - - - - const char* CyaSSL_X509_verify_cert_error_string(long err) - { - (void)err; - return 0; - } - - - - int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP* lookup, const char* dir, - long len) - { - (void)lookup; - (void)dir; - (void)len; - return 0; - } - - - int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP* lookup, - const char* file, long len) - { - (void)lookup; - (void)file; - (void)len; - return 0; - } - - - CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void) - { - return 0; - } - - - CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void) - { - return 0; - } - - - - CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE* store, - CYASSL_X509_LOOKUP_METHOD* m) - { - (void)store; - (void)m; - return 0; - } - - - int CyaSSL_X509_STORE_add_cert(CYASSL_X509_STORE* store, CYASSL_X509* x509) - { - int result = SSL_FATAL_ERROR; - - CYASSL_ENTER("CyaSSL_X509_STORE_add_cert"); - if (store != NULL && store->cm != NULL && x509 != NULL) { - buffer derCert; - derCert.buffer = (byte*)XMALLOC(x509->derCert.length, - NULL, DYNAMIC_TYPE_CERT); - if (derCert.buffer != NULL) { - derCert.length = x509->derCert.length; - // AddCA() frees the buffer. - XMEMCPY(derCert.buffer, - x509->derCert.buffer, x509->derCert.length); - result = AddCA(store->cm, derCert, CYASSL_USER_CA, 1); - if (result != SSL_SUCCESS) result = SSL_FATAL_ERROR; - } - } - - CYASSL_LEAVE("CyaSSL_X509_STORE_add_cert", result); - return result; - } - - - CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void) - { - CYASSL_X509_STORE* store = NULL; - - store = (CYASSL_X509_STORE*)XMALLOC(sizeof(CYASSL_X509_STORE), NULL, 0); - if (store != NULL) { - store->cm = CyaSSL_CertManagerNew(); - if (store->cm == NULL) { - XFREE(store, NULL, 0); - store = NULL; - } - } - - return store; - } - - - void CyaSSL_X509_STORE_free(CYASSL_X509_STORE* store) - { - if (store != NULL) { - if (store->cm != NULL) - CyaSSL_CertManagerFree(store->cm); - XFREE(store, NULL, 0); - } - } - - - int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE* store) - { - (void)store; - return SSL_SUCCESS; - } - - - int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX* ctx, int idx, - CYASSL_X509_NAME* name, CYASSL_X509_OBJECT* obj) - { - (void)ctx; - (void)idx; - (void)name; - (void)obj; - return 0; - } - - - CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void) - { - CYASSL_X509_STORE_CTX* ctx = (CYASSL_X509_STORE_CTX*)XMALLOC( - sizeof(CYASSL_X509_STORE_CTX), NULL, 0); - - if (ctx != NULL) - CyaSSL_X509_STORE_CTX_init(ctx, NULL, NULL, NULL); - - return ctx; - } - - - int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX* ctx, - CYASSL_X509_STORE* store, CYASSL_X509* x509, STACK_OF(CYASSL_X509)* sk) - { - (void)sk; - if (ctx != NULL) { - ctx->store = store; - ctx->current_cert = x509; - ctx->domain = NULL; - ctx->ex_data = NULL; - ctx->userCtx = NULL; - ctx->error = 0; - ctx->error_depth = 0; - ctx->discardSessionCerts = 0; - return SSL_SUCCESS; - } - return SSL_FATAL_ERROR; - } - - - void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX* ctx) - { - if (ctx != NULL) { - if (ctx->store != NULL) - CyaSSL_X509_STORE_free(ctx->store); - if (ctx->current_cert != NULL) - CyaSSL_FreeX509(ctx->current_cert); - XFREE(ctx, NULL, 0); - } - } - - - void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX* ctx) - { - (void)ctx; - } - - - int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX* ctx) - { - if (ctx != NULL && ctx->store != NULL && ctx->store->cm != NULL - && ctx->current_cert != NULL) { - return CyaSSL_CertManagerVerifyBuffer(ctx->store->cm, - ctx->current_cert->derCert.buffer, - ctx->current_cert->derCert.length, - SSL_FILETYPE_ASN1); - } - return SSL_FATAL_ERROR; - } - - - CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL* crl) - { - (void)crl; - return 0; - } - - - CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL* crl) - { - (void)crl; - return 0; - } - - - - CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509* x509) - { - CYASSL_EVP_PKEY* key = NULL; - if (x509 != NULL) { - key = (CYASSL_EVP_PKEY*)XMALLOC( - sizeof(CYASSL_EVP_PKEY), NULL, DYNAMIC_TYPE_PUBLIC_KEY); - if (key != NULL) { - key->type = x509->pubKeyOID; - key->save_type = 0; - key->pkey.ptr = (char*)XMALLOC( - x509->pubKey.length, NULL, DYNAMIC_TYPE_PUBLIC_KEY); - if (key->pkey.ptr == NULL) { - XFREE(key, NULL, DYNAMIC_TYPE_PUBLIC_KEY); - return NULL; - } - XMEMCPY(key->pkey.ptr, - x509->pubKey.buffer, x509->pubKey.length); - key->pkey_sz = x509->pubKey.length; - #ifdef HAVE_ECC - key->pkey_curve = (int)x509->pkCurveOID; - #endif /* HAVE_ECC */ - } - } - return key; - } - - - int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL* crl, CYASSL_EVP_PKEY* key) - { - (void)crl; - (void)key; - return 0; - } - - - void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX* ctx, int err) - { - (void)ctx; - (void)err; - } - - - void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT* obj) - { - (void)obj; - } - - - void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY* key) - { - if (key != NULL) { - if (key->pkey.ptr != NULL) - XFREE(key->pkey.ptr, NULL, 0); - XFREE(key, NULL, 0); - } - } - - - int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME* asnTime) - { - (void)asnTime; - return 0; - } - - - int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED* revoked) - { - (void)revoked; - return 0; - } - - - - CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL* crl) - { - (void)crl; - return 0; - } - - - CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value( - CYASSL_X509_REVOKED* revoked, int value) - { - (void)revoked; - (void)value; - return 0; - } - - - - CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509* x509) - { - (void)x509; - return 0; - } - - - int CyaSSL_ASN1_TIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_TIME* asnTime) - { - (void)bio; - (void)asnTime; - return 0; - } - - - - int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER* a, - const CYASSL_ASN1_INTEGER* b) - { - (void)a; - (void)b; - return 0; - } - - - long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER* i) - { - (void)i; - return 0; - } - - - - void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX* ctx, int idx) - { -#ifdef FORTRESS - if (ctx != NULL && idx == 0) - return ctx->ex_data; -#else - (void)ctx; - (void)idx; -#endif - return 0; - } - - - int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void) - { - return 0; - } - - - void* CyaSSL_get_ex_data(const CYASSL* ssl, int idx) - { -#ifdef FORTRESS - if (ssl != NULL && idx < MAX_EX_DATA) - return ssl->ex_data[idx]; -#else - (void)ssl; - (void)idx; -#endif - return 0; - } - - - void CyaSSL_CTX_set_info_callback(CYASSL_CTX* ctx, void (*f)(void)) - { - (void)ctx; - (void)f; - } - - - unsigned long CyaSSL_ERR_peek_error(void) - { - return 0; - } - - - int CyaSSL_ERR_GET_REASON(int err) - { - (void)err; - return 0; - } - - - char* CyaSSL_alert_type_string_long(int alertID) - { - (void)alertID; - return 0; - } - - - char* CyaSSL_alert_desc_string_long(int alertID) - { - (void)alertID; - return 0; - } - - - char* CyaSSL_state_string_long(CYASSL* ssl) - { - (void)ssl; - return 0; - } - - - int CyaSSL_PEM_def_callback(char* name, int num, int w, void* key) - { - (void)name; - (void)num; - (void)w; - (void)key; - return 0; - } - - - long CyaSSL_CTX_sess_accept(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_connect(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_accept_good(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_connect_good(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_hits(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_cache_full(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_misses(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_timeouts(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - long CyaSSL_CTX_sess_number(CYASSL_CTX* ctx) - { - (void)ctx; - return 0; - } - - - void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock* myDes, - CYASSL_DES_key_schedule* key) - { - (void)myDes; - (void)key; - } - - - void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock* myDes) - { - (void)myDes; - } - - - void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock* desa, - CYASSL_DES_cblock* desb, CYASSL_DES_key_schedule* key, int len) - { - (void)desa; - (void)desb; - (void)key; - (void)len; - } - - int CyaSSL_BIO_printf(CYASSL_BIO* bio, const char* format, ...) - { - (void)bio; - (void)format; - return 0; - } - - - int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_UTCTIME* a) - { - (void)bio; - (void)a; - return 0; - } - - - int CyaSSL_sk_num(CYASSL_X509_REVOKED* rev) - { - (void)rev; - return 0; - } - - - void* CyaSSL_sk_value(CYASSL_X509_REVOKED* rev, int i) - { - (void)rev; - (void)i; - return 0; - } - - - /* stunnel 4.28 needs */ - void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX* ctx, int d) - { - (void)ctx; - (void)d; - return 0; - } - - - int CyaSSL_CTX_set_ex_data(CYASSL_CTX* ctx, int d, void* p) - { - (void)ctx; - (void)d; - (void)p; - return SSL_SUCCESS; - } - - - void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX* ctx, - CYASSL_SESSION*(*f)(CYASSL*, unsigned char*, int, int*)) - { - (void)ctx; - (void)f; - } - - - void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX* ctx, - int (*f)(CYASSL*, CYASSL_SESSION*)) - { - (void)ctx; - (void)f; - } - - - void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX* ctx, void (*f)(CYASSL_CTX*, - CYASSL_SESSION*)) - { - (void)ctx; - (void)f; - } - - - int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION* sess, unsigned char** p) - { - (void)sess; - (void)p; - return sizeof(CYASSL_SESSION); - } - - - CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION** sess, - const unsigned char** p, long i) - { - (void)p; - (void)i; - if (sess) - return *sess; - return NULL; - } - - - long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION* sess) - { - CYASSL_ENTER("CyaSSL_SESSION_get_timeout"); - return sess->timeout; - } - - - long CyaSSL_SESSION_get_time(const CYASSL_SESSION* sess) - { - CYASSL_ENTER("CyaSSL_SESSION_get_time"); - return sess->bornOn; - } - - - int CyaSSL_CTX_get_ex_new_index(long idx, void* arg, void* a, void* b, - void* c) - { - (void)idx; - (void)arg; - (void)a; - (void)b; - (void)c; - return 0; - } - -#endif /* OPENSSL_EXTRA */ - - -#ifdef KEEP_PEER_CERT - char* CyaSSL_X509_get_subjectCN(CYASSL_X509* x509) - { - if (x509 == NULL) - return NULL; - - return x509->subjectCN; - } -#endif /* KEEP_PEER_CERT */ - -#ifdef OPENSSL_EXTRA - -#ifdef FORTRESS - int CyaSSL_cmp_peer_cert_to_file(CYASSL* ssl, const char *fname) - { - int ret = SSL_FATAL_ERROR; - - CYASSL_ENTER("CyaSSL_cmp_peer_cert_to_file"); - if (ssl != NULL && fname != NULL) - { - XFILE file = XBADFILE; - long sz = 0; - byte staticBuffer[FILE_BUFFER_SIZE]; - byte* myBuffer = staticBuffer; - CYASSL_CTX* ctx = ssl->ctx; - EncryptedInfo info; - buffer fileDer; - int eccKey = 0; - CYASSL_X509* peer_cert = &ssl->peerCert; - - info.set = 0; - info.ctx = ctx; - info.consumed = 0; - fileDer.buffer = 0; - - file = XFOPEN(fname, "rb"); - if (file == XBADFILE) return SSL_BAD_FILE; - XFSEEK(file, 0, XSEEK_END); - sz = XFTELL(file); - XREWIND(file); - if (sz > (long)sizeof(staticBuffer)) { - CYASSL_MSG("Getting dynamic buffer"); - myBuffer = (byte*) XMALLOC(sz, ctx->heap, DYNAMIC_TYPE_FILE); - } - - if ((myBuffer != NULL) && - (sz > 0) && - (XFREAD(myBuffer, sz, 1, file) > 0) && - (PemToDer(myBuffer, sz, CERT_TYPE, - &fileDer, ctx->heap, &info, &eccKey) == 0) && - (fileDer.length != 0) && - (fileDer.length == peer_cert->derCert.length) && - (XMEMCMP(peer_cert->derCert.buffer, fileDer.buffer, - fileDer.length) == 0)) - { - ret = 0; - } - - XFCLOSE(file); - if (fileDer.buffer) - XFREE(fileDer.buffer, ctx->heap, DYNAMIC_TYPE_CERT); - if (myBuffer && (myBuffer != staticBuffer)) - XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE); - } - - return ret; - } -#endif - - -static RNG globalRNG; -static int initGlobalRNG = 0; - - /* SSL_SUCCESS on ok */ - int CyaSSL_RAND_seed(const void* seed, int len) - { - - CYASSL_MSG("CyaSSL_RAND_seed"); - - (void)seed; - (void)len; - - if (initGlobalRNG == 0) { - if (InitRng(&globalRNG) < 0) { - CYASSL_MSG("CyaSSL Init Global RNG failed"); - return 0; - } - initGlobalRNG = 1; - } - - return SSL_SUCCESS; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_RAND_bytes(unsigned char* buf, int num) - { - RNG tmpRNG; - RNG* rng = &tmpRNG; - - CYASSL_ENTER("RAND_bytes"); - if (InitRng(&tmpRNG) != 0) { - CYASSL_MSG("Bad RNG Init, trying global"); - if (initGlobalRNG == 0) { - CYASSL_MSG("Global RNG no Init"); - return 0; - } - rng = &globalRNG; - } - - if (RNG_GenerateBlock(rng, buf, num) != 0) { - CYASSL_MSG("Bad RNG_GenerateBlock"); - return 0; - } - - return SSL_SUCCESS; - } - - CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void) - { - static int ctx; /* ctaocrypt doesn't now need ctx */ - - CYASSL_MSG("CyaSSL_BN_CTX_new"); - - return (CYASSL_BN_CTX*)&ctx; - } - - void CyaSSL_BN_CTX_init(CYASSL_BN_CTX* ctx) - { - (void)ctx; - CYASSL_MSG("CyaSSL_BN_CTX_init"); - } - - - void CyaSSL_BN_CTX_free(CYASSL_BN_CTX* ctx) - { - (void)ctx; - CYASSL_MSG("CyaSSL_BN_CTX_free"); - - /* do free since static ctx that does nothing */ - } - - - static void InitCyaSSL_BigNum(CYASSL_BIGNUM* bn) - { - CYASSL_MSG("InitCyaSSL_BigNum"); - if (bn) { - bn->neg = 0; - bn->internal = NULL; - } - } - - - CYASSL_BIGNUM* CyaSSL_BN_new(void) - { - CYASSL_BIGNUM* external; - mp_int* mpi; - - CYASSL_MSG("CyaSSL_BN_new"); - - mpi = (mp_int*) XMALLOC(sizeof(mp_int), NULL, DYNAMIC_TYPE_BIGINT); - if (mpi == NULL) { - CYASSL_MSG("CyaSSL_BN_new malloc mpi failure"); - return NULL; - } - - external = (CYASSL_BIGNUM*) XMALLOC(sizeof(CYASSL_BIGNUM), NULL, - DYNAMIC_TYPE_BIGINT); - if (external == NULL) { - CYASSL_MSG("CyaSSL_BN_new malloc CYASSL_BIGNUM failure"); - XFREE(mpi, NULL, DYNAMIC_TYPE_BIGINT); - return NULL; - } - - InitCyaSSL_BigNum(external); - external->internal = mpi; - if (mp_init(mpi) != MP_OKAY) { - CyaSSL_BN_free(external); - return NULL; - } - - return external; - } - - - void CyaSSL_BN_free(CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_free"); - if (bn) { - if (bn->internal) { - mp_clear((mp_int*)bn->internal); - XFREE(bn->internal, NULL, DYNAMIC_TYPE_BIGINT); - bn->internal = NULL; - } - XFREE(bn, NULL, DYNAMIC_TYPE_BIGINT); - } - } - - - void CyaSSL_BN_clear_free(CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_clear_free"); - - CyaSSL_BN_free(bn); - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_BN_sub(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a, - const CYASSL_BIGNUM* b) - { - CYASSL_MSG("CyaSSL_BN_sub"); - - if (r == NULL || a == NULL || b == NULL) - return 0; - - if (mp_sub((mp_int*)a->internal,(mp_int*)b->internal, - (mp_int*)r->internal) == MP_OKAY) - return SSL_SUCCESS; - - CYASSL_MSG("CyaSSL_BN_sub mp_sub failed"); - return 0; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_BN_mod(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a, - const CYASSL_BIGNUM* b, const CYASSL_BN_CTX* c) - { - (void)c; - CYASSL_MSG("CyaSSL_BN_mod"); - - if (r == NULL || a == NULL || b == NULL) - return 0; - - if (mp_mod((mp_int*)a->internal,(mp_int*)b->internal, - (mp_int*)r->internal) == MP_OKAY) - return SSL_SUCCESS; - - CYASSL_MSG("CyaSSL_BN_mod mp_mod failed"); - return 0; - } - - - const CYASSL_BIGNUM* CyaSSL_BN_value_one(void) - { - static CYASSL_BIGNUM* bn_one = NULL; - - CYASSL_MSG("CyaSSL_BN_value_one"); - - if (bn_one == NULL) { - bn_one = CyaSSL_BN_new(); - if (bn_one) - mp_set_int((mp_int*)bn_one->internal, 1); - } - - return bn_one; - } - - - int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_num_bytes"); - - if (bn == NULL || bn->internal == NULL) - return 0; - - return mp_unsigned_bin_size((mp_int*)bn->internal); - } - - - int CyaSSL_BN_num_bits(const CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_num_bits"); - - if (bn == NULL || bn->internal == NULL) - return 0; - - return mp_count_bits((mp_int*)bn->internal); - } - - - int CyaSSL_BN_is_zero(const CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_is_zero"); - - if (bn == NULL || bn->internal == NULL) - return 0; - - return mp_iszero((mp_int*)bn->internal); - } - - - int CyaSSL_BN_is_one(const CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_is_one"); - - if (bn == NULL || bn->internal == NULL) - return 0; - - if (mp_cmp_d((mp_int*)bn->internal, 1) == 0) - return 1; - - return 0; - } - - - int CyaSSL_BN_is_odd(const CYASSL_BIGNUM* bn) - { - CYASSL_MSG("CyaSSL_BN_is_odd"); - - if (bn == NULL || bn->internal == NULL) - return 0; - - return mp_isodd((mp_int*)bn->internal); - } - - - int CyaSSL_BN_cmp(const CYASSL_BIGNUM* a, const CYASSL_BIGNUM* b) - { - CYASSL_MSG("CyaSSL_BN_cmp"); - - if (a == NULL || a->internal == NULL || b == NULL || b->internal ==NULL) - return 0; - - return mp_cmp((mp_int*)a->internal, (mp_int*)b->internal); - } - - - int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM* bn, unsigned char* r) - { - CYASSL_MSG("CyaSSL_BN_bn2bin"); - - if (bn == NULL || bn->internal == NULL) { - CYASSL_MSG("NULL bn error"); - return SSL_FATAL_ERROR; - } - - if (r == NULL) - return mp_unsigned_bin_size((mp_int*)bn->internal); - - if (mp_to_unsigned_bin((mp_int*)bn->internal, r) != MP_OKAY) { - CYASSL_MSG("mp_to_unsigned_bin error"); - return SSL_FATAL_ERROR; - } - - return mp_unsigned_bin_size((mp_int*)bn->internal); - } - - - CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char* str, int len, - CYASSL_BIGNUM* ret) - { - CYASSL_MSG("CyaSSL_BN_bin2bn"); - - if (ret && ret->internal) { - if (mp_read_unsigned_bin((mp_int*)ret->internal, str, len) != 0) { - CYASSL_MSG("mp_read_unsigned_bin failure"); - return NULL; - } - } - else { - CYASSL_MSG("CyaSSL_BN_bin2bn wants return bignum"); - } - - return ret; - } - - - int CyaSSL_mask_bits(CYASSL_BIGNUM* bn, int n) - { - (void)bn; - (void)n; - CYASSL_MSG("CyaSSL_BN_mask_bits"); - - return SSL_FATAL_ERROR; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_BN_rand(CYASSL_BIGNUM* bn, int bits, int top, int bottom) - { - byte buff[1024]; - RNG tmpRNG; - RNG* rng = &tmpRNG; - int len = bits/8; - - (void)top; - (void)bottom; - CYASSL_MSG("CyaSSL_BN_rand"); - - if (bn == NULL || bn->internal == NULL) { - CYASSL_MSG("Bad function arguments"); - return 0; - } - - if (bits % 8) - len++; - - if ( (InitRng(&tmpRNG)) != 0) { - CYASSL_MSG("Bad RNG Init, trying global"); - if (initGlobalRNG == 0) { - CYASSL_MSG("Global RNG no Init"); - return 0; - } - rng = &globalRNG; - } - - if (RNG_GenerateBlock(rng, buff, len) != 0) { - CYASSL_MSG("Bad RNG_GenerateBlock"); - return 0; - } - - buff[0] |= 0x80 | 0x40; - buff[len-1] |= 0x01; - - if (mp_read_unsigned_bin((mp_int*)bn->internal,buff,len) != MP_OKAY) { - CYASSL_MSG("mp read bin failed"); - return 0; - } - - return SSL_SUCCESS; - } - - - int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM* bn, int n) - { - (void)bn; - (void)n; - - CYASSL_MSG("CyaSSL_BN_is_bit_set"); - - return 0; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_BN_hex2bn(CYASSL_BIGNUM** bn, const char* str) - { - byte decoded[1024]; - word32 decSz = sizeof(decoded); - - CYASSL_MSG("CyaSSL_BN_hex2bn"); - - if (str == NULL) { - CYASSL_MSG("Bad function argument"); - return 0; - } - - if (Base16_Decode((byte*)str, (int)XSTRLEN(str), decoded, &decSz) < 0) { - CYASSL_MSG("Bad Base16_Decode error"); - return 0; - } - - if (bn == NULL) - return decSz; - - if (*bn == NULL) { - *bn = CyaSSL_BN_new(); - if (*bn == NULL) { - CYASSL_MSG("BN new failed"); - return 0; - } - } - - if (CyaSSL_BN_bin2bn(decoded, decSz, *bn) == NULL) { - CYASSL_MSG("Bad bin2bn error"); - return 0; - } - - return SSL_SUCCESS; - } - - - CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM* bn) - { - CYASSL_BIGNUM* ret; - - CYASSL_MSG("CyaSSL_BN_dup"); - - if (bn == NULL || bn->internal == NULL) { - CYASSL_MSG("bn NULL error"); - return NULL; - } - - ret = CyaSSL_BN_new(); - if (ret == NULL) { - CYASSL_MSG("bn new error"); - return NULL; - } - - if (mp_copy((mp_int*)bn->internal, (mp_int*)ret->internal) != MP_OKAY) { - CYASSL_MSG("mp_copy error"); - CyaSSL_BN_free(ret); - return NULL; - } - - return ret; - } - - - CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* bn) - { - (void)r; - (void)bn; - - CYASSL_MSG("CyaSSL_BN_copy"); - - return NULL; - } - - - int CyaSSL_BN_set_word(CYASSL_BIGNUM* bn, unsigned long w) - { - (void)bn; - (void)w; - - CYASSL_MSG("CyaSSL_BN_set_word"); - - return SSL_FATAL_ERROR; - } - - - int CyaSSL_BN_dec2bn(CYASSL_BIGNUM** bn, const char* str) - { - (void)bn; - (void)str; - - CYASSL_MSG("CyaSSL_BN_dec2bn"); - - return SSL_FATAL_ERROR; - } - - - char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM* bn) - { - (void)bn; - - CYASSL_MSG("CyaSSL_BN_bn2dec"); - - return NULL; - } - - - static void InitCyaSSL_DH(CYASSL_DH* dh) - { - if (dh) { - dh->p = NULL; - dh->g = NULL; - dh->pub_key = NULL; - dh->priv_key = NULL; - dh->internal = NULL; - dh->inSet = 0; - dh->exSet = 0; - } - } - - - CYASSL_DH* CyaSSL_DH_new(void) - { - CYASSL_DH* external; - DhKey* key; - - CYASSL_MSG("CyaSSL_DH_new"); - - key = (DhKey*) XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_DH); - if (key == NULL) { - CYASSL_MSG("CyaSSL_DH_new malloc DhKey failure"); - return NULL; - } - - external = (CYASSL_DH*) XMALLOC(sizeof(CYASSL_DH), NULL, - DYNAMIC_TYPE_DH); - if (external == NULL) { - CYASSL_MSG("CyaSSL_DH_new malloc CYASSL_DH failure"); - XFREE(key, NULL, DYNAMIC_TYPE_DH); - return NULL; - } - - InitCyaSSL_DH(external); - InitDhKey(key); - external->internal = key; - - return external; - } - - - void CyaSSL_DH_free(CYASSL_DH* dh) - { - CYASSL_MSG("CyaSSL_DH_free"); - - if (dh) { - if (dh->internal) { - FreeDhKey((DhKey*)dh->internal); - XFREE(dh->internal, NULL, DYNAMIC_TYPE_DH); - dh->internal = NULL; - } - CyaSSL_BN_free(dh->priv_key); - CyaSSL_BN_free(dh->pub_key); - CyaSSL_BN_free(dh->g); - CyaSSL_BN_free(dh->p); - InitCyaSSL_DH(dh); /* set back to NULLs for safety */ - - XFREE(dh, NULL, DYNAMIC_TYPE_DH); - } - } - - - static int SetDhInternal(CYASSL_DH* dh) - { - unsigned char p[1024]; - unsigned char g[1024]; - int pSz = sizeof(p); - int gSz = sizeof(g); - - CYASSL_ENTER("SetDhInternal"); - - if (dh == NULL || dh->p == NULL || dh->g == NULL) { - CYASSL_MSG("Bad function arguments"); - return SSL_FATAL_ERROR; - } - - if (CyaSSL_BN_bn2bin(dh->p, NULL) > pSz) { - CYASSL_MSG("Bad p internal size"); - return SSL_FATAL_ERROR; - } - - if (CyaSSL_BN_bn2bin(dh->g, NULL) > gSz) { - CYASSL_MSG("Bad g internal size"); - return SSL_FATAL_ERROR; - } - - pSz = CyaSSL_BN_bn2bin(dh->p, p); - gSz = CyaSSL_BN_bn2bin(dh->g, g); - - if (pSz <= 0 || gSz <= 0) { - CYASSL_MSG("Bad BN2bin set"); - return SSL_FATAL_ERROR; - } - - if (DhSetKey((DhKey*)dh->internal, p, pSz, g, gSz) < 0) { - CYASSL_MSG("Bad DH SetKey"); - return SSL_FATAL_ERROR; - } - - dh->inSet = 1; - - return 0; - } - - - int CyaSSL_DH_size(CYASSL_DH* dh) - { - CYASSL_MSG("CyaSSL_DH_size"); - - if (dh == NULL) - return 0; - - return CyaSSL_BN_num_bytes(dh->p); - } - - - /* return SSL_SUCCESS on ok, else 0 */ - int CyaSSL_DH_generate_key(CYASSL_DH* dh) - { - unsigned char pub [768]; - unsigned char priv[768]; - word32 pubSz = sizeof(pub); - word32 privSz = sizeof(priv); - RNG tmpRNG; - RNG* rng = &tmpRNG; - - CYASSL_MSG("CyaSSL_DH_generate_key"); - - if (dh == NULL || dh->p == NULL || dh->g == NULL) { - CYASSL_MSG("Bad function arguments"); - return 0; - } - - if (dh->inSet == 0) { - if (SetDhInternal(dh) < 0) { - CYASSL_MSG("Bad DH set internal"); - return 0; - } - } - - if ( (InitRng(&tmpRNG)) != 0) { - CYASSL_MSG("Bad RNG Init, trying global"); - if (initGlobalRNG == 0) { - CYASSL_MSG("Global RNG no Init"); - return 0; - } - rng = &globalRNG; - } - - if (DhGenerateKeyPair((DhKey*)dh->internal, rng, priv, &privSz, - pub, &pubSz) < 0) { - CYASSL_MSG("Bad DhGenerateKeyPair"); - return 0; - } - - if (dh->pub_key) - CyaSSL_BN_free(dh->pub_key); - dh->pub_key = CyaSSL_BN_new(); - if (dh->pub_key == NULL) { - CYASSL_MSG("Bad DH new pub"); - return 0; - } - - if (dh->priv_key) - CyaSSL_BN_free(dh->priv_key); - dh->priv_key = CyaSSL_BN_new(); - if (dh->priv_key == NULL) { - CYASSL_MSG("Bad DH new priv"); - return 0; - } - - if (CyaSSL_BN_bin2bn(pub, pubSz, dh->pub_key) == NULL) { - CYASSL_MSG("Bad DH bn2bin error pub"); - return 0; - } - - if (CyaSSL_BN_bin2bn(priv, privSz, dh->priv_key) == NULL) { - CYASSL_MSG("Bad DH bn2bin error priv"); - return 0; - } - - CYASSL_MSG("CyaSSL_generate_key success"); - return SSL_SUCCESS; - } - - - /* return key size on ok, 0 otherwise */ - int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* otherPub, - CYASSL_DH* dh) - { - unsigned char pub [1024]; - unsigned char priv[1024]; - word32 pubSz = sizeof(pub); - word32 privSz = sizeof(priv); - word32 keySz; - - CYASSL_MSG("CyaSSL_DH_compute_key"); - - if (dh == NULL || dh->priv_key == NULL || otherPub == NULL) { - CYASSL_MSG("Bad function arguments"); - return 0; - } - - keySz = (word32)DH_size(dh); - if (keySz == 0) { - CYASSL_MSG("Bad DH_size"); - return 0; - } - - if (CyaSSL_BN_bn2bin(dh->priv_key, NULL) > (int)privSz) { - CYASSL_MSG("Bad priv internal size"); - return 0; - } - - if (CyaSSL_BN_bn2bin(otherPub, NULL) > (int)pubSz) { - CYASSL_MSG("Bad otherPub size"); - return 0; - } - - privSz = CyaSSL_BN_bn2bin(dh->priv_key, priv); - pubSz = CyaSSL_BN_bn2bin(otherPub, pub); - - if (privSz <= 0 || pubSz <= 0) { - CYASSL_MSG("Bad BN2bin set"); - return 0; - } - - if (DhAgree((DhKey*)dh->internal, key, &keySz, priv, privSz, pub, - pubSz) < 0) { - CYASSL_MSG("DhAgree failed"); - return 0; - } - - CYASSL_MSG("CyaSSL_compute_key success"); - return (int)keySz; - } - - -#ifndef NO_DSA - static void InitCyaSSL_DSA(CYASSL_DSA* dsa) - { - if (dsa) { - dsa->p = NULL; - dsa->q = NULL; - dsa->g = NULL; - dsa->pub_key = NULL; - dsa->priv_key = NULL; - dsa->internal = NULL; - dsa->inSet = 0; - dsa->exSet = 0; - } - } - - - CYASSL_DSA* CyaSSL_DSA_new(void) - { - CYASSL_DSA* external; - DsaKey* key; - - CYASSL_MSG("CyaSSL_DSA_new"); - - key = (DsaKey*) XMALLOC(sizeof(DsaKey), NULL, DYNAMIC_TYPE_DSA); - if (key == NULL) { - CYASSL_MSG("CyaSSL_DSA_new malloc DsaKey failure"); - return NULL; - } - - external = (CYASSL_DSA*) XMALLOC(sizeof(CYASSL_DSA), NULL, - DYNAMIC_TYPE_DSA); - if (external == NULL) { - CYASSL_MSG("CyaSSL_DSA_new malloc CYASSL_DSA failure"); - XFREE(key, NULL, DYNAMIC_TYPE_DSA); - return NULL; - } - - InitCyaSSL_DSA(external); - InitDsaKey(key); - external->internal = key; - - return external; - } - - - void CyaSSL_DSA_free(CYASSL_DSA* dsa) - { - CYASSL_MSG("CyaSSL_DSA_free"); - - if (dsa) { - if (dsa->internal) { - FreeDsaKey((DsaKey*)dsa->internal); - XFREE(dsa->internal, NULL, DYNAMIC_TYPE_DSA); - dsa->internal = NULL; - } - CyaSSL_BN_free(dsa->priv_key); - CyaSSL_BN_free(dsa->pub_key); - CyaSSL_BN_free(dsa->g); - CyaSSL_BN_free(dsa->q); - CyaSSL_BN_free(dsa->p); - InitCyaSSL_DSA(dsa); /* set back to NULLs for safety */ - - XFREE(dsa, NULL, DYNAMIC_TYPE_DSA); - } - } - - - int CyaSSL_DSA_generate_key(CYASSL_DSA* dsa) - { - (void)dsa; - - CYASSL_MSG("CyaSSL_DSA_generate_key"); - - return 0; /* key gen not needed by server */ - } - - - int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA* dsa, int bits, - unsigned char* seed, int seedLen, int* counterRet, - unsigned long* hRet, void* cb) - { - (void)dsa; - (void)bits; - (void)seed; - (void)seedLen; - (void)counterRet; - (void)hRet; - (void)cb; - - CYASSL_MSG("CyaSSL_DSA_generate_parameters_ex"); - - return 0; /* key gen not needed by server */ - } -#endif /* NO_DSA */ - - static void InitCyaSSL_Rsa(CYASSL_RSA* rsa) - { - if (rsa) { - rsa->n = NULL; - rsa->e = NULL; - rsa->d = NULL; - rsa->p = NULL; - rsa->q = NULL; - rsa->dmp1 = NULL; - rsa->dmq1 = NULL; - rsa->iqmp = NULL; - rsa->internal = NULL; - rsa->inSet = 0; - rsa->exSet = 0; - } - } - - - CYASSL_RSA* CyaSSL_RSA_new(void) - { - CYASSL_RSA* external; - RsaKey* key; - - CYASSL_MSG("CyaSSL_RSA_new"); - - key = (RsaKey*) XMALLOC(sizeof(RsaKey), NULL, DYNAMIC_TYPE_RSA); - if (key == NULL) { - CYASSL_MSG("CyaSSL_RSA_new malloc RsaKey failure"); - return NULL; - } - - external = (CYASSL_RSA*) XMALLOC(sizeof(CYASSL_RSA), NULL, - DYNAMIC_TYPE_RSA); - if (external == NULL) { - CYASSL_MSG("CyaSSL_RSA_new malloc CYASSL_RSA failure"); - XFREE(key, NULL, DYNAMIC_TYPE_RSA); - return NULL; - } - - InitCyaSSL_Rsa(external); - if (InitRsaKey(key, NULL) != 0) { - CYASSL_MSG("InitRsaKey CYASSL_RSA failure"); - XFREE(external, NULL, DYNAMIC_TYPE_RSA); - XFREE(key, NULL, DYNAMIC_TYPE_RSA); - return NULL; - } - external->internal = key; - - return external; - } - - - void CyaSSL_RSA_free(CYASSL_RSA* rsa) - { - CYASSL_MSG("CyaSSL_RSA_free"); - - if (rsa) { - if (rsa->internal) { - FreeRsaKey((RsaKey*)rsa->internal); - XFREE(rsa->internal, NULL, DYNAMIC_TYPE_RSA); - rsa->internal = NULL; - } - CyaSSL_BN_free(rsa->iqmp); - CyaSSL_BN_free(rsa->dmq1); - CyaSSL_BN_free(rsa->dmp1); - CyaSSL_BN_free(rsa->q); - CyaSSL_BN_free(rsa->p); - CyaSSL_BN_free(rsa->d); - CyaSSL_BN_free(rsa->e); - CyaSSL_BN_free(rsa->n); - InitCyaSSL_Rsa(rsa); /* set back to NULLs for safety */ - - XFREE(rsa, NULL, DYNAMIC_TYPE_RSA); - } - } - - - static int SetIndividualExternal(CYASSL_BIGNUM** bn, mp_int* mpi) - { - CYASSL_MSG("Entering SetIndividualExternal"); - - if (mpi == NULL) { - CYASSL_MSG("mpi NULL error"); - return SSL_FATAL_ERROR; - } - - if (*bn == NULL) { - *bn = CyaSSL_BN_new(); - if (*bn == NULL) { - CYASSL_MSG("SetIndividualExternal alloc failed"); - return SSL_FATAL_ERROR; - } - } - - if (mp_copy(mpi, (mp_int*)((*bn)->internal)) != MP_OKAY) { - CYASSL_MSG("mp_copy error"); - return SSL_FATAL_ERROR; - } - - return 0; - } - - -#ifndef NO_DSA - static int SetDsaExternal(CYASSL_DSA* dsa) - { - DsaKey* key; - CYASSL_MSG("Entering SetDsaExternal"); - - if (dsa == NULL || dsa->internal == NULL) { - CYASSL_MSG("dsa key NULL error"); - return SSL_FATAL_ERROR; - } - - key = (DsaKey*)dsa->internal; - - if (SetIndividualExternal(&dsa->p, &key->p) < 0) { - CYASSL_MSG("dsa p key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&dsa->q, &key->q) < 0) { - CYASSL_MSG("dsa q key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&dsa->g, &key->g) < 0) { - CYASSL_MSG("dsa g key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&dsa->pub_key, &key->y) < 0) { - CYASSL_MSG("dsa y key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&dsa->priv_key, &key->x) < 0) { - CYASSL_MSG("dsa x key error"); - return SSL_FATAL_ERROR; - } - - dsa->exSet = 1; - - return 0; - } -#endif /* NO_DSA */ - - - static int SetRsaExternal(CYASSL_RSA* rsa) - { - RsaKey* key; - CYASSL_MSG("Entering SetRsaExternal"); - - if (rsa == NULL || rsa->internal == NULL) { - CYASSL_MSG("rsa key NULL error"); - return SSL_FATAL_ERROR; - } - - key = (RsaKey*)rsa->internal; - - if (SetIndividualExternal(&rsa->n, &key->n) < 0) { - CYASSL_MSG("rsa n key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->e, &key->e) < 0) { - CYASSL_MSG("rsa e key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->d, &key->d) < 0) { - CYASSL_MSG("rsa d key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->p, &key->p) < 0) { - CYASSL_MSG("rsa p key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->q, &key->q) < 0) { - CYASSL_MSG("rsa q key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->dmp1, &key->dP) < 0) { - CYASSL_MSG("rsa dP key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->dmq1, &key->dQ) < 0) { - CYASSL_MSG("rsa dQ key error"); - return SSL_FATAL_ERROR; - } - - if (SetIndividualExternal(&rsa->iqmp, &key->u) < 0) { - CYASSL_MSG("rsa u key error"); - return SSL_FATAL_ERROR; - } - - rsa->exSet = 1; - - return 0; - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_RSA_generate_key_ex(CYASSL_RSA* rsa, int bits, CYASSL_BIGNUM* bn, - void* cb) - { - RNG rng; - - CYASSL_MSG("CyaSSL_RSA_generate_key_ex"); - - (void)rsa; - (void)bits; - (void)cb; - (void)bn; - - if (InitRng(&rng) < 0) { - CYASSL_MSG("RNG init failed"); - return SSL_FATAL_ERROR; - } - -#ifdef CYASSL_KEY_GEN - if (MakeRsaKey((RsaKey*)rsa->internal, bits, 65537, &rng) < 0) { - CYASSL_MSG("MakeRsaKey failed"); - return SSL_FATAL_ERROR; - } - - if (SetRsaExternal(rsa) < 0) { - CYASSL_MSG("SetRsaExternal failed"); - return SSL_FATAL_ERROR; - } - - rsa->inSet = 1; - - return SSL_SUCCESS; -#else - CYASSL_MSG("No Key Gen built in"); - return SSL_FATAL_ERROR; -#endif - - } - - - /* SSL_SUCCESS on ok */ - int CyaSSL_RSA_blinding_on(CYASSL_RSA* rsa, CYASSL_BN_CTX* bn) - { - (void)rsa; - (void)bn; - - CYASSL_MSG("CyaSSL_RSA_blinding_on"); - - return SSL_SUCCESS; /* on by default */ - } - - - int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr, - unsigned char* to, CYASSL_RSA* rsa, int padding) - { - (void)len; - (void)fr; - (void)to; - (void)rsa; - (void)padding; - - CYASSL_MSG("CyaSSL_RSA_public_encrypt"); - - return SSL_FATAL_ERROR; - } - - - int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr, - unsigned char* to, CYASSL_RSA* rsa, int padding) - { - (void)len; - (void)fr; - (void)to; - (void)rsa; - (void)padding; - - CYASSL_MSG("CyaSSL_RSA_private_decrypt"); - - return SSL_FATAL_ERROR; - } - - - int CyaSSL_RSA_size(const CYASSL_RSA* rsa) - { - CYASSL_MSG("CyaSSL_RSA_size"); - - if (rsa == NULL) - return 0; - - return CyaSSL_BN_num_bytes(rsa->n); - } - - -#ifndef NO_DSA - /* return SSL_SUCCESS on success, < 0 otherwise */ - int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet, - CYASSL_DSA* dsa) - { - RNG tmpRNG; - RNG* rng = &tmpRNG; - - CYASSL_MSG("CyaSSL_DSA_do_sign"); - - if (d == NULL || sigRet == NULL || dsa == NULL) { - CYASSL_MSG("Bad function arguments"); - return SSL_FATAL_ERROR; - } - - if (dsa->inSet == 0) { - CYASSL_MSG("No DSA internal set"); - return SSL_FATAL_ERROR; - } - - if (InitRng(&tmpRNG) != 0) { - CYASSL_MSG("Bad RNG Init, trying global"); - if (initGlobalRNG == 0) { - CYASSL_MSG("Global RNG no Init"); - return SSL_FATAL_ERROR; - } - rng = &globalRNG; - } - - if (DsaSign(d, sigRet, (DsaKey*)dsa->internal, rng) < 0) { - CYASSL_MSG("DsaSign failed"); - return SSL_FATAL_ERROR; - } - - return SSL_SUCCESS; - } -#endif /* NO_DSA */ - - - /* return SSL_SUCCES on ok, 0 otherwise */ - int CyaSSL_RSA_sign(int type, const unsigned char* m, - unsigned int mLen, unsigned char* sigRet, - unsigned int* sigLen, CYASSL_RSA* rsa) - { - byte encodedSig[MAX_ENCODED_SIG_SZ]; - word32 outLen; - word32 signSz; - RNG tmpRNG; - RNG* rng = &tmpRNG; - - CYASSL_MSG("CyaSSL_RSA_sign"); - - if (m == NULL || sigRet == NULL || sigLen == NULL || rsa == NULL) { - CYASSL_MSG("Bad function arguments"); - return 0; - } - - if (rsa->inSet == 0) { - CYASSL_MSG("No RSA internal set"); - return 0; - } - - outLen = (word32)CyaSSL_BN_num_bytes(rsa->n); - if (outLen == 0) { - CYASSL_MSG("Bad RSA size"); - return 0; - } - - if (InitRng(&tmpRNG) != 0) { - CYASSL_MSG("Bad RNG Init, trying global"); - if (initGlobalRNG == 0) { - CYASSL_MSG("Global RNG no Init"); - return 0; - } - rng = &globalRNG; - } - - switch (type) { - case NID_md5: - type = MD5h; - break; - - case NID_sha1: - type = SHAh; - break; - - default: - CYASSL_MSG("Bad md type"); - return 0; - } - - signSz = EncodeSignature(encodedSig, m, mLen, type); - if (signSz == 0) { - CYASSL_MSG("Bad Encode Signature"); - return 0; - } - - *sigLen = RsaSSL_Sign(encodedSig, signSz, sigRet, outLen, - (RsaKey*)rsa->internal, rng); - if (*sigLen <= 0) { - CYASSL_MSG("Bad Rsa Sign"); - return 0; - } - - CYASSL_MSG("CyaSSL_RSA_sign success"); - return SSL_SUCCESS; - } - - - int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from, - unsigned char* to, CYASSL_RSA* rsa, int padding) - { - (void)flen; - (void)from; - (void)to; - (void)rsa; - (void)padding; - - CYASSL_MSG("CyaSSL_RSA_public_decrypt"); - - return SSL_FATAL_ERROR; - } - - - /* generate p-1 and q-1, SSL_SUCCESS on ok */ - int CyaSSL_RSA_GenAdd(CYASSL_RSA* rsa) - { - int err; - mp_int tmp; - - CYASSL_MSG("CyaSSL_RsaGenAdd"); - - if (rsa == NULL || rsa->p == NULL || rsa->q == NULL || rsa->d == NULL || - rsa->dmp1 == NULL || rsa->dmq1 == NULL) { - CYASSL_MSG("rsa no init error"); - return SSL_FATAL_ERROR; - } - - if (mp_init(&tmp) != MP_OKAY) { - CYASSL_MSG("mp_init error"); - return SSL_FATAL_ERROR; - } - - err = mp_sub_d((mp_int*)rsa->p->internal, 1, &tmp); - if (err != MP_OKAY) { - CYASSL_MSG("mp_sub_d error"); - } - else - err = mp_mod((mp_int*)rsa->d->internal, &tmp, - (mp_int*)rsa->dmp1->internal); - - if (err != MP_OKAY) { - CYASSL_MSG("mp_mod error"); - } - else - err = mp_sub_d((mp_int*)rsa->q->internal, 1, &tmp); - if (err != MP_OKAY) { - CYASSL_MSG("mp_sub_d error"); - } - else - err = mp_mod((mp_int*)rsa->d->internal, &tmp, - (mp_int*)rsa->dmq1->internal); - - mp_clear(&tmp); - - if (err == MP_OKAY) - return SSL_SUCCESS; - else - return SSL_FATAL_ERROR; - } - - - void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen, - const EVP_MD* type) - { - CYASSL_MSG("CyaSSL_HMAC_Init"); - - if (ctx == NULL) { - CYASSL_MSG("no ctx on init"); - return; - } - - if (type) { - CYASSL_MSG("init has type"); - - if (XSTRNCMP(type, "MD5", 3) == 0) { - CYASSL_MSG("md5 hmac"); - ctx->type = MD5; - } - else if (XSTRNCMP(type, "SHA256", 6) == 0) { - CYASSL_MSG("sha256 hmac"); - ctx->type = SHA256; - } - - /* has to be last since would pick or 256, 384, or 512 too */ - else if (XSTRNCMP(type, "SHA", 3) == 0) { - CYASSL_MSG("sha hmac"); - ctx->type = SHA; - } - else { - CYASSL_MSG("bad init type"); - } - } - - if (key && keylen) { - CYASSL_MSG("keying hmac"); - HmacSetKey(&ctx->hmac, ctx->type, (const byte*)key, (word32)keylen); - /* OpenSSL compat, no error */ - } - } - - - void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, const unsigned char* data, - int len) - { - CYASSL_MSG("CyaSSL_HMAC_Update"); - - if (ctx && data) { - CYASSL_MSG("updating hmac"); - HmacUpdate(&ctx->hmac, data, (word32)len); - /* OpenSSL compat, no error */ - } - } - - - void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash, - unsigned int* len) - { - CYASSL_MSG("CyaSSL_HMAC_Final"); - - if (ctx && hash) { - CYASSL_MSG("final hmac"); - HmacFinal(&ctx->hmac, hash); - /* OpenSSL compat, no error */ - - if (len) { - CYASSL_MSG("setting output len"); - switch (ctx->type) { - case MD5: - *len = MD5_DIGEST_SIZE; - break; - - case SHA: - *len = SHA_DIGEST_SIZE; - break; - - case SHA256: - *len = SHA256_DIGEST_SIZE; - break; - - default: - CYASSL_MSG("bad hmac type"); - } - } - } - } - - - void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx) - { - (void)ctx; - - CYASSL_MSG("CyaSSL_HMAC_cleanup"); - } - - - const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int id) - { - CYASSL_MSG("CyaSSL_get_digestbynid"); - - switch(id) { - case NID_md5: - return CyaSSL_EVP_md5(); - - case NID_sha1: - return CyaSSL_EVP_sha1(); - - default: - CYASSL_MSG("Bad digest id value"); - } - - return NULL; - } - - - CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY* key) - { - (void)key; - CYASSL_MSG("CyaSSL_EVP_PKEY_get1_RSA"); - - return NULL; - } - - - CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY* key) - { - (void)key; - CYASSL_MSG("CyaSSL_EVP_PKEY_get1_DSA"); - - return NULL; - } - - - void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_MSG("CyaSSL_EVP_X_STATE"); - - if (ctx) { - switch (ctx->cipherType) { - case ARC4_TYPE: - CYASSL_MSG("returning arc4 state"); - return (void*)&ctx->cipher.arc4.x; - - default: - CYASSL_MSG("bad x state type"); - return 0; - } - } - - return NULL; - } - - - int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_MSG("CyaSSL_EVP_X_STATE_LEN"); - - if (ctx) { - switch (ctx->cipherType) { - case ARC4_TYPE: - CYASSL_MSG("returning arc4 state size"); - return sizeof(Arc4); - - default: - CYASSL_MSG("bad x state type"); - return 0; - } - } - - return 0; - } - - - void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, - unsigned char* iv, int len) - { - (void)len; - - CYASSL_MSG("CyaSSL_3des_iv"); - - if (ctx == NULL || iv == NULL) { - CYASSL_MSG("Bad function argument"); - return; - } - - if (doset) - Des3_SetIV(&ctx->cipher.des3, iv); /* OpenSSL compat, no ret */ - else - memcpy(iv, &ctx->cipher.des3.reg, DES_BLOCK_SIZE); - } - - - void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset, - unsigned char* iv, int len) - { - (void)len; - - CYASSL_MSG("CyaSSL_aes_ctr_iv"); - - if (ctx == NULL || iv == NULL) { - CYASSL_MSG("Bad function argument"); - return; - } - - if (doset) - AesSetIV(&ctx->cipher.aes, iv); /* OpenSSL compat, no ret */ - else - memcpy(iv, &ctx->cipher.aes.reg, AES_BLOCK_SIZE); - } - - - const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void) - { - CYASSL_MSG("CyaSSL_ripemd160"); - - return NULL; - } - - - int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* type) - { - CYASSL_MSG("CyaSSL_EVP_MD_size"); - - if (type == NULL) { - CYASSL_MSG("No md type arg"); - return BAD_FUNC_ARG; - } - - if (XSTRNCMP(type, "MD5", 3) == 0) { - return MD5_DIGEST_SIZE; - } - else if (XSTRNCMP(type, "SHA256", 6) == 0) { - return SHA256_DIGEST_SIZE; - } - #ifdef CYASSL_SHA384 - else if (XSTRNCMP(type, "SHA384", 6) == 0) { - return SHA384_DIGEST_SIZE; - } - #endif - #ifdef CYASSL_SHA512 - else if (XSTRNCMP(type, "SHA512", 6) == 0) { - return SHA512_DIGEST_SIZE; - } - #endif - /* has to be last since would pick or 256, 384, or 512 too */ - else if (XSTRNCMP(type, "SHA", 3) == 0) { - return SHA_DIGEST_SIZE; - } - - return BAD_FUNC_ARG; - } - - - int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX* ctx) - { - CYASSL_MSG("CyaSSL_EVP_CIPHER_CTX_iv_length"); - - switch (ctx->cipherType) { - - case AES_128_CBC_TYPE : - case AES_192_CBC_TYPE : - case AES_256_CBC_TYPE : - CYASSL_MSG("AES CBC"); - return AES_BLOCK_SIZE; - -#ifdef CYASSL_AES_COUNTER - case AES_128_CTR_TYPE : - case AES_192_CTR_TYPE : - case AES_256_CTR_TYPE : - CYASSL_MSG("AES CTR"); - return AES_BLOCK_SIZE; -#endif - - case DES_CBC_TYPE : - CYASSL_MSG("DES CBC"); - return DES_BLOCK_SIZE; - - case DES_EDE3_CBC_TYPE : - CYASSL_MSG("DES EDE3 CBC"); - return DES_BLOCK_SIZE; - - case ARC4_TYPE : - CYASSL_MSG("ARC4"); - return 0; - - case NULL_CIPHER_TYPE : - CYASSL_MSG("NULL"); - return 0; - - default: { - CYASSL_MSG("bad type"); - } - } - return 0; - } - - - void CyaSSL_OPENSSL_free(void* p) - { - CYASSL_MSG("CyaSSL_OPENSSL_free"); - - XFREE(p, NULL, 0); - } - - - int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa, - const EVP_CIPHER* cipher, - unsigned char* passwd, int len, - pem_password_cb cb, void* arg) - { - (void)bio; - (void)rsa; - (void)cipher; - (void)passwd; - (void)len; - (void)cb; - (void)arg; - - CYASSL_MSG("CyaSSL_PEM_write_bio_RSAPrivateKey"); - - return SSL_FATAL_ERROR; - } - - - - int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa, - const EVP_CIPHER* cipher, - unsigned char* passwd, int len, - pem_password_cb cb, void* arg) - { - (void)bio; - (void)rsa; - (void)cipher; - (void)passwd; - (void)len; - (void)cb; - (void)arg; - - CYASSL_MSG("CyaSSL_PEM_write_bio_DSAPrivateKey"); - - return SSL_FATAL_ERROR; - } - - - - CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio, - CYASSL_EVP_PKEY** key, pem_password_cb cb, void* arg) - { - (void)bio; - (void)key; - (void)cb; - (void)arg; - - CYASSL_MSG("CyaSSL_PEM_read_bio_PrivateKey"); - - return NULL; - } - - - - -/* Load RSA from Der, SSL_SUCCESS on success < 0 on error */ -int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz) -{ - word32 idx = 0; - int ret; - - CYASSL_ENTER("CyaSSL_RSA_LoadDer"); - - if (rsa == NULL || rsa->internal == NULL || der == NULL || derSz <= 0) { - CYASSL_MSG("Bad function arguments"); - return BAD_FUNC_ARG; - } - - ret = RsaPrivateKeyDecode(der, &idx, (RsaKey*)rsa->internal, derSz); - if (ret < 0) { - CYASSL_MSG("RsaPrivateKeyDecode failed"); - return ret; - } - - if (SetRsaExternal(rsa) < 0) { - CYASSL_MSG("SetRsaExternal failed"); - return SSL_FATAL_ERROR; - } - - rsa->inSet = 1; - - return SSL_SUCCESS; -} - - -#ifndef NO_DSA -/* Load DSA from Der, SSL_SUCCESS on success < 0 on error */ -int CyaSSL_DSA_LoadDer(CYASSL_DSA* dsa, const unsigned char* der, int derSz) -{ - word32 idx = 0; - int ret; - - CYASSL_ENTER("CyaSSL_DSA_LoadDer"); - - if (dsa == NULL || dsa->internal == NULL || der == NULL || derSz <= 0) { - CYASSL_MSG("Bad function arguments"); - return BAD_FUNC_ARG; - } - - ret = DsaPrivateKeyDecode(der, &idx, (DsaKey*)dsa->internal, derSz); - if (ret < 0) { - CYASSL_MSG("DsaPrivateKeyDecode failed"); - return ret; - } - - if (SetDsaExternal(dsa) < 0) { - CYASSL_MSG("SetDsaExternal failed"); - return SSL_FATAL_ERROR; - } - - dsa->inSet = 1; - - return SSL_SUCCESS; -} -#endif /* NO_DSA */ - - - - -#endif /* OPENSSL_EXTRA */ - - -#ifdef SESSION_CERTS - - -/* Get peer's certificate chain */ -CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl) -{ - CYASSL_ENTER("CyaSSL_get_peer_chain"); - if (ssl) - return &ssl->session.chain; - - return 0; -} - - -/* Get peer's certificate chain total count */ -int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain) -{ - CYASSL_ENTER("CyaSSL_get_chain_count"); - if (chain) - return chain->count; - - return 0; -} - - -/* Get peer's ASN.1 DER ceritifcate at index (idx) length in bytes */ -int CyaSSL_get_chain_length(CYASSL_X509_CHAIN* chain, int idx) -{ - CYASSL_ENTER("CyaSSL_get_chain_length"); - if (chain) - return chain->certs[idx].length; - - return 0; -} - - -/* Get peer's ASN.1 DER ceritifcate at index (idx) */ -byte* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN* chain, int idx) -{ - CYASSL_ENTER("CyaSSL_get_chain_cert"); - if (chain) - return chain->certs[idx].buffer; - - return 0; -} - - -/* Get peer's CyaSSL X509 ceritifcate at index (idx) */ -CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN* chain, int idx) -{ - int ret; - CYASSL_X509* x509; - DecodedCert dCert; - - CYASSL_ENTER("CyaSSL_get_chain_X509"); - if (chain == NULL) - return NULL; - - InitDecodedCert(&dCert, chain->certs[idx].buffer, chain->certs[idx].length, - NULL); - ret = ParseCertRelative(&dCert, CERT_TYPE, 0, NULL); - if (ret != 0) { - CYASSL_MSG("Failed to parse cert"); - FreeDecodedCert(&dCert); - return NULL; - } - - x509 = (CYASSL_X509*)XMALLOC(sizeof(CYASSL_X509), NULL, DYNAMIC_TYPE_X509); - if (x509 == NULL) { - CYASSL_MSG("Failed alloc X509"); - FreeDecodedCert(&dCert); - return NULL; - } - InitX509(x509, 1); - - ret = CopyDecodedToX509(x509, &dCert); - if (ret != 0) { - CYASSL_MSG("Failed to copy decoded"); - XFREE(x509, NULL, DYNAMIC_TYPE_X509); - x509 = NULL; - } - FreeDecodedCert(&dCert); - - return x509; -} - - -/* Get peer's PEM ceritifcate at index (idx), output to buffer if inLen big - enough else return error (-1), output length is in *outLen - SSL_SUCCESS on ok */ -int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN* chain, int idx, - unsigned char* buf, int inLen, int* outLen) -{ - const char header[] = "-----BEGIN CERTIFICATE-----\n"; - const char footer[] = "-----END CERTIFICATE-----\n"; - - int headerLen = sizeof(header) - 1; - int footerLen = sizeof(footer) - 1; - int i; - int err; - - CYASSL_ENTER("CyaSSL_get_chain_cert_pem"); - if (!chain || !outLen || !buf) - return BAD_FUNC_ARG; - - /* don't even try if inLen too short */ - if (inLen < headerLen + footerLen + chain->certs[idx].length) - return BAD_FUNC_ARG; - - /* header */ - XMEMCPY(buf, header, headerLen); - i = headerLen; - - /* body */ - *outLen = inLen; /* input to Base64_Encode */ - if ( (err = Base64_Encode(chain->certs[idx].buffer, - chain->certs[idx].length, buf + i, (word32*)outLen)) < 0) - return err; - i += *outLen; - - /* footer */ - if ( (i + footerLen) > inLen) - return BAD_FUNC_ARG; - XMEMCPY(buf + i, footer, footerLen); - *outLen += headerLen + footerLen; - - return SSL_SUCCESS; -} - - -/* get session ID */ -const byte* CyaSSL_get_sessionID(const CYASSL_SESSION* session) -{ - CYASSL_ENTER("CyaSSL_get_sessionID"); - if (session) - return session->sessionID; - - return NULL; -} - - -#endif /* SESSION_CERTS */ - - -#ifndef NO_CERTS -#ifdef HAVE_PK_CALLBACKS - -#ifdef HAVE_ECC - -void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX* ctx, CallbackEccSign cb) -{ - if (ctx) - ctx->EccSignCb = cb; -} - - -void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->EccSignCtx = ctx; -} - - -void* CyaSSL_GetEccSignCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->EccSignCtx; - - return NULL; -} - - -void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX* ctx, CallbackEccVerify cb) -{ - if (ctx) - ctx->EccVerifyCb = cb; -} - - -void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->EccVerifyCtx = ctx; -} - - -void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->EccVerifyCtx; - - return NULL; -} - -#endif /* HAVE_ECC */ - -#ifndef NO_RSA - -void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX* ctx, CallbackRsaSign cb) -{ - if (ctx) - ctx->RsaSignCb = cb; -} - - -void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->RsaSignCtx = ctx; -} - - -void* CyaSSL_GetRsaSignCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->RsaSignCtx; - - return NULL; -} - - -void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX* ctx, CallbackRsaVerify cb) -{ - if (ctx) - ctx->RsaVerifyCb = cb; -} - - -void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->RsaVerifyCtx = ctx; -} - - -void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->RsaVerifyCtx; - - return NULL; -} - -void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX* ctx, CallbackRsaEnc cb) -{ - if (ctx) - ctx->RsaEncCb = cb; -} - - -void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->RsaEncCtx = ctx; -} - - -void* CyaSSL_GetRsaEncCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->RsaEncCtx; - - return NULL; -} - -void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX* ctx, CallbackRsaDec cb) -{ - if (ctx) - ctx->RsaDecCb = cb; -} - - -void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx) -{ - if (ssl) - ssl->RsaDecCtx = ctx; -} - - -void* CyaSSL_GetRsaDecCtx(CYASSL* ssl) -{ - if (ssl) - return ssl->RsaDecCtx; - - return NULL; -} - - -#endif /* NO_RSA */ - -#endif /* HAVE_PK_CALLBACKS */ -#endif /* NO_CERTS */ - - -#ifdef CYASSL_HAVE_WOLFSCEP - /* Used by autoconf to see if wolfSCEP is available */ - void CyaSSL_wolfSCEP(void) {} -#endif - - -#ifdef CYASSL_HAVE_CERT_SERVICE - /* Used by autoconf to see if cert service is available */ - void CyaSSL_cert_service(void) {} -#endif - diff --git a/project1/cyassl-3.0.0/src/tls.c b/project1/cyassl-3.0.0/src/tls.c deleted file mode 100644 index 420ea15b..00000000 --- a/project1/cyassl-3.0.0/src/tls.c +++ /dev/null @@ -1,1973 +0,0 @@ -/* tls.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include -#include -#include - - - -#ifndef NO_TLS - - -#ifndef min - - static INLINE word32 min(word32 a, word32 b) - { - return a > b ? b : a; - } - -#endif /* min */ - - -#ifdef CYASSL_SHA384 - #define PHASH_MAX_DIGEST_SIZE SHA384_DIGEST_SIZE -#else - #define PHASH_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE -#endif - -/* compute p_hash for MD5, SHA-1, SHA-256, or SHA-384 for TLSv1 PRF */ -static int p_hash(byte* result, word32 resLen, const byte* secret, - word32 secLen, const byte* seed, word32 seedLen, int hash) -{ - word32 len = PHASH_MAX_DIGEST_SIZE; - word32 times; - word32 lastLen; - word32 lastTime; - word32 i; - word32 idx = 0; - int ret; - byte previous[PHASH_MAX_DIGEST_SIZE]; /* max size */ - byte current[PHASH_MAX_DIGEST_SIZE]; /* max size */ - - Hmac hmac; - - switch (hash) { - #ifndef NO_MD5 - case md5_mac: - { - len = MD5_DIGEST_SIZE; - hash = MD5; - } - break; - #endif - #ifndef NO_SHA256 - case sha256_mac: - { - len = SHA256_DIGEST_SIZE; - hash = SHA256; - } - break; - #endif - #ifdef CYASSL_SHA384 - case sha384_mac: - { - len = SHA384_DIGEST_SIZE; - hash = SHA384; - } - break; - #endif -#ifndef NO_SHA - case sha_mac: - default: - { - len = SHA_DIGEST_SIZE; - hash = SHA; - } - break; -#endif - } - - times = resLen / len; - lastLen = resLen % len; - if (lastLen) times += 1; - lastTime = times - 1; - - ret = HmacSetKey(&hmac, hash, secret, secLen); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, seed, seedLen); /* A0 = seed */ - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, previous); /* A1 */ - if (ret != 0) - return ret; - - for (i = 0; i < times; i++) { - ret = HmacUpdate(&hmac, previous, len); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, seed, seedLen); - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, current); - if (ret != 0) - return ret; - - if ( (i == lastTime) && lastLen) - XMEMCPY(&result[idx], current, min(lastLen, sizeof(current))); - else { - XMEMCPY(&result[idx], current, len); - idx += len; - ret = HmacUpdate(&hmac, previous, len); - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, previous); - if (ret != 0) - return ret; - } - } - XMEMSET(previous, 0, sizeof previous); - XMEMSET(current, 0, sizeof current); - XMEMSET(&hmac, 0, sizeof hmac); - - return 0; -} - - - -#ifndef NO_OLD_TLS - -/* calculate XOR for TLSv1 PRF */ -static INLINE void get_xor(byte *digest, word32 digLen, byte* md5, byte* sha) -{ - word32 i; - - for (i = 0; i < digLen; i++) - digest[i] = md5[i] ^ sha[i]; -} - - -/* compute TLSv1 PRF (pseudo random function using HMAC) */ -static int doPRF(byte* digest, word32 digLen, const byte* secret,word32 secLen, - const byte* label, word32 labLen, const byte* seed, - word32 seedLen) -{ - int ret; - word32 half = (secLen + 1) / 2; - - byte md5_half[MAX_PRF_HALF]; /* half is real size */ - byte sha_half[MAX_PRF_HALF]; /* half is real size */ - byte labelSeed[MAX_PRF_LABSEED]; /* labLen + seedLen is real size */ - byte md5_result[MAX_PRF_DIG]; /* digLen is real size */ - byte sha_result[MAX_PRF_DIG]; /* digLen is real size */ - - if (half > MAX_PRF_HALF) - return BUFFER_E; - if (labLen + seedLen > MAX_PRF_LABSEED) - return BUFFER_E; - if (digLen > MAX_PRF_DIG) - return BUFFER_E; - - XMEMSET(md5_result, 0, digLen); - XMEMSET(sha_result, 0, digLen); - - XMEMCPY(md5_half, secret, half); - XMEMCPY(sha_half, secret + half - secLen % 2, half); - - XMEMCPY(labelSeed, label, labLen); - XMEMCPY(labelSeed + labLen, seed, seedLen); - - ret = p_hash(md5_result, digLen, md5_half, half, labelSeed, - labLen + seedLen, md5_mac); - if (ret != 0) - return ret; - ret = p_hash(sha_result, digLen, sha_half, half, labelSeed, - labLen + seedLen, sha_mac); - if (ret != 0) - return ret; - get_xor(digest, digLen, md5_result, sha_result); - - return 0; -} - -#endif - - -/* Wrapper to call straight thru to p_hash in TSL 1.2 cases to remove stack - use */ -static int PRF(byte* digest, word32 digLen, const byte* secret, word32 secLen, - const byte* label, word32 labLen, const byte* seed, word32 seedLen, - int useAtLeastSha256, int hash_type) -{ - int ret = 0; - - if (useAtLeastSha256) { - byte labelSeed[MAX_PRF_LABSEED]; /* labLen + seedLen is real size */ - - if (labLen + seedLen > MAX_PRF_LABSEED) - return BUFFER_E; - - XMEMCPY(labelSeed, label, labLen); - XMEMCPY(labelSeed + labLen, seed, seedLen); - - /* If a cipher suite wants an algorithm better than sha256, it - * should use better. */ - if (hash_type < sha256_mac) - hash_type = sha256_mac; - ret = p_hash(digest, digLen, secret, secLen, labelSeed, - labLen + seedLen, hash_type); - } -#ifndef NO_OLD_TLS - else { - ret = doPRF(digest, digLen, secret, secLen, label, labLen, seed, - seedLen); - } -#endif - - return ret; -} - - -#ifdef CYASSL_SHA384 - #define HSHASH_SZ SHA384_DIGEST_SIZE -#else - #define HSHASH_SZ FINISHED_SZ -#endif - - -int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) -{ - const byte* side; - byte handshake_hash[HSHASH_SZ]; - word32 hashSz = FINISHED_SZ; - -#ifndef NO_OLD_TLS - Md5Final(&ssl->hashMd5, handshake_hash); - ShaFinal(&ssl->hashSha, &handshake_hash[MD5_DIGEST_SIZE]); -#endif - - if (IsAtLeastTLSv1_2(ssl)) { -#ifndef NO_SHA256 - if (ssl->specs.mac_algorithm <= sha256_mac) { - int ret = Sha256Final(&ssl->hashSha256, handshake_hash); - - if (ret != 0) - return ret; - - hashSz = SHA256_DIGEST_SIZE; - } -#endif -#ifdef CYASSL_SHA384 - if (ssl->specs.mac_algorithm == sha384_mac) { - int ret = Sha384Final(&ssl->hashSha384, handshake_hash); - - if (ret != 0) - return ret; - - hashSz = SHA384_DIGEST_SIZE; - } -#endif - } - - if ( XSTRNCMP((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0) - side = tls_client; - else - side = tls_server; - - return PRF((byte*)hashes, TLS_FINISHED_SZ, ssl->arrays->masterSecret, - SECRET_LEN, side, FINISHED_LABEL_SZ, handshake_hash, hashSz, - IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); -} - - -#ifndef NO_OLD_TLS - -ProtocolVersion MakeTLSv1(void) -{ - ProtocolVersion pv; - pv.major = SSLv3_MAJOR; - pv.minor = TLSv1_MINOR; - - return pv; -} - - -ProtocolVersion MakeTLSv1_1(void) -{ - ProtocolVersion pv; - pv.major = SSLv3_MAJOR; - pv.minor = TLSv1_1_MINOR; - - return pv; -} - -#endif - - -ProtocolVersion MakeTLSv1_2(void) -{ - ProtocolVersion pv; - pv.major = SSLv3_MAJOR; - pv.minor = TLSv1_2_MINOR; - - return pv; -} - - -static const byte master_label[MASTER_LABEL_SZ + 1] = "master secret"; -static const byte key_label [KEY_LABEL_SZ + 1] = "key expansion"; - - -int DeriveTlsKeys(CYASSL* ssl) -{ - int ret; - int length = 2 * ssl->specs.hash_size + - 2 * ssl->specs.key_size + - 2 * ssl->specs.iv_size; - byte seed[SEED_LEN]; - byte key_data[MAX_PRF_DIG]; - - XMEMCPY(seed, ssl->arrays->serverRandom, RAN_LEN); - XMEMCPY(&seed[RAN_LEN], ssl->arrays->clientRandom, RAN_LEN); - - ret = PRF(key_data, length, ssl->arrays->masterSecret, SECRET_LEN, - key_label, KEY_LABEL_SZ, seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), - ssl->specs.mac_algorithm); - if (ret != 0) - return ret; - - return StoreKeys(ssl, key_data); -} - - -int MakeTlsMasterSecret(CYASSL* ssl) -{ - int ret; - byte seed[SEED_LEN]; - - XMEMCPY(seed, ssl->arrays->clientRandom, RAN_LEN); - XMEMCPY(&seed[RAN_LEN], ssl->arrays->serverRandom, RAN_LEN); - - ret = PRF(ssl->arrays->masterSecret, SECRET_LEN, - ssl->arrays->preMasterSecret, ssl->arrays->preMasterSz, - master_label, MASTER_LABEL_SZ, - seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); - if (ret != 0) - return ret; - -#ifdef SHOW_SECRETS - { - int i; - printf("master secret: "); - for (i = 0; i < SECRET_LEN; i++) - printf("%02x", ssl->arrays->masterSecret[i]); - printf("\n"); - } -#endif - - return DeriveTlsKeys(ssl); -} - - -/* Used by EAP-TLS and EAP-TTLS to derive keying material from - * the master_secret. */ -int CyaSSL_make_eap_keys(CYASSL* ssl, void* msk, unsigned int len, - const char* label) -{ - byte seed[SEED_LEN]; - - /* - * As per RFC-5281, the order of the client and server randoms is reversed - * from that used by the TLS protocol to derive keys. - */ - XMEMCPY(seed, ssl->arrays->clientRandom, RAN_LEN); - XMEMCPY(&seed[RAN_LEN], ssl->arrays->serverRandom, RAN_LEN); - - return PRF((byte*)msk, len, - ssl->arrays->masterSecret, SECRET_LEN, - (const byte *)label, (word32)strlen(label), - seed, SEED_LEN, IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm); - -} - - -/*** next for static INLINE s copied internal.c ***/ - -/* convert 16 bit integer to opaque */ -static INLINE void c16toa(word16 u16, byte* c) -{ - c[0] = (u16 >> 8) & 0xff; - c[1] = u16 & 0xff; -} - -#ifdef HAVE_TLS_EXTENSIONS -/* convert opaque to 16 bit integer */ -static INLINE void ato16(const byte* c, word16* u16) -{ - *u16 = (c[0] << 8) | (c[1]); -} - -#ifdef HAVE_SNI -/* convert a 24 bit integer into a 32 bit one */ -static INLINE void c24to32(const word24 u24, word32* u32) -{ - *u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; -} -#endif -#endif - -/* convert 32 bit integer to opaque */ -static INLINE void c32toa(word32 u32, byte* c) -{ - c[0] = (u32 >> 24) & 0xff; - c[1] = (u32 >> 16) & 0xff; - c[2] = (u32 >> 8) & 0xff; - c[3] = u32 & 0xff; -} - - -static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) -{ -#ifdef CYASSL_DTLS - if (ssl->options.dtls) { - if (verify) - return ssl->keys.dtls_state.curSeq; /* explicit from peer */ - else - return ssl->keys.dtls_sequence_number - 1; /* already incremented */ - } -#endif - if (verify) - return ssl->keys.peer_sequence_number++; - else - return ssl->keys.sequence_number++; -} - - -#ifdef CYASSL_DTLS - -static INLINE word32 GetEpoch(CYASSL* ssl, int verify) -{ - if (verify) - return ssl->keys.dtls_state.curEpoch; - else - return ssl->keys.dtls_epoch; -} - -#endif /* CYASSL_DTLS */ - - -/*** end copy ***/ - - -/* return HMAC digest type in CyaSSL format */ -int CyaSSL_GetHmacType(CYASSL* ssl) -{ - if (ssl == NULL) - return BAD_FUNC_ARG; - - switch (ssl->specs.mac_algorithm) { - #ifndef NO_MD5 - case md5_mac: - { - return MD5; - } - #endif - #ifndef NO_SHA256 - case sha256_mac: - { - return SHA256; - } - #endif - #ifdef CYASSL_SHA384 - case sha384_mac: - { - return SHA384; - } - - #endif - #ifndef NO_SHA - case sha_mac: - { - return SHA; - } - #endif - #ifdef HAVE_BLAKE2 - case blake2b_mac: - { - return BLAKE2B_ID; - } - #endif - default: - { - return SSL_FATAL_ERROR; - } - } -} - - -int CyaSSL_SetTlsHmacInner(CYASSL* ssl, byte* inner, word32 sz, int content, - int verify) -{ - if (ssl == NULL || inner == NULL) - return BAD_FUNC_ARG; - - XMEMSET(inner, 0, CYASSL_TLS_HMAC_INNER_SZ); - -#ifdef CYASSL_DTLS - if (ssl->options.dtls) - c16toa((word16)GetEpoch(ssl, verify), inner); -#endif - c32toa(GetSEQIncrement(ssl, verify), &inner[sizeof(word32)]); - inner[SEQ_SZ] = (byte)content; - inner[SEQ_SZ + ENUM_LEN] = ssl->version.major; - inner[SEQ_SZ + ENUM_LEN + ENUM_LEN] = ssl->version.minor; - c16toa((word16)sz, inner + SEQ_SZ + ENUM_LEN + VERSION_SZ); - - return 0; -} - - -/* TLS type HMAC */ -int TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz, - int content, int verify) -{ - Hmac hmac; - int ret; - byte myInner[CYASSL_TLS_HMAC_INNER_SZ]; - - if (ssl == NULL) - return BAD_FUNC_ARG; - - CyaSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify); - - ret = HmacSetKey(&hmac, CyaSSL_GetHmacType(ssl), - CyaSSL_GetMacSecret(ssl, verify), ssl->specs.hash_size); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, myInner, sizeof(myInner)); - if (ret != 0) - return ret; - ret = HmacUpdate(&hmac, in, sz); /* content */ - if (ret != 0) - return ret; - ret = HmacFinal(&hmac, digest); - if (ret != 0) - return ret; - - return 0; -} - -#ifdef HAVE_TLS_EXTENSIONS - -#define IS_OFF(semaphore, light) \ - ((semaphore)[(light) / 8] ^ (byte) (0x01 << ((light) % 8))) - -#define TURN_ON(semaphore, light) \ - ((semaphore)[(light) / 8] |= (byte) (0x01 << ((light) % 8))) - -static int TLSX_Append(TLSX** list, TLSX_Type type) -{ - TLSX* extension; - - if (list == NULL) /* won't check type since this function is static */ - return BAD_FUNC_ARG; - - if ((extension = XMALLOC(sizeof(TLSX), 0, DYNAMIC_TYPE_TLSX)) == NULL) - return MEMORY_E; - - extension->type = type; - extension->data = NULL; - extension->resp = 0; - extension->next = *list; - *list = extension; - - return 0; -} - -#ifndef NO_CYASSL_SERVER - -void TLSX_SetResponse(CYASSL* ssl, TLSX_Type type); - -void TLSX_SetResponse(CYASSL* ssl, TLSX_Type type) -{ - TLSX *ext = TLSX_Find(ssl->extensions, type); - - if (ext) - ext->resp = 1; -} - -#endif - -/* SNI - Server Name Indication */ - -#ifdef HAVE_SNI - -static void TLSX_SNI_Free(SNI* sni) -{ - if (sni) { - switch (sni->type) { - case CYASSL_SNI_HOST_NAME: - XFREE(sni->data.host_name, 0, DYNAMIC_TYPE_TLSX); - break; - } - - XFREE(sni, 0, DYNAMIC_TYPE_TLSX); - } -} - -static void TLSX_SNI_FreeAll(SNI* list) -{ - SNI* sni; - - while ((sni = list)) { - list = sni->next; - TLSX_SNI_Free(sni); - } -} - -static int TLSX_SNI_Append(SNI** list, byte type, const void* data, word16 size) -{ - SNI* sni; - - if (list == NULL) - return BAD_FUNC_ARG; - - if ((sni = XMALLOC(sizeof(SNI), 0, DYNAMIC_TYPE_TLSX)) == NULL) - return MEMORY_E; - - switch (type) { - case CYASSL_SNI_HOST_NAME: { - sni->data.host_name = XMALLOC(size + 1, 0, DYNAMIC_TYPE_TLSX); - - if (sni->data.host_name) { - XSTRNCPY(sni->data.host_name, (const char*) data, size); - sni->data.host_name[size] = 0; - } else { - XFREE(sni, 0, DYNAMIC_TYPE_TLSX); - return MEMORY_E; - } - } - break; - - default: /* invalid type */ - XFREE(sni, 0, DYNAMIC_TYPE_TLSX); - return BAD_FUNC_ARG; - } - - sni->type = type; - sni->next = *list; - -#ifndef NO_CYASSL_SERVER - sni->options = 0; - sni->status = CYASSL_SNI_NO_MATCH; -#endif - - *list = sni; - - return 0; -} - -static word16 TLSX_SNI_GetSize(SNI* list) -{ - SNI* sni; - word16 length = OPAQUE16_LEN; /* list length */ - - while ((sni = list)) { - list = sni->next; - - length += ENUM_LEN + OPAQUE16_LEN; /* sni type + sni length */ - - switch (sni->type) { - case CYASSL_SNI_HOST_NAME: - length += XSTRLEN((char*) sni->data.host_name); - break; - } - } - - return length; -} - -static word16 TLSX_SNI_Write(SNI* list, byte* output) -{ - SNI* sni; - word16 length = 0; - word16 offset = OPAQUE16_LEN; /* list length offset */ - - while ((sni = list)) { - list = sni->next; - - output[offset++] = sni->type; /* sni type */ - - switch (sni->type) { - case CYASSL_SNI_HOST_NAME: - length = XSTRLEN((char*) sni->data.host_name); - - c16toa(length, output + offset); /* sni length */ - offset += OPAQUE16_LEN; - - XMEMCPY(output + offset, sni->data.host_name, length); - - offset += length; - break; - } - } - - c16toa(offset - OPAQUE16_LEN, output); /* writing list length */ - - return offset; -} - -static SNI* TLSX_SNI_Find(SNI *list, byte type) -{ - SNI *sni = list; - - while (sni && sni->type != type) - sni = sni->next; - - return sni; -} - -#ifndef NO_CYASSL_SERVER -static void TLSX_SNI_SetStatus(TLSX* extensions, byte type, byte status) -{ - TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); - SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); - - if (sni) { - sni->status = status; - CYASSL_MSG("SNI did match!"); - } -} - -byte TLSX_SNI_Status(TLSX* extensions, byte type) -{ - TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); - SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); - - if (sni) - return sni->status; - - return 0; -} -#endif - -static int TLSX_SNI_Parse(CYASSL* ssl, byte* input, word16 length, - byte isRequest) -{ -#ifndef NO_CYASSL_SERVER - word16 size = 0; - word16 offset = 0; -#endif - - TLSX *extension = TLSX_Find(ssl->extensions, SERVER_NAME_INDICATION); - - if (!extension) - extension = TLSX_Find(ssl->ctx->extensions, SERVER_NAME_INDICATION); - - if (!extension || !extension->data) - return isRequest ? 0 : BUFFER_ERROR; /* not using SNI OR unexpected - SNI response from server. */ - - if (!isRequest) - return length ? BUFFER_ERROR : 0; /* SNI response must be empty! - Nothing else to do. */ - -#ifndef NO_CYASSL_SERVER - - if (OPAQUE16_LEN > length) - return BUFFER_ERROR; - - ato16(input, &size); - offset += OPAQUE16_LEN; - - /* validating sni list length */ - if (length != OPAQUE16_LEN + size) - return BUFFER_ERROR; - - for (size = 0; offset < length; offset += size) { - SNI *sni; - byte type = input[offset++]; - - if (offset + OPAQUE16_LEN > length) - return BUFFER_ERROR; - - ato16(input + offset, &size); - offset += OPAQUE16_LEN; - - if (offset + size > length) - return BUFFER_ERROR; - - if (!(sni = TLSX_SNI_Find((SNI *) extension->data, type))) { - continue; /* not using this SNI type */ - } - - switch(type) { - case CYASSL_SNI_HOST_NAME: { - byte matched = (XSTRLEN(sni->data.host_name) == size) - && (XSTRNCMP(sni->data.host_name, - (const char *) input + offset, size) == 0); - - if (matched || sni->options & CYASSL_SNI_ANSWER_ON_MISMATCH) { - int r = TLSX_UseSNI(&ssl->extensions, - type, input + offset, size); - - if (r != SSL_SUCCESS) return r; /* throw error */ - - TLSX_SNI_SetStatus(ssl->extensions, type, - matched ? CYASSL_SNI_REAL_MATCH : CYASSL_SNI_FAKE_MATCH); - - } else if (!(sni->options & CYASSL_SNI_CONTINUE_ON_MISMATCH)) { - SendAlert(ssl, alert_fatal, unrecognized_name); - - return UNKNOWN_SNI_HOST_NAME_E; - } - break; - } - } - - TLSX_SetResponse(ssl, SERVER_NAME_INDICATION); - } - -#endif - - return 0; -} - -int TLSX_UseSNI(TLSX** extensions, byte type, const void* data, word16 size) -{ - TLSX* extension = NULL; - SNI* sni = NULL; - int ret = 0; - - if (extensions == NULL || data == NULL) - return BAD_FUNC_ARG; - - if ((ret = TLSX_SNI_Append(&sni, type, data, size)) != 0) - return ret; - - extension = *extensions; - - /* find SNI extension if it already exists. */ - while (extension && extension->type != SERVER_NAME_INDICATION) - extension = extension->next; - - /* push new SNI extension if it doesn't exists. */ - if (!extension) { - if ((ret = TLSX_Append(extensions, SERVER_NAME_INDICATION)) != 0) { - TLSX_SNI_Free(sni); - return ret; - } - - extension = *extensions; - } - - /* push new SNI object to extension data. */ - sni->next = (SNI*) extension->data; - extension->data = (void*) sni; - - /* look for another server name of the same type to remove (replacement) */ - do { - if (sni->next && sni->next->type == type) { - SNI *next = sni->next; - - sni->next = next->next; - TLSX_SNI_Free(next); - - break; - } - } while ((sni = sni->next)); - - return SSL_SUCCESS; -} - -#ifndef NO_CYASSL_SERVER -word16 TLSX_SNI_GetRequest(TLSX* extensions, byte type, void** data) -{ - TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); - SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); - - if (sni && sni->status != CYASSL_SNI_NO_MATCH) { - switch (sni->type) { - case CYASSL_SNI_HOST_NAME: - *data = sni->data.host_name; - return XSTRLEN(*data); - } - } - - return 0; -} - -void TLSX_SNI_SetOptions(TLSX* extensions, byte type, byte options) -{ - TLSX* extension = TLSX_Find(extensions, SERVER_NAME_INDICATION); - SNI* sni = TLSX_SNI_Find(extension ? extension->data : NULL, type); - - if (sni) - sni->options = options; -} - -int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, - byte type, byte* sni, word32* inOutSz) -{ - word32 offset = 0; - word32 len32 = 0; - word16 len16 = 0; - - if (helloSz < RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + CLIENT_HELLO_FIRST) - return INCOMPLETE_DATA; - - /* TLS record header */ - if ((enum ContentType) clientHello[offset++] != handshake) - return BUFFER_ERROR; - - if (clientHello[offset++] != SSLv3_MAJOR) - return BUFFER_ERROR; - - if (clientHello[offset++] < TLSv1_MINOR) - return BUFFER_ERROR; - - ato16(clientHello + offset, &len16); - offset += OPAQUE16_LEN; - - if (offset + len16 > helloSz) - return INCOMPLETE_DATA; - - /* Handshake header */ - if ((enum HandShakeType) clientHello[offset] != client_hello) - return BUFFER_ERROR; - - c24to32(clientHello + offset + 1, &len32); - offset += HANDSHAKE_HEADER_SZ; - - if (offset + len32 > helloSz) - return BUFFER_ERROR; - - /* client hello */ - offset += VERSION_SZ + RAN_LEN; /* version, random */ - - if (helloSz < offset + clientHello[offset]) - return BUFFER_ERROR; - - offset += ENUM_LEN + clientHello[offset]; /* skip session id */ - - /* cypher suites */ - if (helloSz < offset + OPAQUE16_LEN) - return BUFFER_ERROR; - - ato16(clientHello + offset, &len16); - offset += OPAQUE16_LEN; - - if (helloSz < offset + len16) - return BUFFER_ERROR; - - offset += len16; /* skip cypher suites */ - - /* compression methods */ - if (helloSz < offset + 1) - return BUFFER_ERROR; - - if (helloSz < offset + clientHello[offset]) - return BUFFER_ERROR; - - offset += ENUM_LEN + clientHello[offset]; /* skip compression methods */ - - /* extensions */ - if (helloSz < offset + OPAQUE16_LEN) - return 0; /* no extensions in client hello. */ - - ato16(clientHello + offset, &len16); - offset += OPAQUE16_LEN; - - if (helloSz < offset + len16) - return BUFFER_ERROR; - - while (len16 > OPAQUE16_LEN + OPAQUE16_LEN) { - word16 extType; - word16 extLen; - - ato16(clientHello + offset, &extType); - offset += OPAQUE16_LEN; - - ato16(clientHello + offset, &extLen); - offset += OPAQUE16_LEN; - - if (helloSz < offset + extLen) - return BUFFER_ERROR; - - if (extType != SERVER_NAME_INDICATION) { - offset += extLen; /* skip extension */ - } else { - word16 listLen; - - ato16(clientHello + offset, &listLen); - offset += OPAQUE16_LEN; - - if (helloSz < offset + listLen) - return BUFFER_ERROR; - - while (listLen > ENUM_LEN + OPAQUE16_LEN) { - byte sniType = clientHello[offset++]; - word16 sniLen; - - ato16(clientHello + offset, &sniLen); - offset += OPAQUE16_LEN; - - if (helloSz < offset + sniLen) - return BUFFER_ERROR; - - if (sniType != type) { - offset += sniLen; - listLen -= min(ENUM_LEN + OPAQUE16_LEN + sniLen, listLen); - continue; - } - - *inOutSz = min(sniLen, *inOutSz); - XMEMCPY(sni, clientHello + offset, *inOutSz); - - return SSL_SUCCESS; - } - } - - len16 -= min(2 * OPAQUE16_LEN + extLen, len16); - } - - return len16 ? BUFFER_ERROR : SSL_SUCCESS; -} - -#endif - -#define SNI_FREE_ALL TLSX_SNI_FreeAll -#define SNI_GET_SIZE TLSX_SNI_GetSize -#define SNI_WRITE TLSX_SNI_Write -#define SNI_PARSE TLSX_SNI_Parse - -#else - -#define SNI_FREE_ALL(list) -#define SNI_GET_SIZE(list) 0 -#define SNI_WRITE(a, b) 0 -#define SNI_PARSE(a, b, c, d) 0 - -#endif /* HAVE_SNI */ - -#ifdef HAVE_MAX_FRAGMENT - -static word16 TLSX_MFL_Write(byte* data, byte* output) -{ - output[0] = data[0]; - - return ENUM_LEN; -} - -static int TLSX_MFL_Parse(CYASSL* ssl, byte* input, word16 length, - byte isRequest) -{ - if (length != ENUM_LEN) - return BUFFER_ERROR; - - switch (*input) { - case CYASSL_MFL_2_9 : ssl->max_fragment = 512; break; - case CYASSL_MFL_2_10: ssl->max_fragment = 1024; break; - case CYASSL_MFL_2_11: ssl->max_fragment = 2048; break; - case CYASSL_MFL_2_12: ssl->max_fragment = 4096; break; - case CYASSL_MFL_2_13: ssl->max_fragment = 8192; break; - - default: - SendAlert(ssl, alert_fatal, illegal_parameter); - - return UNKNOWN_MAX_FRAG_LEN_E; - } - -#ifndef NO_CYASSL_SERVER - if (isRequest) { - int r = TLSX_UseMaxFragment(&ssl->extensions, *input); - - if (r != SSL_SUCCESS) return r; /* throw error */ - - TLSX_SetResponse(ssl, MAX_FRAGMENT_LENGTH); - } -#endif - - return 0; -} - -int TLSX_UseMaxFragment(TLSX** extensions, byte mfl) -{ - TLSX* extension = NULL; - byte* data = NULL; - int ret = 0; - - if (extensions == NULL) - return BAD_FUNC_ARG; - - if (mfl < CYASSL_MFL_2_9 || CYASSL_MFL_2_13 < mfl) - return BAD_FUNC_ARG; - - if ((data = XMALLOC(ENUM_LEN, 0, DYNAMIC_TYPE_TLSX)) == NULL) - return MEMORY_E; - - data[0] = mfl; - - /* push new MFL extension. */ - if ((ret = TLSX_Append(extensions, MAX_FRAGMENT_LENGTH)) != 0) { - XFREE(data, 0, DYNAMIC_TYPE_TLSX); - return ret; - } - - /* place new mfl to extension data. */ - extension = *extensions; - extension->data = (void*) data; - - /* remove duplicated extensions */ - do { - if (extension->next && extension->next->type == MAX_FRAGMENT_LENGTH) { - TLSX *next = extension->next; - - extension->next = next->next; - next->next = NULL; - - TLSX_FreeAll(next); - - break; - } - } while ((extension = extension->next)); - - return SSL_SUCCESS; -} - - -#define MFL_FREE_ALL(data) XFREE(data, 0, DYNAMIC_TYPE_TLSX) -#define MFL_GET_SIZE(data) ENUM_LEN -#define MFL_WRITE TLSX_MFL_Write -#define MFL_PARSE TLSX_MFL_Parse - -#else - -#define MFL_FREE_ALL(a) -#define MFL_GET_SIZE(a) 0 -#define MFL_WRITE(a, b) 0 -#define MFL_PARSE(a, b, c, d) 0 - -#endif /* HAVE_MAX_FRAGMENT */ - -#ifdef HAVE_TRUNCATED_HMAC - -int TLSX_UseTruncatedHMAC(TLSX** extensions) -{ - int ret = 0; - - if (extensions == NULL) - return BAD_FUNC_ARG; - - if (!TLSX_Find(*extensions, TRUNCATED_HMAC)) - if ((ret = TLSX_Append(extensions, TRUNCATED_HMAC)) != 0) - return ret; - - return SSL_SUCCESS; -} - -static int TLSX_THM_Parse(CYASSL* ssl, byte* input, word16 length, - byte isRequest) -{ - if (length != 0 || input == NULL) - return BUFFER_ERROR; - -#ifndef NO_CYASSL_SERVER - if (isRequest) { - int r = TLSX_UseTruncatedHMAC(&ssl->extensions); - - if (r != SSL_SUCCESS) return r; /* throw error */ - - TLSX_SetResponse(ssl, TRUNCATED_HMAC); - } -#endif - - ssl->truncated_hmac = 1; - - return 0; -} - -#define THM_PARSE TLSX_THM_Parse - -#else - -#define THM_PARSE(a, b, c, d) 0 - -#endif /* HAVE_TRUNCATED_HMAC */ - -#ifdef HAVE_SUPPORTED_CURVES - -#ifndef HAVE_ECC -#error "Elliptic Curves Extension requires Elliptic Curve Cryptography. \ -Use --enable-ecc in the configure script or define HAVE_ECC." -#endif - -static void TLSX_EllipticCurve_FreeAll(EllipticCurve* list) -{ - EllipticCurve* curve; - - while ((curve = list)) { - list = curve->next; - XFREE(curve, 0, DYNAMIC_TYPE_TLSX); - } -} - -static int TLSX_EllipticCurve_Append(EllipticCurve** list, word16 name) -{ - EllipticCurve* curve; - - if (list == NULL) - return BAD_FUNC_ARG; - - if ((curve = XMALLOC(sizeof(EllipticCurve), 0, DYNAMIC_TYPE_TLSX)) == NULL) - return MEMORY_E; - - curve->name = name; - curve->next = *list; - - *list = curve; - - return 0; -} - -#ifndef NO_CYASSL_CLIENT - -static void TLSX_EllipticCurve_ValidateRequest(CYASSL* ssl, byte* semaphore) -{ - int i; - - for (i = 0; i < ssl->suites->suiteSz; i+= 2) - if (ssl->suites->suites[i] == ECC_BYTE) - return; - - /* No elliptic curve suite found */ - TURN_ON(semaphore, ELLIPTIC_CURVES); -} - -static word16 TLSX_EllipticCurve_GetSize(EllipticCurve* list) -{ - EllipticCurve* curve; - word16 length = OPAQUE16_LEN; /* list length */ - - while ((curve = list)) { - list = curve->next; - length += OPAQUE16_LEN; /* curve length */ - } - - return length; -} - -static word16 TLSX_EllipticCurve_WriteR(EllipticCurve* curve, byte* output); -static word16 TLSX_EllipticCurve_WriteR(EllipticCurve* curve, byte* output) -{ - word16 offset = 0; - - if (!curve) - return offset; - - offset = TLSX_EllipticCurve_WriteR(curve->next, output); - c16toa(curve->name, output + offset); - - return OPAQUE16_LEN + offset; -} - -static word16 TLSX_EllipticCurve_Write(EllipticCurve* list, byte* output) -{ - word16 length = TLSX_EllipticCurve_WriteR(list, output + OPAQUE16_LEN); - - c16toa(length, output); /* writing list length */ - - return OPAQUE16_LEN + length; -} - -#endif /* NO_CYASSL_CLIENT */ -#ifndef NO_CYASSL_SERVER - -static int TLSX_EllipticCurve_Parse(CYASSL* ssl, byte* input, word16 length, - byte isRequest) -{ - word16 offset; - word16 name; - int r; - - (void) isRequest; /* shut up compiler! */ - - if (OPAQUE16_LEN > length || length % OPAQUE16_LEN) - return BUFFER_ERROR; - - ato16(input, &offset); - - /* validating curve list length */ - if (length != OPAQUE16_LEN + offset) - return BUFFER_ERROR; - - while (offset) { - ato16(input + offset, &name); - offset -= OPAQUE16_LEN; - - r = TLSX_UseSupportedCurve(&ssl->extensions, name); - - if (r != SSL_SUCCESS) return r; /* throw error */ - } - - return 0; -} - -int TLSX_ValidateEllipticCurves(CYASSL* ssl, byte first, byte second) { - TLSX* extension = (first == ECC_BYTE) - ? TLSX_Find(ssl->extensions, ELLIPTIC_CURVES) - : NULL; - EllipticCurve* curve = NULL; - word32 oid = 0; - word16 octets = 0; /* acording to 'ecc_set_type ecc_sets[];' */ - int sig = 0; /* valitade signature */ - int key = 0; /* validate key */ - - if (!extension) - return 1; /* no suite restriction */ - - for (curve = extension->data; curve && !(sig && key); curve = curve->next) { - - switch (curve->name) { - case CYASSL_ECC_SECP160R1: oid = ECC_160R1; octets = 20; break; - case CYASSL_ECC_SECP192R1: oid = ECC_192R1; octets = 24; break; - case CYASSL_ECC_SECP224R1: oid = ECC_224R1; octets = 28; break; - case CYASSL_ECC_SECP256R1: oid = ECC_256R1; octets = 32; break; - case CYASSL_ECC_SECP384R1: oid = ECC_384R1; octets = 48; break; - case CYASSL_ECC_SECP521R1: oid = ECC_521R1; octets = 66; break; - default: continue; /* unsupported curve */ - } - - switch (second) { -#ifndef NO_DSA - /* ECDHE_ECDSA */ - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: - case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: - case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: - case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: - case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8: - sig |= ssl->pkCurveOID == oid; - key |= ssl->eccTempKeySz == octets; - break; - - /* ECDH_ECDSA */ - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: - case TLS_ECDH_ECDSA_WITH_RC4_128_SHA: - case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: - case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: - sig |= ssl->pkCurveOID == oid; - key |= ssl->pkCurveOID == oid; - break; -#endif -#ifndef NO_RSA - /* ECDHE_RSA */ - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: - case TLS_ECDHE_RSA_WITH_RC4_128_SHA: - case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: - sig = 1; - key |= ssl->eccTempKeySz == octets; - break; - - /* ECDH_RSA */ - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: - case TLS_ECDH_RSA_WITH_RC4_128_SHA: - case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: - case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: - sig = 1; - key |= ssl->pkCurveOID == oid; - break; -#endif - default: - sig = 1; - key = 1; - break; - } - } - - return sig && key; -} - -#endif /* NO_CYASSL_SERVER */ - -int TLSX_UseSupportedCurve(TLSX** extensions, word16 name) -{ - TLSX* extension = NULL; - EllipticCurve* curve = NULL; - int ret = 0; - - if (extensions == NULL) - return BAD_FUNC_ARG; - - if ((ret = TLSX_EllipticCurve_Append(&curve, name)) != 0) - return ret; - - extension = *extensions; - - /* find EllipticCurve extension if it already exists. */ - while (extension && extension->type != ELLIPTIC_CURVES) - extension = extension->next; - - /* push new EllipticCurve extension if it doesn't exists. */ - if (!extension) { - if ((ret = TLSX_Append(extensions, ELLIPTIC_CURVES)) != 0) { - XFREE(curve, 0, DYNAMIC_TYPE_TLSX); - return ret; - } - - extension = *extensions; - } - - /* push new EllipticCurve object to extension data. */ - curve->next = (EllipticCurve*) extension->data; - extension->data = (void*) curve; - - /* look for another curve of the same name to remove (replacement) */ - do { - if (curve->next && curve->next->name == name) { - EllipticCurve *next = curve->next; - - curve->next = next->next; - XFREE(next, 0, DYNAMIC_TYPE_TLSX); - - break; - } - } while ((curve = curve->next)); - - return SSL_SUCCESS; -} - -#define EC_FREE_ALL TLSX_EllipticCurve_FreeAll -#define EC_VALIDATE_REQUEST TLSX_EllipticCurve_ValidateRequest - -#ifndef NO_CYASSL_CLIENT -#define EC_GET_SIZE TLSX_EllipticCurve_GetSize -#define EC_WRITE TLSX_EllipticCurve_Write -#else -#define EC_GET_SIZE(list) 0 -#define EC_WRITE(a, b) 0 -#endif - -#ifndef NO_CYASSL_SERVER -#define EC_PARSE TLSX_EllipticCurve_Parse -#else -#define EC_PARSE(a, b, c, d) 0 -#endif - -#else - -#define EC_FREE_ALL(list) -#define EC_GET_SIZE(list) 0 -#define EC_WRITE(a, b) 0 -#define EC_PARSE(a, b, c, d) 0 -#define EC_VALIDATE_REQUEST(a, b) - -#endif /* HAVE_SUPPORTED_CURVES */ - -TLSX* TLSX_Find(TLSX* list, TLSX_Type type) -{ - TLSX* extension = list; - - while (extension && extension->type != type) - extension = extension->next; - - return extension; -} - -void TLSX_FreeAll(TLSX* list) -{ - TLSX* extension; - - while ((extension = list)) { - list = extension->next; - - switch (extension->type) { - case SERVER_NAME_INDICATION: - SNI_FREE_ALL((SNI *) extension->data); - break; - - case MAX_FRAGMENT_LENGTH: - MFL_FREE_ALL(extension->data); - break; - - case TRUNCATED_HMAC: - /* Nothing to do. */ - break; - - case ELLIPTIC_CURVES: - EC_FREE_ALL(extension->data); - break; - } - - XFREE(extension, 0, DYNAMIC_TYPE_TLSX); - } -} - -static word16 TLSX_GetSize(TLSX* list, byte* semaphore, byte isRequest) -{ - TLSX* extension; - word16 length = 0; - - while ((extension = list)) { - list = extension->next; - - if (!isRequest && !extension->resp) - continue; /* skip! */ - - if (IS_OFF(semaphore, extension->type)) { - /* type + data length */ - length += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN; - - switch (extension->type) { - case SERVER_NAME_INDICATION: - if (isRequest) - length += SNI_GET_SIZE((SNI *) extension->data); - break; - case MAX_FRAGMENT_LENGTH: - length += MFL_GET_SIZE(extension->data); - break; - - case TRUNCATED_HMAC: - /* empty extension. */ - break; - - case ELLIPTIC_CURVES: - length += EC_GET_SIZE((EllipticCurve *) extension->data); - break; - } - - TURN_ON(semaphore, extension->type); - } - } - - return length; -} - -static word16 TLSX_Write(TLSX* list, byte* output, byte* semaphore, - byte isRequest) -{ - TLSX* extension; - word16 offset = 0; - word16 length_offset = 0; - - while ((extension = list)) { - list = extension->next; - - if (!isRequest && !extension->resp) - continue; /* skip! */ - - if (IS_OFF(semaphore, extension->type)) { - /* extension type */ - c16toa(extension->type, output + offset); - offset += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN; - length_offset = offset; - - /* extension data should be written internally */ - switch (extension->type) { - case SERVER_NAME_INDICATION: - if (isRequest) - offset += SNI_WRITE((SNI *) extension->data, - output + offset); - break; - - case MAX_FRAGMENT_LENGTH: - offset += MFL_WRITE((byte *) extension->data, - output + offset); - break; - - case TRUNCATED_HMAC: - /* empty extension. */ - break; - - case ELLIPTIC_CURVES: - offset += EC_WRITE((EllipticCurve *) extension->data, - output + offset); - break; - } - - /* writing extension data length */ - c16toa(offset - length_offset, - output + length_offset - OPAQUE16_LEN); - - TURN_ON(semaphore, extension->type); - } - } - - return offset; -} - -#ifndef NO_CYASSL_CLIENT - -word16 TLSX_GetRequestSize(CYASSL* ssl) -{ - word16 length = 0; - - if (ssl && IsTLS(ssl)) { - byte semaphore[16] = {0}; - - EC_VALIDATE_REQUEST(ssl, semaphore); - - if (ssl->extensions) - length += TLSX_GetSize(ssl->extensions, semaphore, 1); - - if (ssl->ctx && ssl->ctx->extensions) - length += TLSX_GetSize(ssl->ctx->extensions, semaphore, 1); - - if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) - length += ssl->suites->hashSigAlgoSz + HELLO_EXT_LEN; - } - - if (length) - length += OPAQUE16_LEN; /* for total length storage */ - - return length; -} - -word16 TLSX_WriteRequest(CYASSL* ssl, byte* output) -{ - word16 offset = 0; - - if (ssl && IsTLS(ssl) && output) { - byte semaphore[16] = {0}; - - offset += OPAQUE16_LEN; /* extensions length */ - - EC_VALIDATE_REQUEST(ssl, semaphore); - - if (ssl->extensions) - offset += TLSX_Write(ssl->extensions, output + offset, - semaphore, 1); - - if (ssl->ctx && ssl->ctx->extensions) - offset += TLSX_Write(ssl->ctx->extensions, output + offset, - semaphore, 1); - - if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz) - { - int i; - /* extension type */ - c16toa(HELLO_EXT_SIG_ALGO, output + offset); - offset += HELLO_EXT_TYPE_SZ; - - /* extension data length */ - c16toa(OPAQUE16_LEN + ssl->suites->hashSigAlgoSz, output + offset); - offset += OPAQUE16_LEN; - - /* sig algos length */ - c16toa(ssl->suites->hashSigAlgoSz, output + offset); - offset += OPAQUE16_LEN; - - /* sig algos */ - for (i = 0; i < ssl->suites->hashSigAlgoSz; i++, offset++) - output[offset] = ssl->suites->hashSigAlgo[i]; - } - - if (offset > OPAQUE16_LEN) - c16toa(offset - OPAQUE16_LEN, output); /* extensions length */ - } - - return offset; -} - -#endif /* NO_CYASSL_CLIENT */ - -#ifndef NO_CYASSL_SERVER - -word16 TLSX_GetResponseSize(CYASSL* ssl) -{ - word16 length = 0; - byte semaphore[16] = {0}; - - if (ssl && IsTLS(ssl)) - length += TLSX_GetSize(ssl->extensions, semaphore, 0); - - /* All the response data is set at the ssl object only, so no ctx here. */ - - if (length) - length += OPAQUE16_LEN; /* for total length storage */ - - return length; -} - -word16 TLSX_WriteResponse(CYASSL *ssl, byte* output) -{ - word16 offset = 0; - - if (ssl && IsTLS(ssl) && output) { - byte semaphore[16] = {0}; - - offset += OPAQUE16_LEN; /* extensions length */ - - offset += TLSX_Write(ssl->extensions, output + offset, semaphore, 0); - - if (offset > OPAQUE16_LEN) - c16toa(offset - OPAQUE16_LEN, output); /* extensions length */ - } - - return offset; -} - -#endif /* NO_CYASSL_SERVER */ - -int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, byte isRequest, - Suites *suites) -{ - int ret = 0; - word16 offset = 0; - - if (!ssl || !input || !suites) - return BAD_FUNC_ARG; - - while (ret == 0 && offset < length) { - word16 type; - word16 size; - - if (length - offset < HELLO_EXT_TYPE_SZ + OPAQUE16_LEN) - return BUFFER_ERROR; - - ato16(input + offset, &type); - offset += HELLO_EXT_TYPE_SZ; - - ato16(input + offset, &size); - offset += OPAQUE16_LEN; - - if (offset + size > length) - return BUFFER_ERROR; - - switch (type) { - case SERVER_NAME_INDICATION: - CYASSL_MSG("SNI extension received"); - - ret = SNI_PARSE(ssl, input + offset, size, isRequest); - break; - - case MAX_FRAGMENT_LENGTH: - CYASSL_MSG("Max Fragment Length extension received"); - - ret = MFL_PARSE(ssl, input + offset, size, isRequest); - break; - - case TRUNCATED_HMAC: - CYASSL_MSG("Truncated HMAC extension received"); - - ret = THM_PARSE(ssl, input + offset, size, isRequest); - break; - - case ELLIPTIC_CURVES: - CYASSL_MSG("Elliptic Curves extension received"); - - ret = EC_PARSE(ssl, input + offset, size, isRequest); - break; - - case HELLO_EXT_SIG_ALGO: - if (isRequest) { - /* do not mess with offset inside the switch! */ - if (IsAtLeastTLSv1_2(ssl)) { - ato16(input + offset, &suites->hashSigAlgoSz); - - if (suites->hashSigAlgoSz > size - OPAQUE16_LEN) - return BUFFER_ERROR; - - XMEMCPY(suites->hashSigAlgo, - input + offset + OPAQUE16_LEN, - min(suites->hashSigAlgoSz, - HELLO_EXT_SIGALGO_MAX)); - } - } else { - CYASSL_MSG("Servers MUST NOT send SIG ALGO extension."); - } - - break; - } - - /* offset should be updated here! */ - offset += size; - } - - return ret; -} - -/* undefining semaphore macros */ -#undef IS_OFF -#undef TURN_ON - -#elif defined(HAVE_SNI) \ - || defined(HAVE_MAX_FRAGMENT) \ - || defined(HAVE_TRUNCATED_HMAC) \ - || defined(HAVE_SUPPORTED_CURVES) - -#error "Using TLS extensions requires HAVE_TLS_EXTENSIONS to be defined." - -#endif /* HAVE_TLS_EXTENSIONS */ - - -#ifndef NO_CYASSL_CLIENT - -#ifndef NO_OLD_TLS - - CYASSL_METHOD* CyaTLSv1_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) - InitSSL_Method(method, MakeTLSv1()); - return method; - } - - - CYASSL_METHOD* CyaTLSv1_1_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) - InitSSL_Method(method, MakeTLSv1_1()); - return method; - } - -#endif /* !NO_OLD_TLS */ - -#ifndef NO_SHA256 /* can't use without SHA256 */ - - CYASSL_METHOD* CyaTLSv1_2_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) - InitSSL_Method(method, MakeTLSv1_2()); - return method; - } - -#endif - - - CYASSL_METHOD* CyaSSLv23_client_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) { -#ifndef NO_SHA256 /* 1.2 requires SHA256 */ - InitSSL_Method(method, MakeTLSv1_2()); -#else - InitSSL_Method(method, MakeTLSv1_1()); -#endif -#ifndef NO_OLD_TLS - method->downgrade = 1; -#endif - } - return method; - } - - -#endif /* NO_CYASSL_CLIENT */ - - - -#ifndef NO_CYASSL_SERVER - -#ifndef NO_OLD_TLS - - CYASSL_METHOD* CyaTLSv1_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) { - InitSSL_Method(method, MakeTLSv1()); - method->side = CYASSL_SERVER_END; - } - return method; - } - - - CYASSL_METHOD* CyaTLSv1_1_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) { - InitSSL_Method(method, MakeTLSv1_1()); - method->side = CYASSL_SERVER_END; - } - return method; - } - -#endif /* !NO_OLD_TLS */ - -#ifndef NO_SHA256 /* can't use without SHA256 */ - - CYASSL_METHOD* CyaTLSv1_2_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) { - InitSSL_Method(method, MakeTLSv1_2()); - method->side = CYASSL_SERVER_END; - } - return method; - } - -#endif - - - CYASSL_METHOD* CyaSSLv23_server_method(void) - { - CYASSL_METHOD* method = - (CYASSL_METHOD*) XMALLOC(sizeof(CYASSL_METHOD), 0, - DYNAMIC_TYPE_METHOD); - if (method) { -#ifndef NO_SHA256 /* 1.2 requires SHA256 */ - InitSSL_Method(method, MakeTLSv1_2()); -#else - InitSSL_Method(method, MakeTLSv1_1()); -#endif - method->side = CYASSL_SERVER_END; -#ifndef NO_OLD_TLS - method->downgrade = 1; -#endif /* !NO_OLD_TLS */ - } - return method; - } - - - -#endif /* NO_CYASSL_SERVER */ -#endif /* NO_TLS */ - diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj b/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj deleted file mode 100755 index b0b8c78b..00000000 --- a/project1/cyassl-3.0.0/sslSniffer/sslSniffer.vcproj +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/.deps/snifftest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am deleted file mode 100644 index d4c90acc..00000000 --- a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/include.am +++ /dev/null @@ -1,13 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -if BUILD_SNIFFTEST -noinst_PROGRAMS += sslSniffer/sslSnifferTest/snifftest -sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c -sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap -sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la -endif -EXTRA_DIST += sslSniffer/sslSniffer.vcproj -EXTRA_DIST += sslSniffer/sslSnifferTest/sslSniffTest.vcproj -DISTCLEANFILES+= sslSniffer/sslSnifferTest/.libs/snifftest diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c deleted file mode 100755 index 60c80ad4..00000000 --- a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/snifftest.c +++ /dev/null @@ -1,301 +0,0 @@ -/* snifftest.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifdef _WIN32 - #define CYASSL_SNIFFER -#endif - -#ifndef CYASSL_SNIFFER - -/* blank build */ -#include -#include -int main(void) -{ - printf("do ./configure --enable-sniffer to enable build support\n"); - return EXIT_SUCCESS; -} - -#else -/* do a full build */ - -#ifdef _MSC_VER - /* builds on *nix too, for scanf device and port */ - #define _CRT_SECURE_NO_WARNINGS -#endif - -#include /* pcap stuff */ -#include /* printf */ -#include /* EXIT_SUCCESS */ -#include /* strcmp */ -#include /* signal */ - -#include - - -#ifndef _WIN32 - #include -#endif - -typedef unsigned char byte; - -enum { - ETHER_IF_FRAME_LEN = 14, /* ethernet interface frame length */ - NULL_IF_FRAME_LEN = 4, /* no link interface frame length */ -}; - - -pcap_t* pcap = NULL; -pcap_if_t* alldevs = NULL; - - -static void FreeAll(void) -{ - if (pcap) - pcap_close(pcap); - if (alldevs) - pcap_freealldevs(alldevs); -#ifndef _WIN32 - ssl_FreeSniffer(); -#endif -} - -static void sig_handler(const int sig) -{ - printf("SIGINT handled = %d.\n", sig); - FreeAll(); - if (sig) - exit(EXIT_SUCCESS); -} - - -static void err_sys(const char* msg) -{ - fprintf(stderr, "%s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - - -#ifdef _WIN32 - #define SNPRINTF _snprintf -#else - #define SNPRINTF snprintf -#endif - - -static char* iptos(unsigned int addr) -{ - static char output[32]; - byte *p = (byte*)&addr; - - SNPRINTF(output, sizeof(output), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - - return output; -} - - -int main(int argc, char** argv) -{ - int ret = 0; - int inum; - int port; - int saveFile = 0; - int i = 0; - int frame = ETHER_IF_FRAME_LEN; - char err[PCAP_ERRBUF_SIZE]; - char filter[32]; - const char *server = NULL; - struct bpf_program fp; - pcap_if_t *d; - pcap_addr_t *a; - - signal(SIGINT, sig_handler); - -#ifndef _WIN32 - ssl_InitSniffer(); /* dll load on Windows */ -#endif - ssl_Trace("./tracefile.txt", err); - - if (argc == 1) { - /* normal case, user chooses device and port */ - - if (pcap_findalldevs(&alldevs, err) == -1) - err_sys("Error in pcap_findalldevs"); - - for (d = alldevs; d; d=d->next) { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if (i == 0) - err_sys("No interfaces found! Make sure pcap or WinPcap is" - " installed correctly and you have sufficient permissions"); - - printf("Enter the interface number (1-%d): ", i); - ret = scanf("%d", &inum); - if (ret != 1) - printf("scanf port failed\n"); - - if (inum < 1 || inum > i) - err_sys("Interface number out of range"); - - /* Jump to the selected adapter */ - for (d = alldevs, i = 0; i < inum - 1; d = d->next, i++); - - pcap = pcap_create(d->name, err); - - if (pcap == NULL) printf("pcap_create failed %s\n", err); - - /* get an IPv4 address */ - for (a = d->addresses; a; a = a->next) { - switch(a->addr->sa_family) - { - case AF_INET: - server = - iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr); - printf("server = %s\n", server); - break; - - default: - break; - } - } - if (server == NULL) - err_sys("Unable to get device IPv4 address"); - - ret = pcap_set_snaplen(pcap, 65536); - if (ret != 0) printf("pcap_set_snaplen failed %s\n", pcap_geterr(pcap)); - - ret = pcap_set_timeout(pcap, 1000); - if (ret != 0) printf("pcap_set_timeout failed %s\n", pcap_geterr(pcap)); - - ret = pcap_set_buffer_size(pcap, 1000000); - if (ret != 0) - printf("pcap_set_buffer_size failed %s\n", pcap_geterr(pcap)); - - ret = pcap_set_promisc(pcap, 1); - if (ret != 0) printf("pcap_set_promisc failed %s\n", pcap_geterr(pcap)); - - - ret = pcap_activate(pcap); - if (ret != 0) printf("pcap_activate failed %s\n", pcap_geterr(pcap)); - - printf("Enter the port to scan: "); - ret = scanf("%d", &port); - if (ret != 1) - printf("scanf port failed\n"); - - SNPRINTF(filter, sizeof(filter), "tcp and port %d", port); - - ret = pcap_compile(pcap, &fp, filter, 0, 0); - if (ret != 0) printf("pcap_compile failed %s\n", pcap_geterr(pcap)); - - ret = pcap_setfilter(pcap, &fp); - if (ret != 0) printf("pcap_setfilter failed %s\n", pcap_geterr(pcap)); - - ret = ssl_SetPrivateKey(server, port, "../../certs/server-key.pem", - FILETYPE_PEM, NULL, err); - if (ret != 0) { - printf("Please run directly from sslSniffer/sslSnifferTest dir\n"); - } - } - else if (argc >= 3) { - saveFile = 1; - pcap = pcap_open_offline(argv[1], err); - if (pcap == NULL) { - printf("pcap_open_offline failed %s\n", err); - ret = -1; - } - else { - const char* passwd = NULL; - /* defaults for server and port */ - port = 443; - server = "127.0.0.1"; - - if (argc >= 4) - server = argv[3]; - - if (argc >= 5) - port = atoi(argv[4]); - - if (argc >= 6) - passwd = argv[5]; - - ret = ssl_SetPrivateKey(server, port, argv[2], - FILETYPE_PEM, passwd, err); - } - } - else { - /* usage error */ - printf( "usage: ./snifftest or ./snifftest dump pemKey" - " [server] [port] [password]\n"); - exit(EXIT_FAILURE); - } - - if (ret != 0) - err_sys(err); - - if (pcap_datalink(pcap) == DLT_NULL) - frame = NULL_IF_FRAME_LEN; - - while (1) { - static int packetNumber = 0; - struct pcap_pkthdr header; - const unsigned char* packet = pcap_next(pcap, &header); - packetNumber++; - if (packet) { - - byte data[65535+16384]; /* may have a partial 16k record cached */ - - if (header.caplen > 40) { /* min ip(20) + min tcp(20) */ - packet += frame; - header.caplen -= frame; - } - else - continue; - - ret = ssl_DecodePacket(packet, header.caplen, data, err); - if (ret < 0) - printf("ssl_Decode ret = %d, %s\n", ret, err); - if (ret > 0) { - data[ret] = 0; - printf("SSL App Data(%d:%d):%s\n", packetNumber, ret, data); - } - } - else if (saveFile) - break; /* we're done reading file */ - } - FreeAll(); - - return EXIT_SUCCESS; -} - -#endif /* full build */ diff --git a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj b/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj deleted file mode 100755 index ff9977fa..00000000 --- a/project1/cyassl-3.0.0/sslSniffer/sslSnifferTest/sslSniffTest.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/stamp-h b/project1/cyassl-3.0.0/stamp-h deleted file mode 100644 index 9788f702..00000000 --- a/project1/cyassl-3.0.0/stamp-h +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/project1/cyassl-3.0.0/stamp-h.in b/project1/cyassl-3.0.0/stamp-h.in deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/stamp-h1 b/project1/cyassl-3.0.0/stamp-h1 deleted file mode 100644 index 4547fe1b..00000000 --- a/project1/cyassl-3.0.0/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for config.h diff --git a/project1/cyassl-3.0.0/support/cyassl.pc b/project1/cyassl-3.0.0/support/cyassl.pc deleted file mode 100644 index ca23e375..00000000 --- a/project1/cyassl-3.0.0/support/cyassl.pc +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: cyassl -Description: cyassl C library. -Version: 3.0.0 -Libs: -L${libdir} -lcyassl -Cflags: -I${includedir} diff --git a/project1/cyassl-3.0.0/support/cyassl.pc.in b/project1/cyassl-3.0.0/support/cyassl.pc.in deleted file mode 100644 index ad469bc4..00000000 --- a/project1/cyassl-3.0.0/support/cyassl.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: cyassl -Description: cyassl C library. -Version: @VERSION@ -Libs: -L${libdir} -lcyassl -Cflags: -I${includedir} diff --git a/project1/cyassl-3.0.0/support/include.am b/project1/cyassl-3.0.0/support/include.am deleted file mode 100644 index b0b4e494..00000000 --- a/project1/cyassl-3.0.0/support/include.am +++ /dev/null @@ -1,10 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += support/cyassl.pc - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = support/cyassl.pc - - diff --git a/project1/cyassl-3.0.0/swig/PythonBuild.sh b/project1/cyassl-3.0.0/swig/PythonBuild.sh deleted file mode 100755 index 7f0939c4..00000000 --- a/project1/cyassl-3.0.0/swig/PythonBuild.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -echo -swig -python cyassl.i -pythonIncludes=`python-config --includes` -pythonLibs=`python-config --libs` -gcc -c -fpic cyassl_wrap.c -I$pythonIncludes -gcc -c -fpic cyassl_adds.c -gcc -shared -flat_namespace cyassl_adds.o cyassl_wrap.o -lcyassl $pythonLibs -o _cyassl.so -python runme.py diff --git a/project1/cyassl-3.0.0/swig/README b/project1/cyassl-3.0.0/swig/README deleted file mode 100644 index 302bc6be..00000000 --- a/project1/cyassl-3.0.0/swig/README +++ /dev/null @@ -1,44 +0,0 @@ - - -Initial swig interface file - -Please send questions to support@yassl.com - - - -**Python Support** - - For Linux, OS X, or *nix - -1) build CyaSSL with fpic on Linux, not needed on OS X - ./configure --disable-shared CFLAGS=-fpic - make - sudo make install - - -2) start the example echoserver from the examples/echoserver directory - ./echoserver - -3) run ./PtyonBuild.sh from this directory it will - a) build the swig wrapper file - b) compile the swig wrapper and cyassl wrapper files - c) place them into a cyassl shared library for python - d) run runme.py which will connect to the CyaSSL echo server, write a - string, then read the result and output it - - - Windows only - -1) Make sure the install path to cyassl doesn't have any spaces anywhere in the - directory path because swig doesn't like that -2) Have python for Windows installed, note install directory -3) Have swigwin installed, note install directory -4) Make sure swigwin install direcotry is added to PATH env. variable -5) Make sure env. variables PYTHON_INCLUDE and PYTHON_LIB are set correctly e.g. - PYTHON_INCLUE="c:\Python26\include" - PYTHON_LIB="c:\Python26\libs\python26.lib" -6) Build python_cyassl in Release mode only, Debug build fails to find a debug - python library that isn't included by default -7) The outputs _cyassl.pyd and cyassl.py are the cyassl import library -8) Can now run python runme.py from the swig directory - diff --git a/project1/cyassl-3.0.0/swig/cyassl.i b/project1/cyassl-3.0.0/swig/cyassl.i deleted file mode 100644 index f9dc7d38..00000000 --- a/project1/cyassl-3.0.0/swig/cyassl.i +++ /dev/null @@ -1,63 +0,0 @@ -/* cyassl.i - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -%module cyassl -%{ - #include - #include - - /* defn adds */ - char* CyaSSL_error_string(int err); - int CyaSSL_swig_connect(CYASSL*, const char* server, int port); - RNG* GetRng(void); - RsaKey* GetRsaPrivateKey(const char* file); - void FillSignStr(unsigned char*, const char*, int); -%} - - -CYASSL_METHOD* CyaTLSv1_client_method(void); -CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD*); -int CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, const char*); -CYASSL* CyaSSL_new(CYASSL_CTX*); -int CyaSSL_get_error(CYASSL*, int); -int CyaSSL_write(CYASSL*, const char*, int); -int CyaSSL_Debugging_ON(void); -int CyaSSL_Init(void); -char* CyaSSL_error_string(int); -int CyaSSL_swig_connect(CYASSL*, const char* server, int port); - -int RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng); - -int RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key); - -RNG* GetRng(void); -RsaKey* GetRsaPrivateKey(const char* file); -void FillSignStr(unsigned char*, const char*, int); - -%include carrays.i -%include cdata.i -%array_class(unsigned char, byteArray); -int CyaSSL_read(CYASSL*, unsigned char*, int); - - -#define SSL_FAILURE 0 -#define SSL_SUCCESS 1 - diff --git a/project1/cyassl-3.0.0/swig/cyassl_adds.c b/project1/cyassl-3.0.0/swig/cyassl_adds.c deleted file mode 100644 index 4733815d..00000000 --- a/project1/cyassl-3.0.0/swig/cyassl_adds.c +++ /dev/null @@ -1,234 +0,0 @@ -/* cyassl_adds.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#ifndef _WIN32 - #define HAVE_CONFIG_H -#endif - -#include -#include -#include - -#include -#include -#include -#include - -#ifdef _WIN32 - #include - #include - #ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */ - #include - #include - #endif - #define SOCKET_T int -#else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #ifdef NON_BLOCKING - #include - #endif - #ifdef TEST_IPV6 - #include - #endif - #define SOCKET_T unsigned int -#endif /* _WIN32 */ - -#ifdef _MSC_VER - /* disable conversion warning */ - /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */ - #pragma warning(disable:4244 4996) -#endif - -#if defined(__MACH__) || defined(_WIN32) - #ifndef _SOCKLEN_T - typedef int socklen_t; - #endif -#endif - - -/* HPUX doesn't use socklent_t for third parameter to accept */ -#if !defined(__hpux__) - typedef socklen_t* ACCEPT_THIRD_T; -#else - typedef int* ACCEPT_THIRD_T; -#endif - - -#ifdef _WIN32 - #define CloseSocket(s) closesocket(s) - #define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); } -#else - #define CloseSocket(s) close(s) - #define StartTCP() -#endif - - -#ifdef TEST_IPV6 - typedef struct sockaddr_in6 SOCKADDR_IN_T; - #define AF_INET_V AF_INET6 -#else - typedef struct sockaddr_in SOCKADDR_IN_T; - #define AF_INET_V AF_INET -#endif - - -enum { - SSL_BLOCKING = 2, - SSL_NONBLOCKING = 4 -}; - - -static int tcp_socket(SOCKET_T* sockfd, SOCKADDR_IN_T* addr, const char* peer, - short port) -{ - const char* host = peer; - - /* peer could be in human readable form */ - if (isalpha(peer[0])) { - struct hostent* entry = gethostbyname(peer); - - if (entry) { - struct sockaddr_in tmp; - memset(&tmp, 0, sizeof(struct sockaddr_in)); - memcpy(&tmp.sin_addr.s_addr, entry->h_addr_list[0],entry->h_length); - host = inet_ntoa(tmp.sin_addr); - } - else - return -1; /* no entry for host */ - } - - *sockfd = socket(AF_INET, SOCK_STREAM, 0); - memset(addr, 0, sizeof(SOCKADDR_IN_T)); - - addr->sin_family = AF_INET; - addr->sin_port = htons(port); - addr->sin_addr.s_addr = inet_addr(host); - -#ifdef SO_NOSIGPIPE - { - int on = 1; - socklen_t len = sizeof(on); - setsockopt(*sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, len); - } -#endif - - return 0; -} - - -static int tcp_connect(SOCKET_T* sockfd, const char* ip, short port) -{ - SOCKADDR_IN_T addr; - int ret = tcp_socket(sockfd, &addr, ip, port); - if (ret != 0) return ret; - - if (connect(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0) - return -2; /* can't connect */ - - return 0; -} - - -int CyaSSL_swig_connect(CYASSL* ssl, const char* server, int port) -{ - SOCKET_T sockfd; - int ret = tcp_connect(&sockfd, server, port); - if (ret != 0) return ret; - - CyaSSL_set_fd(ssl, sockfd); - - return CyaSSL_connect(ssl); -} - - -char* CyaSSL_error_string(int err) -{ - static char buffer[CYASSL_MAX_ERROR_SZ]; - - return CyaSSL_ERR_error_string(err, buffer); -} - - -RNG* GetRng(void) -{ - RNG* rng = (RNG*)malloc(sizeof(RNG)); - - if (rng) - if (InitRng(rng) != 0) { - free(rng); - rng = 0; - } - - return rng; -} - - -RsaKey* GetRsaPrivateKey(const char* keyFile) -{ - RsaKey* key = (RsaKey*)malloc(sizeof(RsaKey)); - - if (key) { - byte tmp[1024]; - size_t bytes; - int ret; - word32 idx = 0; - FILE* file = fopen(keyFile, "rb"); - - if (!file) { - free(key); - return 0; - } - - bytes = fread(tmp, 1, sizeof(tmp), file); - fclose(file); - InitRsaKey(key, 0); - - ret = RsaPrivateKeyDecode(tmp, &idx, key, (word32)bytes); - if (ret != 0) { - FreeRsaKey(key); - free(key); - return 0; - } - } - return key; -} - - -void FillSignStr(unsigned char* dst, const char* src, int size) -{ - memcpy(dst, src, size); -} - diff --git a/project1/cyassl-3.0.0/swig/include.am b/project1/cyassl-3.0.0/swig/include.am deleted file mode 100644 index 32adb5b8..00000000 --- a/project1/cyassl-3.0.0/swig/include.am +++ /dev/null @@ -1,12 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -EXTRA_DIST+= \ - swig/PythonBuild.sh \ - swig/README \ - swig/cyassl.i \ - swig/cyassl_adds.c \ - swig/python_cyassl.vcproj \ - swig/rsasign.py \ - swig/runme.py - diff --git a/project1/cyassl-3.0.0/swig/python_cyassl.vcproj b/project1/cyassl-3.0.0/swig/python_cyassl.vcproj deleted file mode 100755 index d4373a94..00000000 --- a/project1/cyassl-3.0.0/swig/python_cyassl.vcproj +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/swig/rsasign.py b/project1/cyassl-3.0.0/swig/rsasign.py deleted file mode 100644 index ad2e114f..00000000 --- a/project1/cyassl-3.0.0/swig/rsasign.py +++ /dev/null @@ -1,35 +0,0 @@ -# file: rsasign.py - -import cyassl - - -# start Random Number Generator -rng = cyassl.GetRng() -if rng == None: - print "Couldn't get an RNG" - exit(-1) - -# load RSA private key in DER format -key = cyassl.GetRsaPrivateKey("../certs/client-key.der") -if key == None: - print "Couldn't load DER private key file" - exit(-1) - -# Make byte Arrays and fill input -signOutput = cyassl.byteArray(128) # 128 allows 1024 bit private key -signStr = cyassl.byteArray(25) # input can't be larger then key size - # 64 for 512 bit 128 for 1024 bit -cyassl.FillSignStr(signStr, "Everybody gets Friday off", 25) - -# Do RSA Sign -signedSize = cyassl.RsaSSL_Sign(signStr, 25, signOutput, 128, key, rng) - -# Show output -print "Signed Size = ", signedSize, " signed array = ", cyassl.cdata(signOutput, signedSize) - -# let's verify this worked -signVerify = cyassl.byteArray(signedSize) -verifySize = cyassl.RsaSSL_Verify(signOutput, signedSize, signVerify, signedSize, key) - -print "Verify Size = ", verifySize, " verify array = ", cyassl.cdata(signVerify, verifySize) - diff --git a/project1/cyassl-3.0.0/swig/runme.py b/project1/cyassl-3.0.0/swig/runme.py deleted file mode 100644 index 42cbdb45..00000000 --- a/project1/cyassl-3.0.0/swig/runme.py +++ /dev/null @@ -1,40 +0,0 @@ -# file: runme.py - -import cyassl - -print "" -print "Trying to connect to the echo server..." - -cyassl.CyaSSL_Init() -#cyassl.CyaSSL_Debugging_ON() -ctx = cyassl.CyaSSL_CTX_new(cyassl.CyaTLSv1_client_method()) -if ctx == None: - print "Couldn't get SSL CTX for TLSv1" - exit(-1) - -ret = cyassl.CyaSSL_CTX_load_verify_locations(ctx, "../certs/ca-cert.pem", None) -if ret != cyassl.SSL_SUCCESS: - print "Couldn't do SSL_CTX_load_verify_locations " - print "error string = ", ret - exit(-1) - -ssl = cyassl.CyaSSL_new(ctx) -ret = cyassl.CyaSSL_swig_connect(ssl, "localhost", 11111) - -if ret != cyassl.SSL_SUCCESS: - print "Couldn't do SSL connect" - err = cyassl.CyaSSL_get_error(ssl, 0) - print "error string = ", cyassl.CyaSSL_error_string(err) - exit(-1) - -print "...Connected" -written = cyassl.CyaSSL_write(ssl, "hello from python\r\n", 19) - -if written > 0: - print "Wrote ", written, " bytes" - -byteArray = cyassl.byteArray(100) -readBytes = cyassl.CyaSSL_read(ssl, byteArray, 100) - -print "server reply: ", cyassl.cdata(byteArray, readBytes) - diff --git a/project1/cyassl-3.0.0/tags b/project1/cyassl-3.0.0/tags deleted file mode 100644 index dc12d3ba..00000000 --- a/project1/cyassl-3.0.0/tags +++ /dev/null @@ -1,17768 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.9~svn20110310 // -ACCEPT_BEGIN cyassl/internal.h /^ ACCEPT_BEGIN = 0,$/;" e enum:AcceptState -ACCEPT_CLIENT_HELLO_DONE cyassl/internal.h /^ ACCEPT_CLIENT_HELLO_DONE,$/;" e enum:AcceptState -ACCEPT_FINISHED_DONE cyassl/internal.h /^ ACCEPT_FINISHED_DONE,$/;" e enum:AcceptState -ACCEPT_FIRST_REPLY_DONE cyassl/internal.h /^ ACCEPT_FIRST_REPLY_DONE,$/;" e enum:AcceptState -ACCEPT_SECOND_REPLY_DONE cyassl/internal.h /^ ACCEPT_SECOND_REPLY_DONE,$/;" e enum:AcceptState -ACCEPT_THIRD_REPLY_DONE cyassl/internal.h /^ ACCEPT_THIRD_REPLY_DONE$/;" e enum:AcceptState -ACCEPT_THIRD_T cyassl/test.h /^ typedef int* ACCEPT_THIRD_T;$/;" t -ACCEPT_THIRD_T cyassl/test.h /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t -ACCEPT_THIRD_T cyassl/test.h /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t -ACCEPT_THIRD_T swig/cyassl_adds.c /^ typedef int* ACCEPT_THIRD_T;$/;" t file: -ACCEPT_THIRD_T swig/cyassl_adds.c /^ typedef socklen_t* ACCEPT_THIRD_T;$/;" t file: -ACK_MISSED_STR cyassl/sniffer_error.h 103;" d -ACLOCAL Makefile /^ACLOCAL = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing aclocal-1.14$/;" m -ACLOCAL_AMFLAGS Makefile /^ACLOCAL_AMFLAGS = -I m4$/;" m -ACLOCAL_M4 Makefile /^ACLOCAL_M4 = $(top_srcdir)\/aclocal.m4$/;" m -ADC0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ADC0_IRQHandler$/;" l -ADC1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ADC1_IRQHandler$/;" l -ADC_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -ADC_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ADC_IRQHandler $/;" l -AEAD_AUTH_DATA_SZ cyassl/internal.h /^ AEAD_AUTH_DATA_SZ = 13, \/* Size of the data to authenticate *\/$/;" e enum:Misc -AEAD_EXP_IV_SZ cyassl/internal.h /^ AEAD_EXP_IV_SZ = 8, \/* Size of the explicit IV *\/$/;" e enum:Misc -AEAD_IMP_IV_SZ cyassl/internal.h /^ AEAD_IMP_IV_SZ = 4, \/* Size of the implicit IV *\/$/;" e enum:Misc -AEAD_LEN_OFFSET cyassl/internal.h /^ AEAD_LEN_OFFSET = 11, \/* Auth Data: Length *\/$/;" e enum:Misc -AEAD_NONCE_SZ cyassl/internal.h /^ AEAD_NONCE_SZ = AEAD_EXP_IV_SZ + AEAD_IMP_IV_SZ,$/;" e enum:Misc -AEAD_SEQ_OFFSET cyassl/internal.h /^ AEAD_SEQ_OFFSET = 4, \/* Auth Data: Sequence number *\/$/;" e enum:Misc -AEAD_TYPE_OFFSET cyassl/internal.h /^ AEAD_TYPE_OFFSET = 8, \/* Auth Data: Type *\/$/;" e enum:Misc -AEAD_VMAJ_OFFSET cyassl/internal.h /^ AEAD_VMAJ_OFFSET = 9, \/* Auth Data: Major Version *\/$/;" e enum:Misc -AEAD_VMIN_OFFSET cyassl/internal.h /^ AEAD_VMIN_OFFSET = 10, \/* Auth Data: Minor Version *\/$/;" e enum:Misc -AESBuffer ctaocrypt/src/aes.c /^static unsigned char *AESBuffer = NULL ;$/;" v file: -AES_128_CBC_TYPE cyassl/openssl/evp.h /^ AES_128_CBC_TYPE = 1,$/;" e enum:__anon36 -AES_128_CTR_TYPE cyassl/openssl/evp.h /^ AES_128_CTR_TYPE = 4,$/;" e enum:__anon36 -AES_128_KEY_SIZE cyassl/internal.h /^ AES_128_KEY_SIZE = 16, \/* for 128 bit *\/$/;" e enum:Misc -AES_128_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_128_Key_Expansion:$/;" l -AES_192_CBC_TYPE cyassl/openssl/evp.h /^ AES_192_CBC_TYPE = 2,$/;" e enum:__anon36 -AES_192_CTR_TYPE cyassl/openssl/evp.h /^ AES_192_CTR_TYPE = 5,$/;" e enum:__anon36 -AES_192_KEY_SIZE cyassl/internal.h /^ AES_192_KEY_SIZE = 24, \/* for 192 bit *\/$/;" e enum:Misc -AES_192_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_192_Key_Expansion:$/;" l -AES_256_CBC_TYPE cyassl/openssl/evp.h /^ AES_256_CBC_TYPE = 3,$/;" e enum:__anon36 -AES_256_CTR_TYPE cyassl/openssl/evp.h /^ AES_256_CTR_TYPE = 6,$/;" e enum:__anon36 -AES_256_KEY_SIZE cyassl/internal.h /^ AES_256_KEY_SIZE = 32, \/* for 256 bit *\/$/;" e enum:Misc -AES_256_Key_Expansion ctaocrypt/src/aes_asm.s /^AES_256_Key_Expansion:$/;" l -AES_BLOCK_LENGTH ctaocrypt/src/aes.c 620;" d file: -AES_BLOCK_SIZE cyassl/ctaocrypt/aes.h /^ AES_BLOCK_SIZE = 16$/;" e enum:__anon65 -AES_BLOCK_SIZE cyassl/internal.h 416;" d -AES_BUFFER_SIZE ctaocrypt/src/aes.c 615;" d file: -AES_CBC_decrypt ctaocrypt/src/aes_asm.s /^AES_CBC_decrypt:$/;" l -AES_CBC_encrypt ctaocrypt/src/aes_asm.s /^AES_CBC_encrypt:$/;" l -AES_CCM_16_AUTH_SZ cyassl/internal.h /^ AES_CCM_16_AUTH_SZ = 16, \/* AES-CCM-16 Auth Tag length *\/$/;" e enum:Misc -AES_CCM_8_AUTH_SZ cyassl/internal.h /^ AES_CCM_8_AUTH_SZ = 8, \/* AES-CCM-8 Auth Tag Length *\/$/;" e enum:Misc -AES_CCM_AUTH_E cyassl/ctaocrypt/error-crypt.h /^ AES_CCM_AUTH_E = -181, \/* AES-CCM Authentication check failure *\/$/;" e enum:__anon61 -AES_DECRYPTION cyassl/ctaocrypt/aes.h /^ AES_DECRYPTION = 1,$/;" e enum:__anon65 -AES_ECB_decrypt ctaocrypt/src/aes_asm.s /^AES_ECB_decrypt:$/;" l -AES_ECB_encrypt ctaocrypt/src/aes_asm.s /^AES_ECB_encrypt:$/;" l -AES_ENCRYPTION cyassl/ctaocrypt/aes.h /^ AES_ENCRYPTION = 0,$/;" e enum:__anon65 -AES_ENC_TYPE cyassl/ctaocrypt/aes.h /^ AES_ENC_TYPE = 1, \/* cipher unique type *\/$/;" e enum:__anon65 -AES_GCM_AUTH_E cyassl/ctaocrypt/error-crypt.h /^ AES_GCM_AUTH_E = -180, \/* AES-GCM Authentication check failure *\/$/;" e enum:__anon61 -AES_GCM_AUTH_SZ cyassl/internal.h /^ AES_GCM_AUTH_SZ = 16, \/* AES-GCM Auth Tag length *\/$/;" e enum:Misc -AES_IV_SIZE cyassl/internal.h /^ AES_IV_SIZE = 16, \/* always block size *\/$/;" e enum:Misc -AES_TEST_SIZE mcapi/mcapi_test.c 749;" d file: -AES_set_decrypt_key ctaocrypt/src/aes.c /^static int AES_set_decrypt_key(const unsigned char* userKey, const int bits,$/;" f file: -AES_set_encrypt_key ctaocrypt/src/aes.c /^static int AES_set_encrypt_key(const unsigned char *userKey, const int bits,$/;" f file: -AFTER cyassl/ctaocrypt/asn.h /^ AFTER = 1$/;" e enum:__anon60 -AF_INET_V cyassl/test.h 132;" d -AF_INET_V cyassl/test.h 135;" d -AF_INET_V swig/cyassl_adds.c 101;" d file: -AF_INET_V swig/cyassl_adds.c 104;" d file: -AHBPrescTable IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AHBPrescTable IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/system_stm32f2xx.c /^ __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};$/;" v -AIA_CA_ISSUER_OID cyassl/ctaocrypt/asn.h /^ AIA_CA_ISSUER_OID = 117 \/* 1.3.6.1.5.5.7.48.2 *\/$/;" e enum:AuthInfo_Sum -AIA_OCSP_OID cyassl/ctaocrypt/asn.h /^ AIA_OCSP_OID = 116, \/* 1.3.6.1.5.5.7.48.1 *\/$/;" e enum:AuthInfo_Sum -ALERT_SIZE cyassl/internal.h /^ ALERT_SIZE = 2, \/* level + description *\/$/;" e enum:Misc -ALGO_ID_E cyassl/ctaocrypt/error-crypt.h /^ ALGO_ID_E = -133, \/* setting algo id error *\/$/;" e enum:__anon61 -ALIGN cyassl/ctaocrypt/blake2-int.h 43;" d -ALIGN cyassl/ctaocrypt/blake2-int.h 45;" d -ALIGN cyassl/ctaocrypt/blake2-int.h 47;" d -ALIGN16 cyassl/ctaocrypt/aes.h 42;" d -ALIGN16 cyassl/ctaocrypt/aes.h 44;" d -ALIGN16 cyassl/ctaocrypt/aes.h 46;" d -ALIGN16 cyassl/ctaocrypt/aes.h 53;" d -ALIGN16 cyassl/internal.h 122;" d -ALT_NAMES_OID cyassl/ctaocrypt/asn.h /^ ALT_NAMES_OID = 131,$/;" e enum:Extensions_Sum -ALT_NAME_E cyassl/ctaocrypt/error-crypt.h /^ ALT_NAME_E = -177, \/* alt name size problem, too big *\/$/;" e enum:__anon61 -AMINCLUDE Makefile /^AMINCLUDE = aminclude.am$/;" m -AMTAR Makefile /^AMTAR = $${TAR-tar}$/;" m -AM_CFLAGS Makefile /^AM_CFLAGS = -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DHAVE_WEBSERVER -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer$/;" m -AM_CPPFLAGS Makefile /^AM_CPPFLAGS = -fvisibility=hidden$/;" m -AM_DEFAULT_VERBOSITY Makefile /^AM_DEFAULT_VERBOSITY = 0$/;" m -AM_LDFLAGS Makefile /^AM_LDFLAGS = $/;" m -AM_RECURSIVE_TARGETS Makefile /^AM_RECURSIVE_TARGETS = cscope check recheck$/;" m -AM_V_CC Makefile /^AM_V_CC = $(am__v_CC_$(V))$/;" m -AM_V_CCAS Makefile /^AM_V_CCAS = $(am__v_CCAS_$(V))$/;" m -AM_V_CCLD Makefile /^AM_V_CCLD = $(am__v_CCLD_$(V))$/;" m -AM_V_GEN Makefile /^AM_V_GEN = $(am__v_GEN_$(V))$/;" m -AM_V_P Makefile /^AM_V_P = $(am__v_P_$(V))$/;" m -AM_V_at Makefile /^AM_V_at = $(am__v_at_$(V))$/;" m -AM_V_lt Makefile /^AM_V_lt = $(am__v_lt_$(V))$/;" m -ANOTHER_MSG_STR cyassl/sniffer_error.h 76;" d -AR Makefile /^AR = ar$/;" m -ARC4_ENC_TYPE cyassl/ctaocrypt/arc4.h /^ ARC4_ENC_TYPE = 4, \/* cipher unique type *\/$/;" e enum:__anon59 -ARC4_STATE_SIZE cyassl/ctaocrypt/arc4.h /^ ARC4_STATE_SIZE = 256$/;" e enum:__anon59 -ARC4_TYPE cyassl/openssl/evp.h /^ ARC4_TYPE = 9,$/;" e enum:__anon36 -ARP_MAXRETRY IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 195;" d file: -ARP_NOTIFY IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 207;" d file: -ARP_RESEND IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 200;" d file: -ARP_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 184;" d file: -ARP_TIMEOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 189;" d file: -ASN1_GENERALIZEDTIME cyassl/ssl.h /^ ASN1_GENERALIZEDTIME = 4,$/;" e enum:__anon19 -ASN1_INTEGER cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_INTEGER ASN1_INTEGER;$/;" t -ASN1_INTEGER_cmp cyassl/openssl/ssl.h 267;" d -ASN1_INTEGER_get cyassl/openssl/ssl.h 268;" d -ASN1_OBJECT cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_OBJECT ASN1_OBJECT;$/;" t -ASN1_STRING cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_STRING ASN1_STRING;$/;" t -ASN1_TIME cyassl/openssl/ssl.h /^typedef CYASSL_ASN1_TIME ASN1_TIME;$/;" t -ASN1_TIME_pr cyassl/openssl/ssl.h 265;" d -ASN1_UTCTIME cyassl/openssl/ssl.h 73;" d -ASN1_UTCTIME_pr cyassl/openssl/ssl.h 356;" d -ASN_AFTER_DATE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_AFTER_DATE_E = -151, \/* ASN date error, current date after *\/$/;" e enum:__anon61 -ASN_BEFORE_DATE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_BEFORE_DATE_E = -150, \/* ASN date error, current date before *\/$/;" e enum:__anon61 -ASN_BITSTR_E cyassl/ctaocrypt/error-crypt.h /^ ASN_BITSTR_E = -147, \/* ASN bit string error, wrong id *\/$/;" e enum:__anon61 -ASN_BIT_STRING cyassl/ctaocrypt/asn.h /^ ASN_BIT_STRING = 0x03,$/;" e enum:ASN_Tags -ASN_BOOLEAN cyassl/ctaocrypt/asn.h /^ ASN_BOOLEAN = 0x01,$/;" e enum:ASN_Tags -ASN_BOOL_SIZE cyassl/ctaocrypt/asn.h /^ ASN_BOOL_SIZE = 2, \/* including type *\/$/;" e enum:Misc_ASN -ASN_COMMON_NAME cyassl/ctaocrypt/asn.h /^ ASN_COMMON_NAME = 0x03, \/* CN *\/$/;" e enum:DN_Tags -ASN_CONSTRUCTED cyassl/ctaocrypt/asn.h /^ ASN_CONSTRUCTED = 0x20,$/;" e enum:ASN_Flags -ASN_CONTEXT_SPECIFIC cyassl/ctaocrypt/asn.h /^ ASN_CONTEXT_SPECIFIC = 0x80$/;" e enum:ASN_Flags -ASN_COUNTRY_NAME cyassl/ctaocrypt/asn.h /^ ASN_COUNTRY_NAME = 0x06, \/* C *\/$/;" e enum:DN_Tags -ASN_CRIT_EXT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRIT_EXT_E = -160, \/* ASN unsupported critical extension *\/$/;" e enum:__anon61 -ASN_CRL_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRL_CONFIRM_E = -189, \/* ASN CRL signature confirm failure *\/$/;" e enum:__anon61 -ASN_CRL_NO_SIGNER_E cyassl/ctaocrypt/error-crypt.h /^ ASN_CRL_NO_SIGNER_E = -190, \/* ASN CRL no signer to confirm failure *\/$/;" e enum:__anon61 -ASN_DATE_SZ_E cyassl/ctaocrypt/error-crypt.h /^ ASN_DATE_SZ_E = -149, \/* ASN date error, bad size *\/$/;" e enum:__anon61 -ASN_DH_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_DH_KEY_E = -158, \/* ASN key init error, invalid input *\/$/;" e enum:__anon61 -ASN_DIR_TYPE cyassl/ctaocrypt/asn.h /^ ASN_DIR_TYPE = 0x04,$/;" e enum:ASN_Tags -ASN_DNS_TYPE cyassl/ctaocrypt/asn.h /^ ASN_DNS_TYPE = 0x02,$/;" e enum:ASN_Tags -ASN_ECC_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_ECC_KEY_E = -171, \/* ASN ECC bad input *\/$/;" e enum:__anon61 -ASN_ENUMERATED cyassl/ctaocrypt/asn.h /^ ASN_ENUMERATED = 0x0a,$/;" e enum:ASN_Tags -ASN_EXPECT_0_E cyassl/ctaocrypt/error-crypt.h /^ ASN_EXPECT_0_E = -146, \/* ASN expect error, not zero *\/$/;" e enum:__anon61 -ASN_EXTENSIONS cyassl/ctaocrypt/asn.h /^ ASN_EXTENSIONS = 0xa3,$/;" e enum:ASN_Tags -ASN_Flags cyassl/ctaocrypt/asn.h /^enum ASN_Flags{$/;" g -ASN_GENERALIZED_TIME cyassl/ctaocrypt/asn.h /^ ASN_GENERALIZED_TIME = 0x18,$/;" e enum:ASN_Tags -ASN_GEN_TIME_SZ cyassl/ctaocrypt/asn.h /^ ASN_GEN_TIME_SZ = 15, \/* 7 numbers * 2 + Zulu tag *\/$/;" e enum:Misc_ASN -ASN_GETINT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_GETINT_E = -142, \/* ASN get big int error, invalid data *\/$/;" e enum:__anon61 -ASN_INPUT_E cyassl/ctaocrypt/error-crypt.h /^ ASN_INPUT_E = -154, \/* ASN input error, not enough data *\/$/;" e enum:__anon61 -ASN_INTEGER cyassl/ctaocrypt/asn.h /^ ASN_INTEGER = 0x02,$/;" e enum:ASN_Tags -ASN_LOCALITY_NAME cyassl/ctaocrypt/asn.h /^ ASN_LOCALITY_NAME = 0x07, \/* L *\/$/;" e enum:DN_Tags -ASN_LONG_LENGTH cyassl/ctaocrypt/asn.h /^ ASN_LONG_LENGTH = 0x80$/;" e enum:ASN_Tags -ASN_NAME_INVALID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NAME_INVALID_E = -198, \/* ASN name constraint error *\/$/;" e enum:__anon61 -ASN_NAME_MAX cyassl/ctaocrypt/asn.h /^ ASN_NAME_MAX = 256,$/;" e enum:Misc_ASN -ASN_NAME_MAX cyassl/internal.h 1674;" d -ASN_NO_SIGNER_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NO_SIGNER_E = -188, \/* ASN no signer to confirm failure *\/$/;" e enum:__anon61 -ASN_NTRU_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_NTRU_KEY_E = -159, \/* ASN ntru key decode error, invalid input *\/$/;" e enum:__anon61 -ASN_OBJECT_ID cyassl/ctaocrypt/asn.h /^ ASN_OBJECT_ID = 0x06,$/;" e enum:ASN_Tags -ASN_OBJECT_ID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_OBJECT_ID_E = -144, \/* ASN object id error, invalid id *\/$/;" e enum:__anon61 -ASN_OCSP_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_OCSP_CONFIRM_E = -191, \/* ASN OCSP signature confirm failure *\/$/;" e enum:__anon61 -ASN_OCTET_STRING cyassl/ctaocrypt/asn.h /^ ASN_OCTET_STRING = 0x04,$/;" e enum:ASN_Tags -ASN_ORGUNIT_NAME cyassl/ctaocrypt/asn.h /^ ASN_ORGUNIT_NAME = 0x0b \/* OU *\/$/;" e enum:DN_Tags -ASN_ORG_NAME cyassl/ctaocrypt/asn.h /^ ASN_ORG_NAME = 0x0a, \/* O *\/$/;" e enum:DN_Tags -ASN_OTHER_TYPE cyassl/ctaocrypt/asn.h /^ ASN_OTHER_TYPE = 0x00,$/;" e enum:ASN_Tags -ASN_PARSE_E cyassl/ctaocrypt/error-crypt.h /^ ASN_PARSE_E = -140, \/* ASN parsing error, invalid input *\/$/;" e enum:__anon61 -ASN_RFC822_TYPE cyassl/ctaocrypt/asn.h /^ ASN_RFC822_TYPE = 0x01,$/;" e enum:ASN_Tags -ASN_RSA_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_RSA_KEY_E = -143, \/* ASN key init error, invalid input *\/$/;" e enum:__anon61 -ASN_SEQUENCE cyassl/ctaocrypt/asn.h /^ ASN_SEQUENCE = 0x10,$/;" e enum:ASN_Tags -ASN_SERIAL_NUMBER cyassl/ctaocrypt/asn.h /^ ASN_SERIAL_NUMBER = 0x05, \/* serialNumber *\/$/;" e enum:DN_Tags -ASN_SET cyassl/ctaocrypt/asn.h /^ ASN_SET = 0x11,$/;" e enum:ASN_Tags -ASN_SIG_CONFIRM_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_CONFIRM_E = -155, \/* ASN sig error, confirm failure *\/$/;" e enum:__anon61 -ASN_SIG_HASH_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_HASH_E = -156, \/* ASN sig error, unsupported hash type *\/$/;" e enum:__anon61 -ASN_SIG_KEY_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_KEY_E = -157, \/* ASN sig error, unsupported key type *\/$/;" e enum:__anon61 -ASN_SIG_OID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_SIG_OID_E = -152, \/* ASN signature error, mismatched oid *\/$/;" e enum:__anon61 -ASN_STATE_NAME cyassl/ctaocrypt/asn.h /^ ASN_STATE_NAME = 0x08, \/* ST *\/$/;" e enum:DN_Tags -ASN_SUR_NAME cyassl/ctaocrypt/asn.h /^ ASN_SUR_NAME = 0x04, \/* SN *\/$/;" e enum:DN_Tags -ASN_TAG_NULL cyassl/ctaocrypt/asn.h /^ ASN_TAG_NULL = 0x05,$/;" e enum:ASN_Tags -ASN_TAG_NULL_E cyassl/ctaocrypt/error-crypt.h /^ ASN_TAG_NULL_E = -145, \/* ASN tag error, not null *\/$/;" e enum:__anon61 -ASN_TIME_E cyassl/ctaocrypt/error-crypt.h /^ ASN_TIME_E = -153, \/* ASN time error, unknown time type *\/$/;" e enum:__anon61 -ASN_Tags cyassl/ctaocrypt/asn.h /^enum ASN_Tags { $/;" g -ASN_UNKNOWN_OID_E cyassl/ctaocrypt/error-crypt.h /^ ASN_UNKNOWN_OID_E = -148, \/* ASN oid error, unknown sum id *\/$/;" e enum:__anon61 -ASN_UTC_TIME cyassl/ctaocrypt/asn.h /^ ASN_UTC_TIME = 0x17,$/;" e enum:ASN_Tags -ASN_UTF8STRING cyassl/ctaocrypt/asn.h /^ ASN_UTF8STRING = 0x0c,$/;" e enum:ASN_Tags -ASN_VERSION_E cyassl/ctaocrypt/error-crypt.h /^ ASN_VERSION_E = -141, \/* ASN version error, invalid number *\/$/;" e enum:__anon61 -ASSISTS ctaocrypt/src/aes_asm.s /^ASSISTS:$/;" l -ATIMER_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ATIMER_IRQHandler$/;" l -ATOMIC_USER cyassl/ctaocrypt/settings.h 600;" d -AUTH_INFO_OID cyassl/ctaocrypt/asn.h /^ AUTH_INFO_OID = 69,$/;" e enum:Extensions_Sum -AUTH_KEY_OID cyassl/ctaocrypt/asn.h /^ AUTH_KEY_OID = 149,$/;" e enum:Extensions_Sum -AUTOCONF Makefile /^AUTOCONF = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing autoconf$/;" m -AUTOHEADER Makefile /^AUTOHEADER = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing autoheader$/;" m -AUTOMAKE Makefile /^AUTOMAKE = ${SHELL} \/home\/khimes\/work\/cyassl-3.0.0\/build-aux\/missing automake-1.14$/;" m -AWK Makefile /^AWK = mawk$/;" m -AcceptState cyassl/internal.h /^enum AcceptState {$/;" g -AddCA src/ssl.c /^int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)$/;" f -AddCRL src/crl.c /^static int AddCRL(CYASSL_CRL* crl, DecodedCRL* dcrl)$/;" f file: -AddFinCapture src/sniffer.c /^static int AddFinCapture(SnifferSession* session, word32 sequence)$/;" f file: -AddHandShakeHeader src/internal.c /^static void AddHandShakeHeader(byte* output, word32 length, byte type,$/;" f file: -AddHeaders src/internal.c /^static void AddHeaders(byte* output, word32 length, byte type, CYASSL* ssl)$/;" f file: -AddLateName src/internal.c /^ void AddLateName(const char* name, TimeoutInfo* info)$/;" f -AddLateRecordHeader src/internal.c /^ void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info)$/;" f -AddLength ctaocrypt/src/md4.c /^static INLINE void AddLength(Md4* md4, word32 len)$/;" f file: -AddLength ctaocrypt/src/md5.c /^static INLINE void AddLength(Md5* md5, word32 len)$/;" f file: -AddLength ctaocrypt/src/ripemd.c /^static INLINE void AddLength(RipeMd* ripemd, word32 len)$/;" f file: -AddLength ctaocrypt/src/sha.c /^static INLINE void AddLength(Sha* sha, word32 len)$/;" f file: -AddLength ctaocrypt/src/sha256.c /^static INLINE void AddLength(Sha256* sha256, word32 len)$/;" f file: -AddLength ctaocrypt/src/sha512.c /^static INLINE void AddLength(Sha512* sha512, word32 len)$/;" f file: -AddLength384 ctaocrypt/src/sha512.c /^static INLINE void AddLength384(Sha384* sha384, word32 len)$/;" f file: -AddPacketInfo src/internal.c /^ void AddPacketInfo(const char* name, TimeoutInfo* info, const byte* data,$/;" f -AddPacketName src/internal.c /^ void AddPacketName(const char* name, HandShakeInfo* info)$/;" f -AddRecordHeader src/internal.c /^static void AddRecordHeader(byte* output, word32 length, byte type, CYASSL* ssl)$/;" f file: -AddSession src/ssl.c /^int AddSession(CYASSL* ssl)$/;" f -AddSignature ctaocrypt/src/asn.c /^static int AddSignature(byte* buffer, int bodySz, const byte* sig, int sigSz,$/;" f file: -AddTimes src/ssl.c 5506;" d file: -AddToReassembly src/sniffer.c /^static int AddToReassembly(byte from, word32 seq, const byte* sslFrame,$/;" f file: -AdjustSequence src/sniffer.c /^static int AdjustSequence(TcpInfo* tcpInfo, SnifferSession* session,$/;" f file: -AeadIncrementExpIV src/internal.c /^static INLINE void AeadIncrementExpIV(CYASSL* ssl)$/;" f file: -Aes cyassl/ctaocrypt/aes.h /^typedef struct Aes {$/;" s -Aes cyassl/ctaocrypt/aes.h /^} Aes;$/;" t typeref:struct:Aes -AesCaviumCbcDecrypt ctaocrypt/src/aes.c /^static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in,$/;" f file: -AesCaviumCbcEncrypt ctaocrypt/src/aes.c /^static int AesCaviumCbcEncrypt(Aes* aes, byte* out, const byte* in,$/;" f file: -AesCaviumSetKey ctaocrypt/src/aes.c /^static int AesCaviumSetKey(Aes* aes, const byte* key, word32 length,$/;" f file: -AesCbcCrypt ctaocrypt/src/aes.c /^static int AesCbcCrypt(Aes* aes, byte* po, const byte* pi, word32 sz, word32 descHeader)$/;" f file: -AesCbcDecrypt ctaocrypt/src/aes.c /^ int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesCbcDecrypt ctaocrypt/src/aes.c /^int AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesCbcDecrypt ctaocrypt/src/aes.c /^int AesCbcDecrypt(Aes* aes, byte* po, const byte* pi, word32 sz)$/;" f -AesCbcDecrypt cyassl/ctaocrypt/aes.h 167;" d -AesCbcEncrypt ctaocrypt/src/aes.c /^ int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesCbcEncrypt ctaocrypt/src/aes.c /^int AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesCbcEncrypt ctaocrypt/src/aes.c /^int AesCbcEncrypt(Aes* aes, byte* po, const byte* pi, word32 sz)$/;" f -AesCbcEncrypt cyassl/ctaocrypt/aes.h 166;" d -AesCcmCtrInc ctaocrypt/src/aes.c /^static INLINE void AesCcmCtrInc(byte* B, word32 lenSz)$/;" f file: -AesCcmDecrypt ctaocrypt/src/aes.c /^int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,$/;" f -AesCcmEncrypt ctaocrypt/src/aes.c /^void AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,$/;" f -AesCcmSetKey ctaocrypt/src/aes.c /^void AesCcmSetKey(Aes* aes, const byte* key, word32 keySz)$/;" f -AesCrypt ctaocrypt/src/aes.c /^ static void AesCrypt(Aes *aes, byte* out, const byte* in, word32 sz,$/;" f file: -AesCtrEncrypt ctaocrypt/src/aes.c /^ void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesCtrEncrypt ctaocrypt/src/aes.c /^void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)$/;" f -AesDecrypt ctaocrypt/src/aes.c /^static void AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)$/;" f file: -AesDecryptDirect ctaocrypt/src/aes.c /^void AesDecryptDirect(Aes* aes, byte* out, const byte* in)$/;" f -AesEncrypt ctaocrypt/src/aes.c /^static void AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)$/;" f file: -AesEncryptDirect ctaocrypt/src/aes.c /^void AesEncryptDirect(Aes* aes, byte* out, const byte* in)$/;" f -AesFreeCavium ctaocrypt/src/aes.c /^void AesFreeCavium(Aes* aes)$/;" f -AesGcmDecrypt ctaocrypt/src/aes.c /^int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,$/;" f -AesGcmEncrypt ctaocrypt/src/aes.c /^void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,$/;" f -AesGcmSetKey ctaocrypt/src/aes.c /^void AesGcmSetKey(Aes* aes, const byte* key, word32 len)$/;" f -AesInitCavium ctaocrypt/src/aes.c /^int AesInitCavium(Aes* aes, int devId)$/;" f -AesSetIV ctaocrypt/src/aes.c /^int AesSetIV(Aes* aes, const byte* iv)$/;" f -AesSetIV cyassl/ctaocrypt/aes.h 165;" d -AesSetKey ctaocrypt/src/aes.c /^ int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv,$/;" f -AesSetKey ctaocrypt/src/aes.c /^int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv,$/;" f -AesSetKey cyassl/ctaocrypt/aes.h 164;" d -AesSetKeyDirect ctaocrypt/src/aes.c /^ int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen,$/;" f -AesSetKeyDirect ctaocrypt/src/aes.c /^int AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen,$/;" f -AesSetKeyLocal ctaocrypt/src/aes.c /^static int AesSetKeyLocal(Aes* aes, const byte* userKey, word32 keylen,$/;" f file: -AlertDescription cyassl/ssl.h /^enum AlertDescription {$/;" g -AlertLevel cyassl/ssl.h /^enum AlertLevel {$/;" g -AlreadySigner src/ssl.c /^int AlreadySigner(CYASSL_CERT_MANAGER* cm, byte* hash)$/;" f -ApiTest tests/api.c /^int ApiTest(void)$/;" f -Arc4 cyassl/ctaocrypt/arc4.h /^typedef struct Arc4 {$/;" s -Arc4 cyassl/ctaocrypt/arc4.h /^} Arc4;$/;" t typeref:struct:Arc4 -Arc4CaviumProcess ctaocrypt/src/arc4.c /^static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in,$/;" f file: -Arc4CaviumSetKey ctaocrypt/src/arc4.c /^static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length)$/;" f file: -Arc4FreeCavium ctaocrypt/src/arc4.c /^void Arc4FreeCavium(Arc4* arc4)$/;" f -Arc4InitCavium ctaocrypt/src/arc4.c /^int Arc4InitCavium(Arc4* arc4, int devId)$/;" f -Arc4Process ctaocrypt/src/arc4.c /^void Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length)$/;" f -Arc4SetKey ctaocrypt/src/arc4.c /^void Arc4SetKey(Arc4* arc4, const byte* key, word32 length)$/;" f -Arrays cyassl/internal.h /^typedef struct Arrays {$/;" s -Arrays cyassl/internal.h /^} Arrays;$/;" t typeref:struct:Arrays -Assert tests/unit.h 15;" d -AssertFalse tests/unit.h 18;" d -AssertInt tests/unit.h 27;" d -AssertIntEQ tests/unit.h 34;" d -AssertIntGE tests/unit.h 38;" d -AssertIntGT tests/unit.h 36;" d -AssertIntLE tests/unit.h 39;" d -AssertIntLT tests/unit.h 37;" d -AssertIntNE tests/unit.h 35;" d -AssertNotNull tests/unit.h 19;" d -AssertNull tests/unit.h 21;" d -AssertStr tests/unit.h 41;" d -AssertStrEQ tests/unit.h 50;" d -AssertStrGE tests/unit.h 54;" d -AssertStrGT tests/unit.h 52;" d -AssertStrLE tests/unit.h 55;" d -AssertStrLT tests/unit.h 53;" d -AssertStrNE tests/unit.h 51;" d -AssertTrue tests/unit.h 17;" d -AtomicDecCtx cyassl/test.h /^typedef struct AtomicDecCtx {$/;" s -AtomicDecCtx cyassl/test.h /^} AtomicDecCtx;$/;" t typeref:struct:AtomicDecCtx -AtomicEncCtx cyassl/test.h /^typedef struct AtomicEncCtx {$/;" s -AtomicEncCtx cyassl/test.h /^} AtomicEncCtx;$/;" t typeref:struct:AtomicEncCtx -AuthInfo_Sum cyassl/ctaocrypt/asn.h /^enum AuthInfo_Sum {$/;" g -BACKGROUND IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: -BACKGROUND IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: -BAD ctaocrypt/src/coding.c /^ BAD = 0xFF, \/* invalid encoding *\/$/;" e enum:__anon4 file: -BAD_ALIGN_E cyassl/ctaocrypt/error-crypt.h /^ BAD_ALIGN_E = -187, \/* Bad alignment for operation, no alloc *\/$/;" e enum:__anon61 -BAD_APP_DATA_STR cyassl/sniffer_error.h 74;" d -BAD_CERT_MANAGER_ERROR cyassl/error-ssl.h /^ BAD_CERT_MANAGER_ERROR = -259, \/* Bad Cert Manager *\/$/;" e enum:CyaSSL_ErrorCodes -BAD_CIPHER_SPEC_STR cyassl/sniffer_error.h 37;" d -BAD_COMPRESSION_STR cyassl/sniffer_error.h 101;" d -BAD_DECRYPT cyassl/sniffer_error.h 104;" d -BAD_DECRYPT_TYPE cyassl/sniffer_error.h 99;" d -BAD_DERIVE_STR cyassl/sniffer_error.h 102;" d -BAD_ENC_STATE_E cyassl/ctaocrypt/error-crypt.h /^ BAD_ENC_STATE_E = -192, \/* Bad ecc enc state operation *\/$/;" e enum:__anon61 -BAD_FINISHED_MSG cyassl/sniffer_error.h 100;" d -BAD_FUNC_ARG cyassl/ctaocrypt/error-crypt.h /^ BAD_FUNC_ARG = -173, \/* Bad function argument provided *\/$/;" e enum:__anon61 -BAD_HANDSHAKE_STR cyassl/sniffer_error.h 70;" d -BAD_HELLO cyassl/error-ssl.h /^ BAD_HELLO = -221, \/* client hello malformed *\/$/;" e enum:CyaSSL_ErrorCodes -BAD_INPUT_STR cyassl/sniffer_error.h 98;" d -BAD_IPVER_STR cyassl/sniffer_error.h 79;" d -BAD_KEA_TYPE_E cyassl/error-ssl.h /^ BAD_KEA_TYPE_E = -274, \/* bad KEA type found *\/$/;" e enum:CyaSSL_ErrorCodes -BAD_MUTEX_E cyassl/ctaocrypt/error-crypt.h /^ BAD_MUTEX_E = -106, \/* Bad mutex operation *\/$/;" e enum:__anon61 -BAD_NEW_SSL_STR cyassl/sniffer_error.h 58;" d -BAD_OLD_CLIENT_STR cyassl/sniffer_error.h 66;" d -BAD_PADDING_E cyassl/ctaocrypt/error-crypt.h /^ BAD_PADDING_E = -193, \/* Bad padding, msg not correct length *\/$/;" e enum:__anon61 -BAD_PATH_ERROR cyassl/error-ssl.h /^ BAD_PATH_ERROR = -258, \/* Bad path for opendir *\/$/;" e enum:CyaSSL_ErrorCodes -BAD_PROTO_STR cyassl/sniffer_error.h 80;" d -BAD_RECORD_HDR_STR cyassl/sniffer_error.h 67;" d -BAD_SESSION_RESUME_STR cyassl/sniffer_error.h 40;" d -BAD_SESSION_STR cyassl/sniffer_error.h 62;" d -BAD_TRACE_FILE_STR cyassl/sniffer_error.h 84;" d -BASIC_CA_OID cyassl/ctaocrypt/asn.h /^ BASIC_CA_OID = 133,$/;" e enum:Extensions_Sum -BEFORE cyassl/ctaocrypt/asn.h /^ BEFORE = 0,$/;" e enum:__anon60 -BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 74;" d -BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 69;" d -BENCH_EMBEDDED IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 32;" d -BG_JOB_STACK_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 470;" d file: -BG_JOB_STACK_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 495;" d file: -BIGNUM cyassl/openssl/bn.h /^typedef CYASSL_BIGNUM BIGNUM;$/;" t -BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 282;" d -BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 286;" d -BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 306;" d -BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 515;" d -BIG_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 517;" d -BIG_ENDIAN_ORDER cyassl/ctaocrypt/types.h 35;" d -BIO cyassl/openssl/ssl.h /^typedef CYASSL_BIO BIO;$/;" t -BIO_BUFFER cyassl/internal.h /^ BIO_BUFFER = 1,$/;" e enum:BIO_TYPE -BIO_CLOSE cyassl/ssl.h /^ BIO_CLOSE = 1,$/;" e enum:__anon19 -BIO_FLAGS_BASE64_NO_NL cyassl/ssl.h /^ BIO_FLAGS_BASE64_NO_NL = 1,$/;" e enum:__anon19 -BIO_MEMORY cyassl/internal.h /^ BIO_MEMORY = 4$/;" e enum:BIO_TYPE -BIO_METHOD cyassl/openssl/ssl.h /^typedef CYASSL_BIO_METHOD BIO_METHOD;$/;" t -BIO_NOCLOSE cyassl/ssl.h /^ BIO_NOCLOSE = 0,$/;" e enum:__anon19 -BIO_SOCKET cyassl/internal.h /^ BIO_SOCKET = 2,$/;" e enum:BIO_TYPE -BIO_SSL cyassl/internal.h /^ BIO_SSL = 3,$/;" e enum:BIO_TYPE -BIO_TYPE cyassl/internal.h /^enum BIO_TYPE {$/;" g -BIO_eof cyassl/openssl/ssl.h 198;" d -BIO_f_base64 cyassl/openssl/ssl.h 202;" d -BIO_f_buffer cyassl/openssl/ssl.h 193;" d -BIO_f_ssl cyassl/openssl/ssl.h 195;" d -BIO_flush cyassl/openssl/ssl.h 187;" d -BIO_free cyassl/openssl/ssl.h 181;" d -BIO_free_all cyassl/openssl/ssl.h 182;" d -BIO_get_mem_data cyassl/openssl/ssl.h 190;" d -BIO_new cyassl/openssl/ssl.h 180;" d -BIO_new_mem_buf cyassl/openssl/ssl.h 191;" d -BIO_new_socket cyassl/openssl/ssl.h 196;" d -BIO_pending cyassl/openssl/ssl.h 188;" d -BIO_pop cyassl/openssl/ssl.h 186;" d -BIO_prf cyassl/openssl/ssl.h 355;" d -BIO_push cyassl/openssl/ssl.h 185;" d -BIO_read cyassl/openssl/ssl.h 183;" d -BIO_s_mem cyassl/openssl/ssl.h 201;" d -BIO_set_flags cyassl/openssl/ssl.h 203;" d -BIO_set_ss cyassl/openssl/ssl.h 199;" d -BIO_set_write_buffer_size cyassl/openssl/ssl.h 194;" d -BIO_write cyassl/openssl/ssl.h 184;" d -BLAKE2B_256 cyassl/ctaocrypt/blake2.h /^ BLAKE2B_256 = 32 \/* 256 bit type, SSL default *\/$/;" e enum:__anon76 -BLAKE2B_BLOCKBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_BLOCKBYTES = 128,$/;" e enum:blake2b_constant -BLAKE2B_ID cyassl/ctaocrypt/blake2.h /^ BLAKE2B_ID = 7, \/* hash type unique *\/$/;" e enum:__anon76 -BLAKE2B_ID cyassl/ctaocrypt/hmac.h /^ BLAKE2B_ID = 7,$/;" e enum:__anon66 -BLAKE2B_KEYBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_KEYBYTES = 64,$/;" e enum:blake2b_constant -BLAKE2B_OUTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_OUTBYTES = 64,$/;" e enum:blake2b_constant -BLAKE2B_PERSONALBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_PERSONALBYTES = 16$/;" e enum:blake2b_constant -BLAKE2B_SALTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2B_SALTBYTES = 16,$/;" e enum:blake2b_constant -BLAKE2S_BLOCKBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_BLOCKBYTES = 64,$/;" e enum:blake2s_constant -BLAKE2S_KEYBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_KEYBYTES = 32,$/;" e enum:blake2s_constant -BLAKE2S_OUTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_OUTBYTES = 32,$/;" e enum:blake2s_constant -BLAKE2S_PERSONALBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_PERSONALBYTES = 8$/;" e enum:blake2s_constant -BLAKE2S_SALTBYTES cyassl/ctaocrypt/blake2-int.h /^ BLAKE2S_SALTBYTES = 8,$/;" e enum:blake2s_constant -BLAKE2_TESTS IDE/MDK5-ARM/Projects/CryptTest/test.c 844;" d file: -BLAKE2_TESTS IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c 818;" d file: -BLAKE2_TESTS ctaocrypt/test/test.c 879;" d file: -BNCORE_C cyassl/ctaocrypt/mpi_class.h 151;" d -BN_CTX cyassl/openssl/bn.h /^typedef CYASSL_BN_CTX BN_CTX;$/;" t -BN_CTX_free cyassl/openssl/bn.h 72;" d -BN_CTX_init cyassl/openssl/bn.h 71;" d -BN_CTX_new cyassl/openssl/bn.h 70;" d -BN_ERROR_C cyassl/ctaocrypt/mpi_class.h 33;" d -BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 34;" d -BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 459;" d -BN_FAST_MP_INVMOD_C cyassl/ctaocrypt/mpi_superclass.h 82;" d -BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 35;" d -BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 367;" d -BN_FAST_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 565;" d -BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 36;" d -BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 579;" d -BN_FAST_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 980;" d -BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 37;" d -BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 735;" d -BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 988;" d -BN_FAST_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 81;" d -BN_FAST_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 38;" d -BN_FAST_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 823;" d -BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 39;" d -BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 557;" d -BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 773;" d -BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 780;" d -BN_MP_2EXPT_C cyassl/ctaocrypt/mpi_class.h 795;" d -BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 272;" d -BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 352;" d -BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 40;" d -BN_MP_ABS_C cyassl/ctaocrypt/mpi_class.h 411;" d -BN_MP_ADDMOD_C cyassl/ctaocrypt/mpi_class.h 43;" d -BN_MP_ADDMOD_C cyassl/ctaocrypt/mpi_superclass.h 46;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 170;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 221;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 276;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 41;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 472;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 507;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 519;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 541;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 742;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 841;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 895;" d -BN_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 912;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 400;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 42;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 674;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 688;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 705;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 714;" d -BN_MP_ADD_D_C cyassl/ctaocrypt/mpi_class.h 856;" d -BN_MP_AND_C cyassl/ctaocrypt/mpi_class.h 44;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 1004;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 178;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 185;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 190;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 195;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 216;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 228;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 286;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 292;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 302;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 308;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 319;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 329;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 45;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 505;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 514;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 548;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 567;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 592;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 597;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 629;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 726;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 810;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 857;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 944;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 960;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 982;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 990;" d -BN_MP_CLAMP_C cyassl/ctaocrypt/mpi_class.h 997;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 222;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 230;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 240;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 287;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 300;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 310;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 321;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 344;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 351;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 365;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 420;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 439;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 46;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 489;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 499;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 509;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 520;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 540;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 603;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 619;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 631;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 639;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 652;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 664;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 676;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 696;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 745;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 756;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 767;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 774;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 783;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 830;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 845;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 863;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 880;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 926;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 934;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 946;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 966;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 984;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 992;" d -BN_MP_CLEAR_C cyassl/ctaocrypt/mpi_class.h 999;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 172;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 279;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 353;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 393;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 478;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 47;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 529;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 902;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_class.h 919;" d -BN_MP_CLEAR_MULTI_C cyassl/ctaocrypt/mpi_superclass.h 50;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 167;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 274;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 474;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 48;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 616;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 638;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 662;" d -BN_MP_CMP_C cyassl/ctaocrypt/mpi_class.h 743;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 169;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 401;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 475;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 493;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 49;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 635;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 647;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 656;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 668;" d -BN_MP_CMP_D_C cyassl/ctaocrypt/mpi_class.h 739;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 179;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 209;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 244;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 266;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 330;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 416;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 476;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 488;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 50;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 526;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 560;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 569;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 754;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 765;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 843;" d -BN_MP_CMP_MAG_C cyassl/ctaocrypt/mpi_class.h 850;" d -BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 414;" d -BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 496;" d -BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 51;" d -BN_MP_CNT_LSB_C cyassl/ctaocrypt/mpi_class.h 659;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 161;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 204;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 267;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 296;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 315;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 377;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 386;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 433;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 467;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 52;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 547;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 589;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 610;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 623;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 891;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 908;" d -BN_MP_COPY_C cyassl/ctaocrypt/mpi_class.h 972;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 271;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 363;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 53;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 556;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 692;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 750;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 761;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 772;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 781;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 788;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 939;" d -BN_MP_COUNT_BITS_C cyassl/ctaocrypt/mpi_class.h 964;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 277;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 316;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 415;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 497;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 56;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 660;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 751;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 762;" d -BN_MP_DIV_2D_C cyassl/ctaocrypt/mpi_class.h 879;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 164;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 470;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 55;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 686;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 842;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 897;" d -BN_MP_DIV_2_C cyassl/ctaocrypt/mpi_class.h 914;" d -BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 317;" d -BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 57;" d -BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 900;" d -BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_class.h 917;" d -BN_MP_DIV_3_C cyassl/ctaocrypt/mpi_superclass.h 79;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 388;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 527;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 539;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 54;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 615;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 796;" d -BN_MP_DIV_C cyassl/ctaocrypt/mpi_class.h 840;" d -BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 552;" d -BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 58;" d -BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 695;" d -BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 925;" d -BN_MP_DIV_D_C cyassl/ctaocrypt/mpi_class.h 933;" d -BN_MP_DIV_SMALL cyassl/ctaocrypt/mpi_superclass.h 59;" d -BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_class.h 356;" d -BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_class.h 59;" d -BN_MP_DR_IS_MODULUS_C cyassl/ctaocrypt/mpi_superclass.h 72;" d -BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_class.h 370;" d -BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_class.h 60;" d -BN_MP_DR_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 74;" d -BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_class.h 369;" d -BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_class.h 61;" d -BN_MP_DR_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 73;" d -BN_MP_ERROR_TO_STRING_C cyassl/ctaocrypt/mpi_class.h 155;" d -BN_MP_ERR_C cyassl/ctaocrypt/mpi_class.h 437;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 171;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 229;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 278;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 303;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 309;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 320;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 380;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 392;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 417;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 477;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 542;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 618;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 62;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 630;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 844;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 945;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 976;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 983;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 991;" d -BN_MP_EXCH_C cyassl/ctaocrypt/mpi_class.h 998;" d -BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 637;" d -BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 64;" d -BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 661;" d -BN_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_superclass.h 47;" d -BN_MP_EXPTMOD_FAST_C cyassl/ctaocrypt/mpi_class.h 359;" d -BN_MP_EXPTMOD_FAST_C cyassl/ctaocrypt/mpi_class.h 65;" d -BN_MP_EXPT_D_C cyassl/ctaocrypt/mpi_class.h 611;" d -BN_MP_EXPT_D_C cyassl/ctaocrypt/mpi_class.h 63;" d -BN_MP_EXTEUCLID_C cyassl/ctaocrypt/mpi_class.h 66;" d -BN_MP_FREAD_C cyassl/ctaocrypt/mpi_class.h 67;" d -BN_MP_FWRITE_C cyassl/ctaocrypt/mpi_class.h 68;" d -BN_MP_GCD_C cyassl/ctaocrypt/mpi_class.h 525;" d -BN_MP_GCD_C cyassl/ctaocrypt/mpi_class.h 69;" d -BN_MP_GCD_C cyassl/ctaocrypt/mpi_superclass.h 43;" d -BN_MP_GET_INT_C cyassl/ctaocrypt/mpi_class.h 485;" d -BN_MP_GET_INT_C cyassl/ctaocrypt/mpi_class.h 70;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 1003;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 176;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 184;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 189;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 194;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 200;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 214;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 258;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 291;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 328;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 533;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 566;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 585;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 590;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 596;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 71;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 723;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 855;" d -BN_MP_GROW_C cyassl/ctaocrypt/mpi_class.h 959;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 220;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 281;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 298;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 349;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 364;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 438;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 443;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 448;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 453;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 538;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 601;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 608;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 636;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 649;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 673;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 72;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 749;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 760;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 771;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 779;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 828;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 861;" d -BN_MP_INIT_C cyassl/ctaocrypt/mpi_class.h 965;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 227;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 282;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 341;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 413;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 495;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 628;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 657;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 693;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 731;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 73;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 838;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 877;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 924;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 932;" d -BN_MP_INIT_COPY_C cyassl/ctaocrypt/mpi_class.h 943;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 160;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 269;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 384;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 465;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 524;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 74;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 889;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_class.h 906;" d -BN_MP_INIT_MULTI_C cyassl/ctaocrypt/mpi_superclass.h 49;" d -BN_MP_INIT_SET_C cyassl/ctaocrypt/mpi_class.h 75;" d -BN_MP_INIT_SET_INT_C cyassl/ctaocrypt/mpi_class.h 483;" d -BN_MP_INIT_SET_INT_C cyassl/ctaocrypt/mpi_class.h 76;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 280;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 307;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 318;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 504;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 513;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 77;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 981;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 989;" d -BN_MP_INIT_SIZE_C cyassl/ctaocrypt/mpi_class.h 996;" d -BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 350;" d -BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_class.h 78;" d -BN_MP_INVMOD_C cyassl/ctaocrypt/mpi_superclass.h 42;" d -BN_MP_INVMOD_SLOW_C cyassl/ctaocrypt/mpi_class.h 460;" d -BN_MP_INVMOD_SLOW_C cyassl/ctaocrypt/mpi_class.h 79;" d -BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 159;" d -BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 468;" d -BN_MP_ISEVEN_C cyassl/ctaocrypt/mpi_class.h 671;" d -BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 165;" d -BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 358;" d -BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 458;" d -BN_MP_ISODD_C cyassl/ctaocrypt/mpi_class.h 471;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 168;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 254;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 265;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 314;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 387;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 410;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 457;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 464;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 494;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 624;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 694;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 715;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 836;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 878;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 923;" d -BN_MP_ISZERO_C cyassl/ctaocrypt/mpi_class.h 931;" d -BN_MP_IS_SQUARE_C cyassl/ctaocrypt/mpi_class.h 80;" d -BN_MP_JACOBI_C cyassl/ctaocrypt/mpi_class.h 81;" d -BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_class.h 578;" d -BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_class.h 82;" d -BN_MP_KARATSUBA_MUL_C cyassl/ctaocrypt/mpi_superclass.h 68;" d -BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_class.h 822;" d -BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_class.h 83;" d -BN_MP_KARATSUBA_SQR_C cyassl/ctaocrypt/mpi_superclass.h 69;" d -BN_MP_LCM_C cyassl/ctaocrypt/mpi_class.h 84;" d -BN_MP_LCM_C cyassl/ctaocrypt/mpi_superclass.h 40;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 283;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 508;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 518;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 591;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 706;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 741;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 85;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 901;" d -BN_MP_LSHD_C cyassl/ctaocrypt/mpi_class.h 918;" d -BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 299;" d -BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 736;" d -BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 87;" d -BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 890;" d -BN_MP_MOD_2D_C cyassl/ctaocrypt/mpi_class.h 907;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 162;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 223;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 376;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 466;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 484;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 498;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 604;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 831;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 864;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 86;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_class.h 971;" d -BN_MP_MOD_C cyassl/ctaocrypt/mpi_superclass.h 44;" d -BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 482;" d -BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 643;" d -BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 672;" d -BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_class.h 88;" d -BN_MP_MOD_D_C cyassl/ctaocrypt/mpi_superclass.h 53;" d -BN_MP_MONTGOMERY_CALC_NORMALIZATION_C cyassl/ctaocrypt/mpi_class.h 373;" d -BN_MP_MONTGOMERY_CALC_NORMALIZATION_C cyassl/ctaocrypt/mpi_class.h 89;" d -BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 368;" d -BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_class.h 90;" d -BN_MP_MONTGOMERY_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 91;" d -BN_MP_MONTGOMERY_SETUP_C cyassl/ctaocrypt/mpi_class.h 366;" d -BN_MP_MONTGOMERY_SETUP_C cyassl/ctaocrypt/mpi_class.h 91;" d -BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_class.h 374;" d -BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_class.h 96;" d -BN_MP_MULMOD_C cyassl/ctaocrypt/mpi_superclass.h 45;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 273;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 419;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 725;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 809;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 898;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 915;" d -BN_MP_MUL_2D_C cyassl/ctaocrypt/mpi_class.h 94;" d -BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 559;" d -BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 687;" d -BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 894;" d -BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 911;" d -BN_MP_MUL_2_C cyassl/ctaocrypt/mpi_class.h 93;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 345;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 379;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 389;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 503;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 528;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 602;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 612;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 733;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 763;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 893;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 92;" d -BN_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 974;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 285;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 399;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 614;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 713;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 752;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 899;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 916;" d -BN_MP_MUL_D_C cyassl/ctaocrypt/mpi_class.h 95;" d -BN_MP_NEG_C cyassl/ctaocrypt/mpi_class.h 391;" d -BN_MP_NEG_C cyassl/ctaocrypt/mpi_class.h 98;" d -BN_MP_N_ROOT_C cyassl/ctaocrypt/mpi_class.h 835;" d -BN_MP_N_ROOT_C cyassl/ctaocrypt/mpi_class.h 97;" d -BN_MP_OR_C cyassl/ctaocrypt/mpi_class.h 99;" d -BN_MP_PRIME_FERMAT_C cyassl/ctaocrypt/mpi_class.h 100;" d -BN_MP_PRIME_IS_DIVISIBLE_C cyassl/ctaocrypt/mpi_class.h 101;" d -BN_MP_PRIME_IS_DIVISIBLE_C cyassl/ctaocrypt/mpi_class.h 648;" d -BN_MP_PRIME_IS_PRIME_C cyassl/ctaocrypt/mpi_class.h 102;" d -BN_MP_PRIME_IS_PRIME_C cyassl/ctaocrypt/mpi_class.h 684;" d -BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 103;" d -BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 651;" d -BN_MP_PRIME_MILLER_RABIN_C cyassl/ctaocrypt/mpi_class.h 675;" d -BN_MP_PRIME_NEXT_PRIME_C cyassl/ctaocrypt/mpi_class.h 104;" d -BN_MP_PRIME_RABIN_MILLER_TRIALS_C cyassl/ctaocrypt/mpi_class.h 105;" d -BN_MP_PRIME_RABIN_MILLER_TRIALS_C cyassl/ctaocrypt/mpi_superclass.h 54;" d -BN_MP_PRIME_RANDOM_EX_C cyassl/ctaocrypt/mpi_class.h 106;" d -BN_MP_PRIME_RANDOM_EX_C cyassl/ctaocrypt/mpi_superclass.h 41;" d -BN_MP_RADIX_SIZE_C cyassl/ctaocrypt/mpi_class.h 107;" d -BN_MP_RADIX_SIZE_C cyassl/ctaocrypt/mpi_class.h 405;" d -BN_MP_RADIX_SMAP_C cyassl/ctaocrypt/mpi_class.h 108;" d -BN_MP_RADIX_SMAP_C cyassl/ctaocrypt/mpi_class.h 712;" d -BN_MP_RAND_C cyassl/ctaocrypt/mpi_class.h 109;" d -BN_MP_READ_RADIX_C cyassl/ctaocrypt/mpi_class.h 110;" d -BN_MP_READ_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 111;" d -BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 112;" d -BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 683;" d -BN_MP_READ_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 719;" d -BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 114;" d -BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 372;" d -BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_class.h 787;" d -BN_MP_REDUCE_2K_C cyassl/ctaocrypt/mpi_superclass.h 77;" d -BN_MP_REDUCE_2K_L_C cyassl/ctaocrypt/mpi_class.h 115;" d -BN_MP_REDUCE_2K_L_C cyassl/ctaocrypt/mpi_class.h 970;" d -BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_class.h 116;" d -BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_class.h 371;" d -BN_MP_REDUCE_2K_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 76;" d -BN_MP_REDUCE_2K_SETUP_L_C cyassl/ctaocrypt/mpi_class.h 117;" d -BN_MP_REDUCE_2K_SETUP_L_C cyassl/ctaocrypt/mpi_class.h 969;" d -BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_class.h 113;" d -BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_class.h 968;" d -BN_MP_REDUCE_C cyassl/ctaocrypt/mpi_superclass.h 70;" d -BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_class.h 118;" d -BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_class.h 357;" d -BN_MP_REDUCE_IS_2K_C cyassl/ctaocrypt/mpi_superclass.h 75;" d -BN_MP_REDUCE_IS_2K_L_C cyassl/ctaocrypt/mpi_class.h 119;" d -BN_MP_REDUCE_IS_2K_L_C cyassl/ctaocrypt/mpi_class.h 354;" d -BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 120;" d -BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 730;" d -BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_class.h 967;" d -BN_MP_REDUCE_SETUP_C cyassl/ctaocrypt/mpi_superclass.h 71;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 121;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 177;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 284;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 301;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 534;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 568;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 732;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 839;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 892;" d -BN_MP_RSHD_C cyassl/ctaocrypt/mpi_class.h 909;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 122;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 163;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 270;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 342;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 375;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 385;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 444;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 469;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 558;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 609;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 650;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 669;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 740;" d -BN_MP_SET_C cyassl/ctaocrypt/mpi_class.h 975;" d -BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_class.h 123;" d -BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_class.h 449;" d -BN_MP_SET_INT_C cyassl/ctaocrypt/mpi_superclass.h 48;" d -BN_MP_SHRINK_C cyassl/ctaocrypt/mpi_class.h 124;" d -BN_MP_SHRINK_C cyassl/ctaocrypt/mpi_superclass.h 39;" d -BN_MP_SIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 125;" d -BN_MP_SIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 872;" d -BN_MP_SQRMOD_C cyassl/ctaocrypt/mpi_class.h 127;" d -BN_MP_SQRMOD_C cyassl/ctaocrypt/mpi_class.h 663;" d -BN_MP_SQRT_C cyassl/ctaocrypt/mpi_class.h 128;" d -BN_MP_SQRT_C cyassl/ctaocrypt/mpi_class.h 486;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 126;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 343;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 378;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 487;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 515;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 829;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 910;" d -BN_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 973;" d -BN_MP_SUBMOD_C cyassl/ctaocrypt/mpi_class.h 131;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 129;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 166;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 275;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 390;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 473;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 506;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 516;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 613;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 738;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 862;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 896;" d -BN_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 913;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 130;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 215;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 617;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 658;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 670;" d -BN_MP_SUB_D_C cyassl/ctaocrypt/mpi_class.h 685;" d -BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 398;" d -BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 700;" d -BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 711;" d -BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 927;" d -BN_MP_S_RMAP_C cyassl/ctaocrypt/mpi_class.h 935;" d -BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_class.h 136;" d -BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_class.h 577;" d -BN_MP_TOOM_MUL_C cyassl/ctaocrypt/mpi_superclass.h 66;" d -BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_class.h 137;" d -BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_class.h 821;" d -BN_MP_TOOM_SQR_C cyassl/ctaocrypt/mpi_superclass.h 67;" d -BN_MP_TORADIX_C cyassl/ctaocrypt/mpi_class.h 138;" d -BN_MP_TORADIX_C cyassl/ctaocrypt/mpi_class.h 406;" d -BN_MP_TORADIX_N_C cyassl/ctaocrypt/mpi_class.h 139;" d -BN_MP_TO_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 132;" d -BN_MP_TO_SIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 873;" d -BN_MP_TO_SIGNED_BIN_N_C cyassl/ctaocrypt/mpi_class.h 133;" d -BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 134;" d -BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 868;" d -BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_class.h 885;" d -BN_MP_TO_UNSIGNED_BIN_C cyassl/ctaocrypt/mpi_superclass.h 52;" d -BN_MP_TO_UNSIGNED_BIN_N_C cyassl/ctaocrypt/mpi_class.h 135;" d -BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 140;" d -BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 817;" d -BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_class.h 884;" d -BN_MP_UNSIGNED_BIN_SIZE_C cyassl/ctaocrypt/mpi_superclass.h 51;" d -BN_MP_XOR_C cyassl/ctaocrypt/mpi_class.h 141;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 142;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 199;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 268;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 297;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 397;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 412;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 546;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 704;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 710;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 724;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 800;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 804;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 808;" d -BN_MP_ZERO_C cyassl/ctaocrypt/mpi_class.h 837;" d -BN_PRIME_TAB_C cyassl/ctaocrypt/mpi_class.h 143;" d -BN_PRIME_TAB_C cyassl/ctaocrypt/mpi_superclass.h 56;" d -BN_REVERSE_C cyassl/ctaocrypt/mpi_class.h 144;" d -BN_REVERSE_C cyassl/ctaocrypt/mpi_superclass.h 55;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 145;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 208;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 517;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 753;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 764;" d -BN_S_MP_ADD_C cyassl/ctaocrypt/mpi_class.h 849;" d -BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 146;" d -BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_class.h 355;" d -BN_S_MP_EXPTMOD_C cyassl/ctaocrypt/mpi_superclass.h 78;" d -BN_S_MP_MUL_C cyassl/ctaocrypt/mpi_class.h 580;" d -BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 147;" d -BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 581;" d -BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_class.h 737;" d -BN_S_MP_MUL_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 89;" d -BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 148;" d -BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_class.h 734;" d -BN_S_MP_MUL_HIGH_DIGS_C cyassl/ctaocrypt/mpi_superclass.h 80;" d -BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 149;" d -BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_class.h 824;" d -BN_S_MP_SQR_C cyassl/ctaocrypt/mpi_superclass.h 90;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 150;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 180;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 210;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 331;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 418;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 561;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 570;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 744;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 755;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 766;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 775;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 782;" d -BN_S_MP_SUB_C cyassl/ctaocrypt/mpi_class.h 851;" d -BN_bin2bn cyassl/openssl/bn.h 88;" d -BN_bn2bin cyassl/openssl/bn.h 87;" d -BN_bn2dec cyassl/openssl/bn.h 106;" d -BN_clear_free cyassl/openssl/bn.h 76;" d -BN_cmp cyassl/openssl/bn.h 85;" d -BN_copy cyassl/openssl/bn.h 101;" d -BN_dec2bn cyassl/openssl/bn.h 105;" d -BN_dup cyassl/openssl/bn.h 100;" d -BN_free cyassl/openssl/bn.h 75;" d -BN_hex2bn cyassl/openssl/bn.h 98;" d -BN_is_bit_set cyassl/openssl/bn.h 97;" d -BN_is_odd cyassl/openssl/bn.h 83;" d -BN_is_one cyassl/openssl/bn.h 82;" d -BN_is_zero cyassl/openssl/bn.h 81;" d -BN_mask_bits cyassl/openssl/bn.h 94;" d -BN_mod cyassl/openssl/bn.h 90;" d -BN_new cyassl/openssl/bn.h 74;" d -BN_num_bits cyassl/openssl/bn.h 79;" d -BN_num_bytes cyassl/openssl/bn.h 78;" d -BN_rand cyassl/openssl/bn.h 96;" d -BN_set_word cyassl/openssl/bn.h 103;" d -BN_sub cyassl/openssl/bn.h 91;" d -BN_value_one cyassl/openssl/bn.h 92;" d -BSD_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 810;" d file: -BSD_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 13;" d -BSD_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 13;" d -BSD_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 13;" d -BSD_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 13;" d -BSD_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 13;" d -BSD_GETHOSTEN IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 831;" d file: -BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 34;" d -BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 34;" d -BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 34;" d -BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 34;" d -BSD_HOSTNAME_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 34;" d -BSD_NUMSOCKS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 815;" d file: -BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 18;" d -BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 18;" d -BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 18;" d -BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 18;" d -BSD_NUM_SOCKS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 18;" d -BSD_RCVTOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 827;" d file: -BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 30;" d -BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 30;" d -BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 30;" d -BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 30;" d -BSD_RECEIVE_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 30;" d -BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_BSD.h 24;" d -BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_BSD.h 24;" d -BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_BSD.h 24;" d -BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_BSD.h 24;" d -BSD_SERVER_SOCKS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_BSD.h 24;" d -BSD_SRVSOCKS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 821;" d file: -BUFFER_E cyassl/ctaocrypt/error-crypt.h /^ BUFFER_E = -132, \/* output buffer too small or input too large *\/$/;" e enum:__anon61 -BUFFER_ERROR cyassl/error-ssl.h /^ BUFFER_ERROR = -228, \/* malformed buffer input *\/$/;" e enum:CyaSSL_ErrorCodes -BUFFER_ERROR_STR cyassl/sniffer_error.h 87;" d -BUILD_AES cyassl/internal.h 389;" d -BUILD_AES cyassl/internal.h 390;" d -BUILD_AES cyassl/internal.h 418;" d -BUILD_AES cyassl/internal.h 419;" d -BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 213;" d -BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 251;" d -BUILD_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 273;" d -BUILD_AESGCM cyassl/internal.h 395;" d -BUILD_ARC4 cyassl/internal.h 379;" d -BUILD_ARC4 cyassl/internal.h 423;" d -BUILD_ARC4 cyassl/internal.h 424;" d -BUILD_DES3 cyassl/internal.h 383;" d -BUILD_DES3 cyassl/internal.h 411;" d -BUILD_DES3 cyassl/internal.h 412;" d -BUILD_HC128 cyassl/internal.h 401;" d -BUILD_MSG_ERROR cyassl/error-ssl.h /^ BUILD_MSG_ERROR = -220, \/* build message failure *\/$/;" e enum:CyaSSL_ErrorCodes -BUILD_RABBIT cyassl/internal.h 405;" d -BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 171;" d -BUILD_SSL_RSA_WITH_RC4_128_MD5 cyassl/internal.h 162;" d -BUILD_SSL_RSA_WITH_RC4_128_SHA cyassl/internal.h 159;" d -BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 282;" d -BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 286;" d -BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 289;" d -BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 283;" d -BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 cyassl/internal.h 287;" d -BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 291;" d -BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA cyassl/internal.h 219;" d -BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 cyassl/internal.h 223;" d -BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA cyassl/internal.h 220;" d -BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 cyassl/internal.h 224;" d -BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 371;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA cyassl/internal.h 307;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 318;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 cyassl/internal.h 350;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 341;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA cyassl/internal.h 308;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 327;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 cyassl/internal.h 351;" d -BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 345;" d -BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA cyassl/internal.h 361;" d -BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 367;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 301;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 315;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 333;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 302;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 324;" d -BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 336;" d -BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA cyassl/internal.h 357;" d -BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 372;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA cyassl/internal.h 310;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 319;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 342;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA cyassl/internal.h 311;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 328;" d -BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 346;" d -BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA cyassl/internal.h 362;" d -BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 368;" d -BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 303;" d -BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 316;" d -BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 334;" d -BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 304;" d -BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 cyassl/internal.h 325;" d -BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 337;" d -BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA cyassl/internal.h 358;" d -BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA cyassl/internal.h 173;" d -BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 183;" d -BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 184;" d -BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA cyassl/internal.h 165;" d -BUILD_TLS_PSK_WITH_AES_128_CBC_SHA cyassl/internal.h 232;" d -BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256 cyassl/internal.h 236;" d -BUILD_TLS_PSK_WITH_AES_128_CCM_8 cyassl/internal.h 238;" d -BUILD_TLS_PSK_WITH_AES_256_CBC_SHA cyassl/internal.h 233;" d -BUILD_TLS_PSK_WITH_AES_256_CCM_8 cyassl/internal.h 239;" d -BUILD_TLS_PSK_WITH_NULL_SHA cyassl/internal.h 255;" d -BUILD_TLS_PSK_WITH_NULL_SHA256 cyassl/internal.h 258;" d -BUILD_TLS_RSA_WITH_AES_128_CBC_B2B256 cyassl/internal.h 202;" d -BUILD_TLS_RSA_WITH_AES_128_CBC_SHA cyassl/internal.h 180;" d -BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256 cyassl/internal.h 188;" d -BUILD_TLS_RSA_WITH_AES_128_CCM_8 cyassl/internal.h 198;" d -BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256 cyassl/internal.h 192;" d -BUILD_TLS_RSA_WITH_AES_256_CBC_B2B256 cyassl/internal.h 203;" d -BUILD_TLS_RSA_WITH_AES_256_CBC_SHA cyassl/internal.h 181;" d -BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256 cyassl/internal.h 189;" d -BUILD_TLS_RSA_WITH_AES_256_CCM_8 cyassl/internal.h 199;" d -BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384 cyassl/internal.h 194;" d -BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA cyassl/internal.h 210;" d -BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 cyassl/internal.h 214;" d -BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA cyassl/internal.h 211;" d -BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 cyassl/internal.h 215;" d -BUILD_TLS_RSA_WITH_HC_128_B2B256 cyassl/internal.h 269;" d -BUILD_TLS_RSA_WITH_HC_128_MD5 cyassl/internal.h 264;" d -BUILD_TLS_RSA_WITH_HC_128_SHA cyassl/internal.h 266;" d -BUILD_TLS_RSA_WITH_NULL_SHA cyassl/internal.h 247;" d -BUILD_TLS_RSA_WITH_NULL_SHA256 cyassl/internal.h 250;" d -BUILD_TLS_RSA_WITH_RABBIT_SHA cyassl/internal.h 275;" d -BUILT_SOURCES Makefile /^BUILT_SOURCES = $/;" m -BYTE3_LEN cyassl/internal.h /^ BYTE3_LEN = 3, \/* up to 24 bit byte lengths *\/$/;" e enum:Misc -BackGround IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^static int BackGround = 0 ; \/* 1: background job is running *\/$/;" v file: -BackGround IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^static int BackGround = 0 ; \/* 1: background job is running *\/$/;" v file: -Base16_Decode ctaocrypt/src/coding.c /^int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f -Base64_Decode ctaocrypt/src/coding.c /^int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f -Base64_Encode ctaocrypt/src/coding.c /^int Base64_Encode(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f -Base64_EncodeEsc ctaocrypt/src/coding.c /^int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)$/;" f -Base_entry cyassl/ctaocrypt/asn.h /^struct Base_entry {$/;" s -Base_entry cyassl/ctaocrypt/asn.h /^typedef struct Base_entry Base_entry;$/;" t typeref:struct:Base_entry -Bcd2ToByte IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 38;" d file: -Bcd2ToByte IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 38;" d file: -BenchmarkBounds ctaocrypt/benchmark/benchmark.c /^enum BenchmarkBounds {$/;" g file: -Bf cyassl/ctaocrypt/ecc.h /^ const char* Bf; \/* fields B param (hex) *\/$/;" m struct:__anon72 -Blake2b cyassl/ctaocrypt/blake2.h /^typedef struct Blake2b {$/;" s -Blake2b cyassl/ctaocrypt/blake2.h /^} Blake2b;$/;" t typeref:struct:Blake2b -Blake2bFinal ctaocrypt/src/blake2b.c /^int Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz)$/;" f -Blake2bUpdate ctaocrypt/src/blake2b.c /^int Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz)$/;" f -Block_Sum cyassl/ctaocrypt/asn.h /^enum Block_Sum {$/;" g -BufferLoadCRL src/crl.c /^int BufferLoadCRL(CYASSL_CRL* crl, const byte* buff, long sz, int type)$/;" f -Buffers cyassl/internal.h /^typedef struct Buffers {$/;" s -Buffers cyassl/internal.h /^} Buffers;$/;" t typeref:struct:Buffers -BuildCertHashes src/internal.c /^static int BuildCertHashes(CYASSL* ssl, Hashes* hashes)$/;" f file: -BuildFinished src/internal.c /^static int BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: -BuildMD5 src/internal.c /^static void BuildMD5(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: -BuildMD5_CertVerify src/internal.c /^static void BuildMD5_CertVerify(CYASSL* ssl, byte* digest)$/;" f file: -BuildMessage src/internal.c /^static int BuildMessage(CYASSL* ssl, byte* output, const byte* input, int inSz,$/;" f file: -BuildSHA src/internal.c /^static void BuildSHA(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f file: -BuildSHA_CertVerify src/internal.c /^static void BuildSHA_CertVerify(CYASSL* ssl, byte* digest)$/;" f file: -BuildTlsFinished src/tls.c /^int BuildTlsFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)$/;" f -BulkCipherAlgorithm cyassl/ssl.h /^enum BulkCipherAlgorithm { $/;" g -BytePrecision ctaocrypt/src/asn.c /^static word32 BytePrecision(word32 value)$/;" f file: -ByteReverseWord32 ctaocrypt/src/misc.c /^STATIC INLINE word32 ByteReverseWord32(word32 value)$/;" f -ByteReverseWord64 ctaocrypt/src/misc.c /^STATIC INLINE word64 ByteReverseWord64(word64 value)$/;" f -ByteReverseWords ctaocrypt/src/misc.c /^STATIC INLINE void ByteReverseWords(word32* out, const word32* in,$/;" f -ByteReverseWords64 ctaocrypt/src/misc.c /^STATIC INLINE void ByteReverseWords64(word64* out, const word64* in,$/;" f -ByteToBcd2 IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static uint32_t ByteToBcd2(uint8_t Value)$/;" f file: -ByteToBcd2 IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static uint32_t ByteToBcd2(uint8_t Value)$/;" f file: -C cyassl/ctaocrypt/md2.h /^ byte C[MD2_BLOCK_SIZE];$/;" m struct:Md2 -C cyassl/ctaocrypt/random.h /^ byte C[DBRG_SEED_LEN];$/;" m struct:RNG -CACHE_MATCH_ERROR cyassl/error-ssl.h /^ CACHE_MATCH_ERROR = -280, \/* chache hdr match error *\/$/;" e enum:CyaSSL_ErrorCodes -CAMELLIA_128_KEY_SIZE cyassl/internal.h /^ CAMELLIA_128_KEY_SIZE = 16, \/* for 128 bit *\/$/;" e enum:Misc -CAMELLIA_192_KEY_SIZE cyassl/internal.h /^ CAMELLIA_192_KEY_SIZE = 24, \/* for 192 bit *\/$/;" e enum:Misc -CAMELLIA_256_KEY_SIZE cyassl/internal.h /^ CAMELLIA_256_KEY_SIZE = 32, \/* for 256 bit *\/$/;" e enum:Misc -CAMELLIA_BLOCK_SIZE cyassl/ctaocrypt/camellia.h /^ CAMELLIA_BLOCK_SIZE = 16$/;" e enum:__anon58 -CAMELLIA_F ctaocrypt/src/camellia.c 153;" d file: -CAMELLIA_FLS ctaocrypt/src/camellia.c 177;" d file: -CAMELLIA_IV_SIZE cyassl/internal.h /^ CAMELLIA_IV_SIZE = 16, \/* always block size *\/$/;" e enum:Misc -CAMELLIA_RL1 ctaocrypt/src/camellia.c 125;" d file: -CAMELLIA_RL8 ctaocrypt/src/camellia.c 127;" d file: -CAMELLIA_ROLDQ ctaocrypt/src/camellia.c 129;" d file: -CAMELLIA_ROLDQo32 ctaocrypt/src/camellia.c 138;" d file: -CAMELLIA_ROUNDSM ctaocrypt/src/camellia.c 194;" d file: -CAMELLIA_RR8 ctaocrypt/src/camellia.c 123;" d file: -CAMELLIA_SIGMA1L ctaocrypt/src/camellia.c 79;" d file: -CAMELLIA_SIGMA1R ctaocrypt/src/camellia.c 80;" d file: -CAMELLIA_SIGMA2L ctaocrypt/src/camellia.c 81;" d file: -CAMELLIA_SIGMA2R ctaocrypt/src/camellia.c 82;" d file: -CAMELLIA_SIGMA3L ctaocrypt/src/camellia.c 83;" d file: -CAMELLIA_SIGMA3R ctaocrypt/src/camellia.c 84;" d file: -CAMELLIA_SIGMA4L ctaocrypt/src/camellia.c 85;" d file: -CAMELLIA_SIGMA4R ctaocrypt/src/camellia.c 86;" d file: -CAMELLIA_SIGMA5L ctaocrypt/src/camellia.c 87;" d file: -CAMELLIA_SIGMA5R ctaocrypt/src/camellia.c 88;" d file: -CAMELLIA_SIGMA6L ctaocrypt/src/camellia.c 89;" d file: -CAMELLIA_SIGMA6R ctaocrypt/src/camellia.c 90;" d file: -CAMELLIA_SP0222 ctaocrypt/src/camellia.c 149;" d file: -CAMELLIA_SP1110 ctaocrypt/src/camellia.c 148;" d file: -CAMELLIA_SP3033 ctaocrypt/src/camellia.c 150;" d file: -CAMELLIA_SP4404 ctaocrypt/src/camellia.c 151;" d file: -CAMELLIA_TABLE_BYTE_LEN cyassl/ctaocrypt/camellia.h 66;" d -CAMELLIA_TABLE_WORD_LEN cyassl/ctaocrypt/camellia.h 67;" d -CAM_CBC_DEC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: -CAM_CBC_DEC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: -CAM_CBC_DEC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: -CAM_CBC_ENC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: -CAM_CBC_ENC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: -CAM_CBC_ENC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: -CAM_ECB_DEC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: -CAM_ECB_DEC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: -CAM_ECB_DEC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: -CAM_ECB_ENC IDE/MDK5-ARM/Projects/CryptTest/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon77 file: -CAM_ECB_ENC IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon80 file: -CAM_ECB_ENC ctaocrypt/test/test.c /^ CAM_ECB_ENC, CAM_ECB_DEC, CAM_CBC_ENC, CAM_CBC_DEC$/;" e enum:__anon8 file: -CAN0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CAN0_IRQHandler$/;" l -CAN1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CAN1_IRQHandler$/;" l -CAN1_RX0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX0_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_RX1_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_SCE_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN1_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN1_TX_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX0_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_RX1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_RX1_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_SCE_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_SCE_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CAN2_TX_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CAN2_TX_IRQHandler $/;" l -CARRY_FORWARD ctaocrypt/src/asm.c 1007;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 507;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 577;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 647;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 732;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 799;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 867;" d file: -CARRY_FORWARD ctaocrypt/src/asm.c 937;" d file: -CAVIUM_INIT_E cyassl/ctaocrypt/error-crypt.h /^ CAVIUM_INIT_E = -182, \/* Cavium Init type error *\/$/;" e enum:__anon61 -CA_ISSUER_OID cyassl/ctaocrypt/asn.h /^ CA_ISSUER_OID = 117,$/;" e enum:Extensions_Sum -CA_TABLE_SIZE cyassl/internal.h 1070;" d -CA_TRUE_E cyassl/ctaocrypt/error-crypt.h /^ CA_TRUE_E = -138, \/* setting CA basic constraint true error *\/$/;" e enum:__anon61 -CA_TYPE cyassl/ctaocrypt/asn_public.h /^ CA_TYPE,$/;" e enum:CertType -CBIOCookie cyassl/internal.h /^ CallbackGenCookie CBIOCookie; \/* gen cookie callback *\/$/;" m struct:CYASSL_CTX -CBIORecv cyassl/internal.h /^ CallbackIORecv CBIORecv;$/;" m struct:CYASSL_CTX -CBIOSend cyassl/internal.h /^ CallbackIOSend CBIOSend;$/;" m struct:CYASSL_CTX -CC Makefile /^CC = clang$/;" m -CCADMIN mcapi/ctaocrypt_mcapi.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mcapi/ctaocrypt_test.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mcapi/cyassl.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mcapi/zlib.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mplabx/ctaocrypt_benchmark.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mplabx/ctaocrypt_test.X/Makefile /^CCADMIN=CCadmin$/;" m -CCADMIN mplabx/cyassl.X/Makefile /^CCADMIN=CCadmin$/;" m -CCAS Makefile /^CCAS = clang$/;" m -CCASCOMPILE Makefile /^CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)$/;" m -CCASDEPMODE Makefile /^CCASDEPMODE = depmode=gcc3$/;" m -CCASFLAGS Makefile /^CCASFLAGS = -g -O2$/;" m -CCDEPMODE Makefile /^CCDEPMODE = depmode=gcc3$/;" m -CCLD Makefile /^CCLD = $(CC)$/;" m -CERTREQ_TYPE cyassl/ctaocrypt/asn_public.h /^ CERTREQ_TYPE$/;" e enum:CertType -CERT_GOOD cyassl/ctaocrypt/asn.h /^ CERT_GOOD = 0,$/;" e enum:Ocsp_Cert_Status -CERT_HEADER_SZ cyassl/internal.h /^ CERT_HEADER_SZ = 3, \/* always 3 bytes *\/$/;" e enum:Misc -CERT_MIN_SIZE cyassl/internal.h /^ CERT_MIN_SIZE = 256, \/* min PEM cert size with header\/footer *\/$/;" e enum:Misc -CERT_POLICY_OID cyassl/ctaocrypt/asn.h /^ CERT_POLICY_OID = 146,$/;" e enum:Extensions_Sum -CERT_REQ_SENT cyassl/internal.h /^ CERT_REQ_SENT,$/;" e enum:AcceptState -CERT_REVOKED cyassl/ctaocrypt/asn.h /^ CERT_REVOKED = 1,$/;" e enum:Ocsp_Cert_Status -CERT_SENT cyassl/internal.h /^ CERT_SENT,$/;" e enum:AcceptState -CERT_TYPE cyassl/ctaocrypt/asn_public.h /^ CERT_TYPE = 0, $/;" e enum:CertType -CERT_UNKNOWN cyassl/ctaocrypt/asn.h /^ CERT_UNKNOWN = 2$/;" e enum:Ocsp_Cert_Status -CEscape ctaocrypt/src/coding.c /^static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max,$/;" f file: -CFLAGS Makefile /^CFLAGS = -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE $/;" m -CFLAG_VISIBILITY Makefile /^CFLAG_VISIBILITY = -fvisibility=hidden$/;" m -CHANGE_CIPHER_SENT cyassl/internal.h /^ CHANGE_CIPHER_SENT,$/;" e enum:AcceptState -CLEANFILES Makefile /^CLEANFILES = $/;" m -CLEAR_CARRY ctaocrypt/src/asm.c 498;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 568;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 638;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 723;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 790;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 858;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 928;" d file: -CLEAR_CARRY ctaocrypt/src/asm.c 998;" d file: -CLIENT_DEFAULT_VERSION cyassl/test.h 142;" d -CLIENT_DTLS_DEFAULT_VERSION cyassl/test.h 143;" d -CLIENT_FINISHED_COMPLETE cyassl/internal.h /^ CLIENT_FINISHED_COMPLETE,$/;" e enum:states -CLIENT_HELLO_COMPLETE cyassl/internal.h /^ CLIENT_HELLO_COMPLETE,$/;" e enum:states -CLIENT_HELLO_FIRST cyassl/internal.h /^ CLIENT_HELLO_FIRST = 35, \/* Protocol + RAN_LEN + sizeof(id_len) *\/$/;" e enum:Misc -CLIENT_HELLO_INPUT_STR cyassl/sniffer_error.h 42;" d -CLIENT_HELLO_SENT cyassl/internal.h /^ CLIENT_HELLO_SENT,$/;" e enum:ConnectState -CLIENT_ID_ERROR cyassl/error-ssl.h /^ CLIENT_ID_ERROR = -231, \/* psk client identity error *\/$/;" e enum:CyaSSL_ErrorCodes -CLIENT_INVALID_VERSION cyassl/test.h 144;" d -CLIENT_KEYEXCHANGE_COMPLETE cyassl/internal.h /^ CLIENT_KEYEXCHANGE_COMPLETE,$/;" e enum:states -CLIENT_RESUME_TRY_STR cyassl/sniffer_error.h 43;" d -CLOCK ctaocrypt/benchmark/benchmark.c 1169;" d file: -CLOCK ctaocrypt/benchmark/benchmark.c 1172;" d file: -CMSIS_NMUTEX ctaocrypt/src/port.c 359;" d file: -CMSIS_mutex ctaocrypt/src/port.c /^ static const osMutexDef_t *CMSIS_mutex[] = { osMutex(CyaSSL_mt0), $/;" v file: -CMSIS_mutexID ctaocrypt/src/port.c /^ static osMutexId CMSIS_mutexID[CMSIS_NMUTEX] = {0} ;$/;" v file: -CM_GetCertCacheMemSize src/ssl.c /^int CM_GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm)$/;" f -CM_MemRestoreCertCache src/ssl.c /^int CM_MemRestoreCertCache(CYASSL_CERT_MANAGER* cm, const void* mem, int sz)$/;" f -CM_MemSaveCertCache src/ssl.c /^int CM_MemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz, int* used)$/;" f -CM_RestoreCertCache src/ssl.c /^int CM_RestoreCertCache(CYASSL_CERT_MANAGER* cm, const char* fname)$/;" f -CM_SaveCertCache src/ssl.c /^int CM_SaveCertCache(CYASSL_CERT_MANAGER* cm, const char* fname)$/;" f -COMBA_CLEAR ctaocrypt/src/asm.c 1113;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1148;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1183;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1221;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1248;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1277;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1307;" d file: -COMBA_CLEAR ctaocrypt/src/asm.c 1334;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1010;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1129;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1164;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1199;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1233;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1260;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1289;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1319;" d file: -COMBA_FINI ctaocrypt/src/asm.c 1346;" d file: -COMBA_FINI ctaocrypt/src/asm.c 510;" d file: -COMBA_FINI ctaocrypt/src/asm.c 580;" d file: -COMBA_FINI ctaocrypt/src/asm.c 650;" d file: -COMBA_FINI ctaocrypt/src/asm.c 735;" d file: -COMBA_FINI ctaocrypt/src/asm.c 802;" d file: -COMBA_FINI ctaocrypt/src/asm.c 870;" d file: -COMBA_FINI ctaocrypt/src/asm.c 940;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1117;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1152;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1187;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1224;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1251;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1280;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1310;" d file: -COMBA_FORWARD ctaocrypt/src/asm.c 1337;" d file: -COMBA_START ctaocrypt/src/asm.c 1110;" d file: -COMBA_START ctaocrypt/src/asm.c 1145;" d file: -COMBA_START ctaocrypt/src/asm.c 1180;" d file: -COMBA_START ctaocrypt/src/asm.c 1219;" d file: -COMBA_START ctaocrypt/src/asm.c 1246;" d file: -COMBA_START ctaocrypt/src/asm.c 1275;" d file: -COMBA_START ctaocrypt/src/asm.c 1305;" d file: -COMBA_START ctaocrypt/src/asm.c 1332;" d file: -COMBA_START ctaocrypt/src/asm.c 496;" d file: -COMBA_START ctaocrypt/src/asm.c 566;" d file: -COMBA_START ctaocrypt/src/asm.c 636;" d file: -COMBA_START ctaocrypt/src/asm.c 721;" d file: -COMBA_START ctaocrypt/src/asm.c 788;" d file: -COMBA_START ctaocrypt/src/asm.c 856;" d file: -COMBA_START ctaocrypt/src/asm.c 926;" d file: -COMBA_START ctaocrypt/src/asm.c 996;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1001;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1121;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1156;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1191;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1227;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1254;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1283;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1313;" d file: -COMBA_STORE ctaocrypt/src/asm.c 1340;" d file: -COMBA_STORE ctaocrypt/src/asm.c 501;" d file: -COMBA_STORE ctaocrypt/src/asm.c 571;" d file: -COMBA_STORE ctaocrypt/src/asm.c 641;" d file: -COMBA_STORE ctaocrypt/src/asm.c 726;" d file: -COMBA_STORE ctaocrypt/src/asm.c 793;" d file: -COMBA_STORE ctaocrypt/src/asm.c 861;" d file: -COMBA_STORE ctaocrypt/src/asm.c 931;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1004;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1125;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1160;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1195;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1230;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1257;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1286;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1316;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 1343;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 504;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 574;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 644;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 729;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 796;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 864;" d file: -COMBA_STORE2 ctaocrypt/src/asm.c 934;" d file: -COMMAND_STACK_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 476;" d file: -COMMAND_STACK_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 504;" d file: -COMPILE Makefile /^COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \\$/;" m -COMPRESS_CONSTANT cyassl/internal.h /^ COMPRESS_CONSTANT = 13, \/* compression calc constant *\/$/;" e enum:Misc -COMPRESS_DUMMY_SIZE cyassl/internal.h /^ COMPRESS_DUMMY_SIZE = 64, \/* compression dummy round size *\/$/;" e enum:Misc -COMPRESS_E cyassl/ctaocrypt/error-crypt.h /^ COMPRESS_E = -184, \/* Compress error *\/$/;" e enum:__anon61 -COMPRESS_FIXED cyassl/ctaocrypt/compress.h 37;" d -COMPRESS_INIT_E cyassl/ctaocrypt/error-crypt.h /^ COMPRESS_INIT_E = -183, \/* Compress init error *\/$/;" e enum:__anon61 -COMPRESS_LOWER cyassl/internal.h /^ COMPRESS_LOWER = 64, \/* compression calc denominator *\/$/;" e enum:Misc -COMPRESS_UPPER cyassl/internal.h /^ COMPRESS_UPPER = 55, \/* compression calc numerator *\/$/;" e enum:Misc -COMP_EXTRA cyassl/internal.h 843;" d -COMP_EXTRA cyassl/internal.h 845;" d -COMP_LEN cyassl/internal.h /^ COMP_LEN = 1, \/* compression length *\/$/;" e enum:Misc -COMP_METHOD cyassl/openssl/ssl.h /^typedef CYASSL_COMP_METHOD COMP_METHOD;$/;" t -COMP_rle cyassl/openssl/ssl.h 218;" d -COMP_zlib cyassl/openssl/ssl.h 217;" d -CONFIG_CLEAN_FILES Makefile /^CONFIG_CLEAN_FILES = stamp-h cyassl\/version.h cyassl\/options.h \\$/;" m -CONFIG_CLEAN_VPATH_FILES Makefile /^CONFIG_CLEAN_VPATH_FILES =$/;" m -CONFIG_HEADER Makefile /^CONFIG_HEADER = config.h$/;" m -CONNECT_BEGIN cyassl/internal.h /^ CONNECT_BEGIN = 0,$/;" e enum:ConnectState -COOKIE_ERROR cyassl/error-ssl.h /^ COOKIE_ERROR = -269, \/* dtls cookie error *\/$/;" e enum:CyaSSL_ErrorCodes -COOKIE_SZ cyassl/internal.h /^ COOKIE_SZ = 20, \/* use a 20 byte cookie *\/$/;" e enum:Misc -COPY cyassl/internal.h /^ COPY = 1 \/* should we copy static buffer for write *\/$/;" e enum:Misc -CP mcapi/ctaocrypt_mcapi.X/Makefile /^CP=cp$/;" m -CP mcapi/ctaocrypt_test.X/Makefile /^CP=cp$/;" m -CP mcapi/cyassl.X/Makefile /^CP=cp$/;" m -CP mcapi/zlib.X/Makefile /^CP=cp$/;" m -CP mplabx/ctaocrypt_benchmark.X/Makefile /^CP=cp$/;" m -CP mplabx/ctaocrypt_test.X/Makefile /^CP=cp$/;" m -CP mplabx/cyassl.X/Makefile /^CP=cp$/;" m -CPP Makefile /^CPP = clang -E$/;" m -CPPFLAGS Makefile /^CPPFLAGS = -fvisibility=hidden$/;" m -CPU_CLK IDE/MDK-ARM/MDK-ARM/config/File_Config.c 43;" d file: -CP_ANY_OID cyassl/ctaocrypt/asn.h /^ CP_ANY_OID = 146 \/* id-ce 32 0 *\/$/;" e enum:CertificatePolicy_Sum -CRLDP_FULL_NAME ctaocrypt/src/asn.c 3348;" d file: -CRL_CERT_REVOKED cyassl/error-ssl.h /^ CRL_CERT_REVOKED = -261, \/* CRL Certificate revoked *\/$/;" e enum:CyaSSL_ErrorCodes -CRL_CallBack cyassl/test.h /^static INLINE void CRL_CallBack(const char* url)$/;" f -CRL_DIGEST_SIZE cyassl/internal.h 1015;" d -CRL_DIGEST_SIZE cyassl/internal.h 1017;" d -CRL_DIST_OID cyassl/ctaocrypt/asn.h /^ CRL_DIST_OID = 145,$/;" e enum:Extensions_Sum -CRL_EXTENSIONS cyassl/ctaocrypt/asn.h /^ CRL_EXTENSIONS = 0xa0,$/;" e enum:ASN_Tags -CRL_Entry cyassl/internal.h /^struct CRL_Entry {$/;" s -CRL_Entry cyassl/internal.h /^typedef struct CRL_Entry CRL_Entry;$/;" t typeref:struct:CRL_Entry -CRL_MISSING cyassl/error-ssl.h /^ CRL_MISSING = -262, \/* CRL Not loaded *\/$/;" e enum:CyaSSL_ErrorCodes -CRL_Monitor cyassl/internal.h /^struct CRL_Monitor {$/;" s -CRL_Monitor cyassl/internal.h /^typedef struct CRL_Monitor CRL_Monitor;$/;" t typeref:struct:CRL_Monitor -CRL_TYPE cyassl/ctaocrypt/asn_public.h /^ CRL_TYPE,$/;" e enum:CertType -CRP_Key IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^CRP_Key DCD 0xFFFFFFFF$/;" l -CRYPTGEN_E cyassl/ctaocrypt/error-crypt.h /^ CRYPTGEN_E = -104, \/* windows crypt generation error *\/$/;" e enum:__anon61 -CRYPTO_LOCK cyassl/ssl.h /^ CRYPTO_LOCK = 1,$/;" e enum:__anon19 -CRYPTO_NUM_LOCKS cyassl/ssl.h /^ CRYPTO_NUM_LOCKS = 10$/;" e enum:__anon19 -CRYPTO_cleanup_all_ex_data cyassl/openssl/ssl.h 341;" d -CRYPTO_dynlock_value cyassl/openssl/ssl.h /^typedef CYASSL_dynlock_value CRYPTO_dynlock_value;$/;" t -CRYPTO_num_locks cyassl/openssl/ssl.h 228;" d -CRYPTO_set_dynlock_create_callback cyassl/openssl/ssl.h 225;" d -CRYPTO_set_dynlock_destroy_callback cyassl/openssl/ssl.h 227;" d -CRYPTO_set_dynlock_lock_callback cyassl/openssl/ssl.h 226;" d -CRYPTO_set_id_callback cyassl/openssl/ssl.h 223;" d -CRYPTO_set_locking_callback cyassl/openssl/ssl.h 224;" d -CRYPT_AES_BLOCK_SIZE mcapi/crypto.h /^ CRYPT_AES_BLOCK_SIZE = 16$/;" e enum:__anon91 -CRYPT_AES_CBC_Decrypt mcapi/crypto.c /^int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f -CRYPT_AES_CBC_Encrypt mcapi/crypto.c /^int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f -CRYPT_AES_CTR_Encrypt mcapi/crypto.c /^int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f -CRYPT_AES_CTX mcapi/crypto.h /^typedef struct CRYPT_AES_CTX {$/;" s -CRYPT_AES_CTX mcapi/crypto.h /^} CRYPT_AES_CTX;$/;" t typeref:struct:CRYPT_AES_CTX -CRYPT_AES_DECRYPTION mcapi/crypto.h /^ CRYPT_AES_DECRYPTION = 1,$/;" e enum:__anon91 -CRYPT_AES_DIRECT_Decrypt mcapi/crypto.c /^int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f -CRYPT_AES_DIRECT_Encrypt mcapi/crypto.c /^int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,$/;" f -CRYPT_AES_ENCRYPTION mcapi/crypto.h /^ CRYPT_AES_ENCRYPTION = 0,$/;" e enum:__anon91 -CRYPT_AES_IvSet mcapi/crypto.c /^int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv)$/;" f -CRYPT_AES_KeySet mcapi/crypto.c /^int CRYPT_AES_KeySet(CRYPT_AES_CTX* aes, const unsigned char* key,$/;" f -CRYPT_ECC_CTX mcapi/crypto.h /^typedef struct CRYPT_ECC_CTX {$/;" s -CRYPT_ECC_CTX mcapi/crypto.h /^} CRYPT_ECC_CTX;$/;" t typeref:struct:CRYPT_ECC_CTX -CRYPT_ECC_DHE_KeyMake mcapi/crypto.c /^int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, int keySz)$/;" f -CRYPT_ECC_DHE_SharedSecretMake mcapi/crypto.c /^int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX* priv, CRYPT_ECC_CTX* pub,$/;" f -CRYPT_ECC_DSA_HashSign mcapi/crypto.c /^int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng,$/;" f -CRYPT_ECC_DSA_HashVerify mcapi/crypto.c /^int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX* ecc, const unsigned char* sig,$/;" f -CRYPT_ECC_Free mcapi/crypto.c /^int CRYPT_ECC_Free(CRYPT_ECC_CTX* ecc)$/;" f -CRYPT_ECC_Initialize mcapi/crypto.c /^int CRYPT_ECC_Initialize(CRYPT_ECC_CTX* ecc)$/;" f -CRYPT_ECC_KeySizeGet mcapi/crypto.c /^int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX* ecc)$/;" f -CRYPT_ECC_PrivateImport mcapi/crypto.c /^int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX* ecc, const unsigned char* priv,$/;" f -CRYPT_ECC_PublicExport mcapi/crypto.c /^int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX* ecc, unsigned char* out,$/;" f -CRYPT_ECC_PublicImport mcapi/crypto.c /^int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX* ecc, const unsigned char* in,$/;" f -CRYPT_ECC_SignatureSizeGet mcapi/crypto.c /^int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX* ecc)$/;" f -CRYPT_ERROR_StringGet mcapi/crypto.c /^int CRYPT_ERROR_StringGet(int err, char* str)$/;" f -CRYPT_HMAC_CTX mcapi/crypto.h /^typedef struct CRYPT_HMAC_CTX {$/;" s -CRYPT_HMAC_CTX mcapi/crypto.h /^} CRYPT_HMAC_CTX;$/;" t typeref:struct:CRYPT_HMAC_CTX -CRYPT_HMAC_DataAdd mcapi/crypto.c /^int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX* hmac, const unsigned char* input,$/;" f -CRYPT_HMAC_Finalize mcapi/crypto.c /^int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX* hmac, unsigned char* digest)$/;" f -CRYPT_HMAC_SHA mcapi/crypto.h /^ CRYPT_HMAC_SHA = 1, $/;" e enum:__anon88 -CRYPT_HMAC_SHA256 mcapi/crypto.h /^ CRYPT_HMAC_SHA256 = 2, $/;" e enum:__anon88 -CRYPT_HMAC_SHA384 mcapi/crypto.h /^ CRYPT_HMAC_SHA384 = 5, $/;" e enum:__anon88 -CRYPT_HMAC_SHA512 mcapi/crypto.h /^ CRYPT_HMAC_SHA512 = 4 $/;" e enum:__anon88 -CRYPT_HMAC_SetKey mcapi/crypto.c /^int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX* hmac, int type, const unsigned char* key,$/;" f -CRYPT_HUFFMAN_COMPRESS_STATIC mcapi/crypto.h /^ CRYPT_HUFFMAN_COMPRESS_STATIC = 1 $/;" e enum:__anon89 -CRYPT_HUFFMAN_Compress mcapi/crypto.c /^int CRYPT_HUFFMAN_Compress(unsigned char* out, unsigned int outSz,$/;" f -CRYPT_HUFFMAN_DeCompress mcapi/crypto.c /^int CRYPT_HUFFMAN_DeCompress(unsigned char* out, unsigned int outSz,$/;" f -CRYPT_MD5_CTX mcapi/crypto.h /^typedef struct CRYPT_MD5_CTX {$/;" s -CRYPT_MD5_CTX mcapi/crypto.h /^} CRYPT_MD5_CTX;$/;" t typeref:struct:CRYPT_MD5_CTX -CRYPT_MD5_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_MD5_DIGEST_SIZE = 16 $/;" e enum:__anon83 -CRYPT_MD5_DataAdd mcapi/crypto.c /^int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX* md5, const unsigned char* input,$/;" f -CRYPT_MD5_Finalize mcapi/crypto.c /^int CRYPT_MD5_Finalize(CRYPT_MD5_CTX* md5, unsigned char* digest)$/;" f -CRYPT_MD5_Initialize mcapi/crypto.c /^int CRYPT_MD5_Initialize(CRYPT_MD5_CTX* md5)$/;" f -CRYPT_RNG_BlockGenerate mcapi/crypto.c /^int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b,$/;" f -CRYPT_RNG_CTX mcapi/crypto.h /^typedef struct CRYPT_RNG_CTX {$/;" s -CRYPT_RNG_CTX mcapi/crypto.h /^} CRYPT_RNG_CTX;$/;" t typeref:struct:CRYPT_RNG_CTX -CRYPT_RNG_Get mcapi/crypto.c /^int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b)$/;" f -CRYPT_RNG_Initialize mcapi/crypto.c /^int CRYPT_RNG_Initialize(CRYPT_RNG_CTX* rng)$/;" f -CRYPT_RSA_CTX mcapi/crypto.h /^typedef struct CRYPT_RSA_CTX {$/;" s -CRYPT_RSA_CTX mcapi/crypto.h /^} CRYPT_RSA_CTX;$/;" t typeref:struct:CRYPT_RSA_CTX -CRYPT_RSA_EncryptSizeGet mcapi/crypto.c /^int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX* rsa) $/;" f -CRYPT_RSA_Free mcapi/crypto.c /^int CRYPT_RSA_Free(CRYPT_RSA_CTX* rsa)$/;" f -CRYPT_RSA_Initialize mcapi/crypto.c /^int CRYPT_RSA_Initialize(CRYPT_RSA_CTX* rsa)$/;" f -CRYPT_RSA_PrivateDecrypt mcapi/crypto.c /^int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,$/;" f -CRYPT_RSA_PrivateKeyDecode mcapi/crypto.c /^int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,$/;" f -CRYPT_RSA_PublicEncrypt mcapi/crypto.c /^int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,$/;" f -CRYPT_RSA_PublicKeyDecode mcapi/crypto.c /^int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,$/;" f -CRYPT_SHA256_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA256_CTX {$/;" s -CRYPT_SHA256_CTX mcapi/crypto.h /^} CRYPT_SHA256_CTX;$/;" t typeref:struct:CRYPT_SHA256_CTX -CRYPT_SHA256_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA256_DIGEST_SIZE = 32 $/;" e enum:__anon85 -CRYPT_SHA256_DataAdd mcapi/crypto.c /^int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX* sha256, const unsigned char* input,$/;" f -CRYPT_SHA256_Finalize mcapi/crypto.c /^int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX* sha256, unsigned char* digest)$/;" f -CRYPT_SHA256_Initialize mcapi/crypto.c /^int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX* sha256)$/;" f -CRYPT_SHA384_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA384_CTX {$/;" s -CRYPT_SHA384_CTX mcapi/crypto.h /^} CRYPT_SHA384_CTX;$/;" t typeref:struct:CRYPT_SHA384_CTX -CRYPT_SHA384_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA384_DIGEST_SIZE = 48$/;" e enum:__anon86 -CRYPT_SHA384_DataAdd mcapi/crypto.c /^int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX* sha384, const unsigned char* input,$/;" f -CRYPT_SHA384_Finalize mcapi/crypto.c /^int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX* sha384, unsigned char* digest)$/;" f -CRYPT_SHA384_Initialize mcapi/crypto.c /^int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX* sha384)$/;" f -CRYPT_SHA512_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA512_CTX {$/;" s -CRYPT_SHA512_CTX mcapi/crypto.h /^} CRYPT_SHA512_CTX;$/;" t typeref:struct:CRYPT_SHA512_CTX -CRYPT_SHA512_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA512_DIGEST_SIZE = 64 $/;" e enum:__anon87 -CRYPT_SHA512_DataAdd mcapi/crypto.c /^int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX* sha512, const unsigned char* input,$/;" f -CRYPT_SHA512_Finalize mcapi/crypto.c /^int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX* sha512, unsigned char* digest)$/;" f -CRYPT_SHA512_Initialize mcapi/crypto.c /^int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX* sha512)$/;" f -CRYPT_SHA_CTX mcapi/crypto.h /^typedef struct CRYPT_SHA_CTX {$/;" s -CRYPT_SHA_CTX mcapi/crypto.h /^} CRYPT_SHA_CTX;$/;" t typeref:struct:CRYPT_SHA_CTX -CRYPT_SHA_DIGEST_SIZE mcapi/crypto.h /^ CRYPT_SHA_DIGEST_SIZE = 20$/;" e enum:__anon84 -CRYPT_SHA_DataAdd mcapi/crypto.c /^int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX* sha, const unsigned char* input,$/;" f -CRYPT_SHA_Finalize mcapi/crypto.c /^int CRYPT_SHA_Finalize(CRYPT_SHA_CTX* sha, unsigned char* digest)$/;" f -CRYPT_SHA_Initialize mcapi/crypto.c /^int CRYPT_SHA_Initialize(CRYPT_SHA_CTX* sha)$/;" f -CRYPT_TDES_CBC_Decrypt mcapi/crypto.c /^int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,$/;" f -CRYPT_TDES_CBC_Encrypt mcapi/crypto.c /^int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,$/;" f -CRYPT_TDES_CTX mcapi/crypto.h /^typedef struct CRYPT_TDES_CTX {$/;" s -CRYPT_TDES_CTX mcapi/crypto.h /^} CRYPT_TDES_CTX;$/;" t typeref:struct:CRYPT_TDES_CTX -CRYPT_TDES_DECRYPTION mcapi/crypto.h /^ CRYPT_TDES_DECRYPTION = 1 $/;" e enum:__anon90 -CRYPT_TDES_ENCRYPTION mcapi/crypto.h /^ CRYPT_TDES_ENCRYPTION = 0,$/;" e enum:__anon90 -CRYPT_TDES_IvSet mcapi/crypto.c /^int CRYPT_TDES_IvSet(CRYPT_TDES_CTX* tdes, const unsigned char* iv)$/;" f -CRYPT_TDES_KeySet mcapi/crypto.c /^int CRYPT_TDES_KeySet(CRYPT_TDES_CTX* tdes, const unsigned char* key,$/;" f -CRYP_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CRYP_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^CRYP_IRQHandler $/;" l -CR_DBP_BB IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 47;" d file: -CR_DBP_BB IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 47;" d file: -CR_OFFSET IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 45;" d file: -CR_OFFSET IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 45;" d file: -CSCOPE Makefile /^CSCOPE = cscope$/;" m -CTAGS Makefile /^CTAGS = ctags$/;" m -CTAOCRYPT_BLAKE2_H cyassl/ctaocrypt/blake2.h 26;" d -CTAOCRYPT_BLAKE2_IMPL_H cyassl/ctaocrypt/blake2-impl.h 36;" d -CTAOCRYPT_BLAKE2_INT_H cyassl/ctaocrypt/blake2-int.h 37;" d -CTAOCRYPT_SLOW_WORD64 cyassl/ctaocrypt/types.h 95;" d -CTAO_CRYPT_AES_H cyassl/ctaocrypt/aes.h 26;" d -CTAO_CRYPT_ARC4_H cyassl/ctaocrypt/arc4.h 24;" d -CTAO_CRYPT_ASN_H cyassl/ctaocrypt/asn.h 25;" d -CTAO_CRYPT_ASN_PUBLIC_H cyassl/ctaocrypt/asn_public.h 24;" d -CTAO_CRYPT_CAMELLIA_H cyassl/ctaocrypt/camellia.h 52;" d -CTAO_CRYPT_CODING_H cyassl/ctaocrypt/coding.h 24;" d -CTAO_CRYPT_COMPRESS_H cyassl/ctaocrypt/compress.h 26;" d -CTAO_CRYPT_DES3_H cyassl/ctaocrypt/des3.h 26;" d -CTAO_CRYPT_DH_H cyassl/ctaocrypt/dh.h 26;" d -CTAO_CRYPT_DSA_H cyassl/ctaocrypt/dsa.h 26;" d -CTAO_CRYPT_ECC_H cyassl/ctaocrypt/ecc.h 25;" d -CTAO_CRYPT_ERROR_H cyassl/ctaocrypt/error-crypt.h 24;" d -CTAO_CRYPT_FIPS_TEST_H cyassl/ctaocrypt/fips_test.h 24;" d -CTAO_CRYPT_HC128_H cyassl/ctaocrypt/hc128.h 26;" d -CTAO_CRYPT_HMAC_H cyassl/ctaocrypt/hmac.h 26;" d -CTAO_CRYPT_INTEGER_H cyassl/ctaocrypt/integer.h 29;" d -CTAO_CRYPT_MD2_H cyassl/ctaocrypt/md2.h 26;" d -CTAO_CRYPT_MD4_H cyassl/ctaocrypt/md4.h 26;" d -CTAO_CRYPT_MD5_H cyassl/ctaocrypt/md5.h 25;" d -CTAO_CRYPT_MISC_H cyassl/ctaocrypt/misc.h 24;" d -CTAO_CRYPT_PKCS7_H cyassl/ctaocrypt/pkcs7.h 26;" d -CTAO_CRYPT_PORT_H cyassl/ctaocrypt/port.h 24;" d -CTAO_CRYPT_PWDBASED_H cyassl/ctaocrypt/pwdbased.h 26;" d -CTAO_CRYPT_RABBIT_H cyassl/ctaocrypt/rabbit.h 26;" d -CTAO_CRYPT_RANDOM_H cyassl/ctaocrypt/random.h 24;" d -CTAO_CRYPT_RIPEME_H cyassl/ctaocrypt/ripemd.h 26;" d -CTAO_CRYPT_RSA_H cyassl/ctaocrypt/rsa.h 25;" d -CTAO_CRYPT_SETTINGS_H cyassl/ctaocrypt/settings.h 27;" d -CTAO_CRYPT_SHA256_H cyassl/ctaocrypt/sha256.h 29;" d -CTAO_CRYPT_SHA512_H cyassl/ctaocrypt/sha512.h 26;" d -CTAO_CRYPT_SHA_H cyassl/ctaocrypt/sha.h 26;" d -CTAO_CRYPT_TFM_H cyassl/ctaocrypt/tfm.h 36;" d -CTAO_CRYPT_TYPES_H cyassl/ctaocrypt/types.h 24;" d -CTAO_CRYPT_VISIBILITY_H cyassl/ctaocrypt/visibility.h 26;" d -CTC_DATE_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_DATE_SIZE = 32,$/;" e enum:Ctc_Misc -CTC_MAX_ALT_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_MAX_ALT_SIZE = 8192, \/* may be huge *\/$/;" e enum:Ctc_Misc -CTC_MD2wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_MD2wRSA = 646,$/;" e enum:Ctc_SigType -CTC_MD5wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_MD5wRSA = 648,$/;" e enum:Ctc_SigType -CTC_NAME_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_NAME_SIZE = 64,$/;" e enum:Ctc_Misc -CTC_SERIAL_SIZE cyassl/ctaocrypt/asn_public.h /^ CTC_SERIAL_SIZE = 8$/;" e enum:Ctc_Misc -CTC_SETTINGS cyassl/ctaocrypt/types.h /^ CTC_SETTINGS = 0x0$/;" e enum:__anon51 -CTC_SHA256wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA256wECDSA = 524,$/;" e enum:Ctc_SigType -CTC_SHA256wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA256wRSA = 655,$/;" e enum:Ctc_SigType -CTC_SHA384wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA384wECDSA = 525,$/;" e enum:Ctc_SigType -CTC_SHA384wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA384wRSA = 656,$/;" e enum:Ctc_SigType -CTC_SHA512wECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA512wECDSA = 526$/;" e enum:Ctc_SigType -CTC_SHA512wRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHA512wRSA = 657,$/;" e enum:Ctc_SigType -CTC_SHAwDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwDSA = 517,$/;" e enum:Ctc_SigType -CTC_SHAwECDSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwECDSA = 520,$/;" e enum:Ctc_SigType -CTC_SHAwRSA cyassl/ctaocrypt/asn_public.h /^ CTC_SHAwRSA = 649,$/;" e enum:Ctc_SigType -CTR_SZ ctaocrypt/src/aes.c /^ CTR_SZ = 4$/;" e enum:__anon1 file: -CTaoCryptErrorString ctaocrypt/src/error.c /^void CTaoCryptErrorString(int error, char* buffer)$/;" f -CURVE_LEN cyassl/internal.h /^ CURVE_LEN = 2, \/* ecc named curve length *\/$/;" e enum:Misc -CXX Makefile /^CXX = g++$/;" m -CXXCPP Makefile /^CXXCPP = g++ -E$/;" m -CXXDEPMODE Makefile /^CXXDEPMODE = depmode=gcc3$/;" m -CXXFLAGS Makefile /^CXXFLAGS = -g -O2$/;" m -CYASSL cyassl/internal.h /^struct CYASSL {$/;" s -CYASSL cyassl/ssl.h /^typedef struct CYASSL CYASSL; $/;" t typeref:struct:CYASSL -CYASSL_3DES_CAVIUM_MAGIC cyassl/ctaocrypt/des3.h 36;" d -CYASSL_AEAD_TYPE cyassl/ssl.h /^ CYASSL_AEAD_TYPE = 4,$/;" e enum:__anon23 -CYASSL_AES_CAVIUM_MAGIC cyassl/ctaocrypt/aes.h 61;" d -CYASSL_AES_COUNTER cyassl/ctaocrypt/settings.h 156;" d -CYASSL_ALERT cyassl/ssl.h /^typedef struct CYASSL_ALERT {$/;" s -CYASSL_ALERT cyassl/ssl.h /^} CYASSL_ALERT;$/;" t typeref:struct:CYASSL_ALERT -CYASSL_ALERT_HISTORY cyassl/ssl.h /^typedef struct CYASSL_ALERT_HISTORY {$/;" s -CYASSL_ALERT_HISTORY cyassl/ssl.h /^} CYASSL_ALERT_HISTORY;$/;" t typeref:struct:CYASSL_ALERT_HISTORY -CYASSL_API cyassl/ctaocrypt/visibility.h 37;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 40;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 44;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 46;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 50;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 56;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 58;" d -CYASSL_API cyassl/ctaocrypt/visibility.h 62;" d -CYASSL_ARC4_CAVIUM_MAGIC cyassl/ctaocrypt/arc4.h 35;" d -CYASSL_ASN1_INTEGER cyassl/ssl.h /^typedef struct CYASSL_ASN1_INTEGER CYASSL_ASN1_INTEGER;$/;" t typeref:struct:CYASSL_ASN1_INTEGER -CYASSL_ASN1_OBJECT cyassl/ssl.h /^typedef struct CYASSL_ASN1_OBJECT CYASSL_ASN1_OBJECT;$/;" t typeref:struct:CYASSL_ASN1_OBJECT -CYASSL_ASN1_STRING cyassl/ssl.h /^typedef struct CYASSL_ASN1_STRING CYASSL_ASN1_STRING;$/;" t typeref:struct:CYASSL_ASN1_STRING -CYASSL_ASN1_TIME cyassl/ssl.h /^typedef struct CYASSL_ASN1_TIME CYASSL_ASN1_TIME;$/;" t typeref:struct:CYASSL_ASN1_TIME -CYASSL_ASN1_UTCTIME cyassl/ssl.h 93;" d -CYASSL_BIGNUM cyassl/openssl/bn.h /^typedef struct CYASSL_BIGNUM {$/;" s -CYASSL_BIGNUM cyassl/openssl/bn.h /^} CYASSL_BIGNUM; $/;" t typeref:struct:CYASSL_BIGNUM -CYASSL_BIO cyassl/internal.h /^struct CYASSL_BIO {$/;" s -CYASSL_BIO cyassl/ssl.h /^typedef struct CYASSL_BIO CYASSL_BIO;$/;" t typeref:struct:CYASSL_BIO -CYASSL_BIO_H_ cyassl/openssl/bio.h 5;" d -CYASSL_BIO_METHOD cyassl/internal.h /^struct CYASSL_BIO_METHOD {$/;" s -CYASSL_BIO_METHOD cyassl/ssl.h /^typedef struct CYASSL_BIO_METHOD CYASSL_BIO_METHOD;$/;" t typeref:struct:CYASSL_BIO_METHOD -CYASSL_BIT_SIZE cyassl/ctaocrypt/types.h /^ CYASSL_BIT_SIZE = 8,$/;" e enum:__anon47 -CYASSL_BLOCK_TYPE cyassl/ssl.h /^ CYASSL_BLOCK_TYPE = 2,$/;" e enum:__anon23 -CYASSL_BN_CTX cyassl/openssl/bn.h /^typedef struct CYASSL_BN_CTX CYASSL_BN_CTX;$/;" t typeref:struct:CYASSL_BN_CTX -CYASSL_BN_H_ cyassl/openssl/bn.h 5;" d -CYASSL_CA cyassl/test.h /^ CYASSL_CA = 1,$/;" e enum:__anon32 -CYASSL_CACHE_CERT_VERSION src/ssl.c 3818;" d file: -CYASSL_CACHE_VERSION src/ssl.c 3508;" d file: -CYASSL_CALLBACKS cyassl/ctaocrypt/settings.h 566;" d -CYASSL_CALLBACKS cyassl/ctaocrypt/settings.h 568;" d -CYASSL_CALLBACKS_H cyassl/callbacks.h 24;" d -CYASSL_CBIO_ERR_CONN_CLOSE cyassl/ssl.h /^ CYASSL_CBIO_ERR_CONN_CLOSE = -5, \/* connection closed or epipe *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_CONN_RST cyassl/ssl.h /^ CYASSL_CBIO_ERR_CONN_RST = -3, \/* connection reset *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_GENERAL cyassl/ssl.h /^ CYASSL_CBIO_ERR_GENERAL = -1, \/* general unexpected err *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_ISR cyassl/ssl.h /^ CYASSL_CBIO_ERR_ISR = -4, \/* interrupt *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_TIMEOUT cyassl/ssl.h /^ CYASSL_CBIO_ERR_TIMEOUT = -6 \/* socket timeout *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_WANT_READ cyassl/ssl.h /^ CYASSL_CBIO_ERR_WANT_READ = -2, \/* need to call read again *\/$/;" e enum:IOerrors -CYASSL_CBIO_ERR_WANT_WRITE cyassl/ssl.h /^ CYASSL_CBIO_ERR_WANT_WRITE = -2, \/* need to call write again *\/$/;" e enum:IOerrors -CYASSL_CERT cyassl/test.h /^ CYASSL_CERT = 2,$/;" e enum:__anon32 -CYASSL_CERTS_TEST_H cyassl/certs_test.h 4;" d -CYASSL_CERT_DATA_H IDE/MDK-ARM/MDK-ARM/CyaSSL/cert_data.h 2;" d -CYASSL_CERT_DATA_H IDE/MDK5-ARM/MDK-ARM/CyaSSL/cert_data.h 2;" d -CYASSL_CERT_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 109;" d -CYASSL_CERT_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 132;" d -CYASSL_CERT_MANAGER cyassl/internal.h /^struct CYASSL_CERT_MANAGER {$/;" s -CYASSL_CERT_MANAGER cyassl/ssl.h /^typedef struct CYASSL_CERT_MANAGER CYASSL_CERT_MANAGER;$/;" t typeref:struct:CYASSL_CERT_MANAGER -CYASSL_CHAIN_CA cyassl/ssl.h /^ CYASSL_CHAIN_CA = 2 \/* added to cache from trusted chain *\/$/;" e enum:__anon22 -CYASSL_CIPHER cyassl/internal.h /^struct CYASSL_CIPHER {$/;" s -CYASSL_CIPHER cyassl/ssl.h /^typedef struct CYASSL_CIPHER CYASSL_CIPHER;$/;" t typeref:struct:CYASSL_CIPHER -CYASSL_CLIENT_END cyassl/ssl.h /^ CYASSL_CLIENT_END = 1,$/;" e enum:__anon23 -CYASSL_CMSIS_RTOS cyassl/ctaocrypt/settings.h 190;" d -CYASSL_COMP_METHOD cyassl/ssl.h /^typedef struct CYASSL_COMP_METHOD {$/;" s -CYASSL_COMP_METHOD cyassl/ssl.h /^} CYASSL_COMP_METHOD;$/;" t typeref:struct:CYASSL_COMP_METHOD -CYASSL_CRL cyassl/crl.h /^typedef struct CYASSL_CRL CYASSL_CRL;$/;" t typeref:struct:CYASSL_CRL -CYASSL_CRL cyassl/internal.h /^ typedef struct CYASSL_CRL CYASSL_CRL;$/;" t typeref:struct:CYASSL_CRL -CYASSL_CRL cyassl/internal.h /^struct CYASSL_CRL {$/;" s -CYASSL_CRL_CHECKALL cyassl/ssl.h /^ CYASSL_CRL_CHECKALL = 1,$/;" e enum:__anon19 -CYASSL_CRL_H cyassl/crl.h 24;" d -CYASSL_CRL_MONITOR cyassl/ssl.h 1268;" d -CYASSL_CRL_START_MON cyassl/ssl.h 1269;" d -CYASSL_CRYPTO_H_ cyassl/openssl/crypto.h 4;" d -CYASSL_CTX cyassl/internal.h /^struct CYASSL_CTX {$/;" s -CYASSL_CTX cyassl/ssl.h /^typedef struct CYASSL_CTX CYASSL_CTX;$/;" t typeref:struct:CYASSL_CTX -CYASSL_Cipher cyassl/openssl/evp.h /^} CYASSL_Cipher;$/;" t typeref:union:__anon35 -CYASSL_DEFAULT_CIPHER_LIST cyassl/ssl.h 524;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 31;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 121;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 32;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 144;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 32;" d -CYASSL_DER_LOAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 34;" d -CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 554;" d -CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 556;" d -CYASSL_DER_LOAD cyassl/ctaocrypt/settings.h 603;" d -CYASSL_DES_H_ cyassl/openssl/des.h 29;" d -CYASSL_DES_cblock cyassl/openssl/des.h /^typedef unsigned char CYASSL_DES_cblock[8];$/;" t -CYASSL_DES_key_schedule cyassl/openssl/des.h /^typedef CYASSL_DES_cblock CYASSL_DES_key_schedule;$/;" t -CYASSL_DH cyassl/openssl/dh.h /^typedef struct CYASSL_DH {$/;" s -CYASSL_DH cyassl/openssl/dh.h /^} CYASSL_DH;$/;" t typeref:struct:CYASSL_DH -CYASSL_DH_H_ cyassl/openssl/dh.h 5;" d -CYASSL_DSA cyassl/openssl/dsa.h /^struct CYASSL_DSA {$/;" s -CYASSL_DSA cyassl/ssl.h /^typedef struct CYASSL_DSA CYASSL_DSA;$/;" t typeref:struct:CYASSL_DSA -CYASSL_DSA_H_ cyassl/openssl/dsa.h 5;" d -CYASSL_DTLS cyassl/ctaocrypt/settings.h 560;" d -CYASSL_DTLS cyassl/ctaocrypt/settings.h 562;" d -CYASSL_DTLS_CTX cyassl/internal.h /^typedef struct CYASSL_DTLS_CTX {$/;" s -CYASSL_DTLS_CTX cyassl/internal.h /^} CYASSL_DTLS_CTX;$/;" t typeref:struct:CYASSL_DTLS_CTX -CYASSL_ECC_SECP160R1 cyassl/ssl.h /^ CYASSL_ECC_SECP160R1 = 0x10,$/;" e enum:__anon28 -CYASSL_ECC_SECP192R1 cyassl/ssl.h /^ CYASSL_ECC_SECP192R1 = 0x13,$/;" e enum:__anon28 -CYASSL_ECC_SECP224R1 cyassl/ssl.h /^ CYASSL_ECC_SECP224R1 = 0x15,$/;" e enum:__anon28 -CYASSL_ECC_SECP256R1 cyassl/ssl.h /^ CYASSL_ECC_SECP256R1 = 0x17,$/;" e enum:__anon28 -CYASSL_ECC_SECP384R1 cyassl/ssl.h /^ CYASSL_ECC_SECP384R1 = 0x18,$/;" e enum:__anon28 -CYASSL_ECC_SECP521R1 cyassl/ssl.h /^ CYASSL_ECC_SECP521R1 = 0x19$/;" e enum:__anon28 -CYASSL_ENTER ctaocrypt/src/logging.c /^void CYASSL_ENTER(const char* msg)$/;" f -CYASSL_ENTER cyassl/ctaocrypt/logging.h 58;" d -CYASSL_ERROR ctaocrypt/src/logging.c /^void CYASSL_ERROR(int error)$/;" f -CYASSL_ERROR cyassl/ctaocrypt/logging.h 61;" d -CYASSL_ERROR_H cyassl/error-ssl.h 24;" d -CYASSL_EVP_CIPHER cyassl/openssl/evp.h /^typedef char CYASSL_EVP_CIPHER;$/;" t -CYASSL_EVP_CIPHER_CTX cyassl/openssl/evp.h /^typedef struct CYASSL_EVP_CIPHER_CTX {$/;" s -CYASSL_EVP_CIPHER_CTX cyassl/openssl/evp.h /^} CYASSL_EVP_CIPHER_CTX;$/;" t typeref:struct:CYASSL_EVP_CIPHER_CTX -CYASSL_EVP_H_ cyassl/openssl/evp.h 29;" d -CYASSL_EVP_MD cyassl/openssl/evp.h /^typedef char CYASSL_EVP_MD;$/;" t -CYASSL_EVP_MD_CTX cyassl/openssl/evp.h /^typedef struct CYASSL_EVP_MD_CTX {$/;" s -CYASSL_EVP_MD_CTX cyassl/openssl/evp.h /^} CYASSL_EVP_MD_CTX;$/;" t typeref:struct:CYASSL_EVP_MD_CTX -CYASSL_EVP_PKEY cyassl/ssl.h /^typedef struct CYASSL_EVP_PKEY {$/;" s -CYASSL_EVP_PKEY cyassl/ssl.h /^} CYASSL_EVP_PKEY;$/;" t typeref:struct:CYASSL_EVP_PKEY -CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 644;" d -CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 646;" d -CYASSL_GENERAL_ALIGNMENT cyassl/ctaocrypt/settings.h 648;" d -CYASSL_HMAC_CAVIUM_MAGIC cyassl/ctaocrypt/hmac.h 60;" d -CYASSL_HMAC_CTX cyassl/openssl/hmac.h /^typedef struct CYASSL_HMAC_CTX {$/;" s -CYASSL_HMAC_CTX cyassl/openssl/hmac.h /^} CYASSL_HMAC_CTX;$/;" t typeref:struct:CYASSL_HMAC_CTX -CYASSL_HMAC_H_ cyassl/openssl/hmac.h 29;" d -CYASSL_Hasher cyassl/openssl/evp.h /^} CYASSL_Hasher;$/;" t typeref:union:__anon34 -CYASSL_INT_H cyassl/internal.h 24;" d -CYASSL_KEIL_RL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 26;" d -CYASSL_KEIL_RL_H IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 26;" d -CYASSL_KEIL_RL_H IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 26;" d -CYASSL_KEIL_TCP_NET IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 36;" d -CYASSL_KEY cyassl/test.h /^ CYASSL_KEY = 3$/;" e enum:__anon32 -CYASSL_KEY_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 115;" d -CYASSL_KEY_GEN IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 138;" d -CYASSL_LEANPSK cyassl/ctaocrypt/settings.h 199;" d -CYASSL_LEAVE ctaocrypt/src/logging.c /^void CYASSL_LEAVE(const char* msg, int ret)$/;" f -CYASSL_LEAVE cyassl/ctaocrypt/logging.h 59;" d -CYASSL_LIBRARY_VERSION Makefile /^CYASSL_LIBRARY_VERSION = 5:5:0$/;" m -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 38;" d -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 41;" d -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 48;" d -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 51;" d -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 60;" d -CYASSL_LOCAL cyassl/ctaocrypt/visibility.h 63;" d -CYASSL_LOGGING_H cyassl/ctaocrypt/logging.h 26;" d -CYASSL_LOW_MEMORY cyassl/ctaocrypt/settings.h 313;" d -CYASSL_LWIP cyassl/ctaocrypt/settings.h 131;" d -CYASSL_LWIP cyassl/ctaocrypt/settings.h 327;" d -CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 242;" d -CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 280;" d -CYASSL_MALLOC_CHECK IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 302;" d -CYASSL_MAX_16BIT cyassl/ctaocrypt/types.h 106;" d -CYASSL_MAX_ERROR_SZ cyassl/ctaocrypt/types.h /^ CYASSL_MAX_ERROR_SZ = 80$/;" e enum:__anon49 -CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 105;" d -CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 143;" d -CYASSL_MD2 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 165;" d -CYASSL_MD4_CTX cyassl/ssl.h /^typedef struct CYASSL_MD4_CTX {$/;" s -CYASSL_MD4_CTX cyassl/ssl.h /^} CYASSL_MD4_CTX;$/;" t typeref:struct:CYASSL_MD4_CTX -CYASSL_MD5_CTX cyassl/openssl/md5.h /^typedef struct CYASSL_MD5_CTX {$/;" s -CYASSL_MD5_CTX cyassl/openssl/md5.h /^} CYASSL_MD5_CTX;$/;" t typeref:struct:CYASSL_MD5_CTX -CYASSL_MD5_H_ cyassl/openssl/md5.h 5;" d -CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 26;" d -CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 26;" d -CYASSL_MDK_ARM IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 26;" d -CYASSL_MDK_ARM IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c 25;" d file: -CYASSL_MDK_ARM IDE/MDK5-ARM/Projects/SimpleClient/client.c 25;" d file: -CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 51;" d -CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 50;" d -CYASSL_MDK_SHELL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 46;" d -CYASSL_MEMORY_H cyassl/ctaocrypt/memory.h 26;" d -CYASSL_METHOD cyassl/internal.h /^struct CYASSL_METHOD {$/;" s -CYASSL_METHOD cyassl/ssl.h /^typedef struct CYASSL_METHOD CYASSL_METHOD;$/;" t typeref:struct:CYASSL_METHOD -CYASSL_MFL_2_10 cyassl/ssl.h /^ CYASSL_MFL_2_10 = 2, \/* 1024 bytes *\/$/;" e enum:__anon27 -CYASSL_MFL_2_11 cyassl/ssl.h /^ CYASSL_MFL_2_11 = 3, \/* 2048 bytes *\/$/;" e enum:__anon27 -CYASSL_MFL_2_12 cyassl/ssl.h /^ CYASSL_MFL_2_12 = 4, \/* 4096 bytes *\/$/;" e enum:__anon27 -CYASSL_MFL_2_13 cyassl/ssl.h /^ CYASSL_MFL_2_13 = 5 \/* 8192 bytes *\/\/* CyaSSL ONLY!!! *\/$/;" e enum:__anon27 -CYASSL_MFL_2_9 cyassl/ssl.h /^ CYASSL_MFL_2_9 = 1, \/* 512 bytes *\/$/;" e enum:__anon27 -CYASSL_MSG ctaocrypt/src/logging.c /^void CYASSL_MSG(const char* msg)$/;" f -CYASSL_MSG cyassl/ctaocrypt/logging.h 62;" d -CYASSL_OCSP cyassl/internal.h /^ typedef struct CYASSL_OCSP CYASSL_OCSP;$/;" t typeref:struct:CYASSL_OCSP -CYASSL_OCSP cyassl/internal.h /^struct CYASSL_OCSP {$/;" s -CYASSL_OCSP cyassl/ocsp.h /^typedef struct CYASSL_OCSP CYASSL_OCSP;$/;" t typeref:struct:CYASSL_OCSP -CYASSL_OCSP_H cyassl/ocsp.h 26;" d -CYASSL_OCSP_NO_NONCE cyassl/ssl.h /^ CYASSL_OCSP_NO_NONCE = 2,$/;" e enum:__anon19 -CYASSL_OCSP_URL_OVERRIDE cyassl/ssl.h /^ CYASSL_OCSP_URL_OVERRIDE = 1,$/;" e enum:__anon19 -CYASSL_OPENSSLV_H_ cyassl/openssl/opensslv.h 4;" d -CYASSL_OPENSSL_H_ cyassl/openssl/ssl.h 29;" d -CYASSL_PACK cyassl/internal.h 760;" d -CYASSL_PACK cyassl/internal.h 762;" d -CYASSL_PEM_H_ cyassl/openssl/pem.h 5;" d -CYASSL_PIC32MZ_CE cyassl/ctaocrypt/settings.h 151;" d -CYASSL_PIC32MZ_CRYPT cyassl/ctaocrypt/settings.h 152;" d -CYASSL_PIC32MZ_RNG cyassl/ctaocrypt/settings.h 154;" d -CYASSL_PTHREADS cyassl/ctaocrypt/port.h 67;" d -CYASSL_PTHREADS cyassl/internal.h 102;" d -CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 130;" d -CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 168;" d -CYASSL_RIPEMD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 190;" d -CYASSL_RIPEMD_CTX cyassl/openssl/ripemd.h /^typedef struct CYASSL_RIPEMD_CTX {$/;" s -CYASSL_RIPEMD_CTX cyassl/openssl/ripemd.h /^} CYASSL_RIPEMD_CTX;$/;" t typeref:struct:CYASSL_RIPEMD_CTX -CYASSL_RIPEMD_H_ cyassl/openssl/ripemd.h 5;" d -CYASSL_RNG_CAVIUM_MAGIC cyassl/ctaocrypt/random.h 69;" d -CYASSL_RSA cyassl/openssl/rsa.h /^struct CYASSL_RSA {$/;" s -CYASSL_RSA cyassl/ssl.h /^typedef struct CYASSL_RSA CYASSL_RSA;$/;" t typeref:struct:CYASSL_RSA -CYASSL_RSA_CAVIUM_MAGIC cyassl/ctaocrypt/rsa.h 35;" d -CYASSL_RSA_F4 cyassl/ssl.h 525;" d -CYASSL_RSA_H_ cyassl/openssl/rsa.h 5;" d -CYASSL_SAFERTOS cyassl/ctaocrypt/settings.h 329;" d -CYASSL_SEP cyassl/ctaocrypt/settings.h 588;" d -CYASSL_SERVER_END cyassl/ssl.h /^ CYASSL_SERVER_END = 0,$/;" e enum:__anon23 -CYASSL_SESSION cyassl/internal.h /^struct CYASSL_SESSION {$/;" s -CYASSL_SESSION cyassl/ssl.h /^typedef struct CYASSL_SESSION CYASSL_SESSION;$/;" t typeref:struct:CYASSL_SESSION -CYASSL_SHA256_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA256_CTX {$/;" s -CYASSL_SHA256_CTX cyassl/openssl/sha.h /^} CYASSL_SHA256_CTX;$/;" t typeref:struct:CYASSL_SHA256_CTX -CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 118;" d -CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 156;" d -CYASSL_SHA384 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 178;" d -CYASSL_SHA384_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA384_CTX {$/;" s -CYASSL_SHA384_CTX cyassl/openssl/sha.h /^} CYASSL_SHA384_CTX;$/;" t typeref:struct:CYASSL_SHA384_CTX -CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 124;" d -CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 162;" d -CYASSL_SHA512 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 184;" d -CYASSL_SHA512_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA512_CTX {$/;" s -CYASSL_SHA512_CTX cyassl/openssl/sha.h /^} CYASSL_SHA512_CTX;$/;" t typeref:struct:CYASSL_SHA512_CTX -CYASSL_SHA_CTX cyassl/openssl/sha.h /^typedef struct CYASSL_SHA_CTX {$/;" s -CYASSL_SHA_CTX cyassl/openssl/sha.h /^} CYASSL_SHA_CTX;$/;" t typeref:struct:CYASSL_SHA_CTX -CYASSL_SHA_H_ cyassl/openssl/sha.h 5;" d -CYASSL_SMALL_STACK ctaocrypt/src/integer.c 44;" d file: -CYASSL_SMALL_STACK cyassl/ctaocrypt/settings.h 350;" d -CYASSL_SMALL_STACK cyassl/ctaocrypt/settings.h 351;" d -CYASSL_SMALL_STACK cyassl/options.h 43;" d -CYASSL_SMALL_STACK cyassl/options.h 44;" d -CYASSL_SNIFFER sslSniffer/sslSnifferTest/snifftest.c 29;" d file: -CYASSL_SNIFFER_ERROR_H cyassl/sniffer_error.h 24;" d -CYASSL_SNIFFER_H cyassl/sniffer.h 24;" d -CYASSL_SNI_ANSWER_ON_MISMATCH cyassl/ssl.h /^ CYASSL_SNI_ANSWER_ON_MISMATCH = 0x02 \/* fake match on mismatch flag *\/$/;" e enum:__anon25 -CYASSL_SNI_CONTINUE_ON_MISMATCH cyassl/ssl.h /^ CYASSL_SNI_CONTINUE_ON_MISMATCH = 0x01, \/* do not abort on mismatch flag *\/$/;" e enum:__anon25 -CYASSL_SNI_FAKE_MATCH cyassl/ssl.h /^ CYASSL_SNI_FAKE_MATCH = 1, \/* if CYASSL_SNI_ANSWER_ON_MISMATCH is enabled *\/$/;" e enum:__anon26 -CYASSL_SNI_HOST_NAME cyassl/ssl.h /^ CYASSL_SNI_HOST_NAME = 0$/;" e enum:__anon24 -CYASSL_SNI_NO_MATCH cyassl/ssl.h /^ CYASSL_SNI_NO_MATCH = 0,$/;" e enum:__anon26 -CYASSL_SNI_REAL_MATCH cyassl/ssl.h /^ CYASSL_SNI_REAL_MATCH = 2$/;" e enum:__anon26 -CYASSL_SOCKADDR cyassl/internal.h /^struct CYASSL_SOCKADDR {$/;" s -CYASSL_SOCKADDR cyassl/ssl.h /^typedef struct CYASSL_SOCKADDR CYASSL_SOCKADDR;$/;" t typeref:struct:CYASSL_SOCKADDR -CYASSL_SSLV3 cyassl/ssl.h /^ CYASSL_SSLV3 = 0,$/;" e enum:__anon22 -CYASSL_SSL_H cyassl/ssl.h 26;" d -CYASSL_STREAM_TYPE cyassl/ssl.h /^ CYASSL_STREAM_TYPE = 3,$/;" e enum:__anon23 -CYASSL_TEST_API cyassl/ctaocrypt/asn.h 477;" d -CYASSL_TEST_API cyassl/ctaocrypt/asn.h 479;" d -CYASSL_THREAD cyassl/test.h 110;" d -CYASSL_THREAD cyassl/test.h 115;" d -CYASSL_THREAD cyassl/test.h 121;" d -CYASSL_THREAD cyassl/test.h 125;" d -CYASSL_TLSV1 cyassl/ssl.h /^ CYASSL_TLSV1 = 1,$/;" e enum:__anon22 -CYASSL_TLSV1_1 cyassl/ssl.h /^ CYASSL_TLSV1_1 = 2,$/;" e enum:__anon22 -CYASSL_TLSV1_2 cyassl/ssl.h /^ CYASSL_TLSV1_2 = 3,$/;" e enum:__anon22 -CYASSL_TLS_HMAC_INNER_SZ cyassl/ssl.h /^ CYASSL_TLS_HMAC_INNER_SZ = 13 \/* SEQ_SZ + ENUM + VERSION_SZ + LEN_SZ *\/$/;" e enum:__anon23 -CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c 45;" d file: -CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/CyaSSL-Full/server.c 30;" d file: -CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/SimpleClient/client.c 45;" d file: -CYASSL_TRACK_MEMORY IDE/MDK5-ARM/Projects/SimpleServer/server.c 30;" d file: -CYASSL_TRACK_MEMORY examples/client/client.c 37;" d file: -CYASSL_TRACK_MEMORY examples/server/server.c 30;" d file: -CYASSL_TYPES cyassl/ctaocrypt/settings.h 397;" d -CYASSL_TYPES_DEFINED cyassl/openssl/ssl.h 54;" d -CYASSL_TYPES_DEFINED cyassl/ssl.h 75;" d -CYASSL_USER_CA cyassl/ssl.h /^ CYASSL_USER_CA = 1, \/* user added as trusted *\/$/;" e enum:__anon22 -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 108;" d -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 134;" d -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 142;" d -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 178;" d -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 540;" d -CYASSL_USER_IO cyassl/ctaocrypt/settings.h 542;" d -CYASSL_VERSION cyassl/ssl.h 47;" d -CYASSL_WORD_BITS cyassl/ctaocrypt/types.h /^ CYASSL_WORD_BITS = CYASSL_WORD_SIZE * CYASSL_BIT_SIZE$/;" e enum:__anon47 -CYASSL_WORD_SIZE cyassl/ctaocrypt/types.h /^ CYASSL_WORD_SIZE = sizeof(word),$/;" e enum:__anon47 -CYASSL_X509 cyassl/internal.h /^struct CYASSL_X509 {$/;" s -CYASSL_X509 cyassl/ssl.h /^typedef struct CYASSL_X509 CYASSL_X509;$/;" t typeref:struct:CYASSL_X509 -CYASSL_X509_CHAIN cyassl/internal.h /^struct CYASSL_X509_CHAIN {$/;" s -CYASSL_X509_CHAIN cyassl/ssl.h /^typedef struct CYASSL_X509_CHAIN CYASSL_X509_CHAIN;$/;" t typeref:struct:CYASSL_X509_CHAIN -CYASSL_X509_CRL cyassl/ssl.h /^typedef struct CYASSL_X509_CRL CYASSL_X509_CRL;$/;" t typeref:struct:CYASSL_X509_CRL -CYASSL_X509_EXTENSION cyassl/ssl.h /^typedef struct CYASSL_X509_EXTENSION CYASSL_X509_EXTENSION;$/;" t typeref:struct:CYASSL_X509_EXTENSION -CYASSL_X509_LOOKUP cyassl/ssl.h /^typedef struct CYASSL_X509_LOOKUP CYASSL_X509_LOOKUP;$/;" t typeref:struct:CYASSL_X509_LOOKUP -CYASSL_X509_LOOKUP_METHOD cyassl/ssl.h /^typedef struct CYASSL_X509_LOOKUP_METHOD CYASSL_X509_LOOKUP_METHOD;$/;" t typeref:struct:CYASSL_X509_LOOKUP_METHOD -CYASSL_X509_NAME cyassl/internal.h /^struct CYASSL_X509_NAME {$/;" s -CYASSL_X509_NAME cyassl/ssl.h /^typedef struct CYASSL_X509_NAME CYASSL_X509_NAME;$/;" t typeref:struct:CYASSL_X509_NAME -CYASSL_X509_OBJECT cyassl/ssl.h /^typedef struct CYASSL_X509_OBJECT {$/;" s -CYASSL_X509_OBJECT cyassl/ssl.h /^} CYASSL_X509_OBJECT;$/;" t typeref:struct:CYASSL_X509_OBJECT -CYASSL_X509_REVOKED cyassl/ssl.h /^typedef struct CYASSL_X509_REVOKED {$/;" s -CYASSL_X509_REVOKED cyassl/ssl.h /^} CYASSL_X509_REVOKED;$/;" t typeref:struct:CYASSL_X509_REVOKED -CYASSL_X509_STORE cyassl/ssl.h /^typedef struct CYASSL_X509_STORE {$/;" s -CYASSL_X509_STORE cyassl/ssl.h /^} CYASSL_X509_STORE;$/;" t typeref:struct:CYASSL_X509_STORE -CYASSL_X509_STORE_CTX cyassl/ssl.h /^typedef struct CYASSL_X509_STORE_CTX {$/;" s -CYASSL_X509_STORE_CTX cyassl/ssl.h /^} CYASSL_X509_STORE_CTX;$/;" t typeref:struct:CYASSL_X509_STORE_CTX -CYASSL_const_DES_cblock cyassl/openssl/des.h /^typedef \/* const *\/ CYASSL_DES_cblock CYASSL_const_DES_cblock;$/;" t -CYASSL_dynlock_value cyassl/ssl.h /^typedef struct CYASSL_dynlock_value CYASSL_dynlock_value;$/;" t typeref:struct:CYASSL_dynlock_value -CYA_Log_Levels cyassl/ctaocrypt/logging.h /^enum CYA_Log_Levels {$/;" g -CYGPATH_W Makefile /^CYGPATH_W = echo$/;" m -CaCb cyassl/test.h /^static INLINE void CaCb(unsigned char* der, int sz, int type)$/;" f -CallbackCACache cyassl/ssl.h /^typedef void (*CallbackCACache)(unsigned char* der, int sz, int type);$/;" t -CallbackDecryptVerify cyassl/ssl.h /^typedef int (*CallbackDecryptVerify)(CYASSL* ssl, $/;" t -CallbackEccSign cyassl/ssl.h /^typedef int (*CallbackEccSign)(CYASSL* ssl, $/;" t -CallbackEccVerify cyassl/ssl.h /^typedef int (*CallbackEccVerify)(CYASSL* ssl, $/;" t -CallbackGenCookie cyassl/ssl.h /^typedef int (*CallbackGenCookie)(CYASSL* ssl, unsigned char* buf, int sz,$/;" t -CallbackIORecv cyassl/ssl.h /^typedef int (*CallbackIORecv)(CYASSL *ssl, char *buf, int sz, void *ctx);$/;" t -CallbackIOSend cyassl/ssl.h /^typedef int (*CallbackIOSend)(CYASSL *ssl, char *buf, int sz, void *ctx);$/;" t -CallbackMacEncrypt cyassl/ssl.h /^typedef int (*CallbackMacEncrypt)(CYASSL* ssl, unsigned char* macOut, $/;" t -CallbackRsaDec cyassl/ssl.h /^typedef int (*CallbackRsaDec)(CYASSL* ssl, $/;" t -CallbackRsaEnc cyassl/ssl.h /^typedef int (*CallbackRsaEnc)(CYASSL* ssl, $/;" t -CallbackRsaSign cyassl/ssl.h /^typedef int (*CallbackRsaSign)(CYASSL* ssl, $/;" t -CallbackRsaVerify cyassl/ssl.h /^typedef int (*CallbackRsaVerify)(CYASSL* ssl, $/;" t -Camellia cyassl/ctaocrypt/camellia.h /^typedef struct Camellia {$/;" s -Camellia cyassl/ctaocrypt/camellia.h /^} Camellia;$/;" t typeref:struct:Camellia -CamelliaCbcDecrypt ctaocrypt/src/camellia.c /^void CamelliaCbcDecrypt(Camellia* cam, byte* out, const byte* in, word32 sz)$/;" f -CamelliaCbcEncrypt ctaocrypt/src/camellia.c /^void CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz)$/;" f -CamelliaDecryptDirect ctaocrypt/src/camellia.c /^void CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in)$/;" f -CamelliaEncryptDirect ctaocrypt/src/camellia.c /^void CamelliaEncryptDirect(Camellia* cam, byte* out, const byte* in)$/;" f -CamelliaSetIV ctaocrypt/src/camellia.c /^int CamelliaSetIV(Camellia* cam, const byte* iv)$/;" f -CamelliaSetKey ctaocrypt/src/camellia.c /^int CamelliaSetKey(Camellia* cam, const byte* key, word32 len, const byte* iv)$/;" f -CamelliaSubkeyL ctaocrypt/src/camellia.c 119;" d file: -CamelliaSubkeyR ctaocrypt/src/camellia.c 120;" d file: -Camellia_DecryptBlock ctaocrypt/src/camellia.c /^static void Camellia_DecryptBlock(const int keyBitLength, $/;" f file: -Camellia_EncryptBlock ctaocrypt/src/camellia.c /^static void Camellia_EncryptBlock(const int keyBitLength, $/;" f file: -CaviumRNG_GenerateBlock ctaocrypt/src/random.c /^static void CaviumRNG_GenerateBlock(RNG* rng, byte* output, word32 sz)$/;" f file: -CaviumRsaPrivateDecrypt ctaocrypt/src/rsa.c /^static int CaviumRsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,$/;" f file: -CaviumRsaPrivateKeyDecode ctaocrypt/src/asn.c /^static int CaviumRsaPrivateKeyDecode(const byte* input, word32* inOutIdx,$/;" f file: -CaviumRsaPublicEncrypt ctaocrypt/src/rsa.c /^static int CaviumRsaPublicEncrypt(const byte* in, word32 inLen, byte* out,$/;" f file: -CaviumRsaSSL_Sign ctaocrypt/src/rsa.c /^static int CaviumRsaSSL_Sign(const byte* in, word32 inLen, byte* out,$/;" f file: -CaviumRsaSSL_Verify ctaocrypt/src/rsa.c /^static int CaviumRsaSSL_Verify(const byte* in, word32 inLen, byte* out,$/;" f file: -CbMissingCRL cyassl/ssl.h /^typedef void (*CbMissingCRL)(const char* url);$/;" t -CbOCSPIO cyassl/ssl.h /^typedef int (*CbOCSPIO)(void*, const char*, int,$/;" t -CbOCSPRespFree cyassl/ssl.h /^typedef void (*CbOCSPRespFree)(void*,unsigned char*);$/;" t -Cert cyassl/ctaocrypt/asn_public.h /^typedef struct Cert {$/;" s -Cert cyassl/ctaocrypt/asn_public.h /^} Cert;$/;" t typeref:struct:Cert -CertCacheHeader src/ssl.c /^} CertCacheHeader;$/;" t typeref:struct:__anon93 file: -CertName cyassl/ctaocrypt/asn_public.h /^typedef struct CertName {$/;" s -CertName cyassl/ctaocrypt/asn_public.h /^} CertName;$/;" t typeref:struct:CertName -CertStatus cyassl/ctaocrypt/asn.h /^struct CertStatus {$/;" s -CertStatus cyassl/ctaocrypt/asn.h /^typedef struct CertStatus CertStatus;$/;" t typeref:struct:CertStatus -CertStatus cyassl/internal.h /^ typedef struct CertStatus CertStatus;$/;" t typeref:struct:CertStatus -CertType cyassl/ctaocrypt/asn_public.h /^enum CertType {$/;" g -CertificatePolicy_Sum cyassl/ctaocrypt/asn.h /^enum CertificatePolicy_Sum {$/;" g -Ch ctaocrypt/src/sha256.c 117;" d file: -Ch ctaocrypt/src/sha512.c 120;" d file: -ChangeDirBack cyassl/test.h /^static INLINE void ChangeDirBack(int x)$/;" f -CheckAck src/sniffer.c /^static int CheckAck(TcpInfo* tcpInfo, SnifferSession* session)$/;" f file: -CheckAlgo ctaocrypt/src/asn.c /^static int CheckAlgo(int first, int second, int* id, int* version)$/;" f file: -CheckAlgoV2 ctaocrypt/src/asn.c /^static int CheckAlgoV2(int oid, int* id)$/;" f file: -CheckAltNames src/internal.c /^static int CheckAltNames(DecodedCert* dCert, char* domain)$/;" f file: -CheckAvailableSize src/internal.c /^int CheckAvailableSize(CYASSL *ssl, int size)$/;" f -CheckCertCRL src/crl.c /^int CheckCertCRL(CYASSL_CRL* crl, DecodedCert* cert)$/;" f -CheckCertOCSP src/ocsp.c /^int CheckCertOCSP(CYASSL_OCSP* ocsp, DecodedCert* cert)$/;" f -CheckCtcSettings cyassl/ctaocrypt/types.h 319;" d -CheckCurve ctaocrypt/src/asn.c /^ static int CheckCurve(word32 oid)$/;" f file: -CheckFastMathSettings cyassl/ctaocrypt/tfm.h 688;" d -CheckFinCapture src/sniffer.c /^static void CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo, $/;" f file: -CheckHeaders src/sniffer.c /^static int CheckHeaders(IpInfo* ipInfo, TcpInfo* tcpInfo, const byte* packet,$/;" f file: -CheckIpHdr src/sniffer.c /^static int CheckIpHdr(IpHdr* iphdr, IpInfo* info, int length, char* error)$/;" f file: -CheckPreRecord src/sniffer.c /^static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: -CheckRunTimeFastMath ctaocrypt/src/tfm.c /^word32 CheckRunTimeFastMath(void)$/;" f -CheckRunTimeSettings ctaocrypt/src/integer.c /^word32 CheckRunTimeSettings(void)$/;" f -CheckRunTimeSettings ctaocrypt/src/tfm.c /^word32 CheckRunTimeSettings(void)$/;" f -CheckSequence src/sniffer.c /^static int CheckSequence(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: -CheckSession src/sniffer.c /^static int CheckSession(IpInfo* ipInfo, TcpInfo* tcpInfo, int sslBytes,$/;" f file: -CheckTcpHdr src/sniffer.c /^static int CheckTcpHdr(TcpHdr* tcphdr, TcpInfo* info, char* error)$/;" f file: -Check_CPU_support_AES ctaocrypt/src/aes.c /^static int Check_CPU_support_AES(void)$/;" f file: -CipherRequires src/internal.c /^ static int CipherRequires(byte first, byte second, int requirement)$/;" f file: -CipherSpecs cyassl/internal.h /^typedef struct CipherSpecs {$/;" s -CipherSpecs cyassl/internal.h /^} CipherSpecs;$/;" t typeref:struct:CipherSpecs -CipherType cyassl/internal.h /^enum CipherType { stream, block, aead };$/;" g -Ciphers cyassl/internal.h /^typedef struct Ciphers {$/;" s -Ciphers cyassl/internal.h /^} Ciphers;$/;" t typeref:struct:Ciphers -CleanPreMaster src/keys.c /^static int CleanPreMaster(CYASSL* ssl)$/;" f file: -ClientCache src/ssl.c /^ static ClientRow ClientCache[SESSION_ROWS]; \/* Client Cache *\/$/;" v file: -ClientCertificateType cyassl/internal.h /^enum ClientCertificateType { $/;" g -ClientRow src/ssl.c /^ typedef struct ClientRow {$/;" s file: -ClientRow src/ssl.c /^ } ClientRow;$/;" t typeref:struct:ClientRow file: -ClientSession src/ssl.c /^ typedef struct ClientSession {$/;" s file: -ClientSession src/ssl.c /^ } ClientSession;$/;" t typeref:struct:ClientSession file: -Clients src/ssl.c /^ ClientSession Clients[SESSIONS_PER_ROW];$/;" m struct:ClientRow file: -CloseSocket cyassl/test.h 102;" d -CloseSocket cyassl/test.h 96;" d -CloseSocket cyassl/test.h 99;" d -CloseSocket src/ssl.c 6245;" d file: -CloseSocket src/ssl.c 6247;" d file: -CloseSocket src/ssl.c 6250;" d file: -CloseSocket swig/cyassl_adds.c 91;" d file: -CloseSocket swig/cyassl_adds.c 94;" d file: -CmpTimes src/ssl.c 5527;" d file: -CompareOcspReqResp ctaocrypt/src/asn.c /^int CompareOcspReqResp(OcspRequest* req, OcspResponse* resp)$/;" f -Compress ctaocrypt/src/compress.c /^int Compress(byte* out, word32 outSz, const byte* in, word32 inSz, word32 flags)$/;" f -CompressRounds src/internal.c /^static INLINE void CompressRounds(CYASSL* ssl, int rounds, const byte* dummy)$/;" f file: -ConfirmNameConstraints ctaocrypt/src/asn.c /^static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert)$/;" f file: -ConfirmSignature ctaocrypt/src/asn.c /^static int ConfirmSignature(const byte* buf, word32 bufSz,$/;" f file: -ConnectState cyassl/internal.h /^enum ConnectState {$/;" g -ConstantCompare src/internal.c /^static int ConstantCompare(const byte* a, const byte* b, int length)$/;" f file: -ContentType cyassl/internal.h /^enum ContentType {$/;" g -CopyDecodedToX509 src/internal.c /^int CopyDecodedToX509(CYASSL_X509* x509, DecodedCert* dCert)$/;" f -CopyValidity ctaocrypt/src/asn.c /^static int CopyValidity(byte* output, Cert* cert)$/;" f file: -CreateBuffer src/sniffer.c /^static PacketBuffer* CreateBuffer(word32* begin, word32 end, const byte* data,$/;" f file: -CreateProcess build-aux/ltmain.sh /^ CreateProcess(). We must quote the arguments since Win32 CreateProcess()$/;" f -CreateProcess libtool /^ CreateProcess(). We must quote the arguments since Win32 CreateProcess()$/;" f -CreateRecipientInfo ctaocrypt/src/pkcs7.c /^CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz,$/;" f -CreateSession src/sniffer.c /^static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo,$/;" f file: -Ctc_Misc cyassl/ctaocrypt/asn_public.h /^enum Ctc_Misc {$/;" g -Ctc_SigType cyassl/ctaocrypt/asn_public.h /^enum Ctc_SigType {$/;" g -CurrentDir cyassl/test.h /^static INLINE int CurrentDir(const char* str)$/;" f -CyaDTLSv1_2_client_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_2_client_method(void)$/;" f -CyaDTLSv1_2_server_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_2_server_method(void)$/;" f -CyaDTLSv1_client_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_client_method(void)$/;" f -CyaDTLSv1_server_method src/ssl.c /^ CYASSL_METHOD* CyaDTLSv1_server_method(void)$/;" f -CyaSSL_3des_iv src/ssl.c /^ void CyaSSL_3des_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset,$/;" f -CyaSSL_ASN1_INTEGER_cmp src/ssl.c /^ int CyaSSL_ASN1_INTEGER_cmp(const CYASSL_ASN1_INTEGER* a,$/;" f -CyaSSL_ASN1_INTEGER_get src/ssl.c /^ long CyaSSL_ASN1_INTEGER_get(const CYASSL_ASN1_INTEGER* i)$/;" f -CyaSSL_ASN1_TIME_print src/ssl.c /^ int CyaSSL_ASN1_TIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_TIME* asnTime)$/;" f -CyaSSL_ASN1_UTCTIME_print src/ssl.c /^ int CyaSSL_ASN1_UTCTIME_print(CYASSL_BIO* bio, const CYASSL_ASN1_UTCTIME* a)$/;" f -CyaSSL_BIO_eof src/ssl.c /^ int CyaSSL_BIO_eof(CYASSL_BIO* b)$/;" f -CyaSSL_BIO_f_base64 src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_base64(void)$/;" f -CyaSSL_BIO_f_buffer src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_buffer(void)$/;" f -CyaSSL_BIO_f_ssl src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_f_ssl(void)$/;" f -CyaSSL_BIO_flush src/ssl.c /^ int CyaSSL_BIO_flush(CYASSL_BIO* bio)$/;" f -CyaSSL_BIO_free src/ssl.c /^ int CyaSSL_BIO_free(CYASSL_BIO* bio)$/;" f -CyaSSL_BIO_free_all src/ssl.c /^ int CyaSSL_BIO_free_all(CYASSL_BIO* bio)$/;" f -CyaSSL_BIO_get_mem_data src/ssl.c /^ int CyaSSL_BIO_get_mem_data(CYASSL_BIO* bio, const byte** p)$/;" f -CyaSSL_BIO_new src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new(CYASSL_BIO_METHOD* method)$/;" f -CyaSSL_BIO_new_mem_buf src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new_mem_buf(void* buf, int len)$/;" f -CyaSSL_BIO_new_socket src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_new_socket(int sfd, int closeF)$/;" f -CyaSSL_BIO_pending src/ssl.c /^ int CyaSSL_BIO_pending(CYASSL_BIO* bio)$/;" f -CyaSSL_BIO_pop src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_pop(CYASSL_BIO* top)$/;" f -CyaSSL_BIO_printf src/ssl.c /^ int CyaSSL_BIO_printf(CYASSL_BIO* bio, const char* format, ...)$/;" f -CyaSSL_BIO_push src/ssl.c /^ CYASSL_BIO* CyaSSL_BIO_push(CYASSL_BIO* top, CYASSL_BIO* append)$/;" f -CyaSSL_BIO_read src/ssl.c /^ int CyaSSL_BIO_read(CYASSL_BIO* bio, void* buf, int len)$/;" f -CyaSSL_BIO_s_mem src/ssl.c /^ CYASSL_BIO_METHOD* CyaSSL_BIO_s_mem(void)$/;" f -CyaSSL_BIO_set_flags src/ssl.c /^ void CyaSSL_BIO_set_flags(CYASSL_BIO* bio, int flags)$/;" f -CyaSSL_BIO_set_ssl src/ssl.c /^ long CyaSSL_BIO_set_ssl(CYASSL_BIO* b, CYASSL* ssl, int closeF)$/;" f -CyaSSL_BIO_set_write_buffer_size src/ssl.c /^ long CyaSSL_BIO_set_write_buffer_size(CYASSL_BIO* bio, long size)$/;" f -CyaSSL_BIO_write src/ssl.c /^ int CyaSSL_BIO_write(CYASSL_BIO* bio, const void* data, int len)$/;" f -CyaSSL_BN_CTX_free src/ssl.c /^ void CyaSSL_BN_CTX_free(CYASSL_BN_CTX* ctx)$/;" f -CyaSSL_BN_CTX_init src/ssl.c /^ void CyaSSL_BN_CTX_init(CYASSL_BN_CTX* ctx)$/;" f -CyaSSL_BN_CTX_new src/ssl.c /^ CYASSL_BN_CTX* CyaSSL_BN_CTX_new(void)$/;" f -CyaSSL_BN_bin2bn src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_bin2bn(const unsigned char* str, int len,$/;" f -CyaSSL_BN_bn2bin src/ssl.c /^ int CyaSSL_BN_bn2bin(const CYASSL_BIGNUM* bn, unsigned char* r)$/;" f -CyaSSL_BN_bn2dec src/ssl.c /^ char* CyaSSL_BN_bn2dec(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_clear_free src/ssl.c /^ void CyaSSL_BN_clear_free(CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_cmp src/ssl.c /^ int CyaSSL_BN_cmp(const CYASSL_BIGNUM* a, const CYASSL_BIGNUM* b)$/;" f -CyaSSL_BN_copy src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_copy(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_dec2bn src/ssl.c /^ int CyaSSL_BN_dec2bn(CYASSL_BIGNUM** bn, const char* str)$/;" f -CyaSSL_BN_dup src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_dup(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_free src/ssl.c /^ void CyaSSL_BN_free(CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_hex2bn src/ssl.c /^ int CyaSSL_BN_hex2bn(CYASSL_BIGNUM** bn, const char* str)$/;" f -CyaSSL_BN_is_bit_set src/ssl.c /^ int CyaSSL_BN_is_bit_set(const CYASSL_BIGNUM* bn, int n)$/;" f -CyaSSL_BN_is_odd src/ssl.c /^ int CyaSSL_BN_is_odd(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_is_one src/ssl.c /^ int CyaSSL_BN_is_one(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_is_zero src/ssl.c /^ int CyaSSL_BN_is_zero(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_mod src/ssl.c /^ int CyaSSL_BN_mod(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a,$/;" f -CyaSSL_BN_new src/ssl.c /^ CYASSL_BIGNUM* CyaSSL_BN_new(void)$/;" f -CyaSSL_BN_num_bits src/ssl.c /^ int CyaSSL_BN_num_bits(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_num_bytes src/ssl.c /^ int CyaSSL_BN_num_bytes(const CYASSL_BIGNUM* bn)$/;" f -CyaSSL_BN_rand src/ssl.c /^ int CyaSSL_BN_rand(CYASSL_BIGNUM* bn, int bits, int top, int bottom)$/;" f -CyaSSL_BN_set_word src/ssl.c /^ int CyaSSL_BN_set_word(CYASSL_BIGNUM* bn, unsigned long w)$/;" f -CyaSSL_BN_sub src/ssl.c /^ int CyaSSL_BN_sub(CYASSL_BIGNUM* r, const CYASSL_BIGNUM* a,$/;" f -CyaSSL_BN_value_one src/ssl.c /^ const CYASSL_BIGNUM* CyaSSL_BN_value_one(void)$/;" f -CyaSSL_CIPHER_description src/ssl.c /^ char* CyaSSL_CIPHER_description(CYASSL_CIPHER* cipher, char* in, int len)$/;" f -CyaSSL_CIPHER_get_name src/ssl.c /^ const char* CyaSSL_CIPHER_get_name(const CYASSL_CIPHER* cipher)$/;" f -CyaSSL_COMP_add_compression_method src/ssl.c /^ int CyaSSL_COMP_add_compression_method(int method, void* data)$/;" f -CyaSSL_COMP_rle src/ssl.c /^ CYASSL_COMP_METHOD* CyaSSL_COMP_rle(void)$/;" f -CyaSSL_COMP_zlib src/ssl.c /^ CYASSL_COMP_METHOD* CyaSSL_COMP_zlib(void)$/;" f -CyaSSL_CTX_DisableCRL src/ssl.c /^int CyaSSL_CTX_DisableCRL(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_DisableOCSP src/ssl.c /^int CyaSSL_CTX_DisableOCSP(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_EnableCRL src/ssl.c /^int CyaSSL_CTX_EnableCRL(CYASSL_CTX* ctx, int options)$/;" f -CyaSSL_CTX_EnableOCSP src/ssl.c /^int CyaSSL_CTX_EnableOCSP(CYASSL_CTX* ctx, int options)$/;" f -CyaSSL_CTX_LoadCRL src/ssl.c /^int CyaSSL_CTX_LoadCRL(CYASSL_CTX* ctx, const char* path, int type, int monitor)$/;" f -CyaSSL_CTX_SNI_SetOptions src/ssl.c /^void CyaSSL_CTX_SNI_SetOptions(CYASSL_CTX* ctx, byte type, byte options)$/;" f -CyaSSL_CTX_SetCACb src/ssl.c /^void CyaSSL_CTX_SetCACb(CYASSL_CTX* ctx, CallbackCACache cb)$/;" f -CyaSSL_CTX_SetCRL_Cb src/ssl.c /^int CyaSSL_CTX_SetCRL_Cb(CYASSL_CTX* ctx, CbMissingCRL cb)$/;" f -CyaSSL_CTX_SetDecryptVerifyCb src/ssl.c /^void CyaSSL_CTX_SetDecryptVerifyCb(CYASSL_CTX* ctx, CallbackDecryptVerify cb)$/;" f -CyaSSL_CTX_SetEccSignCb src/ssl.c /^void CyaSSL_CTX_SetEccSignCb(CYASSL_CTX* ctx, CallbackEccSign cb)$/;" f -CyaSSL_CTX_SetEccVerifyCb src/ssl.c /^void CyaSSL_CTX_SetEccVerifyCb(CYASSL_CTX* ctx, CallbackEccVerify cb)$/;" f -CyaSSL_CTX_SetGenCookie src/io.c /^CYASSL_API void CyaSSL_CTX_SetGenCookie(CYASSL_CTX* ctx, CallbackGenCookie cb)$/;" f -CyaSSL_CTX_SetMacEncryptCb src/ssl.c /^void CyaSSL_CTX_SetMacEncryptCb(CYASSL_CTX* ctx, CallbackMacEncrypt cb)$/;" f -CyaSSL_CTX_SetOCSP_Cb src/ssl.c /^int CyaSSL_CTX_SetOCSP_Cb(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_SetOCSP_OverrideURL src/ssl.c /^int CyaSSL_CTX_SetOCSP_OverrideURL(CYASSL_CTX* ctx, const char* url)$/;" f -CyaSSL_CTX_SetRsaDecCb src/ssl.c /^void CyaSSL_CTX_SetRsaDecCb(CYASSL_CTX* ctx, CallbackRsaDec cb)$/;" f -CyaSSL_CTX_SetRsaEncCb src/ssl.c /^void CyaSSL_CTX_SetRsaEncCb(CYASSL_CTX* ctx, CallbackRsaEnc cb)$/;" f -CyaSSL_CTX_SetRsaSignCb src/ssl.c /^void CyaSSL_CTX_SetRsaSignCb(CYASSL_CTX* ctx, CallbackRsaSign cb)$/;" f -CyaSSL_CTX_SetRsaVerifyCb src/ssl.c /^void CyaSSL_CTX_SetRsaVerifyCb(CYASSL_CTX* ctx, CallbackRsaVerify cb)$/;" f -CyaSSL_CTX_SetTmpDH src/ssl.c /^ int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, const unsigned char* p, int pSz,$/;" f -CyaSSL_CTX_SetTmpDH_buffer src/ssl.c /^int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, const unsigned char* buf,$/;" f -CyaSSL_CTX_SetTmpDH_file src/ssl.c /^int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX* ctx, const char* fname, int format)$/;" f -CyaSSL_CTX_SetTmpEC_DHE_Sz src/ssl.c /^int CyaSSL_CTX_SetTmpEC_DHE_Sz(CYASSL_CTX* ctx, word16 sz)$/;" f -CyaSSL_CTX_UnloadCAs src/ssl.c /^ int CyaSSL_CTX_UnloadCAs(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_UseCavium src/ssl.c /^int CyaSSL_CTX_UseCavium(CYASSL_CTX* ctx, int devId)$/;" f -CyaSSL_CTX_UseMaxFragment src/ssl.c /^int CyaSSL_CTX_UseMaxFragment(CYASSL_CTX* ctx, byte mfl)$/;" f -CyaSSL_CTX_UseSNI src/ssl.c /^int CyaSSL_CTX_UseSNI(CYASSL_CTX* ctx, byte type, const void* data, word16 size)$/;" f -CyaSSL_CTX_UseSupportedCurve src/ssl.c /^int CyaSSL_CTX_UseSupportedCurve(CYASSL_CTX* ctx, word16 name)$/;" f -CyaSSL_CTX_UseTruncatedHMAC src/ssl.c /^int CyaSSL_CTX_UseTruncatedHMAC(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_check_private_key src/ssl.c /^int CyaSSL_CTX_check_private_key(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_der_load_verify_locations src/ssl.c /^int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX* ctx, const char* file,$/;" f -CyaSSL_CTX_free src/ssl.c /^void CyaSSL_CTX_free(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_get_cert_cache_memsize src/ssl.c /^int CyaSSL_CTX_get_cert_cache_memsize(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_get_ex_data src/ssl.c /^ void* CyaSSL_CTX_get_ex_data(const CYASSL_CTX* ctx, int d)$/;" f -CyaSSL_CTX_get_ex_new_index src/ssl.c /^ int CyaSSL_CTX_get_ex_new_index(long idx, void* arg, void* a, void* b,$/;" f -CyaSSL_CTX_get_mode src/ssl.c /^ long CyaSSL_CTX_get_mode(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_load_verify_buffer src/ssl.c /^ int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX* ctx, const unsigned char* in,$/;" f -CyaSSL_CTX_load_verify_locations src/ssl.c /^int CyaSSL_CTX_load_verify_locations(CYASSL_CTX* ctx, const char* file,$/;" f -CyaSSL_CTX_memrestore_cert_cache src/ssl.c /^int CyaSSL_CTX_memrestore_cert_cache(CYASSL_CTX* ctx, const void* mem, int sz)$/;" f -CyaSSL_CTX_memsave_cert_cache src/ssl.c /^int CyaSSL_CTX_memsave_cert_cache(CYASSL_CTX* ctx, void* mem, int sz, int* used)$/;" f -CyaSSL_CTX_new src/ssl.c /^CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD* method)$/;" f -CyaSSL_CTX_restore_cert_cache src/ssl.c /^int CyaSSL_CTX_restore_cert_cache(CYASSL_CTX* ctx, const char* fname)$/;" f -CyaSSL_CTX_save_cert_cache src/ssl.c /^int CyaSSL_CTX_save_cert_cache(CYASSL_CTX* ctx, const char* fname)$/;" f -CyaSSL_CTX_sess_accept src/ssl.c /^ long CyaSSL_CTX_sess_accept(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_accept_good src/ssl.c /^ long CyaSSL_CTX_sess_accept_good(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_accept_renegotiate src/ssl.c /^ long CyaSSL_CTX_sess_accept_renegotiate(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_cache_full src/ssl.c /^ long CyaSSL_CTX_sess_cache_full(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_cb_hits src/ssl.c /^ long CyaSSL_CTX_sess_cb_hits(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_connect src/ssl.c /^ long CyaSSL_CTX_sess_connect(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_connect_good src/ssl.c /^ long CyaSSL_CTX_sess_connect_good(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_connect_renegotiate src/ssl.c /^ long CyaSSL_CTX_sess_connect_renegotiate(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_get_cache_size src/ssl.c /^ long CyaSSL_CTX_sess_get_cache_size(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_hits src/ssl.c /^ long CyaSSL_CTX_sess_hits(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_misses src/ssl.c /^ long CyaSSL_CTX_sess_misses(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_number src/ssl.c /^ long CyaSSL_CTX_sess_number(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_sess_set_cache_size src/ssl.c /^ long CyaSSL_CTX_sess_set_cache_size(CYASSL_CTX* ctx, long sz)$/;" f -CyaSSL_CTX_sess_set_get_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_get_cb(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_sess_set_new_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_new_cb(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_sess_set_remove_cb src/ssl.c /^ void CyaSSL_CTX_sess_set_remove_cb(CYASSL_CTX* ctx, void (*f)(CYASSL_CTX*,$/;" f -CyaSSL_CTX_sess_timeouts src/ssl.c /^ long CyaSSL_CTX_sess_timeouts(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_set_cipher_list src/ssl.c /^int CyaSSL_CTX_set_cipher_list(CYASSL_CTX* ctx, const char* list)$/;" f -CyaSSL_CTX_set_client_CA_list src/ssl.c /^ void CyaSSL_CTX_set_client_CA_list(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_default_passwd_cb src/ssl.c /^ void CyaSSL_CTX_set_default_passwd_cb(CYASSL_CTX* ctx, pem_password_cb cb)$/;" f -CyaSSL_CTX_set_default_passwd_cb_userdata src/ssl.c /^ void CyaSSL_CTX_set_default_passwd_cb_userdata(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_default_read_ahead src/ssl.c /^ void CyaSSL_CTX_set_default_read_ahead(CYASSL_CTX* ctx, int m)$/;" f -CyaSSL_CTX_set_default_verify_paths src/ssl.c /^ int CyaSSL_CTX_set_default_verify_paths(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_set_ex_data src/ssl.c /^ int CyaSSL_CTX_set_ex_data(CYASSL_CTX* ctx, int d, void* p)$/;" f -CyaSSL_CTX_set_group_messages src/ssl.c /^int CyaSSL_CTX_set_group_messages(CYASSL_CTX* ctx)$/;" f -CyaSSL_CTX_set_info_callback src/ssl.c /^ void CyaSSL_CTX_set_info_callback(CYASSL_CTX* ctx, void (*f)(void))$/;" f -CyaSSL_CTX_set_mode src/ssl.c /^ long CyaSSL_CTX_set_mode(CYASSL_CTX* ctx, long mode)$/;" f -CyaSSL_CTX_set_options src/ssl.c /^ long CyaSSL_CTX_set_options(CYASSL_CTX* ctx, long opt)$/;" f -CyaSSL_CTX_set_psk_client_callback src/ssl.c /^ void CyaSSL_CTX_set_psk_client_callback(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_psk_server_callback src/ssl.c /^ void CyaSSL_CTX_set_psk_server_callback(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_quiet_shutdown src/ssl.c /^ void CyaSSL_CTX_set_quiet_shutdown(CYASSL_CTX* ctx, int mode)$/;" f -CyaSSL_CTX_set_session_cache_mode src/ssl.c /^long CyaSSL_CTX_set_session_cache_mode(CYASSL_CTX* ctx, long mode)$/;" f -CyaSSL_CTX_set_session_id_context src/ssl.c /^ int CyaSSL_CTX_set_session_id_context(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_timeout src/ssl.c /^int CyaSSL_CTX_set_timeout(CYASSL_CTX* ctx, unsigned int to)$/;" f -CyaSSL_CTX_set_tmp_rsa_callback src/ssl.c /^ void CyaSSL_CTX_set_tmp_rsa_callback(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_set_verify src/ssl.c /^void CyaSSL_CTX_set_verify(CYASSL_CTX* ctx, int mode, VerifyCallback vc)$/;" f -CyaSSL_CTX_use_NTRUPrivateKey_file src/ssl.c /^int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX* ctx, const char* file)$/;" f -CyaSSL_CTX_use_PrivateKey_buffer src/ssl.c /^ int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_use_PrivateKey_file src/ssl.c /^int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX* ctx, const char* file,int format)$/;" f -CyaSSL_CTX_use_RSAPrivateKey_file src/ssl.c /^ int CyaSSL_CTX_use_RSAPrivateKey_file(CYASSL_CTX* ctx,const char* file,$/;" f -CyaSSL_CTX_use_certificate_buffer src/ssl.c /^ int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_use_certificate_chain_buffer src/ssl.c /^ int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX* ctx,$/;" f -CyaSSL_CTX_use_certificate_chain_file src/ssl.c /^int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX* ctx, const char* file)$/;" f -CyaSSL_CTX_use_certificate_file src/ssl.c /^int CyaSSL_CTX_use_certificate_file(CYASSL_CTX* ctx, const char* file,$/;" f -CyaSSL_CTX_use_psk_identity_hint src/ssl.c /^ int CyaSSL_CTX_use_psk_identity_hint(CYASSL_CTX* ctx, const char* hint)$/;" f -CyaSSL_CertManagerCheckCRL src/ssl.c /^int CyaSSL_CertManagerCheckCRL(CYASSL_CERT_MANAGER* cm, byte* der, int sz)$/;" f -CyaSSL_CertManagerCheckOCSP src/ssl.c /^int CyaSSL_CertManagerCheckOCSP(CYASSL_CERT_MANAGER* cm, byte* der, int sz)$/;" f -CyaSSL_CertManagerDisableCRL src/ssl.c /^int CyaSSL_CertManagerDisableCRL(CYASSL_CERT_MANAGER* cm)$/;" f -CyaSSL_CertManagerDisableOCSP src/ssl.c /^int CyaSSL_CertManagerDisableOCSP(CYASSL_CERT_MANAGER* cm)$/;" f -CyaSSL_CertManagerEnableCRL src/ssl.c /^int CyaSSL_CertManagerEnableCRL(CYASSL_CERT_MANAGER* cm, int options)$/;" f -CyaSSL_CertManagerEnableOCSP src/ssl.c /^int CyaSSL_CertManagerEnableOCSP(CYASSL_CERT_MANAGER* cm, int options)$/;" f -CyaSSL_CertManagerFree src/ssl.c /^void CyaSSL_CertManagerFree(CYASSL_CERT_MANAGER* cm)$/;" f -CyaSSL_CertManagerLoadCA src/ssl.c /^int CyaSSL_CertManagerLoadCA(CYASSL_CERT_MANAGER* cm, const char* file,$/;" f -CyaSSL_CertManagerLoadCRL src/ssl.c /^int CyaSSL_CertManagerLoadCRL(CYASSL_CERT_MANAGER* cm, const char* path,$/;" f -CyaSSL_CertManagerNew src/ssl.c /^CYASSL_CERT_MANAGER* CyaSSL_CertManagerNew(void)$/;" f -CyaSSL_CertManagerSetCRL_Cb src/ssl.c /^int CyaSSL_CertManagerSetCRL_Cb(CYASSL_CERT_MANAGER* cm, CbMissingCRL cb)$/;" f -CyaSSL_CertManagerSetOCSPOverrideURL src/ssl.c /^int CyaSSL_CertManagerSetOCSPOverrideURL(CYASSL_CERT_MANAGER* cm,$/;" f -CyaSSL_CertManagerSetOCSP_Cb src/ssl.c /^int CyaSSL_CertManagerSetOCSP_Cb(CYASSL_CERT_MANAGER* cm,$/;" f -CyaSSL_CertManagerUnloadCAs src/ssl.c /^int CyaSSL_CertManagerUnloadCAs(CYASSL_CERT_MANAGER* cm)$/;" f -CyaSSL_CertManagerVerify src/ssl.c /^int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER* cm, const char* fname,$/;" f -CyaSSL_CertManagerVerifyBuffer src/ssl.c /^int CyaSSL_CertManagerVerifyBuffer(CYASSL_CERT_MANAGER* cm, const byte* buff,$/;" f -CyaSSL_CertPemToDer src/ssl.c /^int CyaSSL_CertPemToDer(const unsigned char* pem, int pemSz,$/;" f -CyaSSL_Cleanup src/ssl.c /^int CyaSSL_Cleanup(void)$/;" f -CyaSSL_DES_cbc_encrypt src/ssl.c /^ void CyaSSL_DES_cbc_encrypt(const unsigned char* input,$/;" f -CyaSSL_DES_ecb_encrypt src/ssl.c /^ void CyaSSL_DES_ecb_encrypt(CYASSL_DES_cblock* desa,$/;" f -CyaSSL_DES_key_sched src/ssl.c /^ int CyaSSL_DES_key_sched(CYASSL_const_DES_cblock* key,$/;" f -CyaSSL_DES_ncbc_encrypt src/ssl.c /^ void CyaSSL_DES_ncbc_encrypt(const unsigned char* input,$/;" f -CyaSSL_DES_set_key_unchecked src/ssl.c /^ void CyaSSL_DES_set_key_unchecked(CYASSL_const_DES_cblock* myDes,$/;" f -CyaSSL_DES_set_odd_parity src/ssl.c /^ void CyaSSL_DES_set_odd_parity(CYASSL_DES_cblock* myDes)$/;" f -CyaSSL_DH_compute_key src/ssl.c /^ int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* otherPub,$/;" f -CyaSSL_DH_free src/ssl.c /^ void CyaSSL_DH_free(CYASSL_DH* dh)$/;" f -CyaSSL_DH_generate_key src/ssl.c /^ int CyaSSL_DH_generate_key(CYASSL_DH* dh)$/;" f -CyaSSL_DH_new src/ssl.c /^ CYASSL_DH* CyaSSL_DH_new(void)$/;" f -CyaSSL_DH_size src/ssl.c /^ int CyaSSL_DH_size(CYASSL_DH* dh)$/;" f -CyaSSL_DSA_LoadDer src/ssl.c /^int CyaSSL_DSA_LoadDer(CYASSL_DSA* dsa, const unsigned char* der, int derSz)$/;" f -CyaSSL_DSA_do_sign src/ssl.c /^ int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet,$/;" f -CyaSSL_DSA_free src/ssl.c /^ void CyaSSL_DSA_free(CYASSL_DSA* dsa)$/;" f -CyaSSL_DSA_generate_key src/ssl.c /^ int CyaSSL_DSA_generate_key(CYASSL_DSA* dsa)$/;" f -CyaSSL_DSA_generate_parameters_ex src/ssl.c /^ int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA* dsa, int bits,$/;" f -CyaSSL_DSA_new src/ssl.c /^ CYASSL_DSA* CyaSSL_DSA_new(void)$/;" f -CyaSSL_Debugging_OFF ctaocrypt/src/logging.c /^void CyaSSL_Debugging_OFF(void)$/;" f -CyaSSL_Debugging_ON ctaocrypt/src/logging.c /^int CyaSSL_Debugging_ON(void)$/;" f -CyaSSL_DisableCRL src/ssl.c /^int CyaSSL_DisableCRL(CYASSL* ssl)$/;" f -CyaSSL_DisableOCSP src/ssl.c /^int CyaSSL_DisableOCSP(CYASSL* ssl)$/;" f -CyaSSL_ERR_GET_REASON src/ssl.c /^ int CyaSSL_ERR_GET_REASON(int err)$/;" f -CyaSSL_ERR_clear_error src/ssl.c /^ void CyaSSL_ERR_clear_error(void)$/;" f -CyaSSL_ERR_error_string src/ssl.c /^char* CyaSSL_ERR_error_string(unsigned long errNumber, char* data)$/;" f -CyaSSL_ERR_error_string_n src/ssl.c /^void CyaSSL_ERR_error_string_n(unsigned long e, char* buf, unsigned long len)$/;" f -CyaSSL_ERR_free_strings src/ssl.c /^ void CyaSSL_ERR_free_strings(void)$/;" f -CyaSSL_ERR_get_error src/ssl.c /^ unsigned long CyaSSL_ERR_get_error(void)$/;" f -CyaSSL_ERR_get_error_line_data src/ssl.c /^ unsigned long CyaSSL_ERR_get_error_line_data(const char** file, int* line,$/;" f -CyaSSL_ERR_peek_error src/ssl.c /^ unsigned long CyaSSL_ERR_peek_error(void)$/;" f -CyaSSL_ERR_print_errors_fp src/ssl.c /^void CyaSSL_ERR_print_errors_fp(FILE* fp, int err)$/;" f -CyaSSL_ERR_remove_state src/ssl.c /^ void CyaSSL_ERR_remove_state(unsigned long state)$/;" f -CyaSSL_EVP_BytesToKey src/ssl.c /^ int CyaSSL_EVP_BytesToKey(const CYASSL_EVP_CIPHER* type,$/;" f -CyaSSL_EVP_CIPHER_CTX_cleanup src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_cleanup(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_CIPHER_CTX_init src/ssl.c /^ void CyaSSL_EVP_CIPHER_CTX_init(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_CIPHER_CTX_iv_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_iv_length(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_CIPHER_CTX_key_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_key_length(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_CIPHER_CTX_set_key_length src/ssl.c /^ int CyaSSL_EVP_CIPHER_CTX_set_key_length(CYASSL_EVP_CIPHER_CTX* ctx,$/;" f -CyaSSL_EVP_Cipher src/ssl.c /^ int CyaSSL_EVP_Cipher(CYASSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src,$/;" f -CyaSSL_EVP_CipherInit src/ssl.c /^ int CyaSSL_EVP_CipherInit(CYASSL_EVP_CIPHER_CTX* ctx,$/;" f -CyaSSL_EVP_DigestFinal src/ssl.c /^ int CyaSSL_EVP_DigestFinal(CYASSL_EVP_MD_CTX* ctx, unsigned char* md,$/;" f -CyaSSL_EVP_DigestFinal_ex src/ssl.c /^ int CyaSSL_EVP_DigestFinal_ex(CYASSL_EVP_MD_CTX* ctx, unsigned char* md,$/;" f -CyaSSL_EVP_DigestInit src/ssl.c /^ int CyaSSL_EVP_DigestInit(CYASSL_EVP_MD_CTX* ctx, const CYASSL_EVP_MD* type)$/;" f -CyaSSL_EVP_DigestUpdate src/ssl.c /^ int CyaSSL_EVP_DigestUpdate(CYASSL_EVP_MD_CTX* ctx, const void* data,$/;" f -CyaSSL_EVP_MD_CTX_cleanup src/ssl.c /^ int CyaSSL_EVP_MD_CTX_cleanup(CYASSL_EVP_MD_CTX* ctx)$/;" f -CyaSSL_EVP_MD_CTX_init src/ssl.c /^ void CyaSSL_EVP_MD_CTX_init(CYASSL_EVP_MD_CTX* ctx)$/;" f -CyaSSL_EVP_MD_size src/ssl.c /^ int CyaSSL_EVP_MD_size(const CYASSL_EVP_MD* type)$/;" f -CyaSSL_EVP_PKEY_free src/ssl.c /^ void CyaSSL_EVP_PKEY_free(CYASSL_EVP_PKEY* key)$/;" f -CyaSSL_EVP_PKEY_get1_DSA src/ssl.c /^ CYASSL_DSA* CyaSSL_EVP_PKEY_get1_DSA(CYASSL_EVP_PKEY* key)$/;" f -CyaSSL_EVP_PKEY_get1_RSA src/ssl.c /^ CYASSL_RSA* CyaSSL_EVP_PKEY_get1_RSA(CYASSL_EVP_PKEY* key)$/;" f -CyaSSL_EVP_X_STATE src/ssl.c /^ void* CyaSSL_EVP_X_STATE(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_X_STATE_LEN src/ssl.c /^ int CyaSSL_EVP_X_STATE_LEN(const CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_EVP_aes_128_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_cbc(void)$/;" f -CyaSSL_EVP_aes_128_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_128_ctr(void)$/;" f -CyaSSL_EVP_aes_192_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_cbc(void)$/;" f -CyaSSL_EVP_aes_192_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_192_ctr(void)$/;" f -CyaSSL_EVP_aes_256_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_cbc(void)$/;" f -CyaSSL_EVP_aes_256_ctr src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_aes_256_ctr(void)$/;" f -CyaSSL_EVP_cleanup src/ssl.c /^ void CyaSSL_EVP_cleanup(void)$/;" f -CyaSSL_EVP_des_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_cbc(void)$/;" f -CyaSSL_EVP_des_ede3_cbc src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_des_ede3_cbc(void)$/;" f -CyaSSL_EVP_enc_null src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_enc_null(void)$/;" f -CyaSSL_EVP_get_digestbynid src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_get_digestbynid(int id)$/;" f -CyaSSL_EVP_md5 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_md5(void)$/;" f -CyaSSL_EVP_rc4 src/ssl.c /^ const CYASSL_EVP_CIPHER* CyaSSL_EVP_rc4(void)$/;" f -CyaSSL_EVP_ripemd160 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_ripemd160(void)$/;" f -CyaSSL_EVP_sha1 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha1(void)$/;" f -CyaSSL_EVP_sha256 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha256(void)$/;" f -CyaSSL_EVP_sha384 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha384(void)$/;" f -CyaSSL_EVP_sha512 src/ssl.c /^ const CYASSL_EVP_MD* CyaSSL_EVP_sha512(void)$/;" f -CyaSSL_EnableCRL src/ssl.c /^int CyaSSL_EnableCRL(CYASSL* ssl, int options)$/;" f -CyaSSL_EnableOCSP src/ssl.c /^int CyaSSL_EnableOCSP(CYASSL* ssl, int options)$/;" f -CyaSSL_ErrorCodes cyassl/error-ssl.h /^enum CyaSSL_ErrorCodes {$/;" g -CyaSSL_Free ctaocrypt/src/memory.c /^void CyaSSL_Free(void *ptr)$/;" f -CyaSSL_FreeArrays src/ssl.c /^void CyaSSL_FreeArrays(CYASSL* ssl)$/;" f -CyaSSL_FreeX509 src/ssl.c /^ void CyaSSL_FreeX509(CYASSL_X509* x509)$/;" f -CyaSSL_Free_cb cyassl/ctaocrypt/memory.h /^typedef void (*CyaSSL_Free_cb)(void *ptr);$/;" t -CyaSSL_GetAeadMacSize src/ssl.c /^int CyaSSL_GetAeadMacSize(CYASSL* ssl)$/;" f -CyaSSL_GetBulkCipher src/ssl.c /^int CyaSSL_GetBulkCipher(CYASSL* ssl)$/;" f -CyaSSL_GetCipherBlockSize src/ssl.c /^int CyaSSL_GetCipherBlockSize(CYASSL* ssl)$/;" f -CyaSSL_GetCipherType src/ssl.c /^int CyaSSL_GetCipherType(CYASSL* ssl)$/;" f -CyaSSL_GetClientWriteIV src/ssl.c /^const byte* CyaSSL_GetClientWriteIV(CYASSL* ssl)$/;" f -CyaSSL_GetClientWriteKey src/ssl.c /^const byte* CyaSSL_GetClientWriteKey(CYASSL* ssl)$/;" f -CyaSSL_GetCookieCtx src/io.c /^CYASSL_API void* CyaSSL_GetCookieCtx(CYASSL* ssl)$/;" f -CyaSSL_GetDecryptVerifyCtx src/ssl.c /^void* CyaSSL_GetDecryptVerifyCtx(CYASSL* ssl)$/;" f -CyaSSL_GetEccSignCtx src/ssl.c /^void* CyaSSL_GetEccSignCtx(CYASSL* ssl)$/;" f -CyaSSL_GetEccVerifyCtx src/ssl.c /^void* CyaSSL_GetEccVerifyCtx(CYASSL* ssl)$/;" f -CyaSSL_GetHmacMaxSize ctaocrypt/src/hmac.c /^int CyaSSL_GetHmacMaxSize(void)$/;" f -CyaSSL_GetHmacSize src/ssl.c /^int CyaSSL_GetHmacSize(CYASSL* ssl)$/;" f -CyaSSL_GetHmacType src/tls.c /^int CyaSSL_GetHmacType(CYASSL* ssl)$/;" f -CyaSSL_GetIOReadCtx src/io.c /^CYASSL_API void* CyaSSL_GetIOReadCtx(CYASSL* ssl)$/;" f -CyaSSL_GetIOWriteCtx src/io.c /^CYASSL_API void* CyaSSL_GetIOWriteCtx(CYASSL* ssl)$/;" f -CyaSSL_GetIVSize src/ssl.c /^int CyaSSL_GetIVSize(CYASSL* ssl)$/;" f -CyaSSL_GetKeySize src/ssl.c /^int CyaSSL_GetKeySize(CYASSL* ssl)$/;" f -CyaSSL_GetMacEncryptCtx src/ssl.c /^void* CyaSSL_GetMacEncryptCtx(CYASSL* ssl)$/;" f -CyaSSL_GetMacSecret src/ssl.c /^const byte* CyaSSL_GetMacSecret(CYASSL* ssl, int verify)$/;" f -CyaSSL_GetObjectSize src/ssl.c /^int CyaSSL_GetObjectSize(void)$/;" f -CyaSSL_GetRsaDecCtx src/ssl.c /^void* CyaSSL_GetRsaDecCtx(CYASSL* ssl)$/;" f -CyaSSL_GetRsaEncCtx src/ssl.c /^void* CyaSSL_GetRsaEncCtx(CYASSL* ssl)$/;" f -CyaSSL_GetRsaSignCtx src/ssl.c /^void* CyaSSL_GetRsaSignCtx(CYASSL* ssl)$/;" f -CyaSSL_GetRsaVerifyCtx src/ssl.c /^void* CyaSSL_GetRsaVerifyCtx(CYASSL* ssl)$/;" f -CyaSSL_GetServerWriteIV src/ssl.c /^const byte* CyaSSL_GetServerWriteIV(CYASSL* ssl)$/;" f -CyaSSL_GetServerWriteKey src/ssl.c /^const byte* CyaSSL_GetServerWriteKey(CYASSL* ssl)$/;" f -CyaSSL_GetSessionAtIndex src/ssl.c /^int CyaSSL_GetSessionAtIndex(int idx, CYASSL_SESSION* session)$/;" f -CyaSSL_GetSessionIndex src/ssl.c /^int CyaSSL_GetSessionIndex(CYASSL* ssl)$/;" f -CyaSSL_GetSide src/ssl.c /^int CyaSSL_GetSide(CYASSL* ssl)$/;" f -CyaSSL_HMAC src/ssl.c /^ unsigned char* CyaSSL_HMAC(const CYASSL_EVP_MD* evp_md, const void* key,$/;" f -CyaSSL_HMAC_Final src/ssl.c /^ void CyaSSL_HMAC_Final(CYASSL_HMAC_CTX* ctx, unsigned char* hash,$/;" f -CyaSSL_HMAC_Init src/ssl.c /^ void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen,$/;" f -CyaSSL_HMAC_Update src/ssl.c /^ void CyaSSL_HMAC_Update(CYASSL_HMAC_CTX* ctx, const unsigned char* data,$/;" f -CyaSSL_HMAC_cleanup src/ssl.c /^ void CyaSSL_HMAC_cleanup(CYASSL_HMAC_CTX* ctx)$/;" f -CyaSSL_Init src/ssl.c /^int CyaSSL_Init(void)$/;" f -CyaSSL_IsTLSv1_1 src/ssl.c /^int CyaSSL_IsTLSv1_1(CYASSL* ssl)$/;" f -CyaSSL_KeepArrays src/ssl.c /^void CyaSSL_KeepArrays(CYASSL* ssl)$/;" f -CyaSSL_KeyPemToDer src/ssl.c /^int CyaSSL_KeyPemToDer(const unsigned char* pem, int pemSz, unsigned char* buff,$/;" f -CyaSSL_LoadCRL src/ssl.c /^int CyaSSL_LoadCRL(CYASSL* ssl, const char* path, int type, int monitor)$/;" f -CyaSSL_Logging_cb cyassl/ctaocrypt/logging.h /^typedef void (*CyaSSL_Logging_cb)(const int logLevel,$/;" t -CyaSSL_MD4_Final src/ssl.c /^ void CyaSSL_MD4_Final(unsigned char* digest, CYASSL_MD4_CTX* md4)$/;" f -CyaSSL_MD4_Init src/ssl.c /^ void CyaSSL_MD4_Init(CYASSL_MD4_CTX* md4)$/;" f -CyaSSL_MD4_Update src/ssl.c /^ void CyaSSL_MD4_Update(CYASSL_MD4_CTX* md4, const void* data,$/;" f -CyaSSL_MD5_Final src/ssl.c /^ void CyaSSL_MD5_Final(byte* input, CYASSL_MD5_CTX* md5)$/;" f -CyaSSL_MD5_Init src/ssl.c /^ void CyaSSL_MD5_Init(CYASSL_MD5_CTX* md5)$/;" f -CyaSSL_MD5_Update src/ssl.c /^ void CyaSSL_MD5_Update(CYASSL_MD5_CTX* md5, const void* input,$/;" f -CyaSSL_Malloc ctaocrypt/src/memory.c /^void* CyaSSL_Malloc(size_t size)$/;" f -CyaSSL_Malloc_cb cyassl/ctaocrypt/memory.h /^typedef void *(*CyaSSL_Malloc_cb)(size_t size);$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef OS_MUT CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef osMutexId CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef CRITICAL_SECTION CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef MUTEX_STRUCT CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef OS_MUTEX CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef RTP_MUTEX CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef TX_MUTEX CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef osMutexId CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef pthread_mutex_t CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef struct CyaSSL_Mutex {$/;" s -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef xSemaphoreHandle CyaSSL_Mutex;$/;" t -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ } CyaSSL_Mutex;$/;" t typeref:struct:CyaSSL_Mutex -CyaSSL_Mutex cyassl/ctaocrypt/port.h /^ typedef int CyaSSL_Mutex;$/;" t -CyaSSL_OCSP_parse_url src/ssl.c /^ int CyaSSL_OCSP_parse_url(char* url, char** host, char** port, char** path,$/;" f -CyaSSL_OPENSSL_free src/ssl.c /^ void CyaSSL_OPENSSL_free(void* p)$/;" f -CyaSSL_PEM_def_callback src/ssl.c /^ int CyaSSL_PEM_def_callback(char* name, int num, int w, void* key)$/;" f -CyaSSL_PEM_read_bio_PrivateKey src/ssl.c /^ CYASSL_EVP_PKEY* CyaSSL_PEM_read_bio_PrivateKey(CYASSL_BIO* bio,$/;" f -CyaSSL_PEM_write_bio_DSAPrivateKey src/ssl.c /^ int CyaSSL_PEM_write_bio_DSAPrivateKey(CYASSL_BIO* bio, DSA* rsa,$/;" f -CyaSSL_PEM_write_bio_RSAPrivateKey src/ssl.c /^ int CyaSSL_PEM_write_bio_RSAPrivateKey(CYASSL_BIO* bio, RSA* rsa,$/;" f -CyaSSL_PemCertToDer IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) $/;" f -CyaSSL_PemCertToDer src/ssl.c /^int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)$/;" f -CyaSSL_RAND_add src/ssl.c /^ void CyaSSL_RAND_add(const void* add, int len, double entropy)$/;" f -CyaSSL_RAND_bytes src/ssl.c /^ int CyaSSL_RAND_bytes(unsigned char* buf, int num)$/;" f -CyaSSL_RAND_egd src/ssl.c /^ int CyaSSL_RAND_egd(const char* path)$/;" f -CyaSSL_RAND_file_name src/ssl.c /^ const char* CyaSSL_RAND_file_name(char* fname, unsigned long len)$/;" f -CyaSSL_RAND_load_file src/ssl.c /^ int CyaSSL_RAND_load_file(const char* fname, long len)$/;" f -CyaSSL_RAND_screen src/ssl.c /^ void CyaSSL_RAND_screen(void)$/;" f -CyaSSL_RAND_seed src/ssl.c /^ int CyaSSL_RAND_seed(const void* seed, int len)$/;" f -CyaSSL_RAND_status src/ssl.c /^ int CyaSSL_RAND_status(void)$/;" f -CyaSSL_RAND_write_file src/ssl.c /^ int CyaSSL_RAND_write_file(const char* fname)$/;" f -CyaSSL_RSA_GenAdd src/ssl.c /^ int CyaSSL_RSA_GenAdd(CYASSL_RSA* rsa)$/;" f -CyaSSL_RSA_LoadDer src/ssl.c /^int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz)$/;" f -CyaSSL_RSA_blinding_on src/ssl.c /^ int CyaSSL_RSA_blinding_on(CYASSL_RSA* rsa, CYASSL_BN_CTX* bn)$/;" f -CyaSSL_RSA_free src/ssl.c /^ void CyaSSL_RSA_free(CYASSL_RSA* rsa)$/;" f -CyaSSL_RSA_generate_key src/ssl.c /^ CYASSL_RSA* CyaSSL_RSA_generate_key(int len, unsigned long bits,$/;" f -CyaSSL_RSA_generate_key_ex src/ssl.c /^ int CyaSSL_RSA_generate_key_ex(CYASSL_RSA* rsa, int bits, CYASSL_BIGNUM* bn,$/;" f -CyaSSL_RSA_new src/ssl.c /^ CYASSL_RSA* CyaSSL_RSA_new(void)$/;" f -CyaSSL_RSA_private_decrypt src/ssl.c /^ int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr,$/;" f -CyaSSL_RSA_public_decrypt src/ssl.c /^ int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from,$/;" f -CyaSSL_RSA_public_encrypt src/ssl.c /^ int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr,$/;" f -CyaSSL_RSA_sign src/ssl.c /^ int CyaSSL_RSA_sign(int type, const unsigned char* m,$/;" f -CyaSSL_RSA_size src/ssl.c /^ int CyaSSL_RSA_size(const CYASSL_RSA* rsa)$/;" f -CyaSSL_Realloc ctaocrypt/src/memory.c /^void* CyaSSL_Realloc(void *ptr, size_t size)$/;" f -CyaSSL_Realloc_cb cyassl/ctaocrypt/memory.h /^typedef void *(*CyaSSL_Realloc_cb)(void *ptr, size_t size);$/;" t -CyaSSL_SESSION_free src/ssl.c /^ void CyaSSL_SESSION_free(CYASSL_SESSION* session)$/;" f -CyaSSL_SESSION_get_peer_chain src/ssl.c /^CYASSL_X509_CHAIN* CyaSSL_SESSION_get_peer_chain(CYASSL_SESSION* session)$/;" f -CyaSSL_SESSION_get_time src/ssl.c /^ long CyaSSL_SESSION_get_time(const CYASSL_SESSION* sess)$/;" f -CyaSSL_SESSION_get_timeout src/ssl.c /^ long CyaSSL_SESSION_get_timeout(const CYASSL_SESSION* sess)$/;" f -CyaSSL_SHA1_Final src/ssl.c /^ void CyaSSL_SHA1_Final(byte* input, CYASSL_SHA_CTX* sha)$/;" f -CyaSSL_SHA1_Init src/ssl.c /^ void CyaSSL_SHA1_Init(CYASSL_SHA_CTX* sha)$/;" f -CyaSSL_SHA1_Update src/ssl.c /^ void CyaSSL_SHA1_Update(CYASSL_SHA_CTX* sha, const void* input,$/;" f -CyaSSL_SHA256_Final src/ssl.c /^ void CyaSSL_SHA256_Final(byte* input, CYASSL_SHA256_CTX* sha)$/;" f -CyaSSL_SHA256_Init src/ssl.c /^ void CyaSSL_SHA256_Init(CYASSL_SHA256_CTX* sha256)$/;" f -CyaSSL_SHA256_Update src/ssl.c /^ void CyaSSL_SHA256_Update(CYASSL_SHA256_CTX* sha, const void* input,$/;" f -CyaSSL_SHA384_Final src/ssl.c /^ void CyaSSL_SHA384_Final(byte* input, CYASSL_SHA384_CTX* sha)$/;" f -CyaSSL_SHA384_Init src/ssl.c /^ void CyaSSL_SHA384_Init(CYASSL_SHA384_CTX* sha)$/;" f -CyaSSL_SHA384_Update src/ssl.c /^ void CyaSSL_SHA384_Update(CYASSL_SHA384_CTX* sha, const void* input,$/;" f -CyaSSL_SHA512_Final src/ssl.c /^ void CyaSSL_SHA512_Final(byte* input, CYASSL_SHA512_CTX* sha)$/;" f -CyaSSL_SHA512_Init src/ssl.c /^ void CyaSSL_SHA512_Init(CYASSL_SHA512_CTX* sha)$/;" f -CyaSSL_SHA512_Update src/ssl.c /^ void CyaSSL_SHA512_Update(CYASSL_SHA512_CTX* sha, const void* input,$/;" f -CyaSSL_SHA_Final src/ssl.c /^ void CyaSSL_SHA_Final(byte* input, CYASSL_SHA_CTX* sha)$/;" f -CyaSSL_SHA_Init src/ssl.c /^ void CyaSSL_SHA_Init(CYASSL_SHA_CTX* sha)$/;" f -CyaSSL_SHA_Update src/ssl.c /^ void CyaSSL_SHA_Update(CYASSL_SHA_CTX* sha, const void* input,$/;" f -CyaSSL_SNI_GetFromBuffer src/ssl.c /^int CyaSSL_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz, byte type,$/;" f -CyaSSL_SNI_GetRequest src/ssl.c /^word16 CyaSSL_SNI_GetRequest(CYASSL* ssl, byte type, void** data)$/;" f -CyaSSL_SNI_SetOptions src/ssl.c /^void CyaSSL_SNI_SetOptions(CYASSL* ssl, byte type, byte options)$/;" f -CyaSSL_SNI_Status src/ssl.c /^byte CyaSSL_SNI_Status(CYASSL* ssl, byte type)$/;" f -CyaSSL_SetAllocators ctaocrypt/src/memory.c /^int CyaSSL_SetAllocators(CyaSSL_Malloc_cb mf,$/;" f -CyaSSL_SetCRL_Cb src/ssl.c /^int CyaSSL_SetCRL_Cb(CYASSL* ssl, CbMissingCRL cb)$/;" f -CyaSSL_SetCertCbCtx src/ssl.c /^void CyaSSL_SetCertCbCtx(CYASSL* ssl, void* ctx)$/;" f -CyaSSL_SetCookieCtx src/io.c /^CYASSL_API void CyaSSL_SetCookieCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetDecryptVerifyCtx src/ssl.c /^void CyaSSL_SetDecryptVerifyCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetEccSignCtx src/ssl.c /^void CyaSSL_SetEccSignCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetEccVerifyCtx src/ssl.c /^void CyaSSL_SetEccVerifyCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetIOReadCtx src/io.c /^CYASSL_API void CyaSSL_SetIOReadCtx(CYASSL* ssl, void *rctx)$/;" f -CyaSSL_SetIOReadFlags src/io.c /^CYASSL_API void CyaSSL_SetIOReadFlags(CYASSL* ssl, int flags)$/;" f -CyaSSL_SetIORecv src/io.c /^CYASSL_API void CyaSSL_SetIORecv(CYASSL_CTX *ctx, CallbackIORecv CBIORecv)$/;" f -CyaSSL_SetIOSend src/io.c /^CYASSL_API void CyaSSL_SetIOSend(CYASSL_CTX *ctx, CallbackIOSend CBIOSend)$/;" f -CyaSSL_SetIOWriteCtx src/io.c /^CYASSL_API void CyaSSL_SetIOWriteCtx(CYASSL* ssl, void *wctx)$/;" f -CyaSSL_SetIOWriteFlags src/io.c /^CYASSL_API void CyaSSL_SetIOWriteFlags(CYASSL* ssl, int flags)$/;" f -CyaSSL_SetIO_NetX src/io.c /^void CyaSSL_SetIO_NetX(CYASSL* ssl, NX_TCP_SOCKET* nxSocket, ULONG waitOption)$/;" f -CyaSSL_SetInternalIV src/ssl.c /^ int CyaSSL_SetInternalIV(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_SetLoggingCb ctaocrypt/src/logging.c /^int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f)$/;" f -CyaSSL_SetMacEncryptCtx src/ssl.c /^void CyaSSL_SetMacEncryptCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetOCSP_Cb src/ssl.c /^int CyaSSL_SetOCSP_Cb(CYASSL* ssl,$/;" f -CyaSSL_SetOCSP_OverrideURL src/ssl.c /^int CyaSSL_SetOCSP_OverrideURL(CYASSL* ssl, const char* url)$/;" f -CyaSSL_SetRsaDecCtx src/ssl.c /^void CyaSSL_SetRsaDecCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetRsaEncCtx src/ssl.c /^void CyaSSL_SetRsaEncCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetRsaSignCtx src/ssl.c /^void CyaSSL_SetRsaSignCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetRsaVerifyCtx src/ssl.c /^void CyaSSL_SetRsaVerifyCtx(CYASSL* ssl, void *ctx)$/;" f -CyaSSL_SetServerID src/ssl.c /^int CyaSSL_SetServerID(CYASSL* ssl, const byte* id, int len, int newSession)$/;" f -CyaSSL_SetTlsHmacInner src/tls.c /^int CyaSSL_SetTlsHmacInner(CYASSL* ssl, byte* inner, word32 sz, int content,$/;" f -CyaSSL_SetTmpDH src/ssl.c /^int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz,$/;" f -CyaSSL_SetTmpDH_buffer src/ssl.c /^int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, const unsigned char* buf, long sz,$/;" f -CyaSSL_SetTmpDH_buffer_wrapper src/ssl.c /^static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,$/;" f file: -CyaSSL_SetTmpDH_file src/ssl.c /^int CyaSSL_SetTmpDH_file(CYASSL* ssl, const char* fname, int format)$/;" f -CyaSSL_SetTmpDH_file_wrapper src/ssl.c /^static int CyaSSL_SetTmpDH_file_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,$/;" f file: -CyaSSL_SetTmpEC_DHE_Sz src/ssl.c /^int CyaSSL_SetTmpEC_DHE_Sz(CYASSL* ssl, word16 sz)$/;" f -CyaSSL_SetVersion src/ssl.c /^int CyaSSL_SetVersion(CYASSL* ssl, int version)$/;" f -CyaSSL_StoreExternalIV src/ssl.c /^ int CyaSSL_StoreExternalIV(CYASSL_EVP_CIPHER_CTX* ctx)$/;" f -CyaSSL_TEST_H cyassl/test.h 4;" d -CyaSSL_UNIT_H tests/unit.h 4;" d -CyaSSL_UnloadCertsKeys src/ssl.c /^ int CyaSSL_UnloadCertsKeys(CYASSL* ssl)$/;" f -CyaSSL_UseCavium src/ssl.c /^int CyaSSL_UseCavium(CYASSL* ssl, int devId)$/;" f -CyaSSL_UseMaxFragment src/ssl.c /^int CyaSSL_UseMaxFragment(CYASSL* ssl, byte mfl)$/;" f -CyaSSL_UseSNI src/ssl.c /^int CyaSSL_UseSNI(CYASSL* ssl, byte type, const void* data, word16 size)$/;" f -CyaSSL_UseSupportedCurve src/ssl.c /^int CyaSSL_UseSupportedCurve(CYASSL* ssl, word16 name)$/;" f -CyaSSL_UseTruncatedHMAC src/ssl.c /^int CyaSSL_UseTruncatedHMAC(CYASSL* ssl)$/;" f -CyaSSL_X509_CRL_get_REVOKED src/ssl.c /^ CYASSL_X509_REVOKED* CyaSSL_X509_CRL_get_REVOKED(CYASSL_X509_CRL* crl)$/;" f -CyaSSL_X509_CRL_get_lastUpdate src/ssl.c /^ CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_lastUpdate(CYASSL_X509_CRL* crl)$/;" f -CyaSSL_X509_CRL_get_nextUpdate src/ssl.c /^ CYASSL_ASN1_TIME* CyaSSL_X509_CRL_get_nextUpdate(CYASSL_X509_CRL* crl)$/;" f -CyaSSL_X509_CRL_verify src/ssl.c /^ int CyaSSL_X509_CRL_verify(CYASSL_X509_CRL* crl, CYASSL_EVP_PKEY* key)$/;" f -CyaSSL_X509_LOOKUP_add_dir src/ssl.c /^ int CyaSSL_X509_LOOKUP_add_dir(CYASSL_X509_LOOKUP* lookup, const char* dir,$/;" f -CyaSSL_X509_LOOKUP_file src/ssl.c /^ CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_file(void)$/;" f -CyaSSL_X509_LOOKUP_hash_dir src/ssl.c /^ CYASSL_X509_LOOKUP_METHOD* CyaSSL_X509_LOOKUP_hash_dir(void)$/;" f -CyaSSL_X509_LOOKUP_load_file src/ssl.c /^ int CyaSSL_X509_LOOKUP_load_file(CYASSL_X509_LOOKUP* lookup,$/;" f -CyaSSL_X509_NAME_entry_count src/ssl.c /^ int CyaSSL_X509_NAME_entry_count(CYASSL_X509_NAME* name)$/;" f -CyaSSL_X509_NAME_get_text_by_NID src/ssl.c /^ int CyaSSL_X509_NAME_get_text_by_NID(CYASSL_X509_NAME* name,$/;" f -CyaSSL_X509_NAME_oneline src/ssl.c /^ char* CyaSSL_X509_NAME_oneline(CYASSL_X509_NAME* name, char* in, int sz)$/;" f -CyaSSL_X509_OBJECT_free_contents src/ssl.c /^ void CyaSSL_X509_OBJECT_free_contents(CYASSL_X509_OBJECT* obj)$/;" f -CyaSSL_X509_STORE_CTX_cleanup src/ssl.c /^ void CyaSSL_X509_STORE_CTX_cleanup(CYASSL_X509_STORE_CTX* ctx)$/;" f -CyaSSL_X509_STORE_CTX_free src/ssl.c /^ void CyaSSL_X509_STORE_CTX_free(CYASSL_X509_STORE_CTX* ctx)$/;" f -CyaSSL_X509_STORE_CTX_get_current_cert src/ssl.c /^ CYASSL_X509* CyaSSL_X509_STORE_CTX_get_current_cert($/;" f -CyaSSL_X509_STORE_CTX_get_error src/ssl.c /^ int CyaSSL_X509_STORE_CTX_get_error(CYASSL_X509_STORE_CTX* ctx)$/;" f -CyaSSL_X509_STORE_CTX_get_error_depth src/ssl.c /^ int CyaSSL_X509_STORE_CTX_get_error_depth(CYASSL_X509_STORE_CTX* ctx)$/;" f -CyaSSL_X509_STORE_CTX_get_ex_data src/ssl.c /^ void* CyaSSL_X509_STORE_CTX_get_ex_data(CYASSL_X509_STORE_CTX* ctx, int idx)$/;" f -CyaSSL_X509_STORE_CTX_init src/ssl.c /^ int CyaSSL_X509_STORE_CTX_init(CYASSL_X509_STORE_CTX* ctx,$/;" f -CyaSSL_X509_STORE_CTX_new src/ssl.c /^ CYASSL_X509_STORE_CTX* CyaSSL_X509_STORE_CTX_new(void)$/;" f -CyaSSL_X509_STORE_CTX_set_error src/ssl.c /^ void CyaSSL_X509_STORE_CTX_set_error(CYASSL_X509_STORE_CTX* ctx, int err)$/;" f -CyaSSL_X509_STORE_add_cert src/ssl.c /^ int CyaSSL_X509_STORE_add_cert(CYASSL_X509_STORE* store, CYASSL_X509* x509)$/;" f -CyaSSL_X509_STORE_add_lookup src/ssl.c /^ CYASSL_X509_LOOKUP* CyaSSL_X509_STORE_add_lookup(CYASSL_X509_STORE* store,$/;" f -CyaSSL_X509_STORE_free src/ssl.c /^ void CyaSSL_X509_STORE_free(CYASSL_X509_STORE* store)$/;" f -CyaSSL_X509_STORE_get_by_subject src/ssl.c /^ int CyaSSL_X509_STORE_get_by_subject(CYASSL_X509_STORE_CTX* ctx, int idx,$/;" f -CyaSSL_X509_STORE_new src/ssl.c /^ CYASSL_X509_STORE* CyaSSL_X509_STORE_new(void)$/;" f -CyaSSL_X509_STORE_set_default_paths src/ssl.c /^ int CyaSSL_X509_STORE_set_default_paths(CYASSL_X509_STORE* store)$/;" f -CyaSSL_X509_cmp_current_time src/ssl.c /^ int CyaSSL_X509_cmp_current_time(const CYASSL_ASN1_TIME* asnTime)$/;" f -CyaSSL_X509_d2i src/ssl.c /^CYASSL_X509* CyaSSL_X509_d2i(CYASSL_X509** x509, const byte* in, int len)$/;" f -CyaSSL_X509_d2i_fp src/ssl.c /^CYASSL_X509* CyaSSL_X509_d2i_fp(CYASSL_X509** x509, XFILE file)$/;" f -CyaSSL_X509_ext_get_critical_by_NID src/ssl.c /^ int CyaSSL_X509_ext_get_critical_by_NID(CYASSL_X509* x509, int nid)$/;" f -CyaSSL_X509_ext_isSet_by_NID src/ssl.c /^ int CyaSSL_X509_ext_isSet_by_NID(CYASSL_X509* x509, int nid)$/;" f -CyaSSL_X509_free src/ssl.c /^ void CyaSSL_X509_free(CYASSL_X509* buf)$/;" f -CyaSSL_X509_get_authorityKeyID src/ssl.c /^ byte* CyaSSL_X509_get_authorityKeyID($/;" f -CyaSSL_X509_get_der src/ssl.c /^ const byte* CyaSSL_X509_get_der(CYASSL_X509* x509, int* outSz)$/;" f -CyaSSL_X509_get_device_type src/ssl.c /^byte* CyaSSL_X509_get_device_type(CYASSL_X509* x509, byte* in, int *inOutSz)$/;" f -CyaSSL_X509_get_hw_serial_number src/ssl.c /^byte* CyaSSL_X509_get_hw_serial_number(CYASSL_X509* x509,byte* in,int* inOutSz)$/;" f -CyaSSL_X509_get_hw_type src/ssl.c /^byte* CyaSSL_X509_get_hw_type(CYASSL_X509* x509, byte* in, int* inOutSz)$/;" f -CyaSSL_X509_get_isCA src/ssl.c /^ int CyaSSL_X509_get_isCA(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_isSet_pathLength src/ssl.c /^ int CyaSSL_X509_get_isSet_pathLength(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_issuer_name src/ssl.c /^ CYASSL_X509_NAME* CyaSSL_X509_get_issuer_name(CYASSL_X509* cert)$/;" f -CyaSSL_X509_get_keyUsage src/ssl.c /^ unsigned int CyaSSL_X509_get_keyUsage(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_next_altname src/ssl.c /^ char* CyaSSL_X509_get_next_altname(CYASSL_X509* cert)$/;" f -CyaSSL_X509_get_pathLength src/ssl.c /^ word32 CyaSSL_X509_get_pathLength(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_pubkey src/ssl.c /^ CYASSL_EVP_PKEY* CyaSSL_X509_get_pubkey(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_serialNumber src/ssl.c /^ CYASSL_ASN1_INTEGER* CyaSSL_X509_get_serialNumber(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_serial_number src/ssl.c /^ int CyaSSL_X509_get_serial_number(CYASSL_X509* x509, byte* in, int* inOutSz)$/;" f -CyaSSL_X509_get_signature src/ssl.c /^ int CyaSSL_X509_get_signature(CYASSL_X509* x509,$/;" f -CyaSSL_X509_get_signature_type src/ssl.c /^ int CyaSSL_X509_get_signature_type(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_subjectCN src/ssl.c /^ char* CyaSSL_X509_get_subjectCN(CYASSL_X509* x509)$/;" f -CyaSSL_X509_get_subjectKeyID src/ssl.c /^ byte* CyaSSL_X509_get_subjectKeyID($/;" f -CyaSSL_X509_get_subject_name src/ssl.c /^ CYASSL_X509_NAME* CyaSSL_X509_get_subject_name(CYASSL_X509* cert)$/;" f -CyaSSL_X509_load_certificate_file src/ssl.c /^CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format)$/;" f -CyaSSL_X509_notAfter src/ssl.c /^ const byte* CyaSSL_X509_notAfter(CYASSL_X509* x509)$/;" f -CyaSSL_X509_notBefore src/ssl.c /^ const byte* CyaSSL_X509_notBefore(CYASSL_X509* x509)$/;" f -CyaSSL_X509_verify_cert src/ssl.c /^ int CyaSSL_X509_verify_cert(CYASSL_X509_STORE_CTX* ctx)$/;" f -CyaSSL_X509_verify_cert_error_string src/ssl.c /^ const char* CyaSSL_X509_verify_cert_error_string(long err)$/;" f -CyaSSL_X509_version src/ssl.c /^ int CyaSSL_X509_version(CYASSL_X509* x509)$/;" f -CyaSSL_accept src/ssl.c /^ int CyaSSL_accept(CYASSL* ssl)$/;" f -CyaSSL_accept_ex src/ssl.c /^ int CyaSSL_accept_ex(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f -CyaSSL_add_all_algorithms src/ssl.c /^ int CyaSSL_add_all_algorithms(void)$/;" f -CyaSSL_aes_ctr_iv src/ssl.c /^ void CyaSSL_aes_ctr_iv(CYASSL_EVP_CIPHER_CTX* ctx, int doset,$/;" f -CyaSSL_alert_desc_string_long src/ssl.c /^ char* CyaSSL_alert_desc_string_long(int alertID)$/;" f -CyaSSL_alert_type_string_long src/ssl.c /^ char* CyaSSL_alert_type_string_long(int alertID)$/;" f -CyaSSL_cert_service src/ssl.c /^ void CyaSSL_cert_service(void) {}$/;" f -CyaSSL_check_domain_name src/ssl.c /^int CyaSSL_check_domain_name(CYASSL* ssl, const char* dn)$/;" f -CyaSSL_cleanup_all_ex_data src/ssl.c /^ void CyaSSL_cleanup_all_ex_data(void)$/;" f -CyaSSL_cmp_peer_cert_to_file src/ssl.c /^ int CyaSSL_cmp_peer_cert_to_file(CYASSL* ssl, const char *fname)$/;" f -CyaSSL_connect src/ssl.c /^ int CyaSSL_connect(CYASSL* ssl)$/;" f -CyaSSL_connect_cert src/ssl.c /^int CyaSSL_connect_cert(CYASSL* ssl)$/;" f -CyaSSL_connect_ex src/ssl.c /^ int CyaSSL_connect_ex(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f -CyaSSL_d2i_SSL_SESSION src/ssl.c /^ CYASSL_SESSION* CyaSSL_d2i_SSL_SESSION(CYASSL_SESSION** sess,$/;" f -CyaSSL_dtls IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f -CyaSSL_dtls IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f -CyaSSL_dtls src/ssl.c /^int CyaSSL_dtls(CYASSL* ssl)$/;" f -CyaSSL_dtls_get_current_timeout src/ssl.c /^int CyaSSL_dtls_get_current_timeout(CYASSL* ssl)$/;" f -CyaSSL_dtls_get_peer src/ssl.c /^int CyaSSL_dtls_get_peer(CYASSL* ssl, void* peer, unsigned int* peerSz)$/;" f -CyaSSL_dtls_got_timeout src/ssl.c /^int CyaSSL_dtls_got_timeout(CYASSL* ssl)$/;" f -CyaSSL_dtls_set_peer src/ssl.c /^int CyaSSL_dtls_set_peer(CYASSL* ssl, void* peer, unsigned int peerSz)$/;" f -CyaSSL_dtls_set_timeout_init src/ssl.c /^int CyaSSL_dtls_set_timeout_init(CYASSL* ssl, int timeout)$/;" f -CyaSSL_dtls_set_timeout_max src/ssl.c /^int CyaSSL_dtls_set_timeout_max(CYASSL* ssl, int timeout)$/;" f -CyaSSL_error_string swig/cyassl_adds.c /^char* CyaSSL_error_string(int err)$/;" f -CyaSSL_ex_wrapper src/ssl.c /^ static int CyaSSL_ex_wrapper(CYASSL* ssl, HandShakeCallBack hsCb,$/;" f file: -CyaSSL_flush_sessions src/ssl.c /^void CyaSSL_flush_sessions(CYASSL_CTX* ctx, long tm)$/;" f -CyaSSL_fopen IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^FILE * CyaSSL_fopen(const char *name, const char *openmode) $/;" f -CyaSSL_fopen IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^FILE * CyaSSL_fopen(const char *name, const char *openmode) $/;" f -CyaSSL_free src/ssl.c /^void CyaSSL_free(CYASSL* ssl)$/;" f -CyaSSL_get1_session src/ssl.c /^ CYASSL_SESSION* CyaSSL_get1_session(CYASSL* ssl) \/* what's ref count *\/$/;" f -CyaSSL_get_alert_history src/ssl.c /^int CyaSSL_get_alert_history(CYASSL* ssl, CYASSL_ALERT_HISTORY *h)$/;" f -CyaSSL_get_chain_X509 src/ssl.c /^CYASSL_X509* CyaSSL_get_chain_X509(CYASSL_X509_CHAIN* chain, int idx)$/;" f -CyaSSL_get_chain_cert src/ssl.c /^byte* CyaSSL_get_chain_cert(CYASSL_X509_CHAIN* chain, int idx)$/;" f -CyaSSL_get_chain_cert_pem src/ssl.c /^int CyaSSL_get_chain_cert_pem(CYASSL_X509_CHAIN* chain, int idx,$/;" f -CyaSSL_get_chain_count src/ssl.c /^int CyaSSL_get_chain_count(CYASSL_X509_CHAIN* chain)$/;" f -CyaSSL_get_chain_length src/ssl.c /^int CyaSSL_get_chain_length(CYASSL_X509_CHAIN* chain, int idx)$/;" f -CyaSSL_get_cipher src/ssl.c /^ const char* CyaSSL_get_cipher(CYASSL* ssl)$/;" f -CyaSSL_get_current_cipher src/ssl.c /^ CYASSL_CIPHER* CyaSSL_get_current_cipher(CYASSL* ssl)$/;" f -CyaSSL_get_current_cipher_suite src/ssl.c /^ int CyaSSL_get_current_cipher_suite(CYASSL* ssl)$/;" f -CyaSSL_get_error src/ssl.c /^int CyaSSL_get_error(CYASSL* ssl, int ret)$/;" f -CyaSSL_get_ex_data src/ssl.c /^ void* CyaSSL_get_ex_data(const CYASSL* ssl, int idx)$/;" f -CyaSSL_get_ex_data_X509_STORE_CTX_idx src/ssl.c /^ int CyaSSL_get_ex_data_X509_STORE_CTX_idx(void)$/;" f -CyaSSL_get_ex_new_index src/ssl.c /^ int CyaSSL_get_ex_new_index(long idx, void* data, void* cb1, void* cb2,$/;" f -CyaSSL_get_fd src/ssl.c /^int CyaSSL_get_fd(const CYASSL* ssl)$/;" f -CyaSSL_get_keyblock_size src/ssl.c /^ int CyaSSL_get_keyblock_size(CYASSL* ssl)$/;" f -CyaSSL_get_keys src/ssl.c /^ int CyaSSL_get_keys(CYASSL* ssl, unsigned char** ms, unsigned int* msLen,$/;" f -CyaSSL_get_peer_certificate src/ssl.c /^ CYASSL_X509* CyaSSL_get_peer_certificate(CYASSL* ssl)$/;" f -CyaSSL_get_peer_chain src/ssl.c /^CYASSL_X509_CHAIN* CyaSSL_get_peer_chain(CYASSL* ssl)$/;" f -CyaSSL_get_psk_identity src/ssl.c /^ const char* CyaSSL_get_psk_identity(const CYASSL* ssl)$/;" f -CyaSSL_get_psk_identity_hint src/ssl.c /^ const char* CyaSSL_get_psk_identity_hint(const CYASSL* ssl)$/;" f -CyaSSL_get_session src/ssl.c /^CYASSL_SESSION* CyaSSL_get_session(CYASSL* ssl)$/;" f -CyaSSL_get_sessionID src/ssl.c /^const byte* CyaSSL_get_sessionID(const CYASSL_SESSION* session)$/;" f -CyaSSL_get_session_cache_memsize src/ssl.c /^int CyaSSL_get_session_cache_memsize(void)$/;" f -CyaSSL_get_shutdown src/ssl.c /^ int CyaSSL_get_shutdown(const CYASSL* ssl)$/;" f -CyaSSL_get_using_nonblock IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f -CyaSSL_get_using_nonblock IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f -CyaSSL_get_using_nonblock src/ssl.c /^int CyaSSL_get_using_nonblock(CYASSL* ssl)$/;" f -CyaSSL_get_version src/ssl.c /^ const char* CyaSSL_get_version(CYASSL* ssl)$/;" f -CyaSSL_i2d_SSL_SESSION src/ssl.c /^ int CyaSSL_i2d_SSL_SESSION(CYASSL_SESSION* sess, unsigned char** p)$/;" f -CyaSSL_is_init_finished src/ssl.c /^ int CyaSSL_is_init_finished(CYASSL* ssl)$/;" f -CyaSSL_library_init src/ssl.c /^int CyaSSL_library_init(void)$/;" f -CyaSSL_load_error_strings src/ssl.c /^void CyaSSL_load_error_strings(void) \/* compatibility only *\/$/;" f -CyaSSL_make_eap_keys src/tls.c /^int CyaSSL_make_eap_keys(CYASSL* ssl, void* msk, unsigned int len,$/;" f -CyaSSL_mask_bits src/ssl.c /^ int CyaSSL_mask_bits(CYASSL_BIGNUM* bn, int n)$/;" f -CyaSSL_memrestore_session_cache src/ssl.c /^int CyaSSL_memrestore_session_cache(const void* mem, int sz)$/;" f -CyaSSL_memsave_session_cache src/ssl.c /^int CyaSSL_memsave_session_cache(void* mem, int sz)$/;" f -CyaSSL_mt0 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v -CyaSSL_mt1 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v -CyaSSL_mt2 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt0) ; osMutexDef(CyaSSL_mt1) ; osMutexDef(CyaSSL_mt2) ;$/;" v -CyaSSL_mt3 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v -CyaSSL_mt4 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v -CyaSSL_mt5 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt3) ; osMutexDef(CyaSSL_mt4) ; osMutexDef(CyaSSL_mt5) ; $/;" v -CyaSSL_mt6 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v -CyaSSL_mt7 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v -CyaSSL_mt8 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt6) ; osMutexDef(CyaSSL_mt7) ; osMutexDef(CyaSSL_mt8) ; $/;" v -CyaSSL_mt9 ctaocrypt/src/port.c /^ osMutexDef(CyaSSL_mt9) ; $/;" v -CyaSSL_negotiate src/ssl.c /^int CyaSSL_negotiate(CYASSL* ssl)$/;" f -CyaSSL_new src/ssl.c /^CYASSL* CyaSSL_new(CYASSL_CTX* ctx)$/;" f -CyaSSL_num_locks src/ssl.c /^ int CyaSSL_num_locks(void)$/;" f -CyaSSL_peek src/ssl.c /^int CyaSSL_peek(CYASSL* ssl, void* data, int sz)$/;" f -CyaSSL_pending src/ssl.c /^int CyaSSL_pending(CYASSL* ssl)$/;" f -CyaSSL_read src/ssl.c /^int CyaSSL_read(CYASSL* ssl, void* data, int sz)$/;" f -CyaSSL_read_internal src/ssl.c /^static int CyaSSL_read_internal(CYASSL* ssl, void* data, int sz, int peek)$/;" f file: -CyaSSL_recv src/ssl.c /^int CyaSSL_recv(CYASSL* ssl, void* data, int sz, int flags)$/;" f -CyaSSL_restore_session_cache src/ssl.c /^int CyaSSL_restore_session_cache(const char *fname)$/;" f -CyaSSL_save_session_cache src/ssl.c /^int CyaSSL_save_session_cache(const char *fname)$/;" f -CyaSSL_send src/ssl.c /^int CyaSSL_send(CYASSL* ssl, const void* data, int sz, int flags)$/;" f -CyaSSL_session_reused src/ssl.c /^ int CyaSSL_session_reused(CYASSL* ssl)$/;" f -CyaSSL_set_accept_state src/ssl.c /^ void CyaSSL_set_accept_state(CYASSL* ssl)$/;" f -CyaSSL_set_bio src/ssl.c /^ void CyaSSL_set_bio(CYASSL* ssl, CYASSL_BIO* rd, CYASSL_BIO* wr)$/;" f -CyaSSL_set_cipher_list src/ssl.c /^int CyaSSL_set_cipher_list(CYASSL* ssl, const char* list)$/;" f -CyaSSL_set_compression src/ssl.c /^int CyaSSL_set_compression(CYASSL* ssl)$/;" f -CyaSSL_set_connect_state src/ssl.c /^ void CyaSSL_set_connect_state(CYASSL* ssl)$/;" f -CyaSSL_set_dynlock_destroy_callback src/ssl.c /^ void CyaSSL_set_dynlock_destroy_callback($/;" f -CyaSSL_set_dynlock_lock_callback src/ssl.c /^ void CyaSSL_set_dynlock_lock_callback($/;" f -CyaSSL_set_ex_data src/ssl.c /^ int CyaSSL_set_ex_data(CYASSL* ssl, int idx, void* data)$/;" f -CyaSSL_set_fd src/ssl.c /^int CyaSSL_set_fd(CYASSL* ssl, int fd)$/;" f -CyaSSL_set_group_messages src/ssl.c /^int CyaSSL_set_group_messages(CYASSL* ssl)$/;" f -CyaSSL_set_id_callback src/ssl.c /^ void CyaSSL_set_id_callback(unsigned long (*f)(void))$/;" f -CyaSSL_set_locking_callback src/ssl.c /^ void CyaSSL_set_locking_callback(void (*f)(int, int, const char*, int))$/;" f -CyaSSL_set_psk_client_callback src/ssl.c /^ void CyaSSL_set_psk_client_callback(CYASSL* ssl, psk_client_callback cb)$/;" f -CyaSSL_set_psk_server_callback src/ssl.c /^ void CyaSSL_set_psk_server_callback(CYASSL* ssl, psk_server_callback cb)$/;" f -CyaSSL_set_quiet_shutdown src/ssl.c /^ void CyaSSL_set_quiet_shutdown(CYASSL* ssl, int mode)$/;" f -CyaSSL_set_rfd src/ssl.c /^ int CyaSSL_set_rfd(CYASSL* ssl, int rfd)$/;" f -CyaSSL_set_session src/ssl.c /^int CyaSSL_set_session(CYASSL* ssl, CYASSL_SESSION* session)$/;" f -CyaSSL_set_session_id_context src/ssl.c /^ int CyaSSL_set_session_id_context(CYASSL* ssl, const unsigned char* id,$/;" f -CyaSSL_set_shutdown src/ssl.c /^ void CyaSSL_set_shutdown(CYASSL* ssl, int opt)$/;" f -CyaSSL_set_timeout src/ssl.c /^int CyaSSL_set_timeout(CYASSL* ssl, unsigned int to)$/;" f -CyaSSL_set_using_nonblock src/ssl.c /^void CyaSSL_set_using_nonblock(CYASSL* ssl, int nonblock)$/;" f -CyaSSL_set_verify src/ssl.c /^void CyaSSL_set_verify(CYASSL* ssl, int mode, VerifyCallback vc)$/;" f -CyaSSL_set_wfd src/ssl.c /^ int CyaSSL_set_wfd(CYASSL* ssl, int wfd)$/;" f -CyaSSL_shutdown src/ssl.c /^int CyaSSL_shutdown(CYASSL* ssl)$/;" f -CyaSSL_sk_X509_REVOKED_num src/ssl.c /^ int CyaSSL_sk_X509_REVOKED_num(CYASSL_X509_REVOKED* revoked)$/;" f -CyaSSL_sk_X509_REVOKED_value src/ssl.c /^ CYASSL_X509_REVOKED* CyaSSL_sk_X509_REVOKED_value($/;" f -CyaSSL_sk_num src/ssl.c /^ int CyaSSL_sk_num(CYASSL_X509_REVOKED* rev)$/;" f -CyaSSL_sk_value src/ssl.c /^ void* CyaSSL_sk_value(CYASSL_X509_REVOKED* rev, int i)$/;" f -CyaSSL_state_string_long src/ssl.c /^ char* CyaSSL_state_string_long(CYASSL* ssl)$/;" f -CyaSSL_swig_connect swig/cyassl_adds.c /^int CyaSSL_swig_connect(CYASSL* ssl, const char* server, int port)$/;" f -CyaSSL_use_PrivateKey_buffer src/ssl.c /^ int CyaSSL_use_PrivateKey_buffer(CYASSL* ssl,$/;" f -CyaSSL_use_PrivateKey_file src/ssl.c /^int CyaSSL_use_PrivateKey_file(CYASSL* ssl, const char* file, int format)$/;" f -CyaSSL_use_RSAPrivateKey_file src/ssl.c /^ int CyaSSL_use_RSAPrivateKey_file(CYASSL* ssl, const char* file, int format)$/;" f -CyaSSL_use_certificate_buffer src/ssl.c /^ int CyaSSL_use_certificate_buffer(CYASSL* ssl,$/;" f -CyaSSL_use_certificate_chain_buffer src/ssl.c /^ int CyaSSL_use_certificate_chain_buffer(CYASSL* ssl,$/;" f -CyaSSL_use_certificate_chain_file src/ssl.c /^int CyaSSL_use_certificate_chain_file(CYASSL* ssl, const char* file)$/;" f -CyaSSL_use_certificate_file src/ssl.c /^int CyaSSL_use_certificate_file(CYASSL* ssl, const char* file, int format)$/;" f -CyaSSL_use_psk_identity_hint src/ssl.c /^ int CyaSSL_use_psk_identity_hint(CYASSL* ssl, const char* hint)$/;" f -CyaSSL_want_read src/ssl.c /^int CyaSSL_want_read(CYASSL* ssl)$/;" f -CyaSSL_want_write src/ssl.c /^int CyaSSL_want_write(CYASSL* ssl)$/;" f -CyaSSL_wolfSCEP src/ssl.c /^ void CyaSSL_wolfSCEP(void) {}$/;" f -CyaSSL_write src/ssl.c /^int CyaSSL_write(CYASSL* ssl, const void* data, int sz)$/;" f -CyaSSL_writev src/ssl.c /^ int CyaSSL_writev(CYASSL* ssl, const struct iovec* iov, int iovcnt)$/;" f -CyaSSLeay src/ssl.c /^ unsigned long CyaSSLeay(void)$/;" f -CyaSSLeay_version src/ssl.c /^ const char* CyaSSLeay_version(int type)$/;" f -CyaSSLv23_client_method src/tls.c /^ CYASSL_METHOD* CyaSSLv23_client_method(void)$/;" f -CyaSSLv23_server_method src/tls.c /^ CYASSL_METHOD* CyaSSLv23_server_method(void)$/;" f -CyaSSLv2_client_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv2_client_method(void)$/;" f -CyaSSLv2_server_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv2_server_method(void)$/;" f -CyaSSLv3_client_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv3_client_method(void)$/;" f -CyaSSLv3_server_method src/ssl.c /^ CYASSL_METHOD* CyaSSLv3_server_method(void)$/;" f -CyaTLSv1_1_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_1_client_method(void)$/;" f -CyaTLSv1_1_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_1_server_method(void)$/;" f -CyaTLSv1_2_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_2_client_method(void)$/;" f -CyaTLSv1_2_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_2_server_method(void)$/;" f -CyaTLSv1_client_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_client_method(void)$/;" f -CyaTLSv1_server_method src/tls.c /^ CYASSL_METHOD* CyaTLSv1_server_method(void)$/;" f -CyasslDebug IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^static int CyasslDebug = 1 ;$/;" v file: -CyasslDebug IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^static int CyasslDebug = 1 ;$/;" v file: -Cyassl_MDK_gmtime IDE/MDK-ARM/LPC43xx/time-LCP43xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f -Cyassl_MDK_gmtime IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f -Cyassl_MDK_gmtime IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^struct tm *Cyassl_MDK_gmtime(const time_t *c) $/;" f -Cyassl_accept IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) $/;" f -Cyassl_accept IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen) $/;" f -Cyassl_connect IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) $/;" f -Cyassl_connect IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_connect(int sd, const struct sockaddr* sa, int sz) $/;" f -Cyassl_fgets IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^char * Cyassl_fgets ( char * str, int num, FILE * f ) $/;" f -Cyassl_fgets IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^char * Cyassl_fgets ( char * str, int num, FILE * f ) $/;" f -Cyassl_recv IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_recv(int sd, void *buf, size_t len, int flags) $/;" f -Cyassl_recv IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_recv(int sd, void *buf, size_t len, int flags) $/;" f -Cyassl_send IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_send(int sd, const void *buf, size_t len, int flags) $/;" f -Cyassl_send IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_send(int sd, const void *buf, size_t len, int flags) $/;" f -Cyassl_sleep IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^void Cyassl_sleep(int t) $/;" f -Cyassl_sleep IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^void Cyassl_sleep(int t) $/;" f -Cyassl_tcp_select IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_tcp_select(int sd, int timeout) $/;" f -Cyassl_tcp_select IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c /^int Cyassl_tcp_select(int sd, int timeout) $/;" f -DAC_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^DAC_IRQHandler$/;" l -DATA Makefile /^DATA = $(dist_doc_DATA) $(dist_example_DATA) $(pkgconfig_DATA)$/;" m -DATA cyassl/ctaocrypt/pkcs7.h /^ DATA = 651, \/* 1.2.840.113549.1.7.1 *\/$/;" e enum:PKCS7_TYPES -DATE_E cyassl/ctaocrypt/error-crypt.h /^ DATE_E = -135, \/* setting date validity error *\/$/;" e enum:__anon61 -DBG_ARP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 41;" d file: -DBG_ARP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 35;" d file: -DBG_ARP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 35;" d file: -DBG_ARP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 35;" d file: -DBG_ARP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 35;" d file: -DBG_ARP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 35;" d file: -DBG_BSD IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 81;" d file: -DBG_BSD IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 79;" d file: -DBG_BSD IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 79;" d file: -DBG_BSD IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 79;" d file: -DBG_BSD IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 79;" d file: -DBG_BSD IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 79;" d file: -DBG_DHCP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 69;" d file: -DBG_DHCP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 63;" d file: -DBG_DHCP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 63;" d file: -DBG_DHCP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 63;" d file: -DBG_DHCP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 63;" d file: -DBG_DHCP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 63;" d file: -DBG_DNS IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 73;" d file: -DBG_DNS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 67;" d file: -DBG_DNS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 67;" d file: -DBG_DNS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 67;" d file: -DBG_DNS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 67;" d file: -DBG_DNS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 67;" d file: -DBG_ETH IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 29;" d file: -DBG_ETH IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 23;" d file: -DBG_ETH IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 23;" d file: -DBG_ETH IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 23;" d file: -DBG_ETH IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 23;" d file: -DBG_ETH IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 23;" d file: -DBG_FTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 92;" d file: -DBG_FTPC IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 96;" d file: -DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 93;" d file: -DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 93;" d file: -DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 93;" d file: -DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 93;" d file: -DBG_FTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 93;" d file: -DBG_FTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 89;" d file: -DBG_FTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 89;" d file: -DBG_FTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 89;" d file: -DBG_FTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 89;" d file: -DBG_FTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 89;" d file: -DBG_HTTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 88;" d file: -DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 85;" d file: -DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 85;" d file: -DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 85;" d file: -DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 85;" d file: -DBG_HTTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 85;" d file: -DBG_ICMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 49;" d file: -DBG_ICMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 43;" d file: -DBG_ICMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 43;" d file: -DBG_ICMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 43;" d file: -DBG_ICMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 43;" d file: -DBG_ICMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 43;" d file: -DBG_IGMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 53;" d file: -DBG_IGMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 47;" d file: -DBG_IGMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 47;" d file: -DBG_IGMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 47;" d file: -DBG_IGMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 47;" d file: -DBG_IGMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 47;" d file: -DBG_IP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 45;" d file: -DBG_IP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 39;" d file: -DBG_IP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 39;" d file: -DBG_IP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 39;" d file: -DBG_IP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 39;" d file: -DBG_IP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 39;" d file: -DBG_MEM IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 25;" d file: -DBG_MEM IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 19;" d file: -DBG_MEM IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 19;" d file: -DBG_MEM IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 19;" d file: -DBG_MEM IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 19;" d file: -DBG_MEM IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 19;" d file: -DBG_NBNS IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 65;" d file: -DBG_NBNS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 59;" d file: -DBG_NBNS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 59;" d file: -DBG_NBNS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 59;" d file: -DBG_NBNS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 59;" d file: -DBG_NBNS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 59;" d file: -DBG_PPP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 33;" d file: -DBG_PPP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 27;" d file: -DBG_PPP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 27;" d file: -DBG_PPP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 27;" d file: -DBG_PPP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 27;" d file: -DBG_PPP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 27;" d file: -DBG_SLIP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 37;" d file: -DBG_SLIP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 31;" d file: -DBG_SLIP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 31;" d file: -DBG_SLIP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 31;" d file: -DBG_SLIP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 31;" d file: -DBG_SLIP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 31;" d file: -DBG_SMTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 112;" d file: -DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 109;" d file: -DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 109;" d file: -DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 109;" d file: -DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 109;" d file: -DBG_SMTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 109;" d file: -DBG_SNMP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 77;" d file: -DBG_SNMP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 71;" d file: -DBG_SNMP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 71;" d file: -DBG_SNMP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 71;" d file: -DBG_SNMP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 71;" d file: -DBG_SNMP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 71;" d file: -DBG_SNTP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 75;" d file: -DBG_SNTP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 75;" d file: -DBG_SNTP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 75;" d file: -DBG_SNTP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 75;" d file: -DBG_SNTP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 75;" d file: -DBG_TCP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 61;" d file: -DBG_TCP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 55;" d file: -DBG_TCP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 55;" d file: -DBG_TCP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 55;" d file: -DBG_TCP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 55;" d file: -DBG_TCP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 55;" d file: -DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 97;" d file: -DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 97;" d file: -DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 97;" d file: -DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 97;" d file: -DBG_TELNET_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 97;" d file: -DBG_TFTP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 104;" d file: -DBG_TFTPC IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 108;" d file: -DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 105;" d file: -DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 105;" d file: -DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 105;" d file: -DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 105;" d file: -DBG_TFTP_CLIENT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 105;" d file: -DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 101;" d file: -DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 101;" d file: -DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 101;" d file: -DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 101;" d file: -DBG_TFTP_SERVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 101;" d file: -DBG_TIME IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 19;" d file: -DBG_TIME IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 14;" d file: -DBG_TIME IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 14;" d file: -DBG_TIME IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 14;" d file: -DBG_TIME IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 14;" d file: -DBG_TIME IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 14;" d file: -DBG_TNET IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 100;" d file: -DBG_UDP IDE/MDK-ARM/MDK-ARM/config/Net_Debug.c 57;" d file: -DBG_UDP IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Debug.c 51;" d file: -DBG_UDP IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Debug.c 51;" d file: -DBG_UDP IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Debug.c 51;" d file: -DBG_UDP IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Debug.c 51;" d file: -DBG_UDP IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Debug.c 51;" d file: -DBP_BitNumber IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 46;" d file: -DBP_BitNumber IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 46;" d file: -DBRG_ERROR ctaocrypt/src/random.c 77;" d file: -DBRG_NEED_RESEED ctaocrypt/src/random.c 78;" d file: -DBRG_SEED_LEN cyassl/ctaocrypt/random.h 90;" d -DBRG_SUCCESS ctaocrypt/src/random.c 76;" d file: -DCMI_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DCMI_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DCMI_IRQHandler $/;" l -DEBUG config.h 8;" d -DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 236;" d -DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 274;" d -DEBUG_CYASSL IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 296;" d -DEBUG_CYASSL ctaocrypt/src/aes.c 67;" d file: -DEBUG_CYASSL cyassl/ctaocrypt/settings.h 449;" d -DEBUG_CYASSL cyassl/ctaocrypt/settings.h 451;" d -DECB_END_4 ctaocrypt/src/aes_asm.s /^DECB_END_4:$/;" l -DECB_LAST_4 ctaocrypt/src/aes_asm.s /^DECB_LAST_4:$/;" l -DECB_LAST_4_2 ctaocrypt/src/aes_asm.s /^DECB_LAST_4_2:$/;" l -DECB_LOOP_4 ctaocrypt/src/aes_asm.s /^DECB_LOOP_4:$/;" l -DECB_LOOP_4_2 ctaocrypt/src/aes_asm.s /^DECB_LOOP_4_2:$/;" l -DECB_NO_PARTS_4 ctaocrypt/src/aes_asm.s /^DECB_NO_PARTS_4:$/;" l -DECB_REMAINDER_4 ctaocrypt/src/aes_asm.s /^DECB_REMAINDER_4:$/;" l -DECOMPRESS_E cyassl/ctaocrypt/error-crypt.h /^ DECOMPRESS_E = -186, \/* DeCompress error *\/$/;" e enum:__anon61 -DECOMPRESS_INIT_E cyassl/ctaocrypt/error-crypt.h /^ DECOMPRESS_INIT_E = -185, \/* DeCompress init error *\/$/;" e enum:__anon61 -DECRYPT_ERROR cyassl/error-ssl.h /^ DECRYPT_ERROR = -212, \/* error during decryption *\/$/;" e enum:CyaSSL_ErrorCodes -DEFAULT_INCLUDES Makefile /^DEFAULT_INCLUDES = -I.$/;" m -DEFAULT_TIMEOUT cyassl/internal.h /^ DEFAULT_TIMEOUT = 500, \/* default resumption timeout in seconds *\/$/;" e enum:Misc -DEFLATE_DEFAULT_MEMLEVEL ctaocrypt/src/compress.c 61;" d file: -DEFLATE_DEFAULT_MEMLEVEL ctaocrypt/src/compress.c 64;" d file: -DEFLATE_DEFAULT_WINDOWBITS ctaocrypt/src/compress.c 60;" d file: -DEFLATE_DEFAULT_WINDOWBITS ctaocrypt/src/compress.c 63;" d file: -DEFS Makefile /^DEFS = -DHAVE_CONFIG_H$/;" m -DEND_4 ctaocrypt/src/aes_asm.s /^DEND_4:$/;" l -DEPDIR Makefile /^DEPDIR = .deps$/;" m -DES3_ENC_TYPE cyassl/ctaocrypt/des3.h /^ DES3_ENC_TYPE = 3, \/* cipher unique type *\/$/;" e enum:__anon56 -DES3_IVLEN cyassl/ctaocrypt/des3.h 50;" d -DES3_KEYLEN cyassl/ctaocrypt/des3.h 51;" d -DES3_KEY_SIZE cyassl/internal.h /^ DES3_KEY_SIZE = 24, \/* 3 des ede *\/$/;" e enum:Misc -DES3_TYPE cyassl/ctaocrypt/asn.h /^ DES3_TYPE = 1,$/;" e enum:ENCRYPTION_TYPES -DES3b cyassl/ctaocrypt/asn.h /^ DES3b = 652$/;" e enum:Block_Sum -DES_BLOCK_SIZE cyassl/ctaocrypt/des3.h /^ DES_BLOCK_SIZE = 8,$/;" e enum:__anon56 -DES_BLOCK_SIZE cyassl/internal.h 409;" d -DES_BUFFER_SIZE ctaocrypt/src/des3.c 284;" d file: -DES_CBC cyassl/ctaocrypt/des3.h /^ DES_CBC = 0,$/;" e enum:__anon57 -DES_CBC_TYPE cyassl/openssl/evp.h /^ DES_CBC_TYPE = 7,$/;" e enum:__anon36 -DES_DECRYPT cyassl/openssl/des.h /^ DES_DECRYPT = 0$/;" e enum:__anon37 -DES_DECRYPTION cyassl/ctaocrypt/des3.h /^ DES_DECRYPTION = 1$/;" e enum:__anon56 -DES_ECB cyassl/ctaocrypt/des3.h /^ DES_ECB = 1$/;" e enum:__anon57 -DES_EDE3_CBC_TYPE cyassl/openssl/evp.h /^ DES_EDE3_CBC_TYPE = 8,$/;" e enum:__anon36 -DES_ENCRYPT cyassl/openssl/des.h /^ DES_ENCRYPT = 1,$/;" e enum:__anon37 -DES_ENCRYPTION cyassl/ctaocrypt/des3.h /^ DES_ENCRYPTION = 0,$/;" e enum:__anon56 -DES_ENC_TYPE cyassl/ctaocrypt/des3.h /^ DES_ENC_TYPE = 2, \/* cipher unique type *\/$/;" e enum:__anon56 -DES_IVLEN cyassl/ctaocrypt/des3.h 48;" d -DES_IV_SIZE cyassl/internal.h /^ DES_IV_SIZE = DES_BLOCK_SIZE,$/;" e enum:Misc -DES_KEYLEN cyassl/ctaocrypt/des3.h 49;" d -DES_KEY_SIZE cyassl/internal.h /^ DES_KEY_SIZE = 8, \/* des *\/$/;" e enum:Misc -DES_KS_SIZE cyassl/ctaocrypt/des3.h /^ DES_KS_SIZE = 32,$/;" e enum:__anon56 -DES_TYPE cyassl/ctaocrypt/asn.h /^ DES_TYPE = 0,$/;" e enum:ENCRYPTION_TYPES -DES_cbc_encrypt cyassl/openssl/des.h 77;" d -DES_cblock cyassl/openssl/des.h /^typedef CYASSL_DES_cblock DES_cblock;$/;" t -DES_ecb_encrypt cyassl/openssl/des.h 80;" d -DES_key_sched cyassl/openssl/des.h 76;" d -DES_key_schedule cyassl/openssl/des.h /^typedef CYASSL_DES_key_schedule DES_key_schedule;$/;" t -DES_ncbc_encrypt cyassl/openssl/des.h 78;" d -DES_set_key_unchecked cyassl/openssl/des.h 75;" d -DES_set_odd_parity cyassl/openssl/des.h 79;" d -DESb cyassl/ctaocrypt/asn.h /^ DESb = 69,$/;" e enum:Block_Sum -DH cyassl/openssl/dh.h /^typedef CYASSL_DH DH;$/;" t -DHCP_BOOTF IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 248;" d file: -DHCP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 236;" d file: -DHCP_VCID IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 242;" d file: -DH_PARAM_TYPE cyassl/ctaocrypt/asn_public.h /^ DH_PARAM_TYPE,$/;" e enum:CertType -DH_compute_key cyassl/openssl/dh.h 45;" d -DH_free cyassl/openssl/dh.h 41;" d -DH_generate_key cyassl/openssl/dh.h 44;" d -DH_new cyassl/openssl/dh.h 40;" d -DH_size cyassl/openssl/dh.h 43;" d -DIGESTED_DATA cyassl/ctaocrypt/pkcs7.h /^ DIGESTED_DATA = 655, \/* 1.2.840.113549.1.7.5 *\/$/;" e enum:PKCS7_TYPES -DIGIT cyassl/ctaocrypt/integer.h 179;" d -DIGIT_BIT cyassl/ctaocrypt/integer.h 108;" d -DIGIT_BIT cyassl/ctaocrypt/integer.h 111;" d -DIGIT_BIT cyassl/ctaocrypt/integer.h 120;" d -DIGIT_BIT cyassl/ctaocrypt/integer.h 93;" d -DIGIT_BIT cyassl/ctaocrypt/tfm.h 224;" d -DISTCLEANFILES Makefile /^DISTCLEANFILES = aminclude.am ctaocrypt\/benchmark\/.libs\/benchmark \\$/;" m -DISTFILES Makefile /^DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)$/;" m -DIST_ARCHIVES Makefile /^DIST_ARCHIVES = $(distdir).tar.gz$/;" m -DIST_COMMON Makefile /^DIST_COMMON = $(srcdir)\/cyassl\/include.am \\$/;" m -DIST_SOURCES Makefile /^DIST_SOURCES = $(am__src_libcyassl_la_SOURCES_DIST) \\$/;" m -DIST_TARGETS Makefile /^DIST_TARGETS = dist-gzip$/;" m -DLAST_4 ctaocrypt/src/aes_asm.s /^DLAST_4:$/;" l -DLAST_4_2 ctaocrypt/src/aes_asm.s /^DLAST_4_2:$/;" l -DLLTOOL Makefile /^DLLTOOL = false$/;" m -DLOOP_4 ctaocrypt/src/aes_asm.s /^DLOOP_4:$/;" l -DLOOP_4_2 ctaocrypt/src/aes_asm.s /^DLOOP_4_2:$/;" l -DMA1_Stream0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream0_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream1_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream2_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream3_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream4_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream5_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream6_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA1_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA1_Stream7_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream0_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream1_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream2_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream3_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream4_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream5_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream6_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream6_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA2_Stream7_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^DMA2_Stream7_IRQHandler $/;" l -DMA_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^DMA_IRQHandler$/;" l -DNO_PARTS_4 ctaocrypt/src/aes_asm.s /^DNO_PARTS_4:$/;" l -DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h 13;" d -DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h 13;" d -DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h 13;" d -DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h 13;" d -DNS_CLIENT_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h 13;" d -DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_DNS_Client.h 18;" d -DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_DNS_Client.h 18;" d -DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_DNS_Client.h 18;" d -DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_DNS_Client.h 18;" d -DNS_CLIENT_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_DNS_Client.h 18;" d -DNS_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 746;" d file: -DNS_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 751;" d file: -DNS_entry cyassl/ctaocrypt/asn.h /^struct DNS_entry {$/;" s -DNS_entry cyassl/ctaocrypt/asn.h /^typedef struct DNS_entry DNS_entry;$/;" t typeref:struct:DNS_entry -DNS_entry cyassl/internal.h /^ typedef struct DNS_entry DNS_entry;$/;" t typeref:struct:DNS_entry -DN_Tags cyassl/ctaocrypt/asn.h /^enum DN_Tags {$/;" g -DOMAIN_NAME_MISMATCH cyassl/error-ssl.h /^ DOMAIN_NAME_MISMATCH = -222, \/* peer subject name mismatch *\/$/;" e enum:CyaSSL_ErrorCodes -DO_MEM_STATS cyassl/test.h 1112;" d -DREMAINDER_4 ctaocrypt/src/aes_asm.s /^DREMAINDER_4:$/;" l -DSA cyassl/openssl/ssl.h /^typedef CYASSL_DSA DSA;$/;" t -DSA_HALF_SIZE ctaocrypt/src/dsa.c /^ DSA_HALF_SIZE = 20, \/* r and s size *\/$/;" e enum:__anon5 file: -DSA_PRIVATE cyassl/ctaocrypt/dsa.h /^ DSA_PRIVATE = 1$/;" e enum:__anon43 -DSA_PUBLIC cyassl/ctaocrypt/dsa.h /^ DSA_PUBLIC = 0,$/;" e enum:__anon43 -DSA_SIG_SIZE ctaocrypt/src/dsa.c /^ DSA_SIG_SIZE = 40 \/* signature size *\/$/;" e enum:__anon5 file: -DSA_free cyassl/openssl/dsa.h 43;" d -DSA_generate_key cyassl/openssl/dsa.h 45;" d -DSA_generate_parameters_ex cyassl/openssl/dsa.h 46;" d -DSA_new cyassl/openssl/dsa.h 42;" d -DSAk cyassl/ctaocrypt/asn.h /^ DSAk = 515,$/;" e enum:Key_Sum -DSYMUTIL Makefile /^DSYMUTIL = $/;" m -DTLS_HANDSHAKE_EXTRA cyassl/internal.h /^ DTLS_HANDSHAKE_EXTRA = 8, \/* diff from normal *\/$/;" e enum:Misc -DTLS_HANDSHAKE_FRAG_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_FRAG_SZ = 3, \/* fragment offset and length are 24 bit *\/$/;" e enum:Misc -DTLS_HANDSHAKE_HEADER_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_HEADER_SZ = 12, \/* normal + seq(2) + offset(3) + length(3) *\/$/;" e enum:Misc -DTLS_HANDSHAKE_SEQ_SZ cyassl/internal.h /^ DTLS_HANDSHAKE_SEQ_SZ = 2, \/* handshake header sequence number *\/$/;" e enum:Misc -DTLS_MAJOR cyassl/internal.h /^ DTLS_MAJOR = 0xfe, \/* DTLS major version number *\/$/;" e enum:Misc -DTLS_MINOR cyassl/internal.h /^ DTLS_MINOR = 0xff, \/* DTLS minor version number *\/$/;" e enum:Misc -DTLS_POOL_SZ cyassl/internal.h /^ DTLS_POOL_SZ = 5, \/* buffers to hold in the retry pool *\/$/;" e enum:Misc -DTLS_RECORD_EXTRA cyassl/internal.h /^ DTLS_RECORD_EXTRA = 8, \/* diff from normal *\/$/;" e enum:Misc -DTLS_RECORD_HEADER_SZ cyassl/internal.h /^ DTLS_RECORD_HEADER_SZ = 13, \/* normal + epoch(2) + seq_num(6) *\/$/;" e enum:Misc -DTLS_SEQ_BITS cyassl/internal.h 1397;" d -DTLS_TIMEOUT_INIT cyassl/internal.h /^ DTLS_TIMEOUT_INIT = 1, \/* default timeout init for DTLS receive *\/$/;" e enum:Misc -DTLS_TIMEOUT_MAX cyassl/internal.h /^ DTLS_TIMEOUT_MAX = 64, \/* default max timeout for DTLS receive *\/$/;" e enum:Misc -DTLS_TIMEOUT_MULTIPLIER cyassl/internal.h /^ DTLS_TIMEOUT_MULTIPLIER = 2, \/* default timeout multiplier for DTLS recv *\/$/;" e enum:Misc -DTLSv1_2_MINOR cyassl/internal.h /^ DTLSv1_2_MINOR = 0xfd, \/* DTLS minor version number *\/$/;" e enum:Misc -DTLSv1_2_client_method cyassl/openssl/ssl.h 95;" d -DTLSv1_2_server_method cyassl/openssl/ssl.h 96;" d -DTLSv1_client_method cyassl/openssl/ssl.h 93;" d -DTLSv1_server_method cyassl/openssl/ssl.h 94;" d -DUMPBIN Makefile /^DUMPBIN = $/;" m -DUPLICATE_STR cyassl/sniffer_error.h 89;" d -DYNAMIC_TYPE_ALTNAME cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ALTNAME = 29,$/;" e enum:__anon48 -DYNAMIC_TYPE_ARRAYS cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ARRAYS = 33,$/;" e enum:__anon48 -DYNAMIC_TYPE_BIGINT cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_BIGINT = 9,$/;" e enum:__anon48 -DYNAMIC_TYPE_CA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CA = 1,$/;" e enum:__anon48 -DYNAMIC_TYPE_CAVIUM_RSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CAVIUM_RSA = 41,$/;" e enum:__anon48 -DYNAMIC_TYPE_CAVIUM_TMP cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CAVIUM_TMP = 40,$/;" e enum:__anon48 -DYNAMIC_TYPE_CERT cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CERT = 2,$/;" e enum:__anon48 -DYNAMIC_TYPE_CERT_MANAGER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CERT_MANAGER = 25,$/;" e enum:__anon48 -DYNAMIC_TYPE_CIPHER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CIPHER = 31,$/;" e enum:__anon48 -DYNAMIC_TYPE_CRL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL = 22,$/;" e enum:__anon48 -DYNAMIC_TYPE_CRL_ENTRY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL_ENTRY = 24,$/;" e enum:__anon48 -DYNAMIC_TYPE_CRL_MONITOR cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CRL_MONITOR = 26,$/;" e enum:__anon48 -DYNAMIC_TYPE_CTX cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_CTX = 18,$/;" e enum:__anon48 -DYNAMIC_TYPE_DH cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DH = 15,$/;" e enum:__anon48 -DYNAMIC_TYPE_DOMAIN cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DOMAIN = 16,$/;" e enum:__anon48 -DYNAMIC_TYPE_DSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DSA = 21,$/;" e enum:__anon48 -DYNAMIC_TYPE_DTLS_MSG cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DTLS_MSG = 39,$/;" e enum:__anon48 -DYNAMIC_TYPE_DTLS_POOL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_DTLS_POOL = 34,$/;" e enum:__anon48 -DYNAMIC_TYPE_ECC cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_ECC = 37,$/;" e enum:__anon48 -DYNAMIC_TYPE_FILE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_FILE = 4,$/;" e enum:__anon48 -DYNAMIC_TYPE_INFO cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_INFO = 14,$/;" e enum:__anon48 -DYNAMIC_TYPE_IN_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_IN_BUFFER = 13,$/;" e enum:__anon48 -DYNAMIC_TYPE_KEY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_KEY = 3,$/;" e enum:__anon48 -DYNAMIC_TYPE_LIBZ cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_LIBZ = 36,$/;" e enum:__anon48 -DYNAMIC_TYPE_METHOD cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_METHOD = 11,$/;" e enum:__anon48 -DYNAMIC_TYPE_NONE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_NONE = 8,$/;" e enum:__anon48 -DYNAMIC_TYPE_OCSP cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP = 44,$/;" e enum:__anon48 -DYNAMIC_TYPE_OCSP_ENTRY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP_ENTRY = 28,$/;" e enum:__anon48 -DYNAMIC_TYPE_OCSP_STATUS cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OCSP_STATUS = 27,$/;" e enum:__anon48 -DYNAMIC_TYPE_OPENSSL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OPENSSL = 20,$/;" e enum:__anon48 -DYNAMIC_TYPE_OUT_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_OUT_BUFFER = 12,$/;" e enum:__anon48 -DYNAMIC_TYPE_PUBLIC_KEY cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_PUBLIC_KEY = 6,$/;" e enum:__anon48 -DYNAMIC_TYPE_REVOKED cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_REVOKED = 23,$/;" e enum:__anon48 -DYNAMIC_TYPE_RNG cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_RNG = 32,$/;" e enum:__anon48 -DYNAMIC_TYPE_RSA cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_RSA = 10,$/;" e enum:__anon48 -DYNAMIC_TYPE_SIGNATURE cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SIGNATURE = 45$/;" e enum:__anon48 -DYNAMIC_TYPE_SIGNER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SIGNER = 7,$/;" e enum:__anon48 -DYNAMIC_TYPE_SOCKADDR cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SOCKADDR = 35,$/;" e enum:__anon48 -DYNAMIC_TYPE_SSL cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SSL = 17,$/;" e enum:__anon48 -DYNAMIC_TYPE_SUBJECT_CN cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SUBJECT_CN = 5,$/;" e enum:__anon48 -DYNAMIC_TYPE_SUITES cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_SUITES = 30,$/;" e enum:__anon48 -DYNAMIC_TYPE_TLSX cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_TLSX = 43,$/;" e enum:__anon48 -DYNAMIC_TYPE_TMP_BUFFER cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_TMP_BUFFER = 38,$/;" e enum:__anon48 -DYNAMIC_TYPE_WRITEV cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_WRITEV = 19,$/;" e enum:__anon48 -DYNAMIC_TYPE_X509 cyassl/ctaocrypt/types.h /^ DYNAMIC_TYPE_X509 = 42,$/;" e enum:__anon48 -DateGreaterThan ctaocrypt/src/asn.c /^static int DateGreaterThan(const struct tm* a, const struct tm* b)$/;" f file: -DateLessThan ctaocrypt/src/asn.c /^static INLINE int DateLessThan(const struct tm* a, const struct tm* b)$/;" f file: -DeCompress ctaocrypt/src/compress.c /^int DeCompress(byte* out, word32 outSz, const byte* in, word32 inSz)$/;" f -DecodeAltNames ctaocrypt/src/asn.c /^static int DecodeAltNames(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeAuthInfo ctaocrypt/src/asn.c /^static int DecodeAuthInfo(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeAuthKeyId ctaocrypt/src/asn.c /^static int DecodeAuthKeyId(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeBasicCaConstraint ctaocrypt/src/asn.c /^static int DecodeBasicCaConstraint(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeBasicOcspResponse ctaocrypt/src/asn.c /^static int DecodeBasicOcspResponse(byte* source,$/;" f file: -DecodeCertExtensions ctaocrypt/src/asn.c /^static int DecodeCertExtensions(DecodedCert* cert)$/;" f file: -DecodeCertPolicy ctaocrypt/src/asn.c /^ static int DecodeCertPolicy(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeCerts ctaocrypt/src/asn.c /^static int DecodeCerts(byte* source,$/;" f file: -DecodeCrlDist ctaocrypt/src/asn.c /^static int DecodeCrlDist(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeECC_DSA_Sig ctaocrypt/src/asn.c /^int DecodeECC_DSA_Sig(const byte* sig, word32 sigLen, mp_int* r, mp_int* s)$/;" f -DecodeExtKeyUsage ctaocrypt/src/asn.c /^static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeKeyUsage ctaocrypt/src/asn.c /^static int DecodeKeyUsage(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeNameConstraints ctaocrypt/src/asn.c /^static int DecodeNameConstraints(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeOcspRespExtensions ctaocrypt/src/asn.c /^static int DecodeOcspRespExtensions(byte* source,$/;" f file: -DecodeResponseData ctaocrypt/src/asn.c /^static int DecodeResponseData(byte* source,$/;" f file: -DecodeSingleResponse ctaocrypt/src/asn.c /^static int DecodeSingleResponse(byte* source,$/;" f file: -DecodeSubjKeyId ctaocrypt/src/asn.c /^static int DecodeSubjKeyId(byte* input, int sz, DecodedCert* cert)$/;" f file: -DecodeSubtree ctaocrypt/src/asn.c /^static int DecodeSubtree(byte* input, int sz, Base_entry** head, void* heap)$/;" f file: -DecodeToKey ctaocrypt/src/asn.c /^int DecodeToKey(DecodedCert* cert, int verify)$/;" f -DecodedCRL cyassl/ctaocrypt/asn.h /^struct DecodedCRL {$/;" s -DecodedCRL cyassl/ctaocrypt/asn.h /^typedef struct DecodedCRL DecodedCRL;$/;" t typeref:struct:DecodedCRL -DecodedCert cyassl/ctaocrypt/asn.h /^struct DecodedCert {$/;" s -DecodedCert cyassl/ctaocrypt/asn.h /^typedef struct DecodedCert DecodedCert;$/;" t typeref:struct:DecodedCert -DecodedName cyassl/ctaocrypt/asn.h /^struct DecodedName {$/;" s -DecodedName cyassl/ctaocrypt/asn.h /^typedef struct DecodedName DecodedName;$/;" t typeref:struct:DecodedName -Decrypt src/internal.c /^static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input,$/;" f file: -Decrypt src/sniffer.c /^static int Decrypt(SSL* ssl, byte* output, const byte* input, word32 sz)$/;" f file: -DecryptKey ctaocrypt/src/asn.c /^static int DecryptKey(const char* password, int passwordSz, byte* salt,$/;" f file: -DecryptMessage src/sniffer.c /^static const byte* DecryptMessage(SSL* ssl, const byte* input, word32 sz,$/;" f file: -DecryptVerifyCb cyassl/internal.h /^ CallbackDecryptVerify DecryptVerifyCb; \/* Atomic User Decrypt\/Verify Cb *\/$/;" m struct:CYASSL_CTX -DecryptVerifyCtx cyassl/internal.h /^ void* DecryptVerifyCtx; \/* Atomic User Decrypt\/Verify Callback Context *\/$/;" m struct:CYASSL -Default_Handler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -Default_Handler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Default_Handler PROC$/;" l -DerCert ctaocrypt/src/asn.c /^typedef struct DerCert {$/;" s file: -DerCert ctaocrypt/src/asn.c /^} DerCert;$/;" t typeref:struct:DerCert file: -DerToPem ctaocrypt/src/asn.c /^int DerToPem(const byte* der, word32 derSz, byte* output, word32 outSz,$/;" f -DeriveKeys src/keys.c /^int DeriveKeys(CYASSL* ssl)$/;" f -DeriveTlsKeys src/tls.c /^int DeriveTlsKeys(CYASSL* ssl)$/;" f -Des cyassl/ctaocrypt/des3.h /^typedef struct Des {$/;" s -Des cyassl/ctaocrypt/des3.h /^} Des;$/;" t typeref:struct:Des -Des3 cyassl/ctaocrypt/des3.h /^typedef struct Des3 {$/;" s -Des3 cyassl/ctaocrypt/des3.h /^} Des3;$/;" t typeref:struct:Des3 -Des3Crypt ctaocrypt/src/des3.c /^ void Des3Crypt(Des3* des, byte* out, const byte* in, word32 sz,$/;" f -Des3ProcessBlock ctaocrypt/src/des3.c /^static void Des3ProcessBlock(Des3* des, const byte* in, byte* out)$/;" f file: -Des3_CaviumCbcDecrypt ctaocrypt/src/des3.c /^static int Des3_CaviumCbcDecrypt(Des3* des3, byte* out, const byte* in,$/;" f file: -Des3_CaviumCbcEncrypt ctaocrypt/src/des3.c /^static int Des3_CaviumCbcEncrypt(Des3* des3, byte* out, const byte* in,$/;" f file: -Des3_CaviumSetKey ctaocrypt/src/des3.c /^static int Des3_CaviumSetKey(Des3* des3, const byte* key, const byte* iv)$/;" f file: -Des3_CbcDecrypt ctaocrypt/src/des3.c /^ int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcDecrypt ctaocrypt/src/des3.c /^int Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcDecrypt ctaocrypt/src/des3.c /^int Des3_CbcDecrypt(Des3* des3, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcDecrypt cyassl/ctaocrypt/des3.h 125;" d -Des3_CbcEncrypt ctaocrypt/src/des3.c /^ int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcEncrypt ctaocrypt/src/des3.c /^int Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcEncrypt ctaocrypt/src/des3.c /^int Des3_CbcEncrypt(Des3* des3, byte* out, const byte* in, word32 sz)$/;" f -Des3_CbcEncrypt cyassl/ctaocrypt/des3.h 124;" d -Des3_FreeCavium ctaocrypt/src/des3.c /^void Des3_FreeCavium(Des3* des3)$/;" f -Des3_InitCavium ctaocrypt/src/des3.c /^int Des3_InitCavium(Des3* des3, int devId)$/;" f -Des3_SetIV ctaocrypt/src/des3.c /^int Des3_SetIV(Des3* des, const byte* iv)$/;" f -Des3_SetIV cyassl/ctaocrypt/des3.h 123;" d -Des3_SetKey ctaocrypt/src/des3.c /^ int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir)$/;" f -Des3_SetKey ctaocrypt/src/des3.c /^int Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir)$/;" f -Des3_SetKey ctaocrypt/src/des3.c /^int Des3_SetKey(Des3* des3, const byte* key, const byte* iv, int dir)$/;" f -Des3_SetKey cyassl/ctaocrypt/des3.h 122;" d -DesBuffer ctaocrypt/src/des3.c /^static unsigned char *DesBuffer = NULL ;$/;" v file: -DesCrypt ctaocrypt/src/des3.c /^ void DesCrypt(Des* des, byte* out, const byte* in, word32 sz,$/;" f -DesCrypt ctaocrypt/src/des3.c /^ void DesCrypt(word32 *key, word32 *iv, byte* out, const byte* in, word32 sz,$/;" f -DesProcessBlock ctaocrypt/src/des3.c /^static void DesProcessBlock(Des* des, const byte* in, byte* out)$/;" f file: -DesRawProcessBlock ctaocrypt/src/des3.c /^static void DesRawProcessBlock(word32* lIn, word32* rIn, const word32* kptr)$/;" f file: -DesSetKey ctaocrypt/src/des3.c /^static int DesSetKey(const byte* key, int dir, word32* out)$/;" f file: -Des_Cbc ctaocrypt/src/des3.c /^static void Des_Cbc(Des* des, byte* out, const byte* in, word32 sz, word32 desc)$/;" f file: -Des_CbcDecrypt ctaocrypt/src/des3.c /^ void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_CbcDecrypt ctaocrypt/src/des3.c /^void Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_CbcEncrypt ctaocrypt/src/des3.c /^ void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_CbcEncrypt ctaocrypt/src/des3.c /^void Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_EcbEncrypt ctaocrypt/src/des3.c /^ void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_EcbEncrypt ctaocrypt/src/des3.c /^void Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)$/;" f -Des_SetIV ctaocrypt/src/des3.c /^void Des_SetIV(Des* des, const byte* iv)$/;" f -Des_SetKey ctaocrypt/src/des3.c /^ int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir)$/;" f -Des_SetKey ctaocrypt/src/des3.c /^int Des_SetKey(Des* des, const byte* key, const byte* iv, int dir)$/;" f -DhAgree ctaocrypt/src/dh.c /^int DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv,$/;" f -DhGenerateKeyPair ctaocrypt/src/dh.c /^int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, word32* privSz,$/;" f -DhKey cyassl/ctaocrypt/dh.h /^typedef struct DhKey {$/;" s -DhKey cyassl/ctaocrypt/dh.h /^} DhKey;$/;" t typeref:struct:DhKey -DhKeyDecode ctaocrypt/src/asn.c /^int DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)$/;" f -DhParamsLoad ctaocrypt/src/asn.c /^int DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz,$/;" f -DhSetKey ctaocrypt/src/asn.c /^int DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, word32 gSz)$/;" f -DiscreteLogWorkFactor ctaocrypt/src/dh.c /^static word32 DiscreteLogWorkFactor(word32 n)$/;" f file: -DllMain src/sniffer.c /^BOOL APIENTRY DllMain( HMODULE hModule,$/;" f -DoAlert src/internal.c /^static int DoAlert(CYASSL* ssl, byte* input, word32* inOutIdx, int* type,$/;" f file: -DoApplicationData src/internal.c /^int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx)$/;" f -DoBase64_Encode ctaocrypt/src/coding.c /^static int DoBase64_Encode(const byte* in, word32 inLen, byte* out,$/;" f file: -DoCertificate src/internal.c /^static int DoCertificate(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoCertificateRequest src/internal.c /^ static int DoCertificateRequest(CYASSL* ssl, const byte* input, word32*$/;" f file: -DoCertificateVerify src/internal.c /^ static int DoCertificateVerify(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoClientHello src/internal.c /^ static int DoClientHello(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: -DoClientKeyExchange src/internal.c /^ static int DoClientKeyExchange(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoDtlsHandShakeMsg src/internal.c /^static int DoDtlsHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoFinished src/internal.c /^int DoFinished(CYASSL* ssl, const byte* input, word32* inOutIdx, word32 size,$/;" f -DoHandShake src/sniffer.c /^static int DoHandShake(const byte* input, int* sslBytes,$/;" f file: -DoHandShakeMsg src/internal.c /^static int DoHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoHandShakeMsgType src/internal.c /^static int DoHandShakeMsgType(CYASSL* ssl, byte* input, word32* inOutIdx,$/;" f file: -DoHelloRequest src/internal.c /^static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: -DoHelloVerifyRequest src/internal.c /^ static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input,$/;" f file: -DoKey ctaocrypt/src/hc128.c /^static INLINE int DoKey(HC128* ctx, const byte* key, const byte* iv)$/;" f file: -DoKey ctaocrypt/src/rabbit.c /^static INLINE int DoKey(Rabbit* ctx, const byte* key, const byte* iv)$/;" f file: -DoMemSaveCertCache src/ssl.c /^static INLINE int DoMemSaveCertCache(CYASSL_CERT_MANAGER* cm, void* mem, int sz)$/;" f file: -DoMonitor src/crl.c /^static void* DoMonitor(void* arg)$/;" f file: -DoOldHello src/sniffer.c /^static int DoOldHello(SnifferSession* session, const byte* sslFrame,$/;" f file: -DoProcess ctaocrypt/src/hc128.c /^static INLINE int DoProcess(HC128* ctx, byte* output, const byte* input,$/;" f file: -DoProcess ctaocrypt/src/rabbit.c /^static INLINE int DoProcess(Rabbit* ctx, byte* output, const byte* input,$/;" f file: -DoRounds src/internal.c /^static INLINE void DoRounds(int type, int rounds, const byte* data, int sz)$/;" f file: -DoServerHello src/internal.c /^ static int DoServerHello(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: -DoServerKeyExchange src/internal.c /^ static int DoServerKeyExchange(CYASSL* ssl, const byte* input,$/;" f file: -DsaKey cyassl/ctaocrypt/dsa.h /^typedef struct DsaKey {$/;" s -DsaKey cyassl/ctaocrypt/dsa.h /^} DsaKey;$/;" t typeref:struct:DsaKey -DsaPrivateKeyDecode ctaocrypt/src/asn.c /^int DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key,$/;" f -DsaPublicKeyDecode ctaocrypt/src/asn.c /^int DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key,$/;" f -DsaSign ctaocrypt/src/dsa.c /^int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng)$/;" f -DsaVerify ctaocrypt/src/dsa.c /^int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, int* answer)$/;" f -DtlsCheckWindow src/internal.c /^static INLINE int DtlsCheckWindow(DtlsState* state)$/;" f file: -DtlsHandShakeHeader cyassl/internal.h /^typedef struct DtlsHandShakeHeader {$/;" s -DtlsHandShakeHeader cyassl/internal.h /^} DtlsHandShakeHeader;$/;" t typeref:struct:DtlsHandShakeHeader -DtlsMsg cyassl/internal.h /^typedef struct DtlsMsg {$/;" s -DtlsMsg cyassl/internal.h /^} DtlsMsg;$/;" t typeref:struct:DtlsMsg -DtlsMsgDelete src/internal.c /^void DtlsMsgDelete(DtlsMsg* item, void* heap)$/;" f -DtlsMsgDrain src/internal.c /^static int DtlsMsgDrain(CYASSL* ssl)$/;" f file: -DtlsMsgFind src/internal.c /^DtlsMsg* DtlsMsgFind(DtlsMsg* head, word32 seq)$/;" f -DtlsMsgInsert src/internal.c /^DtlsMsg* DtlsMsgInsert(DtlsMsg* head, DtlsMsg* item)$/;" f -DtlsMsgListDelete src/internal.c /^void DtlsMsgListDelete(DtlsMsg* head, void* heap)$/;" f -DtlsMsgNew src/internal.c /^DtlsMsg* DtlsMsgNew(word32 sz, void* heap)$/;" f -DtlsMsgSet src/internal.c /^void DtlsMsgSet(DtlsMsg* msg, word32 seq, const byte* data, byte type,$/;" f -DtlsMsgStore src/internal.c /^DtlsMsg* DtlsMsgStore(DtlsMsg* head, word32 seq, const byte* data, $/;" f -DtlsPool cyassl/internal.h /^typedef struct DtlsPool {$/;" s -DtlsPool cyassl/internal.h /^} DtlsPool;$/;" t typeref:struct:DtlsPool -DtlsPoolInit src/internal.c /^int DtlsPoolInit(CYASSL* ssl)$/;" f -DtlsPoolReset src/internal.c /^void DtlsPoolReset(CYASSL* ssl)$/;" f -DtlsPoolSave src/internal.c /^int DtlsPoolSave(CYASSL* ssl, const byte *src, int sz)$/;" f -DtlsPoolSend src/internal.c /^int DtlsPoolSend(CYASSL* ssl)$/;" f -DtlsPoolTimeout src/internal.c /^int DtlsPoolTimeout(CYASSL* ssl)$/;" f -DtlsRecordLayerHeader cyassl/internal.h /^typedef struct DtlsRecordLayerHeader {$/;" s -DtlsRecordLayerHeader cyassl/internal.h /^} DtlsRecordLayerHeader;$/;" t typeref:struct:DtlsRecordLayerHeader -DtlsSeq cyassl/internal.h /^ typedef word32 DtlsSeq;$/;" t -DtlsSeq cyassl/internal.h /^ typedef word64 DtlsSeq;$/;" t -DtlsState cyassl/internal.h /^ typedef struct DtlsState {$/;" s -DtlsState cyassl/internal.h /^ } DtlsState;$/;" t typeref:struct:DtlsState -DtlsUpdateWindow src/internal.c /^static INLINE int DtlsUpdateWindow(DtlsState* state)$/;" f file: -ECC112 ctaocrypt/src/ecc.c 48;" d file: -ECC128 ctaocrypt/src/ecc.c 49;" d file: -ECC160 ctaocrypt/src/ecc.c 50;" d file: -ECC192 ctaocrypt/src/ecc.c 51;" d file: -ECC224 ctaocrypt/src/ecc.c 52;" d file: -ECC256 ctaocrypt/src/ecc.c 53;" d file: -ECC384 ctaocrypt/src/ecc.c 54;" d file: -ECC521 ctaocrypt/src/ecc.c 55;" d file: -ECC_160R1 cyassl/ctaocrypt/asn.h /^ ECC_160R1 = 184,$/;" e enum:Ecc_Sum -ECC_192R1 cyassl/ctaocrypt/asn.h /^ ECC_192R1 = 520,$/;" e enum:Ecc_Sum -ECC_224R1 cyassl/ctaocrypt/asn.h /^ ECC_224R1 = 209$/;" e enum:Ecc_Sum -ECC_256R1 cyassl/ctaocrypt/asn.h /^ ECC_256R1 = 526,$/;" e enum:Ecc_Sum -ECC_384R1 cyassl/ctaocrypt/asn.h /^ ECC_384R1 = 210,$/;" e enum:Ecc_Sum -ECC_521R1 cyassl/ctaocrypt/asn.h /^ ECC_521R1 = 211,$/;" e enum:Ecc_Sum -ECC_BAD_ARG_E cyassl/ctaocrypt/error-crypt.h /^ ECC_BAD_ARG_E = -170, \/* ECC input argument of wrong type *\/$/;" e enum:__anon61 -ECC_BUFSIZE cyassl/ctaocrypt/ecc.h /^ ECC_BUFSIZE = 256, \/* for exported keys temp buffer *\/$/;" e enum:__anon71 -ECC_BYTE cyassl/internal.h /^ ECC_BYTE = 0xC0, \/* ECC first cipher suite byte *\/$/;" e enum:Misc -ECC_CURVETYPE_ERROR cyassl/error-ssl.h /^ ECC_CURVETYPE_ERROR = -250, \/* Bad ECC Curve Type *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_CURVE_ERROR cyassl/error-ssl.h /^ ECC_CURVE_ERROR = -251, \/* Bad ECC Curve *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_CURVE_OID_E cyassl/ctaocrypt/error-crypt.h /^ ECC_CURVE_OID_E = -172, \/* Unsupported ECC OID curve type *\/$/;" e enum:__anon61 -ECC_EXPORT_ERROR cyassl/error-ssl.h /^ ECC_EXPORT_ERROR = -254, \/* Bad ECC Export Key *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_KEY cyassl/ctaocrypt/asn.h /^ ECC_KEY = 12$/;" e enum:cert_enums -ECC_MAKEKEY_ERROR cyassl/error-ssl.h /^ ECC_MAKEKEY_ERROR = -253, \/* Bad Make ECC Key *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_MAXNAME cyassl/ctaocrypt/ecc.h /^ ECC_MAXNAME = 16, \/* MAX CURVE NAME LENGTH *\/$/;" e enum:__anon71 -ECC_MAXSIZE cyassl/ctaocrypt/ecc.h /^ ECC_MAXSIZE = 66 \/* MAX Private Key size *\/$/;" e enum:__anon71 -ECC_MINSIZE cyassl/ctaocrypt/ecc.h /^ ECC_MINSIZE = 20, \/* MIN Private Key size *\/$/;" e enum:__anon71 -ECC_PEERKEY_ERROR cyassl/error-ssl.h /^ ECC_PEERKEY_ERROR = -252, \/* Bad Peer ECC Key *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_PREFIX_0 cyassl/ctaocrypt/asn.h /^ ECC_PREFIX_0 = 160,$/;" e enum:ECC_TYPES -ECC_PREFIX_1 cyassl/ctaocrypt/asn.h /^ ECC_PREFIX_1 = 161$/;" e enum:ECC_TYPES -ECC_PRIVATEKEY cyassl/ctaocrypt/ecc.h /^ ECC_PRIVATEKEY = 2,$/;" e enum:__anon71 -ECC_PRIVATEKEY_TYPE cyassl/ctaocrypt/asn_public.h /^ ECC_PRIVATEKEY_TYPE,$/;" e enum:CertType -ECC_PUBLICKEY cyassl/ctaocrypt/ecc.h /^ ECC_PUBLICKEY = 1,$/;" e enum:__anon71 -ECC_SHARED_ERROR cyassl/error-ssl.h /^ ECC_SHARED_ERROR = -255, \/* Bad ECC Shared Secret *\/$/;" e enum:CyaSSL_ErrorCodes -ECC_TYPES cyassl/ctaocrypt/asn.h /^enum ECC_TYPES {$/;" g -ECDHE_SIZE cyassl/internal.h /^ ECDHE_SIZE = 32, \/* ECHDE server size defaults to 256 bit *\/$/;" e enum:Misc -ECDSAk cyassl/ctaocrypt/asn.h /^ ECDSAk = 518$/;" e enum:Key_Sum -ECHO_C Makefile /^ECHO_C = $/;" m -ECHO_N Makefile /^ECHO_N = -n$/;" m -ECHO_OUT IDE/MDK5-ARM/Projects/CyaSSL-Full/echoserver.c 47;" d file: -ECHO_OUT IDE/MDK5-ARM/Projects/EchoServer/echoserver.c 47;" d file: -ECHO_OUT examples/echoserver/echoserver.c 39;" d file: -ECHO_T Makefile /^ECHO_T = $/;" m -EC_FREE_ALL src/tls.c 1473;" d file: -EC_FREE_ALL src/tls.c 1492;" d file: -EC_GET_SIZE src/tls.c 1477;" d file: -EC_GET_SIZE src/tls.c 1480;" d file: -EC_GET_SIZE src/tls.c 1493;" d file: -EC_PARSE src/tls.c 1485;" d file: -EC_PARSE src/tls.c 1487;" d file: -EC_PARSE src/tls.c 1495;" d file: -EC_VALIDATE_REQUEST src/tls.c 1474;" d file: -EC_VALIDATE_REQUEST src/tls.c 1496;" d file: -EC_WRITE src/tls.c 1478;" d file: -EC_WRITE src/tls.c 1481;" d file: -EC_WRITE src/tls.c 1494;" d file: -EECB_END_4 ctaocrypt/src/aes_asm.s /^EECB_END_4:$/;" l -EECB_LAST_4 ctaocrypt/src/aes_asm.s /^EECB_LAST_4:$/;" l -EECB_LAST_4_2 ctaocrypt/src/aes_asm.s /^EECB_LAST_4_2:$/;" l -EECB_LOOP_4 ctaocrypt/src/aes_asm.s /^EECB_LOOP_4:$/;" l -EECB_LOOP_4_2 ctaocrypt/src/aes_asm.s /^EECB_LOOP_4_2:$/;" l -EECB_NO_PARTS_4 ctaocrypt/src/aes_asm.s /^EECB_NO_PARTS_4:$/;" l -EECB_REMAINDER_4 ctaocrypt/src/aes_asm.s /^EECB_REMAINDER_4:$/;" l -EGREP Makefile /^EGREP = \/bin\/grep -E$/;" m -EIGHTK_BUF cyassl/ctaocrypt/asn.h /^ EIGHTK_BUF = 8192, \/* Tmp buffer size *\/$/;" e enum:Misc_ASN -EKU_ANY_OID cyassl/ctaocrypt/asn.h /^ EKU_ANY_OID = 151, \/* 2.5.29.37.0, anyExtendedKeyUsage *\/$/;" e enum:ExtKeyUsage_Sum -EKU_CLIENT_AUTH_OID cyassl/ctaocrypt/asn.h /^ EKU_CLIENT_AUTH_OID = 72, \/* 1.3.6.1.5.5.7.3.2, id-kp-clientAuth *\/$/;" e enum:ExtKeyUsage_Sum -EKU_OCSP_SIGN_OID cyassl/ctaocrypt/asn.h /^ EKU_OCSP_SIGN_OID = 79, \/* 1.3.6.1.5.5.7.3.9, OCSPSigning *\/$/;" e enum:ExtKeyUsage_Sum -EKU_SERVER_AUTH_OID cyassl/ctaocrypt/asn.h /^ EKU_SERVER_AUTH_OID = 71, \/* 1.3.6.1.5.5.7.3.1, id-kp-serverAuth *\/$/;" e enum:ExtKeyUsage_Sum -ELLIPTIC_CURVES cyassl/internal.h /^ ELLIPTIC_CURVES = 10$/;" e enum:__anon13 -EMAIL_JOINT_LEN cyassl/ctaocrypt/asn.h /^ EMAIL_JOINT_LEN = 9,$/;" e enum:cert_enums -ENCRYPTED_DATA cyassl/ctaocrypt/pkcs7.h /^ ENCRYPTED_DATA = 656 \/* 1.2.840.113549.1.7.6 *\/$/;" e enum:PKCS7_TYPES -ENCRYPTION_TYPES cyassl/ctaocrypt/asn.h /^enum ENCRYPTION_TYPES {$/;" g -ENCRYPT_ERROR cyassl/error-ssl.h /^ ENCRYPT_ERROR = -214, \/* error during encryption *\/$/;" e enum:CyaSSL_ErrorCodes -ENCRYPT_LEN cyassl/internal.h /^ ENCRYPT_LEN = 512, \/* allow 4096 bit static buffer *\/$/;" e enum:Misc -ENET_IPADDR mqx/cyassl_client/Sources/main.h 51;" d -ENET_IPMASK mqx/cyassl_client/Sources/main.h 55;" d -ENTER_LOG cyassl/ctaocrypt/logging.h /^ ENTER_LOG,$/;" e enum:CYA_Log_Levels -ENTROPY_SZ ctaocrypt/src/random.c 74;" d file: -ENUM_LEN cyassl/internal.h /^ ENUM_LEN = 1, \/* always a byte *\/$/;" e enum:Misc -ENVELOPED_DATA cyassl/ctaocrypt/pkcs7.h /^ ENVELOPED_DATA = 653, \/* 1.2.840.113549.1.7.3 *\/$/;" e enum:PKCS7_TYPES -EPOCH_YEAR ctaocrypt/src/asn.c 201;" d file: -ERROR_LOG cyassl/ctaocrypt/logging.h /^ ERROR_LOG = 0,$/;" e enum:CYA_Log_Levels -ERROR_OUT ctaocrypt/src/rsa.c 199;" d file: -ERR_GET_REASON cyassl/openssl/ssl.h 284;" d -ERR_OUT src/ssl.c 5553;" d file: -ERR_TXT_STRING cyassl/ssl.h /^ ERR_TXT_STRING = 1$/;" e enum:__anon21 -ERR_clear_error cyassl/openssl/ssl.h 329;" d -ERR_error_string cyassl/openssl/ssl.h 143;" d -ERR_error_string_n cyassl/openssl/ssl.h 144;" d -ERR_free_strings cyassl/openssl/ssl.h 337;" d -ERR_get_error cyassl/openssl/ssl.h 328;" d -ERR_get_error_line_data cyassl/openssl/ssl.h 326;" d -ERR_peek_error cyassl/openssl/ssl.h 283;" d -ERR_remove_state cyassl/openssl/ssl.h 338;" d -ESD ctaocrypt/src/pkcs7.c /^typedef struct ESD {$/;" s file: -ESD ctaocrypt/src/pkcs7.c /^} ESD;$/;" t typeref:struct:ESD file: -ETAGS Makefile /^ETAGS = etags$/;" m -ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 157;" d -ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 157;" d -ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 157;" d -ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 157;" d -ETH0_ARP_CACHE_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 157;" d -ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 163;" d -ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 163;" d -ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 163;" d -ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 163;" d -ETH0_ARP_MAX_RETRY IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 163;" d -ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 175;" d -ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 175;" d -ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 175;" d -ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 175;" d -ETH0_ARP_NOTIFY IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 175;" d -ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 168;" d -ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 168;" d -ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 168;" d -ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 168;" d -ETH0_ARP_RESEND_TOUT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 168;" d -ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 152;" d -ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 152;" d -ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 152;" d -ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 152;" d -ETH0_ARP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 152;" d -ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 213;" d -ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 213;" d -ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 213;" d -ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 213;" d -ETH0_DHCP_BOOTFILE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 213;" d -ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 201;" d -ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 201;" d -ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 201;" d -ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 201;" d -ETH0_DHCP_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 201;" d -ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 219;" d -ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 219;" d -ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 219;" d -ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 219;" d -ETH0_DHCP_NTP_SERVERS IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 219;" d -ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 207;" d -ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 207;" d -ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 207;" d -ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 207;" d -ETH0_DHCP_VCID IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 207;" d -ETH0_DRIVER IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 17;" d -ETH0_DRIVER IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 17;" d -ETH0_DRIVER IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 17;" d -ETH0_DRIVER IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 17;" d -ETH0_DRIVER IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 17;" d -ETH0_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 13;" d -ETH0_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 13;" d -ETH0_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 13;" d -ETH0_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 13;" d -ETH0_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 13;" d -ETH0_GW1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 94;" d -ETH0_GW1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 94;" d -ETH0_GW1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 94;" d -ETH0_GW1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 94;" d -ETH0_GW1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 94;" d -ETH0_GW2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 98;" d -ETH0_GW2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 98;" d -ETH0_GW2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 98;" d -ETH0_GW2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 98;" d -ETH0_GW2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 98;" d -ETH0_GW3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 102;" d -ETH0_GW3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 102;" d -ETH0_GW3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 102;" d -ETH0_GW3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 102;" d -ETH0_GW3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 102;" d -ETH0_GW4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 106;" d -ETH0_GW4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 106;" d -ETH0_GW4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 106;" d -ETH0_GW4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 106;" d -ETH0_GW4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 106;" d -ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 180;" d -ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 180;" d -ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 180;" d -ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 180;" d -ETH0_IGMP_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 180;" d -ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 185;" d -ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 185;" d -ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 185;" d -ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 185;" d -ETH0_IGMP_TAB_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 185;" d -ETH0_IP1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 56;" d -ETH0_IP1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 56;" d -ETH0_IP1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 56;" d -ETH0_IP1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 56;" d -ETH0_IP1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 56;" d -ETH0_IP2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 60;" d -ETH0_IP2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 60;" d -ETH0_IP2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 60;" d -ETH0_IP2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 60;" d -ETH0_IP2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 60;" d -ETH0_IP3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 64;" d -ETH0_IP3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 64;" d -ETH0_IP3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 64;" d -ETH0_IP3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 64;" d -ETH0_IP3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 64;" d -ETH0_IP4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 68;" d -ETH0_IP4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 68;" d -ETH0_IP4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 68;" d -ETH0_IP4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 68;" d -ETH0_IP4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 68;" d -ETH0_MAC1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 27;" d -ETH0_MAC1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 27;" d -ETH0_MAC1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 27;" d -ETH0_MAC1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 27;" d -ETH0_MAC1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 27;" d -ETH0_MAC2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 31;" d -ETH0_MAC2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 31;" d -ETH0_MAC2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 31;" d -ETH0_MAC2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 31;" d -ETH0_MAC2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 31;" d -ETH0_MAC3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 35;" d -ETH0_MAC3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 35;" d -ETH0_MAC3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 35;" d -ETH0_MAC3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 35;" d -ETH0_MAC3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 35;" d -ETH0_MAC4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 39;" d -ETH0_MAC4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 39;" d -ETH0_MAC4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 39;" d -ETH0_MAC4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 39;" d -ETH0_MAC4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 39;" d -ETH0_MAC5 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 43;" d -ETH0_MAC5 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 43;" d -ETH0_MAC5 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 43;" d -ETH0_MAC5 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 43;" d -ETH0_MAC5 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 43;" d -ETH0_MAC6 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 47;" d -ETH0_MAC6 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 47;" d -ETH0_MAC6 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 47;" d -ETH0_MAC6 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 47;" d -ETH0_MAC6 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 47;" d -ETH0_MASK1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 75;" d -ETH0_MASK1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 75;" d -ETH0_MASK1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 75;" d -ETH0_MASK1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 75;" d -ETH0_MASK1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 75;" d -ETH0_MASK2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 79;" d -ETH0_MASK2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 79;" d -ETH0_MASK2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 79;" d -ETH0_MASK2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 79;" d -ETH0_MASK2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 79;" d -ETH0_MASK3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 83;" d -ETH0_MASK3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 83;" d -ETH0_MASK3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 83;" d -ETH0_MASK3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 83;" d -ETH0_MASK3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 83;" d -ETH0_MASK4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 87;" d -ETH0_MASK4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 87;" d -ETH0_MASK4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 87;" d -ETH0_MASK4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 87;" d -ETH0_MASK4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 87;" d -ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 193;" d -ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 193;" d -ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 193;" d -ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 193;" d -ETH0_NBNS_ENABLE IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 193;" d -ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 113;" d -ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 113;" d -ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 113;" d -ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 113;" d -ETH0_PRI_DNS1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 113;" d -ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 117;" d -ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 117;" d -ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 117;" d -ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 117;" d -ETH0_PRI_DNS2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 117;" d -ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 121;" d -ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 121;" d -ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 121;" d -ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 121;" d -ETH0_PRI_DNS3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 121;" d -ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 125;" d -ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 125;" d -ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 125;" d -ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 125;" d -ETH0_PRI_DNS4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 125;" d -ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 132;" d -ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 132;" d -ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 132;" d -ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 132;" d -ETH0_SEC_DNS1 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 132;" d -ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 136;" d -ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 136;" d -ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 136;" d -ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 136;" d -ETH0_SEC_DNS2 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 136;" d -ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 140;" d -ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 140;" d -ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 140;" d -ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 140;" d -ETH0_SEC_DNS3 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 140;" d -ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Network/Net_Config_ETH_0.h 144;" d -ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/EchoClient/RTE/Network/Net_Config_ETH_0.h 144;" d -ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/EchoServer/RTE/Network/Net_Config_ETH_0.h 144;" d -ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/SimpleClient/RTE/Network/Net_Config_ETH_0.h 144;" d -ETH0_SEC_DNS4 IDE/MDK5-ARM/Projects/SimpleServer/RTE/Network/Net_Config_ETH_0.h 144;" d -ETHER_IF_ADDR_LEN src/sniffer.c /^ ETHER_IF_ADDR_LEN = 6, \/* ethernet interface address length *\/$/;" e enum:__anon96 file: -ETHER_IF_FRAME_LEN sslSniffer/sslSnifferTest/snifftest.c /^ ETHER_IF_FRAME_LEN = 14, \/* ethernet interface frame length *\/$/;" e enum:__anon97 file: -ETH_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 42;" d file: -ETH_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^ETH_IRQHandler$/;" l -ETH_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -ETH_WKUP_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^ETH_WKUP_IRQHandler $/;" l -EVP_BytesToKey cyassl/openssl/evp.h 217;" d -EVP_CIPHER cyassl/openssl/evp.h /^typedef CYASSL_EVP_CIPHER EVP_CIPHER;$/;" t -EVP_CIPHER_CTX cyassl/openssl/evp.h /^typedef CYASSL_EVP_CIPHER_CTX EVP_CIPHER_CTX;$/;" t -EVP_CIPHER_CTX_cleanup cyassl/openssl/evp.h 220;" d -EVP_CIPHER_CTX_init cyassl/openssl/evp.h 219;" d -EVP_CIPHER_CTX_iv_length cyassl/openssl/evp.h 221;" d -EVP_CIPHER_CTX_key_length cyassl/openssl/evp.h 222;" d -EVP_CIPHER_CTX_set_key_length cyassl/openssl/evp.h 223;" d -EVP_Cipher cyassl/openssl/evp.h 225;" d -EVP_CipherInit cyassl/openssl/evp.h 224;" d -EVP_DigestFinal cyassl/openssl/evp.h 215;" d -EVP_DigestFinal_ex cyassl/openssl/evp.h 216;" d -EVP_DigestInit cyassl/openssl/evp.h 213;" d -EVP_DigestUpdate cyassl/openssl/evp.h 214;" d -EVP_MAX_MD_SIZE cyassl/openssl/evp.h 233;" d -EVP_MD cyassl/openssl/evp.h /^typedef CYASSL_EVP_MD EVP_MD;$/;" t -EVP_MD_CTX cyassl/openssl/evp.h /^typedef CYASSL_EVP_MD_CTX EVP_MD_CTX;$/;" t -EVP_MD_CTX_cleanup cyassl/openssl/evp.h 212;" d -EVP_MD_CTX_init cyassl/openssl/evp.h 211;" d -EVP_MD_size cyassl/openssl/evp.h 210;" d -EVP_PKEY cyassl/openssl/ssl.h /^typedef CYASSL_EVP_PKEY EVP_PKEY;$/;" t -EVP_PKEY_DSA cyassl/openssl/evp.h /^ EVP_PKEY_DSA = 12,$/;" e enum:__anon36 -EVP_PKEY_RSA cyassl/openssl/evp.h /^ EVP_PKEY_RSA = 11,$/;" e enum:__anon36 -EVP_PKEY_free cyassl/openssl/ssl.h 257;" d -EVP_PKEY_get1_DSA cyassl/openssl/evp.h 230;" d -EVP_PKEY_get1_RSA cyassl/openssl/evp.h 229;" d -EVP_R_BAD_DECRYPT cyassl/ssl.h /^ EVP_R_BAD_DECRYPT = 2,$/;" e enum:__anon19 -EVP_SALT_SIZE cyassl/internal.h /^ EVP_SALT_SIZE = 8, \/* evp salt size 64 bits *\/$/;" e enum:Misc -EVP_aes_128_cbc cyassl/openssl/evp.h 199;" d -EVP_aes_128_ctr cyassl/openssl/evp.h 202;" d -EVP_aes_192_cbc cyassl/openssl/evp.h 200;" d -EVP_aes_192_ctr cyassl/openssl/evp.h 203;" d -EVP_aes_256_cbc cyassl/openssl/evp.h 201;" d -EVP_aes_256_ctr cyassl/openssl/evp.h 204;" d -EVP_cleanup cyassl/openssl/ssl.h 339;" d -EVP_des_cbc cyassl/openssl/evp.h 205;" d -EVP_des_ede3_cbc cyassl/openssl/evp.h 206;" d -EVP_enc_null cyassl/openssl/evp.h 208;" d -EVP_get_digestbynid cyassl/openssl/evp.h 227;" d -EVP_md5 cyassl/openssl/evp.h 192;" d -EVP_rc4 cyassl/openssl/evp.h 207;" d -EVP_ripemd160 cyassl/openssl/evp.h 197;" d -EVP_sha1 cyassl/openssl/evp.h 193;" d -EVP_sha256 cyassl/openssl/evp.h 194;" d -EVP_sha384 cyassl/openssl/evp.h 195;" d -EVP_sha512 cyassl/openssl/evp.h 196;" d -EVRT_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^EVRT_IRQHandler$/;" l -EXCHANGE_INFO_SZ cyassl/ctaocrypt/ecc.h /^ EXCHANGE_INFO_SZ = 23 $/;" e enum:__anon75 -EXCHANGE_SALT_SZ cyassl/ctaocrypt/ecc.h /^ EXCHANGE_SALT_SZ = 16, $/;" e enum:__anon75 -EXEEXT Makefile /^EXEEXT = $/;" m -EXTENSIONS_E cyassl/ctaocrypt/error-crypt.h /^ EXTENSIONS_E = -139, \/* setting extensions error *\/$/;" e enum:__anon61 -EXTERNAL_SERIAL_SIZE cyassl/ctaocrypt/asn.h /^ EXTERNAL_SERIAL_SIZE = 32,$/;" e enum:__anon60 -EXTERNAL_SERIAL_SIZE cyassl/internal.h 1692;" d -EXTI0_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI0_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI0_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI15_10_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI15_10_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI1_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI1_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI2_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI2_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI3_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI3_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI4_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI4_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTI9_5_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^EXTI9_5_IRQHandler $/;" l -EXTKEYUSE_ANY cyassl/ctaocrypt/asn.h 265;" d -EXTKEYUSE_AUTH_E cyassl/error-ssl.h /^ EXTKEYUSE_AUTH_E = -286, \/* ExtKeyUse server|client_auth *\/$/;" e enum:CyaSSL_ErrorCodes -EXTKEYUSE_CLIENT_AUTH cyassl/ctaocrypt/asn.h 267;" d -EXTKEYUSE_OCSP_SIGN cyassl/ctaocrypt/asn.h 266;" d -EXTKEYUSE_SERVER_AUTH cyassl/ctaocrypt/asn.h 268;" d -EXTRA_DIST Makefile /^EXTRA_DIST = lib\/dummy cyassl-ntru.vcproj cyassl.vcproj \\$/;" m -EXTRA_HEADERS Makefile /^EXTRA_HEADERS = $/;" m -EXT_ID_SZ cyassl/internal.h /^ EXT_ID_SZ = 2, \/* always use 2 bytes *\/$/;" e enum:Misc -EXT_KEY_USAGE_OID cyassl/ctaocrypt/asn.h /^ EXT_KEY_USAGE_OID = 151, \/* 2.5.29.37 *\/$/;" e enum:Extensions_Sum -EXT_TYPE_SZ src/sniffer.c /^ EXT_TYPE_SZ = 2, \/* Extension length *\/$/;" e enum:__anon96 file: -EZH_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^EZH_IRQHandler$/;" l -EccCurves cyassl/internal.h /^enum EccCurves {$/;" g -EccNamedCurves cyassl/internal.h /^enum EccNamedCurves {$/;" g -EccPrivateKeyDecode ctaocrypt/src/asn.c /^int EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,$/;" f -EccSignCb cyassl/internal.h /^ CallbackEccSign EccSignCb; \/* User EccSign Callback handler *\/$/;" m struct:CYASSL_CTX -EccSignCtx cyassl/internal.h /^ void* EccSignCtx; \/* Ecc Sign Callback Context *\/$/;" m struct:CYASSL -EccVerifyCb cyassl/internal.h /^ CallbackEccVerify EccVerifyCb; \/* User EccVerify Callback handler *\/$/;" m struct:CYASSL_CTX -EccVerifyCtx cyassl/internal.h /^ void* EccVerifyCtx; \/* Ecc Verify Callback Context *\/$/;" m struct:CYASSL -Ecc_Sum cyassl/ctaocrypt/asn.h /^enum Ecc_Sum {$/;" g -EllipticCurve cyassl/internal.h /^typedef struct EllipticCurve {$/;" s -EllipticCurve cyassl/internal.h /^} EllipticCurve;$/;" t typeref:struct:EllipticCurve -EmbedGenerateCookie src/io.c /^int EmbedGenerateCookie(CYASSL* ssl, byte *buf, int sz, void *ctx)$/;" f -EmbedOcspLookup src/io.c /^int EmbedOcspLookup(void* ctx, const char* url, int urlSz,$/;" f -EmbedOcspRespFree src/io.c /^void EmbedOcspRespFree(void* ctx, byte *resp)$/;" f -EmbedReceive src/io.c /^int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx)$/;" f -EmbedReceiveFrom src/io.c /^int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx)$/;" f -EmbedSend src/io.c /^int EmbedSend(CYASSL* ssl, char *buf, int sz, void *ctx)$/;" f -EmbedSendTo src/io.c /^int EmbedSendTo(CYASSL* ssl, char *buf, int sz, void *ctx)$/;" f -EncodeAttributes ctaocrypt/src/pkcs7.c /^static int EncodeAttributes(EncodedAttrib* ea, int eaSz,$/;" f file: -EncodeCert ctaocrypt/src/asn.c /^static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey,$/;" f file: -EncodeCertReq ctaocrypt/src/asn.c /^static int EncodeCertReq(Cert* cert, DerCert* der,$/;" f file: -EncodeOcspRequest ctaocrypt/src/asn.c /^int EncodeOcspRequest(OcspRequest* req)$/;" f -EncodeSignature ctaocrypt/src/asn.c /^word32 EncodeSignature(byte* out, const byte* digest, word32 digSz, int hashOID)$/;" f -EncodedAttrib ctaocrypt/src/pkcs7.c /^typedef struct EncodedAttrib {$/;" s file: -EncodedAttrib ctaocrypt/src/pkcs7.c /^} EncodedAttrib;$/;" t typeref:struct:EncodedAttrib file: -EncodedName ctaocrypt/src/asn.c /^typedef struct EncodedName {$/;" s file: -EncodedName ctaocrypt/src/asn.c /^} EncodedName;$/;" t typeref:struct:EncodedName file: -Encrypt src/internal.c /^static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz)$/;" f file: -EncryptedInfo cyassl/internal.h /^typedef struct EncryptedInfo {$/;" s -EncryptedInfo cyassl/internal.h /^} EncryptedInfo;$/;" t typeref:struct:EncryptedInfo -EthernetHdr src/sniffer.c /^typedef struct EthernetHdr {$/;" s file: -EthernetHdr src/sniffer.c /^} EthernetHdr;$/;" t typeref:struct:EthernetHdr file: -ExtKeyUsage_Sum cyassl/ctaocrypt/asn.h /^enum ExtKeyUsage_Sum { \/* From RFC 5280 *\/$/;" g -Extensions_Sum cyassl/ctaocrypt/asn.h /^enum Extensions_Sum {$/;" g -F ctaocrypt/src/md4.c 63;" d file: -F ctaocrypt/src/ripemd.c 64;" d file: -F1 ctaocrypt/src/md5.c 194;" d file: -F2 ctaocrypt/src/md5.c 195;" d file: -F3 ctaocrypt/src/md5.c 196;" d file: -F4 ctaocrypt/src/md5.c 197;" d file: -FALSE ctaocrypt/src/asn.c 81;" d file: -FALSE src/internal.c 57;" d file: -FALSE src/ssl.c 79;" d file: -FAST_ROTATE cyassl/ctaocrypt/types.h 131;" d -FAST_ROTATE cyassl/ctaocrypt/types.h 134;" d -FAST_ROTATE cyassl/ctaocrypt/types.h 138;" d -FATAL_ERROR cyassl/error-ssl.h /^ FATAL_ERROR = -213, \/* recvd alert fatal error *\/$/;" e enum:CyaSSL_ErrorCodes -FATAL_ERROR_STATE src/sniffer.c /^ FATAL_ERROR_STATE = 1, \/* SnifferSession fatal error state *\/$/;" e enum:__anon96 file: -FATAL_ERROR_STR cyassl/sniffer_error.h 85;" d -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_ADDR IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 32;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_RELOC IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 28;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CryptTest/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/EchoClient/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/EchoServer/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/SimpleClient/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACHE_SIZE IDE/MDK5-ARM/Projects/SimpleServer/RTE/File_System/FS_Config.c 24;" d file: -FAT_NAME_CACNT IDE/MDK-ARM/MDK-ARM/config/File_Config.c 29;" d file: -FAT_NAME_CADR IDE/MDK-ARM/MDK-ARM/config/File_Config.c 37;" d file: -FAT_NAME_RELOC IDE/MDK-ARM/MDK-ARM/config/File_Config.c 33;" d file: -FD_SETSIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 40;" d -FD_SETSIZE IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 40;" d -FGREP Makefile /^FGREP = \/bin\/grep -F$/;" m -FILETYPE_DER cyassl/sniffer.h /^ FILETYPE_DER = 2,$/;" e enum:__anon29 -FILETYPE_PEM cyassl/sniffer.h /^ FILETYPE_PEM = 1,$/;" e enum:__anon29 -FILE_BUFFER_SIZE cyassl/internal.h /^ FILE_BUFFER_SIZE = 1024, \/* default static file buffer size for input,$/;" e enum:Misc -FILL_PATTERN IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 403;" d file: -FILL_PATTERN IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 410;" d file: -FINISHED_DONE cyassl/internal.h /^ FINISHED_DONE,$/;" e enum:ConnectState -FINISHED_LABEL_SZ cyassl/internal.h /^ FINISHED_LABEL_SZ = 15, \/* TLS finished label size *\/$/;" e enum:Misc -FINISHED_SZ cyassl/internal.h /^ FINISHED_SZ = 36, \/* MD5_DIGEST_SIZE + SHA_DIGEST_SIZE *\/$/;" e enum:Misc -FIPS_NOT_ALLOWED_E cyassl/ctaocrypt/error-crypt.h /^ FIPS_NOT_ALLOWED_E = -197, \/* FIPS not allowed error *\/$/;" e enum:__anon61 -FIPS_NO_WRAPPERS ctaocrypt/src/aes.c 32;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/des3.c 32;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/hmac.c 48;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/rsa.c 33;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/sha.c 39;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/sha256.c 41;" d file: -FIPS_NO_WRAPPERS ctaocrypt/src/sha512.c 32;" d file: -FIRST_REPLY_DONE cyassl/internal.h /^ FIRST_REPLY_DONE,$/;" e enum:ConnectState -FIRST_REPLY_FIRST cyassl/internal.h /^ FIRST_REPLY_FIRST,$/;" e enum:ConnectState -FIRST_REPLY_FOURTH cyassl/internal.h /^ FIRST_REPLY_FOURTH,$/;" e enum:ConnectState -FIRST_REPLY_SECOND cyassl/internal.h /^ FIRST_REPLY_SECOND,$/;" e enum:ConnectState -FIRST_REPLY_THIRD cyassl/internal.h /^ FIRST_REPLY_THIRD,$/;" e enum:ConnectState -FL0_BADR IDE/MDK-ARM/MDK-ARM/config/File_Config.c 54;" d file: -FL0_DEF IDE/MDK-ARM/MDK-ARM/config/File_Config.c 73;" d file: -FL0_EN IDE/MDK-ARM/MDK-ARM/config/File_Config.c 49;" d file: -FL0_HFILE IDE/MDK-ARM/MDK-ARM/config/File_Config.c 69;" d file: -FL0_INITV IDE/MDK-ARM/MDK-ARM/config/File_Config.c 64;" d file: -FL0_SIZE IDE/MDK-ARM/MDK-ARM/config/File_Config.c 59;" d file: -FLASH_EEPROM_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^FLASH_EEPROM_IRQHandler$/;" l -FLASH_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FLASH_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FLASH_IRQHandler $/;" l -FORCED_FREE cyassl/internal.h /^ FORCED_FREE = 1,$/;" e enum:__anon11 -FORGROUND IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: -FORGROUND IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c /^enum jobtype { FORGROUND, BACKGROUND } ;$/;" e enum:jobtype file: -FOURK_BUF IDE/MDK5-ARM/Projects/CryptTest/test.c 2505;" d file: -FOURK_BUF IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c 2276;" d file: -FOURK_BUF ctaocrypt/test/test.c 2678;" d file: -FPERM ctaocrypt/src/des3.c /^static INLINE void FPERM(word32* left, word32* right)$/;" f file: -FP_64BIT cyassl/ctaocrypt/tfm.h 69;" d -FP_64BIT cyassl/ctaocrypt/tfm.h 74;" d -FP_64BIT cyassl/ctaocrypt/tfm.h 91;" d -FP_ENTRIES ctaocrypt/src/ecc.c 2167;" d file: -FP_EQ cyassl/ctaocrypt/tfm.h 258;" d -FP_GT cyassl/ctaocrypt/tfm.h 259;" d -FP_LT cyassl/ctaocrypt/tfm.h 257;" d -FP_LUT ctaocrypt/src/ecc.c 2172;" d file: -FP_MASK cyassl/ctaocrypt/tfm.h 244;" d -FP_MAX_BITS cyassl/ctaocrypt/tfm.h 232;" d -FP_MAX_SIZE cyassl/ctaocrypt/tfm.h 234;" d -FP_MEM cyassl/ctaocrypt/tfm.h 254;" d -FP_NEG cyassl/ctaocrypt/tfm.h 249;" d -FP_NO cyassl/ctaocrypt/tfm.h 263;" d -FP_OKAY cyassl/ctaocrypt/tfm.h 252;" d -FP_SIZE cyassl/ctaocrypt/tfm.h 245;" d -FP_VAL cyassl/ctaocrypt/tfm.h 253;" d -FP_YES cyassl/ctaocrypt/tfm.h 262;" d -FP_ZPOS cyassl/ctaocrypt/tfm.h 248;" d -FREAD_ERROR cyassl/error-ssl.h /^ FREAD_ERROR = -215, \/* fread problem *\/$/;" e enum:CyaSSL_ErrorCodes -FREERTOS cyassl/ctaocrypt/settings.h 218;" d -FREESCALE_K70_RNGA cyassl/ctaocrypt/settings.h 364;" d -FREESCALE_MMCAU cyassl/ctaocrypt/settings.h 196;" d -FREESCALE_MQX cyassl/ctaocrypt/settings.h 195;" d -FSMC_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FSMC_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^FSMC_IRQHandler $/;" l -FTPC_DEFTOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 735;" d file: -FTPC_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 729;" d file: -FTPC_PASVMODE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 740;" d file: -FTP_AUTHPASSW IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 722;" d file: -FTP_AUTHUSER IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 718;" d file: -FTP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 686;" d file: -FTP_ENAUTH IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 714;" d file: -FTP_IDLETOUT IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 708;" d file: -FTP_NUMSESS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 691;" d file: -FTP_PORTNUM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 696;" d file: -FTP_WELMSG IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 702;" d file: -FWRITE_ERROR cyassl/error-ssl.h /^ FWRITE_ERROR = -279, \/* fwrite problem *\/$/;" e enum:CyaSSL_ErrorCodes -Fail tests/unit.h 8;" d -FillSignStr swig/cyassl_adds.c /^void FillSignStr(unsigned char* dst, const char* src, int size)$/;" f -FinCaputre src/sniffer.c /^typedef struct FinCaputre {$/;" s file: -FinCaputre src/sniffer.c /^} FinCaputre;$/;" t typeref:struct:FinCaputre file: -FinishHandShakeInfo src/internal.c /^ void FinishHandShakeInfo(HandShakeInfo* info, const CYASSL* ssl)$/;" f -Flags src/sniffer.c /^typedef struct Flags {$/;" s file: -Flags src/sniffer.c /^} Flags;$/;" t typeref:struct:Flags file: -FlattenAttributes ctaocrypt/src/pkcs7.c /^static int FlattenAttributes(byte* output, EncodedAttrib* ea, int eaSz)$/;" f file: -FlattenSzInBits ctaocrypt/src/aes.c /^static INLINE void FlattenSzInBits(byte* buf, word32 sz)$/;" f file: -FreeAll sslSniffer/sslSnifferTest/snifftest.c /^static void FreeAll(void)$/;" f file: -FreeAltNames ctaocrypt/src/asn.c /^void FreeAltNames(DNS_entry* altNames, void* heap)$/;" f -FreeArrays src/internal.c /^void FreeArrays(CYASSL* ssl, int keep)$/;" f -FreeAtomicUser cyassl/test.h /^static INLINE void FreeAtomicUser(CYASSL* ssl)$/;" f -FreeCRL src/crl.c /^void FreeCRL(CYASSL_CRL* crl, int dynamic)$/;" f -FreeCRL_Entry src/crl.c /^static void FreeCRL_Entry(CRL_Entry* crle)$/;" f file: -FreeCaviumRsaKey ctaocrypt/src/rsa.c /^static int FreeCaviumRsaKey(RsaKey* key)$/;" f file: -FreeCiphers src/internal.c /^void FreeCiphers(CYASSL* ssl)$/;" f -FreeDecodedCRL ctaocrypt/src/asn.c /^void FreeDecodedCRL(DecodedCRL* dcrl)$/;" f -FreeDecodedCert ctaocrypt/src/asn.c /^void FreeDecodedCert(DecodedCert* cert)$/;" f -FreeDhKey ctaocrypt/src/dh.c /^void FreeDhKey(DhKey* key)$/;" f -FreeDsaKey ctaocrypt/src/dsa.c /^void FreeDsaKey(DsaKey* key)$/;" f -FreeHandshakeResources src/internal.c /^void FreeHandshakeResources(CYASSL* ssl)$/;" f -FreeMutex ctaocrypt/src/port.c /^ int FreeMutex(CyaSSL_Mutex* m)$/;" f -FreeMutex ctaocrypt/src/port.c /^ int FreeMutex(CyaSSL_Mutex* m)$/;" f -FreeMutex ctaocrypt/src/port.c /^int FreeMutex(CyaSSL_Mutex *m)$/;" f -FreeNameSubtrees ctaocrypt/src/asn.c /^void FreeNameSubtrees(Base_entry* names, void* heap)$/;" f -FreeOCSP src/ocsp.c /^void FreeOCSP(CYASSL_OCSP* ocsp, int dynamic)$/;" f -FreeOCSP_Entry src/ocsp.c /^static void FreeOCSP_Entry(OCSP_Entry* ocspe)$/;" f file: -FreePacketBuffer src/sniffer.c /^static void FreePacketBuffer(PacketBuffer* del)$/;" f file: -FreePacketList src/sniffer.c /^static void FreePacketList(PacketBuffer* in)$/;" f file: -FreeRng ctaocrypt/src/random.c /^void FreeRng(RNG* rng)$/;" f -FreeRsaKey ctaocrypt/src/rsa.c /^int FreeRsaKey(RsaKey* key)$/;" f -FreeRsaKey cyassl/ctaocrypt/rsa.h 122;" d -FreeSSL src/internal.c /^void FreeSSL(CYASSL* ssl)$/;" f -FreeSSL_Ctx src/internal.c /^void FreeSSL_Ctx(CYASSL_CTX* ctx)$/;" f -FreeSigner ctaocrypt/src/asn.c /^void FreeSigner(Signer* signer, void* heap)$/;" f -FreeSignerTable ctaocrypt/src/asn.c /^void FreeSignerTable(Signer** table, int rows, void* heap)$/;" f -FreeSnifferServer src/sniffer.c /^static void FreeSnifferServer(SnifferServer* srv)$/;" f file: -FreeSnifferSession src/sniffer.c /^static void FreeSnifferSession(SnifferSession* session)$/;" f file: -FreeStreams src/internal.c /^ static void FreeStreams(CYASSL* ssl)$/;" f file: -FreeTcpReady tests/unit.c /^void FreeTcpReady(tcp_ready* ready)$/;" f -FreeTcpReady testsuite/testsuite.c /^void FreeTcpReady(tcp_ready* ready)$/;" f -FreeTimeoutInfo src/internal.c /^ void FreeTimeoutInfo(TimeoutInfo* info, void* heap)$/;" f -FreeTmpRsas ctaocrypt/src/asn.c /^static INLINE void FreeTmpRsas(byte** tmps, void* heap)$/;" f file: -FreeX509 src/internal.c /^void FreeX509(CYASSL_X509* x509)$/;" f -FreeX509Name src/internal.c /^void FreeX509Name(CYASSL_X509_NAME* name)$/;" f -G ctaocrypt/src/blake2b.c 228;" d file: -G ctaocrypt/src/blake2b.c 266;" d file: -G ctaocrypt/src/md4.c 64;" d file: -G ctaocrypt/src/ripemd.c 65;" d file: -GATE_IPADDR mqx/cyassl_client/Sources/main.h 58;" d -GENERALNAME_URI ctaocrypt/src/asn.c 3350;" d file: -GENERIC_CONFIG Makefile /^GENERIC_CONFIG = cyassl-config$/;" m -GEN_COOKIE_E cyassl/error-ssl.h /^ GEN_COOKIE_E = -277, \/* Generate Cookie Error *\/$/;" e enum:CyaSSL_ErrorCodes -GEN_MEM_ERR ctaocrypt/src/ecc.c 1551;" d file: -GEN_MEM_ERR ctaocrypt/src/ecc.c 1553;" d file: -GETBYTE ctaocrypt/src/aes.c 1507;" d file: -GETITIMER_ERROR cyassl/error-ssl.h /^ GETITIMER_ERROR = -238, \/* getitimer failed ??? *\/$/;" e enum:CyaSSL_ErrorCodes -GETTIME_ERROR cyassl/error-ssl.h /^ GETTIME_ERROR = -237, \/* gettimeofday failed ??? *\/$/;" e enum:CyaSSL_ErrorCodes -GETU32 ctaocrypt/src/camellia.c 100;" d file: -GETU32 ctaocrypt/src/camellia.c 105;" d file: -GHASH ctaocrypt/src/aes.c /^static void GHASH(Aes* aes, const byte* a, word32 aSz,$/;" f file: -GINT0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GINT0_IRQHandler$/;" l -GINT1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GINT1_IRQHandler$/;" l -GMULT ctaocrypt/src/aes.c /^static void GMULT(byte *x, byte m[256][AES_BLOCK_SIZE])$/;" f file: -GMULT ctaocrypt/src/aes.c /^static void GMULT(byte* X, byte* Y)$/;" f file: -GMULT ctaocrypt/src/aes.c /^static void GMULT(word32* X, word32* Y)$/;" f file: -GMULT ctaocrypt/src/aes.c /^static void GMULT(word64* X, word64* Y)$/;" f file: -GOT_ALERT_STR cyassl/sniffer_error.h 75;" d -GOT_APP_DATA_STR cyassl/sniffer_error.h 73;" d -GOT_CERT_REQ_STR cyassl/sniffer_error.h 47;" d -GOT_CERT_STR cyassl/sniffer_error.h 49;" d -GOT_CERT_VER_STR cyassl/sniffer_error.h 55;" d -GOT_CHANGE_CIPHER_STR cyassl/sniffer_error.h 71;" d -GOT_CLIENT_HELLO_STR cyassl/sniffer_error.h 53;" d -GOT_CLIENT_KEY_EX_STR cyassl/sniffer_error.h 54;" d -GOT_FINISHED_STR cyassl/sniffer_error.h 52;" d -GOT_HANDSHAKE_STR cyassl/sniffer_error.h 69;" d -GOT_HELLO_REQUEST_STR cyassl/sniffer_error.h 96;" d -GOT_HELLO_VERIFY_STR cyassl/sniffer_error.h 45;" d -GOT_OLD_CLIENT_HELLO_STR cyassl/sniffer_error.h 63;" d -GOT_PACKET_STR cyassl/sniffer_error.h 59;" d -GOT_SERVER_HELLO_DONE_STR cyassl/sniffer_error.h 51;" d -GOT_SERVER_HELLO_STR cyassl/sniffer_error.h 46;" d -GOT_SERVER_KEY_EX_STR cyassl/sniffer_error.h 48;" d -GOT_SESSION_TICKET_STR cyassl/sniffer_error.h 97;" d -GOT_UNKNOWN_HANDSHAKE_STR cyassl/sniffer_error.h 56;" d -GOT_UNKNOWN_RECORD_STR cyassl/sniffer_error.h 82;" d -GPIO0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO0_IRQHandler$/;" l -GPIO1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO1_IRQHandler$/;" l -GPIO2_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO2_IRQHandler$/;" l -GPIO3_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO3_IRQHandler$/;" l -GPIO4_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO4_IRQHandler$/;" l -GPIO5_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO5_IRQHandler$/;" l -GPIO6_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO6_IRQHandler$/;" l -GPIO7_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^GPIO7_IRQHandler$/;" l -GPIO_PORT IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GPIO_PORT IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/RTE_Device.h 16;" d -GREP Makefile /^GREP = \/bin\/grep$/;" m -GZIP_ENV Makefile /^GZIP_ENV = --best$/;" m -Gamma0 ctaocrypt/src/sha256.c 123;" d file: -Gamma1 ctaocrypt/src/sha256.c 124;" d file: -GenerateM0 ctaocrypt/src/aes.c /^static void GenerateM0(Aes* aes)$/;" f file: -GeneratePrivate ctaocrypt/src/dh.c /^static int GeneratePrivate(DhKey* key, RNG* rng, byte* priv, word32* privSz)$/;" f file: -GeneratePublic ctaocrypt/src/dh.c /^static int GeneratePublic(DhKey* key, const byte* priv, word32 privSz,$/;" f file: -GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f -GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f -GenerateSeed ctaocrypt/src/random.c /^ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f -GenerateSeed ctaocrypt/src/random.c /^int GenerateSeed(OS_Seed* os, byte* output, word32 sz)$/;" f -GetAlgoId ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid,$/;" f -GetBasicDate ctaocrypt/src/asn.c /^static int GetBasicDate(const byte* source, word32* idx, byte* date,$/;" f file: -GetCA IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCA(void* vp, byte* hash) $/;" f -GetCA IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCA(void* vp, byte* hash) $/;" f -GetCA src/ssl.c /^Signer* GetCA(void* vp, byte* hash)$/;" f -GetCAByName IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f -GetCAByName IDE/MDK5-ARM/MDK-ARM/CyaSSL/ssl-dummy.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f -GetCAByName src/ssl.c /^Signer* GetCAByName(void* vp, byte* hash)$/;" f -GetCRL_Signature ctaocrypt/src/asn.c /^static int GetCRL_Signature(const byte* source, word32* idx, DecodedCRL* dcrl,$/;" f file: -GetCaviumInt ctaocrypt/src/asn.c /^static int GetCaviumInt(byte** buff, word16* buffSz, const byte* input,$/;" f file: -GetCertCacheMemSize src/ssl.c /^static INLINE int GetCertCacheMemSize(CYASSL_CERT_MANAGER* cm)$/;" f file: -GetCertCacheRowMemory src/ssl.c /^static INLINE int GetCertCacheRowMemory(Signer* row)$/;" f file: -GetCertHeader ctaocrypt/src/asn.c /^static int GetCertHeader(DecodedCert* cert)$/;" f file: -GetContentType ctaocrypt/src/pkcs7.c /^int GetContentType(const byte* input, word32* inOutIdx, word32* oid,$/;" f -GetDate IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)$/;" f file: -GetDate IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)$/;" f file: -GetDate ctaocrypt/src/asn.c /^static int GetDate(DecodedCert* cert, int dateType)$/;" f file: -GetDtlsHandShakeHeader src/internal.c /^static int GetDtlsHandShakeHeader(CYASSL* ssl, const byte* input,$/;" f file: -GetEntropy IDE/MDK5-ARM/Projects/CryptTest/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f -GetEntropy IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f -GetEntropy ctaocrypt/test/test.c /^byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f -GetEntropy src/internal.c /^static byte GetEntropy(ENTROPY_CMD cmd, byte* out)$/;" f file: -GetEnumerated ctaocrypt/src/asn.c /^static int GetEnumerated(const byte* input, word32* inOutIdx, int *value)$/;" f file: -GetEpoch src/tls.c /^static INLINE word32 GetEpoch(CYASSL* ssl, int verify)$/;" f file: -GetError src/sniffer.c /^static void GetError(int idx, char* buffer)$/;" f file: -GetError src/sniffer.c /^static void GetError(int idx, char* str)$/;" f file: -GetExplicitVersion ctaocrypt/src/asn.c /^static int GetExplicitVersion(const byte* input, word32* inOutIdx, int* version)$/;" f file: -GetHandShakeHeader src/internal.c /^static int GetHandShakeHeader(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: -GetHashSizeByType ctaocrypt/src/hmac.c /^static INLINE int GetHashSizeByType(int type)$/;" f file: -GetInputData src/internal.c /^static int GetInputData(CYASSL *ssl, word32 size)$/;" f file: -GetInt ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx,$/;" f -GetKey ctaocrypt/src/asn.c /^static int GetKey(DecodedCert* cert)$/;" f file: -GetLength ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetLength(const byte* input, word32* inOutIdx, int* len,$/;" f -GetMyVersion ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetMyVersion(const byte* input, word32* inOutIdx, int* version)$/;" f -GetName ctaocrypt/src/asn.c /^static int GetName(DecodedCert* cert, int nameType)$/;" f file: -GetNameHash ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetNameHash(const byte* source, word32* idx, byte* hash,$/;" f -GetNameId ctaocrypt/src/asn.c /^static byte GetNameId(int idx)$/;" f file: -GetObjectId ctaocrypt/src/asn.c /^static int GetObjectId(const byte* input, word32* inOutIdx, word32* oid,$/;" f file: -GetOneName ctaocrypt/src/asn.c /^static const char* GetOneName(CertName* name, int idx)$/;" f file: -GetRecordHeader src/internal.c /^static int GetRecordHeader(CYASSL* ssl, const byte* input, word32* inOutIdx,$/;" f file: -GetRecordHeader src/sniffer.c /^static int GetRecordHeader(const byte* input, RecordLayerHeader* rh, int* size)$/;" f file: -GetRevoked ctaocrypt/src/asn.c /^static int GetRevoked(const byte* buff, word32* idx, DecodedCRL* dcrl,$/;" f file: -GetRng swig/cyassl_adds.c /^RNG* GetRng(void)$/;" f -GetRounds src/internal.c /^static INLINE int GetRounds(int pLen, int padLen, int t)$/;" f file: -GetRsaInt ctaocrypt/src/asn.c /^static mp_int* GetRsaInt(RsaKey* key, int idx)$/;" f file: -GetRsaPrivateKey swig/cyassl_adds.c /^RsaKey* GetRsaPrivateKey(const char* keyFile)$/;" f -GetSEQIncrement src/internal.c /^static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify)$/;" f file: -GetSEQIncrement src/tls.c /^static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify)$/;" f file: -GetSequence ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetSequence(const byte* input, word32* inOutIdx, int* len,$/;" f -GetSession src/ssl.c /^CYASSL_SESSION* GetSession(CYASSL* ssl, byte* masterSecret)$/;" f -GetSessionClient src/ssl.c /^CYASSL_SESSION* GetSessionClient(CYASSL* ssl, const byte* id, int len)$/;" f -GetSet ctaocrypt/src/asn.c /^CYASSL_LOCAL int GetSet(const byte* input, word32* inOutIdx, int* len,$/;" f -GetShortInt ctaocrypt/src/asn.c /^static int GetShortInt(const byte* input, word32* inOutIdx, int* number)$/;" f file: -GetSignature ctaocrypt/src/asn.c /^static int GetSignature(DecodedCert* cert)$/;" f file: -GetSignerMemory src/ssl.c /^static INLINE int GetSignerMemory(Signer* signer)$/;" f file: -GetSnifferServer src/sniffer.c /^static SnifferServer* GetSnifferServer(IpInfo* ipInfo, TcpInfo* tcpInfo)$/;" f file: -GetSnifferSession src/sniffer.c /^static SnifferSession* GetSnifferSession(IpInfo* ipInfo, TcpInfo* tcpInfo)$/;" f file: -GetTime IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)$/;" f file: -GetTime IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)$/;" f file: -GetTime ctaocrypt/src/asn.c /^static INLINE void GetTime(int* value, const byte* date, int* idx)$/;" f file: -GetValidity ctaocrypt/src/asn.c /^static int GetValidity(DecodedCert* cert, int verify)$/;" f file: -Gmac cyassl/ctaocrypt/aes.h /^typedef struct Gmac {$/;" s -Gmac cyassl/ctaocrypt/aes.h /^} Gmac;$/;" t typeref:struct:Gmac -GmacSetKey ctaocrypt/src/aes.c /^CYASSL_API void GmacSetKey(Gmac* gmac, const byte* key, word32 len)$/;" f -GmacUpdate ctaocrypt/src/aes.c /^CYASSL_API void GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,$/;" f -GrowInputBuffer src/internal.c /^int GrowInputBuffer(CYASSL* ssl, int size, int usedLength)$/;" f -GrowOutputBuffer src/internal.c /^static INLINE int GrowOutputBuffer(CYASSL* ssl, int size)$/;" f file: -Gx cyassl/ctaocrypt/ecc.h /^ const char* Gx; \/* x coordinate of the base point on curve (hex) *\/$/;" m struct:__anon72 -Gy cyassl/ctaocrypt/ecc.h /^ const char* Gy; \/* y coordinate of the base point on curve (hex) *\/$/;" m struct:__anon72 -H ctaocrypt/src/md4.c 65;" d file: -H ctaocrypt/src/ripemd.c 66;" d file: -H cyassl/ctaocrypt/aes.h /^ ALIGN16 byte H[AES_BLOCK_SIZE];$/;" m struct:Aes -HANDSHAKE_DONE cyassl/internal.h /^ HANDSHAKE_DONE$/;" e enum:states -HANDSHAKE_HEADER_SZ cyassl/internal.h /^ HANDSHAKE_HEADER_SZ = 4, \/* type + length(3) *\/$/;" e enum:Misc -HANDSHAKE_INPUT_STR cyassl/sniffer_error.h 44;" d -HASH_RNG_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_RNG_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^HASH_RNG_IRQHandler $/;" l -HASH_SIG_SIZE cyassl/internal.h /^ HASH_SIG_SIZE = 2, \/* default SHA1 RSA *\/$/;" e enum:Misc -HASH_SIZE src/sniffer.c /^ HASH_SIZE = 499, \/* Session Hash Table Rows *\/$/;" e enum:__anon96 file: -HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 155;" d -HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 193;" d -HAVE_AEAD IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 215;" d -HAVE_AEAD cyassl/internal.h 430;" d -HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 206;" d -HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 244;" d -HAVE_AESCCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 266;" d -HAVE_AESCCM cyassl/ctaocrypt/settings.h 597;" d -HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 212;" d -HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 250;" d -HAVE_AESGCM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 272;" d -HAVE_AESGCM cyassl/ctaocrypt/settings.h 157;" d -HAVE_AES_ENGINE ctaocrypt/src/aes.c 236;" d file: -HAVE_AES_ENGINE cyassl/ctaocrypt/settings.h 153;" d -HAVE_ARPA_INET_H config.h 11;" d -HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 167;" d -HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 205;" d -HAVE_CAMELLIA IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 227;" d -HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 263;" d -HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 301;" d -HAVE_CAVIUM IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 323;" d -HAVE_CONFIG_H swig/cyassl_adds.c 29;" d file: -HAVE_DLFCN_H config.h 14;" d -HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 194;" d -HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 232;" d -HAVE_ECC IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 254;" d -HAVE_ECC cyassl/ctaocrypt/settings.h 118;" d -HAVE_ECC cyassl/ctaocrypt/settings.h 188;" d -HAVE_ECC cyassl/ctaocrypt/settings.h 609;" d -HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 251;" d -HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 289;" d -HAVE_ERRNO IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 311;" d -HAVE_ERRNO_H config.h 17;" d -HAVE_FCNTL_H config.h 20;" d -HAVE_GETADDRINFO config.h 23;" d -HAVE_GETHOSTBYNAME config.h 26;" d -HAVE_GETTIMEOFDAY config.h 29;" d -HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 142;" d -HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 180;" d -HAVE_HC128 IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 202;" d -HAVE_INET_NTOA config.h 32;" d -HAVE_INTTYPES_H config.h 35;" d -HAVE_KEIL_RTX IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 35;" d -HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 257;" d -HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 295;" d -HAVE_LIBZ IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 317;" d -HAVE_LIMITS_H config.h 44;" d -HAVE_MEMORY_H config.h 47;" d -HAVE_MEMSET config.h 50;" d -HAVE_NETDB_H config.h 53;" d -HAVE_NETINET_IN_H config.h 56;" d -HAVE_NETX cyassl/ctaocrypt/settings.h 107;" d -HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 219;" d -HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 257;" d -HAVE_NTRU IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 279;" d -HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-BARE-METAL.h 32;" d -HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h 33;" d -HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h 33;" d -HAVE_NULL_CIPHER IDE/MDK-ARM/MDK-ARM/CyaSSL/config.h 35;" d -HAVE_NULL_CIPHER cyassl/ctaocrypt/settings.h 200;" d -HAVE_OPENSSL_CMD Makefile /^HAVE_OPENSSL_CMD = $/;" m -HAVE_OPENSSL_ENGINE_H cyassl/openssl/engine.h 3;" d -HAVE_PTHREAD config.h 62;" d -HAVE_PTHREAD_PRIO_INHERIT config.h 65;" d -HAVE_SOCKET config.h 68;" d -HAVE_STDDEF_H config.h 71;" d -HAVE_STDINT_H config.h 74;" d -HAVE_STDLIB_H config.h 77;" d -HAVE_STRINGS_H config.h 80;" d -HAVE_STRING_H config.h 83;" d -HAVE_SYS_IOCTL_H config.h 86;" d -HAVE_SYS_SOCKET_H config.h 89;" d -HAVE_SYS_STAT_H config.h 92;" d -HAVE_SYS_TIME_H config.h 95;" d -HAVE_SYS_TYPES_H config.h 98;" d -HAVE_THREAD_LS cyassl/options.h 19;" d -HAVE_THREAD_LS cyassl/options.h 20;" d -HAVE_UNISTD_H config.h 101;" d -HAVE_VALGRIND Makefile /^HAVE_VALGRIND = $/;" m -HAVE_VISIBILITY Makefile /^HAVE_VISIBILITY = 1$/;" m -HAVE_VISIBILITY config.h 105;" d -HAVE_WEBSERVER cyassl/ctaocrypt/settings.h 311;" d -HAVE_WEBSERVER cyassl/options.h 34;" d -HAVE_WEBSERVER cyassl/options.h 35;" d -HC128 cyassl/ctaocrypt/hc128.h /^typedef struct HC128 {$/;" s -HC128 cyassl/ctaocrypt/hc128.h /^} HC128;$/;" t typeref:struct:HC128 -HC128_ENC_TYPE cyassl/ctaocrypt/hc128.h /^ HC128_ENC_TYPE = 6 \/* cipher unique type *\/$/;" e enum:__anon44 -HC_128_IV_SIZE cyassl/internal.h /^ HC_128_IV_SIZE = 16, \/* also 128 bits *\/$/;" e enum:Misc -HC_128_KEY_SIZE cyassl/internal.h /^ HC_128_KEY_SIZE = 16, \/* 128 bits *\/$/;" e enum:Misc -HEADERS Makefile /^HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \\$/;" m -HELLO_AGAIN cyassl/internal.h /^ HELLO_AGAIN, \/* HELLO_AGAIN s for DTLS case *\/$/;" e enum:ConnectState -HELLO_AGAIN_REPLY cyassl/internal.h /^ HELLO_AGAIN_REPLY,$/;" e enum:ConnectState -HELLO_EXT_LEN cyassl/internal.h /^ HELLO_EXT_LEN = 6, \/* length of the lazy hello extensions *\/$/;" e enum:Misc -HELLO_EXT_SIGALGO_MAX cyassl/internal.h /^ HELLO_EXT_SIGALGO_MAX = 32, \/* number of items in the signature algo list *\/$/;" e enum:Misc -HELLO_EXT_SIGALGO_SZ cyassl/internal.h /^ HELLO_EXT_SIGALGO_SZ = 2, \/* length of signature algo extension *\/$/;" e enum:Misc -HELLO_EXT_SIG_ALGO cyassl/internal.h /^ HELLO_EXT_SIG_ALGO = 13, \/* ID for the sig_algo hello extension *\/$/;" e enum:Misc -HELLO_EXT_SZ cyassl/internal.h /^ HELLO_EXT_SZ = 8, \/* total length of the lazy hello extensions *\/$/;" e enum:Misc -HELLO_EXT_TYPE_SZ cyassl/internal.h /^ HELLO_EXT_TYPE_SZ = 2, \/* length of a hello extension type *\/$/;" e enum:Misc -HELLO_VERIFY_SENT cyassl/internal.h /^ HELLO_VERIFY_SENT,$/;" e enum:AcceptState -HEX_VERSION Makefile /^HEX_VERSION = 0x03000000$/;" m -HINT_LEN_SZ cyassl/internal.h /^ HINT_LEN_SZ = 2, \/* length of hint size field *\/$/;" e enum:Misc -HKDF ctaocrypt/src/hmac.c /^int HKDF(int type, const byte* inKey, word32 inKeySz,$/;" f -HMAC cyassl/openssl/hmac.h 68;" d -HMAC_BLOCK_SIZE cyassl/ctaocrypt/hmac.h /^ HMAC_BLOCK_SIZE = SHA512_BLOCK_SIZE$/;" e enum:__anon66 -HMAC_CTX cyassl/openssl/hmac.h /^typedef struct CYASSL_HMAC_CTX HMAC_CTX;$/;" t typeref:struct:CYASSL_HMAC_CTX -HMAC_Final cyassl/openssl/hmac.h 72;" d -HMAC_Init cyassl/openssl/hmac.h 70;" d -HMAC_Update cyassl/openssl/hmac.h 71;" d -HMAC_cleanup cyassl/openssl/hmac.h 73;" d -HSHASH_SZ src/tls.c 248;" d file: -HSHASH_SZ src/tls.c 250;" d file: -HTTP_AUTHPASSW IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 578;" d file: -HTTP_AUTHREALM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 570;" d file: -HTTP_AUTHUSER IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 574;" d file: -HTTP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 544;" d file: -HTTP_ENAUTH IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 566;" d file: -HTTP_NUMSESS IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 549;" d file: -HTTP_PORTNUM IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 554;" d file: -HTTP_SRVID IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 560;" d file: -HW_NAME_OID cyassl/ctaocrypt/asn.h /^ HW_NAME_OID = 79 \/* 1.3.6.1.5.5.7.8.4 from RFC 4108*\/$/;" e enum:SepHardwareName_Sum -HandShakeCallBack cyassl/ssl.h /^typedef int (*HandShakeCallBack)(HandShakeInfo*);$/;" t -HandShakeHeader cyassl/internal.h /^typedef struct HandShakeHeader {$/;" s -HandShakeHeader cyassl/internal.h /^} HandShakeHeader;$/;" t typeref:struct:HandShakeHeader -HandShakeInfo cyassl/callbacks.h /^} HandShakeInfo;$/;" t typeref:struct:handShakeInfo_st -HandShakeType cyassl/internal.h /^enum HandShakeType {$/;" g -Hash cyassl/ctaocrypt/hmac.h /^} Hash;$/;" t typeref:union:__anon67 -HashInput src/internal.c /^static int HashInput(CYASSL* ssl, const byte* input, int sz)$/;" f file: -HashOutput src/internal.c /^static int HashOutput(CYASSL* ssl, const byte* output, int sz, int ivSz)$/;" f file: -HashSession src/ssl.c /^static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error)$/;" f file: -HashSigner src/ssl.c /^static INLINE word32 HashSigner(const byte* hash)$/;" f file: -HashTest tests/hash.c /^int HashTest(void)$/;" f -Hash_DBRG_Generate ctaocrypt/src/random.c /^static int Hash_DBRG_Generate(RNG* rng, byte* out, word32 outSz)$/;" f file: -Hash_DBRG_Instantiate ctaocrypt/src/random.c /^static int Hash_DBRG_Instantiate(RNG* rng, byte* seed, word32 seedSz)$/;" f file: -Hash_DBRG_Reseed ctaocrypt/src/random.c /^static int Hash_DBRG_Reseed(RNG* rng, byte* entropy, word32 entropySz)$/;" f file: -Hash_DBRG_Uninstantiate ctaocrypt/src/random.c /^static int Hash_DBRG_Uninstantiate(RNG* rng)$/;" f file: -Hash_Sum cyassl/ctaocrypt/asn.h /^enum Hash_Sum {$/;" g -Hash_df ctaocrypt/src/random.c /^static int Hash_df(RNG* rng, byte* out, word32 outSz, byte type, byte* inA, word32 inASz,$/;" f file: -Hash_gen ctaocrypt/src/random.c /^static int Hash_gen(RNG* rng, byte* out, word32 outSz, byte* V)$/;" f file: -Hashes cyassl/internal.h /^typedef struct Hashes {$/;" s -Hashes cyassl/internal.h /^} Hashes;$/;" t typeref:struct:Hashes -HaveMoreInput src/sniffer.c /^static int HaveMoreInput(SnifferSession* session, const byte** sslFrame,$/;" f file: -Hc128_Process ctaocrypt/src/hc128.c /^int Hc128_Process(HC128* ctx, byte* output, const byte* input, word32 msglen)$/;" f -Hc128_SetIV ctaocrypt/src/hc128.c /^static void Hc128_SetIV(HC128* ctx, const byte* inIv)$/;" f file: -Hc128_SetKey ctaocrypt/src/hc128.c /^int Hc128_SetKey(HC128* ctx, const byte* key, const byte* iv)$/;" f -Heap_Mem IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Mem IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Mem SPACE Heap_Size$/;" l -Heap_Size IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^Heap_Size EQU 0x0000a000$/;" d -Heap_Size IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00009000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x0000F000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x00007000$/;" d -Heap_Size IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^Heap_Size EQU 0x0000A000$/;" d -Hmac cyassl/ctaocrypt/hmac.h /^typedef struct Hmac {$/;" s -Hmac cyassl/ctaocrypt/hmac.h /^} Hmac;$/;" t typeref:struct:Hmac -HmacCaviumFinal ctaocrypt/src/hmac.c /^static void HmacCaviumFinal(Hmac* hmac, byte* hash)$/;" f file: -HmacCaviumSetKey ctaocrypt/src/hmac.c /^static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key,$/;" f file: -HmacCaviumUpdate ctaocrypt/src/hmac.c /^static void HmacCaviumUpdate(Hmac* hmac, const byte* msg, word32 length)$/;" f file: -HmacFinal ctaocrypt/src/hmac.c /^int HmacFinal(Hmac* hmac, byte* hash)$/;" f -HmacFinal cyassl/ctaocrypt/hmac.h 186;" d -HmacFreeCavium ctaocrypt/src/hmac.c /^void HmacFreeCavium(Hmac* hmac)$/;" f -HmacInitCavium ctaocrypt/src/hmac.c /^int HmacInitCavium(Hmac* hmac, int devId)$/;" f -HmacKeyInnerHash ctaocrypt/src/hmac.c /^static int HmacKeyInnerHash(Hmac* hmac)$/;" f file: -HmacSetKey ctaocrypt/src/hmac.c /^int HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length)$/;" f -HmacSetKey cyassl/ctaocrypt/hmac.h 184;" d -HmacUpdate ctaocrypt/src/hmac.c /^int HmacUpdate(Hmac* hmac, const byte* msg, word32 length)$/;" f -HmacUpdate cyassl/ctaocrypt/hmac.h 185;" d -I ctaocrypt/src/ripemd.c 67;" d file: -I2C0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2C0_IRQHandler$/;" l -I2C1_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_ER_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C1_EV_IRQHandler $/;" l -I2C1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2C1_IRQHandler$/;" l -I2C2_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_ER_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C2_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C2_EV_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_ER_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_ER_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK-ARM/MDK-ARM/config/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CryptTest/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/CyaSSL-Full/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/EchoServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleClient/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2C3_EV_IRQHandler IDE/MDK5-ARM/Projects/SimpleServer/RTE/Device/STM32F207IG/startup_stm32f2xx.s /^I2C3_EV_IRQHandler $/;" l -I2S0_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2S0_IRQHandler$/;" l -I2S1_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^I2S1_IRQHandler$/;" l -ID_LEN cyassl/internal.h /^ ID_LEN = 32, \/* session id length *\/$/;" e enum:Misc -IF_DELIMITER IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 320;" d file: -IF_DELIMITER IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 325;" d file: -IGMP_ENABLE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 213;" d file: -IGMP_TABSIZE IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 218;" d file: -INCOMPLETE_DATA cyassl/error-ssl.h /^ INCOMPLETE_DATA = -210, \/* don't have enough data to$/;" e enum:CyaSSL_ErrorCodes -INC_AMINCLUDE Makefile /^INC_AMINCLUDE = include $(top_builddir)\/aminclude.am$/;" m -INFINITE cyassl/test.h 116;" d -INFO_LOG cyassl/ctaocrypt/logging.h /^ INFO_LOG,$/;" e enum:CYA_Log_Levels -INHIBIT_ANY_OID cyassl/ctaocrypt/asn.h /^ INHIBIT_ANY_OID = 168, \/* 2.5.29.54 *\/$/;" e enum:Extensions_Sum -INITMODE_TIMEOUT IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 49;" d file: -INITMODE_TIMEOUT IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c 49;" d file: -INLINE cyassl/ctaocrypt/types.h 112;" d -INLINE cyassl/ctaocrypt/types.h 114;" d -INLINE cyassl/ctaocrypt/types.h 116;" d -INLINE cyassl/ctaocrypt/types.h 118;" d -INLINE cyassl/ctaocrypt/types.h 120;" d -INLINE cyassl/ctaocrypt/types.h 123;" d -INNERMUL ctaocrypt/src/asm.c 218;" d file: -INNERMUL ctaocrypt/src/asm.c 324;" d file: -INNERMUL ctaocrypt/src/asm.c 351;" d file: -INNERMUL ctaocrypt/src/asm.c 381;" d file: -INNERMUL ctaocrypt/src/asm.c 411;" d file: -INNERMUL ctaocrypt/src/asm.c 443;" d file: -INNERMUL ctaocrypt/src/asm.c 45;" d file: -INNERMUL ctaocrypt/src/asm.c 472;" d file: -INNERMUL ctaocrypt/src/asm.c 77;" d file: -INNERMUL8 ctaocrypt/src/asm.c 229;" d file: -INNERMUL8 ctaocrypt/src/asm.c 90;" d file: -INPUT_CASE_ERROR cyassl/error-ssl.h /^ INPUT_CASE_ERROR = -201, \/* process input state error *\/$/;" e enum:CyaSSL_ErrorCodes -INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m -INSTALL_DATA Makefile /^INSTALL_DATA = ${INSTALL} -m 644$/;" m -INSTALL_HEADER Makefile /^INSTALL_HEADER = $(INSTALL_DATA)$/;" m -INSTALL_PROGRAM Makefile /^INSTALL_PROGRAM = ${INSTALL}$/;" m -INSTALL_SCRIPT Makefile /^INSTALL_SCRIPT = ${INSTALL}$/;" m -INSTALL_STRIP_PROGRAM Makefile /^INSTALL_STRIP_PROGRAM = $(install_sh) -c -s$/;" m -INTEL_INTRINSICS cyassl/ctaocrypt/types.h 130;" d -INVALID_BYTE cyassl/internal.h /^ INVALID_BYTE = 0xff, \/* Used to initialize cipher specs values *\/$/;" e enum:Misc -IOCB_CookieCtx cyassl/internal.h /^ void* IOCB_CookieCtx; \/* gen cookie ctx *\/$/;" m struct:CYASSL -IOCB_ReadCtx cyassl/internal.h /^ void* IOCB_ReadCtx;$/;" m struct:CYASSL -IOCB_WriteCtx cyassl/internal.h /^ void* IOCB_WriteCtx;$/;" m struct:CYASSL -IOerrors cyassl/ssl.h /^enum IOerrors {$/;" g -IPAD cyassl/ctaocrypt/hmac.h /^ IPAD = 0x36,$/;" e enum:__anon66 -IPERM ctaocrypt/src/des3.c /^static INLINE void IPERM(word32* left, word32* right)$/;" f file: -IPV4 src/sniffer.c /^ IPV4 = 4, \/* IP version 4 *\/$/;" e enum:__anon96 file: -IP_CHECK_STR cyassl/sniffer_error.h 31;" d -IP_HDR_SZ src/sniffer.c /^ IP_HDR_SZ = 20, \/* IP header legnth, min *\/$/;" e enum:__anon96 file: -IP_HL src/sniffer.c 558;" d file: -IP_SIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 363;" d file: -IP_SIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 370;" d file: -IP_V src/sniffer.c 559;" d file: -ISSUER cyassl/ctaocrypt/asn.h /^ ISSUER = 0,$/;" e enum:__anon60 -ISSUER_E cyassl/ctaocrypt/error-crypt.h /^ ISSUER_E = -137, \/* setting issuer name error *\/$/;" e enum:__anon61 -IS_OFF src/tls.c 1824;" d file: -IS_OFF src/tls.c 578;" d file: -IV_SIZE_64 cyassl/ctaocrypt/ecc.h /^ IV_SIZE_64 = 8,$/;" e enum:__anon75 -IV_SZ cyassl/internal.h /^ IV_SZ = 32, \/* max iv sz *\/$/;" e enum:__anon15 -IncrementAesCounter ctaocrypt/src/aes.c /^static INLINE void IncrementAesCounter(byte* inOutCtr)$/;" f file: -IncrementGcmCounter ctaocrypt/src/aes.c /^static INLINE void IncrementGcmCounter(byte* inOutCtr)$/;" f file: -InitBlake2b ctaocrypt/src/blake2b.c /^int InitBlake2b(Blake2b* b2b, word32 digestSz)$/;" f -InitCRL src/crl.c /^int InitCRL(CYASSL_CRL* crl, CYASSL_CERT_MANAGER* cm)$/;" f -InitCRL_Entry src/crl.c /^static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl)$/;" f file: -InitCaviumRsaKey ctaocrypt/src/rsa.c /^static int InitCaviumRsaKey(RsaKey* key, void* heap)$/;" f file: -InitCert ctaocrypt/src/asn.c /^void InitCert(Cert* cert)$/;" f -InitCipherSpecs src/internal.c /^void InitCipherSpecs(CipherSpecs* cs)$/;" f -InitCiphers src/internal.c /^void InitCiphers(CYASSL* ssl)$/;" f -InitCyaSSL_BigNum src/ssl.c /^ static void InitCyaSSL_BigNum(CYASSL_BIGNUM* bn)$/;" f file: -InitCyaSSL_DH src/ssl.c /^ static void InitCyaSSL_DH(CYASSL_DH* dh)$/;" f file: -InitCyaSSL_DSA src/ssl.c /^ static void InitCyaSSL_DSA(CYASSL_DSA* dsa)$/;" f file: -InitCyaSSL_Rsa src/ssl.c /^ static void InitCyaSSL_Rsa(CYASSL_RSA* rsa)$/;" f file: -InitDecodedCRL ctaocrypt/src/asn.c /^void InitDecodedCRL(DecodedCRL* dcrl)$/;" f -InitDecodedCert ctaocrypt/src/asn.c /^void InitDecodedCert(DecodedCert* cert, byte* source, word32 inSz, void* heap)$/;" f -InitDhKey ctaocrypt/src/dh.c /^void InitDhKey(DhKey* key)$/;" f -InitDsaKey ctaocrypt/src/dsa.c /^void InitDsaKey(DsaKey* key)$/;" f -InitFinCapture src/sniffer.c /^static void InitFinCapture(FinCaputre* cap)$/;" f file: -InitFlags src/sniffer.c /^static void InitFlags(Flags* flags)$/;" f file: -InitGcmCounter ctaocrypt/src/aes.c /^static INLINE void InitGcmCounter(byte* inOutCtr)$/;" f file: -InitHandShakeInfo src/internal.c /^ void InitHandShakeInfo(HandShakeInfo* info)$/;" f -InitHmac ctaocrypt/src/hmac.c /^static int InitHmac(Hmac* hmac, int type)$/;" f file: -InitMd2 ctaocrypt/src/md2.c /^void InitMd2(Md2* md2)$/;" f -InitMd4 ctaocrypt/src/md4.c /^void InitMd4(Md4* md4)$/;" f -InitMd5 ctaocrypt/src/hmac.c 32;" d file: -InitMd5 ctaocrypt/src/md5.c /^ void InitMd5(Md5* md5)$/;" f -InitMd5 ctaocrypt/src/md5.c /^void InitMd5(Md5* md5)$/;" f -InitMd5 ctaocrypt/src/md5.c 32;" d file: -InitMd5 ctaocrypt/src/pwdbased.c 32;" d file: -InitMemoryTracker cyassl/test.h /^ static INLINE void InitMemoryTracker(void) $/;" f -InitMutex ctaocrypt/src/port.c /^ int InitMutex(CyaSSL_Mutex* m)$/;" f -InitMutex ctaocrypt/src/port.c /^ int InitMutex(CyaSSL_Mutex* m)$/;" f -InitMutex ctaocrypt/src/port.c /^int InitMutex(CyaSSL_Mutex* m)$/;" f -InitOCSP src/ocsp.c /^int InitOCSP(CYASSL_OCSP* ocsp, CYASSL_CERT_MANAGER* cm)$/;" f -InitOCSP_Entry src/ocsp.c /^static int InitOCSP_Entry(OCSP_Entry* ocspe, DecodedCert* cert)$/;" f file: -InitOcspRequest ctaocrypt/src/asn.c /^void InitOcspRequest(OcspRequest* req, DecodedCert* cert, byte useNonce,$/;" f -InitOcspResponse ctaocrypt/src/asn.c /^void InitOcspResponse(OcspResponse* resp, CertStatus* status,$/;" f -InitRipeMd ctaocrypt/src/ripemd.c /^void InitRipeMd(RipeMd* ripemd)$/;" f -InitRng ctaocrypt/src/random.c /^int InitRng(RNG* rng)$/;" f -InitRngCavium ctaocrypt/src/random.c /^int InitRngCavium(RNG* rng, int devId)$/;" f -InitRsaKey ctaocrypt/src/rsa.c /^int InitRsaKey(RsaKey* key, void* heap)$/;" f -InitRsaKey cyassl/ctaocrypt/rsa.h 121;" d -InitSSL src/internal.c /^int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx)$/;" f -InitSSL_Ctx src/internal.c /^int InitSSL_Ctx(CYASSL_CTX* ctx, CYASSL_METHOD* method)$/;" f -InitSSL_Method src/internal.c /^void InitSSL_Method(CYASSL_METHOD* method, ProtocolVersion pv)$/;" f -InitSession src/sniffer.c /^static void InitSession(SnifferSession* session)$/;" f file: -InitSha ctaocrypt/src/hmac.c 36;" d file: -InitSha ctaocrypt/src/pwdbased.c 36;" d file: -InitSha ctaocrypt/src/sha.c /^ int InitSha(Sha* sha)$/;" f -InitSha ctaocrypt/src/sha.c /^int InitSha(Sha* sha)$/;" f -InitSha ctaocrypt/src/sha.c 32;" d file: -InitSha cyassl/ctaocrypt/sha.h 77;" d -InitSha256 ctaocrypt/src/hmac.c 40;" d file: -InitSha256 ctaocrypt/src/pwdbased.c 40;" d file: -InitSha256 ctaocrypt/src/sha256.c /^int InitSha256(Sha256* sha256)$/;" f -InitSha256 ctaocrypt/src/sha256.c 34;" d file: -InitSha256 cyassl/ctaocrypt/sha256.h 76;" d -InitSha384 ctaocrypt/src/sha512.c /^int InitSha384(Sha384* sha384)$/;" f -InitSha384 cyassl/ctaocrypt/sha512.h 103;" d -InitSha512 ctaocrypt/src/sha512.c /^int InitSha512(Sha512* sha512)$/;" f -InitSha512 cyassl/ctaocrypt/sha512.h 92;" d -InitSnifferServer src/sniffer.c /^static void InitSnifferServer(SnifferServer* sniffer)$/;" f file: -InitStreams src/internal.c /^ static int InitStreams(CYASSL* ssl)$/;" f file: -InitSuites src/internal.c /^void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK,$/;" f -InitTcpReady tests/unit.c /^void InitTcpReady(tcp_ready* ready)$/;" f -InitTcpReady testsuite/testsuite.c /^void InitTcpReady(tcp_ready* ready)$/;" f -InitTimeoutInfo src/internal.c /^ void InitTimeoutInfo(TimeoutInfo* info)$/;" f -InitX509 src/internal.c /^void InitX509(CYASSL_X509* x509, int dynamicFlag)$/;" f -InitX509Name src/internal.c /^void InitX509Name(CYASSL_X509_NAME* name, int dynamicFlag)$/;" f -IpHdr src/sniffer.c /^typedef struct IpHdr {$/;" s file: -IpHdr src/sniffer.c /^} IpHdr;$/;" t typeref:struct:IpHdr file: -IpInfo src/sniffer.c /^typedef struct IpInfo {$/;" s file: -IpInfo src/sniffer.c /^} IpInfo;$/;" t typeref:struct:IpInfo file: -IpToS src/sniffer.c /^static char* IpToS(word32 addr, char* str)$/;" f file: -IsAtLeastTLSv1_2 src/internal.c /^int IsAtLeastTLSv1_2(const CYASSL* ssl)$/;" f -IsOldTlsVersion tests/suites.c /^static int IsOldTlsVersion(const char* line)$/;" f file: -IsPortRegistered src/sniffer.c /^static int IsPortRegistered(word32 port)$/;" f file: -IsServerRegistered src/sniffer.c /^static int IsServerRegistered(word32 addr)$/;" f file: -IsTLS src/internal.c /^int IsTLS(const CYASSL* ssl)$/;" f -IsValidCipherSuite tests/suites.c /^static int IsValidCipherSuite(const char* line, char* suite)$/;" f file: -Itimerval src/ssl.c /^ typedef struct itimerval Itimerval;$/;" t typeref:struct:itimerval file: -J ctaocrypt/src/ripemd.c 68;" d file: -JOINT_LEN cyassl/ctaocrypt/asn.h /^ JOINT_LEN = 2,$/;" e enum:cert_enums -K ctaocrypt/src/sha256.c /^static const word32 K[64] = {$/;" v file: -K512 ctaocrypt/src/sha512.c /^static const word64 K512[80] = {$/;" v file: -KB_SIZE ctaocrypt/src/ecc.c 2969;" d file: -KB_SIZE ctaocrypt/src/ecc.c 3110;" d file: -KB_SIZE ctaocrypt/src/ecc.c 3121;" d file: -KB_SIZE ctaocrypt/src/ecc.c 3350;" d file: -KDF_Sum cyassl/ctaocrypt/asn.h /^enum KDF_Sum {$/;" g -KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 606;" d -KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 624;" d -KEEP_PEER_CERT cyassl/ctaocrypt/settings.h 625;" d -KEIL_FS_open IDE/MDK-ARM/MDK-ARM/CyaSSL/Retarget.c /^static int KEIL_FS_open(const char *name, int openmode) $/;" f file: -KEIL_INTRINSICS cyassl/ctaocrypt/settings.h 387;" d -KEYUSE_CONTENT_COMMIT cyassl/ctaocrypt/asn.h 256;" d -KEYUSE_CRL_SIGN cyassl/ctaocrypt/asn.h 261;" d -KEYUSE_DATA_ENCIPHER cyassl/ctaocrypt/asn.h 258;" d -KEYUSE_DECIPHER_ONLY cyassl/ctaocrypt/asn.h 263;" d -KEYUSE_DIGITAL_SIG cyassl/ctaocrypt/asn.h 255;" d -KEYUSE_ENCIPHER_E cyassl/error-ssl.h /^ KEYUSE_ENCIPHER_E = -285, \/* KeyUse keyEncipher error *\/$/;" e enum:CyaSSL_ErrorCodes -KEYUSE_ENCIPHER_ONLY cyassl/ctaocrypt/asn.h 262;" d -KEYUSE_KEY_AGREE cyassl/ctaocrypt/asn.h 259;" d -KEYUSE_KEY_CERT_SIGN cyassl/ctaocrypt/asn.h 260;" d -KEYUSE_KEY_ENCIPHER cyassl/ctaocrypt/asn.h 257;" d -KEYUSE_SIGNATURE_E cyassl/error-ssl.h /^ KEYUSE_SIGNATURE_E = -283, \/* KeyUse digSignature error *\/$/;" e enum:CyaSSL_ErrorCodes -KEY_EXCHANGE_SENT cyassl/internal.h /^ KEY_EXCHANGE_SENT,$/;" e enum:AcceptState -KEY_FILE_STR cyassl/sniffer_error.h 78;" d -KEY_LABEL_SZ cyassl/internal.h /^ KEY_LABEL_SZ = 13, \/* TLS key block expansion sz *\/$/;" e enum:Misc -KEY_PREFIX src/keys.c /^ KEY_PREFIX = 7 \/* up to 7 prefix letters for key rounds *\/$/;" e enum:KeyStuff file: -KEY_SIZE_128 cyassl/ctaocrypt/ecc.h /^ KEY_SIZE_128 = 16, $/;" e enum:__anon75 -KEY_SIZE_256 cyassl/ctaocrypt/ecc.h /^ KEY_SIZE_256 = 32, $/;" e enum:__anon75 -KEY_TABLE_TYPE cyassl/ctaocrypt/camellia.h /^typedef word32 KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN];$/;" t -KEY_USAGE_OID cyassl/ctaocrypt/asn.h /^ KEY_USAGE_OID = 129, \/* 2.5.29.15 *\/$/;" e enum:Extensions_Sum -KeyExchangeAlgorithm cyassl/internal.h /^enum KeyExchangeAlgorithm { $/;" g -KeyStuff src/keys.c /^enum KeyStuff {$/;" g file: -Key_Sum cyassl/ctaocrypt/asn.h /^enum Key_Sum {$/;" g -Keys cyassl/internal.h /^typedef struct Keys {$/;" s -Keys cyassl/internal.h /^} Keys;$/;" t typeref:struct:Keys -LARGE_STATIC_BUFFERS cyassl/ctaocrypt/settings.h 546;" d -LARGE_STATIC_BUFFERS cyassl/ctaocrypt/settings.h 549;" d -LARGE_STATIC_BUFFERS cyassl/internal.h 858;" d -LARGE_STATIC_BUFFERS cyassl/internal.h 859;" d -LAST ctaocrypt/src/aes_asm.s /^LAST:$/;" l -LCD_IRQHandler IDE/MDK-ARM/LPC43xx/startup_LPC43xx.s /^LCD_IRQHandler$/;" l -LD Makefile /^LD = \/usr\/bin\/ld$/;" m -LDFLAGS Makefile /^LDFLAGS = $/;" m -LEAPYEAR ctaocrypt/src/asn.c 203;" d file: -LEAVE_LOG cyassl/ctaocrypt/logging.h /^ LEAVE_LOG,$/;" e enum:CYA_Log_Levels -LENGTH_ERROR cyassl/error-ssl.h /^ LENGTH_ERROR = -241, \/* record layer length error *\/$/;" e enum:CyaSSL_ErrorCodes -LENGTH_SZ cyassl/internal.h /^ LENGTH_SZ = 2, \/* length field for HMAC, data only *\/$/;" e enum:Misc -LHOST_NAME IDE/MDK-ARM/MDK-ARM/config/Net_Config.c 23;" d file: -LIBCYASSL_VERSION_HEX cyassl/version.h 30;" d -LIBCYASSL_VERSION_STRING cyassl/version.h 29;" d -LIBM Makefile /^LIBM = -lm$/;" m -LIBOBJS Makefile /^LIBOBJS = $/;" m -LIBS Makefile /^LIBS = $/;" m -LIBTOOL Makefile /^LIBTOOL = $(SHELL) $(top_builddir)\/libtool$/;" m -LINESIZE IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c 536;" d file: -LINESIZE IDE/MDK5-ARM/Projects/CyaSSL-Full/shell.c 588;" d file: -LINK Makefile /^LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\$/;" m -LIPO Makefile /^LIPO = $/;" m -LITTLE32 ctaocrypt/src/hc128.c 42;" d file: -LITTLE32 ctaocrypt/src/hc128.c 44;" d file: -LITTLE32 ctaocrypt/src/rabbit.c 41;" d file: -LITTLE32 ctaocrypt/src/rabbit.c 43;" d file: -LITTLE_ENDIAN_ORDER cyassl/ctaocrypt/settings.h 518;" d -LITTLE_ENDIAN_ORDER cyassl/ctaocrypt/types.h 39;" d -LN_S Makefile /^LN_S = ln -s$/;" m -LO ctaocrypt/src/asm.c 487;" d file: -LOCAL_IF_ADDR_LEN src/sniffer.c /^ LOCAL_IF_ADDR_LEN = 4, \/* localhost interface address length, !windows *\/$/;" e enum:__anon96 file: -LOG_COMPILE Makefile /^LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)$/;" m -LOG_DRIVER Makefile /^LOG_DRIVER = $(SHELL) $(top_srcdir)\/build-aux\/test-driver$/;" m -LOOP ctaocrypt/src/aes_asm.s /^LOOP:$/;" l -LOOP_END ctaocrypt/src/asm.c 299;" d file: -LOOP_END ctaocrypt/src/asm.c 317;" d file: -LOOP_END ctaocrypt/src/asm.c 377;" d file: -LOOP_END ctaocrypt/src/asm.c 407;" d file: -LOOP_END ctaocrypt/src/asm.c 41;" d file: -LOOP_END ctaocrypt/src/asm.c 439;" d file: -LOOP_END ctaocrypt/src/asm.c 468;" d file: -LOOP_END ctaocrypt/src/asm.c 73;" d file: -LOOP_START ctaocrypt/src/asm.c 210;" d file: -LOOP_START ctaocrypt/src/asm.c 318;" d file: -LOOP_START ctaocrypt/src/asm.c 378;" d file: -LOOP_START ctaocrypt/src/asm.c 408;" d file: -LOOP_START ctaocrypt/src/asm.c 42;" d file: -LOOP_START ctaocrypt/src/asm.c 440;" d file: -LOOP_START ctaocrypt/src/asm.c 469;" d file: -LOOP_START ctaocrypt/src/asm.c 74;" d file: -LSR_FS cyassl/ctaocrypt/settings.h 323;" d -LTCCASCOMPILE Makefile /^LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \\$/;" m -LTCOMPILE Makefile /^LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\$/;" m -LTLIBOBJS Makefile /^LTLIBOBJS = $/;" m -LTLIBRARIES Makefile /^LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)$/;" m -LTM1 cyassl/ctaocrypt/mpi_class.h 30;" d -LTM2 cyassl/ctaocrypt/mpi_class.h 28;" d -LTM3 cyassl/ctaocrypt/mpi_class.h 25;" d -LTM_ALL cyassl/ctaocrypt/mpi_superclass.h 26;" d -LTM_LAST cyassl/ctaocrypt/mpi_class.h 1011;" d -LTM_LAST cyassl/ctaocrypt/mpi_class.h 1016;" d -LTM_PRIME_2MSB_ON cyassl/ctaocrypt/integer.h 147;" d -LTM_PRIME_BBS cyassl/ctaocrypt/integer.h 145;" d -LTM_PRIME_SAFE cyassl/ctaocrypt/integer.h 146;" d -LT_OBJDIR config.h 109;" d -LUT ctaocrypt/src/ecc.c /^ ecc_point* LUT[1U<$(distdir).tar.bz2$/;" m -tardir Makefile /^ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz$/;" m -tardir Makefile /^ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz$/;" m -tardir Makefile /^ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z$/;" m -tardir Makefile /^ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz$/;" m -target_alias Makefile /^target_alias = $/;" m -tcp_accept cyassl/test.h /^static INLINE void tcp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd,$/;" f -tcp_connect IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 77;" d -tcp_connect IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 77;" d -tcp_connect cyassl/test.h /^static INLINE void tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port,$/;" f -tcp_connect src/io.c /^static int tcp_connect(SOCKET_T* sockfd, const char* ip, word16 port)$/;" f file: -tcp_connect swig/cyassl_adds.c /^static int tcp_connect(SOCKET_T* sockfd, const char* ip, short port)$/;" f file: -tcp_listen IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 79;" d -tcp_listen IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 79;" d -tcp_listen cyassl/test.h /^static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr,$/;" f -tcp_poll IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c /^__task void tcp_poll (void)$/;" f -tcp_poll IDE/MDK5-ARM/Projects/CyaSSL-Full/main.c /^void tcp_poll (void const *arg)$/;" f -tcp_poll IDE/MDK5-ARM/Projects/EchoClient/main.c /^void tcp_poll (void const *arg)$/;" f -tcp_poll IDE/MDK5-ARM/Projects/EchoServer/main.c /^void tcp_poll (void const *arg)$/;" f -tcp_poll IDE/MDK5-ARM/Projects/SimpleClient/main.c /^void tcp_poll (void const *arg)$/;" f -tcp_poll IDE/MDK5-ARM/Projects/SimpleServer/main.c /^void tcp_poll (void const *arg)$/;" f -tcp_ready cyassl/test.h /^typedef struct tcp_ready {$/;" s -tcp_ready cyassl/test.h /^} tcp_ready; $/;" t typeref:struct:tcp_ready -tcp_select IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 80;" d -tcp_select IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 80;" d -tcp_select cyassl/test.h /^static INLINE int tcp_select(SOCKET_T socketfd, int to_sec)$/;" f -tcp_set_nonblocking cyassl/test.h /^static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)$/;" f -tcp_socket IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 78;" d -tcp_socket IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h 78;" d -tcp_socket cyassl/test.h /^static INLINE void tcp_socket(SOCKET_T* sockfd, int udp)$/;" f -tcp_socket swig/cyassl_adds.c /^static int tcp_socket(SOCKET_T* sockfd, SOCKADDR_IN_T* addr, const char* peer,$/;" f file: -tcp_tick IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c /^__task void tcp_tick (void) $/;" f -terma ctaocrypt/src/ecc.c /^ int ham, terma, termb;$/;" m struct:__anon3 file: -termb ctaocrypt/src/ecc.c /^ int ham, terma, termb;$/;" m struct:__anon3 file: -testVector IDE/MDK5-ARM/Projects/CryptTest/test.c /^typedef struct testVector {$/;" s file: -testVector IDE/MDK5-ARM/Projects/CryptTest/test.c /^} testVector;$/;" t typeref:struct:testVector file: -testVector IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^typedef struct testVector {$/;" s file: -testVector IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^} testVector;$/;" t typeref:struct:testVector file: -testVector ctaocrypt/test/test.c /^typedef struct testVector {$/;" s file: -testVector ctaocrypt/test/test.c /^} testVector;$/;" t typeref:struct:testVector file: -testVector tests/hash.c /^typedef struct testVector {$/;" s file: -testVector tests/hash.c /^} testVector;$/;" t typeref:struct:testVector file: -test_CyaSSL_CTX_load_verify_locations tests/api.c /^int test_CyaSSL_CTX_load_verify_locations(void)$/;" f -test_CyaSSL_CTX_new tests/api.c /^int test_CyaSSL_CTX_new(CYASSL_METHOD *method)$/;" f -test_CyaSSL_CTX_use_PrivateKey_file tests/api.c /^int test_CyaSSL_CTX_use_PrivateKey_file(void)$/;" f -test_CyaSSL_CTX_use_certificate_file tests/api.c /^int test_CyaSSL_CTX_use_certificate_file(void)$/;" f -test_CyaSSL_Cleanup tests/api.c /^static int test_CyaSSL_Cleanup(void)$/;" f file: -test_CyaSSL_Init tests/api.c /^int test_CyaSSL_Init(void)$/;" f -test_CyaSSL_Method_Allocators tests/api.c /^int test_CyaSSL_Method_Allocators(void)$/;" f -test_CyaSSL_SNI_GetFromBuffer tests/api.c /^static void test_CyaSSL_SNI_GetFromBuffer(void)$/;" f file: -test_CyaSSL_UseMaxFragment tests/api.c /^static void test_CyaSSL_UseMaxFragment(void)$/;" f file: -test_CyaSSL_UseSNI tests/api.c /^void test_CyaSSL_UseSNI(void)$/;" f -test_CyaSSL_UseSupportedCurve tests/api.c /^static void test_CyaSSL_UseSupportedCurve(void)$/;" f file: -test_CyaSSL_UseTruncatedHMAC tests/api.c /^static void test_CyaSSL_UseTruncatedHMAC(void)$/;" f file: -test_CyaSSL_client_server tests/api.c /^void test_CyaSSL_client_server(callback_functions* client_callbacks,$/;" f -test_CyaSSL_read_write tests/api.c /^static int test_CyaSSL_read_write(void)$/;" f file: -test_client_CyaSSL_new tests/api.c /^int test_client_CyaSSL_new(void)$/;" f -test_client_nofail tests/api.c /^void test_client_nofail(void* args)$/;" f -test_harness tests/suites.c /^static void test_harness(void* vargs)$/;" f file: -test_lvl tests/api.c /^int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, int cond,$/;" f -test_method tests/api.c /^int test_method(CYASSL_METHOD *method, const char *name)$/;" f -test_method2 tests/api.c /^int test_method2(CYASSL_METHOD *method, const char *name)$/;" f -test_server_CyaSSL_new tests/api.c /^int test_server_CyaSSL_new(void)$/;" f -test_server_nofail tests/api.c /^THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args)$/;" f -test_ucf tests/api.c /^int test_ucf(CYASSL_CTX *ctx, const char* file, int type, int cond,$/;" f -test_upkf tests/api.c /^int test_upkf(CYASSL_CTX *ctx, const char* file, int type, int cond,$/;" f -test_vector_t IDE/MDK5-ARM/Projects/CryptTest/test.c /^} test_vector_t;$/;" t typeref:struct:__anon78 file: -test_vector_t IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^} test_vector_t;$/;" t typeref:struct:__anon81 file: -test_vector_t ctaocrypt/test/test.c /^} test_vector_t;$/;" t typeref:struct:__anon9 file: -testingFmt tests/api.c 90;" d file: -tests_unit_test_CFLAGS Makefile /^tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)$/;" m -tests_unit_test_DEPENDENCIES Makefile /^tests_unit_test_DEPENDENCIES = src\/libcyassl.la$/;" m -tests_unit_test_LDADD Makefile /^tests_unit_test_LDADD = src\/libcyassl.la$/;" m -tests_unit_test_LINK Makefile /^tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \\$/;" m -tests_unit_test_OBJECTS Makefile /^tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS)$/;" m -tests_unit_test_SOURCES Makefile /^tests_unit_test_SOURCES = \\$/;" m -testsuite_testsuite_test_CFLAGS Makefile /^testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)$/;" m -testsuite_testsuite_test_DEPENDENCIES Makefile /^testsuite_testsuite_test_DEPENDENCIES = src\/libcyassl.la$/;" m -testsuite_testsuite_test_LDADD Makefile /^testsuite_testsuite_test_LDADD = src\/libcyassl.la$/;" m -testsuite_testsuite_test_LINK Makefile /^testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \\$/;" m -testsuite_testsuite_test_OBJECTS Makefile /^testsuite_testsuite_test_OBJECTS = \\$/;" m -testsuite_testsuite_test_SOURCES Makefile /^testsuite_testsuite_test_SOURCES = \\$/;" m -thisDate cyassl/ctaocrypt/asn.h /^ byte thisDate[MAX_DATE_SIZE];$/;" m struct:CertStatus -thisDateFormat cyassl/ctaocrypt/asn.h /^ byte thisDateFormat;$/;" m struct:CertStatus -thisMemory cyassl/test.h /^ void* thisMemory; \/* actual memory for user *\/$/;" m struct:memHint -thisSize cyassl/test.h /^ size_t thisSize; \/* size of this memory *\/$/;" m struct:memHint -thread_func cyassl/test.h /^typedef THREAD_RETURN CYASSL_THREAD (*thread_func)(void* args);$/;" t -ticketID src/sniffer.c /^ byte* ticketID; \/* mac ID of session ticket *\/$/;" m struct:SnifferSession file: -tid cyassl/internal.h /^ pthread_t tid; \/* monitoring thread *\/$/;" m struct:CYASSL_CRL -time IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^time_t time(time_t * t) { return 0 ; }$/;" f -time IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^time_t time(time_t * t) { return 0 ; }$/;" f -time ctaocrypt/src/asn.c /^time_t time(time_t* timer)$/;" f -time_main IDE/MDK-ARM/LPC43xx/time-LCP43xx.c /^void time_main(void *args) $/;" f -time_main IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^void time_main(void *args) $/;" f -time_main IDE/MDK5-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c /^void time_main(void *args) $/;" f -time_t ctaocrypt/src/asn.c /^ typedef long time_t;$/;" t file: -timeout IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c /^ Timeval timeout;$/;" v -timeout IDE/MDK5-ARM/Projects/SimpleClient/client.c /^ Timeval timeout;$/;" v -timeout cyassl/internal.h /^ word32 timeout; \/* session timeout *\/$/;" m struct:CYASSL -timeout cyassl/internal.h /^ word32 timeout; \/* session timeout *\/$/;" m struct:CYASSL_CTX -timeout cyassl/internal.h /^ word32 timeout; \/* timeout in seconds *\/$/;" m struct:CYASSL_SESSION -timeout examples/client/client.c /^ Timeval timeout;$/;" v -timeoutCB IDE/MDK5-ARM/Projects/CyaSSL-Full/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f -timeoutCB IDE/MDK5-ARM/Projects/SimpleClient/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f -timeoutCB examples/client/client.c /^ int timeoutCB(TimeoutInfo* info)$/;" f -timeoutInfo cyassl/internal.h /^ TimeoutInfo timeoutInfo; \/* info saved during handshake *\/$/;" m struct:CYASSL -timeoutInfo_st cyassl/callbacks.h /^typedef struct timeoutInfo_st {$/;" s -timeoutName cyassl/callbacks.h /^ char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; \/* timeout Name *\/$/;" m struct:timeoutInfo_st -timeoutValue cyassl/callbacks.h /^ Timeval timeoutValue; \/* timer that caused it *\/$/;" m struct:timeoutInfo_st -times IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c /^const int times = 100;$/;" v -times IDE/MDK5-ARM/Projects/CryptBenchmark/benchmark.c /^const int times = 1; \/* public key iterations *\/$/;" v -times IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c /^const int times = 100;$/;" v -times IDE/MDK5-ARM/Projects/CyaSSL-Full/benchmark.c /^const int times = 1; \/* public key iterations *\/$/;" v -timestamp cyassl/callbacks.h /^ Timeval timestamp; \/* when it occured *\/$/;" m struct:packetInfo_st -timeval IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^struct timeval {$/;" s -timeval IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^struct timeval {$/;" s -tls cyassl/internal.h /^ byte tls; \/* using TLS ? *\/$/;" m struct:Options -tls1_1 cyassl/internal.h /^ byte tls1_1; \/* using TLSv1.1+ ? *\/$/;" m struct:Options -tls_client cyassl/internal.h /^static const byte tls_client[FINISHED_LABEL_SZ + 1] = "client finished";$/;" v -tls_server cyassl/internal.h /^static const byte tls_server[FINISHED_LABEL_SZ + 1] = "server finished";$/;" v -tm ctaocrypt/src/asn.c /^ struct tm {$/;" s file: -tm_gmtoff ctaocrypt/src/asn.c /^ long tm_gmtoff; \/* offset from CUT in seconds *\/$/;" m struct:tm file: -tm_hour ctaocrypt/src/asn.c /^ int tm_hour; \/* hours since midnight [0-23] *\/$/;" m struct:tm file: -tm_isdst ctaocrypt/src/asn.c /^ int tm_isdst; \/* Daylight Savings Time flag *\/$/;" m struct:tm file: -tm_mday ctaocrypt/src/asn.c /^ int tm_mday; \/* day of the month [1-31] *\/$/;" m struct:tm file: -tm_min ctaocrypt/src/asn.c /^ int tm_min; \/* minutes after the hour [0-59] *\/$/;" m struct:tm file: -tm_mon ctaocrypt/src/asn.c /^ int tm_mon; \/* months since January [0-11] *\/$/;" m struct:tm file: -tm_sec ctaocrypt/src/asn.c /^ int tm_sec; \/* seconds after the minute [0-60] *\/$/;" m struct:tm file: -tm_wday ctaocrypt/src/asn.c /^ int tm_wday; \/* days since Sunday [0-6] *\/$/;" m struct:tm file: -tm_yday ctaocrypt/src/asn.c /^ int tm_yday; \/* days since January 1 [0-365] *\/$/;" m struct:tm file: -tm_year ctaocrypt/src/asn.c /^ int tm_year; \/* years since 1900 *\/$/;" m struct:tm file: -tm_zone ctaocrypt/src/asn.c /^ char *tm_zone; \/* timezone abbreviation *\/$/;" m struct:tm file: -tmp cyassl/ctaocrypt/aes.h /^ ALIGN16 word32 tmp[AES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Aes -tmp cyassl/ctaocrypt/camellia.h /^ word32 tmp[CAMELLIA_BLOCK_SIZE \/ sizeof(word32)]; \/* for CBC mode *\/$/;" m struct:Camellia -tmp cyassl/ctaocrypt/des3.h /^ word32 tmp[DES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Des -tmp cyassl/ctaocrypt/des3.h /^ word32 tmp[DES_BLOCK_SIZE \/ sizeof(word32)]; \/* same *\/$/;" m struct:Des3 -toInfoOn cyassl/internal.h /^ byte toInfoOn; \/* track timeout info *\/$/;" m struct:CYASSL -tolower cyassl/ctaocrypt/types.h 223;" d -top_build_prefix Makefile /^top_build_prefix = $/;" m -top_builddir Makefile /^top_builddir = .$/;" m -top_distdir Makefile /^top_distdir = $(distdir)$/;" m -top_srcdir Makefile /^top_srcdir = .$/;" m -tos src/sniffer.c /^ byte tos; \/* type of service *\/$/;" m struct:IpHdr file: -total ctaocrypt/src/asn.c /^ int total; \/* total encoded lengths *\/$/;" m struct:DerCert file: -total src/sniffer.c /^ int total; \/* total length of fragment *\/$/;" m struct:IpInfo file: -totalAllocs cyassl/test.h /^ size_t totalAllocs; \/* number of allocations *\/$/;" m struct:memoryStats -totalBytes cyassl/test.h /^ size_t totalBytes; \/* total number of bytes allocated *\/$/;" m struct:memoryStats -totalCerts cyassl/ctaocrypt/asn.h /^ int totalCerts; \/* number on list *\/$/;" m struct:DecodedCRL -totalCerts cyassl/internal.h /^ int totalCerts; \/* number on list *\/$/;" m struct:CRL_Entry -totalCount src/ssl.c /^ int totalCount; \/* sessions ever on this row *\/$/;" m struct:ClientRow file: -totalCount src/ssl.c /^ int totalCount; \/* sessions ever on this row *\/$/;" m struct:SessionRow file: -totalLen ctaocrypt/src/asn.c /^ int totalLen; \/* total encoded length *\/$/;" m struct:EncodedName file: -totalStatus cyassl/internal.h /^ int totalStatus; \/* number on list *\/$/;" m struct:OCSP_Entry -totalSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: -totrot ctaocrypt/src/des3.c /^static const byte totrot[] = {$/;" v file: -transform Makefile /^transform = $(program_transform_name)$/;" m -truncated_hmac cyassl/internal.h /^ byte truncated_hmac;$/;" m struct:CYASSL -ttl src/sniffer.c /^ byte ttl; \/* time to live *\/$/;" m struct:IpHdr file: -tv_sec IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_sec; \/* seconds *\/$/;" m struct:timeval -tv_sec IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_sec; \/* seconds *\/$/;" m struct:timeval -tv_usec IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_usec; \/* microseconds *\/$/;" m struct:timeval -tv_usec IDE/MDK5-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h /^ long tv_usec; \/* microseconds *\/$/;" m struct:timeval -type IDE/MDK5-ARM/Projects/CryptTest/test.c /^ int type;$/;" m struct:__anon78 file: -type IDE/MDK5-ARM/Projects/CyaSSL-Full/test.c /^ int type;$/;" m struct:__anon81 file: -type ctaocrypt/src/asn.c /^ int type; \/* type of name *\/$/;" m struct:EncodedName file: -type ctaocrypt/test/test.c /^ int type;$/;" m struct:__anon9 file: -type cyassl/ctaocrypt/aes.h /^ AesType type; \/* aes key type *\/$/;" m struct:Aes -type cyassl/ctaocrypt/asn.h /^ byte type; \/* Name base type (DNS or RFC822) *\/$/;" m struct:Base_entry -type cyassl/ctaocrypt/dsa.h /^ int type; \/* public or private *\/$/;" m struct:DsaKey -type cyassl/ctaocrypt/ecc.h /^ int type; \/* Public or Private *\/$/;" m struct:__anon74 -type cyassl/ctaocrypt/hmac.h /^ HashType type; \/* hmac key type *\/$/;" m struct:Hmac -type cyassl/ctaocrypt/rsa.h /^ int type; \/* public or private *\/$/;" m struct:RsaKey -type cyassl/internal.h /^ TLSX_Type type; \/* Extension Type *\/$/;" m struct:TLSX -type cyassl/internal.h /^ byte type; \/* SNI Type *\/$/;" m struct:SNI -type cyassl/internal.h /^ byte type;$/;" m struct:DtlsHandShakeHeader -type cyassl/internal.h /^ byte type;$/;" m struct:DtlsMsg -type cyassl/internal.h /^ byte type;$/;" m struct:DtlsRecordLayerHeader -type cyassl/internal.h /^ byte type;$/;" m struct:HandShakeHeader -type cyassl/internal.h /^ byte type;$/;" m struct:RecordLayerHeader -type cyassl/internal.h /^ byte type; \/* method type *\/$/;" m struct:CYASSL_BIO -type cyassl/internal.h /^ byte type; \/* method type *\/$/;" m struct:CYASSL_BIO_METHOD -type cyassl/internal.h /^ int type; \/* PEM or ASN1 type *\/$/;" m struct:CRL_Monitor -type cyassl/openssl/hmac.h /^ int type;$/;" m struct:CYASSL_HMAC_CTX -type cyassl/ssl.h /^ int type; \/* stunnel dereference *\/$/;" m struct:CYASSL_COMP_METHOD -type cyassl/ssl.h /^ int type; \/* openssh dereference *\/$/;" m struct:CYASSL_EVP_PKEY -type src/sniffer.c /^ word16 type; \/* IP, ARP, etc *\/ $/;" m struct:EthernetHdr file: -u cyassl/ctaocrypt/rsa.h /^ mp_int n, e, d, p, q, dP, dQ, u;$/;" m struct:RsaKey -u cyassl/test.h /^ } u;$/;" m struct:memoryTrack typeref:union:memoryTrack::__anon33 -u32 ctaocrypt/src/camellia.c /^typedef unsigned int u32;$/;" t file: -u8 ctaocrypt/src/camellia.c /^typedef unsigned char u8;$/;" t file: -udp_accept cyassl/test.h /^static INLINE void udp_accept(SOCKET_T* sockfd, SOCKET_T* clientfd,$/;" f -udp_connect cyassl/test.h /^static INLINE void udp_connect(SOCKET_T* sockfd, void* addr, int addrSz)$/;" f -udp_read_connect cyassl/test.h /^static INLINE int udp_read_connect(SOCKET_T sockfd)$/;" f -uidIdx cyassl/ctaocrypt/asn.h /^ int uidIdx;$/;" m struct:DecodedName -uidLen cyassl/ctaocrypt/asn.h /^ int uidLen;$/;" m struct:DecodedName -ulong64 cyassl/ctaocrypt/integer.h /^ typedef unsigned __int64 ulong64;$/;" t -ulong64 cyassl/ctaocrypt/integer.h /^ typedef unsigned long long ulong64;$/;" t -ulong64 cyassl/ctaocrypt/tfm.h /^ typedef unsigned __int64 ulong64;$/;" t -ulong64 cyassl/ctaocrypt/tfm.h /^ typedef unsigned long long ulong64;$/;" t -unexpected_message cyassl/ssl.h /^ unexpected_message = 10,$/;" e enum:AlertDescription -unit cyassl/ctaocrypt/asn_public.h /^ char unit[CTC_NAME_SIZE];$/;" m struct:CertName -unrecognized_name cyassl/ssl.h /^ unrecognized_name = 112$/;" e enum:AlertDescription -unsupported_certificate cyassl/ssl.h /^ unsupported_certificate = 43,$/;" e enum:AlertDescription -update_P ctaocrypt/src/hc128.c 143;" d file: -update_Q ctaocrypt/src/hc128.c 154;" d file: -urgent src/sniffer.c /^ word16 urgent; \/* urgent pointer *\/$/;" m struct:TcpHdr file: -usage_error build-aux/test-driver /^usage_error ()$/;" f -useNonce cyassl/ctaocrypt/asn.h /^ byte useNonce;$/;" m struct:OcspRequest -use_SNI_WITH_CONTINUE_at_ssl tests/api.c /^static void use_SNI_WITH_CONTINUE_at_ssl(CYASSL* ssl)$/;" f file: -use_SNI_WITH_FAKE_ANSWER_at_ssl tests/api.c /^static void use_SNI_WITH_FAKE_ANSWER_at_ssl(CYASSL* ssl)$/;" f file: -use_SNI_at_ctx tests/api.c /^static void use_SNI_at_ctx(CYASSL_CTX* ctx)$/;" f file: -use_SNI_at_ssl tests/api.c /^static void use_SNI_at_ssl(CYASSL* ssl)$/;" f file: -use_aesni cyassl/ctaocrypt/aes.h /^ byte use_aesni;$/;" m struct:Aes -used ctaocrypt/src/asn.c /^ int used; \/* are we actually using this one *\/$/;" m struct:EncodedName file: -used cyassl/ctaocrypt/integer.h /^ int used, alloc, sign;$/;" m struct:__anon53 -used cyassl/ctaocrypt/tfm.h /^ int used, $/;" m struct:__anon70 -used cyassl/internal.h /^ int used;$/;" m struct:DtlsPool -userCtx cyassl/ssl.h /^ void* userCtx; \/* user ctx *\/$/;" m struct:CYASSL_X509_STORE_CTX -userdata cyassl/internal.h /^ void* userdata;$/;" m struct:CYASSL_CTX -usingCompression cyassl/internal.h /^ byte usingCompression; \/* are we using compression *\/$/;" m struct:Options -usingNonblock cyassl/internal.h /^ byte usingNonblock; \/* set when using nonblocking socket *\/$/;" m struct:Options -usingPSK_cipher cyassl/internal.h /^ byte usingPSK_cipher; \/* whether we're using psk as cipher *\/$/;" m struct:Options -validity ctaocrypt/src/asn.c /^ byte validity[MAX_DATE_SIZE*2 + MAX_SEQ_SZ*2]; \/* before and after dates *\/$/;" m struct:DerCert file: -validitySz ctaocrypt/src/asn.c /^ int validitySz; \/* encoded validity length *\/$/;" m struct:DerCert file: -value ctaocrypt/src/pkcs7.c /^ const byte* value;$/;" m struct:EncodedAttrib file: -value cyassl/callbacks.h /^ unsigned char value[MAX_VALUE_SZ]; \/* if fits, it's here *\/ $/;" m struct:packetInfo_st -value cyassl/ctaocrypt/pkcs7.h /^ byte* value;$/;" m struct:PKCS7Attrib -valueSeq ctaocrypt/src/pkcs7.c /^ byte valueSeq[MAX_SEQ_SZ];$/;" m struct:EncodedAttrib file: -valueSeqSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: -valueSet ctaocrypt/src/pkcs7.c /^ byte valueSet[MAX_SET_SZ];$/;" m struct:EncodedAttrib file: -valueSetSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: -valueSz ctaocrypt/src/pkcs7.c /^ word32 valueSeqSz, oidSz, idSz, valueSetSz, valueSz, totalSz;$/;" m struct:EncodedAttrib file: -valueSz cyassl/callbacks.h /^ int valueSz; \/* sz of value or buffer *\/$/;" m struct:packetInfo_st -valueSz cyassl/ctaocrypt/pkcs7.h /^ word32 valueSz;$/;" m struct:PKCS7Attrib -ver_hl src/sniffer.c /^ byte ver_hl; \/* version\/header length *\/$/;" m struct:IpHdr file: -verify cyassl/ctaocrypt/asn.h /^ int verify; \/* Default to yes, but could be off *\/$/;" m struct:DecodedCert -verifyCallback cyassl/internal.h /^ VerifyCallback verifyCallback; \/* cert verification callback *\/$/;" m struct:CYASSL -verifyCallback cyassl/internal.h /^ VerifyCallback verifyCallback; \/* cert verification callback *\/$/;" m struct:CYASSL_CTX -verifyCbCtx cyassl/internal.h /^ void* verifyCbCtx; \/* cert verify callback user ctx*\/$/;" m struct:CYASSL -verifyHashes cyassl/internal.h /^ Hashes verifyHashes;$/;" m struct:CYASSL -verifyNone cyassl/internal.h /^ byte verifyNone;$/;" m struct:Options -verifyNone cyassl/internal.h /^ byte verifyNone;$/;" m struct:CYASSL_CTX -verifyPeer cyassl/internal.h /^ byte verifyPeer;$/;" m struct:Options -verifyPeer cyassl/internal.h /^ byte verifyPeer;$/;" m struct:CYASSL_CTX -verifySize swig/rsasign.py /^verifySize = cyassl.RsaSSL_Verify(signOutput, signedSize, signVerify, signedSize, key)$/;" v -verify_SNI_abort_on_client tests/api.c /^static void verify_SNI_abort_on_client(CYASSL* ssl)$/;" f file: -verify_SNI_abort_on_server tests/api.c /^static void verify_SNI_abort_on_server(CYASSL* ssl)$/;" f file: -verify_SNI_fake_matching tests/api.c /^static void verify_SNI_fake_matching(CYASSL* ssl)$/;" f file: -verify_SNI_no_matching tests/api.c /^static void verify_SNI_no_matching(CYASSL* ssl)$/;" f file: -verify_SNI_real_matching tests/api.c /^static void verify_SNI_real_matching(CYASSL* ssl)$/;" f file: -version ctaocrypt/src/asn.c /^ byte version[MAX_VERSION_SZ]; \/* version encoded *\/$/;" m struct:DerCert file: -version ctaocrypt/src/pkcs7.c /^ byte version[MAX_VERSION_SZ];$/;" m struct:ESD file: -version cyassl/ctaocrypt/asn.h /^ int version; \/* cert version, 1 or 3 *\/$/;" m struct:DecodedCert -version cyassl/ctaocrypt/asn_public.h /^ int version; \/* x509 version *\/$/;" m struct:Cert -version cyassl/internal.h /^ ProtocolVersion version; \/* which version was used *\/$/;" m struct:CYASSL_SESSION -version cyassl/internal.h /^ ProtocolVersion version; \/* negotiated version *\/$/;" m struct:CYASSL -version cyassl/internal.h /^ ProtocolVersion version;$/;" m struct:CYASSL_METHOD -version cyassl/internal.h /^ int version;$/;" m struct:CYASSL_X509 -version src/ssl.c /^ int version; \/* cache cert layout version id *\/$/;" m struct:__anon93 file: -version src/ssl.c /^ int version; \/* cache layout version id *\/$/;" m struct:__anon92 file: -versionSz ctaocrypt/src/asn.c /^ int versionSz; \/* encoded version length *\/$/;" m struct:DerCert file: -versionSz ctaocrypt/src/pkcs7.c /^ word32 outerSeqSz, outerContentSz, innerSeqSz, versionSz, digAlgoIdSetSz,$/;" m struct:ESD file: -wait_tcp_ready tests/unit.c /^void wait_tcp_ready(func_args* args)$/;" f -wait_tcp_ready testsuite/testsuite.c /^void wait_tcp_ready(func_args* args)$/;" f -weOwnCert cyassl/internal.h /^ byte weOwnCert; \/* SSL own cert flag *\/$/;" m struct:Buffers -weOwnDH cyassl/internal.h /^ byte weOwnDH; \/* SSL own dh (p,g) flag *\/$/;" m struct:Buffers -weOwnKey cyassl/internal.h /^ byte weOwnKey; \/* SSL own key flag *\/$/;" m struct:Buffers -wfd cyassl/internal.h /^ int wfd; \/* write file descriptor *\/$/;" m struct:CYASSL -wflags cyassl/internal.h /^ int wflags; \/* user write flags *\/$/;" m struct:CYASSL -window cyassl/internal.h /^ DtlsSeq window; \/* Sliding window for current epoch *\/$/;" m struct:DtlsState -window src/sniffer.c /^ word16 window; \/* window *\/$/;" m struct:TcpHdr file: -word cyassl/ctaocrypt/types.h /^ typedef word32 word;$/;" t -word cyassl/ctaocrypt/types.h /^ typedef word64 word;$/;" t -word16 cyassl/ctaocrypt/settings.h /^ typedef CPU_INT16U word16;$/;" t -word16 cyassl/ctaocrypt/types.h /^ typedef unsigned short word16;$/;" t -word24 cyassl/internal.h /^typedef byte word24[3];$/;" t -word32 cyassl/ctaocrypt/settings.h /^ typedef CPU_INT32U word32;$/;" t -word32 cyassl/ctaocrypt/types.h /^ typedef unsigned int word32;$/;" t -word64 cyassl/ctaocrypt/types.h /^ typedef unsigned __int64 word64;$/;" t -word64 cyassl/ctaocrypt/types.h /^ typedef unsigned long long word64;$/;" t -word64 cyassl/ctaocrypt/types.h /^ typedef unsigned long word64;$/;" t -workCtx cyassl/ctaocrypt/rabbit.h /^ RabbitCtx workCtx;$/;" m struct:Rabbit -written swig/runme.py /^written = cyassl.CyaSSL_write(ssl, "hello from python\\r\\n", 19)$/;" v -x cyassl/ctaocrypt/arc4.h /^ byte x;$/;" m struct:Arc4 -x cyassl/ctaocrypt/dsa.h /^ mp_int p, q, g, y, x;$/;" m struct:DsaKey -x cyassl/ctaocrypt/ecc.h /^ mp_int x; \/* The x coordinate *\/$/;" m struct:__anon73 -x cyassl/ctaocrypt/rabbit.h /^ word32 x[8];$/;" m struct:RabbitCtx -x509_buffer cyassl/internal.h /^typedef struct x509_buffer {$/;" s -x509_buffer cyassl/internal.h /^} x509_buffer;$/;" t typeref:struct:x509_buffer -xorbuf ctaocrypt/src/misc.c /^STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count)$/;" f -xstat2err src/ocsp.c /^static int xstat2err(int stat)$/;" f file: -y cyassl/ctaocrypt/arc4.h /^ byte y;$/;" m struct:Arc4 -y cyassl/ctaocrypt/dsa.h /^ mp_int p, q, g, y, x;$/;" m struct:DsaKey -y cyassl/ctaocrypt/ecc.h /^ mp_int y; \/* The y coordinate *\/$/;" m struct:__anon73 -yasslIP cyassl/test.h /^ static const char* const yasslIP = "127.0.0.1";$/;" v -yasslIP cyassl/test.h /^ static const char* const yasslIP = "::1";$/;" v -yasslPort cyassl/test.h /^static const word16 yasslPort = 11111;$/;" v -z cyassl/ctaocrypt/ecc.h /^ mp_int z; \/* The z coordinate *\/$/;" m struct:__anon73 diff --git a/project1/cyassl-3.0.0/tests/.deps/.dirstamp b/project1/cyassl-3.0.0/tests/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po deleted file mode 100644 index 2dbf4339..00000000 --- a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-api.Po +++ /dev/null @@ -1,270 +0,0 @@ -tests/tests_unit_test-api.o: tests/api.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/stdlib.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h cyassl/ssl.h \ - cyassl/version.h /usr/include/stdio.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/test.h \ - /usr/include/assert.h /usr/include/ctype.h /usr/include/xlocale.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h tests/unit.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/stdlib.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/test.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -tests/unit.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po deleted file mode 100644 index 63bf199a..00000000 --- a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-hash.Po +++ /dev/null @@ -1,285 +0,0 @@ -tests/tests_unit_test-hash.o: tests/hash.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/ctaocrypt/md4.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/sha256.h \ - cyassl/ctaocrypt/sha512.h cyassl/ctaocrypt/ripemd.h \ - cyassl/ctaocrypt/hmac.h tests/unit.h cyassl/test.h \ - /usr/include/assert.h cyassl/ssl.h cyassl/version.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -cyassl/ctaocrypt/md4.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ctaocrypt/sha512.h: - -cyassl/ctaocrypt/ripemd.h: - -cyassl/ctaocrypt/hmac.h: - -tests/unit.h: - -cyassl/test.h: - -/usr/include/assert.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po deleted file mode 100644 index 7c82770b..00000000 --- a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-suites.Po +++ /dev/null @@ -1,273 +0,0 @@ -tests/tests_unit_test-suites.o: tests/suites.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/stdlib.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/stdio.h \ - /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h /usr/include/string.h \ - /usr/include/xlocale.h cyassl/ssl.h cyassl/version.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h tests/unit.h cyassl/test.h \ - /usr/include/assert.h /usr/include/ctype.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/unistd.h /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h examples/client/client.h \ - examples/server/server.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/stdlib.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/string.h: - -/usr/include/xlocale.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -tests/unit.h: - -cyassl/test.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -examples/client/client.h: - -examples/server/server.h: diff --git a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po b/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po deleted file mode 100644 index 755c1cad..00000000 --- a/project1/cyassl-3.0.0/tests/.deps/tests_unit_test-unit.Po +++ /dev/null @@ -1,269 +0,0 @@ -tests/tests_unit_test-unit.o: tests/unit.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h tests/unit.h \ - cyassl/test.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ssl.h \ - cyassl/version.h /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -tests/unit.h: - -cyassl/test.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: diff --git a/project1/cyassl-3.0.0/tests/.dirstamp b/project1/cyassl-3.0.0/tests/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/tests/.libs/unit.test b/project1/cyassl-3.0.0/tests/.libs/unit.test deleted file mode 100755 index d5134b39914e249ccc21163796a5375febe6a695..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52399 zcmeFadwf*I`9FRF3$7U1D4?jQi!K^8gai-)5fca@Xn>RiL`9b+*^o$XO?H9UsKHH; zby=mAdTG_7wN@)u{74nWYLJ_FrCunl7pO(MF;Kw^#vA#*-_Ok1J$ne+e!hSFe!ti2 zcVIH-J@d>n&pgjFb7tn8v**Uih50EdDTaCUFnSt9S-){OMBgDH zAfq>um^Z2!Gze}KVCaQ32SQJT65x`h4ktrDU zqpKt&a(n;{RF!OScAC{WgX52_#3%gNwD z9)p?x6XXLPagaZ%H)bN=DqjZbVqkf;Z+KPZ{NYt)!>TH4f=eQP5`7S# z&C2yb{0m$8fozyQm|uL1i424ITQ*Q1#K+spQ#a<}#>pTX{YV?X1D5h9fWC)~zR4!f z*)}}XM!&_@z6}=sl=mxJe#EA)uWkBz(N_LG8-1}&p65}Ad9c2dZ2S(}=-;&Qd&ew{ znC1UqtN#?6{_<_O&PKoAR{w*x{7Y>4Z8qFtldr{AzTT$)Z*24_Hhte`EB}!#{}x;Q z#Wp;`roU8M`=w)Q9a4Yq+Uo0PqyMRm|9l(&LR-m> zc1CW5NjCa`On9 zUmw}-!1{B&D;e`BLxW8?oPoBb+n z@=Ukkh^_pUw)&>p_@&u!Z=3%eVX2Sy z!R0@G5RbRD-)F0TsZGCswbfT^lYd5>yXsHdEtvH^VXJSk4PR-~-&eN$^K9~D+vqph z=v!>B=6D-WYLUObvb@olR(3&tWsR@O%&zzQr1m@|SF%)7Ybpc96}}M{j5f(j zYinx!r2!L?c~z~iOmoM1sV`7jThm}Aur&&TG=RjUD6jX&BCh(P(`s?C^lcp9GOr9y$tMOIG+gn=UFJ0&@tF87`)_5%$i$>Z+ z)b2r1f(?FeQGMkinENt+qqn>gKB==Id2W@Mptjz$z@iaH;l)-P+Q24*NmYJdO|Z^{ zbT;_2)mo+mrT+RrWqBp6?e~^eP<*Q(%2jIr*tZOwdWd?6Xc zo$&}arJPgzff@6!Mc*l|yiP1;I%6_5s!OU1u8>T?-mZEuNUdF&mQE&xQz!8f|AW7( zCRxjxR`J&R;a}p>O1y4WK6&O$H8f!qtcMmjd{%Sh9L=-3Km`XC;w(c0FUE~BjHsZm zZA>JB4n4-Cxwf{lCJw5D0sj&&tQ3eR36I4-ONt^2)`$g6HbT}=xqyRQQkpQU_m?gz zudl5(%1dhk2?E6_iH}M$W#$z^HPJhD2HIT)mlstv!214x;a>u|%4_TVH3k}4Us_Rb zln4A(RYWzVb!c=j&;a$|dIAc66$eq@{M!0}QSGlLb-jOaWlb5$s}v8M8S|M`-r)By zG)gPVD(i)~y3VMqfd~4^%2WclmzP%6Hu%9fKzV90@>Kgc6p$Y}DXvH_FfhRJs_osbLI#5*G%f$yKJj%-3l60=1RGk8P`i;REF)V1>e< zp~~;CBSC|TN+GBhg7BJ^TIU7XiR^`5PcwHOw0ry9l>#+b5=XY4{-8AIqi#@IY5V2nv^A!BUR6*0zUR0-n&hB1fnNth2Z zKG`tlF~+7<8RJv1&&K#vObHpEW*Bvh2N_0y@#%)Kgz*`M(Zu*n!)Rvg#(ov!!Pv)Q ze3oIXV0^Y=tYqvlj8%+>7{*!+4nSd4{ou@%h-xVvGgx zI>y5cV?EVt#;c6cM|LpA2It$1FEETlkr5@ zpYbHvpK%`S&v-KI&p03UXFLV=XIudLGoA|jGrkn|XM7p#&$tlwXFLt|XFMJDXN-kS z4&x%&pYcy%f5tOmf5yeIKjRYEpE0&7=P;fP`!l{A_Gdf?_Gf$r?9cd0*q`xLus`Fu zus`FgVSmQg!2XQAus`E@us>rT?9X^U?9aFq_GerM`!g-cF2jg~zU%7hYHbVjifu)& z4sCW`waMtZzyYu58sfxXc!tq6Bo$|9q+zu00eRPuG-Bqp?-1Od7`@kMZxcL_cp&jw z!Gnn1#H$6niPMQ!3ic4g`;GQy!Rf?fi0cGr5a$rj6P!g{KwKnv6fwNVXwMNmhIkHf zmf-Qk^N8JobBNiX_B6qH#IS#ndiFXKIMVv<5CipI5 zZojv$6?_k|n|QV0)x_zF_^mlN+0{5J7Q;x@s% zi0>j^EBHO))x@g>?;(Dec%|UI#A}J01;>cj6W0meN8Cm{Pw)Zamxzl5e?h#1I7e_N z@h;*l!QT<@A$AKkFd9_Eh|>f+hz}4Of}O;j#0S1*`%{TImucT4IE~mzyhCt*;xytm z!2^j060a3Jh}ccMTCkfqop_~S4{;W8v*2{%F~oI(Gl+AD=LyatE+8%vJc_u8I7jdp z;yJ`wg2xljBX$eUA+8`!6P!m}M{Ec#AYMXz;2Y`x#LdKe1Q!u6C*C2rgm@)!o8URb zcM-1@JePPi@oK^Ih#w|iDY%SyEpfBp3gY#|b%Lvi+lc20t|NYlxJYn-cn5Kg;3dSn zh_eJY5$_>(3vMQk5vK`mAwEEC2wqOyNqpdI>Hox-S)%=dR}wpkcL-iZ%jbYM&LN&Bcr9@OagpG4#6`q8g4Ywz zA1e={79Qo<28j$3 zPDM9I4Ou#EILgJgKvS)4(VP@l-qvWOfTasP4sy8YE9L}ecJz&g-q2hZgR7O}SHR#n z*2=LViQ{w&$M!=)eM&U+G*a6+6-cliWMh4gVx1)Hz$DhQEUa%8*2%)Y46n8dd#U1B zVHI|(sKjjkRThrpm9PcT&=X9B4pljM$RYM`C2j0uQBvbs;ef{x4Q(JLR5uT0t!iWc zjNJwkgtxXH3ZyFHQV@3xh%JG4Nb(sfxk>XF1Rmi7OE=TR*Lbhm6#Ee%o|C*~dVfH-GpMvnw+wWB=Pcx;Ab>9AzO8FgAJ`|caRLbp4Nt2YAN?FR3KSG%3?L8^! z##k*=s?g5p?PsWztC@11a2~5tE@R3Pp(#-*W0|rDCW+o&qf*Xg%3k5TT%`5)D;b_@0Oq7(DheVhlECkqh~@DikoO(NLV+U08b zBP0!v_r!k63eX@|%NnFaLv?Qg=Xso_*P&4^^wR9@*>A=k97u`>j-)_0HDKGnpyx zZX(i^6+5w+7TpjdMN^WUh2l+Ea3?6b$%}57kA`J$hwavpN9a_orf5h^pBSpddMkyd z*rH0^c-A8nHLM5ry&8=Y`|8FYPfYu2{5=hbRt`CU#y5Wo01d4NP))uY{GuW8EA~dY z=sQ_g%mbR%Hdo6nLLp|cQTzg`M868ehHADxvW0E~mC;be4xFnF9Qt(U~AbNs#G}Nr+LN2cG3Y0V8bzivkdq|SE2Mx-o4~lEzn$x2$c={X zvvIwXWgyI%R<23X1U1)clWS6)mopbq-ALaApT&qHRO4YXgxH5jz_E03G(^u5RV(YE z=|(IcrhskgVz21}TUbEbroYWL?fVn9p**68Id(m40u}YJ0kU*Vr%|J!oLxwRICrAD z_RmqVN;Z(((MO%PX%hxW!air$;6m_?hBCBF$Q8THVr|gC`_uq^g?35O;7Bdc`ILut zNz&i|;d-f!Yu7$-gFbIQD%bZ(fmXf)agXHs0&^kNzv!pnvztCuG zi*?Wh8%YikUWTh=w=Lbw`3+`}S8r0&ofQuF6_PmJxitid*LhYWX{|5?Lcza0dqsJ_*#(suRS{E+{6}4<6ducEf2~^BmQNNe~T9e-&jRLVqYWs&yZ) zM(Mv1+6Z-?9IWY>plTPR#YS+5z-%g7=sDe7%-yQeoDt5lz$O}+p!u(BS2Es13ds5( zyCW3!Dr9DND1mrdUE6ZRqVy>`QQW6O`{ssshTkxqYV1-`fhUc|yu8gdG|!V0yO?Z@ zLpi06Kz=kdjJ}S>ZG(b%aoRy8VzB~|^CCs5k({)Mfu)60bd`!e2_eg&)|?&&qlt#m z;URr;T7vH-RD7N%kCuQGw1`72mMC2IA zGzV(rloN?*)G=bYxUwKuDX};HCGA)~P;na{FFC%Ol9YfYNfi5~F8MJ4>Z#IVcq;O!QF=AiqoM!>Ra16;K$6zoR1ewR6W~b&AtA$Z<8F6Iq?>M$R zQstRgzHtkEp)OLF8ofdMx=B>rJH;pu*Yr?JtXKg%HGIN=kf0tEF~HbE#)#7q%ewLx zC>iSP;*v0&5*QQOJXbs;8VbY89huS4Rg5vQyO!}8(a>XzF)Y5u7*l}v8Dk3YYsAVq zFXb8h<78B7l!hJJtiFy6fa6TzrKxe#`49NUL<$ZN@+xb`dwa&Bkrca=6A>9cS57 z5|;6Sa#A zkQ?%+L$-^M75pjcSR!@Ec&&!um2e6S!Lu*~FQE`Z0DpwtI>sn3LZjeCe}yN6H^T7; z#YM&FlueOPr>+}=Ym^p;S6$8x0aQPOsv%*4BgS(#`a0YsWzck&c57 zA{_@E$~qH_rL<-ZK19dSL?E)_K!QsQ4!r~?;04-)8Qp* z)pA&@EZiOhAvBv2$#Gx^I~K!CdN|e7wIedw+D)=z@1n?&-NcVnUSZy4b%mZ$-F1@_ zAQd}BR-&7XP~F6ulISM?pf&S6qbM!i0&&vS#m9W3|PxeLnH-Gry$ z_k-P}`X8#BoXvJXRGQ4%O`@oi-Q+l>t#o={C7eFdRelBvrAKTtM*<#CpcjnWwSyMk z4ep$v%!Coxb;J{N*Xaj&$8L4CzQYc>&Vv~vFV%X!qxw$~90dKRaBGW$*^;ljPnL2h zv=9z;7ky-FTzqthLrj4h$uTh}aYGy>YO08uZV}bN5-6EL|3z0?hq}>~=-=_KbPs^; zN*|l<9onM$B#p+AA+});Cvup(ZeXby zNu_cHwV@Q79u4(TXHY;2&tSPTg<`fwCjepS2Blx6m@XCjYB#3d^I>LvvHg$6j2BVJ zyr}N{5UjTyMf9Ij^i`lvsA-v?{;!*&r>QfG=w(7-iar~NqAUAq@nbnijXerO9ywfn zhsQl4&#B>R3Wuw7HC(+$Mq72ip)=uh73AY#S){D-T#rQEF=UZ4iUr{(bJ%T7c&L44odXnCBS=Gs#8! zZ%je8lprxU^kgO4LqvNRBTV_hcrQ%_Ev6zy`#fQ&Y9&O5-C2z+h*9AW4G(S9_C4=e z{r*-#Q{e4K9UeBZRC!XVIf5cAb+qAOD@$c1l{!n%`|&<@TY=0 zg`C(Vy3^rkM8-5s*`pB|2~)-Y+fjXZTkLTVCOY~3f_|uz-zXHO06ztSjclF#Dx}7? z!h~{@WhG5a17O!-U;`Y##q%IgWQAunBFw19uyf*$We$zk!Cn%;OfKLV1&`p45cgox zlqY<-9Jw%SDXDPv;w1r8a?Se|`!O)P+#qOTKDg~gymT`qfYoIeB(yKpx?;T<&z?o9 za7T+w;C#`L-049Tcl;eJpj(b#tm-Lf9+%nQw7H&Y!+g>c#GuUkKU}`Z-5)6}H-1oh z4oZhMr;4v}sIyg@cGPOmv{m~locYJAYyaC1R(C(1wClc=Yf;eJ$^*bZUfp$;>f{by z_;u65qfr&s?-oT)12MKac|SUqE8cT-wG9@=y!FWY+_=rnZD5o2yLB9YMPg|9W3p1K zhJkRNIyw#Tz;KIaGYWB5mmc7t=kb^L8xXsTgO!2UnJ^+=miGaX^4>Wy1QUq~5}_c5uXE^43RL)8rIN+?(yf z_O`3#DY6QnBeVC(T1{=31i)r&%+>lb^TA{l#M$Z?&MQ%RgnJY@j)*h7!Xw)yoK|Pt z!Yz@3Em#D6h?dg_D9^KE;^!1yp=aRp#IEPt!taDShXqa#b)Fr(EE<}|Stk3m9$uEA z_Ksn=Yr)1?(rbXRqw6+;imR%J}gZtJ-C$h!N)>qs^0K$&B78MHmUd5qy&MTVin>DWrj2=ono zlO8x0PjOt>z6&x%uuTKElEp?ebT-?dHkv3A4K)NY#PY;GfL8VWeGe?)2>0jZA{E)B zb266OSF2FcY$&R!A}u80RhRUdZ-TxIDK;9DCuxOe&XF`GpE%7RoQVa+Y+MuGk^&32 zUW6w(QNP?t{sy~2I3J{!1?}&n0^HoyJ!cL3#$;J-wr@gCTsNF(N8X~d>;0{XI5#PI zpDmg4V+-X#oOhfT&xZn{q0gD0tYtTt#F};@9sc_^r0f`%T&Dk#mN|}P3Ury(+~-2a z8<=PzHM4XxyLS9)vvl7+K$vqNS`vRQ@ffvy#SP+|*DLo+Rprv0Q0CmH;<~6q-_kVGFmHizq%69Xn_vDMJJpG&2bN_HH zM-&Vme-px=Q+cXuHZir~O<=6XQT_SG`c`xRSIgTN??YR9>glH&)x`!;x4aW~=FoqK z4*#TSL^SkEWro;N@Rfq?e3_c=i{apWZPX$b-i^W?r$AuYan-r8XHfIjyiw<~DD5AgG_86M^=z8y*l;TXyi74aN)BK_$-?j2{j`DN^XLZ<@P}|G*z4N zWn8kv2k{Km{u>r#b1@~|AY(loA$AdU5$N4x>0xod5!%j8xK<%|KWu4{6)Eo`Wr`Ma z?59ot(=h;-crEG-h^n*V%Dg**E`7jRf`T@k&$N2qHk?XyFVs8>R!j$AOpsJBpUX*kh_vsFiN z@FEafMgxb$g7L-*P2M98_y|WI2qc3L>fVDg(4UM#!AzJ-Bt^yp5C$1C-ULr)i#WOB z3~3)Y=(XKiBynE8Qp@-3UlOyS4{%e8-tEJlChFB7+1yx%?slI#HX> z=!cB(fsj0+hKhCS_i)}Af2#tz2e;MahPLJC><^fIHSR^J>}H)kPiMb?Y}|(C1_i2q z0x0`X$FJ0M@IBfEfh)5c{M5p0^kPhtqM^U2GY`gW?#-s7J-l3Gq#=%mK2*6`(a=G4 z#vRcyeHG1kMbm>bZQQtvhPqh0x+hnF$H>S>emf-^I$hBeMMHDdSqbvyOi(m)6`yLA zGcOu?UY(VJM&5owTqQIuo@Nwb19!mt{tR7lQaC6wr8DA+j|Q4(8(q4c-3m9s(8=`j z?sDj!m!e4Sci}f6tT~G(|JWbE6?2^a(P=56E#HNMRfC3z`*8q3~()R8SAO*aJnw>cR)GgmQx_ zwGTN|c}l_?JNiWW^7@e)+L{*0??hEjxqPA6ui!=;B*}vQ7s>xZR3>{mPF4_GtT?A( zxK52;`V|!RbS|rev?@)BjO>p8fYt^d-;mi=3` zXCO8u)!86zAh%NqF8A1@A*bqE>Cloo%Rr;D1}U0RssoKyIb))sN_93KG&v&_O&)1p z5TAH-&taG~fC;Aznr=zEUPw*7EN zcvDx8@EfjMr*~m6bbPft+W+r;l}CA?QyJW}PBZ#J7jd1Ui#@3H zC4-yR>3G!*wN7)Qp=T70bTO?{>0(-^`;<-xnL3r{>ERXVKF%<8%1w(3ty73>#G)^W zQf73kQ&PrWQ54fnot9|5N#^s?@zzhX>9j=aR66J1g~5NIQ!3Hor&gU#!&{_QKfOxn z^awvq(kcA3Nzo(& zqnK|iujX@1f_0uk5?BVF91w6)RDq5Om5hn#$uWoSd65DKqN?&|7H}a_7mdi{30N&e zBl2(-S7H%)77vJM2`DC%SCeM;_u9hJ@U6L{`IHCD^5ou2FENryS3vYBqk3}AZ48I<6tc^z8 zs3e?{A0E+hB4&XE>4_$Xx+b`8y&BC9ZQB^?y2y3&tEnj5vY`mG(3D+WdsGS8=<&3_ zioplg7)33$zW@-=b$B3Xh)(hu8XvegccRO1-EJA;1e@DaS=>QTwIIi38imCMV>yrz;+A;c=QZS7h8R$^@^v_QT&xYqEs$paT4j zQ=@&a0(k=dssP6-qy1%oxKP6IR+C{tsMF!P=@AgLFUKAW^pq|wyb~!Qtaw`MnabhA zz%X49I(%=iKi1z(#(D_ZCBFpfntY(6pQHs+Lx+3HmfnHT>xYq)X9Ui}mJ^p!TwjF> z)EV~0Q}yy{%O-KQ)_dV>p{+eahkLnh-i4`aq~*yR_!Ny9^KF6u4~|_4zw9_Q7DDIl z=ofpHQEKc@DBsa5HXS7NH6Pf(4`cVeh$>|t^-83`t#Yt17yu!}!&f6$_IL|eYm;X@ z?+X+KxX&8fj1dg@CPKI19zKAF zcHl*F2R{%T0v;X)>`dqE=f%rI#DZzn|gWO1hSWPkpL1w<9(FR+f&s9ZR zJS&kOw#-9L0m)~s^Hj!Xt`pF)1g-*|z&T)W>)#f!6BT{%%yR5tk!26+ ztFC-w8y=Wy@%#cQ?Rd4&^OLaRkpldI8RxHgFKeO==YFn8Sp>BY`&h zJv=H>pdWHHcPSJhS`!Pki2+1_*8Pb(Oksk@K~8ezq1^67tG4K?9ck7SS_QWOJNWHA@2<|$N`sw~s}lUy%9FYR0Y1Q?@;SV#E` zg-Ij-e$ z9E_lW@RzO?97H~IrD4wbnd_QR4#q+tT=710&3Os-$C)XX#cB4U8jI7Mw?cFa1`)-8 zMdu2W^H2@afv<=ZfO#~u@1Kyw;St`B*tKXsqd~6{rEVfVJvYQfs+vx8Ue0@IUkTmRsIZxAbFG#xDtKZ zR9CEg1DcUM`eW*2#6Hkt%b950@dn%we9YT|4ifxX6L1z4ZjUVoNyiBsEgaw|*Sg!4 zY)hCp1GOs~{C=;T1;QAI9zlDV`vha)Q>at1)U%3e9#cceh2$AV0Bh;BA1l&pzz|z5 zip<M04dXOC9o!!Qcc zOCowy+@)ye$mOYoRif%SjHQ;KlgjAFLWoZTF$ykW``&=aB9E(OFhmtg*^Fe2l9tY{QG9ZLo{d1S1#Ewa6ndfo#o0vj94Xop%9mSifa^mv-ec`f zv@5$8Z6(N+XurUjtK~&4+7>O^*-A8WZGQr399$6bh@y8RqR&HpoV3vYq=ygV2m*j? z8QiQx-%n{)>|(o?^G-g!3A||;nNt))%=UjFA)23pEA>1qrFvLLI9K%EFJNho>4i@? zFsR=O7@Lo_n`2uxYzrwVF%PR4x*|#w`-HwOVsNTs7vt5Zk2(a(%DMYF&7nWB+ff-9 z|4`S5wubqGE%O?PykVue+f|%Bc%{J;Oa)~c1^IGvbM*rK`Av- z{vB$t92Dbhf`!KMb8XvXf?o)&#DU@*%M2KM2ghHICP&PVLg|VNJ8KnFt+QYbm zdc}bBTQEcsnT8#MwB%_R?-8wmWU`;7p0IDP>Ez(ehwR%+<&@9ax6hGNzQfW!O-{dn zOzjip^mSar+b@*UfATa#PQT>oU^(rNnPK}$a(V?%kCW5i@zjvhQ^@SguS9gZDs32B zvL1LV+NrP3^fA+4^wV|bn+4xLNtypfhL3{_UKA$72j%olp585||K#bda@xq#ketro z=@OjE52LYaY`EWa8QeRxLt8is?c(mjzaS9IaHAmE0)nj3(BO|$`eKn{nnG;Gg7eV~ zpQJV?QpGVZlhho|ahPy4-v*3^Uep|i2$lK9Of)19h(m(oCEa{QHX1rl%lYO1NaHov zzrtN`b4;V{g4#6NAn1Tbj|obPsdoHEP>x1F7qn8Nkf1h=f`Sfcv_Mc=yW(<%pd5`Z z0}An{<>YK0F-yrbqZoY#zH^t#>0$o`hMx@vRT}>`r*&#;?!Z*nV2dM*OS^`puw?U-!ax zU3zq#htIBI&m0dewyuPf=+UipO4@Ko?ANFW{U!tU28uq-ZutyFbrtaUEV3ZoD8lTv zXWWRwpNDsU_xYo^vy&dF@_3G2vx?kxCbrbagug=eu~n&;_(LO}))g(}{R~I>;DC5)Vau3j=vl!Y+1n3o z>=B$E`Wla|-Gvm8=w_TF&3J(&T`ehH))pQoS%HNK;&xaJLudGJhoPHdOwuwi6@_3M z*TNiMLwr1P5T7g|eLFOUw^{IT8O;+oG29v2bC~m|mOIG-CTiIpJZ|Y`nqG}Jt?aO1 zyYKfEu>!j{dLXkA*k&cQpz zX{dz1))N2GmB(2UTF2hcaiO*YEceml7O%wfsAeTCsuE99B};6TfR`J*&c#yk>`1|Z zv0u9;QZ0^X#Q{1iX0)*_;Lp+cdd84RJ^YI2I8`tB?ih>@Fa`&l6Huk)(ft3VC+32i5IX*+fD}OqjC>qia;NvM7 z{mTe${doUwlwv)3AT!F>V<#N@PQdes5ohRljE=|aI7`O`I+hO6ks7_38?H4^Yt zV1N3wZ8v977#z@A**4ioQG3*Bk;j>Z$!Txy0tbJBP3j_7^tWs#C(9XYk&IpHmC#l5 z_1vXihO_XumR)Kn__@c#SzG>uU9-vIN69g~JD+uhv(U>bqQR8#x8Wz5e#>M7o7Hn% z&&TAMme9aYU>l`pu0~=fh?!k2zX2<3RL{Xi^(vlnqk3}l1Oty=;7$tWZjh4u!Xjmf zry}B58NE&IQ}Y&ag;bt~{c2H1I4hxo(D&G{9tWd@zW3eOFZBJi8%Kn`&vmtILO*Fg z8!SUx?hAe2-*xkFvTu2O4MwGu&aOQ$MFCCO{tyVGlb>Mcy6IOq4}Cv9csz2)NbYh; zDR#BoNPZpIFS1y~-Cl`Q(5BNE?Q<2#l7ce;ETn_lCnP6~Y9FS^)#f&TN0N5X)<$>A zhwA7%?Y$ITp0MrwUMf`E;~fgjlbjC#k~ugOhaB05eu3GC!=K0QhaU9w7buIJ_Iqqb zr=e-o@-{ZbfUD)08`AT-*^r)RByUKEzr|QJUbdvishee(+MTG*a8cj69hIX^Ba~;g zK7~y>b4&U|EC{hBZNPJ6OM3brF~ALuO@Z*(l5R!`Y)L=D#MD?lq{WtW2Zl9_rY+ZT zuMgLh4`RozK?SlY{Zpi&9iwDwofkM6D&*cWn%WCAG6}tcwaXH;kIFg!3Gmw=JR9ZQ znjS`VQmrU=@uRw22Fe|aXJ3WT+_bh3J_t5a!EverY;fm-?Zv2sRMabCnM;H1Ltu*v zJ(dbdfyS&c1$_lORZ7CI(S8tCu+@KND*6)EEpMX$R|#m%Jhr+pa85R7^aYSR`Xnb+ zuE}3n_Wc4EhTm_Gu$Cv!NHo)cVK0j1JjVXv4>zqn5*?9kV0LB zSU#F3 zhA0t31jg&qaIIH#+26yIFhl@RH>-T`s7G_e5ar=mk{##-$`1873(yYa!Xx~7$0@MG z=fQru!dM2KQxRBgp|wr@#U4R7R<<|;Z0xp(Kn&Cn!yc8k1y8%Ng|LJzkZZ*L^pLW} zUxDZ+iPAjnrgV}e7wggwf)oguKEfQ|d^-GdH@-*}>%?3Us$Q zy^4bAO}2+2tW^W@L#5@BH6Hq({G^1Qt)bzcS{m+#Q1*uJLmC_Y;Dg|)21(igr~INI zPR%C9Mv!uA=x~>kdkfaeGL!~62#8|W!p72At>~4&Ajva=8PQOG&Wtc(L_@3KTV#xC zp|3RUr_N@mGJWS*xZlc(YXD?_g_c@5+k;hK7c_MY2n?me}ckX@I46`(Za&;-_1pztMz`QSr>eG zcp!PfSELqvWub3-1p9EZF>fC($WET|hlj$r#6M0cAkFVF##>f-s&}Jv?1Kq-n9I2} zs_T8K7JOxqD$hJD_}Cpyign6tvgTW}iYA05^#CEOK0xWdG_1PmL!V_Ov87P3x$ql- zg^l*YzbSIeY<0CQhA${i30t@yVRmDd?38V z)xw#mTKEM#cfC&bLe>$%%e1WlXMF<9=&&q?0= z{}zpv&3_lhSJubO^&0J^4$N<@l<$gq?t)?=K1VgR+*PY79uE zi=9lxeH&{~Nwjm!fuv|i_UcA{%Tw8_OXuk_*{iz^RMBOlXc&4*bXhS@JDQ@)?qVE> zF5@m;M^$v$Ug9z+3`3;+RLvaqmVNuX81D7f;SM>Kt-~#H`WU8j?a#_7%d|g^Q^i7l zb5-y0}J=+VZKm3}f zvU~VfoLaXU@-BobL-Wu!ntq0qF?SDh1)Z<*IO@qR;YF-JWZxwmBB|ys;W1Lu{8_`q zE@9VwENi}BpV%e*m!v0l70q43Hza+vmhK65ozM=Aek;h_GyJ6>bI6r$e`HJlq32M(3*E(MHWqT0RE-VMG@|c(QFar2c7d~S+KUi5+ zX5{(j2NxJK@yRM5zA)vht8_ElUGBq|=gQoRD+3koA!U7x3SUD-_c;xCTiD-yR%YgK z^`xrH~Zv8PfH@hO6)zv5Pb4}_tO^5sdll5()o2cK7)G1EPan!rc5{gB71>~V%zXE+Rz zS!(p@O)f4rzir14<8}M3#`My_k_`7*-8Aj240qO0 zT?Zr&R-qOH;tZyetbF-VLhC01`N2IqThV4*YhXF8>50|%^UM_0;RFTi`SCk`12hiNABHrHGYx@{kfu+cRaiLG ztx8$b;s5xMBmMU%x$)#We&99k`3at?>Z9@OHg~A*@MfW-dmF{ha3}sIIoA*L=>NV% zsc#aLkl~(RyCB$*k3RgLR%I51;}0+MFB)DG#Fr0$#9WC5WN1J#=2^ot2n>KdO0U|3)cB|MQDf5HvjQhORyi8Od zGB%B9|AKA0B|~*U{jFY=(apz3tr*t@{?M)>rM~$gULf~mjCZ+3Q{5#p1GCN#2J1Q6e-pVU;>*-E7KXOMoHuwa z-IR93Scfl%>X{urFOB(+e4&~}?eyJV_Q{~8rZ(U%mCw8K%7Rb12L9LOf24l#udXJh*-VpJH7?_aRqv+Rf2@4%`~W`D>c*@= zmG}?oE#rw<(|=ap?jcg2?lRgf|NHj+KzZH1AC~tA%G>1S&mi$9k?{3jeyH8e?+Uvc zO6x1@0+=875qD`A&PEO67qK(Z6Ur@#3Zth~mSR01-;;Ki`OAHnX1h6o#`L9+5v<`? z=eaQAw}mAMll;mCx4*hB&}hw<@BLz-r3IKDEHC%h_rZ6CePwQuuaDt|OtrP{YF|yG z+gHCJSdB?qLk1^lrCe1}Qg?l@22}NpOwco`(%NbiDU;R6RYS_IRx?6Pqtpd&>yBnv zmD|wEKh#@QTeBc(7}Mj^B>A$s{Hl~+k9^91;_E$AE$W-x?!<}`zk+5t67*2F8-q^0 z&;3J1WVk(Q?S_GY?A(AG-#AX@f{V1OG|2DMk8@Y}>TB?sboW(U&EUnu_@TS1=vA$k z<5_Z|UG3=kY9Pgjp51{8KkT-kveaFNk4C#|g4Odm*RArwY*<3d62$1n7RXhKXN7uT z{&9YK##-;M!xy^at|4oEeDT~ZpFC%BEj~zUIl7}aWx~V~tKXjn>0`C!(l>nBR_ZDK%HYhU;+Ex*9$AJZ+iOn=*%mJXaC`#ZwEf9 zT?$`WP*Hj9!m8?;+Pa_CHw1!<7B6YM&d8lODQ|NAl!B?3URF45`i!EV%q%XMHT&{8 zS6q4YLRr}(Mvl5*^o3)_8h;5qde@ta|MunYe1kH6lY8%PjCfXp=>O`>xP1Q?51jwc z?X%WQ{d?x%W1hOsc;xO0qo?#X}H*22#D^ib;-N0%v`YK#n8RO z2b}Ty;=8XoXSLypUh8|a_n7q`wViW&>V$b?e>;Bf6=hw67aZER|Ls%W?Y+^s)L-s5 z3M$^OJ{bvin^9^cds)|N1ayKR;^b>HQ0rzq@|h$OEw_4;jaGa~OZ<<}g0} zZuhkxbqs&t&A>_T9BkQr&yZg=H5w;g-7xW)H7C6G^WXmJi(Bsh*^JVI!MBXX6COEZ zbaUVQ)@kcIcKm$l?}uJ-Y-B>`# z?%g-%nX-LjCb7fo@!le`W$<9W+dVDs0{q1xgQ8k*$FCVkE-uKG>>tPOALrfPq(d`IR(G)w!s&9~_1$oype z+VW|Q=9bJ{#zxLgtPUeWqc%nDKuS&cmG+(p`fxJU21ZOl(d2Pk54MA^7n& z4DWRlKY{ppgjY0X+8&%AMCgG#X~e9@rOz`Ek44BwC`OovK$>Mb9t_%3aVKstLOQ~5 zgwY5WBmCGpjC-TiydIXyzS&@7@#4jqa*8=#wQ9vIl;r+PfcRgblD=gxp4IQxkR?@Q0n!8nd)1_iBRoA%uUB+jx2XqS5`p*eq@&=&7!GF zD!F$4wf@q8F=cXzdpI^3{Yx?{0@YRSf|8P=;n|s4$M-qDk8GmLzOlLCsOyv|wdy+Z z3fDqXa%&$GYLm1$zTeNp=uno&l-w*8`$v4&K!|G za_CSShf?==u6WpWc`to7suvDr~y z88Epd)iX@SMa!SE$}%nx>iyUV!D6X_-PT=MHh8eUVo64sCC5^hr($(er3*7aSX0Jf z1YXJeT4vWC$$fhF^cf|S$GKr-X=Lu>Ft@*|F2jv(i}?^{ zLJe4OVj`U^5SDA>8v^xWa=k3#C=w?cHa}tCiT;|>ifUgylrLVQT>~0uaC0nCHDN`D zJBj8otRW%KEU2um-tR8P>Iu6|7)Kh6VSz+`iTJH-<<3 z$+!l73ljOo(5<(yZ z{Y*9dXfISuhm|Mt^ZkpVm^uswe%vZuP+uFY!>AyusW{JJOA_>^KF!MuBpuGdo>vn1 zs8j$aH7_cQYlBs|8;q{wSIa{Z9FZ?0r?kizfLF|>BX|+`qe4|W=D8Ufk#>tt|25*5 z@S57g7P?J1-+}Nx!Y2ri;kCbY2pbSyMA(k71L2ag`3-@Z>A~_M>$SId9Iv|O8uZ66 zpC;x1)#Xz&`QKkYlP3TeLF6)(d}}ROcEk<6dVlF6*`LyvjqXNweRu6BgFEc0h5z4= zN8R*Si+`zZE1sqPV7!SR6L~8Tmmuz4VGQ%vm-|ZDhZ+Lh;HoW$V`Af)7dPxmRH+Tj zVa18@jQvS2dDGeVredJQg@w~B%RztDZ9J+!C*@oGnQT%{>v@qIF`uI_e%95+S6;F{ zz+4mYYQ*;-?vKDD<+_)S(bt*ZH}z82aRGc! z>5@|~I&XyMEWS#UgTUYD^C32J`#M{D>OC3(IFvi^CaDoM%Fm*WbwukXFd=qcb$P?E5VSXOs?^(U%XP0*X(8u{AGoN={ zal6CG^CrY6BBmeqLtumOz*6mZzi>Fa5Ys0QAU^PO)mFg&`shR(%tCjdy$>Ngg|HQ2 zC&I@FhY)(-<#3*aa1O#~gnWeA2;~Ti5SAg_f$$K*QwUoTb|QR?a0sFI-6)T64#H@J ze1zEu@)2eulp`!cScY&1!b1p8 zA#6q1iSRMPA%x!dp*+Gl2%{155oRNlBP>E#hHwYMLkLeHY(?0K@G-(6gx=^6Cn21p z`vqSC>%JNAz!k5&bM`|I zeR}NXtb%tQ7=GuO*(*+$cWR4h?JvJyXd#FkGSbaAg;eP?!v;^(^zIG z=6wx~)dAmp#DRJhSD0sV>8>*}v3m4p=1!bC416_OP!r6QM-GQomKm8ue5TOIENiR* zKNSb+RgSqwB4iqPk%vVQ>D5VHRlvxs#GQ2`Q|>@#Lgq?j)t31JJ|oj#;VrMnWWZZd zhLR>yCA_}+dS9aQcHcUNaU-oEQLt5r~`j8rAozqenW%7?H}G`qa*x> z2ghXk5&fwIV{Qom$4m2I9*?sTI87j31?Vb};l{an$P>)~*$5`xa?o+E;W3F2n{;_N zKcvTDj{W?Bhw(_`HGl`{7^Wj|{AazqCd5Ejgi)8*2%HKH$N1R@ye^QA*N`!|c<|a` z9;D@Q4MKeU$Jl=W7mGf~H0xz~hJ^^cUhtgPjPGzUX~sG0Wg2DUaUB9)%ab%-bDE$$ z%46~)9WN3g1e1=}s1=~&wTpDTUYc|(a86lS53iwfaZ#i0&BLtsW+a$&&7f-roy_Aj zA!Q&fe+$o~%fk4TbtZmT?8OJo(B*(GXD}($ zVe)$jko-v3JgAqm`JV3mV4a2TLC`%2x|K*X53^p}6EONB(8iogybVFjJkpxyFXP;W zKswGbb{&OoC-NyD>D~j~dq<&r*Fv`kbbCNI5NYON)*C|tZAN~a7j%M-6)=ql>F5Us z5zKl!hlB1nDjmskkdEOHf=Op!u4Ak=j4zm=50kD7*rfX+yO;Be`we5TjgCcnA&vD@ zzJViqIS2f<`*yG|uy_^%57O1EQ~Aq02F|g_%RFudT|Z{%!#rh7A25%=Bj63+KLZK3 zBCs9w8TJh;zXzW~zc-x;c_u%c9&vEoVq#BC#qmjDRWrvSg;fn4Zxm+jYFtrR^;(V} z3M=cGbHtu9vZ?Vv#JB2yZSN^3iXZnewr*T@69UaEOE^5G(Cj}!8In-%=^ngAxfmd5_ zF0i>iVgBX7^k@1<3RV{7h}rKE0rxYaJi(fV5$W$n%<+Rb#W>Me&l7!6o-HOoO#Bzb zI~={7If(JQ4#p>ln?{)Ronm|j{2kigEcvGx-ynYaj}B)IT#xm!-&OwE;arS#;=aJo zKksl-ZeqTuIs>>?!z{Dt9W$fxp8 zF@nG?!0ZVr&@O(Q!dM2(oT$ecw&s8NkoKoxpQ|AGBZ}aPd2d{A+>7T5tn!z6Cb{ z_psnr;AIwkEASH*{`{u$D;B&O*kz%A1bChW{||8Ae8M}f`5^skrN6YZz{$9|Q-w6C`#fmZ_$uwdGE zlLgbhJ1m&?{j~+tzVBNw?OSERwC}?fO#6Of!L;Ws7Q7klnQpI-OV_yn2@byD=Yt*+30{w&j~2RAv#< zuR(rbJNCGUdtiLF(Z6fM`)#<>hWp^UGUN$|b1?M`ey6J`604K?M%r+R1-n602Rskg zZ?a|iWx(cq!43QU+(J+J@3Y~xzzr`uoL9myEdPuppR=7;ESTj#vf(dnSbpLHbUa9Z zhB-mkc!CWV0eAkz;k+KitbeX8e}N6R0uO*ck$)Q6$KSXx57xKJh99!wEjIkN4ez$$ zZ)~`SWzEa_`rGh%Hay;jOKjM0!;5V=WW%d~&H3wzn7{tYmd~F~F%Qc39B}?Rhx2hb z2=)8AE&oH{w;pgfhk};*|F-3GQ4{#B!}%#<<~v36ss{2OY{Qq>@N^sY+VDafz6p5X z3l3+Y_Qw^r{QGS91snd04Y%9yx4_?_y;F31omf(Q_nO+5Vf#)}OAKis+jp)F=h$$u z4f|~PCg5M8zOlN#+khuQpTjl2$437L8{TZgJAuvqP5=KV@E%-W-@?*`@_%Zh@3P?& z)RIZs=f+<=Lmofa-Ynowz1}#X$0^3ew)|-}jK@Uc2g~08oQLt0EZFT3pY3LVvu`V9Rf@;k#}45gY!K4Zm)~yKVS@4Ldjy*9YYv0Gt&c|4ubd zwdH5n@Fk?z>pNcG@`1UpWZGw%jlK+ckVT)>z=`qpRHM;G-vXS4^x-y4jcX7ZTJfdc7sP>j8mm+P+t4XU|{oLdxzODKED$`m|twe z*V=H%hVKC8J};S^h@I|xZ25n%;SDy-an(Fn|7SLAl;Wof0(dzGZ|{4(mrk1LEu30h z;`JJ3c$9qsp0@JWdjr*Yd9fDnlo;J4dA((|-UU^)^L}l|SGw z%N%{d*er1FhRDnNAL?#~S6b|O)VcV$;3PM1|CVwE66nCI=%w#RnMtNd2iLCDs`eCZ51}bQuT_IH(0k&oiz-X z*M0E%l%bxGl-I5%;mKG35`Sqh;PdQjrqU; zHS#Eu0KQctCwO(1Pdh5f^qW1py}TU-DKZOrUn_g8J{d7apN!1bC!tI4JQ2 zFjFpwrqlmGeuzr42#p@aC2YVz|Hq zo^WnvmR8qUGgY^hH`nm<3mi7gdh|n#UiJK}P5d$lRA1X@<>Z}OGR>P9KTD=f;^|R}XAIR1jCa>a5*&Rr3b~jPeG*zniY?mBCIm$o^9dhFm{I26Z*IN~d*j z)E^@;%0)f4BKl_#v@7b%IXk>B$p%z@NogI1+_FX^>1xOh<4aPL7DOK8#$1L^O?&y& zv}qW2I`bhAO{?b?=3pnTYxgxeuXKCUKvYy*Ce4Vv%jH*Ibi-^v7-3Y)HN&a|%(oIF ziXKEcz8Q7FK!cSKT4_l3Rj+qJb#09rjBtVQFR^wunaMTOdMofqJq9z2c{s!nck|O3 zOpZ&QY!vU*8K?;laAV+6KV+lIk1*$NrtuOp5*fKGk_J8~sC03XxiEu~t1yZ2(@NGB zS2yD7gtyJrj7qmaOQkerUayp4XliTu@*~IOBokLAjcqir!F)F~uL4 zA+G@yS6=5g_*+BW5GCu`_Jbovc>q7*Wi3_C*Ypz!*+xUnk@D;M>1Xn0zJcj@nT&VI zdWJGsx z=kviXGZ()_rbGl2ygIUg>B?i0YqX4v+NRRK<8Hw#QxfBbieTXXv~eyw2*N-V?I&UU z1T;Zcgt(swxG?cS6gB+4_qH?8R(A%0&I9h8NtpKc&&`F8&XBLSbTQO*j&GrM^CC-Ba2LKAiJ04AY~;_? z%y||F%03VK=@3AmPKStqsFYtVt=6ybiOEv~yT-`nmGgXNt!zSPo&i-aQwF3%4%^?M z3+?+veU2^qvp)`%ySmyo!UX$Dfgc -#endif - -#include - -#include -#include -#include -#include - -#define TEST_FAIL (-1) -#define TEST_SUCCESS (0) - -static int test_CyaSSL_Init(void); -static int test_CyaSSL_Cleanup(void); -static int test_CyaSSL_Method_Allocators(void); -static int test_CyaSSL_CTX_new(CYASSL_METHOD *method); -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) -static int test_CyaSSL_CTX_use_certificate_file(void); -static int test_CyaSSL_CTX_use_PrivateKey_file(void); -static int test_CyaSSL_CTX_load_verify_locations(void); -#ifndef NO_RSA -static int test_server_CyaSSL_new(void); -static int test_client_CyaSSL_new(void); -#ifndef SINGLE_THREADED -static int test_CyaSSL_read_write(void); -#endif /* SINGLE_THREADED */ -#endif /* NO_RSA */ -#endif /* NO_FILESYSTEM */ -#ifdef HAVE_SNI -static void test_CyaSSL_UseSNI(void); -#endif /* HAVE_SNI */ -#ifdef HAVE_MAX_FRAGMENT -static void test_CyaSSL_UseMaxFragment(void); -#endif /* HAVE_MAX_FRAGMENT */ -#ifdef HAVE_TRUNCATED_HMAC -static void test_CyaSSL_UseTruncatedHMAC(void); -#endif /* HAVE_TRUNCATED_HMAC */ -#ifdef HAVE_SUPPORTED_CURVES -static void test_CyaSSL_UseSupportedCurve(void); -#endif /* HAVE_SUPPORTED_CURVES */ - -/* test function helpers */ -static int test_method(CYASSL_METHOD *method, const char *name); -#ifdef OPENSSL_EXTRA -static int test_method2(CYASSL_METHOD *method, const char *name); -#endif -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) -static int test_ucf(CYASSL_CTX *ctx, const char* file, int type, - int cond, const char* name); -static int test_upkf(CYASSL_CTX *ctx, const char* file, int type, - int cond, const char* name); -static int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, - int cond, const char* name); - -THREAD_RETURN CYASSL_THREAD test_server_nofail(void*); -void test_client_nofail(void*); - -void run_cyassl_client(void* args); -THREAD_RETURN CYASSL_THREAD run_cyassl_server(void* args); - -void test_CyaSSL_client_server(callback_functions* client_callbacks, - callback_functions* server_callbacks); - -static const char* bogusFile = "/dev/null"; -#endif - -#define testingFmt " %s:" -#define resultFmt " %s\n" -static const char* passed = "passed"; -static const char* failed = "failed"; - -/* List of methods found in echoserver.c that I'm skipping for the moment: - * - CyaSSL_CTX_set_session_cache_mode() - */ - -int ApiTest(void) -{ - printf(" Begin API Tests\n"); - test_CyaSSL_Init(); - test_CyaSSL_Method_Allocators(); - test_CyaSSL_CTX_new(CyaSSLv23_server_method()); -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - test_CyaSSL_CTX_use_certificate_file(); - test_CyaSSL_CTX_use_PrivateKey_file(); - test_CyaSSL_CTX_load_verify_locations(); -#ifndef NO_RSA - test_server_CyaSSL_new(); - test_client_CyaSSL_new(); -#ifndef SINGLE_THREADED - test_CyaSSL_read_write(); -#endif /* SINGLE_THREADED */ -#endif /* NO_RSA */ -#endif /* NO_FILESYSTEM */ -#ifdef HAVE_SNI - test_CyaSSL_UseSNI(); -#endif /* HAVE_SNI */ -#ifdef HAVE_MAX_FRAGMENT - test_CyaSSL_UseMaxFragment(); -#endif /* HAVE_MAX_FRAGMENT */ -#ifdef HAVE_TRUNCATED_HMAC - test_CyaSSL_UseTruncatedHMAC(); -#endif /* HAVE_TRUNCATED_HMAC */ -#ifdef HAVE_SUPPORTED_CURVES - test_CyaSSL_UseSupportedCurve(); -#endif /* HAVE_SUPPORTED_CURVES */ - test_CyaSSL_Cleanup(); - printf(" End API Tests\n"); - - return TEST_SUCCESS; -} - -int test_CyaSSL_Init(void) -{ - int result; - - printf(testingFmt, "CyaSSL_Init()"); - result = CyaSSL_Init(); - printf(resultFmt, result == SSL_SUCCESS ? passed : failed); - - return result; -} - -static int test_CyaSSL_Cleanup(void) -{ - int result; - - printf(testingFmt, "CyaSSL_Cleanup()"); - result = CyaSSL_Cleanup(); - printf(resultFmt, result == SSL_SUCCESS ? passed : failed); - - return result; -} - -int test_method(CYASSL_METHOD *method, const char *name) -{ - printf(testingFmt, name); - if (method == NULL) - { - printf(resultFmt, failed); - return TEST_FAIL; - } - XFREE(method, 0, DYNAMIC_TYPE_METHOD); - printf(resultFmt, passed); - return TEST_SUCCESS; -} - -#ifdef OPENSSL_EXTRA -int test_method2(CYASSL_METHOD *method, const char *name) -{ - printf(testingFmt, name); - if (method != NULL) - { - XFREE(method, 0, DYNAMIC_TYPE_METHOD); - printf(resultFmt, failed); - return TEST_FAIL; - } - printf(resultFmt, passed); - return TEST_SUCCESS; -} -#endif - -int test_CyaSSL_Method_Allocators(void) -{ -#ifndef NO_OLD_TLS - test_method(CyaSSLv3_server_method(), "CyaSSLv3_server_method()"); - test_method(CyaSSLv3_client_method(), "CyaSSLv3_client_method()"); - test_method(CyaTLSv1_server_method(), "CyaTLSv1_server_method()"); - test_method(CyaTLSv1_client_method(), "CyaTLSv1_client_method()"); - test_method(CyaTLSv1_1_server_method(), "CyaTLSv1_1_server_method()"); - test_method(CyaTLSv1_1_client_method(), "CyaTLSv1_1_client_method()"); -#endif /* NO_OLD_TLS */ - test_method(CyaTLSv1_2_server_method(), "CyaTLSv1_2_server_method()"); - test_method(CyaTLSv1_2_client_method(), "CyaTLSv1_2_client_method()"); - test_method(CyaSSLv23_client_method(), "CyaSSLv23_client_method()"); - -#ifdef CYASSL_DTLS - test_method(CyaDTLSv1_server_method(), "CyaDTLSv1_server_method()"); - test_method(CyaDTLSv1_client_method(), "CyaDTLSv1_client_method()"); -#endif /* CYASSL_DTLS */ - -#ifdef OPENSSL_EXTRA - test_method2(CyaSSLv2_server_method(), "CyaSSLv2_server_method()"); - test_method2(CyaSSLv2_client_method(), "CyaSSLv2_client_method()"); -#endif /* OPENSSL_EXTRA */ - - return TEST_SUCCESS; -} - -int test_CyaSSL_CTX_new(CYASSL_METHOD *method) -{ - if (method != NULL) - { - CYASSL_CTX *ctx; - - printf(testingFmt, "CyaSSL_CTX_new(NULL)"); - ctx = CyaSSL_CTX_new(NULL); - if (ctx != NULL) - { - CyaSSL_CTX_free(ctx); - printf(resultFmt, failed); - } - else - printf(resultFmt, passed); - - printf(testingFmt, "CyaSSL_CTX_new(method)"); - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - { - printf(resultFmt, failed); - XFREE(method, 0, DYNAMIC_TYPE_METHOD); - /* free the method data. if this was successful, freeing - the CTX frees the method. */ - } - else - { - CyaSSL_CTX_free(ctx); - printf(resultFmt, passed); - } - } - else - printf("test_CyaSSL_CTX_new() called without method\n"); - - return TEST_SUCCESS; -} - -#ifdef HAVE_SNI -static void use_SNI_at_ctx(CYASSL_CTX* ctx) -{ - byte type = CYASSL_SNI_HOST_NAME; - char name[] = "www.yassl.com"; - - AssertIntEQ(1, CyaSSL_CTX_UseSNI(ctx, type, (void *) name, XSTRLEN(name))); -} - -static void use_SNI_at_ssl(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - char name[] = "www.yassl.com"; - - AssertIntEQ(1, CyaSSL_UseSNI(ssl, type, (void *) name, XSTRLEN(name))); -} - -static void different_SNI_at_ssl(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - char name[] = "ww2.yassl.com"; - - AssertIntEQ(1, CyaSSL_UseSNI(ssl, type, (void *) name, XSTRLEN(name))); -} - -static void use_SNI_WITH_CONTINUE_at_ssl(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - - use_SNI_at_ssl(ssl); - - CyaSSL_SNI_SetOptions(ssl, type, CYASSL_SNI_CONTINUE_ON_MISMATCH); -} - -static void use_SNI_WITH_FAKE_ANSWER_at_ssl(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - - use_SNI_at_ssl(ssl); - - CyaSSL_SNI_SetOptions(ssl, type, CYASSL_SNI_ANSWER_ON_MISMATCH); -} - -static void verify_SNI_abort_on_client(CYASSL* ssl) -{ - /* FATAL_ERROR */ - AssertIntEQ(-213, CyaSSL_get_error(ssl, 0)); -} - -static void verify_SNI_abort_on_server(CYASSL* ssl) -{ - /* UNKNOWN_SNI_HOST_NAME_E */ - AssertIntEQ(-281, CyaSSL_get_error(ssl, 0)); -} - -static void verify_SNI_no_matching(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - char* request = (char*) &type; /* to be overwriten */ - - AssertIntEQ(CYASSL_SNI_NO_MATCH, CyaSSL_SNI_Status(ssl, type)); - - AssertNotNull(request); - AssertIntEQ(0, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); - AssertNull(request); -} - -static void verify_SNI_real_matching(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - char* request = NULL; - char name[] = "www.yassl.com"; - word16 length = XSTRLEN(name); - - AssertIntEQ(CYASSL_SNI_REAL_MATCH, CyaSSL_SNI_Status(ssl, type)); - - AssertIntEQ(length, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); - AssertNotNull(request); - AssertStrEQ(name, request); -} - -static void verify_SNI_fake_matching(CYASSL* ssl) -{ - byte type = CYASSL_SNI_HOST_NAME; - char* request = NULL; - char name[] = "ww2.yassl.com"; - word16 length = XSTRLEN(name); - - AssertIntEQ(CYASSL_SNI_FAKE_MATCH, CyaSSL_SNI_Status(ssl, type)); - - AssertIntEQ(length, CyaSSL_SNI_GetRequest(ssl, type, (void**) &request)); - AssertNotNull(request); - AssertStrEQ(name, request); -} - -static void test_CyaSSL_SNI_GetFromBuffer(void) -{ - byte buffer[] = { /* www.paypal.com */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x60, 0x03, 0x03, 0x5c, - 0xc4, 0xb3, 0x8c, 0x87, 0xef, 0xa4, 0x09, 0xe0, 0x02, 0xab, 0x86, 0xca, - 0x76, 0xf0, 0x9e, 0x01, 0x65, 0xf6, 0xa6, 0x06, 0x13, 0x1d, 0x0f, 0xa5, - 0x79, 0xb0, 0xd4, 0x77, 0x22, 0xeb, 0x1a, 0x00, 0x00, 0x16, 0x00, 0x6b, - 0x00, 0x67, 0x00, 0x39, 0x00, 0x33, 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x35, - 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x21, - 0x00, 0x00, 0x00, 0x13, 0x00, 0x11, 0x00, 0x00, 0x0e, 0x77, 0x77, 0x77, - 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x00, - 0x0d, 0x00, 0x06, 0x00, 0x04, 0x04, 0x01, 0x02, 0x01 - }; - - byte buffer2[] = { /* api.textmate.org */ - 0x16, 0x03, 0x01, 0x00, 0xc6, 0x01, 0x00, 0x00, 0xc2, 0x03, 0x03, 0x52, - 0x8b, 0x7b, 0xca, 0x69, 0xec, 0x97, 0xd5, 0x08, 0x03, 0x50, 0xfe, 0x3b, - 0x99, 0xc3, 0x20, 0xce, 0xa5, 0xf6, 0x99, 0xa5, 0x71, 0xf9, 0x57, 0x7f, - 0x04, 0x38, 0xf6, 0x11, 0x0b, 0xb8, 0xd3, 0x00, 0x00, 0x5e, 0x00, 0xff, - 0xc0, 0x24, 0xc0, 0x23, 0xc0, 0x0a, 0xc0, 0x09, 0xc0, 0x07, 0xc0, 0x08, - 0xc0, 0x28, 0xc0, 0x27, 0xc0, 0x14, 0xc0, 0x13, 0xc0, 0x11, 0xc0, 0x12, - 0xc0, 0x26, 0xc0, 0x25, 0xc0, 0x2a, 0xc0, 0x29, 0xc0, 0x05, 0xc0, 0x04, - 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x0f, 0xc0, 0x0e, 0xc0, 0x0c, 0xc0, 0x0d, - 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x35, - 0x00, 0x0a, 0x00, 0x67, 0x00, 0x6b, 0x00, 0x33, 0x00, 0x39, 0x00, 0x16, - 0x00, 0xaf, 0x00, 0xae, 0x00, 0x8d, 0x00, 0x8c, 0x00, 0x8a, 0x00, 0x8b, - 0x00, 0xb1, 0x00, 0xb0, 0x00, 0x2c, 0x00, 0x3b, 0x01, 0x00, 0x00, 0x3b, - 0x00, 0x00, 0x00, 0x15, 0x00, 0x13, 0x00, 0x00, 0x10, 0x61, 0x70, 0x69, - 0x2e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x6f, 0x72, - 0x67, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x06, 0x00, 0x17, 0x00, 0x18, 0x00, - 0x19, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x0c, 0x00, - 0x0a, 0x05, 0x01, 0x04, 0x01, 0x02, 0x01, 0x04, 0x03, 0x02, 0x03 - }; - - byte buffer3[] = { /* no sni extension */ - 0x16, 0x03, 0x03, 0x00, 0x4d, 0x01, 0x00, 0x00, 0x49, 0x03, 0x03, 0xea, - 0xa1, 0x9f, 0x60, 0xdd, 0x52, 0x12, 0x13, 0xbd, 0x84, 0x34, 0xd5, 0x1c, - 0x38, 0x25, 0xa8, 0x97, 0xd2, 0xd5, 0xc6, 0x45, 0xaf, 0x1b, 0x08, 0xe4, - 0x1e, 0xbb, 0xdf, 0x9d, 0x39, 0xf0, 0x65, 0x00, 0x00, 0x16, 0x00, 0x6b, - 0x00, 0x67, 0x00, 0x39, 0x00, 0x33, 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x35, - 0x00, 0x2f, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x0a, - 0x00, 0x0d, 0x00, 0x06, 0x00, 0x04, 0x04, 0x01, 0x02, 0x01 - }; - - byte result[32] = {0}; - word32 length = 32; - - AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3), - 0, result, &length)); - - AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), - 1, result, &length)); - - AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, - result, &length)); - buffer[0] = 0x16; - - AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, - result, &length)); - buffer[1] = 0x03; - - AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, - result, &length)); - buffer[2] = 0x03; - - AssertIntEQ(-210, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, - result, &length)); - buffer[4] = 0x64; - - AssertIntEQ(1, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0, - result, &length)); - result[length] = 0; - AssertStrEQ("www.paypal.com", (const char*) result); - - length = 32; - - AssertIntEQ(1, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), 0, - result, &length)); - result[length] = 0; - AssertStrEQ("api.textmate.org", (const char*) result); -} - -void test_CyaSSL_UseSNI(void) -{ - callback_functions client_callbacks = {CyaSSLv23_client_method, 0, 0, 0}; - callback_functions server_callbacks = {CyaSSLv23_server_method, 0, 0, 0}; - - CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - CYASSL *ssl = CyaSSL_new(ctx); - - AssertNotNull(ctx); - AssertNotNull(ssl); - - /* error cases */ - AssertIntNE(1, CyaSSL_CTX_UseSNI(NULL, 0, (void *) "ctx", XSTRLEN("ctx"))); - AssertIntNE(1, CyaSSL_UseSNI( NULL, 0, (void *) "ssl", XSTRLEN("ssl"))); - AssertIntNE(1, CyaSSL_CTX_UseSNI(ctx, -1, (void *) "ctx", XSTRLEN("ctx"))); - AssertIntNE(1, CyaSSL_UseSNI( ssl, -1, (void *) "ssl", XSTRLEN("ssl"))); - AssertIntNE(1, CyaSSL_CTX_UseSNI(ctx, 0, (void *) NULL, XSTRLEN("ctx"))); - AssertIntNE(1, CyaSSL_UseSNI( ssl, 0, (void *) NULL, XSTRLEN("ssl"))); - - /* success case */ - AssertIntEQ(1, CyaSSL_CTX_UseSNI(ctx, 0, (void *) "ctx", XSTRLEN("ctx"))); - AssertIntEQ(1, CyaSSL_UseSNI( ssl, 0, (void *) "ssl", XSTRLEN("ssl"))); - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - - /* Testing success case at ctx */ - client_callbacks.ctx_ready = server_callbacks.ctx_ready = use_SNI_at_ctx; - server_callbacks.on_result = verify_SNI_real_matching; - - test_CyaSSL_client_server(&client_callbacks, &server_callbacks); - - /* Testing success case at ssl */ - client_callbacks.ctx_ready = server_callbacks.ctx_ready = NULL; - client_callbacks.ssl_ready = server_callbacks.ssl_ready = use_SNI_at_ssl; - - test_CyaSSL_client_server(&client_callbacks, &server_callbacks); - - /* Testing default mismatch behaviour */ - client_callbacks.ssl_ready = different_SNI_at_ssl; - client_callbacks.on_result = verify_SNI_abort_on_client; - server_callbacks.on_result = verify_SNI_abort_on_server; - - test_CyaSSL_client_server(&client_callbacks, &server_callbacks); - client_callbacks.on_result = NULL; - - /* Testing continue on mismatch */ - client_callbacks.ssl_ready = different_SNI_at_ssl; - server_callbacks.ssl_ready = use_SNI_WITH_CONTINUE_at_ssl; - server_callbacks.on_result = verify_SNI_no_matching; - - test_CyaSSL_client_server(&client_callbacks, &server_callbacks); - - /* Testing fake answer on mismatch */ - server_callbacks.ssl_ready = use_SNI_WITH_FAKE_ANSWER_at_ssl; - server_callbacks.on_result = verify_SNI_fake_matching; - - test_CyaSSL_client_server(&client_callbacks, &server_callbacks); - -#endif - - test_CyaSSL_SNI_GetFromBuffer(); -} -#endif /* HAVE_SNI */ - -#ifdef HAVE_MAX_FRAGMENT -static void test_CyaSSL_UseMaxFragment(void) -{ - CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - CYASSL *ssl = CyaSSL_new(ctx); - - AssertNotNull(ctx); - AssertNotNull(ssl); - - /* error cases */ - AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(NULL, CYASSL_MFL_2_9)); - AssertIntNE(1, CyaSSL_UseMaxFragment( NULL, CYASSL_MFL_2_9)); - AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(ctx, 0)); - AssertIntNE(1, CyaSSL_CTX_UseMaxFragment(ctx, 6)); - AssertIntNE(1, CyaSSL_UseMaxFragment(ssl, 0)); - AssertIntNE(1, CyaSSL_UseMaxFragment(ssl, 6)); - - /* success case */ - AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_9)); - AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_10)); - AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_11)); - AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_12)); - AssertIntEQ(1, CyaSSL_CTX_UseMaxFragment(ctx, CYASSL_MFL_2_13)); - AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_9)); - AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_10)); - AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_11)); - AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_12)); - AssertIntEQ(1, CyaSSL_UseMaxFragment( ssl, CYASSL_MFL_2_13)); - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); -} -#endif /* HAVE_MAX_FRAGMENT */ - -#ifdef HAVE_TRUNCATED_HMAC -static void test_CyaSSL_UseTruncatedHMAC(void) -{ - CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - CYASSL *ssl = CyaSSL_new(ctx); - - AssertNotNull(ctx); - AssertNotNull(ssl); - - /* error cases */ - AssertIntNE(1, CyaSSL_CTX_UseTruncatedHMAC(NULL)); - AssertIntNE(1, CyaSSL_UseTruncatedHMAC(NULL)); - - /* success case */ - AssertIntEQ(1, CyaSSL_CTX_UseTruncatedHMAC(ctx)); - AssertIntEQ(1, CyaSSL_UseTruncatedHMAC(ssl)); - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); -} -#endif /* HAVE_TRUNCATED_HMAC */ - -#ifdef HAVE_SUPPORTED_CURVES -static void test_CyaSSL_UseSupportedCurve(void) -{ - CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - CYASSL *ssl = CyaSSL_new(ctx); - - AssertNotNull(ctx); - AssertNotNull(ssl); - -#ifndef NO_CYASSL_CLIENT - /* error cases */ - AssertIntNE(1, CyaSSL_CTX_UseSupportedCurve(NULL, CYASSL_ECC_SECP160R1)); - AssertIntNE(1, CyaSSL_CTX_UseSupportedCurve(ctx, 0)); - - AssertIntNE(1, CyaSSL_UseSupportedCurve(NULL, CYASSL_ECC_SECP160R1)); - AssertIntNE(1, CyaSSL_UseSupportedCurve(ssl, 0)); - - /* success case */ - AssertIntEQ(1, CyaSSL_CTX_UseSupportedCurve(ctx, CYASSL_ECC_SECP160R1)); - AssertIntEQ(1, CyaSSL_UseSupportedCurve(ssl, CYASSL_ECC_SECP160R1)); -#endif - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); -} -#endif /* HAVE_SUPPORTED_CURVES */ - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) -/* Helper for testing CyaSSL_CTX_use_certificate_file() */ -int test_ucf(CYASSL_CTX *ctx, const char* file, int type, int cond, - const char* name) -{ - int result; - - printf(testingFmt, name); - result = CyaSSL_CTX_use_certificate_file(ctx, file, type); - if (result != cond) - { - printf(resultFmt, failed); - return TEST_FAIL; - } - printf(resultFmt, passed); - return TEST_SUCCESS; -} - -int test_CyaSSL_CTX_use_certificate_file(void) -{ - CYASSL_METHOD *method; - CYASSL_CTX *ctx; - - method = CyaSSLv23_server_method(); - if (method == NULL) - { - printf("test_CyaSSL_CTX_use_certificate_file() cannot create method\n"); - return TEST_FAIL; - } - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - { - printf("test_CyaSSL_CTX_use_certificate_file() cannot create context\n"); - XFREE(method, 0, DYNAMIC_TYPE_METHOD); - return TEST_FAIL; - } - - /* setting all parameters to garbage. this should succeed with - failure */ - /* Then set the parameters to legit values but set each item to - bogus and call again. Finish with a successful success. */ - /* If the build is configured to not have RSA, loading the - certificate files will fail. */ - - test_ucf(NULL, NULL, 9999, SSL_FAILURE, - "CyaSSL_CTX_use_certificate_file(NULL, NULL, 9999)"); -/* test_ucf(NULL, svrCert, SSL_FILETYPE_PEM, SSL_FAILURE, - "CyaSSL_CTX_use_certificate_file(NULL, svrCert, SSL_FILETYPE_PEM)");*/ - test_ucf(ctx, bogusFile, SSL_FILETYPE_PEM, SSL_FAILURE, - "CyaSSL_CTX_use_certificate_file(ctx, bogusFile, SSL_FILETYPE_PEM)"); - test_ucf(ctx, svrCert, 9999, SSL_FAILURE, - "CyaSSL_CTX_use_certificate_file(ctx, svrCert, 9999)"); -#ifndef NO_RSA - test_ucf(ctx, svrCert, SSL_FILETYPE_PEM, SSL_SUCCESS, - "CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)"); -#else - test_ucf(ctx, svrCert, SSL_FILETYPE_PEM, SSL_FAILURE, - "NO_RSA: CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)"); -#endif - - CyaSSL_CTX_free(ctx); - return TEST_SUCCESS; -} - -/* Helper for testing CyaSSL_CTX_use_PrivateKey_file() */ -int test_upkf(CYASSL_CTX *ctx, const char* file, int type, int cond, - const char* name) -{ - int result; - - printf(testingFmt, name); - result = CyaSSL_CTX_use_PrivateKey_file(ctx, file, type); - if (result != cond) - { - printf(resultFmt, failed); - return TEST_FAIL; - } - printf(resultFmt, passed); - return TEST_SUCCESS; -} - -int test_CyaSSL_CTX_use_PrivateKey_file(void) -{ - CYASSL_METHOD *method; - CYASSL_CTX *ctx; - - method = CyaSSLv23_server_method(); - if (method == NULL) - { - printf("test_CyaSSL_CTX_use_PrivateKey_file() cannot create method\n"); - return TEST_FAIL; - } - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - { - printf("test_CyaSSL_CTX_use_PrivateKey_file() cannot create context\n"); - XFREE(method, 0, DYNAMIC_TYPE_METHOD); - return TEST_FAIL; - } - - test_upkf(NULL, NULL, 9999, SSL_FAILURE, - "CyaSSL_CTX_use_PrivateKey_file(NULL, NULL, 9999)"); -/* test_upkf(NULL, svrKey, SSL_FILETYPE_PEM, SSL_FAILURE, - "CyaSSL_CTX_use_PrivateKey_file(NULL, svrKey, SSL_FILETYPE_PEM)");*/ - test_upkf(ctx, bogusFile, SSL_FILETYPE_PEM, SSL_FAILURE, - "CyaSSL_CTX_use_PrivateKey_file(ctx, bogusFile, SSL_FILETYPE_PEM)"); - test_upkf(ctx, svrKey, 9999, SSL_FAILURE, - "CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, 9999)"); - test_upkf(ctx, svrKey, SSL_FILETYPE_PEM, SSL_SUCCESS, - "CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM)"); - - CyaSSL_CTX_free(ctx); - return TEST_SUCCESS; -} - -/* Helper for testing CyaSSL_CTX_load_verify_locations() */ -int test_lvl(CYASSL_CTX *ctx, const char* file, const char* path, int cond, - const char* name) -{ - int result; - - printf(testingFmt, name); - /* - * CyaSSL_CTX_load_verify_locations() returns SSL_SUCCESS (1) for - * success, SSL_FAILURE (0) for a non-specific failure, or a specific - * failure code (<0). Need to normalize the return code to 1 or 0. - */ - result = CyaSSL_CTX_load_verify_locations(ctx, file, path) >= SSL_SUCCESS; - if (result != cond) - { - printf(resultFmt, failed); - return TEST_FAIL; - } - printf(resultFmt, passed); - return TEST_SUCCESS; -} - -int test_CyaSSL_CTX_load_verify_locations(void) -{ - CYASSL_METHOD *method; - CYASSL_CTX *ctx; - - method = CyaSSLv23_client_method(); - if (method == NULL) - { - printf("test_CyaSSL_CTX_load_verify_locations() cannot create method\n"); - return TEST_FAIL; - } - - ctx = CyaSSL_CTX_new(method); - if (ctx == NULL) - { - printf("test_CyaSSL_CTX_load_verify_locations() cannot create context\n"); - free(method); - return TEST_FAIL; - } - - test_lvl(NULL, NULL, NULL, SSL_FAILURE, - "CyaSSL_CTX_load_verify_locations(NULL, NULL, NULL)"); - test_lvl(ctx, NULL, NULL, SSL_FAILURE, - "CyaSSL_CTX_load_verify_locations(ctx, NULL, NULL)"); - test_lvl(NULL, caCert, NULL, SSL_FAILURE, - "CyaSSL_CTX_load_verify_locations(ctx, NULL, NULL)"); - test_lvl(ctx, caCert, bogusFile, SSL_FAILURE, - "CyaSSL_CTX_load_verify_locations(ctx, caCert, bogusFile)"); - /* Add a test for the certs directory path loading. */ - /* There is a leak here. If you load a second cert, the first one - is lost. */ -#ifndef NO_RSA - test_lvl(ctx, caCert, 0, SSL_SUCCESS, - "CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)"); -#else - test_lvl(ctx, caCert, 0, SSL_FAILURE, - "NO_RSA: CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)"); -#endif - - CyaSSL_CTX_free(ctx); - return TEST_SUCCESS; -} - -#ifndef NO_RSA - -int test_server_CyaSSL_new(void) -{ - int result; - CYASSL_CTX *ctx; - CYASSL_CTX *ctx_nocert; - CYASSL *ssl; - - ctx = CyaSSL_CTX_new(CyaSSLv23_server_method()); - if (ctx == NULL) - { - printf("test_server_CyaSSL_new() cannot create context\n"); - return TEST_FAIL; - } - - result = CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM); - if (result == SSL_FAILURE) - { - printf("test_server_CyaSSL_new() cannot obtain certificate\n"); - CyaSSL_CTX_free(ctx); - return TEST_FAIL; - } - - result = CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM); - if (result == SSL_FAILURE) - { - printf("test_server_CyaSSL_new() cannot obtain key\n"); - CyaSSL_CTX_free(ctx); - return TEST_FAIL; - } - - ctx_nocert = CyaSSL_CTX_new(CyaSSLv23_server_method()); - if (ctx_nocert == NULL) - { - printf("test_server_CyaSSL_new() cannot create bogus context\n"); - CyaSSL_CTX_free(ctx); - return TEST_FAIL; - } - - printf(testingFmt, "CyaSSL_new(NULL) server"); - ssl = CyaSSL_new(NULL); - if (ssl != NULL) - { - printf(resultFmt, failed); - CyaSSL_free(ssl); - } - else - printf(resultFmt, passed); - - printf(testingFmt, "CyaSSL_new(ctx_nocert) server"); - ssl = CyaSSL_new(ctx_nocert); - if (ssl != NULL) - { - printf(resultFmt, failed); - CyaSSL_free(ssl); - } - else - printf(resultFmt, passed); - - printf(testingFmt, "CyaSSL_new(ctx) server"); - ssl = CyaSSL_new(ctx); - if (ssl == NULL) - printf(resultFmt, failed); - else - { - printf(resultFmt, passed); - CyaSSL_free(ssl); - } - - CyaSSL_CTX_free(ctx_nocert); - CyaSSL_CTX_free(ctx); - return TEST_SUCCESS; -} - -int test_client_CyaSSL_new(void) -{ - int result; - CYASSL_CTX *ctx; - CYASSL_CTX *ctx_nocert; - CYASSL *ssl; - - ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); - if (ctx == NULL) - { - printf("test_client_CyaSSL_new() cannot create context\n"); - return TEST_FAIL; - } - - result = CyaSSL_CTX_load_verify_locations(ctx, caCert, 0); - if (result == SSL_FAILURE) - { - printf("test_client_CyaSSL_new() cannot obtain certificate\n"); - CyaSSL_CTX_free(ctx); - return TEST_FAIL; - } - - ctx_nocert = CyaSSL_CTX_new(CyaSSLv23_client_method()); - if (ctx_nocert == NULL) - { - printf("test_client_CyaSSL_new() cannot create bogus context\n"); - CyaSSL_CTX_free(ctx); - return TEST_FAIL; - } - - printf(testingFmt, "CyaSSL_new(NULL) client"); - ssl = CyaSSL_new(NULL); - if (ssl != NULL) - { - printf(resultFmt, failed); - CyaSSL_free(ssl); - } - else - printf(resultFmt, passed); - - printf(testingFmt, "CyaSSL_new(ctx_nocert) client"); - ssl = CyaSSL_new(ctx_nocert); - if (ssl == NULL) - printf(resultFmt, failed); - else - { - printf(resultFmt, passed); - CyaSSL_free(ssl); - } - - printf(testingFmt, "CyaSSL_new(ctx) client"); - ssl = CyaSSL_new(ctx); - if (ssl == NULL) - printf(resultFmt, failed); - else - { - printf(resultFmt, passed); - CyaSSL_free(ssl); - } - - CyaSSL_CTX_free(ctx_nocert); - CyaSSL_CTX_free(ctx); - return TEST_SUCCESS; -} - - -#ifndef SINGLE_THREADED - -static int test_CyaSSL_read_write(void) -{ - /* The unit testing for read and write shall happen simutaneously, since - * one can't do anything with one without the other. (Except for a failure - * test case.) This function will call all the others that will set up, - * execute, and report their test findings. - * - * Set up the success case first. This function will become the template - * for the other tests. This should eventually be renamed - * - * The success case isn't interesting, how can this fail? - * - Do not give the client context a CA certificate. The connect should - * fail. Do not need server for this? - * - Using NULL for the ssl object on server. Do not need client for this. - * - Using NULL for the ssl object on client. Do not need server for this. - * - Good ssl objects for client and server. Client write() without server - * read(). - * - Good ssl objects for client and server. Server write() without client - * read(). - * - Forgetting the password callback? - */ - int test_result = TEST_SUCCESS; - tcp_ready ready; - func_args client_args; - func_args server_args; - THREAD_TYPE serverThread; - - StartTCP(); - - InitTcpReady(&ready); - server_args.signal = &ready; - client_args.signal = &ready; - start_thread(test_server_nofail, &server_args, &serverThread); - wait_tcp_ready(&server_args); - test_client_nofail(&client_args); - join_thread(serverThread); - - if (client_args.return_code != TEST_SUCCESS) - { - printf(resultFmt, "client failure"); - test_result = TEST_FAIL; - } - if (server_args.return_code != TEST_SUCCESS) - { - printf(resultFmt, "server failure"); - test_result = TEST_FAIL; - } - - FreeTcpReady(&ready); - - return test_result; -} - -#endif - -THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args) -{ - SOCKET_T sockfd = 0; - SOCKET_T clientfd = 0; - word16 port = yasslPort; - - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - CYASSL* ssl = 0; - - char msg[] = "I hear you fa shizzle!"; - char input[1024]; - int idx; - - ((func_args*)args)->return_code = TEST_FAIL; - method = CyaSSLv23_server_method(); - ctx = CyaSSL_CTX_new(method); - -#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ - !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) - port = 0; -#endif - - CyaSSL_CTX_set_verify(ctx, - SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - if (CyaSSL_CTX_load_verify_locations(ctx, cliCert, 0) != SSL_SUCCESS) - { - /*err_sys("can't load ca file, Please run from CyaSSL home dir");*/ - goto done; - } - if (CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - { - /*err_sys("can't load server cert chain file, " - "Please run from CyaSSL home dir");*/ - goto done; - } - if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - { - /*err_sys("can't load server key file, " - "Please run from CyaSSL home dir");*/ - goto done; - } - ssl = CyaSSL_new(ctx); - tcp_accept(&sockfd, &clientfd, (func_args*)args, port, 0, 0); - CloseSocket(sockfd); - - CyaSSL_set_fd(ssl, clientfd); - -#ifdef NO_PSK - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #else - SetDH(ssl); /* will repick suites with DHE, higher priority than PSK */ - #endif -#endif - if (CyaSSL_accept(ssl) != SSL_SUCCESS) - { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - /*err_sys("SSL_accept failed");*/ - goto done; - } - - idx = CyaSSL_read(ssl, input, sizeof(input)-1); - if (idx > 0) { - input[idx] = 0; - printf("Client message: %s\n", input); - } - - if (CyaSSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) - { - /*err_sys("SSL_write failed");*/ - return 0; - } - -done: - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - - CloseSocket(clientfd); - ((func_args*)args)->return_code = TEST_SUCCESS; - return 0; -} - -void test_client_nofail(void* args) -{ - SOCKET_T sockfd = 0; - - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; - CYASSL* ssl = 0; - - char msg[64] = "hello cyassl!"; - char reply[1024]; - int input; - int msgSz = (int)strlen(msg); - - ((func_args*)args)->return_code = TEST_FAIL; - method = CyaSSLv23_client_method(); - ctx = CyaSSL_CTX_new(method); - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - if (CyaSSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) - { - /* err_sys("can't load ca file, Please run from CyaSSL home dir");*/ - goto done2; - } - if (CyaSSL_CTX_use_certificate_file(ctx, cliCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - { - /*err_sys("can't load client cert file, " - "Please run from CyaSSL home dir");*/ - goto done2; - } - if (CyaSSL_CTX_use_PrivateKey_file(ctx, cliKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - { - /*err_sys("can't load client key file, " - "Please run from CyaSSL home dir");*/ - goto done2; - } - - tcp_connect(&sockfd, yasslIP, ((func_args*)args)->signal->port, 0); - - ssl = CyaSSL_new(ctx); - CyaSSL_set_fd(ssl, sockfd); - if (CyaSSL_connect(ssl) != SSL_SUCCESS) - { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("err = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - /*printf("SSL_connect failed");*/ - goto done2; - } - - if (CyaSSL_write(ssl, msg, msgSz) != msgSz) - { - /*err_sys("SSL_write failed");*/ - goto done2; - } - - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) - { - reply[input] = 0; - printf("Server response: %s\n", reply); - } - -done2: - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - - CloseSocket(sockfd); - ((func_args*)args)->return_code = TEST_SUCCESS; - return; -} - -void run_cyassl_client(void* args) -{ - callback_functions* callbacks = ((func_args*)args)->callbacks; - - CYASSL_CTX* ctx = CyaSSL_CTX_new(callbacks->method()); - CYASSL* ssl = NULL; - SOCKET_T sfd = 0; - - char msg[] = "hello cyassl server!"; - int len = (int) XSTRLEN(msg); - char input[1024]; - int idx; - - ((func_args*)args)->return_code = TEST_FAIL; - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - AssertIntEQ(SSL_SUCCESS, CyaSSL_CTX_load_verify_locations(ctx, caCert, 0)); - - AssertIntEQ(SSL_SUCCESS, - CyaSSL_CTX_use_certificate_file(ctx, cliCert, SSL_FILETYPE_PEM)); - - AssertIntEQ(SSL_SUCCESS, - CyaSSL_CTX_use_PrivateKey_file(ctx, cliKey, SSL_FILETYPE_PEM)); - - if (callbacks->ctx_ready) - callbacks->ctx_ready(ctx); - - tcp_connect(&sfd, yasslIP, ((func_args*)args)->signal->port, 0); - - ssl = CyaSSL_new(ctx); - CyaSSL_set_fd(ssl, sfd); - - if (callbacks->ssl_ready) - callbacks->ssl_ready(ssl); - - if (CyaSSL_connect(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - - } else { - AssertIntEQ(len, CyaSSL_write(ssl, msg, len)); - - if (0 < (idx = CyaSSL_read(ssl, input, sizeof(input)-1))) { - input[idx] = 0; - printf("Server response: %s\n", input); - } - } - - if (callbacks->on_result) - callbacks->on_result(ssl); - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - CloseSocket(sfd); - ((func_args*)args)->return_code = TEST_SUCCESS; -} - -THREAD_RETURN CYASSL_THREAD run_cyassl_server(void* args) -{ - callback_functions* callbacks = ((func_args*)args)->callbacks; - - CYASSL_CTX* ctx = CyaSSL_CTX_new(callbacks->method()); - CYASSL* ssl = NULL; - SOCKET_T sfd = 0; - SOCKET_T cfd = 0; - word16 port = yasslPort; - - char msg[] = "I hear you fa shizzle!"; - int len = (int) XSTRLEN(msg); - char input[1024]; - int idx; - - ((func_args*)args)->return_code = TEST_FAIL; - -#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ - !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) - port = 0; -#endif - - CyaSSL_CTX_set_verify(ctx, - SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); - -#ifdef OPENSSL_EXTRA - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - - - AssertIntEQ(SSL_SUCCESS, CyaSSL_CTX_load_verify_locations(ctx, cliCert, 0)); - - AssertIntEQ(SSL_SUCCESS, - CyaSSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)); - - AssertIntEQ(SSL_SUCCESS, - CyaSSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM)); - - if (callbacks->ctx_ready) - callbacks->ctx_ready(ctx); - - ssl = CyaSSL_new(ctx); - - tcp_accept(&sfd, &cfd, (func_args*)args, port, 0, 0); - CloseSocket(sfd); - - CyaSSL_set_fd(ssl, cfd); - -#ifdef NO_PSK - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #else - SetDH(ssl); /* will repick suites with DHE, higher priority than PSK */ - #endif -#endif - - if (callbacks->ssl_ready) - callbacks->ssl_ready(ssl); - - /* AssertIntEQ(SSL_SUCCESS, CyaSSL_accept(ssl)); */ - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - - } else { - if (0 < (idx = CyaSSL_read(ssl, input, sizeof(input)-1))) { - input[idx] = 0; - printf("Client message: %s\n", input); - } - - AssertIntEQ(len, CyaSSL_write(ssl, msg, len)); - - CyaSSL_shutdown(ssl); - } - - if (callbacks->on_result) - callbacks->on_result(ssl); - - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - CloseSocket(cfd); - - ((func_args*)args)->return_code = TEST_SUCCESS; - - return 0; -} - -void test_CyaSSL_client_server(callback_functions* client_callbacks, - callback_functions* server_callbacks) -{ - tcp_ready ready; - func_args client_args; - func_args server_args; - THREAD_TYPE serverThread; - - StartTCP(); - - client_args.callbacks = client_callbacks; - server_args.callbacks = server_callbacks; - - /* RUN Server side */ - InitTcpReady(&ready); - server_args.signal = &ready; - client_args.signal = &ready; - start_thread(run_cyassl_server, &server_args, &serverThread); - wait_tcp_ready(&server_args); - - /* RUN Client side */ - run_cyassl_client(&client_args); - join_thread(serverThread); - - FreeTcpReady(&ready); -} - -#endif /* SINGLE_THREADED*/ - -#endif /* NO_FILESYSTEM */ diff --git a/project1/cyassl-3.0.0/tests/hash.c b/project1/cyassl-3.0.0/tests/hash.c deleted file mode 100644 index 03bf4bcb..00000000 --- a/project1/cyassl-3.0.0/tests/hash.c +++ /dev/null @@ -1,837 +0,0 @@ -/* hash.c has unit tests - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -typedef struct testVector { - const char* input; - const char* output; - size_t inLen; - size_t outLen; -} testVector; - -int md4_test(void); -int md5_test(void); -int sha_test(void); -int sha256_test(void); -int sha512_test(void); -int sha384_test(void); -int ripemd_test(void); -int hmac_md5_test(void); -int hmac_sha_test(void); -int hmac_sha256_test(void); -int hmac_sha384_test(void); - -int HashTest(void) -{ - int ret = 0; - - printf(" Begin HASH Tests\n"); - -#ifndef NO_MD4 - if ( (ret = md4_test()) ) { - printf( " MD4 test failed!\n"); - return ret; - } else - printf( " MD4 test passed!\n"); -#endif - -#ifndef NO_MD5 - if ( (ret = md5_test()) ) { - printf( " MD5 test failed!\n"); - return ret; - } else - printf( " MD5 test passed!\n"); -#endif - -#ifndef NO_SHA - if ( (ret = sha_test()) ) { - printf( " SHA test failed!\n"); - return ret; - } else - printf( " SHA test passed!\n"); -#endif - -#ifndef NO_SHA256 - if ( (ret = sha256_test()) ) { - printf( " SHA-256 test failed!\n"); - return ret; - } else - printf( " SHA-256 test passed!\n"); -#endif - -#ifdef CYASSL_SHA512 - if ( (ret = sha512_test()) ) { - printf( " SHA-512 test failed!\n"); - return ret; - } else - printf( " SHA-512 test passed!\n"); -#endif - -#ifdef CYASSL_SHA384 - if ( (ret = sha384_test()) ) { - printf( " SHA-384 test failed!\n"); - return ret; - } else - printf( " SHA-384 test passed!\n"); -#endif - -#ifdef CYASSL_RIPEMD - if ( (ret = ripemd_test()) ) { - printf( " RIPEMD test failed!\n"); - return ret; - } else - printf( " RIPEMD test passed!\n"); -#endif - -#ifndef NO_HMAC - #ifndef NO_MD5 - if ( (ret = hmac_md5_test()) ) { - printf( " HMAC-MD5 test failed!\n"); - return ret; - } else - printf( " HMAC-MD5 test passed!\n"); - #endif - - if ( (ret = hmac_sha_test()) ) - printf( " HMAC-SHA test failed!\n"); - else - printf( " HMAC-SHA test passed!\n"); - - #ifndef NO_SHA256 - if ( (ret = hmac_sha256_test()) ) - printf( " HMAC-SHA256 test failed!\n"); - else - printf( " HMAC-SHA256 test passed!\n"); - #endif - - #ifdef CYASSL_SHA384 - if ( (ret = hmac_sha384_test()) ) - printf( " HMAC-SHA384 test failed!\n"); - else - printf( " HMAC-SHA384 test passed!\n"); - #endif -#endif - - printf(" End HASH Tests\n"); - - return 0; -} - -#ifndef NO_MD4 - -int md4_test(void) -{ - Md4 md4; - byte hash[MD4_DIGEST_SIZE]; - - testVector a, b, c, d, e, f, g; - testVector test_md4[7]; - int times = sizeof(test_md4) / sizeof(testVector), i; - - a.input = ""; - a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89" - "\xc0"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "a"; - b.output = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb" - "\x24"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "abc"; - c.output = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72" - "\x9d"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - d.input = "message digest"; - d.output = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01" - "\x4b"; - d.inLen = strlen(d.input); - d.outLen = strlen(d.output); - - e.input = "abcdefghijklmnopqrstuvwxyz"; - e.output = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d" - "\xa9"; - e.inLen = strlen(e.input); - e.outLen = strlen(e.output); - - f.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - f.output = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0" - "\xe4"; - f.inLen = strlen(f.input); - f.outLen = strlen(f.output); - - g.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - g.output = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05" - "\x36"; - g.inLen = strlen(g.input); - g.outLen = strlen(g.output); - - test_md4[0] = a; - test_md4[1] = b; - test_md4[2] = c; - test_md4[3] = d; - test_md4[4] = e; - test_md4[5] = f; - test_md4[6] = g; - - InitMd4(&md4); - - for (i = 0; i < times; ++i) { - Md4Update(&md4, (byte*)test_md4[i].input, (word32)test_md4[i].inLen); - Md4Final(&md4, hash); - - if (memcmp(hash, test_md4[i].output, MD4_DIGEST_SIZE) != 0) - return -205 - i; - } - - return 0; -} - -#endif /* NO_MD4 */ - -#ifndef NO_MD5 - -int md5_test(void) -{ - Md5 md5; - byte hash[MD5_DIGEST_SIZE]; - - testVector a, b, c, d, e; - testVector test_md5[5]; - int times = sizeof(test_md5) / sizeof(testVector), i; - - a.input = "abc"; - a.output = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f" - "\x72"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "message digest"; - b.output = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61" - "\xd0"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "abcdefghijklmnopqrstuvwxyz"; - c.output = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1" - "\x3b"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - d.input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345" - "6789"; - d.output = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d" - "\x9f"; - d.inLen = strlen(d.input); - d.outLen = strlen(d.output); - - e.input = "1234567890123456789012345678901234567890123456789012345678" - "9012345678901234567890"; - e.output = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6" - "\x7a"; - e.inLen = strlen(e.input); - e.outLen = strlen(e.output); - - test_md5[0] = a; - test_md5[1] = b; - test_md5[2] = c; - test_md5[3] = d; - test_md5[4] = e; - - InitMd5(&md5); - - for (i = 0; i < times; ++i) { - Md5Update(&md5, (byte*)test_md5[i].input, (word32)test_md5[i].inLen); - Md5Final(&md5, hash); - - if (memcmp(hash, test_md5[i].output, MD5_DIGEST_SIZE) != 0) - return -5 - i; - } - - return 0; -} - -#endif /* NO_MD5 */ - -#ifndef NO_SHA -int sha_test(void) -{ - Sha sha; - byte hash[SHA_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_sha[4]; - int ret = 0; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2" - "\x6C\x9C\xD0\xD8\x9D"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29" - "\xE5\xE5\x46\x70\xF1"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaa"; - c.output = "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44" - "\x2A\x25\xEC\x64\x4D"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaa"; - d.output = "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7" - "\x53\x99\x5E\x26\xA0"; - d.inLen = strlen(d.input); - d.outLen = strlen(d.output); - - test_sha[0] = a; - test_sha[1] = b; - test_sha[2] = c; - test_sha[3] = d; - - ret = InitSha(&sha); - if (ret != 0) - return ret; - - for (i = 0; i < times; ++i) { - ShaUpdate(&sha, (byte*)test_sha[i].input, (word32)test_sha[i].inLen); - ShaFinal(&sha, hash); - - if (memcmp(hash, test_sha[i].output, SHA_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* NO_SHA */ - -#ifndef NO_SHA256 -int sha256_test(void) -{ - Sha256 sha; - byte hash[SHA256_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int ret; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" - "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" - "\x15\xAD"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - b.output = "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" - "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" - "\x06\xC1"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha256(&sha); - if (ret != 0) - return ret; - - for (i = 0; i < times; ++i) { - ret = Sha256Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return ret; - - ret = Sha256Final(&sha, hash); - if (ret != 0) - return ret; - - if (memcmp(hash, test_sha[i].output, SHA256_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - -#ifdef CYASSL_SHA512 -int sha512_test(void) -{ - Sha512 sha; - byte hash[SHA512_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - int ret; - - a.input = "abc"; - a.output = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" - "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" - "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" - "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" - "\xa5\x4c\xa4\x9f"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" - "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" - "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" - "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" - "\x87\x4b\xe9\x09"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha512(&sha); - if (ret != 0) - return ret; - - for (i = 0; i < times; ++i) { - ret = Sha512Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return ret; - - ret = Sha512Final(&sha, hash); - if (ret != 0) - return ret; - - if (memcmp(hash, test_sha[i].output, SHA512_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - -#ifdef CYASSL_SHA384 -int sha384_test() -{ - Sha384 sha; - byte hash[SHA384_DIGEST_SIZE]; - - testVector a, b; - testVector test_sha[2]; - int times = sizeof(test_sha) / sizeof(struct testVector), i; - int ret; - - a.input = "abc"; - a.output = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" - "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" - "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" - "\xc8\x25\xa7"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" - "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - b.output = "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" - "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" - "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" - "\x74\x60\x39"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - test_sha[0] = a; - test_sha[1] = b; - - ret = InitSha384(&sha); - if (ret != 0) - return ret; - - for (i = 0; i < times; ++i) { - ret = Sha384Update(&sha, (byte*)test_sha[i].input,(word32)test_sha[i].inLen); - if (ret != 0) - return ret; - - ret = Sha384Final(&sha, hash); - if (ret != 0) - return ret; - - if (memcmp(hash, test_sha[i].output, SHA384_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif - -#ifdef CYASSL_RIPEMD -int ripemd_test(void) -{ - RipeMd ripemd; - byte hash[RIPEMD_DIGEST_SIZE]; - - testVector a, b, c, d; - testVector test_ripemd[4]; - int times = sizeof(test_ripemd) / sizeof(struct testVector), i; - - a.input = "abc"; - a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6" - "\xb0\x87\xf1\x5a\x0b\xfc"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "message digest"; - b.output = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8" - "\x5f\xfa\x21\x59\x5f\x36"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - c.output = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc" - "\xf4\x9a\xda\x62\xeb\x2b"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - d.input = "12345678901234567890123456789012345678901234567890123456" - "789012345678901234567890"; - d.output = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab" - "\x82\xbf\x63\x32\x6b\xfb"; - d.inLen = strlen(d.input); - d.outLen = strlen(d.output); - - test_ripemd[0] = a; - test_ripemd[1] = b; - test_ripemd[2] = c; - test_ripemd[3] = d; - - InitRipeMd(&ripemd); - - for (i = 0; i < times; ++i) { - RipeMdUpdate(&ripemd, (byte*)test_ripemd[i].input, - (word32)test_ripemd[i].inLen); - RipeMdFinal(&ripemd, hash); - - if (memcmp(hash, test_ripemd[i].output, RIPEMD_DIGEST_SIZE) != 0) - return -10 - i; - } - - return 0; -} -#endif /* CYASSL_RIPEMD */ - -#if !defined(NO_HMAC) && !defined(NO_MD5) -int hmac_md5_test(void) -{ - Hmac hmac; - byte hash[MD5_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc" - "\x9d"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "what do ya want for nothing?"; - b.output = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7" - "\x38"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3" - "\xf6"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac, MD5, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4014; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4015; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4016; - - if (memcmp(hash, test_hmac[i].output, MD5_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - -#ifndef NO_HMAC -int hmac_sha_test(void) -{ - Hmac hmac; - byte hash[SHA_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c" - "\x8e\xf1\x46\xbe\x00"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "what do ya want for nothing?"; - b.output = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf" - "\x9c\x25\x9a\x7c\x79"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b" - "\x4f\x63\xf1\x75\xd3"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac, SHA, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4017; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4018; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4019; - - if (memcmp(hash, test_hmac[i].output, SHA_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - -#if !defined(NO_HMAC) && !defined(NO_SHA256) -int hmac_sha256_test(void) -{ - Hmac hmac; - byte hash[SHA256_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1" - "\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32" - "\xcf\xf7"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "what do ya want for nothing?"; - b.output = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75" - "\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec" - "\x38\x43"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81" - "\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5" - "\x65\xfe"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac,SHA256, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4020; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4021; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4022; - - if (memcmp(hash, test_hmac[i].output, SHA256_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - - -#if !defined(NO_HMAC) && defined(CYASSL_SHA384) -int hmac_sha384_test(void) -{ - Hmac hmac; - byte hash[SHA384_DIGEST_SIZE]; - - const char* keys[]= - { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "Jefe", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA" - }; - - testVector a, b, c; - testVector test_hmac[3]; - - int ret; - int times = sizeof(test_hmac) / sizeof(testVector), i; - - a.input = "Hi There"; - a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90" - "\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb" - "\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2" - "\xfa\x9c\xb6"; - a.inLen = strlen(a.input); - a.outLen = strlen(a.output); - - b.input = "what do ya want for nothing?"; - b.output = "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b" - "\x1b\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22" - "\x44\x5e\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa" - "\xb2\x16\x49"; - b.inLen = strlen(b.input); - b.outLen = strlen(b.output); - - c.input = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD" - "\xDD\xDD\xDD\xDD\xDD\xDD"; - c.output = "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8" - "\x6f\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66" - "\x14\x4b\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01" - "\xa3\x4f\x27"; - c.inLen = strlen(c.input); - c.outLen = strlen(c.output); - - test_hmac[0] = a; - test_hmac[1] = b; - test_hmac[2] = c; - - for (i = 0; i < times; ++i) { - ret = HmacSetKey(&hmac,SHA384, (byte*)keys[i], (word32)strlen(keys[i])); - if (ret != 0) - return -4023; - ret = HmacUpdate(&hmac, (byte*)test_hmac[i].input, - (word32)test_hmac[i].inLen); - if (ret != 0) - return -4024; - ret = HmacFinal(&hmac, hash); - if (ret != 0) - return -4025; - - if (memcmp(hash, test_hmac[i].output, SHA384_DIGEST_SIZE) != 0) - return -20 - i; - } - - return 0; -} -#endif - diff --git a/project1/cyassl-3.0.0/tests/include.am b/project1/cyassl-3.0.0/tests/include.am deleted file mode 100644 index 8fcc542c..00000000 --- a/project1/cyassl-3.0.0/tests/include.am +++ /dev/null @@ -1,23 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - - -if BUILD_EXAMPLES -check_PROGRAMS += tests/unit.test -noinst_PROGRAMS += tests/unit.test -tests_unit_test_SOURCES = \ - tests/unit.c \ - tests/api.c \ - tests/suites.c \ - tests/hash.c \ - examples/client/client.c \ - examples/server/server.c -tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -tests_unit_test_LDADD = src/libcyassl.la -tests_unit_test_DEPENDENCIES = src/libcyassl.la -endif -EXTRA_DIST += tests/unit.h -EXTRA_DIST += tests/test.conf \ - tests/test-dtls.conf -DISTCLEANFILES+= tests/.libs/unit.test diff --git a/project1/cyassl-3.0.0/tests/suites.c b/project1/cyassl-3.0.0/tests/suites.c deleted file mode 100644 index aeb4fd24..00000000 --- a/project1/cyassl-3.0.0/tests/suites.c +++ /dev/null @@ -1,451 +0,0 @@ -/* suites.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include -#include -#include -#include - - -#define MAX_ARGS 40 -#define MAX_COMMAND_SZ 240 -#define MAX_SUITE_SZ 80 -#define NOT_BUILT_IN -123 -#ifdef NO_OLD_TLS - #define VERSION_TOO_OLD -124 -#endif - -#include "examples/client/client.h" -#include "examples/server/server.h" - - -static CYASSL_CTX* cipherSuiteCtx = NULL; -static char nonblockFlag[] = "-N"; -static char noVerifyFlag[] = "-d"; -static char portFlag[] = "-p"; -static char flagSep[] = " "; -static char svrPort[] = "0"; - - -#ifdef NO_OLD_TLS -/* if the protocol version is less than tls 1.2 return 1, else 0 */ -static int IsOldTlsVersion(const char* line) -{ - const char* find = "-v "; - char* begin = strstr(line, find); - - if (begin) { - int version = -1; - - begin += 3; - - version = atoi(begin); - - if (version < 3) - return 1; - } - - return 0; -} -#endif /* NO_OLD_TLS */ - - -/* if the cipher suite on line is valid store in suite and return 1, else 0 */ -static int IsValidCipherSuite(const char* line, char* suite) -{ - int found = 0; - int valid = 0; - - const char* find = "-l "; - const char* begin = strstr(line, find); - const char* end; - - suite[0] = '\0'; - - if (begin) { - begin += 3; - - end = strstr(begin, " "); - - if (end) { - long len = end - begin; - if (len > MAX_SUITE_SZ) { - printf("suite too long!\n"); - return 0; - } - memcpy(suite, begin, len); - suite[len] = '\0'; - } - else - strncpy(suite, begin, MAX_SUITE_SZ); - - suite[MAX_SUITE_SZ] = '\0'; - found = 1; - } - - if (found) { - if (CyaSSL_CTX_set_cipher_list(cipherSuiteCtx, suite) == SSL_SUCCESS) - valid = 1; - } - - return valid; -} - - -static int execute_test_case(int svr_argc, char** svr_argv, - int cli_argc, char** cli_argv, - int addNoVerify, int addNonBlocking) -{ - func_args cliArgs = {cli_argc, cli_argv, 0, NULL, NULL}; - func_args svrArgs = {svr_argc, svr_argv, 0, NULL, NULL}; - - tcp_ready ready; - THREAD_TYPE serverThread; - char commandLine[MAX_COMMAND_SZ]; - char cipherSuite[MAX_SUITE_SZ+1]; - int i; - size_t added = 0; - static int tests = 1; - - commandLine[0] = '\0'; - for (i = 0; i < svr_argc; i++) { - added += strlen(svr_argv[i]) + 2; - if (added >= MAX_COMMAND_SZ) { - printf("server command line too long\n"); - break; - } - strcat(commandLine, svr_argv[i]); - strcat(commandLine, flagSep); - } - - if (IsValidCipherSuite(commandLine, cipherSuite) == 0) { - #ifdef DEBUG_SUITE_TESTS - printf("cipher suite %s not supported in build\n", cipherSuite); - #endif - return NOT_BUILT_IN; - } - -#ifdef NO_OLD_TLS - if (IsOldTlsVersion(commandLine) == 1) { - #ifdef DEBUG_SUITE_TESTS - printf("protocol version on line %s is too old\n", commandLine); - #endif - return VERSION_TOO_OLD; - } -#endif - - if (addNoVerify) { - printf("repeating test with client cert request off\n"); - added += 4; /* -d plus space plus terminator */ - if (added >= MAX_COMMAND_SZ || svr_argc >= MAX_ARGS) - printf("server command line too long\n"); - else { - svr_argv[svr_argc++] = noVerifyFlag; - svrArgs.argc = svr_argc; - strcat(commandLine, noVerifyFlag); - strcat(commandLine, flagSep); - } - } - if (addNonBlocking) { - printf("repeating test with non blocking on\n"); - added += 4; /* -N plus terminator */ - if (added >= MAX_COMMAND_SZ || svr_argc >= MAX_ARGS) - printf("server command line too long\n"); - else { - svr_argv[svr_argc++] = nonblockFlag; - svrArgs.argc = svr_argc; - strcat(commandLine, nonblockFlag); - strcat(commandLine, flagSep); - } - } - #ifndef USE_WINDOWS_API - /* add port 0 */ - if (svr_argc + 2 > MAX_ARGS) - printf("cannot add the magic port number flag to server\n"); - else - { - svr_argv[svr_argc++] = portFlag; - svr_argv[svr_argc++] = svrPort; - svrArgs.argc = svr_argc; - } - #endif - printf("trying server command line[%d]: %s\n", tests, commandLine); - - commandLine[0] = '\0'; - added = 0; - for (i = 0; i < cli_argc; i++) { - added += strlen(cli_argv[i]) + 2; - if (added >= MAX_COMMAND_SZ) { - printf("client command line too long\n"); - break; - } - strcat(commandLine, cli_argv[i]); - strcat(commandLine, flagSep); - } - if (addNonBlocking) { - added += 4; /* -N plus space plus terminator */ - if (added >= MAX_COMMAND_SZ) - printf("client command line too long\n"); - else { - cli_argv[cli_argc++] = nonblockFlag; - strcat(commandLine, nonblockFlag); - strcat(commandLine, flagSep); - cliArgs.argc = cli_argc; - } - } - printf("trying client command line[%d]: %s\n", tests++, commandLine); - - InitTcpReady(&ready); - - /* start server */ - svrArgs.signal = &ready; - start_thread(server_test, &svrArgs, &serverThread); - wait_tcp_ready(&svrArgs); - #ifndef USE_WINDOWS_API - if (ready.port != 0) - { - if (cli_argc + 2 > MAX_ARGS) - printf("cannot add the magic port number flag to client\n"); - else { - char portNumber[8]; - snprintf(portNumber, sizeof(portNumber), "%d", ready.port); - cli_argv[cli_argc++] = portFlag; - cli_argv[cli_argc++] = portNumber; - cliArgs.argc = cli_argc; - } - } - #endif - /* start client */ - client_test(&cliArgs); - - /* verify results */ - if (cliArgs.return_code != 0) { - printf("client_test failed\n"); - exit(EXIT_FAILURE); - } - - join_thread(serverThread); - if (svrArgs.return_code != 0) { - printf("server_test failed\n"); - exit(EXIT_FAILURE); - } - - FreeTcpReady(&ready); - - return 0; -} - -static void test_harness(void* vargs) -{ - func_args* args = (func_args*)vargs; - char* script; - long sz, len; - int cliMode = 0; /* server or client command flag, server first */ - int ret; - FILE* file; - char* svrArgs[MAX_ARGS]; - int svrArgsSz; - char* cliArgs[MAX_ARGS]; - int cliArgsSz; - char* cursor; - char* comment; - const char* fname = "tests/test.conf"; - - if (args->argc == 1) { - printf("notice: using default file %s\n", fname); - } - else if(args->argc != 2) { - printf("usage: harness [FILE]\n"); - args->return_code = 1; - return; - } - else { - fname = args->argv[1]; - } - - file = fopen(fname, "r"); - if (file == NULL) { - fprintf(stderr, "unable to open %s\n", fname); - args->return_code = 1; - return; - } - fseek(file, 0, SEEK_END); - sz = ftell(file); - rewind(file); - if (sz <= 0) { - fprintf(stderr, "%s is empty\n", fname); - fclose(file); - args->return_code = 1; - return; - } - - script = (char*)malloc(sz+1); - if (script == 0) { - fprintf(stderr, "unable to allocte script buffer\n"); - fclose(file); - args->return_code = 1; - return; - } - - len = fread(script, 1, sz, file); - if (len != sz) { - fprintf(stderr, "read error\n"); - fclose(file); - free(script); - args->return_code = 1; - return; - } - - fclose(file); - script[sz] = 0; - - cursor = script; - svrArgsSz = 1; - svrArgs[0] = args->argv[0]; - cliArgsSz = 1; - cliArgs[0] = args->argv[0]; - - while (*cursor != 0) { - int do_it = 0; - - switch (*cursor) { - case '\n': - /* A blank line triggers test case execution or switches - to client mode if we don't have the client command yet */ - if (cliMode == 0) - cliMode = 1; /* switch to client mode processing */ - else - do_it = 1; /* Do It, we have server and client */ - cursor++; - break; - case '#': - /* Ignore lines that start with a #. */ - comment = strsep(&cursor, "\n"); -#ifdef DEBUG_SUITE_TESTS - printf("%s\n", comment); -#else - (void)comment; -#endif - break; - case '-': - /* Parameters start with a -. They end in either a newline - * or a space. Capture until either, save in Args list. */ - if (cliMode) - cliArgs[cliArgsSz++] = strsep(&cursor, " \n"); - else - svrArgs[svrArgsSz++] = strsep(&cursor, " \n"); - break; - default: - /* Anything from cursor until end of line that isn't the above - * is data for a paramter. Just up until the next newline in - * the Args list. */ - if (cliMode) - cliArgs[cliArgsSz++] = strsep(&cursor, "\n"); - else - svrArgs[svrArgsSz++] = strsep(&cursor, "\n"); - if (*cursor == 0) /* eof */ - do_it = 1; - } - - if (svrArgsSz == MAX_ARGS || cliArgsSz == MAX_ARGS) { - fprintf(stderr, "too many arguments, forcing test run\n"); - do_it = 1; - } - - if (do_it) { - ret = execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs,0,0); - /* don't repeat if not supported in build */ - if (ret == 0) { - execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 0, 1); - execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 1, 0); - execute_test_case(svrArgsSz, svrArgs, cliArgsSz, cliArgs, 1, 1); - } - svrArgsSz = 1; - cliArgsSz = 1; - cliMode = 0; - } - } - - free(script); - args->return_code = 0; -} - - -int SuiteTest(void) -{ - func_args args; - char argv0[2][80]; - char* myArgv[2]; - - printf(" Begin Cipher Suite Tests\n"); - - /* setup */ - myArgv[0] = argv0[0]; - myArgv[1] = argv0[1]; - args.argv = myArgv; - strcpy(argv0[0], "SuiteTest"); - - (void)test_harness; - - cipherSuiteCtx = CyaSSL_CTX_new(CyaTLSv1_2_client_method()); - if (cipherSuiteCtx == NULL) { - printf("can't get cipher suite ctx\n"); - exit(EXIT_FAILURE); - } - - /* default case */ - args.argc = 1; - printf("starting default cipher suite tests\n"); - test_harness(&args); - if (args.return_code != 0) { - printf("error from script %d\n", args.return_code); - exit(EXIT_FAILURE); - } - - /* any extra cases will need another argument */ - args.argc = 2; - -#ifdef CYASSL_DTLS - /* add dtls extra suites */ - strcpy(argv0[1], "tests/test-dtls.conf"); - printf("starting dtls extra cipher suite tests\n"); - test_harness(&args); - if (args.return_code != 0) { - printf("error from script %d\n", args.return_code); - exit(EXIT_FAILURE); - } -#endif - - printf(" End Cipher Suite Tests\n"); - - CyaSSL_CTX_free(cipherSuiteCtx); - - return args.return_code; -} - - diff --git a/project1/cyassl-3.0.0/tests/test-dtls.conf b/project1/cyassl-3.0.0/tests/test-dtls.conf deleted file mode 100644 index 59891690..00000000 --- a/project1/cyassl-3.0.0/tests/test-dtls.conf +++ /dev/null @@ -1,782 +0,0 @@ -# server DTLSv1 RC4-SHA --u --v 2 --l RC4-SHA - -# client DTLSv1 RC4-SHA --u --v 2 --l RC4-SHA - -# server DTLSv1.2 RC4-SHA --u --v 3 --l RC4-SHA - -# client DTLSv1.2 RC4-SHA --u --v 3 --l RC4-SHA - -# server DTLSv1 DES-CBC3-SHA --u --v 2 --l DES-CBC3-SHA - -# client DTLSv1 DES-CBC3-SHA --u --v 2 --l DES-CBC3-SHA - -# server DTLSv1.2 DES-CBC3-SHA --u --v 3 --l DES-CBC3-SHA - -# client DTLSv1.2 DES-CBC3-SHA --u --v 3 --l DES-CBC3-SHA - -# server DTLSv1 AES128-SHA --u --v 2 --l AES128-SHA - -# client DTLSv1 AES128-SHA --u --v 2 --l AES128-SHA - -# server DTLSv1.2 AES128-SHA --u --v 3 --l AES128-SHA - -# client DTLSv1.2 AES128-SHA --u --v 3 --l AES128-SHA - -# server DTLSv1 AES256-SHA --u --v 2 --l AES256-SHA - -# client DTLSv1 AES256-SHA --u --v 2 --l AES256-SHA - -# server DTLSv1.2 AES256-SHA --u --v 3 --l AES256-SHA - -# client DTLSv1.2 AES256-SHA --u --v 3 --l AES256-SHA - -# server DTLSv1 AES128-SHA256 --u --v 2 --l AES128-SHA256 - -# client DTLSv1 AES128-SHA256 --u --v 2 --l AES128-SHA256 - -# server DTLSv1.2 AES128-SHA256 --u --v 3 --l AES128-SHA256 - -# client DTLSv1.2 AES128-SHA256 --u --v 3 --l AES128-SHA256 - -# server DTLSv1 AES256-SHA256 --u --v 2 --l AES256-SHA256 - -# client DTLSv1 AES256-SHA256 --u --v 2 --l AES256-SHA256 - -# server DTLSv1.2 AES256-SHA256 --u --v 3 --l AES256-SHA256 - -# client DTLSv1.2 AES256-SHA256 --u --v 3 --l AES256-SHA256 - -# server DTLSv1 ECDHE-RSA-RC4 --u --v 2 --l ECDHE-RSA-RC4-SHA - -# client DTLSv1 ECDHE-RSA-RC4 --u --v 2 --l ECDHE-RSA-RC4-SHA - -# server DTLSv1.1 ECDHE-RSA-DES3 --u --v 2 --l ECDHE-RSA-DES-CBC3-SHA - -# client DTLSv1.1 ECDHE-RSA-DES3 --u --v 2 --l ECDHE-RSA-DES-CBC3-SHA - -# server DTLSv1.1 ECDHE-RSA-AES128 --u --v 2 --l ECDHE-RSA-AES128-SHA - -# client DTLSv1.1 ECDHE-RSA-AES128 --u --v 2 --l ECDHE-RSA-AES128-SHA - -# server DTLSv1.1 ECDHE-RSA-AES256 --u --v 2 --l ECDHE-RSA-AES256-SHA - -# client DTLSv1.1 ECDHE-RSA-AES256 --u --v 2 --l ECDHE-RSA-AES256-SHA - -# server DTLSv1.2 ECDHE-RSA-RC4 --u --v 3 --l ECDHE-RSA-RC4-SHA - -# client DTLSv1.2 ECDHE-RSA-RC4 --u --v 3 --l ECDHE-RSA-RC4-SHA - -# server DTLSv1.2 ECDHE-RSA-DES3 --u --v 3 --l ECDHE-RSA-DES-CBC3-SHA - -# client DTLSv1.2 ECDHE-RSA-DES3 --u --v 3 --l ECDHE-RSA-DES-CBC3-SHA - -# server DTLSv1.2 ECDHE-RSA-AES128 --u --v 3 --l ECDHE-RSA-AES128-SHA - -# client DTLSv1.2 ECDHE-RSA-AES128 --u --v 3 --l ECDHE-RSA-AES128-SHA - -# server DTLSv1.2 ECDHE-RSA-AES128-SHA256 --u --v 3 --l ECDHE-RSA-AES128-SHA256 - -# client DTLSv1.2 ECDHE-RSA-AES128-SHA256 --u --v 3 --l ECDHE-RSA-AES128-SHA256 - -# server DTLSv1.2 ECDHE-RSA-AES256 --u --v 3 --l ECDHE-RSA-AES256-SHA - -# client DTLSv1.2 ECDHE-RSA-AES256 --u --v 3 --l ECDHE-RSA-AES256-SHA - -# server DTLSv1.1 ECDHE-EDCSA-RC4 --u --v 2 --l ECDHE-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDHE-ECDSA-RC4 --u --v 2 --l ECDHE-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDHE-ECDSA-DES3 --u --v 2 --l ECDHE-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDHE-ECDSA-DES3 --u --v 2 --l ECDHE-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDHE-ECDSA-AES128 --u --v 2 --l ECDHE-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDHE-ECDSA-AES128 --u --v 2 --l ECDHE-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDHE-ECDSA-AES256 --u --v 2 --l ECDHE-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDHE-ECDSA-AES256 --u --v 2 --l ECDHE-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-RC4 --u --v 3 --l ECDHE-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-RC4 --u --v 3 --l ECDHE-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-DES3 --u --v 3 --l ECDHE-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-DES3 --u --v 3 --l ECDHE-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-AES128 --u --v 3 --l ECDHE-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES128 --u --v 3 --l ECDHE-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-AES128-SHA256 --u --v 3 --l ECDHE-ECDSA-AES128-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES128-SHA256 --u --v 3 --l ECDHE-ECDSA-AES128-SHA256 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-AES256 --u --v 3 --l ECDHE-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES256 --u --v 3 --l ECDHE-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDH-RSA-RC4 --u --v 2 --l ECDH-RSA-RC4-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-RSA-RC4 --u --v 2 --l ECDH-RSA-RC4-SHA - -# server DTLSv1.1 ECDH-RSA-DES3 --u --v 2 --l ECDH-RSA-DES-CBC3-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-RSA-DES3 --u --v 2 --l ECDH-RSA-DES-CBC3-SHA - -# server DTLSv1.1 ECDH-RSA-AES128 --u --v 2 --l ECDH-RSA-AES128-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-RSA-AES128 --u --v 2 --l ECDH-RSA-AES128-SHA - -# server DTLSv1.1 ECDH-RSA-AES256 --u --v 2 --l ECDH-RSA-AES256-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-RSA-AES256 --u --v 2 --l ECDH-RSA-AES256-SHA - -# server DTLSv1.2 ECDH-RSA-RC4 --u --v 3 --l ECDH-RSA-RC4-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-RC4 --u --v 3 --l ECDH-RSA-RC4-SHA - -# server DTLSv1.2 ECDH-RSA-DES3 --u --v 3 --l ECDH-RSA-DES-CBC3-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-DES3 --u --v 3 --l ECDH-RSA-DES-CBC3-SHA - -# server DTLSv1.2 ECDH-RSA-AES128 --u --v 3 --l ECDH-RSA-AES128-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES128 --u --v 3 --l ECDH-RSA-AES128-SHA - -# server DTLSv1.2 ECDH-RSA-AES128-SHA256 --u --v 3 --l ECDH-RSA-AES128-SHA256 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES128-SHA256 --u --v 3 --l ECDH-RSA-AES128-SHA256 - -# server DTLSv1.2 ECDH-RSA-AES256 --u --v 3 --l ECDH-RSA-AES256-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES256 --u --v 3 --l ECDH-RSA-AES256-SHA - -# server DTLSv1.1 ECDH-EDCSA-RC4 --u --v 2 --l ECDH-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-ECDSA-RC4 --u --v 2 --l ECDH-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDH-ECDSA-DES3 --u --v 2 --l ECDH-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-ECDSA-DES3 --u --v 2 --l ECDH-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDH-ECDSA-AES128 --u --v 2 --l ECDH-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-ECDSA-AES128 --u --v 2 --l ECDH-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.1 ECDH-ECDSA-AES256 --u --v 2 --l ECDH-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.1 ECDH-ECDSA-AES256 --u --v 2 --l ECDH-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-RC4 --u --v 3 --l ECDH-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-RC4 --u --v 3 --l ECDH-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-DES3 --u --v 3 --l ECDH-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-DES3 --u --v 3 --l ECDH-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-AES128 --u --v 3 --l ECDH-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES128 --u --v 3 --l ECDH-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-AES128-SHA256 --u --v 3 --l ECDH-ECDSA-AES128-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES128-SHA256 --u --v 3 --l ECDH-ECDSA-AES128-SHA256 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-AES256 --u --v 3 --l ECDH-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES256 --u --v 3 --l ECDH-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-RSA-AES256-SHA384 --u --v 3 --l ECDHE-RSA-AES256-SHA384 - -# client DTLSv1.2 ECDHE-RSA-AES256-SHA384 --u --v 3 --l ECDHE-RSA-AES256-SHA384 - -# server DTLSv1.2 ECDHE-ECDSA-AES256-SHA384 --u --v 3 --l ECDHE-ECDSA-AES256-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES256-SHA384 --u --v 3 --l ECDHE-ECDSA-AES256-SHA384 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-RSA-AES256-SHA384 --u --v 3 --l ECDH-RSA-AES256-SHA384 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES256-SHA384 --u --v 3 --l ECDH-RSA-AES256-SHA384 - -# server DTLSv1.2 ECDH-ECDSA-AES256-SHA384 --u --v 3 --l ECDH-ECDSA-AES256-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES256-SHA384 --u --v 3 --l ECDH-ECDSA-AES256-SHA384 --A ./certs/server-ecc.pem - -# server DTLSv1 PSK-AES128 --s --u --v 2 --l PSK-AES128-CBC-SHA - -# client DTLSv1 PSK-AES128 --s --u --v 2 --l PSK-AES128-CBC-SHA - -# server DTLSv1 PSK-AES256 --s --u --v 2 --l PSK-AES256-CBC-SHA - -# client DTLSv1 PSK-AES256 --s --u --v 2 --l PSK-AES256-CBC-SHA - -# server DTLSv1.2 PSK-AES128 --s --u --v 3 --l PSK-AES128-CBC-SHA - -# client DTLSv1.2 PSK-AES128 --s --u --v 3 --l PSK-AES128-CBC-SHA - -# server DTLSv1.2 PSK-AES256 --s --u --v 3 --l PSK-AES256-CBC-SHA - -# client DTLSv1.2 PSK-AES256 --s --u --v 3 --l PSK-AES256-CBC-SHA - -# server DTLSv1.2 PSK-AES128-SHA256 --s --u --v 3 --l PSK-AES128-CBC-SHA256 - -# client DTLSv1.2 PSK-AES128-SHA256 --s --u --v 3 --l PSK-AES128-CBC-SHA256 - -# server DTLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 --u --v 3 --l ECDHE-ECDSA-AES128-GCM-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 --u --v 3 --l ECDHE-ECDSA-AES128-GCM-SHA256 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 --u --v 3 --l ECDHE-ECDSA-AES256-GCM-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 --u --v 3 --l ECDHE-ECDSA-AES256-GCM-SHA384 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 --u --v 3 --l ECDH-ECDSA-AES128-GCM-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 --u --v 3 --l ECDH-ECDSA-AES128-GCM-SHA256 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 --u --v 3 --l ECDH-ECDSA-AES256-GCM-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 --u --v 3 --l ECDH-ECDSA-AES256-GCM-SHA384 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 --u --v 3 --l ECDHE-RSA-AES128-GCM-SHA256 - -# client DTLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 --u --v 3 --l ECDHE-RSA-AES128-GCM-SHA256 - -# server DTLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 --u --v 3 --l ECDHE-RSA-AES256-GCM-SHA384 - -# client DTLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 --u --v 3 --l ECDHE-RSA-AES256-GCM-SHA384 - -# server DTLSv1.2 ECDH-RSA-AES128-GCM-SHA256 --u --v 3 --l ECDH-RSA-AES128-GCM-SHA256 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES128-GCM-SHA256 --u --v 3 --l ECDH-RSA-AES128-GCM-SHA256 - -# server DTLSv1.2 ECDH-RSA-AES256-GCM-SHA384 --u --v 3 --l ECDH-RSA-AES256-GCM-SHA384 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDH-RSA-AES256-GCM-SHA384 --u --v 3 --l ECDH-RSA-AES256-GCM-SHA384 - -# server DTLSv1.2 ECDHE-ECDSA-AES128-CCM-8 --u --v 3 --l ECDHE-ECDSA-AES128-CCM-8 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES128-CCM-8 --u --v 3 --l ECDHE-ECDSA-AES128-CCM-8 --A ./certs/server-ecc.pem - -# server DTLSv1.2 ECDHE-ECDSA-AES256-CCM-8 --u --v 3 --l ECDHE-ECDSA-AES256-CCM-8 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client DTLSv1.2 ECDHE-ECDSA-AES256-CCM-8 --u --v 3 --l ECDHE-ECDSA-AES256-CCM-8 --A ./certs/server-ecc.pem - diff --git a/project1/cyassl-3.0.0/tests/test.conf b/project1/cyassl-3.0.0/tests/test.conf deleted file mode 100644 index 6a646e55..00000000 --- a/project1/cyassl-3.0.0/tests/test.conf +++ /dev/null @@ -1,1664 +0,0 @@ -# server SSLv3 RC4-SHA --v 0 --l RC4-SHA - -# client SSLv3 RC4-SHA --v 0 --l RC4-SHA - -# server SSLv3 RC4-MD5 --v 0 --l RC4-MD5 - -# client SSLv3 RC4-MD5 --v 0 --l RC4-MD5 - -# server SSLv3 DES-CBC3-SHA --v 0 --l DES-CBC3-SHA - -# client SSLv3 DES-CBC3-SHA --v 0 --l DES-CBC3-SHA - -# server TLSv1 RC4-SHA --v 1 --l RC4-SHA - -# client TLSv1 RC4-SHA --v 1 --l RC4-SHA - -# server TLSv1 RC4-MD5 --v 1 --l RC4-MD5 - -# client TLSv1 RC4-MD5 --v 1 --l RC4-MD5 - -# server TLSv1 DES-CBC3-SHA --v 1 --l DES-CBC3-SHA - -# client TLSv1 DES-CBC3-SHA --v 1 --l DES-CBC3-SHA - -# server TLSv1 AES128-SHA --v 1 --l AES128-SHA - -# client TLSv1 AES128-SHA --v 1 --l AES128-SHA - -# server TLSv1 AES256-SHA --v 1 --l AES256-SHA - -# client TLSv1 AES256-SHA --v 1 --l AES256-SHA - -# server TLSv1 AES128-SHA256 --v 1 --l AES128-SHA256 - -# client TLSv1 AES128-SHA256 --v 1 --l AES128-SHA256 - -# server TLSv1 AES256-SHA256 --v 1 --l AES256-SHA256 - -# client TLSv1 AES256-SHA256 --v 1 --l AES256-SHA256 - -# server TLSv1.1 RC4-SHA --v 2 --l RC4-SHA - -# client TLSv1.1 RC4-SHA --v 2 --l RC4-SHA - -# server TLSv1.1 RC4-MD5 --v 2 --l RC4-MD5 - -# client TLSv1.1 RC4-MD5 --v 2 --l RC4-MD5 - -# server TLSv1.1 DES-CBC3-SHA --v 2 --l DES-CBC3-SHA - -# client TLSv1.1 DES-CBC3-SHA --v 2 --l DES-CBC3-SHA - -# server TLSv1.1 AES128-SHA --v 2 --l AES128-SHA - -# client TLSv1.1 AES128-SHA --v 2 --l AES128-SHA - -# server TLSv1.1 AES256-SHA --v 2 --l AES256-SHA - -# client TLSv1.1 AES256-SHA --v 2 --l AES256-SHA - -# server TLSv1.1 AES128-SHA256 --v 2 --l AES128-SHA256 - -# client TLSv1.1 AES128-SHA256 --v 2 --l AES128-SHA256 - -# server TLSv1.1 AES256-SHA256 --v 2 --l AES256-SHA256 - -# client TLSv1.1 AES256-SHA256 --v 2 --l AES256-SHA256 - -# server TLSv1.2 RC4-SHA --v 3 --l RC4-SHA - -# client TLSv1.2 RC4-SHA --v 3 --l RC4-SHA - -# server TLSv1.2 RC4-MD5 --v 3 --l RC4-MD5 - -# client TLSv1.2 RC4-MD5 --v 3 --l RC4-MD5 - -# server TLSv1.2 DES-CBC3-SHA --v 3 --l DES-CBC3-SHA - -# client TLSv1.2 DES-CBC3-SHA --v 3 --l DES-CBC3-SHA - -# server TLSv1.2 AES128-SHA --v 3 --l AES128-SHA - -# client TLSv1.2 AES128-SHA --v 3 --l AES128-SHA - -# server TLSv1.2 AES256-SHA --v 3 --l AES256-SHA - -# client TLSv1.2 AES256-SHA --v 3 --l AES256-SHA - -# server TLSv1.2 AES128-SHA256 --v 3 --l AES128-SHA256 - -# client TLSv1.2 AES128-SHA256 --v 3 --l AES128-SHA256 - -# server TLSv1.2 AES256-SHA256 --v 3 --l AES256-SHA256 - -# client TLSv1.2 AES256-SHA256 --v 3 --l AES256-SHA256 - -# server TLSv1 ECDHE-RSA-RC4 --v 1 --l ECDHE-RSA-RC4-SHA - -# client TLSv1 ECDHE-RSA-RC4 --v 1 --l ECDHE-RSA-RC4-SHA - -# server TLSv1 ECDHE-RSA-DES3 --v 1 --l ECDHE-RSA-DES-CBC3-SHA - -# client TLSv1 ECDHE-RSA-DES3 --v 1 --l ECDHE-RSA-DES-CBC3-SHA - -# server TLSv1 ECDHE-RSA-AES128 --v 1 --l ECDHE-RSA-AES128-SHA - -# client TLSv1 ECDHE-RSA-AES128 --v 1 --l ECDHE-RSA-AES128-SHA - -# server TLSv1 ECDHE-RSA-AES256 --v 1 --l ECDHE-RSA-AES256-SHA - -# client TLSv1 ECDHE-RSA-AES256 --v 1 --l ECDHE-RSA-AES256-SHA - -# server TLSv1.1 ECDHE-RSA-RC4 --v 2 --l ECDHE-RSA-RC4-SHA - -# client TLSv1.1 ECDHE-RSA-RC4 --v 2 --l ECDHE-RSA-RC4-SHA - -# server TLSv1.1 ECDHE-RSA-DES3 --v 2 --l ECDHE-RSA-DES-CBC3-SHA - -# client TLSv1.1 ECDHE-RSA-DES3 --v 2 --l ECDHE-RSA-DES-CBC3-SHA - -# server TLSv1.1 ECDHE-RSA-AES128 --v 2 --l ECDHE-RSA-AES128-SHA - -# client TLSv1.1 ECDHE-RSA-AES128 --v 2 --l ECDHE-RSA-AES128-SHA - -# server TLSv1.1 ECDHE-RSA-AES256 --v 2 --l ECDHE-RSA-AES256-SHA - -# client TLSv1.1 ECDHE-RSA-AES256 --v 2 --l ECDHE-RSA-AES256-SHA - -# server TLSv1.2 ECDHE-RSA-RC4 --v 3 --l ECDHE-RSA-RC4-SHA - -# client TLSv1.2 ECDHE-RSA-RC4 --v 3 --l ECDHE-RSA-RC4-SHA - -# server TLSv1.2 ECDHE-RSA-DES3 --v 3 --l ECDHE-RSA-DES-CBC3-SHA - -# client TLSv1.2 ECDHE-RSA-DES3 --v 3 --l ECDHE-RSA-DES-CBC3-SHA - -# server TLSv1.2 ECDHE-RSA-AES128 --v 3 --l ECDHE-RSA-AES128-SHA - -# client TLSv1.2 ECDHE-RSA-AES128 --v 3 --l ECDHE-RSA-AES128-SHA - -# server TLSv1.2 ECDHE-RSA-AES128-SHA256 --v 3 --l ECDHE-RSA-AES128-SHA256 - -# client TLSv1.2 ECDHE-RSA-AES128-SHA256 --v 3 --l ECDHE-RSA-AES128-SHA256 - -# server TLSv1.2 ECDHE-RSA-AES256 --v 3 --l ECDHE-RSA-AES256-SHA - -# client TLSv1.2 ECDHE-RSA-AES256 --v 3 --l ECDHE-RSA-AES256-SHA - -# server TLSv1 ECDHE-ECDSA-RC4 --v 1 --l ECDHE-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDHE-ECDSA-RC4 --v 1 --l ECDHE-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDHE-ECDSA-DES3 --v 1 --l ECDHE-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDHE-ECDSA-DES3 --v 1 --l ECDHE-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDHE-ECDSA-AES128 --v 1 --l ECDHE-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDHE-ECDSA-AES128 --v 1 --l ECDHE-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDHE-ECDSA-AES256 --v 1 --l ECDHE-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDHE-ECDSA-AES256 --v 1 --l ECDHE-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDHE-EDCSA-RC4 --v 2 --l ECDHE-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDHE-ECDSA-RC4 --v 2 --l ECDHE-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDHE-ECDSA-DES3 --v 2 --l ECDHE-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDHE-ECDSA-DES3 --v 2 --l ECDHE-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDHE-ECDSA-AES128 --v 2 --l ECDHE-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDHE-ECDSA-AES128 --v 2 --l ECDHE-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDHE-ECDSA-AES256 --v 2 --l ECDHE-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDHE-ECDSA-AES256 --v 2 --l ECDHE-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-RC4 --v 3 --l ECDHE-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-RC4 --v 3 --l ECDHE-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-DES3 --v 3 --l ECDHE-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-DES3 --v 3 --l ECDHE-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-AES128 --v 3 --l ECDHE-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES128 --v 3 --l ECDHE-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-AES128-SHA256 --v 3 --l ECDHE-ECDSA-AES128-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES128-SHA256 --v 3 --l ECDHE-ECDSA-AES128-SHA256 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-AES256 --v 3 --l ECDHE-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES256 --v 3 --l ECDHE-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDH-RSA-RC4 --v 1 --l ECDH-RSA-RC4-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-RSA-RC4 --v 1 --l ECDH-RSA-RC4-SHA - -# server TLSv1 ECDH-RSA-DES3 --v 1 --l ECDH-RSA-DES-CBC3-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-RSA-DES3 --v 1 --l ECDH-RSA-DES-CBC3-SHA - -# server TLSv1 ECDH-RSA-AES128 --v 1 --l ECDH-RSA-AES128-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-RSA-AES128 --v 1 --l ECDH-RSA-AES128-SHA - -# server TLSv1 ECDH-RSA-AES256 --v 1 --l ECDH-RSA-AES256-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-RSA-AES256 --v 1 --l ECDH-RSA-AES256-SHA - -# server TLSv1.1 ECDH-RSA-RC4 --v 2 --l ECDH-RSA-RC4-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-RSA-RC4 --v 2 --l ECDH-RSA-RC4-SHA - -# server TLSv1.1 ECDH-RSA-DES3 --v 2 --l ECDH-RSA-DES-CBC3-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-RSA-DES3 --v 2 --l ECDH-RSA-DES-CBC3-SHA - -# server TLSv1.1 ECDH-RSA-AES128 --v 2 --l ECDH-RSA-AES128-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-RSA-AES128 --v 2 --l ECDH-RSA-AES128-SHA - -# server TLSv1.1 ECDH-RSA-AES256 --v 2 --l ECDH-RSA-AES256-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-RSA-AES256 --v 2 --l ECDH-RSA-AES256-SHA - -# server TLSv1.2 ECDH-RSA-RC4 --v 3 --l ECDH-RSA-RC4-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-RC4 --v 3 --l ECDH-RSA-RC4-SHA - -# server TLSv1.2 ECDH-RSA-DES3 --v 3 --l ECDH-RSA-DES-CBC3-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-DES3 --v 3 --l ECDH-RSA-DES-CBC3-SHA - -# server TLSv1.2 ECDH-RSA-AES128 --v 3 --l ECDH-RSA-AES128-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES128 --v 3 --l ECDH-RSA-AES128-SHA - -# server TLSv1.2 ECDH-RSA-AES128-SHA256 --v 3 --l ECDH-RSA-AES128-SHA256 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES128-SHA256 --v 3 --l ECDH-RSA-AES128-SHA256 - -# server TLSv1.2 ECDH-RSA-AES256 --v 3 --l ECDH-RSA-AES256-SHA --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES256 --v 3 --l ECDH-RSA-AES256-SHA - -# server TLSv1 ECDH-ECDSA-RC4 --v 1 --l ECDH-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-ECDSA-RC4 --v 1 --l ECDH-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDH-ECDSA-DES3 --v 1 --l ECDH-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-ECDSA-DES3 --v 1 --l ECDH-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDH-ECDSA-AES128 --v 1 --l ECDH-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-ECDSA-AES128 --v 1 --l ECDH-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1 ECDH-ECDSA-AES256 --v 1 --l ECDH-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1 ECDH-ECDSA-AES256 --v 1 --l ECDH-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDH-EDCSA-RC4 --v 2 --l ECDH-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-ECDSA-RC4 --v 2 --l ECDH-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDH-ECDSA-DES3 --v 2 --l ECDH-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-ECDSA-DES3 --v 2 --l ECDH-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDH-ECDSA-AES128 --v 2 --l ECDH-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-ECDSA-AES128 --v 2 --l ECDH-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1.1 ECDH-ECDSA-AES256 --v 2 --l ECDH-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.1 ECDH-ECDSA-AES256 --v 2 --l ECDH-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-RC4 --v 3 --l ECDH-ECDSA-RC4-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-RC4 --v 3 --l ECDH-ECDSA-RC4-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-DES3 --v 3 --l ECDH-ECDSA-DES-CBC3-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-DES3 --v 3 --l ECDH-ECDSA-DES-CBC3-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-AES128 --v 3 --l ECDH-ECDSA-AES128-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES128 --v 3 --l ECDH-ECDSA-AES128-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-AES128-SHA256 --v 3 --l ECDH-ECDSA-AES128-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES128-SHA256 --v 3 --l ECDH-ECDSA-AES128-SHA256 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-AES256 --v 3 --l ECDH-ECDSA-AES256-SHA --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES256 --v 3 --l ECDH-ECDSA-AES256-SHA --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-RSA-AES256-SHA384 --v 3 --l ECDHE-RSA-AES256-SHA384 - -# client TLSv1.2 ECDHE-RSA-AES256-SHA384 --v 3 --l ECDHE-RSA-AES256-SHA384 - -# server TLSv1.2 ECDHE-ECDSA-AES256-SHA384 --v 3 --l ECDHE-ECDSA-AES256-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES256-SHA384 --v 3 --l ECDHE-ECDSA-AES256-SHA384 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-RSA-AES256-SHA384 --v 3 --l ECDH-RSA-AES256-SHA384 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES256-SHA384 --v 3 --l ECDH-RSA-AES256-SHA384 - -# server TLSv1.2 ECDH-ECDSA-AES256-SHA384 --v 3 --l ECDH-ECDSA-AES256-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES256-SHA384 --v 3 --l ECDH-ECDSA-AES256-SHA384 --A ./certs/server-ecc.pem - -# server TLSv1 HC128-SHA --v 1 --l HC128-SHA - -# client TLSv1 HC128-SHA --v 1 --l HC128-SHA - -# server TLSv1 HC128-MD5 --v 1 --l HC128-MD5 - -# client TLSv1 HC128-MD5 --v 1 --l HC128-MD5 - -# server TLSv1 HC128-B2B256 --v 1 --l HC128-B2B256 - -# client TLSv1 HC128-B2B256 --v 1 --l HC128-B2B256 - -# server TLSv1 AES128-B2B256 --v 1 --l AES128-B2B256 - -# client TLSv1 AES128-B2B256 --v 1 --l AES128-B2B256 - -# server TLSv1 AES256-B2B256 --v 1 --l AES256-B2B256 - -# client TLSv1 AES256-B2B256 --v 1 --l AES256-B2B256 - -# server TLSv1.1 HC128-SHA --v 2 --l HC128-SHA - -# client TLSv1.1 HC128-SHA --v 2 --l HC128-SHA - -# server TLSv1.1 HC128-MD5 --v 2 --l HC128-MD5 - -# client TLSv1.1 HC128-MD5 --v 2 --l HC128-MD5 - -# server TLSv1.1 HC128-B2B256 --v 2 --l HC128-B2B256 - -# client TLSv1.1 HC128-B2B256 --v 2 --l HC128-B2B256 - -# server TLSv1.1 AES128-B2B256 --v 2 --l AES128-B2B256 - -# client TLSv1.1 AES128-B2B256 --v 2 --l AES128-B2B256 - -# server TLSv1.1 AES256-B2B256 --v 2 --l AES256-B2B256 - -# client TLSv1.1 AES256-B2B256 --v 2 --l AES256-B2B256 - -# server TLSv1.2 HC128-SHA --v 3 --l HC128-SHA - -# client TLSv1.2 HC128-SHA --v 3 --l HC128-SHA - -# server TLSv1.2 HC128-MD5 --v 3 --l HC128-MD5 - -# client TLSv1.2 HC128-MD5 --v 3 --l HC128-MD5 - -# server TLSv1.2 HC128-B2B256 --v 3 --l HC128-B2B256 - -# client TLSv1.2 HC128-B2B256 --v 3 --l HC128-B2B256 - -# server TLSv1.2 AES128-B2B256 --v 3 --l AES128-B2B256 - -# client TLSv1.2 AES128-B2B256 --v 3 --l AES128-B2B256 - -# server TLSv1.2 AES256-B2B256 --v 3 --l AES256-B2B256 - -# client TLSv1.2 AES256-B2B256 --v 3 --l AES256-B2B256 - -# server TLSv1 RABBIT-SHA --v 1 --l RABBIT-SHA - -# client TLSv1 RABBIT-SHA --v 1 --l RABBIT-SHA - -# server TLSv1.1 RABBIT-SHA --v 2 --l RABBIT-SHA - -# client TLSv1.1 RABBIT-SHA --v 2 --l RABBIT-SHA - -# server TLSv1.2 RABBIT-SHA --v 3 --l RABBIT-SHA - -# client TLSv1.2 RABBIT-SHA --v 3 --l RABBIT-SHA - -# server TLSv1 NTRU_RC4 --v 1 --l NTRU-RC4-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1 NTRU_RC4 --v 1 --l NTRU-RC4-SHA - -# server TLSv1 NTRU_DES3 --v 1 --l NTRU-DES-CBC3-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1 NTRU_DES3 --v 1 --l NTRU-DES-CBC3-SHA - -# server TLSv1 NTRU_AES128 --v 1 --l NTRU-AES128-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1 NTRU_AES128 --v 1 --l NTRU-AES128-SHA - -# server TLSv1 NTRU_AES256 --v 1 --l NTRU-AES256-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1 NTRU_AES256 --v 1 --l NTRU-AES256-SHA - -# server TLSv1.1 NTRU_RC4 --v 2 --l NTRU-RC4-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.1 NTRU_RC4 --v 2 --l NTRU-RC4-SHA - -# server TLSv1.1 NTRU_DES3 --v 2 --l NTRU-DES-CBC3-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.1 NTRU_DES3 --v 2 --l NTRU-DES-CBC3-SHA - -# server TLSv1.1 NTRU_AES128 --v 2 --l NTRU-AES128-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.1 NTRU_AES128 --v 2 --l NTRU-AES128-SHA - -# server TLSv1.1 NTRU_AES256 --v 2 --l NTRU-AES256-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.1 NTRU_AES256 --v 2 --l NTRU-AES256-SHA - -# server TLSv1.2 NTRU_RC4 --v 3 --l NTRU-RC4-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.2 NTRU_RC4 --v 3 --l NTRU-RC4-SHA - -# server TLSv1.2 NTRU_DES3 --v 3 --l NTRU-DES-CBC3-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.2 NTRU_DES3 --v 3 --l NTRU-DES-CBC3-SHA - -# server TLSv1.2 NTRU_AES128 --v 3 --l NTRU-AES128-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.2 NTRU_AES128 --v 3 --l NTRU-AES128-SHA - -# server TLSv1.2 NTRU_AES256 --v 3 --l NTRU-AES256-SHA --n --c ./certs/ntru-cert.pem --k ./certs/ntru-key.raw - -# client TLSv1.2 NTRU_AES256 --v 3 --l NTRU-AES256-SHA - -# server TLSv1 DHE AES128 --v 1 --l DHE-RSA-AES128-SHA - -# client TLSv1 DHE AES128 --v 1 --l DHE-RSA-AES128-SHA - -# server TLSv1 DHE AES256 --v 1 --l DHE-RSA-AES256-SHA - -# client TLSv1 DHE AES256 --v 1 --l DHE-RSA-AES256-SHA - -# server TLSv1 DHE AES128-SHA256 --v 1 --l DHE-RSA-AES128-SHA256 - -# client TLSv1 DHE AES128-SHA256 --v 1 --l DHE-RSA-AES128-SHA256 - -# server TLSv1 DHE AES256-SHA256 --v 1 --l DHE-RSA-AES256-SHA256 - -# client TLSv1 DHE AES256-SHA256 --v 1 --l DHE-RSA-AES256-SHA256 - -# server TLSv1.1 DHE AES128 --v 2 --l DHE-RSA-AES128-SHA - -# client TLSv1.1 DHE AES128 --v 2 --l DHE-RSA-AES128-SHA - -# server TLSv1.1 DHE AES256 --v 2 --l DHE-RSA-AES256-SHA - -# client TLSv1.1 DHE AES256 --v 2 --l DHE-RSA-AES256-SHA - -# server TLSv1.1 DHE AES128-SHA256 --v 2 --l DHE-RSA-AES128-SHA256 - -# client TLSv1.1 DHE AES128-SHA256 --v 2 --l DHE-RSA-AES128-SHA256 - -# server TLSv1.1 DHE AES256-SHA256 --v 2 --l DHE-RSA-AES256-SHA256 - -# client TLSv1.1 DHE AES256-SHA256 --v 2 --l DHE-RSA-AES256-SHA256 - -# server TLSv1.2 DHE AES128 --v 3 --l DHE-RSA-AES128-SHA - -# client TLSv1.2 DHE AES128 --v 3 --l DHE-RSA-AES128-SHA - -# server TLSv1.2 DHE AES256 --v 3 --l DHE-RSA-AES256-SHA - -# client TLSv1.2 DHE AES256 --v 3 --l DHE-RSA-AES256-SHA - -# server TLSv1.2 DHE AES128-SHA256 --v 3 --l DHE-RSA-AES128-SHA256 - -# client TLSv1.2 DHE AES128-SHA256 --v 3 --l DHE-RSA-AES128-SHA256 - -# server TLSv1.2 DHE AES256-SHA256 --v 3 --l DHE-RSA-AES256-SHA256 - -# client TLSv1.2 DHE AES256-SHA256 --v 3 --l DHE-RSA-AES256-SHA256 - -# server TLSv1 PSK-AES128 --s --v 1 --l PSK-AES128-CBC-SHA - -# client TLSv1 PSK-AES128 --s --v 1 --l PSK-AES128-CBC-SHA - -# server TLSv1 PSK-AES256 --s --v 1 --l PSK-AES256-CBC-SHA - -# client TLSv1 PSK-AES256 --s --v 1 --l PSK-AES256-CBC-SHA - -# server TLSv1.1 PSK-AES128 --s --v 2 --l PSK-AES128-CBC-SHA - -# client TLSv1.1 PSK-AES128 --s --v 2 --l PSK-AES128-CBC-SHA - -# server TLSv1.1 PSK-AES256 --s --v 2 --l PSK-AES256-CBC-SHA - -# client TLSv1.1 PSK-AES256 --s --v 2 --l PSK-AES256-CBC-SHA - -# server TLSv1.2 PSK-AES128 --s --v 3 --l PSK-AES128-CBC-SHA - -# client TLSv1.2 PSK-AES128 --s --v 3 --l PSK-AES128-CBC-SHA - -# server TLSv1.2 PSK-AES256 --s --v 3 --l PSK-AES256-CBC-SHA - -# client TLSv1.2 PSK-AES256 --s --v 3 --l PSK-AES256-CBC-SHA - -# server TLSv1.2 PSK-AES128-SHA256 --s --v 3 --l PSK-AES128-CBC-SHA256 - -# client TLSv1.2 PSK-AES128-SHA256 --s --v 3 --l PSK-AES128-CBC-SHA256 - -# server TLSv1.0 PSK-NULL --s --v 1 --l PSK-NULL-SHA - -# client TLSv1.0 PSK-NULL --s --v 1 --l PSK-NULL-SHA - -# server TLSv1.1 PSK-NULL --s --v 2 --l PSK-NULL-SHA - -# client TLSv1.1 PSK-NULL --s --v 2 --l PSK-NULL-SHA - -# server TLSv1.2 PSK-NULL --s --v 3 --l PSK-NULL-SHA - -# client TLSv1.2 PSK-NULL --s --v 3 --l PSK-NULL-SHA - -# server TLSv1.2 PSK-NULL-SHA256 --s --v 3 --l PSK-NULL-SHA256 - -# client TLSv1.2 PSK-NULL-SHA256 --s --v 3 --l PSK-NULL-SHA256 - -# server TLSv1.2 PSK-NULL --s --v 3 --l PSK-NULL-SHA - -# client TLSv1.2 PSK-NULL --s --v 3 --l PSK-NULL-SHA - -# server TLSv1.2 PSK-NULL-SHA256 --s --v 3 --l PSK-NULL-SHA256 - -# client TLSv1.2 PSK-NULL-SHA256 --s --v 3 --l PSK-NULL-SHA256 - -# server TLSv1.0 RSA-NULL-SHA --v 1 --l NULL-SHA - -# client TLSv1.0 RSA-NULL-SHA --v 1 --l NULL-SHA - -# server TLSv1.1 RSA-NULL-SHA --v 2 --l NULL-SHA - -# client TLSv1.1 RSA-NULL-SHA --v 2 --l NULL-SHA - -# server TLSv1.2 RSA-NULL-SHA --v 3 --l NULL-SHA - -# client TLSv1.2 RSA-NULL-SHA --v 3 --l NULL-SHA - -# server TLSv1.0 RSA-NULL-SHA256 --v 1 --l NULL-SHA256 - -# client TLSv1.0 RSA-NULL-SHA256 --v 1 --l NULL-SHA256 - -# server TLSv1.1 RSA-NULL-SHA256 --v 2 --l NULL-SHA256 - -# client TLSv1.1 RSA-NULL-SHA256 --v 2 --l NULL-SHA256 - -# server TLSv1.2 RSA-NULL-SHA256 --v 3 --l NULL-SHA256 - -# client TLSv1.2 RSA-NULL-SHA256 --v 3 --l NULL-SHA256 - -# server TLSv1 CAMELLIA128-SHA --v 1 --l CAMELLIA128-SHA - -# client TLSv1 CAMELLIA128-SHA --v 1 --l CAMELLIA128-SHA - -# server TLSv1 CAMELLIA256-SHA --v 1 --l CAMELLIA256-SHA - -# client TLSv1 CAMELLIA256-SHA --v 1 --l CAMELLIA256-SHA - -# server TLSv1 CAMELLIA128-SHA256 --v 1 --l CAMELLIA128-SHA256 - -# client TLSv1 CAMELLIA128-SHA256 --v 1 --l CAMELLIA128-SHA256 - -# server TLSv1 CAMELLIA256-SHA256 --v 1 --l CAMELLIA256-SHA256 - -# client TLSv1 CAMELLIA256-SHA256 --v 1 --l CAMELLIA256-SHA256 - -# server TLSv1.1 CAMELLIA128-SHA --v 2 --l CAMELLIA128-SHA - -# client TLSv1.1 CAMELLIA128-SHA --v 2 --l CAMELLIA128-SHA - -# server TLSv1.1 CAMELLIA256-SHA --v 2 --l CAMELLIA256-SHA - -# client TLSv1.1 CAMELLIA256-SHA --v 2 --l CAMELLIA256-SHA - -# server TLSv1.1 CAMELLIA128-SHA256 --v 2 --l CAMELLIA128-SHA256 - -# client TLSv1.1 CAMELLIA128-SHA256 --v 2 --l CAMELLIA128-SHA256 - -# server TLSv1.1 CAMELLIA256-SHA256 --v 2 --l CAMELLIA256-SHA256 - -# client TLSv1.1 CAMELLIA256-SHA256 --v 2 --l CAMELLIA256-SHA256 - -# server TLSv1.2 CAMELLIA128-SHA --v 3 --l CAMELLIA128-SHA - -# client TLSv1.2 CAMELLIA128-SHA --v 3 --l CAMELLIA128-SHA - -# server TLSv1.2 CAMELLIA256-SHA --v 3 --l CAMELLIA256-SHA - -# client TLSv1.2 CAMELLIA256-SHA --v 3 --l CAMELLIA256-SHA - -# server TLSv1.2 CAMELLIA128-SHA256 --v 3 --l CAMELLIA128-SHA256 - -# client TLSv1.2 CAMELLIA128-SHA256 --v 3 --l CAMELLIA128-SHA256 - -# server TLSv1.2 CAMELLIA256-SHA256 --v 3 --l CAMELLIA256-SHA256 - -# client TLSv1.2 CAMELLIA256-SHA256 --v 3 --l CAMELLIA256-SHA256 - -# server TLSv1 DHE-RSA-CAMELLIA128-SHA --v 1 --l DHE-RSA-CAMELLIA128-SHA - -# client TLSv1 DHE-RSA-CAMELLIA128-SHA --v 1 --l DHE-RSA-CAMELLIA128-SHA - -# server TLSv1 DHE-RSA-CAMELLIA256-SHA --v 1 --l DHE-RSA-CAMELLIA256-SHA - -# client TLSv1 DHE-RSA-CAMELLIA256-SHA --v 1 --l DHE-RSA-CAMELLIA256-SHA - -# server TLSv1 DHE-RSA-CAMELLIA128-SHA256 --v 1 --l DHE-RSA-CAMELLIA128-SHA256 - -# client TLSv1 DHE-RSA-CAMELLIA128-SHA256 --v 1 --l DHE-RSA-CAMELLIA128-SHA256 - -# server TLSv1 DHE-RSA-CAMELLIA256-SHA256 --v 1 --l DHE-RSA-CAMELLIA256-SHA256 - -# client TLSv1 DHE-RSA-CAMELLIA256-SHA256 --v 1 --l DHE-RSA-CAMELLIA256-SHA256 - -# server TLSv1.1 DHE-RSA-CAMELLIA128-SHA --v 2 --l DHE-RSA-CAMELLIA128-SHA - -# client TLSv1.1 DHE-RSA-CAMELLIA128-SHA --v 2 --l DHE-RSA-CAMELLIA128-SHA - -# server TLSv1.1 DHE-RSA-CAMELLIA256-SHA --v 2 --l DHE-RSA-CAMELLIA256-SHA - -# client TLSv1.1 DHE-RSA-CAMELLIA256-SHA --v 2 --l DHE-RSA-CAMELLIA256-SHA - -# server TLSv1.1 DHE-RSA-CAMELLIA128-SHA256 --v 2 --l DHE-RSA-CAMELLIA128-SHA256 - -# client TLSv1.1 DHE-RSA-CAMELLIA128-SHA256 --v 2 --l DHE-RSA-CAMELLIA128-SHA256 - -# server TLSv1.1 DHE-RSA-CAMELLIA256-SHA256 --v 2 --l DHE-RSA-CAMELLIA256-SHA256 - -# client TLSv1.1 DHE-RSA-CAMELLIA256-SHA256 --v 2 --l DHE-RSA-CAMELLIA256-SHA256 - -# server TLSv1.2 DHE-RSA-CAMELLIA128-SHA --v 3 --l DHE-RSA-CAMELLIA128-SHA - -# client TLSv1.2 DHE-RSA-CAMELLIA128-SHA --v 3 --l DHE-RSA-CAMELLIA128-SHA - -# server TLSv1.2 DHE-RSA-CAMELLIA256-SHA --v 3 --l DHE-RSA-CAMELLIA256-SHA - -# client TLSv1.2 DHE-RSA-CAMELLIA256-SHA --v 3 --l DHE-RSA-CAMELLIA256-SHA - -# server TLSv1.2 DHE-RSA-CAMELLIA128-SHA256 --v 3 --l DHE-RSA-CAMELLIA128-SHA256 - -# client TLSv1.2 DHE-RSA-CAMELLIA128-SHA256 --v 3 --l DHE-RSA-CAMELLIA128-SHA256 - -# server TLSv1.2 DHE-RSA-CAMELLIA256-SHA256 --v 3 --l DHE-RSA-CAMELLIA256-SHA256 - -# client TLSv1.2 DHE-RSA-CAMELLIA256-SHA256 --v 3 --l DHE-RSA-CAMELLIA256-SHA256 - -# server TLSv1.2 RSA-AES128-GCM-SHA256 --v 3 --l AES128-GCM-SHA256 - -# client TLSv1.2 RSA-AES128-GCM-SHA256 --v 3 --l AES128-GCM-SHA256 - -# server TLSv1.2 RSA-AES256-GCM-SHA384 --v 3 --l AES256-GCM-SHA384 - -# client TLSv1.2 RSA-AES256-GCM-SHA384 --v 3 --l AES256-GCM-SHA384 - -# server TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 --v 3 --l ECDHE-ECDSA-AES128-GCM-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 --v 3 --l ECDHE-ECDSA-AES128-GCM-SHA256 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 --v 3 --l ECDHE-ECDSA-AES256-GCM-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 --v 3 --l ECDHE-ECDSA-AES256-GCM-SHA384 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 --v 3 --l ECDH-ECDSA-AES128-GCM-SHA256 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES128-GCM-SHA256 --v 3 --l ECDH-ECDSA-AES128-GCM-SHA256 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 --v 3 --l ECDH-ECDSA-AES256-GCM-SHA384 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-ECDSA-AES256-GCM-SHA384 --v 3 --l ECDH-ECDSA-AES256-GCM-SHA384 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 --v 3 --l ECDHE-RSA-AES128-GCM-SHA256 - -# client TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 --v 3 --l ECDHE-RSA-AES128-GCM-SHA256 - -# server TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 --v 3 --l ECDHE-RSA-AES256-GCM-SHA384 - -# client TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 --v 3 --l ECDHE-RSA-AES256-GCM-SHA384 - -# server TLSv1.2 ECDH-RSA-AES128-GCM-SHA256 --v 3 --l ECDH-RSA-AES128-GCM-SHA256 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES128-GCM-SHA256 --v 3 --l ECDH-RSA-AES128-GCM-SHA256 - -# server TLSv1.2 ECDH-RSA-AES256-GCM-SHA384 --v 3 --l ECDH-RSA-AES256-GCM-SHA384 --c ./certs/server-ecc-rsa.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDH-RSA-AES256-GCM-SHA384 --v 3 --l ECDH-RSA-AES256-GCM-SHA384 - -# server TLSv1.2 DHE-RSA-AES128-GCM-SHA256 --v 3 --l DHE-RSA-AES128-GCM-SHA256 - -# client TLSv1.2 DHE-RSA-AES128-GCM-SHA256 --v 3 --l DHE-RSA-AES128-GCM-SHA256 - -# server TLSv1.2 DHE-RSA-AES256-GCM-SHA384 --v 3 --l DHE-RSA-AES256-GCM-SHA384 - -# client TLSv1.2 DHE-RSA-AES256-GCM-SHA384 --v 3 --l DHE-RSA-AES256-GCM-SHA384 - -# server TLSv1.2 AES128-CCM-8 --v 3 --l AES128-CCM-8 - -# client TLSv1.2 AES128-CCM-8 --v 3 --l AES128-CCM-8 - -# server TLSv1.2 AES256-CCM-8 --v 3 --l AES256-CCM-8 - -# client TLSv1.2 AES256-CCM-8 --v 3 --l AES256-CCM-8 - -# server TLSv1.2 ECDHE-ECDSA-AES128-CCM-8 --v 3 --l ECDHE-ECDSA-AES128-CCM-8 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES128-CCM-8 --v 3 --l ECDHE-ECDSA-AES128-CCM-8 --A ./certs/server-ecc.pem - -# server TLSv1.2 ECDHE-ECDSA-AES256-CCM-8 --v 3 --l ECDHE-ECDSA-AES256-CCM-8 --c ./certs/server-ecc.pem --k ./certs/ecc-key.pem - -# client TLSv1.2 ECDHE-ECDSA-AES256-CCM-8 --v 3 --l ECDHE-ECDSA-AES256-CCM-8 --A ./certs/server-ecc.pem - -# server TLSv1.2 PSK-AES128-CCM-8 --s --v 3 --l PSK-AES128-CCM-8 - -# client TLSv1.2 AES128-CCM-8 --s --v 3 --l PSK-AES128-CCM-8 - -# server TLSv1.2 PSK-AES256-CCM-8 --s --v 3 --l PSK-AES256-CCM-8 - -# client TLSv1.2 AES256-CCM-8 --s --v 3 --l PSK-AES256-CCM-8 - diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-api.o b/project1/cyassl-3.0.0/tests/tests_unit_test-api.o deleted file mode 100644 index 1c38234fc67b3cd22c1484d00d8d84339899b909..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19712 zcmd5@eSB2Kxt>6PY>WmG1O;V*Re}v6n}m>1v4JFfXoQ#qg@PTPS)>dk$gIWuR^p4|l0{&5e# z+4gj#FgB&N0w(A<+8H<eVkr$Fiden zO^IuaR%PhBO-da+apYWdD|^r-PsWuz99ME%T*;=mlBT$ltK&*8iz_LNE14WuGD??( zyE{J$Wt&4x4lA$pB)d2~Ij+tFp^19v;q|WM-f{Sy7VF*KK%~SqlI{YUj*8bC&NI9& zbwZ2Qo2a$yCz*X&b!rXLv~W*nUwX%5urz$Jp_l_o@7RkHv-6Z5n8ndxQ0bF}a368M zd}7y_ek2%cUB*m)cw$3;Qq-g3qZ;%_2vZ^t6590M3vJFjJC^IQe8nMF zj6RhiX7(p#8)9;toPCI|pZ%4F_yS!OGmG7v3Y~q{Swy)piyx0Nr(wM-PU7Y8hbN9f z0wH9tGv>~H1T(XbI?P_onb1KaXK!na46D@OX^E8ZvmX`QUu=HW`eX#|4(KzDNrpo7 zmBPMMCZ>1Xd=iOJ$Os#)78w$%x2Vi?g&SPMrHnPn!_RlV7g~-)OS31jUJ`mMOy9`X z@AR3L^qyf<^$v{{(GGd%6^JHE@u*#>9Uj&;>nNa2=MQMp$SnXkJ zK&pVQSusR^OUjfjp>2fwx@T4VL83mQ~yZVr^-MIzNH0yRJvd{GZih4R+TjbMD-gcLL% zJO`56Md6-Eha58o({+m+cGq?nhkRlx#8633pi){E*(<9M4$0<(>t$c>W-vz7VW`7t zCLOd9XgEcsKZe(`6p_-%b4RgWQ0IXSW4lX|8-*5#oki{YXiL-o?H`YB@%LV0 zD3p_C^ore7SDEX)a2Yz&>kQ0_aF+!&vHJD6Ow_5RmI>vqo}v_tN-(AvL}pC2zq>qq zEc}u+sNe$EaLA@#bs&98iL1!)r1+?)Iyp2qw)4&d=^aNoJ0X`7CYMCY(;`K~BO+Yo zN|C-wGv=WdI*SGg!WCXlDF+@gQl~_9t1_CY z^CB8@Rt8ENC(`C%Pf9I9V`A?_CXKZuRwvR%uJCZ08Ksy4Gi|sHO5d^)z3Lc7Z8U8< zTu)&LbViqP3w>#LltFml)H$2ufMGJ_rF=?E`2R0dnlag9U5)j$a)qs6m_kJgdY2)9 zXwdavM^($U=wqGiL$22`OYmYW!Ru&*6foSGy)uOuTFr(UJ)aTcfQI5-RI)g2U3Z)FlF5x$;QqI^(uX`jex=kbwG8S=IeyO7^pGU z!G@`6($ox_spdKm-JdYN%~WFiTT+R>GL_R~Tp47%n57ohdyOi!x4M47R(buj+AvTn zSeBBYoy8h+9&r|7TB}1!%2|Yaztox$?nz(*-L&oBXL|hnO0(4gEc;=Ar~}x@eq*_s z$K@)+x?JHUg~`GTx7*dN#r(al8&Iec!`vi;%kH4g*)vZrVwRcCL$R7#vuy( zG8#YM{y7%67nlY{lt+b_$X21>or=(3AcQE-Fc!8U=nu)LbK-gA4c<*STD+TZq$jrh zy{|7~I6y}QJjE*c{-?%h+Gc$>F`mD)lJmMzTWj==YWJX&6SJ-PeP~VJh=guS(1i zT43u$MTqns)(CCCo@eDnjL)TAg?VQ;@`V^34zxTRptmh&|7v803H>e)hX!ob-}2Bs zP%94JoKKqzVjY70kd~CM4$+qjBP{>d{7jLo?$YG5;~jJ#?&){1U%&vYPyHmh{K&GE zQ_Km_Io{#g1s1u*^#A}nssi-o>$WF1ZNB2^AuBF&)@;4B?R$YwN9|nt%U37u-u;2&aQ6IH zcTT%w{Kd`@ch47R`2R3;-2Ne#%s8)YVddmMdC!0P*|B@?UcR#Ar9rb=Ut95)yC2;# z_N?6(-?8w%58Lni$?*|afWNxqO4Nd;B58<15N&*(ze>y(9q#PR?ie6Ul4=!2I{k_MQW-O7fWUW1)9vl0D_{jvdmMtxVX5q zvQiYcc}a__mUtSPyfq&9qQ15b_toA|J&ehy4z0^{PE0VgiJ8vqDXI@x-qL_x1k9O0 zCt3Bj1brU5y}q^{N`0PMm}^%XJ2_BIqvkFsE3H~uUg{|?y?lyYV|jCZE3{qaYa2kJ za(6;~4L-ltxwg4J@>i z8yTEtar!AZ#}=Up2V>JXuyd5cft=&cnUR%^e{K<~4mhiu{C;0`NJW}3LQ-ag5%|HT z>NP%HohpL95KEc@A!k)_xo6>`lG3u-OI7Ps;cs#x6Pw$dwaBQ|O~H`t!&_bLLjxn2 zttu)Pc`8a5SC-B$DXB1Z(5hASejWT$LqmNqY({HPs{(H(v z)Cvx1&B;wvQ_`>DswROAbZ>Ek&+Bgqm|pQL@YjdHoTXU%W|uE;R`Gc+tb2tC*z|nG z%Q?qaSMRszx9Q`S!ee>la9XhfdK>gUq^Tu@tr6#0wzSJ9eCSbu-`^B+RyX_bVCO?8 zmf0nE|>_*#F7eTe^>HpLi|q-vayiPpy5_0@+@rndOmW?@%t8R=?|M zKUw>xRUt3p1se*Z#VN{LmKWXAskOI9i0n^g(3c+H0PWTI2DW#A_I7(0uWIp!TCmUX z`s<;C{G3GuSB zD=%jo{ApxXv#%jb=1Nv|Q)44GS0ZawFetK+O}?yo3l~ofhP>5lL{@NhFw`9KuEL$h zwnoXDn`*ovugEff8;nBkEO$Qi%UZ=_r)ogPFP%6u68z4}i+{iQ;8=Mpf8hW_UX*dD zd&0&`@NigmXEUt;a1CeaZmj@s+w|t zWFZsl*v z@aG(bvJk&6QGW-kIc0dU*wT%Z3&$W{H&h_t?=+?UnW#U4`f|lv z!OwxiD8~L9!OsI{IFWAyF9$DC{4VhA;9CDf;BSFzeUBg^^5NK2CI8>>PZ9W8imwN+ z1V2;px!^V6dOT~Pi?(We7ok3g`teGB7Wj9-M<^Zy-(}%Tz<&zvRP|o)W8j=~j^`Ti zw=D9FDE}DT$m1cR36A(2T-);u?8$}<59`^U-)7SAqwBwc^0DA>gRK7}+D-)5_7B4S zO#Ga$>QBS{68va=%TUffb^99dRtw(@!{(t(+g}I$Jh;~S_ke#FTM31XyH4->%sAt>$3eJ@OBG-6Z~Eae;M}P4p}@pr2MUzyC+ev z^9jqCcmZ73{{!+IllI4BkS~N!^mw^E@-o^F6FV{A{Bx)2C`&?A?f@SSdCHM*1up_O z;%S(;349~?G*$lz_~YQZ{a?WuV_N=g@NE2O`Q5PR80^*gG!?Q==*ranfpcw{rT7-` zt+>Bf@nhgeE&N4r{*~L;RsC4>RSs^%+c0q!_*QVO?`HUiR}p@a@Dxu)>~56zSjqjvk>Y{zEngGdNHhD~$d9i-AjnB35*G*|d-_LD) zlWjaBZJg_pzS!Sgw(->=-t@)#e4D>tx5^4 z{k?6g=Lb}MvA_A60Lf3c+4HHb{RCS*pTqiM`~R}ZAGPr#HlAm*=OLT^*|vK5Vz0lp z%nsC7;ao&`=9Mj)GrP>QXztv~(kf5Y>^Wtn9+6dswU5g~n-vdigirh9MhszNBOevZ*V<$&{{lN9z-| z&xzLC4%oDYT&qMv9eGg++i{!LG2JSWP)9x`5*@y26*DN1=nPH^NUtV3iqisxmM&rr zES10vZG-%jh66DrFKKPF&j&fqdajn2Cdm_2qmnT(BgdG$mg-t9rsebX&5S%%Wfn|V zsx@kX{CuS?utuxPpP?G(n}MYZ7+^Gz5=6ZA%Q&5`0;-|4L5pUq8&jDM<@_AgSSu?K za_GkFNLM5}`m?$!!Fj$mL`DidX7O&+v+is<1eUwAl@;!6+9gZ0#nb5{dU|@ybR|4b zQ<8bgt?q1kL~1ijw5Rj5v+`yLW^Yw>pu*>^X*2w5!jdwRjzr%g>Cu0AIh20uLsl-e0H8lPd&=99-QJs%cv57amV_ zs4d|0tm2n!J&1e(h5X>Ss?G0h^a*@F4|%*bHO<2KfGL9YbvR|Se0&uA#wd&ri)>6e z*)(8Gpr^3~=Wgs{jnG9nx32LhO}fkwYw=4#TMvULiPC7dsb6>K)&q0vp}O_r;w}*0RZYzyJz%Xr$8ELE$T2OWd(6?=a;6)p zr~*%=m}-Q*IQ9yucsb#@fn%W%PGIu)g}9LXGUJTHF;R#DmOpH~A0^|(crNQ9R8E|X zvnL`B8`dbf01+?M+*dmAQni`<79qBf<8Wj<`EA(OkrxTEoBTUM>?NO#^Eq<7Ogu|I z2WJ)Jw;Jzsj$$ExPrglv*I8d8#QWr1h4?#pDSlx;ntU_PUx5x7JA%9g<0PMF>~E7p zLR>_S%~w9_BREeW$4lZua*X$z#C3SLA!0DCtj9~-26FgmI}vhsu^ca-yA^+oh<48s z(e7ncenR12i5u{aNJPKG1{w0BfsPr*ySM{RuOP?f&OjCscRTqqA?_nbf4j-QDa2!n^Q?{iJx#Bz!)4fd6ee7rjo zrwMU65&hQ@v+x z|Bz!mLx+H0hw}v@=fcX#s5J>Kc@{fXo=#S?{ zR}90@4po@+zFu5Gygis{C>y+EudLB}BF2YlzU>sdyI=dU<|K`R@ZA z7vQW)@qK5O#5Zv#-e-Z1@yIW7 z^xH)~0cV1WKS{2Gz~o){ zoAAmil1HXs(BkmR=gZK!ZQ^XxuKY@;Ou&xl##V{z6?90$J>&%-$u@m$P5aTLDY0XgnRiT7fC1#)~xS-%4Rv6JN(&)F!xi0CIJ-6$Up zq~EfMd-2>N!fzc!_-z;Q9_S$=PJT{AeEfpA8S_iTeDlBKFdoJO9e5_V$ua-)h?xJS zEMI{2g&cmUCt}{OCAMOIiJ130f%NkOMELm;BK-U~aikDGBf_6Q2U5?AMELVfApQ9n zIsBD;CgjRs50K-XOneOc5SGJ_W#sVV)#UKwwdC;QW^(xPE^_$s*F^a7ILqP3H^||~ zVc7Uk?=&FGXOP2>R}taI79#w(hX_CZk_bQki3mTwM}!~QmVUf|2tUpz!jCI}^kaY= ze%wriAGfj`d2}Z^#=nmUKkg^OkB5oy;~PLnGWsD7#(K+g$Pb1O9YYXTK=L!mQ}Eq_ z2>D4w$mgp1LUPE@R(u{ga%>S1@=J-3uUGX=6?hdgxE$Lio8(u_mexY zE-L;6d8!Zx74IhADa5Z>j<|S*h`9JY5pnS*5kKz}5f>i;Ij%vtXI!KLY3E2H>~ygl z^%s%D&K$)H$PvqPh{%yLBJ8YE_1`3iovRcNki*V(ir+wloworQhkM8ohev>1x8Ee+ zCB(Z##9=zd!1a0*knuN#9Pv1ld^GZq9P#KOcVb;9M?Bt6?8JFC5%YYMh&Vb1c_g8Y1HEdg2y5w}>4=+)qTjJql#J{e&FyuMpee ze_|{Ca|01}48mN{&uK*Xc^r`P6Um3b-->6GBS#B}ke@?@e1)oCLJs+rir11O=ln#- zuOmW!i>kks9P+m-eh)cvYc~<`_Bavq_>`)DmK^igt@u%L%;Rf{|Cx9v@`mN;@1I2U z$Jpa|(t+%6wBqNHBW@-W5jSok`YTlR-ylbS^Aul9j{dGzd=(M>tpze}c94G;`vagO zfaetXqj+u;e~9&ixKoI?iQBR6;u*ts=K}ejH4#WVbBJs4{9^fqh$rG?d?O~F5C5_r zayJ6mejCfteupamKJhxtJIm4j86w*E5Yhf6AlttWWP35zXrBUP`55B$$TyaweI^m@ q^NDDG36OG2foxyRa`eAOm9Hgkz&B}@qkSh4?Y~V#`#V^V_WuWoB(|9V diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-hash.o b/project1/cyassl-3.0.0/tests/tests_unit_test-hash.o deleted file mode 100644 index 677484123a0c362d9835b8e18f317d54687efc53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7408 zcmbtY4_H)H7C*#@V5VsPtEiqe8XAtk42s1f;D7@Tg8cEn;S)wchk=+O#n2?Qnr5l3 zv`<|z%WeB(ncub**;e=`-P%f5x6LwZ+wxlrD%sD}zD)La-h21)W)$5%@Ao}^=XcM! z=iGDNz4zVWo=j&}SXfv%X)TPxDNGRH%Kj>`DG*EjsV@~y&p*y|PUCJK*WAR!Z!#Z0 z+tt-|{3w&Xt55kNRYkiTVld>25QDT3gOTtWe_f+vO$;JPqj%2vJsWBo9(c1T&vnRdmH`a>wb!0Gc#4SnH%J1zHUJFef|{nEjQcEHU7PRpV=gO0#1xcKkMJm z_I{fgaU$8jvM5%!)eUOS4QqPmY}3Bzgtn$%O#Tm6tZz4+KI%W-xQ9!5N6DOdyVc6R z&!h0@>+5AEh!w48F$ms=X;qCG1g)--bctsWn+zQ=F32XN@@c9~3ZUChn(jxb{7Tiv zsrYFySBR{USdITgv(GFcO5Z;0!EG+`?`-cA=$GLyGWTuT8y(0xgPKI5mU^-L?ru4d zby6u=oKi9lAW9Y;fP?0o(fj{=#GM=mmR&30`6k1-l+v zJ-r?ZCb5m(oG;eJ>bCx?8@bPIj&0Q{ujcDB$G2Yu{hwhdS{LF4N( zdAWr2B?K}%3=4*%c4rT7%?>5|uoauSv*&aT*}HLE1!dm^J;CWPJ;xaB1xb<6;6<5( zHb<;(7YAK@jA~;GvPsr$QecyosM^@s=51w7Y=y*Ybddl1fW;rD?h;I*FJ5(||Hl9{ zNPQ;CiSanT^gLS&PIPtEEyp4W^wYPSYN=JCbsAgD!EgtcN^>KW`K(M0WS!M?4mCv3 z-n*_j4|~tlwC_7CN35o!Y6*S1xaO?Xl*9*<%x)@01S^29>!MmRD3RTI{a!RM*^D>-E*$wPb1iGD^>wWY5f+ z?8wfU;>?|zmp`qbu&8+YjG41$_dF;*A<=3}8aF<90{z{$b=|=wpZxf=9256Mddm}} ztGbOYOQIRyoqX!nuih!!ty-6AkGcJzXUDdjCx4nY>e#WYnog20vt71>%ZxA6 zi*qI(`CCEx(p^n0V+Y^xOyT-FMs6l^^CJ0RL~`q~wvmtZO`ShsOUl=?%DRS^pX&JT zAJ-g-*hyE0G|F);bkXx6jU1IyQH874MUSqjT{bTHjhL%XK6GYq;A{&msgQkAS+!Iz zOG{*rPg+=AD|xDY6_uXyiB#8jY3icwuY`a5tS6z*yw{TH=&x=x{ViL;^@E%b9BJKW zJ#qZyQ|C>YGdOR?oB;iB_KQWw+Q&Y1&^P3x&Q)J*9I>IHo(9hIX1xBwfDazovf<=| zPu`tZ+F5sqmZUy+!?>0GvR3D|wjX$;@tIMxq5`RBcHZmv)~$^s)Tt*R=fSZ1;QRU*1l%ZpXb-<_^iY`{O4Ej-G8FJ))y5mv$^2^7g}F z`@c<3Py2k{wwrF=9xiWreCV=`e~#{w|4V~kq*sR~+*jPIw(Q@5wpV{1|J#Q;v)&@w zZga|qk0ck)efFgfU%ImM)(5WNMejEK=9!V-jCWfS_n)RYpY6s9;9WS^`U)K**E)upnVEZDv-%jBuWW4u1ObTL`H6<%MhPhJ2? zV11RsYpZ!US=7HOW1|F1!Z^5Bv>F$y=F-SN%lL+a->OQp;qNNGdTC9$QbJ~%DA5Vr zd=1_i*7#MLj_r8Z0*#C1-)is$6$yWQ>nSa_ zFVQAVW?&m`{2PU3;i3a}!&sp;F+Zdily4iZn(^r4eEDax$hQJA`xEnvhQWFf4E=nQ zXL_ZE?1S5L_+6f-ippQM;fM8x;dF+7zZ;s+rJ+ycz-qR;p9QT6y8>`g6ILC@wJsVj zo!#Dshx6b$=HM~N_!w5A4a5_MEVF?U z9^PNf7XZ@?dM;v3&$xVj*BjI55z*h5BLB!U=ilbd>42;4lu$00R9=KAvphIi^tB^>=!|P z5NVtP@_61?v+&LnG<^wV(YWT>A-pJrXJVXaY|nc~H0Fmw_>2&q8^YT|_~#+KHH2>q z;X_4mAjju-EgEy)SE4b`2+4=|vf&+DA$uz0$4Rz>{Dhk>{!ioRA`L z%8Fp6Y)_>xw=9Y96xZN-<654Hz%4*>}pC8AqJbgPJN713=Xa~p>UdQq0eu6i$_I&PPT z9C(F=F5eVay&`Hcxz`xcCMsYP6|nIf6t~{)1)_RZQ?rS=*~Hvz_}KA%q))E;or$_x zJr7N|kc>uuRJ?khiNc3jxg(%|3ippCDr6jie+dKG-p$-XW{$&ut;V-7 zzlCV4#`zqNiX-Jbii#zAPwW4L`)?)sk`dSGZ?yg&m}7FMH9i3Ql;_XiZvI9NXT&)* zkrC%zHY3ipQpO0PDn^`p_cP)S`3NIEx?36h5WT{Pq8tXA>^K7%9jFg{njX;j`6p-V*z<4#$UPi<@z=%uq37{zpXF75=#2O-97|lo4^xF(OU|-XX_v z069(p;|)YLjEJ+0@kXLGjEJ*|QG!24#Q6ZoaeiP#oB>!19LK_lI0cM|!!67PSwnOy P9IskIyix`63KaYw8SLO^ diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-suites.o b/project1/cyassl-3.0.0/tests/tests_unit_test-suites.o deleted file mode 100644 index 51ae29ae8b38becbf7cfad2c54ce7306b2439784..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7408 zcma)A3vgUj89qsF(f=K+nbI-{>c;1=2 z|M|}UJpXz9cW?3e`ztCcs)TwfM3tz}0Ce989_W^&Rn&`GF>vMhtIq)+V&A6my;Ppe z61awS=-ru_naMuObo;EPNyi#>9jh6*$(^wFK_qgp&uVo9el2^@PJx;O>8K;sw0dsJ zmF5~I?uW*~32O?3QI&bQLoyES1}8sZJqD7SYRKh5l}=?rr_VCnZVT>ePC=&^WogXH z+6`dOT1)qoy3CiTbWV-$VnS2}Zp>;{gJ(vN1cOGr z@Vb@sen`lk+|h`={)& zc4uDp*!=XRg<)b%wd(k$+dsHJn}Ox@N_S!>efMieom1|S>3H^7UAiqlXqmZZcS}!w zPrE=3-<)dLHPz$#VgAVU#qJTeZ+lyB=hXCtALXN7`+&||rGv4z-nvXQY^TBOd##f( ztIatf`%bG!cB~_h{Qs!D6i}mKs?Dqc@%!A#IQEku;X< z_X*3u_Q~(G1PDTFhPKE(?(Vdnr^I)guJ&2-SMzN&Sd~pdqezjSWo&kC z(#Z*nrv@C>OsYx3b?+I)68H9ny5t)kny``(&P_SjOn#{{JG1b8^V0)E`qZPzK5IU# zV51m3guNuoH0EaqD`ol~G_Xc^`XC^A2r1vlpFD-q9hfc|X@McnoAf+AB34MR!h$>j zy_8N@mrhD?t>jgCrf3g~_I09tRGi1@Wqrt6(GhksnMj(EWMafjg_6-x$7~7L2?wmy zBL23Aomi?Pl!!-)Iz1duIMI;3!c3>4@gXy8M}p~?V@9Ge+iXeIiKIx!gPQ@Igqaw% zQy)fMrBu~;JH*gAyG=}5#*!h{_Rn=-;WQ725ql}MN)!T6XNOb(?- z?6{L^Gb4#)hygHKGntMRN;$!#Q=FlYC#lR9NqPze zd1T(Sw>in6`B5sS4}<$q??Qxv@db`KWMh=Yjzi8i&tEzf9KtLP2a|C-l`=Q=ul4(` zD;l7e#(+$3B#7A!7ctTFQuq=4U>qyO42Hv|Gi+n}hN2;JG?8@7czR?rQWl8?F?$Kq zGo9~`|*n;qc<(P`Xbyr7sduLj5y3AH5IFwp+h0pKn8Sn+V zx)(*F@nCGB*}6HHvcrhZ^!u;8j5-U2=t$bJ4hM@uU=NOP2Z)Z%sg&qIO6-m`>o&Gy z`Gjs19jW1zlXQZc(b9BmMB;GJ3Bpc-l+4bK&ZT9zBp)9I=75Q_NK`8!e$!rCrvQlj zC<3KSZJ}E{-6VtwCPm4k9FNY`3ZqJp&(|Svl4_G^dyQyQUd!DFIn67Uy9R*v7qb%& z4KQOR ze;F|Ub2wY!brAd;+Lpor;7Z77d_VBnz*_&8XfMReJkZ`=P_C_06}}DB#LGV_$bS}e z30`kr=ZL?c?ZbN}Uh?()en#SI+-07==f7Iq4ZH#G0>%Fx=&g9Mtf5~mc7fiD_jH8= zh;0gOFP>`g3gUkW*vn_Nco7(iv-rEfCNSfmy{mvX0MApHYm;S;=Chu@7g)#lFSPkZ z(x&7eM4QRi`m8D1@t!F8b3_P~kC#6~Tnye)tS<|1B_db~-2%T#d>?$uvYY>J{TH|z zZErrR#ED>VziZqA%(b9#2XF(h*8d{fe%Lqy0s1R`s@{ibrSMeANQyCnE_$kDWQC3@ zF}DEFs=`UaJn&%*Cu5;K;6eFI-e4JK?WP~{xj*$o{6`K+yxU($2Z99W36OthnSWIa%MuRNaZx=TSmR&c z+v5+c@9!V*4F(2#di}nD=m>5qMe;0!rEO#Qnr1gh&XmEhJtEqG#(ZsvS=5u91M#{D3(akgRCf) z3WSxiM>RelIE*@8<7FbUHHo4ck=UWMW6R<(5JJ5}b2`xTwfJHYDT%VPOLI6@>2V1? z#tz!&FdgnDLOkoG{J|7R^D*b^_iU1Y%KqD0!kwMLcn( zos34t`r$!!cB3;c%gLh7F2NdCcBHl>H=zCg(V~*$cY-&D#T*sGS*$yjh_&&kGZ-4Z z0x2F7MTIy5#z#fK8J5Z48jPYH8VwMsWzc<|wu0oxRr-obb#X%?8rKH;k@Q(N-b&*N zKrmg)<43w5F1HxiSk>)K;dD7*5bm+km6#SU_a!3L5#zGAF)q} zCx}tN@eU^cbz)r1JcEdNHqg!->`7xW{DRiv;yi;G{BuZG2+_@c)JrRg`-Qx-*#CK8 z#(N9-*t{+&ipaZ^+_#9apMOZaQi#V%R|)Y9X^#*ukX|grYovWRA0ca8B!o$dgZ^gF z+PU7DU|cT5-NYzHA0Qw29mTK1HATD*w91dV7_=6b;uiMz3b6tgsPS3c>!7ut7UF7R zjPC|e%5PymWWUV*3x(LO`tM~w-W{rcr|O?#Kd!##*$?|Kks{thivMr&aY@%hhWtiS z@S8~)2PpIQGVyxc!;m#DL!Av;Ye8P&`NSxc&Lu{?ox~^vdx)>VT}Qf3h@04N;_p6U z$lXu6L5PP*eL_4*KIZuaVthEfO^n4=f!tEw1f`!=g}aGcu-=FfSBMyKB^17ec%Bfq z5wAh5PYnGX3hyC48~%u){|{p5A62*#b6AW2i0eS9e=_j`)P$t1sI^Gv3(-r8;_?zu zuDd8H@^u?2>`syoyZ0#kGvd=x?-IlApB4VQ!v7>jTn5$#_3J>Xf2zXsiQ%_R(Thk? z`1g|!{~Jlq7h)S|)mkBLCB9UMuaXW3@dMCW6dXSxhW}l}^+NoC_!1$WBgQ!2C0>pi g8Dle6qqZf*#k~Tw79TXdq$qGNVL$9#Ns9gUe<-BG@Bjb+ diff --git a/project1/cyassl-3.0.0/tests/tests_unit_test-unit.o b/project1/cyassl-3.0.0/tests/tests_unit_test-unit.o deleted file mode 100644 index acfbe44b08054d5bd8466e6863cf5858e50e4c9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3432 zcmb_eU2IfE6h2G0(k&H>Km-K5;-UrZ?Js}vK?~giaRJko5+z~1-M#JJ+U{=d-lfzS z4OvUFY5G9oi|C8d1Wino_+pGEXp!C1)w+pCvm zT_)qc2g&Gd4D$W)3BGpU)c^lv(+@P+Lu!VoVG!3)E+x1s-_*8}7Y#36OKsVFY3b_p zg4a|L-(FuaZ>^Yh`Ac`tUf~v>N}QYvg!3H>(~I8kr8jFoSNi+*PXj~6JL{^C!;BX- zX8M|nm&+RpHd5Rxh4r(CHq*>yH3iF{YaUxtr7m7sck1NaK=ICoC0To;Ei-Xs9*jmy zgVCl^JlcR6`^QWlsp6FleqcjQVDrC)4G=Cj@%e{%8fW`B_ocb7ZdO}JfnOIj(V>@@ zd=AGy2oE%Vn39LFE)mbpdwEF=7o72w^xDIPQR%nGZ7Xk!m2(WbjS_yUcpF?TkxH>-Mo{{7+q#}Ye&KNbQvw4HJWehkHup>1F=L` zciV`QvBq~8EyGx3%78o`A3DOA9U`V{kDH!-#uGD{otVH}#2n7&#mr*P^e9 zz^B_6t3+70fZ{sE89jiVP3K#OG4Dqby{|>eNB?0p z);a?T9;?zdD?g^~=WAEKJcwC;KE71{{A zfr2+9`Dq+Z?tPM`<-RWIi; zokD z*pIFVNk8~?Y}i4?_kn)|&Uw?nT7|ELjr<4rISckRE5h;(IGg5Mz{jB72OIT20~vcl z@ehHzu?Ckk0g``T!?_o_(a+lHM$Wy^jr@WpK=O-fel(N2HGF{%)#%?@BHYACD!(jN{IfTmi4rsO=>uQv&WL(=I&zbxKZ&FYMT*%$*AND(q6&t+1n=ahYUp zDtLRexl3}clkrBRC+7^}u~YV4atM!Hm0`CG@NKKI?2$>!@e*D#mvC(>H6=MO%|T+K zfCnTop2ahvP04H~m7u(A2}FgAFY_O_L=aw9B$3RsWi0DtYF)I+VU%((nd@KX+YVfn zJp8tA>2q!SKO$0Cx|^-6!Jn`;PE2KUczaXg4=i^S+qnk4(FpE`NR!AD;NjNbehhC5 zewSe!n&YrX@H?{TZx8Oc2rjOI(oYkie~$?LMPLNi!U*00e{}tzmPl~)tJ1&V2 z$e$AVm>hXOBS+p##4RG<(T>aa8u?a{U&tevCpqHo5mBT%)FOgQeie{*1IRjdl0PeQ xg!nY(MSM==wDMmde@5hU#plRdM1EC#fqW-&V-4Z$B3psX+e(g0aW63{@(-7d$BX~~ diff --git a/project1/cyassl-3.0.0/tests/unit.c b/project1/cyassl-3.0.0/tests/unit.c deleted file mode 100644 index 287ad3cf..00000000 --- a/project1/cyassl-3.0.0/tests/unit.c +++ /dev/null @@ -1,132 +0,0 @@ -/* unit.c unit tests driver */ -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include - - -int myoptind = 0; -char* myoptarg = NULL; - - -int main(int argc, char** argv) -{ - int ret; - - (void)argc; - (void)argv; - printf("starting unit tests...\n"); - -#ifdef HAVE_CAVIUM - ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - if (CurrentDir("tests") || CurrentDir("_build")) - ChangeDirBack(1); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); - - if ( (ret = ApiTest()) != 0) { - printf("api test failed with %d\n", ret); - return ret; - } - - if ( (ret = HashTest()) != 0){ - printf("hash test failed with %d\n", ret); - return ret; - } - -#ifndef SINGLE_THREADED - if ( (ret = SuiteTest()) != 0){ - printf("suite test failed with %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - - return 0; -} - - - -void wait_tcp_ready(func_args* args) -{ -#ifdef SINGLE_THREADED - (void)args; -#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_lock(&args->signal->mutex); - - if (!args->signal->ready) - pthread_cond_wait(&args->signal->cond, &args->signal->mutex); - args->signal->ready = 0; /* reset */ - - pthread_mutex_unlock(&args->signal->mutex); -#else - (void)args; -#endif -} - - -void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread) -{ -#ifdef SINGLE_THREADED - (void)fun; - (void)args; - (void)thread; -#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_create(thread, 0, fun, args); - return; -#else - *thread = (THREAD_TYPE)_beginthreadex(0, 0, fun, args, 0, 0); -#endif -} - - -void join_thread(THREAD_TYPE thread) -{ -#ifdef SINGLE_THREADED - (void)thread; -#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_join(thread, 0); -#else - int res = WaitForSingleObject((HANDLE)thread, INFINITE); - assert(res == WAIT_OBJECT_0); - res = CloseHandle((HANDLE)thread); - assert(res); -#endif -} - - -void InitTcpReady(tcp_ready* ready) -{ - ready->ready = 0; - ready->port = 0; -#ifdef SINGLE_THREADED -#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_init(&ready->mutex, 0); - pthread_cond_init(&ready->cond, 0); -#endif -} - - -void FreeTcpReady(tcp_ready* ready) -{ -#ifdef SINGLE_THREADED - (void)ready; -#elif defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_destroy(&ready->mutex); - pthread_cond_destroy(&ready->cond); -#else - (void)ready; -#endif -} - diff --git a/project1/cyassl-3.0.0/tests/unit.h b/project1/cyassl-3.0.0/tests/unit.h deleted file mode 100644 index f20f52ff..00000000 --- a/project1/cyassl-3.0.0/tests/unit.h +++ /dev/null @@ -1,64 +0,0 @@ -/* unit.h unit tests driver */ - -#ifndef CyaSSL_UNIT_H -#define CyaSSL_UNIT_H - -#include /* thread and tcp stuff */ - -#define Fail(description, result) do { \ - printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \ - printf("\n\n test: "); printf description; \ - printf("\n\n result: "); printf result; \ - abort(); \ -} while(0) - -#define Assert(test, description, result) if (!(test)) Fail(description, result) - -#define AssertTrue(x) Assert( (x), ("%s is true", #x), (#x " => FALSE")) -#define AssertFalse(x) Assert(!(x), ("%s is false", #x), (#x " => TRUE")) -#define AssertNotNull(x) Assert( (x), ("%s is not null", #x), (#x " => NULL")) - -#define AssertNull(x) do { \ - void* _x = (void *) (x); \ - \ - Assert(!_x, ("%s is null", #x), (#x " => %p", _x)); \ -} while(0) - -#define AssertInt(x, y, op, er) do { \ - int _x = x; \ - int _y = y; \ - \ - Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%d " #er " %d", _x, _y)); \ -} while(0) - -#define AssertIntEQ(x, y) AssertInt(x, y, ==, !=) -#define AssertIntNE(x, y) AssertInt(x, y, !=, ==) -#define AssertIntGT(x, y) AssertInt(x, y, >, <=) -#define AssertIntLT(x, y) AssertInt(x, y, <, >=) -#define AssertIntGE(x, y) AssertInt(x, y, >=, <) -#define AssertIntLE(x, y) AssertInt(x, y, <=, >) - -#define AssertStr(x, y, op, er) do { \ - const char* _x = x; \ - const char* _y = y; \ - int _z = strcmp(_x, _y); \ - \ - Assert(_z op 0, ("%s " #op " %s", #x, #y), \ - ("\"%s\" " #er " \"%s\"", _x, _y));\ -} while(0) - -#define AssertStrEQ(x, y) AssertStr(x, y, ==, !=) -#define AssertStrNE(x, y) AssertStr(x, y, !=, ==) -#define AssertStrGT(x, y) AssertStr(x, y, >, <=) -#define AssertStrLT(x, y) AssertStr(x, y, <, >=) -#define AssertStrGE(x, y) AssertStr(x, y, >=, <) -#define AssertStrLE(x, y) AssertStr(x, y, <=, >) - - -int ApiTest(void); -int SuiteTest(void); -int HashTest(void); - - -#endif /* CyaSSL_UNIT_H */ - diff --git a/project1/cyassl-3.0.0/tests/unit.test b/project1/cyassl-3.0.0/tests/unit.test deleted file mode 100755 index bec2df7f..00000000 --- a/project1/cyassl-3.0.0/tests/unit.test +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/bash - -# tests/unit.test - temporary wrapper script for .libs/unit.test -# Generated by libtool (GNU libtool) 2.4.2 -# -# The tests/unit.test program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DNO_MAIN_DRIVER -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file tests/tests_unit_test-unit.o tests/tests_unit_test-api.o tests/tests_unit_test-suites.o tests/tests_unit_test-hash.o examples/client/tests_unit_test-client.o examples/server/tests_unit_test-server.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "unit.test:tests/unit.test:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "unit.test:tests/unit.test:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "unit.test:tests/unit.test:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'unit.test' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/testsuite/.deps/.dirstamp b/project1/cyassl-3.0.0/testsuite/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po b/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po deleted file mode 100644 index dbe9f075..00000000 --- a/project1/cyassl-3.0.0/testsuite/.deps/testsuite_testsuite_test-testsuite.Po +++ /dev/null @@ -1,283 +0,0 @@ -testsuite/testsuite_testsuite_test-testsuite.o: testsuite/testsuite.c \ - config.h cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/test.h /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ - /usr/include/ctype.h /usr/include/xlocale.h cyassl/ssl.h \ - cyassl/version.h /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/types.h \ - cyassl/ctaocrypt/port.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/string.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/netdb.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ - /usr/include/i386-linux-gnu/bits/netdb.h /usr/include/netinet/tcp.h \ - /usr/include/arpa/inet.h /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h \ - /usr/include/i386-linux-gnu/sys/time.h /usr/include/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h /usr/include/signal.h \ - /usr/include/i386-linux-gnu/bits/signum.h \ - /usr/include/i386-linux-gnu/bits/siginfo.h \ - /usr/include/i386-linux-gnu/bits/sigaction.h \ - /usr/include/i386-linux-gnu/bits/sigcontext.h \ - /usr/include/i386-linux-gnu/bits/sigstack.h \ - /usr/include/i386-linux-gnu/sys/ucontext.h \ - /usr/include/i386-linux-gnu/bits/sigthread.h ctaocrypt/test/test.h \ - cyassl/openssl/ssl.h cyassl/ctaocrypt/sha256.h \ - examples/echoclient/echoclient.h examples/echoserver/echoserver.h \ - examples/server/server.h examples/client/client.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/test.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/assert.h: - -/usr/include/ctype.h: - -/usr/include/xlocale.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/string.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/netdb.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/netinet/tcp.h: - -/usr/include/arpa/inet.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: - -/usr/include/i386-linux-gnu/sys/time.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/signal.h: - -/usr/include/i386-linux-gnu/bits/signum.h: - -/usr/include/i386-linux-gnu/bits/siginfo.h: - -/usr/include/i386-linux-gnu/bits/sigaction.h: - -/usr/include/i386-linux-gnu/bits/sigcontext.h: - -/usr/include/i386-linux-gnu/bits/sigstack.h: - -/usr/include/i386-linux-gnu/sys/ucontext.h: - -/usr/include/i386-linux-gnu/bits/sigthread.h: - -ctaocrypt/test/test.h: - -cyassl/openssl/ssl.h: - -cyassl/ctaocrypt/sha256.h: - -examples/echoclient/echoclient.h: - -examples/echoserver/echoserver.h: - -examples/server/server.h: - -examples/client/client.h: diff --git a/project1/cyassl-3.0.0/testsuite/.dirstamp b/project1/cyassl-3.0.0/testsuite/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test b/project1/cyassl-3.0.0/testsuite/.libs/lt-testsuite.test deleted file mode 100755 index c20502cc98205f16fc8e2cf4c72ca65a30e41197..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53262 zcmeEvdtg+>+4lqjt{B;XsHj+1Tr}7a5{MWnVgexq4G>90yl$54hK=U3Cc6-9w4s|I z+hsMah*-77OTARASSg}X41yr77raw%P;cEBtavG6Rr39Q&zzGzd&IZj`@VmC-yg0H zGryTR$(A>5MF+?X>?m$5F(r_Z_o|LSp& z=Wqnp9fm;JvHYl)KRK@S*JbxQi|^Wc{sK%P95t3lC@B%?Q6n zm@@6vy-&RNtJXE=z1Owts(B+Gi+?(}=jBfZqbT*~NW!5=zD9<|kN7xt$oLUIb(o2i zA};1Yj305mjo%(y`N=l^<8AyX8}sKvB1?=x=aBz08~<8c{eRo~yVlnJR}`A@BfktA zo^7K)!`A)|8~@L2?QgWz|AVdk6I=a})}N)e@!V>Y&%L(#F&lo| z#_vr_Imh?1Z9G^G`+gj6o2~y}^_6P>GRr34**5y+HvS*k@Om5lV>Wxa(b8Y`Ct|}7 z+xWHF`g4wr-)lDg544qc+4}Q^jsH(9<98u_x2?Tj+4zmKwRee4pGVv354Dxgwc%53 z{QBAO8cY8uulY84U1;my5ZidawT<^CTmNQT_`8sP-GbTP6Sn&A+S>oA4Ue_8KgwpW zr`g8;fUW;~ZT#li0w)Q95>K|w8&kexy#t)F(Om&>P6REmBe7vea zd+&dVy)9%jL^;*U6#C=U5iI{T_P_WIRY$095N-v%#@Mc54_Up~+uU5o4dfZhGox~* z$LDYIFQ{z}`I{7kewqDi-E>#(ApiYW)o%PrW}BX!Nn5qN2>x;9q1W7x+US ze^XOqlbPWQ)iryVTODp{V%1P>y}vOWQl<6Y>I;HCZ^&;YHPcfo=Xsh@YoWiXwq~)K z={uvOw!vFx7B~65(t5G(S8A_{1Lye{7yGLleSS5k*<0RJyAZ7)Lk2UWp*Bq=JB4?VRLlsN?oJZXY>W>YHz5vv7uSbnKj)r-QVDE0{bb*zS88# zDin%vtni1>AEwFN>_$nG-;d6*1j06H0wz1;mwRjbq(}im6wPSXY@-GY%(N-31x=0N zAe7VG>|Fr;a;QcdQv?3$E9Zn8Dj|I|7OHJn(9GJ0k{_}SxsHPln$WII-=b4$C+PP} z7d4kW8#SAU;uMD}Ix)M84pi0$i%U&xcE7qd7(ionFlMuetY^AYDt0F}P6pk<{Z)&WD!bDlHOH~{wT3}Ueo!{FK z4vP60?HN6zO<)#VZNltqwZAD;TT=@=^?RxV9I5o#sHmr8V{$4Q`IPk`7@CG=*u-}% z!gLL(1+Y6xVXmIPW($FE$k({2&xQ}xU+F3O+fXYm;=5xu9f`IU%M6Duj9IVecdB>c z=)%pgdrw1S!+dkL_8EGr3o-gT-5;7g{|fkqirTB8a&e001U3d(QM*8fV@`ooKIn+i z3)8un)n#rrEHLaG)|Xn5-cfrzu+RxirPLA805CW7U{lcb&_ ziw8Ol^<@cZfK^0%OSHH|@kgTh!Fs_TP{o2mm%8V46cL|A!I z?62bzBAisczn&yDP*5`o>p*}!SRfJpSMzHde5yL&gNG-v@bz(3tZjf&y*?jm2g9h% zQnXT2UDw#`M=K$Aun}Ia-b?4An*8;R3%S@=hZYC@p7~sz6xt0mHizaf7XJoRy~w9( zw6DZ$#?pyAS%+(U-o?rrYOG}rSxb%PI=^2=%8q&9kLOn#`v`hX)!Yz-orG$X$B*UP z3yS&8&6)sN7}(fAW4(Xul>w|Z&0`leHeES3*wn~rlsC3ob}wVb=j7((j%{wL9-9O1 z&1!ntj44w+<8t!)QsZ$xX6EMhrN(n7#M4N9-lex=dXv^qPQY|I|4mY`JYAn7rsT5* zIas-v8$PoIRxmexdNZ4>ku1?v!H7Wp>VGkIfMeh^r4BHjqtrKyt8nI)JHT-m_UW07 zF}z`nF^J)evHu;x7=m#zM*rQ6(T^;~XgixRdY;Sp2%JAN&QPj=F-ACvF}BWyjGZ{6 zWQ;+SGR8%38Dm_mlrzSGbR}aPy3S*Kv{IKcK1Qi3#>Xn*M zpj3$Q2&GyWpQuzT;~(MLnej*lL#ekIPr#W!<1=x6!ni=G1mm-C-p+WUQu`R=g7^!@lb~nD zXG717C&R$<5TApY$hZ(^^Nfq2f5uawf5uaxf5yeoKjUf8KjRYUpYe3)pK&Sl&v*v( z&-h&EpYeInKjSj!pYcrSpYbf{pD`|2iy4CXIu;YGrj`)XM82}&$tfyXIu~cGj4$X88<@zjDyfWqNFXF4=-k>tF8~>9FG7Q4ajeoZe9xNI@w|b?-s7-cgyvEbHDWco=aeahKrX#PAxb zd#&IR#4h61f?dQ}#GQiO#JR+6g0qM*>r{78a5ixvah2d);!@&r!TH4H#D#(jh+(~| zJ6G@|;woa7;6h>!s5?_|F>#Ps2`(juHK^`=2az$VjJS<>kKl6RWyCuLR}yy;cL|HcM>~@cM4uXoJrgzcop$* z;g0^mkVA;Tuxjlcmwe~ z;#|QSiK~cRg1d+V#F>J(5(kNu;Ae)_ zQsULbs|8mP-$&dj*hjpUxJ__?cmr`za2;_Mah2d8@iWBbfB z*9zvYCg37oEttETKo)VQVD54Pxx{UPx!Va85C;Ww*Apltt`f}MPoR{zTrhV*fpX$P z!Q2f6<`L%#=B_AEMeGvH-BBPwoGF;Qq(G2Z0q1>udGzm*_xF`o&Ixqkeng-g|C~QJ z(E87GN8%wkh%ah7t^dVFxVKpGhD&f0WDM_&L=FsGl(vNnxx!v+{{_(xB728#Pj|Dd zcjt~R@%1d)Kq&N^5A=&ZwfUoy(ssUhAe^@4ajE!{SutAdPB$yRv|~$je|#gZkd$gW zTkgVyj}rclL@QLbZ2j+EGk?zH)(%IdNe``8BD=wTH z*_+Ajfx2YLmJhHSjkUU6+owBF+?&{h9YW+lKWE2vSRWDrIEm=Cj{VM#y8+{oJ{ zM$_GiXE2Wve1Jh0u9QOcf-Zc3g_|I5UC4zr9&s6k*R${s1I)rjQdnpdUd6%>2AYL6 zQdngaR&?+`__@gUv!Eg)XD;9u~gPSNI8}9gh?mg;5qhGQ_O;juciI zg>@)|HmIM-*38R2mu!hg65G)v>?0nT`7mBk3m8jE3Bfc*OBc zZ*MoQ7nFu45&panP5|s#sEcMYeT7c@n7&-6f6DY6oxX|b5}jVd^hBNB!gP*KzrplK zo&J>RV|3cF1L;9JeG<|sqe!^W`)Iy9u>te)0vP6!y>FqHrftqxMxjm6wOsMYM4fWS zTisa@Ko;yzAJmRMui`~U2D?MJ*lxdo! znx;G+d0M9`K{JmR{fIBsG_UEBs(9qIzX%^6%H$FSah=e#yW3EOljWxvjD%$EE z5u1J>=8TrP9U=&WXnS;$J5h|aIbQ4zMz=v)>CBlAea6aAr|6sL3#5mrz~4dsi3`BB zqboctJ~J)y^f!_1nR#82Z_}gCU3*JU`j>A<6HB&IlrW#mwrI&d%UTGW^`GDxHU5Z5 zHssEXM+)>PhJpKVL#iWiYy_#!)FrNXWT{TE2U!IuL!7N?-qa0}zY@0u_mM!H%MJIz5ciEBQj?mMwB)D~S_77rAA|z#x9^myp_5{jdE) z&%hYk_;S~htrU|*Y8zPxfl_;{16_DRq}EEQ#q?-Xq~-#tRcd*9v?)>(nqqf3jbjsr ziP2ty$k~At0gf??djrZ>4?5(|?Kv`b&4Ji7)r-8y)0r~lR=5L$$qvorVv6isT8~*! z1$lt`MJ&jRP1|cRB6cE?DY6b{a`5p|5k}gzE0V(C=q5T|(*MKNif6gzof zE7mBCa#-}Av7BhOJMj@zijieN^N#4hVkp7*=Rvxthh+$TZqWidpK`bcHWM4%Hw86i zV!fs)C&eYGUP@6JY!b))OT;*vg_C0?-xy`3x(PiWpB4t;6XLTmAJZe-KZbR}xO)3V zUvOSO3rj1e&XK&G7` zQ)Aj0GR3qTscDKKlTt&bGVKhR?$k0JVajwREF(pxBOr``Ayaf&CETBgP-amm-;pUP z6Z192OjD+nhTNp^X_J%nHhfDi%JQ*>yWu-rSbwr3|321vQe(T)y{{~3!st2QOJ)?r!&bwi@As$sCOH>!g+$4(QS!yU=RikT4(ukmOm|x7<^6; zntidKeIu=~E}Y^Sdub@)iC~={EBvCb2pu|JiqI7|d}Wq%+Lz%GSPiq|=YA}!q4WAL zAt|h~Sm3|h)zdG!Z^>3_-!j3h3&CADCyzgHCS?!*8-HXhQ(S{Ky6=Nfu%yG~V1Ets zNz)GD@6ds><0<6CBgc}u7`|MOeiEg|5$IaOS?d9Gm#l?p$UPjAAxCjS5B*c7!ya%9 zhaerJz5|W({S1uS*feDbtMZQ^PTiW(ghTQjJ;G);*^G%t&e5Hs8ik>(B%1OaaENa1 z*sz!@rjy{BX)M&OBp_Lq1gbsi`MP(`&!h!K?b*&L(()NBPJ;$-GInquT~Prr#BP2 zn|k=Wb?a}l5Q6%xMNnjA5!9bRDS~>7JrzNL!eT>vVN#}`Jgu~a<_iq$ZC^dje8XdEZe#o5I|fRhUM{eRQH?v25unqD*b|Xu*c#Y)Yb+9SpuW`Q% z8;JslH4)H#{2RHu(Z}I32rX|H2XUBb=DSS3WOex^#5$@)7fqYB9whW`)fN2cNonTmQe2trLm6+m$Ao~pXH5$h@_IfWmKm(=_ z0guGkA+203)5Jk?4q+0|bT>*Tkdz(3je3%!3o!95)K#*RtYUJZtr=CSbQK5#RXS0H zSECf+nOY&ZE<=GF+F}2M0Yfjtz$Z9Bk~I8wolEX~LPsoF?}%gsu*x1Ra?x!lZ?Q1o z^emQ{(`qu<=;oO%2L=UmDwt#bJsE7?@E3F@?Net5^$^ny$ChiRW$xke_n{|=BwOUo1gp4YXdQyb$NG;12;(RlhH9$AZ- zB~zx|-N-)4gDoby+y#;t9a2@SG#yc0 z&0`CGj5rvNeN9G`P3%3L8WE4Zpi|tXRmzNrRl`SusyrUstjl<2!iH(^rMF|~@f&^6 z7Em^8APyNZb_Rl7Mx1ZNxkg-U#90QnNd_*IxX=OKy*-CVUrV?-p3h?AI`)T;-5$9V ztqFy^X0nNudz`T+nBCDE8qju*3YYyPrn6Yg?OH~bx2>yCzq|Yx?3hX+eb0kk~T3sxefbDbZK6A|TG-hFOr=J4*bQZov>vosHv@HoL*Dt-K^2ot=5 z-3M|1AETioQQeCT_u4}xxbe{jx1 zb=7?{aw7DUP0WRZfqX;m(#XNv!^0x2?pCz{o$TF26Le17*K?HQg)$-s`^)v@zR2?j zkyWfh*!fl7A;yJ6{cN4Wva)Zr7);{Dcf{B_Zilf&w)Kk~9N@fe7d%v~{gD>TGb%F? z$CX0Q$%(nU5gnh{jmh0}R3ZyLrzaz^8TESxB(4StZOzLY9dOXUejDs%i*+$_U{-~= zy>v7LC>DMjN+So-oE@cXwbeaI#p>MUAqTBLh_wpzmALSnhN3JLnjGDRj1gw#hu$C(9F%q<2eJkC=ssu1L0C~o7X%jyj{*<3!2?ppj09;ldJj^z=j?b3#7DrV zgomRaCJAEMoFs;$&$x@#-lZ4bx_G<06D*?Q7d6Q!kbLGmT^D@j9D<1@a0TcD&I5z% z-#{nxy3muBj*p!eb~#6D`tV6LSX{}nALSLS+1%x*!O;aC)l%KK!={{@u2G35N=NN4 zZb?fI|M>eWaJ^jw1))A0@0rJpdt{Yxw%-ejij`)>3NtZ5v2mhMFd7nKGzkynYj&XH z<769VXTnFIpCsl_o83^Wv}mh6nbsU?1^XWsB(CDpK*Lzpi-QwN*C>TDRpKt{mew8i zq7h!;vJ{<@Yh9ktie@q?Z?+(H!2`Pll~{S%7Uh1|YoC6USiu=#LEP@wbrHtM2wfv2|W2Q3RbRiT;!QKb7Nn8b;XuG46V5 zP1YI~xd)_qJ817GLdFnHopaOV#21+5c{>dIbG8p;5tjLx#^j#`HrO-0kGipP!@erD zeMK|eiGk?fW7JspbNEMiYV&VHCL0S)XCpUQ8wusJfxVDCz01cK2^wez{h=E89d_8# z0Hh%Er(-|Om+bo~n(xn%a<=E--;N#5jy$r#@&E}Y&ZTa#0Yp~!arh@OA7e2^b{VWv zyYKDjI4WWL63civ>gcY<4L1%XwZT20(G9+fRLIq_Bd+&I;nU3a-k|K;MN~aQ(MQUR zKZ7vd?%o3=?n<9fi21fdch-r;8D&na;p8Y2>mDrR_K9^aMAOaQ#3N^MtH3EA`2bgd z9Q@nZe1Hvxjrj?4w2oDtw?PLf8UC!zGs|rL7SrJ`JM9q7{}mU%V8SWMN*JCoJO9fG z{X1OMc61pcaW4BCW;tq7ogx_Rq(v}a(>Y^aZ|3EKF^|7Q9*o+hLdPO1Q=!b5d2EMC zyaNJ3cD@Q-j5%$JD=~%puvG8QB{p$9#6sV45(al9&!y1=E?2BbXO#HLa6a5cMY|LH zOB_8z=q>hO5VF?YsQcE!%uCR^*1`Lk)pKG;*W%;QK7~l0iDC#*o*a1)I}q^8RiU|vTJaD$Co(TsxBc_+;ts}{ z$kn1Oz_|Oyv)2%0KD37X%9!C5^T8i@o-9w5Y!Xe+V=S$N9Tdh5Btm>47^7kf#ruR_ zmvZ4fPDWRS8Ve~I81v>VG->$GHe|y~Vn@^Qaj4X}DXgTvcAUYqboex|A1+dGw)1bu z(5Io&p?unlkZ`I`lO>sL7(NXtXZxf0mp<)r#N>W8M~+zw*nJNvjEx2aXX}~^{jhcI z8g1g1T>C#XE&h*X#-#pI+ppX)rAZvd?jhdI zIZFu}US~I&VE&hkVe5^g)8*oCo zlrI_~f#H)gxEJ2TsMg}e$aNW`g2h}q$9tj%mE`~8c6ml>@QD{Sv z!-;+9SLDDDXU9$8qWhg;PSO?ZvtAykL~(3gU%^^!c6$%rI(k+ua%dFg~r*zg-VX3B>#Ys|Cr>< zv6SRz8~waP@~aH4pTlBtkI6tE2>w@+fXosN8U3wf(2r4wtgMvB@^jkq)2KuF- zeFlmM%B25;G{S-k4YU9#!q;~637_1Bd>+mrJ7EZXj2B9V!A`~yaQUOBD9aKXY1-S7 z6MZMa=NKd3ra5og>}-F46Z7AZcMnGX-7oqt9C^BMDTTbp5!ABHFTaah+V1G)&0n3g zx%-5)&GEuC7|w{zUk$)zW>$QidjrVuI7`?O@90D?F{3+zy0_7u#G`tuWn&~jXTd}| zx*lV9oTZz=CKu|>C(P@5%!MfWd35(TpFe=R&RMZKxBKulE6Cj_l$%svqWJK-6$L1E z#lZkfGBN&)=%w%&@5Fedpbs@sPoc@BkOP|JSVCjr5=Mh03+sZrV|hDyKSnPfKDsZr zti9kdT2{DU-j4m7`-NvkzJl{wg&dF=!*~gkucPZp)^xU~^@?XOiXN4s(3MGIKg15# z8T}isBYP^aNz29#6CJx9XXeqb(EZ`jjK0kh^64L=+u`GeQ$3-f(F2h^2f2T0znL7M zqV^r(BbIEX>b1Y=;DiOE^mvD{`3IYKa0+gCNT47lPwMl%1Ms#UI^)XQk7Lba%>vNyvt#?>Un;{+*< zwA&his9fN68ZH%2iIwg<>nrCJiX}ZB*hgc8{LphFco*spa~tR+4AbZmNhJT{6`2RGR` zvgr^U+29DS^^DkbM?AKMwyjH1e*_IHak8f3GeIt9;OY-WWZg5!B#I`WQ#TAI1LlQf zHj;-U87s`Fi3R&5o})dW#WOg@?YOhc=?XExTEGI`Mmtf^$YRQuJW!A*V8c(#J`i&u zF&cGnAzxUX9x9GU#Iu4U{Ru3vo%^VG8J_w$#AW>w0{g9;DdBo|QG3Ng3Y;urG+Y^w@Qc4b`vcGFY ze`HZ_#cdk6vtCjoUVz&nltBAN5F1NXH!9LPzNQ4X(_nbthSZON3on5-gCZVzlbWMM z^~Qp$W8zHkrEFFTyCHg2G%0Ysq7p|N6gLB4s!Ydd&l4`jHVJGJ=ZhLTKE8JJw&Lvb zR1E$YqTub;^Qh91y7S1+O3dBf+dKM`@MExgH`wq_QyEz3KBX&idl@9?Q%4qzv}Xng zvq6}FhwQair9eeg7|LnrRL{vt5(lpkwEr_nMsW~TqF!8Vfxo`kLP9RKAh#{FI50J( z7J-Z@y&prKU_BfR6X$?NnnC);ZO{Q8SyrJ8WVu;fg)Sq@rDE%3ieb_ZlTy0H#1xd$ zTF-@;wwH)0FWJgTYwVZ)fPwX#8joyc{3E;*0DsnVOgzGEQqN$$pW;T5I}D0GdB}0# z={_%)SdKAjf3Ojk>j?~-8;}z(hEcVjkD$y>r7}=3K2yyB_eQ)7ztx*HRd^|13%Rs%B+$LDa9Q^=G;%s&&vJ>pl7_7Nmrwsp= ziB8BhSR1A4rA1;W$I+~K@o)^L0vP4yb)kz~`FIK2g$Vb{^2Hk)UJ^yxo}XTuhC|Tn z{|OqjR{-OjlolSz+Q?DZ`xp$uWoy&gHVUul;liGW_Vb>WQ5M1@v|pMUl||YC^{GTZ zObpz~;E{P3@bqbwW_K)3CP^QCKCu%6!Wvf>kMy}1ElF`Pf7GS5@yIu3Yq}KTQ;8M2 z^zv=(*=&tBrS+Kz1hflQaaJPwsk5Dr=5-I&GA-z)h~g1tSjISL5hE{P?e3GMXeSN` zXf(&7sGEPm6V%M&>}q%84RVE2)NzbKGI8=2>TZllQ0%TZN>62Je<`gKpi{ zC5xoZ7g?n3l4Hb!N-7b@C?W^0c6RJwGmvdIh+^DfLQI`7X`7394P@UtlRLr8K9etn zt~fo`bqU{s_AX;~Iy+9s9tGZjvzo1qL~CeSeCIaQN;)mHiQVv$t@Ln)^X!CVdvfBD zYZ$|cz6KMb6HPFN6Q$Fn6D=Wz6aBSeVo4|Z2s&h5OixF1bfS^HlcKLhUogGs>o`}d ziRBm@4OgNIzUI3djpLEa#q@aE6Smlg+GxCn#<;C;aij4xHX3#Ak$R(H%}H)FmO{x; zaNiyXRa3SR`=O8qF+ z_$2wYTmfoaVaSrGCxZAq2gHM!Us)5Gtim~9GMw4Mc{n)hB@`Omhh+hD*x41kN9vn? z10!1}87h-?4XWWe0ade_s)K5}%t_LBh(8>?F;%k$6Gg9Y-&oeSvnx1v*K(%ox%+2y zNDt5<^Un_!FrZ8vEvUMeNlt~c z{b%IYgZrZvjkvmNkqg=^kgD!WHOQ5UvjHrmBf2N2X5@E|(d5}e&c8)LJs8@?Z21hL zqwRDL&~(K@ci>xTP*(fy9u2CbIcne$j1QQZk=TUZ;t`DN;J|2A zSM%OB&QRV-9K8_@$nNSYToOB{Z8zxnjHR>PIC}R*-|5~1IXE{BMDxDr+le8`P5f<}Do3DtpPw@VYBL5sBY zV?YXVmDTX3)!E>NR(FAjglLsXv?`ldh{G36cgI+L3oM@6?nUqNc64)jcW&ZSg}loF zwIt?n$3)JRqKMEWqc%+IUW}Y|`A5N_h!CPfDdL^PHlaUfVCSZ3L%C8fF={)))Orq`MCsj9xK` zUJb*zcd~lp>6;A6%c@3RDN;n(Sxx%cfct}$gz<7()d#D zzq?yd;ZP4_l(S>TP38A70ILM#kDb)S*0^bZ+!I>{{)uJalh7&qz#ZVlfmf{qPwgbB z10?rpb(lj;Oh)bKHe9Fcem|XVxY974fCzRC6eWW-1ic&>-l|xIvvJVIosnF(zXIDr z$~YrSy>7oBo(5G4;8o8jnH;o6K$|J)flzqu7;l7m>hed0{+a~7sf;VpXeJL zJ}9CJH#j&QO^S6|ZE}xe%?hdznlv1Q+~ok2=?lTc^g~XjKohq^z~+sPak$Zu4FVs0 zW)*I9u#UdbG2D_%{weo5W=418ZU_1maCWq#;}~4@>%{w*Tpe9c(52vEt%EXVWIrd_ zA&(~d8Kf^H&}H-)5cQN`S_GhsL?vuL`YDtpCnD4*_SlIWs&I=|QD|6nm%hmn-G|fc zcJ4&=jgF8zdN989Pj6#tok)X%QLsJe7o(L8$YgD2=+IlVFbF0dk;iYKpf?_t&L%!% z415LMgiy$%H^|w565Lj*H|(Cml>5hRVsO`Y{PFsqSAhCrQXYROhn{`WG`**e?%qxrD`))Jf1xf`P2&*=2VmsebHYbK zSWD3~91`gg6%^dpiDsQeJtqp06_3ch>G5APDfgzcm|QCNrf&dMeCc~{K{2$H_|kq5 zPfu%n>2$`S_)(Rg-%*{k}pdFUaUU25I|`#ka1Lw!CM8-)f49giBkf@)r2EH|;|BB@oQ z?egoyN(zH7p_uaw3W0EFZ)iZ@FTd`0=mnI6{6%OaejN=|n!nC${_DhLmgc`seDX&& zpT_3j{fbGsTmCwd)>~`AsSstv^^R~){8Z|gcgyPqeXLuiXOz3*U;cs2?03cgF1hAi z@$pjAJiU%b%)8=G2$gwc9gmoI#qW~*8Aig6H#Ovn7bCmu%{ob*xqv_m1Cid$-<-$y96l1|H@e~w}M=T4| zoW*03Zzho?>h_h_LH0|%qFaJ*Y{Jj=>4n8LBd!f~K*3>_Db{1ds| z_t6>jv3?A5z{+~YAv$|>3hS8`)(<@J-Oetsar_b(>f}PxH~cMP3+C`EEF3Qqj-k?c zB*9$zWn)W1Q9hvsk!Xgl@DL;aXb~2Z&qxVJ97kQN*xsf-jEkCfc@KtHb-c#GE)JNbG_&e{!^Ty)u zzay?38>$b+BgfDLF(J|0#M_WQMwZVJwY#4MD>UAPh=s#Ih{9(8DUH7|8zWkVJ{rA+ zTqqcJGgg?stuS3}S678=Ll!14K$8|G>@DCc+BQ=I0+=xbz z%a@S&#DLNLYmh4kgQV9d#x8J9Z2LWpX#+;3!lM$aU_`KmgzJ99xW`Zc^Ti!JV&9x|c%cBajgJIz&Jrjo4$LN{u#Zl&?{jM#D7Ps?iseqrSO_dLmV*QJ1aL zWwchdr_n1!v^toHA>|fBuC1V2hhp%13lUVj2N8cDpvAT$iQHw9Cx*G21jxD#F~8=5 zCuSM z;v8Z-`qY=@z~wNTcRo6!A8%a5V^JC*Z#3veU0{%S8AgS^v>}b`gyMZGEgQJ{kx1Hm zITDtEY|0eAvwyV2v1BXF12(q>+mYd>nf!gCjDn9#x$sDqn}1u&(m2{viS=S-!%@*{ ztM{@dY!woWbkR@~*WQOVOEPLA1$f#jUOIx=oIn}w#Q1x45x1=dbtk-;VY~bb)@%uD zy$!Z+l8*#=e2qI7S#%b4;ECZn*)0C11O(X~2jAF6_gYXS z-_EA~$}wyC)Gr>R!RaX$0^_L6p+L&EAuW|S7h~d;7L5U>!A*W*u5RU7-O5_D(sMe? z@F*zLKZ?^|aNwYQLoY`sYTE5oEhOazhb3D%5b*)>?ok%h#qYr4rJ%y$lH+1BQW3K>PVro+GJzk+$eg?YVmD-s_-AxpOW4%H%iN5t^gapI3` zJcwtnueyt_jxRWl-nRK*Kgjkp{dX{9d=eKIbr2$w;%s|YJVC<9_O!FU4DXI?9dXI! zp3AoM9NB68eZIx``{vEk;&`@b{e$M5TxoD|Q^K`%KG(u#S5vrw-ve>gdqV+NeQh)1 z>cAj1v-k{`{6hHFi>tdM+{S|7bJKIh`GdB6YEyHlZ(&tJ13P>*mdO*Q4_tD^#J8e)3Yo<9|5!j<3!i{lNz%!B3U<|M5>fc*!|${&miRmZu`Ok3ITF_g36;`Khaw zJAQ@trGW(-KIl62#*E2TXWcdF{fm6PCokB)_v2TNdvoAsb*{h0uS#oOmH5D!U;S!D z)729So)~e|7uO#+I`+-&YEi%&a`_rvi@mNz-Udvy#wJ%oV<>>nG2yNHjF!n)to>8} zkM3*88+6&D1?uhp_D{{-lt1UhVP(tS+^~K8zQiN@)e(pIsox*sr#|^+_Z1)XjJ@-v z&@r!m+P?d?QNM0otcG6JJms-9L!SHPUBCX~7kB)0cJ-&>m(`-l_y1@@+u)LpnHzd` z{&LB^qc1uHD5KJeTp>Jy|?_|fayZrStnN)=l1)IT!M zb1YWx438Gwb>?Lg)oXVY-Me>E!R|kM@m&woqP5jy>RBu~nKunPo5lG0p^INKa+NgI z;?qX1#+sTO)ihsKdmBy*x%eR`SI$^|9j$q+{@&J@EB%Xe@CC(eS2;ek*6gPzbn%N) zF8y^Z7e8f$$=jsNdcMH8-24L8>B}-$k?*1MjV9EnW|w>#(RH?Kly8vQ^3BVydw=!5 zy5{Q{b$?m#cYHc!)#E=u@6uzY{PguZhMs^`=dwSH zJY{Wv?_Dd8z52FwnZ4f6)X@*B^~dHdyxy*usg9e%+b>qJmR*KJ1xlFYV&7a%S3H8QW=d4ZpaovX5 z&YsV|_AG5ay5o_N=Pmv5d9(gQ{e$m3zG`9RxJ;S|d7Aw2DSG)0IXSQBeD76Drmh}+ z?ThUP21kAExUbFW5`ghZcUtQ>#vZNyW+1pDN-8ufRwskGYuVMO5 zwv0D*fjeZmWu^OWdFqn)J>`9C-}jgIErK?Z)TPi?h;gK@iH9t=ERNqTPhBOyTb{aH z9-=&D-TZEO>H?Zt-qxN|B&sO9q42XC@vitSxblnZnCbr%1~1n%Q&5L#6SJO)t$F{6 zpIJT|{1zcBGx~B9;yV!@GBD}3BK<1DhejUT`P@inUfvT==#0+^j#!BXMr!=TtBNRRMT=nd0=92;=+k_6N@HRPrP#C{E1grOe~vN z**JTmn&S1j@YzQfe6f6>gv#(Yiv7^vW*dtFft>)u9$SB*Chuy)-^@=hEMHbn)YQ zt~|qg^Bb%#?P^^dhKpZ{%yw1tgPxLhc^iD+@4q#3D-(Rhjvt0~VT}I^US6Z_e_B8I zHB946v&K%^{Kl!7>s`12l4`tiqH9z^&iESa!|Nabe8;xI*E~q2N{vEpluuJCtSPdh zWV=RzZ2GiH*Vx(ypT8w15UQ_pl~z`kkIl=;J#x^I*tnaYOf`E@A)j}3!G41HpsgP* zgN5;3NPZ~Lq~r7OSF$=u!&njZwSY?2XJ#rJQX6)_RfC+FWvI3p2T*=9U%uWbCSvf_ z8MFi=Lw}diK!YqFLUdJ5E%(ftT|BL<=%T*jhDH~T6`G({tWf+Eq6$?9U8bB3mNGx| zifkRXtHS!>R)eK53N?9QY4{>zW7A?aCg7Sx&XchpDMd^hHya2wX1lP{^@i(0GVC!y z*QADUJxN{Vjj&t`ZDT_=cY3Z|OBHMm#w<)$u?q5%+%e-X%jO(gI6fb53&X zrT)5LwoAT%iJcG(JIs$Qr*>#eoof<4^C=3SDjzi#SJp=~W`0t;Q~V9pfqHKfL@zdC z7!f}(Ee=h$gwJ^6YoO+DOmnh77huyGZ1TJC8Q3PjkIt-FjR_^oE5&M!fobDKms2}D z#+Rfou5A{d&2Kwv=L&uclI0bUEd)9urQ|vws&9m%I3--E0>=ZR&z; zkCO?dKfdeAGE4&ojH2eq-vB{ATiK0@q6X6se1!D|I2}dSEt=c+9LMJ=>qv z*f3^3zKnV$jY7MUq%cX}l%$`d9h~_gWZiyEvb@B<2qO=|72rB!tbB1BKEe3nw$X<% zElGM)o|ctsELR+^MCgvxfRUOj+oHxWj%4IptuE;@3BFSTqo`PN&t+}|d z(3j1Fe`U@OLygVGXPM!^>g%zHPIQq92R(K={k3Uy6(6IW=#oVNROa?Vb4zX|EGw?j zkY(BaPs^o^DI_NQkni%OEcH&{Ke6N*puZ7rt}5^w{7$CSh_; z9;En9Z~5xF_3CnvnlzU6CQlM}lZ9W{_noE6{LHc0(d2i4T@|xEbEaKTF|DY$c#cs# zNLD+3V%VfNY!B)TX{{wSO=?e35!TDT-xS(4Hc;M%#qj(ge^ZUOnri?)!;SrFV+|Z@wYQF2Ggo6n z9X?#j`W4CbnCpRT*k*C_}(Id6w+h zg+`a_Z^T=uEZ>Kh+)=sXT9ivRra3ud_5b=?0e?t`_topFG z*Na#c4R&<&D;k_}UH_?rGnb|p4IUO5Fl%sbztX|Oina{SEZR0WqiFkJN72)R)A=-P zE5fs=%RA*i{C<$Y4-)u60zXLL2MPQjfgdFBg9Lt%zz-7mK>|NW;QxOK?72JL(S^XC z{^RR(#~g%j5Z*J=2N2KuMu+|f(;Z%@xr`%|JUgb z{td3J`26*8h&SM4(I+6rGlS}QgpI(wRwe$|!QRF-OVS+!kX{u_ckt2V1TfwTSN(Av zi#P4%P0XVa^T%srl{>(}YtR-j;Po*7z$f2}s#}>ZUm~eQJQR310{>bI2a1OQ8(+C8 z-O-Dfb@w5@ZH1Nr;Q#2i7vnH1o_cG#V*)}6!d!$JgoOx85mqAHgRmZ98^UV{A0q5W z7rK>0zwJGT!b2gg$PR#RwCSkupVI>!fOa0 zBJ4*Pcqi&3oQg03p#)(rLJh(~grx{85$-`)kFX8lHG~fl_9G0u3-u9BMVNq4f-o1M z24Nw>QiPQV_aLlC*oN>L!iNa^5e6FbkaqOp%G=MLamjnxt)I4S`SUA_um9zvOMZU- z69X zaq+B*({_7*^u(qU*4%n&Rq+e`&R)3Z@{ewP@Rk#fx@XeOvwrhww@`s+BWRU&nd_mHzx0_u)w_0 zIzt(y)pcH+vYYqM$LHja$!^8geaJf>ai~eh0W&41r$Lp2+t2=-qA4@RfUkiTG=y{H^m0tC zPvsB=yv+fX<6GPSemV}}0XUWzeM|u!l;OTA>2)Gl7g9O3IK)&rynCW@(C1ndHTt|E zugdWUJT*-?kM#t6sA(cy!{cpg@-Egj%=8u2AY)Z&rKwSR$Mxg_1eS0Lzj%^%D7I|Ttth0p~+7eIjv*!*!l;Ey-E zO}b^Ent(#HUDju~5`pUu(_DLA!6Md%G}~n! z`^MkZ2yBLVT)Qfd(QB8ULJ{Dcd-u#*E zUWW{mE)#1}CKYKJFJ(eneru+W4*n|Bt<)bYkZJr#$KNUhla6cu)|)&ulk=4C;*hxVP8~ zI&Qp}#~#cwK`Ka;K(875unxB-sR zJF(|thVdgEe*=)m_SwIA;|DnA-F0aF4gwvk=OXY&x+a~Je_6)BeH(e1zrTR)C>9t$ zGs)P}ZMETk*bU~~kC1;o0{fSVK-0DITeV54g>1z5nfy#_jp?_D`%BN1qJPp@w@g2z zv2KC>Mq@1<`W21!tfl|ZSZmMRYxWnW`!g?NSOizaKV!mq3 znGbC2Bl_cSVDQKJ$GE>(yq;$o)3TM~eA1Yb!=J6`!&+dRAG(}7X*~}#)}EdAt}zsW zAMILWy;C>$#{CtX6n?Z*UCy04ezZsY`pYgIb_u)Fm{$zizBJ|)L-N;OonUB4=cTJp zdnp04KWVrkAct~89{nJX9N;z!E+V}JUkFTlrhTO03Z(`y=RG3eqZD8A;x!X7`Q3up zluw!(sy48|__06FBkliIUyI=H#;MnV7Xni<#Cs6OfKN7XH{vyx^3Q-bTgtx%e%FHe z?ijDjXes1(Bya{WEra+N;J46!YBo(Bt@y_)sUOOTcoOhV3+8(LDC*M%v%VMj1z=s@ zsjdRP&Qks};6@9+9{55F{w?rtE%;&JGl3~U^8YjNSPT9O@Ua&9H-OKv;E#aKALZL0 zQ*!V|tq=aqmm`2b+mgh?fbaZs67vs#EVJNKfzRBOEFTMeq6HTKpKifLz#m%bp9_42 zrMv?8CQJFHzzR~mRRs0;2SKM_EMaYv=7?LDhsB5D*ODm*3T;z{m@=M{5aKKeh+N5m%;x`wU_Jm zraMlt*h`hgUXIdBzL*T{Wi;?HSULb;ow({3)_*)xx zninEcAHKkbvu${?4OiN5*n(Z)`AgtJtgmc#Xul)Xy};&vz=iqtM+-g2^P~;GXv6OT z-*<1i<6h7R^E>n)5eeO53}L%Hax|KXWDQ8_*akM zjLVSkRkrfQHXO6zJ8bw78{TZgf3x9_Y?yz`%KUMBve7Uyh>wG0%>D3C?1xVhNofL> zXWMX*4PO9!&%e?gqd`mkcx~m4z?r|pc>yLE%dfSS-)zHwvf<6ZMGxW3+^GLo;Ez5_ zcVrv*bsPPMHvFv(JGn75ejFeF#;Exto?^on+irc3+0Kd%oFWJiX*l-#yfsTRv&obH{415Co*;oUgpf8btzz<=x4NtY< z3v9Rw*z`A?KlQ-t-b#18j7ufg2_J(u^_o19Wci74|0N=7E=|8sF%3reKw`}-B8{Tij4j%Fu zKaT$d8y;oD({0#e!?iZtYQxKI_$CW>q5b=T53Iv|A*3mfKUvDzzvpcDLmNI|!%lsK zgPMB&p8z}?{)p!osEzgZn3%j5AidKT0*&iB@Ne4)ms zW{)?F*N+?PgLVFp-lW&odMGM&gV!jl_gpGhxz9Fli>7g(7cLb-stJ zbL92EoHD#nSna9zo$=kw=71M}Rlt((^*3u&-@HKe0o>H9tyv7YHjme(wF}2v5Sp>V zh5l*?(^9Uh3yE2srG3pNL9(hYG#d7|c&QWf&vY1ntwV%1WlFAxVqiRu5|TuLnV>wF zGoCV&gh?!tmYnfs5v3?OXPAizX2Rr*Kb~aJn4I%X&Z03^&!-M0VRFtlIp>?4^G(kA zCg(HE9MLnYpJBFjhS`>Ao<$Sb#JQC-ay@Ka5*(L)l|+k<3dEa^Q;ZiK`92WdTWf%B zl)MC5f>+RVY9{__M`N{4&+%(;fxO0AzZfs-HwHsF4ZKU+rv?7$LfzEZWD?p)A<%Ec z2!T$5054M)m*y-m;vnBl^XQk0l68%GeRT{`nzG36lZC0s38s`MoT2(&w~<*TFW#V8 z{gw*f@WIq9nNu`#nrGUqVmJ!zHOzF%MD;08@kO(WX3m%jDoY7oy~WF=p6O+?rxcZW zW|x#yOsn)%7ELLe=D~|lA-+xuffW``FPkxCs%Kmd9Y|g6{Ay2ib6C8F3WfrFLC8}d z#=UP(xPc0?(i<<_PpzEi2{-#ad`q&nhOZ?d9l&d@;8N#T@D=#qT5m?*OF=BGt`AxZ ziv!dB4gMxDInTei+>5_pV>DyD+3L|RRogm;Ng8TuTx@0JnNc~@lXS3^GpEwMR`Mlb zjI^a-LJmyE6Rh@x0^x=$bLO`w-gNh9v02|qQt~Qujg@yzO&(*uC{twgE(AxX}{mf-w=ZFmbJ+hdW7ilUZba> zu|dCA`(G$U)PYy2tAivGj8f-nZc9_hE$ zto8LgGf3p+X|sb6GG0!@D}h|?u_dTp$iMDnt$RfyW|*F#O83^ZoxWwe&jRrd`@%d= z9(EY~yOkc}51OQE&_271usD}DHCE#VTh+HvL!w;Y`WTC|#v6hS;h@p;h2uTiBbu$~ z7i_IPx9FB{lY6uhJThAT{Qy-XqOeubZ{6F5VA!rXa!Pp)UQTCRSslb0;ajXyHWi#$ zUZ0IMMzohFjq|XIL;g!df=}Qlw2SA6T|Beh8VCpye z{3=kLH?F`ao;BTL`e9j^(Z+)M#s=*ku^{z68_Er7ZwqVu0PJEe#@>fxrM^S+_Mb;zDn$u7Z$mo*!S1FXW+KPUFex(TzyWh$ObG{&1c7 zKV@7&3c^4P?3ctR6hUuN#Op!@p@-Is3jMt^$)wG$Hz{t&W+$1+W%4BuFq*M$=Y6Dv zlmJ{PGdWFj1f+mn&a)u%7piNH}Y_-OH(W=T7EW{6!4f_Qc8h{lpqgi#8OJEwGWBB-svuf&LnB9_mv=3F3f(LAW_9> zK`Jny`ERsZvKaX}At+pbxt>o$Vb>a?;Rg){#EuTn^=BoO1 yOSJ{9HR8`yn0T&+P~@$RVrM8{C3B&2>YnLo@!jwHzJL6_pYO-f zqUxzSb*k!|Q>Ut{yVKW9DJn=xO45v9FRiym)Ok;`Et~PZsw7);XoqWQ+DY0FtuL}z zmfZpx1P3ZG^g&)SLT`jp;L^p(Hin~t8CZsF35YZebs64l*E9y!*HTq^$6qw9BcqRv zVFfC#Mqs-v?}ca|%J-p+!C=aAw!z>-Lq4?4kPpmYlofyC_c+j=Bejo>!HF^kqx@Wy z1ODPi{%BsCjdFAUa?ut8>vMdgsw(G?s`8Ais;mh#W;E1hj8{sKODXk_a}Q_UEeL-`m^9_B zJx_o1r{>k?eAKb?@_9p^jC|F<`;9OAqbTubi^Bm(zDD=qz9VdOR-(eP9VbS*ymiAt>@c+Uh zuYs2S-e93mH_6|Dbe*OCr51ZX!_vQ57XFJ&{Aj;n%Xr6H`oGrFp5Id5V`=XaOaDK% z@W0E%?$opms4p``)w%{Kv{aIoe&utd@JYcCGw&15M{N6K_ zb9`@D#)IWB_TzY4EdBpJR;v8VOpAPHS?I5`@c-O`*IDSFwAjl{rv9=&K?{D=!mq{B zpR+Ce-nQt!ucf@h(w}`6{=YYk-+}bKmiGQ+;WygS-h~!@4zkoAU@4z#!NV>5dRg#l zQ~xNh`4)MdXX)Qjmht{<8Sl-O{>?J+cOdZ|T$*e8Lf34aZgLe^cpFspLsri7 zHcXyhKBcC-zNyZyO>T0R7L_c_a*cMCS5_(&cV{Wo=D^Hhbn&*Hmwfw;t>#A^S3eBdbs- z!m-5bM}L?mbE6vt^i6rWF@XnJuPQSi_JD+bhg}E@2{+=gq?a_||`Vb5aL(^^I7Zzc- zhQtEc9i=c=&0nJhU%>CFT@mwti?3Lp$mQ1tNESiT{yZx z1MJ>aQ(H6Nn5{8GPjn%Af2Vr=v*uq4-%wI{1yn9h(U`#c081(t$Z(7)kjMue(R*Py z7o)n&&6)+eox}PPE7ChEj|UbifvJ=@A{qeZh8k>wd(^e)s`tWl#Zjv6C8|gtvqTkIFLo%ym=^ z(KT%r#_hor5m7b3i+lZAMMYJh!KZl}(Y=b=I&Y1JvDTDV*DWn>5)qIwLEV8iUg=BR4aa8pC}J&lc6`mD*gXEmto&&r;?5H%`Iw zWOXW-kk1AxXP2+s+XemET+p5zme#tR@s(!Cn{e7eQ*!oVJ%cYEQfI5%yAWgf7@iCfK#`suG^DxFitB>(< z*j_U}9_JQ}PtY_!;~|>X$oND}Yi9gATn95gNz+;xJ8%xk_+(AHj`2`UYiE24_U??G znzn-RFipFi@o-IB$@o-UFEUQkvrKWul;6pCtfuW^JPzmgjL*=tj~VA^T9ombnzo1W zcum{O7#Fwu7*Bwn8J`6`GoA#$g8ms#hW;7nL;sAYK>v&j zpnt|wp?}7O&_Cm8&_Cnp&_CmIpnt|i&_ClD&_Cmu&_82beC9JQhW;6!3;i=Lf&Lkn zLjR2CK>v*ALjR1%MgZ>$x5B)Q~0QzTqA@tAqBIuv-#n3v)r&_Ck}=%4Wd=%29<`e$4T{WHE4`e%F@^v}2o`e$4X{WGqC{u$Ro z|BUOPf5w+X|BUOQf5r{aKjQ%O&v+s9&v+5^&$to#XWRt+Grj`)XM82}&$t=-XM7d( z&-iNSpYb)&KjRkYpYdYoe>CDhK>v(`&_Clg=%4Wt=%4Ym&_Cm)&_Cl4^w0Q@&_Cla z^w0P@=$~-}`e%GS^w0PP=$~;r^w0Q4=%4YQpnt|ULH~@GXnP)6>(|;qMcj4X+d2Y`bt1IvxM@j7^3m_YAY)U*`4?ehJcQUmyi%}(IE}bnu#-5GxJ7UpF=n3DRVO%|IG4Cga3*mf zak1cR;$q@l!8ydRV67`t@C4#AVu#>dVh*S)Rd7CW9kC|3kQf%Bb?rTfjA2E@EySII zi;0&K?+{!{+)msfcpmWz;x&RVB3?TLk-v*Av$Xt|IOrE)!fw zyp6b6u%CDbajxJ-;+@2qf}4pui5-Glh@-@*f?J9A5^I8&5+5Mm`!mOX9WmBLj9+j& zv5k0#;AO7Fyi#x{@q@(efJBBJL!12-e`Kd{N?5!O6sXi8aAC;seBcf8_X6h_zn8oq|(| zZNxhS4xebMg~W}-dw-DmPuxP>DY%$;De(@$ zrNr&T9fIc(uOMC{_#)z!#481t5kE-WF4#l7hPXwrk9a+Co!~0s4&pMwb;R3@MoGQ4LcrURgcq#D#;=SL?{3qsayQ@=hJF$&;hu~$z zsl*+ER}c>-UL*K+Vh8a`!7GW=h}#9E+j4%yq36_ zI9Kp`;(5fGf;SMC5jzBT5c`Nz1#c#7Fyi#x{@q@(efJBBJL!12<8sO7bQ*=%$<=I~Lyo;=SL={3phBCB`q9I~X6&>AQ9a z=1#_!O57osI~w0$;x&S~v++5IR|@71$CpOjE|@zVUnX&jVD5N)ImC5>x%2Vm5|;_) z4#-zXTr8M7Azv|Zu3+wneDjDi1#@TQDm*H`rKWLxwRIEZ}}?dJc&L!6t;c>RUAsWFmwI)VrKE=t#rpP)LttS-vjR$&#p5OTSNl80iI}k|P^psS5-KZGKcP1N^ zU*Endv_G-|S4o=Ia+cgx2^=l_ZP8|^Y)c>JC2ju(J-cfg9{54~Cm9_%Ce{&_pd(#P zsM6lmfPX96+e^-y8{Cu1?SXdT;!T6F6Ad>z9b2c`P}~!J7CVICfnN5uYq35=eQ*+? zEp7YlZTA93f@@ys=?Nt}quVf#qI@7h6)u;;9eUv^7CsAct3ocMk>Fmv@Ol>ht&dT- zND5P5RctS3;U|5K!U`$O)C)^lIK*ZY&XK}mz3>bcmS7XC+T^o1kzk!(csvUyA7K=Z zk-~Pp@MlbkXkLm@I8+MP=!KmuoN=U4c$5_G&ql}s#NMWX4ScO7pgZc?>PQAo+;igD%{Z>?jeMEx8UltZy^PRQ~*lP3x z?Dk*?uUsESTx`cjq7X8ID9K8NYqD(z*u zK&6|R9=gTDBBrbk9j!Vp*_j3bq{03)#ObMsBf%3?X=WsNno4D(EC(7O%>+gBdsUJf z367;4^PTx9D?DD&6e*gyil#Ucyji76K{JmR{)jJ9H215LvPkedmGYoWE>RFy2~DfB z1ywj%uEZdpfyHZ~X6KOb)B|CAsK{v(LFhzVLld0Qe5}opd}m!~3#66IocYjaxCnLf zehR%xdWZ`AZR8)F1Fmfyfq{`3Nx>I>3T{o!>InXv9D4ccTf39Ldp{IiyqThe`CPn7 zN%keyLg1`F3D>8Q$3?P!XKEy9`-ezlAh-|Kr8)#hN091?s>Bfq&Q&S)AT0-Fh|?9# zDpdl>7bvNUUF61Aq9=YM za!U<^L1g-OklOdXul`$i-!R(vZs+376q8A68(0T{QtN6%7oHZWHB)LAs?jD$%>h!g z)RJBl$tFlmX!4!KG>&I6OpNwIMD{lLVvaG5djrZ>4chO_>^?Gl)q(I7tp|C*7gA-& z&2R@glkJMh1r*tIT8~js26=${`7Fo^PuXKKB6cF0DzXlwa`2Ht5k}J0%i_Y|=uN_? zf{QbRv8$B>Jyi{Fa3q+iQbTloIc#bOPBmfjRB2iyc!^4-V|bZE6iv3GsZ}L8k>K4b zH32laIMJgh@=5cY*vYDwuts5&14I7~XN1z7(a)h$j4TD3w}rk9qXgrh2kD|7mLc@H zQ3>c=%Hb;5Ot^n+3M$IzIz>@TiVIP_kfPGrM34Jc#5jwE6T<~R>1Bng2{j*I5C(x0 zBC{|blY?8ofOW#SdU}OkwO>CIODm@3?$Ck7n<+$-Oq)$IT^cmW6jQEQ8JH6?6^EzG zRG)UbOfl`=SMri+r^{5IcDhV4?Y>qtGVOGk%CysEx>Lz?h#}MEu#5zm4uLRyx=hh! zE$aMIgff#t`GrhL8J({vW*9Op)#WCIFUUMxUu2PKsV-BQtCtId{{xv)h`%D!Y^-}` zJH1iK^cQyOz?dSzxSc+x=o0Ky(Zucau$M$g33f`FM486ybkbKAnbJ-TnPR7FXzuH-d zf=F;2L94R}U~8+h7?BujtFu&3M%Fs#3FR9UY^ws{vsvvr=S8YoS-hG@PlA%0&`7XQ zHBhA}>*ADtJsAn^Qk)xw{#-@h4Dgh=jqt}X@#j9nOoSPxp_45r;;MpVtDfv048M{V z&Ua>q(!-4fDJ@~`1_M1EG>pCJ6+URG(BT#DN z`V(n&=E5Yglw)&qI;_|zz*ajOO3#5tqDLb?JeAHQ1ubSGwxQnb=nCfvYKFE%&xS$h zG-#dW*RlKsX+-C9g3#;@U-Of+!n$yZWB1Td0^`9tJDj^OR)h{6FGc8z6TULdKIOZ> z5Uhsjk?CK^YG}XyJ4gzvEEf3hc6Rp)?OnW?+BZ!w^Fr_j&dMXJ4&(kF{x|Y?54FHG zXoK@X2n9)#xWsY8-*8HJG(lp}S-)O#RNm zkPJDB6M95VhfZ(|_#qv=z737@eG80Q-!!ENtK!cgPSu*;giZ2o-7>3olg-FT(9Xfo z|LY88B~g?gfJ10w+xGPza1i+$f8o!ouyz~sWIb*tL>@nn+^D=&XDcCzXxKZGXbQTd z2TC+MFl^QkEmvX0vVTz{K2Z^J#P+raD8t83H5x#7(YjTBKZ?57%ix+gBt;`KVv;ga z4TvoEC?#=xYBQm_sfNE>wf;T}A*foDpvcN3sK0|!1htDj6+wZ*WJ7ykQih;zXr?V( z^pY<2wa(R)fZFZKN^oryo8w@eL9p7nf&`{*T?Ggrt`yz!csi>3&3ywm5Nefv6>|j} zqGNFmYHxd$Jd8T4ogIY2GL^O!t8<&GbBxrv4JDDsuQepj-9y}5*;e!-C8DE29;lNY z1WmgcT8s-?2=76c(U$=voXURdf|kOCs&F#}eOe@Vry=Or#zu{27Kcr9++;|ZVihTu z;A)E3!G?@a$Gt9WByu3us899rpXBaD9|y}Il)N1r#9@Y+?=<+5)g>3|*Ajd;!{GY{ z?xn$n=A&KyBEeQeOKY8{AyZc)FS4Q?pQ5{HKZoq|olac2@;-cY9*qU(4C|%2RyV3e zf`3tb9PAtBBpn63<{hlMwXMhAT0rK_P`T!Iq zsU6`srBq75-u4yhh#|mzV}fufxRH>ZrJdHJZO=B=J)v8vm>P@MWgF1Q( z?6|Z*X^{nFm4&gx!rqV$(tTi%|BVg~FpS`JY3xO6mz-bFCmu&Zi6dV_Z=KPjs78z* z%_Iz*Et`h$Ifftue+_&a7jY|Y>O3Xe2+^S9J5U}tFPx9%R&3xqS_H;*t7y0Fi}kO9 zz&}n@cL*c+6Ri#0{`xUum_jcs{MGtzRx!BH z*7Pc6stS6ID($Gkt5J&Z45biUL!dwo?XZ8sfT5Rx;8WK}k~I8Ql}qk?N=GbN?TBOq z&|WtdxzHArH<}o5dgjZ_X*L*aaPrKS1A~G&6^t?el?*nn{|7pg^p(AhdI+nA!`CUM zMb5#I>zs9DS|oc5_Dt^%d*)Yd*r)*NBC&(-itNFXT>(oOsLqlD)mfrvGD?FN`b(ui zl%~F3PhK0>Z3MS+mQKnABwGS14Y1rnueIx(s9KHeIFo=mX;^}J*#6=yE4Yr zXx1>sDR=@R5^TZDk}1>btYx2M^4W0Us723$@FKx7gJ7+*hy*6rKZMf7ELp}`gDoby z+yRm>9a34iFd0!*#ghw8M_d;Pzeq-uP55z@8WIWLsZ!jfmCB3=kAaT_RdFPIqblQ> z2^*%t7v6!PM{e>!TR`cof!MFd*ck|R=yA3lXXH6;8BLZ635W5Ugg)Fy>i zv4uY#wlv?_Xn*#A7)$U&%0#K?RP+OVwMk#eCzGu;I~&K_TZb{(m^3~xu?71|bZK5- z=4}+xyUt9^$n8o~JRHK~ z1aqnM@k$XUc-3_s#QlGahK@w*`bq&_Cum(CE5Kcj*7c48JXO%T{s9o{lrTKaU|1MD zkZk|MLm=p)_Xp=R)X=(aK~9jKvYxqcFp#g`Sr|NcM_^#E+1aeEM<;upr3u=n?Cm~U z^86{mgT3W?a&PdJgUHI){Mh+9?-Jv}q5e-Rm6=6?9ZbQKzV?9_TiYElw&0dt!GnG5 z*Y1Re3b#I92%DlZqY+#wbe|lZyBpE*(cPHb-A6~$;B&fDq8m}ayHE5AkkHoLywL%+ ze|{hAWs7wIa$r`uxV);~*`B>^7l@C5PYDc0KMWGYvN?$kMxSvPtCcs|G3TlxtVB*Q@Rwf!_z z@U{IYOe}%RKqqh>7+n7@I+@jho;0?7VLz|KK0?t4PO8A-N|wDSueyqj9kvP_UEpyo ztqae5Y4&HY(xUa0jS@ivUk1dc#INz9)zy8&it(N?=t%{kNx_CG9$Ue2X~hOx8< z2Pc%SUJ7Mu(R-*{T6e&WMjk{FOVK$d(a#j6nN-S~El6GPz%D_HF2qh8Hn{XrFh&*8 z4$5?8rjq0hv<{NCTS0qNF- z5LOIW^&(+%8k#{q@cH3lFpmV!z_uI%5Z=krV=#X7M~3v&E~M3}yERvAo!3beK|4x9 z|7QP(a~vv|dg2v24HEy!eJ{;6!_26H3+Y&Nh5lBak1 z0wX~Kt)M?t1NUKvEe${lGJo3k(|pOkmqzpb15)=5$EBD|`QYDi1<1j_kIe_zVAz?0{7C1FdA*UB3;I0%4tX$Y zhvq*PQIY0P4I9UHn8e#55M*a-{tGat4RJ*$aUYiG{kgwr8ku<^T30$4L>$rNxmeynzOL-*tq;f#f+t5Gh zQ(!>%)EEhT%!g3CmDNmPbw8wf8cqtJe9IZG(C^8v=XpU z7&njz@p)j3ij5TS(`sGHg!ecZT@`99q-3Dan={d*?mJtM4KIluP1_g#Li@7;P3kMh zS(lUyp9c1WMGE#-{!JMAG*mj2PkRj#PV{NAB(n|Ory*r;eFFc|r}2Rxa=(Hj$E*eH zx}OyKMgxMgbj^W&Sh{wVGWOQ1VfyIWGE_QL*Tx;XYwaLcUHcPK_SWb1uDzglZ8znM z9Rv!y9z`CV3nKm^nB9nI!Vn)fEwn$G;URhu02GUJGrPVM$&rs3EnS6dS`&CvGqR_c zg>H6zhKxu-5?1OmTuSvadpLXKj(yNHeR|QO$#Ck|14id#?1pc<7`jC-*<=39-Ow9i zZ=%a-iP8;jb*$ak2Db|)hjM{3TMxabxf|;|Hn0!|{2v;FgeYH1NT1}&|DkE|e=O4{ z^>@mC<&G&$;xKj(@ovspN?7+gyU_&mzhewruO*!-7k~2{@?r2+PdS)Zocf8G5=ydo z%Dr#}^pxMCD{)ULgvwLCsuS#HU%R50pqBEK>(~&l3U;srJsN}zTsGjkr3?Osst}Myr z5panFUt#iIN#?Snw@UI{Ca;&|XCw$p@yKp|1QbT)VY2Gi^V-A9epCGT}ST->d?`4L7h5!T2Sgv z)whQQmFehCLG3!aQBa4Df`U4A6cCh3ZwT2e01EQe9d*Jdw>4jZb4ZWs0>9V|CBtAR zVhFhWQB#y<(G4{1t;h*|5beYa2>zU8zj>p*brmP(55W%)27l-k`W8o?4qQqh?Bcuc#4T-SXyeB3PukdZLej=aZW0V<$j0yc;4(8UvevmCWO$q$i)$ybQQRth{?w`I{g}csa;VP%|@YT!6 zT`!cIRNtZa@Tz4wD0W1^08COb{*=%~@E9M2d8D9D%ur85lS?26G|92}N5LhG07)9w z1!voJt>pbAy?kI$EVrmN=Sf;tpjX!R{Tq7)W(L29^ICx%km$pB9W$=2<2lx}wrf>ei<^!C9>mCxQ4wEPG`QEX3 zV-KBiWbMbX=CP5fsUcWbmk0|-HaU^H)KFb=Xs`aHsd-BOc!|g&6;Aw!V8>q8+laAN_n!H^eGD=Iz{%}hzye#jkBSuGsgFZk#-EKF5fx}B z6Pvt^TX06@caH8JYR!rB{1WpTz2jpqgY{{ci~|TfHlkdP+TT3{RU4g0oXigzEpLgBCX>`N^mO;hWBkq z{Uo^X5@;hRBEePE93`qY7F->pXMitdvs~EyOP@$O1+G`L=pdcq7643@sTl1!!bRUE zflc&WQA67oSC80|pMH)OhChZVc)Rr+s&uI8JhIcGbGP>NjQBF}B&^;EHoVhR1Qx2r zWR2Y3015ikmIfp3o(95n5T@WEd*xLrP!Sb|awXpaVRztoc)rJBC)#~XB*<-2cYn2? z;zp4>42nJyJLEX4w3T_=jnGL5hproreV-tcWr_gy+ zXJ5lr&h+kKk)Xx{1$48Bl&In7)PeeT!HwxPFwAYJ!K;dhN@5(w4gZ%=5+7EI%u)1v z7pyUVk$jl}tx9bh$j?Q#mx##q?(farc^UO0lc=umf_NU?FqV11!)Ps z6e)XtVNDVaL9hQeXwY5`jB`R#U?^)NN5kGnXAme_lhm?7cufuDc0aP8_q6mfKOUjo zYG_mzX}2Q|zmeNzm zk&`puIae<|mZhIO&${E|rITaNi5$)H7g(-08J}Fz>}gOx*i{SLR_7j&o7+7?70=a+ z`4Wz~;XRzT>IVL)@giySH5Mtmm*xR5f7_^XJ7T zJ)G`5%OKhAj7V?>V>r?Kp(Q%e^^D;}=``s?k0FK=z0}ZR%!xjZ4jC8IQ_&oqXmHPj z(A%L`4KK>S7f}(;&^H>6Xa{`FFE<*;BbSTm@w6vwu@AM;cpHszTjAhF;{|Lqs+>dB zM#G#F-)Jm>lA++(9tc$vwh{ZGrM8aHVfLk~p%9j$@z^#ZZKGJe?9#%Ap-)5LEK(q2 z5XR1CFlk~HqkW$vzs5^JjVlaU64gWypJ#)3F!M_*f)lks2AB+Hws0N{&T0vT2KQoF z03CLA`Ocy0reELS<_WsWWL<-5cuqjo)KPU%O}jBkVyYR8-WaM`jftYxx1UVwTXhNN zZi{iK-0FM=9a00d$^7$z1q>(^%dI@BQLG--DAkuh92(F`=Q};JU-n^4xpX^-(c106HQ;xy0VB>m?s#TE%)i`GNbas8>deI9-p$?*NPEMVzVU7wWNG0CuNDuH^#> z`mWvY^x=7o6SiJk#?IgeL3*~zeFpVRMr!yG7U3|qFQ0k{oQsDtitUkmI7}W6r>{Xa zp2}#4tXi((QyEK;3jJt$Dg$%T_YC!9Z~Z&&5>E-OBFE6~0=5<6Q{BEuASv`?=yB%% zaS9ikdG=?c;#7jSsAU)9v2mv#t%iEY>Q1o2gBkPiV8${g`C!JB7Mcs#`fyf>Uh+8z z>1C!=I53{yZ~qBue?T zpw_iia!Ty2*N|T~?vI)@;^?YGE@;z0s&!qYK&Dij1z;i_(ls$LBfD#)B2O1`{w)gX zLDx2B%hwPcZKtb`qRSV$13ycHvf6ibD^MmS9{?nBSfe=P%5xXbvG`!ULooAq4d0gSRkJb+P#ZLawNjL?tVOUNS_A3P)d#!==vmBP;S z3Z^ionTWYNT8Ep`#v>RXVztL37(VKSk6>K-Eav^m(aBgW@Ce3rsDVc?K4E4`^jY*4 zk6>I22S%&9g7>y@hVnsl&;~RhyQ|BQhjC=fQF6ZjScs6jDGc=}(8#{&e6}vPT>7b! z&&cnKz$vKb(CKNx6f5eDcv`QQj(Ue#?OAAqRFo@X zIXed1$G{d1I!z6d0)ts^bo52snN>ZczXG9;qke|Dm`m7by@?9+wHQqqM_uF}p2bU! zLi9WGI4^bazJh*3q!V=hGeYlog^>uo5T}z%V*8Y>Ivt;}w72R<@1D>HU7e7F{n@@~ z-V=I1`W|Ez*1|`^ylHh7xS`dZAR-}JWfHB*<`v@bgp!?MR^J4Rr?z|0yR7Y9T;A=^ z@~J}J<$zkEv$Hsu%fl0#a>F)V;7Y_ zU}uP@YClA7#m0>`W7ATX5_&aK!wY1wma&jv#a29}QW3hkS8&S^PLU+cGH$KU|GP+c zFF5GEViLU?h;i>=2l-ZWt8<^qO%7w6%4H>9_THsz|N3PRfK^mpaqOXk;VP%kE=R~= zzw@HV67Ijd8d2d;4`URwWBN_yk1+tV1musMRD@SMX@A@kn+E=+Y2XvkDeJ&(;KhNL ztp!izB&h==_bPQ5LyS&D?a&rnr>lOykgU7X0G)scb~O|wgVhCn9WcCAz7|N21WUOy zlI!+2VOvP)r)Y`S?GM4zph^zB>bWG7gEq1M=(Fe{RArtuV2S&y7y&GAX&E|XzO#s) zl+uwQ8}_dg6##L#NgT|-6K`+4Pf@_hqLI+fN!>xnT@FB*z7R}UJ>+BvG!=$YgH5^QpKz~ZMrb$gcA#HAds{0yj=_a~jDC#C)zLy2MFHW;txf4}4I{ePi!N`)f_c66jq(Q+b*dFwY(aHv7qOvn|XcsLEf{6s>@f#@U z-AARf(XSZ;UrIM26!Pc|a@L~+x0R}OyQeVa{&9;K+|?&;$xp5p4-g67f=-Z08>(Pv z^SV!#XHe%QKJ0QH?T&vY#g2YO^s6y6iC&YrT#=pfIBAZxx9x`!q9FRUZb(m2Qjpl| z7zy-L%I1zipLK^|y8h=Cpt_ip#~+HJXHO_e?Wse%w^GKMJ#y@~sEbuoe+0q?82tI{ zz|j!a5;P5mM7n4R1@~jLL1j_T(OhIjf^u(q%#TdUz3DV2m&m>88$cCV^7t+&hL#dp z@;Z{;&5DBTruEyI^H#GYFq@}NZ!;feFc2K{+QRW(#qmrt$GQZL$CxX)5eVBz>3Fx1I~CN}&{VhhIbPcd;k zUpV>;aXQLe`el7fLQy`g1QBh3uJ8~e|7Z~wljlhZF-1_4hI&%6BcgFKSRvyELemo zdk3@erg9{B?|m{LZvA+vj2=@S!ue=Om~}4zMDa2fw>sA%ituT%R(XO0$xICF3-av2`;b0Hmdz2hI$r`SG~R&-Lx~RTl)`O*l*T`qjS($H zANAfsE))#A8O}}KlAEk;)h-WI`b|t;MQb22n6S5iZ<3cuT76VMl;8vP5gf3HYY&do z4dEsg#3u&ePuRn&kShm+q*o`#4secc`74cSJw~MkhDBGvh+qp*$3uv5k0A%< zi#vE29eMl_mci3~`UP3tOK=W9(C`q!v(R7u(IeSbMhcQuGfKzLfuXt>f^=0@3d}gT zc_7}+mOr4i7hNz|<&f1{C$4)bWIh53k*`GrT+!c)mjvT-!4Q@aVH}FKtPLaMH0D7B~J`< zB?*vqJ7RvF1<4giR^h`gNG?ONq_VmW7QB#zoS=RrM%E#*6A2nSGfR=q)byLw;er&j z^)a$AUrB}QVobGGs0p3sRNKQ$lkq$Vr$D`a33g$0bxUpv?=|!DKwEQ@tGtt|wn{(H zQVU4fYFLd%j27n*ThXUjmJOG~Y~KFFv|hY%5ec79Bjk++)u;muqHn;c(3cjZksZ}| z-%7~_u6`(z)?N;UWgwd}h41VgDzGiyO!I)vZNheBuwf=g{a!}F$E6&2B+JRatz~K) z?P<|lj7Lq_DkK=}prJ;ueh_UIq*MfR@U&H=a0s(Gfl{2&F%PIBZd-Ng zc6c-0cKKJV*%H>s#pJ5yTg=MmLK(3IeDR*!VfzO8Y>-D*J2R0*XHf;77_Obo;%`bo zkX;e*4R3I+0Y&`nZ0fHVvzAZ&;xQVWo?;=;kIHNsNZB@|rA4P>OuW*fF~Bsq$&b!e zt-PdKX+bO9r?Cu=f-?QP2>Z{0gZ5pu9G$3WZ=q@-DJM8A-pqlB50H0{(x9%j$iYiN zxq~Ig!DOl=`7hqIMMj|w|7ck~_I3Faq?JhUVV&zM_xAKm4fZ$!AAuDItQvhxFMb5Y zbWFFP@$SVXbBhfj9(kr{GFADT=mOB`hc3;KQE+oI{EPZ4m~+m{>X};-{R9eGyy>kR z=yK1HF#bAD<h6B^BdG|(R#lHzQ8mOV|v;MSxw zzYFXRZXR;sC9aD%bsyPo{(ZAa{~PBG(qcJVH2+a^POc=lxJiM^Dvx7fgQGrB!|!`I zs@;B{qq?#Iak;ObHY0zmLw7z3iEy?dn7)SI|~S9D+LU(A2Z@X6DbD0s6!yXO|pup!tQWMGLii ze!143RJ>xs>$BFpz5MK}(*AV~Ki483*K&9&@r5nF_Wfm*S2aIzQ)Ko9qq6?`m3xPV zN*-^;0$=5&msM5Q)Ye^&@4W;TE^2JLLd%;pIe$vQ)WT`g&ncQQb5`-Wvr9_n%sp@3 z`4{|prOd3+W3tDNJ0s^z?KS_Z6|XP)=ePH{hos+`cgLMttSCmbMk`yd%k${xcB;Q)TVnYyjo$U zqZA)3^J;%uR)58~oTrBzz3=)1gTg=Ep)K;c{SHs9qsi@96*Xy{`|q3tbP|ik)yr;-~MTHpUs|q;=rP%@2%fDW^eTI{n`axbbZd!=jbdW9peKIi5EKJDVna z&CtOw6FCa%EAgo!M{Pw#hE_jcD|gqN>UZ$NOpc6E{MuQ=DE0lUk(YU!GVn#jbVo5h zoYvr_Cv@-&Q4aOBD~GQZZjs+zGU|DJqcgK}SSOaHvm)O^c^V#QN`IOn2cCSCc?T?0eI@WAv-vX&3I=Snym~VCJRC&f&J3 z16wc9&bHlg>Y2ei_RM?IvnOXV7KmT|YHAlbDjOVrpVuL)1+5gHm2wzr9gsb@u^s9S zH_u*^bb8hLS@!O4esnEq7}WOo&~uiYe$LGQQ2*cuPpw#3Iy#jmLY@Xcd|F<9N1dFN zcdq;L#gkW#xcar$1N}pu*3kprvaJ}rY>@xj0ava0wf^0_>`&*pCM_;Wf9Z~bMR$*R z(Xy`9@#~hJlTG7IT;L8_Zd&PnS)RD${YrUk?fdoe*dk~lNn8pog&0TTns~@^)8hEc z^2Am0m*t7e~o(F{Nx zrVY$`1~%vYCw@lxN#HjXVV>R>FXDQHYjjMyWk}zLuujioJDc=$C*m&BdRL`vUS2WHk_KmL_zi@oj_`LDu<1ZUO zfBY3C%o2_>7|izF5998K~j6WgY%ndS!?H71+ega(|;7l3>+SUK$^* zbEt1MI{2|XN0#or`At=aaPSOBYM0G8o#p^ROkqxPJJK(B8&dkzP+kgWo zuaPfbV-yq7`KkyJ2bg!eVWGlQz=lm_W`Gu^%Z!OdB^E@Ykk0 zu+w!1s{AtSk#&vunUyg*ZOn)f77pc(37jEpb#nasuDZ3dE9#ff(aYj>&WX(mgEAf`)X9t2 zF}IT!z(*zVxm{y!CDa*-E!-IynfNb@KFm|;;r>iMKkCpwM(U{aoP4tG?9_KjO(llo z(_^tK^;Kp^?Pcj8ticyL7dS8(GBPsMAuRmM7`Et`IjeNacn7|~? z%DU;(`Hwt1KK4RyRb9G6zG#V^5DYuOk0&Q~Xk?XR0zTU*3ZE<=DHc~2BN{nBuH8xA znsQ&YyB?w!8_|u3AB+}^GW}Kew&#bK(IUip-y^KboTuEG*q_2P-IUTh3o>|G4kN?uKUxYUlS$B}|sRz2TkICWn(ieS_LCjzjHEbc$cu zoEXCUpRcEfSZ_@JQ7t>VFJ*-FGWMH9yT%5}UDE{5@AuYMxXZZ);IrD;uhv$;v6j25 zxHWUs)>Pr+rL12PUyr#S$cAku*N$n}DB!dASZ#$+|A+oo*VwQ6*fB`QG_~1=?(U@Ehk#auZk$RTF0|_q=#3jteSoaOqg7P8)`gv5STB^Y7}z?Q(Xc zGUYr=cI-l<%GEdDO;o1uy-V(}%+ZaSLpG)v8Kczy>f7QJD-NmD{lt-v8QJOV(qh@o-#yrhJ3Z3i}Vt+tfcbZ%hA_ysiCh zc`x)&=F_mv2rr>7@09=c`%MDBN#HjL{3e0lB=DOAev`m&68KF5ze(UX3H&C3|92&@ z=H6smI|4`e#E;3gp$IP_Jg%p=Ax`^Ag*Sdqwq+rWOH<7V6?pEL={h~0hIf$gg1xrp z&&f9a&8}tmT=sE@JMeMo6AG6)WA1xfvh5gz;Rxdp3J~TZR3I!wSc0$|;eLd5 z2wM=|M)(wAKSJNzQ6FJA!Z?Higt-V62n!LGAS_3?A7LHB7KFDEK1JA%(Dx41M;MMU z4xs>HEVI9I2gtrksMc9wf_b${&7>+Owp#WhnLIuJ?ge3^e5$;D= zhp+|VZG=w|_9OJY8}$)}BaA~RK$weAfv^x^3Bq!O`w`Y5Y(aP%;ZubD2z~ECeT3l% z;}8lE<|0%eEJRp>upHrjgmnm85Z*>GZ0OVFcbqlt!jICMziQd^%$rTu-}uDhKb-q? zpG!`2c-p5oJy7?-zii_JmJn6`{wq3?~@qa@frcRzb-jOzEKAz4EII=TxGDeTgIx`?JYlOgvPWhq!ZD6Czk5N$sM%ABrsS1OagE6yRZ&^vt{UM;n~wuY9GTWQ zii+mWz}?a85xCXV&{XYr&qwU9SFz7X$!TkymVw*V-i*9S(?)`?juzAeGUT*#WTi*T zAo95zd|HO5sRsO1?8gIhEYbUz09+`;eOS_~L|v6%%c#Vmr4FpA2bIv7g`2 zpk?r87|uQooBThC>D##u(0)o6C)@bS1pTh@V;O&^AYh3QIv?nKC~yE9KduM-@#eTe zw-j_d4|Ph3`p2Nl2i&jwbFLw)K{o+;Tub;P9m7lnt|ROp*On;g*5FK)YYmb@!}HL& z2wY!C$F*n$Dsc@mex&6Oe^692))B5DmtqkbheD%W)@Qg3f$I*_Tzghx5oy9V8LNVBhOhimZ~EV`7v@iW@J z78wRzC+Ir4II{u$N12e8-=>Mt!C!TP*<&R-5hBv@w*tYSSx|cwghCJhEv>QbRbw+;NTkHcJ z8(JAHksGo=ID&Y5WGW@iXXpkYUgjj_zYCyc;@Y zhW;ZRe|?b0_SwIAWBSCmqztY$6!hr&vG#$L0xcsAt^RJoAJyjNIFK+bQ4xf53NSYdiHj34t=Va|MD zeIL;qe=~zW&OgSz#p2aGQ<#>mX`D|AQ*wBAHinhJI6qW5chYJeD6Bj??OkCg0zcZd z!fK~(?2UVCa8mfuPE|Q~>iE$f@#`(Sbl4^APGMd#DEm^FPAUHDt(~B2NaZDKU-eJ| zMt_oUML-S?{ko{`Lg;If-^BxiK(HdV02F1B z$R|k~psiRJSUXHI(uxB!@vA?`$cA@IpM?n2ybD*qbzMpOBZz>k?Q z-!CguTFrYkB+qTYADR018t~^P{4VfUCj1fWn=n5t{fY^H3%tvO z4+78A)coQ~dl+15VNx8Y0+#_hpmf^9P~hudNw$qfJzSDDazVqv^#*g-OqXj<(yaWD;W|#!;@)U3} zaEp$g2kv?|*>;=G|7A;k+H2MOasASs-v2y~X)nEZ$1&~Y$q(X~_OifKPJ8j2a0~F+ zCQN%-Y{ImcR1>DX6qzvX<$4pQePo#Mrx?%Irv7{he4?qG`mgAW_m}#wHsJ%H_nR>7 zVV(&mK@sPga6e#|3DaH%ro`=o_Tn>P>Zdg3zm=zson6ecGyV#$MS5H@6gxRB$9@1}1oe^H6PEIKEcj;& zwi_2BQXgk{7MyOu6D_#Zf&(V(0M8qNQ?b6X*#W(d)E)pf_5%*gx5rHM9M5wW{F()S z1l;&Qvh4yWg8cRXFM~fwMFYe?S?G^3HrQ+*VW4`7NQJz9u$1@W#kBro`vWa_j0I1!;29R|1D^jl z&b4&;UT!IGvf!`<-(|s%Tku8;{-*_hZo&N9SH_RylZ}O*L3|t}W9)|qU_X44NJ{=nV)lWqLdMy!8=xFAA6~5vGhxbOoCTj_!53Qa0t;@j;2SOY9t-}P1wU`WZva=t{PXeJ zPD}ac7W^}?aXruVIvJPrJSQ{sc?7WW<9G*|Fy(Qo3A216u*am2slf5|;&`pZLVpQx z(Z7>zr|Rovxuv|(f)`uxt-vR(PquL%%K3AbrF=bbD{M9bJ15@K|&<>I1a(QZ93#w}8yQ^Ft ze{Fq(%N@Y$%C*&XRbIc>lQC}WnVH~x2qG76SgG4jF5E@J8>8xml_yYL-GnM8xx0(L9UBv5D!W(=uIbT@oCZdi6w!jtaz^k(2ZnBl-Ri-gB#g zZZvsmv;eQHsniVom5+)S+r>R6Gf7BoL@K zXoNr|L4cR9^9wT;=y4t2WOJ#Pk>Yjrda*jXC=FR;$7EqBa-1RMabvaE>p3#3?I-=mRHxA z3-f(by*1u?FgeHDRP4rIywRJ{--LCkm#{6J!zA_B*EX3Mxu%uQaK#;L>5R#Aucdsc z7$a@W8J7W*an+T({JucVWf}7uHQsc0DY2Q~VbbK)=L$3Lii)a0gU_5}I4#qQRbt&n z@7b3A7L!Z;=>fcu1t$eV!#K6s4esK={Hn_GDK+A7;ibJ^Gk;wO`dirsSLhL<$9s^j zn%Wxm9`1jk6j29Wy)Lgy5ET01nmoTe->X_SO-&7dCClGn?nWUTwBF@J>!9J830+=! zgh5xeRw3`|#tE`w`ooAku0?Kh?J;=Y+B6Kj8LP2f^+uVwgu_?Dl*t)e1~fK1!!uTE zs9b^DZwS9<=-37Dnt~PD(WqL%Mf(iHAYS;&&JE_j7!Vwuts>Aw1iCs zCzjh|Va-v<-*3SVitqEg_&&d(3C>*fQ2vfgeShE_TgSl3Z@?;Ru-6O z8RpR@TBd8-EVP8bOTdLi#G>ktwy58h;f(zpztMd4*Tw>-6SYx~LPyoMkbd3cjHmua%|2-@$jrb28a&V=Zc^`Q?JA zH$yX(_q{b-OnAtq+?TMlL#Q>D=vg2rt**;2)X<>nxNG`C*KGajb8;15m&Q7S`CD79WMcG( z>x_92U}#Ln#OWM&DaKX;=E7|zy{VZ4x`1mr)eEltF7B@BmYcB9Ro5;|AjSe%X|61? z)*Y5UHdZxMtb_vtFg9C;kkp@BF>}&u(^@RT;*OTt@>f-`j{SdST)PT@Fc9l6iJwpe z-K2A5l~QA^M7cqWnuA4f*`-M%Q{ca)2n4g!v_@-gtxyD3P-hW2-WwTrV}O3 zUQfi1)>BQ}t(q-ltuue@!bIm<3Mp<$6h)y@l(5vX=AO90i-FMGV}h-4P#ua7WFQKX F(R|L@1+oAD diff --git a/project1/cyassl-3.0.0/testsuite/include.am b/project1/cyassl-3.0.0/testsuite/include.am deleted file mode 100644 index 900ee8d9..00000000 --- a/project1/cyassl-3.0.0/testsuite/include.am +++ /dev/null @@ -1,25 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - - -if BUILD_EXAMPLES -check_PROGRAMS += testsuite/testsuite.test -noinst_PROGRAMS += testsuite/testsuite.test -testsuite_testsuite_test_SOURCES = \ - ctaocrypt/test/test.c \ - examples/client/client.c \ - examples/echoclient/echoclient.c \ - examples/echoserver/echoserver.c \ - examples/server/server.c \ - testsuite/testsuite.c -testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) -testsuite_testsuite_test_LDADD = src/libcyassl.la -testsuite_testsuite_test_DEPENDENCIES = src/libcyassl.la -endif -EXTRA_DIST += testsuite/testsuite.sln -EXTRA_DIST += testsuite/testsuite-ntru.vcproj -EXTRA_DIST += testsuite/testsuite.vcproj -EXTRA_DIST += input -EXTRA_DIST += quit -DISTCLEANFILES+= testsuite/.libs/testsuite.test diff --git a/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj b/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj deleted file mode 100755 index 6ed108a2..00000000 --- a/project1/cyassl-3.0.0/testsuite/testsuite-ntru.vcproj +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.c b/project1/cyassl-3.0.0/testsuite/testsuite.c deleted file mode 100644 index 419704f0..00000000 --- a/project1/cyassl-3.0.0/testsuite/testsuite.c +++ /dev/null @@ -1,380 +0,0 @@ -/* testsuite.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#include -#include "ctaocrypt/test/test.h" - -#ifndef SINGLE_THREADED - -#include -#include - -#include "examples/echoclient/echoclient.h" -#include "examples/echoserver/echoserver.h" -#include "examples/server/server.h" -#include "examples/client/client.h" - - -void file_test(const char* file, byte* hash); - -void simple_test(func_args*); - -enum { - NUMARGS = 3 -}; - -#ifndef USE_WINDOWS_API - static const char outputName[] = "/tmp/output"; -#else - static const char outputName[] = "output"; -#endif - - -int myoptind = 0; -char* myoptarg = NULL; - -int main(int argc, char** argv) -{ - func_args server_args; - - tcp_ready ready; - THREAD_TYPE serverThread; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - server_args.argc = argc; - server_args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(HAVE_VALGRIND) - CyaSSL_Debugging_ON(); -#endif - - if (CurrentDir("testsuite") || CurrentDir("_build")) - ChangeDirBack(1); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/ - /* Derived Data Advanced -> Custom */ - /* Relative to Workspace, Build/Products */ - /* Debug or Release */ - server_args.signal = &ready; - InitTcpReady(&ready); - - /* CTaoCrypt test */ - ctaocrypt_test(&server_args); - if (server_args.return_code != 0) return server_args.return_code; - - /* Simple CyaSSL client server test */ - simple_test(&server_args); - if (server_args.return_code != 0) return server_args.return_code; - - /* Echo input yaSSL client server test */ - start_thread(echoserver_test, &server_args, &serverThread); - wait_tcp_ready(&server_args); - { - func_args echo_args; - char* myArgv[NUMARGS]; - - char argc0[32]; - char argc1[32]; - char argc2[32]; - - myArgv[0] = argc0; - myArgv[1] = argc1; - myArgv[2] = argc2; - - echo_args.argc = 3; - echo_args.argv = myArgv; - - strcpy(echo_args.argv[0], "echoclient"); - strcpy(echo_args.argv[1], "input"); - strcpy(echo_args.argv[2], outputName); - remove(outputName); - - /* Share the signal, it has the new port number in it. */ - echo_args.signal = server_args.signal; - - /* make sure OK */ - echoclient_test(&echo_args); - if (echo_args.return_code != 0) return echo_args.return_code; - -#ifdef CYASSL_DTLS - wait_tcp_ready(&server_args); -#endif - /* send quit to echoserver */ - echo_args.argc = 2; - strcpy(echo_args.argv[1], "quit"); - - echoclient_test(&echo_args); - if (echo_args.return_code != 0) return echo_args.return_code; - join_thread(serverThread); - if (server_args.return_code != 0) return server_args.return_code; - } - - /* validate output equals input */ - { - byte input[SHA256_DIGEST_SIZE]; - byte output[SHA256_DIGEST_SIZE]; - - file_test("input", input); - file_test(outputName, output); - if (memcmp(input, output, sizeof(input)) != 0) - return EXIT_FAILURE; - } - - CyaSSL_Cleanup(); - FreeTcpReady(&ready); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - printf("\nAll tests passed!\n"); - return EXIT_SUCCESS; -} - -void simple_test(func_args* args) -{ - THREAD_TYPE serverThread; - - func_args svrArgs; - char *svrArgv[9]; - char argc0s[32]; - char argc1s[32]; - char argc2s[32]; - char argc3s[32]; - char argc4s[32]; - char argc5s[32]; - char argc6s[32]; - char argc7s[32]; - char argc8s[32]; - - func_args cliArgs; - char *cliArgv[NUMARGS]; - char argc0c[32]; - char argc1c[32]; - char argc2c[32]; - - svrArgv[0] = argc0s; - svrArgv[1] = argc1s; - svrArgv[2] = argc2s; - svrArgv[3] = argc3s; - svrArgv[4] = argc4s; - svrArgv[5] = argc5s; - svrArgv[6] = argc6s; - svrArgv[7] = argc7s; - svrArgv[8] = argc8s; - cliArgv[0] = argc0c; - cliArgv[1] = argc1c; - cliArgv[2] = argc2c; - - svrArgs.argc = 1; - svrArgs.argv = svrArgv; - svrArgs.return_code = 0; - cliArgs.argc = 1; - cliArgs.argv = cliArgv; - cliArgs.return_code = 0; - - strcpy(svrArgs.argv[0], "SimpleServer"); - #if !defined(USE_WINDOWS_API) && !defined(CYASSL_SNIFFER) - strcpy(svrArgs.argv[svrArgs.argc++], "-p"); - strcpy(svrArgs.argv[svrArgs.argc++], "0"); - #endif - #ifdef HAVE_NTRU - strcpy(svrArgs.argv[svrArgs.argc++], "-d"); - strcpy(svrArgs.argv[svrArgs.argc++], "-n"); - strcpy(svrArgs.argv[svrArgs.argc++], "-c"); - strcpy(svrArgs.argv[svrArgs.argc++], "./certs/ntru-cert.pem"); - strcpy(svrArgs.argv[svrArgs.argc++], "-k"); - strcpy(svrArgs.argv[svrArgs.argc++], "./certs/ntru-key.raw"); - #endif - /* Set the last arg later, when it is known. */ - - args->return_code = 0; - svrArgs.signal = args->signal; - start_thread(server_test, &svrArgs, &serverThread); - wait_tcp_ready(&svrArgs); - - /* Setting the actual port number. */ - strcpy(cliArgs.argv[0], "SimpleClient"); - #ifndef USE_WINDOWS_API - cliArgs.argc = NUMARGS; - strcpy(cliArgs.argv[1], "-p"); - snprintf(cliArgs.argv[2], sizeof(argc2c), "%d", svrArgs.signal->port); - #endif - - client_test(&cliArgs); - if (cliArgs.return_code != 0) { - args->return_code = cliArgs.return_code; - return; - } - join_thread(serverThread); - if (svrArgs.return_code != 0) args->return_code = svrArgs.return_code; -} - - -void wait_tcp_ready(func_args* args) -{ -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_lock(&args->signal->mutex); - - if (!args->signal->ready) - pthread_cond_wait(&args->signal->cond, &args->signal->mutex); - args->signal->ready = 0; /* reset */ - - pthread_mutex_unlock(&args->signal->mutex); -#else - (void)args; -#endif -} - - -void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread) -{ -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_create(thread, 0, fun, args); - return; -#else - *thread = (THREAD_TYPE)_beginthreadex(0, 0, fun, args, 0, 0); -#endif -} - - -void join_thread(THREAD_TYPE thread) -{ -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_join(thread, 0); -#else - int res = WaitForSingleObject((HANDLE)thread, INFINITE); - assert(res == WAIT_OBJECT_0); - res = CloseHandle((HANDLE)thread); - assert(res); -#endif -} - - -void InitTcpReady(tcp_ready* ready) -{ - ready->ready = 0; - ready->port = 0; -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_init(&ready->mutex, 0); - pthread_cond_init(&ready->cond, 0); -#endif -} - - -void FreeTcpReady(tcp_ready* ready) -{ -#if defined(_POSIX_THREADS) && !defined(__MINGW32__) - pthread_mutex_destroy(&ready->mutex); - pthread_cond_destroy(&ready->cond); -#else - (void)ready; -#endif -} - - -void file_test(const char* file, byte* check) -{ - FILE* f; - int i = 0, j, ret; - Sha256 sha256; - byte buf[1024]; - byte shasum[SHA256_DIGEST_SIZE]; - - ret = InitSha256(&sha256); - if (ret != 0) { - printf("Can't InitSha256 %d\n", ret); - return; - } - if( !( f = fopen( file, "rb" ) )) { - printf("Can't open %s\n", file); - return; - } - while( ( i = (int)fread(buf, 1, sizeof(buf), f )) > 0 ) { - ret = Sha256Update(&sha256, buf, i); - if (ret != 0) { - printf("Can't Sha256Update %d\n", ret); - return; - } - } - - ret = Sha256Final(&sha256, shasum); - if (ret != 0) { - printf("Can't Sha256Final %d\n", ret); - return; - } - - memcpy(check, shasum, sizeof(shasum)); - - for(j = 0; j < SHA256_DIGEST_SIZE; ++j ) - printf( "%02x", shasum[j] ); - - printf(" %s\n", file); - - fclose(f); -} - - -#else /* SINGLE_THREADED */ - - -int myoptind = 0; -char* myoptarg = NULL; - - -int main(int argc, char** argv) -{ - func_args server_args; - - server_args.argc = argc; - server_args.argv = argv; - - if (CurrentDir("testsuite") || CurrentDir("_build")) - ChangeDirBack(1); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/ - /* Derived Data Advanced -> Custom */ - /* Relative to Workspace, Build/Products */ - /* Debug or Release */ - - ctaocrypt_test(&server_args); - if (server_args.return_code != 0) return server_args.return_code; - - printf("\nAll tests passed!\n"); - return EXIT_SUCCESS; -} - - -#endif /* SINGLE_THREADED */ - diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.sln b/project1/cyassl-3.0.0/testsuite/testsuite.sln deleted file mode 100755 index b89dcc1f..00000000 --- a/project1/cyassl-3.0.0/testsuite/testsuite.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsuite", "testsuite.vcproj", "{9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Debug|Win32.Build.0 = Debug|Win32 - {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Release|Win32.ActiveCfg = Release|Win32 - {9D4D8446-CE91-4F7A-AFF2-90D0B5DCD717}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.test b/project1/cyassl-3.0.0/testsuite/testsuite.test deleted file mode 100755 index 4069765e..00000000 --- a/project1/cyassl-3.0.0/testsuite/testsuite.test +++ /dev/null @@ -1,228 +0,0 @@ -#! /bin/bash - -# testsuite/testsuite.test - temporary wrapper script for .libs/testsuite.test -# Generated by libtool (GNU libtool) 2.4.2 -# -# The testsuite/testsuite.test program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DNO_MAIN_DRIVER -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file ctaocrypt/test/testsuite_testsuite_test-test.o examples/client/testsuite_testsuite_test-client.o examples/echoclient/testsuite_testsuite_test-echoclient.o examples/echoserver/testsuite_testsuite_test-echoserver.o examples/server/testsuite_testsuite_test-server.o testsuite/testsuite_testsuite_test-testsuite.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "testsuite.test:testsuite/testsuite.test:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "testsuite.test:testsuite/testsuite.test:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "testsuite.test:testsuite/testsuite.test:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'testsuite.test' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/testsuite/testsuite.vcproj b/project1/cyassl-3.0.0/testsuite/testsuite.vcproj deleted file mode 100755 index a569b131..00000000 --- a/project1/cyassl-3.0.0/testsuite/testsuite.vcproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o b/project1/cyassl-3.0.0/testsuite/testsuite_testsuite_test-testsuite.o deleted file mode 100644 index 0cd98a3991f49d72c34a930ce41acdf276a5593a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5852 zcmb_gZEREL6+R&boHP(9v;&D&9=eE+fs>H%wX!uKPJqsoHcsd^Xf4OSA*TMCeGNon zZL_c9rXMo^#H7-gD0TdGmBnxVNsZu3pSjC-qY20?;ds8gwYKNtQ{Y3`8C~GJ13G zB9ZqfJvutY=H+qg5r|6T)+RUr>epy1(0d=w&COLNti9k%9oB5f^05~sK0E2O8d(e6 z7+IyWt~oSQDYJu8*z%QpmeCaZZY-~iDY=o|!Q-A!;?Y^F{k{Kvc>P${|NmfzKT)s; zOoXVRZs)I-64(@JWPQo8d<%2&maQ^wU1fF0tqzRE(5!}Vd3^UsfYu+Ny)V3}}Vlvy;td-{r7F+=dxZBmOPLDXXchM>Ayk5z-ZU_AT_x zwqN!ko^k6O)#KI#NF`)BU@vL5AM9nYNMjO&GZN;sgJK$FX59K7h)VQ4XvTr*3t-}@ zqz#sy?f7tZ2($CFBlvZanOqU{Sgxq>7hAGL2e`k*N$0AgumaJlvLG`S65YKCSLl2a zq(=EVAgl2wijmQ?h|xrgy09<|v)t*M>Ga90e5IIl{WNoO33Oc zVWP}Wgy+#Iq^l_{y;crcD*UfPijnXsd*#j_fM+wAE+H!^ZcxabVi+2zEx&>{q$V!Z9-q~K!o*5tI`?IQoBi^XBarH ze`jliI@8%Cvz`8=jiu7*OWED2SrrF*eFi4%wXCyIlXekeKulGUzx^d!;_AyyC`Sevtx#r0tC6eYy0DUOc%Qm=n>n$rVwZYnZ%bIpQj60$ax z!&ac&Z&{^&s|jJaoudQY`PlRtG`!PXMFqzut0xc8(AaJ%-cvcSj$$sLCKE7Jv+!4A zZRYOSO}{4|uD68~f7*X^N*}4`u^ej6D=%BE5OK5M0g7~+=U4Ol74%rXY`p@D>Sp9~ z*JWwu>_44Q<&4#egP;jg^ywFvvTsz&UE5D>g-1W8hOefVH|Kk~v4uMA|Hl0l?iWma zKBD{PZQb!3on|6x54hF5f0m-fAm7QypBtUkBV)+}kAYOUEj~{89YyL@Suj*xf z*JAej$L0dXzrqz0{%EJ}#&lyea^#WPB9q&t?`=mZXCl1^ke zwtdIWz=lMl-}Z zd^nNJ2b?TafuUG3Wuvc5HV`l7^9VZt<%7aQiw77pn133(QmKF{Kp+<@6zs&OMFs|o z8K)SCr(&7o0i;(*W;22IV8^z$qSCYnHaW55g_gdaa8FmHC)(c8GQ=1+2R03&V2J?C z!{H-`*k-dxFmI=Vj*T-l7|*8DtYdJnP>^6I>)65l4-afBII;MX5-bcCoV*ho1n1I` zw8Hr;Dif2S{?&*^ZNavk@UOH6&!_gW++tX8DX1d}v;*&N{P-~s=9zkE(_nZKYqiKF zoIZDfr;c`P_638vG4k=%HX>G15j0o!wRSb#R_$W2qyO!u9sT{y@Fdjn?KYIR2tLSHE4bM0cQXWTuGG;k z=Nf^!b`OAebD;Vfl6VG1V=njMW&IdqJKkD<$5x8GR@2b+2eSoFt=uR7m^);&47*Mi z%P=VUr3U{B4f?>dFX|sa9|Pd;F*pQ#qDG$uP6Ia^{SfdO@Siex9Qb+g_ZnOQ{sDMB z4;Ra~fPW0k`N;l8K#^J%vt|=`SqJJ%puGLM@m~P{YrLFa)Q^I)Z_X{^L&#?fc-Q|0 zQxML9I%Itm^pAL1W7^+u^sIkfb(H|%S@@MmTstDf?reAMndSUb{}F$z`utO`qOQda zauM};3CZv?@$N-+auM-uL^t~l9srKOO&FAV3-()pIsb@R3qEW^d>ML1$#>-5TakNswk{i`0#uL1XAJl}8uC~=Pm_j~aC#iFHp#R$eF z9ZO~;x<7n)UspJKxVJab(;w~c+86GLO7}=C5(!6nYmno%6F-#@oO1d2a9)C89&m&t z!7zTe?-Cs5I7pSM&Cuj`D z5Uwbm%_OuW?!>b3{7BA;GAAkEyCh|6o?p)ebs^HY+8ADOxjGd~qES2-WhWz|uObh} z(zfL7boONJMQdUE6Im2YC%Hq0aJ$j!w4IKpb8gMLaaqe0bJd7-5(&hZ&yG~3Di2qv ziYP30e>~Txf~pPQloeIWm;&irpza-amORo?6|1_}ou;z5%~X?T<(PU^qK%3fWyaiG zFY}j0lWm(jbZs3n#4Do=v362>U35)x57N_Mhf%9*qbuCyGP_-7j||0A7%u6}+jceo z^hh>`e|scEF|qt{PU*YxHg47Du5XjbL%_ZrxZ#ub;xiSr0c-6vF*f6IVjL>Z5qF93 zzb&-qdZqm@smF2g1~Kff5HAz?3n|*YOF7#8ixlnd!a8KTwV(|+j5ZLXT^lj%_Yil9 z93+MPO+b{58WY9 zUr6K_X;9=TQp9l)l>XizhW*C&x!;{J4JSa(*7Z0w6_g*h;hh%4YUD$ zpCg5j3zWBu%#e17yhZvMe0oxkbNn_b-X-9DxR|U4ZD valgrind.tmp - -result="$?" - -# verify no errors - -output="`cat valgrind.tmp`" - -if [ "$output" != "" ]; then - cat valgrind.tmp >&2 - result=1 -fi - -rm valgrind.tmp - -exit $result - From d6ac544e64a27f80acda10703c960a5cb1163bca Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 06:21:47 -0600 Subject: [PATCH 012/103] updating --- project1/server-dtls-v2.c | 110 -------------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 project1/server-dtls-v2.c diff --git a/project1/server-dtls-v2.c b/project1/server-dtls-v2.c deleted file mode 100644 index 57be2658..00000000 --- a/project1/server-dtls-v2.c +++ /dev/null @@ -1,110 +0,0 @@ -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include - - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ - -int -dtle_handle_read(struct dtls_context_t *ctx) { - int *fd; - session_t session; - static uint8 buf[DTLS_MAX_BUF]; - int len; - - fd = dtls_get_app_data(ctx); - - assert(fd); - - session.size = sizeof(session.addr); - len = recvfrom(*fd, buf, sizeof(buf), 0, &session.addr.sa, - &session.size); - - return len < 0 ? len : dtls_handle_message(ctx, &session, buf, len); -} - - -int -read_from_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) { -return dtls_write(ctx, session, data, len); -} - - -int -send_to_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) { - return sendto(fd, data, len, MSG_DONTWAIT, &session->addr.sa, session->size); -} - -int get_key(struct dtls_context_t *ctx, const session_t *session, - const unsigned char *id, size_t id_len, - const dtls_key_t **result){ - static const dtls_key_t psk = { - .type = DTLS_KEY_PSK, - .key.psk.id = (unsigned char *)"my identity", - .key.psk.id_length = 11, - .key.psk.key = (unsigned char *)"secret", - .key.psk.key_length = 6 - }; - - *result = &psk; - return 0; -} - -int -handle_event(struct dtls_context_t *ctx, session_t *session, - dtls_alert_level_t level, unsigned short code) { - /* do something with event */ - return 0; -} - - - - - - - - - - int -main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - - struct sockaddr_in servaddr, cliaddr; - socklen_t addrlen = sizeof(cliaddr); - char buf[MSGLEN]; - dtls_context_t* the_context = NULL; - int fd, result; - - - static dtls_handler_t cb = { - .write = send_to_peer, - .read = read_from_peer, - .event = NULL, - .get_key = get_key - }; - - - /* create a UDP/IP socket */ - - fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd < 0 || bind(fd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) - exit(-1); - - the_context = dtls_new_context(&fd); - dtls_set_handler(the_context, &cb); - - while (1) { - /* initialize fd_set rfds and timeout */ - result = select(fd+1, &rfds, NULL, 0, NULL); - - if (FD_ISSET(fd, &rfds)) - dtls_handle_read(the_context); - } - dtls_free_context(the_context); -} From 3e67b577398ab1985618c6606eaea3228fe861e4 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 11:44:44 -0600 Subject: [PATCH 013/103] P1 v 1.5 --- project1/server-dtls | Bin 12695 -> 12656 bytes project1/server-dtls.c | 147 ++++++++++++++++++++--------------------- 2 files changed, 72 insertions(+), 75 deletions(-) diff --git a/project1/server-dtls b/project1/server-dtls index 240b335bac6496a429438d4da02035e0fc7df1c5..08533fded268cb9a88f46ae260816b7d41454d08 100755 GIT binary patch delta 3327 zcmZ8keNa@_6~FK8TYTW+vdf2{!Cl$6um}RHnA%hYb;rhp4iGT0t&PFmB~mwFm$gcY z**FUd>b8p)D1Vq#XEIG1+ZYSYkknQ)#1J!S>vYmK9Vf9mb-FY;gR+o|VmIn_%yOJ>gr~JSbbXc{`fg+XH3oZDlKlPe?}vUYjzJNd^M`MD>?uj6Xgn zuW&U2WI&hE(vr@g{Wf@d?w*w76pNOe(a8_a`O?%7xhBUShkoDKq2VDpSG2jWKizvd z^6$yI#wWH{Ba7`9`Xssj$?aDTNpjqr;Fr=09_CoxQd(kUI%T&oHcH^#XG1qP^^#(j_jOAB(<4s!?K>#`rhpx?HN}ujj{lZ$?iSk@CgW{m`;qnX0oK?@S~T?;HF1 zfw>#j1ra}&j0{NVQ@DOk*MmKbkX(8ke&w^h$8~$U0*)aqDq&83I zkVkZQH5I_;Lzskr^^Oid3w_mW^h!dhN}mB=ug!l%3g-jx-80}*u}U@j<1v0PeL?sr zIh;hyWEsBD=AV#!oaQsiK&KFPMB+a|5R|q8rLJHdIS_wNE*`k3r)gpYZ#<-|AJP|e zAUe}jPY@REQg#Yq#;B%epl=>00iAa8!V|v@X>XSjf)Ju-OCb9DmoS7ZNHUM&(koa= zh^SyCGRnX~aV0lh%~;=b=qo6g6&TR3MCL2Qtb-0^79|Pl0vK(jA0Y}rs!2Ks>BMU!fGed8#b#3c=C)c(MMd{03ZS#1UHsm>qGf7UzlR>O zRj?0}eF=aNT0L^V&@!$@#?|Vv=Euzo!b48Jc|!a;y<{IU%mm-Tq6aYc;o9G&jO@Vm@uWq(}qO208ve z($e`vQKMbT={d+l+c9;K0~&T6uYe@R9B`$`+bYKD=UEeTUcoL7G2{h7+GH=5{;min~B68&^4e#pv|BoppCdJ zJ_dd7F8?sA&^US{kzjl(%O>_s@to{MYhIp8BwWz5we#d|ab3C*(}yrRFqZoVc@L={M;;-)vzmfezdC4>Q_*G*-Lk+_H(GJE0o;nY73FtWZ5?h(& za2I+6u-EoUavEqoZ?W0(rZLOHK=Z)nV}uS!GR=MbxNUw`B{&?9HiDl7{cOJ^^HbTC zN9-o~mwn5DzK$eoWr-jlw37!j?@@tFW$I3;eAZ;_I zo6+MfHt;fKQHt7bX7eYMf|OCbD5Kf@dF6)C!=H27j6HZ!dU&7HVWb8i#@}`p2{C>d zzau=gu*euFWUP*_D0CQ4mohfOe^9tPOv^zI%%E;RW3(WRN6vU?NgA&bMhnyUR3d6Y zHJ*z8bw6l8KS&R)lBhx5Gw^7sHJ zRtv3F6Xz0PF>Z8Kxi9GGB1>mwB-YOl@oT{*&lB-af$!(LTsB+<1Fmv+0D8bQKUZwC z&~A{Fdg_lLeTPpK+psg)OUgx@-VIA$#s*$pQe`=;FUlh3G6j9a7QUjST)4pfB~|X3 zjr!}*B@1aqI;X%>-LxQPHcEQ_w-TF?n%_(OcF7Ke^Ou(A&urHZkh%WQKM@1N@0P|S I?sG5yKg#hC6aWAK delta 3193 zcmZ8j4NP0t6~6D;h6k8n8$*C3*ujtgUpF*jTUtoUvP`8-T1Yb1Z5cHVASf^}OOZ$j zGqj-?33}W%YuQw!s%qM8A!Cb}Ml~|jBBX3$Tcvc;vaQ-8nUrc&Ng2rk-glmD>f~9^ z=bpds{M`HQy{pf@<{C?jn|n#GlnWu|#&^47W>bWiO&NbF!{C>Mcys*1;dsAQ2)|#i z`28eHucp77e4~En<7HB3-P>hX7F^qI1pZ#FgS$$Xq~tgiqa3^i^arU_`VVbLHffP| z$%oB%ffso!7|hUVxl)R!_vKP)nm&_Dol6f`?2se&La@ip2lW4@K5O#Mly*sQ3d|ZEk0f7!g@XQW|1yV1Ht&RUJ3C@qWnJpbTJM) z-?v@??|RHBX?}+D8k+O09UZ>mT}fNetE>wyEzXZ#X4MR{#eRxS$jj3- ze_os)UK^dwW#!pN&OmP95h;lAQ zz2SW5OkzgAmEb%N#7Hr*VdqFOysn^Q5_khTG^GMfst~=Y5FcUpM!0M1V7U`tJ9mOt zCU=5CMhDeSl)=sT6ow}kLcFX^R3*b^Gwh)1ffXQ|3L%o&60$CqRjXy;KI~&ew00k| zFkxEDsD0b^{tCu^^sbg$6>_T*y}VwUIX9KpMmVELCP)kznpXwl49#h!oMZEIKna!N zN5#v1_~SY_Cm{OS6~EhGrAAPrDRT3b`TP^pIieJH$EsWU09{}vnmjMEE$EUOr6 zm4>1n8b+UHLqOVi40>J+wOk|0;nr%3*ieKT@HL};b&NBvQ?)P17*g>9ui+{XD+VV( zz`tIg1x{tA2PJXEyhV);sIQ!=pECp*nGA;xK3A1x&2?^aoW1pt|Owi@WF&0 z33av(CD+N?Ztw(q`~}HG@KM_}03atNB8n>e-hZ`;-ivg<%brCr{nD(T%V=czE3jLB z3)=$(JuIk$;irb>afl{)i$TAVhJJ`ur7e>YpE|o;2=|^uoP@$-2>crUi}NSP#*Q9$ z29MPS+(>+2z9&-%@5;`RHnnVYT8~{Wu)K!&UV&l$hgUXf!(5}>LZpFtT_!zc*&&(e zIm@H;JIj-_E4hw_l54H5hW7RjkKNVfZt%G6-5su0w}(vDvW!y=EuNP4Ci}^bF1xF( z#og|)Kj-f5ZfJ5-mo=xXr?Jx>K4t7D8(P}jjqxJPyBl|l$9fxTYimxlyHDBOU0oer zCG>$co03vm_ewi-U*ml$2Jg<>!C)O|KFWI@^cd)Q&@-UF0$ss+{Rs3s8}!SR9K+nL zV9-R@Q*82uHQG$clrOJQW@<*(?@@KD0e1VhDMRvsM1!u$@PSdU=P(m^P50>Asb4iz z15KWuOg*8{RO)KM820c^yfDCd_~pyzq7ghFx;PYZ*iwP5#5^&GBM|J$fL@6Qt)~{7 zEuB4ij&L>#%$V@Ks8@L0N0YYg)*5h_iw=fg1zmeVuh3*_`O9`AS?!*-}~YlwS{ma}XI2CSh(hr`f^Q6D|*a5y=n51#_3!cE}Z z`LpA~e0VuHC(iZwAau~~tYn&S7~`fOnS#VbmmD_jRyK#q9-_ZGY%zSrxNW9QM^?Oo zjb6cZXhfz0H8V!LnOW&cH7jljOL+<9uV|1y^>31o_Gc$kU$)WU!>abtXtpDc4?Vvf ziD_0>vrUqpu4m^;Gi1ogHFV|(@qKdUI1Ecg*bb>a=Ttwp02$*#!ifvPO<<}MT&ED+ z2Btc#NOXIPk7Kbm3rux_XDU=WQyuP4{BYq+by~A<5yc#Yc%E>vXX}Ec6S!dE;TAB} zi6kc4?Ubo5e1lr@(~ol7&0KRxoW?}>Ny@8qitr+nMWQHyv@D9>4?eO8S$`b-dHO+~ zO&X)|yi(^*1m?+<5crRvcJO>?GXF8?`@kv&W#4~-PSEFhHhJb1vgDs}@@0#SEl{@d zG6+9*&=Ur*a8AH#8I^Nz8!v)1L}$2EGxt(ierT z2-i?l%7tkU-^KkfkG==L&hFud_3upoyl6~s3GYEwRo|%j=7GmfJXBIf`<&(f2hQfi AJOBUy diff --git a/project1/server-dtls.c b/project1/server-dtls.c index ebaeb975..dddc49c9 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -12,7 +12,7 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -static int cleanup; /* To handle shutdown */ +static int cleanup; /* To handle shutdown */ void sig_handler(const int sig) { @@ -21,8 +21,7 @@ void sig_handler(const int sig) exit(0); } -int -main(int argc, char** argv) +int main(int argc, char** argv) { /* CREATE THE SOCKET */ @@ -31,7 +30,7 @@ main(int argc, char** argv) int listenfd; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen; /* length of message */ -// int connfd; /* the connection the client makes */ + int connfd; /* the connection the client makes */ char buff[MSGLEN]; /* the incoming message */ struct sigaction act, oact; /* structures for signal handling */ @@ -44,80 +43,75 @@ main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - CyaSSL_Init(); // Initialize CyaSSL + CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; - /* Create and initialize CYASSL_CTX structure */ if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } + printf("CTX set to DTLS 1.2\n"); - /* Load CA certificates into CYASSL_CTX */ if (CyaSSL_CTX_load_verify_locations(ctx,"certs/ca-cert.pem",0) != SSL_SUCCESS) { fprintf(stderr, "Error loading certs/ca-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } + printf("Loaded CA certs\n"); - /* Load server certificate into CYASSL_CTX */ if (CyaSSL_CTX_use_certificate_file(ctx,"certs/server-cert.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { fprintf(stderr, "Error loading certs/server-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } + printf("Loaded server certs\n"); - /* Load server key into CYASSL_CTX */ if (CyaSSL_CTX_use_PrivateKey_file(ctx,"certs/server-key.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { fprintf(stderr, "Error loading certs/server-key.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } + printf("Loaded server keys\n"); - /* create a UDP/IP socket */ - - if((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { perror("cannot create socket"); return 0; } - - /* printf("created socket descriptor = %d\n", sockfd); */ + printf("Socket allocated\n"); /* INADDR_ANY=IP address and socket = 11111, modify SERV_PORT to change */ memset((char *)&servaddr, 0, sizeof(servaddr)); - - servaddr.sin_family = AF_INET; - /* host-to-network-long conversion (htonl) */ - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - /* Eliminate socket already in use error */ int res, on = 1; socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if(res<0){ + if (res < 0) { err_sys("setsockopt SO_REUSEADDR failed\n"); } - - /* bind the socket */ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("bind failed"); return 0; } + printf("Socket bind complete\n"); + + + + - /* loop, listen for client, print received, reply to client */ while (cleanup != 1) { - - printf("waiting for client message on port %d\n", SERV_PORT); + + printf("Awaiting client connection on port %d\n", SERV_PORT); CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ @@ -128,75 +122,78 @@ main(int argc, char** argv) (struct sockaddr*)&cliaddr, &clilen); printf("connection attempt made.\n"); - if(n > 0) { - if(connect(listenfd, (const struct sockaddr*)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed\n"); + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); } -// else -// err_sys("recvfrom failed\n"); - // connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen); - // - // if ( connfd == -1 ){ - // printf("connfd = %d\n", connfd); - // printf("accept error\n"); - // } + /* set the session ssl to clientfd */ + CyaSSL_set_fd(ssl, listenfd); - else{ + if (n > 0) { +// if(CyaSSL_connect(ssl) != 0){ +// int err = CyaSSL_get_error(ssl, 0); +// char buffer[CYASSL_MAX_ERROR_SZ]; +// printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); +// err_sys("udp connect failed\n"); +// } - printf("connected!\n"); - - /* Create the CYASSL Object */ - if((ssl = CyaSSL_new(ctx))== NULL){ - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[CYASSL_MAX_ERROR_SZ]; + int temp = CyaSSL_accept(ssl); + printf("CyaSSL_accept returned: %d\n", temp); + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_accept failed\n"); } - /* set the session ssl to clientfd */ - CyaSSL_set_fd(ssl, listenfd); +// connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen); + - for(;;){ - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - err_sys("SSL_accept failed\n"); - } + connfd = CyaSSL_accept(ssl); + if (connfd == 1) { + printf("connfd = %d\n", connfd); + printf("accept error\n"); + } - if( (recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ - printf("heard %d bytes\n", recvlen); + else { + printf("connected!\n"); + for ( ; ; ) { + if (( recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ + printf("heard %d bytes\n", recvlen); - if (recvlen > 0) { - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); + if (recvlen > 0) { + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + if (CyaSSL_write(ssl, buff, strlen(buff)) < 0) { + perror("sendto"); + printf("reply sent \"%s\"\n", buff); + } } - if (recvlen < 0){ - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); + else { + printf("lost the connection to client\n"); + break; } - if (CyaSSL_write(ssl, buff, strlen(buff)) < 0){ - perror("sendto"); - printf("reply sent \"%s\"\n", buff); - } - /* continues to loop, use "Ctrl+C" to terminate listening */ - } - else{ - printf("lost the connection to client\n"); - break; - } + } + continue; } } } return(0); } - From 8483a6214207ea52837f17967b4f66e293db0f2e Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 11:47:28 -0600 Subject: [PATCH 014/103] P1 v 1.5 --- project1/server-dtls | Bin 12656 -> 0 bytes project1/server-udp | Bin 7762 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 project1/server-dtls delete mode 100755 project1/server-udp diff --git a/project1/server-dtls b/project1/server-dtls deleted file mode 100755 index 08533fded268cb9a88f46ae260816b7d41454d08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12656 zcmeHNe{fXCeczK#_>6^+F~wj={BTY-uHh_UnaVb9B_sjDG6+c!I(Gax-M!Pha=N?R zy#vW52~_-2g<9FhE}fw+%%qMdcE_}4JjC|IqH@4=G7U{#myR4ew`CXJKp z=d=4(JU!$j{iFY}H{aX+?DxCh-Tm&5_xA1gE6uGd1A&0hp+uAlqTxRehH4SNx=?Xy zg(0pLi^ONed@&7KyrlD;}e2olSS zN|%2#(l3Ay8b+Z*Al6HM38HfF%fTaE049;oI!HF;ZPZO_0w!r*+xt#@`|k;{{mEd6 zv>ZH==C21I@QOhFs9v;_?`faz6w9-JcczkEcc$V?Qpt3oH;;-&@P82V|&2mkhy3a}@I|6*g@Fbgr;r-OmS2_OG% zA3m;y5wra5KK@U9{11Knqdxq!4}aB%|H`MYgobbf>;FUp#Kfn3_&J}x#U8$a^b_yHb`g&F-E| z+RQuAoMW28T(i||cjX#WP+{d&@hJ;8_C-57TFtbzO}NQ!%Q3B7E|b$4IV&0$W-^_0 zbWUUECNq_Z#?7r(E}7^=3nRMPO;HqruZ0*=uV=guGRu1B3kLB2zxE9Q#vcv@1 zmP=bx$9ll(GZRU4-feV?uXPlSSve<}NTO+$lEr^IsY^7s zx2tZ#aJgi3 z@#HBkb5t&+bV|qEvjfQGKYzp}B9DaLFJ~u{Gq`i#4|U9|l(&!}nFtF=;w zjk+9b<{Fk~j7@zuV=SV%jPVd$z!)36!T1^>!i=#>7BRk7h{cSj3sKGZIy{FNmkUwH z7%f@O7|W@i@l32S#%S1T#%M)AB>_=v=` zqRmI@_)&>zP1_(oEHSNWFCre6I80nkyhCDI*{&nbN=$3p^~9Scrq%7$#BCDO`gR*} zy~G>^dlPZB#2gKKGqE8tN5y7`#w#UmBF+*Ei8)GkFY$$6BcqC=W$z$9CoxCO-bZ{! zVve3YOgthnN6|h=d{knNrhSxn+atuACFZEx zZxFXh%+a^c5Z6o0Szwk(u>h|5??(pS>3{D+TW7mn zk7t8@=CNRC{YLxU!C+`?ChYOE#IW}_xF9_0#mAq3x+TN->%TN@TVRwO5tw5aHw?Vr ze}3+%V3@q(nbV^~FOhYeP|BaUR5I{SCw_c$;LN{XDg;JfmIc473l21egSzl{Pmc~< z9C{T~7<2so15h9eH%R@VvF&K$$ui~zPJe`!9SLFaqyC$9L*`60gd8+vybnc&$Mg7C ztik4xTU!nW7@Pj9VzK{AA>ovxeykHQHin$jqZ4}iDRm5ar^*hpUWh=FjT`$Waw+%T zg`MX|u#yLx%b|LKb%d{)1G~bnBClrTR8x4<%dqbd;{K7~KrlR3hM_pMEBrlbK^WQ< zeh(4KN+Gv-+}_6KLvrjXtmLtUsElR%03flre|vbbDAXLGg@MaaO$fV+Kpb=%d4Nqn z4SC(Q8SF+d{2cS&VLr;Bh%ECOG6$iTb?gSO|5Cu2ti5is_BW|zi%0tlDm~)~CekM={<@&ekS zE%T8|pJo0jrahM7KtN88$Dg8RSi2h5uNHlCko^IRG@*!`g5$^V#6hk&fZQ*;iYnd8 z5pk@uFbb{w8rTU;1LBg2N%aflV(vJ|gr4p@FbUrJ9|$5Z$GoQSB1DX9`DO^C)}ld` zm|ctXG>{E;rvdoYtZWu^fM17(*NHw(_StOWm}^NkamZ~NO6pSOXw2>r+0R;vKMXCZ zpWj9$P*Ts_r;t1TEHhA)Ee2x~8Gru^Y00qE-V_d_0kcud4s?KRhIqN#*3kFxWCrV; zVofyQ6=;Cya%lVtHQs@$&^S3u|5kOW9$l*UuLQnuvo+FG!SF$reT}Vg7kR1DQw`m$ ztA2pvfjsD1E@u7(&l)=WAc}E9ZKFP@onXvV^*3q3jB4v@;MLTNx}IabU%MpR+%$9` z%(M1DXE?~}E+}y>izZk66vcZXj-vm;bPMdS)mJL{Ry46SP^dz7t6S{H6m3w&K4!WM zqT@HBF6as32tM{RGC8F&5<}RS@Y>_;`IAa@8&tQU_y4Rq+2*RBNe%CQEREA9zI+?{ zK?P_)Tj0#eNeWTl&6GZ-rTgyiTkSv56e#XQU7aOz*S(7+Oc+zQ493YTsgTa{4AVjA z#++P+x*A#X4PcKLvez)X2HE2wZ2QP~h#41<@j==6&#|K(;ZBY*ow<7rb_+S72lvbE z+PZ57H*dT&t%vyONe{oo@bHGu*AzE)jJ=Q6?HsMb%UJ*U1%s(@_0Wq!)HK$25l!jm zi^lCIPyD)M_eJM6^&Et)>IN2b{&TpwV1va2uTZf6RN$VE3qR<8eZfPIm|qzEV8*aF zd^GC5*U=t3M_hGSa>PgSU)6-BJL(b%90x!Tnk&Qrrw`h7ybwGJge zRXtm*KDQ&kp&nQ0cdZ8Ec@c}I(;3Hz;b`kvhI_#4kmo!jnv%y^9Q+V2AJB}Bb!L0> zhK}Zjrlxj-XFMxDU7q4xAl&ji*cq`*4=jtrEJDM!Xws49PbIB1YR#n6mORrLnY5A3 zyF8u5+>J?t&_;pzrT6ibh2QdKe^e}XBEB9Av={LoB0h*X zf%q8WPCN$RMEpA9O6;550~i92wu`{_P+)#}Ft`u-2J#kwj(=Dz;+ZW(MQCM3`I?#6 zIl*4>M>pN~`%A;OkY5ja?B~Ve62zjRBDA|?#f-A#x1dFRkKByxr@>$3hhinpT6atG(LID`&xVg7eRc)<2w=0-8i^qp2vMNUyJtd!Z&}!=YjF5 zUaZFp4L;S&`vH7nmw{&_fpZ?;buNMUPKVF)0w3jsvo{!GI*yp13ixisJ9IV_=fg}b z@^LuJu+0|`e}9ka1K|HD@cvvEcm{WKFM&>i-U9sybP+UdAQ+khx)rnxv=X!tlmKl7 z?EyUndIt0o=p^VZ(2qbDLDS$%Fb8xiXc=fFXd@^A+6vkO(rsAP*m$q8XhT;a?G%jK zNL^&N@VvMEPIC%x|7M!deKi zmTN*9$CnK2<+^wta`i}aeK1gtv=+p*K{>9M^N>3X!1aTql;Ql}2;!Qd9M{)=6z00p zfwBybfVeiu;=1@g6m=r4>t#M^3y5opX|AVQbgCL@Z@qxxQ4p@(WErltIj#X`f+$P8^q~YD5<(>hiKFUd78fAY+SeTv-M;Bzb}Cw+<_cfrj=BS3uNPt+EB>!fu)oc_cnpJi{rD8R$P5 zZqP}_p6Mo1x8lwihQc>Kxd*Ub&MnS)ufA6o3vo<03Oub3$twc)BW5bEGv%|Tu&SB+ zi^8e~?js7T3bqKF-D!CpM=BOaJ&*M_*!Gw7-fz^)9c}%fV zcjfBmcd1Zs6`Yrf&#N{B&Od}w`Bs5>IDzLfd&0k`6#hHjP%3VkG;Trh(;|DU>kpuQ zmN?_~zXbh{P=Wg{Mce?W->ry04=is+5eHB@fmru1fG5%r@Mcf>zXsO!2*4i4iQT~V zoJ2Z>{fRRn0Q>$6;w&&{4)IyUL(s=>T&({bVt!Xw^7F3f-x&CZpHlV;V3k}1_VyQW zBC!4vOl;kLdNADptj8mO@mRo#?~VugcM`ky4`4i+iQRxLR?r`eciwFOEVOrvhi@Qn zFYpNL&GyeKnIZlLSdXUx|Ey;{^3?Y-F!u|}(?9Fmz`W;O#PZO8)+c|-l?NN^dafw? z_!XYbfckF&_WExbKK>FPZt&qR_;A{XclhuTAAZq?Px$cLz}i0S&zO&Y$%75_hrT#E zuzxoK?{~-R`jWXK4D9u9yUQov?89BabYF-<7ww(%@&C++5BTuk0UvVfuf+I$9a!%- z)b|g-d_Jr3ohgo!?~#`dqi%=TpYMQAKMH=gW%)OObs+z|50_H08_1vS!3OXm4<=t; z_abH>UJ1T#5AE0PlkfIm1M)k8z5aoFJ$&kW(uYM1mp@J+k%+|L54NVU-E3{?=!7@m zWuHOQ=`myU8qDMSymBM-WSM3>V|J%9UD1?@Px!gK87=hUIzU}x#3Re@zNZ?Rrx21} zb?U_(-e*p(PpDV@c%i4K4@EpkIuTA1b?=JePAZR<%lojFHWjzwVuY6&W}X)|xTZ=M zvQW3Oz2U)Tvw3Y3T^(glb(+VI3FYuuZ2IH14G*?7LdwIDUXsFG)w*s)L#w%N<;src zPP4ONMQgL^x$LR0*FJRYwDh}+U-6ThHo5FiE1fg7qh=y&+S@R>F8gk}^7NaP?wu~a z!co=ZOzN#px~6(Frg8*!bxN0Bb?rH+gbBxDcWq5Lo=y^=8?xR#COaWZqqypEYwGdp K)sxrny8FLV7S&<^ diff --git a/project1/server-udp b/project1/server-udp deleted file mode 100755 index b502159e49ee1b1d0432e65dcf776969311905b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7762 zcmeHMeQX@X6`%86!Vzra1QSBymThurOzRv@Y9jN|){gCb)k%zV2|)xl=exD{n)|SB z_kxYm*6!heF=?X;(JxT~LWowhjZ}mpijb)xX(~_yNC>G^K!M6Gp$Y}kv<AdLIefT&`2oU1io*+k~9fJTqx?r=fx5+ z7e$mc4M7KFpaN+Q%0i$ZCGK#=xQZnUCP&Q*^YlT4%%D69Y*_K+{kunBsH=be;hWd~B*$@U8`4*XFi<4Re))~J#+mo0s1Gba-YUbb zWq3syzPb!wUxx4WVFUSYA7*=nGQ7JC-&BUPW%vtacx4%0T!t?Kz8=q$zML-*Ab1W5 z`hSfuH*Pf@H<`+s1;^)|0Je3xXn@?L=k+Cuks`sR_Ns+e_dwcV_jBu=M(#@d`TV=((Yi8o9EK2$^xvW=W ziuIiv*S49fqfOJfM)bD=zo7i*Qzr8N0*IRm89RLbOtq<06{F=omsK z!r$cRNeg*3<{3F$zpZ#OJh>GO4^KR>M2NBC*;1)AGVacqydAwOJ{!JyLiV$CbqF;| z%ft9*L1{UAY%@Fc2C9^nv*$KtQzsVI0C~0em=c@^qu0#MaM!B%1S4WPaJrHq9cS-|CuutqrZFRZ&w6P zym+P%n0QiFd`VXvZI6U><(H06jGjL5lw2N$zDfh4aEY`Zp4^8n9-YIo!0`{zvj=Ms zcxe9$-I0aU9iaprnHofugHsOvA=-wq51%}Y#>YA;(P*9ZAeX_>J0g#Ptr|bp9%-mS z4!jYJoUuS2;!Hsw$tE8@S1O@;Q*mFUNenJTaSOaT`QFE+lI+RU{fI?Y_Kb0j5C_^L zST7=zD^R%?!s{z&kCMqIWv>Oe@5{jV!cZ?7_?osM>!K55Xp}ZyhQi3WYz3c)<`7V@Cx9~ou5O6bEY-TxZjnUR|lw;V< z;@is(#3H*W4xBhTQy+RirQUB4uE~jbHk)&eMBa+Kmf`Iy+!zdQ7}#o%Zi}bfRJPCP&E<_mI%Q>D zBV##Eyw5UnS))Ifca7!AdBV2h`6O~i&!B5L^Tb9&mAH1wxz<>^+*vwLq;rmIxVB{^ za@nkva8oeg<~*xnvuAY~j9_1~QhP1f&0GEHK?B>9>lyKODiK%`yp9Va=fWNTE|uEB zhcQepR*&O}+yfqghkg&vXTlV?y;}tKg#$|}L!rA6*aph#K+UKxH>m3Hy6VbJ7hmLt z2E^AFU-zZek)_mW0r7#Z;B0NJ4v$oAkSh1nHwsoSqruArbW$Ur(aO-o`Ax`N-pcv}X{P}d=1Lr+(-UI)S z2fA?HY6P(kmNiM-jd$J=3gdVyBG|Al2j}}J&a-mOp&y+q?Z+Q#~}wrh?0?LCF8TQHiU&C%5>S6x$(aMhKnK!~U_m~rDh;BH=VTj%f&X65@u z6q~9QZC$%@r5o?_P+ztX?J1=2Vx3BgD3Kj^Y!OWkW?@fpH?Jgnt-OQ1aTYKk%Ufyc zt4x2|712~Sg@4x?z<)0QM7d<#jf<#do4xsX#xm_BYHFlvnDKl*KB#Kw{5KO&gYkGK zl|aKe7{p&xwxTTdIF5)Wa+wVFV(qa1fivFtoEazbP6dFmpc7?G%RqQ_lX~**0|EnB zC&nn#Dv;K@3-QT)JR&9PPwTYleo;}7l6ZJ@2K#XnbG2WktUJZ!x4<>cE zNACbJ=BdZ|@ftFm7dlaw=~fV9n|h4v{iw7QdEG9{Nqaz?3(RvqJPN%=xZ*8_?stq#oA-t;cf_`^t8>KJ0{G8S*+&kLga3)*FJ} z5CwXW$kHb)`hizWd%SlWLW2*XZJnsc^dpeA$Mq($>K3fE&nW0_7`?`ag^3P3(%d3T3<04<}g&i?^< zh@>9Z&&toxdj&ddm#*N;W6fvi{RwjVj(YM=5PFkd8JKLB&-ZPRw#WOCv!7y*eVp>? zaed~4+JG{hs6+Y(NZZ>0y$#S~J33K^=?sYF>>uBhyP&6KD3UhFKlbvC1W442sI2^F zTO{raw55{^y}1;4NoUFVY;|hD%gZS={5cfxE{%OaRT=Ysdv#cF*7ypvJ*a*naXn(8 zx;0jJt_rJ`xxOf@400V&Sb2c!g~Dn!a$QiEPgKo+g}Gv>d9JWjll!B>2wo)4TZIv% zNSvPvbA=Lu^H5>VXkc&e3JUJ>YM&<$%1Bo8M_~jD66cA+^c?QVFdr1=Q^9lg_S2x? zuC2}oAO7?(0~Aa#p3C> zVrfXcU*d>$`vI&RtTFD5zXIcr0-y5XR$zT5qWnf+dD8|&R;O#OT+X4cQ~z~v-M)bRQ^4Av0r>M@z`A|P zE7_puzX1HX6qt8zjMN3_?`mI%43upFJ`8^_QWsQIi6pT0zkyqOdH8~iiBEeNa(O$3 zd=2DsU-jZ;0pjU(=V1xb?a?0#eQO-+Hv;SRVgXMy ziM;E$h2Gw10+;xk+PclojoV_TDUw#+>PtB|shV!aOr&#J%fU6vCyGonnKS#+xt@61 z#J7RGW5x>u0tdkUwB=gK=$fmqX@uoZQ8IZHRR>EGhsFG$P)E^ZA(I(I6(2Hrf}N%6 zSb3a(R~C}}vg7NzTQ_%@9b4Mbb2SW|pH(v{%=VkMv~J$m1}&dNe#sE#`p&IuTRY9I z>(*`Sh?%k0wVfR_CqH&1oPz8yKC{F&n={^tZEmA)V)34|1>J$>HPJrHHTx5$YZtP6 zqCEqG2V?bVM5qriEiL*330z~zbF;FoKeWtJDEmM&BWqHhb!G}0y)Qfd61d*iJihqM z7S8%?16?O)+VO0XV=4QbBtHwyu3YvN=u?FB8vQK4Bl+d(^OC;=F@VS8J&E3a)4mPv z#M^{dBtJ8$TRnd*`FYD Date: Wed, 21 May 2014 14:35:00 -0600 Subject: [PATCH 015/103] comparing --- project1/Makefile | 3 +- project1/server-dtls | Bin 0 -> 12645 bytes project1/server-dtls.c | 124 ++++++++++++++++++++--------------------- project1/server-udp | Bin 0 -> 7762 bytes 4 files changed, 63 insertions(+), 64 deletions(-) create mode 100755 project1/server-dtls create mode 100755 project1/server-udp diff --git a/project1/Makefile b/project1/Makefile index b5a7f921..1b56bea7 100644 --- a/project1/Makefile +++ b/project1/Makefile @@ -9,7 +9,8 @@ OBJ = echoserver.o #LIBS=-lsocket %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -all: server-udp server-dtls +all: server-udp server-dtls + server-udp: server-udp.c $(CC) -Wall -o server-udp server-udp.c -I ../include -lcyassl diff --git a/project1/server-dtls b/project1/server-dtls new file mode 100755 index 0000000000000000000000000000000000000000..2e39a85911b056057fd982f6326e23722df8abf0 GIT binary patch literal 12645 zcmeHNe{fXSb-pXD$QpzY1XD1I{Y(~HPGAvOX0T1B5|RMf0u)IQJh*LJUwJL`LBO)rL*UL_ndp~@B7|;_xy2P!`eU~Aap1Yg@S1KPlBOJ@>`XpQW)X} zQ7+&k`fQC7JNIv@iXNJU5sf(k(`z%9FjA<`FtNt7X35||LkOUld>g2eoy)Ro_Y z`16p14kFVL5X+^!0IV4DV#r7rfJv0I43Z6f8)cJffk|4{_>L1_f1?oV|2!BXt%i)G z{Wm@=fp}8*kd<-69B|f82LqAQKKWffd_pUO zGyfev`G-FFZ+-F;KKzsq|D_K*8;C#a)Blx6PJ7dR z@};nM@Ho~aLMdi#74VS>yg(GXa?a)1VuAP$@;~@kFr@G-Q8_990`VyH2KOm@bHog> z8Tz%*r~Nqs(-rF|)*a2|l3YZ03A4UsgBiE7R(m4nSlN~hHOX|!YKgWcEn%ANo#~XB zbD~+tG=+KJ4ztPCt4YFyl~dWL%v{qQZEkKbQ`S!5M%yjNw6fWBRwrbwXk3_yRKn3I zH7#4sWI7r*cUaj(TQ}mdsFO&ia$W`3WNk}B^N!`_3NvSAp>B3sj-8Hc#T*K2n?O6W z3CGf+Xe?%BCKZ{_S!QE4u_NkO_gmd&TLO)DD_!ra9aUpi)=9J_P&G^G;y0DhIqI64 zR5Q_W*+i;c_BcCxC3}Ejq1EverZjMOY3?Nu#}4E4HI8 zo9;vwjCWSFsZK%8XpDV~A~-kP;qHtkkYdH7P85RHTu!AU30BuN)UT;AS41i&VilZU zn2M4ZXRHu(HBH5sqEeL(Q>lAZFM$2L0Hps4L=JOU@1t`QiJ9Ed>yUwIr4kp2P0EnC zf@jyX*=kJ{VFNG5TKWR>lVh`=OOC}epBxXzGIDJE2Kg88EFi~fDJQ={h$ZCHg{UB( zf#)-Mu@I}sQIpl=SXNc!v#{34QL**ps7C`i7Jef+9@s79cqnZp$Mf<*ay+NElmCGb zadJGoZ1M$IuH-l2Sx&xC2#5SjLUfVeEJP1Eo}0VKZxy1Cd=Z{wLJag?86O|tGwc+NPD8Ks{xr00M2z1Rg!cI25Pmrt8Y4edgc3fiis%;P-k(j+}mlN-oI80nYyi4M8;#I^MiP`IR74de7 z+57f-;zo%%3U(uLmBbtkdn<8;#2giSJFy`#N5^J^#!4lwCC(5FiPsZ%5nuQe35z*u z_AcVH5_9zIeZ*%Z<|x|xiH9ZTXxfK~k4wx^wT}=Vk(i@vKSR7<;yCef;$0Hk#3zU| z5_8n;VdCu)bM)TqQAQgZ&n9g~Xf{_E};>V$KeGl(|+LgIbI zmx(WYGCscigNOQm)qCzjV@s1=g=dF-=Fwp2>s#zOgTc_~I5PZK+kWrgKv{Uii%&cb zb4w56r}y%-oq-WHOkmDk+T8z6@A>(sf?>+W&zv3^dWoVFgi`<2%LV;EdG)84QB9x#aW8KKIe=LXJ3DI`6eDvq&j#EWX(i93p;Vf_T7f4ll19c&{R^Ouf z>sVdA-w6q)7^=)MdK{{!N2q-6!tV3KSm6V8#mG`-9p$TOe_!|&q%9vlRU6*=qk&*( z2)uVV*dGj!US!#Q;a{>ygrUChIWXjvN^Y^-_C{x5Oh)&j?9tiC!@LOqXjJs}geydT z`BC;Ta50JrVYdHuMdtZyBo4qX%g964dpY1tw!Uhz z^;c+Ro5%XoDt?jaIoG#pFmUBy;@m+fay2-tao~> z-++F)w(fix^jPnsm8U({-&XNqrvDw|o}S@ApcZmGI#4otyAr)$DZ1w&`3+{NL>4&( z#}430gw#={rd&g%ZsA}Y>kK-Dz5G1HZI}kc1rsxH45^qq4iaIf{i~P+Cw~h?q-B{_ z8(soNzKU;(7_wEUP$_2D5b5p87^huo?m zr_OZ+x%Ldpc9tE4dIPX(=d&mTM#`DG7pY^9FacRvV+g7!_}+g@>*dmVZMYm2n2S<& zp#iKj)QjD^hJJ}BHbiHYXrcno!U9yQQ0*%5-CI7Vsvn^e>@b#l5xLL=IhPYihlN^L zsP(TGzP7W@vO|O6UCi6hI=f5!AC;X-v6rS{yfz;Kpk2Cp7AZ5T*2_` zj2A(lUBmaLA?!PN+woTUm@?OhE@%|9{`6<6qK&TQ|Dc7Be}k4#{N3A87aBm>je#>K zCmBR}A5i->t=;`qf6L!P6=Apq####0W{GbGqtBq%bj{GfKBX1XNuK`wK5S#ktwdR~ zne*R(J!(jv&*U{o9t&YtN5UOU2*Bj~MPnDSVIJkKj&Yf_rvuYl&ewrKxf@$|&g9;V zccfP2$L{@&<>OnLM{h(2?H*Z-m#*IPWdq4@#n1~um>zxN63Xu7i^Lr#U;VUT&n4$} z^;|>etm*4PX+G&P5wW7e_FQfA@h$$-k-VO8$KR!-`oBIwcS1P z0$%re`J#qR18>CzVtRA^y84YRh8<1ClU6(;#Z2B@raIY&CEe zFr2i(bCaUcmicm~7K#kfXgiIGWK(VS((Y%A7bIJRZ* zw1g5Gkj07{HPtGUYh9hqJS9wJ->39{mZ9{gDyPHhb{q0J<+w_}YcWvIiC8q1N;^gj zM^?u&+=E-QJii&yq&%kLK!J#m;pXQ-&4{Ht z(X%+DB2@2;CLG!Q$%K_csp=qzGn#?_Ogifri($%>9CaKX|BOzIK}64iN#n0hM$)r1X;M9Hu1Zkf$k_p)uKP%=LwZ_wscD$1`Dn zJU-q6p2uSA0{!>c41sSqi9k;%u&_87+=p}nX=R{d z*em5@r6jbrr1-vBGn`&LS_Xemz|8f$KeRy$7!M!1W%u-UHWr;Qvbx z?8kSk42bo?E7t_^J3c<0%lj#OI+yoS_{1&mr15E6-q+$&w+P~+9N*D+SjI^${T%L_ z`6~5fAHMB_p9jV#dGP>Vg78UR-UHxMx(qxc2^{R?`w`0Hdmui;3w&e~gO3D5jQ4=^ zP|x=%-l4OiI1r{AkdDJynsvSaerd021K{r!cz>=loWxz+o1k|=mq63{gQ0n#+dwNp zYe8E;ZJ-^Xy`V#&W1yEnCqZw5-UVF(O@j}?JkV{Rm7uktEuc2g4$xlEA59R7O@sRxDk9cV5Efcc=s*BDwBPC)x_`WEHn{43|w-HX|Z91zC~m zHT6rKXuFHrQ~5}1K7q^mL|jCO>}bvwk$86s_7r!rN`i~J9PgT>nhQ+GvR0D%Dw0V$ zA|kH^BaYRDxV&DAWYh9CDq`7YTQ=HhnRXmGHBvduXf_+|RylP1n=z=tc(gMSL&0en z#7{()qAcQiOGI!2>%`GSci8X1IcGUnIM<|K1_0-i4wNx`8H8^oQcwC%KwtptAU_HL zEC*@5eVF4suY|P{xYnyh9LI|^%jMd54tiCHbB!=ikF*iQ^+7$Zne)&)4!|{psMO&a z*aG6Zp&r-RlgP}qr2};t9s+TFP{g%y35J+gm&Jb)X)@BOtbk^*Ii` zttThOy~9%(C4;J%+;|t;f6eT5K-*{7Jbk_bFG8{jwE$TcP(M zfg7~mF<{!GNcz)Yb6f4|kZHXa5!ZTs_`1~xz4KG({TOMuqLgDS{eN&@sBKVP$N9+* zSC~?ddvNeG^xlLH%jKNm1xn~M^nL+3`2Sh8`zdgPj*@$ZU1V+(q6!^_?|fnzh~;u_an5_~9bY2E-|9+1rtKkm zP2hgSMCEy={I(QUC3AmKSe3wiL}66`_X~y9YUIA4Fh^9ae}&b8;5t`WGWm>En5|IH zUWNJOR__1`bB9vvP~l>Ux!x4!o5EEemO?p`)%sC#&RDfh6jrN}>p@|T3WEDgE|gwO z=;H~jc5KdLsuj8`S3koG1r`+o=OuZe;Pn{-=O03$e6v7%Ch&YFPx$l{!e_@D3dK#6 z#w{p58fS}j`2mzKbGYwM1!AU%Kwja&)xi4wit=v&%iB)y0CKm1>-GikL>dC-I~f?} z-AwTWBW`;F=#LY`ZeV>*BF>NFoC&n|PvGw$|59+~_s%=&b3aHPQuYH_1?Pah?E#z! z)aM?c>qoC7x=QN)4xqoKkCadKG{gXcZcU^smv2N#!4}9_~ zKFo@GeX>eCn*q!B`@}8t$?x~!2Yoo@!+++(M}7EtA3hDN`-km$(r~ZF<(Fdo4g>4` zg!Y~W=JQvL?<{c)nB$G&Fn$Zf-vH~t`uzx)z7PDK%ltp_$^YGlKl0%M7UTv4e4Yo> z{vsc)1lILo|5f?qn?0EJ(jH8E4+DFB0QdRihkRJXa1rF>+u9;A_2#VgdIsk36<@gudXh{to;KT)>DFk{#E1TD&Wz@}a6h50G~$t!cimk9%Tp*x z&pGv?4$m?t+bz_qeLUaU*^Mk7Bpn4Osk-+@aVMEW&11NjO64=W&MT|-QF_qDa(U$u`1#J2U8`0`=o6WVnU0-Lbwpab1kWR`r=4=}^O{$Vdy`TU z?WVc~oN%h-&EM2ciprVK^=ou52=!f2J>489xiKp5KE!6LdcvV)Z92l=ARJgv3 z-V{#-rgrsIj)_xbx$3z28NQ#GVxInk+oacs&zqHAmy^ZuT-xo-YaBJDljUS>pReQ; zLQVsDisc2LSFRj1y(!mt$VxX$?Q+?cG3}k0Tvxp?U444ON=Ho>U*me}aSQbpC!I~b z2~)ZDx;CYguDbA?l*5Fpu)DS /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 @@ -21,6 +21,13 @@ void sig_handler(const int sig) exit(0); } +static void err_sys(const char* msg) +{ + printf("error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + int main(int argc, char** argv) { /* CREATE THE SOCKET */ @@ -30,7 +37,6 @@ int main(int argc, char** argv) int listenfd; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen; /* length of message */ - int connfd; /* the connection the client makes */ char buff[MSGLEN]; /* the incoming message */ struct sigaction act, oact; /* structures for signal handling */ @@ -91,6 +97,8 @@ int main(int argc, char** argv) servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); + + /* Eliminate socket already in use error */ int res, on = 1; socklen_t len = sizeof(on); @@ -99,6 +107,8 @@ int main(int argc, char** argv) err_sys("setsockopt SO_REUSEADDR failed\n"); } + + /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("bind failed"); return 0; @@ -121,79 +131,67 @@ int main(int argc, char** argv) n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); + + if (n > 0) { + connect(listenfd, (struct sockaddr *) &servaddr, sizeof(servaddr)); + } + + printf("connection attempt made.\n"); + /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { fprintf(stderr, "CyaSSL_new error.\n"); exit(EXIT_FAILURE); } + /* set the session ssl to clientfd */ CyaSSL_set_fd(ssl, listenfd); - if (n > 0) { -// if(CyaSSL_connect(ssl) != 0){ -// int err = CyaSSL_get_error(ssl, 0); -// char buffer[CYASSL_MAX_ERROR_SZ]; -// printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); -// err_sys("udp connect failed\n"); -// } - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - int temp = CyaSSL_accept(ssl); - printf("CyaSSL_accept returned: %d\n", temp); - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - err_sys("SSL_accept failed\n"); - } + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + int temp = CyaSSL_accept(ssl); + printf("CyaSSL_accept returned: %d\n", temp); + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + err_sys("SSL_accept failed\n"); + } -// connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen); - + printf("connected!\n"); - connfd = CyaSSL_accept(ssl); - if (connfd == 1) { - printf("connfd = %d\n", connfd); - printf("accept error\n"); + for ( ; ; ){ + + if (( recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ + printf("heard %d bytes\n", recvlen); + + if (recvlen > 0) { + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + if (CyaSSL_write(ssl, buff, strlen(buff)) < 0) { + perror("sendto"); + printf("reply sent \"%s\"\n", buff); + } } else { - printf("connected!\n"); - - for ( ; ; ) { - - if (( recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ - printf("heard %d bytes\n", recvlen); - - if (recvlen > 0) { - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - if (CyaSSL_write(ssl, buff, strlen(buff)) < 0) { - perror("sendto"); - printf("reply sent \"%s\"\n", buff); - } - } - - else { - printf("lost the connection to client\n"); - break; - } - - } - continue; + printf("lost the connection to client\n"); + break; } - } + } + continue; } return(0); } diff --git a/project1/server-udp b/project1/server-udp new file mode 100755 index 0000000000000000000000000000000000000000..b502159e49ee1b1d0432e65dcf776969311905b7 GIT binary patch literal 7762 zcmeHMeQX@X6`%86!Vzra1QSBymThurOzRv@Y9jN|){gCb)k%zV2|)xl=exD{n)|SB z_kxYm*6!heF=?X;(JxT~LWowhjZ}mpijb)xX(~_yNC>G^K!M6Gp$Y}kv<AdLIefT&`2oU1io*+k~9fJTqx?r=fx5+ z7e$mc4M7KFpaN+Q%0i$ZCGK#=xQZnUCP&Q*^YlT4%%D69Y*_K+{kunBsH=be;hWd~B*$@U8`4*XFi<4Re))~J#+mo0s1Gba-YUbb zWq3syzPb!wUxx4WVFUSYA7*=nGQ7JC-&BUPW%vtacx4%0T!t?Kz8=q$zML-*Ab1W5 z`hSfuH*Pf@H<`+s1;^)|0Je3xXn@?L=k+Cuks`sR_Ns+e_dwcV_jBu=M(#@d`TV=((Yi8o9EK2$^xvW=W ziuIiv*S49fqfOJfM)bD=zo7i*Qzr8N0*IRm89RLbOtq<06{F=omsK z!r$cRNeg*3<{3F$zpZ#OJh>GO4^KR>M2NBC*;1)AGVacqydAwOJ{!JyLiV$CbqF;| z%ft9*L1{UAY%@Fc2C9^nv*$KtQzsVI0C~0em=c@^qu0#MaM!B%1S4WPaJrHq9cS-|CuutqrZFRZ&w6P zym+P%n0QiFd`VXvZI6U><(H06jGjL5lw2N$zDfh4aEY`Zp4^8n9-YIo!0`{zvj=Ms zcxe9$-I0aU9iaprnHofugHsOvA=-wq51%}Y#>YA;(P*9ZAeX_>J0g#Ptr|bp9%-mS z4!jYJoUuS2;!Hsw$tE8@S1O@;Q*mFUNenJTaSOaT`QFE+lI+RU{fI?Y_Kb0j5C_^L zST7=zD^R%?!s{z&kCMqIWv>Oe@5{jV!cZ?7_?osM>!K55Xp}ZyhQi3WYz3c)<`7V@Cx9~ou5O6bEY-TxZjnUR|lw;V< z;@is(#3H*W4xBhTQy+RirQUB4uE~jbHk)&eMBa+Kmf`Iy+!zdQ7}#o%Zi}bfRJPCP&E<_mI%Q>D zBV##Eyw5UnS))Ifca7!AdBV2h`6O~i&!B5L^Tb9&mAH1wxz<>^+*vwLq;rmIxVB{^ za@nkva8oeg<~*xnvuAY~j9_1~QhP1f&0GEHK?B>9>lyKODiK%`yp9Va=fWNTE|uEB zhcQepR*&O}+yfqghkg&vXTlV?y;}tKg#$|}L!rA6*aph#K+UKxH>m3Hy6VbJ7hmLt z2E^AFU-zZek)_mW0r7#Z;B0NJ4v$oAkSh1nHwsoSqruArbW$Ur(aO-o`Ax`N-pcv}X{P}d=1Lr+(-UI)S z2fA?HY6P(kmNiM-jd$J=3gdVyBG|Al2j}}J&a-mOp&y+q?Z+Q#~}wrh?0?LCF8TQHiU&C%5>S6x$(aMhKnK!~U_m~rDh;BH=VTj%f&X65@u z6q~9QZC$%@r5o?_P+ztX?J1=2Vx3BgD3Kj^Y!OWkW?@fpH?Jgnt-OQ1aTYKk%Ufyc zt4x2|712~Sg@4x?z<)0QM7d<#jf<#do4xsX#xm_BYHFlvnDKl*KB#Kw{5KO&gYkGK zl|aKe7{p&xwxTTdIF5)Wa+wVFV(qa1fivFtoEazbP6dFmpc7?G%RqQ_lX~**0|EnB zC&nn#Dv;K@3-QT)JR&9PPwTYleo;}7l6ZJ@2K#XnbG2WktUJZ!x4<>cE zNACbJ=BdZ|@ftFm7dlaw=~fV9n|h4v{iw7QdEG9{Nqaz?3(RvqJPN%=xZ*8_?stq#oA-t;cf_`^t8>KJ0{G8S*+&kLga3)*FJ} z5CwXW$kHb)`hizWd%SlWLW2*XZJnsc^dpeA$Mq($>K3fE&nW0_7`?`ag^3P3(%d3T3<04<}g&i?^< zh@>9Z&&toxdj&ddm#*N;W6fvi{RwjVj(YM=5PFkd8JKLB&-ZPRw#WOCv!7y*eVp>? zaed~4+JG{hs6+Y(NZZ>0y$#S~J33K^=?sYF>>uBhyP&6KD3UhFKlbvC1W442sI2^F zTO{raw55{^y}1;4NoUFVY;|hD%gZS={5cfxE{%OaRT=Ysdv#cF*7ypvJ*a*naXn(8 zx;0jJt_rJ`xxOf@400V&Sb2c!g~Dn!a$QiEPgKo+g}Gv>d9JWjll!B>2wo)4TZIv% zNSvPvbA=Lu^H5>VXkc&e3JUJ>YM&<$%1Bo8M_~jD66cA+^c?QVFdr1=Q^9lg_S2x? zuC2}oAO7?(0~Aa#p3C> zVrfXcU*d>$`vI&RtTFD5zXIcr0-y5XR$zT5qWnf+dD8|&R;O#OT+X4cQ~z~v-M)bRQ^4Av0r>M@z`A|P zE7_puzX1HX6qt8zjMN3_?`mI%43upFJ`8^_QWsQIi6pT0zkyqOdH8~iiBEeNa(O$3 zd=2DsU-jZ;0pjU(=V1xb?a?0#eQO-+Hv;SRVgXMy ziM;E$h2Gw10+;xk+PclojoV_TDUw#+>PtB|shV!aOr&#J%fU6vCyGonnKS#+xt@61 z#J7RGW5x>u0tdkUwB=gK=$fmqX@uoZQ8IZHRR>EGhsFG$P)E^ZA(I(I6(2Hrf}N%6 zSb3a(R~C}}vg7NzTQ_%@9b4Mbb2SW|pH(v{%=VkMv~J$m1}&dNe#sE#`p&IuTRY9I z>(*`Sh?%k0wVfR_CqH&1oPz8yKC{F&n={^tZEmA)V)34|1>J$>HPJrHHTx5$YZtP6 zqCEqG2V?bVM5qriEiL*330z~zbF;FoKeWtJDEmM&BWqHhb!G}0y)Qfd61d*iJihqM z7S8%?16?O)+VO0XV=4QbBtHwyu3YvN=u?FB8vQK4Bl+d(^OC;=F@VS8J&E3a)4mPv z#M^{dBtJ8$TRnd*`FYD Date: Wed, 21 May 2014 14:36:13 -0600 Subject: [PATCH 016/103] comparing --- project1/server-dtls | Bin 12645 -> 0 bytes project1/server-udp | Bin 7762 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 project1/server-dtls delete mode 100755 project1/server-udp diff --git a/project1/server-dtls b/project1/server-dtls deleted file mode 100755 index 2e39a85911b056057fd982f6326e23722df8abf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12645 zcmeHNe{fXSb-pXD$QpzY1XD1I{Y(~HPGAvOX0T1B5|RMf0u)IQJh*LJUwJL`LBO)rL*UL_ndp~@B7|;_xy2P!`eU~Aap1Yg@S1KPlBOJ@>`XpQW)X} zQ7+&k`fQC7JNIv@iXNJU5sf(k(`z%9FjA<`FtNt7X35||LkOUld>g2eoy)Ro_Y z`16p14kFVL5X+^!0IV4DV#r7rfJv0I43Z6f8)cJffk|4{_>L1_f1?oV|2!BXt%i)G z{Wm@=fp}8*kd<-69B|f82LqAQKKWffd_pUO zGyfev`G-FFZ+-F;KKzsq|D_K*8;C#a)Blx6PJ7dR z@};nM@Ho~aLMdi#74VS>yg(GXa?a)1VuAP$@;~@kFr@G-Q8_990`VyH2KOm@bHog> z8Tz%*r~Nqs(-rF|)*a2|l3YZ03A4UsgBiE7R(m4nSlN~hHOX|!YKgWcEn%ANo#~XB zbD~+tG=+KJ4ztPCt4YFyl~dWL%v{qQZEkKbQ`S!5M%yjNw6fWBRwrbwXk3_yRKn3I zH7#4sWI7r*cUaj(TQ}mdsFO&ia$W`3WNk}B^N!`_3NvSAp>B3sj-8Hc#T*K2n?O6W z3CGf+Xe?%BCKZ{_S!QE4u_NkO_gmd&TLO)DD_!ra9aUpi)=9J_P&G^G;y0DhIqI64 zR5Q_W*+i;c_BcCxC3}Ejq1EverZjMOY3?Nu#}4E4HI8 zo9;vwjCWSFsZK%8XpDV~A~-kP;qHtkkYdH7P85RHTu!AU30BuN)UT;AS41i&VilZU zn2M4ZXRHu(HBH5sqEeL(Q>lAZFM$2L0Hps4L=JOU@1t`QiJ9Ed>yUwIr4kp2P0EnC zf@jyX*=kJ{VFNG5TKWR>lVh`=OOC}epBxXzGIDJE2Kg88EFi~fDJQ={h$ZCHg{UB( zf#)-Mu@I}sQIpl=SXNc!v#{34QL**ps7C`i7Jef+9@s79cqnZp$Mf<*ay+NElmCGb zadJGoZ1M$IuH-l2Sx&xC2#5SjLUfVeEJP1Eo}0VKZxy1Cd=Z{wLJag?86O|tGwc+NPD8Ks{xr00M2z1Rg!cI25Pmrt8Y4edgc3fiis%;P-k(j+}mlN-oI80nYyi4M8;#I^MiP`IR74de7 z+57f-;zo%%3U(uLmBbtkdn<8;#2giSJFy`#N5^J^#!4lwCC(5FiPsZ%5nuQe35z*u z_AcVH5_9zIeZ*%Z<|x|xiH9ZTXxfK~k4wx^wT}=Vk(i@vKSR7<;yCef;$0Hk#3zU| z5_8n;VdCu)bM)TqQAQgZ&n9g~Xf{_E};>V$KeGl(|+LgIbI zmx(WYGCscigNOQm)qCzjV@s1=g=dF-=Fwp2>s#zOgTc_~I5PZK+kWrgKv{Uii%&cb zb4w56r}y%-oq-WHOkmDk+T8z6@A>(sf?>+W&zv3^dWoVFgi`<2%LV;EdG)84QB9x#aW8KKIe=LXJ3DI`6eDvq&j#EWX(i93p;Vf_T7f4ll19c&{R^Ouf z>sVdA-w6q)7^=)MdK{{!N2q-6!tV3KSm6V8#mG`-9p$TOe_!|&q%9vlRU6*=qk&*( z2)uVV*dGj!US!#Q;a{>ygrUChIWXjvN^Y^-_C{x5Oh)&j?9tiC!@LOqXjJs}geydT z`BC;Ta50JrVYdHuMdtZyBo4qX%g964dpY1tw!Uhz z^;c+Ro5%XoDt?jaIoG#pFmUBy;@m+fay2-tao~> z-++F)w(fix^jPnsm8U({-&XNqrvDw|o}S@ApcZmGI#4otyAr)$DZ1w&`3+{NL>4&( z#}430gw#={rd&g%ZsA}Y>kK-Dz5G1HZI}kc1rsxH45^qq4iaIf{i~P+Cw~h?q-B{_ z8(soNzKU;(7_wEUP$_2D5b5p87^huo?m zr_OZ+x%Ldpc9tE4dIPX(=d&mTM#`DG7pY^9FacRvV+g7!_}+g@>*dmVZMYm2n2S<& zp#iKj)QjD^hJJ}BHbiHYXrcno!U9yQQ0*%5-CI7Vsvn^e>@b#l5xLL=IhPYihlN^L zsP(TGzP7W@vO|O6UCi6hI=f5!AC;X-v6rS{yfz;Kpk2Cp7AZ5T*2_` zj2A(lUBmaLA?!PN+woTUm@?OhE@%|9{`6<6qK&TQ|Dc7Be}k4#{N3A87aBm>je#>K zCmBR}A5i->t=;`qf6L!P6=Apq####0W{GbGqtBq%bj{GfKBX1XNuK`wK5S#ktwdR~ zne*R(J!(jv&*U{o9t&YtN5UOU2*Bj~MPnDSVIJkKj&Yf_rvuYl&ewrKxf@$|&g9;V zccfP2$L{@&<>OnLM{h(2?H*Z-m#*IPWdq4@#n1~um>zxN63Xu7i^Lr#U;VUT&n4$} z^;|>etm*4PX+G&P5wW7e_FQfA@h$$-k-VO8$KR!-`oBIwcS1P z0$%re`J#qR18>CzVtRA^y84YRh8<1ClU6(;#Z2B@raIY&CEe zFr2i(bCaUcmicm~7K#kfXgiIGWK(VS((Y%A7bIJRZ* zw1g5Gkj07{HPtGUYh9hqJS9wJ->39{mZ9{gDyPHhb{q0J<+w_}YcWvIiC8q1N;^gj zM^?u&+=E-QJii&yq&%kLK!J#m;pXQ-&4{Ht z(X%+DB2@2;CLG!Q$%K_csp=qzGn#?_Ogifri($%>9CaKX|BOzIK}64iN#n0hM$)r1X;M9Hu1Zkf$k_p)uKP%=LwZ_wscD$1`Dn zJU-q6p2uSA0{!>c41sSqi9k;%u&_87+=p}nX=R{d z*em5@r6jbrr1-vBGn`&LS_Xemz|8f$KeRy$7!M!1W%u-UHWr;Qvbx z?8kSk42bo?E7t_^J3c<0%lj#OI+yoS_{1&mr15E6-q+$&w+P~+9N*D+SjI^${T%L_ z`6~5fAHMB_p9jV#dGP>Vg78UR-UHxMx(qxc2^{R?`w`0Hdmui;3w&e~gO3D5jQ4=^ zP|x=%-l4OiI1r{AkdDJynsvSaerd021K{r!cz>=loWxz+o1k|=mq63{gQ0n#+dwNp zYe8E;ZJ-^Xy`V#&W1yEnCqZw5-UVF(O@j}?JkV{Rm7uktEuc2g4$xlEA59R7O@sRxDk9cV5Efcc=s*BDwBPC)x_`WEHn{43|w-HX|Z91zC~m zHT6rKXuFHrQ~5}1K7q^mL|jCO>}bvwk$86s_7r!rN`i~J9PgT>nhQ+GvR0D%Dw0V$ zA|kH^BaYRDxV&DAWYh9CDq`7YTQ=HhnRXmGHBvduXf_+|RylP1n=z=tc(gMSL&0en z#7{()qAcQiOGI!2>%`GSci8X1IcGUnIM<|K1_0-i4wNx`8H8^oQcwC%KwtptAU_HL zEC*@5eVF4suY|P{xYnyh9LI|^%jMd54tiCHbB!=ikF*iQ^+7$Zne)&)4!|{psMO&a z*aG6Zp&r-RlgP}qr2};t9s+TFP{g%y35J+gm&Jb)X)@BOtbk^*Ii` zttThOy~9%(C4;J%+;|t;f6eT5K-*{7Jbk_bFG8{jwE$TcP(M zfg7~mF<{!GNcz)Yb6f4|kZHXa5!ZTs_`1~xz4KG({TOMuqLgDS{eN&@sBKVP$N9+* zSC~?ddvNeG^xlLH%jKNm1xn~M^nL+3`2Sh8`zdgPj*@$ZU1V+(q6!^_?|fnzh~;u_an5_~9bY2E-|9+1rtKkm zP2hgSMCEy={I(QUC3AmKSe3wiL}66`_X~y9YUIA4Fh^9ae}&b8;5t`WGWm>En5|IH zUWNJOR__1`bB9vvP~l>Ux!x4!o5EEemO?p`)%sC#&RDfh6jrN}>p@|T3WEDgE|gwO z=;H~jc5KdLsuj8`S3koG1r`+o=OuZe;Pn{-=O03$e6v7%Ch&YFPx$l{!e_@D3dK#6 z#w{p58fS}j`2mzKbGYwM1!AU%Kwja&)xi4wit=v&%iB)y0CKm1>-GikL>dC-I~f?} z-AwTWBW`;F=#LY`ZeV>*BF>NFoC&n|PvGw$|59+~_s%=&b3aHPQuYH_1?Pah?E#z! z)aM?c>qoC7x=QN)4xqoKkCadKG{gXcZcU^smv2N#!4}9_~ zKFo@GeX>eCn*q!B`@}8t$?x~!2Yoo@!+++(M}7EtA3hDN`-km$(r~ZF<(Fdo4g>4` zg!Y~W=JQvL?<{c)nB$G&Fn$Zf-vH~t`uzx)z7PDK%ltp_$^YGlKl0%M7UTv4e4Yo> z{vsc)1lILo|5f?qn?0EJ(jH8E4+DFB0QdRihkRJXa1rF>+u9;A_2#VgdIsk36<@gudXh{to;KT)>DFk{#E1TD&Wz@}a6h50G~$t!cimk9%Tp*x z&pGv?4$m?t+bz_qeLUaU*^Mk7Bpn4Osk-+@aVMEW&11NjO64=W&MT|-QF_qDa(U$u`1#J2U8`0`=o6WVnU0-Lbwpab1kWR`r=4=}^O{$Vdy`TU z?WVc~oN%h-&EM2ciprVK^=ou52=!f2J>489xiKp5KE!6LdcvV)Z92l=ARJgv3 z-V{#-rgrsIj)_xbx$3z28NQ#GVxInk+oacs&zqHAmy^ZuT-xo-YaBJDljUS>pReQ; zLQVsDisc2LSFRj1y(!mt$VxX$?Q+?cG3}k0Tvxp?U444ON=Ho>U*me}aSQbpC!I~b z2~)ZDx;CYguDbA?l*5Fpu)DSG^K!M6Gp$Y}kv<AdLIefT&`2oU1io*+k~9fJTqx?r=fx5+ z7e$mc4M7KFpaN+Q%0i$ZCGK#=xQZnUCP&Q*^YlT4%%D69Y*_K+{kunBsH=be;hWd~B*$@U8`4*XFi<4Re))~J#+mo0s1Gba-YUbb zWq3syzPb!wUxx4WVFUSYA7*=nGQ7JC-&BUPW%vtacx4%0T!t?Kz8=q$zML-*Ab1W5 z`hSfuH*Pf@H<`+s1;^)|0Je3xXn@?L=k+Cuks`sR_Ns+e_dwcV_jBu=M(#@d`TV=((Yi8o9EK2$^xvW=W ziuIiv*S49fqfOJfM)bD=zo7i*Qzr8N0*IRm89RLbOtq<06{F=omsK z!r$cRNeg*3<{3F$zpZ#OJh>GO4^KR>M2NBC*;1)AGVacqydAwOJ{!JyLiV$CbqF;| z%ft9*L1{UAY%@Fc2C9^nv*$KtQzsVI0C~0em=c@^qu0#MaM!B%1S4WPaJrHq9cS-|CuutqrZFRZ&w6P zym+P%n0QiFd`VXvZI6U><(H06jGjL5lw2N$zDfh4aEY`Zp4^8n9-YIo!0`{zvj=Ms zcxe9$-I0aU9iaprnHofugHsOvA=-wq51%}Y#>YA;(P*9ZAeX_>J0g#Ptr|bp9%-mS z4!jYJoUuS2;!Hsw$tE8@S1O@;Q*mFUNenJTaSOaT`QFE+lI+RU{fI?Y_Kb0j5C_^L zST7=zD^R%?!s{z&kCMqIWv>Oe@5{jV!cZ?7_?osM>!K55Xp}ZyhQi3WYz3c)<`7V@Cx9~ou5O6bEY-TxZjnUR|lw;V< z;@is(#3H*W4xBhTQy+RirQUB4uE~jbHk)&eMBa+Kmf`Iy+!zdQ7}#o%Zi}bfRJPCP&E<_mI%Q>D zBV##Eyw5UnS))Ifca7!AdBV2h`6O~i&!B5L^Tb9&mAH1wxz<>^+*vwLq;rmIxVB{^ za@nkva8oeg<~*xnvuAY~j9_1~QhP1f&0GEHK?B>9>lyKODiK%`yp9Va=fWNTE|uEB zhcQepR*&O}+yfqghkg&vXTlV?y;}tKg#$|}L!rA6*aph#K+UKxH>m3Hy6VbJ7hmLt z2E^AFU-zZek)_mW0r7#Z;B0NJ4v$oAkSh1nHwsoSqruArbW$Ur(aO-o`Ax`N-pcv}X{P}d=1Lr+(-UI)S z2fA?HY6P(kmNiM-jd$J=3gdVyBG|Al2j}}J&a-mOp&y+q?Z+Q#~}wrh?0?LCF8TQHiU&C%5>S6x$(aMhKnK!~U_m~rDh;BH=VTj%f&X65@u z6q~9QZC$%@r5o?_P+ztX?J1=2Vx3BgD3Kj^Y!OWkW?@fpH?Jgnt-OQ1aTYKk%Ufyc zt4x2|712~Sg@4x?z<)0QM7d<#jf<#do4xsX#xm_BYHFlvnDKl*KB#Kw{5KO&gYkGK zl|aKe7{p&xwxTTdIF5)Wa+wVFV(qa1fivFtoEazbP6dFmpc7?G%RqQ_lX~**0|EnB zC&nn#Dv;K@3-QT)JR&9PPwTYleo;}7l6ZJ@2K#XnbG2WktUJZ!x4<>cE zNACbJ=BdZ|@ftFm7dlaw=~fV9n|h4v{iw7QdEG9{Nqaz?3(RvqJPN%=xZ*8_?stq#oA-t;cf_`^t8>KJ0{G8S*+&kLga3)*FJ} z5CwXW$kHb)`hizWd%SlWLW2*XZJnsc^dpeA$Mq($>K3fE&nW0_7`?`ag^3P3(%d3T3<04<}g&i?^< zh@>9Z&&toxdj&ddm#*N;W6fvi{RwjVj(YM=5PFkd8JKLB&-ZPRw#WOCv!7y*eVp>? zaed~4+JG{hs6+Y(NZZ>0y$#S~J33K^=?sYF>>uBhyP&6KD3UhFKlbvC1W442sI2^F zTO{raw55{^y}1;4NoUFVY;|hD%gZS={5cfxE{%OaRT=Ysdv#cF*7ypvJ*a*naXn(8 zx;0jJt_rJ`xxOf@400V&Sb2c!g~Dn!a$QiEPgKo+g}Gv>d9JWjll!B>2wo)4TZIv% zNSvPvbA=Lu^H5>VXkc&e3JUJ>YM&<$%1Bo8M_~jD66cA+^c?QVFdr1=Q^9lg_S2x? zuC2}oAO7?(0~Aa#p3C> zVrfXcU*d>$`vI&RtTFD5zXIcr0-y5XR$zT5qWnf+dD8|&R;O#OT+X4cQ~z~v-M)bRQ^4Av0r>M@z`A|P zE7_puzX1HX6qt8zjMN3_?`mI%43upFJ`8^_QWsQIi6pT0zkyqOdH8~iiBEeNa(O$3 zd=2DsU-jZ;0pjU(=V1xb?a?0#eQO-+Hv;SRVgXMy ziM;E$h2Gw10+;xk+PclojoV_TDUw#+>PtB|shV!aOr&#J%fU6vCyGonnKS#+xt@61 z#J7RGW5x>u0tdkUwB=gK=$fmqX@uoZQ8IZHRR>EGhsFG$P)E^ZA(I(I6(2Hrf}N%6 zSb3a(R~C}}vg7NzTQ_%@9b4Mbb2SW|pH(v{%=VkMv~J$m1}&dNe#sE#`p&IuTRY9I z>(*`Sh?%k0wVfR_CqH&1oPz8yKC{F&n={^tZEmA)V)34|1>J$>HPJrHHTx5$YZtP6 zqCEqG2V?bVM5qriEiL*330z~zbF;FoKeWtJDEmM&BWqHhb!G}0y)Qfd61d*iJihqM z7S8%?16?O)+VO0XV=4QbBtHwyu3YvN=u?FB8vQK4Bl+d(^OC;=F@VS8J&E3a)4mPv z#M^{dBtJ8$TRnd*`FYD Date: Wed, 21 May 2014 14:42:50 -0600 Subject: [PATCH 017/103] comparing --- project1/server-dtls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index b12806fb..88a5c970 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -147,15 +147,13 @@ int main(int argc, char** argv) } - /* set the session ssl to clientfd */ + /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); if (CyaSSL_accept(ssl) != SSL_SUCCESS) { int err = CyaSSL_get_error(ssl, 0); char buffer[80]; - int temp = CyaSSL_accept(ssl); - printf("CyaSSL_accept returned: %d\n", temp); printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); err_sys("SSL_accept failed\n"); } From e3790db9615bf33e1e640f2d4c47799c13bb5fe5 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 16:33:17 -0600 Subject: [PATCH 018/103] P1 v 1.6 --- project1/server-dtls.c | 52 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 88a5c970..d8b1c0fb 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -18,7 +18,6 @@ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; - exit(0); } static void err_sys(const char* msg) @@ -32,6 +31,8 @@ int main(int argc, char** argv) { /* CREATE THE SOCKET */ + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ int listenfd; /* Initialize our socket */ @@ -49,6 +50,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); + CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; @@ -131,10 +133,12 @@ int main(int argc, char** argv) n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (n > 0) { - connect(listenfd, (struct sockaddr *) &servaddr, sizeof(servaddr)); + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); } + else err_sys("recvfrom failed"); printf("connection attempt made.\n"); @@ -161,35 +165,37 @@ int main(int argc, char** argv) printf("connected!\n"); + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - for ( ; ; ){ + printf("heard %d bytes\n", recvlen); - if (( recvlen = CyaSSL_read(ssl, buff, MSGLEN)) > 0){ - printf("heard %d bytes\n", recvlen); + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); - if (recvlen > 0) { - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - if (CyaSSL_write(ssl, buff, strlen(buff)) < 0) { - perror("sendto"); - printf("reply sent \"%s\"\n", buff); - } + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); } - else { - printf("lost the connection to client\n"); - break; + if (CyaSSL_write(ssl, ack, sizeof(ack)-1) < 0) { + err_sys("CyaSSL_write fail"); } - + printf("reply sent \"%s\"\n", ack); } + + else { + printf("lost the connection to client\n"); + break; + } + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); continue; } + CyaSSL_CTX_free(ctx); return(0); } From 1fd9efda94f19de777749262f0bfa05196ae55ea Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 20:50:28 -0600 Subject: [PATCH 019/103] loop still failing --- project1/server-dtls.c | 65 ++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index d8b1c0fb..9d88ae18 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -1,3 +1,29 @@ +/* server-dtls.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + * ============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2. + */ + #include /* standard in/out procedures */ #include /* defines system calls */ #include /* necessary for memset */ @@ -8,16 +34,18 @@ #include #include #include +#include -#define SERV_PORT 11111 /* define our server port number */ +#define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -static int cleanup; /* To handle shutdown */ +static int cleanup; /* To handle shutdown */ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; + exit(0); } static void err_sys(const char* msg) @@ -33,17 +61,17 @@ int main(int argc, char** argv) char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ /* Define a signal handler for when the user closes the program - with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - restart the call to accept() after the signal is handled. */ + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. */ act.sa_handler = sig_handler; sigemptyset(&act.sa_mask); @@ -128,12 +156,15 @@ int main(int argc, char** argv) CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; - int n; + int connfd; - n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (n > 0) { + if (connfd < 0) + printf("No clients in que, enter idle state\n"); + + else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) err_sys("udp connect failed"); @@ -141,7 +172,7 @@ int main(int argc, char** argv) else err_sys("recvfrom failed"); - printf("connection attempt made.\n"); + printf("Connected!\n"); /* Create the CYASSL Object */ @@ -150,7 +181,6 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } - /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); @@ -163,8 +193,6 @@ int main(int argc, char** argv) } - printf("connected!\n"); - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ printf("heard %d bytes\n", recvlen); @@ -189,9 +217,10 @@ int main(int argc, char** argv) printf("lost the connection to client\n"); break; } - - CyaSSL_shutdown(ssl); + + CyaSSL_set_fd(ssl, connfd); CyaSSL_free(ssl); + close(connfd); printf("Client left return to idle state\n"); continue; From 29e508d3970e24fce1f0099d27bb89c5d53b227f Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 21 May 2014 23:17:32 -0600 Subject: [PATCH 020/103] rm server-udp --- server-udp | Bin 7754 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 server-udp diff --git a/server-udp b/server-udp deleted file mode 100755 index f0142d498503d48818f347d4c38e41a865ed893d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7754 zcmeHMeQ;FO6~CKoaK#WJMvH>_ipvNsECC{eiqnK-!-pF{NYD<-W3&5`x3bxd``#jP zpe2SVYgi|3rBkP0){g#VTRVya7CX=&(T;zhbsVPcR2{Xmv9v=gBDQGy``!C4JXV}e z|L5+Uz4v#|x#ymH?ztcDy>CZjt${#5=u{ypg+znFPy;FtUamL|!Vs5=S>ie|O-w)) zc?~-t12WKnRE4@As1no;+}*!NtdAvVtY}m_@T){gnk+fks8sc z1;l>IuRvA@ejRwE5-^E;_Cc~CZ=-Kg3ouFZ)_mY5V-tmlJrWF&!r+lK{|@j0zmTXO z-HWy0`|Uf8IuhG+eDl(&&UxwN+;l3F-x_hUkp+s!w&X8c)q#IC4(gl=V%s_peMkP3 zw|{=^hWroTf46nZFPCke@~h;|lYim3Ye3W?ePsv(MOpWY+uu9LvOh(9U<%5s%kYh5 z_@**^pAQ=-FY#gOGt2PGGTdB-?<&JzEyHum@HJ(aVY0gr4AEDY3j_fCoS=Uf33J72 z({YojjG1?=q;Rr{&6X={H=9Yze@8gIxm3pO61`R~m(2;s&84l3=&^bn2zI72Ns+S> zTe@=D9^qJ-q?;9{N&Qe8&$(t#Je5IBcTYCs)tF*gY{k-Mb3vpY_EdPkb0u99zHzA3G>9t+yHCW6w&=QP>9Y z6B2VY_AKIIi8(5pE*;w;F-K=FChnD(qqG}|H%ZLV+RKU8NX${&Yls^q=ICvP-dMfF z^n$&K*Z`jY_l<>j2i`xirhTp5i`cRS{_a?Bi-)kUWFc^}YuNuAnjRkU<9)Y7-Q4B) z8#q1T{=mpSC>HSLsgA-21IMS12E*iyAANPC_ySq`2&Md?(-no^9s2P4z|q%F=K~`z z%7$;~hJ}`JP&a<#)se!f;sLo_cict=B7cR{A1ZBwiASnf7kKp}SoX781QYtdUK?`N zSwqNyA!B`LGCbzsziW6H+;w-Z?>~M9-48{phuT6fa+~=rtr?A;U{+{5UWk@PqX#*u zqfx0CrcrDZR(d%jKos^Qp|-G>GgJD`=O{)G-$usdA{TS9Y8c)v1jD5dJ{uqR)Q@d~ z2B~yEJ1BM>E7XOlnC*~SU?d zPT4eMwcf5m^p8XN!-a-$p&j1Us*8-9()S>Eo~ciHrrzQ+buSjp7<(*M{Tgi5Wl&nH z`ixQ4F|4QkYak`(w3t6w-2O`O$2M4n!R7cLiXMg!3U@0TCNq&Gmvxx0p_in{HmJv}o%L1>-f9oml|DfuZ|-iB9oKMe%SdE187twYpuo*~S|^G&PwfrRg0s;|ZLy#@XZ5E03>=ZJr^P!hY5%m! zTMgtK%bTB$k1s*~JeY7GsYMYMKR5y**gqmKi333zJ2HJtP+_5gEiypY>fr}o{9ymG}3_S}X=3z(Tk$iF> z7{ZlVxHu)RM$YHaX~=my;gzNunEMv-$Dfa9pTYAcpUnCC6_ zc%Dj%2$3CkY!ONJWuQ;xZccGL8_xqKcsVOgc~$65yCRaxr10-rTk#K@Q($G2aW^g^ zmTh+B;yspWC(%+P)xwPDa`8UZLYMDNKn%*`J*fmb&O#ynBC;2yvD0xxB$4gu!5OUG z|37oaEMtYSCf~~dFrIWGkLd;w9x0`qe18Il0j!g}l>^KNX}Mj9ah~DwF763xxfbA4 zh)?#*wegInk86a9a->xtt`Ev_&AbM=6DV^Hp(tgzcGiQqZYak!b^rygEuARK#3xy< z56W?Ew4%{S%PudLPdSaPtDhW9QWq-eb;sFpItz{do$(@j6@N0b>1MvVz%W)0w zhMeumaX-;=yHTdC?1y{INyy!RvQCs^dKjeT46HW;jCaWJ5`9A1?}D_P;64V!a#{&^ zlw0X<+K3oP3{#%`WW8Fw=6+qpan6 zaXasY-0%hD_~6MqJlvt)|KT-{)GUGxCXnGJU1ZL=)u|T`EJxAt zwW#3xI@*AyGUomI8nNL_^i^nm5dA{pe#A=e&9i)OtFY>s`-{R#A@>o5l?S+AD6Cc^ z_XUMHqiX#t%pFUubA_dtJYyB+%2j8t!U$3%u1|%zLkYoksIYu!$NL_Qc~ek#1;uA1 ztM#KWf(41|L}7YP2(AZ(IV&pe73RsW?idQI9h-5iuv)qL46pQV7K}^9$7C@v{*Wr= z%>r?F7Efihj3?%mf;XIVsS-CF|GWjoKgT&@-G2Z(2U|3HtqLeBMz4EPFBM9#YyG36ge&N~-zKul3DiU^QsPq}?BqyCKN&j6zQ55RtV z*-j_6e;YveFQESfu=ZyF{`?eJ_fLK`JM{b)fInvd^SvP>bqefV;4{cT-74UEjE9jr zrDBpu0&D*pc=InWaNsd&l~!S@A&TnKIf0C#dgZ$-R#H6DgPj`muSypW%wx{Ho)KS!<2um4D%z4?vMWX z(8p){AhsaAA57tmC6RL-H{aD2N#OIq%I39ZY{j~E(-cW7XLY9>+(S*b$4sQN8Oy=T zlP^@6W-@Dbr?Z{$w27|{Ime9Ww+dYEdefF`B_oS&y15>jFCb*{qN%QpCa!|HKA|p} z$$U>wADZ}($@}SfqK=ir?RIWH*((iiUE9Du|s=1AvO!E3Mj=pxidoW{m;pI%H$-inoO{Rzh}z>h$Vze0Th^4Gw< z=ej8S$OE2}HSKsNN&Ct^Gs%xg=W8naW^@52Jwe~euTFlx`WWS}!Mwudo_D)?P5XYh z2={-lN`915@8A5b| From 084850ab3592a4c74d1cd0047ad0a197ffc6e8d1 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 07:08:55 -0600 Subject: [PATCH 021/103] still getting double free error --- project1/server-dtls.c | 52 ++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 9d88ae18..5e99e7de 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -113,7 +113,7 @@ int main(int argc, char** argv) printf("Loaded server keys\n"); if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - perror("cannot create socket"); + err_sys("cannot create socket"); return 0; } printf("Socket allocated\n"); @@ -140,7 +140,7 @@ int main(int argc, char** argv) /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - perror("bind failed"); + err_sys("bind failed"); return 0; } printf("Socket bind complete\n"); @@ -153,16 +153,18 @@ int main(int argc, char** argv) printf("Awaiting client connection on port %d\n", SERV_PORT); - CYASSL* ssl; /* initialize arg */ + CYASSL* ssl = 0; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; - int connfd; + int connfd; connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (connfd < 0) + if (connfd < 0){ printf("No clients in que, enter idle state\n"); + continue; + } else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, @@ -199,32 +201,32 @@ int main(int argc, char** argv) buff[recvlen] = 0; printf("I heard this: \"%s\"\n", buff); - - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - if (CyaSSL_write(ssl, ack, sizeof(ack)-1) < 0) { - err_sys("CyaSSL_write fail"); - } - printf("reply sent \"%s\"\n", ack); } - else { + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + if (CyaSSL_write(ssl, ack, sizeof(ack)-1) < 0) { + err_sys("CyaSSL_write fail"); + } + + else printf("lost the connection to client\n"); - break; - } - - CyaSSL_set_fd(ssl, connfd); - CyaSSL_free(ssl); - close(connfd); + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + // CyaSSL_free(ssl); + // printf("Client left return to idle state\n"); continue; } - CyaSSL_CTX_free(ctx); + // CyaSSL_CTX_free(ctx); return(0); } From 06fd240ba01a2eb73dfe4394141047e62b22a6a3 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 10:48:09 -0600 Subject: [PATCH 022/103] updated coding standards --- project1/server-udp.c | 118 ++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/project1/server-udp.c b/project1/server-udp.c index 74aeac56..9ef7e05f 100644 --- a/project1/server-udp.c +++ b/project1/server-udp.c @@ -1,70 +1,76 @@ -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 80 /* limit incoming message size */ -int -main(int argc, char** argv) +int main (int argc, char** argv) { -/* CREATE THE SOCKET */ + /* CREATE THE SOCKET */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int sockfd; /* Initialize our socket */ - socklen_t addrlen = sizeof(cliaddr);/* length of address' */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ - -/* create a UDP/IP socket */ - - if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - perror("cannot create socket"); - return 0; - } - -/* printf("created socket descriptor = %d\n", sockfd); */ - -/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int sockfd; /* Initialize our socket */ + socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ - servaddr.sin_family = AF_INET; - /* host-to-network-long conversion (htonl) */ - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - /* host-to-network-short conversion (htons) */ - servaddr.sin_port = htons(SERV_PORT); + /* create a UDP/IP socket */ + if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("cannot create socket"); + return 0; + } - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - perror("bind failed"); - return 0; - } + /* INADDR_ANY = IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); -/* loop, listen for client, print received, reply to client */ - for(;;) { - printf("waiting for client message on port %d\n", SERV_PORT); - recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); - printf("heard %d bytes\n", recvlen); - if (recvlen > 0) { - buf[recvlen] = 0; - printf("I heard this: \"%s\"\n", buf); - } - else - printf("lost the connection to client\n"); - sprintf(buf, "Message #%d received\n", msgnum++); - printf("reply sent \"%s\"\n", buf); - if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) - perror("sendto"); - /* continues to loop, use "Ctrl+C" to terminate listening */ - } + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + perror("bind failed"); + return 0; + } + + + /* loop, listen for client, print received, reply to client */ + for ( ; ; ) { + printf("waiting for client message on port %d\n", SERV_PORT); + + recvlen = recvfrom(sockfd, buf, MSGLEN, 0, + (struct sockaddr *)&cliaddr, &addrlen); + + printf("heard %d bytes\n", recvlen); + + if (recvlen > 0) { + buf[recvlen] = 0; + printf("I heard this: \"%s\"\n", buf); + } + + else + printf("lost the connection to client\n"); + + sprintf(buf, "Message #%d received\n", msgnum++); + printf("reply sent \"%s\"\n", buf); + + if (sendto(sockfd, buf, strlen(buf), 0, + (struct sockaddr *)&cliaddr, addrlen) < 0) + perror("sendto"); + + /* continues to loop, use "Ctrl+C" to terminate listening */ + } } From 281dab248332594be109f338f4f0346cc556bc9a Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 10:51:49 -0600 Subject: [PATCH 023/103] updated coding standards --- project1/server-udp.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/project1/server-udp.c b/project1/server-udp.c index 9ef7e05f..e53a9b24 100644 --- a/project1/server-udp.c +++ b/project1/server-udp.c @@ -1,3 +1,28 @@ +/* server-udp.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a UDP server for instructional/learning purposes. + */ + #include /* standard in/out procedures */ #include /* defines system calls */ #include /* necessary for memset */ From 33d5fffef4d4a870e157e142ff0563c65e5188ff Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 10:54:50 -0600 Subject: [PATCH 024/103] updated coding standards --- project1/server-udp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/project1/server-udp.c b/project1/server-udp.c index e53a9b24..05c1c78c 100644 --- a/project1/server-udp.c +++ b/project1/server-udp.c @@ -24,27 +24,27 @@ */ #include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ +#include /* defines system calls */ +#include /* necessary for memset */ #include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ #include -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ int main (int argc, char** argv) { /* CREATE THE SOCKET */ struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ + struct sockaddr_in cliaddr; /* the client's address */ int sockfd; /* Initialize our socket */ socklen_t addrlen = sizeof(cliaddr);/* length of address' */ int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ + int msgnum = 0; /* the messages we reveive in order */ char buf[MSGLEN]; /* the incoming message */ From ee3040b9023eb8367179e6b5576a5465484d7b06 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 10:56:08 -0600 Subject: [PATCH 025/103] updated coding standards --- project1/server-udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project1/server-udp.c b/project1/server-udp.c index 05c1c78c..57084b42 100644 --- a/project1/server-udp.c +++ b/project1/server-udp.c @@ -32,8 +32,8 @@ #include -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ int main (int argc, char** argv) { From 4d74f19a7ace065eaa4c4331bda513c1302537c2 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 11:06:59 -0600 Subject: [PATCH 026/103] updated coding standards --- project1/server-udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project1/server-udp.c b/project1/server-udp.c index 57084b42..a851de29 100644 --- a/project1/server-udp.c +++ b/project1/server-udp.c @@ -1,4 +1,5 @@ -/* server-udp.c +/* + * server-udp.c * * Copyright (C) 2006-2014 wolfSSL Inc. * From da8a38c8af24634c1148a92034ca2cc12c0036a5 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 14:32:59 -0600 Subject: [PATCH 027/103] fixed valgrind error with DTLS v1.2 and AES --- project1/server-dtls.c | 137 ++++++++++++++++++++++++----------------- 1 file changed, 81 insertions(+), 56 deletions(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 5e99e7de..612ef5c3 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -18,28 +18,29 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA - * ============================================================================= + *============================================================================= * * Bare-bones example of a DTLS server for instructional/learning purposes. * Utilizes DTLS 1.2. */ -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ #include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ #include #include #include #include #include -#define SERV_PORT 11111 /* define our server port number */ +#define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -static int cleanup; /* To handle shutdown */ +static int cleanup; /* To handle shutdown */ + void sig_handler(const int sig) { @@ -48,6 +49,7 @@ void sig_handler(const int sig) exit(0); } + static void err_sys(const char* msg) { printf("error: %s\n", msg); @@ -55,24 +57,26 @@ static void err_sys(const char* msg) exit(EXIT_FAILURE); } + int main(int argc, char** argv) { /* CREATE THE SOCKET */ char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ - - /* Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. */ + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ act.sa_handler = sig_handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; @@ -112,53 +116,65 @@ int main(int argc, char** argv) } printf("Loaded server keys\n"); - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; - } - printf("Socket allocated\n"); - - /* INADDR_ANY=IP address and socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ + int ret; - /* Eliminate socket already in use error */ - int res, on = 1; - socklen_t len = sizeof(on); - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); - } - - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; - } - printf("Socket bind complete\n"); - + ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); + if(ret == SSL_SUCCESS) + printf("ret successfully set to \"DES-CBC3-SHA\"\n"); + /* END: avoid valgrind error */ while (cleanup != 1) { + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + printf("Awaiting client connection on port %d\n", SERV_PORT); - CYASSL* ssl = 0; /* initialize arg */ + CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; - int connfd; + int connfd = 0; - connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_OOB, (struct sockaddr*)&cliaddr, &clilen); if (connfd < 0){ @@ -183,17 +199,23 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } +/******/printf("STEP 1\n"); + + /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); +/******/printf("STEP 2\n"); if (CyaSSL_accept(ssl) != SSL_SUCCESS) { int err = CyaSSL_get_error(ssl, 0); char buffer[80]; printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + buffer[80]= 0; err_sys("SSL_accept failed\n"); } +/*******/printf("STEP 3\n"); if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ @@ -203,13 +225,17 @@ int main(int argc, char** argv) printf("I heard this: \"%s\"\n", buff); } +/*******/printf("STEP 4\n"); + if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); if(readErr != SSL_ERROR_WANT_READ) err_sys("SSL_read failed"); } - if (CyaSSL_write(ssl, ack, sizeof(ack)-1) < 0) { +/******/printf("STEP 5\n"); + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { err_sys("CyaSSL_write fail"); } @@ -221,12 +247,11 @@ int main(int argc, char** argv) CyaSSL_set_fd(ssl, 0); CyaSSL_shutdown(ssl); - // CyaSSL_free(ssl); - // + CyaSSL_free(ssl); printf("Client left return to idle state\n"); continue; } - // CyaSSL_CTX_free(ctx); + CyaSSL_CTX_free(ctx); return(0); } From 6c00d95e2766404509fb18a6f6256866b1d63a19 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 14:37:41 -0600 Subject: [PATCH 028/103] changed MSG_OOB to MSG_PEEK --- project1/server-dtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/server-dtls.c b/project1/server-dtls.c index 612ef5c3..dc39fec2 100644 --- a/project1/server-dtls.c +++ b/project1/server-dtls.c @@ -174,7 +174,7 @@ int main(int argc, char** argv) int connfd = 0; - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_OOB, + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); if (connfd < 0){ From 0abd32a97ca50b8318556ee711b927801eca479a Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 15:05:31 -0600 Subject: [PATCH 029/103] organizing --- project1/README.md | 0 project1/{ => dtls_secured}/Makefile | 10 +- project1/{ => dtls_secured}/server-dtls.c | 12 +- project1/dtls_secured_nonblocking/Makefile | 21 ++ .../server-dtls-nonblocking.c | 257 ++++++++++++++++++ project1/tags | 7 - project1/unsecure/Makefile | 20 ++ project1/{ => unsecure}/server-udp.c | 0 8 files changed, 308 insertions(+), 19 deletions(-) delete mode 100644 project1/README.md rename project1/{ => dtls_secured}/Makefile (50%) rename project1/{ => dtls_secured}/server-dtls.c (94%) create mode 100644 project1/dtls_secured_nonblocking/Makefile create mode 100644 project1/dtls_secured_nonblocking/server-dtls-nonblocking.c delete mode 100644 project1/tags create mode 100644 project1/unsecure/Makefile rename project1/{ => unsecure}/server-udp.c (100%) diff --git a/project1/README.md b/project1/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/Makefile b/project1/dtls_secured/Makefile similarity index 50% rename from project1/Makefile rename to project1/dtls_secured/Makefile index 1b56bea7..e154e022 100644 --- a/project1/Makefile +++ b/project1/dtls_secured/Makefile @@ -9,15 +9,13 @@ OBJ = echoserver.o #LIBS=-lsocket %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) -all: server-udp server-dtls +all: server -server-udp: server-udp.c - $(CC) -Wall -o server-udp server-udp.c -I ../include -lcyassl +server: server-dtls.c + $(CC) -Wall -DCYASSL_DTLS -o server server-dtls.c -I ../include -lcyassl -server-dtls: server-dtls.c - $(CC) -Wall -DCYASSL_DTLS -o server-dtls server-dtls.c -I ../include -lcyassl .PHONY: clean clean: - -rm -f *.o server-udp server-dtls + -rm -f *.o server diff --git a/project1/server-dtls.c b/project1/dtls_secured/server-dtls.c similarity index 94% rename from project1/server-dtls.c rename to project1/dtls_secured/server-dtls.c index dc39fec2..b62a404d 100644 --- a/project1/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -92,25 +92,25 @@ int main(int argc, char** argv) } printf("CTX set to DTLS 1.2\n"); - if (CyaSSL_CTX_load_verify_locations(ctx,"certs/ca-cert.pem",0) != + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != SSL_SUCCESS) { - fprintf(stderr, "Error loading certs/ca-cert.pem, " + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } printf("Loaded CA certs\n"); - if (CyaSSL_CTX_use_certificate_file(ctx,"certs/server-cert.pem", + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading certs/server-cert.pem, " + fprintf(stderr, "Error loading ../certs/server-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } printf("Loaded server certs\n"); - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"certs/server-key.pem", + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading certs/server-key.pem, " + fprintf(stderr, "Error loading ../certs/server-key.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } diff --git a/project1/dtls_secured_nonblocking/Makefile b/project1/dtls_secured_nonblocking/Makefile new file mode 100644 index 00000000..dc114222 --- /dev/null +++ b/project1/dtls_secured_nonblocking/Makefile @@ -0,0 +1,21 @@ +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include -DCYASSL_DTLS +OBJ = echoserver.o + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) +all: server + +server: server-dtls-nonblocking.c + $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-nonblocking.c -I ../include -lcyassl + + +.PHONY: clean + +clean: + -rm -f *.o server diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c new file mode 100644 index 00000000..b62a404d --- /dev/null +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -0,0 +1,257 @@ +/* server-dtls.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2. + */ + +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include +#include + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 + +static int cleanup; /* To handle shutdown */ + + +void sig_handler(const int sig) +{ + printf("\nSIGINT handled.\n"); + cleanup = 1; + exit(0); +} + + +static void err_sys(const char* msg) +{ + printf("error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ + + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + + CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + CYASSL_CTX* ctx; + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + + + /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ + int ret; + + ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); + if(ret == SSL_SUCCESS) + printf("ret successfully set to \"DES-CBC3-SHA\"\n"); + /* END: avoid valgrind error */ + + + + + while (cleanup != 1) { + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + continue; + } + + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + else err_sys("recvfrom failed"); + + + printf("Connected!\n"); + + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + +/******/printf("STEP 1\n"); + + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + +/******/printf("STEP 2\n"); + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + buffer[80]= 0; + err_sys("SSL_accept failed\n"); + } + +/*******/printf("STEP 3\n"); + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + +/*******/printf("STEP 4\n"); + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + +/******/printf("STEP 5\n"); + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + continue; + } + CyaSSL_CTX_free(ctx); + return(0); +} diff --git a/project1/tags b/project1/tags deleted file mode 100644 index 70c8a768..00000000 --- a/project1/tags +++ /dev/null @@ -1,7 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.9~svn20110310 // -main server-udp.c /^main(void)$/;" f diff --git a/project1/unsecure/Makefile b/project1/unsecure/Makefile new file mode 100644 index 00000000..83a78f98 --- /dev/null +++ b/project1/unsecure/Makefile @@ -0,0 +1,20 @@ +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include -DCYASSL_DTLS +OBJ = echoserver.o + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) +all: server + +server: server-udp.c + $(CC) -Wall -o server server-udp.c -I ../include -lcyassl + +.PHONY: clean + +clean: + -rm -f *.o server diff --git a/project1/server-udp.c b/project1/unsecure/server-udp.c similarity index 100% rename from project1/server-udp.c rename to project1/unsecure/server-udp.c From 85bcc6a8ff556c0f215d795052b5e06b6058dc33 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 15:06:39 -0600 Subject: [PATCH 030/103] cleanup --- Makefile | 14 ----------- README.md | 4 --- server-udp.c | 70 ---------------------------------------------------- 3 files changed, 88 deletions(-) delete mode 100644 Makefile delete mode 100644 README.md delete mode 100644 server-udp.c diff --git a/Makefile b/Makefile deleted file mode 100644 index cd005e38..00000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -all: server-udp - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket - -server-udp: server-udp.c - $(CC) -o server-udp server-udp.c $(LIBS) - -.PHONY: clean - -clean: - -rm -f *.o server-udp diff --git a/README.md b/README.md deleted file mode 100644 index a36a0955..00000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -wolfSSL_Interns -=============== - -Internship summer 2014 diff --git a/server-udp.c b/server-udp.c deleted file mode 100644 index 74aeac56..00000000 --- a/server-udp.c +++ /dev/null @@ -1,70 +0,0 @@ -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include - - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ - -int -main(int argc, char** argv) -{ -/* CREATE THE SOCKET */ - - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int sockfd; /* Initialize our socket */ - socklen_t addrlen = sizeof(cliaddr);/* length of address' */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ - -/* create a UDP/IP socket */ - - if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) - { - perror("cannot create socket"); - return 0; - } - -/* printf("created socket descriptor = %d\n", sockfd); */ - -/* INADDR_ANY = IP address and socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); - - - servaddr.sin_family = AF_INET; - /* host-to-network-long conversion (htonl) */ - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - /* host-to-network-short conversion (htons) */ - servaddr.sin_port = htons(SERV_PORT); - - - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - perror("bind failed"); - return 0; - } - -/* loop, listen for client, print received, reply to client */ - for(;;) { - printf("waiting for client message on port %d\n", SERV_PORT); - recvlen = recvfrom(sockfd, buf, MSGLEN, 0, (struct sockaddr *)&cliaddr, &addrlen); - printf("heard %d bytes\n", recvlen); - if (recvlen > 0) { - buf[recvlen] = 0; - printf("I heard this: \"%s\"\n", buf); - } - else - printf("lost the connection to client\n"); - sprintf(buf, "Message #%d received\n", msgnum++); - printf("reply sent \"%s\"\n", buf); - if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) - perror("sendto"); - /* continues to loop, use "Ctrl+C" to terminate listening */ - - } -} From 60bfe2a43cc6439aeb06ff119581da322ae62310 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 22 May 2014 15:37:09 -0600 Subject: [PATCH 031/103] removed debugging print-lines --- project1/dtls_secured/server-dtls.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index b62a404d..5d4efe11 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -199,13 +199,10 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } -/******/printf("STEP 1\n"); - /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); -/******/printf("STEP 2\n"); if (CyaSSL_accept(ssl) != SSL_SUCCESS) { int err = CyaSSL_get_error(ssl, 0); @@ -215,7 +212,6 @@ int main(int argc, char** argv) err_sys("SSL_accept failed\n"); } -/*******/printf("STEP 3\n"); if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ @@ -225,7 +221,6 @@ int main(int argc, char** argv) printf("I heard this: \"%s\"\n", buff); } -/*******/printf("STEP 4\n"); if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); @@ -233,7 +228,6 @@ int main(int argc, char** argv) err_sys("SSL_read failed"); } -/******/printf("STEP 5\n"); if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { err_sys("CyaSSL_write fail"); From bb742ce3d8b65c8cb00534a72bc59dcfa8332764 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Fri, 23 May 2014 16:59:46 -0600 Subject: [PATCH 032/103] nonblocking socket wants data to be read --- .../server-dtls-nonblocking.c | 243 ++++++++++++------ 1 file changed, 161 insertions(+), 82 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index b62a404d..1c8d58b9 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -35,13 +35,18 @@ #include #include #include +#include /* for "icotl" to set non-blocking */ +#include /* for fd_set */ +#include +#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 +#define FALSE 0 +#define TRUE 1 static int cleanup; /* To handle shutdown */ - void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); @@ -63,14 +68,20 @@ int main(int argc, char** argv) /* CREATE THE SOCKET */ char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ + struct sockaddr_in servaddr; /* Our server's address */ + struct sockaddr_in cliaddr; /* The client's address */ + int listenfd, maxfd, newfd; /* Initialize our socket */ + int closeconn; /* Close the connection */ + int descrdy, endserv = FALSE; + socklen_t clilen; /* Length of address' */ + char buff[MSGLEN]; /* The incoming message */ + struct timeval timeout; + fd_set masterset, workingset; struct sigaction act, oact; /* structures for signal handling */ - + int i; /* for the "for" loops */ + CYASSL* ssl; + clilen = sizeof(cliaddr); + unsigned char b[1500]; /* * Define a signal handler for when the user closes the program @@ -82,7 +93,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - CyaSSL_Debugging_ON(); + // CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; @@ -129,61 +140,98 @@ int main(int argc, char** argv) - while (cleanup != 1) { - + do{ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); return 0; } printf("Socket allocated\n"); - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + + + + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + + + if (res < 0) { + close(listenfd); + err_sys("setsockopt SO_REUSEADDR failed"); + } + + + /* set res non blocking */ + fcntl(listenfd, F_SETFL, O_NONBLOCK); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ + + memset((char *)&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); - } - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + if ((bind(listenfd, (struct sockaddr *)&servaddr, + sizeof(servaddr))) < 0) { + close(listenfd); err_sys("bind failed"); - return 0; } - printf("Socket bind complete\n"); printf("Awaiting client connection on port %d\n", SERV_PORT); - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; + + /* Initialize the master set */ + FD_ZERO(&masterset); + maxfd = listenfd; + FD_SET(listenfd, &masterset); - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); + /* set timeval struct to 5 min, end if inactive for 5 min */ + timeout.tv_sec = 5 * 60; + timeout.tv_usec = 0; - if (connfd < 0){ - printf("No clients in que, enter idle state\n"); - continue; + + + + + memcpy(&workingset, &masterset, sizeof(masterset)); + + printf("Wating to select()\n"); + + if ((res = select(maxfd + 1, + &workingset, NULL, NULL, &timeout)) < 0 ) { + printf("select() failed"); } - else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, + + descrdy = res; + + + if (res == 0) { + printf("select() timed out.\n"); + } + + /* Some file descriptor is readable, find it */ + + res = (int)recvfrom(listenfd, + (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (res < 0) + printf("No clients in que, enter idle state\n"); + + + else if (res > 0) { + if (connect(listenfd, + (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) err_sys("udp connect failed"); } @@ -192,65 +240,96 @@ int main(int argc, char** argv) printf("Connected!\n"); - /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { fprintf(stderr, "CyaSSL_new error.\n"); exit(EXIT_FAILURE); } -/******/printf("STEP 1\n"); + + /* Make the port a non-blocking port */ + CyaSSL_set_using_nonblock(ssl, 1); + printf("\"ssl object\" set to non-blocking\n"); - /* set the session ssl to client connection port */ + /* set session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); -/******/printf("STEP 2\n"); + printf("Connected!\n"); - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[80]= 0; - err_sys("SSL_accept failed\n"); - } + for (i = 0; i <= maxfd && descrdy > 0; i++){ + if (FD_ISSET(i, &workingset)){ + descrdy -= 1; + if (i == listenfd){ + printf("listenfd is readable\n"); + do{ -/*******/printf("STEP 3\n"); - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - -/*******/printf("STEP 4\n"); - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - -/******/printf("STEP 5\n"); - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + buffer[80]= 0; + err_sys("SSL_accept failed\n"); - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); + } + newfd = CyaSSL_accept(ssl); + printf("New different connection incoming\n"); + printf("on port %d\n", newfd); + FD_SET(newfd, &masterset); + if (newfd > maxfd) + maxfd = newfd; + /* Continue to accept incoming connections */ + } while (newfd != -1); + } + else{ + printf("Descriptor %d is readable\n", i); + closeconn = FALSE; + do{ + len = CyaSSL_read(ssl, buff, sizeof(buff)-1); + if (len > 0) { + printf("heard %d bytes\n", len); - printf("Client left return to idle state\n"); - continue; + buff[len] = 0; + printf("I heard this: \"%s\"\n", buff); + } + else if (len < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if (readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + closeconn = TRUE; + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + closeconn = TRUE; + } + printf("reply sent \"%s\"\n", ack); + }while (TRUE); + if(closeconn){ + printf("Lost connection to client\n"); + close(i); + FD_CLR(i, &masterset); + if(i == maxfd){ + while(FD_ISSET(maxfd, &masterset) == FALSE) + maxfd -= 1; + } + } + } /*End of readable connection */ + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + printf("Client left return to idle state\n"); + + } /* End of if (FD_ISSET(i, &workingset)) */ + } /* End of loop through descriptors */ + }while (endserv == FALSE); + /* Close all open sockets */ + for(i = 0; i <= maxfd; i++){ + if(FD_ISSET(i, &masterset)) + close(i); } CyaSSL_CTX_free(ctx); return(0); From 2ff9c1fb98df8d90ad39f0ece70fb8b9a491d83b Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 10:20:50 -0600 Subject: [PATCH 033/103] working, needs tested --- .../server-dtls-nonblocking.c | 284 +++++++----------- 1 file changed, 114 insertions(+), 170 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 1c8d58b9..7f4b2b14 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -1,4 +1,4 @@ -/* server-dtls.c +/* server-dtls-nonblocking.c * * Copyright (C) 2006-2014 wolfSSL Inc. * @@ -21,7 +21,7 @@ *============================================================================= * * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2. + * Utilizes DTLS 1.2 and non-blocking sockets */ #include /* standard in/out procedures */ @@ -35,18 +35,17 @@ #include #include #include -#include /* for "icotl" to set non-blocking */ -#include /* for fd_set */ -#include #include +#include +#include +#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -#define FALSE 0 -#define TRUE 1 static int cleanup; /* To handle shutdown */ + void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); @@ -55,33 +54,19 @@ void sig_handler(const int sig) } -static void err_sys(const char* msg) -{ - printf("error: %s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - - int main(int argc, char** argv) { /* CREATE THE SOCKET */ char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* Our server's address */ - struct sockaddr_in cliaddr; /* The client's address */ - int listenfd, maxfd, newfd; /* Initialize our socket */ - int closeconn; /* Close the connection */ - int descrdy, endserv = FALSE; - socklen_t clilen; /* Length of address' */ - char buff[MSGLEN]; /* The incoming message */ - struct timeval timeout; - fd_set masterset, workingset; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ struct sigaction act, oact; /* structures for signal handling */ - int i; /* for the "for" loops */ - CYASSL* ssl; - clilen = sizeof(cliaddr); - unsigned char b[1500]; + /* * Define a signal handler for when the user closes the program @@ -93,7 +78,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - // CyaSSL_Debugging_ON(); + CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; @@ -140,98 +125,61 @@ int main(int argc, char** argv) - do{ + while (cleanup != 1) { + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); return 0; } printf("Socket allocated\n"); - - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); - - - - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - - - if (res < 0) { - close(listenfd); - err_sys("setsockopt SO_REUSEADDR failed"); - } - - - /* set res non blocking */ - fcntl(listenfd, F_SETFL, O_NONBLOCK); - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - - memset((char *)&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - /*Bind Socket*/ - if ((bind(listenfd, (struct sockaddr *)&servaddr, - sizeof(servaddr))) < 0) { - close(listenfd); - err_sys("bind failed"); + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); } + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + printf("Awaiting client connection on port %d\n", SERV_PORT); - - /* Initialize the master set */ - FD_ZERO(&masterset); - maxfd = listenfd; - FD_SET(listenfd, &masterset); + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; - /* set timeval struct to 5 min, end if inactive for 5 min */ - timeout.tv_sec = 5 * 60; - timeout.tv_usec = 0; - - - - - - memcpy(&workingset, &masterset, sizeof(masterset)); - - printf("Wating to select()\n"); - - if ((res = select(maxfd + 1, - &workingset, NULL, NULL, &timeout)) < 0 ) { - printf("select() failed"); - } - - - descrdy = res; - - - if (res == 0) { - printf("select() timed out.\n"); - } - - /* Some file descriptor is readable, find it */ - - res = (int)recvfrom(listenfd, - (char *)&b, sizeof(b), MSG_PEEK, + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (res < 0) + if (connfd < 0){ printf("No clients in que, enter idle state\n"); + continue; + } - - else if (res > 0) { - if (connect(listenfd, - (const struct sockaddr *)&cliaddr, + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) err_sys("udp connect failed"); } @@ -240,6 +188,7 @@ int main(int argc, char** argv) printf("Connected!\n"); + /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { fprintf(stderr, "CyaSSL_new error.\n"); @@ -247,89 +196,84 @@ int main(int argc, char** argv) } - /* Make the port a non-blocking port */ - CyaSSL_set_using_nonblock(ssl, 1); - printf("\"ssl object\" set to non-blocking\n"); - - - /* set session ssl to client connection port */ + /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); - printf("Connected!\n"); - - for (i = 0; i <= maxfd && descrdy > 0; i++){ - if (FD_ISSET(i, &workingset)){ - descrdy -= 1; - if (i == listenfd){ - printf("listenfd is readable\n"); - do{ - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[80]= 0; - err_sys("SSL_accept failed\n"); + /* set listen port to nonblocking, accept nonblocking */ + /* handle peer error */ + CyaSSL_set_using_nonblock(ssl, 1); + fcntl(listenfd, F_SETFL, O_NONBLOCK); - } - newfd = CyaSSL_accept(ssl); - printf("New different connection incoming\n"); - printf("on port %d\n", newfd); - FD_SET(newfd, &masterset); - if (newfd > maxfd) - maxfd = newfd; - /* Continue to accept incoming connections */ - } while (newfd != -1); - } - else{ - printf("Descriptor %d is readable\n", i); - closeconn = FALSE; - do{ - len = CyaSSL_read(ssl, buff, sizeof(buff)-1); - if (len > 0) { - printf("heard %d bytes\n", len); + ret = CyaSSL_accept(ssl); + int error = CyaSSL_get_error(ssl, 0); + socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); + int select_ret; - buff[len] = 0; - printf("I heard this: \"%s\"\n", buff); - } - else if (len < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - closeconn = TRUE; - } + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... server would read block\n"); + else + printf("... server would write block\n"); + + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); + select_ret = tcp_select(sockfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + ret = CyaSSL_accept(ssl); + error = CyaSSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) + err_sys("SSL_accept failed"); - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - closeconn = TRUE; - } - printf("reply sent \"%s\"\n", ack); - }while (TRUE); - if(closeconn){ - printf("Lost connection to client\n"); - close(i); - FD_CLR(i, &masterset); - if(i == maxfd){ - while(FD_ISSET(maxfd, &masterset) == FALSE) - maxfd -= 1; - } - } - } /*End of readable connection */ + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - printf("Client left return to idle state\n"); + printf("heard %d bytes\n", recvlen); - } /* End of if (FD_ISSET(i, &workingset)) */ - } /* End of loop through descriptors */ - }while (endserv == FALSE); - /* Close all open sockets */ - for(i = 0; i <= maxfd; i++){ - if(FD_ISSET(i, &masterset)) - close(i); + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + continue; } CyaSSL_CTX_free(ctx); return(0); From b12948d82112bdd6f77169cdde6878d6f2ef3c67 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 11:07:48 -0600 Subject: [PATCH 034/103] added select and it breaks out of loop --- .../server-dtls-nonblocking.c | 59 +++++++++++++++++-- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 7f4b2b14..e8830ad4 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -38,13 +38,13 @@ #include #include #include -#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 static int cleanup; /* To handle shutdown */ +static int dtls_select(socklen_t sockfd, int to_sec); void sig_handler(const int sig) { @@ -53,6 +53,48 @@ void sig_handler(const int sig) exit(0); } +static void err_sys(const char* msg) +{ + printf("yassl error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + +enum { + TEST_SELECT_FAIL, + TEST_TIMEOUT, + TEST_RECV_READY, + TEST_ERROR_READY +}; + +static int dtls_select(socklen_t sockfd, int to_sec) +{ + fd_set masterset, workingset; + socklen_t nfds = sockfd + 1; + struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; + int result; + + FD_ZERO(&masterset); + FD_SET(sockfd, &masterset); + FD_ZERO(&workingset); + FD_SET(sockfd, &workingset); + + + result = select(nfds, &masterset, NULL, &workingset, &timeout); + + if (result == 0) + return TEST_TIMEOUT; + else if (result > 0) { + if (FD_ISSET(sockfd, &masterset)) + return TEST_RECV_READY; + else if(FD_ISSET(sockfd, &workingset)) + return TEST_ERROR_READY; + } + + return TEST_SELECT_FAIL; +} + + int main(int argc, char** argv) { @@ -61,7 +103,7 @@ int main(int argc, char** argv) char ack[] = "I hear you fashizzle!"; struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ - int listenfd = 0; /* Initialize our socket */ + int listenfd; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen = 0; /* length of message */ char buff[MSGLEN]; /* the incoming message */ @@ -78,7 +120,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - CyaSSL_Debugging_ON(); +// CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; @@ -153,6 +195,9 @@ int main(int argc, char** argv) err_sys("setsockopt SO_REUSEADDR failed\n"); } + /* set listenfd non-blocking */ + fcntl(listenfd, F_SETFL, O_NONBLOCK); + /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { @@ -161,7 +206,7 @@ int main(int argc, char** argv) } printf("Socket bind complete\n"); - + printf("Awaiting client connection on port %d\n", SERV_PORT); CYASSL* ssl; /* initialize arg */ @@ -202,7 +247,6 @@ int main(int argc, char** argv) /* set listen port to nonblocking, accept nonblocking */ /* handle peer error */ CyaSSL_set_using_nonblock(ssl, 1); - fcntl(listenfd, F_SETFL, O_NONBLOCK); ret = CyaSSL_accept(ssl); @@ -220,7 +264,10 @@ int main(int argc, char** argv) printf("... server would write block\n"); currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - select_ret = tcp_select(sockfd, currTimeout); + + printf("waiting to select()\n"); + + select_ret = dtls_select(sockfd, currTimeout); if ((select_ret == TEST_RECV_READY) || (select_ret == TEST_ERROR_READY)) { From 698637f0c652be73296eb9d771a9fc4dfb1ea191 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 11:21:34 -0600 Subject: [PATCH 035/103] removed "continue;" that caused unwanted looping if no client in queue --- .../dtls_secured_nonblocking/server-dtls-nonblocking.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index e8830ad4..11722376 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -220,7 +220,6 @@ int main(int argc, char** argv) if (connfd < 0){ printf("No clients in que, enter idle state\n"); - continue; } else if (connfd > 0) { @@ -231,7 +230,6 @@ int main(int argc, char** argv) else err_sys("recvfrom failed"); - printf("Connected!\n"); /* Create the CYASSL Object */ @@ -256,15 +254,14 @@ int main(int argc, char** argv) while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; + + int currTimeout = 5 * 60; if (error == SSL_ERROR_WANT_READ) printf("... server would read block\n"); else printf("... server would write block\n"); - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - printf("waiting to select()\n"); select_ret = dtls_select(sockfd, currTimeout); @@ -288,6 +285,8 @@ int main(int argc, char** argv) if (ret != SSL_SUCCESS) err_sys("SSL_accept failed"); + + printf("Connected!\n"); if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ From 36a710754e67f2730fc9f8594243ecff3b4cdee5 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 11:32:44 -0600 Subject: [PATCH 036/103] put dtls timeout back in --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 11722376..096e4403 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -255,7 +255,9 @@ int main(int argc, char** argv) while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 5 * 60; + int currTimeout = 1; + + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); if (error == SSL_ERROR_WANT_READ) printf("... server would read block\n"); From 4905a34cf769cff3c37a06c809533a34001f3c74 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 11:38:20 -0600 Subject: [PATCH 037/103] looping properly on failed accept --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 096e4403..e2177c71 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -284,8 +284,10 @@ int main(int argc, char** argv) error = SSL_FATAL_ERROR; } } - if (ret != SSL_SUCCESS) - err_sys("SSL_accept failed"); + if (ret != SSL_SUCCESS){ + printf("SSL_accept failed"); + continue; + } printf("Connected!\n"); From c1742eef589c2f6e8ec5afb1727532f579a276ea Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 11:40:43 -0600 Subject: [PATCH 038/103] ready for testing --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index e2177c71..53402573 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -285,7 +285,7 @@ int main(int argc, char** argv) } } if (ret != SSL_SUCCESS){ - printf("SSL_accept failed"); + printf("SSL_accept failed\n"); continue; } From 28bdf837790c086383bc4a3f63d9548da89d6e2f Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Sun, 25 May 2014 15:32:12 -0600 Subject: [PATCH 039/103] working, needs tested --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 53402573..81ca0b8d 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -257,6 +257,7 @@ int main(int argc, char** argv) int currTimeout = 1; + /* NOTE: changes over time */ currTimeout = CyaSSL_dtls_get_current_timeout(ssl); if (error == SSL_ERROR_WANT_READ) From 1c09471f8e3900485c40e9c46634e0e72c2da6dd Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 27 May 2014 13:59:30 -0600 Subject: [PATCH 040/103] use this code to attempt to reproduce error --- project1/bug_tracking/Makefile | 21 +++ project1/bug_tracking/server | Bin 0 -> 12668 bytes project1/bug_tracking/server.c | 251 +++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 project1/bug_tracking/Makefile create mode 100755 project1/bug_tracking/server create mode 100644 project1/bug_tracking/server.c diff --git a/project1/bug_tracking/Makefile b/project1/bug_tracking/Makefile new file mode 100644 index 00000000..92262242 --- /dev/null +++ b/project1/bug_tracking/Makefile @@ -0,0 +1,21 @@ +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include -DCYASSL_DTLS +OBJ = echoserver.o + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) +all: server + +server: server.c + $(CC) -Wall -DCYASSL_DTLS -o server server.c -I ../include -lcyassl + + +.PHONY: clean + +clean: + -rm -f *.o server diff --git a/project1/bug_tracking/server b/project1/bug_tracking/server new file mode 100755 index 0000000000000000000000000000000000000000..8b55a0b0f853ef76e2baa92048e1eaee388286a4 GIT binary patch literal 12668 zcmeHNe{fXCeczJ~at0v;!Bk*sKa-QAB;pW6VA;lwgd{+=46-CJ9lL&7T5$_ubEazx(~}&$n;ie*d_kX-yyy5IPiyLP1p09}HE2p1xIas)QkK z5ar@#ag&&iEb^*$K?c!40mf;_3nCUGwgI>84u%*%4$Md%vSkDj0%aMG|DF(xEH6r2 z{w+v<6MV!YDD(^>?UG*rQUrbxc#LDfjO5b>qYZf*wi)Yz88xr@9Vfnjz7YEl2Sbdj zz+=?>2fzosDo{Vnix%=d_0x@FdA4t9GSR*?8DEl2q;lPnY&x=B>1J8-*RJ1)U)2uk zEJbA5d5G*g^3VQY!{H07-#zkhxb8s9JvBXBW-on}yfQ?#pXK(m*Wam`$-GY@eg<)M z!@pd7?k5L#R=?N3=-7Qf8G8K-n-~4vz%Pq0{O}jWU{4COsK^a-L0LZ?3?zQe%DRF4 zs1KjiOi=Py`1l|C_@zF3|L&82$%mixl`r>|5BcPO=#zil$FK144WwW2@oRnf4!=Dg zKI_rP_6K}?$H!0j@Z&yv@B8p+AAZ1x@ABv~klyRTtj|fG{8C^2HhAO>q|f{0-}UgR zZ@!OzAM_nLjx~x!GJzUfQBkixS?%cSxP#1|oVdcV>) zSIiWYpnxeX*`$J<)77$wjq7n2l}sn{g{+ZB1kyE7Nv=T{4}r+M?}AOPJ=? z&UDJmI?;?{n!>zyyV>H()g__A%Btd17Ov}wwzf8zDQkytlUpsvv@)4=MrUNKXk3_y zRKn3Yb#0r?WI7r*w_BM+M-S4msFO&ivR(m?%8ra>kyYQ;)Vh6{x!lZJ85A`;EyqsB zb)hT_cjVEIOu~_cSiNX0W_3+6pUYZib0)Dp>R9(#J!VG&9pN^h(N|M#ortiI=0Pn zgw>7CvYm7)DSxvfmQJOtm?OG!4n~7x729UU>}_U8G?5ftQ0jDuY+|d`+2!=0BSfdw zNz$H3L8;|XZyG(2v0~dhGU-kMn;0a~p}GkrqcM&EbaUpolc6)3K#moUI#Dp%vssmo zENETZ)VR9NTpp>)rz$!7Fi~Y>nyErhj^-73@+iZ625)`<&;J5M{Z}BqjybNMyYmu> zS=<3)D9XGNi3>!htLh5&y6IqW%}v7tzX{8A4Q&&cs?HEfS)d6g62zie*F>QVK0dy8$eA|s5qh!rbm*aBP!+~k1W{_dEQDX? zjF%N5WivVYCW?)hu{Ukt7Te_TrOYfx0C}@Y8#F`i{Ub8!9jtFKz65r}tv%*I+yRzUbx?o>@IH(K1a&EZq(!leW>R20he-#Qu z?&DH_Xk;gvbY>d!0_T2(nmrxDLj(42(G{7WuLwD)$Y>9W431{;n`bqnbF9$-~Ue+6g4TjO3$_CM{-v z4e49O+4``2w*#$YB|)2KVZa7JdxwI3!SKi-HfB%wRk9HV_Jn^7g33rCw;g=Wj(iuA zBV}mJ$Wi>TY>2czT-CcXTqSbLp5~AN7r{&jk2jhNq8{v`Bzs~V;V?&becbuDpg0Kx&cQFnHABaCtG z5Eta@BDcDsALEq)tTDyP*Wpf8^BUB= zM)b^qfjA9(3E88oP*&zYwhWp=ZYx~nc@5pN70yBw-Or+bkFLJJF8B)3H-V7;E2i&( zQnX#Jh!>UJdg!nBuR5MaU{J5R6D<46WvPdQGcsT4sX!B1i~2r{Kmlr@(&sTFmi=r4?s+6==qGl8Qal5 zXlw$zsX#uEOYogzq~5I-A6lpuAG+RZ)j%O;TQLk66u%MTa-5bE{TXXDQ3yiK%>IW< za-vP@#V27NHJ9CfmnZ!KRG?g(AJg&TqW)yKa^P=+*w9AadLNbU<%`d!&Yb$F zVDBa8lWO0Et?IrCE(i4(!+?$-dX9pJ*!mL4W_!V9y<@;u# zv^b2{)n2|};_-ubhypRAwQ+6Z`ZmLkrs7E}9ue}?c&Aa8ouLm-JYL}(Xh=>3*=?H* zoMsFsZSX8;EW`JrNMtEbU)iOx=n^I(T~?=P-~rU&8574XV=9pfqbq4evz8IFt=Klh zu`Pp#Kp1I4DJyQ&)f!UogaLKxoG^lRT*Hn}^0(Sj^4GAp&FcA0ZE|h7QopMyh~rcl zO{LO~5yJ`Hu?+X@*(#5qMl>l;&{2D7DMV{1cgeSM3;qo)<0Aes{d9=P5E*L&c44_xno>pk%Q*8^|jo_h$98u7}IkNhr=PvP=D3ZKH| zJrq7!%R6a&s+RY)_;f9T_=v`L44!}9|7bjY4EN1^cR02O-|9gx0^=1>?7$|DPweu$ zK0b}hz%zru0f_s12=@3MgU{*$AH~G;j|W3c9|PrSm+u3-LuWPYY;afb|7v?+=qA=@ma(Zh-VOAL;NY?CB*4ZpgiJj zh$|7-AZ|kJK-`YF5AiVKvxp}U&mg{r_*2A7h|}G1V13rs)!k{7Z*0${oSab=sg5jP zvh0qWgv&mqGK7d^dpezHJE)UU)Yd879a)(!5y4Twiqx)dT;fExx@c=E7irHWa6zAl ziwKd8FN-1)?@2+QqE1F}a3PoF4U!adfeBv5N>W}Wx{{8F$g9AJV|61fugM~rw7g@A zShm@biFR719Y;xxR0%Vh$wYfp37!6Y3}R3o?M%dAI1PpPiAXC-BQC8(1SgSByk_gc z`yD9fE$0j8oAk{9;GEKdJcdso;@g9ilRgw+7{EHnvp&EwL@l=;^PKP8VJ!rz$>7BIJeuxQ>vNGF%6n5V>}wKCH82D9rVx17#T= zLF5`Ci|Zqd%5Fwl+hsoEHbkx|rn#sBj?WY=cK~VDm3DaVeHw+?_c~CH;c-MQHwL*e$Qi7x8(0U*9z@h~^xr8# zXD-gKZdF$nIpUGy{dyH9fj&c#ukC)#m7}S3kXr}2yV>z>&~ncL(=O$tPYu2=t#V~Z zwA{Cm)^exu4d^uFE>0o$J>=oqQI4_n0m2=i)fk#;!;Ip@9lPFLW5OIHd!tq;ko0-s0BRNiOGcS~Vqna>x6 zl?6UW6jlcKyii!JM()1~b41npR~U;Cf$LmhN#s7OFk7MaUxm4QPxz%2$|n@&h3ltM zC|5Mv@9tfNf^Q2Gek+A?Cad+s{6aZn)jCm_JqP_*4+?Ws5ZryaP)E|srXoA44i)mh4SqJ^DvJ~nVt9JDTJSnHx!D6lg2G5emTx(n6@8) zeU@l;+h2h8M}T*Ea4oQY$0GkhV0l9c8bIj|P~E-&cBBDdzL$Yu-pvwEG2yl+fc`j1 z>;~576w>^V%$Y!a=RjBB`j6jiSl&DDDE~6@k3FgM2e1m>0QR;AFdry?0Z7-6o=8`K zb$ zUIzTEzUYyszCQ=%^MLa7v-%D&uRqIK9{NxDYgihBL9Zty$| zXn(#Bf7*xF`0#^1-0j0p`0x=Q{uZ$A57z$$AOD{{*g*aM!-HAhp93Fq$7fDKsrb;x zpNU6|*H3Ms=b^^(w*%8HAc{2mcdd{Apby7OTm~{a20e zZ1EH@#~bD`ehb830PDc|9S5er0>4SJ{C9l(fAZnCefWJJo<_rNFhCc0FzuE3@a@35 ze(c{mAAhq4Q(wk|sc$c^*AKAY$A8L)MGQA3POhUP5`#zAy>%^SQ)6ozy#6M915KyX zjL|zVi!ap5UC@(dn(?%`HJNUYCe65$&ScGKu3P9&{qe}k6?arZ^AtkTBTl`z!+*@l z^a%B;AJ27m_MnIdNoT=HqUw?Zm5$-kCY9^rU6Gl^6^3c9X{o)x!E9JxPv1q^B%S6t zBd-N6i1mN4zV`mcI!Jjq((O^0YnwK#u5B_mtXb3A&}O#Pu5M~DJvSdUHQL>ct&=Wt zv20E``Tb_!%I@lw5xPWn#Z1S}rM5-dy9JLXt}C5#-Setfo_UjU5?f7mNtXAiytdz= z^44=*8QuFceF@S?&&ElfiOT&?U!Qo5`kf3XcvZ?LaU!Eq>!-P?{W_JO;S@zCJTtH1 z+=;p5=`FZFdX@NGSLrr6nH|rj-LCW2QF?UxJTI?ue4MN(KjiZ8%KI%Z-|cRxS9xAe z!JTl7mHw03m$IYFw0B@qO}JOO+UNi)JuqE-l^3bU-_vVO`i*)s-12$f)u}vuT^Z@C vt1be)8cY)&!|oc(`-)BypntJ`TukyVcCWrB3CljzwVLF$tLL@fHTQo3PD38} literal 0 HcmV?d00001 diff --git a/project1/bug_tracking/server.c b/project1/bug_tracking/server.c new file mode 100644 index 00000000..1d5a533d --- /dev/null +++ b/project1/bug_tracking/server.c @@ -0,0 +1,251 @@ +/* server-dtls.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2. + */ + +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include +#include + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 + +static int cleanup; /* To handle shutdown */ + + +void sig_handler(const int sig) +{ + printf("\nSIGINT handled.\n"); + cleanup = 1; + exit(0); +} + + +static void err_sys(const char* msg) +{ + printf("error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ + + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + +// CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + CYASSL_CTX* ctx; + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + + + /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES + int ret; + + ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); + if(ret == SSL_SUCCESS) + printf("ret successfully set to \"DES-CBC3-SHA\"\n"); + END: avoid valgrind error */ + + + + + while (cleanup != 1) { + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + continue; + } + + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + else err_sys("recvfrom failed"); + + + printf("Connected!\n"); + + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + buffer[80]= 0; + err_sys("SSL_accept failed\n"); + } + + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + continue; + } + CyaSSL_CTX_free(ctx); + return(0); +} From ff587c4f6e62b0b872046a85a23434c592d7ab66 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 27 May 2014 14:08:16 -0600 Subject: [PATCH 041/103] see "bug_tracking" for source --- project1/bug_tracking/Makefile | 4 ++-- project1/bug_tracking/server | Bin 12668 -> 0 bytes .../bug_tracking/{server.c => server-dtls.c} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100755 project1/bug_tracking/server rename project1/bug_tracking/{server.c => server-dtls.c} (99%) diff --git a/project1/bug_tracking/Makefile b/project1/bug_tracking/Makefile index 92262242..e154e022 100644 --- a/project1/bug_tracking/Makefile +++ b/project1/bug_tracking/Makefile @@ -11,8 +11,8 @@ OBJ = echoserver.o $(CC) -c -o $@ $< $(CFLAGS) all: server -server: server.c - $(CC) -Wall -DCYASSL_DTLS -o server server.c -I ../include -lcyassl +server: server-dtls.c + $(CC) -Wall -DCYASSL_DTLS -o server server-dtls.c -I ../include -lcyassl .PHONY: clean diff --git a/project1/bug_tracking/server b/project1/bug_tracking/server deleted file mode 100755 index 8b55a0b0f853ef76e2baa92048e1eaee388286a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12668 zcmeHNe{fXCeczJ~at0v;!Bk*sKa-QAB;pW6VA;lwgd{+=46-CJ9lL&7T5$_ubEazx(~}&$n;ie*d_kX-yyy5IPiyLP1p09}HE2p1xIas)QkK z5ar@#ag&&iEb^*$K?c!40mf;_3nCUGwgI>84u%*%4$Md%vSkDj0%aMG|DF(xEH6r2 z{w+v<6MV!YDD(^>?UG*rQUrbxc#LDfjO5b>qYZf*wi)Yz88xr@9Vfnjz7YEl2Sbdj zz+=?>2fzosDo{Vnix%=d_0x@FdA4t9GSR*?8DEl2q;lPnY&x=B>1J8-*RJ1)U)2uk zEJbA5d5G*g^3VQY!{H07-#zkhxb8s9JvBXBW-on}yfQ?#pXK(m*Wam`$-GY@eg<)M z!@pd7?k5L#R=?N3=-7Qf8G8K-n-~4vz%Pq0{O}jWU{4COsK^a-L0LZ?3?zQe%DRF4 zs1KjiOi=Py`1l|C_@zF3|L&82$%mixl`r>|5BcPO=#zil$FK144WwW2@oRnf4!=Dg zKI_rP_6K}?$H!0j@Z&yv@B8p+AAZ1x@ABv~klyRTtj|fG{8C^2HhAO>q|f{0-}UgR zZ@!OzAM_nLjx~x!GJzUfQBkixS?%cSxP#1|oVdcV>) zSIiWYpnxeX*`$J<)77$wjq7n2l}sn{g{+ZB1kyE7Nv=T{4}r+M?}AOPJ=? z&UDJmI?;?{n!>zyyV>H()g__A%Btd17Ov}wwzf8zDQkytlUpsvv@)4=MrUNKXk3_y zRKn3Yb#0r?WI7r*w_BM+M-S4msFO&ivR(m?%8ra>kyYQ;)Vh6{x!lZJ85A`;EyqsB zb)hT_cjVEIOu~_cSiNX0W_3+6pUYZib0)Dp>R9(#J!VG&9pN^h(N|M#ortiI=0Pn zgw>7CvYm7)DSxvfmQJOtm?OG!4n~7x729UU>}_U8G?5ftQ0jDuY+|d`+2!=0BSfdw zNz$H3L8;|XZyG(2v0~dhGU-kMn;0a~p}GkrqcM&EbaUpolc6)3K#moUI#Dp%vssmo zENETZ)VR9NTpp>)rz$!7Fi~Y>nyErhj^-73@+iZ625)`<&;J5M{Z}BqjybNMyYmu> zS=<3)D9XGNi3>!htLh5&y6IqW%}v7tzX{8A4Q&&cs?HEfS)d6g62zie*F>QVK0dy8$eA|s5qh!rbm*aBP!+~k1W{_dEQDX? zjF%N5WivVYCW?)hu{Ukt7Te_TrOYfx0C}@Y8#F`i{Ub8!9jtFKz65r}tv%*I+yRzUbx?o>@IH(K1a&EZq(!leW>R20he-#Qu z?&DH_Xk;gvbY>d!0_T2(nmrxDLj(42(G{7WuLwD)$Y>9W431{;n`bqnbF9$-~Ue+6g4TjO3$_CM{-v z4e49O+4``2w*#$YB|)2KVZa7JdxwI3!SKi-HfB%wRk9HV_Jn^7g33rCw;g=Wj(iuA zBV}mJ$Wi>TY>2czT-CcXTqSbLp5~AN7r{&jk2jhNq8{v`Bzs~V;V?&becbuDpg0Kx&cQFnHABaCtG z5Eta@BDcDsALEq)tTDyP*Wpf8^BUB= zM)b^qfjA9(3E88oP*&zYwhWp=ZYx~nc@5pN70yBw-Or+bkFLJJF8B)3H-V7;E2i&( zQnX#Jh!>UJdg!nBuR5MaU{J5R6D<46WvPdQGcsT4sX!B1i~2r{Kmlr@(&sTFmi=r4?s+6==qGl8Qal5 zXlw$zsX#uEOYogzq~5I-A6lpuAG+RZ)j%O;TQLk66u%MTa-5bE{TXXDQ3yiK%>IW< za-vP@#V27NHJ9CfmnZ!KRG?g(AJg&TqW)yKa^P=+*w9AadLNbU<%`d!&Yb$F zVDBa8lWO0Et?IrCE(i4(!+?$-dX9pJ*!mL4W_!V9y<@;u# zv^b2{)n2|};_-ubhypRAwQ+6Z`ZmLkrs7E}9ue}?c&Aa8ouLm-JYL}(Xh=>3*=?H* zoMsFsZSX8;EW`JrNMtEbU)iOx=n^I(T~?=P-~rU&8574XV=9pfqbq4evz8IFt=Klh zu`Pp#Kp1I4DJyQ&)f!UogaLKxoG^lRT*Hn}^0(Sj^4GAp&FcA0ZE|h7QopMyh~rcl zO{LO~5yJ`Hu?+X@*(#5qMl>l;&{2D7DMV{1cgeSM3;qo)<0Aes{d9=P5E*L&c44_xno>pk%Q*8^|jo_h$98u7}IkNhr=PvP=D3ZKH| zJrq7!%R6a&s+RY)_;f9T_=v`L44!}9|7bjY4EN1^cR02O-|9gx0^=1>?7$|DPweu$ zK0b}hz%zru0f_s12=@3MgU{*$AH~G;j|W3c9|PrSm+u3-LuWPYY;afb|7v?+=qA=@ma(Zh-VOAL;NY?CB*4ZpgiJj zh$|7-AZ|kJK-`YF5AiVKvxp}U&mg{r_*2A7h|}G1V13rs)!k{7Z*0${oSab=sg5jP zvh0qWgv&mqGK7d^dpezHJE)UU)Yd879a)(!5y4Twiqx)dT;fExx@c=E7irHWa6zAl ziwKd8FN-1)?@2+QqE1F}a3PoF4U!adfeBv5N>W}Wx{{8F$g9AJV|61fugM~rw7g@A zShm@biFR719Y;xxR0%Vh$wYfp37!6Y3}R3o?M%dAI1PpPiAXC-BQC8(1SgSByk_gc z`yD9fE$0j8oAk{9;GEKdJcdso;@g9ilRgw+7{EHnvp&EwL@l=;^PKP8VJ!rz$>7BIJeuxQ>vNGF%6n5V>}wKCH82D9rVx17#T= zLF5`Ci|Zqd%5Fwl+hsoEHbkx|rn#sBj?WY=cK~VDm3DaVeHw+?_c~CH;c-MQHwL*e$Qi7x8(0U*9z@h~^xr8# zXD-gKZdF$nIpUGy{dyH9fj&c#ukC)#m7}S3kXr}2yV>z>&~ncL(=O$tPYu2=t#V~Z zwA{Cm)^exu4d^uFE>0o$J>=oqQI4_n0m2=i)fk#;!;Ip@9lPFLW5OIHd!tq;ko0-s0BRNiOGcS~Vqna>x6 zl?6UW6jlcKyii!JM()1~b41npR~U;Cf$LmhN#s7OFk7MaUxm4QPxz%2$|n@&h3ltM zC|5Mv@9tfNf^Q2Gek+A?Cad+s{6aZn)jCm_JqP_*4+?Ws5ZryaP)E|srXoA44i)mh4SqJ^DvJ~nVt9JDTJSnHx!D6lg2G5emTx(n6@8) zeU@l;+h2h8M}T*Ea4oQY$0GkhV0l9c8bIj|P~E-&cBBDdzL$Yu-pvwEG2yl+fc`j1 z>;~576w>^V%$Y!a=RjBB`j6jiSl&DDDE~6@k3FgM2e1m>0QR;AFdry?0Z7-6o=8`K zb$ zUIzTEzUYyszCQ=%^MLa7v-%D&uRqIK9{NxDYgihBL9Zty$| zXn(#Bf7*xF`0#^1-0j0p`0x=Q{uZ$A57z$$AOD{{*g*aM!-HAhp93Fq$7fDKsrb;x zpNU6|*H3Ms=b^^(w*%8HAc{2mcdd{Apby7OTm~{a20e zZ1EH@#~bD`ehb830PDc|9S5er0>4SJ{C9l(fAZnCefWJJo<_rNFhCc0FzuE3@a@35 ze(c{mAAhq4Q(wk|sc$c^*AKAY$A8L)MGQA3POhUP5`#zAy>%^SQ)6ozy#6M915KyX zjL|zVi!ap5UC@(dn(?%`HJNUYCe65$&ScGKu3P9&{qe}k6?arZ^AtkTBTl`z!+*@l z^a%B;AJ27m_MnIdNoT=HqUw?Zm5$-kCY9^rU6Gl^6^3c9X{o)x!E9JxPv1q^B%S6t zBd-N6i1mN4zV`mcI!Jjq((O^0YnwK#u5B_mtXb3A&}O#Pu5M~DJvSdUHQL>ct&=Wt zv20E``Tb_!%I@lw5xPWn#Z1S}rM5-dy9JLXt}C5#-Setfo_UjU5?f7mNtXAiytdz= z^44=*8QuFceF@S?&&ElfiOT&?U!Qo5`kf3XcvZ?LaU!Eq>!-P?{W_JO;S@zCJTtH1 z+=;p5=`FZFdX@NGSLrr6nH|rj-LCW2QF?UxJTI?ue4MN(KjiZ8%KI%Z-|cRxS9xAe z!JTl7mHw03m$IYFw0B@qO}JOO+UNi)JuqE-l^3bU-_vVO`i*)s-12$f)u}vuT^Z@C vt1be)8cY)&!|oc(`-)BypntJ`TukyVcCWrB3CljzwVLF$tLL@fHTQo3PD38} diff --git a/project1/bug_tracking/server.c b/project1/bug_tracking/server-dtls.c similarity index 99% rename from project1/bug_tracking/server.c rename to project1/bug_tracking/server-dtls.c index 1d5a533d..2da5c920 100644 --- a/project1/bug_tracking/server.c +++ b/project1/bug_tracking/server-dtls.c @@ -248,4 +248,4 @@ int main(int argc, char** argv) } CyaSSL_CTX_free(ctx); return(0); -} +} From 91d80b6658d1fad1e0a26b133f41555d69d6f98f Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 27 May 2014 17:30:16 -0600 Subject: [PATCH 042/103] multi-threaded, nonblocking dtls server --- .../Makefile | 21 + .../server-dtls-nonblocking-threaded.c | 428 ++++++++++++++++++ 2 files changed, 449 insertions(+) create mode 100644 project1/dtls_secured_nonblocking_multithreaded/Makefile create mode 100644 project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c diff --git a/project1/dtls_secured_nonblocking_multithreaded/Makefile b/project1/dtls_secured_nonblocking_multithreaded/Makefile new file mode 100644 index 00000000..3fdc8071 --- /dev/null +++ b/project1/dtls_secured_nonblocking_multithreaded/Makefile @@ -0,0 +1,21 @@ +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include -DCYASSL_DTLS +OBJ = echoserver.o + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) +all: server + +server: server-dtls-nonblocking-threaded.c + $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-nonblocking-threaded.c -lcyassl -lpthread + + +.PHONY: clean + +clean: + -rm -f *.o server diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c new file mode 100644 index 00000000..1ebd6636 --- /dev/null +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -0,0 +1,428 @@ +/* server-dtls-nonblocking.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2 and non-blocking sockets + */ + +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 + +CYASSL_CTX* ctx; + +static int cleanup; /* To handle shutdown */ + +static int dtls_select(socklen_t sockfd, int to_sec); + +void *ThreadControl(void* openSock); + + + + +void sig_handler(const int sig) +{ + printf("\nSIGINT handled.\n"); + cleanup = 1; + exit(0); +} + +static void err_sys(const char* msg) +{ + printf("yassl error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + +enum { + TEST_SELECT_FAIL, + TEST_TIMEOUT, + TEST_RECV_READY, + TEST_ERROR_READY +}; + +static int dtls_select(socklen_t sockfd, int to_sec) +{ + fd_set masterset, workingset; + socklen_t maxfd = sockfd + 1; + struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; + int result; + + FD_ZERO(&masterset); + FD_SET(sockfd, &masterset); + FD_ZERO(&workingset); + FD_SET(sockfd, &workingset); + + /* Uncomment to make the timout a static 3 minutes */ + + /* + timeout.tv_sec = 0; + timeout.tv_usec = 0; + */ + + result = select(maxfd, &masterset, NULL, &workingset, &timeout); + + if (result == 0) + return TEST_TIMEOUT; + else if (result > 0) { + if (FD_ISSET(sockfd, &masterset)) + return TEST_RECV_READY; + else if(FD_ISSET(sockfd, &workingset)) + return TEST_ERROR_READY; + } + + return TEST_SELECT_FAIL; +} + +void *ThreadControl(void* openSock) +{ + char ack[] = "I hear you fashizzle!\n"; + int connfd = *(int*)openSock; + CYASSL* ssl; + printf("Connected with a client!\n"); + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, connfd); + + + /* set listen port to nonblocking, accept nonblocking */ + /* handle peer error */ + CyaSSL_set_using_nonblock(ssl, 1); + for (;;) { + char buff[MSGLEN]; + int recvlen = 0; + + bzero(&buff, sizeof(buff)); + + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("Lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + + printf("Client left return to idle state\n"); + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + close(connfd); + break; + } +} + + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + struct sigaction act, oact; /* structures for signal handling */ + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + + // CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + + + /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ + int ret; + + ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); + if(ret == SSL_SUCCESS) + printf("ret successfully set to \"DES-CBC3-SHA\"\n"); + /* END: avoid valgrind error */ + + + + + while (cleanup != 1) { + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + /* set listenfd non-blocking */ + fcntl(res, F_SETFL, O_NONBLOCK); + + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + } + + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + else err_sys("recvfrom failed"); + + + + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + + + /* set listen port to nonblocking, accept nonblocking */ + /* handle peer error */ + CyaSSL_set_using_nonblock(ssl, 1); + + + ret = CyaSSL_accept(ssl); + int error = CyaSSL_get_error(ssl, 0); + socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); + int select_ret; + + printf("ret = %d\n", ret); + + + pthread_t threadID; + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + + int currTimeout = 1; + + /* NOTE: changes over time */ + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); + + if (error == SSL_ERROR_WANT_READ) + printf("Server wants to read...\n"); + else + printf("Server wants to write...\n"); + + printf("waiting to select()\n"); + + /* select for dtls server */ + select_ret = dtls_select(sockfd, currTimeout); + + /* initialize new thread ID each time we loop */ + + + if (select_ret == TEST_RECV_READY) { + printf("TEST_RECV_READY!\n"); + while (( ret = CyaSSL_accept(ssl))){ + if (pthread_create(&threadID, NULL, ThreadControl, (void *) + &ret) < 0) + printf("pthread_create() failed\n"); + + printf("Control handed to ThreadControl()\n"); + } + } + + if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { + printf("TEST_ERROR_READY\n"); + error = CyaSSL_get_error(ssl, 0); + } + + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) ) { + printf("TEST_TIMEOUT\n"); + error = SSL_ERROR_WANT_READ; + } + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS){ + printf("SSL_accept failed\n"); + continue; + } + + + printf("Connected with a client!\n"); + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + continue; + } + CyaSSL_CTX_free(ctx); + return(0); +} From ee836df7b667e508454d1e53c8fa07d3025fb333 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 13:24:54 -0600 Subject: [PATCH 043/103] broke accept method out of main, placed in separate method called Accept() that returns an int --- .../server-dtls-nonblocking.c | 192 ++++++++++-------- 1 file changed, 103 insertions(+), 89 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 81ca0b8d..3f17b4cb 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -42,10 +42,14 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 +CYASSL_CTX* ctx; + static int cleanup; /* To handle shutdown */ static int dtls_select(socklen_t sockfd, int to_sec); +int Accept(); + void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); @@ -57,7 +61,7 @@ static void err_sys(const char* msg) { printf("yassl error: %s\n", msg); if (msg) - exit(EXIT_FAILURE); + exit(0); } enum { @@ -70,7 +74,7 @@ enum { static int dtls_select(socklen_t sockfd, int to_sec) { fd_set masterset, workingset; - socklen_t nfds = sockfd + 1; + socklen_t maxfd = sockfd + 1; struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; int result; @@ -79,8 +83,14 @@ static int dtls_select(socklen_t sockfd, int to_sec) FD_ZERO(&workingset); FD_SET(sockfd, &workingset); + /* Uncomment to make the timout a static 3 minutes */ - result = select(nfds, &masterset, NULL, &workingset, &timeout); + /* + timeout.tv_sec = 0; + timeout.tv_usec = 0; + */ + + result = select(maxfd, &masterset, NULL, &workingset, &timeout); if (result == 0) return TEST_TIMEOUT; @@ -94,80 +104,17 @@ static int dtls_select(socklen_t sockfd, int to_sec) return TEST_SELECT_FAIL; } - - -int main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ - - - /* - * Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - -// CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ - CYASSL_CTX* ctx; - - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } - printf("CTX set to DTLS 1.2\n"); - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded CA certs\n"); - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server certs\n"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server keys\n"); - - - - /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ - int ret; - - ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); - if(ret == SSL_SUCCESS) - printf("ret successfully set to \"DES-CBC3-SHA\"\n"); - /* END: avoid valgrind error */ - - - +int Accept(){ while (cleanup != 1) { + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); @@ -195,8 +142,6 @@ int main(int argc, char** argv) err_sys("setsockopt SO_REUSEADDR failed\n"); } - /* set listenfd non-blocking */ - fcntl(listenfd, F_SETFL, O_NONBLOCK); /*Bind Socket*/ @@ -206,9 +151,12 @@ int main(int argc, char** argv) } printf("Socket bind complete\n"); - + printf("Awaiting client connection on port %d\n", SERV_PORT); + /* set listenfd non-blocking */ + fcntl(res, F_SETFL, O_NONBLOCK); + CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; @@ -242,16 +190,20 @@ int main(int argc, char** argv) /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); + /* set listen port to nonblocking, accept nonblocking */ /* handle peer error */ CyaSSL_set_using_nonblock(ssl, 1); - ret = CyaSSL_accept(ssl); + int ret; int error = CyaSSL_get_error(ssl, 0); socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); int select_ret; + ret = CyaSSL_accept(ssl); + printf("ret = %d\n", ret); + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { @@ -261,20 +213,27 @@ int main(int argc, char** argv) currTimeout = CyaSSL_dtls_get_current_timeout(ssl); if (error == SSL_ERROR_WANT_READ) - printf("... server would read block\n"); + printf("Server wants to read...\n"); else - printf("... server would write block\n"); + printf("Server wants to write...\n"); printf("waiting to select()\n"); select_ret = dtls_select(sockfd, currTimeout); - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { + if (select_ret == TEST_RECV_READY) { + printf("TEST_RECV_READY!\n"); ret = CyaSSL_accept(ssl); + } + + if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { + printf("TEST_ERROR_READY\n"); error = CyaSSL_get_error(ssl, 0); } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) ) { + printf("TEST_TIMEOUT\n"); error = SSL_ERROR_WANT_READ; } else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && @@ -290,8 +249,8 @@ int main(int argc, char** argv) continue; } - - printf("Connected!\n"); + + printf("Connected with a client!\n"); if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ @@ -318,14 +277,69 @@ int main(int argc, char** argv) printf("reply sent \"%s\"\n", ack); - CyaSSL_set_fd(ssl, 0); CyaSSL_shutdown(ssl); CyaSSL_free(ssl); printf("Client left return to idle state\n"); - continue; + } - CyaSSL_CTX_free(ctx); + return 1; +} + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + struct sigaction act, oact; /* structures for signal handling */ + + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + + // CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + + int cont = Accept(); + if(cont == 0) + CyaSSL_CTX_free(ctx); return(0); } From 63773d818b8d3f0e68a040c13a0ced28a6fa0880 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 14:43:04 -0600 Subject: [PATCH 044/103] multi-threaded, nonblocking server working --- .../server-dtls-nonblocking-threaded.c | 521 +++++++++++------- 1 file changed, 335 insertions(+), 186 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index 1ebd6636..3e165db7 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -43,16 +43,15 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -CYASSL_CTX* ctx; - -static int cleanup; /* To handle shutdown */ +CYASSL_CTX* ctx; /* ctx pointer */ +static int cleanup; /* To handle shutdown */ +struct sockaddr_in servaddr; /* our server's address */ +struct sockaddr_in cliaddr; /* the client's address */ +int listenfd; /* Initialize our socket */ static int dtls_select(socklen_t sockfd, int to_sec); - -void *ThreadControl(void* openSock); - - - +int Accept(); +void* ThreadControl(void*); void sig_handler(const int sig) { @@ -65,7 +64,7 @@ static void err_sys(const char* msg) { printf("yassl error: %s\n", msg); if (msg) - exit(EXIT_FAILURE); + exit(0); } enum { @@ -108,140 +107,11 @@ static int dtls_select(socklen_t sockfd, int to_sec) return TEST_SELECT_FAIL; } -void *ThreadControl(void* openSock) -{ - char ack[] = "I hear you fashizzle!\n"; - int connfd = *(int*)openSock; - CYASSL* ssl; - printf("Connected with a client!\n"); - - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); - } - - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, connfd); - - - /* set listen port to nonblocking, accept nonblocking */ - /* handle peer error */ - CyaSSL_set_using_nonblock(ssl, 1); - for (;;) { - char buff[MSGLEN]; - int recvlen = 0; - - bzero(&buff, sizeof(buff)); - - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("Lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); - - - printf("Client left return to idle state\n"); - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - close(connfd); - break; - } -} - - -int main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ - - /* - * Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - - // CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ - - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } - printf("CTX set to DTLS 1.2\n"); - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded CA certs\n"); - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server certs\n"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server keys\n"); - - - - /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ - int ret; - - ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); - if(ret == SSL_SUCCESS) - printf("ret successfully set to \"DES-CBC3-SHA\"\n"); - /* END: avoid valgrind error */ - - - +int Accept(){ while (cleanup != 1) { + socklen_t clilen; /* length of address' */ + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); @@ -293,46 +163,43 @@ int main(int argc, char** argv) connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); + /* No clients attempting to connect */ if (connfd < 0){ printf("No clients in que, enter idle state\n"); } + /* Client attempted to connect but was not using udp */ else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) err_sys("udp connect failed"); } + + /* client attempted to connect, recvfrom failed */ else err_sys("recvfrom failed"); - - - /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { fprintf(stderr, "CyaSSL_new error.\n"); exit(EXIT_FAILURE); } - /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); /* set listen port to nonblocking, accept nonblocking */ - /* handle peer error */ CyaSSL_set_using_nonblock(ssl, 1); - ret = CyaSSL_accept(ssl); + int ret; int error = CyaSSL_get_error(ssl, 0); socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); int select_ret; + ret = CyaSSL_accept(ssl); printf("ret = %d\n", ret); - - pthread_t threadID; - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { @@ -348,21 +215,11 @@ int main(int argc, char** argv) printf("waiting to select()\n"); - /* select for dtls server */ select_ret = dtls_select(sockfd, currTimeout); - /* initialize new thread ID each time we loop */ - - if (select_ret == TEST_RECV_READY) { printf("TEST_RECV_READY!\n"); - while (( ret = CyaSSL_accept(ssl))){ - if (pthread_create(&threadID, NULL, ThreadControl, (void *) - &ret) < 0) - printf("pthread_create() failed\n"); - - printf("Control handed to ThreadControl()\n"); - } + ret = CyaSSL_accept(ssl); } if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { @@ -388,41 +245,333 @@ int main(int argc, char** argv) continue; } + pthread_t threadID; - printf("Connected with a client!\n"); - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); + if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) { + printf("pthread_create failed.\n"); } + printf("Connection being re-routed to Thread Control.\n"); - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } + /* + printf("Connected with a client!\n"); + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } - else - printf("lost the connection to client\n"); - printf("reply sent \"%s\"\n", ack); + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); + else + printf("lost the connection to client\n"); - printf("Client left return to idle state\n"); - continue; + printf("reply sent \"%s\"\n", ack); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + */ } - CyaSSL_CTX_free(ctx); + return 1; +} + +void* ThreadControl(void* openSock) +{ + char ack[] = "I hear you fashizzle!"; + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + int listenfd; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + /* set listenfd non-blocking */ + fcntl(res, F_SETFL, O_NONBLOCK); + + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + /* No clients attempting to connect */ + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + } + + /* Client attempted to connect but was not using udp */ + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + + /* client attempted to connect, recvfrom failed */ + else err_sys("recvfrom failed"); + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + + + /* set listen port to nonblocking, accept nonblocking */ + CyaSSL_set_using_nonblock(ssl, 1); + + + int ret; + int error = CyaSSL_get_error(ssl, 0); + socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); + int select_ret; + + ret = CyaSSL_accept(ssl); + printf("ret = %d\n", ret); + + while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE)) { + + int currTimeout = 1; + + /* NOTE: changes over time */ + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); + + if (error == SSL_ERROR_WANT_READ) + printf("Server wants to read...\n"); + else + printf("Server wants to write...\n"); + + printf("waiting to select()\n"); + + select_ret = dtls_select(sockfd, currTimeout); + + if (select_ret == TEST_RECV_READY) { + printf("TEST_RECV_READY!\n"); + ret = CyaSSL_accept(ssl); + } + + if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { + printf("TEST_ERROR_READY\n"); + error = CyaSSL_get_error(ssl, 0); + } + + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) ) { + printf("TEST_TIMEOUT\n"); + error = SSL_ERROR_WANT_READ; + } + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS){ + printf("SSL_accept failed\n"); + } + + pthread_t threadID; + + if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) { + printf("pthread_create failed.\n"); + } + printf("Connection being re-routed to Thread Control.\n"); + + + printf("Connected with a client!\n"); + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + + /* + int connfd = *(int*) openSock; + CYASSL* ssl; + printf("Connection now being handled by Thread Control\n\n"); + + if ((ssl = CyaSSL_new(ctx)) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + CyaSSL_set_fd(ssl, connfd); + CyaSSL_set_using_nonblock(ssl, 1); + + for(;;){ + char buff[MSGLEN]; + int ret = 0; + + bzero(&buff, sizeof(buff)); + + if ((ret = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + printf("Client connected in Thread Control\n"); + char ack[] = "I hear you fashizzle!"; + CyaSSL_write(ssl, ack, sizeof(ack)-1); + } + else { + if (ret < 0) { + printf("CyaSSL_read error returned: %d.\n", + CyaSSL_get_error(ssl, ret)); + continue; + } + else if (ret == 0) + printf("Connection Lost, return to Idle state.\n"); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + break; + } + } + */ + +} + + + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + struct sigaction act, oact; /* structures for signal handling */ + + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + + // CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + + int cont = Accept(); + + if(cont == 0) + CyaSSL_CTX_free(ctx); return(0); } From cd80add3eab42f1e75c739ee10255e9f35990c88 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 15:08:01 -0600 Subject: [PATCH 045/103] code cleaned --- .../server-dtls-nonblocking-threaded.c | 126 +----------------- 1 file changed, 3 insertions(+), 123 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index 3e165db7..f2b14200 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -86,13 +86,6 @@ static int dtls_select(socklen_t sockfd, int to_sec) FD_ZERO(&workingset); FD_SET(sockfd, &workingset); - /* Uncomment to make the timout a static 3 minutes */ - - /* - timeout.tv_sec = 0; - timeout.tv_usec = 0; - */ - result = select(maxfd, &masterset, NULL, &workingset, &timeout); if (result == 0) @@ -112,7 +105,6 @@ int Accept(){ while (cleanup != 1) { socklen_t clilen; /* length of address' */ - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); return 0; @@ -128,8 +120,6 @@ int Accept(){ servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ int res = 1; int on = 1; @@ -139,16 +129,12 @@ int Accept(){ err_sys("setsockopt SO_REUSEADDR failed\n"); } - - /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { err_sys("bind failed"); return 0; } printf("Socket bind complete\n"); - - printf("Awaiting client connection on port %d\n", SERV_PORT); /* set listenfd non-blocking */ @@ -159,7 +145,6 @@ int Accept(){ unsigned char b[1500]; int connfd = 0; - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); @@ -251,42 +236,6 @@ int Accept(){ printf("pthread_create failed.\n"); } printf("Connection being re-routed to Thread Control.\n"); - - - /* - printf("Connected with a client!\n"); - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); - */ } return 1; } @@ -296,17 +245,15 @@ void* ThreadControl(void* openSock) char ack[] = "I hear you fashizzle!"; struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ + int listenfd; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen = 0; /* length of message */ char buff[MSGLEN]; /* the incoming message */ - + listenfd = *(int*)openSock; if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { err_sys("cannot create socket"); - return 0; } - printf("Socket allocated\n"); /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ memset((char *)&servaddr, 0, sizeof(servaddr)); @@ -317,8 +264,6 @@ void* ThreadControl(void* openSock) servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ int res = 1; int on = 1; @@ -328,17 +273,10 @@ void* ThreadControl(void* openSock) err_sys("setsockopt SO_REUSEADDR failed\n"); } - - /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { err_sys("bind failed"); - return 0; } - printf("Socket bind complete\n"); - - - printf("Awaiting client connection on port %d\n", SERV_PORT); /* set listenfd non-blocking */ fcntl(res, F_SETFL, O_NONBLOCK); @@ -348,17 +286,11 @@ void* ThreadControl(void* openSock) unsigned char b[1500]; int connfd = 0; - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - /* No clients attempting to connect */ - if (connfd < 0){ - printf("No clients in que, enter idle state\n"); - } - /* Client attempted to connect but was not using udp */ - else if (connfd > 0) { + if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) err_sys("udp connect failed"); @@ -376,18 +308,15 @@ void* ThreadControl(void* openSock) /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); - /* set listen port to nonblocking, accept nonblocking */ CyaSSL_set_using_nonblock(ssl, 1); - int ret; int error = CyaSSL_get_error(ssl, 0); socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); int select_ret; ret = CyaSSL_accept(ssl); - printf("ret = %d\n", ret); while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { @@ -438,8 +367,6 @@ void* ThreadControl(void* openSock) if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) { printf("pthread_create failed.\n"); } - printf("Connection being re-routed to Thread Control.\n"); - printf("Connected with a client!\n"); @@ -451,14 +378,12 @@ void* ThreadControl(void* openSock) printf("I heard this: \"%s\"\n", buff); } - if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); if(readErr != SSL_ERROR_WANT_READ) err_sys("SSL_read failed"); } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { err_sys("CyaSSL_write fail"); } @@ -473,58 +398,14 @@ void* ThreadControl(void* openSock) CyaSSL_free(ssl); printf("Client left return to idle state\n"); - - /* - int connfd = *(int*) openSock; - CYASSL* ssl; - printf("Connection now being handled by Thread Control\n\n"); - - if ((ssl = CyaSSL_new(ctx)) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); - } - CyaSSL_set_fd(ssl, connfd); - CyaSSL_set_using_nonblock(ssl, 1); - - for(;;){ - char buff[MSGLEN]; - int ret = 0; - - bzero(&buff, sizeof(buff)); - - if ((ret = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - printf("Client connected in Thread Control\n"); - char ack[] = "I hear you fashizzle!"; - CyaSSL_write(ssl, ack, sizeof(ack)-1); - } - else { - if (ret < 0) { - printf("CyaSSL_read error returned: %d.\n", - CyaSSL_get_error(ssl, ret)); - continue; - } - else if (ret == 0) - printf("Connection Lost, return to Idle state.\n"); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - break; - } - } - */ - } - - int main(int argc, char** argv) { /* CREATE THE SOCKET */ struct sigaction act, oact; /* structures for signal handling */ - /* * Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't @@ -568,7 +449,6 @@ int main(int argc, char** argv) } printf("Loaded server keys\n"); - int cont = Accept(); if(cont == 0) From ec9f23caaefe407d9d7f55598d27ef73d76040b0 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 15:59:26 -0600 Subject: [PATCH 046/103] tidying up code --- .../server-dtls-nonblocking-threaded.c | 83 +------------------ 1 file changed, 4 insertions(+), 79 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index f2b14200..ef7977c3 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -140,7 +140,6 @@ int Accept(){ /* set listenfd non-blocking */ fcntl(res, F_SETFL, O_NONBLOCK); - CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; int connfd = 0; @@ -155,88 +154,14 @@ int Accept(){ /* Client attempted to connect but was not using udp */ else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); - } + pthread_t threadID; - /* client attempted to connect, recvfrom failed */ - else err_sys("recvfrom failed"); - - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - - /* set listen port to nonblocking, accept nonblocking */ - CyaSSL_set_using_nonblock(ssl, 1); - - - int ret; - int error = CyaSSL_get_error(ssl, 0); - socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); - int select_ret; - - ret = CyaSSL_accept(ssl); - printf("ret = %d\n", ret); - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - - int currTimeout = 1; - - /* NOTE: changes over time */ - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - - if (error == SSL_ERROR_WANT_READ) - printf("Server wants to read...\n"); - else - printf("Server wants to write...\n"); - - printf("waiting to select()\n"); - - select_ret = dtls_select(sockfd, currTimeout); - - if (select_ret == TEST_RECV_READY) { - printf("TEST_RECV_READY!\n"); - ret = CyaSSL_accept(ssl); + if (pthread_create(&threadID, NULL, ThreadControl, (void *)&connfd) < 0) { + printf("pthread_create failed.\n"); } - if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { - printf("TEST_ERROR_READY\n"); - error = CyaSSL_get_error(ssl, 0); - } - - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) ) { - printf("TEST_TIMEOUT\n"); - error = SSL_ERROR_WANT_READ; - } - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } - else { - error = SSL_FATAL_ERROR; - } + printf("Connection being re-routed to Thread Control.\n"); } - if (ret != SSL_SUCCESS){ - printf("SSL_accept failed\n"); - continue; - } - - pthread_t threadID; - - if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) { - printf("pthread_create failed.\n"); - } - printf("Connection being re-routed to Thread Control.\n"); - } return 1; } From f62c74ae8bcb18656ae2c4867248cd78dab28dbf Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 16:07:40 -0600 Subject: [PATCH 047/103] normal dtls multithreaded server --- project1/dtls_secured_multithreaded/Makefile | 21 ++ .../server-dtls-threaded.c | 291 ++++++++++++++++++ 2 files changed, 312 insertions(+) create mode 100644 project1/dtls_secured_multithreaded/Makefile create mode 100644 project1/dtls_secured_multithreaded/server-dtls-threaded.c diff --git a/project1/dtls_secured_multithreaded/Makefile b/project1/dtls_secured_multithreaded/Makefile new file mode 100644 index 00000000..ef377557 --- /dev/null +++ b/project1/dtls_secured_multithreaded/Makefile @@ -0,0 +1,21 @@ +DEPS = ../include/unp.h +CC=gcc +CFLAGS=-Wall -I ../include -DCYASSL_DTLS +OBJ = echoserver.o + +#if you are on a sunOS (System V) machine, you'll need to uncomment +#the next line. + +#LIBS=-lsocket +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) +all: server + +server: server-dtls-threaded.c + $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-threaded.c -lcyassl -lpthread + + +.PHONY: clean + +clean: + -rm -f *.o server diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c new file mode 100644 index 00000000..d6d7b71e --- /dev/null +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -0,0 +1,291 @@ +/* server-dtls-threaded.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2. and multi-threading + */ + +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include +#include +#include + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 + +struct sockaddr_in servaddr; /* our server's address */ +struct sockaddr_in cliaddr; /* the client's address */ +static int cleanup; /* To handle shutdown */ +CYASSL_CTX* ctx; + +int Accept(); +void* ThreadControl(void*); + +void sig_handler(const int sig) +{ + printf("\nSIGINT handled.\n"); + cleanup = 1; + exit(0); +} + +static void err_sys(const char* msg) +{ + printf("error: %s\n", msg); + if (msg) + exit(EXIT_FAILURE); +} + +int Accept() +{ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + + while (cleanup != 1) { + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + printf("Socket allocated\n"); + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + printf("Socket bind complete\n"); + + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + continue; + } + + else if (connfd > 0) { + + pthread_t threadID; + + if (pthread_create(&threadID, NULL, + ThreadControl, (void *)&connfd) < 0) { + printf("pthread_create failed.\n"); + } + printf("Connection being re-routed to Thread Control.\n"); + } + else err_sys("recvfrom failed"); + continue; + } + return 1; +} + +void* ThreadControl(void* openSock) +{ + char ack[] = "I hear you fashizzle!"; + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ + int recvlen = 0; /* length of message */ + char buff[MSGLEN]; /* the incoming message */ + + if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + err_sys("cannot create socket"); + return 0; + } + + /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + memset((char *)&servaddr, 0, sizeof(servaddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + + /* Eliminate socket already in use error */ + int res = 1; + int on = 1; + socklen_t len = sizeof(on); + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + err_sys("setsockopt SO_REUSEADDR failed\n"); + } + + /*Bind Socket*/ + if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + err_sys("bind failed"); + return 0; + } + + CYASSL* ssl; /* initialize arg */ + clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + unsigned char b[1500]; + int connfd = 0; + + connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + + if (connfd < 0){ + printf("No clients in que, enter idle state\n"); + } + + else if (connfd > 0) { + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) + err_sys("udp connect failed"); + } + else err_sys("recvfrom failed"); + + printf("Connected!\n"); + + /* Create the CYASSL Object */ + if (( ssl = CyaSSL_new(ctx) ) == NULL) { + fprintf(stderr, "CyaSSL_new error.\n"); + exit(EXIT_FAILURE); + } + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + int err = CyaSSL_get_error(ssl, 0); + char buffer[80]; + printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + buffer[80]= 0; + err_sys("SSL_accept failed\n"); + } + + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + + printf("heard %d bytes\n", recvlen); + + buff[recvlen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + + if (recvlen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) + err_sys("SSL_read failed"); + } + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + err_sys("CyaSSL_write fail"); + } + + else + printf("lost the connection to client\n"); + + printf("reply sent \"%s\"\n", ack); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + +} + +int main(int argc, char** argv) +{ + struct sigaction act, oact; /* structures for signal handling */ + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + + // CyaSSL_Debugging_ON(); + CyaSSL_Init(); /* Initialize CyaSSL */ + + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + printf("CTX set to DTLS 1.2\n"); + + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded CA certs\n"); + + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server certs\n"); + + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + printf("Loaded server keys\n"); + + int cont = Accept(); + if (cont == 0) + CyaSSL_CTX_free(ctx); + return(0); +} From 8ff903281fea0607c9237ea0b2bcc79d2689f0c6 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 16:26:16 -0600 Subject: [PATCH 048/103] cleaning up code --- .../server-dtls-nonblocking-threaded.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index ef7977c3..544f7d86 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -51,7 +51,7 @@ int listenfd; /* Initialize our socket */ static int dtls_select(socklen_t sockfd, int to_sec); int Accept(); -void* ThreadControl(void*); +void *ThreadControl(void*); void sig_handler(const int sig) { @@ -100,7 +100,8 @@ static int dtls_select(socklen_t sockfd, int to_sec) return TEST_SELECT_FAIL; } -int Accept(){ +int Accept() +{ while (cleanup != 1) { socklen_t clilen; /* length of address' */ @@ -162,10 +163,11 @@ int Accept(){ printf("Connection being re-routed to Thread Control.\n"); } + } return 1; } -void* ThreadControl(void* openSock) +void *ThreadControl(void* openSock) { char ack[] = "I hear you fashizzle!"; struct sockaddr_in servaddr; /* our server's address */ @@ -287,12 +289,6 @@ void* ThreadControl(void* openSock) printf("SSL_accept failed\n"); } - pthread_t threadID; - - if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) { - printf("pthread_create failed.\n"); - } - printf("Connected with a client!\n"); if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ From c56b0cff6db46d64f8df99674509906a5576d285 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 17:43:45 -0600 Subject: [PATCH 049/103] updating --- project1/bug_tracking/Makefile | 21 --- project1/bug_tracking/server-dtls.c | 251 ---------------------------- project1/dtls_secured/server-dtls.c | 2 +- 3 files changed, 1 insertion(+), 273 deletions(-) delete mode 100644 project1/bug_tracking/Makefile delete mode 100644 project1/bug_tracking/server-dtls.c diff --git a/project1/bug_tracking/Makefile b/project1/bug_tracking/Makefile deleted file mode 100644 index e154e022..00000000 --- a/project1/bug_tracking/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-dtls.c - $(CC) -Wall -DCYASSL_DTLS -o server server-dtls.c -I ../include -lcyassl - - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/bug_tracking/server-dtls.c b/project1/bug_tracking/server-dtls.c deleted file mode 100644 index 2da5c920..00000000 --- a/project1/bug_tracking/server-dtls.c +++ /dev/null @@ -1,251 +0,0 @@ -/* server-dtls.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2. - */ - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 - -static int cleanup; /* To handle shutdown */ - - -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - exit(0); -} - - -static void err_sys(const char* msg) -{ - printf("error: %s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - - -int main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ - - - /* - * Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - -// CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ - CYASSL_CTX* ctx; - - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } - printf("CTX set to DTLS 1.2\n"); - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded CA certs\n"); - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server certs\n"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server keys\n"); - - - - /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES - int ret; - - ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); - if(ret == SSL_SUCCESS) - printf("ret successfully set to \"DES-CBC3-SHA\"\n"); - END: avoid valgrind error */ - - - - - while (cleanup != 1) { - - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; - } - printf("Socket allocated\n"); - - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); - - - - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); - } - - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; - } - printf("Socket bind complete\n"); - - - printf("Awaiting client connection on port %d\n", SERV_PORT); - - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - - - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); - - if (connfd < 0){ - printf("No clients in que, enter idle state\n"); - continue; - } - - else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); - } - else err_sys("recvfrom failed"); - - - printf("Connected!\n"); - - - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); - } - - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[80]= 0; - err_sys("SSL_accept failed\n"); - } - - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); - - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); - continue; - } - CyaSSL_CTX_free(ctx); - return(0); -} diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 5d4efe11..b19dce6e 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -82,7 +82,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - CyaSSL_Debugging_ON(); +// CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ CYASSL_CTX* ctx; From 2985af8ccd8fccf73a8c5d1de4b673da00a57cc9 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 28 May 2014 17:47:16 -0600 Subject: [PATCH 050/103] updating --- .../server-dtls-nonblocking-threaded.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index 544f7d86..85878140 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -1,4 +1,4 @@ -/* server-dtls-nonblocking.c +/* server-dtls-nonblocking-threaded.c * * Copyright (C) 2006-2014 wolfSSL Inc. * @@ -21,7 +21,8 @@ *============================================================================= * * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2 and non-blocking sockets + * Utilizes DTLS 1.2 and non-blocking sockets and multi threading to handle + * multiple clients. */ #include /* standard in/out procedures */ From 1aa4daa6ade66903e619ef4ab612a00bdfdeced1 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 29 May 2014 09:30:33 -0600 Subject: [PATCH 051/103] fcntl variable change --- .../server-dtls-nonblocking-threaded.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c index 85878140..dd74a9be 100644 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c @@ -140,7 +140,7 @@ int Accept() printf("Awaiting client connection on port %d\n", SERV_PORT); /* set listenfd non-blocking */ - fcntl(res, F_SETFL, O_NONBLOCK); + fcntl(listenfd, F_SETFL, O_NONBLOCK); clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ unsigned char b[1500]; @@ -207,7 +207,7 @@ void *ThreadControl(void* openSock) } /* set listenfd non-blocking */ - fcntl(res, F_SETFL, O_NONBLOCK); + fcntl(listenfd, F_SETFL, O_NONBLOCK); CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ From 35347bd3897265ebbb8400b60f703510ae2d925e Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 29 May 2014 10:26:30 -0600 Subject: [PATCH 052/103] fixed memory leaks --- project1/dtls_secured/server-dtls.c | 178 ++++++++++++++-------------- 1 file changed, 86 insertions(+), 92 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index b19dce6e..fbce04fb 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -40,100 +40,33 @@ #define MSGLEN 4096 static int cleanup; /* To handle shutdown */ - +void AwaitDGram(); /* Separate out Handling Datagrams */ +struct sockaddr_in servaddr; /* our server's address */ +struct sockaddr_in cliaddr; /* the client's address */ +CYASSL_CTX* ctx; +void sig_handler(const int sig); void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; - exit(0); } -static void err_sys(const char* msg) +void AwaitDGram() { - printf("error: %s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - - -int main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ int listenfd = 0; /* Initialize our socket */ socklen_t clilen; /* length of address' */ int recvlen = 0; /* length of message */ char buff[MSGLEN]; /* the incoming message */ - struct sigaction act, oact; /* structures for signal handling */ - - - /* - * Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - -// CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ - CYASSL_CTX* ctx; - - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } - printf("CTX set to DTLS 1.2\n"); - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded CA certs\n"); - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server certs\n"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server keys\n"); - - - - /* BEGIN: avoid valgrind error when using DTLS v1.2 and AES */ - int ret; - - ret = CyaSSL_CTX_set_cipher_list(ctx, "DES-CBC3-SHA"); - if(ret == SSL_SUCCESS) - printf("ret successfully set to \"DES-CBC3-SHA\"\n"); - /* END: avoid valgrind error */ - - while (cleanup != 1) { if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; + printf("Cannot create socket.\n"); + cleanup = 1; } printf("Socket allocated\n"); @@ -147,24 +80,22 @@ int main(int argc, char** argv) servaddr.sin_port = htons(SERV_PORT); - /* Eliminate socket already in use error */ int res = 1; int on = 1; socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; } /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; + printf("Bind failed.\n"); + cleanup = 1; } - printf("Socket bind complete\n"); - printf("Awaiting client connection on port %d\n", SERV_PORT); @@ -184,10 +115,15 @@ int main(int argc, char** argv) else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); + sizeof(cliaddr)) != 0) { + printf("Udp connect failed.\n"); + cleanup = 1; + } + } + else { + printf("Recvfrom failed.\n"); + cleanup = 1; } - else err_sys("recvfrom failed"); printf("Connected!\n"); @@ -195,8 +131,8 @@ int main(int argc, char** argv) /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); + printf("CyaSSL_new error.\n"); + cleanup = 1; } @@ -209,7 +145,8 @@ int main(int argc, char** argv) char buffer[80]; printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); buffer[80]= 0; - err_sys("SSL_accept failed\n"); + printf("SSL_accept failed.\n"); + cleanup = 1; } @@ -224,13 +161,16 @@ int main(int argc, char** argv) if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); + if(readErr != SSL_ERROR_WANT_READ) { + printf("SSL_read failed.\n"); + cleanup = 1; + } } if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); + printf("CyaSSL_write fail.\n"); + cleanup = 1; } else @@ -246,6 +186,60 @@ int main(int argc, char** argv) printf("Client left return to idle state\n"); continue; } - CyaSSL_CTX_free(ctx); - return(0); +} + + +int main(int argc, char** argv) +{ + /* CREATE THE SOCKET */ + + struct sigaction act, oact; /* structures for signal handling */ + + + /* + * Define a signal handler for when the user closes the program + * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't + * restart the call to accept() after the signal is handled. + */ + act.sa_handler = sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGINT, &act, &oact); + +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) + CyaSSL_Debugging_ON(); +#endif + CyaSSL_Init(); /* Initialize CyaSSL */ + + /* Set ctx to DTLS 1.2 */ + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + fprintf(stderr, "CyaSSL_CTX_new error.\n"); + exit(EXIT_FAILURE); + } + /* Load CA certificates */ + if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/ca-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + /* Load server certificates */ + if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-cert.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + /* Load server Keys */ + if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + fprintf(stderr, "Error loading ../certs/server-key.pem, " + "please check the file.\n"); + exit(EXIT_FAILURE); + } + + AwaitDGram(); + if (cleanup ==1) + CyaSSL_CTX_free(ctx); + return 0; } From 628494a7cd8be77582172905335fe2e6a143a01c Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 29 May 2014 14:33:12 -0600 Subject: [PATCH 053/103] fixed all memory leaks --- .../server-dtls-threaded.c | 97 +++++++++++-------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index d6d7b71e..81c72668 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -45,33 +45,26 @@ struct sockaddr_in cliaddr; /* the client's address */ static int cleanup; /* To handle shutdown */ CYASSL_CTX* ctx; -int Accept(); +void AwaitDGram(); void* ThreadControl(void*); void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); + CyaSSL_Cleanup(); cleanup = 1; - exit(0); } -static void err_sys(const char* msg) -{ - printf("error: %s\n", msg); - if (msg) - exit(EXIT_FAILURE); -} - -int Accept() +void AwaitDGram() { int listenfd = 0; /* Initialize our socket */ socklen_t clilen; /* length of address' */ while (cleanup != 1) { - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; + printf("Cannot create socket.\n"); + cleanup = 1; + break; } printf("Socket allocated\n"); @@ -90,13 +83,16 @@ int Accept() socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; + break; } /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; + printf("Bind failed.\n"); + cleanup = 1; + break; } printf("Socket bind complete\n"); @@ -125,23 +121,31 @@ int Accept() } printf("Connection being re-routed to Thread Control.\n"); } - else err_sys("recvfrom failed"); + else { + printf("Recvfrom failed.\n"); + cleanup = 1; + } + pthread_t threadID = pthread_self(); + pthread_join(threadID, (void*)&connfd); + + sleep(1); continue; } - return 1; } void* ThreadControl(void* openSock) { - char ack[] = "I hear you fashizzle!"; - int listenfd = 0; /* Initialize our socket */ + + pthread_detach(pthread_self()); + char ack[] = "I hear you fashizzle!\n"; + int listenfd = 0; socklen_t clilen; /* length of address' */ int recvlen = 0; /* length of message */ char buff[MSGLEN]; /* the incoming message */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; + printf("Cannot create socket.\n"); + cleanup = 1; } /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ @@ -159,13 +163,14 @@ void* ThreadControl(void* openSock) socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; } /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; + printf("Bind failed.\n"); + cleanup = 1; } CYASSL* ssl; /* initialize arg */ @@ -182,17 +187,22 @@ void* ThreadControl(void* openSock) else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); + sizeof(cliaddr)) != 0) { + printf("Udp connect failed.\n"); + cleanup = 1; + } + } + else { + printf("Recvfrom failed.\n"); + cleanup = 1; } - else err_sys("recvfrom failed"); printf("Connected!\n"); /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); + printf("CyaSSL_new error.\n"); + cleanup = 1; } /* set the session ssl to client connection port */ @@ -203,7 +213,8 @@ void* ThreadControl(void* openSock) char buffer[80]; printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); buffer[80]= 0; - err_sys("SSL_accept failed\n"); + printf("SSL_accept failed.\n"); + cleanup = 1; } if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ @@ -216,25 +227,31 @@ void* ThreadControl(void* openSock) if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); + if(readErr != SSL_ERROR_WANT_READ) { + printf("SSL_read failed.\n"); + cleanup = 1; + } } if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); + printf("CyaSSL_write fail.\n"); + cleanup = 1; } else - printf("lost the connection to client\n"); + printf("Sending Reply...\n"); printf("reply sent \"%s\"\n", ack); + printf("No further packets, severing connection to client.\n"); CyaSSL_set_fd(ssl, 0); CyaSSL_shutdown(ssl); CyaSSL_free(ssl); + - printf("Client left return to idle state\n"); - + printf("Returning to idle state\n"); + int dummy; + pthread_exit((void*)&dummy); } int main(int argc, char** argv) @@ -284,8 +301,10 @@ int main(int argc, char** argv) } printf("Loaded server keys\n"); - int cont = Accept(); - if (cont == 0) + AwaitDGram(); + if (cleanup == 1){ + CyaSSL_Cleanup(); CyaSSL_CTX_free(ctx); + } return(0); } From cde22ac2bb07e04dd64d82cbf9eba33009c2075c Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 29 May 2014 23:18:32 -0600 Subject: [PATCH 054/103] no memory leaks, complied clean, ready for publishing --- project1/dtls_secured/server-dtls.c | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index fbce04fb..15051eb7 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -40,7 +40,7 @@ #define MSGLEN 4096 static int cleanup; /* To handle shutdown */ -void AwaitDGram(); /* Separate out Handling Datagrams */ +void AwaitDGram(); /* Separate out Handling Datagrams */ struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ CYASSL_CTX* ctx; @@ -64,13 +64,14 @@ void AwaitDGram() while (cleanup != 1) { + /* Create a UDP/IP socket */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } printf("Socket allocated\n"); - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + /* clear servaddr each loop */ memset((char *)&servaddr, 0, sizeof(servaddr)); /* host-to-network-long conversion (htonl) */ @@ -92,15 +93,16 @@ void AwaitDGram() /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + if (bind(listenfd, + (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ + /* set clilen to |cliaddr| */ + clilen = sizeof(cliaddr); unsigned char b[1500]; int connfd = 0; @@ -108,7 +110,7 @@ void AwaitDGram() connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (connfd < 0){ + if (connfd < 0) { printf("No clients in que, enter idle state\n"); continue; } @@ -121,13 +123,13 @@ void AwaitDGram() } } else { - printf("Recvfrom failed.\n"); - cleanup = 1; + printf("Recvfrom failed.\n"); + cleanup = 1; } - - printf("Connected!\n"); + /* initialize arg */ + CYASSL* ssl; /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { @@ -143,14 +145,15 @@ void AwaitDGram() if (CyaSSL_accept(ssl) != SSL_SUCCESS) { int err = CyaSSL_get_error(ssl, 0); char buffer[80]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); + printf("error = %d, %s\n", err, + CyaSSL_ERR_error_string(err, buffer)); buffer[80]= 0; printf("SSL_accept failed.\n"); cleanup = 1; } - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { printf("heard %d bytes\n", recvlen); @@ -184,35 +187,32 @@ void AwaitDGram() CyaSSL_free(ssl); printf("Client left return to idle state\n"); - continue; } } int main(int argc, char** argv) { - /* CREATE THE SOCKET */ - - struct sigaction act, oact; /* structures for signal handling */ - + /* structures for signal handling */ + struct sigaction act, oact; /* * Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't * restart the call to accept() after the signal is handled. - */ + */ act.sa_handler = sig_handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; sigaction(SIGINT, &act, &oact); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) +#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) CyaSSL_Debugging_ON(); #endif CyaSSL_Init(); /* Initialize CyaSSL */ /* Set ctx to DTLS 1.2 */ - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } @@ -239,7 +239,7 @@ int main(int argc, char** argv) } AwaitDGram(); - if (cleanup ==1) + if (cleanup == 1) CyaSSL_CTX_free(ctx); return 0; } From 7227162d64e8a0d14abbfbd47e1cc1207a70eb20 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Fri, 30 May 2014 05:40:29 -0600 Subject: [PATCH 055/103] replaced "res" with "listenfd" per variable change. Thanks Chris for catching that --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 3f17b4cb..f83b5db5 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -155,7 +155,7 @@ int Accept(){ printf("Awaiting client connection on port %d\n", SERV_PORT); /* set listenfd non-blocking */ - fcntl(res, F_SETFL, O_NONBLOCK); + fcntl(listenfd, F_SETFL, O_NONBLOCK); CYASSL* ssl; /* initialize arg */ clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ From 10f21a8c03e4c52692ab065c73961b0ef70edbd4 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 2 Jun 2014 16:28:19 -0600 Subject: [PATCH 056/103] nonblocking working needs, memory cleanup --- .../server-dtls-nonblocking.c | 397 ++++++++---------- 1 file changed, 186 insertions(+), 211 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index f83b5db5..87db8a0b 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -1,4 +1,4 @@ -/* server-dtls-nonblocking.c +/* server-dtls.c * * Copyright (C) 2006-2014 wolfSSL Inc. * @@ -20,8 +20,8 @@ * USA *============================================================================= * - * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2 and non-blocking sockets + * Bare-bones example of a DTLS erver for instructional/learning purposes. + * Utilizes DTLS 1.2. */ #include /* standard in/out procedures */ @@ -36,33 +36,20 @@ #include #include #include -#include -#include +#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -CYASSL_CTX* ctx; - static int cleanup; /* To handle shutdown */ - -static int dtls_select(socklen_t sockfd, int to_sec); - -int Accept(); - -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - exit(0); -} - -static void err_sys(const char* msg) -{ - printf("yassl error: %s\n", msg); - if (msg) - exit(0); -} +void AwaitDGram(); /* Separate out Handling Datagrams */ +struct sockaddr_in servaddr; /* our server's address */ +CYASSL_CTX* ctx; +void sig_handler(const int sig); +static int udp_read_connect(int listenfd); +static void NonBlockingSSL_Accept(CYASSL* ssl); +static void tcp_set_nonblocking(int* listenfd); +static int tcp_select(); enum { TEST_SELECT_FAIL, @@ -71,58 +58,26 @@ enum { TEST_ERROR_READY }; -static int dtls_select(socklen_t sockfd, int to_sec) +void sig_handler(const int sig) { - fd_set masterset, workingset; - socklen_t maxfd = sockfd + 1; - struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; - int result; - - FD_ZERO(&masterset); - FD_SET(sockfd, &masterset); - FD_ZERO(&workingset); - FD_SET(sockfd, &workingset); - - /* Uncomment to make the timout a static 3 minutes */ - - /* - timeout.tv_sec = 0; - timeout.tv_usec = 0; - */ - - result = select(maxfd, &masterset, NULL, &workingset, &timeout); - - if (result == 0) - return TEST_TIMEOUT; - else if (result > 0) { - if (FD_ISSET(sockfd, &masterset)) - return TEST_RECV_READY; - else if(FD_ISSET(sockfd, &workingset)) - return TEST_ERROR_READY; - } - - return TEST_SELECT_FAIL; + printf("\nSIGINT handled.\n"); + cleanup = 1; } -int Accept(){ +void AwaitDGram() +{ + int listenfd; /* Initialize our socket */ + int clientfd; /* client connection */ + CYASSL* ssl; /* Initialize ssl object */ while (cleanup != 1) { - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - - + /* Create a UDP/IP socket */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; + printf("Cannot create socket.\n"); + cleanup = 1; } - printf("Socket allocated\n"); - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + printf("Socket allocated\n"); memset((char *)&servaddr, 0, sizeof(servaddr)); /* host-to-network-long conversion (htonl) */ @@ -132,167 +87,189 @@ int Accept(){ servaddr.sin_port = htons(SERV_PORT); - /* Eliminate socket already in use error */ int res = 1; int on = 1; - socklen_t len = sizeof(on); + int len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; } - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; + if (bind(listenfd, + (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + printf("Bind failed.\n"); + cleanup = 1; } - printf("Socket bind complete\n"); - printf("Awaiting client connection on port %d\n", SERV_PORT); - - /* set listenfd non-blocking */ - fcntl(listenfd, F_SETFL, O_NONBLOCK); - - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - - - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); - - if (connfd < 0){ - printf("No clients in que, enter idle state\n"); - } - - else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); - } - else err_sys("recvfrom failed"); - - - + clientfd = udp_read_connect(listenfd); /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); + printf("CyaSSL_new error.\n"); + cleanup = 1; } + /* set clilen to |cliaddr| */ + printf("Connected!\n"); - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); + /* set the/ session ssl to client connection port */ + CyaSSL_set_fd(ssl, clientfd); - /* set listen port to nonblocking, accept nonblocking */ - /* handle peer error */ CyaSSL_set_using_nonblock(ssl, 1); + tcp_set_nonblocking(&clientfd); + NonBlockingSSL_Accept(ssl); + /* Reply to the client */ + int readWriteErr; + int recvlen; /* length of string read */ + char buff[MSGLEN]; /* string read from client */ + char ack[] = "I hear you fashizzle\n"; + int currTimeout = 1; - int ret; - int error = CyaSSL_get_error(ssl, 0); - socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); - int select_ret; + recvlen = CyaSSL_read(ssl, buff, MSGLEN); - ret = CyaSSL_accept(ssl); - printf("ret = %d\n", ret); + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - - int currTimeout = 1; - - /* NOTE: changes over time */ - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - - if (error == SSL_ERROR_WANT_READ) - printf("Server wants to read...\n"); - else - printf("Server wants to write...\n"); - - printf("waiting to select()\n"); - - select_ret = dtls_select(sockfd, currTimeout); - - if (select_ret == TEST_RECV_READY) { - printf("TEST_RECV_READY!\n"); - ret = CyaSSL_accept(ssl); + if (CyaSSL_write(ssl, ack, sizeof(ack)-1) > sizeof(ack)-1){ + printf("Write error.\n"); + cleanup = 1; + } + do { + if (recvlen < 0) { + readWriteErr = CyaSSL_get_error(ssl, 0); + if (readWriteErr != SSL_ERROR_WANT_READ) { + printf("Read Error.\n"); + cleanup = 1; + } + recvlen = CyaSSL_read(ssl, buff, MSGLEN); } - - if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { - printf("TEST_ERROR_READY\n"); - error = CyaSSL_get_error(ssl, 0); - } - - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) ) { - printf("TEST_TIMEOUT\n"); - error = SSL_ERROR_WANT_READ; - } - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS){ - printf("SSL_accept failed\n"); - continue; - } - - - printf("Connected with a client!\n"); - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - + }while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && + currTimeout >= 0 && cleanup != 1); + if (recvlen > 0) { buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); + printf("I heard this:\"%s\"\n", buff); + } else { + printf("Connection Timed Out.\n"); } - - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); - + /* End Reply to Client */ } - return 1; +} + + +static int udp_read_connect(int listenfd) +{ + struct sockaddr_in cliaddr; + unsigned char b[1500]; + int n; + socklen_t clilen = sizeof(cliaddr); + + n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + (struct sockaddr*)&cliaddr, &clilen); + if (n > 0) { + if (connect(listenfd, (const struct sockaddr*)&cliaddr, + sizeof(cliaddr)) != 0) { + printf("udp connect failed.\n"); + } + } + else { + printf("recvfrom failed.\n"); + } + return listenfd; +} + + +static void NonBlockingSSL_Accept(CYASSL* ssl) +{ + int ret = CyaSSL_accept(ssl); + int error = CyaSSL_get_error(ssl, 0); + int listenfd = (int)CyaSSL_get_fd(ssl); + int select_ret; + + while (cleanup != 1 && (ret != SSL_SUCCESS && + (error == SSL_ERROR_WANT_READ || + error == SSL_ERROR_WANT_WRITE))) { + int currTimeout = 1; + + if (error == SSL_ERROR_WANT_READ) + printf("... server would read block\n"); + else + printf("... server would write block\n"); + + currTimeout = CyaSSL_dtls_get_current_timeout(ssl); + select_ret = tcp_select(listenfd, currTimeout); + + if ((select_ret == TEST_RECV_READY) || + (select_ret == TEST_ERROR_READY)) { + ret = CyaSSL_accept(ssl); + error = CyaSSL_get_error(ssl, 0); + } + else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { + error = SSL_ERROR_WANT_READ; + } + else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && + CyaSSL_dtls_got_timeout(ssl) >= 0) { + error = SSL_ERROR_WANT_READ; + } + else { + error = SSL_FATAL_ERROR; + } + } + if (ret != SSL_SUCCESS) { + printf("SSL_accept failed.\n"); + } +} + + +static void tcp_set_nonblocking(int* listenfd) +{ + int flags = fcntl(*listenfd, F_GETFL, 0); + if (flags < 0) { + printf("fcntl get failed"); + cleanup = 1; + } + flags = fcntl(*listenfd, F_SETFL, flags | O_NONBLOCK); + if (flags < 0) { + printf("fcntl set failed.\n"); + cleanup = 1; + } +} + +static int tcp_select(int socketfd, int to_sec) +{ + fd_set recvfds, errfds; + int nfds = socketfd + 1; + struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; + int result; + + FD_ZERO(&recvfds); + FD_SET(socketfd, &recvfds); + FD_ZERO(&errfds); + FD_SET(socketfd, &errfds); + + result = select(nfds, &recvfds, NULL, &errfds, &timeout); + + if (result == 0) + return TEST_TIMEOUT; + else if (result > 0) { + if (FD_ISSET(socketfd, &recvfds)) + return TEST_RECV_READY; + else if(FD_ISSET(socketfd, &errfds)) + return TEST_ERROR_READY; + } + + return TEST_SELECT_FAIL; } int main(int argc, char** argv) { - /* CREATE THE SOCKET */ - - struct sigaction act, oact; /* structures for signal handling */ - + /* structures for signal handling */ + struct sigaction act, oact; /* * Define a signal handler for when the user closes the program @@ -304,42 +281,40 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - // CyaSSL_Debugging_ON(); + //CyaSSL_Debugging_ON(); CyaSSL_Init(); /* Initialize CyaSSL */ - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + /* Set ctx to DTLS 1.2 */ + if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } - printf("CTX set to DTLS 1.2\n"); - + /* Load CA certificates */ if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != SSL_SUCCESS) { fprintf(stderr, "Error loading ../certs/ca-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded CA certs\n"); - + /* Load server certificates */ if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { fprintf(stderr, "Error loading ../certs/server-cert.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded server certs\n"); - + /* Load server Keys */ if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { fprintf(stderr, "Error loading ../certs/server-key.pem, " "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded server keys\n"); - - - int cont = Accept(); - if(cont == 0) + if (cleanup == 1) { CyaSSL_CTX_free(ctx); - return(0); + CyaSSL_Cleanup(); + } + + AwaitDGram(); + return 0; } From 5ad64e2c9afcbff8b745220d55091097f3b95e33 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 08:57:56 -0600 Subject: [PATCH 057/103] added additional memory free --- .../server-dtls-threaded.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 81c72668..06ffeb31 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -61,6 +61,10 @@ void AwaitDGram() socklen_t clilen; /* length of address' */ while (cleanup != 1) { + if (cleanup == 1){ + CyaSSL_Cleanup(); + CyaSSL_CTX_free(ctx); + } if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; @@ -113,20 +117,18 @@ void AwaitDGram() else if (connfd > 0) { - pthread_t threadID; + pthread_t threadID; - if (pthread_create(&threadID, NULL, - ThreadControl, (void *)&connfd) < 0) { - printf("pthread_create failed.\n"); - } - printf("Connection being re-routed to Thread Control.\n"); + if (pthread_create(&threadID, NULL, + ThreadControl, (void *)&connfd) < 0) { + printf("pthread_create failed.\n"); + } + printf("Connection being re-routed to Thread Control.\n"); } else { printf("Recvfrom failed.\n"); cleanup = 1; } - pthread_t threadID = pthread_self(); - pthread_join(threadID, (void*)&connfd); sleep(1); continue; @@ -247,7 +249,7 @@ void* ThreadControl(void* openSock) CyaSSL_set_fd(ssl, 0); CyaSSL_shutdown(ssl); CyaSSL_free(ssl); - + printf("Returning to idle state\n"); int dummy; @@ -302,9 +304,10 @@ int main(int argc, char** argv) printf("Loaded server keys\n"); AwaitDGram(); - if (cleanup == 1){ + if (cleanup == 1) { CyaSSL_Cleanup(); CyaSSL_CTX_free(ctx); } + return(0); } From 824d190fa65f4b52c8aceaadba155c68df14cac4 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 10:22:40 -0600 Subject: [PATCH 058/103] removed un-needed library --- .../dtls_secured_nonblocking/server-dtls-nonblocking.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 87db8a0b..60d69cff 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -36,7 +36,6 @@ #include #include #include -#include #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 @@ -71,6 +70,12 @@ void AwaitDGram() CYASSL* ssl; /* Initialize ssl object */ while (cleanup != 1) { + + if (cleanup == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } + /* Create a UDP/IP socket */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); @@ -139,7 +144,8 @@ void AwaitDGram() if (CyaSSL_write(ssl, ack, sizeof(ack)-1) > sizeof(ack)-1){ printf("Write error.\n"); cleanup = 1; - } + } + readWriteErr = CyaSSL_get_error(ssl, 0); do { if (recvlen < 0) { readWriteErr = CyaSSL_get_error(ssl, 0); From 10215ec1f8e308be5fb63fd1c2218441eb1964a6 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 13:40:43 -0600 Subject: [PATCH 059/103] changed "buffer[80] to buffer[sizeof(buffer)-1] --- project1/dtls_secured/server-dtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 15051eb7..6d5ff162 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -147,7 +147,7 @@ void AwaitDGram() char buffer[80]; printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[80]= 0; + buffer[sizeof(buffer)-1]= 0; printf("SSL_accept failed.\n"); cleanup = 1; } From 293fa218439513510ad6d07a95462749b3d42f18 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 13:42:32 -0600 Subject: [PATCH 060/103] changed "buffer[80] to buffer[sizeof(buffer)-1] --- project1/dtls_secured_multithreaded/server-dtls-threaded.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 06ffeb31..bf9ca1a0 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -214,7 +214,7 @@ void* ThreadControl(void* openSock) int err = CyaSSL_get_error(ssl, 0); char buffer[80]; printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[80]= 0; + buffer[sizeof(buffer)-1] = 0; printf("SSL_accept failed.\n"); cleanup = 1; } From 42a2a3709b8b6b6a4e62edc53c84ccc8b888ea28 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 14:12:00 -0600 Subject: [PATCH 061/103] removed dtls_secured_nonblocing_multithreaded for now --- .../Makefile | 21 - .../server-dtls-nonblocking-threaded.c | 379 ------------------ 2 files changed, 400 deletions(-) delete mode 100644 project1/dtls_secured_nonblocking_multithreaded/Makefile delete mode 100644 project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c diff --git a/project1/dtls_secured_nonblocking_multithreaded/Makefile b/project1/dtls_secured_nonblocking_multithreaded/Makefile deleted file mode 100644 index 3fdc8071..00000000 --- a/project1/dtls_secured_nonblocking_multithreaded/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-dtls-nonblocking-threaded.c - $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-nonblocking-threaded.c -lcyassl -lpthread - - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c b/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c deleted file mode 100644 index dd74a9be..00000000 --- a/project1/dtls_secured_nonblocking_multithreaded/server-dtls-nonblocking-threaded.c +++ /dev/null @@ -1,379 +0,0 @@ -/* server-dtls-nonblocking-threaded.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2 and non-blocking sockets and multi threading to handle - * multiple clients. - */ - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 - -CYASSL_CTX* ctx; /* ctx pointer */ -static int cleanup; /* To handle shutdown */ -struct sockaddr_in servaddr; /* our server's address */ -struct sockaddr_in cliaddr; /* the client's address */ -int listenfd; /* Initialize our socket */ - -static int dtls_select(socklen_t sockfd, int to_sec); -int Accept(); -void *ThreadControl(void*); - -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - exit(0); -} - -static void err_sys(const char* msg) -{ - printf("yassl error: %s\n", msg); - if (msg) - exit(0); -} - -enum { - TEST_SELECT_FAIL, - TEST_TIMEOUT, - TEST_RECV_READY, - TEST_ERROR_READY -}; - -static int dtls_select(socklen_t sockfd, int to_sec) -{ - fd_set masterset, workingset; - socklen_t maxfd = sockfd + 1; - struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; - int result; - - FD_ZERO(&masterset); - FD_SET(sockfd, &masterset); - FD_ZERO(&workingset); - FD_SET(sockfd, &workingset); - - result = select(maxfd, &masterset, NULL, &workingset, &timeout); - - if (result == 0) - return TEST_TIMEOUT; - else if (result > 0) { - if (FD_ISSET(sockfd, &masterset)) - return TEST_RECV_READY; - else if(FD_ISSET(sockfd, &workingset)) - return TEST_ERROR_READY; - } - - return TEST_SELECT_FAIL; -} - -int Accept() -{ - - while (cleanup != 1) { - socklen_t clilen; /* length of address' */ - - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - return 0; - } - printf("Socket allocated\n"); - - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); - } - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - return 0; - } - printf("Socket bind complete\n"); - printf("Awaiting client connection on port %d\n", SERV_PORT); - - /* set listenfd non-blocking */ - fcntl(listenfd, F_SETFL, O_NONBLOCK); - - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); - - /* No clients attempting to connect */ - if (connfd < 0){ - printf("No clients in que, enter idle state\n"); - } - - /* Client attempted to connect but was not using udp */ - else if (connfd > 0) { - pthread_t threadID; - - if (pthread_create(&threadID, NULL, ThreadControl, (void *)&connfd) < 0) { - printf("pthread_create failed.\n"); - } - - printf("Connection being re-routed to Thread Control.\n"); - } - } - return 1; -} - -void *ThreadControl(void* openSock) -{ - char ack[] = "I hear you fashizzle!"; - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int listenfd; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - - listenfd = *(int*)openSock; - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { - err_sys("cannot create socket"); - } - - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - err_sys("setsockopt SO_REUSEADDR failed\n"); - } - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { - err_sys("bind failed"); - } - - /* set listenfd non-blocking */ - fcntl(listenfd, F_SETFL, O_NONBLOCK); - - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); - - /* Client attempted to connect but was not using udp */ - if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) - err_sys("udp connect failed"); - } - - /* client attempted to connect, recvfrom failed */ - else err_sys("recvfrom failed"); - - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { - fprintf(stderr, "CyaSSL_new error.\n"); - exit(EXIT_FAILURE); - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - /* set listen port to nonblocking, accept nonblocking */ - CyaSSL_set_using_nonblock(ssl, 1); - - int ret; - int error = CyaSSL_get_error(ssl, 0); - socklen_t sockfd = (socklen_t)CyaSSL_get_fd(ssl); - int select_ret; - - ret = CyaSSL_accept(ssl); - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - - int currTimeout = 1; - - /* NOTE: changes over time */ - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - - if (error == SSL_ERROR_WANT_READ) - printf("Server wants to read...\n"); - else - printf("Server wants to write...\n"); - - printf("waiting to select()\n"); - - select_ret = dtls_select(sockfd, currTimeout); - - if (select_ret == TEST_RECV_READY) { - printf("TEST_RECV_READY!\n"); - ret = CyaSSL_accept(ssl); - } - - if (select_ret == TEST_ERROR_READY && !CyaSSL_dtls(ssl)) { - printf("TEST_ERROR_READY\n"); - error = CyaSSL_get_error(ssl, 0); - } - - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) ) { - printf("TEST_TIMEOUT\n"); - error = SSL_ERROR_WANT_READ; - } - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS){ - printf("SSL_accept failed\n"); - } - - printf("Connected with a client!\n"); - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - err_sys("CyaSSL_write fail"); - } - - else - printf("lost the connection to client\n"); - - printf("reply sent \"%s\"\n", ack); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); -} - -int main(int argc, char** argv) -{ - /* CREATE THE SOCKET */ - - struct sigaction act, oact; /* structures for signal handling */ - - /* - * Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - - // CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ - - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); - } - printf("CTX set to DTLS 1.2\n"); - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != - SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded CA certs\n"); - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server certs\n"); - - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } - printf("Loaded server keys\n"); - - int cont = Accept(); - - if(cont == 0) - CyaSSL_CTX_free(ctx); - return(0); -} From ccf959d5b93fe45a1e87fb8b4bbfc4966483fc74 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 15:38:53 -0600 Subject: [PATCH 062/103] exit status update --- project1/dtls_secured/server-dtls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 6d5ff162..2aea8e04 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -239,7 +239,9 @@ int main(int argc, char** argv) } AwaitDGram(); - if (cleanup == 1) + if (cleanup == 1) { CyaSSL_CTX_free(ctx); + CyaSSL_cleanup(); + } return 0; } From e28c8fd62f968003730bd708246aa684a71f4d36 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 15:51:35 -0600 Subject: [PATCH 063/103] exit status updated --- project1/dtls_secured_multithreaded/server-dtls-threaded.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index bf9ca1a0..d6e377b2 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -61,10 +61,6 @@ void AwaitDGram() socklen_t clilen; /* length of address' */ while (cleanup != 1) { - if (cleanup == 1){ - CyaSSL_Cleanup(); - CyaSSL_CTX_free(ctx); - } if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; @@ -130,7 +126,7 @@ void AwaitDGram() cleanup = 1; } - sleep(1); +// sleep(1); continue; } } @@ -250,7 +246,6 @@ void* ThreadControl(void* openSock) CyaSSL_shutdown(ssl); CyaSSL_free(ssl); - printf("Returning to idle state\n"); int dummy; pthread_exit((void*)&dummy); From 0a3b77e290120a1ce491ea038fd47c9b5b5dd630 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:02:34 -0600 Subject: [PATCH 064/103] CyaSSL_cleanup --> CyaSSL_Cleanup --- project1/dtls_secured/server-dtls.c | 2 +- .../server-dtls-nonblocking.c | 45 ++++++++++++------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 2aea8e04..7c199707 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -241,7 +241,7 @@ int main(int argc, char** argv) AwaitDGram(); if (cleanup == 1) { CyaSSL_CTX_free(ctx); - CyaSSL_cleanup(); + CyaSSL_Cleanup(); } return 0; } diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 60d69cff..a0e4ecdc 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -47,8 +47,8 @@ CYASSL_CTX* ctx; void sig_handler(const int sig); static int udp_read_connect(int listenfd); static void NonBlockingSSL_Accept(CYASSL* ssl); -static void tcp_set_nonblocking(int* listenfd); -static int tcp_select(); +static void dtls_set_nonblocking(int* listenfd); +static int dtls_select(); enum { TEST_SELECT_FAIL, @@ -71,11 +71,11 @@ void AwaitDGram() while (cleanup != 1) { - if (cleanup == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } - + if (cleanup == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } + /* Create a UDP/IP socket */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); @@ -127,7 +127,7 @@ void AwaitDGram() CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&clientfd); + dtls_set_nonblocking(&clientfd); NonBlockingSSL_Accept(ssl); /* Reply to the client */ @@ -147,6 +147,10 @@ void AwaitDGram() } readWriteErr = CyaSSL_get_error(ssl, 0); do { + if (cleanup == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } if (recvlen < 0) { readWriteErr = CyaSSL_get_error(ssl, 0); if (readWriteErr != SSL_ERROR_WANT_READ) { @@ -158,7 +162,7 @@ void AwaitDGram() }while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && currTimeout >= 0 && cleanup != 1); if (recvlen > 0) { - buff[recvlen] = 0; + buff[recvlen-1] = 0; printf("I heard this:\"%s\"\n", buff); } else { printf("Connection Timed Out.\n"); @@ -172,12 +176,12 @@ static int udp_read_connect(int listenfd) { struct sockaddr_in cliaddr; unsigned char b[1500]; - int n; + int connfd; socklen_t clilen = sizeof(cliaddr); - n = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (n > 0) { + if (connfd > 0) { if (connect(listenfd, (const struct sockaddr*)&cliaddr, sizeof(cliaddr)) != 0) { printf("udp connect failed.\n"); @@ -200,6 +204,11 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) while (cleanup != 1 && (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE))) { + if (cleanup == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } + int currTimeout = 1; if (error == SSL_ERROR_WANT_READ) @@ -208,7 +217,7 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) printf("... server would write block\n"); currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - select_ret = tcp_select(listenfd, currTimeout); + select_ret = dtls_select(listenfd, currTimeout); if ((select_ret == TEST_RECV_READY) || (select_ret == TEST_ERROR_READY)) { @@ -232,7 +241,7 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) } -static void tcp_set_nonblocking(int* listenfd) +static void dtls_set_nonblocking(int* listenfd) { int flags = fcntl(*listenfd, F_GETFL, 0); if (flags < 0) { @@ -246,7 +255,7 @@ static void tcp_set_nonblocking(int* listenfd) } } -static int tcp_select(int socketfd, int to_sec) +static int dtls_select(int socketfd, int to_sec) { fd_set recvfds, errfds; int nfds = socketfd + 1; @@ -322,5 +331,11 @@ int main(int argc, char** argv) } AwaitDGram(); + if (cleanup == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } + + return 0; } From 1d3313bde692040413be8ffb871fbdc955c9e0f6 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:09:09 -0600 Subject: [PATCH 065/103] handles ctrl+C when client fails to connect --- project1/dtls_secured/server-dtls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 7c199707..5e9e9ed9 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -50,6 +50,9 @@ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + exit(0); } From e1c32dc77b7d01804259509897ce902dd73085e1 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:12:36 -0600 Subject: [PATCH 066/103] sig init handles client fail --- project1/dtls_secured_multithreaded/server-dtls-threaded.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index d6e377b2..542bf33d 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -51,8 +51,10 @@ void* ThreadControl(void*); void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); + CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); cleanup = 1; + exit(0); } void AwaitDGram() From 94b36d99ce670732013e2ee50a7e7ca6ccf766ee Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:14:23 -0600 Subject: [PATCH 067/103] sig init handles client connection fail --- .../server-dtls-nonblocking.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index a0e4ecdc..b54865f2 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -61,6 +61,8 @@ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); } void AwaitDGram() @@ -71,11 +73,6 @@ void AwaitDGram() while (cleanup != 1) { - if (cleanup == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } - /* Create a UDP/IP socket */ if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); @@ -148,8 +145,7 @@ void AwaitDGram() readWriteErr = CyaSSL_get_error(ssl, 0); do { if (cleanup == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); + break; } if (recvlen < 0) { readWriteErr = CyaSSL_get_error(ssl, 0); @@ -205,8 +201,7 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE))) { if (cleanup == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); + break; } int currTimeout = 1; From 0c05c40f560d9892db3988850d0eb36f18b74a43 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:15:46 -0600 Subject: [PATCH 068/103] sig init --- project1/dtls_secured_multithreaded/server-dtls-threaded.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 542bf33d..4243ed92 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -51,9 +51,9 @@ void* ThreadControl(void*); void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); + cleanup = 1; CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); - cleanup = 1; exit(0); } From 566523c7c27f07fb9028d9d8b9c982ba6b5d5ed3 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 3 Jun 2014 16:16:37 -0600 Subject: [PATCH 069/103] sig init --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index b54865f2..95b55294 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -63,6 +63,7 @@ void sig_handler(const int sig) cleanup = 1; CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); + exit(0); } void AwaitDGram() From bb3ef9f9ff65dd93f40dfdbcfa51ca5906dc401b Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 4 Jun 2014 09:35:19 -0600 Subject: [PATCH 070/103] read, write correction --- .../server-dtls-nonblocking.c | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 95b55294..7feb3650 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -61,6 +61,7 @@ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; + AwaitDGram(); CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); exit(0); @@ -70,7 +71,8 @@ void AwaitDGram() { int listenfd; /* Initialize our socket */ int clientfd; /* client connection */ - CYASSL* ssl; /* Initialize ssl object */ + CYASSL* ssl; /* Initialize ssl object */ + while (cleanup != 1) { @@ -130,19 +132,16 @@ void AwaitDGram() /* Reply to the client */ int readWriteErr; - int recvlen; /* length of string read */ - char buff[MSGLEN]; /* string read from client */ + int recvlen; /* length of string read */ + char buff[80]; /* string read from client */ char ack[] = "I hear you fashizzle\n"; int currTimeout = 1; - recvlen = CyaSSL_read(ssl, buff, MSGLEN); + buff[sizeof(buff)-1] = 0; + recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - if (CyaSSL_write(ssl, ack, sizeof(ack)-1) > sizeof(ack)-1){ - printf("Write error.\n"); - cleanup = 1; - } readWriteErr = CyaSSL_get_error(ssl, 0); do { if (cleanup == 1) { @@ -154,18 +153,29 @@ void AwaitDGram() printf("Read Error.\n"); cleanup = 1; } - recvlen = CyaSSL_read(ssl, buff, MSGLEN); + buff[sizeof(buff)-1] = 0; + recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } - }while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && + } while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && currTimeout >= 0 && cleanup != 1); if (recvlen > 0) { - buff[recvlen-1] = 0; + buff[recvlen] = 0; printf("I heard this:\"%s\"\n", buff); - } else { + } + else { printf("Connection Timed Out.\n"); } + + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + printf("Write error.\n"); + cleanup = 1; + } + /* End Reply to Client */ } + CyaSSL_set_fd(ssl, 0); + CyaSSL_free(ssl); + CyaSSL_shutdown(ssl); } @@ -202,6 +212,7 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE))) { if (cleanup == 1) { + break; } From d96ad83fdd5ce6c4c0d8ca37df630137ca03dfcd Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 4 Jun 2014 22:12:43 -0600 Subject: [PATCH 071/103] still working out some bugs --- .../server-dtls-nonblocking.c | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 7feb3650..92e2bece 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -42,13 +42,16 @@ static int cleanup; /* To handle shutdown */ void AwaitDGram(); /* Separate out Handling Datagrams */ -struct sockaddr_in servaddr; /* our server's address */ -CYASSL_CTX* ctx; +static CYASSL_CTX* ctx; void sig_handler(const int sig); -static int udp_read_connect(int listenfd); -static void NonBlockingSSL_Accept(CYASSL* ssl); -static void dtls_set_nonblocking(int* listenfd); -static int dtls_select(); +//rm static +int udp_read_connect(int); +//rm static +void NonBlockingSSL_Accept(CYASSL*); +//rm static +void dtls_set_nonblocking(int*); +//rm static +int dtls_select(); enum { TEST_SELECT_FAIL, @@ -61,7 +64,6 @@ void sig_handler(const int sig) { printf("\nSIGINT handled.\n"); cleanup = 1; - AwaitDGram(); CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); exit(0); @@ -69,9 +71,10 @@ void sig_handler(const int sig) void AwaitDGram() { - int listenfd; /* Initialize our socket */ - int clientfd; /* client connection */ - CYASSL* ssl; /* Initialize ssl object */ + int listenfd = 0; /* Initialize our socket */ + struct sockaddr_in servaddr;/* our server's address */ + int clientfd = 0; /* client connection */ + CYASSL* ssl; /* Initialize ssl object */ while (cleanup != 1) { @@ -145,6 +148,7 @@ void AwaitDGram() readWriteErr = CyaSSL_get_error(ssl, 0); do { if (cleanup == 1) { + memset(buff, 0, sizeof(buff)); break; } if (recvlen < 0) { @@ -153,7 +157,6 @@ void AwaitDGram() printf("Read Error.\n"); cleanup = 1; } - buff[sizeof(buff)-1] = 0; recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } } while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && @@ -164,28 +167,35 @@ void AwaitDGram() } else { printf("Connection Timed Out.\n"); + continue; } if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { printf("Write error.\n"); cleanup = 1; } + printf("Reply sent:\"%s\"\n", ack); + memset(buff, 0, sizeof(buff)); + close(listenfd); +// CyaSSL_set_fd(ssl, 0); + CyaSSL_free(ssl); +// CyaSSL_shutdown(ssl); /* End Reply to Client */ } - CyaSSL_set_fd(ssl, 0); - CyaSSL_free(ssl); - CyaSSL_shutdown(ssl); } -static int udp_read_connect(int listenfd) +int udp_read_connect(int listenfd) { struct sockaddr_in cliaddr; unsigned char b[1500]; int connfd; socklen_t clilen = sizeof(cliaddr); + /* ensure b is empty upon each call */ + memset(b, 0, sizeof(b)); + connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); if (connfd > 0) { @@ -200,8 +210,7 @@ static int udp_read_connect(int listenfd) return listenfd; } - -static void NonBlockingSSL_Accept(CYASSL* ssl) +void NonBlockingSSL_Accept(CYASSL* ssl) { int ret = CyaSSL_accept(ssl); int error = CyaSSL_get_error(ssl, 0); @@ -212,7 +221,8 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE))) { if (cleanup == 1) { - + CyaSSL_free(ssl); //added + CyaSSL_shutdown(ssl); //added break; } @@ -248,7 +258,7 @@ static void NonBlockingSSL_Accept(CYASSL* ssl) } -static void dtls_set_nonblocking(int* listenfd) +void dtls_set_nonblocking(int* listenfd) { int flags = fcntl(*listenfd, F_GETFL, 0); if (flags < 0) { @@ -262,7 +272,7 @@ static void dtls_set_nonblocking(int* listenfd) } } -static int dtls_select(int socketfd, int to_sec) +int dtls_select(int socketfd, int to_sec) { fd_set recvfds, errfds; int nfds = socketfd + 1; @@ -332,10 +342,6 @@ int main(int argc, char** argv) "please check the file.\n"); exit(EXIT_FAILURE); } - if (cleanup == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } AwaitDGram(); if (cleanup == 1) { From 07ef13765741b230a5a7f7f66307cf6b8d3556ab Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 10:30:37 -0600 Subject: [PATCH 072/103] fixed memory leaks --- .../dtls_secured_nonblocking/server-dtls-nonblocking.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 92e2bece..c3d7807f 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -42,7 +42,7 @@ static int cleanup; /* To handle shutdown */ void AwaitDGram(); /* Separate out Handling Datagrams */ -static CYASSL_CTX* ctx; +CYASSL_CTX* ctx; void sig_handler(const int sig); //rm static int udp_read_connect(int); @@ -74,7 +74,6 @@ void AwaitDGram() int listenfd = 0; /* Initialize our socket */ struct sockaddr_in servaddr;/* our server's address */ int clientfd = 0; /* client connection */ - CYASSL* ssl; /* Initialize ssl object */ while (cleanup != 1) { @@ -116,6 +115,8 @@ void AwaitDGram() printf("Awaiting client connection on port %d\n", SERV_PORT); clientfd = udp_read_connect(listenfd); + /* Initialize ssl object */ + CYASSL* ssl; /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { printf("CyaSSL_new error.\n"); @@ -167,7 +168,6 @@ void AwaitDGram() } else { printf("Connection Timed Out.\n"); - continue; } if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { @@ -176,7 +176,8 @@ void AwaitDGram() } printf("Reply sent:\"%s\"\n", ack); memset(buff, 0, sizeof(buff)); - close(listenfd); + /* do not close listenfd, breaks*/ + //close(listenfd); // CyaSSL_set_fd(ssl, 0); CyaSSL_free(ssl); // CyaSSL_shutdown(ssl); From 99a3c45aef96b2aa0acdd9dac4c47fb7bdfbc82d Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 10:34:38 -0600 Subject: [PATCH 073/103] fixed memory leaks --- .../server-dtls-nonblocking.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index c3d7807f..70185cc3 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -44,13 +44,9 @@ static int cleanup; /* To handle shutdown */ void AwaitDGram(); /* Separate out Handling Datagrams */ CYASSL_CTX* ctx; void sig_handler(const int sig); -//rm static int udp_read_connect(int); -//rm static void NonBlockingSSL_Accept(CYASSL*); -//rm static void dtls_set_nonblocking(int*); -//rm static int dtls_select(); enum { @@ -175,13 +171,10 @@ void AwaitDGram() cleanup = 1; } printf("Reply sent:\"%s\"\n", ack); - memset(buff, 0, sizeof(buff)); - /* do not close listenfd, breaks*/ - //close(listenfd); -// CyaSSL_set_fd(ssl, 0); - CyaSSL_free(ssl); -// CyaSSL_shutdown(ssl); + /* free allocated memory */ + memset(buff, 0, sizeof(buff)); + CyaSSL_free(ssl); /* End Reply to Client */ } } From 32210cb576faff45fd48c564d88fd85a8f3b29c7 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 10:42:52 -0600 Subject: [PATCH 074/103] error handling optimization --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 70185cc3..ab2cb2f6 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -151,10 +151,11 @@ void AwaitDGram() if (recvlen < 0) { readWriteErr = CyaSSL_get_error(ssl, 0); if (readWriteErr != SSL_ERROR_WANT_READ) { - printf("Read Error.\n"); + printf("Read Error, error was: %d.\n", readWriteErr); cleanup = 1; + } else { + recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } - recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } } while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && currTimeout >= 0 && cleanup != 1); From bb7f0702a26beffc65f657b0b9d5e0b611c538ef Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 11:10:21 -0600 Subject: [PATCH 075/103] ready for publishing --- .../server-dtls-nonblocking.c | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index ab2cb2f6..803137d4 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -41,14 +41,16 @@ #define MSGLEN 4096 static int cleanup; /* To handle shutdown */ -void AwaitDGram(); /* Separate out Handling Datagrams */ CYASSL_CTX* ctx; -void sig_handler(const int sig); -int udp_read_connect(int); -void NonBlockingSSL_Accept(CYASSL*); -void dtls_set_nonblocking(int*); + +void AwaitDGram(); /* Separate out Handling Datagrams */ +void sig_handler(const int sig); /* handles ctrl+c termination */ +int udp_read_connect(int); /* broken out to improve readability */ +void NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ +void dtls_set_nonblocking(int*); /* set the socket non-blocking */ int dtls_select(); +/* costumes for select_ret to wear */ enum { TEST_SELECT_FAIL, TEST_TIMEOUT, @@ -68,9 +70,19 @@ void sig_handler(const int sig) void AwaitDGram() { int listenfd = 0; /* Initialize our socket */ - struct sockaddr_in servaddr;/* our server's address */ int clientfd = 0; /* client connection */ + int res = 1; + int on = 1; + int len = sizeof(on); + int readWriteErr; + int recvlen; /* length of string read */ + int currTimeout = 1; + char buff[80]; /* string read from client */ + char ack[] = "I hear you fashizzle\n"; + struct sockaddr_in servaddr;/* our server's address */ + /* Initialize ssl object */ + CYASSL* ssl = NULL; while (cleanup != 1) { @@ -89,18 +101,13 @@ void AwaitDGram() servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - int len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); cleanup = 1; } - /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { @@ -111,8 +118,6 @@ void AwaitDGram() printf("Awaiting client connection on port %d\n", SERV_PORT); clientfd = udp_read_connect(listenfd); - /* Initialize ssl object */ - CYASSL* ssl; /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { printf("CyaSSL_new error.\n"); @@ -125,18 +130,11 @@ void AwaitDGram() /* set the/ session ssl to client connection port */ CyaSSL_set_fd(ssl, clientfd); - CyaSSL_set_using_nonblock(ssl, 1); dtls_set_nonblocking(&clientfd); NonBlockingSSL_Accept(ssl); - /* Reply to the client */ - int readWriteErr; - int recvlen; /* length of string read */ - char buff[80]; /* string read from client */ - char ack[] = "I hear you fashizzle\n"; - int currTimeout = 1; - + /* Begin: Reply to the client */ buff[sizeof(buff)-1] = 0; recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); @@ -158,7 +156,8 @@ void AwaitDGram() } } } while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && - currTimeout >= 0 && cleanup != 1); + currTimeout >= 0 && cleanup != 1); + if (recvlen > 0) { buff[recvlen] = 0; printf("I heard this:\"%s\"\n", buff); @@ -176,11 +175,11 @@ void AwaitDGram() /* free allocated memory */ memset(buff, 0, sizeof(buff)); CyaSSL_free(ssl); - /* End Reply to Client */ + + /* End: Reply to the Client */ } } - int udp_read_connect(int listenfd) { struct sockaddr_in cliaddr; @@ -211,6 +210,7 @@ void NonBlockingSSL_Accept(CYASSL* ssl) int error = CyaSSL_get_error(ssl, 0); int listenfd = (int)CyaSSL_get_fd(ssl); int select_ret; + int currTimeout = 1; while (cleanup != 1 && (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || @@ -221,8 +221,6 @@ void NonBlockingSSL_Accept(CYASSL* ssl) break; } - int currTimeout = 1; - if (error == SSL_ERROR_WANT_READ) printf("... server would read block\n"); else @@ -252,7 +250,6 @@ void NonBlockingSSL_Accept(CYASSL* ssl) } } - void dtls_set_nonblocking(int* listenfd) { int flags = fcntl(*listenfd, F_GETFL, 0); @@ -343,7 +340,5 @@ int main(int argc, char** argv) CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); } - - return 0; } From 62e48b50d9fc65cfa149978a0aed08d1c7c8b55b Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 11:23:09 -0600 Subject: [PATCH 076/103] ready for publishing --- project1/dtls_secured/server-dtls.c | 49 ++++++++++------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 5e9e9ed9..244abb1f 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -39,11 +39,12 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 +CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ -void AwaitDGram(); /* Separate out Handling Datagrams */ + struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ -CYASSL_CTX* ctx; +void AwaitDGram(); /* Separate out Handling Datagrams */ void sig_handler(const int sig); void sig_handler(const int sig) @@ -55,15 +56,21 @@ void sig_handler(const int sig) exit(0); } - void AwaitDGram() { - char ack[] = "I hear you fashizzle!"; - int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ + char ack[] = "I hear you fashizzle!\n"; char buff[MSGLEN]; /* the incoming message */ + int listenfd = 0; /* Initialize our socket */ + int recvlen = 0; /* length of message */ + int res = 1; + int on = 1; + int connfd = 0; + socklen_t len = sizeof(on); + socklen_t clilen; + clilen = sizeof(cliaddr); + unsigned char b[1500]; + CYASSL* ssl = NULL; while (cleanup != 1) { @@ -83,18 +90,13 @@ void AwaitDGram() servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); cleanup = 1; } - /*Bind Socket*/ if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { @@ -105,9 +107,6 @@ void AwaitDGram() printf("Awaiting client connection on port %d\n", SERV_PORT); /* set clilen to |cliaddr| */ - clilen = sizeof(cliaddr); - unsigned char b[1500]; - int connfd = 0; connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, @@ -131,8 +130,6 @@ void AwaitDGram() } printf("Connected!\n"); - /* initialize arg */ - CYASSL* ssl; /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx) ) == NULL) { @@ -140,11 +137,9 @@ void AwaitDGram() cleanup = 1; } - /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { int err = CyaSSL_get_error(ssl, 0); char buffer[80]; @@ -154,17 +149,12 @@ void AwaitDGram() printf("SSL_accept failed.\n"); cleanup = 1; } - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - printf("heard %d bytes\n", recvlen); buff[recvlen] = 0; printf("I heard this: \"%s\"\n", buff); } - - if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); if(readErr != SSL_ERROR_WANT_READ) { @@ -172,19 +162,15 @@ void AwaitDGram() cleanup = 1; } } - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { printf("CyaSSL_write fail.\n"); cleanup = 1; + } else { + printf("lost the connection to client\n"); } - else - printf("lost the connection to client\n"); - printf("reply sent \"%s\"\n", ack); - CyaSSL_set_fd(ssl, 0); CyaSSL_shutdown(ssl); CyaSSL_free(ssl); @@ -193,7 +179,6 @@ void AwaitDGram() } } - int main(int argc, char** argv) { /* structures for signal handling */ @@ -203,7 +188,7 @@ int main(int argc, char** argv) * Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't * restart the call to accept() after the signal is handled. - */ + */ act.sa_handler = sig_handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; From 18313b60cd3b8ba48a71279b6294381a31581664 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 11:47:16 -0600 Subject: [PATCH 077/103] ready for publishing --- .../server-dtls-threaded.c | 78 +++++++++---------- 1 file changed, 35 insertions(+), 43 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 4243ed92..4805e01c 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -40,10 +40,10 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 +CYASSL_CTX* ctx; +static int cleanup; /* To handle shutdown */ struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ -static int cleanup; /* To handle shutdown */ -CYASSL_CTX* ctx; void AwaitDGram(); void* ThreadControl(void*); @@ -60,7 +60,12 @@ void sig_handler(const int sig) void AwaitDGram() { int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ + int res = 1; + int connfd = 0; + int on = 1; + socklen_t len = sizeof(on); + socklen_t clilen; /* length of address' */ + unsigned char b[1500]; while (cleanup != 1) { if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { @@ -80,9 +85,6 @@ void AwaitDGram() servaddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); @@ -91,20 +93,17 @@ void AwaitDGram() } /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + if (bind(listenfd, (struct sockaddr *)&servaddr, + sizeof(servaddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; break; } printf("Socket bind complete\n"); - - printf("Awaiting client connection on port %d\n", SERV_PORT); - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - + /* set clilen to |cliaddr| */ + clilen = sizeof(cliaddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); @@ -112,11 +111,10 @@ void AwaitDGram() printf("No clients in que, enter idle state\n"); continue; } - else if (connfd > 0) { - + /* create a new thread ID */ pthread_t threadID; - + /* use ID to spawn a unique thread */ if (pthread_create(&threadID, NULL, ThreadControl, (void *)&connfd) < 0) { printf("pthread_create failed.\n"); @@ -127,23 +125,28 @@ void AwaitDGram() printf("Recvfrom failed.\n"); cleanup = 1; } - -// sleep(1); + sleep(1); continue; } } void* ThreadControl(void* openSock) { - pthread_detach(pthread_self()); - char ack[] = "I hear you fashizzle!\n"; - int listenfd = 0; - socklen_t clilen; /* length of address' */ - int recvlen = 0; /* length of message */ - char buff[MSGLEN]; /* the incoming message */ - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + CYASSL* ssl = NULL; + unsigned char b[1500]; + int connfd = 0; + int listenfd = 0; + int res = 1; + int recvlen = 0; + int on = 1; + socklen_t len = sizeof(on); + socklen_t clilen; + char buff[MSGLEN]; + char ack[] = "I hear you fashizzle!\n"; + + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } @@ -158,9 +161,6 @@ void* ThreadControl(void* openSock) servaddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ - int res = 1; - int on = 1; - socklen_t len = sizeof(on); res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); @@ -173,11 +173,7 @@ void* ThreadControl(void* openSock) cleanup = 1; } - CYASSL* ssl; /* initialize arg */ - clilen = sizeof(cliaddr); /* set clilen to |cliaddr| */ - unsigned char b[1500]; - int connfd = 0; - + clilen = sizeof(cliaddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); @@ -200,7 +196,7 @@ void* ThreadControl(void* openSock) printf("Connected!\n"); /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { + if ((ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; } @@ -216,30 +212,27 @@ void* ThreadControl(void* openSock) printf("SSL_accept failed.\n"); cleanup = 1; } - - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ + if ((recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ printf("heard %d bytes\n", recvlen); buff[recvlen] = 0; printf("I heard this: \"%s\"\n", buff); } - if (recvlen < 0) { int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) { + if (readErr != SSL_ERROR_WANT_READ) { printf("SSL_read failed.\n"); cleanup = 1; } } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { printf("CyaSSL_write fail.\n"); cleanup = 1; } - - else + else { printf("Sending Reply...\n"); + } printf("reply sent \"%s\"\n", ack); printf("No further packets, severing connection to client.\n"); @@ -267,7 +260,7 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - // CyaSSL_Debugging_ON(); + /* CyaSSL_Debugging_ON(); */ CyaSSL_Init(); /* Initialize CyaSSL */ if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ @@ -305,6 +298,5 @@ int main(int argc, char** argv) CyaSSL_Cleanup(); CyaSSL_CTX_free(ctx); } - return(0); } From 5c29496f712fbd7447323d82826908efca2b5573 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:00:28 -0600 Subject: [PATCH 078/103] ready for publishing --- project1/unsecure/server-udp.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index a851de29..7c52b780 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -32,22 +32,18 @@ #include /* used for sockaddr_in */ #include - #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 80 /* limit incoming message size */ int main (int argc, char** argv) { - /* CREATE THE SOCKET */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int sockfd; /* Initialize our socket */ + struct sockaddr_in cliaddr; /* the client's address */ + int recvlen; /* number of bytes recieved */ + int sockfd; /* Initialize our socket */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ socklen_t addrlen = sizeof(cliaddr);/* length of address' */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ - /* create a UDP/IP socket */ if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -55,26 +51,22 @@ int main (int argc, char** argv) return 0; } - /* INADDR_ANY = IPaddr, socket = 11111, modify SERV_PORT to change */ memset((char *)&servaddr, 0, sizeof(servaddr)); - /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(SERV_PORT); - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("bind failed"); return 0; } - /* loop, listen for client, print received, reply to client */ - for ( ; ; ) { + for (;;) { printf("waiting for client message on port %d\n", SERV_PORT); recvlen = recvfrom(sockfd, buf, MSGLEN, 0, @@ -86,7 +78,6 @@ int main (int argc, char** argv) buf[recvlen] = 0; printf("I heard this: \"%s\"\n", buf); } - else printf("lost the connection to client\n"); From 0637cbd8c35eae6f0138b504fe7ac8f759812df2 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:07:11 -0600 Subject: [PATCH 079/103] ready for publishing --- project1/dtls_secured/server-dtls.c | 33 ++++++++++++----------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 244abb1f..24aa5887 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -58,24 +58,22 @@ void sig_handler(const int sig) void AwaitDGram() { - char ack[] = "I hear you fashizzle!\n"; - char buff[MSGLEN]; /* the incoming message */ - int listenfd = 0; /* Initialize our socket */ - int recvlen = 0; /* length of message */ - int res = 1; - int on = 1; - int connfd = 0; - + char buff[MSGLEN]; /* the incoming message */ + int listenfd = 0; /* Initialize our socket */ + int recvlen = 0; /* length of message */ + int res = 1; + int on = 1; + int connfd = 0; socklen_t len = sizeof(on); socklen_t clilen; - clilen = sizeof(cliaddr); unsigned char b[1500]; CYASSL* ssl = NULL; + char ack[] = "I hear you fashizzle!\n"; while (cleanup != 1) { /* Create a UDP/IP socket */ - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } @@ -106,9 +104,7 @@ void AwaitDGram() printf("Awaiting client connection on port %d\n", SERV_PORT); - /* set clilen to |cliaddr| */ - - + clilen = sizeof(cliaddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); @@ -132,7 +128,7 @@ void AwaitDGram() /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { + if (( ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; } @@ -184,8 +180,7 @@ int main(int argc, char** argv) /* structures for signal handling */ struct sigaction act, oact; - /* - * Define a signal handler for when the user closes the program + /* Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't * restart the call to accept() after the signal is handled. */ @@ -194,13 +189,11 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif + /* CyaSSL_Debugging_ON(); */ CyaSSL_Init(); /* Initialize CyaSSL */ /* Set ctx to DTLS 1.2 */ - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { + if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } From 59516daf1bb991d91491d0cb5f023dac50400faa Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:14:32 -0600 Subject: [PATCH 080/103] ready for publishing --- .../server-dtls-nonblocking.c | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 803137d4..19988a2e 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -69,25 +69,24 @@ void sig_handler(const int sig) void AwaitDGram() { - int listenfd = 0; /* Initialize our socket */ - int clientfd = 0; /* client connection */ - int res = 1; - int on = 1; - int len = sizeof(on); - int readWriteErr; - int recvlen; /* length of string read */ - int currTimeout = 1; - char buff[80]; /* string read from client */ + int on = 1; + int res = 1; + int recvlen; /* length of string read */ + int readWriteErr; + int listenfd = 0; /* Initialize our socket */ + int clientfd = 0; /* client connection */ + int currTimeout = 1; + int len = sizeof(on); + CYASSL* ssl = NULL; /* Initialize ssl object */ + struct sockaddr_in servaddr; /* our server's address */ + char buff[80]; /* string read from client */ char ack[] = "I hear you fashizzle\n"; - struct sockaddr_in servaddr;/* our server's address */ - /* Initialize ssl object */ - CYASSL* ssl = NULL; while (cleanup != 1) { /* Create a UDP/IP socket */ - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } @@ -182,9 +181,9 @@ void AwaitDGram() int udp_read_connect(int listenfd) { - struct sockaddr_in cliaddr; - unsigned char b[1500]; int connfd; + unsigned char b[1500]; + struct sockaddr_in cliaddr; socklen_t clilen = sizeof(cliaddr); /* ensure b is empty upon each call */ @@ -206,11 +205,11 @@ int udp_read_connect(int listenfd) void NonBlockingSSL_Accept(CYASSL* ssl) { + int select_ret; + int currTimeout = 1; int ret = CyaSSL_accept(ssl); int error = CyaSSL_get_error(ssl, 0); int listenfd = (int)CyaSSL_get_fd(ssl); - int select_ret; - int currTimeout = 1; while (cleanup != 1 && (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || @@ -252,7 +251,7 @@ void NonBlockingSSL_Accept(CYASSL* ssl) void dtls_set_nonblocking(int* listenfd) { - int flags = fcntl(*listenfd, F_GETFL, 0); + int flags = fcntl(*listenfd, F_GETFL, 0); if (flags < 0) { printf("fcntl get failed"); cleanup = 1; @@ -266,10 +265,10 @@ void dtls_set_nonblocking(int* listenfd) int dtls_select(int socketfd, int to_sec) { - fd_set recvfds, errfds; - int nfds = socketfd + 1; - struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; int result; + int nfds = socketfd + 1; + fd_set recvfds, errfds; + struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; FD_ZERO(&recvfds); FD_SET(socketfd, &recvfds); @@ -295,8 +294,7 @@ int main(int argc, char** argv) /* structures for signal handling */ struct sigaction act, oact; - /* - * Define a signal handler for when the user closes the program + /* Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't * restart the call to accept() after the signal is handled. */ From 6bf8f5d12dde256cb4e959a32a3322ac5b7d9f8a Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:15:49 -0600 Subject: [PATCH 081/103] ready for publishing --- project1/unsecure/server-udp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index 7c52b780..f6ecd985 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -37,12 +37,12 @@ int main (int argc, char** argv) { - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - int recvlen; /* number of bytes recieved */ int sockfd; /* Initialize our socket */ + int recvlen; /* number of bytes recieved */ int msgnum = 0; /* the messages we reveive in order */ char buf[MSGLEN]; /* the incoming message */ + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ socklen_t addrlen = sizeof(cliaddr);/* length of address' */ /* create a UDP/IP socket */ @@ -87,7 +87,7 @@ int main (int argc, char** argv) if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, addrlen) < 0) perror("sendto"); - + /* continues to loop, use "Ctrl+C" to terminate listening */ } } From c5ea88e69a284a1b83ce7915fc9800129c8a240e Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:19:11 -0600 Subject: [PATCH 082/103] ready for publishing --- project1/dtls_secured/server-dtls.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 24aa5887..94b6b5c8 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -41,9 +41,9 @@ CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ - struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ + void AwaitDGram(); /* Separate out Handling Datagrams */ void sig_handler(const int sig); @@ -58,22 +58,22 @@ void sig_handler(const int sig) void AwaitDGram() { - char buff[MSGLEN]; /* the incoming message */ - int listenfd = 0; /* Initialize our socket */ - int recvlen = 0; /* length of message */ - int res = 1; int on = 1; + int res = 1; int connfd = 0; - socklen_t len = sizeof(on); - socklen_t clilen; - unsigned char b[1500]; + int recvlen = 0; /* length of message */ + int listenfd = 0; /* Initialize our socket */ CYASSL* ssl = NULL; + socklen_t clilen; + socklen_t len = sizeof(on); + unsigned char b[1500]; + char buff[MSGLEN]; /* the incoming message */ char ack[] = "I hear you fashizzle!\n"; while (cleanup != 1) { /* Create a UDP/IP socket */ - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } @@ -104,7 +104,7 @@ void AwaitDGram() printf("Awaiting client connection on port %d\n", SERV_PORT); - clilen = sizeof(cliaddr); + clilen = sizeof(cliaddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); @@ -126,9 +126,8 @@ void AwaitDGram() } printf("Connected!\n"); - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx)) == NULL) { + if ((ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; } @@ -145,7 +144,7 @@ void AwaitDGram() printf("SSL_accept failed.\n"); cleanup = 1; } - if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + if ((recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { printf("heard %d bytes\n", recvlen); buff[recvlen] = 0; From f7d8207597a7e447fb128876b09b87982ab298b8 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:21:39 -0600 Subject: [PATCH 083/103] ready for publishing --- project1/dtls_secured_nonblocking/server-dtls-nonblocking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 19988a2e..38d8c8a4 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -118,7 +118,7 @@ void AwaitDGram() clientfd = udp_read_connect(listenfd); /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx) ) == NULL) { + if (( ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; } @@ -307,7 +307,7 @@ int main(int argc, char** argv) CyaSSL_Init(); /* Initialize CyaSSL */ /* Set ctx to DTLS 1.2 */ - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { + if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } From c95733309184e655fd642aabde4e9872325fb8fa Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:27:09 -0600 Subject: [PATCH 084/103] ready for publishing --- .../server-dtls-threaded.c | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 4805e01c..50067c0d 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -42,8 +42,8 @@ CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ -struct sockaddr_in servaddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ +struct sockaddr_in servaddr; /* our server's address */ void AwaitDGram(); void* ThreadControl(void*); @@ -59,16 +59,16 @@ void sig_handler(const int sig) void AwaitDGram() { - int listenfd = 0; /* Initialize our socket */ - int res = 1; - int connfd = 0; - int on = 1; + int on = 1; + int res = 1; + int connfd = 0; + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ socklen_t len = sizeof(on); - socklen_t clilen; /* length of address' */ unsigned char b[1500]; while (cleanup != 1) { - if ( (listenfd = socket(AF_INET, SOCK_DGRAM, 0) ) < 0 ) { + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { printf("Cannot create socket.\n"); cleanup = 1; break; @@ -107,7 +107,7 @@ void AwaitDGram() connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (connfd < 0){ + if (connfd < 0) { printf("No clients in que, enter idle state\n"); continue; } @@ -134,15 +134,15 @@ void* ThreadControl(void* openSock) { pthread_detach(pthread_self()); + int on = 1; + int res = 1; + int connfd = 0; + int recvlen = 0; + int listenfd = 0; + socklen_t clilen; + socklen_t len = sizeof(on); CYASSL* ssl = NULL; unsigned char b[1500]; - int connfd = 0; - int listenfd = 0; - int res = 1; - int recvlen = 0; - int on = 1; - socklen_t len = sizeof(on); - socklen_t clilen; char buff[MSGLEN]; char ack[] = "I hear you fashizzle!\n"; @@ -177,10 +177,9 @@ void* ThreadControl(void* openSock) connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliaddr, &clilen); - if (connfd < 0){ + if (connfd < 0) { printf("No clients in que, enter idle state\n"); } - else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) { @@ -250,8 +249,7 @@ int main(int argc, char** argv) { struct sigaction act, oact; /* structures for signal handling */ - /* - * Define a signal handler for when the user closes the program + /* Define a signal handler for when the user closes the program * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't * restart the call to accept() after the signal is handled. */ @@ -263,11 +261,10 @@ int main(int argc, char** argv) /* CyaSSL_Debugging_ON(); */ CyaSSL_Init(); /* Initialize CyaSSL */ - if ( (ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ + if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ fprintf(stderr, "CyaSSL_CTX_new error.\n"); exit(EXIT_FAILURE); } - printf("CTX set to DTLS 1.2\n"); if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != SSL_SUCCESS) { @@ -275,7 +272,6 @@ int main(int argc, char** argv) "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded CA certs\n"); if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { @@ -283,7 +279,6 @@ int main(int argc, char** argv) "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded server certs\n"); if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", SSL_FILETYPE_PEM) != SSL_SUCCESS) { @@ -291,7 +286,6 @@ int main(int argc, char** argv) "please check the file.\n"); exit(EXIT_FAILURE); } - printf("Loaded server keys\n"); AwaitDGram(); if (cleanup == 1) { From 51d432281fd9f3fcfde0a53b91736b5661be1a0b Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:42:36 -0600 Subject: [PATCH 085/103] ready for publishing --- project1/dtls_secured/server-dtls.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 94b6b5c8..cc770dd2 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -61,13 +61,13 @@ void AwaitDGram() int on = 1; int res = 1; int connfd = 0; - int recvlen = 0; /* length of message */ - int listenfd = 0; /* Initialize our socket */ + int recvlen = 0; /* length of message */ + int listenfd = 0; /* Initialize our socket */ CYASSL* ssl = NULL; socklen_t clilen; socklen_t len = sizeof(on); - unsigned char b[1500]; - char buff[MSGLEN]; /* the incoming message */ + unsigned char b[1500]; /* watch for incoming messages */ + char buff[MSGLEN]; /* the incoming message */ char ack[] = "I hear you fashizzle!\n"; while (cleanup != 1) { @@ -189,7 +189,9 @@ int main(int argc, char** argv) sigaction(SIGINT, &act, &oact); /* CyaSSL_Debugging_ON(); */ - CyaSSL_Init(); /* Initialize CyaSSL */ + + /* Initialize CyaSSL */ + CyaSSL_Init(); /* Set ctx to DTLS 1.2 */ if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { From 9a19a43e8a601237ab5c4ddb7603bb8bd62a95fc Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:45:11 -0600 Subject: [PATCH 086/103] ready for publishing --- .../dtls_secured_multithreaded/server-dtls-threaded.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 50067c0d..71ffef0e 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -62,8 +62,8 @@ void AwaitDGram() int on = 1; int res = 1; int connfd = 0; - int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ + int listenfd = 0; /* Initialize our socket */ + socklen_t clilen; /* length of address' */ socklen_t len = sizeof(on); unsigned char b[1500]; @@ -259,7 +259,9 @@ int main(int argc, char** argv) sigaction(SIGINT, &act, &oact); /* CyaSSL_Debugging_ON(); */ - CyaSSL_Init(); /* Initialize CyaSSL */ + + /* Initialize CyaSSL */ + CyaSSL_Init(); if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ fprintf(stderr, "CyaSSL_CTX_new error.\n"); From d14c8511bb03149473ea5a19097fa0f4ce7965de Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 5 Jun 2014 15:48:08 -0600 Subject: [PATCH 087/103] ready for publishing --- .../server-dtls-nonblocking.c | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 38d8c8a4..2d11b33e 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -71,15 +71,15 @@ void AwaitDGram() { int on = 1; int res = 1; - int recvlen; /* length of string read */ + int recvlen; /* length of string read */ int readWriteErr; - int listenfd = 0; /* Initialize our socket */ - int clientfd = 0; /* client connection */ + int listenfd = 0; /* Initialize our socket */ + int clientfd = 0; /* client connection */ int currTimeout = 1; int len = sizeof(on); - CYASSL* ssl = NULL; /* Initialize ssl object */ - struct sockaddr_in servaddr; /* our server's address */ - char buff[80]; /* string read from client */ + CYASSL* ssl = NULL; /* Initialize ssl object */ + struct sockaddr_in servaddr; /* our server's address */ + char buff[80]; /* string read from client */ char ack[] = "I hear you fashizzle\n"; @@ -215,8 +215,8 @@ void NonBlockingSSL_Accept(CYASSL* ssl) (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE))) { if (cleanup == 1) { - CyaSSL_free(ssl); //added - CyaSSL_shutdown(ssl); //added + CyaSSL_free(ssl); + CyaSSL_shutdown(ssl); break; } @@ -303,8 +303,10 @@ int main(int argc, char** argv) act.sa_flags = 0; sigaction(SIGINT, &act, &oact); - //CyaSSL_Debugging_ON(); - CyaSSL_Init(); /* Initialize CyaSSL */ + /* CyaSSL_Debugging_ON(); */ + + /* Initialize CyaSSL */ + CyaSSL_Init(); /* Set ctx to DTLS 1.2 */ if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { From d769b8711b2020cb0d2cd9a62c05c8f4a24eeff6 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 10:07:21 -0600 Subject: [PATCH 088/103] write modifications --- project1/unsecure/server-udp.c | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index f6ecd985..c3eff46f 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -24,26 +24,26 @@ * Bare-bones example of a UDP server for instructional/learning purposes. */ -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ #include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ #include -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 80 /* limit incoming message size */ int main (int argc, char** argv) { - int sockfd; /* Initialize our socket */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - socklen_t addrlen = sizeof(cliaddr);/* length of address' */ + int sockfd; /* Initialize our socket */ + int recvlen; /* number of bytes recieved */ + int msgnum = 0; /* the messages we reveive in order */ + char buf[MSGLEN]; /* the incoming message */ + struct sockaddr_in servaddr; /* our server's address */ + struct sockaddr_in cliaddr; /* the client's address */ + socklen_t cliaddrlen = sizeof(cliaddr); /* length of address' */ /* create a UDP/IP socket */ if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -56,9 +56,9 @@ int main (int argc, char** argv) /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; + servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servaddr.sin_port = htons(SERV_PORT); if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("bind failed"); @@ -70,7 +70,7 @@ int main (int argc, char** argv) printf("waiting for client message on port %d\n", SERV_PORT); recvlen = recvfrom(sockfd, buf, MSGLEN, 0, - (struct sockaddr *)&cliaddr, &addrlen); + (struct sockaddr *)&cliaddr, &cliaddrlen); printf("heard %d bytes\n", recvlen); @@ -85,8 +85,8 @@ int main (int argc, char** argv) printf("reply sent \"%s\"\n", buf); if (sendto(sockfd, buf, strlen(buf), 0, - (struct sockaddr *)&cliaddr, addrlen) < 0) - perror("sendto"); + (struct sockaddr *)&cliaddr, cliaddrlen) < 0) + printf("sendto"); /* continues to loop, use "Ctrl+C" to terminate listening */ } From 7c28f86855407c2e694b8c39e06a9771b720df9a Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 10:11:04 -0600 Subject: [PATCH 089/103] updating --- project1/unsecure/server-udp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index c3eff46f..1e5f868a 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -85,9 +85,12 @@ int main (int argc, char** argv) printf("reply sent \"%s\"\n", buf); if (sendto(sockfd, buf, strlen(buf), 0, - (struct sockaddr *)&cliaddr, cliaddrlen) < 0) + (struct sockaddr *)&cliaddr, cliaddrlen) < 0) { printf("sendto"); + return 1; + } /* continues to loop, use "Ctrl+C" to terminate listening */ } + return 0; } From e649fcb20a5ba5adff9d49e189f695a6becd18ee Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 10:13:13 -0600 Subject: [PATCH 090/103] updating --- project1/unsecure/server-udp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index 1e5f868a..be105dc6 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -86,10 +86,9 @@ int main (int argc, char** argv) if (sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr *)&cliaddr, cliaddrlen) < 0) { - printf("sendto"); + printf("\"sendto\" failed.\n"); return 1; } - /* continues to loop, use "Ctrl+C" to terminate listening */ } return 0; From a4d32eea720406bd3c025edd62b781fbff3ba316 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 10:16:43 -0600 Subject: [PATCH 091/103] updating --- project1/unsecure/server-udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index be105dc6..dbc7d580 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -81,7 +81,7 @@ int main (int argc, char** argv) else printf("lost the connection to client\n"); - sprintf(buf, "Message #%d received\n", msgnum++); + printf(buf, "Message #%d received\n", msgnum++); printf("reply sent \"%s\"\n", buf); if (sendto(sockfd, buf, strlen(buf), 0, @@ -93,3 +93,4 @@ int main (int argc, char** argv) } return 0; } + From 40bc5bbfc5c0f3a281d11a157473570cf4d5d674 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 10:41:39 -0600 Subject: [PATCH 092/103] coding standards changes --- project1/unsecure/server-udp.c | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c index dbc7d580..6fe14b13 100644 --- a/project1/unsecure/server-udp.c +++ b/project1/unsecure/server-udp.c @@ -33,17 +33,17 @@ #include #define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 80 /* limit incoming message size */ +#define MSGLEN 4096 /* limit incoming message size */ int main (int argc, char** argv) { - int sockfd; /* Initialize our socket */ - int recvlen; /* number of bytes recieved */ - int msgnum = 0; /* the messages we reveive in order */ - char buf[MSGLEN]; /* the incoming message */ - struct sockaddr_in servaddr; /* our server's address */ - struct sockaddr_in cliaddr; /* the client's address */ - socklen_t cliaddrlen = sizeof(cliaddr); /* length of address' */ + int sockfd; /* Initialize our socket */ + int recvLen; /* number of bytes recieved */ + int msgNum = 0; /* number of msg received */ + unsigned char buf[MSGLEN]; /* the incoming message */ + struct sockaddr_in servAddr; /* our server's address */ + struct sockaddr_in cliAddr; /* the client's address */ + socklen_t cliAddrLen = sizeof(cliAddr); /* length of address' */ /* create a UDP/IP socket */ if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -51,41 +51,41 @@ int main (int argc, char** argv) return 0; } - /* INADDR_ANY = IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); - if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + if (bind(sockfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { perror("bind failed"); return 0; } /* loop, listen for client, print received, reply to client */ for (;;) { + memset(buf, 0, sizeof(buf)); printf("waiting for client message on port %d\n", SERV_PORT); - recvlen = recvfrom(sockfd, buf, MSGLEN, 0, - (struct sockaddr *)&cliaddr, &cliaddrlen); + recvLen = recvfrom(sockfd, buf, MSGLEN, 0, + (struct sockaddr *)&cliAddr, &cliAddrLen); - printf("heard %d bytes\n", recvlen); + printf("heard %d bytes\n", recvLen); - if (recvlen > 0) { - buf[recvlen] = 0; + if (recvLen > 0) { + buf[recvLen] = 0; printf("I heard this: \"%s\"\n", buf); } else printf("lost the connection to client\n"); - printf(buf, "Message #%d received\n", msgnum++); + printf("Message #%d received\n", msgNum++); printf("reply sent \"%s\"\n", buf); - if (sendto(sockfd, buf, strlen(buf), 0, - (struct sockaddr *)&cliaddr, cliaddrlen) < 0) { + if (sendto(sockfd, buf, sizeof(buf), 0, + (struct sockaddr *)&cliAddr, cliAddrLen) < 0) { printf("\"sendto\" failed.\n"); return 1; } From 871f1ec546deb69014cc6881174a2a1b5ffa3c1d Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 12:17:29 -0600 Subject: [PATCH 093/103] pthread_join working better --- project1/dtls_secured_multithreaded/server-dtls-threaded.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 71ffef0e..5f44325f 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -24,6 +24,7 @@ * Utilizes DTLS 1.2. and multi-threading */ + #include /* standard in/out procedures */ #include /* defines system calls */ #include /* necessary for memset */ @@ -65,7 +66,8 @@ void AwaitDGram() int listenfd = 0; /* Initialize our socket */ socklen_t clilen; /* length of address' */ socklen_t len = sizeof(on); - unsigned char b[1500]; + unsigned char b[1500]; + void* dummy = NULL; while (cleanup != 1) { if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -119,6 +121,7 @@ void AwaitDGram() ThreadControl, (void *)&connfd) < 0) { printf("pthread_create failed.\n"); } + pthread_join(pthread_self(), dummy); printf("Connection being re-routed to Thread Control.\n"); } else { @@ -126,7 +129,6 @@ void AwaitDGram() cleanup = 1; } sleep(1); - continue; } } From 1e3f58f9355ac21b47eb952a8d6dd37b77bd3635 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 15:18:34 -0600 Subject: [PATCH 094/103] updating --- project1/dtls_secured/server-dtls.c | 61 +++++++++++++++-------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index cc770dd2..34c882cc 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -41,7 +41,7 @@ CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ -struct sockaddr_in servaddr; /* our server's address */ +struct sockaddr_in servAddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ void AwaitDGram(); /* Separate out Handling Datagrams */ @@ -58,35 +58,34 @@ void sig_handler(const int sig) void AwaitDGram() { - int on = 1; - int res = 1; - int connfd = 0; - int recvlen = 0; /* length of message */ - int listenfd = 0; /* Initialize our socket */ - CYASSL* ssl = NULL; - socklen_t clilen; - socklen_t len = sizeof(on); - unsigned char b[1500]; /* watch for incoming messages */ - char buff[MSGLEN]; /* the incoming message */ - char ack[] = "I hear you fashizzle!\n"; + int on = 1; + int res = 1; + int connfd = 0; + int recvLen = 0; /* length of message */ + int listenfd = 0; /* Initialize our socket */ + CYASSL* ssl = NULL; + socklen_t cliLen; + socklen_t len = sizeof(on); + unsigned char b[MSGLEN]; /* watch for incoming messages */ + char buff[MSGLEN]; /* the incoming message */ + char ack[] = "I hear you fashizzle!\n"; while (cleanup != 1) { - /* Create a UDP/IP socket */ if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; } - printf("Socket allocated\n"); + printf("Socket all/ocated\n"); - /* clear servaddr each loop */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + /* clear servAddr each loop */ + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); @@ -97,16 +96,16 @@ void AwaitDGram() /*Bind Socket*/ if (bind(listenfd, - (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); - clilen = sizeof(cliaddr); + cliLen = sizeof(cliaddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); + (struct sockaddr*)&cliaddr, &cliLen); if (connfd < 0) { printf("No clients in que, enter idle state\n"); @@ -131,26 +130,30 @@ void AwaitDGram() printf("CyaSSL_new error.\n"); cleanup = 1; } - + /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); - + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + printf("Not SSL_SUCCESS.\n"); int err = CyaSSL_get_error(ssl, 0); + printf("err set.\n"); char buffer[80]; + printf("buffer initialized.\n"); printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); buffer[sizeof(buffer)-1]= 0; printf("SSL_accept failed.\n"); - cleanup = 1; + continue; } - if ((recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - printf("heard %d bytes\n", recvlen); - buff[recvlen] = 0; + if ((recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + printf("heard %d bytes\n", recvLen); + + buff[recvLen] = 0; printf("I heard this: \"%s\"\n", buff); } - if (recvlen < 0) { + if (recvLen < 0) { int readErr = CyaSSL_get_error(ssl, 0); if(readErr != SSL_ERROR_WANT_READ) { printf("SSL_read failed.\n"); From d662624576e52175cbe14cba5813c7409fde18e0 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 17:08:02 -0600 Subject: [PATCH 095/103] updating standards --- .../server-dtls-threaded.c | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 5f44325f..ba458433 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -43,8 +43,8 @@ CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ -struct sockaddr_in cliaddr; /* the client's address */ -struct sockaddr_in servaddr; /* our server's address */ +struct sockaddr_in cliAddr; /* the client's address */ +struct sockaddr_in servAddr; /* our server's address */ void AwaitDGram(); void* ThreadControl(void*); @@ -60,14 +60,14 @@ void sig_handler(const int sig) void AwaitDGram() { - int on = 1; - int res = 1; - int connfd = 0; + int on = 1; + int res = 1; + int connfd = 0; int listenfd = 0; /* Initialize our socket */ - socklen_t clilen; /* length of address' */ - socklen_t len = sizeof(on); - unsigned char b[1500]; - void* dummy = NULL; + socklen_t cliLen; /* length of address' */ + socklen_t len = sizeof(on); + unsigned char b[MSGLEN]; + void* dummy = NULL; while (cleanup != 1) { if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -78,13 +78,13 @@ void AwaitDGram() printf("Socket allocated\n"); /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); @@ -95,8 +95,8 @@ void AwaitDGram() } /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, - sizeof(servaddr)) < 0) { + if (bind(listenfd, (struct sockaddr *)&servAddr, + sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; break; @@ -104,10 +104,10 @@ void AwaitDGram() printf("Socket bind complete\n"); printf("Awaiting client connection on port %d\n", SERV_PORT); - /* set clilen to |cliaddr| */ - clilen = sizeof(cliaddr); + /* set cliLen to |cliAddr| */ + cliLen = sizeof(cliAddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); + (struct sockaddr*)&cliAddr, &cliLen); if (connfd < 0) { printf("No clients in que, enter idle state\n"); @@ -136,17 +136,18 @@ void* ThreadControl(void* openSock) { pthread_detach(pthread_self()); - int on = 1; - int res = 1; - int connfd = 0; - int recvlen = 0; - int listenfd = 0; - socklen_t clilen; - socklen_t len = sizeof(on); - CYASSL* ssl = NULL; - unsigned char b[1500]; - char buff[MSGLEN]; - char ack[] = "I hear you fashizzle!\n"; + int on = 1; + int res = 1; + int connfd = 0; + int recvlen = 0; + int listenfd = 0; + socklen_t cliLen; + socklen_t len = sizeof(on); + CYASSL* ssl = NULL; + unsigned char b[MSGLEN]; + char buff[MSGLEN]; + char ack[] = "I hear you fashizzle!\n"; + void* dummy; if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); @@ -154,13 +155,13 @@ void* ThreadControl(void* openSock) } /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servaddr, 0, sizeof(servaddr)); + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); @@ -170,21 +171,21 @@ void* ThreadControl(void* openSock) } /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + if (bind(listenfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; } - clilen = sizeof(cliaddr); + cliLen = sizeof(cliAddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); + (struct sockaddr*)&cliAddr, &cliLen); if (connfd < 0) { printf("No clients in que, enter idle state\n"); } else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) { + if (connect(listenfd, (const struct sockaddr *)&cliAddr, + sizeof(cliAddr)) != 0) { printf("Udp connect failed.\n"); cleanup = 1; } @@ -243,8 +244,7 @@ void* ThreadControl(void* openSock) CyaSSL_free(ssl); printf("Returning to idle state\n"); - int dummy; - pthread_exit((void*)&dummy); + pthread_exit(&dummy); } int main(int argc, char** argv) From d3d5e95ec985287f19cf8adc2e91b7bee18d402c Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Tue, 10 Jun 2014 17:08:44 -0600 Subject: [PATCH 096/103] updating standards --- .../server-dtls-nonblocking.c | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 2d11b33e..7a81dcbb 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -45,9 +45,9 @@ CYASSL_CTX* ctx; void AwaitDGram(); /* Separate out Handling Datagrams */ void sig_handler(const int sig); /* handles ctrl+c termination */ -int udp_read_connect(int); /* broken out to improve readability */ void NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ void dtls_set_nonblocking(int*); /* set the socket non-blocking */ +int udp_read_connect(int); /* broken out to improve readability */ int dtls_select(); /* costumes for select_ret to wear */ @@ -69,18 +69,18 @@ void sig_handler(const int sig) void AwaitDGram() { - int on = 1; - int res = 1; - int recvlen; /* length of string read */ - int readWriteErr; - int listenfd = 0; /* Initialize our socket */ - int clientfd = 0; /* client connection */ - int currTimeout = 1; - int len = sizeof(on); - CYASSL* ssl = NULL; /* Initialize ssl object */ - struct sockaddr_in servaddr; /* our server's address */ - char buff[80]; /* string read from client */ - char ack[] = "I hear you fashizzle\n"; + int on = 1; + int res = 1; + int recvLen; /* length of string read */ + int readWriteErr; + int listenfd = 0; /* Initialize our socket */ + int clientfd = 0; /* client connection */ + int currTimeout = 1; + int len = sizeof(on); + char buff[MSGLEN]; /* string read from client */ + CYASSL* ssl = NULL; /* Initialize ssl object */ + struct sockaddr_in servAddr; /* our server's address */ + char ack[] = "I hear you fashizzle\n"; while (cleanup != 1) { @@ -90,15 +90,15 @@ void AwaitDGram() printf("Cannot create socket.\n"); cleanup = 1; } - + printf("Socket allocated\n"); - memset((char *)&servaddr, 0, sizeof(servaddr)); +// memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); - servaddr.sin_port = htons(SERV_PORT); + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); @@ -109,13 +109,15 @@ void AwaitDGram() /*Bind Socket*/ if (bind(listenfd, - (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { + (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); + clientfd = udp_read_connect(listenfd); + dtls_set_nonblocking(&clientfd); /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx)) == NULL) { @@ -123,19 +125,17 @@ void AwaitDGram() cleanup = 1; } - /* set clilen to |cliaddr| */ + /* set clilen to |cliAddr| */ printf("Connected!\n"); /* set the/ session ssl to client connection port */ CyaSSL_set_fd(ssl, clientfd); CyaSSL_set_using_nonblock(ssl, 1); - dtls_set_nonblocking(&clientfd); NonBlockingSSL_Accept(ssl); /* Begin: Reply to the client */ - buff[sizeof(buff)-1] = 0; - recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); + recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); currTimeout = CyaSSL_dtls_get_current_timeout(ssl); @@ -145,20 +145,20 @@ void AwaitDGram() memset(buff, 0, sizeof(buff)); break; } - if (recvlen < 0) { + if (recvLen < 0) { readWriteErr = CyaSSL_get_error(ssl, 0); if (readWriteErr != SSL_ERROR_WANT_READ) { printf("Read Error, error was: %d.\n", readWriteErr); cleanup = 1; } else { - recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1); + recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } } - } while (readWriteErr == SSL_ERROR_WANT_READ && recvlen < 0 && + } while (readWriteErr == SSL_ERROR_WANT_READ && recvLen < 0 && currTimeout >= 0 && cleanup != 1); - if (recvlen > 0) { - buff[recvlen] = 0; + if (recvLen > 0) { + buff[recvLen] = 0; printf("I heard this:\"%s\"\n", buff); } else { @@ -183,17 +183,17 @@ int udp_read_connect(int listenfd) { int connfd; unsigned char b[1500]; - struct sockaddr_in cliaddr; - socklen_t clilen = sizeof(cliaddr); + struct sockaddr_in cliAddr; + socklen_t clilen = sizeof(cliAddr); /* ensure b is empty upon each call */ memset(b, 0, sizeof(b)); connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &clilen); + (struct sockaddr*)&cliAddr, &clilen); if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr*)&cliaddr, - sizeof(cliaddr)) != 0) { + if (connect(listenfd, (const struct sockaddr*)&cliAddr, + sizeof(cliAddr)) != 0) { printf("udp connect failed.\n"); } } @@ -263,12 +263,12 @@ void dtls_set_nonblocking(int* listenfd) } } -int dtls_select(int socketfd, int to_sec) +int dtls_select(int socketfd, int toSec) { int result; int nfds = socketfd + 1; fd_set recvfds, errfds; - struct timeval timeout = { (to_sec > 0) ? to_sec : 0, 0}; + struct timeval timeout = { (toSec > 0) ? toSec : 0, 0}; FD_ZERO(&recvfds); FD_SET(socketfd, &recvfds); From 351d539a5b7eb51d26aaf47b7d85b8c8053ea326 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 11 Jun 2014 11:52:39 -0600 Subject: [PATCH 097/103] coding standards updates --- project1/dtls_secured/server-dtls.c | 98 +++++++-------- .../server-dtls-threaded.c | 117 ++++++++---------- .../server-dtls-nonblocking.c | 77 +++++------- 3 files changed, 130 insertions(+), 162 deletions(-) diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c index 34c882cc..4ef910e3 100644 --- a/project1/dtls_secured/server-dtls.c +++ b/project1/dtls_secured/server-dtls.c @@ -39,24 +39,14 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -CYASSL_CTX* ctx; static int cleanup; /* To handle shutdown */ struct sockaddr_in servAddr; /* our server's address */ struct sockaddr_in cliaddr; /* the client's address */ -void AwaitDGram(); /* Separate out Handling Datagrams */ -void sig_handler(const int sig); +int AwaitDGram(CYASSL_CTX* ctx); /* Separate out Handling Datagrams */ +void CleanUp(); -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - exit(0); -} - -void AwaitDGram() +int AwaitDGram(CYASSL_CTX* ctx) { int on = 1; int res = 1; @@ -92,6 +82,7 @@ void AwaitDGram() if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); cleanup = 1; + return 1; } /*Bind Socket*/ @@ -99,6 +90,7 @@ void AwaitDGram() (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; + return 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); @@ -111,17 +103,18 @@ void AwaitDGram() printf("No clients in que, enter idle state\n"); continue; } - else if (connfd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliaddr, sizeof(cliaddr)) != 0) { printf("Udp connect failed.\n"); cleanup = 1; + return 1; } } else { printf("Recvfrom failed.\n"); cleanup = 1; + return 1; } printf("Connected!\n"); @@ -129,42 +122,41 @@ void AwaitDGram() if ((ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; + return 1; } /* set the session ssl to client connection port */ CyaSSL_set_fd(ssl, listenfd); if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - printf("Not SSL_SUCCESS.\n"); - int err = CyaSSL_get_error(ssl, 0); - printf("err set.\n"); - char buffer[80]; - printf("buffer initialized.\n"); - printf("error = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); - buffer[sizeof(buffer)-1]= 0; + + int e = CyaSSL_get_error(ssl, 0); + + printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); printf("SSL_accept failed.\n"); continue; } - if ((recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { printf("heard %d bytes\n", recvLen); buff[recvLen] = 0; printf("I heard this: \"%s\"\n", buff); } - if (recvLen < 0) { + else if (recvLen < 0) { int readErr = CyaSSL_get_error(ssl, 0); if(readErr != SSL_ERROR_WANT_READ) { printf("SSL_read failed.\n"); cleanup = 1; + return 1; } } if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { printf("CyaSSL_write fail.\n"); cleanup = 1; - } else { - printf("lost the connection to client\n"); + return 1; + } + else { + printf("Sending reply.\n"); } printf("reply sent \"%s\"\n", ack); @@ -175,22 +167,19 @@ void AwaitDGram() printf("Client left return to idle state\n"); } + return 0; } int main(int argc, char** argv) { - /* structures for signal handling */ - struct sigaction act, oact; - - /* Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - + /* cont short for "continue?", Loc short for "location" */ + int cont = 0; + char caCertLoc[] = "../certs/ca-cert.pem"; + char servCertLoc[] = "../certs/server-cert.pem"; + char servKeyLoc[] = "../certs/server-key.pem"; + CYASSL_CTX* ctx; + + /* "./config --enable-debug" and uncomment next line for debugging */ /* CyaSSL_Debugging_ON(); */ /* Initialize CyaSSL */ @@ -198,35 +187,34 @@ int main(int argc, char** argv) /* Set ctx to DTLS 1.2 */ if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); + printf("CyaSSL_CTX_new error.\n"); + return 1; } /* Load CA certificates */ - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", caCertLoc); + return 1; } /* Load server certificates */ - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != + SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", servCertLoc); + return 1; } /* Load server Keys */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", servKeyLoc); + return 1; } - AwaitDGram(); - if (cleanup == 1) { + cont = AwaitDGram(ctx); + + if (cont == 1) { CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); } + return 0; } diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index ba458433..bd753647 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -41,44 +41,39 @@ #define SERV_PORT 11111 /* define our server port number */ #define MSGLEN 4096 -CYASSL_CTX* ctx; -static int cleanup; /* To handle shutdown */ +CYASSL_CTX* ctx; /* must be global for ThreadControl */ +static int cleanup; /* To handle shutdown */ struct sockaddr_in cliAddr; /* the client's address */ struct sockaddr_in servAddr; /* our server's address */ -void AwaitDGram(); +int AwaitDGram(CYASSL_CTX* ctx); void* ThreadControl(void*); -void sig_handler(const int sig) +int AwaitDGram(CYASSL_CTX* ctx) { - printf("\nSIGINT handled.\n"); - cleanup = 1; - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - exit(0); -} - -void AwaitDGram() -{ - int on = 1; - int res = 1; - int connfd = 0; - int listenfd = 0; /* Initialize our socket */ - socklen_t cliLen; /* length of address' */ - socklen_t len = sizeof(on); - unsigned char b[MSGLEN]; - void* dummy = NULL; while (cleanup != 1) { + int on = 1; + int res = 1; + int connfd = 0; + int listenfd = 0; /* Initialize our socket */ + socklen_t cliLen = 0; /* length of address' */ + socklen_t len = sizeof(on); + unsigned char b[MSGLEN]; + void* dummy = NULL; + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { printf("Cannot create socket.\n"); cleanup = 1; - break; + return 1; } + printf("Socket allocated\n"); /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ memset((char *)&servAddr, 0, sizeof(servAddr)); + memset((char *)&cliAddr, 0, sizeof(cliAddr)); + memset(&b, 0, MSGLEN); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ @@ -91,7 +86,7 @@ void AwaitDGram() if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); cleanup = 1; - break; + return 1; } /*Bind Socket*/ @@ -99,7 +94,7 @@ void AwaitDGram() sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; - break; + return 1; } printf("Socket bind complete\n"); printf("Awaiting client connection on port %d\n", SERV_PORT); @@ -121,15 +116,15 @@ void AwaitDGram() ThreadControl, (void *)&connfd) < 0) { printf("pthread_create failed.\n"); } - pthread_join(pthread_self(), dummy); printf("Connection being re-routed to Thread Control.\n"); } else { printf("Recvfrom failed.\n"); cleanup = 1; } - sleep(1); + pthread_join(pthread_self(), dummy); } + return 0; } void* ThreadControl(void* openSock) @@ -176,7 +171,7 @@ void* ThreadControl(void* openSock) cleanup = 1; } - cliLen = sizeof(cliAddr); + cliLen = sizeof(cliAddr); connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliAddr, &cliLen); @@ -207,10 +202,8 @@ void* ThreadControl(void* openSock) CyaSSL_set_fd(ssl, listenfd); if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int err = CyaSSL_get_error(ssl, 0); - char buffer[80]; - printf("error = %d, %s\n", err, CyaSSL_ERR_error_string(err, buffer)); - buffer[sizeof(buffer)-1] = 0; + int e = CyaSSL_get_error(ssl, 0); + printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); printf("SSL_accept failed.\n"); cleanup = 1; } @@ -249,52 +242,48 @@ void* ThreadControl(void* openSock) int main(int argc, char** argv) { - struct sigaction act, oact; /* structures for signal handling */ - - /* Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); + /* cont short for "continue?", Loc short for "location" */ + int cont = 0; + char caCertLoc[] = "../certs/ca-cert.pem"; + char servCertLoc[] = "../certs/server-cert.pem"; + char servKeyLoc[] = "../certs/server-key.pem"; + /* "./config --enable-debug" and uncomment next line for debugging */ /* CyaSSL_Debugging_ON(); */ /* Initialize CyaSSL */ CyaSSL_Init(); - if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL){ - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); + /* Set ctx to DTLS 1.2 */ + if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { + printf("CyaSSL_CTX_new error.\n"); + return 1; } - - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + /* Load CA certificates */ + if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", caCertLoc); + return 1; } - - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", + /* Load server certificates */ + if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != + SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", servCertLoc); + return 1; + } + /* Load server Keys */ + if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", servKeyLoc); + return 1; } - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); - } + cont = AwaitDGram(ctx); - AwaitDGram(); - if (cleanup == 1) { - CyaSSL_Cleanup(); + if (cont == 1) { CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); } - return(0); + + return 0; } diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index 7a81dcbb..c0776abc 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -41,12 +41,10 @@ #define MSGLEN 4096 static int cleanup; /* To handle shutdown */ -CYASSL_CTX* ctx; -void AwaitDGram(); /* Separate out Handling Datagrams */ -void sig_handler(const int sig); /* handles ctrl+c termination */ void NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ void dtls_set_nonblocking(int*); /* set the socket non-blocking */ +int AwaitDGram(CYASSL_CTX* ctx); /* Separate out Handling Datagrams */ int udp_read_connect(int); /* broken out to improve readability */ int dtls_select(); @@ -58,16 +56,7 @@ enum { TEST_ERROR_READY }; -void sig_handler(const int sig) -{ - printf("\nSIGINT handled.\n"); - cleanup = 1; - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - exit(0); -} - -void AwaitDGram() +int AwaitDGram(CYASSL_CTX* ctx) { int on = 1; int res = 1; @@ -89,10 +78,11 @@ void AwaitDGram() if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; + return 1; } printf("Socket allocated\n"); -// memset((char *)&servAddr, 0, sizeof(servAddr)); + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ @@ -105,6 +95,7 @@ void AwaitDGram() if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); cleanup = 1; + return 1; } /*Bind Socket*/ @@ -112,6 +103,7 @@ void AwaitDGram() (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; + return 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); @@ -123,6 +115,7 @@ void AwaitDGram() if (( ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); cleanup = 1; + return 1; } /* set clilen to |cliAddr| */ @@ -150,6 +143,7 @@ void AwaitDGram() if (readWriteErr != SSL_ERROR_WANT_READ) { printf("Read Error, error was: %d.\n", readWriteErr); cleanup = 1; + return 1; } else { recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } @@ -168,6 +162,7 @@ void AwaitDGram() if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { printf("Write error.\n"); cleanup = 1; + return 1; } printf("Reply sent:\"%s\"\n", ack); @@ -177,6 +172,7 @@ void AwaitDGram() /* End: Reply to the Client */ } + return 0; } int udp_read_connect(int listenfd) @@ -291,18 +287,14 @@ int dtls_select(int socketfd, int toSec) int main(int argc, char** argv) { - /* structures for signal handling */ - struct sigaction act, oact; - - /* Define a signal handler for when the user closes the program - * with Ctrl-C. Also, turn off SA_RESTART so that the OS doesn't - * restart the call to accept() after the signal is handled. - */ - act.sa_handler = sig_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGINT, &act, &oact); - + /* cont short for "continue?", Loc short for "location" */ + int cont = 0; + char caCertLoc[] = "../certs/ca-cert.pem"; + char servCertLoc[] = "../certs/server-cert.pem"; + char servKeyLoc[] = "../certs/server-key.pem"; + CYASSL_CTX* ctx; + + /* "./config --enable-debug" and uncomment next line for debugging */ /* CyaSSL_Debugging_ON(); */ /* Initialize CyaSSL */ @@ -310,35 +302,34 @@ int main(int argc, char** argv) /* Set ctx to DTLS 1.2 */ if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { - fprintf(stderr, "CyaSSL_CTX_new error.\n"); - exit(EXIT_FAILURE); + printf("CyaSSL_CTX_new error.\n"); + return 1; } /* Load CA certificates */ - if (CyaSSL_CTX_load_verify_locations(ctx,"../certs/ca-cert.pem",0) != + if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/ca-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", caCertLoc); + return 1; } /* Load server certificates */ - if (CyaSSL_CTX_use_certificate_file(ctx,"../certs/server-cert.pem", - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-cert.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != + SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", servCertLoc); + return 1; } /* Load server Keys */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx,"../certs/server-key.pem", + if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, SSL_FILETYPE_PEM) != SSL_SUCCESS) { - fprintf(stderr, "Error loading ../certs/server-key.pem, " - "please check the file.\n"); - exit(EXIT_FAILURE); + printf("Error loading %s, please check the file.\n", servKeyLoc); + return 1; } - AwaitDGram(); - if (cleanup == 1) { + cont = AwaitDGram(ctx); + + if (cont == 1) { CyaSSL_CTX_free(ctx); CyaSSL_Cleanup(); } + return 0; } From b565ee54dc22b1d155ccd094dcb2a42772b1a176 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Wed, 11 Jun 2014 14:45:20 -0600 Subject: [PATCH 098/103] code review corrections implemented --- .../server-dtls-threaded.c | 28 ++++--- .../server-dtls-nonblocking.c | 82 +++++++++++-------- 2 files changed, 61 insertions(+), 49 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index bd753647..9c01b247 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -43,24 +43,23 @@ CYASSL_CTX* ctx; /* must be global for ThreadControl */ static int cleanup; /* To handle shutdown */ -struct sockaddr_in cliAddr; /* the client's address */ -struct sockaddr_in servAddr; /* our server's address */ int AwaitDGram(CYASSL_CTX* ctx); void* ThreadControl(void*); int AwaitDGram(CYASSL_CTX* ctx) { - while (cleanup != 1) { int on = 1; int res = 1; - int connfd = 0; + int bytesRcvd = 0; int listenfd = 0; /* Initialize our socket */ socklen_t cliLen = 0; /* length of address' */ socklen_t len = sizeof(on); unsigned char b[MSGLEN]; void* dummy = NULL; + struct sockaddr_in cliAddr; /* the client's address */ + struct sockaddr_in servAddr; /* our server's address */ if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { printf("Cannot create socket.\n"); @@ -73,7 +72,7 @@ int AwaitDGram(CYASSL_CTX* ctx) /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ memset((char *)&servAddr, 0, sizeof(servAddr)); memset((char *)&cliAddr, 0, sizeof(cliAddr)); - memset(&b, 0, MSGLEN); + // memset(&b, 0, MSGLEN); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ @@ -101,19 +100,19 @@ int AwaitDGram(CYASSL_CTX* ctx) /* set cliLen to |cliAddr| */ cliLen = sizeof(cliAddr); - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + bytesRcvd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliAddr, &cliLen); - if (connfd < 0) { + if (bytesRcvd < 0) { printf("No clients in que, enter idle state\n"); continue; } - else if (connfd > 0) { + else if (bytesRcvd > 0) { /* create a new thread ID */ pthread_t threadID; /* use ID to spawn a unique thread */ if (pthread_create(&threadID, NULL, - ThreadControl, (void *)&connfd) < 0) { + ThreadControl, (void *)&bytesRcvd) < 0) { printf("pthread_create failed.\n"); } printf("Connection being re-routed to Thread Control.\n"); @@ -133,7 +132,7 @@ void* ThreadControl(void* openSock) int on = 1; int res = 1; - int connfd = 0; + int bytesRcvd = 0; int recvlen = 0; int listenfd = 0; socklen_t cliLen; @@ -143,6 +142,8 @@ void* ThreadControl(void* openSock) char buff[MSGLEN]; char ack[] = "I hear you fashizzle!\n"; void* dummy; + struct sockaddr_in cliAddr; /* the client's address */ + struct sockaddr_in servAddr; /* our server's address */ if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); @@ -151,6 +152,7 @@ void* ThreadControl(void* openSock) /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ memset((char *)&servAddr, 0, sizeof(servAddr)); + memset((char *)&servAddr, 0, sizeof(servAddr)); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ @@ -172,13 +174,13 @@ void* ThreadControl(void* openSock) } cliLen = sizeof(cliAddr); - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, + bytesRcvd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliAddr, &cliLen); - if (connfd < 0) { + if (bytesRcvd < 0) { printf("No clients in que, enter idle state\n"); } - else if (connfd > 0) { + else if (bytesRcvd > 0) { if (connect(listenfd, (const struct sockaddr *)&cliAddr, sizeof(cliAddr)) != 0) { printf("Udp connect failed.\n"); diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c index c0776abc..54161984 100644 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c @@ -42,8 +42,8 @@ static int cleanup; /* To handle shutdown */ -void NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ void dtls_set_nonblocking(int*); /* set the socket non-blocking */ +int NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ int AwaitDGram(CYASSL_CTX* ctx); /* Separate out Handling Datagrams */ int udp_read_connect(int); /* broken out to improve readability */ int dtls_select(); @@ -64,20 +64,18 @@ int AwaitDGram(CYASSL_CTX* ctx) int readWriteErr; int listenfd = 0; /* Initialize our socket */ int clientfd = 0; /* client connection */ - int currTimeout = 1; int len = sizeof(on); - char buff[MSGLEN]; /* string read from client */ + int cont; + char buff[MSGLEN]; /* string read from client */ CYASSL* ssl = NULL; /* Initialize ssl object */ struct sockaddr_in servAddr; /* our server's address */ char ack[] = "I hear you fashizzle\n"; - while (cleanup != 1) { /* Create a UDP/IP socket */ if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); - cleanup = 1; return 1; } @@ -94,7 +92,6 @@ int AwaitDGram(CYASSL_CTX* ctx) res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); if (res < 0) { printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; return 1; } @@ -102,19 +99,17 @@ int AwaitDGram(CYASSL_CTX* ctx) if (bind(listenfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); - cleanup = 1; return 1; } printf("Awaiting client connection on port %d\n", SERV_PORT); - + clientfd = udp_read_connect(listenfd); dtls_set_nonblocking(&clientfd); /* Create the CYASSL Object */ if (( ssl = CyaSSL_new(ctx)) == NULL) { printf("CyaSSL_new error.\n"); - cleanup = 1; return 1; } @@ -125,14 +120,17 @@ int AwaitDGram(CYASSL_CTX* ctx) CyaSSL_set_fd(ssl, clientfd); CyaSSL_set_using_nonblock(ssl, 1); - NonBlockingSSL_Accept(ssl); + cont = NonBlockingSSL_Accept(ssl); + + if (cont != 0) { + printf("NonBlockingSSL_Accept failed.\n"); + return 1; + } /* Begin: Reply to the client */ recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); - - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - - readWriteErr = CyaSSL_get_error(ssl, 0); + + /* Begin do-while read */ do { if (cleanup == 1) { memset(buff, 0, sizeof(buff)); @@ -143,13 +141,14 @@ int AwaitDGram(CYASSL_CTX* ctx) if (readWriteErr != SSL_ERROR_WANT_READ) { printf("Read Error, error was: %d.\n", readWriteErr); cleanup = 1; - return 1; } else { recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); } } - } while (readWriteErr == SSL_ERROR_WANT_READ && recvLen < 0 && - currTimeout >= 0 && cleanup != 1); + } while (readWriteErr == SSL_ERROR_WANT_READ && + recvLen < 0 && + cleanup != 1); + /* End do-while read */ if (recvLen > 0) { buff[recvLen] = 0; @@ -158,13 +157,21 @@ int AwaitDGram(CYASSL_CTX* ctx) else { printf("Connection Timed Out.\n"); } - - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("Write error.\n"); - cleanup = 1; - return 1; - } - printf("Reply sent:\"%s\"\n", ack); + + /* Begin do-while write */ + do { + if (cleanup == 1) { + memset(&buff, 0, sizeof(buff)); + break; + } + readWriteErr = CyaSSL_get_error(ssl, 0); + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + printf("Write error.\n"); + cleanup = 1; + } + printf("Reply sent:\"%s\"\n", ack); + }while(readWriteErr == SSL_ERROR_WANT_WRITE && cleanup != 1); + /* End do-while write */ /* free allocated memory */ memset(buff, 0, sizeof(buff)); @@ -177,17 +184,15 @@ int AwaitDGram(CYASSL_CTX* ctx) int udp_read_connect(int listenfd) { - int connfd; - unsigned char b[1500]; + int bytesRecvd; + unsigned char b[MSGLEN]; struct sockaddr_in cliAddr; socklen_t clilen = sizeof(cliAddr); - /* ensure b is empty upon each call */ - memset(b, 0, sizeof(b)); - connfd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, + bytesRecvd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, (struct sockaddr*)&cliAddr, &clilen); - if (connfd > 0) { + if (bytesRecvd > 0) { if (connect(listenfd, (const struct sockaddr*)&cliAddr, sizeof(cliAddr)) != 0) { printf("udp connect failed.\n"); @@ -196,10 +201,12 @@ int udp_read_connect(int listenfd) else { printf("recvfrom failed.\n"); } + /* ensure b is empty upon each call */ + memset(&b, 0, sizeof(b)); return listenfd; } -void NonBlockingSSL_Accept(CYASSL* ssl) +int NonBlockingSSL_Accept(CYASSL* ssl) { int select_ret; int currTimeout = 1; @@ -242,17 +249,20 @@ void NonBlockingSSL_Accept(CYASSL* ssl) } if (ret != SSL_SUCCESS) { printf("SSL_accept failed.\n"); + return 1; } + + return 0; } -void dtls_set_nonblocking(int* listenfd) +void dtls_set_nonblocking(int* sockfd) { - int flags = fcntl(*listenfd, F_GETFL, 0); + int flags = fcntl(*sockfd, F_GETFL, 0); if (flags < 0) { printf("fcntl get failed"); cleanup = 1; } - flags = fcntl(*listenfd, F_SETFL, flags | O_NONBLOCK); + flags = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK); if (flags < 0) { printf("fcntl set failed.\n"); cleanup = 1; @@ -293,7 +303,7 @@ int main(int argc, char** argv) char servCertLoc[] = "../certs/server-cert.pem"; char servKeyLoc[] = "../certs/server-key.pem"; CYASSL_CTX* ctx; - + /* "./config --enable-debug" and uncomment next line for debugging */ /* CyaSSL_Debugging_ON(); */ @@ -313,7 +323,7 @@ int main(int argc, char** argv) } /* Load server certificates */ if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != - SSL_SUCCESS) { + SSL_SUCCESS) { printf("Error loading %s, please check the file.\n", servCertLoc); return 1; } From 67061751d9e11287f0d09f1a4d9b3402ea5e296d Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 12 Jun 2014 10:22:53 -0600 Subject: [PATCH 099/103] fixing multithreaded --- .../server-dtls-threaded.c | 231 +++++++----------- 1 file changed, 86 insertions(+), 145 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index 9c01b247..d2282a7e 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -43,42 +43,42 @@ CYASSL_CTX* ctx; /* must be global for ThreadControl */ static int cleanup; /* To handle shutdown */ +struct sockaddr_in cliAddr; /* the client's address */ +struct sockaddr_in servAddr; /* our server's address */ int AwaitDGram(CYASSL_CTX* ctx); void* ThreadControl(void*); int AwaitDGram(CYASSL_CTX* ctx) { - while (cleanup != 1) { - int on = 1; - int res = 1; - int bytesRcvd = 0; - int listenfd = 0; /* Initialize our socket */ - socklen_t cliLen = 0; /* length of address' */ - socklen_t len = sizeof(on); - unsigned char b[MSGLEN]; - void* dummy = NULL; - struct sockaddr_in cliAddr; /* the client's address */ - struct sockaddr_in servAddr; /* our server's address */ + int on = 1; + int res = 1; + int bytesRcvd = 0; + int recvLen = 0; /* length of message */ + int listenfd = 0; /* Initialize our socket */ + CYASSL* ssl = NULL; + socklen_t cliLen; + socklen_t len = sizeof(on); + unsigned char b[MSGLEN]; /* watch for incoming messages */ + char buff[MSGLEN]; /* the incoming message */ + char ack[] = "I hear you fashizzle!\n"; - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + while (cleanup != 1) { + /* Create a UDP/IP socket */ + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { printf("Cannot create socket.\n"); cleanup = 1; - return 1; } + printf("Socket all/ocated\n"); - printf("Socket allocated\n"); - - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ + /* clear servAddr each loop */ memset((char *)&servAddr, 0, sizeof(servAddr)); - memset((char *)&cliAddr, 0, sizeof(cliAddr)); - // memset(&b, 0, MSGLEN); /* host-to-network-long conversion (htonl) */ /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; + servAddr.sin_family = AF_INET; servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); + servAddr.sin_port = htons(SERV_PORT); /* Eliminate socket already in use error */ res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); @@ -89,40 +89,89 @@ int AwaitDGram(CYASSL_CTX* ctx) } /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servAddr, - sizeof(servAddr)) < 0) { + if (bind(listenfd, + (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { printf("Bind failed.\n"); cleanup = 1; return 1; } - printf("Socket bind complete\n"); + printf("Awaiting client connection on port %d\n", SERV_PORT); - /* set cliLen to |cliAddr| */ - cliLen = sizeof(cliAddr); + cliLen = sizeof(cliaddr); bytesRcvd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliAddr, &cliLen); + (struct sockaddr*)&cliaddr, &cliLen); if (bytesRcvd < 0) { printf("No clients in que, enter idle state\n"); continue; } else if (bytesRcvd > 0) { - /* create a new thread ID */ - pthread_t threadID; - /* use ID to spawn a unique thread */ - if (pthread_create(&threadID, NULL, - ThreadControl, (void *)&bytesRcvd) < 0) { - printf("pthread_create failed.\n"); + if (connect(listenfd, (const struct sockaddr *)&cliaddr, + sizeof(cliaddr)) != 0) { + printf("Udp connect failed.\n"); + cleanup = 1; + return 1; } - printf("Connection being re-routed to Thread Control.\n"); } else { printf("Recvfrom failed.\n"); cleanup = 1; + return 1; } - pthread_join(pthread_self(), dummy); - } + printf("Connected!\n"); + + /* Create the CYASSL Object */ + if ((ssl = CyaSSL_new(ctx)) == NULL) { + printf("CyaSSL_new error.\n"); + cleanup = 1; + return 1; + } + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, listenfd); + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + + int e = CyaSSL_get_error(ssl, 0); + + printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); + printf("SSL_accept failed.\n"); + continue; + } + if ((recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { + printf("heard %d bytes\n", recvLen); + + /* SPIN A THREAD HERE TO HANDLE "buff" and "reply/ack" */ + + /* buff[recvLen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + else if (recvLen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) { + printf("SSL_read failed.\n"); + cleanup = 1; + return 1; + } + } + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + printf("CyaSSL_write fail.\n"); + cleanup = 1; + return 1; + } + else { + printf("Sending reply.\n"); + } + + printf("reply sent \"%s\"\n", ack); + + CyaSSL_set_fd(ssl, 0); + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + + printf("Client left return to idle state\n"); + }*/ return 0; } @@ -130,116 +179,8 @@ void* ThreadControl(void* openSock) { pthread_detach(pthread_self()); - int on = 1; - int res = 1; - int bytesRcvd = 0; - int recvlen = 0; - int listenfd = 0; - socklen_t cliLen; - socklen_t len = sizeof(on); - CYASSL* ssl = NULL; - unsigned char b[MSGLEN]; - char buff[MSGLEN]; - char ack[] = "I hear you fashizzle!\n"; - void* dummy; - struct sockaddr_in cliAddr; /* the client's address */ - struct sockaddr_in servAddr; /* our server's address */ - - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - cleanup = 1; - } - - /* INADDR_ANY=IPaddr, socket = 11111, modify SERV_PORT to change */ - memset((char *)&servAddr, 0, sizeof(servAddr)); - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; - } - - /*Bind Socket*/ - if (bind(listenfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - printf("Bind failed.\n"); - cleanup = 1; - } - - cliLen = sizeof(cliAddr); - bytesRcvd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliAddr, &cliLen); - - if (bytesRcvd < 0) { - printf("No clients in que, enter idle state\n"); - } - else if (bytesRcvd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliAddr, - sizeof(cliAddr)) != 0) { - printf("Udp connect failed.\n"); - cleanup = 1; - } - } - else { - printf("Recvfrom failed.\n"); - cleanup = 1; - } - - printf("Connected!\n"); - - /* Create the CYASSL Object */ - if ((ssl = CyaSSL_new(ctx)) == NULL) { - printf("CyaSSL_new error.\n"); - cleanup = 1; - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - int e = CyaSSL_get_error(ssl, 0); - printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); - printf("SSL_accept failed.\n"); - cleanup = 1; - } - if ((recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ - - printf("heard %d bytes\n", recvlen); - - buff[recvlen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - if (recvlen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) { - printf("SSL_read failed.\n"); - cleanup = 1; - } - } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("CyaSSL_write fail.\n"); - cleanup = 1; - } - else { - printf("Sending Reply...\n"); - } - - printf("reply sent \"%s\"\n", ack); - printf("No further packets, severing connection to client.\n"); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Returning to idle state\n"); - pthread_exit(&dummy); + printf("Exiting thread.\n\n"); + pthread_exit(&exitRet); } int main(int argc, char** argv) From b75a5d4e7cf33baee2004736c9f096b023bfbd45 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 30 Jun 2014 10:06:07 -0600 Subject: [PATCH 100/103] threaded updates, not yet complete --- .../server-dtls-threaded.c | 242 +++++++++++------- 1 file changed, 148 insertions(+), 94 deletions(-) diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c index d2282a7e..9800a475 100644 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ b/project1/dtls_secured_multithreaded/server-dtls-threaded.c @@ -49,66 +49,104 @@ struct sockaddr_in servAddr; /* our server's address */ int AwaitDGram(CYASSL_CTX* ctx); void* ThreadControl(void*); +typedef struct { + int activefd; + int size; + unsigned char b[MSGLEN]; +}threadArgs; + int AwaitDGram(CYASSL_CTX* ctx) { int on = 1; int res = 1; int bytesRcvd = 0; - int recvLen = 0; /* length of message */ int listenfd = 0; /* Initialize our socket */ - CYASSL* ssl = NULL; socklen_t cliLen; socklen_t len = sizeof(on); - unsigned char b[MSGLEN]; /* watch for incoming messages */ - char buff[MSGLEN]; /* the incoming message */ - char ack[] = "I hear you fashizzle!\n"; + unsigned char buf[MSGLEN]; /* watch for incoming messages */ + + /* Create a UDP/IP socket */ + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { + printf("Cannot create socket.\n"); + cleanup = 1; + } + printf("Socket allocated\n"); + + /* clear servAddr each loop */ + memset((char *)&servAddr, 0, sizeof(servAddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); + + /* Eliminate socket already in use error */ + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; + return 1; + } + + /*Bind Socket*/ + if (bind(listenfd, + (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { + printf("Bind failed.\n"); + cleanup = 1; + return 1; + } + + printf("Awaiting client connection on port %d\n", SERV_PORT); while (cleanup != 1) { - /* Create a UDP/IP socket */ - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - cleanup = 1; - } - printf("Socket all/ocated\n"); + + threadArgs* args; + args = (threadArgs *) malloc(sizeof(threadArgs)); - /* clear servAddr each loop */ - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; - return 1; - } - - /*Bind Socket*/ - if (bind(listenfd, - (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - printf("Bind failed.\n"); - cleanup = 1; - return 1; - } - - printf("Awaiting client connection on port %d\n", SERV_PORT); - - cliLen = sizeof(cliaddr); - bytesRcvd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &cliLen); + cliLen = sizeof(cliAddr); + /* note argument 4 of recvfrom not MSG_PEEK as dtls will see + * handshake packets and think a message is arriving. Instead + * read any real message to struct and pass struct into thread + * for processing. + */ + bytesRcvd = (int)recvfrom(listenfd, (char *)buf, sizeof(buf), 0, + (struct sockaddr*)&cliAddr, &cliLen); if (bytesRcvd < 0) { printf("No clients in que, enter idle state\n"); continue; } + else if (bytesRcvd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) { + + memcpy(args->b, buf, sizeof(buf)); + + args->size = bytesRcvd; + + if ((args->activefd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { + printf("Cannot create socket.\n"); + cleanup = 1; + } + + res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEADDR, &on, + len); + if (res < 0) { + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; + return 1; + } + #ifdef SO_REUSEPORT + res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEPORT, &on, len); + if (res < 0) { + printf("Setsockopt SO_REUSEPORT failed.\n"); + cleanup = 1; + return 1; + } + #endif + + if (connect(args->activefd, (const struct sockaddr *)&cliAddr, + sizeof(cliAddr)) != 0) { printf("Udp connect failed.\n"); cleanup = 1; return 1; @@ -121,57 +159,13 @@ int AwaitDGram(CYASSL_CTX* ctx) } printf("Connected!\n"); - /* Create the CYASSL Object */ - if ((ssl = CyaSSL_new(ctx)) == NULL) { - printf("CyaSSL_new error.\n"); - cleanup = 1; - return 1; - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + pthread_t threadid; + printf("new id %d created.\n",(int) threadid); + /* SPIN A THREAD HERE TO HANDLE "buff" and "reply/ack" */ + pthread_create(&threadid, NULL, ThreadControl, args); + printf("control passed to thread control.\n"); + } - int e = CyaSSL_get_error(ssl, 0); - - printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); - printf("SSL_accept failed.\n"); - continue; - } - if ((recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - printf("heard %d bytes\n", recvLen); - - /* SPIN A THREAD HERE TO HANDLE "buff" and "reply/ack" */ - - /* buff[recvLen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - else if (recvLen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) { - printf("SSL_read failed.\n"); - cleanup = 1; - return 1; - } - } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("CyaSSL_write fail.\n"); - cleanup = 1; - return 1; - } - else { - printf("Sending reply.\n"); - } - - printf("reply sent \"%s\"\n", ack); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); - }*/ return 0; } @@ -179,8 +173,68 @@ void* ThreadControl(void* openSock) { pthread_detach(pthread_self()); + threadArgs* args = (threadArgs*)openSock; + int recvLen = 0; /* length of message */ + int activefd = args->activefd; /* the active descriptor */ + int msgLen = args->size; /* the size of message */ + unsigned char buff[msgLen]; /* the incoming message */ + char ack[] = "I hear you fashizzle!\n"; + CYASSL* ssl; + + memcpy(buff, args->b, msgLen); + + /* Create the CYASSL Object */ + if ((ssl = CyaSSL_new(ctx)) == NULL) { + printf("CyaSSL_new error.\n"); + cleanup = 1; + return NULL; + } + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, activefd); + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + + int e = CyaSSL_get_error(ssl, 0); + + printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); + printf("SSL_accept failed.\n"); + return NULL; + } + if ((recvLen = CyaSSL_read(ssl, buff, msgLen-1)) > 0) { + printf("heard %d bytes\n", recvLen); + + buff[recvLen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + else if (recvLen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) { + printf("SSL_read failed.\n"); + cleanup = 1; + return NULL; + } + } + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + printf("CyaSSL_write fail.\n"); + cleanup = 1; + return NULL; + } + else { + printf("Sending reply.\n"); + } + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + close(activefd); + free(openSock); /* valgrind friendly free */ + + printf("Client left return to idle state\n"); printf("Exiting thread.\n\n"); - pthread_exit(&exitRet); + pthread_exit(openSock); } int main(int argc, char** argv) From 5f25f9841826d0b56f9144878eb3e1ce87172d6f Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 30 Jun 2014 10:15:29 -0600 Subject: [PATCH 101/103] remove duplicate project1 --- project1/certs/ca-cert.pem | 87 ----- project1/certs/server-cert.pem | 158 -------- project1/certs/server-key.pem | 27 -- project1/dtls_secured/Makefile | 21 -- project1/dtls_secured/server-dtls.c | 220 ----------- project1/dtls_secured_multithreaded/Makefile | 21 -- .../server-dtls-threaded.c | 286 --------------- project1/dtls_secured_nonblocking/Makefile | 21 -- .../server-dtls-nonblocking.c | 345 ------------------ project1/unsecure/Makefile | 20 - project1/unsecure/server-udp.c | 96 ----- 11 files changed, 1302 deletions(-) delete mode 100644 project1/certs/ca-cert.pem delete mode 100644 project1/certs/server-cert.pem delete mode 100644 project1/certs/server-key.pem delete mode 100644 project1/dtls_secured/Makefile delete mode 100644 project1/dtls_secured/server-dtls.c delete mode 100644 project1/dtls_secured_multithreaded/Makefile delete mode 100644 project1/dtls_secured_multithreaded/server-dtls-threaded.c delete mode 100644 project1/dtls_secured_nonblocking/Makefile delete mode 100644 project1/dtls_secured_nonblocking/server-dtls-nonblocking.c delete mode 100644 project1/unsecure/Makefile delete mode 100644 project1/unsecure/server-udp.c diff --git a/project1/certs/ca-cert.pem b/project1/certs/ca-cert.pem deleted file mode 100644 index b2dc6ae6..00000000 --- a/project1/certs/ca-cert.pem +++ /dev/null @@ -1,87 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD -VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G -A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 -dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx -MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q -8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k -EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A -dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ -mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ -CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O -BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd -P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u -dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV -BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG -9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 -PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH -Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr -G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m -ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi -rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== ------END CERTIFICATE----- -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - e9:d0:a7:5f:79:25:f4:3c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:18:15 2011 GMT - Not After : Jul 20 18:18:15 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: - f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: - de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: - 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: - 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: - 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: - a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: - a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: - 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: - 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: - 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: - 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: - de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: - cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: - b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: - 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: - ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: - 36:79 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - X509v3 Authority Key Identifier: - keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com - serial:E9:D0:A7:5F:79:25:F4:3C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: - 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: - e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: - f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: - af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: - 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: - 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: - 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: - 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: - 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: - 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: - 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: - f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: - b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: - 5a:1f:7f:ca diff --git a/project1/certs/server-cert.pem b/project1/certs/server-cert.pem deleted file mode 100644 index 8381265e..00000000 --- a/project1/certs/server-cert.pem +++ /dev/null @@ -1,158 +0,0 @@ -Certificate: - Data: - Version: 1 (0x0) - Serial Number: 2 (0x2) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:27:13 2011 GMT - Not After : Jul 20 18:27:13 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=yaSSL, OU=Support, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27: - 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6: - f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75: - f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab: - 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e: - 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25: - 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c: - 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6: - 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc: - 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8: - dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3: - e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9: - 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0: - c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77: - ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4: - b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22: - a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f: - ad:d7 - Exponent: 65537 (0x10001) - Signature Algorithm: sha1WithRSAEncryption - 71:4e:d3:62:df:cc:4c:f7:cd:b7:6e:52:0b:6c:6e:e0:bd:c2: - 2d:07:d7:c0:b0:6e:43:1e:35:bc:30:01:50:f0:ff:99:23:6c: - 18:1a:41:b6:11:d6:d4:19:61:fd:e4:77:97:1c:39:e1:57:ab: - c5:15:63:77:11:36:5e:74:e2:24:0b:1f:41:78:ad:b7:81:e7: - b4:40:66:80:f0:4b:91:a0:6d:a8:6e:3d:53:d9:8b:ce:2a:e1: - 0b:45:65:87:a1:96:ae:ee:3e:88:d5:12:1f:78:17:ae:2c:c5: - 73:44:d8:dc:f4:af:d8:cc:ae:4c:e1:0c:be:55:a4:99:f7:6e: - 96:c0:c8:45:87:bf:dc:51:57:ff:9e:73:37:6a:18:9c:c3:f9: - 22:7a:f4:b0:52:bd:fc:21:30:f8:c5:ff:1e:87:7d:ad:a2:5a: - 35:f5:22:a8:b4:0a:76:38:e6:76:b0:98:af:1b:ec:8a:0a:43: - 74:d2:85:34:37:84:07:e1:f6:23:b2:29:de:a6:b6:b7:4c:57: - 7e:96:06:cb:a9:16:25:29:3a:03:2d:55:7d:a6:8c:a4:f7:9e: - 81:c9:95:b6:7c:c1:4a:ce:94:66:0c:ca:88:eb:d2:09:f5:5b: - 19:58:82:df:27:fd:67:95:78:b7:02:06:d5:a7:61:bd:ef:3a: - fc:b2:61:cd ------BEGIN CERTIFICATE----- -MIIDkDCCAngCAQIwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTExMDI0MTgyNzEzWhcN -MTQwNzIwMTgyNzEzWjCBijELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB01vbnRhbmEx -EDAOBgNVBAcTB0JvemVtYW4xDjAMBgNVBAoTBXlhU1NMMRAwDgYDVQQLEwdTdXBw -b3J0MRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZv -QHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCVCOFX -QfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hnf/5cnFF194rKB+c1L4/h -vXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/XGQ0lT+FjY1GLC2Q/rUO4 -pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bMQLRpo0YzaYduxLsXpvPo -3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq0KGWSrzh1Bpbx6DAwWN4 -D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ6dgIvDMgs1gip6rrxOHm -YYPF0pbf2dBPrdcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAcU7TYt/MTPfNt25S -C2xu4L3CLQfXwLBuQx41vDABUPD/mSNsGBpBthHW1Blh/eR3lxw54VerxRVjdxE2 -XnTiJAsfQXitt4HntEBmgPBLkaBtqG49U9mLzirhC0Vlh6GWru4+iNUSH3gXrizF -c0TY3PSv2MyuTOEMvlWkmfdulsDIRYe/3FFX/55zN2oYnMP5Inr0sFK9/CEw+MX/ -Hod9raJaNfUiqLQKdjjmdrCYrxvsigpDdNKFNDeEB+H2I7Ip3qa2t0xXfpYGy6kW -JSk6Ay1VfaaMpPeegcmVtnzBSs6UZgzKiOvSCfVbGViC3yf9Z5V4twIG1adhve86 -/LJhzQ== ------END CERTIFICATE----- -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - e9:d0:a7:5f:79:25:f4:3c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Validity - Not Before: Oct 24 18:18:15 2011 GMT - Not After : Jul 20 18:18:15 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: - f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: - de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: - 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77: - 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1: - 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3: - a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed: - a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95: - 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c: - 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db: - 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc: - 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98: - de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68: - cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2: - b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3: - 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98: - ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed: - 36:79 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - X509v3 Authority Key Identifier: - keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com - serial:E9:D0:A7:5F:79:25:F4:3C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: - 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: - e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: - f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: - af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: - 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: - 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: - 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: - 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: - 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: - 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: - 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: - f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: - b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: - 5a:1f:7f:ca ------BEGIN CERTIFICATE----- -MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD -VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G -A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 -dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx -MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q -8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k -EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A -dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ -mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ -CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O -BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd -P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u -dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV -BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG -9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 -PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH -Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr -G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m -ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi -rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== ------END CERTIFICATE----- diff --git a/project1/certs/server-key.pem b/project1/certs/server-key.pem deleted file mode 100644 index d1627f4d..00000000 --- a/project1/certs/server-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7 -qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf -P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj -xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk -wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC -Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv -n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd -x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y -oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz -0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB -QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD -LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8 -ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8 -yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT -3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N -zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB -hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv -VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB -qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf -H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza -1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ -c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe -9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY -dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n -WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA= ------END RSA PRIVATE KEY----- diff --git a/project1/dtls_secured/Makefile b/project1/dtls_secured/Makefile deleted file mode 100644 index e154e022..00000000 --- a/project1/dtls_secured/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-dtls.c - $(CC) -Wall -DCYASSL_DTLS -o server server-dtls.c -I ../include -lcyassl - - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/dtls_secured/server-dtls.c b/project1/dtls_secured/server-dtls.c deleted file mode 100644 index 4ef910e3..00000000 --- a/project1/dtls_secured/server-dtls.c +++ /dev/null @@ -1,220 +0,0 @@ -/* server-dtls.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2. - */ - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 - -static int cleanup; /* To handle shutdown */ -struct sockaddr_in servAddr; /* our server's address */ -struct sockaddr_in cliaddr; /* the client's address */ - -int AwaitDGram(CYASSL_CTX* ctx); /* Separate out Handling Datagrams */ -void CleanUp(); - -int AwaitDGram(CYASSL_CTX* ctx) -{ - int on = 1; - int res = 1; - int connfd = 0; - int recvLen = 0; /* length of message */ - int listenfd = 0; /* Initialize our socket */ - CYASSL* ssl = NULL; - socklen_t cliLen; - socklen_t len = sizeof(on); - unsigned char b[MSGLEN]; /* watch for incoming messages */ - char buff[MSGLEN]; /* the incoming message */ - char ack[] = "I hear you fashizzle!\n"; - - while (cleanup != 1) { - /* Create a UDP/IP socket */ - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - cleanup = 1; - } - printf("Socket all/ocated\n"); - - /* clear servAddr each loop */ - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; - return 1; - } - - /*Bind Socket*/ - if (bind(listenfd, - (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - printf("Bind failed.\n"); - cleanup = 1; - return 1; - } - - printf("Awaiting client connection on port %d\n", SERV_PORT); - - cliLen = sizeof(cliaddr); - connfd = (int)recvfrom(listenfd, (char *)&b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliaddr, &cliLen); - - if (connfd < 0) { - printf("No clients in que, enter idle state\n"); - continue; - } - else if (connfd > 0) { - if (connect(listenfd, (const struct sockaddr *)&cliaddr, - sizeof(cliaddr)) != 0) { - printf("Udp connect failed.\n"); - cleanup = 1; - return 1; - } - } - else { - printf("Recvfrom failed.\n"); - cleanup = 1; - return 1; - } - printf("Connected!\n"); - - /* Create the CYASSL Object */ - if ((ssl = CyaSSL_new(ctx)) == NULL) { - printf("CyaSSL_new error.\n"); - cleanup = 1; - return 1; - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, listenfd); - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - - int e = CyaSSL_get_error(ssl, 0); - - printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); - printf("SSL_accept failed.\n"); - continue; - } - if ((recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0) { - printf("heard %d bytes\n", recvLen); - - buff[recvLen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - else if (recvLen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) { - printf("SSL_read failed.\n"); - cleanup = 1; - return 1; - } - } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("CyaSSL_write fail.\n"); - cleanup = 1; - return 1; - } - else { - printf("Sending reply.\n"); - } - - printf("reply sent \"%s\"\n", ack); - - CyaSSL_set_fd(ssl, 0); - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - - printf("Client left return to idle state\n"); - } - return 0; -} - -int main(int argc, char** argv) -{ - /* cont short for "continue?", Loc short for "location" */ - int cont = 0; - char caCertLoc[] = "../certs/ca-cert.pem"; - char servCertLoc[] = "../certs/server-cert.pem"; - char servKeyLoc[] = "../certs/server-key.pem"; - CYASSL_CTX* ctx; - - /* "./config --enable-debug" and uncomment next line for debugging */ - /* CyaSSL_Debugging_ON(); */ - - /* Initialize CyaSSL */ - CyaSSL_Init(); - - /* Set ctx to DTLS 1.2 */ - if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { - printf("CyaSSL_CTX_new error.\n"); - return 1; - } - /* Load CA certificates */ - if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", caCertLoc); - return 1; - } - /* Load server certificates */ - if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servCertLoc); - return 1; - } - /* Load server Keys */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servKeyLoc); - return 1; - } - - cont = AwaitDGram(ctx); - - if (cont == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } - - return 0; -} diff --git a/project1/dtls_secured_multithreaded/Makefile b/project1/dtls_secured_multithreaded/Makefile deleted file mode 100644 index ef377557..00000000 --- a/project1/dtls_secured_multithreaded/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-dtls-threaded.c - $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-threaded.c -lcyassl -lpthread - - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/dtls_secured_multithreaded/server-dtls-threaded.c b/project1/dtls_secured_multithreaded/server-dtls-threaded.c deleted file mode 100644 index 9800a475..00000000 --- a/project1/dtls_secured_multithreaded/server-dtls-threaded.c +++ /dev/null @@ -1,286 +0,0 @@ -/* server-dtls-threaded.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a DTLS server for instructional/learning purposes. - * Utilizes DTLS 1.2. and multi-threading - */ - - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include -#include -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 - -CYASSL_CTX* ctx; /* must be global for ThreadControl */ -static int cleanup; /* To handle shutdown */ -struct sockaddr_in cliAddr; /* the client's address */ -struct sockaddr_in servAddr; /* our server's address */ - -int AwaitDGram(CYASSL_CTX* ctx); -void* ThreadControl(void*); - -typedef struct { - int activefd; - int size; - unsigned char b[MSGLEN]; -}threadArgs; - -int AwaitDGram(CYASSL_CTX* ctx) -{ - int on = 1; - int res = 1; - int bytesRcvd = 0; - int listenfd = 0; /* Initialize our socket */ - socklen_t cliLen; - socklen_t len = sizeof(on); - unsigned char buf[MSGLEN]; /* watch for incoming messages */ - - /* Create a UDP/IP socket */ - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - cleanup = 1; - } - printf("Socket allocated\n"); - - /* clear servAddr each loop */ - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; - return 1; - } - - /*Bind Socket*/ - if (bind(listenfd, - (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - printf("Bind failed.\n"); - cleanup = 1; - return 1; - } - - printf("Awaiting client connection on port %d\n", SERV_PORT); - - while (cleanup != 1) { - - threadArgs* args; - args = (threadArgs *) malloc(sizeof(threadArgs)); - - cliLen = sizeof(cliAddr); - /* note argument 4 of recvfrom not MSG_PEEK as dtls will see - * handshake packets and think a message is arriving. Instead - * read any real message to struct and pass struct into thread - * for processing. - */ - bytesRcvd = (int)recvfrom(listenfd, (char *)buf, sizeof(buf), 0, - (struct sockaddr*)&cliAddr, &cliLen); - - if (bytesRcvd < 0) { - printf("No clients in que, enter idle state\n"); - continue; - } - - else if (bytesRcvd > 0) { - - memcpy(args->b, buf, sizeof(buf)); - - args->size = bytesRcvd; - - if ((args->activefd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - cleanup = 1; - } - - res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEADDR, &on, - len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - cleanup = 1; - return 1; - } - #ifdef SO_REUSEPORT - res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEPORT, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEPORT failed.\n"); - cleanup = 1; - return 1; - } - #endif - - if (connect(args->activefd, (const struct sockaddr *)&cliAddr, - sizeof(cliAddr)) != 0) { - printf("Udp connect failed.\n"); - cleanup = 1; - return 1; - } - } - else { - printf("Recvfrom failed.\n"); - cleanup = 1; - return 1; - } - printf("Connected!\n"); - - pthread_t threadid; - printf("new id %d created.\n",(int) threadid); - /* SPIN A THREAD HERE TO HANDLE "buff" and "reply/ack" */ - pthread_create(&threadid, NULL, ThreadControl, args); - printf("control passed to thread control.\n"); - } - - return 0; -} - -void* ThreadControl(void* openSock) -{ - pthread_detach(pthread_self()); - - threadArgs* args = (threadArgs*)openSock; - int recvLen = 0; /* length of message */ - int activefd = args->activefd; /* the active descriptor */ - int msgLen = args->size; /* the size of message */ - unsigned char buff[msgLen]; /* the incoming message */ - char ack[] = "I hear you fashizzle!\n"; - CYASSL* ssl; - - memcpy(buff, args->b, msgLen); - - /* Create the CYASSL Object */ - if ((ssl = CyaSSL_new(ctx)) == NULL) { - printf("CyaSSL_new error.\n"); - cleanup = 1; - return NULL; - } - - /* set the session ssl to client connection port */ - CyaSSL_set_fd(ssl, activefd); - - if (CyaSSL_accept(ssl) != SSL_SUCCESS) { - - int e = CyaSSL_get_error(ssl, 0); - - printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); - printf("SSL_accept failed.\n"); - return NULL; - } - if ((recvLen = CyaSSL_read(ssl, buff, msgLen-1)) > 0) { - printf("heard %d bytes\n", recvLen); - - buff[recvLen] = 0; - printf("I heard this: \"%s\"\n", buff); - } - else if (recvLen < 0) { - int readErr = CyaSSL_get_error(ssl, 0); - if(readErr != SSL_ERROR_WANT_READ) { - printf("SSL_read failed.\n"); - cleanup = 1; - return NULL; - } - } - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("CyaSSL_write fail.\n"); - cleanup = 1; - return NULL; - } - else { - printf("Sending reply.\n"); - } - - printf("reply sent \"%s\"\n", ack); - - - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - close(activefd); - free(openSock); /* valgrind friendly free */ - - printf("Client left return to idle state\n"); - printf("Exiting thread.\n\n"); - pthread_exit(openSock); -} - -int main(int argc, char** argv) -{ - /* cont short for "continue?", Loc short for "location" */ - int cont = 0; - char caCertLoc[] = "../certs/ca-cert.pem"; - char servCertLoc[] = "../certs/server-cert.pem"; - char servKeyLoc[] = "../certs/server-key.pem"; - - /* "./config --enable-debug" and uncomment next line for debugging */ - /* CyaSSL_Debugging_ON(); */ - - /* Initialize CyaSSL */ - CyaSSL_Init(); - - /* Set ctx to DTLS 1.2 */ - if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { - printf("CyaSSL_CTX_new error.\n"); - return 1; - } - /* Load CA certificates */ - if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", caCertLoc); - return 1; - } - /* Load server certificates */ - if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servCertLoc); - return 1; - } - /* Load server Keys */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servKeyLoc); - return 1; - } - - cont = AwaitDGram(ctx); - - if (cont == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } - - return 0; -} diff --git a/project1/dtls_secured_nonblocking/Makefile b/project1/dtls_secured_nonblocking/Makefile deleted file mode 100644 index dc114222..00000000 --- a/project1/dtls_secured_nonblocking/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-dtls-nonblocking.c - $(CC) -Wall -DCYASSL_DTLS -o server server-dtls-nonblocking.c -I ../include -lcyassl - - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c b/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c deleted file mode 100644 index 54161984..00000000 --- a/project1/dtls_secured_nonblocking/server-dtls-nonblocking.c +++ /dev/null @@ -1,345 +0,0 @@ -/* server-dtls.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a DTLS erver for instructional/learning purposes. - * Utilizes DTLS 1.2. - */ - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include -#include -#include -#include -#include -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 - -static int cleanup; /* To handle shutdown */ - -void dtls_set_nonblocking(int*); /* set the socket non-blocking */ -int NonBlockingSSL_Accept(CYASSL*);/* non-blocking accept */ -int AwaitDGram(CYASSL_CTX* ctx); /* Separate out Handling Datagrams */ -int udp_read_connect(int); /* broken out to improve readability */ -int dtls_select(); - -/* costumes for select_ret to wear */ -enum { - TEST_SELECT_FAIL, - TEST_TIMEOUT, - TEST_RECV_READY, - TEST_ERROR_READY -}; - -int AwaitDGram(CYASSL_CTX* ctx) -{ - int on = 1; - int res = 1; - int recvLen; /* length of string read */ - int readWriteErr; - int listenfd = 0; /* Initialize our socket */ - int clientfd = 0; /* client connection */ - int len = sizeof(on); - int cont; - char buff[MSGLEN]; /* string read from client */ - CYASSL* ssl = NULL; /* Initialize ssl object */ - struct sockaddr_in servAddr; /* our server's address */ - char ack[] = "I hear you fashizzle\n"; - - while (cleanup != 1) { - - /* Create a UDP/IP socket */ - if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { - printf("Cannot create socket.\n"); - return 1; - } - - printf("Socket allocated\n"); - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - /* Eliminate socket already in use error */ - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); - if (res < 0) { - printf("Setsockopt SO_REUSEADDR failed.\n"); - return 1; - } - - /*Bind Socket*/ - if (bind(listenfd, - (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - printf("Bind failed.\n"); - return 1; - } - - printf("Awaiting client connection on port %d\n", SERV_PORT); - - clientfd = udp_read_connect(listenfd); - dtls_set_nonblocking(&clientfd); - - /* Create the CYASSL Object */ - if (( ssl = CyaSSL_new(ctx)) == NULL) { - printf("CyaSSL_new error.\n"); - return 1; - } - - /* set clilen to |cliAddr| */ - printf("Connected!\n"); - - /* set the/ session ssl to client connection port */ - CyaSSL_set_fd(ssl, clientfd); - - CyaSSL_set_using_nonblock(ssl, 1); - cont = NonBlockingSSL_Accept(ssl); - - if (cont != 0) { - printf("NonBlockingSSL_Accept failed.\n"); - return 1; - } - - /* Begin: Reply to the client */ - recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); - - /* Begin do-while read */ - do { - if (cleanup == 1) { - memset(buff, 0, sizeof(buff)); - break; - } - if (recvLen < 0) { - readWriteErr = CyaSSL_get_error(ssl, 0); - if (readWriteErr != SSL_ERROR_WANT_READ) { - printf("Read Error, error was: %d.\n", readWriteErr); - cleanup = 1; - } else { - recvLen = CyaSSL_read(ssl, buff, sizeof(buff)-1); - } - } - } while (readWriteErr == SSL_ERROR_WANT_READ && - recvLen < 0 && - cleanup != 1); - /* End do-while read */ - - if (recvLen > 0) { - buff[recvLen] = 0; - printf("I heard this:\"%s\"\n", buff); - } - else { - printf("Connection Timed Out.\n"); - } - - /* Begin do-while write */ - do { - if (cleanup == 1) { - memset(&buff, 0, sizeof(buff)); - break; - } - readWriteErr = CyaSSL_get_error(ssl, 0); - if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { - printf("Write error.\n"); - cleanup = 1; - } - printf("Reply sent:\"%s\"\n", ack); - }while(readWriteErr == SSL_ERROR_WANT_WRITE && cleanup != 1); - /* End do-while write */ - - /* free allocated memory */ - memset(buff, 0, sizeof(buff)); - CyaSSL_free(ssl); - - /* End: Reply to the Client */ - } - return 0; -} - -int udp_read_connect(int listenfd) -{ - int bytesRecvd; - unsigned char b[MSGLEN]; - struct sockaddr_in cliAddr; - socklen_t clilen = sizeof(cliAddr); - - - bytesRecvd = (int)recvfrom(listenfd, (char*)b, sizeof(b), MSG_PEEK, - (struct sockaddr*)&cliAddr, &clilen); - if (bytesRecvd > 0) { - if (connect(listenfd, (const struct sockaddr*)&cliAddr, - sizeof(cliAddr)) != 0) { - printf("udp connect failed.\n"); - } - } - else { - printf("recvfrom failed.\n"); - } - /* ensure b is empty upon each call */ - memset(&b, 0, sizeof(b)); - return listenfd; -} - -int NonBlockingSSL_Accept(CYASSL* ssl) -{ - int select_ret; - int currTimeout = 1; - int ret = CyaSSL_accept(ssl); - int error = CyaSSL_get_error(ssl, 0); - int listenfd = (int)CyaSSL_get_fd(ssl); - - while (cleanup != 1 && (ret != SSL_SUCCESS && - (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE))) { - if (cleanup == 1) { - CyaSSL_free(ssl); - CyaSSL_shutdown(ssl); - break; - } - - if (error == SSL_ERROR_WANT_READ) - printf("... server would read block\n"); - else - printf("... server would write block\n"); - - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); - select_ret = dtls_select(listenfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - ret = CyaSSL_accept(ssl); - error = CyaSSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) { - printf("SSL_accept failed.\n"); - return 1; - } - - return 0; -} - -void dtls_set_nonblocking(int* sockfd) -{ - int flags = fcntl(*sockfd, F_GETFL, 0); - if (flags < 0) { - printf("fcntl get failed"); - cleanup = 1; - } - flags = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK); - if (flags < 0) { - printf("fcntl set failed.\n"); - cleanup = 1; - } -} - -int dtls_select(int socketfd, int toSec) -{ - int result; - int nfds = socketfd + 1; - fd_set recvfds, errfds; - struct timeval timeout = { (toSec > 0) ? toSec : 0, 0}; - - FD_ZERO(&recvfds); - FD_SET(socketfd, &recvfds); - FD_ZERO(&errfds); - FD_SET(socketfd, &errfds); - - result = select(nfds, &recvfds, NULL, &errfds, &timeout); - - if (result == 0) - return TEST_TIMEOUT; - else if (result > 0) { - if (FD_ISSET(socketfd, &recvfds)) - return TEST_RECV_READY; - else if(FD_ISSET(socketfd, &errfds)) - return TEST_ERROR_READY; - } - - return TEST_SELECT_FAIL; -} - -int main(int argc, char** argv) -{ - /* cont short for "continue?", Loc short for "location" */ - int cont = 0; - char caCertLoc[] = "../certs/ca-cert.pem"; - char servCertLoc[] = "../certs/server-cert.pem"; - char servKeyLoc[] = "../certs/server-key.pem"; - CYASSL_CTX* ctx; - - /* "./config --enable-debug" and uncomment next line for debugging */ - /* CyaSSL_Debugging_ON(); */ - - /* Initialize CyaSSL */ - CyaSSL_Init(); - - /* Set ctx to DTLS 1.2 */ - if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { - printf("CyaSSL_CTX_new error.\n"); - return 1; - } - /* Load CA certificates */ - if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", caCertLoc); - return 1; - } - /* Load server certificates */ - if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != - SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servCertLoc); - return 1; - } - /* Load server Keys */ - if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, - SSL_FILETYPE_PEM) != SSL_SUCCESS) { - printf("Error loading %s, please check the file.\n", servKeyLoc); - return 1; - } - - cont = AwaitDGram(ctx); - - if (cont == 1) { - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); - } - - return 0; -} diff --git a/project1/unsecure/Makefile b/project1/unsecure/Makefile deleted file mode 100644 index 83a78f98..00000000 --- a/project1/unsecure/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -DEPS = ../include/unp.h -CC=gcc -CFLAGS=-Wall -I ../include -DCYASSL_DTLS -OBJ = echoserver.o - -#if you are on a sunOS (System V) machine, you'll need to uncomment -#the next line. - -#LIBS=-lsocket -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) -all: server - -server: server-udp.c - $(CC) -Wall -o server server-udp.c -I ../include -lcyassl - -.PHONY: clean - -clean: - -rm -f *.o server diff --git a/project1/unsecure/server-udp.c b/project1/unsecure/server-udp.c deleted file mode 100644 index 6fe14b13..00000000 --- a/project1/unsecure/server-udp.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * server-udp.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, - * USA - *============================================================================= - * - * Bare-bones example of a UDP server for instructional/learning purposes. - */ - -#include /* standard in/out procedures */ -#include /* defines system calls */ -#include /* necessary for memset */ -#include -#include /* used for all socket calls */ -#include /* used for sockaddr_in */ -#include - -#define SERV_PORT 11111 /* define our server port number */ -#define MSGLEN 4096 /* limit incoming message size */ - -int main (int argc, char** argv) -{ - int sockfd; /* Initialize our socket */ - int recvLen; /* number of bytes recieved */ - int msgNum = 0; /* number of msg received */ - unsigned char buf[MSGLEN]; /* the incoming message */ - struct sockaddr_in servAddr; /* our server's address */ - struct sockaddr_in cliAddr; /* the client's address */ - socklen_t cliAddrLen = sizeof(cliAddr); /* length of address' */ - - /* create a UDP/IP socket */ - if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("cannot create socket"); - return 0; - } - - memset((char *)&servAddr, 0, sizeof(servAddr)); - - /* host-to-network-long conversion (htonl) */ - /* host-to-network-short conversion (htons) */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERV_PORT); - - if (bind(sockfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { - perror("bind failed"); - return 0; - } - - /* loop, listen for client, print received, reply to client */ - for (;;) { - memset(buf, 0, sizeof(buf)); - printf("waiting for client message on port %d\n", SERV_PORT); - - recvLen = recvfrom(sockfd, buf, MSGLEN, 0, - (struct sockaddr *)&cliAddr, &cliAddrLen); - - printf("heard %d bytes\n", recvLen); - - if (recvLen > 0) { - buf[recvLen] = 0; - printf("I heard this: \"%s\"\n", buf); - } - else - printf("lost the connection to client\n"); - - printf("Message #%d received\n", msgNum++); - printf("reply sent \"%s\"\n", buf); - - if (sendto(sockfd, buf, sizeof(buf), 0, - (struct sockaddr *)&cliAddr, cliAddrLen) < 0) { - printf("\"sendto\" failed.\n"); - return 1; - } - /* continues to loop, use "Ctrl+C" to terminate listening */ - } - return 0; -} - From fdc86190976a3ffc21b2b73bc886698becb74683 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 30 Jun 2014 10:20:58 -0600 Subject: [PATCH 102/103] updating threaded, not yet complete --- dtls/server-dtls-threaded.c | 286 ++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 dtls/server-dtls-threaded.c diff --git a/dtls/server-dtls-threaded.c b/dtls/server-dtls-threaded.c new file mode 100644 index 00000000..9800a475 --- /dev/null +++ b/dtls/server-dtls-threaded.c @@ -0,0 +1,286 @@ +/* server-dtls-threaded.c + * + * Copyright (C) 2006-2014 wolfSSL Inc. + * + * This file is part of CyaSSL. + * + * CyaSSL 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. + * + * CyaSSL 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-1301, + * USA + *============================================================================= + * + * Bare-bones example of a DTLS server for instructional/learning purposes. + * Utilizes DTLS 1.2. and multi-threading + */ + + +#include /* standard in/out procedures */ +#include /* defines system calls */ +#include /* necessary for memset */ +#include +#include /* used for all socket calls */ +#include /* used for sockaddr_in */ +#include +#include +#include +#include +#include +#include + +#define SERV_PORT 11111 /* define our server port number */ +#define MSGLEN 4096 + +CYASSL_CTX* ctx; /* must be global for ThreadControl */ +static int cleanup; /* To handle shutdown */ +struct sockaddr_in cliAddr; /* the client's address */ +struct sockaddr_in servAddr; /* our server's address */ + +int AwaitDGram(CYASSL_CTX* ctx); +void* ThreadControl(void*); + +typedef struct { + int activefd; + int size; + unsigned char b[MSGLEN]; +}threadArgs; + +int AwaitDGram(CYASSL_CTX* ctx) +{ + int on = 1; + int res = 1; + int bytesRcvd = 0; + int listenfd = 0; /* Initialize our socket */ + socklen_t cliLen; + socklen_t len = sizeof(on); + unsigned char buf[MSGLEN]; /* watch for incoming messages */ + + /* Create a UDP/IP socket */ + if ((listenfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { + printf("Cannot create socket.\n"); + cleanup = 1; + } + printf("Socket allocated\n"); + + /* clear servAddr each loop */ + memset((char *)&servAddr, 0, sizeof(servAddr)); + + /* host-to-network-long conversion (htonl) */ + /* host-to-network-short conversion (htons) */ + servAddr.sin_family = AF_INET; + servAddr.sin_addr.s_addr = htonl(INADDR_ANY); + servAddr.sin_port = htons(SERV_PORT); + + /* Eliminate socket already in use error */ + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, len); + if (res < 0) { + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; + return 1; + } + + /*Bind Socket*/ + if (bind(listenfd, + (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) { + printf("Bind failed.\n"); + cleanup = 1; + return 1; + } + + printf("Awaiting client connection on port %d\n", SERV_PORT); + + while (cleanup != 1) { + + threadArgs* args; + args = (threadArgs *) malloc(sizeof(threadArgs)); + + cliLen = sizeof(cliAddr); + /* note argument 4 of recvfrom not MSG_PEEK as dtls will see + * handshake packets and think a message is arriving. Instead + * read any real message to struct and pass struct into thread + * for processing. + */ + bytesRcvd = (int)recvfrom(listenfd, (char *)buf, sizeof(buf), 0, + (struct sockaddr*)&cliAddr, &cliLen); + + if (bytesRcvd < 0) { + printf("No clients in que, enter idle state\n"); + continue; + } + + else if (bytesRcvd > 0) { + + memcpy(args->b, buf, sizeof(buf)); + + args->size = bytesRcvd; + + if ((args->activefd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { + printf("Cannot create socket.\n"); + cleanup = 1; + } + + res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEADDR, &on, + len); + if (res < 0) { + printf("Setsockopt SO_REUSEADDR failed.\n"); + cleanup = 1; + return 1; + } + #ifdef SO_REUSEPORT + res = setsockopt(args->activefd, SOL_SOCKET, SO_REUSEPORT, &on, len); + if (res < 0) { + printf("Setsockopt SO_REUSEPORT failed.\n"); + cleanup = 1; + return 1; + } + #endif + + if (connect(args->activefd, (const struct sockaddr *)&cliAddr, + sizeof(cliAddr)) != 0) { + printf("Udp connect failed.\n"); + cleanup = 1; + return 1; + } + } + else { + printf("Recvfrom failed.\n"); + cleanup = 1; + return 1; + } + printf("Connected!\n"); + + pthread_t threadid; + printf("new id %d created.\n",(int) threadid); + /* SPIN A THREAD HERE TO HANDLE "buff" and "reply/ack" */ + pthread_create(&threadid, NULL, ThreadControl, args); + printf("control passed to thread control.\n"); + } + + return 0; +} + +void* ThreadControl(void* openSock) +{ + pthread_detach(pthread_self()); + + threadArgs* args = (threadArgs*)openSock; + int recvLen = 0; /* length of message */ + int activefd = args->activefd; /* the active descriptor */ + int msgLen = args->size; /* the size of message */ + unsigned char buff[msgLen]; /* the incoming message */ + char ack[] = "I hear you fashizzle!\n"; + CYASSL* ssl; + + memcpy(buff, args->b, msgLen); + + /* Create the CYASSL Object */ + if ((ssl = CyaSSL_new(ctx)) == NULL) { + printf("CyaSSL_new error.\n"); + cleanup = 1; + return NULL; + } + + /* set the session ssl to client connection port */ + CyaSSL_set_fd(ssl, activefd); + + if (CyaSSL_accept(ssl) != SSL_SUCCESS) { + + int e = CyaSSL_get_error(ssl, 0); + + printf("error = %d, %s\n", e, CyaSSL_ERR_reason_error_string(e)); + printf("SSL_accept failed.\n"); + return NULL; + } + if ((recvLen = CyaSSL_read(ssl, buff, msgLen-1)) > 0) { + printf("heard %d bytes\n", recvLen); + + buff[recvLen] = 0; + printf("I heard this: \"%s\"\n", buff); + } + else if (recvLen < 0) { + int readErr = CyaSSL_get_error(ssl, 0); + if(readErr != SSL_ERROR_WANT_READ) { + printf("SSL_read failed.\n"); + cleanup = 1; + return NULL; + } + } + if (CyaSSL_write(ssl, ack, sizeof(ack)) < 0) { + printf("CyaSSL_write fail.\n"); + cleanup = 1; + return NULL; + } + else { + printf("Sending reply.\n"); + } + + printf("reply sent \"%s\"\n", ack); + + + CyaSSL_shutdown(ssl); + CyaSSL_free(ssl); + close(activefd); + free(openSock); /* valgrind friendly free */ + + printf("Client left return to idle state\n"); + printf("Exiting thread.\n\n"); + pthread_exit(openSock); +} + +int main(int argc, char** argv) +{ + /* cont short for "continue?", Loc short for "location" */ + int cont = 0; + char caCertLoc[] = "../certs/ca-cert.pem"; + char servCertLoc[] = "../certs/server-cert.pem"; + char servKeyLoc[] = "../certs/server-key.pem"; + + /* "./config --enable-debug" and uncomment next line for debugging */ + /* CyaSSL_Debugging_ON(); */ + + /* Initialize CyaSSL */ + CyaSSL_Init(); + + /* Set ctx to DTLS 1.2 */ + if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) { + printf("CyaSSL_CTX_new error.\n"); + return 1; + } + /* Load CA certificates */ + if (CyaSSL_CTX_load_verify_locations(ctx,caCertLoc,0) != + SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", caCertLoc); + return 1; + } + /* Load server certificates */ + if (CyaSSL_CTX_use_certificate_file(ctx, servCertLoc, SSL_FILETYPE_PEM) != + SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", servCertLoc); + return 1; + } + /* Load server Keys */ + if (CyaSSL_CTX_use_PrivateKey_file(ctx, servKeyLoc, + SSL_FILETYPE_PEM) != SSL_SUCCESS) { + printf("Error loading %s, please check the file.\n", servKeyLoc); + return 1; + } + + cont = AwaitDGram(ctx); + + if (cont == 1) { + CyaSSL_CTX_free(ctx); + CyaSSL_Cleanup(); + } + + return 0; +} From f08493761a6a3c07447cd7a5ae61c4702233d999 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Mon, 30 Jun 2014 10:25:19 -0600 Subject: [PATCH 103/103] updated Makefile --- dtls/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dtls/Makefile b/dtls/Makefile index d9cdf38a..e182957e 100644 --- a/dtls/Makefile +++ b/dtls/Makefile @@ -1,8 +1,8 @@ CC=gcc CFLAGS=-Wall -DCYASSL_DTLS -LIBS=-lcyassl +LIBS=-lcyassl -lpthread -all: client-udp client-dtls client-dtls-nonblocking client-dtls-resume server-udp server-dtls server-dtls-nonblocking +all: client-udp client-dtls client-dtls-nonblocking client-dtls-resume server-udp server-dtls server-dtls-nonblocking server-dtls-threaded client-udp: client-udp.o $(CC) -o $@ $^ $(CFLAGS) @@ -25,7 +25,11 @@ server-dtls: server-dtls.o server-dtls-nonblocking: server-dtls-nonblocking.o $(CC) -o $@ $^ $(CFLAGS) $(LIBS) +server-dtls-threaded: server-dtls-threaded.o + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) + + .PHONY: clean all clean: - rm -f *.o client-udp client-dtls client-dtls-nonblocking client-dtls-resume server-udp server-dtls server-dtls-nonblocking + rm -f *.o client-udp client-dtls client-dtls-nonblocking client-dtls-resume server-udp server-dtls server-dtls-nonblocking server-dtls-threaded

|if?I=DxN znFuSFpwe86Wf*QWXOoBBDP2n&BfArLDRg(0cK|xItcwL30POO)YqEZ01h(c4Vy@Tm z!;aqf%69)1I+)yo?j118l(RK@sQcdz;UMEb?AUq4@YR@Ea`~qp!l9JuRhBSIjYY@u z$(d(HAgu%7jSVd_oSW)rPm5gXF^k;XL`bsqr$=v)B7HgO<`X>?JQ`(V?qX|F7hcR> zE$jK{)9cqSjl$ybY%g(&gg3D>F!Kd$ed(?nM3+Y8yRf~nC7$GAoW_J_qiKYn53b+m zjtl9un@ZOS>8&@F)@P4nm+)$h&B?`(`Hw3$ryM8?tm@grrur+65#Vf%dUD)=-LF!YFc9crKXONQSCJp=vb_gvOH3r7u3 z1OBSzXwaz0wR49S#w71R*D*ffHU~CtI%=-UWsksV0`CwwLEtEX!%Q?X*3Hi35Q9!P z1~*rl57F)`wb|FRXRN1aq|Z~fexPio&#f5w=%Wvpgq*rhxD;8!iO_R9T=o0i?!Knd zz9pmkDBFS^%WGRI&p7xfpvcR|iz8T}^2_BBEQ7UYs884$`-KCBq7%EE5HN%Iva-X= zb{!H@o(H5Or4$yExvy_HVw#M@q7;)x=V<B+0Lo*REE^Fu2pJkxR5ww=EsjRT*I>oKix`L_!Va=8#rH9YzMl zoH~P=7E{!8I+DhrYmFZxc?dNg4<^Eklu#_GVaAYYS~Qus z%P_O*bH?-PT3bfv3@PE{HlYj)&c@L7qqVJ>gr0%>Ae6EB*ts&tQ#0F}F(h-88G3N5 zR=K9Z->|f~Auy+=G7?P$V>6W*t=N8H1?qnPx|M7*6FWJr#yq^F$R}PoUKM9)e8^9R@x%S#N~EDj+{&FoD%()A*JCZUf`Ce1f9( zmt4xQsQ4=(|FB+Lp5}bqgFZgXUau?ZtwB7Y1*j%}dSl8023-ABHn{Gk7~VS1&BTAN(xHmyK_-Oo{d5HqN!Rd{|y%#;c_>Ap854E&dBO zKE-BVVdGEP^nYgKf41?LZ2W@F-)@`yOTcpk?VYe?x$agFq~* zq2eJ_XucMIbB8xzx(mcry)7B$e!iLOTQ+blMIJw2d)D5JrUtn3i$nFz*JiYAcxU^tAhjB1p`I_GOy;*yoESi!I{!>X3UR#(Y*=F0~Dzk|>B z5?tadfzIjXo#(_QunF9SZ|Gs}|D1XDyKwpMWj>4OMaFy0JIPr`^n2z@i2ea|O(MF+ zd?{Xhmrf56fA7wDL`{s#a5pl}C+cOaH17?km*`n=*JPp}F;2mspDf2E#doh0msb&D za#j(o0lE-;g!yu!$C;x@+bj5f=D0kc6MTR{0;9L3__85?j{AqJ<9 vXc=QY(H6$Jm=EJ3q60wJD59S*qNaR~(S`lQh+^s_BjP#>_j_3dfRrR>mcqp4l|>ycbC0`JL=--Xb=S4^#ebL8FghGMmq*IDkAtn-{+}1CpkI5 z{_eeh-X8}lZ$0(C_10VUR@JFA+%t@ah5EC%Lh{U(K)8zzPPMWNOq}j5SVu~0^5%KSzDvS$1Hs3?w5bOtuEU6{^$RBaqEAPSBb#-Gv6k*`r)#nOq-9e z5MfT`n@67d%RL*m|IJ^z4*qDxxF<88jp%v((-B||xbj$_ag79($}M=7jZfRnOGD%j zG{(4?|Bp1vxQH)jMU9L23mgBpHvF|s-`8elQ07nB^!+cJ{G&Gc7i|1Vw(>r*@&C=H z|00`w$RX@`aZ2G{k>t<2TssA8X@J zvgw~=!?)Vx|7yeIZ1&dMux_!B{ykvJ|F{h|+vF$P_`kN*=Q$gHn+-3t$+z0+2gm#KV*|n*!VG9 z{l2lukFx2n1HS)N%)Ph@FoUfIe!34|DALeh_fMGH!9QQP#7zU_FBGpc-(4#INO7Kc z9p#rop87@#Ojnpg8(V$xc!(3|RN<|vTjcczVu97oaXk>LTQoNm2?y$Y4WWSWdRMnZ z!rr*?$Lvb%t z8xyfuAgp`!=9WMtppg@cD(eIo#ZrhjO8a&u<7K-ssbt zBjLE2g#tFCpfe5;Q=%yr2$*rR*wwK}BI<1k#N)ozs5WX;QCD5Nw!}LbR>hzIJUtlk zlcN|Vr!v?cwE?}ZC0en-UO;1WGzcvrc)?_`x=m6eGp>s@>wRYV8XE)AKEb(FH47@2 z%9afKT1=s}Q%-LItCWZbyfv}rwLU%YH-T1fQ!~76cnJoUhh(coVttKPWo_Y5z!y$L zO?llL&4Xs>vik&p4a_Lgldodnj(87V#!Z9?Bv8WzoUnDLT zjgfFT(5Q=8pmA+eEYczxLy>quG&P3xkQ{$1o40BSboraZbcbKWVNpOAf%WLjC?eJv zjEQ*j>aZ_F7;cQVifBTQLjeYASi}P%meCSupGf6>q!_KU`#zd0tF!>F9k z?~h4I=s+{DqzJlCi;s@RFmKdbqXBON2a7;s1S4_1p;dMzpvHB6;nO3{RNmMUg*c}W zV^(PKHHU>a;P>f1FdE`Fu%HL&Rp+gw1^p-f>|hE{!^%@QWw_aq%dd!>G?ublj25KLyCumI#Mi% zSCD>Bh?S%l2vJY^eIfj$SU3ksFU0MF^dcdmq+^B9NyiDXp7aMoY#_Z@h&EExx1ChO z8k+P{A?_r-Oo&d>%Z0d?)Gfpo((yt(KzfA`TS>1J;vv!rLOen`QHbrNR|&C$^oK$` zMv6t)PSPUW8%aGvbdloOV-IPu5c^3>@O(o$8S5ZYJY2m&I#q~+q|=0WhxBS84v|h5 z;xOq9A+n@ctQ;YojdcR)H9{OE#WT`z((CZ7L|TRpfP3^g<>*(WbA)h`&V~O;D}<;` z9&u*Zp|jk!`$LGOli%iYxsEP@U)l6VX;AA!1eNIZ^MBi<^pMvRsg-JKGxmyB?v&V1yo0z+;vn%( z;;6(S;x6KPiKE2(iEAX*i4PE$NxYu;AaSw88;B1PYZA8+XNe0WZYS;~77}kFK2F^G z9qWH5G3FuEU*b+;C-DJ^?sN zA)Zbgm3TXG8F9VDJBSw$*GT*raSd^q#5;*s5Eo1QG;uw#CUF;WkhnnNJ;YIBA@P3V z^~Aj#E8|}zZX-S<@d4sZ#0MmPgSeBpOX7pXTZnf^{0{L};;j-NB7TIpQ{uzKJBZsP z&Jyn=j!JxlxQn=6;$GtY#5EEhB|bo0Ch>9NgT%!We@lFbSd*ADMlefUATei-U@x(d zm@`Q5IC1YctUqUxAn$qIhk#2yUX}WD@^EiW-O^w&*7w1#Z4T%4%Y$G3+TqN8iUvH| z)M@>f9_QX|#XElibwv;0PxAPXb$Pql(FNwCW6M&1O&%Gu&*3I7ci@HHnJ38FNhsxa z9nViax9g)z@(#RuJdwBicQWH^X2w*7+hJyY?S9>-GD0X z9n7@67ruaHzdVi?PALBp(~t}L3?T=Gbhjc)XLlTbn>ss})!wlDwj#b;Zn|yv z-I%2_$vuC_Uv!&bJ1x`%A&Q!H~WqN@Fq#gp*xFZYD z>1b||NuPHRN~+!NO!^C|t9DPwq~BJtLP*s>NHjgU`iJ0@?kjV`qFg%3Cqa}PO1%q_ zAVol7lcWm_y27Ak2CXwF?hr!soSW`o2ZffxwC)ad97~Md*TF8xYhMRTAb5s zlhu*a2e(}(5;e1Q_exi01J(xV3U_^a_Kvpeid-Fqz->Rt6R!5l5KHxBlFz@RS|~N! zo!xtaHz8O1GVtc7o}#{aso%<)yqkgrnRR)op44xd{&(kWs&M;V&m2!}KvYQLJ%^?5TBftagXej!h|9>2fq? zD3xK^Jq4-9*$(}6Pv)+5-8BPA$(-*eqmsErKbf4&mAl$s#7x=!A6OP8_dS@*jdtDf z7UJpl->-nP^0K)@@Bm+!itc}fU}pZK$>aI1+kc68GPgJ}9NYzx`}Z=X*44g|`tG3) z(-9N8V@QMKbf^*C0R_rrwiN((IS9UPdX{x>u_fmp}FAZ(k8T7 z2j~CpNhlS?)JXA@7{CB4B=}5$pah2jtcn~;QFZdT!*%;UGCxUuk*z@sV-#Yt5I|eu zez{eWU6PM?5eCzy4qcxJn{3y=;Q|U*qtyV_asMxt8#zOD4C`YOP(0y`e~Qz ziT%kJP9kZA(3huP&Lj)ok`-`flJC7KW9SnC4smwbeFdk0{PKOYx+7KSPJNTDf=u#wo~z?9 z*r-~W(9cyIsqa|ga^#s{$io{>nu>gXK4#>50{MpO?%7h%eX8Jem@EspPZcm-=;avG z*PsxplMMiC*y2$8C#Xe%g%&-OKxOJpLvMs0Wno4&ar^a5!NA(r?mh_N0tDqZPsuSv z>YzB2oc=bPU%A(HLzin}yZaDi^m1hKr`}72-1XflB%Dz?iW%0`{sO9Q$#Fh97PGpZ zVe>#w_GWk>Esj+L^BnqY)WV;F8@|bYV3_$VDx0~}eHbOBYlfxE3eqA~=XN5qBQ=cv z`uUf+oSfE>x3prMwt8}MZ2RXgx{_@3{Jjbr1JQqVudX8#%o$9#<&_3`S1+1Pke8cKz zt0=O!*&@Eo`z`|#(=bEVXXj?AsP+9eo0hmASsj-US4a8jqhK{X9)DT0yw&S%hn>b#Y`7q+1+fS~@u$8{y|OEJ$*xbw=Dm_B&x7W=UAe(ny9ALt z;mmXtzlU4LkW5DbXbO{6PxeMyg+}kmz9Q{?l6JWk>_WF>S3>tV0>Z1L>q!kHvt7CT z)6_TLe(^8qI(IM)hYfw~UUr0j8R^hZAps8K@UhV~3s8k&X;x#U+kxuU!4Nc>yfeUz zgS~9qCs{Fla!1$SatReg75yD|wzG&Q*%=dKEU8p4@8F62k{6I3I<_l6QIkB8m)h&< z_zpK3RliGQ{eH*nuJ$8bn#gK9m7Ch%=o4IvCXr%racVc0DLcvAhqWW@%fi0Y3Ahnc zcu(pjx*Hlf2R*~y@|<#@enIL$^3X{vy;51oe&=ex1&VqcbYc4o`o-M=szi685#K@W z-B2rUo9Fe}5oSqHpXq4+6JpX`7k!GDv|D3LrZv%pQf@<^+~=Pltv92)e^Cvx*U_$+*^+FV9Rx3DVHV$$eGMGLgOJl@@lQgodz38x1xB5S$~Ty3 zMLuhfFJglq;*%u$fF|>3?qQ}uJ;BmOD{vrGoV)@Ar`%^KtMRvJNtub;QL_=hf z@{wEiv5AKMVkspb%4Pb^M*0|;E+5Qg`rSslkm*rF>+MqORs-o09WqdpMB=}cpNaBJ~Of7 z-R(A=%3Kqm2ahN-jI>E?p~EsQQi_$%*>6vIjD(c9|NjC2(KBEqLN=}sW z@2sadnXVm@k~Gzu+*5#ga<_FbjG=zmgZ3SrUeKHD>YbRD3Si$)vqsn8`>N!Tai&d& zCrX=2rA^lvHtko9RD3#{)a0FaJS8XbSxLhxNl|z)3ZL3>OfN|XduM#-n)96;Af zW6;uA_c*gNV9UgRp=E5W6s-H|L$oleG)_+a*4Klb%Wf#iEw9Z!56|4Tdn&Aj@m#57 zetYyJn!E@(Gs#{=C+^*KG9M*hsooPp^>p0LP_7fvQks#w_bCb{_vOv_D)AmlyJ?m8 z=G{HRJFV9jyN%ySYGsMLC!j>@k0P8d_#52D=X1Gd5ne{P{?%OWZG$pyhAh&)GSY|a z&E?AWKc9k*3>WK8h=XGN`y-1t_d)eBssz7DbAy3~3je?BYV;X-Yq0Gg9yoLP18a>&5^}GJc8xaP zU#N|bpDXw)zS=keccO0CS|L4%c9YvWX7)+(r+ia}x#ZppGeI?xs0cJ9R*R+h6&_{@ zk7ttluYPu?N5;pE9Onu>qWeOcrpb*JahfzEl;}^M)2avJT3>QB;9CP>&6aFzlCdXS zx`WmnH>+TJIG(_+5i?zGK#)DfsJ}{JhcFWK#;7*1iTbw-XthhcODmVvR+d*(EbXrv za&WtWRfF20V5X>j4Sg9b3hU<9co#3JsH`r(v5#Fc`D#xw{*{PuM8oikq3=Xu=w{d# zlki71V{e72+}vVeVxw2qS~sy6JgG;I`OurOX(AG96>=MtCcBC9eNj}KjZt?kTfc@w z5NCc1xJEzE=Hcxqf9&0(}3GDa4-Xc@W zfO3lH1+(K}l;a0)<1!|SDRh>$cu8I5O!jVRNnDEsLfCY*R!&UzdBVtFbe(CWrY#7B zqJ^5=!lLOxbm9beS(zm%S`^Y|V*`qG&0M)xN_wVGsL0>1ucA3Fr$seEYn-6fG}b3A zL{US({2caQxY`$P)v%2w5Nq-^V$g)K&j#~Aq)EfR7+;88P>X~^tx`)72CR84!@LxY z1+?0rFBb4~zKe?@-Q;Roo$Pc*L#V!oDh{k*QKDa-`j%DHXxuhcsA2PthHf@l_FuJ= zN}FJK34IByDHay@MDr?Y>en|funx0-6g?k%e;A{(=ZGp2baJB``w!qmI`2V#9ivPjkEI?rW@W|a47UF@OnBUfr@*5g#PL$s$ za>o_FO~hv=@|$#gULyE-j?YcRQEd92NYGK>7VA4aR3NlHx~-$c{8N8-p@0 zewdGp0Y>!y`jX$z8@ZO_d(0+;wFny#HY039cmiQB!dnO*ARI#&^7jts1qfFlOhcH5 zupFTYVJ*T&gv|)s5S~ETi|`i02MEUyhIAr7!W9V95auB)M`%J=i?9)4Gr~56ClK}` zyoK-q!ZCy)cOyT-6$sN1<{>OcXhK+vun}Q1!Zw5_5cVRxh42BwF@zyF-{1m-D-fn3 z%tKg?U^d_fn}2>y)lGjX-0)f3?%%)Bde`0me%tNWKQ(yORhqwZVe3Cdzy98@Zv4+T zFW$p;^Qd*t=gzPiG*{E<7pH~qbXm+!5q>3IK=;cxC= zlRtm%+?m>hWeth2p3q7?(>;@mN@gS^ESabhgu!hL`S9|~_^m~o;wddEQG!#n3A%4} zeA3d&>dNxkO7E1?N%#iQ7n-O|Xuz)lcxM>as;ieTVjlc-=83nq=)ML}J*H^TjLFxH zQQ^U><$$MrPE`@~8fbMm;b}-T{KhZnJw zSCME)7asYotVa*5M_hh4>4`<;*L$8o5Z`O!1)evEj|KaX%Hj3JV!l?D!;JrrMue>}1jr4gS43QuFCr3LTtP5=L&P|gFKD>w$_Sr-5tqvk~(ugejzZ$-+< zGbzB(fX$0@2QPdE)+e_K^9J7ux+O>bG36=%vByx3ea<)hEqFH4IPdVH9K&J+&N;M? z^H3IYJHX()gs7C^JHh1$oQo*Od20&<+Ni*|D9dXVf;s1Kz8M4Mn~`Rg%lr&$5I9FM z&UtDFeTn*%81wnYRTwdD{XrGk(4dk%H!cB&8nfe|BHsy54>5%I*g+NWYXAnmf z)jR2zai$8s3p9BYH{<_-xXX|`3b~_akb4UMM8^{h%BhS_~NyQ}=Pi zSw8LK7e4nxPD9+hOu6rnKz+pqgK{xb$l#IB`!#i$*LibLS2B#tjFQr~=Cx-&`U4gT z_)JxfS(eMbz&>x)H+m_y&d^}vGWD6*N;w}950aLvvv3qvC3AjJSe3weL}68H&KC-+ z(a3p0VdXt@y)j76SZbUrz7&(|7KK?0v@^#yu0evUA=D4!j&zWmp@iT#RG1@L$n%F3 z=IX2eY=}X!C#&(J`0TO3=>H00K|-z8 z*e@0T0us4yBN-%DYp4(UkHTX}WPehatH%Co5LS&=zd6KbIo8-LKM$)w=GbbiMe?y* z*#msQg3E!;H7xlz0Lw4bK=Y8h3Dm4#9_~mPV6J;X(C>ze`$2iG5^)|*+t|s7anYVv z5ih$}@wr?2kHFXevLC+>{PIuxaS!lD3qA@wb#p(T<7bWqb4(1eU>EQb3+CqUw=McE z1s-MLUj@94;-@KX5bnNjsaI$@U6f% zSa3V=3e4}QHZGUo7SZh%ycu{4`U?o!e~fq#kukt+2Hpnz-op+j*8}ty_fY*9xWT|r z0~g>k%3m9pU%kBcD~FS3E>Zp!(4El7k<9+^F7P83+ylJbf=>YNuwZ`w|Cj}X-FLBn ze2-Je4pqNA%zBptTl;UHFd~%a*-K`BKf^ThH2YsVQGpk@XvA!zDIc zX~R4V$h??;jSc_Uh99)yM{W378-B@#KeXW!z^4Cr7SRygvg$G4#c*q&e@B`NO4vsG zF0)__xWt0VF9#lt{*S0QKYxr^Y~!!8;RJ9U`XkNaSx4KvJh6fvW z5@ePAcMPz(e&X3#7u)!SHhhf@FSB9YhD9T`jp~V}CJztYSvYs8x4Npf4kv5%pTFhR zTf8_eC>)66^dNO4mnF&T^+&v`Ly-nw$m`c}K9kp%STFE|9SsHafZsE1>WpG&K8=t( zBS}5E<7gi2suSv2-=An{X+;(blE-Nc5Dl#Nv4r>}wdunYpHw8hWNpH6x~;Y1Ff@ zuBzBeJu*@vuvf5RfoHWrqeAZ1n#VK1WNeW-BuU1X1{7E(_oubAV$&_oQSyZOHYJjX zEef>M>OMV=1COkzWB{5x08K&L&s$o)sM1@xxPoV_$!=lB`Ld?Z6FBIs;>N}0i>l^A z%EFPyvkC9~>Lqi^tG!F+&8w}f^VXHmsjl>5~z1Vjp_{ zd3AJ~dCuJFj&HM_vIgsMpqW)^ODo2(FSgno7V5Y|9&BcnvWyw|3RP~MwhC|)v=tj| zH_)^*916%LRVO3LbJN&yg9ADY#v>1av+6ewT5F1WgX@H>1S~)$`VV0C4 zl#}d?^u7c4)Rt#!VJM&H(OHv>OlLa&4;@*Zb9lN_Bav6R%6{}8&zU<-A>0dUcE2+o z8mTs^o+h_Bux)2Jdc8R8(wugA3Z{9(9dHJwrJDU`>7A|++Zl{-Y5y^LR(WFsyESRR n0hXLqFudfEfmR_Ha;9Sx`H2E6i9N-qoa#8>aKC/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="(cd /home/khimes/work/project1/cyassl-3.0.0; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games; export PATH; clang -DCYASSL_DTLS -D_POSIX_THREADS -DHAVE_THREAD_LS -DNDEBUG -pthread -DNO_DSA -DNO_PSK -DNO_MD4 -DNO_PWDBASED -DNO_HC128 -DNO_RABBIT -DCYASSL_SMALL_STACK -Wall -Wno-unused -Os -fomit-frame-pointer -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE -o \$progdir/\$file examples/server/server.o src/.libs/libcyassl.so -lm -pthread -Wl,-rpath -Wl,/home/khimes/work/project1/cyassl-3.0.0/src/.libs)" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variables: - generated_by_libtool_version='2.4.2' - notinst_deplibs=' src/libcyassl.la' -else - # When we are sourced in execute mode, $file and $ECHO are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - file="$0" - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - ECHO="printf %s\\n" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string --lt- -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's ./libtool value, followed by no. -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=$0 - shift - for lt_opt - do - case "$lt_opt" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` - test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. - lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` - cat "$lt_dump_D/$lt_dump_F" - exit 0 - ;; - --lt-*) - $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n "$lt_option_debug"; then - echo "server:examples/server/server:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - $ECHO "server:examples/server/server:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" - lt_dump_args_N=`expr $lt_dump_args_N + 1` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ - - if test -n "$lt_option_debug"; then - $ECHO "server:examples/server/server:${LINENO}: newargv[0]: $progdir/$program" 1>&2 - func_lt_dump_args ${1+"$@"} 1>&2 - fi - exec "$progdir/$program" ${1+"$@"} - - $ECHO "$0: cannot exec $program $*" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from $@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case " $* " in - *\ --lt-*) - for lt_wr_arg - do - case $lt_wr_arg in - --lt-*) ;; - *) set x "$@" "$lt_wr_arg"; shift;; - esac - shift - done ;; - esac - func_exec_program_core ${1+"$@"} -} - - # Parse options - func_parse_lt_options "$0" ${1+"$@"} - - # Find the directory that this script lives in. - thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no - if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then - # special case for '.' - if test "$thisdir" = "."; then - thisdir=`pwd` - fi - # remove .libs from thisdir - case "$thisdir" in - *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; - .libs ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program=lt-'server' - progdir="$thisdir/.libs" - - if test ! -f "$progdir/$program" || - { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \ - test "X$file" != "X$progdir/$program"; }; then - - file="$$-$program" - - if test ! -d "$progdir"; then - mkdir "$progdir" - else - rm -f "$progdir/$file" - fi - - # relink executable if necessary - if test -n "$relink_command"; then - if relink_command_output=`eval $relink_command 2>&1`; then : - else - printf %s\n "$relink_command_output" >&2 - rm -f "$progdir/$file" - exit 1 - fi - fi - - mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || - { rm -f "$progdir/$program"; - mv -f "$progdir/$file" "$progdir/$program"; } - rm -f "$progdir/$file" - fi - - if test -f "$progdir/$program"; then - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - func_exec_program ${1+"$@"} - fi - else - # The program doesn't exist. - $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 - $ECHO "This script is just a wrapper for $program." 1>&2 - $ECHO "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff --git a/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj b/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj deleted file mode 100755 index c6e204b7..00000000 --- a/project1/cyassl-3.0.0/examples/server/server-ntru.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/server/server.c b/project1/cyassl-3.0.0/examples/server/server.c deleted file mode 100644 index 85058cac..00000000 --- a/project1/cyassl-3.0.0/examples/server/server.c +++ /dev/null @@ -1,602 +0,0 @@ -/* server.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if !defined(CYASSL_TRACK_MEMORY) && !defined(NO_MAIN_DRIVER) - /* in case memory tracker wants stats */ - #define CYASSL_TRACK_MEMORY -#endif - -#if defined(CYASSL_MDK_ARM) - #include - #include - #include - #include "cyassl_MDK_ARM.h" -#endif - -#include -#include - -#include "examples/server/server.h" - - -#ifdef CYASSL_CALLBACKS - int srvHandShakeCB(HandShakeInfo*); - int srvTimeoutCB(TimeoutInfo*); - Timeval srvTo; -#endif - -static void NonBlockingSSL_Accept(SSL* ssl) -{ -#ifndef CYASSL_CALLBACKS - int ret = SSL_accept(ssl); -#else - int ret = CyaSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo); -#endif - int error = SSL_get_error(ssl, 0); - SOCKET_T sockfd = (SOCKET_T)CyaSSL_get_fd(ssl); - int select_ret; - - while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || - error == SSL_ERROR_WANT_WRITE)) { - int currTimeout = 1; - - if (error == SSL_ERROR_WANT_READ) - printf("... server would read block\n"); - else - printf("... server would write block\n"); - -#ifdef CYASSL_DTLS - currTimeout = CyaSSL_dtls_get_current_timeout(ssl); -#endif - select_ret = tcp_select(sockfd, currTimeout); - - if ((select_ret == TEST_RECV_READY) || - (select_ret == TEST_ERROR_READY)) { - #ifndef CYASSL_CALLBACKS - ret = SSL_accept(ssl); - #else - ret = CyaSSL_accept_ex(ssl, - srvHandShakeCB, srvTimeoutCB, srvTo); - #endif - error = SSL_get_error(ssl, 0); - } - else if (select_ret == TEST_TIMEOUT && !CyaSSL_dtls(ssl)) { - error = SSL_ERROR_WANT_READ; - } -#ifdef CYASSL_DTLS - else if (select_ret == TEST_TIMEOUT && CyaSSL_dtls(ssl) && - CyaSSL_dtls_got_timeout(ssl) >= 0) { - error = SSL_ERROR_WANT_READ; - } -#endif - else { - error = SSL_FATAL_ERROR; - } - } - if (ret != SSL_SUCCESS) - err_sys("SSL_accept failed"); -} - - -static void Usage(void) -{ - printf("server " LIBCYASSL_VERSION_STRING - " NOTE: All files relative to CyaSSL home dir\n"); - printf("-? Help, print this usage\n"); - printf("-p Port to listen on, not 0, default %d\n", yasslPort); - printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", - SERVER_DEFAULT_VERSION); - printf("-l Cipher list\n"); - printf("-c Certificate file, default %s\n", svrCert); - printf("-k Key file, default %s\n", svrKey); - printf("-A Certificate Authority file, default %s\n", cliCert); - printf("-d Disable client cert check\n"); - printf("-b Bind to any interface instead of localhost only\n"); - printf("-s Use pre Shared keys\n"); - printf("-t Track CyaSSL memory use\n"); - printf("-u Use UDP DTLS," - " add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n"); - printf("-f Fewer packets/group messages\n"); - printf("-N Use Non-blocking sockets\n"); - printf("-S Use Host Name Indication\n"); -#ifdef HAVE_OCSP - printf("-o Perform OCSP lookup on peer certificate\n"); - printf("-O Perform OCSP lookup using as responder\n"); -#endif -#ifdef HAVE_PK_CALLBACKS - printf("-P Public Key Callbacks\n"); -#endif -} - -#ifdef CYASSL_MDK_SHELL -#define exit(code) return(code) -#endif - - -THREAD_RETURN CYASSL_THREAD server_test(void* args) -{ - SOCKET_T sockfd = 0; - SOCKET_T clientfd = 0; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - - char msg[] = "I hear you fa shizzle!"; - char input[80]; - int idx; - int ch; - int version = SERVER_DEFAULT_VERSION; - int doCliCertCheck = 1; - int useAnyAddr = 0; - word16 port = yasslPort; - int usePsk = 0; - int doDTLS = 0; - int useNtruKey = 0; - int nonBlocking = 0; - int trackMemory = 0; - int fewerPackets = 0; - int pkCallbacks = 0; - char* cipherList = NULL; - char* verifyCert = (char*)cliCert; - char* ourCert = (char*)svrCert; - char* ourKey = (char*)svrKey; - int argc = ((func_args*)args)->argc; - char** argv = ((func_args*)args)->argv; - -#ifdef HAVE_SNI - char* sniHostName = NULL; -#endif - -#ifdef HAVE_OCSP - int useOcsp = 0; - char* ocspUrl = NULL; -#endif - - ((func_args*)args)->return_code = -1; /* error state */ - -#ifdef NO_RSA - verifyCert = (char*)cliEccCert; - ourCert = (char*)eccCert; - ourKey = (char*)eccKey; -#endif - (void)trackMemory; - (void)pkCallbacks; - - while ((ch = mygetopt(argc, argv, "?dbstnNufPp:v:l:A:c:k:S:oO:")) != -1) { - switch (ch) { - case '?' : - Usage(); - exit(EXIT_SUCCESS); - - case 'd' : - doCliCertCheck = 0; - break; - - case 'b' : - useAnyAddr = 1; - break; - - case 's' : - usePsk = 1; - break; - - case 't' : - #ifdef USE_CYASSL_MEMORY - trackMemory = 1; - #endif - break; - - case 'n' : - useNtruKey = 1; - break; - - case 'u' : - doDTLS = 1; - break; - - case 'f' : - fewerPackets = 1; - break; - - case 'P' : - #ifdef HAVE_PK_CALLBACKS - pkCallbacks = 1; - #endif - break; - - case 'p' : - port = (word16)atoi(myoptarg); - #if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API) - if (port == 0) - err_sys("port number cannot be 0"); - #endif - break; - - case 'v' : - version = atoi(myoptarg); - if (version < 0 || version > 3) { - Usage(); - exit(MY_EX_USAGE); - } - break; - - case 'l' : - cipherList = myoptarg; - break; - - case 'A' : - verifyCert = myoptarg; - break; - - case 'c' : - ourCert = myoptarg; - break; - - case 'k' : - ourKey = myoptarg; - break; - - case 'N': - nonBlocking = 1; - break; - - case 'S' : - #ifdef HAVE_SNI - sniHostName = myoptarg; - #endif - break; - - case 'o' : - #ifdef HAVE_OCSP - useOcsp = 1; - #endif - break; - - case 'O' : - #ifdef HAVE_OCSP - useOcsp = 1; - ocspUrl = myoptarg; - #endif - break; - - default: - Usage(); - exit(MY_EX_USAGE); - } - } - - myoptind = 0; /* reset for test cases */ - - /* sort out DTLS versus TLS versions */ - if (version == CLIENT_INVALID_VERSION) { - if (doDTLS) - version = CLIENT_DTLS_DEFAULT_VERSION; - else - version = CLIENT_DEFAULT_VERSION; - } - else { - if (doDTLS) { - if (version == 3) - version = -2; - else - version = -1; - } - } - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - InitMemoryTracker(); -#endif - - switch (version) { -#ifndef NO_OLD_TLS - case 0: - method = SSLv3_server_method(); - break; - - #ifndef NO_TLS - case 1: - method = TLSv1_server_method(); - break; - - - case 2: - method = TLSv1_1_server_method(); - break; - - #endif -#endif - -#ifndef NO_TLS - case 3: - method = TLSv1_2_server_method(); - break; -#endif - -#ifdef CYASSL_DTLS - case -1: - method = DTLSv1_server_method(); - break; - - case -2: - method = DTLSv1_2_server_method(); - break; -#endif - - default: - err_sys("Bad SSL version"); - } - - if (method == NULL) - err_sys("unable to get method"); - - ctx = SSL_CTX_new(method); - if (ctx == NULL) - err_sys("unable to get ctx"); - - if (cipherList) - if (SSL_CTX_set_cipher_list(ctx, cipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 1"); - -#ifdef CYASSL_LEANPSK - usePsk = 1; -#endif - -#if defined(NO_RSA) && !defined(HAVE_ECC) - usePsk = 1; -#endif - - if (fewerPackets) - CyaSSL_CTX_set_group_messages(ctx); - -#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) - SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); -#endif - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (!usePsk) { - if (SSL_CTX_use_certificate_file(ctx, ourCert, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server cert file, check file and run from" - " CyaSSL home dir"); - } -#endif - -#ifdef HAVE_NTRU - if (useNtruKey) { - if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey) - != SSL_SUCCESS) - err_sys("can't load ntru key file, " - "Please run from CyaSSL home dir"); - } -#endif - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - if (!useNtruKey && !usePsk) { - if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM) - != SSL_SUCCESS) - err_sys("can't load server private key file, check file and run " - "from CyaSSL home dir"); - } -#endif - - if (usePsk) { -#ifndef NO_PSK - SSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - SSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); - if (cipherList == NULL) { - const char *defaultCipherList; - #ifdef HAVE_NULL_CIPHER - defaultCipherList = "PSK-NULL-SHA256"; - #else - defaultCipherList = "PSK-AES128-CBC-SHA256"; - #endif - if (SSL_CTX_set_cipher_list(ctx, defaultCipherList) != SSL_SUCCESS) - err_sys("server can't set cipher list 2"); - } -#endif - } - -#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) - /* if not using PSK, verify peer with certs */ - if (doCliCertCheck && usePsk == 0) { - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | - SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0); - if (SSL_CTX_load_verify_locations(ctx, verifyCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file, Please run from CyaSSL home dir"); - } -#endif - -#if defined(CYASSL_SNIFFER) && !defined(HAVE_NTRU) && !defined(HAVE_ECC) - /* don't use EDH, can't sniff tmp keys */ - if (cipherList == NULL) { - if (SSL_CTX_set_cipher_list(ctx, "AES256-SHA256") != SSL_SUCCESS) - err_sys("server can't set cipher list 3"); - } -#endif - -#ifdef HAVE_SNI - if (sniHostName) - if (CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, sniHostName, - XSTRLEN(sniHostName)) != SSL_SUCCESS) - err_sys("UseSNI failed"); -#endif - - ssl = SSL_new(ctx); - if (ssl == NULL) - err_sys("unable to get SSL"); - -#ifdef HAVE_CRL - CyaSSL_EnableCRL(ssl, 0); - CyaSSL_LoadCRL(ssl, crlPemDir, SSL_FILETYPE_PEM, CYASSL_CRL_MONITOR | - CYASSL_CRL_START_MON); - CyaSSL_SetCRL_Cb(ssl, CRL_CallBack); -#endif -#ifdef HAVE_OCSP - if (useOcsp) { - if (ocspUrl != NULL) { - CyaSSL_CTX_SetOCSP_OverrideURL(ctx, ocspUrl); - CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE - | CYASSL_OCSP_URL_OVERRIDE); - } - else - CyaSSL_CTX_EnableOCSP(ctx, CYASSL_OCSP_NO_NONCE); - } -#endif -#ifdef HAVE_PK_CALLBACKS - if (pkCallbacks) - SetupPkCallbacks(ctx, ssl); -#endif - - tcp_accept(&sockfd, &clientfd, (func_args*)args, port, useAnyAddr, doDTLS); - if (!doDTLS) - CloseSocket(sockfd); - - SSL_set_fd(ssl, clientfd); - if (usePsk == 0) { - #if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) - CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM); - #elif !defined(NO_CERTS) - SetDH(ssl); /* repick suites with DHE, higher priority than PSK */ - #endif - } - -#ifndef CYASSL_CALLBACKS - if (nonBlocking) { - CyaSSL_set_using_nonblock(ssl, 1); - tcp_set_nonblocking(&clientfd); - NonBlockingSSL_Accept(ssl); - } else if (SSL_accept(ssl) != SSL_SUCCESS) { - int err = SSL_get_error(ssl, 0); - char buffer[CYASSL_MAX_ERROR_SZ]; - printf("error = %d, %s\n", err, ERR_error_string(err, buffer)); - err_sys("SSL_accept failed"); - } -#else - NonBlockingSSL_Accept(ssl); -#endif - showPeer(ssl); - - idx = SSL_read(ssl, input, sizeof(input)-1); - if (idx > 0) { - input[idx] = 0; - printf("Client message: %s\n", input); - - } - else if (idx < 0) { - int readErr = SSL_get_error(ssl, 0); - if (readErr != SSL_ERROR_WANT_READ) - err_sys("SSL_read failed"); - } - - if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg)) - err_sys("SSL_write failed"); - - #if defined(CYASSL_MDK_SHELL) && defined(HAVE_MDK_RTX) - os_dly_wait(500) ; - #endif - - SSL_shutdown(ssl); - SSL_free(ssl); - SSL_CTX_free(ctx); - - CloseSocket(clientfd); - ((func_args*)args)->return_code = 0; - -#ifdef USE_CYASSL_MEMORY - if (trackMemory) - ShowMemoryTracker(); -#endif /* USE_CYASSL_MEMORY */ - - return 0; -} - - -/* so overall tests can pull in test function */ -#ifndef NO_MAIN_DRIVER - - int main(int argc, char** argv) - { - func_args args; - -#ifdef HAVE_CAVIUM - int ret = OpenNitroxDevice(CAVIUM_DIRECT, CAVIUM_DEV_ID); - if (ret != 0) - err_sys("Cavium OpenNitroxDevice failed"); -#endif /* HAVE_CAVIUM */ - - StartTCP(); - - args.argc = argc; - args.argv = argv; - - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); -#endif - if (CurrentDir("server")) - ChangeDirBack(2); - else if (CurrentDir("Debug") || CurrentDir("Release")) - ChangeDirBack(3); - -#ifdef HAVE_STACK_SIZE - StackSizeCheck(&args, server_test); -#else - server_test(&args); -#endif - CyaSSL_Cleanup(); - -#ifdef HAVE_CAVIUM - CspShutdown(CAVIUM_DEV_ID); -#endif - return args.return_code; - } - - int myoptind = 0; - char* myoptarg = NULL; - -#endif /* NO_MAIN_DRIVER */ - - -#ifdef CYASSL_CALLBACKS - - int srvHandShakeCB(HandShakeInfo* info) - { - (void)info; - return 0; - } - - - int srvTimeoutCB(TimeoutInfo* info) - { - (void)info; - return 0; - } - -#endif - diff --git a/project1/cyassl-3.0.0/examples/server/server.h b/project1/cyassl-3.0.0/examples/server/server.h deleted file mode 100644 index 559b2bbe..00000000 --- a/project1/cyassl-3.0.0/examples/server/server.h +++ /dev/null @@ -1,24 +0,0 @@ -/* server.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#pragma once - -THREAD_RETURN CYASSL_THREAD server_test(void* args); diff --git a/project1/cyassl-3.0.0/examples/server/server.o b/project1/cyassl-3.0.0/examples/server/server.o deleted file mode 100644 index b76bf473687cc83a016a66ecab0d3b713a1bc9fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14940 zcmcgz3wTu3wcddVCWsCSzKV}i9ThYg^5PYv5J(_sgh&FSBEw{6lFVf?GtQg=qEx}j zD5qnrwOZR+t*=^ZwYAl1tyM!+(6&C>YU{nNm3sZW#GqoW_=Md5-)HZclOx`K-tT_* z=*++Wz1LoQ@3q$6=bSa+vgX!>B_$%kjIxmi?2|cS}0XOs*UYk4|ksmnY!)s%Aj{7uSbqquRx@SBESZPEecmE zoTsouVH0t9d_G6S{44UNFP7VrnX)~1B&%?3mu;NjWBeNS<{xEKZp19zG*@KWPBVS0 zyaO92V0BHtHTj17HqEW{<|@E9T~;Ez{l}wZ4HqqBHTa}Sa)aLfN&opj2 zLu4v2tJrBxoa3=*kaKMH#qyplmRwjPj2W{AIQH;F>*vJc+Os2Pc(0y=WoJi%mrcr! zoPAkMcBIkU|GRx7BSXJA5cS({&W=p>Uil}K^Zk#qcgfC?9q>R0jWu*H1P2!VH2dKg z@8!3moE=$`IS8#Svh{1Srrq0r1@&D^9oi97hf=76rV7qi4my>VxwPruMDKj~{5fS?fOk?C> z?gVf1)5DWwojD=<(OB>GgWd<9&OWmbRV#(L!g_8Xd*7i@g`G8!z058lCXQiAEspDo zVz}*DY&Usr&tg)lG_g>ctV-6q*{x%;AC-Eq{AM{_m}h;-%OgAF?1#T>!BU4?cYO{O}?hwpm_u)?XfC+)+bUX`(cSU_d1%fw0XiD zUu?nVI{|&BDtWl3j1F-2dl3D~O<#i)^!*QlH`oKr7G@*Vo{mANjw=LuXmO<$16DZn zP(m$6PV_wJam)}aK8H2fSlj!3FGHAiwf*L=-h)C16x(~%+q}(t?x1&Czi$U*%tmwy zTd!I%-sXZ(?3p9lkPj_E;0NzvQuozI9z&2g~H-yRa-ycZ}$=`hBmVWO`9W zHN31(hL6hau|CO6QX|@Kw*{OQ<~~r{p%59~Ei*7F+MjMk>p=k7iV^;bGOGvdBIY^4 zcG^S_h2cD@QgxQSu*@wV!C2_B12S@Hwx8(~Et2~?L@>Z^)Uh7YEJAwnzyrP)#-V8X zCZhJAb}d5{!%a}bmHoA}sO#$0&;@ZNQ$~Ht6}dsUC(L_@xBvI_-M)b<&?<&DvC9|n zTq&1ymCpoxQO_}SY|o`olAfa)UZ3kZ3OGHde8c72p4*n&S)4(=cGz_4y^^ZY^kG01WvIxi~H%lU%!_?7Cz&GrQhX%(jNuC55aMktoNW)7&u3V zqANEqx|T5>?14RyhI94ivYyKB9kCty0J_Lco;f%_YNx@mvX?sAHsV1geZ7ct*v1tLP%`mx9oA2tlpw z$@i^ownB<1@8bT)zV>;N-B;qheyg|tkC+0q_F%DX)~~a#?aO{V26wr=7^2GhwKw+= z+yDGaP82t^oVBj9xIt_mmDZ8`U#7g5Flh2Q2lDf)@)~(_E96k5F>?S=L~wQaCRksP z@R{F|J&O;X)+^qDG@9iYP4{`!AZt*S9hsY%1Xm6~B@}ZewyB19UTjw}Z0)MI)m`mw z)Yy|7T8(E|RcuGGaO1lYBAN_;rBF&2O3^|oP$(@|n#zkx_aSyw?R&-I&SLSEV(|~f z;&v3ZTIqo+FduqSJ)SEQDy9aww%Gql_Af@C4)tvVqwYGonny663*5U!@%`)%J-mJN zso^IThc831J-e%HCucqSU0VgC-3JSjo+&VHm+n)Qzed%Lg{IN6PWG7?Q+>Z^y?Z{+ zG5$~6vQL&>@I*UO65I+-GhsK^p(=lsuL^*d+==l2WP2W_&!?TrUVKl(E6N;IH(gsO zH#jh_#M`v3kc9APJ45;?+cHCULAqdIscJu}tG4*zN3zPL>`p#`?N=Rn64XVNwjunpPYzu@(K55!0;2{ zjLG?y-Pyt2)ACY*3NRTO%vWW19qpP^ot)F$(Q~TW-<v$-m;RD-WCf>dPl=YirBBcHBWPJ-wC(`~T;)*yxD_Q$}ARV{`?L zbWil+i(`>53;*;`BxRynDnsT5Vb6$~PBx7+Bty|;4^+pZY160{c6}@XI+h- z2uz`5*lT?%igl<8+eD%%(wXTN%OY}G!tbAs{}r$l>VZ+{m=n{g<9J~v%wWtgjK)|j z5lVArb7Gld_540Fk~Rv}$w+W5gbi19D3eMd?A+D#g^CIzn$|1Pj!tK|09D@=ikmSR zFlt411>-_hn4zRG+EQptCqiozuwDDoz_RA$?ahr%P0NZ)LyyiV;=`eV(G@|o*tTZ( z!U*FLk_Ckw3)%upmNqrFHlA0|S6ws9UxojwMLc0(xhaGYoY|8|n<5iV8lgly9tjmD zoQj0j$*5F=so-pnn9|lkGm+A6kb2Bi5JBA==}n~iL|-tSju|pq>=39-8V%TdXVCg> z+=+0bT1+BdVQ@EART$w&S1=PZ5nkg(<+@@Irzb9`s;s@Rf?IZ7?bNDiMy1iw+FtFi znOZw-noC2-XyAt9pbN13qFvDtH;=suITQOTjEaD+TwCmOR$-HA$s&&G(^%}|9H%jZ zvjbtSx9X@qmGpuRJjC_f(WkIFG-~NFW69Ev=6Z&>oO;?wMPflSx=tQa?lVKFshnG! zYfB`StT1qNAjHicL~MpzbM$zXF{2@Erlfxs6i>2(P-VENuPK_AN2GmN8$7J-Bds7U zL}h1Dem;X3{tm|b49p>t>I#OibK(ePoC%3816wy3V;mZZc&txqsl=|;*K(Xu$yCH> z?+KhmwHO;Wj}D9`biB;u8wSohj! zyxXw%aY2@SD%*?xpnMChvm}Tc!{T_DVa!{V8eK}<%Uc(wkz%Ib`4sWqmW!S3|*WzDV4jqS~W+Pdjo(ReU6&6wJW8wh+D zH(Fa)oNb`bG>nD#^qY|lrtpUny}dYUgugSL7JlsVh=0+N<&|j@#uEN?4?@licA})Q zuUB$vNF~BSGbsG_x6LS6?XRARF=VUa4nzElVkz43z$#Q$Nz|d-KB?GAW>b_5^8AI% ztVZ&nT5bX=)K9FViKaOP@f80u>ty~P(WR5<7c@-EqBXN7*|gMZG85n9DXsA zSOw%Y0gIpw^riKoyOh)Q7dRK|XhXOZY(iPenJlP_`gom&k7GJQ9ES=_hQA=tK3p&7 zSc{LgF^WQ*0)0rd=u7LVwAPMkHJqxySD#W^gj(;_kR`bXM=lH|DE8gz!_$o-&rVM zf{(V(pU|EI*ZqHp@(uXt^*oFAyTSE%7Wgm0E0w+t;Qs}#*Ovsp7HwMoBFyhYwAU#4 zi@{HUjpi$!2akd4c)Je#76-ox{6z=97W!{P-@{b@>wsmb!w_EO&VyyM_I(0+-7d(eKrgL7|w>frx?{0$EN9C*ONhrqWu_^~MOqjBU_BF+FWg*`Q2 z13tmQU%`009rFBXWXQqyfq&rOztXBCmWrREy`xZ9DjHN-@3#>A$qUCk{8c8R;PX&E zLGdhj5@kEy%fy}F*MOg-+J6i_h%)uE|AXKt2t)D5zzuMp;@iOacM)eP{v7x%;5@I{ z|4-mAfS;)N-@ti5YrYt^sRBPnwKszE{IJi5GI1Qvmjg?S@y_2rHc46PA1nTD@!8E`;@~q}rsQHzU z%qAfHNPF4XQAdO7Ot_-=)A^`z5{`=SMeGv@6b*TV>qs{@{}%Cj2(5S=bjxe z-hjQY#{{=v=tIYph_5Jdj&#TvPvM@Z`Il5XZ9@4c98=~x-*EB2Ii}3^2KY)}EecKK9gMh0GB-%xp>sYPj>N>w6TG- zcZX|y`3tC$Vf#TY`+vhFf2PZygRb^lU0nW2mqY)-F8d^0`aW>QL#In$(#3z~;yo^X z_o%T6T;CEGf7CUfb6oseF8%9V?OR;!n_c{37r)6h{(RSb_qo>Zb+wDghG1_p7D-RH zGYty-A!L!5Y7HQ7W{SX~)}`|sTLViME^Ke^2y`^gZ*2|;f2%{r-<$3hcs9GfNd_6l(B(D2J-!TsYuLpZSy5G8tJ`bmXu(3)nPRz2 zoJ2N6O(ByG%OXMM9c{8O6^YoTv+Y_tBM}&tF%yYQ>g-5wyBRdo{;E-|dK9Y}#R`ko zlYy0>-cDBpY68k3DqC$Yb><9*$bJQ8Q$Qxt_OGCZ?J^^>|MuEqd-eV$>WUKXNh<3s z=vWzuN7k#E1W1v`4A|N908@nSCYfLfs04G`*@~o3fY~UO=nF8>=WcJaGw8_eeWsb? zBJ`tOea=qI;j8KZ6IIN-6h`ID?WnJ-6M;a;>`O)hos<)ZY^Jn2`{Kyjh-e(jk!nf_ zJJ}=B(Qaf=964LTT(8hsSD~`8TKi04XG?{hLl&V}0vRr4Lr%OaED&f-E>WN!^O- zj^1Qbi{_Nhq>*|3GY6)$R?E$Ty^!@ zsO1qO3;HOWp(^UMNS&_Goq2Mx3(qv7uGbx^wa#j-vs$0Gb-GVoVVFV_&ks2ht*1`w zsndGo$tPv>9BOCjr8X~HW(Pq4Q$pk@ZPi+BwO$7^b8?_+P6opE_e?#t8G1%D*cI(F z^#W(;Nzc$KW+)XiIcJE@;*^P;F_F56O4Te*f}EO&GevJOT5#RsI8JTEN@#tUH<(mN z-cq>W>e;No|L8|vqZMmoRqH~HwpvXsyTp0ZlfO#op7K;?6fMASSn*5}Gmtk387Fu> z5#zsMzlW5cY3HgucLT|)d*)tBNKi@cs# zg?~l>^x#2dxvF19ME_pJHxZElxCZFCU5IDNq4#AX#zZz6`FN8xn}zYFwSYUfKh?gOj`KBn+#g?}e5 zh8=*OB=QYJ7>jul&)0+)A;M_m@NDI|2G5|xuj5^Xh=j!g;yT!yxE}cfB9cUR5c`Dq z195{8yND+A5iP6(&(h^52ywo`uK_*RAwNO<9`bm^JCKhX2fPLE=)@lhaW3(0{D}zh zhj>3F-hjLW@drYD3D0Dn?;ytmEI(0*#pKYth6ueD5qe)BLhpM-=sg54uGG7T2)#Ll zcM+j~ka#QBLA)N%tL4CN!=J=Fa!|nX^Msg1JRkXQ)?bGF0r4ulQxd<6{H4N2iJOG@ zJ@E=5UL{^BMB{k$KNs^Ru7Dn(=T6v{c)1X-6Yqlm4+L(;JA=Y5VpfQLBJ|!&gx z{x)$7{0c0`OZynSn0vmD_j6(nb|$8TFo5MpAup!dTZmspUWfIVW4Ef`OoaaL6R$=d zjyNF1uZjIa{Dzo@|B0~ETR_I&2SgTCr(HHlZXV$Y+?;^iNspuu!)HE6~t1+A90)zJ;alQNE3a?=Muk+xFjBr z`4N%e`5qC8!n=tE@`ywvdbSd=p5Fqwo_{A|p0BbV35hp}Q;?5APJ;e9lDH8$D_}Wd zy^0+DW|Ef)F^>p+XR7*@MCe=1dc<0kh?uz)$aA)z{461^0x~YIC2xg26~Bf26xfv< z<2*=ysu0^0{~h_+$fJ^@|9_CI+EJw_bIRyMC*muBk)Ez-wiSv~8nD=xd`Yj-$-#KhY zEM7>Ceo=DBUqlZ1%|yswPlWvKY=_N$LJs+d$?wDzT z`w2PpPC%RI62v!<>zYS?n-I%@+{Y^wu2vXU_-_hR3iCkr|DNJM0DADE{kW=sksNy8 zQ0==E{zKu%3i%@d$1PJ>3*fDnAYR hTJkdxcf^ITBe5C3ix3y#oFL8@B1~L>^MVLv{|$d5es}-? diff --git a/project1/cyassl-3.0.0/examples/server/server.sln b/project1/cyassl-3.0.0/examples/server/server.sln deleted file mode 100755 index 7c9de302..00000000 --- a/project1/cyassl-3.0.0/examples/server/server.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Debug|Win32.ActiveCfg = Debug|Win32 - {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Debug|Win32.Build.0 = Debug|Win32 - {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Release|Win32.ActiveCfg = Release|Win32 - {13A60276-EFB2-4D3F-AFC3-D66E4C4CC27B}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/project1/cyassl-3.0.0/examples/server/server.vcproj b/project1/cyassl-3.0.0/examples/server/server.vcproj deleted file mode 100755 index ebb1af4a..00000000 --- a/project1/cyassl-3.0.0/examples/server/server.vcproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o b/project1/cyassl-3.0.0/examples/server/tests_unit_test-server.o deleted file mode 100644 index 5317d3e42aae82e2578838582acc3411358c2e73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13432 zcmcgy3v^V~x!xgzW-vMtv}(b6EF*#@AukXkAddv2Mu;X@tdC)s2gzkJGo3jDM5&^a z5l&-#^lGiTs@1l7Z);nreMoIBxd=#m+uByEtF6Mdx0W%S#GdHxhFDWZ4D;N4H6Xl}J5a7m-D$*ojx;Rc8BbIl5;_@3` zd+%r=_ObTL8@IFjV4lQj3Hk>6gFj@^7u?kntT+k9eeaEqjt=w(t15&TsBqeY9RqDX zK-aDX6=)e9Fnyx~)XDAXy0i!K9H#|hBL2kcv%%ZJSCRv(HO|pE zS7V*VHjQ$DBb5W2$mJ}819q^xa3D8%m#mZZEy3t6X`iP!t&ysMZ?d}Zx_#8fPYaQ| z^gKJ*5g7aum)R2R8mN8@)ir^_?XcCxPnU^6|IH{l2aBulIn_aFoWiz1|92{dXm!3u zjn1AWP!M(M9L!-bSLPga9%ub$TE*s;;EKRg`zi3aR+bvlouE~!{e1)iqhe`qvNsN&LOIB_iqwFUXZU&x)1-w<3Wp1=%7 zpW+4xwC*37BMk)L|V>g>3_gV2gbcrs8wv2F+66DGL;?;OHBIb;6!dYAL*)n~HvxmWNX-XjXT> zYV`9bg4I%R%7+LZqXw8R?1fM}4}(x0?F#hKj#@1S47&7CLN6xIiT=b7UYt7wySeHg zvKD)3SAXz1bbx8Onw4C2yFIOb6r>FU3`&y*THg+QVq0KFe{e74>~ox#h6hk^c9i7g zrVX_2(sF5>2!a0Fv3Lv^bzUCci(=rZqa=GtT6#bXvQ_vYHx}^>i z9K0p?-xz10qjF$D6#}{|SRof$8FZA6AJMw(9Ut0OA*US2g7%_voQOO9!BpqPt_plEg15fdzs!KXTg}ih`mvn?ZSNGPT#YlMsu7o3O zz>yrGbVx_Uoqc2cz#ve5$e<+sKrMWnw?V?DeM?eW6vfx-&R4>Q>duD#3Rhk5s-^zQ4!rvcQ5#V#n9@zOO=xy7j%?)m%Z zXnf!nxgFv|Llx$wC0*(Kd@#w6>teLTcO6xRt#kdj{LU%GEuufpF{}O1t7pX`W_1GA z{VXSF2df7AgMU@Ez5%RL?SV>dv5Mbe&Bh$J-U)JKQ#prm=5`1ApWqVg;8lY+qacRY zqeJNpqxg~_6=FNmsj}?0z;OCqF8t9T<1aq6!@ck~{)vTST|6Y|0~GfwcbFy0QJtOn z!=q~6JFw^FQJUi+P&BMutjo|4X%V^V;*u(hCHe#5Q^h4Qj5eC3q01bcs+Yo`N<^MT zYW$}6eLBc`Y~al+F`;7x4iFhbIAm?Sq9XozHWh`IfI+EJ_Gf1Yd`}sOC>iu^N1d}r zO5_if1@0OO^gqs!y9zD8$-i z3(BCUW9Z%SID(@2gX3}&%xmLFg(*4awWatHxs|gBv<=}v=axnoz6Rh^ziq1p7<^Q1 zy*J)_>uUpD!RSCDxYGaVo!pK_;@iq?Z$kntbRj&c4~QyQq!LtaUo3h6bHprYdk&&) zw3TbJ8w%U5uZBPrr}4_dE&c4Xl@Xph*;PyZTgzEHu73A{p>erOoIUw>%P_C*K%pP? zFtu|~D}IvQ1O2b_<;_)Xhe}L}z?aT55E@y6ZP5*9C}+J1XH^!Rr5)sKS1z(oa9+&s zJ&gBKXTP%}(9bu~5xA*;w;gm2>#cPv0}4UG@w9*W;xJ#unVu&cS9 Bb#tB4tt-( zpdIXmVja*G%dk$p=Ic-0+2ZS!C&1XPjHRs@IUVm^z`j#3qcKs)_v=Cc^BUB*F$}3> zN;k6nJ0}GS2jDC;jGd>p82r@b=sD|?5H~i=4Z(8b)4Ty*6T0&1?So6oc%^`!qfVK= z%k9}kF%cL%>2G*3$H(YE`xYM#*b316q4RT-V62-lG!7)nso@Xq%c?5+Syrhf4>umf zr9r+p4NqtBX7(B8jYSt3DXKWKL8GlPp)m?W=_7Jvg;w@k9QV5TY^k`TRQ!Ia_)QdD zDo)h>K0l^f`d-cscGIs0`pnf#cMF#kUyh>7eI|-_!gFSyIXF+$Ccpsl-DPkSO~64^ zz2*!oPm38|%PA|qg5zG#A1I94Ck+|K2Gdne z+UM-gKV5|#vfXRm0eogb@Rd}{Ke_g%HJ<>%w(t=)UgpYHqmJ(DLrJooOU_rICH|2w~(c zv**RBJ3BfGubg)5^Uti|Cjb9@F0{I1;f&Rn%31NSmF@1i_S!`3bWuAq63f`xnUO?K zENRz})TU#-#rkY4vo@Cb!1^_@J}G{FbXC?)F3rU|(#>m|6U_^oBh71?JDXF>n#H1U z)avYPx1cB6lS+zQGQ27gv+R_$I%ZqFF}phz^;Aae^+JtoMZ(E5Z7U1ONKd*uma!5& zS=*`?sy>l|awCbkTk)PmtlEln$0BQF*$OA4RwkFU;+a&hwYV?LnRKUmV^*{$a|9*n zOwZb|9kZ~o|GlnASoiHn#KPIw2aiA26quTbWiqLZHP1RDT5X+?ogh#b3P&QbG?o^| z+M;5y^c3ut&4yRUnu}7I7)+sM*lS&;2kR(R82ej2S<}auG@GNSu8&8Oc0#&F_f-}2 zfUdA3X>079(3nj{)}%1Y&Sjy?T9JmJznKgQq}wJLTmjxYhv zFDmR>+!0#3tfjSm;T1)F^$q9L*5O~hNTw{rZ3fPQ*}79%TjZi?E0RhkW0B&7GqK28 z>3=;~UpSjhSklzWemX8XWA?&CA{7bSsZ3T6CKcP6Fyg5<)|<-oiJG)EH<|05Z{g`k zA?6UtdNHYFwUtcSR$a9fjm5*cgbhbd5H)K{Js5v_Cs(ok|i9|XJM(2 zdz^(i>{0}j*%V{?)R=QjZ^TCW##*|ptF_sJJ>?{`RwkAR+dXUL#`o?+t)S-o(yZEI ziFCDv?U;mtyAhi?hPxR_VNJrCo3%626N^iyLs6(ETGH3jlau zD9@9usIg1!T{5J!Ayi~xiDMU7lPk$n-}06Ys|6uaZH1#z3sKb|qmxx@>#gb9DF_`j zHM*K=8??RRC4Ea`>u{K+5!cviGgoI)xwJV`vc@DeOH1+`e`zXNvkL28)013nsU2IC zWuKbPl0PWlM(ZpMH! z3w>r_EW~H69b0dU+DNLm7l(?dU6sv>TI}ao?FCDh*JN!NOVnn&5ps5T6-oyCdL^fZ zOez|-!=hIGRg8l5we_B`BaD zBexjbJ-;tD3c-{l=f^ctj^l9`P@fK4@f!49ZItLXwlDX{b>Qo^gqZ}|n1P}kzHN|L z2jugEQ45thqgiFyTd%rHh@dYTZ=8)u`<=tFVLJSq_+KWD7IENA7k>ms4x~PMMFGK$sXgB>QfH%ANJLrEgxS8)u;8%lNy8l-2PlKEJzY0F+lK%<# z1Ktx=7lAX*$*%_A0KQ1`-6&s+veB1BJHHt-{$noqFD||jd>U+S z+Hb&kpF#fuHU=(Wbpkieh~69r6m=V31)8(x!U)l{uUQ! zp7R+OuK}OH#mc8l`~~<`SNqSvlP*3Cevga4ivF*-`X7b1VHckczTd^a0{Q1${3h_9 zy7*4;-@5n@L9`FuuwVx`)d$7eu*+zZkLZ+I*Rb9DQ3f=r(cRK3EL4sd-@Y`L^pL`)W zzX9&md^Y&6u(_uK*?u$X`CwQu{w+P_sBu5#V@_c15wARg-}RJZzq+4t`N>tPDIfDm zM|~57`8eSmCypx<1Fk7xS>hWWUf~*&?QswPBW!6NwqNAoS9rMX;lJ?kZ+ZA z$Rj_`!+-9v2Q$#-p*`w7{0)!%G$Rb8{1nf8{>#IU_4L2e)4tEcpYU+`!wx+r$D8e0 zFTbxd58Kc3^k3=Wb38oZ;k!Nh9yQ8=)W6ij@vEZZ!*;&!nTPy09{o3ac-F)3_3%E= zdcWyuzu(i|;c36n!xwq@7tCaVoUe$j5BH`MvFuEBQ`S%$LB4}&wvZh|0wZ)m`?5s~ z+e6EiEa`0R3Uw`9)ZQ8rwe2pM+TQGHflFf~-6wkckaodk6%xEyG-#~X2w1eJE>y4N z!Ws1IL*5O2YLoJ|BYVxN7w8-5P3vBbQhRqs_ik)N;i9e!>q2#=<{VvUnqz8kzmY>V zaS9x>>0DDNHks~CjRHxQ9@Dj`qu7JfmpYona(VHOt?#jgyfj}H3o}Wh$dXJfrb?Hn zT6LoijY;J|mz=y&I=fLoOkJBp4Iyn9@nktOO&65dJbRW9yY5lY6^>6wH`kvR*gOlgQoDQ}a!=!bOjFzaqb@*%{mh)ykq zm|F6-cc|mmNvsFoy#J>5=y3$D$^nJuclp(pmk%xA(_TB&8)y+I4tZ8qFiBvNayUL)uVPI z8=_n!m&qW_5wd%FW2u}CYbKC0HJT{qE{9g9N}|eZ^^Hb=>U0W5+ob*+cbgeX1*U0P zd|^jh>t%8-(q&rf9Mew68FfvjQl^Lu$#&=LXlh;3@HkHc*WQp^sckggnx$3pOyYsb zgN(>Ch{z*|SkJRc7L30eOxH%!)L=R{nBEO$mhk?36Yca~{yG!tp$M9@CV4Ax}k+GIwR=QBk(RU&m0wdz^aMQ&8l zBH%c&6ymc)owd@u_*mopal-ZL-r+xA0RXoe*ylH()HhU-(uDaV9Y$#6n^e>m{y+orrNEzDtbZu0;$( zAJN7<@&4)mh!6`j_5yu3pdS%N-a>>Q{z^n5;3T|%`R>IXoOq8AYlxp0;&a5CRL;rg z;EqKOJ;&pULp{wz=-Ehwo-YxhXNU+rZxf+sR)xY9MCe;j#4kV}CqnNtK-#z55B{&1 z5An0eHxQAWSWWyKeilXShrfV+B;_6^A}R40ak3Cku>B4po+cKA_%V=r-y?_KDkN~I z_hcgUHWN1@=SIvUM@U>NL?6(93C1Jhq%{j-T_A?6c9LbS0ReLHk}HxWsi>sSxl=XL#qM2xe8*eArV ziR-Z+i76poC9cH2B*I?Samv2SfwXtG#w5^>%X}Yksu2CeGlaN}I8BIqiDwG&5OF$k zFGR%dw}^X4hGJP@;FV-I?A}*?d zv`aG)^IX7s^u3sf|EpM!b@vgwh1kS;#QGiN=yx|c?EWAT`o5;?w-TZ6N32JT{g{ZD z*aPIb_XqL?IDdfj`&;A-g*d2r8RqCeRfyw(9OoqRk73_yUPHbJ`-dF;&m%8K-i>Gp zaS7|uuag`;xte%7t`oX`4f#0yij4Si}AIL9)9W?hHuk3RQ(02>sRP#&8Hwn?B`SrSe z3-MO`Bu=*rJpO9b5of9I2K;BM?+g5AsXLXwUge|75ki8<{1Va97$nYCc_e=m;zZZi z5ofA=segtLbI2Q1eu@1TXgQcn_-nAgh_x#J=||@d@<#PJ=RXhMwU9Tf+`b=4s+HvD QAWuSsa)g}lpDV=w09Dj6egFUf diff --git a/project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o b/project1/cyassl-3.0.0/examples/server/testsuite_testsuite_test-server.o deleted file mode 100644 index 5317d3e42aae82e2578838582acc3411358c2e73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13432 zcmcgy3v^V~x!xgzW-vMtv}(b6EF*#@AukXkAddv2Mu;X@tdC)s2gzkJGo3jDM5&^a z5l&-#^lGiTs@1l7Z);nreMoIBxd=#m+uByEtF6Mdx0W%S#GdHxhFDWZ4D;N4H6Xl}J5a7m-D$*ojx;Rc8BbIl5;_@3` zd+%r=_ObTL8@IFjV4lQj3Hk>6gFj@^7u?kntT+k9eeaEqjt=w(t15&TsBqeY9RqDX zK-aDX6=)e9Fnyx~)XDAXy0i!K9H#|hBL2kcv%%ZJSCRv(HO|pE zS7V*VHjQ$DBb5W2$mJ}819q^xa3D8%m#mZZEy3t6X`iP!t&ysMZ?d}Zx_#8fPYaQ| z^gKJ*5g7aum)R2R8mN8@)ir^_?XcCxPnU^6|IH{l2aBulIn_aFoWiz1|92{dXm!3u zjn1AWP!M(M9L!-bSLPga9%ub$TE*s;;EKRg`zi3aR+bvlouE~!{e1)iqhe`qvNsN&LOIB_iqwFUXZU&x)1-w<3Wp1=%7 zpW+4xwC*37BMk)L|V>g>3_gV2gbcrs8wv2F+66DGL;?;OHBIb;6!dYAL*)n~HvxmWNX-XjXT> zYV`9bg4I%R%7+LZqXw8R?1fM}4}(x0?F#hKj#@1S47&7CLN6xIiT=b7UYt7wySeHg zvKD)3SAXz1bbx8Onw4C2yFIOb6r>FU3`&y*THg+QVq0KFe{e74>~ox#h6hk^c9i7g zrVX_2(sF5>2!a0Fv3Lv^bzUCci(=rZqa=GtT6#bXvQ_vYHx}^>i z9K0p?-xz10qjF$D6#}{|SRof$8FZA6AJMw(9Ut0OA*US2g7%_voQOO9!BpqPt_plEg15fdzs!KXTg}ih`mvn?ZSNGPT#YlMsu7o3O zz>yrGbVx_Uoqc2cz#ve5$e<+sKrMWnw?V?DeM?eW6vfx-&R4>Q>duD#3Rhk5s-^zQ4!rvcQ5#V#n9@zOO=xy7j%?)m%Z zXnf!nxgFv|Llx$wC0*(Kd@#w6>teLTcO6xRt#kdj{LU%GEuufpF{}O1t7pX`W_1GA z{VXSF2df7AgMU@Ez5%RL?SV>dv5Mbe&Bh$J-U)JKQ#prm=5`1ApWqVg;8lY+qacRY zqeJNpqxg~_6=FNmsj}?0z;OCqF8t9T<1aq6!@ck~{)vTST|6Y|0~GfwcbFy0QJtOn z!=q~6JFw^FQJUi+P&BMutjo|4X%V^V;*u(hCHe#5Q^h4Qj5eC3q01bcs+Yo`N<^MT zYW$}6eLBc`Y~al+F`;7x4iFhbIAm?Sq9XozHWh`IfI+EJ_Gf1Yd`}sOC>iu^N1d}r zO5_if1@0OO^gqs!y9zD8$-i z3(BCUW9Z%SID(@2gX3}&%xmLFg(*4awWatHxs|gBv<=}v=axnoz6Rh^ziq1p7<^Q1 zy*J)_>uUpD!RSCDxYGaVo!pK_;@iq?Z$kntbRj&c4~QyQq!LtaUo3h6bHprYdk&&) zw3TbJ8w%U5uZBPrr}4_dE&c4Xl@Xph*;PyZTgzEHu73A{p>erOoIUw>%P_C*K%pP? zFtu|~D}IvQ1O2b_<;_)Xhe}L}z?aT55E@y6ZP5*9C}+J1XH^!Rr5)sKS1z(oa9+&s zJ&gBKXTP%}(9bu~5xA*;w;gm2>#cPv0}4UG@w9*W;xJ#unVu&cS9 Bb#tB4tt-( zpdIXmVja*G%dk$p=Ic-0+2ZS!C&1XPjHRs@IUVm^z`j#3qcKs)_v=Cc^BUB*F$}3> zN;k6nJ0}GS2jDC;jGd>p82r@b=sD|?5H~i=4Z(8b)4Ty*6T0&1?So6oc%^`!qfVK= z%k9}kF%cL%>2G*3$H(YE`xYM#*b316q4RT-V62-lG!7)nso@Xq%c?5+Syrhf4>umf zr9r+p4NqtBX7(B8jYSt3DXKWKL8GlPp)m?W=_7Jvg;w@k9QV5TY^k`TRQ!Ia_)QdD zDo)h>K0l^f`d-cscGIs0`pnf#cMF#kUyh>7eI|-_!gFSyIXF+$Ccpsl-DPkSO~64^ zz2*!oPm38|%PA|qg5zG#A1I94Ck+|K2Gdne z+UM-gKV5|#vfXRm0eogb@Rd}{Ke_g%HJ<>%w(t=)UgpYHqmJ(DLrJooOU_rICH|2w~(c zv**RBJ3BfGubg)5^Uti|Cjb9@F0{I1;f&Rn%31NSmF@1i_S!`3bWuAq63f`xnUO?K zENRz})TU#-#rkY4vo@Cb!1^_@J}G{FbXC?)F3rU|(#>m|6U_^oBh71?JDXF>n#H1U z)avYPx1cB6lS+zQGQ27gv+R_$I%ZqFF}phz^;Aae^+JtoMZ(E5Z7U1ONKd*uma!5& zS=*`?sy>l|awCbkTk)PmtlEln$0BQF*$OA4RwkFU;+a&hwYV?LnRKUmV^*{$a|9*n zOwZb|9kZ~o|GlnASoiHn#KPIw2aiA26quTbWiqLZHP1RDT5X+?ogh#b3P&QbG?o^| z+M;5y^c3ut&4yRUnu}7I7)+sM*lS&;2kR(R82ej2S<}auG@GNSu8&8Oc0#&F_f-}2 zfUdA3X>079(3nj{)}%1Y&Sjy?T9JmJznKgQq}wJLTmjxYhv zFDmR>+!0#3tfjSm;T1)F^$q9L*5O~hNTw{rZ3fPQ*}79%TjZi?E0RhkW0B&7GqK28 z>3=;~UpSjhSklzWemX8XWA?&CA{7bSsZ3T6CKcP6Fyg5<)|<-oiJG)EH<|05Z{g`k zA?6UtdNHYFwUtcSR$a9fjm5*cgbhbd5H)K{Js5v_Cs(ok|i9|XJM(2 zdz^(i>{0}j*%V{?)R=QjZ^TCW##*|ptF_sJJ>?{`RwkAR+dXUL#`o?+t)S-o(yZEI ziFCDv?U;mtyAhi?hPxR_VNJrCo3%626N^iyLs6(ETGH3jlau zD9@9usIg1!T{5J!Ayi~xiDMU7lPk$n-}06Ys|6uaZH1#z3sKb|qmxx@>#gb9DF_`j zHM*K=8??RRC4Ea`>u{K+5!cviGgoI)xwJV`vc@DeOH1+`e`zXNvkL28)013nsU2IC zWuKbPl0PWlM(ZpMH! z3w>r_EW~H69b0dU+DNLm7l(?dU6sv>TI}ao?FCDh*JN!NOVnn&5ps5T6-oyCdL^fZ zOez|-!=hIGRg8l5we_B`BaD zBexjbJ-;tD3c-{l=f^ctj^l9`P@fK4@f!49ZItLXwlDX{b>Qo^gqZ}|n1P}kzHN|L z2jugEQ45thqgiFyTd%rHh@dYTZ=8)u`<=tFVLJSq_+KWD7IENA7k>ms4x~PMMFGK$sXgB>QfH%ANJLrEgxS8)u;8%lNy8l-2PlKEJzY0F+lK%<# z1Ktx=7lAX*$*%_A0KQ1`-6&s+veB1BJHHt-{$noqFD||jd>U+S z+Hb&kpF#fuHU=(Wbpkieh~69r6m=V31)8(x!U)l{uUQ! zp7R+OuK}OH#mc8l`~~<`SNqSvlP*3Cevga4ivF*-`X7b1VHckczTd^a0{Q1${3h_9 zy7*4;-@5n@L9`FuuwVx`)d$7eu*+zZkLZ+I*Rb9DQ3f=r(cRK3EL4sd-@Y`L^pL`)W zzX9&md^Y&6u(_uK*?u$X`CwQu{w+P_sBu5#V@_c15wARg-}RJZzq+4t`N>tPDIfDm zM|~57`8eSmCypx<1Fk7xS>hWWUf~*&?QswPBW!6NwqNAoS9rMX;lJ?kZ+ZA z$Rj_`!+-9v2Q$#-p*`w7{0)!%G$Rb8{1nf8{>#IU_4L2e)4tEcpYU+`!wx+r$D8e0 zFTbxd58Kc3^k3=Wb38oZ;k!Nh9yQ8=)W6ij@vEZZ!*;&!nTPy09{o3ac-F)3_3%E= zdcWyuzu(i|;c36n!xwq@7tCaVoUe$j5BH`MvFuEBQ`S%$LB4}&wvZh|0wZ)m`?5s~ z+e6EiEa`0R3Uw`9)ZQ8rwe2pM+TQGHflFf~-6wkckaodk6%xEyG-#~X2w1eJE>y4N z!Ws1IL*5O2YLoJ|BYVxN7w8-5P3vBbQhRqs_ik)N;i9e!>q2#=<{VvUnqz8kzmY>V zaS9x>>0DDNHks~CjRHxQ9@Dj`qu7JfmpYona(VHOt?#jgyfj}H3o}Wh$dXJfrb?Hn zT6LoijY;J|mz=y&I=fLoOkJBp4Iyn9@nktOO&65dJbRW9yY5lY6^>6wH`kvR*gOlgQoDQ}a!=!bOjFzaqb@*%{mh)ykq zm|F6-cc|mmNvsFoy#J>5=y3$D$^nJuclp(pmk%xA(_TB&8)y+I4tZ8qFiBvNayUL)uVPI z8=_n!m&qW_5wd%FW2u}CYbKC0HJT{qE{9g9N}|eZ^^Hb=>U0W5+ob*+cbgeX1*U0P zd|^jh>t%8-(q&rf9Mew68FfvjQl^Lu$#&=LXlh;3@HkHc*WQp^sckggnx$3pOyYsb zgN(>Ch{z*|SkJRc7L30eOxH%!)L=R{nBEO$mhk?36Yca~{yG!tp$M9@CV4Ax}k+GIwR=QBk(RU&m0wdz^aMQ&8l zBH%c&6ymc)owd@u_*mopal-ZL-r+xA0RXoe*ylH()HhU-(uDaV9Y$#6n^e>m{y+orrNEzDtbZu0;$( zAJN7<@&4)mh!6`j_5yu3pdS%N-a>>Q{z^n5;3T|%`R>IXoOq8AYlxp0;&a5CRL;rg z;EqKOJ;&pULp{wz=-Ehwo-YxhXNU+rZxf+sR)xY9MCe;j#4kV}CqnNtK-#z55B{&1 z5An0eHxQAWSWWyKeilXShrfV+B;_6^A}R40ak3Cku>B4po+cKA_%V=r-y?_KDkN~I z_hcgUHWN1@=SIvUM@U>NL?6(93C1Jhq%{j-T_A?6c9LbS0ReLHk}HxWsi>sSxl=XL#qM2xe8*eArV ziR-Z+i76poC9cH2B*I?Samv2SfwXtG#w5^>%X}Yksu2CeGlaN}I8BIqiDwG&5OF$k zFGR%dw}^X4hGJP@;FV-I?A}*?d zv`aG)^IX7s^u3sf|EpM!b@vgwh1kS;#QGiN=yx|c?EWAT`o5;?w-TZ6N32JT{g{ZD z*aPIb_XqL?IDdfj`&;A-g*d2r8RqCeRfyw(9OoqRk73_yUPHbJ`-dF;&m%8K-i>Gp zaS7|uuag`;xte%7t`oX`4f#0yij4Si}AIL9)9W?hHuk3RQ(02>sRP#&8Hwn?B`SrSe z3-MO`Bu=*rJpO9b5of9I2K;BM?+g5AsXLXwUge|75ki8<{1Va97$nYCc_e=m;zZZi z5ofA=segtLbI2Q1eu@1TXgQcn_-nAgh_x#J=||@d@<#PJ=RXhMwU9Tf+`b=4s+HvD QAWuSsa)g}lpDV=w09Dj6egFUf diff --git a/project1/cyassl-3.0.0/gencertbuf.pl b/project1/cyassl-3.0.0/gencertbuf.pl deleted file mode 100755 index 6fb1929a..00000000 --- a/project1/cyassl-3.0.0/gencertbuf.pl +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/perl - -# gencertbuf.pl -# version 1.0 -# Updated 01/28/2013 -# -# Copyright (C) 2006-2013 wolfSSL -# - -use strict; -use warnings; - -# ---- SCRIPT SETTINGS ------------------------------------------------------- - -# output C header file to write cert/key buffers to -my $outputFile = "./cyassl/certs_test.h"; - -# 1024-bit certs/keys to be converted -# Used with USE_CERT_BUFFERS_1024 define. - -my @fileList_1024 = ( - [ "./certs/1024/client-key.der", "client_key_der_1024" ], - [ "./certs/1024/client-cert.der", "client_cert_der_1024" ], - [ "./certs/1024/dh1024.der", "dh_key_der_1024" ], - [ "./certs/1024/dsa1024.der", "dsa_key_der_1024" ], - [ "./certs/1024/rsa1024.der", "rsa_key_der_1024" ] - ); - -# 2048-bit certs/keys to be converted -# Used with USE_CERT_BUFFERS_2048 define. - -my @fileList_2048 = ( - [ "./certs/client-key.der", "client_key_der_2048" ], - [ "./certs/client-cert.der", "client_cert_der_2048" ], - [ "./certs/dh2048.der", "dh_key_der_2048" ], - [ "./certs/dsa2048.der", "dsa_key_der_2048" ], - [ "./certs/rsa2048.der", "rsa_key_der_2048" ] - ); - -# ---------------------------------------------------------------------------- - -my $num_1024 = @fileList_1024; -my $num_2048 = @fileList_2048; - -# open our output file, "+>" creates and/or truncates -open OUT_FILE, "+>", $outputFile or die $!; - -print OUT_FILE "/* certs_test.h */\n\n"; -print OUT_FILE "#ifndef CYASSL_CERTS_TEST_H\n"; -print OUT_FILE "#define CYASSL_CERTS_TEST_H\n\n"; - -# convert and print 1024-bit cert/keys -print OUT_FILE "#ifdef USE_CERT_BUFFERS_1024\n\n"; -for(my $i = 0; $i < $num_1024; $i++) { - print OUT_FILE "/* $fileList_1024[$i][0], 1024-bit */\n"; - print OUT_FILE "const unsigned char $fileList_1024[$i][1]\[] =\n"; - print OUT_FILE "{\n"; - file_to_hex($fileList_1024[$i][0]); - print OUT_FILE "};\n\n"; -} - -# convert and print 2048-bit certs/keys -print OUT_FILE "#elif defined(USE_CERT_BUFFERS_2048)\n\n"; -for(my $i = 0; $i < $num_2048; $i++) { - print OUT_FILE "/* $fileList_2048[$i][0], 2048-bit */\n"; - print OUT_FILE "const unsigned char $fileList_2048[$i][1]\[] =\n"; - print OUT_FILE "{\n"; - file_to_hex($fileList_2048[$i][0]); - print OUT_FILE "};\n\n"; -} - -print OUT_FILE "#endif /* USE_CERT_BUFFERS_1024 */\n\n"; -print OUT_FILE "#endif /* CYASSL_CERTS_TEST_H */\n\n"; - -# close certs_test.h file -close OUT_FILE or die $!; - -# print file as hex, comma-separated, as needed by C buffer -sub file_to_hex { - my $fileName = $_[0]; - - open my $fp, "<", $fileName or die $!; - binmode($fp); - - my $fileLen = -s $fileName; - my $byte; - - for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++) - { - if ($j == 1) { - print OUT_FILE "\t"; - } - read($fp, $byte, 1) or die "Error reading $fileName"; - my $output = sprintf("0x%02X", ord($byte)); - print OUT_FILE $output; - - if ($i != ($fileLen - 1)) { - print OUT_FILE ", "; - } - - if ($j == 10) { - $j = 0; - print OUT_FILE "\n"; - } - } - - print OUT_FILE "\n"; - - close($fp); -} diff --git a/project1/cyassl-3.0.0/input b/project1/cyassl-3.0.0/input deleted file mode 100644 index 06dbbf07..00000000 --- a/project1/cyassl-3.0.0/input +++ /dev/null @@ -1,87 +0,0 @@ -/* echoclient.c */ - -#include "openssl/ssl.h" -#include "../test.h" - - -int main(int argc, char** argv) -{ - SOCKET_T sockfd = 0; - - FILE* fin = stdin; - FILE* fout = stdout; - - int inCreated = 0; - int outCreated = 0; - - char send[1024]; - char reply[1024]; - - SSL_METHOD* method = 0; - SSL_CTX* ctx = 0; - SSL* ssl = 0; - -#ifdef _WIN32 - WSADATA wsd; - WSAStartup(0x0002, &wsd); -#endif - - if (argc >= 2) { - fin = fopen(argv[1], "r"); - inCreated = 1; - } - if (argc >= 3) { - fout = fopen(argv[2], "w"); - outCreated = 1; - } - - if (!fin) err_sys("can't open input file"); - if (!fout) err_sys("can't open output file"); - - tcp_connect(&sockfd); - - method = SSLv3_client_method(); - ctx = SSL_CTX_new(method); - - if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS) - err_sys("can't load ca file"); - - ssl = SSL_new(ctx); - - SSL_set_fd(ssl, sockfd); - if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed"); - - while (fgets(send, sizeof(send), fin)) { - - int sendSz = strlen(send) + 1; - - if (SSL_write(ssl, send, sendSz) != sendSz) - err_sys("SSL_write failed"); - - if (strncmp(send, "quit", 4) == 0) { - fputs("sending server shutdown command: quit!\n", fout); - break; - } - - if (SSL_read(ssl, reply, sizeof(reply)) > 0) - fputs(reply, fout); - } - - SSL_shutdown(ssl); - SSL_free(ssl); - SSL_CTX_free(ctx); - - fflush(fout); - if (inCreated) fclose(fin); - if (outCreated) fclose(fout); - -#ifdef _WIN32 - closesocket(sockfd); -#else - close(sockfd); -#endif - - return 0; -} - - diff --git a/project1/cyassl-3.0.0/lib/dummy b/project1/cyassl-3.0.0/lib/dummy deleted file mode 100644 index 13c3b18c..00000000 --- a/project1/cyassl-3.0.0/lib/dummy +++ /dev/null @@ -1,2 +0,0 @@ -// this is a dummy file - diff --git a/project1/cyassl-3.0.0/libtool b/project1/cyassl-3.0.0/libtool deleted file mode 100755 index cd6eb964..00000000 --- a/project1/cyassl-3.0.0/libtool +++ /dev/null @@ -1,10240 +0,0 @@ -#! /bin/bash - -# libtool - Provide generalized library-building support services. -# Generated automatically by config.status (cyassl) 3.0.0 -# Libtool was configured on host khimes-TravelMate-X483: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=2.4.2 -macro_revision=1.3337 - -# Whether or not to build static libraries. -build_old_libs=no - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# What type of objects to build. -pic_mode=default - -# Whether or not to optimize for fast installation. -fast_install=yes - -# Shell to use when invoking shell scripts. -SHELL="/bin/bash" - -# An echo program that protects backslashes. -ECHO="printf %s\\n" - -# The PATH separator for the build system. -PATH_SEPARATOR=":" - -# The host system. -host_alias= -host=i686-pc-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=i686-pc-linux-gnu -build_os=linux-gnu - -# A sed program that does not truncate output. -SED="/bin/sed" - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP="/bin/grep" - -# An ERE matcher. -EGREP="/bin/grep -E" - -# A literal string matcher. -FGREP="/bin/grep -F" - -# A BSD- or MS-compatible name lister. -NM="/usr/bin/nm -B" - -# Whether we need soft or hard links. -LN_S="ln -s" - -# What is the maximum length of a command? -max_cmd_len=1572864 - -# Object file suffix (normally "o"). -objext=o - -# Executable file suffix (normally ""). -exeext= - -# whether the shell understands "unset". -lt_unset=unset - -# turn spaces into newlines. -SP2NL="tr \\040 \\012" - -# turn newlines into spaces. -NL2SP="tr \\015\\012 \\040\\040" - -# convert $build file names to $host format. -to_host_file_cmd=func_convert_file_noop - -# convert $build files to toolchain format. -to_tool_file_cmd=func_convert_file_noop - -# An object symbol dumper. -OBJDUMP="objdump" - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd="\$MAGIC_CMD" - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob="" - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob="no" - -# DLL creation program. -DLLTOOL="false" - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd="printf %s\\n" - -# The archiver. -AR="ar" - -# Flags to create an archive. -AR_FLAGS="cru" - -# How to feed a file listing to the archiver. -archiver_list_spec="@" - -# A symbol stripping program. -STRIP="strip" - -# Commands used to install an old-style archive. -RANLIB="ranlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" -old_postuninstall_cmds="" - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=no - -# A C compiler. -LTCC="clang" - -# LTCC compiler flags. -LTCFLAGS=" -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE " - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p'" - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'" - -# Specify filename containing input files for $NM. -nm_file_list_spec="@" - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot= - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=file - -# Must we lock files when doing compilation? -need_locks="no" - -# Manifest tool. -MANIFEST_TOOL=":" - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL="" - -# Tool to change global to local symbols on Mac OS X. -NMEDIT="" - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO="" - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL="" - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64="" - -# Old archive suffix (normally "a"). -libext=a - -# Shared library suffix (normally ".so"). -shrext_cmds=".so" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Do we need the "lib" prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Library versioning type. -version_type=linux - -# Shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# Shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="\${libname}\${release}\${shared_ext}\$major" - -# Permission mode override for installation of shared libraries. -install_override_mode="" - -# Command to use after installation of a shared archive. -postinstall_cmds="" - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval="" - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/clang/3.4 /usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib /lib " - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/i386-linux-gnu/libfakeroot /usr/lib/i386-linux-gnu/mesa-egl /usr/lib/i386-linux-gnu/mesa /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib " - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - - -# The linker used to build libraries. -LD="/usr/bin/ld" - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# Commands used to build an old-style archive. -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" - -# A language specific compiler. -CC="clang" - -# Is the compiler the GNU compiler? -with_gcc=yes - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=no - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object="no" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build a shared archive. -archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ - cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ - echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds="" -module_expsym_cmds="" - -# Whether we are building with GNU ld or not. -with_gnu_ld="yes" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that enforces no undefined symbols. -no_undefined_flag="" - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist -hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator="" - -# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=no - -# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting ${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=no - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=no - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=no - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=no - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Set to "yes" if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" - -# Symbols that must always be exported. -include_expsyms="" - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds="" - -# Commands necessary for finishing linking programs. -postlink_cmds="" - -# Specify filename containing input files. -file_list_spec="" - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="" - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects="" -postdep_objects="" -predeps="" -postdeps="" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path="" - -# ### END LIBTOOL CONFIG - - -# libtool (GNU libtool) 2.4.2 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} # Extended-shell func_dirname implementation - - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} # Extended-shell func_basename implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} # Extended-shell func_dirname_and_basename implementation - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} # Extended-shell func_stripname implementation - - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $opt_debug - - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $opt_debug - - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $opt_debug - - func_error "missing argument for $1." - exit_cmd=exit -} - - -# func_split_short_opt shortopt -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () -{ - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} -} # Extended-shell func_split_short_opt implementation - - -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () -{ - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=} -} # Extended-shell func_split_long_opt implementation - -exit_cmd=: - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "${1}+=\${2}" -} # Extended-shell func_append implementation - -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}+=\\ \$func_quote_for_eval_result" -} # Extended-shell func_append_quoted implementation - - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} # Extended-shell func_arith implementation - - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} # Extended-shell func_len implementation - - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} # Extended-shell func_lo2o implementation - - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} # Extended-shell func_xform implementation - - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - - - -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false - - -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -preserve_args+=" $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -preserve_args+=" $opt" - ;; - --no-verbose) - opt_verbose=false -preserve_args+=" $opt" - ;; - --silent|--quiet) - opt_silent=: -preserve_args+=" $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -preserve_args+=" $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -preserve_args+=" $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || preserve_args+=" --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE -} - - - - -## ----------- ## -## Main. ## -## ----------- ## - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case "$lt_sysroot:$1" in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $opt_debug - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $opt_debug - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $opt_debug - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $opt_debug - if test -z "$2" && test -n "$1" ; then - func_error "Could not determine host file name corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result="$1" - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $opt_debug - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " \`$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result="$3" - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $opt_debug - case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" - ;; - esac - case $4 in - $2 ) func_to_host_path_result+="$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via `$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $opt_debug - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $opt_debug - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result="$1" -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via `$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $opt_debug - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $opt_debug - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result="$1" -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_mode_compile arg... -func_mode_compile () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - pie_flag+=" $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - later+=" $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - base_compile+=" $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist+=" $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist+=" $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command+=" -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command+=" -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command+="$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir+="/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - libdirs+=" $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - libs+=" $opt" - else - func_warning "\`$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument \`$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds+=" - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog+="$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - files+=" $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog+=" $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - install_shared_prog+=" $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - install_shared_prog+=" -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs+=" $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs+=" $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs+=" $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir+="$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs+=" $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags+=" $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $opt_debug - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $opt_debug - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result="" - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - libtool_args+=" $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command+=" @OUTPUT@" - finalize_command+=" @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command+=" @SYMFILE@" - finalize_command+=" @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles+=" $arg" - else - dlprefiles+=" $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs+=" $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs+=" $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles+=" $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles+=" $pic_object" - prev= - fi - - # A PIC object. - libobjs+=" $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects+=" $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects+=" $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - libobjs+=" $pic_object" - non_pic_objects+=" $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath+=" $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath+=" $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs+=" $arg" - prev= - continue - ;; - xcclinker) - linker_flags+=" $qarg" - compiler_flags+=" $qarg" - prev= - compile_command+=" $qarg" - finalize_command+=" $qarg" - continue - ;; - xcompiler) - compiler_flags+=" $qarg" - prev= - compile_command+=" $qarg" - finalize_command+=" $qarg" - continue - ;; - xlinker) - linker_flags+=" $qarg" - compiler_flags+=" $wl$qarg" - prev= - compile_command+=" $wl$qarg" - finalize_command+=" $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - compile_command+=" $link_static_flag" - finalize_command+=" $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command+=" $arg" - finalize_command+=" $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) deplibs+=" $arg" ;; - *) deplibs+=" -L$dir" ;; - esac - lib_search_path+=" $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath+=":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath+=":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs+=" System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs+=" $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - compiler_flags+=" $arg" - compile_command+=" $arg" - finalize_command+=" $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - compiler_flags+=" $arg" - compile_command+=" $arg" - finalize_command+=" $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags+=" $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath+=" $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg+=" $func_quote_for_eval_result" - compiler_flags+=" $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg+=" $wl$func_quote_for_eval_result" - compiler_flags+=" $wl$func_quote_for_eval_result" - linker_flags+=" $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - compile_command+=" $arg" - finalize_command+=" $arg" - compiler_flags+=" $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs+=" $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles+=" $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles+=" $pic_object" - prev= - fi - - # A PIC object. - libobjs+=" $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects+=" $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects+=" $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - libobjs+=" $pic_object" - non_pic_objects+=" $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs+=" $arg" - old_deplibs+=" $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles+=" $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles+=" $func_resolve_sysroot_result" - prev= - else - deplibs+=" $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command+=" $arg" - finalize_command+=" $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command+=" $arg" - finalize_command+=" $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs+=" $deplib" ;; - esac - fi - libs+=" $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs+=" $pre_post_deps" ;; - esac - pre_post_deps+=" $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs+=" $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags+=" $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags+=" $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags+=" $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - newlib_search_path+=" $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - newlib_search_path+=" $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath+=" $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles+=" $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles+=" $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags+=" $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles+=" $dlopen" - test -n "$dlpreopen" && dlprefiles+=" $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience+=" $ladir/$objdir/$old_library" - old_convenience+=" $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs+=" $deplib" ;; - esac - fi - tmp_libs+=" $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib="$l" - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles+=" $lib $dependency_libs" - else - newdlfiles+=" $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path+=" $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path+=" $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - case "$host" in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - newdlprefiles+=" $dir/$linklib" - else - newdlprefiles+=" $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs+=" $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles+=" $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs+=" $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles+=" $dir/$dlname" - else - newdlprefiles+=" $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path+=" $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - newlib_search_path+=" $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs+=" $deplib" ;; - esac - fi - tmp_libs+=" $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath+="$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath+=" $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath+=" $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs+=" $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs+=" $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath+=" $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath+=" $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir+=" -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath+="$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath+="$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath+="$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir+=" -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath+=" $temp_xrpath";; - esac;; - *) temp_deplibs+=" $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path+=" $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - specialdeplibs+=" $func_resolve_sysroot_result" ;; - esac - fi - tmp_libs+=" $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags+=" ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags+=" -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path+=" $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs+=" $deplib" ;; - esac - ;; - *) tmp_libs+=" $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs+=" $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs+="$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs+=" $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring+=":${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs+=" $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist+=" $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs+=" $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - temp_xrpath+=" -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath+=" $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles+=" $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles+=" $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs+=" System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs+=" -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs+=" $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs+=" $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs+=" $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs+=" $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs+=" $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs+=" -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs+=" $deplib" ;; - esac - ;; - *) new_libs+=" $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs+="$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath+=" $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath+=" $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath+="$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames+=" $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles+=" $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd1 in $cmds; do - IFS="$save_ifs" - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test "$try_normal_branch" = yes \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=${output_objdir}/${output_la}.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - delfiles+=" $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles+=" $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs+=" $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated+=" $gentop" - - func_extract_archives $gentop $convenience - libobjs+=" $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags+=" $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - delfiles+=" $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - delfiles+=" $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - objlist+=" $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles+=" $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles+=" $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated+=" $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs+=" $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated+=" $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command+=" ${wl}-bind_at_load" - finalize_command+=" ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs+=" -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs+=" $deplib" ;; - esac - ;; - *) new_libs+=" $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command+=" $compile_deplibs" - finalize_command+=" $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath+=" $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs+="$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath+=" $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath+=" $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath+=":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath+=":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs+="$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath+=" $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath+=" $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath+="$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath+="$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs+=" $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated+=" $gentop" - - func_extract_archives $gentop $addlibs - oldobjs+=" $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated+=" $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs+=" $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated+=" $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs+=" $gentop/$newobj" - ;; - *) oldobjs+=" $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - objlist+=" $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - newdependency_libs+=" -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - newdependency_libs+=" -R$func_replace_sysroot_result" - ;; - *) newdependency_libs+=" $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles+=" ${lt_sysroot:+=}$libdir/$name" - ;; - *) newdlfiles+=" $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles+=" ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles+=" $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles+=" $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM+=" $arg"; rmforce=yes ;; - -*) RM+=" $arg" ;; - *) files+=" $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" - else - odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" - - # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then - case " $rmdirs " in - *" $odir "*) ;; - *) rmdirs+=" $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles+=" $odir/$n" - done - test -n "$old_library" && rmfiles+=" $odir/$old_library" - - case "$opt_mode" in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && rmfiles+=" $odir/$dlname" ;; - esac - test -n "$libdir" && rmfiles+=" $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles+=" $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles+=" $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles+=" $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles+=" $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles+=" $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles+=" $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles+=" $odir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD="/usr/bin/ld" - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# Commands used to build an old-style archive. -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" - -# A language specific compiler. -CC="g++" - -# Is the compiler the GNU compiler? -with_gcc=yes - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=no - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object="no" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build a shared archive. -archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds="" -module_expsym_cmds="" - -# Whether we are building with GNU ld or not. -with_gnu_ld="yes" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that enforces no undefined symbols. -no_undefined_flag="" - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist -hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator="" - -# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=no - -# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting ${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=no - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=no - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=no - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=no - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Set to "yes" if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" - -# Symbols that must always be exported. -include_expsyms="" - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds="" - -# Commands necessary for finishing linking programs. -postlink_cmds="" - -# Specify filename containing input files. -file_list_spec="" - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="/usr/lib/gcc/i686-linux-gnu/4.8 /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu /usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /usr/lib/gcc/i686-linux-gnu/4.8/../../.." - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects="/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.8/crtbeginS.o" -postdep_objects="/usr/lib/gcc/i686-linux-gnu/4.8/crtendS.o /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o" -predeps="" -postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path="-L/usr/lib/gcc/i686-linux-gnu/4.8 -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.8/../../.." - -# ### END LIBTOOL TAG CONFIG: CXX diff --git a/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 b/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 deleted file mode 100644 index 51ce0d0c..00000000 --- a/project1/cyassl-3.0.0/m4/ax_add_am_macro.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_add_am_macro.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_ADD_AM_MACRO([RULE]) -# -# DESCRIPTION -# -# Adds the specified rule to $AMINCLUDE. This macro will only work -# properly with implementations of Make which allow include statements. -# See also AX_ADD_AM_MACRO_STATIC. -# -# LICENSE -# -# Copyright (c) 2009 Tom Howard -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 9 - -AC_DEFUN([AX_ADD_AM_MACRO],[ - AC_REQUIRE([AX_AM_MACROS]) - AX_APPEND_TO_FILE([$AMINCLUDE],[$1]) -]) diff --git a/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 b/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 deleted file mode 100644 index 0bee7ab6..00000000 --- a/project1/cyassl-3.0.0/m4/ax_am_jobserver.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_am_jobserver.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_AM_JOBSERVER([default_value]) -# -# DESCRIPTION -# -# Enables the use of make's jobserver for the purpose of parallel building -# by passing the -j option to make. -# -# The option --enable-jobserver is added to configure which can accept a -# yes, no, or an integer. The integer is the number of separate jobs to -# allow. If 'yes' is given, then the is assumed to be one more than the -# number of CPUs (determined through AX_COUNT_CPUS). If the value of no is -# given, then the jobserver is disabled. The default value is given by the -# first argument of the macro, or 'yes' if the argument is omitted. -# -# This macro makes use of AX_AM_MACROS, so you must add the following line -# -# @INC_AMINCLUDE@ -# -# to your Makefile.am files. -# -# LICENSE -# -# Copyright (c) 2008 Michael Paul Bailey -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -AC_DEFUN([AX_AM_JOBSERVER], [ - AC_REQUIRE([AX_COUNT_CPUS]) - AC_REQUIRE([AX_AM_MACROS]) - AC_ARG_ENABLE( jobserver, - [ --enable-jobserver@<:@=no/yes/@%:@@:>@ default=m4_ifval([$1],[$1],[yes]) - Enable up to @%:@ make jobs - yes: enable one more than CPU count - ],, [enable_jobserver=m4_ifval([$1],[$1],[yes])]) - if test "x$enable_jobserver" = "xyes"; then - enable_jobserver=$CPU_COUNT - ((enable_jobserver++)) - fi - m4_pattern_allow(AM_MAKEFLAGS) - if test "x$enable_jobserver" != "xno"; then - AC_MSG_NOTICE([added jobserver support to make for $enable_jobserver jobs]) - AX_ADD_AM_MACRO( AM_MAKEFLAGS += -j$enable_jobserver ) - fi -]) diff --git a/project1/cyassl-3.0.0/m4/ax_am_macros.m4 b/project1/cyassl-3.0.0/m4/ax_am_macros.m4 deleted file mode 100644 index 6b4bd223..00000000 --- a/project1/cyassl-3.0.0/m4/ax_am_macros.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_am_macros.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_AM_MACROS -# -# DESCRIPTION -# -# Adds support for macros that create Make rules. You must manually add -# the following line -# -# @INC_AMINCLUDE@ -# -# to your Makefile.in (or Makefile.am if you use Automake) files. -# -# LICENSE -# -# Copyright (c) 2009 Tom Howard -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 9 - -AC_DEFUN([AX_AM_MACROS], -[ -AC_MSG_NOTICE([adding automake macro support]) -AMINCLUDE="aminclude.am" -AC_SUBST(AMINCLUDE) -AC_MSG_NOTICE([creating $AMINCLUDE]) -AMINCLUDE_TIME=`date` -AX_PRINT_TO_FILE([$AMINCLUDE],[[ -# generated automatically by configure from AX_AUTOMAKE_MACROS -# on $AMINCLUDE_TIME - -]]) - -INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" -AC_SUBST(INC_AMINCLUDE) -]) diff --git a/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 b/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 deleted file mode 100644 index 1f8e7084..00000000 --- a/project1/cyassl-3.0.0/m4/ax_append_compile_flags.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the compiler works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. During the check the flag is always added to the -# current language's flags. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and -# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with -# AX_APPEND_LINK_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 3 - -AC_DEFUN([AX_APPEND_COMPILE_FLAGS], -[AC_REQUIRE([AX_CHECK_COMPILE_FLAG]) -AC_REQUIRE([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) -done -])dnl AX_APPEND_COMPILE_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_append_flag.m4 b/project1/cyassl-3.0.0/m4/ax_append_flag.m4 deleted file mode 100644 index 1d38b76f..00000000 --- a/project1/cyassl-3.0.0/m4/ax_append_flag.m4 +++ /dev/null @@ -1,69 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 2 - -AC_DEFUN([AX_APPEND_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl -AS_VAR_SET_IF(FLAGS, - [case " AS_VAR_GET(FLAGS) " in - *" $1 "*) - AC_RUN_LOG([: FLAGS already contains $1]) - ;; - *) - AC_RUN_LOG([: FLAGS="$FLAGS $1"]) - AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) - ;; - esac], - [AS_VAR_SET(FLAGS,["$1"])]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff --git a/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 b/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 deleted file mode 100644 index f9f54e08..00000000 --- a/project1/cyassl-3.0.0/m4/ax_append_to_file.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_to_file.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_TO_FILE([FILE],[DATA]) -# -# DESCRIPTION -# -# Appends the specified data to the specified file. -# -# LICENSE -# -# Copyright (c) 2008 Tom Howard -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 8 - -AC_DEFUN([AX_APPEND_TO_FILE],[ -AC_REQUIRE([AX_FILE_ESCAPES]) -printf "$2\n" >> "$1" -]) diff --git a/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 b/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 deleted file mode 100644 index c3a8d695..00000000 --- a/project1/cyassl-3.0.0/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 2 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 b/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 deleted file mode 100644 index e2d0d363..00000000 --- a/project1/cyassl-3.0.0/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 2 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 b/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 deleted file mode 100644 index d4f3d290..00000000 --- a/project1/cyassl-3.0.0/m4/ax_count_cpus.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COUNT_CPUS -# -# DESCRIPTION -# -# Attempt to count the number of processors present on the machine. If the -# detection fails, then a value of 1 is assumed. -# -# The value is placed in the CPU_COUNT variable. -# -# LICENSE -# -# Copyright (c) 2012 Brian Aker -# Copyright (c) 2008 Michael Paul Bailey -# Copyright (c) 2008 Christophe Tournayre -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 10 - - AC_DEFUN([AX_COUNT_CPUS],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_EGREP]) - AC_MSG_CHECKING([the number of available CPUs]) - CPU_COUNT="0" - - AS_CASE([$host_os],[ - *darwin*],[ - AS_IF([test -x /usr/sbin/sysctl],[ - sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` - AS_IF([test sysctl_a],[ - CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` - ]) - ])],[ - *linux*],[ - AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ - AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[ - CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` - ]) - ]) - ]) - - AS_IF([test "x$CPU_COUNT" = "x0"],[ - CPU_COUNT="1" - AC_MSG_RESULT( [unable to detect (assuming 1)] ) - ],[ - AC_MSG_RESULT( $CPU_COUNT ) - ]) - ]) diff --git a/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 b/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 deleted file mode 100644 index 535838f4..00000000 --- a/project1/cyassl-3.0.0/m4/ax_create_generic_config.m4 +++ /dev/null @@ -1,195 +0,0 @@ -# ============================================================================ -# http://www.gnu.org/software/autoconf-archive/ax_create_generic_config.html -# ============================================================================ -# -# SYNOPSIS -# -# AX_CREATE_GENERIC_CONFIG [(PACKAGEnlibs [, VERSION])] -# -# DESCRIPTION -# -# Creates a generic PACKAGE-config file that has all the things that you -# want, hmm, well, atleast it has --cflags, --version, --libs. Ahhm, did -# you see ax_path_generic in the autoconf-archive? ;-) -# -# this macros saves you all the typing for a pkg-config.in script, you -# don't even need to distribute one along. Place this macro in your -# configure.ac, et voila, you got one that you want to install. -# -# oh, btw, if the first arg looks like "mylib -lwhat' then it will go to -# be added to the --libs, and mylib is extracted. -# -# the defaults: $1 = $PACKAGE $LIBS $2 = $VERSION there is also an -# AC_SUBST(GENERIC_CONFIG) that will be set to the name of the file that -# we did output in this macro. Use as: -# -# install-exec-local: install-generic-config -# -# install-generic-config: -# $(mkinstalldirs) $(DESTDIR)$(bindir) -# $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir) -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -AU_ALIAS([AC_CREATE_GENERIC_CONFIG], [AX_CREATE_GENERIC_CONFIG]) -AC_DEFUN([AX_CREATE_GENERIC_CONFIG],[# create a generic PACKAGE-config file -L=`echo ifelse($1, , $PACKAGE $LIBS, $1)` -P=`echo $L | sed -e 's/ -.*//'` -P=`echo $P` -V=`echo ifelse($2, , $VERSION, $2)` -F=`echo $P-config` -L=`echo -l$L | sed -e 's/^-llib/-l/'` -AC_MSG_RESULT(creating $F - generic $V for $L) -test "x$prefix" = xNONE && prefix="$ac_default_prefix" -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -echo '#! /bin/sh' >$F -echo ' ' >>$F -echo 'package="'$P'"' >>$F -echo 'version="'$V'"' >>$F -echo 'libs="'$L'"' >>$F -echo ' ' >>$F -# in the order of occurence a standard automake Makefile -echo 'prefix="'$prefix'"' >>$F -echo 'exec_prefix="'$exec_prefix'"' >>$F -echo 'bindir="'$bindir'"' >>$F -echo 'sbindir="'$sbindir'"' >>$F -echo 'libexecdir="'$libexecdir'"' >>$F -echo 'datadir="'$datadir'"' >>$F -echo 'sysconfdir="'$sysconfdir'"' >>$F -echo 'sharedstatedir="'$sharedstatedir'"' >>$F -echo 'localstatedir="'$localstatedir'"' >>$F -echo 'libdir="'$libdir'"' >>$F -echo 'infodir="'$infodir'"' >>$F -echo 'mandir="'$mandir'"' >>$F -echo 'includedir="'$includedir'"' >>$F -echo 'target="'$target'"' >>$F -echo 'host="'$host'"' >>$F -echo 'build="'$build'"' >>$F -echo ' ' >>$F -echo 'if test "'"\$""#"'" -eq 0; then' >>$F -echo ' cat <>$F -echo 'Usage: $package-config [OPTIONS]' >>$F -echo 'Options:' >>$F -echo ' --prefix[=DIR]) : \$prefix' >>$F -echo ' --package) : \$package' >>$F -echo ' --version) : \$version' >>$F -echo ' --cflags) : -I\$includedir' >>$F -echo ' --libs) : -L\$libdir -l\$package' >>$F -echo ' --help) print all the options (not just these)' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -echo ' ' >>$F -echo 'o=""' >>$F -echo 'h=""' >>$F -echo 'for i in "[$]@"; do' >>$F -echo ' case $i in' >>$F -echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F -echo ' --prefix) o="$o $prefix" ;;' >>$F -echo ' --package) o="$o $package" ;;' >>$F -echo ' --version) o="$o $version" ;;' >>$F -echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F -echo ' then o="$o -I$includedir" ; fi' >>$F -echo ' ;;' >>$F -echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F -echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F -echo ' --bindir) o="$o $bindir" ;;' >>$F -echo ' --sbindir) o="$o $sbindir" ;;' >>$F -echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F -echo ' --datadir) o="$o $datadir" ;;' >>$F -echo ' --datainc) o="$o -I$datadir" ;;' >>$F -echo ' --datalib) o="$o -L$datadir" ;;' >>$F -echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F -echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F -echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F -echo ' --libdir) o="$o $libdir" ;;' >>$F -echo ' --libadd) o="$o -L$libdir" ;;' >>$F -echo ' --infodir) o="$o $infodir" ;;' >>$F -echo ' --mandir) o="$o $mandir" ;;' >>$F -echo ' --target) o="$o $target" ;;' >>$F -echo ' --host) o="$o $host" ;;' >>$F -echo ' --build) o="$o $build" ;;' >>$F -echo ' --data) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F -echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F -echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F -echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F -echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F -echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F -echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F -echo ' --help) h="1" ;;' >>$F -echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F -echo ' v=`echo $i | sed -e s://:\$:g`' >>$F -echo ' v=`eval "echo $v"` ' >>$F -echo ' o="$o $v" ;; ' >>$F -echo ' esac' >>$F -echo 'done' >>$F -echo ' ' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'o=`eval "echo $o"`' >>$F -echo 'eval "echo $o"' >>$F -echo ' ' >>$F -echo 'if test ! -z "$h" ; then ' >>$F -echo 'cat <>$F -echo ' --prefix=xxx) (what is that for anyway?)' >>$F -echo ' --prefix) \$prefix $prefix' >>$F -echo ' --package) \$package $package' >>$F -echo ' --version) \$version $version' >>$F -echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F -echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F -echo ' --exec_prefix) or... ' >>$F -echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F -echo ' --bindir) \$bindir $bindir' >>$F -echo ' --sbindir) \$sbindir $sbindir' >>$F -echo ' --libexecdir) \$libexecdir $libexecdir' >>$F -echo ' --datadir) \$datadir $datadir' >>$F -echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F -echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F -echo ' --localstatedir) \$localstatedir $localstatedir' >>$F -echo ' --libdir) \$libdir $libdir' >>$F -echo ' --infodir) \$infodir $infodir' >>$F -echo ' --mandir) \$mandir $mandir' >>$F -echo ' --target) \$target $target' >>$F -echo ' --host) \$host $host' >>$F -echo ' --build) \$build $build' >>$F -echo ' --data) -I\$datadir/\$package' >>$F -echo ' --pkgdatadir) \$datadir/\$package' >>$F -echo ' --pkglibdir) \$libdir/\$package' >>$F -echo ' --pkgincludedir) \$includedir/\$package' >>$F -echo ' --help) generated by ax_create_generic_config.m4' >>$F -echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F -echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F -echo 'EOF' >>$F -echo 'fi' >>$F -GENERIC_CONFIG="$F" -AC_SUBST(GENERIC_CONFIG) -]) diff --git a/project1/cyassl-3.0.0/m4/ax_debug.m4 b/project1/cyassl-3.0.0/m4/ax_debug.m4 deleted file mode 100644 index 63c883c3..00000000 --- a/project1/cyassl-3.0.0/m4/ax_debug.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# =========================================================================== -# https://github.com/BrianAker/ddm4/ -# =========================================================================== -# -# SYNOPSIS -# -# AX_DEBUG() -# -# DESCRIPTION -# -# --enable-debug -# -# LICENSE -# -# Copyright (C) 2012 Brian Aker -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# * The names of its contributors may not be used to endorse or -# promote products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#serial 6 - -AC_DEFUN([AX_DEBUG], - [AC_PREREQ([2.63])dnl - AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])], - [ax_enable_debug=yes - AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])], - [ax_enable_debug=no - AC_SUBST([MCHECK]) - AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])]) - - AC_MSG_CHECKING([for debug]) - AC_MSG_RESULT([$ax_enable_debug]) - AM_CONDITIONAL([DEBUG],[test "x${ax_enable_debug}" = "xyes"])]) diff --git a/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 b/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 deleted file mode 100644 index f4c6a06a..00000000 --- a/project1/cyassl-3.0.0/m4/ax_file_escapes.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_file_escapes.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_FILE_ESCAPES -# -# DESCRIPTION -# -# Writes the specified data to the specified file. -# -# LICENSE -# -# Copyright (c) 2008 Tom Howard -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -AC_DEFUN([AX_FILE_ESCAPES],[ -AX_DOLLAR="\$" -AX_SRB="\\135" -AX_SLB="\\133" -AX_BS="\\\\" -AX_DQ="\"" -]) diff --git a/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 b/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 deleted file mode 100644 index 93240607..00000000 --- a/project1/cyassl-3.0.0/m4/ax_harden_compiler_flags.m4 +++ /dev/null @@ -1,238 +0,0 @@ -# =========================================================================== -# https://github.com/BrianAker/ddm4/ -# =========================================================================== -# -# SYNOPSIS -# -# AX_HARDEN_COMPILER_FLAGS() -# AX_HARDEN_LINKER_FLAGS() -# AX_HARDEN_CC_COMPILER_FLAGS() -# AX_HARDEN_CXX_COMPILER_FLAGS() -# -# DESCRIPTION -# -# Any compiler flag that "hardens" or tests code. C99 is assumed. -# -# NOTE: Implementation based on AX_APPEND_FLAG. -# -# LICENSE -# -# Copyright (C) 2012 Brian Aker -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# * The names of its contributors may not be used to endorse or -# promote products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# The Following flags are not checked for -# -Wdeclaration-after-statement is counter to C99 -# AX_APPEND_COMPILE_FLAGS([-std=c++11]) -- Not ready yet -# AX_APPEND_COMPILE_FLAGS([-pedantic]) -- ? -# AX_APPEND_COMPILE_FLAGS([-Wstack-protector]) -- Issues on 32bit compile -# AX_APPEND_COMPILE_FLAGS([-fstack-protector-all]) -- Issues on 32bit compile -# AX_APPEND_COMPILE_FLAGS([-Wlong-long]) -- Don't turn on for compatibility issues memcached_stat_st -# AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_cflags_extra]) -# AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_cflags_extra]) -# AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cflags_extra]) -# AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cflags_extra]) -- problems with fastmath stack size checks -# AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cflags_extra]) -- causes RSA verify problem on x64 -# AX_APPEND_COMPILE_FLAGS([-Wunreachable-code],,[$ax_append_compile_cflags_extra]) -- older clang and when gcc had it are buggy - -#serial 4 - - AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [ - AC_REQUIRE([AX_CHECK_LINK_FLAG]) - AC_REQUIRE([AX_VCS_CHECKOUT]) - AC_REQUIRE([AX_DEBUG]) - - dnl If we are inside of VCS we append -Werror, otherwise we just use it to test other flags - AX_HARDEN_LIB= - ax_append_compile_link_flags_extra= - AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],[ - AX_CHECK_LINK_FLAG([-Werror],[ - AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB" - ]) - ],[ - AX_CHECK_LINK_FLAG([-Werror],[ - ax_append_compile_link_flags_extra='-Werror' - ]) - ]) - - AX_CHECK_LINK_FLAG([-z relro -z now],[ - AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB" - ],,[$ax_append_compile_link_flags_extra]) - - AX_CHECK_LINK_FLAG([-pie],[ - AX_HARDEN_LIB="-pie $AX_HARDEN_LIB" - ],,[$ax_append_compile_link_flags_extra]) - - LIB="$LIB $AX_HARDEN_LIB" - ]) - - AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS], [ - AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) - AC_REQUIRE([AX_HARDEN_LINKER_FLAGS]) - - AC_LANG_PUSH([C]) - - CFLAGS= - ac_cv_warnings_as_errors=no - ax_append_compile_cflags_extra= - AS_IF([test "$ac_cv_vcs_checkout" = "yes"],[ - AX_APPEND_COMPILE_FLAGS([-Werror]) - ac_cv_warnings_as_errors=yes - ],[ - AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cflags_extra]) - ]) - - AS_IF([test "$ax_enable_debug" = "yes"], [ - AX_APPEND_COMPILE_FLAGS([-g]) - AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cflags_extra]) - ],[]) - - AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cflags_extra]) - - AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wno-strict-aliasing],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cflags_extra]) - dnl Anything below this comment please keep sorted. - AS_IF([test "$CC" = "clang"],[],[ - AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cflags_extra]) - ]) - AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast],,[$ax_append_compile_cflags_extra]) - dnl Not in use -Wc++-compat - AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wnested-externs],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Woverride-init],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra]) - AX_APPEND_COMPILE_FLAGS([-fPIE],,[$ax_append_compile_cflags_extra]) - AC_LANG_POP - ]) - - AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS], [ - AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS]) - AC_LANG_PUSH([C++]) - - ax_append_compile_cxxflags_extra= - AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],[ - AX_APPEND_COMPILE_FLAGS([-Werror]) - ],[ - AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cxxflags_extra]) - ]) - - AS_IF([test "$ax_enable_debug" = "yes" ], [ - AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cxxflags_extra]) - ],[ - AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2],,[$ax_append_compile_cxxflags_extra]) - ]) - - AS_IF([test "$ac_cv_vcs_checkout" = "yes" ], [ - AX_APPEND_COMPILE_FLAGS([-Werror],,[$ax_append_compile_cxxflags_extra]) - ],[ - AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cxxflags_extra]) - ]) - - AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wno-strict-aliasing],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cxxflags_extra]) - dnl Anything below this comment please keep sorted. - AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wctor-dtor-privacy],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wc++11-compat],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cxxflags_extra]) - AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cxxflags_extra]) - AC_LANG_POP - ]) - - AC_DEFUN([AX_HARDEN_COMPILER_FLAGS], [ - AC_REQUIRE([AX_HARDEN_CXX_COMPILER_FLAGS]) - ]) - - AC_DEFUN([AX_CC_OTHER_FLAGS], [ - AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) - AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS]) - - AC_LANG_PUSH([C]) - AX_APPEND_COMPILE_FLAGS([-pipe],,[$ax_append_compile_cflags_extra]) - AC_LANG_POP - ]) diff --git a/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 b/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 deleted file mode 100644 index 5b9d1c39..00000000 --- a/project1/cyassl-3.0.0/m4/ax_print_to_file.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_print_to_file.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PRINT_TO_FILE([FILE],[DATA]) -# -# DESCRIPTION -# -# Writes the specified data to the specified file. -# -# LICENSE -# -# Copyright (c) 2008 Tom Howard -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -AC_DEFUN([AX_PRINT_TO_FILE],[ -AC_REQUIRE([AX_FILE_ESCAPES]) -printf "$2" > "$1" -]) diff --git a/project1/cyassl-3.0.0/m4/ax_pthread.m4 b/project1/cyassl-3.0.0/m4/ax_pthread.m4 deleted file mode 100644 index bdb34b0a..00000000 --- a/project1/cyassl-3.0.0/m4/ax_pthread.m4 +++ /dev/null @@ -1,320 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2011 Daniel Richard G. -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 20 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) - AC_MSG_RESULT($ax_pthread_ok) - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case ${host_os} in - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - darwin*) - AC_REQUIRE([WOLFSSL_DARWIN_USING_CLANG]) - AS_IF([test x"$wolfssl_darwin_clang" = x"yes"], - [ax_pthread_flags="$ax_pthread_flags"], - [ax_pthread_flags="-pthread $ax_pthread_flags"]) - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($ax_pthread_ok) - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - ax_cv_PTHREAD_PRIO_INHERIT, [ - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD diff --git a/project1/cyassl-3.0.0/m4/ax_tls.m4 b/project1/cyassl-3.0.0/m4/ax_tls.m4 deleted file mode 100644 index 3f6b5e10..00000000 --- a/project1/cyassl-3.0.0/m4/ax_tls.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_tls.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_TLS([action-if-found], [action-if-not-found]) -# -# DESCRIPTION -# -# Provides a test for the compiler support of thread local storage (TLS) -# extensions. Defines TLS if it is found. Currently knows about GCC/ICC -# and MSVC. I think SunPro uses the same as GCC, and Borland apparently -# supports either. -# -# LICENSE -# -# Copyright (c) 2008 Alan Woodland -# Copyright (c) 2010 Diego Elio Petteno` -# -# This program 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 3 of the License, or (at your -# option) any later version. -# -# This program 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 11 - -# Define m4_ifblank and m4_ifnblank macros from introduced in -# autotools 2.64 m4sugar.m4 if using an earlier autotools. - -ifdef([m4_ifblank], [], [ - m4_define([m4_ifblank], - [m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$2], [$3])]) - ]) - - -ifdef([m4_ifnblank], [], [ - m4_define([m4_ifnblank], - [m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$3], [$2])]) - ]) - -AC_DEFUN([AX_TLS], [ - AC_MSG_CHECKING(for thread local storage (TLS) class) - AC_CACHE_VAL(ac_cv_tls, [ - ax_tls_keywords="__thread __declspec(thread) none" - for ax_tls_keyword in $ax_tls_keywords; do - AS_CASE([$ax_tls_keyword], - [none], [ac_cv_tls=none ; break], - [AC_TRY_COMPILE( - [#include - static void - foo(void) { - static ] $ax_tls_keyword [ int bar; - exit(1); - }], - [], - [ac_cv_tls=$ax_tls_keyword ; break], - ac_cv_tls=none - )]) - done - ]) - AC_MSG_RESULT($ac_cv_tls) - - AS_IF([test "$ac_cv_tls" != "none"], - AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here]) - m4_ifnblank([$1], [$1]), - m4_ifnblank([$2], [$2]) - ) -]) diff --git a/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 b/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 deleted file mode 100644 index 8047b65e..00000000 --- a/project1/cyassl-3.0.0/m4/ax_vcs_checkout.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# =========================================================================== -# http:// -# =========================================================================== -# -# SYNOPSIS -# -# AX_VCS_CHECKOUT -# -# DESCRIPTION -# -# Discover whether or not we are operating with a tree which -# has been checked out of a version control system. -# -# -# LICENSE -# -# Copyright (C) 2012 Brian Aker -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# * The names of its contributors may not be used to endorse or -# promote products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#serial 6 - -AC_DEFUN([AX_VCS_SYSTEM], - [AC_PREREQ([2.63])dnl - AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system], - [ac_cv_vcs_system="none" - AS_IF([test -d ".bzr"],[ac_cv_vcs_system="bazaar"]) - AS_IF([test -d ".svn"],[ac_cv_vcs_system="svn"]) - AS_IF([test -d ".hg"],[ac_cv_vcs_system="mercurial"]) - AS_IF([test -d ".git"],[ac_cv_vcs_system="git"]) - ]) - AC_DEFINE_UNQUOTED([VCS_SYSTEM],["$ac_cv_vcs_system"],[VCS system]) - ]) - -AC_DEFUN([AX_VCS_CHECKOUT], - [AC_PREREQ([2.63])dnl - AC_REQUIRE([AX_VCS_SYSTEM]) - AC_CACHE_CHECK([for vcs checkout],[ac_cv_vcs_checkout], - [AS_IF([test "x$ac_cv_vcs_system" != "xnone"], - [ac_cv_vcs_checkout=yes], - [ac_cv_vcs_checkout=no]) - ]) - - AM_CONDITIONAL([IS_VCS_CHECKOUT],[test "x$ac_cv_vcs_checkout" = "xyes"]) - AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"], - [AC_DEFINE([VCS_CHECKOUT],[1],[Define if the code was built from VCS.])], - [AC_DEFINE([VCS_CHECKOUT],[0],[Define if the code was built from VCS.])]) - ]) diff --git a/project1/cyassl-3.0.0/m4/hexversion.m4 b/project1/cyassl-3.0.0/m4/hexversion.m4 deleted file mode 100644 index 8d26155e..00000000 --- a/project1/cyassl-3.0.0/m4/hexversion.m4 +++ /dev/null @@ -1,6 +0,0 @@ -AC_DEFUN([CREATE_HEX_VERSION],[ - - HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \ - awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` - AC_SUBST([HEX_VERSION]) -]) diff --git a/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 b/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 deleted file mode 100644 index e786e61c..00000000 --- a/project1/cyassl-3.0.0/m4/lib_socket_nsl.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl @synopsis LIB_SOCKET_NSL -dnl -dnl This macro figures out what libraries are required on this platform -dnl to link sockets programs. -dnl -dnl The common cases are not to need any extra libraries, or to need -dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless we -dnl need it, though, since on some OSes where it isn't necessary it -dnl will totally break networking. Unisys also includes gethostbyname() -dnl in libsocket but needs libnsl for socket(). -dnl -dnl @category Misc -dnl @author Russ Allbery -dnl @author Stepan Kasal -dnl @author Warren Young -dnl @version 2005-09-06 -dnl @license AllPermissive - -AC_DEFUN([LIB_SOCKET_NSL], -[ - AC_SEARCH_LIBS([gethostbyname], [nsl]) - AC_SEARCH_LIBS([socket], [socket], [], [ - AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], - [], [-lnsl])]) -]) diff --git a/project1/cyassl-3.0.0/m4/libtool.m4 b/project1/cyassl-3.0.0/m4/libtool.m4 deleted file mode 100644 index 44e0ecff..00000000 --- a/project1/cyassl-3.0.0/m4/libtool.m4 +++ /dev/null @@ -1,7982 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/project1/cyassl-3.0.0/m4/ltoptions.m4 b/project1/cyassl-3.0.0/m4/ltoptions.m4 deleted file mode 100644 index 5d9acd8e..00000000 --- a/project1/cyassl-3.0.0/m4/ltoptions.m4 +++ /dev/null @@ -1,384 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/project1/cyassl-3.0.0/m4/ltsugar.m4 b/project1/cyassl-3.0.0/m4/ltsugar.m4 deleted file mode 100644 index 9000a057..00000000 --- a/project1/cyassl-3.0.0/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/project1/cyassl-3.0.0/m4/ltversion.m4 b/project1/cyassl-3.0.0/m4/ltversion.m4 deleted file mode 100644 index 07a8602d..00000000 --- a/project1/cyassl-3.0.0/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/project1/cyassl-3.0.0/m4/lt~obsolete.m4 b/project1/cyassl-3.0.0/m4/lt~obsolete.m4 deleted file mode 100644 index c573da90..00000000 --- a/project1/cyassl-3.0.0/m4/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/project1/cyassl-3.0.0/m4/visibility.m4 b/project1/cyassl-3.0.0/m4/visibility.m4 deleted file mode 100644 index 75c34b6e..00000000 --- a/project1/cyassl-3.0.0/m4/visibility.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# visibility.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl MacOS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -dnl "really only recommended for legacy code". -dnl Set the variable CFLAG_VISIBILITY. -dnl Defines and sets the variable HAVE_VISIBILITY. - -AC_DEFUN([gl_VISIBILITY], -[ - AC_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - dnl First, check whether -Werror can be added to the command line, or - dnl whether it leads to an error because of some other option that the - dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) - dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -]) diff --git a/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 b/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 deleted file mode 100644 index fee9b6ae..00000000 --- a/project1/cyassl-3.0.0/m4/wolfssl_darwin_clang.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# -# SYNOPSIS -# -# WOLFSSL_DARWIN_USING_CLANG -# -# DESCRIPTION -# -# With the advent of Apple Xcode v5.0, the old tool sets are missing from -# the distribution. The provided "gcc" executable wrapper accepts the -# "-pthread" flag, and passes it to the underlying "clang" which chokes -# on it. This script checks the version of the gcc executable to see if -# it reports it is really "clang". -# -# The value is placed in the wolfssl_darwin_clang variable. -# -# LICENSE -# -# Copyright (c) 2013 John Safranek -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - -AC_DEFUN([WOLFSSL_DARWIN_USING_CLANG], - [ - if test x"$CC" = xclang; then - wolfssl_darwin_clang=yes - elif test x"$CC" = x || test x"$CC" = xgcc; then - if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then - wolfssl_darwin_clang=yes - fi - fi - ]) diff --git a/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po b/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/mcapi/.deps/crypto.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po b/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/project1/cyassl-3.0.0/mcapi/.deps/mcapi_test.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h b/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h deleted file mode 100644 index 323de525..00000000 --- a/project1/cyassl-3.0.0/mcapi/PIC32MZ-serial.h +++ /dev/null @@ -1,28 +0,0 @@ -void _mon_putc(char c); - -static void init_serial() { - #ifdef MICROCHIP_PIC32 -#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__) - /* Set up PB2 divisor for UART2 */ - SYSKEY = 0x00000000; - SYSKEY = 0xAA996655; - SYSKEY = 0x556699AA; - PB2DIV = 0x00008018; - SYSKEY = 0x33333333; - - /* UART2 Init */ -// U2BRG = 0x0C; - U2BRG = 0x7; - ANSELBCLR = 0x4000; - ANSELGCLR = 0x0040; - RPB14R = 0x02; - U2RXR = 0x01; - U2MODE = 0x8000; - U2STA = 0x400; -#elif defined __PIC32MX__ - SYSTEMConfigPerformance(80000000); - DBINIT(); -#endif - -#endif -} diff --git a/project1/cyassl-3.0.0/mcapi/README b/project1/cyassl-3.0.0/mcapi/README deleted file mode 100644 index 01776dc2..00000000 --- a/project1/cyassl-3.0.0/mcapi/README +++ /dev/null @@ -1,79 +0,0 @@ -CyaSSL MPLAB X Project Files - -This directory contains project files for the Microchip MPLAB X IDE. These -projects have been set up to use the Microchip PIC32 Ethernet Starter Kit -and the Microchip XC32 compiler, and have been created specifically to test -the Microchip-specific CTaoCrypt API with compression support. For MPLAB X -projects that don't use compression and are generic to the CTaoCrypt API, -please see the /mplabx directory. - -In order to generate the necessary auto-generated MPLAB X files, make sure -to import the cyassl.X and zlib.X projects into your MPLAB X workspace before -trying to build either the CTaoCrypt test or benchmark applications. This will -correctly set up the respective project's Makefiles. - -Included Project Files ------------------------ - -1. CyaSSL library (cyassl.X) - - This project builds a static CyaSSL library. Prior to building this - project, uncomment the MICROCHIP_PIC32 define located in: - - /cyassl/ctaocrypt/settings.h - - After this project has been built, the compiled library will be located - at: - - /mplabx/cyassl.X/dist/default/production/cyassl.X.a - - Note that this project includes the zlib header location in the project's - include paths. This is because this project has been set up to be compiled - with zlib support to enable compression and decompression features. - -2. CTaoCrypt Test App (ctaocrypt_test.X) - - This project tests the CTaoCrypt cryptography modules. It is generally - a good idea to run this first on an embedded system after compiling - CyaSSL in order to verify all underlying crypto is working correctly. - -3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X) - - This project builds the CTaoCrypt benchmark application. If the CyaSSL - project (cyassl.X) has been compiled with libz support and is being - used to build this project, the zlib.X project will need to added to - the "Libraries" folder under the ctaocrypt_benchmark.X project before - it will compile successfully. - -4. CTaoCrypt MCAPI Test App (ctaocrypt_mcapi.X) - - This project tests the Microchip crytpo API layer. The Microchip crypto - layer is located under the /mcapi directory. - -5. zlib library (zlib.X) - - This project builds the zlib library for use in the ctaocrypt_test.X - and ctaocrypt_mcapi.X projects. This project expects the zlib sources - to be located under the CyaSSL root directory. Currently it is set up - to work with zlib 1.2.8, and looks for sources under: - - /zlib-1.2.8 - -PIC32MX/PIC32MZ ---------------- - -The projects are set for PIC32MX by default. For PIC32MZ, change project -properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to -XC32-gcc->Preprocessing and messages-> Preprocessor macros. - -MIPS16 and MIPS32 Support -------------------------- - -These projects support both MIPS16 and MIPS32 instruction sets. Switching -between these two instruction sets can be done in each project's properties -settings by checking the "Generate 16-bit code" checkbox. - -Support -------- -Please send questions or comments to support@wolfssl.com - diff --git a/project1/cyassl-3.0.0/mcapi/crypto.c b/project1/cyassl-3.0.0/mcapi/crypto.c deleted file mode 100644 index d7232449..00000000 --- a/project1/cyassl-3.0.0/mcapi/crypto.c +++ /dev/null @@ -1,703 +0,0 @@ -/* crypto.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* Implements Microchip CRYPTO API layer */ - - - -#include "crypto.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* Initialize MD5 */ -int CRYPT_MD5_Initialize(CRYPT_MD5_CTX* md5) -{ - typedef char md5_test[sizeof(CRYPT_MD5_CTX) >= sizeof(Md5) ? 1 : -1]; - (void)sizeof(md5_test); - - if (md5 == NULL) - return BAD_FUNC_ARG; - - InitMd5((Md5*)md5); - - return 0; -} - - -/* Add data to MD5 */ -int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX* md5, const unsigned char* input, - unsigned int sz) -{ - if (md5 == NULL || input == NULL) - return BAD_FUNC_ARG; - - Md5Update((Md5*)md5, input, sz); - - return 0; -} - - -/* Get MD5 Final into digest */ -int CRYPT_MD5_Finalize(CRYPT_MD5_CTX* md5, unsigned char* digest) -{ - if (md5 == NULL || digest == NULL) - return BAD_FUNC_ARG; - - Md5Final((Md5*)md5, digest); - - return 0; -} - - -/* Initialize SHA */ -int CRYPT_SHA_Initialize(CRYPT_SHA_CTX* sha) -{ - typedef char sha_test[sizeof(CRYPT_SHA_CTX) >= sizeof(Sha) ? 1 : -1]; - (void)sizeof(sha_test); - - if (sha == NULL) - return BAD_FUNC_ARG; - - return InitSha((Sha*)sha); -} - - -/* Add data to SHA */ -int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX* sha, const unsigned char* input, - unsigned int sz) -{ - if (sha == NULL || input == NULL) - return BAD_FUNC_ARG; - - return ShaUpdate((Sha*)sha, input, sz); -} - - -/* Get SHA Final into digest */ -int CRYPT_SHA_Finalize(CRYPT_SHA_CTX* sha, unsigned char* digest) -{ - if (sha == NULL || digest == NULL) - return BAD_FUNC_ARG; - - return ShaFinal((Sha*)sha, digest); -} - - -/* Initialize SHA-256 */ -int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX* sha256) -{ - typedef char sha_test[sizeof(CRYPT_SHA256_CTX) >= sizeof(Sha256) ? 1 : -1]; - (void)sizeof(sha_test); - - if (sha256 == NULL) - return BAD_FUNC_ARG; - - return InitSha256((Sha256*)sha256); -} - - -/* Add data to SHA-256 */ -int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX* sha256, const unsigned char* input, - unsigned int sz) -{ - if (sha256 == NULL || input == NULL) - return BAD_FUNC_ARG; - - return Sha256Update((Sha256*)sha256, input, sz); -} - - -/* Get SHA-256 Final into digest */ -int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX* sha256, unsigned char* digest) -{ - if (sha256 == NULL || digest == NULL) - return BAD_FUNC_ARG; - - return Sha256Final((Sha256*)sha256, digest); -} - - -/* Initialize SHA-384 */ -int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX* sha384) -{ - typedef char sha_test[sizeof(CRYPT_SHA384_CTX) >= sizeof(Sha384) ? 1 : -1]; - (void)sizeof(sha_test); - - if (sha384 == NULL) - return BAD_FUNC_ARG; - - return InitSha384((Sha384*)sha384); -} - - -/* Add data to SHA-384 */ -int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX* sha384, const unsigned char* input, - unsigned int sz) -{ - if (sha384 == NULL || input == NULL) - return BAD_FUNC_ARG; - - return Sha384Update((Sha384*)sha384, input, sz); -} - - -/* Get SHA-384 Final into digest */ -int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX* sha384, unsigned char* digest) -{ - if (sha384 == NULL || digest == NULL) - return BAD_FUNC_ARG; - - return Sha384Final((Sha384*)sha384, digest); -} - - -/* Initialize SHA-512 */ -int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX* sha512) -{ - typedef char sha_test[sizeof(CRYPT_SHA512_CTX) >= sizeof(Sha512) ? 1 : -1]; - (void)sizeof(sha_test); - - if (sha512 == NULL) - return BAD_FUNC_ARG; - - return InitSha512((Sha512*)sha512); -} - - -/* Add data to SHA-512 */ -int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX* sha512, const unsigned char* input, - unsigned int sz) -{ - if (sha512 == NULL || input == NULL) - return BAD_FUNC_ARG; - - return Sha512Update((Sha512*)sha512, input, sz); -} - - -/* Get SHA-512 Final into digest */ -int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX* sha512, unsigned char* digest) -{ - if (sha512 == NULL || digest == NULL) - return BAD_FUNC_ARG; - - return Sha512Final((Sha512*)sha512, digest); -} - - -/* Set HMAC key with type */ -int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX* hmac, int type, const unsigned char* key, - unsigned int sz) -{ - typedef char hmac_test[sizeof(CRYPT_HMAC_CTX) >= sizeof(Hmac) ? 1 : -1]; - (void)sizeof(hmac_test); - - if (hmac == NULL || key == NULL) - return BAD_FUNC_ARG; - - if (type != CRYPT_HMAC_SHA && type != CRYPT_HMAC_SHA256 && - type != CRYPT_HMAC_SHA384 && type != CRYPT_HMAC_SHA512) { - return BAD_FUNC_ARG; /* bad hmac type */ - } - - return HmacSetKey((Hmac*)hmac, type, key, sz); -} - - -int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX* hmac, const unsigned char* input, - unsigned int sz) -{ - if (hmac == NULL || input == NULL) - return BAD_FUNC_ARG; - - return HmacUpdate((Hmac*)hmac, input, sz); -} - - -/* Get HMAC Final into digest */ -int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX* hmac, unsigned char* digest) -{ - if (hmac == NULL || digest == NULL) - return BAD_FUNC_ARG; - - return HmacFinal((Hmac*)hmac, digest); -} - - -/* Huffman Compression, set flag to do static, otherwise dynamic */ -/* return compressed size, otherwise < 0 for error */ -int CRYPT_HUFFMAN_Compress(unsigned char* out, unsigned int outSz, - const unsigned char* in, unsigned int inSz, - unsigned int flags) -{ - if (out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return Compress(out, outSz, in, inSz, flags); -} - - -/* Huffman DeCompression, self determines type */ -/* return decompressed size, otherwise < 0 for error */ -int CRYPT_HUFFMAN_DeCompress(unsigned char* out, unsigned int outSz, - const unsigned char* in, unsigned int inSz) -{ - if (out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return DeCompress(out, outSz, in, inSz); -} - - -/* RNG Initialize, < 0 on error */ -int CRYPT_RNG_Initialize(CRYPT_RNG_CTX* rng) -{ - typedef char rng_test[sizeof(CRYPT_RNG_CTX) >= sizeof(RNG) ? 1 : -1]; - (void)sizeof(rng_test); - - if (rng == NULL) - return BAD_FUNC_ARG; - - return InitRng((RNG*)rng); -} - - -/* RNG Get single bytes, < 0 on error */ -int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b) -{ - if (rng == NULL || b == NULL) - return BAD_FUNC_ARG; - - return RNG_GenerateByte((RNG*)rng, (byte*)b); -} - - -/* RNG Block Generation of sz bytes, < 0 on error */ -int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b, - unsigned int sz) -{ - if (rng == NULL || b == NULL) - return BAD_FUNC_ARG; - - return RNG_GenerateBlock((RNG*)rng, b, sz); -} - - -/* Triple DES Key Set, may have iv, will have direction */ -int CRYPT_TDES_KeySet(CRYPT_TDES_CTX* tdes, const unsigned char* key, - const unsigned char* iv, int dir) -{ - typedef char tdes_test[sizeof(CRYPT_TDES_CTX) >= sizeof(Des3) ? 1 : -1]; - (void)sizeof(tdes_test); - - if (tdes == NULL || key == NULL) - return BAD_FUNC_ARG; - - return Des3_SetKey((Des3*)tdes, key, iv, dir); -} - - -/* Triple DES Iv Set, sometimes added later */ -int CRYPT_TDES_IvSet(CRYPT_TDES_CTX* tdes, const unsigned char* iv) -{ - if (tdes == NULL || iv == NULL) - return BAD_FUNC_ARG; - - return Des3_SetIV((Des3*)tdes, iv); -} - - -/* Triple DES CBC Encrypt */ -int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX* tdes, unsigned char* out, - const unsigned char* in, unsigned int inSz) -{ - if (tdes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return Des3_CbcEncrypt((Des3*)tdes, out, in, inSz); -} - - -/* Triple DES CBC Decrypt */ -int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX* tdes, unsigned char* out, - const unsigned char* in, unsigned int inSz) -{ - if (tdes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return Des3_CbcDecrypt((Des3*)tdes, out, in, inSz); -} - - -/* AES Key Set, may have iv, will have direction */ -int CRYPT_AES_KeySet(CRYPT_AES_CTX* aes, const unsigned char* key, - unsigned int keyLen, const unsigned char* iv, int dir) -{ - typedef char aes_test[sizeof(CRYPT_AES_CTX) >= sizeof(Aes) ? 1 : -1]; - (void)sizeof(aes_test); - - if (aes == NULL || key == NULL) - return BAD_FUNC_ARG; - - return AesSetKey((Aes*)aes, key, keyLen, iv, dir); -} - - -/* AES Iv Set, sometimes added later */ -int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv) -{ - if (aes == NULL || iv == NULL) - return BAD_FUNC_ARG; - - return AesSetIV((Aes*)aes, iv); -} - - -/* AES CBC Encrypt */ -int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, - const unsigned char* in, unsigned int inSz) -{ - if (aes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return AesCbcEncrypt((Aes*)aes, out, in, inSz); -} - - -/* AES CBC Decrypt */ -int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out, - const unsigned char* in, unsigned int inSz) -{ - if (aes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - return AesCbcDecrypt((Aes*)aes, out, in, inSz); -} - - -/* AES CTR Encrypt (used for decrypt too, with ENCRYPT key setup) */ -int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, - const unsigned char* in, unsigned int inSz) -{ - if (aes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - AesCtrEncrypt((Aes*)aes, out, in, inSz); - - return 0; -} - - -/* AES Direct mode encrypt, one block at a time */ -int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out, - const unsigned char* in) -{ - if (aes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - AesEncryptDirect((Aes*)aes, out, in); - - return 0; -} - - -/* AES Direct mode decrypt, one block at a time */ -int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out, - const unsigned char* in) -{ - if (aes == NULL || out == NULL || in == NULL) - return BAD_FUNC_ARG; - - AesDecryptDirect((Aes*)aes, out, in); - - return 0; -} - - -/* RSA Initialize */ -int CRYPT_RSA_Initialize(CRYPT_RSA_CTX* rsa) -{ - if (rsa == NULL) - return BAD_FUNC_ARG; - - rsa->holder = (RsaKey*)XMALLOC(sizeof(RsaKey), NULL, DYNAMIC_TYPE_RSA); - if (rsa->holder == NULL) - return -1; - - return InitRsaKey((RsaKey*)rsa->holder, NULL); -} - - -/* RSA Free resources */ -int CRYPT_RSA_Free(CRYPT_RSA_CTX* rsa) -{ - if (rsa == NULL) - return BAD_FUNC_ARG; - - FreeRsaKey((RsaKey*)rsa->holder); - XFREE(rsa->holder, NULL, DYNAMIC_TYPE_RSA); - rsa->holder = NULL; - - return 0; -} - - -/* RSA Public key decode ASN.1 */ -int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in, - unsigned int inSz) -{ - unsigned int idx = 0; - (void)idx; - - if (rsa == NULL || in == NULL) - return BAD_FUNC_ARG; - - return RsaPublicKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz); -} - - -/* RSA Private key decode ASN.1 */ -int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in, - unsigned int inSz) -{ - unsigned int idx = 0; - (void)idx; - - if (rsa == NULL || in == NULL) - return BAD_FUNC_ARG; - - return RsaPrivateKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz); -} - - -/* RSA Public Encrypt */ -int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX* rsa, unsigned char* out, - unsigned int outSz, const unsigned char* in, - unsigned int inSz, CRYPT_RNG_CTX* rng) -{ - if (rsa == NULL || in == NULL || out == NULL || rng == NULL) - return BAD_FUNC_ARG; - - return RsaPublicEncrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder, - (RNG*)rng); -} - - -/* RSA Private Decrypt */ -int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX* rsa, unsigned char* out, - unsigned int outSz, const unsigned char* in, - unsigned int inSz) -{ - if (rsa == NULL || in == NULL || out == NULL) - return BAD_FUNC_ARG; - - return RsaPrivateDecrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder); -} - - -/* RSA Get Encrypt size helper */ -int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX* rsa) -{ - if (rsa == NULL) - return BAD_FUNC_ARG; - - return RsaEncryptSize((RsaKey*)rsa->holder); -} - - -/* ECC init */ -int CRYPT_ECC_Initialize(CRYPT_ECC_CTX* ecc) -{ - if (ecc == NULL) - return BAD_FUNC_ARG; - - ecc->holder = (ecc_key*)XMALLOC(sizeof(ecc_key), NULL, DYNAMIC_TYPE_ECC); - if (ecc->holder == NULL) - return -1; - - ecc_init((ecc_key*)ecc->holder); - - return 0; -} - - -/* ECC free resources */ -int CRYPT_ECC_Free(CRYPT_ECC_CTX* ecc) -{ - if (ecc == NULL) - return BAD_FUNC_ARG; - - ecc_free((ecc_key*)ecc->holder); - XFREE(ecc->holder, NULL, DYNAMIC_TYPE_ECC); - ecc->holder = NULL; - - return 0; -} - - -/* ECC Public x963 Export */ -int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX* ecc, unsigned char* out, - unsigned int outSz, unsigned int* usedSz) -{ - int ret; - unsigned int inOut = outSz; - - if (ecc == NULL || out == NULL) - return BAD_FUNC_ARG; - - ret = ecc_export_x963((ecc_key*)ecc->holder, out, &inOut); - *usedSz = inOut; - - return ret; -} - - -/* ECC Public x963 Import */ -int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX* ecc, const unsigned char* in, - unsigned int inSz) -{ - if (ecc == NULL || in == NULL) - return BAD_FUNC_ARG; - - return ecc_import_x963(in, inSz, (ecc_key*)ecc->holder); -} - - -/* ECC Private x963 Import */ -int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX* ecc, const unsigned char* priv, - unsigned int privSz, const unsigned char* pub, unsigned int pubSz) -{ - if (ecc == NULL || priv == NULL || pub == NULL) - return BAD_FUNC_ARG; - - return ecc_import_private_key(priv, privSz, pub, pubSz, - (ecc_key*)ecc->holder); -} - - -/* ECC DHE Make key */ -int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, int keySz) -{ - if (ecc == NULL || rng == NULL) - return BAD_FUNC_ARG; - - return ecc_make_key((RNG*)rng, keySz, (ecc_key*)ecc->holder); -} - - -/* ECC DHE Make shared secret with our private and peer public */ -int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX* priv, CRYPT_ECC_CTX* pub, - unsigned char* out, unsigned int outSz, unsigned int* usedSz) -{ - int ret; - unsigned int inOut = outSz; - - if (priv == NULL || pub == NULL || out == NULL || usedSz == NULL) - return BAD_FUNC_ARG; - - ret = ecc_shared_secret((ecc_key*)priv->holder, (ecc_key*)pub->holder, - out, &inOut); - *usedSz = inOut; - - return ret; -} - - -/* ECC DSA Hash Sign */ -int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, - unsigned char* sig, unsigned int sigSz, - unsigned int* usedSz, const unsigned char* in, - unsigned int inSz) -{ - int ret; - unsigned int inOut = sigSz; - - if (ecc == NULL || rng == NULL || sig == NULL || usedSz == NULL || - in == NULL) - return BAD_FUNC_ARG; - - ret = ecc_sign_hash(in, inSz, sig, &inOut, (RNG*)rng, - (ecc_key*)ecc->holder); - *usedSz = inOut; - - return ret; -} - - -/* ECC DSA Hash Verify */ -int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX* ecc, const unsigned char* sig, - unsigned int sigSz, unsigned char* hash, - unsigned int hashSz, int* status) -{ - if (ecc == NULL || sig == NULL || hash == NULL || status == NULL) - return BAD_FUNC_ARG; - - return ecc_verify_hash(sig, sigSz, hash, hashSz, status, - (ecc_key*)ecc->holder); -} - - -/* ECC get key size helper */ -int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX* ecc) -{ - if (ecc == NULL) - return BAD_FUNC_ARG; - - return ecc_size((ecc_key*)ecc->holder); -} - - -/* ECC get signature size helper */ -int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX* ecc) -{ - if (ecc == NULL) - return BAD_FUNC_ARG; - - return ecc_sig_size((ecc_key*)ecc->holder); -} - - -/* Save error string from err to str which needs to be >= 80 chars */ -int CRYPT_ERROR_StringGet(int err, char* str) -{ - if (str == NULL) - return BAD_FUNC_ARG; - - CTaoCryptErrorString(err, str); - - return 0; -} - diff --git a/project1/cyassl-3.0.0/mcapi/crypto.h b/project1/cyassl-3.0.0/mcapi/crypto.h deleted file mode 100644 index 0838b537..00000000 --- a/project1/cyassl-3.0.0/mcapi/crypto.h +++ /dev/null @@ -1,268 +0,0 @@ -/* crypto.h - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* Defines Microchip CRYPTO API layer */ - - -#ifndef MC_CRYPTO_API_H -#define MC_CRYPTO_API_H - - -#ifdef __cplusplus - extern "C" { -#endif - -/* MD5 */ -typedef struct CRYPT_MD5_CTX { - int holder[24]; /* big enough to hold internal, but check on init */ -} CRYPT_MD5_CTX; - -int CRYPT_MD5_Initialize(CRYPT_MD5_CTX*); -int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX*, const unsigned char*, unsigned int); -int CRYPT_MD5_Finalize(CRYPT_MD5_CTX*, unsigned char*); - -enum { - CRYPT_MD5_DIGEST_SIZE = 16 -}; - - -/* SHA */ -typedef struct CRYPT_SHA_CTX { - int holder[24]; /* big enough to hold internal, but check on init */ -} CRYPT_SHA_CTX; - -int CRYPT_SHA_Initialize(CRYPT_SHA_CTX*); -int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX*, const unsigned char*, unsigned int); -int CRYPT_SHA_Finalize(CRYPT_SHA_CTX*, unsigned char*); - -enum { - CRYPT_SHA_DIGEST_SIZE = 20 -}; - - -/* SHA-256 */ -typedef struct CRYPT_SHA256_CTX { - int holder[28]; /* big enough to hold internal, but check on init */ -} CRYPT_SHA256_CTX; - -int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX*); -int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX*, const unsigned char*, unsigned int); -int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX*, unsigned char*); - -enum { - CRYPT_SHA256_DIGEST_SIZE = 32 -}; - - -/* SHA-384 */ -typedef struct CRYPT_SHA384_CTX { - long long holder[32]; /* big enough to hold internal, but check on init */ -} CRYPT_SHA384_CTX; - -int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX*); -int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX*, const unsigned char*, unsigned int); -int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX*, unsigned char*); - -enum { - CRYPT_SHA384_DIGEST_SIZE = 48 -}; - - -/* SHA-512 */ -typedef struct CRYPT_SHA512_CTX { - long long holder[36]; /* big enough to hold internal, but check on init */ -} CRYPT_SHA512_CTX; - -int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX*); -int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX*, const unsigned char*, unsigned int); -int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX*, unsigned char*); - -enum { - CRYPT_SHA512_DIGEST_SIZE = 64 -}; - - -/* HMAC */ -typedef struct CRYPT_HMAC_CTX { - long long holder[67]; /* big enough to hold internal, but check on init */ -} CRYPT_HMAC_CTX; - -int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX*, int, const unsigned char*, unsigned int); -int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX*, const unsigned char*, unsigned int); -int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX*, unsigned char*); - -/* HMAC types */ -enum { - CRYPT_HMAC_SHA = 1, - CRYPT_HMAC_SHA256 = 2, - CRYPT_HMAC_SHA384 = 5, - CRYPT_HMAC_SHA512 = 4 -}; - - -/* Huffman */ -int CRYPT_HUFFMAN_Compress(unsigned char*, unsigned int, const unsigned char*, - unsigned int, unsigned int); -int CRYPT_HUFFMAN_DeCompress(unsigned char*, unsigned int, const unsigned char*, - unsigned int); - -/* flag to use static huffman */ -enum { - CRYPT_HUFFMAN_COMPRESS_STATIC = 1 -}; - - -/* RNG */ -typedef struct CRYPT_RNG_CTX { - int holder[66]; /* big enough to hold internal, but check on init */ -} CRYPT_RNG_CTX; - -int CRYPT_RNG_Initialize(CRYPT_RNG_CTX*); -int CRYPT_RNG_Get(CRYPT_RNG_CTX*, unsigned char*); -int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX*, unsigned char*, unsigned int); - - -/* TDES */ -typedef struct CRYPT_TDES_CTX { - int holder[100]; /* big enough to hold internal, but check on init */ -} CRYPT_TDES_CTX; - -int CRYPT_TDES_KeySet(CRYPT_TDES_CTX*, const unsigned char*, - const unsigned char*, int); -int CRYPT_TDES_IvSet(CRYPT_TDES_CTX*, const unsigned char*); -int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX*, unsigned char*, - const unsigned char*, unsigned int); -int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX*, unsigned char*, - const unsigned char*, unsigned int); - -/* key direction flags for setup */ -enum { - CRYPT_TDES_ENCRYPTION = 0, - CRYPT_TDES_DECRYPTION = 1 -}; - - -/* AES */ -typedef struct CRYPT_AES_CTX { - int holder[70]; /* big enough to hold internal, but check on init */ -} CRYPT_AES_CTX; - -/* key */ -int CRYPT_AES_KeySet(CRYPT_AES_CTX*, const unsigned char*, unsigned int, - const unsigned char*, int); -int CRYPT_AES_IvSet(CRYPT_AES_CTX*, const unsigned char*); - -/* cbc */ -int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX*, unsigned char*, - const unsigned char*, unsigned int); -int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX*, unsigned char*, - const unsigned char*, unsigned int); - -/* ctr (counter), use Encrypt both ways with ENCRYPT key setup */ -int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX*, unsigned char*, - const unsigned char*, unsigned int); - -/* direct, one block at a time */ -int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX*, unsigned char*, - const unsigned char*); -int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX*, unsigned char*, - const unsigned char*); - -/* key direction flags for setup, ctr always uses ENCRYPT flag */ -enum { - CRYPT_AES_ENCRYPTION = 0, - CRYPT_AES_DECRYPTION = 1, - CRYPT_AES_BLOCK_SIZE = 16 -}; - - - -/* RSA */ -typedef struct CRYPT_RSA_CTX { - void* holder; -} CRYPT_RSA_CTX; - -/* init/free */ -int CRYPT_RSA_Initialize(CRYPT_RSA_CTX*); -int CRYPT_RSA_Free(CRYPT_RSA_CTX*); - -/* key decode */ -int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX*, const unsigned char*, - unsigned int); -int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX*, const unsigned char*, - unsigned int); - -/* encrypt/decrypt */ -int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX*, unsigned char*, - unsigned int, const unsigned char*, unsigned int, - CRYPT_RNG_CTX*); -int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX*, unsigned char*, - unsigned int, const unsigned char*, unsigned int); - -/* helpers */ -int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX*); - - - -/* ECC */ -typedef struct CRYPT_ECC_CTX { - void* holder; -} CRYPT_ECC_CTX; - -/* init/free */ -int CRYPT_ECC_Initialize(CRYPT_ECC_CTX*); -int CRYPT_ECC_Free(CRYPT_ECC_CTX*); - -/* key coders */ -int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX*, unsigned char*, unsigned int, - unsigned int*); -int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int); -int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int, - const unsigned char*, unsigned int); - -/* dhe */ -int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, int); -int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX*, CRYPT_ECC_CTX*, - unsigned char*, unsigned int, unsigned int*); - -/* dsa */ -int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, unsigned char*, - unsigned int, unsigned int*, const unsigned char*, unsigned int); -int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX*, const unsigned char*, - unsigned int, unsigned char*, unsigned int, int*); - -/* helpers */ -int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX*); -int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX*); - - -/* Error string helper, string needs to be >= 80 chars */ -int CRYPT_ERROR_StringGet(int, char*); - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* MC_CRYPTO_API_H */ - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml deleted file mode 100644 index e9792ab6..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - ../mcapi_test.c - - - Makefile - - - - .. - - Makefile - - - - localhost - PIC32MX795F512L - - - SKDEPIC32PlatformTool - XC32 - 1.30 - 3 - - - - - - - - - - - - - - - - false - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am deleted file mode 100644 index 4e2ba8af..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mcapi/ctaocrypt_mcapi.X/Makefile - -EXTRA_DIST += \ - mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_mcapi.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml deleted file mode 100644 index ee5e120b..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_mcapi.X/nbproject/project.xml +++ /dev/null @@ -1,18 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - ctaocrypt_mcapi - 2ca6ab9b-e225-4ad3-b48e-9ea7b47a4ca4 - 0 - c - - - ISO-8859-1 - - ../zlib.X - ../cyassl.X - - - - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml deleted file mode 100644 index d5b8d3e8..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/configurations.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - ../../ctaocrypt/test/test.h - - - - - ../../ctaocrypt/test/test.c - ../../mplabx/test_main.c - - - Makefile - - - - ../../mplabx - - Makefile - - - - localhost - PIC32MX795F512L - - - SKDEPIC32PlatformTool - XC32 - 1.30 - 3 - - - - - - - - - - - - - - - - false - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am deleted file mode 100644 index dc3d2f9a..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mcapi/ctaocrypt_test.X/Makefile - -EXTRA_DIST += \ - mcapi/ctaocrypt_test.X/nbproject/configurations.xml \ - mcapi/ctaocrypt_test.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml deleted file mode 100644 index d60fdcdb..00000000 --- a/project1/cyassl-3.0.0/mcapi/ctaocrypt_test.X/nbproject/project.xml +++ /dev/null @@ -1,18 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - ctaocrypt_test - b34c4937-7042-4352-88b1-7717bcdf8aeb - 0 - c - - h - ISO-8859-1 - - ../zlib.X - ../cyassl.X - - - - diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile b/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mcapi/cyassl.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml deleted file mode 100644 index 7837eed0..00000000 --- a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/configurations.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - ../../src/crl.c - ../../src/internal.c - ../../src/io.c - ../../src/keys.c - ../../src/ocsp.c - ../../src/sniffer.c - ../../src/ssl.c - ../../src/tls.c - ../../ctaocrypt/src/aes.c - ../../ctaocrypt/src/arc4.c - ../../ctaocrypt/src/asm.c - ../../ctaocrypt/src/asn.c - ../../ctaocrypt/src/coding.c - ../../ctaocrypt/src/des3.c - ../../ctaocrypt/src/dh.c - ../../ctaocrypt/src/dsa.c - ../../ctaocrypt/src/ecc.c - ../../ctaocrypt/src/ecc_fp.c - ../../ctaocrypt/src/error.c - ../../ctaocrypt/src/hc128.c - ../../ctaocrypt/src/hmac.c - ../../ctaocrypt/src/integer.c - ../../ctaocrypt/src/logging.c - ../../ctaocrypt/src/md2.c - ../../ctaocrypt/src/md4.c - ../../ctaocrypt/src/md5.c - ../../ctaocrypt/src/memory.c - ../../ctaocrypt/src/misc.c - ../../ctaocrypt/src/pwdbased.c - ../../ctaocrypt/src/rabbit.c - ../../ctaocrypt/src/random.c - ../../ctaocrypt/src/ripemd.c - ../../ctaocrypt/src/rsa.c - ../../ctaocrypt/src/sha.c - ../../ctaocrypt/src/sha256.c - ../../ctaocrypt/src/sha512.c - ../../ctaocrypt/src/tfm.c - ../../mcapi/crypto.c - ../../ctaocrypt/src/compress.c - ../../ctaocrypt/src/camellia.c - ../../ctaocrypt/src/port.c - - - Makefile - - - - .. - ../../ctaocrypt/src - - Makefile - - - - localhost - PIC32MX795F512L - - - SKDEPIC32PlatformTool - XC32 - 1.30 - 3 - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am deleted file mode 100644 index fc7e8d97..00000000 --- a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mcapi/cyassl.X/Makefile - -EXTRA_DIST += \ - mcapi/cyassl.X/nbproject/configurations.xml \ - mcapi/cyassl.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml deleted file mode 100644 index c7604d71..00000000 --- a/project1/cyassl-3.0.0/mcapi/cyassl.X/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - cyassl - 93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b - 0 - c - - - ISO-8859-1 - - - - diff --git a/project1/cyassl-3.0.0/mcapi/include.am b/project1/cyassl-3.0.0/mcapi/include.am deleted file mode 100644 index 993ba29c..00000000 --- a/project1/cyassl-3.0.0/mcapi/include.am +++ /dev/null @@ -1,19 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -if BUILD_MCAPI -check_PROGRAMS += mcapi/test -noinst_PROGRAMS += mcapi/test -mcapi_test_SOURCES = mcapi/crypto.c \ - mcapi/mcapi_test.c -mcapi_test_LDADD = src/libcyassl.la -mcapi_test_DEPENDENCIES = src/libcyassl.la -endif - -noinst_HEADERS += mcapi/crypto.h - -EXTRA_DIST += \ - mcapi/README \ - mcapi/PIC32MZ-serial.h - diff --git a/project1/cyassl-3.0.0/mcapi/mcapi_test.c b/project1/cyassl-3.0.0/mcapi/mcapi_test.c deleted file mode 100644 index 5610a650..00000000 --- a/project1/cyassl-3.0.0/mcapi/mcapi_test.c +++ /dev/null @@ -1,1482 +0,0 @@ -/* test.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - - -/* Tests Microchip CRYPTO API layer */ - - - -/* mc api header */ -#include "crypto.h" - -#include - -/* sanity test against our default implementation, cyassl headers */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define USE_CERT_BUFFERS_1024 -#include - -#if defined(CYASSL_MICROCHIP_PIC32MZ) - #define MICROCHIP_PIC32 - #include - #pragma config ICESEL = ICS_PGx2 - /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ - #include - #include - #include "PIC32MZ-serial.h" - #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ -#elif defined(MICROCHIP_PIC32) - #define PIC32_STARTER_KIT - #include - #include - #include - #include - #include - #define init_serial() /* void out init_serial() */ -#else - #include /* order matters above ? */ -#endif -#define OUR_DATA_SIZE 1024 -static byte ourData[OUR_DATA_SIZE]; -static byte* key = NULL; -static byte* iv = NULL; -static CRYPT_RNG_CTX mcRng; -static RNG defRng; - -static int check_md5(void); -static int check_sha(void); -static int check_sha256(void); -static int check_sha384(void); -static int check_sha512(void); -static int check_hmac(void); -static int check_compress(void); -static int check_rng(void); -static int check_des3(void); -static int check_aescbc(void); -static int check_aesctr(void); -static int check_aesdirect(void); -static int check_rsa(void); -static int check_ecc(void); - - -int main(int argc, char** argv) -{ - int ret; - int i; - - (void)argc; - (void)argv; - -#if defined(MICROCHIP_PIC32) - init_serial() ; /* initialize PIC32MZ serial I/O */ - SYSTEMConfigPerformance(80000000); - DBINIT(); -#endif - - /* align key, iv pointers */ - key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_KEY); - if (key == NULL) { - printf("mcapi key alloc failed\n"); - return -1; - } - - iv = (byte*)XMALLOC(16, NULL, DYNAMIC_TYPE_KEY); - if (iv == NULL) { - printf("mcapi iv alloc failed\n"); - return -1; - } - - for (i = 0; i < OUR_DATA_SIZE; i++) - ourData[i] = (byte)i; - - ret = check_md5(); - if (ret != 0) { - printf("mcapi check_md5 failed\n"); - return -1; - } - - ret = check_sha(); - if (ret != 0) { - printf("mcapi check_sha failed\n"); - return -1; - } - - ret = check_sha256(); - if (ret != 0) { - printf("mcapi check_sha256 failed\n"); - return -1; - } - - ret = check_sha384(); - if (ret != 0) { - printf("mcapi check_sha384 failed\n"); - return -1; - } - - ret = check_sha512(); - if (ret != 0) { - printf("mcapi check_sha512 failed\n"); - return -1; - } - - ret = check_hmac(); - if (ret != 0) { - printf("mcapi check_hmac failed\n"); - return -1; - } - - ret = check_compress(); - if (ret != 0) { - printf("mcapi check_compress failed\n"); - return -1; - } - - ret = check_rng(); - if (ret != 0) { - printf("mcapi check_rng failed\n"); - return -1; - } - - ret = check_des3(); - if (ret != 0) { - printf("mcapi check_des3 failed\n"); - return -1; - } - - ret = check_aescbc(); - if (ret != 0) { - printf("mcapi check_aes cbc failed\n"); - return -1; - } - - ret = check_aesctr(); - if (ret != 0) { - printf("mcapi check_aes ctr failed\n"); - return -1; - } - - ret = check_aesdirect(); - if (ret != 0) { - printf("mcapi check_aes direct failed\n"); - return -1; - } - - ret = check_rsa(); - if (ret != 0) { - printf("mcapi check_rsa failed\n"); - return -1; - } - - ret = check_ecc(); - if (ret != 0) { - printf("mcapi check_ecc failed\n"); - return -1; - } - - XFREE(iv, NULL, DYNAMIC_TYPE_KEY); - XFREE(key, NULL, DYNAMIC_TYPE_KEY); - - return 0; -} - - -/* check mcapi md5 against internal */ -static int check_md5(void) -{ - CRYPT_MD5_CTX mcMd5; - Md5 defMd5; - byte mcDigest[CRYPT_MD5_DIGEST_SIZE]; - byte defDigest[MD5_DIGEST_SIZE]; - - CRYPT_MD5_Initialize(&mcMd5); - InitMd5(&defMd5); - - CRYPT_MD5_DataAdd(&mcMd5, ourData, OUR_DATA_SIZE); - Md5Update(&defMd5, ourData, OUR_DATA_SIZE); - - CRYPT_MD5_Finalize(&mcMd5, mcDigest); - Md5Final(&defMd5, defDigest); - - if (memcmp(mcDigest, defDigest, CRYPT_MD5_DIGEST_SIZE) != 0) { - printf("md5 final memcmp fialed\n"); - return -1; - } - printf("md5 mcapi test passed\n"); - - return 0; -} - - -/* check mcapi sha against internal */ -static int check_sha(void) -{ - CRYPT_SHA_CTX mcSha; - Sha defSha; - int ret = 0; - byte mcDigest[CRYPT_SHA_DIGEST_SIZE]; - byte defDigest[SHA_DIGEST_SIZE]; - - CRYPT_SHA_Initialize(&mcSha); - ret = InitSha(&defSha); - if (ret != 0) { - printf("sha init default failed\n"); - return -1; - } - - CRYPT_SHA_DataAdd(&mcSha, ourData, OUR_DATA_SIZE); - ShaUpdate(&defSha, ourData, OUR_DATA_SIZE); - - CRYPT_SHA_Finalize(&mcSha, mcDigest); - ShaFinal(&defSha, defDigest); - - if (memcmp(mcDigest, defDigest, CRYPT_SHA_DIGEST_SIZE) != 0) { - printf("sha final memcmp failed\n"); - return -1; - } - printf("sha mcapi test passed\n"); - - return 0; -} - - -/* check mcapi sha256 against internal */ -static int check_sha256(void) -{ - CRYPT_SHA256_CTX mcSha256; - Sha256 defSha256; - int ret; - byte mcDigest[CRYPT_SHA256_DIGEST_SIZE]; - byte defDigest[SHA256_DIGEST_SIZE]; - - CRYPT_SHA256_Initialize(&mcSha256); - ret = InitSha256(&defSha256); - if (ret != 0) { - printf("sha256 init default failed\n"); - return -1; - } - - CRYPT_SHA256_DataAdd(&mcSha256, ourData, OUR_DATA_SIZE); - ret = Sha256Update(&defSha256, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("sha256 update default failed\n"); - return -1; - } - - CRYPT_SHA256_Finalize(&mcSha256, mcDigest); - ret = Sha256Final(&defSha256, defDigest); - if (ret != 0) { - printf("sha256 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA256_DIGEST_SIZE) != 0) { - printf("sha256 final memcmp fialed\n"); - return -1; - } - printf("sha256 mcapi test passed\n"); - - return 0; -} - - -/* check mcapi sha384 against internal */ -static int check_sha384(void) -{ - CRYPT_SHA384_CTX mcSha384; - Sha384 defSha384; - int ret; - byte mcDigest[CRYPT_SHA384_DIGEST_SIZE]; - byte defDigest[SHA384_DIGEST_SIZE]; - - CRYPT_SHA384_Initialize(&mcSha384); - ret = InitSha384(&defSha384); - if (ret != 0) { - printf("sha384 init default failed\n"); - return -1; - } - - CRYPT_SHA384_DataAdd(&mcSha384, ourData, OUR_DATA_SIZE); - ret = Sha384Update(&defSha384, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("sha384 update default failed\n"); - return -1; - } - - CRYPT_SHA384_Finalize(&mcSha384, mcDigest); - ret = Sha384Final(&defSha384, defDigest); - if (ret != 0) { - printf("sha384 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA384_DIGEST_SIZE) != 0) { - printf("sha384 final memcmp fialed\n"); - return -1; - } - printf("sha384 mcapi test passed\n"); - - return 0; -} - - -/* check mcapi sha512 against internal */ -static int check_sha512(void) -{ - CRYPT_SHA512_CTX mcSha512; - Sha512 defSha512; - int ret; - byte mcDigest[CRYPT_SHA512_DIGEST_SIZE]; - byte defDigest[SHA512_DIGEST_SIZE]; - - CRYPT_SHA512_Initialize(&mcSha512); - ret = InitSha512(&defSha512); - if (ret != 0) { - printf("sha512 init default failed\n"); - return -1; - } - - CRYPT_SHA512_DataAdd(&mcSha512, ourData, OUR_DATA_SIZE); - ret = Sha512Update(&defSha512, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("sha512 update default failed\n"); - return -1; - } - - CRYPT_SHA512_Finalize(&mcSha512, mcDigest); - ret = Sha512Final(&defSha512, defDigest); - if (ret != 0) { - printf("sha512 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA512_DIGEST_SIZE) != 0) { - printf("sha512 final memcmp fialed\n"); - return -1; - } - printf("sha512 mcapi test passed\n"); - - return 0; -} - - -/* check mcapi hmac against internal */ -static int check_hmac(void) -{ - CRYPT_HMAC_CTX mcHmac; - Hmac defHmac; - int ret; - byte mcDigest[CRYPT_SHA512_DIGEST_SIZE]; - byte defDigest[SHA512_DIGEST_SIZE]; - - strncpy((char*)key, "Jefe", 4); - - /* SHA1 */ - CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA, key, 4); - ret = HmacSetKey(&defHmac, SHA, key, 4); - if (ret != 0) { - printf("hmac sha setkey default failed\n"); - return -1; - } - - CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); - ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("hmac sha update default failed\n"); - return -1; - } - - CRYPT_HMAC_Finalize(&mcHmac, mcDigest); - ret = HmacFinal(&defHmac, defDigest); - if (ret != 0) { - printf("hmac sha final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA_DIGEST_SIZE) != 0) { - printf("hmac sha final memcmp fialed\n"); - return -1; - } - printf("hmac sha mcapi test passed\n"); - - /* SHA-256 */ - CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA256, key, 4); - ret = HmacSetKey(&defHmac, SHA256, key, 4); - if (ret != 0) { - printf("hmac sha256 setkey default failed\n"); - return -1; - } - - CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); - ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("hmac sha256 update default failed\n"); - return -1; - } - - CRYPT_HMAC_Finalize(&mcHmac, mcDigest); - ret = HmacFinal(&defHmac, defDigest); - if (ret != 0) { - printf("hmac sha256 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA256_DIGEST_SIZE) != 0) { - printf("hmac sha256 final memcmp fialed\n"); - return -1; - } - printf("hmac sha256 mcapi test passed\n"); - - /* SHA-384 */ - CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA384, key, 4); - ret = HmacSetKey(&defHmac, SHA384, key, 4); - if (ret != 0) { - printf("hmac sha384 setkey default failed\n"); - return -1; - } - - CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); - ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("hmac sha384 update default failed\n"); - return -1; - } - - CRYPT_HMAC_Finalize(&mcHmac, mcDigest); - ret = HmacFinal(&defHmac, defDigest); - if (ret != 0) { - printf("hmac sha384 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA384_DIGEST_SIZE) != 0) { - printf("hmac sha384 final memcmp fialed\n"); - return -1; - } - printf("hmac sha384 mcapi test passed\n"); - - /* SHA-512 */ - CRYPT_HMAC_SetKey(&mcHmac, CRYPT_HMAC_SHA512, key, 4); - ret = HmacSetKey(&defHmac, SHA512, key, 4); - if (ret != 0) { - printf("hmac sha512 setkey default failed\n"); - return -1; - } - - CRYPT_HMAC_DataAdd(&mcHmac, ourData, OUR_DATA_SIZE); - ret = HmacUpdate(&defHmac, ourData, OUR_DATA_SIZE); - if (ret != 0) { - printf("hmac sha512 update default failed\n"); - return -1; - } - - CRYPT_HMAC_Finalize(&mcHmac, mcDigest); - ret = HmacFinal(&defHmac, defDigest); - if (ret != 0) { - printf("hmac sha512 final default failed\n"); - return -1; - } - - if (memcmp(mcDigest, defDigest, CRYPT_SHA512_DIGEST_SIZE) != 0) { - printf("hmac sha512 final memcmp fialed\n"); - return -1; - } - printf("hmac sha512 mcapi test passed\n"); - - return 0; -} - - -/* check mcapi compress against internal */ -static int check_compress(void) -{ - const unsigned char text[] = - "Biodiesel cupidatat marfa, cliche aute put a bird on it incididunt elit\n" - "polaroid. Sunt tattooed bespoke reprehenderit. Sint twee organic id\n" - "marfa. Commodo veniam ad esse gastropub. 3 wolf moon sartorial vero,\n" - "plaid delectus biodiesel squid +1 vice. Post-ironic keffiyeh leggings\n" - "selfies cray fap hoodie, forage anim. Carles cupidatat shoreditch, VHS\n" - "small batch meggings kogi dolore food truck bespoke gastropub.\n" - "\n" - "Terry richardson adipisicing actually typewriter tumblr, twee whatever\n" - "four loko you probably haven't heard of them high life. Messenger bag\n" - "whatever tattooed deep v mlkshk. Brooklyn pinterest assumenda chillwave\n" - "et, banksy ullamco messenger bag umami pariatur direct trade forage.\n" - "Typewriter culpa try-hard, pariatur sint brooklyn meggings. Gentrify\n" - "food truck next level, tousled irony non semiotics PBR ethical anim cred\n" - "readymade. Mumblecore brunch lomo odd future, portland organic terry\n" - "four loko whatever street art yr farm-to-table.\n"; - - unsigned int inSz = sizeof(text); - unsigned int outSz; - unsigned char cBuffer[1024]; - unsigned char dBuffer[1024]; - - int ret1, ret2; - - /* dynamic */ - ret1 = CRYPT_HUFFMAN_Compress(cBuffer, sizeof(cBuffer), text, inSz, 0); - ret2 = Compress(dBuffer, sizeof(dBuffer), text, inSz, 0); - - if (ret1 != ret2 || ret1 < 0) { - printf("compress dynamic ret failed\n"); - return -1; - } - - if (memcmp(cBuffer, dBuffer, ret1) != 0) { - printf("compress dynamic cmp failed\n"); - return -1; - } - - outSz = ret1; - - ret1 = CRYPT_HUFFMAN_DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); - - if (memcmp(dBuffer, text, inSz) != 0) { - printf("mcapi decompress dynamic cmp failed\n"); - return -1; - } - - memset(dBuffer, 0, sizeof(dBuffer)); - - ret1 = DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); - - if (memcmp(dBuffer, text, inSz) != 0) { - printf("decompress dynamic cmp failed\n"); - return -1; - } - - memset(cBuffer, 0, sizeof(cBuffer)); - memset(dBuffer, 0, sizeof(dBuffer)); - - /* static */ - ret1 = CRYPT_HUFFMAN_Compress(cBuffer, sizeof(cBuffer), text, inSz, 1); - ret2 = Compress(dBuffer, sizeof(dBuffer), text, inSz, 1); - - if (ret1 != ret2 || ret1 < 0) { - printf("compress static ret failed\n"); - return -1; - } - - if (memcmp(cBuffer, dBuffer, ret1) != 0) { - printf("compress static cmp failed\n"); - return -1; - } - - outSz = ret1; - - ret1 = CRYPT_HUFFMAN_DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); - - if (memcmp(dBuffer, text, inSz) != 0) { - printf("mcapi decompress static cmp failed\n"); - return -1; - } - - memset(dBuffer, 0, sizeof(dBuffer)); - - ret1 = DeCompress(dBuffer, sizeof(dBuffer), cBuffer, outSz); - - if (memcmp(dBuffer, text, inSz) != 0) { - printf("decompress static cmp failed\n"); - return -1; - } - - printf("huffman mcapi test passed\n"); - - return 0; -} - - -#define RANDOM_BYTE_SZ 32 - -/* check mcapi rng */ -static int check_rng(void) -{ - int ret; - int i; - byte in[RANDOM_BYTE_SZ]; - byte out[RANDOM_BYTE_SZ]; - - for (i = 0; i < RANDOM_BYTE_SZ; i++) - in[i] = (byte)i; - - for (i = 0; i < RANDOM_BYTE_SZ; i++) - out[i] = (byte)i; - - ret = InitRng(&defRng); - if (ret != 0) { - printf("default rng init failed\n"); - return -1; - } - - ret = CRYPT_RNG_Initialize(&mcRng); - if (ret != 0) { - printf("mcapi rng init failed\n"); - return -1; - } - - ret = CRYPT_RNG_Get(&mcRng, &out[0]); - if (ret != 0) { - printf("mcapi rng get failed\n"); - return -1; - } - - ret = CRYPT_RNG_BlockGenerate(&mcRng, out, RANDOM_BYTE_SZ); - if (ret != 0) { - printf("mcapi rng block gen failed\n"); - return -1; - } - - if (memcmp(in, out, RANDOM_BYTE_SZ) == 0) { - printf("mcapi rng block gen output failed\n"); - return -1; - } - - printf("rng mcapi test passed\n"); - - return 0; -} - - -#define TDES_TEST_SIZE 32 - -/* check mcapi des3 */ -static int check_des3(void) -{ - CRYPT_TDES_CTX mcDes3; - Des3 defDes3; - int ret; - byte out1[TDES_TEST_SIZE]; - byte out2[TDES_TEST_SIZE]; - - strncpy((char*)key, "1234567890abcdefghijklmn", 24); - strncpy((char*)iv, "12345678", 8); - - /* cbc encrypt */ - ret = CRYPT_TDES_KeySet(&mcDes3, key, iv, CRYPT_TDES_ENCRYPTION); - if (ret != 0) { - printf("mcapi tdes key set failed\n"); - return -1; - } - ret = Des3_SetKey(&defDes3, key, iv, DES_ENCRYPTION); - if (ret != 0) { - printf("default des3 key set failed\n"); - return -1; - } - - ret = CRYPT_TDES_CBC_Encrypt(&mcDes3, out1, ourData, TDES_TEST_SIZE); - if (ret != 0) { - printf("mcapi tdes cbc encrypt failed\n"); - return -1; - } - ret = Des3_CbcEncrypt(&defDes3, out2, ourData, TDES_TEST_SIZE); - if (ret != 0) { - printf("mcapi default tdes cbc encrypt failed\n"); - return -1; - } - - if (memcmp(out1, out2, TDES_TEST_SIZE) != 0) { - printf("mcapi tdes cbc encrypt cmp failed\n"); - return -1; - } - - /* cbc decrypt */ - ret = CRYPT_TDES_KeySet(&mcDes3, key, iv, CRYPT_TDES_DECRYPTION); - if (ret != 0) { - printf("mcapi tdes key set failed\n"); - return -1; - } - ret = Des3_SetKey(&defDes3, key, iv, DES_DECRYPTION); - if (ret != 0) { - printf("default des3 key set failed\n"); - return -1; - } - - ret = CRYPT_TDES_CBC_Decrypt(&mcDes3, out2, out1, TDES_TEST_SIZE); - if (ret != 0) { - printf("mcapi tdes cbc decrypt failed\n"); - return -1; - } - ret = Des3_CbcDecrypt(&defDes3, out1, out1, TDES_TEST_SIZE); - if (ret != 0) { - printf("mcapi default tdes cbc decrypt failed\n"); - return -1; - } - - if (memcmp(out1, out2, TDES_TEST_SIZE) != 0) { - printf("mcapi tdes cbc decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, TDES_TEST_SIZE) != 0) { - printf("mcapi tdes cbc decrypt orig cmp failed\n"); - return -1; - } - - printf("tdes mcapi test passed\n"); - - return 0; -} - - -#define AES_TEST_SIZE 32 - -/* check mcapi aes cbc */ -static int check_aescbc(void) -{ - CRYPT_AES_CTX mcAes; - Aes defAes; - int ret; - byte out1[AES_TEST_SIZE]; - byte out2[AES_TEST_SIZE]; - - strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); - strncpy((char*)iv, "1234567890abcdef", 16); - - /* 128 cbc encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-128 cbc encrypt failed\n"); - return -1; - } - AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-128 cbc encrypt cmp failed\n"); - return -1; - } - - /* 128 cbc decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, DES_DECRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-128 cbc decrypt failed\n"); - return -1; - } - AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-128 cbc decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-128 cbc decrypt orig cmp failed\n"); - return -1; - } - - /* 192 cbc encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-192 cbc encrypt failed\n"); - return -1; - } - AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-192 cbc encrypt cmp failed\n"); - return -1; - } - - /* 192 cbc decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-192 cbc decrypt failed\n"); - return -1; - } - AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-192 cbc decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-192 cbc decrypt orig cmp failed\n"); - return -1; - } - - /* 256 cbc encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-256 cbc encrypt failed\n"); - return -1; - } - AesCbcEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-256 cbc encrypt cmp failed\n"); - return -1; - } - - /* 256 cbc decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_DECRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CBC_Decrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-256 cbc decrypt failed\n"); - return -1; - } - AesCbcDecrypt(&defAes, out1, out1, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-256 cbc decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-256 cbc decrypt orig cmp failed\n"); - return -1; - } - - printf("aes-cbc mcapi test passed\n"); - - return 0; -} - - -/* check mcapi aes ctr */ -static int check_aesctr(void) -{ - CRYPT_AES_CTX mcAes; - Aes defAes; - int ret; - byte out1[AES_TEST_SIZE]; - byte out2[AES_TEST_SIZE]; - - strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); - strncpy((char*)iv, "1234567890abcdef", 16); - - /* 128 ctr encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-128 ctr encrypt failed\n"); - return -1; - } - AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-128 ctr encrypt cmp failed\n"); - return -1; - } - - /* 128 ctr decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-128 ctr decrypt failed\n"); - return -1; - } - - if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-128 ctr decrypt orig cmp failed\n"); - return -1; - } - - /* 192 ctr encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-192 ctr encrypt failed\n"); - return -1; - } - AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-192 ctr encrypt cmp failed\n"); - return -1; - } - - /* 192 ctr decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-192 ctr decrypt failed\n"); - return -1; - } - - if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-192 ctr decrypt orig cmp failed\n"); - return -1; - } - - /* 256 ctr encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out1, ourData, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-256 ctr encrypt failed\n"); - return -1; - } - AesCtrEncrypt(&defAes, out2, ourData, AES_TEST_SIZE); - - if (memcmp(out1, out2, AES_TEST_SIZE) != 0) { - printf("mcapi aes-256 ctr encrypt cmp failed\n"); - return -1; - } - - /* 256 ctr decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_CTR_Encrypt(&mcAes, out2, out1, AES_TEST_SIZE); - if (ret != 0) { - printf("mcapi aes-256 ctr decrypt failed\n"); - return -1; - } - - if (memcmp(out2, ourData, AES_TEST_SIZE) != 0) { - printf("mcapi aes-256 ctr decrypt orig cmp failed\n"); - return -1; - } - - printf("aes-ctr mcapi test passed\n"); - - return 0; -} - - -/* check mcapi aes direct */ -static int check_aesdirect(void) -{ - CRYPT_AES_CTX mcAes; - Aes defAes; - int ret; - byte out1[CRYPT_AES_BLOCK_SIZE]; - byte out2[16]; /* one block at a time */ - - strncpy((char*)key, "1234567890abcdefghijklmnopqrstuv", 32); - strncpy((char*)iv, "1234567890abcdef", 16); - - /* 128 direct encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); - if (ret != 0) { - printf("mcapi aes-128 direct encrypt failed\n"); - return -1; - } - AesEncryptDirect(&defAes, out2, ourData); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-128 direct encrypt cmp failed\n"); - return -1; - } - - /* 128 direct decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 16, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-128 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 16, iv, DES_DECRYPTION); - if (ret != 0) { - printf("default aes-128 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); - if (ret != 0) { - printf("mcapi aes-128 direct decrypt failed\n"); - return -1; - } - AesDecryptDirect(&defAes, out1, out1); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-128 direct decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-128 direct decrypt orig cmp failed\n"); - return -1; - } - - /* 192 direct encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); - if (ret != 0) { - printf("mcapi aes-192 direct encrypt failed\n"); - return -1; - } - AesEncryptDirect(&defAes, out2, ourData); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-192 direct encrypt cmp failed\n"); - return -1; - } - - /* 192 direct decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 24, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-192 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 24, iv, AES_DECRYPTION); - if (ret != 0) { - printf("default aes-192 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); - if (ret != 0) { - printf("mcapi aes-192 direct decrypt failed\n"); - return -1; - } - AesDecryptDirect(&defAes, out1, out1); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-192 direct decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-192 direct decrypt orig cmp failed\n"); - return -1; - } - - /* 256 direct encrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_ENCRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_ENCRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Encrypt(&mcAes, out1, ourData); - if (ret != 0) { - printf("mcapi aes-256 direct encrypt failed\n"); - return -1; - } - AesEncryptDirect(&defAes, out2, ourData); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-256 direct encrypt cmp failed\n"); - return -1; - } - - /* 256 direct decrypt */ - ret = CRYPT_AES_KeySet(&mcAes, key, 32, iv, CRYPT_AES_DECRYPTION); - if (ret != 0) { - printf("mcapi aes-256 key set failed\n"); - return -1; - } - ret = AesSetKey(&defAes, key, 32, iv, AES_DECRYPTION); - if (ret != 0) { - printf("default aes-256 key set failed\n"); - return -1; - } - - ret = CRYPT_AES_DIRECT_Decrypt(&mcAes, out2, out1); - if (ret != 0) { - printf("mcapi aes-256 direct decrypt failed\n"); - return -1; - } - AesDecryptDirect(&defAes, out1, out1); - - if (memcmp(out1, out2, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-256 direct decrypt cmp failed\n"); - return -1; - } - - if (memcmp(out1, ourData, CRYPT_AES_BLOCK_SIZE) != 0) { - printf("mcapi aes-256 direct decrypt orig cmp failed\n"); - return -1; - } - - printf("aes-direct mcapi test passed\n"); - - return 0; -} - - -#define RSA_TEST_SIZE 64 - -/* check mcapi rsa */ -static int check_rsa(void) -{ - CRYPT_RSA_CTX mcRsa; - RsaKey defRsa; - int ret; - int ret2; - unsigned int keySz = (unsigned int)sizeof(client_key_der_1024); - unsigned int idx = 0; - byte out1[256]; - byte out2[256]; - - ret = InitRsaKey(&defRsa, NULL); - if (ret == 0) - ret = CRYPT_RSA_Initialize(&mcRsa); - if (ret != 0) { - printf("mcapi rsa init failed\n"); - return -1; - } - - ret = CRYPT_RSA_PrivateKeyDecode(&mcRsa, client_key_der_1024, keySz); - if (ret != 0) { - printf("mcapi rsa private key decode failed\n"); - return -1; - } - - ret = RsaPrivateKeyDecode(client_key_der_1024, &idx, &defRsa, keySz); - if (ret != 0) { - printf("default rsa private key decode failed\n"); - return -1; - } - - ret = CRYPT_RSA_PublicEncrypt(&mcRsa, out1, sizeof(out1), ourData, - RSA_TEST_SIZE, &mcRng); - if (ret < 0) { - printf("mcapi rsa public encrypt failed\n"); - return -1; - } - - ret2 = RsaPublicEncrypt(ourData, RSA_TEST_SIZE, out2, sizeof(out2), - &defRsa, &defRng); - if (ret2 < 0) { - printf("default rsa public encrypt failed\n"); - return -1; - } - - if (ret != ret2) { - printf("default rsa public encrypt sz != mcapi sz\n"); - return -1; - } - - if (ret != CRYPT_RSA_EncryptSizeGet(&mcRsa)) { - printf("mcapi encrypt sz get != mcapi sz\n"); - return -1; - } - - ret = CRYPT_RSA_PrivateDecrypt(&mcRsa, out2, sizeof(out2), out1, ret); - if (ret < 0) { - printf("mcapi rsa private derypt failed\n"); - return -1; - } - - if (ret != RSA_TEST_SIZE) { - printf("mcapi rsa private derypt plain size wrong\n"); - return -1; - } - - if (memcmp(out2, ourData, ret) != 0) { - printf("mcapi rsa private derypt plain text bad\n"); - return -1; - } - - FreeRsaKey(&defRsa); - ret = CRYPT_RSA_Free(&mcRsa); - if (ret != 0) { - printf("mcapi rsa free failed\n"); - return -1; - } - - printf("rsa mcapi test passed\n"); - - return 0; -} - - -/* check mcapi ecc */ -static int check_ecc(void) -{ - CRYPT_ECC_CTX userA; - CRYPT_ECC_CTX userB; - int ret; - byte sharedA[100]; - byte sharedB[100]; - byte sig[100]; - unsigned int aSz = (unsigned int)sizeof(sharedA); - unsigned int bSz = (unsigned int)sizeof(sharedB); - unsigned int sigSz = (unsigned int)sizeof(sig); - unsigned int usedA = 0; - unsigned int usedB = 0; - int verifyStatus = 0; - - /* init */ - ret = CRYPT_ECC_Initialize(&userA); - if (ret != 0) { - printf("mcapi ecc init failed\n"); - return -1; - } - - ret = CRYPT_ECC_Initialize(&userB); - if (ret != 0) { - printf("mcapi ecc init b failed\n"); - return -1; - } - - /* dhe + helpers */ - ret = CRYPT_ECC_DHE_KeyMake(&userA, &mcRng, 32); - if (ret != 0) { - printf("mcapi ecc make key failed\n"); - return -1; - } - - ret = CRYPT_ECC_DHE_KeyMake(&userB, &mcRng, 32); - if (ret != 0) { - printf("mcapi ecc make key b failed\n"); - return -1; - } - - ret = CRYPT_ECC_KeySizeGet(&userA); - if (ret <= 0) { - printf("mcapi ecc key size get failed\n"); - return -1; - } - - ret = CRYPT_ECC_SignatureSizeGet(&userA); - if (ret <= 0) { - printf("mcapi ecc signature size get failed\n"); - return -1; - } - - ret = CRYPT_ECC_DHE_SharedSecretMake(&userA, &userB, sharedA, aSz, &usedA); - if (ret != 0) { - printf("mcapi ecc make shared secret failed\n"); - return -1; - } - - ret = CRYPT_ECC_DHE_SharedSecretMake(&userB, &userA, sharedB, bSz, &usedB); - if (ret != 0) { - printf("mcapi ecc make shared secret failed\n"); - return -1; - } - - if (usedA != usedB || usedA <= 0) { - printf("mcapi ecc make shared secret output size match failed\n"); - return -1; - } - - if (memcmp(sharedA, sharedB, usedA) != 0) { - printf("mcapi ecc make shared secret output match cmp failed\n"); - return -1; - } - - /* dsa */ - ret = CRYPT_ECC_DSA_HashSign(&userA, &mcRng, sig, sigSz, &usedA, ourData, - CRYPT_SHA_DIGEST_SIZE); - if (ret != 0) { - printf("mcapi ecc sign hash failed\n"); - return -1; - } - - sigSz = usedA; - if (sigSz <= 0) { - printf("mcapi ecc sign hash bad sig size\n"); - return -1; - } - - ret = CRYPT_ECC_DSA_HashVerify(&userA, sig, sigSz, ourData, - CRYPT_SHA_DIGEST_SIZE, &verifyStatus); - if (ret != 0) { - printf("mcapi ecc verify hash failed\n"); - return -1; - } - if (verifyStatus != 1) { - printf("mcapi ecc verify hash status failed\n"); - return -1; - } - - /* import / export */ - usedA = 0; - ret = CRYPT_ECC_PublicExport(&userA, sharedA, aSz, &usedA); - if (ret != 0) { - printf("mcapi ecc public export failed\n"); - return -1; - } - - ret = CRYPT_ECC_PublicImport(&userB, sharedA, usedA); - if (ret != 0) { - printf("mcapi ecc public import failed\n"); - return -1; - } - - ret = CRYPT_ECC_Free(&userA); - if (ret != 0) { - printf("mcapi ecc free failed\n"); - return -1; - } - - ret = CRYPT_ECC_Free(&userB); - if (ret != 0) { - printf("mcapi ecc free b failed\n"); - return -1; - } - - printf("ecc mcapi test passed\n"); - - return 0; -} - diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile b/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mcapi/zlib.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml deleted file mode 100644 index 1078d1e2..00000000 --- a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/configurations.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - ../../zlib-1.2.8/adler32.c - ../../zlib-1.2.8/compress.c - ../../zlib-1.2.8/crc32.c - ../../zlib-1.2.8/deflate.c - ../../zlib-1.2.8/gzclose.c - ../../zlib-1.2.8/gzlib.c - ../../zlib-1.2.8/gzread.c - ../../zlib-1.2.8/gzwrite.c - ../../zlib-1.2.8/infback.c - ../../zlib-1.2.8/inffast.c - ../../zlib-1.2.8/inflate.c - ../../zlib-1.2.8/inftrees.c - ../../zlib-1.2.8/trees.c - ../../zlib-1.2.8/uncompr.c - ../../zlib-1.2.8/zutil.c - - - Makefile - - - Makefile - - - - localhost - PIC32MX795F512L - - - SKDEPIC32PlatformTool - XC32 - 1.10 - 4 - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am deleted file mode 100644 index 9d855dde..00000000 --- a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mcapi/zlib.X/Makefile - -EXTRA_DIST += \ - mcapi/zlib.X/nbproject/configurations.xml \ - mcapi/zlib.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml b/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml deleted file mode 100644 index b0da527d..00000000 --- a/project1/cyassl-3.0.0/mcapi/zlib.X/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - zlib - 8eef651d-e634-46ae-9183-39443c98e390 - 0 - c - - - ISO-8859-1 - - - - diff --git a/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h b/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h deleted file mode 100644 index 323de525..00000000 --- a/project1/cyassl-3.0.0/mplabx/PIC32MZ-serial.h +++ /dev/null @@ -1,28 +0,0 @@ -void _mon_putc(char c); - -static void init_serial() { - #ifdef MICROCHIP_PIC32 -#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__) - /* Set up PB2 divisor for UART2 */ - SYSKEY = 0x00000000; - SYSKEY = 0xAA996655; - SYSKEY = 0x556699AA; - PB2DIV = 0x00008018; - SYSKEY = 0x33333333; - - /* UART2 Init */ -// U2BRG = 0x0C; - U2BRG = 0x7; - ANSELBCLR = 0x4000; - ANSELGCLR = 0x0040; - RPB14R = 0x02; - U2RXR = 0x01; - U2MODE = 0x8000; - U2STA = 0x400; -#elif defined __PIC32MX__ - SYSTEMConfigPerformance(80000000); - DBINIT(); -#endif - -#endif -} diff --git a/project1/cyassl-3.0.0/mplabx/README b/project1/cyassl-3.0.0/mplabx/README deleted file mode 100644 index 715c227b..00000000 --- a/project1/cyassl-3.0.0/mplabx/README +++ /dev/null @@ -1,55 +0,0 @@ -CyaSSL MPLAB X Project Files - -This directory contains project files for the Microchip MPLAB X IDE. These -projects have been set up to use the Microchip PIC32 Ethernet Starter Kit -and the Microchip XC32 compiler. - -In order to generate the necessary auto-generated MPLAB X files, make sure -to import the cyassl.X project into your MPLAB X workspace before trying to -build either the CTaoCrypt test or benchmark applications. This will -correctly set up the respective project's Makefiles. - -Included Project Files ------------------------ - -1. CyaSSL library (cyassl.X) - - This project builds a static CyaSSL library. Prior to building this - project, uncomment the MICROCHIP_PIC32 define located in: - - /cyassl/ctaocrypt/settings.h - - After this project has been built, the compiled library will be located - at: - - /mplabx/cyassl.X/dist/default/production/cyassl.X.a - -2. CTaoCrypt Test App (ctaocrypt_test.X) - - This project tests the CTaoCrypt cryptography modules. It is generally - a good idea to run this first on an embedded system after compiling - CyaSSL in order to verify all underlying crypto is working correctly. - -3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X) - - This project builds the CTaoCrypt benchmark application. - -PIC32MX/PIC32MZ ---------------- - -The projects are set for PIC32MX by default. For PIC32MZ, change project -properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to -XC32-gcc->Preprocessing and messages-> Preprocessor macros. - - -MIPS16 and MIPS32 Support -------------------------- - -These projects support both MIPS16 and MIPS32 instruction sets. Switching -between these two instruction sets can be done in each project's properties -settings by checking the "Generate 16-bit code" checkbox. - -Support -------- -Please send questions or comments to support@wolfssl.com - diff --git a/project1/cyassl-3.0.0/mplabx/benchmark_main.c b/project1/cyassl-3.0.0/mplabx/benchmark_main.c deleted file mode 100644 index 4d115de7..00000000 --- a/project1/cyassl-3.0.0/mplabx/benchmark_main.c +++ /dev/null @@ -1,133 +0,0 @@ -/* benchmark_main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if defined(CYASSL_MICROCHIP_PIC32MZ) - #define MICROCHIP_PIC32 - #include - #pragma config ICESEL = ICS_PGx2 - /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ - #include "PIC32MZ-serial.h" - #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ -#else - #define PIC32_STARTER_KIT - #include - #include - #include - #define init_serial() /* void out init_serial() ; */ -#endif - -void bench_des(void); -void bench_arc4(void); -void bench_hc128(void); -void bench_rabbit(void); -void bench_aes(int); -void bench_aesgcm(void); - -void bench_md5(void); -void bench_sha(void); -void bench_sha256(void); -void bench_sha512(void); -void bench_ripemd(void); - -void bench_rsa(void); -void bench_rsaKeyGen(void); -void bench_dh(void); -#ifdef HAVE_ECC -void bench_eccKeyGen(void); -void bench_eccKeyAgree(void); -#endif - -/* - * Main driver for CTaoCrypt benchmarks. - */ -int main(int argc, char** argv) { - volatile int i ; - int j ; - - init_serial() ; /* initialize PIC32MZ serial I/O */ - SYSTEMConfigPerformance(80000000); - DBINIT(); - - printf("wolfCrypt Benchmark:\n"); - -#ifndef NO_AES - bench_aes(0); - bench_aes(1); -#endif -#ifdef HAVE_AESGCM - bench_aesgcm(); -#endif -#ifndef NO_RC4 - bench_arc4(); -#endif -#ifdef HAVE_HC128 - bench_hc128(); -#endif -#ifndef NO_RABBIT - bench_rabbit(); -#endif -#ifndef NO_DES3 - bench_des(); -#endif - - printf("\n"); - -#ifndef NO_MD5 - bench_md5(); -#endif - bench_sha(); -#ifndef NO_SHA256 - bench_sha256(); -#endif -#ifdef CYASSL_SHA512 - bench_sha512(); -#endif -#ifdef CYASSL_RIPEMD - bench_ripemd(); -#endif - - printf("\n"); - -#ifndef NO_RSA - bench_rsa(); -#endif - -#ifndef NO_DH - bench_dh(); -#endif - -#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA) - bench_rsaKeyGen(); -#endif - -#ifdef HAVE_ECC - bench_eccKeyGen(); - bench_eccKeyAgree(); -#endif - printf("End of wolfCrypt Benchmark:\n"); - return 0; -} - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml deleted file mode 100644 index 13faa6bc..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - ../../ctaocrypt/benchmark/benchmark.c - ../benchmark_main.c - - - Makefile - - - - .. - - Makefile - - - - localhost - PIC32MX795F512L - - - PKOBSKDEPlatformTool - XC32 - 1.30 - 3 - - - - - - - - - - - - false - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am deleted file mode 100644 index 9af74c3b..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mplabx/ctaocrypt_benchmark.X/Makefile - -EXTRA_DIST += \ - mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_benchmark.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml deleted file mode 100644 index e87963a9..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_benchmark.X/nbproject/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - ctaocrypt_benchmark - 22e4138b-5f20-4957-ac0a-c181b94d3342 - 0 - c - - - ISO-8859-1 - - ../cyassl.X - - - - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml deleted file mode 100644 index 7ffe44c2..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/configurations.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - ../../ctaocrypt/test/test.h - - - - - ../../ctaocrypt/test/test.c - ../test_main.c - - - Makefile - - - - .. - - Makefile - - - - localhost - PIC32MX795F512L - - - PKOBSKDEPlatformTool - XC32 - 1.30 - 3 - - - - - - - - - - - - false - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am deleted file mode 100644 index ea0df611..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mplabx/ctaocrypt_test.X/Makefile - -EXTRA_DIST += \ - mplabx/ctaocrypt_test.X/nbproject/configurations.xml \ - mplabx/ctaocrypt_test.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml deleted file mode 100644 index 82180e82..00000000 --- a/project1/cyassl-3.0.0/mplabx/ctaocrypt_test.X/nbproject/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - ctaocrypt_test - b34c4937-7042-4352-88b1-7717bcdf8aeb - 0 - c - - h - ISO-8859-1 - - ../cyassl.X - - - - diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile b/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile deleted file mode 100644 index 05a3fb1b..00000000 --- a/project1/cyassl-3.0.0/mplabx/cyassl.X/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL - - -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin -RANLIB=ranlib - - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml deleted file mode 100644 index 1a141bb2..00000000 --- a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/configurations.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - ../../src/crl.c - ../../src/internal.c - ../../src/io.c - ../../src/keys.c - ../../src/ocsp.c - ../../src/sniffer.c - ../../src/ssl.c - ../../src/tls.c - ../../ctaocrypt/src/aes.c - ../../ctaocrypt/src/arc4.c - ../../ctaocrypt/src/asm.c - ../../ctaocrypt/src/asn.c - ../../ctaocrypt/src/coding.c - ../../ctaocrypt/src/des3.c - ../../ctaocrypt/src/dh.c - ../../ctaocrypt/src/dsa.c - ../../ctaocrypt/src/ecc.c - ../../ctaocrypt/src/ecc_fp.c - ../../ctaocrypt/src/error.c - ../../ctaocrypt/src/hc128.c - ../../ctaocrypt/src/hmac.c - ../../ctaocrypt/src/integer.c - ../../ctaocrypt/src/logging.c - ../../ctaocrypt/src/md2.c - ../../ctaocrypt/src/md4.c - ../../ctaocrypt/src/md5.c - ../../ctaocrypt/src/memory.c - ../../ctaocrypt/src/misc.c - ../../ctaocrypt/src/pwdbased.c - ../../ctaocrypt/src/rabbit.c - ../../ctaocrypt/src/random.c - ../../ctaocrypt/src/ripemd.c - ../../ctaocrypt/src/rsa.c - ../../ctaocrypt/src/sha.c - ../../ctaocrypt/src/sha256.c - ../../ctaocrypt/src/sha512.c - ../../ctaocrypt/src/tfm.c - ../../ctaocrypt/src/port.c - - - Makefile - - - - .. - ../../cyassl/ctaocrypt - ../../ctaocrypt/src - - Makefile - - - - localhost - PIC32MX795F512L - - - PKOBSKDEPlatformTool - XC32 - 1.30 - 3 - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am deleted file mode 100644 index 7d0b9879..00000000 --- a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mplabx/cyassl.X/Makefile - -EXTRA_DIST += \ - mplabx/cyassl.X/nbproject/configurations.xml \ - mplabx/cyassl.X/nbproject/project.xml - diff --git a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml b/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml deleted file mode 100644 index c7604d71..00000000 --- a/project1/cyassl-3.0.0/mplabx/cyassl.X/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - com.microchip.mplab.nbide.embedded.makeproject - - - cyassl - 93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b - 0 - c - - - ISO-8859-1 - - - - diff --git a/project1/cyassl-3.0.0/mplabx/include.am b/project1/cyassl-3.0.0/mplabx/include.am deleted file mode 100644 index b63cdeca..00000000 --- a/project1/cyassl-3.0.0/mplabx/include.am +++ /dev/null @@ -1,10 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mplabx/PIC32MZ-serial.h \ - mplabx/README \ - mplabx/benchmark_main.c \ - mplabx/test_main.c - diff --git a/project1/cyassl-3.0.0/mplabx/test_main.c b/project1/cyassl-3.0.0/mplabx/test_main.c deleted file mode 100644 index b77f4f5d..00000000 --- a/project1/cyassl-3.0.0/mplabx/test_main.c +++ /dev/null @@ -1,77 +0,0 @@ -/* main.c - * - * Copyright (C) 2006-2014 wolfSSL Inc. - * - * This file is part of CyaSSL. - * - * CyaSSL 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. - * - * CyaSSL 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-1301, USA - */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -#include - -#if defined(CYASSL_MICROCHIP_PIC32MZ) - #define MICROCHIP_PIC32 - #include - #pragma config ICESEL = ICS_PGx2 - /* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */ - #include - #include - #include "PIC32MZ-serial.h" - #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ -#else - #define PIC32_STARTER_KIT - #include - #include - #include - #include - #include - #define init_serial() /* void out init_serial() */ -#endif - -/* func_args from test.h, so don't have to pull in other junk */ -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - -/* - * Main driver for CTaoCrypt tests. - */ -int main(int argc, char** argv) { - int i ; - - init_serial() ; /* initialize PIC32MZ serial I/O */ - SYSTEMConfigPerformance(80000000); - DBINIT(); - printf("CTaoCrypt Test:\n"); - func_args args; - - args.argc = argc; - args.argv = argv; - - ctaocrypt_test(&args); - - if (args.return_code == 0) { - printf("All tests passed!\n"); - } - - return 0; -} - diff --git a/project1/cyassl-3.0.0/mqx/README b/project1/cyassl-3.0.0/mqx/README deleted file mode 100644 index 3765ba57..00000000 --- a/project1/cyassl-3.0.0/mqx/README +++ /dev/null @@ -1,37 +0,0 @@ -CyaSSL Freescale CodeWarrior Project Files - -This directory contains project files for Freescale CodeWarrior 10.2. These -project have been created to use MQX, RTCS, and MFS on the Freescale -Kinetis K70 Tower System. - -Included Project Files ------------------------ - -1. CyaSSL library (/cyassl) - - Prior to building this project, uncomment the FREESCALE_MQX define - located in: - - /cyassl/ctaocrypt/settings.h - -2. CTaoCrypt Test App (/ctaocrypt_test) - -3. Example CyaSSL Client (/cyassl_client) - - -Importing into CodeWarrior Workspace ------------------------------------- - -These projects can be imported into a CodeWarrior workspace using the standard -"Import Project" feature. To import a project from CodeWarrior, follow -these steps: - -1. File -> Import -2. General -> Existing Projects into Workspace -3. Select Root Directory (browse to this "/mqx" directory) -4. Select desired projects -> Finish - -Keep in mind that the projects above reference CyaSSL source files and header -files with relative paths to the projects' current location in the -/mqx directory. - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject deleted file mode 100644 index 6a742b34..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.cproject +++ /dev/null @@ -1,2542 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project deleted file mode 100644 index 82a85749..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/.project +++ /dev/null @@ -1,98 +0,0 @@ - - - ctaocrypt_test - - - -cyassl - -util_lib - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.buildArguments - -j6 - - - org.eclipse.cdt.make.core.buildCommand - ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make - - - org.eclipse.cdt.make.core.buildLocation - ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - Sources/ctaocrypt-test - 2 - PARENT-2-PROJECT_LOC/ctaocrypt/test - - - - - 1351803045734 - Sources/ctaocrypt-test - 5 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-true-(.*?)\.(c)$ - - - - - - MQX_ROOT_DIR - file:/C:/Freescale/Freescale%20MQX%203.8 - - - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml deleted file mode 100644 index 3df5e171..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ReferencedRSESystems.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am deleted file mode 100644 index b167955e..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/include.am +++ /dev/null @@ -1,15 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mqx/ctaocrypt_test/.cproject \ - mqx/ctaocrypt_test/.project \ - mqx/ctaocrypt_test/ReferencedRSESystems.xml \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch - -EXTRA_DIST += \ - mqx/ctaocrypt_test/Sources/main.c \ - mqx/ctaocrypt_test/Sources/main.h - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c deleted file mode 100644 index bb330432..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.c +++ /dev/null @@ -1,103 +0,0 @@ -/* main.c */ - -#include "main.h" - -/* SD card open/close utility functions */ -#include "util.h" - -#if !BSPCFG_ENABLE_IO_SUBSYSTEM -#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ - non-zero in user_config.h. Please recompile BSP with this option. -#endif - -#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED -#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. \ - Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in \ - user_config.h and recompile BSP with this option. -#endif - - -TASK_TEMPLATE_STRUCT MQX_template_list[] = -{ -/* Task number, Entry point, Stack, Pri, String, Auto? */ - {MAIN_TASK, Main_task, 20000, 9, "main", MQX_AUTO_START_TASK}, - {0, 0, 0, 0, 0, 0, } -}; - -/*TASK*----------------------------------------------------- -* -* Task Name : Main_task -* Comments : -* This task opens the SD card device and runs the -* CTaoCrypt test functions located in test.c. -* -*END*-----------------------------------------------------*/ - -#if defined BSP_SDCARD_ESDHC_CHANNEL - #if ! BSPCFG_ENABLE_ESDHC - #error This application requires BSPCFG_ENABLE_ESDHC defined \ - non-zero in user_config.h. Please recompile libraries with \ - this option. - #endif - -#elif defined BSP_SDCARD_SDHC_CHANNEL - #if ! BSPCFG_ENABLE_SDHC - #error This application requires BSPCFG_ENABLE_SDHC defined \ - non-zero in user_config.h. Please recompile libraries with \ - this option. - #endif -#endif - -#if defined (BSP_SDCARD_SPI_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL -#elif defined (BSP_SDCARD_ESDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL -#elif defined (BSP_SDCARD_SDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL -#else - #error "SDCARD low level communication device not defined!" -#endif - -/* func_args from test.h */ -typedef struct func_args { - int argc; - char** argv; - int return_code; -} func_args; - -void Main_task(uint_32 initial_data) -{ - int ret = 0; - func_args args; - _mqx_int error_code, bytes; - _mqx_uint sz; - char filesystem_name[] = "a:"; - char partman_name[] = "pm:"; - MQX_FILE_PTR com_handle, sdcard_handle, filesystem_handle, partman_handle; - MQX_FILE_PTR cert_file = NULL; - const char* fileName = "a:\certs\\client-key.der"; - - ret = sdcard_open(&com_handle, &sdcard_handle, &partman_handle, - &filesystem_handle, partman_name, filesystem_name); - - if (ret != 0) { - printf("error: sdcard_open(), ret = %d\n", ret); - _mqx_exit(1); - } - printf("SD card installed to %s\n", filesystem_name); - - ctaocrypt_test(&args); - - ret = sdcard_close(&sdcard_handle, &partman_handle, - &filesystem_handle, partman_name, filesystem_name); - - if (ret != 0) { - printf("error: sdcard_close(), ret = %d\n", ret); - _mqx_exit(1); - } - printf("SD card uninstalled.\n"); - - _mqx_exit(0); -} - -/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h deleted file mode 100644 index 2ea7c913..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/Sources/main.h +++ /dev/null @@ -1,21 +0,0 @@ -/* main.h */ - -#ifndef __main_h_ -#define __main_h_ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#define MAIN_TASK 1 - -extern void Main_task(uint_32); - -#endif /* __main_h_ */ - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch deleted file mode 100644 index 6c74d9ae..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch deleted file mode 100644 index 8a56e79c..00000000 --- a/project1/cyassl-3.0.0/mqx/ctaocrypt_test/ctaocrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl/.cproject b/project1/cyassl-3.0.0/mqx/cyassl/.cproject deleted file mode 100644 index 14a6d3b8..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl/.cproject +++ /dev/null @@ -1,2579 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl/.project b/project1/cyassl-3.0.0/mqx/cyassl/.project deleted file mode 100644 index 1ab3cb41..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl/.project +++ /dev/null @@ -1,103 +0,0 @@ - - - cyassl - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.buildArguments - -j6 - - - org.eclipse.cdt.make.core.buildCommand - ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make - - - org.eclipse.cdt.make.core.buildLocation - ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - Sources/ctaocrypt_src - 2 - PARENT-2-PROJECT_LOC/ctaocrypt/src - - - Sources/cyassl_src - 2 - PARENT-2-PROJECT_LOC/src - - - - - 1351802255000 - Sources/ctaocrypt_src - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-aes_asm.s - - - - - - CYASSL_SOURCES - PARENT-2-PROJECT_LOC - - - MQX_ROOT_DIR - file:/C:/Freescale/Freescale%20MQX%203.8 - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl/include.am b/project1/cyassl-3.0.0/mqx/cyassl/include.am deleted file mode 100644 index 509e078a..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl/include.am +++ /dev/null @@ -1,11 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mqx/README - -EXTRA_DIST += \ - mqx/cyassl/.cproject \ - mqx/cyassl/.project - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject b/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject deleted file mode 100644 index f75ed328..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/.cproject +++ /dev/null @@ -1,2585 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/.project b/project1/cyassl-3.0.0/mqx/cyassl_client/.project deleted file mode 100644 index a2241849..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/.project +++ /dev/null @@ -1,80 +0,0 @@ - - - cyassl_client - - - -cyassl - -util_lib - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.buildArguments - -j6 - - - org.eclipse.cdt.make.core.buildCommand - ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make - - - org.eclipse.cdt.make.core.buildLocation - ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - MQX_ROOT_DIR - file:/C:/Freescale/Freescale%20MQX%203.8 - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml b/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml deleted file mode 100644 index 0f4419bd..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/ReferencedRSESystems.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am deleted file mode 100644 index dd4b2ffd..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/include.am +++ /dev/null @@ -1,15 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mqx/cyassl_client/.cproject \ - mqx/cyassl_client/.project \ - mqx/cyassl_client/ReferencedRSESystems.xml \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch - -EXTRA_DIST += \ - mqx/cyassl_client/Sources/main.c \ - mqx/cyassl_client/Sources/main.h - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c deleted file mode 100644 index 3938a87a..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * main.c - */ - -#include "main.h" -#include "util.h" - -#if !BSPCFG_ENABLE_IO_SUBSYSTEM -#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ - non-zero in user_config.h. Please recompile BSP with this option. -#endif - -#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED -#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. \ - Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in \ - user_config.h and recompile BSP with this option. -#endif - -#if defined BSP_SDCARD_ESDHC_CHANNEL -#if ! BSPCFG_ENABLE_ESDHC -#error This application requires BSPCFG_ENABLE_ESDHC defined non-zero in \ - user_config.h. Please recompile libraries with this option. -#endif - -#elif defined BSP_SDCARD_SDHC_CHANNEL - -#if ! BSPCFG_ENABLE_SDHC -#error This application requires BSPCFG_ENABLE_SDHC defined non-zero in \ - user_config.h. Please recompile libraries with this option. -#endif - -#endif - -#if defined (BSP_SDCARD_SPI_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL -#elif defined (BSP_SDCARD_ESDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL -#elif defined (BSP_SDCARD_SDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL -#else - #error "SDCARD low level communication device not defined!" -#endif - -TASK_TEMPLATE_STRUCT MQX_template_list[] = -{ -/* Task number, Entry point, Stack, Pri, String, Auto? */ - {MAIN_TASK, Main_task, 20000, 9, "main", MQX_AUTO_START_TASK}, - {0, 0, 0, 0, 0, 0, } -}; - -/*TASK*----------------------------------------------------- -* -* Task Name : Main_task -* Comments : -* This task sets up the SD card and Ethernet devices, -* then starts the example CyaSSL client. The example -* CyaSSL client connects to a server over SSL and sends -* a simple HTTP GET message, then prints out the reply -* from the server. -* -* To change the IP address and port of the server, -* change the yasslIP and yasslPort variables in -* client_test(). Note that yasslIP needs to be given -* in hexadecimal. -* -*END*-----------------------------------------------------*/ - -void Main_task(uint_32 initial_data) -{ - int ret = 0; - _mqx_int error_code, bytes; - _mqx_uint param; - _mqx_uint sz; - MQX_FILE_PTR com_handle, sdcard_handle, filesystem_handle, partman_handle; - MQX_FILE_PTR cert_file = NULL; - char filesystem_name[] = "a:"; - char partman_name[] = "pm:"; - const char* fileName = "a:\certs\\client-key.der"; - - printf("Starting client example... \n"); - - ret = sdcard_open(&com_handle, &sdcard_handle, &partman_handle, - &filesystem_handle, partman_name, filesystem_name); - - if (ret != 0) { - printf("error: sdcard_open(), ret = %d\n", ret); - _mqx_exit(1); - } - printf("SD card installed to %s\n", filesystem_name); - - setup_ethernet(); - client_test(); - - ret = sdcard_close(&sdcard_handle, &partman_handle, &filesystem_handle, - partman_name, filesystem_name); - - if (ret != 0) { - printf("error: sdcard_close(), ret = %d\n", ret); - _mqx_exit(1); - } - printf("SD card uninstalled.\n"); - - _mqx_exit(0); -} - -void setup_ethernet(void) { - - int error; - _enet_handle ehandle; /* for Ethernet driver */ - _rtcs_if_handle ihandle; - _enet_address address; - - error = RTCS_create(); - if (error) { - err_sys("failed to create RTCS"); - } - - ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ENET_IPADDR, address); - - /* Set up the Ethernet driver */ - error = ENET_initialize(BSP_DEFAULT_ENET_DEVICE, address, 0, &ehandle); - if (error) - err_sys("failed to initialize Ethernet driver"); - - error = RTCS_if_add(ehandle, RTCS_IF_ENET, &ihandle); - if (error) - err_sys("failed to add interface for Ethernet"); - - error = RTCS_if_bind(ihandle, ENET_IPADDR, ENET_IPMASK); - if (error) - err_sys("failed to bind interface for Ethernet"); - -#ifdef GATE_IPADDR - RTCS_gate_add(GATE_IPADDR, INADDR_ANY, INADDR_ANY); -#endif - - printf("Ethernet device %d bound to %X\n", BSP_DEFAULT_ENET_DEVICE, - ENET_IPADDR); -} - -void client_test(void) { - - char msg[64]; - char reply[1024]; - int sockfd, input; - int ret = 0, msgSz = 0; - struct sockaddr_in servaddr; - CYASSL_CTX* ctx; - CYASSL* ssl; - - long yasslIP = 0xa9fea662; /* 169.254.166.98 */ - long yasslPort = 11111; - - CyaSSL_Debugging_ON(); - CyaSSL_Init(); - - ctx = CyaSSL_CTX_new(CyaSSLv3_client_method()); - - if (ctx == 0) - err_sys("setting up ctx"); - - ret = CyaSSL_CTX_use_certificate_file(ctx, clientCert, SSL_FILETYPE_PEM); - if (ret != SSL_SUCCESS) { - err_sys("can't load client cert file, check file"); - } - - ret = CyaSSL_CTX_use_PrivateKey_file(ctx, clientKey, SSL_FILETYPE_PEM); - if (ret != SSL_SUCCESS) { - err_sys("can't load client key file, check file"); - } - - ret = CyaSSL_CTX_load_verify_locations(ctx, caCert, 0); - if (ret != SSL_SUCCESS) { - err_sys("can't load CA cert file, check file"); - } - - /* create socket descriptor */ - sockfd = socket(AF_INET, SOCK_STREAM, 0); - if (sockfd == RTCS_SOCKET_ERROR) { - err_sys("socket creation failed"); - } else { - printf("socket created successfully\n"); - } - - /* Unlike most TCP/IP stacks, RTCS requires that sin_port and - * sin_addr needs to be in Host Byte Order, not Network Byte Order. - * This means we shouldn't use htons() when setting these values. */ - memset((char*)&servaddr, 0, sizeof(servaddr)); - servaddr.sin_family = AF_INET; - servaddr.sin_port = yasslPort; - servaddr.sin_addr.s_addr = yasslIP; - - ret = connect(sockfd, &servaddr, sizeof(servaddr)); - if (ret != RTCS_OK) { - err_sys("connect() failed"); - } else { - printf("Connected to %lx, port %d.\n", servaddr.sin_addr.s_addr, - servaddr.sin_port); - } - - if( (ssl = CyaSSL_new(ctx)) == NULL) { - err_sys("CyaSSL_new failed"); - } - - CyaSSL_set_fd(ssl, sockfd); - - ret = CyaSSL_connect(ssl); - if (ret != SSL_SUCCESS) - err_sys("CyaSSL_connect failed"); - - printf("CyaSSL_connect() ok, sending GET...\n"); - msgSz = 28; - strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); - if (CyaSSL_write(ssl, msg, msgSz) != msgSz) - err_sys("CyaSSL_write() failed"); - - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("Server response: %s\n", reply); - - while(1) { - input = CyaSSL_read(ssl, reply, sizeof(reply)-1); - if (input > 0) { - reply[input] = 0; - printf("%s\n", reply); - } else { - break; - } - } - } - - CyaSSL_shutdown(ssl); - CyaSSL_free(ssl); - CyaSSL_CTX_free(ctx); - CyaSSL_Cleanup(); -} - -/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h b/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h deleted file mode 100644 index 91c11b33..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/Sources/main.h +++ /dev/null @@ -1,61 +0,0 @@ -/* main.h */ - -#ifndef __main_h_ -#define __main_h_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define MAIN_TASK 1 - -extern void Main_task(uint_32); -extern void setup_ethernet(void); -extern void client_test(void); - -/* cert file locations */ -static const char* fileName = "a:\certs\\ca-cert.pem"; -static const char* caCert = "a:\certs\\ca-cert.pem"; -static const char* clientCert = "a:\certs\\client-cert.pem"; -static const char* clientKey = "a:\certs\\client-key.pem"; - -static inline void err_sys(const char* msg) -{ - printf("yassl error: %s\n", msg); - if (msg) - _mqx_exit(1); -} - -/* PPP device must be set manually and -** must be different from the default IO channel (BSP_DEFAULT_IO_CHANNEL) -*/ -#define PPP_DEVICE "ittyb:" - -/* -** Define PPP_DEVICE_DUN only when using PPP to communicate -** to Win9x Dial-Up Networking over a null-modem -** This is ignored if PPP_DEVICE is not #define'd -*/ -#define PPP_DEVICE_DUN 1 - -#ifndef ENET_IPADDR - #define ENET_IPADDR IPADDR(169,254,3,3) -#endif - -#ifndef ENET_IPMASK - #define ENET_IPMASK IPADDR(255,255,0,0) -#endif - -#define GATE_IPADDR IPADDR(192,168,0,1) - -#endif /* __main_h_ */ - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch deleted file mode 100644 index 9aa53216..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch b/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch deleted file mode 100644 index cff2bff7..00000000 --- a/project1/cyassl-3.0.0/mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/util_lib/.cproject b/project1/cyassl-3.0.0/mqx/util_lib/.cproject deleted file mode 100644 index 139b9a35..00000000 --- a/project1/cyassl-3.0.0/mqx/util_lib/.cproject +++ /dev/null @@ -1,2538 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/project1/cyassl-3.0.0/mqx/util_lib/.project b/project1/cyassl-3.0.0/mqx/util_lib/.project deleted file mode 100644 index 4e538b6e..00000000 --- a/project1/cyassl-3.0.0/mqx/util_lib/.project +++ /dev/null @@ -1,76 +0,0 @@ - - - util_lib - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.buildArguments - -j6 - - - org.eclipse.cdt.make.core.buildCommand - ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make - - - org.eclipse.cdt.make.core.buildLocation - ${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - MQX_ROOT_DIR - file:/C:/Freescale/Freescale%20MQX%203.8 - - - diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am b/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am deleted file mode 100644 index 4b54a5a6..00000000 --- a/project1/cyassl-3.0.0/mqx/util_lib/Sources/include.am +++ /dev/null @@ -1,12 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mqx/util_lib/.cproject \ - mqx/util_lib/.project - -EXTRA_DIST += \ - mqx/util_lib/Sources/util.c \ - mqx/util_lib/Sources/util.h - diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c deleted file mode 100644 index 0a3f396b..00000000 --- a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.c +++ /dev/null @@ -1,178 +0,0 @@ -/* util.c */ - -#include -#include -#include -#include - -#include "util.h" - -#if !BSPCFG_ENABLE_IO_SUBSYSTEM - #error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined \ - non-zero in user_config.h. Please recompile BSP with this option. -#endif - -#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED - #error This application requires BSP_DEFAULT_IO_CHANNEL to be not \ - NULL. Please set corresponding BSPCFG_ENABLE_TTYx to non-zero \ - in user_config.h and recompile BSP with this option. -#endif - -#if defined BSP_SDCARD_ESDHC_CHANNEL - #if ! BSPCFG_ENABLE_ESDHC - #error This application requires BSPCFG_ENABLE_ESDHC defined \ - non-zero in user_config.h. Please recompile libraries with \ - this option. - #endif -#elif defined BSP_SDCARD_SDHC_CHANNEL - #if ! BSPCFG_ENABLE_SDHC - #error This application requires BSPCFG_ENABLE_SDHC defined \ - non-zero in user_config.h. Please recompile libraries with \ - this option. - #endif -#endif - -#if defined (BSP_SDCARD_SPI_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SPI_CHANNEL -#elif defined (BSP_SDCARD_ESDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_ESDHC_CHANNEL -#elif defined (BSP_SDCARD_SDHC_CHANNEL) - #define SDCARD_COM_CHANNEL BSP_SDCARD_SDHC_CHANNEL -#else - #error "SDCARD low level communication device not defined!" -#endif - -int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle, - MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle, - char *partman_name, char *filesystem_name) -{ - - _mqx_int error_code; - _mqx_uint param; - - /* Open low level communication device */ - *com_handle = fopen(SDCARD_COM_CHANNEL, NULL); - - if (NULL == *com_handle) { - printf("Error installing communication handle.\n"); - return -60; - } - - /* Install SD card device */ - error_code = _io_sdcard_install("sdcard:", (pointer) &_bsp_sdcard0_init, - *com_handle); - if (error_code != MQX_OK) { - printf("Error installing SD card device (0x%x)\n", error_code); - return -61; - } - - _time_delay(200); - - /* Open the device which MFS will be installed on */ - *sdcard_handle = fopen("sdcard:", 0); - if (*sdcard_handle == NULL) { - printf("Unable to open SD card device.\n"); - return -62; - } - - /* Install partition manager over SD card driver */ - error_code = _io_part_mgr_install(*sdcard_handle, partman_name, 0); - if (error_code != MFS_NO_ERROR) { - printf("Error installing partition manager: %s\n", MFS_Error_text( - (uint_32) error_code)); - return -63; - } - - /* Open partition manager */ - *partman_handle = fopen(partman_name, NULL); - if (*partman_handle == NULL) { - error_code = ferror(*partman_handle); - printf("Error opening partition manager: %s\n", MFS_Error_text( - (uint_32) error_code)); - return -64; - } - - /* Validate partition 1 */ - param = 1; - error_code = _io_ioctl(*partman_handle, IO_IOCTL_VAL_PART, ¶m); - if (error_code == MQX_OK) { - /* Install MFS over partition 1 */ - error_code = _io_mfs_install(*partman_handle, filesystem_name, param); - if (error_code != MFS_NO_ERROR) { - printf("Error initializing MFS over partition: %s\n", - MFS_Error_text((uint_32) error_code)); - return -65; - } - - } else { - /* Install MFS over SD card driver */ - error_code = _io_mfs_install(*sdcard_handle, filesystem_name, - (_file_size) 0); - if (error_code != MFS_NO_ERROR) { - printf("Error initializing MFS: %s\n", MFS_Error_text( - (uint_32) error_code)); - return -66; - } - } /* end Validate partition 1 */ - - /* Open file system */ - *filesystem_handle = fopen(filesystem_name, NULL); - error_code = ferror(*filesystem_handle); - if ((error_code != MFS_NO_ERROR) && (error_code != MFS_NOT_A_DOS_DISK)) { - printf("Error opening filesystem: %s\n", MFS_Error_text( - (uint_32) error_code)); - return -67; - } - if (error_code == MFS_NOT_A_DOS_DISK) { - printf("NOT A DOS DISK! You must format to continue.\n"); - return -68; - } - - return 0; -} - -int sdcard_close(MQX_FILE_PTR *sdcard_handle, MQX_FILE_PTR *partman_handle, - MQX_FILE_PTR *filesystem_handle, - char *partman_name, char *filesystem_name) -{ - _mqx_int error_code; - - /* Close the filesystem */ - if (MQX_OK != fclose(*filesystem_handle)) { - printf("Error closing filesystem.\n"); - return -69; - } - *filesystem_handle = NULL; - - /* Uninstall MFS */ - error_code = _io_dev_uninstall(filesystem_name); - if (error_code != MFS_NO_ERROR) { - printf("Error uninstalling filesystem.\n"); - return -70; - } - - /* Close partition manager */ - if (MQX_OK != fclose(*partman_handle)) { - printf("Unable to close partition manager.\n"); - return -71; - } - *partman_handle = NULL; - - /* Uninstall partition manager */ - error_code = _io_dev_uninstall(partman_name); - if (error_code != MFS_NO_ERROR) { - printf("Error uninstalling partition manager.\n"); - return -72; - } - - /* Close the SD card device */ - if (MQX_OK != fclose(*sdcard_handle)) { - printf("Unable to close SD card device.\n"); - return -73; - } - *sdcard_handle = NULL; - - return 0; -} - -/* EOF */ diff --git a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h b/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h deleted file mode 100644 index 67bdca2f..00000000 --- a/project1/cyassl-3.0.0/mqx/util_lib/Sources/util.h +++ /dev/null @@ -1,14 +0,0 @@ -/* util.h */ - -#ifndef UTIL_H_ -#define UTIL_H_ - -int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle, - MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle, - char *partman_name, char *filesystem_name); - -int sdcard_close(MQX_FILE_PTR *sdcard_handle, MQX_FILE_PTR *partman_handle, - MQX_FILE_PTR *filesystem_handle, - char *partman_name, char *filesystem_name); - -#endif /* UTIL_H_ */ diff --git a/project1/cyassl-3.0.0/quit b/project1/cyassl-3.0.0/quit deleted file mode 100644 index 3db49b3a..00000000 --- a/project1/cyassl-3.0.0/quit +++ /dev/null @@ -1,2 +0,0 @@ -quit - diff --git a/project1/cyassl-3.0.0/rpm/include.am b/project1/cyassl-3.0.0/rpm/include.am deleted file mode 100644 index e5253dd1..00000000 --- a/project1/cyassl-3.0.0/rpm/include.am +++ /dev/null @@ -1,37 +0,0 @@ -# vim:ft=automake - -rpm-build: rpm/spec dist - @rm -f *.rpm - @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm - @mkdir -p ~/rpmbuild/BUILD/ - @mkdir -p ~/rpmbuild/RPMS/i386/ - @mkdir -p ~/rpmbuild/RPMS/i686/ - @mkdir -p ~/rpmbuild/RPMS/noarch/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/SPECS/ - @mkdir -p ~/rpmbuild/SRPMS/ - @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba --clean rpm/spec - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . - -rpm-sign: rpm-build - @rpm --addsign *.rpm - @rpm --checksig *.rpm - -clean-rpm: - @rm -f *.tar.gz - @rm -f *.src.rpm - @rm -f *.rpm - -rpm: rpm-build - -release: rpm-sign - -auto-rpmbuild: - @auto-br-rpmbuild -ba rpm/spec - diff --git a/project1/cyassl-3.0.0/rpm/spec b/project1/cyassl-3.0.0/rpm/spec deleted file mode 100644 index a1b2763a..00000000 --- a/project1/cyassl-3.0.0/rpm/spec +++ /dev/null @@ -1,166 +0,0 @@ -Summary: Embedded SSL Library -Name: cyassl -Version: 3.0.0 -Release: 1 -License: GPLv2 -Group: System Environment/Libraries -BuildRequires: gcc -BuildRequires: glibc -BuildRequires: glibc-common -BuildRequires: glibc-devel -BuildRequires: glibc-headers -BuildRequires: make -BuildRequires: pkgconfig -BuildRequires: sed -BuildRequires: tar -URL: http://www.yassl.com/yaSSL/Home.html - -Packager: Brian Aker - -Source: http://yassl.com/yaSSL/download/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot - -%description -Misc tools for Yassl. - -%package devel -Summary: Header files and development libraries for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -This package contains the header files and development libraries -for %{name}. If you like to develop programs using %{name}, -you will need to install %{name}-devel. - -%prep -%setup -q - -%configure - - -%build -%{__make} %{?_smp_mflags} - -%install -%{__rm} -rf %{buildroot} -%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" -mkdir -p $RPM_BUILD_ROOT/ - -%check - - -%clean -%{__rm} -rf %{buildroot} - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING NEWS README -%{_docdir}/cyassl/taoCert.txt -%{_docdir}/cyassl/example/echoserver.c -%{_docdir}/cyassl/example/server.c -%{_docdir}/cyassl/example/echoclient.c -%{_docdir}/cyassl/example/client.c -%{_docdir}/cyassl/README.txt -%{_libdir}/libcyassl.la -%{_libdir}/libcyassl.so -%{_libdir}/libcyassl.so.5 -%{_libdir}/libcyassl.so.5.0.5 - -%files devel -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING NEWS README -%{_bindir}/cyassl-config -%{_includedir}/cyassl/callbacks.h -%{_includedir}/cyassl/certs_test.h -%{_includedir}/cyassl/crl.h -%{_includedir}/cyassl/ctaocrypt/aes.h -%{_includedir}/cyassl/ctaocrypt/arc4.h -%{_includedir}/cyassl/ctaocrypt/asn.h -%{_includedir}/cyassl/ctaocrypt/asn_public.h -%{_includedir}/cyassl/ctaocrypt/blake2-impl.h -%{_includedir}/cyassl/ctaocrypt/blake2-int.h -%{_includedir}/cyassl/ctaocrypt/blake2.h -%{_includedir}/cyassl/ctaocrypt/camellia.h -%{_includedir}/cyassl/ctaocrypt/coding.h -%{_includedir}/cyassl/ctaocrypt/compress.h -%{_includedir}/cyassl/ctaocrypt/des3.h -%{_includedir}/cyassl/ctaocrypt/dh.h -%{_includedir}/cyassl/ctaocrypt/dsa.h -%{_includedir}/cyassl/ctaocrypt/ecc.h -%{_includedir}/cyassl/ctaocrypt/error-crypt.h -%{_includedir}/cyassl/ctaocrypt/fips_test.h -%{_includedir}/cyassl/ctaocrypt/hc128.h -%{_includedir}/cyassl/ctaocrypt/hmac.h -%{_includedir}/cyassl/ctaocrypt/integer.h -%{_includedir}/cyassl/ctaocrypt/logging.h -%{_includedir}/cyassl/ctaocrypt/md2.h -%{_includedir}/cyassl/ctaocrypt/md4.h -%{_includedir}/cyassl/ctaocrypt/md5.h -%{_includedir}/cyassl/ctaocrypt/memory.h -%{_includedir}/cyassl/ctaocrypt/misc.h -%{_includedir}/cyassl/ctaocrypt/mpi_class.h -%{_includedir}/cyassl/ctaocrypt/mpi_superclass.h -%{_includedir}/cyassl/ctaocrypt/pkcs7.h -%{_includedir}/cyassl/ctaocrypt/port.h -%{_includedir}/cyassl/ctaocrypt/pwdbased.h -%{_includedir}/cyassl/ctaocrypt/rabbit.h -%{_includedir}/cyassl/ctaocrypt/random.h -%{_includedir}/cyassl/ctaocrypt/ripemd.h -%{_includedir}/cyassl/ctaocrypt/rsa.h -%{_includedir}/cyassl/ctaocrypt/settings.h -%{_includedir}/cyassl/ctaocrypt/sha.h -%{_includedir}/cyassl/ctaocrypt/sha256.h -%{_includedir}/cyassl/ctaocrypt/sha512.h -%{_includedir}/cyassl/ctaocrypt/tfm.h -%{_includedir}/cyassl/ctaocrypt/types.h -%{_includedir}/cyassl/ctaocrypt/visibility.h -%{_includedir}/cyassl/error-ssl.h -%{_includedir}/cyassl/ocsp.h -%{_includedir}/cyassl/openssl/asn1.h -%{_includedir}/cyassl/openssl/bio.h -%{_includedir}/cyassl/openssl/bn.h -%{_includedir}/cyassl/openssl/conf.h -%{_includedir}/cyassl/openssl/crypto.h -%{_includedir}/cyassl/openssl/des.h -%{_includedir}/cyassl/openssl/dh.h -%{_includedir}/cyassl/openssl/dsa.h -%{_includedir}/cyassl/openssl/ec.h -%{_includedir}/cyassl/openssl/ecdsa.h -%{_includedir}/cyassl/openssl/engine.h -%{_includedir}/cyassl/openssl/err.h -%{_includedir}/cyassl/openssl/evp.h -%{_includedir}/cyassl/openssl/hmac.h -%{_includedir}/cyassl/openssl/lhash.h -%{_includedir}/cyassl/openssl/md4.h -%{_includedir}/cyassl/openssl/md5.h -%{_includedir}/cyassl/openssl/ocsp.h -%{_includedir}/cyassl/openssl/opensslconf.h -%{_includedir}/cyassl/openssl/opensslv.h -%{_includedir}/cyassl/openssl/ossl_typ.h -%{_includedir}/cyassl/openssl/pem.h -%{_includedir}/cyassl/openssl/pkcs12.h -%{_includedir}/cyassl/openssl/rand.h -%{_includedir}/cyassl/openssl/ripemd.h -%{_includedir}/cyassl/openssl/rsa.h -%{_includedir}/cyassl/openssl/sha.h -%{_includedir}/cyassl/openssl/ssl.h -%{_includedir}/cyassl/openssl/stack.h -%{_includedir}/cyassl/openssl/ui.h -%{_includedir}/cyassl/openssl/x509.h -%{_includedir}/cyassl/openssl/x509v3.h -%{_includedir}/cyassl/options.h -%{_includedir}/cyassl/sniffer.h -%{_includedir}/cyassl/sniffer_error.h -%{_includedir}/cyassl/ssl.h -%{_includedir}/cyassl/test.h -%{_includedir}/cyassl/version.h -%{_libdir}/pkgconfig/cyassl.pc - -%changelog -* Fri Oct 20 2012 Brian Aker -- Initial package diff --git a/project1/cyassl-3.0.0/rpm/spec.in b/project1/cyassl-3.0.0/rpm/spec.in deleted file mode 100644 index 97d8e572..00000000 --- a/project1/cyassl-3.0.0/rpm/spec.in +++ /dev/null @@ -1,166 +0,0 @@ -Summary: Embedded SSL Library -Name: @PACKAGE@ -Version: @VERSION@ -Release: 1 -License: GPLv2 -Group: System Environment/Libraries -BuildRequires: gcc -BuildRequires: glibc -BuildRequires: glibc-common -BuildRequires: glibc-devel -BuildRequires: glibc-headers -BuildRequires: make -BuildRequires: pkgconfig -BuildRequires: sed -BuildRequires: tar -URL: http://www.yassl.com/yaSSL/Home.html - -Packager: Brian Aker - -Source: http://yassl.com/yaSSL/download/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot - -%description -Misc tools for Yassl. - -%package devel -Summary: Header files and development libraries for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -This package contains the header files and development libraries -for %{name}. If you like to develop programs using %{name}, -you will need to install %{name}-devel. - -%prep -%setup -q - -%configure - - -%build -%{__make} %{?_smp_mflags} - -%install -%{__rm} -rf %{buildroot} -%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" -mkdir -p $RPM_BUILD_ROOT/ - -%check - - -%clean -%{__rm} -rf %{buildroot} - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING NEWS README -%{_docdir}/cyassl/taoCert.txt -%{_docdir}/cyassl/example/echoserver.c -%{_docdir}/cyassl/example/server.c -%{_docdir}/cyassl/example/echoclient.c -%{_docdir}/cyassl/example/client.c -%{_docdir}/cyassl/README.txt -%{_libdir}/libcyassl.la -%{_libdir}/libcyassl.so -%{_libdir}/libcyassl.so.5 -%{_libdir}/libcyassl.so.5.0.5 - -%files devel -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING NEWS README -%{_bindir}/cyassl-config -%{_includedir}/cyassl/callbacks.h -%{_includedir}/cyassl/certs_test.h -%{_includedir}/cyassl/crl.h -%{_includedir}/cyassl/ctaocrypt/aes.h -%{_includedir}/cyassl/ctaocrypt/arc4.h -%{_includedir}/cyassl/ctaocrypt/asn.h -%{_includedir}/cyassl/ctaocrypt/asn_public.h -%{_includedir}/cyassl/ctaocrypt/blake2-impl.h -%{_includedir}/cyassl/ctaocrypt/blake2-int.h -%{_includedir}/cyassl/ctaocrypt/blake2.h -%{_includedir}/cyassl/ctaocrypt/camellia.h -%{_includedir}/cyassl/ctaocrypt/coding.h -%{_includedir}/cyassl/ctaocrypt/compress.h -%{_includedir}/cyassl/ctaocrypt/des3.h -%{_includedir}/cyassl/ctaocrypt/dh.h -%{_includedir}/cyassl/ctaocrypt/dsa.h -%{_includedir}/cyassl/ctaocrypt/ecc.h -%{_includedir}/cyassl/ctaocrypt/error-crypt.h -%{_includedir}/cyassl/ctaocrypt/fips_test.h -%{_includedir}/cyassl/ctaocrypt/hc128.h -%{_includedir}/cyassl/ctaocrypt/hmac.h -%{_includedir}/cyassl/ctaocrypt/integer.h -%{_includedir}/cyassl/ctaocrypt/logging.h -%{_includedir}/cyassl/ctaocrypt/md2.h -%{_includedir}/cyassl/ctaocrypt/md4.h -%{_includedir}/cyassl/ctaocrypt/md5.h -%{_includedir}/cyassl/ctaocrypt/memory.h -%{_includedir}/cyassl/ctaocrypt/misc.h -%{_includedir}/cyassl/ctaocrypt/mpi_class.h -%{_includedir}/cyassl/ctaocrypt/mpi_superclass.h -%{_includedir}/cyassl/ctaocrypt/pkcs7.h -%{_includedir}/cyassl/ctaocrypt/port.h -%{_includedir}/cyassl/ctaocrypt/pwdbased.h -%{_includedir}/cyassl/ctaocrypt/rabbit.h -%{_includedir}/cyassl/ctaocrypt/random.h -%{_includedir}/cyassl/ctaocrypt/ripemd.h -%{_includedir}/cyassl/ctaocrypt/rsa.h -%{_includedir}/cyassl/ctaocrypt/settings.h -%{_includedir}/cyassl/ctaocrypt/sha.h -%{_includedir}/cyassl/ctaocrypt/sha256.h -%{_includedir}/cyassl/ctaocrypt/sha512.h -%{_includedir}/cyassl/ctaocrypt/tfm.h -%{_includedir}/cyassl/ctaocrypt/types.h -%{_includedir}/cyassl/ctaocrypt/visibility.h -%{_includedir}/cyassl/error-ssl.h -%{_includedir}/cyassl/ocsp.h -%{_includedir}/cyassl/openssl/asn1.h -%{_includedir}/cyassl/openssl/bio.h -%{_includedir}/cyassl/openssl/bn.h -%{_includedir}/cyassl/openssl/conf.h -%{_includedir}/cyassl/openssl/crypto.h -%{_includedir}/cyassl/openssl/des.h -%{_includedir}/cyassl/openssl/dh.h -%{_includedir}/cyassl/openssl/dsa.h -%{_includedir}/cyassl/openssl/ec.h -%{_includedir}/cyassl/openssl/ecdsa.h -%{_includedir}/cyassl/openssl/engine.h -%{_includedir}/cyassl/openssl/err.h -%{_includedir}/cyassl/openssl/evp.h -%{_includedir}/cyassl/openssl/hmac.h -%{_includedir}/cyassl/openssl/lhash.h -%{_includedir}/cyassl/openssl/md4.h -%{_includedir}/cyassl/openssl/md5.h -%{_includedir}/cyassl/openssl/ocsp.h -%{_includedir}/cyassl/openssl/opensslconf.h -%{_includedir}/cyassl/openssl/opensslv.h -%{_includedir}/cyassl/openssl/ossl_typ.h -%{_includedir}/cyassl/openssl/pem.h -%{_includedir}/cyassl/openssl/pkcs12.h -%{_includedir}/cyassl/openssl/rand.h -%{_includedir}/cyassl/openssl/ripemd.h -%{_includedir}/cyassl/openssl/rsa.h -%{_includedir}/cyassl/openssl/sha.h -%{_includedir}/cyassl/openssl/ssl.h -%{_includedir}/cyassl/openssl/stack.h -%{_includedir}/cyassl/openssl/ui.h -%{_includedir}/cyassl/openssl/x509.h -%{_includedir}/cyassl/openssl/x509v3.h -%{_includedir}/cyassl/options.h -%{_includedir}/cyassl/sniffer.h -%{_includedir}/cyassl/sniffer_error.h -%{_includedir}/cyassl/ssl.h -%{_includedir}/cyassl/test.h -%{_includedir}/cyassl/version.h -%{_libdir}/pkgconfig/cyassl.pc - -%changelog -* Fri Oct 20 2012 Brian Aker -- Initial package diff --git a/project1/cyassl-3.0.0/src/.deps/.dirstamp b/project1/cyassl-3.0.0/src/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo deleted file mode 100644 index 579d14aa..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-crl.Plo +++ /dev/null @@ -1,255 +0,0 @@ -src/src_libcyassl_la-crl.lo: src/crl.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ - /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ - cyassl/ctaocrypt/aes.h cyassl/ctaocrypt/camellia.h \ - cyassl/ctaocrypt/logging.h cyassl/ctaocrypt/hmac.h \ - cyassl/ctaocrypt/sha256.h cyassl/ocsp.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h /usr/include/dirent.h \ - /usr/include/i386-linux-gnu/bits/dirent.h \ - /usr/include/i386-linux-gnu/sys/stat.h \ - /usr/include/i386-linux-gnu/bits/stat.h \ - /usr/include/i386-linux-gnu/sys/inotify.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/bits/inotify.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/ocsp.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: - -/usr/include/dirent.h: - -/usr/include/i386-linux-gnu/bits/dirent.h: - -/usr/include/i386-linux-gnu/sys/stat.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/i386-linux-gnu/sys/inotify.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/bits/inotify.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo deleted file mode 100644 index 168a5a44..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-internal.Plo +++ /dev/null @@ -1,211 +0,0 @@ -src/src_libcyassl_la-internal.lo: src/internal.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ - /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo deleted file mode 100644 index 1880a1c9..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-io.Plo +++ /dev/null @@ -1,325 +0,0 @@ -src/src_libcyassl_la-io.lo: src/io.c config.h cyassl/ctaocrypt/settings.h \ - cyassl/ctaocrypt/visibility.h cyassl/internal.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ - /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h /usr/include/errno.h \ - /usr/include/i386-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ - /usr/include/i386-linux-gnu/asm/errno.h \ - /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ - /usr/include/unistd.h /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - /usr/include/fcntl.h /usr/include/i386-linux-gnu/bits/fcntl.h \ - /usr/include/i386-linux-gnu/bits/fcntl-linux.h \ - /usr/include/i386-linux-gnu/bits/stat.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h /usr/include/arpa/inet.h \ - /usr/include/netinet/in.h /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/bits/in.h /usr/include/netdb.h \ - /usr/include/rpc/netdb.h /usr/include/i386-linux-gnu/bits/netdb.h \ - /usr/include/i386-linux-gnu/sys/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctls.h \ - /usr/include/i386-linux-gnu/asm/ioctls.h \ - /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ - /usr/include/i386-linux-gnu/asm/ioctl.h \ - /usr/include/asm-generic/ioctl.h \ - /usr/include/i386-linux-gnu/bits/ioctl-types.h \ - /usr/include/i386-linux-gnu/sys/ttydefaults.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: - -/usr/include/errno.h: - -/usr/include/i386-linux-gnu/bits/errno.h: - -/usr/include/linux/errno.h: - -/usr/include/i386-linux-gnu/asm/errno.h: - -/usr/include/asm-generic/errno.h: - -/usr/include/asm-generic/errno-base.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -/usr/include/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl.h: - -/usr/include/i386-linux-gnu/bits/fcntl-linux.h: - -/usr/include/i386-linux-gnu/bits/stat.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/arpa/inet.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -/usr/include/netdb.h: - -/usr/include/rpc/netdb.h: - -/usr/include/i386-linux-gnu/bits/netdb.h: - -/usr/include/i386-linux-gnu/sys/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctls.h: - -/usr/include/i386-linux-gnu/asm/ioctls.h: - -/usr/include/asm-generic/ioctls.h: - -/usr/include/linux/ioctl.h: - -/usr/include/i386-linux-gnu/asm/ioctl.h: - -/usr/include/asm-generic/ioctl.h: - -/usr/include/i386-linux-gnu/bits/ioctl-types.h: - -/usr/include/i386-linux-gnu/sys/ttydefaults.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo deleted file mode 100644 index f8a4c098..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-keys.Plo +++ /dev/null @@ -1,211 +0,0 @@ -src/src_libcyassl_la-keys.lo: src/keys.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/internal.h cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ - /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/crl.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo deleted file mode 100644 index a525cfc0..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ocsp.Plo +++ /dev/null @@ -1,227 +0,0 @@ -src/src_libcyassl_la-ocsp.lo: src/ocsp.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - cyassl/error-ssl.h cyassl/ctaocrypt/error-crypt.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h /usr/include/sched.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h /usr/include/time.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/time.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h \ - /usr/include/i386-linux-gnu/sys/types.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/ocsp.h cyassl/ssl.h cyassl/version.h \ - /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ - /usr/include/wchar.h /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/ctaocrypt/asn.h \ - cyassl/ctaocrypt/rsa.h cyassl/ctaocrypt/integer.h \ - /usr/bin/../lib/clang/3.4/include/limits.h /usr/include/limits.h \ - /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/random.h cyassl/ctaocrypt/arc4.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/internal.h cyassl/crl.h \ - cyassl/ctaocrypt/des3.h cyassl/ctaocrypt/hc128.h \ - cyassl/ctaocrypt/rabbit.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/sched.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/time.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/ocsp.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/internal.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo deleted file mode 100644 index e3e2a184..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-sniffer.Plo +++ /dev/null @@ -1,277 +0,0 @@ -src/src_libcyassl_la-sniffer.lo: src/sniffer.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/assert.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/time.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/xlocale.h \ - /usr/include/arpa/inet.h /usr/include/netinet/in.h \ - /usr/bin/../lib/clang/3.4/include/stdint.h \ - /usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h \ - /usr/include/stdint.h /usr/include/i386-linux-gnu/bits/wchar.h \ - /usr/include/i386-linux-gnu/sys/socket.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/endian.h \ - /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h \ - /usr/include/i386-linux-gnu/bits/socket.h \ - /usr/include/i386-linux-gnu/bits/socket_type.h \ - /usr/include/i386-linux-gnu/bits/sockaddr.h \ - /usr/include/i386-linux-gnu/asm/socket.h \ - /usr/include/asm-generic/socket.h \ - /usr/include/i386-linux-gnu/asm/sockios.h \ - /usr/include/asm-generic/sockios.h \ - /usr/include/i386-linux-gnu/bits/in.h cyassl/openssl/ssl.h \ - cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ - /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h cyassl/internal.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h /usr/include/unistd.h \ - /usr/include/i386-linux-gnu/bits/posix_opt.h \ - /usr/include/i386-linux-gnu/bits/environments.h \ - /usr/include/i386-linux-gnu/bits/confname.h /usr/include/getopt.h \ - cyassl/ctaocrypt/memory.h /usr/include/stdlib.h \ - /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/sniffer.h cyassl/sniffer_error.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/assert.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/time.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/xlocale.h: - -/usr/include/arpa/inet.h: - -/usr/include/netinet/in.h: - -/usr/bin/../lib/clang/3.4/include/stdint.h: - -/usr/bin/../lib/gcc/i686-linux-gnu/4.8/include/stdint.h: - -/usr/include/stdint.h: - -/usr/include/i386-linux-gnu/bits/wchar.h: - -/usr/include/i386-linux-gnu/sys/socket.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -/usr/include/i386-linux-gnu/bits/socket.h: - -/usr/include/i386-linux-gnu/bits/socket_type.h: - -/usr/include/i386-linux-gnu/bits/sockaddr.h: - -/usr/include/i386-linux-gnu/asm/socket.h: - -/usr/include/asm-generic/socket.h: - -/usr/include/i386-linux-gnu/asm/sockios.h: - -/usr/include/asm-generic/sockios.h: - -/usr/include/i386-linux-gnu/bits/in.h: - -cyassl/openssl/ssl.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -/usr/include/unistd.h: - -/usr/include/i386-linux-gnu/bits/posix_opt.h: - -/usr/include/i386-linux-gnu/bits/environments.h: - -/usr/include/i386-linux-gnu/bits/confname.h: - -/usr/include/getopt.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/sniffer.h: - -cyassl/sniffer_error.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo deleted file mode 100644 index 739c90b9..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-ssl.Plo +++ /dev/null @@ -1,240 +0,0 @@ -src/src_libcyassl_la-ssl.lo: src/ssl.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h \ - /usr/include/errno.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/include/i386-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ - /usr/include/i386-linux-gnu/asm/errno.h \ - /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ - cyassl/ssl.h cyassl/version.h /usr/include/stdio.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/internal.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h cyassl/ctaocrypt/coding.h \ - /usr/include/dirent.h /usr/include/i386-linux-gnu/bits/dirent.h \ - /usr/include/i386-linux-gnu/sys/stat.h \ - /usr/include/i386-linux-gnu/bits/stat.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -/usr/include/errno.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/include/i386-linux-gnu/bits/errno.h: - -/usr/include/linux/errno.h: - -/usr/include/i386-linux-gnu/asm/errno.h: - -/usr/include/asm-generic/errno.h: - -/usr/include/asm-generic/errno-base.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: - -cyassl/ctaocrypt/coding.h: - -/usr/include/dirent.h: - -/usr/include/i386-linux-gnu/bits/dirent.h: - -/usr/include/i386-linux-gnu/sys/stat.h: - -/usr/include/i386-linux-gnu/bits/stat.h: diff --git a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo b/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo deleted file mode 100644 index cc9fb0cc..00000000 --- a/project1/cyassl-3.0.0/src/.deps/src_libcyassl_la-tls.Plo +++ /dev/null @@ -1,211 +0,0 @@ -src/src_libcyassl_la-tls.lo: src/tls.c config.h \ - cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/visibility.h cyassl/ssl.h \ - cyassl/version.h /usr/include/stdio.h /usr/include/features.h \ - /usr/include/stdc-predef.h /usr/include/i386-linux-gnu/sys/cdefs.h \ - /usr/include/i386-linux-gnu/bits/wordsize.h \ - /usr/include/i386-linux-gnu/gnu/stubs.h \ - /usr/include/i386-linux-gnu/gnu/stubs-32.h \ - /usr/bin/../lib/clang/3.4/include/stddef.h \ - /usr/include/i386-linux-gnu/bits/types.h \ - /usr/include/i386-linux-gnu/bits/typesizes.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ - /usr/bin/../lib/clang/3.4/include/stdarg.h \ - /usr/include/i386-linux-gnu/bits/stdio_lim.h \ - /usr/include/i386-linux-gnu/bits/sys_errlist.h \ - /usr/include/i386-linux-gnu/sys/uio.h \ - /usr/include/i386-linux-gnu/sys/types.h /usr/include/time.h \ - /usr/include/endian.h /usr/include/i386-linux-gnu/bits/endian.h \ - /usr/include/i386-linux-gnu/bits/byteswap.h \ - /usr/include/i386-linux-gnu/bits/byteswap-16.h \ - /usr/include/i386-linux-gnu/sys/select.h \ - /usr/include/i386-linux-gnu/bits/select.h \ - /usr/include/i386-linux-gnu/bits/sigset.h \ - /usr/include/i386-linux-gnu/bits/time.h \ - /usr/include/i386-linux-gnu/sys/sysmacros.h \ - /usr/include/i386-linux-gnu/bits/pthreadtypes.h \ - /usr/include/i386-linux-gnu/bits/uio.h cyassl/internal.h \ - cyassl/ctaocrypt/types.h cyassl/ctaocrypt/port.h \ - /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/i386-linux-gnu/bits/sched.h /usr/include/xlocale.h \ - /usr/include/i386-linux-gnu/bits/setjmp.h cyassl/ctaocrypt/memory.h \ - /usr/include/stdlib.h /usr/include/i386-linux-gnu/bits/waitflags.h \ - /usr/include/i386-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ - /usr/include/i386-linux-gnu/bits/stdlib-float.h /usr/include/string.h \ - /usr/include/ctype.h cyassl/crl.h cyassl/ctaocrypt/random.h \ - cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/des3.h \ - cyassl/ctaocrypt/hc128.h cyassl/ctaocrypt/rabbit.h \ - cyassl/ctaocrypt/asn.h cyassl/ctaocrypt/rsa.h \ - cyassl/ctaocrypt/integer.h /usr/bin/../lib/clang/3.4/include/limits.h \ - /usr/include/limits.h /usr/include/i386-linux-gnu/bits/posix1_lim.h \ - /usr/include/i386-linux-gnu/bits/local_lim.h \ - /usr/include/linux/limits.h \ - /usr/include/i386-linux-gnu/bits/posix2_lim.h \ - cyassl/ctaocrypt/mpi_class.h cyassl/ctaocrypt/mpi_superclass.h \ - cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h cyassl/ctaocrypt/sha.h \ - cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/asn_public.h \ - cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/aes.h \ - cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/logging.h \ - cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/sha256.h cyassl/error-ssl.h \ - cyassl/ctaocrypt/error-crypt.h - -config.h: - -cyassl/ctaocrypt/settings.h: - -cyassl/ctaocrypt/visibility.h: - -cyassl/ssl.h: - -cyassl/version.h: - -/usr/include/stdio.h: - -/usr/include/features.h: - -/usr/include/stdc-predef.h: - -/usr/include/i386-linux-gnu/sys/cdefs.h: - -/usr/include/i386-linux-gnu/bits/wordsize.h: - -/usr/include/i386-linux-gnu/gnu/stubs.h: - -/usr/include/i386-linux-gnu/gnu/stubs-32.h: - -/usr/bin/../lib/clang/3.4/include/stddef.h: - -/usr/include/i386-linux-gnu/bits/types.h: - -/usr/include/i386-linux-gnu/bits/typesizes.h: - -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - -/usr/bin/../lib/clang/3.4/include/stdarg.h: - -/usr/include/i386-linux-gnu/bits/stdio_lim.h: - -/usr/include/i386-linux-gnu/bits/sys_errlist.h: - -/usr/include/i386-linux-gnu/sys/uio.h: - -/usr/include/i386-linux-gnu/sys/types.h: - -/usr/include/time.h: - -/usr/include/endian.h: - -/usr/include/i386-linux-gnu/bits/endian.h: - -/usr/include/i386-linux-gnu/bits/byteswap.h: - -/usr/include/i386-linux-gnu/bits/byteswap-16.h: - -/usr/include/i386-linux-gnu/sys/select.h: - -/usr/include/i386-linux-gnu/bits/select.h: - -/usr/include/i386-linux-gnu/bits/sigset.h: - -/usr/include/i386-linux-gnu/bits/time.h: - -/usr/include/i386-linux-gnu/sys/sysmacros.h: - -/usr/include/i386-linux-gnu/bits/pthreadtypes.h: - -/usr/include/i386-linux-gnu/bits/uio.h: - -cyassl/internal.h: - -cyassl/ctaocrypt/types.h: - -cyassl/ctaocrypt/port.h: - -/usr/include/pthread.h: - -/usr/include/sched.h: - -/usr/include/i386-linux-gnu/bits/sched.h: - -/usr/include/xlocale.h: - -/usr/include/i386-linux-gnu/bits/setjmp.h: - -cyassl/ctaocrypt/memory.h: - -/usr/include/stdlib.h: - -/usr/include/i386-linux-gnu/bits/waitflags.h: - -/usr/include/i386-linux-gnu/bits/waitstatus.h: - -/usr/include/alloca.h: - -/usr/include/i386-linux-gnu/bits/stdlib-float.h: - -/usr/include/string.h: - -/usr/include/ctype.h: - -cyassl/crl.h: - -cyassl/ctaocrypt/random.h: - -cyassl/ctaocrypt/arc4.h: - -cyassl/ctaocrypt/des3.h: - -cyassl/ctaocrypt/hc128.h: - -cyassl/ctaocrypt/rabbit.h: - -cyassl/ctaocrypt/asn.h: - -cyassl/ctaocrypt/rsa.h: - -cyassl/ctaocrypt/integer.h: - -/usr/bin/../lib/clang/3.4/include/limits.h: - -/usr/include/limits.h: - -/usr/include/i386-linux-gnu/bits/posix1_lim.h: - -/usr/include/i386-linux-gnu/bits/local_lim.h: - -/usr/include/linux/limits.h: - -/usr/include/i386-linux-gnu/bits/posix2_lim.h: - -cyassl/ctaocrypt/mpi_class.h: - -cyassl/ctaocrypt/mpi_superclass.h: - -cyassl/ctaocrypt/dh.h: - -cyassl/ctaocrypt/dsa.h: - -cyassl/ctaocrypt/sha.h: - -cyassl/ctaocrypt/md5.h: - -cyassl/ctaocrypt/asn_public.h: - -cyassl/ctaocrypt/ecc.h: - -cyassl/ctaocrypt/aes.h: - -cyassl/ctaocrypt/camellia.h: - -cyassl/ctaocrypt/logging.h: - -cyassl/ctaocrypt/hmac.h: - -cyassl/ctaocrypt/sha256.h: - -cyassl/error-ssl.h: - -cyassl/ctaocrypt/error-crypt.h: diff --git a/project1/cyassl-3.0.0/src/.dirstamp b/project1/cyassl-3.0.0/src/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.la b/project1/cyassl-3.0.0/src/.libs/libcyassl.la deleted file mode 120000 index 9b9fbdba..00000000 --- a/project1/cyassl-3.0.0/src/.libs/libcyassl.la +++ /dev/null @@ -1 +0,0 @@ -../libcyassl.la \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.lai b/project1/cyassl-3.0.0/src/.libs/libcyassl.lai deleted file mode 100644 index 8f138174..00000000 --- a/project1/cyassl-3.0.0/src/.libs/libcyassl.lai +++ /dev/null @@ -1,41 +0,0 @@ -# libcyassl.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcyassl.so.5' - -# Names of this library. -library_names='libcyassl.so.5.0.5 libcyassl.so.5 libcyassl.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcyassl. -current=5 -age=0 -revision=5 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so b/project1/cyassl-3.0.0/src/.libs/libcyassl.so deleted file mode 120000 index 5044bab0..00000000 --- a/project1/cyassl-3.0.0/src/.libs/libcyassl.so +++ /dev/null @@ -1 +0,0 @@ -libcyassl.so.5.0.5 \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 b/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 deleted file mode 120000 index 5044bab0..00000000 --- a/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5 +++ /dev/null @@ -1 +0,0 @@ -libcyassl.so.5.0.5 \ No newline at end of file diff --git a/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 b/project1/cyassl-3.0.0/src/.libs/libcyassl.so.5.0.5 deleted file mode 100755 index 0b983432b963add2c19a03b9d5b42990ca55e01a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 179656 zcmeFad3;nw)&_iU(m)3SH(zEayz~CPKfb@d z=fWH_}q@B;e_e$C|J{;hBh;7D>*GlNu*=jU7Jr_)Fd%qpK`; zC*ElLKB1=+X}Q`eMGWqK?UUKBBu0$O?$T%Qh=lZl#Hh)$H_p!VO+J3_vHr6BmNj8a z_ce95CAzyzSY4XnY0>Xaj2W}HkDQjfW`qj82cCs^7UALFVmwRmJb-5@ zo`>)(!?PSu@NWeG%AbE#Mj%xq^x~<-^Dv&3cvjv4I$M8Ik=LtN2#`6@O zr||^;{tDn3JkQ~IJ{XDc1w4Pl^CF&?@odEN8lJcC)Zy8LXA7QfcpC8Rz_SaF4^J~5 z{_QgYX+Oe4CVT|pQ9N(sc^A(yJpB6*&qsJZC1U=4W`_R`Mj-qG&zC0tH9|k0+ZLU8 z{KdCcZXVtDg*xx8kB_`E+WTn5o=0x@-Mc?}xVq~vwxK9<)KmU?d)5T`E}d`dCSu8ZvR%9@zJX{Wd8NH_m+P4TK$0y zFZ6x&S?fm^7fqk|@N-Yb(E_?sM-g8@K-aZGHY< zw#Lr#3_3Oa?t2$!m2TZIIJx!eLSJfa%DM$#?0VzcCEK6+p99aPzjtZC8|!9Y`}-H1 zx9w?p@coJvzO~&3H}~!H#>G#r|NiT1|M6+7G6KKq9+U%Wr-g+Dk4t?GAIL*7IA zZP_RLO&#ukX8u1bZ}|R|9wq0uTz>x1x4yM(KG)RvZrQoAlYhGZp!@B9_pAHHmv4<6 z-LG%tyr@qe-?00Ok8>U#bZp0u_c#Xi=(c0vH#646^gQSP*V2~nwO$q3O{;6R{QHkf zE0U7pUcM~b-*?OSwv}rSef-0_6@#wbt_=#j{e7>Bx9+hl_;S(Oquzh)eXgdTrTxZ?d-ueyiG!a#{N!IVUi`f0p5yz^4FA^pkB`3@Kfdp{q6Po> zaPX54Khb)_#KfWRTz*C5O@AAFx%JtCm4AHa_>%m#daGXkeZOq^iCzcS2C9@ByPdv! zR?{na%D(p}CJq^P?6atU^`7&uf4q&f`PT>G(q2JKl88USMaTRj-bV>yMtXhsj(BFL@_pNrr3Ao^PV`npwPzsx z`JK|Ib)vT@x?}#-PW%*gD&MzL`j?&B`%))*^E%bHx>I^id-c*afa^NZukDn7YbSbd zb;9K^dI^A+cPj7h)Sk7S(wB9@hj!v;X{YjgI<^0gozlPSl>S^N`uBF?_k&LPhjmJ? z?L@z-6TMxX^k;FW^aY*pCp+P$nI&qa{v7T^?~P9RS0azCOqRa0P=9+!GkQu=@9wf# z%ZXow_SC*1NfaaTv*3SI7_Nc-jg68t*-Tfhk~IA%N&1tC{}y=fcVLsDV_E(L^!u{? zk~GdtUkUoRpOTPbq(9zOk~U-Uxx&N`bOVe9jdlmi9|3=jiY(S?;ww;IZjvN6i?|K> zod+c;-^5>oG5JG_BxRWR3h+_=7g=fzri1?%_DNEziJu1j3zx~E`tF2W?mjI^Ic9o) z2x90BvaktQ-!AB{a-A&JX5wSfzLFuxEb>Q5&wzd&_z$*k5$YcSgOs)q^VcB%bjV|< ziGPRoA4dCon|L$i*KfBZ9faJOKON-{ESIGx&GaY1-|}zT<)xs#WnaSPKtASw4B_)= zPo9}S1?lPA4I7H-&w{ZxA&ekDyFl+e>IWO5{5Z&WR9Jssj`Sy&%2K_VejDWherW%Y z-UQUATrCURi};%$^jTPcrh#5^7`>|?pAkPx(sgF}yU~A-!DyLg@_!H=`{!=5^s$*v zqk7LDWN8N4LHb`JeHoMsT`ceu=#QaEvUJ`oKMeH$0Q&cs=?_BQHI0&lY$E?Xpp%dO z>2KnZNH{(~7WO;o&jFpS3GMw=2YlinS({las`K7{=427grrAcDUbDNf2ne_Z}G>NDvtLjHZw$7mD33-nH5{>e4@@k2hj zEykXT^tyw;85rabo9US-U-Av+SQEb+_36+rmx;fM{HHKK4>j@i=&xw>N07c1`A?$1 zg5^JfJh~zOWHbLZgx4K3_I9kl5A>s|hb;Dc#1+*4Jmwd-nV<8NAN*CAcq!WTzFQW1 zNalY7?f+uGvCkv^1^D^R5LrT(34JJpKGvW=fC~H+_&<5RU7io4{AXv3eHF`>Q@+s8 zsb>Bj=%2NaN3ee;V?KH&OnzqQ(YI@}~l*=G5(2>*=nGSb9HLmt~tK;|a? z8Td(TY@bi&10M~3g7Vyp`rq4!F=ysKfUYloqkTNCL3^JJ8xKy%Gad50-OPUs>FK{| zUtexS`_j<9iDvpE;ODV_8hcx|zZ=^3hp_qR2=bTQ->z>@K!2VO)9+WH_dkMvsF{%O z8MObgVY1lQlHMZFyX0@zH;7VN8piK7v~M`-pJ|qlLD={`dyDjx+LSMdaZeQQ}fc`P8-?Pp9Noa2j*2AE_yBP13rE4HJ^4pc7#Q6BY z%s&|I+ZQ$;XCu9Dl`MP#%-;xp3qUWZkH3Sw;!i@y&GHctd=2!Uwi@$e>XhE7l%+-! zABX%2kQX;9OkWKC-#I8rs8ZncH>F@b0SSTcNBegn|5YY_ANu!C&^L%dq-UbOo?-Gj z2K`@x`R1k|eYA5d_)9eL9;j~^`hTH`4?zA&2ip5D8T$DS)=P*@(BDdV#K_W2lfO8m z|0^s#8T?H{{|q(r-wJtM@u)0~G4r>Azv*G?O#tnG8vMLu<}XEo-yzUN@*Lvjt*Ck0h zVWvl*KR*TiV0(W9d}EmX@GkiMJ>(BI1ij}Wk7vW$a})(PK%TwL^glzsFYd<}H*qOH zfA0L!1^E?@f^tWGzLZ}yZ^1k%e?s2G{5gf?g>&asI10=2CXOvBT~L@;Fsr1{Nc;7a z{Mm~ONT8r(-UG;Z+rs=QCWWyj1r-&A71GqHIf$z$b(YUA%qlM|ltvd;jGZ;xUO2ma zNtwgM#w{?h^4V#*<)yO=D=MV1c?G3onP*&id1?7nNBO)3bEUCM3P^BlVYy>s!GeOh zh2?_gFQX?FE(&H2&oRCb zWR`TNR21A^xI~(;V4h>*oZ%vz0yc?U?gG*#Jgu;NUeOYhuEDCorU9Fr0tv;MQTh3^9ZSjz^BtunrHcy7^C`{wh4W|6 zFB3u85(e{27Zx(CfZ!_}R9U`U{E|}9H z;#Vr2aEFNOKy8krBt)5T{@g-G{%mJ?dEo*_zGL3}!cu2QN15cTzzE1+P`Y52P>}rm z!t(M3rIdDoV_xY33329keYxH7L~%buDP0R9H2Hnm>D9Sus@}vu1cjOqyF>>MVnRDk?Bfb)dsk z%#9W3wfxxyXhHsbj@vLsnWK{m1Zys*ZpV{s6D!BZNostt`_7{nFjGdbME2-la{O6KJ z+J7jRBNXgcDE?CS+IcZ1&R;2HB#h~(XegIkI6tq{9;SRHg#`J<0>_}yu4sZNCPo}-ZASBg|i)EVKMc9D^`%&?S+M9 z9g9G%I`cdgGbx%fc2>vPb*h*aCfI|tkS%Y1nLRrUhg7Kf!5CArpjCltLR=Qio?VF9 z%4E+N<#S5sQ}4p3irJ+L7N9AidY=8E&q|!w3rf)V{9;TYrRAaNiwVZ$5@cD#n9IX|OUbWr zV&MxfDHJ0-qA0Xzk+3-(g=eTJb~@&iE(&!NvtjZH@4I;wLKMP;tSBxFQ7oA^tGu9m zNe4NJ*)?3PL-GilRw4EKf;^OA=?b&?%CWo$leoMEVXkoPuraBY7h+Beiw%mh!#vFn zon1P=tlXH1+i5uR+hxN{zdn&OrIXacR3w~Qr-j>8X=a8vu@r^!b`p4}X}jZs^}kQr zol}2p!d_H>`667ZB4QCOrXWYZM1o>pc*8Gk1FYzX?zqs;E-6J%%qy3Q1SA!eqFbe+ zGN+?L!Z<*e7FDp%iyVa|B@z>vnF&U?XdZf37>EU-5jVcjkv+d)b{=fbAfr<;&6HFy zb^_*u&?ui@a9?45VL=(~f}pxB9QGerM|?-#(NTsSl={oI1{3~6iC?jtf+p2}DDexs z$;jU^HydbJ--OU;%$O2E(-JpT%M{SWg2l$(A$)VOq`i0Tg|nP<=hCRWBP%N?$*{;t z!8lZuQz~-8AS-hevwQOAI~|3Kv1LT(lrHHME9S?J8HLT-G0F*h4m%x_=_!RB_F<@V zH1}l%m=r6d`9>Nl7JIc{?1nn-VI+I;=(#lg?8U)N6<4qVXcm`4dojhv70-Z5O6N*t zrHhao@#Y@NUTjKt?tISc+@~U9!Zc%77y>)(4~YghT`;M+e=&*>Vx?ngtxj<+$OBD8 zIUxKB3A5$=>nlpHzmbqBBH}5;XB#Q``HQh(cS!k#*e@1f4?nA-!q~zi3PXfBmteld<=ef zhUill!{zX6Gen1a8N#9XFvAqwS7Qi==%WnRO42%pm*Jd&A>_NBA>{iU!^_d{3@5_J z$`HQDjSTzZT$tfs;h$&d!Z|3zJK^7FSPwrl!$~-sWB80D?PrMoIn1y>`kCP)=x2rx zqn{bVk$jxt0Q57%+tJSqI4W}yEW?nVDI{0;h_;Vkq&!$kBy!`bM6hDqpuhJ(@n42Piq z878Cu8U7ai&+tR^Kf~+M{|txXEWv%k>i-D}Te(w9i;y(;$+osOPotxYzi%W?-ga5< z-6^%b0R@-Zp5=JsU)!@#JaMB^YB`SVZO=k+q+%ww92PhfLMmotOQXOs;G|;yv}_bO zI!G!`AiiGU1dGussb#gmF%YFBLh6 zoBQF& z-zadNv=*-?zFy!niEkjjTHtetZzS##cro#M;$;FaA>K%QrohXH?;)Nma0l_j#4`oH znE3m|Qv|-0_;KP1z_obW&Z5=r|J|v6Io1C)+F7}C(e)9M`$Vknu0aX?kt+Nq9d@7Z zx~QvrSM0sN+o`$VK|ZV(C)HS6+u=Zq?zm18<^Lwi-xMs*lELy#=Ofgnrj~*7o+Ia- zK|&f8&9fJT>^2LD9SMA?zX?kW_jAb4U4q`%zZLwr{)hA=r%iKzVbtGCbGs0wT5SH8 z(PjP-i1xXeOEx$qWBOLCq$a&?g5Ki>J`M@?_8o`c^X@aS&Wq)TmTHT6|@|KkqA(*e6~ zz2vm%?i8#h!9;CxFj043JB2Wn*jIfAenF8M%s>Bf$WP76*0XY&vvL@t)ZGzLq+OxZ zHB3YvrS6qU2#VA^TcVm{OHfN}@#<1r99y1Pgcu9Du-R^lWl@ANW*BXToQWiV7JiDF zt2ykzc$Nh)hbS4bi_p-7$G^q}j>h`6=(xqbQun%-WlQxJ(W%O~Cikx7-{(VtA>mx~ zU97TchAl3&&Gl2{X3}x?s%ldnYjU+kD0LT<$D2HjN>u?UyGKZhhZ55AY-ygO%40iR zOKmBV@~F>x3{Wy4yDif7(~gc@%j}j>)L@Z3ZOWrf)>F#&yMUpdR9Eapn|a|7 zY%vc?Dtfj>wKlsfRCvaVy#*o6T|>z)hBNYA;jR~19KAFM(&*BbA6X$b8?|c!U zR&}zaxl)XGkkHq}f~>kG2EWafu~@qJ*DR`Pu6z=E6@gc-4nfa_pba7DB@^;iZUp43 ze2qB7iX|@C+tt4jf=%$8RjU4kRCj}50bQBJMhXQSMQ$4e6OKMwHF*jqB_K(wCO^TL zULuCv1Y>^wfqBSjFyM0DGtMeELXu1jM)pG!0jleG!2mBi4<}uw@%^SjqAHhICaUm!n1SN)`ln}Hy1UW)b zSqLgIA+3fBoLZd&8S2%ER2lJ$q1dLcr198X&0pfp)oFkXE>c2JMhF^VLTWXaPIV>M zm*(nX(L01n0DXkUHCLZ7$N&<$1Psd(EpsN)BIlo8{SwJwzPa%Z`_-k0q#vi>_LoEE2Igh(E1cZFWS}Uhm3BAdK3~NN@Gy z0GhKzvak9%im18zDN|C8C|~spgagsFHMA1E0$bO=+F4t}#oJr` zcfdZO!3fr{ys!EhBY4&b{>Y%YnuC^q&DGp;@ULAIkWQRP27p_g_yfSPBmiz%1Yk(e zSIyg{DE$ux0?I>^n7g@pI-pDe%?QQK6b)wToDh^Ch%-)@PAGvIZ6dO^W;{Y~^}`@v zTSH^QTdfP29qz4uRKVi|{Fs2V1iV(j69l{tu&?@0_(kvp1KlkjzX($)11xAYLV>EW z+Oyg}GhK2mvtCjjt^Ny;+8UZt-s)EcoGW0CdtbGfrD|&?i>TK{)EoFk%9{*MD>35} zPAk2ue}>i&NhA`DBqAw9EI?ch)CkGhpRpqt8*66CBoYtASG|;3eAN#b!7>KT)m{X~ zP^n^sh;x|`T9PQ_tJdWr4BBCY>O+~ABE=xEI0QLDP+1VlG8V)vV?oTqf|zA2h(QxK zfpz;}={9GH1<{w4*4CUQTspq2;Yhg|lFfqmvpMS~X4OkAYBEOA$DCJ%8K`*Jg>B>G z8Bc#(v&F`Jm4A;If2v?wslp{wjz7%8R;Gq#<7Y4)HIc{X;`WTixjgt)vp5w;srm>h z9KKV(H-;}QCFJBB;LkU5W<@JiZvofu$Z0ovts=)?zQwF$v3Z$06}iJ6=pXFu2NUWF-x=Ch7DGN>Ij&~Oe4oMF@i>GxvPqRY zPY#TbKwMa9+228Mc3ZsXEIKclR1gZKsjaecp7+{qgH*qFj_o=?zj5@|YK|k5o-M1Z z2m}`>S8VY1@Ey=+N;)3%yfVF*q?0Zl2f#bJMA zMLXlci-qy)p%TCofLnF?;BBdHBI>lq;1iMx%i1`;7@q@zRDPjLKQmPVyAu)hl z=*(RH5iC_@>1 z?cUx2L*vQ$PUd%+-i~uF%)V(QWl!IgBn%DoMFvJmI_3rHdgMUrW(7+_HD~8SDFU8 zm@Y6PZ@~^X7JI%MG5=;x=al;n8bTzO$bJ*SWE_*7jhL0YL`?7Mtq22_psBe18`>N-GtT3(9glUcblKcU4c+Y|hHj(`zmT?Bh`r5mqgI;e`F5F2Uu0?b0Bk`k zn{m2|Sv^Y_mTsSQqVv<{@rjHRPhEGV{6r6TUg5M=o(i;M@?dV{#5vs!p2QJxifZLu4So`1Eb(cNJDbQcN}g%d_}dO z$-qBX1Fb;G@!OyZ+NgpblXM3aY!Ib{mWoos26W_xMtR2noB4(9FBF7>Gm9p+8<38T zX?u|tiV?%=CXt&1jekLjg}gSm#+e$@mBs(Tr39^+g@FLKNN6JqZwoiFbh?CTSEN}M z9y?<+I!D1C;v(+98oK3a+)O*jab4=(X3HMd-fZ6^_!#ZJ(8U=ry(OxUTIybP&#x-l zQ&$-MuWh6#Qyan7t=h6gcbjGTO<1`SIbz;GM+)mJ=aQv@c9Pga*gk$$ukD z@};({#MH*1oiJh2c`98RE&jnF1n$Z zX3uo$C;l|cCiOe9x{IAZI~H$&f!yNgajA`?N)wfbC!xjeUGZX3?9|vnebLyZwlok( z(eyl4_}EPRChbdYOm9`(PlJ?vLB(8_1{G6%p0lReTg|FHEC8+StLfyGOTSkn72Pe-9(=peMUsQr2T1s*u zb%OeUi&#h_2C}efxt39rEfsJI2L@^VJRdqPR}ZS6j=IZI9-|HPe5hV>o>IF7tg0Na zs3X*_>K>X!Ab>*#DN@>DVOt4bY72ue0uEQ5W4(ovqJfhCjZaK3a;GWhb>xAtM^NbU zk1A&N51?7<4$o0@YI%l&#TEw3|0#z}tFdELMAl^DH%vj)WBv$Kpq@tiM!2>ccEBj^ zWOY#h@`*Ky>YHeHDRrxa`DL0#U7;^52@Q#(lrY(dY(`;U4e7}~OyDuQoIldDkrk!N85ax;SE7eD%*k&7klyQ5~FVx3#8uB~^95ttb3k(x2$(aPq zCj0f34)`*J6$w37xn6%Pctx)IG!%8tMaC5QV&p5_f2Z%RzaEi`rl?6l^FG#a26jzt zbTtV7mveZakKq}N3dK3D_ErB84e1`Vbb1%H34fpACIn@e5yp7xG{#RWXki{&w?&k9 zUJZ5XzNv-~m~oKNkNXoI-K>3(nA} zas>J-O?!pQht|La!+jybn`7$_-@^d4njSTEB|U7;ZocZL$)|1^>S_>fO~(*dgCVkO zbd*qqkH?B@dLgN(r_>$(@tEQRS={Jix@YPZ3QTSCKY<%~9l5pdmUvX#A4j#_x^zsk z?B;QhENlX!wX)fYmbcL=3aj$ON1z-udj|A^zh;Il7rW|{h}McNl^3}VIbtd=Ud_ z49&;^r&8+P0NmfgubkSb9tvC&ax!zg@vm9bN@)9OC{AkQwwu6LhDE8F0Z~~4}bwE#T?Dr@)9x|39_Cmt7}HgXO!5=Dpma$vz86272a+rZ;77Ky{gf9W9?lQG^p5{YtgPyW86($R8bPU z%JHa3*t=`90m0-|1Uk0)DOG)OU)NR7^ODGg z{adWSs`e@#NyLid6UB1|6FAP_OQ89V1x4CQ9)c95uVh0Y^_f_!X5jcV$2J{Mp5h*h zTWZ=+ZMj8@a$gv&3HHk`Q_tx4H>RIdKfx54tE{*RnbMmU4x9i(@ni$WhV=GV>Zzs+ z1F!z>>I+e)RG;Gc372rTDPXv$vNg-D)Rce?_D!wT_1Vv^3$fdNi!{Y^C!&4T_;OKD z{~~d7g53UBtrGf=(jom9lsE(}rn>`U)6kGAoD`$wY;w^kA%F@@aI91|XE&v4GkgH9 z2EmBpc?pQJNhmqSe@SgtYDR>!zp`oBE$S(Evo$ceUGrMFKT+zI4bPCBBh-`1rm_sR zDfK9tT2gfGY?0^awr?@q6;BCHxyPqpQpR6$Z5B&KJ-Cq+`$_p+AVNJQa*aa6m6|cg zsUCDKOP01JlXg`qB8(9eDMqtWH!a28+Rbr|yVc?xtxdC`_ewB&qQR@Nn}iAa%m-MV z258d~e=Tv)F)j^Dl3I>oS#!6-=X?NwHZ9@TGA~BvT5%3t)mS?zl^0c@gMD#LqYs9j zUD-4#Ll(pAH8~K+7_OcQD9zD&yLVXC-mgW#jg$wp4=kJ!MoaYA7$7O;Bmpo3#|xZ| z(YWE%;jNGk+LH!BW+WYkMG*sxmT3xGsoQO32$P_7s(bXMwleJRKdBu!GCl_PYLvPUyO)O;+-B`9nsneMQbF3W0c?;NrEU9v;FuZ!wL) z%ye8Tf-$jO)Ia_Z>ar7rK4d2C$wrQ3bAnCb1dFx13?T&vveBJ|2WCpDj=m;4CZee$ z4O<)r7Nwn0+I^gIwa7pmox+WsT^nF5<(vkQ@p9&?BDE6S`%$P6SYg!DY< z%A-51`;@Agu&k6in2u3-O#ZTWg(X=69y4`& zcRBsMdRSRC6onvb8;@H+QEfVR1R)i9L}ZRFV@M8q3vf~silym!-P`oVa_U~R~UVBM&ku{TDq`%YFc8BxxmRAkJWd>o^=Py5O?gQGC zl|0${@5Ig0A>uPZ0mK7$y3fnbT-3gi?E~L8fp2o{XH*(jyWxF!1{s&MkMVMJ!Ow+QxB#d)y=Lx$1zdcdn6_e_L}^*`?M^d&K!LQ zW{soDqm3k+{!h*nO-fZUNVU@zOQ|Q1!j&#UAHT8aoacwc^HxqmQfMMaFFVhAV4TA7pM53!_imz`&Yr zxWD^hlJkEJ$1666w0hd_iT5-g!cy5E9LWG_f2zB>j99*`H1{i*J0%JIR-?pV( zk8A#l$|0B%t${`;Cmz$vjP7Pw&X~2k$!axkBVdE2u5MRk$QHV(v-84sqE0ae+2mPhPVbJ$C z7Hjl%2kU&pN%$^yr|yM0U&ZtDmQ@s7Hho$nOhY!B`%0|oIT4(eaho6~0=o&+3G#OJ z3>mS25k_^1I#;Cr4-Y;W8>Q6Ei0Iz*RZP>rtx+OhkEl;D-DK)Bx<;$t0ZQ3MpF#Q= zr3TJ@?)vEcDq)GwtWl>h>Dx)CDir)gtXFUKA=y|5T}_e_VTt zCvlOqPnN<7hHJzSORV}MNZB$_X$)EsjoI0-ui|Y~b^m;v%&Q(2l(%uapniva;B_zr z`|557kG~8NEJdv-CX{JOB1ROd4*}yDIuw=Z$SI8{c{%cB!&``l&T9D zzStU841)%}j2(q%uTu30w)bdX_iNj{Li6?XI2Pu^&c$dTIDHuOI z7S$fM@lZs2)W%lfv>h&5eZ@MI+KezF(6?$YUJqn2|Sa0I1Z}{GBn-)im&#fZ-O8X;8dek!HMHVGKU18EmN-GsGrb;B=iyY?=Sd zgU}D7HJBW(k8C=QI`Xc!MD2iQU=M0|RM_{1W4VSeNEbC%*{J&DB4>CP;kH>iyld2< zB6nMYQu77n4~rkO`*6N)2r-^^$ux9LK3`>KSat9oM@u zk|bxGvgy4d&5gN1hg&b5cuWU z6r{)bP)G}+PVv`ZV*vd~3G@tQCF#fpRtX88-Eh|Bc-+q%OJ|ol$H(VJBLPtsfw+UFFPWDZQ` zGDt_Il`ek4lToGrSsPv>-o;TII`^$SQNr%zt-}NQV;s5qRvWF|%~!D6V`rY%-^yVQ zoLwMg9aG})!+3EC8g~V;%}?AsKt!6e!&aLMWpMLq=V#~eIpS@CJ;xw+4Z6-IB$8~y z@O%IS)zfAM#q(Fz#QBL+rg1{RPE_CXN3r)j6i&NLjmu^!$l(75!U^5hi#0ot!V{_c znObGzk*`P+m(7}?QvVCZb%LUK-z=sx#RrfIk?;tZwQ!vJix3xT9ZqtKSV5JL1dD5s zAUcfM*(U#{U#Z_n7Cf(GGMq4?W+Oh4#axIFZwnRcf2TCbpk%ZmjM9z2phVty#n(T; zC}MLr221%95v8_*qd5J|Fa>!JituK;TEIL?IP-k%MDd=T)%8%+#YORf9(={_av%{4 z72RR#3UbDudA@QN)i0!t?h~Oa7f=5PO90DBZ4I{_aDc^OFJTq^@y4h`xz8ZF=;8VsBDu+WY6={ZOvhKZ3ISJ^M_j#cDXO@Tm$( znEwfarn(a6^i4dckHxD@OzpnH5tIr#Tuw2@C_t;jt{I9#K!8dtZky zAob|EQ%S-vsV`Mz3}E_XlLap`Y{lyNB%B)@1{?8+#?`Eykx{Lz{(kF2}}e3U$^X-5LD3j6!CUr1KF2^VO>k2PofDTAk}0Q8z=Zr> z?dVkOeB;$)INUF>rKQqsnBawbD>MD@!gEMfPiI6pMuTpe+)T2O5T)#6rO+{+21IiJ zsnIra2dQ%IqfwNi9yE4g>M1C(!?h${svnGz;`qIKkQ{N-uGCFRQO~(AbaM=LU*G~p zt2)Jbhc=#9NGMig^KSIC|H}sK1FzM_b1vl72!UGjF4-PKeO34vw?#98#32i)& zD?1nSPeu_O$saIwilH~HEAiENP|D=pg_j^UN%5?Q_PH9?0f}&4v4wGAy2P1J3Z&xT z4cdoImYyByZirzf2UplcO}vgH?~t3&C>yT4a6`c<1kyH#T0M>*r0qCw$MMp6J^2bQ zJ}L%m!~4c;l|b!>cf+^{04NU1wvqFq9(_INi8l-|DdO0PqbzhINtvfKq%4GLFXb2<<+PoQf@F;%LcJp^3p`I(c?zgG6S+RdNx`;hFO9% z;RSg1Tl6mWizY*k{`xd-m${^f>HmWN88|fD%{>Eg`ZP<&6t76>!bo~e5>yQO3+ieA zM$FcoZm)z_nZhdVQ1B9TxM=}c-HkonyUzr=x*NN=cmE{&^crCbmq66U;Ps#03Tv!} zW-}@b#m<1z){f`S)#_Rf6X?1?_l!tq0^o>+{VSV=-5ksgL-FH!u?XPH105L**+P$; z0CU*7)Q+}pqud4IB_P~S5WdW{1cZBPqob8g8@@xjdp9roY&Hi5-+eQu^bR_#9>hHq zD0v(np~*ksD2Ou;R}n3^mPczVO*1M+kEYi#mTgB*;51yq!hSP$FW@a28XKcq(tVZ) z*?lO&XOEEO+AL%9zD#W1V;9}W&AYR}wJeG^17a86i!0g6CKoxz<|F53$!qKG#Ss(+ zMTC5q?4=Dch4JzspJk-vvya5~!*ErD_TMrhb_G>>uGw%t=%=BUfwfDh7cil^3NxOPg3Ep!h3qm@EttGaA7yNti4!&F?(olSZD8Bf&@^`N7d=*lL1Kd-D zh6ZlFnNA~TTIyccb~=$H=a9f}pc^9s*Q&3w1?ncYz{u63Jy#brRBh_$Y;vCnU7vfb zMaVNjTV$!cM2R}Cz;(>aDlgI1rFgcXqF{f#K7- zHh|&dx_03SgsXJzD~2_?whv*;QnXIj>ImL1z`qitYU!Fz@LmBvNHAA`zb80OfMW@c z6ksaBp#r>?AU6QI)`MU_0e=4{fV~9x9>GWf`UsxKbf#->666gNUHc2c&jq-G;Clkh zC%9jL*#w&em`botfbj%h6krd6>jn57q}}qE0QVED6`=odfXfB=EApCB>L#Jc7pI81;G2>wQZGYG~D@HT?I1vs2wR{;(r_!A~R2#VlI z0sh2_zZBrp1pg&KmEa)(mJ-}0z=;Gm3vejGR|MFH;Ijfe0=;WlC&0fG)CKq;!4(3$ zk>DZ$4kTD2z$k(R0&IXzw@ee@djxM6;NJ=IGh({-CxXKTs1Y12zzTu`1$ZyPSOJbD z7$v|&f|q_K1&QDp0e(&S`UQA|;Ku^oO7N%v7ZGe0;2eTm1vr7=YXTfa@C5;0OYqME z>`ibrKx5qqZP{Oj3pSOrNEv*!cH7{QILyI6l1)3;!H->x0PMO&{NqVT84OH!&v+8U z)>ytdY&lo?d%Y#*_bQqhh)h5nLtG&hq1XTbrxy?Qr)_X>`9J$A%Q?EM&4{rjoeT70 zNE7$x*HKHeyDg=jt|?{gd9jMZ3^4cQ{@dTcOwpEtlX+aZOltPoGm_C1{f(uVHuM)a zLc_Fi!u1xmkr!UBS#OFudyjYfEbiSFcU#wG@3!nDWA2$|(}H!}CD?N&>F(K`Qf@X< zcsZ&J_CUPP-W%V%=^2hT)^>$u(Z#(Z0%k-!WE_Y0>~;6tPL$5PLUx=(kReubChP9` zoiZF18H{#9ILn4s5%!&W8b&UTXBG_*w&>;JSVloERt$Br=p|jOt}S9`;kbI7wt_xf zrB1w^kK_n>w?3{PglOZ=D$s)vH(L6*D9DgbVD&xK=f4}LL9|)AqcH5x7|k$8DCJGY z7K^ueXx-5?rD$QtJ#$8w;Sf0Q@+Iiey}g!Rwd14Icijgfy!KwOT#B^u_?*}H?yl|P z>lkXQ;}-ZE;@DHTO)hxl+j?<$-PfLk-c!eSt*+Kf&KUZj*({}I6^I5dbG1ea)Z+pw ze9{kScj8M7f26+hFzP<{4s64%5g-$Zc^J<6p2(nV5*aXoAgwFXy0u3l#)_CIZDMqh zdo$@sjzQ46MESICkBLq_TKjPCgNXD-$BaQ9Wz%cSlYV;X*X9Nn{TYM(Hf&1tqv7$# zD=;VEamQrD7o9OGguRG84_}GPz~uytozQmL=izZrH~B5v=;j`~MZ%di2Ycm-40KM= ztjzud2-8RLj0D>804nIjLe0h*iWl-1FFAR7B6Dq4cjKtaJ9=hq zR*xWDU>tijyWT_|PVlaV5oCOOBCDx-8$-k0I8zhf%Fx!D{=!%&O$^+`83@gjyJ!jJ z*=VsyT>Lv`&%Jn$ty#I_f-+$b-n8-z2PyTC>D{i)y1`-b?g-$P#_JKdQ{0XJ5US)o zoO(2)t1|8g)QBF+6g_$*sz?j>=WH|lIes0Zmp*3mC68}-*ugitJoM^>_QE#f^$s03 zlA!zMJ~#$dp;yxUH+(Pl03#$vKTbKiWiV!)6mN1jZ%#KEGmd&VK=)t@*9Cbu9NTCv z7B_LPgZq&zG&8tYEwLp#uHt|~=0q_OVj2E$SCA{-uUC`X)q>Yy68(d~0J(N9Fx<(w z^KI;1oqf?T|M#L%m2Fp|FB}$Ri)HM{5uB!R(a}6JG1u)>eoSCBg}Jl^TZalV7mVU z&Rt=KoMI2WfdX2k*nMK_t5phb1jMGlR*w{1K0e_83xQ_U&+Ju%cWa(ZQi2BQIJRaK z1l$EG%tZuW5NA@F=CObQO{dueoQ_hfZg40>j*A~F&?j&oL8y+tsb`TWXko*5HxgPd zP&s(xc`3cRe7P@CMWJmhgxfpj=oU_w&4!}w!HctpYRAzp(jWQ_*^5c&BJ_gyp_0|_ z7Ucx4Q@;tO;j)97;=Dc>ryipRW#KTmJ!)MiLBI>Qi#=WVTh!Cch4#@$)LrDfxTqo! z4Zn-SELVtT+MsutU@=*3)~negSnu_<9|3S}CPj;4-?2FXz!qAIiv7rD{Hw;&w&?6l$0PVb}tF>TSpy=q3V{F7A{_2+5n4?#)Y=^_=twbNK%V zGO;@DkFZbR%Mtnpst~Jr;v?n)|2)dH8Q)}VQ|`C~-Cd}`&y7qedR_|e+Hu)eP$gAae4oL#0oex_GcHtln{gc29fQ(evy(YFC^!nj1_h5gaVdTS-GzGiDf@Rg zMBSLfR4nXBS%-!MPuVvLZz1fFU!1a6?tJilc(>~R4E2>9S&$w-rUY5U!_wI8|N3vR zy~m65TgXXxDducIl+!BoPi<8^YfvTEN2O*Xpq7Wp0gp@Q1dr1yxwNZ?+Rxj?gda9A!I38HopzeWd9)~VouJs^#62w4id6Qq(JRJ@ z`wt|@_8Rg2A6~!=ygP;>=u{7K*&rMY4r4VN$&&4BE#ng*MgKJv+E(MH096FtIn>A+ zr@1JPcFx17oj|>yW}KB9@q*erh!>h>#BnV78;!h%R~_UJGtW7cj?;6k>h8c$4Anux zE*a?F!Q1W}3JEHvoMXs|w?c7l4x4)_Uj7h}9(Ef4i?ete&f>en6^xJG{y1QR&;BlOI2i#Rp9*>PpyN_~xk8CxUDV=6Da zf)t0f^1?=hPSgzlfq6vD+k1$V?y21I2ny5W*dUtG@@;(-`3{XhK$U) z-lBN+!+bz5;yN7ijLaL}Me*Q6y09{^-5Sz}l!V$!etZ!-=7F`9ywnHiDrZt<>(i)I zJ->XK{=g-=L~7n*u_lUM+giVF4g9ms>Ylc*D_hSQ8Sk!a{Q{7(Y7c(htwWSmKMA0_ zQu6?cZsr$UlxL5WXSUo2NZ&G(!fR8M8r}fioPwH_XD=u#1`q>6tUR^_|4KCST1DP2 zN)10gsW#Qlu?_4#$99#vNAU!ZSG2`B#Nb(3C0<-Hxo$&pi0c`DZ0Gt5RIxn4-8xKJ zc^UG!TSq9XzD8y4R$Qe2H->x5E=22F28gOHiu*02qJda87a8CX^crvOn)R;aXPqi{ zuw5-f1f?Qn74Ku}54_`U>!;LIpx9>bGuK9lh7LzQSOHao5!*5yKVc%7z?>nG(5?%L zL|H-mbF|Q81v6k4u@~}Nz7!d8Nd#Yh z86{vZVGm!dX?ajYxEZnPFZgx0&c)Xv;6`z`-ltSO0HEc0WYHh^(B0NksreJ&%{Sl{ zH(TcBXFSm*SAm;}f(}(_d6NFX5BTVfvH~B^L%|OOj89TX?j46Ph?Et)+}Uym3kVsy zTcea3np37AjwmbIK-d%nu=jwqkXU8wpIO1J`W7)D@hR;U?;@?TwTk>#?T3+5*(w@W z)d;vHfJAqzefeN_Yr0ZJ^=*Lxg8VO&%y0B9bId+pv4+{VitI(pZ*jMdQ>v)lEq_Op zzGaHY)>o-{0_bK5ZVu70Gf-$VMyP@DTc<5c@Kf2kljO51TREF9zul-#S;akcWh;fe z++Nwr{#c#^aXV%~)Q;b^+(O#Xh!wQ|4L~SYW$P}0j+M(N=F(PX9SVZ^pj$%7*yQmH=sGos)4iI(s~~ayeOHUat^Ih7O7w^CAgWd^#*zDrkRtAGylS`{ zL#Nrh55Slx>9{=#ngTF@h0!%{6V@bdWebhZ2t|tT5Mh$$4Jz9Dy-*KcojmH__9;Iq zB;1Q28fUmsmaNV39jpJgKcqJG1}8udv}^PA=>+=Qy}82#Jnd(I0mJj z9Wi4VzQ|FVF$~|_cUwD_d3HqNTui8uWx(spLEga;A3(>N;8DgUj=i@RDlJg6oK6$W!5I>I36`PP9e z=Yr0taTaGZd~2g7TAgrhI392BQNtneFs|MBS@XTP$G!mwJQC{}q`;S1xzi3VM^)Kg zLX3D1N~xifAZS=w-M%06Qrxz5`+mkJYvp6;1G`=+c5HNdQfa~NA^*Q|#`w$YAQS)G z@j6Jd@RVOCu7f1#HDZI;PR4%_2VUYU4IVg7g0}|LR%b8QR@-x65NplzNKoolaG;}a zlW{}L7IfQ=G;{Uh*Hfs+vQoVe+3~i%1@BR%xweRJSiB}XlgykrpSTkl0{w6zFG}F} z+DyXRthhjdYv9{bF*nveD(ZK&#$tgH930gieIx;AJo3NVKHnCPEN(-%U~wQan4bZ_ z1%WD_OK7k0gD^_nXnqzpBiI3Sp4s6i{h7Uwp3g?ey*X5c*I?-ejNz>xgwfP*^-$a6 z8Po-S_rg=pm>=D{e;!g|%W!Rfk|PUVe7rG&i;8&Xb4*6k?qE%Lr(w)+`GCB8)JvkL z)$c`LtH%~O$phX$4(A{i*D%l%p2lrApkdA_CKYvr@qVLvim!*B##x2It96dSqlG;C z-J98mfh*Nmu{FVG0E9aeIwkq%B5fN#bHkUZsF%V;fLCd#mhKDJVv4>D!g|=y&m>I4 z_S)E?wK+p&@3ijf>EIhH13?t?T!#79iujC$<0ZVUqEsydS9oJZ@jM8?w?YWTHzrDM zsRWL8h>FgmqF4I}Tnq$yQ|z^HRqEp-)YBtxixL!-nrUdg;vR(SK4wjLnGR8+BJmXr zR&)|8ZFogzf#ajVg78DZ8#ug& zV-ymUN45G-vVotFseAy=rD`i{2RNgjxnbT}Ie$P}=7G?L zbhxg17agV4c^qAU`Lz0%m{)+HjK-r`vF1g3Kss;jH9pvm(?h@th#t`bF-borM@foAQ>X$Dq@LGL2m z$+ss5FBherZ%1uIxB@ijjU^wBM4Z-KY#kaN$lby@f%(O4wSdyR!E)Tacag|UjrpJw+$rFj&wM81EpxVw@_KU4DYF9CT3rW4hX$!r$r~d zk6E1tLV!Lc8OT+x_i4KWne57zT1WU{-iGTUuF^Yjh`(7*^RGRFEfoF<00!n=?p*r? zxn_eFxdPQd)#*xwf5xH;)e&7L%!rhjSOA;st%!es8NV7}ZvqHZufhm$I*rlrI|8|a zpJg|(3!kNn!mJL)6)!DTC#%G6GzI1NU=YBL|0lm}kc?szOIayg{ZrNeHYvL;ebusz z2O%G|guIXo+C=?^c7S;sU@G;uAZ~jpCseh)oSAQhTGGniwFXZeBhv!bYG(=%ZE*;n z%&@92di;_{!MDF;`wEkYYqf$6&TW>WSa!@Bk|v-~jv;6coTTS*%RbJ`!=Y%JJxKM{ z-!6!0t2Q`e@JLiYh&ZBy<2jMVBBLz+;_4Fl3uEU567eujzVL9Y7Fmw;+<~Fh4+OxrpYj!p+~_U-AClo7o{7Vk z;3*j=c4+mHqtbMhKw+h;pBx;m>F3O((Z3XvLR4FZ+=1c`r#v|@YxOnAh+_ejdb>zN zoWFuks`zH?vPi#5zlsHNMGp7RvD#cDea9|!r&h1ARO##`r9!=$QfDUIKBeiM1$(qr ze|G+}>>XrKjjxw#^?Q!M#RR-mP6Xgmvt(e|9<6>GzFAE$LN&n%Gy(3k0+>?$*d>$@ ztByDimwlksKZ~@^qk3s5+Np0VI6R~5&NMCeOYYY{YKODT-h5|=YFGUdUo~3kFt4RL({Xf1>sa4Uw|awE;2DX-;B zSquN_OOOCE%vdC|Wp*TcQlXS_HDeC7=V*~1G3~+f9E!#V5r#y;Lav5^m&b~DL|c|P z1pp*PNh5Uwau605n3aApN+8dGhhlxy$JWRWYW0(dCs1Ln(9ei6q?LxgHbZanzRCKo z;#RQ|IgD8FIUwV}Q5qe*lsGq(9oFjm5(1#l2zG3Nvew0coj5*}W;S`Lpqe>X0zguu zP18XFoVq4#z1=Jy##7&4;00SYTqt~t{?;XAjQOLSBh^$*tA7zd&H2Mbzp#!vYhmo5 zK178Y{Onb8OUizdjYou>{oY!E+s(369)A zzbpu5rM;~1Helr9K+^s^p2x~I`=>!43r$G!gI z?xYu+jk0?{4OCDW++Gw1*?N5go0S|miPf;iB9PqaUV9!!zP9m)|3&YX9Z{6!>=+sB zBcn?tD4ni|eI$c@B!hkAntaB4%<)6O7*}2had&;71O09Q1(RwZ^gB1+gr#5PY$mk1 z!g(;%;dz~8(yF+cbAx*1?1~Gmtc%&j0T^bK(-WN##LkQI0)?L11E5K zF-}&JWPwL6cl!IhP_g=Nlq8jH{ML9)NnmT5ToQU@le76ViHXlZ=740@!jxp%%1r`b zHBB zFOvM!RP2oK3OO0YU=0}`)z%#Dv1;-PtZsrAq2lpR!hj~*cN(jwkC@m8E)p*QK3YTr zh{lRLM~ps0hf2XCDWsPUp?3~CB1m`;*`3>yEv~m;0zKQ7$e~^6a*A3!`K`8R2|;j5 zNvmIu*tRmlwE7c9bZ2%fNPkn#wqH|Gl7^ly{dg@MBH;Yv7dEQ0=58+e3sR>rkksca z)W_NchI2KL3xB?q*xC*e#I5<7Y<{w*3-ti|LZ4>t=+`Ra+*iGV)Wd}6`=(XtdtGgJ zB9-1rfU_b%LxvOfz0>WB0w;e5oP6TWC|aln0F<@23OuX4ZfRi$zM4;o3_2A5=p&T2 zxozKmREAT9StOP4V`iGR_}}mbt=6V>{V}uzc?Y9PnP_jdWzNjaRDq;Tv{i2<6=tpe zEhL`7iQ8%hLdUU=#5pr+g#48Q)0Fx*Fg-J>tvZB@T9LbKi#7X!Q#w}}PwWiFMotd|L*+s4=kkHVOz#|sY5DEn%LzFCWm2Y)8nE>SDet1Y?@A7zZ;bjOMK zFHx&eUHHLR{^&r(YvfrR^5f_M{mFzb1vx;T{xFC(377B{JII8$fp2-bvL)H2aaxB_ zO!ijB0wPTV%_8C8iZ#r#tnGTfGXv}B7Z&EyHbOk47W}*Sion+NC`{QDb5SG!CJs`8 zuAQ}y#l|Q+-|#s$8TH(U=}F;u53M@&&c zx_8n_(g4V;tnq3os)5s0KLQPedYEuT<57?k`v>mE#}!DK@Y-%gQtB~&ukdg_YXCLh zpct#fpnQqERk-j<3!~UrUP7~@Z-L~cpui6Vx^HWu*V+rw*1$PE9D&|aGG z!au<;z{wG0+fsg5=3Rz|CHQsqZtX3jxa8Mf^1B*6%)!*&fp?_YyAJond{T=(F zALj84H^d_{xIhx>C>LXwiGDb?NPLOw$MySMZLhU)L}VQU&DId~EIz4~tn{|W5mt*= zn0j=dvmN<+oH&uoOqK&ONP*)CT9`yd-ItK?3m3$%2E!Q+ZJlQ1G+>K$?Rah72cfTr z`o~Pr+w`|^^N)tO@rX1hbOnwL^(ByZU0)-wL0h*=t9&=%*49mQR^dJTq3;}R-G^oG z_|6J_eW^d5C`3AKT~0&UJO07u6emnD;|?S9b95hC0LXQXIPRhhfwY!|tW$C`ma3{G z4}<$&!x9sGyBYZy?km``|AqdoidCpk$K*yU zjKjKY*UCl@_MqL(8)cY@NhH0@Yu{YFlk8eUVth(4gbFXh_sN;wJE1NMwbtN{3I?nK4 zLhJ`hP2{WZ6@It^s6e7DYdNx`WiQ+SwuH7EOFY?(TwRGJQgWic#}!F6*yRU0vESum z0Pvu}3ymv`$4l&5SkoPJ&G<|y?UAeF)9Vz*_tc#SjC}=y0Fd(G_@T$&UzL*!wEexM z0*NezK`*IVD0v5Na36bhoV3OX@8~N)CG33@Z?HGC@Nuu3mFfoq=`oPo8^A|?x$fV4 zw3>a4DHqXfwOq6sH$8o8t0jJfN?>O%vOsuj;zQcb#C}V_$ib7_xs|&F_BX0cXv-%+ zVqU5;uMEOQknIB%J)cA@+k*X8*HWyhsR{S~Vr1zjjUq(yPt^}5ChMK?^A{=-_EC*K zTs8U#w6d=#+31(Bq2*Gu+kxy!?V6-2xgxlUv`p?SP4SvD^JQsb-XOtyEQ-*?<;Fs{ zYGdP4<6)kb=iWS3RlC7K<}K1W(BMBrfGqmIZE&^BtX5sQ-e))Y+rN`0XO}Soh4{5( zdjM6@ZfemAFqq&gpB#Dk+-p5|SkD&g`Kt9?Zap~~K*~1ZftGWdmXVw53TTp-rDp3A zpq&3M6UTtrvY8+#C_7k?}sJZFHgP@}% zMqcSdC@lC0(*!rM=4xFJ41(5h=|O7g+&O2xPVM>11=W;Tt|oNfT9aV}RXhO6H8%L5 zQY68Vt||G6Ps%Iz5~RG+GSUOOd{~-t#h2$Lv=-RJ_JkuR2ztE_0oCplk7aP@4w!*; zvI$Uq33JwiTLCzY40T*uR|J8fg~MnST>GU(euqG;s>m6uD#mkITCD1FgiG*0JSSFl zMSkLuP{+u+A)$`Tu-8td?TxgE@0m6+IMh*oQW94RI1j(+tFr$vx~+v zS#&ni7A4a{M{cdc(omZzSohH)F@*`hpNvULF}YCanAPooC*_Xeu$+Bc4bBgBjPm~w z#IP%PI_y2bo?x@Fbl}Fu;Kr&<%vT4+#Y`ERvQm+#WVwSJo ztke`CxyJ2;v9t6=v~w-SGE5$^k9}crny-j{_suH0YgMiiz}7E5jIK~MolY9$GZ`A6 zpTK8$QvY0A^&pLLd03}v3!n>nP1gu0-n9T=sbe#l@&LHM!faR$(jbusJ1EK+e)d(~-8(Vcx@Jg+h80@qariH=(_D`!3=IZ@z*MikFi=0bi}dE_%H35Ph{iKt#kqQ)MH=(|$rIR~F(Re9jgLU_+8f^jUe zSMbKYq=NTS;=OjBjdzZP)lPg4E%Yk9CCz^z4e|C`DKOpw?;M5qaNuii6t?lkkeh{~ z9Pv7z3_p4BeV5FY#_+5&d9Iy+@ z*3nYh2{>gVts{Q5K+q!W@kSN=l}_YBuejZndXJPh%2}lzvi*{o(hJK}nQhd@@-aA}d zHLnymWQ;JaIU73WkLIAiCY}Dr&%-NJipUt`a2{|THGNlW7_^G;dcv^=WZDE&b+x6w z2sp)Gp3Q9s*;>GpIp}*rE zJWMyq7o!so(-O_#m@$d_@Rj$}kF~#z9h;b9MOWf4aSakoLV|JD$8q>elrS~FR#jP_ ztMHdNA8EgjujB3L@#C%N@%XcA`6{h9=Hlt7vDs8U0qL!-h^ACWLRuf{>VjRi3dY)g z;c{B;_y&6|-c0L_#{?$QWZP68kxz(YKVeE*dc);^wBBg!4VOdZVI1wf6KU>kD*vUO z?HL5j@ectDH)u}65FxwGVmfs2C(&E*LH37HZs5~@;uETrE7kCR$y~CIqf()mCb@S2 zMOn)^R&y%Q2hp6E7O9Pcm2BJJ10E!mz+MR^32n|EkNZ;cw5Fj@mrRS}Eh2&`;%hso ze&(V4r1}XLqOecfy!nrxgE!ZB1NanJ|5Fg%;X9LR{FG}jsxBhK$q69iRUR-z?UoZK z0Nyf7%Bx_w7GbjM4awxNXhPZIb_d&(Qwh*ao6UUT5_!d$F|$hidEpE9@Pee?b)!)N zTDer(e&Tw%MCnVHV*}}Bp&ab!iB)>90x#kXjChvtGB#C2{sah!Dj#iDwEz z$u4r@yQXN1d~M-Z@?>REJA-7%%A$h|dYG2nSW^_2uX|0GtOnW0vDGo+;xHN-U_81p zBBlaOK?k2E;}hDJ7brkl722%CBmj*KGZL^^2`J|a1;Sp7*yL7ezRlFA?@_>n402Qo zl`nO+OIe7XitbevYRv{YN_mPdU2EdqgeaalbOCV|rptOvIb}7P$slmeeOB?-SfzWq zW3>8Sw%vcwz$OU{1mKAj+WrHyg$3u?C307Yuy2fu;hYnS z6#lhs2}x%|`OkxW(KtF9wij57cMw81^7uwz7|$>Jd~OltdSeE(u!~2~F&`ISIC{fS zwmaVcLF72b6tFqCt0t7aJLga8Mor7X&rMT8`;zy7uUU?=u*o|3MgywDKYy?I!3SW; z!7)eQ6;MI$#rOEzM1wbb=ApXMQzIhIACdFB2Qj1+AA!d@v}YxYhc_X)zB)yjzX1iM z6jEx2ngEzp954;fm>K$o^`3!uY>Rpd(%e5Xa%45}k~i#H@((rtAn727DpJz*?+Our zil-^~EDO6K(KSIx7YNa-?R!9SBhI3yRDS()s`66TLew5nQoLbl(jDamW0^9dF6zQ!dqBZjv&gA=;^eWh`0 zp;pUh-c*GvqW{7%pABta5q$!Nf58|>eBycFX)0zM5(w6@PM}tX);sv-D+#TaJs7wR zvCiG;zal0+f1NX0#jCp0NzyIAIt+N}T)6t;37`bMs(lB6Ztqz=JgB8%9T$4xc$a@q zV?Ay2oh=RWOk}9{@~pX=U^ByQDeac35?D`5f5zN#EbhP(EB_<$#LrB@Co#=@h1UNz z>T*`_qVC|>?%-4eV^Uhuo3J>2TeIB)sztZS)NApbV{IcxqC4(QCgLVqyH+_&eNK0++BPCmm7UJ0KCxuB z-y~yPf%UT9;TQDj(!(l#F_I_}C=k5@3n0BD)km$#RMV4yG9*4Puzr~|xFj6-N;2V< z$%MVT0d0OO89y)?k7KMT=zLWx_gtyfSkp@QNW5+Tal2NTtkti7nS}99GNun>-uzWE zhEA(gHO{c=>+4y-Cr#Z2G$j*f5zIW;N!Ovd9c^`=^J_>9uanf=hJBnkEj$1*uMmQC(##t`WUy$}A8wfMEHqgEMDT%bBb+q-zT;*^Qr zER0B+mG#^zRTf_$67ScBT}A_y=+N;D|3?;)*K+mEzdf-!CU~X=*1v{~YDX!YG$6I@ z%kYlw4)Oeq)DAHgZx%-mMS4~$2U4nMhnRSGGEpxp(b1L3Plr*Ys**w@ogJ~nBEmW$ z!XDg2s48`E&bcgOm+S)~-5dUZ?4eFnD)FYuk1q2xtD)RHj{8lrAg&szB)u#G_%#BX z`nr|Gf1irZupvnFOKa@t@2TkC%(VSK?XSbtR~i4?u`r~B-UaF_+>^60dd(fgOy}8X zKN1)I>lU3Vwe*W$FSHmsv9~#ZA=y5SYwP#DpBA33h;*&Hfjk_Z37TRYtK@RoZ3ts5 ztZ`^zPRVR(pC!!B(buTY1wLq>eu4E1g-mW8GRr^{8TFo1Ma^OqHgLu2ncm6NYwwY2 z3aE8hodOb^MkCcEMn7vs6C8GDsF-RvHFz`!UnEsbUzNwOfPngzv~z9vfsF{K8W>({ zY}3pOh>6wn%%78Ph*ce5f6Ul@VH&Ry5&Qr*J2aE ztV8TBc)CF#NBj)v03uNmXCSSNF{@4nzGfair)e#{E&9aK(AdFP3i=peQvwW`x7|tlZCGi&@UHM2D&am zS9-{%h5nY)2Z5s%4M1;4d@Se{VhwsKsDqeA zmPBz$aHZ1d*?^I)k7NmrEj=4VDKyrVfEfBy@=JCCb*M6p{Wnlo;u1T1LT_1?0v+Ch zpu5q)l#lyEdqT&&%ve`M=u6}`<@o-gcmu{oU1Ag4d%~Yi_!xT7O;Nor-;}`mSHYzY zf3@w>6gQ+RC#{zS*7NQ)hyP*-39=!nl5F4A*kL0wWnTZ7+|lO5aKuIz9!<_R#C@IH zQ8yAKatV2`Pf$F!5Hc zLlzCiS93h~fhWBV-*E>7N##{t(7vbHD?~2Tx_2zF0_1RROy%4EcpSyTQi*s^pjrF} z`vrscr|pae^Ayn)zf5_bG-y)s}4v|K0EM?C|vp zMJp2Nq3CoFzbF5AP%tKCv(Pf}3FKl_(SQEdtfGIO_`4HCoXhm=mpHi%62qu<6SY{~EgvLNPkvimw7lBZTcFs1aI%lM6OTPy7OeC;YAC zU70yoGXGleQ4`pUPT*%L=y4RpQhtks)+9)#%T(Qh`_>Q_{Bw=^d=?S*?!cRDBq`x{ zYtY+VJm7>(}E)`}sC4#FZgqnfFh4 zz;yX49$X4t!6*I@WOn|cbqo2#>U0U%EEi862eVhJ#Y7GJgRpQF(y@)^4WW!GYZE-@ z4gl})QUoQCuwno0_}*zUo)&_mWK_w%ojf1h#G0p=^xnj)A_VHi0BS3PY*?ygmXroJ z<}7tOj&9}_2jAtP<7vLhq2uX(zZt4}4j>@`VSAddnAAOq;4T8^o1r@p+eXI&W@st< z+bI%$1DwpzONdPXT-Is8y(g)LA~tay^~#IQQ0z1Se=A8pCqS?ZlVRaV$A)kxH(x;DPBVTm{y7Qqqpo zlyv+yG|@{!ZW*ds&}QdJREv!;$f728%v*RhGw0j^f$rN;HJ}*{xUiKw55NOU`_49)*kG{ zaEBg!K1WOGjbPalmo6h{ zL2KS6#rvVXdmX+D!EeluvyBtE$|Gx*3vOe|c`iKzzC1Vc@G^x&ip)qAo_mec3r|_2 z>lU8W(6QH@!V@l4Uc@hu{U1n2_+Eq*%r&v87|$F$d2I)!BPq`gKz53I#kdR!nNO7% z=U-W1s+dHJNmVgZdgCTA#TTG)QcSi@6(*vTwk7AocOp@$Ly%)azbeS(5C62p{OoKfX?G(V+Qt)i5{O73tkWOol4_LvFX++@Yxua zb7PA+b9R!U4o!h}A+HX#XO2!8s1&3Cq;Dq+pfXsL+c*zZKqpyByB6My`XcvaxRBTC z-{DKxnEH$|A()lk5g>3pfi=+3J{NCa8j+~LSJ~rPcqv*{eJxE4#n&sC_QLM3S0r-q zwS-@DyT9TV#40zu5u)`9wUtj%eZdv>oOWp|Usm(1C2F3vQq8mAuLG@3RgQPZDUxGT2w0*n3;0v4D1P`kgp#EIlqZ=uxs?jqQwc$6D~D+-ucdn^9H_oF4bL1r z(^-^xZ((rbARQN4VtM1TadM6uH|antDFGHVMdR+=?C9UQ*ptH@)Ng0Ta63=#>Yp2z zzK%PLK8}8#e*cCu3V2yhkx}w0TCzYtE=Oz3Ds{+MHX^Dk*_v-;zxHJs4_9N?(jIt| z#>7zv@jj_UKTrBEQ4N~(wQ_TVFkuNNUfRlx=wA5RnCJvr*zdivio3rvw_v+RdSr{u?v@_)Kq0F(83ou!r6-WSC^gKdYbh${Ap%3D_=nFK?LEcUSjK;9{JUrl8Vp)_oS3J4Fvu%ABh9quag88i@jPq3= zK_0;4hX)CK=OM=+YV>OM#C*hO976A43kGu8+wxtrDZg z=xluq4?sEbFDud4mScr-ObHVDbUNP4uJqo8U))EG@8WrHj0a$8l?k`ZSdAeo1BY^E z=r}2Nt-EzhHS3R-Et01y-ug7ndQRt4Tlu3Bdig-5^YFX^PY<4474>3(W^U@ z4($jt_xQu3MWPQf#(=k>iyN%VE z(IM7SVq!71TCYLS+80`mVvKQ>@COfgzVpZp78gO3xDX^?=~>>c9k^2!Y_s_m85H@| z;p1Kni3eiSzmN7)f=e6M3dg%hA>vEsFD-bp8TPg?7`Dm#K0YD;pZHkg-GK)OTRfbY zYOKMNf2p$$_~B3=9q^`$5GECTl9@F{f=X8QPZ z|HR-I13F9qVvwE2n#!c48Gp|8dG9JhZF$u|GSxpPM!QUopMhIlZ8aO^hTGopm z80LNw(|DN*sM0#(9e~IAm=-QZoTVz$1d_z6eiBk(#9q&o;vaQ5z66gu0eJqoe`-{m_rzEt{lP>`rEWpa$tq_~Di9bRgbX6>vXQ3; zkPq>W9SH#PB!DP=lLj`JzSN9#;dLMgyyueWDFbsMn8ee4cA+jPgG2=fiG@G134&+7 z6o_7G<`nT9kqO-z=EX?kyS9QNg= zt>aW&tB=AuhgN$UiDeqP89BiGEEEOhA}HslF%lzqP<>Uy)>~HTNG3NgO!k(?_aCqr zxq)ssk>D4A8=)@`VuQj5l0|=qGGO_L{1VTR%cKgL`7~Z^h^+;?(KaRc;s|z;#kHo9 z=wjF;iZN*)TO6!RNPEao*fztK6#k z760%k>C#62kL(Az*?2x52#%)y8NyoR_ejR6^__3jyAc4Z_t#O4x8jf0 zuo@Op7!Xy9U`(ucAziGV*_`TtnyP4|MVX)?yAad%E`F>6!3om>>*wQx6yrdkyO^P; zE#?~trC2?)Ior5I1tPQBD5jm<6uBQUZ4crHJ+;!|n`vM-u2JFb2ECoMJ*fsvhFVm3 z5?88>MJi)ScgCl_HDi(RZWtJ0?%}J$m?gbNi}3g(Isg?g{+aOBj3C$u9D~L{)0_{v zBCjBeW_PFG_g>7#$4~}hmcD9d34UXq!9=NQ!qyq zCz`Z(te(>yC&9kov>*g!7IqaLJb_I zGqdtx)hJpwA6x_^xH96Hdz%51h`J8brDK490xf0Y_Ig|pkM@zQ%e=$}#VDT!NOWm6 z9E_;i0E1GLLCNF9#=PPq$VIt|#RA+nXjK^r2m*8z1LtMeU{vj-NJn#(`_9CetkWG% z+hSk@-YjwW_DPo#KGnjDSPxoSF+$xyW@w?9&_@^g2I>!Sq~)?;p+$%IW8-BE!woD- zuK4-`OrgU^ommvgSAjj7H8igfG9dyH4g9Pg#Y5CKl2E(;HE357A{0?yH4k! zAiX`&&wf7x??M4M@B`$OM#@9&>_+;_Jkb<+WVNSq_!lq@=YC4cgm z=gMUC1YPk~z=g!8fP#4}?By|8q@_;jMxA+9fK-&jtLTx1Y@ir=c`l22yHdJ94wxP@ zY)*3HZ=hs31qC=s;-surZ{s#>Rh@Zkm-& zIuh6C^6e(>fNM<qyk;%bd|F?(R@`%<&+6`yPp=`Ob<3 zs(_9&VMk-sS~?wHNcJ9imq9$Al$Q?7R9;3iFDC$E7bR;GhTcF9v_JKQS3eGx5>s8- zW8L&lzqCs>;?Dvbp+axCJ|na1ef(lhJNBjD;3)2xtY7C zG94ywM!5gaAYDT3>8qtyRa=Z@{h!8{Yu8igXxAKzY+cwZ)Rp!yrAQ$@IT8=pp`$xO z?cb~x{bl?XIow*X1zpi||Mpqns63RIZ-&ze4PSH3TBoe>06j942cY5|6(XT<#@?*! zlDz=9MH~4%k(PxS)uFER*{>Kpj0>^f4>dxY7V2Aqo7gxaK=cFgU&G!Ge#?V&zzyR= zr=`~nom#dhT6ihLnDt_6vn0&0jM#q8e$}!M zZi#t2J{vLgbcD@r7HXHko7ze5ZEn%ykyZ6^9Fq+N0DcC9KgZg;k2fXTvN- zN1xQuJ_g_YA9b`pNJj%(PWZ0f(avC(!VraGJ*l1T{@pq3o9JmRNYS&Wt-+UT*Q%cO zIe5~Gih)(NB`@QN#d9cgWL~(f!*7r7wjPRBSHX4`gg!<%+Nzot`e>^vUvS@lXx7XY z_VDiBhqGB3)7f&;+G^4o|MyYseg5;~Ke!zfLl*_KJfkK9eJEq9ez**)8M8f+{pJI9 z*Thv?3kPCV-Nx(TKmtc!(zrlI`Qp(rG|z;PKtbLf{j`S^{_uxRNBjbmjo}U^U9?2y z7FtRmdy!FwgiyzY{>)gQ8g+0c;1gkxACsT)d`k|t$!%y&0EfbJkQZKQYk-TaOa8Hu zm4oXJ>~Iy>s(&ZlL)^%0I8}-rQ}3r~VI z`c$yaJRPiFDX@mwur9Le_|Yw=sACjkPpm3U)|XDI=O1gkY4%CERnH{6|2P%AhrSKo z-6`-MKMCHAr-C>51b8Qmko^I%`}~k>{PWE--;h}*l$p!(AyO^FX?)R*0lj?v^@jyK+aWT}3&kl2CMmg>hV0gTtE z`h{W@_8631iWWOT;hQ#6=A|BCao|2}1P39AO;Pn~yn`)0uhM&=rR3Fmhh%P6Yf15= zAM3l#G!vuQLq_S!U%``TARi$$A8%JQN90=2F5+X-aFafN~;7=U|XjS5{rcvxe%*s;h9& zHTBA>tFmF|tGvo>L`ZwR@~Ua^<2QjOl~+wgljL@V)2Vj`*NA$^!QG$H3IikPx|YHg zRt7e~3`3NN88iXE&v)ea0oCc|AC+2RQpb=njl_m983-)3RlnnB^t~c=$Z-)qrfLMc z%6hiMF0|ISw?qwEBKo>4(Qi5WiM6U1y?-l=a=ps}KE(q*1cCaTPnP|K{_d71V zSLC)AI-bXbVCH1ElPNhkM5_66fNEO>CFPipm|##yAp<-%wC_ zDCWXvEdJ~7f_%Af31Lk9#uxwwx2N3k^b-0a4#nIP{C}}f1i^9>z3mrl-(WKdA1Qwk z@#l~SgH$$#mo88g-Ss%W^sruVC#!6Nq@c*SM_QsBIMBroUF{S>j`=SH)lm!>@%2R?9E_EMMYLBZ#|P*0&~Tikvg==%T2GTB{yO2$u9bwb$2UgIq?C zYCn$D8BJPba6c6{RalbiM1s1d);|=09`q-*eK-kn^#2B=;Fy;JGPQ9IU~ox6vdHKQ ziiBk@PWDqTMO~{`!VSzyn<8NLD z?(QWsQCqoJo6ye;td>3N%GM?0bzn8!);V5v`uhh~s{;sq0;}Z!f>Pndyn}?ZKd3{n7KnRHG^Ch#~iIP zx^aq)hnsjn)4)cK$NKyNgGu;zU<(8GA#sERr|x*wR=z4ekUB4|%MZmmd1pucVthA) z@1SgB#cP|M!4|r=yZ&wlpLrfD5m2w73eBiHC)7Et?z^E*I6%5dk`G}lJ!OPC@2k5a z)On8e4tCNLsehIkybw`|`+}X^ ztL3W>cDC?)wHX}G@836r6(~M&tr;8+$cZs#@DF?+VFqvGbC?-iz~@jixQFo2gnlt zv$n2$_W!50ZckGD|8`r)lO_MZ+}5`5hZ^bI7}*PP<`l-d>87|gGnEZRbj_b$3N2FVib+r(}p3lSRw$9Yb4xRn~x{G zZMdNv0=Fy;K=E|Z82UQ(4X6@##oY*mHq|5-X@dLqK^7{CU`dm@x3NZ+2cbf_@D|*7 z?(I%)ASMMc0;?UBc4e_6!?r zmNVGtM8HA``*m4RK3$mwJBX`R534`Fd4k9G$~%+;$IdULR#Yx`n=sTfNy@DAcxQg%lV`l5)NlV zMf?+q2xux1F8c0^WM;TrJ{$nu*k-8BiB$bZKA_Qb2VNjJ6qte)I71Y16K)hyRiWYE zF-?Qj@Rn2LvQT6$;NdWFp&F^sCiz}g`7SJO;VVuy=0a1=H`fT{#tDvLT0`HeapSM` z|1-FW+$PM2LR>Ri9qG;uE{7dXO9`hVtfnOFhIW^I1nb*i)9Lu6tsDnWSPS3@Yr+U; zt8=@vOLZ2^R+UdDuNSHKhV7^Q!rnaVjWb*2(@EA&B`(W~!&Db3E3G$9bi>|q_15jv zN%l5KR3V~*$-de6-JX5Z42u^u&_CM@UCtg4E>@j0rvlVtCp}X=rIVW2D*+eL$KrQk z;RWrWv|V)ivRCPYiDXE2+t9vRny66EIG3K9w%d>JH_s>Rokcd~q~FW)g9hHeM1NUQ(c~T-- z-4#_HZCAM#O1mtN^{Dpi6in>Dao^WcU+#KkEp&8+H0W@lO|_@0@548vzG@{6%+CzU zMx$>B%HowvRlKUZ;>os4t++6W+LbIEqAFgMWDlHzP!+dY7+8J!9W{xUn zoFU6;8=E0=Zqjj{K zLHq87OU>8Y@oN5rVgY+*D!b0aI<}l3s(D&;Dqm@Z;&eSU4;7?i}o_dET{f^ z1`@f(qEGD)3}70*h!eqTePc9{+iUe?HH^+|9Fy5F zx{n@jxbuvL(OJbU$(9f9V+XXE{SoNN=>L<5qrDXN9*RN-z%+$?LD2vjPs0NePhB$# z;b>NR&qIrdm)~bDX5)<;R?Kw@-}%@{>F+JedWn9ab{E1Fafx2*NnlD%j`{jU(z%C2 z&~oWO7QD<_47!LjhY0^(pHc?;wwrxBzEi~w2WGU_*_hEVV`1}(O2JJ*lZmwTc^;6& zZf|@MQuH`nJ7-F_1$jBriKRR*20@dKpMFjrhUqrAmted&rNO;01X{bXR(<#>bshr&X~oc_%9G|$2J*m;;~ z`?J=um#p{TC(%cY4eM!>fu>PdyzA&um}e(@y~q~&D-E=2zcDosdiBGwakGbgMvJ_` z0-;k874#VdUr<3=D|*68^(4NTs&7mG0D!5|ZE&R%qPPe?oJr*5Jr_H@xQAjjanq`{ zpn|k5=HZQFF27Ra5T)`2phK+kE&{OAV|Dxjg*)vK08oL%HdY%hR8bUv`d26=AF?>l zba4-%2m2#){a$Q7!imfC@gav=n~DAQ1YqgH#eki-8A6-J!xJNO5GkKiNCEltfZ*ew zlUf;kzCv)pg-NJ;x~eaCZg?tytf#D9|3X{z6^2>M7xye6p%o~=d{V^nDaffkc-i;_ z0+N9p@%+I!#oLmyA8y7{%TIrnEv(A`- zJeR-=yW{^h2-T;O6mK|RQL+??aR>tL881bMF-wp}Te+A}AiCj9tljCqKXkm};dwH* zP%|N6pGx3JWt_RDA}sp}+PK$-$*(yv`8cb{%}8KpyB^taT-Jk6@PLiq#P_i*L;IW- zc?PclH21t7fM8Ir1)$LJs~`SOVoZ-Hpi!KH(r|FwTJ|aDf#wQ43gYYnN>x%s-iVf6 z-NM51LzAFRY5B%JGF5t+7DtrN?5<|(mHrHq6 zkx2gB1k@0}GPYZ3$DoQ_XGkuBb~}rC`8p?b_+&E35^P3J#dvU$t#F{=OWBt=6gZ^PLIW*u?ouRE0r(5%SkNMg<1N4u zH&6j9^JP*TjVl!S1{`TFW{aGN{078WsaPRO$oR|rW^pCs+g6?g@I!p2bo?b_P6_xw z&Q&QwEL5Sv0z7z)FOWF@{dOUyK=a?4m;^%A^hEtNuvHv=W-5lENvUD@nTL#sOz=o>#^xS&9fZsU-Cg!q7ElUdg40I~qPnP}~A>>S? z3xD$^9!fbFn!+*dHQ*TNedG*s4jdGqL+UA(f;zAz{Gzva=}x++SkN;X{C|6Qf^|Oy zv-w8K!PiR+UR0xybaBJhQ@IwPbw6RMGn}mjo7erA!R<(j>B!wA7)EqOdd1pFqF+Zu zG1vl8o(5L#)Kd;k+zTwY!p5=LrVS{u^BmP-)u~u)R821Qbbb#2F>+9b$Dk3kxI_e~ zaSLrgf#HZhX647C&Wxoby65ki_qA4JM_#_?jn;~s+5dd7ytN{C#8=n-vb7?w z?)!bOZ>{h&-P`M@trgzi{yB6(YeoJ!Z|%KREugkmh#+jOkhw~6%ZaQtlSskCEVyPN z5G!Gg>8S=LF@xS4a@SS>tAfpC2ehgK7z8=w(!xhd$2Sjzg(Sln54Bh58LR0n#($aN zTB2>yT}wuXI?nSShB&wspV4hDG^$*<)=sZ-%}MX7a<^vSGd2#O%v@(%!2$mh>;v6L zi9`FQbxXQU*9!j&&m97DMOs#e(2QF62r8#f^Ja14>XpeRrkvSTd1~ItAfqPc;2lR2 zdnx{W??!*b8tf$9@zOK*@`J<@HRFJR6nC6{~8RaDCZ+Uo@ zbT9(>_SWF?*@XzoH10Pk7m<1diKCxbI4<2VerN>#!3de$Q6A-1J{EV^Nk-WiScM>d4}AR7fjEVENT zKE#Kk$*qGAWFE!0d|cJa-|bFbpO>RYqtSC&(AmY?817w6;50_%6(1hFLBM#@r^cQC zg}gK!7N$>Ya5>-6JEGA+EU7>8q1-+wH?BuBJBDEKRo^i9SmrilC~>}z!b+TboV;Ny z8|Ac|tM80P&n}MYJEASUi?;wG zt{=AxEkV+J6xxPDQGEKpAG8Xb#sZ(tLV;hyO&f9#Vr~{GWZkA8%xp(-Ir^c&9Vie| z!ub(;Myc}yDKJ-$v%of0Ai}DSykw@N_z;R?bLAtOCw;+}R*_I#)91gMEk%MVgGeD3 zh;ScJ2u*==Dmy{gZ2joq-I?22Yv-Sx8=YUHBjoFQ^errMd$jfJ;#P)x7q_Djx!b0A z_u%ctyFu2H^xN8|Fh?Ebu79y^A~b?U$p-!GGm1YR8jop7eXaaZ;c6rq?dbbsh(m=xMJ+ z{~{V2q#t0BM;Y!@+=*t+*LP9J8|6I@U#+UZT z0JD|5LZ>BdJSpSr)8k~=@`xuIXH=i4Ng)#+7p$yq$tOT?%ce(6rT!s zH#QHpBms^9K#Ty|FRI+>(Y@&y22KIksB-I7cOjWxbuUJaFFRBr^?=BcVsRFbz%Q_H z`w!YOe>}HWiO3%hgJp`uzmAsL-mO(?_^eXHXO$X0tJLsWrH0QcHGEd7;j>B&pE5wT zR;l5$${IdxT>*17wdqIwVyIr4>V>X9EZ}I_Y&}J-Y0j2`>nRRg$z8pvnfAaTvXv>G z(Edf@*HRKs?DsDchf@*{J`LognsO5pb8RQe^=lx6d&};e+uvw1ntq9e**|xEY#P0P ziz!8hX^j7wa61(Ow6t>7HR~)IWTC#8#wgg`6Mr?0!F=vEjiayNx!pAW#Ahpxc=5U3 zG@AHaWg4}7zG52HeE!-r&gb(v(>V4roIY8pC&4@vNO z24_gnVDMH6&Sr3u1Sc^#PJ)**I6{Is3|=O|qrXGYE5SVsLM1~HF$Vie@KpxWB^Y9` zy^{%UXK=p+iy8bxg4qo2mf$~LLXf*FOk*R1Q3*cF;7SSBG5A{v-p=51365g$NeQ0A zV50<&pbgsUB)E$~p9EJkI8%Z@W$<;tT>y>@(^#1oDk|9+47J0zZ9?fAIF136b~ zAOKmwSB_A6Ll|$Ed*Bz3EcGZ?4^eAddEEiyYSg1vJ?8U)IY^3Et~PAXK`paG>jH># z`p1}6vmj04f2_mAy=ppxFG_F{gU?B@g281HEMicXpohVQ5~SRX&p}YfgzSDiIk%u+ zuM?(twJf|AgE3tuP}hLb?=cww=Njobq2>0{}|L8XU4Em6RyG1X7@A49WQ9d<)Z%dScbEz z+W#dvQ{STRjJe#7g5%E3G6g0Va+=F?KIQT-CDGO%M;vw0RQAk~^5M?JL2 zIb5T!wdU}M{3jRX+tb$j;!@4TiV6rg;1(HzwaG@U)u`Mauq6Xq2-cxN$s(ZX>wsg>r%jaUlk=)cCrsoaAtG%n__{ z9_yoxZx58=zLJ(}8}D?ExXYWXJ-NxfiAyhzvUle63CuqS41KH9f4JZSpBtB!m!E^X z9m;lVkGB->ckjhcy2>-0dIq{cJVj+sTADs96EQ@iKrSFU*oXRnJT&vISB4I%z>qx^ zK)gsgh}D>5Gmvb4Qr;weCg0EOFa^%LW-Uh)+)!0s$6A+yTX>+|jdrEh7EdDpdYO~U zn$Tp)25N9422JScjpqTirjWyM(sf>shVZZwu;&5Pw>1Pw22%gy>r*y_6}tdZt-B$T zE(U`e-@sx9x_%Ez?IoW7no{TVLb6j(s+igTJCu6gg@mW1)a|4SD0PHISd{vl;UuL_ z7nZt5Q828VeD~7dz9NulVgvzsEMzb!eVdG%`;lZVWc!4q}otwR#;=e zPO}CZ{W&@-o|aKycYFidw}4oe#$52Z0T9?d)sE>ic!2WV=7VF<=z1EUrv_)J1z}zo16%&ma+JjrPDO(O})3#^@ zkd2rG%EUJ7#v9+gnzG*u@%DOxa$@17K zko~jn?1svYtv}hY>LEL<0*AG!Puwd&vO}}*)bh6xiNji9bU5$}%+M~~ftSyd9^%A4{eKbK?jTz9N#05YV#pdJ628_!LxrflVb?|CpfSH+ajL+L-m zs06hdJMyKn^hN-&n5YBW&O=&XGA%HiC218=kVrQ7O-HZEl0+D|Pz?-Gd*O(Mhr<;~ zh6B=FNWkN^h#Wc3iWHjU^5Yk9WpxQF--cE0$+*%!4TQ|NQVId>RDFE;n*^$mYG?_7P4Su@;GwsS5`W;nGBiC>@>;co3L z{jZ^a)R`rhmA&_HF99f*iR}#itF~kRncC@>TRRZ0;}4{9^QY|KYLvM~UCb zx}Qh-J9hpKyBuAT3nLhh&=z@U>n=kxuXj?r43xWz*7?}{)LF|(EYO$UX5FMSp29<% zYhy6Z1`M83$j8EroIqJW?Awbh{%;hy1_R5t7C8k7X8{?v(JxRwAgx(y zF(@#9nA6!jhc)6g2ykrc8{IITFFn6gq-+8s2zq1J)t@VVD3jMwI*C$w0DDLM#3?H)wBIqI*+pz zMcD#x0t4}>`djIeK8+l8E0V99jk+ZII6H}^4!^Oad5`Ic-O$&-8zUPLkV=u5mhvKl z(jbSU5PLRT*Y2dMXm*MCo1$t70kwvgkPx|Z6fJV#w>zVG7EsV4kEE`PsD>QvHk~9Hrh#a zk-rFx*$WHZ*QbF?akH=6>1cisDfFHGz6mbIF;R)`K5-=~si>6~ff%(Q200%kQ$E^t z7s-eL?N6BGW97NwK8#F8Z~btfJS|P{&?4Am>Ilrwb~-H{z`{AP$LYUx-PyW006K6i zBS>JPe0f3n-5!5VsIZQze7NG7W|6*QVaSg7cz;3uK$++hAuL1D8yW8Xu~YDp?FsUap-C>-hf2W_6sf|T@t;8sNGB~r6dlVpmr_51{k(5 z%OZE6TI6IlA?FHij4gDBE$n-yD5$Ef8n!3`K(O^r(;_^C6PRD>#7>4+5M%=an6OSt zf3^X=WKoBsI@07eX7vtqWcW*{X{BZo4D3ufqG`>$ff=yq$~b0}JOS)r9g$L6kBlFR z$y_Elxz2X*mvY6(kqCYAs}5X#e!8B1$9IJ~?CC-wl-bSP7FCW4c=V$j;E19n+yLnX1AqaR!z)KRn}yM&%b>eK1CKj zOmrH2h7%v~Q1V7EF_eRBywQu?!LrdK!gN(a_Km>b947A+q!rv&{1n1+EnnKT<7B|Z z4QgC$&rW1q!w1_rhYdEpwp+B{1*l3qT8;6Zs5-EI{4kqxy+qRb%_;?#5msEl`LG$Y~J}*rS$xdM=Q}7S~dU zwN`oYi-$)&3e_WDJ&M$0x_V4gk9*bQE}u4Pg1!#qAPLcwZ(%JQ2#j*2VS_(9kKa&ADbM zYL42%=z4*16_%#N919_p37fwTdGEwC(xrF$KMq+(KYN@>%{*QHtw&YVZ)u35KVxt?KE722=d zrDaqV*{@Z2RrOawGpU4E69b&_;wB^f#Rne&-k5vL&<1^p z@YFaV&0Ll}J%NMwY_^2PoI6y`gUG4JLT@{@m0R!M+Q+$5TRC~S!))qvSG&rrt*psU zLkw1Dx4EFP<)@oXeGgzr17r_uhg*B$lRVHDvfmP&Zm`^7V~FE`B4X6<6&9WAz@0WU4@hqmChJKxy=KmY9B0JWP?-UH;x zXQv~y3y^Ehc=Gc23 zzBA&3Kn|GRvJ;u{{u1={k}bsSziO%gecgB{$M{hWOxf&{+M|v9jV!{iadY;_Te9os ztEWH9xH)U&Em?K7Wu5*R*0*f+&F?mDc8|QpT{j7F*IIFTRvgkWj%i#YZ*kQXBF)9d zL)jx|XZr^k4`q#%^R?xrR%wc@@SIDFZ9> z*aB0Pt+JR?JWvsr`wK(SG<^b%=*iOlrt-N}!bG-|+eSg&O4dxlQwBhYA2gnac>c8; z&v`Qu34c>6qVOJY@aE#Jq2m|e^Q5{`)KGLFJAvyyB!I6A{~#st1hO>&zxFV?;mgZW zcJWp#J#@vo8OYI&?wUu1EEBP2Rj#o_2>Fx`W5ejVeTUY znD;Fq=m{;L>_sXw%3$q2JCtmNc@@R`1;!-Ed%g8_K%l8_4Bjwq_;68QX7fyl8B}Nh zM!_dru&Y>yia=b1CnM%kH*G)wi^p*rMDhb z^rV4Bv6waeI02fPc=+#2VQ+34vFig!O#(@&T4SMYso$B0H z_C9!YsxMu?%^`bbrnu6dWt-`PFb5J27Z;zL#oE?$iud5Ymw+F#=6CP0n?3}_ma1BF z2}f`!EModE?9mn1kurhu(hUDKJ@Bqf;?3zMnBv9*q{3Pjt2L~Kpf)6HIvir_60%wc z$xj0aKnww*HTWp#krG@k!Z2_EoR591xbc>dMM^-`tp)71f{t`mYZ6lRLCG^8y#+MP z$1X=KFw)e`?kQ10MoCkflY5aSm2hSYPv_EUNJSThCjDiuAc$A{+{EQ(m2G(w2v;W| zU>OW(V31N%i_a5WkCQOa<4RFp*$#XWJxB`~&`|8R6WJAfRiSTB6Mjn z&W6d}A%V^t)mCl{?L%;(GFi&JK3#uG(oJ@zAyH8%>Qa2zqcAR(B|C1uRa6s;!iF(( zd|$MWcQvQOmq6dd@@G-QhQNm7fn)FraXY?hD|Z>oo_H1GrSpTXPoQAuhIiq9O6jTT zQoKH8y1wu(c9kL&p`d%9seut71;Ki( zqmvd1WCDUENzBT&YtOYbV$msZY^WB&!CFiUy+amj5gZV3m^bw;+xD8XF0CQjP~+`S z4i0Z64t`!_UkJBG?yNbZ@aw*7_T6*vbj_?CeHRhD`+++{(Z0X{=!)?+ew-{1B_4fB zEeG8VRLt?Rhxuc~iO206++C)Hzegm6cdeel5wk{(m;?58b~OSQ-~s!GF~${hl{%my z>S_9veBV6{TiWP2wY--W;cx&fy=7apM|UxdotJpe2i9p>vqv$AklX*jzuj$xT{G{j zohV^f+GTU@p3R^+sV|#=az=a90GKw?2r-4|4*8}l|8$5xkm&4^ErR*j_65Qz8fR*e zD&!}PAJ-xy5yZtk5f~ytieAzvKr_E!Cy_qiDkxT&?HbkU%D(KzYbxR6wAblM{Q7f9 z0is;lyB8>(FCIM<|LmeDPvM^%z&}m+reb9{uwrAC?zB-egvS!sspuzDGIvMUB#Iba z$9?)qzPw@bsKk}>`3Lsr?i|;JqP#*YKanRXM%yV^*mXCKVmCvq{nd22Pgl{iP*Eo& zVfq4xzJT@0D{IvjEr7Md&de2k+)mX?#5XUkW5*U_@eNZz;B4+w41HZUH?!efQ7jWb z5QhV1)@CT)UHYDPzQ7GMy^FV2`}gspkKon-@;CHZO*tsngX{0V6Q}MPindP-b+ii* z|L2K33E+e8tT9Z|kcI?f@a{jPAEale6qh=G$b+Vc*)950PRv;}+UD?EfI&q_t|m@N z9qEzUl}ufD%G5XYNL`#vP5c*h*It=E1v{QW3hmLKpdmsXQ?&>e&(>l#1!wCMUXyuIURw^n1*7vY zO$v2nYV|+Cs~OT63szany`TaMy8+{bExQ4i*_n4EI@m#lN{dWKPDyGSEmpi_Z~HwG z!NS@x&R@P312_t=w)6iunZK?q*zqhNXyFTqP{(r&NB%$J-UU9Y>RRBQlMFDykrQf! zs1brr+eA{$m{=2u8Za+4K)j8LHny~-Emqoc?L@H+fiQ{5;bcH7z1n+eYj3@MdarGz z_(IKqBmv4JAnyu@)lP^=03`{peE+rgnaL!g^!|R|{XTSZUVE>-_F8MNwf5d??>&LP zA^WQ&?|QDTubFbHCxq-%QSctJcimOj_o#d@L-qnmc!~c+=bH+yrSNK3MOH`ijFdcA z5K8F0=o%BUe;>Uc8M6Q4+@rr!@h`%-4H=L^P3-K59FmbrIBXmVRpuG3Y)_bt<-Ssh zBi!B~pW8yE3A|)+sc8%+u~x^qzDVPH^y-RkN?-!W8L}r?MpTsVm#=~A6Nr(J$Rrt> zg#)T+25xTWt8rF(ds(V!hU`iZ?ff@HrLOO3$W;AK$o`JJ3i3+JO-)p8su@MLpH*{q zOwTQc0=7P>jPKf z8Y-t&G)-zw!eroGD(;(JKTfaXdDM;2MF!?&;^R^Uj%o!I_!|wGzo78(QDRi7_tzUn z1i@D8EN!MxH}9(t@r-<5?bMW6hgKNsf@LW;;IA(>r7~sLa}o$fI=?_JxDc2 zQgyE8m9m+gi@2k@(!G>_FjkvjOcrcNKb7FlO)eVVQGJss$Ce6tPNY({_+$P|X| zGrC4uXF-346hY&dEwghvqY+`+3ZMQDK%;~zN{i=?)F@i;{Z7FPC8@4uuy=vl*k+Eo zl%3)cwqom}&g4yt)^gNvE6!|JcS%$G4sTFyq#!BAxty@Hef7DXSmPb`-9b~9P zVzyJZhqCim=>mfHiu|85PbAMtziX5#OnMkj3Bn+Gv=oDmMc%tqGw6RvX&nP!K}^#} z?wFIQjt7&@fgf!ddI_Kk})wjcqe- z{0;Sr>Vl8VrR#aTaVdYyrJMO1Y+1-atl2nQx<*QQ1hcUf;wiK?z6lTm^B_VQa%WPm z!T50hH+A+ z4%4c1%I1542$TjpgV0Zo!V|BKe`dWztCFE0<-%Na2#2UM7Xg=Va?tE*+T0(-@u}#1f!o$b z*%{2BIlNCjLT>*+d;1X9@xL^(M6uxUnm@yfyXDXBp#eo-?$5&WQO}TDrX!AlsqAdh8Vo2Xe{o@w@Oa0@ENSi!zE7B&3xD}6DvET^@{Tx9* zmNE}kFIhn0U@SRc$ZWMsw|WY>uQl2i7Y%b2)R_(cO+oNgmfA&SFZtue@wL*zaQ<$O zrdA7PgE|T9=&;M9`;amjX{`U1d|ahAd~=3fzQZ?SQHtGWeY&(s#*9MVQBl!CiA2RJ z^7J0@4fR-yc0DYP`^~Tz%e_CNQ^Z}6Em&kWtmQrqY3Yg$p-~j+4|i*%FZejp9dAXE zJ_Z*-TEJ+e6?y-}cL(vgbmu-9ah3X=-RDByr;wM$qj?yfg3M!?CygF!m1bpc*WGcI z@P2Y7u5l_+B6!xT7e!;U@^fequDT(_8QWL5qzb+q6kFXL8L0b zn-(PRgl>+TXf7%f8+AxavV5cv$K@H+P)_qn{?Sl+^_`^j;xx%4ZOj8iNd)RKJMyp$-V|@@Qb5cZPpuAoIfO?f7uSWzGVv9HUwAmn=35$;@B}5^GG%5~( zRN2x$ZEd*=_hv^I9i!?|Ux9+{PYuyLVt>&TisI;50D+{W1W zD+jGxv|}uvwWBF_Mt9VpE-Ww>V*g2WevsR@>zZ~$eLOiSJa`62>&Kv;xWXrZVe@RG zRYbrpx>g*ma>voSRvfKsW$COshTQ0U7$B{U-Ky4F_>GPDQ21}UrY^q7KSWP7doRG9 zn#z~>n!cpbvVO$-&Pu_JgB{7Kt1EYds!M#;H6(JX`zfvUy*G7rjdOx*W!3g=2;pTjX_VG9l-?7f&h_OTNO7gnJ$%qATX2a(M|JnW4_fyzXQ&mF_GSa^dUJ zv2|5f1aEc)ZVxVSy8^|bfNx&ZqGfhCepAC1v8N;K=>sEjj?w$#n+$$7wg_&zc}I$P zgMT0+Z>W|gGV;XyiOX%)|41`9G4{SARZKs&vMXuPHT( zHbqj4`aA$q@C^H5ul?0zyG#Zzt85uguCxo?e3@QH&8cZJ8HN-%>3<9L+1_uxti-xR$4I?HnP^Ps4v& zYU!wgwVMQf^-VF@D}3s+!;c;M^Z3CfsD`_DtHP}Q=Rikg&hWQ%sy-8C)b%w{x9aKS zQXO5VtVgIzTsi6!HCPRx!SExmBPmh?A&t}^nKHV{q?FEP>LEK-_$unxy{g(+QKa+x zG7EsJqH%VO;6@?1p5i(y_#zO}fgliN#-ol1FBvu#crWrEp0NB$Tng#o%0E)fQVOim zndO`*;uu=tOBK>-+OWE$49w-cceCLHnQZCq;8Hra%jqpk7r)AKDDaz&XW7k5Jj&;F zhFN6rkfK7trz-{m(ZuUXED9-vM96EMQgVm{I4L7Old24fU+D78;LgM50DEXpA~uao3tE0 z*Gq`!t2f944e5x0yfv+BIEkw4B#FqC-p1m|-U1^qxqxv`u?+g)k4clIfmKz%X)l#P z5EN^b{V&qkv<`FntmO)e>gPI_2`vQb!x==3{(`zz*=3?gX4!=@x<6AkH=%0Ls&3P$ z&Xn4L%`C2>V_yOtDQk9QFLV(eP7<8I$js_%of4`kWfag;mnzv0`&b}WFUx7pTi!Q5 zp**1L@*Z%?+W-bmd00^aJj0%wD&_pANTV|}&UF?!<+;ka&UUWl&UL0-7ncZWzagY; z<I5Bv!teGy&6_pDnT}rrg_YUky83yS^*DOoyfZzgxQ)nV8A&ef`CAPrWIll8M#edQmWf^e?da^H|DvuVmlbt{)O2v;k zMaCCZ9+55%MU@L5%!U_X1L2=DU4ao?%3XnpTnGl0rz-YC-*SGP&+d@P^E@k>6YK|v7BDtjMi)e42 z(&Q3U^X~D{%U*!nL@(PVdKU|ZTehyJ(k0$#*zp?m$T%L$n)up+Gh>$!yr>`lB)-iF zPR$82g091p`ws+Fl(wGV^G2j#)}#F=9aIS5bJb?yiKqJy+wSLpGTNS7CUCz+_68O? zRUc_{KPOp=C(ZHss`mun@G6QxE!lU8Gk5^vbp=L#tIc>iQM!GuR=1H5Y&WIIhgc#natef7eEYlc_L z{FN-;5MLm+oa*&9(Sm8#8R=5ZuV71&Q{*lP93Sb0STV>q-LJWXruj52cfNh&di?a@xixZ9ny zZ8(zWGMC)Ottjs)q8b>3MJX;3!?<|t!jo5<^(;`3@z^}GS%L(bDt#>Tl0EfO*?rY) zl<;7-$Tb^Y0v`@kSlD-U;6@Gj7i()X7WNfdhXPj;NqdJei9sfFIcUyLT3B9K|8veo8KihN^<;Z;cfqP6xq`QQp%y|BhK3PZPY zXgS}_pR8ufxDNj5e@Z&0%kuQrE~E(wto8Yo_gOGGDvXHOc!}bxLt5 zU{Yma347WvIQSa07&4{I3VRNm+Z^S=oqdW2+4k_ZV$$Mct0jyB%l4}8hXc8e%&0Xf zFkXZ~@%iqx19DR+MTaI6^UGH?svgK>*`CoRl4ET!SB_vuw>w>>x3i;&h(TIvB;a1~^qDWa`8hXgE z{EJ;o#$4&{EHGaDHfq6a{0qSBM%Cfbtw!7w-4N+tS#QK@V>T_8q)bYMCLa&>Ui9Jv zV}PJu+QhR6qQMjaxjZ`B;oiE{%X$Duq++P_=5S=V)hA&q zw7d5)WO*T!VSB;@!;^MFRpwZsV z)?3?KI^CWywDT6+NNFh;@w_JQMOFu|l0&Ln_zNwp zJtXrK+-TM-kHhV2a*v#BoeHiw{hF8zv;H_(Sh9I#Hf;CGL|%Ad_{74#F%NlE5vg7G zAx&Vp?!_cmq09UgTjG#9^#>(XH$`v=whR-1r~$@XUqPqpi03b%AdS z+1q#;hFU6zr4a2sVnmo z{)GbLvD%xq7Y0xDvlR)&p{dTK2M+e^?P?a-M1nuf3h{)7y@B+FrzWZjK6r(o38xbb z;q*o`DEoS`PJF6tQ$I|l8Hhd^EN625(?>{5fO)^Wy4B89Y^Z8BW`Wd8hQZ#{zv?i9 z<9Gr)y`qpER1-o|hg(b4V4hezM`hHo6I#RJfJxuU+bBB?HWubb9y}gAn{3v%)gq z&6PT#e-8qdnsbp=+4#Qofjy^jm!FvF#%@sf8`lrH9tiec$8E3KFbfgt+@o>E_i}~) zpm5$tH#60)YU~Ed6l-_5b5z~i3cco0Qt+z^y-vh4)z6})o%XVSlh=>|6i?Euv;FJM zl^g8lCGz?e-nu62W}{XCwnw9?GWgf$+)49p{7|UiXMV1+H>Vt|%OTWmD9rxD!L{yS zFK6e89_wVGH*`)n8@?r^8sXo|VA$gdVVNgg-&qe{imcl>i^N|3b17ZSY5#-`h*xS( z)#haOD*bq6z`E1F+g!QN$@8khxXX|7ryjZ%)-nHXA*@xtKRc&AORwwP$ZeFZk3f)x7 za0K@1q}C3#32jOa6SVu&?aKXbKU-t&_vKXXr@yy9gDbJGsoZ9n4Fq2ITgTDJg*X=f z5H>5h4!J{6g-%=GOD~BBZC5VswsRY;z|w9jrI9E0&T3@q?WG^W9BlehmgzR)q%G~` z8839{X`bn)FFnn(H&l2!KODN%{osolI{RIji+)I9q3LO=i(|cIPyUeYP(Gj%EB+!? zlS5)0iAQ@Xkr$a>+25bD{4bS%My;*2aO@zkqw1`T76%$#BUO4g#3;q$n(N(T_zrCJ_fH_A^jY*CuloXg3!72H0bI;Cv{( z^=Q{+ZKb*oC9U7pR;v3>r5<_mx5N$rjrVX0m2Y!j-P$cjM09*J!-w2v{TqNm(N@v= zXV6Y6LqRDS?U@p~J*+luQd*CSplLY1wE7ds!J zH44m?8|4iij=8d3?&$H6QP#>xM~?4*MaO5L@3{D^R&(WMZqiX5T+(Q{F;TahFIVuJ z8w5T?%0f+rkBqAOhm>xvY_*r&s1hvunMyzme9p30rDV$S$*uG~tMCc-hmWMj&^A}@ zwWFB7>SRpMSrN^cCbwkFp;$oWH2=&2BaxJ2CKvx)q>Av(1%Z z9<$7qYq?OpHC%jBC3B^aGCkZGSF?IuvwBUr4(qtNvIjt^Z1%iUd;*mIfFfLep{nKb zpD1KSF)vs2h1ywiD+KN{SIR&|_TY+cS43Z?*#td=jL<%3Su{UXQu&d@0`v_Z(_-aX zvJo}xVuM~dyGoOK)n6PS={c*SK(gglNGF%o&x5pl1#yrO+pH+u+U1YW{fy^ zpN&z?ZoW_w^BR~6sh(I$fq6D*leUto)=5VZcw4J!ZRxrP#D9fS^cvFHBpOPqlk#O% z<1Ivyobp6ZPGzFk++;m3YQWrVy&{SL z*UT1GV6L~G5M=i})Rg1Ni{c8?)SXXNwB+f&J$+OtjDxVBC7FY=3M?gglbaTm&hA)gT zS9ane(za5=kx`#j%JbO-1^HP88A|&GsXiH7ShbX;zS|2#96nH2+!Z!)=<}3M`SE`siC4ZuD(#PVI-% z`f|R~n=|cn&hXGf=~OY7fY{Z#(qR0duKQ6{chtKkgF-0gMm}rmiZ?p-DX`kjm2zl9 znzczVKQyZDprX*Su`1y*olul7w}LFaZn+h@??Ro#)z)0OA67uK>ov`yS<#cxtk6tl z1qw71gfpnJj}{$k!}v~$l=T|Z`WGBbGji&eDg>}sa;qtym-B4&ZEnsTe@BK2a_)%; z8dg`%WYK<<{({2xOwK*s;!&rHj-O&SG^774&MRG7xw^mqWu-|v;^fa>alP{aU9v+I z2l~lLE4rj3NrK=Z`!RIX3zAgpDD>VONAJZ$4j&#>_pX+`YX;zMPuhqH9s(D)8h88I z=M>D1Rx47Jr*xhwMPs@nMlZYB9Dt{hg0v@Wjg!_^3Vk{V8h`X2J&qN>kZdw6&_7{c ztYOrT7yzbq95viwFMCp6zot~*F{SA!Lwwvud7rceI=jQ~4TB(+w8Y$;v}<$bT#MSf z){|3ot=HV3nykmlF*jNdxUKEzz1uw;YjTV9!Ij3l&DwndYDoKBpRt=8L^1ij!I;O@ zJWSqXdlMaxD_%Q7AU3Uc0&Ie7q8jq*K^l@ovBNBHM*ci?VSzZ*)zncsxSH|DQ?_wD zCI6fgD%o*a_NTwAB06pscvop#*&0rbQ2_HZP=x87z(}o9N4vU4^Y+5%B!EC;h&tI~ z2-q*TYM(~1k~J-(f#YG*=p^zQ)XTNzV_BnHq{R<2e(-lNbo=H3E^^slm?$LFQmwEt z>t~93rH|)t2|ZDBP@KbSr*S0E+atmppuRHq`i2$u3VHn#LOu(p1bg$U-=Ybn`nSH4 z1~eKKyORaDV+GAzxqxUY%ujZ+K*YZ_crxv^Jl>k+$3q3l`8}aP^54z!p2cjM*HnIS z9_Pa3Rqtis^6ttM{cp{Qmb>^>lLZL}a|N<$?C$*2zpcdIY!O zalt9vDLZ`(o13)0iNB>K!T#*(*EuY6ZukHwOnor?c5+gf=K#?^N$9ev4<)ISN)Rk| zbKA+6f7K~}5KUPfP5E#V%Qkkp<=h&xfunb1Iw+a5#X_Yu9BSiz(w=+T%6-x*J8hRg z>9(`2z>{vv6I`7TZ0RLS&0Ch5drpl^BUX9n$ZBjRWyU*@3oRsGF^YkWZ`i2;=REwj z+vo!V`+#Pjl_AmUhxoLtB{bb*uH3?LPmzTp94Y$Sy}`2#L6NV8AvdEf)F9ph-_<7A zvP(SqzsQJ>3<)z~7myf#7oyX!kaTp7F7>zYHKnbgo@e>jroPBsFgjQ@_e4`xU zTPP5^Qh}M$wlJ1ky_MXt6OdvR{`Ns7A6el@VxWo|$4;iw!@!+MM|C3~Eff0zP}LY#3F;qhTt}Ptu!yz@UTWpU!%^lQRC=Hq1TYF%DLq9|=<-{BxGMXMzQ@L)% zC}=(c0VxXt#y@(+uu$_)otFZT5(#|-7q3+!%!7pv|9%?f z-w^CRABWvTN`7!<6n3wPDB_iA1i_?FOVY)TBsD)O2^2O*x<)H$Y98*q@>CzO*jQ9f zv(C^Gr4qv$H~2Ar9Vc1Kr7`P?Ob54tZ9T00&@REgO+;&*u*Mw@GpJQ}P|;tr_HA!? zwO3fE*aT0)Y(KDG5-FbQM4iJqi%JqH0Z@sObRsPzO0+zPip_F1O}q(VzXOh!d2v_!<@^azN` znPv%qOcdpU2}c+}3zb*Bc&J*}Q7W6DveGwHWZqj4nx4D;Mf(QM?n8~F<)ma<+k)@h zoU`Jo8YbE;26%@vVvgA5tVpfdr{BnkB5%Tn#^7)}pZU6twfpUPR0T(gICd(a0t zD;}$1ot=zDqXu-+C3Z>St>_ZOnO3SIt^k{TeeGHvdpNtNl zG&)}Y@tjq0=&bq}I(!|Bj-&^R0jvN9I>EKcb!QfWuGv7GU%!p{l3^XUl^1-&qvHm6 zYAY-^t}Om`8@pcqVdIgu!pgIMd-bKplkg>un|M3YM{HMZehb7LgGPZ}7PyFd4i|(~& z%NC^>ax&a{b#k0rPLMN>aMawM@akcqWj9DFMh@F)Ldo`bQ%Id1ZX4(Cov_Q_ZhT<0 z%HdwaLiO2_F1%(OKDkOLdvxad&vM4sS) zTO`$rn^Y=JRcq6!(n(dI&qXu3I0TKe&xVCojaR8ae1lFU5#ELVHOvOB;V8L1)~WCs z@V`i<;`FlPI#mX#%KRH9obqqrY_wf8BU05Ts#I;`tW!Ew7OBc1*f#%hu;0yKJ*k>6 zP^rLvn@%PBvHJX{Cam$Ff)e|f#3I#-9F+>}*XUHaq)PE`gZSI1<9_S7q*^ser5eCK zk5m=s#lC=4Md!vI{-?nhY9N9zyO5Nr12y1f+9%Yah?ME)twkBB(mtgY8g*)%m4k%v zE9aNmA$u)los%897G%gEVJ<%(zjT!$c=FS~YsPuj}{{~Estl|U}zm&z|&B`=7tuu3lS z=co0NTp$Z=()s18C6BV4O;pL_1mRpwB~Cr5>))o5u^=?^YKgLm!~AJ%-Ce?(~V3Kc?us0h+%XuUbOo~5VIRMARf7zrbmOb6l&-F@ST3=@Dg4q@@@!RMD#@j}PjIuAfssdT8fLQtrl{|02Hh#RS0$HrCa3NbIFAz89ldAej_T>|* zDv*ULLjR}(Ca%CIR8=gOP({3lsLvJSZ2d)wv*K?_b?JEN3JZLpjc}n*)qs1(DsNkwIdf)ZtgF#)z4au{9K zS^p;g4&yk7Otq-asm{Pug;i3{%gr=%E?fES{+9Xm@Nx6|(<->x#*eMS&+=kHNk#CD z%D74J*hutSoW}wEK7MqwR|2r*=w`2TbaUya9NoO--&vkEypXQ`i!uxlcXYEJ1o$j_ zg8frRHa7x@(SrCRn?DXv9obwYtC~v6*zCETRj4w$`Di(#jr?VBa~R=9B~_L_oVlE# zt7(;tT}2OP)?+6ndhDb`kDZk0v6B)#cEX}IhW|hL9A+8vRD)ZD5&Xw`Dop$MRvTlB z{u6XWQrWP*F`a22II`(m=FD~aH+LNyu%B*+8|B#v!PexuvoaW2y~p40-^-}j4nkt{ zn8!)E+Sp(aC%SiWWh(pG<|QVb(FppnJ|$x03j zDl-D*;@+Y8WfI)IczjcpFHwS-ipC@uOa`qpS5}QmXsQ~M&{Q-k!B|5)&|*?tTQxkv z>IRs*={{HKlxYNSguZK3uWCweDl?)(P>)g2r;kAirmWE+3PLVw@F_YSr|3o??>E*# zw;DC{bU#?;0y8_L7MP~muGb35nAw`&W0v%=8-WbJsD&)V??%>eEU~m|+c3I=y@i%h zeWg6AF>CdHvKnogEQgR!_OwA`8Tm3k%IvBBZE#R%f0@Nvy2<5e6}Npyg?)de{Rl%$ z>>>}vQbX=+e-}e0rx;I}_sn;8vJpKlbrA=~w~R2h_;*Zb^?zXOXL#qX7uq5WDQ&QC zCx+Bl7;g0%tqkw<_;(r`L(SLhoty5%?|#d^FO~ec;qYkVsK0Fj6C1{!(6X@~Y19%HQc_e|L7?=g0T>PI|h)_g>~)qUxFEYRg{p3vssZ0rlIxc;iv#!|+V z?vquX+3}_B4mFz>m1O_c>ap+3;G=J7nZ{2_&PbVAe58jxxXfKoExcdK%;sa(&@!Lv zDYB)^Tt21`E%Q%bW;m5H^Z1xIw9MCbR#{S}grX%6E%S=ek3Aq|7Vr-c> z%pyLb=Le`O^;~kxBfqB1@5+EqN_?4zpzQ?Did$7t%tvj8A)67UBFOsn&yG8RCS_}* zHa!kU+*UReEquPPCES|CC}0m9Vxo&JOY$h>j(flIIp!xA_uC9}+Wb9i(UA)L-?y#o z46jZxm_LibF9801$=B={3O^nAUrH%T7zE$w1bW?jzuYwxdIr$jPi_0hQ0Q4ee{bX4 z69z$7(y(L1^=k&f2KQW`H(t2?!$Ht#YaTFTk@ zG5==&PKTdGhhBSzDNF?w&QbFWYW};;`);?|G+g*YEqv5s=IyVX7z{TZxN}#%{@P%; zLW$Pe|Hz1g3*}N3$4-9!mxl&J&INKq_K`OSL(T^Bu*;j=gCPqK^S8XYJ03D^!VqzO z_osW`8w@!`C|~oR;|D`71oAiUdiD(?qG%zS-q_sJk<{To3YCkl$ow$eGThh##$My2 zo*hZ8{vDy_o1W~y>XvYLq!C8H7Z^Kwwk9#-7Fu@IZ?0VShwy3>Io@xy^=wJn;%{dN zJpbt@PKR4A1`0t`#wMVL{T&P>thwjQ-wcO`1Eq#dF?L3wT>Im{dY6V*k2KbkzQ|~e z!pWQe;gSAuiwPX&=MivsmZELn7M9AI*80&RIfE<|m^?Mr)*sEKwN=fTQn2 zbjNj0R%>l!-(z~G18Xwb|1gkUvJnHN%bgs>I6EHWUy)UILnEVX`s-BnoEYO4$)Z$g zXlA`E(uv~!)hLX>cRwY6r>q^c3VdBZ;!k9UJY@O0WNbX$B5r1_{u&X$R<5s0PRLUq zo^?Jvqd!EJa}^SFWec1o`pG9C7U}y8xqrw>CHLRa_t|p)748*lWmT7+=#GmEt0H_D zg^?VsS;JCAof5BXTizc?bEE8qJ=&gQiT@ze6Q=qFUyRaqH+5L64jHPGUS>r&orfR zYRxx+LxKw6D=hfwrlTkuW>?FZS9 z-6ut9h0&(lWN^Nlwcu~_-Y)jW$h9?@j;UC^ z@JY9^8ZJnDO5|?vJ7Fg2g13ucG?hV$|opx1^D6@F6;24rH z!cl`zp$KISjrd!xj*g}eL?@R47v2<0JlIqTE7IR|I{i(jQy+_2xJ>5?ioC?OFr4Mh z>EQ)&b}K8&%az2yLe@ehowz~hk;wl*MA^H%`k~hm0SOFDbp{*D|;+Dg4VsY zHpTubH+G6`v3k}$ndBWcM<AK*;;5hXPeB1EjuavB`w~de-kdm#jYW>K& zza_3ZcT=6N%Wk#IhIO^i!j_K!WlJCff`sWYT#Cj7pMWDfHSDVxs9ZhsA?zZD_I3+`DMbEE zIJ{KqEag-ET-$tE>GVj?A!~O;)McaArXcJ$@93%c_QB+KPwQOl~G9M#?_N)qyqp`=Dic~8y95|{&5*&Oh9S%?xSySff#G&M%#`<;DM1q_3Vj@V9e9l}c zzR0tb(fODpV!tBYF+0gQE_76ie7-<=jBMxh$%y8b(3i^m)dbe=49LL*%Cc;Ve2q>e z5yiL(fhj1#$Q>W@3{h|8`UzD?5gn5ZCa#DyLv$tntM*FxkS-shmEbCD(%TQCVj0zp ztXHmul=1Fy%7T1vaqW7Uv>uUAdDMF4v%A zh*xoTkVrh))APFn$*Ngn#hZGRoF_SYP22(5Gzm*Yu&k{;|C{LyRF6>1?8;#kea+SM z9x!nyL^@b2Hy|A)`I~AE$*vFMjrAQT^S78klXVPV`KnUOb??u?QbnZVxYZK{A@(Tc zl|80mtLkP4z8tzubxs~)vCzMrmK}p8cO0rd73}lW6sjqiVBcqJzNik(s_T=z0%|f} z9LA-tPo%ph?L|@7b$zM4t1;{P)?LU%!!HDdV9N-mQ`8w+W=VHcG7i)^k`Zv+cG(pq zCL*(eB`s=>h#^1DLJj49LX&N4l^t$M}|=Hjne$in%BG7|3GaZ zRHSegXwI(8j|nN4`DBYmwzOKvB~}#~Ns%fPI8`Z>XQbyI{N_B>;AlE+q*90YH2eq+ z77FffLf-CHg}d|f!}G@=JJiBG1LGE{IEt&>nmoPw7$9a_NYYKbQ7Cm*lU=+A1)MKG z{9+XF6$)_ZQ3P6GNlwJsu2)DaJdpQ^7e|vHmp%kj)GUMv)wpLkB}uD{Y>@^?bL1!- z65+IGyJ~Out5&XBEpQfOMB)5_Bnp|271m#gqEuiSby>bbw!+G;c|nQ=p=_?%Y^X9{ zW>>PUzR)AdfR}@p1asBrdLULz(Rqsr{IPR9iK22cbAcm&m5ydlkdML}VOF`rtP1D3 zOs;VqHzsv!j>&ADN?j&b_^uihJuPf6FtVMm>3nq2A1~vb(n(xX$^^T40shfmJq z$*R7E{>jZzjvW46lp~{&&hv1jUJktNj0he9UrGs5pJH`n9^G~zi7J4I;Ni+YCKUjf z%WTLeeYB)ttfb!n;5;QY1f>ul7E-G;_@AZtpDbcmgt+VR3BI`_wK2HU&jS~{6rmeV z2!%(L2^7$SXe^CEFg}p06^vgi@Jg zPMzRy!`i@2gCrJsFU8==z}lz7vX3Wl$)z!l&0H(I zaa7S-KA?)G5~tr=_lDRQ)tkPH#2(ut_Udx_9!ga^=BnCTqFs|sxF&L-wz5yiYl?j> z7XChQgQ`>tacu4mmGnQ*u1C!NJTPLW00#RmuetVh5ye-8#SOXt9vE+&Ky8ard=kqO zQDDr{ZlkL-e{;>gt|Ya4i6mB7iep&!zHBxe;guN1&){KW7-c)u|KAK_+YgmuqWy!D z>f*D{E4DSJo8}3!2y~59ME30GBLAZ1u}qmq*L+#c136}s5rX8nu6`V<2RyRAc^q8p4-yy%MjNX;uy>}jD`v+pS`F!6KfqjFhF z+3+;5?8#mUJ4l`=o71re%*6p(;BR;%sgN-3b>i3!yF|Jah+{QoIbO@1Bty+m8^x0u&b3PMhK+OO zIq)xVOWko*DF#`RsyItBL-K*pJXj>QSt!7*n_F=)1oZ)^vy+=BY?g1gzU zLYqPX;T=e(2RaA9l&0&{kCK|!TCN-Q?2werfDS#+NQA~M0KY*JRAiZ?6J`}i`r2EN z9_gP#;l~|VH)vP|Ly#v4w!Tn6rIMm_60ihB&FdsAx7teckIXN!j)wkKJY%u%g1WNr zwgdQW5d;eUB*1}Hov%p}&V!VTOH6P!#8!rxYc5oE37xpdWl*fja;|xD1$db@!P&|L zi~Wy6iG#)=sdMC>t!GM&i4fe zmNbj`&5D`d41a(AF{dhd0K)j*OzLPE!<{molgyt&F|#2=3SmW2jYM8%XoEXjH~_zd z0g($GSl{?mSW%LyeUbA>D!NG#*R209F}7lW5g!7R)IblnSr}V6)@?w7rmJ>mHuP#< zd?KUGh8;RZhBC1k%EZPC4bpg*14}IXr;|WTu#h0jZ2kc>WD|VRW3K9PpO&rqZe@aJ zC=)zWnc%tPQYLt|aF(rU)pNWFmUOgz^3?kzkut$fHpc{`_z?XW7ES#7?7`ZAC zeizjy4^poMaq3lxCuwFgH*z7@fTDoR;*fiWt9B0WX7R528l|2hS3wqT{+Thooq@YSH-ea=qzQHn#_-(0~_*UX|hN|eV~fj zaF8b3^=;A#;}zOPF?Pw6G}SND)vt_JUqmKW{e!X8(o%sVUlp9wBOEf;<7)JGGCC~4 zW=03$exsjf80OOD+=9=nU>+`nCno~> z=BXxHsG8{0WLHh}DS=b(YgfgYG*Y~O&|3=@J2^0TA-{;BwQtqwpxFgE7C;C?ki|`XqwCQQkT%}H54K9cc zR4!nQgcfYpKg12Ci-=026<$fBoyXN1qDv1DZav&eRk(H2bbl+ip#Fz_(MEcW1|#w- ztxOQ5IYm3C(ax%ueA3K3a*cd9mis8akFAe;l>tQ6ys6zkc&(eu_qdBgLHZcW{vIt` z_P0Xg3R14xiNIOGjkLY-ycMinwHNdD8EyuYRhowA)KBS*DKUusT9XM8+|gpeXF@E& zJ`zxmxdNQ)Y`G##b41tzL)6BcIJGewxt9!ul7VZUT*>%P>Kn}uR8BJWSw>cBY1XgO zjcFdXu$6aws&_s$NH;PRb%UtEYHF=1nnn#Mm=>4>&e8%okX|XIa-Nk!x`mvoMTYRl z0p#e2$dutxAUm~g6|Tpc?L;I&7x9w*8f&())1vSqePyS1Gp@fMs|G$LS9Ud&2Z9meaTUNs$g+P zzZ%PQ7#fpFz{$bfQGFRvyGAMtBnL*2LV!t%yePFUi^2FEDeNcXR^PF~gc=An0A|D!)u&?Z5+ zOlTBs_hj26mL3i?HEKq8`^ z;}x_FcK}f-Xi20Lbc?!i6tvdNel}EqIZF0H=L-F(u;lR~d35yl2z{^g_9=Ew;Jwn@ zNA$hY+wbUmrMKmXQqkL@sAH~H@cr1-(l#bCqdi5}15QuT=Zr5h?IiO~Du$(vd!ZvY)4h%T*_v0}fLL+6n zJ}HDFI{ecmlW&^27>KcoQEL7}w#SIgolxw@BM68es5RrJ+$Dm5zK_S5LLAMO-m<@@ zXXy0suYU?X7*4ktKbGhUGrxWQ7}fk}!iO+2;*B&@Z`-u5w%FO_ws~KKA}NG$r!tdk zf8Q&6UH!ymtqHzkbVS1cxGaey93H>T+W$zz9;Kj4N^)dwtQ{{g6z-<*y9vrt#Z48? zm`zCIC>@aT$AJIm~HRdnP^XsrISX0zr#KCD0_U zkVMv8j}vv!xl45Nz+(xjQteK~tO@MRu+%9&T1R6$e@|*B=bA6Y9fne+OHUz7vVDhV zQiZ4bqTor^G(?q|*q5$kUcH2#?tf8ajYDXHa`1`#>HM`&8CNp+h{t$Qk_5&E^9_}5 z!G*$0`&MuM=!X+7X>phstN7cT8mB6bYXqsK;`Sq+{Ik_&T(!P0T1`AvC^3nmgc27G zp~NPtu3pXaC`qJ0!K2Tj#Xc_v#EJT2Zj3-bnCrF8Nuw5AQQJwgsbR4QI4WoXySvs ztH^i`my|Yb9Wonkq$Cm)3OZc#d&AGRY-} zVJfhs&@7BP#L^!k#)P9^H7pr5BBet5Tq(yzQ`VOtGo6={-0GI-%)rGWBlZBXzq?z( zM5r=I)K;pLj}CQ`KqqsFY*kG+KCY)b9lhIm5`-Kube51AR0Ar7j<_%+a3|-2X?=`g zh;2d3nM=yF&Q_KrLs=4u1DxjJkEFs`Q7S!=D1x-~aE!8Fzub80){l^%M;FsBpGk2{%S zPCrER&OoJ=<|@o1T`X`@t@$qdK0@heu^Fz~dnm97 z(@2z!C@U#_hFsEmWG#fRX9ou_A2X+J$#3o1YL<8R?C>8>oG2$iL=xF0&CPxUhtocb zkeC+R@wul}A7q7tHN1+))=6`^I ze29{{+GXG2RUtA|*VoWrTSQ&c71+7nkozSNPh+DPS!s5CQ`PT=QvO{bBRL^jmz#K~&6)dZ{VHrA-8u``(j?Nzo!MsfN_GzSBl}H|@7C(~ zC{5)H6*LL~IT|Q)OYJxz9Fe+%36~K$@l^p)QY}iUD zo{km{z7Y#X1#B|GCAQ~8*idmL0TJPpP-T)kc+kT#n;qtJM_)%tx?Yh#na9oN_E>w& z=Q?B@+?B~!-fYU;+_TSou7~~S1bL3gp>a4SJm$2H!>mAyN@SqImLsvU2qlHsg@hfX z@TkU7rTIH+4yzs5^O)2o6EOsR_I<8U8*+a`jR#9X